diff --git a/asset-manifest.json b/asset-manifest.json index af5a84c9..57fb1e2a 100644 --- a/asset-manifest.json +++ b/asset-manifest.json @@ -1,14 +1,14 @@ { "files": { "main.css": "/static/css/main.0da2652e.css", - "main.js": "/static/js/main.c64b9934.js", + "main.js": "/static/js/main.10a5a4be.js", "refractor-prismjs-vendor.0abbb2f3.js": "/static/js/refractor-prismjs-vendor.0abbb2f3.4ed442e7.js", "react-vendor.js": "/static/js/react-vendor.03814a95.js", "refractor-prismjs-vendor.3665b250.js": "/static/js/refractor-prismjs-vendor.3665b250.eec550b5.js", "refractor-prismjs-vendor.a81a7d65.js": "/static/js/refractor-prismjs-vendor.a81a7d65.e53936ae.js", "index.html": "/index.html", "main.0da2652e.css.map": "/static/css/main.0da2652e.css.map", - "main.c64b9934.js.map": "/static/js/main.c64b9934.js.map", + "main.10a5a4be.js.map": "/static/js/main.10a5a4be.js.map", "refractor-prismjs-vendor.0abbb2f3.4ed442e7.js.map": "/static/js/refractor-prismjs-vendor.0abbb2f3.4ed442e7.js.map", "react-vendor.03814a95.js.map": "/static/js/react-vendor.03814a95.js.map", "refractor-prismjs-vendor.3665b250.eec550b5.js.map": "/static/js/refractor-prismjs-vendor.3665b250.eec550b5.js.map", @@ -20,6 +20,6 @@ "static/js/refractor-prismjs-vendor.0abbb2f3.4ed442e7.js", "static/js/react-vendor.03814a95.js", "static/css/main.0da2652e.css", - "static/js/main.c64b9934.js" + "static/js/main.10a5a4be.js" ] } \ No newline at end of file diff --git a/badges.svg b/badges.svg index 69fec054..e6be4308 100644 --- a/badges.svg +++ b/badges.svg @@ -1,20 +1,20 @@ - - coverage: 92.57% - + + coverage: 92.61% + - - + + - + \ No newline at end of file diff --git a/index.html b/index.html index 605b4de0..f0860fd4 100644 --- a/index.html +++ b/index.html @@ -1 +1 @@ -react-json-view
\ No newline at end of file +react-json-view
\ No newline at end of file diff --git a/lcov-report/index.html b/lcov-report/index.html index c6eab755..51455a90 100644 --- a/lcov-report/index.html +++ b/lcov-report/index.html @@ -23,30 +23,30 @@

All files

- 92.56% + 92.59% Statements - 759/820 + 763/824
- 76.37% + 76.46% Branches - 443/580 + 445/582
- 83.57% + 83.68% Functions - 117/140 + 118/141
- 92.57% + 92.61% Lines - 723/781 + 727/785
@@ -110,17 +110,17 @@

All files

src/comps - +
+ 90.3% + 149/165 + 86.48% + 128/148 + 82.6% + 19/23 90.06% 145/161 - 86.3% - 126/146 - 81.81% - 18/22 - 89.8% - 141/157 @@ -236,7 +236,7 @@

All files

+ + + + + + \ No newline at end of file diff --git a/lcov-report/src/editor/KeyName.tsx.html b/lcov-report/src/editor/KeyName.tsx.html index af5a02d9..7917c6ab 100644 --- a/lcov-report/src/editor/KeyName.tsx.html +++ b/lcov-report/src/editor/KeyName.tsx.html @@ -250,7 +250,7 @@

All files / src/editor Code coverage generated by istanbul - at 2024-08-06T02:10:57.523Z + at 2024-09-03T03:50:35.383Z

\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 ` | \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 effects.consume(code);\n // @ts-expect-error: not null.\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 * > | &<]]>\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 * > | \n * ^\n * > | \n * ^\n * > | &<]]>\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 * > | \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 * > | \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 * @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 * @type {Tokenizer}\n */\nfunction tokenizeBlankLineBefore(effects, ok, nok) {\n return start;\n\n /**\n * Before eol, expecting blank line.\n *\n * ```markdown\n * > |
\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 * @typedef {import('micromark-util-types').Code} Code\n * @typedef {import('micromark-util-types').Construct} Construct\n * @typedef {import('micromark-util-types').State} State\n * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext\n * @typedef {import('micromark-util-types').Tokenizer} Tokenizer\n */\n\nimport { factorySpace } from 'micromark-factory-space';\nimport { markdownLineEnding, markdownSpace } from 'micromark-util-character';\n/** @type {Construct} */\nconst nonLazyContinuation = {\n tokenize: tokenizeNonLazyContinuation,\n partial: true\n};\n\n/** @type {Construct} */\nexport const codeFenced = {\n name: 'codeFenced',\n tokenize: tokenizeCodeFenced,\n concrete: true\n};\n\n/**\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\nfunction tokenizeCodeFenced(effects, ok, nok) {\n const self = this;\n /** @type {Construct} */\n const closeStart = {\n tokenize: tokenizeCloseStart,\n partial: true\n };\n let initialPrefix = 0;\n let sizeOpen = 0;\n /** @type {NonNullable} */\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 * @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 * @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 * @typedef {import('micromark-util-types').Code} Code\n * @typedef {import('micromark-util-types').Construct} Construct\n * @typedef {import('micromark-util-types').State} State\n * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext\n * @typedef {import('micromark-util-types').Tokenizer} Tokenizer\n */\n\nimport { 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 * @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 * @typedef {import('micromark-util-types').Construct} Construct\n * @typedef {import('micromark-util-types').State} State\n * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext\n * @typedef {import('micromark-util-types').Tokenizer} Tokenizer\n */\n\nimport { asciiPunctuation } from 'micromark-util-character';\n/** @type {Construct} */\nexport const characterEscape = {\n name: 'characterEscape',\n tokenize: tokenizeCharacterEscape\n};\n\n/**\n * @this {TokenizeContext}\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 * @typedef {import('micromark-util-types').Construct} Construct\n * @typedef {import('micromark-util-types').State} State\n * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext\n * @typedef {import('micromark-util-types').Tokenizer} Tokenizer\n */\n\nimport { factorySpace } from 'micromark-factory-space';\nimport { markdownLineEnding } from 'micromark-util-character';\n/** @type {Construct} */\nexport const lineEnding = {\n name: 'lineEnding',\n tokenize: tokenizeLineEnding\n};\n\n/**\n * @this {TokenizeContext}\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 * @typedef {import('micromark-util-types').Construct} Construct\n * @typedef {import('micromark-util-types').Event} Event\n * @typedef {import('micromark-util-types').Resolver} Resolver\n * @typedef {import('micromark-util-types').State} State\n * @typedef {import('micromark-util-types').Token} Token\n * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext\n * @typedef {import('micromark-util-types').Tokenizer} Tokenizer\n */\n\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 tokenize: tokenizeLabelEnd,\n resolveTo: resolveToLabelEnd,\n resolveAll: resolveAllLabelEnd\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 while (++index < events.length) {\n const token = events[index][1];\n if (token.type === \"labelImage\" || token.type === \"labelLink\" || token.type === \"labelEnd\") {\n // Remove the marker.\n events.splice(index + 1, token.type === \"labelImage\" ? 4 : 2);\n token.type = \"data\";\n index++;\n }\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} */\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: Object.assign({}, events[open][1].start),\n end: Object.assign({}, events[events.length - 1][1].end)\n };\n const label = {\n type: \"label\",\n start: Object.assign({}, events[open][1].start),\n end: Object.assign({}, events[close][1].end)\n };\n const text = {\n type: \"labelText\",\n start: Object.assign({}, events[open + offset + 2][1].end),\n end: Object.assign({}, events[close - 2][1].start)\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 * @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 * @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 * @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 * @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 * @typedef {import('micromark-util-types').Construct} Construct\n * @typedef {import('micromark-util-types').State} State\n * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext\n * @typedef {import('micromark-util-types').Tokenizer} Tokenizer\n */\n\nimport { labelEnd } from './label-end.js';\n\n/** @type {Construct} */\nexport const labelStartImage = {\n name: 'labelStartImage',\n tokenize: tokenizeLabelStartImage,\n resolveAll: labelEnd.resolveAll\n};\n\n/**\n * @this {TokenizeContext}\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 * ![^a](b)\n *\n * ![^a][b]\n *\n * [b]: c\n * ```\n *\n * ```html\n *

!^a

\n *

!^a

\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 * @typedef {import('micromark-util-types').Code} Code\n */\n\nimport {\n markdownLineEndingOrSpace,\n unicodePunctuation,\n unicodeWhitespace\n} 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 (\n code === null ||\n markdownLineEndingOrSpace(code) ||\n unicodeWhitespace(code)\n ) {\n return 1\n }\n if (unicodePunctuation(code)) {\n return 2\n }\n}\n","/**\n * @typedef {import('micromark-util-types').Code} Code\n * @typedef {import('micromark-util-types').Construct} Construct\n * @typedef {import('micromark-util-types').Event} Event\n * @typedef {import('micromark-util-types').Point} Point\n * @typedef {import('micromark-util-types').Resolver} Resolver\n * @typedef {import('micromark-util-types').State} State\n * @typedef {import('micromark-util-types').Token} Token\n * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext\n * @typedef {import('micromark-util-types').Tokenizer} Tokenizer\n */\n\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 tokenize: tokenizeAttention,\n resolveAll: resolveAllAttention\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} */\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 = Object.assign({}, events[open][1].end);\n const end = Object.assign({}, events[index][1].start);\n movePoint(start, -use);\n movePoint(end, use);\n openingSequence = {\n type: use > 1 ? \"strongSequence\" : \"emphasisSequence\",\n start,\n end: Object.assign({}, events[open][1].end)\n };\n closingSequence = {\n type: use > 1 ? \"strongSequence\" : \"emphasisSequence\",\n start: Object.assign({}, events[index][1].start),\n end\n };\n text = {\n type: use > 1 ? \"strongText\" : \"emphasisText\",\n start: Object.assign({}, events[open][1].end),\n end: Object.assign({}, events[index][1].start)\n };\n group = {\n type: use > 1 ? \"strong\" : \"emphasis\",\n start: Object.assign({}, openingSequence.start),\n end: Object.assign({}, closingSequence.end)\n };\n events[open][1].end = Object.assign({}, openingSequence.start);\n events[index][1].start = Object.assign({}, closingSequence.end);\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 * @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} */\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 * @param {number} offset\n * @returns {undefined}\n */\nfunction movePoint(point, offset) {\n point.column += offset;\n point.offset += offset;\n point._bufferIndex += offset;\n}","/**\n * @typedef {import('micromark-util-types').Construct} Construct\n * @typedef {import('micromark-util-types').State} State\n * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext\n * @typedef {import('micromark-util-types').Tokenizer} Tokenizer\n */\n\nimport { asciiAlpha, asciiAlphanumeric, 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 * @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 * > | ab\n * ^\n * > | ab\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 * > | ab\n * ^\n * > | ab\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 * > | ab\n * ^\n * > | ab\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 * > | ab\n * ^\n * > | ab\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 * > | ab\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 * > | ab\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 * > | ab\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 * > | ab\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 * > | ab\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 * @typedef {import('micromark-util-types').Code} Code\n * @typedef {import('micromark-util-types').Construct} Construct\n * @typedef {import('micromark-util-types').State} State\n * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext\n * @typedef {import('micromark-util-types').Tokenizer} Tokenizer\n */\n\nimport { factorySpace } from 'micromark-factory-space';\nimport { asciiAlpha, asciiAlphanumeric, markdownLineEnding, markdownLineEndingOrSpace, markdownSpace } from 'micromark-util-character';\n/** @type {Construct} */\nexport const htmlText = {\n name: 'htmlText',\n tokenize: tokenizeHtmlText\n};\n\n/**\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\nfunction tokenizeHtmlText(effects, ok, nok) {\n const self = this;\n /** @type {NonNullable | 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 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 c\n * ^\n * > | a c\n * ^\n * > | a 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 ` | a c\n * ^\n * > | a c\n * ^\n * > | a &<]]> 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 ` | a 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 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 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 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 ` | a &<]]> 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 &<]]> 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 &<]]> 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 &<]]> 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 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 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 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 ` | a 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 ` | a 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 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 ` | a 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 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 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 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 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 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 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 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 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 \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 \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 \n * ^\n * ```\n *\n * @type {State}\n */\n function lineEndingAfterPrefix(code) {\n effects.enter(\"htmlTextData\");\n return returnState(code);\n }\n}","/**\n * @typedef {import('micromark-util-types').Construct} Construct\n * @typedef {import('micromark-util-types').State} State\n * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext\n * @typedef {import('micromark-util-types').Tokenizer} Tokenizer\n */\n\nimport { labelEnd } from './label-end.js';\n\n/** @type {Construct} */\nexport const labelStartLink = {\n name: 'labelStartLink',\n tokenize: tokenizeLabelStartLink,\n resolveAll: labelEnd.resolveAll\n};\n\n/**\n * @this {TokenizeContext}\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 * @typedef {import('micromark-util-types').Construct} Construct\n * @typedef {import('micromark-util-types').State} State\n * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext\n * @typedef {import('micromark-util-types').Tokenizer} Tokenizer\n */\n\nimport { markdownLineEnding } from 'micromark-util-character';\n/** @type {Construct} */\nexport const hardBreakEscape = {\n name: 'hardBreakEscape',\n tokenize: tokenizeHardBreakEscape\n};\n\n/**\n * @this {TokenizeContext}\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 * @typedef {import('micromark-util-types').Construct} Construct\n * @typedef {import('micromark-util-types').Previous} Previous\n * @typedef {import('micromark-util-types').Resolver} Resolver\n * @typedef {import('micromark-util-types').State} State\n * @typedef {import('micromark-util-types').Token} Token\n * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext\n * @typedef {import('micromark-util-types').Tokenizer} Tokenizer\n */\n\nimport { markdownLineEnding } from 'micromark-util-character';\n/** @type {Construct} */\nexport const codeText = {\n name: 'codeText',\n tokenize: tokenizeCodeText,\n resolve: resolveCodeText,\n previous\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 * @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 * @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 * @typedef {import('micromark-util-types').Extension} Extension\n */\n\nimport {\n attention,\n autolink,\n blockQuote,\n characterEscape,\n characterReference,\n codeFenced,\n codeIndented,\n codeText,\n definition,\n hardBreakEscape,\n headingAtx,\n htmlFlow,\n htmlText,\n labelEnd,\n labelStartImage,\n labelStartLink,\n lineEnding,\n list,\n setextUnderline,\n thematicBreak\n} 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","/**\n * @typedef {import('micromark-util-types').Chunk} Chunk\n * @typedef {import('micromark-util-types').Code} Code\n * @typedef {import('micromark-util-types').Encoding} Encoding\n * @typedef {import('micromark-util-types').Value} Value\n */\n\n/**\n * @callback Preprocessor\n * @param {Value} value\n * @param {Encoding | null | undefined} [encoding]\n * @param {boolean | null | undefined} [end=false]\n * @returns {Array}\n */\n\nconst search = /[\\0\\t\\n\\r]/g\n\n/**\n * @returns {Preprocessor}\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} */\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 =\n buffer +\n (typeof value === 'string'\n ? value.toString()\n : 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 =\n 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 chunks.push(65533)\n column++\n break\n }\n case 9: {\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 chunks.push(-4)\n column = 1\n break\n }\n default: {\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","/**\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}","import {decodeNamedCharacterReference} from 'decode-named-character-reference'\nimport {decodeNumericCharacterReference} from 'micromark-util-decode-numeric-character-reference'\nconst characterEscapeOrReference =\n /\\\\([!-/:-@[-`{-~])|&(#(?:\\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 * @param {string} $1\n * @param {string} $2\n * @returns {string}\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","/**\n * @typedef {import('mdast').Break} Break\n * @typedef {import('mdast').Blockquote} Blockquote\n * @typedef {import('mdast').Code} Code\n * @typedef {import('mdast').Definition} Definition\n * @typedef {import('mdast').Emphasis} Emphasis\n * @typedef {import('mdast').Heading} Heading\n * @typedef {import('mdast').Html} Html\n * @typedef {import('mdast').Image} Image\n * @typedef {import('mdast').InlineCode} InlineCode\n * @typedef {import('mdast').Link} Link\n * @typedef {import('mdast').List} List\n * @typedef {import('mdast').ListItem} ListItem\n * @typedef {import('mdast').Nodes} Nodes\n * @typedef {import('mdast').Paragraph} Paragraph\n * @typedef {import('mdast').Parent} Parent\n * @typedef {import('mdast').PhrasingContent} PhrasingContent\n * @typedef {import('mdast').ReferenceType} ReferenceType\n * @typedef {import('mdast').Root} Root\n * @typedef {import('mdast').Strong} Strong\n * @typedef {import('mdast').Text} Text\n * @typedef {import('mdast').ThematicBreak} ThematicBreak\n *\n * @typedef {import('micromark-util-types').Encoding} Encoding\n * @typedef {import('micromark-util-types').Event} Event\n * @typedef {import('micromark-util-types').ParseOptions} ParseOptions\n * @typedef {import('micromark-util-types').Token} Token\n * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext\n * @typedef {import('micromark-util-types').Value} Value\n *\n * @typedef {import('unist').Point} Point\n *\n * @typedef {import('../index.js').CompileData} CompileData\n */\n\n/**\n * @typedef {Omit & {type: 'fragment', children: Array}} Fragment\n */\n\n/**\n * @callback Transform\n * Extra transform, to change the AST afterwards.\n * @param {Root} tree\n * Tree to transform.\n * @returns {Root | null | undefined | void}\n * New tree or nothing (in which case the current tree is used).\n *\n * @callback Handle\n * Handle a token.\n * @param {CompileContext} this\n * Context.\n * @param {Token} token\n * Current token.\n * @returns {undefined | void}\n * Nothing.\n *\n * @typedef {Record} Handles\n * Token types mapping to handles\n *\n * @callback OnEnterError\n * Handle the case where the `right` token is open, but it is closed (by the\n * `left` token) or because we reached the end of the document.\n * @param {Omit} this\n * Context.\n * @param {Token | undefined} left\n * Left token.\n * @param {Token} right\n * Right token.\n * @returns {undefined}\n * Nothing.\n *\n * @callback OnExitError\n * Handle the case where the `right` token is open but it is closed by\n * exiting the `left` token.\n * @param {Omit} this\n * Context.\n * @param {Token} left\n * Left token.\n * @param {Token} right\n * Right token.\n * @returns {undefined}\n * Nothing.\n *\n * @typedef {[Token, OnEnterError | undefined]} TokenTuple\n * Open token on the stack, with an optional error handler for when\n * that token isn’t closed properly.\n */\n\n/**\n * @typedef Config\n * Configuration.\n *\n * We have our defaults, but extensions will add more.\n * @property {Array} canContainEols\n * Token types where line endings are used.\n * @property {Handles} enter\n * Opening handles.\n * @property {Handles} exit\n * Closing handles.\n * @property {Array} transforms\n * Tree transforms.\n *\n * @typedef {Partial} Extension\n * Change how markdown tokens from micromark are turned into mdast.\n *\n * @typedef CompileContext\n * mdast compiler context.\n * @property {Array} stack\n * Stack of nodes.\n * @property {Array} tokenStack\n * Stack of tokens.\n * @property {(this: CompileContext) => undefined} buffer\n * Capture some of the output data.\n * @property {(this: CompileContext) => string} resume\n * Stop capturing and access the output data.\n * @property {(this: CompileContext, node: Nodes, token: Token, onError?: OnEnterError) => undefined} enter\n * Enter a node.\n * @property {(this: CompileContext, token: Token, onError?: OnExitError) => undefined} exit\n * Exit a node.\n * @property {TokenizeContext['sliceSerialize']} sliceSerialize\n * Get the string value of a token.\n * @property {Config} config\n * Configuration.\n * @property {CompileData} data\n * Info passed around; key/value store.\n *\n * @typedef FromMarkdownOptions\n * Configuration for how to build mdast.\n * @property {Array> | null | undefined} [mdastExtensions]\n * Extensions for this utility to change how tokens are turned into a tree.\n *\n * @typedef {ParseOptions & FromMarkdownOptions} Options\n * Configuration.\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 (typeof encoding !== 'string') {\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} 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} */\n const context = {\n stack: [tree],\n tokenStack: [],\n config,\n enter,\n exit,\n buffer,\n resume,\n data\n };\n /** @type {Array} */\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} 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 * @this {CompileContext}\n * @returns {undefined}\n */\n function buffer() {\n this.stack.push({\n type: 'fragment',\n children: []\n });\n }\n\n /**\n * @this {CompileContext}\n * Context.\n * @param {Nodes} node\n * Node to enter.\n * @param {Token} token\n * Corresponding token.\n * @param {OnEnterError | undefined} [errorHandler]\n * Handle the case where this token is open, but it is closed by something else.\n * @returns {undefined}\n * Nothing.\n */\n function enter(node, token, errorHandler) {\n const parent = this.stack[this.stack.length - 1];\n /** @type {Array} */\n const siblings = parent.children;\n siblings.push(node);\n this.stack.push(node);\n this.tokenStack.push([token, errorHandler]);\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 * @this {CompileContext}\n * Context.\n * @param {Token} token\n * Corresponding token.\n * @param {OnExitError | undefined} [onExitError]\n * Handle the case where another token is open.\n * @returns {undefined}\n * Nothing.\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 * @this {CompileContext}\n * @returns {string}\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} */\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} */\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 | 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('micromark-util-types').Event} Event\n */\n\nimport {subtokenize} from 'micromark-util-subtokenize'\n\n/**\n * @param {Array} events\n * @returns {Array}\n */\nexport function postprocess(events) {\n while (!subtokenize(events)) {\n // Empty\n }\n return events\n}\n","/**\n * @typedef {import('micromark-util-types').Create} Create\n * @typedef {import('micromark-util-types').FullNormalizedExtension} FullNormalizedExtension\n * @typedef {import('micromark-util-types').InitialConstruct} InitialConstruct\n * @typedef {import('micromark-util-types').ParseContext} ParseContext\n * @typedef {import('micromark-util-types').ParseOptions} ParseOptions\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 {createTokenizer} from './create-tokenizer.js'\nimport * as defaultConstructs from './constructs.js'\n\n/**\n * @param {ParseOptions | null | undefined} [options]\n * @returns {ParseContext}\n */\nexport function parse(options) {\n const settings = options || {}\n const constructs =\n /** @type {FullNormalizedExtension} */\n combineExtensions([defaultConstructs, ...(settings.extensions || [])])\n\n /** @type {ParseContext} */\n const parser = {\n defined: [],\n lazy: {},\n constructs,\n content: create(content),\n document: create(document),\n flow: create(flow),\n string: create(string),\n text: create(text)\n }\n return parser\n\n /**\n * @param {InitialConstruct} initial\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","/**\n * @typedef {import('mdast').Root} Root\n * @typedef {import('mdast-util-from-markdown').Options} FromMarkdownOptions\n * @typedef {import('unified').Parser} Parser\n * @typedef {import('unified').Processor} Processor\n */\n\n/**\n * @typedef {Omit} Options\n */\n\nimport {fromMarkdown} from 'mdast-util-from-markdown'\n\n/**\n * Aadd support for parsing from markdown.\n *\n * @param {Readonly | 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","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) ||\n (questionMark > -1 && colon > questionMark) ||\n (numberSign > -1 && colon > numberSign) ||\n // It is a protocol, it should be allowed.\n protocol.test(value.slice(0, colon))\n ) {\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} */\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 (\n code === 37 &&\n asciiAlphanumeric(value.charCodeAt(index + 1)) &&\n asciiAlphanumeric(value.charCodeAt(index + 2))\n ) {\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","/**\n * @typedef {import('hast').Element} Element\n * @typedef {import('hast').ElementContent} ElementContent\n *\n * @typedef {import('./state.js').State} State\n */\n\n/**\n * @callback FootnoteBackContentTemplate\n * Generate content for the backreference dynamically.\n *\n * For the following markdown:\n *\n * ```markdown\n * Alpha[^micromark], bravo[^micromark], and charlie[^remark].\n *\n * [^remark]: things about remark\n * [^micromark]: things about micromark\n * ```\n *\n * This function will be called with:\n *\n * * `0` and `0` for the backreference from `things about micromark` to\n * `alpha`, as it is the first used definition, and the first call to it\n * * `0` and `1` for the backreference from `things about micromark` to\n * `bravo`, as it is the first used definition, and the second call to it\n * * `1` and `0` for the backreference from `things about remark` to\n * `charlie`, as it is the second used definition\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 {Array | ElementContent | string}\n * Content for the backreference when linking back from definitions to their\n * reference.\n *\n * @callback FootnoteBackLabelTemplate\n * Generate a back label dynamically.\n *\n * For the following markdown:\n *\n * ```markdown\n * Alpha[^micromark], bravo[^micromark], and charlie[^remark].\n *\n * [^remark]: things about remark\n * [^micromark]: things about micromark\n * ```\n *\n * This function will be called with:\n *\n * * `0` and `0` for the backreference from `things about micromark` to\n * `alpha`, as it is the first used definition, and the first call to it\n * * `0` and `1` for the backreference from `things about micromark` to\n * `bravo`, as it is the first used definition, and the second call to it\n * * `1` and `0` for the backreference from `things about remark` to\n * `charlie`, as it is the second used definition\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 * Back label to use when linking back from definitions to their reference.\n */\n\nimport structuredClone from '@ungap/structured-clone'\nimport {normalizeUri} from 'micromark-util-sanitize-uri'\n\n/**\n * Generate the default content that GitHub uses on backreferences.\n *\n * @param {number} _\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 {Array}\n * Content.\n */\nexport function defaultFootnoteBackContent(_, rereferenceIndex) {\n /** @type {Array} */\n const result = [{type: 'text', value: '↩'}]\n\n if (rereferenceIndex > 1) {\n result.push({\n type: 'element',\n tagName: 'sup',\n properties: {},\n children: [{type: 'text', value: String(rereferenceIndex)}]\n })\n }\n\n return result\n}\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 * Label.\n */\nexport function defaultFootnoteBackLabel(referenceIndex, rereferenceIndex) {\n return (\n 'Back to reference ' +\n (referenceIndex + 1) +\n (rereferenceIndex > 1 ? '-' + rereferenceIndex : '')\n )\n}\n\n/**\n * Generate a hast footer for called footnote definitions.\n *\n * @param {State} state\n * Info passed around.\n * @returns {Element | undefined}\n * `section` element or `undefined`.\n */\n// eslint-disable-next-line complexity\nexport function footer(state) {\n const clobberPrefix =\n typeof state.options.clobberPrefix === 'string'\n ? state.options.clobberPrefix\n : 'user-content-'\n const footnoteBackContent =\n state.options.footnoteBackContent || defaultFootnoteBackContent\n const footnoteBackLabel =\n state.options.footnoteBackLabel || defaultFootnoteBackLabel\n const footnoteLabel = state.options.footnoteLabel || 'Footnotes'\n const footnoteLabelTagName = state.options.footnoteLabelTagName || 'h2'\n const footnoteLabelProperties = state.options.footnoteLabelProperties || {\n className: ['sr-only']\n }\n /** @type {Array} */\n const listItems = []\n let referenceIndex = -1\n\n while (++referenceIndex < state.footnoteOrder.length) {\n const definition = state.footnoteById.get(\n state.footnoteOrder[referenceIndex]\n )\n\n if (!definition) {\n continue\n }\n\n const content = state.all(definition)\n const id = String(definition.identifier).toUpperCase()\n const safeId = normalizeUri(id.toLowerCase())\n let rereferenceIndex = 0\n /** @type {Array} */\n const backReferences = []\n const counts = state.footnoteCounts.get(id)\n\n // eslint-disable-next-line no-unmodified-loop-condition\n while (counts !== undefined && ++rereferenceIndex <= counts) {\n if (backReferences.length > 0) {\n backReferences.push({type: 'text', value: ' '})\n }\n\n let children =\n typeof footnoteBackContent === 'string'\n ? footnoteBackContent\n : footnoteBackContent(referenceIndex, rereferenceIndex)\n\n if (typeof children === 'string') {\n children = {type: 'text', value: children}\n }\n\n backReferences.push({\n type: 'element',\n tagName: 'a',\n properties: {\n href:\n '#' +\n clobberPrefix +\n 'fnref-' +\n safeId +\n (rereferenceIndex > 1 ? '-' + rereferenceIndex : ''),\n dataFootnoteBackref: '',\n ariaLabel:\n typeof footnoteBackLabel === 'string'\n ? footnoteBackLabel\n : footnoteBackLabel(referenceIndex, rereferenceIndex),\n className: ['data-footnote-backref']\n },\n children: Array.isArray(children) ? children : [children]\n })\n }\n\n const tail = content[content.length - 1]\n\n if (tail && tail.type === 'element' && tail.tagName === 'p') {\n const tailTail = tail.children[tail.children.length - 1]\n if (tailTail && tailTail.type === 'text') {\n tailTail.value += ' '\n } else {\n tail.children.push({type: 'text', value: ' '})\n }\n\n tail.children.push(...backReferences)\n } else {\n content.push(...backReferences)\n }\n\n /** @type {Element} */\n const listItem = {\n type: 'element',\n tagName: 'li',\n properties: {id: clobberPrefix + 'fn-' + safeId},\n children: state.wrap(content, true)\n }\n\n state.patch(definition, listItem)\n\n listItems.push(listItem)\n }\n\n if (listItems.length === 0) {\n return\n }\n\n return {\n type: 'element',\n tagName: 'section',\n properties: {dataFootnotes: true, className: ['footnotes']},\n children: [\n {\n type: 'element',\n tagName: footnoteLabelTagName,\n properties: {\n ...structuredClone(footnoteLabelProperties),\n id: 'footnote-label'\n },\n children: [{type: 'text', value: footnoteLabel}]\n },\n {type: 'text', value: '\\n'},\n {\n type: 'element',\n tagName: 'ol',\n properties: {},\n children: state.wrap(listItems, true)\n },\n {type: 'text', value: '\\n'}\n ]\n }\n}\n","/**\n * @typedef {import('hast').ElementContent} ElementContent\n *\n * @typedef {import('mdast').Nodes} Nodes\n * @typedef {import('mdast').Reference} Reference\n *\n * @typedef {import('./state.js').State} State\n */\n\n// Make VS Code show references to the above types.\n''\n\n/**\n * Return the content of a reference without definition as plain text.\n *\n * @param {State} state\n * Info passed around.\n * @param {Extract} node\n * Reference node (image, link).\n * @returns {Array}\n * hast content.\n */\nexport function revert(state, node) {\n const subtype = node.referenceType\n let suffix = ']'\n\n if (subtype === 'collapsed') {\n suffix += '[]'\n } else if (subtype === 'full') {\n suffix += '[' + (node.label || node.identifier) + ']'\n }\n\n if (node.type === 'imageReference') {\n return [{type: 'text', value: '![' + node.alt + suffix}]\n }\n\n const contents = state.all(node)\n const head = contents[0]\n\n if (head && head.type === 'text') {\n head.value = '[' + head.value\n } else {\n contents.unshift({type: 'text', value: '['})\n }\n\n const tail = contents[contents.length - 1]\n\n if (tail && tail.type === 'text') {\n tail.value += suffix\n } else {\n contents.push({type: 'text', value: suffix})\n }\n\n return contents\n}\n","/**\n * @typedef {import('hast').Element} Element\n * @typedef {import('hast').ElementContent} ElementContent\n * @typedef {import('hast').Properties} Properties\n * @typedef {import('mdast').ListItem} ListItem\n * @typedef {import('mdast').Parents} Parents\n * @typedef {import('../state.js').State} State\n */\n\n// Make VS Code show references to the above types.\n''\n\n/**\n * Turn an mdast `listItem` node into hast.\n *\n * @param {State} state\n * Info passed around.\n * @param {ListItem} node\n * mdast node.\n * @param {Parents | undefined} parent\n * Parent of `node`.\n * @returns {Element}\n * hast node.\n */\nexport function listItem(state, node, parent) {\n const results = state.all(node)\n const loose = parent ? listLoose(parent) : listItemLoose(node)\n /** @type {Properties} */\n const properties = {}\n /** @type {Array} */\n const children = []\n\n if (typeof node.checked === 'boolean') {\n const head = results[0]\n /** @type {Element} */\n let paragraph\n\n if (head && head.type === 'element' && head.tagName === 'p') {\n paragraph = head\n } else {\n paragraph = {type: 'element', tagName: 'p', properties: {}, children: []}\n results.unshift(paragraph)\n }\n\n if (paragraph.children.length > 0) {\n paragraph.children.unshift({type: 'text', value: ' '})\n }\n\n paragraph.children.unshift({\n type: 'element',\n tagName: 'input',\n properties: {type: 'checkbox', checked: node.checked, disabled: true},\n children: []\n })\n\n // According to github-markdown-css, this class hides bullet.\n // See: .\n properties.className = ['task-list-item']\n }\n\n let index = -1\n\n while (++index < results.length) {\n const child = results[index]\n\n // Add eols before nodes, except if this is a loose, first paragraph.\n if (\n loose ||\n index !== 0 ||\n child.type !== 'element' ||\n child.tagName !== 'p'\n ) {\n children.push({type: 'text', value: '\\n'})\n }\n\n if (child.type === 'element' && child.tagName === 'p' && !loose) {\n children.push(...child.children)\n } else {\n children.push(child)\n }\n }\n\n const tail = results[results.length - 1]\n\n // Add a final eol.\n if (tail && (loose || tail.type !== 'element' || tail.tagName !== 'p')) {\n children.push({type: 'text', value: '\\n'})\n }\n\n /** @type {Element} */\n const result = {type: 'element', tagName: 'li', properties, children}\n state.patch(node, result)\n return state.applyData(node, result)\n}\n\n/**\n * @param {Parents} node\n * @return {Boolean}\n */\nfunction listLoose(node) {\n let loose = false\n if (node.type === 'list') {\n loose = node.spread || false\n const children = node.children\n let index = -1\n\n while (!loose && ++index < children.length) {\n loose = listItemLoose(children[index])\n }\n }\n\n return loose\n}\n\n/**\n * @param {ListItem} node\n * @return {Boolean}\n */\nfunction listItemLoose(node) {\n const spread = node.spread\n\n return spread === null || spread === undefined\n ? node.children.length > 1\n : spread\n}\n","const tab = 9 /* `\\t` */\nconst space = 32 /* ` ` */\n\n/**\n * Remove initial and final spaces and tabs at the line breaks in `value`.\n * Does not trim initial and final spaces and tabs of the value itself.\n *\n * @param {string} value\n * Value to trim.\n * @returns {string}\n * Trimmed value.\n */\nexport function trimLines(value) {\n const source = String(value)\n const search = /\\r?\\n|\\r/g\n let match = search.exec(source)\n let last = 0\n /** @type {Array} */\n const lines = []\n\n while (match) {\n lines.push(\n trimLine(source.slice(last, match.index), last > 0, true),\n match[0]\n )\n\n last = match.index + match[0].length\n match = search.exec(source)\n }\n\n lines.push(trimLine(source.slice(last), last > 0, false))\n\n return lines.join('')\n}\n\n/**\n * @param {string} value\n * Line to trim.\n * @param {boolean} start\n * Whether to trim the start of the line.\n * @param {boolean} end\n * Whether to trim the end of the line.\n * @returns {string}\n * Trimmed line.\n */\nfunction trimLine(value, start, end) {\n let startIndex = 0\n let endIndex = value.length\n\n if (start) {\n let code = value.codePointAt(startIndex)\n\n while (code === tab || code === space) {\n startIndex++\n code = value.codePointAt(startIndex)\n }\n }\n\n if (end) {\n let code = value.codePointAt(endIndex - 1)\n\n while (code === tab || code === space) {\n endIndex--\n code = value.codePointAt(endIndex - 1)\n }\n }\n\n return endIndex > startIndex ? value.slice(startIndex, endIndex) : ''\n}\n","import {blockquote} from './blockquote.js'\nimport {hardBreak} from './break.js'\nimport {code} from './code.js'\nimport {strikethrough} from './delete.js'\nimport {emphasis} from './emphasis.js'\nimport {footnoteReference} from './footnote-reference.js'\nimport {heading} from './heading.js'\nimport {html} from './html.js'\nimport {imageReference} from './image-reference.js'\nimport {image} from './image.js'\nimport {inlineCode} from './inline-code.js'\nimport {linkReference} from './link-reference.js'\nimport {link} from './link.js'\nimport {listItem} from './list-item.js'\nimport {list} from './list.js'\nimport {paragraph} from './paragraph.js'\nimport {root} from './root.js'\nimport {strong} from './strong.js'\nimport {table} from './table.js'\nimport {tableRow} from './table-row.js'\nimport {tableCell} from './table-cell.js'\nimport {text} from './text.js'\nimport {thematicBreak} from './thematic-break.js'\n\n/**\n * Default handlers for nodes.\n *\n * @satisfies {import('../state.js').Handlers}\n */\nexport const handlers = {\n blockquote,\n break: hardBreak,\n code,\n delete: strikethrough,\n emphasis,\n footnoteReference,\n heading,\n html,\n imageReference,\n image,\n inlineCode,\n linkReference,\n link,\n listItem,\n list,\n paragraph,\n // @ts-expect-error: root is different, but hard to type.\n root,\n strong,\n table,\n tableCell,\n tableRow,\n text,\n thematicBreak,\n toml: ignore,\n yaml: ignore,\n definition: ignore,\n footnoteDefinition: ignore\n}\n\n// Return nothing for nodes that are ignored.\nfunction ignore() {\n return undefined\n}\n","/**\n * @typedef {import('hast').Element} Element\n * @typedef {import('mdast').Blockquote} Blockquote\n * @typedef {import('../state.js').State} State\n */\n\n// Make VS Code show references to the above types.\n''\n\n/**\n * Turn an mdast `blockquote` node into hast.\n *\n * @param {State} state\n * Info passed around.\n * @param {Blockquote} node\n * mdast node.\n * @returns {Element}\n * hast node.\n */\nexport function blockquote(state, node) {\n /** @type {Element} */\n const result = {\n type: 'element',\n tagName: 'blockquote',\n properties: {},\n children: state.wrap(state.all(node), true)\n }\n state.patch(node, result)\n return state.applyData(node, result)\n}\n","/**\n * @typedef {import('hast').Element} Element\n * @typedef {import('hast').Text} Text\n * @typedef {import('mdast').Break} Break\n * @typedef {import('../state.js').State} State\n */\n\n// Make VS Code show references to the above types.\n''\n\n/**\n * Turn an mdast `break` node into hast.\n *\n * @param {State} state\n * Info passed around.\n * @param {Break} node\n * mdast node.\n * @returns {Array}\n * hast element content.\n */\nexport function hardBreak(state, node) {\n /** @type {Element} */\n const result = {type: 'element', tagName: 'br', properties: {}, children: []}\n state.patch(node, result)\n return [state.applyData(node, result), {type: 'text', value: '\\n'}]\n}\n","/**\n * @typedef {import('hast').Element} Element\n * @typedef {import('hast').Properties} Properties\n * @typedef {import('mdast').Code} Code\n * @typedef {import('../state.js').State} State\n */\n\n// Make VS Code show references to the above types.\n''\n\n/**\n * Turn an mdast `code` node into hast.\n *\n * @param {State} state\n * Info passed around.\n * @param {Code} node\n * mdast node.\n * @returns {Element}\n * hast node.\n */\nexport function code(state, node) {\n const value = node.value ? node.value + '\\n' : ''\n /** @type {Properties} */\n const properties = {}\n\n if (node.lang) {\n properties.className = ['language-' + node.lang]\n }\n\n // Create ``.\n /** @type {Element} */\n let result = {\n type: 'element',\n tagName: 'code',\n properties,\n children: [{type: 'text', value}]\n }\n\n if (node.meta) {\n result.data = {meta: node.meta}\n }\n\n state.patch(node, result)\n result = state.applyData(node, result)\n\n // Create `
`.\n  result = {type: 'element', tagName: 'pre', properties: {}, children: [result]}\n  state.patch(node, result)\n  return result\n}\n","/**\n * @typedef {import('hast').Element} Element\n * @typedef {import('mdast').Delete} Delete\n * @typedef {import('../state.js').State} State\n */\n\n// Make VS Code show references to the above types.\n''\n\n/**\n * Turn an mdast `delete` node into hast.\n *\n * @param {State} state\n *   Info passed around.\n * @param {Delete} node\n *   mdast node.\n * @returns {Element}\n *   hast node.\n */\nexport function strikethrough(state, node) {\n  /** @type {Element} */\n  const result = {\n    type: 'element',\n    tagName: 'del',\n    properties: {},\n    children: state.all(node)\n  }\n  state.patch(node, result)\n  return state.applyData(node, result)\n}\n","/**\n * @typedef {import('hast').Element} Element\n * @typedef {import('mdast').Emphasis} Emphasis\n * @typedef {import('../state.js').State} State\n */\n\n// Make VS Code show references to the above types.\n''\n\n/**\n * Turn an mdast `emphasis` node into hast.\n *\n * @param {State} state\n *   Info passed around.\n * @param {Emphasis} node\n *   mdast node.\n * @returns {Element}\n *   hast node.\n */\nexport function emphasis(state, node) {\n  /** @type {Element} */\n  const result = {\n    type: 'element',\n    tagName: 'em',\n    properties: {},\n    children: state.all(node)\n  }\n  state.patch(node, result)\n  return state.applyData(node, result)\n}\n","/**\n * @typedef {import('hast').Element} Element\n * @typedef {import('mdast').FootnoteReference} FootnoteReference\n * @typedef {import('../state.js').State} State\n */\n\nimport {normalizeUri} from 'micromark-util-sanitize-uri'\n\n/**\n * Turn an mdast `footnoteReference` node into hast.\n *\n * @param {State} state\n *   Info passed around.\n * @param {FootnoteReference} node\n *   mdast node.\n * @returns {Element}\n *   hast node.\n */\nexport function footnoteReference(state, node) {\n  const clobberPrefix =\n    typeof state.options.clobberPrefix === 'string'\n      ? state.options.clobberPrefix\n      : 'user-content-'\n  const id = String(node.identifier).toUpperCase()\n  const safeId = normalizeUri(id.toLowerCase())\n  const index = state.footnoteOrder.indexOf(id)\n  /** @type {number} */\n  let counter\n\n  let reuseCounter = state.footnoteCounts.get(id)\n\n  if (reuseCounter === undefined) {\n    reuseCounter = 0\n    state.footnoteOrder.push(id)\n    counter = state.footnoteOrder.length\n  } else {\n    counter = index + 1\n  }\n\n  reuseCounter += 1\n  state.footnoteCounts.set(id, reuseCounter)\n\n  /** @type {Element} */\n  const link = {\n    type: 'element',\n    tagName: 'a',\n    properties: {\n      href: '#' + clobberPrefix + 'fn-' + safeId,\n      id:\n        clobberPrefix +\n        'fnref-' +\n        safeId +\n        (reuseCounter > 1 ? '-' + reuseCounter : ''),\n      dataFootnoteRef: true,\n      ariaDescribedBy: ['footnote-label']\n    },\n    children: [{type: 'text', value: String(counter)}]\n  }\n  state.patch(node, link)\n\n  /** @type {Element} */\n  const sup = {\n    type: 'element',\n    tagName: 'sup',\n    properties: {},\n    children: [link]\n  }\n  state.patch(node, sup)\n  return state.applyData(node, sup)\n}\n","/**\n * @typedef {import('hast').Element} Element\n * @typedef {import('mdast').Heading} Heading\n * @typedef {import('../state.js').State} State\n */\n\n// Make VS Code show references to the above types.\n''\n\n/**\n * Turn an mdast `heading` node into hast.\n *\n * @param {State} state\n *   Info passed around.\n * @param {Heading} node\n *   mdast node.\n * @returns {Element}\n *   hast node.\n */\nexport function heading(state, node) {\n  /** @type {Element} */\n  const result = {\n    type: 'element',\n    tagName: 'h' + node.depth,\n    properties: {},\n    children: state.all(node)\n  }\n  state.patch(node, result)\n  return state.applyData(node, result)\n}\n","/**\n * @typedef {import('hast').Element} Element\n * @typedef {import('mdast').Html} Html\n * @typedef {import('../state.js').State} State\n * @typedef {import('../../index.js').Raw} Raw\n */\n\n// Make VS Code show references to the above types.\n''\n\n/**\n * Turn an mdast `html` node into hast (`raw` node in dangerous mode, otherwise\n * nothing).\n *\n * @param {State} state\n *   Info passed around.\n * @param {Html} node\n *   mdast node.\n * @returns {Element | Raw | undefined}\n *   hast node.\n */\nexport function html(state, node) {\n  if (state.options.allowDangerousHtml) {\n    /** @type {Raw} */\n    const result = {type: 'raw', value: node.value}\n    state.patch(node, result)\n    return state.applyData(node, result)\n  }\n\n  return undefined\n}\n","/**\n * @typedef {import('hast').Element} Element\n * @typedef {import('hast').ElementContent} ElementContent\n * @typedef {import('hast').Properties} Properties\n * @typedef {import('mdast').ImageReference} ImageReference\n * @typedef {import('../state.js').State} State\n */\n\nimport {normalizeUri} from 'micromark-util-sanitize-uri'\nimport {revert} from '../revert.js'\n\n/**\n * Turn an mdast `imageReference` node into hast.\n *\n * @param {State} state\n *   Info passed around.\n * @param {ImageReference} node\n *   mdast node.\n * @returns {Array | ElementContent}\n *   hast node.\n */\nexport function imageReference(state, node) {\n  const id = String(node.identifier).toUpperCase()\n  const definition = state.definitionById.get(id)\n\n  if (!definition) {\n    return revert(state, node)\n  }\n\n  /** @type {Properties} */\n  const properties = {src: normalizeUri(definition.url || ''), alt: node.alt}\n\n  if (definition.title !== null && definition.title !== undefined) {\n    properties.title = definition.title\n  }\n\n  /** @type {Element} */\n  const result = {type: 'element', tagName: 'img', properties, children: []}\n  state.patch(node, result)\n  return state.applyData(node, result)\n}\n","/**\n * @typedef {import('hast').Element} Element\n * @typedef {import('hast').Properties} Properties\n * @typedef {import('mdast').Image} Image\n * @typedef {import('../state.js').State} State\n */\n\nimport {normalizeUri} from 'micromark-util-sanitize-uri'\n\n/**\n * Turn an mdast `image` node into hast.\n *\n * @param {State} state\n *   Info passed around.\n * @param {Image} node\n *   mdast node.\n * @returns {Element}\n *   hast node.\n */\nexport function image(state, node) {\n  /** @type {Properties} */\n  const properties = {src: normalizeUri(node.url)}\n\n  if (node.alt !== null && node.alt !== undefined) {\n    properties.alt = node.alt\n  }\n\n  if (node.title !== null && node.title !== undefined) {\n    properties.title = node.title\n  }\n\n  /** @type {Element} */\n  const result = {type: 'element', tagName: 'img', properties, children: []}\n  state.patch(node, result)\n  return state.applyData(node, result)\n}\n","/**\n * @typedef {import('hast').Element} Element\n * @typedef {import('hast').Text} Text\n * @typedef {import('mdast').InlineCode} InlineCode\n * @typedef {import('../state.js').State} State\n */\n\n// Make VS Code show references to the above types.\n''\n\n/**\n * Turn an mdast `inlineCode` node into hast.\n *\n * @param {State} state\n *   Info passed around.\n * @param {InlineCode} node\n *   mdast node.\n * @returns {Element}\n *   hast node.\n */\nexport function inlineCode(state, node) {\n  /** @type {Text} */\n  const text = {type: 'text', value: node.value.replace(/\\r?\\n|\\r/g, ' ')}\n  state.patch(node, text)\n\n  /** @type {Element} */\n  const result = {\n    type: 'element',\n    tagName: 'code',\n    properties: {},\n    children: [text]\n  }\n  state.patch(node, result)\n  return state.applyData(node, result)\n}\n","/**\n * @typedef {import('hast').Element} Element\n * @typedef {import('hast').ElementContent} ElementContent\n * @typedef {import('hast').Properties} Properties\n * @typedef {import('mdast').LinkReference} LinkReference\n * @typedef {import('../state.js').State} State\n */\n\nimport {normalizeUri} from 'micromark-util-sanitize-uri'\nimport {revert} from '../revert.js'\n\n/**\n * Turn an mdast `linkReference` node into hast.\n *\n * @param {State} state\n *   Info passed around.\n * @param {LinkReference} node\n *   mdast node.\n * @returns {Array | ElementContent}\n *   hast node.\n */\nexport function linkReference(state, node) {\n  const id = String(node.identifier).toUpperCase()\n  const definition = state.definitionById.get(id)\n\n  if (!definition) {\n    return revert(state, node)\n  }\n\n  /** @type {Properties} */\n  const properties = {href: normalizeUri(definition.url || '')}\n\n  if (definition.title !== null && definition.title !== undefined) {\n    properties.title = definition.title\n  }\n\n  /** @type {Element} */\n  const result = {\n    type: 'element',\n    tagName: 'a',\n    properties,\n    children: state.all(node)\n  }\n  state.patch(node, result)\n  return state.applyData(node, result)\n}\n","/**\n * @typedef {import('hast').Element} Element\n * @typedef {import('hast').Properties} Properties\n * @typedef {import('mdast').Link} Link\n * @typedef {import('../state.js').State} State\n */\n\nimport {normalizeUri} from 'micromark-util-sanitize-uri'\n\n/**\n * Turn an mdast `link` node into hast.\n *\n * @param {State} state\n *   Info passed around.\n * @param {Link} node\n *   mdast node.\n * @returns {Element}\n *   hast node.\n */\nexport function link(state, node) {\n  /** @type {Properties} */\n  const properties = {href: normalizeUri(node.url)}\n\n  if (node.title !== null && node.title !== undefined) {\n    properties.title = node.title\n  }\n\n  /** @type {Element} */\n  const result = {\n    type: 'element',\n    tagName: 'a',\n    properties,\n    children: state.all(node)\n  }\n  state.patch(node, result)\n  return state.applyData(node, result)\n}\n","/**\n * @typedef {import('hast').Element} Element\n * @typedef {import('hast').Properties} Properties\n * @typedef {import('mdast').List} List\n * @typedef {import('../state.js').State} State\n */\n\n// Make VS Code show references to the above types.\n''\n\n/**\n * Turn an mdast `list` node into hast.\n *\n * @param {State} state\n *   Info passed around.\n * @param {List} node\n *   mdast node.\n * @returns {Element}\n *   hast node.\n */\nexport function list(state, node) {\n  /** @type {Properties} */\n  const properties = {}\n  const results = state.all(node)\n  let index = -1\n\n  if (typeof node.start === 'number' && node.start !== 1) {\n    properties.start = node.start\n  }\n\n  // Like GitHub, add a class for custom styling.\n  while (++index < results.length) {\n    const child = results[index]\n\n    if (\n      child.type === 'element' &&\n      child.tagName === 'li' &&\n      child.properties &&\n      Array.isArray(child.properties.className) &&\n      child.properties.className.includes('task-list-item')\n    ) {\n      properties.className = ['contains-task-list']\n      break\n    }\n  }\n\n  /** @type {Element} */\n  const result = {\n    type: 'element',\n    tagName: node.ordered ? 'ol' : 'ul',\n    properties,\n    children: state.wrap(results, true)\n  }\n  state.patch(node, result)\n  return state.applyData(node, result)\n}\n","/**\n * @typedef {import('hast').Element} Element\n * @typedef {import('mdast').Paragraph} Paragraph\n * @typedef {import('../state.js').State} State\n */\n\n// Make VS Code show references to the above types.\n''\n\n/**\n * Turn an mdast `paragraph` node into hast.\n *\n * @param {State} state\n *   Info passed around.\n * @param {Paragraph} node\n *   mdast node.\n * @returns {Element}\n *   hast node.\n */\nexport function paragraph(state, node) {\n  /** @type {Element} */\n  const result = {\n    type: 'element',\n    tagName: 'p',\n    properties: {},\n    children: state.all(node)\n  }\n  state.patch(node, result)\n  return state.applyData(node, result)\n}\n","/**\n * @typedef {import('hast').Parents} HastParents\n * @typedef {import('hast').Root} HastRoot\n * @typedef {import('mdast').Root} MdastRoot\n * @typedef {import('../state.js').State} State\n */\n\n// Make VS Code show references to the above types.\n''\n\n/**\n * Turn an mdast `root` node into hast.\n *\n * @param {State} state\n *   Info passed around.\n * @param {MdastRoot} node\n *   mdast node.\n * @returns {HastParents}\n *   hast node.\n */\nexport function root(state, node) {\n  /** @type {HastRoot} */\n  const result = {type: 'root', children: state.wrap(state.all(node))}\n  state.patch(node, result)\n  return state.applyData(node, result)\n}\n","/**\n * @typedef {import('hast').Element} Element\n * @typedef {import('mdast').Strong} Strong\n * @typedef {import('../state.js').State} State\n */\n\n// Make VS Code show references to the above types.\n''\n\n/**\n * Turn an mdast `strong` node into hast.\n *\n * @param {State} state\n *   Info passed around.\n * @param {Strong} node\n *   mdast node.\n * @returns {Element}\n *   hast node.\n */\nexport function strong(state, node) {\n  /** @type {Element} */\n  const result = {\n    type: 'element',\n    tagName: 'strong',\n    properties: {},\n    children: state.all(node)\n  }\n  state.patch(node, result)\n  return state.applyData(node, result)\n}\n","/**\n * @typedef {import('hast').Element} Element\n * @typedef {import('mdast').Table} Table\n * @typedef {import('../state.js').State} State\n */\n\nimport {pointEnd, pointStart} from 'unist-util-position'\n\n/**\n * Turn an mdast `table` node into hast.\n *\n * @param {State} state\n *   Info passed around.\n * @param {Table} node\n *   mdast node.\n * @returns {Element}\n *   hast node.\n */\nexport function table(state, node) {\n  const rows = state.all(node)\n  const firstRow = rows.shift()\n  /** @type {Array} */\n  const tableContent = []\n\n  if (firstRow) {\n    /** @type {Element} */\n    const head = {\n      type: 'element',\n      tagName: 'thead',\n      properties: {},\n      children: state.wrap([firstRow], true)\n    }\n    state.patch(node.children[0], head)\n    tableContent.push(head)\n  }\n\n  if (rows.length > 0) {\n    /** @type {Element} */\n    const body = {\n      type: 'element',\n      tagName: 'tbody',\n      properties: {},\n      children: state.wrap(rows, true)\n    }\n\n    const start = pointStart(node.children[1])\n    const end = pointEnd(node.children[node.children.length - 1])\n    if (start && end) body.position = {start, end}\n    tableContent.push(body)\n  }\n\n  /** @type {Element} */\n  const result = {\n    type: 'element',\n    tagName: 'table',\n    properties: {},\n    children: state.wrap(tableContent, true)\n  }\n  state.patch(node, result)\n  return state.applyData(node, result)\n}\n","/**\n * @typedef {import('hast').Element} Element\n * @typedef {import('mdast').TableCell} TableCell\n * @typedef {import('../state.js').State} State\n */\n\n// Make VS Code show references to the above types.\n''\n\n/**\n * Turn an mdast `tableCell` node into hast.\n *\n * @param {State} state\n *   Info passed around.\n * @param {TableCell} node\n *   mdast node.\n * @returns {Element}\n *   hast node.\n */\nexport function tableCell(state, node) {\n  // Note: this function is normally not called: see `table-row` for how rows\n  // and their cells are compiled.\n  /** @type {Element} */\n  const result = {\n    type: 'element',\n    tagName: 'td', // Assume body cell.\n    properties: {},\n    children: state.all(node)\n  }\n  state.patch(node, result)\n  return state.applyData(node, result)\n}\n","/**\n * @typedef {import('hast').Element} Element\n * @typedef {import('hast').ElementContent} ElementContent\n * @typedef {import('hast').Properties} Properties\n * @typedef {import('mdast').Parents} Parents\n * @typedef {import('mdast').TableRow} TableRow\n * @typedef {import('../state.js').State} State\n */\n\n// Make VS Code show references to the above types.\n''\n\n/**\n * Turn an mdast `tableRow` node into hast.\n *\n * @param {State} state\n *   Info passed around.\n * @param {TableRow} node\n *   mdast node.\n * @param {Parents | undefined} parent\n *   Parent of `node`.\n * @returns {Element}\n *   hast node.\n */\nexport function tableRow(state, node, parent) {\n  const siblings = parent ? parent.children : undefined\n  // Generate a body row when without parent.\n  const rowIndex = siblings ? siblings.indexOf(node) : 1\n  const tagName = rowIndex === 0 ? 'th' : 'td'\n  // To do: option to use `style`?\n  const align = parent && parent.type === 'table' ? parent.align : undefined\n  const length = align ? align.length : node.children.length\n  let cellIndex = -1\n  /** @type {Array} */\n  const cells = []\n\n  while (++cellIndex < length) {\n    // Note: can also be undefined.\n    const cell = node.children[cellIndex]\n    /** @type {Properties} */\n    const properties = {}\n    const alignValue = align ? align[cellIndex] : undefined\n\n    if (alignValue) {\n      properties.align = alignValue\n    }\n\n    /** @type {Element} */\n    let result = {type: 'element', tagName, properties, children: []}\n\n    if (cell) {\n      result.children = state.all(cell)\n      state.patch(cell, result)\n      result = state.applyData(cell, result)\n    }\n\n    cells.push(result)\n  }\n\n  /** @type {Element} */\n  const result = {\n    type: 'element',\n    tagName: 'tr',\n    properties: {},\n    children: state.wrap(cells, true)\n  }\n  state.patch(node, result)\n  return state.applyData(node, result)\n}\n","/**\n * @typedef {import('hast').Element} HastElement\n * @typedef {import('hast').Text} HastText\n * @typedef {import('mdast').Text} MdastText\n * @typedef {import('../state.js').State} State\n */\n\nimport {trimLines} from 'trim-lines'\n\n/**\n * Turn an mdast `text` node into hast.\n *\n * @param {State} state\n *   Info passed around.\n * @param {MdastText} node\n *   mdast node.\n * @returns {HastElement | HastText}\n *   hast node.\n */\nexport function text(state, node) {\n  /** @type {HastText} */\n  const result = {type: 'text', value: trimLines(String(node.value))}\n  state.patch(node, result)\n  return state.applyData(node, result)\n}\n","/**\n * @typedef {import('hast').Element} Element\n * @typedef {import('mdast').ThematicBreak} ThematicBreak\n * @typedef {import('../state.js').State} State\n */\n\n// Make VS Code show references to the above types.\n''\n\n/**\n * Turn an mdast `thematicBreak` node into hast.\n *\n * @param {State} state\n *   Info passed around.\n * @param {ThematicBreak} node\n *   mdast node.\n * @returns {Element}\n *   hast node.\n */\nexport function thematicBreak(state, node) {\n  /** @type {Element} */\n  const result = {\n    type: 'element',\n    tagName: 'hr',\n    properties: {},\n    children: []\n  }\n  state.patch(node, result)\n  return state.applyData(node, result)\n}\n","/**\n * @typedef {import('hast').Element} HastElement\n * @typedef {import('hast').ElementContent} HastElementContent\n * @typedef {import('hast').Nodes} HastNodes\n * @typedef {import('hast').Properties} HastProperties\n * @typedef {import('hast').RootContent} HastRootContent\n * @typedef {import('hast').Text} HastText\n *\n * @typedef {import('mdast').Definition} MdastDefinition\n * @typedef {import('mdast').FootnoteDefinition} MdastFootnoteDefinition\n * @typedef {import('mdast').Nodes} MdastNodes\n * @typedef {import('mdast').Parents} MdastParents\n *\n * @typedef {import('vfile').VFile} VFile\n *\n * @typedef {import('./footer.js').FootnoteBackContentTemplate} FootnoteBackContentTemplate\n * @typedef {import('./footer.js').FootnoteBackLabelTemplate} FootnoteBackLabelTemplate\n */\n\n/**\n * @callback Handler\n *   Handle a node.\n * @param {State} state\n *   Info passed around.\n * @param {any} node\n *   mdast node to handle.\n * @param {MdastParents | undefined} parent\n *   Parent of `node`.\n * @returns {Array | HastElementContent | undefined}\n *   hast node.\n *\n * @typedef {Partial>} Handlers\n *   Handle nodes.\n *\n * @typedef Options\n *   Configuration (optional).\n * @property {boolean | null | undefined} [allowDangerousHtml=false]\n *   Whether to persist raw HTML in markdown in the hast tree (default:\n *   `false`).\n * @property {string | null | undefined} [clobberPrefix='user-content-']\n *   Prefix to use before the `id` property on footnotes to prevent them from\n *   *clobbering* (default: `'user-content-'`).\n *\n *   Pass `''` for trusted markdown and when you are careful with\n *   polyfilling.\n *   You could pass a different prefix.\n *\n *   DOM clobbering is this:\n *\n *   ```html\n *   

\n * \n * ```\n *\n * The above example shows that elements are made available by browsers, by\n * their ID, on the `window` object.\n * This is a security risk because you might be expecting some other variable\n * at that place.\n * It can also break polyfills.\n * Using a prefix solves these problems.\n * @property {VFile | null | undefined} [file]\n * Corresponding virtual file representing the input document (optional).\n * @property {FootnoteBackContentTemplate | string | null | undefined} [footnoteBackContent]\n * Content of the backreference back to references (default: `defaultFootnoteBackContent`).\n *\n * The default value is:\n *\n * ```js\n * function defaultFootnoteBackContent(_, rereferenceIndex) {\n * const result = [{type: 'text', value: '↩'}]\n *\n * if (rereferenceIndex > 1) {\n * result.push({\n * type: 'element',\n * tagName: 'sup',\n * properties: {},\n * children: [{type: 'text', value: String(rereferenceIndex)}]\n * })\n * }\n *\n * return result\n * }\n * ```\n *\n * This content is used in the `a` element of each backreference (the `↩`\n * links).\n * @property {FootnoteBackLabelTemplate | string | null | undefined} [footnoteBackLabel]\n * Label to describe the backreference back to references (default:\n * `defaultFootnoteBackLabel`).\n *\n * The default value is:\n *\n * ```js\n * function defaultFootnoteBackLabel(referenceIndex, rereferenceIndex) {\n * return (\n * 'Back to reference ' +\n * (referenceIndex + 1) +\n * (rereferenceIndex > 1 ? '-' + rereferenceIndex : '')\n * )\n * }\n * ```\n *\n * Change it when the markdown is not in English.\n *\n * This label is used in the `ariaLabel` property on each backreference\n * (the `↩` links).\n * It affects users of assistive technology.\n * @property {string | null | undefined} [footnoteLabel='Footnotes']\n * Textual label to use for the footnotes section (default: `'Footnotes'`).\n *\n * Change it when the markdown is not in English.\n *\n * This label is typically hidden visually (assuming a `sr-only` CSS class\n * is defined that does that) and so affects screen readers only.\n * If you do have such a class, but want to show this section to everyone,\n * pass different properties with the `footnoteLabelProperties` option.\n * @property {HastProperties | null | undefined} [footnoteLabelProperties={className: ['sr-only']}]\n * Properties to use on the footnote label (default: `{className:\n * ['sr-only']}`).\n *\n * Change it to show the label and add other properties.\n *\n * This label is typically hidden visually (assuming an `sr-only` CSS class\n * is defined that does that) and so affects screen readers only.\n * If you do have such a class, but want to show this section to everyone,\n * pass an empty string.\n * You can also add different properties.\n *\n * > **Note**: `id: 'footnote-label'` is always added, because footnote\n * > calls use it with `aria-describedby` to provide an accessible label.\n * @property {string | null | undefined} [footnoteLabelTagName='h2']\n * HTML tag name to use for the footnote label element (default: `'h2'`).\n *\n * Change it to match your document structure.\n *\n * This label is typically hidden visually (assuming a `sr-only` CSS class\n * is defined that does that) and so affects screen readers only.\n * If you do have such a class, but want to show this section to everyone,\n * pass different properties with the `footnoteLabelProperties` option.\n * @property {Handlers | null | undefined} [handlers]\n * Extra handlers for nodes (optional).\n * @property {Array | null | undefined} [passThrough]\n * List of custom mdast node types to pass through (keep) in hast (note that\n * the node itself is passed, but eventual children are transformed)\n * (optional).\n * @property {Handler | null | undefined} [unknownHandler]\n * Handler for all unknown nodes (optional).\n *\n * @typedef State\n * Info passed around.\n * @property {(node: MdastNodes) => Array} all\n * Transform the children of an mdast parent to hast.\n * @property {(from: MdastNodes, to: Type) => HastElement | Type} applyData\n * Honor the `data` of `from`, and generate an element instead of `node`.\n * @property {Map} definitionById\n * Definitions by their identifier.\n * @property {Map} footnoteById\n * Footnote definitions by their identifier.\n * @property {Map} footnoteCounts\n * Counts for how often the same footnote was called.\n * @property {Array} footnoteOrder\n * Identifiers of order when footnote calls first appear in tree order.\n * @property {Handlers} handlers\n * Applied handlers.\n * @property {(node: MdastNodes, parent: MdastParents | undefined) => Array | HastElementContent | undefined} one\n * Transform an mdast node to hast.\n * @property {Options} options\n * Configuration.\n * @property {(from: MdastNodes, node: HastNodes) => undefined} patch\n * Copy a node’s positional info.\n * @property {(nodes: Array, loose?: boolean | undefined) => Array} wrap\n * Wrap `nodes` with line endings between each node, adds initial/final line endings when `loose`.\n */\n\nimport structuredClone from '@ungap/structured-clone'\nimport {visit} from 'unist-util-visit'\nimport {position} from 'unist-util-position'\nimport {handlers as defaultHandlers} from './handlers/index.js'\n\nconst own = {}.hasOwnProperty\n\n/** @type {Options} */\nconst emptyOptions = {}\n\n/**\n * Create `state` from an mdast tree.\n *\n * @param {MdastNodes} tree\n * mdast node to transform.\n * @param {Options | null | undefined} [options]\n * Configuration (optional).\n * @returns {State}\n * `state` function.\n */\nexport function createState(tree, options) {\n const settings = options || emptyOptions\n /** @type {Map} */\n const definitionById = new Map()\n /** @type {Map} */\n const footnoteById = new Map()\n /** @type {Map} */\n const footnoteCounts = new Map()\n /** @type {Handlers} */\n // @ts-expect-error: the root handler returns a root.\n // Hard to type.\n const handlers = {...defaultHandlers, ...settings.handlers}\n\n /** @type {State} */\n const state = {\n all,\n applyData,\n definitionById,\n footnoteById,\n footnoteCounts,\n footnoteOrder: [],\n handlers,\n one,\n options: settings,\n patch,\n wrap\n }\n\n visit(tree, function (node) {\n if (node.type === 'definition' || node.type === 'footnoteDefinition') {\n const map = node.type === 'definition' ? definitionById : footnoteById\n const id = String(node.identifier).toUpperCase()\n\n // Mimick CM behavior of link definitions.\n // See: .\n if (!map.has(id)) {\n // @ts-expect-error: node type matches map.\n map.set(id, node)\n }\n }\n })\n\n return state\n\n /**\n * Transform an mdast node into a hast node.\n *\n * @param {MdastNodes} node\n * mdast node.\n * @param {MdastParents | undefined} [parent]\n * Parent of `node`.\n * @returns {Array | HastElementContent | undefined}\n * Resulting hast node.\n */\n function one(node, parent) {\n const type = node.type\n const handle = state.handlers[type]\n\n if (own.call(state.handlers, type) && handle) {\n return handle(state, node, parent)\n }\n\n if (state.options.passThrough && state.options.passThrough.includes(type)) {\n if ('children' in node) {\n const {children, ...shallow} = node\n const result = structuredClone(shallow)\n // @ts-expect-error: TS doesn’t understand…\n result.children = state.all(node)\n // @ts-expect-error: TS doesn’t understand…\n return result\n }\n\n // @ts-expect-error: it’s custom.\n return structuredClone(node)\n }\n\n const unknown = state.options.unknownHandler || defaultUnknownHandler\n\n return unknown(state, node, parent)\n }\n\n /**\n * Transform the children of an mdast node into hast nodes.\n *\n * @param {MdastNodes} parent\n * mdast node to compile\n * @returns {Array}\n * Resulting hast nodes.\n */\n function all(parent) {\n /** @type {Array} */\n const values = []\n\n if ('children' in parent) {\n const nodes = parent.children\n let index = -1\n while (++index < nodes.length) {\n const result = state.one(nodes[index], parent)\n\n // To do: see if we van clean this? Can we merge texts?\n if (result) {\n if (index && nodes[index - 1].type === 'break') {\n if (!Array.isArray(result) && result.type === 'text') {\n result.value = trimMarkdownSpaceStart(result.value)\n }\n\n if (!Array.isArray(result) && result.type === 'element') {\n const head = result.children[0]\n\n if (head && head.type === 'text') {\n head.value = trimMarkdownSpaceStart(head.value)\n }\n }\n }\n\n if (Array.isArray(result)) {\n values.push(...result)\n } else {\n values.push(result)\n }\n }\n }\n }\n\n return values\n }\n}\n\n/**\n * Copy a node’s positional info.\n *\n * @param {MdastNodes} from\n * mdast node to copy from.\n * @param {HastNodes} to\n * hast node to copy into.\n * @returns {undefined}\n * Nothing.\n */\nfunction patch(from, to) {\n if (from.position) to.position = position(from)\n}\n\n/**\n * Honor the `data` of `from` and maybe generate an element instead of `to`.\n *\n * @template {HastNodes} Type\n * Node type.\n * @param {MdastNodes} from\n * mdast node to use data from.\n * @param {Type} to\n * hast node to change.\n * @returns {HastElement | Type}\n * Nothing.\n */\nfunction applyData(from, to) {\n /** @type {HastElement | Type} */\n let result = to\n\n // Handle `data.hName`, `data.hProperties, `data.hChildren`.\n if (from && from.data) {\n const hName = from.data.hName\n const hChildren = from.data.hChildren\n const hProperties = from.data.hProperties\n\n if (typeof hName === 'string') {\n // Transforming the node resulted in an element with a different name\n // than wanted:\n if (result.type === 'element') {\n result.tagName = hName\n }\n // Transforming the node resulted in a non-element, which happens for\n // raw, text, and root nodes (unless custom handlers are passed).\n // The intent of `hName` is to create an element, but likely also to keep\n // the content around (otherwise: pass `hChildren`).\n else {\n /** @type {Array} */\n // @ts-expect-error: assume no doctypes in `root`.\n const children = 'children' in result ? result.children : [result]\n result = {type: 'element', tagName: hName, properties: {}, children}\n }\n }\n\n if (result.type === 'element' && hProperties) {\n Object.assign(result.properties, structuredClone(hProperties))\n }\n\n if (\n 'children' in result &&\n result.children &&\n hChildren !== null &&\n hChildren !== undefined\n ) {\n result.children = hChildren\n }\n }\n\n return result\n}\n\n/**\n * Transform an unknown node.\n *\n * @param {State} state\n * Info passed around.\n * @param {MdastNodes} node\n * Unknown mdast node.\n * @returns {HastElement | HastText}\n * Resulting hast node.\n */\nfunction defaultUnknownHandler(state, node) {\n const data = node.data || {}\n /** @type {HastElement | HastText} */\n const result =\n 'value' in node &&\n !(own.call(data, 'hProperties') || own.call(data, 'hChildren'))\n ? {type: 'text', value: node.value}\n : {\n type: 'element',\n tagName: 'div',\n properties: {},\n children: state.all(node)\n }\n\n state.patch(node, result)\n return state.applyData(node, result)\n}\n\n/**\n * Wrap `nodes` with line endings between each node.\n *\n * @template {HastRootContent} Type\n * Node type.\n * @param {Array} nodes\n * List of nodes to wrap.\n * @param {boolean | undefined} [loose=false]\n * Whether to add line endings at start and end (default: `false`).\n * @returns {Array}\n * Wrapped nodes.\n */\nexport function wrap(nodes, loose) {\n /** @type {Array} */\n const result = []\n let index = -1\n\n if (loose) {\n result.push({type: 'text', value: '\\n'})\n }\n\n while (++index < nodes.length) {\n if (index) result.push({type: 'text', value: '\\n'})\n result.push(nodes[index])\n }\n\n if (loose && nodes.length > 0) {\n result.push({type: 'text', value: '\\n'})\n }\n\n return result\n}\n\n/**\n * Trim spaces and tabs at the start of `value`.\n *\n * @param {string} value\n * Value to trim.\n * @returns {string}\n * Result.\n */\nfunction trimMarkdownSpaceStart(value) {\n let index = 0\n let code = value.charCodeAt(index)\n\n while (code === 9 || code === 32) {\n index++\n code = value.charCodeAt(index)\n }\n\n return value.slice(index)\n}\n","/**\n * @typedef {import('hast').Nodes} HastNodes\n * @typedef {import('mdast').Nodes} MdastNodes\n * @typedef {import('./state.js').Options} Options\n */\n\nimport {ok as assert} from 'devlop'\nimport {footer} from './footer.js'\nimport {createState} from './state.js'\n\n/**\n * Transform mdast to hast.\n *\n * ##### Notes\n *\n * ###### HTML\n *\n * Raw HTML is available in mdast as `html` nodes and can be embedded in hast\n * as semistandard `raw` nodes.\n * Most utilities ignore `raw` nodes but two notable ones don’t:\n *\n * * `hast-util-to-html` also has an option `allowDangerousHtml` which will\n * output the raw HTML.\n * This is typically discouraged as noted by the option name but is useful\n * if you completely trust authors\n * * `hast-util-raw` can handle the raw embedded HTML strings by parsing them\n * into standard hast nodes (`element`, `text`, etc).\n * This is a heavy task as it needs a full HTML parser, but it is the only\n * way to support untrusted content\n *\n * ###### Footnotes\n *\n * Many options supported here relate to footnotes.\n * Footnotes are not specified by CommonMark, which we follow by default.\n * They are supported by GitHub, so footnotes can be enabled in markdown with\n * `mdast-util-gfm`.\n *\n * The options `footnoteBackLabel` and `footnoteLabel` define natural language\n * that explains footnotes, which is hidden for sighted users but shown to\n * assistive technology.\n * When your page is not in English, you must define translated values.\n *\n * Back references use ARIA attributes, but the section label itself uses a\n * heading that is hidden with an `sr-only` class.\n * To show it to sighted users, define different attributes in\n * `footnoteLabelProperties`.\n *\n * ###### Clobbering\n *\n * Footnotes introduces a problem, as it links footnote calls to footnote\n * definitions on the page through `id` attributes generated from user content,\n * which results in DOM clobbering.\n *\n * DOM clobbering is this:\n *\n * ```html\n *

\n * \n * ```\n *\n * Elements by their ID are made available by browsers on the `window` object,\n * which is a security risk.\n * Using a prefix solves this problem.\n *\n * More information on how to handle clobbering and the prefix is explained in\n * Example: headings (DOM clobbering) in `rehype-sanitize`.\n *\n * ###### Unknown nodes\n *\n * Unknown nodes are nodes with a type that isn’t in `handlers` or `passThrough`.\n * The default behavior for unknown nodes is:\n *\n * * when the node has a `value` (and doesn’t have `data.hName`,\n * `data.hProperties`, or `data.hChildren`, see later), create a hast `text`\n * node\n * * otherwise, create a `
` element (which could be changed with\n * `data.hName`), with its children mapped from mdast to hast as well\n *\n * This behavior can be changed by passing an `unknownHandler`.\n *\n * @param {MdastNodes} tree\n * mdast tree.\n * @param {Options | null | undefined} [options]\n * Configuration (optional).\n * @returns {HastNodes}\n * hast tree.\n */\nexport function toHast(tree, options) {\n const state = createState(tree, options)\n const node = state.one(tree, undefined)\n const foot = footer(state)\n /** @type {HastNodes} */\n const result = Array.isArray(node)\n ? {type: 'root', children: node}\n : node || {type: 'root', children: []}\n\n if (foot) {\n // If there’s a footer, there were definitions, meaning block\n // content.\n // So `result` is a parent node.\n assert('children' in result)\n result.children.push({type: 'text', value: '\\n'}, foot)\n }\n\n return result\n}\n","// Include `data` fields in mdast and `raw` nodes in hast.\n/// \n\n/**\n * @typedef {import('hast').Root} HastRoot\n * @typedef {import('mdast').Root} MdastRoot\n * @typedef {import('mdast-util-to-hast').Options} ToHastOptions\n * @typedef {import('unified').Processor} Processor\n * @typedef {import('vfile').VFile} VFile\n */\n\n/**\n * @typedef {Omit} Options\n *\n * @callback TransformBridge\n * Bridge-mode.\n *\n * Runs the destination with the new hast tree.\n * Discards result.\n * @param {MdastRoot} tree\n * Tree.\n * @param {VFile} file\n * File.\n * @returns {Promise}\n * Nothing.\n *\n * @callback TransformMutate\n * Mutate-mode.\n *\n * Further transformers run on the hast tree.\n * @param {MdastRoot} tree\n * Tree.\n * @param {VFile} file\n * File.\n * @returns {HastRoot}\n * Tree (hast).\n */\n\nimport {toHast} from 'mdast-util-to-hast'\n\n/**\n * Turn markdown into HTML.\n *\n * ##### Notes\n *\n * ###### Signature\n *\n * * if a processor is given, runs the (rehype) plugins used on it with a\n * hast tree, then discards the result (*bridge mode*)\n * * otherwise, returns a hast tree, the plugins used after `remarkRehype`\n * are rehype plugins (*mutate mode*)\n *\n * > 👉 **Note**: It’s highly unlikely that you want to pass a `processor`.\n *\n * ###### HTML\n *\n * Raw HTML is available in mdast as `html` nodes and can be embedded in hast\n * as semistandard `raw` nodes.\n * Most plugins ignore `raw` nodes but two notable ones don’t:\n *\n * * `rehype-stringify` also has an option `allowDangerousHtml` which will\n * output the raw HTML.\n * This is typically discouraged as noted by the option name but is useful if\n * you completely trust authors\n * * `rehype-raw` can handle the raw embedded HTML strings by parsing them\n * into standard hast nodes (`element`, `text`, etc).\n * This is a heavy task as it needs a full HTML parser, but it is the only way\n * to support untrusted content\n *\n * ###### Footnotes\n *\n * Many options supported here relate to footnotes.\n * Footnotes are not specified by CommonMark, which we follow by default.\n * They are supported by GitHub, so footnotes can be enabled in markdown with\n * `remark-gfm`.\n *\n * The options `footnoteBackLabel` and `footnoteLabel` define natural language\n * that explains footnotes, which is hidden for sighted users but shown to\n * assistive technology.\n * When your page is not in English, you must define translated values.\n *\n * Back references use ARIA attributes, but the section label itself uses a\n * heading that is hidden with an `sr-only` class.\n * To show it to sighted users, define different attributes in\n * `footnoteLabelProperties`.\n *\n * ###### Clobbering\n *\n * Footnotes introduces a problem, as it links footnote calls to footnote\n * definitions on the page through `id` attributes generated from user content,\n * which results in DOM clobbering.\n *\n * DOM clobbering is this:\n *\n * ```html\n *

\n * \n * ```\n *\n * Elements by their ID are made available by browsers on the `window` object,\n * which is a security risk.\n * Using a prefix solves this problem.\n *\n * More information on how to handle clobbering and the prefix is explained in\n * *Example: headings (DOM clobbering)* in `rehype-sanitize`.\n *\n * ###### Unknown nodes\n *\n * Unknown nodes are nodes with a type that isn’t in `handlers` or `passThrough`.\n * The default behavior for unknown nodes is:\n *\n * * when the node has a `value` (and doesn’t have `data.hName`,\n * `data.hProperties`, or `data.hChildren`, see later), create a hast `text`\n * node\n * * otherwise, create a `
` element (which could be changed with\n * `data.hName`), with its children mapped from mdast to hast as well\n *\n * This behavior can be changed by passing an `unknownHandler`.\n *\n * @overload\n * @param {Processor} processor\n * @param {Readonly | null | undefined} [options]\n * @returns {TransformBridge}\n *\n * @overload\n * @param {Readonly | null | undefined} [options]\n * @returns {TransformMutate}\n *\n * @param {Readonly | Processor | null | undefined} [destination]\n * Processor or configuration (optional).\n * @param {Readonly | null | undefined} [options]\n * When a processor was given, configuration (optional).\n * @returns {TransformBridge | TransformMutate}\n * Transform.\n */\nexport default function remarkRehype(destination, options) {\n if (destination && 'run' in destination) {\n /**\n * @type {TransformBridge}\n */\n return async function (tree, file) {\n // Cast because root in -> root out.\n const hastTree = /** @type {HastRoot} */ (\n toHast(tree, {file, ...options})\n )\n await destination.run(hastTree, file)\n }\n }\n\n /**\n * @type {TransformMutate}\n */\n return function (tree, file) {\n // Cast because root in -> root out.\n return /** @type {HastRoot} */ (\n toHast(tree, {file, ...(options || destination)})\n )\n }\n}\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 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) => void} Callback\n * Callback.\n *\n * @typedef {(...input: Array) => 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) => 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} */\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} 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} 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","// A derivative work based on:\n// .\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// .\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} 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// .\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: \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: \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}\n */\n this.history = []\n\n /**\n * List of messages associated with the file.\n *\n * @type {Array}\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 * > .\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 , 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}\n */\n function (property) {\n const self = this\n const constr = self.constructor\n const proto = /** @type {Record} */ (\n // Prototypes do exist.\n // type-coverage:ignore-next-line\n constr.prototype\n )\n const value = proto[property]\n /** @type {(...parameters: Array) => 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, any, any> |\n * PluginTuple, any, any> |\n * Preset\n * )} Pluggable\n * Union of the different ways to add plugins and settings.\n */\n\n/**\n * @typedef {Array} PluggableList\n * List of plugins and presets.\n */\n\n// Note: we can’t use `callback` yet as it messes up `this`:\n// .\n/**\n * @template {Array} [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} [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,\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} next\n * Callback.\n * @returns {(\n * Promise |\n * Promise | // 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` or `undefined` — the next transformer keeps using\n * same tree\n * * `Promise` 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\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\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\n * : // Unknown.\n * Processor\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>}\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 |\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>>}\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 |\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}\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} */ (\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}\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}\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}\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>} done\n * @returns {undefined}\n *\n * @overload\n * @param {Compatible | undefined} [file]\n * @returns {Promise>}\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> | undefined} [done]\n * Callback (optional).\n * @returns {Promise | 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) => 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} */ (file))\n })\n\n /**\n * @param {Error | undefined} error\n * @param {VFileWithOutput | 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}\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 | 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>}\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} done\n * @returns {undefined}\n *\n * @overload\n * @param {HeadTree extends undefined ? Node : HeadTree} tree\n * @param {Compatible | undefined} file\n * @param {RunCallback} done\n * @returns {undefined}\n *\n * @overload\n * @param {HeadTree extends undefined ? Node : HeadTree} tree\n * @param {Compatible | undefined} [file]\n * @returns {Promise}\n *\n * @param {HeadTree extends undefined ? Node : HeadTree} tree\n * Tree to transform and inspect.\n * @param {(\n * RunCallback |\n * Compatible\n * )} [file]\n * File associated with `node` (optional); any value accepted as `x` in\n * `new VFile(x)`.\n * @param {RunCallback} [done]\n * Callback (optional).\n * @returns {Promise | 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}\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} [Parameters=[]]\n * @template {Node | string | undefined} [Input=undefined]\n * @template [Output=Input]\n *\n * @overload\n * @param {Preset | null | undefined} [preset]\n * @returns {Processor}\n *\n * @overload\n * @param {PluggableList} list\n * @returns {Processor}\n *\n * @overload\n * @param {Plugin} plugin\n * @param {...(Parameters | [boolean])} parameters\n * @returns {UsePlugin}\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}\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>} */ (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} 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","// Register `Raw` in tree:\n/// \n\n/**\n * @typedef {import('hast').Element} Element\n * @typedef {import('hast').ElementContent} ElementContent\n * @typedef {import('hast').Nodes} Nodes\n * @typedef {import('hast').Parents} Parents\n * @typedef {import('hast').Root} Root\n * @typedef {import('hast-util-to-jsx-runtime').Components} JsxRuntimeComponents\n * @typedef {import('remark-rehype').Options} RemarkRehypeOptions\n * @typedef {import('unist-util-visit').BuildVisitor} Visitor\n * @typedef {import('unified').PluggableList} PluggableList\n */\n\n/**\n * @callback AllowElement\n * Filter elements.\n * @param {Readonly} element\n * Element to check.\n * @param {number} index\n * Index of `element` in `parent`.\n * @param {Readonly | undefined} parent\n * Parent of `element`.\n * @returns {boolean | null | undefined}\n * Whether to allow `element` (default: `false`).\n *\n * @typedef {Partial} Components\n * Map tag names to components.\n *\n * @typedef Deprecation\n * Deprecation.\n * @property {string} from\n * Old field.\n * @property {string} id\n * ID in readme.\n * @property {keyof Options} [to]\n * New field.\n *\n * @typedef Options\n * Configuration.\n * @property {AllowElement | null | undefined} [allowElement]\n * Filter elements (optional);\n * `allowedElements` / `disallowedElements` is used first.\n * @property {ReadonlyArray | null | undefined} [allowedElements]\n * Tag names to allow (default: all tag names);\n * cannot combine w/ `disallowedElements`.\n * @property {string | null | undefined} [children]\n * Markdown.\n * @property {string | null | undefined} [className]\n * Wrap in a `div` with this class name.\n * @property {Components | null | undefined} [components]\n * Map tag names to components.\n * @property {ReadonlyArray | null | undefined} [disallowedElements]\n * Tag names to disallow (default: `[]`);\n * cannot combine w/ `allowedElements`.\n * @property {PluggableList | null | undefined} [rehypePlugins]\n * List of rehype plugins to use.\n * @property {PluggableList | null | undefined} [remarkPlugins]\n * List of remark plugins to use.\n * @property {Readonly | null | undefined} [remarkRehypeOptions]\n * Options to pass through to `remark-rehype`.\n * @property {boolean | null | undefined} [skipHtml=false]\n * Ignore HTML in markdown completely (default: `false`).\n * @property {boolean | null | undefined} [unwrapDisallowed=false]\n * Extract (unwrap) what’s in disallowed elements (default: `false`);\n * normally when say `strong` is not allowed, it and it’s children are dropped,\n * with `unwrapDisallowed` the element itself is replaced by its children.\n * @property {UrlTransform | null | undefined} [urlTransform]\n * Change URLs (default: `defaultUrlTransform`)\n *\n * @callback UrlTransform\n * Transform all URLs.\n * @param {string} url\n * URL.\n * @param {string} key\n * Property name (example: `'href'`).\n * @param {Readonly} node\n * Node.\n * @returns {string | null | undefined}\n * Transformed URL (optional).\n */\n\nimport {unreachable} from 'devlop'\nimport {toJsxRuntime} from 'hast-util-to-jsx-runtime'\nimport {urlAttributes} from 'html-url-attributes'\n// @ts-expect-error: untyped.\nimport {Fragment, jsx, jsxs} from 'react/jsx-runtime'\nimport remarkParse from 'remark-parse'\nimport remarkRehype from 'remark-rehype'\nimport {unified} from 'unified'\nimport {visit} from 'unist-util-visit'\nimport {VFile} from 'vfile'\n\nconst changelog =\n 'https://github.com/remarkjs/react-markdown/blob/main/changelog.md'\n\n/** @type {PluggableList} */\nconst emptyPlugins = []\n/** @type {Readonly} */\nconst emptyRemarkRehypeOptions = {allowDangerousHtml: true}\nconst safeProtocol = /^(https?|ircs?|mailto|xmpp)$/i\n\n// Mutable because we `delete` any time it’s used and a message is sent.\n/** @type {ReadonlyArray>} */\nconst deprecations = [\n {from: 'astPlugins', id: 'remove-buggy-html-in-markdown-parser'},\n {from: 'allowDangerousHtml', id: 'remove-buggy-html-in-markdown-parser'},\n {\n from: 'allowNode',\n id: 'replace-allownode-allowedtypes-and-disallowedtypes',\n to: 'allowElement'\n },\n {\n from: 'allowedTypes',\n id: 'replace-allownode-allowedtypes-and-disallowedtypes',\n to: 'allowedElements'\n },\n {\n from: 'disallowedTypes',\n id: 'replace-allownode-allowedtypes-and-disallowedtypes',\n to: 'disallowedElements'\n },\n {from: 'escapeHtml', id: 'remove-buggy-html-in-markdown-parser'},\n {from: 'includeElementIndex', id: '#remove-includeelementindex'},\n {\n from: 'includeNodeIndex',\n id: 'change-includenodeindex-to-includeelementindex'\n },\n {from: 'linkTarget', id: 'remove-linktarget'},\n {from: 'plugins', id: 'change-plugins-to-remarkplugins', to: 'remarkPlugins'},\n {from: 'rawSourcePos', id: '#remove-rawsourcepos'},\n {from: 'renderers', id: 'change-renderers-to-components', to: 'components'},\n {from: 'source', id: 'change-source-to-children', to: 'children'},\n {from: 'sourcePos', id: '#remove-sourcepos'},\n {from: 'transformImageUri', id: '#add-urltransform', to: 'urlTransform'},\n {from: 'transformLinkUri', id: '#add-urltransform', to: 'urlTransform'}\n]\n\n/**\n * Component to render markdown.\n *\n * @param {Readonly} options\n * Props.\n * @returns {JSX.Element}\n * React element.\n */\nexport function Markdown(options) {\n const allowedElements = options.allowedElements\n const allowElement = options.allowElement\n const children = options.children || ''\n const className = options.className\n const components = options.components\n const disallowedElements = options.disallowedElements\n const rehypePlugins = options.rehypePlugins || emptyPlugins\n const remarkPlugins = options.remarkPlugins || emptyPlugins\n const remarkRehypeOptions = options.remarkRehypeOptions\n ? {...options.remarkRehypeOptions, ...emptyRemarkRehypeOptions}\n : emptyRemarkRehypeOptions\n const skipHtml = options.skipHtml\n const unwrapDisallowed = options.unwrapDisallowed\n const urlTransform = options.urlTransform || defaultUrlTransform\n\n const processor = unified()\n .use(remarkParse)\n .use(remarkPlugins)\n .use(remarkRehype, remarkRehypeOptions)\n .use(rehypePlugins)\n\n const file = new VFile()\n\n if (typeof children === 'string') {\n file.value = children\n } else {\n unreachable(\n 'Unexpected value `' +\n children +\n '` for `children` prop, expected `string`'\n )\n }\n\n if (allowedElements && disallowedElements) {\n unreachable(\n 'Unexpected combined `allowedElements` and `disallowedElements`, expected one or the other'\n )\n }\n\n for (const deprecation of deprecations) {\n if (Object.hasOwn(options, deprecation.from)) {\n unreachable(\n 'Unexpected `' +\n deprecation.from +\n '` prop, ' +\n (deprecation.to\n ? 'use `' + deprecation.to + '` instead'\n : 'remove it') +\n ' (see <' +\n changelog +\n '#' +\n deprecation.id +\n '> for more info)'\n )\n }\n }\n\n const mdastTree = processor.parse(file)\n /** @type {Nodes} */\n let hastTree = processor.runSync(mdastTree, file)\n\n // Wrap in `div` if there’s a class name.\n if (className) {\n hastTree = {\n type: 'element',\n tagName: 'div',\n properties: {className},\n // Assume no doctypes.\n children: /** @type {Array} */ (\n hastTree.type === 'root' ? hastTree.children : [hastTree]\n )\n }\n }\n\n visit(hastTree, transform)\n\n return toJsxRuntime(hastTree, {\n Fragment,\n components,\n ignoreInvalidStyle: true,\n jsx,\n jsxs,\n passKeys: true,\n passNode: true\n })\n\n /** @type {Visitor} */\n function transform(node, index, parent) {\n if (node.type === 'raw' && parent && typeof index === 'number') {\n if (skipHtml) {\n parent.children.splice(index, 1)\n } else {\n parent.children[index] = {type: 'text', value: node.value}\n }\n\n return index\n }\n\n if (node.type === 'element') {\n /** @type {string} */\n let key\n\n for (key in urlAttributes) {\n if (\n Object.hasOwn(urlAttributes, key) &&\n Object.hasOwn(node.properties, key)\n ) {\n const value = node.properties[key]\n const test = urlAttributes[key]\n if (test === null || test.includes(node.tagName)) {\n node.properties[key] = urlTransform(String(value || ''), key, node)\n }\n }\n }\n }\n\n if (node.type === 'element') {\n let remove = allowedElements\n ? !allowedElements.includes(node.tagName)\n : disallowedElements\n ? disallowedElements.includes(node.tagName)\n : false\n\n if (!remove && allowElement && typeof index === 'number') {\n remove = !allowElement(node, index, parent)\n }\n\n if (remove && parent && typeof index === 'number') {\n if (unwrapDisallowed && node.children) {\n parent.children.splice(index, 1, ...node.children)\n } else {\n parent.children.splice(index, 1)\n }\n\n return index\n }\n }\n }\n}\n\n/**\n * Make a URL safe.\n *\n * @satisfies {UrlTransform}\n * @param {string} value\n * URL.\n * @returns {string}\n * Safe URL.\n */\nexport function defaultUrlTransform(value) {\n // Same as:\n // \n // But without the `encode` part.\n const colon = value.indexOf(':')\n const questionMark = value.indexOf('?')\n const numberSign = value.indexOf('#')\n const slash = value.indexOf('/')\n\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) ||\n (questionMark > -1 && colon > questionMark) ||\n (numberSign > -1 && colon > numberSign) ||\n // It is a protocol, it should be allowed.\n safeProtocol.test(value.slice(0, colon))\n ) {\n return value\n }\n\n return ''\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","/**\n * @typedef {import('mdast').Nodes} Nodes\n * @typedef {import('mdast').Parents} Parents\n * @typedef {import('mdast').PhrasingContent} PhrasingContent\n * @typedef {import('mdast').Root} Root\n * @typedef {import('mdast').Text} Text\n * @typedef {import('unist-util-visit-parents').Test} Test\n * @typedef {import('unist-util-visit-parents').VisitorResult} VisitorResult\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, 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} 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`) — matches from regex capture groups\n * * `match` (`RegExpMatchObject`) — info on the match\n * @returns {Array | 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`, replace with those nodes\n *\n * @typedef {[RegExp, ReplaceFunction]} Pair\n * Normalized find and replace.\n *\n * @typedef {Array} 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 {import('unist-util-visit-parents').BuildVisitor} */\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 | 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\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} */\n const siblings = parent.children\n const index = siblings.indexOf(node)\n let change = false\n /** @type {Array} */\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","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 * @typedef {import('mdast').Link} Link\n * @typedef {import('mdast').PhrasingContent} PhrasingContent\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-from-markdown').Transform} FromMarkdownTransform\n *\n * @typedef {import('mdast-util-to-markdown').ConstructName} ConstructName\n * @typedef {import('mdast-util-to-markdown').Options} ToMarkdownExtension\n *\n * @typedef {import('mdast-util-find-and-replace').RegExpMatchObject} RegExpMatchObject\n * @typedef {import('mdast-util-find-and-replace').ReplaceFunction} ReplaceFunction\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} */\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 [/([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)/g, 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 | 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 (!email || code !== 47)\n )\n}\n","/**\n * @typedef {import('mdast').FootnoteDefinition} FootnoteDefinition\n * @typedef {import('mdast').FootnoteReference} FootnoteReference\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').Handle} ToMarkdownHandle\n * @typedef {import('mdast-util-to-markdown').Map} Map\n * @typedef {import('mdast-util-to-markdown').Options} ToMarkdownExtension\n */\n\nimport {ok as assert} from 'devlop'\nimport {normalizeIdentifier} from 'micromark-util-normalize-identifier'\n\nfootnoteReference.peek = footnoteReferencePeek\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 gfmFootnoteDefinition: enterFootnoteDefinition,\n gfmFootnoteDefinitionLabelString: enterFootnoteDefinitionLabelString,\n gfmFootnoteCall: enterFootnoteCall,\n gfmFootnoteCallString: enterFootnoteCallString\n },\n exit: {\n gfmFootnoteDefinition: exitFootnoteDefinition,\n gfmFootnoteDefinitionLabelString: exitFootnoteDefinitionLabelString,\n gfmFootnoteCall: exitFootnoteCall,\n gfmFootnoteCallString: exitFootnoteCallString\n }\n }\n}\n\n/**\n * Create an extension for `mdast-util-to-markdown` to enable GFM footnotes\n * in markdown.\n *\n * @returns {ToMarkdownExtension}\n * Extension for `mdast-util-to-markdown`.\n */\nexport function gfmFootnoteToMarkdown() {\n return {\n // This is on by default already.\n unsafe: [{character: '[', inConstruct: ['phrasing', 'label', 'reference']}],\n handlers: {footnoteDefinition, footnoteReference}\n }\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 enterFootnoteDefinitionLabelString() {\n this.buffer()\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.label = label\n node.identifier = normalizeIdentifier(\n this.sliceSerialize(token)\n ).toLowerCase()\n}\n\n/**\n * @this {CompileContext}\n * @type {FromMarkdownHandle}\n */\nfunction exitFootnoteDefinition(token) {\n this.exit(token)\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 enterFootnoteCallString() {\n this.buffer()\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.label = label\n node.identifier = normalizeIdentifier(\n this.sliceSerialize(token)\n ).toLowerCase()\n}\n\n/**\n * @this {CompileContext}\n * @type {FromMarkdownHandle}\n */\nfunction exitFootnoteCall(token) {\n this.exit(token)\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), {\n ...tracker.current(),\n before: value,\n after: ']'\n })\n )\n subexit()\n exit()\n value += tracker.move(']')\n return value\n}\n\n/** @type {ToMarkdownHandle} */\nfunction footnoteReferencePeek() {\n return '['\n}\n\n/**\n * @type {ToMarkdownHandle}\n * @param {FootnoteDefinition} node\n */\nfunction 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), {\n ...tracker.current(),\n before: value,\n after: ']'\n })\n )\n subexit()\n value += tracker.move(\n ']:' + (node.children && node.children.length > 0 ? ' ' : '')\n )\n tracker.shift(4)\n value += tracker.move(\n state.indentLines(state.containerFlow(node, tracker.current()), map)\n )\n exit()\n\n return value\n}\n\n/** @type {Map} */\nfunction map(line, index, blank) {\n if (index === 0) {\n return line\n }\n\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: \n *\n * @type {Array}\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","/**\n * @typedef Options\n * Configuration (optional).\n * @property {string|null|ReadonlyArray} [align]\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} [padding=true]\n * Whether to add a space of padding between delimiters and cells.\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 {boolean} [delimiterStart=true]\n * Whether to begin each row with the delimiter.\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} [delimiterEnd=true]\n * Whether to end each row with the delimiter.\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} [alignDelimiters=true]\n * Whether to align the delimiters.\n * By default, they are aligned:\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 {(value: string) => number} [stringLength]\n * Function to detect the length of table cell content.\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, which receives the cell content\n * 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 * @typedef {Options} MarkdownTableOptions\n * @todo\n * Remove next major.\n */\n\n/**\n * Generate a markdown ([GFM](https://docs.github.com/en/github/writing-on-github/working-with-advanced-formatting/organizing-information-with-tables)) table..\n *\n * @param {ReadonlyArray>} table\n * Table data (matrix of strings).\n * @param {Options} [options]\n * Configuration (optional).\n * @returns {string}\n */\nexport function markdownTable(table, options = {}) {\n const align = (options.align || []).concat()\n const stringLength = options.stringLength || defaultStringLength\n /** @type {Array} Character codes as symbols for alignment per column. */\n const alignments = []\n /** @type {Array>} Cells per row. */\n const cellMatrix = []\n /** @type {Array>} Sizes of each cell per row. */\n const sizeMatrix = []\n /** @type {Array} */\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} */\n const row = []\n /** @type {Array} */\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 (options.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} */\n const row = []\n /** @type {Array} */\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 options.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 (options.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} */\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} */\n const line = []\n\n while (++columnIndex < mostCellsPerRow) {\n const cell = row[columnIndex] || ''\n let before = ''\n let after = ''\n\n if (options.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 (options.delimiterStart !== false && !columnIndex) {\n line.push('|')\n }\n\n if (\n options.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 !(options.alignDelimiters === false && cell === '') &&\n (options.delimiterStart !== false || columnIndex)\n ) {\n line.push(' ')\n }\n\n if (options.alignDelimiters !== false) {\n line.push(before)\n }\n\n line.push(cell)\n\n if (options.alignDelimiters !== false) {\n line.push(after)\n }\n\n if (options.padding !== false) {\n line.push(' ')\n }\n\n if (\n options.delimiterEnd !== false ||\n columnIndex !== mostCellsPerRow - 1\n ) {\n line.push('|')\n }\n }\n\n lines.push(\n options.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 * @returns {string}\n */\nfunction serialize(value) {\n return value === null || value === undefined ? '' : String(value)\n}\n\n/**\n * @param {string} value\n * @returns {number}\n */\nfunction defaultStringLength(value) {\n return value.length\n}\n\n/**\n * @param {string|null|undefined} value\n * @returns {number}\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 * @typedef {import('mdast').Blockquote} Blockquote\n * @typedef {import('mdast').Parents} Parents\n * @typedef {import('../types.js').Info} Info\n * @typedef {import('../types.js').Map} Map\n * @typedef {import('../types.js').State} State\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 * @typedef {import('../types.js').ConstructName} ConstructName\n * @typedef {import('../types.js').Unsafe} Unsafe\n */\n\n/**\n * @param {Array} 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} 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 * @typedef {import('mdast').Break} Break\n * @typedef {import('mdast').Parents} Parents\n * @typedef {import('../types.js').Info} Info\n * @typedef {import('../types.js').State} State\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 * @typedef {import('mdast').Code} Code\n * @typedef {import('mdast').Parents} Parents\n * @typedef {import('../types.js').Info} Info\n * @typedef {import('../types.js').Map} Map\n * @typedef {import('../types.js').State} State\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 * @typedef {import('../types.js').Options} Options\n * @typedef {import('../types.js').State} State\n */\n\n/**\n * @param {State} state\n * @returns {Exclude}\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 * @typedef {import('mdast').Emphasis} Emphasis\n * @typedef {import('mdast').Parents} Parents\n * @typedef {import('../types.js').Info} Info\n * @typedef {import('../types.js').State} State\n */\n\nimport {checkEmphasis} from '../util/check-emphasis.js'\n\nemphasis.peek = emphasisPeek\n\n// To do: there are cases where emphasis cannot “form” depending on the\n// previous or next character of sequences.\n// There’s no way around that though, except for injecting zero-width stuff.\n// Do we need to safeguard against that?\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 let value = tracker.move(marker)\n value += tracker.move(\n state.containerPhrasing(node, {\n before: value,\n after: marker,\n ...tracker.current()\n })\n )\n value += tracker.move(marker)\n exit()\n return value\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 * @typedef {import('../types.js').Options} Options\n * @typedef {import('../types.js').State} State\n */\n\n/**\n * @param {State} state\n * @returns {Exclude}\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 * @typedef {import('mdast').Html} Html\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 * @typedef {import('mdast').Image} Image\n * @typedef {import('mdast').Parents} Parents\n * @typedef {import('../types.js').Info} Info\n * @typedef {import('../types.js').State} State\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 * @typedef {import('mdast').ImageReference} ImageReference\n * @typedef {import('mdast').Parents} Parents\n * @typedef {import('../types.js').Info} Info\n * @typedef {import('../types.js').State} State\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 * @typedef {import('mdast').InlineCode} InlineCode\n * @typedef {import('mdast').Parents} Parents\n * @typedef {import('../types.js').State} State\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 * @typedef {import('mdast').Link} Link\n * @typedef {import('../types.js').State} State\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 * @typedef {import('mdast').Link} Link\n * @typedef {import('mdast').Parents} Parents\n * @typedef {import('../types.js').Exit} Exit\n * @typedef {import('../types.js').Info} Info\n * @typedef {import('../types.js').State} State\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 * @typedef {import('mdast').LinkReference} LinkReference\n * @typedef {import('mdast').Parents} Parents\n * @typedef {import('../types.js').Info} Info\n * @typedef {import('../types.js').State} State\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 * @typedef {import('../types.js').Options} Options\n * @typedef {import('../types.js').State} State\n */\n\n/**\n * @param {State} state\n * @returns {Exclude}\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 * @typedef {import('../types.js').Options} Options\n * @typedef {import('../types.js').State} State\n */\n\n/**\n * @param {State} state\n * @returns {Exclude}\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 * @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} */\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 * @typedef {import('mdast').Parents} Parents\n * @typedef {import('mdast').Strong} Strong\n * @typedef {import('../types.js').Info} Info\n * @typedef {import('../types.js').State} State\n */\n\nimport {checkStrong} from '../util/check-strong.js'\n\nstrong.peek = strongPeek\n\n// To do: there are cases where emphasis cannot “form” depending on the\n// previous or next character of sequences.\n// There’s no way around that though, except for injecting zero-width stuff.\n// Do we need to safeguard against that?\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 let value = tracker.move(marker + marker)\n value += tracker.move(\n state.containerPhrasing(node, {\n before: value,\n after: marker,\n ...tracker.current()\n })\n )\n value += tracker.move(marker + marker)\n exit()\n return value\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 * @typedef {import('../types.js').Options} Options\n * @typedef {import('../types.js').State} State\n */\n\n/**\n * @param {State} state\n * @returns {Exclude}\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","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 * @typedef {import('../types.js').Options} Options\n * @typedef {import('../types.js').State} State\n */\n\n/**\n * @param {State} state\n * @returns {Exclude}\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 * @typedef {import('mdast').Code} Code\n * @typedef {import('../types.js').State} State\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 * 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 * @typedef {import('mdast').Definition} Definition\n * @typedef {import('mdast').Parents} Parents\n * @typedef {import('../types.js').Info} Info\n * @typedef {import('../types.js').State} State\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 * @typedef {import('mdast').Heading} Heading\n * @typedef {import('mdast').Parents} Parents\n * @typedef {import('../types.js').Info} Info\n * @typedef {import('../types.js').State} State\n */\n\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 =\n '&#x' +\n value.charCodeAt(0).toString(16).toUpperCase() +\n ';' +\n 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 * @typedef {import('mdast').Heading} Heading\n * @typedef {import('../types.js').State} State\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 * @typedef {import('mdast').List} List\n * @typedef {import('mdast').Parents} Parents\n * @typedef {import('../types.js').Info} Info\n * @typedef {import('../types.js').State} State\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 * @typedef {import('../types.js').Options} Options\n * @typedef {import('../types.js').State} State\n */\n\n/**\n * @param {State} state\n * @returns {Exclude}\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 * @typedef {import('../types.js').Options} Options\n * @typedef {import('../types.js').State} State\n */\n\nimport {checkBullet} from './check-bullet.js'\n\n/**\n * @param {State} state\n * @returns {Exclude}\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 * @typedef {import('mdast').ListItem} ListItem\n * @typedef {import('mdast').Parents} Parents\n * @typedef {import('../types.js').Info} Info\n * @typedef {import('../types.js').Map} Map\n * @typedef {import('../types.js').State} State\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 * @typedef {import('../types.js').Options} Options\n * @typedef {import('../types.js').State} State\n */\n\n/**\n * @param {State} state\n * @returns {Exclude}\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 * @typedef {import('mdast').Paragraph} Paragraph\n * @typedef {import('mdast').Parents} Parents\n * @typedef {import('../types.js').Info} Info\n * @typedef {import('../types.js').State} State\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').Parents} Parents\n * @typedef {import('mdast').Root} Root\n * @typedef {import('../types.js').Info} Info\n * @typedef {import('../types.js').State} State\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 const fn = hasPhrasing ? state.containerPhrasing : state.containerFlow\n return fn.call(state, node, info)\n}\n","/**\n * @typedef {import('mdast').Parents} Parents\n * @typedef {import('mdast').Text} Text\n * @typedef {import('../types.js').Info} Info\n * @typedef {import('../types.js').State} State\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 * @typedef {import('mdast').Parents} Parents\n * @typedef {import('mdast').ThematicBreak} ThematicBreak\n * @typedef {import('../types.js').State} State\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","/**\n * @typedef {import('../types.js').Options} Options\n * @typedef {import('../types.js').State} State\n */\n\n/**\n * @param {State} state\n * @returns {Exclude}\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 * @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 // \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>} matrix\n * @param {Array | 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>} */\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} */\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 {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: \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: .\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: .\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 // \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 // .\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 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 * .\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 * .\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: .\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} 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 {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} */\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 * > \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 {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} */\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 {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]} 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}\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} 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} 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} 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} */\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>} */\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]);\n events.length = 0;\n let slice = vecs.pop();\n while (slice) {\n events.push(...slice);\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} 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} events\n// * @param {Array} 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>} events\n * List of events.\n * @param {number} index\n * Table enter event.\n * @returns {Array}\n * List of aligns.\n */\nexport function gfmTableAlign(events, index) {\n let inDelimiterRow = false;\n /** @type {Array} */\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} context\n * @param {Readonly} 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} map\n * @param {Readonly} context\n * @param {number} index\n * @param {Token} table\n * @param {Token | undefined} tableBody\n */\n// eslint-disable-next-line max-params\nfunction flushTableEnd(map, context, index, table, tableBody) {\n /** @type {Array} */\n const exits = [];\n const related = getPoint(context.events, index);\n if (tableBody) {\n tableBody.end = Object.assign({}, related);\n exits.push(['exit', tableBody, context]);\n }\n table.end = Object.assign({}, related);\n exits.push(['exit', table, context]);\n map.add(index + 1, 0, exits);\n}\n\n/**\n * @param {Readonly>} events\n * @param {number} index\n * @returns {Readonly}\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 * @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/// \n\n/**\n * @typedef {import('mdast').Root} Root\n * @typedef {import('mdast-util-gfm').Options} MdastOptions\n * @typedef {import('micromark-extension-gfm').Options} MicromarkOptions\n * @typedef {import('unified').Processor} Processor\n */\n\n/**\n * @typedef {MicromarkOptions & MdastOptions} Options\n * Configuration.\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} */ (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","/**\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 * @typedef {import('mdast-util-from-markdown').Extension} FromMarkdownExtension\n * @typedef {import('mdast-util-to-markdown').Options} ToMarkdownExtension\n */\n\n/**\n * @typedef {import('mdast-util-gfm-table').Options} Options\n * Configuration.\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}\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.\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(),\n gfmStrikethroughToMarkdown(),\n gfmTableToMarkdown(options),\n gfmTaskListItemToMarkdown()\n ]\n }\n}\n","import { visit } from 'unist-util-visit';\nimport type { Plugin } from 'unified';\nimport type { Root, PhrasingContent } from \"mdast\";\n\nconst alertRegex = /^\\[!(NOTE|TIP|IMPORTANT|WARNING|CAUTION)\\]/i;\nconst alertLegacyRegex = /^\\[!(NOTE|TIP|IMPORTANT|WARNING|CAUTION)(\\/.*)?\\]/i;\n\ntype Option = {\n /**\n * Use the legacy title format, which includes a slash and a title after the alert type.\n * \n * Enabling legacyTitle allows modifying the title, but this is not GitHub standard.\n */\n legacyTitle?: boolean\n}\n\n/**\n * Alerts are a Markdown extension based on the blockquote syntax that you can use to emphasize critical information.\n * On GitHub, they are displayed with distinctive colors and icons to indicate the significance of the content.\n * https://docs.github.com/en/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax#alerts\n */\nexport const remarkAlert: Plugin<[Option?], Root> = ({ legacyTitle = false } = {}) => {\n return (tree) => {\n visit(tree, \"blockquote\", (node, index, parent) => {\n let alertType = '';\n let title = '';\n let isNext = true;\n let child = node.children.map((item) => {\n if (isNext && item.type === \"paragraph\") {\n const firstNode = item.children[0];\n const text = firstNode.type === 'text' ? firstNode.value : '';\n const reg = legacyTitle ? alertLegacyRegex : alertRegex;\n const match = text.match(reg);\n if (match) {\n isNext = false;\n alertType = match[1].toLocaleLowerCase();\n title = legacyTitle ? match[2] || alertType.toLocaleUpperCase() : alertType.toLocaleUpperCase();\n if (text.includes('\\n')) {\n item.children[0] = {\n type: 'text',\n value: text.replace(reg, '').replace(/^\\n+/, ''),\n };\n }\n\n if (!text.includes('\\n')) {\n const itemChild: Array = [];\n item.children.forEach((item, idx) => {\n if (idx == 0) return;\n if (idx == 1 && item.type === 'break') {\n return;\n }\n itemChild.push(item);\n });\n item.children = [...itemChild];\n }\n }\n }\n return item;\n })\n\n if (!!alertType) {\n node.data = {\n hName: \"div\",\n hProperties: {\n class: `markdown-alert markdown-alert-${alertType}`,\n dir: 'auto'\n },\n }\n child.unshift({\n type: \"paragraph\",\n children: [\n getAlertIcon(alertType as IconType),\n {\n type: \"text\",\n value: title.replace(/^\\//, ''),\n }\n ],\n data: {\n hProperties: {\n class: \"markdown-alert-title\",\n dir: \"auto\"\n }\n }\n })\n }\n node.children = [...child];\n });\n };\n};\n\nexport function getAlertIcon(type: IconType): PhrasingContent {\n let pathD = pathData[type] ?? '';\n return {\n type: \"emphasis\",\n data: {\n hName: \"svg\",\n hProperties: {\n class: \"octicon\",\n viewBox: '0 0 16 16',\n width: '16',\n height: '16',\n ariaHidden: 'true',\n },\n },\n children: [\n {\n type: \"emphasis\",\n data: {\n hName: \"path\",\n hProperties: {\n d: pathD\n }\n },\n children: []\n }\n ]\n }\n}\n\ntype IconType = 'note' | 'tip' | 'important' | 'warning' | 'caution';\n\nconst pathData: Record = {\n note: 'M0 8a8 8 0 1 1 16 0A8 8 0 0 1 0 8Zm8-6.5a6.5 6.5 0 1 0 0 13 6.5 6.5 0 0 0 0-13ZM6.5 7.75A.75.75 0 0 1 7.25 7h1a.75.75 0 0 1 .75.75v2.75h.25a.75.75 0 0 1 0 1.5h-2a.75.75 0 0 1 0-1.5h.25v-2h-.25a.75.75 0 0 1-.75-.75ZM8 6a1 1 0 1 1 0-2 1 1 0 0 1 0 2Z',\n tip: 'M8 1.5c-2.363 0-4 1.69-4 3.75 0 .984.424 1.625.984 2.304l.214.253c.223.264.47.556.673.848.284.411.537.896.621 1.49a.75.75 0 0 1-1.484.211c-.04-.282-.163-.547-.37-.847a8.456 8.456 0 0 0-.542-.68c-.084-.1-.173-.205-.268-.32C3.201 7.75 2.5 6.766 2.5 5.25 2.5 2.31 4.863 0 8 0s5.5 2.31 5.5 5.25c0 1.516-.701 2.5-1.328 3.259-.095.115-.184.22-.268.319-.207.245-.383.453-.541.681-.208.3-.33.565-.37.847a.751.751 0 0 1-1.485-.212c.084-.593.337-1.078.621-1.489.203-.292.45-.584.673-.848.075-.088.147-.173.213-.253.561-.679.985-1.32.985-2.304 0-2.06-1.637-3.75-4-3.75ZM5.75 12h4.5a.75.75 0 0 1 0 1.5h-4.5a.75.75 0 0 1 0-1.5ZM6 15.25a.75.75 0 0 1 .75-.75h2.5a.75.75 0 0 1 0 1.5h-2.5a.75.75 0 0 1-.75-.75Z',\n important:\n 'M0 1.75C0 .784.784 0 1.75 0h12.5C15.216 0 16 .784 16 1.75v9.5A1.75 1.75 0 0 1 14.25 13H8.06l-2.573 2.573A1.458 1.458 0 0 1 3 14.543V13H1.75A1.75 1.75 0 0 1 0 11.25Zm1.75-.25a.25.25 0 0 0-.25.25v9.5c0 .138.112.25.25.25h2a.75.75 0 0 1 .75.75v2.19l2.72-2.72a.749.749 0 0 1 .53-.22h6.5a.25.25 0 0 0 .25-.25v-9.5a.25.25 0 0 0-.25-.25Zm7 2.25v2.5a.75.75 0 0 1-1.5 0v-2.5a.75.75 0 0 1 1.5 0ZM9 9a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z',\n warning:\n 'M6.457 1.047c.659-1.234 2.427-1.234 3.086 0l6.082 11.378A1.75 1.75 0 0 1 14.082 15H1.918a1.75 1.75 0 0 1-1.543-2.575Zm1.763.707a.25.25 0 0 0-.44 0L1.698 13.132a.25.25 0 0 0 .22.368h12.164a.25.25 0 0 0 .22-.368Zm.53 3.996v2.5a.75.75 0 0 1-1.5 0v-2.5a.75.75 0 0 1 1.5 0ZM9 11a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z',\n caution:\n 'M4.47.22A.749.749 0 0 1 5 0h6c.199 0 .389.079.53.22l4.25 4.25c.141.14.22.331.22.53v6a.749.749 0 0 1-.22.53l-4.25 4.25A.749.749 0 0 1 11 16H5a.749.749 0 0 1-.53-.22L.22 11.53A.749.749 0 0 1 0 11V5c0-.199.079-.389.22-.53Zm.84 1.28L1.5 5.31v5.38l3.81 3.81h5.38l3.81-3.81V5.31L10.69 1.5ZM8 4a.75.75 0 0 1 .75.75v3.5a.75.75 0 0 1-1.5 0v-3.5A.75.75 0 0 1 8 4Zm0 8a1 1 0 1 1 0-2 1 1 0 0 1 0 2Z',\n};\n","import copyTextToClipboard from '@uiw/copy-to-clipboard';\nimport { useEffect } from 'react';\nfunction getParentElement(target) {\n if (!target) return null;\n var dom = target;\n if (dom.dataset.code && dom.classList.contains('copied')) {\n return dom;\n }\n if (dom.parentElement) {\n return getParentElement(dom.parentElement);\n }\n return null;\n}\nexport function useCopied(container) {\n var handle = event => {\n var target = getParentElement(event.target);\n if (!target) return;\n target.classList.add('active');\n copyTextToClipboard(target.dataset.code, function () {\n setTimeout(() => {\n target.classList.remove('active');\n }, 2000);\n });\n };\n useEffect(() => {\n var _container$current, _container$current2;\n (_container$current = container.current) == null || _container$current.removeEventListener('click', handle, false);\n (_container$current2 = container.current) == null || _container$current2.addEventListener('click', handle, false);\n return () => {\n var _container$current3;\n (_container$current3 = container.current) == null || _container$current3.removeEventListener('click', handle, false);\n };\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [container]);\n}","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/objectWithoutPropertiesLoose\";\nvar _excluded = [\"prefixCls\", \"className\", \"source\", \"style\", \"disableCopy\", \"skipHtml\", \"onScroll\", \"onMouseOver\", \"pluginsFilter\", \"rehypeRewrite\", \"wrapperElement\", \"warpperElement\", \"urlTransform\"];\nimport React, { useImperativeHandle } from 'react';\nimport ReactMarkdown from 'react-markdown';\nimport gfm from 'remark-gfm';\nimport raw from 'rehype-raw';\nimport { remarkAlert } from 'remark-github-blockquote-alert';\nimport { useCopied } from './plugins/useCopied';\nimport \"./styles/markdown.css\";\n\n/**\n * https://github.com/uiwjs/react-md-editor/issues/607\n */\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nvar defaultUrlTransform = url => url;\nexport default /*#__PURE__*/React.forwardRef((props, ref) => {\n var {\n prefixCls = 'wmde-markdown wmde-markdown-color',\n className,\n source,\n style,\n disableCopy = false,\n skipHtml = true,\n onScroll,\n onMouseOver,\n pluginsFilter,\n wrapperElement = {},\n warpperElement = {},\n urlTransform\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n var mdp = React.useRef(null);\n useImperativeHandle(ref, () => _extends({}, props, {\n mdp\n }), [mdp, props]);\n var cls = (prefixCls || '') + \" \" + (className || '');\n useCopied(mdp);\n var rehypePlugins = [...(other.rehypePlugins || [])];\n var customProps = {\n allowElement: (element, index, parent) => {\n if (other.allowElement) {\n return other.allowElement(element, index, parent);\n }\n return /^[A-Za-z0-9]+$/.test(element.tagName);\n }\n };\n if (skipHtml) {\n rehypePlugins.push(raw);\n }\n var remarkPlugins = [remarkAlert, ...(other.remarkPlugins || []), gfm];\n var wrapperProps = _extends({}, warpperElement, wrapperElement);\n return /*#__PURE__*/_jsx(\"div\", _extends({\n ref: mdp,\n onScroll: onScroll,\n onMouseOver: onMouseOver\n }, wrapperProps, {\n className: cls,\n style: style,\n children: /*#__PURE__*/_jsx(ReactMarkdown, _extends({}, customProps, other, {\n skipHtml: skipHtml,\n urlTransform: urlTransform || defaultUrlTransform,\n rehypePlugins: pluginsFilter ? pluginsFilter('rehype', rehypePlugins) : rehypePlugins,\n remarkPlugins: pluginsFilter ? pluginsFilter('remark', remarkPlugins) : remarkPlugins,\n children: source || ''\n }))\n }));\n});","import _extends from \"@babel/runtime/helpers/extends\";\nimport { visit } from 'unist-util-visit';\nexport var reservedMeta = function reservedMeta(options) {\n if (options === void 0) {\n options = {};\n }\n return tree => {\n visit(tree, node => {\n if (node.type === 'element' && node.tagName === 'code' && node.data && node.data.meta) {\n node.properties = _extends({}, node.properties, {\n 'data-meta': String(node.data.meta)\n });\n }\n });\n };\n};","import { visit } from 'unist-util-visit';\nexport var retrieveMeta = function retrieveMeta(options) {\n if (options === void 0) {\n options = {};\n }\n return tree => {\n visit(tree, node => {\n if (node.type === 'element' && node.tagName === 'code' && node.properties && node.properties['dataMeta']) {\n if (!node.data) {\n node.data = {};\n }\n var metaString = node.properties['dataMeta'];\n if (typeof metaString === 'string') {\n node.data.meta = metaString;\n }\n delete node.properties['dataMeta'];\n }\n });\n };\n};","// This module is generated by `script/`.\n/* eslint-disable no-control-regex, no-misleading-character-class, no-useless-escape */\nexport const regex = /[\\0-\\x1F!-,\\.\\/:-@\\[-\\^`\\{-\\xA9\\xAB-\\xB4\\xB6-\\xB9\\xBB-\\xBF\\xD7\\xF7\\u02C2-\\u02C5\\u02D2-\\u02DF\\u02E5-\\u02EB\\u02ED\\u02EF-\\u02FF\\u0375\\u0378\\u0379\\u037E\\u0380-\\u0385\\u0387\\u038B\\u038D\\u03A2\\u03F6\\u0482\\u0530\\u0557\\u0558\\u055A-\\u055F\\u0589-\\u0590\\u05BE\\u05C0\\u05C3\\u05C6\\u05C8-\\u05CF\\u05EB-\\u05EE\\u05F3-\\u060F\\u061B-\\u061F\\u066A-\\u066D\\u06D4\\u06DD\\u06DE\\u06E9\\u06FD\\u06FE\\u0700-\\u070F\\u074B\\u074C\\u07B2-\\u07BF\\u07F6-\\u07F9\\u07FB\\u07FC\\u07FE\\u07FF\\u082E-\\u083F\\u085C-\\u085F\\u086B-\\u089F\\u08B5\\u08C8-\\u08D2\\u08E2\\u0964\\u0965\\u0970\\u0984\\u098D\\u098E\\u0991\\u0992\\u09A9\\u09B1\\u09B3-\\u09B5\\u09BA\\u09BB\\u09C5\\u09C6\\u09C9\\u09CA\\u09CF-\\u09D6\\u09D8-\\u09DB\\u09DE\\u09E4\\u09E5\\u09F2-\\u09FB\\u09FD\\u09FF\\u0A00\\u0A04\\u0A0B-\\u0A0E\\u0A11\\u0A12\\u0A29\\u0A31\\u0A34\\u0A37\\u0A3A\\u0A3B\\u0A3D\\u0A43-\\u0A46\\u0A49\\u0A4A\\u0A4E-\\u0A50\\u0A52-\\u0A58\\u0A5D\\u0A5F-\\u0A65\\u0A76-\\u0A80\\u0A84\\u0A8E\\u0A92\\u0AA9\\u0AB1\\u0AB4\\u0ABA\\u0ABB\\u0AC6\\u0ACA\\u0ACE\\u0ACF\\u0AD1-\\u0ADF\\u0AE4\\u0AE5\\u0AF0-\\u0AF8\\u0B00\\u0B04\\u0B0D\\u0B0E\\u0B11\\u0B12\\u0B29\\u0B31\\u0B34\\u0B3A\\u0B3B\\u0B45\\u0B46\\u0B49\\u0B4A\\u0B4E-\\u0B54\\u0B58-\\u0B5B\\u0B5E\\u0B64\\u0B65\\u0B70\\u0B72-\\u0B81\\u0B84\\u0B8B-\\u0B8D\\u0B91\\u0B96-\\u0B98\\u0B9B\\u0B9D\\u0BA0-\\u0BA2\\u0BA5-\\u0BA7\\u0BAB-\\u0BAD\\u0BBA-\\u0BBD\\u0BC3-\\u0BC5\\u0BC9\\u0BCE\\u0BCF\\u0BD1-\\u0BD6\\u0BD8-\\u0BE5\\u0BF0-\\u0BFF\\u0C0D\\u0C11\\u0C29\\u0C3A-\\u0C3C\\u0C45\\u0C49\\u0C4E-\\u0C54\\u0C57\\u0C5B-\\u0C5F\\u0C64\\u0C65\\u0C70-\\u0C7F\\u0C84\\u0C8D\\u0C91\\u0CA9\\u0CB4\\u0CBA\\u0CBB\\u0CC5\\u0CC9\\u0CCE-\\u0CD4\\u0CD7-\\u0CDD\\u0CDF\\u0CE4\\u0CE5\\u0CF0\\u0CF3-\\u0CFF\\u0D0D\\u0D11\\u0D45\\u0D49\\u0D4F-\\u0D53\\u0D58-\\u0D5E\\u0D64\\u0D65\\u0D70-\\u0D79\\u0D80\\u0D84\\u0D97-\\u0D99\\u0DB2\\u0DBC\\u0DBE\\u0DBF\\u0DC7-\\u0DC9\\u0DCB-\\u0DCE\\u0DD5\\u0DD7\\u0DE0-\\u0DE5\\u0DF0\\u0DF1\\u0DF4-\\u0E00\\u0E3B-\\u0E3F\\u0E4F\\u0E5A-\\u0E80\\u0E83\\u0E85\\u0E8B\\u0EA4\\u0EA6\\u0EBE\\u0EBF\\u0EC5\\u0EC7\\u0ECE\\u0ECF\\u0EDA\\u0EDB\\u0EE0-\\u0EFF\\u0F01-\\u0F17\\u0F1A-\\u0F1F\\u0F2A-\\u0F34\\u0F36\\u0F38\\u0F3A-\\u0F3D\\u0F48\\u0F6D-\\u0F70\\u0F85\\u0F98\\u0FBD-\\u0FC5\\u0FC7-\\u0FFF\\u104A-\\u104F\\u109E\\u109F\\u10C6\\u10C8-\\u10CC\\u10CE\\u10CF\\u10FB\\u1249\\u124E\\u124F\\u1257\\u1259\\u125E\\u125F\\u1289\\u128E\\u128F\\u12B1\\u12B6\\u12B7\\u12BF\\u12C1\\u12C6\\u12C7\\u12D7\\u1311\\u1316\\u1317\\u135B\\u135C\\u1360-\\u137F\\u1390-\\u139F\\u13F6\\u13F7\\u13FE-\\u1400\\u166D\\u166E\\u1680\\u169B-\\u169F\\u16EB-\\u16ED\\u16F9-\\u16FF\\u170D\\u1715-\\u171F\\u1735-\\u173F\\u1754-\\u175F\\u176D\\u1771\\u1774-\\u177F\\u17D4-\\u17D6\\u17D8-\\u17DB\\u17DE\\u17DF\\u17EA-\\u180A\\u180E\\u180F\\u181A-\\u181F\\u1879-\\u187F\\u18AB-\\u18AF\\u18F6-\\u18FF\\u191F\\u192C-\\u192F\\u193C-\\u1945\\u196E\\u196F\\u1975-\\u197F\\u19AC-\\u19AF\\u19CA-\\u19CF\\u19DA-\\u19FF\\u1A1C-\\u1A1F\\u1A5F\\u1A7D\\u1A7E\\u1A8A-\\u1A8F\\u1A9A-\\u1AA6\\u1AA8-\\u1AAF\\u1AC1-\\u1AFF\\u1B4C-\\u1B4F\\u1B5A-\\u1B6A\\u1B74-\\u1B7F\\u1BF4-\\u1BFF\\u1C38-\\u1C3F\\u1C4A-\\u1C4C\\u1C7E\\u1C7F\\u1C89-\\u1C8F\\u1CBB\\u1CBC\\u1CC0-\\u1CCF\\u1CD3\\u1CFB-\\u1CFF\\u1DFA\\u1F16\\u1F17\\u1F1E\\u1F1F\\u1F46\\u1F47\\u1F4E\\u1F4F\\u1F58\\u1F5A\\u1F5C\\u1F5E\\u1F7E\\u1F7F\\u1FB5\\u1FBD\\u1FBF-\\u1FC1\\u1FC5\\u1FCD-\\u1FCF\\u1FD4\\u1FD5\\u1FDC-\\u1FDF\\u1FED-\\u1FF1\\u1FF5\\u1FFD-\\u203E\\u2041-\\u2053\\u2055-\\u2070\\u2072-\\u207E\\u2080-\\u208F\\u209D-\\u20CF\\u20F1-\\u2101\\u2103-\\u2106\\u2108\\u2109\\u2114\\u2116-\\u2118\\u211E-\\u2123\\u2125\\u2127\\u2129\\u212E\\u213A\\u213B\\u2140-\\u2144\\u214A-\\u214D\\u214F-\\u215F\\u2189-\\u24B5\\u24EA-\\u2BFF\\u2C2F\\u2C5F\\u2CE5-\\u2CEA\\u2CF4-\\u2CFF\\u2D26\\u2D28-\\u2D2C\\u2D2E\\u2D2F\\u2D68-\\u2D6E\\u2D70-\\u2D7E\\u2D97-\\u2D9F\\u2DA7\\u2DAF\\u2DB7\\u2DBF\\u2DC7\\u2DCF\\u2DD7\\u2DDF\\u2E00-\\u2E2E\\u2E30-\\u3004\\u3008-\\u3020\\u3030\\u3036\\u3037\\u303D-\\u3040\\u3097\\u3098\\u309B\\u309C\\u30A0\\u30FB\\u3100-\\u3104\\u3130\\u318F-\\u319F\\u31C0-\\u31EF\\u3200-\\u33FF\\u4DC0-\\u4DFF\\u9FFD-\\u9FFF\\uA48D-\\uA4CF\\uA4FE\\uA4FF\\uA60D-\\uA60F\\uA62C-\\uA63F\\uA673\\uA67E\\uA6F2-\\uA716\\uA720\\uA721\\uA789\\uA78A\\uA7C0\\uA7C1\\uA7CB-\\uA7F4\\uA828-\\uA82B\\uA82D-\\uA83F\\uA874-\\uA87F\\uA8C6-\\uA8CF\\uA8DA-\\uA8DF\\uA8F8-\\uA8FA\\uA8FC\\uA92E\\uA92F\\uA954-\\uA95F\\uA97D-\\uA97F\\uA9C1-\\uA9CE\\uA9DA-\\uA9DF\\uA9FF\\uAA37-\\uAA3F\\uAA4E\\uAA4F\\uAA5A-\\uAA5F\\uAA77-\\uAA79\\uAAC3-\\uAADA\\uAADE\\uAADF\\uAAF0\\uAAF1\\uAAF7-\\uAB00\\uAB07\\uAB08\\uAB0F\\uAB10\\uAB17-\\uAB1F\\uAB27\\uAB2F\\uAB5B\\uAB6A-\\uAB6F\\uABEB\\uABEE\\uABEF\\uABFA-\\uABFF\\uD7A4-\\uD7AF\\uD7C7-\\uD7CA\\uD7FC-\\uD7FF\\uE000-\\uF8FF\\uFA6E\\uFA6F\\uFADA-\\uFAFF\\uFB07-\\uFB12\\uFB18-\\uFB1C\\uFB29\\uFB37\\uFB3D\\uFB3F\\uFB42\\uFB45\\uFBB2-\\uFBD2\\uFD3E-\\uFD4F\\uFD90\\uFD91\\uFDC8-\\uFDEF\\uFDFC-\\uFDFF\\uFE10-\\uFE1F\\uFE30-\\uFE32\\uFE35-\\uFE4C\\uFE50-\\uFE6F\\uFE75\\uFEFD-\\uFF0F\\uFF1A-\\uFF20\\uFF3B-\\uFF3E\\uFF40\\uFF5B-\\uFF65\\uFFBF-\\uFFC1\\uFFC8\\uFFC9\\uFFD0\\uFFD1\\uFFD8\\uFFD9\\uFFDD-\\uFFFF]|\\uD800[\\uDC0C\\uDC27\\uDC3B\\uDC3E\\uDC4E\\uDC4F\\uDC5E-\\uDC7F\\uDCFB-\\uDD3F\\uDD75-\\uDDFC\\uDDFE-\\uDE7F\\uDE9D-\\uDE9F\\uDED1-\\uDEDF\\uDEE1-\\uDEFF\\uDF20-\\uDF2C\\uDF4B-\\uDF4F\\uDF7B-\\uDF7F\\uDF9E\\uDF9F\\uDFC4-\\uDFC7\\uDFD0\\uDFD6-\\uDFFF]|\\uD801[\\uDC9E\\uDC9F\\uDCAA-\\uDCAF\\uDCD4-\\uDCD7\\uDCFC-\\uDCFF\\uDD28-\\uDD2F\\uDD64-\\uDDFF\\uDF37-\\uDF3F\\uDF56-\\uDF5F\\uDF68-\\uDFFF]|\\uD802[\\uDC06\\uDC07\\uDC09\\uDC36\\uDC39-\\uDC3B\\uDC3D\\uDC3E\\uDC56-\\uDC5F\\uDC77-\\uDC7F\\uDC9F-\\uDCDF\\uDCF3\\uDCF6-\\uDCFF\\uDD16-\\uDD1F\\uDD3A-\\uDD7F\\uDDB8-\\uDDBD\\uDDC0-\\uDDFF\\uDE04\\uDE07-\\uDE0B\\uDE14\\uDE18\\uDE36\\uDE37\\uDE3B-\\uDE3E\\uDE40-\\uDE5F\\uDE7D-\\uDE7F\\uDE9D-\\uDEBF\\uDEC8\\uDEE7-\\uDEFF\\uDF36-\\uDF3F\\uDF56-\\uDF5F\\uDF73-\\uDF7F\\uDF92-\\uDFFF]|\\uD803[\\uDC49-\\uDC7F\\uDCB3-\\uDCBF\\uDCF3-\\uDCFF\\uDD28-\\uDD2F\\uDD3A-\\uDE7F\\uDEAA\\uDEAD-\\uDEAF\\uDEB2-\\uDEFF\\uDF1D-\\uDF26\\uDF28-\\uDF2F\\uDF51-\\uDFAF\\uDFC5-\\uDFDF\\uDFF7-\\uDFFF]|\\uD804[\\uDC47-\\uDC65\\uDC70-\\uDC7E\\uDCBB-\\uDCCF\\uDCE9-\\uDCEF\\uDCFA-\\uDCFF\\uDD35\\uDD40-\\uDD43\\uDD48-\\uDD4F\\uDD74\\uDD75\\uDD77-\\uDD7F\\uDDC5-\\uDDC8\\uDDCD\\uDDDB\\uDDDD-\\uDDFF\\uDE12\\uDE38-\\uDE3D\\uDE3F-\\uDE7F\\uDE87\\uDE89\\uDE8E\\uDE9E\\uDEA9-\\uDEAF\\uDEEB-\\uDEEF\\uDEFA-\\uDEFF\\uDF04\\uDF0D\\uDF0E\\uDF11\\uDF12\\uDF29\\uDF31\\uDF34\\uDF3A\\uDF45\\uDF46\\uDF49\\uDF4A\\uDF4E\\uDF4F\\uDF51-\\uDF56\\uDF58-\\uDF5C\\uDF64\\uDF65\\uDF6D-\\uDF6F\\uDF75-\\uDFFF]|\\uD805[\\uDC4B-\\uDC4F\\uDC5A-\\uDC5D\\uDC62-\\uDC7F\\uDCC6\\uDCC8-\\uDCCF\\uDCDA-\\uDD7F\\uDDB6\\uDDB7\\uDDC1-\\uDDD7\\uDDDE-\\uDDFF\\uDE41-\\uDE43\\uDE45-\\uDE4F\\uDE5A-\\uDE7F\\uDEB9-\\uDEBF\\uDECA-\\uDEFF\\uDF1B\\uDF1C\\uDF2C-\\uDF2F\\uDF3A-\\uDFFF]|\\uD806[\\uDC3B-\\uDC9F\\uDCEA-\\uDCFE\\uDD07\\uDD08\\uDD0A\\uDD0B\\uDD14\\uDD17\\uDD36\\uDD39\\uDD3A\\uDD44-\\uDD4F\\uDD5A-\\uDD9F\\uDDA8\\uDDA9\\uDDD8\\uDDD9\\uDDE2\\uDDE5-\\uDDFF\\uDE3F-\\uDE46\\uDE48-\\uDE4F\\uDE9A-\\uDE9C\\uDE9E-\\uDEBF\\uDEF9-\\uDFFF]|\\uD807[\\uDC09\\uDC37\\uDC41-\\uDC4F\\uDC5A-\\uDC71\\uDC90\\uDC91\\uDCA8\\uDCB7-\\uDCFF\\uDD07\\uDD0A\\uDD37-\\uDD39\\uDD3B\\uDD3E\\uDD48-\\uDD4F\\uDD5A-\\uDD5F\\uDD66\\uDD69\\uDD8F\\uDD92\\uDD99-\\uDD9F\\uDDAA-\\uDEDF\\uDEF7-\\uDFAF\\uDFB1-\\uDFFF]|\\uD808[\\uDF9A-\\uDFFF]|\\uD809[\\uDC6F-\\uDC7F\\uDD44-\\uDFFF]|[\\uD80A\\uD80B\\uD80E-\\uD810\\uD812-\\uD819\\uD824-\\uD82B\\uD82D\\uD82E\\uD830-\\uD833\\uD837\\uD839\\uD83D\\uD83F\\uD87B-\\uD87D\\uD87F\\uD885-\\uDB3F\\uDB41-\\uDBFF][\\uDC00-\\uDFFF]|\\uD80D[\\uDC2F-\\uDFFF]|\\uD811[\\uDE47-\\uDFFF]|\\uD81A[\\uDE39-\\uDE3F\\uDE5F\\uDE6A-\\uDECF\\uDEEE\\uDEEF\\uDEF5-\\uDEFF\\uDF37-\\uDF3F\\uDF44-\\uDF4F\\uDF5A-\\uDF62\\uDF78-\\uDF7C\\uDF90-\\uDFFF]|\\uD81B[\\uDC00-\\uDE3F\\uDE80-\\uDEFF\\uDF4B-\\uDF4E\\uDF88-\\uDF8E\\uDFA0-\\uDFDF\\uDFE2\\uDFE5-\\uDFEF\\uDFF2-\\uDFFF]|\\uD821[\\uDFF8-\\uDFFF]|\\uD823[\\uDCD6-\\uDCFF\\uDD09-\\uDFFF]|\\uD82C[\\uDD1F-\\uDD4F\\uDD53-\\uDD63\\uDD68-\\uDD6F\\uDEFC-\\uDFFF]|\\uD82F[\\uDC6B-\\uDC6F\\uDC7D-\\uDC7F\\uDC89-\\uDC8F\\uDC9A-\\uDC9C\\uDC9F-\\uDFFF]|\\uD834[\\uDC00-\\uDD64\\uDD6A-\\uDD6C\\uDD73-\\uDD7A\\uDD83\\uDD84\\uDD8C-\\uDDA9\\uDDAE-\\uDE41\\uDE45-\\uDFFF]|\\uD835[\\uDC55\\uDC9D\\uDCA0\\uDCA1\\uDCA3\\uDCA4\\uDCA7\\uDCA8\\uDCAD\\uDCBA\\uDCBC\\uDCC4\\uDD06\\uDD0B\\uDD0C\\uDD15\\uDD1D\\uDD3A\\uDD3F\\uDD45\\uDD47-\\uDD49\\uDD51\\uDEA6\\uDEA7\\uDEC1\\uDEDB\\uDEFB\\uDF15\\uDF35\\uDF4F\\uDF6F\\uDF89\\uDFA9\\uDFC3\\uDFCC\\uDFCD]|\\uD836[\\uDC00-\\uDDFF\\uDE37-\\uDE3A\\uDE6D-\\uDE74\\uDE76-\\uDE83\\uDE85-\\uDE9A\\uDEA0\\uDEB0-\\uDFFF]|\\uD838[\\uDC07\\uDC19\\uDC1A\\uDC22\\uDC25\\uDC2B-\\uDCFF\\uDD2D-\\uDD2F\\uDD3E\\uDD3F\\uDD4A-\\uDD4D\\uDD4F-\\uDEBF\\uDEFA-\\uDFFF]|\\uD83A[\\uDCC5-\\uDCCF\\uDCD7-\\uDCFF\\uDD4C-\\uDD4F\\uDD5A-\\uDFFF]|\\uD83B[\\uDC00-\\uDDFF\\uDE04\\uDE20\\uDE23\\uDE25\\uDE26\\uDE28\\uDE33\\uDE38\\uDE3A\\uDE3C-\\uDE41\\uDE43-\\uDE46\\uDE48\\uDE4A\\uDE4C\\uDE50\\uDE53\\uDE55\\uDE56\\uDE58\\uDE5A\\uDE5C\\uDE5E\\uDE60\\uDE63\\uDE65\\uDE66\\uDE6B\\uDE73\\uDE78\\uDE7D\\uDE7F\\uDE8A\\uDE9C-\\uDEA0\\uDEA4\\uDEAA\\uDEBC-\\uDFFF]|\\uD83C[\\uDC00-\\uDD2F\\uDD4A-\\uDD4F\\uDD6A-\\uDD6F\\uDD8A-\\uDFFF]|\\uD83E[\\uDC00-\\uDFEF\\uDFFA-\\uDFFF]|\\uD869[\\uDEDE-\\uDEFF]|\\uD86D[\\uDF35-\\uDF3F]|\\uD86E[\\uDC1E\\uDC1F]|\\uD873[\\uDEA2-\\uDEAF]|\\uD87A[\\uDFE1-\\uDFFF]|\\uD87E[\\uDE1E-\\uDFFF]|\\uD884[\\uDF4B-\\uDFFF]|\\uDB40[\\uDC00-\\uDCFF\\uDDF0-\\uDFFF]/g\n","import { regex } from './regex.js'\n\nconst own = Object.hasOwnProperty\n\n/**\n * Slugger.\n */\nexport default class BananaSlug {\n /**\n * Create a new slug class.\n */\n constructor () {\n /** @type {Record} */\n // eslint-disable-next-line no-unused-expressions\n this.occurrences\n\n this.reset()\n }\n\n /**\n * Generate a unique slug.\n *\n * Tracks previously generated slugs: repeated calls with the same value\n * will result in different slugs.\n * Use the `slug` function to get same slugs.\n *\n * @param {string} value\n * String of text to slugify\n * @param {boolean} [maintainCase=false]\n * Keep the current case, otherwise make all lowercase\n * @return {string}\n * A unique slug string\n */\n slug (value, maintainCase) {\n const self = this\n let result = slug(value, maintainCase === true)\n const originalSlug = result\n\n while (own.call(self.occurrences, result)) {\n self.occurrences[originalSlug]++\n result = originalSlug + '-' + self.occurrences[originalSlug]\n }\n\n self.occurrences[result] = 0\n\n return result\n }\n\n /**\n * Reset - Forget all previous slugs\n *\n * @return void\n */\n reset () {\n this.occurrences = Object.create(null)\n }\n}\n\n/**\n * Generate a slug.\n *\n * Does not track previously generated slugs: repeated calls with the same value\n * will result in the exact same slug.\n * Use the `GithubSlugger` class to get unique slugs.\n *\n * @param {string} value\n * String of text to slugify\n * @param {boolean} [maintainCase=false]\n * Keep the current case, otherwise make all lowercase\n * @return {string}\n * A unique slug string\n */\nexport function slug (value, maintainCase) {\n if (typeof value !== 'string') return ''\n if (!maintainCase) value = value.toLowerCase()\n return value.replace(regex, '').replace(/ /g, '-')\n}\n","/**\n * @typedef {import('hast').Nodes} Nodes\n */\n\n/**\n * Get the rank (`1` to `6`) of headings (`h1` to `h6`).\n *\n * @param {Nodes} node\n * Node to check.\n * @returns {number | undefined}\n * Rank of the heading or `undefined` if not a heading.\n */\nexport function headingRank(node) {\n const name = node.type === 'element' ? node.tagName.toLowerCase() : ''\n const code =\n name.length === 2 && name.charCodeAt(0) === 104 /* `h` */\n ? name.charCodeAt(1)\n : 0\n return code > 48 /* `0` */ && code < 55 /* `7` */\n ? code - 48 /* `0` */\n : undefined\n}\n","/**\n * @typedef {import('hast').Root} Root\n */\n\n/**\n * @typedef Options\n * Configuration (optional).\n * @property {string} [prefix='']\n * Prefix to add in front of `id`s (default: `''`).\n */\n\nimport GithubSlugger from 'github-slugger'\nimport {headingRank} from 'hast-util-heading-rank'\nimport {toString} from 'hast-util-to-string'\nimport {visit} from 'unist-util-visit'\n\n/** @type {Options} */\nconst emptyOptions = {}\nconst slugs = new GithubSlugger()\n\n/**\n * Add `id`s to headings.\n *\n * @param {Options | null | undefined} [options]\n * Configuration (optional).\n * @returns\n * Transform.\n */\nexport default function rehypeSlug(options) {\n const settings = options || emptyOptions\n const prefix = settings.prefix || ''\n\n /**\n * @param {Root} tree\n * Tree.\n * @returns {undefined}\n * Nothing.\n */\n return function (tree) {\n slugs.reset()\n\n visit(tree, 'element', function (node) {\n if (headingRank(node) && !node.properties.id) {\n node.properties.id = prefix + slugs.slug(toString(node))\n }\n })\n }\n}\n","/**\n * @typedef {import('hast').Element} Element\n * @typedef {import('hast').Parents} Parents\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 an element.\n * @param {unknown} this\n * Context object (`this`) to call `test` with\n * @param {unknown} [element]\n * Anything (typically a node).\n * @param {number | null | undefined} [index]\n * Position of `element` in its parent.\n * @param {Parents | null | undefined} [parent]\n * Parent of `element`.\n * @returns {boolean}\n * Whether this is an element and passes a test.\n *\n * @typedef {Array | TestFunction | string | null | undefined} Test\n * Check for an arbitrary element.\n *\n * * when `string`, checks that the element has that tag name\n * * when `function`, see `TestFunction`\n * * when `Array`, checks if one of the subtests pass\n *\n * @callback TestFunction\n * Check if an element passes a test.\n * @param {unknown} this\n * The given context.\n * @param {Element} element\n * An element.\n * @param {number | undefined} [index]\n * Position of `element` in its parent.\n * @param {Parents | undefined} [parent]\n * Parent of `element`.\n * @returns {boolean | undefined | void}\n * Whether this element passes the test.\n *\n * Note: `void` is included until TS sees no return as `undefined`.\n */\n\n/**\n * Check if `element` is an `Element` and whether it passes the given test.\n *\n * @param element\n * Thing to check, typically `element`.\n * @param test\n * Check for a specific element.\n * @param index\n * Position of `element` in its parent.\n * @param parent\n * Parent of `element`.\n * @param context\n * Context object (`this`) to call `test` with.\n * @returns\n * Whether `element` is an `Element` and passes a test.\n * @throws\n * When an incorrect `test`, `index`, or `parent` is given; there is no error\n * thrown when `element` is not a node or not an element.\n */\nexport const isElement =\n // Note: overloads in JSDoc can’t yet use different `@template`s.\n /**\n * @type {(\n * ((element: unknown, test: Condition, index?: number | null | undefined, parent?: Parents | null | undefined, context?: unknown) => element is Element & Predicate) &\n * ((element: unknown, test: Condition, index?: number | null | undefined, parent?: Parents | null | undefined, context?: unknown) => element is Element & {tagName: Condition}) &\n * ((element?: null | undefined) => false) &\n * ((element: unknown, test?: null | undefined, index?: number | null | undefined, parent?: Parents | null | undefined, context?: unknown) => element is Element) &\n * ((element: unknown, test?: Test, index?: number | null | undefined, parent?: Parents | null | undefined, context?: unknown) => boolean)\n * )}\n */\n (\n /**\n * @param {unknown} [element]\n * @param {Test | undefined} [test]\n * @param {number | null | undefined} [index]\n * @param {Parents | null | undefined} [parent]\n * @param {unknown} [context]\n * @returns {boolean}\n */\n // eslint-disable-next-line max-params\n function (element, test, index, parent, context) {\n const check = convertElement(test)\n\n if (\n index !== null &&\n index !== undefined &&\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 !== null &&\n parent !== undefined &&\n (!parent.type || !parent.children)\n ) {\n throw new Error('Expected valid `parent`')\n }\n\n if (\n (index === null || index === undefined) !==\n (parent === null || parent === undefined)\n ) {\n throw new Error('Expected both `index` and `parent`')\n }\n\n return looksLikeAnElement(element)\n ? check.call(context, element, index, parent)\n : false\n }\n )\n\n/**\n * Generate a check 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 * an `element`, `index`, and `parent`.\n *\n * @param test\n * A test for a specific element.\n * @returns\n * A check.\n */\nexport const convertElement =\n // Note: overloads in JSDoc can’t yet use different `@template`s.\n /**\n * @type {(\n * ((test: Condition) => (element: unknown, index?: number | null | undefined, parent?: Parents | null | undefined, context?: unknown) => element is Element & Predicate) &\n * ((test: Condition) => (element: unknown, index?: number | null | undefined, parent?: Parents | null | undefined, context?: unknown) => element is Element & {tagName: Condition}) &\n * ((test?: null | undefined) => (element?: unknown, index?: number | null | undefined, parent?: Parents | null | undefined, context?: unknown) => element is Element) &\n * ((test?: Test) => Check)\n * )}\n */\n (\n /**\n * @param {Test | null | undefined} [test]\n * @returns {Check}\n */\n function (test) {\n if (test === null || test === undefined) {\n return element\n }\n\n if (typeof test === 'string') {\n return tagNameFactory(test)\n }\n\n // Assume array.\n if (typeof test === 'object') {\n return anyFactory(test)\n }\n\n if (typeof test === 'function') {\n return castFactory(test)\n }\n\n throw new Error('Expected function, string, or array as `test`')\n }\n )\n\n/**\n * Handle multiple tests.\n *\n * @param {Array} tests\n * @returns {Check}\n */\nfunction anyFactory(tests) {\n /** @type {Array} */\n const checks = []\n let index = -1\n\n while (++index < tests.length) {\n checks[index] = convertElement(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 a string into a test for an element with a certain type.\n *\n * @param {string} check\n * @returns {Check}\n */\nfunction tagNameFactory(check) {\n return castFactory(tagName)\n\n /**\n * @param {Element} element\n * @returns {boolean}\n */\n function tagName(element) {\n return element.tagName === check\n }\n}\n\n/**\n * Turn a custom test into a test for an element 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 looksLikeAnElement(value) &&\n testFunction.call(\n this,\n value,\n typeof index === 'number' ? index : undefined,\n parent || undefined\n )\n )\n }\n}\n\n/**\n * Make sure something is an element.\n *\n * @param {unknown} element\n * @returns {element is Element}\n */\nfunction element(element) {\n return Boolean(\n element &&\n typeof element === 'object' &&\n 'type' in element &&\n element.type === 'element' &&\n 'tagName' in element &&\n typeof element.tagName === 'string'\n )\n}\n\n/**\n * @param {unknown} value\n * @returns {value is Element}\n */\nfunction looksLikeAnElement(value) {\n return (\n value !== null &&\n typeof value === 'object' &&\n 'type' in value &&\n 'tagName' in value\n )\n}\n","/**\n * @typedef {import('hast').Element} Element\n * @typedef {import('hast').ElementContent} ElementContent\n * @typedef {import('hast').Properties} Properties\n * @typedef {import('hast').Root} Root\n *\n * @typedef {import('hast-util-is-element').Test} Test\n */\n\n/**\n * @typedef {'after' | 'append' | 'before' | 'prepend' | 'wrap'} Behavior\n * Behavior.\n *\n * @callback Build\n * Generate content.\n * @param {Readonly} element\n * Current heading.\n * @returns {Array | ElementContent}\n * Content.\n *\n * @callback BuildProperties\n * Generate properties.\n * @param {Readonly} element\n * Current heading.\n * @returns {Properties}\n * Properties.\n *\n * @typedef Options\n * Configuration.\n * @property {Behavior | null | undefined} [behavior='prepend']\n * How to create links (default: `'prepend'`).\n * @property {Readonly | ReadonlyArray | Build | null | undefined} [content]\n * Content to insert in the link (default: if `'wrap'` then `undefined`,\n * otherwise ``);\n * if `behavior` is `'wrap'` and `Build` is passed, its result replaces the\n * existing content, otherwise the content is added after existing content.\n * @property {Readonly | ReadonlyArray | Build | null | undefined} [group]\n * Content to wrap the heading and link with, if `behavior` is `'after'` or\n * `'before'` (optional).\n * @property {Readonly | BuildProperties | null | undefined} [headingProperties]\n * Extra properties to set on the heading (optional).\n * @property {Readonly | BuildProperties | null | undefined} [properties]\n * Extra properties to set on the link when injecting (default:\n * `{ariaHidden: true, tabIndex: -1}` if `'append'` or `'prepend'`, otherwise\n * `undefined`).\n * @property {Test | null | undefined} [test]\n * Extra test for which headings are linked (optional).\n */\n\n/**\n * @template T\n * Kind.\n * @typedef {(\n * T extends Record\n * ? {-readonly [k in keyof T]: Cloneable}\n * : T\n * )} Cloneable\n * Deep clone.\n *\n * See: \n */\n\nimport structuredClone from '@ungap/structured-clone'\nimport {headingRank} from 'hast-util-heading-rank'\nimport {convertElement} from 'hast-util-is-element'\nimport {SKIP, visit} from 'unist-util-visit'\n\n/** @type {Element} */\nconst contentDefaults = {\n type: 'element',\n tagName: 'span',\n properties: {className: ['icon', 'icon-link']},\n children: []\n}\n\n/** @type {Options} */\nconst emptyOptions = {}\n\n/**\n * Add links from headings back to themselves.\n *\n * ###### Notes\n *\n * This plugin only applies to headings with `id`s.\n * Use `rehype-slug` to generate `id`s for headings that don’t have them.\n *\n * Several behaviors are supported:\n *\n * * `'prepend'` (default) — inject link before the heading text\n * * `'append'` — inject link after the heading text\n * * `'wrap'` — wrap the whole heading text with the link\n * * `'before'` — insert link before the heading\n * * `'after'` — insert link after the heading\n *\n * @param {Readonly | null | undefined} [options]\n * Configuration (optional).\n * @returns\n * Transform.\n */\nexport default function rehypeAutolinkHeadings(options) {\n const settings = options || emptyOptions\n let properties = settings.properties\n const headingOroperties = settings.headingProperties\n const behavior = settings.behavior || 'prepend'\n const content = settings.content\n const group = settings.group\n const is = convertElement(settings.test)\n\n /** @type {import('unist-util-visit').Visitor} */\n let method\n\n if (behavior === 'after' || behavior === 'before') {\n method = around\n } else if (behavior === 'wrap') {\n method = wrap\n } else {\n method = inject\n\n if (!properties) {\n properties = {ariaHidden: 'true', tabIndex: -1}\n }\n }\n\n /**\n * Transform.\n *\n * @param {Root} tree\n * Tree.\n * @returns {undefined}\n * Nothing.\n */\n return function (tree) {\n visit(tree, 'element', function (node, index, parent) {\n if (headingRank(node) && node.properties.id && is(node, index, parent)) {\n Object.assign(node.properties, toProperties(headingOroperties, node))\n return method(node, index, parent)\n }\n })\n }\n\n /** @type {import('unist-util-visit').Visitor} */\n function inject(node) {\n const children = toChildren(content || contentDefaults, node)\n node.children[behavior === 'prepend' ? 'unshift' : 'push'](\n create(node, toProperties(properties, node), children)\n )\n\n return [SKIP]\n }\n\n /** @type {import('unist-util-visit').Visitor} */\n function around(node, index, parent) {\n /* c8 ignore next -- uncommon */\n if (typeof index !== 'number' || !parent) return\n\n const children = toChildren(content || contentDefaults, node)\n const link = create(node, toProperties(properties, node), children)\n let nodes = behavior === 'before' ? [link, node] : [node, link]\n\n if (group) {\n const grouping = toNode(group, node)\n\n if (grouping && !Array.isArray(grouping) && grouping.type === 'element') {\n grouping.children = nodes\n nodes = [grouping]\n }\n }\n\n parent.children.splice(index, 1, ...nodes)\n\n return [SKIP, index + nodes.length]\n }\n\n /** @type {import('unist-util-visit').Visitor} */\n function wrap(node) {\n /** @type {Array} */\n let before = node.children\n /** @type {Array | ElementContent} */\n let after = []\n\n if (typeof content === 'function') {\n before = []\n after = content(node)\n } else if (content) {\n after = clone(content)\n }\n\n node.children = [\n create(\n node,\n toProperties(properties, node),\n Array.isArray(after) ? [...before, ...after] : [...before, after]\n )\n ]\n\n return [SKIP]\n }\n}\n\n/**\n * Deep clone.\n *\n * @template T\n * Kind.\n * @param {T} thing\n * Thing to clone.\n * @returns {Cloneable}\n * Cloned thing.\n */\nfunction clone(thing) {\n // Cast because it’s mutable now.\n return /** @type {Cloneable} */ (structuredClone(thing))\n}\n\n/**\n * Create an `a`.\n *\n * @param {Readonly} node\n * Related heading.\n * @param {Properties | undefined} properties\n * Properties to set on the link.\n * @param {Array} children\n * Content.\n * @returns {Element}\n * Link.\n */\nfunction create(node, properties, children) {\n return {\n type: 'element',\n tagName: 'a',\n properties: {...properties, href: '#' + node.properties.id},\n children\n }\n}\n\n/**\n * Turn into children.\n *\n * @param {Readonly | ReadonlyArray | Build} value\n * Content.\n * @param {Readonly} node\n * Related heading.\n * @returns {Array}\n * Children.\n */\nfunction toChildren(value, node) {\n const result = toNode(value, node)\n return Array.isArray(result) ? result : [result]\n}\n\n/**\n * Turn into a node.\n *\n * @param {Readonly | ReadonlyArray | Build} value\n * Content.\n * @param {Readonly} node\n * Related heading.\n * @returns {Array | ElementContent}\n * Node.\n */\nfunction toNode(value, node) {\n if (typeof value === 'function') return value(node)\n return clone(value)\n}\n\n/**\n * Turn into properties.\n *\n * @param {Readonly | BuildProperties | null | undefined} value\n * Properties.\n * @param {Readonly} node\n * Related heading.\n * @returns {Properties}\n * Properties.\n */\nfunction toProperties(value, node) {\n if (typeof value === 'function') return value(node)\n return value ? clone(value) : {}\n}\n","import type { Plugin, Pluggable } from 'unified';\nimport type { Root, RootContent, Literal } from 'hast';\nimport { visit } from 'unist-util-visit';\n\n/**\n * Raw string of HTML embedded into HTML AST.\n */\nexport interface Raw extends Literal {\n /**\n * Node type.\n */\n type: 'raw'\n}\n\n// Register nodes in content.\ndeclare module 'hast' {\n interface RootContentMap {\n /**\n * Raw string of HTML embedded into HTML AST.\n */\n raw: Raw\n }\n interface ElementContentMap {\n /**\n * Raw string of HTML embedded into HTML AST.\n */\n raw: Raw\n }\n}\n\n\nexport type RehypeIgnoreOptions = {\n /**\n * Character to use for opening delimiter, by default `rehype:ignore:start`\n */\n openDelimiter?: string;\n /**\n * Character to use for closing delimiter, by default `rehype:ignore:end`\n */\n closeDelimiter?: string;\n}\n\nconst rehypeIgnore: Plugin<[RehypeIgnoreOptions?], Root> = (options = {}) => {\n const { openDelimiter = 'rehype:ignore:start', closeDelimiter = 'rehype:ignore:end' } = options;\n return (tree) => {\n visit(tree, (node: Root | RootContent, index, parent) => {\n if (node.type === 'element' || node.type === 'root') {\n // const start = node.children.findIndex((item) => item.type === 'comment' && item.value === openDelimiter);\n // const end = node.children.findIndex((item) => item.type === 'comment' && item.value === closeDelimiter);\n // if (start > -1 && end > -1) {\n // node.children = node.children.filter((_, idx) => idx < start || idx > end);\n // }\n let start = false;\n node.children = node.children.filter((item) => {\n if (item.type === 'raw' || item.type === 'comment') {\n let str = (item.value || '').trim();\n str = str.replace(/^/, '$1')\n if (str === openDelimiter) {\n start = true;\n return false;\n }\n if (str === closeDelimiter) {\n start = false;\n return false;\n }\n }\n \n return !start;\n })\n }\n });\n }\n}\n\nexport default rehypeIgnore;\n","export var octiconLink = {\n type: 'element',\n tagName: 'svg',\n properties: {\n className: 'octicon octicon-link',\n viewBox: '0 0 16 16',\n version: '1.1',\n width: '16',\n height: '16',\n ariaHidden: 'true'\n },\n children: [{\n type: 'element',\n tagName: 'path',\n children: [],\n properties: {\n fillRule: 'evenodd',\n d: 'M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z'\n }\n }]\n};","import _extends from \"@babel/runtime/helpers/extends\";\nimport slug from 'rehype-slug';\nimport headings from 'rehype-autolink-headings';\nimport rehypeIgnore from 'rehype-ignore';\nimport { getCodeString } from 'rehype-rewrite';\nimport { octiconLink } from './nodes/octiconLink';\nimport { copyElement } from './nodes/copy';\nexport var rehypeRewriteHandle = (disableCopy, rewrite) => (node, index, parent) => {\n if (node.type === 'element' && parent && parent.type === 'root' && /h(1|2|3|4|5|6)/.test(node.tagName)) {\n var child = node.children && node.children[0];\n if (child && child.properties && child.properties.ariaHidden === 'true') {\n child.properties = _extends({\n class: 'anchor'\n }, child.properties);\n child.children = [octiconLink];\n }\n }\n if (node.type === 'element' && node.tagName === 'pre' && !disableCopy) {\n var code = getCodeString(node.children);\n node.children.push(copyElement(code));\n }\n rewrite && rewrite(node, index === null ? undefined : index, parent === null ? undefined : parent);\n};\nexport var defaultRehypePlugins = [slug, headings, rehypeIgnore];","import _extends from \"@babel/runtime/helpers/extends\";\nimport React from 'react';\nimport rehypePrism from 'rehype-prism-plus';\nimport rehypeRewrite from 'rehype-rewrite';\nimport rehypeAttrs from 'rehype-attr';\nimport rehypeRaw from 'rehype-raw';\nimport MarkdownPreview from './preview';\nimport { reservedMeta } from './plugins/reservedMeta';\nimport { retrieveMeta } from './plugins/retrieveMeta';\nimport { rehypeRewriteHandle, defaultRehypePlugins } from './rehypePlugins';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport * from './Props';\nexport default /*#__PURE__*/React.forwardRef((props, ref) => {\n var _props$disableCopy;\n var rehypePlugins = [reservedMeta, rehypeRaw, retrieveMeta, ...defaultRehypePlugins, [rehypeRewrite, {\n rewrite: rehypeRewriteHandle((_props$disableCopy = props.disableCopy) != null ? _props$disableCopy : false, props.rehypeRewrite)\n }], [rehypeAttrs, {\n properties: 'attr'\n }], ...(props.rehypePlugins || []), [rehypePrism, {\n ignoreMissing: true\n }]];\n return /*#__PURE__*/_jsx(MarkdownPreview, _extends({}, props, {\n rehypePlugins: rehypePlugins,\n ref: ref\n }));\n});","export function copyElement(str) {\n if (str === void 0) {\n str = '';\n }\n return {\n type: 'element',\n tagName: 'div',\n properties: {\n class: 'copied',\n 'data-code': str\n },\n children: [{\n type: 'element',\n tagName: 'svg',\n properties: {\n className: 'octicon-copy',\n ariaHidden: 'true',\n viewBox: '0 0 16 16',\n fill: 'currentColor',\n height: 12,\n width: 12\n },\n children: [{\n type: 'element',\n tagName: 'path',\n properties: {\n fillRule: 'evenodd',\n d: 'M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z'\n },\n children: []\n }, {\n type: 'element',\n tagName: 'path',\n properties: {\n fillRule: 'evenodd',\n d: 'M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z'\n },\n children: []\n }]\n }, {\n type: 'element',\n tagName: 'svg',\n properties: {\n className: 'octicon-check',\n ariaHidden: 'true',\n viewBox: '0 0 16 16',\n fill: 'currentColor',\n height: 12,\n width: 12\n },\n children: [{\n type: 'element',\n tagName: 'path',\n properties: {\n fillRule: 'evenodd',\n d: 'M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z'\n },\n children: []\n }]\n }]\n };\n}","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/objectWithoutPropertiesLoose\";\nimport _taggedTemplateLiteralLoose from \"@babel/runtime/helpers/taggedTemplateLiteralLoose\";\nvar _excluded = [\"components\", \"data\", \"node\"],\n _excluded2 = [\"source\", \"components\", \"data\", \"rehypeRewrite\"];\nvar _templateObject;\nimport CodeLayout from 'react-code-preview-layout';\nimport { getMetaId, isMeta, getURLParameters } from 'markdown-react-code-preview-loader';\nimport MarkdownPreview from '@uiw/react-markdown-preview';\nimport styled from 'styled-components';\nimport rehypeIgnore from 'rehype-ignore';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport { jsxs as _jsxs } from \"react/jsx-runtime\";\nvar Preview = CodeLayout.Preview;\nvar Code = CodeLayout.Code;\nvar Toolbar = CodeLayout.Toolbar;\nvar MarkdownStyle = styled(MarkdownPreview)(_templateObject || (_templateObject = _taggedTemplateLiteralLoose([\"\\n margin: 0 auto;\\n box-shadow:\\n rgb(8 15 41 / 8%) 0.5rem 0.5rem 2rem 0px,\\n rgb(8 15 41 / 8%) 0px 0px 1px 0px;\\n border: 1px solid var(--color-border-default, #30363d);\\n text-align: left;\\n max-width: 56rem;\\n overflow: auto;\\n padding: 2rem;\\n border-radius: 0.55rem;\\n\"])));\nvar CodePreview = _ref => {\n var {\n components,\n data,\n node\n } = _ref,\n props = _objectWithoutPropertiesLoose(_ref, _excluded);\n if (node && node.type === 'element' && node.tagName === 'pre') {\n var _child$data, _child$properties, _node$position;\n var child = node.children[0];\n if (!child) return /*#__PURE__*/_jsx(\"pre\", _extends({}, props));\n var meta = ((_child$data = child.data) == null ? void 0 : _child$data.meta) || ((_child$properties = child.properties) == null ? void 0 : _child$properties.dataMeta);\n if (!isMeta(meta)) {\n return /*#__PURE__*/_jsx(\"pre\", _extends({}, props));\n }\n var line = node == null || (_node$position = node.position) == null ? void 0 : _node$position.start.line;\n var metaId = getMetaId(meta) || String(line);\n var Child = components[\"\" + metaId];\n if (metaId && typeof Child === 'function') {\n var code = data[metaId].value || '';\n var {\n title,\n boreder = 1,\n checkered = 1,\n code: codeNum = 1,\n toolbar = 1\n } = getURLParameters(meta || '');\n return /*#__PURE__*/_jsxs(CodeLayout, {\n bordered: !!Number(boreder),\n disableCheckered: !Number(checkered),\n style: {\n marginBottom: 16\n },\n children: [/*#__PURE__*/_jsx(Preview, {\n children: /*#__PURE__*/_jsx(Child, {})\n }), !!Number(toolbar) && /*#__PURE__*/_jsx(Toolbar, {\n text: code,\n visibleButton: !!Number(codeNum),\n children: title || 'Code Example'\n }), !!Number(codeNum) && /*#__PURE__*/_jsx(Code, {\n tagName: \"pre\",\n style: {\n marginBottom: 0\n },\n className: props.className,\n children: props.children\n })]\n });\n }\n }\n return /*#__PURE__*/_jsx(\"code\", _extends({}, props));\n};\nexport default function Markdown(props) {\n var {\n components,\n data\n } = props,\n reset = _objectWithoutPropertiesLoose(props, _excluded2);\n return /*#__PURE__*/_jsx(MarkdownStyle, _extends({\n disableCopy: true,\n rehypePlugins: [rehypeIgnore, ...(reset.rehypePlugins || [])]\n }, reset, {\n source: data.source,\n components: _extends({}, components, {\n pre: rest => /*#__PURE__*/_jsx(CodePreview, _extends({}, rest, {\n components: data.components,\n data: data.data\n }))\n })\n }));\n}","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/objectWithoutPropertiesLoose\";\nimport _taggedTemplateLiteralLoose from \"@babel/runtime/helpers/taggedTemplateLiteralLoose\";\nvar _excluded = [\"version\", \"title\", \"description\", \"source\", \"logo\", \"components\", \"data\", \"markdownProps\", \"exampleProps\", \"className\", \"children\", \"disableCorners\", \"disableDarkMode\", \"disableHeader\", \"disableBackToUp\"];\nvar _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5;\nimport { forwardRef } from 'react';\nimport '@wcj/dark-mode';\nimport { styled } from 'styled-components';\nimport BackToUp from '@uiw/react-back-to-top';\nimport { Github } from './Github';\nimport { Corners } from './Corners';\nimport { Example } from './Example';\nimport { NavMenu, NavMenuView } from './NavMenu';\nimport { useStores } from './store';\nimport Markdown from './Markdown';\nimport { Logo } from './Logo';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport { jsxs as _jsxs } from \"react/jsx-runtime\";\nvar ExampleWrapper = styled.div(_templateObject || (_templateObject = _taggedTemplateLiteralLoose([\"\\n max-width: 56rem;\\n margin: 0 auto;\\n padding: 2.3rem 3rem;\\n display: flex;\\n justify-content: center;\\n\"])));\nvar Wrappper = styled.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteralLoose([\"\\n padding-bottom: 12rem;\\n\"])));\nvar Header = styled.header(_templateObject3 || (_templateObject3 = _taggedTemplateLiteralLoose([\"\\n padding: 9rem 0 2rem 0;\\n text-align: center;\\n h1 {\\n font-weight: 900;\\n font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans', Helvetica, Arial, sans-serif,\\n 'Apple Color Emoji', 'Segoe UI Emoji';\\n }\\n\"])));\nexport var SupVersion = styled.sup(_templateObject4 || (_templateObject4 = _taggedTemplateLiteralLoose([\"\\n font-weight: 200;\\n font-size: 0.78rem;\\n margin-left: 0.5em;\\n margin-top: -0.3em;\\n position: absolute;\\n white-space: nowrap;\\n\"])));\nvar Description = styled.p(_templateObject5 || (_templateObject5 = _taggedTemplateLiteralLoose([\"\\n max-width: 460px;\\n margin: 0 auto;\\n color: var(--color-fg-subtle, #6e7781);\\n\"])));\nvar InternalMarkdownPreviewExample = /*#__PURE__*/forwardRef((props, ref) => {\n var {\n version,\n title,\n description,\n source,\n logo = Logo,\n components,\n data,\n markdownProps,\n exampleProps,\n className = '',\n children,\n disableCorners = false,\n disableDarkMode = false,\n disableHeader = false,\n disableBackToUp = false\n } = props,\n reset = _objectWithoutPropertiesLoose(props, _excluded);\n var store = useStores();\n return /*#__PURE__*/_jsxs(Wrappper, _extends({\n className: \"wmde-markdown-var \" + className\n }, reset, {\n children: [/*#__PURE__*/_jsx(NavMenuView, {\n version: version,\n logo: logo,\n disableDarkMode: disableDarkMode,\n disableCorners: disableCorners\n }), !disableHeader && /*#__PURE__*/_jsxs(Header, {\n children: [logo, title && /*#__PURE__*/_jsxs(\"h1\", {\n children: [title, version && /*#__PURE__*/_jsx(SupVersion, {\n children: version\n })]\n }), description && /*#__PURE__*/_jsx(Description, {\n children: description\n })]\n }), store.example && /*#__PURE__*/_jsx(ExampleWrapper, _extends({}, exampleProps, {\n children: store.example\n })), /*#__PURE__*/_jsx(Markdown, _extends({}, markdownProps, {\n source: source,\n data: {\n data,\n components,\n source\n }\n })), children, !disableBackToUp && /*#__PURE__*/_jsx(BackToUp, {\n children: \"Top\"\n })]\n }));\n});\nvar MarkdownPreviewExample = InternalMarkdownPreviewExample;\nMarkdownPreviewExample.Github = Github;\nMarkdownPreviewExample.Corners = Corners;\nMarkdownPreviewExample.Example = Example;\nMarkdownPreviewExample.NavMenu = NavMenu;\nexport default MarkdownPreviewExample;","import _extends from \"@babel/runtime/helpers/extends\";\nimport { useEffect } from 'react';\nimport { store } from './store';\nexport function Github(props) {\n useEffect(() => store.setCorners(_extends({}, props)), [props]);\n return null;\n}","import _extends from \"@babel/runtime/helpers/extends\";\nimport { useEffect } from 'react';\nimport { store } from './store';\nexport function Corners(props) {\n useEffect(() => store.setDarkMode(_extends({}, props)), [props]);\n return null;\n}","import { useEffect } from 'react';\nimport { store } from './store';\nexport function Example(_ref) {\n var {\n children\n } = _ref;\n useEffect(() => store.setExample(children), [children]);\n return null;\n}","import _extends from \"@babel/runtime/helpers/extends\";\nimport { createContext, useContext, useReducer } from 'react';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nvar initialState = {};\nvar Context = /*#__PURE__*/createContext(initialState);\nvar reducer = (state, action) => _extends({}, state, action);\nexport var useShowToolsStore = () => {\n return useContext(Context);\n};\nvar DispatchShowTools = /*#__PURE__*/createContext(() => {});\nDispatchShowTools.displayName = 'JVR.DispatchShowTools';\nexport function useShowTools() {\n return useReducer(reducer, initialState);\n}\nexport function useShowToolsDispatch() {\n return useContext(DispatchShowTools);\n}\nexport var ShowTools = _ref => {\n var {\n initial,\n dispatch,\n children\n } = _ref;\n return /*#__PURE__*/_jsx(Context.Provider, {\n value: initial,\n children: /*#__PURE__*/_jsx(DispatchShowTools.Provider, {\n value: dispatch,\n children: children\n })\n });\n};\nShowTools.displayName = 'JVR.ShowTools';","import _extends from \"@babel/runtime/helpers/extends\";\nimport { createContext, useContext, useReducer } from 'react';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nvar initialState = {};\nvar Context = /*#__PURE__*/createContext(initialState);\nvar reducer = (state, action) => _extends({}, state, action);\nexport var useExpandsStore = () => {\n return useContext(Context);\n};\nvar DispatchExpands = /*#__PURE__*/createContext(() => {});\nDispatchExpands.displayName = 'JVR.DispatchExpands';\nexport function useExpands() {\n return useReducer(reducer, initialState);\n}\nexport function useExpandsDispatch() {\n return useContext(DispatchExpands);\n}\nexport var Expands = _ref => {\n var {\n initial,\n dispatch,\n children\n } = _ref;\n return /*#__PURE__*/_jsx(Context.Provider, {\n value: initial,\n children: /*#__PURE__*/_jsx(DispatchExpands.Provider, {\n value: dispatch,\n children: children\n })\n });\n};\nExpands.displayName = 'JVR.Expands';","import _extends from \"@babel/runtime/helpers/extends\";\nimport { createContext, useContext, useReducer } from 'react';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nvar initialState = {\n Str: {\n as: 'span',\n 'data-type': 'string',\n style: {\n color: 'var(--w-rjv-type-string-color, #cb4b16)'\n },\n className: 'w-rjv-type',\n children: 'string'\n },\n Url: {\n as: 'a',\n style: {\n color: 'var(--w-rjv-type-url-color, #0969da)'\n },\n 'data-type': 'url',\n className: 'w-rjv-type',\n children: 'url'\n },\n Undefined: {\n style: {\n color: 'var(--w-rjv-type-undefined-color, #586e75)'\n },\n as: 'span',\n 'data-type': 'undefined',\n className: 'w-rjv-type',\n children: 'undefined'\n },\n Null: {\n style: {\n color: 'var(--w-rjv-type-null-color, #d33682)'\n },\n as: 'span',\n 'data-type': 'null',\n className: 'w-rjv-type',\n children: 'null'\n },\n Map: {\n style: {\n color: 'var(--w-rjv-type-map-color, #268bd2)',\n marginRight: 3\n },\n as: 'span',\n 'data-type': 'map',\n className: 'w-rjv-type',\n children: 'Map'\n },\n Nan: {\n style: {\n color: 'var(--w-rjv-type-nan-color, #859900)'\n },\n as: 'span',\n 'data-type': 'nan',\n className: 'w-rjv-type',\n children: 'NaN'\n },\n Bigint: {\n style: {\n color: 'var(--w-rjv-type-bigint-color, #268bd2)'\n },\n as: 'span',\n 'data-type': 'bigint',\n className: 'w-rjv-type',\n children: 'bigint'\n },\n Int: {\n style: {\n color: 'var(--w-rjv-type-int-color, #268bd2)'\n },\n as: 'span',\n 'data-type': 'int',\n className: 'w-rjv-type',\n children: 'int'\n },\n Set: {\n style: {\n color: 'var(--w-rjv-type-set-color, #268bd2)',\n marginRight: 3\n },\n as: 'span',\n 'data-type': 'set',\n className: 'w-rjv-type',\n children: 'Set'\n },\n Float: {\n style: {\n color: 'var(--w-rjv-type-float-color, #859900)'\n },\n as: 'span',\n 'data-type': 'float',\n className: 'w-rjv-type',\n children: 'float'\n },\n True: {\n style: {\n color: 'var(--w-rjv-type-boolean-color, #2aa198)'\n },\n as: 'span',\n 'data-type': 'bool',\n className: 'w-rjv-type',\n children: 'bool'\n },\n False: {\n style: {\n color: 'var(--w-rjv-type-boolean-color, #2aa198)'\n },\n as: 'span',\n 'data-type': 'bool',\n className: 'w-rjv-type',\n children: 'bool'\n },\n Date: {\n style: {\n color: 'var(--w-rjv-type-date-color, #268bd2)'\n },\n as: 'span',\n 'data-type': 'date',\n className: 'w-rjv-type',\n children: 'date'\n }\n};\nvar Context = /*#__PURE__*/createContext(initialState);\nvar reducer = (state, action) => _extends({}, state, action);\nexport var useTypesStore = () => {\n return useContext(Context);\n};\nvar DispatchTypes = /*#__PURE__*/createContext(() => {});\nDispatchTypes.displayName = 'JVR.DispatchTypes';\nexport function useTypes() {\n return useReducer(reducer, initialState);\n}\nexport function useTypesDispatch() {\n return useContext(DispatchTypes);\n}\nexport function Types(_ref) {\n var {\n initial,\n dispatch,\n children\n } = _ref;\n return /*#__PURE__*/_jsx(Context.Provider, {\n value: initial,\n children: /*#__PURE__*/_jsx(DispatchTypes.Provider, {\n value: dispatch,\n children: children\n })\n });\n}\nTypes.displayName = 'JVR.Types';","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/objectWithoutPropertiesLoose\";\nvar _excluded = [\"style\"];\nimport React from 'react';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport function TriangleArrow(props) {\n var {\n style\n } = props,\n reset = _objectWithoutPropertiesLoose(props, _excluded);\n var defaultStyle = _extends({\n cursor: 'pointer',\n height: '1em',\n width: '1em',\n userSelect: 'none',\n display: 'inline-flex'\n }, style);\n return /*#__PURE__*/_jsx(\"svg\", _extends({\n viewBox: \"0 0 24 24\",\n fill: \"var(--w-rjv-arrow-color, currentColor)\",\n style: defaultStyle\n }, reset, {\n children: /*#__PURE__*/_jsx(\"path\", {\n d: \"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z\"\n })\n }));\n}\nTriangleArrow.displayName = 'JVR.TriangleArrow';","import _extends from \"@babel/runtime/helpers/extends\";\nimport { createContext, useContext, useReducer } from 'react';\nimport { TriangleArrow } from '../arrow/TriangleArrow';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nvar initialState = {\n Arrow: {\n as: 'span',\n className: 'w-rjv-arrow',\n style: {\n transform: 'rotate(0deg)',\n transition: 'all 0.3s'\n },\n children: /*#__PURE__*/_jsx(TriangleArrow, {})\n },\n Colon: {\n as: 'span',\n style: {\n color: 'var(--w-rjv-colon-color, var(--w-rjv-color))',\n marginLeft: 0,\n marginRight: 2\n },\n className: 'w-rjv-colon',\n children: ':'\n },\n Quote: {\n as: 'span',\n style: {\n color: 'var(--w-rjv-quotes-color, #236a7c)'\n },\n className: 'w-rjv-quotes',\n children: '\"'\n },\n ValueQuote: {\n as: 'span',\n style: {\n color: 'var(--w-rjv-quotes-string-color, #cb4b16)'\n },\n className: 'w-rjv-quotes',\n children: '\"'\n },\n BracketsLeft: {\n as: 'span',\n style: {\n color: 'var(--w-rjv-brackets-color, #236a7c)'\n },\n className: 'w-rjv-brackets-start',\n children: '['\n },\n BracketsRight: {\n as: 'span',\n style: {\n color: 'var(--w-rjv-brackets-color, #236a7c)'\n },\n className: 'w-rjv-brackets-end',\n children: ']'\n },\n BraceLeft: {\n as: 'span',\n style: {\n color: 'var(--w-rjv-curlybraces-color, #236a7c)'\n },\n className: 'w-rjv-curlybraces-start',\n children: '{'\n },\n BraceRight: {\n as: 'span',\n style: {\n color: 'var(--w-rjv-curlybraces-color, #236a7c)'\n },\n className: 'w-rjv-curlybraces-end',\n children: '}'\n }\n};\nvar Context = /*#__PURE__*/createContext(initialState);\nvar reducer = (state, action) => _extends({}, state, action);\nexport var useSymbolsStore = () => {\n return useContext(Context);\n};\nvar DispatchSymbols = /*#__PURE__*/createContext(() => {});\nDispatchSymbols.displayName = 'JVR.DispatchSymbols';\nexport function useSymbols() {\n return useReducer(reducer, initialState);\n}\nexport function useSymbolsDispatch() {\n return useContext(DispatchSymbols);\n}\nexport var Symbols = _ref => {\n var {\n initial,\n dispatch,\n children\n } = _ref;\n return /*#__PURE__*/_jsx(Context.Provider, {\n value: initial,\n children: /*#__PURE__*/_jsx(DispatchSymbols.Provider, {\n value: dispatch,\n children: children\n })\n });\n};\nSymbols.displayName = 'JVR.Symbols';","import _extends from \"@babel/runtime/helpers/extends\";\nimport React, { createContext, useContext, useReducer } from 'react';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nvar initialState = {\n Copied: {\n className: 'w-rjv-copied',\n style: {\n height: '1em',\n width: '1em',\n cursor: 'pointer',\n verticalAlign: 'middle',\n marginLeft: 5\n }\n },\n CountInfo: {\n as: 'span',\n className: 'w-rjv-object-size',\n style: {\n color: 'var(--w-rjv-info-color, #0000004d)',\n paddingLeft: 8,\n fontStyle: 'italic'\n }\n },\n CountInfoExtra: {\n as: 'span',\n className: 'w-rjv-object-extra',\n style: {\n paddingLeft: 8\n }\n },\n Ellipsis: {\n as: 'span',\n style: {\n cursor: 'pointer',\n color: 'var(--w-rjv-ellipsis-color, #cb4b16)',\n userSelect: 'none'\n },\n className: 'w-rjv-ellipsis',\n children: '...'\n },\n Row: {\n as: 'div',\n className: 'w-rjv-line'\n },\n KeyName: {\n as: 'span',\n className: 'w-rjv-object-key'\n }\n};\nvar Context = /*#__PURE__*/createContext(initialState);\nvar reducer = (state, action) => _extends({}, state, action);\nexport var useSectionStore = () => {\n return useContext(Context);\n};\nvar DispatchSection = /*#__PURE__*/createContext(() => {});\nDispatchSection.displayName = 'JVR.DispatchSection';\nexport function useSection() {\n return useReducer(reducer, initialState);\n}\nexport function useSectionDispatch() {\n return useContext(DispatchSection);\n}\nexport var Section = _ref => {\n var {\n initial,\n dispatch,\n children\n } = _ref;\n return /*#__PURE__*/_jsx(Context.Provider, {\n value: initial,\n children: /*#__PURE__*/_jsx(DispatchSection.Provider, {\n value: dispatch,\n children: children\n })\n });\n};\nSection.displayName = 'JVR.Section';","import _extends from \"@babel/runtime/helpers/extends\";\nimport React, { createContext, useContext, useEffect, useReducer } from 'react';\nimport { useShowTools, ShowTools } from './store/ShowTools';\nimport { useExpands, Expands } from './store/Expands';\nimport { useTypes, Types } from './store/Types';\nimport { useSymbols, Symbols } from './store/Symbols';\nimport { useSection, Section } from './store/Section';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport var initialState = {\n objectSortKeys: false,\n indentWidth: 15\n};\nexport var Context = /*#__PURE__*/createContext(initialState);\nContext.displayName = 'JVR.Context';\nvar DispatchContext = /*#__PURE__*/createContext(() => {});\nDispatchContext.displayName = 'JVR.DispatchContext';\nexport function reducer(state, action) {\n return _extends({}, state, action);\n}\nexport var useStore = () => {\n return useContext(Context);\n};\nexport var useDispatchStore = () => {\n return useContext(DispatchContext);\n};\nexport var Provider = _ref => {\n var {\n children,\n initialState: init,\n initialTypes\n } = _ref;\n var [state, dispatch] = useReducer(reducer, Object.assign({}, initialState, init));\n var [showTools, showToolsDispatch] = useShowTools();\n var [expands, expandsDispatch] = useExpands();\n var [types, typesDispatch] = useTypes();\n var [symbols, symbolsDispatch] = useSymbols();\n var [section, sectionDispatch] = useSection();\n useEffect(() => dispatch(_extends({}, init)), [init]);\n return /*#__PURE__*/_jsx(Context.Provider, {\n value: state,\n children: /*#__PURE__*/_jsx(DispatchContext.Provider, {\n value: dispatch,\n children: /*#__PURE__*/_jsx(ShowTools, {\n initial: showTools,\n dispatch: showToolsDispatch,\n children: /*#__PURE__*/_jsx(Expands, {\n initial: expands,\n dispatch: expandsDispatch,\n children: /*#__PURE__*/_jsx(Types, {\n initial: _extends({}, types, initialTypes),\n dispatch: typesDispatch,\n children: /*#__PURE__*/_jsx(Symbols, {\n initial: symbols,\n dispatch: symbolsDispatch,\n children: /*#__PURE__*/_jsx(Section, {\n initial: section,\n dispatch: sectionDispatch,\n children: children\n })\n })\n })\n })\n })\n })\n });\n};\nexport function useDispatch() {\n return useContext(DispatchContext);\n}\nProvider.displayName = 'JVR.Provider';","import _objectDestructuringEmpty from \"@babel/runtime/helpers/objectDestructuringEmpty\";\nimport _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/objectWithoutPropertiesLoose\";\nvar _excluded = [\"isNumber\"],\n _excluded2 = [\"as\", \"render\"],\n _excluded3 = [\"as\", \"render\"],\n _excluded4 = [\"as\", \"render\"],\n _excluded5 = [\"as\", \"style\", \"render\"],\n _excluded6 = [\"as\", \"render\"],\n _excluded7 = [\"as\", \"render\"],\n _excluded8 = [\"as\", \"render\"],\n _excluded9 = [\"as\", \"render\"];\nimport { useSymbolsStore } from '../store/Symbols';\nimport { useExpandsStore } from '../store/Expands';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport var Quote = props => {\n var {\n Quote: Comp = {}\n } = useSymbolsStore();\n var {\n isNumber\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n if (isNumber) return null;\n var {\n as,\n render\n } = Comp,\n reset = _objectWithoutPropertiesLoose(Comp, _excluded2);\n var Elm = as || 'span';\n var elmProps = _extends({}, other, reset);\n var child = render && typeof render === 'function' && render(elmProps);\n if (child) return child;\n return /*#__PURE__*/_jsx(Elm, _extends({}, elmProps));\n};\nQuote.displayName = 'JVR.Quote';\nexport var ValueQuote = props => {\n var {\n ValueQuote: Comp = {}\n } = useSymbolsStore();\n var other = _extends({}, (_objectDestructuringEmpty(props), props));\n var {\n as,\n render\n } = Comp,\n reset = _objectWithoutPropertiesLoose(Comp, _excluded3);\n var Elm = as || 'span';\n var elmProps = _extends({}, other, reset);\n var child = render && typeof render === 'function' && render(elmProps);\n if (child) return child;\n return /*#__PURE__*/_jsx(Elm, _extends({}, elmProps));\n};\nValueQuote.displayName = 'JVR.ValueQuote';\nexport var Colon = () => {\n var {\n Colon: Comp = {}\n } = useSymbolsStore();\n var {\n as,\n render\n } = Comp,\n reset = _objectWithoutPropertiesLoose(Comp, _excluded4);\n var Elm = as || 'span';\n var child = render && typeof render === 'function' && render(reset);\n if (child) return child;\n return /*#__PURE__*/_jsx(Elm, _extends({}, reset));\n};\nColon.displayName = 'JVR.Colon';\nexport var Arrow = props => {\n var {\n Arrow: Comp = {}\n } = useSymbolsStore();\n var expands = useExpandsStore();\n var {\n expandKey\n } = props;\n var isExpanded = !!expands[expandKey];\n var {\n as,\n style,\n render\n } = Comp,\n reset = _objectWithoutPropertiesLoose(Comp, _excluded5);\n var Elm = as || 'span';\n var isRender = render && typeof render === 'function';\n var child = isRender && render(_extends({}, reset, {\n 'data-expanded': isExpanded,\n style: _extends({}, style, props.style)\n }));\n if (child) return child;\n return /*#__PURE__*/_jsx(Elm, _extends({}, reset, {\n style: _extends({}, style, props.style)\n }));\n};\nArrow.displayName = 'JVR.Arrow';\nexport var BracketsOpen = _ref => {\n var {\n isBrackets\n } = _ref;\n var {\n BracketsLeft = {},\n BraceLeft = {}\n } = useSymbolsStore();\n if (isBrackets) {\n var {\n as,\n render: _render\n } = BracketsLeft,\n reset = _objectWithoutPropertiesLoose(BracketsLeft, _excluded6);\n var BracketsLeftComp = as || 'span';\n var _child = _render && typeof _render === 'function' && _render(reset);\n if (_child) return _child;\n return /*#__PURE__*/_jsx(BracketsLeftComp, _extends({}, reset));\n }\n var {\n as: elm,\n render\n } = BraceLeft,\n props = _objectWithoutPropertiesLoose(BraceLeft, _excluded7);\n var BraceLeftComp = elm || 'span';\n var child = render && typeof render === 'function' && render(props);\n if (child) return child;\n return /*#__PURE__*/_jsx(BraceLeftComp, _extends({}, props));\n};\nBracketsOpen.displayName = 'JVR.BracketsOpen';\nexport var BracketsClose = _ref2 => {\n var {\n isBrackets,\n isVisiable\n } = _ref2;\n if (!isVisiable) return null;\n var {\n BracketsRight = {},\n BraceRight = {}\n } = useSymbolsStore();\n if (isBrackets) {\n var {\n as,\n render: _render2\n } = BracketsRight,\n _reset = _objectWithoutPropertiesLoose(BracketsRight, _excluded8);\n var BracketsRightComp = as || 'span';\n var _child2 = _render2 && typeof _render2 === 'function' && _render2(_reset);\n if (_child2) return _child2;\n return /*#__PURE__*/_jsx(BracketsRightComp, _extends({}, _reset));\n }\n var {\n as: elm,\n render\n } = BraceRight,\n reset = _objectWithoutPropertiesLoose(BraceRight, _excluded9);\n var BraceRightComp = elm || 'span';\n var child = render && typeof render === 'function' && render(reset);\n if (child) return child;\n return /*#__PURE__*/_jsx(BraceRightComp, _extends({}, reset));\n};\nBracketsClose.displayName = 'JVR.BracketsClose';","function _objectDestructuringEmpty(t) {\n if (null == t) throw new TypeError(\"Cannot destructure \" + t);\n}\nexport { _objectDestructuringEmpty as default };","import { useStore } from '../store';\nimport { useExpandsStore } from '../store/Expands';\nimport { BracketsClose } from '../symbol';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport var NestedClose = props => {\n var _expands$expandKey;\n var {\n value,\n expandKey,\n level\n } = props;\n var expands = useExpandsStore();\n var isArray = Array.isArray(value);\n var {\n collapsed\n } = useStore();\n var isMySet = value instanceof Set;\n var isExpanded = (_expands$expandKey = expands[expandKey]) != null ? _expands$expandKey : typeof collapsed === 'boolean' ? collapsed : typeof collapsed === 'number' ? level > collapsed : false;\n var len = Object.keys(value).length;\n if (isExpanded || len === 0) {\n return null;\n }\n var style = {\n paddingLeft: 4\n };\n return /*#__PURE__*/_jsx(\"div\", {\n style: style,\n children: /*#__PURE__*/_jsx(BracketsClose, {\n isBrackets: isArray || isMySet,\n isVisiable: true\n })\n });\n};\nNestedClose.displayName = 'JVR.NestedClose';","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/objectWithoutPropertiesLoose\";\nvar _excluded = [\"as\", \"render\"],\n _excluded2 = [\"as\", \"render\"],\n _excluded3 = [\"as\", \"render\"],\n _excluded4 = [\"as\", \"render\"],\n _excluded5 = [\"as\", \"render\"],\n _excluded6 = [\"as\", \"render\"],\n _excluded7 = [\"as\", \"render\"],\n _excluded8 = [\"as\", \"render\"],\n _excluded9 = [\"as\", \"render\"],\n _excluded10 = [\"as\", \"render\"],\n _excluded11 = [\"as\", \"render\"],\n _excluded12 = [\"as\", \"render\"],\n _excluded13 = [\"as\", \"render\"];\nimport { Fragment, useEffect, useState } from 'react';\nimport { useStore } from '../store';\nimport { useTypesStore } from '../store/Types';\nimport { ValueQuote } from '../symbol';\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nexport var bigIntToString = bi => {\n if (bi === undefined) {\n return '0n';\n } else if (typeof bi === 'string') {\n try {\n bi = BigInt(bi);\n } catch (e) {\n return '0n';\n }\n }\n return bi ? bi.toString() + 'n' : '0n';\n};\nexport var SetComp = _ref => {\n var {\n value,\n keyName\n } = _ref;\n var {\n Set: Comp = {},\n displayDataTypes\n } = useTypesStore();\n var isSet = value instanceof Set;\n if (!isSet || !displayDataTypes) return null;\n var {\n as,\n render\n } = Comp,\n reset = _objectWithoutPropertiesLoose(Comp, _excluded);\n var isRender = render && typeof render === 'function';\n var type = isRender && render(reset, {\n type: 'type',\n value,\n keyName\n });\n if (type) return type;\n var Elm = as || 'span';\n return /*#__PURE__*/_jsx(Elm, _extends({}, reset));\n};\nSetComp.displayName = 'JVR.SetComp';\nexport var MapComp = _ref2 => {\n var {\n value,\n keyName\n } = _ref2;\n var {\n Map: Comp = {},\n displayDataTypes\n } = useTypesStore();\n var isMap = value instanceof Map;\n if (!isMap || !displayDataTypes) return null;\n var {\n as,\n render\n } = Comp,\n reset = _objectWithoutPropertiesLoose(Comp, _excluded2);\n var isRender = render && typeof render === 'function';\n var type = isRender && render(reset, {\n type: 'type',\n value,\n keyName\n });\n if (type) return type;\n var Elm = as || 'span';\n return /*#__PURE__*/_jsx(Elm, _extends({}, reset));\n};\nMapComp.displayName = 'JVR.MapComp';\nvar defalutStyle = {\n opacity: 0.75,\n paddingRight: 4\n};\nexport var TypeString = _ref3 => {\n var {\n children = '',\n keyName\n } = _ref3;\n var {\n Str = {},\n displayDataTypes\n } = useTypesStore();\n var {\n shortenTextAfterLength: length = 30\n } = useStore();\n var {\n as,\n render\n } = Str,\n reset = _objectWithoutPropertiesLoose(Str, _excluded3);\n var childrenStr = children;\n var [shorten, setShorten] = useState(length && childrenStr.length > length);\n useEffect(() => setShorten(length && childrenStr.length > length), [length]);\n var Comp = as || 'span';\n var style = _extends({}, defalutStyle, Str.style || {});\n if (length > 0) {\n reset.style = _extends({}, reset.style, {\n cursor: childrenStr.length <= length ? 'initial' : 'pointer'\n });\n if (childrenStr.length > length) {\n reset.onClick = () => {\n setShorten(!shorten);\n };\n }\n }\n var text = shorten ? childrenStr.slice(0, length) + \"...\" : childrenStr;\n var isRender = render && typeof render === 'function';\n var type = isRender && render(_extends({}, reset, {\n style\n }), {\n type: 'type',\n value: children,\n keyName\n });\n var child = isRender && render(_extends({}, reset, {\n children: text,\n className: 'w-rjv-value'\n }), {\n type: 'value',\n value: children,\n keyName\n });\n return /*#__PURE__*/_jsxs(Fragment, {\n children: [displayDataTypes && (type || /*#__PURE__*/_jsx(Comp, _extends({}, reset, {\n style: style\n }))), child || /*#__PURE__*/_jsxs(Fragment, {\n children: [/*#__PURE__*/_jsx(ValueQuote, {}), /*#__PURE__*/_jsx(Comp, _extends({}, reset, {\n className: \"w-rjv-value\",\n children: text\n })), /*#__PURE__*/_jsx(ValueQuote, {})]\n })]\n });\n};\nTypeString.displayName = 'JVR.TypeString';\nexport var TypeTrue = _ref4 => {\n var {\n children,\n keyName\n } = _ref4;\n var {\n True = {},\n displayDataTypes\n } = useTypesStore();\n var {\n as,\n render\n } = True,\n reset = _objectWithoutPropertiesLoose(True, _excluded4);\n var Comp = as || 'span';\n var style = _extends({}, defalutStyle, True.style || {});\n var isRender = render && typeof render === 'function';\n var type = isRender && render(_extends({}, reset, {\n style\n }), {\n type: 'type',\n value: children,\n keyName\n });\n var child = isRender && render(_extends({}, reset, {\n children,\n className: 'w-rjv-value'\n }), {\n type: 'value',\n value: children,\n keyName\n });\n return /*#__PURE__*/_jsxs(Fragment, {\n children: [displayDataTypes && (type || /*#__PURE__*/_jsx(Comp, _extends({}, reset, {\n style: style\n }))), child || /*#__PURE__*/_jsx(Comp, _extends({}, reset, {\n className: \"w-rjv-value\",\n children: children == null ? void 0 : children.toString()\n }))]\n });\n};\nTypeTrue.displayName = 'JVR.TypeTrue';\nexport var TypeFalse = _ref5 => {\n var {\n children,\n keyName\n } = _ref5;\n var {\n False = {},\n displayDataTypes\n } = useTypesStore();\n var {\n as,\n render\n } = False,\n reset = _objectWithoutPropertiesLoose(False, _excluded5);\n var Comp = as || 'span';\n var style = _extends({}, defalutStyle, False.style || {});\n var isRender = render && typeof render === 'function';\n var type = isRender && render(_extends({}, reset, {\n style\n }), {\n type: 'type',\n value: children,\n keyName\n });\n var child = isRender && render(_extends({}, reset, {\n children,\n className: 'w-rjv-value'\n }), {\n type: 'value',\n value: children,\n keyName\n });\n return /*#__PURE__*/_jsxs(Fragment, {\n children: [displayDataTypes && (type || /*#__PURE__*/_jsx(Comp, _extends({}, reset, {\n style: style\n }))), child || /*#__PURE__*/_jsx(Comp, _extends({}, reset, {\n className: \"w-rjv-value\",\n children: children == null ? void 0 : children.toString()\n }))]\n });\n};\nTypeFalse.displayName = 'JVR.TypeFalse';\nexport var TypeFloat = _ref6 => {\n var {\n children,\n keyName\n } = _ref6;\n var {\n Float = {},\n displayDataTypes\n } = useTypesStore();\n var {\n as,\n render\n } = Float,\n reset = _objectWithoutPropertiesLoose(Float, _excluded6);\n var Comp = as || 'span';\n var style = _extends({}, defalutStyle, Float.style || {});\n var isRender = render && typeof render === 'function';\n var type = isRender && render(_extends({}, reset, {\n style\n }), {\n type: 'type',\n value: children,\n keyName\n });\n var child = isRender && render(_extends({}, reset, {\n children,\n className: 'w-rjv-value'\n }), {\n type: 'value',\n value: children,\n keyName\n });\n return /*#__PURE__*/_jsxs(Fragment, {\n children: [displayDataTypes && (type || /*#__PURE__*/_jsx(Comp, _extends({}, reset, {\n style: style\n }))), child || /*#__PURE__*/_jsx(Comp, _extends({}, reset, {\n className: \"w-rjv-value\",\n children: children == null ? void 0 : children.toString()\n }))]\n });\n};\nTypeFloat.displayName = 'JVR.TypeFloat';\nexport var TypeInt = _ref7 => {\n var {\n children,\n keyName\n } = _ref7;\n var {\n Int = {},\n displayDataTypes\n } = useTypesStore();\n var {\n as,\n render\n } = Int,\n reset = _objectWithoutPropertiesLoose(Int, _excluded7);\n var Comp = as || 'span';\n var style = _extends({}, defalutStyle, Int.style || {});\n var isRender = render && typeof render === 'function';\n var type = isRender && render(_extends({}, reset, {\n style\n }), {\n type: 'type',\n value: children,\n keyName\n });\n var child = isRender && render(_extends({}, reset, {\n children,\n className: 'w-rjv-value'\n }), {\n type: 'value',\n value: children,\n keyName\n });\n return /*#__PURE__*/_jsxs(Fragment, {\n children: [displayDataTypes && (type || /*#__PURE__*/_jsx(Comp, _extends({}, reset, {\n style: style\n }))), child || /*#__PURE__*/_jsx(Comp, _extends({}, reset, {\n className: \"w-rjv-value\",\n children: children == null ? void 0 : children.toString()\n }))]\n });\n};\nTypeInt.displayName = 'JVR.TypeInt';\nexport var TypeBigint = _ref8 => {\n var {\n children,\n keyName\n } = _ref8;\n var {\n Bigint: CompBigint = {},\n displayDataTypes\n } = useTypesStore();\n var {\n as,\n render\n } = CompBigint,\n reset = _objectWithoutPropertiesLoose(CompBigint, _excluded8);\n var Comp = as || 'span';\n var style = _extends({}, defalutStyle, CompBigint.style || {});\n var isRender = render && typeof render === 'function';\n var type = isRender && render(_extends({}, reset, {\n style\n }), {\n type: 'type',\n value: children,\n keyName\n });\n var child = isRender && render(_extends({}, reset, {\n children,\n className: 'w-rjv-value'\n }), {\n type: 'value',\n value: children,\n keyName\n });\n return /*#__PURE__*/_jsxs(Fragment, {\n children: [displayDataTypes && (type || /*#__PURE__*/_jsx(Comp, _extends({}, reset, {\n style: style\n }))), child || /*#__PURE__*/_jsx(Comp, _extends({}, reset, {\n className: \"w-rjv-value\",\n children: bigIntToString(children == null ? void 0 : children.toString())\n }))]\n });\n};\nTypeBigint.displayName = 'JVR.TypeFloat';\nexport var TypeUrl = _ref9 => {\n var {\n children,\n keyName\n } = _ref9;\n var {\n Url = {},\n displayDataTypes\n } = useTypesStore();\n var {\n as,\n render\n } = Url,\n reset = _objectWithoutPropertiesLoose(Url, _excluded9);\n var Comp = as || 'span';\n var style = _extends({}, defalutStyle, Url.style);\n var isRender = render && typeof render === 'function';\n var type = isRender && render(_extends({}, reset, {\n style\n }), {\n type: 'type',\n value: children,\n keyName\n });\n var child = isRender && render(_extends({}, reset, {\n children: children == null ? void 0 : children.href,\n className: 'w-rjv-value'\n }), {\n type: 'value',\n value: children,\n keyName\n });\n return /*#__PURE__*/_jsxs(Fragment, {\n children: [displayDataTypes && (type || /*#__PURE__*/_jsx(Comp, _extends({}, reset, {\n style: style\n }))), child || /*#__PURE__*/_jsxs(\"a\", _extends({\n href: children == null ? void 0 : children.href,\n target: \"_blank\"\n }, reset, {\n className: \"w-rjv-value\",\n children: [/*#__PURE__*/_jsx(ValueQuote, {}), children == null ? void 0 : children.href, /*#__PURE__*/_jsx(ValueQuote, {})]\n }))]\n });\n};\nTypeUrl.displayName = 'JVR.TypeUrl';\nexport var TypeDate = _ref10 => {\n var {\n children,\n keyName\n } = _ref10;\n var {\n Date: CompData = {},\n displayDataTypes\n } = useTypesStore();\n var {\n as,\n render\n } = CompData,\n reset = _objectWithoutPropertiesLoose(CompData, _excluded10);\n var Comp = as || 'span';\n var style = _extends({}, defalutStyle, CompData.style || {});\n var isRender = render && typeof render === 'function';\n var type = isRender && render(_extends({}, reset, {\n style\n }), {\n type: 'type',\n value: children,\n keyName\n });\n var childStr = children instanceof Date ? children.toLocaleString() : children;\n var child = isRender && render(_extends({}, reset, {\n children: childStr,\n className: 'w-rjv-value'\n }), {\n type: 'value',\n value: children,\n keyName\n });\n return /*#__PURE__*/_jsxs(Fragment, {\n children: [displayDataTypes && (type || /*#__PURE__*/_jsx(Comp, _extends({}, reset, {\n style: style\n }))), child || /*#__PURE__*/_jsx(Comp, _extends({}, reset, {\n className: \"w-rjv-value\",\n children: childStr\n }))]\n });\n};\nTypeDate.displayName = 'JVR.TypeDate';\nexport var TypeUndefined = _ref11 => {\n var {\n children,\n keyName\n } = _ref11;\n var {\n Undefined = {},\n displayDataTypes\n } = useTypesStore();\n var {\n as,\n render\n } = Undefined,\n reset = _objectWithoutPropertiesLoose(Undefined, _excluded11);\n var Comp = as || 'span';\n var style = _extends({}, defalutStyle, Undefined.style || {});\n var isRender = render && typeof render === 'function';\n var type = isRender && render(_extends({}, reset, {\n style\n }), {\n type: 'type',\n value: children,\n keyName\n });\n var child = isRender && render(_extends({}, reset, {\n children,\n className: 'w-rjv-value'\n }), {\n type: 'value',\n value: children,\n keyName\n });\n return /*#__PURE__*/_jsxs(Fragment, {\n children: [displayDataTypes && (type || /*#__PURE__*/_jsx(Comp, _extends({}, reset, {\n style: style\n }))), child]\n });\n};\nTypeUndefined.displayName = 'JVR.TypeUndefined';\nexport var TypeNull = _ref12 => {\n var {\n children,\n keyName\n } = _ref12;\n var {\n Null = {},\n displayDataTypes\n } = useTypesStore();\n var {\n as,\n render\n } = Null,\n reset = _objectWithoutPropertiesLoose(Null, _excluded12);\n var Comp = as || 'span';\n var style = _extends({}, defalutStyle, Null.style || {});\n var isRender = render && typeof render === 'function';\n var type = isRender && render(_extends({}, reset, {\n style\n }), {\n type: 'type',\n value: children,\n keyName\n });\n var child = isRender && render(_extends({}, reset, {\n children,\n className: 'w-rjv-value'\n }), {\n type: 'value',\n value: children,\n keyName\n });\n return /*#__PURE__*/_jsxs(Fragment, {\n children: [displayDataTypes && (type || /*#__PURE__*/_jsx(Comp, _extends({}, reset, {\n style: style\n }))), child]\n });\n};\nTypeNull.displayName = 'JVR.TypeNull';\nexport var TypeNan = _ref13 => {\n var {\n children,\n keyName\n } = _ref13;\n var {\n Nan = {},\n displayDataTypes\n } = useTypesStore();\n var {\n as,\n render\n } = Nan,\n reset = _objectWithoutPropertiesLoose(Nan, _excluded13);\n var Comp = as || 'span';\n var style = _extends({}, defalutStyle, Nan.style || {});\n var isRender = render && typeof render === 'function';\n var type = isRender && render(_extends({}, reset, {\n style\n }), {\n type: 'type',\n value: children,\n keyName\n });\n var child = isRender && render(_extends({}, reset, {\n children: children == null ? void 0 : children.toString(),\n className: 'w-rjv-value'\n }), {\n type: 'value',\n value: children,\n keyName\n });\n return /*#__PURE__*/_jsxs(Fragment, {\n children: [displayDataTypes && (type || /*#__PURE__*/_jsx(Comp, _extends({}, reset, {\n style: style\n }))), child]\n });\n};\nTypeNan.displayName = 'JVR.TypeNan';","import _extends from \"@babel/runtime/helpers/extends\";\nimport { TypeString, TypeTrue, TypeNull, TypeFalse, TypeFloat, TypeBigint, TypeInt, TypeDate, TypeUndefined, TypeNan, TypeUrl } from '../types';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport var isFloat = n => Number(n) === n && n % 1 !== 0 || isNaN(n);\nexport var Value = props => {\n var {\n value,\n keyName\n } = props;\n var reset = {\n keyName\n };\n if (value instanceof URL) {\n return /*#__PURE__*/_jsx(TypeUrl, _extends({}, reset, {\n children: value\n }));\n }\n if (typeof value === 'string') {\n return /*#__PURE__*/_jsx(TypeString, _extends({}, reset, {\n children: value\n }));\n }\n if (value === true) {\n return /*#__PURE__*/_jsx(TypeTrue, _extends({}, reset, {\n children: value\n }));\n }\n if (value === false) {\n return /*#__PURE__*/_jsx(TypeFalse, _extends({}, reset, {\n children: value\n }));\n }\n if (value === null) {\n return /*#__PURE__*/_jsx(TypeNull, _extends({}, reset, {\n children: value\n }));\n }\n if (value === undefined) {\n return /*#__PURE__*/_jsx(TypeUndefined, _extends({}, reset, {\n children: value\n }));\n }\n if (value instanceof Date) {\n return /*#__PURE__*/_jsx(TypeDate, _extends({}, reset, {\n children: value\n }));\n }\n if (typeof value === 'number' && isNaN(value)) {\n return /*#__PURE__*/_jsx(TypeNan, _extends({}, reset, {\n children: value\n }));\n } else if (typeof value === 'number' && isFloat(value)) {\n return /*#__PURE__*/_jsx(TypeFloat, _extends({}, reset, {\n children: value\n }));\n } else if (typeof value === 'bigint') {\n return /*#__PURE__*/_jsx(TypeBigint, _extends({}, reset, {\n children: value\n }));\n } else if (typeof value === 'number') {\n return /*#__PURE__*/_jsx(TypeInt, _extends({}, reset, {\n children: value\n }));\n }\n return null;\n};\nValue.displayName = 'JVR.Value';","import _extends from \"@babel/runtime/helpers/extends\";\nimport { useEffect } from 'react';\nimport { useSymbolsDispatch } from '../store/Symbols';\nimport { useTypesDispatch } from '../store/Types';\nimport { useSectionDispatch } from '../store/Section';\nexport function useSymbolsRender(currentProps, props, key) {\n var dispatch = useSymbolsDispatch();\n var cls = [currentProps.className, props.className].filter(Boolean).join(' ');\n var reset = _extends({}, currentProps, props, {\n className: cls,\n style: _extends({}, currentProps.style, props.style),\n children: props.children || currentProps.children\n });\n useEffect(() => dispatch({\n [key]: reset\n }), [props]);\n}\nexport function useTypesRender(currentProps, props, key) {\n var dispatch = useTypesDispatch();\n var cls = [currentProps.className, props.className].filter(Boolean).join(' ');\n var reset = _extends({}, currentProps, props, {\n className: cls,\n style: _extends({}, currentProps.style, props.style),\n children: props.children || currentProps.children\n });\n useEffect(() => dispatch({\n [key]: reset\n }), [props]);\n}\nexport function useSectionRender(currentProps, props, key) {\n var dispatch = useSectionDispatch();\n var cls = [currentProps.className, props.className].filter(Boolean).join(' ');\n var reset = _extends({}, currentProps, props, {\n className: cls,\n style: _extends({}, currentProps.style, props.style),\n children: props.children || currentProps.children\n });\n useEffect(() => dispatch({\n [key]: reset\n }), [props]);\n}","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/objectWithoutPropertiesLoose\";\nvar _excluded = [\"as\", \"render\"];\nimport { useSectionStore } from '../store/Section';\nimport { useSectionRender } from '../utils/useRender';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport var KeyName = props => {\n var {\n KeyName: Comp = {}\n } = useSectionStore();\n useSectionRender(Comp, props, 'KeyName');\n return null;\n};\nKeyName.displayName = 'JVR.KeyName';\nexport var KeyNameComp = props => {\n var {\n children,\n value,\n parentValue,\n keyName,\n keys\n } = props;\n var isNumber = typeof children === 'number';\n var style = {\n color: isNumber ? 'var(--w-rjv-key-number, #268bd2)' : 'var(--w-rjv-key-string, #002b36)'\n };\n var {\n KeyName: Comp = {}\n } = useSectionStore();\n var {\n as,\n render\n } = Comp,\n reset = _objectWithoutPropertiesLoose(Comp, _excluded);\n reset.style = _extends({}, reset.style, style);\n var Elm = as || 'span';\n var child = render && typeof render === 'function' && render(_extends({}, reset, {\n children\n }), {\n value,\n parentValue,\n keyName,\n keys: keys || (keyName ? [keyName] : [])\n });\n if (child) return child;\n return /*#__PURE__*/_jsx(Elm, _extends({}, reset, {\n children: children\n }));\n};\nKeyNameComp.displayName = 'JVR.KeyNameComp';","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/objectWithoutPropertiesLoose\";\nvar _excluded = [\"children\", \"value\", \"parentValue\", \"keyName\", \"keys\"],\n _excluded2 = [\"as\", \"render\", \"children\"];\nimport { useSectionStore } from '../store/Section';\nimport { useSectionRender } from '../utils/useRender';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport var Row = props => {\n var {\n Row: Comp = {}\n } = useSectionStore();\n useSectionRender(Comp, props, 'Row');\n return null;\n};\nRow.displayName = 'JVR.Row';\nexport var RowComp = props => {\n var {\n children,\n value,\n parentValue,\n keyName,\n keys\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n var {\n Row: Comp = {}\n } = useSectionStore();\n var {\n as,\n render\n } = Comp,\n reset = _objectWithoutPropertiesLoose(Comp, _excluded2);\n var Elm = as || 'div';\n var child = render && typeof render === 'function' && render(_extends({}, other, reset, {\n children\n }), {\n value,\n keyName,\n parentValue,\n keys\n });\n if (child) return child;\n return /*#__PURE__*/_jsx(Elm, _extends({}, other, reset, {\n children: children\n }));\n};\nRowComp.displayName = 'JVR.RowComp';","import { useMemo, useRef, useEffect } from 'react';\nexport function usePrevious(value) {\n var ref = useRef();\n useEffect(() => {\n ref.current = value;\n });\n return ref.current;\n}\nexport function useHighlight(_ref) {\n var {\n value,\n highlightUpdates,\n highlightContainer\n } = _ref;\n var prevValue = usePrevious(value);\n var isHighlight = useMemo(() => {\n if (!highlightUpdates || prevValue === undefined) return false;\n // highlight if value type changed\n if (typeof value !== typeof prevValue) {\n return true;\n }\n if (typeof value === 'number') {\n // notice: NaN !== NaN\n if (isNaN(value) && isNaN(prevValue)) return false;\n return value !== prevValue;\n }\n // highlight if isArray changed\n if (Array.isArray(value) !== Array.isArray(prevValue)) {\n return true;\n }\n // not highlight object/function\n // deep compare they will be slow\n if (typeof value === 'object' || typeof value === 'function') {\n return false;\n }\n\n // highlight if not equal\n if (value !== prevValue) {\n return true;\n }\n }, [highlightUpdates, value]);\n useEffect(() => {\n if (highlightContainer && highlightContainer.current && isHighlight && 'animate' in highlightContainer.current) {\n highlightContainer.current.animate([{\n backgroundColor: 'var(--w-rjv-update-color, #ebcb8b)'\n }, {\n backgroundColor: ''\n }], {\n duration: 1000,\n easing: 'ease-in'\n });\n }\n }, [isHighlight, value, highlightContainer]);\n}","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/objectWithoutPropertiesLoose\";\nvar _excluded = [\"keyName\", \"value\", \"parentValue\", \"expandKey\", \"keys\"],\n _excluded2 = [\"as\", \"render\"];\nimport { useState } from 'react';\nimport { useStore } from '../store';\nimport { useSectionStore } from '../store/Section';\nimport { useShowToolsStore } from '../store/ShowTools';\nimport { bigIntToString } from '../types';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport var Copied = props => {\n var {\n keyName,\n value,\n parentValue,\n expandKey,\n keys\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n var {\n onCopied,\n enableClipboard\n } = useStore();\n var showTools = useShowToolsStore();\n var isShowTools = showTools[expandKey];\n var [copied, setCopied] = useState(false);\n var {\n Copied: Comp = {}\n } = useSectionStore();\n if (enableClipboard === false || !isShowTools) return null;\n var click = event => {\n event.stopPropagation();\n var copyText = '';\n if (typeof value === 'number' && value === Infinity) {\n copyText = 'Infinity';\n } else if (typeof value === 'number' && isNaN(value)) {\n copyText = 'NaN';\n } else if (typeof value === 'bigint') {\n copyText = bigIntToString(value);\n } else if (value instanceof Date) {\n copyText = value.toLocaleString();\n } else {\n copyText = JSON.stringify(value, (_, v) => typeof v === 'bigint' ? bigIntToString(v) : v, 2);\n }\n onCopied && onCopied(copyText, value);\n setCopied(true);\n var _clipboard = navigator.clipboard || {\n writeText(text) {\n return new Promise((reslove, reject) => {\n var textarea = document.createElement('textarea');\n textarea.style.position = 'absolute';\n textarea.style.opacity = '0';\n textarea.style.left = '-99999999px';\n textarea.value = text;\n document.body.appendChild(textarea);\n textarea.select();\n if (!document.execCommand('copy')) {\n reject();\n } else {\n reslove();\n }\n textarea.remove();\n });\n }\n };\n _clipboard.writeText(copyText).then(() => {\n var timer = setTimeout(() => {\n setCopied(false);\n clearTimeout(timer);\n }, 3000);\n }).catch(error => {});\n };\n var svgProps = {\n style: {\n display: 'inline-flex'\n },\n fill: copied ? 'var(--w-rjv-copied-success-color, #28a745)' : 'var(--w-rjv-copied-color, currentColor)',\n onClick: click\n };\n var {\n render\n } = Comp,\n reset = _objectWithoutPropertiesLoose(Comp, _excluded2);\n var elmProps = _extends({}, reset, other, svgProps, {\n style: _extends({}, reset.style, other.style, svgProps.style)\n });\n var isRender = render && typeof render === 'function';\n var child = isRender && render(_extends({}, elmProps, {\n 'data-copied': copied\n }), {\n value,\n keyName,\n keys,\n parentValue\n });\n if (child) return child;\n if (copied) {\n return /*#__PURE__*/_jsx(\"svg\", _extends({\n viewBox: \"0 0 32 36\"\n }, elmProps, {\n children: /*#__PURE__*/_jsx(\"path\", {\n d: \"M27.5,33 L2.5,33 L2.5,12.5 L27.5,12.5 L27.5,15.2249049 C29.1403264,13.8627542 29.9736597,13.1778155 30,13.1700887 C30,11.9705278 30,10.0804982 30,7.5 C30,6.1 28.9,5 27.5,5 L20,5 C20,2.2 17.8,0 15,0 C12.2,0 10,2.2 10,5 L2.5,5 C1.1,5 0,6.1 0,7.5 L0,33 C0,34.4 1.1,36 2.5,36 L27.5,36 C28.9,36 30,34.4 30,33 L30,26.1114493 L27.5,28.4926435 L27.5,33 Z M7.5,7.5 L10,7.5 C10,7.5 12.5,6.4 12.5,5 C12.5,3.6 13.6,2.5 15,2.5 C16.4,2.5 17.5,3.6 17.5,5 C17.5,6.4 18.8,7.5 20,7.5 L22.5,7.5 C22.5,7.5 25,8.6 25,10 L5,10 C5,8.5 6.1,7.5 7.5,7.5 Z M5,27.5 L10,27.5 L10,25 L5,25 L5,27.5 Z M28.5589286,16 L32,19.6 L21.0160714,30.5382252 L13.5303571,24.2571429 L17.1303571,20.6571429 L21.0160714,24.5428571 L28.5589286,16 Z M17.5,15 L5,15 L5,17.5 L17.5,17.5 L17.5,15 Z M10,20 L5,20 L5,22.5 L10,22.5 L10,20 Z\"\n })\n }));\n }\n return /*#__PURE__*/_jsx(\"svg\", _extends({\n viewBox: \"0 0 32 36\"\n }, elmProps, {\n children: /*#__PURE__*/_jsx(\"path\", {\n d: \"M27.5,33 L2.5,33 L2.5,12.5 L27.5,12.5 L27.5,20 L30,20 L30,7.5 C30,6.1 28.9,5 27.5,5 L20,5 C20,2.2 17.8,0 15,0 C12.2,0 10,2.2 10,5 L2.5,5 C1.1,5 0,6.1 0,7.5 L0,33 C0,34.4 1.1,36 2.5,36 L27.5,36 C28.9,36 30,34.4 30,33 L30,29 L27.5,29 L27.5,33 Z M7.5,7.5 L10,7.5 C10,7.5 12.5,6.4 12.5,5 C12.5,3.6 13.6,2.5 15,2.5 C16.4,2.5 17.5,3.6 17.5,5 C17.5,6.4 18.8,7.5 20,7.5 L22.5,7.5 C22.5,7.5 25,8.6 25,10 L5,10 C5,8.5 6.1,7.5 7.5,7.5 Z M5,27.5 L10,27.5 L10,25 L5,25 L5,27.5 Z M22.5,21.5 L22.5,16.5 L12.5,24 L22.5,31.5 L22.5,26.5 L32,26.5 L32,21.5 L22.5,21.5 Z M17.5,15 L5,15 L5,17.5 L17.5,17.5 L17.5,15 Z M10,20 L5,20 L5,22.5 L10,22.5 L10,20 Z\"\n })\n }));\n};\nCopied.displayName = 'JVR.Copied';","import _extends from \"@babel/runtime/helpers/extends\";\nimport { Fragment, useId, useRef } from 'react';\nimport { useStore } from '../store';\nimport { useExpandsStore } from '../store/Expands';\nimport { useShowToolsDispatch } from '../store/ShowTools';\nimport { Value } from './Value';\nimport { KeyNameComp } from '../section/KeyName';\nimport { RowComp } from '../section/Row';\nimport { Container } from '../Container';\nimport { Quote, Colon } from '../symbol';\nimport { useHighlight } from '../utils/useHighlight';\nimport { Copied } from '../comps/Copied';\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nexport var KeyValues = props => {\n var _expands$expandKey;\n var {\n value,\n expandKey = '',\n level,\n keys = []\n } = props;\n var expands = useExpandsStore();\n var {\n objectSortKeys,\n indentWidth,\n collapsed\n } = useStore();\n var isMyArray = Array.isArray(value);\n var isExpanded = (_expands$expandKey = expands[expandKey]) != null ? _expands$expandKey : typeof collapsed === 'boolean' ? collapsed : typeof collapsed === 'number' ? level > collapsed : false;\n if (isExpanded) {\n return null;\n }\n // object\n var entries = isMyArray ? Object.entries(value).map(m => [Number(m[0]), m[1]]) : Object.entries(value);\n if (objectSortKeys) {\n entries = objectSortKeys === true ? entries.sort((_ref, _ref2) => {\n var [a] = _ref;\n var [b] = _ref2;\n return typeof a === 'string' && typeof b === 'string' ? a.localeCompare(b) : 0;\n }) : entries.sort((_ref3, _ref4) => {\n var [a, valA] = _ref3;\n var [b, valB] = _ref4;\n return typeof a === 'string' && typeof b === 'string' ? objectSortKeys(a, b, valA, valB) : 0;\n });\n }\n var style = {\n borderLeft: 'var(--w-rjv-border-left-width, 1px) var(--w-rjv-line-style, solid) var(--w-rjv-line-color, #ebebeb)',\n paddingLeft: indentWidth,\n marginLeft: 6\n };\n return /*#__PURE__*/_jsx(\"div\", {\n className: \"w-rjv-wrap\",\n style: style,\n children: entries.map((_ref5, idx) => {\n var [key, val] = _ref5;\n return /*#__PURE__*/_jsx(KeyValuesItem, {\n parentValue: value,\n keyName: key,\n keys: [...keys, key],\n value: val,\n level: level\n }, idx);\n })\n });\n};\nKeyValues.displayName = 'JVR.KeyValues';\nexport var KayName = props => {\n var {\n keyName,\n parentValue,\n keys,\n value\n } = props;\n var {\n highlightUpdates\n } = useStore();\n var isNumber = typeof keyName === 'number';\n var highlightContainer = useRef(null);\n useHighlight({\n value,\n highlightUpdates,\n highlightContainer\n });\n return /*#__PURE__*/_jsxs(Fragment, {\n children: [/*#__PURE__*/_jsxs(\"span\", {\n ref: highlightContainer,\n children: [/*#__PURE__*/_jsx(Quote, {\n isNumber: isNumber,\n \"data-placement\": \"left\"\n }), /*#__PURE__*/_jsx(KeyNameComp, {\n keyName: keyName,\n value: value,\n keys: keys,\n parentValue: parentValue,\n children: keyName\n }), /*#__PURE__*/_jsx(Quote, {\n isNumber: isNumber,\n \"data-placement\": \"right\"\n })]\n }), /*#__PURE__*/_jsx(Colon, {})]\n });\n};\nKayName.displayName = 'JVR.KayName';\nexport var KeyValuesItem = props => {\n var {\n keyName,\n value,\n parentValue,\n level = 0,\n keys = []\n } = props;\n var dispatch = useShowToolsDispatch();\n var subkeyid = useId();\n var isMyArray = Array.isArray(value);\n var isMySet = value instanceof Set;\n var isMyMap = value instanceof Map;\n var isDate = value instanceof Date;\n var isUrl = value instanceof URL;\n var isMyObject = value && typeof value === 'object' && !isMyArray && !isMySet && !isMyMap && !isDate && !isUrl;\n var isNested = isMyObject || isMyArray || isMySet || isMyMap;\n if (isNested) {\n var myValue = isMySet ? Array.from(value) : isMyMap ? Object.fromEntries(value) : value;\n return /*#__PURE__*/_jsx(Container, {\n keyName: keyName,\n value: myValue,\n parentValue: parentValue,\n initialValue: value,\n keys: keys,\n level: level + 1\n });\n }\n var reset = {\n onMouseEnter: () => dispatch({\n [subkeyid]: true\n }),\n onMouseLeave: () => dispatch({\n [subkeyid]: false\n })\n };\n return /*#__PURE__*/_jsxs(RowComp, _extends({\n className: \"w-rjv-line\",\n value: value,\n keyName: keyName,\n keys: keys,\n parentValue: parentValue\n }, reset, {\n children: [/*#__PURE__*/_jsx(KayName, {\n keyName: keyName,\n value: value,\n keys: keys,\n parentValue: parentValue\n }), /*#__PURE__*/_jsx(Value, {\n keyName: keyName,\n value: value\n }), /*#__PURE__*/_jsx(Copied, {\n keyName: keyName,\n value: value,\n keys: keys,\n parentValue: parentValue,\n expandKey: subkeyid\n })]\n }));\n};\nKeyValuesItem.displayName = 'JVR.KeyValuesItem';","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/objectWithoutPropertiesLoose\";\nvar _excluded = [\"value\", \"keyName\"],\n _excluded2 = [\"as\", \"render\"];\nimport { useSectionStore } from '../store/Section';\nimport { useSectionRender } from '../utils/useRender';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport var CountInfoExtra = props => {\n var {\n CountInfoExtra: Comp = {}\n } = useSectionStore();\n useSectionRender(Comp, props, 'CountInfoExtra');\n return null;\n};\nCountInfoExtra.displayName = 'JVR.CountInfoExtra';\nexport var CountInfoExtraComps = props => {\n var {\n value = {},\n keyName\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n var {\n CountInfoExtra: Comp = {}\n } = useSectionStore();\n var {\n as,\n render\n } = Comp,\n reset = _objectWithoutPropertiesLoose(Comp, _excluded2);\n if (!render && !reset.children) return null;\n var Elm = as || 'span';\n var isRender = render && typeof render === 'function';\n var elmProps = _extends({}, reset, other);\n var child = isRender && render(elmProps, {\n value,\n keyName\n });\n if (child) return child;\n return /*#__PURE__*/_jsx(Elm, _extends({}, elmProps));\n};\nCountInfoExtraComps.displayName = 'JVR.CountInfoExtraComps';","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/objectWithoutPropertiesLoose\";\nvar _excluded = [\"value\", \"keyName\"],\n _excluded2 = [\"as\", \"render\"];\nimport { useSectionStore } from '../store/Section';\nimport { useSectionRender } from '../utils/useRender';\nimport { useStore } from '../store';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport var CountInfo = props => {\n var {\n CountInfo: Comp = {}\n } = useSectionStore();\n useSectionRender(Comp, props, 'CountInfo');\n return null;\n};\nCountInfo.displayName = 'JVR.CountInfo';\nexport var CountInfoComp = props => {\n var {\n value = {},\n keyName\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n var {\n displayObjectSize\n } = useStore();\n var {\n CountInfo: Comp = {}\n } = useSectionStore();\n if (!displayObjectSize) return null;\n var {\n as,\n render\n } = Comp,\n reset = _objectWithoutPropertiesLoose(Comp, _excluded2);\n var Elm = as || 'span';\n reset.style = _extends({}, reset.style, props.style);\n var len = Object.keys(value).length;\n if (!reset.children) {\n reset.children = len + \" item\" + (len === 1 ? '' : 's');\n }\n var elmProps = _extends({}, reset, other);\n var isRender = render && typeof render === 'function';\n var child = isRender && render(_extends({}, elmProps, {\n 'data-length': len\n }), {\n value,\n keyName\n });\n if (child) return child;\n return /*#__PURE__*/_jsx(Elm, _extends({}, elmProps));\n};\nCountInfoComp.displayName = 'JVR.CountInfoComp';","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/objectWithoutPropertiesLoose\";\nvar _excluded = [\"as\", \"render\"];\nimport { useSectionStore } from '../store/Section';\nimport { useSectionRender } from '../utils/useRender';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport var Ellipsis = props => {\n var {\n Ellipsis: Comp = {}\n } = useSectionStore();\n useSectionRender(Comp, props, 'Ellipsis');\n return null;\n};\nEllipsis.displayName = 'JVR.Ellipsis';\nexport var EllipsisComp = _ref => {\n var {\n isExpanded,\n value,\n keyName\n } = _ref;\n var {\n Ellipsis: Comp = {}\n } = useSectionStore();\n var {\n as,\n render\n } = Comp,\n reset = _objectWithoutPropertiesLoose(Comp, _excluded);\n var Elm = as || 'span';\n var child = render && typeof render === 'function' && render(_extends({}, reset, {\n 'data-expanded': isExpanded\n }), {\n value,\n keyName\n });\n if (child) return child;\n if (!isExpanded || typeof value === 'object' && Object.keys(value).length == 0) return null;\n return /*#__PURE__*/_jsx(Elm, _extends({}, reset));\n};\nEllipsisComp.displayName = 'JVR.EllipsisComp';","import _extends from \"@babel/runtime/helpers/extends\";\nimport { KayName } from './KeyValues';\nimport { useExpandsStore, useExpandsDispatch } from '../store/Expands';\nimport { useStore } from '../store';\nimport { Copied } from './Copied';\nimport { CountInfoExtraComps } from '../section/CountInfoExtra';\nimport { CountInfoComp } from '../section/CountInfo';\nimport { Arrow, BracketsOpen, BracketsClose } from '../symbol';\nimport { EllipsisComp } from '../section/Ellipsis';\nimport { SetComp, MapComp } from '../types';\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nexport var NestedOpen = props => {\n var _expands$expandKey;\n var {\n keyName,\n expandKey,\n keys,\n initialValue,\n value,\n parentValue,\n level\n } = props;\n var expands = useExpandsStore();\n var dispatchExpands = useExpandsDispatch();\n var {\n onExpand,\n collapsed\n } = useStore();\n var isArray = Array.isArray(value);\n var isMySet = value instanceof Set;\n var isExpanded = (_expands$expandKey = expands[expandKey]) != null ? _expands$expandKey : typeof collapsed === 'boolean' ? collapsed : typeof collapsed === 'number' ? level > collapsed : false;\n var isObject = typeof value === 'object';\n var click = () => {\n var opt = {\n expand: !isExpanded,\n value,\n keyid: expandKey,\n keyName\n };\n onExpand && onExpand(opt);\n dispatchExpands({\n [expandKey]: opt.expand\n });\n };\n var style = {\n display: 'inline-flex',\n alignItems: 'center'\n };\n var arrowStyle = {\n transform: \"rotate(\" + (!isExpanded ? '0' : '-90') + \"deg)\",\n transition: 'all 0.3s'\n };\n var len = Object.keys(value).length;\n var showArrow = len !== 0 && (isArray || isMySet || isObject);\n var reset = {\n style\n };\n if (showArrow) {\n reset.onClick = click;\n }\n return /*#__PURE__*/_jsxs(\"span\", _extends({}, reset, {\n children: [showArrow && /*#__PURE__*/_jsx(Arrow, {\n style: arrowStyle,\n expandKey: expandKey\n }), (keyName || typeof keyName === 'number') && /*#__PURE__*/_jsx(KayName, {\n keyName: keyName\n }), /*#__PURE__*/_jsx(SetComp, {\n value: initialValue,\n keyName: keyName\n }), /*#__PURE__*/_jsx(MapComp, {\n value: initialValue,\n keyName: keyName\n }), /*#__PURE__*/_jsx(BracketsOpen, {\n isBrackets: isArray || isMySet\n }), /*#__PURE__*/_jsx(EllipsisComp, {\n keyName: keyName,\n value: value,\n isExpanded: isExpanded\n }), /*#__PURE__*/_jsx(BracketsClose, {\n isVisiable: isExpanded || !showArrow,\n isBrackets: isArray || isMySet\n }), /*#__PURE__*/_jsx(CountInfoComp, {\n value: value,\n keyName: keyName\n }), /*#__PURE__*/_jsx(CountInfoExtraComps, {\n value: value,\n keyName: keyName\n }), /*#__PURE__*/_jsx(Copied, {\n keyName: keyName,\n value: value,\n expandKey: expandKey,\n parentValue: parentValue,\n keys: keys\n })]\n }));\n};\nNestedOpen.displayName = 'JVR.NestedOpen';","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/objectWithoutPropertiesLoose\";\nvar _excluded = [\"className\", \"children\", \"parentValue\", \"keyid\", \"level\", \"value\", \"initialValue\", \"keys\", \"keyName\"];\nimport React, { forwardRef, useId } from 'react';\nimport { NestedClose } from './comps/NestedClose';\nimport { NestedOpen } from './comps/NestedOpen';\nimport { KeyValues } from './comps/KeyValues';\nimport { useShowToolsDispatch } from './store/ShowTools';\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nexport var Container = /*#__PURE__*/forwardRef((props, ref) => {\n var {\n className = '',\n parentValue,\n level = 1,\n value,\n initialValue,\n keys,\n keyName\n } = props,\n elmProps = _objectWithoutPropertiesLoose(props, _excluded);\n var dispatch = useShowToolsDispatch();\n var subkeyid = useId();\n var defaultClassNames = [className, 'w-rjv-inner'].filter(Boolean).join(' ');\n var reset = {\n onMouseEnter: () => dispatch({\n [subkeyid]: true\n }),\n onMouseLeave: () => dispatch({\n [subkeyid]: false\n })\n };\n return /*#__PURE__*/_jsxs(\"div\", _extends({\n className: defaultClassNames,\n ref: ref\n }, elmProps, reset, {\n children: [/*#__PURE__*/_jsx(NestedOpen, {\n expandKey: subkeyid,\n value: value,\n level: level,\n keys: keys,\n parentValue: parentValue,\n keyName: keyName,\n initialValue: initialValue\n }), /*#__PURE__*/_jsx(KeyValues, {\n expandKey: subkeyid,\n value: value,\n level: level,\n keys: keys,\n parentValue: parentValue,\n keyName: keyName\n }), /*#__PURE__*/_jsx(NestedClose, {\n expandKey: subkeyid,\n value: value,\n level: level\n })]\n }));\n});\nContainer.displayName = 'JVR.Container';","import { useSymbolsStore } from '../store/Symbols';\nimport { useSymbolsRender } from '../utils/useRender';\nexport var BraceLeft = props => {\n var {\n BraceLeft: Comp = {}\n } = useSymbolsStore();\n useSymbolsRender(Comp, props, 'BraceLeft');\n return null;\n};\nBraceLeft.displayName = 'JVR.BraceLeft';","import { useSymbolsStore } from '../store/Symbols';\nimport { useSymbolsRender } from '../utils/useRender';\nexport var BraceRight = props => {\n var {\n BraceRight: Comp = {}\n } = useSymbolsStore();\n useSymbolsRender(Comp, props, 'BraceRight');\n return null;\n};\nBraceRight.displayName = 'JVR.BraceRight';","import { useSymbolsStore } from '../store/Symbols';\nimport { useSymbolsRender } from '../utils/useRender';\nexport var BracketsLeft = props => {\n var {\n BracketsLeft: Comp = {}\n } = useSymbolsStore();\n useSymbolsRender(Comp, props, 'BracketsLeft');\n return null;\n};\nBracketsLeft.displayName = 'JVR.BracketsLeft';","import { useSymbolsStore } from '../store/Symbols';\nimport { useSymbolsRender } from '../utils/useRender';\nexport var BracketsRight = props => {\n var {\n BracketsRight: Comp = {}\n } = useSymbolsStore();\n useSymbolsRender(Comp, props, 'BracketsRight');\n return null;\n};\nBracketsRight.displayName = 'JVR.BracketsRight';","import { useSymbolsStore } from '../store/Symbols';\nimport { useSymbolsRender } from '../utils/useRender';\nexport var Arrow = props => {\n var {\n Arrow: Comp = {}\n } = useSymbolsStore();\n useSymbolsRender(Comp, props, 'Arrow');\n return null;\n};\nArrow.displayName = 'JVR.Arrow';","import { useSymbolsStore } from '../store/Symbols';\nimport { useSymbolsRender } from '../utils/useRender';\nexport var Colon = props => {\n var {\n Colon: Comp = {}\n } = useSymbolsStore();\n useSymbolsRender(Comp, props, 'Colon');\n return null;\n};\nColon.displayName = 'JVR.Colon';","import { useSymbolsStore } from '../store/Symbols';\nimport { useSymbolsRender } from '../utils/useRender';\nexport var Quote = props => {\n var {\n Quote: Comp = {}\n } = useSymbolsStore();\n useSymbolsRender(Comp, props, 'Quote');\n return null;\n};\nQuote.displayName = 'JVR.Quote';","import { useSymbolsStore } from '../store/Symbols';\nimport { useSymbolsRender } from '../utils/useRender';\nexport var ValueQuote = props => {\n var {\n ValueQuote: Comp = {}\n } = useSymbolsStore();\n useSymbolsRender(Comp, props, 'ValueQuote');\n return null;\n};\nValueQuote.displayName = 'JVR.ValueQuote';","import { useTypesStore } from '../store/Types';\nimport { useTypesRender } from '../utils/useRender';\nexport var Bigint = props => {\n var {\n Bigint: Comp = {}\n } = useTypesStore();\n useTypesRender(Comp, props, 'Bigint');\n return null;\n};\nBigint.displayName = 'JVR.Bigint';","import { useTypesStore } from '../store/Types';\nimport { useTypesRender } from '../utils/useRender';\nexport var Date = props => {\n var {\n Date: Comp = {}\n } = useTypesStore();\n useTypesRender(Comp, props, 'Date');\n return null;\n};\nDate.displayName = 'JVR.Date';","import { useTypesStore } from '../store/Types';\nimport { useTypesRender } from '../utils/useRender';\nexport var False = props => {\n var {\n False: Comp = {}\n } = useTypesStore();\n useTypesRender(Comp, props, 'False');\n return null;\n};\nFalse.displayName = 'JVR.False';","import { useTypesStore } from '../store/Types';\nimport { useTypesRender } from '../utils/useRender';\nexport var Float = props => {\n var {\n Float: Comp = {}\n } = useTypesStore();\n useTypesRender(Comp, props, 'Float');\n return null;\n};\nFloat.displayName = 'JVR.Float';","import { useTypesStore } from '../store/Types';\nimport { useTypesRender } from '../utils/useRender';\nexport var Int = props => {\n var {\n Int: Comp = {}\n } = useTypesStore();\n useTypesRender(Comp, props, 'Int');\n return null;\n};\nInt.displayName = 'JVR.Int';","import { useTypesStore } from '../store/Types';\nimport { useTypesRender } from '../utils/useRender';\nexport var Map = props => {\n var {\n Map: Comp = {}\n } = useTypesStore();\n useTypesRender(Comp, props, 'Map');\n return null;\n};\nMap.displayName = 'JVR.Map';","import { useTypesStore } from '../store/Types';\nimport { useTypesRender } from '../utils/useRender';\nexport var Nan = props => {\n var {\n Nan: Comp = {}\n } = useTypesStore();\n useTypesRender(Comp, props, 'Nan');\n return null;\n};\nNan.displayName = 'JVR.Nan';","import { useTypesStore } from '../store/Types';\nimport { useTypesRender } from '../utils/useRender';\nexport var Null = props => {\n var {\n Null: Comp = {}\n } = useTypesStore();\n useTypesRender(Comp, props, 'Null');\n return null;\n};\nNull.displayName = 'JVR.Null';","import { useTypesStore } from '../store/Types';\nimport { useTypesRender } from '../utils/useRender';\nexport var Set = props => {\n var {\n Set: Comp = {}\n } = useTypesStore();\n useTypesRender(Comp, props, 'Set');\n return null;\n};\nSet.displayName = 'JVR.Set';","import { useTypesStore } from '../store/Types';\nimport { useTypesRender } from '../utils/useRender';\nexport var StringText = props => {\n var {\n Str: Comp = {}\n } = useTypesStore();\n useTypesRender(Comp, props, 'Str');\n return null;\n};\nStringText.displayName = 'JVR.StringText';","import { useTypesStore } from '../store/Types';\nimport { useTypesRender } from '../utils/useRender';\nexport var True = props => {\n var {\n True: Comp = {}\n } = useTypesStore();\n useTypesRender(Comp, props, 'True');\n return null;\n};\nTrue.displayName = 'JVR.True';","import { useTypesStore } from '../store/Types';\nimport { useTypesRender } from '../utils/useRender';\nexport var Undefined = props => {\n var {\n Undefined: Comp = {}\n } = useTypesStore();\n useTypesRender(Comp, props, 'Undefined');\n return null;\n};\nUndefined.displayName = 'JVR.Undefined';","import { useTypesStore } from '../store/Types';\nimport { useTypesRender } from '../utils/useRender';\nexport var Url = props => {\n var {\n Url: Comp = {}\n } = useTypesStore();\n useTypesRender(Comp, props, 'Url');\n return null;\n};\nUrl.displayName = 'JVR.Url';","import { useSectionStore } from '../store/Section';\nimport { useSectionRender } from '../utils/useRender';\nexport var Copied = props => {\n var {\n Copied: Comp = {}\n } = useSectionStore();\n useSectionRender(Comp, props, 'Copied');\n return null;\n};\nCopied.displayName = 'JVR.Copied';","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/objectWithoutPropertiesLoose\";\nvar _excluded = [\"className\", \"style\", \"value\", \"children\", \"collapsed\", \"indentWidth\", \"displayObjectSize\", \"shortenTextAfterLength\", \"highlightUpdates\", \"enableClipboard\", \"displayDataTypes\", \"objectSortKeys\", \"onExpand\", \"onCopied\"];\nimport { forwardRef } from 'react';\nimport { Provider } from './store';\nimport { Container } from './Container';\nimport { BraceLeft } from './symbol/BraceLeft';\nimport { BraceRight } from './symbol/BraceRight';\nimport { BracketsLeft } from './symbol/BracketsLeft';\nimport { BracketsRight } from './symbol/BracketsRight';\nimport { Arrow } from './symbol/Arrow';\nimport { Colon } from './symbol/Colon';\nimport { Quote } from './symbol/Quote';\nimport { ValueQuote } from './symbol/ValueQuote';\nimport { Bigint } from './types/Bigint';\nimport { Date } from './types/Date';\nimport { False } from './types/False';\nimport { Float } from './types/Float';\nimport { Int } from './types/Int';\nimport { Map } from './types/Map';\nimport { Nan } from './types/Nan';\nimport { Null } from './types/Null';\nimport { Set } from './types/Set';\nimport { StringText } from './types/String';\nimport { True } from './types/True';\nimport { Undefined } from './types/Undefined';\nimport { Url } from './types/Url';\nimport { Copied } from './section/Copied';\nimport { CountInfo } from './section/CountInfo';\nimport { CountInfoExtra } from './section/CountInfoExtra';\nimport { Ellipsis } from './section/Ellipsis';\nimport { KeyName } from './section/KeyName';\nimport { Row } from './section/Row';\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nexport * from './store';\nexport * from './store/Expands';\nexport * from './store/ShowTools';\nexport * from './store/Symbols';\nexport * from './store/Types';\nexport * from './symbol';\nvar JsonView = /*#__PURE__*/forwardRef((props, ref) => {\n var {\n className = '',\n style,\n value,\n children,\n collapsed,\n indentWidth = 15,\n displayObjectSize = true,\n shortenTextAfterLength = 30,\n highlightUpdates = true,\n enableClipboard = true,\n displayDataTypes = true,\n objectSortKeys = false,\n onExpand,\n onCopied\n } = props,\n elmProps = _objectWithoutPropertiesLoose(props, _excluded);\n var defaultStyle = _extends({\n lineHeight: 1.4,\n fontFamily: 'var(--w-rjv-font-family, Menlo, monospace)',\n color: 'var(--w-rjv-color, #002b36)',\n backgroundColor: 'var(--w-rjv-background-color, #00000000)',\n fontSize: 13\n }, style);\n var cls = ['w-json-view-container', 'w-rjv', className].filter(Boolean).join(' ');\n return /*#__PURE__*/_jsxs(Provider, {\n initialState: {\n value,\n objectSortKeys,\n indentWidth,\n displayObjectSize,\n collapsed,\n enableClipboard,\n shortenTextAfterLength,\n highlightUpdates,\n onCopied,\n onExpand\n },\n initialTypes: {\n displayDataTypes\n },\n children: [/*#__PURE__*/_jsx(Container, _extends({\n value: value\n }, elmProps, {\n ref: ref,\n className: cls,\n style: defaultStyle\n })), children]\n });\n});\nJsonView.Bigint = Bigint;\nJsonView.Date = Date;\nJsonView.False = False;\nJsonView.Float = Float;\nJsonView.Int = Int;\nJsonView.Map = Map;\nJsonView.Nan = Nan;\nJsonView.Null = Null;\nJsonView.Set = Set;\nJsonView.String = StringText;\nJsonView.True = True;\nJsonView.Undefined = Undefined;\nJsonView.Url = Url;\nJsonView.ValueQuote = ValueQuote;\nJsonView.Arrow = Arrow;\nJsonView.Colon = Colon;\nJsonView.Quote = Quote;\nJsonView.Ellipsis = Ellipsis;\nJsonView.BraceLeft = BraceLeft;\nJsonView.BraceRight = BraceRight;\nJsonView.BracketsLeft = BracketsLeft;\nJsonView.BracketsRight = BracketsRight;\nJsonView.Copied = Copied;\nJsonView.CountInfo = CountInfo;\nJsonView.CountInfoExtra = CountInfoExtra;\nJsonView.KeyName = KeyName;\nJsonView.Row = Row;\nJsonView.displayName = 'JVR.JsonView';\nexport default JsonView;","import { Fragment, useState, useReducer, useEffect } from 'react';\nimport JsonView, { JsonViewProps } from '@uiw/react-json-view';\nimport { styled } from 'styled-components';\nimport { lightTheme } from '@uiw/react-json-view/light';\nimport { darkTheme } from '@uiw/react-json-view/dark';\nimport { nordTheme } from '@uiw/react-json-view/nord';\nimport { githubLightTheme } from '@uiw/react-json-view/githubLight';\nimport { githubDarkTheme } from '@uiw/react-json-view/githubDark';\nimport { vscodeTheme } from '@uiw/react-json-view/vscode';\nimport { gruvboxTheme } from '@uiw/react-json-view/gruvbox';\nimport { monokaiTheme } from '@uiw/react-json-view/monokai';\nimport { basicTheme } from '@uiw/react-json-view/basic';\n\nexport const themesData = {\n nord: nordTheme,\n light: lightTheme,\n dark: darkTheme,\n basic: basicTheme,\n vscode: vscodeTheme,\n githubLight: githubLightTheme,\n githubDark: githubDarkTheme,\n gruvbox: gruvboxTheme,\n monokai: monokaiTheme,\n};\nconst mySet = new Set();\nmySet.add(1); // Set(1) { 1 }\nmySet.add(5); // Set(2) { 1, 5 }\nmySet.add(5); // Set(2) { 1, 5 }\nmySet.add('some text'); // Set(3) { 1, 5, 'some text' }\n\nconst myMap = new Map();\nmyMap.set('www', 'foo');\nmyMap.set(1, 'bar');\n\nconst avatar = 'https://i.imgur.com/1bX5QH6.jpg';\n// const longArray = new Array(1000).fill(1);\nfunction aPlusB(a: number, b: number) {\n return a + b;\n}\nexport const example = {\n avatar,\n string: 'Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet Lorem ipsum dolor sit amet',\n integer: 42,\n float: 114.514,\n bigint: BigInt(10086),\n nan: NaN,\n null: null,\n undefined,\n boolean: true,\n timer: 0,\n date: new Date('Tue Sep 13 2022 14:07:44 GMT-0500 (Central Daylight Time)'),\n array: [19, 100.86, 'test', NaN, Infinity],\n emptyArray: [],\n nestedArray: [[1, 2], [3, 4], { a: 1 }],\n object3: {},\n object2: {\n 'first-child': true,\n 'second-child': false,\n 'last-child': null,\n },\n url: new URL('https://wangchujiang.com/'),\n fn: aPlusB,\n // // longArray,\n string_number: '1234',\n string_empty: '',\n mySet,\n myMap,\n};\n\nconst Label = styled.label`\n margin-top: 0.83rem;\n display: block;\n span {\n padding-right: 6px;\n }\n`;\n\nconst Options = styled.div`\n display: grid;\n grid-template-columns: 50% 60%;\n`;\n\nconst initialState: Partial<\n JsonViewProps & {\n quote: string;\n theme: keyof typeof themesData;\n }\n> = {\n displayObjectSize: true,\n displayDataTypes: true,\n enableClipboard: true,\n highlightUpdates: true,\n objectSortKeys: false,\n indentWidth: 15,\n collapsed: 2,\n quote: '\"',\n shortenTextAfterLength: 50,\n theme: 'nord',\n};\n\nconst reducer = (state: typeof initialState, action: typeof initialState) => ({ ...state, ...action });\n\nexport function Example() {\n const [state, dispatch] = useReducer(reducer, initialState);\n const [src, setSrc] = useState({ ...example });\n const themeKeys = Object.keys(themesData) as Array;\n\n useEffect(() => {\n const loop = () => {\n setSrc((src) => ({\n ...src,\n timer: src.timer + 1,\n }));\n };\n const id = setInterval(loop, 1000);\n return () => clearInterval(id);\n }, []);\n\n return (\n \n \n {\n if (keyName === 'integer' && typeof value === 'number' && value > 10) {\n return {keyName};\n }\n }}\n />\n {state.quote}\n {\n if (!state.quote?.trim()) return ;\n return {state.quote};\n }}\n />\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n );\n}\n","export var nordTheme = {\n '--w-rjv-font-family': 'monospace',\n '--w-rjv-color': '#88c0d0',\n '--w-rjv-key-string': '#88c0d0',\n '--w-rjv-background-color': '#2e3440',\n '--w-rjv-line-color': '#4c566a',\n '--w-rjv-arrow-color': 'var(--w-rjv-color)',\n '--w-rjv-edit-color': 'var(--w-rjv-color)',\n '--w-rjv-info-color': '#c7c7c74d',\n '--w-rjv-update-color': '#88c0cf75',\n '--w-rjv-copied-color': '#119cc0',\n '--w-rjv-copied-success-color': '#28a745',\n '--w-rjv-curlybraces-color': '#8fbcbb',\n '--w-rjv-colon-color': '#6d9fac',\n '--w-rjv-brackets-color': '#8fbcbb',\n '--w-rjv-quotes-color': 'var(--w-rjv-key-string)',\n '--w-rjv-quotes-string-color': 'var(--w-rjv-type-string-color)',\n '--w-rjv-type-string-color': '#a3be8c',\n '--w-rjv-type-int-color': '#b48ead',\n '--w-rjv-type-float-color': '#859900',\n '--w-rjv-type-bigint-color': '#b48ead',\n '--w-rjv-type-boolean-color': '#d08770',\n '--w-rjv-type-date-color': '#41a2c2',\n '--w-rjv-type-url-color': '#5e81ac',\n '--w-rjv-type-null-color': '#5e81ac',\n '--w-rjv-type-nan-color': '#859900',\n '--w-rjv-type-undefined-color': '#586e75'\n};","export var lightTheme = {\n '--w-rjv-font-family': 'monospace',\n '--w-rjv-color': '#002b36',\n '--w-rjv-key-string': '#002b36',\n '--w-rjv-background-color': '#ffffff',\n '--w-rjv-line-color': '#ebebeb',\n '--w-rjv-arrow-color': 'var(--w-rjv-color)',\n '--w-rjv-edit-color': 'var(--w-rjv-color)',\n '--w-rjv-info-color': '#0000004d',\n '--w-rjv-update-color': '#ebcb8b',\n '--w-rjv-copied-color': '#002b36',\n '--w-rjv-copied-success-color': '#28a745',\n '--w-rjv-curlybraces-color': '#236a7c',\n '--w-rjv-colon-color': '#002b36',\n '--w-rjv-brackets-color': '#236a7c',\n '--w-rjv-quotes-color': 'var(--w-rjv-key-string)',\n '--w-rjv-quotes-string-color': 'var(--w-rjv-type-string-color)',\n '--w-rjv-type-string-color': '#cb4b16',\n '--w-rjv-type-int-color': '#268bd2',\n '--w-rjv-type-float-color': '#859900',\n '--w-rjv-type-bigint-color': '#268bd2',\n '--w-rjv-type-boolean-color': '#2aa198',\n '--w-rjv-type-date-color': '#586e75',\n '--w-rjv-type-url-color': '#0969da',\n '--w-rjv-type-null-color': '#d33682',\n '--w-rjv-type-nan-color': '#859900',\n '--w-rjv-type-undefined-color': '#586e75'\n};","export var darkTheme = {\n '--w-rjv-font-family': 'monospace',\n '--w-rjv-color': '#0184a6',\n '--w-rjv-key-string': '#0184a6',\n '--w-rjv-background-color': '#202020',\n '--w-rjv-line-color': '#323232',\n '--w-rjv-arrow-color': 'var(--w-rjv-color)',\n '--w-rjv-edit-color': 'var(--w-rjv-color)',\n '--w-rjv-info-color': '#656565',\n '--w-rjv-update-color': '#ebcb8b',\n '--w-rjv-copied-color': '#0184a6',\n '--w-rjv-copied-success-color': '#28a745',\n '--w-rjv-curlybraces-color': '#1896b6',\n '--w-rjv-brackets-color': '#1896b6',\n '--w-rjv-quotes-color': 'var(--w-rjv-key-string)',\n '--w-rjv-quotes-string-color': 'var(--w-rjv-type-string-color)',\n '--w-rjv-type-string-color': '#cb4b16',\n '--w-rjv-type-int-color': '#268bd2',\n '--w-rjv-type-float-color': '#859900',\n '--w-rjv-type-bigint-color': '#268bd2',\n '--w-rjv-type-boolean-color': '#2aa198',\n '--w-rjv-type-date-color': '#586e75',\n '--w-rjv-type-url-color': '#649bd8',\n '--w-rjv-type-null-color': '#d33682',\n '--w-rjv-type-nan-color': '#076678',\n '--w-rjv-type-undefined-color': '#586e75'\n};","export var basicTheme = {\n '--w-rjv-font-family': 'monospace',\n '--w-rjv-color': '#b5bd68',\n '--w-rjv-key-number': '#002b36',\n '--w-rjv-key-string': '#b5bd68',\n '--w-rjv-background-color': '#2E3235',\n '--w-rjv-line-color': '#292d30',\n '--w-rjv-arrow-color': 'var(--w-rjv-color)',\n '--w-rjv-edit-color': 'var(--w-rjv-color)',\n '--w-rjv-info-color': '#d8d8d84d',\n '--w-rjv-update-color': '#b5bd68',\n '--w-rjv-copied-color': '#b5bd68',\n '--w-rjv-copied-success-color': '#28a745',\n '--w-rjv-curlybraces-color': '#cc99cc',\n '--w-rjv-colon-color': '#bababa',\n '--w-rjv-brackets-color': '#808080',\n '--w-rjv-ellipsis-color': '#cb4b16',\n '--w-rjv-quotes-color': 'var(--w-rjv-key-string)',\n '--w-rjv-quotes-string-color': 'var(--w-rjv-type-string-color)',\n '--w-rjv-type-string-color': '#b5bd68',\n '--w-rjv-type-int-color': '#fda331',\n '--w-rjv-type-float-color': '#fda331',\n '--w-rjv-type-bigint-color': '#fda331',\n '--w-rjv-type-boolean-color': '#fda331',\n '--w-rjv-type-date-color': '#8abeb7',\n '--w-rjv-type-url-color': '#5a89c0',\n '--w-rjv-type-null-color': '#8abeb7',\n '--w-rjv-type-nan-color': '#8abeb7',\n '--w-rjv-type-undefined-color': '#8abeb7'\n};","export var vscodeTheme = {\n '--w-rjv-font-family': 'monospace',\n '--w-rjv-color': '#9cdcfe',\n '--w-rjv-key-string': '#9cdcfe',\n '--w-rjv-background-color': '#1e1e1e',\n '--w-rjv-line-color': '#36334280',\n '--w-rjv-arrow-color': '#838383',\n '--w-rjv-edit-color': 'var(--w-rjv-color)',\n '--w-rjv-info-color': '#9c9c9c7a',\n '--w-rjv-update-color': '#9cdcfe',\n '--w-rjv-copied-color': '#9cdcfe',\n '--w-rjv-copied-success-color': '#28a745',\n '--w-rjv-curlybraces-color': '#d4d4d4',\n '--w-rjv-colon-color': '#d4d4d4',\n '--w-rjv-brackets-color': '#d4d4d4',\n '--w-rjv-quotes-color': 'var(--w-rjv-key-string)',\n '--w-rjv-quotes-string-color': 'var(--w-rjv-type-string-color)',\n '--w-rjv-type-string-color': '#ce9178',\n '--w-rjv-type-int-color': '#b5cea8',\n '--w-rjv-type-float-color': '#b5cea8',\n '--w-rjv-type-bigint-color': '#b5cea8',\n '--w-rjv-type-boolean-color': '#569cd6',\n '--w-rjv-type-date-color': '#b5cea8',\n '--w-rjv-type-url-color': '#3b89cf',\n '--w-rjv-type-null-color': '#569cd6',\n '--w-rjv-type-nan-color': '#859900',\n '--w-rjv-type-undefined-color': '#569cd6'\n};","export var githubLightTheme = {\n '--w-rjv-font-family': 'monospace',\n '--w-rjv-color': '#6f42c1',\n '--w-rjv-key-string': '#6f42c1',\n '--w-rjv-background-color': '#ffffff',\n '--w-rjv-line-color': '#ddd',\n '--w-rjv-arrow-color': '#6e7781',\n '--w-rjv-edit-color': 'var(--w-rjv-color)',\n '--w-rjv-info-color': '#0000004d',\n '--w-rjv-update-color': '#ebcb8b',\n '--w-rjv-copied-color': '#002b36',\n '--w-rjv-copied-success-color': '#28a745',\n '--w-rjv-curlybraces-color': '#6a737d',\n '--w-rjv-colon-color': '#24292e',\n '--w-rjv-brackets-color': '#6a737d',\n '--w-rjv-quotes-color': 'var(--w-rjv-key-string)',\n '--w-rjv-quotes-string-color': 'var(--w-rjv-type-string-color)',\n '--w-rjv-type-string-color': '#032f62',\n '--w-rjv-type-int-color': '#005cc5',\n '--w-rjv-type-float-color': '#005cc5',\n '--w-rjv-type-bigint-color': '#005cc5',\n '--w-rjv-type-boolean-color': '#d73a49',\n '--w-rjv-type-date-color': '#005cc5',\n '--w-rjv-type-url-color': '#0969da',\n '--w-rjv-type-null-color': '#d73a49',\n '--w-rjv-type-nan-color': '#859900',\n '--w-rjv-type-undefined-color': '#005cc5'\n};","export var githubDarkTheme = {\n '--w-rjv-font-family': 'monospace',\n '--w-rjv-color': '#79c0ff',\n '--w-rjv-key-string': '#79c0ff',\n '--w-rjv-background-color': '#0d1117',\n '--w-rjv-line-color': '#94949480',\n '--w-rjv-arrow-color': '#ccc',\n '--w-rjv-edit-color': 'var(--w-rjv-color)',\n '--w-rjv-info-color': '#7b7b7b',\n '--w-rjv-update-color': '#ebcb8b',\n '--w-rjv-copied-color': '#79c0ff',\n '--w-rjv-copied-success-color': '#28a745',\n '--w-rjv-curlybraces-color': '#8b949e',\n '--w-rjv-colon-color': '#c9d1d9',\n '--w-rjv-brackets-color': '#8b949e',\n '--w-rjv-quotes-color': 'var(--w-rjv-key-string)',\n '--w-rjv-quotes-string-color': 'var(--w-rjv-type-string-color)',\n '--w-rjv-type-string-color': '#a5d6ff',\n '--w-rjv-type-int-color': '#79c0ff',\n '--w-rjv-type-float-color': '#79c0ff',\n '--w-rjv-type-bigint-color': '#79c0ff',\n '--w-rjv-type-boolean-color': '#ffab70',\n '--w-rjv-type-date-color': '#79c0ff',\n '--w-rjv-type-url-color': '#4facff',\n '--w-rjv-type-null-color': '#ff7b72',\n '--w-rjv-type-nan-color': '#859900',\n '--w-rjv-type-undefined-color': '#79c0ff'\n};","export var gruvboxTheme = {\n '--w-rjv-font-family': 'monospace',\n '--w-rjv-color': '#3c3836',\n '--w-rjv-key-string': '#3c3836',\n '--w-rjv-background-color': '#fbf1c7',\n '--w-rjv-line-color': '#ebdbb2',\n '--w-rjv-arrow-color': 'var(--w-rjv-color)',\n '--w-rjv-edit-color': 'var(--w-rjv-color)',\n '--w-rjv-info-color': '#0000004d',\n '--w-rjv-update-color': '#ebcb8b',\n '--w-rjv-copied-color': '#002b36',\n '--w-rjv-copied-success-color': '#28a745',\n '--w-rjv-curlybraces-color': '#236a7c',\n '--w-rjv-colon-color': '#002b36',\n '--w-rjv-brackets-color': '#236a7c',\n '--w-rjv-quotes-color': 'var(--w-rjv-key-string)',\n '--w-rjv-quotes-string-color': 'var(--w-rjv-type-string-color)',\n '--w-rjv-type-string-color': '#3c3836',\n '--w-rjv-type-int-color': '#8f3f71',\n '--w-rjv-type-float-color': '#8f3f71',\n '--w-rjv-type-bigint-color': '#8f3f71',\n '--w-rjv-type-boolean-color': '#8f3f71',\n '--w-rjv-type-date-color': '#076678',\n '--w-rjv-type-url-color': '#0969da',\n '--w-rjv-type-null-color': '#076678',\n '--w-rjv-type-nan-color': '#076678',\n '--w-rjv-type-undefined-color': '#076678'\n};","export var monokaiTheme = {\n '--w-rjv-font-family': 'monospace',\n '--w-rjv-color': '#E6DB74',\n '--w-rjv-key-string': '#E6DB74',\n '--w-rjv-background-color': '#272822',\n '--w-rjv-line-color': '#3e3d32',\n '--w-rjv-arrow-color': '#f8f8f2',\n '--w-rjv-edit-color': 'var(--w-rjv-color)',\n '--w-rjv-info-color': '#cecece4d',\n '--w-rjv-update-color': '#5f5600',\n '--w-rjv-copied-color': '#E6DB74',\n '--w-rjv-copied-success-color': '#28a745',\n '--w-rjv-curlybraces-color': '#f8f8f2',\n '--w-rjv-colon-color': '#f8f8f2',\n '--w-rjv-brackets-color': '#f8f8f2',\n '--w-rjv-quotes-color': 'var(--w-rjv-key-string)',\n '--w-rjv-quotes-string-color': 'var(--w-rjv-type-string-color)',\n '--w-rjv-type-string-color': '#E6DB74',\n '--w-rjv-type-int-color': '#AE81FF',\n '--w-rjv-type-float-color': '#AE81FF',\n '--w-rjv-type-bigint-color': '#AE81FF',\n '--w-rjv-type-boolean-color': '#AE81FF',\n '--w-rjv-type-date-color': '#fd9720c7',\n '--w-rjv-type-url-color': '#55a3ff',\n '--w-rjv-type-null-color': '#FA2672',\n '--w-rjv-type-nan-color': '#FD971F',\n '--w-rjv-type-undefined-color': '#FD971F'\n};","import { useState } from 'react';\nimport styled, { css } from 'styled-components';\nimport { Example } from './example/default';\n// import ExampleEditor from './example/editor';\n\nconst ExampleWrapper = styled.div`\n max-width: 630px;\n margin: 0 auto;\n padding-bottom: 3rem;\n`;\n\nconst TabItem = styled.div`\n padding-bottom: 10px;\n`;\n\nconst Button = styled.button<{ $active: boolean }>`\n background: transparent;\n border: 0;\n cursor: pointer;\n border-radius: 3px;\n ${({ $active }) =>\n $active &&\n css`\n background-color: var(--color-theme-text, #bce0ff);\n color: var(--color-theme-bg);\n `}\n`;\n\nexport default function App() {\n const [tabs, setTabs] = useState<'preview' | 'editor'>('preview');\n return (\n \n \n \n {/* */}\n \n {tabs === 'preview' && }\n {/* {tabs === 'editor' && } */}\n \n );\n}\n","import React from 'react';\nimport { STATIC_EXECUTION_CONTEXT } from '../constants';\nimport GlobalStyle from '../models/GlobalStyle';\nimport { useStyleSheetContext } from '../models/StyleSheetManager';\nimport { DefaultTheme, ThemeContext } from '../models/ThemeProvider';\nimport StyleSheet from '../sheet';\nimport { ExecutionContext, ExecutionProps, Interpolation, Stringifier, Styles } from '../types';\nimport { checkDynamicCreation } from '../utils/checkDynamicCreation';\nimport determineTheme from '../utils/determineTheme';\nimport generateComponentId from '../utils/generateComponentId';\nimport css from './css';\n\nexport default function createGlobalStyle(\n strings: Styles,\n ...interpolations: Array>\n) {\n const rules = css(strings, ...interpolations);\n const styledComponentId = `sc-global-${generateComponentId(JSON.stringify(rules))}`;\n const globalStyle = new GlobalStyle(rules, styledComponentId);\n\n if (process.env.NODE_ENV !== 'production') {\n checkDynamicCreation(styledComponentId);\n }\n\n const GlobalStyleComponent: React.ComponentType = props => {\n const ssc = useStyleSheetContext();\n const theme = React.useContext(ThemeContext);\n const instanceRef = React.useRef(ssc.styleSheet.allocateGSInstance(styledComponentId));\n\n const instance = instanceRef.current;\n\n if (process.env.NODE_ENV !== 'production' && React.Children.count(props.children)) {\n console.warn(\n `The global style component ${styledComponentId} was given child JSX. createGlobalStyle does not render children.`\n );\n }\n\n if (\n process.env.NODE_ENV !== 'production' &&\n rules.some(rule => typeof rule === 'string' && rule.indexOf('@import') !== -1)\n ) {\n console.warn(\n `Please do not use @import CSS syntax in createGlobalStyle at this time, as the CSSOM APIs we use in production do not handle it well. Instead, we recommend using a library such as react-helmet to inject a typical meta tag to the stylesheet, or simply embedding it manually in your index.html section for a simpler app.`\n );\n }\n\n if (ssc.styleSheet.server) {\n renderStyles(instance, props, ssc.styleSheet, theme, ssc.stylis);\n }\n\n if (!__SERVER__) {\n React.useLayoutEffect(() => {\n if (!ssc.styleSheet.server) {\n renderStyles(instance, props, ssc.styleSheet, theme, ssc.stylis);\n return () => globalStyle.removeStyles(instance, ssc.styleSheet);\n }\n }, [instance, props, ssc.styleSheet, theme, ssc.stylis]);\n }\n\n return null;\n };\n\n function renderStyles(\n instance: number,\n props: ExecutionProps,\n styleSheet: StyleSheet,\n theme: DefaultTheme | undefined,\n stylis: Stringifier\n ) {\n if (globalStyle.isStatic) {\n globalStyle.renderStyles(\n instance,\n STATIC_EXECUTION_CONTEXT as unknown as ExecutionContext & Props,\n styleSheet,\n stylis\n );\n } else {\n const context = {\n ...props,\n theme: determineTheme(props, theme, GlobalStyleComponent.defaultProps),\n } as ExecutionContext & Props;\n\n globalStyle.renderStyles(instance, context, styleSheet, stylis);\n }\n }\n\n return React.memo(GlobalStyleComponent);\n}\n","import React from 'react';\nimport { createRoot } from 'react-dom/client';\nimport { createGlobalStyle } from 'styled-components';\nimport data from '@uiw/react-json-view/README.md';\nimport MarkdownPreviewExample from '@uiw/react-markdown-preview-example';\nimport App from './App';\n\nexport const GlobalStyle = createGlobalStyle`\n [data-color-mode*='dark'], [data-color-mode*='dark'] body {\n --tabs-bg: #5f5f5f;\n }\n [data-color-mode*='light'], [data-color-mode*='light'] body {\n background-color: #f2f2f2;\n --tabs-bg: #bce0ff;\n }\n * {\n box-sizing: border-box;\n }\n .w-rjv {\n padding: 0.4rem;\n border-radius: 0.2rem;\n }\n`;\n\nconst Github = MarkdownPreviewExample.Github;\nconst Example = MarkdownPreviewExample.Example;\n\nconst container = document.getElementById('root');\nconst root = createRoot(container!);\nroot.render(\n \n \n Sponsor\n ,\n ]}\n />\n \n \n \n \n ,\n);\n","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\")[\"default\"];\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\")[\"default\"];\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.Container = void 0;\nvar _objectSpread2 = _interopRequireDefault(require(\"@babel/runtime/helpers/objectSpread2\"));\nvar _defineProperty2 = _interopRequireDefault(require(\"@babel/runtime/helpers/defineProperty\"));\nvar _objectWithoutProperties2 = _interopRequireDefault(require(\"@babel/runtime/helpers/objectWithoutProperties\"));\nvar _react = _interopRequireWildcard(require(\"react\"));\nvar _NestedClose = require(\"./comps/NestedClose\");\nvar _NestedOpen = require(\"./comps/NestedOpen\");\nvar _KeyValues = require(\"./comps/KeyValues\");\nvar _ShowTools = require(\"./store/ShowTools\");\nvar _jsxRuntime = require(\"react/jsx-runtime\");\nvar _excluded = [\"className\", \"children\", \"parentValue\", \"keyid\", \"level\", \"value\", \"initialValue\", \"keys\", \"keyName\"];\nvar Container = exports.Container = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {\n var _props$className = props.className,\n className = _props$className === void 0 ? '' : _props$className,\n children = props.children,\n parentValue = props.parentValue,\n keyid = props.keyid,\n _props$level = props.level,\n level = _props$level === void 0 ? 1 : _props$level,\n value = props.value,\n initialValue = props.initialValue,\n keys = props.keys,\n keyName = props.keyName,\n elmProps = (0, _objectWithoutProperties2[\"default\"])(props, _excluded);\n var dispatch = (0, _ShowTools.useShowToolsDispatch)();\n var subkeyid = (0, _react.useId)();\n var defaultClassNames = [className, 'w-rjv-inner'].filter(Boolean).join(' ');\n var reset = {\n onMouseEnter: function onMouseEnter() {\n return dispatch((0, _defineProperty2[\"default\"])({}, subkeyid, true));\n },\n onMouseLeave: function onMouseLeave() {\n return dispatch((0, _defineProperty2[\"default\"])({}, subkeyid, false));\n }\n };\n return /*#__PURE__*/(0, _jsxRuntime.jsxs)(\"div\", (0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({\n className: defaultClassNames,\n ref: ref\n }, elmProps), reset), {}, {\n children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_NestedOpen.NestedOpen, {\n expandKey: subkeyid,\n value: value,\n level: level,\n keys: keys,\n parentValue: parentValue,\n keyName: keyName,\n initialValue: initialValue\n }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_KeyValues.KeyValues, {\n expandKey: subkeyid,\n value: value,\n level: level,\n keys: keys,\n parentValue: parentValue,\n keyName: keyName\n }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_NestedClose.NestedClose, {\n expandKey: subkeyid,\n value: value,\n level: level\n })]\n }));\n});\nContainer.displayName = 'JVR.Container';","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\")[\"default\"];\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.TriangleArrow = TriangleArrow;\nvar _objectSpread2 = _interopRequireDefault(require(\"@babel/runtime/helpers/objectSpread2\"));\nvar _objectWithoutProperties2 = _interopRequireDefault(require(\"@babel/runtime/helpers/objectWithoutProperties\"));\nvar _react = _interopRequireDefault(require(\"react\"));\nvar _jsxRuntime = require(\"react/jsx-runtime\");\nvar _excluded = [\"style\"];\nfunction TriangleArrow(props) {\n var style = props.style,\n reset = (0, _objectWithoutProperties2[\"default\"])(props, _excluded);\n var defaultStyle = (0, _objectSpread2[\"default\"])({\n cursor: 'pointer',\n height: '1em',\n width: '1em',\n userSelect: 'none',\n display: 'inline-flex'\n }, style);\n return /*#__PURE__*/(0, _jsxRuntime.jsx)(\"svg\", (0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({\n viewBox: \"0 0 24 24\",\n fill: \"var(--w-rjv-arrow-color, currentColor)\",\n style: defaultStyle\n }, reset), {}, {\n children: /*#__PURE__*/(0, _jsxRuntime.jsx)(\"path\", {\n d: \"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z\"\n })\n }));\n}\nTriangleArrow.displayName = 'JVR.TriangleArrow';","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\")[\"default\"];\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.TriangleSolidArrow = TriangleSolidArrow;\nvar _objectSpread2 = _interopRequireDefault(require(\"@babel/runtime/helpers/objectSpread2\"));\nvar _objectWithoutProperties2 = _interopRequireDefault(require(\"@babel/runtime/helpers/objectWithoutProperties\"));\nvar _react = _interopRequireDefault(require(\"react\"));\nvar _jsxRuntime = require(\"react/jsx-runtime\");\nvar _excluded = [\"style\"];\nfunction TriangleSolidArrow(props) {\n var style = props.style,\n reset = (0, _objectWithoutProperties2[\"default\"])(props, _excluded);\n var defaultStyle = (0, _objectSpread2[\"default\"])({\n cursor: 'pointer',\n height: '1em',\n width: '1em',\n userSelect: 'none',\n display: 'flex'\n }, style);\n return /*#__PURE__*/(0, _jsxRuntime.jsx)(\"svg\", (0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({\n viewBox: \"0 0 30 30\",\n fill: \"var(--w-rjv-arrow-color, currentColor)\",\n height: \"1em\",\n width: \"1em\",\n style: defaultStyle\n }, reset), {}, {\n children: /*#__PURE__*/(0, _jsxRuntime.jsx)(\"path\", {\n d: \"M14.1758636,22.5690012 C14.3620957,22.8394807 14.6694712,23.001033 14.9978636,23.001033 C15.326256,23.001033 15.6336315,22.8394807 15.8198636,22.5690012 L24.8198636,9.56900125 C25.0322035,9.2633716 25.0570548,8.86504616 24.8843497,8.5353938 C24.7116447,8.20574144 24.3700159,7.99941506 23.9978636,8 L5.9978636,8 C5.62665,8.00153457 5.28670307,8.20817107 5.11443241,8.53699428 C4.94216175,8.86581748 4.96580065,9.26293681 5.1758636,9.56900125 L14.1758636,22.5690012 Z\"\n })\n }));\n}\nTriangleSolidArrow.displayName = 'JVR.TriangleSolidArrow';","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\")[\"default\"];\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.Copied = void 0;\nvar _objectSpread2 = _interopRequireDefault(require(\"@babel/runtime/helpers/objectSpread2\"));\nvar _slicedToArray2 = _interopRequireDefault(require(\"@babel/runtime/helpers/slicedToArray\"));\nvar _objectWithoutProperties2 = _interopRequireDefault(require(\"@babel/runtime/helpers/objectWithoutProperties\"));\nvar _react = require(\"react\");\nvar _store = require(\"../store\");\nvar _Section = require(\"../store/Section\");\nvar _ShowTools = require(\"../store/ShowTools\");\nvar _types = require(\"../types\");\nvar _jsxRuntime = require(\"react/jsx-runtime\");\nvar _excluded = [\"keyName\", \"value\", \"parentValue\", \"expandKey\", \"keys\"],\n _excluded2 = [\"as\", \"render\"];\nvar Copied = exports.Copied = function Copied(props) {\n var keyName = props.keyName,\n value = props.value,\n parentValue = props.parentValue,\n expandKey = props.expandKey,\n keys = props.keys,\n other = (0, _objectWithoutProperties2[\"default\"])(props, _excluded);\n var _useStore = (0, _store.useStore)(),\n onCopied = _useStore.onCopied,\n enableClipboard = _useStore.enableClipboard;\n var showTools = (0, _ShowTools.useShowToolsStore)();\n var isShowTools = showTools[expandKey];\n var _useState = (0, _react.useState)(false),\n _useState2 = (0, _slicedToArray2[\"default\"])(_useState, 2),\n copied = _useState2[0],\n setCopied = _useState2[1];\n var _useSectionStore = (0, _Section.useSectionStore)(),\n _useSectionStore$Copi = _useSectionStore.Copied,\n Comp = _useSectionStore$Copi === void 0 ? {} : _useSectionStore$Copi;\n if (enableClipboard === false || !isShowTools) return null;\n var click = function click(event) {\n event.stopPropagation();\n var copyText = '';\n if (typeof value === 'number' && value === Infinity) {\n copyText = 'Infinity';\n } else if (typeof value === 'number' && isNaN(value)) {\n copyText = 'NaN';\n } else if (typeof value === 'bigint') {\n copyText = (0, _types.bigIntToString)(value);\n } else if (value instanceof Date) {\n copyText = value.toLocaleString();\n } else {\n copyText = JSON.stringify(value, function (_, v) {\n return typeof v === 'bigint' ? (0, _types.bigIntToString)(v) : v;\n }, 2);\n }\n onCopied && onCopied(copyText, value);\n setCopied(true);\n var _clipboard = navigator.clipboard || {\n writeText: function writeText(text) {\n return new Promise(function (reslove, reject) {\n var textarea = document.createElement('textarea');\n textarea.style.position = 'absolute';\n textarea.style.opacity = '0';\n textarea.style.left = '-99999999px';\n textarea.value = text;\n document.body.appendChild(textarea);\n textarea.select();\n if (!document.execCommand('copy')) {\n reject();\n } else {\n reslove();\n }\n textarea.remove();\n });\n }\n };\n _clipboard.writeText(copyText).then(function () {\n var timer = setTimeout(function () {\n setCopied(false);\n clearTimeout(timer);\n }, 3000);\n })[\"catch\"](function (error) {});\n };\n var svgProps = {\n style: {\n display: 'inline-flex'\n },\n fill: copied ? 'var(--w-rjv-copied-success-color, #28a745)' : 'var(--w-rjv-copied-color, currentColor)',\n onClick: click\n };\n var as = Comp.as,\n render = Comp.render,\n reset = (0, _objectWithoutProperties2[\"default\"])(Comp, _excluded2);\n var elmProps = (0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, reset), other), svgProps), {}, {\n style: (0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, reset.style), other.style), svgProps.style)\n });\n var isRender = render && typeof render === 'function';\n var child = isRender && render((0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, elmProps), {}, {\n 'data-copied': copied\n }), {\n value: value,\n keyName: keyName,\n keys: keys,\n parentValue: parentValue\n });\n if (child) return child;\n if (copied) {\n return /*#__PURE__*/(0, _jsxRuntime.jsx)(\"svg\", (0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({\n viewBox: \"0 0 32 36\"\n }, elmProps), {}, {\n children: /*#__PURE__*/(0, _jsxRuntime.jsx)(\"path\", {\n d: \"M27.5,33 L2.5,33 L2.5,12.5 L27.5,12.5 L27.5,15.2249049 C29.1403264,13.8627542 29.9736597,13.1778155 30,13.1700887 C30,11.9705278 30,10.0804982 30,7.5 C30,6.1 28.9,5 27.5,5 L20,5 C20,2.2 17.8,0 15,0 C12.2,0 10,2.2 10,5 L2.5,5 C1.1,5 0,6.1 0,7.5 L0,33 C0,34.4 1.1,36 2.5,36 L27.5,36 C28.9,36 30,34.4 30,33 L30,26.1114493 L27.5,28.4926435 L27.5,33 Z M7.5,7.5 L10,7.5 C10,7.5 12.5,6.4 12.5,5 C12.5,3.6 13.6,2.5 15,2.5 C16.4,2.5 17.5,3.6 17.5,5 C17.5,6.4 18.8,7.5 20,7.5 L22.5,7.5 C22.5,7.5 25,8.6 25,10 L5,10 C5,8.5 6.1,7.5 7.5,7.5 Z M5,27.5 L10,27.5 L10,25 L5,25 L5,27.5 Z M28.5589286,16 L32,19.6 L21.0160714,30.5382252 L13.5303571,24.2571429 L17.1303571,20.6571429 L21.0160714,24.5428571 L28.5589286,16 Z M17.5,15 L5,15 L5,17.5 L17.5,17.5 L17.5,15 Z M10,20 L5,20 L5,22.5 L10,22.5 L10,20 Z\"\n })\n }));\n }\n return /*#__PURE__*/(0, _jsxRuntime.jsx)(\"svg\", (0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({\n viewBox: \"0 0 32 36\"\n }, elmProps), {}, {\n children: /*#__PURE__*/(0, _jsxRuntime.jsx)(\"path\", {\n d: \"M27.5,33 L2.5,33 L2.5,12.5 L27.5,12.5 L27.5,20 L30,20 L30,7.5 C30,6.1 28.9,5 27.5,5 L20,5 C20,2.2 17.8,0 15,0 C12.2,0 10,2.2 10,5 L2.5,5 C1.1,5 0,6.1 0,7.5 L0,33 C0,34.4 1.1,36 2.5,36 L27.5,36 C28.9,36 30,34.4 30,33 L30,29 L27.5,29 L27.5,33 Z M7.5,7.5 L10,7.5 C10,7.5 12.5,6.4 12.5,5 C12.5,3.6 13.6,2.5 15,2.5 C16.4,2.5 17.5,3.6 17.5,5 C17.5,6.4 18.8,7.5 20,7.5 L22.5,7.5 C22.5,7.5 25,8.6 25,10 L5,10 C5,8.5 6.1,7.5 7.5,7.5 Z M5,27.5 L10,27.5 L10,25 L5,25 L5,27.5 Z M22.5,21.5 L22.5,16.5 L12.5,24 L22.5,31.5 L22.5,26.5 L32,26.5 L32,21.5 L22.5,21.5 Z M17.5,15 L5,15 L5,17.5 L17.5,17.5 L17.5,15 Z M10,20 L5,20 L5,22.5 L10,22.5 L10,20 Z\"\n })\n }));\n};\nCopied.displayName = 'JVR.Copied';","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\")[\"default\"];\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.KeyValuesItem = exports.KeyValues = exports.KayName = void 0;\nvar _objectSpread2 = _interopRequireDefault(require(\"@babel/runtime/helpers/objectSpread2\"));\nvar _defineProperty2 = _interopRequireDefault(require(\"@babel/runtime/helpers/defineProperty\"));\nvar _typeof2 = _interopRequireDefault(require(\"@babel/runtime/helpers/typeof\"));\nvar _toConsumableArray2 = _interopRequireDefault(require(\"@babel/runtime/helpers/toConsumableArray\"));\nvar _slicedToArray2 = _interopRequireDefault(require(\"@babel/runtime/helpers/slicedToArray\"));\nvar _react = require(\"react\");\nvar _store = require(\"../store\");\nvar _Expands = require(\"../store/Expands\");\nvar _ShowTools = require(\"../store/ShowTools\");\nvar _Value = require(\"./Value\");\nvar _KeyName = require(\"../section/KeyName\");\nvar _Row = require(\"../section/Row\");\nvar _Container = require(\"../Container\");\nvar _symbol = require(\"../symbol\");\nvar _useHighlight = require(\"../utils/useHighlight\");\nvar _Copied = require(\"../comps/Copied\");\nvar _jsxRuntime = require(\"react/jsx-runtime\");\nvar KeyValues = exports.KeyValues = function KeyValues(props) {\n var _expands$expandKey;\n var value = props.value,\n _props$expandKey = props.expandKey,\n expandKey = _props$expandKey === void 0 ? '' : _props$expandKey,\n level = props.level,\n _props$keys = props.keys,\n keys = _props$keys === void 0 ? [] : _props$keys;\n var expands = (0, _Expands.useExpandsStore)();\n var _useStore = (0, _store.useStore)(),\n objectSortKeys = _useStore.objectSortKeys,\n indentWidth = _useStore.indentWidth,\n collapsed = _useStore.collapsed;\n var isMyArray = Array.isArray(value);\n var isExpanded = (_expands$expandKey = expands[expandKey]) !== null && _expands$expandKey !== void 0 ? _expands$expandKey : typeof collapsed === 'boolean' ? collapsed : typeof collapsed === 'number' ? level > collapsed : false;\n if (isExpanded) {\n return null;\n }\n // object\n var entries = isMyArray ? Object.entries(value).map(function (m) {\n return [Number(m[0]), m[1]];\n }) : Object.entries(value);\n if (objectSortKeys) {\n entries = objectSortKeys === true ? entries.sort(function (_ref, _ref2) {\n var _ref3 = (0, _slicedToArray2[\"default\"])(_ref, 1),\n a = _ref3[0];\n var _ref4 = (0, _slicedToArray2[\"default\"])(_ref2, 1),\n b = _ref4[0];\n return typeof a === 'string' && typeof b === 'string' ? a.localeCompare(b) : 0;\n }) : entries.sort(function (_ref5, _ref6) {\n var _ref7 = (0, _slicedToArray2[\"default\"])(_ref5, 2),\n a = _ref7[0],\n valA = _ref7[1];\n var _ref8 = (0, _slicedToArray2[\"default\"])(_ref6, 2),\n b = _ref8[0],\n valB = _ref8[1];\n return typeof a === 'string' && typeof b === 'string' ? objectSortKeys(a, b, valA, valB) : 0;\n });\n }\n var style = {\n borderLeft: 'var(--w-rjv-border-left-width, 1px) var(--w-rjv-line-style, solid) var(--w-rjv-line-color, #ebebeb)',\n paddingLeft: indentWidth,\n marginLeft: 6\n };\n return /*#__PURE__*/(0, _jsxRuntime.jsx)(\"div\", {\n className: \"w-rjv-wrap\",\n style: style,\n children: entries.map(function (_ref9, idx) {\n var _ref10 = (0, _slicedToArray2[\"default\"])(_ref9, 2),\n key = _ref10[0],\n val = _ref10[1];\n return /*#__PURE__*/(0, _jsxRuntime.jsx)(KeyValuesItem, {\n parentValue: value,\n keyName: key,\n keys: [].concat((0, _toConsumableArray2[\"default\"])(keys), [key]),\n value: val,\n level: level\n }, idx);\n })\n });\n};\nKeyValues.displayName = 'JVR.KeyValues';\nvar KayName = exports.KayName = function KayName(props) {\n var keyName = props.keyName,\n parentValue = props.parentValue,\n keys = props.keys,\n value = props.value;\n var _useStore2 = (0, _store.useStore)(),\n highlightUpdates = _useStore2.highlightUpdates;\n var isNumber = typeof keyName === 'number';\n var highlightContainer = (0, _react.useRef)(null);\n (0, _useHighlight.useHighlight)({\n value: value,\n highlightUpdates: highlightUpdates,\n highlightContainer: highlightContainer\n });\n return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_react.Fragment, {\n children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(\"span\", {\n ref: highlightContainer,\n children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_symbol.Quote, {\n isNumber: isNumber,\n \"data-placement\": \"left\"\n }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_KeyName.KeyNameComp, {\n keyName: keyName,\n value: value,\n keys: keys,\n parentValue: parentValue,\n children: keyName\n }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_symbol.Quote, {\n isNumber: isNumber,\n \"data-placement\": \"right\"\n })]\n }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_symbol.Colon, {})]\n });\n};\nKayName.displayName = 'JVR.KayName';\nvar KeyValuesItem = exports.KeyValuesItem = function KeyValuesItem(props) {\n var keyName = props.keyName,\n value = props.value,\n parentValue = props.parentValue,\n _props$level = props.level,\n level = _props$level === void 0 ? 0 : _props$level,\n _props$keys2 = props.keys,\n keys = _props$keys2 === void 0 ? [] : _props$keys2;\n var dispatch = (0, _ShowTools.useShowToolsDispatch)();\n var subkeyid = (0, _react.useId)();\n var isMyArray = Array.isArray(value);\n var isMySet = value instanceof Set;\n var isMyMap = value instanceof Map;\n var isDate = value instanceof Date;\n var isUrl = value instanceof URL;\n var isMyObject = value && (0, _typeof2[\"default\"])(value) === 'object' && !isMyArray && !isMySet && !isMyMap && !isDate && !isUrl;\n var isNested = isMyObject || isMyArray || isMySet || isMyMap;\n if (isNested) {\n var myValue = isMySet ? Array.from(value) : isMyMap ? Object.fromEntries(value) : value;\n return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Container.Container, {\n keyName: keyName,\n value: myValue,\n parentValue: parentValue,\n initialValue: value,\n keys: keys,\n level: level + 1\n });\n }\n var reset = {\n onMouseEnter: function onMouseEnter() {\n return dispatch((0, _defineProperty2[\"default\"])({}, subkeyid, true));\n },\n onMouseLeave: function onMouseLeave() {\n return dispatch((0, _defineProperty2[\"default\"])({}, subkeyid, false));\n }\n };\n return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_Row.RowComp, (0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({\n className: \"w-rjv-line\",\n value: value,\n keyName: keyName,\n keys: keys,\n parentValue: parentValue\n }, reset), {}, {\n children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(KayName, {\n keyName: keyName,\n value: value,\n keys: keys,\n parentValue: parentValue\n }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Value.Value, {\n keyName: keyName,\n value: value\n }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Copied.Copied, {\n keyName: keyName,\n value: value,\n keys: keys,\n parentValue: parentValue,\n expandKey: subkeyid\n })]\n }));\n};\nKeyValuesItem.displayName = 'JVR.KeyValuesItem';","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.NestedClose = void 0;\nvar _store = require(\"../store\");\nvar _Expands = require(\"../store/Expands\");\nvar _symbol = require(\"../symbol\");\nvar _jsxRuntime = require(\"react/jsx-runtime\");\nvar NestedClose = exports.NestedClose = function NestedClose(props) {\n var _expands$expandKey;\n var value = props.value,\n expandKey = props.expandKey,\n level = props.level;\n var expands = (0, _Expands.useExpandsStore)();\n var isArray = Array.isArray(value);\n var _useStore = (0, _store.useStore)(),\n collapsed = _useStore.collapsed;\n var isMySet = value instanceof Set;\n var isExpanded = (_expands$expandKey = expands[expandKey]) !== null && _expands$expandKey !== void 0 ? _expands$expandKey : typeof collapsed === 'boolean' ? collapsed : typeof collapsed === 'number' ? level > collapsed : false;\n var len = Object.keys(value).length;\n if (isExpanded || len === 0) {\n return null;\n }\n var style = {\n paddingLeft: 4\n };\n return /*#__PURE__*/(0, _jsxRuntime.jsx)(\"div\", {\n style: style,\n children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_symbol.BracketsClose, {\n isBrackets: isArray || isMySet,\n isVisiable: true\n })\n });\n};\nNestedClose.displayName = 'JVR.NestedClose';","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\")[\"default\"];\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.NestedOpen = void 0;\nvar _objectSpread2 = _interopRequireDefault(require(\"@babel/runtime/helpers/objectSpread2\"));\nvar _defineProperty2 = _interopRequireDefault(require(\"@babel/runtime/helpers/defineProperty\"));\nvar _typeof2 = _interopRequireDefault(require(\"@babel/runtime/helpers/typeof\"));\nvar _KeyValues = require(\"./KeyValues\");\nvar _Expands = require(\"../store/Expands\");\nvar _store = require(\"../store\");\nvar _Copied = require(\"./Copied\");\nvar _CountInfoExtra = require(\"../section/CountInfoExtra\");\nvar _CountInfo = require(\"../section/CountInfo\");\nvar _symbol = require(\"../symbol\");\nvar _Ellipsis = require(\"../section/Ellipsis\");\nvar _types = require(\"../types\");\nvar _jsxRuntime = require(\"react/jsx-runtime\");\nvar NestedOpen = exports.NestedOpen = function NestedOpen(props) {\n var _expands$expandKey;\n var keyName = props.keyName,\n expandKey = props.expandKey,\n keys = props.keys,\n initialValue = props.initialValue,\n value = props.value,\n parentValue = props.parentValue,\n level = props.level;\n var expands = (0, _Expands.useExpandsStore)();\n var dispatchExpands = (0, _Expands.useExpandsDispatch)();\n var _useStore = (0, _store.useStore)(),\n onExpand = _useStore.onExpand,\n collapsed = _useStore.collapsed;\n var isArray = Array.isArray(value);\n var isMySet = value instanceof Set;\n var isExpanded = (_expands$expandKey = expands[expandKey]) !== null && _expands$expandKey !== void 0 ? _expands$expandKey : typeof collapsed === 'boolean' ? collapsed : typeof collapsed === 'number' ? level > collapsed : false;\n var isObject = (0, _typeof2[\"default\"])(value) === 'object';\n var click = function click() {\n var opt = {\n expand: !isExpanded,\n value: value,\n keyid: expandKey,\n keyName: keyName\n };\n onExpand && onExpand(opt);\n dispatchExpands((0, _defineProperty2[\"default\"])({}, expandKey, opt.expand));\n };\n var style = {\n display: 'inline-flex',\n alignItems: 'center'\n };\n var arrowStyle = {\n transform: \"rotate(\".concat(!isExpanded ? '0' : '-90', \"deg)\"),\n transition: 'all 0.3s'\n };\n var len = Object.keys(value).length;\n var showArrow = len !== 0 && (isArray || isMySet || isObject);\n var reset = {\n style: style\n };\n if (showArrow) {\n reset.onClick = click;\n }\n return /*#__PURE__*/(0, _jsxRuntime.jsxs)(\"span\", (0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, reset), {}, {\n children: [showArrow && /*#__PURE__*/(0, _jsxRuntime.jsx)(_symbol.Arrow, {\n style: arrowStyle,\n expandKey: expandKey\n }), (keyName || typeof keyName === 'number') && /*#__PURE__*/(0, _jsxRuntime.jsx)(_KeyValues.KayName, {\n keyName: keyName\n }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_types.SetComp, {\n value: initialValue,\n keyName: keyName\n }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_types.MapComp, {\n value: initialValue,\n keyName: keyName\n }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_symbol.BracketsOpen, {\n isBrackets: isArray || isMySet\n }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Ellipsis.EllipsisComp, {\n keyName: keyName,\n value: value,\n isExpanded: isExpanded\n }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_symbol.BracketsClose, {\n isVisiable: isExpanded || !showArrow,\n isBrackets: isArray || isMySet\n }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_CountInfo.CountInfoComp, {\n value: value,\n keyName: keyName\n }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_CountInfoExtra.CountInfoExtraComps, {\n value: value,\n keyName: keyName\n }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Copied.Copied, {\n keyName: keyName,\n value: value,\n expandKey: expandKey,\n parentValue: parentValue,\n keys: keys\n })]\n }));\n};\nNestedOpen.displayName = 'JVR.NestedOpen';","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\")[\"default\"];\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.isFloat = exports.Value = void 0;\nvar _objectSpread2 = _interopRequireDefault(require(\"@babel/runtime/helpers/objectSpread2\"));\nvar _types = require(\"../types\");\nvar _jsxRuntime = require(\"react/jsx-runtime\");\nvar isFloat = exports.isFloat = function isFloat(n) {\n return Number(n) === n && n % 1 !== 0 || isNaN(n);\n};\nvar Value = exports.Value = function Value(props) {\n var value = props.value,\n keyName = props.keyName;\n var reset = {\n keyName: keyName\n };\n if (value instanceof URL) {\n return /*#__PURE__*/(0, _jsxRuntime.jsx)(_types.TypeUrl, (0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, reset), {}, {\n children: value\n }));\n }\n if (typeof value === 'string') {\n return /*#__PURE__*/(0, _jsxRuntime.jsx)(_types.TypeString, (0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, reset), {}, {\n children: value\n }));\n }\n if (value === true) {\n return /*#__PURE__*/(0, _jsxRuntime.jsx)(_types.TypeTrue, (0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, reset), {}, {\n children: value\n }));\n }\n if (value === false) {\n return /*#__PURE__*/(0, _jsxRuntime.jsx)(_types.TypeFalse, (0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, reset), {}, {\n children: value\n }));\n }\n if (value === null) {\n return /*#__PURE__*/(0, _jsxRuntime.jsx)(_types.TypeNull, (0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, reset), {}, {\n children: value\n }));\n }\n if (value === undefined) {\n return /*#__PURE__*/(0, _jsxRuntime.jsx)(_types.TypeUndefined, (0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, reset), {}, {\n children: value\n }));\n }\n if (value instanceof Date) {\n return /*#__PURE__*/(0, _jsxRuntime.jsx)(_types.TypeDate, (0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, reset), {}, {\n children: value\n }));\n }\n if (typeof value === 'number' && isNaN(value)) {\n return /*#__PURE__*/(0, _jsxRuntime.jsx)(_types.TypeNan, (0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, reset), {}, {\n children: value\n }));\n } else if (typeof value === 'number' && isFloat(value)) {\n return /*#__PURE__*/(0, _jsxRuntime.jsx)(_types.TypeFloat, (0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, reset), {}, {\n children: value\n }));\n } else if (typeof value === 'bigint') {\n return /*#__PURE__*/(0, _jsxRuntime.jsx)(_types.TypeBigint, (0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, reset), {}, {\n children: value\n }));\n } else if (typeof value === 'number') {\n return /*#__PURE__*/(0, _jsxRuntime.jsx)(_types.TypeInt, (0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, reset), {}, {\n children: value\n }));\n }\n return null;\n};\nValue.displayName = 'JVR.Value';","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\")[\"default\"];\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nvar _exportNames = {};\nexports[\"default\"] = void 0;\nvar _objectSpread2 = _interopRequireDefault(require(\"@babel/runtime/helpers/objectSpread2\"));\nvar _objectWithoutProperties2 = _interopRequireDefault(require(\"@babel/runtime/helpers/objectWithoutProperties\"));\nvar _react = require(\"react\");\nvar _store = require(\"./store\");\nObject.keys(_store).forEach(function (key) {\n if (key === \"default\" || key === \"__esModule\") return;\n if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;\n if (key in exports && exports[key] === _store[key]) return;\n Object.defineProperty(exports, key, {\n enumerable: true,\n get: function get() {\n return _store[key];\n }\n });\n});\nvar _Container = require(\"./Container\");\nvar _BraceLeft = require(\"./symbol/BraceLeft\");\nvar _BraceRight = require(\"./symbol/BraceRight\");\nvar _BracketsLeft = require(\"./symbol/BracketsLeft\");\nvar _BracketsRight = require(\"./symbol/BracketsRight\");\nvar _Arrow = require(\"./symbol/Arrow\");\nvar _Colon = require(\"./symbol/Colon\");\nvar _Quote = require(\"./symbol/Quote\");\nvar _ValueQuote = require(\"./symbol/ValueQuote\");\nvar _Bigint = require(\"./types/Bigint\");\nvar _Date = require(\"./types/Date\");\nvar _False = require(\"./types/False\");\nvar _Float = require(\"./types/Float\");\nvar _Int = require(\"./types/Int\");\nvar _Map = require(\"./types/Map\");\nvar _Nan = require(\"./types/Nan\");\nvar _Null = require(\"./types/Null\");\nvar _Set = require(\"./types/Set\");\nvar _String = require(\"./types/String\");\nvar _True = require(\"./types/True\");\nvar _Undefined = require(\"./types/Undefined\");\nvar _Url = require(\"./types/Url\");\nvar _Copied = require(\"./section/Copied\");\nvar _CountInfo = require(\"./section/CountInfo\");\nvar _CountInfoExtra = require(\"./section/CountInfoExtra\");\nvar _Ellipsis = require(\"./section/Ellipsis\");\nvar _KeyName = require(\"./section/KeyName\");\nvar _Row = require(\"./section/Row\");\nvar _jsxRuntime = require(\"react/jsx-runtime\");\nvar _Expands = require(\"./store/Expands\");\nObject.keys(_Expands).forEach(function (key) {\n if (key === \"default\" || key === \"__esModule\") return;\n if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;\n if (key in exports && exports[key] === _Expands[key]) return;\n Object.defineProperty(exports, key, {\n enumerable: true,\n get: function get() {\n return _Expands[key];\n }\n });\n});\nvar _ShowTools = require(\"./store/ShowTools\");\nObject.keys(_ShowTools).forEach(function (key) {\n if (key === \"default\" || key === \"__esModule\") return;\n if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;\n if (key in exports && exports[key] === _ShowTools[key]) return;\n Object.defineProperty(exports, key, {\n enumerable: true,\n get: function get() {\n return _ShowTools[key];\n }\n });\n});\nvar _Symbols = require(\"./store/Symbols\");\nObject.keys(_Symbols).forEach(function (key) {\n if (key === \"default\" || key === \"__esModule\") return;\n if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;\n if (key in exports && exports[key] === _Symbols[key]) return;\n Object.defineProperty(exports, key, {\n enumerable: true,\n get: function get() {\n return _Symbols[key];\n }\n });\n});\nvar _Types = require(\"./store/Types\");\nObject.keys(_Types).forEach(function (key) {\n if (key === \"default\" || key === \"__esModule\") return;\n if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;\n if (key in exports && exports[key] === _Types[key]) return;\n Object.defineProperty(exports, key, {\n enumerable: true,\n get: function get() {\n return _Types[key];\n }\n });\n});\nvar _symbol = require(\"./symbol\");\nObject.keys(_symbol).forEach(function (key) {\n if (key === \"default\" || key === \"__esModule\") return;\n if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;\n if (key in exports && exports[key] === _symbol[key]) return;\n Object.defineProperty(exports, key, {\n enumerable: true,\n get: function get() {\n return _symbol[key];\n }\n });\n});\nvar _excluded = [\"className\", \"style\", \"value\", \"children\", \"collapsed\", \"indentWidth\", \"displayObjectSize\", \"shortenTextAfterLength\", \"highlightUpdates\", \"enableClipboard\", \"displayDataTypes\", \"objectSortKeys\", \"onExpand\", \"onCopied\"];\nvar JsonView = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {\n var _props$className = props.className,\n className = _props$className === void 0 ? '' : _props$className,\n style = props.style,\n value = props.value,\n children = props.children,\n collapsed = props.collapsed,\n _props$indentWidth = props.indentWidth,\n indentWidth = _props$indentWidth === void 0 ? 15 : _props$indentWidth,\n _props$displayObjectS = props.displayObjectSize,\n displayObjectSize = _props$displayObjectS === void 0 ? true : _props$displayObjectS,\n _props$shortenTextAft = props.shortenTextAfterLength,\n shortenTextAfterLength = _props$shortenTextAft === void 0 ? 30 : _props$shortenTextAft,\n _props$highlightUpdat = props.highlightUpdates,\n highlightUpdates = _props$highlightUpdat === void 0 ? true : _props$highlightUpdat,\n _props$enableClipboar = props.enableClipboard,\n enableClipboard = _props$enableClipboar === void 0 ? true : _props$enableClipboar,\n _props$displayDataTyp = props.displayDataTypes,\n displayDataTypes = _props$displayDataTyp === void 0 ? true : _props$displayDataTyp,\n _props$objectSortKeys = props.objectSortKeys,\n objectSortKeys = _props$objectSortKeys === void 0 ? false : _props$objectSortKeys,\n onExpand = props.onExpand,\n onCopied = props.onCopied,\n elmProps = (0, _objectWithoutProperties2[\"default\"])(props, _excluded);\n var defaultStyle = (0, _objectSpread2[\"default\"])({\n lineHeight: 1.4,\n fontFamily: 'var(--w-rjv-font-family, Menlo, monospace)',\n color: 'var(--w-rjv-color, #002b36)',\n backgroundColor: 'var(--w-rjv-background-color, #00000000)',\n fontSize: 13\n }, style);\n var cls = ['w-json-view-container', 'w-rjv', className].filter(Boolean).join(' ');\n return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_store.Provider, {\n initialState: {\n value: value,\n objectSortKeys: objectSortKeys,\n indentWidth: indentWidth,\n displayObjectSize: displayObjectSize,\n collapsed: collapsed,\n enableClipboard: enableClipboard,\n shortenTextAfterLength: shortenTextAfterLength,\n highlightUpdates: highlightUpdates,\n onCopied: onCopied,\n onExpand: onExpand\n },\n initialTypes: {\n displayDataTypes: displayDataTypes\n },\n children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_Container.Container, (0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({\n value: value\n }, elmProps), {}, {\n ref: ref,\n className: cls,\n style: defaultStyle\n })), children]\n });\n});\nJsonView.Bigint = _Bigint.Bigint;\nJsonView.Date = _Date.Date;\nJsonView.False = _False.False;\nJsonView.Float = _Float.Float;\nJsonView.Int = _Int.Int;\nJsonView.Map = _Map.Map;\nJsonView.Nan = _Nan.Nan;\nJsonView.Null = _Null.Null;\nJsonView.Set = _Set.Set;\nJsonView.String = _String.StringText;\nJsonView.True = _True.True;\nJsonView.Undefined = _Undefined.Undefined;\nJsonView.Url = _Url.Url;\nJsonView.ValueQuote = _ValueQuote.ValueQuote;\nJsonView.Arrow = _Arrow.Arrow;\nJsonView.Colon = _Colon.Colon;\nJsonView.Quote = _Quote.Quote;\nJsonView.Ellipsis = _Ellipsis.Ellipsis;\nJsonView.BraceLeft = _BraceLeft.BraceLeft;\nJsonView.BraceRight = _BraceRight.BraceRight;\nJsonView.BracketsLeft = _BracketsLeft.BracketsLeft;\nJsonView.BracketsRight = _BracketsRight.BracketsRight;\nJsonView.Copied = _Copied.Copied;\nJsonView.CountInfo = _CountInfo.CountInfo;\nJsonView.CountInfoExtra = _CountInfoExtra.CountInfoExtra;\nJsonView.KeyName = _KeyName.KeyName;\nJsonView.Row = _Row.Row;\nJsonView.displayName = 'JVR.JsonView';\nvar _default = exports[\"default\"] = JsonView;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.Copied = void 0;\nvar _Section = require(\"../store/Section\");\nvar _useRender = require(\"../utils/useRender\");\nvar Copied = exports.Copied = function Copied(props) {\n var _useSectionStore = (0, _Section.useSectionStore)(),\n _useSectionStore$Copi = _useSectionStore.Copied,\n Comp = _useSectionStore$Copi === void 0 ? {} : _useSectionStore$Copi;\n (0, _useRender.useSectionRender)(Comp, props, 'Copied');\n return null;\n};\nCopied.displayName = 'JVR.Copied';","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\")[\"default\"];\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.CountInfoComp = exports.CountInfo = void 0;\nvar _objectSpread2 = _interopRequireDefault(require(\"@babel/runtime/helpers/objectSpread2\"));\nvar _objectWithoutProperties2 = _interopRequireDefault(require(\"@babel/runtime/helpers/objectWithoutProperties\"));\nvar _Section = require(\"../store/Section\");\nvar _useRender = require(\"../utils/useRender\");\nvar _store = require(\"../store\");\nvar _jsxRuntime = require(\"react/jsx-runtime\");\nvar _excluded = [\"value\", \"keyName\"],\n _excluded2 = [\"as\", \"render\"];\nvar CountInfo = exports.CountInfo = function CountInfo(props) {\n var _useSectionStore = (0, _Section.useSectionStore)(),\n _useSectionStore$Coun = _useSectionStore.CountInfo,\n Comp = _useSectionStore$Coun === void 0 ? {} : _useSectionStore$Coun;\n (0, _useRender.useSectionRender)(Comp, props, 'CountInfo');\n return null;\n};\nCountInfo.displayName = 'JVR.CountInfo';\nvar CountInfoComp = exports.CountInfoComp = function CountInfoComp(props) {\n var _props$value = props.value,\n value = _props$value === void 0 ? {} : _props$value,\n keyName = props.keyName,\n other = (0, _objectWithoutProperties2[\"default\"])(props, _excluded);\n var _useStore = (0, _store.useStore)(),\n displayObjectSize = _useStore.displayObjectSize;\n var _useSectionStore2 = (0, _Section.useSectionStore)(),\n _useSectionStore2$Cou = _useSectionStore2.CountInfo,\n Comp = _useSectionStore2$Cou === void 0 ? {} : _useSectionStore2$Cou;\n if (!displayObjectSize) return null;\n var as = Comp.as,\n render = Comp.render,\n reset = (0, _objectWithoutProperties2[\"default\"])(Comp, _excluded2);\n var Elm = as || 'span';\n reset.style = (0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, reset.style), props.style);\n var len = Object.keys(value).length;\n if (!reset.children) {\n reset.children = \"\".concat(len, \" item\").concat(len === 1 ? '' : 's');\n }\n var elmProps = (0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, reset), other);\n var isRender = render && typeof render === 'function';\n var child = isRender && render((0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, elmProps), {}, {\n 'data-length': len\n }), {\n value: value,\n keyName: keyName\n });\n if (child) return child;\n return /*#__PURE__*/(0, _jsxRuntime.jsx)(Elm, (0, _objectSpread2[\"default\"])({}, elmProps));\n};\nCountInfoComp.displayName = 'JVR.CountInfoComp';","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\")[\"default\"];\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.CountInfoExtraComps = exports.CountInfoExtra = void 0;\nvar _objectSpread2 = _interopRequireDefault(require(\"@babel/runtime/helpers/objectSpread2\"));\nvar _objectWithoutProperties2 = _interopRequireDefault(require(\"@babel/runtime/helpers/objectWithoutProperties\"));\nvar _Section = require(\"../store/Section\");\nvar _useRender = require(\"../utils/useRender\");\nvar _jsxRuntime = require(\"react/jsx-runtime\");\nvar _excluded = [\"value\", \"keyName\"],\n _excluded2 = [\"as\", \"render\"];\nvar CountInfoExtra = exports.CountInfoExtra = function CountInfoExtra(props) {\n var _useSectionStore = (0, _Section.useSectionStore)(),\n _useSectionStore$Coun = _useSectionStore.CountInfoExtra,\n Comp = _useSectionStore$Coun === void 0 ? {} : _useSectionStore$Coun;\n (0, _useRender.useSectionRender)(Comp, props, 'CountInfoExtra');\n return null;\n};\nCountInfoExtra.displayName = 'JVR.CountInfoExtra';\nvar CountInfoExtraComps = exports.CountInfoExtraComps = function CountInfoExtraComps(props) {\n var _props$value = props.value,\n value = _props$value === void 0 ? {} : _props$value,\n keyName = props.keyName,\n other = (0, _objectWithoutProperties2[\"default\"])(props, _excluded);\n var _useSectionStore2 = (0, _Section.useSectionStore)(),\n _useSectionStore2$Cou = _useSectionStore2.CountInfoExtra,\n Comp = _useSectionStore2$Cou === void 0 ? {} : _useSectionStore2$Cou;\n var as = Comp.as,\n render = Comp.render,\n reset = (0, _objectWithoutProperties2[\"default\"])(Comp, _excluded2);\n if (!render && !reset.children) return null;\n var Elm = as || 'span';\n var isRender = render && typeof render === 'function';\n var elmProps = (0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, reset), other);\n var child = isRender && render(elmProps, {\n value: value,\n keyName: keyName\n });\n if (child) return child;\n return /*#__PURE__*/(0, _jsxRuntime.jsx)(Elm, (0, _objectSpread2[\"default\"])({}, elmProps));\n};\nCountInfoExtraComps.displayName = 'JVR.CountInfoExtraComps';","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\")[\"default\"];\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.EllipsisComp = exports.Ellipsis = void 0;\nvar _typeof2 = _interopRequireDefault(require(\"@babel/runtime/helpers/typeof\"));\nvar _objectSpread2 = _interopRequireDefault(require(\"@babel/runtime/helpers/objectSpread2\"));\nvar _objectWithoutProperties2 = _interopRequireDefault(require(\"@babel/runtime/helpers/objectWithoutProperties\"));\nvar _Section = require(\"../store/Section\");\nvar _useRender = require(\"../utils/useRender\");\nvar _jsxRuntime = require(\"react/jsx-runtime\");\nvar _excluded = [\"as\", \"render\"];\nvar Ellipsis = exports.Ellipsis = function Ellipsis(props) {\n var _useSectionStore = (0, _Section.useSectionStore)(),\n _useSectionStore$Elli = _useSectionStore.Ellipsis,\n Comp = _useSectionStore$Elli === void 0 ? {} : _useSectionStore$Elli;\n (0, _useRender.useSectionRender)(Comp, props, 'Ellipsis');\n return null;\n};\nEllipsis.displayName = 'JVR.Ellipsis';\nvar EllipsisComp = exports.EllipsisComp = function EllipsisComp(_ref) {\n var isExpanded = _ref.isExpanded,\n value = _ref.value,\n keyName = _ref.keyName;\n var _useSectionStore2 = (0, _Section.useSectionStore)(),\n _useSectionStore2$Ell = _useSectionStore2.Ellipsis,\n Comp = _useSectionStore2$Ell === void 0 ? {} : _useSectionStore2$Ell;\n var as = Comp.as,\n render = Comp.render,\n reset = (0, _objectWithoutProperties2[\"default\"])(Comp, _excluded);\n var Elm = as || 'span';\n var child = render && typeof render === 'function' && render((0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, reset), {}, {\n 'data-expanded': isExpanded\n }), {\n value: value,\n keyName: keyName\n });\n if (child) return child;\n if (!isExpanded || (0, _typeof2[\"default\"])(value) === 'object' && Object.keys(value).length == 0) return null;\n return /*#__PURE__*/(0, _jsxRuntime.jsx)(Elm, (0, _objectSpread2[\"default\"])({}, reset));\n};\nEllipsisComp.displayName = 'JVR.EllipsisComp';","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\")[\"default\"];\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.KeyNameComp = exports.KeyName = void 0;\nvar _objectSpread2 = _interopRequireDefault(require(\"@babel/runtime/helpers/objectSpread2\"));\nvar _objectWithoutProperties2 = _interopRequireDefault(require(\"@babel/runtime/helpers/objectWithoutProperties\"));\nvar _Section = require(\"../store/Section\");\nvar _useRender = require(\"../utils/useRender\");\nvar _jsxRuntime = require(\"react/jsx-runtime\");\nvar _excluded = [\"as\", \"render\"];\nvar KeyName = exports.KeyName = function KeyName(props) {\n var _useSectionStore = (0, _Section.useSectionStore)(),\n _useSectionStore$KeyN = _useSectionStore.KeyName,\n Comp = _useSectionStore$KeyN === void 0 ? {} : _useSectionStore$KeyN;\n (0, _useRender.useSectionRender)(Comp, props, 'KeyName');\n return null;\n};\nKeyName.displayName = 'JVR.KeyName';\nvar KeyNameComp = exports.KeyNameComp = function KeyNameComp(props) {\n var children = props.children,\n value = props.value,\n parentValue = props.parentValue,\n keyName = props.keyName,\n keys = props.keys;\n var isNumber = typeof children === 'number';\n var style = {\n color: isNumber ? 'var(--w-rjv-key-number, #268bd2)' : 'var(--w-rjv-key-string, #002b36)'\n };\n var _useSectionStore2 = (0, _Section.useSectionStore)(),\n _useSectionStore2$Key = _useSectionStore2.KeyName,\n Comp = _useSectionStore2$Key === void 0 ? {} : _useSectionStore2$Key;\n var as = Comp.as,\n render = Comp.render,\n reset = (0, _objectWithoutProperties2[\"default\"])(Comp, _excluded);\n reset.style = (0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, reset.style), style);\n var Elm = as || 'span';\n var child = render && typeof render === 'function' && render((0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, reset), {}, {\n children: children\n }), {\n value: value,\n parentValue: parentValue,\n keyName: keyName,\n keys: keys || (keyName ? [keyName] : [])\n });\n if (child) return child;\n return /*#__PURE__*/(0, _jsxRuntime.jsx)(Elm, (0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, reset), {}, {\n children: children\n }));\n};\nKeyNameComp.displayName = 'JVR.KeyNameComp';","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\")[\"default\"];\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.RowComp = exports.Row = void 0;\nvar _objectSpread2 = _interopRequireDefault(require(\"@babel/runtime/helpers/objectSpread2\"));\nvar _objectWithoutProperties2 = _interopRequireDefault(require(\"@babel/runtime/helpers/objectWithoutProperties\"));\nvar _Section = require(\"../store/Section\");\nvar _useRender = require(\"../utils/useRender\");\nvar _jsxRuntime = require(\"react/jsx-runtime\");\nvar _excluded = [\"children\", \"value\", \"parentValue\", \"keyName\", \"keys\"],\n _excluded2 = [\"as\", \"render\", \"children\"];\nvar Row = exports.Row = function Row(props) {\n var _useSectionStore = (0, _Section.useSectionStore)(),\n _useSectionStore$Row = _useSectionStore.Row,\n Comp = _useSectionStore$Row === void 0 ? {} : _useSectionStore$Row;\n (0, _useRender.useSectionRender)(Comp, props, 'Row');\n return null;\n};\nRow.displayName = 'JVR.Row';\nvar RowComp = exports.RowComp = function RowComp(props) {\n var children = props.children,\n value = props.value,\n parentValue = props.parentValue,\n keyName = props.keyName,\n keys = props.keys,\n other = (0, _objectWithoutProperties2[\"default\"])(props, _excluded);\n var _useSectionStore2 = (0, _Section.useSectionStore)(),\n _useSectionStore2$Row = _useSectionStore2.Row,\n Comp = _useSectionStore2$Row === void 0 ? {} : _useSectionStore2$Row;\n var as = Comp.as,\n render = Comp.render,\n _ = Comp.children,\n reset = (0, _objectWithoutProperties2[\"default\"])(Comp, _excluded2);\n var Elm = as || 'div';\n var child = render && typeof render === 'function' && render((0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, other), reset), {}, {\n children: children\n }), {\n value: value,\n keyName: keyName,\n parentValue: parentValue,\n keys: keys\n });\n if (child) return child;\n return /*#__PURE__*/(0, _jsxRuntime.jsx)(Elm, (0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, other), reset), {}, {\n children: children\n }));\n};\nRowComp.displayName = 'JVR.RowComp';","\"use strict\";\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\")[\"default\"];\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\")[\"default\"];\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.initialState = exports.Provider = exports.Context = void 0;\nexports.reducer = reducer;\nexports.useDispatch = useDispatch;\nexports.useStore = exports.useDispatchStore = void 0;\nvar _slicedToArray2 = _interopRequireDefault(require(\"@babel/runtime/helpers/slicedToArray\"));\nvar _objectSpread2 = _interopRequireDefault(require(\"@babel/runtime/helpers/objectSpread2\"));\nvar _react = _interopRequireWildcard(require(\"react\"));\nvar _ShowTools = require(\"./store/ShowTools\");\nvar _Expands = require(\"./store/Expands\");\nvar _Types = require(\"./store/Types\");\nvar _Symbols = require(\"./store/Symbols\");\nvar _Section = require(\"./store/Section\");\nvar _jsxRuntime = require(\"react/jsx-runtime\");\nvar initialState = exports.initialState = {\n objectSortKeys: false,\n indentWidth: 15\n};\nvar Context = exports.Context = /*#__PURE__*/(0, _react.createContext)(initialState);\nContext.displayName = 'JVR.Context';\nvar DispatchContext = /*#__PURE__*/(0, _react.createContext)(function () {});\nDispatchContext.displayName = 'JVR.DispatchContext';\nfunction reducer(state, action) {\n return (0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, state), action);\n}\nvar useStore = exports.useStore = function useStore() {\n return (0, _react.useContext)(Context);\n};\nvar useDispatchStore = exports.useDispatchStore = function useDispatchStore() {\n return (0, _react.useContext)(DispatchContext);\n};\nvar Provider = exports.Provider = function Provider(_ref) {\n var children = _ref.children,\n init = _ref.initialState,\n initialTypes = _ref.initialTypes;\n var _useReducer = (0, _react.useReducer)(reducer, Object.assign({}, initialState, init)),\n _useReducer2 = (0, _slicedToArray2[\"default\"])(_useReducer, 2),\n state = _useReducer2[0],\n dispatch = _useReducer2[1];\n var _useShowTools = (0, _ShowTools.useShowTools)(),\n _useShowTools2 = (0, _slicedToArray2[\"default\"])(_useShowTools, 2),\n showTools = _useShowTools2[0],\n showToolsDispatch = _useShowTools2[1];\n var _useExpands = (0, _Expands.useExpands)(),\n _useExpands2 = (0, _slicedToArray2[\"default\"])(_useExpands, 2),\n expands = _useExpands2[0],\n expandsDispatch = _useExpands2[1];\n var _useTypes = (0, _Types.useTypes)(),\n _useTypes2 = (0, _slicedToArray2[\"default\"])(_useTypes, 2),\n types = _useTypes2[0],\n typesDispatch = _useTypes2[1];\n var _useSymbols = (0, _Symbols.useSymbols)(),\n _useSymbols2 = (0, _slicedToArray2[\"default\"])(_useSymbols, 2),\n symbols = _useSymbols2[0],\n symbolsDispatch = _useSymbols2[1];\n var _useSection = (0, _Section.useSection)(),\n _useSection2 = (0, _slicedToArray2[\"default\"])(_useSection, 2),\n section = _useSection2[0],\n sectionDispatch = _useSection2[1];\n (0, _react.useEffect)(function () {\n return dispatch((0, _objectSpread2[\"default\"])({}, init));\n }, [init]);\n return /*#__PURE__*/(0, _jsxRuntime.jsx)(Context.Provider, {\n value: state,\n children: /*#__PURE__*/(0, _jsxRuntime.jsx)(DispatchContext.Provider, {\n value: dispatch,\n children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_ShowTools.ShowTools, {\n initial: showTools,\n dispatch: showToolsDispatch,\n children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Expands.Expands, {\n initial: expands,\n dispatch: expandsDispatch,\n children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Types.Types, {\n initial: (0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, types), initialTypes),\n dispatch: typesDispatch,\n children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Symbols.Symbols, {\n initial: symbols,\n dispatch: symbolsDispatch,\n children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Section.Section, {\n initial: section,\n dispatch: sectionDispatch,\n children: children\n })\n })\n })\n })\n })\n })\n });\n};\nfunction useDispatch() {\n return (0, _react.useContext)(DispatchContext);\n}\nProvider.displayName = 'JVR.Provider';","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\")[\"default\"];\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.Expands = void 0;\nexports.useExpands = useExpands;\nexports.useExpandsDispatch = useExpandsDispatch;\nexports.useExpandsStore = void 0;\nvar _objectSpread2 = _interopRequireDefault(require(\"@babel/runtime/helpers/objectSpread2\"));\nvar _react = require(\"react\");\nvar _jsxRuntime = require(\"react/jsx-runtime\");\nvar initialState = {};\nvar Context = /*#__PURE__*/(0, _react.createContext)(initialState);\nvar reducer = function reducer(state, action) {\n return (0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, state), action);\n};\nvar useExpandsStore = exports.useExpandsStore = function useExpandsStore() {\n return (0, _react.useContext)(Context);\n};\nvar DispatchExpands = /*#__PURE__*/(0, _react.createContext)(function () {});\nDispatchExpands.displayName = 'JVR.DispatchExpands';\nfunction useExpands() {\n return (0, _react.useReducer)(reducer, initialState);\n}\nfunction useExpandsDispatch() {\n return (0, _react.useContext)(DispatchExpands);\n}\nvar Expands = exports.Expands = function Expands(_ref) {\n var initial = _ref.initial,\n dispatch = _ref.dispatch,\n children = _ref.children;\n return /*#__PURE__*/(0, _jsxRuntime.jsx)(Context.Provider, {\n value: initial,\n children: /*#__PURE__*/(0, _jsxRuntime.jsx)(DispatchExpands.Provider, {\n value: dispatch,\n children: children\n })\n });\n};\nExpands.displayName = 'JVR.Expands';","\"use strict\";\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\")[\"default\"];\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\")[\"default\"];\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.Section = void 0;\nexports.useSection = useSection;\nexports.useSectionDispatch = useSectionDispatch;\nexports.useSectionStore = void 0;\nvar _objectSpread2 = _interopRequireDefault(require(\"@babel/runtime/helpers/objectSpread2\"));\nvar _react = _interopRequireWildcard(require(\"react\"));\nvar _jsxRuntime = require(\"react/jsx-runtime\");\nvar initialState = {\n Copied: {\n className: 'w-rjv-copied',\n style: {\n height: '1em',\n width: '1em',\n cursor: 'pointer',\n verticalAlign: 'middle',\n marginLeft: 5\n }\n },\n CountInfo: {\n as: 'span',\n className: 'w-rjv-object-size',\n style: {\n color: 'var(--w-rjv-info-color, #0000004d)',\n paddingLeft: 8,\n fontStyle: 'italic'\n }\n },\n CountInfoExtra: {\n as: 'span',\n className: 'w-rjv-object-extra',\n style: {\n paddingLeft: 8\n }\n },\n Ellipsis: {\n as: 'span',\n style: {\n cursor: 'pointer',\n color: 'var(--w-rjv-ellipsis-color, #cb4b16)',\n userSelect: 'none'\n },\n className: 'w-rjv-ellipsis',\n children: '...'\n },\n Row: {\n as: 'div',\n className: 'w-rjv-line'\n },\n KeyName: {\n as: 'span',\n className: 'w-rjv-object-key'\n }\n};\nvar Context = /*#__PURE__*/(0, _react.createContext)(initialState);\nvar reducer = function reducer(state, action) {\n return (0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, state), action);\n};\nvar useSectionStore = exports.useSectionStore = function useSectionStore() {\n return (0, _react.useContext)(Context);\n};\nvar DispatchSection = /*#__PURE__*/(0, _react.createContext)(function () {});\nDispatchSection.displayName = 'JVR.DispatchSection';\nfunction useSection() {\n return (0, _react.useReducer)(reducer, initialState);\n}\nfunction useSectionDispatch() {\n return (0, _react.useContext)(DispatchSection);\n}\nvar Section = exports.Section = function Section(_ref) {\n var initial = _ref.initial,\n dispatch = _ref.dispatch,\n children = _ref.children;\n return /*#__PURE__*/(0, _jsxRuntime.jsx)(Context.Provider, {\n value: initial,\n children: /*#__PURE__*/(0, _jsxRuntime.jsx)(DispatchSection.Provider, {\n value: dispatch,\n children: children\n })\n });\n};\nSection.displayName = 'JVR.Section';","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\")[\"default\"];\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.ShowTools = void 0;\nexports.useShowTools = useShowTools;\nexports.useShowToolsDispatch = useShowToolsDispatch;\nexports.useShowToolsStore = void 0;\nvar _objectSpread2 = _interopRequireDefault(require(\"@babel/runtime/helpers/objectSpread2\"));\nvar _react = require(\"react\");\nvar _jsxRuntime = require(\"react/jsx-runtime\");\nvar initialState = {};\nvar Context = /*#__PURE__*/(0, _react.createContext)(initialState);\nvar reducer = function reducer(state, action) {\n return (0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, state), action);\n};\nvar useShowToolsStore = exports.useShowToolsStore = function useShowToolsStore() {\n return (0, _react.useContext)(Context);\n};\nvar DispatchShowTools = /*#__PURE__*/(0, _react.createContext)(function () {});\nDispatchShowTools.displayName = 'JVR.DispatchShowTools';\nfunction useShowTools() {\n return (0, _react.useReducer)(reducer, initialState);\n}\nfunction useShowToolsDispatch() {\n return (0, _react.useContext)(DispatchShowTools);\n}\nvar ShowTools = exports.ShowTools = function ShowTools(_ref) {\n var initial = _ref.initial,\n dispatch = _ref.dispatch,\n children = _ref.children;\n return /*#__PURE__*/(0, _jsxRuntime.jsx)(Context.Provider, {\n value: initial,\n children: /*#__PURE__*/(0, _jsxRuntime.jsx)(DispatchShowTools.Provider, {\n value: dispatch,\n children: children\n })\n });\n};\nShowTools.displayName = 'JVR.ShowTools';","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\")[\"default\"];\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.Symbols = void 0;\nexports.useSymbols = useSymbols;\nexports.useSymbolsDispatch = useSymbolsDispatch;\nexports.useSymbolsStore = void 0;\nvar _objectSpread2 = _interopRequireDefault(require(\"@babel/runtime/helpers/objectSpread2\"));\nvar _react = require(\"react\");\nvar _TriangleArrow = require(\"../arrow/TriangleArrow\");\nvar _jsxRuntime = require(\"react/jsx-runtime\");\nvar initialState = {\n Arrow: {\n as: 'span',\n className: 'w-rjv-arrow',\n style: {\n transform: 'rotate(0deg)',\n transition: 'all 0.3s'\n },\n children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_TriangleArrow.TriangleArrow, {})\n },\n Colon: {\n as: 'span',\n style: {\n color: 'var(--w-rjv-colon-color, var(--w-rjv-color))',\n marginLeft: 0,\n marginRight: 2\n },\n className: 'w-rjv-colon',\n children: ':'\n },\n Quote: {\n as: 'span',\n style: {\n color: 'var(--w-rjv-quotes-color, #236a7c)'\n },\n className: 'w-rjv-quotes',\n children: '\"'\n },\n ValueQuote: {\n as: 'span',\n style: {\n color: 'var(--w-rjv-quotes-string-color, #cb4b16)'\n },\n className: 'w-rjv-quotes',\n children: '\"'\n },\n BracketsLeft: {\n as: 'span',\n style: {\n color: 'var(--w-rjv-brackets-color, #236a7c)'\n },\n className: 'w-rjv-brackets-start',\n children: '['\n },\n BracketsRight: {\n as: 'span',\n style: {\n color: 'var(--w-rjv-brackets-color, #236a7c)'\n },\n className: 'w-rjv-brackets-end',\n children: ']'\n },\n BraceLeft: {\n as: 'span',\n style: {\n color: 'var(--w-rjv-curlybraces-color, #236a7c)'\n },\n className: 'w-rjv-curlybraces-start',\n children: '{'\n },\n BraceRight: {\n as: 'span',\n style: {\n color: 'var(--w-rjv-curlybraces-color, #236a7c)'\n },\n className: 'w-rjv-curlybraces-end',\n children: '}'\n }\n};\nvar Context = /*#__PURE__*/(0, _react.createContext)(initialState);\nvar reducer = function reducer(state, action) {\n return (0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, state), action);\n};\nvar useSymbolsStore = exports.useSymbolsStore = function useSymbolsStore() {\n return (0, _react.useContext)(Context);\n};\nvar DispatchSymbols = /*#__PURE__*/(0, _react.createContext)(function () {});\nDispatchSymbols.displayName = 'JVR.DispatchSymbols';\nfunction useSymbols() {\n return (0, _react.useReducer)(reducer, initialState);\n}\nfunction useSymbolsDispatch() {\n return (0, _react.useContext)(DispatchSymbols);\n}\nvar Symbols = exports.Symbols = function Symbols(_ref) {\n var initial = _ref.initial,\n dispatch = _ref.dispatch,\n children = _ref.children;\n return /*#__PURE__*/(0, _jsxRuntime.jsx)(Context.Provider, {\n value: initial,\n children: /*#__PURE__*/(0, _jsxRuntime.jsx)(DispatchSymbols.Provider, {\n value: dispatch,\n children: children\n })\n });\n};\nSymbols.displayName = 'JVR.Symbols';","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\")[\"default\"];\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.Types = Types;\nexports.useTypes = useTypes;\nexports.useTypesDispatch = useTypesDispatch;\nexports.useTypesStore = void 0;\nvar _objectSpread2 = _interopRequireDefault(require(\"@babel/runtime/helpers/objectSpread2\"));\nvar _react = require(\"react\");\nvar _jsxRuntime = require(\"react/jsx-runtime\");\nvar initialState = {\n Str: {\n as: 'span',\n 'data-type': 'string',\n style: {\n color: 'var(--w-rjv-type-string-color, #cb4b16)'\n },\n className: 'w-rjv-type',\n children: 'string'\n },\n Url: {\n as: 'a',\n style: {\n color: 'var(--w-rjv-type-url-color, #0969da)'\n },\n 'data-type': 'url',\n className: 'w-rjv-type',\n children: 'url'\n },\n Undefined: {\n style: {\n color: 'var(--w-rjv-type-undefined-color, #586e75)'\n },\n as: 'span',\n 'data-type': 'undefined',\n className: 'w-rjv-type',\n children: 'undefined'\n },\n Null: {\n style: {\n color: 'var(--w-rjv-type-null-color, #d33682)'\n },\n as: 'span',\n 'data-type': 'null',\n className: 'w-rjv-type',\n children: 'null'\n },\n Map: {\n style: {\n color: 'var(--w-rjv-type-map-color, #268bd2)',\n marginRight: 3\n },\n as: 'span',\n 'data-type': 'map',\n className: 'w-rjv-type',\n children: 'Map'\n },\n Nan: {\n style: {\n color: 'var(--w-rjv-type-nan-color, #859900)'\n },\n as: 'span',\n 'data-type': 'nan',\n className: 'w-rjv-type',\n children: 'NaN'\n },\n Bigint: {\n style: {\n color: 'var(--w-rjv-type-bigint-color, #268bd2)'\n },\n as: 'span',\n 'data-type': 'bigint',\n className: 'w-rjv-type',\n children: 'bigint'\n },\n Int: {\n style: {\n color: 'var(--w-rjv-type-int-color, #268bd2)'\n },\n as: 'span',\n 'data-type': 'int',\n className: 'w-rjv-type',\n children: 'int'\n },\n Set: {\n style: {\n color: 'var(--w-rjv-type-set-color, #268bd2)',\n marginRight: 3\n },\n as: 'span',\n 'data-type': 'set',\n className: 'w-rjv-type',\n children: 'Set'\n },\n Float: {\n style: {\n color: 'var(--w-rjv-type-float-color, #859900)'\n },\n as: 'span',\n 'data-type': 'float',\n className: 'w-rjv-type',\n children: 'float'\n },\n True: {\n style: {\n color: 'var(--w-rjv-type-boolean-color, #2aa198)'\n },\n as: 'span',\n 'data-type': 'bool',\n className: 'w-rjv-type',\n children: 'bool'\n },\n False: {\n style: {\n color: 'var(--w-rjv-type-boolean-color, #2aa198)'\n },\n as: 'span',\n 'data-type': 'bool',\n className: 'w-rjv-type',\n children: 'bool'\n },\n Date: {\n style: {\n color: 'var(--w-rjv-type-date-color, #268bd2)'\n },\n as: 'span',\n 'data-type': 'date',\n className: 'w-rjv-type',\n children: 'date'\n }\n};\nvar Context = /*#__PURE__*/(0, _react.createContext)(initialState);\nvar reducer = function reducer(state, action) {\n return (0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, state), action);\n};\nvar useTypesStore = exports.useTypesStore = function useTypesStore() {\n return (0, _react.useContext)(Context);\n};\nvar DispatchTypes = /*#__PURE__*/(0, _react.createContext)(function () {});\nDispatchTypes.displayName = 'JVR.DispatchTypes';\nfunction useTypes() {\n return (0, _react.useReducer)(reducer, initialState);\n}\nfunction useTypesDispatch() {\n return (0, _react.useContext)(DispatchTypes);\n}\nfunction Types(_ref) {\n var initial = _ref.initial,\n dispatch = _ref.dispatch,\n children = _ref.children;\n return /*#__PURE__*/(0, _jsxRuntime.jsx)(Context.Provider, {\n value: initial,\n children: /*#__PURE__*/(0, _jsxRuntime.jsx)(DispatchTypes.Provider, {\n value: dispatch,\n children: children\n })\n });\n}\nTypes.displayName = 'JVR.Types';","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.Arrow = void 0;\nvar _Symbols = require(\"../store/Symbols\");\nvar _useRender = require(\"../utils/useRender\");\nvar Arrow = exports.Arrow = function Arrow(props) {\n var _useSymbolsStore = (0, _Symbols.useSymbolsStore)(),\n _useSymbolsStore$Arro = _useSymbolsStore.Arrow,\n Comp = _useSymbolsStore$Arro === void 0 ? {} : _useSymbolsStore$Arro;\n (0, _useRender.useSymbolsRender)(Comp, props, 'Arrow');\n return null;\n};\nArrow.displayName = 'JVR.Arrow';","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.BraceLeft = void 0;\nvar _Symbols = require(\"../store/Symbols\");\nvar _useRender = require(\"../utils/useRender\");\nvar BraceLeft = exports.BraceLeft = function BraceLeft(props) {\n var _useSymbolsStore = (0, _Symbols.useSymbolsStore)(),\n _useSymbolsStore$Brac = _useSymbolsStore.BraceLeft,\n Comp = _useSymbolsStore$Brac === void 0 ? {} : _useSymbolsStore$Brac;\n (0, _useRender.useSymbolsRender)(Comp, props, 'BraceLeft');\n return null;\n};\nBraceLeft.displayName = 'JVR.BraceLeft';","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.BraceRight = void 0;\nvar _Symbols = require(\"../store/Symbols\");\nvar _useRender = require(\"../utils/useRender\");\nvar BraceRight = exports.BraceRight = function BraceRight(props) {\n var _useSymbolsStore = (0, _Symbols.useSymbolsStore)(),\n _useSymbolsStore$Brac = _useSymbolsStore.BraceRight,\n Comp = _useSymbolsStore$Brac === void 0 ? {} : _useSymbolsStore$Brac;\n (0, _useRender.useSymbolsRender)(Comp, props, 'BraceRight');\n return null;\n};\nBraceRight.displayName = 'JVR.BraceRight';","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.BracketsLeft = void 0;\nvar _Symbols = require(\"../store/Symbols\");\nvar _useRender = require(\"../utils/useRender\");\nvar BracketsLeft = exports.BracketsLeft = function BracketsLeft(props) {\n var _useSymbolsStore = (0, _Symbols.useSymbolsStore)(),\n _useSymbolsStore$Brac = _useSymbolsStore.BracketsLeft,\n Comp = _useSymbolsStore$Brac === void 0 ? {} : _useSymbolsStore$Brac;\n (0, _useRender.useSymbolsRender)(Comp, props, 'BracketsLeft');\n return null;\n};\nBracketsLeft.displayName = 'JVR.BracketsLeft';","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.BracketsRight = void 0;\nvar _Symbols = require(\"../store/Symbols\");\nvar _useRender = require(\"../utils/useRender\");\nvar BracketsRight = exports.BracketsRight = function BracketsRight(props) {\n var _useSymbolsStore = (0, _Symbols.useSymbolsStore)(),\n _useSymbolsStore$Brac = _useSymbolsStore.BracketsRight,\n Comp = _useSymbolsStore$Brac === void 0 ? {} : _useSymbolsStore$Brac;\n (0, _useRender.useSymbolsRender)(Comp, props, 'BracketsRight');\n return null;\n};\nBracketsRight.displayName = 'JVR.BracketsRight';","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.Colon = void 0;\nvar _Symbols = require(\"../store/Symbols\");\nvar _useRender = require(\"../utils/useRender\");\nvar Colon = exports.Colon = function Colon(props) {\n var _useSymbolsStore = (0, _Symbols.useSymbolsStore)(),\n _useSymbolsStore$Colo = _useSymbolsStore.Colon,\n Comp = _useSymbolsStore$Colo === void 0 ? {} : _useSymbolsStore$Colo;\n (0, _useRender.useSymbolsRender)(Comp, props, 'Colon');\n return null;\n};\nColon.displayName = 'JVR.Colon';","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.Quote = void 0;\nvar _Symbols = require(\"../store/Symbols\");\nvar _useRender = require(\"../utils/useRender\");\nvar Quote = exports.Quote = function Quote(props) {\n var _useSymbolsStore = (0, _Symbols.useSymbolsStore)(),\n _useSymbolsStore$Quot = _useSymbolsStore.Quote,\n Comp = _useSymbolsStore$Quot === void 0 ? {} : _useSymbolsStore$Quot;\n (0, _useRender.useSymbolsRender)(Comp, props, 'Quote');\n return null;\n};\nQuote.displayName = 'JVR.Quote';","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.ValueQuote = void 0;\nvar _Symbols = require(\"../store/Symbols\");\nvar _useRender = require(\"../utils/useRender\");\nvar ValueQuote = exports.ValueQuote = function ValueQuote(props) {\n var _useSymbolsStore = (0, _Symbols.useSymbolsStore)(),\n _useSymbolsStore$Valu = _useSymbolsStore.ValueQuote,\n Comp = _useSymbolsStore$Valu === void 0 ? {} : _useSymbolsStore$Valu;\n (0, _useRender.useSymbolsRender)(Comp, props, 'ValueQuote');\n return null;\n};\nValueQuote.displayName = 'JVR.ValueQuote';","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\")[\"default\"];\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.ValueQuote = exports.Quote = exports.Colon = exports.BracketsOpen = exports.BracketsClose = exports.Arrow = void 0;\nvar _objectDestructuringEmpty2 = _interopRequireDefault(require(\"@babel/runtime/helpers/objectDestructuringEmpty\"));\nvar _extends2 = _interopRequireDefault(require(\"@babel/runtime/helpers/extends\"));\nvar _objectSpread2 = _interopRequireDefault(require(\"@babel/runtime/helpers/objectSpread2\"));\nvar _objectWithoutProperties2 = _interopRequireDefault(require(\"@babel/runtime/helpers/objectWithoutProperties\"));\nvar _Symbols = require(\"../store/Symbols\");\nvar _Expands = require(\"../store/Expands\");\nvar _jsxRuntime = require(\"react/jsx-runtime\");\nvar _excluded = [\"isNumber\"],\n _excluded2 = [\"as\", \"render\"],\n _excluded3 = [\"as\", \"render\"],\n _excluded4 = [\"as\", \"render\"],\n _excluded5 = [\"as\", \"style\", \"render\"],\n _excluded6 = [\"as\", \"render\"],\n _excluded7 = [\"as\", \"render\"],\n _excluded8 = [\"as\", \"render\"],\n _excluded9 = [\"as\", \"render\"];\nvar Quote = exports.Quote = function Quote(props) {\n var _useSymbolsStore = (0, _Symbols.useSymbolsStore)(),\n _useSymbolsStore$Quot = _useSymbolsStore.Quote,\n Comp = _useSymbolsStore$Quot === void 0 ? {} : _useSymbolsStore$Quot;\n var isNumber = props.isNumber,\n other = (0, _objectWithoutProperties2[\"default\"])(props, _excluded);\n if (isNumber) return null;\n var as = Comp.as,\n render = Comp.render,\n reset = (0, _objectWithoutProperties2[\"default\"])(Comp, _excluded2);\n var Elm = as || 'span';\n var elmProps = (0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, other), reset);\n var child = render && typeof render === 'function' && render(elmProps);\n if (child) return child;\n return /*#__PURE__*/(0, _jsxRuntime.jsx)(Elm, (0, _objectSpread2[\"default\"])({}, elmProps));\n};\nQuote.displayName = 'JVR.Quote';\nvar ValueQuote = exports.ValueQuote = function ValueQuote(props) {\n var _useSymbolsStore2 = (0, _Symbols.useSymbolsStore)(),\n _useSymbolsStore2$Val = _useSymbolsStore2.ValueQuote,\n Comp = _useSymbolsStore2$Val === void 0 ? {} : _useSymbolsStore2$Val;\n var other = (0, _extends2[\"default\"])({}, ((0, _objectDestructuringEmpty2[\"default\"])(props), props));\n var as = Comp.as,\n render = Comp.render,\n reset = (0, _objectWithoutProperties2[\"default\"])(Comp, _excluded3);\n var Elm = as || 'span';\n var elmProps = (0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, other), reset);\n var child = render && typeof render === 'function' && render(elmProps);\n if (child) return child;\n return /*#__PURE__*/(0, _jsxRuntime.jsx)(Elm, (0, _objectSpread2[\"default\"])({}, elmProps));\n};\nValueQuote.displayName = 'JVR.ValueQuote';\nvar Colon = exports.Colon = function Colon() {\n var _useSymbolsStore3 = (0, _Symbols.useSymbolsStore)(),\n _useSymbolsStore3$Col = _useSymbolsStore3.Colon,\n Comp = _useSymbolsStore3$Col === void 0 ? {} : _useSymbolsStore3$Col;\n var as = Comp.as,\n render = Comp.render,\n reset = (0, _objectWithoutProperties2[\"default\"])(Comp, _excluded4);\n var Elm = as || 'span';\n var child = render && typeof render === 'function' && render(reset);\n if (child) return child;\n return /*#__PURE__*/(0, _jsxRuntime.jsx)(Elm, (0, _objectSpread2[\"default\"])({}, reset));\n};\nColon.displayName = 'JVR.Colon';\nvar Arrow = exports.Arrow = function Arrow(props) {\n var _useSymbolsStore4 = (0, _Symbols.useSymbolsStore)(),\n _useSymbolsStore4$Arr = _useSymbolsStore4.Arrow,\n Comp = _useSymbolsStore4$Arr === void 0 ? {} : _useSymbolsStore4$Arr;\n var expands = (0, _Expands.useExpandsStore)();\n var expandKey = props.expandKey;\n var isExpanded = !!expands[expandKey];\n var as = Comp.as,\n style = Comp.style,\n render = Comp.render,\n reset = (0, _objectWithoutProperties2[\"default\"])(Comp, _excluded5);\n var Elm = as || 'span';\n var isRender = render && typeof render === 'function';\n var child = isRender && render((0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, reset), {}, {\n 'data-expanded': isExpanded,\n style: (0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, style), props.style)\n }));\n if (child) return child;\n return /*#__PURE__*/(0, _jsxRuntime.jsx)(Elm, (0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, reset), {}, {\n style: (0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, style), props.style)\n }));\n};\nArrow.displayName = 'JVR.Arrow';\nvar BracketsOpen = exports.BracketsOpen = function BracketsOpen(_ref) {\n var isBrackets = _ref.isBrackets;\n var _useSymbolsStore5 = (0, _Symbols.useSymbolsStore)(),\n _useSymbolsStore5$Bra = _useSymbolsStore5.BracketsLeft,\n BracketsLeft = _useSymbolsStore5$Bra === void 0 ? {} : _useSymbolsStore5$Bra,\n _useSymbolsStore5$Bra2 = _useSymbolsStore5.BraceLeft,\n BraceLeft = _useSymbolsStore5$Bra2 === void 0 ? {} : _useSymbolsStore5$Bra2;\n if (isBrackets) {\n var as = BracketsLeft.as,\n _render = BracketsLeft.render,\n reset = (0, _objectWithoutProperties2[\"default\"])(BracketsLeft, _excluded6);\n var BracketsLeftComp = as || 'span';\n var _child = _render && typeof _render === 'function' && _render(reset);\n if (_child) return _child;\n return /*#__PURE__*/(0, _jsxRuntime.jsx)(BracketsLeftComp, (0, _objectSpread2[\"default\"])({}, reset));\n }\n var elm = BraceLeft.as,\n render = BraceLeft.render,\n props = (0, _objectWithoutProperties2[\"default\"])(BraceLeft, _excluded7);\n var BraceLeftComp = elm || 'span';\n var child = render && typeof render === 'function' && render(props);\n if (child) return child;\n return /*#__PURE__*/(0, _jsxRuntime.jsx)(BraceLeftComp, (0, _objectSpread2[\"default\"])({}, props));\n};\nBracketsOpen.displayName = 'JVR.BracketsOpen';\nvar BracketsClose = exports.BracketsClose = function BracketsClose(_ref2) {\n var isBrackets = _ref2.isBrackets,\n isVisiable = _ref2.isVisiable;\n if (!isVisiable) return null;\n var _useSymbolsStore6 = (0, _Symbols.useSymbolsStore)(),\n _useSymbolsStore6$Bra = _useSymbolsStore6.BracketsRight,\n BracketsRight = _useSymbolsStore6$Bra === void 0 ? {} : _useSymbolsStore6$Bra,\n _useSymbolsStore6$Bra2 = _useSymbolsStore6.BraceRight,\n BraceRight = _useSymbolsStore6$Bra2 === void 0 ? {} : _useSymbolsStore6$Bra2;\n if (isBrackets) {\n var as = BracketsRight.as,\n _render2 = BracketsRight.render,\n _reset = (0, _objectWithoutProperties2[\"default\"])(BracketsRight, _excluded8);\n var BracketsRightComp = as || 'span';\n var _child2 = _render2 && typeof _render2 === 'function' && _render2(_reset);\n if (_child2) return _child2;\n return /*#__PURE__*/(0, _jsxRuntime.jsx)(BracketsRightComp, (0, _objectSpread2[\"default\"])({}, _reset));\n }\n var elm = BraceRight.as,\n render = BraceRight.render,\n reset = (0, _objectWithoutProperties2[\"default\"])(BraceRight, _excluded9);\n var BraceRightComp = elm || 'span';\n var child = render && typeof render === 'function' && render(reset);\n if (child) return child;\n return /*#__PURE__*/(0, _jsxRuntime.jsx)(BraceRightComp, (0, _objectSpread2[\"default\"])({}, reset));\n};\nBracketsClose.displayName = 'JVR.BracketsClose';","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.basicTheme = void 0;\nvar basicTheme = exports.basicTheme = {\n '--w-rjv-font-family': 'monospace',\n '--w-rjv-color': '#b5bd68',\n '--w-rjv-key-number': '#002b36',\n '--w-rjv-key-string': '#b5bd68',\n '--w-rjv-background-color': '#2E3235',\n '--w-rjv-line-color': '#292d30',\n '--w-rjv-arrow-color': 'var(--w-rjv-color)',\n '--w-rjv-edit-color': 'var(--w-rjv-color)',\n '--w-rjv-info-color': '#d8d8d84d',\n '--w-rjv-update-color': '#b5bd68',\n '--w-rjv-copied-color': '#b5bd68',\n '--w-rjv-copied-success-color': '#28a745',\n '--w-rjv-curlybraces-color': '#cc99cc',\n '--w-rjv-colon-color': '#bababa',\n '--w-rjv-brackets-color': '#808080',\n '--w-rjv-ellipsis-color': '#cb4b16',\n '--w-rjv-quotes-color': 'var(--w-rjv-key-string)',\n '--w-rjv-quotes-string-color': 'var(--w-rjv-type-string-color)',\n '--w-rjv-type-string-color': '#b5bd68',\n '--w-rjv-type-int-color': '#fda331',\n '--w-rjv-type-float-color': '#fda331',\n '--w-rjv-type-bigint-color': '#fda331',\n '--w-rjv-type-boolean-color': '#fda331',\n '--w-rjv-type-date-color': '#8abeb7',\n '--w-rjv-type-url-color': '#5a89c0',\n '--w-rjv-type-null-color': '#8abeb7',\n '--w-rjv-type-nan-color': '#8abeb7',\n '--w-rjv-type-undefined-color': '#8abeb7'\n};","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.darkTheme = void 0;\nvar darkTheme = exports.darkTheme = {\n '--w-rjv-font-family': 'monospace',\n '--w-rjv-color': '#0184a6',\n '--w-rjv-key-string': '#0184a6',\n '--w-rjv-background-color': '#202020',\n '--w-rjv-line-color': '#323232',\n '--w-rjv-arrow-color': 'var(--w-rjv-color)',\n '--w-rjv-edit-color': 'var(--w-rjv-color)',\n '--w-rjv-info-color': '#656565',\n '--w-rjv-update-color': '#ebcb8b',\n '--w-rjv-copied-color': '#0184a6',\n '--w-rjv-copied-success-color': '#28a745',\n '--w-rjv-curlybraces-color': '#1896b6',\n '--w-rjv-brackets-color': '#1896b6',\n '--w-rjv-quotes-color': 'var(--w-rjv-key-string)',\n '--w-rjv-quotes-string-color': 'var(--w-rjv-type-string-color)',\n '--w-rjv-type-string-color': '#cb4b16',\n '--w-rjv-type-int-color': '#268bd2',\n '--w-rjv-type-float-color': '#859900',\n '--w-rjv-type-bigint-color': '#268bd2',\n '--w-rjv-type-boolean-color': '#2aa198',\n '--w-rjv-type-date-color': '#586e75',\n '--w-rjv-type-url-color': '#649bd8',\n '--w-rjv-type-null-color': '#d33682',\n '--w-rjv-type-nan-color': '#076678',\n '--w-rjv-type-undefined-color': '#586e75'\n};","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.githubDarkTheme = void 0;\nvar githubDarkTheme = exports.githubDarkTheme = {\n '--w-rjv-font-family': 'monospace',\n '--w-rjv-color': '#79c0ff',\n '--w-rjv-key-string': '#79c0ff',\n '--w-rjv-background-color': '#0d1117',\n '--w-rjv-line-color': '#94949480',\n '--w-rjv-arrow-color': '#ccc',\n '--w-rjv-edit-color': 'var(--w-rjv-color)',\n '--w-rjv-info-color': '#7b7b7b',\n '--w-rjv-update-color': '#ebcb8b',\n '--w-rjv-copied-color': '#79c0ff',\n '--w-rjv-copied-success-color': '#28a745',\n '--w-rjv-curlybraces-color': '#8b949e',\n '--w-rjv-colon-color': '#c9d1d9',\n '--w-rjv-brackets-color': '#8b949e',\n '--w-rjv-quotes-color': 'var(--w-rjv-key-string)',\n '--w-rjv-quotes-string-color': 'var(--w-rjv-type-string-color)',\n '--w-rjv-type-string-color': '#a5d6ff',\n '--w-rjv-type-int-color': '#79c0ff',\n '--w-rjv-type-float-color': '#79c0ff',\n '--w-rjv-type-bigint-color': '#79c0ff',\n '--w-rjv-type-boolean-color': '#ffab70',\n '--w-rjv-type-date-color': '#79c0ff',\n '--w-rjv-type-url-color': '#4facff',\n '--w-rjv-type-null-color': '#ff7b72',\n '--w-rjv-type-nan-color': '#859900',\n '--w-rjv-type-undefined-color': '#79c0ff'\n};","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.githubLightTheme = void 0;\nvar githubLightTheme = exports.githubLightTheme = {\n '--w-rjv-font-family': 'monospace',\n '--w-rjv-color': '#6f42c1',\n '--w-rjv-key-string': '#6f42c1',\n '--w-rjv-background-color': '#ffffff',\n '--w-rjv-line-color': '#ddd',\n '--w-rjv-arrow-color': '#6e7781',\n '--w-rjv-edit-color': 'var(--w-rjv-color)',\n '--w-rjv-info-color': '#0000004d',\n '--w-rjv-update-color': '#ebcb8b',\n '--w-rjv-copied-color': '#002b36',\n '--w-rjv-copied-success-color': '#28a745',\n '--w-rjv-curlybraces-color': '#6a737d',\n '--w-rjv-colon-color': '#24292e',\n '--w-rjv-brackets-color': '#6a737d',\n '--w-rjv-quotes-color': 'var(--w-rjv-key-string)',\n '--w-rjv-quotes-string-color': 'var(--w-rjv-type-string-color)',\n '--w-rjv-type-string-color': '#032f62',\n '--w-rjv-type-int-color': '#005cc5',\n '--w-rjv-type-float-color': '#005cc5',\n '--w-rjv-type-bigint-color': '#005cc5',\n '--w-rjv-type-boolean-color': '#d73a49',\n '--w-rjv-type-date-color': '#005cc5',\n '--w-rjv-type-url-color': '#0969da',\n '--w-rjv-type-null-color': '#d73a49',\n '--w-rjv-type-nan-color': '#859900',\n '--w-rjv-type-undefined-color': '#005cc5'\n};","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.gruvboxTheme = void 0;\nvar gruvboxTheme = exports.gruvboxTheme = {\n '--w-rjv-font-family': 'monospace',\n '--w-rjv-color': '#3c3836',\n '--w-rjv-key-string': '#3c3836',\n '--w-rjv-background-color': '#fbf1c7',\n '--w-rjv-line-color': '#ebdbb2',\n '--w-rjv-arrow-color': 'var(--w-rjv-color)',\n '--w-rjv-edit-color': 'var(--w-rjv-color)',\n '--w-rjv-info-color': '#0000004d',\n '--w-rjv-update-color': '#ebcb8b',\n '--w-rjv-copied-color': '#002b36',\n '--w-rjv-copied-success-color': '#28a745',\n '--w-rjv-curlybraces-color': '#236a7c',\n '--w-rjv-colon-color': '#002b36',\n '--w-rjv-brackets-color': '#236a7c',\n '--w-rjv-quotes-color': 'var(--w-rjv-key-string)',\n '--w-rjv-quotes-string-color': 'var(--w-rjv-type-string-color)',\n '--w-rjv-type-string-color': '#3c3836',\n '--w-rjv-type-int-color': '#8f3f71',\n '--w-rjv-type-float-color': '#8f3f71',\n '--w-rjv-type-bigint-color': '#8f3f71',\n '--w-rjv-type-boolean-color': '#8f3f71',\n '--w-rjv-type-date-color': '#076678',\n '--w-rjv-type-url-color': '#0969da',\n '--w-rjv-type-null-color': '#076678',\n '--w-rjv-type-nan-color': '#076678',\n '--w-rjv-type-undefined-color': '#076678'\n};","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.lightTheme = void 0;\nvar lightTheme = exports.lightTheme = {\n '--w-rjv-font-family': 'monospace',\n '--w-rjv-color': '#002b36',\n '--w-rjv-key-string': '#002b36',\n '--w-rjv-background-color': '#ffffff',\n '--w-rjv-line-color': '#ebebeb',\n '--w-rjv-arrow-color': 'var(--w-rjv-color)',\n '--w-rjv-edit-color': 'var(--w-rjv-color)',\n '--w-rjv-info-color': '#0000004d',\n '--w-rjv-update-color': '#ebcb8b',\n '--w-rjv-copied-color': '#002b36',\n '--w-rjv-copied-success-color': '#28a745',\n '--w-rjv-curlybraces-color': '#236a7c',\n '--w-rjv-colon-color': '#002b36',\n '--w-rjv-brackets-color': '#236a7c',\n '--w-rjv-quotes-color': 'var(--w-rjv-key-string)',\n '--w-rjv-quotes-string-color': 'var(--w-rjv-type-string-color)',\n '--w-rjv-type-string-color': '#cb4b16',\n '--w-rjv-type-int-color': '#268bd2',\n '--w-rjv-type-float-color': '#859900',\n '--w-rjv-type-bigint-color': '#268bd2',\n '--w-rjv-type-boolean-color': '#2aa198',\n '--w-rjv-type-date-color': '#586e75',\n '--w-rjv-type-url-color': '#0969da',\n '--w-rjv-type-null-color': '#d33682',\n '--w-rjv-type-nan-color': '#859900',\n '--w-rjv-type-undefined-color': '#586e75'\n};","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.monokaiTheme = void 0;\nvar monokaiTheme = exports.monokaiTheme = {\n '--w-rjv-font-family': 'monospace',\n '--w-rjv-color': '#E6DB74',\n '--w-rjv-key-string': '#E6DB74',\n '--w-rjv-background-color': '#272822',\n '--w-rjv-line-color': '#3e3d32',\n '--w-rjv-arrow-color': '#f8f8f2',\n '--w-rjv-edit-color': 'var(--w-rjv-color)',\n '--w-rjv-info-color': '#cecece4d',\n '--w-rjv-update-color': '#5f5600',\n '--w-rjv-copied-color': '#E6DB74',\n '--w-rjv-copied-success-color': '#28a745',\n '--w-rjv-curlybraces-color': '#f8f8f2',\n '--w-rjv-colon-color': '#f8f8f2',\n '--w-rjv-brackets-color': '#f8f8f2',\n '--w-rjv-quotes-color': 'var(--w-rjv-key-string)',\n '--w-rjv-quotes-string-color': 'var(--w-rjv-type-string-color)',\n '--w-rjv-type-string-color': '#E6DB74',\n '--w-rjv-type-int-color': '#AE81FF',\n '--w-rjv-type-float-color': '#AE81FF',\n '--w-rjv-type-bigint-color': '#AE81FF',\n '--w-rjv-type-boolean-color': '#AE81FF',\n '--w-rjv-type-date-color': '#fd9720c7',\n '--w-rjv-type-url-color': '#55a3ff',\n '--w-rjv-type-null-color': '#FA2672',\n '--w-rjv-type-nan-color': '#FD971F',\n '--w-rjv-type-undefined-color': '#FD971F'\n};","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.nordTheme = void 0;\nvar nordTheme = exports.nordTheme = {\n '--w-rjv-font-family': 'monospace',\n '--w-rjv-color': '#88c0d0',\n '--w-rjv-key-string': '#88c0d0',\n '--w-rjv-background-color': '#2e3440',\n '--w-rjv-line-color': '#4c566a',\n '--w-rjv-arrow-color': 'var(--w-rjv-color)',\n '--w-rjv-edit-color': 'var(--w-rjv-color)',\n '--w-rjv-info-color': '#c7c7c74d',\n '--w-rjv-update-color': '#88c0cf75',\n '--w-rjv-copied-color': '#119cc0',\n '--w-rjv-copied-success-color': '#28a745',\n '--w-rjv-curlybraces-color': '#8fbcbb',\n '--w-rjv-colon-color': '#6d9fac',\n '--w-rjv-brackets-color': '#8fbcbb',\n '--w-rjv-quotes-color': 'var(--w-rjv-key-string)',\n '--w-rjv-quotes-string-color': 'var(--w-rjv-type-string-color)',\n '--w-rjv-type-string-color': '#a3be8c',\n '--w-rjv-type-int-color': '#b48ead',\n '--w-rjv-type-float-color': '#859900',\n '--w-rjv-type-bigint-color': '#b48ead',\n '--w-rjv-type-boolean-color': '#d08770',\n '--w-rjv-type-date-color': '#41a2c2',\n '--w-rjv-type-url-color': '#5e81ac',\n '--w-rjv-type-null-color': '#5e81ac',\n '--w-rjv-type-nan-color': '#859900',\n '--w-rjv-type-undefined-color': '#586e75'\n};","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.vscodeTheme = void 0;\nvar vscodeTheme = exports.vscodeTheme = {\n '--w-rjv-font-family': 'monospace',\n '--w-rjv-color': '#9cdcfe',\n '--w-rjv-key-string': '#9cdcfe',\n '--w-rjv-background-color': '#1e1e1e',\n '--w-rjv-line-color': '#36334280',\n '--w-rjv-arrow-color': '#838383',\n '--w-rjv-edit-color': 'var(--w-rjv-color)',\n '--w-rjv-info-color': '#9c9c9c7a',\n '--w-rjv-update-color': '#9cdcfe',\n '--w-rjv-copied-color': '#9cdcfe',\n '--w-rjv-copied-success-color': '#28a745',\n '--w-rjv-curlybraces-color': '#d4d4d4',\n '--w-rjv-colon-color': '#d4d4d4',\n '--w-rjv-brackets-color': '#d4d4d4',\n '--w-rjv-quotes-color': 'var(--w-rjv-key-string)',\n '--w-rjv-quotes-string-color': 'var(--w-rjv-type-string-color)',\n '--w-rjv-type-string-color': '#ce9178',\n '--w-rjv-type-int-color': '#b5cea8',\n '--w-rjv-type-float-color': '#b5cea8',\n '--w-rjv-type-bigint-color': '#b5cea8',\n '--w-rjv-type-boolean-color': '#569cd6',\n '--w-rjv-type-date-color': '#b5cea8',\n '--w-rjv-type-url-color': '#3b89cf',\n '--w-rjv-type-null-color': '#569cd6',\n '--w-rjv-type-nan-color': '#859900',\n '--w-rjv-type-undefined-color': '#569cd6'\n};","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.Bigint = void 0;\nvar _Types = require(\"../store/Types\");\nvar _useRender = require(\"../utils/useRender\");\nvar Bigint = exports.Bigint = function Bigint(props) {\n var _useTypesStore = (0, _Types.useTypesStore)(),\n _useTypesStore$Bigint = _useTypesStore.Bigint,\n Comp = _useTypesStore$Bigint === void 0 ? {} : _useTypesStore$Bigint;\n (0, _useRender.useTypesRender)(Comp, props, 'Bigint');\n return null;\n};\nBigint.displayName = 'JVR.Bigint';","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.Date = void 0;\nvar _Types = require(\"../store/Types\");\nvar _useRender = require(\"../utils/useRender\");\nvar Date = exports.Date = function Date(props) {\n var _useTypesStore = (0, _Types.useTypesStore)(),\n _useTypesStore$Date = _useTypesStore.Date,\n Comp = _useTypesStore$Date === void 0 ? {} : _useTypesStore$Date;\n (0, _useRender.useTypesRender)(Comp, props, 'Date');\n return null;\n};\nDate.displayName = 'JVR.Date';","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.False = void 0;\nvar _Types = require(\"../store/Types\");\nvar _useRender = require(\"../utils/useRender\");\nvar False = exports.False = function False(props) {\n var _useTypesStore = (0, _Types.useTypesStore)(),\n _useTypesStore$False = _useTypesStore.False,\n Comp = _useTypesStore$False === void 0 ? {} : _useTypesStore$False;\n (0, _useRender.useTypesRender)(Comp, props, 'False');\n return null;\n};\nFalse.displayName = 'JVR.False';","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.Float = void 0;\nvar _Types = require(\"../store/Types\");\nvar _useRender = require(\"../utils/useRender\");\nvar Float = exports.Float = function Float(props) {\n var _useTypesStore = (0, _Types.useTypesStore)(),\n _useTypesStore$Float = _useTypesStore.Float,\n Comp = _useTypesStore$Float === void 0 ? {} : _useTypesStore$Float;\n (0, _useRender.useTypesRender)(Comp, props, 'Float');\n return null;\n};\nFloat.displayName = 'JVR.Float';","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.Int = void 0;\nvar _Types = require(\"../store/Types\");\nvar _useRender = require(\"../utils/useRender\");\nvar Int = exports.Int = function Int(props) {\n var _useTypesStore = (0, _Types.useTypesStore)(),\n _useTypesStore$Int = _useTypesStore.Int,\n Comp = _useTypesStore$Int === void 0 ? {} : _useTypesStore$Int;\n (0, _useRender.useTypesRender)(Comp, props, 'Int');\n return null;\n};\nInt.displayName = 'JVR.Int';","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.Map = void 0;\nvar _Types = require(\"../store/Types\");\nvar _useRender = require(\"../utils/useRender\");\nvar Map = exports.Map = function Map(props) {\n var _useTypesStore = (0, _Types.useTypesStore)(),\n _useTypesStore$Map = _useTypesStore.Map,\n Comp = _useTypesStore$Map === void 0 ? {} : _useTypesStore$Map;\n (0, _useRender.useTypesRender)(Comp, props, 'Map');\n return null;\n};\nMap.displayName = 'JVR.Map';","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.Nan = void 0;\nvar _Types = require(\"../store/Types\");\nvar _useRender = require(\"../utils/useRender\");\nvar Nan = exports.Nan = function Nan(props) {\n var _useTypesStore = (0, _Types.useTypesStore)(),\n _useTypesStore$Nan = _useTypesStore.Nan,\n Comp = _useTypesStore$Nan === void 0 ? {} : _useTypesStore$Nan;\n (0, _useRender.useTypesRender)(Comp, props, 'Nan');\n return null;\n};\nNan.displayName = 'JVR.Nan';","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.Null = void 0;\nvar _Types = require(\"../store/Types\");\nvar _useRender = require(\"../utils/useRender\");\nvar Null = exports.Null = function Null(props) {\n var _useTypesStore = (0, _Types.useTypesStore)(),\n _useTypesStore$Null = _useTypesStore.Null,\n Comp = _useTypesStore$Null === void 0 ? {} : _useTypesStore$Null;\n (0, _useRender.useTypesRender)(Comp, props, 'Null');\n return null;\n};\nNull.displayName = 'JVR.Null';","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.Set = void 0;\nvar _Types = require(\"../store/Types\");\nvar _useRender = require(\"../utils/useRender\");\nvar Set = exports.Set = function Set(props) {\n var _useTypesStore = (0, _Types.useTypesStore)(),\n _useTypesStore$Set = _useTypesStore.Set,\n Comp = _useTypesStore$Set === void 0 ? {} : _useTypesStore$Set;\n (0, _useRender.useTypesRender)(Comp, props, 'Set');\n return null;\n};\nSet.displayName = 'JVR.Set';","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.StringText = void 0;\nvar _Types = require(\"../store/Types\");\nvar _useRender = require(\"../utils/useRender\");\nvar StringText = exports.StringText = function StringText(props) {\n var _useTypesStore = (0, _Types.useTypesStore)(),\n _useTypesStore$Str = _useTypesStore.Str,\n Comp = _useTypesStore$Str === void 0 ? {} : _useTypesStore$Str;\n (0, _useRender.useTypesRender)(Comp, props, 'Str');\n return null;\n};\nStringText.displayName = 'JVR.StringText';","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.True = void 0;\nvar _Types = require(\"../store/Types\");\nvar _useRender = require(\"../utils/useRender\");\nvar True = exports.True = function True(props) {\n var _useTypesStore = (0, _Types.useTypesStore)(),\n _useTypesStore$True = _useTypesStore.True,\n Comp = _useTypesStore$True === void 0 ? {} : _useTypesStore$True;\n (0, _useRender.useTypesRender)(Comp, props, 'True');\n return null;\n};\nTrue.displayName = 'JVR.True';","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.Undefined = void 0;\nvar _Types = require(\"../store/Types\");\nvar _useRender = require(\"../utils/useRender\");\nvar Undefined = exports.Undefined = function Undefined(props) {\n var _useTypesStore = (0, _Types.useTypesStore)(),\n _useTypesStore$Undefi = _useTypesStore.Undefined,\n Comp = _useTypesStore$Undefi === void 0 ? {} : _useTypesStore$Undefi;\n (0, _useRender.useTypesRender)(Comp, props, 'Undefined');\n return null;\n};\nUndefined.displayName = 'JVR.Undefined';","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.Url = void 0;\nvar _Types = require(\"../store/Types\");\nvar _useRender = require(\"../utils/useRender\");\nvar Url = exports.Url = function Url(props) {\n var _useTypesStore = (0, _Types.useTypesStore)(),\n _useTypesStore$Url = _useTypesStore.Url,\n Comp = _useTypesStore$Url === void 0 ? {} : _useTypesStore$Url;\n (0, _useRender.useTypesRender)(Comp, props, 'Url');\n return null;\n};\nUrl.displayName = 'JVR.Url';","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\")[\"default\"];\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.bigIntToString = exports.TypeUrl = exports.TypeUndefined = exports.TypeTrue = exports.TypeString = exports.TypeNull = exports.TypeNan = exports.TypeInt = exports.TypeFloat = exports.TypeFalse = exports.TypeDate = exports.TypeBigint = exports.SetComp = exports.MapComp = void 0;\nvar _slicedToArray2 = _interopRequireDefault(require(\"@babel/runtime/helpers/slicedToArray\"));\nvar _objectSpread2 = _interopRequireDefault(require(\"@babel/runtime/helpers/objectSpread2\"));\nvar _objectWithoutProperties2 = _interopRequireDefault(require(\"@babel/runtime/helpers/objectWithoutProperties\"));\nvar _react = require(\"react\");\nvar _store = require(\"../store\");\nvar _Types = require(\"../store/Types\");\nvar _symbol = require(\"../symbol\");\nvar _jsxRuntime = require(\"react/jsx-runtime\");\nvar _excluded = [\"as\", \"render\"],\n _excluded2 = [\"as\", \"render\"],\n _excluded3 = [\"as\", \"render\"],\n _excluded4 = [\"as\", \"render\"],\n _excluded5 = [\"as\", \"render\"],\n _excluded6 = [\"as\", \"render\"],\n _excluded7 = [\"as\", \"render\"],\n _excluded8 = [\"as\", \"render\"],\n _excluded9 = [\"as\", \"render\"],\n _excluded10 = [\"as\", \"render\"],\n _excluded11 = [\"as\", \"render\"],\n _excluded12 = [\"as\", \"render\"],\n _excluded13 = [\"as\", \"render\"];\nvar bigIntToString = exports.bigIntToString = function bigIntToString(bi) {\n if (bi === undefined) {\n return '0n';\n } else if (typeof bi === 'string') {\n try {\n bi = BigInt(bi);\n } catch (e) {\n return '0n';\n }\n }\n return bi ? bi.toString() + 'n' : '0n';\n};\nvar SetComp = exports.SetComp = function SetComp(_ref) {\n var value = _ref.value,\n keyName = _ref.keyName;\n var _useTypesStore = (0, _Types.useTypesStore)(),\n _useTypesStore$Set = _useTypesStore.Set,\n Comp = _useTypesStore$Set === void 0 ? {} : _useTypesStore$Set,\n displayDataTypes = _useTypesStore.displayDataTypes;\n var isSet = value instanceof Set;\n if (!isSet || !displayDataTypes) return null;\n var as = Comp.as,\n render = Comp.render,\n reset = (0, _objectWithoutProperties2[\"default\"])(Comp, _excluded);\n var isRender = render && typeof render === 'function';\n var type = isRender && render(reset, {\n type: 'type',\n value: value,\n keyName: keyName\n });\n if (type) return type;\n var Elm = as || 'span';\n return /*#__PURE__*/(0, _jsxRuntime.jsx)(Elm, (0, _objectSpread2[\"default\"])({}, reset));\n};\nSetComp.displayName = 'JVR.SetComp';\nvar MapComp = exports.MapComp = function MapComp(_ref2) {\n var value = _ref2.value,\n keyName = _ref2.keyName;\n var _useTypesStore2 = (0, _Types.useTypesStore)(),\n _useTypesStore2$Map = _useTypesStore2.Map,\n Comp = _useTypesStore2$Map === void 0 ? {} : _useTypesStore2$Map,\n displayDataTypes = _useTypesStore2.displayDataTypes;\n var isMap = value instanceof Map;\n if (!isMap || !displayDataTypes) return null;\n var as = Comp.as,\n render = Comp.render,\n reset = (0, _objectWithoutProperties2[\"default\"])(Comp, _excluded2);\n var isRender = render && typeof render === 'function';\n var type = isRender && render(reset, {\n type: 'type',\n value: value,\n keyName: keyName\n });\n if (type) return type;\n var Elm = as || 'span';\n return /*#__PURE__*/(0, _jsxRuntime.jsx)(Elm, (0, _objectSpread2[\"default\"])({}, reset));\n};\nMapComp.displayName = 'JVR.MapComp';\nvar defalutStyle = {\n opacity: 0.75,\n paddingRight: 4\n};\nvar TypeString = exports.TypeString = function TypeString(_ref3) {\n var _ref3$children = _ref3.children,\n children = _ref3$children === void 0 ? '' : _ref3$children,\n keyName = _ref3.keyName;\n var _useTypesStore3 = (0, _Types.useTypesStore)(),\n _useTypesStore3$Str = _useTypesStore3.Str,\n Str = _useTypesStore3$Str === void 0 ? {} : _useTypesStore3$Str,\n displayDataTypes = _useTypesStore3.displayDataTypes;\n var _useStore = (0, _store.useStore)(),\n _useStore$shortenText = _useStore.shortenTextAfterLength,\n length = _useStore$shortenText === void 0 ? 30 : _useStore$shortenText;\n var as = Str.as,\n render = Str.render,\n reset = (0, _objectWithoutProperties2[\"default\"])(Str, _excluded3);\n var childrenStr = children;\n var _useState = (0, _react.useState)(length && childrenStr.length > length),\n _useState2 = (0, _slicedToArray2[\"default\"])(_useState, 2),\n shorten = _useState2[0],\n setShorten = _useState2[1];\n (0, _react.useEffect)(function () {\n return setShorten(length && childrenStr.length > length);\n }, [length]);\n var Comp = as || 'span';\n var style = (0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, defalutStyle), Str.style || {});\n if (length > 0) {\n reset.style = (0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, reset.style), {}, {\n cursor: childrenStr.length <= length ? 'initial' : 'pointer'\n });\n if (childrenStr.length > length) {\n reset.onClick = function () {\n setShorten(!shorten);\n };\n }\n }\n var text = shorten ? \"\".concat(childrenStr.slice(0, length), \"...\") : childrenStr;\n var isRender = render && typeof render === 'function';\n var type = isRender && render((0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, reset), {}, {\n style: style\n }), {\n type: 'type',\n value: children,\n keyName: keyName\n });\n var child = isRender && render((0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, reset), {}, {\n children: text,\n className: 'w-rjv-value'\n }), {\n type: 'value',\n value: children,\n keyName: keyName\n });\n return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_react.Fragment, {\n children: [displayDataTypes && (type || /*#__PURE__*/(0, _jsxRuntime.jsx)(Comp, (0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, reset), {}, {\n style: style\n }))), child || /*#__PURE__*/(0, _jsxRuntime.jsxs)(_react.Fragment, {\n children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_symbol.ValueQuote, {}), /*#__PURE__*/(0, _jsxRuntime.jsx)(Comp, (0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, reset), {}, {\n className: \"w-rjv-value\",\n children: text\n })), /*#__PURE__*/(0, _jsxRuntime.jsx)(_symbol.ValueQuote, {})]\n })]\n });\n};\nTypeString.displayName = 'JVR.TypeString';\nvar TypeTrue = exports.TypeTrue = function TypeTrue(_ref4) {\n var children = _ref4.children,\n keyName = _ref4.keyName;\n var _useTypesStore4 = (0, _Types.useTypesStore)(),\n _useTypesStore4$True = _useTypesStore4.True,\n True = _useTypesStore4$True === void 0 ? {} : _useTypesStore4$True,\n displayDataTypes = _useTypesStore4.displayDataTypes;\n var as = True.as,\n render = True.render,\n reset = (0, _objectWithoutProperties2[\"default\"])(True, _excluded4);\n var Comp = as || 'span';\n var style = (0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, defalutStyle), True.style || {});\n var isRender = render && typeof render === 'function';\n var type = isRender && render((0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, reset), {}, {\n style: style\n }), {\n type: 'type',\n value: children,\n keyName: keyName\n });\n var child = isRender && render((0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, reset), {}, {\n children: children,\n className: 'w-rjv-value'\n }), {\n type: 'value',\n value: children,\n keyName: keyName\n });\n return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_react.Fragment, {\n children: [displayDataTypes && (type || /*#__PURE__*/(0, _jsxRuntime.jsx)(Comp, (0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, reset), {}, {\n style: style\n }))), child || /*#__PURE__*/(0, _jsxRuntime.jsx)(Comp, (0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, reset), {}, {\n className: \"w-rjv-value\",\n children: children === null || children === void 0 ? void 0 : children.toString()\n }))]\n });\n};\nTypeTrue.displayName = 'JVR.TypeTrue';\nvar TypeFalse = exports.TypeFalse = function TypeFalse(_ref5) {\n var children = _ref5.children,\n keyName = _ref5.keyName;\n var _useTypesStore5 = (0, _Types.useTypesStore)(),\n _useTypesStore5$False = _useTypesStore5.False,\n False = _useTypesStore5$False === void 0 ? {} : _useTypesStore5$False,\n displayDataTypes = _useTypesStore5.displayDataTypes;\n var as = False.as,\n render = False.render,\n reset = (0, _objectWithoutProperties2[\"default\"])(False, _excluded5);\n var Comp = as || 'span';\n var style = (0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, defalutStyle), False.style || {});\n var isRender = render && typeof render === 'function';\n var type = isRender && render((0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, reset), {}, {\n style: style\n }), {\n type: 'type',\n value: children,\n keyName: keyName\n });\n var child = isRender && render((0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, reset), {}, {\n children: children,\n className: 'w-rjv-value'\n }), {\n type: 'value',\n value: children,\n keyName: keyName\n });\n return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_react.Fragment, {\n children: [displayDataTypes && (type || /*#__PURE__*/(0, _jsxRuntime.jsx)(Comp, (0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, reset), {}, {\n style: style\n }))), child || /*#__PURE__*/(0, _jsxRuntime.jsx)(Comp, (0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, reset), {}, {\n className: \"w-rjv-value\",\n children: children === null || children === void 0 ? void 0 : children.toString()\n }))]\n });\n};\nTypeFalse.displayName = 'JVR.TypeFalse';\nvar TypeFloat = exports.TypeFloat = function TypeFloat(_ref6) {\n var children = _ref6.children,\n keyName = _ref6.keyName;\n var _useTypesStore6 = (0, _Types.useTypesStore)(),\n _useTypesStore6$Float = _useTypesStore6.Float,\n Float = _useTypesStore6$Float === void 0 ? {} : _useTypesStore6$Float,\n displayDataTypes = _useTypesStore6.displayDataTypes;\n var as = Float.as,\n render = Float.render,\n reset = (0, _objectWithoutProperties2[\"default\"])(Float, _excluded6);\n var Comp = as || 'span';\n var style = (0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, defalutStyle), Float.style || {});\n var isRender = render && typeof render === 'function';\n var type = isRender && render((0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, reset), {}, {\n style: style\n }), {\n type: 'type',\n value: children,\n keyName: keyName\n });\n var child = isRender && render((0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, reset), {}, {\n children: children,\n className: 'w-rjv-value'\n }), {\n type: 'value',\n value: children,\n keyName: keyName\n });\n return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_react.Fragment, {\n children: [displayDataTypes && (type || /*#__PURE__*/(0, _jsxRuntime.jsx)(Comp, (0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, reset), {}, {\n style: style\n }))), child || /*#__PURE__*/(0, _jsxRuntime.jsx)(Comp, (0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, reset), {}, {\n className: \"w-rjv-value\",\n children: children === null || children === void 0 ? void 0 : children.toString()\n }))]\n });\n};\nTypeFloat.displayName = 'JVR.TypeFloat';\nvar TypeInt = exports.TypeInt = function TypeInt(_ref7) {\n var children = _ref7.children,\n keyName = _ref7.keyName;\n var _useTypesStore7 = (0, _Types.useTypesStore)(),\n _useTypesStore7$Int = _useTypesStore7.Int,\n Int = _useTypesStore7$Int === void 0 ? {} : _useTypesStore7$Int,\n displayDataTypes = _useTypesStore7.displayDataTypes;\n var as = Int.as,\n render = Int.render,\n reset = (0, _objectWithoutProperties2[\"default\"])(Int, _excluded7);\n var Comp = as || 'span';\n var style = (0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, defalutStyle), Int.style || {});\n var isRender = render && typeof render === 'function';\n var type = isRender && render((0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, reset), {}, {\n style: style\n }), {\n type: 'type',\n value: children,\n keyName: keyName\n });\n var child = isRender && render((0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, reset), {}, {\n children: children,\n className: 'w-rjv-value'\n }), {\n type: 'value',\n value: children,\n keyName: keyName\n });\n return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_react.Fragment, {\n children: [displayDataTypes && (type || /*#__PURE__*/(0, _jsxRuntime.jsx)(Comp, (0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, reset), {}, {\n style: style\n }))), child || /*#__PURE__*/(0, _jsxRuntime.jsx)(Comp, (0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, reset), {}, {\n className: \"w-rjv-value\",\n children: children === null || children === void 0 ? void 0 : children.toString()\n }))]\n });\n};\nTypeInt.displayName = 'JVR.TypeInt';\nvar TypeBigint = exports.TypeBigint = function TypeBigint(_ref8) {\n var children = _ref8.children,\n keyName = _ref8.keyName;\n var _useTypesStore8 = (0, _Types.useTypesStore)(),\n _useTypesStore8$Bigin = _useTypesStore8.Bigint,\n CompBigint = _useTypesStore8$Bigin === void 0 ? {} : _useTypesStore8$Bigin,\n displayDataTypes = _useTypesStore8.displayDataTypes;\n var as = CompBigint.as,\n render = CompBigint.render,\n reset = (0, _objectWithoutProperties2[\"default\"])(CompBigint, _excluded8);\n var Comp = as || 'span';\n var style = (0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, defalutStyle), CompBigint.style || {});\n var isRender = render && typeof render === 'function';\n var type = isRender && render((0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, reset), {}, {\n style: style\n }), {\n type: 'type',\n value: children,\n keyName: keyName\n });\n var child = isRender && render((0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, reset), {}, {\n children: children,\n className: 'w-rjv-value'\n }), {\n type: 'value',\n value: children,\n keyName: keyName\n });\n return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_react.Fragment, {\n children: [displayDataTypes && (type || /*#__PURE__*/(0, _jsxRuntime.jsx)(Comp, (0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, reset), {}, {\n style: style\n }))), child || /*#__PURE__*/(0, _jsxRuntime.jsx)(Comp, (0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, reset), {}, {\n className: \"w-rjv-value\",\n children: bigIntToString(children === null || children === void 0 ? void 0 : children.toString())\n }))]\n });\n};\nTypeBigint.displayName = 'JVR.TypeFloat';\nvar TypeUrl = exports.TypeUrl = function TypeUrl(_ref9) {\n var children = _ref9.children,\n keyName = _ref9.keyName;\n var _useTypesStore9 = (0, _Types.useTypesStore)(),\n _useTypesStore9$Url = _useTypesStore9.Url,\n Url = _useTypesStore9$Url === void 0 ? {} : _useTypesStore9$Url,\n displayDataTypes = _useTypesStore9.displayDataTypes;\n var as = Url.as,\n render = Url.render,\n reset = (0, _objectWithoutProperties2[\"default\"])(Url, _excluded9);\n var Comp = as || 'span';\n var style = (0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, defalutStyle), Url.style);\n var isRender = render && typeof render === 'function';\n var type = isRender && render((0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, reset), {}, {\n style: style\n }), {\n type: 'type',\n value: children,\n keyName: keyName\n });\n var child = isRender && render((0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, reset), {}, {\n children: children === null || children === void 0 ? void 0 : children.href,\n className: 'w-rjv-value'\n }), {\n type: 'value',\n value: children,\n keyName: keyName\n });\n return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_react.Fragment, {\n children: [displayDataTypes && (type || /*#__PURE__*/(0, _jsxRuntime.jsx)(Comp, (0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, reset), {}, {\n style: style\n }))), child || /*#__PURE__*/(0, _jsxRuntime.jsxs)(\"a\", (0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({\n href: children === null || children === void 0 ? void 0 : children.href,\n target: \"_blank\"\n }, reset), {}, {\n className: \"w-rjv-value\",\n children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_symbol.ValueQuote, {}), children === null || children === void 0 ? void 0 : children.href, /*#__PURE__*/(0, _jsxRuntime.jsx)(_symbol.ValueQuote, {})]\n }))]\n });\n};\nTypeUrl.displayName = 'JVR.TypeUrl';\nvar TypeDate = exports.TypeDate = function TypeDate(_ref10) {\n var children = _ref10.children,\n keyName = _ref10.keyName;\n var _useTypesStore10 = (0, _Types.useTypesStore)(),\n _useTypesStore10$Date = _useTypesStore10.Date,\n CompData = _useTypesStore10$Date === void 0 ? {} : _useTypesStore10$Date,\n displayDataTypes = _useTypesStore10.displayDataTypes;\n var as = CompData.as,\n render = CompData.render,\n reset = (0, _objectWithoutProperties2[\"default\"])(CompData, _excluded10);\n var Comp = as || 'span';\n var style = (0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, defalutStyle), CompData.style || {});\n var isRender = render && typeof render === 'function';\n var type = isRender && render((0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, reset), {}, {\n style: style\n }), {\n type: 'type',\n value: children,\n keyName: keyName\n });\n var childStr = children instanceof Date ? children.toLocaleString() : children;\n var child = isRender && render((0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, reset), {}, {\n children: childStr,\n className: 'w-rjv-value'\n }), {\n type: 'value',\n value: children,\n keyName: keyName\n });\n return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_react.Fragment, {\n children: [displayDataTypes && (type || /*#__PURE__*/(0, _jsxRuntime.jsx)(Comp, (0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, reset), {}, {\n style: style\n }))), child || /*#__PURE__*/(0, _jsxRuntime.jsx)(Comp, (0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, reset), {}, {\n className: \"w-rjv-value\",\n children: childStr\n }))]\n });\n};\nTypeDate.displayName = 'JVR.TypeDate';\nvar TypeUndefined = exports.TypeUndefined = function TypeUndefined(_ref11) {\n var children = _ref11.children,\n keyName = _ref11.keyName;\n var _useTypesStore11 = (0, _Types.useTypesStore)(),\n _useTypesStore11$Unde = _useTypesStore11.Undefined,\n Undefined = _useTypesStore11$Unde === void 0 ? {} : _useTypesStore11$Unde,\n displayDataTypes = _useTypesStore11.displayDataTypes;\n var as = Undefined.as,\n render = Undefined.render,\n reset = (0, _objectWithoutProperties2[\"default\"])(Undefined, _excluded11);\n var Comp = as || 'span';\n var style = (0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, defalutStyle), Undefined.style || {});\n var isRender = render && typeof render === 'function';\n var type = isRender && render((0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, reset), {}, {\n style: style\n }), {\n type: 'type',\n value: children,\n keyName: keyName\n });\n var child = isRender && render((0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, reset), {}, {\n children: children,\n className: 'w-rjv-value'\n }), {\n type: 'value',\n value: children,\n keyName: keyName\n });\n return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_react.Fragment, {\n children: [displayDataTypes && (type || /*#__PURE__*/(0, _jsxRuntime.jsx)(Comp, (0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, reset), {}, {\n style: style\n }))), child]\n });\n};\nTypeUndefined.displayName = 'JVR.TypeUndefined';\nvar TypeNull = exports.TypeNull = function TypeNull(_ref12) {\n var children = _ref12.children,\n keyName = _ref12.keyName;\n var _useTypesStore12 = (0, _Types.useTypesStore)(),\n _useTypesStore12$Null = _useTypesStore12.Null,\n Null = _useTypesStore12$Null === void 0 ? {} : _useTypesStore12$Null,\n displayDataTypes = _useTypesStore12.displayDataTypes;\n var as = Null.as,\n render = Null.render,\n reset = (0, _objectWithoutProperties2[\"default\"])(Null, _excluded12);\n var Comp = as || 'span';\n var style = (0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, defalutStyle), Null.style || {});\n var isRender = render && typeof render === 'function';\n var type = isRender && render((0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, reset), {}, {\n style: style\n }), {\n type: 'type',\n value: children,\n keyName: keyName\n });\n var child = isRender && render((0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, reset), {}, {\n children: children,\n className: 'w-rjv-value'\n }), {\n type: 'value',\n value: children,\n keyName: keyName\n });\n return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_react.Fragment, {\n children: [displayDataTypes && (type || /*#__PURE__*/(0, _jsxRuntime.jsx)(Comp, (0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, reset), {}, {\n style: style\n }))), child]\n });\n};\nTypeNull.displayName = 'JVR.TypeNull';\nvar TypeNan = exports.TypeNan = function TypeNan(_ref13) {\n var children = _ref13.children,\n keyName = _ref13.keyName;\n var _useTypesStore13 = (0, _Types.useTypesStore)(),\n _useTypesStore13$Nan = _useTypesStore13.Nan,\n Nan = _useTypesStore13$Nan === void 0 ? {} : _useTypesStore13$Nan,\n displayDataTypes = _useTypesStore13.displayDataTypes;\n var as = Nan.as,\n render = Nan.render,\n reset = (0, _objectWithoutProperties2[\"default\"])(Nan, _excluded13);\n var Comp = as || 'span';\n var style = (0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, defalutStyle), Nan.style || {});\n var isRender = render && typeof render === 'function';\n var type = isRender && render((0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, reset), {}, {\n style: style\n }), {\n type: 'type',\n value: children,\n keyName: keyName\n });\n var child = isRender && render((0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, reset), {}, {\n children: children === null || children === void 0 ? void 0 : children.toString(),\n className: 'w-rjv-value'\n }), {\n type: 'value',\n value: children,\n keyName: keyName\n });\n return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_react.Fragment, {\n children: [displayDataTypes && (type || /*#__PURE__*/(0, _jsxRuntime.jsx)(Comp, (0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, reset), {}, {\n style: style\n }))), child]\n });\n};\nTypeNan.displayName = 'JVR.TypeNan';","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\")[\"default\"];\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.useHighlight = useHighlight;\nexports.usePrevious = usePrevious;\nvar _typeof2 = _interopRequireDefault(require(\"@babel/runtime/helpers/typeof\"));\nvar _react = require(\"react\");\nfunction usePrevious(value) {\n var ref = (0, _react.useRef)();\n (0, _react.useEffect)(function () {\n ref.current = value;\n });\n return ref.current;\n}\nfunction useHighlight(_ref) {\n var value = _ref.value,\n highlightUpdates = _ref.highlightUpdates,\n highlightContainer = _ref.highlightContainer;\n var prevValue = usePrevious(value);\n var isHighlight = (0, _react.useMemo)(function () {\n if (!highlightUpdates || prevValue === undefined) return false;\n // highlight if value type changed\n if ((0, _typeof2[\"default\"])(value) !== (0, _typeof2[\"default\"])(prevValue)) {\n return true;\n }\n if (typeof value === 'number') {\n // notice: NaN !== NaN\n if (isNaN(value) && isNaN(prevValue)) return false;\n return value !== prevValue;\n }\n // highlight if isArray changed\n if (Array.isArray(value) !== Array.isArray(prevValue)) {\n return true;\n }\n // not highlight object/function\n // deep compare they will be slow\n if ((0, _typeof2[\"default\"])(value) === 'object' || typeof value === 'function') {\n return false;\n }\n\n // highlight if not equal\n if (value !== prevValue) {\n return true;\n }\n }, [highlightUpdates, value]);\n (0, _react.useEffect)(function () {\n if (highlightContainer && highlightContainer.current && isHighlight && 'animate' in highlightContainer.current) {\n highlightContainer.current.animate([{\n backgroundColor: 'var(--w-rjv-update-color, #ebcb8b)'\n }, {\n backgroundColor: ''\n }], {\n duration: 1000,\n easing: 'ease-in'\n });\n }\n }, [isHighlight, value, highlightContainer]);\n}","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\")[\"default\"];\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.useSectionRender = useSectionRender;\nexports.useSymbolsRender = useSymbolsRender;\nexports.useTypesRender = useTypesRender;\nvar _defineProperty2 = _interopRequireDefault(require(\"@babel/runtime/helpers/defineProperty\"));\nvar _objectSpread2 = _interopRequireDefault(require(\"@babel/runtime/helpers/objectSpread2\"));\nvar _react = require(\"react\");\nvar _Symbols = require(\"../store/Symbols\");\nvar _Types = require(\"../store/Types\");\nvar _Section = require(\"../store/Section\");\nfunction useSymbolsRender(currentProps, props, key) {\n var dispatch = (0, _Symbols.useSymbolsDispatch)();\n var cls = [currentProps.className, props.className].filter(Boolean).join(' ');\n var reset = (0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, currentProps), props), {}, {\n className: cls,\n style: (0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, currentProps.style), props.style),\n children: props.children || currentProps.children\n });\n (0, _react.useEffect)(function () {\n return dispatch((0, _defineProperty2[\"default\"])({}, key, reset));\n }, [props]);\n}\nfunction useTypesRender(currentProps, props, key) {\n var dispatch = (0, _Types.useTypesDispatch)();\n var cls = [currentProps.className, props.className].filter(Boolean).join(' ');\n var reset = (0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, currentProps), props), {}, {\n className: cls,\n style: (0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, currentProps.style), props.style),\n children: props.children || currentProps.children\n });\n (0, _react.useEffect)(function () {\n return dispatch((0, _defineProperty2[\"default\"])({}, key, reset));\n }, [props]);\n}\nfunction useSectionRender(currentProps, props, key) {\n var dispatch = (0, _Section.useSectionDispatch)();\n var cls = [currentProps.className, props.className].filter(Boolean).join(' ');\n var reset = (0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, currentProps), props), {}, {\n className: cls,\n style: (0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, currentProps.style), props.style),\n children: props.children || currentProps.children\n });\n (0, _react.useEffect)(function () {\n return dispatch((0, _defineProperty2[\"default\"])({}, key, reset));\n }, [props]);\n}","/**\n * *** This styling is an extra step which is likely not required. ***\n * https://github.com/w3c/clipboard-apis/blob/master/explainer.adoc#writing-to-the-clipboard\n * \n * Why is it here? To ensure:\n * \n * 1. the element is able to have focus and selection.\n * 2. if element was to flash render it has minimal visual impact.\n * 3. less flakyness with selection and copying which **might** occur if\n * the textarea element is not visible.\n *\n * The likelihood is the element won't even render, not even a flash,\n * so some of these are just precautions. However in IE the element\n * is visible whilst the popup box asking the user for permission for\n * the web page to copy to the clipboard.\n * \n * Place in top-left corner of screen regardless of scroll position.\n *\n * @typedef CopyTextToClipboard\n * @property {(text: string, method?: (isCopy: boolean) => void) => void} void\n * @returns {void}\n * \n * @param {string} text \n * @param {CopyTextToClipboard} cb \n */\nexport default function copyTextToClipboard(text, cb) {\n if (typeof document === \"undefined\") return;\n const el = document.createElement('textarea');\n el.value = text;\n el.setAttribute('readonly', '');\n el.style = {\n position: 'absolute',\n left: '-9999px',\n }\n document.body.appendChild(el);\n const selected = document.getSelection().rangeCount > 0 ? document.getSelection().getRangeAt(0) : false;\n el.select();\n let isCopy = false;\n try {\n const successful = document.execCommand('copy');\n isCopy = !!successful;\n } catch (err) {\n isCopy = false;\n }\n document.body.removeChild(el);\n if (selected && document.getSelection) {\n document.getSelection().removeAllRanges();\n document.getSelection().addRange(selected);\n }\n cb && cb(isCopy);\n};\n","import _extends from \"@babel/runtime/helpers/extends\";\nvar RGB_MAX = 255;\nvar HUE_MAX = 360;\nvar SV_MAX = 100;\n/**\n * ```js\n * rgbaToHsva({ r: 255, g: 255, b: 255, a: 1 }) //=> { h: 0, s: 0, v: 100, a: 1 }\n * ```\n */\nexport var rgbaToHsva = _ref => {\n var {\n r,\n g,\n b,\n a\n } = _ref;\n var max = Math.max(r, g, b);\n var delta = max - Math.min(r, g, b);\n\n // prettier-ignore\n var hh = delta ? max === r ? (g - b) / delta : max === g ? 2 + (b - r) / delta : 4 + (r - g) / delta : 0;\n return {\n h: 60 * (hh < 0 ? hh + 6 : hh),\n s: max ? delta / max * SV_MAX : 0,\n v: max / RGB_MAX * SV_MAX,\n a\n };\n};\nexport var hsvaToHslString = hsva => {\n var {\n h,\n s,\n l\n } = hsvaToHsla(hsva);\n // return `hsl(${h}, ${s}%, ${l}%)`;\n return \"hsl(\" + h + \", \" + Math.round(s) + \"%, \" + Math.round(l) + \"%)\";\n};\nexport var hsvaToHsvString = _ref2 => {\n var {\n h,\n s,\n v\n } = _ref2;\n return \"hsv(\" + h + \", \" + s + \"%, \" + v + \"%)\";\n};\nexport var hsvaToHsvaString = _ref3 => {\n var {\n h,\n s,\n v,\n a\n } = _ref3;\n return \"hsva(\" + h + \", \" + s + \"%, \" + v + \"%, \" + a + \")\";\n};\nexport var hsvaToHslaString = hsva => {\n var {\n h,\n s,\n l,\n a\n } = hsvaToHsla(hsva);\n return \"hsla(\" + h + \", \" + s + \"%, \" + l + \"%, \" + a + \")\";\n};\nexport var hslStringToHsla = str => {\n var [h, s, l, a] = (str.match(/\\d+/g) || []).map(Number);\n return {\n h,\n s,\n l,\n a\n };\n};\nexport var hslaStringToHsva = hslString => {\n var matcher = /hsla?\\(?\\s*(-?\\d*\\.?\\d+)(deg|rad|grad|turn)?[,\\s]+(-?\\d*\\.?\\d+)%?[,\\s]+(-?\\d*\\.?\\d+)%?,?\\s*[/\\s]*(-?\\d*\\.?\\d+)?(%)?\\s*\\)?/i;\n var match = matcher.exec(hslString);\n if (!match) return {\n h: 0,\n s: 0,\n v: 0,\n a: 1\n };\n return hslaToHsva({\n h: parseHue(match[1], match[2]),\n s: Number(match[3]),\n l: Number(match[4]),\n a: match[5] === undefined ? 1 : Number(match[5]) / (match[6] ? 100 : 1)\n });\n};\nexport var hslStringToHsva = hslaStringToHsva;\nexport var hslaToHsva = _ref4 => {\n var {\n h,\n s,\n l,\n a\n } = _ref4;\n s *= (l < 50 ? l : SV_MAX - l) / SV_MAX;\n return {\n h: h,\n s: s > 0 ? 2 * s / (l + s) * SV_MAX : 0,\n v: l + s,\n a\n };\n};\nexport var hsvaToHsla = _ref5 => {\n var {\n h,\n s,\n v,\n a\n } = _ref5;\n var hh = (200 - s) * v / SV_MAX;\n return {\n h,\n s: hh > 0 && hh < 200 ? s * v / SV_MAX / (hh <= SV_MAX ? hh : 200 - hh) * SV_MAX : 0,\n l: hh / 2,\n a\n };\n};\nexport var hsvaStringToHsva = hsvString => {\n var matcher = /hsva?\\(?\\s*(-?\\d*\\.?\\d+)(deg|rad|grad|turn)?[,\\s]+(-?\\d*\\.?\\d+)%?[,\\s]+(-?\\d*\\.?\\d+)%?,?\\s*[/\\s]*(-?\\d*\\.?\\d+)?(%)?\\s*\\)?/i;\n var match = matcher.exec(hsvString);\n if (!match) return {\n h: 0,\n s: 0,\n v: 0,\n a: 1\n };\n return {\n h: parseHue(match[1], match[2]),\n s: Number(match[3]),\n v: Number(match[4]),\n a: match[5] === undefined ? 1 : Number(match[5]) / (match[6] ? SV_MAX : 1)\n };\n};\n\n/**\n * Valid CSS units.\n * https://developer.mozilla.org/en-US/docs/Web/CSS/angle\n */\nvar angleUnits = {\n grad: HUE_MAX / 400,\n turn: HUE_MAX,\n rad: HUE_MAX / (Math.PI * 2)\n};\nexport var parseHue = function parseHue(value, unit) {\n if (unit === void 0) {\n unit = 'deg';\n }\n return Number(value) * (angleUnits[unit] || 1);\n};\nexport var hsvStringToHsva = hsvaStringToHsva;\nexport var rgbaStringToHsva = rgbaString => {\n var matcher = /rgba?\\(?\\s*(-?\\d*\\.?\\d+)(%)?[,\\s]+(-?\\d*\\.?\\d+)(%)?[,\\s]+(-?\\d*\\.?\\d+)(%)?,?\\s*[/\\s]*(-?\\d*\\.?\\d+)?(%)?\\s*\\)?/i;\n var match = matcher.exec(rgbaString);\n if (!match) return {\n h: 0,\n s: 0,\n v: 0,\n a: 1\n };\n return rgbaToHsva({\n r: Number(match[1]) / (match[2] ? SV_MAX / RGB_MAX : 1),\n g: Number(match[3]) / (match[4] ? SV_MAX / RGB_MAX : 1),\n b: Number(match[5]) / (match[6] ? SV_MAX / RGB_MAX : 1),\n a: match[7] === undefined ? 1 : Number(match[7]) / (match[8] ? SV_MAX : 1)\n });\n};\nexport var rgbStringToHsva = rgbaStringToHsva;\n\n/** Converts an RGBA color plus alpha transparency to hex */\nexport var rgbaToHex = _ref6 => {\n var {\n r,\n g,\n b\n } = _ref6;\n var bin = r << 16 | g << 8 | b;\n return \"#\" + (h => new Array(7 - h.length).join('0') + h)(bin.toString(16));\n};\nexport var rgbaToHexa = _ref7 => {\n var {\n r,\n g,\n b,\n a\n } = _ref7;\n var alpha = typeof a === 'number' && (a * 255 | 1 << 8).toString(16).slice(1);\n return \"\" + rgbaToHex({\n r,\n g,\n b,\n a\n }) + (alpha ? alpha : '');\n};\nexport var hexToHsva = hex => rgbaToHsva(hexToRgba(hex));\nexport var hexToRgba = hex => {\n var htemp = hex.replace('#', '');\n if (/^#?/.test(hex) && htemp.length === 3) {\n hex = \"#\" + htemp.charAt(0) + htemp.charAt(0) + htemp.charAt(1) + htemp.charAt(1) + htemp.charAt(2) + htemp.charAt(2);\n }\n var reg = new RegExp(\"[A-Za-z0-9]{2}\", 'g');\n var [r, g, b = 0, a] = hex.match(reg).map(v => parseInt(v, 16));\n return {\n r,\n g,\n b,\n a: (a != null ? a : 255) / RGB_MAX\n };\n};\n\n/**\n * Converts HSVA to RGBA. Based on formula from https://en.wikipedia.org/wiki/HSL_and_HSV\n * @param color HSVA color as an array [0-360, 0-1, 0-1, 0-1]\n */\nexport var hsvaToRgba = _ref8 => {\n var {\n h,\n s,\n v,\n a\n } = _ref8;\n var _h = h / 60,\n _s = s / SV_MAX,\n _v = v / SV_MAX,\n hi = Math.floor(_h) % 6;\n var f = _h - Math.floor(_h),\n _p = RGB_MAX * _v * (1 - _s),\n _q = RGB_MAX * _v * (1 - _s * f),\n _t = RGB_MAX * _v * (1 - _s * (1 - f));\n _v *= RGB_MAX;\n var rgba = {};\n switch (hi) {\n case 0:\n rgba.r = _v;\n rgba.g = _t;\n rgba.b = _p;\n break;\n case 1:\n rgba.r = _q;\n rgba.g = _v;\n rgba.b = _p;\n break;\n case 2:\n rgba.r = _p;\n rgba.g = _v;\n rgba.b = _t;\n break;\n case 3:\n rgba.r = _p;\n rgba.g = _q;\n rgba.b = _v;\n break;\n case 4:\n rgba.r = _t;\n rgba.g = _p;\n rgba.b = _v;\n break;\n case 5:\n rgba.r = _v;\n rgba.g = _p;\n rgba.b = _q;\n break;\n }\n rgba.r = Math.round(rgba.r);\n rgba.g = Math.round(rgba.g);\n rgba.b = Math.round(rgba.b);\n return _extends({}, rgba, {\n a\n });\n};\nexport var hsvaToRgbString = hsva => {\n var {\n r,\n g,\n b\n } = hsvaToRgba(hsva);\n return \"rgb(\" + r + \", \" + g + \", \" + b + \")\";\n};\nexport var hsvaToRgbaString = hsva => {\n var {\n r,\n g,\n b,\n a\n } = hsvaToRgba(hsva);\n return \"rgba(\" + r + \", \" + g + \", \" + b + \", \" + a + \")\";\n};\nexport var rgbaToRgb = _ref9 => {\n var {\n r,\n g,\n b\n } = _ref9;\n return {\n r,\n g,\n b\n };\n};\nexport var hslaToHsl = _ref10 => {\n var {\n h,\n s,\n l\n } = _ref10;\n return {\n h,\n s,\n l\n };\n};\nexport var hsvaToHex = hsva => rgbaToHex(hsvaToRgba(hsva));\nexport var hsvaToHexa = hsva => rgbaToHexa(hsvaToRgba(hsva));\nexport var hsvaToHsv = _ref11 => {\n var {\n h,\n s,\n v\n } = _ref11;\n return {\n h,\n s,\n v\n };\n};\nexport var color = str => {\n var rgb;\n var hsl;\n var hsv;\n var rgba;\n var hsla;\n var hsva;\n var hex;\n var hexa;\n if (typeof str === 'string' && validHex(str)) {\n hsva = hexToHsva(str);\n hex = str;\n } else if (typeof str !== 'string') {\n hsva = str;\n }\n if (hsva) {\n hsv = hsvaToHsv(hsva);\n hsla = hsvaToHsla(hsva);\n rgba = hsvaToRgba(hsva);\n hexa = rgbaToHexa(rgba);\n hex = hsvaToHex(hsva);\n hsl = hslaToHsl(hsla);\n rgb = rgbaToRgb(rgba);\n }\n return {\n rgb,\n hsl,\n hsv,\n rgba,\n hsla,\n hsva,\n hex,\n hexa\n };\n};\nexport var getContrastingColor = str => {\n if (!str) {\n return '#ffffff';\n }\n var col = color(str);\n var yiq = (col.rgb.r * 299 + col.rgb.g * 587 + col.rgb.b * 114) / 1000;\n return yiq >= 128 ? '#000000' : '#ffffff';\n};\nexport var equalColorObjects = (first, second) => {\n if (first === second) return true;\n for (var prop in first) {\n // The following allows for a type-safe calling of this function (first & second have to be HSL, HSV, or RGB)\n // with type-unsafe iterating over object keys. TS does not allow this without an index (`[key: string]: number`)\n // on an object to define how iteration is normally done. To ensure extra keys are not allowed on our types,\n // we must cast our object to unknown (as RGB demands `r` be a key, while `Record` does not care if\n // there is or not), and then as a type TS can iterate over.\n if (first[prop] !== second[prop]) return false;\n }\n return true;\n};\nexport var equalColorString = (first, second) => {\n return first.replace(/\\s/g, '') === second.replace(/\\s/g, '');\n};\nexport var equalHex = (first, second) => {\n if (first.toLowerCase() === second.toLowerCase()) return true;\n\n // To compare colors like `#FFF` and `ffffff` we convert them into RGB objects\n return equalColorObjects(hexToRgba(first), hexToRgba(second));\n};\nexport var validHex = hex => /^#?([A-Fa-f0-9]{3,4}){1,2}$/.test(hex);","import { useRef, useEffect, useCallback } from 'react';\n\n// Saves incoming handler to the ref in order to avoid \"useCallback hell\"\nexport function useEventCallback(handler) {\n var callbackRef = useRef(handler);\n useEffect(() => {\n callbackRef.current = handler;\n });\n return useCallback((value, event) => callbackRef.current && callbackRef.current(value, event), []);\n}\n\n// Check if an event was triggered by touch\nexport var isTouch = event => 'touches' in event;\n\n// Browsers introduced an intervention, making touch events passive by default.\n// This workaround removes `preventDefault` call from the touch handlers.\n// https://github.com/facebook/react/issues/19651\nexport var preventDefaultMove = event => {\n !isTouch(event) && event.preventDefault && event.preventDefault();\n};\n// Clamps a value between an upper and lower bound.\n// We use ternary operators because it makes the minified code\n// 2 times shorter then `Math.min(Math.max(a,b),c)`\nexport var clamp = function clamp(number, min, max) {\n if (min === void 0) {\n min = 0;\n }\n if (max === void 0) {\n max = 1;\n }\n return number > max ? max : number < min ? min : number;\n};\n// Returns a relative position of the pointer inside the node's bounding box\nexport var getRelativePosition = (node, event) => {\n var rect = node.getBoundingClientRect();\n\n // Get user's pointer position from `touches` array if it's a `TouchEvent`\n var pointer = isTouch(event) ? event.touches[0] : event;\n return {\n left: clamp((pointer.pageX - (rect.left + window.pageXOffset)) / rect.width),\n top: clamp((pointer.pageY - (rect.top + window.pageYOffset)) / rect.height),\n width: rect.width,\n height: rect.height,\n x: pointer.pageX - (rect.left + window.pageXOffset),\n y: pointer.pageY - (rect.top + window.pageYOffset)\n };\n};","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/objectWithoutPropertiesLoose\";\nvar _excluded = [\"prefixCls\", \"className\", \"onMove\", \"onDown\"];\nimport React, { useRef, useState, useCallback, useEffect } from 'react';\nimport { isTouch, preventDefaultMove, getRelativePosition, useEventCallback } from './utils';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport * from './utils';\nvar Interactive = /*#__PURE__*/React.forwardRef((props, ref) => {\n var {\n prefixCls = 'w-color-interactive',\n className,\n onMove,\n onDown\n } = props,\n reset = _objectWithoutPropertiesLoose(props, _excluded);\n var container = useRef(null);\n var hasTouched = useRef(false);\n var [isDragging, setDragging] = useState(false);\n var onMoveCallback = useEventCallback(onMove);\n var onKeyCallback = useEventCallback(onDown);\n\n // Prevent mobile browsers from handling mouse events (conflicting with touch ones).\n // If we detected a touch interaction before, we prefer reacting to touch events only.\n var isValid = event => {\n if (hasTouched.current && !isTouch(event)) return false;\n hasTouched.current = isTouch(event);\n return true;\n };\n var handleMove = useCallback(event => {\n preventDefaultMove(event);\n // If user moves the pointer outside of the window or iframe bounds and release it there,\n // `mouseup`/`touchend` won't be fired. In order to stop the picker from following the cursor\n // after the user has moved the mouse/finger back to the document, we check `event.buttons`\n // and `event.touches`. It allows us to detect that the user is just moving his pointer\n // without pressing it down\n var isDown = isTouch(event) ? event.touches.length > 0 : event.buttons > 0;\n if (isDown && container.current) {\n onMoveCallback && onMoveCallback(getRelativePosition(container.current, event), event);\n } else {\n setDragging(false);\n }\n }, [onMoveCallback]);\n var handleMoveEnd = useCallback(() => setDragging(false), []);\n var toggleDocumentEvents = useCallback(state => {\n var toggleEvent = state ? window.addEventListener : window.removeEventListener;\n toggleEvent(hasTouched.current ? 'touchmove' : 'mousemove', handleMove);\n toggleEvent(hasTouched.current ? 'touchend' : 'mouseup', handleMoveEnd);\n }, []);\n useEffect(() => {\n toggleDocumentEvents(isDragging);\n return () => {\n isDragging && toggleDocumentEvents(false);\n };\n }, [isDragging, toggleDocumentEvents]);\n var handleMoveStart = useCallback(event => {\n preventDefaultMove(event.nativeEvent);\n if (!isValid(event.nativeEvent)) return;\n onKeyCallback && onKeyCallback(getRelativePosition(container.current, event.nativeEvent), event.nativeEvent);\n setDragging(true);\n }, [onKeyCallback]);\n return /*#__PURE__*/_jsx(\"div\", _extends({}, reset, {\n className: [prefixCls, className || ''].filter(Boolean).join(' '),\n style: _extends({}, reset.style, {\n touchAction: 'none'\n }),\n ref: container,\n tabIndex: 0,\n onMouseDown: handleMoveStart,\n onTouchStart: handleMoveStart\n }));\n});\nInteractive.displayName = 'Interactive';\nexport default Interactive;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/objectWithoutPropertiesLoose\";\nvar _excluded = [\"className\", \"prefixCls\", \"left\", \"top\", \"style\", \"fillProps\"];\nimport React from 'react';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport var Pointer = _ref => {\n var {\n className,\n prefixCls,\n left,\n top,\n style,\n fillProps\n } = _ref,\n reset = _objectWithoutPropertiesLoose(_ref, _excluded);\n var styleWrapper = _extends({}, style, {\n position: 'absolute',\n left,\n top\n });\n var stylePointer = _extends({\n width: 18,\n height: 18,\n boxShadow: 'var(--alpha-pointer-box-shadow)',\n borderRadius: '50%',\n backgroundColor: 'var(--alpha-pointer-background-color)'\n }, fillProps == null ? void 0 : fillProps.style, {\n transform: left ? 'translate(-9px, -1px)' : 'translate(-1px, -9px)'\n });\n return /*#__PURE__*/_jsx(\"div\", _extends({\n className: prefixCls + \"-pointer \" + (className || ''),\n style: styleWrapper\n }, reset, {\n children: /*#__PURE__*/_jsx(\"div\", _extends({\n className: prefixCls + \"-fill\"\n }, fillProps, {\n style: stylePointer\n }))\n }));\n};","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/objectWithoutPropertiesLoose\";\nvar _excluded = [\"prefixCls\", \"className\", \"hsva\", \"background\", \"bgProps\", \"innerProps\", \"pointerProps\", \"radius\", \"width\", \"height\", \"direction\", \"style\", \"onChange\", \"pointer\"];\nimport React from 'react';\nimport { hsvaToHslaString } from '@uiw/color-convert';\nimport Interactive from '@uiw/react-drag-event-interactive';\nimport { Pointer } from './Pointer';\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nexport * from './Pointer';\nexport var BACKGROUND_IMG = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAMUlEQVQ4T2NkYGAQYcAP3uCTZhw1gGGYhAGBZIA/nYDCgBDAm9BGDWAAJyRCgLaBCAAgXwixzAS0pgAAAABJRU5ErkJggg==';\nvar Alpha = /*#__PURE__*/React.forwardRef((props, ref) => {\n var {\n prefixCls = 'w-color-alpha',\n className,\n hsva,\n background,\n bgProps = {},\n innerProps = {},\n pointerProps = {},\n radius = 0,\n width,\n height = 16,\n direction = 'horizontal',\n style,\n onChange,\n pointer\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n var handleChange = offset => {\n onChange && onChange(_extends({}, hsva, {\n a: direction === 'horizontal' ? offset.left : offset.top\n }), offset);\n };\n var colorTo = hsvaToHslaString(Object.assign({}, hsva, {\n a: 1\n }));\n var innerBackground = \"linear-gradient(to \" + (direction === 'horizontal' ? 'right' : 'bottom') + \", rgba(244, 67, 54, 0) 0%, \" + colorTo + \" 100%)\";\n var comProps = {};\n if (direction === 'horizontal') {\n comProps.left = hsva.a * 100 + \"%\";\n } else {\n comProps.top = hsva.a * 100 + \"%\";\n }\n var styleWrapper = _extends({\n '--alpha-background-color': '#fff',\n '--alpha-pointer-background-color': 'rgb(248, 248, 248)',\n '--alpha-pointer-box-shadow': 'rgb(0 0 0 / 37%) 0px 1px 4px 0px',\n borderRadius: radius,\n background: \"url(\" + BACKGROUND_IMG + \") left center\",\n backgroundColor: 'var(--alpha-background-color)'\n }, {\n width,\n height\n }, style, {\n position: 'relative'\n });\n var pointerElement = pointer && typeof pointer === 'function' ? pointer(_extends({\n prefixCls\n }, pointerProps, comProps)) : /*#__PURE__*/_jsx(Pointer, _extends({}, pointerProps, {\n prefixCls: prefixCls\n }, comProps));\n return /*#__PURE__*/_jsxs(\"div\", _extends({}, other, {\n className: [prefixCls, prefixCls + \"-\" + direction, className || ''].filter(Boolean).join(' '),\n style: styleWrapper,\n ref: ref,\n children: [/*#__PURE__*/_jsx(\"div\", _extends({}, bgProps, {\n style: _extends({\n inset: 0,\n position: 'absolute',\n background: background || innerBackground,\n borderRadius: radius\n }, bgProps.style)\n })), /*#__PURE__*/_jsx(Interactive, _extends({}, innerProps, {\n style: _extends({}, innerProps.style, {\n inset: 0,\n zIndex: 1,\n position: 'absolute'\n }),\n onMove: handleChange,\n onDown: handleChange,\n children: pointerElement\n }))]\n }));\n});\nAlpha.displayName = 'Alpha';\nexport default Alpha;","import React from 'react';\nimport { useMemo } from 'react';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport var Pointer = _ref => {\n var {\n className,\n color,\n left,\n top,\n prefixCls\n } = _ref;\n var style = {\n position: 'absolute',\n top,\n left\n };\n var stylePointer = {\n '--saturation-pointer-box-shadow': 'rgb(255 255 255) 0px 0px 0px 1.5px, rgb(0 0 0 / 30%) 0px 0px 1px 1px inset, rgb(0 0 0 / 40%) 0px 0px 1px 2px',\n width: 6,\n height: 6,\n transform: 'translate(-3px, -3px)',\n boxShadow: 'var(--saturation-pointer-box-shadow)',\n borderRadius: '50%',\n backgroundColor: color\n };\n return useMemo(() => /*#__PURE__*/_jsx(\"div\", {\n className: prefixCls + \"-pointer \" + (className || ''),\n style: style,\n children: /*#__PURE__*/_jsx(\"div\", {\n className: prefixCls + \"-fill\",\n style: stylePointer\n })\n }), [top, left, color, className, prefixCls]);\n};","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/objectWithoutPropertiesLoose\";\nvar _excluded = [\"prefixCls\", \"radius\", \"pointer\", \"className\", \"hue\", \"style\", \"hsva\", \"onChange\"];\nimport React, { useMemo } from 'react';\nimport { hsvaToHslaString } from '@uiw/color-convert';\nimport Interactive from '@uiw/react-drag-event-interactive';\nimport { Pointer } from './Pointer';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nvar Saturation = /*#__PURE__*/React.forwardRef((props, ref) => {\n var _hsva$h;\n var {\n prefixCls = 'w-color-saturation',\n radius = 0,\n pointer,\n className,\n hue = 0,\n style,\n hsva,\n onChange\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n var containerStyle = _extends({\n width: 200,\n height: 200,\n borderRadius: radius\n }, style, {\n position: 'relative'\n });\n var handleChange = (interaction, event) => {\n onChange && hsva && onChange({\n h: hsva.h,\n s: interaction.left * 100,\n v: (1 - interaction.top) * 100,\n a: hsva.a\n // source: 'hsv',\n });\n };\n var pointerElement = useMemo(() => {\n if (!hsva) return null;\n var comProps = {\n top: 100 - hsva.v + \"%\",\n left: hsva.s + \"%\",\n color: hsvaToHslaString(hsva)\n };\n if (pointer && typeof pointer === 'function') {\n return pointer(_extends({\n prefixCls\n }, comProps));\n }\n return /*#__PURE__*/_jsx(Pointer, _extends({\n prefixCls: prefixCls\n }, comProps));\n }, [hsva, pointer, prefixCls]);\n return /*#__PURE__*/_jsx(Interactive, _extends({\n className: [prefixCls, className || ''].filter(Boolean).join(' ')\n }, other, {\n style: _extends({\n position: 'absolute',\n inset: 0,\n cursor: 'crosshair',\n backgroundImage: \"linear-gradient(0deg, #000, transparent), linear-gradient(90deg, #fff, hsl(\" + ((_hsva$h = hsva == null ? void 0 : hsva.h) != null ? _hsva$h : hue) + \", 100%, 50%))\"\n }, containerStyle),\n ref: ref,\n onMove: handleChange,\n onDown: handleChange,\n children: pointerElement\n }));\n});\nSaturation.displayName = 'Saturation';\nexport default Saturation;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/objectWithoutPropertiesLoose\";\nvar _excluded = [\"prefixCls\", \"className\", \"hue\", \"onChange\", \"direction\"];\nimport React from 'react';\nimport Alpha from '@uiw/react-color-alpha';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nvar Hue = /*#__PURE__*/React.forwardRef((props, ref) => {\n var {\n prefixCls = 'w-color-hue',\n className,\n hue = 0,\n onChange: _onChange,\n direction = 'horizontal'\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n return /*#__PURE__*/_jsx(Alpha, _extends({\n ref: ref,\n className: prefixCls + \" \" + (className || '')\n }, other, {\n direction: direction,\n background: \"linear-gradient(to \" + (direction === 'horizontal' ? 'right' : 'bottom') + \", rgb(255, 0, 0) 0%, rgb(255, 255, 0) 17%, rgb(0, 255, 0) 33%, rgb(0, 255, 255) 50%, rgb(0, 0, 255) 67%, rgb(255, 0, 255) 83%, rgb(255, 0, 0) 100%)\",\n hsva: {\n h: hue,\n s: 100,\n v: 100,\n a: hue / 360\n },\n onChange: (_, interaction) => {\n _onChange && _onChange({\n h: direction === 'horizontal' ? 360 * interaction.left : 360 * interaction.top\n });\n }\n }));\n});\nHue.displayName = 'Hue';\nexport default Hue;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/objectWithoutPropertiesLoose\";\nvar _excluded = [\"style\", \"color\"],\n _excluded2 = [\"prefixCls\", \"className\", \"onChange\", \"color\", \"style\", \"disableAlpha\"];\nimport React from 'react';\nimport { validHex, color as handleColor, hexToHsva, hsvaToHex, hsvaToRgbaString } from '@uiw/color-convert';\nimport Alpha, { BACKGROUND_IMG } from '@uiw/react-color-alpha';\nimport Saturation from '@uiw/react-color-saturation';\nimport Hue from '@uiw/react-color-hue';\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nvar Pointer = _ref => {\n var {\n style,\n color\n } = _ref,\n props = _objectWithoutPropertiesLoose(_ref, _excluded);\n var stylePointer = _extends({\n '--colorful-pointer-background-color': '#fff',\n '--colorful-pointer-border': '2px solid #fff',\n height: 28,\n width: 28,\n position: 'absolute',\n transform: 'translate(-14px, -4px)',\n boxShadow: '0 2px 4px rgb(0 0 0 / 20%)',\n borderRadius: '50%',\n background: \"url(\" + BACKGROUND_IMG + \")\",\n backgroundColor: 'var(--colorful-pointer-background-color)',\n border: 'var(--colorful-pointer-border)',\n zIndex: 1\n }, style);\n return /*#__PURE__*/_jsx(\"div\", _extends({}, props, {\n style: stylePointer,\n children: /*#__PURE__*/_jsx(\"div\", {\n style: {\n backgroundColor: color,\n borderRadius: '50%',\n height: ' 100%',\n width: '100%'\n }\n })\n }));\n};\nvar Colorful = /*#__PURE__*/React.forwardRef((props, ref) => {\n var {\n prefixCls = 'w-color-colorful',\n className,\n onChange,\n color,\n style,\n disableAlpha\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded2);\n var hsva = typeof color === 'string' && validHex(color) ? hexToHsva(color) : color || {};\n var handleChange = value => onChange && onChange(handleColor(value));\n return /*#__PURE__*/_jsxs(\"div\", _extends({\n ref: ref,\n style: _extends({\n width: 200,\n position: 'relative'\n }, style)\n }, other, {\n className: prefixCls + \" \" + (className || ''),\n children: [/*#__PURE__*/_jsx(Saturation, {\n hsva: hsva,\n className: prefixCls,\n radius: \"8px 8px 0 0\",\n style: {\n width: 'auto',\n height: 150,\n minWidth: 120,\n borderBottom: '12px solid #000'\n },\n pointer: _ref2 => {\n var {\n left,\n top,\n color\n } = _ref2;\n return /*#__PURE__*/_jsx(Pointer, {\n style: {\n left,\n top,\n transform: 'translate(-16px, -16px)'\n },\n color: hsvaToHex(hsva)\n });\n },\n onChange: newColor => handleChange(_extends({}, hsva, newColor))\n }), /*#__PURE__*/_jsx(Hue, {\n hue: hsva.h,\n height: 24,\n radius: disableAlpha ? '0 0 8px 8px' : 0,\n className: prefixCls,\n onChange: newHue => handleChange(_extends({}, hsva, newHue)),\n pointer: _ref3 => {\n var {\n left\n } = _ref3;\n return /*#__PURE__*/_jsx(Pointer, {\n style: {\n left\n },\n color: \"hsl(\" + (hsva.h || 0) + \"deg 100% 50%)\"\n });\n }\n }), !disableAlpha && /*#__PURE__*/_jsx(Alpha, {\n hsva: hsva,\n height: 24,\n className: prefixCls,\n radius: \"0 0 8px 8px\",\n pointer: _ref4 => {\n var {\n left\n } = _ref4;\n return /*#__PURE__*/_jsx(Pointer, {\n style: {\n left\n },\n color: hsvaToRgbaString(hsva)\n });\n },\n onChange: newAlpha => handleChange(_extends({}, hsva, newAlpha))\n })]\n }));\n});\nColorful.displayName = 'Colorful';\nexport default Colorful;","/**\n * @package @wcj/dark-mode\n * Web Component that toggles dark mode 🌒\n * Github: https://github.com/jaywcjlove/dark-mode.git\n * Website: https://jaywcjlove.github.io/dark-mode\n * \n * Licensed under the MIT license.\n * @license Copyright © 2022. Licensed under the MIT License\n * @author kenny wong \n */\nconst t=document;const e=\"_dark_mode_theme_\";const s=\"permanent\";const o=\"colorschemechange\";const i=\"permanentcolorscheme\";const h=\"light\";const r=\"dark\";const n=(t,e,s=e)=>{Object.defineProperty(t,s,{enumerable:true,get(){const t=this.getAttribute(e);return t===null?\"\":t},set(t){this.setAttribute(e,t)}})};const c=(t,e,s=e)=>{Object.defineProperty(t,s,{enumerable:true,get(){return this.hasAttribute(e)},set(t){if(t){this.setAttribute(e,\"\")}else{this.removeAttribute(e)}}})};class a extends HTMLElement{static get observedAttributes(){return[\"mode\",h,r,s]}LOCAL_NANE=e;constructor(){super();this.t()}connectedCallback(){n(this,\"mode\");n(this,r);n(this,h);c(this,s);const a=localStorage.getItem(e);if(a&&[h,r].includes(a)){this.mode=a;this.permanent=true}if(this.permanent&&!a){localStorage.setItem(e,this.mode)}const l=[h,r].includes(a);if(this.permanent&&a){this.o()}else{if(window.matchMedia&&window.matchMedia(\"(prefers-color-scheme: dark)\").matches){this.mode=r;this.o()}if(window.matchMedia&&window.matchMedia(\"(prefers-color-scheme: light)\").matches){this.mode=h;this.o()}}if(!this.permanent&&!l){window.matchMedia(\"(prefers-color-scheme: light)\").onchange=t=>{this.mode=t.matches?h:r;this.o()};window.matchMedia(\"(prefers-color-scheme: dark)\").onchange=t=>{this.mode=t.matches?r:h;this.o()}}const d=new MutationObserver(((s,h)=>{this.mode=t.documentElement.dataset.colorMode;if(this.permanent&&l){localStorage.setItem(e,this.mode);this.i(i,{permanent:this.permanent})}this.h();this.i(o,{colorScheme:this.mode})}));d.observe(t.documentElement,{attributes:true});this.i(o,{colorScheme:this.mode});this.h()}attributeChangedCallback(t,s,o){if(t===\"mode\"&&s!==o&&[h,r].includes(o)){const t=localStorage.getItem(e);if(this.mode===t){this.mode=o;this.h();this.o()}else if(this.mode&&this.mode!==t){this.h();this.o()}}else if((t===h||t===r)&&s!==o){this.h()}if(t===\"permanent\"&&typeof this.permanent===\"boolean\"){this.permanent?localStorage.setItem(e,this.mode):localStorage.removeItem(e)}}o(){t.documentElement.setAttribute(\"data-color-mode\",this.mode)}h(){this.icon.textContent=this.mode===h?\"🌒\":\"🌞\";this.text.textContent=this.mode===h?this.getAttribute(r):this.getAttribute(h);if(!this.text.textContent&&this.text.parentElement&&this.text){this.text.parentElement.removeChild(this.text)}}t(){var s=this.attachShadow({mode:\"open\"});this.label=t.createElement(\"span\");this.label.setAttribute(\"class\",\"wrapper\");this.label.onclick=()=>{this.mode=this.mode===h?r:h;if(this.permanent){localStorage.setItem(e,this.mode)}this.o();this.h()};s.appendChild(this.label);this.icon=t.createElement(\"span\");this.label.appendChild(this.icon);this.text=t.createElement(\"span\");this.label.appendChild(this.text);const o=`\\n[data-color-mode*='dark'], [data-color-mode*='dark'] body {\\n color-scheme: dark;\\n --color-theme-bg: #0d1117;\\n --color-theme-text: #c9d1d9;\\n background-color: var(--color-theme-bg);\\n color: var(--color-theme-text);\\n}\\n\\n[data-color-mode*='light'], [data-color-mode*='light'] body {\\n color-scheme: light;\\n --color-theme-bg: #fff;\\n --color-theme-text: #24292f;\\n background-color: var(--color-theme-bg);\\n color: var(--color-theme-text);\\n}`;const i=\"_dark_mode_style_\";const n=t.getElementById(i);if(!n){var c=t.createElement(\"style\");c.id=i;c.textContent=o;t.head.appendChild(c)}var a=t.createElement(\"style\");a.textContent=`\\n .wrapper { cursor: pointer; user-select: none; position: relative; }\\n .wrapper > span + span { margin-left: .4rem; }\\n `;s.appendChild(a)}i(t,e){this.dispatchEvent(new CustomEvent(t,{bubbles:true,composed:true,detail:e}))}}customElements.define(\"dark-mode\",a);","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports[\"default\"] = _default;\nfunction _default() {\n return {\n name: 'transform-remove-imports',\n visitor: {\n // https://babeljs.io/docs/en/babel-types#callexpression\n CallExpression: function CallExpression(path, state) {\n var node = path.node;\n if (node.callee.name !== 'require') {\n return;\n }\n var argument = node.arguments[0];\n var moduleId = argument.value;\n var options = state.opts;\n if (options.test && !testMatches(moduleId, options.test)) {\n return;\n }\n var parentType = path.parentPath.node.type;\n\n // In remove effects mode we should delete only requires that are\n // simple expression statements\n if (options.remove === 'effects' && parentType !== 'ExpressionStatement') {\n return;\n }\n path.remove();\n },\n // https://babeljs.io/docs/en/babel-types#importdeclaration\n ImportDeclaration: function ImportDeclaration(path, state) {\n var node = path.node;\n var source = node.source;\n var opts = state.opts;\n if (opts.removeAll) {\n path.remove();\n return;\n }\n if (!opts.test) {\n console.warn('transform-remove-imports: \"test\" option should be specified');\n return;\n }\n\n /** @var {string} importName */\n var importName = source && source.value ? source.value : undefined;\n var isMatch = testMatches(importName, opts.test);\n\n // https://github.com/uiwjs/babel-plugin-transform-remove-imports/issues/3\n if (opts.remove === 'effects') {\n if (node.specifiers && node.specifiers.length === 0 && importName && isMatch) {\n path.remove();\n }\n return;\n }\n if (importName && isMatch) {\n path.remove();\n }\n }\n }\n };\n}\n\n/**\n * Determines if the import matches the specified tests.\n *\n * @param {string} importName\n * @param {RegExp|RegExp[]|string|string[]} test\n * @returns {Boolean}\n */\nfunction testMatches(importName, test) {\n // Normalizing tests\n var tests = Array.isArray(test) ? test : [test];\n\n // Finding out if at least one test matches\n return tests.some(function (regex) {\n if (typeof regex === 'string') {\n regex = new RegExp(regex);\n }\n return regex.test(importName || '');\n });\n}","module.exports = {\n\ttrueFunc: function trueFunc(){\n\t\treturn true;\n\t},\n\tfalseFunc: function falseFunc(){\n\t\treturn false;\n\t}\n};","'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","// http://www.w3.org/TR/CSS21/grammar.html\n// https://github.com/visionmedia/css-parse/pull/49#issuecomment-30088027\nvar COMMENT_REGEX = /\\/\\*[^*]*\\*+([^/*][^*]*\\*+)*\\//g;\n\nvar NEWLINE_REGEX = /\\n/g;\nvar WHITESPACE_REGEX = /^\\s*/;\n\n// declaration\nvar PROPERTY_REGEX = /^(\\*?[-#/*\\\\\\w]+(\\[[0-9a-z_-]+\\])?)\\s*/;\nvar COLON_REGEX = /^:\\s*/;\nvar VALUE_REGEX = /^((?:'(?:\\\\'|.)*?'|\"(?:\\\\\"|.)*?\"|\\([^)]*?\\)|[^};])+)/;\nvar SEMICOLON_REGEX = /^[;\\s]*/;\n\n// https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String/Trim#Polyfill\nvar TRIM_REGEX = /^\\s+|\\s+$/g;\n\n// strings\nvar NEWLINE = '\\n';\nvar FORWARD_SLASH = '/';\nvar ASTERISK = '*';\nvar EMPTY_STRING = '';\n\n// types\nvar TYPE_COMMENT = 'comment';\nvar TYPE_DECLARATION = 'declaration';\n\n/**\n * @param {String} style\n * @param {Object} [options]\n * @return {Object[]}\n * @throws {TypeError}\n * @throws {Error}\n */\nmodule.exports = function (style, options) {\n if (typeof style !== 'string') {\n throw new TypeError('First argument must be a string');\n }\n\n if (!style) return [];\n\n options = options || {};\n\n /**\n * Positional.\n */\n var lineno = 1;\n var column = 1;\n\n /**\n * Update lineno and column based on `str`.\n *\n * @param {String} str\n */\n function updatePosition(str) {\n var lines = str.match(NEWLINE_REGEX);\n if (lines) lineno += lines.length;\n var i = str.lastIndexOf(NEWLINE);\n column = ~i ? str.length - i : column + str.length;\n }\n\n /**\n * Mark position and patch `node.position`.\n *\n * @return {Function}\n */\n function position() {\n var start = { line: lineno, column: column };\n return function (node) {\n node.position = new Position(start);\n whitespace();\n return node;\n };\n }\n\n /**\n * Store position information for a node.\n *\n * @constructor\n * @property {Object} start\n * @property {Object} end\n * @property {undefined|String} source\n */\n function Position(start) {\n this.start = start;\n this.end = { line: lineno, column: column };\n this.source = options.source;\n }\n\n /**\n * Non-enumerable source string.\n */\n Position.prototype.content = style;\n\n var errorsList = [];\n\n /**\n * Error `msg`.\n *\n * @param {String} msg\n * @throws {Error}\n */\n function error(msg) {\n var err = new Error(\n options.source + ':' + lineno + ':' + column + ': ' + msg\n );\n err.reason = msg;\n err.filename = options.source;\n err.line = lineno;\n err.column = column;\n err.source = style;\n\n if (options.silent) {\n errorsList.push(err);\n } else {\n throw err;\n }\n }\n\n /**\n * Match `re` and return captures.\n *\n * @param {RegExp} re\n * @return {undefined|Array}\n */\n function match(re) {\n var m = re.exec(style);\n if (!m) return;\n var str = m[0];\n updatePosition(str);\n style = style.slice(str.length);\n return m;\n }\n\n /**\n * Parse whitespace.\n */\n function whitespace() {\n match(WHITESPACE_REGEX);\n }\n\n /**\n * Parse comments.\n *\n * @param {Object[]} [rules]\n * @return {Object[]}\n */\n function comments(rules) {\n var c;\n rules = rules || [];\n while ((c = comment())) {\n if (c !== false) {\n rules.push(c);\n }\n }\n return rules;\n }\n\n /**\n * Parse comment.\n *\n * @return {Object}\n * @throws {Error}\n */\n function comment() {\n var pos = position();\n if (FORWARD_SLASH != style.charAt(0) || ASTERISK != style.charAt(1)) return;\n\n var i = 2;\n while (\n EMPTY_STRING != style.charAt(i) &&\n (ASTERISK != style.charAt(i) || FORWARD_SLASH != style.charAt(i + 1))\n ) {\n ++i;\n }\n i += 2;\n\n if (EMPTY_STRING === style.charAt(i - 1)) {\n return error('End of comment missing');\n }\n\n var str = style.slice(2, i - 2);\n column += 2;\n updatePosition(str);\n style = style.slice(i);\n column += 2;\n\n return pos({\n type: TYPE_COMMENT,\n comment: str\n });\n }\n\n /**\n * Parse declaration.\n *\n * @return {Object}\n * @throws {Error}\n */\n function declaration() {\n var pos = position();\n\n // prop\n var prop = match(PROPERTY_REGEX);\n if (!prop) return;\n comment();\n\n // :\n if (!match(COLON_REGEX)) return error(\"property missing ':'\");\n\n // val\n var val = match(VALUE_REGEX);\n\n var ret = pos({\n type: TYPE_DECLARATION,\n property: trim(prop[0].replace(COMMENT_REGEX, EMPTY_STRING)),\n value: val\n ? trim(val[0].replace(COMMENT_REGEX, EMPTY_STRING))\n : EMPTY_STRING\n });\n\n // ;\n match(SEMICOLON_REGEX);\n\n return ret;\n }\n\n /**\n * Parse declarations.\n *\n * @return {Object[]}\n */\n function declarations() {\n var decls = [];\n\n comments(decls);\n\n // declarations\n var decl;\n while ((decl = declaration())) {\n if (decl !== false) {\n decls.push(decl);\n comments(decls);\n }\n }\n\n return decls;\n }\n\n whitespace();\n return declarations();\n};\n\n/**\n * Trim `str`.\n *\n * @param {String} str\n * @return {String}\n */\nfunction trim(str) {\n return str ? str.replace(TRIM_REGEX, EMPTY_STRING) : EMPTY_STRING;\n}\n","/*!\n * Determine if an object is a Buffer\n *\n * @author Feross Aboukhadijeh \n * @license MIT\n */\n\nmodule.exports = function isBuffer (obj) {\n return obj != null && obj.constructor != null &&\n typeof obj.constructor.isBuffer === 'function' && obj.constructor.isBuffer(obj)\n}\n","/**\n * @param {string} string The string to parse\n * @returns {Array} Returns an energetic array.\n */\nfunction parsePart(string) {\n let res = [];\n let m;\n\n for (let str of string.split(\",\").map((str) => str.trim())) {\n // just a number\n if (/^-?\\d+$/.test(str)) {\n res.push(parseInt(str, 10));\n } else if (\n (m = str.match(/^(-?\\d+)(-|\\.\\.\\.?|\\u2025|\\u2026|\\u22EF)(-?\\d+)$/))\n ) {\n // 1-5 or 1..5 (equivalent) or 1...5 (doesn't include 5)\n let [_, lhs, sep, rhs] = m;\n\n if (lhs && rhs) {\n lhs = parseInt(lhs);\n rhs = parseInt(rhs);\n const incr = lhs < rhs ? 1 : -1;\n\n // Make it inclusive by moving the right 'stop-point' away by one.\n if (sep === \"-\" || sep === \"..\" || sep === \"\\u2025\") rhs += incr;\n\n for (let i = lhs; i !== rhs; i += incr) res.push(i);\n }\n }\n }\n\n return res;\n}\n\nexports.default = parsePart;\nmodule.exports = parsePart;\n","// shim for using process in browser\nvar process = module.exports = {};\n\n// cached from whatever global is present so that test runners that stub it\n// don't break things. But we need to wrap it in a try catch in case it is\n// wrapped in strict mode code which doesn't define any globals. It's inside a\n// function because try/catches deoptimize in certain engines.\n\nvar cachedSetTimeout;\nvar cachedClearTimeout;\n\nfunction defaultSetTimout() {\n throw new Error('setTimeout has not been defined');\n}\nfunction defaultClearTimeout () {\n throw new Error('clearTimeout has not been defined');\n}\n(function () {\n try {\n if (typeof setTimeout === 'function') {\n cachedSetTimeout = setTimeout;\n } else {\n cachedSetTimeout = defaultSetTimout;\n }\n } catch (e) {\n cachedSetTimeout = defaultSetTimout;\n }\n try {\n if (typeof clearTimeout === 'function') {\n cachedClearTimeout = clearTimeout;\n } else {\n cachedClearTimeout = defaultClearTimeout;\n }\n } catch (e) {\n cachedClearTimeout = defaultClearTimeout;\n }\n} ())\nfunction runTimeout(fun) {\n if (cachedSetTimeout === setTimeout) {\n //normal enviroments in sane situations\n return setTimeout(fun, 0);\n }\n // if setTimeout wasn't available but was latter defined\n if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {\n cachedSetTimeout = setTimeout;\n return setTimeout(fun, 0);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedSetTimeout(fun, 0);\n } catch(e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedSetTimeout.call(null, fun, 0);\n } catch(e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error\n return cachedSetTimeout.call(this, fun, 0);\n }\n }\n\n\n}\nfunction runClearTimeout(marker) {\n if (cachedClearTimeout === clearTimeout) {\n //normal enviroments in sane situations\n return clearTimeout(marker);\n }\n // if clearTimeout wasn't available but was latter defined\n if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {\n cachedClearTimeout = clearTimeout;\n return clearTimeout(marker);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedClearTimeout(marker);\n } catch (e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedClearTimeout.call(null, marker);\n } catch (e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.\n // Some versions of I.E. have different rules for clearTimeout vs setTimeout\n return cachedClearTimeout.call(this, marker);\n }\n }\n\n\n\n}\nvar queue = [];\nvar draining = false;\nvar currentQueue;\nvar queueIndex = -1;\n\nfunction cleanUpNextTick() {\n if (!draining || !currentQueue) {\n return;\n }\n draining = false;\n if (currentQueue.length) {\n queue = currentQueue.concat(queue);\n } else {\n queueIndex = -1;\n }\n if (queue.length) {\n drainQueue();\n }\n}\n\nfunction drainQueue() {\n if (draining) {\n return;\n }\n var timeout = runTimeout(cleanUpNextTick);\n draining = true;\n\n var len = queue.length;\n while(len) {\n currentQueue = queue;\n queue = [];\n while (++queueIndex < len) {\n if (currentQueue) {\n currentQueue[queueIndex].run();\n }\n }\n queueIndex = -1;\n len = queue.length;\n }\n currentQueue = null;\n draining = false;\n runClearTimeout(timeout);\n}\n\nprocess.nextTick = function (fun) {\n var args = new Array(arguments.length - 1);\n if (arguments.length > 1) {\n for (var i = 1; i < arguments.length; i++) {\n args[i - 1] = arguments[i];\n }\n }\n queue.push(new Item(fun, args));\n if (queue.length === 1 && !draining) {\n runTimeout(drainQueue);\n }\n};\n\n// v8 likes predictible objects\nfunction Item(fun, array) {\n this.fun = fun;\n this.array = array;\n}\nItem.prototype.run = function () {\n this.fun.apply(null, this.array);\n};\nprocess.title = 'browser';\nprocess.browser = true;\nprocess.env = {};\nprocess.argv = [];\nprocess.version = ''; // empty string to avoid regexp issues\nprocess.versions = {};\n\nfunction noop() {}\n\nprocess.on = noop;\nprocess.addListener = noop;\nprocess.once = noop;\nprocess.off = noop;\nprocess.removeListener = noop;\nprocess.removeAllListeners = noop;\nprocess.emit = noop;\nprocess.prependListener = noop;\nprocess.prependOnceListener = noop;\n\nprocess.listeners = function (name) { return [] }\n\nprocess.binding = function (name) {\n throw new Error('process.binding is not supported');\n};\n\nprocess.cwd = function () { return '/' };\nprocess.chdir = function (dir) {\n throw new Error('process.chdir is not supported');\n};\nprocess.umask = function() { return 0; };\n","'use strict'\n\nmodule.exports = stringify\n\nvar toMarkdown = require('mdast-util-to-markdown')\n\nfunction stringify(options) {\n var self = this\n\n this.Compiler = compile\n\n function compile(tree) {\n return toMarkdown(\n tree,\n Object.assign({}, self.data('settings'), options, {\n // Note: this option is not in the readme.\n // The goal is for it to be set by plugins on `data` instead of being\n // passed by users.\n extensions: self.data('toMarkdownExtensions') || []\n })\n )\n }\n}\n","'use strict'\n\nmodule.exports = longestStreak\n\n// Get the count of the longest repeating streak of `character` in `value`.\nfunction longestStreak(value, character) {\n var count = 0\n var maximum = 0\n var expected\n var index\n\n if (typeof character !== 'string' || character.length !== 1) {\n throw new Error('Expected character')\n }\n\n value = String(value)\n index = value.indexOf(character)\n expected = index\n\n while (index !== -1) {\n count++\n\n if (index === expected) {\n if (count > maximum) {\n maximum = count\n }\n } else {\n count = 1\n }\n\n expected = index + 1\n index = value.indexOf(character, expected)\n }\n\n return maximum\n}\n","module.exports = require('./lib')\n","module.exports = configure\n\nfunction configure(base, extension) {\n var index = -1\n var 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 (key === 'extensions') {\n // Empty.\n } else if (key === 'unsafe' || key === 'join') {\n base[key] = base[key].concat(extension[key] || [])\n } else if (key === 'handlers') {\n base[key] = Object.assign(base[key], extension[key] || {})\n } else {\n base.options[key] = extension[key]\n }\n }\n\n return base\n}\n","module.exports = blockquote\n\nvar flow = require('../util/container-flow')\nvar indentLines = require('../util/indent-lines')\n\nfunction blockquote(node, _, context) {\n var exit = context.enter('blockquote')\n var value = indentLines(flow(node, context), map)\n exit()\n return value\n}\n\nfunction map(line, index, blank) {\n return '>' + (blank ? '' : ' ') + line\n}\n","module.exports = hardBreak\n\nvar patternInScope = require('../util/pattern-in-scope')\n\nfunction hardBreak(node, _, context, safe) {\n var index = -1\n\n while (++index < context.unsafe.length) {\n // If we can’t put eols in this construct (setext headings, tables), use a\n // space instead.\n if (\n context.unsafe[index].character === '\\n' &&\n patternInScope(context.stack, context.unsafe[index])\n ) {\n return /[ \\t]/.test(safe.before) ? '' : ' '\n }\n }\n\n return '\\\\\\n'\n}\n","module.exports = code\n\nvar repeat = require('repeat-string')\nvar streak = require('longest-streak')\nvar formatCodeAsIndented = require('../util/format-code-as-indented')\nvar checkFence = require('../util/check-fence')\nvar indentLines = require('../util/indent-lines')\nvar safe = require('../util/safe')\n\nfunction code(node, _, context) {\n var marker = checkFence(context)\n var raw = node.value || ''\n var suffix = marker === '`' ? 'GraveAccent' : 'Tilde'\n var value\n var sequence\n var exit\n var subexit\n\n if (formatCodeAsIndented(node, context)) {\n exit = context.enter('codeIndented')\n value = indentLines(raw, map)\n } else {\n sequence = repeat(marker, Math.max(streak(raw, marker) + 1, 3))\n exit = context.enter('codeFenced')\n value = sequence\n\n if (node.lang) {\n subexit = context.enter('codeFencedLang' + suffix)\n value += safe(context, node.lang, {\n before: '`',\n after: ' ',\n encode: ['`']\n })\n subexit()\n }\n\n if (node.lang && node.meta) {\n subexit = context.enter('codeFencedMeta' + suffix)\n value +=\n ' ' +\n safe(context, node.meta, {\n before: ' ',\n after: '\\n',\n encode: ['`']\n })\n subexit()\n }\n\n value += '\\n'\n\n if (raw) {\n value += raw + '\\n'\n }\n\n value += sequence\n }\n\n exit()\n return value\n}\n\nfunction map(line, _, blank) {\n return (blank ? '' : ' ') + line\n}\n","module.exports = definition\n\nvar association = require('../util/association')\nvar checkQuote = require('../util/check-quote')\nvar safe = require('../util/safe')\n\nfunction definition(node, _, context) {\n var marker = checkQuote(context)\n var suffix = marker === '\"' ? 'Quote' : 'Apostrophe'\n var exit = context.enter('definition')\n var subexit = context.enter('label')\n var value =\n '[' + safe(context, association(node), {before: '[', after: ']'}) + ']: '\n\n subexit()\n\n if (\n // If there’s no url, or…\n !node.url ||\n // If there’s whitespace, enclosed is prettier.\n /[ \\t\\r\\n]/.test(node.url)\n ) {\n subexit = context.enter('destinationLiteral')\n value += '<' + safe(context, node.url, {before: '<', after: '>'}) + '>'\n } else {\n // No whitespace, raw is prettier.\n subexit = context.enter('destinationRaw')\n value += safe(context, node.url, {before: ' ', after: ' '})\n }\n\n subexit()\n\n if (node.title) {\n subexit = context.enter('title' + suffix)\n value +=\n ' ' +\n marker +\n safe(context, node.title, {before: marker, after: marker}) +\n marker\n subexit()\n }\n\n exit()\n\n return value\n}\n","module.exports = emphasis\nemphasis.peek = emphasisPeek\n\nvar checkEmphasis = require('../util/check-emphasis')\nvar phrasing = require('../util/container-phrasing')\n\n// To do: there are cases where emphasis cannot “form” depending on the\n// previous or next character of sequences.\n// There’s no way around that though, except for injecting zero-width stuff.\n// Do we need to safeguard against that?\nfunction emphasis(node, _, context) {\n var marker = checkEmphasis(context)\n var exit = context.enter('emphasis')\n var value = phrasing(node, context, {before: marker, after: marker})\n exit()\n return marker + value + marker\n}\n\nfunction emphasisPeek(node, _, context) {\n return context.options.emphasis || '*'\n}\n","module.exports = heading\n\nvar repeat = require('repeat-string')\nvar formatHeadingAsSetext = require('../util/format-heading-as-setext')\nvar phrasing = require('../util/container-phrasing')\n\nfunction heading(node, _, context) {\n var rank = Math.max(Math.min(6, node.depth || 1), 1)\n var exit\n var subexit\n var value\n var sequence\n\n if (formatHeadingAsSetext(node, context)) {\n exit = context.enter('headingSetext')\n subexit = context.enter('phrasing')\n value = phrasing(node, context, {before: '\\n', after: '\\n'})\n subexit()\n exit()\n\n return (\n value +\n '\\n' +\n repeat(\n rank === 1 ? '=' : '-',\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 sequence = repeat('#', rank)\n exit = context.enter('headingAtx')\n subexit = context.enter('phrasing')\n value = phrasing(node, context, {before: '# ', after: '\\n'})\n value = value ? sequence + ' ' + value : sequence\n if (context.options.closeAtx) {\n value += ' ' + sequence\n }\n\n subexit()\n exit()\n\n return value\n}\n","module.exports = html\nhtml.peek = htmlPeek\n\nfunction html(node) {\n return node.value || ''\n}\n\nfunction htmlPeek() {\n return '<'\n}\n","module.exports = imageReference\nimageReference.peek = imageReferencePeek\n\nvar association = require('../util/association')\nvar safe = require('../util/safe')\n\nfunction imageReference(node, _, context) {\n var type = node.referenceType\n var exit = context.enter('imageReference')\n var subexit = context.enter('label')\n var alt = safe(context, node.alt, {before: '[', after: ']'})\n var value = '![' + alt + ']'\n var reference\n var stack\n\n subexit()\n // Hide the fact that we’re in phrasing, because escapes don’t work.\n stack = context.stack\n context.stack = []\n subexit = context.enter('reference')\n reference = safe(context, association(node), {before: '[', after: ']'})\n subexit()\n context.stack = stack\n exit()\n\n if (type === 'full' || !alt || alt !== reference) {\n value += '[' + reference + ']'\n } else if (type !== 'shortcut') {\n value += '[]'\n }\n\n return value\n}\n\nfunction imageReferencePeek() {\n return '!'\n}\n","module.exports = image\nimage.peek = imagePeek\n\nvar checkQuote = require('../util/check-quote')\nvar safe = require('../util/safe')\n\nfunction image(node, _, context) {\n var quote = checkQuote(context)\n var suffix = quote === '\"' ? 'Quote' : 'Apostrophe'\n var exit = context.enter('image')\n var subexit = context.enter('label')\n var value = '![' + safe(context, node.alt, {before: '[', after: ']'}) + ']('\n\n subexit()\n\n if (\n // If there’s no url but there is a title…\n (!node.url && node.title) ||\n // Or if there’s markdown whitespace or an eol, enclose.\n /[ \\t\\r\\n]/.test(node.url)\n ) {\n subexit = context.enter('destinationLiteral')\n value += '<' + safe(context, node.url, {before: '<', after: '>'}) + '>'\n } else {\n // No whitespace, raw is prettier.\n subexit = context.enter('destinationRaw')\n value += safe(context, node.url, {\n before: '(',\n after: node.title ? ' ' : ')'\n })\n }\n\n subexit()\n\n if (node.title) {\n subexit = context.enter('title' + suffix)\n value +=\n ' ' +\n quote +\n safe(context, node.title, {before: quote, after: quote}) +\n quote\n subexit()\n }\n\n value += ')'\n exit()\n\n return value\n}\n\nfunction imagePeek() {\n return '!'\n}\n","exports.blockquote = require('./blockquote')\nexports.break = require('./break')\nexports.code = require('./code')\nexports.definition = require('./definition')\nexports.emphasis = require('./emphasis')\nexports.hardBreak = require('./break')\nexports.heading = require('./heading')\nexports.html = require('./html')\nexports.image = require('./image')\nexports.imageReference = require('./image-reference')\nexports.inlineCode = require('./inline-code')\nexports.link = require('./link')\nexports.linkReference = require('./link-reference')\nexports.list = require('./list')\nexports.listItem = require('./list-item')\nexports.paragraph = require('./paragraph')\nexports.root = require('./root')\nexports.strong = require('./strong')\nexports.text = require('./text')\nexports.thematicBreak = require('./thematic-break')\n","module.exports = inlineCode\ninlineCode.peek = inlineCodePeek\n\nvar patternCompile = require('../util/pattern-compile')\n\nfunction inlineCode(node, parent, context) {\n var value = node.value || ''\n var sequence = '`'\n var index = -1\n var pattern\n var expression\n var match\n var position\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.charAt(0)) ||\n /[ \\r\\n`]/.test(value.charAt(value.length - 1)))\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 < context.unsafe.length) {\n pattern = context.unsafe[index]\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 expression = patternCompile(pattern)\n\n while ((match = expression.exec(value))) {\n 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\nfunction inlineCodePeek() {\n return '`'\n}\n","module.exports = linkReference\nlinkReference.peek = linkReferencePeek\n\nvar association = require('../util/association')\nvar phrasing = require('../util/container-phrasing')\nvar safe = require('../util/safe')\n\nfunction linkReference(node, _, context) {\n var type = node.referenceType\n var exit = context.enter('linkReference')\n var subexit = context.enter('label')\n var text = phrasing(node, context, {before: '[', after: ']'})\n var value = '[' + text + ']'\n var reference\n var stack\n\n subexit()\n // Hide the fact that we’re in phrasing, because escapes don’t work.\n stack = context.stack\n context.stack = []\n subexit = context.enter('reference')\n reference = safe(context, association(node), {before: '[', after: ']'})\n subexit()\n context.stack = stack\n exit()\n\n if (type === 'full' || !text || text !== reference) {\n value += '[' + reference + ']'\n } else if (type !== 'shortcut') {\n value += '[]'\n }\n\n return value\n}\n\nfunction linkReferencePeek() {\n return '['\n}\n","module.exports = link\nlink.peek = linkPeek\n\nvar checkQuote = require('../util/check-quote')\nvar formatLinkAsAutolink = require('../util/format-link-as-autolink')\nvar phrasing = require('../util/container-phrasing')\nvar safe = require('../util/safe')\n\nfunction link(node, _, context) {\n var quote = checkQuote(context)\n var suffix = quote === '\"' ? 'Quote' : 'Apostrophe'\n var exit\n var subexit\n var value\n var stack\n\n if (formatLinkAsAutolink(node, context)) {\n // Hide the fact that we’re in phrasing, because escapes don’t work.\n stack = context.stack\n context.stack = []\n exit = context.enter('autolink')\n value = '<' + phrasing(node, context, {before: '<', after: '>'}) + '>'\n exit()\n context.stack = stack\n return value\n }\n\n exit = context.enter('link')\n subexit = context.enter('label')\n value = '[' + phrasing(node, context, {before: '[', after: ']'}) + ']('\n subexit()\n\n if (\n // If there’s no url but there is a title…\n (!node.url && node.title) ||\n // Or if there’s markdown whitespace or an eol, enclose.\n /[ \\t\\r\\n]/.test(node.url)\n ) {\n subexit = context.enter('destinationLiteral')\n value += '<' + safe(context, node.url, {before: '<', after: '>'}) + '>'\n } else {\n // No whitespace, raw is prettier.\n subexit = context.enter('destinationRaw')\n value += safe(context, node.url, {\n before: '(',\n after: node.title ? ' ' : ')'\n })\n }\n\n subexit()\n\n if (node.title) {\n subexit = context.enter('title' + suffix)\n value +=\n ' ' +\n quote +\n safe(context, node.title, {before: quote, after: quote}) +\n quote\n subexit()\n }\n\n value += ')'\n\n exit()\n return value\n}\n\nfunction linkPeek(node, _, context) {\n return formatLinkAsAutolink(node, context) ? '<' : '['\n}\n","module.exports = listItem\n\nvar repeat = require('repeat-string')\nvar checkBullet = require('../util/check-bullet')\nvar checkListItemIndent = require('../util/check-list-item-indent')\nvar flow = require('../util/container-flow')\nvar indentLines = require('../util/indent-lines')\n\nfunction listItem(node, parent, context) {\n var bullet = checkBullet(context)\n var listItemIndent = checkListItemIndent(context)\n var size\n var value\n var exit\n\n if (parent && parent.ordered) {\n bullet =\n (parent.start > -1 ? parent.start : 1) +\n (context.options.incrementListMarker === false\n ? 0\n : parent.children.indexOf(node)) +\n '.'\n }\n\n size = bullet.length + 1\n\n if (\n listItemIndent === 'tab' ||\n (listItemIndent === 'mixed' && ((parent && parent.spread) || node.spread))\n ) {\n size = Math.ceil(size / 4) * 4\n }\n\n exit = context.enter('listItem')\n value = indentLines(flow(node, context), map)\n exit()\n\n return value\n\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","module.exports = list\n\nvar flow = require('../util/container-flow')\n\nfunction list(node, _, context) {\n var exit = context.enter('list')\n var value = flow(node, context)\n exit()\n return value\n}\n","module.exports = paragraph\n\nvar phrasing = require('../util/container-phrasing')\n\nfunction paragraph(node, _, context) {\n var exit = context.enter('paragraph')\n var subexit = context.enter('phrasing')\n var value = phrasing(node, context, {before: '\\n', after: '\\n'})\n subexit()\n exit()\n return value\n}\n","module.exports = root\n\nvar flow = require('../util/container-flow')\n\nfunction root(node, _, context) {\n return flow(node, context)\n}\n","module.exports = strong\nstrong.peek = strongPeek\n\nvar checkStrong = require('../util/check-strong')\nvar phrasing = require('../util/container-phrasing')\n\n// To do: there are cases where emphasis cannot “form” depending on the\n// previous or next character of sequences.\n// There’s no way around that though, except for injecting zero-width stuff.\n// Do we need to safeguard against that?\nfunction strong(node, _, context) {\n var marker = checkStrong(context)\n var exit = context.enter('strong')\n var value = phrasing(node, context, {before: marker, after: marker})\n exit()\n return marker + marker + value + marker + marker\n}\n\nfunction strongPeek(node, _, context) {\n return context.options.strong || '*'\n}\n","module.exports = text\n\nvar safe = require('../util/safe')\n\nfunction text(node, parent, context, safeOptions) {\n return safe(context, node.value, safeOptions)\n}\n","module.exports = thematicBreak\n\nvar repeat = require('repeat-string')\nvar checkRepeat = require('../util/check-rule-repeat')\nvar checkRule = require('../util/check-rule')\n\nfunction thematicBreak(node, parent, context) {\n var value = repeat(\n checkRule(context) + (context.options.ruleSpaces ? ' ' : ''),\n checkRepeat(context)\n )\n\n return context.options.ruleSpaces ? value.slice(0, -1) : value\n}\n","module.exports = toMarkdown\n\nvar zwitch = require('zwitch')\nvar configure = require('./configure')\nvar defaultHandlers = require('./handle')\nvar defaultJoin = require('./join')\nvar defaultUnsafe = require('./unsafe')\n\nfunction toMarkdown(tree, options) {\n var settings = options || {}\n var context = {\n enter: enter,\n stack: [],\n unsafe: [],\n join: [],\n handlers: {},\n options: {}\n }\n var result\n\n configure(context, {\n unsafe: defaultUnsafe,\n join: defaultJoin,\n handlers: defaultHandlers\n })\n configure(context, settings)\n\n if (context.options.tightDefinitions) {\n context.join = [joinDefinition].concat(context.join)\n }\n\n context.handle = zwitch('type', {\n invalid: invalid,\n unknown: unknown,\n handlers: context.handlers\n })\n\n result = context.handle(tree, null, context, {before: '\\n', after: '\\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 function enter(name) {\n context.stack.push(name)\n return exit\n\n function exit() {\n context.stack.pop()\n }\n }\n}\n\nfunction invalid(value) {\n throw new Error('Cannot handle value `' + value + '`, expected node')\n}\n\nfunction unknown(node) {\n throw new Error('Cannot handle unknown node `' + node.type + '`')\n}\n\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","module.exports = [joinDefaults]\n\nvar formatCodeAsIndented = require('./util/format-code-as-indented')\nvar formatHeadingAsSetext = require('./util/format-heading-as-setext')\n\nfunction joinDefaults(left, right, parent, context) {\n if (\n // Two lists with the same marker.\n (right.type === 'list' &&\n right.type === left.type &&\n Boolean(left.ordered) === Boolean(right.ordered)) ||\n // Indented code after list or another indented code.\n (right.type === 'code' &&\n formatCodeAsIndented(right, context) &&\n (left.type === 'list' ||\n (left.type === right.type && formatCodeAsIndented(left, context))))\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 (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, context)))\n ) {\n return\n }\n\n return parent.spread ? 1 : 0\n }\n}\n","module.exports = [\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 {\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 {character: '!', after: '\\\\[', inConstruct: 'phrasing'},\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 {before: '\\\\]', character: '(', inConstruct: 'phrasing'},\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: '*'},\n {character: '*', inConstruct: 'phrasing'},\n // A plus sign could start a list item.\n {atBreak: true, character: '+'},\n // A dash can start thematic breaks, list items, and setext heading\n // underlines.\n {atBreak: true, character: '-'},\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 {character: '<', after: '[!/?A-Za-z]', inConstruct: 'phrasing'},\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', '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 {\n character: ']',\n inConstruct: ['label', 'reference']\n },\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 {before: '[^A-Za-z]', character: '_', inConstruct: 'phrasing'},\n {character: '_', after: '[^A-Za-z]', inConstruct: 'phrasing'},\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: [\n 'codeFencedLangGraveAccent',\n 'codeFencedMetaGraveAccent',\n 'phrasing'\n ]\n },\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","module.exports = association\n\nvar decode = require('parse-entities/decode-entity')\n\nvar characterEscape = /\\\\([!-/:-@[-`{-~])/g\nvar characterReference = /&(#(\\d{1,7}|x[\\da-f]{1,6})|[\\da-z]{1,31});/gi\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: controversially,\n// character escapes and references don’t work in this matching: `©` does\n// not match `©`, and `\\+` does not match `+`.\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 escapes\n// and all character references.\nfunction association(node) {\n if (node.label || !node.identifier) {\n return node.label || ''\n }\n\n return node.identifier\n .replace(characterEscape, '$1')\n .replace(characterReference, decodeIfPossible)\n}\n\nfunction decodeIfPossible($0, $1) {\n return decode($1) || $0\n}\n","module.exports = checkBullet\n\nfunction checkBullet(context) {\n var marker = context.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","module.exports = checkEmphasis\n\nfunction checkEmphasis(context) {\n var marker = context.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","module.exports = checkFence\n\nfunction checkFence(context) {\n var marker = context.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","module.exports = checkListItemIndent\n\nfunction checkListItemIndent(context) {\n var style = context.options.listItemIndent || 'tab'\n\n if (style === 1 || style === '1') {\n return 'one'\n }\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","module.exports = checkQuote\n\nfunction checkQuote(context) {\n var marker = context.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","module.exports = checkRule\n\nfunction checkRule(context) {\n var repetition = context.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","module.exports = checkRule\n\nfunction checkRule(context) {\n var marker = context.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","module.exports = checkStrong\n\nfunction checkStrong(context) {\n var marker = context.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","module.exports = flow\n\nvar repeat = require('repeat-string')\n\nfunction flow(parent, context) {\n var children = parent.children || []\n var results = []\n var index = -1\n var child\n\n while (++index < children.length) {\n child = children[index]\n\n results.push(\n context.handle(child, parent, context, {before: '\\n', after: '\\n'})\n )\n\n if (index + 1 < children.length) {\n results.push(between(child, children[index + 1]))\n }\n }\n\n return results.join('')\n\n function between(left, right) {\n var index = -1\n var result\n\n while (++index < context.join.length) {\n result = context.join[index](left, right, parent, context)\n\n if (result === true || result === 1) {\n break\n }\n\n if (typeof result === 'number') {\n return repeat('\\n', 1 + Number(result))\n }\n\n if (result === false) {\n return '\\n\\n\\n\\n'\n }\n }\n\n return '\\n\\n'\n }\n}\n","module.exports = phrasing\n\nfunction phrasing(parent, context, safeOptions) {\n var children = parent.children || []\n var results = []\n var index = -1\n var before = safeOptions.before\n var after\n var handle\n var child\n\n while (++index < children.length) {\n child = children[index]\n\n if (index + 1 < children.length) {\n handle = context.handle.handlers[children[index + 1].type]\n if (handle && handle.peek) handle = handle.peek\n after = handle\n ? handle(children[index + 1], parent, context, {\n before: '',\n after: ''\n }).charAt(0)\n : ''\n } else {\n after = safeOptions.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: \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\n results.push(\n context.handle(child, parent, context, {\n before: before,\n after: after\n })\n )\n\n before = results[results.length - 1].slice(-1)\n }\n\n return results.join('')\n}\n","module.exports = formatCodeAsIndented\n\nfunction formatCodeAsIndented(node, context) {\n return (\n !context.options.fences &&\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","module.exports = formatHeadingAsSetext\n\nvar toString = require('mdast-util-to-string')\n\nfunction formatHeadingAsSetext(node, context) {\n return (\n context.options.setext && (!node.depth || node.depth < 3) && toString(node)\n )\n}\n","module.exports = formatLinkAsAutolink\n\nvar toString = require('mdast-util-to-string')\n\nfunction formatLinkAsAutolink(node, context) {\n var raw = toString(node)\n\n return (\n !context.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) or angle brackets…\n !/[\\0- <>\\u007F]/.test(node.url)\n )\n}\n","module.exports = indentLines\n\nvar eol = /\\r?\\n|\\r/g\n\nfunction indentLines(value, map) {\n var result = []\n var start = 0\n var line = 0\n var 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 function one(value) {\n result.push(map(value, line, !value))\n }\n}\n","module.exports = patternCompile\n\nfunction patternCompile(pattern) {\n var before\n var after\n\n if (!pattern._compiled) {\n before = pattern.before ? '(?:' + pattern.before + ')' : ''\n after = pattern.after ? '(?:' + pattern.after + ')' : ''\n\n if (pattern.atBreak) {\n before = '[\\\\r\\\\n][\\\\t ]*' + before\n }\n\n pattern._compiled = new RegExp(\n (before ? '(' + before + ')' : '') +\n (/[|\\\\{}()[\\]^$+*?.-]/.test(pattern.character) ? '\\\\' : '') +\n pattern.character +\n (after || ''),\n 'g'\n )\n }\n\n return pattern._compiled\n}\n","module.exports = patternInScope\n\nfunction patternInScope(stack, pattern) {\n return (\n listInScope(stack, pattern.inConstruct, true) &&\n !listInScope(stack, pattern.notInConstruct)\n )\n}\n\nfunction listInScope(stack, list, none) {\n var index\n\n if (!list) {\n return none\n }\n\n if (typeof list === 'string') {\n list = [list]\n }\n\n index = -1\n\n while (++index < list.length) {\n if (stack.indexOf(list[index]) !== -1) {\n return true\n }\n }\n\n return false\n}\n","module.exports = safe\n\nvar patternCompile = require('./pattern-compile')\nvar patternInScope = require('./pattern-in-scope')\n\nfunction safe(context, input, config) {\n var value = (config.before || '') + (input || '') + (config.after || '')\n var positions = []\n var result = []\n var infos = {}\n var index = -1\n var before\n var after\n var position\n var pattern\n var expression\n var match\n var start\n var end\n\n while (++index < context.unsafe.length) {\n pattern = context.unsafe[index]\n\n if (!patternInScope(context.stack, pattern)) {\n continue\n }\n\n expression = patternCompile(pattern)\n\n while ((match = expression.exec(value))) {\n before = 'before' in pattern || pattern.atBreak\n after = 'after' in pattern\n\n position = match.index + (before ? match[1].length : 0)\n\n if (positions.indexOf(position) === -1) {\n positions.push(position)\n infos[position] = {before: before, after: after}\n } else {\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 }\n }\n }\n\n positions.sort(numerical)\n\n start = config.before ? config.before.length : 0\n end = value.length - (config.after ? config.after.length : 0)\n index = -1\n\n while (++index < positions.length) {\n position = positions[index]\n\n if (\n // Character before or after matched:\n position < start ||\n position >= end\n ) {\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 ) {\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.indexOf(value.charAt(position)) === -1)\n ) {\n // Character escape.\n result.push('\\\\')\n } else {\n // Character reference.\n result.push(\n '&#x' + value.charCodeAt(position).toString(16).toUpperCase() + ';'\n )\n start++\n }\n }\n\n result.push(escapeBackslashes(value.slice(start, end), config.after))\n\n return result.join('')\n}\n\nfunction numerical(a, b) {\n return a - b\n}\n\nfunction escapeBackslashes(value, after) {\n var expression = /\\\\(?=[!-/:-@[-`{-~])/g\n var positions = []\n var results = []\n var index = -1\n var start = 0\n var whole = value + after\n var 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","'use strict'\n\nmodule.exports = toString\n\n// Get the text content of a node.\n// Prefer the node’s plain-text fields, otherwise serialize its children,\n// and if the given value is an array, serialize the nodes in it.\nfunction toString(node) {\n return (\n (node &&\n (node.value ||\n node.alt ||\n node.title ||\n ('children' in node && all(node.children)) ||\n ('length' in node && all(node)))) ||\n ''\n )\n}\n\nfunction all(values) {\n var result = []\n var index = -1\n\n while (++index < values.length) {\n result[index] = toString(values[index])\n }\n\n return result.join('')\n}\n","'use strict'\n\n/* eslint-env browser */\n\nvar el\n\nvar semicolon = 59 // ';'\n\nmodule.exports = decodeEntity\n\nfunction decodeEntity(characters) {\n var entity = '&' + characters + ';'\n var char\n\n el = el || document.createElement('i')\n el.innerHTML = entity\n char = el.textContent\n\n // Some entities do not require the closing semicolon (`¬` - for instance),\n // which leads to situations where parsing the assumed entity of ¬it; will\n // result in the string `¬it;`. When we encounter a trailing semicolon after\n // parsing and the entity to decode was not a semicolon (`;`), we can\n // assume that the matching was incomplete\n if (char.charCodeAt(char.length - 1) === semicolon && characters !== 'semi') {\n return false\n }\n\n // If the decoded string is equal to the input, the entity was not valid\n return char === entity ? false : char\n}\n","'use strict'\n\nmodule.exports = factory\n\nvar noop = Function.prototype\nvar own = {}.hasOwnProperty\n\n// Handle values based on a property.\nfunction factory(key, options) {\n var settings = options || {}\n\n function one(value) {\n var fn = one.invalid\n var handlers = one.handlers\n\n if (value && own.call(value, key)) {\n fn = own.call(handlers, value[key]) ? handlers[value[key]] : one.unknown\n }\n\n return (fn || noop).apply(this, arguments)\n }\n\n one.handlers = settings.handlers || {}\n one.invalid = settings.invalid\n one.unknown = settings.unknown\n\n return one\n}\n","'use strict'\n\nvar unified = require('unified')\nvar parse = require('remark-parse')\nvar stringify = require('remark-stringify')\n\nmodule.exports = unified().use(parse).use(stringify).freeze()\n","'use strict'\n\nmodule.exports = bail\n\nfunction bail(err) {\n if (err) {\n throw err\n }\n}\n","'use strict';\n\nmodule.exports = value => {\n\tif (Object.prototype.toString.call(value) !== '[object Object]') {\n\t\treturn false;\n\t}\n\n\tconst prototype = Object.getPrototypeOf(value);\n\treturn prototype === null || prototype === Object.prototype;\n};\n","'use strict'\n\nmodule.exports = fromMarkdown\n\n// These three are compiled away in the `dist/`\n\nvar toString = require('mdast-util-to-string')\nvar assign = require('micromark/dist/constant/assign')\nvar own = require('micromark/dist/constant/has-own-property')\nvar normalizeIdentifier = require('micromark/dist/util/normalize-identifier')\nvar safeFromInt = require('micromark/dist/util/safe-from-int')\nvar parser = require('micromark/dist/parse')\nvar preprocessor = require('micromark/dist/preprocess')\nvar postprocess = require('micromark/dist/postprocess')\nvar decode = require('parse-entities/decode-entity')\nvar stringifyPosition = require('unist-util-stringify-position')\n\nfunction fromMarkdown(value, encoding, options) {\n if (typeof encoding !== 'string') {\n options = encoding\n encoding = undefined\n }\n\n return compiler(options)(\n postprocess(\n parser(options).document().write(preprocessor()(value, encoding, true))\n )\n )\n}\n\n// Note this compiler only understand complete buffering, not streaming.\nfunction compiler(options) {\n var settings = options || {}\n var config = configure(\n {\n transforms: [],\n canContainEols: [\n 'emphasis',\n 'fragment',\n 'heading',\n 'paragraph',\n 'strong'\n ],\n\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\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 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\n settings.mdastExtensions || []\n )\n\n var data = {}\n\n return compile\n\n function compile(events) {\n var tree = {type: 'root', children: []}\n var stack = [tree]\n var tokenStack = []\n var listStack = []\n var index = -1\n var handler\n var listStart\n\n var context = {\n stack: stack,\n tokenStack: tokenStack,\n config: config,\n enter: enter,\n exit: exit,\n buffer: buffer,\n resume: resume,\n setData: setData,\n getData: getData\n }\n\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 (\n events[index][1].type === 'listOrdered' ||\n events[index][1].type === 'listUnordered'\n ) {\n if (events[index][0] === 'enter') {\n listStack.push(index)\n } else {\n listStart = listStack.pop(index)\n index = prepareList(events, listStart, index)\n }\n }\n }\n\n index = -1\n\n while (++index < events.length) {\n handler = config[events[index][0]]\n\n if (own.call(handler, events[index][1].type)) {\n handler[events[index][1].type].call(\n assign({sliceSerialize: events[index][2].sliceSerialize}, context),\n events[index][1]\n )\n }\n }\n\n if (tokenStack.length) {\n throw new Error(\n 'Cannot close document, a token (`' +\n tokenStack[tokenStack.length - 1].type +\n '`, ' +\n stringifyPosition({\n start: tokenStack[tokenStack.length - 1].start,\n end: tokenStack[tokenStack.length - 1].end\n }) +\n ') is still open'\n )\n }\n\n // Figure out `root` position.\n tree.position = {\n start: point(\n events.length ? events[0][1].start : {line: 1, column: 1, offset: 0}\n ),\n\n end: point(\n events.length\n ? events[events.length - 2][1].end\n : {line: 1, column: 1, offset: 0}\n )\n }\n\n index = -1\n while (++index < config.transforms.length) {\n tree = config.transforms[index](tree) || tree\n }\n\n return tree\n }\n\n function prepareList(events, start, length) {\n var index = start - 1\n var containerBalance = -1\n var listSpread = false\n var listItem\n var tailIndex\n var lineIndex\n var tailEvent\n var event\n var firstBlankLineIndex\n var atMarker\n\n while (++index <= length) {\n event = events[index]\n\n if (\n event[1].type === 'listUnordered' ||\n event[1].type === 'listOrdered' ||\n event[1].type === 'blockQuote'\n ) {\n if (event[0] === 'enter') {\n containerBalance++\n } else {\n containerBalance--\n }\n\n atMarker = undefined\n } else if (event[1].type === 'lineEndingBlank') {\n if (event[0] === 'enter') {\n if (\n listItem &&\n !atMarker &&\n !containerBalance &&\n !firstBlankLineIndex\n ) {\n firstBlankLineIndex = index\n }\n\n atMarker = undefined\n }\n } else if (\n event[1].type === 'linePrefix' ||\n event[1].type === 'listItemValue' ||\n event[1].type === 'listItemMarker' ||\n event[1].type === 'listItemPrefix' ||\n event[1].type === 'listItemPrefixWhitespace'\n ) {\n // Empty.\n } else {\n atMarker = undefined\n }\n\n if (\n (!containerBalance &&\n event[0] === 'enter' &&\n event[1].type === 'listItemPrefix') ||\n (containerBalance === -1 &&\n event[0] === 'exit' &&\n (event[1].type === 'listUnordered' ||\n event[1].type === 'listOrdered'))\n ) {\n if (listItem) {\n tailIndex = index\n lineIndex = undefined\n\n while (tailIndex--) {\n tailEvent = events[tailIndex]\n\n if (\n tailEvent[1].type === 'lineEnding' ||\n tailEvent[1].type === 'lineEndingBlank'\n ) {\n if (tailEvent[0] === 'exit') continue\n\n if (lineIndex) {\n events[lineIndex][1].type = 'lineEndingBlank'\n listSpread = true\n }\n\n tailEvent[1].type = 'lineEnding'\n lineIndex = tailIndex\n } else if (\n tailEvent[1].type === 'linePrefix' ||\n tailEvent[1].type === 'blockQuotePrefix' ||\n tailEvent[1].type === 'blockQuotePrefixWhitespace' ||\n tailEvent[1].type === 'blockQuoteMarker' ||\n tailEvent[1].type === 'listItemIndent'\n ) {\n // Empty\n } else {\n break\n }\n }\n\n if (\n firstBlankLineIndex &&\n (!lineIndex || firstBlankLineIndex < lineIndex)\n ) {\n listItem._spread = true\n }\n\n // Fix position.\n listItem.end = point(\n lineIndex ? events[lineIndex][1].start : event[1].end\n )\n\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 listItem = {\n type: 'listItem',\n _spread: false,\n start: point(event[1].start)\n }\n\n events.splice(index, 0, ['enter', listItem, event[2]])\n index++\n length++\n firstBlankLineIndex = undefined\n atMarker = true\n }\n }\n }\n\n events[start][1]._spread = listSpread\n return length\n }\n\n function setData(key, value) {\n data[key] = value\n }\n\n function getData(key) {\n return data[key]\n }\n\n function point(d) {\n return {line: d.line, column: d.column, offset: d.offset}\n }\n\n function opener(create, and) {\n return open\n\n function open(token) {\n enter.call(this, create(token), token)\n if (and) and.call(this, token)\n }\n }\n\n function buffer() {\n this.stack.push({type: 'fragment', children: []})\n }\n\n function enter(node, token) {\n this.stack[this.stack.length - 1].children.push(node)\n this.stack.push(node)\n this.tokenStack.push(token)\n node.position = {start: point(token.start)}\n return node\n }\n\n function closer(and) {\n return close\n\n function close(token) {\n if (and) and.call(this, token)\n exit.call(this, token)\n }\n }\n\n function exit(token) {\n var node = this.stack.pop()\n var open = this.tokenStack.pop()\n\n if (!open) {\n throw new Error(\n 'Cannot close `' +\n token.type +\n '` (' +\n stringifyPosition({start: token.start, end: token.end}) +\n '): it’s not open'\n )\n } else if (open.type !== token.type) {\n throw new Error(\n 'Cannot close `' +\n token.type +\n '` (' +\n stringifyPosition({start: token.start, end: token.end}) +\n '): a different token (`' +\n open.type +\n '`, ' +\n stringifyPosition({start: open.start, end: open.end}) +\n ') is open'\n )\n }\n\n node.position.end = point(token.end)\n return node\n }\n\n function resume() {\n return toString(this.stack.pop())\n }\n\n //\n // Handlers.\n //\n\n function onenterlistordered() {\n setData('expectingFirstListItemValue', true)\n }\n\n function onenterlistitemvalue(token) {\n if (getData('expectingFirstListItemValue')) {\n this.stack[this.stack.length - 2].start = parseInt(\n this.sliceSerialize(token),\n 10\n )\n\n setData('expectingFirstListItemValue')\n }\n }\n\n function onexitcodefencedfenceinfo() {\n var data = this.resume()\n this.stack[this.stack.length - 1].lang = data\n }\n\n function onexitcodefencedfencemeta() {\n var data = this.resume()\n this.stack[this.stack.length - 1].meta = data\n }\n\n function onexitcodefencedfence() {\n // Exit if this is the closing fence.\n if (getData('flowCodeInside')) return\n this.buffer()\n setData('flowCodeInside', true)\n }\n\n function onexitcodefenced() {\n var data = this.resume()\n this.stack[this.stack.length - 1].value = data.replace(\n /^(\\r?\\n|\\r)|(\\r?\\n|\\r)$/g,\n ''\n )\n\n setData('flowCodeInside')\n }\n\n function onexitcodeindented() {\n var data = this.resume()\n this.stack[this.stack.length - 1].value = data\n }\n\n function onexitdefinitionlabelstring(token) {\n // Discard label, use the source content instead.\n var label = this.resume()\n this.stack[this.stack.length - 1].label = label\n this.stack[this.stack.length - 1].identifier = normalizeIdentifier(\n this.sliceSerialize(token)\n ).toLowerCase()\n }\n\n function onexitdefinitiontitlestring() {\n var data = this.resume()\n this.stack[this.stack.length - 1].title = data\n }\n\n function onexitdefinitiondestinationstring() {\n var data = this.resume()\n this.stack[this.stack.length - 1].url = data\n }\n\n function onexitatxheadingsequence(token) {\n if (!this.stack[this.stack.length - 1].depth) {\n this.stack[this.stack.length - 1].depth = this.sliceSerialize(\n token\n ).length\n }\n }\n\n function onexitsetextheadingtext() {\n setData('setextHeadingSlurpLineEnding', true)\n }\n\n function onexitsetextheadinglinesequence(token) {\n this.stack[this.stack.length - 1].depth =\n this.sliceSerialize(token).charCodeAt(0) === 61 ? 1 : 2\n }\n\n function onexitsetextheading() {\n setData('setextHeadingSlurpLineEnding')\n }\n\n function onenterdata(token) {\n var siblings = this.stack[this.stack.length - 1].children\n var tail = siblings[siblings.length - 1]\n\n if (!tail || tail.type !== 'text') {\n // Add a new text node.\n tail = text()\n tail.position = {start: point(token.start)}\n this.stack[this.stack.length - 1].children.push(tail)\n }\n\n this.stack.push(tail)\n }\n\n function onexitdata(token) {\n var tail = this.stack.pop()\n tail.value += this.sliceSerialize(token)\n tail.position.end = point(token.end)\n }\n\n function onexitlineending(token) {\n var context = this.stack[this.stack.length - 1]\n\n // If we’re at a hard break, include the line ending in there.\n if (getData('atHardBreak')) {\n context.children[context.children.length - 1].position.end = point(\n token.end\n )\n\n setData('atHardBreak')\n return\n }\n\n if (\n !getData('setextHeadingSlurpLineEnding') &&\n config.canContainEols.indexOf(context.type) > -1\n ) {\n onenterdata.call(this, token)\n onexitdata.call(this, token)\n }\n }\n\n function onexithardbreak() {\n setData('atHardBreak', true)\n }\n\n function onexithtmlflow() {\n var data = this.resume()\n this.stack[this.stack.length - 1].value = data\n }\n\n function onexithtmltext() {\n var data = this.resume()\n this.stack[this.stack.length - 1].value = data\n }\n\n function onexitcodetext() {\n var data = this.resume()\n this.stack[this.stack.length - 1].value = data\n }\n\n function onexitlink() {\n var context = this.stack[this.stack.length - 1]\n\n // To do: clean.\n if (getData('inReference')) {\n context.type += 'Reference'\n context.referenceType = getData('referenceType') || 'shortcut'\n delete context.url\n delete context.title\n } else {\n delete context.identifier\n delete context.label\n delete context.referenceType\n }\n\n setData('referenceType')\n }\n\n function onexitimage() {\n var context = this.stack[this.stack.length - 1]\n\n // To do: clean.\n if (getData('inReference')) {\n context.type += 'Reference'\n context.referenceType = getData('referenceType') || 'shortcut'\n delete context.url\n delete context.title\n } else {\n delete context.identifier\n delete context.label\n delete context.referenceType\n }\n\n setData('referenceType')\n }\n\n function onexitlabeltext(token) {\n this.stack[this.stack.length - 2].identifier = normalizeIdentifier(\n this.sliceSerialize(token)\n ).toLowerCase()\n }\n\n function onexitlabel() {\n var fragment = this.stack[this.stack.length - 1]\n var value = this.resume()\n\n this.stack[this.stack.length - 1].label = value\n\n // Assume a reference.\n setData('inReference', true)\n\n if (this.stack[this.stack.length - 1].type === 'link') {\n this.stack[this.stack.length - 1].children = fragment.children\n } else {\n this.stack[this.stack.length - 1].alt = value\n }\n }\n\n function onexitresourcedestinationstring() {\n var data = this.resume()\n this.stack[this.stack.length - 1].url = data\n }\n\n function onexitresourcetitlestring() {\n var data = this.resume()\n this.stack[this.stack.length - 1].title = data\n }\n\n function onexitresource() {\n setData('inReference')\n }\n\n function onenterreference() {\n setData('referenceType', 'collapsed')\n }\n\n function onexitreferencestring(token) {\n var label = this.resume()\n this.stack[this.stack.length - 1].label = label\n this.stack[this.stack.length - 1].identifier = normalizeIdentifier(\n this.sliceSerialize(token)\n ).toLowerCase()\n setData('referenceType', 'full')\n }\n\n function onexitcharacterreferencemarker(token) {\n setData('characterReferenceType', token.type)\n }\n\n function onexitcharacterreferencevalue(token) {\n var data = this.sliceSerialize(token)\n var type = getData('characterReferenceType')\n var value\n var tail\n\n if (type) {\n value = safeFromInt(\n data,\n type === 'characterReferenceMarkerNumeric' ? 10 : 16\n )\n\n setData('characterReferenceType')\n } else {\n value = decode(data)\n }\n\n tail = this.stack.pop()\n tail.value += value\n tail.position.end = point(token.end)\n }\n\n function onexitautolinkprotocol(token) {\n onexitdata.call(this, token)\n this.stack[this.stack.length - 1].url = this.sliceSerialize(token)\n }\n\n function onexitautolinkemail(token) {\n onexitdata.call(this, token)\n this.stack[this.stack.length - 1].url =\n 'mailto:' + this.sliceSerialize(token)\n }\n\n //\n // Creaters.\n //\n\n function blockQuote() {\n return {type: 'blockquote', children: []}\n }\n\n function codeFlow() {\n return {type: 'code', lang: null, meta: null, value: ''}\n }\n\n function codeText() {\n return {type: 'inlineCode', value: ''}\n }\n\n function definition() {\n return {\n type: 'definition',\n identifier: '',\n label: null,\n title: null,\n url: ''\n }\n }\n\n function emphasis() {\n return {type: 'emphasis', children: []}\n }\n\n function heading() {\n return {type: 'heading', depth: undefined, children: []}\n }\n\n function hardBreak() {\n return {type: 'break'}\n }\n\n function html() {\n return {type: 'html', value: ''}\n }\n\n function image() {\n return {type: 'image', title: null, url: '', alt: null}\n }\n\n function link() {\n return {type: 'link', title: null, url: '', children: []}\n }\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 function listItem(token) {\n return {\n type: 'listItem',\n spread: token._spread,\n checked: null,\n children: []\n }\n }\n\n function paragraph() {\n return {type: 'paragraph', children: []}\n }\n\n function strong() {\n return {type: 'strong', children: []}\n }\n\n function text() {\n return {type: 'text', value: ''}\n }\n\n function thematicBreak() {\n return {type: 'thematicBreak'}\n }\n}\n\nfunction configure(config, extensions) {\n var index = -1\n\n while (++index < extensions.length) {\n extension(config, extensions[index])\n }\n\n return config\n}\n\nfunction extension(config, extension) {\n var key\n var left\n\n for (key in extension) {\n left = own.call(config, key) ? config[key] : (config[key] = {})\n\n if (key === 'canContainEols' || key === 'transforms') {\n config[key] = [].concat(left, extension[key])\n } else {\n Object.assign(left, extension[key])\n }\n }\n}\n","'use strict'\n\nmodule.exports = require('./dist')\n","'use strict'\n\nmodule.exports = toString\n\n// Get the text content of a node.\n// Prefer the node’s plain-text fields, otherwise serialize its children,\n// and if the given value is an array, serialize the nodes in it.\nfunction toString(node) {\n return (\n (node &&\n (node.value ||\n node.alt ||\n node.title ||\n ('children' in node && all(node.children)) ||\n ('length' in node && all(node)))) ||\n ''\n )\n}\n\nfunction all(values) {\n var result = []\n var index = -1\n\n while (++index < values.length) {\n result[index] = toString(values[index])\n }\n\n return result.join('')\n}\n","'use strict'\n\nvar regexCheck = require('../util/regex-check.js')\n\nvar asciiAlpha = regexCheck(/[A-Za-z]/)\n\nmodule.exports = asciiAlpha\n","'use strict'\n\nvar regexCheck = require('../util/regex-check.js')\n\nvar asciiAlphanumeric = regexCheck(/[\\dA-Za-z]/)\n\nmodule.exports = asciiAlphanumeric\n","'use strict'\n\nvar regexCheck = require('../util/regex-check.js')\n\nvar asciiAtext = regexCheck(/[#-'*+\\--9=?A-Z^-~]/)\n\nmodule.exports = asciiAtext\n","'use strict'\n\n// Note: EOF is seen as ASCII control here, because `null < 32 == true`.\nfunction asciiControl(code) {\n return (\n // Special whitespace codes (which have negative values), C0 and Control\n // character DEL\n code < 32 || code === 127\n )\n}\n\nmodule.exports = asciiControl\n","'use strict'\n\nvar regexCheck = require('../util/regex-check.js')\n\nvar asciiDigit = regexCheck(/\\d/)\n\nmodule.exports = asciiDigit\n","'use strict'\n\nvar regexCheck = require('../util/regex-check.js')\n\nvar asciiHexDigit = regexCheck(/[\\dA-Fa-f]/)\n\nmodule.exports = asciiHexDigit\n","'use strict'\n\nvar regexCheck = require('../util/regex-check.js')\n\nvar asciiPunctuation = regexCheck(/[!-/:-@[-`{-~]/)\n\nmodule.exports = asciiPunctuation\n","'use strict'\n\nfunction markdownLineEndingOrSpace(code) {\n return code < 0 || code === 32\n}\n\nmodule.exports = markdownLineEndingOrSpace\n","'use strict'\n\nfunction markdownLineEnding(code) {\n return code < -2\n}\n\nmodule.exports = markdownLineEnding\n","'use strict'\n\nfunction markdownSpace(code) {\n return code === -2 || code === -1 || code === 32\n}\n\nmodule.exports = markdownSpace\n","'use strict'\n\nvar unicodePunctuationRegex = require('../constant/unicode-punctuation-regex.js')\nvar regexCheck = require('../util/regex-check.js')\n\n// In fact adds to the bundle size.\n\nvar unicodePunctuation = regexCheck(unicodePunctuationRegex)\n\nmodule.exports = unicodePunctuation\n","'use strict'\n\nvar regexCheck = require('../util/regex-check.js')\n\nvar unicodeWhitespace = regexCheck(/\\s/)\n\nmodule.exports = unicodeWhitespace\n","'use strict'\n\nvar assign = Object.assign\n\nmodule.exports = assign\n","'use strict'\n\nvar fromCharCode = String.fromCharCode\n\nmodule.exports = fromCharCode\n","'use strict'\n\nvar own = {}.hasOwnProperty\n\nmodule.exports = own\n","'use strict'\n\n// This module is copied from .\nvar basics = [\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 'section',\n 'source',\n 'summary',\n 'table',\n 'tbody',\n 'td',\n 'tfoot',\n 'th',\n 'thead',\n 'title',\n 'tr',\n 'track',\n 'ul'\n]\n\nmodule.exports = basics\n","'use strict'\n\n// This module is copied from .\nvar raws = ['pre', 'script', 'style', 'textarea']\n\nmodule.exports = raws\n","'use strict'\n\nvar splice = [].splice\n\nmodule.exports = splice\n","'use strict'\n\n// This module is generated by `script/`.\n//\n// CommonMark handles attention (emphasis, strong) markers based on what comes\n// before or after them.\n// One such difference is if those characters are Unicode punctuation.\n// This script is generated from the Unicode data.\nvar unicodePunctuation = /[!-\\/:-@\\[-`\\{-~\\xA1\\xA7\\xAB\\xB6\\xB7\\xBB\\xBF\\u037E\\u0387\\u055A-\\u055F\\u0589\\u058A\\u05BE\\u05C0\\u05C3\\u05C6\\u05F3\\u05F4\\u0609\\u060A\\u060C\\u060D\\u061B\\u061E\\u061F\\u066A-\\u066D\\u06D4\\u0700-\\u070D\\u07F7-\\u07F9\\u0830-\\u083E\\u085E\\u0964\\u0965\\u0970\\u09FD\\u0A76\\u0AF0\\u0C77\\u0C84\\u0DF4\\u0E4F\\u0E5A\\u0E5B\\u0F04-\\u0F12\\u0F14\\u0F3A-\\u0F3D\\u0F85\\u0FD0-\\u0FD4\\u0FD9\\u0FDA\\u104A-\\u104F\\u10FB\\u1360-\\u1368\\u1400\\u166E\\u169B\\u169C\\u16EB-\\u16ED\\u1735\\u1736\\u17D4-\\u17D6\\u17D8-\\u17DA\\u1800-\\u180A\\u1944\\u1945\\u1A1E\\u1A1F\\u1AA0-\\u1AA6\\u1AA8-\\u1AAD\\u1B5A-\\u1B60\\u1BFC-\\u1BFF\\u1C3B-\\u1C3F\\u1C7E\\u1C7F\\u1CC0-\\u1CC7\\u1CD3\\u2010-\\u2027\\u2030-\\u2043\\u2045-\\u2051\\u2053-\\u205E\\u207D\\u207E\\u208D\\u208E\\u2308-\\u230B\\u2329\\u232A\\u2768-\\u2775\\u27C5\\u27C6\\u27E6-\\u27EF\\u2983-\\u2998\\u29D8-\\u29DB\\u29FC\\u29FD\\u2CF9-\\u2CFC\\u2CFE\\u2CFF\\u2D70\\u2E00-\\u2E2E\\u2E30-\\u2E4F\\u2E52\\u3001-\\u3003\\u3008-\\u3011\\u3014-\\u301F\\u3030\\u303D\\u30A0\\u30FB\\uA4FE\\uA4FF\\uA60D-\\uA60F\\uA673\\uA67E\\uA6F2-\\uA6F7\\uA874-\\uA877\\uA8CE\\uA8CF\\uA8F8-\\uA8FA\\uA8FC\\uA92E\\uA92F\\uA95F\\uA9C1-\\uA9CD\\uA9DE\\uA9DF\\uAA5C-\\uAA5F\\uAADE\\uAADF\\uAAF0\\uAAF1\\uABEB\\uFD3E\\uFD3F\\uFE10-\\uFE19\\uFE30-\\uFE52\\uFE54-\\uFE61\\uFE63\\uFE68\\uFE6A\\uFE6B\\uFF01-\\uFF03\\uFF05-\\uFF0A\\uFF0C-\\uFF0F\\uFF1A\\uFF1B\\uFF1F\\uFF20\\uFF3B-\\uFF3D\\uFF3F\\uFF5B\\uFF5D\\uFF5F-\\uFF65]/\n\nmodule.exports = unicodePunctuation\n","'use strict'\n\nObject.defineProperty(exports, '__esModule', {value: true})\n\nvar text$1 = require('./initialize/text.js')\nvar attention = require('./tokenize/attention.js')\nvar autolink = require('./tokenize/autolink.js')\nvar blockQuote = require('./tokenize/block-quote.js')\nvar characterEscape = require('./tokenize/character-escape.js')\nvar characterReference = require('./tokenize/character-reference.js')\nvar codeFenced = require('./tokenize/code-fenced.js')\nvar codeIndented = require('./tokenize/code-indented.js')\nvar codeText = require('./tokenize/code-text.js')\nvar definition = require('./tokenize/definition.js')\nvar hardBreakEscape = require('./tokenize/hard-break-escape.js')\nvar headingAtx = require('./tokenize/heading-atx.js')\nvar htmlFlow = require('./tokenize/html-flow.js')\nvar htmlText = require('./tokenize/html-text.js')\nvar labelEnd = require('./tokenize/label-end.js')\nvar labelStartImage = require('./tokenize/label-start-image.js')\nvar labelStartLink = require('./tokenize/label-start-link.js')\nvar lineEnding = require('./tokenize/line-ending.js')\nvar list = require('./tokenize/list.js')\nvar setextUnderline = require('./tokenize/setext-underline.js')\nvar thematicBreak = require('./tokenize/thematic-break.js')\n\nvar document = {\n 42: list,\n // Asterisk\n 43: list,\n // Plus sign\n 45: list,\n // Dash\n 48: list,\n // 0\n 49: list,\n // 1\n 50: list,\n // 2\n 51: list,\n // 3\n 52: list,\n // 4\n 53: list,\n // 5\n 54: list,\n // 6\n 55: list,\n // 7\n 56: list,\n // 8\n 57: list,\n // 9\n 62: blockQuote // Greater than\n}\nvar contentInitial = {\n 91: definition // Left square bracket\n}\nvar flowInitial = {\n '-2': codeIndented,\n // Horizontal tab\n '-1': codeIndented,\n // Virtual space\n 32: codeIndented // Space\n}\nvar flow = {\n 35: headingAtx,\n // Number sign\n 42: thematicBreak,\n // Asterisk\n 45: [setextUnderline, thematicBreak],\n // Dash\n 60: htmlFlow,\n // Less than\n 61: setextUnderline,\n // Equals to\n 95: thematicBreak,\n // Underscore\n 96: codeFenced,\n // Grave accent\n 126: codeFenced // Tilde\n}\nvar string = {\n 38: characterReference,\n // Ampersand\n 92: characterEscape // Backslash\n}\nvar text = {\n '-5': lineEnding,\n // Carriage return\n '-4': lineEnding,\n // Line feed\n '-3': lineEnding,\n // Carriage return + line feed\n 33: labelStartImage,\n // Exclamation mark\n 38: characterReference,\n // Ampersand\n 42: attention,\n // Asterisk\n 60: [autolink, htmlText],\n // Less than\n 91: labelStartLink,\n // Left square bracket\n 92: [hardBreakEscape, characterEscape],\n // Backslash\n 93: labelEnd,\n // Right square bracket\n 95: attention,\n // Underscore\n 96: codeText // Grave accent\n}\nvar insideSpan = {\n null: [attention, text$1.resolver]\n}\nvar disable = {\n null: []\n}\n\nexports.contentInitial = contentInitial\nexports.disable = disable\nexports.document = document\nexports.flow = flow\nexports.flowInitial = flowInitial\nexports.insideSpan = insideSpan\nexports.string = string\nexports.text = text\n","'use strict'\n\nObject.defineProperty(exports, '__esModule', {value: true})\n\nvar markdownLineEnding = require('../character/markdown-line-ending.js')\nvar factorySpace = require('../tokenize/factory-space.js')\n\nvar tokenize = initializeContent\n\nfunction initializeContent(effects) {\n var contentStart = effects.attempt(\n this.parser.constructs.contentInitial,\n afterContentStartConstruct,\n paragraphInitial\n )\n var previous\n return contentStart\n\n function afterContentStartConstruct(code) {\n if (code === null) {\n effects.consume(code)\n return\n }\n\n effects.enter('lineEnding')\n effects.consume(code)\n effects.exit('lineEnding')\n return factorySpace(effects, contentStart, 'linePrefix')\n }\n\n function paragraphInitial(code) {\n effects.enter('paragraph')\n return lineStart(code)\n }\n\n function lineStart(code) {\n var token = effects.enter('chunkText', {\n contentType: 'text',\n previous: previous\n })\n\n if (previous) {\n previous.next = token\n }\n\n previous = token\n return data(code)\n }\n\n function data(code) {\n if (code === null) {\n effects.exit('chunkText')\n effects.exit('paragraph')\n effects.consume(code)\n return\n }\n\n if (markdownLineEnding(code)) {\n effects.consume(code)\n effects.exit('chunkText')\n return lineStart\n } // Data.\n\n effects.consume(code)\n return data\n }\n}\n\nexports.tokenize = tokenize\n","'use strict'\n\nObject.defineProperty(exports, '__esModule', {value: true})\n\nvar markdownLineEnding = require('../character/markdown-line-ending.js')\nvar factorySpace = require('../tokenize/factory-space.js')\nvar partialBlankLine = require('../tokenize/partial-blank-line.js')\n\nvar tokenize = initializeDocument\nvar containerConstruct = {\n tokenize: tokenizeContainer\n}\nvar lazyFlowConstruct = {\n tokenize: tokenizeLazyFlow\n}\n\nfunction initializeDocument(effects) {\n var self = this\n var stack = []\n var continued = 0\n var inspectConstruct = {\n tokenize: tokenizeInspect,\n partial: true\n }\n var inspectResult\n var childFlow\n var childToken\n return start\n\n function start(code) {\n if (continued < stack.length) {\n self.containerState = stack[continued][1]\n return effects.attempt(\n stack[continued][0].continuation,\n documentContinue,\n documentContinued\n )(code)\n }\n\n return documentContinued(code)\n }\n\n function documentContinue(code) {\n continued++\n return start(code)\n }\n\n function documentContinued(code) {\n // If we’re in a concrete construct (such as when expecting another line of\n // HTML, or we resulted in lazy content), we can immediately start flow.\n if (inspectResult && inspectResult.flowContinue) {\n return flowStart(code)\n }\n\n self.interrupt =\n childFlow &&\n childFlow.currentConstruct &&\n childFlow.currentConstruct.interruptible\n self.containerState = {}\n return effects.attempt(\n containerConstruct,\n containerContinue,\n flowStart\n )(code)\n }\n\n function containerContinue(code) {\n stack.push([self.currentConstruct, self.containerState])\n self.containerState = undefined\n return documentContinued(code)\n }\n\n function flowStart(code) {\n if (code === null) {\n exitContainers(0, true)\n effects.consume(code)\n return\n }\n\n childFlow = childFlow || self.parser.flow(self.now())\n effects.enter('chunkFlow', {\n contentType: 'flow',\n previous: childToken,\n _tokenizer: childFlow\n })\n return flowContinue(code)\n }\n\n function flowContinue(code) {\n if (code === null) {\n continueFlow(effects.exit('chunkFlow'))\n return flowStart(code)\n }\n\n if (markdownLineEnding(code)) {\n effects.consume(code)\n continueFlow(effects.exit('chunkFlow'))\n return effects.check(inspectConstruct, documentAfterPeek)\n }\n\n effects.consume(code)\n return flowContinue\n }\n\n function documentAfterPeek(code) {\n exitContainers(\n inspectResult.continued,\n inspectResult && inspectResult.flowEnd\n )\n continued = 0\n return start(code)\n }\n\n function continueFlow(token) {\n if (childToken) childToken.next = token\n childToken = token\n childFlow.lazy = inspectResult && inspectResult.lazy\n childFlow.defineSkip(token.start)\n childFlow.write(self.sliceStream(token))\n }\n\n function exitContainers(size, end) {\n var index = stack.length // Close the flow.\n\n if (childFlow && end) {\n childFlow.write([null])\n childToken = childFlow = undefined\n } // Exit open containers.\n\n while (index-- > size) {\n self.containerState = stack[index][1]\n stack[index][0].exit.call(self, effects)\n }\n\n stack.length = size\n }\n\n function tokenizeInspect(effects, ok) {\n var subcontinued = 0\n inspectResult = {}\n return inspectStart\n\n function inspectStart(code) {\n if (subcontinued < stack.length) {\n self.containerState = stack[subcontinued][1]\n return effects.attempt(\n stack[subcontinued][0].continuation,\n inspectContinue,\n inspectLess\n )(code)\n } // If we’re continued but in a concrete flow, we can’t have more\n // containers.\n\n if (childFlow.currentConstruct && childFlow.currentConstruct.concrete) {\n inspectResult.flowContinue = true\n return inspectDone(code)\n }\n\n self.interrupt =\n childFlow.currentConstruct && childFlow.currentConstruct.interruptible\n self.containerState = {}\n return effects.attempt(\n containerConstruct,\n inspectFlowEnd,\n inspectDone\n )(code)\n }\n\n function inspectContinue(code) {\n subcontinued++\n return self.containerState._closeFlow\n ? inspectFlowEnd(code)\n : inspectStart(code)\n }\n\n function inspectLess(code) {\n if (childFlow.currentConstruct && childFlow.currentConstruct.lazy) {\n // Maybe another container?\n self.containerState = {}\n return effects.attempt(\n containerConstruct,\n inspectFlowEnd, // Maybe flow, or a blank line?\n effects.attempt(\n lazyFlowConstruct,\n inspectFlowEnd,\n effects.check(partialBlankLine, inspectFlowEnd, inspectLazy)\n )\n )(code)\n } // Otherwise we’re interrupting.\n\n return inspectFlowEnd(code)\n }\n\n function inspectLazy(code) {\n // Act as if all containers are continued.\n subcontinued = stack.length\n inspectResult.lazy = true\n inspectResult.flowContinue = true\n return inspectDone(code)\n } // We’re done with flow if we have more containers, or an interruption.\n\n function inspectFlowEnd(code) {\n inspectResult.flowEnd = true\n return inspectDone(code)\n }\n\n function inspectDone(code) {\n inspectResult.continued = subcontinued\n self.interrupt = self.containerState = undefined\n return ok(code)\n }\n }\n}\n\nfunction tokenizeContainer(effects, ok, nok) {\n return factorySpace(\n effects,\n effects.attempt(this.parser.constructs.document, ok, nok),\n 'linePrefix',\n this.parser.constructs.disable.null.indexOf('codeIndented') > -1\n ? undefined\n : 4\n )\n}\n\nfunction tokenizeLazyFlow(effects, ok, nok) {\n return factorySpace(\n effects,\n effects.lazy(this.parser.constructs.flow, ok, nok),\n 'linePrefix',\n this.parser.constructs.disable.null.indexOf('codeIndented') > -1\n ? undefined\n : 4\n )\n}\n\nexports.tokenize = tokenize\n","'use strict'\n\nObject.defineProperty(exports, '__esModule', {value: true})\n\nvar content = require('../tokenize/content.js')\nvar factorySpace = require('../tokenize/factory-space.js')\nvar partialBlankLine = require('../tokenize/partial-blank-line.js')\n\nvar tokenize = initializeFlow\n\nfunction initializeFlow(effects) {\n var self = this\n var initial = effects.attempt(\n // Try to parse a blank line.\n partialBlankLine,\n atBlankEnding, // Try to parse initial flow (essentially, only code).\n effects.attempt(\n this.parser.constructs.flowInitial,\n afterConstruct,\n factorySpace(\n effects,\n effects.attempt(\n this.parser.constructs.flow,\n afterConstruct,\n effects.attempt(content, afterConstruct)\n ),\n 'linePrefix'\n )\n )\n )\n return initial\n\n function atBlankEnding(code) {\n if (code === null) {\n effects.consume(code)\n return\n }\n\n effects.enter('lineEndingBlank')\n effects.consume(code)\n effects.exit('lineEndingBlank')\n self.currentConstruct = undefined\n return initial\n }\n\n function afterConstruct(code) {\n if (code === null) {\n effects.consume(code)\n return\n }\n\n effects.enter('lineEnding')\n effects.consume(code)\n effects.exit('lineEnding')\n self.currentConstruct = undefined\n return initial\n }\n}\n\nexports.tokenize = tokenize\n","'use strict'\n\nObject.defineProperty(exports, '__esModule', {value: true})\n\nvar assign = require('../constant/assign.js')\nvar shallow = require('../util/shallow.js')\n\nvar text = initializeFactory('text')\nvar string = initializeFactory('string')\nvar resolver = {\n resolveAll: createResolver()\n}\n\nfunction initializeFactory(field) {\n return {\n tokenize: initializeText,\n resolveAll: createResolver(\n field === 'text' ? resolveAllLineSuffixes : undefined\n )\n }\n\n function initializeText(effects) {\n var self = this\n var constructs = this.parser.constructs[field]\n var text = effects.attempt(constructs, start, notText)\n return start\n\n function start(code) {\n return atBreak(code) ? text(code) : notText(code)\n }\n\n function notText(code) {\n if (code === null) {\n effects.consume(code)\n return\n }\n\n effects.enter('data')\n effects.consume(code)\n return data\n }\n\n function data(code) {\n if (atBreak(code)) {\n effects.exit('data')\n return text(code)\n } // Data.\n\n effects.consume(code)\n return data\n }\n\n function atBreak(code) {\n var list = constructs[code]\n var index = -1\n\n if (code === null) {\n return true\n }\n\n if (list) {\n while (++index < list.length) {\n if (\n !list[index].previous ||\n list[index].previous.call(self, self.previous)\n ) {\n return true\n }\n }\n }\n }\n }\n}\n\nfunction createResolver(extraResolver) {\n return resolveAllText\n\n function resolveAllText(events, context) {\n var index = -1\n var enter // A rather boring computation (to merge adjacent `data` events) which\n // improves mm performance by 29%.\n\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\n enter = undefined\n }\n }\n\n return extraResolver ? extraResolver(events, context) : events\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\nfunction resolveAllLineSuffixes(events, context) {\n var eventIndex = -1\n var chunks\n var data\n var chunk\n var index\n var bufferIndex\n var size\n var tabs\n var token\n\n while (++eventIndex <= events.length) {\n if (\n (eventIndex === events.length ||\n events[eventIndex][1].type === 'lineEnding') &&\n events[eventIndex - 1][1].type === 'data'\n ) {\n data = events[eventIndex - 1][1]\n chunks = context.sliceStream(data)\n index = chunks.length\n bufferIndex = -1\n size = 0\n tabs = undefined\n\n while (index--) {\n chunk = chunks[index]\n\n if (typeof chunk === 'string') {\n bufferIndex = chunk.length\n\n while (chunk.charCodeAt(bufferIndex - 1) === 32) {\n size++\n bufferIndex--\n }\n\n if (bufferIndex) break\n bufferIndex = -1\n } // Number\n else if (chunk === -2) {\n tabs = true\n size++\n } else if (chunk === -1);\n else {\n // Replacement character, exit.\n index++\n break\n }\n }\n\n if (size) {\n token = {\n type:\n eventIndex === events.length || tabs || size < 2\n ? 'lineSuffix'\n : 'hardBreakTrailing',\n start: {\n line: data.end.line,\n column: data.end.column - size,\n offset: data.end.offset - size,\n _index: data.start._index + index,\n _bufferIndex: index\n ? bufferIndex\n : data.start._bufferIndex + bufferIndex\n },\n end: shallow(data.end)\n }\n data.end = shallow(token.start)\n\n if (data.start.offset === data.end.offset) {\n assign(data, token)\n } else {\n events.splice(\n eventIndex,\n 0,\n ['enter', token, context],\n ['exit', token, context]\n )\n eventIndex += 2\n }\n }\n\n eventIndex++\n }\n }\n\n return events\n}\n\nexports.resolver = resolver\nexports.string = string\nexports.text = text\n","'use strict'\n\nvar content = require('./initialize/content.js')\nvar document = require('./initialize/document.js')\nvar flow = require('./initialize/flow.js')\nvar text = require('./initialize/text.js')\nvar combineExtensions = require('./util/combine-extensions.js')\nvar createTokenizer = require('./util/create-tokenizer.js')\nvar miniflat = require('./util/miniflat.js')\nvar constructs = require('./constructs.js')\n\nfunction parse(options) {\n var settings = options || {}\n var parser = {\n defined: [],\n constructs: combineExtensions(\n [constructs].concat(miniflat(settings.extensions))\n ),\n content: create(content),\n document: create(document),\n flow: create(flow),\n string: create(text.string),\n text: create(text.text)\n }\n return parser\n\n function create(initializer) {\n return creator\n\n function creator(from) {\n return createTokenizer(parser, initializer, from)\n }\n }\n}\n\nmodule.exports = parse\n","'use strict'\n\nvar subtokenize = require('./util/subtokenize.js')\n\nfunction postprocess(events) {\n while (!subtokenize(events)) {\n // Empty\n }\n\n return events\n}\n\nmodule.exports = postprocess\n","'use strict'\n\nvar search = /[\\0\\t\\n\\r]/g\n\nfunction preprocess() {\n var start = true\n var column = 1\n var buffer = ''\n var atCarriageReturn\n return preprocessor\n\n function preprocessor(value, encoding, end) {\n var chunks = []\n var match\n var next\n var startPosition\n var endPosition\n var code\n value = buffer + value.toString(encoding)\n startPosition = 0\n buffer = ''\n\n if (start) {\n if (value.charCodeAt(0) === 65279) {\n startPosition++\n }\n\n start = undefined\n }\n\n while (startPosition < value.length) {\n search.lastIndex = startPosition\n match = search.exec(value)\n endPosition = match ? match.index : value.length\n code = value.charCodeAt(endPosition)\n\n if (!match) {\n buffer = value.slice(startPosition)\n break\n }\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\n if (startPosition < endPosition) {\n chunks.push(value.slice(startPosition, endPosition))\n column += endPosition - startPosition\n }\n\n if (code === 0) {\n chunks.push(65533)\n column++\n } else if (code === 9) {\n next = Math.ceil(column / 4) * 4\n chunks.push(-2)\n\n while (column++ < next) chunks.push(-1)\n } else if (code === 10) {\n chunks.push(-4)\n column = 1\n } // Must be carriage return.\n else {\n atCarriageReturn = true\n column = 1\n }\n }\n\n startPosition = endPosition + 1\n }\n\n if (end) {\n if (atCarriageReturn) chunks.push(-5)\n if (buffer) chunks.push(buffer)\n chunks.push(null)\n }\n\n return chunks\n }\n}\n\nmodule.exports = preprocess\n","'use strict'\n\nvar chunkedPush = require('../util/chunked-push.js')\nvar chunkedSplice = require('../util/chunked-splice.js')\nvar classifyCharacter = require('../util/classify-character.js')\nvar movePoint = require('../util/move-point.js')\nvar resolveAll = require('../util/resolve-all.js')\nvar shallow = require('../util/shallow.js')\n\nvar attention = {\n name: 'attention',\n tokenize: tokenizeAttention,\n resolveAll: resolveAllAttention\n}\n\nfunction resolveAllAttention(events, context) {\n var index = -1\n var open\n var group\n var text\n var openingSequence\n var closingSequence\n var use\n var nextEvents\n var offset // 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\n while (++index < events.length) {\n // Find a token that can close.\n if (\n events[index][0] === 'enter' &&\n events[index][1].type === 'attentionSequence' &&\n events[index][1]._close\n ) {\n open = index // Now walk back to find an opener.\n\n while (open--) {\n // Find a token that can open the closer.\n if (\n events[open][0] === 'exit' &&\n events[open][1].type === 'attentionSequence' &&\n events[open][1]._open && // If the markers are the same:\n context.sliceSerialize(events[open][1]).charCodeAt(0) ===\n context.sliceSerialize(events[index][1]).charCodeAt(0)\n ) {\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 (\n (events[open][1]._close || events[index][1]._open) &&\n (events[index][1].end.offset - events[index][1].start.offset) % 3 &&\n !(\n (events[open][1].end.offset -\n events[open][1].start.offset +\n events[index][1].end.offset -\n events[index][1].start.offset) %\n 3\n )\n ) {\n continue\n } // Number of markers to use from the sequence.\n\n use =\n events[open][1].end.offset - events[open][1].start.offset > 1 &&\n events[index][1].end.offset - events[index][1].start.offset > 1\n ? 2\n : 1\n openingSequence = {\n type: use > 1 ? 'strongSequence' : 'emphasisSequence',\n start: movePoint(shallow(events[open][1].end), -use),\n end: shallow(events[open][1].end)\n }\n closingSequence = {\n type: use > 1 ? 'strongSequence' : 'emphasisSequence',\n start: shallow(events[index][1].start),\n end: movePoint(shallow(events[index][1].start), use)\n }\n text = {\n type: use > 1 ? 'strongText' : 'emphasisText',\n start: shallow(events[open][1].end),\n end: shallow(events[index][1].start)\n }\n group = {\n type: use > 1 ? 'strong' : 'emphasis',\n start: shallow(openingSequence.start),\n end: shallow(closingSequence.end)\n }\n events[open][1].end = shallow(openingSequence.start)\n events[index][1].start = shallow(closingSequence.end)\n nextEvents = [] // If there are more markers in the opening, add them before.\n\n if (events[open][1].end.offset - events[open][1].start.offset) {\n nextEvents = chunkedPush(nextEvents, [\n ['enter', events[open][1], context],\n ['exit', events[open][1], context]\n ])\n } // Opening.\n\n nextEvents = chunkedPush(nextEvents, [\n ['enter', group, context],\n ['enter', openingSequence, context],\n ['exit', openingSequence, context],\n ['enter', text, context]\n ]) // Between.\n\n nextEvents = chunkedPush(\n nextEvents,\n resolveAll(\n context.parser.constructs.insideSpan.null,\n events.slice(open + 1, index),\n context\n )\n ) // Closing.\n\n nextEvents = chunkedPush(nextEvents, [\n ['exit', text, context],\n ['enter', closingSequence, context],\n ['exit', closingSequence, context],\n ['exit', group, context]\n ]) // If there are more markers in the closing, add them after.\n\n if (events[index][1].end.offset - events[index][1].start.offset) {\n offset = 2\n nextEvents = chunkedPush(nextEvents, [\n ['enter', events[index][1], context],\n ['exit', events[index][1], context]\n ])\n } else {\n offset = 0\n }\n\n chunkedSplice(events, open - 1, index - open + 3, nextEvents)\n index = open + nextEvents.length - offset - 2\n break\n }\n }\n }\n } // Remove remaining sequences.\n\n index = -1\n\n while (++index < events.length) {\n if (events[index][1].type === 'attentionSequence') {\n events[index][1].type = 'data'\n }\n }\n\n return events\n}\n\nfunction tokenizeAttention(effects, ok) {\n var before = classifyCharacter(this.previous)\n var marker\n return start\n\n function start(code) {\n effects.enter('attentionSequence')\n marker = code\n return sequence(code)\n }\n\n function sequence(code) {\n var token\n var after\n var open\n var close\n\n if (code === marker) {\n effects.consume(code)\n return sequence\n }\n\n token = effects.exit('attentionSequence')\n after = classifyCharacter(code)\n open = !after || (after === 2 && before)\n close = !before || (before === 2 && after)\n token._open = marker === 42 ? open : open && (before || !close)\n token._close = marker === 42 ? close : close && (after || !open)\n return ok(code)\n }\n}\n\nmodule.exports = attention\n","'use strict'\n\nvar asciiAlpha = require('../character/ascii-alpha.js')\nvar asciiAlphanumeric = require('../character/ascii-alphanumeric.js')\nvar asciiAtext = require('../character/ascii-atext.js')\nvar asciiControl = require('../character/ascii-control.js')\n\nvar autolink = {\n name: 'autolink',\n tokenize: tokenizeAutolink\n}\n\nfunction tokenizeAutolink(effects, ok, nok) {\n var size = 1\n return start\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 function open(code) {\n if (asciiAlpha(code)) {\n effects.consume(code)\n return schemeOrEmailAtext\n }\n\n return asciiAtext(code) ? emailAtext(code) : nok(code)\n }\n\n function schemeOrEmailAtext(code) {\n return code === 43 || code === 45 || code === 46 || asciiAlphanumeric(code)\n ? schemeInsideOrEmailAtext(code)\n : emailAtext(code)\n }\n\n function schemeInsideOrEmailAtext(code) {\n if (code === 58) {\n effects.consume(code)\n return urlInside\n }\n\n if (\n (code === 43 || code === 45 || code === 46 || asciiAlphanumeric(code)) &&\n size++ < 32\n ) {\n effects.consume(code)\n return schemeInsideOrEmailAtext\n }\n\n return emailAtext(code)\n }\n\n function urlInside(code) {\n if (code === 62) {\n effects.exit('autolinkProtocol')\n return end(code)\n }\n\n if (code === 32 || code === 60 || asciiControl(code)) {\n return nok(code)\n }\n\n effects.consume(code)\n return urlInside\n }\n\n function emailAtext(code) {\n if (code === 64) {\n effects.consume(code)\n size = 0\n return emailAtSignOrDot\n }\n\n if (asciiAtext(code)) {\n effects.consume(code)\n return emailAtext\n }\n\n return nok(code)\n }\n\n function emailAtSignOrDot(code) {\n return asciiAlphanumeric(code) ? emailLabel(code) : nok(code)\n }\n\n function emailLabel(code) {\n if (code === 46) {\n effects.consume(code)\n size = 0\n return emailAtSignOrDot\n }\n\n if (code === 62) {\n // Exit, then change the type.\n effects.exit('autolinkProtocol').type = 'autolinkEmail'\n return end(code)\n }\n\n return emailValue(code)\n }\n\n function emailValue(code) {\n if ((code === 45 || asciiAlphanumeric(code)) && size++ < 63) {\n effects.consume(code)\n return code === 45 ? emailValue : emailLabel\n }\n\n return nok(code)\n }\n\n function end(code) {\n effects.enter('autolinkMarker')\n effects.consume(code)\n effects.exit('autolinkMarker')\n effects.exit('autolink')\n return ok\n }\n}\n\nmodule.exports = autolink\n","'use strict'\n\nvar markdownSpace = require('../character/markdown-space.js')\nvar factorySpace = require('./factory-space.js')\n\nvar blockQuote = {\n name: 'blockQuote',\n tokenize: tokenizeBlockQuoteStart,\n continuation: {\n tokenize: tokenizeBlockQuoteContinuation\n },\n exit: exit\n}\n\nfunction tokenizeBlockQuoteStart(effects, ok, nok) {\n var self = this\n return start\n\n function start(code) {\n if (code === 62) {\n if (!self.containerState.open) {\n effects.enter('blockQuote', {\n _container: true\n })\n self.containerState.open = true\n }\n\n effects.enter('blockQuotePrefix')\n effects.enter('blockQuoteMarker')\n effects.consume(code)\n effects.exit('blockQuoteMarker')\n return after\n }\n\n return nok(code)\n }\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\n effects.exit('blockQuotePrefix')\n return ok(code)\n }\n}\n\nfunction tokenizeBlockQuoteContinuation(effects, ok, nok) {\n return factorySpace(\n effects,\n effects.attempt(blockQuote, ok, nok),\n 'linePrefix',\n this.parser.constructs.disable.null.indexOf('codeIndented') > -1\n ? undefined\n : 4\n )\n}\n\nfunction exit(effects) {\n effects.exit('blockQuote')\n}\n\nmodule.exports = blockQuote\n","'use strict'\n\nvar asciiPunctuation = require('../character/ascii-punctuation.js')\n\nvar characterEscape = {\n name: 'characterEscape',\n tokenize: tokenizeCharacterEscape\n}\n\nfunction tokenizeCharacterEscape(effects, ok, nok) {\n return start\n\n function start(code) {\n effects.enter('characterEscape')\n effects.enter('escapeMarker')\n effects.consume(code)\n effects.exit('escapeMarker')\n return open\n }\n\n function open(code) {\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\n return nok(code)\n }\n}\n\nmodule.exports = characterEscape\n","'use strict'\n\nvar decodeEntity = require('parse-entities/decode-entity.js')\nvar asciiAlphanumeric = require('../character/ascii-alphanumeric.js')\nvar asciiDigit = require('../character/ascii-digit.js')\nvar asciiHexDigit = require('../character/ascii-hex-digit.js')\n\nfunction _interopDefaultLegacy(e) {\n return e && typeof e === 'object' && 'default' in e ? e : {default: e}\n}\n\nvar decodeEntity__default = /*#__PURE__*/ _interopDefaultLegacy(decodeEntity)\n\nvar characterReference = {\n name: 'characterReference',\n tokenize: tokenizeCharacterReference\n}\n\nfunction tokenizeCharacterReference(effects, ok, nok) {\n var self = this\n var size = 0\n var max\n var test\n return start\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 function open(code) {\n if (code === 35) {\n effects.enter('characterReferenceMarkerNumeric')\n effects.consume(code)\n effects.exit('characterReferenceMarkerNumeric')\n return numeric\n }\n\n effects.enter('characterReferenceValue')\n max = 31\n test = asciiAlphanumeric\n return value(code)\n }\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\n effects.enter('characterReferenceValue')\n max = 7\n test = asciiDigit\n return value(code)\n }\n\n function value(code) {\n var token\n\n if (code === 59 && size) {\n token = effects.exit('characterReferenceValue')\n\n if (\n test === asciiAlphanumeric &&\n !decodeEntity__default['default'](self.sliceSerialize(token))\n ) {\n return nok(code)\n }\n\n effects.enter('characterReferenceMarker')\n effects.consume(code)\n effects.exit('characterReferenceMarker')\n effects.exit('characterReference')\n return ok\n }\n\n if (test(code) && size++ < max) {\n effects.consume(code)\n return value\n }\n\n return nok(code)\n }\n}\n\nmodule.exports = characterReference\n","'use strict'\n\nvar markdownLineEnding = require('../character/markdown-line-ending.js')\nvar markdownLineEndingOrSpace = require('../character/markdown-line-ending-or-space.js')\nvar prefixSize = require('../util/prefix-size.js')\nvar factorySpace = require('./factory-space.js')\n\nvar codeFenced = {\n name: 'codeFenced',\n tokenize: tokenizeCodeFenced,\n concrete: true\n}\n\nfunction tokenizeCodeFenced(effects, ok, nok) {\n var self = this\n var closingFenceConstruct = {\n tokenize: tokenizeClosingFence,\n partial: true\n }\n var initialPrefix = prefixSize(this.events, 'linePrefix')\n var sizeOpen = 0\n var marker\n return start\n\n function start(code) {\n effects.enter('codeFenced')\n effects.enter('codeFencedFence')\n effects.enter('codeFencedFenceSequence')\n marker = code\n return sequenceOpen(code)\n }\n\n function sequenceOpen(code) {\n if (code === marker) {\n effects.consume(code)\n sizeOpen++\n return sequenceOpen\n }\n\n effects.exit('codeFencedFenceSequence')\n return sizeOpen < 3\n ? nok(code)\n : factorySpace(effects, infoOpen, 'whitespace')(code)\n }\n\n function infoOpen(code) {\n if (code === null || markdownLineEnding(code)) {\n return openAfter(code)\n }\n\n effects.enter('codeFencedFenceInfo')\n effects.enter('chunkString', {\n contentType: 'string'\n })\n return info(code)\n }\n\n function info(code) {\n if (code === null || markdownLineEndingOrSpace(code)) {\n effects.exit('chunkString')\n effects.exit('codeFencedFenceInfo')\n return factorySpace(effects, infoAfter, 'whitespace')(code)\n }\n\n if (code === 96 && code === marker) return nok(code)\n effects.consume(code)\n return info\n }\n\n function infoAfter(code) {\n if (code === null || markdownLineEnding(code)) {\n return openAfter(code)\n }\n\n effects.enter('codeFencedFenceMeta')\n effects.enter('chunkString', {\n contentType: 'string'\n })\n return meta(code)\n }\n\n function meta(code) {\n if (code === null || markdownLineEnding(code)) {\n effects.exit('chunkString')\n effects.exit('codeFencedFenceMeta')\n return openAfter(code)\n }\n\n if (code === 96 && code === marker) return nok(code)\n effects.consume(code)\n return meta\n }\n\n function openAfter(code) {\n effects.exit('codeFencedFence')\n return self.interrupt ? ok(code) : content(code)\n }\n\n function content(code) {\n if (code === null) {\n return after(code)\n }\n\n if (markdownLineEnding(code)) {\n effects.enter('lineEnding')\n effects.consume(code)\n effects.exit('lineEnding')\n return effects.attempt(\n closingFenceConstruct,\n after,\n initialPrefix\n ? factorySpace(effects, content, 'linePrefix', initialPrefix + 1)\n : content\n )\n }\n\n effects.enter('codeFlowValue')\n return contentContinue(code)\n }\n\n function contentContinue(code) {\n if (code === null || markdownLineEnding(code)) {\n effects.exit('codeFlowValue')\n return content(code)\n }\n\n effects.consume(code)\n return contentContinue\n }\n\n function after(code) {\n effects.exit('codeFenced')\n return ok(code)\n }\n\n function tokenizeClosingFence(effects, ok, nok) {\n var size = 0\n return factorySpace(\n effects,\n closingSequenceStart,\n 'linePrefix',\n this.parser.constructs.disable.null.indexOf('codeIndented') > -1\n ? undefined\n : 4\n )\n\n function closingSequenceStart(code) {\n effects.enter('codeFencedFence')\n effects.enter('codeFencedFenceSequence')\n return closingSequence(code)\n }\n\n function closingSequence(code) {\n if (code === marker) {\n effects.consume(code)\n size++\n return closingSequence\n }\n\n if (size < sizeOpen) return nok(code)\n effects.exit('codeFencedFenceSequence')\n return factorySpace(effects, closingSequenceEnd, 'whitespace')(code)\n }\n\n function closingSequenceEnd(code) {\n if (code === null || markdownLineEnding(code)) {\n effects.exit('codeFencedFence')\n return ok(code)\n }\n\n return nok(code)\n }\n }\n}\n\nmodule.exports = codeFenced\n","'use strict'\n\nvar markdownLineEnding = require('../character/markdown-line-ending.js')\nvar chunkedSplice = require('../util/chunked-splice.js')\nvar prefixSize = require('../util/prefix-size.js')\nvar factorySpace = require('./factory-space.js')\n\nvar codeIndented = {\n name: 'codeIndented',\n tokenize: tokenizeCodeIndented,\n resolve: resolveCodeIndented\n}\nvar indentedContentConstruct = {\n tokenize: tokenizeIndentedContent,\n partial: true\n}\n\nfunction resolveCodeIndented(events, context) {\n var code = {\n type: 'codeIndented',\n start: events[0][1].start,\n end: events[events.length - 1][1].end\n }\n chunkedSplice(events, 0, 0, [['enter', code, context]])\n chunkedSplice(events, events.length, 0, [['exit', code, context]])\n return events\n}\n\nfunction tokenizeCodeIndented(effects, ok, nok) {\n return effects.attempt(indentedContentConstruct, afterPrefix, nok)\n\n function afterPrefix(code) {\n if (code === null) {\n return ok(code)\n }\n\n if (markdownLineEnding(code)) {\n return effects.attempt(indentedContentConstruct, afterPrefix, ok)(code)\n }\n\n effects.enter('codeFlowValue')\n return content(code)\n }\n\n function content(code) {\n if (code === null || markdownLineEnding(code)) {\n effects.exit('codeFlowValue')\n return afterPrefix(code)\n }\n\n effects.consume(code)\n return content\n }\n}\n\nfunction tokenizeIndentedContent(effects, ok, nok) {\n var self = this\n return factorySpace(effects, afterPrefix, 'linePrefix', 4 + 1)\n\n function afterPrefix(code) {\n if (markdownLineEnding(code)) {\n effects.enter('lineEnding')\n effects.consume(code)\n effects.exit('lineEnding')\n return factorySpace(effects, afterPrefix, 'linePrefix', 4 + 1)\n }\n\n return prefixSize(self.events, 'linePrefix') < 4 ? nok(code) : ok(code)\n }\n}\n\nmodule.exports = codeIndented\n","'use strict'\n\nvar markdownLineEnding = require('../character/markdown-line-ending.js')\n\nvar codeText = {\n name: 'codeText',\n tokenize: tokenizeCodeText,\n resolve: resolveCodeText,\n previous: previous\n}\n\nfunction resolveCodeText(events) {\n var tailExitIndex = events.length - 4\n var headEnterIndex = 3\n var index\n var enter // If we start and end with an EOL or a space.\n\n if (\n (events[headEnterIndex][1].type === 'lineEnding' ||\n events[headEnterIndex][1].type === 'space') &&\n (events[tailExitIndex][1].type === 'lineEnding' ||\n events[tailExitIndex][1].type === 'space')\n ) {\n index = headEnterIndex // And we have data.\n\n while (++index < tailExitIndex) {\n if (events[index][1].type === 'codeTextData') {\n // Then we have padding.\n events[tailExitIndex][1].type = events[headEnterIndex][1].type =\n 'codeTextPadding'\n headEnterIndex += 2\n tailExitIndex -= 2\n break\n }\n }\n } // Merge adjacent spaces and data.\n\n index = headEnterIndex - 1\n tailExitIndex++\n\n while (++index <= tailExitIndex) {\n if (enter === undefined) {\n if (index !== tailExitIndex && events[index][1].type !== 'lineEnding') {\n enter = index\n }\n } else if (\n index === tailExitIndex ||\n events[index][1].type === 'lineEnding'\n ) {\n events[enter][1].type = 'codeTextData'\n\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\n enter = undefined\n }\n }\n\n return events\n}\n\nfunction previous(code) {\n // If there is a previous code, there will always be a tail.\n return (\n code !== 96 ||\n this.events[this.events.length - 1][1].type === 'characterEscape'\n )\n}\n\nfunction tokenizeCodeText(effects, ok, nok) {\n var sizeOpen = 0\n var size\n var token\n return start\n\n function start(code) {\n effects.enter('codeText')\n effects.enter('codeTextSequence')\n return openingSequence(code)\n }\n\n function openingSequence(code) {\n if (code === 96) {\n effects.consume(code)\n sizeOpen++\n return openingSequence\n }\n\n effects.exit('codeTextSequence')\n return gap(code)\n }\n\n function gap(code) {\n // EOF.\n if (code === null) {\n return nok(code)\n } // Closing fence?\n // Could also be data.\n\n if (code === 96) {\n token = effects.enter('codeTextSequence')\n size = 0\n return closingSequence(code)\n } // Tabs don’t work, and virtual spaces don’t make sense.\n\n if (code === 32) {\n effects.enter('space')\n effects.consume(code)\n effects.exit('space')\n return gap\n }\n\n if (markdownLineEnding(code)) {\n effects.enter('lineEnding')\n effects.consume(code)\n effects.exit('lineEnding')\n return gap\n } // Data.\n\n effects.enter('codeTextData')\n return data(code)\n } // In code.\n\n function data(code) {\n if (\n code === null ||\n code === 32 ||\n code === 96 ||\n markdownLineEnding(code)\n ) {\n effects.exit('codeTextData')\n return gap(code)\n }\n\n effects.consume(code)\n return data\n } // Closing fence.\n\n function closingSequence(code) {\n // More.\n if (code === 96) {\n effects.consume(code)\n size++\n return closingSequence\n } // Done!\n\n if (size === sizeOpen) {\n effects.exit('codeTextSequence')\n effects.exit('codeText')\n return ok(code)\n } // More or less accents: mark as data.\n\n token.type = 'codeTextData'\n return data(code)\n }\n}\n\nmodule.exports = codeText\n","'use strict'\n\nvar markdownLineEnding = require('../character/markdown-line-ending.js')\nvar prefixSize = require('../util/prefix-size.js')\nvar subtokenize = require('../util/subtokenize.js')\nvar factorySpace = require('./factory-space.js')\n\n// No name because it must not be turned off.\nvar content = {\n tokenize: tokenizeContent,\n resolve: resolveContent,\n interruptible: true,\n lazy: true\n}\nvar continuationConstruct = {\n tokenize: tokenizeContinuation,\n partial: true\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\nfunction resolveContent(events) {\n subtokenize(events)\n return events\n}\n\nfunction tokenizeContent(effects, ok) {\n var previous\n return start\n\n function start(code) {\n effects.enter('content')\n previous = effects.enter('chunkContent', {\n contentType: 'content'\n })\n return data(code)\n }\n\n function data(code) {\n if (code === null) {\n return contentEnd(code)\n }\n\n if (markdownLineEnding(code)) {\n return effects.check(\n continuationConstruct,\n contentContinue,\n contentEnd\n )(code)\n } // Data.\n\n effects.consume(code)\n return data\n }\n\n function contentEnd(code) {\n effects.exit('chunkContent')\n effects.exit('content')\n return ok(code)\n }\n\n function contentContinue(code) {\n effects.consume(code)\n effects.exit('chunkContent')\n previous = previous.next = effects.enter('chunkContent', {\n contentType: 'content',\n previous: previous\n })\n return data\n }\n}\n\nfunction tokenizeContinuation(effects, ok, nok) {\n var self = this\n return startLookahead\n\n function startLookahead(code) {\n effects.enter('lineEnding')\n effects.consume(code)\n effects.exit('lineEnding')\n return factorySpace(effects, prefixed, 'linePrefix')\n }\n\n function prefixed(code) {\n if (code === null || markdownLineEnding(code)) {\n return nok(code)\n }\n\n if (\n self.parser.constructs.disable.null.indexOf('codeIndented') > -1 ||\n prefixSize(self.events, 'linePrefix') < 4\n ) {\n return effects.interrupt(self.parser.constructs.flow, nok, ok)(code)\n }\n\n return ok(code)\n }\n}\n\nmodule.exports = content\n","'use strict'\n\nvar markdownLineEnding = require('../character/markdown-line-ending.js')\nvar markdownLineEndingOrSpace = require('../character/markdown-line-ending-or-space.js')\nvar normalizeIdentifier = require('../util/normalize-identifier.js')\nvar factoryDestination = require('./factory-destination.js')\nvar factoryLabel = require('./factory-label.js')\nvar factorySpace = require('./factory-space.js')\nvar factoryWhitespace = require('./factory-whitespace.js')\nvar factoryTitle = require('./factory-title.js')\n\nvar definition = {\n name: 'definition',\n tokenize: tokenizeDefinition\n}\nvar titleConstruct = {\n tokenize: tokenizeTitle,\n partial: true\n}\n\nfunction tokenizeDefinition(effects, ok, nok) {\n var self = this\n var identifier\n return start\n\n function start(code) {\n effects.enter('definition')\n return factoryLabel.call(\n self,\n effects,\n labelAfter,\n nok,\n 'definitionLabel',\n 'definitionLabelMarker',\n 'definitionLabelString'\n )(code)\n }\n\n function labelAfter(code) {\n identifier = normalizeIdentifier(\n self.sliceSerialize(self.events[self.events.length - 1][1]).slice(1, -1)\n )\n\n if (code === 58) {\n effects.enter('definitionMarker')\n effects.consume(code)\n effects.exit('definitionMarker') // Note: blank lines can’t exist in content.\n\n return factoryWhitespace(\n effects,\n factoryDestination(\n effects,\n effects.attempt(\n titleConstruct,\n factorySpace(effects, after, 'whitespace'),\n factorySpace(effects, after, 'whitespace')\n ),\n nok,\n 'definitionDestination',\n 'definitionDestinationLiteral',\n 'definitionDestinationLiteralMarker',\n 'definitionDestinationRaw',\n 'definitionDestinationString'\n )\n )\n }\n\n return nok(code)\n }\n\n function after(code) {\n if (code === null || markdownLineEnding(code)) {\n effects.exit('definition')\n\n if (self.parser.defined.indexOf(identifier) < 0) {\n self.parser.defined.push(identifier)\n }\n\n return ok(code)\n }\n\n return nok(code)\n }\n}\n\nfunction tokenizeTitle(effects, ok, nok) {\n return start\n\n function start(code) {\n return markdownLineEndingOrSpace(code)\n ? factoryWhitespace(effects, before)(code)\n : nok(code)\n }\n\n function before(code) {\n if (code === 34 || code === 39 || code === 40) {\n return factoryTitle(\n effects,\n factorySpace(effects, after, 'whitespace'),\n nok,\n 'definitionTitle',\n 'definitionTitleMarker',\n 'definitionTitleString'\n )(code)\n }\n\n return nok(code)\n }\n\n function after(code) {\n return code === null || markdownLineEnding(code) ? ok(code) : nok(code)\n }\n}\n\nmodule.exports = definition\n","'use strict'\n\nvar asciiControl = require('../character/ascii-control.js')\nvar markdownLineEndingOrSpace = require('../character/markdown-line-ending-or-space.js')\nvar markdownLineEnding = require('../character/markdown-line-ending.js')\n\n// eslint-disable-next-line max-params\nfunction destinationFactory(\n effects,\n ok,\n nok,\n type,\n literalType,\n literalMarkerType,\n rawType,\n stringType,\n max\n) {\n var limit = max || Infinity\n var balance = 0\n return start\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 destinationEnclosedBefore\n }\n\n if (asciiControl(code) || code === 41) {\n return nok(code)\n }\n\n effects.enter(type)\n effects.enter(rawType)\n effects.enter(stringType)\n effects.enter('chunkString', {\n contentType: 'string'\n })\n return destinationRaw(code)\n }\n\n function destinationEnclosedBefore(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\n effects.enter(stringType)\n effects.enter('chunkString', {\n contentType: 'string'\n })\n return destinationEnclosed(code)\n }\n\n function destinationEnclosed(code) {\n if (code === 62) {\n effects.exit('chunkString')\n effects.exit(stringType)\n return destinationEnclosedBefore(code)\n }\n\n if (code === null || code === 60 || markdownLineEnding(code)) {\n return nok(code)\n }\n\n effects.consume(code)\n return code === 92 ? destinationEnclosedEscape : destinationEnclosed\n }\n\n function destinationEnclosedEscape(code) {\n if (code === 60 || code === 62 || code === 92) {\n effects.consume(code)\n return destinationEnclosed\n }\n\n return destinationEnclosed(code)\n }\n\n function destinationRaw(code) {\n if (code === 40) {\n if (++balance > limit) return nok(code)\n effects.consume(code)\n return destinationRaw\n }\n\n if (code === 41) {\n if (!balance--) {\n effects.exit('chunkString')\n effects.exit(stringType)\n effects.exit(rawType)\n effects.exit(type)\n return ok(code)\n }\n\n effects.consume(code)\n return destinationRaw\n }\n\n if (code === null || markdownLineEndingOrSpace(code)) {\n if (balance) return nok(code)\n effects.exit('chunkString')\n effects.exit(stringType)\n effects.exit(rawType)\n effects.exit(type)\n return ok(code)\n }\n\n if (asciiControl(code)) return nok(code)\n effects.consume(code)\n return code === 92 ? destinationRawEscape : destinationRaw\n }\n\n function destinationRawEscape(code) {\n if (code === 40 || code === 41 || code === 92) {\n effects.consume(code)\n return destinationRaw\n }\n\n return destinationRaw(code)\n }\n}\n\nmodule.exports = destinationFactory\n","'use strict'\n\nvar markdownLineEnding = require('../character/markdown-line-ending.js')\nvar markdownSpace = require('../character/markdown-space.js')\n\n// eslint-disable-next-line max-params\nfunction labelFactory(effects, ok, nok, type, markerType, stringType) {\n var self = this\n var size = 0\n var data\n return start\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 function atBreak(code) {\n if (\n code === null ||\n code === 91 ||\n (code === 93 && !data) ||\n /* c8 ignore next */\n (code === 94 &&\n /* c8 ignore next */\n !size &&\n /* c8 ignore next */\n '_hiddenFootnoteSupport' in self.parser.constructs) ||\n size > 999\n ) {\n return nok(code)\n }\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 if (markdownLineEnding(code)) {\n effects.enter('lineEnding')\n effects.consume(code)\n effects.exit('lineEnding')\n return atBreak\n }\n\n effects.enter('chunkString', {\n contentType: 'string'\n })\n return label(code)\n }\n\n function label(code) {\n if (\n code === null ||\n code === 91 ||\n code === 93 ||\n markdownLineEnding(code) ||\n size++ > 999\n ) {\n effects.exit('chunkString')\n return atBreak(code)\n }\n\n effects.consume(code)\n data = data || !markdownSpace(code)\n return code === 92 ? labelEscape : label\n }\n\n function labelEscape(code) {\n if (code === 91 || code === 92 || code === 93) {\n effects.consume(code)\n size++\n return label\n }\n\n return label(code)\n }\n}\n\nmodule.exports = labelFactory\n","'use strict'\n\nvar markdownSpace = require('../character/markdown-space.js')\n\nfunction spaceFactory(effects, ok, type, max) {\n var limit = max ? max - 1 : Infinity\n var size = 0\n return start\n\n function start(code) {\n if (markdownSpace(code)) {\n effects.enter(type)\n return prefix(code)\n }\n\n return ok(code)\n }\n\n function prefix(code) {\n if (markdownSpace(code) && size++ < limit) {\n effects.consume(code)\n return prefix\n }\n\n effects.exit(type)\n return ok(code)\n }\n}\n\nmodule.exports = spaceFactory\n","'use strict'\n\nvar markdownLineEnding = require('../character/markdown-line-ending.js')\nvar factorySpace = require('./factory-space.js')\n\nfunction titleFactory(effects, ok, nok, type, markerType, stringType) {\n var marker\n return start\n\n function start(code) {\n effects.enter(type)\n effects.enter(markerType)\n effects.consume(code)\n effects.exit(markerType)\n marker = code === 40 ? 41 : code\n return atFirstTitleBreak\n }\n\n function atFirstTitleBreak(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\n effects.enter(stringType)\n return atTitleBreak(code)\n }\n\n function atTitleBreak(code) {\n if (code === marker) {\n effects.exit(stringType)\n return atFirstTitleBreak(marker)\n }\n\n if (code === null) {\n return nok(code)\n } // Note: blank lines can’t exist in content.\n\n if (markdownLineEnding(code)) {\n effects.enter('lineEnding')\n effects.consume(code)\n effects.exit('lineEnding')\n return factorySpace(effects, atTitleBreak, 'linePrefix')\n }\n\n effects.enter('chunkString', {\n contentType: 'string'\n })\n return title(code)\n }\n\n function title(code) {\n if (code === marker || code === null || markdownLineEnding(code)) {\n effects.exit('chunkString')\n return atTitleBreak(code)\n }\n\n effects.consume(code)\n return code === 92 ? titleEscape : title\n }\n\n function titleEscape(code) {\n if (code === marker || code === 92) {\n effects.consume(code)\n return title\n }\n\n return title(code)\n }\n}\n\nmodule.exports = titleFactory\n","'use strict'\n\nvar markdownLineEnding = require('../character/markdown-line-ending.js')\nvar markdownSpace = require('../character/markdown-space.js')\nvar factorySpace = require('./factory-space.js')\n\nfunction whitespaceFactory(effects, ok) {\n var seen\n return start\n\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\n if (markdownSpace(code)) {\n return factorySpace(\n effects,\n start,\n seen ? 'linePrefix' : 'lineSuffix'\n )(code)\n }\n\n return ok(code)\n }\n}\n\nmodule.exports = whitespaceFactory\n","'use strict'\n\nvar markdownLineEnding = require('../character/markdown-line-ending.js')\n\nvar hardBreakEscape = {\n name: 'hardBreakEscape',\n tokenize: tokenizeHardBreakEscape\n}\n\nfunction tokenizeHardBreakEscape(effects, ok, nok) {\n return start\n\n function start(code) {\n effects.enter('hardBreakEscape')\n effects.enter('escapeMarker')\n effects.consume(code)\n return open\n }\n\n function open(code) {\n if (markdownLineEnding(code)) {\n effects.exit('escapeMarker')\n effects.exit('hardBreakEscape')\n return ok(code)\n }\n\n return nok(code)\n }\n}\n\nmodule.exports = hardBreakEscape\n","'use strict'\n\nvar markdownLineEnding = require('../character/markdown-line-ending.js')\nvar markdownLineEndingOrSpace = require('../character/markdown-line-ending-or-space.js')\nvar markdownSpace = require('../character/markdown-space.js')\nvar chunkedSplice = require('../util/chunked-splice.js')\nvar factorySpace = require('./factory-space.js')\n\nvar headingAtx = {\n name: 'headingAtx',\n tokenize: tokenizeHeadingAtx,\n resolve: resolveHeadingAtx\n}\n\nfunction resolveHeadingAtx(events, context) {\n var contentEnd = events.length - 2\n var contentStart = 3\n var content\n var text // Prefix whitespace, part of the opening.\n\n if (events[contentStart][1].type === 'whitespace') {\n contentStart += 2\n } // Suffix whitespace, part of the closing.\n\n if (\n contentEnd - 2 > contentStart &&\n events[contentEnd][1].type === 'whitespace'\n ) {\n contentEnd -= 2\n }\n\n if (\n events[contentEnd][1].type === 'atxHeadingSequence' &&\n (contentStart === contentEnd - 1 ||\n (contentEnd - 4 > contentStart &&\n events[contentEnd - 2][1].type === 'whitespace'))\n ) {\n contentEnd -= contentStart + 1 === contentEnd ? 2 : 4\n }\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 chunkedSplice(events, contentStart, contentEnd - contentStart + 1, [\n ['enter', content, context],\n ['enter', text, context],\n ['exit', text, context],\n ['exit', content, context]\n ])\n }\n\n return events\n}\n\nfunction tokenizeHeadingAtx(effects, ok, nok) {\n var self = this\n var size = 0\n return start\n\n function start(code) {\n effects.enter('atxHeading')\n effects.enter('atxHeadingSequence')\n return fenceOpenInside(code)\n }\n\n function fenceOpenInside(code) {\n if (code === 35 && size++ < 6) {\n effects.consume(code)\n return fenceOpenInside\n }\n\n if (code === null || markdownLineEndingOrSpace(code)) {\n effects.exit('atxHeadingSequence')\n return self.interrupt ? ok(code) : headingBreak(code)\n }\n\n return nok(code)\n }\n\n function headingBreak(code) {\n if (code === 35) {\n effects.enter('atxHeadingSequence')\n return sequence(code)\n }\n\n if (code === null || markdownLineEnding(code)) {\n effects.exit('atxHeading')\n return ok(code)\n }\n\n if (markdownSpace(code)) {\n return factorySpace(effects, headingBreak, 'whitespace')(code)\n }\n\n effects.enter('atxHeadingText')\n return data(code)\n }\n\n function sequence(code) {\n if (code === 35) {\n effects.consume(code)\n return sequence\n }\n\n effects.exit('atxHeadingSequence')\n return headingBreak(code)\n }\n\n function data(code) {\n if (code === null || code === 35 || markdownLineEndingOrSpace(code)) {\n effects.exit('atxHeadingText')\n return headingBreak(code)\n }\n\n effects.consume(code)\n return data\n }\n}\n\nmodule.exports = headingAtx\n","'use strict'\n\nvar asciiAlpha = require('../character/ascii-alpha.js')\nvar asciiAlphanumeric = require('../character/ascii-alphanumeric.js')\nvar markdownLineEnding = require('../character/markdown-line-ending.js')\nvar markdownLineEndingOrSpace = require('../character/markdown-line-ending-or-space.js')\nvar markdownSpace = require('../character/markdown-space.js')\nvar fromCharCode = require('../constant/from-char-code.js')\nvar htmlBlockNames = require('../constant/html-block-names.js')\nvar htmlRawNames = require('../constant/html-raw-names.js')\nvar partialBlankLine = require('./partial-blank-line.js')\n\nvar htmlFlow = {\n name: 'htmlFlow',\n tokenize: tokenizeHtmlFlow,\n resolveTo: resolveToHtmlFlow,\n concrete: true\n}\nvar nextBlankConstruct = {\n tokenize: tokenizeNextBlank,\n partial: true\n}\n\nfunction resolveToHtmlFlow(events) {\n var index = events.length\n\n while (index--) {\n if (events[index][0] === 'enter' && events[index][1].type === 'htmlFlow') {\n break\n }\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 // Add the prefix start to the HTML line token.\n\n events[index + 1][1].start = events[index - 2][1].start // Remove the line prefix.\n\n events.splice(index - 2, 2)\n }\n\n return events\n}\n\nfunction tokenizeHtmlFlow(effects, ok, nok) {\n var self = this\n var kind\n var startTag\n var buffer\n var index\n var marker\n return start\n\n function start(code) {\n effects.enter('htmlFlow')\n effects.enter('htmlFlowData')\n effects.consume(code)\n return open\n }\n\n function open(code) {\n if (code === 33) {\n effects.consume(code)\n return declarationStart\n }\n\n if (code === 47) {\n effects.consume(code)\n return tagCloseStart\n }\n\n if (code === 63) {\n effects.consume(code)\n kind = 3 // 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\n return self.interrupt ? ok : continuationDeclarationInside\n }\n\n if (asciiAlpha(code)) {\n effects.consume(code)\n buffer = fromCharCode(code)\n startTag = true\n return tagName\n }\n\n return nok(code)\n }\n\n function declarationStart(code) {\n if (code === 45) {\n effects.consume(code)\n kind = 2\n return commentOpenInside\n }\n\n if (code === 91) {\n effects.consume(code)\n kind = 5\n buffer = 'CDATA['\n index = 0\n return cdataOpenInside\n }\n\n if (asciiAlpha(code)) {\n effects.consume(code)\n kind = 4\n return self.interrupt ? ok : continuationDeclarationInside\n }\n\n return nok(code)\n }\n\n function commentOpenInside(code) {\n if (code === 45) {\n effects.consume(code)\n return self.interrupt ? ok : continuationDeclarationInside\n }\n\n return nok(code)\n }\n\n function cdataOpenInside(code) {\n if (code === buffer.charCodeAt(index++)) {\n effects.consume(code)\n return index === buffer.length\n ? self.interrupt\n ? ok\n : continuation\n : cdataOpenInside\n }\n\n return nok(code)\n }\n\n function tagCloseStart(code) {\n if (asciiAlpha(code)) {\n effects.consume(code)\n buffer = fromCharCode(code)\n return tagName\n }\n\n return nok(code)\n }\n\n function tagName(code) {\n if (\n code === null ||\n code === 47 ||\n code === 62 ||\n markdownLineEndingOrSpace(code)\n ) {\n if (\n code !== 47 &&\n startTag &&\n htmlRawNames.indexOf(buffer.toLowerCase()) > -1\n ) {\n kind = 1\n return self.interrupt ? ok(code) : continuation(code)\n }\n\n if (htmlBlockNames.indexOf(buffer.toLowerCase()) > -1) {\n kind = 6\n\n if (code === 47) {\n effects.consume(code)\n return basicSelfClosing\n }\n\n return self.interrupt ? ok(code) : continuation(code)\n }\n\n kind = 7 // Do not support complete HTML when interrupting.\n\n return self.interrupt\n ? nok(code)\n : startTag\n ? completeAttributeNameBefore(code)\n : completeClosingTagAfter(code)\n }\n\n if (code === 45 || asciiAlphanumeric(code)) {\n effects.consume(code)\n buffer += fromCharCode(code)\n return tagName\n }\n\n return nok(code)\n }\n\n function basicSelfClosing(code) {\n if (code === 62) {\n effects.consume(code)\n return self.interrupt ? ok : continuation\n }\n\n return nok(code)\n }\n\n function completeClosingTagAfter(code) {\n if (markdownSpace(code)) {\n effects.consume(code)\n return completeClosingTagAfter\n }\n\n return completeEnd(code)\n }\n\n function completeAttributeNameBefore(code) {\n if (code === 47) {\n effects.consume(code)\n return completeEnd\n }\n\n if (code === 58 || code === 95 || asciiAlpha(code)) {\n effects.consume(code)\n return completeAttributeName\n }\n\n if (markdownSpace(code)) {\n effects.consume(code)\n return completeAttributeNameBefore\n }\n\n return completeEnd(code)\n }\n\n function completeAttributeName(code) {\n if (\n code === 45 ||\n code === 46 ||\n code === 58 ||\n code === 95 ||\n asciiAlphanumeric(code)\n ) {\n effects.consume(code)\n return completeAttributeName\n }\n\n return completeAttributeNameAfter(code)\n }\n\n function completeAttributeNameAfter(code) {\n if (code === 61) {\n effects.consume(code)\n return completeAttributeValueBefore\n }\n\n if (markdownSpace(code)) {\n effects.consume(code)\n return completeAttributeNameAfter\n }\n\n return completeAttributeNameBefore(code)\n }\n\n function completeAttributeValueBefore(code) {\n if (\n code === null ||\n code === 60 ||\n code === 61 ||\n code === 62 ||\n code === 96\n ) {\n return nok(code)\n }\n\n if (code === 34 || code === 39) {\n effects.consume(code)\n marker = code\n return completeAttributeValueQuoted\n }\n\n if (markdownSpace(code)) {\n effects.consume(code)\n return completeAttributeValueBefore\n }\n\n marker = undefined\n return completeAttributeValueUnquoted(code)\n }\n\n function completeAttributeValueQuoted(code) {\n if (code === marker) {\n effects.consume(code)\n return completeAttributeValueQuotedAfter\n }\n\n if (code === null || markdownLineEnding(code)) {\n return nok(code)\n }\n\n effects.consume(code)\n return completeAttributeValueQuoted\n }\n\n function completeAttributeValueUnquoted(code) {\n if (\n code === null ||\n code === 34 ||\n code === 39 ||\n code === 60 ||\n code === 61 ||\n code === 62 ||\n code === 96 ||\n markdownLineEndingOrSpace(code)\n ) {\n return completeAttributeNameAfter(code)\n }\n\n effects.consume(code)\n return completeAttributeValueUnquoted\n }\n\n function completeAttributeValueQuotedAfter(code) {\n if (code === 47 || code === 62 || markdownSpace(code)) {\n return completeAttributeNameBefore(code)\n }\n\n return nok(code)\n }\n\n function completeEnd(code) {\n if (code === 62) {\n effects.consume(code)\n return completeAfter\n }\n\n return nok(code)\n }\n\n function completeAfter(code) {\n if (markdownSpace(code)) {\n effects.consume(code)\n return completeAfter\n }\n\n return code === null || markdownLineEnding(code)\n ? continuation(code)\n : nok(code)\n }\n\n function continuation(code) {\n if (code === 45 && kind === 2) {\n effects.consume(code)\n return continuationCommentInside\n }\n\n if (code === 60 && kind === 1) {\n effects.consume(code)\n return continuationRawTagOpen\n }\n\n if (code === 62 && kind === 4) {\n effects.consume(code)\n return continuationClose\n }\n\n if (code === 63 && kind === 3) {\n effects.consume(code)\n return continuationDeclarationInside\n }\n\n if (code === 93 && kind === 5) {\n effects.consume(code)\n return continuationCharacterDataInside\n }\n\n if (markdownLineEnding(code) && (kind === 6 || kind === 7)) {\n return effects.check(\n nextBlankConstruct,\n continuationClose,\n continuationAtLineEnding\n )(code)\n }\n\n if (code === null || markdownLineEnding(code)) {\n return continuationAtLineEnding(code)\n }\n\n effects.consume(code)\n return continuation\n }\n\n function continuationAtLineEnding(code) {\n effects.exit('htmlFlowData')\n return htmlContinueStart(code)\n }\n\n function htmlContinueStart(code) {\n if (code === null) {\n return done(code)\n }\n\n if (markdownLineEnding(code)) {\n effects.enter('lineEnding')\n effects.consume(code)\n effects.exit('lineEnding')\n return htmlContinueStart\n }\n\n effects.enter('htmlFlowData')\n return continuation(code)\n }\n\n function continuationCommentInside(code) {\n if (code === 45) {\n effects.consume(code)\n return continuationDeclarationInside\n }\n\n return continuation(code)\n }\n\n function continuationRawTagOpen(code) {\n if (code === 47) {\n effects.consume(code)\n buffer = ''\n return continuationRawEndTag\n }\n\n return continuation(code)\n }\n\n function continuationRawEndTag(code) {\n if (code === 62 && htmlRawNames.indexOf(buffer.toLowerCase()) > -1) {\n effects.consume(code)\n return continuationClose\n }\n\n if (asciiAlpha(code) && buffer.length < 8) {\n effects.consume(code)\n buffer += fromCharCode(code)\n return continuationRawEndTag\n }\n\n return continuation(code)\n }\n\n function continuationCharacterDataInside(code) {\n if (code === 93) {\n effects.consume(code)\n return continuationDeclarationInside\n }\n\n return continuation(code)\n }\n\n function continuationDeclarationInside(code) {\n if (code === 62) {\n effects.consume(code)\n return continuationClose\n }\n\n return continuation(code)\n }\n\n function continuationClose(code) {\n if (code === null || markdownLineEnding(code)) {\n effects.exit('htmlFlowData')\n return done(code)\n }\n\n effects.consume(code)\n return continuationClose\n }\n\n function done(code) {\n effects.exit('htmlFlow')\n return ok(code)\n }\n}\n\nfunction tokenizeNextBlank(effects, ok, nok) {\n return start\n\n function start(code) {\n effects.exit('htmlFlowData')\n effects.enter('lineEndingBlank')\n effects.consume(code)\n effects.exit('lineEndingBlank')\n return effects.attempt(partialBlankLine, ok, nok)\n }\n}\n\nmodule.exports = htmlFlow\n","'use strict'\n\nvar asciiAlpha = require('../character/ascii-alpha.js')\nvar asciiAlphanumeric = require('../character/ascii-alphanumeric.js')\nvar markdownLineEnding = require('../character/markdown-line-ending.js')\nvar markdownLineEndingOrSpace = require('../character/markdown-line-ending-or-space.js')\nvar markdownSpace = require('../character/markdown-space.js')\nvar factorySpace = require('./factory-space.js')\n\nvar htmlText = {\n name: 'htmlText',\n tokenize: tokenizeHtmlText\n}\n\nfunction tokenizeHtmlText(effects, ok, nok) {\n var self = this\n var marker\n var buffer\n var index\n var returnState\n return start\n\n function start(code) {\n effects.enter('htmlText')\n effects.enter('htmlTextData')\n effects.consume(code)\n return open\n }\n\n function open(code) {\n if (code === 33) {\n effects.consume(code)\n return declarationOpen\n }\n\n if (code === 47) {\n effects.consume(code)\n return tagCloseStart\n }\n\n if (code === 63) {\n effects.consume(code)\n return instruction\n }\n\n if (asciiAlpha(code)) {\n effects.consume(code)\n return tagOpen\n }\n\n return nok(code)\n }\n\n function declarationOpen(code) {\n if (code === 45) {\n effects.consume(code)\n return commentOpen\n }\n\n if (code === 91) {\n effects.consume(code)\n buffer = 'CDATA['\n index = 0\n return cdataOpen\n }\n\n if (asciiAlpha(code)) {\n effects.consume(code)\n return declaration\n }\n\n return nok(code)\n }\n\n function commentOpen(code) {\n if (code === 45) {\n effects.consume(code)\n return commentStart\n }\n\n return nok(code)\n }\n\n function commentStart(code) {\n if (code === null || code === 62) {\n return nok(code)\n }\n\n if (code === 45) {\n effects.consume(code)\n return commentStartDash\n }\n\n return comment(code)\n }\n\n function commentStartDash(code) {\n if (code === null || code === 62) {\n return nok(code)\n }\n\n return comment(code)\n }\n\n function comment(code) {\n if (code === null) {\n return nok(code)\n }\n\n if (code === 45) {\n effects.consume(code)\n return commentClose\n }\n\n if (markdownLineEnding(code)) {\n returnState = comment\n return atLineEnding(code)\n }\n\n effects.consume(code)\n return comment\n }\n\n function commentClose(code) {\n if (code === 45) {\n effects.consume(code)\n return end\n }\n\n return comment(code)\n }\n\n function cdataOpen(code) {\n if (code === buffer.charCodeAt(index++)) {\n effects.consume(code)\n return index === buffer.length ? cdata : cdataOpen\n }\n\n return nok(code)\n }\n\n function cdata(code) {\n if (code === null) {\n return nok(code)\n }\n\n if (code === 93) {\n effects.consume(code)\n return cdataClose\n }\n\n if (markdownLineEnding(code)) {\n returnState = cdata\n return atLineEnding(code)\n }\n\n effects.consume(code)\n return cdata\n }\n\n function cdataClose(code) {\n if (code === 93) {\n effects.consume(code)\n return cdataEnd\n }\n\n return cdata(code)\n }\n\n function cdataEnd(code) {\n if (code === 62) {\n return end(code)\n }\n\n if (code === 93) {\n effects.consume(code)\n return cdataEnd\n }\n\n return cdata(code)\n }\n\n function declaration(code) {\n if (code === null || code === 62) {\n return end(code)\n }\n\n if (markdownLineEnding(code)) {\n returnState = declaration\n return atLineEnding(code)\n }\n\n effects.consume(code)\n return declaration\n }\n\n function instruction(code) {\n if (code === null) {\n return nok(code)\n }\n\n if (code === 63) {\n effects.consume(code)\n return instructionClose\n }\n\n if (markdownLineEnding(code)) {\n returnState = instruction\n return atLineEnding(code)\n }\n\n effects.consume(code)\n return instruction\n }\n\n function instructionClose(code) {\n return code === 62 ? end(code) : instruction(code)\n }\n\n function tagCloseStart(code) {\n if (asciiAlpha(code)) {\n effects.consume(code)\n return tagClose\n }\n\n return nok(code)\n }\n\n function tagClose(code) {\n if (code === 45 || asciiAlphanumeric(code)) {\n effects.consume(code)\n return tagClose\n }\n\n return tagCloseBetween(code)\n }\n\n function tagCloseBetween(code) {\n if (markdownLineEnding(code)) {\n returnState = tagCloseBetween\n return atLineEnding(code)\n }\n\n if (markdownSpace(code)) {\n effects.consume(code)\n return tagCloseBetween\n }\n\n return end(code)\n }\n\n function tagOpen(code) {\n if (code === 45 || asciiAlphanumeric(code)) {\n effects.consume(code)\n return tagOpen\n }\n\n if (code === 47 || code === 62 || markdownLineEndingOrSpace(code)) {\n return tagOpenBetween(code)\n }\n\n return nok(code)\n }\n\n function tagOpenBetween(code) {\n if (code === 47) {\n effects.consume(code)\n return end\n }\n\n if (code === 58 || code === 95 || asciiAlpha(code)) {\n effects.consume(code)\n return tagOpenAttributeName\n }\n\n if (markdownLineEnding(code)) {\n returnState = tagOpenBetween\n return atLineEnding(code)\n }\n\n if (markdownSpace(code)) {\n effects.consume(code)\n return tagOpenBetween\n }\n\n return end(code)\n }\n\n function tagOpenAttributeName(code) {\n if (\n code === 45 ||\n code === 46 ||\n code === 58 ||\n code === 95 ||\n asciiAlphanumeric(code)\n ) {\n effects.consume(code)\n return tagOpenAttributeName\n }\n\n return tagOpenAttributeNameAfter(code)\n }\n\n function tagOpenAttributeNameAfter(code) {\n if (code === 61) {\n effects.consume(code)\n return tagOpenAttributeValueBefore\n }\n\n if (markdownLineEnding(code)) {\n returnState = tagOpenAttributeNameAfter\n return atLineEnding(code)\n }\n\n if (markdownSpace(code)) {\n effects.consume(code)\n return tagOpenAttributeNameAfter\n }\n\n return tagOpenBetween(code)\n }\n\n function tagOpenAttributeValueBefore(code) {\n if (\n code === null ||\n code === 60 ||\n code === 61 ||\n code === 62 ||\n code === 96\n ) {\n return nok(code)\n }\n\n if (code === 34 || code === 39) {\n effects.consume(code)\n marker = code\n return tagOpenAttributeValueQuoted\n }\n\n if (markdownLineEnding(code)) {\n returnState = tagOpenAttributeValueBefore\n return atLineEnding(code)\n }\n\n if (markdownSpace(code)) {\n effects.consume(code)\n return tagOpenAttributeValueBefore\n }\n\n effects.consume(code)\n marker = undefined\n return tagOpenAttributeValueUnquoted\n }\n\n function tagOpenAttributeValueQuoted(code) {\n if (code === marker) {\n effects.consume(code)\n return tagOpenAttributeValueQuotedAfter\n }\n\n if (code === null) {\n return nok(code)\n }\n\n if (markdownLineEnding(code)) {\n returnState = tagOpenAttributeValueQuoted\n return atLineEnding(code)\n }\n\n effects.consume(code)\n return tagOpenAttributeValueQuoted\n }\n\n function tagOpenAttributeValueQuotedAfter(code) {\n if (code === 62 || code === 47 || markdownLineEndingOrSpace(code)) {\n return tagOpenBetween(code)\n }\n\n return nok(code)\n }\n\n function tagOpenAttributeValueUnquoted(code) {\n if (\n code === null ||\n code === 34 ||\n code === 39 ||\n code === 60 ||\n code === 61 ||\n code === 96\n ) {\n return nok(code)\n }\n\n if (code === 62 || markdownLineEndingOrSpace(code)) {\n return tagOpenBetween(code)\n }\n\n effects.consume(code)\n return tagOpenAttributeValueUnquoted\n } // We can’t have blank lines in content, so no need to worry about empty\n // tokens.\n\n function atLineEnding(code) {\n effects.exit('htmlTextData')\n effects.enter('lineEnding')\n effects.consume(code)\n effects.exit('lineEnding')\n return factorySpace(\n effects,\n afterPrefix,\n 'linePrefix',\n self.parser.constructs.disable.null.indexOf('codeIndented') > -1\n ? undefined\n : 4\n )\n }\n\n function afterPrefix(code) {\n effects.enter('htmlTextData')\n return returnState(code)\n }\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\n return nok(code)\n }\n}\n\nmodule.exports = htmlText\n","'use strict'\n\nvar markdownLineEndingOrSpace = require('../character/markdown-line-ending-or-space.js')\nvar chunkedPush = require('../util/chunked-push.js')\nvar chunkedSplice = require('../util/chunked-splice.js')\nvar normalizeIdentifier = require('../util/normalize-identifier.js')\nvar resolveAll = require('../util/resolve-all.js')\nvar shallow = require('../util/shallow.js')\nvar factoryDestination = require('./factory-destination.js')\nvar factoryLabel = require('./factory-label.js')\nvar factoryTitle = require('./factory-title.js')\nvar factoryWhitespace = require('./factory-whitespace.js')\n\nvar labelEnd = {\n name: 'labelEnd',\n tokenize: tokenizeLabelEnd,\n resolveTo: resolveToLabelEnd,\n resolveAll: resolveAllLabelEnd\n}\nvar resourceConstruct = {\n tokenize: tokenizeResource\n}\nvar fullReferenceConstruct = {\n tokenize: tokenizeFullReference\n}\nvar collapsedReferenceConstruct = {\n tokenize: tokenizeCollapsedReference\n}\n\nfunction resolveAllLabelEnd(events) {\n var index = -1\n var token\n\n while (++index < events.length) {\n token = events[index][1]\n\n if (\n !token._used &&\n (token.type === 'labelImage' ||\n token.type === 'labelLink' ||\n token.type === 'labelEnd')\n ) {\n // Remove the marker.\n events.splice(index + 1, token.type === 'labelImage' ? 4 : 2)\n token.type = 'data'\n index++\n }\n }\n\n return events\n}\n\nfunction resolveToLabelEnd(events, context) {\n var index = events.length\n var offset = 0\n var group\n var label\n var text\n var token\n var open\n var close\n var media // Find an opening.\n\n while (index--) {\n token = events[index][1]\n\n if (open) {\n // If we see another link, or inactive link label, we’ve been here before.\n if (\n token.type === 'link' ||\n (token.type === 'labelLink' && token._inactive)\n ) {\n break\n } // Mark other link openings as inactive, as we can’t have links in\n // links.\n\n if (events[index][0] === 'enter' && token.type === 'labelLink') {\n token._inactive = true\n }\n } else if (close) {\n if (\n events[index][0] === 'enter' &&\n (token.type === 'labelImage' || token.type === 'labelLink') &&\n !token._balanced\n ) {\n open = index\n\n if (token.type !== 'labelLink') {\n offset = 2\n break\n }\n }\n } else if (token.type === 'labelEnd') {\n close = index\n }\n }\n\n group = {\n type: events[open][1].type === 'labelLink' ? 'link' : 'image',\n start: shallow(events[open][1].start),\n end: shallow(events[events.length - 1][1].end)\n }\n label = {\n type: 'label',\n start: shallow(events[open][1].start),\n end: shallow(events[close][1].end)\n }\n text = {\n type: 'labelText',\n start: shallow(events[open + offset + 2][1].end),\n end: shallow(events[close - 2][1].start)\n }\n media = [\n ['enter', group, context],\n ['enter', label, context]\n ] // Opening marker.\n\n media = chunkedPush(media, events.slice(open + 1, open + offset + 3)) // Text open.\n\n media = chunkedPush(media, [['enter', text, context]]) // Between.\n\n media = chunkedPush(\n media,\n resolveAll(\n context.parser.constructs.insideSpan.null,\n events.slice(open + offset + 4, close - 3),\n context\n )\n ) // Text close, marker close, label close.\n\n media = chunkedPush(media, [\n ['exit', text, context],\n events[close - 2],\n events[close - 1],\n ['exit', label, context]\n ]) // Reference, resource, or so.\n\n media = chunkedPush(media, events.slice(close + 1)) // Media close.\n\n media = chunkedPush(media, [['exit', group, context]])\n chunkedSplice(events, open, events.length, media)\n return events\n}\n\nfunction tokenizeLabelEnd(effects, ok, nok) {\n var self = this\n var index = self.events.length\n var labelStart\n var defined // Find an opening.\n\n while (index--) {\n if (\n (self.events[index][1].type === 'labelImage' ||\n self.events[index][1].type === 'labelLink') &&\n !self.events[index][1]._balanced\n ) {\n labelStart = self.events[index][1]\n break\n }\n }\n\n return start\n\n function start(code) {\n if (!labelStart) {\n return nok(code)\n } // It’s a balanced bracket, but contains a link.\n\n if (labelStart._inactive) return balanced(code)\n defined =\n self.parser.defined.indexOf(\n normalizeIdentifier(\n self.sliceSerialize({\n start: labelStart.end,\n end: self.now()\n })\n )\n ) > -1\n effects.enter('labelEnd')\n effects.enter('labelMarker')\n effects.consume(code)\n effects.exit('labelMarker')\n effects.exit('labelEnd')\n return afterLabelEnd\n }\n\n function afterLabelEnd(code) {\n // Resource: `[asd](fgh)`.\n if (code === 40) {\n return effects.attempt(\n resourceConstruct,\n ok,\n defined ? ok : balanced\n )(code)\n } // Collapsed (`[asd][]`) or full (`[asd][fgh]`) reference?\n\n if (code === 91) {\n return effects.attempt(\n fullReferenceConstruct,\n ok,\n defined\n ? effects.attempt(collapsedReferenceConstruct, ok, balanced)\n : balanced\n )(code)\n } // Shortcut reference: `[asd]`?\n\n return defined ? ok(code) : balanced(code)\n }\n\n function balanced(code) {\n labelStart._balanced = true\n return nok(code)\n }\n}\n\nfunction tokenizeResource(effects, ok, nok) {\n return start\n\n function start(code) {\n effects.enter('resource')\n effects.enter('resourceMarker')\n effects.consume(code)\n effects.exit('resourceMarker')\n return factoryWhitespace(effects, open)\n }\n\n function open(code) {\n if (code === 41) {\n return end(code)\n }\n\n return factoryDestination(\n effects,\n destinationAfter,\n nok,\n 'resourceDestination',\n 'resourceDestinationLiteral',\n 'resourceDestinationLiteralMarker',\n 'resourceDestinationRaw',\n 'resourceDestinationString',\n 3\n )(code)\n }\n\n function destinationAfter(code) {\n return markdownLineEndingOrSpace(code)\n ? factoryWhitespace(effects, between)(code)\n : end(code)\n }\n\n function between(code) {\n if (code === 34 || code === 39 || code === 40) {\n return factoryTitle(\n effects,\n factoryWhitespace(effects, end),\n nok,\n 'resourceTitle',\n 'resourceTitleMarker',\n 'resourceTitleString'\n )(code)\n }\n\n return end(code)\n }\n\n function end(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\n return nok(code)\n }\n}\n\nfunction tokenizeFullReference(effects, ok, nok) {\n var self = this\n return start\n\n function start(code) {\n return factoryLabel.call(\n self,\n effects,\n afterLabel,\n nok,\n 'reference',\n 'referenceMarker',\n 'referenceString'\n )(code)\n }\n\n function afterLabel(code) {\n return self.parser.defined.indexOf(\n normalizeIdentifier(\n self.sliceSerialize(self.events[self.events.length - 1][1]).slice(1, -1)\n )\n ) < 0\n ? nok(code)\n : ok(code)\n }\n}\n\nfunction tokenizeCollapsedReference(effects, ok, nok) {\n return start\n\n function start(code) {\n effects.enter('reference')\n effects.enter('referenceMarker')\n effects.consume(code)\n effects.exit('referenceMarker')\n return open\n }\n\n function open(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\n return nok(code)\n }\n}\n\nmodule.exports = labelEnd\n","'use strict'\n\nvar labelEnd = require('./label-end.js')\n\nvar labelStartImage = {\n name: 'labelStartImage',\n tokenize: tokenizeLabelStartImage,\n resolveAll: labelEnd.resolveAll\n}\n\nfunction tokenizeLabelStartImage(effects, ok, nok) {\n var self = this\n return start\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 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\n return nok(code)\n }\n\n function after(code) {\n /* c8 ignore next */\n return code === 94 &&\n /* c8 ignore next */\n '_hiddenFootnoteSupport' in self.parser.constructs\n ? /* c8 ignore next */\n nok(code)\n : ok(code)\n }\n}\n\nmodule.exports = labelStartImage\n","'use strict'\n\nvar labelEnd = require('./label-end.js')\n\nvar labelStartLink = {\n name: 'labelStartLink',\n tokenize: tokenizeLabelStartLink,\n resolveAll: labelEnd.resolveAll\n}\n\nfunction tokenizeLabelStartLink(effects, ok, nok) {\n var self = this\n return start\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 function after(code) {\n /* c8 ignore next */\n return code === 94 &&\n /* c8 ignore next */\n '_hiddenFootnoteSupport' in self.parser.constructs\n ? /* c8 ignore next */\n nok(code)\n : ok(code)\n }\n}\n\nmodule.exports = labelStartLink\n","'use strict'\n\nvar factorySpace = require('./factory-space.js')\n\nvar lineEnding = {\n name: 'lineEnding',\n tokenize: tokenizeLineEnding\n}\n\nfunction tokenizeLineEnding(effects, ok) {\n return start\n\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\nmodule.exports = lineEnding\n","'use strict'\n\nvar asciiDigit = require('../character/ascii-digit.js')\nvar markdownSpace = require('../character/markdown-space.js')\nvar prefixSize = require('../util/prefix-size.js')\nvar sizeChunks = require('../util/size-chunks.js')\nvar factorySpace = require('./factory-space.js')\nvar partialBlankLine = require('./partial-blank-line.js')\nvar thematicBreak = require('./thematic-break.js')\n\nvar list = {\n name: 'list',\n tokenize: tokenizeListStart,\n continuation: {\n tokenize: tokenizeListContinuation\n },\n exit: tokenizeListEnd\n}\nvar listItemPrefixWhitespaceConstruct = {\n tokenize: tokenizeListItemPrefixWhitespace,\n partial: true\n}\nvar indentConstruct = {\n tokenize: tokenizeIndent,\n partial: true\n}\n\nfunction tokenizeListStart(effects, ok, nok) {\n var self = this\n var initialSize = prefixSize(self.events, 'linePrefix')\n var size = 0\n return start\n\n function start(code) {\n var kind =\n self.containerState.type ||\n (code === 42 || code === 43 || code === 45\n ? 'listUnordered'\n : 'listOrdered')\n\n if (\n kind === 'listUnordered'\n ? !self.containerState.marker || code === self.containerState.marker\n : asciiDigit(code)\n ) {\n if (!self.containerState.type) {\n self.containerState.type = kind\n effects.enter(kind, {\n _container: true\n })\n }\n\n if (kind === 'listUnordered') {\n effects.enter('listItemPrefix')\n return code === 42 || code === 45\n ? effects.check(thematicBreak, nok, atMarker)(code)\n : atMarker(code)\n }\n\n if (!self.interrupt || code === 49) {\n effects.enter('listItemPrefix')\n effects.enter('listItemValue')\n return inside(code)\n }\n }\n\n return nok(code)\n }\n\n function inside(code) {\n if (asciiDigit(code) && ++size < 10) {\n effects.consume(code)\n return inside\n }\n\n if (\n (!self.interrupt || size < 2) &&\n (self.containerState.marker\n ? code === self.containerState.marker\n : code === 41 || code === 46)\n ) {\n effects.exit('listItemValue')\n return atMarker(code)\n }\n\n return nok(code)\n }\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(\n partialBlankLine, // Can’t be empty when interrupting.\n self.interrupt ? nok : onBlank,\n effects.attempt(\n listItemPrefixWhitespaceConstruct,\n endOfPrefix,\n otherPrefix\n )\n )\n }\n\n function onBlank(code) {\n self.containerState.initialBlankLine = true\n initialSize++\n return endOfPrefix(code)\n }\n\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\n return nok(code)\n }\n\n function endOfPrefix(code) {\n self.containerState.size =\n initialSize + sizeChunks(self.sliceStream(effects.exit('listItemPrefix')))\n return ok(code)\n }\n}\n\nfunction tokenizeListContinuation(effects, ok, nok) {\n var self = this\n self.containerState._closeFlow = undefined\n return effects.check(partialBlankLine, onBlank, notBlank)\n\n function onBlank(code) {\n self.containerState.furtherBlankLines =\n self.containerState.furtherBlankLines ||\n self.containerState.initialBlankLine // We have a blank line.\n // Still, try to consume at most the items size.\n\n return factorySpace(\n effects,\n ok,\n 'listItemIndent',\n self.containerState.size + 1\n )(code)\n }\n\n function notBlank(code) {\n if (self.containerState.furtherBlankLines || !markdownSpace(code)) {\n self.containerState.furtherBlankLines = self.containerState.initialBlankLine = undefined\n return notInCurrentItem(code)\n }\n\n self.containerState.furtherBlankLines = self.containerState.initialBlankLine = undefined\n return effects.attempt(indentConstruct, ok, notInCurrentItem)(code)\n }\n\n function notInCurrentItem(code) {\n // While we do continue, we signal that the flow should be closed.\n self.containerState._closeFlow = true // As we’re closing flow, we’re no longer interrupting.\n\n self.interrupt = undefined\n return factorySpace(\n effects,\n effects.attempt(list, ok, nok),\n 'linePrefix',\n self.parser.constructs.disable.null.indexOf('codeIndented') > -1\n ? undefined\n : 4\n )(code)\n }\n}\n\nfunction tokenizeIndent(effects, ok, nok) {\n var self = this\n return factorySpace(\n effects,\n afterPrefix,\n 'listItemIndent',\n self.containerState.size + 1\n )\n\n function afterPrefix(code) {\n return prefixSize(self.events, 'listItemIndent') ===\n self.containerState.size\n ? ok(code)\n : nok(code)\n }\n}\n\nfunction tokenizeListEnd(effects) {\n effects.exit(this.containerState.type)\n}\n\nfunction tokenizeListItemPrefixWhitespace(effects, ok, nok) {\n var self = this\n return factorySpace(\n effects,\n afterPrefix,\n 'listItemPrefixWhitespace',\n self.parser.constructs.disable.null.indexOf('codeIndented') > -1\n ? undefined\n : 4 + 1\n )\n\n function afterPrefix(code) {\n return markdownSpace(code) ||\n !prefixSize(self.events, 'listItemPrefixWhitespace')\n ? nok(code)\n : ok(code)\n }\n}\n\nmodule.exports = list\n","'use strict'\n\nvar markdownLineEnding = require('../character/markdown-line-ending.js')\nvar factorySpace = require('./factory-space.js')\n\nvar partialBlankLine = {\n tokenize: tokenizePartialBlankLine,\n partial: true\n}\n\nfunction tokenizePartialBlankLine(effects, ok, nok) {\n return factorySpace(effects, afterWhitespace, 'linePrefix')\n\n function afterWhitespace(code) {\n return code === null || markdownLineEnding(code) ? ok(code) : nok(code)\n }\n}\n\nmodule.exports = partialBlankLine\n","'use strict'\n\nvar markdownLineEnding = require('../character/markdown-line-ending.js')\nvar shallow = require('../util/shallow.js')\nvar factorySpace = require('./factory-space.js')\n\nvar setextUnderline = {\n name: 'setextUnderline',\n tokenize: tokenizeSetextUnderline,\n resolveTo: resolveToSetextUnderline\n}\n\nfunction resolveToSetextUnderline(events, context) {\n var index = events.length\n var content\n var text\n var definition\n var heading // Find the opening of the content.\n // It’ll always exist: we don’t tokenize if it isn’t there.\n\n while (index--) {\n if (events[index][0] === 'enter') {\n if (events[index][1].type === 'content') {\n content = index\n break\n }\n\n if (events[index][1].type === 'paragraph') {\n text = index\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\n if (!definition && events[index][1].type === 'definition') {\n definition = index\n }\n }\n }\n\n heading = {\n type: 'setextHeading',\n start: shallow(events[text][1].start),\n end: shallow(events[events.length - 1][1].end)\n } // Change the paragraph to setext heading text.\n\n events[text][1].type = 'setextHeadingText' // If we have definitions in the content, we’ll keep on having content,\n // but we need move it.\n\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 = shallow(events[definition][1].end)\n } else {\n events[content][1] = heading\n } // Add the heading exit at the end.\n\n events.push(['exit', heading, context])\n return events\n}\n\nfunction tokenizeSetextUnderline(effects, ok, nok) {\n var self = this\n var index = self.events.length\n var marker\n var paragraph // Find an opening.\n\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 (\n self.events[index][1].type !== 'lineEnding' &&\n self.events[index][1].type !== 'linePrefix' &&\n self.events[index][1].type !== 'content'\n ) {\n paragraph = self.events[index][1].type === 'paragraph'\n break\n }\n }\n\n return start\n\n function start(code) {\n if (!self.lazy && (self.interrupt || paragraph)) {\n effects.enter('setextHeadingLine')\n effects.enter('setextHeadingLineSequence')\n marker = code\n return closingSequence(code)\n }\n\n return nok(code)\n }\n\n function closingSequence(code) {\n if (code === marker) {\n effects.consume(code)\n return closingSequence\n }\n\n effects.exit('setextHeadingLineSequence')\n return factorySpace(effects, closingSequenceEnd, 'lineSuffix')(code)\n }\n\n function closingSequenceEnd(code) {\n if (code === null || markdownLineEnding(code)) {\n effects.exit('setextHeadingLine')\n return ok(code)\n }\n\n return nok(code)\n }\n}\n\nmodule.exports = setextUnderline\n","'use strict'\n\nvar markdownLineEnding = require('../character/markdown-line-ending.js')\nvar markdownSpace = require('../character/markdown-space.js')\nvar factorySpace = require('./factory-space.js')\n\nvar thematicBreak = {\n name: 'thematicBreak',\n tokenize: tokenizeThematicBreak\n}\n\nfunction tokenizeThematicBreak(effects, ok, nok) {\n var size = 0\n var marker\n return start\n\n function start(code) {\n effects.enter('thematicBreak')\n marker = code\n return atBreak(code)\n }\n\n function atBreak(code) {\n if (code === marker) {\n effects.enter('thematicBreakSequence')\n return sequence(code)\n }\n\n if (markdownSpace(code)) {\n return factorySpace(effects, atBreak, 'whitespace')(code)\n }\n\n if (size < 3 || (code !== null && !markdownLineEnding(code))) {\n return nok(code)\n }\n\n effects.exit('thematicBreak')\n return ok(code)\n }\n\n function sequence(code) {\n if (code === marker) {\n effects.consume(code)\n size++\n return sequence\n }\n\n effects.exit('thematicBreakSequence')\n return atBreak(code)\n }\n}\n\nmodule.exports = thematicBreak\n","'use strict'\n\nvar chunkedSplice = require('./chunked-splice.js')\n\nfunction chunkedPush(list, items) {\n if (list.length) {\n chunkedSplice(list, list.length, 0, items)\n return list\n }\n\n return items\n}\n\nmodule.exports = chunkedPush\n","'use strict'\n\nvar splice = require('../constant/splice.js')\n\n// causes a stack overflow in V8 when trying to insert 100k items for instance.\n\nfunction chunkedSplice(list, start, remove, items) {\n var end = list.length\n var chunkStart = 0\n var parameters // Make start between zero and `end` (included).\n\n if (start < 0) {\n start = -start > end ? 0 : end + start\n } else {\n start = start > end ? end : start\n }\n\n remove = remove > 0 ? remove : 0 // No need to chunk the items if there’s only a couple (10k) items.\n\n if (items.length < 10000) {\n parameters = Array.from(items)\n parameters.unshift(start, remove)\n splice.apply(list, parameters)\n } else {\n // Delete `remove` items starting from `start`\n if (remove) splice.apply(list, [start, remove]) // Insert the items in chunks to not cause stack overflows.\n\n while (chunkStart < items.length) {\n parameters = items.slice(chunkStart, chunkStart + 10000)\n parameters.unshift(start, 0)\n splice.apply(list, parameters)\n chunkStart += 10000\n start += 10000\n }\n }\n}\n\nmodule.exports = chunkedSplice\n","'use strict'\n\nvar markdownLineEndingOrSpace = require('../character/markdown-line-ending-or-space.js')\nvar unicodePunctuation = require('../character/unicode-punctuation.js')\nvar unicodeWhitespace = require('../character/unicode-whitespace.js')\n\n// Classify whether a character is unicode whitespace, unicode punctuation, or\n// anything else.\n// Used for attention (emphasis, strong), whose sequences can open or close\n// based on the class of surrounding characters.\nfunction classifyCharacter(code) {\n if (\n code === null ||\n markdownLineEndingOrSpace(code) ||\n unicodeWhitespace(code)\n ) {\n return 1\n }\n\n if (unicodePunctuation(code)) {\n return 2\n }\n}\n\nmodule.exports = classifyCharacter\n","'use strict'\n\nvar hasOwnProperty = require('../constant/has-own-property.js')\nvar chunkedSplice = require('./chunked-splice.js')\nvar miniflat = require('./miniflat.js')\n\nfunction combineExtensions(extensions) {\n var all = {}\n var index = -1\n\n while (++index < extensions.length) {\n extension(all, extensions[index])\n }\n\n return all\n}\n\nfunction extension(all, extension) {\n var hook\n var left\n var right\n var code\n\n for (hook in extension) {\n left = hasOwnProperty.call(all, hook) ? all[hook] : (all[hook] = {})\n right = extension[hook]\n\n for (code in right) {\n left[code] = constructs(\n miniflat(right[code]),\n hasOwnProperty.call(left, code) ? left[code] : []\n )\n }\n }\n}\n\nfunction constructs(list, existing) {\n var index = -1\n var before = []\n\n while (++index < list.length) {\n ;(list[index].add === 'after' ? existing : before).push(list[index])\n }\n\n chunkedSplice(existing, 0, 0, before)\n return existing\n}\n\nmodule.exports = combineExtensions\n","'use strict'\n\nvar assign = require('../constant/assign.js')\nvar markdownLineEnding = require('../character/markdown-line-ending.js')\nvar chunkedPush = require('./chunked-push.js')\nvar chunkedSplice = require('./chunked-splice.js')\nvar miniflat = require('./miniflat.js')\nvar resolveAll = require('./resolve-all.js')\nvar serializeChunks = require('./serialize-chunks.js')\nvar shallow = require('./shallow.js')\nvar sliceChunks = require('./slice-chunks.js')\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`.\nfunction createTokenizer(parser, initialize, from) {\n var point = from\n ? shallow(from)\n : {\n line: 1,\n column: 1,\n offset: 0\n }\n var columnStart = {}\n var resolveAllConstructs = []\n var chunks = []\n var stack = []\n\n var effects = {\n consume: consume,\n enter: enter,\n exit: exit,\n attempt: constructFactory(onsuccessfulconstruct),\n check: constructFactory(onsuccessfulcheck),\n interrupt: constructFactory(onsuccessfulcheck, {\n interrupt: true\n }),\n lazy: constructFactory(onsuccessfulcheck, {\n lazy: true\n })\n } // State and tools for resolving and serializing.\n\n var context = {\n previous: null,\n events: [],\n parser: parser,\n sliceStream: sliceStream,\n sliceSerialize: sliceSerialize,\n now: now,\n defineSkip: skip,\n write: write\n } // The state function.\n\n var state = initialize.tokenize.call(context, effects) // Track which character we expect to be consumed, to catch bugs.\n\n if (initialize.resolveAll) {\n resolveAllConstructs.push(initialize)\n } // Store where we are in the input stream.\n\n point._index = 0\n point._bufferIndex = -1\n return context\n\n function write(slice) {\n chunks = chunkedPush(chunks, slice)\n main() // Exit if we’re not done, resolve might change stuff.\n\n if (chunks[chunks.length - 1] !== null) {\n return []\n }\n\n addResult(initialize, 0) // Otherwise, resolve, and exit.\n\n context.events = resolveAll(resolveAllConstructs, context.events, context)\n return context.events\n } //\n // Tools.\n //\n\n function sliceSerialize(token) {\n return serializeChunks(sliceStream(token))\n }\n\n function sliceStream(token) {\n return sliceChunks(chunks, token)\n }\n\n function now() {\n return shallow(point)\n }\n\n function skip(value) {\n columnStart[value.line] = value.column\n accountForPotentialSkip()\n } //\n // State management.\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 function main() {\n var chunkIndex\n var chunk\n\n while (point._index < chunks.length) {\n chunk = chunks[point._index] // If we’re in a buffer chunk, loop through it.\n\n if (typeof chunk === 'string') {\n chunkIndex = point._index\n\n if (point._bufferIndex < 0) {\n point._bufferIndex = 0\n }\n\n while (\n point._index === chunkIndex &&\n point._bufferIndex < chunk.length\n ) {\n go(chunk.charCodeAt(point._bufferIndex))\n }\n } else {\n go(chunk)\n }\n }\n } // Deal with one code.\n\n function go(code) {\n state = state(code)\n } // Move a character forward.\n\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 } // Not in a string chunk.\n\n if (point._bufferIndex < 0) {\n point._index++\n } else {\n point._bufferIndex++ // At end of string chunk.\n\n if (point._bufferIndex === chunks[point._index].length) {\n point._bufferIndex = -1\n point._index++\n }\n } // Expose the previous character.\n\n context.previous = code // Mark as consumed.\n } // Start a token.\n\n function enter(type, fields) {\n var 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 } // Stop a token.\n\n function exit(type) {\n var token = stack.pop()\n token.end = now()\n context.events.push(['exit', token, context])\n return token\n } // Use results.\n\n function onsuccessfulconstruct(construct, info) {\n addResult(construct, info.from)\n } // Discard results.\n\n function onsuccessfulcheck(construct, info) {\n info.restore()\n } // Factory to attempt/check/interrupt.\n\n function constructFactory(onreturn, fields) {\n return hook // Handle either an object mapping codes to constructs, a list of\n // constructs, or a single construct.\n\n function hook(constructs, returnState, bogusState) {\n var listOfConstructs\n var constructIndex\n var currentConstruct\n var info\n return constructs.tokenize || 'length' in constructs\n ? handleListOfConstructs(miniflat(constructs))\n : handleMapOfConstructs\n\n function handleMapOfConstructs(code) {\n if (code in constructs || null in constructs) {\n return handleListOfConstructs(\n constructs.null\n ? /* c8 ignore next */\n miniflat(constructs[code]).concat(miniflat(constructs.null))\n : constructs[code]\n )(code)\n }\n\n return bogusState(code)\n }\n\n function handleListOfConstructs(list) {\n listOfConstructs = list\n constructIndex = 0\n return handleConstruct(list[constructIndex])\n }\n\n function handleConstruct(construct) {\n return start\n\n function start(code) {\n // To do: not nede 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\n if (!construct.partial) {\n context.currentConstruct = construct\n }\n\n if (\n construct.name &&\n context.parser.constructs.disable.null.indexOf(construct.name) > -1\n ) {\n return nok()\n }\n\n return construct.tokenize.call(\n fields ? assign({}, context, fields) : context,\n effects,\n ok,\n nok\n )(code)\n }\n }\n\n function ok(code) {\n onreturn(currentConstruct, info)\n return returnState\n }\n\n function nok(code) {\n info.restore()\n\n if (++constructIndex < listOfConstructs.length) {\n return handleConstruct(listOfConstructs[constructIndex])\n }\n\n return bogusState\n }\n }\n }\n\n function addResult(construct, from) {\n if (construct.resolveAll && resolveAllConstructs.indexOf(construct) < 0) {\n resolveAllConstructs.push(construct)\n }\n\n if (construct.resolve) {\n chunkedSplice(\n context.events,\n from,\n context.events.length - from,\n construct.resolve(context.events.slice(from), context)\n )\n }\n\n if (construct.resolveTo) {\n context.events = construct.resolveTo(context.events, context)\n }\n }\n\n function store() {\n var startPoint = now()\n var startPrevious = context.previous\n var startCurrentConstruct = context.currentConstruct\n var startEventsIndex = context.events.length\n var startStack = Array.from(stack)\n return {\n restore: restore,\n from: startEventsIndex\n }\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 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\nmodule.exports = createTokenizer\n","'use strict'\n\nfunction miniflat(value) {\n return value === null || value === undefined\n ? []\n : 'length' in value\n ? value\n : [value]\n}\n\nmodule.exports = miniflat\n","'use strict'\n\n// chunks (replacement characters, tabs, or line endings).\n\nfunction movePoint(point, offset) {\n point.column += offset\n point.offset += offset\n point._bufferIndex += offset\n return point\n}\n\nmodule.exports = movePoint\n","'use strict'\n\nfunction normalizeIdentifier(value) {\n return (\n value // Collapse Markdown whitespace.\n .replace(/[\\t\\n\\r ]+/g, ' ') // Trim.\n .replace(/^ | $/g, '') // 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 object method is uppercase.\n .toLowerCase()\n .toUpperCase()\n )\n}\n\nmodule.exports = normalizeIdentifier\n","'use strict'\n\nvar sizeChunks = require('./size-chunks.js')\n\nfunction prefixSize(events, type) {\n var tail = events[events.length - 1]\n if (!tail || tail[1].type !== type) return 0\n return sizeChunks(tail[2].sliceStream(tail[1]))\n}\n\nmodule.exports = prefixSize\n","'use strict'\n\nvar fromCharCode = require('../constant/from-char-code.js')\n\nfunction regexCheck(regex) {\n return check\n\n function check(code) {\n return regex.test(fromCharCode(code))\n }\n}\n\nmodule.exports = regexCheck\n","'use strict'\n\nfunction resolveAll(constructs, events, context) {\n var called = []\n var index = -1\n var resolve\n\n while (++index < constructs.length) {\n resolve = constructs[index].resolveAll\n\n if (resolve && called.indexOf(resolve) < 0) {\n events = resolve(events, context)\n called.push(resolve)\n }\n }\n\n return events\n}\n\nmodule.exports = resolveAll\n","'use strict'\n\nvar fromCharCode = require('../constant/from-char-code.js')\n\nfunction safeFromInt(value, base) {\n var code = parseInt(value, base)\n\n if (\n // C0 except for HT, LF, FF, CR, space\n code < 9 ||\n code === 11 ||\n (code > 13 && code < 32) || // Control character (DEL) of the basic block and C1 controls.\n (code > 126 && code < 160) || // Lone high surrogates and low surrogates.\n (code > 55295 && code < 57344) || // Noncharacters.\n (code > 64975 && code < 65008) ||\n (code & 65535) === 65535 ||\n (code & 65535) === 65534 || // Out of range\n code > 1114111\n ) {\n return '\\uFFFD'\n }\n\n return fromCharCode(code)\n}\n\nmodule.exports = safeFromInt\n","'use strict'\n\nvar fromCharCode = require('../constant/from-char-code.js')\n\nfunction serializeChunks(chunks) {\n var index = -1\n var result = []\n var chunk\n var value\n var atTab\n\n while (++index < chunks.length) {\n chunk = chunks[index]\n\n if (typeof chunk === 'string') {\n value = chunk\n } else if (chunk === -5) {\n value = '\\r'\n } else if (chunk === -4) {\n value = '\\n'\n } else if (chunk === -3) {\n value = '\\r' + '\\n'\n } else if (chunk === -2) {\n value = '\\t'\n } else if (chunk === -1) {\n if (atTab) continue\n value = ' '\n } else {\n // Currently only replacement character.\n value = fromCharCode(chunk)\n }\n\n atTab = chunk === -2\n result.push(value)\n }\n\n return result.join('')\n}\n\nmodule.exports = serializeChunks\n","'use strict'\n\nvar assign = require('../constant/assign.js')\n\nfunction shallow(object) {\n return assign({}, object)\n}\n\nmodule.exports = shallow\n","'use strict'\n\n// Counts tabs based on their expanded size, and CR+LF as one character.\n\nfunction sizeChunks(chunks) {\n var index = -1\n var size = 0\n\n while (++index < chunks.length) {\n size += typeof chunks[index] === 'string' ? chunks[index].length : 1\n }\n\n return size\n}\n\nmodule.exports = sizeChunks\n","'use strict'\n\nfunction sliceChunks(chunks, token) {\n var startIndex = token.start._index\n var startBufferIndex = token.start._bufferIndex\n var endIndex = token.end._index\n var endBufferIndex = token.end._bufferIndex\n var view\n\n if (startIndex === endIndex) {\n view = [chunks[startIndex].slice(startBufferIndex, endBufferIndex)]\n } else {\n view = chunks.slice(startIndex, endIndex)\n\n if (startBufferIndex > -1) {\n view[0] = view[0].slice(startBufferIndex)\n }\n\n if (endBufferIndex > 0) {\n view.push(chunks[endIndex].slice(0, endBufferIndex))\n }\n }\n\n return view\n}\n\nmodule.exports = sliceChunks\n","'use strict'\n\nvar assign = require('../constant/assign.js')\nvar chunkedSplice = require('./chunked-splice.js')\nvar shallow = require('./shallow.js')\n\nfunction subtokenize(events) {\n var jumps = {}\n var index = -1\n var event\n var lineIndex\n var otherIndex\n var otherEvent\n var parameters\n var subevents\n var more\n\n while (++index < events.length) {\n while (index in jumps) {\n index = jumps[index]\n }\n\n event = events[index] // 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\n if (\n index &&\n event[1].type === 'chunkFlow' &&\n events[index - 1][1].type === 'listItemPrefix'\n ) {\n subevents = event[1]._tokenizer.events\n otherIndex = 0\n\n if (\n otherIndex < subevents.length &&\n subevents[otherIndex][1].type === 'lineEndingBlank'\n ) {\n otherIndex += 2\n }\n\n if (\n otherIndex < subevents.length &&\n subevents[otherIndex][1].type === 'content'\n ) {\n while (++otherIndex < subevents.length) {\n if (subevents[otherIndex][1].type === 'content') {\n break\n }\n\n if (subevents[otherIndex][1].type === 'chunkText') {\n subevents[otherIndex][1].isInFirstContentOfListItem = true\n otherIndex++\n }\n }\n }\n } // Enter.\n\n if (event[0] === 'enter') {\n if (event[1].contentType) {\n assign(jumps, subcontent(events, index))\n index = jumps[index]\n more = true\n }\n } // Exit.\n else if (event[1]._container || event[1]._movePreviousLineEndings) {\n otherIndex = index\n lineIndex = undefined\n\n while (otherIndex--) {\n otherEvent = events[otherIndex]\n\n if (\n otherEvent[1].type === 'lineEnding' ||\n otherEvent[1].type === 'lineEndingBlank'\n ) {\n if (otherEvent[0] === 'enter') {\n if (lineIndex) {\n events[lineIndex][1].type = 'lineEndingBlank'\n }\n\n otherEvent[1].type = 'lineEnding'\n lineIndex = otherIndex\n }\n } else {\n break\n }\n }\n\n if (lineIndex) {\n // Fix position.\n event[1].end = shallow(events[lineIndex][1].start) // Switch container exit w/ line endings.\n\n parameters = events.slice(lineIndex, index)\n parameters.unshift(event)\n chunkedSplice(events, lineIndex, index - lineIndex + 1, parameters)\n }\n }\n }\n\n return !more\n}\n\nfunction subcontent(events, eventIndex) {\n var token = events[eventIndex][1]\n var context = events[eventIndex][2]\n var startPosition = eventIndex - 1\n var startPositions = []\n var tokenizer =\n token._tokenizer || context.parser[token.contentType](token.start)\n var childEvents = tokenizer.events\n var jumps = []\n var gaps = {}\n var stream\n var previous\n var index\n var entered\n var end\n var adjust // Loop forward through the linked tokens to pass them in order to the\n // subtokenizer.\n\n while (token) {\n // Find the position of the event for this token.\n while (events[++startPosition][1] !== token) {\n // Empty.\n }\n\n startPositions.push(startPosition)\n\n if (!token._tokenizer) {\n stream = context.sliceStream(token)\n\n if (!token.next) {\n stream.push(null)\n }\n\n if (previous) {\n tokenizer.defineSkip(token.start)\n }\n\n if (token.isInFirstContentOfListItem) {\n tokenizer._gfmTasklistFirstContentOfListItem = true\n }\n\n tokenizer.write(stream)\n\n if (token.isInFirstContentOfListItem) {\n tokenizer._gfmTasklistFirstContentOfListItem = undefined\n }\n } // Unravel the next token.\n\n previous = token\n token = token.next\n } // Now, loop back through all events (and linked tokens), to figure out which\n // parts belong where.\n\n token = previous\n index = childEvents.length\n\n while (index--) {\n // Make sure we’ve at least seen something (final eol is part of the last\n // token).\n if (childEvents[index][0] === 'enter') {\n entered = true\n } else if (\n // Find a void token that includes a break.\n entered &&\n childEvents[index][1].type === childEvents[index - 1][1].type &&\n childEvents[index][1].start.line !== childEvents[index][1].end.line\n ) {\n add(childEvents.slice(index + 1, end))\n // Help GC.\n token._tokenizer = token.next = undefined\n token = token.previous\n end = index + 1\n }\n }\n\n // Help GC.\n tokenizer.events = token._tokenizer = token.next = undefined // Do head:\n\n add(childEvents.slice(0, end))\n index = -1\n adjust = 0\n\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\n return gaps\n\n function add(slice) {\n var start = startPositions.pop()\n jumps.unshift([start, start + slice.length - 1])\n chunkedSplice(events, start, 2, slice)\n }\n}\n\nmodule.exports = subtokenize\n","'use strict'\n\n/* eslint-env browser */\n\nvar el\n\nvar semicolon = 59 // ';'\n\nmodule.exports = decodeEntity\n\nfunction decodeEntity(characters) {\n var entity = '&' + characters + ';'\n var char\n\n el = el || document.createElement('i')\n el.innerHTML = entity\n char = el.textContent\n\n // Some entities do not require the closing semicolon (`¬` - for instance),\n // which leads to situations where parsing the assumed entity of ¬it; will\n // result in the string `¬it;`. When we encounter a trailing semicolon after\n // parsing and the entity to decode was not a semicolon (`;`), we can\n // assume that the matching was incomplete\n if (char.charCodeAt(char.length - 1) === semicolon && characters !== 'semi') {\n return false\n }\n\n // If the decoded string is equal to the input, the entity was not valid\n return char === entity ? false : char\n}\n","'use strict'\n\nmodule.exports = parse\n\nvar fromMarkdown = require('mdast-util-from-markdown')\n\nfunction parse(options) {\n var self = this\n\n this.Parser = parse\n\n function parse(doc) {\n return fromMarkdown(\n doc,\n Object.assign({}, self.data('settings'), 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","'use strict'\n\nvar wrap = require('./wrap.js')\n\nmodule.exports = trough\n\ntrough.wrap = wrap\n\nvar slice = [].slice\n\n// Create new middleware.\nfunction trough() {\n var fns = []\n var middleware = {}\n\n middleware.run = run\n middleware.use = use\n\n return middleware\n\n // Run `fns`. Last argument must be a completion handler.\n function run() {\n var index = -1\n var input = slice.call(arguments, 0, -1)\n var done = arguments[arguments.length - 1]\n\n if (typeof done !== 'function') {\n throw new Error('Expected function as last argument, not ' + done)\n }\n\n next.apply(null, [null].concat(input))\n\n // Run the next `fn`, if any.\n function next(err) {\n var fn = fns[++index]\n var params = slice.call(arguments, 0)\n var values = params.slice(1)\n var length = input.length\n var pos = -1\n\n if (err) {\n done(err)\n return\n }\n\n // Copy non-nully input into values.\n while (++pos < length) {\n if (values[pos] === null || values[pos] === undefined) {\n values[pos] = input[pos]\n }\n }\n\n input = values\n\n // Next or done.\n if (fn) {\n wrap(fn, next).apply(null, input)\n } else {\n done.apply(null, [null].concat(input))\n }\n }\n }\n\n // Add `fn` to the list.\n function use(fn) {\n if (typeof fn !== 'function') {\n throw new Error('Expected `fn` to be a function, not ' + fn)\n }\n\n fns.push(fn)\n\n return middleware\n }\n}\n","'use strict'\n\nvar slice = [].slice\n\nmodule.exports = wrap\n\n// Wrap `fn`.\n// Can be sync or async; return a promise, receive a completion handler, return\n// new values and errors.\nfunction wrap(fn, callback) {\n var invoked\n\n return wrapped\n\n function wrapped() {\n var params = slice.call(arguments, 0)\n var callback = fn.length > params.length\n var result\n\n if (callback) {\n params.push(done)\n }\n\n try {\n result = fn.apply(null, params)\n } catch (error) {\n // Well, this is quite the pickle.\n // `fn` received a callback and invoked it (thus continuing the pipeline),\n // but later also threw an error.\n // We’re not about to restart the pipeline again, so the only thing left\n // to do is to throw the thing instead.\n if (callback && invoked) {\n throw error\n }\n\n return done(error)\n }\n\n if (!callback) {\n if (result && 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 // Invoke `next`, only once.\n function done() {\n if (!invoked) {\n invoked = true\n\n callback.apply(null, arguments)\n }\n }\n\n // Invoke `done` with one value.\n // Tracks if an error is passed, too.\n function then(value) {\n done(null, value)\n }\n}\n","'use strict'\n\nvar bail = require('bail')\nvar buffer = require('is-buffer')\nvar extend = require('extend')\nvar plain = require('is-plain-obj')\nvar trough = require('trough')\nvar vfile = require('vfile')\n\n// Expose a frozen processor.\nmodule.exports = unified().freeze()\n\nvar slice = [].slice\nvar own = {}.hasOwnProperty\n\n// Process pipeline.\nvar pipeline = trough()\n .use(pipelineParse)\n .use(pipelineRun)\n .use(pipelineStringify)\n\nfunction pipelineParse(p, ctx) {\n ctx.tree = p.parse(ctx.file)\n}\n\nfunction pipelineRun(p, ctx, next) {\n p.run(ctx.tree, ctx.file, done)\n\n function done(error, tree, file) {\n if (error) {\n next(error)\n } else {\n ctx.tree = tree\n ctx.file = file\n next()\n }\n }\n}\n\nfunction pipelineStringify(p, ctx) {\n var result = p.stringify(ctx.tree, ctx.file)\n\n if (result === undefined || result === null) {\n // Empty.\n } else if (typeof result === 'string' || buffer(result)) {\n if ('value' in ctx.file) {\n ctx.file.value = result\n }\n\n ctx.file.contents = result\n } else {\n ctx.file.result = result\n }\n}\n\n// Function to create the first processor.\nfunction unified() {\n var attachers = []\n var transformers = trough()\n var namespace = {}\n var freezeIndex = -1\n var frozen\n\n // Data management.\n processor.data = data\n\n // Lock.\n processor.freeze = freeze\n\n // Plugins.\n processor.attachers = attachers\n processor.use = use\n\n // API.\n processor.parse = parse\n processor.stringify = stringify\n processor.run = run\n processor.runSync = runSync\n processor.process = process\n processor.processSync = processSync\n\n // Expose.\n return processor\n\n // Create a new processor based on the processor in the current scope.\n function processor() {\n var destination = unified()\n var index = -1\n\n while (++index < attachers.length) {\n destination.use.apply(null, attachers[index])\n }\n\n destination.data(extend(true, {}, namespace))\n\n return destination\n }\n\n // Freeze: used to signal a processor that has finished configuration.\n //\n // For example, take unified itself: it’s frozen.\n // Plugins should not be added to it.\n // Rather, it should be extended, by invoking it, before modifying it.\n //\n // In essence, always invoke this when exporting a processor.\n function freeze() {\n var values\n var transformer\n\n if (frozen) {\n return processor\n }\n\n while (++freezeIndex < attachers.length) {\n values = attachers[freezeIndex]\n\n if (values[1] === false) {\n continue\n }\n\n if (values[1] === true) {\n values[1] = undefined\n }\n\n transformer = values[0].apply(processor, values.slice(1))\n\n if (typeof transformer === 'function') {\n transformers.use(transformer)\n }\n }\n\n frozen = true\n freezeIndex = Infinity\n\n return processor\n }\n\n // Data management.\n // Getter / setter for processor-specific informtion.\n function data(key, value) {\n if (typeof key === 'string') {\n // Set `key`.\n if (arguments.length === 2) {\n assertUnfrozen('data', frozen)\n namespace[key] = value\n return processor\n }\n\n // Get `key`.\n return (own.call(namespace, key) && namespace[key]) || null\n }\n\n // Set space.\n if (key) {\n assertUnfrozen('data', frozen)\n namespace = key\n return processor\n }\n\n // Get space.\n return namespace\n }\n\n // Plugin management.\n //\n // Pass it:\n // * an attacher and options,\n // * a preset,\n // * a list of presets, attachers, and arguments (list of attachers and\n // options).\n function use(value) {\n var settings\n\n assertUnfrozen('use', frozen)\n\n if (value === null || value === undefined) {\n // Empty.\n } else if (typeof value === 'function') {\n addPlugin.apply(null, arguments)\n } else if (typeof value === 'object') {\n if ('length' in value) {\n addList(value)\n } else {\n addPreset(value)\n }\n } else {\n throw new Error('Expected usable value, not `' + value + '`')\n }\n\n if (settings) {\n namespace.settings = extend(namespace.settings || {}, settings)\n }\n\n return processor\n\n function addPreset(result) {\n addList(result.plugins)\n\n if (result.settings) {\n settings = extend(settings || {}, result.settings)\n }\n }\n\n function add(value) {\n if (typeof value === 'function') {\n addPlugin(value)\n } else if (typeof value === 'object') {\n if ('length' in value) {\n addPlugin.apply(null, value)\n } else {\n addPreset(value)\n }\n } else {\n throw new Error('Expected usable value, not `' + value + '`')\n }\n }\n\n function addList(plugins) {\n var index = -1\n\n if (plugins === null || plugins === undefined) {\n // Empty.\n } else if (typeof plugins === 'object' && 'length' in plugins) {\n while (++index < plugins.length) {\n add(plugins[index])\n }\n } else {\n throw new Error('Expected a list of plugins, not `' + plugins + '`')\n }\n }\n\n function addPlugin(plugin, value) {\n var entry = find(plugin)\n\n if (entry) {\n if (plain(entry[1]) && plain(value)) {\n value = extend(true, entry[1], value)\n }\n\n entry[1] = value\n } else {\n attachers.push(slice.call(arguments))\n }\n }\n }\n\n function find(plugin) {\n var index = -1\n\n while (++index < attachers.length) {\n if (attachers[index][0] === plugin) {\n return attachers[index]\n }\n }\n }\n\n // Parse a file (in string or vfile representation) into a unist node using\n // the `Parser` on the processor.\n function parse(doc) {\n var file = vfile(doc)\n var Parser\n\n freeze()\n Parser = processor.Parser\n assertParser('parse', Parser)\n\n if (newable(Parser, 'parse')) {\n return new Parser(String(file), file).parse()\n }\n\n return Parser(String(file), file) // eslint-disable-line new-cap\n }\n\n // Run transforms on a unist node representation of a file (in string or\n // vfile representation), async.\n function run(node, file, cb) {\n assertNode(node)\n freeze()\n\n if (!cb && typeof file === 'function') {\n cb = file\n file = null\n }\n\n if (!cb) {\n return new Promise(executor)\n }\n\n executor(null, cb)\n\n function executor(resolve, reject) {\n transformers.run(node, vfile(file), done)\n\n function done(error, tree, file) {\n tree = tree || node\n if (error) {\n reject(error)\n } else if (resolve) {\n resolve(tree)\n } else {\n cb(null, tree, file)\n }\n }\n }\n }\n\n // Run transforms on a unist node representation of a file (in string or\n // vfile representation), sync.\n function runSync(node, file) {\n var result\n var complete\n\n run(node, file, done)\n\n assertDone('runSync', 'run', complete)\n\n return result\n\n function done(error, tree) {\n complete = true\n result = tree\n bail(error)\n }\n }\n\n // Stringify a unist node representation of a file (in string or vfile\n // representation) into a string using the `Compiler` on the processor.\n function stringify(node, doc) {\n var file = vfile(doc)\n var Compiler\n\n freeze()\n Compiler = processor.Compiler\n assertCompiler('stringify', Compiler)\n assertNode(node)\n\n if (newable(Compiler, 'compile')) {\n return new Compiler(node, file).compile()\n }\n\n return Compiler(node, file) // eslint-disable-line new-cap\n }\n\n // Parse a file (in string or vfile representation) into a unist node using\n // the `Parser` on the processor, then run transforms on that node, and\n // compile the resulting node using the `Compiler` on the processor, and\n // store that result on the vfile.\n function process(doc, cb) {\n freeze()\n assertParser('process', processor.Parser)\n assertCompiler('process', processor.Compiler)\n\n if (!cb) {\n return new Promise(executor)\n }\n\n executor(null, cb)\n\n function executor(resolve, reject) {\n var file = vfile(doc)\n\n pipeline.run(processor, {file: file}, done)\n\n function done(error) {\n if (error) {\n reject(error)\n } else if (resolve) {\n resolve(file)\n } else {\n cb(null, file)\n }\n }\n }\n }\n\n // Process the given document (in string or vfile representation), sync.\n function processSync(doc) {\n var file\n var complete\n\n freeze()\n assertParser('processSync', processor.Parser)\n assertCompiler('processSync', processor.Compiler)\n file = vfile(doc)\n\n process(file, done)\n\n assertDone('processSync', 'process', complete)\n\n return file\n\n function done(error) {\n complete = true\n bail(error)\n }\n }\n}\n\n// Check if `value` is a constructor.\nfunction newable(value, name) {\n return (\n typeof value === 'function' &&\n value.prototype &&\n // A function with keys in its prototype is probably a constructor.\n // Classes’ prototype methods are not enumerable, so we check if some value\n // exists in the prototype.\n (keys(value.prototype) || name in value.prototype)\n )\n}\n\n// Check if `value` is an object with keys.\nfunction keys(value) {\n var key\n for (key in value) {\n return true\n }\n\n return false\n}\n\n// Assert a parser is available.\nfunction assertParser(name, Parser) {\n if (typeof Parser !== 'function') {\n throw new Error('Cannot `' + name + '` without `Parser`')\n }\n}\n\n// Assert a compiler is available.\nfunction assertCompiler(name, Compiler) {\n if (typeof Compiler !== 'function') {\n throw new Error('Cannot `' + name + '` without `Compiler`')\n }\n}\n\n// Assert the processor is not frozen.\nfunction assertUnfrozen(name, frozen) {\n if (frozen) {\n throw new Error(\n 'Cannot invoke `' +\n name +\n '` on a frozen processor.\\nCreate a new processor first, by invoking it: use `processor()` instead of `processor`.'\n )\n }\n}\n\n// Assert `node` is a unist node.\nfunction assertNode(node) {\n if (!node || typeof node.type !== 'string') {\n throw new Error('Expected node, got `' + node + '`')\n }\n}\n\n// Assert that `complete` is `true`.\nfunction assertDone(name, asyncName, complete) {\n if (!complete) {\n throw new Error(\n '`' + name + '` finished async. Use `' + asyncName + '` instead'\n )\n }\n}\n","'use strict'\n\nvar own = {}.hasOwnProperty\n\nmodule.exports = stringify\n\nfunction stringify(value) {\n // Nothing.\n if (!value || typeof value !== 'object') {\n return ''\n }\n\n // Node.\n if (own.call(value, 'position') || own.call(value, 'type')) {\n return position(value.position)\n }\n\n // Position.\n if (own.call(value, 'start') || own.call(value, 'end')) {\n return position(value)\n }\n\n // Point.\n if (own.call(value, 'line') || own.call(value, 'column')) {\n return point(value)\n }\n\n // ?\n return ''\n}\n\nfunction point(point) {\n if (!point || typeof point !== 'object') {\n point = {}\n }\n\n return index(point.line) + ':' + index(point.column)\n}\n\nfunction position(pos) {\n if (!pos || typeof pos !== 'object') {\n pos = {}\n }\n\n return point(pos.start) + '-' + point(pos.end)\n}\n\nfunction index(value) {\n return value && typeof value === 'number' ? value : 1\n}\n","'use strict'\n\nvar stringify = require('unist-util-stringify-position')\n\nmodule.exports = VMessage\n\n// Inherit from `Error#`.\nfunction VMessagePrototype() {}\nVMessagePrototype.prototype = Error.prototype\nVMessage.prototype = new VMessagePrototype()\n\n// Message properties.\nvar proto = VMessage.prototype\n\nproto.file = ''\nproto.name = ''\nproto.reason = ''\nproto.message = ''\nproto.stack = ''\nproto.fatal = null\nproto.column = null\nproto.line = null\n\n// Construct a new VMessage.\n//\n// Note: We cannot invoke `Error` on the created context, as that adds readonly\n// `line` and `column` attributes on Safari 9, thus throwing and failing the\n// data.\nfunction VMessage(reason, position, origin) {\n var parts\n var range\n var location\n\n if (typeof position === 'string') {\n origin = position\n position = null\n }\n\n parts = parseOrigin(origin)\n range = stringify(position) || '1:1'\n\n location = {\n start: {line: null, column: null},\n end: {line: null, column: null}\n }\n\n // Node.\n if (position && position.position) {\n position = position.position\n }\n\n if (position) {\n // Position.\n if (position.start) {\n location = position\n position = position.start\n } else {\n // Point.\n location.start = position\n }\n }\n\n if (reason.stack) {\n this.stack = reason.stack\n reason = reason.message\n }\n\n this.message = reason\n this.name = range\n this.reason = reason\n this.line = position ? position.line : null\n this.column = position ? position.column : null\n this.location = location\n this.source = parts[0]\n this.ruleId = parts[1]\n}\n\nfunction parseOrigin(origin) {\n var result = [null, null]\n var index\n\n if (typeof origin === 'string') {\n index = origin.indexOf(':')\n\n if (index === -1) {\n result[1] = origin\n } else {\n result[0] = origin.slice(0, index)\n result[1] = origin.slice(index + 1)\n }\n }\n\n return result\n}\n","'use strict'\n\nmodule.exports = require('./lib')\n","'use strict'\n\nvar p = require('./minpath')\nvar proc = require('./minproc')\nvar buffer = require('is-buffer')\n\nmodule.exports = VFile\n\nvar own = {}.hasOwnProperty\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.\nvar order = ['history', 'path', 'basename', 'stem', 'extname', 'dirname']\n\nVFile.prototype.toString = toString\n\n// Access full path (`~/index.min.js`).\nObject.defineProperty(VFile.prototype, 'path', {get: getPath, set: setPath})\n\n// Access parent path (`~`).\nObject.defineProperty(VFile.prototype, 'dirname', {\n get: getDirname,\n set: setDirname\n})\n\n// Access basename (`index.min.js`).\nObject.defineProperty(VFile.prototype, 'basename', {\n get: getBasename,\n set: setBasename\n})\n\n// Access extname (`.js`).\nObject.defineProperty(VFile.prototype, 'extname', {\n get: getExtname,\n set: setExtname\n})\n\n// Access stem (`index.min`).\nObject.defineProperty(VFile.prototype, 'stem', {get: getStem, set: setStem})\n\n// Construct a new file.\nfunction VFile(options) {\n var prop\n var index\n\n if (!options) {\n options = {}\n } else if (typeof options === 'string' || buffer(options)) {\n options = {contents: options}\n } else if ('message' in options && 'messages' in options) {\n return options\n }\n\n if (!(this instanceof VFile)) {\n return new VFile(options)\n }\n\n this.data = {}\n this.messages = []\n this.history = []\n this.cwd = proc.cwd()\n\n // Set path related properties in the correct order.\n index = -1\n\n while (++index < order.length) {\n prop = order[index]\n\n if (own.call(options, prop)) {\n this[prop] = options[prop]\n }\n }\n\n // Set non-path related properties.\n for (prop in options) {\n if (order.indexOf(prop) < 0) {\n this[prop] = options[prop]\n }\n }\n}\n\nfunction getPath() {\n return this.history[this.history.length - 1]\n}\n\nfunction setPath(path) {\n assertNonEmpty(path, 'path')\n\n if (this.path !== path) {\n this.history.push(path)\n }\n}\n\nfunction getDirname() {\n return typeof this.path === 'string' ? p.dirname(this.path) : undefined\n}\n\nfunction setDirname(dirname) {\n assertPath(this.path, 'dirname')\n this.path = p.join(dirname || '', this.basename)\n}\n\nfunction getBasename() {\n return typeof this.path === 'string' ? p.basename(this.path) : undefined\n}\n\nfunction setBasename(basename) {\n assertNonEmpty(basename, 'basename')\n assertPart(basename, 'basename')\n this.path = p.join(this.dirname || '', basename)\n}\n\nfunction getExtname() {\n return typeof this.path === 'string' ? p.extname(this.path) : undefined\n}\n\nfunction setExtname(extname) {\n assertPart(extname, 'extname')\n assertPath(this.path, 'extname')\n\n if (extname) {\n if (extname.charCodeAt(0) !== 46 /* `.` */) {\n throw new Error('`extname` must start with `.`')\n }\n\n if (extname.indexOf('.', 1) > -1) {\n throw new Error('`extname` cannot contain multiple dots')\n }\n }\n\n this.path = p.join(this.dirname, this.stem + (extname || ''))\n}\n\nfunction getStem() {\n return typeof this.path === 'string'\n ? p.basename(this.path, this.extname)\n : undefined\n}\n\nfunction setStem(stem) {\n assertNonEmpty(stem, 'stem')\n assertPart(stem, 'stem')\n this.path = p.join(this.dirname || '', stem + (this.extname || ''))\n}\n\n// Get the value of the file.\nfunction toString(encoding) {\n return (this.contents || '').toString(encoding)\n}\n\n// Assert that `part` is not a path (i.e., does not contain `p.sep`).\nfunction assertPart(part, name) {\n if (part && part.indexOf(p.sep) > -1) {\n throw new Error(\n '`' + name + '` cannot be a path: did not expect `' + p.sep + '`'\n )\n }\n}\n\n// Assert that `part` is not empty.\nfunction assertNonEmpty(part, name) {\n if (!part) {\n throw new Error('`' + name + '` cannot be empty')\n }\n}\n\n// Assert `path` exists.\nfunction assertPath(path, name) {\n if (!path) {\n throw new Error('Setting `' + name + '` requires `path` to be set too')\n }\n}\n","'use strict'\n\nvar VMessage = require('vfile-message')\nvar VFile = require('./core.js')\n\nmodule.exports = VFile\n\nVFile.prototype.message = message\nVFile.prototype.info = info\nVFile.prototype.fail = fail\n\n// Create a message with `reason` at `position`.\n// When an error is passed in as `reason`, copies the stack.\nfunction message(reason, position, origin) {\n var message = new VMessage(reason, position, origin)\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// Fail: creates a vmessage, associates it with the file, and throws it.\nfunction fail() {\n var message = this.message.apply(this, arguments)\n\n message.fatal = true\n\n throw message\n}\n\n// Info: creates a vmessage, associates it with the file, and marks the fatality\n// as null.\nfunction info() {\n var message = this.message.apply(this, arguments)\n\n message.fatal = null\n\n return message\n}\n","'use strict'\n\n// A derivative work based on:\n// .\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// .\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\nexports.basename = basename\nexports.dirname = dirname\nexports.extname = extname\nexports.join = join\nexports.sep = '/'\n\nfunction basename(path, ext) {\n var start = 0\n var end = -1\n var index\n var firstNonSlashEnd\n var seenNonSlash\n var extIndex\n\n if (ext !== undefined && typeof ext !== 'string') {\n throw new TypeError('\"ext\" argument must be a string')\n }\n\n assertPath(path)\n index = path.length\n\n if (ext === undefined || !ext.length || ext.length > path.length) {\n while (index--) {\n if (path.charCodeAt(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 (ext === path) {\n return ''\n }\n\n firstNonSlashEnd = -1\n extIndex = ext.length - 1\n\n while (index--) {\n if (path.charCodeAt(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 (extIndex > -1) {\n // Try to match the explicit extension.\n if (path.charCodeAt(index) === ext.charCodeAt(extIndex--)) {\n if (extIndex < 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 extIndex = -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\nfunction dirname(path) {\n var end\n var unmatchedSlash\n var index\n\n assertPath(path)\n\n if (!path.length) {\n return '.'\n }\n\n end = -1\n index = path.length\n\n // Prefix `--` is important to not run on `0`.\n while (--index) {\n if (path.charCodeAt(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.charCodeAt(0) === 47 /* `/` */\n ? '/'\n : '.'\n : end === 1 && path.charCodeAt(0) === 47 /* `/` */\n ? '//'\n : path.slice(0, end)\n}\n\nfunction extname(path) {\n var startDot = -1\n var startPart = 0\n var end = -1\n // Track the state of characters (if any) we see before our first dot and\n // after any path separator we find.\n var preDotState = 0\n var unmatchedSlash\n var code\n var index\n\n assertPath(path)\n\n index = path.length\n\n while (index--) {\n code = path.charCodeAt(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\nfunction join() {\n var index = -1\n var joined\n\n while (++index < arguments.length) {\n assertPath(arguments[index])\n\n if (arguments[index]) {\n joined =\n joined === undefined\n ? arguments[index]\n : joined + '/' + arguments[index]\n }\n }\n\n return joined === undefined ? '.' : normalize(joined)\n}\n\n// Note: `normalize` is not exposed as `path.normalize`, so some code is\n// manually removed from it.\nfunction normalize(path) {\n var absolute\n var value\n\n assertPath(path)\n\n absolute = path.charCodeAt(0) === 47 /* `/` */\n\n // Normalize the path according to POSIX rules.\n value = normalizeString(path, !absolute)\n\n if (!value.length && !absolute) {\n value = '.'\n }\n\n if (value.length && path.charCodeAt(path.length - 1) === 47 /* / */) {\n value += '/'\n }\n\n return absolute ? '/' + value : value\n}\n\n// Resolve `.` and `..` elements in a path with directory names.\nfunction normalizeString(path, allowAboveRoot) {\n var result = ''\n var lastSegmentLength = 0\n var lastSlash = -1\n var dots = 0\n var index = -1\n var code\n var lastSlashIndex\n\n while (++index <= path.length) {\n if (index < path.length) {\n code = path.charCodeAt(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.charCodeAt(result.length - 1) !== 46 /* `.` */ ||\n result.charCodeAt(result.length - 2) !== 46 /* `.` */\n ) {\n if (result.length > 2) {\n lastSlashIndex = result.lastIndexOf('/')\n\n /* istanbul ignore else - No clue how to cover it. */\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) {\n result = ''\n lastSegmentLength = 0\n lastSlash = index\n dots = 0\n continue\n }\n }\n\n if (allowAboveRoot) {\n result = result.length ? result + '/..' : '..'\n lastSegmentLength = 2\n }\n } else {\n if (result.length) {\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\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","'use strict'\n\n// Somewhat based on:\n// .\n// But I don’t think one tiny line of code can be copyrighted. 😅\nexports.cwd = cwd\n\nfunction cwd() {\n return '/'\n}\n","/*!\n * repeat-string \n *\n * Copyright (c) 2014-2015, Jon Schlinkert.\n * Licensed under the MIT License.\n */\n\n'use strict';\n\n/**\n * Results cache\n */\n\nvar res = '';\nvar cache;\n\n/**\n * Expose `repeat`\n */\n\nmodule.exports = repeat;\n\n/**\n * Repeat the given `string` the specified `number`\n * of times.\n *\n * **Example:**\n *\n * ```js\n * var repeat = require('repeat-string');\n * repeat('A', 5);\n * //=> AAAAA\n * ```\n *\n * @param {String} `string` The string to repeat\n * @param {Number} `number` The number of times to repeat the string\n * @return {String} Repeated string\n * @api public\n */\n\nfunction repeat(str, num) {\n if (typeof str !== 'string') {\n throw new TypeError('expected a string');\n }\n\n // cover common, quick use cases\n if (num === 1) return str;\n if (num === 2) return str + str;\n\n var max = str.length * num;\n if (cache !== str || typeof cache === 'undefined') {\n cache = str;\n res = '';\n } else if (res.length >= max) {\n return res.substr(0, max);\n }\n\n while (max > res.length && num > 1) {\n if (num & 1) {\n res += str;\n }\n\n num >>= 1;\n str += str;\n }\n\n res += str;\n res = res.substr(0, max);\n return res;\n}\n","/**\n * @license React\n * scheduler.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';function f(a,b){var c=a.length;a.push(b);a:for(;0>>1,e=a[d];if(0>>1;dg(C,c))ng(x,C)?(a[d]=x,a[n]=c,d=n):(a[d]=C,a[m]=c,d=m);else if(ng(x,c))a[d]=x,a[n]=c,d=n;else break a}}return b}\nfunction g(a,b){var c=a.sortIndex-b.sortIndex;return 0!==c?c:a.id-b.id}if(\"object\"===typeof performance&&\"function\"===typeof performance.now){var l=performance;exports.unstable_now=function(){return l.now()}}else{var p=Date,q=p.now();exports.unstable_now=function(){return p.now()-q}}var r=[],t=[],u=1,v=null,y=3,z=!1,A=!1,B=!1,D=\"function\"===typeof setTimeout?setTimeout:null,E=\"function\"===typeof clearTimeout?clearTimeout:null,F=\"undefined\"!==typeof setImmediate?setImmediate:null;\n\"undefined\"!==typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function G(a){for(var b=h(t);null!==b;){if(null===b.callback)k(t);else if(b.startTime<=a)k(t),b.sortIndex=b.expirationTime,f(r,b);else break;b=h(t)}}function H(a){B=!1;G(a);if(!A)if(null!==h(r))A=!0,I(J);else{var b=h(t);null!==b&&K(H,b.startTime-a)}}\nfunction J(a,b){A=!1;B&&(B=!1,E(L),L=-1);z=!0;var c=y;try{G(b);for(v=h(r);null!==v&&(!(v.expirationTime>b)||a&&!M());){var d=v.callback;if(\"function\"===typeof d){v.callback=null;y=v.priorityLevel;var e=d(v.expirationTime<=b);b=exports.unstable_now();\"function\"===typeof e?v.callback=e:v===h(r)&&k(r);G(b)}else k(r);v=h(r)}if(null!==v)var w=!0;else{var m=h(t);null!==m&&K(H,m.startTime-b);w=!1}return w}finally{v=null,y=c,z=!1}}var N=!1,O=null,L=-1,P=5,Q=-1;\nfunction M(){return exports.unstable_now()-Qa||125d?(a.sortIndex=c,f(t,a),null===h(r)&&a===h(t)&&(B?(E(L),L=-1):B=!0,K(H,c-d))):(a.sortIndex=e,f(r,a),A||z||(A=!0,I(J)));return a};\nexports.unstable_shouldYield=M;exports.unstable_wrapCallback=function(a){var b=y;return function(){var c=y;y=b;try{return a.apply(this,arguments)}finally{y=c}}};\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/scheduler.production.min.js');\n} else {\n module.exports = require('./cjs/scheduler.development.js');\n}\n","//\n\nmodule.exports = function shallowEqual(objA, objB, compare, compareContext) {\n var ret = compare ? compare.call(compareContext, objA, objB) : void 0;\n\n if (ret !== void 0) {\n return !!ret;\n }\n\n if (objA === objB) {\n return true;\n }\n\n if (typeof objA !== \"object\" || !objA || typeof objB !== \"object\" || !objB) {\n return false;\n }\n\n var keysA = Object.keys(objA);\n var keysB = Object.keys(objB);\n\n if (keysA.length !== keysB.length) {\n return false;\n }\n\n var bHasOwnProperty = Object.prototype.hasOwnProperty.bind(objB);\n\n // Test for A's keys different from B.\n for (var idx = 0; idx < keysA.length; idx++) {\n var key = keysA[idx];\n\n if (!bHasOwnProperty(key)) {\n return false;\n }\n\n var valueA = objA[key];\n var valueB = objB[key];\n\n ret = compare ? compare.call(compareContext, valueA, valueB, key) : void 0;\n\n if (ret === false || (ret === void 0 && valueA !== valueB)) {\n return false;\n }\n }\n\n return true;\n};\n","import parse from 'inline-style-parser';\nimport type { Declaration } from 'inline-style-parser';\n\nexport { Declaration };\n\ninterface StyleObject {\n [name: string]: string;\n}\n\ntype Iterator = (\n property: string,\n value: string,\n declaration: Declaration,\n) => void;\n\n/**\n * Parses inline style to object.\n *\n * @param style - Inline style.\n * @param iterator - Iterator.\n * @returns - Style object or null.\n *\n * @example Parsing inline style to object:\n *\n * ```js\n * import parse from 'style-to-object';\n * parse('line-height: 42;'); // { 'line-height': '42' }\n * ```\n */\nexport default function StyleToObject(\n style: string,\n iterator?: Iterator,\n): StyleObject | null {\n let styleObject: StyleObject | null = null;\n\n if (!style || typeof style !== 'string') {\n return styleObject;\n }\n\n const declarations = parse(style);\n const hasIterator = typeof iterator === 'function';\n\n declarations.forEach((declaration) => {\n if (declaration.type !== 'declaration') {\n return;\n }\n\n const { property, value } = declaration;\n\n if (hasIterator) {\n iterator(property, value, declaration);\n } else if (value) {\n styleObject = styleObject || {};\n styleObject[property] = value;\n }\n });\n\n return styleObject;\n}\n","function _arrayLikeToArray(r, a) {\n (null == a || a > r.length) && (a = r.length);\n for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];\n return n;\n}\nmodule.exports = _arrayLikeToArray, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _arrayWithHoles(r) {\n if (Array.isArray(r)) return r;\n}\nmodule.exports = _arrayWithHoles, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var arrayLikeToArray = require(\"./arrayLikeToArray.js\");\nfunction _arrayWithoutHoles(r) {\n if (Array.isArray(r)) return arrayLikeToArray(r);\n}\nmodule.exports = _arrayWithoutHoles, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var toPropertyKey = require(\"./toPropertyKey.js\");\nfunction _defineProperty(e, r, t) {\n return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {\n value: t,\n enumerable: !0,\n configurable: !0,\n writable: !0\n }) : e[r] = t, e;\n}\nmodule.exports = _defineProperty, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _extends() {\n return (module.exports = _extends = Object.assign ? Object.assign.bind() : function (n) {\n for (var e = 1; e < arguments.length; e++) {\n var t = arguments[e];\n for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);\n }\n return n;\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports), _extends.apply(null, arguments);\n}\nmodule.exports = _extends, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _interopRequireDefault(e) {\n return e && e.__esModule ? e : {\n \"default\": e\n };\n}\nmodule.exports = _interopRequireDefault, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var _typeof = require(\"./typeof.js\")[\"default\"];\nfunction _getRequireWildcardCache(e) {\n if (\"function\" != typeof WeakMap) return null;\n var r = new WeakMap(),\n t = new WeakMap();\n return (_getRequireWildcardCache = function _getRequireWildcardCache(e) {\n return e ? t : r;\n })(e);\n}\nfunction _interopRequireWildcard(e, r) {\n if (!r && e && e.__esModule) return e;\n if (null === e || \"object\" != _typeof(e) && \"function\" != typeof e) return {\n \"default\": e\n };\n var t = _getRequireWildcardCache(r);\n if (t && t.has(e)) return t.get(e);\n var n = {\n __proto__: null\n },\n a = Object.defineProperty && Object.getOwnPropertyDescriptor;\n for (var u in e) if (\"default\" !== u && {}.hasOwnProperty.call(e, u)) {\n var i = a ? Object.getOwnPropertyDescriptor(e, u) : null;\n i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u];\n }\n return n[\"default\"] = e, t && t.set(e, n), n;\n}\nmodule.exports = _interopRequireWildcard, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _iterableToArray(r) {\n if (\"undefined\" != typeof Symbol && null != r[Symbol.iterator] || null != r[\"@@iterator\"]) return Array.from(r);\n}\nmodule.exports = _iterableToArray, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _iterableToArrayLimit(r, l) {\n var t = null == r ? null : \"undefined\" != typeof Symbol && r[Symbol.iterator] || r[\"@@iterator\"];\n if (null != t) {\n var e,\n n,\n i,\n u,\n a = [],\n f = !0,\n o = !1;\n try {\n if (i = (t = t.call(r)).next, 0 === l) {\n if (Object(t) !== t) return;\n f = !1;\n } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);\n } catch (r) {\n o = !0, n = r;\n } finally {\n try {\n if (!f && null != t[\"return\"] && (u = t[\"return\"](), Object(u) !== u)) return;\n } finally {\n if (o) throw n;\n }\n }\n return a;\n }\n}\nmodule.exports = _iterableToArrayLimit, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\nmodule.exports = _nonIterableRest, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\nmodule.exports = _nonIterableSpread, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _objectDestructuringEmpty(t) {\n if (null == t) throw new TypeError(\"Cannot destructure \" + t);\n}\nmodule.exports = _objectDestructuringEmpty, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var defineProperty = require(\"./defineProperty.js\");\nfunction ownKeys(e, r) {\n var t = Object.keys(e);\n if (Object.getOwnPropertySymbols) {\n var o = Object.getOwnPropertySymbols(e);\n r && (o = o.filter(function (r) {\n return Object.getOwnPropertyDescriptor(e, r).enumerable;\n })), t.push.apply(t, o);\n }\n return t;\n}\nfunction _objectSpread2(e) {\n for (var r = 1; r < arguments.length; r++) {\n var t = null != arguments[r] ? arguments[r] : {};\n r % 2 ? ownKeys(Object(t), !0).forEach(function (r) {\n defineProperty(e, r, t[r]);\n }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) {\n Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));\n });\n }\n return e;\n}\nmodule.exports = _objectSpread2, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var objectWithoutPropertiesLoose = require(\"./objectWithoutPropertiesLoose.js\");\nfunction _objectWithoutProperties(e, t) {\n if (null == e) return {};\n var o,\n r,\n i = objectWithoutPropertiesLoose(e, t);\n if (Object.getOwnPropertySymbols) {\n var s = Object.getOwnPropertySymbols(e);\n for (r = 0; r < s.length; r++) o = s[r], t.includes(o) || {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]);\n }\n return i;\n}\nmodule.exports = _objectWithoutProperties, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _objectWithoutPropertiesLoose(r, e) {\n if (null == r) return {};\n var t = {};\n for (var n in r) if ({}.hasOwnProperty.call(r, n)) {\n if (e.includes(n)) continue;\n t[n] = r[n];\n }\n return t;\n}\nmodule.exports = _objectWithoutPropertiesLoose, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var arrayWithHoles = require(\"./arrayWithHoles.js\");\nvar iterableToArrayLimit = require(\"./iterableToArrayLimit.js\");\nvar unsupportedIterableToArray = require(\"./unsupportedIterableToArray.js\");\nvar nonIterableRest = require(\"./nonIterableRest.js\");\nfunction _slicedToArray(r, e) {\n return arrayWithHoles(r) || iterableToArrayLimit(r, e) || unsupportedIterableToArray(r, e) || nonIterableRest();\n}\nmodule.exports = _slicedToArray, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var arrayWithoutHoles = require(\"./arrayWithoutHoles.js\");\nvar iterableToArray = require(\"./iterableToArray.js\");\nvar unsupportedIterableToArray = require(\"./unsupportedIterableToArray.js\");\nvar nonIterableSpread = require(\"./nonIterableSpread.js\");\nfunction _toConsumableArray(r) {\n return arrayWithoutHoles(r) || iterableToArray(r) || unsupportedIterableToArray(r) || nonIterableSpread();\n}\nmodule.exports = _toConsumableArray, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var _typeof = require(\"./typeof.js\")[\"default\"];\nfunction toPrimitive(t, r) {\n if (\"object\" != _typeof(t) || !t) return t;\n var e = t[Symbol.toPrimitive];\n if (void 0 !== e) {\n var i = e.call(t, r || \"default\");\n if (\"object\" != _typeof(i)) return i;\n throw new TypeError(\"@@toPrimitive must return a primitive value.\");\n }\n return (\"string\" === r ? String : Number)(t);\n}\nmodule.exports = toPrimitive, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var _typeof = require(\"./typeof.js\")[\"default\"];\nvar toPrimitive = require(\"./toPrimitive.js\");\nfunction toPropertyKey(t) {\n var i = toPrimitive(t, \"string\");\n return \"symbol\" == _typeof(i) ? i : i + \"\";\n}\nmodule.exports = toPropertyKey, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _typeof(o) {\n \"@babel/helpers - typeof\";\n\n return (module.exports = _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) {\n return typeof o;\n } : function (o) {\n return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o;\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports), _typeof(o);\n}\nmodule.exports = _typeof, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var arrayLikeToArray = require(\"./arrayLikeToArray.js\");\nfunction _unsupportedIterableToArray(r, a) {\n if (r) {\n if (\"string\" == typeof r) return arrayLikeToArray(r, a);\n var t = {}.toString.call(r).slice(8, -1);\n return \"Object\" === t && r.constructor && (t = r.constructor.name), \"Map\" === t || \"Set\" === t ? Array.from(r) : \"Arguments\" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? arrayLikeToArray(r, a) : void 0;\n }\n}\nmodule.exports = _unsupportedIterableToArray, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","export default function shallowEqual(\n actual: object,\n expected: T,\n): actual is T {\n const keys = Object.keys(expected) as (keyof T)[];\n\n for (const key of keys) {\n if (\n // @ts-expect-error maybe we should check whether key exists first\n actual[key] !== expected[key]\n ) {\n return false;\n }\n }\n\n return true;\n}\n","const warnings = new Set();\n\nexport default function deprecationWarning(\n oldName: string,\n newName: string,\n prefix: string = \"\",\n) {\n if (warnings.has(oldName)) return;\n warnings.add(oldName);\n\n const { internal, trace } = captureShortStackTrace(1, 2);\n if (internal) {\n // If usage comes from an internal package, there is no point in warning because\n // 1. The new version of the package will already use the new API\n // 2. When the deprecation will become an error (in a future major version), users\n // will have to update every package anyway.\n return;\n }\n console.warn(\n `${prefix}\\`${oldName}\\` has been deprecated, please migrate to \\`${newName}\\`\\n${trace}`,\n );\n}\n\nfunction captureShortStackTrace(skip: number, length: number) {\n const { stackTraceLimit, prepareStackTrace } = Error;\n let stackTrace: NodeJS.CallSite[];\n // We add 1 to also take into account this function.\n Error.stackTraceLimit = 1 + skip + length;\n Error.prepareStackTrace = function (err, stack) {\n stackTrace = stack;\n };\n // eslint-disable-next-line @typescript-eslint/no-unused-expressions\n new Error().stack;\n Error.stackTraceLimit = stackTraceLimit;\n Error.prepareStackTrace = prepareStackTrace;\n\n if (!stackTrace) return { internal: false, trace: \"\" };\n\n const shortStackTrace = stackTrace.slice(1 + skip, 1 + skip + length);\n return {\n internal: /[\\\\/]@babel[\\\\/]/.test(shortStackTrace[1].getFileName()),\n trace: shortStackTrace.map(frame => ` at ${frame}`).join(\"\\n\"),\n };\n}\n","/*\n * This file is auto-generated! Do not modify it directly.\n * To re-generate run 'make build'\n */\n\n/* eslint-disable no-fallthrough */\n\nimport shallowEqual from \"../../utils/shallowEqual.ts\";\nimport type * as t from \"../../index.ts\";\nimport deprecationWarning from \"../../utils/deprecationWarning.ts\";\n\ntype Opts = Partial<{\n [Prop in keyof Obj]: Obj[Prop] extends t.Node\n ? t.Node\n : Obj[Prop] extends t.Node[]\n ? t.Node[]\n : Obj[Prop];\n}>;\n\nexport function isArrayExpression(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.ArrayExpression {\n if (!node) return false;\n\n if (node.type !== \"ArrayExpression\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isAssignmentExpression(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.AssignmentExpression {\n if (!node) return false;\n\n if (node.type !== \"AssignmentExpression\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isBinaryExpression(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.BinaryExpression {\n if (!node) return false;\n\n if (node.type !== \"BinaryExpression\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isInterpreterDirective(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.InterpreterDirective {\n if (!node) return false;\n\n if (node.type !== \"InterpreterDirective\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isDirective(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.Directive {\n if (!node) return false;\n\n if (node.type !== \"Directive\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isDirectiveLiteral(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.DirectiveLiteral {\n if (!node) return false;\n\n if (node.type !== \"DirectiveLiteral\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isBlockStatement(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.BlockStatement {\n if (!node) return false;\n\n if (node.type !== \"BlockStatement\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isBreakStatement(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.BreakStatement {\n if (!node) return false;\n\n if (node.type !== \"BreakStatement\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isCallExpression(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.CallExpression {\n if (!node) return false;\n\n if (node.type !== \"CallExpression\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isCatchClause(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.CatchClause {\n if (!node) return false;\n\n if (node.type !== \"CatchClause\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isConditionalExpression(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.ConditionalExpression {\n if (!node) return false;\n\n if (node.type !== \"ConditionalExpression\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isContinueStatement(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.ContinueStatement {\n if (!node) return false;\n\n if (node.type !== \"ContinueStatement\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isDebuggerStatement(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.DebuggerStatement {\n if (!node) return false;\n\n if (node.type !== \"DebuggerStatement\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isDoWhileStatement(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.DoWhileStatement {\n if (!node) return false;\n\n if (node.type !== \"DoWhileStatement\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isEmptyStatement(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.EmptyStatement {\n if (!node) return false;\n\n if (node.type !== \"EmptyStatement\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isExpressionStatement(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.ExpressionStatement {\n if (!node) return false;\n\n if (node.type !== \"ExpressionStatement\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isFile(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.File {\n if (!node) return false;\n\n if (node.type !== \"File\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isForInStatement(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.ForInStatement {\n if (!node) return false;\n\n if (node.type !== \"ForInStatement\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isForStatement(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.ForStatement {\n if (!node) return false;\n\n if (node.type !== \"ForStatement\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isFunctionDeclaration(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.FunctionDeclaration {\n if (!node) return false;\n\n if (node.type !== \"FunctionDeclaration\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isFunctionExpression(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.FunctionExpression {\n if (!node) return false;\n\n if (node.type !== \"FunctionExpression\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isIdentifier(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.Identifier {\n if (!node) return false;\n\n if (node.type !== \"Identifier\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isIfStatement(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.IfStatement {\n if (!node) return false;\n\n if (node.type !== \"IfStatement\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isLabeledStatement(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.LabeledStatement {\n if (!node) return false;\n\n if (node.type !== \"LabeledStatement\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isStringLiteral(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.StringLiteral {\n if (!node) return false;\n\n if (node.type !== \"StringLiteral\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isNumericLiteral(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.NumericLiteral {\n if (!node) return false;\n\n if (node.type !== \"NumericLiteral\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isNullLiteral(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.NullLiteral {\n if (!node) return false;\n\n if (node.type !== \"NullLiteral\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isBooleanLiteral(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.BooleanLiteral {\n if (!node) return false;\n\n if (node.type !== \"BooleanLiteral\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isRegExpLiteral(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.RegExpLiteral {\n if (!node) return false;\n\n if (node.type !== \"RegExpLiteral\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isLogicalExpression(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.LogicalExpression {\n if (!node) return false;\n\n if (node.type !== \"LogicalExpression\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isMemberExpression(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.MemberExpression {\n if (!node) return false;\n\n if (node.type !== \"MemberExpression\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isNewExpression(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.NewExpression {\n if (!node) return false;\n\n if (node.type !== \"NewExpression\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isProgram(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.Program {\n if (!node) return false;\n\n if (node.type !== \"Program\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isObjectExpression(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.ObjectExpression {\n if (!node) return false;\n\n if (node.type !== \"ObjectExpression\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isObjectMethod(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.ObjectMethod {\n if (!node) return false;\n\n if (node.type !== \"ObjectMethod\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isObjectProperty(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.ObjectProperty {\n if (!node) return false;\n\n if (node.type !== \"ObjectProperty\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isRestElement(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.RestElement {\n if (!node) return false;\n\n if (node.type !== \"RestElement\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isReturnStatement(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.ReturnStatement {\n if (!node) return false;\n\n if (node.type !== \"ReturnStatement\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isSequenceExpression(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.SequenceExpression {\n if (!node) return false;\n\n if (node.type !== \"SequenceExpression\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isParenthesizedExpression(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.ParenthesizedExpression {\n if (!node) return false;\n\n if (node.type !== \"ParenthesizedExpression\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isSwitchCase(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.SwitchCase {\n if (!node) return false;\n\n if (node.type !== \"SwitchCase\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isSwitchStatement(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.SwitchStatement {\n if (!node) return false;\n\n if (node.type !== \"SwitchStatement\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isThisExpression(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.ThisExpression {\n if (!node) return false;\n\n if (node.type !== \"ThisExpression\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isThrowStatement(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.ThrowStatement {\n if (!node) return false;\n\n if (node.type !== \"ThrowStatement\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isTryStatement(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.TryStatement {\n if (!node) return false;\n\n if (node.type !== \"TryStatement\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isUnaryExpression(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.UnaryExpression {\n if (!node) return false;\n\n if (node.type !== \"UnaryExpression\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isUpdateExpression(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.UpdateExpression {\n if (!node) return false;\n\n if (node.type !== \"UpdateExpression\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isVariableDeclaration(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.VariableDeclaration {\n if (!node) return false;\n\n if (node.type !== \"VariableDeclaration\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isVariableDeclarator(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.VariableDeclarator {\n if (!node) return false;\n\n if (node.type !== \"VariableDeclarator\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isWhileStatement(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.WhileStatement {\n if (!node) return false;\n\n if (node.type !== \"WhileStatement\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isWithStatement(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.WithStatement {\n if (!node) return false;\n\n if (node.type !== \"WithStatement\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isAssignmentPattern(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.AssignmentPattern {\n if (!node) return false;\n\n if (node.type !== \"AssignmentPattern\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isArrayPattern(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.ArrayPattern {\n if (!node) return false;\n\n if (node.type !== \"ArrayPattern\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isArrowFunctionExpression(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.ArrowFunctionExpression {\n if (!node) return false;\n\n if (node.type !== \"ArrowFunctionExpression\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isClassBody(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.ClassBody {\n if (!node) return false;\n\n if (node.type !== \"ClassBody\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isClassExpression(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.ClassExpression {\n if (!node) return false;\n\n if (node.type !== \"ClassExpression\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isClassDeclaration(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.ClassDeclaration {\n if (!node) return false;\n\n if (node.type !== \"ClassDeclaration\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isExportAllDeclaration(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.ExportAllDeclaration {\n if (!node) return false;\n\n if (node.type !== \"ExportAllDeclaration\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isExportDefaultDeclaration(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.ExportDefaultDeclaration {\n if (!node) return false;\n\n if (node.type !== \"ExportDefaultDeclaration\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isExportNamedDeclaration(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.ExportNamedDeclaration {\n if (!node) return false;\n\n if (node.type !== \"ExportNamedDeclaration\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isExportSpecifier(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.ExportSpecifier {\n if (!node) return false;\n\n if (node.type !== \"ExportSpecifier\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isForOfStatement(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.ForOfStatement {\n if (!node) return false;\n\n if (node.type !== \"ForOfStatement\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isImportDeclaration(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.ImportDeclaration {\n if (!node) return false;\n\n if (node.type !== \"ImportDeclaration\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isImportDefaultSpecifier(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.ImportDefaultSpecifier {\n if (!node) return false;\n\n if (node.type !== \"ImportDefaultSpecifier\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isImportNamespaceSpecifier(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.ImportNamespaceSpecifier {\n if (!node) return false;\n\n if (node.type !== \"ImportNamespaceSpecifier\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isImportSpecifier(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.ImportSpecifier {\n if (!node) return false;\n\n if (node.type !== \"ImportSpecifier\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isImportExpression(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.ImportExpression {\n if (!node) return false;\n\n if (node.type !== \"ImportExpression\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isMetaProperty(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.MetaProperty {\n if (!node) return false;\n\n if (node.type !== \"MetaProperty\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isClassMethod(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.ClassMethod {\n if (!node) return false;\n\n if (node.type !== \"ClassMethod\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isObjectPattern(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.ObjectPattern {\n if (!node) return false;\n\n if (node.type !== \"ObjectPattern\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isSpreadElement(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.SpreadElement {\n if (!node) return false;\n\n if (node.type !== \"SpreadElement\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isSuper(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.Super {\n if (!node) return false;\n\n if (node.type !== \"Super\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isTaggedTemplateExpression(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.TaggedTemplateExpression {\n if (!node) return false;\n\n if (node.type !== \"TaggedTemplateExpression\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isTemplateElement(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.TemplateElement {\n if (!node) return false;\n\n if (node.type !== \"TemplateElement\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isTemplateLiteral(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.TemplateLiteral {\n if (!node) return false;\n\n if (node.type !== \"TemplateLiteral\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isYieldExpression(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.YieldExpression {\n if (!node) return false;\n\n if (node.type !== \"YieldExpression\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isAwaitExpression(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.AwaitExpression {\n if (!node) return false;\n\n if (node.type !== \"AwaitExpression\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isImport(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.Import {\n if (!node) return false;\n\n if (node.type !== \"Import\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isBigIntLiteral(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.BigIntLiteral {\n if (!node) return false;\n\n if (node.type !== \"BigIntLiteral\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isExportNamespaceSpecifier(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.ExportNamespaceSpecifier {\n if (!node) return false;\n\n if (node.type !== \"ExportNamespaceSpecifier\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isOptionalMemberExpression(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.OptionalMemberExpression {\n if (!node) return false;\n\n if (node.type !== \"OptionalMemberExpression\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isOptionalCallExpression(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.OptionalCallExpression {\n if (!node) return false;\n\n if (node.type !== \"OptionalCallExpression\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isClassProperty(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.ClassProperty {\n if (!node) return false;\n\n if (node.type !== \"ClassProperty\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isClassAccessorProperty(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.ClassAccessorProperty {\n if (!node) return false;\n\n if (node.type !== \"ClassAccessorProperty\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isClassPrivateProperty(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.ClassPrivateProperty {\n if (!node) return false;\n\n if (node.type !== \"ClassPrivateProperty\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isClassPrivateMethod(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.ClassPrivateMethod {\n if (!node) return false;\n\n if (node.type !== \"ClassPrivateMethod\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isPrivateName(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.PrivateName {\n if (!node) return false;\n\n if (node.type !== \"PrivateName\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isStaticBlock(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.StaticBlock {\n if (!node) return false;\n\n if (node.type !== \"StaticBlock\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isAnyTypeAnnotation(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.AnyTypeAnnotation {\n if (!node) return false;\n\n if (node.type !== \"AnyTypeAnnotation\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isArrayTypeAnnotation(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.ArrayTypeAnnotation {\n if (!node) return false;\n\n if (node.type !== \"ArrayTypeAnnotation\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isBooleanTypeAnnotation(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.BooleanTypeAnnotation {\n if (!node) return false;\n\n if (node.type !== \"BooleanTypeAnnotation\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isBooleanLiteralTypeAnnotation(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.BooleanLiteralTypeAnnotation {\n if (!node) return false;\n\n if (node.type !== \"BooleanLiteralTypeAnnotation\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isNullLiteralTypeAnnotation(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.NullLiteralTypeAnnotation {\n if (!node) return false;\n\n if (node.type !== \"NullLiteralTypeAnnotation\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isClassImplements(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.ClassImplements {\n if (!node) return false;\n\n if (node.type !== \"ClassImplements\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isDeclareClass(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.DeclareClass {\n if (!node) return false;\n\n if (node.type !== \"DeclareClass\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isDeclareFunction(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.DeclareFunction {\n if (!node) return false;\n\n if (node.type !== \"DeclareFunction\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isDeclareInterface(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.DeclareInterface {\n if (!node) return false;\n\n if (node.type !== \"DeclareInterface\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isDeclareModule(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.DeclareModule {\n if (!node) return false;\n\n if (node.type !== \"DeclareModule\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isDeclareModuleExports(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.DeclareModuleExports {\n if (!node) return false;\n\n if (node.type !== \"DeclareModuleExports\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isDeclareTypeAlias(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.DeclareTypeAlias {\n if (!node) return false;\n\n if (node.type !== \"DeclareTypeAlias\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isDeclareOpaqueType(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.DeclareOpaqueType {\n if (!node) return false;\n\n if (node.type !== \"DeclareOpaqueType\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isDeclareVariable(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.DeclareVariable {\n if (!node) return false;\n\n if (node.type !== \"DeclareVariable\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isDeclareExportDeclaration(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.DeclareExportDeclaration {\n if (!node) return false;\n\n if (node.type !== \"DeclareExportDeclaration\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isDeclareExportAllDeclaration(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.DeclareExportAllDeclaration {\n if (!node) return false;\n\n if (node.type !== \"DeclareExportAllDeclaration\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isDeclaredPredicate(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.DeclaredPredicate {\n if (!node) return false;\n\n if (node.type !== \"DeclaredPredicate\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isExistsTypeAnnotation(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.ExistsTypeAnnotation {\n if (!node) return false;\n\n if (node.type !== \"ExistsTypeAnnotation\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isFunctionTypeAnnotation(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.FunctionTypeAnnotation {\n if (!node) return false;\n\n if (node.type !== \"FunctionTypeAnnotation\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isFunctionTypeParam(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.FunctionTypeParam {\n if (!node) return false;\n\n if (node.type !== \"FunctionTypeParam\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isGenericTypeAnnotation(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.GenericTypeAnnotation {\n if (!node) return false;\n\n if (node.type !== \"GenericTypeAnnotation\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isInferredPredicate(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.InferredPredicate {\n if (!node) return false;\n\n if (node.type !== \"InferredPredicate\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isInterfaceExtends(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.InterfaceExtends {\n if (!node) return false;\n\n if (node.type !== \"InterfaceExtends\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isInterfaceDeclaration(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.InterfaceDeclaration {\n if (!node) return false;\n\n if (node.type !== \"InterfaceDeclaration\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isInterfaceTypeAnnotation(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.InterfaceTypeAnnotation {\n if (!node) return false;\n\n if (node.type !== \"InterfaceTypeAnnotation\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isIntersectionTypeAnnotation(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.IntersectionTypeAnnotation {\n if (!node) return false;\n\n if (node.type !== \"IntersectionTypeAnnotation\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isMixedTypeAnnotation(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.MixedTypeAnnotation {\n if (!node) return false;\n\n if (node.type !== \"MixedTypeAnnotation\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isEmptyTypeAnnotation(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.EmptyTypeAnnotation {\n if (!node) return false;\n\n if (node.type !== \"EmptyTypeAnnotation\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isNullableTypeAnnotation(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.NullableTypeAnnotation {\n if (!node) return false;\n\n if (node.type !== \"NullableTypeAnnotation\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isNumberLiteralTypeAnnotation(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.NumberLiteralTypeAnnotation {\n if (!node) return false;\n\n if (node.type !== \"NumberLiteralTypeAnnotation\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isNumberTypeAnnotation(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.NumberTypeAnnotation {\n if (!node) return false;\n\n if (node.type !== \"NumberTypeAnnotation\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isObjectTypeAnnotation(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.ObjectTypeAnnotation {\n if (!node) return false;\n\n if (node.type !== \"ObjectTypeAnnotation\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isObjectTypeInternalSlot(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.ObjectTypeInternalSlot {\n if (!node) return false;\n\n if (node.type !== \"ObjectTypeInternalSlot\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isObjectTypeCallProperty(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.ObjectTypeCallProperty {\n if (!node) return false;\n\n if (node.type !== \"ObjectTypeCallProperty\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isObjectTypeIndexer(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.ObjectTypeIndexer {\n if (!node) return false;\n\n if (node.type !== \"ObjectTypeIndexer\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isObjectTypeProperty(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.ObjectTypeProperty {\n if (!node) return false;\n\n if (node.type !== \"ObjectTypeProperty\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isObjectTypeSpreadProperty(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.ObjectTypeSpreadProperty {\n if (!node) return false;\n\n if (node.type !== \"ObjectTypeSpreadProperty\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isOpaqueType(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.OpaqueType {\n if (!node) return false;\n\n if (node.type !== \"OpaqueType\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isQualifiedTypeIdentifier(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.QualifiedTypeIdentifier {\n if (!node) return false;\n\n if (node.type !== \"QualifiedTypeIdentifier\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isStringLiteralTypeAnnotation(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.StringLiteralTypeAnnotation {\n if (!node) return false;\n\n if (node.type !== \"StringLiteralTypeAnnotation\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isStringTypeAnnotation(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.StringTypeAnnotation {\n if (!node) return false;\n\n if (node.type !== \"StringTypeAnnotation\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isSymbolTypeAnnotation(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.SymbolTypeAnnotation {\n if (!node) return false;\n\n if (node.type !== \"SymbolTypeAnnotation\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isThisTypeAnnotation(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.ThisTypeAnnotation {\n if (!node) return false;\n\n if (node.type !== \"ThisTypeAnnotation\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isTupleTypeAnnotation(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.TupleTypeAnnotation {\n if (!node) return false;\n\n if (node.type !== \"TupleTypeAnnotation\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isTypeofTypeAnnotation(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.TypeofTypeAnnotation {\n if (!node) return false;\n\n if (node.type !== \"TypeofTypeAnnotation\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isTypeAlias(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.TypeAlias {\n if (!node) return false;\n\n if (node.type !== \"TypeAlias\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isTypeAnnotation(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.TypeAnnotation {\n if (!node) return false;\n\n if (node.type !== \"TypeAnnotation\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isTypeCastExpression(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.TypeCastExpression {\n if (!node) return false;\n\n if (node.type !== \"TypeCastExpression\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isTypeParameter(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.TypeParameter {\n if (!node) return false;\n\n if (node.type !== \"TypeParameter\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isTypeParameterDeclaration(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.TypeParameterDeclaration {\n if (!node) return false;\n\n if (node.type !== \"TypeParameterDeclaration\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isTypeParameterInstantiation(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.TypeParameterInstantiation {\n if (!node) return false;\n\n if (node.type !== \"TypeParameterInstantiation\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isUnionTypeAnnotation(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.UnionTypeAnnotation {\n if (!node) return false;\n\n if (node.type !== \"UnionTypeAnnotation\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isVariance(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.Variance {\n if (!node) return false;\n\n if (node.type !== \"Variance\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isVoidTypeAnnotation(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.VoidTypeAnnotation {\n if (!node) return false;\n\n if (node.type !== \"VoidTypeAnnotation\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isEnumDeclaration(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.EnumDeclaration {\n if (!node) return false;\n\n if (node.type !== \"EnumDeclaration\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isEnumBooleanBody(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.EnumBooleanBody {\n if (!node) return false;\n\n if (node.type !== \"EnumBooleanBody\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isEnumNumberBody(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.EnumNumberBody {\n if (!node) return false;\n\n if (node.type !== \"EnumNumberBody\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isEnumStringBody(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.EnumStringBody {\n if (!node) return false;\n\n if (node.type !== \"EnumStringBody\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isEnumSymbolBody(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.EnumSymbolBody {\n if (!node) return false;\n\n if (node.type !== \"EnumSymbolBody\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isEnumBooleanMember(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.EnumBooleanMember {\n if (!node) return false;\n\n if (node.type !== \"EnumBooleanMember\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isEnumNumberMember(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.EnumNumberMember {\n if (!node) return false;\n\n if (node.type !== \"EnumNumberMember\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isEnumStringMember(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.EnumStringMember {\n if (!node) return false;\n\n if (node.type !== \"EnumStringMember\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isEnumDefaultedMember(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.EnumDefaultedMember {\n if (!node) return false;\n\n if (node.type !== \"EnumDefaultedMember\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isIndexedAccessType(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.IndexedAccessType {\n if (!node) return false;\n\n if (node.type !== \"IndexedAccessType\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isOptionalIndexedAccessType(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.OptionalIndexedAccessType {\n if (!node) return false;\n\n if (node.type !== \"OptionalIndexedAccessType\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isJSXAttribute(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.JSXAttribute {\n if (!node) return false;\n\n if (node.type !== \"JSXAttribute\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isJSXClosingElement(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.JSXClosingElement {\n if (!node) return false;\n\n if (node.type !== \"JSXClosingElement\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isJSXElement(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.JSXElement {\n if (!node) return false;\n\n if (node.type !== \"JSXElement\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isJSXEmptyExpression(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.JSXEmptyExpression {\n if (!node) return false;\n\n if (node.type !== \"JSXEmptyExpression\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isJSXExpressionContainer(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.JSXExpressionContainer {\n if (!node) return false;\n\n if (node.type !== \"JSXExpressionContainer\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isJSXSpreadChild(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.JSXSpreadChild {\n if (!node) return false;\n\n if (node.type !== \"JSXSpreadChild\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isJSXIdentifier(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.JSXIdentifier {\n if (!node) return false;\n\n if (node.type !== \"JSXIdentifier\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isJSXMemberExpression(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.JSXMemberExpression {\n if (!node) return false;\n\n if (node.type !== \"JSXMemberExpression\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isJSXNamespacedName(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.JSXNamespacedName {\n if (!node) return false;\n\n if (node.type !== \"JSXNamespacedName\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isJSXOpeningElement(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.JSXOpeningElement {\n if (!node) return false;\n\n if (node.type !== \"JSXOpeningElement\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isJSXSpreadAttribute(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.JSXSpreadAttribute {\n if (!node) return false;\n\n if (node.type !== \"JSXSpreadAttribute\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isJSXText(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.JSXText {\n if (!node) return false;\n\n if (node.type !== \"JSXText\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isJSXFragment(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.JSXFragment {\n if (!node) return false;\n\n if (node.type !== \"JSXFragment\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isJSXOpeningFragment(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.JSXOpeningFragment {\n if (!node) return false;\n\n if (node.type !== \"JSXOpeningFragment\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isJSXClosingFragment(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.JSXClosingFragment {\n if (!node) return false;\n\n if (node.type !== \"JSXClosingFragment\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isNoop(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.Noop {\n if (!node) return false;\n\n if (node.type !== \"Noop\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isPlaceholder(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.Placeholder {\n if (!node) return false;\n\n if (node.type !== \"Placeholder\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isV8IntrinsicIdentifier(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.V8IntrinsicIdentifier {\n if (!node) return false;\n\n if (node.type !== \"V8IntrinsicIdentifier\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isArgumentPlaceholder(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.ArgumentPlaceholder {\n if (!node) return false;\n\n if (node.type !== \"ArgumentPlaceholder\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isBindExpression(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.BindExpression {\n if (!node) return false;\n\n if (node.type !== \"BindExpression\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isImportAttribute(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.ImportAttribute {\n if (!node) return false;\n\n if (node.type !== \"ImportAttribute\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isDecorator(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.Decorator {\n if (!node) return false;\n\n if (node.type !== \"Decorator\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isDoExpression(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.DoExpression {\n if (!node) return false;\n\n if (node.type !== \"DoExpression\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isExportDefaultSpecifier(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.ExportDefaultSpecifier {\n if (!node) return false;\n\n if (node.type !== \"ExportDefaultSpecifier\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isRecordExpression(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.RecordExpression {\n if (!node) return false;\n\n if (node.type !== \"RecordExpression\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isTupleExpression(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.TupleExpression {\n if (!node) return false;\n\n if (node.type !== \"TupleExpression\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isDecimalLiteral(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.DecimalLiteral {\n if (!node) return false;\n\n if (node.type !== \"DecimalLiteral\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isModuleExpression(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.ModuleExpression {\n if (!node) return false;\n\n if (node.type !== \"ModuleExpression\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isTopicReference(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.TopicReference {\n if (!node) return false;\n\n if (node.type !== \"TopicReference\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isPipelineTopicExpression(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.PipelineTopicExpression {\n if (!node) return false;\n\n if (node.type !== \"PipelineTopicExpression\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isPipelineBareFunction(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.PipelineBareFunction {\n if (!node) return false;\n\n if (node.type !== \"PipelineBareFunction\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isPipelinePrimaryTopicReference(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.PipelinePrimaryTopicReference {\n if (!node) return false;\n\n if (node.type !== \"PipelinePrimaryTopicReference\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isTSParameterProperty(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.TSParameterProperty {\n if (!node) return false;\n\n if (node.type !== \"TSParameterProperty\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isTSDeclareFunction(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.TSDeclareFunction {\n if (!node) return false;\n\n if (node.type !== \"TSDeclareFunction\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isTSDeclareMethod(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.TSDeclareMethod {\n if (!node) return false;\n\n if (node.type !== \"TSDeclareMethod\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isTSQualifiedName(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.TSQualifiedName {\n if (!node) return false;\n\n if (node.type !== \"TSQualifiedName\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isTSCallSignatureDeclaration(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.TSCallSignatureDeclaration {\n if (!node) return false;\n\n if (node.type !== \"TSCallSignatureDeclaration\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isTSConstructSignatureDeclaration(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.TSConstructSignatureDeclaration {\n if (!node) return false;\n\n if (node.type !== \"TSConstructSignatureDeclaration\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isTSPropertySignature(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.TSPropertySignature {\n if (!node) return false;\n\n if (node.type !== \"TSPropertySignature\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isTSMethodSignature(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.TSMethodSignature {\n if (!node) return false;\n\n if (node.type !== \"TSMethodSignature\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isTSIndexSignature(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.TSIndexSignature {\n if (!node) return false;\n\n if (node.type !== \"TSIndexSignature\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isTSAnyKeyword(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.TSAnyKeyword {\n if (!node) return false;\n\n if (node.type !== \"TSAnyKeyword\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isTSBooleanKeyword(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.TSBooleanKeyword {\n if (!node) return false;\n\n if (node.type !== \"TSBooleanKeyword\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isTSBigIntKeyword(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.TSBigIntKeyword {\n if (!node) return false;\n\n if (node.type !== \"TSBigIntKeyword\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isTSIntrinsicKeyword(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.TSIntrinsicKeyword {\n if (!node) return false;\n\n if (node.type !== \"TSIntrinsicKeyword\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isTSNeverKeyword(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.TSNeverKeyword {\n if (!node) return false;\n\n if (node.type !== \"TSNeverKeyword\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isTSNullKeyword(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.TSNullKeyword {\n if (!node) return false;\n\n if (node.type !== \"TSNullKeyword\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isTSNumberKeyword(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.TSNumberKeyword {\n if (!node) return false;\n\n if (node.type !== \"TSNumberKeyword\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isTSObjectKeyword(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.TSObjectKeyword {\n if (!node) return false;\n\n if (node.type !== \"TSObjectKeyword\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isTSStringKeyword(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.TSStringKeyword {\n if (!node) return false;\n\n if (node.type !== \"TSStringKeyword\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isTSSymbolKeyword(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.TSSymbolKeyword {\n if (!node) return false;\n\n if (node.type !== \"TSSymbolKeyword\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isTSUndefinedKeyword(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.TSUndefinedKeyword {\n if (!node) return false;\n\n if (node.type !== \"TSUndefinedKeyword\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isTSUnknownKeyword(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.TSUnknownKeyword {\n if (!node) return false;\n\n if (node.type !== \"TSUnknownKeyword\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isTSVoidKeyword(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.TSVoidKeyword {\n if (!node) return false;\n\n if (node.type !== \"TSVoidKeyword\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isTSThisType(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.TSThisType {\n if (!node) return false;\n\n if (node.type !== \"TSThisType\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isTSFunctionType(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.TSFunctionType {\n if (!node) return false;\n\n if (node.type !== \"TSFunctionType\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isTSConstructorType(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.TSConstructorType {\n if (!node) return false;\n\n if (node.type !== \"TSConstructorType\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isTSTypeReference(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.TSTypeReference {\n if (!node) return false;\n\n if (node.type !== \"TSTypeReference\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isTSTypePredicate(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.TSTypePredicate {\n if (!node) return false;\n\n if (node.type !== \"TSTypePredicate\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isTSTypeQuery(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.TSTypeQuery {\n if (!node) return false;\n\n if (node.type !== \"TSTypeQuery\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isTSTypeLiteral(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.TSTypeLiteral {\n if (!node) return false;\n\n if (node.type !== \"TSTypeLiteral\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isTSArrayType(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.TSArrayType {\n if (!node) return false;\n\n if (node.type !== \"TSArrayType\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isTSTupleType(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.TSTupleType {\n if (!node) return false;\n\n if (node.type !== \"TSTupleType\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isTSOptionalType(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.TSOptionalType {\n if (!node) return false;\n\n if (node.type !== \"TSOptionalType\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isTSRestType(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.TSRestType {\n if (!node) return false;\n\n if (node.type !== \"TSRestType\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isTSNamedTupleMember(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.TSNamedTupleMember {\n if (!node) return false;\n\n if (node.type !== \"TSNamedTupleMember\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isTSUnionType(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.TSUnionType {\n if (!node) return false;\n\n if (node.type !== \"TSUnionType\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isTSIntersectionType(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.TSIntersectionType {\n if (!node) return false;\n\n if (node.type !== \"TSIntersectionType\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isTSConditionalType(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.TSConditionalType {\n if (!node) return false;\n\n if (node.type !== \"TSConditionalType\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isTSInferType(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.TSInferType {\n if (!node) return false;\n\n if (node.type !== \"TSInferType\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isTSParenthesizedType(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.TSParenthesizedType {\n if (!node) return false;\n\n if (node.type !== \"TSParenthesizedType\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isTSTypeOperator(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.TSTypeOperator {\n if (!node) return false;\n\n if (node.type !== \"TSTypeOperator\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isTSIndexedAccessType(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.TSIndexedAccessType {\n if (!node) return false;\n\n if (node.type !== \"TSIndexedAccessType\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isTSMappedType(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.TSMappedType {\n if (!node) return false;\n\n if (node.type !== \"TSMappedType\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isTSLiteralType(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.TSLiteralType {\n if (!node) return false;\n\n if (node.type !== \"TSLiteralType\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isTSExpressionWithTypeArguments(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.TSExpressionWithTypeArguments {\n if (!node) return false;\n\n if (node.type !== \"TSExpressionWithTypeArguments\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isTSInterfaceDeclaration(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.TSInterfaceDeclaration {\n if (!node) return false;\n\n if (node.type !== \"TSInterfaceDeclaration\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isTSInterfaceBody(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.TSInterfaceBody {\n if (!node) return false;\n\n if (node.type !== \"TSInterfaceBody\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isTSTypeAliasDeclaration(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.TSTypeAliasDeclaration {\n if (!node) return false;\n\n if (node.type !== \"TSTypeAliasDeclaration\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isTSInstantiationExpression(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.TSInstantiationExpression {\n if (!node) return false;\n\n if (node.type !== \"TSInstantiationExpression\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isTSAsExpression(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.TSAsExpression {\n if (!node) return false;\n\n if (node.type !== \"TSAsExpression\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isTSSatisfiesExpression(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.TSSatisfiesExpression {\n if (!node) return false;\n\n if (node.type !== \"TSSatisfiesExpression\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isTSTypeAssertion(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.TSTypeAssertion {\n if (!node) return false;\n\n if (node.type !== \"TSTypeAssertion\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isTSEnumDeclaration(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.TSEnumDeclaration {\n if (!node) return false;\n\n if (node.type !== \"TSEnumDeclaration\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isTSEnumMember(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.TSEnumMember {\n if (!node) return false;\n\n if (node.type !== \"TSEnumMember\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isTSModuleDeclaration(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.TSModuleDeclaration {\n if (!node) return false;\n\n if (node.type !== \"TSModuleDeclaration\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isTSModuleBlock(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.TSModuleBlock {\n if (!node) return false;\n\n if (node.type !== \"TSModuleBlock\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isTSImportType(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.TSImportType {\n if (!node) return false;\n\n if (node.type !== \"TSImportType\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isTSImportEqualsDeclaration(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.TSImportEqualsDeclaration {\n if (!node) return false;\n\n if (node.type !== \"TSImportEqualsDeclaration\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isTSExternalModuleReference(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.TSExternalModuleReference {\n if (!node) return false;\n\n if (node.type !== \"TSExternalModuleReference\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isTSNonNullExpression(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.TSNonNullExpression {\n if (!node) return false;\n\n if (node.type !== \"TSNonNullExpression\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isTSExportAssignment(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.TSExportAssignment {\n if (!node) return false;\n\n if (node.type !== \"TSExportAssignment\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isTSNamespaceExportDeclaration(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.TSNamespaceExportDeclaration {\n if (!node) return false;\n\n if (node.type !== \"TSNamespaceExportDeclaration\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isTSTypeAnnotation(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.TSTypeAnnotation {\n if (!node) return false;\n\n if (node.type !== \"TSTypeAnnotation\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isTSTypeParameterInstantiation(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.TSTypeParameterInstantiation {\n if (!node) return false;\n\n if (node.type !== \"TSTypeParameterInstantiation\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isTSTypeParameterDeclaration(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.TSTypeParameterDeclaration {\n if (!node) return false;\n\n if (node.type !== \"TSTypeParameterDeclaration\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isTSTypeParameter(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.TSTypeParameter {\n if (!node) return false;\n\n if (node.type !== \"TSTypeParameter\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isStandardized(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.Standardized {\n if (!node) return false;\n\n switch (node.type) {\n case \"ArrayExpression\":\n case \"AssignmentExpression\":\n case \"BinaryExpression\":\n case \"InterpreterDirective\":\n case \"Directive\":\n case \"DirectiveLiteral\":\n case \"BlockStatement\":\n case \"BreakStatement\":\n case \"CallExpression\":\n case \"CatchClause\":\n case \"ConditionalExpression\":\n case \"ContinueStatement\":\n case \"DebuggerStatement\":\n case \"DoWhileStatement\":\n case \"EmptyStatement\":\n case \"ExpressionStatement\":\n case \"File\":\n case \"ForInStatement\":\n case \"ForStatement\":\n case \"FunctionDeclaration\":\n case \"FunctionExpression\":\n case \"Identifier\":\n case \"IfStatement\":\n case \"LabeledStatement\":\n case \"StringLiteral\":\n case \"NumericLiteral\":\n case \"NullLiteral\":\n case \"BooleanLiteral\":\n case \"RegExpLiteral\":\n case \"LogicalExpression\":\n case \"MemberExpression\":\n case \"NewExpression\":\n case \"Program\":\n case \"ObjectExpression\":\n case \"ObjectMethod\":\n case \"ObjectProperty\":\n case \"RestElement\":\n case \"ReturnStatement\":\n case \"SequenceExpression\":\n case \"ParenthesizedExpression\":\n case \"SwitchCase\":\n case \"SwitchStatement\":\n case \"ThisExpression\":\n case \"ThrowStatement\":\n case \"TryStatement\":\n case \"UnaryExpression\":\n case \"UpdateExpression\":\n case \"VariableDeclaration\":\n case \"VariableDeclarator\":\n case \"WhileStatement\":\n case \"WithStatement\":\n case \"AssignmentPattern\":\n case \"ArrayPattern\":\n case \"ArrowFunctionExpression\":\n case \"ClassBody\":\n case \"ClassExpression\":\n case \"ClassDeclaration\":\n case \"ExportAllDeclaration\":\n case \"ExportDefaultDeclaration\":\n case \"ExportNamedDeclaration\":\n case \"ExportSpecifier\":\n case \"ForOfStatement\":\n case \"ImportDeclaration\":\n case \"ImportDefaultSpecifier\":\n case \"ImportNamespaceSpecifier\":\n case \"ImportSpecifier\":\n case \"ImportExpression\":\n case \"MetaProperty\":\n case \"ClassMethod\":\n case \"ObjectPattern\":\n case \"SpreadElement\":\n case \"Super\":\n case \"TaggedTemplateExpression\":\n case \"TemplateElement\":\n case \"TemplateLiteral\":\n case \"YieldExpression\":\n case \"AwaitExpression\":\n case \"Import\":\n case \"BigIntLiteral\":\n case \"ExportNamespaceSpecifier\":\n case \"OptionalMemberExpression\":\n case \"OptionalCallExpression\":\n case \"ClassProperty\":\n case \"ClassAccessorProperty\":\n case \"ClassPrivateProperty\":\n case \"ClassPrivateMethod\":\n case \"PrivateName\":\n case \"StaticBlock\":\n break;\n case \"Placeholder\":\n switch (node.expectedNode) {\n case \"Identifier\":\n case \"StringLiteral\":\n case \"BlockStatement\":\n case \"ClassBody\":\n break;\n default:\n return false;\n }\n break;\n default:\n return false;\n }\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isExpression(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.Expression {\n if (!node) return false;\n\n switch (node.type) {\n case \"ArrayExpression\":\n case \"AssignmentExpression\":\n case \"BinaryExpression\":\n case \"CallExpression\":\n case \"ConditionalExpression\":\n case \"FunctionExpression\":\n case \"Identifier\":\n case \"StringLiteral\":\n case \"NumericLiteral\":\n case \"NullLiteral\":\n case \"BooleanLiteral\":\n case \"RegExpLiteral\":\n case \"LogicalExpression\":\n case \"MemberExpression\":\n case \"NewExpression\":\n case \"ObjectExpression\":\n case \"SequenceExpression\":\n case \"ParenthesizedExpression\":\n case \"ThisExpression\":\n case \"UnaryExpression\":\n case \"UpdateExpression\":\n case \"ArrowFunctionExpression\":\n case \"ClassExpression\":\n case \"ImportExpression\":\n case \"MetaProperty\":\n case \"Super\":\n case \"TaggedTemplateExpression\":\n case \"TemplateLiteral\":\n case \"YieldExpression\":\n case \"AwaitExpression\":\n case \"Import\":\n case \"BigIntLiteral\":\n case \"OptionalMemberExpression\":\n case \"OptionalCallExpression\":\n case \"TypeCastExpression\":\n case \"JSXElement\":\n case \"JSXFragment\":\n case \"BindExpression\":\n case \"DoExpression\":\n case \"RecordExpression\":\n case \"TupleExpression\":\n case \"DecimalLiteral\":\n case \"ModuleExpression\":\n case \"TopicReference\":\n case \"PipelineTopicExpression\":\n case \"PipelineBareFunction\":\n case \"PipelinePrimaryTopicReference\":\n case \"TSInstantiationExpression\":\n case \"TSAsExpression\":\n case \"TSSatisfiesExpression\":\n case \"TSTypeAssertion\":\n case \"TSNonNullExpression\":\n break;\n case \"Placeholder\":\n switch (node.expectedNode) {\n case \"Expression\":\n case \"Identifier\":\n case \"StringLiteral\":\n break;\n default:\n return false;\n }\n break;\n default:\n return false;\n }\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isBinary(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.Binary {\n if (!node) return false;\n\n switch (node.type) {\n case \"BinaryExpression\":\n case \"LogicalExpression\":\n break;\n default:\n return false;\n }\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isScopable(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.Scopable {\n if (!node) return false;\n\n switch (node.type) {\n case \"BlockStatement\":\n case \"CatchClause\":\n case \"DoWhileStatement\":\n case \"ForInStatement\":\n case \"ForStatement\":\n case \"FunctionDeclaration\":\n case \"FunctionExpression\":\n case \"Program\":\n case \"ObjectMethod\":\n case \"SwitchStatement\":\n case \"WhileStatement\":\n case \"ArrowFunctionExpression\":\n case \"ClassExpression\":\n case \"ClassDeclaration\":\n case \"ForOfStatement\":\n case \"ClassMethod\":\n case \"ClassPrivateMethod\":\n case \"StaticBlock\":\n case \"TSModuleBlock\":\n break;\n case \"Placeholder\":\n if (node.expectedNode === \"BlockStatement\") break;\n default:\n return false;\n }\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isBlockParent(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.BlockParent {\n if (!node) return false;\n\n switch (node.type) {\n case \"BlockStatement\":\n case \"CatchClause\":\n case \"DoWhileStatement\":\n case \"ForInStatement\":\n case \"ForStatement\":\n case \"FunctionDeclaration\":\n case \"FunctionExpression\":\n case \"Program\":\n case \"ObjectMethod\":\n case \"SwitchStatement\":\n case \"WhileStatement\":\n case \"ArrowFunctionExpression\":\n case \"ForOfStatement\":\n case \"ClassMethod\":\n case \"ClassPrivateMethod\":\n case \"StaticBlock\":\n case \"TSModuleBlock\":\n break;\n case \"Placeholder\":\n if (node.expectedNode === \"BlockStatement\") break;\n default:\n return false;\n }\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isBlock(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.Block {\n if (!node) return false;\n\n switch (node.type) {\n case \"BlockStatement\":\n case \"Program\":\n case \"TSModuleBlock\":\n break;\n case \"Placeholder\":\n if (node.expectedNode === \"BlockStatement\") break;\n default:\n return false;\n }\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isStatement(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.Statement {\n if (!node) return false;\n\n switch (node.type) {\n case \"BlockStatement\":\n case \"BreakStatement\":\n case \"ContinueStatement\":\n case \"DebuggerStatement\":\n case \"DoWhileStatement\":\n case \"EmptyStatement\":\n case \"ExpressionStatement\":\n case \"ForInStatement\":\n case \"ForStatement\":\n case \"FunctionDeclaration\":\n case \"IfStatement\":\n case \"LabeledStatement\":\n case \"ReturnStatement\":\n case \"SwitchStatement\":\n case \"ThrowStatement\":\n case \"TryStatement\":\n case \"VariableDeclaration\":\n case \"WhileStatement\":\n case \"WithStatement\":\n case \"ClassDeclaration\":\n case \"ExportAllDeclaration\":\n case \"ExportDefaultDeclaration\":\n case \"ExportNamedDeclaration\":\n case \"ForOfStatement\":\n case \"ImportDeclaration\":\n case \"DeclareClass\":\n case \"DeclareFunction\":\n case \"DeclareInterface\":\n case \"DeclareModule\":\n case \"DeclareModuleExports\":\n case \"DeclareTypeAlias\":\n case \"DeclareOpaqueType\":\n case \"DeclareVariable\":\n case \"DeclareExportDeclaration\":\n case \"DeclareExportAllDeclaration\":\n case \"InterfaceDeclaration\":\n case \"OpaqueType\":\n case \"TypeAlias\":\n case \"EnumDeclaration\":\n case \"TSDeclareFunction\":\n case \"TSInterfaceDeclaration\":\n case \"TSTypeAliasDeclaration\":\n case \"TSEnumDeclaration\":\n case \"TSModuleDeclaration\":\n case \"TSImportEqualsDeclaration\":\n case \"TSExportAssignment\":\n case \"TSNamespaceExportDeclaration\":\n break;\n case \"Placeholder\":\n switch (node.expectedNode) {\n case \"Statement\":\n case \"Declaration\":\n case \"BlockStatement\":\n break;\n default:\n return false;\n }\n break;\n default:\n return false;\n }\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isTerminatorless(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.Terminatorless {\n if (!node) return false;\n\n switch (node.type) {\n case \"BreakStatement\":\n case \"ContinueStatement\":\n case \"ReturnStatement\":\n case \"ThrowStatement\":\n case \"YieldExpression\":\n case \"AwaitExpression\":\n break;\n default:\n return false;\n }\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isCompletionStatement(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.CompletionStatement {\n if (!node) return false;\n\n switch (node.type) {\n case \"BreakStatement\":\n case \"ContinueStatement\":\n case \"ReturnStatement\":\n case \"ThrowStatement\":\n break;\n default:\n return false;\n }\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isConditional(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.Conditional {\n if (!node) return false;\n\n switch (node.type) {\n case \"ConditionalExpression\":\n case \"IfStatement\":\n break;\n default:\n return false;\n }\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isLoop(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.Loop {\n if (!node) return false;\n\n switch (node.type) {\n case \"DoWhileStatement\":\n case \"ForInStatement\":\n case \"ForStatement\":\n case \"WhileStatement\":\n case \"ForOfStatement\":\n break;\n default:\n return false;\n }\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isWhile(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.While {\n if (!node) return false;\n\n switch (node.type) {\n case \"DoWhileStatement\":\n case \"WhileStatement\":\n break;\n default:\n return false;\n }\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isExpressionWrapper(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.ExpressionWrapper {\n if (!node) return false;\n\n switch (node.type) {\n case \"ExpressionStatement\":\n case \"ParenthesizedExpression\":\n case \"TypeCastExpression\":\n break;\n default:\n return false;\n }\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isFor(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.For {\n if (!node) return false;\n\n switch (node.type) {\n case \"ForInStatement\":\n case \"ForStatement\":\n case \"ForOfStatement\":\n break;\n default:\n return false;\n }\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isForXStatement(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.ForXStatement {\n if (!node) return false;\n\n switch (node.type) {\n case \"ForInStatement\":\n case \"ForOfStatement\":\n break;\n default:\n return false;\n }\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isFunction(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.Function {\n if (!node) return false;\n\n switch (node.type) {\n case \"FunctionDeclaration\":\n case \"FunctionExpression\":\n case \"ObjectMethod\":\n case \"ArrowFunctionExpression\":\n case \"ClassMethod\":\n case \"ClassPrivateMethod\":\n break;\n default:\n return false;\n }\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isFunctionParent(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.FunctionParent {\n if (!node) return false;\n\n switch (node.type) {\n case \"FunctionDeclaration\":\n case \"FunctionExpression\":\n case \"ObjectMethod\":\n case \"ArrowFunctionExpression\":\n case \"ClassMethod\":\n case \"ClassPrivateMethod\":\n case \"StaticBlock\":\n case \"TSModuleBlock\":\n break;\n default:\n return false;\n }\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isPureish(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.Pureish {\n if (!node) return false;\n\n switch (node.type) {\n case \"FunctionDeclaration\":\n case \"FunctionExpression\":\n case \"StringLiteral\":\n case \"NumericLiteral\":\n case \"NullLiteral\":\n case \"BooleanLiteral\":\n case \"RegExpLiteral\":\n case \"ArrowFunctionExpression\":\n case \"BigIntLiteral\":\n case \"DecimalLiteral\":\n break;\n case \"Placeholder\":\n if (node.expectedNode === \"StringLiteral\") break;\n default:\n return false;\n }\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isDeclaration(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.Declaration {\n if (!node) return false;\n\n switch (node.type) {\n case \"FunctionDeclaration\":\n case \"VariableDeclaration\":\n case \"ClassDeclaration\":\n case \"ExportAllDeclaration\":\n case \"ExportDefaultDeclaration\":\n case \"ExportNamedDeclaration\":\n case \"ImportDeclaration\":\n case \"DeclareClass\":\n case \"DeclareFunction\":\n case \"DeclareInterface\":\n case \"DeclareModule\":\n case \"DeclareModuleExports\":\n case \"DeclareTypeAlias\":\n case \"DeclareOpaqueType\":\n case \"DeclareVariable\":\n case \"DeclareExportDeclaration\":\n case \"DeclareExportAllDeclaration\":\n case \"InterfaceDeclaration\":\n case \"OpaqueType\":\n case \"TypeAlias\":\n case \"EnumDeclaration\":\n case \"TSDeclareFunction\":\n case \"TSInterfaceDeclaration\":\n case \"TSTypeAliasDeclaration\":\n case \"TSEnumDeclaration\":\n case \"TSModuleDeclaration\":\n break;\n case \"Placeholder\":\n if (node.expectedNode === \"Declaration\") break;\n default:\n return false;\n }\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isPatternLike(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.PatternLike {\n if (!node) return false;\n\n switch (node.type) {\n case \"Identifier\":\n case \"RestElement\":\n case \"AssignmentPattern\":\n case \"ArrayPattern\":\n case \"ObjectPattern\":\n case \"TSAsExpression\":\n case \"TSSatisfiesExpression\":\n case \"TSTypeAssertion\":\n case \"TSNonNullExpression\":\n break;\n case \"Placeholder\":\n switch (node.expectedNode) {\n case \"Pattern\":\n case \"Identifier\":\n break;\n default:\n return false;\n }\n break;\n default:\n return false;\n }\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isLVal(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.LVal {\n if (!node) return false;\n\n switch (node.type) {\n case \"Identifier\":\n case \"MemberExpression\":\n case \"RestElement\":\n case \"AssignmentPattern\":\n case \"ArrayPattern\":\n case \"ObjectPattern\":\n case \"TSParameterProperty\":\n case \"TSAsExpression\":\n case \"TSSatisfiesExpression\":\n case \"TSTypeAssertion\":\n case \"TSNonNullExpression\":\n break;\n case \"Placeholder\":\n switch (node.expectedNode) {\n case \"Pattern\":\n case \"Identifier\":\n break;\n default:\n return false;\n }\n break;\n default:\n return false;\n }\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isTSEntityName(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.TSEntityName {\n if (!node) return false;\n\n switch (node.type) {\n case \"Identifier\":\n case \"TSQualifiedName\":\n break;\n case \"Placeholder\":\n if (node.expectedNode === \"Identifier\") break;\n default:\n return false;\n }\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isLiteral(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.Literal {\n if (!node) return false;\n\n switch (node.type) {\n case \"StringLiteral\":\n case \"NumericLiteral\":\n case \"NullLiteral\":\n case \"BooleanLiteral\":\n case \"RegExpLiteral\":\n case \"TemplateLiteral\":\n case \"BigIntLiteral\":\n case \"DecimalLiteral\":\n break;\n case \"Placeholder\":\n if (node.expectedNode === \"StringLiteral\") break;\n default:\n return false;\n }\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isImmutable(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.Immutable {\n if (!node) return false;\n\n switch (node.type) {\n case \"StringLiteral\":\n case \"NumericLiteral\":\n case \"NullLiteral\":\n case \"BooleanLiteral\":\n case \"BigIntLiteral\":\n case \"JSXAttribute\":\n case \"JSXClosingElement\":\n case \"JSXElement\":\n case \"JSXExpressionContainer\":\n case \"JSXSpreadChild\":\n case \"JSXOpeningElement\":\n case \"JSXText\":\n case \"JSXFragment\":\n case \"JSXOpeningFragment\":\n case \"JSXClosingFragment\":\n case \"DecimalLiteral\":\n break;\n case \"Placeholder\":\n if (node.expectedNode === \"StringLiteral\") break;\n default:\n return false;\n }\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isUserWhitespacable(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.UserWhitespacable {\n if (!node) return false;\n\n switch (node.type) {\n case \"ObjectMethod\":\n case \"ObjectProperty\":\n case \"ObjectTypeInternalSlot\":\n case \"ObjectTypeCallProperty\":\n case \"ObjectTypeIndexer\":\n case \"ObjectTypeProperty\":\n case \"ObjectTypeSpreadProperty\":\n break;\n default:\n return false;\n }\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isMethod(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.Method {\n if (!node) return false;\n\n switch (node.type) {\n case \"ObjectMethod\":\n case \"ClassMethod\":\n case \"ClassPrivateMethod\":\n break;\n default:\n return false;\n }\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isObjectMember(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.ObjectMember {\n if (!node) return false;\n\n switch (node.type) {\n case \"ObjectMethod\":\n case \"ObjectProperty\":\n break;\n default:\n return false;\n }\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isProperty(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.Property {\n if (!node) return false;\n\n switch (node.type) {\n case \"ObjectProperty\":\n case \"ClassProperty\":\n case \"ClassAccessorProperty\":\n case \"ClassPrivateProperty\":\n break;\n default:\n return false;\n }\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isUnaryLike(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.UnaryLike {\n if (!node) return false;\n\n switch (node.type) {\n case \"UnaryExpression\":\n case \"SpreadElement\":\n break;\n default:\n return false;\n }\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isPattern(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.Pattern {\n if (!node) return false;\n\n switch (node.type) {\n case \"AssignmentPattern\":\n case \"ArrayPattern\":\n case \"ObjectPattern\":\n break;\n case \"Placeholder\":\n if (node.expectedNode === \"Pattern\") break;\n default:\n return false;\n }\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isClass(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.Class {\n if (!node) return false;\n\n switch (node.type) {\n case \"ClassExpression\":\n case \"ClassDeclaration\":\n break;\n default:\n return false;\n }\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isImportOrExportDeclaration(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.ImportOrExportDeclaration {\n if (!node) return false;\n\n switch (node.type) {\n case \"ExportAllDeclaration\":\n case \"ExportDefaultDeclaration\":\n case \"ExportNamedDeclaration\":\n case \"ImportDeclaration\":\n break;\n default:\n return false;\n }\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isExportDeclaration(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.ExportDeclaration {\n if (!node) return false;\n\n switch (node.type) {\n case \"ExportAllDeclaration\":\n case \"ExportDefaultDeclaration\":\n case \"ExportNamedDeclaration\":\n break;\n default:\n return false;\n }\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isModuleSpecifier(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.ModuleSpecifier {\n if (!node) return false;\n\n switch (node.type) {\n case \"ExportSpecifier\":\n case \"ImportDefaultSpecifier\":\n case \"ImportNamespaceSpecifier\":\n case \"ImportSpecifier\":\n case \"ExportNamespaceSpecifier\":\n case \"ExportDefaultSpecifier\":\n break;\n default:\n return false;\n }\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isAccessor(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.Accessor {\n if (!node) return false;\n\n switch (node.type) {\n case \"ClassAccessorProperty\":\n break;\n default:\n return false;\n }\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isPrivate(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.Private {\n if (!node) return false;\n\n switch (node.type) {\n case \"ClassPrivateProperty\":\n case \"ClassPrivateMethod\":\n case \"PrivateName\":\n break;\n default:\n return false;\n }\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isFlow(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.Flow {\n if (!node) return false;\n\n switch (node.type) {\n case \"AnyTypeAnnotation\":\n case \"ArrayTypeAnnotation\":\n case \"BooleanTypeAnnotation\":\n case \"BooleanLiteralTypeAnnotation\":\n case \"NullLiteralTypeAnnotation\":\n case \"ClassImplements\":\n case \"DeclareClass\":\n case \"DeclareFunction\":\n case \"DeclareInterface\":\n case \"DeclareModule\":\n case \"DeclareModuleExports\":\n case \"DeclareTypeAlias\":\n case \"DeclareOpaqueType\":\n case \"DeclareVariable\":\n case \"DeclareExportDeclaration\":\n case \"DeclareExportAllDeclaration\":\n case \"DeclaredPredicate\":\n case \"ExistsTypeAnnotation\":\n case \"FunctionTypeAnnotation\":\n case \"FunctionTypeParam\":\n case \"GenericTypeAnnotation\":\n case \"InferredPredicate\":\n case \"InterfaceExtends\":\n case \"InterfaceDeclaration\":\n case \"InterfaceTypeAnnotation\":\n case \"IntersectionTypeAnnotation\":\n case \"MixedTypeAnnotation\":\n case \"EmptyTypeAnnotation\":\n case \"NullableTypeAnnotation\":\n case \"NumberLiteralTypeAnnotation\":\n case \"NumberTypeAnnotation\":\n case \"ObjectTypeAnnotation\":\n case \"ObjectTypeInternalSlot\":\n case \"ObjectTypeCallProperty\":\n case \"ObjectTypeIndexer\":\n case \"ObjectTypeProperty\":\n case \"ObjectTypeSpreadProperty\":\n case \"OpaqueType\":\n case \"QualifiedTypeIdentifier\":\n case \"StringLiteralTypeAnnotation\":\n case \"StringTypeAnnotation\":\n case \"SymbolTypeAnnotation\":\n case \"ThisTypeAnnotation\":\n case \"TupleTypeAnnotation\":\n case \"TypeofTypeAnnotation\":\n case \"TypeAlias\":\n case \"TypeAnnotation\":\n case \"TypeCastExpression\":\n case \"TypeParameter\":\n case \"TypeParameterDeclaration\":\n case \"TypeParameterInstantiation\":\n case \"UnionTypeAnnotation\":\n case \"Variance\":\n case \"VoidTypeAnnotation\":\n case \"EnumDeclaration\":\n case \"EnumBooleanBody\":\n case \"EnumNumberBody\":\n case \"EnumStringBody\":\n case \"EnumSymbolBody\":\n case \"EnumBooleanMember\":\n case \"EnumNumberMember\":\n case \"EnumStringMember\":\n case \"EnumDefaultedMember\":\n case \"IndexedAccessType\":\n case \"OptionalIndexedAccessType\":\n break;\n default:\n return false;\n }\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isFlowType(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.FlowType {\n if (!node) return false;\n\n switch (node.type) {\n case \"AnyTypeAnnotation\":\n case \"ArrayTypeAnnotation\":\n case \"BooleanTypeAnnotation\":\n case \"BooleanLiteralTypeAnnotation\":\n case \"NullLiteralTypeAnnotation\":\n case \"ExistsTypeAnnotation\":\n case \"FunctionTypeAnnotation\":\n case \"GenericTypeAnnotation\":\n case \"InterfaceTypeAnnotation\":\n case \"IntersectionTypeAnnotation\":\n case \"MixedTypeAnnotation\":\n case \"EmptyTypeAnnotation\":\n case \"NullableTypeAnnotation\":\n case \"NumberLiteralTypeAnnotation\":\n case \"NumberTypeAnnotation\":\n case \"ObjectTypeAnnotation\":\n case \"StringLiteralTypeAnnotation\":\n case \"StringTypeAnnotation\":\n case \"SymbolTypeAnnotation\":\n case \"ThisTypeAnnotation\":\n case \"TupleTypeAnnotation\":\n case \"TypeofTypeAnnotation\":\n case \"UnionTypeAnnotation\":\n case \"VoidTypeAnnotation\":\n case \"IndexedAccessType\":\n case \"OptionalIndexedAccessType\":\n break;\n default:\n return false;\n }\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isFlowBaseAnnotation(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.FlowBaseAnnotation {\n if (!node) return false;\n\n switch (node.type) {\n case \"AnyTypeAnnotation\":\n case \"BooleanTypeAnnotation\":\n case \"NullLiteralTypeAnnotation\":\n case \"MixedTypeAnnotation\":\n case \"EmptyTypeAnnotation\":\n case \"NumberTypeAnnotation\":\n case \"StringTypeAnnotation\":\n case \"SymbolTypeAnnotation\":\n case \"ThisTypeAnnotation\":\n case \"VoidTypeAnnotation\":\n break;\n default:\n return false;\n }\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isFlowDeclaration(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.FlowDeclaration {\n if (!node) return false;\n\n switch (node.type) {\n case \"DeclareClass\":\n case \"DeclareFunction\":\n case \"DeclareInterface\":\n case \"DeclareModule\":\n case \"DeclareModuleExports\":\n case \"DeclareTypeAlias\":\n case \"DeclareOpaqueType\":\n case \"DeclareVariable\":\n case \"DeclareExportDeclaration\":\n case \"DeclareExportAllDeclaration\":\n case \"InterfaceDeclaration\":\n case \"OpaqueType\":\n case \"TypeAlias\":\n break;\n default:\n return false;\n }\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isFlowPredicate(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.FlowPredicate {\n if (!node) return false;\n\n switch (node.type) {\n case \"DeclaredPredicate\":\n case \"InferredPredicate\":\n break;\n default:\n return false;\n }\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isEnumBody(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.EnumBody {\n if (!node) return false;\n\n switch (node.type) {\n case \"EnumBooleanBody\":\n case \"EnumNumberBody\":\n case \"EnumStringBody\":\n case \"EnumSymbolBody\":\n break;\n default:\n return false;\n }\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isEnumMember(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.EnumMember {\n if (!node) return false;\n\n switch (node.type) {\n case \"EnumBooleanMember\":\n case \"EnumNumberMember\":\n case \"EnumStringMember\":\n case \"EnumDefaultedMember\":\n break;\n default:\n return false;\n }\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isJSX(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.JSX {\n if (!node) return false;\n\n switch (node.type) {\n case \"JSXAttribute\":\n case \"JSXClosingElement\":\n case \"JSXElement\":\n case \"JSXEmptyExpression\":\n case \"JSXExpressionContainer\":\n case \"JSXSpreadChild\":\n case \"JSXIdentifier\":\n case \"JSXMemberExpression\":\n case \"JSXNamespacedName\":\n case \"JSXOpeningElement\":\n case \"JSXSpreadAttribute\":\n case \"JSXText\":\n case \"JSXFragment\":\n case \"JSXOpeningFragment\":\n case \"JSXClosingFragment\":\n break;\n default:\n return false;\n }\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isMiscellaneous(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.Miscellaneous {\n if (!node) return false;\n\n switch (node.type) {\n case \"Noop\":\n case \"Placeholder\":\n case \"V8IntrinsicIdentifier\":\n break;\n default:\n return false;\n }\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isTypeScript(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.TypeScript {\n if (!node) return false;\n\n switch (node.type) {\n case \"TSParameterProperty\":\n case \"TSDeclareFunction\":\n case \"TSDeclareMethod\":\n case \"TSQualifiedName\":\n case \"TSCallSignatureDeclaration\":\n case \"TSConstructSignatureDeclaration\":\n case \"TSPropertySignature\":\n case \"TSMethodSignature\":\n case \"TSIndexSignature\":\n case \"TSAnyKeyword\":\n case \"TSBooleanKeyword\":\n case \"TSBigIntKeyword\":\n case \"TSIntrinsicKeyword\":\n case \"TSNeverKeyword\":\n case \"TSNullKeyword\":\n case \"TSNumberKeyword\":\n case \"TSObjectKeyword\":\n case \"TSStringKeyword\":\n case \"TSSymbolKeyword\":\n case \"TSUndefinedKeyword\":\n case \"TSUnknownKeyword\":\n case \"TSVoidKeyword\":\n case \"TSThisType\":\n case \"TSFunctionType\":\n case \"TSConstructorType\":\n case \"TSTypeReference\":\n case \"TSTypePredicate\":\n case \"TSTypeQuery\":\n case \"TSTypeLiteral\":\n case \"TSArrayType\":\n case \"TSTupleType\":\n case \"TSOptionalType\":\n case \"TSRestType\":\n case \"TSNamedTupleMember\":\n case \"TSUnionType\":\n case \"TSIntersectionType\":\n case \"TSConditionalType\":\n case \"TSInferType\":\n case \"TSParenthesizedType\":\n case \"TSTypeOperator\":\n case \"TSIndexedAccessType\":\n case \"TSMappedType\":\n case \"TSLiteralType\":\n case \"TSExpressionWithTypeArguments\":\n case \"TSInterfaceDeclaration\":\n case \"TSInterfaceBody\":\n case \"TSTypeAliasDeclaration\":\n case \"TSInstantiationExpression\":\n case \"TSAsExpression\":\n case \"TSSatisfiesExpression\":\n case \"TSTypeAssertion\":\n case \"TSEnumDeclaration\":\n case \"TSEnumMember\":\n case \"TSModuleDeclaration\":\n case \"TSModuleBlock\":\n case \"TSImportType\":\n case \"TSImportEqualsDeclaration\":\n case \"TSExternalModuleReference\":\n case \"TSNonNullExpression\":\n case \"TSExportAssignment\":\n case \"TSNamespaceExportDeclaration\":\n case \"TSTypeAnnotation\":\n case \"TSTypeParameterInstantiation\":\n case \"TSTypeParameterDeclaration\":\n case \"TSTypeParameter\":\n break;\n default:\n return false;\n }\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isTSTypeElement(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.TSTypeElement {\n if (!node) return false;\n\n switch (node.type) {\n case \"TSCallSignatureDeclaration\":\n case \"TSConstructSignatureDeclaration\":\n case \"TSPropertySignature\":\n case \"TSMethodSignature\":\n case \"TSIndexSignature\":\n break;\n default:\n return false;\n }\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isTSType(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.TSType {\n if (!node) return false;\n\n switch (node.type) {\n case \"TSAnyKeyword\":\n case \"TSBooleanKeyword\":\n case \"TSBigIntKeyword\":\n case \"TSIntrinsicKeyword\":\n case \"TSNeverKeyword\":\n case \"TSNullKeyword\":\n case \"TSNumberKeyword\":\n case \"TSObjectKeyword\":\n case \"TSStringKeyword\":\n case \"TSSymbolKeyword\":\n case \"TSUndefinedKeyword\":\n case \"TSUnknownKeyword\":\n case \"TSVoidKeyword\":\n case \"TSThisType\":\n case \"TSFunctionType\":\n case \"TSConstructorType\":\n case \"TSTypeReference\":\n case \"TSTypePredicate\":\n case \"TSTypeQuery\":\n case \"TSTypeLiteral\":\n case \"TSArrayType\":\n case \"TSTupleType\":\n case \"TSOptionalType\":\n case \"TSRestType\":\n case \"TSUnionType\":\n case \"TSIntersectionType\":\n case \"TSConditionalType\":\n case \"TSInferType\":\n case \"TSParenthesizedType\":\n case \"TSTypeOperator\":\n case \"TSIndexedAccessType\":\n case \"TSMappedType\":\n case \"TSLiteralType\":\n case \"TSExpressionWithTypeArguments\":\n case \"TSImportType\":\n break;\n default:\n return false;\n }\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isTSBaseType(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.TSBaseType {\n if (!node) return false;\n\n switch (node.type) {\n case \"TSAnyKeyword\":\n case \"TSBooleanKeyword\":\n case \"TSBigIntKeyword\":\n case \"TSIntrinsicKeyword\":\n case \"TSNeverKeyword\":\n case \"TSNullKeyword\":\n case \"TSNumberKeyword\":\n case \"TSObjectKeyword\":\n case \"TSStringKeyword\":\n case \"TSSymbolKeyword\":\n case \"TSUndefinedKeyword\":\n case \"TSUnknownKeyword\":\n case \"TSVoidKeyword\":\n case \"TSThisType\":\n case \"TSLiteralType\":\n break;\n default:\n return false;\n }\n\n return opts == null || shallowEqual(node, opts);\n}\n/**\n * @deprecated Use `isNumericLiteral`\n */\nexport function isNumberLiteral(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): boolean {\n deprecationWarning(\"isNumberLiteral\", \"isNumericLiteral\");\n if (!node) return false;\n\n if (node.type !== \"NumberLiteral\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\n/**\n * @deprecated Use `isRegExpLiteral`\n */\nexport function isRegexLiteral(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): boolean {\n deprecationWarning(\"isRegexLiteral\", \"isRegExpLiteral\");\n if (!node) return false;\n\n if (node.type !== \"RegexLiteral\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\n/**\n * @deprecated Use `isRestElement`\n */\nexport function isRestProperty(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): boolean {\n deprecationWarning(\"isRestProperty\", \"isRestElement\");\n if (!node) return false;\n\n if (node.type !== \"RestProperty\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\n/**\n * @deprecated Use `isSpreadElement`\n */\nexport function isSpreadProperty(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): boolean {\n deprecationWarning(\"isSpreadProperty\", \"isSpreadElement\");\n if (!node) return false;\n\n if (node.type !== \"SpreadProperty\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\n/**\n * @deprecated Use `isImportOrExportDeclaration`\n */\nexport function isModuleDeclaration(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.ImportOrExportDeclaration {\n deprecationWarning(\"isModuleDeclaration\", \"isImportOrExportDeclaration\");\n return isImportOrExportDeclaration(node, opts);\n}\n","import {\n isIdentifier,\n isMemberExpression,\n isStringLiteral,\n isThisExpression,\n} from \"./generated/index.ts\";\nimport type * as t from \"../index.ts\";\n\n/**\n * Determines whether or not the input node `member` matches the\n * input `match`.\n *\n * For example, given the match `React.createClass` it would match the\n * parsed nodes of `React.createClass` and `React[\"createClass\"]`.\n */\nexport default function matchesPattern(\n member: t.Node | null | undefined,\n match: string | string[],\n allowPartial?: boolean,\n): boolean {\n // not a member expression\n if (!isMemberExpression(member)) return false;\n\n const parts = Array.isArray(match) ? match : match.split(\".\");\n const nodes = [];\n\n let node;\n for (node = member; isMemberExpression(node); node = node.object) {\n nodes.push(node.property);\n }\n nodes.push(node);\n\n if (nodes.length < parts.length) return false;\n if (!allowPartial && nodes.length > parts.length) return false;\n\n for (let i = 0, j = nodes.length - 1; i < parts.length; i++, j--) {\n const node = nodes[j];\n let value;\n if (isIdentifier(node)) {\n value = node.name;\n } else if (isStringLiteral(node)) {\n value = node.value;\n } else if (isThisExpression(node)) {\n value = \"this\";\n } else {\n return false;\n }\n\n if (parts[i] !== value) return false;\n }\n\n return true;\n}\n","import matchesPattern from \"./matchesPattern.ts\";\nimport type * as t from \"../index.ts\";\n\n/**\n * Build a function that when called will return whether or not the\n * input `node` `MemberExpression` matches the input `match`.\n *\n * For example, given the match `React.createClass` it would match the\n * parsed nodes of `React.createClass` and `React[\"createClass\"]`.\n */\nexport default function buildMatchMemberExpression(\n match: string,\n allowPartial?: boolean,\n) {\n const parts = match.split(\".\");\n\n return (member: t.Node) => matchesPattern(member, parts, allowPartial);\n}\n","import buildMatchMemberExpression from \"../buildMatchMemberExpression.ts\";\n\nconst isReactComponent = buildMatchMemberExpression(\"React.Component\");\n\nexport default isReactComponent;\n","export default function isCompatTag(tagName?: string): boolean {\n // Must start with a lowercase ASCII letter\n return !!tagName && /^[a-z]/.test(tagName);\n}\n","'use strict';\n\nlet fastProto = null;\n\n// Creates an object with permanently fast properties in V8. See Toon Verwaest's\n// post https://medium.com/@tverwaes/setting-up-prototypes-in-v8-ec9c9491dfe2#5f62\n// for more details. Use %HasFastProperties(object) and the Node.js flag\n// --allow-natives-syntax to check whether an object has fast properties.\nfunction FastObject(o) {\n\t// A prototype object will have \"fast properties\" enabled once it is checked\n\t// against the inline property cache of a function, e.g. fastProto.property:\n\t// https://github.com/v8/v8/blob/6.0.122/test/mjsunit/fast-prototype.js#L48-L63\n\tif (fastProto !== null && typeof fastProto.property) {\n\t\tconst result = fastProto;\n\t\tfastProto = FastObject.prototype = null;\n\t\treturn result;\n\t}\n\tfastProto = FastObject.prototype = o == null ? Object.create(null) : o;\n\treturn new FastObject;\n}\n\n// Initialize the inline property cache of FastObject\nFastObject();\n\nmodule.exports = function toFastproperties(o) {\n\treturn FastObject(o);\n};\n","// env vars from the cli are always strings, so !!ENV_VAR returns true for \"false\"\nfunction bool(value) {\n if (value == null) return false;\n return value && value !== \"false\" && value !== \"0\";\n}\n\nmodule.exports = bool(process.env[\"BABEL_8_BREAKING\"])\n ? require(\"to-fast-properties-BABEL_8_BREAKING-true\")\n : require(\"to-fast-properties-BABEL_8_BREAKING-false\");\n","import { FLIPPED_ALIAS_KEYS, ALIAS_KEYS } from \"../definitions/index.ts\";\nimport type * as t from \"../index.ts\";\n\nexport default function isType(\n nodeType: string,\n targetType: T,\n): nodeType is T;\n\nexport default function isType(\n nodeType: string | null | undefined,\n targetType: string,\n): boolean;\n\n/**\n * Test if a `nodeType` is a `targetType` or if `targetType` is an alias of `nodeType`.\n */\nexport default function isType(nodeType: string, targetType: string): boolean {\n if (nodeType === targetType) return true;\n\n // If nodeType is nullish, it can't be an alias of targetType.\n if (nodeType == null) return false;\n\n // This is a fast-path. If the test above failed, but an alias key is found, then the\n // targetType was a primary node type, so there's no need to check the aliases.\n // @ts-expect-error targetType may not index ALIAS_KEYS\n if (ALIAS_KEYS[targetType]) return false;\n\n const aliases: Array | undefined = FLIPPED_ALIAS_KEYS[targetType];\n if (aliases) {\n if (aliases[0] === nodeType) return true;\n\n for (const alias of aliases) {\n if (nodeType === alias) return true;\n }\n }\n\n return false;\n}\n","import { PLACEHOLDERS_ALIAS } from \"../definitions/index.ts\";\n\n/**\n * Test if a `placeholderType` is a `targetType` or if `targetType` is an alias of `placeholderType`.\n */\nexport default function isPlaceholderType(\n placeholderType: string,\n targetType: string,\n): boolean {\n if (placeholderType === targetType) return true;\n\n const aliases: Array | undefined =\n PLACEHOLDERS_ALIAS[placeholderType];\n if (aliases) {\n for (const alias of aliases) {\n if (targetType === alias) return true;\n }\n }\n\n return false;\n}\n","import shallowEqual from \"../utils/shallowEqual.ts\";\nimport isType from \"./isType.ts\";\nimport isPlaceholderType from \"./isPlaceholderType.ts\";\nimport { FLIPPED_ALIAS_KEYS } from \"../definitions/index.ts\";\nimport type * as t from \"../index.ts\";\n\nexport default function is(\n type: T,\n node: t.Node | null | undefined,\n opts?: undefined,\n): node is Extract;\n\nexport default function is<\n T extends t.Node[\"type\"],\n P extends Extract,\n>(type: T, n: t.Node | null | undefined, required: Partial

): n is P;\n\nexport default function is

(\n type: string,\n node: t.Node | null | undefined,\n opts: Partial

,\n): node is P;\n\nexport default function is(\n type: string,\n node: t.Node | null | undefined,\n opts?: Partial,\n): node is t.Node;\n/**\n * Returns whether `node` is of given `type`.\n *\n * For better performance, use this instead of `is[Type]` when `type` is unknown.\n */\nexport default function is(\n type: string,\n node: t.Node | null | undefined,\n opts?: Partial,\n): node is t.Node {\n if (!node) return false;\n\n const matches = isType(node.type, type);\n if (!matches) {\n if (!opts && node.type === \"Placeholder\" && type in FLIPPED_ALIAS_KEYS) {\n // We can only return true if the placeholder doesn't replace a real node,\n // but it replaces a category of nodes (an alias).\n //\n // t.is(\"Identifier\", node) gives some guarantees about node's shape, so we\n // can't say that Placeholder(expectedNode: \"Identifier\") is an identifier\n // because it doesn't have the same properties.\n // On the other hand, t.is(\"Expression\", node) doesn't say anything about\n // the shape of node because Expression can be many different nodes: we can,\n // and should, safely report expression placeholders as Expressions.\n return isPlaceholderType(node.expectedNode, type);\n }\n return false;\n }\n\n if (typeof opts === \"undefined\") {\n return true;\n } else {\n return shallowEqual(node, opts);\n }\n}\n","// We inline this package\n// eslint-disable-next-line import/no-extraneous-dependencies\nimport * as charCodes from \"charcodes\";\n\n// ## Character categories\n\n// Big ugly regular expressions that match characters in the\n// whitespace, identifier, and identifier-start categories. These\n// are only applied when a character is found to actually have a\n// code point between 0x80 and 0xffff.\n// Generated by `scripts/generate-identifier-regex.js`.\n\n/* prettier-ignore */\nlet nonASCIIidentifierStartChars = \"\\xaa\\xb5\\xba\\xc0-\\xd6\\xd8-\\xf6\\xf8-\\u02c1\\u02c6-\\u02d1\\u02e0-\\u02e4\\u02ec\\u02ee\\u0370-\\u0374\\u0376\\u0377\\u037a-\\u037d\\u037f\\u0386\\u0388-\\u038a\\u038c\\u038e-\\u03a1\\u03a3-\\u03f5\\u03f7-\\u0481\\u048a-\\u052f\\u0531-\\u0556\\u0559\\u0560-\\u0588\\u05d0-\\u05ea\\u05ef-\\u05f2\\u0620-\\u064a\\u066e\\u066f\\u0671-\\u06d3\\u06d5\\u06e5\\u06e6\\u06ee\\u06ef\\u06fa-\\u06fc\\u06ff\\u0710\\u0712-\\u072f\\u074d-\\u07a5\\u07b1\\u07ca-\\u07ea\\u07f4\\u07f5\\u07fa\\u0800-\\u0815\\u081a\\u0824\\u0828\\u0840-\\u0858\\u0860-\\u086a\\u0870-\\u0887\\u0889-\\u088e\\u08a0-\\u08c9\\u0904-\\u0939\\u093d\\u0950\\u0958-\\u0961\\u0971-\\u0980\\u0985-\\u098c\\u098f\\u0990\\u0993-\\u09a8\\u09aa-\\u09b0\\u09b2\\u09b6-\\u09b9\\u09bd\\u09ce\\u09dc\\u09dd\\u09df-\\u09e1\\u09f0\\u09f1\\u09fc\\u0a05-\\u0a0a\\u0a0f\\u0a10\\u0a13-\\u0a28\\u0a2a-\\u0a30\\u0a32\\u0a33\\u0a35\\u0a36\\u0a38\\u0a39\\u0a59-\\u0a5c\\u0a5e\\u0a72-\\u0a74\\u0a85-\\u0a8d\\u0a8f-\\u0a91\\u0a93-\\u0aa8\\u0aaa-\\u0ab0\\u0ab2\\u0ab3\\u0ab5-\\u0ab9\\u0abd\\u0ad0\\u0ae0\\u0ae1\\u0af9\\u0b05-\\u0b0c\\u0b0f\\u0b10\\u0b13-\\u0b28\\u0b2a-\\u0b30\\u0b32\\u0b33\\u0b35-\\u0b39\\u0b3d\\u0b5c\\u0b5d\\u0b5f-\\u0b61\\u0b71\\u0b83\\u0b85-\\u0b8a\\u0b8e-\\u0b90\\u0b92-\\u0b95\\u0b99\\u0b9a\\u0b9c\\u0b9e\\u0b9f\\u0ba3\\u0ba4\\u0ba8-\\u0baa\\u0bae-\\u0bb9\\u0bd0\\u0c05-\\u0c0c\\u0c0e-\\u0c10\\u0c12-\\u0c28\\u0c2a-\\u0c39\\u0c3d\\u0c58-\\u0c5a\\u0c5d\\u0c60\\u0c61\\u0c80\\u0c85-\\u0c8c\\u0c8e-\\u0c90\\u0c92-\\u0ca8\\u0caa-\\u0cb3\\u0cb5-\\u0cb9\\u0cbd\\u0cdd\\u0cde\\u0ce0\\u0ce1\\u0cf1\\u0cf2\\u0d04-\\u0d0c\\u0d0e-\\u0d10\\u0d12-\\u0d3a\\u0d3d\\u0d4e\\u0d54-\\u0d56\\u0d5f-\\u0d61\\u0d7a-\\u0d7f\\u0d85-\\u0d96\\u0d9a-\\u0db1\\u0db3-\\u0dbb\\u0dbd\\u0dc0-\\u0dc6\\u0e01-\\u0e30\\u0e32\\u0e33\\u0e40-\\u0e46\\u0e81\\u0e82\\u0e84\\u0e86-\\u0e8a\\u0e8c-\\u0ea3\\u0ea5\\u0ea7-\\u0eb0\\u0eb2\\u0eb3\\u0ebd\\u0ec0-\\u0ec4\\u0ec6\\u0edc-\\u0edf\\u0f00\\u0f40-\\u0f47\\u0f49-\\u0f6c\\u0f88-\\u0f8c\\u1000-\\u102a\\u103f\\u1050-\\u1055\\u105a-\\u105d\\u1061\\u1065\\u1066\\u106e-\\u1070\\u1075-\\u1081\\u108e\\u10a0-\\u10c5\\u10c7\\u10cd\\u10d0-\\u10fa\\u10fc-\\u1248\\u124a-\\u124d\\u1250-\\u1256\\u1258\\u125a-\\u125d\\u1260-\\u1288\\u128a-\\u128d\\u1290-\\u12b0\\u12b2-\\u12b5\\u12b8-\\u12be\\u12c0\\u12c2-\\u12c5\\u12c8-\\u12d6\\u12d8-\\u1310\\u1312-\\u1315\\u1318-\\u135a\\u1380-\\u138f\\u13a0-\\u13f5\\u13f8-\\u13fd\\u1401-\\u166c\\u166f-\\u167f\\u1681-\\u169a\\u16a0-\\u16ea\\u16ee-\\u16f8\\u1700-\\u1711\\u171f-\\u1731\\u1740-\\u1751\\u1760-\\u176c\\u176e-\\u1770\\u1780-\\u17b3\\u17d7\\u17dc\\u1820-\\u1878\\u1880-\\u18a8\\u18aa\\u18b0-\\u18f5\\u1900-\\u191e\\u1950-\\u196d\\u1970-\\u1974\\u1980-\\u19ab\\u19b0-\\u19c9\\u1a00-\\u1a16\\u1a20-\\u1a54\\u1aa7\\u1b05-\\u1b33\\u1b45-\\u1b4c\\u1b83-\\u1ba0\\u1bae\\u1baf\\u1bba-\\u1be5\\u1c00-\\u1c23\\u1c4d-\\u1c4f\\u1c5a-\\u1c7d\\u1c80-\\u1c88\\u1c90-\\u1cba\\u1cbd-\\u1cbf\\u1ce9-\\u1cec\\u1cee-\\u1cf3\\u1cf5\\u1cf6\\u1cfa\\u1d00-\\u1dbf\\u1e00-\\u1f15\\u1f18-\\u1f1d\\u1f20-\\u1f45\\u1f48-\\u1f4d\\u1f50-\\u1f57\\u1f59\\u1f5b\\u1f5d\\u1f5f-\\u1f7d\\u1f80-\\u1fb4\\u1fb6-\\u1fbc\\u1fbe\\u1fc2-\\u1fc4\\u1fc6-\\u1fcc\\u1fd0-\\u1fd3\\u1fd6-\\u1fdb\\u1fe0-\\u1fec\\u1ff2-\\u1ff4\\u1ff6-\\u1ffc\\u2071\\u207f\\u2090-\\u209c\\u2102\\u2107\\u210a-\\u2113\\u2115\\u2118-\\u211d\\u2124\\u2126\\u2128\\u212a-\\u2139\\u213c-\\u213f\\u2145-\\u2149\\u214e\\u2160-\\u2188\\u2c00-\\u2ce4\\u2ceb-\\u2cee\\u2cf2\\u2cf3\\u2d00-\\u2d25\\u2d27\\u2d2d\\u2d30-\\u2d67\\u2d6f\\u2d80-\\u2d96\\u2da0-\\u2da6\\u2da8-\\u2dae\\u2db0-\\u2db6\\u2db8-\\u2dbe\\u2dc0-\\u2dc6\\u2dc8-\\u2dce\\u2dd0-\\u2dd6\\u2dd8-\\u2dde\\u3005-\\u3007\\u3021-\\u3029\\u3031-\\u3035\\u3038-\\u303c\\u3041-\\u3096\\u309b-\\u309f\\u30a1-\\u30fa\\u30fc-\\u30ff\\u3105-\\u312f\\u3131-\\u318e\\u31a0-\\u31bf\\u31f0-\\u31ff\\u3400-\\u4dbf\\u4e00-\\ua48c\\ua4d0-\\ua4fd\\ua500-\\ua60c\\ua610-\\ua61f\\ua62a\\ua62b\\ua640-\\ua66e\\ua67f-\\ua69d\\ua6a0-\\ua6ef\\ua717-\\ua71f\\ua722-\\ua788\\ua78b-\\ua7ca\\ua7d0\\ua7d1\\ua7d3\\ua7d5-\\ua7d9\\ua7f2-\\ua801\\ua803-\\ua805\\ua807-\\ua80a\\ua80c-\\ua822\\ua840-\\ua873\\ua882-\\ua8b3\\ua8f2-\\ua8f7\\ua8fb\\ua8fd\\ua8fe\\ua90a-\\ua925\\ua930-\\ua946\\ua960-\\ua97c\\ua984-\\ua9b2\\ua9cf\\ua9e0-\\ua9e4\\ua9e6-\\ua9ef\\ua9fa-\\ua9fe\\uaa00-\\uaa28\\uaa40-\\uaa42\\uaa44-\\uaa4b\\uaa60-\\uaa76\\uaa7a\\uaa7e-\\uaaaf\\uaab1\\uaab5\\uaab6\\uaab9-\\uaabd\\uaac0\\uaac2\\uaadb-\\uaadd\\uaae0-\\uaaea\\uaaf2-\\uaaf4\\uab01-\\uab06\\uab09-\\uab0e\\uab11-\\uab16\\uab20-\\uab26\\uab28-\\uab2e\\uab30-\\uab5a\\uab5c-\\uab69\\uab70-\\uabe2\\uac00-\\ud7a3\\ud7b0-\\ud7c6\\ud7cb-\\ud7fb\\uf900-\\ufa6d\\ufa70-\\ufad9\\ufb00-\\ufb06\\ufb13-\\ufb17\\ufb1d\\ufb1f-\\ufb28\\ufb2a-\\ufb36\\ufb38-\\ufb3c\\ufb3e\\ufb40\\ufb41\\ufb43\\ufb44\\ufb46-\\ufbb1\\ufbd3-\\ufd3d\\ufd50-\\ufd8f\\ufd92-\\ufdc7\\ufdf0-\\ufdfb\\ufe70-\\ufe74\\ufe76-\\ufefc\\uff21-\\uff3a\\uff41-\\uff5a\\uff66-\\uffbe\\uffc2-\\uffc7\\uffca-\\uffcf\\uffd2-\\uffd7\\uffda-\\uffdc\";\n/* prettier-ignore */\nlet nonASCIIidentifierChars = \"\\u200c\\u200d\\xb7\\u0300-\\u036f\\u0387\\u0483-\\u0487\\u0591-\\u05bd\\u05bf\\u05c1\\u05c2\\u05c4\\u05c5\\u05c7\\u0610-\\u061a\\u064b-\\u0669\\u0670\\u06d6-\\u06dc\\u06df-\\u06e4\\u06e7\\u06e8\\u06ea-\\u06ed\\u06f0-\\u06f9\\u0711\\u0730-\\u074a\\u07a6-\\u07b0\\u07c0-\\u07c9\\u07eb-\\u07f3\\u07fd\\u0816-\\u0819\\u081b-\\u0823\\u0825-\\u0827\\u0829-\\u082d\\u0859-\\u085b\\u0898-\\u089f\\u08ca-\\u08e1\\u08e3-\\u0903\\u093a-\\u093c\\u093e-\\u094f\\u0951-\\u0957\\u0962\\u0963\\u0966-\\u096f\\u0981-\\u0983\\u09bc\\u09be-\\u09c4\\u09c7\\u09c8\\u09cb-\\u09cd\\u09d7\\u09e2\\u09e3\\u09e6-\\u09ef\\u09fe\\u0a01-\\u0a03\\u0a3c\\u0a3e-\\u0a42\\u0a47\\u0a48\\u0a4b-\\u0a4d\\u0a51\\u0a66-\\u0a71\\u0a75\\u0a81-\\u0a83\\u0abc\\u0abe-\\u0ac5\\u0ac7-\\u0ac9\\u0acb-\\u0acd\\u0ae2\\u0ae3\\u0ae6-\\u0aef\\u0afa-\\u0aff\\u0b01-\\u0b03\\u0b3c\\u0b3e-\\u0b44\\u0b47\\u0b48\\u0b4b-\\u0b4d\\u0b55-\\u0b57\\u0b62\\u0b63\\u0b66-\\u0b6f\\u0b82\\u0bbe-\\u0bc2\\u0bc6-\\u0bc8\\u0bca-\\u0bcd\\u0bd7\\u0be6-\\u0bef\\u0c00-\\u0c04\\u0c3c\\u0c3e-\\u0c44\\u0c46-\\u0c48\\u0c4a-\\u0c4d\\u0c55\\u0c56\\u0c62\\u0c63\\u0c66-\\u0c6f\\u0c81-\\u0c83\\u0cbc\\u0cbe-\\u0cc4\\u0cc6-\\u0cc8\\u0cca-\\u0ccd\\u0cd5\\u0cd6\\u0ce2\\u0ce3\\u0ce6-\\u0cef\\u0cf3\\u0d00-\\u0d03\\u0d3b\\u0d3c\\u0d3e-\\u0d44\\u0d46-\\u0d48\\u0d4a-\\u0d4d\\u0d57\\u0d62\\u0d63\\u0d66-\\u0d6f\\u0d81-\\u0d83\\u0dca\\u0dcf-\\u0dd4\\u0dd6\\u0dd8-\\u0ddf\\u0de6-\\u0def\\u0df2\\u0df3\\u0e31\\u0e34-\\u0e3a\\u0e47-\\u0e4e\\u0e50-\\u0e59\\u0eb1\\u0eb4-\\u0ebc\\u0ec8-\\u0ece\\u0ed0-\\u0ed9\\u0f18\\u0f19\\u0f20-\\u0f29\\u0f35\\u0f37\\u0f39\\u0f3e\\u0f3f\\u0f71-\\u0f84\\u0f86\\u0f87\\u0f8d-\\u0f97\\u0f99-\\u0fbc\\u0fc6\\u102b-\\u103e\\u1040-\\u1049\\u1056-\\u1059\\u105e-\\u1060\\u1062-\\u1064\\u1067-\\u106d\\u1071-\\u1074\\u1082-\\u108d\\u108f-\\u109d\\u135d-\\u135f\\u1369-\\u1371\\u1712-\\u1715\\u1732-\\u1734\\u1752\\u1753\\u1772\\u1773\\u17b4-\\u17d3\\u17dd\\u17e0-\\u17e9\\u180b-\\u180d\\u180f-\\u1819\\u18a9\\u1920-\\u192b\\u1930-\\u193b\\u1946-\\u194f\\u19d0-\\u19da\\u1a17-\\u1a1b\\u1a55-\\u1a5e\\u1a60-\\u1a7c\\u1a7f-\\u1a89\\u1a90-\\u1a99\\u1ab0-\\u1abd\\u1abf-\\u1ace\\u1b00-\\u1b04\\u1b34-\\u1b44\\u1b50-\\u1b59\\u1b6b-\\u1b73\\u1b80-\\u1b82\\u1ba1-\\u1bad\\u1bb0-\\u1bb9\\u1be6-\\u1bf3\\u1c24-\\u1c37\\u1c40-\\u1c49\\u1c50-\\u1c59\\u1cd0-\\u1cd2\\u1cd4-\\u1ce8\\u1ced\\u1cf4\\u1cf7-\\u1cf9\\u1dc0-\\u1dff\\u200c\\u200d\\u203f\\u2040\\u2054\\u20d0-\\u20dc\\u20e1\\u20e5-\\u20f0\\u2cef-\\u2cf1\\u2d7f\\u2de0-\\u2dff\\u302a-\\u302f\\u3099\\u309a\\u30fb\\ua620-\\ua629\\ua66f\\ua674-\\ua67d\\ua69e\\ua69f\\ua6f0\\ua6f1\\ua802\\ua806\\ua80b\\ua823-\\ua827\\ua82c\\ua880\\ua881\\ua8b4-\\ua8c5\\ua8d0-\\ua8d9\\ua8e0-\\ua8f1\\ua8ff-\\ua909\\ua926-\\ua92d\\ua947-\\ua953\\ua980-\\ua983\\ua9b3-\\ua9c0\\ua9d0-\\ua9d9\\ua9e5\\ua9f0-\\ua9f9\\uaa29-\\uaa36\\uaa43\\uaa4c\\uaa4d\\uaa50-\\uaa59\\uaa7b-\\uaa7d\\uaab0\\uaab2-\\uaab4\\uaab7\\uaab8\\uaabe\\uaabf\\uaac1\\uaaeb-\\uaaef\\uaaf5\\uaaf6\\uabe3-\\uabea\\uabec\\uabed\\uabf0-\\uabf9\\ufb1e\\ufe00-\\ufe0f\\ufe20-\\ufe2f\\ufe33\\ufe34\\ufe4d-\\ufe4f\\uff10-\\uff19\\uff3f\\uff65\";\n\nconst nonASCIIidentifierStart = new RegExp(\n \"[\" + nonASCIIidentifierStartChars + \"]\",\n);\nconst nonASCIIidentifier = new RegExp(\n \"[\" + nonASCIIidentifierStartChars + nonASCIIidentifierChars + \"]\",\n);\n\nnonASCIIidentifierStartChars = nonASCIIidentifierChars = null;\n\n// These are a run-length and offset-encoded representation of the\n// >0xffff code points that are a valid part of identifiers. The\n// offset starts at 0x10000, and each pair of numbers represents an\n// offset to the next range, and then a size of the range. They were\n// generated by `scripts/generate-identifier-regex.js`.\n/* prettier-ignore */\nconst astralIdentifierStartCodes = [0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,14,29,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,13,10,2,14,2,6,2,1,2,10,2,14,2,6,2,1,68,310,10,21,11,7,25,5,2,41,2,8,70,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,71,55,7,1,65,0,16,3,2,2,2,28,43,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,14,35,349,41,7,1,79,28,11,0,9,21,43,17,47,20,28,22,13,52,58,1,3,0,14,44,33,24,27,35,30,0,3,0,9,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,20,1,64,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,159,52,19,3,21,2,31,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,14,0,72,26,38,6,186,43,117,63,32,7,3,0,3,7,2,1,2,23,16,0,2,0,95,7,3,38,17,0,2,0,29,0,11,39,8,0,22,0,12,45,20,0,19,72,264,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,328,18,16,0,2,12,2,33,125,0,80,921,103,110,18,195,2637,96,16,1071,18,5,4026,582,8634,568,8,30,18,78,18,29,19,47,17,3,32,20,6,18,689,63,129,74,6,0,67,12,65,1,2,0,29,6135,9,1237,43,8,8936,3,2,6,2,1,2,290,16,0,30,2,3,0,15,3,9,395,2309,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,1845,30,7,5,262,61,147,44,11,6,17,0,322,29,19,43,485,27,757,6,2,3,2,1,2,14,2,196,60,67,8,0,1205,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42719,33,4153,7,221,3,5761,15,7472,16,621,2467,541,1507,4938,6,4191];\n/* prettier-ignore */\nconst astralIdentifierCodes = [509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,370,1,81,2,71,10,50,3,123,2,54,14,32,10,3,1,11,3,46,10,8,0,46,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,2,11,83,11,7,0,3,0,158,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,193,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,84,14,5,9,243,14,166,9,71,5,2,1,3,3,2,0,2,1,13,9,120,6,3,6,4,0,29,9,41,6,2,3,9,0,10,10,47,15,406,7,2,7,17,9,57,21,2,13,123,5,4,0,2,1,2,6,2,0,9,9,49,4,2,1,2,4,9,9,330,3,10,1,2,0,49,6,4,4,14,9,5351,0,7,14,13835,9,87,9,39,4,60,6,26,9,1014,0,2,54,8,3,82,0,12,1,19628,1,4706,45,3,22,543,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,101,0,161,6,10,9,357,0,62,13,499,13,983,6,110,6,6,9,4759,9,787719,239];\n\n// This has a complexity linear to the value of the code. The\n// assumption is that looking up astral identifier characters is\n// rare.\nfunction isInAstralSet(code: number, set: readonly number[]): boolean {\n let pos = 0x10000;\n for (let i = 0, length = set.length; i < length; i += 2) {\n pos += set[i];\n if (pos > code) return false;\n\n pos += set[i + 1];\n if (pos >= code) return true;\n }\n return false;\n}\n\n// Test whether a given character code starts an identifier.\n\nexport function isIdentifierStart(code: number): boolean {\n if (code < charCodes.uppercaseA) return code === charCodes.dollarSign;\n if (code <= charCodes.uppercaseZ) return true;\n if (code < charCodes.lowercaseA) return code === charCodes.underscore;\n if (code <= charCodes.lowercaseZ) return true;\n if (code <= 0xffff) {\n return (\n code >= 0xaa && nonASCIIidentifierStart.test(String.fromCharCode(code))\n );\n }\n return isInAstralSet(code, astralIdentifierStartCodes);\n}\n\n// Test whether a given character is part of an identifier.\n\nexport function isIdentifierChar(code: number): boolean {\n if (code < charCodes.digit0) return code === charCodes.dollarSign;\n if (code < charCodes.colon) return true;\n if (code < charCodes.uppercaseA) return false;\n if (code <= charCodes.uppercaseZ) return true;\n if (code < charCodes.lowercaseA) return code === charCodes.underscore;\n if (code <= charCodes.lowercaseZ) return true;\n if (code <= 0xffff) {\n return code >= 0xaa && nonASCIIidentifier.test(String.fromCharCode(code));\n }\n return (\n isInAstralSet(code, astralIdentifierStartCodes) ||\n isInAstralSet(code, astralIdentifierCodes)\n );\n}\n\n// Test whether a given string is a valid identifier name\n\nexport function isIdentifierName(name: string): boolean {\n let isFirst = true;\n for (let i = 0; i < name.length; i++) {\n // The implementation is based on\n // https://source.chromium.org/chromium/chromium/src/+/master:v8/src/builtins/builtins-string-gen.cc;l=1455;drc=221e331b49dfefadbc6fa40b0c68e6f97606d0b3;bpv=0;bpt=1\n // We reimplement `codePointAt` because `codePointAt` is a V8 builtin which is not inlined by TurboFan (as of M91)\n // since `name` is mostly ASCII, an inlined `charCodeAt` wins here\n let cp = name.charCodeAt(i);\n if ((cp & 0xfc00) === 0xd800 && i + 1 < name.length) {\n const trail = name.charCodeAt(++i);\n if ((trail & 0xfc00) === 0xdc00) {\n cp = 0x10000 + ((cp & 0x3ff) << 10) + (trail & 0x3ff);\n }\n }\n if (isFirst) {\n isFirst = false;\n if (!isIdentifierStart(cp)) {\n return false;\n }\n } else if (!isIdentifierChar(cp)) {\n return false;\n }\n }\n return !isFirst;\n}\n","const reservedWords = {\n keyword: [\n \"break\",\n \"case\",\n \"catch\",\n \"continue\",\n \"debugger\",\n \"default\",\n \"do\",\n \"else\",\n \"finally\",\n \"for\",\n \"function\",\n \"if\",\n \"return\",\n \"switch\",\n \"throw\",\n \"try\",\n \"var\",\n \"const\",\n \"while\",\n \"with\",\n \"new\",\n \"this\",\n \"super\",\n \"class\",\n \"extends\",\n \"export\",\n \"import\",\n \"null\",\n \"true\",\n \"false\",\n \"in\",\n \"instanceof\",\n \"typeof\",\n \"void\",\n \"delete\",\n ],\n strict: [\n \"implements\",\n \"interface\",\n \"let\",\n \"package\",\n \"private\",\n \"protected\",\n \"public\",\n \"static\",\n \"yield\",\n ],\n strictBind: [\"eval\", \"arguments\"],\n};\nconst keywords = new Set(reservedWords.keyword);\nconst reservedWordsStrictSet = new Set(reservedWords.strict);\nconst reservedWordsStrictBindSet = new Set(reservedWords.strictBind);\n\n/**\n * Checks if word is a reserved word in non-strict mode\n */\nexport function isReservedWord(word: string, inModule: boolean): boolean {\n return (inModule && word === \"await\") || word === \"enum\";\n}\n\n/**\n * Checks if word is a reserved word in non-binding strict mode\n *\n * Includes non-strict reserved words\n */\nexport function isStrictReservedWord(word: string, inModule: boolean): boolean {\n return isReservedWord(word, inModule) || reservedWordsStrictSet.has(word);\n}\n\n/**\n * Checks if word is a reserved word in binding strict mode, but it is allowed as\n * a normal identifier.\n */\nexport function isStrictBindOnlyReservedWord(word: string): boolean {\n return reservedWordsStrictBindSet.has(word);\n}\n\n/**\n * Checks if word is a reserved word in binding strict mode\n *\n * Includes non-strict reserved words and non-binding strict reserved words\n */\nexport function isStrictBindReservedWord(\n word: string,\n inModule: boolean,\n): boolean {\n return (\n isStrictReservedWord(word, inModule) || isStrictBindOnlyReservedWord(word)\n );\n}\n\nexport function isKeyword(word: string): boolean {\n return keywords.has(word);\n}\n","import {\n isIdentifierName,\n isStrictReservedWord,\n isKeyword,\n} from \"@babel/helper-validator-identifier\";\n\n/**\n * Check if the input `name` is a valid identifier name\n * and isn't a reserved word.\n */\nexport default function isValidIdentifier(\n name: string,\n reserved: boolean = true,\n): boolean {\n if (typeof name !== \"string\") return false;\n\n if (reserved) {\n // \"await\" is invalid in module, valid in script; better be safe (see #4952)\n if (isKeyword(name) || isStrictReservedWord(name, true)) {\n return false;\n }\n }\n\n return isIdentifierName(name);\n}\n","// We inline this package\n// eslint-disable-next-line import/no-extraneous-dependencies\nimport * as charCodes from \"charcodes\";\n\n// The following character codes are forbidden from being\n// an immediate sibling of NumericLiteralSeparator _\nconst forbiddenNumericSeparatorSiblings = {\n decBinOct: new Set([\n charCodes.dot,\n charCodes.uppercaseB,\n charCodes.uppercaseE,\n charCodes.uppercaseO,\n charCodes.underscore, // multiple separators are not allowed\n charCodes.lowercaseB,\n charCodes.lowercaseE,\n charCodes.lowercaseO,\n ]),\n hex: new Set([\n charCodes.dot,\n charCodes.uppercaseX,\n charCodes.underscore, // multiple separators are not allowed\n charCodes.lowercaseX,\n ]),\n};\n\nconst isAllowedNumericSeparatorSibling = {\n // 0 - 1\n bin: (ch: number) => ch === charCodes.digit0 || ch === charCodes.digit1,\n\n // 0 - 7\n oct: (ch: number) => ch >= charCodes.digit0 && ch <= charCodes.digit7,\n\n // 0 - 9\n dec: (ch: number) => ch >= charCodes.digit0 && ch <= charCodes.digit9,\n\n // 0 - 9, A - F, a - f,\n hex: (ch: number) =>\n (ch >= charCodes.digit0 && ch <= charCodes.digit9) ||\n (ch >= charCodes.uppercaseA && ch <= charCodes.uppercaseF) ||\n (ch >= charCodes.lowercaseA && ch <= charCodes.lowercaseF),\n};\n\nexport type StringContentsErrorHandlers = EscapedCharErrorHandlers & {\n unterminated(\n initialPos: number,\n initialLineStart: number,\n initialCurLine: number,\n ): void;\n};\n\nexport function readStringContents(\n type: \"single\" | \"double\" | \"template\",\n input: string,\n pos: number,\n lineStart: number,\n curLine: number,\n errors: StringContentsErrorHandlers,\n) {\n const initialPos = pos;\n const initialLineStart = lineStart;\n const initialCurLine = curLine;\n\n let out = \"\";\n let firstInvalidLoc = null;\n let chunkStart = pos;\n const { length } = input;\n for (;;) {\n if (pos >= length) {\n errors.unterminated(initialPos, initialLineStart, initialCurLine);\n out += input.slice(chunkStart, pos);\n break;\n }\n const ch = input.charCodeAt(pos);\n if (isStringEnd(type, ch, input, pos)) {\n out += input.slice(chunkStart, pos);\n break;\n }\n if (ch === charCodes.backslash) {\n out += input.slice(chunkStart, pos);\n const res = readEscapedChar(\n input,\n pos,\n lineStart,\n curLine,\n type === \"template\",\n errors,\n );\n if (res.ch === null && !firstInvalidLoc) {\n firstInvalidLoc = { pos, lineStart, curLine };\n } else {\n out += res.ch;\n }\n ({ pos, lineStart, curLine } = res);\n chunkStart = pos;\n } else if (\n ch === charCodes.lineSeparator ||\n ch === charCodes.paragraphSeparator\n ) {\n ++pos;\n ++curLine;\n lineStart = pos;\n } else if (ch === charCodes.lineFeed || ch === charCodes.carriageReturn) {\n if (type === \"template\") {\n out += input.slice(chunkStart, pos) + \"\\n\";\n ++pos;\n if (\n ch === charCodes.carriageReturn &&\n input.charCodeAt(pos) === charCodes.lineFeed\n ) {\n ++pos;\n }\n ++curLine;\n chunkStart = lineStart = pos;\n } else {\n errors.unterminated(initialPos, initialLineStart, initialCurLine);\n }\n } else {\n ++pos;\n }\n }\n return process.env.BABEL_8_BREAKING\n ? { pos, str: out, firstInvalidLoc, lineStart, curLine }\n : {\n pos,\n str: out,\n firstInvalidLoc,\n lineStart,\n curLine,\n containsInvalid: !!firstInvalidLoc,\n };\n}\n\nfunction isStringEnd(\n type: \"single\" | \"double\" | \"template\",\n ch: number,\n input: string,\n pos: number,\n) {\n if (type === \"template\") {\n return (\n ch === charCodes.graveAccent ||\n (ch === charCodes.dollarSign &&\n input.charCodeAt(pos + 1) === charCodes.leftCurlyBrace)\n );\n }\n return (\n ch === (type === \"double\" ? charCodes.quotationMark : charCodes.apostrophe)\n );\n}\n\ntype EscapedCharErrorHandlers = HexCharErrorHandlers &\n CodePointErrorHandlers & {\n strictNumericEscape(pos: number, lineStart: number, curLine: number): void;\n };\n\nfunction readEscapedChar(\n input: string,\n pos: number,\n lineStart: number,\n curLine: number,\n inTemplate: boolean,\n errors: EscapedCharErrorHandlers,\n) {\n const throwOnInvalid = !inTemplate;\n pos++; // skip '\\'\n\n const res = (ch: string | null) => ({ pos, ch, lineStart, curLine });\n\n const ch = input.charCodeAt(pos++);\n switch (ch) {\n case charCodes.lowercaseN:\n return res(\"\\n\");\n case charCodes.lowercaseR:\n return res(\"\\r\");\n case charCodes.lowercaseX: {\n let code;\n ({ code, pos } = readHexChar(\n input,\n pos,\n lineStart,\n curLine,\n 2,\n false,\n throwOnInvalid,\n errors,\n ));\n return res(code === null ? null : String.fromCharCode(code));\n }\n case charCodes.lowercaseU: {\n let code;\n ({ code, pos } = readCodePoint(\n input,\n pos,\n lineStart,\n curLine,\n throwOnInvalid,\n errors,\n ));\n return res(code === null ? null : String.fromCodePoint(code));\n }\n case charCodes.lowercaseT:\n return res(\"\\t\");\n case charCodes.lowercaseB:\n return res(\"\\b\");\n case charCodes.lowercaseV:\n return res(\"\\u000b\");\n case charCodes.lowercaseF:\n return res(\"\\f\");\n case charCodes.carriageReturn:\n if (input.charCodeAt(pos) === charCodes.lineFeed) {\n ++pos;\n }\n // fall through\n case charCodes.lineFeed:\n lineStart = pos;\n ++curLine;\n // fall through\n case charCodes.lineSeparator:\n case charCodes.paragraphSeparator:\n return res(\"\");\n case charCodes.digit8:\n case charCodes.digit9:\n if (inTemplate) {\n return res(null);\n } else {\n errors.strictNumericEscape(pos - 1, lineStart, curLine);\n }\n // fall through\n default:\n if (ch >= charCodes.digit0 && ch <= charCodes.digit7) {\n const startPos = pos - 1;\n const match = /^[0-7]+/.exec(input.slice(startPos, pos + 2));\n\n let octalStr = match[0];\n\n let octal = parseInt(octalStr, 8);\n if (octal > 255) {\n octalStr = octalStr.slice(0, -1);\n octal = parseInt(octalStr, 8);\n }\n pos += octalStr.length - 1;\n const next = input.charCodeAt(pos);\n if (\n octalStr !== \"0\" ||\n next === charCodes.digit8 ||\n next === charCodes.digit9\n ) {\n if (inTemplate) {\n return res(null);\n } else {\n errors.strictNumericEscape(startPos, lineStart, curLine);\n }\n }\n\n return res(String.fromCharCode(octal));\n }\n\n return res(String.fromCharCode(ch));\n }\n}\n\ntype HexCharErrorHandlers = IntErrorHandlers & {\n invalidEscapeSequence(pos: number, lineStart: number, curLine: number): void;\n};\n\n// Used to read character escape sequences ('\\x', '\\u').\nfunction readHexChar(\n input: string,\n pos: number,\n lineStart: number,\n curLine: number,\n len: number,\n forceLen: boolean,\n throwOnInvalid: boolean,\n errors: HexCharErrorHandlers,\n) {\n const initialPos = pos;\n let n;\n ({ n, pos } = readInt(\n input,\n pos,\n lineStart,\n curLine,\n 16,\n len,\n forceLen,\n false,\n errors,\n /* bailOnError */ !throwOnInvalid,\n ));\n if (n === null) {\n if (throwOnInvalid) {\n errors.invalidEscapeSequence(initialPos, lineStart, curLine);\n } else {\n pos = initialPos - 1;\n }\n }\n return { code: n, pos };\n}\n\nexport type IntErrorHandlers = {\n numericSeparatorInEscapeSequence(\n pos: number,\n lineStart: number,\n curLine: number,\n ): void;\n unexpectedNumericSeparator(\n pos: number,\n lineStart: number,\n curLine: number,\n ): void;\n // It can return \"true\" to indicate that the error was handled\n // and the int parsing should continue.\n invalidDigit(\n pos: number,\n lineStart: number,\n curLine: number,\n radix: number,\n ): boolean;\n};\n\nexport function readInt(\n input: string,\n pos: number,\n lineStart: number,\n curLine: number,\n radix: number,\n len: number | undefined,\n forceLen: boolean,\n allowNumSeparator: boolean | \"bail\",\n errors: IntErrorHandlers,\n bailOnError: boolean,\n) {\n const start = pos;\n const forbiddenSiblings =\n radix === 16\n ? forbiddenNumericSeparatorSiblings.hex\n : forbiddenNumericSeparatorSiblings.decBinOct;\n const isAllowedSibling =\n radix === 16\n ? isAllowedNumericSeparatorSibling.hex\n : radix === 10\n ? isAllowedNumericSeparatorSibling.dec\n : radix === 8\n ? isAllowedNumericSeparatorSibling.oct\n : isAllowedNumericSeparatorSibling.bin;\n\n let invalid = false;\n let total = 0;\n\n for (let i = 0, e = len == null ? Infinity : len; i < e; ++i) {\n const code = input.charCodeAt(pos);\n let val;\n\n if (code === charCodes.underscore && allowNumSeparator !== \"bail\") {\n const prev = input.charCodeAt(pos - 1);\n const next = input.charCodeAt(pos + 1);\n\n if (!allowNumSeparator) {\n if (bailOnError) return { n: null, pos };\n errors.numericSeparatorInEscapeSequence(pos, lineStart, curLine);\n } else if (\n Number.isNaN(next) ||\n !isAllowedSibling(next) ||\n forbiddenSiblings.has(prev) ||\n forbiddenSiblings.has(next)\n ) {\n if (bailOnError) return { n: null, pos };\n errors.unexpectedNumericSeparator(pos, lineStart, curLine);\n }\n\n // Ignore this _ character\n ++pos;\n continue;\n }\n\n if (code >= charCodes.lowercaseA) {\n val = code - charCodes.lowercaseA + charCodes.lineFeed;\n } else if (code >= charCodes.uppercaseA) {\n val = code - charCodes.uppercaseA + charCodes.lineFeed;\n } else if (charCodes.isDigit(code)) {\n val = code - charCodes.digit0; // 0-9\n } else {\n val = Infinity;\n }\n if (val >= radix) {\n // If we found a digit which is too big, errors.invalidDigit can return true to avoid\n // breaking the loop (this is used for error recovery).\n if (val <= 9 && bailOnError) {\n return { n: null, pos };\n } else if (\n val <= 9 &&\n errors.invalidDigit(pos, lineStart, curLine, radix)\n ) {\n val = 0;\n } else if (forceLen) {\n val = 0;\n invalid = true;\n } else {\n break;\n }\n }\n ++pos;\n total = total * radix + val;\n }\n if (pos === start || (len != null && pos - start !== len) || invalid) {\n return { n: null, pos };\n }\n\n return { n: total, pos };\n}\n\nexport type CodePointErrorHandlers = HexCharErrorHandlers & {\n invalidCodePoint(pos: number, lineStart: number, curLine: number): void;\n};\n\nexport function readCodePoint(\n input: string,\n pos: number,\n lineStart: number,\n curLine: number,\n throwOnInvalid: boolean,\n errors: CodePointErrorHandlers,\n) {\n const ch = input.charCodeAt(pos);\n let code;\n\n if (ch === charCodes.leftCurlyBrace) {\n ++pos;\n ({ code, pos } = readHexChar(\n input,\n pos,\n lineStart,\n curLine,\n input.indexOf(\"}\", pos) - pos,\n true,\n throwOnInvalid,\n errors,\n ));\n ++pos;\n if (code !== null && code > 0x10ffff) {\n if (throwOnInvalid) {\n errors.invalidCodePoint(pos, lineStart, curLine);\n } else {\n return { code: null, pos };\n }\n }\n } else {\n ({ code, pos } = readHexChar(\n input,\n pos,\n lineStart,\n curLine,\n 4,\n false,\n throwOnInvalid,\n errors,\n ));\n }\n return { code, pos };\n}\n","export const STATEMENT_OR_BLOCK_KEYS = [\"consequent\", \"body\", \"alternate\"];\nexport const FLATTENABLE_KEYS = [\"body\", \"expressions\"];\nexport const FOR_INIT_KEYS = [\"left\", \"init\"];\nexport const COMMENT_KEYS = [\n \"leadingComments\",\n \"trailingComments\",\n \"innerComments\",\n] as const;\n\nexport const LOGICAL_OPERATORS = [\"||\", \"&&\", \"??\"];\nexport const UPDATE_OPERATORS = [\"++\", \"--\"];\n\nexport const BOOLEAN_NUMBER_BINARY_OPERATORS = [\">\", \"<\", \">=\", \"<=\"];\nexport const EQUALITY_BINARY_OPERATORS = [\"==\", \"===\", \"!=\", \"!==\"];\nexport const COMPARISON_BINARY_OPERATORS = [\n ...EQUALITY_BINARY_OPERATORS,\n \"in\",\n \"instanceof\",\n];\nexport const BOOLEAN_BINARY_OPERATORS = [\n ...COMPARISON_BINARY_OPERATORS,\n ...BOOLEAN_NUMBER_BINARY_OPERATORS,\n];\nexport const NUMBER_BINARY_OPERATORS = [\n \"-\",\n \"/\",\n \"%\",\n \"*\",\n \"**\",\n \"&\",\n \"|\",\n \">>\",\n \">>>\",\n \"<<\",\n \"^\",\n];\nexport const BINARY_OPERATORS = [\n \"+\",\n ...NUMBER_BINARY_OPERATORS,\n ...BOOLEAN_BINARY_OPERATORS,\n \"|>\",\n];\n\nexport const ASSIGNMENT_OPERATORS = [\n \"=\",\n \"+=\",\n ...NUMBER_BINARY_OPERATORS.map(op => op + \"=\"),\n ...LOGICAL_OPERATORS.map(op => op + \"=\"),\n];\n\nexport const BOOLEAN_UNARY_OPERATORS = [\"delete\", \"!\"];\nexport const NUMBER_UNARY_OPERATORS = [\"+\", \"-\", \"~\"];\nexport const STRING_UNARY_OPERATORS = [\"typeof\"];\nexport const UNARY_OPERATORS = [\n \"void\",\n \"throw\",\n ...BOOLEAN_UNARY_OPERATORS,\n ...NUMBER_UNARY_OPERATORS,\n ...STRING_UNARY_OPERATORS,\n];\n\nexport const INHERIT_KEYS = {\n optional: [\"typeAnnotation\", \"typeParameters\", \"returnType\"],\n force: [\"start\", \"loc\", \"end\"],\n} as const;\n\nexport const BLOCK_SCOPED_SYMBOL = Symbol.for(\"var used to be block scoped\");\nexport const NOT_LOCAL_BINDING = Symbol.for(\n \"should not be considered a local binding\",\n);\n","import is from \"../validators/is.ts\";\nimport { validateField, validateChild } from \"../validators/validate.ts\";\nimport type * as t from \"../index.ts\";\n\nexport const VISITOR_KEYS: Record = {};\nexport const ALIAS_KEYS: Partial> =\n {};\nexport const FLIPPED_ALIAS_KEYS: Record = {};\nexport const NODE_FIELDS: Record = {};\nexport const BUILDER_KEYS: Record = {};\nexport const DEPRECATED_KEYS: Record = {};\nexport const NODE_PARENT_VALIDATIONS: Record = {};\n\nfunction getType(val: any) {\n if (Array.isArray(val)) {\n return \"array\";\n } else if (val === null) {\n return \"null\";\n } else {\n return typeof val;\n }\n}\n\ntype NodeTypesWithoutComment = t.Node[\"type\"] | keyof t.Aliases;\n\ntype NodeTypes = NodeTypesWithoutComment | t.Comment[\"type\"];\n\ntype PrimitiveTypes = ReturnType;\n\ntype FieldDefinitions = {\n [x: string]: FieldOptions;\n};\n\ntype DefineTypeOpts = {\n fields?: FieldDefinitions;\n visitor?: Array;\n aliases?: Array;\n builder?: Array;\n inherits?: NodeTypes;\n deprecatedAlias?: string;\n validate?: Validator;\n};\n\nexport type Validator = (\n | { type: PrimitiveTypes }\n | { each: Validator }\n | { chainOf: Validator[] }\n | { oneOf: any[] }\n | { oneOfNodeTypes: NodeTypes[] }\n | { oneOfNodeOrValueTypes: (NodeTypes | PrimitiveTypes)[] }\n | { shapeOf: { [x: string]: FieldOptions } }\n | object\n) &\n ((node: t.Node, key: string, val: any) => void);\n\nexport type FieldOptions = {\n default?: string | number | boolean | [];\n optional?: boolean;\n deprecated?: boolean;\n validate?: Validator;\n};\n\nexport function validate(validate: Validator): FieldOptions {\n return { validate };\n}\n\nexport function typeIs(typeName: NodeTypes | NodeTypes[]) {\n return typeof typeName === \"string\"\n ? assertNodeType(typeName)\n : assertNodeType(...typeName);\n}\n\nexport function validateType(typeName: NodeTypes | NodeTypes[]) {\n return validate(typeIs(typeName));\n}\n\nexport function validateOptional(validate: Validator): FieldOptions {\n return { validate, optional: true };\n}\n\nexport function validateOptionalType(\n typeName: NodeTypes | NodeTypes[],\n): FieldOptions {\n return { validate: typeIs(typeName), optional: true };\n}\n\nexport function arrayOf(elementType: Validator): Validator {\n return chain(assertValueType(\"array\"), assertEach(elementType));\n}\n\nexport function arrayOfType(typeName: NodeTypes | NodeTypes[]) {\n return arrayOf(typeIs(typeName));\n}\n\nexport function validateArrayOfType(typeName: NodeTypes | NodeTypes[]) {\n return validate(arrayOfType(typeName));\n}\n\nexport function assertEach(callback: Validator): Validator {\n function validator(node: t.Node, key: string, val: any) {\n if (!Array.isArray(val)) return;\n\n for (let i = 0; i < val.length; i++) {\n const subkey = `${key}[${i}]`;\n const v = val[i];\n callback(node, subkey, v);\n if (process.env.BABEL_TYPES_8_BREAKING) validateChild(node, subkey, v);\n }\n }\n validator.each = callback;\n return validator;\n}\n\nexport function assertOneOf(...values: Array): Validator {\n function validate(node: any, key: string, val: any) {\n if (!values.includes(val)) {\n throw new TypeError(\n `Property ${key} expected value to be one of ${JSON.stringify(\n values,\n )} but got ${JSON.stringify(val)}`,\n );\n }\n }\n\n validate.oneOf = values;\n\n return validate;\n}\n\nexport function assertNodeType(...types: NodeTypes[]): Validator {\n function validate(node: t.Node, key: string, val: any) {\n for (const type of types) {\n if (is(type, val)) {\n validateChild(node, key, val);\n return;\n }\n }\n\n throw new TypeError(\n `Property ${key} of ${\n node.type\n } expected node to be of a type ${JSON.stringify(\n types,\n )} but instead got ${JSON.stringify(val?.type)}`,\n );\n }\n\n validate.oneOfNodeTypes = types;\n\n return validate;\n}\n\nexport function assertNodeOrValueType(\n ...types: (NodeTypes | PrimitiveTypes)[]\n): Validator {\n function validate(node: t.Node, key: string, val: any) {\n for (const type of types) {\n if (getType(val) === type || is(type, val)) {\n validateChild(node, key, val);\n return;\n }\n }\n\n throw new TypeError(\n `Property ${key} of ${\n node.type\n } expected node to be of a type ${JSON.stringify(\n types,\n )} but instead got ${JSON.stringify(val?.type)}`,\n );\n }\n\n validate.oneOfNodeOrValueTypes = types;\n\n return validate;\n}\n\nexport function assertValueType(type: PrimitiveTypes): Validator {\n function validate(node: t.Node, key: string, val: any) {\n const valid = getType(val) === type;\n\n if (!valid) {\n throw new TypeError(\n `Property ${key} expected type of ${type} but got ${getType(val)}`,\n );\n }\n }\n\n validate.type = type;\n\n return validate;\n}\n\nexport function assertShape(shape: { [x: string]: FieldOptions }): Validator {\n function validate(node: t.Node, key: string, val: any) {\n const errors = [];\n for (const property of Object.keys(shape)) {\n try {\n validateField(node, property, val[property], shape[property]);\n } catch (error) {\n if (error instanceof TypeError) {\n errors.push(error.message);\n continue;\n }\n throw error;\n }\n }\n if (errors.length) {\n throw new TypeError(\n `Property ${key} of ${\n node.type\n } expected to have the following:\\n${errors.join(\"\\n\")}`,\n );\n }\n }\n\n validate.shapeOf = shape;\n\n return validate;\n}\n\nexport function assertOptionalChainStart(): Validator {\n function validate(node: t.Node) {\n let current = node;\n while (node) {\n const { type } = current;\n if (type === \"OptionalCallExpression\") {\n if (current.optional) return;\n current = current.callee;\n continue;\n }\n\n if (type === \"OptionalMemberExpression\") {\n if (current.optional) return;\n current = current.object;\n continue;\n }\n\n break;\n }\n\n throw new TypeError(\n `Non-optional ${node.type} must chain from an optional OptionalMemberExpression or OptionalCallExpression. Found chain from ${current?.type}`,\n );\n }\n\n return validate;\n}\n\nexport function chain(...fns: Array): Validator {\n function validate(...args: Parameters) {\n for (const fn of fns) {\n fn(...args);\n }\n }\n validate.chainOf = fns;\n\n if (\n fns.length >= 2 &&\n \"type\" in fns[0] &&\n fns[0].type === \"array\" &&\n !(\"each\" in fns[1])\n ) {\n throw new Error(\n `An assertValueType(\"array\") validator can only be followed by an assertEach(...) validator.`,\n );\n }\n\n return validate;\n}\n\nconst validTypeOpts = [\n \"aliases\",\n \"builder\",\n \"deprecatedAlias\",\n \"fields\",\n \"inherits\",\n \"visitor\",\n \"validate\",\n];\nconst validFieldKeys = [\"default\", \"optional\", \"deprecated\", \"validate\"];\n\nconst store = {} as Record;\n\n// Wraps defineType to ensure these aliases are included.\nexport function defineAliasedType(...aliases: string[]) {\n return (type: string, opts: DefineTypeOpts = {}) => {\n let defined = opts.aliases;\n if (!defined) {\n if (opts.inherits) defined = store[opts.inherits].aliases?.slice();\n defined ??= [];\n opts.aliases = defined;\n }\n const additional = aliases.filter(a => !defined.includes(a));\n defined.unshift(...additional);\n defineType(type, opts);\n };\n}\n\nexport default function defineType(type: string, opts: DefineTypeOpts = {}) {\n const inherits = (opts.inherits && store[opts.inherits]) || {};\n\n let fields = opts.fields;\n if (!fields) {\n fields = {};\n if (inherits.fields) {\n const keys = Object.getOwnPropertyNames(inherits.fields);\n for (const key of keys) {\n const field = inherits.fields[key];\n const def = field.default;\n if (\n Array.isArray(def) ? def.length > 0 : def && typeof def === \"object\"\n ) {\n throw new Error(\n \"field defaults can only be primitives or empty arrays currently\",\n );\n }\n fields[key] = {\n default: Array.isArray(def) ? [] : def,\n optional: field.optional,\n deprecated: field.deprecated,\n validate: field.validate,\n };\n }\n }\n }\n\n const visitor: Array = opts.visitor || inherits.visitor || [];\n const aliases: Array = opts.aliases || inherits.aliases || [];\n const builder: Array =\n opts.builder || inherits.builder || opts.visitor || [];\n\n for (const k of Object.keys(opts)) {\n if (!validTypeOpts.includes(k)) {\n throw new Error(`Unknown type option \"${k}\" on ${type}`);\n }\n }\n\n if (opts.deprecatedAlias) {\n DEPRECATED_KEYS[opts.deprecatedAlias] = type as NodeTypesWithoutComment;\n }\n\n // ensure all field keys are represented in `fields`\n for (const key of visitor.concat(builder)) {\n fields[key] = fields[key] || {};\n }\n\n for (const key of Object.keys(fields)) {\n const field = fields[key];\n\n if (field.default !== undefined && !builder.includes(key)) {\n field.optional = true;\n }\n if (field.default === undefined) {\n field.default = null;\n } else if (!field.validate && field.default != null) {\n field.validate = assertValueType(getType(field.default));\n }\n\n for (const k of Object.keys(field)) {\n if (!validFieldKeys.includes(k)) {\n throw new Error(`Unknown field key \"${k}\" on ${type}.${key}`);\n }\n }\n }\n\n VISITOR_KEYS[type] = opts.visitor = visitor;\n BUILDER_KEYS[type] = opts.builder = builder;\n NODE_FIELDS[type] = opts.fields = fields;\n ALIAS_KEYS[type as NodeTypesWithoutComment] = opts.aliases = aliases;\n aliases.forEach(alias => {\n FLIPPED_ALIAS_KEYS[alias] = FLIPPED_ALIAS_KEYS[alias] || [];\n FLIPPED_ALIAS_KEYS[alias].push(type as NodeTypesWithoutComment);\n });\n\n if (opts.validate) {\n NODE_PARENT_VALIDATIONS[type] = opts.validate;\n }\n\n store[type] = opts;\n}\n","import is from \"../validators/is.ts\";\nimport isValidIdentifier from \"../validators/isValidIdentifier.ts\";\nimport { isKeyword, isReservedWord } from \"@babel/helper-validator-identifier\";\nimport type * as t from \"../index.ts\";\nimport { readStringContents } from \"@babel/helper-string-parser\";\n\nimport {\n BINARY_OPERATORS,\n LOGICAL_OPERATORS,\n ASSIGNMENT_OPERATORS,\n UNARY_OPERATORS,\n UPDATE_OPERATORS,\n} from \"../constants/index.ts\";\n\nimport {\n defineAliasedType,\n assertShape,\n assertOptionalChainStart,\n assertValueType,\n assertNodeType,\n assertNodeOrValueType,\n assertEach,\n chain,\n assertOneOf,\n validateOptional,\n type Validator,\n} from \"./utils.ts\";\n\nconst defineType = defineAliasedType(\"Standardized\");\n\ndefineType(\"ArrayExpression\", {\n fields: {\n elements: {\n validate: chain(\n assertValueType(\"array\"),\n assertEach(\n assertNodeOrValueType(\"null\", \"Expression\", \"SpreadElement\"),\n ),\n ),\n default: !process.env.BABEL_TYPES_8_BREAKING ? [] : undefined,\n },\n },\n visitor: [\"elements\"],\n aliases: [\"Expression\"],\n});\n\ndefineType(\"AssignmentExpression\", {\n fields: {\n operator: {\n validate: (function () {\n if (!process.env.BABEL_TYPES_8_BREAKING) {\n return assertValueType(\"string\");\n }\n\n const identifier = assertOneOf(...ASSIGNMENT_OPERATORS);\n const pattern = assertOneOf(\"=\");\n\n return function (node: t.AssignmentExpression, key, val) {\n const validator = is(\"Pattern\", node.left) ? pattern : identifier;\n validator(node, key, val);\n };\n })(),\n },\n left: {\n validate: !process.env.BABEL_TYPES_8_BREAKING\n ? assertNodeType(\"LVal\", \"OptionalMemberExpression\")\n : assertNodeType(\n \"Identifier\",\n \"MemberExpression\",\n \"OptionalMemberExpression\",\n \"ArrayPattern\",\n \"ObjectPattern\",\n \"TSAsExpression\",\n \"TSSatisfiesExpression\",\n \"TSTypeAssertion\",\n \"TSNonNullExpression\",\n ),\n },\n right: {\n validate: assertNodeType(\"Expression\"),\n },\n },\n builder: [\"operator\", \"left\", \"right\"],\n visitor: [\"left\", \"right\"],\n aliases: [\"Expression\"],\n});\n\ndefineType(\"BinaryExpression\", {\n builder: [\"operator\", \"left\", \"right\"],\n fields: {\n operator: {\n validate: assertOneOf(...BINARY_OPERATORS),\n },\n left: {\n validate: (function () {\n const expression = assertNodeType(\"Expression\");\n const inOp = assertNodeType(\"Expression\", \"PrivateName\");\n\n const validator: Validator = Object.assign(\n function (node: t.BinaryExpression, key, val) {\n const validator = node.operator === \"in\" ? inOp : expression;\n validator(node, key, val);\n } as Validator,\n // todo(ts): can be discriminated union by `operator` property\n { oneOfNodeTypes: [\"Expression\", \"PrivateName\"] },\n );\n return validator;\n })(),\n },\n right: {\n validate: assertNodeType(\"Expression\"),\n },\n },\n visitor: [\"left\", \"right\"],\n aliases: [\"Binary\", \"Expression\"],\n});\n\ndefineType(\"InterpreterDirective\", {\n builder: [\"value\"],\n fields: {\n value: {\n validate: assertValueType(\"string\"),\n },\n },\n});\n\ndefineType(\"Directive\", {\n visitor: [\"value\"],\n fields: {\n value: {\n validate: assertNodeType(\"DirectiveLiteral\"),\n },\n },\n});\n\ndefineType(\"DirectiveLiteral\", {\n builder: [\"value\"],\n fields: {\n value: {\n validate: assertValueType(\"string\"),\n },\n },\n});\n\ndefineType(\"BlockStatement\", {\n builder: [\"body\", \"directives\"],\n visitor: [\"directives\", \"body\"],\n fields: {\n directives: {\n validate: chain(\n assertValueType(\"array\"),\n assertEach(assertNodeType(\"Directive\")),\n ),\n default: [],\n },\n body: {\n validate: chain(\n assertValueType(\"array\"),\n assertEach(assertNodeType(\"Statement\")),\n ),\n },\n },\n aliases: [\"Scopable\", \"BlockParent\", \"Block\", \"Statement\"],\n});\n\ndefineType(\"BreakStatement\", {\n visitor: [\"label\"],\n fields: {\n label: {\n validate: assertNodeType(\"Identifier\"),\n optional: true,\n },\n },\n aliases: [\"Statement\", \"Terminatorless\", \"CompletionStatement\"],\n});\n\ndefineType(\"CallExpression\", {\n visitor: [\"callee\", \"arguments\", \"typeParameters\", \"typeArguments\"],\n builder: [\"callee\", \"arguments\"],\n aliases: [\"Expression\"],\n fields: {\n callee: {\n validate: assertNodeType(\"Expression\", \"Super\", \"V8IntrinsicIdentifier\"),\n },\n arguments: {\n validate: chain(\n assertValueType(\"array\"),\n assertEach(\n assertNodeType(\"Expression\", \"SpreadElement\", \"ArgumentPlaceholder\"),\n ),\n ),\n },\n ...(!process.env.BABEL_TYPES_8_BREAKING\n ? {\n optional: {\n validate: assertOneOf(true, false),\n optional: true,\n },\n }\n : {}),\n typeArguments: {\n validate: assertNodeType(\"TypeParameterInstantiation\"),\n optional: true,\n },\n typeParameters: {\n validate: assertNodeType(\"TSTypeParameterInstantiation\"),\n optional: true,\n },\n },\n});\n\ndefineType(\"CatchClause\", {\n visitor: [\"param\", \"body\"],\n fields: {\n param: {\n validate: assertNodeType(\"Identifier\", \"ArrayPattern\", \"ObjectPattern\"),\n optional: true,\n },\n body: {\n validate: assertNodeType(\"BlockStatement\"),\n },\n },\n aliases: [\"Scopable\", \"BlockParent\"],\n});\n\ndefineType(\"ConditionalExpression\", {\n visitor: [\"test\", \"consequent\", \"alternate\"],\n fields: {\n test: {\n validate: assertNodeType(\"Expression\"),\n },\n consequent: {\n validate: assertNodeType(\"Expression\"),\n },\n alternate: {\n validate: assertNodeType(\"Expression\"),\n },\n },\n aliases: [\"Expression\", \"Conditional\"],\n});\n\ndefineType(\"ContinueStatement\", {\n visitor: [\"label\"],\n fields: {\n label: {\n validate: assertNodeType(\"Identifier\"),\n optional: true,\n },\n },\n aliases: [\"Statement\", \"Terminatorless\", \"CompletionStatement\"],\n});\n\ndefineType(\"DebuggerStatement\", {\n aliases: [\"Statement\"],\n});\n\ndefineType(\"DoWhileStatement\", {\n visitor: [\"test\", \"body\"],\n fields: {\n test: {\n validate: assertNodeType(\"Expression\"),\n },\n body: {\n validate: assertNodeType(\"Statement\"),\n },\n },\n aliases: [\"Statement\", \"BlockParent\", \"Loop\", \"While\", \"Scopable\"],\n});\n\ndefineType(\"EmptyStatement\", {\n aliases: [\"Statement\"],\n});\n\ndefineType(\"ExpressionStatement\", {\n visitor: [\"expression\"],\n fields: {\n expression: {\n validate: assertNodeType(\"Expression\"),\n },\n },\n aliases: [\"Statement\", \"ExpressionWrapper\"],\n});\n\ndefineType(\"File\", {\n builder: [\"program\", \"comments\", \"tokens\"],\n visitor: [\"program\"],\n fields: {\n program: {\n validate: assertNodeType(\"Program\"),\n },\n comments: {\n validate: !process.env.BABEL_TYPES_8_BREAKING\n ? Object.assign(() => {}, {\n each: { oneOfNodeTypes: [\"CommentBlock\", \"CommentLine\"] },\n })\n : assertEach(assertNodeType(\"CommentBlock\", \"CommentLine\")),\n optional: true,\n },\n tokens: {\n // todo(ts): add Token type\n validate: assertEach(Object.assign(() => {}, { type: \"any\" })),\n optional: true,\n },\n },\n});\n\ndefineType(\"ForInStatement\", {\n visitor: [\"left\", \"right\", \"body\"],\n aliases: [\n \"Scopable\",\n \"Statement\",\n \"For\",\n \"BlockParent\",\n \"Loop\",\n \"ForXStatement\",\n ],\n fields: {\n left: {\n validate: !process.env.BABEL_TYPES_8_BREAKING\n ? assertNodeType(\"VariableDeclaration\", \"LVal\")\n : assertNodeType(\n \"VariableDeclaration\",\n \"Identifier\",\n \"MemberExpression\",\n \"ArrayPattern\",\n \"ObjectPattern\",\n \"TSAsExpression\",\n \"TSSatisfiesExpression\",\n \"TSTypeAssertion\",\n \"TSNonNullExpression\",\n ),\n },\n right: {\n validate: assertNodeType(\"Expression\"),\n },\n body: {\n validate: assertNodeType(\"Statement\"),\n },\n },\n});\n\ndefineType(\"ForStatement\", {\n visitor: [\"init\", \"test\", \"update\", \"body\"],\n aliases: [\"Scopable\", \"Statement\", \"For\", \"BlockParent\", \"Loop\"],\n fields: {\n init: {\n validate: assertNodeType(\"VariableDeclaration\", \"Expression\"),\n optional: true,\n },\n test: {\n validate: assertNodeType(\"Expression\"),\n optional: true,\n },\n update: {\n validate: assertNodeType(\"Expression\"),\n optional: true,\n },\n body: {\n validate: assertNodeType(\"Statement\"),\n },\n },\n});\n\nexport const functionCommon = () => ({\n params: {\n validate: chain(\n assertValueType(\"array\"),\n assertEach(assertNodeType(\"Identifier\", \"Pattern\", \"RestElement\")),\n ),\n },\n generator: {\n default: false,\n },\n async: {\n default: false,\n },\n});\n\nexport const functionTypeAnnotationCommon = () => ({\n returnType: {\n validate: process.env.BABEL_8_BREAKING\n ? assertNodeType(\"TypeAnnotation\", \"TSTypeAnnotation\")\n : assertNodeType(\n \"TypeAnnotation\",\n \"TSTypeAnnotation\",\n // @ts-ignore(Babel 7 vs Babel 8) Babel 7 AST\n \"Noop\",\n ),\n optional: true,\n },\n typeParameters: {\n validate: process.env.BABEL_8_BREAKING\n ? assertNodeType(\"TypeParameterDeclaration\", \"TSTypeParameterDeclaration\")\n : assertNodeType(\n \"TypeParameterDeclaration\",\n \"TSTypeParameterDeclaration\",\n // @ts-ignore(Babel 7 vs Babel 8) Babel 7 AST\n \"Noop\",\n ),\n optional: true,\n },\n});\n\nexport const functionDeclarationCommon = () => ({\n ...functionCommon(),\n declare: {\n validate: assertValueType(\"boolean\"),\n optional: true,\n },\n id: {\n validate: assertNodeType(\"Identifier\"),\n optional: true, // May be null for `export default function`\n },\n});\n\ndefineType(\"FunctionDeclaration\", {\n builder: [\"id\", \"params\", \"body\", \"generator\", \"async\"],\n visitor: [\"id\", \"params\", \"body\", \"returnType\", \"typeParameters\"],\n fields: {\n ...functionDeclarationCommon(),\n ...functionTypeAnnotationCommon(),\n body: {\n validate: assertNodeType(\"BlockStatement\"),\n },\n predicate: {\n validate: assertNodeType(\"DeclaredPredicate\", \"InferredPredicate\"),\n optional: true,\n },\n },\n aliases: [\n \"Scopable\",\n \"Function\",\n \"BlockParent\",\n \"FunctionParent\",\n \"Statement\",\n \"Pureish\",\n \"Declaration\",\n ],\n validate: (function () {\n if (!process.env.BABEL_TYPES_8_BREAKING) return () => {};\n\n const identifier = assertNodeType(\"Identifier\");\n\n return function (parent, key, node) {\n if (!is(\"ExportDefaultDeclaration\", parent)) {\n identifier(node, \"id\", node.id);\n }\n };\n })(),\n});\n\ndefineType(\"FunctionExpression\", {\n inherits: \"FunctionDeclaration\",\n aliases: [\n \"Scopable\",\n \"Function\",\n \"BlockParent\",\n \"FunctionParent\",\n \"Expression\",\n \"Pureish\",\n ],\n fields: {\n ...functionCommon(),\n ...functionTypeAnnotationCommon(),\n id: {\n validate: assertNodeType(\"Identifier\"),\n optional: true,\n },\n body: {\n validate: assertNodeType(\"BlockStatement\"),\n },\n predicate: {\n validate: assertNodeType(\"DeclaredPredicate\", \"InferredPredicate\"),\n optional: true,\n },\n },\n});\n\nexport const patternLikeCommon = () => ({\n typeAnnotation: {\n validate: process.env.BABEL_8_BREAKING\n ? assertNodeType(\"TypeAnnotation\", \"TSTypeAnnotation\")\n : assertNodeType(\n \"TypeAnnotation\",\n \"TSTypeAnnotation\",\n // @ts-ignore(Babel 7 vs Babel 8) Babel 7 AST\n \"Noop\",\n ),\n optional: true,\n },\n optional: {\n validate: assertValueType(\"boolean\"),\n optional: true,\n },\n decorators: {\n validate: chain(\n assertValueType(\"array\"),\n assertEach(assertNodeType(\"Decorator\")),\n ),\n optional: true,\n },\n});\n\ndefineType(\"Identifier\", {\n builder: [\"name\"],\n visitor: [\"typeAnnotation\", \"decorators\" /* for legacy param decorators */],\n aliases: [\"Expression\", \"PatternLike\", \"LVal\", \"TSEntityName\"],\n fields: {\n ...patternLikeCommon(),\n name: {\n validate: chain(\n assertValueType(\"string\"),\n Object.assign(\n function (node, key, val) {\n if (!process.env.BABEL_TYPES_8_BREAKING) return;\n\n if (!isValidIdentifier(val, false)) {\n throw new TypeError(`\"${val}\" is not a valid identifier name`);\n }\n } as Validator,\n { type: \"string\" },\n ),\n ),\n },\n },\n validate(parent, key, node) {\n if (!process.env.BABEL_TYPES_8_BREAKING) return;\n\n const match = /\\.(\\w+)$/.exec(key);\n if (!match) return;\n\n const [, parentKey] = match;\n const nonComp = { computed: false };\n\n // We can't check if `parent.property === node`, because nodes are validated\n // before replacing them in the AST.\n if (parentKey === \"property\") {\n if (is(\"MemberExpression\", parent, nonComp)) return;\n if (is(\"OptionalMemberExpression\", parent, nonComp)) return;\n } else if (parentKey === \"key\") {\n if (is(\"Property\", parent, nonComp)) return;\n if (is(\"Method\", parent, nonComp)) return;\n } else if (parentKey === \"exported\") {\n if (is(\"ExportSpecifier\", parent)) return;\n } else if (parentKey === \"imported\") {\n if (is(\"ImportSpecifier\", parent, { imported: node })) return;\n } else if (parentKey === \"meta\") {\n if (is(\"MetaProperty\", parent, { meta: node })) return;\n }\n\n if (\n // Ideally we should call isStrictReservedWord if this node is a descendant\n // of a block in strict mode. Also, we should pass the inModule option so\n // we can disable \"await\" in module.\n (isKeyword(node.name) || isReservedWord(node.name, false)) &&\n // Even if \"this\" is a keyword, we are using the Identifier\n // node to represent it.\n node.name !== \"this\"\n ) {\n throw new TypeError(`\"${node.name}\" is not a valid identifier`);\n }\n },\n});\n\ndefineType(\"IfStatement\", {\n visitor: [\"test\", \"consequent\", \"alternate\"],\n aliases: [\"Statement\", \"Conditional\"],\n fields: {\n test: {\n validate: assertNodeType(\"Expression\"),\n },\n consequent: {\n validate: assertNodeType(\"Statement\"),\n },\n alternate: {\n optional: true,\n validate: assertNodeType(\"Statement\"),\n },\n },\n});\n\ndefineType(\"LabeledStatement\", {\n visitor: [\"label\", \"body\"],\n aliases: [\"Statement\"],\n fields: {\n label: {\n validate: assertNodeType(\"Identifier\"),\n },\n body: {\n validate: assertNodeType(\"Statement\"),\n },\n },\n});\n\ndefineType(\"StringLiteral\", {\n builder: [\"value\"],\n fields: {\n value: {\n validate: assertValueType(\"string\"),\n },\n },\n aliases: [\"Expression\", \"Pureish\", \"Literal\", \"Immutable\"],\n});\n\ndefineType(\"NumericLiteral\", {\n builder: [\"value\"],\n deprecatedAlias: \"NumberLiteral\",\n fields: {\n value: {\n validate: chain(\n assertValueType(\"number\"),\n Object.assign(\n function (node, key, val) {\n if (1 / val < 0 || !Number.isFinite(val)) {\n const error = new Error(\n \"NumericLiterals must be non-negative finite numbers. \" +\n `You can use t.valueToNode(${val}) instead.`,\n );\n if (process.env.BABEL_8_BREAKING) {\n // TODO(@nicolo-ribaudo) Fix regenerator to not pass negative\n // numbers here.\n if (!IS_STANDALONE) {\n if (!new Error().stack.includes(\"regenerator\")) {\n throw error;\n }\n }\n } else {\n // TODO: Enable this warning once regenerator is fixed.\n // https://github.com/facebook/regenerator/pull/680\n // console.warn(error);\n }\n }\n } satisfies Validator,\n { type: \"number\" },\n ),\n ),\n },\n },\n aliases: [\"Expression\", \"Pureish\", \"Literal\", \"Immutable\"],\n});\n\ndefineType(\"NullLiteral\", {\n aliases: [\"Expression\", \"Pureish\", \"Literal\", \"Immutable\"],\n});\n\ndefineType(\"BooleanLiteral\", {\n builder: [\"value\"],\n fields: {\n value: {\n validate: assertValueType(\"boolean\"),\n },\n },\n aliases: [\"Expression\", \"Pureish\", \"Literal\", \"Immutable\"],\n});\n\ndefineType(\"RegExpLiteral\", {\n builder: [\"pattern\", \"flags\"],\n deprecatedAlias: \"RegexLiteral\",\n aliases: [\"Expression\", \"Pureish\", \"Literal\"],\n fields: {\n pattern: {\n validate: assertValueType(\"string\"),\n },\n flags: {\n validate: chain(\n assertValueType(\"string\"),\n Object.assign(\n function (node, key, val) {\n if (!process.env.BABEL_TYPES_8_BREAKING) return;\n\n const invalid = /[^gimsuy]/.exec(val);\n if (invalid) {\n throw new TypeError(`\"${invalid[0]}\" is not a valid RegExp flag`);\n }\n } as Validator,\n { type: \"string\" },\n ),\n ),\n default: \"\",\n },\n },\n});\n\ndefineType(\"LogicalExpression\", {\n builder: [\"operator\", \"left\", \"right\"],\n visitor: [\"left\", \"right\"],\n aliases: [\"Binary\", \"Expression\"],\n fields: {\n operator: {\n validate: assertOneOf(...LOGICAL_OPERATORS),\n },\n left: {\n validate: assertNodeType(\"Expression\"),\n },\n right: {\n validate: assertNodeType(\"Expression\"),\n },\n },\n});\n\ndefineType(\"MemberExpression\", {\n builder: [\n \"object\",\n \"property\",\n \"computed\",\n ...(!process.env.BABEL_TYPES_8_BREAKING ? [\"optional\"] : []),\n ],\n visitor: [\"object\", \"property\"],\n aliases: [\"Expression\", \"LVal\"],\n fields: {\n object: {\n validate: assertNodeType(\"Expression\", \"Super\"),\n },\n property: {\n validate: (function () {\n const normal = assertNodeType(\"Identifier\", \"PrivateName\");\n const computed = assertNodeType(\"Expression\");\n\n const validator: Validator = function (\n node: t.MemberExpression,\n key,\n val,\n ) {\n const validator: Validator = node.computed ? computed : normal;\n validator(node, key, val);\n };\n // @ts-expect-error todo(ts): can be discriminated union by `computed` property\n validator.oneOfNodeTypes = [\"Expression\", \"Identifier\", \"PrivateName\"];\n return validator;\n })(),\n },\n computed: {\n default: false,\n },\n ...(!process.env.BABEL_TYPES_8_BREAKING\n ? {\n optional: {\n validate: assertOneOf(true, false),\n optional: true,\n },\n }\n : {}),\n },\n});\n\ndefineType(\"NewExpression\", { inherits: \"CallExpression\" });\n\ndefineType(\"Program\", {\n // Note: We explicitly leave 'interpreter' out here because it is\n // conceptually comment-like, and Babel does not traverse comments either.\n visitor: [\"directives\", \"body\"],\n builder: [\"body\", \"directives\", \"sourceType\", \"interpreter\"],\n fields: {\n sourceType: {\n validate: assertOneOf(\"script\", \"module\"),\n default: \"script\",\n },\n interpreter: {\n validate: assertNodeType(\"InterpreterDirective\"),\n default: null,\n optional: true,\n },\n directives: {\n validate: chain(\n assertValueType(\"array\"),\n assertEach(assertNodeType(\"Directive\")),\n ),\n default: [],\n },\n body: {\n validate: chain(\n assertValueType(\"array\"),\n assertEach(assertNodeType(\"Statement\")),\n ),\n },\n },\n aliases: [\"Scopable\", \"BlockParent\", \"Block\"],\n});\n\ndefineType(\"ObjectExpression\", {\n visitor: [\"properties\"],\n aliases: [\"Expression\"],\n fields: {\n properties: {\n validate: chain(\n assertValueType(\"array\"),\n assertEach(\n assertNodeType(\"ObjectMethod\", \"ObjectProperty\", \"SpreadElement\"),\n ),\n ),\n },\n },\n});\n\ndefineType(\"ObjectMethod\", {\n builder: [\"kind\", \"key\", \"params\", \"body\", \"computed\", \"generator\", \"async\"],\n fields: {\n ...functionCommon(),\n ...functionTypeAnnotationCommon(),\n kind: {\n validate: assertOneOf(\"method\", \"get\", \"set\"),\n ...(!process.env.BABEL_TYPES_8_BREAKING ? { default: \"method\" } : {}),\n },\n computed: {\n default: false,\n },\n key: {\n validate: (function () {\n const normal = assertNodeType(\n \"Identifier\",\n \"StringLiteral\",\n \"NumericLiteral\",\n \"BigIntLiteral\",\n );\n const computed = assertNodeType(\"Expression\");\n\n const validator: Validator = function (node: t.ObjectMethod, key, val) {\n const validator = node.computed ? computed : normal;\n validator(node, key, val);\n };\n // @ts-expect-error todo(ts): can be discriminated union by `computed` property\n validator.oneOfNodeTypes = [\n \"Expression\",\n \"Identifier\",\n \"StringLiteral\",\n \"NumericLiteral\",\n \"BigIntLiteral\",\n ];\n return validator;\n })(),\n },\n decorators: {\n validate: chain(\n assertValueType(\"array\"),\n assertEach(assertNodeType(\"Decorator\")),\n ),\n optional: true,\n },\n body: {\n validate: assertNodeType(\"BlockStatement\"),\n },\n },\n visitor: [\n \"key\",\n \"params\",\n \"body\",\n \"decorators\",\n \"returnType\",\n \"typeParameters\",\n ],\n aliases: [\n \"UserWhitespacable\",\n \"Function\",\n \"Scopable\",\n \"BlockParent\",\n \"FunctionParent\",\n \"Method\",\n \"ObjectMember\",\n ],\n});\n\ndefineType(\"ObjectProperty\", {\n builder: [\n \"key\",\n \"value\",\n \"computed\",\n \"shorthand\",\n ...(!process.env.BABEL_TYPES_8_BREAKING ? [\"decorators\"] : []),\n ],\n fields: {\n computed: {\n default: false,\n },\n key: {\n validate: (function () {\n const normal = assertNodeType(\n \"Identifier\",\n \"StringLiteral\",\n \"NumericLiteral\",\n \"BigIntLiteral\",\n \"DecimalLiteral\",\n \"PrivateName\",\n );\n const computed = assertNodeType(\"Expression\");\n\n const validator: Validator = Object.assign(\n function (node: t.ObjectProperty, key, val) {\n const validator = node.computed ? computed : normal;\n validator(node, key, val);\n } as Validator,\n {\n // todo(ts): can be discriminated union by `computed` property\n oneOfNodeTypes: [\n \"Expression\",\n \"Identifier\",\n \"StringLiteral\",\n \"NumericLiteral\",\n \"BigIntLiteral\",\n \"DecimalLiteral\",\n \"PrivateName\",\n ],\n },\n );\n return validator;\n })(),\n },\n value: {\n // Value may be PatternLike if this is an AssignmentProperty\n // https://github.com/babel/babylon/issues/434\n validate: assertNodeType(\"Expression\", \"PatternLike\"),\n },\n shorthand: {\n validate: chain(\n assertValueType(\"boolean\"),\n Object.assign(\n function (node: t.ObjectProperty, key, val) {\n if (!process.env.BABEL_TYPES_8_BREAKING) return;\n\n if (val && node.computed) {\n throw new TypeError(\n \"Property shorthand of ObjectProperty cannot be true if computed is true\",\n );\n }\n } as Validator,\n { type: \"boolean\" },\n ),\n function (node: t.ObjectProperty, key, val) {\n if (!process.env.BABEL_TYPES_8_BREAKING) return;\n\n if (val && !is(\"Identifier\", node.key)) {\n throw new TypeError(\n \"Property shorthand of ObjectProperty cannot be true if key is not an Identifier\",\n );\n }\n } as Validator,\n ),\n default: false,\n },\n decorators: {\n validate: chain(\n assertValueType(\"array\"),\n assertEach(assertNodeType(\"Decorator\")),\n ),\n optional: true,\n },\n },\n visitor: [\"key\", \"value\", \"decorators\"],\n aliases: [\"UserWhitespacable\", \"Property\", \"ObjectMember\"],\n validate: (function () {\n const pattern = assertNodeType(\n \"Identifier\",\n \"Pattern\",\n \"TSAsExpression\",\n \"TSSatisfiesExpression\",\n \"TSNonNullExpression\",\n \"TSTypeAssertion\",\n );\n const expression = assertNodeType(\"Expression\");\n\n return function (parent, key, node) {\n if (!process.env.BABEL_TYPES_8_BREAKING) return;\n\n const validator = is(\"ObjectPattern\", parent) ? pattern : expression;\n validator(node, \"value\", node.value);\n };\n })(),\n});\n\ndefineType(\"RestElement\", {\n visitor: [\"argument\", \"typeAnnotation\"],\n builder: [\"argument\"],\n aliases: [\"LVal\", \"PatternLike\"],\n deprecatedAlias: \"RestProperty\",\n fields: {\n ...patternLikeCommon(),\n argument: {\n validate: !process.env.BABEL_TYPES_8_BREAKING\n ? assertNodeType(\"LVal\")\n : assertNodeType(\n \"Identifier\",\n \"ArrayPattern\",\n \"ObjectPattern\",\n \"MemberExpression\",\n \"TSAsExpression\",\n \"TSSatisfiesExpression\",\n \"TSTypeAssertion\",\n \"TSNonNullExpression\",\n ),\n },\n },\n validate(parent: t.ArrayPattern | t.ObjectPattern, key) {\n if (!process.env.BABEL_TYPES_8_BREAKING) return;\n\n const match = /(\\w+)\\[(\\d+)\\]/.exec(key);\n if (!match) throw new Error(\"Internal Babel error: malformed key.\");\n\n const [, listKey, index] = match as unknown as [\n string,\n keyof typeof parent,\n string,\n ];\n if ((parent[listKey] as t.Node[]).length > +index + 1) {\n throw new TypeError(`RestElement must be last element of ${listKey}`);\n }\n },\n});\n\ndefineType(\"ReturnStatement\", {\n visitor: [\"argument\"],\n aliases: [\"Statement\", \"Terminatorless\", \"CompletionStatement\"],\n fields: {\n argument: {\n validate: assertNodeType(\"Expression\"),\n optional: true,\n },\n },\n});\n\ndefineType(\"SequenceExpression\", {\n visitor: [\"expressions\"],\n fields: {\n expressions: {\n validate: chain(\n assertValueType(\"array\"),\n assertEach(assertNodeType(\"Expression\")),\n ),\n },\n },\n aliases: [\"Expression\"],\n});\n\ndefineType(\"ParenthesizedExpression\", {\n visitor: [\"expression\"],\n aliases: [\"Expression\", \"ExpressionWrapper\"],\n fields: {\n expression: {\n validate: assertNodeType(\"Expression\"),\n },\n },\n});\n\ndefineType(\"SwitchCase\", {\n visitor: [\"test\", \"consequent\"],\n fields: {\n test: {\n validate: assertNodeType(\"Expression\"),\n optional: true,\n },\n consequent: {\n validate: chain(\n assertValueType(\"array\"),\n assertEach(assertNodeType(\"Statement\")),\n ),\n },\n },\n});\n\ndefineType(\"SwitchStatement\", {\n visitor: [\"discriminant\", \"cases\"],\n aliases: [\"Statement\", \"BlockParent\", \"Scopable\"],\n fields: {\n discriminant: {\n validate: assertNodeType(\"Expression\"),\n },\n cases: {\n validate: chain(\n assertValueType(\"array\"),\n assertEach(assertNodeType(\"SwitchCase\")),\n ),\n },\n },\n});\n\ndefineType(\"ThisExpression\", {\n aliases: [\"Expression\"],\n});\n\ndefineType(\"ThrowStatement\", {\n visitor: [\"argument\"],\n aliases: [\"Statement\", \"Terminatorless\", \"CompletionStatement\"],\n fields: {\n argument: {\n validate: assertNodeType(\"Expression\"),\n },\n },\n});\n\ndefineType(\"TryStatement\", {\n visitor: [\"block\", \"handler\", \"finalizer\"],\n aliases: [\"Statement\"],\n fields: {\n block: {\n validate: chain(\n assertNodeType(\"BlockStatement\"),\n Object.assign(\n function (node: t.TryStatement) {\n if (!process.env.BABEL_TYPES_8_BREAKING) return;\n\n // This validator isn't put at the top level because we can run it\n // even if this node doesn't have a parent.\n\n if (!node.handler && !node.finalizer) {\n throw new TypeError(\n \"TryStatement expects either a handler or finalizer, or both\",\n );\n }\n } as Validator,\n {\n oneOfNodeTypes: [\"BlockStatement\"],\n },\n ),\n ),\n },\n handler: {\n optional: true,\n validate: assertNodeType(\"CatchClause\"),\n },\n finalizer: {\n optional: true,\n validate: assertNodeType(\"BlockStatement\"),\n },\n },\n});\n\ndefineType(\"UnaryExpression\", {\n builder: [\"operator\", \"argument\", \"prefix\"],\n fields: {\n prefix: {\n default: true,\n },\n argument: {\n validate: assertNodeType(\"Expression\"),\n },\n operator: {\n validate: assertOneOf(...UNARY_OPERATORS),\n },\n },\n visitor: [\"argument\"],\n aliases: [\"UnaryLike\", \"Expression\"],\n});\n\ndefineType(\"UpdateExpression\", {\n builder: [\"operator\", \"argument\", \"prefix\"],\n fields: {\n prefix: {\n default: false,\n },\n argument: {\n validate: !process.env.BABEL_TYPES_8_BREAKING\n ? assertNodeType(\"Expression\")\n : assertNodeType(\"Identifier\", \"MemberExpression\"),\n },\n operator: {\n validate: assertOneOf(...UPDATE_OPERATORS),\n },\n },\n visitor: [\"argument\"],\n aliases: [\"Expression\"],\n});\n\ndefineType(\"VariableDeclaration\", {\n builder: [\"kind\", \"declarations\"],\n visitor: [\"declarations\"],\n aliases: [\"Statement\", \"Declaration\"],\n fields: {\n declare: {\n validate: assertValueType(\"boolean\"),\n optional: true,\n },\n kind: {\n validate: assertOneOf(\n \"var\",\n \"let\",\n \"const\",\n // https://github.com/tc39/proposal-explicit-resource-management\n \"using\",\n // https://github.com/tc39/proposal-async-explicit-resource-management\n \"await using\",\n ),\n },\n declarations: {\n validate: chain(\n assertValueType(\"array\"),\n assertEach(assertNodeType(\"VariableDeclarator\")),\n ),\n },\n },\n validate(parent, key, node) {\n if (!process.env.BABEL_TYPES_8_BREAKING) return;\n\n if (!is(\"ForXStatement\", parent, { left: node })) return;\n if (node.declarations.length !== 1) {\n throw new TypeError(\n `Exactly one VariableDeclarator is required in the VariableDeclaration of a ${parent.type}`,\n );\n }\n },\n});\n\ndefineType(\"VariableDeclarator\", {\n visitor: [\"id\", \"init\"],\n fields: {\n id: {\n validate: (function () {\n if (!process.env.BABEL_TYPES_8_BREAKING) {\n return assertNodeType(\"LVal\");\n }\n\n const normal = assertNodeType(\n \"Identifier\",\n \"ArrayPattern\",\n \"ObjectPattern\",\n );\n const without = assertNodeType(\"Identifier\");\n\n return function (node: t.VariableDeclarator, key, val) {\n const validator = node.init ? normal : without;\n validator(node, key, val);\n };\n })(),\n },\n definite: {\n optional: true,\n validate: assertValueType(\"boolean\"),\n },\n init: {\n optional: true,\n validate: assertNodeType(\"Expression\"),\n },\n },\n});\n\ndefineType(\"WhileStatement\", {\n visitor: [\"test\", \"body\"],\n aliases: [\"Statement\", \"BlockParent\", \"Loop\", \"While\", \"Scopable\"],\n fields: {\n test: {\n validate: assertNodeType(\"Expression\"),\n },\n body: {\n validate: assertNodeType(\"Statement\"),\n },\n },\n});\n\ndefineType(\"WithStatement\", {\n visitor: [\"object\", \"body\"],\n aliases: [\"Statement\"],\n fields: {\n object: {\n validate: assertNodeType(\"Expression\"),\n },\n body: {\n validate: assertNodeType(\"Statement\"),\n },\n },\n});\n\n// --- ES2015 ---\ndefineType(\"AssignmentPattern\", {\n visitor: [\"left\", \"right\", \"decorators\" /* for legacy param decorators */],\n builder: [\"left\", \"right\"],\n aliases: [\"Pattern\", \"PatternLike\", \"LVal\"],\n fields: {\n ...patternLikeCommon(),\n left: {\n validate: assertNodeType(\n \"Identifier\",\n \"ObjectPattern\",\n \"ArrayPattern\",\n \"MemberExpression\",\n \"TSAsExpression\",\n \"TSSatisfiesExpression\",\n \"TSTypeAssertion\",\n \"TSNonNullExpression\",\n ),\n },\n right: {\n validate: assertNodeType(\"Expression\"),\n },\n // For TypeScript\n decorators: {\n validate: chain(\n assertValueType(\"array\"),\n assertEach(assertNodeType(\"Decorator\")),\n ),\n optional: true,\n },\n },\n});\n\ndefineType(\"ArrayPattern\", {\n visitor: [\"elements\", \"typeAnnotation\"],\n builder: [\"elements\"],\n aliases: [\"Pattern\", \"PatternLike\", \"LVal\"],\n fields: {\n ...patternLikeCommon(),\n elements: {\n validate: chain(\n assertValueType(\"array\"),\n assertEach(assertNodeOrValueType(\"null\", \"PatternLike\", \"LVal\")),\n ),\n },\n },\n});\n\ndefineType(\"ArrowFunctionExpression\", {\n builder: [\"params\", \"body\", \"async\"],\n visitor: [\"params\", \"body\", \"returnType\", \"typeParameters\"],\n aliases: [\n \"Scopable\",\n \"Function\",\n \"BlockParent\",\n \"FunctionParent\",\n \"Expression\",\n \"Pureish\",\n ],\n fields: {\n ...functionCommon(),\n ...functionTypeAnnotationCommon(),\n expression: {\n // https://github.com/babel/babylon/issues/505\n validate: assertValueType(\"boolean\"),\n },\n body: {\n validate: assertNodeType(\"BlockStatement\", \"Expression\"),\n },\n predicate: {\n validate: assertNodeType(\"DeclaredPredicate\", \"InferredPredicate\"),\n optional: true,\n },\n },\n});\n\ndefineType(\"ClassBody\", {\n visitor: [\"body\"],\n fields: {\n body: {\n validate: chain(\n assertValueType(\"array\"),\n assertEach(\n assertNodeType(\n \"ClassMethod\",\n \"ClassPrivateMethod\",\n \"ClassProperty\",\n \"ClassPrivateProperty\",\n \"ClassAccessorProperty\",\n \"TSDeclareMethod\",\n \"TSIndexSignature\",\n \"StaticBlock\",\n ),\n ),\n ),\n },\n },\n});\n\ndefineType(\"ClassExpression\", {\n builder: [\"id\", \"superClass\", \"body\", \"decorators\"],\n visitor: [\n \"id\",\n \"body\",\n \"superClass\",\n \"mixins\",\n \"typeParameters\",\n \"superTypeParameters\",\n \"implements\",\n \"decorators\",\n ],\n aliases: [\"Scopable\", \"Class\", \"Expression\"],\n fields: {\n id: {\n validate: assertNodeType(\"Identifier\"),\n optional: true,\n },\n typeParameters: {\n validate: process.env.BABEL_8_BREAKING\n ? assertNodeType(\n \"TypeParameterDeclaration\",\n \"TSTypeParameterDeclaration\",\n )\n : assertNodeType(\n \"TypeParameterDeclaration\",\n \"TSTypeParameterDeclaration\",\n // @ts-ignore(Babel 7 vs Babel 8) Babel 7 AST\n \"Noop\",\n ),\n optional: true,\n },\n body: {\n validate: assertNodeType(\"ClassBody\"),\n },\n superClass: {\n optional: true,\n validate: assertNodeType(\"Expression\"),\n },\n superTypeParameters: {\n validate: assertNodeType(\n \"TypeParameterInstantiation\",\n \"TSTypeParameterInstantiation\",\n ),\n optional: true,\n },\n implements: {\n validate: chain(\n assertValueType(\"array\"),\n assertEach(\n assertNodeType(\"TSExpressionWithTypeArguments\", \"ClassImplements\"),\n ),\n ),\n optional: true,\n },\n decorators: {\n validate: chain(\n assertValueType(\"array\"),\n assertEach(assertNodeType(\"Decorator\")),\n ),\n optional: true,\n },\n mixins: {\n validate: assertNodeType(\"InterfaceExtends\"),\n optional: true,\n },\n },\n});\n\ndefineType(\"ClassDeclaration\", {\n inherits: \"ClassExpression\",\n aliases: [\"Scopable\", \"Class\", \"Statement\", \"Declaration\"],\n fields: {\n id: {\n validate: assertNodeType(\"Identifier\"),\n // The id may be omitted if this is the child of an\n // ExportDefaultDeclaration.\n optional: true,\n },\n typeParameters: {\n validate: process.env.BABEL_8_BREAKING\n ? assertNodeType(\n \"TypeParameterDeclaration\",\n \"TSTypeParameterDeclaration\",\n )\n : assertNodeType(\n \"TypeParameterDeclaration\",\n \"TSTypeParameterDeclaration\",\n // @ts-ignore(Babel 7 vs Babel 8) Babel 7 AST\n \"Noop\",\n ),\n optional: true,\n },\n body: {\n validate: assertNodeType(\"ClassBody\"),\n },\n superClass: {\n optional: true,\n validate: assertNodeType(\"Expression\"),\n },\n superTypeParameters: {\n validate: assertNodeType(\n \"TypeParameterInstantiation\",\n \"TSTypeParameterInstantiation\",\n ),\n optional: true,\n },\n implements: {\n validate: chain(\n assertValueType(\"array\"),\n assertEach(\n assertNodeType(\"TSExpressionWithTypeArguments\", \"ClassImplements\"),\n ),\n ),\n optional: true,\n },\n decorators: {\n validate: chain(\n assertValueType(\"array\"),\n assertEach(assertNodeType(\"Decorator\")),\n ),\n optional: true,\n },\n mixins: {\n validate: assertNodeType(\"InterfaceExtends\"),\n optional: true,\n },\n declare: {\n validate: assertValueType(\"boolean\"),\n optional: true,\n },\n abstract: {\n validate: assertValueType(\"boolean\"),\n optional: true,\n },\n },\n validate: (function () {\n const identifier = assertNodeType(\"Identifier\");\n\n return function (parent, key, node) {\n if (!process.env.BABEL_TYPES_8_BREAKING) return;\n\n if (!is(\"ExportDefaultDeclaration\", parent)) {\n identifier(node, \"id\", node.id);\n }\n };\n })(),\n});\n\ndefineType(\"ExportAllDeclaration\", {\n builder: [\"source\"],\n visitor: [\"source\", \"attributes\", \"assertions\"],\n aliases: [\n \"Statement\",\n \"Declaration\",\n \"ImportOrExportDeclaration\",\n \"ExportDeclaration\",\n ],\n fields: {\n source: {\n validate: assertNodeType(\"StringLiteral\"),\n },\n exportKind: validateOptional(assertOneOf(\"type\", \"value\")),\n attributes: {\n optional: true,\n validate: chain(\n assertValueType(\"array\"),\n assertEach(assertNodeType(\"ImportAttribute\")),\n ),\n },\n // TODO(Babel 8): Deprecated\n assertions: {\n optional: true,\n validate: chain(\n assertValueType(\"array\"),\n assertEach(assertNodeType(\"ImportAttribute\")),\n ),\n },\n },\n});\n\ndefineType(\"ExportDefaultDeclaration\", {\n visitor: [\"declaration\"],\n aliases: [\n \"Statement\",\n \"Declaration\",\n \"ImportOrExportDeclaration\",\n \"ExportDeclaration\",\n ],\n fields: {\n declaration: {\n validate: assertNodeType(\n \"TSDeclareFunction\",\n \"FunctionDeclaration\",\n \"ClassDeclaration\",\n \"Expression\",\n ),\n },\n exportKind: validateOptional(assertOneOf(\"value\")),\n },\n});\n\ndefineType(\"ExportNamedDeclaration\", {\n builder: [\"declaration\", \"specifiers\", \"source\"],\n visitor: [\"declaration\", \"specifiers\", \"source\", \"attributes\", \"assertions\"],\n aliases: [\n \"Statement\",\n \"Declaration\",\n \"ImportOrExportDeclaration\",\n \"ExportDeclaration\",\n ],\n fields: {\n declaration: {\n optional: true,\n validate: chain(\n assertNodeType(\"Declaration\"),\n Object.assign(\n function (node: t.ExportNamedDeclaration, key, val) {\n if (!process.env.BABEL_TYPES_8_BREAKING) return;\n\n // This validator isn't put at the top level because we can run it\n // even if this node doesn't have a parent.\n\n if (val && node.specifiers.length) {\n throw new TypeError(\n \"Only declaration or specifiers is allowed on ExportNamedDeclaration\",\n );\n }\n } as Validator,\n { oneOfNodeTypes: [\"Declaration\"] },\n ),\n function (node: t.ExportNamedDeclaration, key, val) {\n if (!process.env.BABEL_TYPES_8_BREAKING) return;\n\n // This validator isn't put at the top level because we can run it\n // even if this node doesn't have a parent.\n\n if (val && node.source) {\n throw new TypeError(\"Cannot export a declaration from a source\");\n }\n },\n ),\n },\n attributes: {\n optional: true,\n validate: chain(\n assertValueType(\"array\"),\n assertEach(assertNodeType(\"ImportAttribute\")),\n ),\n },\n // TODO(Babel 8): Deprecated\n assertions: {\n optional: true,\n validate: chain(\n assertValueType(\"array\"),\n assertEach(assertNodeType(\"ImportAttribute\")),\n ),\n },\n specifiers: {\n default: [],\n validate: chain(\n assertValueType(\"array\"),\n assertEach(\n (function () {\n const sourced = assertNodeType(\n \"ExportSpecifier\",\n \"ExportDefaultSpecifier\",\n \"ExportNamespaceSpecifier\",\n );\n const sourceless = assertNodeType(\"ExportSpecifier\");\n\n if (!process.env.BABEL_TYPES_8_BREAKING) return sourced;\n\n return function (node: t.ExportNamedDeclaration, key, val) {\n const validator = node.source ? sourced : sourceless;\n validator(node, key, val);\n } as Validator;\n })(),\n ),\n ),\n },\n source: {\n validate: assertNodeType(\"StringLiteral\"),\n optional: true,\n },\n exportKind: validateOptional(assertOneOf(\"type\", \"value\")),\n },\n});\n\ndefineType(\"ExportSpecifier\", {\n visitor: [\"local\", \"exported\"],\n aliases: [\"ModuleSpecifier\"],\n fields: {\n local: {\n validate: assertNodeType(\"Identifier\"),\n },\n exported: {\n validate: assertNodeType(\"Identifier\", \"StringLiteral\"),\n },\n exportKind: {\n // And TypeScript's \"export { type foo } from\"\n validate: assertOneOf(\"type\", \"value\"),\n optional: true,\n },\n },\n});\n\ndefineType(\"ForOfStatement\", {\n visitor: [\"left\", \"right\", \"body\"],\n builder: [\"left\", \"right\", \"body\", \"await\"],\n aliases: [\n \"Scopable\",\n \"Statement\",\n \"For\",\n \"BlockParent\",\n \"Loop\",\n \"ForXStatement\",\n ],\n fields: {\n left: {\n validate: (function () {\n if (!process.env.BABEL_TYPES_8_BREAKING) {\n return assertNodeType(\"VariableDeclaration\", \"LVal\");\n }\n\n const declaration = assertNodeType(\"VariableDeclaration\");\n const lval = assertNodeType(\n \"Identifier\",\n \"MemberExpression\",\n \"ArrayPattern\",\n \"ObjectPattern\",\n \"TSAsExpression\",\n \"TSSatisfiesExpression\",\n \"TSTypeAssertion\",\n \"TSNonNullExpression\",\n );\n\n return function (node, key, val) {\n if (is(\"VariableDeclaration\", val)) {\n declaration(node, key, val);\n } else {\n lval(node, key, val);\n }\n };\n })(),\n },\n right: {\n validate: assertNodeType(\"Expression\"),\n },\n body: {\n validate: assertNodeType(\"Statement\"),\n },\n await: {\n default: false,\n },\n },\n});\n\ndefineType(\"ImportDeclaration\", {\n builder: [\"specifiers\", \"source\"],\n visitor: [\"specifiers\", \"source\", \"attributes\", \"assertions\"],\n aliases: [\"Statement\", \"Declaration\", \"ImportOrExportDeclaration\"],\n fields: {\n attributes: {\n optional: true,\n validate: chain(\n assertValueType(\"array\"),\n assertEach(assertNodeType(\"ImportAttribute\")),\n ),\n },\n // TODO(Babel 8): Deprecated\n assertions: {\n optional: true,\n validate: chain(\n assertValueType(\"array\"),\n assertEach(assertNodeType(\"ImportAttribute\")),\n ),\n },\n module: {\n optional: true,\n validate: assertValueType(\"boolean\"),\n },\n phase: {\n default: null,\n validate: assertOneOf(\"source\", \"defer\"),\n },\n specifiers: {\n validate: chain(\n assertValueType(\"array\"),\n assertEach(\n assertNodeType(\n \"ImportSpecifier\",\n \"ImportDefaultSpecifier\",\n \"ImportNamespaceSpecifier\",\n ),\n ),\n ),\n },\n source: {\n validate: assertNodeType(\"StringLiteral\"),\n },\n importKind: {\n // Handle TypeScript/Flowtype's extension \"import type foo from\"\n // TypeScript doesn't support typeof\n validate: assertOneOf(\"type\", \"typeof\", \"value\"),\n optional: true,\n },\n },\n});\n\ndefineType(\"ImportDefaultSpecifier\", {\n visitor: [\"local\"],\n aliases: [\"ModuleSpecifier\"],\n fields: {\n local: {\n validate: assertNodeType(\"Identifier\"),\n },\n },\n});\n\ndefineType(\"ImportNamespaceSpecifier\", {\n visitor: [\"local\"],\n aliases: [\"ModuleSpecifier\"],\n fields: {\n local: {\n validate: assertNodeType(\"Identifier\"),\n },\n },\n});\n\ndefineType(\"ImportSpecifier\", {\n visitor: [\"local\", \"imported\"],\n aliases: [\"ModuleSpecifier\"],\n fields: {\n local: {\n validate: assertNodeType(\"Identifier\"),\n },\n imported: {\n validate: assertNodeType(\"Identifier\", \"StringLiteral\"),\n },\n importKind: {\n // Handle Flowtype's extension \"import {typeof foo} from\"\n // And TypeScript's \"import { type foo } from\"\n validate: assertOneOf(\"type\", \"typeof\", \"value\"),\n optional: true,\n },\n },\n});\n\ndefineType(\"ImportExpression\", {\n visitor: [\"source\", \"options\"],\n aliases: [\"Expression\"],\n fields: {\n phase: {\n default: null,\n validate: assertOneOf(\"source\", \"defer\"),\n },\n source: {\n validate: assertNodeType(\"Expression\"),\n },\n options: {\n validate: assertNodeType(\"Expression\"),\n optional: true,\n },\n },\n});\n\ndefineType(\"MetaProperty\", {\n visitor: [\"meta\", \"property\"],\n aliases: [\"Expression\"],\n fields: {\n meta: {\n validate: chain(\n assertNodeType(\"Identifier\"),\n Object.assign(\n function (node: t.MetaProperty, key, val) {\n if (!process.env.BABEL_TYPES_8_BREAKING) return;\n\n let property;\n switch (val.name) {\n case \"function\":\n property = \"sent\";\n break;\n case \"new\":\n property = \"target\";\n break;\n case \"import\":\n property = \"meta\";\n break;\n }\n if (!is(\"Identifier\", node.property, { name: property })) {\n throw new TypeError(\"Unrecognised MetaProperty\");\n }\n } as Validator,\n { oneOfNodeTypes: [\"Identifier\"] },\n ),\n ),\n },\n property: {\n validate: assertNodeType(\"Identifier\"),\n },\n },\n});\n\nexport const classMethodOrPropertyCommon = () => ({\n abstract: {\n validate: assertValueType(\"boolean\"),\n optional: true,\n },\n accessibility: {\n validate: assertOneOf(\"public\", \"private\", \"protected\"),\n optional: true,\n },\n static: {\n default: false,\n },\n override: {\n default: false,\n },\n computed: {\n default: false,\n },\n optional: {\n validate: assertValueType(\"boolean\"),\n optional: true,\n },\n key: {\n validate: chain(\n (function () {\n const normal = assertNodeType(\n \"Identifier\",\n \"StringLiteral\",\n \"NumericLiteral\",\n \"BigIntLiteral\",\n );\n const computed = assertNodeType(\"Expression\");\n\n return function (node: any, key: string, val: any) {\n const validator = node.computed ? computed : normal;\n validator(node, key, val);\n };\n })(),\n assertNodeType(\n \"Identifier\",\n \"StringLiteral\",\n \"NumericLiteral\",\n \"BigIntLiteral\",\n \"Expression\",\n ),\n ),\n },\n});\n\nexport const classMethodOrDeclareMethodCommon = () => ({\n ...functionCommon(),\n ...classMethodOrPropertyCommon(),\n params: {\n validate: chain(\n assertValueType(\"array\"),\n assertEach(\n assertNodeType(\n \"Identifier\",\n \"Pattern\",\n \"RestElement\",\n \"TSParameterProperty\",\n ),\n ),\n ),\n },\n kind: {\n validate: assertOneOf(\"get\", \"set\", \"method\", \"constructor\"),\n default: \"method\",\n },\n access: {\n validate: chain(\n assertValueType(\"string\"),\n assertOneOf(\"public\", \"private\", \"protected\"),\n ),\n optional: true,\n },\n decorators: {\n validate: chain(\n assertValueType(\"array\"),\n assertEach(assertNodeType(\"Decorator\")),\n ),\n optional: true,\n },\n});\n\ndefineType(\"ClassMethod\", {\n aliases: [\"Function\", \"Scopable\", \"BlockParent\", \"FunctionParent\", \"Method\"],\n builder: [\n \"kind\",\n \"key\",\n \"params\",\n \"body\",\n \"computed\",\n \"static\",\n \"generator\",\n \"async\",\n ],\n visitor: [\n \"key\",\n \"params\",\n \"body\",\n \"decorators\",\n \"returnType\",\n \"typeParameters\",\n ],\n fields: {\n ...classMethodOrDeclareMethodCommon(),\n ...functionTypeAnnotationCommon(),\n body: {\n validate: assertNodeType(\"BlockStatement\"),\n },\n },\n});\n\ndefineType(\"ObjectPattern\", {\n visitor: [\n \"properties\",\n \"typeAnnotation\",\n \"decorators\" /* for legacy param decorators */,\n ],\n builder: [\"properties\"],\n aliases: [\"Pattern\", \"PatternLike\", \"LVal\"],\n fields: {\n ...patternLikeCommon(),\n properties: {\n validate: chain(\n assertValueType(\"array\"),\n assertEach(assertNodeType(\"RestElement\", \"ObjectProperty\")),\n ),\n },\n },\n});\n\ndefineType(\"SpreadElement\", {\n visitor: [\"argument\"],\n aliases: [\"UnaryLike\"],\n deprecatedAlias: \"SpreadProperty\",\n fields: {\n argument: {\n validate: assertNodeType(\"Expression\"),\n },\n },\n});\n\ndefineType(\n \"Super\",\n process.env.BABEL_8_BREAKING\n ? undefined\n : {\n aliases: [\"Expression\"],\n },\n);\n\ndefineType(\"TaggedTemplateExpression\", {\n visitor: [\"tag\", \"quasi\", \"typeParameters\"],\n builder: [\"tag\", \"quasi\"],\n aliases: [\"Expression\"],\n fields: {\n tag: {\n validate: assertNodeType(\"Expression\"),\n },\n quasi: {\n validate: assertNodeType(\"TemplateLiteral\"),\n },\n typeParameters: {\n validate: assertNodeType(\n \"TypeParameterInstantiation\",\n \"TSTypeParameterInstantiation\",\n ),\n optional: true,\n },\n },\n});\n\ndefineType(\"TemplateElement\", {\n builder: [\"value\", \"tail\"],\n fields: {\n value: {\n validate: chain(\n assertShape({\n raw: {\n validate: assertValueType(\"string\"),\n },\n cooked: {\n validate: assertValueType(\"string\"),\n optional: true,\n },\n }),\n function templateElementCookedValidator(node: t.TemplateElement) {\n const raw = node.value.raw;\n\n let unterminatedCalled = false;\n\n const error = () => {\n // unreachable\n throw new Error(\"Internal @babel/types error.\");\n };\n const { str, firstInvalidLoc } = readStringContents(\n \"template\",\n raw,\n 0,\n 0,\n 0,\n {\n unterminated() {\n unterminatedCalled = true;\n },\n strictNumericEscape: error,\n invalidEscapeSequence: error,\n numericSeparatorInEscapeSequence: error,\n unexpectedNumericSeparator: error,\n invalidDigit: error,\n invalidCodePoint: error,\n },\n );\n if (!unterminatedCalled) throw new Error(\"Invalid raw\");\n\n node.value.cooked = firstInvalidLoc ? null : str;\n },\n ),\n },\n tail: {\n default: false,\n },\n },\n});\n\ndefineType(\"TemplateLiteral\", {\n visitor: [\"quasis\", \"expressions\"],\n aliases: [\"Expression\", \"Literal\"],\n fields: {\n quasis: {\n validate: chain(\n assertValueType(\"array\"),\n assertEach(assertNodeType(\"TemplateElement\")),\n ),\n },\n expressions: {\n validate: chain(\n assertValueType(\"array\"),\n assertEach(\n assertNodeType(\n \"Expression\",\n // For TypeScript template literal types\n \"TSType\",\n ),\n ),\n function (node: t.TemplateLiteral, key, val) {\n if (node.quasis.length !== val.length + 1) {\n throw new TypeError(\n `Number of ${\n node.type\n } quasis should be exactly one more than the number of expressions.\\nExpected ${\n val.length + 1\n } quasis but got ${node.quasis.length}`,\n );\n }\n } as Validator,\n ),\n },\n },\n});\n\ndefineType(\"YieldExpression\", {\n builder: [\"argument\", \"delegate\"],\n visitor: [\"argument\"],\n aliases: [\"Expression\", \"Terminatorless\"],\n fields: {\n delegate: {\n validate: chain(\n assertValueType(\"boolean\"),\n Object.assign(\n function (node: t.YieldExpression, key, val) {\n if (!process.env.BABEL_TYPES_8_BREAKING) return;\n\n if (val && !node.argument) {\n throw new TypeError(\n \"Property delegate of YieldExpression cannot be true if there is no argument\",\n );\n }\n } as Validator,\n { type: \"boolean\" },\n ),\n ),\n default: false,\n },\n argument: {\n optional: true,\n validate: assertNodeType(\"Expression\"),\n },\n },\n});\n\n// --- ES2017 ---\ndefineType(\"AwaitExpression\", {\n builder: [\"argument\"],\n visitor: [\"argument\"],\n aliases: [\"Expression\", \"Terminatorless\"],\n fields: {\n argument: {\n validate: assertNodeType(\"Expression\"),\n },\n },\n});\n\n// --- ES2019 ---\ndefineType(\"Import\", {\n aliases: [\"Expression\"],\n});\n\n// --- ES2020 ---\ndefineType(\"BigIntLiteral\", {\n builder: [\"value\"],\n fields: {\n value: {\n validate: assertValueType(\"string\"),\n },\n },\n aliases: [\"Expression\", \"Pureish\", \"Literal\", \"Immutable\"],\n});\n\ndefineType(\"ExportNamespaceSpecifier\", {\n visitor: [\"exported\"],\n aliases: [\"ModuleSpecifier\"],\n fields: {\n exported: {\n validate: assertNodeType(\"Identifier\"),\n },\n },\n});\n\ndefineType(\"OptionalMemberExpression\", {\n builder: [\"object\", \"property\", \"computed\", \"optional\"],\n visitor: [\"object\", \"property\"],\n aliases: [\"Expression\"],\n fields: {\n object: {\n validate: assertNodeType(\"Expression\"),\n },\n property: {\n validate: (function () {\n const normal = assertNodeType(\"Identifier\");\n const computed = assertNodeType(\"Expression\");\n\n const validator: Validator = Object.assign(\n function (node: t.OptionalMemberExpression, key, val) {\n const validator = node.computed ? computed : normal;\n validator(node, key, val);\n } as Validator,\n // todo(ts): can be discriminated union by `computed` property\n { oneOfNodeTypes: [\"Expression\", \"Identifier\"] },\n );\n return validator;\n })(),\n },\n computed: {\n default: false,\n },\n optional: {\n validate: !process.env.BABEL_TYPES_8_BREAKING\n ? assertValueType(\"boolean\")\n : chain(assertValueType(\"boolean\"), assertOptionalChainStart()),\n },\n },\n});\n\ndefineType(\"OptionalCallExpression\", {\n visitor: [\"callee\", \"arguments\", \"typeParameters\", \"typeArguments\"],\n builder: [\"callee\", \"arguments\", \"optional\"],\n aliases: [\"Expression\"],\n fields: {\n callee: {\n validate: assertNodeType(\"Expression\"),\n },\n arguments: {\n validate: chain(\n assertValueType(\"array\"),\n assertEach(\n assertNodeType(\"Expression\", \"SpreadElement\", \"ArgumentPlaceholder\"),\n ),\n ),\n },\n optional: {\n validate: !process.env.BABEL_TYPES_8_BREAKING\n ? assertValueType(\"boolean\")\n : chain(assertValueType(\"boolean\"), assertOptionalChainStart()),\n },\n typeArguments: {\n validate: assertNodeType(\"TypeParameterInstantiation\"),\n optional: true,\n },\n typeParameters: {\n validate: assertNodeType(\"TSTypeParameterInstantiation\"),\n optional: true,\n },\n },\n});\n\n// --- ES2022 ---\ndefineType(\"ClassProperty\", {\n visitor: [\"key\", \"value\", \"typeAnnotation\", \"decorators\"],\n builder: [\n \"key\",\n \"value\",\n \"typeAnnotation\",\n \"decorators\",\n \"computed\",\n \"static\",\n ],\n aliases: [\"Property\"],\n fields: {\n ...classMethodOrPropertyCommon(),\n value: {\n validate: assertNodeType(\"Expression\"),\n optional: true,\n },\n definite: {\n validate: assertValueType(\"boolean\"),\n optional: true,\n },\n typeAnnotation: {\n validate: process.env.BABEL_8_BREAKING\n ? assertNodeType(\"TypeAnnotation\", \"TSTypeAnnotation\")\n : assertNodeType(\n \"TypeAnnotation\",\n \"TSTypeAnnotation\",\n // @ts-ignore(Babel 7 vs Babel 8) Babel 7 AST\n \"Noop\",\n ),\n optional: true,\n },\n decorators: {\n validate: chain(\n assertValueType(\"array\"),\n assertEach(assertNodeType(\"Decorator\")),\n ),\n optional: true,\n },\n readonly: {\n validate: assertValueType(\"boolean\"),\n optional: true,\n },\n declare: {\n validate: assertValueType(\"boolean\"),\n optional: true,\n },\n variance: {\n validate: assertNodeType(\"Variance\"),\n optional: true,\n },\n },\n});\n\ndefineType(\"ClassAccessorProperty\", {\n visitor: [\"key\", \"value\", \"typeAnnotation\", \"decorators\"],\n builder: [\n \"key\",\n \"value\",\n \"typeAnnotation\",\n \"decorators\",\n \"computed\",\n \"static\",\n ],\n aliases: [\"Property\", \"Accessor\"],\n fields: {\n ...classMethodOrPropertyCommon(),\n key: {\n validate: chain(\n (function () {\n const normal = assertNodeType(\n \"Identifier\",\n \"StringLiteral\",\n \"NumericLiteral\",\n \"BigIntLiteral\",\n \"PrivateName\",\n );\n const computed = assertNodeType(\"Expression\");\n\n return function (node: any, key: string, val: any) {\n const validator = node.computed ? computed : normal;\n validator(node, key, val);\n };\n })(),\n assertNodeType(\n \"Identifier\",\n \"StringLiteral\",\n \"NumericLiteral\",\n \"BigIntLiteral\",\n \"Expression\",\n \"PrivateName\",\n ),\n ),\n },\n value: {\n validate: assertNodeType(\"Expression\"),\n optional: true,\n },\n definite: {\n validate: assertValueType(\"boolean\"),\n optional: true,\n },\n typeAnnotation: {\n validate: process.env.BABEL_8_BREAKING\n ? assertNodeType(\"TypeAnnotation\", \"TSTypeAnnotation\")\n : assertNodeType(\n \"TypeAnnotation\",\n \"TSTypeAnnotation\",\n // @ts-ignore(Babel 7 vs Babel 8) Babel 7 AST\n \"Noop\",\n ),\n optional: true,\n },\n decorators: {\n validate: chain(\n assertValueType(\"array\"),\n assertEach(assertNodeType(\"Decorator\")),\n ),\n optional: true,\n },\n readonly: {\n validate: assertValueType(\"boolean\"),\n optional: true,\n },\n declare: {\n validate: assertValueType(\"boolean\"),\n optional: true,\n },\n variance: {\n validate: assertNodeType(\"Variance\"),\n optional: true,\n },\n },\n});\n\ndefineType(\"ClassPrivateProperty\", {\n visitor: [\"key\", \"value\", \"decorators\", \"typeAnnotation\"],\n builder: [\"key\", \"value\", \"decorators\", \"static\"],\n aliases: [\"Property\", \"Private\"],\n fields: {\n key: {\n validate: assertNodeType(\"PrivateName\"),\n },\n value: {\n validate: assertNodeType(\"Expression\"),\n optional: true,\n },\n typeAnnotation: {\n validate: process.env.BABEL_8_BREAKING\n ? assertNodeType(\"TypeAnnotation\", \"TSTypeAnnotation\")\n : assertNodeType(\n \"TypeAnnotation\",\n \"TSTypeAnnotation\",\n // @ts-ignore(Babel 7 vs Babel 8) Babel 7 AST\n \"Noop\",\n ),\n optional: true,\n },\n decorators: {\n validate: chain(\n assertValueType(\"array\"),\n assertEach(assertNodeType(\"Decorator\")),\n ),\n optional: true,\n },\n static: {\n validate: assertValueType(\"boolean\"),\n default: false,\n },\n readonly: {\n validate: assertValueType(\"boolean\"),\n optional: true,\n },\n definite: {\n validate: assertValueType(\"boolean\"),\n optional: true,\n },\n variance: {\n validate: assertNodeType(\"Variance\"),\n optional: true,\n },\n },\n});\n\ndefineType(\"ClassPrivateMethod\", {\n builder: [\"kind\", \"key\", \"params\", \"body\", \"static\"],\n visitor: [\n \"key\",\n \"params\",\n \"body\",\n \"decorators\",\n \"returnType\",\n \"typeParameters\",\n ],\n aliases: [\n \"Function\",\n \"Scopable\",\n \"BlockParent\",\n \"FunctionParent\",\n \"Method\",\n \"Private\",\n ],\n fields: {\n ...classMethodOrDeclareMethodCommon(),\n ...functionTypeAnnotationCommon(),\n kind: {\n validate: assertOneOf(\"get\", \"set\", \"method\"),\n default: \"method\",\n },\n key: {\n validate: assertNodeType(\"PrivateName\"),\n },\n body: {\n validate: assertNodeType(\"BlockStatement\"),\n },\n },\n});\n\ndefineType(\"PrivateName\", {\n visitor: [\"id\"],\n aliases: [\"Private\"],\n fields: {\n id: {\n validate: assertNodeType(\"Identifier\"),\n },\n },\n});\n\ndefineType(\"StaticBlock\", {\n visitor: [\"body\"],\n fields: {\n body: {\n validate: chain(\n assertValueType(\"array\"),\n assertEach(assertNodeType(\"Statement\")),\n ),\n },\n },\n aliases: [\"Scopable\", \"BlockParent\", \"FunctionParent\"],\n});\n","import {\n defineAliasedType,\n arrayOfType,\n assertOneOf,\n assertValueType,\n validate,\n validateArrayOfType,\n validateOptional,\n validateOptionalType,\n validateType,\n} from \"./utils.ts\";\n\nconst defineType = defineAliasedType(\"Flow\");\n\nconst defineInterfaceishType = (\n name: \"DeclareClass\" | \"DeclareInterface\" | \"InterfaceDeclaration\",\n) => {\n const isDeclareClass = name === \"DeclareClass\";\n\n defineType(name, {\n builder: [\"id\", \"typeParameters\", \"extends\", \"body\"],\n visitor: [\n \"id\",\n \"typeParameters\",\n \"extends\",\n ...(isDeclareClass ? [\"mixins\", \"implements\"] : []),\n \"body\",\n ],\n aliases: [\"FlowDeclaration\", \"Statement\", \"Declaration\"],\n fields: {\n id: validateType(\"Identifier\"),\n typeParameters: validateOptionalType(\"TypeParameterDeclaration\"),\n extends: validateOptional(arrayOfType(\"InterfaceExtends\")),\n ...(isDeclareClass\n ? {\n mixins: validateOptional(arrayOfType(\"InterfaceExtends\")),\n implements: validateOptional(arrayOfType(\"ClassImplements\")),\n }\n : {}),\n body: validateType(\"ObjectTypeAnnotation\"),\n },\n });\n};\n\ndefineType(\"AnyTypeAnnotation\", {\n aliases: [\"FlowType\", \"FlowBaseAnnotation\"],\n});\n\ndefineType(\"ArrayTypeAnnotation\", {\n visitor: [\"elementType\"],\n aliases: [\"FlowType\"],\n fields: {\n elementType: validateType(\"FlowType\"),\n },\n});\n\ndefineType(\"BooleanTypeAnnotation\", {\n aliases: [\"FlowType\", \"FlowBaseAnnotation\"],\n});\n\ndefineType(\"BooleanLiteralTypeAnnotation\", {\n builder: [\"value\"],\n aliases: [\"FlowType\"],\n fields: {\n value: validate(assertValueType(\"boolean\")),\n },\n});\n\ndefineType(\"NullLiteralTypeAnnotation\", {\n aliases: [\"FlowType\", \"FlowBaseAnnotation\"],\n});\n\ndefineType(\"ClassImplements\", {\n visitor: [\"id\", \"typeParameters\"],\n fields: {\n id: validateType(\"Identifier\"),\n typeParameters: validateOptionalType(\"TypeParameterInstantiation\"),\n },\n});\n\ndefineInterfaceishType(\"DeclareClass\");\n\ndefineType(\"DeclareFunction\", {\n visitor: [\"id\"],\n aliases: [\"FlowDeclaration\", \"Statement\", \"Declaration\"],\n fields: {\n id: validateType(\"Identifier\"),\n predicate: validateOptionalType(\"DeclaredPredicate\"),\n },\n});\n\ndefineInterfaceishType(\"DeclareInterface\");\n\ndefineType(\"DeclareModule\", {\n builder: [\"id\", \"body\", \"kind\"],\n visitor: [\"id\", \"body\"],\n aliases: [\"FlowDeclaration\", \"Statement\", \"Declaration\"],\n fields: {\n id: validateType([\"Identifier\", \"StringLiteral\"]),\n body: validateType(\"BlockStatement\"),\n kind: validateOptional(assertOneOf(\"CommonJS\", \"ES\")),\n },\n});\n\ndefineType(\"DeclareModuleExports\", {\n visitor: [\"typeAnnotation\"],\n aliases: [\"FlowDeclaration\", \"Statement\", \"Declaration\"],\n fields: {\n typeAnnotation: validateType(\"TypeAnnotation\"),\n },\n});\n\ndefineType(\"DeclareTypeAlias\", {\n visitor: [\"id\", \"typeParameters\", \"right\"],\n aliases: [\"FlowDeclaration\", \"Statement\", \"Declaration\"],\n fields: {\n id: validateType(\"Identifier\"),\n typeParameters: validateOptionalType(\"TypeParameterDeclaration\"),\n right: validateType(\"FlowType\"),\n },\n});\n\ndefineType(\"DeclareOpaqueType\", {\n visitor: [\"id\", \"typeParameters\", \"supertype\"],\n aliases: [\"FlowDeclaration\", \"Statement\", \"Declaration\"],\n fields: {\n id: validateType(\"Identifier\"),\n typeParameters: validateOptionalType(\"TypeParameterDeclaration\"),\n supertype: validateOptionalType(\"FlowType\"),\n impltype: validateOptionalType(\"FlowType\"),\n },\n});\n\ndefineType(\"DeclareVariable\", {\n visitor: [\"id\"],\n aliases: [\"FlowDeclaration\", \"Statement\", \"Declaration\"],\n fields: {\n id: validateType(\"Identifier\"),\n },\n});\n\ndefineType(\"DeclareExportDeclaration\", {\n visitor: [\"declaration\", \"specifiers\", \"source\"],\n aliases: [\"FlowDeclaration\", \"Statement\", \"Declaration\"],\n fields: {\n declaration: validateOptionalType(\"Flow\"),\n specifiers: validateOptional(\n arrayOfType([\"ExportSpecifier\", \"ExportNamespaceSpecifier\"]),\n ),\n source: validateOptionalType(\"StringLiteral\"),\n default: validateOptional(assertValueType(\"boolean\")),\n },\n});\n\ndefineType(\"DeclareExportAllDeclaration\", {\n visitor: [\"source\"],\n aliases: [\"FlowDeclaration\", \"Statement\", \"Declaration\"],\n fields: {\n source: validateType(\"StringLiteral\"),\n exportKind: validateOptional(assertOneOf(\"type\", \"value\")),\n },\n});\n\ndefineType(\"DeclaredPredicate\", {\n visitor: [\"value\"],\n aliases: [\"FlowPredicate\"],\n fields: {\n value: validateType(\"Flow\"),\n },\n});\n\ndefineType(\"ExistsTypeAnnotation\", {\n aliases: [\"FlowType\"],\n});\n\ndefineType(\"FunctionTypeAnnotation\", {\n visitor: [\"typeParameters\", \"params\", \"rest\", \"returnType\"],\n aliases: [\"FlowType\"],\n fields: {\n typeParameters: validateOptionalType(\"TypeParameterDeclaration\"),\n params: validate(arrayOfType(\"FunctionTypeParam\")),\n rest: validateOptionalType(\"FunctionTypeParam\"),\n this: validateOptionalType(\"FunctionTypeParam\"),\n returnType: validateType(\"FlowType\"),\n },\n});\n\ndefineType(\"FunctionTypeParam\", {\n visitor: [\"name\", \"typeAnnotation\"],\n fields: {\n name: validateOptionalType(\"Identifier\"),\n typeAnnotation: validateType(\"FlowType\"),\n optional: validateOptional(assertValueType(\"boolean\")),\n },\n});\n\ndefineType(\"GenericTypeAnnotation\", {\n visitor: [\"id\", \"typeParameters\"],\n aliases: [\"FlowType\"],\n fields: {\n id: validateType([\"Identifier\", \"QualifiedTypeIdentifier\"]),\n typeParameters: validateOptionalType(\"TypeParameterInstantiation\"),\n },\n});\n\ndefineType(\"InferredPredicate\", {\n aliases: [\"FlowPredicate\"],\n});\n\ndefineType(\"InterfaceExtends\", {\n visitor: [\"id\", \"typeParameters\"],\n fields: {\n id: validateType([\"Identifier\", \"QualifiedTypeIdentifier\"]),\n typeParameters: validateOptionalType(\"TypeParameterInstantiation\"),\n },\n});\n\ndefineInterfaceishType(\"InterfaceDeclaration\");\n\ndefineType(\"InterfaceTypeAnnotation\", {\n visitor: [\"extends\", \"body\"],\n aliases: [\"FlowType\"],\n fields: {\n extends: validateOptional(arrayOfType(\"InterfaceExtends\")),\n body: validateType(\"ObjectTypeAnnotation\"),\n },\n});\n\ndefineType(\"IntersectionTypeAnnotation\", {\n visitor: [\"types\"],\n aliases: [\"FlowType\"],\n fields: {\n types: validate(arrayOfType(\"FlowType\")),\n },\n});\n\ndefineType(\"MixedTypeAnnotation\", {\n aliases: [\"FlowType\", \"FlowBaseAnnotation\"],\n});\n\ndefineType(\"EmptyTypeAnnotation\", {\n aliases: [\"FlowType\", \"FlowBaseAnnotation\"],\n});\n\ndefineType(\"NullableTypeAnnotation\", {\n visitor: [\"typeAnnotation\"],\n aliases: [\"FlowType\"],\n fields: {\n typeAnnotation: validateType(\"FlowType\"),\n },\n});\n\ndefineType(\"NumberLiteralTypeAnnotation\", {\n builder: [\"value\"],\n aliases: [\"FlowType\"],\n fields: {\n value: validate(assertValueType(\"number\")),\n },\n});\n\ndefineType(\"NumberTypeAnnotation\", {\n aliases: [\"FlowType\", \"FlowBaseAnnotation\"],\n});\n\ndefineType(\"ObjectTypeAnnotation\", {\n visitor: [\"properties\", \"indexers\", \"callProperties\", \"internalSlots\"],\n aliases: [\"FlowType\"],\n builder: [\n \"properties\",\n \"indexers\",\n \"callProperties\",\n \"internalSlots\",\n \"exact\",\n ],\n fields: {\n properties: validate(\n arrayOfType([\"ObjectTypeProperty\", \"ObjectTypeSpreadProperty\"]),\n ),\n indexers: {\n validate: arrayOfType(\"ObjectTypeIndexer\"),\n optional: process.env.BABEL_8_BREAKING ? false : true,\n default: [],\n },\n callProperties: {\n validate: arrayOfType(\"ObjectTypeCallProperty\"),\n optional: process.env.BABEL_8_BREAKING ? false : true,\n default: [],\n },\n internalSlots: {\n validate: arrayOfType(\"ObjectTypeInternalSlot\"),\n optional: process.env.BABEL_8_BREAKING ? false : true,\n default: [],\n },\n exact: {\n validate: assertValueType(\"boolean\"),\n default: false,\n },\n // If the inexact flag is present then this is an object type, and not a\n // declare class, declare interface, or interface. If it is true, the\n // object uses ... to express that it is inexact.\n inexact: validateOptional(assertValueType(\"boolean\")),\n },\n});\n\ndefineType(\"ObjectTypeInternalSlot\", {\n visitor: [\"id\", \"value\"],\n builder: [\"id\", \"value\", \"optional\", \"static\", \"method\"],\n aliases: [\"UserWhitespacable\"],\n fields: {\n id: validateType(\"Identifier\"),\n value: validateType(\"FlowType\"),\n optional: validate(assertValueType(\"boolean\")),\n static: validate(assertValueType(\"boolean\")),\n method: validate(assertValueType(\"boolean\")),\n },\n});\n\ndefineType(\"ObjectTypeCallProperty\", {\n visitor: [\"value\"],\n aliases: [\"UserWhitespacable\"],\n fields: {\n value: validateType(\"FlowType\"),\n static: validate(assertValueType(\"boolean\")),\n },\n});\n\ndefineType(\"ObjectTypeIndexer\", {\n visitor: [\"id\", \"key\", \"value\", \"variance\"],\n aliases: [\"UserWhitespacable\"],\n fields: {\n id: validateOptionalType(\"Identifier\"),\n key: validateType(\"FlowType\"),\n value: validateType(\"FlowType\"),\n static: validate(assertValueType(\"boolean\")),\n variance: validateOptionalType(\"Variance\"),\n },\n});\n\ndefineType(\"ObjectTypeProperty\", {\n visitor: [\"key\", \"value\", \"variance\"],\n aliases: [\"UserWhitespacable\"],\n fields: {\n key: validateType([\"Identifier\", \"StringLiteral\"]),\n value: validateType(\"FlowType\"),\n kind: validate(assertOneOf(\"init\", \"get\", \"set\")),\n static: validate(assertValueType(\"boolean\")),\n proto: validate(assertValueType(\"boolean\")),\n optional: validate(assertValueType(\"boolean\")),\n variance: validateOptionalType(\"Variance\"),\n method: validate(assertValueType(\"boolean\")),\n },\n});\n\ndefineType(\"ObjectTypeSpreadProperty\", {\n visitor: [\"argument\"],\n aliases: [\"UserWhitespacable\"],\n fields: {\n argument: validateType(\"FlowType\"),\n },\n});\n\ndefineType(\"OpaqueType\", {\n visitor: [\"id\", \"typeParameters\", \"supertype\", \"impltype\"],\n aliases: [\"FlowDeclaration\", \"Statement\", \"Declaration\"],\n fields: {\n id: validateType(\"Identifier\"),\n typeParameters: validateOptionalType(\"TypeParameterDeclaration\"),\n supertype: validateOptionalType(\"FlowType\"),\n impltype: validateType(\"FlowType\"),\n },\n});\n\ndefineType(\"QualifiedTypeIdentifier\", {\n visitor: [\"id\", \"qualification\"],\n fields: {\n id: validateType(\"Identifier\"),\n qualification: validateType([\"Identifier\", \"QualifiedTypeIdentifier\"]),\n },\n});\n\ndefineType(\"StringLiteralTypeAnnotation\", {\n builder: [\"value\"],\n aliases: [\"FlowType\"],\n fields: {\n value: validate(assertValueType(\"string\")),\n },\n});\n\ndefineType(\"StringTypeAnnotation\", {\n aliases: [\"FlowType\", \"FlowBaseAnnotation\"],\n});\n\ndefineType(\"SymbolTypeAnnotation\", {\n aliases: [\"FlowType\", \"FlowBaseAnnotation\"],\n});\n\ndefineType(\"ThisTypeAnnotation\", {\n aliases: [\"FlowType\", \"FlowBaseAnnotation\"],\n});\n\ndefineType(\"TupleTypeAnnotation\", {\n visitor: [\"types\"],\n aliases: [\"FlowType\"],\n fields: {\n types: validate(arrayOfType(\"FlowType\")),\n },\n});\n\ndefineType(\"TypeofTypeAnnotation\", {\n visitor: [\"argument\"],\n aliases: [\"FlowType\"],\n fields: {\n argument: validateType(\"FlowType\"),\n },\n});\n\ndefineType(\"TypeAlias\", {\n visitor: [\"id\", \"typeParameters\", \"right\"],\n aliases: [\"FlowDeclaration\", \"Statement\", \"Declaration\"],\n fields: {\n id: validateType(\"Identifier\"),\n typeParameters: validateOptionalType(\"TypeParameterDeclaration\"),\n right: validateType(\"FlowType\"),\n },\n});\n\ndefineType(\"TypeAnnotation\", {\n visitor: [\"typeAnnotation\"],\n fields: {\n typeAnnotation: validateType(\"FlowType\"),\n },\n});\n\ndefineType(\"TypeCastExpression\", {\n visitor: [\"expression\", \"typeAnnotation\"],\n aliases: [\"ExpressionWrapper\", \"Expression\"],\n fields: {\n expression: validateType(\"Expression\"),\n typeAnnotation: validateType(\"TypeAnnotation\"),\n },\n});\n\ndefineType(\"TypeParameter\", {\n visitor: [\"bound\", \"default\", \"variance\"],\n fields: {\n name: validate(assertValueType(\"string\")),\n bound: validateOptionalType(\"TypeAnnotation\"),\n default: validateOptionalType(\"FlowType\"),\n variance: validateOptionalType(\"Variance\"),\n },\n});\n\ndefineType(\"TypeParameterDeclaration\", {\n visitor: [\"params\"],\n fields: {\n params: validate(arrayOfType(\"TypeParameter\")),\n },\n});\n\ndefineType(\"TypeParameterInstantiation\", {\n visitor: [\"params\"],\n fields: {\n params: validate(arrayOfType(\"FlowType\")),\n },\n});\n\ndefineType(\"UnionTypeAnnotation\", {\n visitor: [\"types\"],\n aliases: [\"FlowType\"],\n fields: {\n types: validate(arrayOfType(\"FlowType\")),\n },\n});\n\ndefineType(\"Variance\", {\n builder: [\"kind\"],\n fields: {\n kind: validate(assertOneOf(\"minus\", \"plus\")),\n },\n});\n\ndefineType(\"VoidTypeAnnotation\", {\n aliases: [\"FlowType\", \"FlowBaseAnnotation\"],\n});\n\n// Enums\ndefineType(\"EnumDeclaration\", {\n aliases: [\"Statement\", \"Declaration\"],\n visitor: [\"id\", \"body\"],\n fields: {\n id: validateType(\"Identifier\"),\n body: validateType([\n \"EnumBooleanBody\",\n \"EnumNumberBody\",\n \"EnumStringBody\",\n \"EnumSymbolBody\",\n ]),\n },\n});\n\ndefineType(\"EnumBooleanBody\", {\n aliases: [\"EnumBody\"],\n visitor: [\"members\"],\n fields: {\n explicitType: validate(assertValueType(\"boolean\")),\n members: validateArrayOfType(\"EnumBooleanMember\"),\n hasUnknownMembers: validate(assertValueType(\"boolean\")),\n },\n});\n\ndefineType(\"EnumNumberBody\", {\n aliases: [\"EnumBody\"],\n visitor: [\"members\"],\n fields: {\n explicitType: validate(assertValueType(\"boolean\")),\n members: validateArrayOfType(\"EnumNumberMember\"),\n hasUnknownMembers: validate(assertValueType(\"boolean\")),\n },\n});\n\ndefineType(\"EnumStringBody\", {\n aliases: [\"EnumBody\"],\n visitor: [\"members\"],\n fields: {\n explicitType: validate(assertValueType(\"boolean\")),\n members: validateArrayOfType([\"EnumStringMember\", \"EnumDefaultedMember\"]),\n hasUnknownMembers: validate(assertValueType(\"boolean\")),\n },\n});\n\ndefineType(\"EnumSymbolBody\", {\n aliases: [\"EnumBody\"],\n visitor: [\"members\"],\n fields: {\n members: validateArrayOfType(\"EnumDefaultedMember\"),\n hasUnknownMembers: validate(assertValueType(\"boolean\")),\n },\n});\n\ndefineType(\"EnumBooleanMember\", {\n aliases: [\"EnumMember\"],\n visitor: [\"id\"],\n fields: {\n id: validateType(\"Identifier\"),\n init: validateType(\"BooleanLiteral\"),\n },\n});\n\ndefineType(\"EnumNumberMember\", {\n aliases: [\"EnumMember\"],\n visitor: [\"id\", \"init\"],\n fields: {\n id: validateType(\"Identifier\"),\n init: validateType(\"NumericLiteral\"),\n },\n});\n\ndefineType(\"EnumStringMember\", {\n aliases: [\"EnumMember\"],\n visitor: [\"id\", \"init\"],\n fields: {\n id: validateType(\"Identifier\"),\n init: validateType(\"StringLiteral\"),\n },\n});\n\ndefineType(\"EnumDefaultedMember\", {\n aliases: [\"EnumMember\"],\n visitor: [\"id\"],\n fields: {\n id: validateType(\"Identifier\"),\n },\n});\n\ndefineType(\"IndexedAccessType\", {\n visitor: [\"objectType\", \"indexType\"],\n aliases: [\"FlowType\"],\n fields: {\n objectType: validateType(\"FlowType\"),\n indexType: validateType(\"FlowType\"),\n },\n});\n\ndefineType(\"OptionalIndexedAccessType\", {\n visitor: [\"objectType\", \"indexType\"],\n aliases: [\"FlowType\"],\n fields: {\n objectType: validateType(\"FlowType\"),\n indexType: validateType(\"FlowType\"),\n optional: validate(assertValueType(\"boolean\")),\n },\n});\n","import {\n defineAliasedType,\n assertNodeType,\n assertValueType,\n chain,\n assertEach,\n} from \"./utils.ts\";\n\nconst defineType = defineAliasedType(\"JSX\");\n\ndefineType(\"JSXAttribute\", {\n visitor: [\"name\", \"value\"],\n aliases: [\"Immutable\"],\n fields: {\n name: {\n validate: assertNodeType(\"JSXIdentifier\", \"JSXNamespacedName\"),\n },\n value: {\n optional: true,\n validate: assertNodeType(\n \"JSXElement\",\n \"JSXFragment\",\n \"StringLiteral\",\n \"JSXExpressionContainer\",\n ),\n },\n },\n});\n\ndefineType(\"JSXClosingElement\", {\n visitor: [\"name\"],\n aliases: [\"Immutable\"],\n fields: {\n name: {\n validate: assertNodeType(\n \"JSXIdentifier\",\n \"JSXMemberExpression\",\n \"JSXNamespacedName\",\n ),\n },\n },\n});\n\ndefineType(\"JSXElement\", {\n builder: process.env.BABEL_8_BREAKING\n ? [\"openingElement\", \"closingElement\", \"children\"]\n : [\"openingElement\", \"closingElement\", \"children\", \"selfClosing\"],\n visitor: [\"openingElement\", \"children\", \"closingElement\"],\n aliases: [\"Immutable\", \"Expression\"],\n fields: {\n openingElement: {\n validate: assertNodeType(\"JSXOpeningElement\"),\n },\n closingElement: {\n optional: true,\n validate: assertNodeType(\"JSXClosingElement\"),\n },\n children: {\n validate: chain(\n assertValueType(\"array\"),\n assertEach(\n assertNodeType(\n \"JSXText\",\n \"JSXExpressionContainer\",\n \"JSXSpreadChild\",\n \"JSXElement\",\n \"JSXFragment\",\n ),\n ),\n ),\n },\n ...(process.env.BABEL_8_BREAKING\n ? {}\n : {\n selfClosing: {\n validate: assertValueType(\"boolean\"),\n optional: true,\n },\n }),\n },\n});\n\ndefineType(\"JSXEmptyExpression\", {});\n\ndefineType(\"JSXExpressionContainer\", {\n visitor: [\"expression\"],\n aliases: [\"Immutable\"],\n fields: {\n expression: {\n validate: assertNodeType(\"Expression\", \"JSXEmptyExpression\"),\n },\n },\n});\n\ndefineType(\"JSXSpreadChild\", {\n visitor: [\"expression\"],\n aliases: [\"Immutable\"],\n fields: {\n expression: {\n validate: assertNodeType(\"Expression\"),\n },\n },\n});\n\ndefineType(\"JSXIdentifier\", {\n builder: [\"name\"],\n fields: {\n name: {\n validate: assertValueType(\"string\"),\n },\n },\n});\n\ndefineType(\"JSXMemberExpression\", {\n visitor: [\"object\", \"property\"],\n fields: {\n object: {\n validate: assertNodeType(\"JSXMemberExpression\", \"JSXIdentifier\"),\n },\n property: {\n validate: assertNodeType(\"JSXIdentifier\"),\n },\n },\n});\n\ndefineType(\"JSXNamespacedName\", {\n visitor: [\"namespace\", \"name\"],\n fields: {\n namespace: {\n validate: assertNodeType(\"JSXIdentifier\"),\n },\n name: {\n validate: assertNodeType(\"JSXIdentifier\"),\n },\n },\n});\n\ndefineType(\"JSXOpeningElement\", {\n builder: [\"name\", \"attributes\", \"selfClosing\"],\n visitor: [\"name\", \"attributes\"],\n aliases: [\"Immutable\"],\n fields: {\n name: {\n validate: assertNodeType(\n \"JSXIdentifier\",\n \"JSXMemberExpression\",\n \"JSXNamespacedName\",\n ),\n },\n selfClosing: {\n default: false,\n },\n attributes: {\n validate: chain(\n assertValueType(\"array\"),\n assertEach(assertNodeType(\"JSXAttribute\", \"JSXSpreadAttribute\")),\n ),\n },\n typeParameters: {\n validate: assertNodeType(\n \"TypeParameterInstantiation\",\n \"TSTypeParameterInstantiation\",\n ),\n optional: true,\n },\n },\n});\n\ndefineType(\"JSXSpreadAttribute\", {\n visitor: [\"argument\"],\n fields: {\n argument: {\n validate: assertNodeType(\"Expression\"),\n },\n },\n});\n\ndefineType(\"JSXText\", {\n aliases: [\"Immutable\"],\n builder: [\"value\"],\n fields: {\n value: {\n validate: assertValueType(\"string\"),\n },\n },\n});\n\ndefineType(\"JSXFragment\", {\n builder: [\"openingFragment\", \"closingFragment\", \"children\"],\n visitor: [\"openingFragment\", \"children\", \"closingFragment\"],\n aliases: [\"Immutable\", \"Expression\"],\n fields: {\n openingFragment: {\n validate: assertNodeType(\"JSXOpeningFragment\"),\n },\n closingFragment: {\n validate: assertNodeType(\"JSXClosingFragment\"),\n },\n children: {\n validate: chain(\n assertValueType(\"array\"),\n assertEach(\n assertNodeType(\n \"JSXText\",\n \"JSXExpressionContainer\",\n \"JSXSpreadChild\",\n \"JSXElement\",\n \"JSXFragment\",\n ),\n ),\n ),\n },\n },\n});\n\ndefineType(\"JSXOpeningFragment\", {\n aliases: [\"Immutable\"],\n});\n\ndefineType(\"JSXClosingFragment\", {\n aliases: [\"Immutable\"],\n});\n","import { ALIAS_KEYS } from \"./utils.ts\";\n\nexport const PLACEHOLDERS = [\n \"Identifier\",\n \"StringLiteral\",\n \"Expression\",\n \"Statement\",\n \"Declaration\",\n \"BlockStatement\",\n \"ClassBody\",\n \"Pattern\",\n] as const;\n\nexport const PLACEHOLDERS_ALIAS: Record = {\n Declaration: [\"Statement\"],\n Pattern: [\"PatternLike\", \"LVal\"],\n};\n\nfor (const type of PLACEHOLDERS) {\n const alias = ALIAS_KEYS[type];\n if (alias?.length) PLACEHOLDERS_ALIAS[type] = alias;\n}\n\nexport const PLACEHOLDERS_FLIPPED_ALIAS: Record = {};\n\nObject.keys(PLACEHOLDERS_ALIAS).forEach(type => {\n PLACEHOLDERS_ALIAS[type].forEach(alias => {\n if (!Object.hasOwn(PLACEHOLDERS_FLIPPED_ALIAS, alias)) {\n PLACEHOLDERS_FLIPPED_ALIAS[alias] = [];\n }\n PLACEHOLDERS_FLIPPED_ALIAS[alias].push(type);\n });\n});\n","import {\n defineAliasedType,\n assertNodeType,\n assertOneOf,\n assertValueType,\n} from \"./utils.ts\";\nimport { PLACEHOLDERS } from \"./placeholders.ts\";\n\nconst defineType = defineAliasedType(\"Miscellaneous\");\n\nif (!process.env.BABEL_8_BREAKING) {\n defineType(\"Noop\", {\n visitor: [],\n });\n}\n\ndefineType(\"Placeholder\", {\n visitor: [],\n builder: [\"expectedNode\", \"name\"],\n // aliases: [], defined in placeholders.js\n fields: {\n name: {\n validate: assertNodeType(\"Identifier\"),\n },\n expectedNode: {\n validate: assertOneOf(...PLACEHOLDERS),\n },\n },\n});\n\ndefineType(\"V8IntrinsicIdentifier\", {\n builder: [\"name\"],\n fields: {\n name: {\n validate: assertValueType(\"string\"),\n },\n },\n});\n","import defineType, {\n assertEach,\n assertNodeType,\n assertValueType,\n chain,\n} from \"./utils.ts\";\n\ndefineType(\"ArgumentPlaceholder\", {});\n\ndefineType(\"BindExpression\", {\n visitor: [\"object\", \"callee\"],\n aliases: [\"Expression\"],\n fields: !process.env.BABEL_TYPES_8_BREAKING\n ? {\n object: {\n validate: Object.assign(() => {}, {\n oneOfNodeTypes: [\"Expression\"],\n }),\n },\n callee: {\n validate: Object.assign(() => {}, {\n oneOfNodeTypes: [\"Expression\"],\n }),\n },\n }\n : {\n object: {\n validate: assertNodeType(\"Expression\"),\n },\n callee: {\n validate: assertNodeType(\"Expression\"),\n },\n },\n});\n\ndefineType(\"ImportAttribute\", {\n visitor: [\"key\", \"value\"],\n fields: {\n key: {\n validate: assertNodeType(\"Identifier\", \"StringLiteral\"),\n },\n value: {\n validate: assertNodeType(\"StringLiteral\"),\n },\n },\n});\n\ndefineType(\"Decorator\", {\n visitor: [\"expression\"],\n fields: {\n expression: {\n validate: assertNodeType(\"Expression\"),\n },\n },\n});\n\ndefineType(\"DoExpression\", {\n visitor: [\"body\"],\n builder: [\"body\", \"async\"],\n aliases: [\"Expression\"],\n fields: {\n body: {\n validate: assertNodeType(\"BlockStatement\"),\n },\n async: {\n validate: assertValueType(\"boolean\"),\n default: false,\n },\n },\n});\n\ndefineType(\"ExportDefaultSpecifier\", {\n visitor: [\"exported\"],\n aliases: [\"ModuleSpecifier\"],\n fields: {\n exported: {\n validate: assertNodeType(\"Identifier\"),\n },\n },\n});\n\ndefineType(\"RecordExpression\", {\n visitor: [\"properties\"],\n aliases: [\"Expression\"],\n fields: {\n properties: {\n validate: chain(\n assertValueType(\"array\"),\n assertEach(assertNodeType(\"ObjectProperty\", \"SpreadElement\")),\n ),\n },\n },\n});\n\ndefineType(\"TupleExpression\", {\n fields: {\n elements: {\n validate: chain(\n assertValueType(\"array\"),\n assertEach(assertNodeType(\"Expression\", \"SpreadElement\")),\n ),\n default: [],\n },\n },\n visitor: [\"elements\"],\n aliases: [\"Expression\"],\n});\n\ndefineType(\"DecimalLiteral\", {\n builder: [\"value\"],\n fields: {\n value: {\n validate: assertValueType(\"string\"),\n },\n },\n aliases: [\"Expression\", \"Pureish\", \"Literal\", \"Immutable\"],\n});\n\n// https://github.com/tc39/proposal-js-module-blocks\ndefineType(\"ModuleExpression\", {\n visitor: [\"body\"],\n fields: {\n body: {\n validate: assertNodeType(\"Program\"),\n },\n },\n aliases: [\"Expression\"],\n});\n\n// https://github.com/tc39/proposal-pipeline-operator\n// https://github.com/js-choi/proposal-hack-pipes\ndefineType(\"TopicReference\", {\n aliases: [\"Expression\"],\n});\n\n// https://github.com/tc39/proposal-pipeline-operator\n// https://github.com/js-choi/proposal-smart-pipes\ndefineType(\"PipelineTopicExpression\", {\n builder: [\"expression\"],\n visitor: [\"expression\"],\n fields: {\n expression: {\n validate: assertNodeType(\"Expression\"),\n },\n },\n aliases: [\"Expression\"],\n});\n\ndefineType(\"PipelineBareFunction\", {\n builder: [\"callee\"],\n visitor: [\"callee\"],\n fields: {\n callee: {\n validate: assertNodeType(\"Expression\"),\n },\n },\n aliases: [\"Expression\"],\n});\n\ndefineType(\"PipelinePrimaryTopicReference\", {\n aliases: [\"Expression\"],\n});\n","import {\n defineAliasedType,\n arrayOfType,\n assertEach,\n assertNodeType,\n assertOneOf,\n assertValueType,\n chain,\n validate,\n validateArrayOfType,\n validateOptional,\n validateOptionalType,\n validateType,\n} from \"./utils.ts\";\nimport {\n functionDeclarationCommon,\n classMethodOrDeclareMethodCommon,\n} from \"./core.ts\";\nimport is from \"../validators/is.ts\";\n\nconst defineType = defineAliasedType(\"TypeScript\");\n\nconst bool = assertValueType(\"boolean\");\n\nconst tSFunctionTypeAnnotationCommon = () => ({\n returnType: {\n validate: process.env.BABEL_8_BREAKING\n ? assertNodeType(\"TSTypeAnnotation\")\n : // @ts-ignore(Babel 7 vs Babel 8) Babel 7 AST\n assertNodeType(\"TSTypeAnnotation\", \"Noop\"),\n optional: true,\n },\n typeParameters: {\n validate: process.env.BABEL_8_BREAKING\n ? assertNodeType(\"TSTypeParameterDeclaration\")\n : // @ts-ignore(Babel 7 vs Babel 8) Babel 7 AST\n assertNodeType(\"TSTypeParameterDeclaration\", \"Noop\"),\n optional: true,\n },\n});\n\ndefineType(\"TSParameterProperty\", {\n aliases: [\"LVal\"], // TODO: This isn't usable in general as an LVal. Should have a \"Parameter\" alias.\n visitor: [\"parameter\"],\n fields: {\n accessibility: {\n validate: assertOneOf(\"public\", \"private\", \"protected\"),\n optional: true,\n },\n readonly: {\n validate: assertValueType(\"boolean\"),\n optional: true,\n },\n parameter: {\n validate: assertNodeType(\"Identifier\", \"AssignmentPattern\"),\n },\n override: {\n validate: assertValueType(\"boolean\"),\n optional: true,\n },\n decorators: {\n validate: chain(\n assertValueType(\"array\"),\n assertEach(assertNodeType(\"Decorator\")),\n ),\n optional: true,\n },\n },\n});\n\ndefineType(\"TSDeclareFunction\", {\n aliases: [\"Statement\", \"Declaration\"],\n visitor: [\"id\", \"typeParameters\", \"params\", \"returnType\"],\n fields: {\n ...functionDeclarationCommon(),\n ...tSFunctionTypeAnnotationCommon(),\n },\n});\n\ndefineType(\"TSDeclareMethod\", {\n visitor: [\"decorators\", \"key\", \"typeParameters\", \"params\", \"returnType\"],\n fields: {\n ...classMethodOrDeclareMethodCommon(),\n ...tSFunctionTypeAnnotationCommon(),\n },\n});\n\ndefineType(\"TSQualifiedName\", {\n aliases: [\"TSEntityName\"],\n visitor: [\"left\", \"right\"],\n fields: {\n left: validateType(\"TSEntityName\"),\n right: validateType(\"Identifier\"),\n },\n});\n\nconst signatureDeclarationCommon = () => ({\n typeParameters: validateOptionalType(\"TSTypeParameterDeclaration\"),\n [process.env.BABEL_8_BREAKING ? \"params\" : \"parameters\"]: validateArrayOfType(\n [\"ArrayPattern\", \"Identifier\", \"ObjectPattern\", \"RestElement\"],\n ),\n [process.env.BABEL_8_BREAKING ? \"returnType\" : \"typeAnnotation\"]:\n validateOptionalType(\"TSTypeAnnotation\"),\n});\n\nconst callConstructSignatureDeclaration = {\n aliases: [\"TSTypeElement\"],\n visitor: [\n \"typeParameters\",\n process.env.BABEL_8_BREAKING ? \"params\" : \"parameters\",\n process.env.BABEL_8_BREAKING ? \"returnType\" : \"typeAnnotation\",\n ],\n fields: signatureDeclarationCommon(),\n};\n\ndefineType(\"TSCallSignatureDeclaration\", callConstructSignatureDeclaration);\ndefineType(\n \"TSConstructSignatureDeclaration\",\n callConstructSignatureDeclaration,\n);\n\nconst namedTypeElementCommon = () => ({\n key: validateType(\"Expression\"),\n computed: { default: false },\n optional: validateOptional(bool),\n});\n\ndefineType(\"TSPropertySignature\", {\n aliases: [\"TSTypeElement\"],\n visitor: [\"key\", \"typeAnnotation\"],\n fields: {\n ...namedTypeElementCommon(),\n readonly: validateOptional(bool),\n typeAnnotation: validateOptionalType(\"TSTypeAnnotation\"),\n kind: {\n validate: assertOneOf(\"get\", \"set\"),\n },\n },\n});\n\ndefineType(\"TSMethodSignature\", {\n aliases: [\"TSTypeElement\"],\n visitor: [\n \"key\",\n \"typeParameters\",\n process.env.BABEL_8_BREAKING ? \"params\" : \"parameters\",\n process.env.BABEL_8_BREAKING ? \"returnType\" : \"typeAnnotation\",\n ],\n fields: {\n ...signatureDeclarationCommon(),\n ...namedTypeElementCommon(),\n kind: {\n validate: assertOneOf(\"method\", \"get\", \"set\"),\n },\n },\n});\n\ndefineType(\"TSIndexSignature\", {\n aliases: [\"TSTypeElement\"],\n visitor: [\"parameters\", \"typeAnnotation\"],\n fields: {\n readonly: validateOptional(bool),\n static: validateOptional(bool),\n parameters: validateArrayOfType(\"Identifier\"), // Length must be 1\n typeAnnotation: validateOptionalType(\"TSTypeAnnotation\"),\n },\n});\n\nconst tsKeywordTypes = [\n \"TSAnyKeyword\",\n \"TSBooleanKeyword\",\n \"TSBigIntKeyword\",\n \"TSIntrinsicKeyword\",\n \"TSNeverKeyword\",\n \"TSNullKeyword\",\n \"TSNumberKeyword\",\n \"TSObjectKeyword\",\n \"TSStringKeyword\",\n \"TSSymbolKeyword\",\n \"TSUndefinedKeyword\",\n \"TSUnknownKeyword\",\n \"TSVoidKeyword\",\n] as const;\n\nfor (const type of tsKeywordTypes) {\n defineType(type, {\n aliases: [\"TSType\", \"TSBaseType\"],\n visitor: [],\n fields: {},\n });\n}\n\ndefineType(\"TSThisType\", {\n aliases: [\"TSType\", \"TSBaseType\"],\n visitor: [],\n fields: {},\n});\n\nconst fnOrCtrBase = {\n aliases: [\"TSType\"],\n visitor: [\n \"typeParameters\",\n process.env.BABEL_8_BREAKING ? \"params\" : \"parameters\",\n process.env.BABEL_8_BREAKING ? \"returnType\" : \"typeAnnotation\",\n ],\n};\n\ndefineType(\"TSFunctionType\", {\n ...fnOrCtrBase,\n fields: signatureDeclarationCommon(),\n});\ndefineType(\"TSConstructorType\", {\n ...fnOrCtrBase,\n fields: {\n ...signatureDeclarationCommon(),\n abstract: validateOptional(bool),\n },\n});\n\ndefineType(\"TSTypeReference\", {\n aliases: [\"TSType\"],\n visitor: [\"typeName\", \"typeParameters\"],\n fields: {\n typeName: validateType(\"TSEntityName\"),\n typeParameters: validateOptionalType(\"TSTypeParameterInstantiation\"),\n },\n});\n\ndefineType(\"TSTypePredicate\", {\n aliases: [\"TSType\"],\n visitor: [\"parameterName\", \"typeAnnotation\"],\n builder: [\"parameterName\", \"typeAnnotation\", \"asserts\"],\n fields: {\n parameterName: validateType([\"Identifier\", \"TSThisType\"]),\n typeAnnotation: validateOptionalType(\"TSTypeAnnotation\"),\n asserts: validateOptional(bool),\n },\n});\n\ndefineType(\"TSTypeQuery\", {\n aliases: [\"TSType\"],\n visitor: [\"exprName\", \"typeParameters\"],\n fields: {\n exprName: validateType([\"TSEntityName\", \"TSImportType\"]),\n typeParameters: validateOptionalType(\"TSTypeParameterInstantiation\"),\n },\n});\n\ndefineType(\"TSTypeLiteral\", {\n aliases: [\"TSType\"],\n visitor: [\"members\"],\n fields: {\n members: validateArrayOfType(\"TSTypeElement\"),\n },\n});\n\ndefineType(\"TSArrayType\", {\n aliases: [\"TSType\"],\n visitor: [\"elementType\"],\n fields: {\n elementType: validateType(\"TSType\"),\n },\n});\n\ndefineType(\"TSTupleType\", {\n aliases: [\"TSType\"],\n visitor: [\"elementTypes\"],\n fields: {\n elementTypes: validateArrayOfType([\"TSType\", \"TSNamedTupleMember\"]),\n },\n});\n\ndefineType(\"TSOptionalType\", {\n aliases: [\"TSType\"],\n visitor: [\"typeAnnotation\"],\n fields: {\n typeAnnotation: validateType(\"TSType\"),\n },\n});\n\ndefineType(\"TSRestType\", {\n aliases: [\"TSType\"],\n visitor: [\"typeAnnotation\"],\n fields: {\n typeAnnotation: validateType(\"TSType\"),\n },\n});\n\ndefineType(\"TSNamedTupleMember\", {\n visitor: [\"label\", \"elementType\"],\n builder: [\"label\", \"elementType\", \"optional\"],\n fields: {\n label: validateType(\"Identifier\"),\n optional: {\n validate: bool,\n default: false,\n },\n elementType: validateType(\"TSType\"),\n },\n});\n\nconst unionOrIntersection = {\n aliases: [\"TSType\"],\n visitor: [\"types\"],\n fields: {\n types: validateArrayOfType(\"TSType\"),\n },\n};\n\ndefineType(\"TSUnionType\", unionOrIntersection);\ndefineType(\"TSIntersectionType\", unionOrIntersection);\n\ndefineType(\"TSConditionalType\", {\n aliases: [\"TSType\"],\n visitor: [\"checkType\", \"extendsType\", \"trueType\", \"falseType\"],\n fields: {\n checkType: validateType(\"TSType\"),\n extendsType: validateType(\"TSType\"),\n trueType: validateType(\"TSType\"),\n falseType: validateType(\"TSType\"),\n },\n});\n\ndefineType(\"TSInferType\", {\n aliases: [\"TSType\"],\n visitor: [\"typeParameter\"],\n fields: {\n typeParameter: validateType(\"TSTypeParameter\"),\n },\n});\n\ndefineType(\"TSParenthesizedType\", {\n aliases: [\"TSType\"],\n visitor: [\"typeAnnotation\"],\n fields: {\n typeAnnotation: validateType(\"TSType\"),\n },\n});\n\ndefineType(\"TSTypeOperator\", {\n aliases: [\"TSType\"],\n visitor: [\"typeAnnotation\"],\n fields: {\n operator: validate(assertValueType(\"string\")),\n typeAnnotation: validateType(\"TSType\"),\n },\n});\n\ndefineType(\"TSIndexedAccessType\", {\n aliases: [\"TSType\"],\n visitor: [\"objectType\", \"indexType\"],\n fields: {\n objectType: validateType(\"TSType\"),\n indexType: validateType(\"TSType\"),\n },\n});\n\ndefineType(\"TSMappedType\", {\n aliases: [\"TSType\"],\n visitor: [\"typeParameter\", \"typeAnnotation\", \"nameType\"],\n fields: {\n readonly: validateOptional(assertOneOf(true, false, \"+\", \"-\")),\n typeParameter: validateType(\"TSTypeParameter\"),\n optional: validateOptional(assertOneOf(true, false, \"+\", \"-\")),\n typeAnnotation: validateOptionalType(\"TSType\"),\n nameType: validateOptionalType(\"TSType\"),\n },\n});\n\ndefineType(\"TSLiteralType\", {\n aliases: [\"TSType\", \"TSBaseType\"],\n visitor: [\"literal\"],\n fields: {\n literal: {\n validate: (function () {\n const unaryExpression = assertNodeType(\n \"NumericLiteral\",\n \"BigIntLiteral\",\n );\n const unaryOperator = assertOneOf(\"-\");\n\n const literal = assertNodeType(\n \"NumericLiteral\",\n \"StringLiteral\",\n \"BooleanLiteral\",\n \"BigIntLiteral\",\n \"TemplateLiteral\",\n );\n function validator(parent: any, key: string, node: any) {\n // type A = -1 | 1;\n if (is(\"UnaryExpression\", node)) {\n // check operator first\n unaryOperator(node, \"operator\", node.operator);\n unaryExpression(node, \"argument\", node.argument);\n } else {\n // type A = 'foo' | 'bar' | false | 1;\n literal(parent, key, node);\n }\n }\n\n validator.oneOfNodeTypes = [\n \"NumericLiteral\",\n \"StringLiteral\",\n \"BooleanLiteral\",\n \"BigIntLiteral\",\n \"TemplateLiteral\",\n \"UnaryExpression\",\n ];\n\n return validator;\n })(),\n },\n },\n});\n\ndefineType(\"TSExpressionWithTypeArguments\", {\n aliases: [\"TSType\"],\n visitor: [\"expression\", \"typeParameters\"],\n fields: {\n expression: validateType(\"TSEntityName\"),\n typeParameters: validateOptionalType(\"TSTypeParameterInstantiation\"),\n },\n});\n\ndefineType(\"TSInterfaceDeclaration\", {\n // \"Statement\" alias prevents a semicolon from appearing after it in an export declaration.\n aliases: [\"Statement\", \"Declaration\"],\n visitor: [\"id\", \"typeParameters\", \"extends\", \"body\"],\n fields: {\n declare: validateOptional(bool),\n id: validateType(\"Identifier\"),\n typeParameters: validateOptionalType(\"TSTypeParameterDeclaration\"),\n extends: validateOptional(arrayOfType(\"TSExpressionWithTypeArguments\")),\n body: validateType(\"TSInterfaceBody\"),\n },\n});\n\ndefineType(\"TSInterfaceBody\", {\n visitor: [\"body\"],\n fields: {\n body: validateArrayOfType(\"TSTypeElement\"),\n },\n});\n\ndefineType(\"TSTypeAliasDeclaration\", {\n aliases: [\"Statement\", \"Declaration\"],\n visitor: [\"id\", \"typeParameters\", \"typeAnnotation\"],\n fields: {\n declare: validateOptional(bool),\n id: validateType(\"Identifier\"),\n typeParameters: validateOptionalType(\"TSTypeParameterDeclaration\"),\n typeAnnotation: validateType(\"TSType\"),\n },\n});\n\ndefineType(\"TSInstantiationExpression\", {\n aliases: [\"Expression\"],\n visitor: [\"expression\", \"typeParameters\"],\n fields: {\n expression: validateType(\"Expression\"),\n typeParameters: validateOptionalType(\"TSTypeParameterInstantiation\"),\n },\n});\n\nconst TSTypeExpression = {\n aliases: [\"Expression\", \"LVal\", \"PatternLike\"],\n visitor: [\"expression\", \"typeAnnotation\"],\n fields: {\n expression: validateType(\"Expression\"),\n typeAnnotation: validateType(\"TSType\"),\n },\n};\n\ndefineType(\"TSAsExpression\", TSTypeExpression);\ndefineType(\"TSSatisfiesExpression\", TSTypeExpression);\n\ndefineType(\"TSTypeAssertion\", {\n aliases: [\"Expression\", \"LVal\", \"PatternLike\"],\n visitor: [\"typeAnnotation\", \"expression\"],\n fields: {\n typeAnnotation: validateType(\"TSType\"),\n expression: validateType(\"Expression\"),\n },\n});\n\ndefineType(\"TSEnumDeclaration\", {\n // \"Statement\" alias prevents a semicolon from appearing after it in an export declaration.\n aliases: [\"Statement\", \"Declaration\"],\n visitor: [\"id\", \"members\"],\n fields: {\n declare: validateOptional(bool),\n const: validateOptional(bool),\n id: validateType(\"Identifier\"),\n members: validateArrayOfType(\"TSEnumMember\"),\n initializer: validateOptionalType(\"Expression\"),\n },\n});\n\ndefineType(\"TSEnumMember\", {\n visitor: [\"id\", \"initializer\"],\n fields: {\n id: validateType([\"Identifier\", \"StringLiteral\"]),\n initializer: validateOptionalType(\"Expression\"),\n },\n});\n\ndefineType(\"TSModuleDeclaration\", {\n aliases: [\"Statement\", \"Declaration\"],\n visitor: [\"id\", \"body\"],\n fields: {\n declare: validateOptional(bool),\n global: validateOptional(bool),\n id: validateType([\"Identifier\", \"StringLiteral\"]),\n body: validateType([\"TSModuleBlock\", \"TSModuleDeclaration\"]),\n },\n});\n\ndefineType(\"TSModuleBlock\", {\n aliases: [\"Scopable\", \"Block\", \"BlockParent\", \"FunctionParent\"],\n visitor: [\"body\"],\n fields: {\n body: validateArrayOfType(\"Statement\"),\n },\n});\n\ndefineType(\"TSImportType\", {\n aliases: [\"TSType\"],\n visitor: [\"argument\", \"qualifier\", \"typeParameters\"],\n fields: {\n argument: validateType(\"StringLiteral\"),\n qualifier: validateOptionalType(\"TSEntityName\"),\n typeParameters: validateOptionalType(\"TSTypeParameterInstantiation\"),\n options: {\n validate: assertNodeType(\"Expression\"),\n optional: true,\n },\n },\n});\n\ndefineType(\"TSImportEqualsDeclaration\", {\n aliases: [\"Statement\"],\n visitor: [\"id\", \"moduleReference\"],\n fields: {\n isExport: validate(bool),\n id: validateType(\"Identifier\"),\n moduleReference: validateType([\n \"TSEntityName\",\n \"TSExternalModuleReference\",\n ]),\n importKind: {\n validate: assertOneOf(\"type\", \"value\"),\n optional: true,\n },\n },\n});\n\ndefineType(\"TSExternalModuleReference\", {\n visitor: [\"expression\"],\n fields: {\n expression: validateType(\"StringLiteral\"),\n },\n});\n\ndefineType(\"TSNonNullExpression\", {\n aliases: [\"Expression\", \"LVal\", \"PatternLike\"],\n visitor: [\"expression\"],\n fields: {\n expression: validateType(\"Expression\"),\n },\n});\n\ndefineType(\"TSExportAssignment\", {\n aliases: [\"Statement\"],\n visitor: [\"expression\"],\n fields: {\n expression: validateType(\"Expression\"),\n },\n});\n\ndefineType(\"TSNamespaceExportDeclaration\", {\n aliases: [\"Statement\"],\n visitor: [\"id\"],\n fields: {\n id: validateType(\"Identifier\"),\n },\n});\n\ndefineType(\"TSTypeAnnotation\", {\n visitor: [\"typeAnnotation\"],\n fields: {\n typeAnnotation: {\n validate: assertNodeType(\"TSType\"),\n },\n },\n});\n\ndefineType(\"TSTypeParameterInstantiation\", {\n visitor: [\"params\"],\n fields: {\n params: {\n validate: chain(\n assertValueType(\"array\"),\n assertEach(assertNodeType(\"TSType\")),\n ),\n },\n },\n});\n\ndefineType(\"TSTypeParameterDeclaration\", {\n visitor: [\"params\"],\n fields: {\n params: {\n validate: chain(\n assertValueType(\"array\"),\n assertEach(assertNodeType(\"TSTypeParameter\")),\n ),\n },\n },\n});\n\ndefineType(\"TSTypeParameter\", {\n builder: [\"constraint\", \"default\", \"name\"],\n visitor: [\"constraint\", \"default\"],\n fields: {\n name: {\n validate: !process.env.BABEL_8_BREAKING\n ? assertValueType(\"string\")\n : assertNodeType(\"Identifier\"),\n },\n in: {\n validate: assertValueType(\"boolean\"),\n optional: true,\n },\n out: {\n validate: assertValueType(\"boolean\"),\n optional: true,\n },\n const: {\n validate: assertValueType(\"boolean\"),\n optional: true,\n },\n constraint: {\n validate: assertNodeType(\"TSType\"),\n optional: true,\n },\n default: {\n validate: assertNodeType(\"TSType\"),\n optional: true,\n },\n },\n});\n","export const DEPRECATED_ALIASES = {\n ModuleDeclaration: \"ImportOrExportDeclaration\",\n};\n","import toFastProperties from \"to-fast-properties\";\nimport \"./core.ts\";\nimport \"./flow.ts\";\nimport \"./jsx.ts\";\nimport \"./misc.ts\";\nimport \"./experimental.ts\";\nimport \"./typescript.ts\";\nimport {\n VISITOR_KEYS,\n ALIAS_KEYS,\n FLIPPED_ALIAS_KEYS,\n NODE_FIELDS,\n BUILDER_KEYS,\n DEPRECATED_KEYS,\n NODE_PARENT_VALIDATIONS,\n} from \"./utils.ts\";\nimport {\n PLACEHOLDERS,\n PLACEHOLDERS_ALIAS,\n PLACEHOLDERS_FLIPPED_ALIAS,\n} from \"./placeholders.ts\";\nimport { DEPRECATED_ALIASES } from \"./deprecated-aliases.ts\";\n\n(\n Object.keys(DEPRECATED_ALIASES) as (keyof typeof DEPRECATED_ALIASES)[]\n).forEach(deprecatedAlias => {\n FLIPPED_ALIAS_KEYS[deprecatedAlias] =\n FLIPPED_ALIAS_KEYS[DEPRECATED_ALIASES[deprecatedAlias]];\n});\n\n// We do this here, because at this point the visitor keys should be ready and setup\ntoFastProperties(VISITOR_KEYS);\ntoFastProperties(ALIAS_KEYS);\ntoFastProperties(FLIPPED_ALIAS_KEYS);\ntoFastProperties(NODE_FIELDS);\ntoFastProperties(BUILDER_KEYS);\ntoFastProperties(DEPRECATED_KEYS);\n\ntoFastProperties(PLACEHOLDERS_ALIAS);\ntoFastProperties(PLACEHOLDERS_FLIPPED_ALIAS);\n\nconst TYPES: Array = [].concat(\n Object.keys(VISITOR_KEYS),\n Object.keys(FLIPPED_ALIAS_KEYS),\n Object.keys(DEPRECATED_KEYS),\n);\n\nexport {\n VISITOR_KEYS,\n ALIAS_KEYS,\n FLIPPED_ALIAS_KEYS,\n NODE_FIELDS,\n BUILDER_KEYS,\n DEPRECATED_ALIASES,\n DEPRECATED_KEYS,\n NODE_PARENT_VALIDATIONS,\n PLACEHOLDERS,\n PLACEHOLDERS_ALIAS,\n PLACEHOLDERS_FLIPPED_ALIAS,\n TYPES,\n};\n\nexport type { FieldOptions } from \"./utils.ts\";\n","import {\n NODE_FIELDS,\n NODE_PARENT_VALIDATIONS,\n type FieldOptions,\n} from \"../definitions/index.ts\";\nimport type * as t from \"../index.ts\";\n\nexport default function validate(\n node: t.Node | undefined | null,\n key: string,\n val: any,\n): void {\n if (!node) return;\n\n const fields = NODE_FIELDS[node.type];\n if (!fields) return;\n\n const field = fields[key];\n validateField(node, key, val, field);\n validateChild(node, key, val);\n}\n\nexport function validateField(\n node: t.Node | undefined | null,\n key: string,\n val: any,\n field: FieldOptions | undefined | null,\n): void {\n if (!field?.validate) return;\n if (field.optional && val == null) return;\n\n field.validate(node, key, val);\n}\n\nexport function validateChild(\n node: t.Node | undefined | null,\n key: string,\n val?: t.Node | undefined | null,\n) {\n if (val == null) return;\n const validate = NODE_PARENT_VALIDATIONS[val.type];\n if (!validate) return;\n validate(node, key, val);\n}\n","import validate from \"../validators/validate.ts\";\nimport type * as t from \"../index.ts\";\nimport { BUILDER_KEYS } from \"../index.ts\";\n\nexport default function validateNode(node: N) {\n // todo: because keys not in BUILDER_KEYS are not validated - this actually allows invalid nodes in some cases\n const keys = BUILDER_KEYS[node.type] as (keyof N & string)[];\n for (const key of keys) {\n validate(node, key, node[key]);\n }\n return node;\n}\n","/*\n * This file is auto-generated! Do not modify it directly.\n * To re-generate run 'make build'\n */\nimport validateNode from \"../validateNode.ts\";\nimport type * as t from \"../../index.ts\";\nimport deprecationWarning from \"../../utils/deprecationWarning.ts\";\nexport function arrayExpression(\n elements: Array = [],\n): t.ArrayExpression {\n return validateNode({\n type: \"ArrayExpression\",\n elements,\n });\n}\nexport function assignmentExpression(\n operator: string,\n left: t.LVal | t.OptionalMemberExpression,\n right: t.Expression,\n): t.AssignmentExpression {\n return validateNode({\n type: \"AssignmentExpression\",\n operator,\n left,\n right,\n });\n}\nexport function binaryExpression(\n operator:\n | \"+\"\n | \"-\"\n | \"/\"\n | \"%\"\n | \"*\"\n | \"**\"\n | \"&\"\n | \"|\"\n | \">>\"\n | \">>>\"\n | \"<<\"\n | \"^\"\n | \"==\"\n | \"===\"\n | \"!=\"\n | \"!==\"\n | \"in\"\n | \"instanceof\"\n | \">\"\n | \"<\"\n | \">=\"\n | \"<=\"\n | \"|>\",\n left: t.Expression | t.PrivateName,\n right: t.Expression,\n): t.BinaryExpression {\n return validateNode({\n type: \"BinaryExpression\",\n operator,\n left,\n right,\n });\n}\nexport function interpreterDirective(value: string): t.InterpreterDirective {\n return validateNode({\n type: \"InterpreterDirective\",\n value,\n });\n}\nexport function directive(value: t.DirectiveLiteral): t.Directive {\n return validateNode({\n type: \"Directive\",\n value,\n });\n}\nexport function directiveLiteral(value: string): t.DirectiveLiteral {\n return validateNode({\n type: \"DirectiveLiteral\",\n value,\n });\n}\nexport function blockStatement(\n body: Array,\n directives: Array = [],\n): t.BlockStatement {\n return validateNode({\n type: \"BlockStatement\",\n body,\n directives,\n });\n}\nexport function breakStatement(\n label: t.Identifier | null = null,\n): t.BreakStatement {\n return validateNode({\n type: \"BreakStatement\",\n label,\n });\n}\nexport function callExpression(\n callee: t.Expression | t.Super | t.V8IntrinsicIdentifier,\n _arguments: Array,\n): t.CallExpression {\n return validateNode({\n type: \"CallExpression\",\n callee,\n arguments: _arguments,\n });\n}\nexport function catchClause(\n param:\n | t.Identifier\n | t.ArrayPattern\n | t.ObjectPattern\n | null\n | undefined = null,\n body: t.BlockStatement,\n): t.CatchClause {\n return validateNode({\n type: \"CatchClause\",\n param,\n body,\n });\n}\nexport function conditionalExpression(\n test: t.Expression,\n consequent: t.Expression,\n alternate: t.Expression,\n): t.ConditionalExpression {\n return validateNode({\n type: \"ConditionalExpression\",\n test,\n consequent,\n alternate,\n });\n}\nexport function continueStatement(\n label: t.Identifier | null = null,\n): t.ContinueStatement {\n return validateNode({\n type: \"ContinueStatement\",\n label,\n });\n}\nexport function debuggerStatement(): t.DebuggerStatement {\n return {\n type: \"DebuggerStatement\",\n };\n}\nexport function doWhileStatement(\n test: t.Expression,\n body: t.Statement,\n): t.DoWhileStatement {\n return validateNode({\n type: \"DoWhileStatement\",\n test,\n body,\n });\n}\nexport function emptyStatement(): t.EmptyStatement {\n return {\n type: \"EmptyStatement\",\n };\n}\nexport function expressionStatement(\n expression: t.Expression,\n): t.ExpressionStatement {\n return validateNode({\n type: \"ExpressionStatement\",\n expression,\n });\n}\nexport function file(\n program: t.Program,\n comments: Array | null = null,\n tokens: Array | null = null,\n): t.File {\n return validateNode({\n type: \"File\",\n program,\n comments,\n tokens,\n });\n}\nexport function forInStatement(\n left: t.VariableDeclaration | t.LVal,\n right: t.Expression,\n body: t.Statement,\n): t.ForInStatement {\n return validateNode({\n type: \"ForInStatement\",\n left,\n right,\n body,\n });\n}\nexport function forStatement(\n init: t.VariableDeclaration | t.Expression | null | undefined = null,\n test: t.Expression | null | undefined = null,\n update: t.Expression | null | undefined = null,\n body: t.Statement,\n): t.ForStatement {\n return validateNode({\n type: \"ForStatement\",\n init,\n test,\n update,\n body,\n });\n}\nexport function functionDeclaration(\n id: t.Identifier | null | undefined = null,\n params: Array,\n body: t.BlockStatement,\n generator: boolean = false,\n async: boolean = false,\n): t.FunctionDeclaration {\n return validateNode({\n type: \"FunctionDeclaration\",\n id,\n params,\n body,\n generator,\n async,\n });\n}\nexport function functionExpression(\n id: t.Identifier | null | undefined = null,\n params: Array,\n body: t.BlockStatement,\n generator: boolean = false,\n async: boolean = false,\n): t.FunctionExpression {\n return validateNode({\n type: \"FunctionExpression\",\n id,\n params,\n body,\n generator,\n async,\n });\n}\nexport function identifier(name: string): t.Identifier {\n return validateNode({\n type: \"Identifier\",\n name,\n });\n}\nexport function ifStatement(\n test: t.Expression,\n consequent: t.Statement,\n alternate: t.Statement | null = null,\n): t.IfStatement {\n return validateNode({\n type: \"IfStatement\",\n test,\n consequent,\n alternate,\n });\n}\nexport function labeledStatement(\n label: t.Identifier,\n body: t.Statement,\n): t.LabeledStatement {\n return validateNode({\n type: \"LabeledStatement\",\n label,\n body,\n });\n}\nexport function stringLiteral(value: string): t.StringLiteral {\n return validateNode({\n type: \"StringLiteral\",\n value,\n });\n}\nexport function numericLiteral(value: number): t.NumericLiteral {\n return validateNode({\n type: \"NumericLiteral\",\n value,\n });\n}\nexport function nullLiteral(): t.NullLiteral {\n return {\n type: \"NullLiteral\",\n };\n}\nexport function booleanLiteral(value: boolean): t.BooleanLiteral {\n return validateNode({\n type: \"BooleanLiteral\",\n value,\n });\n}\nexport function regExpLiteral(\n pattern: string,\n flags: string = \"\",\n): t.RegExpLiteral {\n return validateNode({\n type: \"RegExpLiteral\",\n pattern,\n flags,\n });\n}\nexport function logicalExpression(\n operator: \"||\" | \"&&\" | \"??\",\n left: t.Expression,\n right: t.Expression,\n): t.LogicalExpression {\n return validateNode({\n type: \"LogicalExpression\",\n operator,\n left,\n right,\n });\n}\nexport function memberExpression(\n object: t.Expression | t.Super,\n property: t.Expression | t.Identifier | t.PrivateName,\n computed: boolean = false,\n optional: true | false | null = null,\n): t.MemberExpression {\n return validateNode({\n type: \"MemberExpression\",\n object,\n property,\n computed,\n optional,\n });\n}\nexport function newExpression(\n callee: t.Expression | t.Super | t.V8IntrinsicIdentifier,\n _arguments: Array,\n): t.NewExpression {\n return validateNode({\n type: \"NewExpression\",\n callee,\n arguments: _arguments,\n });\n}\nexport function program(\n body: Array,\n directives: Array = [],\n sourceType: \"script\" | \"module\" = \"script\",\n interpreter: t.InterpreterDirective | null = null,\n): t.Program {\n return validateNode({\n type: \"Program\",\n body,\n directives,\n sourceType,\n interpreter,\n });\n}\nexport function objectExpression(\n properties: Array,\n): t.ObjectExpression {\n return validateNode({\n type: \"ObjectExpression\",\n properties,\n });\n}\nexport function objectMethod(\n kind: \"method\" | \"get\" | \"set\" | undefined = \"method\",\n key:\n | t.Expression\n | t.Identifier\n | t.StringLiteral\n | t.NumericLiteral\n | t.BigIntLiteral,\n params: Array,\n body: t.BlockStatement,\n computed: boolean = false,\n generator: boolean = false,\n async: boolean = false,\n): t.ObjectMethod {\n return validateNode({\n type: \"ObjectMethod\",\n kind,\n key,\n params,\n body,\n computed,\n generator,\n async,\n });\n}\nexport function objectProperty(\n key:\n | t.Expression\n | t.Identifier\n | t.StringLiteral\n | t.NumericLiteral\n | t.BigIntLiteral\n | t.DecimalLiteral\n | t.PrivateName,\n value: t.Expression | t.PatternLike,\n computed: boolean = false,\n shorthand: boolean = false,\n decorators: Array | null = null,\n): t.ObjectProperty {\n return validateNode({\n type: \"ObjectProperty\",\n key,\n value,\n computed,\n shorthand,\n decorators,\n });\n}\nexport function restElement(argument: t.LVal): t.RestElement {\n return validateNode({\n type: \"RestElement\",\n argument,\n });\n}\nexport function returnStatement(\n argument: t.Expression | null = null,\n): t.ReturnStatement {\n return validateNode({\n type: \"ReturnStatement\",\n argument,\n });\n}\nexport function sequenceExpression(\n expressions: Array,\n): t.SequenceExpression {\n return validateNode({\n type: \"SequenceExpression\",\n expressions,\n });\n}\nexport function parenthesizedExpression(\n expression: t.Expression,\n): t.ParenthesizedExpression {\n return validateNode({\n type: \"ParenthesizedExpression\",\n expression,\n });\n}\nexport function switchCase(\n test: t.Expression | null | undefined = null,\n consequent: Array,\n): t.SwitchCase {\n return validateNode({\n type: \"SwitchCase\",\n test,\n consequent,\n });\n}\nexport function switchStatement(\n discriminant: t.Expression,\n cases: Array,\n): t.SwitchStatement {\n return validateNode({\n type: \"SwitchStatement\",\n discriminant,\n cases,\n });\n}\nexport function thisExpression(): t.ThisExpression {\n return {\n type: \"ThisExpression\",\n };\n}\nexport function throwStatement(argument: t.Expression): t.ThrowStatement {\n return validateNode({\n type: \"ThrowStatement\",\n argument,\n });\n}\nexport function tryStatement(\n block: t.BlockStatement,\n handler: t.CatchClause | null = null,\n finalizer: t.BlockStatement | null = null,\n): t.TryStatement {\n return validateNode({\n type: \"TryStatement\",\n block,\n handler,\n finalizer,\n });\n}\nexport function unaryExpression(\n operator: \"void\" | \"throw\" | \"delete\" | \"!\" | \"+\" | \"-\" | \"~\" | \"typeof\",\n argument: t.Expression,\n prefix: boolean = true,\n): t.UnaryExpression {\n return validateNode({\n type: \"UnaryExpression\",\n operator,\n argument,\n prefix,\n });\n}\nexport function updateExpression(\n operator: \"++\" | \"--\",\n argument: t.Expression,\n prefix: boolean = false,\n): t.UpdateExpression {\n return validateNode({\n type: \"UpdateExpression\",\n operator,\n argument,\n prefix,\n });\n}\nexport function variableDeclaration(\n kind: \"var\" | \"let\" | \"const\" | \"using\" | \"await using\",\n declarations: Array,\n): t.VariableDeclaration {\n return validateNode({\n type: \"VariableDeclaration\",\n kind,\n declarations,\n });\n}\nexport function variableDeclarator(\n id: t.LVal,\n init: t.Expression | null = null,\n): t.VariableDeclarator {\n return validateNode({\n type: \"VariableDeclarator\",\n id,\n init,\n });\n}\nexport function whileStatement(\n test: t.Expression,\n body: t.Statement,\n): t.WhileStatement {\n return validateNode({\n type: \"WhileStatement\",\n test,\n body,\n });\n}\nexport function withStatement(\n object: t.Expression,\n body: t.Statement,\n): t.WithStatement {\n return validateNode({\n type: \"WithStatement\",\n object,\n body,\n });\n}\nexport function assignmentPattern(\n left:\n | t.Identifier\n | t.ObjectPattern\n | t.ArrayPattern\n | t.MemberExpression\n | t.TSAsExpression\n | t.TSSatisfiesExpression\n | t.TSTypeAssertion\n | t.TSNonNullExpression,\n right: t.Expression,\n): t.AssignmentPattern {\n return validateNode({\n type: \"AssignmentPattern\",\n left,\n right,\n });\n}\nexport function arrayPattern(\n elements: Array,\n): t.ArrayPattern {\n return validateNode({\n type: \"ArrayPattern\",\n elements,\n });\n}\nexport function arrowFunctionExpression(\n params: Array,\n body: t.BlockStatement | t.Expression,\n async: boolean = false,\n): t.ArrowFunctionExpression {\n return validateNode({\n type: \"ArrowFunctionExpression\",\n params,\n body,\n async,\n expression: null,\n });\n}\nexport function classBody(\n body: Array<\n | t.ClassMethod\n | t.ClassPrivateMethod\n | t.ClassProperty\n | t.ClassPrivateProperty\n | t.ClassAccessorProperty\n | t.TSDeclareMethod\n | t.TSIndexSignature\n | t.StaticBlock\n >,\n): t.ClassBody {\n return validateNode({\n type: \"ClassBody\",\n body,\n });\n}\nexport function classExpression(\n id: t.Identifier | null | undefined = null,\n superClass: t.Expression | null | undefined = null,\n body: t.ClassBody,\n decorators: Array | null = null,\n): t.ClassExpression {\n return validateNode({\n type: \"ClassExpression\",\n id,\n superClass,\n body,\n decorators,\n });\n}\nexport function classDeclaration(\n id: t.Identifier | null | undefined = null,\n superClass: t.Expression | null | undefined = null,\n body: t.ClassBody,\n decorators: Array | null = null,\n): t.ClassDeclaration {\n return validateNode({\n type: \"ClassDeclaration\",\n id,\n superClass,\n body,\n decorators,\n });\n}\nexport function exportAllDeclaration(\n source: t.StringLiteral,\n): t.ExportAllDeclaration {\n return validateNode({\n type: \"ExportAllDeclaration\",\n source,\n });\n}\nexport function exportDefaultDeclaration(\n declaration:\n | t.TSDeclareFunction\n | t.FunctionDeclaration\n | t.ClassDeclaration\n | t.Expression,\n): t.ExportDefaultDeclaration {\n return validateNode({\n type: \"ExportDefaultDeclaration\",\n declaration,\n });\n}\nexport function exportNamedDeclaration(\n declaration: t.Declaration | null = null,\n specifiers: Array<\n t.ExportSpecifier | t.ExportDefaultSpecifier | t.ExportNamespaceSpecifier\n > = [],\n source: t.StringLiteral | null = null,\n): t.ExportNamedDeclaration {\n return validateNode({\n type: \"ExportNamedDeclaration\",\n declaration,\n specifiers,\n source,\n });\n}\nexport function exportSpecifier(\n local: t.Identifier,\n exported: t.Identifier | t.StringLiteral,\n): t.ExportSpecifier {\n return validateNode({\n type: \"ExportSpecifier\",\n local,\n exported,\n });\n}\nexport function forOfStatement(\n left: t.VariableDeclaration | t.LVal,\n right: t.Expression,\n body: t.Statement,\n _await: boolean = false,\n): t.ForOfStatement {\n return validateNode({\n type: \"ForOfStatement\",\n left,\n right,\n body,\n await: _await,\n });\n}\nexport function importDeclaration(\n specifiers: Array<\n t.ImportSpecifier | t.ImportDefaultSpecifier | t.ImportNamespaceSpecifier\n >,\n source: t.StringLiteral,\n): t.ImportDeclaration {\n return validateNode({\n type: \"ImportDeclaration\",\n specifiers,\n source,\n });\n}\nexport function importDefaultSpecifier(\n local: t.Identifier,\n): t.ImportDefaultSpecifier {\n return validateNode({\n type: \"ImportDefaultSpecifier\",\n local,\n });\n}\nexport function importNamespaceSpecifier(\n local: t.Identifier,\n): t.ImportNamespaceSpecifier {\n return validateNode({\n type: \"ImportNamespaceSpecifier\",\n local,\n });\n}\nexport function importSpecifier(\n local: t.Identifier,\n imported: t.Identifier | t.StringLiteral,\n): t.ImportSpecifier {\n return validateNode({\n type: \"ImportSpecifier\",\n local,\n imported,\n });\n}\nexport function importExpression(\n source: t.Expression,\n options: t.Expression | null = null,\n): t.ImportExpression {\n return validateNode({\n type: \"ImportExpression\",\n source,\n options,\n });\n}\nexport function metaProperty(\n meta: t.Identifier,\n property: t.Identifier,\n): t.MetaProperty {\n return validateNode({\n type: \"MetaProperty\",\n meta,\n property,\n });\n}\nexport function classMethod(\n kind: \"get\" | \"set\" | \"method\" | \"constructor\" | undefined = \"method\",\n key:\n | t.Identifier\n | t.StringLiteral\n | t.NumericLiteral\n | t.BigIntLiteral\n | t.Expression,\n params: Array<\n t.Identifier | t.Pattern | t.RestElement | t.TSParameterProperty\n >,\n body: t.BlockStatement,\n computed: boolean = false,\n _static: boolean = false,\n generator: boolean = false,\n async: boolean = false,\n): t.ClassMethod {\n return validateNode({\n type: \"ClassMethod\",\n kind,\n key,\n params,\n body,\n computed,\n static: _static,\n generator,\n async,\n });\n}\nexport function objectPattern(\n properties: Array,\n): t.ObjectPattern {\n return validateNode({\n type: \"ObjectPattern\",\n properties,\n });\n}\nexport function spreadElement(argument: t.Expression): t.SpreadElement {\n return validateNode({\n type: \"SpreadElement\",\n argument,\n });\n}\nfunction _super(): t.Super {\n return {\n type: \"Super\",\n };\n}\nexport { _super as super };\nexport function taggedTemplateExpression(\n tag: t.Expression,\n quasi: t.TemplateLiteral,\n): t.TaggedTemplateExpression {\n return validateNode({\n type: \"TaggedTemplateExpression\",\n tag,\n quasi,\n });\n}\nexport function templateElement(\n value: { raw: string; cooked?: string },\n tail: boolean = false,\n): t.TemplateElement {\n return validateNode({\n type: \"TemplateElement\",\n value,\n tail,\n });\n}\nexport function templateLiteral(\n quasis: Array,\n expressions: Array,\n): t.TemplateLiteral {\n return validateNode({\n type: \"TemplateLiteral\",\n quasis,\n expressions,\n });\n}\nexport function yieldExpression(\n argument: t.Expression | null = null,\n delegate: boolean = false,\n): t.YieldExpression {\n return validateNode({\n type: \"YieldExpression\",\n argument,\n delegate,\n });\n}\nexport function awaitExpression(argument: t.Expression): t.AwaitExpression {\n return validateNode({\n type: \"AwaitExpression\",\n argument,\n });\n}\nfunction _import(): t.Import {\n return {\n type: \"Import\",\n };\n}\nexport { _import as import };\nexport function bigIntLiteral(value: string): t.BigIntLiteral {\n return validateNode({\n type: \"BigIntLiteral\",\n value,\n });\n}\nexport function exportNamespaceSpecifier(\n exported: t.Identifier,\n): t.ExportNamespaceSpecifier {\n return validateNode({\n type: \"ExportNamespaceSpecifier\",\n exported,\n });\n}\nexport function optionalMemberExpression(\n object: t.Expression,\n property: t.Expression | t.Identifier,\n computed: boolean | undefined = false,\n optional: boolean,\n): t.OptionalMemberExpression {\n return validateNode({\n type: \"OptionalMemberExpression\",\n object,\n property,\n computed,\n optional,\n });\n}\nexport function optionalCallExpression(\n callee: t.Expression,\n _arguments: Array,\n optional: boolean,\n): t.OptionalCallExpression {\n return validateNode({\n type: \"OptionalCallExpression\",\n callee,\n arguments: _arguments,\n optional,\n });\n}\nexport function classProperty(\n key:\n | t.Identifier\n | t.StringLiteral\n | t.NumericLiteral\n | t.BigIntLiteral\n | t.Expression,\n value: t.Expression | null = null,\n typeAnnotation: t.TypeAnnotation | t.TSTypeAnnotation | t.Noop | null = null,\n decorators: Array | null = null,\n computed: boolean = false,\n _static: boolean = false,\n): t.ClassProperty {\n return validateNode({\n type: \"ClassProperty\",\n key,\n value,\n typeAnnotation,\n decorators,\n computed,\n static: _static,\n });\n}\nexport function classAccessorProperty(\n key:\n | t.Identifier\n | t.StringLiteral\n | t.NumericLiteral\n | t.BigIntLiteral\n | t.Expression\n | t.PrivateName,\n value: t.Expression | null = null,\n typeAnnotation: t.TypeAnnotation | t.TSTypeAnnotation | t.Noop | null = null,\n decorators: Array | null = null,\n computed: boolean = false,\n _static: boolean = false,\n): t.ClassAccessorProperty {\n return validateNode({\n type: \"ClassAccessorProperty\",\n key,\n value,\n typeAnnotation,\n decorators,\n computed,\n static: _static,\n });\n}\nexport function classPrivateProperty(\n key: t.PrivateName,\n value: t.Expression | null = null,\n decorators: Array | null = null,\n _static: boolean = false,\n): t.ClassPrivateProperty {\n return validateNode({\n type: \"ClassPrivateProperty\",\n key,\n value,\n decorators,\n static: _static,\n });\n}\nexport function classPrivateMethod(\n kind: \"get\" | \"set\" | \"method\" | undefined = \"method\",\n key: t.PrivateName,\n params: Array<\n t.Identifier | t.Pattern | t.RestElement | t.TSParameterProperty\n >,\n body: t.BlockStatement,\n _static: boolean = false,\n): t.ClassPrivateMethod {\n return validateNode({\n type: \"ClassPrivateMethod\",\n kind,\n key,\n params,\n body,\n static: _static,\n });\n}\nexport function privateName(id: t.Identifier): t.PrivateName {\n return validateNode({\n type: \"PrivateName\",\n id,\n });\n}\nexport function staticBlock(body: Array): t.StaticBlock {\n return validateNode({\n type: \"StaticBlock\",\n body,\n });\n}\nexport function anyTypeAnnotation(): t.AnyTypeAnnotation {\n return {\n type: \"AnyTypeAnnotation\",\n };\n}\nexport function arrayTypeAnnotation(\n elementType: t.FlowType,\n): t.ArrayTypeAnnotation {\n return validateNode({\n type: \"ArrayTypeAnnotation\",\n elementType,\n });\n}\nexport function booleanTypeAnnotation(): t.BooleanTypeAnnotation {\n return {\n type: \"BooleanTypeAnnotation\",\n };\n}\nexport function booleanLiteralTypeAnnotation(\n value: boolean,\n): t.BooleanLiteralTypeAnnotation {\n return validateNode({\n type: \"BooleanLiteralTypeAnnotation\",\n value,\n });\n}\nexport function nullLiteralTypeAnnotation(): t.NullLiteralTypeAnnotation {\n return {\n type: \"NullLiteralTypeAnnotation\",\n };\n}\nexport function classImplements(\n id: t.Identifier,\n typeParameters: t.TypeParameterInstantiation | null = null,\n): t.ClassImplements {\n return validateNode({\n type: \"ClassImplements\",\n id,\n typeParameters,\n });\n}\nexport function declareClass(\n id: t.Identifier,\n typeParameters: t.TypeParameterDeclaration | null | undefined = null,\n _extends: Array | null | undefined = null,\n body: t.ObjectTypeAnnotation,\n): t.DeclareClass {\n return validateNode({\n type: \"DeclareClass\",\n id,\n typeParameters,\n extends: _extends,\n body,\n });\n}\nexport function declareFunction(id: t.Identifier): t.DeclareFunction {\n return validateNode({\n type: \"DeclareFunction\",\n id,\n });\n}\nexport function declareInterface(\n id: t.Identifier,\n typeParameters: t.TypeParameterDeclaration | null | undefined = null,\n _extends: Array | null | undefined = null,\n body: t.ObjectTypeAnnotation,\n): t.DeclareInterface {\n return validateNode({\n type: \"DeclareInterface\",\n id,\n typeParameters,\n extends: _extends,\n body,\n });\n}\nexport function declareModule(\n id: t.Identifier | t.StringLiteral,\n body: t.BlockStatement,\n kind: \"CommonJS\" | \"ES\" | null = null,\n): t.DeclareModule {\n return validateNode({\n type: \"DeclareModule\",\n id,\n body,\n kind,\n });\n}\nexport function declareModuleExports(\n typeAnnotation: t.TypeAnnotation,\n): t.DeclareModuleExports {\n return validateNode({\n type: \"DeclareModuleExports\",\n typeAnnotation,\n });\n}\nexport function declareTypeAlias(\n id: t.Identifier,\n typeParameters: t.TypeParameterDeclaration | null | undefined = null,\n right: t.FlowType,\n): t.DeclareTypeAlias {\n return validateNode({\n type: \"DeclareTypeAlias\",\n id,\n typeParameters,\n right,\n });\n}\nexport function declareOpaqueType(\n id: t.Identifier,\n typeParameters: t.TypeParameterDeclaration | null = null,\n supertype: t.FlowType | null = null,\n): t.DeclareOpaqueType {\n return validateNode({\n type: \"DeclareOpaqueType\",\n id,\n typeParameters,\n supertype,\n });\n}\nexport function declareVariable(id: t.Identifier): t.DeclareVariable {\n return validateNode({\n type: \"DeclareVariable\",\n id,\n });\n}\nexport function declareExportDeclaration(\n declaration: t.Flow | null = null,\n specifiers: Array<\n t.ExportSpecifier | t.ExportNamespaceSpecifier\n > | null = null,\n source: t.StringLiteral | null = null,\n): t.DeclareExportDeclaration {\n return validateNode({\n type: \"DeclareExportDeclaration\",\n declaration,\n specifiers,\n source,\n });\n}\nexport function declareExportAllDeclaration(\n source: t.StringLiteral,\n): t.DeclareExportAllDeclaration {\n return validateNode({\n type: \"DeclareExportAllDeclaration\",\n source,\n });\n}\nexport function declaredPredicate(value: t.Flow): t.DeclaredPredicate {\n return validateNode({\n type: \"DeclaredPredicate\",\n value,\n });\n}\nexport function existsTypeAnnotation(): t.ExistsTypeAnnotation {\n return {\n type: \"ExistsTypeAnnotation\",\n };\n}\nexport function functionTypeAnnotation(\n typeParameters: t.TypeParameterDeclaration | null | undefined = null,\n params: Array,\n rest: t.FunctionTypeParam | null | undefined = null,\n returnType: t.FlowType,\n): t.FunctionTypeAnnotation {\n return validateNode({\n type: \"FunctionTypeAnnotation\",\n typeParameters,\n params,\n rest,\n returnType,\n });\n}\nexport function functionTypeParam(\n name: t.Identifier | null | undefined = null,\n typeAnnotation: t.FlowType,\n): t.FunctionTypeParam {\n return validateNode({\n type: \"FunctionTypeParam\",\n name,\n typeAnnotation,\n });\n}\nexport function genericTypeAnnotation(\n id: t.Identifier | t.QualifiedTypeIdentifier,\n typeParameters: t.TypeParameterInstantiation | null = null,\n): t.GenericTypeAnnotation {\n return validateNode({\n type: \"GenericTypeAnnotation\",\n id,\n typeParameters,\n });\n}\nexport function inferredPredicate(): t.InferredPredicate {\n return {\n type: \"InferredPredicate\",\n };\n}\nexport function interfaceExtends(\n id: t.Identifier | t.QualifiedTypeIdentifier,\n typeParameters: t.TypeParameterInstantiation | null = null,\n): t.InterfaceExtends {\n return validateNode({\n type: \"InterfaceExtends\",\n id,\n typeParameters,\n });\n}\nexport function interfaceDeclaration(\n id: t.Identifier,\n typeParameters: t.TypeParameterDeclaration | null | undefined = null,\n _extends: Array | null | undefined = null,\n body: t.ObjectTypeAnnotation,\n): t.InterfaceDeclaration {\n return validateNode({\n type: \"InterfaceDeclaration\",\n id,\n typeParameters,\n extends: _extends,\n body,\n });\n}\nexport function interfaceTypeAnnotation(\n _extends: Array | null | undefined = null,\n body: t.ObjectTypeAnnotation,\n): t.InterfaceTypeAnnotation {\n return validateNode({\n type: \"InterfaceTypeAnnotation\",\n extends: _extends,\n body,\n });\n}\nexport function intersectionTypeAnnotation(\n types: Array,\n): t.IntersectionTypeAnnotation {\n return validateNode({\n type: \"IntersectionTypeAnnotation\",\n types,\n });\n}\nexport function mixedTypeAnnotation(): t.MixedTypeAnnotation {\n return {\n type: \"MixedTypeAnnotation\",\n };\n}\nexport function emptyTypeAnnotation(): t.EmptyTypeAnnotation {\n return {\n type: \"EmptyTypeAnnotation\",\n };\n}\nexport function nullableTypeAnnotation(\n typeAnnotation: t.FlowType,\n): t.NullableTypeAnnotation {\n return validateNode({\n type: \"NullableTypeAnnotation\",\n typeAnnotation,\n });\n}\nexport function numberLiteralTypeAnnotation(\n value: number,\n): t.NumberLiteralTypeAnnotation {\n return validateNode({\n type: \"NumberLiteralTypeAnnotation\",\n value,\n });\n}\nexport function numberTypeAnnotation(): t.NumberTypeAnnotation {\n return {\n type: \"NumberTypeAnnotation\",\n };\n}\nexport function objectTypeAnnotation(\n properties: Array,\n indexers: Array = [],\n callProperties: Array = [],\n internalSlots: Array = [],\n exact: boolean = false,\n): t.ObjectTypeAnnotation {\n return validateNode({\n type: \"ObjectTypeAnnotation\",\n properties,\n indexers,\n callProperties,\n internalSlots,\n exact,\n });\n}\nexport function objectTypeInternalSlot(\n id: t.Identifier,\n value: t.FlowType,\n optional: boolean,\n _static: boolean,\n method: boolean,\n): t.ObjectTypeInternalSlot {\n return validateNode({\n type: \"ObjectTypeInternalSlot\",\n id,\n value,\n optional,\n static: _static,\n method,\n });\n}\nexport function objectTypeCallProperty(\n value: t.FlowType,\n): t.ObjectTypeCallProperty {\n return validateNode({\n type: \"ObjectTypeCallProperty\",\n value,\n static: null,\n });\n}\nexport function objectTypeIndexer(\n id: t.Identifier | null | undefined = null,\n key: t.FlowType,\n value: t.FlowType,\n variance: t.Variance | null = null,\n): t.ObjectTypeIndexer {\n return validateNode({\n type: \"ObjectTypeIndexer\",\n id,\n key,\n value,\n variance,\n static: null,\n });\n}\nexport function objectTypeProperty(\n key: t.Identifier | t.StringLiteral,\n value: t.FlowType,\n variance: t.Variance | null = null,\n): t.ObjectTypeProperty {\n return validateNode({\n type: \"ObjectTypeProperty\",\n key,\n value,\n variance,\n kind: null,\n method: null,\n optional: null,\n proto: null,\n static: null,\n });\n}\nexport function objectTypeSpreadProperty(\n argument: t.FlowType,\n): t.ObjectTypeSpreadProperty {\n return validateNode({\n type: \"ObjectTypeSpreadProperty\",\n argument,\n });\n}\nexport function opaqueType(\n id: t.Identifier,\n typeParameters: t.TypeParameterDeclaration | null | undefined = null,\n supertype: t.FlowType | null | undefined = null,\n impltype: t.FlowType,\n): t.OpaqueType {\n return validateNode({\n type: \"OpaqueType\",\n id,\n typeParameters,\n supertype,\n impltype,\n });\n}\nexport function qualifiedTypeIdentifier(\n id: t.Identifier,\n qualification: t.Identifier | t.QualifiedTypeIdentifier,\n): t.QualifiedTypeIdentifier {\n return validateNode({\n type: \"QualifiedTypeIdentifier\",\n id,\n qualification,\n });\n}\nexport function stringLiteralTypeAnnotation(\n value: string,\n): t.StringLiteralTypeAnnotation {\n return validateNode({\n type: \"StringLiteralTypeAnnotation\",\n value,\n });\n}\nexport function stringTypeAnnotation(): t.StringTypeAnnotation {\n return {\n type: \"StringTypeAnnotation\",\n };\n}\nexport function symbolTypeAnnotation(): t.SymbolTypeAnnotation {\n return {\n type: \"SymbolTypeAnnotation\",\n };\n}\nexport function thisTypeAnnotation(): t.ThisTypeAnnotation {\n return {\n type: \"ThisTypeAnnotation\",\n };\n}\nexport function tupleTypeAnnotation(\n types: Array,\n): t.TupleTypeAnnotation {\n return validateNode({\n type: \"TupleTypeAnnotation\",\n types,\n });\n}\nexport function typeofTypeAnnotation(\n argument: t.FlowType,\n): t.TypeofTypeAnnotation {\n return validateNode({\n type: \"TypeofTypeAnnotation\",\n argument,\n });\n}\nexport function typeAlias(\n id: t.Identifier,\n typeParameters: t.TypeParameterDeclaration | null | undefined = null,\n right: t.FlowType,\n): t.TypeAlias {\n return validateNode({\n type: \"TypeAlias\",\n id,\n typeParameters,\n right,\n });\n}\nexport function typeAnnotation(typeAnnotation: t.FlowType): t.TypeAnnotation {\n return validateNode({\n type: \"TypeAnnotation\",\n typeAnnotation,\n });\n}\nexport function typeCastExpression(\n expression: t.Expression,\n typeAnnotation: t.TypeAnnotation,\n): t.TypeCastExpression {\n return validateNode({\n type: \"TypeCastExpression\",\n expression,\n typeAnnotation,\n });\n}\nexport function typeParameter(\n bound: t.TypeAnnotation | null = null,\n _default: t.FlowType | null = null,\n variance: t.Variance | null = null,\n): t.TypeParameter {\n return validateNode({\n type: \"TypeParameter\",\n bound,\n default: _default,\n variance,\n name: null,\n });\n}\nexport function typeParameterDeclaration(\n params: Array,\n): t.TypeParameterDeclaration {\n return validateNode({\n type: \"TypeParameterDeclaration\",\n params,\n });\n}\nexport function typeParameterInstantiation(\n params: Array,\n): t.TypeParameterInstantiation {\n return validateNode({\n type: \"TypeParameterInstantiation\",\n params,\n });\n}\nexport function unionTypeAnnotation(\n types: Array,\n): t.UnionTypeAnnotation {\n return validateNode({\n type: \"UnionTypeAnnotation\",\n types,\n });\n}\nexport function variance(kind: \"minus\" | \"plus\"): t.Variance {\n return validateNode({\n type: \"Variance\",\n kind,\n });\n}\nexport function voidTypeAnnotation(): t.VoidTypeAnnotation {\n return {\n type: \"VoidTypeAnnotation\",\n };\n}\nexport function enumDeclaration(\n id: t.Identifier,\n body:\n | t.EnumBooleanBody\n | t.EnumNumberBody\n | t.EnumStringBody\n | t.EnumSymbolBody,\n): t.EnumDeclaration {\n return validateNode({\n type: \"EnumDeclaration\",\n id,\n body,\n });\n}\nexport function enumBooleanBody(\n members: Array,\n): t.EnumBooleanBody {\n return validateNode({\n type: \"EnumBooleanBody\",\n members,\n explicitType: null,\n hasUnknownMembers: null,\n });\n}\nexport function enumNumberBody(\n members: Array,\n): t.EnumNumberBody {\n return validateNode({\n type: \"EnumNumberBody\",\n members,\n explicitType: null,\n hasUnknownMembers: null,\n });\n}\nexport function enumStringBody(\n members: Array,\n): t.EnumStringBody {\n return validateNode({\n type: \"EnumStringBody\",\n members,\n explicitType: null,\n hasUnknownMembers: null,\n });\n}\nexport function enumSymbolBody(\n members: Array,\n): t.EnumSymbolBody {\n return validateNode({\n type: \"EnumSymbolBody\",\n members,\n hasUnknownMembers: null,\n });\n}\nexport function enumBooleanMember(id: t.Identifier): t.EnumBooleanMember {\n return validateNode({\n type: \"EnumBooleanMember\",\n id,\n init: null,\n });\n}\nexport function enumNumberMember(\n id: t.Identifier,\n init: t.NumericLiteral,\n): t.EnumNumberMember {\n return validateNode({\n type: \"EnumNumberMember\",\n id,\n init,\n });\n}\nexport function enumStringMember(\n id: t.Identifier,\n init: t.StringLiteral,\n): t.EnumStringMember {\n return validateNode({\n type: \"EnumStringMember\",\n id,\n init,\n });\n}\nexport function enumDefaultedMember(id: t.Identifier): t.EnumDefaultedMember {\n return validateNode({\n type: \"EnumDefaultedMember\",\n id,\n });\n}\nexport function indexedAccessType(\n objectType: t.FlowType,\n indexType: t.FlowType,\n): t.IndexedAccessType {\n return validateNode({\n type: \"IndexedAccessType\",\n objectType,\n indexType,\n });\n}\nexport function optionalIndexedAccessType(\n objectType: t.FlowType,\n indexType: t.FlowType,\n): t.OptionalIndexedAccessType {\n return validateNode({\n type: \"OptionalIndexedAccessType\",\n objectType,\n indexType,\n optional: null,\n });\n}\nexport function jsxAttribute(\n name: t.JSXIdentifier | t.JSXNamespacedName,\n value:\n | t.JSXElement\n | t.JSXFragment\n | t.StringLiteral\n | t.JSXExpressionContainer\n | null = null,\n): t.JSXAttribute {\n return validateNode({\n type: \"JSXAttribute\",\n name,\n value,\n });\n}\nexport { jsxAttribute as jSXAttribute };\nexport function jsxClosingElement(\n name: t.JSXIdentifier | t.JSXMemberExpression | t.JSXNamespacedName,\n): t.JSXClosingElement {\n return validateNode({\n type: \"JSXClosingElement\",\n name,\n });\n}\nexport { jsxClosingElement as jSXClosingElement };\nexport function jsxElement(\n openingElement: t.JSXOpeningElement,\n closingElement: t.JSXClosingElement | null | undefined = null,\n children: Array<\n | t.JSXText\n | t.JSXExpressionContainer\n | t.JSXSpreadChild\n | t.JSXElement\n | t.JSXFragment\n >,\n selfClosing: boolean | null = null,\n): t.JSXElement {\n return validateNode({\n type: \"JSXElement\",\n openingElement,\n closingElement,\n children,\n selfClosing,\n });\n}\nexport { jsxElement as jSXElement };\nexport function jsxEmptyExpression(): t.JSXEmptyExpression {\n return {\n type: \"JSXEmptyExpression\",\n };\n}\nexport { jsxEmptyExpression as jSXEmptyExpression };\nexport function jsxExpressionContainer(\n expression: t.Expression | t.JSXEmptyExpression,\n): t.JSXExpressionContainer {\n return validateNode({\n type: \"JSXExpressionContainer\",\n expression,\n });\n}\nexport { jsxExpressionContainer as jSXExpressionContainer };\nexport function jsxSpreadChild(expression: t.Expression): t.JSXSpreadChild {\n return validateNode({\n type: \"JSXSpreadChild\",\n expression,\n });\n}\nexport { jsxSpreadChild as jSXSpreadChild };\nexport function jsxIdentifier(name: string): t.JSXIdentifier {\n return validateNode({\n type: \"JSXIdentifier\",\n name,\n });\n}\nexport { jsxIdentifier as jSXIdentifier };\nexport function jsxMemberExpression(\n object: t.JSXMemberExpression | t.JSXIdentifier,\n property: t.JSXIdentifier,\n): t.JSXMemberExpression {\n return validateNode({\n type: \"JSXMemberExpression\",\n object,\n property,\n });\n}\nexport { jsxMemberExpression as jSXMemberExpression };\nexport function jsxNamespacedName(\n namespace: t.JSXIdentifier,\n name: t.JSXIdentifier,\n): t.JSXNamespacedName {\n return validateNode({\n type: \"JSXNamespacedName\",\n namespace,\n name,\n });\n}\nexport { jsxNamespacedName as jSXNamespacedName };\nexport function jsxOpeningElement(\n name: t.JSXIdentifier | t.JSXMemberExpression | t.JSXNamespacedName,\n attributes: Array,\n selfClosing: boolean = false,\n): t.JSXOpeningElement {\n return validateNode({\n type: \"JSXOpeningElement\",\n name,\n attributes,\n selfClosing,\n });\n}\nexport { jsxOpeningElement as jSXOpeningElement };\nexport function jsxSpreadAttribute(\n argument: t.Expression,\n): t.JSXSpreadAttribute {\n return validateNode({\n type: \"JSXSpreadAttribute\",\n argument,\n });\n}\nexport { jsxSpreadAttribute as jSXSpreadAttribute };\nexport function jsxText(value: string): t.JSXText {\n return validateNode({\n type: \"JSXText\",\n value,\n });\n}\nexport { jsxText as jSXText };\nexport function jsxFragment(\n openingFragment: t.JSXOpeningFragment,\n closingFragment: t.JSXClosingFragment,\n children: Array<\n | t.JSXText\n | t.JSXExpressionContainer\n | t.JSXSpreadChild\n | t.JSXElement\n | t.JSXFragment\n >,\n): t.JSXFragment {\n return validateNode({\n type: \"JSXFragment\",\n openingFragment,\n closingFragment,\n children,\n });\n}\nexport { jsxFragment as jSXFragment };\nexport function jsxOpeningFragment(): t.JSXOpeningFragment {\n return {\n type: \"JSXOpeningFragment\",\n };\n}\nexport { jsxOpeningFragment as jSXOpeningFragment };\nexport function jsxClosingFragment(): t.JSXClosingFragment {\n return {\n type: \"JSXClosingFragment\",\n };\n}\nexport { jsxClosingFragment as jSXClosingFragment };\nexport function noop(): t.Noop {\n return {\n type: \"Noop\",\n };\n}\nexport function placeholder(\n expectedNode:\n | \"Identifier\"\n | \"StringLiteral\"\n | \"Expression\"\n | \"Statement\"\n | \"Declaration\"\n | \"BlockStatement\"\n | \"ClassBody\"\n | \"Pattern\",\n name: t.Identifier,\n): t.Placeholder {\n return validateNode({\n type: \"Placeholder\",\n expectedNode,\n name,\n });\n}\nexport function v8IntrinsicIdentifier(name: string): t.V8IntrinsicIdentifier {\n return validateNode({\n type: \"V8IntrinsicIdentifier\",\n name,\n });\n}\nexport function argumentPlaceholder(): t.ArgumentPlaceholder {\n return {\n type: \"ArgumentPlaceholder\",\n };\n}\nexport function bindExpression(\n object: t.Expression,\n callee: t.Expression,\n): t.BindExpression {\n return validateNode({\n type: \"BindExpression\",\n object,\n callee,\n });\n}\nexport function importAttribute(\n key: t.Identifier | t.StringLiteral,\n value: t.StringLiteral,\n): t.ImportAttribute {\n return validateNode({\n type: \"ImportAttribute\",\n key,\n value,\n });\n}\nexport function decorator(expression: t.Expression): t.Decorator {\n return validateNode({\n type: \"Decorator\",\n expression,\n });\n}\nexport function doExpression(\n body: t.BlockStatement,\n async: boolean = false,\n): t.DoExpression {\n return validateNode({\n type: \"DoExpression\",\n body,\n async,\n });\n}\nexport function exportDefaultSpecifier(\n exported: t.Identifier,\n): t.ExportDefaultSpecifier {\n return validateNode({\n type: \"ExportDefaultSpecifier\",\n exported,\n });\n}\nexport function recordExpression(\n properties: Array,\n): t.RecordExpression {\n return validateNode({\n type: \"RecordExpression\",\n properties,\n });\n}\nexport function tupleExpression(\n elements: Array = [],\n): t.TupleExpression {\n return validateNode({\n type: \"TupleExpression\",\n elements,\n });\n}\nexport function decimalLiteral(value: string): t.DecimalLiteral {\n return validateNode({\n type: \"DecimalLiteral\",\n value,\n });\n}\nexport function moduleExpression(body: t.Program): t.ModuleExpression {\n return validateNode({\n type: \"ModuleExpression\",\n body,\n });\n}\nexport function topicReference(): t.TopicReference {\n return {\n type: \"TopicReference\",\n };\n}\nexport function pipelineTopicExpression(\n expression: t.Expression,\n): t.PipelineTopicExpression {\n return validateNode({\n type: \"PipelineTopicExpression\",\n expression,\n });\n}\nexport function pipelineBareFunction(\n callee: t.Expression,\n): t.PipelineBareFunction {\n return validateNode({\n type: \"PipelineBareFunction\",\n callee,\n });\n}\nexport function pipelinePrimaryTopicReference(): t.PipelinePrimaryTopicReference {\n return {\n type: \"PipelinePrimaryTopicReference\",\n };\n}\nexport function tsParameterProperty(\n parameter: t.Identifier | t.AssignmentPattern,\n): t.TSParameterProperty {\n return validateNode({\n type: \"TSParameterProperty\",\n parameter,\n });\n}\nexport { tsParameterProperty as tSParameterProperty };\nexport function tsDeclareFunction(\n id: t.Identifier | null | undefined = null,\n typeParameters:\n | t.TSTypeParameterDeclaration\n | t.Noop\n | null\n | undefined = null,\n params: Array,\n returnType: t.TSTypeAnnotation | t.Noop | null = null,\n): t.TSDeclareFunction {\n return validateNode({\n type: \"TSDeclareFunction\",\n id,\n typeParameters,\n params,\n returnType,\n });\n}\nexport { tsDeclareFunction as tSDeclareFunction };\nexport function tsDeclareMethod(\n decorators: Array | null | undefined = null,\n key:\n | t.Identifier\n | t.StringLiteral\n | t.NumericLiteral\n | t.BigIntLiteral\n | t.Expression,\n typeParameters:\n | t.TSTypeParameterDeclaration\n | t.Noop\n | null\n | undefined = null,\n params: Array<\n t.Identifier | t.Pattern | t.RestElement | t.TSParameterProperty\n >,\n returnType: t.TSTypeAnnotation | t.Noop | null = null,\n): t.TSDeclareMethod {\n return validateNode({\n type: \"TSDeclareMethod\",\n decorators,\n key,\n typeParameters,\n params,\n returnType,\n });\n}\nexport { tsDeclareMethod as tSDeclareMethod };\nexport function tsQualifiedName(\n left: t.TSEntityName,\n right: t.Identifier,\n): t.TSQualifiedName {\n return validateNode({\n type: \"TSQualifiedName\",\n left,\n right,\n });\n}\nexport { tsQualifiedName as tSQualifiedName };\nexport function tsCallSignatureDeclaration(\n typeParameters: t.TSTypeParameterDeclaration | null | undefined = null,\n parameters: Array<\n t.ArrayPattern | t.Identifier | t.ObjectPattern | t.RestElement\n >,\n typeAnnotation: t.TSTypeAnnotation | null = null,\n): t.TSCallSignatureDeclaration {\n return validateNode({\n type: \"TSCallSignatureDeclaration\",\n typeParameters,\n parameters,\n typeAnnotation,\n });\n}\nexport { tsCallSignatureDeclaration as tSCallSignatureDeclaration };\nexport function tsConstructSignatureDeclaration(\n typeParameters: t.TSTypeParameterDeclaration | null | undefined = null,\n parameters: Array<\n t.ArrayPattern | t.Identifier | t.ObjectPattern | t.RestElement\n >,\n typeAnnotation: t.TSTypeAnnotation | null = null,\n): t.TSConstructSignatureDeclaration {\n return validateNode({\n type: \"TSConstructSignatureDeclaration\",\n typeParameters,\n parameters,\n typeAnnotation,\n });\n}\nexport { tsConstructSignatureDeclaration as tSConstructSignatureDeclaration };\nexport function tsPropertySignature(\n key: t.Expression,\n typeAnnotation: t.TSTypeAnnotation | null = null,\n): t.TSPropertySignature {\n return validateNode({\n type: \"TSPropertySignature\",\n key,\n typeAnnotation,\n kind: null,\n });\n}\nexport { tsPropertySignature as tSPropertySignature };\nexport function tsMethodSignature(\n key: t.Expression,\n typeParameters: t.TSTypeParameterDeclaration | null | undefined = null,\n parameters: Array<\n t.ArrayPattern | t.Identifier | t.ObjectPattern | t.RestElement\n >,\n typeAnnotation: t.TSTypeAnnotation | null = null,\n): t.TSMethodSignature {\n return validateNode({\n type: \"TSMethodSignature\",\n key,\n typeParameters,\n parameters,\n typeAnnotation,\n kind: null,\n });\n}\nexport { tsMethodSignature as tSMethodSignature };\nexport function tsIndexSignature(\n parameters: Array,\n typeAnnotation: t.TSTypeAnnotation | null = null,\n): t.TSIndexSignature {\n return validateNode({\n type: \"TSIndexSignature\",\n parameters,\n typeAnnotation,\n });\n}\nexport { tsIndexSignature as tSIndexSignature };\nexport function tsAnyKeyword(): t.TSAnyKeyword {\n return {\n type: \"TSAnyKeyword\",\n };\n}\nexport { tsAnyKeyword as tSAnyKeyword };\nexport function tsBooleanKeyword(): t.TSBooleanKeyword {\n return {\n type: \"TSBooleanKeyword\",\n };\n}\nexport { tsBooleanKeyword as tSBooleanKeyword };\nexport function tsBigIntKeyword(): t.TSBigIntKeyword {\n return {\n type: \"TSBigIntKeyword\",\n };\n}\nexport { tsBigIntKeyword as tSBigIntKeyword };\nexport function tsIntrinsicKeyword(): t.TSIntrinsicKeyword {\n return {\n type: \"TSIntrinsicKeyword\",\n };\n}\nexport { tsIntrinsicKeyword as tSIntrinsicKeyword };\nexport function tsNeverKeyword(): t.TSNeverKeyword {\n return {\n type: \"TSNeverKeyword\",\n };\n}\nexport { tsNeverKeyword as tSNeverKeyword };\nexport function tsNullKeyword(): t.TSNullKeyword {\n return {\n type: \"TSNullKeyword\",\n };\n}\nexport { tsNullKeyword as tSNullKeyword };\nexport function tsNumberKeyword(): t.TSNumberKeyword {\n return {\n type: \"TSNumberKeyword\",\n };\n}\nexport { tsNumberKeyword as tSNumberKeyword };\nexport function tsObjectKeyword(): t.TSObjectKeyword {\n return {\n type: \"TSObjectKeyword\",\n };\n}\nexport { tsObjectKeyword as tSObjectKeyword };\nexport function tsStringKeyword(): t.TSStringKeyword {\n return {\n type: \"TSStringKeyword\",\n };\n}\nexport { tsStringKeyword as tSStringKeyword };\nexport function tsSymbolKeyword(): t.TSSymbolKeyword {\n return {\n type: \"TSSymbolKeyword\",\n };\n}\nexport { tsSymbolKeyword as tSSymbolKeyword };\nexport function tsUndefinedKeyword(): t.TSUndefinedKeyword {\n return {\n type: \"TSUndefinedKeyword\",\n };\n}\nexport { tsUndefinedKeyword as tSUndefinedKeyword };\nexport function tsUnknownKeyword(): t.TSUnknownKeyword {\n return {\n type: \"TSUnknownKeyword\",\n };\n}\nexport { tsUnknownKeyword as tSUnknownKeyword };\nexport function tsVoidKeyword(): t.TSVoidKeyword {\n return {\n type: \"TSVoidKeyword\",\n };\n}\nexport { tsVoidKeyword as tSVoidKeyword };\nexport function tsThisType(): t.TSThisType {\n return {\n type: \"TSThisType\",\n };\n}\nexport { tsThisType as tSThisType };\nexport function tsFunctionType(\n typeParameters: t.TSTypeParameterDeclaration | null | undefined = null,\n parameters: Array<\n t.ArrayPattern | t.Identifier | t.ObjectPattern | t.RestElement\n >,\n typeAnnotation: t.TSTypeAnnotation | null = null,\n): t.TSFunctionType {\n return validateNode({\n type: \"TSFunctionType\",\n typeParameters,\n parameters,\n typeAnnotation,\n });\n}\nexport { tsFunctionType as tSFunctionType };\nexport function tsConstructorType(\n typeParameters: t.TSTypeParameterDeclaration | null | undefined = null,\n parameters: Array<\n t.ArrayPattern | t.Identifier | t.ObjectPattern | t.RestElement\n >,\n typeAnnotation: t.TSTypeAnnotation | null = null,\n): t.TSConstructorType {\n return validateNode({\n type: \"TSConstructorType\",\n typeParameters,\n parameters,\n typeAnnotation,\n });\n}\nexport { tsConstructorType as tSConstructorType };\nexport function tsTypeReference(\n typeName: t.TSEntityName,\n typeParameters: t.TSTypeParameterInstantiation | null = null,\n): t.TSTypeReference {\n return validateNode({\n type: \"TSTypeReference\",\n typeName,\n typeParameters,\n });\n}\nexport { tsTypeReference as tSTypeReference };\nexport function tsTypePredicate(\n parameterName: t.Identifier | t.TSThisType,\n typeAnnotation: t.TSTypeAnnotation | null = null,\n asserts: boolean | null = null,\n): t.TSTypePredicate {\n return validateNode({\n type: \"TSTypePredicate\",\n parameterName,\n typeAnnotation,\n asserts,\n });\n}\nexport { tsTypePredicate as tSTypePredicate };\nexport function tsTypeQuery(\n exprName: t.TSEntityName | t.TSImportType,\n typeParameters: t.TSTypeParameterInstantiation | null = null,\n): t.TSTypeQuery {\n return validateNode({\n type: \"TSTypeQuery\",\n exprName,\n typeParameters,\n });\n}\nexport { tsTypeQuery as tSTypeQuery };\nexport function tsTypeLiteral(\n members: Array,\n): t.TSTypeLiteral {\n return validateNode({\n type: \"TSTypeLiteral\",\n members,\n });\n}\nexport { tsTypeLiteral as tSTypeLiteral };\nexport function tsArrayType(elementType: t.TSType): t.TSArrayType {\n return validateNode({\n type: \"TSArrayType\",\n elementType,\n });\n}\nexport { tsArrayType as tSArrayType };\nexport function tsTupleType(\n elementTypes: Array,\n): t.TSTupleType {\n return validateNode({\n type: \"TSTupleType\",\n elementTypes,\n });\n}\nexport { tsTupleType as tSTupleType };\nexport function tsOptionalType(typeAnnotation: t.TSType): t.TSOptionalType {\n return validateNode({\n type: \"TSOptionalType\",\n typeAnnotation,\n });\n}\nexport { tsOptionalType as tSOptionalType };\nexport function tsRestType(typeAnnotation: t.TSType): t.TSRestType {\n return validateNode({\n type: \"TSRestType\",\n typeAnnotation,\n });\n}\nexport { tsRestType as tSRestType };\nexport function tsNamedTupleMember(\n label: t.Identifier,\n elementType: t.TSType,\n optional: boolean = false,\n): t.TSNamedTupleMember {\n return validateNode({\n type: \"TSNamedTupleMember\",\n label,\n elementType,\n optional,\n });\n}\nexport { tsNamedTupleMember as tSNamedTupleMember };\nexport function tsUnionType(types: Array): t.TSUnionType {\n return validateNode({\n type: \"TSUnionType\",\n types,\n });\n}\nexport { tsUnionType as tSUnionType };\nexport function tsIntersectionType(\n types: Array,\n): t.TSIntersectionType {\n return validateNode({\n type: \"TSIntersectionType\",\n types,\n });\n}\nexport { tsIntersectionType as tSIntersectionType };\nexport function tsConditionalType(\n checkType: t.TSType,\n extendsType: t.TSType,\n trueType: t.TSType,\n falseType: t.TSType,\n): t.TSConditionalType {\n return validateNode({\n type: \"TSConditionalType\",\n checkType,\n extendsType,\n trueType,\n falseType,\n });\n}\nexport { tsConditionalType as tSConditionalType };\nexport function tsInferType(typeParameter: t.TSTypeParameter): t.TSInferType {\n return validateNode({\n type: \"TSInferType\",\n typeParameter,\n });\n}\nexport { tsInferType as tSInferType };\nexport function tsParenthesizedType(\n typeAnnotation: t.TSType,\n): t.TSParenthesizedType {\n return validateNode({\n type: \"TSParenthesizedType\",\n typeAnnotation,\n });\n}\nexport { tsParenthesizedType as tSParenthesizedType };\nexport function tsTypeOperator(typeAnnotation: t.TSType): t.TSTypeOperator {\n return validateNode({\n type: \"TSTypeOperator\",\n typeAnnotation,\n operator: null,\n });\n}\nexport { tsTypeOperator as tSTypeOperator };\nexport function tsIndexedAccessType(\n objectType: t.TSType,\n indexType: t.TSType,\n): t.TSIndexedAccessType {\n return validateNode({\n type: \"TSIndexedAccessType\",\n objectType,\n indexType,\n });\n}\nexport { tsIndexedAccessType as tSIndexedAccessType };\nexport function tsMappedType(\n typeParameter: t.TSTypeParameter,\n typeAnnotation: t.TSType | null = null,\n nameType: t.TSType | null = null,\n): t.TSMappedType {\n return validateNode({\n type: \"TSMappedType\",\n typeParameter,\n typeAnnotation,\n nameType,\n });\n}\nexport { tsMappedType as tSMappedType };\nexport function tsLiteralType(\n literal:\n | t.NumericLiteral\n | t.StringLiteral\n | t.BooleanLiteral\n | t.BigIntLiteral\n | t.TemplateLiteral\n | t.UnaryExpression,\n): t.TSLiteralType {\n return validateNode({\n type: \"TSLiteralType\",\n literal,\n });\n}\nexport { tsLiteralType as tSLiteralType };\nexport function tsExpressionWithTypeArguments(\n expression: t.TSEntityName,\n typeParameters: t.TSTypeParameterInstantiation | null = null,\n): t.TSExpressionWithTypeArguments {\n return validateNode({\n type: \"TSExpressionWithTypeArguments\",\n expression,\n typeParameters,\n });\n}\nexport { tsExpressionWithTypeArguments as tSExpressionWithTypeArguments };\nexport function tsInterfaceDeclaration(\n id: t.Identifier,\n typeParameters: t.TSTypeParameterDeclaration | null | undefined = null,\n _extends: Array | null | undefined = null,\n body: t.TSInterfaceBody,\n): t.TSInterfaceDeclaration {\n return validateNode({\n type: \"TSInterfaceDeclaration\",\n id,\n typeParameters,\n extends: _extends,\n body,\n });\n}\nexport { tsInterfaceDeclaration as tSInterfaceDeclaration };\nexport function tsInterfaceBody(\n body: Array,\n): t.TSInterfaceBody {\n return validateNode({\n type: \"TSInterfaceBody\",\n body,\n });\n}\nexport { tsInterfaceBody as tSInterfaceBody };\nexport function tsTypeAliasDeclaration(\n id: t.Identifier,\n typeParameters: t.TSTypeParameterDeclaration | null | undefined = null,\n typeAnnotation: t.TSType,\n): t.TSTypeAliasDeclaration {\n return validateNode({\n type: \"TSTypeAliasDeclaration\",\n id,\n typeParameters,\n typeAnnotation,\n });\n}\nexport { tsTypeAliasDeclaration as tSTypeAliasDeclaration };\nexport function tsInstantiationExpression(\n expression: t.Expression,\n typeParameters: t.TSTypeParameterInstantiation | null = null,\n): t.TSInstantiationExpression {\n return validateNode({\n type: \"TSInstantiationExpression\",\n expression,\n typeParameters,\n });\n}\nexport { tsInstantiationExpression as tSInstantiationExpression };\nexport function tsAsExpression(\n expression: t.Expression,\n typeAnnotation: t.TSType,\n): t.TSAsExpression {\n return validateNode({\n type: \"TSAsExpression\",\n expression,\n typeAnnotation,\n });\n}\nexport { tsAsExpression as tSAsExpression };\nexport function tsSatisfiesExpression(\n expression: t.Expression,\n typeAnnotation: t.TSType,\n): t.TSSatisfiesExpression {\n return validateNode({\n type: \"TSSatisfiesExpression\",\n expression,\n typeAnnotation,\n });\n}\nexport { tsSatisfiesExpression as tSSatisfiesExpression };\nexport function tsTypeAssertion(\n typeAnnotation: t.TSType,\n expression: t.Expression,\n): t.TSTypeAssertion {\n return validateNode({\n type: \"TSTypeAssertion\",\n typeAnnotation,\n expression,\n });\n}\nexport { tsTypeAssertion as tSTypeAssertion };\nexport function tsEnumDeclaration(\n id: t.Identifier,\n members: Array,\n): t.TSEnumDeclaration {\n return validateNode({\n type: \"TSEnumDeclaration\",\n id,\n members,\n });\n}\nexport { tsEnumDeclaration as tSEnumDeclaration };\nexport function tsEnumMember(\n id: t.Identifier | t.StringLiteral,\n initializer: t.Expression | null = null,\n): t.TSEnumMember {\n return validateNode({\n type: \"TSEnumMember\",\n id,\n initializer,\n });\n}\nexport { tsEnumMember as tSEnumMember };\nexport function tsModuleDeclaration(\n id: t.Identifier | t.StringLiteral,\n body: t.TSModuleBlock | t.TSModuleDeclaration,\n): t.TSModuleDeclaration {\n return validateNode({\n type: \"TSModuleDeclaration\",\n id,\n body,\n });\n}\nexport { tsModuleDeclaration as tSModuleDeclaration };\nexport function tsModuleBlock(body: Array): t.TSModuleBlock {\n return validateNode({\n type: \"TSModuleBlock\",\n body,\n });\n}\nexport { tsModuleBlock as tSModuleBlock };\nexport function tsImportType(\n argument: t.StringLiteral,\n qualifier: t.TSEntityName | null = null,\n typeParameters: t.TSTypeParameterInstantiation | null = null,\n): t.TSImportType {\n return validateNode({\n type: \"TSImportType\",\n argument,\n qualifier,\n typeParameters,\n });\n}\nexport { tsImportType as tSImportType };\nexport function tsImportEqualsDeclaration(\n id: t.Identifier,\n moduleReference: t.TSEntityName | t.TSExternalModuleReference,\n): t.TSImportEqualsDeclaration {\n return validateNode({\n type: \"TSImportEqualsDeclaration\",\n id,\n moduleReference,\n isExport: null,\n });\n}\nexport { tsImportEqualsDeclaration as tSImportEqualsDeclaration };\nexport function tsExternalModuleReference(\n expression: t.StringLiteral,\n): t.TSExternalModuleReference {\n return validateNode({\n type: \"TSExternalModuleReference\",\n expression,\n });\n}\nexport { tsExternalModuleReference as tSExternalModuleReference };\nexport function tsNonNullExpression(\n expression: t.Expression,\n): t.TSNonNullExpression {\n return validateNode({\n type: \"TSNonNullExpression\",\n expression,\n });\n}\nexport { tsNonNullExpression as tSNonNullExpression };\nexport function tsExportAssignment(\n expression: t.Expression,\n): t.TSExportAssignment {\n return validateNode({\n type: \"TSExportAssignment\",\n expression,\n });\n}\nexport { tsExportAssignment as tSExportAssignment };\nexport function tsNamespaceExportDeclaration(\n id: t.Identifier,\n): t.TSNamespaceExportDeclaration {\n return validateNode({\n type: \"TSNamespaceExportDeclaration\",\n id,\n });\n}\nexport { tsNamespaceExportDeclaration as tSNamespaceExportDeclaration };\nexport function tsTypeAnnotation(typeAnnotation: t.TSType): t.TSTypeAnnotation {\n return validateNode({\n type: \"TSTypeAnnotation\",\n typeAnnotation,\n });\n}\nexport { tsTypeAnnotation as tSTypeAnnotation };\nexport function tsTypeParameterInstantiation(\n params: Array,\n): t.TSTypeParameterInstantiation {\n return validateNode({\n type: \"TSTypeParameterInstantiation\",\n params,\n });\n}\nexport { tsTypeParameterInstantiation as tSTypeParameterInstantiation };\nexport function tsTypeParameterDeclaration(\n params: Array,\n): t.TSTypeParameterDeclaration {\n return validateNode({\n type: \"TSTypeParameterDeclaration\",\n params,\n });\n}\nexport { tsTypeParameterDeclaration as tSTypeParameterDeclaration };\nexport function tsTypeParameter(\n constraint: t.TSType | null | undefined = null,\n _default: t.TSType | null | undefined = null,\n name: string,\n): t.TSTypeParameter {\n return validateNode({\n type: \"TSTypeParameter\",\n constraint,\n default: _default,\n name,\n });\n}\nexport { tsTypeParameter as tSTypeParameter };\n/** @deprecated */\nfunction NumberLiteral(value: number) {\n deprecationWarning(\"NumberLiteral\", \"NumericLiteral\", \"The node type \");\n return numericLiteral(value);\n}\nexport { NumberLiteral as numberLiteral };\n/** @deprecated */\nfunction RegexLiteral(pattern: string, flags: string = \"\") {\n deprecationWarning(\"RegexLiteral\", \"RegExpLiteral\", \"The node type \");\n return regExpLiteral(pattern, flags);\n}\nexport { RegexLiteral as regexLiteral };\n/** @deprecated */\nfunction RestProperty(argument: t.LVal) {\n deprecationWarning(\"RestProperty\", \"RestElement\", \"The node type \");\n return restElement(argument);\n}\nexport { RestProperty as restProperty };\n/** @deprecated */\nfunction SpreadProperty(argument: t.Expression) {\n deprecationWarning(\"SpreadProperty\", \"SpreadElement\", \"The node type \");\n return spreadElement(argument);\n}\nexport { SpreadProperty as spreadProperty };\n","import { stringLiteral } from \"../../builders/generated/index.ts\";\nimport type * as t from \"../../index.ts\";\nimport { inherits } from \"../../index.ts\";\n\nexport default function cleanJSXElementLiteralChild(\n child: t.JSXText,\n args: Array,\n) {\n const lines = child.value.split(/\\r\\n|\\n|\\r/);\n\n let lastNonEmptyLine = 0;\n\n for (let i = 0; i < lines.length; i++) {\n if (/[^ \\t]/.exec(lines[i])) {\n lastNonEmptyLine = i;\n }\n }\n\n let str = \"\";\n\n for (let i = 0; i < lines.length; i++) {\n const line = lines[i];\n\n const isFirstLine = i === 0;\n const isLastLine = i === lines.length - 1;\n const isLastNonEmptyLine = i === lastNonEmptyLine;\n\n // replace rendered whitespace tabs with spaces\n let trimmedLine = line.replace(/\\t/g, \" \");\n\n // trim whitespace touching a newline\n if (!isFirstLine) {\n trimmedLine = trimmedLine.replace(/^ +/, \"\");\n }\n\n // trim whitespace touching an endline\n if (!isLastLine) {\n trimmedLine = trimmedLine.replace(/ +$/, \"\");\n }\n\n if (trimmedLine) {\n if (!isLastNonEmptyLine) {\n trimmedLine += \" \";\n }\n\n str += trimmedLine;\n }\n }\n\n if (str) args.push(inherits(stringLiteral(str), child));\n}\n","import {\n isJSXText,\n isJSXExpressionContainer,\n isJSXEmptyExpression,\n} from \"../../validators/generated/index.ts\";\nimport cleanJSXElementLiteralChild from \"../../utils/react/cleanJSXElementLiteralChild.ts\";\nimport type * as t from \"../../index.ts\";\n\ntype ReturnedChild =\n | t.JSXSpreadChild\n | t.JSXElement\n | t.JSXFragment\n | t.Expression;\n\nexport default function buildChildren(\n node: t.JSXElement | t.JSXFragment,\n): ReturnedChild[] {\n const elements = [];\n\n for (let i = 0; i < node.children.length; i++) {\n let child: any = node.children[i];\n\n if (isJSXText(child)) {\n cleanJSXElementLiteralChild(child, elements);\n continue;\n }\n\n if (isJSXExpressionContainer(child)) child = child.expression;\n if (isJSXEmptyExpression(child)) continue;\n\n elements.push(child);\n }\n\n return elements;\n}\n","import { VISITOR_KEYS } from \"../definitions/index.ts\";\nimport type * as t from \"../index.ts\";\n\nexport default function isNode(node: any): node is t.Node {\n return !!(node && VISITOR_KEYS[node.type]);\n}\n","import isNode from \"../validators/isNode.ts\";\nimport type * as t from \"../index.ts\";\n\nexport default function assertNode(node?: any): asserts node is t.Node {\n if (!isNode(node)) {\n const type = node?.type ?? JSON.stringify(node);\n throw new TypeError(`Not a valid node of type \"${type}\"`);\n }\n}\n","/*\n * This file is auto-generated! Do not modify it directly.\n * To re-generate run 'make build'\n */\nimport is from \"../../validators/is.ts\";\nimport type * as t from \"../../index.ts\";\nimport deprecationWarning from \"../../utils/deprecationWarning.ts\";\n\nfunction assert(type: string, node: any, opts?: any): void {\n if (!is(type, node, opts)) {\n throw new Error(\n `Expected type \"${type}\" with option ${JSON.stringify(opts)}, ` +\n `but instead got \"${node.type}\".`,\n );\n }\n}\n\nexport function assertArrayExpression(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.ArrayExpression {\n assert(\"ArrayExpression\", node, opts);\n}\nexport function assertAssignmentExpression(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.AssignmentExpression {\n assert(\"AssignmentExpression\", node, opts);\n}\nexport function assertBinaryExpression(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.BinaryExpression {\n assert(\"BinaryExpression\", node, opts);\n}\nexport function assertInterpreterDirective(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.InterpreterDirective {\n assert(\"InterpreterDirective\", node, opts);\n}\nexport function assertDirective(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.Directive {\n assert(\"Directive\", node, opts);\n}\nexport function assertDirectiveLiteral(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.DirectiveLiteral {\n assert(\"DirectiveLiteral\", node, opts);\n}\nexport function assertBlockStatement(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.BlockStatement {\n assert(\"BlockStatement\", node, opts);\n}\nexport function assertBreakStatement(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.BreakStatement {\n assert(\"BreakStatement\", node, opts);\n}\nexport function assertCallExpression(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.CallExpression {\n assert(\"CallExpression\", node, opts);\n}\nexport function assertCatchClause(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.CatchClause {\n assert(\"CatchClause\", node, opts);\n}\nexport function assertConditionalExpression(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.ConditionalExpression {\n assert(\"ConditionalExpression\", node, opts);\n}\nexport function assertContinueStatement(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.ContinueStatement {\n assert(\"ContinueStatement\", node, opts);\n}\nexport function assertDebuggerStatement(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.DebuggerStatement {\n assert(\"DebuggerStatement\", node, opts);\n}\nexport function assertDoWhileStatement(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.DoWhileStatement {\n assert(\"DoWhileStatement\", node, opts);\n}\nexport function assertEmptyStatement(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.EmptyStatement {\n assert(\"EmptyStatement\", node, opts);\n}\nexport function assertExpressionStatement(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.ExpressionStatement {\n assert(\"ExpressionStatement\", node, opts);\n}\nexport function assertFile(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.File {\n assert(\"File\", node, opts);\n}\nexport function assertForInStatement(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.ForInStatement {\n assert(\"ForInStatement\", node, opts);\n}\nexport function assertForStatement(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.ForStatement {\n assert(\"ForStatement\", node, opts);\n}\nexport function assertFunctionDeclaration(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.FunctionDeclaration {\n assert(\"FunctionDeclaration\", node, opts);\n}\nexport function assertFunctionExpression(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.FunctionExpression {\n assert(\"FunctionExpression\", node, opts);\n}\nexport function assertIdentifier(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.Identifier {\n assert(\"Identifier\", node, opts);\n}\nexport function assertIfStatement(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.IfStatement {\n assert(\"IfStatement\", node, opts);\n}\nexport function assertLabeledStatement(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.LabeledStatement {\n assert(\"LabeledStatement\", node, opts);\n}\nexport function assertStringLiteral(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.StringLiteral {\n assert(\"StringLiteral\", node, opts);\n}\nexport function assertNumericLiteral(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.NumericLiteral {\n assert(\"NumericLiteral\", node, opts);\n}\nexport function assertNullLiteral(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.NullLiteral {\n assert(\"NullLiteral\", node, opts);\n}\nexport function assertBooleanLiteral(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.BooleanLiteral {\n assert(\"BooleanLiteral\", node, opts);\n}\nexport function assertRegExpLiteral(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.RegExpLiteral {\n assert(\"RegExpLiteral\", node, opts);\n}\nexport function assertLogicalExpression(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.LogicalExpression {\n assert(\"LogicalExpression\", node, opts);\n}\nexport function assertMemberExpression(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.MemberExpression {\n assert(\"MemberExpression\", node, opts);\n}\nexport function assertNewExpression(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.NewExpression {\n assert(\"NewExpression\", node, opts);\n}\nexport function assertProgram(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.Program {\n assert(\"Program\", node, opts);\n}\nexport function assertObjectExpression(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.ObjectExpression {\n assert(\"ObjectExpression\", node, opts);\n}\nexport function assertObjectMethod(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.ObjectMethod {\n assert(\"ObjectMethod\", node, opts);\n}\nexport function assertObjectProperty(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.ObjectProperty {\n assert(\"ObjectProperty\", node, opts);\n}\nexport function assertRestElement(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.RestElement {\n assert(\"RestElement\", node, opts);\n}\nexport function assertReturnStatement(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.ReturnStatement {\n assert(\"ReturnStatement\", node, opts);\n}\nexport function assertSequenceExpression(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.SequenceExpression {\n assert(\"SequenceExpression\", node, opts);\n}\nexport function assertParenthesizedExpression(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.ParenthesizedExpression {\n assert(\"ParenthesizedExpression\", node, opts);\n}\nexport function assertSwitchCase(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.SwitchCase {\n assert(\"SwitchCase\", node, opts);\n}\nexport function assertSwitchStatement(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.SwitchStatement {\n assert(\"SwitchStatement\", node, opts);\n}\nexport function assertThisExpression(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.ThisExpression {\n assert(\"ThisExpression\", node, opts);\n}\nexport function assertThrowStatement(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.ThrowStatement {\n assert(\"ThrowStatement\", node, opts);\n}\nexport function assertTryStatement(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.TryStatement {\n assert(\"TryStatement\", node, opts);\n}\nexport function assertUnaryExpression(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.UnaryExpression {\n assert(\"UnaryExpression\", node, opts);\n}\nexport function assertUpdateExpression(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.UpdateExpression {\n assert(\"UpdateExpression\", node, opts);\n}\nexport function assertVariableDeclaration(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.VariableDeclaration {\n assert(\"VariableDeclaration\", node, opts);\n}\nexport function assertVariableDeclarator(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.VariableDeclarator {\n assert(\"VariableDeclarator\", node, opts);\n}\nexport function assertWhileStatement(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.WhileStatement {\n assert(\"WhileStatement\", node, opts);\n}\nexport function assertWithStatement(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.WithStatement {\n assert(\"WithStatement\", node, opts);\n}\nexport function assertAssignmentPattern(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.AssignmentPattern {\n assert(\"AssignmentPattern\", node, opts);\n}\nexport function assertArrayPattern(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.ArrayPattern {\n assert(\"ArrayPattern\", node, opts);\n}\nexport function assertArrowFunctionExpression(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.ArrowFunctionExpression {\n assert(\"ArrowFunctionExpression\", node, opts);\n}\nexport function assertClassBody(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.ClassBody {\n assert(\"ClassBody\", node, opts);\n}\nexport function assertClassExpression(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.ClassExpression {\n assert(\"ClassExpression\", node, opts);\n}\nexport function assertClassDeclaration(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.ClassDeclaration {\n assert(\"ClassDeclaration\", node, opts);\n}\nexport function assertExportAllDeclaration(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.ExportAllDeclaration {\n assert(\"ExportAllDeclaration\", node, opts);\n}\nexport function assertExportDefaultDeclaration(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.ExportDefaultDeclaration {\n assert(\"ExportDefaultDeclaration\", node, opts);\n}\nexport function assertExportNamedDeclaration(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.ExportNamedDeclaration {\n assert(\"ExportNamedDeclaration\", node, opts);\n}\nexport function assertExportSpecifier(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.ExportSpecifier {\n assert(\"ExportSpecifier\", node, opts);\n}\nexport function assertForOfStatement(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.ForOfStatement {\n assert(\"ForOfStatement\", node, opts);\n}\nexport function assertImportDeclaration(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.ImportDeclaration {\n assert(\"ImportDeclaration\", node, opts);\n}\nexport function assertImportDefaultSpecifier(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.ImportDefaultSpecifier {\n assert(\"ImportDefaultSpecifier\", node, opts);\n}\nexport function assertImportNamespaceSpecifier(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.ImportNamespaceSpecifier {\n assert(\"ImportNamespaceSpecifier\", node, opts);\n}\nexport function assertImportSpecifier(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.ImportSpecifier {\n assert(\"ImportSpecifier\", node, opts);\n}\nexport function assertImportExpression(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.ImportExpression {\n assert(\"ImportExpression\", node, opts);\n}\nexport function assertMetaProperty(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.MetaProperty {\n assert(\"MetaProperty\", node, opts);\n}\nexport function assertClassMethod(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.ClassMethod {\n assert(\"ClassMethod\", node, opts);\n}\nexport function assertObjectPattern(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.ObjectPattern {\n assert(\"ObjectPattern\", node, opts);\n}\nexport function assertSpreadElement(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.SpreadElement {\n assert(\"SpreadElement\", node, opts);\n}\nexport function assertSuper(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.Super {\n assert(\"Super\", node, opts);\n}\nexport function assertTaggedTemplateExpression(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.TaggedTemplateExpression {\n assert(\"TaggedTemplateExpression\", node, opts);\n}\nexport function assertTemplateElement(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.TemplateElement {\n assert(\"TemplateElement\", node, opts);\n}\nexport function assertTemplateLiteral(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.TemplateLiteral {\n assert(\"TemplateLiteral\", node, opts);\n}\nexport function assertYieldExpression(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.YieldExpression {\n assert(\"YieldExpression\", node, opts);\n}\nexport function assertAwaitExpression(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.AwaitExpression {\n assert(\"AwaitExpression\", node, opts);\n}\nexport function assertImport(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.Import {\n assert(\"Import\", node, opts);\n}\nexport function assertBigIntLiteral(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.BigIntLiteral {\n assert(\"BigIntLiteral\", node, opts);\n}\nexport function assertExportNamespaceSpecifier(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.ExportNamespaceSpecifier {\n assert(\"ExportNamespaceSpecifier\", node, opts);\n}\nexport function assertOptionalMemberExpression(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.OptionalMemberExpression {\n assert(\"OptionalMemberExpression\", node, opts);\n}\nexport function assertOptionalCallExpression(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.OptionalCallExpression {\n assert(\"OptionalCallExpression\", node, opts);\n}\nexport function assertClassProperty(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.ClassProperty {\n assert(\"ClassProperty\", node, opts);\n}\nexport function assertClassAccessorProperty(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.ClassAccessorProperty {\n assert(\"ClassAccessorProperty\", node, opts);\n}\nexport function assertClassPrivateProperty(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.ClassPrivateProperty {\n assert(\"ClassPrivateProperty\", node, opts);\n}\nexport function assertClassPrivateMethod(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.ClassPrivateMethod {\n assert(\"ClassPrivateMethod\", node, opts);\n}\nexport function assertPrivateName(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.PrivateName {\n assert(\"PrivateName\", node, opts);\n}\nexport function assertStaticBlock(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.StaticBlock {\n assert(\"StaticBlock\", node, opts);\n}\nexport function assertAnyTypeAnnotation(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.AnyTypeAnnotation {\n assert(\"AnyTypeAnnotation\", node, opts);\n}\nexport function assertArrayTypeAnnotation(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.ArrayTypeAnnotation {\n assert(\"ArrayTypeAnnotation\", node, opts);\n}\nexport function assertBooleanTypeAnnotation(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.BooleanTypeAnnotation {\n assert(\"BooleanTypeAnnotation\", node, opts);\n}\nexport function assertBooleanLiteralTypeAnnotation(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.BooleanLiteralTypeAnnotation {\n assert(\"BooleanLiteralTypeAnnotation\", node, opts);\n}\nexport function assertNullLiteralTypeAnnotation(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.NullLiteralTypeAnnotation {\n assert(\"NullLiteralTypeAnnotation\", node, opts);\n}\nexport function assertClassImplements(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.ClassImplements {\n assert(\"ClassImplements\", node, opts);\n}\nexport function assertDeclareClass(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.DeclareClass {\n assert(\"DeclareClass\", node, opts);\n}\nexport function assertDeclareFunction(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.DeclareFunction {\n assert(\"DeclareFunction\", node, opts);\n}\nexport function assertDeclareInterface(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.DeclareInterface {\n assert(\"DeclareInterface\", node, opts);\n}\nexport function assertDeclareModule(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.DeclareModule {\n assert(\"DeclareModule\", node, opts);\n}\nexport function assertDeclareModuleExports(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.DeclareModuleExports {\n assert(\"DeclareModuleExports\", node, opts);\n}\nexport function assertDeclareTypeAlias(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.DeclareTypeAlias {\n assert(\"DeclareTypeAlias\", node, opts);\n}\nexport function assertDeclareOpaqueType(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.DeclareOpaqueType {\n assert(\"DeclareOpaqueType\", node, opts);\n}\nexport function assertDeclareVariable(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.DeclareVariable {\n assert(\"DeclareVariable\", node, opts);\n}\nexport function assertDeclareExportDeclaration(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.DeclareExportDeclaration {\n assert(\"DeclareExportDeclaration\", node, opts);\n}\nexport function assertDeclareExportAllDeclaration(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.DeclareExportAllDeclaration {\n assert(\"DeclareExportAllDeclaration\", node, opts);\n}\nexport function assertDeclaredPredicate(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.DeclaredPredicate {\n assert(\"DeclaredPredicate\", node, opts);\n}\nexport function assertExistsTypeAnnotation(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.ExistsTypeAnnotation {\n assert(\"ExistsTypeAnnotation\", node, opts);\n}\nexport function assertFunctionTypeAnnotation(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.FunctionTypeAnnotation {\n assert(\"FunctionTypeAnnotation\", node, opts);\n}\nexport function assertFunctionTypeParam(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.FunctionTypeParam {\n assert(\"FunctionTypeParam\", node, opts);\n}\nexport function assertGenericTypeAnnotation(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.GenericTypeAnnotation {\n assert(\"GenericTypeAnnotation\", node, opts);\n}\nexport function assertInferredPredicate(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.InferredPredicate {\n assert(\"InferredPredicate\", node, opts);\n}\nexport function assertInterfaceExtends(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.InterfaceExtends {\n assert(\"InterfaceExtends\", node, opts);\n}\nexport function assertInterfaceDeclaration(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.InterfaceDeclaration {\n assert(\"InterfaceDeclaration\", node, opts);\n}\nexport function assertInterfaceTypeAnnotation(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.InterfaceTypeAnnotation {\n assert(\"InterfaceTypeAnnotation\", node, opts);\n}\nexport function assertIntersectionTypeAnnotation(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.IntersectionTypeAnnotation {\n assert(\"IntersectionTypeAnnotation\", node, opts);\n}\nexport function assertMixedTypeAnnotation(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.MixedTypeAnnotation {\n assert(\"MixedTypeAnnotation\", node, opts);\n}\nexport function assertEmptyTypeAnnotation(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.EmptyTypeAnnotation {\n assert(\"EmptyTypeAnnotation\", node, opts);\n}\nexport function assertNullableTypeAnnotation(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.NullableTypeAnnotation {\n assert(\"NullableTypeAnnotation\", node, opts);\n}\nexport function assertNumberLiteralTypeAnnotation(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.NumberLiteralTypeAnnotation {\n assert(\"NumberLiteralTypeAnnotation\", node, opts);\n}\nexport function assertNumberTypeAnnotation(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.NumberTypeAnnotation {\n assert(\"NumberTypeAnnotation\", node, opts);\n}\nexport function assertObjectTypeAnnotation(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.ObjectTypeAnnotation {\n assert(\"ObjectTypeAnnotation\", node, opts);\n}\nexport function assertObjectTypeInternalSlot(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.ObjectTypeInternalSlot {\n assert(\"ObjectTypeInternalSlot\", node, opts);\n}\nexport function assertObjectTypeCallProperty(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.ObjectTypeCallProperty {\n assert(\"ObjectTypeCallProperty\", node, opts);\n}\nexport function assertObjectTypeIndexer(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.ObjectTypeIndexer {\n assert(\"ObjectTypeIndexer\", node, opts);\n}\nexport function assertObjectTypeProperty(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.ObjectTypeProperty {\n assert(\"ObjectTypeProperty\", node, opts);\n}\nexport function assertObjectTypeSpreadProperty(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.ObjectTypeSpreadProperty {\n assert(\"ObjectTypeSpreadProperty\", node, opts);\n}\nexport function assertOpaqueType(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.OpaqueType {\n assert(\"OpaqueType\", node, opts);\n}\nexport function assertQualifiedTypeIdentifier(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.QualifiedTypeIdentifier {\n assert(\"QualifiedTypeIdentifier\", node, opts);\n}\nexport function assertStringLiteralTypeAnnotation(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.StringLiteralTypeAnnotation {\n assert(\"StringLiteralTypeAnnotation\", node, opts);\n}\nexport function assertStringTypeAnnotation(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.StringTypeAnnotation {\n assert(\"StringTypeAnnotation\", node, opts);\n}\nexport function assertSymbolTypeAnnotation(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.SymbolTypeAnnotation {\n assert(\"SymbolTypeAnnotation\", node, opts);\n}\nexport function assertThisTypeAnnotation(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.ThisTypeAnnotation {\n assert(\"ThisTypeAnnotation\", node, opts);\n}\nexport function assertTupleTypeAnnotation(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.TupleTypeAnnotation {\n assert(\"TupleTypeAnnotation\", node, opts);\n}\nexport function assertTypeofTypeAnnotation(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.TypeofTypeAnnotation {\n assert(\"TypeofTypeAnnotation\", node, opts);\n}\nexport function assertTypeAlias(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.TypeAlias {\n assert(\"TypeAlias\", node, opts);\n}\nexport function assertTypeAnnotation(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.TypeAnnotation {\n assert(\"TypeAnnotation\", node, opts);\n}\nexport function assertTypeCastExpression(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.TypeCastExpression {\n assert(\"TypeCastExpression\", node, opts);\n}\nexport function assertTypeParameter(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.TypeParameter {\n assert(\"TypeParameter\", node, opts);\n}\nexport function assertTypeParameterDeclaration(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.TypeParameterDeclaration {\n assert(\"TypeParameterDeclaration\", node, opts);\n}\nexport function assertTypeParameterInstantiation(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.TypeParameterInstantiation {\n assert(\"TypeParameterInstantiation\", node, opts);\n}\nexport function assertUnionTypeAnnotation(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.UnionTypeAnnotation {\n assert(\"UnionTypeAnnotation\", node, opts);\n}\nexport function assertVariance(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.Variance {\n assert(\"Variance\", node, opts);\n}\nexport function assertVoidTypeAnnotation(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.VoidTypeAnnotation {\n assert(\"VoidTypeAnnotation\", node, opts);\n}\nexport function assertEnumDeclaration(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.EnumDeclaration {\n assert(\"EnumDeclaration\", node, opts);\n}\nexport function assertEnumBooleanBody(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.EnumBooleanBody {\n assert(\"EnumBooleanBody\", node, opts);\n}\nexport function assertEnumNumberBody(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.EnumNumberBody {\n assert(\"EnumNumberBody\", node, opts);\n}\nexport function assertEnumStringBody(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.EnumStringBody {\n assert(\"EnumStringBody\", node, opts);\n}\nexport function assertEnumSymbolBody(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.EnumSymbolBody {\n assert(\"EnumSymbolBody\", node, opts);\n}\nexport function assertEnumBooleanMember(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.EnumBooleanMember {\n assert(\"EnumBooleanMember\", node, opts);\n}\nexport function assertEnumNumberMember(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.EnumNumberMember {\n assert(\"EnumNumberMember\", node, opts);\n}\nexport function assertEnumStringMember(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.EnumStringMember {\n assert(\"EnumStringMember\", node, opts);\n}\nexport function assertEnumDefaultedMember(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.EnumDefaultedMember {\n assert(\"EnumDefaultedMember\", node, opts);\n}\nexport function assertIndexedAccessType(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.IndexedAccessType {\n assert(\"IndexedAccessType\", node, opts);\n}\nexport function assertOptionalIndexedAccessType(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.OptionalIndexedAccessType {\n assert(\"OptionalIndexedAccessType\", node, opts);\n}\nexport function assertJSXAttribute(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.JSXAttribute {\n assert(\"JSXAttribute\", node, opts);\n}\nexport function assertJSXClosingElement(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.JSXClosingElement {\n assert(\"JSXClosingElement\", node, opts);\n}\nexport function assertJSXElement(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.JSXElement {\n assert(\"JSXElement\", node, opts);\n}\nexport function assertJSXEmptyExpression(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.JSXEmptyExpression {\n assert(\"JSXEmptyExpression\", node, opts);\n}\nexport function assertJSXExpressionContainer(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.JSXExpressionContainer {\n assert(\"JSXExpressionContainer\", node, opts);\n}\nexport function assertJSXSpreadChild(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.JSXSpreadChild {\n assert(\"JSXSpreadChild\", node, opts);\n}\nexport function assertJSXIdentifier(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.JSXIdentifier {\n assert(\"JSXIdentifier\", node, opts);\n}\nexport function assertJSXMemberExpression(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.JSXMemberExpression {\n assert(\"JSXMemberExpression\", node, opts);\n}\nexport function assertJSXNamespacedName(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.JSXNamespacedName {\n assert(\"JSXNamespacedName\", node, opts);\n}\nexport function assertJSXOpeningElement(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.JSXOpeningElement {\n assert(\"JSXOpeningElement\", node, opts);\n}\nexport function assertJSXSpreadAttribute(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.JSXSpreadAttribute {\n assert(\"JSXSpreadAttribute\", node, opts);\n}\nexport function assertJSXText(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.JSXText {\n assert(\"JSXText\", node, opts);\n}\nexport function assertJSXFragment(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.JSXFragment {\n assert(\"JSXFragment\", node, opts);\n}\nexport function assertJSXOpeningFragment(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.JSXOpeningFragment {\n assert(\"JSXOpeningFragment\", node, opts);\n}\nexport function assertJSXClosingFragment(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.JSXClosingFragment {\n assert(\"JSXClosingFragment\", node, opts);\n}\nexport function assertNoop(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.Noop {\n assert(\"Noop\", node, opts);\n}\nexport function assertPlaceholder(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.Placeholder {\n assert(\"Placeholder\", node, opts);\n}\nexport function assertV8IntrinsicIdentifier(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.V8IntrinsicIdentifier {\n assert(\"V8IntrinsicIdentifier\", node, opts);\n}\nexport function assertArgumentPlaceholder(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.ArgumentPlaceholder {\n assert(\"ArgumentPlaceholder\", node, opts);\n}\nexport function assertBindExpression(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.BindExpression {\n assert(\"BindExpression\", node, opts);\n}\nexport function assertImportAttribute(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.ImportAttribute {\n assert(\"ImportAttribute\", node, opts);\n}\nexport function assertDecorator(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.Decorator {\n assert(\"Decorator\", node, opts);\n}\nexport function assertDoExpression(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.DoExpression {\n assert(\"DoExpression\", node, opts);\n}\nexport function assertExportDefaultSpecifier(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.ExportDefaultSpecifier {\n assert(\"ExportDefaultSpecifier\", node, opts);\n}\nexport function assertRecordExpression(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.RecordExpression {\n assert(\"RecordExpression\", node, opts);\n}\nexport function assertTupleExpression(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.TupleExpression {\n assert(\"TupleExpression\", node, opts);\n}\nexport function assertDecimalLiteral(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.DecimalLiteral {\n assert(\"DecimalLiteral\", node, opts);\n}\nexport function assertModuleExpression(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.ModuleExpression {\n assert(\"ModuleExpression\", node, opts);\n}\nexport function assertTopicReference(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.TopicReference {\n assert(\"TopicReference\", node, opts);\n}\nexport function assertPipelineTopicExpression(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.PipelineTopicExpression {\n assert(\"PipelineTopicExpression\", node, opts);\n}\nexport function assertPipelineBareFunction(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.PipelineBareFunction {\n assert(\"PipelineBareFunction\", node, opts);\n}\nexport function assertPipelinePrimaryTopicReference(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.PipelinePrimaryTopicReference {\n assert(\"PipelinePrimaryTopicReference\", node, opts);\n}\nexport function assertTSParameterProperty(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.TSParameterProperty {\n assert(\"TSParameterProperty\", node, opts);\n}\nexport function assertTSDeclareFunction(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.TSDeclareFunction {\n assert(\"TSDeclareFunction\", node, opts);\n}\nexport function assertTSDeclareMethod(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.TSDeclareMethod {\n assert(\"TSDeclareMethod\", node, opts);\n}\nexport function assertTSQualifiedName(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.TSQualifiedName {\n assert(\"TSQualifiedName\", node, opts);\n}\nexport function assertTSCallSignatureDeclaration(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.TSCallSignatureDeclaration {\n assert(\"TSCallSignatureDeclaration\", node, opts);\n}\nexport function assertTSConstructSignatureDeclaration(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.TSConstructSignatureDeclaration {\n assert(\"TSConstructSignatureDeclaration\", node, opts);\n}\nexport function assertTSPropertySignature(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.TSPropertySignature {\n assert(\"TSPropertySignature\", node, opts);\n}\nexport function assertTSMethodSignature(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.TSMethodSignature {\n assert(\"TSMethodSignature\", node, opts);\n}\nexport function assertTSIndexSignature(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.TSIndexSignature {\n assert(\"TSIndexSignature\", node, opts);\n}\nexport function assertTSAnyKeyword(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.TSAnyKeyword {\n assert(\"TSAnyKeyword\", node, opts);\n}\nexport function assertTSBooleanKeyword(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.TSBooleanKeyword {\n assert(\"TSBooleanKeyword\", node, opts);\n}\nexport function assertTSBigIntKeyword(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.TSBigIntKeyword {\n assert(\"TSBigIntKeyword\", node, opts);\n}\nexport function assertTSIntrinsicKeyword(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.TSIntrinsicKeyword {\n assert(\"TSIntrinsicKeyword\", node, opts);\n}\nexport function assertTSNeverKeyword(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.TSNeverKeyword {\n assert(\"TSNeverKeyword\", node, opts);\n}\nexport function assertTSNullKeyword(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.TSNullKeyword {\n assert(\"TSNullKeyword\", node, opts);\n}\nexport function assertTSNumberKeyword(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.TSNumberKeyword {\n assert(\"TSNumberKeyword\", node, opts);\n}\nexport function assertTSObjectKeyword(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.TSObjectKeyword {\n assert(\"TSObjectKeyword\", node, opts);\n}\nexport function assertTSStringKeyword(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.TSStringKeyword {\n assert(\"TSStringKeyword\", node, opts);\n}\nexport function assertTSSymbolKeyword(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.TSSymbolKeyword {\n assert(\"TSSymbolKeyword\", node, opts);\n}\nexport function assertTSUndefinedKeyword(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.TSUndefinedKeyword {\n assert(\"TSUndefinedKeyword\", node, opts);\n}\nexport function assertTSUnknownKeyword(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.TSUnknownKeyword {\n assert(\"TSUnknownKeyword\", node, opts);\n}\nexport function assertTSVoidKeyword(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.TSVoidKeyword {\n assert(\"TSVoidKeyword\", node, opts);\n}\nexport function assertTSThisType(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.TSThisType {\n assert(\"TSThisType\", node, opts);\n}\nexport function assertTSFunctionType(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.TSFunctionType {\n assert(\"TSFunctionType\", node, opts);\n}\nexport function assertTSConstructorType(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.TSConstructorType {\n assert(\"TSConstructorType\", node, opts);\n}\nexport function assertTSTypeReference(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.TSTypeReference {\n assert(\"TSTypeReference\", node, opts);\n}\nexport function assertTSTypePredicate(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.TSTypePredicate {\n assert(\"TSTypePredicate\", node, opts);\n}\nexport function assertTSTypeQuery(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.TSTypeQuery {\n assert(\"TSTypeQuery\", node, opts);\n}\nexport function assertTSTypeLiteral(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.TSTypeLiteral {\n assert(\"TSTypeLiteral\", node, opts);\n}\nexport function assertTSArrayType(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.TSArrayType {\n assert(\"TSArrayType\", node, opts);\n}\nexport function assertTSTupleType(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.TSTupleType {\n assert(\"TSTupleType\", node, opts);\n}\nexport function assertTSOptionalType(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.TSOptionalType {\n assert(\"TSOptionalType\", node, opts);\n}\nexport function assertTSRestType(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.TSRestType {\n assert(\"TSRestType\", node, opts);\n}\nexport function assertTSNamedTupleMember(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.TSNamedTupleMember {\n assert(\"TSNamedTupleMember\", node, opts);\n}\nexport function assertTSUnionType(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.TSUnionType {\n assert(\"TSUnionType\", node, opts);\n}\nexport function assertTSIntersectionType(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.TSIntersectionType {\n assert(\"TSIntersectionType\", node, opts);\n}\nexport function assertTSConditionalType(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.TSConditionalType {\n assert(\"TSConditionalType\", node, opts);\n}\nexport function assertTSInferType(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.TSInferType {\n assert(\"TSInferType\", node, opts);\n}\nexport function assertTSParenthesizedType(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.TSParenthesizedType {\n assert(\"TSParenthesizedType\", node, opts);\n}\nexport function assertTSTypeOperator(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.TSTypeOperator {\n assert(\"TSTypeOperator\", node, opts);\n}\nexport function assertTSIndexedAccessType(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.TSIndexedAccessType {\n assert(\"TSIndexedAccessType\", node, opts);\n}\nexport function assertTSMappedType(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.TSMappedType {\n assert(\"TSMappedType\", node, opts);\n}\nexport function assertTSLiteralType(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.TSLiteralType {\n assert(\"TSLiteralType\", node, opts);\n}\nexport function assertTSExpressionWithTypeArguments(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.TSExpressionWithTypeArguments {\n assert(\"TSExpressionWithTypeArguments\", node, opts);\n}\nexport function assertTSInterfaceDeclaration(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.TSInterfaceDeclaration {\n assert(\"TSInterfaceDeclaration\", node, opts);\n}\nexport function assertTSInterfaceBody(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.TSInterfaceBody {\n assert(\"TSInterfaceBody\", node, opts);\n}\nexport function assertTSTypeAliasDeclaration(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.TSTypeAliasDeclaration {\n assert(\"TSTypeAliasDeclaration\", node, opts);\n}\nexport function assertTSInstantiationExpression(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.TSInstantiationExpression {\n assert(\"TSInstantiationExpression\", node, opts);\n}\nexport function assertTSAsExpression(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.TSAsExpression {\n assert(\"TSAsExpression\", node, opts);\n}\nexport function assertTSSatisfiesExpression(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.TSSatisfiesExpression {\n assert(\"TSSatisfiesExpression\", node, opts);\n}\nexport function assertTSTypeAssertion(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.TSTypeAssertion {\n assert(\"TSTypeAssertion\", node, opts);\n}\nexport function assertTSEnumDeclaration(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.TSEnumDeclaration {\n assert(\"TSEnumDeclaration\", node, opts);\n}\nexport function assertTSEnumMember(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.TSEnumMember {\n assert(\"TSEnumMember\", node, opts);\n}\nexport function assertTSModuleDeclaration(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.TSModuleDeclaration {\n assert(\"TSModuleDeclaration\", node, opts);\n}\nexport function assertTSModuleBlock(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.TSModuleBlock {\n assert(\"TSModuleBlock\", node, opts);\n}\nexport function assertTSImportType(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.TSImportType {\n assert(\"TSImportType\", node, opts);\n}\nexport function assertTSImportEqualsDeclaration(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.TSImportEqualsDeclaration {\n assert(\"TSImportEqualsDeclaration\", node, opts);\n}\nexport function assertTSExternalModuleReference(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.TSExternalModuleReference {\n assert(\"TSExternalModuleReference\", node, opts);\n}\nexport function assertTSNonNullExpression(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.TSNonNullExpression {\n assert(\"TSNonNullExpression\", node, opts);\n}\nexport function assertTSExportAssignment(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.TSExportAssignment {\n assert(\"TSExportAssignment\", node, opts);\n}\nexport function assertTSNamespaceExportDeclaration(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.TSNamespaceExportDeclaration {\n assert(\"TSNamespaceExportDeclaration\", node, opts);\n}\nexport function assertTSTypeAnnotation(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.TSTypeAnnotation {\n assert(\"TSTypeAnnotation\", node, opts);\n}\nexport function assertTSTypeParameterInstantiation(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.TSTypeParameterInstantiation {\n assert(\"TSTypeParameterInstantiation\", node, opts);\n}\nexport function assertTSTypeParameterDeclaration(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.TSTypeParameterDeclaration {\n assert(\"TSTypeParameterDeclaration\", node, opts);\n}\nexport function assertTSTypeParameter(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.TSTypeParameter {\n assert(\"TSTypeParameter\", node, opts);\n}\nexport function assertStandardized(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.Standardized {\n assert(\"Standardized\", node, opts);\n}\nexport function assertExpression(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.Expression {\n assert(\"Expression\", node, opts);\n}\nexport function assertBinary(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.Binary {\n assert(\"Binary\", node, opts);\n}\nexport function assertScopable(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.Scopable {\n assert(\"Scopable\", node, opts);\n}\nexport function assertBlockParent(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.BlockParent {\n assert(\"BlockParent\", node, opts);\n}\nexport function assertBlock(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.Block {\n assert(\"Block\", node, opts);\n}\nexport function assertStatement(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.Statement {\n assert(\"Statement\", node, opts);\n}\nexport function assertTerminatorless(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.Terminatorless {\n assert(\"Terminatorless\", node, opts);\n}\nexport function assertCompletionStatement(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.CompletionStatement {\n assert(\"CompletionStatement\", node, opts);\n}\nexport function assertConditional(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.Conditional {\n assert(\"Conditional\", node, opts);\n}\nexport function assertLoop(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.Loop {\n assert(\"Loop\", node, opts);\n}\nexport function assertWhile(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.While {\n assert(\"While\", node, opts);\n}\nexport function assertExpressionWrapper(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.ExpressionWrapper {\n assert(\"ExpressionWrapper\", node, opts);\n}\nexport function assertFor(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.For {\n assert(\"For\", node, opts);\n}\nexport function assertForXStatement(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.ForXStatement {\n assert(\"ForXStatement\", node, opts);\n}\nexport function assertFunction(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.Function {\n assert(\"Function\", node, opts);\n}\nexport function assertFunctionParent(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.FunctionParent {\n assert(\"FunctionParent\", node, opts);\n}\nexport function assertPureish(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.Pureish {\n assert(\"Pureish\", node, opts);\n}\nexport function assertDeclaration(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.Declaration {\n assert(\"Declaration\", node, opts);\n}\nexport function assertPatternLike(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.PatternLike {\n assert(\"PatternLike\", node, opts);\n}\nexport function assertLVal(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.LVal {\n assert(\"LVal\", node, opts);\n}\nexport function assertTSEntityName(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.TSEntityName {\n assert(\"TSEntityName\", node, opts);\n}\nexport function assertLiteral(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.Literal {\n assert(\"Literal\", node, opts);\n}\nexport function assertImmutable(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.Immutable {\n assert(\"Immutable\", node, opts);\n}\nexport function assertUserWhitespacable(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.UserWhitespacable {\n assert(\"UserWhitespacable\", node, opts);\n}\nexport function assertMethod(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.Method {\n assert(\"Method\", node, opts);\n}\nexport function assertObjectMember(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.ObjectMember {\n assert(\"ObjectMember\", node, opts);\n}\nexport function assertProperty(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.Property {\n assert(\"Property\", node, opts);\n}\nexport function assertUnaryLike(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.UnaryLike {\n assert(\"UnaryLike\", node, opts);\n}\nexport function assertPattern(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.Pattern {\n assert(\"Pattern\", node, opts);\n}\nexport function assertClass(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.Class {\n assert(\"Class\", node, opts);\n}\nexport function assertImportOrExportDeclaration(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.ImportOrExportDeclaration {\n assert(\"ImportOrExportDeclaration\", node, opts);\n}\nexport function assertExportDeclaration(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.ExportDeclaration {\n assert(\"ExportDeclaration\", node, opts);\n}\nexport function assertModuleSpecifier(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.ModuleSpecifier {\n assert(\"ModuleSpecifier\", node, opts);\n}\nexport function assertAccessor(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.Accessor {\n assert(\"Accessor\", node, opts);\n}\nexport function assertPrivate(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.Private {\n assert(\"Private\", node, opts);\n}\nexport function assertFlow(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.Flow {\n assert(\"Flow\", node, opts);\n}\nexport function assertFlowType(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.FlowType {\n assert(\"FlowType\", node, opts);\n}\nexport function assertFlowBaseAnnotation(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.FlowBaseAnnotation {\n assert(\"FlowBaseAnnotation\", node, opts);\n}\nexport function assertFlowDeclaration(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.FlowDeclaration {\n assert(\"FlowDeclaration\", node, opts);\n}\nexport function assertFlowPredicate(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.FlowPredicate {\n assert(\"FlowPredicate\", node, opts);\n}\nexport function assertEnumBody(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.EnumBody {\n assert(\"EnumBody\", node, opts);\n}\nexport function assertEnumMember(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.EnumMember {\n assert(\"EnumMember\", node, opts);\n}\nexport function assertJSX(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.JSX {\n assert(\"JSX\", node, opts);\n}\nexport function assertMiscellaneous(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.Miscellaneous {\n assert(\"Miscellaneous\", node, opts);\n}\nexport function assertTypeScript(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.TypeScript {\n assert(\"TypeScript\", node, opts);\n}\nexport function assertTSTypeElement(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.TSTypeElement {\n assert(\"TSTypeElement\", node, opts);\n}\nexport function assertTSType(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.TSType {\n assert(\"TSType\", node, opts);\n}\nexport function assertTSBaseType(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.TSBaseType {\n assert(\"TSBaseType\", node, opts);\n}\nexport function assertNumberLiteral(node: any, opts: any): void {\n deprecationWarning(\"assertNumberLiteral\", \"assertNumericLiteral\");\n assert(\"NumberLiteral\", node, opts);\n}\nexport function assertRegexLiteral(node: any, opts: any): void {\n deprecationWarning(\"assertRegexLiteral\", \"assertRegExpLiteral\");\n assert(\"RegexLiteral\", node, opts);\n}\nexport function assertRestProperty(node: any, opts: any): void {\n deprecationWarning(\"assertRestProperty\", \"assertRestElement\");\n assert(\"RestProperty\", node, opts);\n}\nexport function assertSpreadProperty(node: any, opts: any): void {\n deprecationWarning(\"assertSpreadProperty\", \"assertSpreadElement\");\n assert(\"SpreadProperty\", node, opts);\n}\nexport function assertModuleDeclaration(node: any, opts: any): void {\n deprecationWarning(\n \"assertModuleDeclaration\",\n \"assertImportOrExportDeclaration\",\n );\n assert(\"ModuleDeclaration\", node, opts);\n}\n","import {\n anyTypeAnnotation,\n stringTypeAnnotation,\n numberTypeAnnotation,\n voidTypeAnnotation,\n booleanTypeAnnotation,\n genericTypeAnnotation,\n identifier,\n} from \"../generated/index.ts\";\nimport type * as t from \"../../index.ts\";\n\nexport default createTypeAnnotationBasedOnTypeof as {\n (type: \"string\"): t.StringTypeAnnotation;\n (type: \"number\"): t.NumberTypeAnnotation;\n (type: \"undefined\"): t.VoidTypeAnnotation;\n (type: \"boolean\"): t.BooleanTypeAnnotation;\n (type: \"function\"): t.GenericTypeAnnotation;\n (type: \"object\"): t.GenericTypeAnnotation;\n (type: \"symbol\"): t.GenericTypeAnnotation;\n (type: \"bigint\"): t.AnyTypeAnnotation;\n};\n\n/**\n * Create a type annotation based on typeof expression.\n */\nfunction createTypeAnnotationBasedOnTypeof(type: string): t.FlowType {\n switch (type) {\n case \"string\":\n return stringTypeAnnotation();\n case \"number\":\n return numberTypeAnnotation();\n case \"undefined\":\n return voidTypeAnnotation();\n case \"boolean\":\n return booleanTypeAnnotation();\n case \"function\":\n return genericTypeAnnotation(identifier(\"Function\"));\n case \"object\":\n return genericTypeAnnotation(identifier(\"Object\"));\n case \"symbol\":\n return genericTypeAnnotation(identifier(\"Symbol\"));\n case \"bigint\":\n // todo: use BigInt annotation when Flow supports BigInt\n // https://github.com/facebook/flow/issues/6639\n return anyTypeAnnotation();\n }\n throw new Error(\"Invalid typeof value: \" + type);\n}\n","import {\n isAnyTypeAnnotation,\n isGenericTypeAnnotation,\n isUnionTypeAnnotation,\n isFlowBaseAnnotation,\n isIdentifier,\n} from \"../../validators/generated/index.ts\";\nimport type * as t from \"../../index.ts\";\n\nfunction getQualifiedName(node: t.GenericTypeAnnotation[\"id\"]): string {\n return isIdentifier(node)\n ? node.name\n : `${node.id.name}.${getQualifiedName(node.qualification)}`;\n}\n\n/**\n * Dedupe type annotations.\n */\nexport default function removeTypeDuplicates(\n nodesIn: ReadonlyArray,\n): t.FlowType[] {\n const nodes = Array.from(nodesIn);\n\n const generics = new Map();\n const bases = new Map();\n\n // store union type groups to circular references\n const typeGroups = new Set();\n\n const types: t.FlowType[] = [];\n\n for (let i = 0; i < nodes.length; i++) {\n const node = nodes[i];\n if (!node) continue;\n\n // detect duplicates\n if (types.includes(node)) {\n continue;\n }\n\n // this type matches anything\n if (isAnyTypeAnnotation(node)) {\n return [node];\n }\n\n if (isFlowBaseAnnotation(node)) {\n bases.set(node.type, node);\n continue;\n }\n\n if (isUnionTypeAnnotation(node)) {\n if (!typeGroups.has(node.types)) {\n nodes.push(...node.types);\n typeGroups.add(node.types);\n }\n continue;\n }\n\n // find a matching generic type and merge and deduplicate the type parameters\n if (isGenericTypeAnnotation(node)) {\n const name = getQualifiedName(node.id);\n\n if (generics.has(name)) {\n let existing: t.Flow = generics.get(name);\n if (existing.typeParameters) {\n if (node.typeParameters) {\n existing.typeParameters.params.push(...node.typeParameters.params);\n existing.typeParameters.params = removeTypeDuplicates(\n existing.typeParameters.params,\n );\n }\n } else {\n existing = node.typeParameters;\n }\n } else {\n generics.set(name, node);\n }\n\n continue;\n }\n\n types.push(node);\n }\n\n // add back in bases\n for (const [, baseType] of bases) {\n types.push(baseType);\n }\n\n // add back in generics\n for (const [, genericName] of generics) {\n types.push(genericName);\n }\n\n return types;\n}\n","import { unionTypeAnnotation } from \"../generated/index.ts\";\nimport removeTypeDuplicates from \"../../modifications/flow/removeTypeDuplicates.ts\";\nimport type * as t from \"../../index.ts\";\n\n/**\n * Takes an array of `types` and flattens them, removing duplicates and\n * returns a `UnionTypeAnnotation` node containing them.\n */\nexport default function createFlowUnionType(\n types: [T] | Array,\n): T | t.UnionTypeAnnotation {\n const flattened = removeTypeDuplicates(types);\n\n if (flattened.length === 1) {\n return flattened[0] as T;\n } else {\n return unionTypeAnnotation(flattened);\n }\n}\n","import {\n isIdentifier,\n isTSAnyKeyword,\n isTSTypeReference,\n isTSUnionType,\n isTSBaseType,\n} from \"../../validators/generated/index.ts\";\nimport type * as t from \"../../index.ts\";\n\nfunction getQualifiedName(node: t.TSTypeReference[\"typeName\"]): string {\n return isIdentifier(node)\n ? node.name\n : `${node.right.name}.${getQualifiedName(node.left)}`;\n}\n\n/**\n * Dedupe type annotations.\n */\nexport default function removeTypeDuplicates(\n nodesIn: ReadonlyArray,\n): Array {\n const nodes = Array.from(nodesIn);\n\n const generics = new Map();\n const bases = new Map();\n\n // store union type groups to circular references\n const typeGroups = new Set();\n\n const types: t.TSType[] = [];\n\n for (let i = 0; i < nodes.length; i++) {\n const node = nodes[i];\n if (!node) continue;\n\n // detect duplicates\n if (types.includes(node)) {\n continue;\n }\n\n // this type matches anything\n if (isTSAnyKeyword(node)) {\n return [node];\n }\n\n // Analogue of FlowBaseAnnotation\n if (isTSBaseType(node)) {\n bases.set(node.type, node);\n continue;\n }\n\n if (isTSUnionType(node)) {\n if (!typeGroups.has(node.types)) {\n nodes.push(...node.types);\n typeGroups.add(node.types);\n }\n continue;\n }\n\n // todo: support merging tuples: number[]\n if (isTSTypeReference(node) && node.typeParameters) {\n const name = getQualifiedName(node.typeName);\n\n if (generics.has(name)) {\n let existing: t.TypeScript = generics.get(name);\n if (existing.typeParameters) {\n if (node.typeParameters) {\n existing.typeParameters.params.push(...node.typeParameters.params);\n existing.typeParameters.params = removeTypeDuplicates(\n existing.typeParameters.params,\n );\n }\n } else {\n existing = node.typeParameters;\n }\n } else {\n generics.set(name, node);\n }\n\n continue;\n }\n\n types.push(node);\n }\n\n // add back in bases\n for (const [, baseType] of bases) {\n types.push(baseType);\n }\n\n // add back in generics\n for (const [, genericName] of generics) {\n types.push(genericName);\n }\n\n return types;\n}\n","import { tsUnionType } from \"../generated/index.ts\";\nimport removeTypeDuplicates from \"../../modifications/typescript/removeTypeDuplicates.ts\";\nimport { isTSTypeAnnotation } from \"../../validators/generated/index.ts\";\nimport type * as t from \"../../index.ts\";\n\n/**\n * Takes an array of `types` and flattens them, removing duplicates and\n * returns a `UnionTypeAnnotation` node containing them.\n */\nexport default function createTSUnionType(\n typeAnnotations: Array,\n): t.TSType {\n const types = typeAnnotations.map(type => {\n return isTSTypeAnnotation(type) ? type.typeAnnotation : type;\n });\n const flattened = removeTypeDuplicates(types);\n\n if (flattened.length === 1) {\n return flattened[0];\n } else {\n return tsUnionType(flattened);\n }\n}\n","import { numericLiteral, unaryExpression } from \"./generated/index.ts\";\n\nexport function buildUndefinedNode() {\n return unaryExpression(\"void\", numericLiteral(0), true);\n}\n","import { NODE_FIELDS } from \"../definitions/index.ts\";\nimport type * as t from \"../index.ts\";\nimport { isFile, isIdentifier } from \"../validators/generated/index.ts\";\n\nconst { hasOwn } = process.env.BABEL_8_BREAKING\n ? Object\n : { hasOwn: Function.call.bind(Object.prototype.hasOwnProperty) };\n\ntype CommentCache = Map;\n\n// This function will never be called for comments, only for real nodes.\nfunction cloneIfNode(\n obj: t.Node | undefined | null,\n deep: boolean,\n withoutLoc: boolean,\n commentsCache: CommentCache,\n) {\n if (obj && typeof obj.type === \"string\") {\n return cloneNodeInternal(obj, deep, withoutLoc, commentsCache);\n }\n\n return obj;\n}\n\nfunction cloneIfNodeOrArray(\n obj: t.Node | undefined | null | (t.Node | undefined | null)[],\n deep: boolean,\n withoutLoc: boolean,\n commentsCache: CommentCache,\n) {\n if (Array.isArray(obj)) {\n return obj.map(node => cloneIfNode(node, deep, withoutLoc, commentsCache));\n }\n return cloneIfNode(obj, deep, withoutLoc, commentsCache);\n}\n\n/**\n * Create a clone of a `node` including only properties belonging to the node.\n * If the second parameter is `false`, cloneNode performs a shallow clone.\n * If the third parameter is true, the cloned nodes exclude location properties.\n */\nexport default function cloneNode(\n node: T,\n deep: boolean = true,\n withoutLoc: boolean = false,\n): T {\n return cloneNodeInternal(node, deep, withoutLoc, new Map());\n}\n\nfunction cloneNodeInternal(\n node: T,\n deep: boolean = true,\n withoutLoc: boolean = false,\n commentsCache: CommentCache,\n): T {\n if (!node) return node;\n\n const { type } = node;\n const newNode: any = { type: node.type };\n\n // Special-case identifiers since they are the most cloned nodes.\n if (isIdentifier(node)) {\n newNode.name = node.name;\n\n if (hasOwn(node, \"optional\") && typeof node.optional === \"boolean\") {\n newNode.optional = node.optional;\n }\n\n if (hasOwn(node, \"typeAnnotation\")) {\n newNode.typeAnnotation = deep\n ? cloneIfNodeOrArray(\n node.typeAnnotation,\n true,\n withoutLoc,\n commentsCache,\n )\n : node.typeAnnotation;\n }\n\n if (hasOwn(node, \"decorators\")) {\n newNode.decorators = deep\n ? cloneIfNodeOrArray(node.decorators, true, withoutLoc, commentsCache)\n : node.decorators;\n }\n } else if (!hasOwn(NODE_FIELDS, type)) {\n throw new Error(`Unknown node type: \"${type}\"`);\n } else {\n for (const field of Object.keys(NODE_FIELDS[type])) {\n if (hasOwn(node, field)) {\n if (deep) {\n newNode[field] =\n isFile(node) && field === \"comments\"\n ? maybeCloneComments(\n node.comments,\n deep,\n withoutLoc,\n commentsCache,\n )\n : cloneIfNodeOrArray(\n // @ts-expect-error node[field] has been guarded by has check\n node[field],\n true,\n withoutLoc,\n commentsCache,\n );\n } else {\n newNode[field] =\n // @ts-expect-error node[field] has been guarded by has check\n node[field];\n }\n }\n }\n }\n\n if (hasOwn(node, \"loc\")) {\n if (withoutLoc) {\n newNode.loc = null;\n } else {\n newNode.loc = node.loc;\n }\n }\n if (hasOwn(node, \"leadingComments\")) {\n newNode.leadingComments = maybeCloneComments(\n node.leadingComments,\n deep,\n withoutLoc,\n commentsCache,\n );\n }\n if (hasOwn(node, \"innerComments\")) {\n newNode.innerComments = maybeCloneComments(\n node.innerComments,\n deep,\n withoutLoc,\n commentsCache,\n );\n }\n if (hasOwn(node, \"trailingComments\")) {\n newNode.trailingComments = maybeCloneComments(\n node.trailingComments,\n deep,\n withoutLoc,\n commentsCache,\n );\n }\n if (hasOwn(node, \"extra\")) {\n newNode.extra = {\n ...node.extra,\n };\n }\n\n return newNode;\n}\n\nfunction maybeCloneComments(\n comments: ReadonlyArray | null,\n deep: boolean,\n withoutLoc: boolean,\n commentsCache: Map,\n): ReadonlyArray | null {\n if (!comments || !deep) {\n return comments;\n }\n return comments.map(comment => {\n const cache = commentsCache.get(comment);\n if (cache) return cache;\n\n const { type, value, loc } = comment;\n\n const ret = { type, value, loc } as T;\n if (withoutLoc) {\n ret.loc = null;\n }\n\n commentsCache.set(comment, ret);\n\n return ret;\n });\n}\n","import cloneNode from \"./cloneNode.ts\";\nimport type * as t from \"../index.ts\";\n\n/**\n * Create a shallow clone of a `node`, including only\n * properties belonging to the node.\n * @deprecated Use t.cloneNode instead.\n */\nexport default function clone(node: T): T {\n return cloneNode(node, /* deep */ false);\n}\n","import cloneNode from \"./cloneNode.ts\";\nimport type * as t from \"../index.ts\";\n\n/**\n * Create a deep clone of a `node` and all of it's child nodes\n * including only properties belonging to the node.\n * @deprecated Use t.cloneNode instead.\n */\nexport default function cloneDeep(node: T): T {\n return cloneNode(node);\n}\n","import cloneNode from \"./cloneNode.ts\";\nimport type * as t from \"../index.ts\";\n/**\n * Create a deep clone of a `node` and all of it's child nodes\n * including only properties belonging to the node.\n * excluding `_private` and location properties.\n */\nexport default function cloneDeepWithoutLoc(node: T): T {\n return cloneNode(node, /* deep */ true, /* withoutLoc */ true);\n}\n","import cloneNode from \"./cloneNode.ts\";\nimport type * as t from \"../index.ts\";\n\n/**\n * Create a shallow clone of a `node` excluding `_private` and location properties.\n */\nexport default function cloneWithoutLoc(node: T): T {\n return cloneNode(node, /* deep */ false, /* withoutLoc */ true);\n}\n","import type * as t from \"../index.ts\";\n\n/**\n * Add comments of certain type to a node.\n */\nexport default function addComments(\n node: T,\n type: t.CommentTypeShorthand,\n comments: Array,\n): T {\n if (!comments || !node) return node;\n\n const key = `${type}Comments` as const;\n\n if (node[key]) {\n if (type === \"leading\") {\n node[key] = comments.concat(node[key]);\n } else {\n node[key].push(...comments);\n }\n } else {\n node[key] = comments;\n }\n\n return node;\n}\n","import addComments from \"./addComments.ts\";\nimport type * as t from \"../index.ts\";\n\n/**\n * Add comment of certain type to a node.\n */\nexport default function addComment(\n node: T,\n type: t.CommentTypeShorthand,\n content: string,\n line?: boolean,\n): T {\n return addComments(node, type, [\n {\n type: line ? \"CommentLine\" : \"CommentBlock\",\n value: content,\n } as t.Comment,\n ]);\n}\n","import type * as t from \"../index.ts\";\n\nexport default function inherit<\n C extends t.Node | undefined,\n P extends t.Node | undefined,\n>(key: keyof C & keyof P, child: C, parent: P): void {\n if (child && parent) {\n // @ts-expect-error Could further refine key definitions\n child[key] = Array.from(\n new Set([].concat(child[key], parent[key]).filter(Boolean)),\n );\n }\n}\n","import inherit from \"../utils/inherit.ts\";\nimport type * as t from \"../index.ts\";\n\nexport default function inheritInnerComments(\n child: t.Node,\n parent: t.Node,\n): void {\n inherit(\"innerComments\", child, parent);\n}\n","import inherit from \"../utils/inherit.ts\";\nimport type * as t from \"../index.ts\";\n\nexport default function inheritLeadingComments(\n child: t.Node,\n parent: t.Node,\n): void {\n inherit(\"leadingComments\", child, parent);\n}\n","import inherit from \"../utils/inherit.ts\";\nimport type * as t from \"../index.ts\";\n\nexport default function inheritTrailingComments(\n child: t.Node,\n parent: t.Node,\n): void {\n inherit(\"trailingComments\", child, parent);\n}\n","import inheritTrailingComments from \"./inheritTrailingComments.ts\";\nimport inheritLeadingComments from \"./inheritLeadingComments.ts\";\nimport inheritInnerComments from \"./inheritInnerComments.ts\";\nimport type * as t from \"../index.ts\";\n\n/**\n * Inherit all unique comments from `parent` node to `child` node.\n */\nexport default function inheritsComments(\n child: T,\n parent: t.Node,\n): T {\n inheritTrailingComments(child, parent);\n inheritLeadingComments(child, parent);\n inheritInnerComments(child, parent);\n\n return child;\n}\n","import { COMMENT_KEYS } from \"../constants/index.ts\";\nimport type * as t from \"../index.ts\";\n\n/**\n * Remove comment properties from a node.\n */\nexport default function removeComments(node: T): T {\n COMMENT_KEYS.forEach(key => {\n node[key] = null;\n });\n\n return node;\n}\n","/*\n * This file is auto-generated! Do not modify it directly.\n * To re-generate run 'make build'\n */\nimport { FLIPPED_ALIAS_KEYS } from \"../../definitions/index.ts\";\n\nexport const STANDARDIZED_TYPES = FLIPPED_ALIAS_KEYS[\"Standardized\"];\nexport const EXPRESSION_TYPES = FLIPPED_ALIAS_KEYS[\"Expression\"];\nexport const BINARY_TYPES = FLIPPED_ALIAS_KEYS[\"Binary\"];\nexport const SCOPABLE_TYPES = FLIPPED_ALIAS_KEYS[\"Scopable\"];\nexport const BLOCKPARENT_TYPES = FLIPPED_ALIAS_KEYS[\"BlockParent\"];\nexport const BLOCK_TYPES = FLIPPED_ALIAS_KEYS[\"Block\"];\nexport const STATEMENT_TYPES = FLIPPED_ALIAS_KEYS[\"Statement\"];\nexport const TERMINATORLESS_TYPES = FLIPPED_ALIAS_KEYS[\"Terminatorless\"];\nexport const COMPLETIONSTATEMENT_TYPES =\n FLIPPED_ALIAS_KEYS[\"CompletionStatement\"];\nexport const CONDITIONAL_TYPES = FLIPPED_ALIAS_KEYS[\"Conditional\"];\nexport const LOOP_TYPES = FLIPPED_ALIAS_KEYS[\"Loop\"];\nexport const WHILE_TYPES = FLIPPED_ALIAS_KEYS[\"While\"];\nexport const EXPRESSIONWRAPPER_TYPES = FLIPPED_ALIAS_KEYS[\"ExpressionWrapper\"];\nexport const FOR_TYPES = FLIPPED_ALIAS_KEYS[\"For\"];\nexport const FORXSTATEMENT_TYPES = FLIPPED_ALIAS_KEYS[\"ForXStatement\"];\nexport const FUNCTION_TYPES = FLIPPED_ALIAS_KEYS[\"Function\"];\nexport const FUNCTIONPARENT_TYPES = FLIPPED_ALIAS_KEYS[\"FunctionParent\"];\nexport const PUREISH_TYPES = FLIPPED_ALIAS_KEYS[\"Pureish\"];\nexport const DECLARATION_TYPES = FLIPPED_ALIAS_KEYS[\"Declaration\"];\nexport const PATTERNLIKE_TYPES = FLIPPED_ALIAS_KEYS[\"PatternLike\"];\nexport const LVAL_TYPES = FLIPPED_ALIAS_KEYS[\"LVal\"];\nexport const TSENTITYNAME_TYPES = FLIPPED_ALIAS_KEYS[\"TSEntityName\"];\nexport const LITERAL_TYPES = FLIPPED_ALIAS_KEYS[\"Literal\"];\nexport const IMMUTABLE_TYPES = FLIPPED_ALIAS_KEYS[\"Immutable\"];\nexport const USERWHITESPACABLE_TYPES = FLIPPED_ALIAS_KEYS[\"UserWhitespacable\"];\nexport const METHOD_TYPES = FLIPPED_ALIAS_KEYS[\"Method\"];\nexport const OBJECTMEMBER_TYPES = FLIPPED_ALIAS_KEYS[\"ObjectMember\"];\nexport const PROPERTY_TYPES = FLIPPED_ALIAS_KEYS[\"Property\"];\nexport const UNARYLIKE_TYPES = FLIPPED_ALIAS_KEYS[\"UnaryLike\"];\nexport const PATTERN_TYPES = FLIPPED_ALIAS_KEYS[\"Pattern\"];\nexport const CLASS_TYPES = FLIPPED_ALIAS_KEYS[\"Class\"];\nexport const IMPORTOREXPORTDECLARATION_TYPES =\n FLIPPED_ALIAS_KEYS[\"ImportOrExportDeclaration\"];\nexport const EXPORTDECLARATION_TYPES = FLIPPED_ALIAS_KEYS[\"ExportDeclaration\"];\nexport const MODULESPECIFIER_TYPES = FLIPPED_ALIAS_KEYS[\"ModuleSpecifier\"];\nexport const ACCESSOR_TYPES = FLIPPED_ALIAS_KEYS[\"Accessor\"];\nexport const PRIVATE_TYPES = FLIPPED_ALIAS_KEYS[\"Private\"];\nexport const FLOW_TYPES = FLIPPED_ALIAS_KEYS[\"Flow\"];\nexport const FLOWTYPE_TYPES = FLIPPED_ALIAS_KEYS[\"FlowType\"];\nexport const FLOWBASEANNOTATION_TYPES =\n FLIPPED_ALIAS_KEYS[\"FlowBaseAnnotation\"];\nexport const FLOWDECLARATION_TYPES = FLIPPED_ALIAS_KEYS[\"FlowDeclaration\"];\nexport const FLOWPREDICATE_TYPES = FLIPPED_ALIAS_KEYS[\"FlowPredicate\"];\nexport const ENUMBODY_TYPES = FLIPPED_ALIAS_KEYS[\"EnumBody\"];\nexport const ENUMMEMBER_TYPES = FLIPPED_ALIAS_KEYS[\"EnumMember\"];\nexport const JSX_TYPES = FLIPPED_ALIAS_KEYS[\"JSX\"];\nexport const MISCELLANEOUS_TYPES = FLIPPED_ALIAS_KEYS[\"Miscellaneous\"];\nexport const TYPESCRIPT_TYPES = FLIPPED_ALIAS_KEYS[\"TypeScript\"];\nexport const TSTYPEELEMENT_TYPES = FLIPPED_ALIAS_KEYS[\"TSTypeElement\"];\nexport const TSTYPE_TYPES = FLIPPED_ALIAS_KEYS[\"TSType\"];\nexport const TSBASETYPE_TYPES = FLIPPED_ALIAS_KEYS[\"TSBaseType\"];\n/**\n * @deprecated migrate to IMPORTOREXPORTDECLARATION_TYPES.\n */\nexport const MODULEDECLARATION_TYPES = IMPORTOREXPORTDECLARATION_TYPES;\n","import {\n isBlockStatement,\n isFunction,\n isEmptyStatement,\n isStatement,\n} from \"../validators/generated/index.ts\";\nimport {\n returnStatement,\n expressionStatement,\n blockStatement,\n} from \"../builders/generated/index.ts\";\nimport type * as t from \"../index.ts\";\n\nexport default function toBlock(\n node: t.Statement | t.Expression,\n parent?: t.Node,\n): t.BlockStatement {\n if (isBlockStatement(node)) {\n return node;\n }\n\n let blockNodes: t.Statement[] = [];\n\n if (isEmptyStatement(node)) {\n blockNodes = [];\n } else {\n if (!isStatement(node)) {\n if (isFunction(parent)) {\n node = returnStatement(node);\n } else {\n node = expressionStatement(node);\n }\n }\n\n blockNodes = [node];\n }\n\n return blockStatement(blockNodes);\n}\n","import toBlock from \"./toBlock.ts\";\nimport type * as t from \"../index.ts\";\n\n/**\n * Ensure the `key` (defaults to \"body\") of a `node` is a block.\n * Casting it to a block if it is not.\n *\n * Returns the BlockStatement\n */\nexport default function ensureBlock(\n node: t.Node,\n key: string = \"body\",\n): t.BlockStatement {\n // @ts-expect-error Fixme: key may not exist in node, consider remove key = \"body\"\n const result = toBlock(node[key], node);\n // @ts-expect-error Fixme: key may not exist in node, consider remove key = \"body\"\n node[key] = result;\n return result;\n}\n","import isValidIdentifier from \"../validators/isValidIdentifier.ts\";\nimport { isIdentifierChar } from \"@babel/helper-validator-identifier\";\n\nexport default function toIdentifier(input: string): string {\n input = input + \"\";\n\n // replace all non-valid identifiers with dashes\n let name = \"\";\n for (const c of input) {\n name += isIdentifierChar(c.codePointAt(0)) ? c : \"-\";\n }\n\n // remove all dashes and numbers from start of name\n name = name.replace(/^[-0-9]+/, \"\");\n\n // camel case\n name = name.replace(/[-\\s]+(.)?/g, function (match, c) {\n return c ? c.toUpperCase() : \"\";\n });\n\n if (!isValidIdentifier(name)) {\n name = `_${name}`;\n }\n\n return name || \"_\";\n}\n","import toIdentifier from \"./toIdentifier.ts\";\n\nexport default function toBindingIdentifierName(name: string): string {\n name = toIdentifier(name);\n if (name === \"eval\" || name === \"arguments\") name = \"_\" + name;\n\n return name;\n}\n","import { isIdentifier } from \"../validators/generated/index.ts\";\nimport { stringLiteral } from \"../builders/generated/index.ts\";\nimport type * as t from \"../index.ts\";\n\nexport default function toComputedKey(\n node:\n | t.ObjectMember\n | t.ObjectProperty\n | t.ClassMethod\n | t.ClassProperty\n | t.ClassAccessorProperty\n | t.MemberExpression\n | t.OptionalMemberExpression,\n // @ts-expect-error todo(flow->ts): maybe check the type of node before accessing .key and .property\n key: t.Expression | t.PrivateName = node.key || node.property,\n) {\n if (!node.computed && isIdentifier(key)) key = stringLiteral(key.name);\n\n return key;\n}\n","import {\n isExpression,\n isFunction,\n isClass,\n isExpressionStatement,\n} from \"../validators/generated/index.ts\";\nimport type * as t from \"../index.ts\";\n\nexport default toExpression as {\n (node: t.Function): t.FunctionExpression;\n (node: t.Class): t.ClassExpression;\n (\n node: t.ExpressionStatement | t.Expression | t.Class | t.Function,\n ): t.Expression;\n};\n\nfunction toExpression(\n node: t.ExpressionStatement | t.Expression | t.Class | t.Function,\n): t.Expression {\n if (isExpressionStatement(node)) {\n node = node.expression;\n }\n\n // return unmodified node\n // important for things like ArrowFunctions where\n // type change from ArrowFunction to FunctionExpression\n // produces bugs like -> `()=>a` to `function () a`\n // without generating a BlockStatement for it\n // ref: https://github.com/babel/babili/issues/130\n if (isExpression(node)) {\n return node;\n }\n\n // convert all classes and functions\n // ClassDeclaration -> ClassExpression\n // FunctionDeclaration, ObjectMethod, ClassMethod -> FunctionExpression\n if (isClass(node)) {\n // @ts-expect-error todo(flow->ts): avoid type unsafe mutations\n node.type = \"ClassExpression\";\n } else if (isFunction(node)) {\n // @ts-expect-error todo(flow->ts): avoid type unsafe mutations\n node.type = \"FunctionExpression\";\n }\n\n // if it's still not an expression\n if (!isExpression(node)) {\n throw new Error(`cannot turn ${node.type} to an expression`);\n }\n\n return node;\n}\n","import { VISITOR_KEYS } from \"../definitions/index.ts\";\nimport type * as t from \"../index.ts\";\n\n/**\n * A prefix AST traversal implementation meant for simple searching\n * and processing.\n */\nexport default function traverseFast(\n node: t.Node | null | undefined,\n enter: (node: t.Node, opts?: Options) => void,\n opts?: Options,\n): void {\n if (!node) return;\n\n const keys = VISITOR_KEYS[node.type];\n if (!keys) return;\n\n opts = opts || ({} as Options);\n enter(node, opts);\n\n for (const key of keys) {\n const subNode: t.Node | undefined | null =\n // @ts-expect-error key must present in node\n node[key];\n\n if (Array.isArray(subNode)) {\n for (const node of subNode) {\n traverseFast(node, enter, opts);\n }\n } else {\n traverseFast(subNode, enter, opts);\n }\n }\n}\n","import { COMMENT_KEYS } from \"../constants/index.ts\";\nimport type * as t from \"../index.ts\";\n\nconst CLEAR_KEYS = [\n \"tokens\", // only exist in t.File\n \"start\",\n \"end\",\n \"loc\",\n // Fixme: should be extra.raw / extra.rawValue?\n \"raw\",\n \"rawValue\",\n] as const;\n\nconst CLEAR_KEYS_PLUS_COMMENTS = [\n ...COMMENT_KEYS,\n \"comments\",\n ...CLEAR_KEYS,\n] as const;\n\nexport type Options = { preserveComments?: boolean };\n/**\n * Remove all of the _* properties from a node along with the additional metadata\n * properties like location data and raw token data.\n */\nexport default function removeProperties(\n node: t.Node,\n opts: Options = {},\n): void {\n const map = opts.preserveComments ? CLEAR_KEYS : CLEAR_KEYS_PLUS_COMMENTS;\n for (const key of map) {\n // @ts-expect-error tokens only exist in t.File\n if (node[key] != null) node[key] = undefined;\n }\n\n for (const key of Object.keys(node)) {\n // @ts-expect-error string can not index node\n if (key[0] === \"_\" && node[key] != null) node[key] = undefined;\n }\n\n const symbols: Array = Object.getOwnPropertySymbols(node);\n for (const sym of symbols) {\n // @ts-expect-error Fixme: document symbol properties\n node[sym] = null;\n }\n}\n","import traverseFast from \"../traverse/traverseFast.ts\";\nimport removeProperties from \"./removeProperties.ts\";\nimport type * as t from \"../index.ts\";\n\nexport default function removePropertiesDeep(\n tree: T,\n opts?: { preserveComments: boolean } | null,\n): T {\n traverseFast(tree, removeProperties, opts);\n\n return tree;\n}\n","import {\n isIdentifier,\n isStringLiteral,\n} from \"../validators/generated/index.ts\";\nimport cloneNode from \"../clone/cloneNode.ts\";\nimport removePropertiesDeep from \"../modifications/removePropertiesDeep.ts\";\nimport type * as t from \"../index.ts\";\n\nexport default function toKeyAlias(\n node: t.Method | t.Property,\n key: t.Node = node.key,\n): string {\n let alias;\n\n // @ts-expect-error todo(flow->ts): maybe add node type check before checking `.kind`\n if (node.kind === \"method\") {\n return toKeyAlias.increment() + \"\";\n } else if (isIdentifier(key)) {\n alias = key.name;\n } else if (isStringLiteral(key)) {\n alias = JSON.stringify(key.value);\n } else {\n alias = JSON.stringify(removePropertiesDeep(cloneNode(key)));\n }\n\n // @ts-expect-error todo(flow->ts): maybe add node type check before checking `.computed`\n if (node.computed) {\n alias = `[${alias}]`;\n }\n\n // @ts-expect-error todo(flow->ts): maybe add node type check before checking `.static`\n if (node.static) {\n alias = `static:${alias}`;\n }\n\n return alias;\n}\n\ntoKeyAlias.uid = 0;\n\ntoKeyAlias.increment = function () {\n if (toKeyAlias.uid >= Number.MAX_SAFE_INTEGER) {\n return (toKeyAlias.uid = 0);\n } else {\n return toKeyAlias.uid++;\n }\n};\n","import {\n isStatement,\n isFunction,\n isClass,\n isAssignmentExpression,\n} from \"../validators/generated/index.ts\";\nimport { expressionStatement } from \"../builders/generated/index.ts\";\nimport type * as t from \"../index.ts\";\n\nexport default toStatement as {\n (node: t.AssignmentExpression, ignore?: boolean): t.ExpressionStatement;\n\n (node: T, ignore: false): T;\n (node: T, ignore?: boolean): T | false;\n\n (node: t.Class, ignore: false): t.ClassDeclaration;\n (node: t.Class, ignore?: boolean): t.ClassDeclaration | false;\n\n (node: t.Function, ignore: false): t.FunctionDeclaration;\n (node: t.Function, ignore?: boolean): t.FunctionDeclaration | false;\n\n (node: t.Node, ignore: false): t.Statement;\n (node: t.Node, ignore?: boolean): t.Statement | false;\n};\n\nfunction toStatement(node: t.Node, ignore?: boolean): t.Statement | false {\n if (isStatement(node)) {\n return node;\n }\n\n let mustHaveId = false;\n let newType;\n\n if (isClass(node)) {\n mustHaveId = true;\n newType = \"ClassDeclaration\" as const;\n } else if (isFunction(node)) {\n mustHaveId = true;\n newType = \"FunctionDeclaration\" as const;\n } else if (isAssignmentExpression(node)) {\n return expressionStatement(node);\n }\n\n // @ts-expect-error todo(flow->ts): node.id might be missing\n if (mustHaveId && !node.id) {\n newType = false;\n }\n\n if (!newType) {\n if (ignore) {\n return false;\n } else {\n throw new Error(`cannot turn ${node.type} to a statement`);\n }\n }\n\n // @ts-expect-error manipulating node.type\n node.type = newType;\n\n // @ts-expect-error todo(flow->ts) refactor to avoid type unsafe mutations like reassigning node type above\n return node;\n}\n","import isValidIdentifier from \"../validators/isValidIdentifier.ts\";\nimport {\n identifier,\n booleanLiteral,\n nullLiteral,\n stringLiteral,\n numericLiteral,\n regExpLiteral,\n arrayExpression,\n objectProperty,\n objectExpression,\n unaryExpression,\n binaryExpression,\n} from \"../builders/generated/index.ts\";\nimport type * as t from \"../index.ts\";\n\nexport default valueToNode as {\n (value: undefined): t.Identifier; // TODO: This should return \"void 0\"\n (value: boolean): t.BooleanLiteral;\n (value: null): t.NullLiteral;\n (value: string): t.StringLiteral;\n // Infinities and NaN need to use a BinaryExpression; negative values must be wrapped in UnaryExpression\n (value: number): t.NumericLiteral | t.BinaryExpression | t.UnaryExpression;\n (value: RegExp): t.RegExpLiteral;\n (value: ReadonlyArray): t.ArrayExpression;\n\n // this throws with objects that are not plain objects,\n // or if there are non-valueToNode-able values\n (value: object): t.ObjectExpression;\n\n (value: unknown): t.Expression;\n};\n\n// @ts-expect-error: Object.prototype.toString must return a string\nconst objectToString: (value: unknown) => string = Function.call.bind(\n Object.prototype.toString,\n);\n\nfunction isRegExp(value: unknown): value is RegExp {\n return objectToString(value) === \"[object RegExp]\";\n}\n\nfunction isPlainObject(value: unknown): value is object {\n if (\n typeof value !== \"object\" ||\n value === null ||\n Object.prototype.toString.call(value) !== \"[object Object]\"\n ) {\n return false;\n }\n const proto = Object.getPrototypeOf(value);\n // Object.prototype's __proto__ is null. Every other class's __proto__.__proto__ is\n // not null by default. We cannot check if proto === Object.prototype because it\n // could come from another realm.\n return proto === null || Object.getPrototypeOf(proto) === null;\n}\n\nfunction valueToNode(value: unknown): t.Expression {\n // undefined\n if (value === undefined) {\n return identifier(\"undefined\");\n }\n\n // boolean\n if (value === true || value === false) {\n return booleanLiteral(value);\n }\n\n // null\n if (value === null) {\n return nullLiteral();\n }\n\n // strings\n if (typeof value === \"string\") {\n return stringLiteral(value);\n }\n\n // numbers\n if (typeof value === \"number\") {\n let result;\n if (Number.isFinite(value)) {\n result = numericLiteral(Math.abs(value));\n } else {\n let numerator;\n if (Number.isNaN(value)) {\n // NaN\n numerator = numericLiteral(0);\n } else {\n // Infinity / -Infinity\n numerator = numericLiteral(1);\n }\n\n result = binaryExpression(\"/\", numerator, numericLiteral(0));\n }\n\n if (value < 0 || Object.is(value, -0)) {\n result = unaryExpression(\"-\", result);\n }\n\n return result;\n }\n\n // regexes\n if (isRegExp(value)) {\n const pattern = value.source;\n const flags = /\\/([a-z]*)$/.exec(value.toString())[1];\n return regExpLiteral(pattern, flags);\n }\n\n // array\n if (Array.isArray(value)) {\n return arrayExpression(value.map(valueToNode));\n }\n\n // object\n if (isPlainObject(value)) {\n const props = [];\n for (const key of Object.keys(value)) {\n let nodeKey;\n if (isValidIdentifier(key)) {\n nodeKey = identifier(key);\n } else {\n nodeKey = stringLiteral(key);\n }\n props.push(\n objectProperty(\n nodeKey,\n valueToNode(\n // @ts-expect-error key must present in value\n value[key],\n ),\n ),\n );\n }\n return objectExpression(props);\n }\n\n throw new Error(\"don't know how to turn this value into a node\");\n}\n","import { memberExpression } from \"../builders/generated/index.ts\";\nimport type * as t from \"../index.ts\";\n\n/**\n * Append a node to a member expression.\n */\nexport default function appendToMemberExpression(\n member: t.MemberExpression,\n append: t.MemberExpression[\"property\"],\n computed: boolean = false,\n): t.MemberExpression {\n member.object = memberExpression(\n member.object,\n member.property,\n member.computed,\n );\n member.property = append;\n member.computed = !!computed;\n\n return member;\n}\n","import { INHERIT_KEYS } from \"../constants/index.ts\";\nimport inheritsComments from \"../comments/inheritsComments.ts\";\nimport type * as t from \"../index.ts\";\n\n/**\n * Inherit all contextual properties from `parent` node to `child` node.\n */\nexport default function inherits(\n child: T,\n parent: t.Node | null | undefined,\n): T {\n if (!child || !parent) return child;\n\n // optionally inherit specific properties if not null\n for (const key of INHERIT_KEYS.optional) {\n // @ts-expect-error Fixme: refine parent types\n if (child[key] == null) {\n // @ts-expect-error Fixme: refine parent types\n child[key] = parent[key];\n }\n }\n\n // force inherit \"private\" properties\n for (const key of Object.keys(parent)) {\n if (key[0] === \"_\" && key !== \"__clone\") {\n // @ts-expect-error Fixme: refine parent types\n child[key] = parent[key];\n }\n }\n\n // force inherit select properties\n for (const key of INHERIT_KEYS.force) {\n // @ts-expect-error Fixme: refine parent types\n child[key] = parent[key];\n }\n\n inheritsComments(child, parent);\n\n return child;\n}\n","import { memberExpression } from \"../builders/generated/index.ts\";\nimport { isSuper } from \"../index.ts\";\nimport type * as t from \"../index.ts\";\n\n/**\n * Prepend a node to a member expression.\n */\nexport default function prependToMemberExpression<\n T extends Pick,\n>(member: T, prepend: t.MemberExpression[\"object\"]): T {\n if (isSuper(member.object)) {\n throw new Error(\n \"Cannot prepend node to super property access (`super.foo`).\",\n );\n }\n member.object = memberExpression(prepend, member.object);\n\n return member;\n}\n","import type * as t from \"../index.ts\";\n\n/**\n * For the given node, generate a map from assignment id names to the identifier node.\n * Unlike getBindingIdentifiers, this function does not handle declarations and imports.\n * @param node the assignment expression or forXstatement\n * @returns an object map\n * @see getBindingIdentifiers\n */\nexport default function getAssignmentIdentifiers(\n node: t.Node | t.Node[],\n): Record {\n // null represents holes in an array pattern\n const search: (t.Node | null)[] = [].concat(node);\n const ids = Object.create(null);\n\n while (search.length) {\n const id = search.pop();\n if (!id) continue;\n\n switch (id.type) {\n case \"ArrayPattern\":\n search.push(...id.elements);\n break;\n\n case \"AssignmentExpression\":\n case \"AssignmentPattern\":\n case \"ForInStatement\":\n case \"ForOfStatement\":\n search.push(id.left);\n break;\n\n case \"ObjectPattern\":\n search.push(...id.properties);\n break;\n\n case \"ObjectProperty\":\n search.push(id.value);\n break;\n\n case \"RestElement\":\n case \"UpdateExpression\":\n search.push(id.argument);\n break;\n\n case \"UnaryExpression\":\n if (id.operator === \"delete\") {\n search.push(id.argument);\n }\n break;\n\n case \"Identifier\":\n ids[id.name] = id;\n break;\n\n default:\n break;\n }\n }\n\n return ids;\n}\n","import {\n isExportDeclaration,\n isIdentifier,\n isClassExpression,\n isDeclaration,\n isFunctionDeclaration,\n isFunctionExpression,\n isExportAllDeclaration,\n isAssignmentExpression,\n isUnaryExpression,\n isUpdateExpression,\n} from \"../validators/generated/index.ts\";\nimport type * as t from \"../index.ts\";\n\nexport { getBindingIdentifiers as default };\n\nfunction getBindingIdentifiers(\n node: t.Node,\n duplicates: true,\n outerOnly?: boolean,\n newBindingsOnly?: boolean,\n): Record>;\n\nfunction getBindingIdentifiers(\n node: t.Node,\n duplicates?: false,\n outerOnly?: boolean,\n newBindingsOnly?: boolean,\n): Record;\n\nfunction getBindingIdentifiers(\n node: t.Node,\n duplicates?: boolean,\n outerOnly?: boolean,\n newBindingsOnly?: boolean,\n): Record | Record>;\n\n/**\n * Return a list of binding identifiers associated with the input `node`.\n */\nfunction getBindingIdentifiers(\n node: t.Node,\n duplicates?: boolean,\n outerOnly?: boolean,\n newBindingsOnly?: boolean,\n): Record | Record> {\n const search: t.Node[] = [].concat(node);\n const ids = Object.create(null);\n\n while (search.length) {\n const id = search.shift();\n if (!id) continue;\n\n if (\n newBindingsOnly &&\n // These nodes do not introduce _new_ bindings, but they are included\n // in getBindingIdentifiers.keys for backwards compatibility.\n // TODO(@nicolo-ribaudo): Check if we can remove them from .keys in a\n // backward-compatible way, and if not what we need to do to remove them\n // in Babel 8.\n (isAssignmentExpression(id) ||\n isUnaryExpression(id) ||\n isUpdateExpression(id))\n ) {\n continue;\n }\n\n if (isIdentifier(id)) {\n if (duplicates) {\n const _ids = (ids[id.name] = ids[id.name] || []);\n _ids.push(id);\n } else {\n ids[id.name] = id;\n }\n continue;\n }\n\n if (isExportDeclaration(id) && !isExportAllDeclaration(id)) {\n if (isDeclaration(id.declaration)) {\n search.push(id.declaration);\n }\n continue;\n }\n\n if (outerOnly) {\n if (isFunctionDeclaration(id)) {\n search.push(id.id);\n continue;\n }\n\n if (\n isFunctionExpression(id) ||\n (process.env.BABEL_8_BREAKING && isClassExpression(id))\n ) {\n continue;\n }\n }\n\n const keys = getBindingIdentifiers.keys[id.type];\n\n if (keys) {\n for (let i = 0; i < keys.length; i++) {\n const key = keys[i];\n const nodes =\n // @ts-expect-error key must present in id\n id[key] as t.Node[] | t.Node | undefined | null;\n if (nodes) {\n if (Array.isArray(nodes)) {\n search.push(...nodes);\n } else {\n search.push(nodes);\n }\n }\n }\n }\n }\n return ids;\n}\n\n/**\n * Mapping of types to their identifier keys.\n */\ntype KeysMap = {\n [N in t.Node as N[\"type\"]]?: (keyof N)[];\n};\n\nconst keys: KeysMap = {\n DeclareClass: [\"id\"],\n DeclareFunction: [\"id\"],\n DeclareModule: [\"id\"],\n DeclareVariable: [\"id\"],\n DeclareInterface: [\"id\"],\n DeclareTypeAlias: [\"id\"],\n DeclareOpaqueType: [\"id\"],\n InterfaceDeclaration: [\"id\"],\n TypeAlias: [\"id\"],\n OpaqueType: [\"id\"],\n\n CatchClause: [\"param\"],\n LabeledStatement: [\"label\"],\n UnaryExpression: [\"argument\"],\n AssignmentExpression: [\"left\"],\n\n ImportSpecifier: [\"local\"],\n ImportNamespaceSpecifier: [\"local\"],\n ImportDefaultSpecifier: [\"local\"],\n ImportDeclaration: [\"specifiers\"],\n\n ExportSpecifier: [\"exported\"],\n ExportNamespaceSpecifier: [\"exported\"],\n ExportDefaultSpecifier: [\"exported\"],\n\n FunctionDeclaration: [\"id\", \"params\"],\n FunctionExpression: [\"id\", \"params\"],\n ArrowFunctionExpression: [\"params\"],\n ObjectMethod: [\"params\"],\n ClassMethod: [\"params\"],\n ClassPrivateMethod: [\"params\"],\n\n ForInStatement: [\"left\"],\n ForOfStatement: [\"left\"],\n\n ClassDeclaration: [\"id\"],\n ClassExpression: [\"id\"],\n\n RestElement: [\"argument\"],\n UpdateExpression: [\"argument\"],\n\n ObjectProperty: [\"value\"],\n\n AssignmentPattern: [\"left\"],\n ArrayPattern: [\"elements\"],\n ObjectPattern: [\"properties\"],\n\n VariableDeclaration: [\"declarations\"],\n VariableDeclarator: [\"id\"],\n};\n\ngetBindingIdentifiers.keys = keys;\n","import getBindingIdentifiers from \"./getBindingIdentifiers.ts\";\nimport type * as t from \"../index.ts\";\n\nexport default getOuterBindingIdentifiers as {\n (node: t.Node, duplicates: true): Record>;\n (node: t.Node, duplicates?: false): Record;\n (\n node: t.Node,\n duplicates?: boolean,\n ): Record | Record>;\n};\n\nfunction getOuterBindingIdentifiers(\n node: t.Node,\n duplicates: boolean,\n): Record | Record> {\n return getBindingIdentifiers(node, duplicates, true);\n}\n","import type * as t from \"../index.ts\";\n\nimport {\n isAssignmentExpression,\n isClassMethod,\n isIdentifier,\n isLiteral,\n isNullLiteral,\n isObjectMethod,\n isObjectProperty,\n isPrivateName,\n isRegExpLiteral,\n isTemplateLiteral,\n isVariableDeclarator,\n} from \"../validators/generated/index.ts\";\n\nfunction getNameFromLiteralId(id: t.Literal): string {\n if (isNullLiteral(id)) {\n return \"null\";\n }\n\n if (isRegExpLiteral(id)) {\n return `/${id.pattern}/${id.flags}`;\n }\n\n if (isTemplateLiteral(id)) {\n return id.quasis.map(quasi => quasi.value.raw).join(\"\");\n }\n\n if (id.value !== undefined) {\n return String(id.value);\n }\n\n return null;\n}\n\nfunction getObjectMemberKey(\n node: t.ObjectProperty | t.ObjectMethod | t.ClassProperty | t.ClassMethod,\n): t.Expression | t.PrivateName {\n if (!node.computed || isLiteral(node.key)) {\n return node.key;\n }\n}\n\ntype GetFunctionNameResult = {\n name: string;\n originalNode: t.Node;\n} | null;\n\nexport default function getFunctionName(\n node: t.ObjectMethod | t.ClassMethod,\n): GetFunctionNameResult;\nexport default function getFunctionName(\n node: t.Function | t.Class,\n parent: t.Node,\n): GetFunctionNameResult;\nexport default function getFunctionName(\n node: t.Function | t.Class,\n parent?: t.Node,\n): GetFunctionNameResult {\n if (\"id\" in node && node.id) {\n return {\n name: node.id.name,\n originalNode: node.id,\n };\n }\n\n let prefix = \"\";\n\n let id;\n if (isObjectProperty(parent, { value: node })) {\n // { foo: () => {} };\n id = getObjectMemberKey(parent);\n } else if (isObjectMethod(node) || isClassMethod(node)) {\n // { foo() {} };\n id = getObjectMemberKey(node);\n if (node.kind === \"get\") prefix = \"get \";\n else if (node.kind === \"set\") prefix = \"set \";\n } else if (isVariableDeclarator(parent, { init: node })) {\n // let foo = function () {};\n id = parent.id;\n } else if (isAssignmentExpression(parent, { operator: \"=\", right: node })) {\n // foo = function () {};\n id = parent.left;\n }\n\n if (!id) return null;\n\n const name = isLiteral(id)\n ? getNameFromLiteralId(id)\n : isIdentifier(id)\n ? id.name\n : isPrivateName(id)\n ? id.id.name\n : null;\n if (name == null) return null;\n\n return { name: prefix + name, originalNode: id };\n}\n","import { VISITOR_KEYS } from \"../definitions/index.ts\";\nimport type * as t from \"../index.ts\";\n\nexport type TraversalAncestors = Array<{\n node: t.Node;\n key: string;\n index?: number;\n}>;\n\nexport type TraversalHandler = (\n this: undefined,\n node: t.Node,\n parent: TraversalAncestors,\n state: T,\n) => void;\n\nexport type TraversalHandlers = {\n enter?: TraversalHandler;\n exit?: TraversalHandler;\n};\n\n/**\n * A general AST traversal with both prefix and postfix handlers, and a\n * state object. Exposes ancestry data to each handler so that more complex\n * AST data can be taken into account.\n */\nexport default function traverse(\n node: t.Node,\n handlers: TraversalHandler | TraversalHandlers,\n state?: T,\n): void {\n if (typeof handlers === \"function\") {\n handlers = { enter: handlers };\n }\n\n const { enter, exit } = handlers;\n\n traverseSimpleImpl(node, enter, exit, state, []);\n}\n\nfunction traverseSimpleImpl(\n node: any,\n enter: Function | undefined,\n exit: Function | undefined,\n state: T | undefined,\n ancestors: TraversalAncestors,\n) {\n const keys = VISITOR_KEYS[node.type];\n if (!keys) return;\n\n if (enter) enter(node, ancestors, state);\n\n for (const key of keys) {\n const subNode = node[key];\n\n if (Array.isArray(subNode)) {\n for (let i = 0; i < subNode.length; i++) {\n const child = subNode[i];\n if (!child) continue;\n\n ancestors.push({\n node,\n key,\n index: i,\n });\n\n traverseSimpleImpl(child, enter, exit, state, ancestors);\n\n ancestors.pop();\n }\n } else if (subNode) {\n ancestors.push({\n node,\n key,\n });\n\n traverseSimpleImpl(subNode, enter, exit, state, ancestors);\n\n ancestors.pop();\n }\n }\n\n if (exit) exit(node, ancestors, state);\n}\n","import getBindingIdentifiers from \"../retrievers/getBindingIdentifiers.ts\";\nimport type * as t from \"../index.ts\";\n/**\n * Check if the input `node` is a binding identifier.\n */\nexport default function isBinding(\n node: t.Node,\n parent: t.Node,\n grandparent?: t.Node,\n): boolean {\n if (\n grandparent &&\n node.type === \"Identifier\" &&\n parent.type === \"ObjectProperty\" &&\n grandparent.type === \"ObjectExpression\"\n ) {\n // We need to special-case this, because getBindingIdentifiers\n // has an ObjectProperty->value entry for destructuring patterns.\n return false;\n }\n\n const keys = getBindingIdentifiers.keys[parent.type];\n if (keys) {\n for (let i = 0; i < keys.length; i++) {\n const key = keys[i];\n const val =\n // @ts-expect-error key must present in parent\n parent[key];\n if (Array.isArray(val)) {\n if (val.includes(node)) return true;\n } else {\n if (val === node) return true;\n }\n }\n }\n\n return false;\n}\n","import { isVariableDeclaration } from \"./generated/index.ts\";\nimport { BLOCK_SCOPED_SYMBOL } from \"../constants/index.ts\";\nimport type * as t from \"../index.ts\";\n\n/**\n * Check if the input `node` is a `let` variable declaration.\n */\nexport default function isLet(node: t.Node): boolean {\n return (\n isVariableDeclaration(node) &&\n (node.kind !== \"var\" ||\n // @ts-expect-error Fixme: document private properties\n node[BLOCK_SCOPED_SYMBOL])\n );\n}\n","import {\n isClassDeclaration,\n isFunctionDeclaration,\n} from \"./generated/index.ts\";\nimport isLet from \"./isLet.ts\";\nimport type * as t from \"../index.ts\";\n\n/**\n * Check if the input `node` is block scoped.\n */\nexport default function isBlockScoped(node: t.Node): boolean {\n return isFunctionDeclaration(node) || isClassDeclaration(node) || isLet(node);\n}\n","import isType from \"./isType.ts\";\nimport { isIdentifier } from \"./generated/index.ts\";\nimport type * as t from \"../index.ts\";\n\n/**\n * Check if the input `node` is definitely immutable.\n */\nexport default function isImmutable(node: t.Node): boolean {\n if (isType(node.type, \"Immutable\")) return true;\n\n if (isIdentifier(node)) {\n if (node.name === \"undefined\") {\n // immutable!\n return true;\n } else {\n // no idea...\n return false;\n }\n }\n\n return false;\n}\n","import { NODE_FIELDS, VISITOR_KEYS } from \"../definitions/index.ts\";\nimport type * as t from \"../index.ts\";\n\n/**\n * Check if two nodes are equivalent\n */\nexport default function isNodesEquivalent>(\n a: T,\n b: any,\n): b is T {\n if (\n typeof a !== \"object\" ||\n typeof b !== \"object\" ||\n a == null ||\n b == null\n ) {\n return a === b;\n }\n\n if (a.type !== b.type) {\n return false;\n }\n\n const fields = Object.keys(NODE_FIELDS[a.type] || a.type);\n const visitorKeys = VISITOR_KEYS[a.type];\n\n for (const field of fields) {\n const val_a =\n // @ts-expect-error field must present in a\n a[field];\n const val_b = b[field];\n if (typeof val_a !== typeof val_b) {\n return false;\n }\n if (val_a == null && val_b == null) {\n continue;\n } else if (val_a == null || val_b == null) {\n return false;\n }\n\n if (Array.isArray(val_a)) {\n if (!Array.isArray(val_b)) {\n return false;\n }\n if (val_a.length !== val_b.length) {\n return false;\n }\n\n for (let i = 0; i < val_a.length; i++) {\n if (!isNodesEquivalent(val_a[i], val_b[i])) {\n return false;\n }\n }\n continue;\n }\n\n if (typeof val_a === \"object\" && !visitorKeys?.includes(field)) {\n for (const key of Object.keys(val_a)) {\n if (val_a[key] !== val_b[key]) {\n return false;\n }\n }\n continue;\n }\n\n if (!isNodesEquivalent(val_a, val_b)) {\n return false;\n }\n }\n\n return true;\n}\n","import type * as t from \"../index.ts\";\n\n/**\n * Check if the input `node` is a reference to a bound variable.\n */\nexport default function isReferenced(\n node: t.Node,\n parent: t.Node,\n grandparent?: t.Node,\n): boolean {\n switch (parent.type) {\n // yes: PARENT[NODE]\n // yes: NODE.child\n // no: parent.NODE\n case \"MemberExpression\":\n case \"OptionalMemberExpression\":\n if (parent.property === node) {\n return !!parent.computed;\n }\n return parent.object === node;\n\n case \"JSXMemberExpression\":\n return parent.object === node;\n // no: let NODE = init;\n // yes: let id = NODE;\n case \"VariableDeclarator\":\n return parent.init === node;\n\n // yes: () => NODE\n // no: (NODE) => {}\n case \"ArrowFunctionExpression\":\n return parent.body === node;\n\n // no: class { #NODE; }\n // no: class { get #NODE() {} }\n // no: class { #NODE() {} }\n // no: class { fn() { return this.#NODE; } }\n case \"PrivateName\":\n return false;\n\n // no: class { NODE() {} }\n // yes: class { [NODE]() {} }\n // no: class { foo(NODE) {} }\n case \"ClassMethod\":\n case \"ClassPrivateMethod\":\n case \"ObjectMethod\":\n if (parent.key === node) {\n return !!parent.computed;\n }\n return false;\n\n // yes: { [NODE]: \"\" }\n // no: { NODE: \"\" }\n // depends: { NODE }\n // depends: { key: NODE }\n case \"ObjectProperty\":\n if (parent.key === node) {\n return !!parent.computed;\n }\n // parent.value === node\n return !grandparent || grandparent.type !== \"ObjectPattern\";\n // no: class { NODE = value; }\n // yes: class { [NODE] = value; }\n // yes: class { key = NODE; }\n case \"ClassProperty\":\n case \"ClassAccessorProperty\":\n if (parent.key === node) {\n return !!parent.computed;\n }\n return true;\n case \"ClassPrivateProperty\":\n return parent.key !== node;\n\n // no: class NODE {}\n // yes: class Foo extends NODE {}\n case \"ClassDeclaration\":\n case \"ClassExpression\":\n return parent.superClass === node;\n\n // yes: left = NODE;\n // no: NODE = right;\n case \"AssignmentExpression\":\n return parent.right === node;\n\n // no: [NODE = foo] = [];\n // yes: [foo = NODE] = [];\n case \"AssignmentPattern\":\n return parent.right === node;\n\n // no: NODE: for (;;) {}\n case \"LabeledStatement\":\n return false;\n\n // no: try {} catch (NODE) {}\n case \"CatchClause\":\n return false;\n\n // no: function foo(...NODE) {}\n case \"RestElement\":\n return false;\n\n case \"BreakStatement\":\n case \"ContinueStatement\":\n return false;\n\n // no: function NODE() {}\n // no: function foo(NODE) {}\n case \"FunctionDeclaration\":\n case \"FunctionExpression\":\n return false;\n\n // no: export NODE from \"foo\";\n // no: export * as NODE from \"foo\";\n case \"ExportNamespaceSpecifier\":\n case \"ExportDefaultSpecifier\":\n return false;\n\n // no: export { foo as NODE };\n // yes: export { NODE as foo };\n // no: export { NODE as foo } from \"foo\";\n case \"ExportSpecifier\":\n // @ts-expect-error todo(flow->ts): Property 'source' does not exist on type 'AnyTypeAnnotation'.\n if (grandparent?.source) {\n return false;\n }\n return parent.local === node;\n\n // no: import NODE from \"foo\";\n // no: import * as NODE from \"foo\";\n // no: import { NODE as foo } from \"foo\";\n // no: import { foo as NODE } from \"foo\";\n // no: import NODE from \"bar\";\n case \"ImportDefaultSpecifier\":\n case \"ImportNamespaceSpecifier\":\n case \"ImportSpecifier\":\n return false;\n\n // no: import \"foo\" assert { NODE: \"json\" }\n case \"ImportAttribute\":\n return false;\n\n // no:

\n case \"JSXAttribute\":\n return false;\n\n // no: [NODE] = [];\n // no: ({ NODE }) = [];\n case \"ObjectPattern\":\n case \"ArrayPattern\":\n return false;\n\n // no: new.NODE\n // no: NODE.target\n case \"MetaProperty\":\n return false;\n\n // yes: type X = { someProperty: NODE }\n // no: type X = { NODE: OtherType }\n case \"ObjectTypeProperty\":\n return parent.key !== node;\n\n // yes: enum X { Foo = NODE }\n // no: enum X { NODE }\n case \"TSEnumMember\":\n return parent.id !== node;\n\n // yes: { [NODE]: value }\n // no: { NODE: value }\n case \"TSPropertySignature\":\n if (parent.key === node) {\n return !!parent.computed;\n }\n\n return true;\n }\n\n return true;\n}\n","import {\n isFunction,\n isCatchClause,\n isBlockStatement,\n isScopable,\n isPattern,\n} from \"./generated/index.ts\";\nimport type * as t from \"../index.ts\";\n\n/**\n * Check if the input `node` is a scope.\n */\nexport default function isScope(node: t.Node, parent: t.Node): boolean {\n // If a BlockStatement is an immediate descendent of a Function/CatchClause, it must be in the body.\n // Hence we skipped the parentKey === \"params\" check\n if (isBlockStatement(node) && (isFunction(parent) || isCatchClause(parent))) {\n return false;\n }\n\n // If a Pattern is an immediate descendent of a Function/CatchClause, it must be in the params.\n // Hence we skipped the parentKey === \"params\" check\n if (isPattern(node) && (isFunction(parent) || isCatchClause(parent))) {\n return true;\n }\n\n return isScopable(node);\n}\n","import { isIdentifier, isImportDefaultSpecifier } from \"./generated/index.ts\";\nimport type * as t from \"../index.ts\";\n\n/**\n * Check if the input `specifier` is a `default` import or export.\n */\nexport default function isSpecifierDefault(\n specifier: t.ModuleSpecifier,\n): boolean {\n return (\n isImportDefaultSpecifier(specifier) ||\n // @ts-expect-error todo(flow->ts): stricter type for specifier\n isIdentifier(specifier.imported || specifier.exported, {\n name: \"default\",\n })\n );\n}\n","import isValidIdentifier from \"./isValidIdentifier.ts\";\n\nconst RESERVED_WORDS_ES3_ONLY: Set = new Set([\n \"abstract\",\n \"boolean\",\n \"byte\",\n \"char\",\n \"double\",\n \"enum\",\n \"final\",\n \"float\",\n \"goto\",\n \"implements\",\n \"int\",\n \"interface\",\n \"long\",\n \"native\",\n \"package\",\n \"private\",\n \"protected\",\n \"public\",\n \"short\",\n \"static\",\n \"synchronized\",\n \"throws\",\n \"transient\",\n \"volatile\",\n]);\n\n/**\n * Check if the input `name` is a valid identifier name according to the ES3 specification.\n *\n * Additional ES3 reserved words are\n */\nexport default function isValidES3Identifier(name: string): boolean {\n return isValidIdentifier(name) && !RESERVED_WORDS_ES3_ONLY.has(name);\n}\n","import { isVariableDeclaration } from \"./generated/index.ts\";\nimport { BLOCK_SCOPED_SYMBOL } from \"../constants/index.ts\";\nimport type * as t from \"../index.ts\";\n\n/**\n * Check if the input `node` is a variable declaration.\n */\nexport default function isVar(node: t.Node): boolean {\n return (\n isVariableDeclaration(node, { kind: \"var\" }) &&\n !(\n // @ts-expect-error document private properties\n node[BLOCK_SCOPED_SYMBOL]\n )\n );\n}\n","import isReactComponent from \"./validators/react/isReactComponent.ts\";\nimport isCompatTag from \"./validators/react/isCompatTag.ts\";\nimport buildChildren from \"./builders/react/buildChildren.ts\";\n\n// asserts\nexport { default as assertNode } from \"./asserts/assertNode.ts\";\nexport * from \"./asserts/generated/index.ts\";\n\n// builders\nexport { default as createTypeAnnotationBasedOnTypeof } from \"./builders/flow/createTypeAnnotationBasedOnTypeof.ts\";\n/** @deprecated use createFlowUnionType instead */\nexport { default as createUnionTypeAnnotation } from \"./builders/flow/createFlowUnionType.ts\";\nexport { default as createFlowUnionType } from \"./builders/flow/createFlowUnionType.ts\";\nexport { default as createTSUnionType } from \"./builders/typescript/createTSUnionType.ts\";\nexport * from \"./builders/generated/index.ts\";\nexport * from \"./builders/generated/uppercase.js\";\nexport * from \"./builders/productions.ts\";\n\n// clone\nexport { default as cloneNode } from \"./clone/cloneNode.ts\";\nexport { default as clone } from \"./clone/clone.ts\";\nexport { default as cloneDeep } from \"./clone/cloneDeep.ts\";\nexport { default as cloneDeepWithoutLoc } from \"./clone/cloneDeepWithoutLoc.ts\";\nexport { default as cloneWithoutLoc } from \"./clone/cloneWithoutLoc.ts\";\n\n// comments\nexport { default as addComment } from \"./comments/addComment.ts\";\nexport { default as addComments } from \"./comments/addComments.ts\";\nexport { default as inheritInnerComments } from \"./comments/inheritInnerComments.ts\";\nexport { default as inheritLeadingComments } from \"./comments/inheritLeadingComments.ts\";\nexport { default as inheritsComments } from \"./comments/inheritsComments.ts\";\nexport { default as inheritTrailingComments } from \"./comments/inheritTrailingComments.ts\";\nexport { default as removeComments } from \"./comments/removeComments.ts\";\n\n// constants\nexport * from \"./constants/generated/index.ts\";\nexport * from \"./constants/index.ts\";\n\n// converters\nexport { default as ensureBlock } from \"./converters/ensureBlock.ts\";\nexport { default as toBindingIdentifierName } from \"./converters/toBindingIdentifierName.ts\";\nexport { default as toBlock } from \"./converters/toBlock.ts\";\nexport { default as toComputedKey } from \"./converters/toComputedKey.ts\";\nexport { default as toExpression } from \"./converters/toExpression.ts\";\nexport { default as toIdentifier } from \"./converters/toIdentifier.ts\";\nexport { default as toKeyAlias } from \"./converters/toKeyAlias.ts\";\nexport { default as toStatement } from \"./converters/toStatement.ts\";\nexport { default as valueToNode } from \"./converters/valueToNode.ts\";\n\n// definitions\nexport * from \"./definitions/index.ts\";\n\n// modifications\nexport { default as appendToMemberExpression } from \"./modifications/appendToMemberExpression.ts\";\nexport { default as inherits } from \"./modifications/inherits.ts\";\nexport { default as prependToMemberExpression } from \"./modifications/prependToMemberExpression.ts\";\nexport {\n default as removeProperties,\n type Options as RemovePropertiesOptions,\n} from \"./modifications/removeProperties.ts\";\nexport { default as removePropertiesDeep } from \"./modifications/removePropertiesDeep.ts\";\nexport { default as removeTypeDuplicates } from \"./modifications/flow/removeTypeDuplicates.ts\";\n\n// retrievers\nexport { default as getAssignmentIdentifiers } from \"./retrievers/getAssignmentIdentifiers.ts\";\nexport { default as getBindingIdentifiers } from \"./retrievers/getBindingIdentifiers.ts\";\nexport { default as getOuterBindingIdentifiers } from \"./retrievers/getOuterBindingIdentifiers.ts\";\nexport { default as getFunctionName } from \"./retrievers/getFunctionName.ts\";\n\n// traverse\nexport { default as traverse } from \"./traverse/traverse.ts\";\nexport * from \"./traverse/traverse.ts\";\nexport { default as traverseFast } from \"./traverse/traverseFast.ts\";\n\n// utils\nexport { default as shallowEqual } from \"./utils/shallowEqual.ts\";\n\n// validators\nexport { default as is } from \"./validators/is.ts\";\nexport { default as isBinding } from \"./validators/isBinding.ts\";\nexport { default as isBlockScoped } from \"./validators/isBlockScoped.ts\";\nexport { default as isImmutable } from \"./validators/isImmutable.ts\";\nexport { default as isLet } from \"./validators/isLet.ts\";\nexport { default as isNode } from \"./validators/isNode.ts\";\nexport { default as isNodesEquivalent } from \"./validators/isNodesEquivalent.ts\";\nexport { default as isPlaceholderType } from \"./validators/isPlaceholderType.ts\";\nexport { default as isReferenced } from \"./validators/isReferenced.ts\";\nexport { default as isScope } from \"./validators/isScope.ts\";\nexport { default as isSpecifierDefault } from \"./validators/isSpecifierDefault.ts\";\nexport { default as isType } from \"./validators/isType.ts\";\nexport { default as isValidES3Identifier } from \"./validators/isValidES3Identifier.ts\";\nexport { default as isValidIdentifier } from \"./validators/isValidIdentifier.ts\";\nexport { default as isVar } from \"./validators/isVar.ts\";\nexport { default as matchesPattern } from \"./validators/matchesPattern.ts\";\nexport { default as validate } from \"./validators/validate.ts\";\nexport { default as buildMatchMemberExpression } from \"./validators/buildMatchMemberExpression.ts\";\nexport * from \"./validators/generated/index.ts\";\n\n// react\nexport const react = {\n isReactComponent,\n isCompatTag,\n buildChildren,\n};\n\nexport type * from \"./ast-types/generated/index.ts\";\n\n// this is used by @babel/traverse to warn about deprecated visitors\nexport { default as __internal__deprecationWarning } from \"./utils/deprecationWarning.ts\";\n\nif (!process.env.BABEL_8_BREAKING && !USE_ESM && !IS_STANDALONE) {\n // eslint-disable-next-line no-restricted-globals\n exports.toSequenceExpression =\n // eslint-disable-next-line no-restricted-globals\n require(\"./converters/toSequenceExpression.js\").default;\n}\n","import { assertExpressionStatement } from \"@babel/types\";\nimport type * as t from \"@babel/types\";\n\nexport type Formatter = {\n code: (source: string) => string;\n validate: (ast: t.File) => void;\n unwrap: (ast: t.File) => T;\n};\n\nfunction makeStatementFormatter(\n fn: (statements: Array) => T,\n): Formatter {\n return {\n // We need to prepend a \";\" to force statement parsing so that\n // ExpressionStatement strings won't be parsed as directives.\n // Alongside that, we also prepend a comment so that when a syntax error\n // is encountered, the user will be less likely to get confused about\n // where the random semicolon came from.\n code: str => `/* @babel/template */;\\n${str}`,\n validate: () => {},\n unwrap: (ast: t.File): T => {\n return fn(ast.program.body.slice(1));\n },\n };\n}\n\nexport const smart = makeStatementFormatter(body => {\n if (body.length > 1) {\n return body;\n } else {\n return body[0];\n }\n});\n\nexport const statements = makeStatementFormatter(body => body);\n\nexport const statement = makeStatementFormatter(body => {\n // We do this validation when unwrapping since the replacement process\n // could have added or removed statements.\n if (body.length === 0) {\n throw new Error(\"Found nothing to return.\");\n }\n if (body.length > 1) {\n throw new Error(\"Found multiple statements but wanted one\");\n }\n\n return body[0];\n});\n\nexport const expression: Formatter = {\n code: str => `(\\n${str}\\n)`,\n validate: ast => {\n if (ast.program.body.length > 1) {\n throw new Error(\"Found multiple statements but wanted one\");\n }\n if (expression.unwrap(ast).start === 0) {\n throw new Error(\"Parse result included parens.\");\n }\n },\n unwrap: ({ program }) => {\n const [stmt] = program.body;\n assertExpressionStatement(stmt);\n return stmt.expression;\n },\n};\n\nexport const program: Formatter = {\n code: str => str,\n validate: () => {},\n unwrap: ast => ast.program,\n};\n","import type { ParserOptions as ParserOpts } from \"@babel/parser\";\n\nexport type { ParserOpts };\n\n/**\n * These are the options that 'babel-template' actually accepts and typechecks\n * when called. All other options are passed through to the parser.\n */\nexport type PublicOpts = {\n /**\n * A set of placeholder names to automatically accept, ignoring the given\n * pattern entirely.\n *\n * This option can be used when using %%foo%% style placeholders.\n */\n placeholderWhitelist?: Set;\n /**\n * A pattern to search for when looking for Identifier and StringLiteral\n * nodes that can be replaced.\n *\n * 'false' will disable placeholder searching entirely, leaving only the\n * 'placeholderWhitelist' value to find replacements.\n *\n * Defaults to /^[_$A-Z0-9]+$/.\n *\n * This option can be used when using %%foo%% style placeholders.\n */\n placeholderPattern?: RegExp | false;\n /**\n * 'true' to pass through comments from the template into the resulting AST,\n * or 'false' to automatically discard comments. Defaults to 'false'.\n */\n preserveComments?: boolean;\n /**\n * 'true' to use %%foo%% style placeholders, 'false' to use legacy placeholders\n * described by placeholderPattern or placeholderWhitelist.\n * When it is not set, it behaves as 'true' if there are syntactic placeholders,\n * otherwise as 'false'.\n */\n syntacticPlaceholders?: boolean | null;\n};\n\nexport type TemplateOpts = {\n parser: ParserOpts;\n placeholderWhitelist?: Set;\n placeholderPattern?: RegExp | false;\n preserveComments?: boolean;\n syntacticPlaceholders?: boolean;\n};\n\nexport function merge(a: TemplateOpts, b: TemplateOpts): TemplateOpts {\n const {\n placeholderWhitelist = a.placeholderWhitelist,\n placeholderPattern = a.placeholderPattern,\n preserveComments = a.preserveComments,\n syntacticPlaceholders = a.syntacticPlaceholders,\n } = b;\n\n return {\n parser: {\n ...a.parser,\n ...b.parser,\n },\n placeholderWhitelist,\n placeholderPattern,\n preserveComments,\n syntacticPlaceholders,\n };\n}\n\nexport function validate(opts: unknown): TemplateOpts {\n if (opts != null && typeof opts !== \"object\") {\n throw new Error(\"Unknown template options.\");\n }\n\n const {\n placeholderWhitelist,\n placeholderPattern,\n preserveComments,\n syntacticPlaceholders,\n ...parser\n } = opts || ({} as any);\n\n if (placeholderWhitelist != null && !(placeholderWhitelist instanceof Set)) {\n throw new Error(\n \"'.placeholderWhitelist' must be a Set, null, or undefined\",\n );\n }\n\n if (\n placeholderPattern != null &&\n !(placeholderPattern instanceof RegExp) &&\n placeholderPattern !== false\n ) {\n throw new Error(\n \"'.placeholderPattern' must be a RegExp, false, null, or undefined\",\n );\n }\n\n if (preserveComments != null && typeof preserveComments !== \"boolean\") {\n throw new Error(\n \"'.preserveComments' must be a boolean, null, or undefined\",\n );\n }\n\n if (\n syntacticPlaceholders != null &&\n typeof syntacticPlaceholders !== \"boolean\"\n ) {\n throw new Error(\n \"'.syntacticPlaceholders' must be a boolean, null, or undefined\",\n );\n }\n if (\n syntacticPlaceholders === true &&\n (placeholderWhitelist != null || placeholderPattern != null)\n ) {\n throw new Error(\n \"'.placeholderWhitelist' and '.placeholderPattern' aren't compatible\" +\n \" with '.syntacticPlaceholders: true'\",\n );\n }\n\n return {\n parser,\n placeholderWhitelist: placeholderWhitelist || undefined,\n placeholderPattern:\n placeholderPattern == null ? undefined : placeholderPattern,\n preserveComments: preserveComments == null ? undefined : preserveComments,\n syntacticPlaceholders:\n syntacticPlaceholders == null ? undefined : syntacticPlaceholders,\n };\n}\n\nexport type PublicReplacements = { [x: string]: unknown } | Array;\nexport type TemplateReplacements = { [x: string]: unknown } | void;\n\nexport function normalizeReplacements(\n replacements: unknown,\n): TemplateReplacements {\n if (Array.isArray(replacements)) {\n return replacements.reduce((acc, replacement, i) => {\n acc[\"$\" + i] = replacement;\n return acc;\n }, {});\n } else if (typeof replacements === \"object\" || replacements == null) {\n return (replacements as any) || undefined;\n }\n\n throw new Error(\n \"Template replacements must be an array, object, null, or undefined\",\n );\n}\n","export type Pos = {\n start: number;\n};\n\n// These are used when `options.locations` is on, for the\n// `startLoc` and `endLoc` properties.\n\nexport class Position {\n line: number;\n column: number;\n index: number;\n\n constructor(line: number, col: number, index: number) {\n this.line = line;\n this.column = col;\n this.index = index;\n }\n}\n\nexport class SourceLocation {\n start: Position;\n end: Position;\n filename: string;\n identifierName: string | undefined | null;\n\n constructor(start: Position, end?: Position) {\n this.start = start;\n // (may start as null, but initialized later)\n this.end = end;\n }\n}\n\n/**\n * creates a new position with a non-zero column offset from the given position.\n * This function should be only be used when we create AST node out of the token\n * boundaries, such as TemplateElement ends before tt.templateNonTail. This\n * function does not skip whitespaces.\n */\nexport function createPositionWithColumnOffset(\n position: Position,\n columnOffset: number,\n) {\n const { line, column, index } = position;\n return new Position(line, column + columnOffset, index + columnOffset);\n}\n","import type { ParseErrorTemplates } from \"../parse-error.ts\";\n\nconst code = \"BABEL_PARSER_SOURCETYPE_MODULE_REQUIRED\";\n\nexport default {\n ImportMetaOutsideModule: {\n message: `import.meta may appear only with 'sourceType: \"module\"'`,\n code,\n },\n ImportOutsideModule: {\n message: `'import' and 'export' may appear only with 'sourceType: \"module\"'`,\n code,\n },\n} satisfies ParseErrorTemplates;\n","const NodeDescriptions = {\n ArrayPattern: \"array destructuring pattern\",\n AssignmentExpression: \"assignment expression\",\n AssignmentPattern: \"assignment expression\",\n ArrowFunctionExpression: \"arrow function expression\",\n ConditionalExpression: \"conditional expression\",\n CatchClause: \"catch clause\",\n ForOfStatement: \"for-of statement\",\n ForInStatement: \"for-in statement\",\n ForStatement: \"for-loop\",\n FormalParameters: \"function parameter list\",\n Identifier: \"identifier\",\n ImportSpecifier: \"import specifier\",\n ImportDefaultSpecifier: \"import default specifier\",\n ImportNamespaceSpecifier: \"import namespace specifier\",\n ObjectPattern: \"object destructuring pattern\",\n ParenthesizedExpression: \"parenthesized expression\",\n RestElement: \"rest element\",\n UpdateExpression: {\n true: \"prefix operation\",\n false: \"postfix operation\",\n },\n VariableDeclarator: \"variable declaration\",\n YieldExpression: \"yield expression\",\n};\n\ntype NodeTypesWithDescriptions = keyof Omit<\n typeof NodeDescriptions,\n \"UpdateExpression\"\n>;\n\ntype NodeWithDescription =\n | {\n type: \"UpdateExpression\";\n prefix: boolean;\n }\n | {\n type: NodeTypesWithDescriptions;\n };\n\n// eslint-disable-next-line no-confusing-arrow\nconst toNodeDescription = (node: NodeWithDescription) =>\n node.type === \"UpdateExpression\"\n ? NodeDescriptions.UpdateExpression[`${node.prefix}`]\n : NodeDescriptions[node.type];\n\nexport default toNodeDescription;\n","import type { ParseErrorTemplates } from \"../parse-error.ts\";\nimport toNodeDescription from \"./to-node-description.ts\";\n\nexport type LValAncestor =\n | { type: \"UpdateExpression\"; prefix: boolean }\n | {\n type:\n | \"ArrayPattern\"\n | \"AssignmentExpression\"\n | \"CatchClause\"\n | \"ForOfStatement\"\n | \"FormalParameters\"\n | \"ForInStatement\"\n | \"ForStatement\"\n | \"ImportSpecifier\"\n | \"ImportNamespaceSpecifier\"\n | \"ImportDefaultSpecifier\"\n | \"ParenthesizedExpression\"\n | \"ObjectPattern\"\n | \"RestElement\"\n | \"VariableDeclarator\";\n };\n\nexport default {\n AccessorIsGenerator: ({ kind }: { kind: \"get\" | \"set\" }) =>\n `A ${kind}ter cannot be a generator.`,\n ArgumentsInClass:\n \"'arguments' is only allowed in functions and class methods.\",\n AsyncFunctionInSingleStatementContext:\n \"Async functions can only be declared at the top level or inside a block.\",\n AwaitBindingIdentifier:\n \"Can not use 'await' as identifier inside an async function.\",\n AwaitBindingIdentifierInStaticBlock:\n \"Can not use 'await' as identifier inside a static block.\",\n AwaitExpressionFormalParameter:\n \"'await' is not allowed in async function parameters.\",\n AwaitUsingNotInAsyncContext:\n \"'await using' is only allowed within async functions and at the top levels of modules.\",\n AwaitNotInAsyncContext:\n \"'await' is only allowed within async functions and at the top levels of modules.\",\n AwaitNotInAsyncFunction: \"'await' is only allowed within async functions.\",\n BadGetterArity: \"A 'get' accessor must not have any formal parameters.\",\n BadSetterArity: \"A 'set' accessor must have exactly one formal parameter.\",\n BadSetterRestParameter:\n \"A 'set' accessor function argument must not be a rest parameter.\",\n ConstructorClassField: \"Classes may not have a field named 'constructor'.\",\n ConstructorClassPrivateField:\n \"Classes may not have a private field named '#constructor'.\",\n ConstructorIsAccessor: \"Class constructor may not be an accessor.\",\n ConstructorIsAsync: \"Constructor can't be an async function.\",\n ConstructorIsGenerator: \"Constructor can't be a generator.\",\n DeclarationMissingInitializer: ({\n kind,\n }: {\n kind: \"await using\" | \"const\" | \"destructuring\" | \"using\";\n }) => `Missing initializer in ${kind} declaration.`,\n DecoratorArgumentsOutsideParentheses:\n \"Decorator arguments must be moved inside parentheses: use '@(decorator(args))' instead of '@(decorator)(args)'.\",\n DecoratorBeforeExport:\n \"Decorators must be placed *before* the 'export' keyword. Remove the 'decoratorsBeforeExport: true' option to use the 'export @decorator class {}' syntax.\",\n DecoratorsBeforeAfterExport:\n \"Decorators can be placed *either* before or after the 'export' keyword, but not in both locations at the same time.\",\n DecoratorConstructor:\n \"Decorators can't be used with a constructor. Did you mean '@dec class { ... }'?\",\n DecoratorExportClass:\n \"Decorators must be placed *after* the 'export' keyword. Remove the 'decoratorsBeforeExport: false' option to use the '@decorator export class {}' syntax.\",\n DecoratorSemicolon: \"Decorators must not be followed by a semicolon.\",\n DecoratorStaticBlock: \"Decorators can't be used with a static block.\",\n DeferImportRequiresNamespace:\n 'Only `import defer * as x from \"./module\"` is valid.',\n DeletePrivateField: \"Deleting a private field is not allowed.\",\n DestructureNamedImport:\n \"ES2015 named imports do not destructure. Use another statement for destructuring after the import.\",\n DuplicateConstructor: \"Duplicate constructor in the same class.\",\n DuplicateDefaultExport: \"Only one default export allowed per module.\",\n DuplicateExport: ({ exportName }: { exportName: string }) =>\n `\\`${exportName}\\` has already been exported. Exported identifiers must be unique.`,\n DuplicateProto: \"Redefinition of __proto__ property.\",\n DuplicateRegExpFlags: \"Duplicate regular expression flag.\",\n DynamicImportPhaseRequiresImportExpressions: ({ phase }: { phase: string }) =>\n `'import.${phase}(...)' can only be parsed when using the 'createImportExpressions' option.`,\n ElementAfterRest: \"Rest element must be last element.\",\n EscapedCharNotAnIdentifier: \"Invalid Unicode escape.\",\n ExportBindingIsString: ({\n localName,\n exportName,\n }: {\n localName: string;\n exportName: string;\n }) =>\n `A string literal cannot be used as an exported binding without \\`from\\`.\\n- Did you mean \\`export { '${localName}' as '${exportName}' } from 'some-module'\\`?`,\n ExportDefaultFromAsIdentifier:\n \"'from' is not allowed as an identifier after 'export default'.\",\n\n ForInOfLoopInitializer: ({\n type,\n }: {\n type: \"ForInStatement\" | \"ForOfStatement\";\n }) =>\n `'${\n type === \"ForInStatement\" ? \"for-in\" : \"for-of\"\n }' loop variable declaration may not have an initializer.`,\n ForInUsing: \"For-in loop may not start with 'using' declaration.\",\n\n ForOfAsync: \"The left-hand side of a for-of loop may not be 'async'.\",\n ForOfLet: \"The left-hand side of a for-of loop may not start with 'let'.\",\n GeneratorInSingleStatementContext:\n \"Generators can only be declared at the top level or inside a block.\",\n\n IllegalBreakContinue: ({\n type,\n }: {\n type: \"BreakStatement\" | \"ContinueStatement\";\n }) => `Unsyntactic ${type === \"BreakStatement\" ? \"break\" : \"continue\"}.`,\n\n IllegalLanguageModeDirective:\n \"Illegal 'use strict' directive in function with non-simple parameter list.\",\n IllegalReturn: \"'return' outside of function.\",\n ImportAttributesUseAssert:\n \"The `assert` keyword in import attributes is deprecated and it has been replaced by the `with` keyword. You can enable the `deprecatedAssertSyntax: true` option in the import attributes plugin to suppress this error.\",\n ImportBindingIsString: ({ importName }: { importName: string }) =>\n `A string literal cannot be used as an imported binding.\\n- Did you mean \\`import { \"${importName}\" as foo }\\`?`,\n ImportCallArgumentTrailingComma:\n \"Trailing comma is disallowed inside import(...) arguments.\",\n ImportCallArity: ({ maxArgumentCount }: { maxArgumentCount: 1 | 2 }) =>\n `\\`import()\\` requires exactly ${\n maxArgumentCount === 1 ? \"one argument\" : \"one or two arguments\"\n }.`,\n ImportCallNotNewExpression: \"Cannot use new with import(...).\",\n ImportCallSpreadArgument: \"`...` is not allowed in `import()`.\",\n ImportJSONBindingNotDefault:\n \"A JSON module can only be imported with `default`.\",\n ImportReflectionHasAssertion: \"`import module x` cannot have assertions.\",\n ImportReflectionNotBinding:\n 'Only `import module x from \"./module\"` is valid.',\n IncompatibleRegExpUVFlags:\n \"The 'u' and 'v' regular expression flags cannot be enabled at the same time.\",\n InvalidBigIntLiteral: \"Invalid BigIntLiteral.\",\n InvalidCodePoint: \"Code point out of bounds.\",\n InvalidCoverInitializedName: \"Invalid shorthand property initializer.\",\n InvalidDecimal: \"Invalid decimal.\",\n InvalidDigit: ({ radix }: { radix: number }) =>\n `Expected number in radix ${radix}.`,\n InvalidEscapeSequence: \"Bad character escape sequence.\",\n InvalidEscapeSequenceTemplate: \"Invalid escape sequence in template.\",\n InvalidEscapedReservedWord: ({ reservedWord }: { reservedWord: string }) =>\n `Escape sequence in keyword ${reservedWord}.`,\n InvalidIdentifier: ({ identifierName }: { identifierName: string }) =>\n `Invalid identifier ${identifierName}.`,\n InvalidLhs: ({ ancestor }: { ancestor: LValAncestor }) =>\n `Invalid left-hand side in ${toNodeDescription(ancestor)}.`,\n InvalidLhsBinding: ({ ancestor }: { ancestor: LValAncestor }) =>\n `Binding invalid left-hand side in ${toNodeDescription(ancestor)}.`,\n InvalidLhsOptionalChaining: ({ ancestor }: { ancestor: LValAncestor }) =>\n `Invalid optional chaining in the left-hand side of ${toNodeDescription(\n ancestor,\n )}.`,\n InvalidNumber: \"Invalid number.\",\n InvalidOrMissingExponent:\n \"Floating-point numbers require a valid exponent after the 'e'.\",\n InvalidOrUnexpectedToken: ({ unexpected }: { unexpected: string }) =>\n `Unexpected character '${unexpected}'.`,\n InvalidParenthesizedAssignment: \"Invalid parenthesized assignment pattern.\",\n InvalidPrivateFieldResolution: ({\n identifierName,\n }: {\n identifierName: string;\n }) => `Private name #${identifierName} is not defined.`,\n InvalidPropertyBindingPattern: \"Binding member expression.\",\n InvalidRecordProperty:\n \"Only properties and spread elements are allowed in record definitions.\",\n InvalidRestAssignmentPattern: \"Invalid rest operator's argument.\",\n LabelRedeclaration: ({ labelName }: { labelName: string }) =>\n `Label '${labelName}' is already declared.`,\n LetInLexicalBinding: \"'let' is disallowed as a lexically bound name.\",\n LineTerminatorBeforeArrow: \"No line break is allowed before '=>'.\",\n MalformedRegExpFlags: \"Invalid regular expression flag.\",\n MissingClassName: \"A class name is required.\",\n MissingEqInAssignment:\n \"Only '=' operator can be used for specifying default value.\",\n MissingSemicolon: \"Missing semicolon.\",\n MissingPlugin: ({ missingPlugin }: { missingPlugin: [string] }) =>\n `This experimental syntax requires enabling the parser plugin: ${missingPlugin\n .map(name => JSON.stringify(name))\n .join(\", \")}.`,\n // FIXME: Would be nice to make this \"missingPlugins\" instead.\n // Also, seems like we can drop the \"(s)\" from the message and just make it \"s\".\n MissingOneOfPlugins: ({ missingPlugin }: { missingPlugin: string[] }) =>\n `This experimental syntax requires enabling one of the following parser plugin(s): ${missingPlugin\n .map(name => JSON.stringify(name))\n .join(\", \")}.`,\n MissingUnicodeEscape: \"Expecting Unicode escape sequence \\\\uXXXX.\",\n MixingCoalesceWithLogical:\n \"Nullish coalescing operator(??) requires parens when mixing with logical operators.\",\n ModuleAttributeDifferentFromType:\n \"The only accepted module attribute is `type`.\",\n ModuleAttributeInvalidValue:\n \"Only string literals are allowed as module attribute values.\",\n ModuleAttributesWithDuplicateKeys: ({ key }: { key: string }) =>\n `Duplicate key \"${key}\" is not allowed in module attributes.`,\n ModuleExportNameHasLoneSurrogate: ({\n surrogateCharCode,\n }: {\n surrogateCharCode: number;\n }) =>\n `An export name cannot include a lone surrogate, found '\\\\u${surrogateCharCode.toString(\n 16,\n )}'.`,\n ModuleExportUndefined: ({ localName }: { localName: string }) =>\n `Export '${localName}' is not defined.`,\n MultipleDefaultsInSwitch: \"Multiple default clauses.\",\n NewlineAfterThrow: \"Illegal newline after throw.\",\n NoCatchOrFinally: \"Missing catch or finally clause.\",\n NumberIdentifier: \"Identifier directly after number.\",\n NumericSeparatorInEscapeSequence:\n \"Numeric separators are not allowed inside unicode escape sequences or hex escape sequences.\",\n ObsoleteAwaitStar:\n \"'await*' has been removed from the async functions proposal. Use Promise.all() instead.\",\n OptionalChainingNoNew:\n \"Constructors in/after an Optional Chain are not allowed.\",\n OptionalChainingNoTemplate:\n \"Tagged Template Literals are not allowed in optionalChain.\",\n OverrideOnConstructor:\n \"'override' modifier cannot appear on a constructor declaration.\",\n ParamDupe: \"Argument name clash.\",\n PatternHasAccessor: \"Object pattern can't contain getter or setter.\",\n PatternHasMethod: \"Object pattern can't contain methods.\",\n PrivateInExpectedIn: ({ identifierName }: { identifierName: string }) =>\n `Private names are only allowed in property accesses (\\`obj.#${identifierName}\\`) or in \\`in\\` expressions (\\`#${identifierName} in obj\\`).`,\n PrivateNameRedeclaration: ({ identifierName }: { identifierName: string }) =>\n `Duplicate private name #${identifierName}.`,\n RecordExpressionBarIncorrectEndSyntaxType:\n \"Record expressions ending with '|}' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.\",\n RecordExpressionBarIncorrectStartSyntaxType:\n \"Record expressions starting with '{|' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.\",\n RecordExpressionHashIncorrectStartSyntaxType:\n \"Record expressions starting with '#{' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'hash'.\",\n RecordNoProto: \"'__proto__' is not allowed in Record expressions.\",\n RestTrailingComma: \"Unexpected trailing comma after rest element.\",\n SloppyFunction:\n \"In non-strict mode code, functions can only be declared at top level or inside a block.\",\n SloppyFunctionAnnexB:\n \"In non-strict mode code, functions can only be declared at top level, inside a block, or as the body of an if statement.\",\n SourcePhaseImportRequiresDefault:\n 'Only `import source x from \"./module\"` is valid.',\n StaticPrototype: \"Classes may not have static property named prototype.\",\n SuperNotAllowed:\n \"`super()` is only valid inside a class constructor of a subclass. Maybe a typo in the method name ('constructor') or not extending another class?\",\n SuperPrivateField: \"Private fields can't be accessed on super.\",\n TrailingDecorator: \"Decorators must be attached to a class element.\",\n TupleExpressionBarIncorrectEndSyntaxType:\n \"Tuple expressions ending with '|]' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.\",\n TupleExpressionBarIncorrectStartSyntaxType:\n \"Tuple expressions starting with '[|' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.\",\n TupleExpressionHashIncorrectStartSyntaxType:\n \"Tuple expressions starting with '#[' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'hash'.\",\n UnexpectedArgumentPlaceholder: \"Unexpected argument placeholder.\",\n UnexpectedAwaitAfterPipelineBody:\n 'Unexpected \"await\" after pipeline body; await must have parentheses in minimal proposal.',\n UnexpectedDigitAfterHash: \"Unexpected digit after hash token.\",\n UnexpectedImportExport:\n \"'import' and 'export' may only appear at the top level.\",\n UnexpectedKeyword: ({ keyword }: { keyword: string }) =>\n `Unexpected keyword '${keyword}'.`,\n UnexpectedLeadingDecorator:\n \"Leading decorators must be attached to a class declaration.\",\n UnexpectedLexicalDeclaration:\n \"Lexical declaration cannot appear in a single-statement context.\",\n UnexpectedNewTarget:\n \"`new.target` can only be used in functions or class properties.\",\n UnexpectedNumericSeparator:\n \"A numeric separator is only allowed between two digits.\",\n UnexpectedPrivateField: \"Unexpected private name.\",\n UnexpectedReservedWord: ({ reservedWord }: { reservedWord: string }) =>\n `Unexpected reserved word '${reservedWord}'.`,\n UnexpectedSuper: \"'super' is only allowed in object methods and classes.\",\n UnexpectedToken: ({\n expected,\n unexpected,\n }: {\n expected?: string | null;\n unexpected?: string | null;\n }) =>\n `Unexpected token${unexpected ? ` '${unexpected}'.` : \"\"}${\n expected ? `, expected \"${expected}\"` : \"\"\n }`,\n UnexpectedTokenUnaryExponentiation:\n \"Illegal expression. Wrap left hand side or entire exponentiation in parentheses.\",\n UnexpectedUsingDeclaration:\n \"Using declaration cannot appear in the top level when source type is `script`.\",\n UnsupportedBind: \"Binding should be performed on object property.\",\n UnsupportedDecoratorExport:\n \"A decorated export must export a class declaration.\",\n UnsupportedDefaultExport:\n \"Only expressions, functions or classes are allowed as the `default` export.\",\n UnsupportedImport:\n \"`import` can only be used in `import()` or `import.meta`.\",\n UnsupportedMetaProperty: ({\n target,\n onlyValidPropertyName,\n }: {\n target: string;\n onlyValidPropertyName: string;\n }) =>\n `The only valid meta property for ${target} is ${target}.${onlyValidPropertyName}.`,\n UnsupportedParameterDecorator:\n \"Decorators cannot be used to decorate parameters.\",\n UnsupportedPropertyDecorator:\n \"Decorators cannot be used to decorate object literal properties.\",\n UnsupportedSuper:\n \"'super' can only be used with function calls (i.e. super()) or in property accesses (i.e. super.prop or super[prop]).\",\n UnterminatedComment: \"Unterminated comment.\",\n UnterminatedRegExp: \"Unterminated regular expression.\",\n UnterminatedString: \"Unterminated string constant.\",\n UnterminatedTemplate: \"Unterminated template.\",\n UsingDeclarationExport: \"Using declaration cannot be exported.\",\n UsingDeclarationHasBindingPattern:\n \"Using declaration cannot have destructuring patterns.\",\n VarRedeclaration: ({ identifierName }: { identifierName: string }) =>\n `Identifier '${identifierName}' has already been declared.`,\n YieldBindingIdentifier:\n \"Can not use 'yield' as identifier inside a generator.\",\n YieldInParameter: \"Yield expression is not allowed in formal parameters.\",\n ZeroDigitNumericSeparator:\n \"Numeric separator can not be used after leading 0.\",\n} satisfies ParseErrorTemplates;\n","import type { ParseErrorTemplates } from \"../parse-error\";\n\nexport default {\n StrictDelete: \"Deleting local variable in strict mode.\",\n\n // `referenceName` is the StringValue[1] of an IdentifierReference[2], which\n // is represented as just an `Identifier`[3] in the Babel AST.\n // 1. https://tc39.es/ecma262/#sec-static-semantics-stringvalue\n // 2. https://tc39.es/ecma262/#prod-IdentifierReference\n // 3. https://github.com/babel/babel/blob/main/packages/babel-parser/ast/spec.md#identifier\n StrictEvalArguments: ({ referenceName }: { referenceName: string }) =>\n `Assigning to '${referenceName}' in strict mode.`,\n\n // `bindingName` is the StringValue[1] of a BindingIdentifier[2], which is\n // represented as just an `Identifier`[3] in the Babel AST.\n // 1. https://tc39.es/ecma262/#sec-static-semantics-stringvalue\n // 2. https://tc39.es/ecma262/#prod-BindingIdentifier\n // 3. https://github.com/babel/babel/blob/main/packages/babel-parser/ast/spec.md#identifier\n StrictEvalArgumentsBinding: ({ bindingName }: { bindingName: string }) =>\n `Binding '${bindingName}' in strict mode.`,\n\n StrictFunction:\n \"In strict mode code, functions can only be declared at top level or inside a block.\",\n\n StrictNumericEscape: \"The only valid numeric escape in strict mode is '\\\\0'.\",\n\n StrictOctalLiteral: \"Legacy octal literals are not allowed in strict mode.\",\n\n StrictWith: \"'with' in strict mode.\",\n} satisfies ParseErrorTemplates;\n","import type { ParseErrorTemplates } from \"../parse-error.ts\";\nimport toNodeDescription from \"./to-node-description.ts\";\n\nexport const UnparenthesizedPipeBodyDescriptions = new Set([\n \"ArrowFunctionExpression\",\n \"AssignmentExpression\",\n \"ConditionalExpression\",\n \"YieldExpression\",\n] as const);\n\ntype GetSetMemberType> =\n T extends Set ? M : unknown;\n\nexport type UnparenthesizedPipeBodyTypes = GetSetMemberType<\n typeof UnparenthesizedPipeBodyDescriptions\n>;\n\nexport default {\n // This error is only used by the smart-mix proposal\n PipeBodyIsTighter:\n \"Unexpected yield after pipeline body; any yield expression acting as Hack-style pipe body must be parenthesized due to its loose operator precedence.\",\n PipeTopicRequiresHackPipes:\n 'Topic reference is used, but the pipelineOperator plugin was not passed a \"proposal\": \"hack\" or \"smart\" option.',\n PipeTopicUnbound:\n \"Topic reference is unbound; it must be inside a pipe body.\",\n PipeTopicUnconfiguredToken: ({ token }: { token: string }) =>\n `Invalid topic token ${token}. In order to use ${token} as a topic reference, the pipelineOperator plugin must be configured with { \"proposal\": \"hack\", \"topicToken\": \"${token}\" }.`,\n PipeTopicUnused:\n \"Hack-style pipe body does not contain a topic reference; Hack-style pipes must use topic at least once.\",\n PipeUnparenthesizedBody: ({ type }: { type: UnparenthesizedPipeBodyTypes }) =>\n `Hack-style pipe body cannot be an unparenthesized ${toNodeDescription({\n type,\n })}; please wrap it in parentheses.`,\n\n // Messages whose codes start with “Pipeline” or “PrimaryTopic”\n // are retained for backwards compatibility\n // with the deprecated smart-mix pipe operator proposal plugin.\n // They are subject to removal in a future major version.\n PipelineBodyNoArrow:\n 'Unexpected arrow \"=>\" after pipeline body; arrow function in pipeline body must be parenthesized.',\n PipelineBodySequenceExpression:\n \"Pipeline body may not be a comma-separated sequence expression.\",\n PipelineHeadSequenceExpression:\n \"Pipeline head should not be a comma-separated sequence expression.\",\n PipelineTopicUnused:\n \"Pipeline is in topic style but does not use topic reference.\",\n PrimaryTopicNotAllowed:\n \"Topic reference was used in a lexical context without topic binding.\",\n PrimaryTopicRequiresSmartPipeline:\n 'Topic reference is used, but the pipelineOperator plugin was not passed a \"proposal\": \"hack\" or \"smart\" option.',\n} satisfies ParseErrorTemplates;\n","import { Position } from \"./util/location.ts\";\n\ntype SyntaxPlugin =\n | \"flow\"\n | \"typescript\"\n | \"jsx\"\n | \"pipelineOperator\"\n | \"placeholders\";\n\ntype ParseErrorCode =\n | \"BABEL_PARSER_SYNTAX_ERROR\"\n | \"BABEL_PARSER_SOURCETYPE_MODULE_REQUIRED\";\n\n// Babel uses \"normal\" SyntaxErrors for it's errors, but adds some extra\n// functionality. This functionality is defined in the\n// `ParseErrorSpecification` interface below. We may choose to change to someday\n// give our errors their own full-blown class, but until then this allow us to\n// keep all the desirable properties of SyntaxErrors (like their name in stack\n// traces, etc.), and also allows us to punt on any publicly facing\n// class-hierarchy decisions until Babel 8.\ninterface ParseErrorSpecification {\n // Look, these *could* be readonly, but then Flow complains when we initially\n // set them. We could do a whole dance and make a special interface that's not\n // readonly for when we create the error, then cast it to the readonly\n // interface for public use, but the previous implementation didn't have them\n // as readonly, so let's just not worry about it for now.\n code: ParseErrorCode;\n reasonCode: string;\n syntaxPlugin?: SyntaxPlugin;\n missingPlugin?: string | string[];\n loc: Position;\n details: ErrorDetails;\n\n // We should consider removing this as it now just contains the same\n // information as `loc.index`.\n pos: number;\n}\n\nexport type ParseError = SyntaxError &\n ParseErrorSpecification;\n\n// By `ParseErrorConstructor`, we mean something like the new-less style\n// `ErrorConstructor`[1], since `ParseError`'s are not themselves actually\n// separate classes from `SyntaxError`'s.\n//\n// 1. https://github.com/microsoft/TypeScript/blob/v4.5.5/lib/lib.es5.d.ts#L1027\nexport type ParseErrorConstructor = (\n loc: Position,\n details: ErrorDetails,\n) => ParseError;\n\ntype ToMessage = (self: ErrorDetails) => string;\n\ntype ParseErrorCredentials = {\n code: string;\n reasonCode: string;\n syntaxPlugin?: SyntaxPlugin;\n toMessage: ToMessage;\n};\n\nfunction defineHidden(obj: object, key: string, value: unknown) {\n Object.defineProperty(obj, key, {\n enumerable: false,\n configurable: true,\n value,\n });\n}\n\nfunction toParseErrorConstructor({\n toMessage,\n code,\n reasonCode,\n syntaxPlugin,\n}: ParseErrorCredentials): ParseErrorConstructor {\n const hasMissingPlugin =\n reasonCode === \"MissingPlugin\" || reasonCode === \"MissingOneOfPlugins\";\n return function constructor(loc: Position, details: ErrorDetails) {\n const error: ParseError = new SyntaxError() as any;\n\n error.code = code as ParseErrorCode;\n error.reasonCode = reasonCode;\n error.loc = loc;\n error.pos = loc.index;\n\n error.syntaxPlugin = syntaxPlugin;\n if (hasMissingPlugin) {\n error.missingPlugin = (details as any).missingPlugin;\n }\n\n type Overrides = {\n loc?: Position;\n details?: ErrorDetails;\n };\n defineHidden(error, \"clone\", function clone(overrides: Overrides = {}) {\n const { line, column, index } = overrides.loc ?? loc;\n return constructor(new Position(line, column, index), {\n ...details,\n ...overrides.details,\n });\n });\n\n defineHidden(error, \"details\", details);\n\n Object.defineProperty(error, \"message\", {\n configurable: true,\n get(this: ParseError): string {\n const message = `${toMessage(details)} (${loc.line}:${loc.column})`;\n this.message = message;\n return message;\n },\n set(value: string) {\n Object.defineProperty(this, \"message\", { value, writable: true });\n },\n });\n\n return error;\n };\n}\n\ntype ParseErrorTemplate =\n | string\n | ToMessage\n | { message: string | ToMessage; code?: ParseErrorCode };\n\nexport type ParseErrorTemplates = { [reasonCode: string]: ParseErrorTemplate };\n\n// This is the templated form of `ParseErrorEnum`.\n//\n// Note: We could factor out the return type calculation into something like\n// `ParseErrorConstructor`, and then we could\n// reuse it in the non-templated form of `ParseErrorEnum`, but TypeScript\n// doesn't seem to drill down that far when showing you the computed type of\n// an object in an editor, so we'll leave it inlined for now.\nexport function ParseErrorEnum(a: TemplateStringsArray): <\n T extends ParseErrorTemplates,\n>(\n parseErrorTemplates: T,\n) => {\n [K in keyof T]: ParseErrorConstructor<\n T[K] extends { message: string | ToMessage }\n ? T[K][\"message\"] extends ToMessage\n ? Parameters[0]\n : object\n : T[K] extends ToMessage\n ? Parameters[0]\n : object\n >;\n};\n\nexport function ParseErrorEnum(\n parseErrorTemplates: T,\n syntaxPlugin?: SyntaxPlugin,\n): {\n [K in keyof T]: ParseErrorConstructor<\n T[K] extends { message: string | ToMessage }\n ? T[K][\"message\"] extends ToMessage\n ? Parameters[0]\n : object\n : T[K] extends ToMessage\n ? Parameters[0]\n : object\n >;\n};\n\n// You call `ParseErrorEnum` with a mapping from `ReasonCode`'s to either:\n//\n// 1. a static error message,\n// 2. `toMessage` functions that define additional necessary `details` needed by\n// the `ParseError`, or\n// 3. Objects that contain a `message` of one of the above and overridden `code`\n// and/or `reasonCode`:\n//\n// ParseErrorEnum `optionalSyntaxPlugin` ({\n// ErrorWithStaticMessage: \"message\",\n// ErrorWithDynamicMessage: ({ type } : { type: string }) => `${type}`),\n// ErrorWithOverriddenCodeAndOrReasonCode: {\n// message: ({ type }: { type: string }) => `${type}`),\n// code: \"AN_ERROR_CODE\",\n// ...(BABEL_8_BREAKING ? { } : { reasonCode: \"CustomErrorReasonCode\" })\n// }\n// });\n//\nexport function ParseErrorEnum(\n argument: TemplateStringsArray | ParseErrorTemplates,\n syntaxPlugin?: SyntaxPlugin,\n) {\n // If the first parameter is an array, that means we were called with a tagged\n // template literal. Extract the syntaxPlugin from this, and call again in\n // the \"normalized\" form.\n if (Array.isArray(argument)) {\n return (parseErrorTemplates: ParseErrorTemplates) =>\n ParseErrorEnum(parseErrorTemplates, argument[0]);\n }\n\n const ParseErrorConstructors = {} as Record<\n string,\n ParseErrorConstructor\n >;\n\n for (const reasonCode of Object.keys(argument)) {\n const template = (argument as ParseErrorTemplates)[reasonCode];\n const { message, ...rest } =\n typeof template === \"string\"\n ? { message: () => template }\n : typeof template === \"function\"\n ? { message: template }\n : template;\n const toMessage = typeof message === \"string\" ? () => message : message;\n\n ParseErrorConstructors[reasonCode] = toParseErrorConstructor({\n code: \"BABEL_PARSER_SYNTAX_ERROR\",\n reasonCode,\n toMessage,\n ...(syntaxPlugin ? { syntaxPlugin } : {}),\n ...rest,\n });\n }\n\n return ParseErrorConstructors;\n}\n\nimport ModuleErrors from \"./parse-error/module-errors.ts\";\nimport StandardErrors from \"./parse-error/standard-errors.ts\";\nimport StrictModeErrors from \"./parse-error/strict-mode-errors.ts\";\nimport PipelineOperatorErrors from \"./parse-error/pipeline-operator-errors.ts\";\n\nexport const Errors = {\n ...ParseErrorEnum(ModuleErrors),\n ...ParseErrorEnum(StandardErrors),\n ...ParseErrorEnum(StrictModeErrors),\n ...ParseErrorEnum`pipelineOperator`(PipelineOperatorErrors),\n};\n\nexport type { LValAncestor } from \"./parse-error/standard-errors.ts\";\n","import type { TokenType } from \"../tokenizer/types.ts\";\nimport type Parser from \"../parser/index.ts\";\nimport type { ExpressionErrors } from \"../parser/util.ts\";\nimport type * as N from \"../types.ts\";\nimport type { Node as NodeType, NodeBase, File } from \"../types.ts\";\nimport type { Position } from \"../util/location.ts\";\nimport { Errors } from \"../parse-error.ts\";\nimport type { Undone } from \"../parser/node.ts\";\nimport type { BindingFlag } from \"../util/scopeflags.ts\";\n\nconst { defineProperty } = Object;\nconst toUnenumerable = (object: any, key: string) => {\n if (object) {\n defineProperty(object, key, { enumerable: false, value: object[key] });\n }\n};\n\nfunction toESTreeLocation(node: any) {\n toUnenumerable(node.loc.start, \"index\");\n toUnenumerable(node.loc.end, \"index\");\n\n return node;\n}\n\nexport default (superClass: typeof Parser) =>\n class ESTreeParserMixin extends superClass implements Parser {\n parse(): File {\n const file = toESTreeLocation(super.parse());\n\n if (this.options.tokens) {\n file.tokens = file.tokens.map(toESTreeLocation);\n }\n\n return file;\n }\n\n // @ts-expect-error ESTree plugin changes node types\n parseRegExpLiteral({ pattern, flags }): N.EstreeRegExpLiteral {\n let regex: RegExp | null = null;\n try {\n regex = new RegExp(pattern, flags);\n } catch (_) {\n // In environments that don't support these flags value will\n // be null as the regex can't be represented natively.\n }\n const node = this.estreeParseLiteral(regex);\n node.regex = { pattern, flags };\n\n return node;\n }\n\n // @ts-expect-error ESTree plugin changes node types\n parseBigIntLiteral(value: any): N.Node {\n // https://github.com/estree/estree/blob/master/es2020.md#bigintliteral\n let bigInt: bigint | null;\n try {\n bigInt = BigInt(value);\n } catch {\n bigInt = null;\n }\n const node = this.estreeParseLiteral(bigInt);\n node.bigint = String(node.value || value);\n\n return node;\n }\n\n // @ts-expect-error ESTree plugin changes node types\n parseDecimalLiteral(value: any): N.Node {\n // https://github.com/estree/estree/blob/master/experimental/decimal.md\n // todo: use BigDecimal when node supports it.\n const decimal: null = null;\n const node = this.estreeParseLiteral(decimal);\n node.decimal = String(node.value || value);\n\n return node;\n }\n\n estreeParseLiteral(value: any) {\n // @ts-expect-error ESTree plugin changes node types\n return this.parseLiteral(value, \"Literal\");\n }\n\n // @ts-expect-error ESTree plugin changes node types\n parseStringLiteral(value: any): N.Node {\n return this.estreeParseLiteral(value);\n }\n\n parseNumericLiteral(value: any): any {\n return this.estreeParseLiteral(value);\n }\n\n // @ts-expect-error ESTree plugin changes node types\n parseNullLiteral(): N.Node {\n return this.estreeParseLiteral(null);\n }\n\n parseBooleanLiteral(value: boolean): N.BooleanLiteral {\n // @ts-expect-error ESTree plugin changes node types\n return this.estreeParseLiteral(value);\n }\n\n // Cast a Directive to an ExpressionStatement. Mutates the input Directive.\n directiveToStmt(directive: N.Directive): N.ExpressionStatement {\n const expression = directive.value as any as N.EstreeLiteral;\n delete directive.value;\n\n expression.type = \"Literal\";\n // @ts-expect-error N.EstreeLiteral.raw is not defined.\n expression.raw = expression.extra.raw;\n expression.value = expression.extra.expressionValue;\n\n const stmt = directive as any as N.ExpressionStatement;\n stmt.type = \"ExpressionStatement\";\n stmt.expression = expression;\n // @ts-expect-error N.ExpressionStatement.directive is not defined\n stmt.directive = expression.extra.rawValue;\n\n delete expression.extra;\n\n return stmt;\n }\n\n // ==================================\n // Overrides\n // ==================================\n\n initFunction(node: N.BodilessFunctionOrMethodBase, isAsync: boolean): void {\n super.initFunction(node, isAsync);\n node.expression = false;\n }\n\n checkDeclaration(node: N.Pattern | N.ObjectProperty): void {\n if (node != null && this.isObjectProperty(node)) {\n // @ts-expect-error plugin typings\n this.checkDeclaration((node as unknown as N.EstreeProperty).value);\n } else {\n super.checkDeclaration(node);\n }\n }\n\n getObjectOrClassMethodParams(method: N.ObjectMethod | N.ClassMethod) {\n return (method as unknown as N.EstreeMethodDefinition).value.params;\n }\n\n isValidDirective(stmt: N.Statement): boolean {\n return (\n stmt.type === \"ExpressionStatement\" &&\n stmt.expression.type === \"Literal\" &&\n typeof stmt.expression.value === \"string\" &&\n !stmt.expression.extra?.parenthesized\n );\n }\n\n parseBlockBody(\n node: N.BlockStatementLike,\n allowDirectives: boolean | undefined | null,\n topLevel: boolean,\n end: TokenType,\n afterBlockParse?: (hasStrictModeDirective: boolean) => void,\n ): void {\n super.parseBlockBody(\n node,\n allowDirectives,\n topLevel,\n end,\n afterBlockParse,\n );\n\n const directiveStatements = node.directives.map(d =>\n this.directiveToStmt(d),\n );\n // @ts-expect-error estree plugin typings\n node.body = directiveStatements.concat(node.body);\n delete node.directives;\n }\n\n pushClassMethod(\n classBody: N.ClassBody,\n method: N.ClassMethod,\n isGenerator: boolean,\n isAsync: boolean,\n isConstructor: boolean,\n allowsDirectSuper: boolean,\n ): void {\n this.parseMethod(\n method,\n isGenerator,\n isAsync,\n isConstructor,\n allowsDirectSuper,\n \"ClassMethod\",\n true,\n );\n if (method.typeParameters) {\n // @ts-expect-error mutate AST types\n method.value.typeParameters = method.typeParameters;\n delete method.typeParameters;\n }\n classBody.body.push(method);\n }\n\n parsePrivateName(): any {\n const node = super.parsePrivateName();\n if (!process.env.BABEL_8_BREAKING) {\n if (!this.getPluginOption(\"estree\", \"classFeatures\")) {\n return node;\n }\n }\n return this.convertPrivateNameToPrivateIdentifier(node);\n }\n\n convertPrivateNameToPrivateIdentifier(\n node: N.PrivateName,\n ): N.EstreePrivateIdentifier {\n const name = super.getPrivateNameSV(node);\n node = node as any;\n delete node.id;\n // @ts-expect-error mutate AST types\n node.name = name;\n // @ts-expect-error mutate AST types\n node.type = \"PrivateIdentifier\";\n return node as unknown as N.EstreePrivateIdentifier;\n }\n\n // @ts-expect-error ESTree plugin changes node types\n isPrivateName(node: N.Node): node is N.EstreePrivateIdentifier {\n if (!process.env.BABEL_8_BREAKING) {\n if (!this.getPluginOption(\"estree\", \"classFeatures\")) {\n return super.isPrivateName(node);\n }\n }\n return node.type === \"PrivateIdentifier\";\n }\n\n // @ts-expect-error ESTree plugin changes node types\n getPrivateNameSV(node: N.EstreePrivateIdentifier): string {\n if (!process.env.BABEL_8_BREAKING) {\n if (!this.getPluginOption(\"estree\", \"classFeatures\")) {\n return super.getPrivateNameSV(node as unknown as N.PrivateName);\n }\n }\n return node.name;\n }\n\n // @ts-expect-error plugin may override interfaces\n parseLiteral(value: any, type: T[\"type\"]): T {\n const node = super.parseLiteral(value, type);\n // @ts-expect-error mutating AST types\n node.raw = node.extra.raw;\n delete node.extra;\n\n return node;\n }\n\n parseFunctionBody(\n node: N.Function,\n allowExpression?: boolean | null,\n isMethod: boolean = false,\n ): void {\n super.parseFunctionBody(node, allowExpression, isMethod);\n node.expression = node.body.type !== \"BlockStatement\";\n }\n\n // @ts-expect-error plugin may override interfaces\n parseMethod<\n T extends N.ClassPrivateMethod | N.ObjectMethod | N.ClassMethod,\n >(\n node: Undone,\n isGenerator: boolean,\n isAsync: boolean,\n isConstructor: boolean,\n allowDirectSuper: boolean,\n type: T[\"type\"],\n inClassScope: boolean = false,\n ): N.EstreeMethodDefinition {\n let funcNode = this.startNode();\n funcNode.kind = node.kind; // provide kind, so super method correctly sets state\n funcNode = super.parseMethod(\n // @ts-expect-error todo(flow->ts)\n funcNode,\n isGenerator,\n isAsync,\n isConstructor,\n allowDirectSuper,\n type,\n inClassScope,\n );\n // @ts-expect-error mutate AST types\n funcNode.type = \"FunctionExpression\";\n delete funcNode.kind;\n // @ts-expect-error mutate AST types\n node.value = funcNode;\n if (type === \"ClassPrivateMethod\") {\n node.computed = false;\n }\n return this.finishNode(\n // @ts-expect-error cast methods to estree types\n node as Undone,\n \"MethodDefinition\",\n );\n }\n\n nameIsConstructor(key: N.Expression | N.PrivateName): boolean {\n if (key.type === \"Literal\") return key.value === \"constructor\";\n return super.nameIsConstructor(key);\n }\n\n parseClassProperty(...args: [N.ClassProperty]): any {\n const propertyNode = super.parseClassProperty(...args) as any;\n if (!process.env.BABEL_8_BREAKING) {\n if (!this.getPluginOption(\"estree\", \"classFeatures\")) {\n return propertyNode as N.EstreePropertyDefinition;\n }\n }\n propertyNode.type = \"PropertyDefinition\";\n return propertyNode as N.EstreePropertyDefinition;\n }\n\n parseClassPrivateProperty(...args: [N.ClassPrivateProperty]): any {\n const propertyNode = super.parseClassPrivateProperty(...args) as any;\n if (!process.env.BABEL_8_BREAKING) {\n if (!this.getPluginOption(\"estree\", \"classFeatures\")) {\n return propertyNode as N.EstreePropertyDefinition;\n }\n }\n propertyNode.type = \"PropertyDefinition\";\n propertyNode.computed = false;\n return propertyNode as N.EstreePropertyDefinition;\n }\n\n parseObjectMethod(\n prop: N.ObjectMethod,\n isGenerator: boolean,\n isAsync: boolean,\n isPattern: boolean,\n isAccessor: boolean,\n ): N.ObjectMethod | undefined | null {\n const node: N.EstreeProperty = super.parseObjectMethod(\n prop,\n isGenerator,\n isAsync,\n isPattern,\n isAccessor,\n ) as any;\n\n if (node) {\n node.type = \"Property\";\n if ((node as any as N.ClassMethod).kind === \"method\") {\n node.kind = \"init\";\n }\n node.shorthand = false;\n }\n\n return node as any;\n }\n\n parseObjectProperty(\n prop: N.ObjectProperty,\n startLoc: Position | undefined | null,\n isPattern: boolean,\n refExpressionErrors?: ExpressionErrors | null,\n ): N.ObjectProperty | undefined | null {\n const node: N.EstreeProperty = super.parseObjectProperty(\n prop,\n startLoc,\n isPattern,\n refExpressionErrors,\n ) as any;\n\n if (node) {\n node.kind = \"init\";\n node.type = \"Property\";\n }\n\n return node as any;\n }\n\n isValidLVal(\n type: string,\n isUnparenthesizedInAssign: boolean,\n binding: BindingFlag,\n ) {\n return type === \"Property\"\n ? \"value\"\n : super.isValidLVal(type, isUnparenthesizedInAssign, binding);\n }\n\n isAssignable(node: N.Node, isBinding?: boolean): boolean {\n if (node != null && this.isObjectProperty(node)) {\n return this.isAssignable(node.value, isBinding);\n }\n return super.isAssignable(node, isBinding);\n }\n\n toAssignable(node: N.Node, isLHS: boolean = false): void {\n if (node != null && this.isObjectProperty(node)) {\n const { key, value } = node;\n if (this.isPrivateName(key)) {\n this.classScope.usePrivateName(\n this.getPrivateNameSV(key),\n key.loc.start,\n );\n }\n this.toAssignable(value, isLHS);\n } else {\n super.toAssignable(node, isLHS);\n }\n }\n\n toAssignableObjectExpressionProp(\n prop: N.Node,\n isLast: boolean,\n isLHS: boolean,\n ) {\n if (\n prop.type === \"Property\" &&\n (prop.kind === \"get\" || prop.kind === \"set\")\n ) {\n this.raise(Errors.PatternHasAccessor, prop.key);\n } else if (prop.type === \"Property\" && prop.method) {\n this.raise(Errors.PatternHasMethod, prop.key);\n } else {\n super.toAssignableObjectExpressionProp(prop, isLast, isLHS);\n }\n }\n\n finishCallExpression(\n unfinished: Undone,\n optional: boolean,\n ): T {\n const node = super.finishCallExpression(unfinished, optional);\n\n if (node.callee.type === \"Import\") {\n (node as N.Node as N.EstreeImportExpression).type = \"ImportExpression\";\n (node as N.Node as N.EstreeImportExpression).source = node\n .arguments[0] as N.Expression;\n if (\n this.hasPlugin(\"importAttributes\") ||\n this.hasPlugin(\"importAssertions\")\n ) {\n (node as N.Node as N.EstreeImportExpression).options =\n (node.arguments[1] as N.Expression) ?? null;\n // compatibility with previous ESTree AST\n (node as N.Node as N.EstreeImportExpression).attributes =\n (node.arguments[1] as N.Expression) ?? null;\n }\n // arguments isn't optional in the type definition\n delete node.arguments;\n // callee isn't optional in the type definition\n delete node.callee;\n }\n\n return node;\n }\n\n toReferencedArguments(\n node:\n | N.CallExpression\n | N.OptionalCallExpression\n | N.EstreeImportExpression,\n /* isParenthesizedExpr?: boolean, */\n ) {\n // ImportExpressions do not have an arguments array.\n if (node.type === \"ImportExpression\") {\n return;\n }\n\n super.toReferencedArguments(node);\n }\n\n parseExport(\n unfinished: Undone,\n decorators: N.Decorator[] | null,\n ) {\n const exportStartLoc = this.state.lastTokStartLoc;\n const node = super.parseExport(unfinished, decorators);\n\n switch (node.type) {\n case \"ExportAllDeclaration\":\n // @ts-expect-error mutating AST types\n node.exported = null;\n break;\n\n case \"ExportNamedDeclaration\":\n if (\n node.specifiers.length === 1 &&\n node.specifiers[0].type === \"ExportNamespaceSpecifier\"\n ) {\n // @ts-expect-error mutating AST types\n node.type = \"ExportAllDeclaration\";\n // @ts-expect-error mutating AST types\n node.exported = node.specifiers[0].exported;\n delete node.specifiers;\n }\n\n // fallthrough\n case \"ExportDefaultDeclaration\":\n {\n const { declaration } = node;\n if (\n declaration?.type === \"ClassDeclaration\" &&\n declaration.decorators?.length > 0 &&\n // decorator comes before export\n declaration.start === node.start\n ) {\n this.resetStartLocation(\n node,\n // For compatibility with ESLint's keyword-spacing rule, which assumes that an\n // export declaration must start with export.\n // https://github.com/babel/babel/issues/15085\n // Here we reset export declaration's start to be the start of the export token\n exportStartLoc,\n );\n }\n }\n\n break;\n }\n\n return node;\n }\n\n parseSubscript(\n base: N.Expression,\n startLoc: Position,\n noCalls: boolean | undefined | null,\n state: N.ParseSubscriptState,\n ): N.Expression {\n const node = super.parseSubscript(base, startLoc, noCalls, state);\n\n if (state.optionalChainMember) {\n // https://github.com/estree/estree/blob/master/es2020.md#chainexpression\n if (\n node.type === \"OptionalMemberExpression\" ||\n node.type === \"OptionalCallExpression\"\n ) {\n // strip Optional prefix\n (node as unknown as N.CallExpression | N.MemberExpression).type =\n node.type.substring(8) as \"CallExpression\" | \"MemberExpression\";\n }\n if (state.stop) {\n const chain = this.startNodeAtNode(node);\n chain.expression = node;\n return this.finishNode(chain, \"ChainExpression\");\n }\n } else if (\n node.type === \"MemberExpression\" ||\n node.type === \"CallExpression\"\n ) {\n // @ts-expect-error not in the type definitions\n node.optional = false;\n }\n\n return node;\n }\n\n isOptionalMemberExpression(node: N.Node) {\n if (node.type === \"ChainExpression\") {\n return node.expression.type === \"MemberExpression\";\n }\n return super.isOptionalMemberExpression(node);\n }\n\n hasPropertyAsPrivateName(node: N.Node): boolean {\n if (node.type === \"ChainExpression\") {\n node = node.expression;\n }\n return super.hasPropertyAsPrivateName(node);\n }\n\n // @ts-expect-error ESTree plugin changes node types\n isObjectProperty(node: N.Node): node is N.EstreeProperty {\n return node.type === \"Property\" && node.kind === \"init\" && !node.method;\n }\n\n // @ts-expect-error ESTree plugin changes node types\n isObjectMethod(node: N.Node): node is N.EstreeProperty {\n return (\n node.type === \"Property\" &&\n (node.method || node.kind === \"get\" || node.kind === \"set\")\n );\n }\n\n finishNodeAt(\n node: Undone,\n type: T[\"type\"],\n endLoc: Position,\n ): T {\n return toESTreeLocation(super.finishNodeAt(node, type, endLoc));\n }\n\n resetStartLocation(node: N.Node, startLoc: Position) {\n super.resetStartLocation(node, startLoc);\n toESTreeLocation(node);\n }\n\n resetEndLocation(\n node: NodeBase,\n endLoc: Position = this.state.lastTokEndLoc,\n ): void {\n super.resetEndLocation(node, endLoc);\n toESTreeLocation(node);\n }\n };\n","// The token context is used in JSX plugin to track\n// jsx tag / jsx text / normal JavaScript expression\n\nexport class TokContext {\n constructor(token: string, preserveSpace?: boolean) {\n this.token = token;\n this.preserveSpace = !!preserveSpace;\n }\n\n token: string;\n preserveSpace: boolean;\n}\n\nconst types: {\n [key: string]: TokContext;\n} = {\n brace: new TokContext(\"{\"), // normal JavaScript expression\n j_oTag: new TokContext(\"...\", true), // JSX expressions\n};\n\nif (!process.env.BABEL_8_BREAKING) {\n types.template = new TokContext(\"`\", true);\n}\n\nexport { types };\n","import { types as tc, type TokContext } from \"./context.ts\";\n// ## Token types\n\n// The assignment of fine-grained, information-carrying type objects\n// allows the tokenizer to store the information it has about a\n// token in a way that is very cheap for the parser to look up.\n\n// All token type variables start with an underscore, to make them\n// easy to recognize.\n\n// The `beforeExpr` property is used to disambiguate between 1) binary\n// expression (<) and JSX Tag start (); 2) object literal and JSX\n// texts. It is set on the `updateContext` function in the JSX plugin.\n\n// The `startsExpr` property is used to determine whether an expression\n// may be the “argument” subexpression of a `yield` expression or\n// `yield` statement. It is set on all token types that may be at the\n// start of a subexpression.\n\n// `isLoop` marks a keyword as starting a loop, which is important\n// to know when parsing a label, in order to allow or disallow\n// continue jumps to that label.\n\nconst beforeExpr = true;\nconst startsExpr = true;\nconst isLoop = true;\nconst isAssign = true;\nconst prefix = true;\nconst postfix = true;\n\ntype TokenOptions = {\n keyword?: string;\n beforeExpr?: boolean;\n startsExpr?: boolean;\n rightAssociative?: boolean;\n isLoop?: boolean;\n isAssign?: boolean;\n prefix?: boolean;\n postfix?: boolean;\n binop?: number | null;\n};\n\n// Internally the tokenizer stores token as a number\nexport type TokenType = number;\n\n// The `ExportedTokenType` is exported via `tokTypes` and accessible\n// when `tokens: true` is enabled. Unlike internal token type, it provides\n// metadata of the tokens.\nexport class ExportedTokenType {\n label: string;\n keyword: string | undefined | null;\n beforeExpr: boolean;\n startsExpr: boolean;\n rightAssociative: boolean;\n isLoop: boolean;\n isAssign: boolean;\n prefix: boolean;\n postfix: boolean;\n binop: number | undefined | null;\n // todo(Babel 8): remove updateContext from exposed token layout\n declare updateContext:\n | ((context: Array) => void)\n | undefined\n | null;\n\n constructor(label: string, conf: TokenOptions = {}) {\n this.label = label;\n this.keyword = conf.keyword;\n this.beforeExpr = !!conf.beforeExpr;\n this.startsExpr = !!conf.startsExpr;\n this.rightAssociative = !!conf.rightAssociative;\n this.isLoop = !!conf.isLoop;\n this.isAssign = !!conf.isAssign;\n this.prefix = !!conf.prefix;\n this.postfix = !!conf.postfix;\n this.binop = conf.binop != null ? conf.binop : null;\n if (!process.env.BABEL_8_BREAKING) {\n this.updateContext = null;\n }\n }\n}\n\n// A map from keyword/keyword-like string value to the token type\nexport const keywords = new Map();\n\nfunction createKeyword(name: string, options: TokenOptions = {}): TokenType {\n options.keyword = name;\n const token = createToken(name, options);\n keywords.set(name, token);\n return token;\n}\n\nfunction createBinop(name: string, binop: number) {\n return createToken(name, { beforeExpr, binop });\n}\n\nlet tokenTypeCounter = -1;\nexport const tokenTypes: ExportedTokenType[] = [];\nconst tokenLabels: string[] = [];\nconst tokenBinops: number[] = [];\nconst tokenBeforeExprs: boolean[] = [];\nconst tokenStartsExprs: boolean[] = [];\nconst tokenPrefixes: boolean[] = [];\n\nfunction createToken(name: string, options: TokenOptions = {}): TokenType {\n ++tokenTypeCounter;\n tokenLabels.push(name);\n tokenBinops.push(options.binop ?? -1);\n tokenBeforeExprs.push(options.beforeExpr ?? false);\n tokenStartsExprs.push(options.startsExpr ?? false);\n tokenPrefixes.push(options.prefix ?? false);\n tokenTypes.push(new ExportedTokenType(name, options));\n\n return tokenTypeCounter;\n}\n\nfunction createKeywordLike(\n name: string,\n options: TokenOptions = {},\n): TokenType {\n ++tokenTypeCounter;\n keywords.set(name, tokenTypeCounter);\n tokenLabels.push(name);\n tokenBinops.push(options.binop ?? -1);\n tokenBeforeExprs.push(options.beforeExpr ?? false);\n tokenStartsExprs.push(options.startsExpr ?? false);\n tokenPrefixes.push(options.prefix ?? false);\n // In the exported token type, we set the label as \"name\" for backward compatibility with Babel 7\n tokenTypes.push(new ExportedTokenType(\"name\", options));\n\n return tokenTypeCounter;\n}\n\n// For performance the token type helpers depend on the following declarations order.\n// When adding new token types, please also check if the token helpers need update.\n\nexport type InternalTokenTypes = typeof tt;\n\nexport const tt = {\n // Punctuation token types.\n bracketL: createToken(\"[\", { beforeExpr, startsExpr }),\n bracketHashL: createToken(\"#[\", { beforeExpr, startsExpr }),\n bracketBarL: createToken(\"[|\", { beforeExpr, startsExpr }),\n bracketR: createToken(\"]\"),\n bracketBarR: createToken(\"|]\"),\n braceL: createToken(\"{\", { beforeExpr, startsExpr }),\n braceBarL: createToken(\"{|\", { beforeExpr, startsExpr }),\n braceHashL: createToken(\"#{\", { beforeExpr, startsExpr }),\n braceR: createToken(\"}\"),\n braceBarR: createToken(\"|}\"),\n parenL: createToken(\"(\", { beforeExpr, startsExpr }),\n parenR: createToken(\")\"),\n comma: createToken(\",\", { beforeExpr }),\n semi: createToken(\";\", { beforeExpr }),\n colon: createToken(\":\", { beforeExpr }),\n doubleColon: createToken(\"::\", { beforeExpr }),\n dot: createToken(\".\"),\n question: createToken(\"?\", { beforeExpr }),\n questionDot: createToken(\"?.\"),\n arrow: createToken(\"=>\", { beforeExpr }),\n template: createToken(\"template\"),\n ellipsis: createToken(\"...\", { beforeExpr }),\n backQuote: createToken(\"`\", { startsExpr }),\n dollarBraceL: createToken(\"${\", { beforeExpr, startsExpr }),\n // start: isTemplate\n templateTail: createToken(\"...`\", { startsExpr }),\n templateNonTail: createToken(\"...${\", { beforeExpr, startsExpr }),\n // end: isTemplate\n at: createToken(\"@\"),\n hash: createToken(\"#\", { startsExpr }),\n\n // Special hashbang token.\n interpreterDirective: createToken(\"#!...\"),\n\n // Operators. These carry several kinds of properties to help the\n // parser use them properly (the presence of these properties is\n // what categorizes them as operators).\n //\n // `binop`, when present, specifies that this operator is a binary\n // operator, and will refer to its precedence.\n //\n // `prefix` and `postfix` mark the operator as a prefix or postfix\n // unary operator.\n //\n // `isAssign` marks all of `=`, `+=`, `-=` etcetera, which act as\n // binary operators with a very low precedence, that should result\n // in AssignmentExpression nodes.\n\n // start: isAssign\n eq: createToken(\"=\", { beforeExpr, isAssign }),\n assign: createToken(\"_=\", { beforeExpr, isAssign }),\n slashAssign: createToken(\"_=\", { beforeExpr, isAssign }),\n // These are only needed to support % and ^ as a Hack-pipe topic token.\n // When the proposal settles on a token, the others can be merged with\n // tt.assign.\n xorAssign: createToken(\"_=\", { beforeExpr, isAssign }),\n moduloAssign: createToken(\"_=\", { beforeExpr, isAssign }),\n // end: isAssign\n\n incDec: createToken(\"++/--\", { prefix, postfix, startsExpr }),\n bang: createToken(\"!\", { beforeExpr, prefix, startsExpr }),\n tilde: createToken(\"~\", { beforeExpr, prefix, startsExpr }),\n\n // More possible topic tokens.\n // When the proposal settles on a token, at least one of these may be removed.\n doubleCaret: createToken(\"^^\", { startsExpr }),\n doubleAt: createToken(\"@@\", { startsExpr }),\n\n // start: isBinop\n pipeline: createBinop(\"|>\", 0),\n nullishCoalescing: createBinop(\"??\", 1),\n logicalOR: createBinop(\"||\", 1),\n logicalAND: createBinop(\"&&\", 2),\n bitwiseOR: createBinop(\"|\", 3),\n bitwiseXOR: createBinop(\"^\", 4),\n bitwiseAND: createBinop(\"&\", 5),\n equality: createBinop(\"==/!=/===/!==\", 6),\n lt: createBinop(\"/<=/>=\", 7),\n gt: createBinop(\"/<=/>=\", 7),\n relational: createBinop(\"/<=/>=\", 7),\n bitShift: createBinop(\"<>/>>>\", 8),\n bitShiftL: createBinop(\"<>/>>>\", 8),\n bitShiftR: createBinop(\"<>/>>>\", 8),\n plusMin: createToken(\"+/-\", { beforeExpr, binop: 9, prefix, startsExpr }),\n // startsExpr: required by v8intrinsic plugin\n modulo: createToken(\"%\", { binop: 10, startsExpr }),\n // unset `beforeExpr` as it can be `function *`\n star: createToken(\"*\", { binop: 10 }),\n slash: createBinop(\"/\", 10),\n exponent: createToken(\"**\", {\n beforeExpr,\n binop: 11,\n rightAssociative: true,\n }),\n\n // Keywords\n // Don't forget to update packages/babel-helper-validator-identifier/src/keyword.js\n // when new keywords are added\n // start: isLiteralPropertyName\n // start: isKeyword\n _in: createKeyword(\"in\", { beforeExpr, binop: 7 }),\n _instanceof: createKeyword(\"instanceof\", { beforeExpr, binop: 7 }),\n // end: isBinop\n _break: createKeyword(\"break\"),\n _case: createKeyword(\"case\", { beforeExpr }),\n _catch: createKeyword(\"catch\"),\n _continue: createKeyword(\"continue\"),\n _debugger: createKeyword(\"debugger\"),\n _default: createKeyword(\"default\", { beforeExpr }),\n _else: createKeyword(\"else\", { beforeExpr }),\n _finally: createKeyword(\"finally\"),\n _function: createKeyword(\"function\", { startsExpr }),\n _if: createKeyword(\"if\"),\n _return: createKeyword(\"return\", { beforeExpr }),\n _switch: createKeyword(\"switch\"),\n _throw: createKeyword(\"throw\", { beforeExpr, prefix, startsExpr }),\n _try: createKeyword(\"try\"),\n _var: createKeyword(\"var\"),\n _const: createKeyword(\"const\"),\n _with: createKeyword(\"with\"),\n _new: createKeyword(\"new\", { beforeExpr, startsExpr }),\n _this: createKeyword(\"this\", { startsExpr }),\n _super: createKeyword(\"super\", { startsExpr }),\n _class: createKeyword(\"class\", { startsExpr }),\n _extends: createKeyword(\"extends\", { beforeExpr }),\n _export: createKeyword(\"export\"),\n _import: createKeyword(\"import\", { startsExpr }),\n _null: createKeyword(\"null\", { startsExpr }),\n _true: createKeyword(\"true\", { startsExpr }),\n _false: createKeyword(\"false\", { startsExpr }),\n _typeof: createKeyword(\"typeof\", { beforeExpr, prefix, startsExpr }),\n _void: createKeyword(\"void\", { beforeExpr, prefix, startsExpr }),\n _delete: createKeyword(\"delete\", { beforeExpr, prefix, startsExpr }),\n // start: isLoop\n _do: createKeyword(\"do\", { isLoop, beforeExpr }),\n _for: createKeyword(\"for\", { isLoop }),\n _while: createKeyword(\"while\", { isLoop }),\n // end: isLoop\n // end: isKeyword\n\n // Primary literals\n // start: isIdentifier\n _as: createKeywordLike(\"as\", { startsExpr }),\n _assert: createKeywordLike(\"assert\", { startsExpr }),\n _async: createKeywordLike(\"async\", { startsExpr }),\n _await: createKeywordLike(\"await\", { startsExpr }),\n _defer: createKeywordLike(\"defer\", { startsExpr }),\n _from: createKeywordLike(\"from\", { startsExpr }),\n _get: createKeywordLike(\"get\", { startsExpr }),\n _let: createKeywordLike(\"let\", { startsExpr }),\n _meta: createKeywordLike(\"meta\", { startsExpr }),\n _of: createKeywordLike(\"of\", { startsExpr }),\n _sent: createKeywordLike(\"sent\", { startsExpr }),\n _set: createKeywordLike(\"set\", { startsExpr }),\n _source: createKeywordLike(\"source\", { startsExpr }),\n _static: createKeywordLike(\"static\", { startsExpr }),\n _using: createKeywordLike(\"using\", { startsExpr }),\n _yield: createKeywordLike(\"yield\", { startsExpr }),\n\n // Flow and TypeScript Keywordlike\n _asserts: createKeywordLike(\"asserts\", { startsExpr }),\n _checks: createKeywordLike(\"checks\", { startsExpr }),\n _exports: createKeywordLike(\"exports\", { startsExpr }),\n _global: createKeywordLike(\"global\", { startsExpr }),\n _implements: createKeywordLike(\"implements\", { startsExpr }),\n _intrinsic: createKeywordLike(\"intrinsic\", { startsExpr }),\n _infer: createKeywordLike(\"infer\", { startsExpr }),\n _is: createKeywordLike(\"is\", { startsExpr }),\n _mixins: createKeywordLike(\"mixins\", { startsExpr }),\n _proto: createKeywordLike(\"proto\", { startsExpr }),\n _require: createKeywordLike(\"require\", { startsExpr }),\n _satisfies: createKeywordLike(\"satisfies\", { startsExpr }),\n // start: isTSTypeOperator\n _keyof: createKeywordLike(\"keyof\", { startsExpr }),\n _readonly: createKeywordLike(\"readonly\", { startsExpr }),\n _unique: createKeywordLike(\"unique\", { startsExpr }),\n // end: isTSTypeOperator\n // start: isTSDeclarationStart\n _abstract: createKeywordLike(\"abstract\", { startsExpr }),\n _declare: createKeywordLike(\"declare\", { startsExpr }),\n _enum: createKeywordLike(\"enum\", { startsExpr }),\n _module: createKeywordLike(\"module\", { startsExpr }),\n _namespace: createKeywordLike(\"namespace\", { startsExpr }),\n // start: isFlowInterfaceOrTypeOrOpaque\n _interface: createKeywordLike(\"interface\", { startsExpr }),\n _type: createKeywordLike(\"type\", { startsExpr }),\n // end: isTSDeclarationStart\n _opaque: createKeywordLike(\"opaque\", { startsExpr }),\n // end: isFlowInterfaceOrTypeOrOpaque\n name: createToken(\"name\", { startsExpr }),\n // end: isIdentifier\n\n string: createToken(\"string\", { startsExpr }),\n num: createToken(\"num\", { startsExpr }),\n bigint: createToken(\"bigint\", { startsExpr }),\n decimal: createToken(\"decimal\", { startsExpr }),\n // end: isLiteralPropertyName\n regexp: createToken(\"regexp\", { startsExpr }),\n privateName: createToken(\"#name\", { startsExpr }),\n eof: createToken(\"eof\"),\n\n // jsx plugin\n jsxName: createToken(\"jsxName\"),\n jsxText: createToken(\"jsxText\", { beforeExpr: true }),\n jsxTagStart: createToken(\"jsxTagStart\", { startsExpr: true }),\n jsxTagEnd: createToken(\"jsxTagEnd\"),\n\n // placeholder plugin\n placeholder: createToken(\"%%\", { startsExpr: true }),\n} as const;\n\nexport function tokenIsIdentifier(token: TokenType): boolean {\n return token >= tt._as && token <= tt.name;\n}\n\nexport function tokenKeywordOrIdentifierIsKeyword(token: TokenType): boolean {\n // we can remove the token >= tt._in check when we\n // know a token is either keyword or identifier\n return token <= tt._while;\n}\n\nexport function tokenIsKeywordOrIdentifier(token: TokenType): boolean {\n return token >= tt._in && token <= tt.name;\n}\n\nexport function tokenIsLiteralPropertyName(token: TokenType): boolean {\n return token >= tt._in && token <= tt.decimal;\n}\n\nexport function tokenComesBeforeExpression(token: TokenType): boolean {\n return tokenBeforeExprs[token];\n}\n\nexport function tokenCanStartExpression(token: TokenType): boolean {\n return tokenStartsExprs[token];\n}\n\nexport function tokenIsAssignment(token: TokenType): boolean {\n return token >= tt.eq && token <= tt.moduloAssign;\n}\n\nexport function tokenIsFlowInterfaceOrTypeOrOpaque(token: TokenType): boolean {\n return token >= tt._interface && token <= tt._opaque;\n}\n\nexport function tokenIsLoop(token: TokenType): boolean {\n return token >= tt._do && token <= tt._while;\n}\n\nexport function tokenIsKeyword(token: TokenType): boolean {\n return token >= tt._in && token <= tt._while;\n}\n\nexport function tokenIsOperator(token: TokenType): boolean {\n return token >= tt.pipeline && token <= tt._instanceof;\n}\n\nexport function tokenIsPostfix(token: TokenType): boolean {\n return token === tt.incDec;\n}\n\nexport function tokenIsPrefix(token: TokenType): boolean {\n return tokenPrefixes[token];\n}\n\nexport function tokenIsTSTypeOperator(token: TokenType): boolean {\n return token >= tt._keyof && token <= tt._unique;\n}\n\nexport function tokenIsTSDeclarationStart(token: TokenType): boolean {\n return token >= tt._abstract && token <= tt._type;\n}\n\nexport function tokenLabelName(token: TokenType): string {\n return tokenLabels[token];\n}\n\nexport function tokenOperatorPrecedence(token: TokenType): number {\n return tokenBinops[token];\n}\n\nexport function tokenIsBinaryOperator(token: TokenType): boolean {\n return tokenBinops[token] !== -1;\n}\n\nexport function tokenIsRightAssociative(token: TokenType): boolean {\n return token === tt.exponent;\n}\n\nexport function tokenIsTemplate(token: TokenType): boolean {\n return token >= tt.templateTail && token <= tt.templateNonTail;\n}\n\nexport function getExportedToken(token: TokenType): ExportedTokenType {\n return tokenTypes[token];\n}\n\nexport function isTokenType(obj: any): boolean {\n return typeof obj === \"number\";\n}\n\nif (!process.env.BABEL_8_BREAKING) {\n tokenTypes[tt.braceR].updateContext = context => {\n context.pop();\n };\n\n tokenTypes[tt.braceL].updateContext =\n tokenTypes[tt.braceHashL].updateContext =\n tokenTypes[tt.dollarBraceL].updateContext =\n context => {\n context.push(tc.brace);\n };\n\n tokenTypes[tt.backQuote].updateContext = context => {\n if (context[context.length - 1] === tc.template) {\n context.pop();\n } else {\n context.push(tc.template);\n }\n };\n\n tokenTypes[tt.jsxTagStart].updateContext = context => {\n context.push(tc.j_expr, tc.j_oTag);\n };\n}\n","import * as charCodes from \"charcodes\";\nimport { isIdentifierStart } from \"@babel/helper-validator-identifier\";\n\nexport {\n isIdentifierStart,\n isIdentifierChar,\n isReservedWord,\n isStrictBindOnlyReservedWord,\n isStrictBindReservedWord,\n isStrictReservedWord,\n isKeyword,\n} from \"@babel/helper-validator-identifier\";\n\nexport const keywordRelationalOperator = /^in(stanceof)?$/;\n\n// Test whether a current state character code and next character code is @\n\nexport function isIteratorStart(\n current: number,\n next: number,\n next2: number,\n): boolean {\n return (\n current === charCodes.atSign &&\n next === charCodes.atSign &&\n isIdentifierStart(next2)\n );\n}\n\n// This is the comprehensive set of JavaScript reserved words\n// If a word is in this set, it could be a reserved word,\n// depending on sourceType/strictMode/binding info. In other words\n// if a word is not in this set, it is not a reserved word under\n// any circumstance.\nconst reservedWordLikeSet = new Set([\n \"break\",\n \"case\",\n \"catch\",\n \"continue\",\n \"debugger\",\n \"default\",\n \"do\",\n \"else\",\n \"finally\",\n \"for\",\n \"function\",\n \"if\",\n \"return\",\n \"switch\",\n \"throw\",\n \"try\",\n \"var\",\n \"const\",\n \"while\",\n \"with\",\n \"new\",\n \"this\",\n \"super\",\n \"class\",\n \"extends\",\n \"export\",\n \"import\",\n \"null\",\n \"true\",\n \"false\",\n \"in\",\n \"instanceof\",\n \"typeof\",\n \"void\",\n \"delete\",\n // strict\n \"implements\",\n \"interface\",\n \"let\",\n \"package\",\n \"private\",\n \"protected\",\n \"public\",\n \"static\",\n \"yield\",\n // strictBind\n \"eval\",\n \"arguments\",\n // reservedWorkLike\n \"enum\",\n \"await\",\n]);\n\nexport function canBeReservedWord(word: string): boolean {\n return reservedWordLikeSet.has(word);\n}\n","// Each scope gets a bitset that may contain these flags\n/* prettier-ignore */\nexport const enum ScopeFlag {\n OTHER = 0b000000000,\n PROGRAM = 0b000000001,\n FUNCTION = 0b000000010,\n ARROW = 0b000000100,\n SIMPLE_CATCH = 0b000001000,\n SUPER = 0b000010000,\n DIRECT_SUPER = 0b000100000,\n CLASS = 0b001000000,\n STATIC_BLOCK = 0b010000000,\n TS_MODULE = 0b100000000,\n VAR = PROGRAM | FUNCTION | STATIC_BLOCK | TS_MODULE,\n}\n\n/* prettier-ignore */\nexport const enum BindingFlag {\n // These flags are meant to be _only_ used inside the Scope class (or subclasses).\n KIND_VALUE = 0b0000000_0000_01,\n KIND_TYPE = 0b0000000_0000_10,\n // Used in checkLVal and declareName to determine the type of a binding\n SCOPE_VAR = 0b0000000_0001_00, // Var-style binding\n SCOPE_LEXICAL = 0b0000000_0010_00, // Let- or const-style binding\n SCOPE_FUNCTION = 0b0000000_0100_00, // Function declaration\n SCOPE_OUTSIDE = 0b0000000_1000_00, // Special case for function names as\n // bound inside the function\n // Misc flags\n FLAG_NONE = 0b00000001_0000_00,\n FLAG_CLASS = 0b00000010_0000_00,\n FLAG_TS_ENUM = 0b00000100_0000_00,\n FLAG_TS_CONST_ENUM = 0b00001000_0000_00,\n FLAG_TS_EXPORT_ONLY = 0b00010000_0000_00,\n FLAG_FLOW_DECLARE_FN = 0b00100000_0000_00,\n FLAG_TS_IMPORT = 0b01000000_0000_00,\n // Whether \"let\" should be allowed in bound names in sloppy mode\n FLAG_NO_LET_IN_LEXICAL = 0b10000000_0000_00,\n\n // These flags are meant to be _only_ used by Scope consumers\n/* prettier-ignore */\n /* = is value? | is type? | scope | misc flags */\n TYPE_CLASS = KIND_VALUE | KIND_TYPE | SCOPE_LEXICAL | FLAG_CLASS|FLAG_NO_LET_IN_LEXICAL,\n TYPE_LEXICAL = KIND_VALUE | 0 | SCOPE_LEXICAL | FLAG_NO_LET_IN_LEXICAL,\n TYPE_CATCH_PARAM = KIND_VALUE | 0 | SCOPE_LEXICAL | 0,\n TYPE_VAR = KIND_VALUE | 0 | SCOPE_VAR | 0,\n TYPE_FUNCTION = KIND_VALUE | 0 | SCOPE_FUNCTION | 0,\n TYPE_TS_INTERFACE = 0 | KIND_TYPE | 0 | FLAG_CLASS,\n TYPE_TS_TYPE = 0 | KIND_TYPE | 0 | 0,\n TYPE_TS_ENUM = KIND_VALUE | KIND_TYPE | SCOPE_LEXICAL | FLAG_TS_ENUM|FLAG_NO_LET_IN_LEXICAL,\n TYPE_TS_AMBIENT = 0 | 0 | 0 | FLAG_TS_EXPORT_ONLY,\n // These bindings don't introduce anything in the scope. They are used for assignments and\n // function expressions IDs.\n TYPE_NONE = 0 | 0 | 0 | FLAG_NONE,\n TYPE_OUTSIDE = KIND_VALUE | 0 | 0 | FLAG_NONE,\n TYPE_TS_CONST_ENUM = TYPE_TS_ENUM | FLAG_TS_CONST_ENUM,\n TYPE_TS_NAMESPACE = 0 | 0 | 0 | FLAG_TS_EXPORT_ONLY,\n TYPE_TS_TYPE_IMPORT = 0 | KIND_TYPE | 0 | FLAG_TS_IMPORT,\n TYPE_TS_VALUE_IMPORT = 0 | 0 | 0 | FLAG_TS_IMPORT,\n TYPE_FLOW_DECLARE_FN = 0 | 0 | 0 | FLAG_FLOW_DECLARE_FN,\n}\n\n/* prettier-ignore */\nexport const enum ClassElementType {\n OTHER = 0,\n FLAG_STATIC = 0b1_00,\n KIND_GETTER = 0b0_10,\n KIND_SETTER = 0b0_01,\n KIND_ACCESSOR = KIND_GETTER | KIND_SETTER,\n\n STATIC_GETTER = FLAG_STATIC | KIND_GETTER,\n STATIC_SETTER = FLAG_STATIC | KIND_SETTER,\n INSTANCE_GETTER = KIND_GETTER,\n INSTANCE_SETTER = KIND_SETTER,\n}\n","import { ScopeFlag, BindingFlag } from \"./scopeflags.ts\";\nimport type { Position } from \"./location.ts\";\nimport type * as N from \"../types.ts\";\nimport { Errors } from \"../parse-error.ts\";\nimport type Tokenizer from \"../tokenizer/index.ts\";\n\nexport const enum NameType {\n // var-declared names in the current lexical scope\n Var = 1 << 0,\n // lexically-declared names in the current lexical scope\n Lexical = 1 << 1,\n // lexically-declared FunctionDeclaration names in the current lexical scope\n Function = 1 << 2,\n}\n\n// Start an AST node, attaching a start offset.\nexport class Scope {\n flags: ScopeFlag = 0;\n names: Map = new Map();\n firstLexicalName = \"\";\n\n constructor(flags: ScopeFlag) {\n this.flags = flags;\n }\n}\n\n// The functions in this module keep track of declared variables in the\n// current scope in order to detect duplicate variable names.\nexport default class ScopeHandler {\n parser: Tokenizer;\n scopeStack: Array = [];\n inModule: boolean;\n undefinedExports: Map = new Map();\n\n constructor(parser: Tokenizer, inModule: boolean) {\n this.parser = parser;\n this.inModule = inModule;\n }\n\n get inTopLevel() {\n return (this.currentScope().flags & ScopeFlag.PROGRAM) > 0;\n }\n get inFunction() {\n return (this.currentVarScopeFlags() & ScopeFlag.FUNCTION) > 0;\n }\n get allowSuper() {\n return (this.currentThisScopeFlags() & ScopeFlag.SUPER) > 0;\n }\n get allowDirectSuper() {\n return (this.currentThisScopeFlags() & ScopeFlag.DIRECT_SUPER) > 0;\n }\n get inClass() {\n return (this.currentThisScopeFlags() & ScopeFlag.CLASS) > 0;\n }\n get inClassAndNotInNonArrowFunction() {\n const flags = this.currentThisScopeFlags();\n return (flags & ScopeFlag.CLASS) > 0 && (flags & ScopeFlag.FUNCTION) === 0;\n }\n get inStaticBlock() {\n for (let i = this.scopeStack.length - 1; ; i--) {\n const { flags } = this.scopeStack[i];\n if (flags & ScopeFlag.STATIC_BLOCK) {\n return true;\n }\n if (flags & (ScopeFlag.VAR | ScopeFlag.CLASS)) {\n // function body, module body, class property initializers\n return false;\n }\n }\n }\n get inNonArrowFunction() {\n return (this.currentThisScopeFlags() & ScopeFlag.FUNCTION) > 0;\n }\n get treatFunctionsAsVar() {\n return this.treatFunctionsAsVarInScope(this.currentScope());\n }\n\n createScope(flags: ScopeFlag): Scope {\n return new Scope(flags);\n }\n\n enter(flags: ScopeFlag) {\n /*:: +createScope: (flags:ScopeFlag) => IScope; */\n // @ts-expect-error This method will be overwritten by subclasses\n this.scopeStack.push(this.createScope(flags));\n }\n\n exit(): ScopeFlag {\n const scope = this.scopeStack.pop();\n return scope.flags;\n }\n\n // The spec says:\n // > At the top level of a function, or script, function declarations are\n // > treated like var declarations rather than like lexical declarations.\n treatFunctionsAsVarInScope(scope: IScope): boolean {\n return !!(\n scope.flags & (ScopeFlag.FUNCTION | ScopeFlag.STATIC_BLOCK) ||\n (!this.parser.inModule && scope.flags & ScopeFlag.PROGRAM)\n );\n }\n\n declareName(name: string, bindingType: BindingFlag, loc: Position) {\n let scope = this.currentScope();\n if (\n bindingType & BindingFlag.SCOPE_LEXICAL ||\n bindingType & BindingFlag.SCOPE_FUNCTION\n ) {\n this.checkRedeclarationInScope(scope, name, bindingType, loc);\n\n let type = scope.names.get(name) || 0;\n\n if (bindingType & BindingFlag.SCOPE_FUNCTION) {\n type = type | NameType.Function;\n } else {\n if (!scope.firstLexicalName) {\n scope.firstLexicalName = name;\n }\n type = type | NameType.Lexical;\n }\n\n scope.names.set(name, type);\n\n if (bindingType & BindingFlag.SCOPE_LEXICAL) {\n this.maybeExportDefined(scope, name);\n }\n } else if (bindingType & BindingFlag.SCOPE_VAR) {\n for (let i = this.scopeStack.length - 1; i >= 0; --i) {\n scope = this.scopeStack[i];\n this.checkRedeclarationInScope(scope, name, bindingType, loc);\n scope.names.set(name, (scope.names.get(name) || 0) | NameType.Var);\n this.maybeExportDefined(scope, name);\n\n if (scope.flags & ScopeFlag.VAR) break;\n }\n }\n if (this.parser.inModule && scope.flags & ScopeFlag.PROGRAM) {\n this.undefinedExports.delete(name);\n }\n }\n\n maybeExportDefined(scope: IScope, name: string) {\n if (this.parser.inModule && scope.flags & ScopeFlag.PROGRAM) {\n this.undefinedExports.delete(name);\n }\n }\n\n checkRedeclarationInScope(\n scope: IScope,\n name: string,\n bindingType: BindingFlag,\n loc: Position,\n ) {\n if (this.isRedeclaredInScope(scope, name, bindingType)) {\n this.parser.raise(Errors.VarRedeclaration, loc, {\n identifierName: name,\n });\n }\n }\n\n isRedeclaredInScope(\n scope: IScope,\n name: string,\n bindingType: BindingFlag,\n ): boolean {\n if (!(bindingType & BindingFlag.KIND_VALUE)) return false;\n\n if (bindingType & BindingFlag.SCOPE_LEXICAL) {\n return scope.names.has(name);\n }\n\n const type = scope.names.get(name);\n\n if (bindingType & BindingFlag.SCOPE_FUNCTION) {\n return (\n (type & NameType.Lexical) > 0 ||\n (!this.treatFunctionsAsVarInScope(scope) && (type & NameType.Var) > 0)\n );\n }\n\n return (\n ((type & NameType.Lexical) > 0 &&\n // Annex B.3.4\n // https://tc39.es/ecma262/#sec-variablestatements-in-catch-blocks\n !(\n scope.flags & ScopeFlag.SIMPLE_CATCH &&\n scope.firstLexicalName === name\n )) ||\n (!this.treatFunctionsAsVarInScope(scope) &&\n (type & NameType.Function) > 0)\n );\n }\n\n checkLocalExport(id: N.Identifier) {\n const { name } = id;\n const topLevelScope = this.scopeStack[0];\n if (!topLevelScope.names.has(name)) {\n this.undefinedExports.set(name, id.loc.start);\n }\n }\n\n currentScope(): IScope {\n return this.scopeStack[this.scopeStack.length - 1];\n }\n\n currentVarScopeFlags(): ScopeFlag {\n for (let i = this.scopeStack.length - 1; ; i--) {\n const { flags } = this.scopeStack[i];\n if (flags & ScopeFlag.VAR) {\n return flags;\n }\n }\n }\n\n // Could be useful for `arguments`, `this`, `new.target`, `super()`, `super.property`, and `super[property]`.\n currentThisScopeFlags(): ScopeFlag {\n for (let i = this.scopeStack.length - 1; ; i--) {\n const { flags } = this.scopeStack[i];\n if (\n flags & (ScopeFlag.VAR | ScopeFlag.CLASS) &&\n !(flags & ScopeFlag.ARROW)\n ) {\n return flags;\n }\n }\n }\n}\n","import type { Position } from \"../../util/location.ts\";\nimport ScopeHandler, { NameType, Scope } from \"../../util/scope.ts\";\nimport { BindingFlag, type ScopeFlag } from \"../../util/scopeflags.ts\";\nimport type * as N from \"../../types.ts\";\n\n// Reference implementation: https://github.com/facebook/flow/blob/23aeb2a2ef6eb4241ce178fde5d8f17c5f747fb5/src/typing/env.ml#L536-L584\nclass FlowScope extends Scope {\n // declare function foo(): type;\n declareFunctions: Set = new Set();\n}\n\nexport default class FlowScopeHandler extends ScopeHandler {\n createScope(flags: ScopeFlag): FlowScope {\n return new FlowScope(flags);\n }\n\n declareName(name: string, bindingType: BindingFlag, loc: Position) {\n const scope = this.currentScope();\n if (bindingType & BindingFlag.FLAG_FLOW_DECLARE_FN) {\n this.checkRedeclarationInScope(scope, name, bindingType, loc);\n this.maybeExportDefined(scope, name);\n scope.declareFunctions.add(name);\n return;\n }\n\n super.declareName(name, bindingType, loc);\n }\n\n isRedeclaredInScope(\n scope: FlowScope,\n name: string,\n bindingType: BindingFlag,\n ): boolean {\n if (super.isRedeclaredInScope(scope, name, bindingType)) return true;\n\n if (\n bindingType & BindingFlag.FLAG_FLOW_DECLARE_FN &&\n !scope.declareFunctions.has(name)\n ) {\n const type = scope.names.get(name);\n return (type & NameType.Function) > 0 || (type & NameType.Lexical) > 0;\n }\n\n return false;\n }\n\n checkLocalExport(id: N.Identifier) {\n if (!this.scopeStack[0].declareFunctions.has(id.name)) {\n super.checkLocalExport(id);\n }\n }\n}\n","/*:: declare var invariant; */\n\nimport BaseParser from \"./base.ts\";\nimport type { Comment, Node, Identifier } from \"../types.ts\";\nimport * as charCodes from \"charcodes\";\nimport type { Undone } from \"./node.ts\";\n\n/**\n * A whitespace token containing comments\n */\nexport type CommentWhitespace = {\n /**\n * the start of the whitespace token.\n */\n start: number;\n /**\n * the end of the whitespace token.\n */\n end: number;\n /**\n * the containing comments\n */\n comments: Array;\n /**\n * the immediately preceding AST node of the whitespace token\n */\n leadingNode: Node | null;\n /**\n * the immediately following AST node of the whitespace token\n */\n trailingNode: Node | null;\n /**\n * the innermost AST node containing the whitespace with minimal size (|end - start|)\n */\n containingNode: Node | null;\n};\n\n/**\n * Merge comments with node's trailingComments or assign comments to be\n * trailingComments. New comments will be placed before old comments\n * because the commentStack is enumerated reversely.\n */\nfunction setTrailingComments(node: Undone, comments: Array) {\n if (node.trailingComments === undefined) {\n node.trailingComments = comments;\n } else {\n node.trailingComments.unshift(...comments);\n }\n}\n\n/**\n * Merge comments with node's leadingComments or assign comments to be\n * leadingComments. New comments will be placed before old comments\n * because the commentStack is enumerated reversely.\n */\nfunction setLeadingComments(node: Undone, comments: Array) {\n if (node.leadingComments === undefined) {\n node.leadingComments = comments;\n } else {\n node.leadingComments.unshift(...comments);\n }\n}\n\n/**\n * Merge comments with node's innerComments or assign comments to be\n * innerComments. New comments will be placed before old comments\n * because the commentStack is enumerated reversely.\n */\nexport function setInnerComments(\n node: Undone,\n comments?: Array,\n) {\n if (node.innerComments === undefined) {\n node.innerComments = comments;\n } else {\n node.innerComments.unshift(...comments);\n }\n}\n\n/**\n * Given node and elements array, if elements has non-null element,\n * merge comments to its trailingComments, otherwise merge comments\n * to node's innerComments\n */\nfunction adjustInnerComments(\n node: Undone,\n elements: Array,\n commentWS: CommentWhitespace,\n) {\n let lastElement = null;\n let i = elements.length;\n while (lastElement === null && i > 0) {\n lastElement = elements[--i];\n }\n if (lastElement === null || lastElement.start > commentWS.start) {\n setInnerComments(node, commentWS.comments);\n } else {\n setTrailingComments(lastElement, commentWS.comments);\n }\n}\n\nexport default class CommentsParser extends BaseParser {\n addComment(comment: Comment): void {\n if (this.filename) comment.loc.filename = this.filename;\n const { commentsLen } = this.state;\n if (this.comments.length !== commentsLen) {\n this.comments.length = commentsLen;\n }\n this.comments.push(comment);\n this.state.commentsLen++;\n }\n\n /**\n * Given a newly created AST node _n_, attach _n_ to a comment whitespace _w_ if applicable\n * {@see {@link CommentWhitespace}}\n */\n processComment(node: Node): void {\n const { commentStack } = this.state;\n const commentStackLength = commentStack.length;\n if (commentStackLength === 0) return;\n let i = commentStackLength - 1;\n const lastCommentWS = commentStack[i];\n\n if (lastCommentWS.start === node.end) {\n lastCommentWS.leadingNode = node;\n i--;\n }\n\n const { start: nodeStart } = node;\n // invariant: for all 0 <= j <= i, let c = commentStack[j], c must satisfy c.end < node.end\n for (; i >= 0; i--) {\n const commentWS = commentStack[i];\n const commentEnd = commentWS.end;\n if (commentEnd > nodeStart) {\n // by definition of commentWhiteSpace, this implies commentWS.start > nodeStart\n // so node can be a containingNode candidate. At this time we can finalize the comment\n // whitespace, because\n // 1) its leadingNode or trailingNode, if exists, will not change\n // 2) its containingNode have been assigned and will not change because it is the\n // innermost minimal-sized AST node\n commentWS.containingNode = node;\n this.finalizeComment(commentWS);\n commentStack.splice(i, 1);\n } else {\n if (commentEnd === nodeStart) {\n commentWS.trailingNode = node;\n }\n // stop the loop when commentEnd <= nodeStart\n break;\n }\n }\n }\n\n /**\n * Assign the comments of comment whitespaces to related AST nodes.\n * Also adjust innerComments following trailing comma.\n */\n finalizeComment(commentWS: CommentWhitespace) {\n const { comments } = commentWS;\n if (commentWS.leadingNode !== null || commentWS.trailingNode !== null) {\n if (commentWS.leadingNode !== null) {\n setTrailingComments(commentWS.leadingNode, comments);\n }\n if (commentWS.trailingNode !== null) {\n setLeadingComments(commentWS.trailingNode, comments);\n }\n } else {\n /*:: invariant(commentWS.containingNode !== null) */\n const { containingNode: node, start: commentStart } = commentWS;\n if (this.input.charCodeAt(commentStart - 1) === charCodes.comma) {\n // If a commentWhitespace follows a comma and the containingNode allows\n // list structures with trailing comma, merge it to the trailingComment\n // of the last non-null list element\n switch (node.type) {\n case \"ObjectExpression\":\n case \"ObjectPattern\":\n case \"RecordExpression\":\n adjustInnerComments(node, node.properties, commentWS);\n break;\n case \"CallExpression\":\n case \"OptionalCallExpression\":\n adjustInnerComments(node, node.arguments, commentWS);\n break;\n case \"FunctionDeclaration\":\n case \"FunctionExpression\":\n case \"ArrowFunctionExpression\":\n case \"ObjectMethod\":\n case \"ClassMethod\":\n case \"ClassPrivateMethod\":\n adjustInnerComments(node, node.params, commentWS);\n break;\n case \"ArrayExpression\":\n case \"ArrayPattern\":\n case \"TupleExpression\":\n adjustInnerComments(node, node.elements, commentWS);\n break;\n case \"ExportNamedDeclaration\":\n case \"ImportDeclaration\":\n adjustInnerComments(node, node.specifiers, commentWS);\n break;\n default: {\n setInnerComments(node, comments);\n }\n }\n } else {\n setInnerComments(node, comments);\n }\n }\n }\n\n /**\n * Drains remaining commentStack and applies finalizeComment\n * to each comment whitespace. Used only in parseExpression\n * where the top level AST node is _not_ Program\n * {@see {@link CommentsParser#finalizeComment}}\n */\n finalizeRemainingComments() {\n const { commentStack } = this.state;\n for (let i = commentStack.length - 1; i >= 0; i--) {\n this.finalizeComment(commentStack[i]);\n }\n this.state.commentStack = [];\n }\n\n /* eslint-disable no-irregular-whitespace */\n /**\n * Reset previous node trailing comments. Used in object / class\n * property parsing. We parse `async`, `static`, `set` and `get`\n * as an identifier but may reinterpret it into an async/static/accessor\n * method later. In this case the identifier is not part of the AST and we\n * should sync the knowledge to commentStacks\n *\n * For example, when parsing\n * ```\n * async /* 1 *​/ function f() {}\n * ```\n * the comment whitespace `/* 1 *​/` has leading node Identifier(async). When\n * we see the function token, we create a Function node and mark `/* 1 *​/` as\n * inner comments. So `/* 1 *​/` should be detached from the Identifier node.\n *\n * @param node the last finished AST node _before_ current token\n */\n /* eslint-enable no-irregular-whitespace */\n resetPreviousNodeTrailingComments(node: Node) {\n const { commentStack } = this.state;\n const { length } = commentStack;\n if (length === 0) return;\n const commentWS = commentStack[length - 1];\n if (commentWS.leadingNode === node) {\n commentWS.leadingNode = null;\n }\n }\n\n /* eslint-disable no-irregular-whitespace */\n /**\n * Reset previous node leading comments, assuming that `node` is a\n * single-token node. Used in import phase modifiers parsing. We parse\n * `module` in `import module foo from ...` as an identifier but may\n * reinterpret it into a phase modifier later. In this case the identifier is\n * not part of the AST and we should sync the knowledge to commentStacks\n *\n * For example, when parsing\n * ```\n * import /* 1 *​/ module a from \"a\";\n * ```\n * the comment whitespace `/* 1 *​/` has trailing node Identifier(module). When\n * we see that `module` is not a default import binding, we mark `/* 1 *​/` as\n * inner comments of the ImportDeclaration. So `/* 1 *​/` should be detached from\n * the Identifier node.\n *\n * @param node the last finished AST node _before_ current token\n */\n /* eslint-enable no-irregular-whitespace */\n resetPreviousIdentifierLeadingComments(node: Identifier) {\n const { commentStack } = this.state;\n const { length } = commentStack;\n if (length === 0) return;\n\n if (commentStack[length - 1].trailingNode === node) {\n commentStack[length - 1].trailingNode = null;\n } else if (length >= 2 && commentStack[length - 2].trailingNode === node) {\n commentStack[length - 2].trailingNode = null;\n }\n }\n\n /**\n * Attach a node to the comment whitespaces right before/after\n * the given range.\n *\n * This is used to properly attach comments around parenthesized\n * expressions as leading/trailing comments of the inner expression.\n */\n takeSurroundingComments(node: Node, start: number, end: number) {\n const { commentStack } = this.state;\n const commentStackLength = commentStack.length;\n if (commentStackLength === 0) return;\n let i = commentStackLength - 1;\n\n for (; i >= 0; i--) {\n const commentWS = commentStack[i];\n const commentEnd = commentWS.end;\n const commentStart = commentWS.start;\n\n if (commentStart === end) {\n commentWS.leadingNode = node;\n } else if (commentEnd === start) {\n commentWS.trailingNode = node;\n } else if (commentEnd < start) {\n break;\n }\n }\n }\n}\n","import type { Options } from \"../options.ts\";\nimport type State from \"../tokenizer/state.ts\";\nimport type { PluginsMap } from \"./index.ts\";\nimport type ScopeHandler from \"../util/scope.ts\";\nimport type ExpressionScopeHandler from \"../util/expression-scope.ts\";\nimport type ClassScopeHandler from \"../util/class-scope.ts\";\nimport type ProductionParameterHandler from \"../util/production-parameter.ts\";\nimport type {\n ParserPluginWithOptions,\n PluginConfig,\n PluginOptions,\n} from \"../typings.ts\";\nimport type * as N from \"../types.ts\";\n\nexport default class BaseParser {\n // Properties set by constructor in index.js\n declare options: Options;\n declare inModule: boolean;\n declare scope: ScopeHandler;\n declare classScope: ClassScopeHandler;\n declare prodParam: ProductionParameterHandler;\n declare expressionScope: ExpressionScopeHandler;\n declare plugins: PluginsMap;\n declare filename: string | undefined | null;\n // Names of exports store. `default` is stored as a name for both\n // `export default foo;` and `export { foo as default };`.\n declare exportedIdentifiers: Set;\n sawUnambiguousESM: boolean = false;\n ambiguousScriptDifferentAst: boolean = false;\n\n // Initialized by Tokenizer\n declare state: State;\n // input and length are not in state as they are constant and we do\n // not want to ever copy them, which happens if state gets cloned\n declare input: string;\n declare length: number;\n // Comment store for Program.comments\n declare comments: Array;\n\n // This method accepts either a string (plugin name) or an array pair\n // (plugin name and options object). If an options object is given,\n // then each value is non-recursively checked for identity with that\n // plugin’s actual option value.\n hasPlugin(pluginConfig: PluginConfig): boolean {\n if (typeof pluginConfig === \"string\") {\n return this.plugins.has(pluginConfig);\n } else {\n const [pluginName, pluginOptions] = pluginConfig;\n if (!this.hasPlugin(pluginName)) {\n return false;\n }\n const actualOptions = this.plugins.get(pluginName);\n for (const key of Object.keys(\n pluginOptions,\n ) as (keyof typeof pluginOptions)[]) {\n if (actualOptions?.[key] !== pluginOptions[key]) {\n return false;\n }\n }\n return true;\n }\n }\n\n getPluginOption<\n PluginName extends ParserPluginWithOptions[0],\n OptionName extends keyof PluginOptions,\n >(plugin: PluginName, name: OptionName) {\n return (this.plugins.get(plugin) as null | PluginOptions)?.[\n name\n ];\n }\n}\n","import * as charCodes from \"charcodes\";\n\n// Matches a whole line break (where CRLF is considered a single\n// line break). Used to count lines.\nexport const lineBreak = /\\r\\n|[\\r\\n\\u2028\\u2029]/;\nexport const lineBreakG = new RegExp(lineBreak.source, \"g\");\n\n// https://tc39.github.io/ecma262/#sec-line-terminators\nexport function isNewLine(code: number): boolean {\n switch (code) {\n case charCodes.lineFeed:\n case charCodes.carriageReturn:\n case charCodes.lineSeparator:\n case charCodes.paragraphSeparator:\n return true;\n\n default:\n return false;\n }\n}\n\nexport function hasNewLine(input: string, start: number, end: number): boolean {\n for (let i = start; i < end; i++) {\n if (isNewLine(input.charCodeAt(i))) {\n return true;\n }\n }\n return false;\n}\n\nexport const skipWhiteSpace = /(?:\\s|\\/\\/.*|\\/\\*[^]*?\\*\\/)*/g;\n\nexport const skipWhiteSpaceInLine =\n /(?:[^\\S\\n\\r\\u2028\\u2029]|\\/\\/.*|\\/\\*.*?\\*\\/)*/g;\n\n// https://tc39.github.io/ecma262/#sec-white-space\nexport function isWhitespace(code: number): boolean {\n switch (code) {\n case 0x0009: // CHARACTER TABULATION\n case 0x000b: // LINE TABULATION\n case 0x000c: // FORM FEED\n case charCodes.space:\n case charCodes.nonBreakingSpace:\n case charCodes.oghamSpaceMark:\n case 0x2000: // EN QUAD\n case 0x2001: // EM QUAD\n case 0x2002: // EN SPACE\n case 0x2003: // EM SPACE\n case 0x2004: // THREE-PER-EM SPACE\n case 0x2005: // FOUR-PER-EM SPACE\n case 0x2006: // SIX-PER-EM SPACE\n case 0x2007: // FIGURE SPACE\n case 0x2008: // PUNCTUATION SPACE\n case 0x2009: // THIN SPACE\n case 0x200a: // HAIR SPACE\n case 0x202f: // NARROW NO-BREAK SPACE\n case 0x205f: // MEDIUM MATHEMATICAL SPACE\n case 0x3000: // IDEOGRAPHIC SPACE\n case 0xfeff: // ZERO WIDTH NO-BREAK SPACE\n return true;\n\n default:\n return false;\n }\n}\n","import type { Options } from \"../options.ts\";\nimport type { CommentWhitespace } from \"../parser/comments\";\nimport { Position } from \"../util/location.ts\";\n\nimport { types as ct, type TokContext } from \"./context.ts\";\nimport { tt, type TokenType } from \"./types.ts\";\nimport type { Errors } from \"../parse-error.ts\";\nimport type { ParseError } from \"../parse-error.ts\";\n\nexport type DeferredStrictError =\n | typeof Errors.StrictNumericEscape\n | typeof Errors.StrictOctalLiteral;\n\ntype TopicContextState = {\n // When a topic binding has been currently established,\n // then this is 1. Otherwise, it is 0. This is forwards compatible\n // with a future plugin for multiple lexical topics.\n maxNumOfResolvableTopics: number;\n // When a topic binding has been currently established, and if that binding\n // has been used as a topic reference `#`, then this is 0. Otherwise, it is\n // `null`. This is forwards compatible with a future plugin for multiple\n // lexical topics.\n maxTopicIndex: null | 0;\n};\n\nexport const enum LoopLabelKind {\n Loop = 1,\n Switch = 2,\n}\n\ndeclare const bit: import(\"../../../../scripts/babel-plugin-bit-decorator/types.d.ts\").BitDecorator;\n\nexport default class State {\n @bit.storage flags: number;\n\n @bit accessor strict = false;\n\n curLine: number;\n lineStart: number;\n\n // And, if locations are used, the {line, column} object\n // corresponding to those offsets\n startLoc: Position;\n endLoc: Position;\n\n init({ strictMode, sourceType, startLine, startColumn }: Options): void {\n this.strict =\n strictMode === false\n ? false\n : strictMode === true\n ? true\n : sourceType === \"module\";\n\n this.curLine = startLine;\n this.lineStart = -startColumn;\n this.startLoc = this.endLoc = new Position(startLine, startColumn, 0);\n }\n\n errors: ParseError[] = [];\n\n // Used to signify the start of a potential arrow function\n potentialArrowAt: number = -1;\n\n // Used to signify the start of an expression which looks like a\n // typed arrow function, but it isn't\n // e.g. a ? (b) : c => d\n // ^\n noArrowAt: number[] = [];\n\n // Used to signify the start of an expression whose params, if it looks like\n // an arrow function, shouldn't be converted to assignable nodes.\n // This is used to defer the validation of typed arrow functions inside\n // conditional expressions.\n // e.g. a ? (b) : c => d\n // ^\n noArrowParamsConversionAt: number[] = [];\n\n // Flags to track\n @bit accessor maybeInArrowParameters = false;\n @bit accessor inType = false;\n @bit accessor noAnonFunctionType = false;\n @bit accessor hasFlowComment = false;\n @bit accessor isAmbientContext = false;\n @bit accessor inAbstractClass = false;\n @bit accessor inDisallowConditionalTypesContext = false;\n\n // For the Hack-style pipelines plugin\n topicContext: TopicContextState = {\n maxNumOfResolvableTopics: 0,\n maxTopicIndex: null,\n };\n\n // For the F#-style pipelines plugin\n @bit accessor soloAwait = false;\n @bit accessor inFSharpPipelineDirectBody = false;\n\n // Labels in scope.\n labels: Array<{\n kind: LoopLabelKind;\n name?: string | null;\n statementStart?: number;\n }> = [];\n\n commentsLen = 0;\n // Comment attachment store\n commentStack: Array = [];\n\n // The current position of the tokenizer in the input.\n pos: number = 0;\n\n // Properties of the current token:\n // Its type\n type: TokenType = tt.eof;\n\n // For tokens that include more information than their type, the value\n value: any = null;\n\n // Its start and end offset\n start: number = 0;\n end: number = 0;\n\n // Position information for the previous token\n // this is initialized when generating the second token.\n lastTokEndLoc: Position = null;\n // this is initialized when generating the second token.\n lastTokStartLoc: Position = null;\n\n // The context stack is used to track whether the apostrophe \"`\" starts\n // or ends a string template\n context: Array = [ct.brace];\n\n // Used to track whether a JSX element is allowed to form\n @bit accessor canStartJSXElement = true;\n\n // Used to signal to callers of `readWord1` whether the word\n // contained any escape sequences. This is needed because words with\n // escape sequences must not be interpreted as keywords.\n @bit accessor containsEsc = false;\n\n // Used to track invalid escape sequences in template literals,\n // that must be reported if the template is not tagged.\n firstInvalidTemplateEscapePos: null | Position = null;\n\n @bit accessor hasTopLevelAwait = false;\n\n // This property is used to track the following errors\n // - StrictNumericEscape\n // - StrictOctalLiteral\n //\n // in a literal that occurs prior to/immediately after a \"use strict\" directive.\n\n // todo(JLHwung): set strictErrors to null and avoid recording string errors\n // after a non-directive is parsed\n strictErrors: Map = new Map();\n\n // Tokens length in token store\n tokensLength: number = 0;\n\n /**\n * When we add a new property, we must manually update the `clone` method\n * @see State#clone\n */\n\n curPosition(): Position {\n return new Position(this.curLine, this.pos - this.lineStart, this.pos);\n }\n\n clone(): State {\n const state = new State();\n state.flags = this.flags;\n state.curLine = this.curLine;\n state.lineStart = this.lineStart;\n state.startLoc = this.startLoc;\n state.endLoc = this.endLoc;\n state.errors = this.errors.slice();\n state.potentialArrowAt = this.potentialArrowAt;\n state.noArrowAt = this.noArrowAt.slice();\n state.noArrowParamsConversionAt = this.noArrowParamsConversionAt.slice();\n state.topicContext = this.topicContext;\n state.labels = this.labels.slice();\n state.commentsLen = this.commentsLen;\n state.commentStack = this.commentStack.slice();\n state.pos = this.pos;\n state.type = this.type;\n state.value = this.value;\n state.start = this.start;\n state.end = this.end;\n state.lastTokEndLoc = this.lastTokEndLoc;\n state.lastTokStartLoc = this.lastTokStartLoc;\n state.context = this.context.slice();\n state.firstInvalidTemplateEscapePos = this.firstInvalidTemplateEscapePos;\n state.strictErrors = this.strictErrors;\n state.tokensLength = this.tokensLength;\n\n return state;\n }\n}\n\nexport type LookaheadState = {\n pos: number;\n value: any;\n type: TokenType;\n start: number;\n end: number;\n context: TokContext[];\n startLoc: Position;\n lastTokEndLoc: Position;\n curLine: number;\n lineStart: number;\n curPosition: () => Position;\n /* Used only in readToken_mult_modulo */\n inType: boolean;\n // These boolean properties are not initialized in createLookaheadState()\n // instead they will only be set by the tokenizer\n containsEsc?: boolean;\n};\n","/*:: declare var invariant; */\n\nimport type { Options } from \"../options.ts\";\nimport {\n Position,\n SourceLocation,\n createPositionWithColumnOffset,\n} from \"../util/location.ts\";\nimport CommentsParser, { type CommentWhitespace } from \"../parser/comments.ts\";\nimport type * as N from \"../types.ts\";\nimport * as charCodes from \"charcodes\";\nimport { isIdentifierStart, isIdentifierChar } from \"../util/identifier.ts\";\nimport {\n tokenIsKeyword,\n tokenLabelName,\n tt,\n keywords as keywordTypes,\n type TokenType,\n} from \"./types.ts\";\nimport type { TokContext } from \"./context.ts\";\nimport {\n Errors,\n type ParseError,\n type ParseErrorConstructor,\n} from \"../parse-error.ts\";\nimport {\n lineBreakG,\n isNewLine,\n isWhitespace,\n skipWhiteSpace,\n skipWhiteSpaceInLine,\n} from \"../util/whitespace.ts\";\nimport State from \"./state.ts\";\nimport type { LookaheadState, DeferredStrictError } from \"./state.ts\";\nimport type { Undone } from \"../parser/node.ts\";\nimport type { Node } from \"../types.ts\";\n\nimport {\n readInt,\n readCodePoint,\n readStringContents,\n type IntErrorHandlers,\n type CodePointErrorHandlers,\n type StringContentsErrorHandlers,\n} from \"@babel/helper-string-parser\";\n\nimport type { Plugin } from \"../typings.ts\";\n\nfunction buildPosition(pos: number, lineStart: number, curLine: number) {\n return new Position(curLine, pos - lineStart, pos);\n}\n\nconst VALID_REGEX_FLAGS = new Set([\n charCodes.lowercaseG,\n charCodes.lowercaseM,\n charCodes.lowercaseS,\n charCodes.lowercaseI,\n charCodes.lowercaseY,\n charCodes.lowercaseU,\n charCodes.lowercaseD,\n charCodes.lowercaseV,\n]);\n\n// Object type used to represent tokens. Note that normally, tokens\n// simply exist as properties on the parser object. This is only\n// used for the onToken callback and the external tokenizer.\n\nexport class Token {\n constructor(state: State) {\n this.type = state.type;\n this.value = state.value;\n this.start = state.start;\n this.end = state.end;\n this.loc = new SourceLocation(state.startLoc, state.endLoc);\n }\n\n declare type: TokenType;\n declare value: any;\n declare start: number;\n declare end: number;\n declare loc: SourceLocation;\n}\n\n// ## Tokenizer\n\nexport default abstract class Tokenizer extends CommentsParser {\n isLookahead: boolean;\n\n // Token store.\n tokens: Array = [];\n\n constructor(options: Options, input: string) {\n super();\n this.state = new State();\n this.state.init(options);\n this.input = input;\n this.length = input.length;\n this.comments = [];\n this.isLookahead = false;\n }\n\n pushToken(token: Token | N.Comment) {\n // Pop out invalid tokens trapped by try-catch parsing.\n // Those parsing branches are mainly created by typescript and flow plugins.\n this.tokens.length = this.state.tokensLength;\n this.tokens.push(token);\n ++this.state.tokensLength;\n }\n\n // Move to the next token\n\n next(): void {\n this.checkKeywordEscapes();\n if (this.options.tokens) {\n this.pushToken(new Token(this.state));\n }\n\n this.state.lastTokEndLoc = this.state.endLoc;\n this.state.lastTokStartLoc = this.state.startLoc;\n this.nextToken();\n }\n\n eat(type: TokenType): boolean {\n if (this.match(type)) {\n this.next();\n return true;\n } else {\n return false;\n }\n }\n\n /**\n * Whether current token matches given type\n */\n match(type: TokenType): boolean {\n return this.state.type === type;\n }\n\n /**\n * Create a LookaheadState from current parser state\n */\n createLookaheadState(state: State): LookaheadState {\n return {\n pos: state.pos,\n value: null,\n type: state.type,\n start: state.start,\n end: state.end,\n context: [this.curContext()],\n inType: state.inType,\n startLoc: state.startLoc,\n lastTokEndLoc: state.lastTokEndLoc,\n curLine: state.curLine,\n lineStart: state.lineStart,\n curPosition: state.curPosition,\n };\n }\n\n /**\n * lookahead peeks the next token, skipping changes to token context and\n * comment stack. For performance it returns a limited LookaheadState\n * instead of full parser state.\n *\n * The { column, line } Loc info is not included in lookahead since such usage\n * is rare. Although it may return other location properties e.g. `curLine` and\n * `lineStart`, these properties are not listed in the LookaheadState interface\n * and thus the returned value is _NOT_ reliable.\n *\n * The tokenizer should make best efforts to avoid using any parser state\n * other than those defined in LookaheadState\n */\n lookahead(): LookaheadState {\n const old = this.state;\n // @ts-expect-error For performance we use a simplified tokenizer state structure\n this.state = this.createLookaheadState(old);\n\n this.isLookahead = true;\n this.nextToken();\n this.isLookahead = false;\n\n const curr = this.state;\n this.state = old;\n return curr;\n }\n\n nextTokenStart(): number {\n return this.nextTokenStartSince(this.state.pos);\n }\n\n nextTokenStartSince(pos: number): number {\n skipWhiteSpace.lastIndex = pos;\n return skipWhiteSpace.test(this.input) ? skipWhiteSpace.lastIndex : pos;\n }\n\n lookaheadCharCode(): number {\n return this.input.charCodeAt(this.nextTokenStart());\n }\n\n /**\n * Similar to nextToken, but it will stop at line break when it is seen before the next token\n *\n * @returns {number} position of the next token start or line break, whichever is seen first.\n * @memberof Tokenizer\n */\n nextTokenInLineStart(): number {\n return this.nextTokenInLineStartSince(this.state.pos);\n }\n\n nextTokenInLineStartSince(pos: number): number {\n skipWhiteSpaceInLine.lastIndex = pos;\n return skipWhiteSpaceInLine.test(this.input)\n ? skipWhiteSpaceInLine.lastIndex\n : pos;\n }\n\n /**\n * Similar to lookaheadCharCode, but it will return the char code of line break if it is\n * seen before the next token\n *\n * @returns {number} char code of the next token start or line break, whichever is seen first.\n * @memberof Tokenizer\n */\n lookaheadInLineCharCode(): number {\n return this.input.charCodeAt(this.nextTokenInLineStart());\n }\n\n codePointAtPos(pos: number): number {\n // The implementation is based on\n // https://source.chromium.org/chromium/chromium/src/+/master:v8/src/builtins/builtins-string-gen.cc;l=1455;drc=221e331b49dfefadbc6fa40b0c68e6f97606d0b3;bpv=0;bpt=1\n // We reimplement `codePointAt` because `codePointAt` is a V8 builtin which is not inlined by TurboFan (as of M91)\n // since `input` is mostly ASCII, an inlined `charCodeAt` wins here\n let cp = this.input.charCodeAt(pos);\n if ((cp & 0xfc00) === 0xd800 && ++pos < this.input.length) {\n const trail = this.input.charCodeAt(pos);\n if ((trail & 0xfc00) === 0xdc00) {\n cp = 0x10000 + ((cp & 0x3ff) << 10) + (trail & 0x3ff);\n }\n }\n return cp;\n }\n\n // Toggle strict mode. Re-reads the next number or string to please\n // pedantic tests (`\"use strict\"; 010;` should fail).\n\n setStrict(strict: boolean): void {\n this.state.strict = strict;\n if (strict) {\n // Throw an error for any string decimal escape found before/immediately\n // after a \"use strict\" directive. Strict mode will be set at parse\n // time for any literals that occur after the next node of the strict\n // directive.\n this.state.strictErrors.forEach(([toParseError, at]) =>\n this.raise(toParseError, at),\n );\n this.state.strictErrors.clear();\n }\n }\n\n curContext(): TokContext {\n return this.state.context[this.state.context.length - 1];\n }\n\n // Read a single token, updating the parser object's token-related properties.\n nextToken(): void {\n this.skipSpace();\n this.state.start = this.state.pos;\n if (!this.isLookahead) this.state.startLoc = this.state.curPosition();\n if (this.state.pos >= this.length) {\n this.finishToken(tt.eof);\n return;\n }\n\n this.getTokenFromCode(this.codePointAtPos(this.state.pos));\n }\n\n // Skips a block comment, whose end is marked by commentEnd.\n // *-/ is used by the Flow plugin, when parsing block comments nested\n // inside Flow comments.\n skipBlockComment(commentEnd: \"*/\" | \"*-/\"): N.CommentBlock | undefined {\n let startLoc;\n if (!this.isLookahead) startLoc = this.state.curPosition();\n const start = this.state.pos;\n const end = this.input.indexOf(commentEnd, start + 2);\n if (end === -1) {\n // We have to call this again here because startLoc may not be set...\n // This seems to be for performance reasons:\n // https://github.com/babel/babel/commit/acf2a10899f696a8aaf34df78bf9725b5ea7f2da\n throw this.raise(Errors.UnterminatedComment, this.state.curPosition());\n }\n\n this.state.pos = end + commentEnd.length;\n lineBreakG.lastIndex = start + 2;\n while (lineBreakG.test(this.input) && lineBreakG.lastIndex <= end) {\n ++this.state.curLine;\n this.state.lineStart = lineBreakG.lastIndex;\n }\n\n // If we are doing a lookahead right now we need to advance the position (above code)\n // but we do not want to push the comment to the state.\n if (this.isLookahead) return;\n /*:: invariant(startLoc) */\n\n const comment: N.CommentBlock = {\n type: \"CommentBlock\",\n value: this.input.slice(start + 2, end),\n start,\n end: end + commentEnd.length,\n loc: new SourceLocation(startLoc, this.state.curPosition()),\n };\n if (this.options.tokens) this.pushToken(comment);\n return comment;\n }\n\n skipLineComment(startSkip: number): N.CommentLine | undefined {\n const start = this.state.pos;\n let startLoc;\n if (!this.isLookahead) startLoc = this.state.curPosition();\n let ch = this.input.charCodeAt((this.state.pos += startSkip));\n if (this.state.pos < this.length) {\n while (!isNewLine(ch) && ++this.state.pos < this.length) {\n ch = this.input.charCodeAt(this.state.pos);\n }\n }\n\n // If we are doing a lookahead right now we need to advance the position (above code)\n // but we do not want to push the comment to the state.\n if (this.isLookahead) return;\n\n const end = this.state.pos;\n const value = this.input.slice(start + startSkip, end);\n\n const comment: N.CommentLine = {\n type: \"CommentLine\",\n value,\n start,\n end,\n loc: new SourceLocation(startLoc, this.state.curPosition()),\n };\n if (this.options.tokens) this.pushToken(comment);\n return comment;\n }\n\n // Called at the start of the parse and after every token. Skips\n // whitespace and comments, and.\n\n skipSpace(): void {\n const spaceStart = this.state.pos;\n const comments = [];\n loop: while (this.state.pos < this.length) {\n const ch = this.input.charCodeAt(this.state.pos);\n switch (ch) {\n case charCodes.space:\n case charCodes.nonBreakingSpace:\n case charCodes.tab:\n ++this.state.pos;\n break;\n case charCodes.carriageReturn:\n if (\n this.input.charCodeAt(this.state.pos + 1) === charCodes.lineFeed\n ) {\n ++this.state.pos;\n }\n // fall through\n case charCodes.lineFeed:\n case charCodes.lineSeparator:\n case charCodes.paragraphSeparator:\n ++this.state.pos;\n ++this.state.curLine;\n this.state.lineStart = this.state.pos;\n break;\n\n case charCodes.slash:\n switch (this.input.charCodeAt(this.state.pos + 1)) {\n case charCodes.asterisk: {\n const comment = this.skipBlockComment(\"*/\");\n if (comment !== undefined) {\n this.addComment(comment);\n if (this.options.attachComment) comments.push(comment);\n }\n break;\n }\n\n case charCodes.slash: {\n const comment = this.skipLineComment(2);\n if (comment !== undefined) {\n this.addComment(comment);\n if (this.options.attachComment) comments.push(comment);\n }\n break;\n }\n\n default:\n break loop;\n }\n break;\n\n default:\n if (isWhitespace(ch)) {\n ++this.state.pos;\n } else if (\n ch === charCodes.dash &&\n !this.inModule &&\n this.options.annexB\n ) {\n const pos = this.state.pos;\n if (\n this.input.charCodeAt(pos + 1) === charCodes.dash &&\n this.input.charCodeAt(pos + 2) === charCodes.greaterThan &&\n (spaceStart === 0 || this.state.lineStart > spaceStart)\n ) {\n // A `-->` line comment\n const comment = this.skipLineComment(3);\n if (comment !== undefined) {\n this.addComment(comment);\n if (this.options.attachComment) comments.push(comment);\n }\n } else {\n break loop;\n }\n } else if (\n ch === charCodes.lessThan &&\n !this.inModule &&\n this.options.annexB\n ) {\n const pos = this.state.pos;\n if (\n this.input.charCodeAt(pos + 1) === charCodes.exclamationMark &&\n this.input.charCodeAt(pos + 2) === charCodes.dash &&\n this.input.charCodeAt(pos + 3) === charCodes.dash\n ) {\n // ` * (any, kinda silly)\n// ~2, ~2.x, ~2.x.x, ~>2, ~>2.x ~>2.x.x --> >=2.0.0 <3.0.0\n// ~2.0, ~2.0.x, ~>2.0, ~>2.0.x --> >=2.0.0 <2.1.0\n// ~1.2, ~1.2.x, ~>1.2, ~>1.2.x --> >=1.2.0 <1.3.0\n// ~1.2.3, ~>1.2.3 --> >=1.2.3 <1.3.0\n// ~1.2.0, ~>1.2.0 --> >=1.2.0 <1.3.0\nfunction replaceTildes (comp, options) {\n return comp.trim().split(/\\s+/).map(function (comp) {\n return replaceTilde(comp, options)\n }).join(' ')\n}\n\nfunction replaceTilde (comp, options) {\n var r = options.loose ? safeRe[t.TILDELOOSE] : safeRe[t.TILDE]\n return comp.replace(r, function (_, M, m, p, pr) {\n debug('tilde', comp, _, M, m, p, pr)\n var ret\n\n if (isX(M)) {\n ret = ''\n } else if (isX(m)) {\n ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0'\n } else if (isX(p)) {\n // ~1.2 == >=1.2.0 <1.3.0\n ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0'\n } else if (pr) {\n debug('replaceTilde pr', pr)\n ret = '>=' + M + '.' + m + '.' + p + '-' + pr +\n ' <' + M + '.' + (+m + 1) + '.0'\n } else {\n // ~1.2.3 == >=1.2.3 <1.3.0\n ret = '>=' + M + '.' + m + '.' + p +\n ' <' + M + '.' + (+m + 1) + '.0'\n }\n\n debug('tilde return', ret)\n return ret\n })\n}\n\n// ^ --> * (any, kinda silly)\n// ^2, ^2.x, ^2.x.x --> >=2.0.0 <3.0.0\n// ^2.0, ^2.0.x --> >=2.0.0 <3.0.0\n// ^1.2, ^1.2.x --> >=1.2.0 <2.0.0\n// ^1.2.3 --> >=1.2.3 <2.0.0\n// ^1.2.0 --> >=1.2.0 <2.0.0\nfunction replaceCarets (comp, options) {\n return comp.trim().split(/\\s+/).map(function (comp) {\n return replaceCaret(comp, options)\n }).join(' ')\n}\n\nfunction replaceCaret (comp, options) {\n debug('caret', comp, options)\n var r = options.loose ? safeRe[t.CARETLOOSE] : safeRe[t.CARET]\n return comp.replace(r, function (_, M, m, p, pr) {\n debug('caret', comp, _, M, m, p, pr)\n var ret\n\n if (isX(M)) {\n ret = ''\n } else if (isX(m)) {\n ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0'\n } else if (isX(p)) {\n if (M === '0') {\n ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0'\n } else {\n ret = '>=' + M + '.' + m + '.0 <' + (+M + 1) + '.0.0'\n }\n } else if (pr) {\n debug('replaceCaret pr', pr)\n if (M === '0') {\n if (m === '0') {\n ret = '>=' + M + '.' + m + '.' + p + '-' + pr +\n ' <' + M + '.' + m + '.' + (+p + 1)\n } else {\n ret = '>=' + M + '.' + m + '.' + p + '-' + pr +\n ' <' + M + '.' + (+m + 1) + '.0'\n }\n } else {\n ret = '>=' + M + '.' + m + '.' + p + '-' + pr +\n ' <' + (+M + 1) + '.0.0'\n }\n } else {\n debug('no pr')\n if (M === '0') {\n if (m === '0') {\n ret = '>=' + M + '.' + m + '.' + p +\n ' <' + M + '.' + m + '.' + (+p + 1)\n } else {\n ret = '>=' + M + '.' + m + '.' + p +\n ' <' + M + '.' + (+m + 1) + '.0'\n }\n } else {\n ret = '>=' + M + '.' + m + '.' + p +\n ' <' + (+M + 1) + '.0.0'\n }\n }\n\n debug('caret return', ret)\n return ret\n })\n}\n\nfunction replaceXRanges (comp, options) {\n debug('replaceXRanges', comp, options)\n return comp.split(/\\s+/).map(function (comp) {\n return replaceXRange(comp, options)\n }).join(' ')\n}\n\nfunction replaceXRange (comp, options) {\n comp = comp.trim()\n var r = options.loose ? safeRe[t.XRANGELOOSE] : safeRe[t.XRANGE]\n return comp.replace(r, function (ret, gtlt, M, m, p, pr) {\n debug('xRange', comp, ret, gtlt, M, m, p, pr)\n var xM = isX(M)\n var xm = xM || isX(m)\n var xp = xm || isX(p)\n var anyX = xp\n\n if (gtlt === '=' && anyX) {\n gtlt = ''\n }\n\n // if we're including prereleases in the match, then we need\n // to fix this to -0, the lowest possible prerelease value\n pr = options.includePrerelease ? '-0' : ''\n\n if (xM) {\n if (gtlt === '>' || gtlt === '<') {\n // nothing is allowed\n ret = '<0.0.0-0'\n } else {\n // nothing is forbidden\n ret = '*'\n }\n } else if (gtlt && anyX) {\n // we know patch is an x, because we have any x at all.\n // replace X with 0\n if (xm) {\n m = 0\n }\n p = 0\n\n if (gtlt === '>') {\n // >1 => >=2.0.0\n // >1.2 => >=1.3.0\n // >1.2.3 => >= 1.2.4\n gtlt = '>='\n if (xm) {\n M = +M + 1\n m = 0\n p = 0\n } else {\n m = +m + 1\n p = 0\n }\n } else if (gtlt === '<=') {\n // <=0.7.x is actually <0.8.0, since any 0.7.x should\n // pass. Similarly, <=7.x is actually <8.0.0, etc.\n gtlt = '<'\n if (xm) {\n M = +M + 1\n } else {\n m = +m + 1\n }\n }\n\n ret = gtlt + M + '.' + m + '.' + p + pr\n } else if (xm) {\n ret = '>=' + M + '.0.0' + pr + ' <' + (+M + 1) + '.0.0' + pr\n } else if (xp) {\n ret = '>=' + M + '.' + m + '.0' + pr +\n ' <' + M + '.' + (+m + 1) + '.0' + pr\n }\n\n debug('xRange return', ret)\n\n return ret\n })\n}\n\n// Because * is AND-ed with everything else in the comparator,\n// and '' means \"any version\", just remove the *s entirely.\nfunction replaceStars (comp, options) {\n debug('replaceStars', comp, options)\n // Looseness is ignored here. star is always as loose as it gets!\n return comp.trim().replace(safeRe[t.STAR], '')\n}\n\n// This function is passed to string.replace(re[t.HYPHENRANGE])\n// M, m, patch, prerelease, build\n// 1.2 - 3.4.5 => >=1.2.0 <=3.4.5\n// 1.2.3 - 3.4 => >=1.2.0 <3.5.0 Any 3.4.x will do\n// 1.2 - 3.4 => >=1.2.0 <3.5.0\nfunction hyphenReplace ($0,\n from, fM, fm, fp, fpr, fb,\n to, tM, tm, tp, tpr, tb) {\n if (isX(fM)) {\n from = ''\n } else if (isX(fm)) {\n from = '>=' + fM + '.0.0'\n } else if (isX(fp)) {\n from = '>=' + fM + '.' + fm + '.0'\n } else {\n from = '>=' + from\n }\n\n if (isX(tM)) {\n to = ''\n } else if (isX(tm)) {\n to = '<' + (+tM + 1) + '.0.0'\n } else if (isX(tp)) {\n to = '<' + tM + '.' + (+tm + 1) + '.0'\n } else if (tpr) {\n to = '<=' + tM + '.' + tm + '.' + tp + '-' + tpr\n } else {\n to = '<=' + to\n }\n\n return (from + ' ' + to).trim()\n}\n\n// if ANY of the sets match ALL of its comparators, then pass\nRange.prototype.test = function (version) {\n if (!version) {\n return false\n }\n\n if (typeof version === 'string') {\n try {\n version = new SemVer(version, this.options)\n } catch (er) {\n return false\n }\n }\n\n for (var i = 0; i < this.set.length; i++) {\n if (testSet(this.set[i], version, this.options)) {\n return true\n }\n }\n return false\n}\n\nfunction testSet (set, version, options) {\n for (var i = 0; i < set.length; i++) {\n if (!set[i].test(version)) {\n return false\n }\n }\n\n if (version.prerelease.length && !options.includePrerelease) {\n // Find the set of versions that are allowed to have prereleases\n // For example, ^1.2.3-pr.1 desugars to >=1.2.3-pr.1 <2.0.0\n // That should allow `1.2.3-pr.2` to pass.\n // However, `1.2.4-alpha.notready` should NOT be allowed,\n // even though it's within the range set by the comparators.\n for (i = 0; i < set.length; i++) {\n debug(set[i].semver)\n if (set[i].semver === ANY) {\n continue\n }\n\n if (set[i].semver.prerelease.length > 0) {\n var allowed = set[i].semver\n if (allowed.major === version.major &&\n allowed.minor === version.minor &&\n allowed.patch === version.patch) {\n return true\n }\n }\n }\n\n // Version has a -pre, but it's not one of the ones we like.\n return false\n }\n\n return true\n}\n\nexports.satisfies = satisfies\nfunction satisfies (version, range, options) {\n try {\n range = new Range(range, options)\n } catch (er) {\n return false\n }\n return range.test(version)\n}\n\nexports.maxSatisfying = maxSatisfying\nfunction maxSatisfying (versions, range, options) {\n var max = null\n var maxSV = null\n try {\n var rangeObj = new Range(range, options)\n } catch (er) {\n return null\n }\n versions.forEach(function (v) {\n if (rangeObj.test(v)) {\n // satisfies(v, range, options)\n if (!max || maxSV.compare(v) === -1) {\n // compare(max, v, true)\n max = v\n maxSV = new SemVer(max, options)\n }\n }\n })\n return max\n}\n\nexports.minSatisfying = minSatisfying\nfunction minSatisfying (versions, range, options) {\n var min = null\n var minSV = null\n try {\n var rangeObj = new Range(range, options)\n } catch (er) {\n return null\n }\n versions.forEach(function (v) {\n if (rangeObj.test(v)) {\n // satisfies(v, range, options)\n if (!min || minSV.compare(v) === 1) {\n // compare(min, v, true)\n min = v\n minSV = new SemVer(min, options)\n }\n }\n })\n return min\n}\n\nexports.minVersion = minVersion\nfunction minVersion (range, loose) {\n range = new Range(range, loose)\n\n var minver = new SemVer('0.0.0')\n if (range.test(minver)) {\n return minver\n }\n\n minver = new SemVer('0.0.0-0')\n if (range.test(minver)) {\n return minver\n }\n\n minver = null\n for (var i = 0; i < range.set.length; ++i) {\n var comparators = range.set[i]\n\n comparators.forEach(function (comparator) {\n // Clone to avoid manipulating the comparator's semver object.\n var compver = new SemVer(comparator.semver.version)\n switch (comparator.operator) {\n case '>':\n if (compver.prerelease.length === 0) {\n compver.patch++\n } else {\n compver.prerelease.push(0)\n }\n compver.raw = compver.format()\n /* fallthrough */\n case '':\n case '>=':\n if (!minver || gt(minver, compver)) {\n minver = compver\n }\n break\n case '<':\n case '<=':\n /* Ignore maximum versions */\n break\n /* istanbul ignore next */\n default:\n throw new Error('Unexpected operation: ' + comparator.operator)\n }\n })\n }\n\n if (minver && range.test(minver)) {\n return minver\n }\n\n return null\n}\n\nexports.validRange = validRange\nfunction validRange (range, options) {\n try {\n // Return '*' instead of '' so that truthiness works.\n // This will throw if it's invalid anyway\n return new Range(range, options).range || '*'\n } catch (er) {\n return null\n }\n}\n\n// Determine if version is less than all the versions possible in the range\nexports.ltr = ltr\nfunction ltr (version, range, options) {\n return outside(version, range, '<', options)\n}\n\n// Determine if version is greater than all the versions possible in the range.\nexports.gtr = gtr\nfunction gtr (version, range, options) {\n return outside(version, range, '>', options)\n}\n\nexports.outside = outside\nfunction outside (version, range, hilo, options) {\n version = new SemVer(version, options)\n range = new Range(range, options)\n\n var gtfn, ltefn, ltfn, comp, ecomp\n switch (hilo) {\n case '>':\n gtfn = gt\n ltefn = lte\n ltfn = lt\n comp = '>'\n ecomp = '>='\n break\n case '<':\n gtfn = lt\n ltefn = gte\n ltfn = gt\n comp = '<'\n ecomp = '<='\n break\n default:\n throw new TypeError('Must provide a hilo val of \"<\" or \">\"')\n }\n\n // If it satisifes the range it is not outside\n if (satisfies(version, range, options)) {\n return false\n }\n\n // From now on, variable terms are as if we're in \"gtr\" mode.\n // but note that everything is flipped for the \"ltr\" function.\n\n for (var i = 0; i < range.set.length; ++i) {\n var comparators = range.set[i]\n\n var high = null\n var low = null\n\n comparators.forEach(function (comparator) {\n if (comparator.semver === ANY) {\n comparator = new Comparator('>=0.0.0')\n }\n high = high || comparator\n low = low || comparator\n if (gtfn(comparator.semver, high.semver, options)) {\n high = comparator\n } else if (ltfn(comparator.semver, low.semver, options)) {\n low = comparator\n }\n })\n\n // If the edge version comparator has a operator then our version\n // isn't outside it\n if (high.operator === comp || high.operator === ecomp) {\n return false\n }\n\n // If the lowest version comparator has an operator and our version\n // is less than it then it isn't higher than the range\n if ((!low.operator || low.operator === comp) &&\n ltefn(version, low.semver)) {\n return false\n } else if (low.operator === ecomp && ltfn(version, low.semver)) {\n return false\n }\n }\n return true\n}\n\nexports.prerelease = prerelease\nfunction prerelease (version, options) {\n var parsed = parse(version, options)\n return (parsed && parsed.prerelease.length) ? parsed.prerelease : null\n}\n\nexports.intersects = intersects\nfunction intersects (r1, r2, options) {\n r1 = new Range(r1, options)\n r2 = new Range(r2, options)\n return r1.intersects(r2)\n}\n\nexports.coerce = coerce\nfunction coerce (version, options) {\n if (version instanceof SemVer) {\n return version\n }\n\n if (typeof version === 'number') {\n version = String(version)\n }\n\n if (typeof version !== 'string') {\n return null\n }\n\n options = options || {}\n\n var match = null\n if (!options.rtl) {\n match = version.match(safeRe[t.COERCE])\n } else {\n // Find the right-most coercible string that does not share\n // a terminus with a more left-ward coercible string.\n // Eg, '1.2.3.4' wants to coerce '2.3.4', not '3.4' or '4'\n //\n // Walk through the string checking with a /g regexp\n // Manually set the index so as to pick up overlapping matches.\n // Stop when we get a match that ends at the string end, since no\n // coercible string can be more right-ward without the same terminus.\n var next\n while ((next = safeRe[t.COERCERTL].exec(version)) &&\n (!match || match.index + match[0].length !== version.length)\n ) {\n if (!match ||\n next.index + next[0].length !== match.index + match[0].length) {\n match = next\n }\n safeRe[t.COERCERTL].lastIndex = next.index + next[1].length + next[2].length\n }\n // leave it in a clean state\n safeRe[t.COERCERTL].lastIndex = -1\n }\n\n if (match === null) {\n return null\n }\n\n return parse(match[2] +\n '.' + (match[3] || '0') +\n '.' + (match[4] || '0'), options)\n}\n","// env vars from the cli are always strings, so !!ENV_VAR returns true for \"false\"\nfunction bool(value) {\n if (value == null) return false;\n return value && value !== \"false\" && value !== \"0\";\n}\n\nmodule.exports = bool(process.env[\"BABEL_8_BREAKING\"])\n ? require(\"semver-BABEL_8_BREAKING-true\")\n : require(\"semver-BABEL_8_BREAKING-false\");\n","import assert from \"assert\";\nimport {\n callExpression,\n cloneNode,\n expressionStatement,\n identifier,\n importDeclaration,\n importDefaultSpecifier,\n importNamespaceSpecifier,\n importSpecifier,\n memberExpression,\n stringLiteral,\n variableDeclaration,\n variableDeclarator,\n} from \"@babel/types\";\nimport type * as t from \"@babel/types\";\nimport type { Scope, HubInterface } from \"@babel/traverse\";\n\n/**\n * A class to track and accumulate mutations to the AST that will eventually\n * output a new require/import statement list.\n */\nexport default class ImportBuilder {\n private _statements: t.Statement[] = [];\n private _resultName: t.Identifier | t.MemberExpression = null;\n\n declare _scope: Scope;\n declare _hub: HubInterface;\n private _importedSource: string;\n\n constructor(importedSource: string, scope: Scope, hub: HubInterface) {\n this._scope = scope;\n this._hub = hub;\n this._importedSource = importedSource;\n }\n\n done() {\n return {\n statements: this._statements,\n resultName: this._resultName,\n };\n }\n\n import() {\n this._statements.push(\n importDeclaration([], stringLiteral(this._importedSource)),\n );\n return this;\n }\n\n require() {\n this._statements.push(\n expressionStatement(\n callExpression(identifier(\"require\"), [\n stringLiteral(this._importedSource),\n ]),\n ),\n );\n return this;\n }\n\n namespace(name = \"namespace\") {\n const local = this._scope.generateUidIdentifier(name);\n\n const statement = this._statements[this._statements.length - 1];\n assert(statement.type === \"ImportDeclaration\");\n assert(statement.specifiers.length === 0);\n statement.specifiers = [importNamespaceSpecifier(local)];\n this._resultName = cloneNode(local);\n return this;\n }\n default(name: string) {\n const id = this._scope.generateUidIdentifier(name);\n const statement = this._statements[this._statements.length - 1];\n assert(statement.type === \"ImportDeclaration\");\n assert(statement.specifiers.length === 0);\n statement.specifiers = [importDefaultSpecifier(id)];\n this._resultName = cloneNode(id);\n return this;\n }\n named(name: string, importName: string) {\n if (importName === \"default\") return this.default(name);\n\n const id = this._scope.generateUidIdentifier(name);\n const statement = this._statements[this._statements.length - 1];\n assert(statement.type === \"ImportDeclaration\");\n assert(statement.specifiers.length === 0);\n statement.specifiers = [importSpecifier(id, identifier(importName))];\n this._resultName = cloneNode(id);\n return this;\n }\n\n var(name: string) {\n const id = this._scope.generateUidIdentifier(name);\n let statement = this._statements[this._statements.length - 1];\n if (statement.type !== \"ExpressionStatement\") {\n assert(this._resultName);\n statement = expressionStatement(this._resultName);\n this._statements.push(statement);\n }\n this._statements[this._statements.length - 1] = variableDeclaration(\"var\", [\n variableDeclarator(id, statement.expression),\n ]);\n this._resultName = cloneNode(id);\n return this;\n }\n\n defaultInterop() {\n return this._interop(this._hub.addHelper(\"interopRequireDefault\"));\n }\n wildcardInterop() {\n return this._interop(this._hub.addHelper(\"interopRequireWildcard\"));\n }\n\n _interop(callee: t.Expression) {\n const statement = this._statements[this._statements.length - 1];\n if (statement.type === \"ExpressionStatement\") {\n statement.expression = callExpression(callee, [statement.expression]);\n } else if (statement.type === \"VariableDeclaration\") {\n assert(statement.declarations.length === 1);\n statement.declarations[0].init = callExpression(callee, [\n statement.declarations[0].init,\n ]);\n } else {\n assert.fail(\"Unexpected type.\");\n }\n return this;\n }\n\n prop(name: string) {\n const statement = this._statements[this._statements.length - 1];\n if (statement.type === \"ExpressionStatement\") {\n statement.expression = memberExpression(\n statement.expression,\n identifier(name),\n );\n } else if (statement.type === \"VariableDeclaration\") {\n assert(statement.declarations.length === 1);\n statement.declarations[0].init = memberExpression(\n statement.declarations[0].init,\n identifier(name),\n );\n } else {\n assert.fail(\"Unexpected type:\" + statement.type);\n }\n return this;\n }\n\n read(name: string) {\n this._resultName = memberExpression(this._resultName, identifier(name));\n }\n}\n","import type { NodePath } from \"@babel/traverse\";\nimport type * as t from \"@babel/types\";\n\n/**\n * A small utility to check if a file qualifies as a module.\n */\nexport default function isModule(path: NodePath) {\n return path.node.sourceType === \"module\";\n}\n","import assert from \"assert\";\nimport {\n identifier,\n importSpecifier,\n numericLiteral,\n sequenceExpression,\n isImportDeclaration,\n} from \"@babel/types\";\nimport type * as t from \"@babel/types\";\nimport type { NodePath, Scope, HubInterface } from \"@babel/traverse\";\n\nimport ImportBuilder from \"./import-builder.ts\";\nimport isModule from \"./is-module.ts\";\n\nexport type ImportOptions = {\n /**\n * The module being referenced.\n */\n importedSource: string | null;\n /**\n * The type of module being imported:\n *\n * * 'es6' - An ES6 module.\n * * 'commonjs' - A CommonJS module. (Default)\n */\n importedType: \"es6\" | \"commonjs\";\n /**\n * The type of interop behavior for namespace/default/named when loading\n * CommonJS modules.\n *\n * ## 'babel' (Default)\n *\n * Load using Babel's interop.\n *\n * If '.__esModule' is true, treat as 'compiled', else:\n *\n * * Namespace: A copy of the module.exports with .default\n * populated by the module.exports object.\n * * Default: The module.exports value.\n * * Named: The .named property of module.exports.\n *\n * The 'ensureLiveReference' has no effect on the liveness of these.\n *\n * ## 'compiled'\n *\n * Assume the module is ES6 compiled to CommonJS. Useful to avoid injecting\n * interop logic if you are confident that the module is a certain format.\n *\n * * Namespace: The root module.exports object.\n * * Default: The .default property of the namespace.\n * * Named: The .named property of the namespace.\n *\n * Will return erroneous results if the imported module is _not_ compiled\n * from ES6 with Babel.\n *\n * ## 'uncompiled'\n *\n * Assume the module is _not_ ES6 compiled to CommonJS. Used a simplified\n * access pattern that doesn't require additional function calls.\n *\n * Will return erroneous results if the imported module _is_ compiled\n * from ES6 with Babel.\n *\n * * Namespace: The module.exports object.\n * * Default: The module.exports object.\n * * Named: The .named property of module.exports.\n */\n importedInterop: \"babel\" | \"node\" | \"compiled\" | \"uncompiled\";\n /**\n * The type of CommonJS interop included in the environment that will be\n * loading the output code.\n *\n * * 'babel' - CommonJS modules load with Babel's interop. (Default)\n * * 'node' - CommonJS modules load with Node's interop.\n *\n * See descriptions in 'importedInterop' for more details.\n */\n importingInterop: \"babel\" | \"node\";\n /**\n * Define whether we explicitly care that the import be a live reference.\n * Only applies when importing default and named imports, not the namespace.\n *\n * * true - Force imported values to be live references.\n * * false - No particular requirements. Keeps the code simplest. (Default)\n */\n ensureLiveReference: boolean;\n /**\n * Define if we explicitly care that the result not be a property reference.\n *\n * * true - Force calls to exclude context. Useful if the value is going to\n * be used as function callee.\n * * false - No particular requirements for context of the access. (Default)\n */\n ensureNoContext: boolean;\n /**\n * Define whether the import should be loaded before or after the existing imports.\n * \"after\" is only allowed inside ECMAScript modules, since it's not possible to\n * reliably pick the location _after_ require() calls but _before_ other code in CJS.\n */\n importPosition: \"before\" | \"after\";\n\n nameHint?: string;\n blockHoist?: number;\n};\n\n/**\n * A general helper classes add imports via transforms. See README for usage.\n */\nexport default class ImportInjector {\n /**\n * The path used for manipulation.\n */\n declare _programPath: NodePath;\n\n /**\n * The scope used to generate unique variable names.\n */\n declare _programScope: Scope;\n\n /**\n * The file used to inject helpers and resolve paths.\n */\n declare _hub: HubInterface;\n\n /**\n * The default options to use with this instance when imports are added.\n */\n _defaultOpts: ImportOptions = {\n importedSource: null,\n importedType: \"commonjs\",\n importedInterop: \"babel\",\n importingInterop: \"babel\",\n ensureLiveReference: false,\n ensureNoContext: false,\n importPosition: \"before\",\n };\n\n constructor(\n path: NodePath,\n importedSource?: string,\n opts?: Partial,\n ) {\n const programPath = path.find(p => p.isProgram()) as NodePath;\n\n this._programPath = programPath;\n this._programScope = programPath.scope;\n this._hub = programPath.hub;\n\n this._defaultOpts = this._applyDefaults(importedSource, opts, true);\n }\n\n addDefault(importedSourceIn: string, opts: Partial) {\n return this.addNamed(\"default\", importedSourceIn, opts);\n }\n\n addNamed(\n importName: string,\n importedSourceIn: string,\n opts: Partial,\n ) {\n assert(typeof importName === \"string\");\n\n return this._generateImport(\n this._applyDefaults(importedSourceIn, opts),\n importName,\n );\n }\n\n addNamespace(importedSourceIn: string, opts: Partial) {\n return this._generateImport(\n this._applyDefaults(importedSourceIn, opts),\n null,\n );\n }\n\n addSideEffect(importedSourceIn: string, opts: Partial) {\n return this._generateImport(\n this._applyDefaults(importedSourceIn, opts),\n void 0,\n );\n }\n\n _applyDefaults(\n importedSource: string | Partial,\n opts: Partial | undefined,\n isInit = false,\n ) {\n let newOpts: ImportOptions;\n if (typeof importedSource === \"string\") {\n newOpts = { ...this._defaultOpts, importedSource, ...opts };\n } else {\n assert(!opts, \"Unexpected secondary arguments.\");\n newOpts = { ...this._defaultOpts, ...importedSource };\n }\n\n if (!isInit && opts) {\n if (opts.nameHint !== undefined) newOpts.nameHint = opts.nameHint;\n if (opts.blockHoist !== undefined) newOpts.blockHoist = opts.blockHoist;\n }\n return newOpts;\n }\n\n _generateImport(\n opts: Partial,\n importName: string | null | undefined,\n ) {\n const isDefault = importName === \"default\";\n const isNamed = !!importName && !isDefault;\n const isNamespace = importName === null;\n\n const {\n importedSource,\n importedType,\n importedInterop,\n importingInterop,\n ensureLiveReference,\n ensureNoContext,\n nameHint,\n importPosition,\n\n // Not meant for public usage. Allows code that absolutely must control\n // ordering to set a specific hoist value on the import nodes.\n // This is ignored when \"importPosition\" is \"after\".\n blockHoist,\n } = opts;\n\n // Provide a hint for generateUidIdentifier for the local variable name\n // to use for the import, if the code will generate a simple assignment\n // to a variable.\n let name = nameHint || importName;\n\n const isMod = isModule(this._programPath);\n const isModuleForNode = isMod && importingInterop === \"node\";\n const isModuleForBabel = isMod && importingInterop === \"babel\";\n\n if (importPosition === \"after\" && !isMod) {\n throw new Error(`\"importPosition\": \"after\" is only supported in modules`);\n }\n\n const builder = new ImportBuilder(\n importedSource,\n this._programScope,\n this._hub,\n );\n\n if (importedType === \"es6\") {\n if (!isModuleForNode && !isModuleForBabel) {\n throw new Error(\"Cannot import an ES6 module from CommonJS\");\n }\n\n // import * as namespace from ''; namespace\n // import def from ''; def\n // import { named } from ''; named\n builder.import();\n if (isNamespace) {\n builder.namespace(nameHint || importedSource);\n } else if (isDefault || isNamed) {\n builder.named(name, importName);\n }\n } else if (importedType !== \"commonjs\") {\n throw new Error(`Unexpected interopType \"${importedType}\"`);\n } else if (importedInterop === \"babel\") {\n if (isModuleForNode) {\n // import _tmp from ''; var namespace = interopRequireWildcard(_tmp); namespace\n // import _tmp from ''; var def = interopRequireDefault(_tmp).default; def\n // import _tmp from ''; _tmp.named\n name = name !== \"default\" ? name : importedSource;\n const es6Default = `${importedSource}$es6Default`;\n\n builder.import();\n if (isNamespace) {\n builder\n .default(es6Default)\n .var(name || importedSource)\n .wildcardInterop();\n } else if (isDefault) {\n if (ensureLiveReference) {\n builder\n .default(es6Default)\n .var(name || importedSource)\n .defaultInterop()\n .read(\"default\");\n } else {\n builder\n .default(es6Default)\n .var(name)\n .defaultInterop()\n .prop(importName);\n }\n } else if (isNamed) {\n builder.default(es6Default).read(importName);\n }\n } else if (isModuleForBabel) {\n // import * as namespace from ''; namespace\n // import def from ''; def\n // import { named } from ''; named\n builder.import();\n if (isNamespace) {\n builder.namespace(name || importedSource);\n } else if (isDefault || isNamed) {\n builder.named(name, importName);\n }\n } else {\n // var namespace = interopRequireWildcard(require(''));\n // var def = interopRequireDefault(require('')).default; def\n // var named = require('').named; named\n builder.require();\n if (isNamespace) {\n builder.var(name || importedSource).wildcardInterop();\n } else if ((isDefault || isNamed) && ensureLiveReference) {\n if (isDefault) {\n name = name !== \"default\" ? name : importedSource;\n builder.var(name).read(importName);\n builder.defaultInterop();\n } else {\n builder.var(importedSource).read(importName);\n }\n } else if (isDefault) {\n builder.var(name).defaultInterop().prop(importName);\n } else if (isNamed) {\n builder.var(name).prop(importName);\n }\n }\n } else if (importedInterop === \"compiled\") {\n if (isModuleForNode) {\n // import namespace from ''; namespace\n // import namespace from ''; namespace.default\n // import namespace from ''; namespace.named\n\n builder.import();\n if (isNamespace) {\n builder.default(name || importedSource);\n } else if (isDefault || isNamed) {\n builder.default(importedSource).read(name);\n }\n } else if (isModuleForBabel) {\n // import * as namespace from ''; namespace\n // import def from ''; def\n // import { named } from ''; named\n // Note: These lookups will break if the module has no __esModule set,\n // hence the warning that 'compiled' will not work on standard CommonJS.\n\n builder.import();\n if (isNamespace) {\n builder.namespace(name || importedSource);\n } else if (isDefault || isNamed) {\n builder.named(name, importName);\n }\n } else {\n // var namespace = require(''); namespace\n // var namespace = require(''); namespace.default\n // var namespace = require(''); namespace.named\n // var named = require('').named;\n builder.require();\n if (isNamespace) {\n builder.var(name || importedSource);\n } else if (isDefault || isNamed) {\n if (ensureLiveReference) {\n builder.var(importedSource).read(name);\n } else {\n builder.prop(importName).var(name);\n }\n }\n }\n } else if (importedInterop === \"uncompiled\") {\n if (isDefault && ensureLiveReference) {\n throw new Error(\"No live reference for commonjs default\");\n }\n\n if (isModuleForNode) {\n // import namespace from ''; namespace\n // import def from ''; def;\n // import namespace from ''; namespace.named\n builder.import();\n if (isNamespace) {\n builder.default(name || importedSource);\n } else if (isDefault) {\n builder.default(name);\n } else if (isNamed) {\n builder.default(importedSource).read(name);\n }\n } else if (isModuleForBabel) {\n // import namespace from '';\n // import def from '';\n // import { named } from ''; named;\n // Note: These lookups will break if the module has __esModule set,\n // hence the warning that 'uncompiled' will not work on ES6 transpiled\n // to CommonJS.\n\n builder.import();\n if (isNamespace) {\n builder.default(name || importedSource);\n } else if (isDefault) {\n builder.default(name);\n } else if (isNamed) {\n builder.named(name, importName);\n }\n } else {\n // var namespace = require(''); namespace\n // var def = require(''); def\n // var namespace = require(''); namespace.named\n // var named = require('').named;\n builder.require();\n if (isNamespace) {\n builder.var(name || importedSource);\n } else if (isDefault) {\n builder.var(name);\n } else if (isNamed) {\n if (ensureLiveReference) {\n builder.var(importedSource).read(name);\n } else {\n builder.var(name).prop(importName);\n }\n }\n }\n } else {\n throw new Error(`Unknown importedInterop \"${importedInterop}\".`);\n }\n\n const { statements, resultName } = builder.done();\n\n this._insertStatements(statements, importPosition, blockHoist);\n\n if (\n (isDefault || isNamed) &&\n ensureNoContext &&\n resultName.type !== \"Identifier\"\n ) {\n return sequenceExpression([numericLiteral(0), resultName]);\n }\n return resultName;\n }\n\n _insertStatements(\n statements: t.Statement[],\n importPosition = \"before\",\n blockHoist = 3,\n ) {\n if (importPosition === \"after\") {\n if (this._insertStatementsAfter(statements)) return;\n } else {\n if (this._insertStatementsBefore(statements, blockHoist)) return;\n }\n\n this._programPath.unshiftContainer(\"body\", statements);\n }\n\n _insertStatementsBefore(statements: t.Statement[], blockHoist: number) {\n if (\n statements.length === 1 &&\n isImportDeclaration(statements[0]) &&\n isValueImport(statements[0])\n ) {\n const firstImportDecl = this._programPath\n .get(\"body\")\n .find((p): p is NodePath => {\n return p.isImportDeclaration() && isValueImport(p.node);\n });\n\n if (\n firstImportDecl?.node.source.value === statements[0].source.value &&\n maybeAppendImportSpecifiers(firstImportDecl.node, statements[0])\n ) {\n return true;\n }\n }\n\n statements.forEach(node => {\n // @ts-expect-error handle _blockHoist\n node._blockHoist = blockHoist;\n });\n\n const targetPath = this._programPath.get(\"body\").find(p => {\n // @ts-expect-error todo(flow->ts): avoid mutations\n const val = p.node._blockHoist;\n return Number.isFinite(val) && val < 4;\n });\n\n if (targetPath) {\n targetPath.insertBefore(statements);\n return true;\n }\n\n return false;\n }\n\n _insertStatementsAfter(statements: t.Statement[]): boolean {\n const statementsSet = new Set(statements);\n const importDeclarations: Map = new Map();\n\n for (const statement of statements) {\n if (isImportDeclaration(statement) && isValueImport(statement)) {\n const source = statement.source.value;\n if (!importDeclarations.has(source)) importDeclarations.set(source, []);\n importDeclarations.get(source).push(statement);\n }\n }\n\n let lastImportPath = null;\n for (const bodyStmt of this._programPath.get(\"body\")) {\n if (bodyStmt.isImportDeclaration() && isValueImport(bodyStmt.node)) {\n lastImportPath = bodyStmt;\n\n const source = bodyStmt.node.source.value;\n const newImports = importDeclarations.get(source);\n if (!newImports) continue;\n\n for (const decl of newImports) {\n if (!statementsSet.has(decl)) continue;\n if (maybeAppendImportSpecifiers(bodyStmt.node, decl)) {\n statementsSet.delete(decl);\n }\n }\n }\n }\n\n if (statementsSet.size === 0) return true;\n\n if (lastImportPath) lastImportPath.insertAfter(Array.from(statementsSet));\n\n return !!lastImportPath;\n }\n}\n\nfunction isValueImport(node: t.ImportDeclaration) {\n return node.importKind !== \"type\" && node.importKind !== \"typeof\";\n}\n\nfunction hasNamespaceImport(node: t.ImportDeclaration) {\n return (\n (node.specifiers.length === 1 &&\n node.specifiers[0].type === \"ImportNamespaceSpecifier\") ||\n (node.specifiers.length === 2 &&\n node.specifiers[1].type === \"ImportNamespaceSpecifier\")\n );\n}\n\nfunction hasDefaultImport(node: t.ImportDeclaration) {\n return (\n node.specifiers.length > 0 &&\n node.specifiers[0].type === \"ImportDefaultSpecifier\"\n );\n}\n\nfunction maybeAppendImportSpecifiers(\n target: t.ImportDeclaration,\n source: t.ImportDeclaration,\n): boolean {\n if (!target.specifiers.length) {\n target.specifiers = source.specifiers;\n return true;\n }\n if (!source.specifiers.length) return true;\n\n if (hasNamespaceImport(target) || hasNamespaceImport(source)) return false;\n\n if (hasDefaultImport(source)) {\n if (hasDefaultImport(target)) {\n source.specifiers[0] = importSpecifier(\n source.specifiers[0].local,\n identifier(\"default\"),\n );\n } else {\n target.specifiers.unshift(source.specifiers.shift());\n }\n }\n\n target.specifiers.push(...source.specifiers);\n\n return true;\n}\n","import { types as t } from \"@babel/core\";\nimport traverse, { visitors, type NodePath } from \"@babel/traverse\";\n\n/**\n * A lazily constructed visitor to walk the tree, rewriting all `this` references in the\n * top-level scope to be `void 0` (undefined).\n *\n */\nlet rewriteThisVisitor: Parameters[1];\n\nexport default function rewriteThis(programPath: NodePath) {\n if (!rewriteThisVisitor) {\n rewriteThisVisitor = visitors.environmentVisitor({\n ThisExpression(path) {\n path.replaceWith(t.unaryExpression(\"void\", t.numericLiteral(0), true));\n },\n });\n rewriteThisVisitor.noScope = true;\n }\n // Rewrite \"this\" to be \"undefined\".\n traverse(programPath.node, rewriteThisVisitor);\n}\n","import ImportInjector, { type ImportOptions } from \"./import-injector.ts\";\nimport type { NodePath } from \"@babel/traverse\";\nimport type * as t from \"@babel/types\";\n\nexport { ImportInjector };\n\nexport { default as isModule } from \"./is-module.ts\";\n\nexport function addDefault(\n path: NodePath,\n importedSource: string,\n opts?: Partial,\n) {\n return new ImportInjector(path).addDefault(importedSource, opts);\n}\n\nfunction addNamed(\n path: NodePath,\n name: string,\n importedSource: string,\n opts?: Omit<\n Partial,\n \"ensureLiveReference\" | \"ensureNoContext\"\n >,\n): t.Identifier;\nfunction addNamed(\n path: NodePath,\n name: string,\n importedSource: string,\n opts?: Omit, \"ensureLiveReference\"> & {\n ensureLiveReference: true;\n },\n): t.MemberExpression;\nfunction addNamed(\n path: NodePath,\n name: string,\n importedSource: string,\n opts?: Omit, \"ensureNoContext\"> & {\n ensureNoContext: true;\n },\n): t.SequenceExpression;\n/**\n * add a named import to the program path of given path\n *\n * @export\n * @param {NodePath} path The starting path to find a program path\n * @param {string} name The name of the generated binding. Babel will prefix it with `_`\n * @param {string} importedSource The source of the import\n * @param {Partial} [opts]\n * @returns {t.Identifier | t.MemberExpression | t.SequenceExpression} If opts.ensureNoContext is true, returns a SequenceExpression,\n * else if opts.ensureLiveReference is true, returns a MemberExpression, else returns an Identifier\n */\nfunction addNamed(\n path: NodePath,\n name: string,\n importedSource: string,\n opts?: Partial,\n) {\n return new ImportInjector(path).addNamed(name, importedSource, opts);\n}\nexport { addNamed };\n\nexport function addNamespace(\n path: NodePath,\n importedSource: string,\n opts?: Partial,\n) {\n return new ImportInjector(path).addNamespace(importedSource, opts);\n}\n\nexport function addSideEffect(\n path: NodePath,\n importedSource: string,\n opts?: Partial,\n) {\n return new ImportInjector(path).addSideEffect(importedSource, opts);\n}\n","import {\n LOGICAL_OPERATORS,\n assignmentExpression,\n binaryExpression,\n cloneNode,\n identifier,\n logicalExpression,\n numericLiteral,\n sequenceExpression,\n unaryExpression,\n} from \"@babel/types\";\nimport type * as t from \"@babel/types\";\nimport type { NodePath, Scope, Visitor } from \"@babel/traverse\";\n\ntype State = {\n scope: Scope;\n bindingNames: Set;\n seen: WeakSet;\n};\n\nconst simpleAssignmentVisitor: Visitor = {\n AssignmentExpression: {\n exit(path) {\n const { scope, seen, bindingNames } = this;\n\n if (path.node.operator === \"=\") return;\n\n if (seen.has(path.node)) return;\n seen.add(path.node);\n\n const left = path.get(\"left\");\n if (!left.isIdentifier()) return;\n\n // Simple update-assign foo += 1;\n // => exports.foo = (foo += 1);\n const localName = left.node.name;\n\n if (!bindingNames.has(localName)) return;\n\n // redeclared in this scope\n if (scope.getBinding(localName) !== path.scope.getBinding(localName)) {\n return;\n }\n\n const operator = path.node.operator.slice(0, -1);\n if (LOGICAL_OPERATORS.includes(operator)) {\n // &&, ||, ??\n // (foo &&= bar) => (foo && foo = bar)\n path.replaceWith(\n logicalExpression(\n // @ts-expect-error Guarded by LOGICAL_OPERATORS.includes\n operator,\n path.node.left,\n assignmentExpression(\n \"=\",\n cloneNode(path.node.left),\n path.node.right,\n ),\n ),\n );\n } else {\n // (foo += bar) => (foo = foo + bar)\n path.node.right = binaryExpression(\n // @ts-expect-error An assignment expression operator removing \"=\" must\n // be a valid binary operator\n operator,\n cloneNode(path.node.left),\n path.node.right,\n );\n path.node.operator = \"=\";\n }\n },\n },\n};\n\nif (!process.env.BABEL_8_BREAKING) {\n simpleAssignmentVisitor.UpdateExpression = {\n exit(path) {\n // @ts-expect-error This is Babel7-only\n if (!this.includeUpdateExpression) return;\n\n const { scope, bindingNames } = this;\n\n const arg = path.get(\"argument\");\n if (!arg.isIdentifier()) return;\n const localName = arg.node.name;\n\n if (!bindingNames.has(localName)) return;\n\n // redeclared in this scope\n if (scope.getBinding(localName) !== path.scope.getBinding(localName)) {\n return;\n }\n\n if (\n path.parentPath.isExpressionStatement() &&\n !path.isCompletionRecord()\n ) {\n // ++i => (i += 1);\n const operator = path.node.operator === \"++\" ? \"+=\" : \"-=\";\n path.replaceWith(\n assignmentExpression(operator, arg.node, numericLiteral(1)),\n );\n } else if (path.node.prefix) {\n // ++i => (i = (+i) + 1);\n path.replaceWith(\n assignmentExpression(\n \"=\",\n identifier(localName),\n binaryExpression(\n path.node.operator[0] as \"+\" | \"-\",\n unaryExpression(\"+\", arg.node),\n numericLiteral(1),\n ),\n ),\n );\n } else {\n const old = path.scope.generateUidIdentifierBasedOnNode(\n arg.node,\n \"old\",\n );\n const varName = old.name;\n path.scope.push({ id: old });\n\n const binary = binaryExpression(\n path.node.operator[0] as \"+\" | \"-\",\n identifier(varName),\n // todo: support bigint\n numericLiteral(1),\n );\n\n // i++ => (_old = (+i), i = _old + 1, _old)\n path.replaceWith(\n sequenceExpression([\n assignmentExpression(\n \"=\",\n identifier(varName),\n unaryExpression(\"+\", arg.node),\n ),\n assignmentExpression(\"=\", cloneNode(arg.node), binary),\n identifier(varName),\n ]),\n );\n }\n },\n };\n}\n\nexport default function simplifyAccess(\n path: NodePath,\n bindingNames: Set,\n) {\n if (process.env.BABEL_8_BREAKING) {\n path.traverse(simpleAssignmentVisitor, {\n scope: path.scope,\n bindingNames,\n seen: new WeakSet(),\n });\n } else {\n path.traverse(simpleAssignmentVisitor, {\n scope: path.scope,\n bindingNames,\n seen: new WeakSet(),\n // @ts-expect-error This is Babel7-only\n includeUpdateExpression: arguments[2] ?? true,\n });\n }\n}\n","import assert from \"assert\";\nimport { template, types as t } from \"@babel/core\";\nimport type { NodePath, Visitor, Scope } from \"@babel/core\";\nimport simplifyAccess from \"@babel/helper-simple-access\";\n\nimport type { ModuleMetadata } from \"./normalize-and-load-metadata.ts\";\n\ninterface RewriteReferencesVisitorState {\n exported: Map;\n metadata: ModuleMetadata;\n requeueInParent: (path: NodePath) => void;\n scope: Scope;\n imported: Map;\n buildImportReference: (\n [source, importName, localName]: readonly [string, string, string],\n identNode: t.Identifier | t.CallExpression | t.JSXIdentifier,\n ) => any;\n seen: WeakSet;\n}\n\ninterface RewriteBindingInitVisitorState {\n exported: Map;\n metadata: ModuleMetadata;\n requeueInParent: (path: NodePath) => void;\n scope: Scope;\n}\n\nfunction isInType(path: NodePath) {\n do {\n switch (path.parent.type) {\n case \"TSTypeAnnotation\":\n case \"TSTypeAliasDeclaration\":\n case \"TSTypeReference\":\n case \"TypeAnnotation\":\n case \"TypeAlias\":\n return true;\n case \"ExportSpecifier\":\n return (\n (\n path.parentPath.parent as\n | t.ExportDefaultDeclaration\n | t.ExportNamedDeclaration\n ).exportKind === \"type\"\n );\n default:\n if (path.parentPath.isStatement() || path.parentPath.isExpression()) {\n return false;\n }\n }\n } while ((path = path.parentPath));\n}\n\nexport default function rewriteLiveReferences(\n programPath: NodePath,\n metadata: ModuleMetadata,\n wrapReference: (ref: t.Expression, payload: unknown) => null | t.Expression,\n) {\n const imported = new Map();\n const exported = new Map();\n const requeueInParent = (path: NodePath) => {\n // Manually re-queue `exports.default =` expressions so that the ES3\n // transform has an opportunity to convert them. Ideally this would\n // happen automatically from the replaceWith above. See #4140 for\n // more info.\n programPath.requeue(path);\n };\n\n for (const [source, data] of metadata.source) {\n for (const [localName, importName] of data.imports) {\n imported.set(localName, [source, importName, null]);\n }\n for (const localName of data.importsNamespace) {\n imported.set(localName, [source, null, localName]);\n }\n }\n\n for (const [local, data] of metadata.local) {\n let exportMeta = exported.get(local);\n if (!exportMeta) {\n exportMeta = [];\n exported.set(local, exportMeta);\n }\n\n exportMeta.push(...data.names);\n }\n\n // Rewrite initialization of bindings to update exports.\n const rewriteBindingInitVisitorState: RewriteBindingInitVisitorState = {\n metadata,\n requeueInParent,\n scope: programPath.scope,\n exported, // local name => exported name list\n };\n programPath.traverse(\n // eslint-disable-next-line @typescript-eslint/no-use-before-define\n rewriteBindingInitVisitor,\n rewriteBindingInitVisitorState,\n );\n\n // NOTE(logan): The 'Array.from' calls are to make this code with in loose mode.\n const bindingNames = new Set([\n ...Array.from(imported.keys()),\n ...Array.from(exported.keys()),\n ]);\n if (process.env.BABEL_8_BREAKING) {\n simplifyAccess(programPath, bindingNames);\n } else {\n // @ts-ignore(Babel 7 vs Babel 8) The third param has been removed in Babel 8.\n simplifyAccess(programPath, bindingNames, false);\n }\n\n // Rewrite reads/writes from imports and exports to have the correct behavior.\n const rewriteReferencesVisitorState: RewriteReferencesVisitorState = {\n seen: new WeakSet(),\n metadata,\n requeueInParent,\n scope: programPath.scope,\n imported, // local / import\n exported, // local name => exported name list\n buildImportReference([source, importName, localName], identNode) {\n const meta = metadata.source.get(source);\n meta.referenced = true;\n\n if (localName) {\n if (meta.wrap) {\n // @ts-expect-error Fixme: we should handle the case when identNode is a JSXIdentifier\n identNode = wrapReference(identNode, meta.wrap) ?? identNode;\n }\n return identNode;\n }\n\n let namespace: t.Expression = t.identifier(meta.name);\n if (meta.wrap) {\n namespace = wrapReference(namespace, meta.wrap) ?? namespace;\n }\n\n if (importName === \"default\" && meta.interop === \"node-default\") {\n return namespace;\n }\n\n const computed = metadata.stringSpecifiers.has(importName);\n\n return t.memberExpression(\n namespace,\n computed ? t.stringLiteral(importName) : t.identifier(importName),\n computed,\n );\n },\n };\n // eslint-disable-next-line @typescript-eslint/no-use-before-define\n programPath.traverse(rewriteReferencesVisitor, rewriteReferencesVisitorState);\n}\n\n/**\n * A visitor to inject export update statements during binding initialization.\n */\nconst rewriteBindingInitVisitor: Visitor = {\n Scope(path) {\n path.skip();\n },\n ClassDeclaration(path) {\n const { requeueInParent, exported, metadata } = this;\n\n const { id } = path.node;\n if (!id) throw new Error(\"Expected class to have a name\");\n const localName = id.name;\n\n const exportNames = exported.get(localName) || [];\n if (exportNames.length > 0) {\n const statement = t.expressionStatement(\n // eslint-disable-next-line @typescript-eslint/no-use-before-define\n buildBindingExportAssignmentExpression(\n metadata,\n exportNames,\n t.identifier(localName),\n path.scope,\n ),\n );\n // @ts-expect-error todo(flow->ts): avoid mutations\n statement._blockHoist = path.node._blockHoist;\n\n requeueInParent(path.insertAfter(statement)[0]);\n }\n },\n VariableDeclaration(path) {\n const { requeueInParent, exported, metadata } = this;\n\n const isVar = path.node.kind === \"var\";\n\n for (const decl of path.get(\"declarations\")) {\n const { id } = decl.node;\n let { init } = decl.node;\n if (\n t.isIdentifier(id) &&\n exported.has(id.name) &&\n !t.isArrowFunctionExpression(init) &&\n (!t.isFunctionExpression(init) || init.id) &&\n (!t.isClassExpression(init) || init.id)\n ) {\n if (!init) {\n if (isVar) {\n // This variable might have already been assigned to, and the\n // uninitalized declaration doesn't set it to `undefined` and does\n // not updated the exported value.\n continue;\n } else {\n init = path.scope.buildUndefinedNode();\n }\n }\n // eslint-disable-next-line @typescript-eslint/no-use-before-define\n decl.node.init = buildBindingExportAssignmentExpression(\n metadata,\n exported.get(id.name),\n init,\n path.scope,\n );\n requeueInParent(decl.get(\"init\"));\n } else {\n for (const localName of Object.keys(\n decl.getOuterBindingIdentifiers(),\n )) {\n if (exported.has(localName)) {\n const statement = t.expressionStatement(\n // eslint-disable-next-line @typescript-eslint/no-use-before-define\n buildBindingExportAssignmentExpression(\n metadata,\n exported.get(localName),\n t.identifier(localName),\n path.scope,\n ),\n );\n // @ts-expect-error todo(flow->ts): avoid mutations\n statement._blockHoist = path.node._blockHoist;\n\n requeueInParent(path.insertAfter(statement)[0]);\n }\n }\n }\n }\n },\n};\n\nconst buildBindingExportAssignmentExpression = (\n metadata: ModuleMetadata,\n exportNames: string[],\n localExpr: t.Expression,\n scope: Scope,\n) => {\n const exportsObjectName = metadata.exportName;\n for (\n let currentScope = scope;\n currentScope != null;\n currentScope = currentScope.parent\n ) {\n if (currentScope.hasOwnBinding(exportsObjectName)) {\n currentScope.rename(exportsObjectName);\n }\n }\n return (exportNames || []).reduce((expr, exportName) => {\n // class Foo {} export { Foo, Foo as Bar };\n // as\n // class Foo {} exports.Foo = exports.Bar = Foo;\n const { stringSpecifiers } = metadata;\n const computed = stringSpecifiers.has(exportName);\n return t.assignmentExpression(\n \"=\",\n t.memberExpression(\n t.identifier(exportsObjectName),\n computed ? t.stringLiteral(exportName) : t.identifier(exportName),\n /* computed */ computed,\n ),\n expr,\n );\n }, localExpr);\n};\n\nconst buildImportThrow = (localName: string) => {\n return template.expression.ast`\n (function() {\n throw new Error('\"' + '${localName}' + '\" is read-only.');\n })()\n `;\n};\n\nconst rewriteReferencesVisitor: Visitor = {\n ReferencedIdentifier(path) {\n const { seen, buildImportReference, scope, imported, requeueInParent } =\n this;\n if (seen.has(path.node)) return;\n seen.add(path.node);\n\n const localName = path.node.name;\n\n const importData = imported.get(localName);\n if (importData) {\n if (isInType(path)) {\n throw path.buildCodeFrameError(\n `Cannot transform the imported binding \"${localName}\" since it's also used in a type annotation. ` +\n `Please strip type annotations using @babel/preset-typescript or @babel/preset-flow.`,\n );\n }\n\n const localBinding = path.scope.getBinding(localName);\n const rootBinding = scope.getBinding(localName);\n\n // redeclared in this scope\n if (rootBinding !== localBinding) return;\n\n const ref = buildImportReference(importData, path.node);\n\n // Preserve the binding location so that sourcemaps are nicer.\n ref.loc = path.node.loc;\n\n if (\n (path.parentPath.isCallExpression({ callee: path.node }) ||\n path.parentPath.isOptionalCallExpression({ callee: path.node }) ||\n path.parentPath.isTaggedTemplateExpression({ tag: path.node })) &&\n t.isMemberExpression(ref)\n ) {\n path.replaceWith(t.sequenceExpression([t.numericLiteral(0), ref]));\n } else if (path.isJSXIdentifier() && t.isMemberExpression(ref)) {\n const { object, property } = ref;\n path.replaceWith(\n t.jsxMemberExpression(\n // @ts-expect-error todo(flow->ts): possible bug `object` might not have a name\n t.jsxIdentifier(object.name),\n // @ts-expect-error todo(flow->ts): possible bug `property` might not have a name\n t.jsxIdentifier(property.name),\n ),\n );\n } else {\n path.replaceWith(ref);\n }\n\n requeueInParent(path);\n\n // The path could have been replaced with an identifier that would\n // otherwise be re-visited, so we skip processing its children.\n path.skip();\n }\n },\n\n UpdateExpression(path) {\n const {\n scope,\n seen,\n imported,\n exported,\n requeueInParent,\n buildImportReference,\n } = this;\n\n if (seen.has(path.node)) return;\n\n seen.add(path.node);\n\n const arg = path.get(\"argument\");\n\n // No change needed\n if (arg.isMemberExpression()) return;\n\n const update = path.node;\n\n if (arg.isIdentifier()) {\n const localName = arg.node.name;\n\n // redeclared in this scope\n if (scope.getBinding(localName) !== path.scope.getBinding(localName)) {\n return;\n }\n\n const exportedNames = exported.get(localName);\n const importData = imported.get(localName);\n\n if (exportedNames?.length > 0 || importData) {\n if (importData) {\n path.replaceWith(\n t.assignmentExpression(\n update.operator[0] + \"=\",\n buildImportReference(importData, arg.node),\n buildImportThrow(localName),\n ),\n );\n } else if (update.prefix) {\n // ++foo\n // => exports.foo = ++foo\n path.replaceWith(\n buildBindingExportAssignmentExpression(\n this.metadata,\n exportedNames,\n t.cloneNode(update),\n path.scope,\n ),\n );\n } else {\n // foo++\n // => (ref = i++, exports.i = i, ref)\n const ref = scope.generateDeclaredUidIdentifier(localName);\n\n path.replaceWith(\n t.sequenceExpression([\n t.assignmentExpression(\n \"=\",\n t.cloneNode(ref),\n t.cloneNode(update),\n ),\n buildBindingExportAssignmentExpression(\n this.metadata,\n exportedNames,\n t.identifier(localName),\n path.scope,\n ),\n t.cloneNode(ref),\n ]),\n );\n }\n }\n }\n\n requeueInParent(path);\n path.skip();\n },\n\n AssignmentExpression: {\n exit(path) {\n const {\n scope,\n seen,\n imported,\n exported,\n requeueInParent,\n buildImportReference,\n } = this;\n\n if (seen.has(path.node)) return;\n seen.add(path.node);\n\n const left = path.get(\"left\");\n\n // No change needed\n if (left.isMemberExpression()) return;\n\n if (left.isIdentifier()) {\n // Simple update-assign foo += 1; export { foo };\n // => exports.foo = (foo += 1);\n const localName = left.node.name;\n\n // redeclared in this scope\n if (scope.getBinding(localName) !== path.scope.getBinding(localName)) {\n return;\n }\n\n const exportedNames = exported.get(localName);\n const importData = imported.get(localName);\n if (exportedNames?.length > 0 || importData) {\n assert(path.node.operator === \"=\", \"Path was not simplified\");\n\n const assignment = path.node;\n\n if (importData) {\n assignment.left = buildImportReference(importData, left.node);\n\n assignment.right = t.sequenceExpression([\n assignment.right,\n buildImportThrow(localName),\n ]);\n }\n\n path.replaceWith(\n buildBindingExportAssignmentExpression(\n this.metadata,\n exportedNames,\n assignment,\n path.scope,\n ),\n );\n requeueInParent(path);\n }\n } else {\n const ids = left.getOuterBindingIdentifiers();\n const programScopeIds = Object.keys(ids).filter(\n localName =>\n scope.getBinding(localName) === path.scope.getBinding(localName),\n );\n const id = programScopeIds.find(localName => imported.has(localName));\n\n if (id) {\n path.node.right = t.sequenceExpression([\n path.node.right,\n buildImportThrow(id),\n ]);\n }\n\n // Complex ({a, b, c} = {}); export { a, c };\n // => ({a, b, c} = {}), (exports.a = a, exports.c = c);\n const items: t.Expression[] = [];\n programScopeIds.forEach(localName => {\n const exportedNames = exported.get(localName) || [];\n if (exportedNames.length > 0) {\n items.push(\n buildBindingExportAssignmentExpression(\n this.metadata,\n exportedNames,\n t.identifier(localName),\n path.scope,\n ),\n );\n }\n });\n\n if (items.length > 0) {\n let node: t.Node = t.sequenceExpression(items);\n if (path.parentPath.isExpressionStatement()) {\n node = t.expressionStatement(node);\n // @ts-expect-error todo(flow->ts): avoid mutations\n node._blockHoist = path.parentPath.node._blockHoist;\n }\n\n const statement = path.insertAfter(node)[0];\n requeueInParent(statement);\n }\n }\n },\n },\n \"ForOfStatement|ForInStatement\"(\n path: NodePath,\n ) {\n const { scope, node } = path;\n const { left } = node;\n const { exported, imported, scope: programScope } = this;\n\n if (!t.isVariableDeclaration(left)) {\n let didTransformExport = false,\n importConstViolationName;\n const loopBodyScope = path.get(\"body\").scope;\n for (const name of Object.keys(t.getOuterBindingIdentifiers(left))) {\n if (programScope.getBinding(name) === scope.getBinding(name)) {\n if (exported.has(name)) {\n didTransformExport = true;\n if (loopBodyScope.hasOwnBinding(name)) {\n loopBodyScope.rename(name);\n }\n }\n if (imported.has(name) && !importConstViolationName) {\n importConstViolationName = name;\n }\n }\n }\n if (!didTransformExport && !importConstViolationName) {\n return;\n }\n\n path.ensureBlock();\n const bodyPath = path.get(\"body\") as NodePath;\n\n const newLoopId = scope.generateUidIdentifierBasedOnNode(left);\n path\n .get(\"left\")\n .replaceWith(\n t.variableDeclaration(\"let\", [\n t.variableDeclarator(t.cloneNode(newLoopId)),\n ]),\n );\n scope.registerDeclaration(path.get(\"left\"));\n\n if (didTransformExport) {\n bodyPath.unshiftContainer(\n \"body\",\n t.expressionStatement(t.assignmentExpression(\"=\", left, newLoopId)),\n );\n }\n if (importConstViolationName) {\n bodyPath.unshiftContainer(\n \"body\",\n t.expressionStatement(buildImportThrow(importConstViolationName)),\n );\n }\n }\n },\n};\n","import { basename, extname } from \"path\";\nimport type { types as t, NodePath } from \"@babel/core\";\n\nimport { isIdentifierName } from \"@babel/helper-validator-identifier\";\n\nexport interface ModuleMetadata {\n exportName: string;\n // The name of the variable that will reference an object containing export names.\n exportNameListName: null | string;\n hasExports: boolean;\n // Lookup from local binding to export information.\n local: Map;\n // Lookup of source file to source file metadata.\n source: Map;\n // List of names that should only be printed as string literals.\n // i.e. `import { \"any unicode\" as foo } from \"some-module\"`\n // `stringSpecifiers` is Set(1) [\"any unicode\"]\n // In most cases `stringSpecifiers` is an empty Set\n stringSpecifiers: Set;\n}\n\nexport type InteropType =\n | \"default\" // Babel interop for default-only imports\n | \"namespace\" // Babel interop for namespace or default+named imports\n | \"node-default\" // Node.js interop for default-only imports\n | \"node-namespace\" // Node.js interop for namespace or default+named imports\n | \"none\"; // No interop, or named-only imports\n\nexport type ImportInterop =\n | \"none\"\n | \"babel\"\n | \"node\"\n | ((source: string, filename?: string) => \"none\" | \"babel\" | \"node\");\n\nexport interface SourceModuleMetadata {\n // A unique variable name to use for this namespace object. Centralized for simplicity.\n name: string;\n loc: t.SourceLocation | undefined | null;\n interop: InteropType;\n // Local binding to reference from this source namespace. Key: Local name, value: Import name\n imports: Map;\n // Local names that reference namespace object.\n importsNamespace: Set;\n // Reexports to create for namespace. Key: Export name, value: Import name\n reexports: Map;\n // List of names to re-export namespace as.\n reexportNamespace: Set;\n // Tracks if the source should be re-exported.\n reexportAll: null | {\n loc: t.SourceLocation | undefined | null;\n };\n wrap?: unknown;\n referenced: boolean;\n}\n\nexport interface LocalExportMetadata {\n names: Array; // names of exports,\n kind: \"import\" | \"hoisted\" | \"block\" | \"var\";\n}\n\n/**\n * Check if the module has any exports that need handling.\n */\nexport function hasExports(metadata: ModuleMetadata) {\n return metadata.hasExports;\n}\n\n/**\n * Check if a given source is an anonymous import, e.g. \"import 'foo';\"\n */\nexport function isSideEffectImport(source: SourceModuleMetadata) {\n return (\n source.imports.size === 0 &&\n source.importsNamespace.size === 0 &&\n source.reexports.size === 0 &&\n source.reexportNamespace.size === 0 &&\n !source.reexportAll\n );\n}\n\nexport function validateImportInteropOption(\n importInterop: any,\n): importInterop is ImportInterop {\n if (\n typeof importInterop !== \"function\" &&\n importInterop !== \"none\" &&\n importInterop !== \"babel\" &&\n importInterop !== \"node\"\n ) {\n throw new Error(\n `.importInterop must be one of \"none\", \"babel\", \"node\", or a function returning one of those values (received ${importInterop}).`,\n );\n }\n return importInterop;\n}\n\nfunction resolveImportInterop(\n importInterop: ImportInterop,\n source: string,\n filename: string | undefined,\n) {\n if (typeof importInterop === \"function\") {\n return validateImportInteropOption(importInterop(source, filename));\n }\n return importInterop;\n}\n\n/**\n * Remove all imports and exports from the file, and return all metadata\n * needed to reconstruct the module's behavior.\n */\nexport default function normalizeModuleAndLoadMetadata(\n programPath: NodePath,\n exportName: string,\n {\n importInterop,\n initializeReexports = false,\n getWrapperPayload,\n esNamespaceOnly = false,\n filename,\n }: {\n importInterop: ImportInterop;\n initializeReexports: boolean | void;\n getWrapperPayload?: (\n source: string,\n metadata: SourceModuleMetadata,\n importNodes: t.Node[],\n ) => unknown;\n esNamespaceOnly: boolean;\n filename: string;\n },\n): ModuleMetadata {\n if (!exportName) {\n exportName = programPath.scope.generateUidIdentifier(\"exports\").name;\n }\n const stringSpecifiers = new Set();\n\n nameAnonymousExports(programPath);\n\n const { local, sources, hasExports } = getModuleMetadata(\n programPath,\n { initializeReexports, getWrapperPayload },\n stringSpecifiers,\n );\n\n removeImportExportDeclarations(programPath);\n\n // Reuse the imported namespace name if there is one.\n for (const [source, metadata] of sources) {\n const { importsNamespace, imports } = metadata;\n // If there is at least one namespace import and other imports, it may collipse with local ident, can be seen in issue 15879.\n if (importsNamespace.size > 0 && imports.size === 0) {\n const [nameOfnamespace] = importsNamespace;\n metadata.name = nameOfnamespace;\n }\n\n const resolvedInterop = resolveImportInterop(\n importInterop,\n source,\n filename,\n );\n\n if (resolvedInterop === \"none\") {\n metadata.interop = \"none\";\n } else if (resolvedInterop === \"node\" && metadata.interop === \"namespace\") {\n metadata.interop = \"node-namespace\";\n } else if (resolvedInterop === \"node\" && metadata.interop === \"default\") {\n metadata.interop = \"node-default\";\n } else if (esNamespaceOnly && metadata.interop === \"namespace\") {\n // Both the default and namespace interops pass through __esModule\n // objects, but the namespace interop is used to enable Babel's\n // destructuring-like interop behavior for normal CommonJS.\n // Since some tooling has started to remove that behavior, we expose\n // it as the `esNamespace` option.\n metadata.interop = \"default\";\n }\n }\n\n return {\n exportName,\n exportNameListName: null,\n hasExports,\n local,\n source: sources,\n stringSpecifiers,\n };\n}\n\nfunction getExportSpecifierName(\n path: NodePath,\n stringSpecifiers: Set,\n): string {\n if (path.isIdentifier()) {\n return path.node.name;\n } else if (path.isStringLiteral()) {\n const stringValue = path.node.value;\n // add specifier value to `stringSpecifiers` only when it can not be converted to an identifier name\n // i.e In `import { \"foo\" as bar }`\n // we do not consider `\"foo\"` to be a `stringSpecifier` because we can treat it as\n // `import { foo as bar }`\n // This helps minimize the size of `stringSpecifiers` and reduce overhead of checking valid identifier names\n // when building transpiled code from metadata\n if (!isIdentifierName(stringValue)) {\n stringSpecifiers.add(stringValue);\n }\n return stringValue;\n } else {\n throw new Error(\n `Expected export specifier to be either Identifier or StringLiteral, got ${path.node.type}`,\n );\n }\n}\n\nfunction assertExportSpecifier(\n path: NodePath,\n): asserts path is NodePath {\n if (path.isExportSpecifier()) {\n return;\n } else if (path.isExportNamespaceSpecifier()) {\n throw path.buildCodeFrameError(\n \"Export namespace should be first transformed by `@babel/plugin-transform-export-namespace-from`.\",\n );\n } else {\n throw path.buildCodeFrameError(\"Unexpected export specifier type\");\n }\n}\n\n/**\n * Get metadata about the imports and exports present in this module.\n */\nfunction getModuleMetadata(\n programPath: NodePath,\n {\n getWrapperPayload,\n initializeReexports,\n }: {\n getWrapperPayload?: (\n source: string,\n metadata: SourceModuleMetadata,\n importNodes: t.Node[],\n ) => unknown;\n initializeReexports: boolean | void;\n },\n stringSpecifiers: Set,\n) {\n const localData = getLocalExportMetadata(\n programPath,\n initializeReexports,\n stringSpecifiers,\n );\n\n const importNodes = new Map();\n const sourceData = new Map();\n const getData = (sourceNode: t.StringLiteral, node: t.Node) => {\n const source = sourceNode.value;\n\n let data = sourceData.get(source);\n if (!data) {\n data = {\n name: programPath.scope.generateUidIdentifier(\n basename(source, extname(source)),\n ).name,\n\n interop: \"none\",\n\n loc: null,\n\n // Data about the requested sources and names.\n imports: new Map(),\n importsNamespace: new Set(),\n\n // Metadata about data that is passed directly from source to export.\n reexports: new Map(),\n reexportNamespace: new Set(),\n reexportAll: null,\n\n wrap: null,\n\n // @ts-expect-error lazy is not listed in the type.\n // This is needed for compatibility with older version of the commonjs\n // plusing.\n // TODO(Babel 8): Remove this\n get lazy() {\n return this.wrap === \"lazy\";\n },\n\n referenced: false,\n };\n sourceData.set(source, data);\n importNodes.set(source, [node]);\n } else {\n importNodes.get(source).push(node);\n }\n return data;\n };\n let hasExports = false;\n programPath.get(\"body\").forEach(child => {\n if (child.isImportDeclaration()) {\n const data = getData(child.node.source, child.node);\n if (!data.loc) data.loc = child.node.loc;\n\n child.get(\"specifiers\").forEach(spec => {\n if (spec.isImportDefaultSpecifier()) {\n const localName = spec.get(\"local\").node.name;\n\n data.imports.set(localName, \"default\");\n\n const reexport = localData.get(localName);\n if (reexport) {\n localData.delete(localName);\n\n reexport.names.forEach(name => {\n data.reexports.set(name, \"default\");\n });\n data.referenced = true;\n }\n } else if (spec.isImportNamespaceSpecifier()) {\n const localName = spec.get(\"local\").node.name;\n\n data.importsNamespace.add(localName);\n const reexport = localData.get(localName);\n if (reexport) {\n localData.delete(localName);\n\n reexport.names.forEach(name => {\n data.reexportNamespace.add(name);\n });\n data.referenced = true;\n }\n } else if (spec.isImportSpecifier()) {\n const importName = getExportSpecifierName(\n spec.get(\"imported\"),\n stringSpecifiers,\n );\n const localName = spec.get(\"local\").node.name;\n\n data.imports.set(localName, importName);\n\n const reexport = localData.get(localName);\n if (reexport) {\n localData.delete(localName);\n\n reexport.names.forEach(name => {\n data.reexports.set(name, importName);\n });\n data.referenced = true;\n }\n }\n });\n } else if (child.isExportAllDeclaration()) {\n hasExports = true;\n const data = getData(child.node.source, child.node);\n if (!data.loc) data.loc = child.node.loc;\n\n data.reexportAll = {\n loc: child.node.loc,\n };\n data.referenced = true;\n } else if (child.isExportNamedDeclaration() && child.node.source) {\n hasExports = true;\n const data = getData(child.node.source, child.node);\n if (!data.loc) data.loc = child.node.loc;\n\n child.get(\"specifiers\").forEach(spec => {\n assertExportSpecifier(spec);\n const importName = getExportSpecifierName(\n spec.get(\"local\"),\n stringSpecifiers,\n );\n const exportName = getExportSpecifierName(\n spec.get(\"exported\"),\n stringSpecifiers,\n );\n\n data.reexports.set(exportName, importName);\n data.referenced = true;\n\n if (exportName === \"__esModule\") {\n throw spec\n .get(\"exported\")\n .buildCodeFrameError('Illegal export \"__esModule\".');\n }\n });\n } else if (\n child.isExportNamedDeclaration() ||\n child.isExportDefaultDeclaration()\n ) {\n hasExports = true;\n }\n });\n\n for (const metadata of sourceData.values()) {\n let needsDefault = false;\n let needsNamed = false;\n\n if (metadata.importsNamespace.size > 0) {\n needsDefault = true;\n needsNamed = true;\n }\n\n if (metadata.reexportAll) {\n needsNamed = true;\n }\n\n for (const importName of metadata.imports.values()) {\n if (importName === \"default\") needsDefault = true;\n else needsNamed = true;\n }\n for (const importName of metadata.reexports.values()) {\n if (importName === \"default\") needsDefault = true;\n else needsNamed = true;\n }\n\n if (needsDefault && needsNamed) {\n // TODO(logan): Using the namespace interop here is unfortunate. Revisit.\n metadata.interop = \"namespace\";\n } else if (needsDefault) {\n metadata.interop = \"default\";\n }\n }\n\n if (getWrapperPayload) {\n for (const [source, metadata] of sourceData) {\n metadata.wrap = getWrapperPayload(\n source,\n metadata,\n importNodes.get(source),\n );\n }\n }\n\n return {\n hasExports,\n local: localData,\n sources: sourceData,\n };\n}\n\ntype ModuleBindingKind = \"import\" | \"hoisted\" | \"block\" | \"var\";\n/**\n * Get metadata about local variables that are exported.\n */\nfunction getLocalExportMetadata(\n programPath: NodePath,\n initializeReexports: boolean | void,\n stringSpecifiers: Set,\n): Map {\n const bindingKindLookup = new Map();\n\n programPath.get(\"body\").forEach((child: NodePath) => {\n let kind: ModuleBindingKind;\n if (child.isImportDeclaration()) {\n kind = \"import\";\n } else {\n if (child.isExportDefaultDeclaration()) {\n child = child.get(\"declaration\");\n }\n if (child.isExportNamedDeclaration()) {\n if (child.node.declaration) {\n child = child.get(\"declaration\");\n } else if (\n initializeReexports &&\n child.node.source &&\n child.get(\"source\").isStringLiteral()\n ) {\n child.get(\"specifiers\").forEach(spec => {\n assertExportSpecifier(spec);\n bindingKindLookup.set(spec.get(\"local\").node.name, \"block\");\n });\n return;\n }\n }\n\n if (child.isFunctionDeclaration()) {\n kind = \"hoisted\";\n } else if (child.isClassDeclaration()) {\n kind = \"block\";\n } else if (child.isVariableDeclaration({ kind: \"var\" })) {\n kind = \"var\";\n } else if (child.isVariableDeclaration()) {\n kind = \"block\";\n } else {\n return;\n }\n }\n\n Object.keys(child.getOuterBindingIdentifiers()).forEach(name => {\n bindingKindLookup.set(name, kind);\n });\n });\n\n const localMetadata = new Map();\n const getLocalMetadata = (idPath: NodePath) => {\n const localName = idPath.node.name;\n let metadata = localMetadata.get(localName);\n\n if (!metadata) {\n const kind = bindingKindLookup.get(localName);\n\n if (kind === undefined) {\n throw idPath.buildCodeFrameError(\n `Exporting local \"${localName}\", which is not declared.`,\n );\n }\n\n metadata = {\n names: [],\n kind,\n };\n localMetadata.set(localName, metadata);\n }\n return metadata;\n };\n\n programPath.get(\"body\").forEach(child => {\n if (\n child.isExportNamedDeclaration() &&\n (initializeReexports || !child.node.source)\n ) {\n if (child.node.declaration) {\n const declaration = child.get(\"declaration\");\n const ids = declaration.getOuterBindingIdentifierPaths();\n Object.keys(ids).forEach(name => {\n if (name === \"__esModule\") {\n throw declaration.buildCodeFrameError(\n 'Illegal export \"__esModule\".',\n );\n }\n getLocalMetadata(ids[name]).names.push(name);\n });\n } else {\n child.get(\"specifiers\").forEach(spec => {\n const local = spec.get(\"local\");\n const exported = spec.get(\"exported\");\n const localMetadata = getLocalMetadata(local);\n const exportName = getExportSpecifierName(exported, stringSpecifiers);\n\n if (exportName === \"__esModule\") {\n throw exported.buildCodeFrameError('Illegal export \"__esModule\".');\n }\n localMetadata.names.push(exportName);\n });\n }\n } else if (child.isExportDefaultDeclaration()) {\n const declaration = child.get(\"declaration\");\n if (\n declaration.isFunctionDeclaration() ||\n declaration.isClassDeclaration()\n ) {\n getLocalMetadata(declaration.get(\"id\")).names.push(\"default\");\n } else {\n // These should have been removed by the nameAnonymousExports() call.\n throw declaration.buildCodeFrameError(\n \"Unexpected default expression export.\",\n );\n }\n }\n });\n return localMetadata;\n}\n\n/**\n * Ensure that all exported values have local binding names.\n */\nfunction nameAnonymousExports(programPath: NodePath) {\n // Name anonymous exported locals.\n programPath.get(\"body\").forEach(child => {\n if (!child.isExportDefaultDeclaration()) return;\n if (!process.env.BABEL_8_BREAKING && !USE_ESM && !IS_STANDALONE) {\n // polyfill when being run by an older Babel version\n child.splitExportDeclaration ??=\n // eslint-disable-next-line no-restricted-globals\n require(\"@babel/traverse\").NodePath.prototype.splitExportDeclaration;\n }\n child.splitExportDeclaration();\n });\n}\n\nfunction removeImportExportDeclarations(programPath: NodePath) {\n programPath.get(\"body\").forEach(child => {\n if (child.isImportDeclaration()) {\n child.remove();\n } else if (child.isExportNamedDeclaration()) {\n if (child.node.declaration) {\n // @ts-expect-error todo(flow->ts): avoid mutations\n child.node.declaration._blockHoist = child.node._blockHoist;\n child.replaceWith(child.node.declaration);\n } else {\n child.remove();\n }\n } else if (child.isExportDefaultDeclaration()) {\n // export default foo;\n const declaration = child.get(\"declaration\");\n if (\n declaration.isFunctionDeclaration() ||\n declaration.isClassDeclaration()\n ) {\n // @ts-expect-error todo(flow->ts): avoid mutations\n declaration._blockHoist = child.node._blockHoist;\n child.replaceWith(declaration);\n } else {\n // These should have been removed by the nameAnonymousExports() call.\n throw declaration.buildCodeFrameError(\n \"Unexpected default expression export.\",\n );\n }\n } else if (child.isExportAllDeclaration()) {\n child.remove();\n }\n });\n}\n","// TODO: Move `lazy` implementation logic into the CommonJS plugin, since other\n// modules systems do not support `lazy`.\n\nimport { types as t } from \"@babel/core\";\nimport {\n type SourceModuleMetadata,\n isSideEffectImport,\n} from \"./normalize-and-load-metadata.ts\";\n\nexport type Lazy = boolean | string[] | ((source: string) => boolean);\n\nexport function toGetWrapperPayload(lazy: Lazy) {\n return (source: string, metadata: SourceModuleMetadata): null | \"lazy\" => {\n if (lazy === false) return null;\n if (isSideEffectImport(metadata) || metadata.reexportAll) return null;\n if (lazy === true) {\n // 'true' means that local relative files are eagerly loaded and\n // dependency modules are loaded lazily.\n return source.includes(\".\") ? null : \"lazy\";\n }\n if (Array.isArray(lazy)) {\n return !lazy.includes(source) ? null : \"lazy\";\n }\n if (typeof lazy === \"function\") {\n return lazy(source) ? \"lazy\" : null;\n }\n throw new Error(`.lazy must be a boolean, string array, or function`);\n };\n}\n\nexport function wrapReference(\n ref: t.Identifier,\n payload: unknown,\n): t.Expression | null {\n if (payload === \"lazy\") return t.callExpression(ref, []);\n return null;\n}\n","// Heavily inspired by\n// https://github.com/airbnb/babel-plugin-dynamic-import-node/blob/master/src/utils.js\n\nimport { types as t, template } from \"@babel/core\";\n\nif (!process.env.BABEL_8_BREAKING && !USE_ESM && !IS_STANDALONE) {\n // eslint-disable-next-line no-restricted-globals\n exports.getDynamicImportSource = function getDynamicImportSource(\n node: t.CallExpression,\n ): t.StringLiteral | t.TemplateLiteral {\n const [source] = node.arguments;\n\n return t.isStringLiteral(source) || t.isTemplateLiteral(source)\n ? source\n : (template.expression.ast`\\`\\${${source}}\\`` as t.TemplateLiteral);\n };\n}\n\nexport function buildDynamicImport(\n node: t.CallExpression | t.ImportExpression,\n deferToThen: boolean,\n wrapWithPromise: boolean,\n builder: (specifier: t.Expression) => t.Expression,\n): t.Expression {\n const specifier = t.isCallExpression(node) ? node.arguments[0] : node.source;\n\n if (\n t.isStringLiteral(specifier) ||\n (t.isTemplateLiteral(specifier) && specifier.quasis.length === 0)\n ) {\n if (deferToThen) {\n return template.expression.ast`\n Promise.resolve().then(() => ${builder(specifier)})\n `;\n } else return builder(specifier);\n }\n\n const specifierToString = t.isTemplateLiteral(specifier)\n ? t.identifier(\"specifier\")\n : t.templateLiteral(\n [t.templateElement({ raw: \"\" }), t.templateElement({ raw: \"\" })],\n [t.identifier(\"specifier\")],\n );\n\n if (deferToThen) {\n return template.expression.ast`\n (specifier =>\n new Promise(r => r(${specifierToString}))\n .then(s => ${builder(t.identifier(\"s\"))})\n )(${specifier})\n `;\n } else if (wrapWithPromise) {\n return template.expression.ast`\n (specifier =>\n new Promise(r => r(${builder(specifierToString)}))\n )(${specifier})\n `;\n } else {\n return template.expression.ast`\n (specifier => ${builder(specifierToString)})(${specifier})\n `;\n }\n}\n","type RootOptions = {\n filename?: string;\n filenameRelative?: string;\n sourceRoot?: string;\n};\n\nexport type PluginOptions = {\n moduleId?: string;\n moduleIds?: boolean;\n getModuleId?: (moduleName: string) => string | null | undefined;\n moduleRoot?: string;\n};\n\nif (!process.env.BABEL_8_BREAKING) {\n const originalGetModuleName = getModuleName;\n\n // @ts-expect-error TS doesn't like reassigning a function.\n getModuleName = function getModuleName(\n rootOpts: RootOptions & PluginOptions,\n pluginOpts: PluginOptions,\n ): string | null {\n return originalGetModuleName(rootOpts, {\n moduleId: pluginOpts.moduleId ?? rootOpts.moduleId,\n moduleIds: pluginOpts.moduleIds ?? rootOpts.moduleIds,\n getModuleId: pluginOpts.getModuleId ?? rootOpts.getModuleId,\n moduleRoot: pluginOpts.moduleRoot ?? rootOpts.moduleRoot,\n });\n };\n}\n\nexport default function getModuleName(\n rootOpts: RootOptions,\n pluginOpts: PluginOptions,\n): string | null {\n const {\n filename,\n filenameRelative = filename,\n sourceRoot = pluginOpts.moduleRoot,\n } = rootOpts;\n\n const {\n moduleId,\n moduleIds = !!moduleId,\n\n getModuleId,\n\n moduleRoot = sourceRoot,\n } = pluginOpts;\n\n if (!moduleIds) return null;\n\n // moduleId is n/a if a `getModuleId()` is provided\n if (moduleId != null && !getModuleId) {\n return moduleId;\n }\n\n let moduleName = moduleRoot != null ? moduleRoot + \"/\" : \"\";\n\n if (filenameRelative) {\n const sourceRootReplacer =\n sourceRoot != null ? new RegExp(\"^\" + sourceRoot + \"/?\") : \"\";\n\n moduleName += filenameRelative\n // remove sourceRoot from filename\n .replace(sourceRootReplacer, \"\")\n // remove extension\n .replace(/\\.\\w*$/, \"\");\n }\n\n // normalize path separators\n moduleName = moduleName.replace(/\\\\/g, \"/\");\n\n if (getModuleId) {\n // If return is falsy, assume they want us to use our generated default name\n return getModuleId(moduleName) || moduleName;\n } else {\n return moduleName;\n }\n}\n","import assert from \"assert\";\nimport { template, types as t } from \"@babel/core\";\n\nimport { isModule } from \"@babel/helper-module-imports\";\n\nimport rewriteThis from \"./rewrite-this.ts\";\nimport rewriteLiveReferences from \"./rewrite-live-references.ts\";\nimport normalizeModuleAndLoadMetadata, {\n hasExports,\n isSideEffectImport,\n validateImportInteropOption,\n} from \"./normalize-and-load-metadata.ts\";\nimport type {\n ImportInterop,\n InteropType,\n ModuleMetadata,\n SourceModuleMetadata,\n} from \"./normalize-and-load-metadata.ts\";\nimport * as Lazy from \"./lazy-modules.ts\";\nimport type { NodePath } from \"@babel/core\";\n\nexport { buildDynamicImport } from \"./dynamic-import.ts\";\n\nif (!process.env.BABEL_8_BREAKING && !USE_ESM && !IS_STANDALONE) {\n // eslint-disable-next-line no-restricted-globals\n exports.getDynamicImportSource =\n // eslint-disable-next-line no-restricted-globals, import/extensions\n require(\"./dynamic-import\").getDynamicImportSource;\n}\n\nexport { default as getModuleName } from \"./get-module-name.ts\";\nexport type { PluginOptions } from \"./get-module-name.ts\";\n\nexport { hasExports, isSideEffectImport, isModule, rewriteThis };\n\nexport interface RewriteModuleStatementsAndPrepareHeaderOptions {\n exportName?: string;\n strict: boolean;\n allowTopLevelThis?: boolean;\n strictMode: boolean;\n loose?: boolean;\n importInterop?: ImportInterop;\n noInterop?: boolean;\n lazy?: Lazy.Lazy;\n getWrapperPayload?: (\n source: string,\n metadata: SourceModuleMetadata,\n importNodes: t.Node[],\n ) => unknown;\n wrapReference?: (ref: t.Expression, payload: unknown) => t.Expression | null;\n esNamespaceOnly?: boolean;\n filename: string | undefined;\n constantReexports?: boolean | void;\n enumerableModuleMeta?: boolean | void;\n noIncompleteNsImportDetection?: boolean | void;\n}\n\n/**\n * Perform all of the generic ES6 module rewriting needed to handle initial\n * module processing. This function will rewrite the majority of the given\n * program to reference the modules described by the returned metadata,\n * and returns a list of statements for use when initializing the module.\n */\nexport function rewriteModuleStatementsAndPrepareHeader(\n path: NodePath,\n {\n exportName,\n strict,\n allowTopLevelThis,\n strictMode,\n noInterop,\n importInterop = noInterop ? \"none\" : \"babel\",\n // TODO(Babel 8): After that `lazy` implementation is moved to the CJS\n // transform, remove this parameter.\n lazy,\n getWrapperPayload = Lazy.toGetWrapperPayload(lazy ?? false),\n wrapReference = Lazy.wrapReference,\n esNamespaceOnly,\n filename,\n\n constantReexports = process.env.BABEL_8_BREAKING\n ? undefined\n : arguments[1].loose,\n enumerableModuleMeta = process.env.BABEL_8_BREAKING\n ? undefined\n : arguments[1].loose,\n noIncompleteNsImportDetection,\n }: RewriteModuleStatementsAndPrepareHeaderOptions,\n) {\n validateImportInteropOption(importInterop);\n assert(isModule(path), \"Cannot process module statements in a script\");\n path.node.sourceType = \"script\";\n\n const meta = normalizeModuleAndLoadMetadata(path, exportName, {\n importInterop,\n initializeReexports: constantReexports,\n getWrapperPayload,\n esNamespaceOnly,\n filename,\n });\n\n if (!allowTopLevelThis) {\n rewriteThis(path);\n }\n\n rewriteLiveReferences(path, meta, wrapReference);\n\n if (strictMode !== false) {\n const hasStrict = path.node.directives.some(directive => {\n return directive.value.value === \"use strict\";\n });\n if (!hasStrict) {\n path.unshiftContainer(\n \"directives\",\n t.directive(t.directiveLiteral(\"use strict\")),\n );\n }\n }\n\n const headers = [];\n if (hasExports(meta) && !strict) {\n headers.push(buildESModuleHeader(meta, enumerableModuleMeta));\n }\n\n const nameList = buildExportNameListDeclaration(path, meta);\n\n if (nameList) {\n meta.exportNameListName = nameList.name;\n headers.push(nameList.statement);\n }\n\n // Create all of the statically known named exports.\n headers.push(\n ...buildExportInitializationStatements(\n path,\n meta,\n wrapReference,\n constantReexports,\n noIncompleteNsImportDetection,\n ),\n );\n\n return { meta, headers };\n}\n\n/**\n * Flag a set of statements as hoisted above all else so that module init\n * statements all run before user code.\n */\nexport function ensureStatementsHoisted(statements: t.Statement[]) {\n // Force all of the header fields to be at the top of the file.\n statements.forEach(header => {\n // @ts-expect-error Fixme: handle _blockHoist property\n header._blockHoist = 3;\n });\n}\n\n/**\n * Given an expression for a standard import object, like \"require('foo')\",\n * wrap it in a call to the interop helpers based on the type.\n */\nexport function wrapInterop(\n programPath: NodePath,\n expr: t.Expression,\n type: InteropType,\n): t.CallExpression {\n if (type === \"none\") {\n return null;\n }\n\n if (type === \"node-namespace\") {\n return t.callExpression(\n programPath.hub.addHelper(\"interopRequireWildcard\"),\n [expr, t.booleanLiteral(true)],\n );\n } else if (type === \"node-default\") {\n return null;\n }\n\n let helper;\n if (type === \"default\") {\n helper = \"interopRequireDefault\";\n } else if (type === \"namespace\") {\n helper = \"interopRequireWildcard\";\n } else {\n throw new Error(`Unknown interop: ${type}`);\n }\n\n return t.callExpression(programPath.hub.addHelper(helper), [expr]);\n}\n\n/**\n * Create the runtime initialization statements for a given requested source.\n * These will initialize all of the runtime import/export logic that\n * can't be handled statically by the statements created by\n * buildExportInitializationStatements().\n */\nexport function buildNamespaceInitStatements(\n metadata: ModuleMetadata,\n sourceMetadata: SourceModuleMetadata,\n constantReexports: boolean | void = false,\n wrapReference: (\n ref: t.Identifier,\n payload: unknown,\n ) => t.Expression | null = Lazy.wrapReference,\n) {\n const statements = [];\n\n const srcNamespaceId = t.identifier(sourceMetadata.name);\n\n for (const localName of sourceMetadata.importsNamespace) {\n if (localName === sourceMetadata.name) continue;\n\n // Create and assign binding to namespace object\n statements.push(\n template.statement`var NAME = SOURCE;`({\n NAME: localName,\n SOURCE: t.cloneNode(srcNamespaceId),\n }),\n );\n }\n\n const srcNamespace =\n wrapReference(srcNamespaceId, sourceMetadata.wrap) ?? srcNamespaceId;\n\n if (constantReexports) {\n statements.push(\n ...buildReexportsFromMeta(metadata, sourceMetadata, true, wrapReference),\n );\n }\n for (const exportName of sourceMetadata.reexportNamespace) {\n // Assign export to namespace object.\n statements.push(\n (!t.isIdentifier(srcNamespace)\n ? template.statement`\n Object.defineProperty(EXPORTS, \"NAME\", {\n enumerable: true,\n get: function() {\n return NAMESPACE;\n }\n });\n `\n : template.statement`EXPORTS.NAME = NAMESPACE;`)({\n EXPORTS: metadata.exportName,\n NAME: exportName,\n NAMESPACE: t.cloneNode(srcNamespace),\n }),\n );\n }\n if (sourceMetadata.reexportAll) {\n const statement = buildNamespaceReexport(\n metadata,\n t.cloneNode(srcNamespace),\n constantReexports,\n );\n statement.loc = sourceMetadata.reexportAll.loc;\n\n // Iterate props creating getter for each prop.\n statements.push(statement);\n }\n return statements;\n}\n\ninterface ReexportParts {\n exports: string;\n exportName: string;\n namespaceImport: t.Expression;\n}\n\nconst ReexportTemplate = {\n constant: ({ exports, exportName, namespaceImport }: ReexportParts) =>\n template.statement.ast`\n ${exports}.${exportName} = ${namespaceImport};\n `,\n constantComputed: ({ exports, exportName, namespaceImport }: ReexportParts) =>\n template.statement.ast`\n ${exports}[\"${exportName}\"] = ${namespaceImport};\n `,\n spec: ({ exports, exportName, namespaceImport }: ReexportParts) =>\n template.statement.ast`\n Object.defineProperty(${exports}, \"${exportName}\", {\n enumerable: true,\n get: function() {\n return ${namespaceImport};\n },\n });\n `,\n};\n\nfunction buildReexportsFromMeta(\n meta: ModuleMetadata,\n metadata: SourceModuleMetadata,\n constantReexports: boolean,\n wrapReference: (ref: t.Expression, payload: unknown) => t.Expression | null,\n): t.Statement[] {\n let namespace: t.Expression = t.identifier(metadata.name);\n namespace = wrapReference(namespace, metadata.wrap) ?? namespace;\n\n const { stringSpecifiers } = meta;\n return Array.from(metadata.reexports, ([exportName, importName]) => {\n let namespaceImport: t.Expression = t.cloneNode(namespace);\n if (importName === \"default\" && metadata.interop === \"node-default\") {\n // Nothing, it's ok as-is\n } else if (stringSpecifiers.has(importName)) {\n namespaceImport = t.memberExpression(\n namespaceImport,\n t.stringLiteral(importName),\n true,\n );\n } else {\n namespaceImport = t.memberExpression(\n namespaceImport,\n t.identifier(importName),\n );\n }\n const astNodes: ReexportParts = {\n exports: meta.exportName,\n exportName,\n namespaceImport,\n };\n if (constantReexports || t.isIdentifier(namespaceImport)) {\n if (stringSpecifiers.has(exportName)) {\n return ReexportTemplate.constantComputed(astNodes);\n } else {\n return ReexportTemplate.constant(astNodes);\n }\n } else {\n return ReexportTemplate.spec(astNodes);\n }\n });\n}\n\n/**\n * Build an \"__esModule\" header statement setting the property on a given object.\n */\nfunction buildESModuleHeader(\n metadata: ModuleMetadata,\n enumerableModuleMeta: boolean | void = false,\n) {\n return (\n enumerableModuleMeta\n ? template.statement`\n EXPORTS.__esModule = true;\n `\n : template.statement`\n Object.defineProperty(EXPORTS, \"__esModule\", {\n value: true,\n });\n `\n )({ EXPORTS: metadata.exportName });\n}\n\n/**\n * Create a re-export initialization loop for a specific imported namespace.\n */\nfunction buildNamespaceReexport(\n metadata: ModuleMetadata,\n namespace: t.Expression,\n constantReexports: boolean | void,\n) {\n return (\n constantReexports\n ? template.statement`\n Object.keys(NAMESPACE).forEach(function(key) {\n if (key === \"default\" || key === \"__esModule\") return;\n VERIFY_NAME_LIST;\n if (key in EXPORTS && EXPORTS[key] === NAMESPACE[key]) return;\n\n EXPORTS[key] = NAMESPACE[key];\n });\n `\n : // Also skip already assigned bindings if they are strictly equal\n // to be somewhat more spec-compliant when a file has multiple\n // namespace re-exports that would cause a binding to be exported\n // multiple times. However, multiple bindings of the same name that\n // export the same primitive value are silently skipped\n // (the spec requires an \"ambiguous bindings\" early error here).\n template.statement`\n Object.keys(NAMESPACE).forEach(function(key) {\n if (key === \"default\" || key === \"__esModule\") return;\n VERIFY_NAME_LIST;\n if (key in EXPORTS && EXPORTS[key] === NAMESPACE[key]) return;\n\n Object.defineProperty(EXPORTS, key, {\n enumerable: true,\n get: function() {\n return NAMESPACE[key];\n },\n });\n });\n `\n )({\n NAMESPACE: namespace,\n EXPORTS: metadata.exportName,\n VERIFY_NAME_LIST: metadata.exportNameListName\n ? template`\n if (Object.prototype.hasOwnProperty.call(EXPORTS_LIST, key)) return;\n `({ EXPORTS_LIST: metadata.exportNameListName })\n : null,\n });\n}\n\n/**\n * Build a statement declaring a variable that contains all of the exported\n * variable names in an object so they can easily be referenced from an\n * export * from statement to check for conflicts.\n */\nfunction buildExportNameListDeclaration(\n programPath: NodePath,\n metadata: ModuleMetadata,\n) {\n const exportedVars = Object.create(null);\n for (const data of metadata.local.values()) {\n for (const name of data.names) {\n exportedVars[name] = true;\n }\n }\n\n let hasReexport = false;\n for (const data of metadata.source.values()) {\n for (const exportName of data.reexports.keys()) {\n exportedVars[exportName] = true;\n }\n for (const exportName of data.reexportNamespace) {\n exportedVars[exportName] = true;\n }\n\n hasReexport = hasReexport || !!data.reexportAll;\n }\n\n if (!hasReexport || Object.keys(exportedVars).length === 0) return null;\n\n const name = programPath.scope.generateUidIdentifier(\"exportNames\");\n\n delete exportedVars.default;\n\n return {\n name: name.name,\n statement: t.variableDeclaration(\"var\", [\n t.variableDeclarator(name, t.valueToNode(exportedVars)),\n ]),\n };\n}\n\n/**\n * Create a set of statements that will initialize all of the statically-known\n * export names with their expected values.\n */\nfunction buildExportInitializationStatements(\n programPath: NodePath,\n metadata: ModuleMetadata,\n wrapReference: (ref: t.Expression, payload: unknown) => t.Expression | null,\n constantReexports: boolean | void = false,\n noIncompleteNsImportDetection: boolean | void = false,\n) {\n const initStatements: Array<[string, t.Statement | null]> = [];\n\n for (const [localName, data] of metadata.local) {\n if (data.kind === \"import\") {\n // No-open since these are explicitly set with the \"reexports\" block.\n } else if (data.kind === \"hoisted\") {\n initStatements.push([\n // data.names is always of length 1 because a hoisted export\n // name must be id of a function declaration\n data.names[0],\n buildInitStatement(metadata, data.names, t.identifier(localName)),\n ]);\n } else if (!noIncompleteNsImportDetection) {\n for (const exportName of data.names) {\n initStatements.push([exportName, null]);\n }\n }\n }\n\n for (const data of metadata.source.values()) {\n if (!constantReexports) {\n const reexportsStatements = buildReexportsFromMeta(\n metadata,\n data,\n false,\n wrapReference,\n );\n const reexports = [...data.reexports.keys()];\n for (let i = 0; i < reexportsStatements.length; i++) {\n initStatements.push([reexports[i], reexportsStatements[i]]);\n }\n }\n if (!noIncompleteNsImportDetection) {\n for (const exportName of data.reexportNamespace) {\n initStatements.push([exportName, null]);\n }\n }\n }\n\n // https://tc39.es/ecma262/#sec-module-namespace-exotic-objects\n // The [Exports] list is ordered as if an Array of those String values\n // had been sorted using %Array.prototype.sort% using undefined as comparefn\n initStatements.sort(([a], [b]) => {\n if (a < b) return -1;\n if (b < a) return 1;\n return 0;\n });\n\n const results = [];\n if (noIncompleteNsImportDetection) {\n for (const [, initStatement] of initStatements) {\n results.push(initStatement);\n }\n } else {\n // We generate init statements (`exports.a = exports.b = ... = void 0`)\n // for every 100 exported names to avoid deeply-nested AST structures.\n const chunkSize = 100;\n for (let i = 0; i < initStatements.length; i += chunkSize) {\n let uninitializedExportNames = [];\n for (let j = 0; j < chunkSize && i + j < initStatements.length; j++) {\n const [exportName, initStatement] = initStatements[i + j];\n if (initStatement !== null) {\n if (uninitializedExportNames.length > 0) {\n results.push(\n buildInitStatement(\n metadata,\n uninitializedExportNames,\n programPath.scope.buildUndefinedNode(),\n ),\n );\n // reset after uninitializedExportNames has been transformed\n // to init statements\n uninitializedExportNames = [];\n }\n results.push(initStatement);\n } else {\n uninitializedExportNames.push(exportName);\n }\n }\n if (uninitializedExportNames.length > 0) {\n results.push(\n buildInitStatement(\n metadata,\n uninitializedExportNames,\n programPath.scope.buildUndefinedNode(),\n ),\n );\n }\n }\n }\n\n return results;\n}\n\ninterface InitParts {\n exports: string;\n name: string;\n value: t.Expression;\n}\n\n/**\n * Given a set of export names, create a set of nested assignments to\n * initialize them all to a given expression.\n */\nconst InitTemplate = {\n computed: ({ exports, name, value }: InitParts) =>\n template.expression.ast`${exports}[\"${name}\"] = ${value}`,\n default: ({ exports, name, value }: InitParts) =>\n template.expression.ast`${exports}.${name} = ${value}`,\n define: ({ exports, name, value }: InitParts) =>\n template.expression.ast`\n Object.defineProperty(${exports}, \"${name}\", {\n enumerable: true,\n value: void 0,\n writable: true\n })[\"${name}\"] = ${value}`,\n};\n\nfunction buildInitStatement(\n metadata: ModuleMetadata,\n exportNames: string[],\n initExpr: t.Expression,\n) {\n const { stringSpecifiers, exportName: exports } = metadata;\n return t.expressionStatement(\n exportNames.reduce((value, name) => {\n const params = {\n exports,\n name,\n value,\n };\n\n if (name === \"__proto__\") {\n return InitTemplate.define(params);\n }\n\n if (stringSpecifiers.has(name)) {\n return InitTemplate.computed(params);\n }\n\n return InitTemplate.default(params);\n }, initExpr),\n );\n}\n","// TODO(Babel 8): Remove this file\n\nexports.getModuleName = () =>\n require(\"@babel/helper-module-transforms\").getModuleName;\n","import * as helpers from \"@babel/helpers\";\nimport { NodePath } from \"@babel/traverse\";\nimport type { HubInterface, Visitor, Scope } from \"@babel/traverse\";\nimport { codeFrameColumns } from \"@babel/code-frame\";\nimport traverse from \"@babel/traverse\";\nimport { cloneNode, interpreterDirective } from \"@babel/types\";\nimport type * as t from \"@babel/types\";\nimport semver from \"semver\";\n\nimport type { NormalizedFile } from \"../normalize-file.ts\";\n\n// @ts-expect-error This file is `any`\nimport * as babel7 from \"./babel-7-helpers.cjs\";\n\nconst errorVisitor: Visitor<{ loc: t.SourceLocation | null }> = {\n enter(path, state) {\n const loc = path.node.loc;\n if (loc) {\n state.loc = loc;\n path.stop();\n }\n },\n};\n\nexport default class File {\n _map: Map = new Map();\n opts: { [key: string]: any };\n declarations: { [key: string]: t.Identifier } = {};\n path: NodePath;\n ast: t.File;\n scope: Scope;\n metadata: { [key: string]: any } = {};\n code: string = \"\";\n inputMap: any;\n\n hub: HubInterface & { file: File } = {\n // keep it for the usage in babel-core, ex: path.hub.file.opts.filename\n file: this,\n getCode: () => this.code,\n getScope: () => this.scope,\n addHelper: this.addHelper.bind(this),\n buildError: this.buildCodeFrameError.bind(this),\n };\n\n constructor(options: any, { code, ast, inputMap }: NormalizedFile) {\n this.opts = options;\n this.code = code;\n this.ast = ast;\n this.inputMap = inputMap;\n\n this.path = NodePath.get({\n hub: this.hub,\n parentPath: null,\n parent: this.ast,\n container: this.ast,\n key: \"program\",\n }).setContext() as NodePath;\n this.scope = this.path.scope;\n }\n\n /**\n * Provide backward-compatible access to the interpreter directive handling\n * in Babel 6.x. If you are writing a plugin for Babel 7.x, it would be\n * best to use 'program.interpreter' directly.\n */\n get shebang(): string {\n const { interpreter } = this.path.node;\n return interpreter ? interpreter.value : \"\";\n }\n set shebang(value: string) {\n if (value) {\n this.path.get(\"interpreter\").replaceWith(interpreterDirective(value));\n } else {\n this.path.get(\"interpreter\").remove();\n }\n }\n\n set(key: unknown, val: unknown) {\n if (!process.env.BABEL_8_BREAKING) {\n if (key === \"helpersNamespace\") {\n throw new Error(\n \"Babel 7.0.0-beta.56 has dropped support for the 'helpersNamespace' utility.\" +\n \"If you are using @babel/plugin-external-helpers you will need to use a newer \" +\n \"version than the one you currently have installed. \" +\n \"If you have your own implementation, you'll want to explore using 'helperGenerator' \" +\n \"alongside 'file.availableHelper()'.\",\n );\n }\n }\n\n this._map.set(key, val);\n }\n\n get(key: unknown): any {\n return this._map.get(key);\n }\n\n has(key: unknown): boolean {\n return this._map.has(key);\n }\n\n /**\n * Check if a given helper is available in @babel/core's helper list.\n *\n * This _also_ allows you to pass a Babel version specifically. If the\n * helper exists, but was not available for the full given range, it will be\n * considered unavailable.\n */\n availableHelper(name: string, versionRange?: string | null): boolean {\n let minVersion;\n try {\n minVersion = helpers.minVersion(name);\n } catch (err) {\n if (err.code !== \"BABEL_HELPER_UNKNOWN\") throw err;\n\n return false;\n }\n\n if (typeof versionRange !== \"string\") return true;\n\n // semver.intersects() has some surprising behavior with comparing ranges\n // with pre-release versions. We add '^' to ensure that we are always\n // comparing ranges with ranges, which sidesteps this logic.\n // For example:\n //\n // semver.intersects(`<7.0.1`, \"7.0.0-beta.0\") // false - surprising\n // semver.intersects(`<7.0.1`, \"^7.0.0-beta.0\") // true - expected\n //\n // This is because the first falls back to\n //\n // semver.satisfies(\"7.0.0-beta.0\", `<7.0.1`) // false - surprising\n //\n // and this fails because a prerelease version can only satisfy a range\n // if it is a prerelease within the same major/minor/patch range.\n //\n // Note: If this is found to have issues, please also revisit the logic in\n // transform-runtime's definitions.js file.\n if (semver.valid(versionRange)) versionRange = `^${versionRange}`;\n\n if (process.env.BABEL_8_BREAKING) {\n return (\n !semver.intersects(`<${minVersion}`, versionRange) &&\n !semver.intersects(`>=9.0.0`, versionRange)\n );\n } else {\n return (\n !semver.intersects(`<${minVersion}`, versionRange) &&\n !semver.intersects(`>=8.0.0`, versionRange)\n );\n }\n }\n\n addHelper(name: string): t.Identifier {\n const declar = this.declarations[name];\n if (declar) return cloneNode(declar);\n\n const generator = this.get(\"helperGenerator\");\n if (generator) {\n const res = generator(name);\n if (res) return res;\n }\n\n // make sure that the helper exists\n helpers.minVersion(name);\n\n const uid = (this.declarations[name] =\n this.scope.generateUidIdentifier(name));\n\n const dependencies: { [key: string]: t.Identifier } = {};\n for (const dep of helpers.getDependencies(name)) {\n dependencies[dep] = this.addHelper(dep);\n }\n\n const { nodes, globals } = helpers.get(\n name,\n dep => dependencies[dep],\n uid.name,\n Object.keys(this.scope.getAllBindings()),\n );\n\n globals.forEach(name => {\n if (this.path.scope.hasBinding(name, true /* noGlobals */)) {\n this.path.scope.rename(name);\n }\n });\n\n nodes.forEach(node => {\n // @ts-expect-error Fixme: document _compact node property\n node._compact = true;\n });\n\n const added = this.path.unshiftContainer(\"body\", nodes);\n // TODO: NodePath#unshiftContainer should automatically register new\n // bindings.\n for (const path of added) {\n if (path.isVariableDeclaration()) this.scope.registerDeclaration(path);\n }\n\n return uid;\n }\n\n buildCodeFrameError(\n node: t.Node | undefined | null,\n msg: string,\n _Error: typeof Error = SyntaxError,\n ): Error {\n let loc = node?.loc;\n\n if (!loc && node) {\n const state: { loc?: t.SourceLocation | null } = {\n loc: null,\n };\n traverse(node, errorVisitor, this.scope, state);\n loc = state.loc;\n\n let txt =\n \"This is an error on an internal node. Probably an internal error.\";\n if (loc) txt += \" Location has been estimated.\";\n\n msg += ` (${txt})`;\n }\n\n if (loc) {\n const { highlightCode = true } = this.opts;\n\n msg +=\n \"\\n\" +\n codeFrameColumns(\n this.code,\n {\n start: {\n line: loc.start.line,\n column: loc.start.column + 1,\n },\n end:\n loc.end && loc.start.line === loc.end.line\n ? {\n line: loc.end.line,\n column: loc.end.column + 1,\n }\n : undefined,\n },\n { highlightCode },\n );\n }\n\n return new _Error(msg);\n }\n}\n\nif (!process.env.BABEL_8_BREAKING) {\n // @ts-expect-error Babel 7\n File.prototype.addImport = function addImport() {\n throw new Error(\n \"This API has been removed. If you're looking for this \" +\n \"functionality in Babel 7, you should import the \" +\n \"'@babel/helper-module-imports' module and use the functions exposed \" +\n \" from that module, such as 'addNamed' or 'addDefault'.\",\n );\n };\n // @ts-expect-error Babel 7\n File.prototype.addTemplateObject = function addTemplateObject() {\n throw new Error(\n \"This function has been moved into the template literal transform itself.\",\n );\n };\n\n if (!USE_ESM || IS_STANDALONE) {\n // @ts-expect-error Babel 7\n File.prototype.getModuleName = function getModuleName() {\n return babel7.getModuleName()(this.opts, this.opts);\n };\n }\n}\n","import * as helpers from \"@babel/helpers\";\nimport generator from \"@babel/generator\";\nimport template from \"@babel/template\";\nimport {\n arrayExpression,\n assignmentExpression,\n binaryExpression,\n blockStatement,\n callExpression,\n cloneNode,\n conditionalExpression,\n exportNamedDeclaration,\n exportSpecifier,\n expressionStatement,\n functionExpression,\n identifier,\n memberExpression,\n objectExpression,\n program,\n stringLiteral,\n unaryExpression,\n variableDeclaration,\n variableDeclarator,\n} from \"@babel/types\";\nimport type * as t from \"@babel/types\";\nimport type { Replacements } from \"@babel/template\";\n\n// Wrapped to avoid wasting time parsing this when almost no-one uses\n// build-external-helpers.\nconst buildUmdWrapper = (replacements: Replacements) =>\n template.statement`\n (function (root, factory) {\n if (typeof define === \"function\" && define.amd) {\n define(AMD_ARGUMENTS, factory);\n } else if (typeof exports === \"object\") {\n factory(COMMON_ARGUMENTS);\n } else {\n factory(BROWSER_ARGUMENTS);\n }\n })(UMD_ROOT, function (FACTORY_PARAMETERS) {\n FACTORY_BODY\n });\n `(replacements);\n\nfunction buildGlobal(allowlist?: Array) {\n const namespace = identifier(\"babelHelpers\");\n\n const body: t.Statement[] = [];\n const container = functionExpression(\n null,\n [identifier(\"global\")],\n blockStatement(body),\n );\n const tree = program([\n expressionStatement(\n callExpression(container, [\n // typeof global === \"undefined\" ? self : global\n conditionalExpression(\n binaryExpression(\n \"===\",\n unaryExpression(\"typeof\", identifier(\"global\")),\n stringLiteral(\"undefined\"),\n ),\n identifier(\"self\"),\n identifier(\"global\"),\n ),\n ]),\n ),\n ]);\n\n body.push(\n variableDeclaration(\"var\", [\n variableDeclarator(\n namespace,\n assignmentExpression(\n \"=\",\n memberExpression(identifier(\"global\"), namespace),\n objectExpression([]),\n ),\n ),\n ]),\n );\n\n buildHelpers(body, namespace, allowlist);\n\n return tree;\n}\n\nfunction buildModule(allowlist?: Array) {\n const body: t.Statement[] = [];\n const refs = buildHelpers(body, null, allowlist);\n\n body.unshift(\n exportNamedDeclaration(\n null,\n Object.keys(refs).map(name => {\n return exportSpecifier(cloneNode(refs[name]), identifier(name));\n }),\n ),\n );\n\n return program(body, [], \"module\");\n}\n\nfunction buildUmd(allowlist?: Array) {\n const namespace = identifier(\"babelHelpers\");\n\n const body: t.Statement[] = [];\n body.push(\n variableDeclaration(\"var\", [\n variableDeclarator(namespace, identifier(\"global\")),\n ]),\n );\n\n buildHelpers(body, namespace, allowlist);\n\n return program([\n buildUmdWrapper({\n FACTORY_PARAMETERS: identifier(\"global\"),\n BROWSER_ARGUMENTS: assignmentExpression(\n \"=\",\n memberExpression(identifier(\"root\"), namespace),\n objectExpression([]),\n ),\n COMMON_ARGUMENTS: identifier(\"exports\"),\n AMD_ARGUMENTS: arrayExpression([stringLiteral(\"exports\")]),\n FACTORY_BODY: body,\n UMD_ROOT: identifier(\"this\"),\n }),\n ]);\n}\n\nfunction buildVar(allowlist?: Array) {\n const namespace = identifier(\"babelHelpers\");\n\n const body: t.Statement[] = [];\n body.push(\n variableDeclaration(\"var\", [\n variableDeclarator(namespace, objectExpression([])),\n ]),\n );\n const tree = program(body);\n buildHelpers(body, namespace, allowlist);\n body.push(expressionStatement(namespace));\n return tree;\n}\n\nfunction buildHelpers(\n body: t.Statement[],\n namespace: t.Expression,\n allowlist?: Array,\n): Record;\nfunction buildHelpers(\n body: t.Statement[],\n namespace: null,\n allowlist?: Array,\n): Record;\n\nfunction buildHelpers(\n body: t.Statement[],\n namespace: t.Expression | null,\n allowlist?: Array,\n) {\n const getHelperReference = (name: string) => {\n return namespace\n ? memberExpression(namespace, identifier(name))\n : identifier(`_${name}`);\n };\n\n const refs: { [key: string]: t.Identifier | t.MemberExpression } = {};\n helpers.list.forEach(function (name) {\n if (allowlist && !allowlist.includes(name)) return;\n\n const ref = (refs[name] = getHelperReference(name));\n\n const { nodes } = helpers.get(\n name,\n getHelperReference,\n namespace ? null : `_${name}`,\n [],\n namespace\n ? (ast, exportName, mapExportBindingAssignments) => {\n mapExportBindingAssignments(node =>\n assignmentExpression(\"=\", ref, node),\n );\n ast.body.push(\n expressionStatement(\n assignmentExpression(\"=\", ref, identifier(exportName)),\n ),\n );\n }\n : null,\n );\n\n body.push(...nodes);\n });\n return refs;\n}\nexport default function (\n allowlist?: Array,\n outputType: \"global\" | \"module\" | \"umd\" | \"var\" = \"global\",\n) {\n let tree: t.Program;\n\n const build = {\n global: buildGlobal,\n module: buildModule,\n umd: buildUmd,\n var: buildVar,\n }[outputType];\n\n if (build) {\n tree = build(allowlist);\n } else {\n throw new Error(`Unsupported output type ${outputType}`);\n }\n\n return generator(tree).code;\n}\n","import type { Handler } from \"gensync\";\n\nimport type {\n ConfigFile,\n IgnoreFile,\n RelativeConfig,\n FilePackageData,\n} from \"./types.ts\";\n\nimport type { CallerMetadata } from \"../validation/options.ts\";\n\nexport type { ConfigFile, IgnoreFile, RelativeConfig, FilePackageData };\n\nexport function findConfigUpwards(\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n rootDir: string,\n): string | null {\n return null;\n}\n\n// eslint-disable-next-line require-yield\nexport function* findPackageData(filepath: string): Handler {\n return {\n filepath,\n directories: [],\n pkg: null,\n isPackage: false,\n };\n}\n\n// eslint-disable-next-line require-yield\nexport function* findRelativeConfig(\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n pkgData: FilePackageData,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n envName: string,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n caller: CallerMetadata | undefined,\n): Handler {\n return { config: null, ignore: null };\n}\n\n// eslint-disable-next-line require-yield\nexport function* findRootConfig(\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n dirname: string,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n envName: string,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n caller: CallerMetadata | undefined,\n): Handler {\n return null;\n}\n\n// eslint-disable-next-line require-yield\nexport function* loadConfig(\n name: string,\n dirname: string,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n envName: string,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n caller: CallerMetadata | undefined,\n): Handler {\n throw new Error(`Cannot load ${name} relative to ${dirname} in a browser`);\n}\n\n// eslint-disable-next-line require-yield\nexport function* resolveShowConfigPath(\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n dirname: string,\n): Handler {\n return null;\n}\n\nexport const ROOT_CONFIG_FILENAMES: string[] = [];\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport function resolvePlugin(name: string, dirname: string): string | null {\n return null;\n}\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport function resolvePreset(name: string, dirname: string): string | null {\n return null;\n}\n\nexport function loadPlugin(\n name: string,\n dirname: string,\n): Handler<{\n filepath: string;\n value: unknown;\n}> {\n throw new Error(\n `Cannot load plugin ${name} relative to ${dirname} in a browser`,\n );\n}\n\nexport function loadPreset(\n name: string,\n dirname: string,\n): Handler<{\n filepath: string;\n value: unknown;\n}> {\n throw new Error(\n `Cannot load preset ${name} relative to ${dirname} in a browser`,\n );\n}\n","export function getEnv(defaultValue: string = \"development\"): string {\n return process.env.BABEL_ENV || process.env.NODE_ENV || defaultValue;\n}\n","\"use strict\";\n\n// These use the global symbol registry so that multiple copies of this\n// library can work together in case they are not deduped.\nconst GENSYNC_START = Symbol.for(\"gensync:v1:start\");\nconst GENSYNC_SUSPEND = Symbol.for(\"gensync:v1:suspend\");\n\nconst GENSYNC_EXPECTED_START = \"GENSYNC_EXPECTED_START\";\nconst GENSYNC_EXPECTED_SUSPEND = \"GENSYNC_EXPECTED_SUSPEND\";\nconst GENSYNC_OPTIONS_ERROR = \"GENSYNC_OPTIONS_ERROR\";\nconst GENSYNC_RACE_NONEMPTY = \"GENSYNC_RACE_NONEMPTY\";\nconst GENSYNC_ERRBACK_NO_CALLBACK = \"GENSYNC_ERRBACK_NO_CALLBACK\";\n\nmodule.exports = Object.assign(\n function gensync(optsOrFn) {\n let genFn = optsOrFn;\n if (typeof optsOrFn !== \"function\") {\n genFn = newGenerator(optsOrFn);\n } else {\n genFn = wrapGenerator(optsOrFn);\n }\n\n return Object.assign(genFn, makeFunctionAPI(genFn));\n },\n {\n all: buildOperation({\n name: \"all\",\n arity: 1,\n sync: function(args) {\n const items = Array.from(args[0]);\n return items.map(item => evaluateSync(item));\n },\n async: function(args, resolve, reject) {\n const items = Array.from(args[0]);\n\n if (items.length === 0) {\n Promise.resolve().then(() => resolve([]));\n return;\n }\n\n let count = 0;\n const results = items.map(() => undefined);\n items.forEach((item, i) => {\n evaluateAsync(\n item,\n val => {\n results[i] = val;\n count += 1;\n\n if (count === results.length) resolve(results);\n },\n reject\n );\n });\n },\n }),\n race: buildOperation({\n name: \"race\",\n arity: 1,\n sync: function(args) {\n const items = Array.from(args[0]);\n if (items.length === 0) {\n throw makeError(\"Must race at least 1 item\", GENSYNC_RACE_NONEMPTY);\n }\n\n return evaluateSync(items[0]);\n },\n async: function(args, resolve, reject) {\n const items = Array.from(args[0]);\n if (items.length === 0) {\n throw makeError(\"Must race at least 1 item\", GENSYNC_RACE_NONEMPTY);\n }\n\n for (const item of items) {\n evaluateAsync(item, resolve, reject);\n }\n },\n }),\n }\n);\n\n/**\n * Given a generator function, return the standard API object that executes\n * the generator and calls the callbacks.\n */\nfunction makeFunctionAPI(genFn) {\n const fns = {\n sync: function(...args) {\n return evaluateSync(genFn.apply(this, args));\n },\n async: function(...args) {\n return new Promise((resolve, reject) => {\n evaluateAsync(genFn.apply(this, args), resolve, reject);\n });\n },\n errback: function(...args) {\n const cb = args.pop();\n if (typeof cb !== \"function\") {\n throw makeError(\n \"Asynchronous function called without callback\",\n GENSYNC_ERRBACK_NO_CALLBACK\n );\n }\n\n let gen;\n try {\n gen = genFn.apply(this, args);\n } catch (err) {\n cb(err);\n return;\n }\n\n evaluateAsync(gen, val => cb(undefined, val), err => cb(err));\n },\n };\n return fns;\n}\n\nfunction assertTypeof(type, name, value, allowUndefined) {\n if (\n typeof value === type ||\n (allowUndefined && typeof value === \"undefined\")\n ) {\n return;\n }\n\n let msg;\n if (allowUndefined) {\n msg = `Expected opts.${name} to be either a ${type}, or undefined.`;\n } else {\n msg = `Expected opts.${name} to be a ${type}.`;\n }\n\n throw makeError(msg, GENSYNC_OPTIONS_ERROR);\n}\nfunction makeError(msg, code) {\n return Object.assign(new Error(msg), { code });\n}\n\n/**\n * Given an options object, return a new generator that dispatches the\n * correct handler based on sync or async execution.\n */\nfunction newGenerator({ name, arity, sync, async, errback }) {\n assertTypeof(\"string\", \"name\", name, true /* allowUndefined */);\n assertTypeof(\"number\", \"arity\", arity, true /* allowUndefined */);\n assertTypeof(\"function\", \"sync\", sync);\n assertTypeof(\"function\", \"async\", async, true /* allowUndefined */);\n assertTypeof(\"function\", \"errback\", errback, true /* allowUndefined */);\n if (async && errback) {\n throw makeError(\n \"Expected one of either opts.async or opts.errback, but got _both_.\",\n GENSYNC_OPTIONS_ERROR\n );\n }\n\n if (typeof name !== \"string\") {\n let fnName;\n if (errback && errback.name && errback.name !== \"errback\") {\n fnName = errback.name;\n }\n if (async && async.name && async.name !== \"async\") {\n fnName = async.name.replace(/Async$/, \"\");\n }\n if (sync && sync.name && sync.name !== \"sync\") {\n fnName = sync.name.replace(/Sync$/, \"\");\n }\n\n if (typeof fnName === \"string\") {\n name = fnName;\n }\n }\n\n if (typeof arity !== \"number\") {\n arity = sync.length;\n }\n\n return buildOperation({\n name,\n arity,\n sync: function(args) {\n return sync.apply(this, args);\n },\n async: function(args, resolve, reject) {\n if (async) {\n async.apply(this, args).then(resolve, reject);\n } else if (errback) {\n errback.call(this, ...args, (err, value) => {\n if (err == null) resolve(value);\n else reject(err);\n });\n } else {\n resolve(sync.apply(this, args));\n }\n },\n });\n}\n\nfunction wrapGenerator(genFn) {\n return setFunctionMetadata(genFn.name, genFn.length, function(...args) {\n return genFn.apply(this, args);\n });\n}\n\nfunction buildOperation({ name, arity, sync, async }) {\n return setFunctionMetadata(name, arity, function*(...args) {\n const resume = yield GENSYNC_START;\n if (!resume) {\n // Break the tail call to avoid a bug in V8 v6.X with --harmony enabled.\n const res = sync.call(this, args);\n return res;\n }\n\n let result;\n try {\n async.call(\n this,\n args,\n value => {\n if (result) return;\n\n result = { value };\n resume();\n },\n err => {\n if (result) return;\n\n result = { err };\n resume();\n }\n );\n } catch (err) {\n result = { err };\n resume();\n }\n\n // Suspend until the callbacks run. Will resume synchronously if the\n // callback was already called.\n yield GENSYNC_SUSPEND;\n\n if (result.hasOwnProperty(\"err\")) {\n throw result.err;\n }\n\n return result.value;\n });\n}\n\nfunction evaluateSync(gen) {\n let value;\n while (!({ value } = gen.next()).done) {\n assertStart(value, gen);\n }\n return value;\n}\n\nfunction evaluateAsync(gen, resolve, reject) {\n (function step() {\n try {\n let value;\n while (!({ value } = gen.next()).done) {\n assertStart(value, gen);\n\n // If this throws, it is considered to have broken the contract\n // established for async handlers. If these handlers are called\n // synchronously, it is also considered bad behavior.\n let sync = true;\n let didSyncResume = false;\n const out = gen.next(() => {\n if (sync) {\n didSyncResume = true;\n } else {\n step();\n }\n });\n sync = false;\n\n assertSuspend(out, gen);\n\n if (!didSyncResume) {\n // Callback wasn't called synchronously, so break out of the loop\n // and let it call 'step' later.\n return;\n }\n }\n\n return resolve(value);\n } catch (err) {\n return reject(err);\n }\n })();\n}\n\nfunction assertStart(value, gen) {\n if (value === GENSYNC_START) return;\n\n throwError(\n gen,\n makeError(\n `Got unexpected yielded value in gensync generator: ${JSON.stringify(\n value\n )}. Did you perhaps mean to use 'yield*' instead of 'yield'?`,\n GENSYNC_EXPECTED_START\n )\n );\n}\nfunction assertSuspend({ value, done }, gen) {\n if (!done && value === GENSYNC_SUSPEND) return;\n\n throwError(\n gen,\n makeError(\n done\n ? \"Unexpected generator completion. If you get this, it is probably a gensync bug.\"\n : `Expected GENSYNC_SUSPEND, got ${JSON.stringify(\n value\n )}. If you get this, it is probably a gensync bug.`,\n GENSYNC_EXPECTED_SUSPEND\n )\n );\n}\n\nfunction throwError(gen, err) {\n // Call `.throw` so that users can step in a debugger to easily see which\n // 'yield' passed an unexpected value. If the `.throw` call didn't throw\n // back to the generator, we explicitly do it to stop the error\n // from being swallowed by user code try/catches.\n if (gen.throw) gen.throw(err);\n throw err;\n}\n\nfunction isIterable(value) {\n return (\n !!value &&\n (typeof value === \"object\" || typeof value === \"function\") &&\n !value[Symbol.iterator]\n );\n}\n\nfunction setFunctionMetadata(name, arity, fn) {\n if (typeof name === \"string\") {\n // This should always work on the supported Node versions, but for the\n // sake of users that are compiling to older versions, we check for\n // configurability so we don't throw.\n const nameDesc = Object.getOwnPropertyDescriptor(fn, \"name\");\n if (!nameDesc || nameDesc.configurable) {\n Object.defineProperty(\n fn,\n \"name\",\n Object.assign(nameDesc || {}, {\n configurable: true,\n value: name,\n })\n );\n }\n }\n\n if (typeof arity === \"number\") {\n const lengthDesc = Object.getOwnPropertyDescriptor(fn, \"length\");\n if (!lengthDesc || lengthDesc.configurable) {\n Object.defineProperty(\n fn,\n \"length\",\n Object.assign(lengthDesc || {}, {\n configurable: true,\n value: arity,\n })\n );\n }\n }\n\n return fn;\n}\n","import gensync, { type Gensync, type Handler, type Callback } from \"gensync\";\n\ntype MaybePromise = T | Promise;\n\nconst runGenerator: {\n sync(gen: Handler): Return;\n async(gen: Handler): Promise;\n errback(gen: Handler, cb: Callback): void;\n} = gensync(function* (item: Handler): Handler {\n return yield* item;\n});\n\n// This Gensync returns true if the current execution context is\n// asynchronous, otherwise it returns false.\nexport const isAsync = gensync({\n sync: () => false,\n errback: cb => cb(null, true),\n});\n\n// This function wraps any functions (which could be either synchronous or\n// asynchronous) with a Gensync. If the wrapped function returns a promise\n// but the current execution context is synchronous, it will throw the\n// provided error.\n// This is used to handle user-provided functions which could be asynchronous.\nexport function maybeAsync(\n fn: (...args: Args) => Return,\n message: string,\n): Gensync {\n return gensync({\n sync(...args) {\n const result = fn.apply(this, args);\n if (isThenable(result)) throw new Error(message);\n return result;\n },\n async(...args) {\n return Promise.resolve(fn.apply(this, args));\n },\n });\n}\n\nconst withKind = gensync({\n sync: cb => cb(\"sync\"),\n async: async cb => cb(\"async\"),\n}) as (cb: (kind: \"sync\" | \"async\") => MaybePromise) => Handler;\n\n// This function wraps a generator (or a Gensync) into another function which,\n// when called, will run the provided generator in a sync or async way, depending\n// on the execution context where this forwardAsync function is called.\n// This is useful, for example, when passing a callback to a function which isn't\n// aware of gensync, but it only knows about synchronous and asynchronous functions.\n// An example is cache.using, which being exposed to the user must be as simple as\n// possible:\n// yield* forwardAsync(gensyncFn, wrappedFn =>\n// cache.using(x => {\n// // Here we don't know about gensync. wrappedFn is a\n// // normal sync or async function\n// return wrappedFn(x);\n// })\n// )\nexport function forwardAsync(\n action: (...args: Args) => Handler,\n cb: (\n adapted: (...args: Args) => MaybePromise,\n ) => MaybePromise,\n): Handler {\n const g = gensync(action);\n return withKind(kind => {\n const adapted = g[kind];\n return cb(adapted);\n });\n}\n\n// If the given generator is executed asynchronously, the first time that it\n// is paused (i.e. When it yields a gensync generator which can't be run\n// synchronously), call the \"firstPause\" callback.\nexport const onFirstPause = gensync<\n [gen: Handler, firstPause: () => void],\n unknown\n>({\n name: \"onFirstPause\",\n arity: 2,\n sync: function (item) {\n return runGenerator.sync(item);\n },\n errback: function (item, firstPause, cb) {\n let completed = false;\n\n runGenerator.errback(item, (err, value) => {\n completed = true;\n cb(err, value);\n });\n\n if (!completed) {\n firstPause();\n }\n },\n}) as (gen: Handler, firstPause: () => void) => Handler;\n\n// Wait for the given promise to be resolved\nexport const waitFor = gensync({\n sync: x => x,\n async: async x => x,\n}) as (p: T | Promise) => Handler;\n\nexport function isThenable(val: any): val is PromiseLike {\n return (\n !!val &&\n (typeof val === \"object\" || typeof val === \"function\") &&\n !!val.then &&\n typeof val.then === \"function\"\n );\n}\n","import type {\n ValidatedOptions,\n NormalizedOptions,\n} from \"./validation/options.ts\";\n\nexport function mergeOptions(\n target: ValidatedOptions,\n source: ValidatedOptions | NormalizedOptions,\n): void {\n for (const k of Object.keys(source)) {\n if (\n (k === \"parserOpts\" || k === \"generatorOpts\" || k === \"assumptions\") &&\n source[k]\n ) {\n const parserOpts = source[k];\n const targetObj = target[k] || (target[k] = {});\n mergeDefaultFields(targetObj, parserOpts);\n } else {\n //@ts-expect-error k must index source\n const val = source[k];\n //@ts-expect-error assigning source to target\n if (val !== undefined) target[k] = val as any;\n }\n }\n}\n\nfunction mergeDefaultFields(target: T, source: T) {\n for (const k of Object.keys(source) as (keyof T)[]) {\n const val = source[k];\n if (val !== undefined) target[k] = val;\n }\n}\n\nexport function isIterableIterator(value: any): value is IterableIterator {\n return (\n !!value &&\n typeof value.next === \"function\" &&\n typeof value[Symbol.iterator] === \"function\"\n );\n}\n","export type DeepArray = Array>;\n\n// Just to make sure that DeepArray is not assignable to ReadonlyDeepArray\ndeclare const __marker: unique symbol;\nexport type ReadonlyDeepArray = ReadonlyArray> & {\n [__marker]: true;\n};\n\nexport function finalize(deepArr: DeepArray): ReadonlyDeepArray {\n return Object.freeze(deepArr) as ReadonlyDeepArray;\n}\n\nexport function flattenToSet(\n arr: ReadonlyDeepArray,\n): Set {\n const result = new Set();\n const stack = [arr];\n while (stack.length > 0) {\n for (const el of stack.pop()) {\n if (Array.isArray(el)) stack.push(el as ReadonlyDeepArray);\n else result.add(el as T);\n }\n }\n return result;\n}\n","import { finalize } from \"./helpers/deep-array.ts\";\nimport type { ReadonlyDeepArray } from \"./helpers/deep-array.ts\";\nimport type { PluginObject } from \"./validation/plugins.ts\";\n\nexport default class Plugin {\n key: string | undefined | null;\n manipulateOptions?: (options: unknown, parserOpts: unknown) => void;\n post?: PluginObject[\"post\"];\n pre?: PluginObject[\"pre\"];\n visitor: PluginObject[\"visitor\"];\n\n parserOverride?: Function;\n generatorOverride?: Function;\n\n options: object;\n\n externalDependencies: ReadonlyDeepArray;\n\n constructor(\n plugin: PluginObject,\n options: object,\n key?: string,\n externalDependencies: ReadonlyDeepArray = finalize([]),\n ) {\n this.key = plugin.name || key;\n\n this.manipulateOptions = plugin.manipulateOptions;\n this.post = plugin.post;\n this.pre = plugin.pre;\n this.visitor = plugin.visitor || {};\n this.parserOverride = plugin.parserOverride;\n this.generatorOverride = plugin.generatorOverride;\n\n this.options = options;\n this.externalDependencies = externalDependencies;\n }\n}\n","import type { Handler } from \"gensync\";\n\nimport { isAsync, waitFor } from \"./async.ts\";\n\nexport function once(fn: () => Handler): () => Handler {\n let result: { ok: true; value: R } | { ok: false; value: unknown };\n let resultP: Promise;\n let promiseReferenced = false;\n return function* () {\n if (!result) {\n if (resultP) {\n promiseReferenced = true;\n return yield* waitFor(resultP);\n }\n\n if (!(yield* isAsync())) {\n try {\n result = { ok: true, value: yield* fn() };\n } catch (error) {\n result = { ok: false, value: error };\n }\n } else {\n let resolve: (result: R) => void, reject: (error: unknown) => void;\n resultP = new Promise((res, rej) => {\n resolve = res;\n reject = rej;\n });\n\n try {\n result = { ok: true, value: yield* fn() };\n // Avoid keeping the promise around\n // now that we have the result.\n resultP = null;\n // We only resolve/reject the promise if it has been actually\n // referenced. If there are no listeners we can forget about it.\n // In the reject case, this avoid uncatchable unhandledRejection\n // events.\n if (promiseReferenced) resolve(result.value);\n } catch (error) {\n result = { ok: false, value: error };\n resultP = null;\n if (promiseReferenced) reject(error);\n }\n }\n }\n\n if (result.ok) return result.value;\n else throw result.value;\n };\n}\n","import gensync from \"gensync\";\nimport type { Handler } from \"gensync\";\nimport {\n maybeAsync,\n isAsync,\n onFirstPause,\n waitFor,\n isThenable,\n} from \"../gensync-utils/async.ts\";\nimport { isIterableIterator } from \"./util.ts\";\n\nexport type { CacheConfigurator };\n\nexport type SimpleCacheConfigurator = {\n (forever: boolean): void;\n (handler: () => T): T;\n\n forever: () => void;\n never: () => void;\n using: (handler: () => T) => T;\n invalidate: (handler: () => T) => T;\n};\n\nexport type CacheEntry = Array<{\n value: ResultT;\n valid: (channel: SideChannel) => Handler;\n}>;\n\nconst synchronize = (\n gen: (...args: ArgsT) => Handler,\n): ((...args: ArgsT) => ResultT) => {\n return gensync(gen).sync;\n};\n\n// eslint-disable-next-line require-yield\nfunction* genTrue() {\n return true;\n}\n\nexport function makeWeakCache(\n handler: (\n arg: ArgT,\n cache: CacheConfigurator,\n ) => Handler | ResultT,\n): (arg: ArgT, data: SideChannel) => Handler {\n return makeCachedFunction(WeakMap, handler);\n}\n\nexport function makeWeakCacheSync(\n handler: (arg: ArgT, cache?: CacheConfigurator) => ResultT,\n): (arg: ArgT, data?: SideChannel) => ResultT {\n return synchronize<[ArgT, SideChannel], ResultT>(\n makeWeakCache(handler),\n );\n}\n\nexport function makeStrongCache(\n handler: (\n arg: ArgT,\n cache: CacheConfigurator,\n ) => Handler | ResultT,\n): (arg: ArgT, data: SideChannel) => Handler {\n return makeCachedFunction(Map, handler);\n}\n\nexport function makeStrongCacheSync(\n handler: (arg: ArgT, cache?: CacheConfigurator) => ResultT,\n): (arg: ArgT, data?: SideChannel) => ResultT {\n return synchronize<[ArgT, SideChannel], ResultT>(\n makeStrongCache(handler),\n );\n}\n\n/* NOTE: Part of the logic explained in this comment is explained in the\n * getCachedValueOrWait and setupAsyncLocks functions.\n *\n * > There are only two hard things in Computer Science: cache invalidation and naming things.\n * > -- Phil Karlton\n *\n * I don't know if Phil was also thinking about handling a cache whose invalidation function is\n * defined asynchronously is considered, but it is REALLY hard to do correctly.\n *\n * The implemented logic (only when gensync is run asynchronously) is the following:\n * 1. If there is a valid cache associated to the current \"arg\" parameter,\n * a. RETURN the cached value\n * 3. If there is a FinishLock associated to the current \"arg\" parameter representing a valid cache,\n * a. Wait for that lock to be released\n * b. RETURN the value associated with that lock\n * 5. Start executing the function to be cached\n * a. If it pauses on a promise, then\n * i. Let FinishLock be a new lock\n * ii. Store FinishLock as associated to the current \"arg\" parameter\n * iii. Wait for the function to finish executing\n * iv. Release FinishLock\n * v. Send the function result to anyone waiting on FinishLock\n * 6. Store the result in the cache\n * 7. RETURN the result\n */\nfunction makeCachedFunction(\n CallCache: new () => CacheMap,\n handler: (\n arg: ArgT,\n cache: CacheConfigurator,\n ) => Handler | ResultT,\n): (arg: ArgT, data: SideChannel) => Handler {\n const callCacheSync = new CallCache();\n const callCacheAsync = new CallCache();\n const futureCache = new CallCache>();\n\n return function* cachedFunction(arg: ArgT, data: SideChannel) {\n const asyncContext = yield* isAsync();\n const callCache = asyncContext ? callCacheAsync : callCacheSync;\n\n const cached = yield* getCachedValueOrWait(\n asyncContext,\n callCache,\n futureCache,\n arg,\n data,\n );\n if (cached.valid) return cached.value;\n\n const cache = new CacheConfigurator(data);\n\n const handlerResult: Handler | ResultT = handler(arg, cache);\n\n let finishLock: Lock;\n let value: ResultT;\n\n if (isIterableIterator(handlerResult)) {\n value = yield* onFirstPause(handlerResult, () => {\n finishLock = setupAsyncLocks(cache, futureCache, arg);\n });\n } else {\n value = handlerResult;\n }\n\n updateFunctionCache(callCache, cache, arg, value);\n\n if (finishLock) {\n futureCache.delete(arg);\n finishLock.release(value);\n }\n\n return value;\n };\n}\n\ntype CacheMap =\n | Map>\n // @ts-expect-error todo(flow->ts): add `extends object` constraint to ArgT\n | WeakMap>;\n\nfunction* getCachedValue(\n cache: CacheMap,\n arg: ArgT,\n data: SideChannel,\n): Handler<{ valid: true; value: ResultT } | { valid: false; value: null }> {\n const cachedValue: CacheEntry | void = cache.get(arg);\n\n if (cachedValue) {\n for (const { value, valid } of cachedValue) {\n if (yield* valid(data)) return { valid: true, value };\n }\n }\n\n return { valid: false, value: null };\n}\n\nfunction* getCachedValueOrWait(\n asyncContext: boolean,\n callCache: CacheMap,\n futureCache: CacheMap, SideChannel>,\n arg: ArgT,\n data: SideChannel,\n): Handler<{ valid: true; value: ResultT } | { valid: false; value: null }> {\n const cached = yield* getCachedValue(callCache, arg, data);\n if (cached.valid) {\n return cached;\n }\n\n if (asyncContext) {\n const cached = yield* getCachedValue(futureCache, arg, data);\n if (cached.valid) {\n const value = yield* waitFor(cached.value.promise);\n return { valid: true, value };\n }\n }\n\n return { valid: false, value: null };\n}\n\nfunction setupAsyncLocks(\n config: CacheConfigurator,\n futureCache: CacheMap, SideChannel>,\n arg: ArgT,\n): Lock {\n const finishLock = new Lock();\n\n updateFunctionCache(futureCache, config, arg, finishLock);\n\n return finishLock;\n}\n\nfunction updateFunctionCache<\n ArgT,\n ResultT,\n SideChannel,\n Cache extends CacheMap,\n>(\n cache: Cache,\n config: CacheConfigurator,\n arg: ArgT,\n value: ResultT,\n) {\n if (!config.configured()) config.forever();\n\n let cachedValue: CacheEntry | void = cache.get(arg);\n\n config.deactivate();\n\n switch (config.mode()) {\n case \"forever\":\n cachedValue = [{ value, valid: genTrue }];\n cache.set(arg, cachedValue);\n break;\n case \"invalidate\":\n cachedValue = [{ value, valid: config.validator() }];\n cache.set(arg, cachedValue);\n break;\n case \"valid\":\n if (cachedValue) {\n cachedValue.push({ value, valid: config.validator() });\n } else {\n cachedValue = [{ value, valid: config.validator() }];\n cache.set(arg, cachedValue);\n }\n }\n}\n\nclass CacheConfigurator {\n _active: boolean = true;\n _never: boolean = false;\n _forever: boolean = false;\n _invalidate: boolean = false;\n\n _configured: boolean = false;\n\n _pairs: Array<\n [cachedValue: unknown, handler: (data: SideChannel) => Handler]\n > = [];\n\n _data: SideChannel;\n\n constructor(data: SideChannel) {\n this._data = data;\n }\n\n simple() {\n return makeSimpleConfigurator(this);\n }\n\n mode() {\n if (this._never) return \"never\";\n if (this._forever) return \"forever\";\n if (this._invalidate) return \"invalidate\";\n return \"valid\";\n }\n\n forever() {\n if (!this._active) {\n throw new Error(\"Cannot change caching after evaluation has completed.\");\n }\n if (this._never) {\n throw new Error(\"Caching has already been configured with .never()\");\n }\n this._forever = true;\n this._configured = true;\n }\n\n never() {\n if (!this._active) {\n throw new Error(\"Cannot change caching after evaluation has completed.\");\n }\n if (this._forever) {\n throw new Error(\"Caching has already been configured with .forever()\");\n }\n this._never = true;\n this._configured = true;\n }\n\n using(handler: (data: SideChannel) => T): T {\n if (!this._active) {\n throw new Error(\"Cannot change caching after evaluation has completed.\");\n }\n if (this._never || this._forever) {\n throw new Error(\n \"Caching has already been configured with .never or .forever()\",\n );\n }\n this._configured = true;\n\n const key = handler(this._data);\n\n const fn = maybeAsync(\n handler,\n `You appear to be using an async cache handler, but Babel has been called synchronously`,\n );\n\n if (isThenable(key)) {\n // @ts-expect-error todo(flow->ts): improve function return type annotation\n return key.then((key: unknown) => {\n this._pairs.push([key, fn]);\n return key;\n });\n }\n\n this._pairs.push([key, fn]);\n return key;\n }\n\n invalidate(handler: (data: SideChannel) => T): T {\n this._invalidate = true;\n return this.using(handler);\n }\n\n validator(): (data: SideChannel) => Handler {\n const pairs = this._pairs;\n return function* (data: SideChannel) {\n for (const [key, fn] of pairs) {\n if (key !== (yield* fn(data))) return false;\n }\n return true;\n };\n }\n\n deactivate() {\n this._active = false;\n }\n\n configured() {\n return this._configured;\n }\n}\n\nfunction makeSimpleConfigurator(\n cache: CacheConfigurator,\n): SimpleCacheConfigurator {\n function cacheFn(val: any) {\n if (typeof val === \"boolean\") {\n if (val) cache.forever();\n else cache.never();\n return;\n }\n\n return cache.using(() => assertSimpleType(val()));\n }\n cacheFn.forever = () => cache.forever();\n cacheFn.never = () => cache.never();\n cacheFn.using = (cb: () => SimpleType) =>\n cache.using(() => assertSimpleType(cb()));\n cacheFn.invalidate = (cb: () => SimpleType) =>\n cache.invalidate(() => assertSimpleType(cb()));\n\n return cacheFn as any;\n}\n\n// Types are limited here so that in the future these values can be used\n// as part of Babel's caching logic.\nexport type SimpleType =\n | string\n | boolean\n | number\n | null\n | void\n | Promise;\nexport function assertSimpleType(value: unknown): SimpleType {\n if (isThenable(value)) {\n throw new Error(\n `You appear to be using an async cache handler, ` +\n `which your current version of Babel does not support. ` +\n `We may add support for this in the future, ` +\n `but if you're on the most recent version of @babel/core and still ` +\n `seeing this error, then you'll need to synchronously handle your caching logic.`,\n );\n }\n\n if (\n value != null &&\n typeof value !== \"string\" &&\n typeof value !== \"boolean\" &&\n typeof value !== \"number\"\n ) {\n throw new Error(\n \"Cache keys must be either string, boolean, number, null, or undefined.\",\n );\n }\n // @ts-expect-error Type 'unknown' is not assignable to type 'SimpleType'. This can be removed\n // when strictNullCheck is enabled\n return value;\n}\n\nclass Lock {\n released: boolean = false;\n promise: Promise;\n _resolve: (value: T) => void;\n\n constructor() {\n this.promise = new Promise(resolve => {\n this._resolve = resolve;\n });\n }\n\n release(value: T) {\n this.released = true;\n this._resolve(value);\n }\n}\n","module.exports={A:\"ie\",B:\"edge\",C:\"firefox\",D:\"chrome\",E:\"safari\",F:\"opera\",G:\"ios_saf\",H:\"op_mini\",I:\"android\",J:\"bb\",K:\"op_mob\",L:\"and_chr\",M:\"and_ff\",N:\"ie_mob\",O:\"and_uc\",P:\"samsung\",Q:\"and_qq\",R:\"baidu\",S:\"kaios\"};\n","module.exports.browsers = require('../../data/browsers')\n","module.exports={\"0\":\"25\",\"1\":\"112\",\"2\":\"113\",\"3\":\"114\",\"4\":\"115\",\"5\":\"116\",\"6\":\"117\",\"7\":\"118\",\"8\":\"119\",\"9\":\"120\",A:\"10\",B:\"11\",C:\"12\",D:\"7\",E:\"8\",F:\"9\",G:\"15\",H:\"80\",I:\"126\",J:\"4\",K:\"6\",L:\"13\",M:\"14\",N:\"16\",O:\"17\",P:\"18\",Q:\"79\",R:\"81\",S:\"83\",T:\"84\",U:\"85\",V:\"86\",W:\"87\",X:\"88\",Y:\"89\",Z:\"90\",a:\"91\",b:\"92\",c:\"93\",d:\"94\",e:\"95\",f:\"96\",g:\"97\",h:\"98\",i:\"99\",j:\"100\",k:\"101\",l:\"102\",m:\"103\",n:\"104\",o:\"105\",p:\"106\",q:\"107\",r:\"108\",s:\"109\",t:\"110\",u:\"111\",v:\"20\",w:\"21\",x:\"22\",y:\"23\",z:\"24\",AB:\"121\",BB:\"122\",CB:\"123\",DB:\"124\",EB:\"125\",FB:\"5\",GB:\"19\",HB:\"26\",IB:\"27\",JB:\"28\",KB:\"29\",LB:\"30\",MB:\"31\",NB:\"32\",OB:\"33\",PB:\"34\",QB:\"35\",RB:\"36\",SB:\"37\",TB:\"38\",UB:\"39\",VB:\"40\",WB:\"41\",XB:\"42\",YB:\"43\",ZB:\"44\",aB:\"45\",bB:\"46\",cB:\"47\",dB:\"48\",eB:\"49\",fB:\"50\",gB:\"51\",hB:\"52\",iB:\"53\",jB:\"54\",kB:\"55\",lB:\"56\",mB:\"57\",nB:\"58\",oB:\"60\",pB:\"62\",qB:\"63\",rB:\"64\",sB:\"65\",tB:\"66\",uB:\"67\",vB:\"68\",wB:\"69\",xB:\"70\",yB:\"71\",zB:\"72\",\"0B\":\"73\",\"1B\":\"74\",\"2B\":\"75\",\"3B\":\"76\",\"4B\":\"77\",\"5B\":\"78\",\"6B\":\"127\",\"7B\":\"11.1\",\"8B\":\"12.1\",\"9B\":\"15.5\",AC:\"16.0\",BC:\"17.0\",CC:\"18.0\",DC:\"3\",EC:\"59\",FC:\"61\",GC:\"82\",HC:\"128\",IC:\"129\",JC:\"3.2\",KC:\"10.1\",LC:\"15.2-15.3\",MC:\"15.4\",NC:\"16.1\",OC:\"16.2\",PC:\"16.3\",QC:\"16.4\",RC:\"16.5\",SC:\"17.1\",TC:\"17.2\",UC:\"17.3\",VC:\"17.4\",WC:\"17.5\",XC:\"17.6\",YC:\"11.5\",ZC:\"4.2-4.3\",aC:\"5.5\",bC:\"2\",cC:\"130\",dC:\"3.5\",eC:\"3.6\",fC:\"3.1\",gC:\"5.1\",hC:\"6.1\",iC:\"7.1\",jC:\"9.1\",kC:\"13.1\",lC:\"14.1\",mC:\"15.1\",nC:\"15.6\",oC:\"16.6\",pC:\"TP\",qC:\"9.5-9.6\",rC:\"10.0-10.1\",sC:\"10.5\",tC:\"10.6\",uC:\"11.6\",vC:\"4.0-4.1\",wC:\"5.0-5.1\",xC:\"6.0-6.1\",yC:\"7.0-7.1\",zC:\"8.1-8.4\",\"0C\":\"9.0-9.2\",\"1C\":\"9.3\",\"2C\":\"10.0-10.2\",\"3C\":\"10.3\",\"4C\":\"11.0-11.2\",\"5C\":\"11.3-11.4\",\"6C\":\"12.0-12.1\",\"7C\":\"12.2-12.5\",\"8C\":\"13.0-13.1\",\"9C\":\"13.2\",AD:\"13.3\",BD:\"13.4-13.7\",CD:\"14.0-14.4\",DD:\"14.5-14.8\",ED:\"15.0-15.1\",FD:\"15.6-15.8\",GD:\"16.6-16.7\",HD:\"all\",ID:\"2.1\",JD:\"2.2\",KD:\"2.3\",LD:\"4.1\",MD:\"4.4\",ND:\"4.4.3-4.4.4\",OD:\"5.0-5.4\",PD:\"6.2-6.4\",QD:\"7.2-7.4\",RD:\"8.2\",SD:\"9.2\",TD:\"11.1-11.2\",UD:\"12.0\",VD:\"13.0\",WD:\"14.0\",XD:\"15.0\",YD:\"19.0\",ZD:\"14.9\",aD:\"13.52\",bD:\"2.5\",cD:\"3.0-3.1\"};\n","module.exports.browserVersions = require('../../data/browserVersions')\n","module.exports={A:{A:{K:0,D:0,E:0.0271533,F:0.0678831,A:0,B:0.529489,aC:0},B:\"ms\",C:[\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"aC\",\"K\",\"D\",\"E\",\"F\",\"A\",\"B\",\"\",\"\",\"\"],E:\"IE\",F:{aC:962323200,K:998870400,D:1161129600,E:1237420800,F:1300060800,A:1346716800,B:1381968000}},B:{A:{\"1\":0.00757,\"2\":0.011355,\"3\":0.01514,\"4\":0.00757,\"5\":0.00757,\"6\":0.011355,\"7\":0.00757,\"8\":0.01514,\"9\":0.034065,C:0,L:0,M:0,G:0,N:0,O:0.003785,P:0.041635,Q:0,H:0,R:0,S:0,T:0,U:0,V:0,W:0,X:0,Y:0,Z:0,a:0,b:0.011355,c:0,d:0,e:0,f:0,g:0,h:0,i:0,j:0,k:0,l:0,m:0,n:0,o:0,p:0,q:0.003785,r:0.00757,s:0.064345,t:0.003785,u:0.00757,AB:0.026495,BB:0.064345,CB:0.16654,DB:2.88417,EB:1.57834,I:0.00757},B:\"webkit\",C:[\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"C\",\"L\",\"M\",\"G\",\"N\",\"O\",\"P\",\"Q\",\"H\",\"R\",\"S\",\"T\",\"U\",\"V\",\"W\",\"X\",\"Y\",\"Z\",\"a\",\"b\",\"c\",\"d\",\"e\",\"f\",\"g\",\"h\",\"i\",\"j\",\"k\",\"l\",\"m\",\"n\",\"o\",\"p\",\"q\",\"r\",\"s\",\"t\",\"u\",\"1\",\"2\",\"3\",\"4\",\"5\",\"6\",\"7\",\"8\",\"9\",\"AB\",\"BB\",\"CB\",\"DB\",\"EB\",\"I\",\"\",\"\",\"\"],E:\"Edge\",F:{\"1\":1680825600,\"2\":1683158400,\"3\":1685664000,\"4\":1689897600,\"5\":1692576000,\"6\":1694649600,\"7\":1697155200,\"8\":1698969600,\"9\":1701993600,C:1438128000,L:1447286400,M:1470096000,G:1491868800,N:1508198400,O:1525046400,P:1542067200,Q:1579046400,H:1581033600,R:1586736000,S:1590019200,T:1594857600,U:1598486400,V:1602201600,W:1605830400,X:1611360000,Y:1614816000,Z:1618358400,a:1622073600,b:1626912000,c:1630627200,d:1632441600,e:1634774400,f:1637539200,g:1641427200,h:1643932800,i:1646265600,j:1649635200,k:1651190400,l:1653955200,m:1655942400,n:1659657600,o:1661990400,p:1664755200,q:1666915200,r:1670198400,s:1673481600,t:1675900800,u:1678665600,AB:1706227200,BB:1708732800,CB:1711152000,DB:1713398400,EB:1715990400,I:1718841600},D:{C:\"ms\",L:\"ms\",M:\"ms\",G:\"ms\",N:\"ms\",O:\"ms\",P:\"ms\"}},C:{A:{\"0\":0,\"1\":0,\"2\":0.011355,\"3\":0,\"4\":0.397425,\"5\":0,\"6\":0.00757,\"7\":0.079485,\"8\":0,\"9\":0.00757,bC:0,DC:0,J:0.003785,FB:0,K:0,D:0,E:0,F:0,A:0,B:0.018925,C:0,L:0,M:0,G:0,N:0,O:0,P:0,GB:0,v:0,w:0,x:0,y:0,z:0,HB:0,IB:0,JB:0,KB:0,LB:0,MB:0,NB:0,OB:0,PB:0,QB:0,RB:0,SB:0,TB:0,UB:0,VB:0,WB:0,XB:0,YB:0.00757,ZB:0.00757,aB:0.00757,bB:0,cB:0,dB:0,eB:0,fB:0.00757,gB:0,hB:0.05299,iB:0.003785,jB:0.003785,kB:0,lB:0.02271,mB:0,nB:0,EC:0.003785,oB:0,FC:0,pB:0,qB:0,rB:0,sB:0,tB:0,uB:0,vB:0,wB:0,xB:0,yB:0,zB:0,\"0B\":0,\"1B\":0,\"2B\":0,\"3B\":0,\"4B\":0,\"5B\":0.01514,Q:0,H:0,R:0,GC:0,S:0,T:0,U:0,V:0,W:0,X:0.011355,Y:0,Z:0,a:0,b:0,c:0,d:0.003785,e:0,f:0,g:0,h:0,i:0,j:0,k:0,l:0.011355,m:0.011355,n:0,o:0,p:0,q:0,r:0.003785,s:0.00757,t:0,u:0,AB:0.00757,BB:0.011355,CB:0.01514,DB:0.06813,EB:0.844055,I:0.738075,\"6B\":0.003785,HC:0,IC:0,cC:0,dC:0,eC:0},B:\"moz\",C:[\"bC\",\"DC\",\"dC\",\"eC\",\"J\",\"FB\",\"K\",\"D\",\"E\",\"F\",\"A\",\"B\",\"C\",\"L\",\"M\",\"G\",\"N\",\"O\",\"P\",\"GB\",\"v\",\"w\",\"x\",\"y\",\"z\",\"0\",\"HB\",\"IB\",\"JB\",\"KB\",\"LB\",\"MB\",\"NB\",\"OB\",\"PB\",\"QB\",\"RB\",\"SB\",\"TB\",\"UB\",\"VB\",\"WB\",\"XB\",\"YB\",\"ZB\",\"aB\",\"bB\",\"cB\",\"dB\",\"eB\",\"fB\",\"gB\",\"hB\",\"iB\",\"jB\",\"kB\",\"lB\",\"mB\",\"nB\",\"EC\",\"oB\",\"FC\",\"pB\",\"qB\",\"rB\",\"sB\",\"tB\",\"uB\",\"vB\",\"wB\",\"xB\",\"yB\",\"zB\",\"0B\",\"1B\",\"2B\",\"3B\",\"4B\",\"5B\",\"Q\",\"H\",\"R\",\"GC\",\"S\",\"T\",\"U\",\"V\",\"W\",\"X\",\"Y\",\"Z\",\"a\",\"b\",\"c\",\"d\",\"e\",\"f\",\"g\",\"h\",\"i\",\"j\",\"k\",\"l\",\"m\",\"n\",\"o\",\"p\",\"q\",\"r\",\"s\",\"t\",\"u\",\"1\",\"2\",\"3\",\"4\",\"5\",\"6\",\"7\",\"8\",\"9\",\"AB\",\"BB\",\"CB\",\"DB\",\"EB\",\"I\",\"6B\",\"HC\",\"IC\",\"cC\"],E:\"Firefox\",F:{\"0\":1379376000,\"1\":1681171200,\"2\":1683590400,\"3\":1686009600,\"4\":1688428800,\"5\":1690848000,\"6\":1693267200,\"7\":1695686400,\"8\":1698105600,\"9\":1700524800,bC:1161648000,DC:1213660800,dC:1246320000,eC:1264032000,J:1300752000,FB:1308614400,K:1313452800,D:1317081600,E:1317081600,F:1320710400,A:1324339200,B:1327968000,C:1331596800,L:1335225600,M:1338854400,G:1342483200,N:1346112000,O:1349740800,P:1353628800,GB:1357603200,v:1361232000,w:1364860800,x:1368489600,y:1372118400,z:1375747200,HB:1386633600,IB:1391472000,JB:1395100800,KB:1398729600,LB:1402358400,MB:1405987200,NB:1409616000,OB:1413244800,PB:1417392000,QB:1421107200,RB:1424736000,SB:1428278400,TB:1431475200,UB:1435881600,VB:1439251200,WB:1442880000,XB:1446508800,YB:1450137600,ZB:1453852800,aB:1457395200,bB:1461628800,cB:1465257600,dB:1470096000,eB:1474329600,fB:1479168000,gB:1485216000,hB:1488844800,iB:1492560000,jB:1497312000,kB:1502150400,lB:1506556800,mB:1510617600,nB:1516665600,EC:1520985600,oB:1525824000,FC:1529971200,pB:1536105600,qB:1540252800,rB:1544486400,sB:1548720000,tB:1552953600,uB:1558396800,vB:1562630400,wB:1567468800,xB:1571788800,yB:1575331200,zB:1578355200,\"0B\":1581379200,\"1B\":1583798400,\"2B\":1586304000,\"3B\":1588636800,\"4B\":1591056000,\"5B\":1593475200,Q:1595894400,H:1598313600,R:1600732800,GC:1603152000,S:1605571200,T:1607990400,U:1611619200,V:1614038400,W:1616457600,X:1618790400,Y:1622505600,Z:1626134400,a:1628553600,b:1630972800,c:1633392000,d:1635811200,e:1638835200,f:1641859200,g:1644364800,h:1646697600,i:1649116800,j:1651536000,k:1653955200,l:1656374400,m:1658793600,n:1661212800,o:1663632000,p:1666051200,q:1668470400,r:1670889600,s:1673913600,t:1676332800,u:1678752000,AB:1702944000,BB:1705968000,CB:1708387200,DB:1710806400,EB:1713225600,I:1715644800,\"6B\":1718064000,HC:null,IC:null,cC:null}},D:{A:{\"0\":0,\"1\":0.041635,\"2\":0.09841,\"3\":0.109765,\"4\":0.04542,\"5\":0.230885,\"6\":0.102195,\"7\":0.08327,\"8\":0.09084,\"9\":0.185465,J:0,FB:0,K:0,D:0,E:0,F:0,A:0,B:0,C:0,L:0,M:0,G:0,N:0,O:0,P:0,GB:0,v:0,w:0,x:0,y:0,z:0,HB:0,IB:0,JB:0,KB:0,LB:0,MB:0,NB:0,OB:0,PB:0.00757,QB:0,RB:0,SB:0,TB:0.01514,UB:0,VB:0,WB:0,XB:0,YB:0,ZB:0,aB:0.003785,bB:0,cB:0.003785,dB:0.02271,eB:0.026495,fB:0.011355,gB:0,hB:0.003785,iB:0.003785,jB:0,kB:0,lB:0.011355,mB:0,nB:0.003785,EC:0,oB:0,FC:0.003785,pB:0,qB:0.003785,rB:0,sB:0,tB:0.02271,uB:0.00757,vB:0,wB:0.03028,xB:0.064345,yB:0.003785,zB:0.003785,\"0B\":0.011355,\"1B\":0.00757,\"2B\":0.00757,\"3B\":0.00757,\"4B\":0.00757,\"5B\":0.01514,Q:0.12112,H:0.011355,R:0.02271,S:0.041635,T:0.00757,U:0.011355,V:0.049205,W:0.06813,X:0.01514,Y:0.011355,Z:0.011355,a:0.03785,b:0.018925,c:0.03028,d:0.041635,e:0.011355,f:0.011355,g:0.01514,h:0.071915,i:0.034065,j:0.04542,k:0.06813,l:0.049205,m:0.170325,n:0.094625,o:0.03028,p:0.03785,q:0.03028,r:0.04542,s:1.49507,t:0.026495,u:0.03785,AB:0.389855,BB:0.29523,CB:1.11279,DB:12.6116,EB:4.62527,I:0.018925,\"6B\":0.00757,HC:0,IC:0},B:\"webkit\",C:[\"\",\"\",\"\",\"\",\"\",\"\",\"J\",\"FB\",\"K\",\"D\",\"E\",\"F\",\"A\",\"B\",\"C\",\"L\",\"M\",\"G\",\"N\",\"O\",\"P\",\"GB\",\"v\",\"w\",\"x\",\"y\",\"z\",\"0\",\"HB\",\"IB\",\"JB\",\"KB\",\"LB\",\"MB\",\"NB\",\"OB\",\"PB\",\"QB\",\"RB\",\"SB\",\"TB\",\"UB\",\"VB\",\"WB\",\"XB\",\"YB\",\"ZB\",\"aB\",\"bB\",\"cB\",\"dB\",\"eB\",\"fB\",\"gB\",\"hB\",\"iB\",\"jB\",\"kB\",\"lB\",\"mB\",\"nB\",\"EC\",\"oB\",\"FC\",\"pB\",\"qB\",\"rB\",\"sB\",\"tB\",\"uB\",\"vB\",\"wB\",\"xB\",\"yB\",\"zB\",\"0B\",\"1B\",\"2B\",\"3B\",\"4B\",\"5B\",\"Q\",\"H\",\"R\",\"S\",\"T\",\"U\",\"V\",\"W\",\"X\",\"Y\",\"Z\",\"a\",\"b\",\"c\",\"d\",\"e\",\"f\",\"g\",\"h\",\"i\",\"j\",\"k\",\"l\",\"m\",\"n\",\"o\",\"p\",\"q\",\"r\",\"s\",\"t\",\"u\",\"1\",\"2\",\"3\",\"4\",\"5\",\"6\",\"7\",\"8\",\"9\",\"AB\",\"BB\",\"CB\",\"DB\",\"EB\",\"I\",\"6B\",\"HC\",\"IC\"],E:\"Chrome\",F:{\"0\":1357862400,\"1\":1680566400,\"2\":1682985600,\"3\":1685404800,\"4\":1689724800,\"5\":1692057600,\"6\":1694476800,\"7\":1696896000,\"8\":1698710400,\"9\":1701993600,J:1264377600,FB:1274745600,K:1283385600,D:1287619200,E:1291248000,F:1296777600,A:1299542400,B:1303862400,C:1307404800,L:1312243200,M:1316131200,G:1316131200,N:1319500800,O:1323734400,P:1328659200,GB:1332892800,v:1337040000,w:1340668800,x:1343692800,y:1348531200,z:1352246400,HB:1361404800,IB:1364428800,JB:1369094400,KB:1374105600,LB:1376956800,MB:1384214400,NB:1389657600,OB:1392940800,PB:1397001600,QB:1400544000,RB:1405468800,SB:1409011200,TB:1412640000,UB:1416268800,VB:1421798400,WB:1425513600,XB:1429401600,YB:1432080000,ZB:1437523200,aB:1441152000,bB:1444780800,cB:1449014400,dB:1453248000,eB:1456963200,fB:1460592000,gB:1464134400,hB:1469059200,iB:1472601600,jB:1476230400,kB:1480550400,lB:1485302400,mB:1489017600,nB:1492560000,EC:1496707200,oB:1500940800,FC:1504569600,pB:1508198400,qB:1512518400,rB:1516752000,sB:1520294400,tB:1523923200,uB:1527552000,vB:1532390400,wB:1536019200,xB:1539648000,yB:1543968000,zB:1548720000,\"0B\":1552348800,\"1B\":1555977600,\"2B\":1559606400,\"3B\":1564444800,\"4B\":1568073600,\"5B\":1571702400,Q:1575936000,H:1580860800,R:1586304000,S:1589846400,T:1594684800,U:1598313600,V:1601942400,W:1605571200,X:1611014400,Y:1614556800,Z:1618272000,a:1621987200,b:1626739200,c:1630368000,d:1632268800,e:1634601600,f:1637020800,g:1641340800,h:1643673600,i:1646092800,j:1648512000,k:1650931200,l:1653350400,m:1655769600,n:1659398400,o:1661817600,p:1664236800,q:1666656000,r:1669680000,s:1673308800,t:1675728000,u:1678147200,AB:1705968000,BB:1708387200,CB:1710806400,DB:1713225600,EB:1715644800,I:1718064000,\"6B\":null,HC:null,IC:null}},E:{A:{J:0,FB:0,K:0,D:0,E:0.01514,F:0.003785,A:0,B:0,C:0,L:0.00757,M:0.034065,G:0.00757,fC:0,JC:0,gC:0,hC:0,iC:0,jC:0,KC:0,\"7B\":0.00757,\"8B\":0.01514,kC:0.064345,lC:0.09084,mC:0.034065,LC:0.011355,MC:0.026495,\"9B\":0.034065,nC:0.246025,AC:0.03028,NC:0.049205,OC:0.03785,PC:0.09841,QC:0.03028,RC:0.06056,oC:0.34065,BC:0.03785,SC:0.06813,TC:0.08327,UC:0.09841,VC:1.5405,WC:0.185465,XC:0,CC:0,pC:0},B:\"webkit\",C:[\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"fC\",\"JC\",\"J\",\"FB\",\"gC\",\"K\",\"hC\",\"D\",\"iC\",\"E\",\"F\",\"jC\",\"A\",\"KC\",\"B\",\"7B\",\"C\",\"8B\",\"L\",\"kC\",\"M\",\"lC\",\"G\",\"mC\",\"LC\",\"MC\",\"9B\",\"nC\",\"AC\",\"NC\",\"OC\",\"PC\",\"QC\",\"RC\",\"oC\",\"BC\",\"SC\",\"TC\",\"UC\",\"VC\",\"WC\",\"XC\",\"CC\",\"pC\"],E:\"Safari\",F:{fC:1205798400,JC:1226534400,J:1244419200,FB:1275868800,gC:1311120000,K:1343174400,hC:1382400000,D:1382400000,iC:1410998400,E:1413417600,F:1443657600,jC:1458518400,A:1474329600,KC:1490572800,B:1505779200,\"7B\":1522281600,C:1537142400,\"8B\":1553472000,L:1568851200,kC:1585008000,M:1600214400,lC:1619395200,G:1632096000,mC:1635292800,LC:1639353600,MC:1647216000,\"9B\":1652745600,nC:1658275200,AC:1662940800,NC:1666569600,OC:1670889600,PC:1674432000,QC:1679875200,RC:1684368000,oC:1690156800,BC:1695686400,SC:1698192000,TC:1702252800,UC:1705881600,VC:1709596800,WC:1715558400,XC:null,CC:null,pC:null}},F:{A:{\"0\":0,F:0,B:0,C:0,G:0,N:0,O:0,P:0,GB:0,v:0,w:0,x:0,y:0,z:0,HB:0,IB:0,JB:0,KB:0,LB:0,MB:0,NB:0,OB:0,PB:0,QB:0,RB:0,SB:0,TB:0,UB:0,VB:0,WB:0,XB:0,YB:0,ZB:0,aB:0,bB:0.01514,cB:0,dB:0,eB:0,fB:0,gB:0,hB:0,iB:0,jB:0,kB:0,lB:0,mB:0,nB:0,oB:0,pB:0,qB:0,rB:0,sB:0,tB:0,uB:0,vB:0,wB:0,xB:0,yB:0,zB:0,\"0B\":0,\"1B\":0,\"2B\":0,\"3B\":0,\"4B\":0,\"5B\":0,Q:0,H:0,R:0,GC:0,S:0,T:0,U:0,V:0,W:0,X:0,Y:0,Z:0,a:0,b:0,c:0,d:0,e:0.041635,f:0,g:0,h:0,i:0,j:0,k:0,l:0.071915,m:0,n:0,o:0,p:0.00757,q:0.185465,r:0.01514,s:0.738075,t:0.04542,u:0,qC:0,rC:0,sC:0,tC:0,\"7B\":0,YC:0,uC:0,\"8B\":0},B:\"webkit\",C:[\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"F\",\"qC\",\"rC\",\"sC\",\"tC\",\"B\",\"7B\",\"YC\",\"uC\",\"C\",\"8B\",\"G\",\"N\",\"O\",\"P\",\"GB\",\"v\",\"w\",\"x\",\"y\",\"z\",\"0\",\"HB\",\"IB\",\"JB\",\"KB\",\"LB\",\"MB\",\"NB\",\"OB\",\"PB\",\"QB\",\"RB\",\"SB\",\"TB\",\"UB\",\"VB\",\"WB\",\"XB\",\"YB\",\"ZB\",\"aB\",\"bB\",\"cB\",\"dB\",\"eB\",\"fB\",\"gB\",\"hB\",\"iB\",\"jB\",\"kB\",\"lB\",\"mB\",\"nB\",\"oB\",\"pB\",\"qB\",\"rB\",\"sB\",\"tB\",\"uB\",\"vB\",\"wB\",\"xB\",\"yB\",\"zB\",\"0B\",\"1B\",\"2B\",\"3B\",\"4B\",\"5B\",\"Q\",\"H\",\"R\",\"GC\",\"S\",\"T\",\"U\",\"V\",\"W\",\"X\",\"Y\",\"Z\",\"a\",\"b\",\"c\",\"d\",\"e\",\"f\",\"g\",\"h\",\"i\",\"j\",\"k\",\"l\",\"m\",\"n\",\"o\",\"p\",\"q\",\"r\",\"s\",\"t\",\"u\",\"\",\"\",\"\"],E:\"Opera\",F:{\"0\":1413331200,F:1150761600,qC:1223424000,rC:1251763200,sC:1267488000,tC:1277942400,B:1292457600,\"7B\":1302566400,YC:1309219200,uC:1323129600,C:1323129600,\"8B\":1352073600,G:1372723200,N:1377561600,O:1381104000,P:1386288000,GB:1390867200,v:1393891200,w:1399334400,x:1401753600,y:1405987200,z:1409616000,HB:1417132800,IB:1422316800,JB:1425945600,KB:1430179200,LB:1433808000,MB:1438646400,NB:1442448000,OB:1445904000,PB:1449100800,QB:1454371200,RB:1457308800,SB:1462320000,TB:1465344000,UB:1470096000,VB:1474329600,WB:1477267200,XB:1481587200,YB:1486425600,ZB:1490054400,aB:1494374400,bB:1498003200,cB:1502236800,dB:1506470400,eB:1510099200,fB:1515024000,gB:1517961600,hB:1521676800,iB:1525910400,jB:1530144000,kB:1534982400,lB:1537833600,mB:1543363200,nB:1548201600,oB:1554768000,pB:1561593600,qB:1566259200,rB:1570406400,sB:1573689600,tB:1578441600,uB:1583971200,vB:1587513600,wB:1592956800,xB:1595894400,yB:1600128000,zB:1603238400,\"0B\":1613520000,\"1B\":1612224000,\"2B\":1616544000,\"3B\":1619568000,\"4B\":1623715200,\"5B\":1627948800,Q:1631577600,H:1633392000,R:1635984000,GC:1638403200,S:1642550400,T:1644969600,U:1647993600,V:1650412800,W:1652745600,X:1654646400,Y:1657152000,Z:1660780800,a:1663113600,b:1668816000,c:1668643200,d:1671062400,e:1675209600,f:1677024000,g:1679529600,h:1681948800,i:1684195200,j:1687219200,k:1690329600,l:1692748800,m:1696204800,n:1699920000,o:1699920000,p:1702944000,q:1707264000,r:1710115200,s:1711497600,t:1716336000,u:1719273600},D:{F:\"o\",B:\"o\",C:\"o\",qC:\"o\",rC:\"o\",sC:\"o\",tC:\"o\",\"7B\":\"o\",YC:\"o\",uC:\"o\",\"8B\":\"o\"}},G:{A:{E:0,JC:0,vC:0,ZC:0.00289868,wC:0.00289868,xC:0.00724669,yC:0.0115947,zC:0.00289868,\"0C\":0.00724669,\"1C\":0.0333348,\"2C\":0.00579735,\"3C\":0.0521762,\"4C\":0.0768149,\"5C\":0.0144934,\"6C\":0.00869603,\"7C\":0.210154,\"8C\":0.00434801,\"9C\":0.0217401,AD:0.0101454,BD:0.0463788,CD:0.100004,DD:0.123194,ED:0.0594229,LC:0.0652202,MC:0.0739162,\"9B\":0.0927576,FD:0.83192,AC:0.189863,NC:0.389872,OC:0.189863,PC:0.329,QC:0.0695682,RC:0.140586,GD:1.11744,BC:0.121744,SC:0.198559,TC:0.207255,UC:0.382625,VC:8.67429,WC:0.61307,XC:0,CC:0},B:\"webkit\",C:[\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"JC\",\"vC\",\"ZC\",\"wC\",\"xC\",\"yC\",\"E\",\"zC\",\"0C\",\"1C\",\"2C\",\"3C\",\"4C\",\"5C\",\"6C\",\"7C\",\"8C\",\"9C\",\"AD\",\"BD\",\"CD\",\"DD\",\"ED\",\"LC\",\"MC\",\"9B\",\"FD\",\"AC\",\"NC\",\"OC\",\"PC\",\"QC\",\"RC\",\"GD\",\"BC\",\"SC\",\"TC\",\"UC\",\"VC\",\"WC\",\"XC\",\"CC\",\"\"],E:\"Safari on iOS\",F:{JC:1270252800,vC:1283904000,ZC:1299628800,wC:1331078400,xC:1359331200,yC:1394409600,E:1410912000,zC:1413763200,\"0C\":1442361600,\"1C\":1458518400,\"2C\":1473724800,\"3C\":1490572800,\"4C\":1505779200,\"5C\":1522281600,\"6C\":1537142400,\"7C\":1553472000,\"8C\":1568851200,\"9C\":1572220800,AD:1580169600,BD:1585008000,CD:1600214400,DD:1619395200,ED:1632096000,LC:1639353600,MC:1647216000,\"9B\":1652659200,FD:1658275200,AC:1662940800,NC:1666569600,OC:1670889600,PC:1674432000,QC:1679875200,RC:1684368000,GD:1690156800,BC:1694995200,SC:1698192000,TC:1702252800,UC:1705881600,VC:1709596800,WC:1715558400,XC:null,CC:null}},H:{A:{HD:0.1},B:\"o\",C:[\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"HD\",\"\",\"\",\"\"],E:\"Opera Mini\",F:{HD:1426464000}},I:{A:{DC:0,J:0.000065879,I:0.656352,ID:0,JD:0,KD:0,LD:0.000131758,ZC:0.000395274,MD:0,ND:0.00144934},B:\"webkit\",C:[\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"ID\",\"JD\",\"KD\",\"DC\",\"J\",\"LD\",\"ZC\",\"MD\",\"ND\",\"I\",\"\",\"\",\"\"],E:\"Android Browser\",F:{ID:1256515200,JD:1274313600,KD:1291593600,DC:1298332800,J:1318896000,LD:1341792000,ZC:1374624000,MD:1386547200,ND:1401667200,I:1718064000}},J:{A:{D:0,A:0},B:\"webkit\",C:[\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"D\",\"A\",\"\",\"\",\"\"],E:\"Blackberry Browser\",F:{D:1325376000,A:1359504000}},K:{A:{A:0,B:0,C:0,H:1.2238,\"7B\":0,YC:0,\"8B\":0},B:\"o\",C:[\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"A\",\"B\",\"7B\",\"YC\",\"C\",\"8B\",\"H\",\"\",\"\",\"\"],E:\"Opera Mobile\",F:{A:1287100800,B:1300752000,\"7B\":1314835200,YC:1318291200,C:1330300800,\"8B\":1349740800,H:1709769600},D:{H:\"webkit\"}},L:{A:{I:42.0636},B:\"webkit\",C:[\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"I\",\"\",\"\",\"\"],E:\"Chrome for Android\",F:{I:1718064000}},M:{A:{\"6B\":0.31075},B:\"moz\",C:[\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"6B\",\"\",\"\",\"\"],E:\"Firefox for Android\",F:{\"6B\":1718064000}},N:{A:{A:0,B:0},B:\"ms\",C:[\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"A\",\"B\",\"\",\"\",\"\"],E:\"IE Mobile\",F:{A:1340150400,B:1353456000}},O:{A:{\"9B\":0.913605},B:\"webkit\",C:[\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"9B\",\"\",\"\",\"\"],E:\"UC Browser for Android\",F:{\"9B\":1710115200},D:{\"9B\":\"webkit\"}},P:{A:{\"0\":1.98584,J:0.141071,v:0.0217032,w:0.0542579,x:0.0651095,y:0.119367,z:0.227883,OD:0.0108516,PD:0,QD:0.0325548,RD:0,SD:0,KC:0,TD:0.0108516,UD:0,VD:0.0108516,WD:0,XD:0,AC:0,BC:0.0217032,CC:0.0108516,YD:0.0217032},B:\"webkit\",C:[\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"J\",\"OD\",\"PD\",\"QD\",\"RD\",\"SD\",\"KC\",\"TD\",\"UD\",\"VD\",\"WD\",\"XD\",\"AC\",\"BC\",\"CC\",\"YD\",\"v\",\"w\",\"x\",\"y\",\"z\",\"0\",\"\",\"\",\"\"],E:\"Samsung Internet\",F:{\"0\":1715126400,J:1461024000,OD:1481846400,PD:1509408000,QD:1528329600,RD:1546128000,SD:1554163200,KC:1567900800,TD:1582588800,UD:1593475200,VD:1605657600,WD:1618531200,XD:1629072000,AC:1640736000,BC:1651708800,CC:1659657600,YD:1667260800,v:1677369600,w:1684454400,x:1689292800,y:1697587200,z:1711497600}},Q:{A:{ZD:0.292105},B:\"webkit\",C:[\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"ZD\",\"\",\"\",\"\"],E:\"QQ Browser\",F:{ZD:1710288000}},R:{A:{aD:0},B:\"webkit\",C:[\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"aD\",\"\",\"\",\"\"],E:\"Baidu Browser\",F:{aD:1710201600}},S:{A:{bD:0.08701,cD:0},B:\"moz\",C:[\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"bD\",\"cD\",\"\",\"\",\"\"],E:\"KaiOS Browser\",F:{bD:1527811200,cD:1631664000}}};\n","'use strict'\n\nconst browsers = require('./browsers').browsers\nconst versions = require('./browserVersions').browserVersions\nconst agentsData = require('../../data/agents')\n\nfunction unpackBrowserVersions(versionsData) {\n return Object.keys(versionsData).reduce((usage, version) => {\n usage[versions[version]] = versionsData[version]\n return usage\n }, {})\n}\n\nmodule.exports.agents = Object.keys(agentsData).reduce((map, key) => {\n let versionsData = agentsData[key]\n map[browsers[key]] = Object.keys(versionsData).reduce((data, entry) => {\n if (entry === 'A') {\n data.usage_global = unpackBrowserVersions(versionsData[entry])\n } else if (entry === 'C') {\n data.versions = versionsData[entry].reduce((list, version) => {\n if (version === '') {\n list.push(null)\n } else {\n list.push(versions[version])\n }\n return list\n }, [])\n } else if (entry === 'D') {\n data.prefix_exceptions = unpackBrowserVersions(versionsData[entry])\n } else if (entry === 'E') {\n data.browser = versionsData[entry]\n } else if (entry === 'F') {\n data.release_date = Object.keys(versionsData[entry]).reduce(\n (map2, key2) => {\n map2[versions[key2]] = versionsData[entry][key2]\n return map2\n },\n {}\n )\n } else {\n // entry is B\n data.prefix = versionsData[entry]\n }\n return data\n }, {})\n return map\n}, {})\n","module.exports = {\n\t\"0.20\": \"39\",\n\t\"0.21\": \"41\",\n\t\"0.22\": \"41\",\n\t\"0.23\": \"41\",\n\t\"0.24\": \"41\",\n\t\"0.25\": \"42\",\n\t\"0.26\": \"42\",\n\t\"0.27\": \"43\",\n\t\"0.28\": \"43\",\n\t\"0.29\": \"43\",\n\t\"0.30\": \"44\",\n\t\"0.31\": \"45\",\n\t\"0.32\": \"45\",\n\t\"0.33\": \"45\",\n\t\"0.34\": \"45\",\n\t\"0.35\": \"45\",\n\t\"0.36\": \"47\",\n\t\"0.37\": \"49\",\n\t\"1.0\": \"49\",\n\t\"1.1\": \"50\",\n\t\"1.2\": \"51\",\n\t\"1.3\": \"52\",\n\t\"1.4\": \"53\",\n\t\"1.5\": \"54\",\n\t\"1.6\": \"56\",\n\t\"1.7\": \"58\",\n\t\"1.8\": \"59\",\n\t\"2.0\": \"61\",\n\t\"2.1\": \"61\",\n\t\"3.0\": \"66\",\n\t\"3.1\": \"66\",\n\t\"4.0\": \"69\",\n\t\"4.1\": \"69\",\n\t\"4.2\": \"69\",\n\t\"5.0\": \"73\",\n\t\"6.0\": \"76\",\n\t\"6.1\": \"76\",\n\t\"7.0\": \"78\",\n\t\"7.1\": \"78\",\n\t\"7.2\": \"78\",\n\t\"7.3\": \"78\",\n\t\"8.0\": \"80\",\n\t\"8.1\": \"80\",\n\t\"8.2\": \"80\",\n\t\"8.3\": \"80\",\n\t\"8.4\": \"80\",\n\t\"8.5\": \"80\",\n\t\"9.0\": \"83\",\n\t\"9.1\": \"83\",\n\t\"9.2\": \"83\",\n\t\"9.3\": \"83\",\n\t\"9.4\": \"83\",\n\t\"10.0\": \"85\",\n\t\"10.1\": \"85\",\n\t\"10.2\": \"85\",\n\t\"10.3\": \"85\",\n\t\"10.4\": \"85\",\n\t\"11.0\": \"87\",\n\t\"11.1\": \"87\",\n\t\"11.2\": \"87\",\n\t\"11.3\": \"87\",\n\t\"11.4\": \"87\",\n\t\"11.5\": \"87\",\n\t\"12.0\": \"89\",\n\t\"12.1\": \"89\",\n\t\"12.2\": \"89\",\n\t\"13.0\": \"91\",\n\t\"13.1\": \"91\",\n\t\"13.2\": \"91\",\n\t\"13.3\": \"91\",\n\t\"13.4\": \"91\",\n\t\"13.5\": \"91\",\n\t\"13.6\": \"91\",\n\t\"14.0\": \"93\",\n\t\"14.1\": \"93\",\n\t\"14.2\": \"93\",\n\t\"15.0\": \"94\",\n\t\"15.1\": \"94\",\n\t\"15.2\": \"94\",\n\t\"15.3\": \"94\",\n\t\"15.4\": \"94\",\n\t\"15.5\": \"94\",\n\t\"16.0\": \"96\",\n\t\"16.1\": \"96\",\n\t\"16.2\": \"96\",\n\t\"17.0\": \"98\",\n\t\"17.1\": \"98\",\n\t\"17.2\": \"98\",\n\t\"17.3\": \"98\",\n\t\"17.4\": \"98\",\n\t\"18.0\": \"100\",\n\t\"18.1\": \"100\",\n\t\"18.2\": \"100\",\n\t\"18.3\": \"100\",\n\t\"19.0\": \"102\",\n\t\"19.1\": \"102\",\n\t\"20.0\": \"104\",\n\t\"20.1\": \"104\",\n\t\"20.2\": \"104\",\n\t\"20.3\": \"104\",\n\t\"21.0\": \"106\",\n\t\"21.1\": \"106\",\n\t\"21.2\": \"106\",\n\t\"21.3\": \"106\",\n\t\"21.4\": \"106\",\n\t\"22.0\": \"108\",\n\t\"22.1\": \"108\",\n\t\"22.2\": \"108\",\n\t\"22.3\": \"108\",\n\t\"23.0\": \"110\",\n\t\"23.1\": \"110\",\n\t\"23.2\": \"110\",\n\t\"23.3\": \"110\",\n\t\"24.0\": \"112\",\n\t\"24.1\": \"112\",\n\t\"24.2\": \"112\",\n\t\"24.3\": \"112\",\n\t\"24.4\": \"112\",\n\t\"24.5\": \"112\",\n\t\"24.6\": \"112\",\n\t\"24.7\": \"112\",\n\t\"24.8\": \"112\",\n\t\"25.0\": \"114\",\n\t\"25.1\": \"114\",\n\t\"25.2\": \"114\",\n\t\"25.3\": \"114\",\n\t\"25.4\": \"114\",\n\t\"25.5\": \"114\",\n\t\"25.6\": \"114\",\n\t\"25.7\": \"114\",\n\t\"25.8\": \"114\",\n\t\"25.9\": \"114\",\n\t\"26.0\": \"116\",\n\t\"26.1\": \"116\",\n\t\"26.2\": \"116\",\n\t\"26.3\": \"116\",\n\t\"26.4\": \"116\",\n\t\"26.5\": \"116\",\n\t\"26.6\": \"116\",\n\t\"27.0\": \"118\",\n\t\"27.1\": \"118\",\n\t\"27.2\": \"118\",\n\t\"27.3\": \"118\",\n\t\"28.0\": \"120\",\n\t\"28.1\": \"120\",\n\t\"28.2\": \"120\",\n\t\"28.3\": \"120\",\n\t\"29.0\": \"122\",\n\t\"29.1\": \"122\",\n\t\"29.2\": \"122\",\n\t\"29.3\": \"122\",\n\t\"29.4\": \"122\",\n\t\"30.0\": \"124\",\n\t\"30.1\": \"124\",\n\t\"31.0\": \"126\",\n\t\"31.1\": \"126\",\n\t\"32.0\": \"127\"\n};","function BrowserslistError(message) {\n this.name = 'BrowserslistError'\n this.message = message\n this.browserslist = true\n if (Error.captureStackTrace) {\n Error.captureStackTrace(this, BrowserslistError)\n }\n}\n\nBrowserslistError.prototype = Error.prototype\n\nmodule.exports = BrowserslistError\n","var AND_REGEXP = /^\\s+and\\s+(.*)/i\nvar OR_REGEXP = /^(?:,\\s*|\\s+or\\s+)(.*)/i\n\nfunction flatten(array) {\n if (!Array.isArray(array)) return [array]\n return array.reduce(function (a, b) {\n return a.concat(flatten(b))\n }, [])\n}\n\nfunction find(string, predicate) {\n for (var n = 1, max = string.length; n <= max; n++) {\n var parsed = string.substr(-n, n)\n if (predicate(parsed, n, max)) {\n return string.slice(0, -n)\n }\n }\n return ''\n}\n\nfunction matchQuery(all, query) {\n var node = { query: query }\n if (query.indexOf('not ') === 0) {\n node.not = true\n query = query.slice(4)\n }\n\n for (var name in all) {\n var type = all[name]\n var match = query.match(type.regexp)\n if (match) {\n node.type = name\n for (var i = 0; i < type.matches.length; i++) {\n node[type.matches[i]] = match[i + 1]\n }\n return node\n }\n }\n\n node.type = 'unknown'\n return node\n}\n\nfunction matchBlock(all, string, qs) {\n var node\n return find(string, function (parsed, n, max) {\n if (AND_REGEXP.test(parsed)) {\n node = matchQuery(all, parsed.match(AND_REGEXP)[1])\n node.compose = 'and'\n qs.unshift(node)\n return true\n } else if (OR_REGEXP.test(parsed)) {\n node = matchQuery(all, parsed.match(OR_REGEXP)[1])\n node.compose = 'or'\n qs.unshift(node)\n return true\n } else if (n === max) {\n node = matchQuery(all, parsed.trim())\n node.compose = 'or'\n qs.unshift(node)\n return true\n }\n return false\n })\n}\n\nmodule.exports = function parse(all, queries) {\n if (!Array.isArray(queries)) queries = [queries]\n return flatten(\n queries.map(function (block) {\n var qs = []\n do {\n block = matchBlock(all, block, qs)\n } while (block)\n return qs\n })\n )\n}\n","var BrowserslistError = require('./error')\n\nfunction noop() {}\n\nmodule.exports = {\n loadQueries: function loadQueries() {\n throw new BrowserslistError(\n 'Sharable configs are not supported in client-side build of Browserslist'\n )\n },\n\n getStat: function getStat(opts) {\n return opts.stats\n },\n\n loadConfig: function loadConfig(opts) {\n if (opts.config) {\n throw new BrowserslistError(\n 'Browserslist config are not supported in client-side build'\n )\n }\n },\n\n loadCountry: function loadCountry() {\n throw new BrowserslistError(\n 'Country statistics are not supported ' +\n 'in client-side build of Browserslist'\n )\n },\n\n loadFeature: function loadFeature() {\n throw new BrowserslistError(\n 'Supports queries are not available in client-side build of Browserslist'\n )\n },\n\n currentNode: function currentNode(resolve, context) {\n return resolve(['maintained node versions'], context)[0]\n },\n\n parseConfig: noop,\n\n readConfig: noop,\n\n findConfig: noop,\n\n clearCaches: noop,\n\n oldDataWarning: noop,\n\n env: {}\n}\n","var jsReleases = require('node-releases/data/processed/envs.json')\nvar agents = require('caniuse-lite/dist/unpacker/agents').agents\nvar jsEOL = require('node-releases/data/release-schedule/release-schedule.json')\nvar path = require('path')\nvar e2c = require('electron-to-chromium/versions')\n\nvar BrowserslistError = require('./error')\nvar parse = require('./parse')\nvar env = require('./node') // Will load browser.js in webpack\n\nvar YEAR = 365.259641 * 24 * 60 * 60 * 1000\nvar ANDROID_EVERGREEN_FIRST = '37'\nvar OP_MOB_BLINK_FIRST = 14\n\n// Helpers\n\nfunction isVersionsMatch(versionA, versionB) {\n return (versionA + '.').indexOf(versionB + '.') === 0\n}\n\nfunction isEolReleased(name) {\n var version = name.slice(1)\n return browserslist.nodeVersions.some(function (i) {\n return isVersionsMatch(i, version)\n })\n}\n\nfunction normalize(versions) {\n return versions.filter(function (version) {\n return typeof version === 'string'\n })\n}\n\nfunction normalizeElectron(version) {\n var versionToUse = version\n if (version.split('.').length === 3) {\n versionToUse = version.split('.').slice(0, -1).join('.')\n }\n return versionToUse\n}\n\nfunction nameMapper(name) {\n return function mapName(version) {\n return name + ' ' + version\n }\n}\n\nfunction getMajor(version) {\n return parseInt(version.split('.')[0])\n}\n\nfunction getMajorVersions(released, number) {\n if (released.length === 0) return []\n var majorVersions = uniq(released.map(getMajor))\n var minimum = majorVersions[majorVersions.length - number]\n if (!minimum) {\n return released\n }\n var selected = []\n for (var i = released.length - 1; i >= 0; i--) {\n if (minimum > getMajor(released[i])) break\n selected.unshift(released[i])\n }\n return selected\n}\n\nfunction uniq(array) {\n var filtered = []\n for (var i = 0; i < array.length; i++) {\n if (filtered.indexOf(array[i]) === -1) filtered.push(array[i])\n }\n return filtered\n}\n\nfunction fillUsage(result, name, data) {\n for (var i in data) {\n result[name + ' ' + i] = data[i]\n }\n}\n\nfunction generateFilter(sign, version) {\n version = parseFloat(version)\n if (sign === '>') {\n return function (v) {\n return parseFloat(v) > version\n }\n } else if (sign === '>=') {\n return function (v) {\n return parseFloat(v) >= version\n }\n } else if (sign === '<') {\n return function (v) {\n return parseFloat(v) < version\n }\n } else {\n return function (v) {\n return parseFloat(v) <= version\n }\n }\n}\n\nfunction generateSemverFilter(sign, version) {\n version = version.split('.').map(parseSimpleInt)\n version[1] = version[1] || 0\n version[2] = version[2] || 0\n if (sign === '>') {\n return function (v) {\n v = v.split('.').map(parseSimpleInt)\n return compareSemver(v, version) > 0\n }\n } else if (sign === '>=') {\n return function (v) {\n v = v.split('.').map(parseSimpleInt)\n return compareSemver(v, version) >= 0\n }\n } else if (sign === '<') {\n return function (v) {\n v = v.split('.').map(parseSimpleInt)\n return compareSemver(version, v) > 0\n }\n } else {\n return function (v) {\n v = v.split('.').map(parseSimpleInt)\n return compareSemver(version, v) >= 0\n }\n }\n}\n\nfunction parseSimpleInt(x) {\n return parseInt(x)\n}\n\nfunction compare(a, b) {\n if (a < b) return -1\n if (a > b) return +1\n return 0\n}\n\nfunction compareSemver(a, b) {\n return (\n compare(parseInt(a[0]), parseInt(b[0])) ||\n compare(parseInt(a[1] || '0'), parseInt(b[1] || '0')) ||\n compare(parseInt(a[2] || '0'), parseInt(b[2] || '0'))\n )\n}\n\n// this follows the npm-like semver behavior\nfunction semverFilterLoose(operator, range) {\n range = range.split('.').map(parseSimpleInt)\n if (typeof range[1] === 'undefined') {\n range[1] = 'x'\n }\n // ignore any patch version because we only return minor versions\n // range[2] = 'x'\n switch (operator) {\n case '<=':\n return function (version) {\n version = version.split('.').map(parseSimpleInt)\n return compareSemverLoose(version, range) <= 0\n }\n case '>=':\n default:\n return function (version) {\n version = version.split('.').map(parseSimpleInt)\n return compareSemverLoose(version, range) >= 0\n }\n }\n}\n\n// this follows the npm-like semver behavior\nfunction compareSemverLoose(version, range) {\n if (version[0] !== range[0]) {\n return version[0] < range[0] ? -1 : +1\n }\n if (range[1] === 'x') {\n return 0\n }\n if (version[1] !== range[1]) {\n return version[1] < range[1] ? -1 : +1\n }\n return 0\n}\n\nfunction resolveVersion(data, version) {\n if (data.versions.indexOf(version) !== -1) {\n return version\n } else if (browserslist.versionAliases[data.name][version]) {\n return browserslist.versionAliases[data.name][version]\n } else {\n return false\n }\n}\n\nfunction normalizeVersion(data, version) {\n var resolved = resolveVersion(data, version)\n if (resolved) {\n return resolved\n } else if (data.versions.length === 1) {\n return data.versions[0]\n } else {\n return false\n }\n}\n\nfunction filterByYear(since, context) {\n since = since / 1000\n return Object.keys(agents).reduce(function (selected, name) {\n var data = byName(name, context)\n if (!data) return selected\n var versions = Object.keys(data.releaseDate).filter(function (v) {\n var date = data.releaseDate[v]\n return date !== null && date >= since\n })\n return selected.concat(versions.map(nameMapper(data.name)))\n }, [])\n}\n\nfunction cloneData(data) {\n return {\n name: data.name,\n versions: data.versions,\n released: data.released,\n releaseDate: data.releaseDate\n }\n}\n\nfunction byName(name, context) {\n name = name.toLowerCase()\n name = browserslist.aliases[name] || name\n if (context.mobileToDesktop && browserslist.desktopNames[name]) {\n var desktop = browserslist.data[browserslist.desktopNames[name]]\n if (name === 'android') {\n return normalizeAndroidData(cloneData(browserslist.data[name]), desktop)\n } else {\n var cloned = cloneData(desktop)\n cloned.name = name\n return cloned\n }\n }\n return browserslist.data[name]\n}\n\nfunction normalizeAndroidVersions(androidVersions, chromeVersions) {\n var iFirstEvergreen = chromeVersions.indexOf(ANDROID_EVERGREEN_FIRST)\n return androidVersions\n .filter(function (version) {\n return /^(?:[2-4]\\.|[34]$)/.test(version)\n })\n .concat(chromeVersions.slice(iFirstEvergreen))\n}\n\nfunction copyObject(obj) {\n var copy = {}\n for (var key in obj) {\n copy[key] = obj[key]\n }\n return copy\n}\n\nfunction normalizeAndroidData(android, chrome) {\n android.released = normalizeAndroidVersions(android.released, chrome.released)\n android.versions = normalizeAndroidVersions(android.versions, chrome.versions)\n android.releaseDate = copyObject(android.releaseDate)\n android.released.forEach(function (v) {\n if (android.releaseDate[v] === undefined) {\n android.releaseDate[v] = chrome.releaseDate[v]\n }\n })\n return android\n}\n\nfunction checkName(name, context) {\n var data = byName(name, context)\n if (!data) throw new BrowserslistError('Unknown browser ' + name)\n return data\n}\n\nfunction unknownQuery(query) {\n return new BrowserslistError(\n 'Unknown browser query `' +\n query +\n '`. ' +\n 'Maybe you are using old Browserslist or made typo in query.'\n )\n}\n\n// Adjusts last X versions queries for some mobile browsers,\n// where caniuse data jumps from a legacy version to the latest\nfunction filterJumps(list, name, nVersions, context) {\n var jump = 1\n switch (name) {\n case 'android':\n if (context.mobileToDesktop) return list\n var released = browserslist.data.chrome.released\n jump = released.length - released.indexOf(ANDROID_EVERGREEN_FIRST)\n break\n case 'op_mob':\n var latest = browserslist.data.op_mob.released.slice(-1)[0]\n jump = getMajor(latest) - OP_MOB_BLINK_FIRST + 1\n break\n default:\n return list\n }\n if (nVersions <= jump) {\n return list.slice(-1)\n }\n return list.slice(jump - 1 - nVersions)\n}\n\nfunction isSupported(flags, withPartial) {\n return (\n typeof flags === 'string' &&\n (flags.indexOf('y') >= 0 || (withPartial && flags.indexOf('a') >= 0))\n )\n}\n\nfunction resolve(queries, context) {\n return parse(QUERIES, queries).reduce(function (result, node, index) {\n if (node.not && index === 0) {\n throw new BrowserslistError(\n 'Write any browsers query (for instance, `defaults`) ' +\n 'before `' +\n node.query +\n '`'\n )\n }\n var type = QUERIES[node.type]\n var array = type.select.call(browserslist, context, node).map(function (j) {\n var parts = j.split(' ')\n if (parts[1] === '0') {\n return parts[0] + ' ' + byName(parts[0], context).versions[0]\n } else {\n return j\n }\n })\n\n if (node.compose === 'and') {\n if (node.not) {\n return result.filter(function (j) {\n return array.indexOf(j) === -1\n })\n } else {\n return result.filter(function (j) {\n return array.indexOf(j) !== -1\n })\n }\n } else {\n if (node.not) {\n var filter = {}\n array.forEach(function (j) {\n filter[j] = true\n })\n return result.filter(function (j) {\n return !filter[j]\n })\n }\n return result.concat(array)\n }\n }, [])\n}\n\nfunction prepareOpts(opts) {\n if (typeof opts === 'undefined') opts = {}\n\n if (typeof opts.path === 'undefined') {\n opts.path = path.resolve ? path.resolve('.') : '.'\n }\n\n return opts\n}\n\nfunction prepareQueries(queries, opts) {\n if (typeof queries === 'undefined' || queries === null) {\n var config = browserslist.loadConfig(opts)\n if (config) {\n queries = config\n } else {\n queries = browserslist.defaults\n }\n }\n\n return queries\n}\n\nfunction checkQueries(queries) {\n if (!(typeof queries === 'string' || Array.isArray(queries))) {\n throw new BrowserslistError(\n 'Browser queries must be an array or string. Got ' + typeof queries + '.'\n )\n }\n}\n\nvar cache = {}\n\nfunction browserslist(queries, opts) {\n opts = prepareOpts(opts)\n queries = prepareQueries(queries, opts)\n checkQueries(queries)\n\n var context = {\n ignoreUnknownVersions: opts.ignoreUnknownVersions,\n dangerousExtend: opts.dangerousExtend,\n mobileToDesktop: opts.mobileToDesktop,\n path: opts.path,\n env: opts.env\n }\n\n env.oldDataWarning(browserslist.data)\n var stats = env.getStat(opts, browserslist.data)\n if (stats) {\n context.customUsage = {}\n for (var browser in stats) {\n fillUsage(context.customUsage, browser, stats[browser])\n }\n }\n\n var cacheKey = JSON.stringify([queries, context])\n if (cache[cacheKey]) return cache[cacheKey]\n\n var result = uniq(resolve(queries, context)).sort(function (name1, name2) {\n name1 = name1.split(' ')\n name2 = name2.split(' ')\n if (name1[0] === name2[0]) {\n // assumptions on caniuse data\n // 1) version ranges never overlaps\n // 2) if version is not a range, it never contains `-`\n var version1 = name1[1].split('-')[0]\n var version2 = name2[1].split('-')[0]\n return compareSemver(version2.split('.'), version1.split('.'))\n } else {\n return compare(name1[0], name2[0])\n }\n })\n if (!env.env.BROWSERSLIST_DISABLE_CACHE) {\n cache[cacheKey] = result\n }\n return result\n}\n\nbrowserslist.parse = function (queries, opts) {\n opts = prepareOpts(opts)\n queries = prepareQueries(queries, opts)\n checkQueries(queries)\n return parse(QUERIES, queries)\n}\n\n// Will be filled by Can I Use data below\nbrowserslist.cache = {}\nbrowserslist.data = {}\nbrowserslist.usage = {\n global: {},\n custom: null\n}\n\n// Default browsers query\nbrowserslist.defaults = ['> 0.5%', 'last 2 versions', 'Firefox ESR', 'not dead']\n\n// Browser names aliases\nbrowserslist.aliases = {\n fx: 'firefox',\n ff: 'firefox',\n ios: 'ios_saf',\n explorer: 'ie',\n blackberry: 'bb',\n explorermobile: 'ie_mob',\n operamini: 'op_mini',\n operamobile: 'op_mob',\n chromeandroid: 'and_chr',\n firefoxandroid: 'and_ff',\n ucandroid: 'and_uc',\n qqandroid: 'and_qq'\n}\n\n// Can I Use only provides a few versions for some browsers (e.g. and_chr).\n// Fallback to a similar browser for unknown versions\n// Note op_mob is not included as its chromium versions are not in sync with Opera desktop\nbrowserslist.desktopNames = {\n and_chr: 'chrome',\n and_ff: 'firefox',\n ie_mob: 'ie',\n android: 'chrome' // has extra processing logic\n}\n\n// Aliases to work with joined versions like `ios_saf 7.0-7.1`\nbrowserslist.versionAliases = {}\n\nbrowserslist.clearCaches = env.clearCaches\nbrowserslist.parseConfig = env.parseConfig\nbrowserslist.readConfig = env.readConfig\nbrowserslist.findConfig = env.findConfig\nbrowserslist.loadConfig = env.loadConfig\n\nbrowserslist.coverage = function (browsers, stats) {\n var data\n if (typeof stats === 'undefined') {\n data = browserslist.usage.global\n } else if (stats === 'my stats') {\n var opts = {}\n opts.path = path.resolve ? path.resolve('.') : '.'\n var customStats = env.getStat(opts)\n if (!customStats) {\n throw new BrowserslistError('Custom usage statistics was not provided')\n }\n data = {}\n for (var browser in customStats) {\n fillUsage(data, browser, customStats[browser])\n }\n } else if (typeof stats === 'string') {\n if (stats.length > 2) {\n stats = stats.toLowerCase()\n } else {\n stats = stats.toUpperCase()\n }\n env.loadCountry(browserslist.usage, stats, browserslist.data)\n data = browserslist.usage[stats]\n } else {\n if ('dataByBrowser' in stats) {\n stats = stats.dataByBrowser\n }\n data = {}\n for (var name in stats) {\n for (var version in stats[name]) {\n data[name + ' ' + version] = stats[name][version]\n }\n }\n }\n\n return browsers.reduce(function (all, i) {\n var usage = data[i]\n if (usage === undefined) {\n usage = data[i.replace(/ \\S+$/, ' 0')]\n }\n return all + (usage || 0)\n }, 0)\n}\n\nfunction nodeQuery(context, node) {\n var matched = browserslist.nodeVersions.filter(function (i) {\n return isVersionsMatch(i, node.version)\n })\n if (matched.length === 0) {\n if (context.ignoreUnknownVersions) {\n return []\n } else {\n throw new BrowserslistError(\n 'Unknown version ' + node.version + ' of Node.js'\n )\n }\n }\n return ['node ' + matched[matched.length - 1]]\n}\n\nfunction sinceQuery(context, node) {\n var year = parseInt(node.year)\n var month = parseInt(node.month || '01') - 1\n var day = parseInt(node.day || '01')\n return filterByYear(Date.UTC(year, month, day, 0, 0, 0), context)\n}\n\nfunction coverQuery(context, node) {\n var coverage = parseFloat(node.coverage)\n var usage = browserslist.usage.global\n if (node.place) {\n if (node.place.match(/^my\\s+stats$/i)) {\n if (!context.customUsage) {\n throw new BrowserslistError('Custom usage statistics was not provided')\n }\n usage = context.customUsage\n } else {\n var place\n if (node.place.length === 2) {\n place = node.place.toUpperCase()\n } else {\n place = node.place.toLowerCase()\n }\n env.loadCountry(browserslist.usage, place, browserslist.data)\n usage = browserslist.usage[place]\n }\n }\n var versions = Object.keys(usage).sort(function (a, b) {\n return usage[b] - usage[a]\n })\n var coveraged = 0\n var result = []\n var version\n for (var i = 0; i < versions.length; i++) {\n version = versions[i]\n if (usage[version] === 0) break\n coveraged += usage[version]\n result.push(version)\n if (coveraged >= coverage) break\n }\n return result\n}\n\nvar QUERIES = {\n last_major_versions: {\n matches: ['versions'],\n regexp: /^last\\s+(\\d+)\\s+major\\s+versions?$/i,\n select: function (context, node) {\n return Object.keys(agents).reduce(function (selected, name) {\n var data = byName(name, context)\n if (!data) return selected\n var list = getMajorVersions(data.released, node.versions)\n list = list.map(nameMapper(data.name))\n list = filterJumps(list, data.name, node.versions, context)\n return selected.concat(list)\n }, [])\n }\n },\n last_versions: {\n matches: ['versions'],\n regexp: /^last\\s+(\\d+)\\s+versions?$/i,\n select: function (context, node) {\n return Object.keys(agents).reduce(function (selected, name) {\n var data = byName(name, context)\n if (!data) return selected\n var list = data.released.slice(-node.versions)\n list = list.map(nameMapper(data.name))\n list = filterJumps(list, data.name, node.versions, context)\n return selected.concat(list)\n }, [])\n }\n },\n last_electron_major_versions: {\n matches: ['versions'],\n regexp: /^last\\s+(\\d+)\\s+electron\\s+major\\s+versions?$/i,\n select: function (context, node) {\n var validVersions = getMajorVersions(Object.keys(e2c), node.versions)\n return validVersions.map(function (i) {\n return 'chrome ' + e2c[i]\n })\n }\n },\n last_node_major_versions: {\n matches: ['versions'],\n regexp: /^last\\s+(\\d+)\\s+node\\s+major\\s+versions?$/i,\n select: function (context, node) {\n return getMajorVersions(browserslist.nodeVersions, node.versions).map(\n function (version) {\n return 'node ' + version\n }\n )\n }\n },\n last_browser_major_versions: {\n matches: ['versions', 'browser'],\n regexp: /^last\\s+(\\d+)\\s+(\\w+)\\s+major\\s+versions?$/i,\n select: function (context, node) {\n var data = checkName(node.browser, context)\n var validVersions = getMajorVersions(data.released, node.versions)\n var list = validVersions.map(nameMapper(data.name))\n list = filterJumps(list, data.name, node.versions, context)\n return list\n }\n },\n last_electron_versions: {\n matches: ['versions'],\n regexp: /^last\\s+(\\d+)\\s+electron\\s+versions?$/i,\n select: function (context, node) {\n return Object.keys(e2c)\n .slice(-node.versions)\n .map(function (i) {\n return 'chrome ' + e2c[i]\n })\n }\n },\n last_node_versions: {\n matches: ['versions'],\n regexp: /^last\\s+(\\d+)\\s+node\\s+versions?$/i,\n select: function (context, node) {\n return browserslist.nodeVersions\n .slice(-node.versions)\n .map(function (version) {\n return 'node ' + version\n })\n }\n },\n last_browser_versions: {\n matches: ['versions', 'browser'],\n regexp: /^last\\s+(\\d+)\\s+(\\w+)\\s+versions?$/i,\n select: function (context, node) {\n var data = checkName(node.browser, context)\n var list = data.released.slice(-node.versions).map(nameMapper(data.name))\n list = filterJumps(list, data.name, node.versions, context)\n return list\n }\n },\n unreleased_versions: {\n matches: [],\n regexp: /^unreleased\\s+versions$/i,\n select: function (context) {\n return Object.keys(agents).reduce(function (selected, name) {\n var data = byName(name, context)\n if (!data) return selected\n var list = data.versions.filter(function (v) {\n return data.released.indexOf(v) === -1\n })\n list = list.map(nameMapper(data.name))\n return selected.concat(list)\n }, [])\n }\n },\n unreleased_electron_versions: {\n matches: [],\n regexp: /^unreleased\\s+electron\\s+versions?$/i,\n select: function () {\n return []\n }\n },\n unreleased_browser_versions: {\n matches: ['browser'],\n regexp: /^unreleased\\s+(\\w+)\\s+versions?$/i,\n select: function (context, node) {\n var data = checkName(node.browser, context)\n return data.versions\n .filter(function (v) {\n return data.released.indexOf(v) === -1\n })\n .map(nameMapper(data.name))\n }\n },\n last_years: {\n matches: ['years'],\n regexp: /^last\\s+(\\d*.?\\d+)\\s+years?$/i,\n select: function (context, node) {\n return filterByYear(Date.now() - YEAR * node.years, context)\n }\n },\n since_y: {\n matches: ['year'],\n regexp: /^since (\\d+)$/i,\n select: sinceQuery\n },\n since_y_m: {\n matches: ['year', 'month'],\n regexp: /^since (\\d+)-(\\d+)$/i,\n select: sinceQuery\n },\n since_y_m_d: {\n matches: ['year', 'month', 'day'],\n regexp: /^since (\\d+)-(\\d+)-(\\d+)$/i,\n select: sinceQuery\n },\n popularity: {\n matches: ['sign', 'popularity'],\n regexp: /^(>=?|<=?)\\s*(\\d+|\\d+\\.\\d+|\\.\\d+)%$/,\n select: function (context, node) {\n var popularity = parseFloat(node.popularity)\n var usage = browserslist.usage.global\n return Object.keys(usage).reduce(function (result, version) {\n if (node.sign === '>') {\n if (usage[version] > popularity) {\n result.push(version)\n }\n } else if (node.sign === '<') {\n if (usage[version] < popularity) {\n result.push(version)\n }\n } else if (node.sign === '<=') {\n if (usage[version] <= popularity) {\n result.push(version)\n }\n } else if (usage[version] >= popularity) {\n result.push(version)\n }\n return result\n }, [])\n }\n },\n popularity_in_my_stats: {\n matches: ['sign', 'popularity'],\n regexp: /^(>=?|<=?)\\s*(\\d+|\\d+\\.\\d+|\\.\\d+)%\\s+in\\s+my\\s+stats$/,\n select: function (context, node) {\n var popularity = parseFloat(node.popularity)\n if (!context.customUsage) {\n throw new BrowserslistError('Custom usage statistics was not provided')\n }\n var usage = context.customUsage\n return Object.keys(usage).reduce(function (result, version) {\n var percentage = usage[version]\n if (percentage == null) {\n return result\n }\n\n if (node.sign === '>') {\n if (percentage > popularity) {\n result.push(version)\n }\n } else if (node.sign === '<') {\n if (percentage < popularity) {\n result.push(version)\n }\n } else if (node.sign === '<=') {\n if (percentage <= popularity) {\n result.push(version)\n }\n } else if (percentage >= popularity) {\n result.push(version)\n }\n return result\n }, [])\n }\n },\n popularity_in_config_stats: {\n matches: ['sign', 'popularity', 'config'],\n regexp: /^(>=?|<=?)\\s*(\\d+|\\d+\\.\\d+|\\.\\d+)%\\s+in\\s+(\\S+)\\s+stats$/,\n select: function (context, node) {\n var popularity = parseFloat(node.popularity)\n var stats = env.loadStat(context, node.config, browserslist.data)\n if (stats) {\n context.customUsage = {}\n for (var browser in stats) {\n fillUsage(context.customUsage, browser, stats[browser])\n }\n }\n if (!context.customUsage) {\n throw new BrowserslistError('Custom usage statistics was not provided')\n }\n var usage = context.customUsage\n return Object.keys(usage).reduce(function (result, version) {\n var percentage = usage[version]\n if (percentage == null) {\n return result\n }\n\n if (node.sign === '>') {\n if (percentage > popularity) {\n result.push(version)\n }\n } else if (node.sign === '<') {\n if (percentage < popularity) {\n result.push(version)\n }\n } else if (node.sign === '<=') {\n if (percentage <= popularity) {\n result.push(version)\n }\n } else if (percentage >= popularity) {\n result.push(version)\n }\n return result\n }, [])\n }\n },\n popularity_in_place: {\n matches: ['sign', 'popularity', 'place'],\n regexp: /^(>=?|<=?)\\s*(\\d+|\\d+\\.\\d+|\\.\\d+)%\\s+in\\s+((alt-)?\\w\\w)$/,\n select: function (context, node) {\n var popularity = parseFloat(node.popularity)\n var place = node.place\n if (place.length === 2) {\n place = place.toUpperCase()\n } else {\n place = place.toLowerCase()\n }\n env.loadCountry(browserslist.usage, place, browserslist.data)\n var usage = browserslist.usage[place]\n return Object.keys(usage).reduce(function (result, version) {\n var percentage = usage[version]\n if (percentage == null) {\n return result\n }\n\n if (node.sign === '>') {\n if (percentage > popularity) {\n result.push(version)\n }\n } else if (node.sign === '<') {\n if (percentage < popularity) {\n result.push(version)\n }\n } else if (node.sign === '<=') {\n if (percentage <= popularity) {\n result.push(version)\n }\n } else if (percentage >= popularity) {\n result.push(version)\n }\n return result\n }, [])\n }\n },\n cover: {\n matches: ['coverage'],\n regexp: /^cover\\s+(\\d+|\\d+\\.\\d+|\\.\\d+)%$/i,\n select: coverQuery\n },\n cover_in: {\n matches: ['coverage', 'place'],\n regexp: /^cover\\s+(\\d+|\\d+\\.\\d+|\\.\\d+)%\\s+in\\s+(my\\s+stats|(alt-)?\\w\\w)$/i,\n select: coverQuery\n },\n supports: {\n matches: ['supportType', 'feature'],\n regexp: /^(?:(fully|partially)\\s+)?supports\\s+([\\w-]+)$/,\n select: function (context, node) {\n env.loadFeature(browserslist.cache, node.feature)\n var withPartial = node.supportType !== 'fully'\n var features = browserslist.cache[node.feature]\n var result = []\n for (var name in features) {\n var data = byName(name, context)\n // Only check desktop when latest released mobile has support\n var iMax = data.released.length - 1\n while (iMax >= 0) {\n if (data.released[iMax] in features[name]) break\n iMax--\n }\n var checkDesktop =\n context.mobileToDesktop &&\n name in browserslist.desktopNames &&\n isSupported(features[name][data.released[iMax]], withPartial)\n data.versions.forEach(function (version) {\n var flags = features[name][version]\n if (flags === undefined && checkDesktop) {\n flags = features[browserslist.desktopNames[name]][version]\n }\n if (isSupported(flags, withPartial)) {\n result.push(name + ' ' + version)\n }\n })\n }\n return result\n }\n },\n electron_range: {\n matches: ['from', 'to'],\n regexp: /^electron\\s+([\\d.]+)\\s*-\\s*([\\d.]+)$/i,\n select: function (context, node) {\n var fromToUse = normalizeElectron(node.from)\n var toToUse = normalizeElectron(node.to)\n var from = parseFloat(node.from)\n var to = parseFloat(node.to)\n if (!e2c[fromToUse]) {\n throw new BrowserslistError('Unknown version ' + from + ' of electron')\n }\n if (!e2c[toToUse]) {\n throw new BrowserslistError('Unknown version ' + to + ' of electron')\n }\n return Object.keys(e2c)\n .filter(function (i) {\n var parsed = parseFloat(i)\n return parsed >= from && parsed <= to\n })\n .map(function (i) {\n return 'chrome ' + e2c[i]\n })\n }\n },\n node_range: {\n matches: ['from', 'to'],\n regexp: /^node\\s+([\\d.]+)\\s*-\\s*([\\d.]+)$/i,\n select: function (context, node) {\n return browserslist.nodeVersions\n .filter(semverFilterLoose('>=', node.from))\n .filter(semverFilterLoose('<=', node.to))\n .map(function (v) {\n return 'node ' + v\n })\n }\n },\n browser_range: {\n matches: ['browser', 'from', 'to'],\n regexp: /^(\\w+)\\s+([\\d.]+)\\s*-\\s*([\\d.]+)$/i,\n select: function (context, node) {\n var data = checkName(node.browser, context)\n var from = parseFloat(normalizeVersion(data, node.from) || node.from)\n var to = parseFloat(normalizeVersion(data, node.to) || node.to)\n function filter(v) {\n var parsed = parseFloat(v)\n return parsed >= from && parsed <= to\n }\n return data.released.filter(filter).map(nameMapper(data.name))\n }\n },\n electron_ray: {\n matches: ['sign', 'version'],\n regexp: /^electron\\s*(>=?|<=?)\\s*([\\d.]+)$/i,\n select: function (context, node) {\n var versionToUse = normalizeElectron(node.version)\n return Object.keys(e2c)\n .filter(generateFilter(node.sign, versionToUse))\n .map(function (i) {\n return 'chrome ' + e2c[i]\n })\n }\n },\n node_ray: {\n matches: ['sign', 'version'],\n regexp: /^node\\s*(>=?|<=?)\\s*([\\d.]+)$/i,\n select: function (context, node) {\n return browserslist.nodeVersions\n .filter(generateSemverFilter(node.sign, node.version))\n .map(function (v) {\n return 'node ' + v\n })\n }\n },\n browser_ray: {\n matches: ['browser', 'sign', 'version'],\n regexp: /^(\\w+)\\s*(>=?|<=?)\\s*([\\d.]+)$/,\n select: function (context, node) {\n var version = node.version\n var data = checkName(node.browser, context)\n var alias = browserslist.versionAliases[data.name][version]\n if (alias) version = alias\n return data.released\n .filter(generateFilter(node.sign, version))\n .map(function (v) {\n return data.name + ' ' + v\n })\n }\n },\n firefox_esr: {\n matches: [],\n regexp: /^(firefox|ff|fx)\\s+esr$/i,\n select: function () {\n return ['firefox 115']\n }\n },\n opera_mini_all: {\n matches: [],\n regexp: /(operamini|op_mini)\\s+all/i,\n select: function () {\n return ['op_mini all']\n }\n },\n electron_version: {\n matches: ['version'],\n regexp: /^electron\\s+([\\d.]+)$/i,\n select: function (context, node) {\n var versionToUse = normalizeElectron(node.version)\n var chrome = e2c[versionToUse]\n if (!chrome) {\n throw new BrowserslistError(\n 'Unknown version ' + node.version + ' of electron'\n )\n }\n return ['chrome ' + chrome]\n }\n },\n node_major_version: {\n matches: ['version'],\n regexp: /^node\\s+(\\d+)$/i,\n select: nodeQuery\n },\n node_minor_version: {\n matches: ['version'],\n regexp: /^node\\s+(\\d+\\.\\d+)$/i,\n select: nodeQuery\n },\n node_patch_version: {\n matches: ['version'],\n regexp: /^node\\s+(\\d+\\.\\d+\\.\\d+)$/i,\n select: nodeQuery\n },\n current_node: {\n matches: [],\n regexp: /^current\\s+node$/i,\n select: function (context) {\n return [env.currentNode(resolve, context)]\n }\n },\n maintained_node: {\n matches: [],\n regexp: /^maintained\\s+node\\s+versions$/i,\n select: function (context) {\n var now = Date.now()\n var queries = Object.keys(jsEOL)\n .filter(function (key) {\n return (\n now < Date.parse(jsEOL[key].end) &&\n now > Date.parse(jsEOL[key].start) &&\n isEolReleased(key)\n )\n })\n .map(function (key) {\n return 'node ' + key.slice(1)\n })\n return resolve(queries, context)\n }\n },\n phantomjs_1_9: {\n matches: [],\n regexp: /^phantomjs\\s+1.9$/i,\n select: function () {\n return ['safari 5']\n }\n },\n phantomjs_2_1: {\n matches: [],\n regexp: /^phantomjs\\s+2.1$/i,\n select: function () {\n return ['safari 6']\n }\n },\n browser_version: {\n matches: ['browser', 'version'],\n regexp: /^(\\w+)\\s+(tp|[\\d.]+)$/i,\n select: function (context, node) {\n var version = node.version\n if (/^tp$/i.test(version)) version = 'TP'\n var data = checkName(node.browser, context)\n var alias = normalizeVersion(data, version)\n if (alias) {\n version = alias\n } else {\n if (version.indexOf('.') === -1) {\n alias = version + '.0'\n } else {\n alias = version.replace(/\\.0$/, '')\n }\n alias = normalizeVersion(data, alias)\n if (alias) {\n version = alias\n } else if (context.ignoreUnknownVersions) {\n return []\n } else {\n throw new BrowserslistError(\n 'Unknown version ' + version + ' of ' + node.browser\n )\n }\n }\n return [data.name + ' ' + version]\n }\n },\n browserslist_config: {\n matches: [],\n regexp: /^browserslist config$/i,\n select: function (context) {\n return browserslist(undefined, context)\n }\n },\n extends: {\n matches: ['config'],\n regexp: /^extends (.+)$/i,\n select: function (context, node) {\n return resolve(env.loadQueries(context, node.config), context)\n }\n },\n defaults: {\n matches: [],\n regexp: /^defaults$/i,\n select: function (context) {\n return resolve(browserslist.defaults, context)\n }\n },\n dead: {\n matches: [],\n regexp: /^dead$/i,\n select: function (context) {\n var dead = [\n 'Baidu >= 0',\n 'ie <= 11',\n 'ie_mob <= 11',\n 'bb <= 10',\n 'op_mob <= 12.1',\n 'samsung 4'\n ]\n return resolve(dead, context)\n }\n },\n unknown: {\n matches: [],\n regexp: /^(\\w+)$/i,\n select: function (context, node) {\n if (byName(node.query, context)) {\n throw new BrowserslistError(\n 'Specify versions in Browserslist query for browser ' + node.query\n )\n } else {\n throw unknownQuery(node.query)\n }\n }\n }\n}\n\n// Get and convert Can I Use data\n\n;(function () {\n for (var name in agents) {\n var browser = agents[name]\n browserslist.data[name] = {\n name: name,\n versions: normalize(agents[name].versions),\n released: normalize(agents[name].versions.slice(0, -3)),\n releaseDate: agents[name].release_date\n }\n fillUsage(browserslist.usage.global, name, browser.usage_global)\n\n browserslist.versionAliases[name] = {}\n for (var i = 0; i < browser.versions.length; i++) {\n var full = browser.versions[i]\n if (!full) continue\n\n if (full.indexOf('-') !== -1) {\n var interval = full.split('-')\n for (var j = 0; j < interval.length; j++) {\n browserslist.versionAliases[name][interval[j]] = full\n }\n }\n }\n }\n\n browserslist.nodeVersions = jsReleases.map(function (release) {\n return release.version\n })\n})()\n\nmodule.exports = browserslist\n","const { min } = Math;\n\n// a minimal leven distance implementation\n// balanced maintainability with code size\n// It is not blazingly fast but should be okay for Babel user case\n// where it will be run for at most tens of time on strings\n// that have less than 20 ASCII characters\n\n// https://rosettacode.org/wiki/Levenshtein_distance#ES5\nfunction levenshtein(a: string, b: string): number {\n let t = [],\n u: number[] = [],\n i,\n j;\n const m = a.length,\n n = b.length;\n if (!m) {\n return n;\n }\n if (!n) {\n return m;\n }\n for (j = 0; j <= n; j++) {\n t[j] = j;\n }\n for (i = 1; i <= m; i++) {\n for (u = [i], j = 1; j <= n; j++) {\n u[j] =\n a[i - 1] === b[j - 1] ? t[j - 1] : min(t[j - 1], t[j], u[j - 1]) + 1;\n }\n t = u;\n }\n return u[n];\n}\n\n/**\n * Given a string `str` and an array of candidates `arr`,\n * return the first of elements in candidates that has minimal\n * Levenshtein distance with `str`.\n * @export\n * @param {string} str\n * @param {string[]} arr\n * @returns {string}\n */\nexport function findSuggestion(str: string, arr: readonly string[]): string {\n const distances = arr.map(el => levenshtein(el, str));\n return arr[distances.indexOf(min(...distances))];\n}\n","import { findSuggestion } from \"./find-suggestion.ts\";\n\nexport class OptionValidator {\n declare descriptor: string;\n constructor(descriptor: string) {\n this.descriptor = descriptor;\n }\n\n /**\n * Validate if the given `options` follow the name of keys defined in the `TopLevelOptionShape`\n *\n * @param {Object} options\n * @param {Object} TopLevelOptionShape\n * An object with all the valid key names that `options` should be allowed to have\n * The property values of `TopLevelOptionShape` can be arbitrary\n * @memberof OptionValidator\n */\n validateTopLevelOptions(options: object, TopLevelOptionShape: object): void {\n const validOptionNames = Object.keys(TopLevelOptionShape);\n for (const option of Object.keys(options)) {\n if (!validOptionNames.includes(option)) {\n throw new Error(\n this.formatMessage(`'${option}' is not a valid top-level option.\n- Did you mean '${findSuggestion(option, validOptionNames)}'?`),\n );\n }\n }\n }\n\n // note: we do not consider rewrite them to high order functions\n // until we have to support `validateNumberOption`.\n validateBooleanOption(\n name: string,\n value?: boolean,\n defaultValue?: T,\n ): boolean | T {\n if (value === undefined) {\n return defaultValue;\n } else {\n this.invariant(\n typeof value === \"boolean\",\n `'${name}' option must be a boolean.`,\n );\n }\n return value;\n }\n\n validateStringOption(\n name: string,\n value?: string,\n defaultValue?: T,\n ): string | T {\n if (value === undefined) {\n return defaultValue;\n } else {\n this.invariant(\n typeof value === \"string\",\n `'${name}' option must be a string.`,\n );\n }\n return value;\n }\n /**\n * A helper interface copied from the `invariant` npm package.\n * It throws given `message` when `condition` is not met\n *\n * @param {boolean} condition\n * @param {string} message\n * @memberof OptionValidator\n */\n invariant(condition: boolean, message: string): void {\n if (!condition) {\n throw new Error(this.formatMessage(message));\n }\n }\n\n formatMessage(message: string): string {\n return `${this.descriptor}: ${message}`;\n }\n}\n","module.exports = require(\"./data/native-modules.json\");\n","'use strict'\nmodule.exports = function (Yallist) {\n Yallist.prototype[Symbol.iterator] = function* () {\n for (let walker = this.head; walker; walker = walker.next) {\n yield walker.value\n }\n }\n}\n","'use strict'\nmodule.exports = Yallist\n\nYallist.Node = Node\nYallist.create = Yallist\n\nfunction Yallist (list) {\n var self = this\n if (!(self instanceof Yallist)) {\n self = new Yallist()\n }\n\n self.tail = null\n self.head = null\n self.length = 0\n\n if (list && typeof list.forEach === 'function') {\n list.forEach(function (item) {\n self.push(item)\n })\n } else if (arguments.length > 0) {\n for (var i = 0, l = arguments.length; i < l; i++) {\n self.push(arguments[i])\n }\n }\n\n return self\n}\n\nYallist.prototype.removeNode = function (node) {\n if (node.list !== this) {\n throw new Error('removing node which does not belong to this list')\n }\n\n var next = node.next\n var prev = node.prev\n\n if (next) {\n next.prev = prev\n }\n\n if (prev) {\n prev.next = next\n }\n\n if (node === this.head) {\n this.head = next\n }\n if (node === this.tail) {\n this.tail = prev\n }\n\n node.list.length--\n node.next = null\n node.prev = null\n node.list = null\n\n return next\n}\n\nYallist.prototype.unshiftNode = function (node) {\n if (node === this.head) {\n return\n }\n\n if (node.list) {\n node.list.removeNode(node)\n }\n\n var head = this.head\n node.list = this\n node.next = head\n if (head) {\n head.prev = node\n }\n\n this.head = node\n if (!this.tail) {\n this.tail = node\n }\n this.length++\n}\n\nYallist.prototype.pushNode = function (node) {\n if (node === this.tail) {\n return\n }\n\n if (node.list) {\n node.list.removeNode(node)\n }\n\n var tail = this.tail\n node.list = this\n node.prev = tail\n if (tail) {\n tail.next = node\n }\n\n this.tail = node\n if (!this.head) {\n this.head = node\n }\n this.length++\n}\n\nYallist.prototype.push = function () {\n for (var i = 0, l = arguments.length; i < l; i++) {\n push(this, arguments[i])\n }\n return this.length\n}\n\nYallist.prototype.unshift = function () {\n for (var i = 0, l = arguments.length; i < l; i++) {\n unshift(this, arguments[i])\n }\n return this.length\n}\n\nYallist.prototype.pop = function () {\n if (!this.tail) {\n return undefined\n }\n\n var res = this.tail.value\n this.tail = this.tail.prev\n if (this.tail) {\n this.tail.next = null\n } else {\n this.head = null\n }\n this.length--\n return res\n}\n\nYallist.prototype.shift = function () {\n if (!this.head) {\n return undefined\n }\n\n var res = this.head.value\n this.head = this.head.next\n if (this.head) {\n this.head.prev = null\n } else {\n this.tail = null\n }\n this.length--\n return res\n}\n\nYallist.prototype.forEach = function (fn, thisp) {\n thisp = thisp || this\n for (var walker = this.head, i = 0; walker !== null; i++) {\n fn.call(thisp, walker.value, i, this)\n walker = walker.next\n }\n}\n\nYallist.prototype.forEachReverse = function (fn, thisp) {\n thisp = thisp || this\n for (var walker = this.tail, i = this.length - 1; walker !== null; i--) {\n fn.call(thisp, walker.value, i, this)\n walker = walker.prev\n }\n}\n\nYallist.prototype.get = function (n) {\n for (var i = 0, walker = this.head; walker !== null && i < n; i++) {\n // abort out of the list early if we hit a cycle\n walker = walker.next\n }\n if (i === n && walker !== null) {\n return walker.value\n }\n}\n\nYallist.prototype.getReverse = function (n) {\n for (var i = 0, walker = this.tail; walker !== null && i < n; i++) {\n // abort out of the list early if we hit a cycle\n walker = walker.prev\n }\n if (i === n && walker !== null) {\n return walker.value\n }\n}\n\nYallist.prototype.map = function (fn, thisp) {\n thisp = thisp || this\n var res = new Yallist()\n for (var walker = this.head; walker !== null;) {\n res.push(fn.call(thisp, walker.value, this))\n walker = walker.next\n }\n return res\n}\n\nYallist.prototype.mapReverse = function (fn, thisp) {\n thisp = thisp || this\n var res = new Yallist()\n for (var walker = this.tail; walker !== null;) {\n res.push(fn.call(thisp, walker.value, this))\n walker = walker.prev\n }\n return res\n}\n\nYallist.prototype.reduce = function (fn, initial) {\n var acc\n var walker = this.head\n if (arguments.length > 1) {\n acc = initial\n } else if (this.head) {\n walker = this.head.next\n acc = this.head.value\n } else {\n throw new TypeError('Reduce of empty list with no initial value')\n }\n\n for (var i = 0; walker !== null; i++) {\n acc = fn(acc, walker.value, i)\n walker = walker.next\n }\n\n return acc\n}\n\nYallist.prototype.reduceReverse = function (fn, initial) {\n var acc\n var walker = this.tail\n if (arguments.length > 1) {\n acc = initial\n } else if (this.tail) {\n walker = this.tail.prev\n acc = this.tail.value\n } else {\n throw new TypeError('Reduce of empty list with no initial value')\n }\n\n for (var i = this.length - 1; walker !== null; i--) {\n acc = fn(acc, walker.value, i)\n walker = walker.prev\n }\n\n return acc\n}\n\nYallist.prototype.toArray = function () {\n var arr = new Array(this.length)\n for (var i = 0, walker = this.head; walker !== null; i++) {\n arr[i] = walker.value\n walker = walker.next\n }\n return arr\n}\n\nYallist.prototype.toArrayReverse = function () {\n var arr = new Array(this.length)\n for (var i = 0, walker = this.tail; walker !== null; i++) {\n arr[i] = walker.value\n walker = walker.prev\n }\n return arr\n}\n\nYallist.prototype.slice = function (from, to) {\n to = to || this.length\n if (to < 0) {\n to += this.length\n }\n from = from || 0\n if (from < 0) {\n from += this.length\n }\n var ret = new Yallist()\n if (to < from || to < 0) {\n return ret\n }\n if (from < 0) {\n from = 0\n }\n if (to > this.length) {\n to = this.length\n }\n for (var i = 0, walker = this.head; walker !== null && i < from; i++) {\n walker = walker.next\n }\n for (; walker !== null && i < to; i++, walker = walker.next) {\n ret.push(walker.value)\n }\n return ret\n}\n\nYallist.prototype.sliceReverse = function (from, to) {\n to = to || this.length\n if (to < 0) {\n to += this.length\n }\n from = from || 0\n if (from < 0) {\n from += this.length\n }\n var ret = new Yallist()\n if (to < from || to < 0) {\n return ret\n }\n if (from < 0) {\n from = 0\n }\n if (to > this.length) {\n to = this.length\n }\n for (var i = this.length, walker = this.tail; walker !== null && i > to; i--) {\n walker = walker.prev\n }\n for (; walker !== null && i > from; i--, walker = walker.prev) {\n ret.push(walker.value)\n }\n return ret\n}\n\nYallist.prototype.splice = function (start, deleteCount /*, ...nodes */) {\n if (start > this.length) {\n start = this.length - 1\n }\n if (start < 0) {\n start = this.length + start;\n }\n\n for (var i = 0, walker = this.head; walker !== null && i < start; i++) {\n walker = walker.next\n }\n\n var ret = []\n for (var i = 0; walker && i < deleteCount; i++) {\n ret.push(walker.value)\n walker = this.removeNode(walker)\n }\n if (walker === null) {\n walker = this.tail\n }\n\n if (walker !== this.head && walker !== this.tail) {\n walker = walker.prev\n }\n\n for (var i = 2; i < arguments.length; i++) {\n walker = insert(this, walker, arguments[i])\n }\n return ret;\n}\n\nYallist.prototype.reverse = function () {\n var head = this.head\n var tail = this.tail\n for (var walker = head; walker !== null; walker = walker.prev) {\n var p = walker.prev\n walker.prev = walker.next\n walker.next = p\n }\n this.head = tail\n this.tail = head\n return this\n}\n\nfunction insert (self, node, value) {\n var inserted = node === self.head ?\n new Node(value, null, node, self) :\n new Node(value, node, node.next, self)\n\n if (inserted.next === null) {\n self.tail = inserted\n }\n if (inserted.prev === null) {\n self.head = inserted\n }\n\n self.length++\n\n return inserted\n}\n\nfunction push (self, item) {\n self.tail = new Node(item, self.tail, null, self)\n if (!self.head) {\n self.head = self.tail\n }\n self.length++\n}\n\nfunction unshift (self, item) {\n self.head = new Node(item, null, self.head, self)\n if (!self.tail) {\n self.tail = self.head\n }\n self.length++\n}\n\nfunction Node (value, prev, next, list) {\n if (!(this instanceof Node)) {\n return new Node(value, prev, next, list)\n }\n\n this.list = list\n this.value = value\n\n if (prev) {\n prev.next = this\n this.prev = prev\n } else {\n this.prev = null\n }\n\n if (next) {\n next.prev = this\n this.next = next\n } else {\n this.next = null\n }\n}\n\ntry {\n // add if support for Symbol.iterator is present\n require('./iterator.js')(Yallist)\n} catch (er) {}\n","'use strict'\n\n// A linked list to keep track of recently-used-ness\nconst Yallist = require('yallist')\n\nconst MAX = Symbol('max')\nconst LENGTH = Symbol('length')\nconst LENGTH_CALCULATOR = Symbol('lengthCalculator')\nconst ALLOW_STALE = Symbol('allowStale')\nconst MAX_AGE = Symbol('maxAge')\nconst DISPOSE = Symbol('dispose')\nconst NO_DISPOSE_ON_SET = Symbol('noDisposeOnSet')\nconst LRU_LIST = Symbol('lruList')\nconst CACHE = Symbol('cache')\nconst UPDATE_AGE_ON_GET = Symbol('updateAgeOnGet')\n\nconst naiveLength = () => 1\n\n// lruList is a yallist where the head is the youngest\n// item, and the tail is the oldest. the list contains the Hit\n// objects as the entries.\n// Each Hit object has a reference to its Yallist.Node. This\n// never changes.\n//\n// cache is a Map (or PseudoMap) that matches the keys to\n// the Yallist.Node object.\nclass LRUCache {\n constructor (options) {\n if (typeof options === 'number')\n options = { max: options }\n\n if (!options)\n options = {}\n\n if (options.max && (typeof options.max !== 'number' || options.max < 0))\n throw new TypeError('max must be a non-negative number')\n // Kind of weird to have a default max of Infinity, but oh well.\n const max = this[MAX] = options.max || Infinity\n\n const lc = options.length || naiveLength\n this[LENGTH_CALCULATOR] = (typeof lc !== 'function') ? naiveLength : lc\n this[ALLOW_STALE] = options.stale || false\n if (options.maxAge && typeof options.maxAge !== 'number')\n throw new TypeError('maxAge must be a number')\n this[MAX_AGE] = options.maxAge || 0\n this[DISPOSE] = options.dispose\n this[NO_DISPOSE_ON_SET] = options.noDisposeOnSet || false\n this[UPDATE_AGE_ON_GET] = options.updateAgeOnGet || false\n this.reset()\n }\n\n // resize the cache when the max changes.\n set max (mL) {\n if (typeof mL !== 'number' || mL < 0)\n throw new TypeError('max must be a non-negative number')\n\n this[MAX] = mL || Infinity\n trim(this)\n }\n get max () {\n return this[MAX]\n }\n\n set allowStale (allowStale) {\n this[ALLOW_STALE] = !!allowStale\n }\n get allowStale () {\n return this[ALLOW_STALE]\n }\n\n set maxAge (mA) {\n if (typeof mA !== 'number')\n throw new TypeError('maxAge must be a non-negative number')\n\n this[MAX_AGE] = mA\n trim(this)\n }\n get maxAge () {\n return this[MAX_AGE]\n }\n\n // resize the cache when the lengthCalculator changes.\n set lengthCalculator (lC) {\n if (typeof lC !== 'function')\n lC = naiveLength\n\n if (lC !== this[LENGTH_CALCULATOR]) {\n this[LENGTH_CALCULATOR] = lC\n this[LENGTH] = 0\n this[LRU_LIST].forEach(hit => {\n hit.length = this[LENGTH_CALCULATOR](hit.value, hit.key)\n this[LENGTH] += hit.length\n })\n }\n trim(this)\n }\n get lengthCalculator () { return this[LENGTH_CALCULATOR] }\n\n get length () { return this[LENGTH] }\n get itemCount () { return this[LRU_LIST].length }\n\n rforEach (fn, thisp) {\n thisp = thisp || this\n for (let walker = this[LRU_LIST].tail; walker !== null;) {\n const prev = walker.prev\n forEachStep(this, fn, walker, thisp)\n walker = prev\n }\n }\n\n forEach (fn, thisp) {\n thisp = thisp || this\n for (let walker = this[LRU_LIST].head; walker !== null;) {\n const next = walker.next\n forEachStep(this, fn, walker, thisp)\n walker = next\n }\n }\n\n keys () {\n return this[LRU_LIST].toArray().map(k => k.key)\n }\n\n values () {\n return this[LRU_LIST].toArray().map(k => k.value)\n }\n\n reset () {\n if (this[DISPOSE] &&\n this[LRU_LIST] &&\n this[LRU_LIST].length) {\n this[LRU_LIST].forEach(hit => this[DISPOSE](hit.key, hit.value))\n }\n\n this[CACHE] = new Map() // hash of items by key\n this[LRU_LIST] = new Yallist() // list of items in order of use recency\n this[LENGTH] = 0 // length of items in the list\n }\n\n dump () {\n return this[LRU_LIST].map(hit =>\n isStale(this, hit) ? false : {\n k: hit.key,\n v: hit.value,\n e: hit.now + (hit.maxAge || 0)\n }).toArray().filter(h => h)\n }\n\n dumpLru () {\n return this[LRU_LIST]\n }\n\n set (key, value, maxAge) {\n maxAge = maxAge || this[MAX_AGE]\n\n if (maxAge && typeof maxAge !== 'number')\n throw new TypeError('maxAge must be a number')\n\n const now = maxAge ? Date.now() : 0\n const len = this[LENGTH_CALCULATOR](value, key)\n\n if (this[CACHE].has(key)) {\n if (len > this[MAX]) {\n del(this, this[CACHE].get(key))\n return false\n }\n\n const node = this[CACHE].get(key)\n const item = node.value\n\n // dispose of the old one before overwriting\n // split out into 2 ifs for better coverage tracking\n if (this[DISPOSE]) {\n if (!this[NO_DISPOSE_ON_SET])\n this[DISPOSE](key, item.value)\n }\n\n item.now = now\n item.maxAge = maxAge\n item.value = value\n this[LENGTH] += len - item.length\n item.length = len\n this.get(key)\n trim(this)\n return true\n }\n\n const hit = new Entry(key, value, len, now, maxAge)\n\n // oversized objects fall out of cache automatically.\n if (hit.length > this[MAX]) {\n if (this[DISPOSE])\n this[DISPOSE](key, value)\n\n return false\n }\n\n this[LENGTH] += hit.length\n this[LRU_LIST].unshift(hit)\n this[CACHE].set(key, this[LRU_LIST].head)\n trim(this)\n return true\n }\n\n has (key) {\n if (!this[CACHE].has(key)) return false\n const hit = this[CACHE].get(key).value\n return !isStale(this, hit)\n }\n\n get (key) {\n return get(this, key, true)\n }\n\n peek (key) {\n return get(this, key, false)\n }\n\n pop () {\n const node = this[LRU_LIST].tail\n if (!node)\n return null\n\n del(this, node)\n return node.value\n }\n\n del (key) {\n del(this, this[CACHE].get(key))\n }\n\n load (arr) {\n // reset the cache\n this.reset()\n\n const now = Date.now()\n // A previous serialized cache has the most recent items first\n for (let l = arr.length - 1; l >= 0; l--) {\n const hit = arr[l]\n const expiresAt = hit.e || 0\n if (expiresAt === 0)\n // the item was created without expiration in a non aged cache\n this.set(hit.k, hit.v)\n else {\n const maxAge = expiresAt - now\n // dont add already expired items\n if (maxAge > 0) {\n this.set(hit.k, hit.v, maxAge)\n }\n }\n }\n }\n\n prune () {\n this[CACHE].forEach((value, key) => get(this, key, false))\n }\n}\n\nconst get = (self, key, doUse) => {\n const node = self[CACHE].get(key)\n if (node) {\n const hit = node.value\n if (isStale(self, hit)) {\n del(self, node)\n if (!self[ALLOW_STALE])\n return undefined\n } else {\n if (doUse) {\n if (self[UPDATE_AGE_ON_GET])\n node.value.now = Date.now()\n self[LRU_LIST].unshiftNode(node)\n }\n }\n return hit.value\n }\n}\n\nconst isStale = (self, hit) => {\n if (!hit || (!hit.maxAge && !self[MAX_AGE]))\n return false\n\n const diff = Date.now() - hit.now\n return hit.maxAge ? diff > hit.maxAge\n : self[MAX_AGE] && (diff > self[MAX_AGE])\n}\n\nconst trim = self => {\n if (self[LENGTH] > self[MAX]) {\n for (let walker = self[LRU_LIST].tail;\n self[LENGTH] > self[MAX] && walker !== null;) {\n // We know that we're about to delete this one, and also\n // what the next least recently used key will be, so just\n // go ahead and set it now.\n const prev = walker.prev\n del(self, walker)\n walker = prev\n }\n }\n}\n\nconst del = (self, node) => {\n if (node) {\n const hit = node.value\n if (self[DISPOSE])\n self[DISPOSE](hit.key, hit.value)\n\n self[LENGTH] -= hit.length\n self[CACHE].delete(hit.key)\n self[LRU_LIST].removeNode(node)\n }\n}\n\nclass Entry {\n constructor (key, value, length, now, maxAge) {\n this.key = key\n this.value = value\n this.length = length\n this.now = now\n this.maxAge = maxAge || 0\n }\n}\n\nconst forEachStep = (self, fn, node, thisp) => {\n let hit = node.value\n if (isStale(self, hit)) {\n del(self, node)\n if (!self[ALLOW_STALE])\n hit = undefined\n }\n if (hit)\n fn.call(thisp, hit.value, hit.key, self)\n}\n\nmodule.exports = LRUCache\n","// env vars from the cli are always strings, so !!ENV_VAR returns true for \"false\"\nfunction bool(value) {\n if (value == null) return false;\n return value && value !== \"false\" && value !== \"0\";\n}\n\nmodule.exports = bool(process.env[\"BABEL_8_BREAKING\"])\n ? require(\"lru-cache-BABEL_8_BREAKING-true\")\n : require(\"lru-cache-BABEL_8_BREAKING-false\");\n","// env vars from the cli are always strings, so !!ENV_VAR returns true for \"false\"\nfunction bool(value) {\n if (value == null) return false;\n return value && value !== \"false\" && value !== \"0\";\n}\n\nmodule.exports = bool(process.env[\"BABEL_8_BREAKING\"])\n ? require(\"semver-BABEL_8_BREAKING-true\")\n : require(\"semver-BABEL_8_BREAKING-false\");\n","export const unreleasedLabels = {\n safari: \"tp\",\n} as const;\n\n// Map from browserslist|@mdn/browser-compat-data browser names to @kangax/compat-table browser names\nexport const browserNameMap = {\n and_chr: \"chrome\",\n and_ff: \"firefox\",\n android: \"android\",\n chrome: \"chrome\",\n edge: \"edge\",\n firefox: \"firefox\",\n ie: \"ie\",\n ie_mob: \"ie\",\n ios_saf: \"ios\",\n node: \"node\",\n deno: \"deno\",\n op_mob: \"opera_mobile\",\n opera: \"opera\",\n safari: \"safari\",\n samsung: \"samsung\",\n} as const;\n\nexport type BrowserslistBrowserName = keyof typeof browserNameMap;\n","import semver from \"semver\";\nimport { OptionValidator } from \"@babel/helper-validator-option\";\nimport { unreleasedLabels } from \"./targets.ts\";\nimport type { Target, Targets } from \"./types.ts\";\n\nconst versionRegExp =\n /^(?:\\d+|\\d(?:\\d?[^\\d\\n\\r\\u2028\\u2029]\\d+|\\d{2,}(?:[^\\d\\n\\r\\u2028\\u2029]\\d+)?))$/;\n\nconst v = new OptionValidator(PACKAGE_JSON.name);\n\nexport function semverMin(\n first: string | undefined | null,\n second: string,\n): string {\n return first && semver.lt(first, second) ? first : second;\n}\n\n// Convert version to a semver value.\n// 2.5 -> 2.5.0; 1 -> 1.0.0;\nexport function semverify(version: number | string): string {\n if (typeof version === \"string\" && semver.valid(version)) {\n return version;\n }\n\n v.invariant(\n typeof version === \"number\" ||\n (typeof version === \"string\" && versionRegExp.test(version)),\n `'${version}' is not a valid version`,\n );\n\n version = version.toString();\n\n let pos = 0;\n let num = 0;\n while ((pos = version.indexOf(\".\", pos + 1)) > 0) {\n num++;\n }\n return version + \".0\".repeat(2 - num);\n}\n\nexport function isUnreleasedVersion(\n version: string | number,\n env: Target,\n): boolean {\n const unreleasedLabel =\n // @ts-expect-error unreleasedLabel will be guarded later\n unreleasedLabels[env];\n return (\n !!unreleasedLabel && unreleasedLabel === version.toString().toLowerCase()\n );\n}\n\nexport function getLowestUnreleased(a: string, b: string, env: Target): string {\n const unreleasedLabel:\n | (typeof unreleasedLabels)[keyof typeof unreleasedLabels]\n | undefined =\n // @ts-expect-error unreleasedLabel is undefined when env is not safari\n unreleasedLabels[env];\n if (a === unreleasedLabel) {\n return b;\n }\n if (b === unreleasedLabel) {\n return a;\n }\n return semverMin(a, b);\n}\n\nexport function getHighestUnreleased(\n a: string,\n b: string,\n env: Target,\n): string {\n return getLowestUnreleased(a, b, env) === a ? b : a;\n}\n\nexport function getLowestImplementedVersion(\n plugin: Targets,\n environment: Target,\n): string {\n const result = plugin[environment];\n // When Android support data is absent, use Chrome data as fallback\n if (!result && environment === \"android\") {\n return plugin.chrome;\n }\n return result;\n}\n","export const TargetNames = {\n node: \"node\",\n deno: \"deno\",\n chrome: \"chrome\",\n opera: \"opera\",\n edge: \"edge\",\n firefox: \"firefox\",\n safari: \"safari\",\n ie: \"ie\",\n ios: \"ios\",\n android: \"android\",\n electron: \"electron\",\n samsung: \"samsung\",\n rhino: \"rhino\",\n opera_mobile: \"opera_mobile\",\n};\n","import semver from \"semver\";\nimport { unreleasedLabels } from \"./targets.ts\";\nimport type { Targets, Target } from \"./types.ts\";\n\nexport function prettifyVersion(version: string) {\n if (typeof version !== \"string\") {\n return version;\n }\n\n const { major, minor, patch } = semver.parse(version);\n\n const parts = [major];\n\n if (minor || patch) {\n parts.push(minor);\n }\n\n if (patch) {\n parts.push(patch);\n }\n\n return parts.join(\".\");\n}\n\nexport function prettifyTargets(targets: Targets): Targets {\n return Object.keys(targets).reduce((results, target: Target) => {\n let value = targets[target];\n\n const unreleasedLabel =\n // @ts-expect-error undefined is strictly compared with string later\n unreleasedLabels[target];\n if (typeof value === \"string\" && unreleasedLabel !== value) {\n value = prettifyVersion(value);\n }\n\n results[target] = value;\n return results;\n }, {} as Targets);\n}\n","import semver from \"semver\";\nimport { prettifyVersion } from \"./pretty.ts\";\nimport {\n semverify,\n isUnreleasedVersion,\n getLowestImplementedVersion,\n} from \"./utils.ts\";\nimport type { Target, Targets } from \"./types.ts\";\n\nexport function getInclusionReasons(\n item: string,\n targetVersions: Targets,\n list: { [key: string]: Targets },\n) {\n const minVersions = list[item] || {};\n\n return (Object.keys(targetVersions) as Target[]).reduce(\n (result, env) => {\n const minVersion = getLowestImplementedVersion(minVersions, env);\n const targetVersion = targetVersions[env];\n\n if (!minVersion) {\n result[env] = prettifyVersion(targetVersion);\n } else {\n const minIsUnreleased = isUnreleasedVersion(minVersion, env);\n const targetIsUnreleased = isUnreleasedVersion(targetVersion, env);\n\n if (\n !targetIsUnreleased &&\n (minIsUnreleased ||\n semver.lt(targetVersion.toString(), semverify(minVersion)))\n ) {\n result[env] = prettifyVersion(targetVersion);\n }\n }\n\n return result;\n },\n {} as Partial>,\n );\n}\n","module.exports = require(\"./data/plugins.json\");\n","import semver from \"semver\";\n\nimport pluginsCompatData from \"@babel/compat-data/plugins\";\n\nimport type { Targets } from \"./types.ts\";\nimport {\n getLowestImplementedVersion,\n isUnreleasedVersion,\n semverify,\n} from \"./utils.ts\";\n\nexport function targetsSupported(target: Targets, support: Targets) {\n const targetEnvironments = Object.keys(target) as Array;\n\n if (targetEnvironments.length === 0) {\n return false;\n }\n\n const unsupportedEnvironments = targetEnvironments.filter(environment => {\n const lowestImplementedVersion = getLowestImplementedVersion(\n support,\n environment,\n );\n\n // Feature is not implemented in that environment\n if (!lowestImplementedVersion) {\n return true;\n }\n\n const lowestTargetedVersion = target[environment];\n\n // If targets has unreleased value as a lowest version, then don't require a plugin.\n if (isUnreleasedVersion(lowestTargetedVersion, environment)) {\n return false;\n }\n\n // Include plugin if it is supported in the unreleased environment, which wasn't specified in targets\n if (isUnreleasedVersion(lowestImplementedVersion, environment)) {\n return true;\n }\n\n if (!semver.valid(lowestTargetedVersion.toString())) {\n throw new Error(\n `Invalid version passed for target \"${environment}\": \"${lowestTargetedVersion}\". ` +\n \"Versions must be in semver format (major.minor.patch)\",\n );\n }\n\n return semver.gt(\n semverify(lowestImplementedVersion),\n lowestTargetedVersion.toString(),\n );\n });\n\n return unsupportedEnvironments.length === 0;\n}\n\nexport function isRequired(\n name: string,\n targets: Targets,\n {\n compatData = pluginsCompatData,\n includes,\n excludes,\n }: {\n compatData?: { [feature: string]: Targets };\n includes?: Set;\n excludes?: Set;\n } = {},\n) {\n if (excludes?.has(name)) return false;\n if (includes?.has(name)) return true;\n return !targetsSupported(targets, compatData[name]);\n}\n\nexport default function filterItems(\n list: { [feature: string]: Targets },\n includes: Set,\n excludes: Set,\n targets: Targets,\n defaultIncludes: Array | null,\n defaultExcludes?: Array | null,\n pluginSyntaxMap?: Map,\n) {\n const result = new Set();\n const options = { compatData: list, includes, excludes };\n\n for (const item in list) {\n if (isRequired(item, targets, options)) {\n result.add(item);\n } else if (pluginSyntaxMap) {\n const shippedProposalsSyntax = pluginSyntaxMap.get(item);\n\n if (shippedProposalsSyntax) {\n result.add(shippedProposalsSyntax);\n }\n }\n }\n\n defaultIncludes?.forEach(item => !excludes.has(item) && result.add(item));\n defaultExcludes?.forEach(item => !includes.has(item) && result.delete(item));\n\n return result;\n}\n","import browserslist from \"browserslist\";\nimport { findSuggestion } from \"@babel/helper-validator-option\";\nimport browserModulesData from \"@babel/compat-data/native-modules\";\nimport LruCache from \"lru-cache\";\n\nimport {\n semverify,\n semverMin,\n isUnreleasedVersion,\n getLowestUnreleased,\n getHighestUnreleased,\n} from \"./utils.ts\";\nimport { OptionValidator } from \"@babel/helper-validator-option\";\nimport { browserNameMap } from \"./targets.ts\";\nimport { TargetNames } from \"./options.ts\";\nimport type {\n Target,\n Targets,\n InputTargets,\n Browsers,\n BrowserslistBrowserName,\n TargetsTuple,\n} from \"./types.ts\";\n\nexport type { Target, Targets, InputTargets };\n\nexport { prettifyTargets } from \"./pretty.ts\";\nexport { getInclusionReasons } from \"./debug.ts\";\nexport { default as filterItems, isRequired } from \"./filter-items.ts\";\nexport { unreleasedLabels } from \"./targets.ts\";\nexport { TargetNames };\n\nconst ESM_SUPPORT = browserModulesData[\"es6.module\"];\n\nconst v = new OptionValidator(PACKAGE_JSON.name);\n\nfunction validateTargetNames(targets: Targets): TargetsTuple {\n const validTargets = Object.keys(TargetNames);\n for (const target of Object.keys(targets)) {\n if (!(target in TargetNames)) {\n throw new Error(\n v.formatMessage(`'${target}' is not a valid target\n- Did you mean '${findSuggestion(target, validTargets)}'?`),\n );\n }\n }\n\n return targets;\n}\n\nexport function isBrowsersQueryValid(browsers: unknown): boolean {\n return (\n typeof browsers === \"string\" ||\n (Array.isArray(browsers) && browsers.every(b => typeof b === \"string\"))\n );\n}\n\nfunction validateBrowsers(browsers: Browsers | undefined) {\n v.invariant(\n browsers === undefined || isBrowsersQueryValid(browsers),\n `'${String(browsers)}' is not a valid browserslist query`,\n );\n\n return browsers;\n}\n\nfunction getLowestVersions(browsers: Array): Targets {\n return browsers.reduce(\n (all, browser) => {\n const [browserName, browserVersion] = browser.split(\" \") as [\n BrowserslistBrowserName,\n string,\n ];\n const target = browserNameMap[browserName];\n\n if (!target) {\n return all;\n }\n\n try {\n // Browser version can return as \"10.0-10.2\"\n const splitVersion = browserVersion.split(\"-\")[0].toLowerCase();\n const isSplitUnreleased = isUnreleasedVersion(splitVersion, target);\n\n if (!all[target]) {\n all[target] = isSplitUnreleased\n ? splitVersion\n : semverify(splitVersion);\n return all;\n }\n\n const version = all[target];\n const isUnreleased = isUnreleasedVersion(version, target);\n\n if (isUnreleased && isSplitUnreleased) {\n all[target] = getLowestUnreleased(version, splitVersion, target);\n } else if (isUnreleased) {\n all[target] = semverify(splitVersion);\n } else if (!isUnreleased && !isSplitUnreleased) {\n const parsedBrowserVersion = semverify(splitVersion);\n\n all[target] = semverMin(version, parsedBrowserVersion);\n }\n } catch (_) {}\n\n return all;\n },\n {} as Record,\n );\n}\n\nfunction outputDecimalWarning(\n decimalTargets: Array<{ target: string; value: number }>,\n) {\n if (!decimalTargets.length) {\n return;\n }\n\n console.warn(\"Warning, the following targets are using a decimal version:\\n\");\n decimalTargets.forEach(({ target, value }) =>\n console.warn(` ${target}: ${value}`),\n );\n console.warn(`\nWe recommend using a string for minor/patch versions to avoid numbers like 6.10\ngetting parsed as 6.1, which can lead to unexpected behavior.\n`);\n}\n\nfunction semverifyTarget(target: Target, value: string) {\n try {\n return semverify(value);\n } catch (_) {\n throw new Error(\n v.formatMessage(\n `'${value}' is not a valid value for 'targets.${target}'.`,\n ),\n );\n }\n}\n\n// Parse `node: true` and `node: \"current\"` to version\nfunction nodeTargetParser(value: true | string) {\n const parsed =\n value === true || value === \"current\"\n ? process.versions.node\n : semverifyTarget(\"node\", value);\n return [\"node\", parsed] as const;\n}\n\nfunction defaultTargetParser(\n target: Exclude,\n value: string,\n): readonly [Exclude, string] {\n const version = isUnreleasedVersion(value, target)\n ? value.toLowerCase()\n : semverifyTarget(target, value);\n return [target, version] as const;\n}\n\nfunction generateTargets(inputTargets: InputTargets): Targets {\n const input = { ...inputTargets };\n delete input.esmodules;\n delete input.browsers;\n return input;\n}\n\nfunction resolveTargets(queries: Browsers, env?: string): Targets {\n const resolved = browserslist(queries, {\n mobileToDesktop: true,\n env,\n });\n return getLowestVersions(resolved);\n}\n\nconst targetsCache = new LruCache({ max: 64 });\n\nfunction resolveTargetsCached(queries: Browsers, env?: string): Targets {\n const cacheKey = typeof queries === \"string\" ? queries : queries.join() + env;\n let cached = targetsCache.get(cacheKey) as Targets | undefined;\n if (!cached) {\n cached = resolveTargets(queries, env);\n targetsCache.set(cacheKey, cached);\n }\n return { ...cached };\n}\n\ntype GetTargetsOption = {\n // This is not the path of the config file, but the path where start searching it from\n configPath?: string;\n // The path of the config file\n configFile?: string;\n // The env to pass to browserslist\n browserslistEnv?: string;\n // true to disable config loading\n ignoreBrowserslistConfig?: boolean;\n};\n\nexport default function getTargets(\n inputTargets: InputTargets = {},\n options: GetTargetsOption = {},\n): Targets {\n let { browsers, esmodules } = inputTargets;\n const { configPath = \".\" } = options;\n\n validateBrowsers(browsers);\n\n const input = generateTargets(inputTargets);\n let targets = validateTargetNames(input);\n\n const shouldParseBrowsers = !!browsers;\n const hasTargets = shouldParseBrowsers || Object.keys(targets).length > 0;\n const shouldSearchForConfig =\n !options.ignoreBrowserslistConfig && !hasTargets;\n\n if (!browsers && shouldSearchForConfig) {\n browsers = browserslist.loadConfig({\n config: options.configFile,\n path: configPath,\n env: options.browserslistEnv,\n });\n if (browsers == null) {\n if (process.env.BABEL_8_BREAKING) {\n // In Babel 8, if no targets are passed, we use browserslist's defaults.\n browsers = [\"defaults\"];\n } else {\n // If no targets are passed, we need to overwrite browserslist's defaults\n // so that we enable all transforms (acting like the now deprecated\n // preset-latest).\n browsers = [];\n }\n }\n }\n\n // `esmodules` as a target indicates the specific set of browsers supporting ES Modules.\n // These values OVERRIDE the `browsers` field.\n if (esmodules && (esmodules !== \"intersect\" || !browsers?.length)) {\n browsers = Object.keys(ESM_SUPPORT)\n .map(\n (browser: keyof typeof ESM_SUPPORT) =>\n `${browser} >= ${ESM_SUPPORT[browser]}`,\n )\n .join(\", \");\n esmodules = false;\n }\n\n // If current value of `browsers` is undefined (`ignoreBrowserslistConfig` should be `false`)\n // or an empty array (without any user config, use default config),\n // we don't need to call `resolveTargets` to execute the related methods of `browserslist` library.\n if (browsers?.length) {\n const queryBrowsers = resolveTargetsCached(\n browsers,\n options.browserslistEnv,\n );\n\n if (esmodules === \"intersect\") {\n for (const browser of Object.keys(queryBrowsers) as Target[]) {\n if (browser !== \"deno\" && browser !== \"ie\") {\n const esmSupportVersion =\n ESM_SUPPORT[browser === \"opera_mobile\" ? \"op_mob\" : browser];\n\n if (esmSupportVersion) {\n const version = queryBrowsers[browser];\n queryBrowsers[browser] = getHighestUnreleased(\n version,\n semverify(esmSupportVersion),\n browser,\n );\n } else {\n delete queryBrowsers[browser];\n }\n } else {\n delete queryBrowsers[browser];\n }\n }\n }\n\n targets = Object.assign(queryBrowsers, targets);\n }\n\n // Parse remaining targets\n const result: Targets = {};\n const decimalWarnings = [];\n for (const target of Object.keys(targets).sort() as Target[]) {\n const value = targets[target];\n\n // Warn when specifying minor/patch as a decimal\n if (typeof value === \"number\" && value % 1 !== 0) {\n decimalWarnings.push({ target, value });\n }\n\n const [parsedTarget, parsedValue] =\n target === \"node\"\n ? nodeTargetParser(value)\n : defaultTargetParser(target, value as string);\n\n if (parsedValue) {\n // Merge (lowest wins)\n result[parsedTarget] = parsedValue;\n }\n }\n\n outputDecimalWarning(decimalWarnings);\n\n return result;\n}\n","import type { ValidatedOptions } from \"./validation/options.ts\";\nimport getTargets, {\n type InputTargets,\n} from \"@babel/helper-compilation-targets\";\n\nimport type { Targets } from \"@babel/helper-compilation-targets\";\n\nexport function resolveBrowserslistConfigFile(\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n browserslistConfigFile: string,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n configFilePath: string,\n): string | void {\n return undefined;\n}\n\nexport function resolveTargets(\n options: ValidatedOptions,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n root: string,\n): Targets {\n const optTargets = options.targets;\n let targets: InputTargets;\n\n if (typeof optTargets === \"string\" || Array.isArray(optTargets)) {\n targets = { browsers: optTargets };\n } else if (optTargets) {\n if (\"esmodules\" in optTargets) {\n targets = { ...optTargets, esmodules: \"intersect\" };\n } else {\n // https://github.com/microsoft/TypeScript/issues/17002\n targets = optTargets as InputTargets;\n }\n }\n\n return getTargets(targets, {\n ignoreBrowserslistConfig: true,\n browserslistEnv: options.browserslistEnv,\n });\n}\n","import gensync, { type Handler } from \"gensync\";\nimport { once } from \"../gensync-utils/functional.ts\";\n\nimport { loadPlugin, loadPreset } from \"./files/index.ts\";\n\nimport { getItemDescriptor } from \"./item.ts\";\n\nimport {\n makeWeakCacheSync,\n makeStrongCacheSync,\n makeStrongCache,\n} from \"./caching.ts\";\nimport type { CacheConfigurator } from \"./caching.ts\";\n\nimport type {\n ValidatedOptions,\n PluginList,\n PluginItem,\n} from \"./validation/options.ts\";\n\nimport { resolveBrowserslistConfigFile } from \"./resolve-targets.ts\";\nimport type { PluginAPI, PresetAPI } from \"./helpers/config-api.ts\";\n\n// Represents a config object and functions to lazily load the descriptors\n// for the plugins and presets so we don't load the plugins/presets unless\n// the options object actually ends up being applicable.\nexport type OptionsAndDescriptors = {\n options: ValidatedOptions;\n plugins: () => Handler>>;\n presets: () => Handler>>;\n};\n\n// Represents a plugin or presets at a given location in a config object.\n// At this point these have been resolved to a specific object or function,\n// but have not yet been executed to call functions with options.\nexport interface UnloadedDescriptor {\n name: string | undefined;\n value: object | ((api: API, options: Options, dirname: string) => unknown);\n options: Options;\n dirname: string;\n alias: string;\n ownPass?: boolean;\n file?: {\n request: string;\n resolved: string;\n };\n}\n\nfunction isEqualDescriptor(\n a: UnloadedDescriptor,\n b: UnloadedDescriptor,\n): boolean {\n return (\n a.name === b.name &&\n a.value === b.value &&\n a.options === b.options &&\n a.dirname === b.dirname &&\n a.alias === b.alias &&\n a.ownPass === b.ownPass &&\n a.file?.request === b.file?.request &&\n a.file?.resolved === b.file?.resolved\n );\n}\n\nexport type ValidatedFile = {\n filepath: string;\n dirname: string;\n options: ValidatedOptions;\n};\n\n// eslint-disable-next-line require-yield\nfunction* handlerOf(value: T): Handler {\n return value;\n}\n\nfunction optionsWithResolvedBrowserslistConfigFile(\n options: ValidatedOptions,\n dirname: string,\n): ValidatedOptions {\n if (typeof options.browserslistConfigFile === \"string\") {\n options.browserslistConfigFile = resolveBrowserslistConfigFile(\n options.browserslistConfigFile,\n dirname,\n );\n }\n return options;\n}\n\n/**\n * Create a set of descriptors from a given options object, preserving\n * descriptor identity based on the identity of the plugin/preset arrays\n * themselves, and potentially on the identity of the plugins/presets + options.\n */\nexport function createCachedDescriptors(\n dirname: string,\n options: ValidatedOptions,\n alias: string,\n): OptionsAndDescriptors {\n const { plugins, presets, passPerPreset } = options;\n return {\n options: optionsWithResolvedBrowserslistConfigFile(options, dirname),\n plugins: plugins\n ? () =>\n // @ts-expect-error todo(flow->ts) ts complains about incorrect arguments\n // eslint-disable-next-line @typescript-eslint/no-use-before-define\n createCachedPluginDescriptors(plugins, dirname)(alias)\n : () => handlerOf([]),\n presets: presets\n ? () =>\n // @ts-expect-error todo(flow->ts) ts complains about incorrect arguments\n // eslint-disable-next-line @typescript-eslint/no-use-before-define\n createCachedPresetDescriptors(presets, dirname)(alias)(\n !!passPerPreset,\n )\n : () => handlerOf([]),\n };\n}\n\n/**\n * Create a set of descriptors from a given options object, with consistent\n * identity for the descriptors, but not caching based on any specific identity.\n */\nexport function createUncachedDescriptors(\n dirname: string,\n options: ValidatedOptions,\n alias: string,\n): OptionsAndDescriptors {\n return {\n options: optionsWithResolvedBrowserslistConfigFile(options, dirname),\n // The returned result here is cached to represent a config object in\n // memory, so we build and memoize the descriptors to ensure the same\n // values are returned consistently.\n plugins: once(() =>\n createPluginDescriptors(options.plugins || [], dirname, alias),\n ),\n presets: once(() =>\n createPresetDescriptors(\n options.presets || [],\n dirname,\n alias,\n !!options.passPerPreset,\n ),\n ),\n };\n}\n\nconst PRESET_DESCRIPTOR_CACHE = new WeakMap();\nconst createCachedPresetDescriptors = makeWeakCacheSync(\n (items: PluginList, cache: CacheConfigurator) => {\n const dirname = cache.using(dir => dir);\n return makeStrongCacheSync((alias: string) =>\n makeStrongCache(function* (\n passPerPreset: boolean,\n ): Handler>> {\n const descriptors = yield* createPresetDescriptors(\n items,\n dirname,\n alias,\n passPerPreset,\n );\n return descriptors.map(\n // Items are cached using the overall preset array identity when\n // possibly, but individual descriptors are also cached if a match\n // can be found in the previously-used descriptor lists.\n desc => loadCachedDescriptor(PRESET_DESCRIPTOR_CACHE, desc),\n );\n }),\n );\n },\n);\n\nconst PLUGIN_DESCRIPTOR_CACHE = new WeakMap();\nconst createCachedPluginDescriptors = makeWeakCacheSync(\n (items: PluginList, cache: CacheConfigurator) => {\n const dirname = cache.using(dir => dir);\n return makeStrongCache(function* (\n alias: string,\n ): Handler>> {\n const descriptors = yield* createPluginDescriptors(items, dirname, alias);\n return descriptors.map(\n // Items are cached using the overall plugin array identity when\n // possibly, but individual descriptors are also cached if a match\n // can be found in the previously-used descriptor lists.\n desc => loadCachedDescriptor(PLUGIN_DESCRIPTOR_CACHE, desc),\n );\n });\n },\n);\n\n/**\n * When no options object is given in a descriptor, this object is used\n * as a WeakMap key in order to have consistent identity.\n */\nconst DEFAULT_OPTIONS = {};\n\n/**\n * Given the cache and a descriptor, returns a matching descriptor from the\n * cache, or else returns the input descriptor and adds it to the cache for\n * next time.\n */\nfunction loadCachedDescriptor(\n cache: WeakMap<\n object | Function,\n WeakMap>>\n >,\n desc: UnloadedDescriptor,\n) {\n const { value, options = DEFAULT_OPTIONS } = desc;\n if (options === false) return desc;\n\n let cacheByOptions = cache.get(value);\n if (!cacheByOptions) {\n cacheByOptions = new WeakMap();\n cache.set(value, cacheByOptions);\n }\n\n let possibilities = cacheByOptions.get(options);\n if (!possibilities) {\n possibilities = [];\n cacheByOptions.set(options, possibilities);\n }\n\n if (!possibilities.includes(desc)) {\n const matches = possibilities.filter(possibility =>\n isEqualDescriptor(possibility, desc),\n );\n if (matches.length > 0) {\n return matches[0];\n }\n\n possibilities.push(desc);\n }\n\n return desc;\n}\n\nfunction* createPresetDescriptors(\n items: PluginList,\n dirname: string,\n alias: string,\n passPerPreset: boolean,\n): Handler>> {\n return yield* createDescriptors(\n \"preset\",\n items,\n dirname,\n alias,\n passPerPreset,\n );\n}\n\nfunction* createPluginDescriptors(\n items: PluginList,\n dirname: string,\n alias: string,\n): Handler>> {\n return yield* createDescriptors(\"plugin\", items, dirname, alias);\n}\n\nfunction* createDescriptors(\n type: \"plugin\" | \"preset\",\n items: PluginList,\n dirname: string,\n alias: string,\n ownPass?: boolean,\n): Handler>> {\n const descriptors = yield* gensync.all(\n items.map((item, index) =>\n createDescriptor(item, dirname, {\n type,\n alias: `${alias}$${index}`,\n ownPass: !!ownPass,\n }),\n ),\n );\n\n assertNoDuplicates(descriptors);\n\n return descriptors;\n}\n\n/**\n * Given a plugin/preset item, resolve it into a standard format.\n */\nexport function* createDescriptor(\n pair: PluginItem,\n dirname: string,\n {\n type,\n alias,\n ownPass,\n }: {\n type?: \"plugin\" | \"preset\";\n alias: string;\n ownPass?: boolean;\n },\n): Handler> {\n const desc = getItemDescriptor(pair);\n if (desc) {\n return desc;\n }\n\n let name;\n let options;\n // todo(flow->ts) better type annotation\n let value: any = pair;\n if (Array.isArray(value)) {\n if (value.length === 3) {\n [value, options, name] = value;\n } else {\n [value, options] = value;\n }\n }\n\n let file = undefined;\n let filepath = null;\n if (typeof value === \"string\") {\n if (typeof type !== \"string\") {\n throw new Error(\n \"To resolve a string-based item, the type of item must be given\",\n );\n }\n const resolver = type === \"plugin\" ? loadPlugin : loadPreset;\n const request = value;\n\n ({ filepath, value } = yield* resolver(value, dirname));\n\n file = {\n request,\n resolved: filepath,\n };\n }\n\n if (!value) {\n throw new Error(`Unexpected falsy value: ${String(value)}`);\n }\n\n if (typeof value === \"object\" && value.__esModule) {\n if (value.default) {\n value = value.default;\n } else {\n throw new Error(\"Must export a default export when using ES6 modules.\");\n }\n }\n\n if (typeof value !== \"object\" && typeof value !== \"function\") {\n throw new Error(\n `Unsupported format: ${typeof value}. Expected an object or a function.`,\n );\n }\n\n if (filepath !== null && typeof value === \"object\" && value) {\n // We allow object values for plugins/presets nested directly within a\n // config object, because it can be useful to define them in nested\n // configuration contexts.\n throw new Error(\n `Plugin/Preset files are not allowed to export objects, only functions. In ${filepath}`,\n );\n }\n\n return {\n name,\n alias: filepath || alias,\n value,\n options,\n dirname,\n ownPass,\n file,\n };\n}\n\nfunction assertNoDuplicates(items: Array>): void {\n const map = new Map();\n\n for (const item of items) {\n if (typeof item.value !== \"function\") continue;\n\n let nameMap = map.get(item.value);\n if (!nameMap) {\n nameMap = new Set();\n map.set(item.value, nameMap);\n }\n\n if (nameMap.has(item.name)) {\n const conflicts = items.filter(i => i.value === item.value);\n throw new Error(\n [\n `Duplicate plugin/preset detected.`,\n `If you'd like to use two separate instances of a plugin,`,\n `they need separate names, e.g.`,\n ``,\n ` plugins: [`,\n ` ['some-plugin', {}],`,\n ` ['some-plugin', {}, 'some unique name'],`,\n ` ]`,\n ``,\n `Duplicates detected are:`,\n `${JSON.stringify(conflicts, null, 2)}`,\n ].join(\"\\n\"),\n );\n }\n\n nameMap.add(item.name);\n }\n}\n","import type { Handler } from \"gensync\";\nimport type { PluginTarget, PluginOptions } from \"./validation/options.ts\";\n\nimport path from \"path\";\nimport { createDescriptor } from \"./config-descriptors.ts\";\n\nimport type { UnloadedDescriptor } from \"./config-descriptors.ts\";\n\nexport function createItemFromDescriptor(\n desc: UnloadedDescriptor,\n): ConfigItem {\n return new ConfigItem(desc);\n}\n\n/**\n * Create a config item using the same value format used in Babel's config\n * files. Items returned from this function should be cached by the caller\n * ideally, as recreating the config item will mean re-resolving the item\n * and re-evaluating the plugin/preset function.\n */\nexport function* createConfigItem(\n value:\n | PluginTarget\n | [PluginTarget, PluginOptions]\n | [PluginTarget, PluginOptions, string | void],\n {\n dirname = \".\",\n type,\n }: {\n dirname?: string;\n type?: \"preset\" | \"plugin\";\n } = {},\n): Handler> {\n const descriptor = yield* createDescriptor(value, path.resolve(dirname), {\n type,\n alias: \"programmatic item\",\n });\n\n return createItemFromDescriptor(descriptor);\n}\n\nconst CONFIG_ITEM_BRAND = Symbol.for(\"@babel/core@7 - ConfigItem\");\n\nexport function getItemDescriptor(\n item: unknown,\n): UnloadedDescriptor | void {\n if ((item as any)?.[CONFIG_ITEM_BRAND]) {\n return (item as ConfigItem)._descriptor;\n }\n\n return undefined;\n}\n\nexport type { ConfigItem };\n\n/**\n * A public representation of a plugin/preset that will _eventually_ be load.\n * Users can use this to interact with the results of a loaded Babel\n * configuration.\n *\n * Any changes to public properties of this class should be considered a\n * breaking change to Babel's API.\n */\nclass ConfigItem {\n /**\n * The private underlying descriptor that Babel actually cares about.\n * If you access this, you are a bad person.\n */\n _descriptor: UnloadedDescriptor;\n\n // TODO(Babel 9): Check if this symbol needs to be updated\n /**\n * Used to detect ConfigItem instances from other Babel instances.\n */\n [CONFIG_ITEM_BRAND] = true;\n\n /**\n * The resolved value of the item itself.\n */\n value: object | Function;\n\n /**\n * The options, if any, that were passed to the item.\n * Mutating this will lead to undefined behavior.\n *\n * \"false\" means that this item has been disabled.\n */\n options: object | void | false;\n\n /**\n * The directory that the options for this item are relative to.\n */\n dirname: string;\n\n /**\n * Get the name of the plugin, if the user gave it one.\n */\n name: string | void;\n\n /**\n * Data about the file that the item was loaded from, if Babel knows it.\n */\n file: {\n // The requested path, e.g. \"@babel/env\".\n request: string;\n // The resolved absolute path of the file.\n resolved: string;\n } | void;\n\n constructor(descriptor: UnloadedDescriptor) {\n // Make people less likely to stumble onto this if they are exploring\n // programmatically, and also make sure that if people happen to\n // pass the item through JSON.stringify, it doesn't show up.\n this._descriptor = descriptor;\n Object.defineProperty(this, \"_descriptor\", { enumerable: false });\n\n Object.defineProperty(this, CONFIG_ITEM_BRAND, { enumerable: false });\n\n this.value = this._descriptor.value;\n this.options = this._descriptor.options;\n this.dirname = this._descriptor.dirname;\n this.name = this._descriptor.name;\n this.file = this._descriptor.file\n ? {\n request: this._descriptor.file.request,\n resolved: this._descriptor.file.resolved,\n }\n : undefined;\n\n // Freeze the object to make it clear that people shouldn't expect mutating\n // this object to do anything. A new item should be created if they want\n // to change something.\n Object.freeze(this);\n }\n}\n\nObject.freeze(ConfigItem.prototype);\n","export default {\n auxiliaryComment: {\n message: \"Use `auxiliaryCommentBefore` or `auxiliaryCommentAfter`\",\n },\n blacklist: {\n message: \"Put the specific transforms you want in the `plugins` option\",\n },\n breakConfig: {\n message: \"This is not a necessary option in Babel 6\",\n },\n experimental: {\n message: \"Put the specific transforms you want in the `plugins` option\",\n },\n externalHelpers: {\n message:\n \"Use the `external-helpers` plugin instead. \" +\n \"Check out http://babeljs.io/docs/plugins/external-helpers/\",\n },\n extra: {\n message: \"\",\n },\n jsxPragma: {\n message:\n \"use the `pragma` option in the `react-jsx` plugin. \" +\n \"Check out http://babeljs.io/docs/plugins/transform-react-jsx/\",\n },\n loose: {\n message:\n \"Specify the `loose` option for the relevant plugin you are using \" +\n \"or use a preset that sets the option.\",\n },\n metadataUsedHelpers: {\n message: \"Not required anymore as this is enabled by default\",\n },\n modules: {\n message:\n \"Use the corresponding module transform plugin in the `plugins` option. \" +\n \"Check out http://babeljs.io/docs/plugins/#modules\",\n },\n nonStandard: {\n message:\n \"Use the `react-jsx` and `flow-strip-types` plugins to support JSX and Flow. \" +\n \"Also check out the react preset http://babeljs.io/docs/plugins/preset-react/\",\n },\n optional: {\n message: \"Put the specific transforms you want in the `plugins` option\",\n },\n sourceMapName: {\n message:\n \"The `sourceMapName` option has been removed because it makes more sense for the \" +\n \"tooling that calls Babel to assign `map.file` themselves.\",\n },\n stage: {\n message:\n \"Check out the corresponding stage-x presets http://babeljs.io/docs/plugins/#presets\",\n },\n whitelist: {\n message: \"Put the specific transforms you want in the `plugins` option\",\n },\n\n resolveModuleSource: {\n version: 6,\n message: \"Use `babel-plugin-module-resolver@3`'s 'resolvePath' options\",\n },\n metadata: {\n version: 6,\n message:\n \"Generated plugin metadata is always included in the output result\",\n },\n sourceMapTarget: {\n version: 6,\n message:\n \"The `sourceMapTarget` option has been removed because it makes more sense for the tooling \" +\n \"that calls Babel to assign `map.file` themselves.\",\n },\n} as { [name: string]: { version?: number; message: string } };\n","import {\n isBrowsersQueryValid,\n TargetNames,\n} from \"@babel/helper-compilation-targets\";\n\nimport type {\n ConfigFileSearch,\n BabelrcSearch,\n IgnoreList,\n IgnoreItem,\n PluginList,\n PluginItem,\n PluginTarget,\n ConfigApplicableTest,\n SourceMapsOption,\n SourceTypeOption,\n CompactOption,\n RootInputSourceMapOption,\n NestingPath,\n CallerMetadata,\n RootMode,\n TargetsListOrObject,\n AssumptionName,\n} from \"./options.ts\";\n\nimport { assumptionsNames } from \"./options.ts\";\n\nexport type { RootPath } from \"./options.ts\";\n\nexport type ValidatorSet = {\n [name: string]: Validator;\n};\n\nexport type Validator = (loc: OptionPath, value: unknown) => T;\n\nexport function msg(loc: NestingPath | GeneralPath): string {\n switch (loc.type) {\n case \"root\":\n return ``;\n case \"env\":\n return `${msg(loc.parent)}.env[\"${loc.name}\"]`;\n case \"overrides\":\n return `${msg(loc.parent)}.overrides[${loc.index}]`;\n case \"option\":\n return `${msg(loc.parent)}.${loc.name}`;\n case \"access\":\n return `${msg(loc.parent)}[${JSON.stringify(loc.name)}]`;\n default:\n // @ts-expect-error should not happen when code is type checked\n throw new Error(`Assertion failure: Unknown type ${loc.type}`);\n }\n}\n\nexport function access(loc: GeneralPath, name: string | number): AccessPath {\n return {\n type: \"access\",\n name,\n parent: loc,\n };\n}\n\nexport type OptionPath = Readonly<{\n type: \"option\";\n name: string;\n parent: NestingPath;\n}>;\ntype AccessPath = Readonly<{\n type: \"access\";\n name: string | number;\n parent: GeneralPath;\n}>;\ntype GeneralPath = OptionPath | AccessPath;\n\nexport function assertRootMode(\n loc: OptionPath,\n value: unknown,\n): RootMode | void {\n if (\n value !== undefined &&\n value !== \"root\" &&\n value !== \"upward\" &&\n value !== \"upward-optional\"\n ) {\n throw new Error(\n `${msg(loc)} must be a \"root\", \"upward\", \"upward-optional\" or undefined`,\n );\n }\n // @ts-expect-error: TS can only narrow down the type when \"strictNullCheck\" is true\n return value;\n}\n\nexport function assertSourceMaps(\n loc: OptionPath,\n value: unknown,\n): SourceMapsOption | void {\n if (\n value !== undefined &&\n typeof value !== \"boolean\" &&\n value !== \"inline\" &&\n value !== \"both\"\n ) {\n throw new Error(\n `${msg(loc)} must be a boolean, \"inline\", \"both\", or undefined`,\n );\n }\n // @ts-expect-error: TS can only narrow down the type when \"strictNullCheck\" is true\n return value;\n}\n\nexport function assertCompact(\n loc: OptionPath,\n value: unknown,\n): CompactOption | void {\n if (value !== undefined && typeof value !== \"boolean\" && value !== \"auto\") {\n throw new Error(`${msg(loc)} must be a boolean, \"auto\", or undefined`);\n }\n // @ts-expect-error: TS can only narrow down the type when \"strictNullCheck\" is true\n return value;\n}\n\nexport function assertSourceType(\n loc: OptionPath,\n value: unknown,\n): SourceTypeOption | void {\n if (\n value !== undefined &&\n value !== \"module\" &&\n value !== \"script\" &&\n value !== \"unambiguous\"\n ) {\n throw new Error(\n `${msg(loc)} must be \"module\", \"script\", \"unambiguous\", or undefined`,\n );\n }\n // @ts-expect-error: TS can only narrow down the type when \"strictNullCheck\" is true\n return value;\n}\n\nexport function assertCallerMetadata(\n loc: OptionPath,\n value: unknown,\n): CallerMetadata | undefined {\n const obj = assertObject(loc, value);\n if (obj) {\n if (typeof obj.name !== \"string\") {\n throw new Error(\n `${msg(loc)} set but does not contain \"name\" property string`,\n );\n }\n\n for (const prop of Object.keys(obj)) {\n const propLoc = access(loc, prop);\n const value = obj[prop];\n if (\n value != null &&\n typeof value !== \"boolean\" &&\n typeof value !== \"string\" &&\n typeof value !== \"number\"\n ) {\n // NOTE(logan): I'm limiting the type here so that we can guarantee that\n // the \"caller\" value will serialize to JSON nicely. We can always\n // allow more complex structures later though.\n throw new Error(\n `${msg(\n propLoc,\n )} must be null, undefined, a boolean, a string, or a number.`,\n );\n }\n }\n }\n // @ts-expect-error todo(flow->ts)\n return value;\n}\n\nexport function assertInputSourceMap(\n loc: OptionPath,\n value: unknown,\n): RootInputSourceMapOption {\n if (\n value !== undefined &&\n typeof value !== \"boolean\" &&\n (typeof value !== \"object\" || !value)\n ) {\n throw new Error(`${msg(loc)} must be a boolean, object, or undefined`);\n }\n return value as RootInputSourceMapOption;\n}\n\nexport function assertString(loc: GeneralPath, value: unknown): string | void {\n if (value !== undefined && typeof value !== \"string\") {\n throw new Error(`${msg(loc)} must be a string, or undefined`);\n }\n // @ts-expect-error: TS can only narrow down the type when \"strictNullCheck\" is true\n return value;\n}\n\nexport function assertFunction(\n loc: GeneralPath,\n value: unknown,\n): Function | void {\n if (value !== undefined && typeof value !== \"function\") {\n throw new Error(`${msg(loc)} must be a function, or undefined`);\n }\n // @ts-expect-error: TS can only narrow down the type when \"strictNullCheck\" is true\n return value;\n}\n\nexport function assertBoolean(\n loc: GeneralPath,\n value: unknown,\n): boolean | void {\n if (value !== undefined && typeof value !== \"boolean\") {\n throw new Error(`${msg(loc)} must be a boolean, or undefined`);\n }\n // @ts-expect-error: TS can only narrow down the type when \"strictNullCheck\" is true\n return value;\n}\n\nexport function assertObject(\n loc: GeneralPath,\n value: unknown,\n): { readonly [key: string]: unknown } | void {\n if (\n value !== undefined &&\n (typeof value !== \"object\" || Array.isArray(value) || !value)\n ) {\n throw new Error(`${msg(loc)} must be an object, or undefined`);\n }\n // @ts-expect-error todo(flow->ts) value is still typed as unknown, also assert function typically should not return a value\n return value;\n}\n\nexport function assertArray(\n loc: GeneralPath,\n value: Array | undefined | null,\n): ReadonlyArray | undefined | null {\n if (value != null && !Array.isArray(value)) {\n throw new Error(`${msg(loc)} must be an array, or undefined`);\n }\n return value;\n}\n\nexport function assertIgnoreList(\n loc: OptionPath,\n value: unknown[] | undefined,\n): IgnoreList | void {\n const arr = assertArray(loc, value);\n arr?.forEach((item, i) => assertIgnoreItem(access(loc, i), item));\n // @ts-expect-error todo(flow->ts)\n return arr;\n}\nfunction assertIgnoreItem(loc: GeneralPath, value: unknown): IgnoreItem {\n if (\n typeof value !== \"string\" &&\n typeof value !== \"function\" &&\n !(value instanceof RegExp)\n ) {\n throw new Error(\n `${msg(\n loc,\n )} must be an array of string/Function/RegExp values, or undefined`,\n );\n }\n return value as IgnoreItem;\n}\n\nexport function assertConfigApplicableTest(\n loc: OptionPath,\n value: unknown,\n): ConfigApplicableTest | void {\n if (value === undefined) {\n // @ts-expect-error: TS can only narrow down the type when \"strictNullCheck\" is true\n return value;\n }\n\n if (Array.isArray(value)) {\n value.forEach((item, i) => {\n if (!checkValidTest(item)) {\n throw new Error(\n `${msg(access(loc, i))} must be a string/Function/RegExp.`,\n );\n }\n });\n } else if (!checkValidTest(value)) {\n throw new Error(\n `${msg(loc)} must be a string/Function/RegExp, or an array of those`,\n );\n }\n return value as ConfigApplicableTest;\n}\n\nfunction checkValidTest(value: unknown): value is string | Function | RegExp {\n return (\n typeof value === \"string\" ||\n typeof value === \"function\" ||\n value instanceof RegExp\n );\n}\n\nexport function assertConfigFileSearch(\n loc: OptionPath,\n value: unknown,\n): ConfigFileSearch | void {\n if (\n value !== undefined &&\n typeof value !== \"boolean\" &&\n typeof value !== \"string\"\n ) {\n throw new Error(\n `${msg(loc)} must be a undefined, a boolean, a string, ` +\n `got ${JSON.stringify(value)}`,\n );\n }\n // @ts-expect-error: TS can only narrow down the type when \"strictNullCheck\" is true\n return value;\n}\n\nexport function assertBabelrcSearch(\n loc: OptionPath,\n value: unknown,\n): BabelrcSearch | void {\n if (value === undefined || typeof value === \"boolean\") {\n // @ts-expect-error: TS can only narrow down the type when \"strictNullCheck\" is true\n return value;\n }\n\n if (Array.isArray(value)) {\n value.forEach((item, i) => {\n if (!checkValidTest(item)) {\n throw new Error(\n `${msg(access(loc, i))} must be a string/Function/RegExp.`,\n );\n }\n });\n } else if (!checkValidTest(value)) {\n throw new Error(\n `${msg(loc)} must be a undefined, a boolean, a string/Function/RegExp ` +\n `or an array of those, got ${JSON.stringify(value as any)}`,\n );\n }\n return value as BabelrcSearch;\n}\n\nexport function assertPluginList(\n loc: OptionPath,\n value: unknown[] | null | undefined,\n): PluginList | void {\n const arr = assertArray(loc, value);\n if (arr) {\n // Loop instead of using `.map` in order to preserve object identity\n // for plugin array for use during config chain processing.\n arr.forEach((item, i) => assertPluginItem(access(loc, i), item));\n }\n return arr as any;\n}\nfunction assertPluginItem(loc: GeneralPath, value: unknown): PluginItem {\n if (Array.isArray(value)) {\n if (value.length === 0) {\n throw new Error(`${msg(loc)} must include an object`);\n }\n\n if (value.length > 3) {\n throw new Error(`${msg(loc)} may only be a two-tuple or three-tuple`);\n }\n\n assertPluginTarget(access(loc, 0), value[0]);\n\n if (value.length > 1) {\n const opts = value[1];\n if (\n opts !== undefined &&\n opts !== false &&\n (typeof opts !== \"object\" || Array.isArray(opts) || opts === null)\n ) {\n throw new Error(\n `${msg(access(loc, 1))} must be an object, false, or undefined`,\n );\n }\n }\n if (value.length === 3) {\n const name = value[2];\n if (name !== undefined && typeof name !== \"string\") {\n throw new Error(\n `${msg(access(loc, 2))} must be a string, or undefined`,\n );\n }\n }\n } else {\n assertPluginTarget(loc, value);\n }\n\n // @ts-expect-error todo(flow->ts)\n return value;\n}\nfunction assertPluginTarget(loc: GeneralPath, value: unknown): PluginTarget {\n if (\n (typeof value !== \"object\" || !value) &&\n typeof value !== \"string\" &&\n typeof value !== \"function\"\n ) {\n throw new Error(`${msg(loc)} must be a string, object, function`);\n }\n return value;\n}\n\nexport function assertTargets(\n loc: GeneralPath,\n value: any,\n): TargetsListOrObject {\n if (isBrowsersQueryValid(value)) return value;\n\n if (typeof value !== \"object\" || !value || Array.isArray(value)) {\n throw new Error(\n `${msg(loc)} must be a string, an array of strings or an object`,\n );\n }\n\n const browsersLoc = access(loc, \"browsers\");\n const esmodulesLoc = access(loc, \"esmodules\");\n\n assertBrowsersList(browsersLoc, value.browsers);\n assertBoolean(esmodulesLoc, value.esmodules);\n\n for (const key of Object.keys(value)) {\n const val = value[key];\n const subLoc = access(loc, key);\n\n if (key === \"esmodules\") assertBoolean(subLoc, val);\n else if (key === \"browsers\") assertBrowsersList(subLoc, val);\n else if (!Object.hasOwn(TargetNames, key)) {\n const validTargets = Object.keys(TargetNames).join(\", \");\n throw new Error(\n `${msg(\n subLoc,\n )} is not a valid target. Supported targets are ${validTargets}`,\n );\n } else assertBrowserVersion(subLoc, val);\n }\n\n return value;\n}\n\nfunction assertBrowsersList(loc: GeneralPath, value: unknown) {\n if (value !== undefined && !isBrowsersQueryValid(value)) {\n throw new Error(\n `${msg(loc)} must be undefined, a string or an array of strings`,\n );\n }\n}\n\nfunction assertBrowserVersion(loc: GeneralPath, value: unknown) {\n if (typeof value === \"number\" && Math.round(value) === value) return;\n if (typeof value === \"string\") return;\n\n throw new Error(`${msg(loc)} must be a string or an integer number`);\n}\n\nexport function assertAssumptions(\n loc: GeneralPath,\n value: { [key: string]: unknown },\n): { [name: string]: boolean } | void {\n if (value === undefined) return;\n\n if (typeof value !== \"object\" || value === null) {\n throw new Error(`${msg(loc)} must be an object or undefined.`);\n }\n\n // todo(flow->ts): remove any\n let root: any = loc;\n do {\n root = root.parent;\n } while (root.type !== \"root\");\n const inPreset = root.source === \"preset\";\n\n for (const name of Object.keys(value)) {\n const subLoc = access(loc, name);\n if (!assumptionsNames.has(name as AssumptionName)) {\n throw new Error(`${msg(subLoc)} is not a supported assumption.`);\n }\n if (typeof value[name] !== \"boolean\") {\n throw new Error(`${msg(subLoc)} must be a boolean.`);\n }\n if (inPreset && value[name] === false) {\n throw new Error(\n `${msg(subLoc)} cannot be set to 'false' inside presets.`,\n );\n }\n }\n\n // @ts-expect-error todo(flow->ts)\n return value;\n}\n","/**\n * This file uses the internal V8 Stack Trace API (https://v8.dev/docs/stack-trace-api)\n * to provide utilities to rewrite the stack trace.\n * When this API is not present, all the functions in this file become noops.\n *\n * beginHiddenCallStack(fn) and endHiddenCallStack(fn) wrap their parameter to\n * mark an hidden portion of the stack trace. The function passed to\n * beginHiddenCallStack is the first hidden function, while the function passed\n * to endHiddenCallStack is the first shown function.\n *\n * When an error is thrown _outside_ of the hidden zone, everything between\n * beginHiddenCallStack and endHiddenCallStack will not be shown.\n * If an error is thrown _inside_ the hidden zone, then the whole stack trace\n * will be visible: this is to avoid hiding real bugs.\n * However, if an error inside the hidden zone is expected, it can be marked\n * with the expectedError(error) function to keep the hidden frames hidden.\n *\n * Consider this call stack (the outer function is the bottom one):\n *\n * 1. a()\n * 2. endHiddenCallStack(b)()\n * 3. c()\n * 4. beginHiddenCallStack(d)()\n * 5. e()\n * 6. f()\n *\n * - If a() throws an error, then its shown call stack will be \"a, b, e, f\"\n * - If b() throws an error, then its shown call stack will be \"b, e, f\"\n * - If c() throws an expected error, then its shown call stack will be \"e, f\"\n * - If c() throws an unexpected error, then its shown call stack will be \"c, d, e, f\"\n * - If d() throws an expected error, then its shown call stack will be \"e, f\"\n * - If d() throws an unexpected error, then its shown call stack will be \"d, e, f\"\n * - If e() throws an error, then its shown call stack will be \"e, f\"\n *\n * Additionally, an error can inject additional \"virtual\" stack frames using the\n * injectVirtualStackFrame(error, filename) function: those are injected as a\n * replacement of the hidden frames.\n * In the example above, if we called injectVirtualStackFrame(err, \"h\") and\n * injectVirtualStackFrame(err, \"i\") on the expected error thrown by c(), its\n * shown call stack would have been \"h, i, e, f\".\n * This can be useful, for example, to report config validation errors as if they\n * were directly thrown in the config file.\n */\n\nconst ErrorToString = Function.call.bind(Error.prototype.toString);\n\nconst SUPPORTED =\n !!Error.captureStackTrace &&\n Object.getOwnPropertyDescriptor(Error, \"stackTraceLimit\")?.writable === true;\n\nconst START_HIDING = \"startHiding - secret - don't use this - v1\";\nconst STOP_HIDING = \"stopHiding - secret - don't use this - v1\";\n\ntype CallSite = NodeJS.CallSite;\n\nconst expectedErrors = new WeakSet();\nconst virtualFrames = new WeakMap();\n\nfunction CallSite(filename: string): CallSite {\n // We need to use a prototype otherwise it breaks source-map-support's internals\n return Object.create({\n isNative: () => false,\n isConstructor: () => false,\n isToplevel: () => true,\n getFileName: () => filename,\n getLineNumber: () => undefined,\n getColumnNumber: () => undefined,\n getFunctionName: () => undefined,\n getMethodName: () => undefined,\n getTypeName: () => undefined,\n toString: () => filename,\n } as CallSite);\n}\n\nexport function injectVirtualStackFrame(error: Error, filename: string) {\n if (!SUPPORTED) return;\n\n let frames = virtualFrames.get(error);\n if (!frames) virtualFrames.set(error, (frames = []));\n frames.push(CallSite(filename));\n\n return error;\n}\n\nexport function expectedError(error: Error) {\n if (!SUPPORTED) return;\n expectedErrors.add(error);\n return error;\n}\n\nexport function beginHiddenCallStack(\n fn: (...args: A) => R,\n) {\n if (!SUPPORTED) return fn;\n\n return Object.defineProperty(\n function (...args: A) {\n setupPrepareStackTrace();\n return fn(...args);\n },\n \"name\",\n { value: STOP_HIDING },\n );\n}\n\nexport function endHiddenCallStack(\n fn: (...args: A) => R,\n) {\n if (!SUPPORTED) return fn;\n\n return Object.defineProperty(\n function (...args: A) {\n return fn(...args);\n },\n \"name\",\n { value: START_HIDING },\n );\n}\n\nfunction setupPrepareStackTrace() {\n // @ts-expect-error This function is a singleton\n setupPrepareStackTrace = () => {};\n\n const { prepareStackTrace = defaultPrepareStackTrace } = Error;\n\n // We add some extra frames to Error.stackTraceLimit, so that we can\n // always show some useful frames even after deleting ours.\n // STACK_TRACE_LIMIT_DELTA should be around the maximum expected number\n // of internal frames, and not too big because capturing the stack trace\n // is slow (this is why Error.stackTraceLimit does not default to Infinity!).\n // Increase it if needed.\n // However, we only do it if the user did not explicitly set it to 0.\n const MIN_STACK_TRACE_LIMIT = 50;\n Error.stackTraceLimit &&= Math.max(\n Error.stackTraceLimit,\n MIN_STACK_TRACE_LIMIT,\n );\n\n Error.prepareStackTrace = function stackTraceRewriter(err, trace) {\n let newTrace = [];\n\n const isExpected = expectedErrors.has(err);\n let status: \"showing\" | \"hiding\" | \"unknown\" = isExpected\n ? \"hiding\"\n : \"unknown\";\n for (let i = 0; i < trace.length; i++) {\n const name = trace[i].getFunctionName();\n if (name === START_HIDING) {\n status = \"hiding\";\n } else if (name === STOP_HIDING) {\n if (status === \"hiding\") {\n status = \"showing\";\n if (virtualFrames.has(err)) {\n newTrace.unshift(...virtualFrames.get(err));\n }\n } else if (status === \"unknown\") {\n // Unexpected internal error, show the full stack trace\n newTrace = trace;\n break;\n }\n } else if (status !== \"hiding\") {\n newTrace.push(trace[i]);\n }\n }\n\n return prepareStackTrace(err, newTrace);\n };\n}\n\nfunction defaultPrepareStackTrace(err: Error, trace: CallSite[]) {\n if (trace.length === 0) return ErrorToString(err);\n return `${ErrorToString(err)}\\n at ${trace.join(\"\\n at \")}`;\n}\n","import {\n injectVirtualStackFrame,\n expectedError,\n} from \"./rewrite-stack-trace.ts\";\n\nexport default class ConfigError extends Error {\n constructor(message: string, filename?: string) {\n super(message);\n expectedError(this);\n if (filename) injectVirtualStackFrame(this, filename);\n }\n}\n","import type { InputTargets, Targets } from \"@babel/helper-compilation-targets\";\n\nimport type { ConfigItem } from \"../item.ts\";\nimport type Plugin from \"../plugin.ts\";\n\nimport removed from \"./removed.ts\";\nimport {\n msg,\n access,\n assertString,\n assertBoolean,\n assertObject,\n assertArray,\n assertCallerMetadata,\n assertInputSourceMap,\n assertIgnoreList,\n assertPluginList,\n assertConfigApplicableTest,\n assertConfigFileSearch,\n assertBabelrcSearch,\n assertFunction,\n assertRootMode,\n assertSourceMaps,\n assertCompact,\n assertSourceType,\n assertTargets,\n assertAssumptions,\n} from \"./option-assertions.ts\";\nimport type {\n ValidatorSet,\n Validator,\n OptionPath,\n} from \"./option-assertions.ts\";\nimport type { UnloadedDescriptor } from \"../config-descriptors.ts\";\nimport type { PluginAPI } from \"../helpers/config-api.ts\";\nimport type { ParserOptions } from \"@babel/parser\";\nimport type { GeneratorOptions } from \"@babel/generator\";\nimport ConfigError from \"../../errors/config-error.ts\";\n\nconst ROOT_VALIDATORS: ValidatorSet = {\n cwd: assertString as Validator,\n root: assertString as Validator,\n rootMode: assertRootMode as Validator,\n configFile: assertConfigFileSearch as Validator<\n ValidatedOptions[\"configFile\"]\n >,\n\n caller: assertCallerMetadata as Validator,\n filename: assertString as Validator,\n filenameRelative: assertString as Validator<\n ValidatedOptions[\"filenameRelative\"]\n >,\n code: assertBoolean as Validator,\n ast: assertBoolean as Validator,\n\n cloneInputAst: assertBoolean as Validator,\n\n envName: assertString as Validator,\n};\n\nconst BABELRC_VALIDATORS: ValidatorSet = {\n babelrc: assertBoolean as Validator,\n babelrcRoots: assertBabelrcSearch as Validator<\n ValidatedOptions[\"babelrcRoots\"]\n >,\n};\n\nconst NONPRESET_VALIDATORS: ValidatorSet = {\n extends: assertString as Validator,\n ignore: assertIgnoreList as Validator,\n only: assertIgnoreList as Validator,\n\n targets: assertTargets as Validator,\n browserslistConfigFile: assertConfigFileSearch as Validator<\n ValidatedOptions[\"browserslistConfigFile\"]\n >,\n browserslistEnv: assertString as Validator<\n ValidatedOptions[\"browserslistEnv\"]\n >,\n};\n\nconst COMMON_VALIDATORS: ValidatorSet = {\n // TODO: Should 'inputSourceMap' be moved to be a root-only option?\n // We may want a boolean-only version to be a common option, with the\n // object only allowed as a root config argument.\n inputSourceMap: assertInputSourceMap as Validator<\n ValidatedOptions[\"inputSourceMap\"]\n >,\n presets: assertPluginList as Validator,\n plugins: assertPluginList as Validator,\n passPerPreset: assertBoolean as Validator,\n assumptions: assertAssumptions as Validator,\n\n env: assertEnvSet as Validator,\n overrides: assertOverridesList as Validator,\n\n // We could limit these to 'overrides' blocks, but it's not clear why we'd\n // bother, when the ability to limit a config to a specific set of files\n // is a fairly general useful feature.\n test: assertConfigApplicableTest as Validator,\n include: assertConfigApplicableTest as Validator,\n exclude: assertConfigApplicableTest as Validator,\n\n retainLines: assertBoolean as Validator,\n comments: assertBoolean as Validator,\n shouldPrintComment: assertFunction as Validator<\n ValidatedOptions[\"shouldPrintComment\"]\n >,\n compact: assertCompact as Validator,\n minified: assertBoolean as Validator,\n auxiliaryCommentBefore: assertString as Validator<\n ValidatedOptions[\"auxiliaryCommentBefore\"]\n >,\n auxiliaryCommentAfter: assertString as Validator<\n ValidatedOptions[\"auxiliaryCommentAfter\"]\n >,\n sourceType: assertSourceType as Validator,\n wrapPluginVisitorMethod: assertFunction as Validator<\n ValidatedOptions[\"wrapPluginVisitorMethod\"]\n >,\n highlightCode: assertBoolean as Validator,\n sourceMaps: assertSourceMaps as Validator,\n sourceMap: assertSourceMaps as Validator,\n sourceFileName: assertString as Validator,\n sourceRoot: assertString as Validator,\n parserOpts: assertObject as Validator,\n generatorOpts: assertObject as Validator,\n};\nif (!process.env.BABEL_8_BREAKING) {\n Object.assign(COMMON_VALIDATORS, {\n getModuleId: assertFunction,\n moduleRoot: assertString,\n moduleIds: assertBoolean,\n moduleId: assertString,\n });\n}\n\nexport type InputOptions = ValidatedOptions;\n\nexport type ValidatedOptions = {\n cwd?: string;\n filename?: string;\n filenameRelative?: string;\n babelrc?: boolean;\n babelrcRoots?: BabelrcSearch;\n configFile?: ConfigFileSearch;\n root?: string;\n rootMode?: RootMode;\n code?: boolean;\n ast?: boolean;\n cloneInputAst?: boolean;\n inputSourceMap?: RootInputSourceMapOption;\n envName?: string;\n caller?: CallerMetadata;\n extends?: string;\n env?: EnvSet;\n ignore?: IgnoreList;\n only?: IgnoreList;\n overrides?: OverridesList;\n // Generally verify if a given config object should be applied to the given file.\n test?: ConfigApplicableTest;\n include?: ConfigApplicableTest;\n exclude?: ConfigApplicableTest;\n presets?: PluginList;\n plugins?: PluginList;\n passPerPreset?: boolean;\n assumptions?: {\n [name: string]: boolean;\n };\n // browserslists-related options\n targets?: TargetsListOrObject;\n browserslistConfigFile?: ConfigFileSearch;\n browserslistEnv?: string;\n // Options for @babel/generator\n retainLines?: boolean;\n comments?: boolean;\n shouldPrintComment?: Function;\n compact?: CompactOption;\n minified?: boolean;\n auxiliaryCommentBefore?: string;\n auxiliaryCommentAfter?: string;\n // Parser\n sourceType?: SourceTypeOption;\n wrapPluginVisitorMethod?: Function;\n highlightCode?: boolean;\n // Sourcemap generation options.\n sourceMaps?: SourceMapsOption;\n sourceMap?: SourceMapsOption;\n sourceFileName?: string;\n sourceRoot?: string;\n // Deprecate top level parserOpts\n parserOpts?: ParserOptions;\n // Deprecate top level generatorOpts\n generatorOpts?: GeneratorOptions;\n};\n\nexport type NormalizedOptions = {\n readonly targets: Targets;\n} & Omit;\n\nexport type CallerMetadata = {\n // If 'caller' is specified, require that the name is given for debugging\n // messages.\n name: string;\n};\nexport type EnvSet = {\n [x: string]: T;\n};\nexport type IgnoreItem =\n | string\n | RegExp\n | ((\n path: string | undefined,\n context: { dirname: string; caller: CallerMetadata; envName: string },\n ) => unknown);\nexport type IgnoreList = ReadonlyArray;\n\nexport type PluginOptions = object | void | false;\nexport type PluginTarget = string | object | Function;\nexport type PluginItem =\n | ConfigItem\n | Plugin\n | PluginTarget\n | [PluginTarget, PluginOptions]\n | [PluginTarget, PluginOptions, string | void];\nexport type PluginList = ReadonlyArray;\n\nexport type OverridesList = Array;\nexport type ConfigApplicableTest = IgnoreItem | Array;\n\nexport type ConfigFileSearch = string | boolean;\nexport type BabelrcSearch = boolean | IgnoreItem | IgnoreList;\nexport type SourceMapsOption = boolean | \"inline\" | \"both\";\nexport type SourceTypeOption = \"module\" | \"script\" | \"unambiguous\";\nexport type CompactOption = boolean | \"auto\";\nexport type RootInputSourceMapOption = object | boolean;\nexport type RootMode = \"root\" | \"upward\" | \"upward-optional\";\n\nexport type TargetsListOrObject =\n | Targets\n | InputTargets\n | InputTargets[\"browsers\"];\n\nexport type OptionsSource =\n | \"arguments\"\n | \"configfile\"\n | \"babelrcfile\"\n | \"extendsfile\"\n | \"preset\"\n | \"plugin\";\n\nexport type RootPath = Readonly<{\n type: \"root\";\n source: OptionsSource;\n}>;\n\ntype OverridesPath = Readonly<{\n type: \"overrides\";\n index: number;\n parent: RootPath;\n}>;\n\ntype EnvPath = Readonly<{\n type: \"env\";\n name: string;\n parent: RootPath | OverridesPath;\n}>;\n\nexport type NestingPath = RootPath | OverridesPath | EnvPath;\n\nconst knownAssumptions = [\n \"arrayLikeIsIterable\",\n \"constantReexports\",\n \"constantSuper\",\n \"enumerableModuleMeta\",\n \"ignoreFunctionLength\",\n \"ignoreToPrimitiveHint\",\n \"iterableIsArray\",\n \"mutableTemplateObject\",\n \"noClassCalls\",\n \"noDocumentAll\",\n \"noIncompleteNsImportDetection\",\n \"noNewArrows\",\n \"noUninitializedPrivateFieldAccess\",\n \"objectRestNoSymbols\",\n \"privateFieldsAsSymbols\",\n \"privateFieldsAsProperties\",\n \"pureGetters\",\n \"setClassMethods\",\n \"setComputedProperties\",\n \"setPublicClassFields\",\n \"setSpreadProperties\",\n \"skipForOfIteratorClosing\",\n \"superIsCallableConstructor\",\n] as const;\nexport type AssumptionName = (typeof knownAssumptions)[number];\nexport const assumptionsNames = new Set(knownAssumptions);\n\nfunction getSource(loc: NestingPath): OptionsSource {\n return loc.type === \"root\" ? loc.source : getSource(loc.parent);\n}\n\nexport function validate(\n type: OptionsSource,\n opts: any,\n filename?: string,\n): ValidatedOptions {\n try {\n return validateNested(\n {\n type: \"root\",\n source: type,\n },\n opts,\n );\n } catch (error) {\n const configError = new ConfigError(error.message, filename);\n // @ts-expect-error TODO: .code is not defined on ConfigError or Error\n if (error.code) configError.code = error.code;\n throw configError;\n }\n}\n\nfunction validateNested(loc: NestingPath, opts: { [key: string]: unknown }) {\n const type = getSource(loc);\n\n assertNoDuplicateSourcemap(opts);\n\n Object.keys(opts).forEach((key: string) => {\n const optLoc = {\n type: \"option\",\n name: key,\n parent: loc,\n } as const;\n\n if (type === \"preset\" && NONPRESET_VALIDATORS[key]) {\n throw new Error(`${msg(optLoc)} is not allowed in preset options`);\n }\n if (type !== \"arguments\" && ROOT_VALIDATORS[key]) {\n throw new Error(\n `${msg(optLoc)} is only allowed in root programmatic options`,\n );\n }\n if (\n type !== \"arguments\" &&\n type !== \"configfile\" &&\n BABELRC_VALIDATORS[key]\n ) {\n if (type === \"babelrcfile\" || type === \"extendsfile\") {\n throw new Error(\n `${msg(\n optLoc,\n )} is not allowed in .babelrc or \"extends\"ed files, only in root programmatic options, ` +\n `or babel.config.js/config file options`,\n );\n }\n\n throw new Error(\n `${msg(\n optLoc,\n )} is only allowed in root programmatic options, or babel.config.js/config file options`,\n );\n }\n\n const validator =\n COMMON_VALIDATORS[key] ||\n NONPRESET_VALIDATORS[key] ||\n BABELRC_VALIDATORS[key] ||\n ROOT_VALIDATORS[key] ||\n (throwUnknownError as Validator);\n\n validator(optLoc, opts[key]);\n });\n\n return opts;\n}\n\nfunction throwUnknownError(loc: OptionPath) {\n const key = loc.name;\n\n if (removed[key]) {\n const { message, version = 5 } = removed[key];\n\n throw new Error(\n `Using removed Babel ${version} option: ${msg(loc)} - ${message}`,\n );\n } else {\n const unknownOptErr = new Error(\n `Unknown option: ${msg(\n loc,\n )}. Check out https://babeljs.io/docs/en/babel-core/#options for more information about options.`,\n );\n // @ts-expect-error todo(flow->ts): consider creating something like BabelConfigError with code field in it\n unknownOptErr.code = \"BABEL_UNKNOWN_OPTION\";\n\n throw unknownOptErr;\n }\n}\n\nfunction assertNoDuplicateSourcemap(opts: any): void {\n if (Object.hasOwn(opts, \"sourceMap\") && Object.hasOwn(opts, \"sourceMaps\")) {\n throw new Error(\".sourceMap is an alias for .sourceMaps, cannot use both\");\n }\n}\n\nfunction assertEnvSet(\n loc: OptionPath,\n value: unknown,\n): void | EnvSet {\n if (loc.parent.type === \"env\") {\n throw new Error(`${msg(loc)} is not allowed inside of another .env block`);\n }\n const parent: RootPath | OverridesPath = loc.parent;\n\n const obj = assertObject(loc, value);\n if (obj) {\n // Validate but don't copy the .env object in order to preserve\n // object identity for use during config chain processing.\n for (const envName of Object.keys(obj)) {\n const env = assertObject(access(loc, envName), obj[envName]);\n if (!env) continue;\n\n const envLoc = {\n type: \"env\",\n name: envName,\n parent,\n } as const;\n validateNested(envLoc, env);\n }\n }\n return obj;\n}\n\nfunction assertOverridesList(\n loc: OptionPath,\n value: unknown[],\n): undefined | OverridesList {\n if (loc.parent.type === \"env\") {\n throw new Error(`${msg(loc)} is not allowed inside an .env block`);\n }\n if (loc.parent.type === \"overrides\") {\n throw new Error(`${msg(loc)} is not allowed inside an .overrides block`);\n }\n const parent: RootPath = loc.parent;\n\n const arr = assertArray(loc, value);\n if (arr) {\n for (const [index, item] of arr.entries()) {\n const objLoc = access(loc, index);\n const env = assertObject(objLoc, item);\n if (!env) throw new Error(`${msg(objLoc)} must be an object`);\n\n const overridesLoc = {\n type: \"overrides\",\n index,\n parent,\n } as const;\n validateNested(overridesLoc, env);\n }\n }\n return arr as OverridesList;\n}\n\nexport function checkNoUnwrappedItemOptionPairs(\n items: Array>,\n index: number,\n type: \"plugin\" | \"preset\",\n e: Error,\n): void {\n if (index === 0) return;\n\n const lastItem = items[index - 1];\n const thisItem = items[index];\n\n if (\n lastItem.file &&\n lastItem.options === undefined &&\n typeof thisItem.value === \"object\"\n ) {\n e.message +=\n `\\n- Maybe you meant to use\\n` +\n `\"${type}s\": [\\n [\"${lastItem.file.request}\", ${JSON.stringify(\n thisItem.value,\n undefined,\n 2,\n )}]\\n]\\n` +\n `To be a valid ${type}, its name and options should be wrapped in a pair of brackets`;\n }\n}\n","import path from \"path\";\n\nconst sep = `\\\\${path.sep}`;\nconst endSep = `(?:${sep}|$)`;\n\nconst substitution = `[^${sep}]+`;\n\nconst starPat = `(?:${substitution}${sep})`;\nconst starPatLast = `(?:${substitution}${endSep})`;\n\nconst starStarPat = `${starPat}*?`;\nconst starStarPatLast = `${starPat}*?${starPatLast}?`;\n\nfunction escapeRegExp(string: string) {\n return string.replace(/[|\\\\{}()[\\]^$+*?.]/g, \"\\\\$&\");\n}\n\n/**\n * Implement basic pattern matching that will allow users to do the simple\n * tests with * and **. If users want full complex pattern matching, then can\n * always use regex matching, or function validation.\n */\nexport default function pathToPattern(\n pattern: string,\n dirname: string,\n): RegExp {\n const parts = path.resolve(dirname, pattern).split(path.sep);\n\n return new RegExp(\n [\n \"^\",\n ...parts.map((part, i) => {\n const last = i === parts.length - 1;\n\n // ** matches 0 or more path parts.\n if (part === \"**\") return last ? starStarPatLast : starStarPat;\n\n // * matches 1 path part.\n if (part === \"*\") return last ? starPatLast : starPat;\n\n // *.ext matches a wildcard with an extension.\n if (part.indexOf(\"*.\") === 0) {\n return (\n substitution + escapeRegExp(part.slice(1)) + (last ? endSep : sep)\n );\n }\n\n // Otherwise match the pattern text.\n return escapeRegExp(part) + (last ? endSep : sep);\n }),\n ].join(\"\"),\n );\n}\n","import gensync from \"gensync\";\n\nimport type { Handler } from \"gensync\";\n\nimport type {\n OptionsAndDescriptors,\n UnloadedDescriptor,\n} from \"./config-descriptors.ts\";\n\n// todo: Use flow enums when @babel/transform-flow-types supports it\nexport const ChainFormatter = {\n Programmatic: 0,\n Config: 1,\n};\n\ntype PrintableConfig = {\n content: OptionsAndDescriptors;\n type: (typeof ChainFormatter)[keyof typeof ChainFormatter];\n callerName: string | undefined | null;\n filepath: string | undefined | null;\n index: number | undefined | null;\n envName: string | undefined | null;\n};\n\nconst Formatter = {\n title(\n type: (typeof ChainFormatter)[keyof typeof ChainFormatter],\n callerName?: string | null,\n filepath?: string | null,\n ): string {\n let title = \"\";\n if (type === ChainFormatter.Programmatic) {\n title = \"programmatic options\";\n if (callerName) {\n title += \" from \" + callerName;\n }\n } else {\n title = \"config \" + filepath;\n }\n return title;\n },\n loc(index?: number | null, envName?: string | null): string {\n let loc = \"\";\n if (index != null) {\n loc += `.overrides[${index}]`;\n }\n if (envName != null) {\n loc += `.env[\"${envName}\"]`;\n }\n return loc;\n },\n\n *optionsAndDescriptors(opt: OptionsAndDescriptors) {\n const content = { ...opt.options };\n // overrides and env will be printed as separated config items\n delete content.overrides;\n delete content.env;\n // resolve to descriptors\n const pluginDescriptors = [...(yield* opt.plugins())];\n if (pluginDescriptors.length) {\n content.plugins = pluginDescriptors.map(d => descriptorToConfig(d));\n }\n const presetDescriptors = [...(yield* opt.presets())];\n if (presetDescriptors.length) {\n content.presets = [...presetDescriptors].map(d => descriptorToConfig(d));\n }\n return JSON.stringify(content, undefined, 2);\n },\n};\n\nfunction descriptorToConfig(\n d: UnloadedDescriptor,\n): object | string | [string, unknown] | [string, unknown, string] {\n let name: object | string = d.file?.request;\n if (name == null) {\n if (typeof d.value === \"object\") {\n name = d.value;\n } else if (typeof d.value === \"function\") {\n // If the unloaded descriptor is a function, i.e. `plugins: [ require(\"my-plugin\") ]`,\n // we print the first 50 characters of the function source code and hopefully we can see\n // `name: 'my-plugin'` in the source\n name = `[Function: ${d.value.toString().slice(0, 50)} ... ]`;\n }\n }\n if (name == null) {\n name = \"[Unknown]\";\n }\n if (d.options === undefined) {\n return name;\n } else if (d.name == null) {\n return [name, d.options];\n } else {\n return [name, d.options, d.name];\n }\n}\n\nexport class ConfigPrinter {\n _stack: Array = [];\n configure(\n enabled: boolean,\n type: (typeof ChainFormatter)[keyof typeof ChainFormatter],\n {\n callerName,\n filepath,\n }: {\n callerName?: string;\n filepath?: string;\n },\n ) {\n if (!enabled) return () => {};\n return (\n content: OptionsAndDescriptors,\n index?: number | null,\n envName?: string | null,\n ) => {\n this._stack.push({\n type,\n callerName,\n filepath,\n content,\n index,\n envName,\n });\n };\n }\n static *format(config: PrintableConfig): Handler {\n let title = Formatter.title(\n config.type,\n config.callerName,\n config.filepath,\n );\n const loc = Formatter.loc(config.index, config.envName);\n if (loc) title += ` ${loc}`;\n const content = yield* Formatter.optionsAndDescriptors(config.content);\n return `${title}\\n${content}`;\n }\n\n *output(): Handler {\n if (this._stack.length === 0) return \"\";\n const configs = yield* gensync.all(\n this._stack.map(s => ConfigPrinter.format(s)),\n );\n return configs.join(\"\\n\\n\");\n }\n}\n","/* eslint-disable @typescript-eslint/no-use-before-define */\n\nimport path from \"path\";\nimport buildDebug from \"debug\";\nimport type { Handler } from \"gensync\";\nimport { validate } from \"./validation/options.ts\";\nimport type {\n ValidatedOptions,\n IgnoreList,\n ConfigApplicableTest,\n BabelrcSearch,\n CallerMetadata,\n IgnoreItem,\n} from \"./validation/options.ts\";\nimport pathPatternToRegex from \"./pattern-to-regex.ts\";\nimport { ConfigPrinter, ChainFormatter } from \"./printer.ts\";\nimport type { ReadonlyDeepArray } from \"./helpers/deep-array.ts\";\n\nimport { endHiddenCallStack } from \"../errors/rewrite-stack-trace.ts\";\nimport ConfigError from \"../errors/config-error.ts\";\nimport type { PluginAPI, PresetAPI } from \"./helpers/config-api.ts\";\n\nconst debug = buildDebug(\"babel:config:config-chain\");\n\nimport {\n findPackageData,\n findRelativeConfig,\n findRootConfig,\n loadConfig,\n} from \"./files/index.ts\";\nimport type { ConfigFile, IgnoreFile, FilePackageData } from \"./files/index.ts\";\n\nimport { makeWeakCacheSync, makeStrongCacheSync } from \"./caching.ts\";\n\nimport {\n createCachedDescriptors,\n createUncachedDescriptors,\n} from \"./config-descriptors.ts\";\nimport type {\n UnloadedDescriptor,\n OptionsAndDescriptors,\n ValidatedFile,\n} from \"./config-descriptors.ts\";\n\nexport type ConfigChain = {\n plugins: Array>;\n presets: Array>;\n options: Array;\n files: Set;\n};\n\nexport type PresetInstance = {\n options: ValidatedOptions;\n alias: string;\n dirname: string;\n externalDependencies: ReadonlyDeepArray;\n};\n\nexport type ConfigContext = {\n filename: string | undefined;\n cwd: string;\n root: string;\n envName: string;\n caller: CallerMetadata | undefined;\n showConfig: boolean;\n};\n\n/**\n * Build a config chain for a given preset.\n */\nexport function* buildPresetChain(\n arg: PresetInstance,\n context: any,\n): Handler {\n const chain = yield* buildPresetChainWalker(arg, context);\n if (!chain) return null;\n\n return {\n plugins: dedupDescriptors(chain.plugins),\n presets: dedupDescriptors(chain.presets),\n options: chain.options.map(o => normalizeOptions(o)),\n files: new Set(),\n };\n}\n\nexport const buildPresetChainWalker = makeChainWalker({\n root: preset => loadPresetDescriptors(preset),\n env: (preset, envName) => loadPresetEnvDescriptors(preset)(envName),\n overrides: (preset, index) => loadPresetOverridesDescriptors(preset)(index),\n overridesEnv: (preset, index, envName) =>\n loadPresetOverridesEnvDescriptors(preset)(index)(envName),\n createLogger: () => () => {}, // Currently we don't support logging how preset is expanded\n});\nconst loadPresetDescriptors = makeWeakCacheSync((preset: PresetInstance) =>\n buildRootDescriptors(preset, preset.alias, createUncachedDescriptors),\n);\nconst loadPresetEnvDescriptors = makeWeakCacheSync((preset: PresetInstance) =>\n makeStrongCacheSync((envName: string) =>\n buildEnvDescriptors(\n preset,\n preset.alias,\n createUncachedDescriptors,\n envName,\n ),\n ),\n);\nconst loadPresetOverridesDescriptors = makeWeakCacheSync(\n (preset: PresetInstance) =>\n makeStrongCacheSync((index: number) =>\n buildOverrideDescriptors(\n preset,\n preset.alias,\n createUncachedDescriptors,\n index,\n ),\n ),\n);\nconst loadPresetOverridesEnvDescriptors = makeWeakCacheSync(\n (preset: PresetInstance) =>\n makeStrongCacheSync((index: number) =>\n makeStrongCacheSync((envName: string) =>\n buildOverrideEnvDescriptors(\n preset,\n preset.alias,\n createUncachedDescriptors,\n index,\n envName,\n ),\n ),\n ),\n);\n\nexport type FileHandling = \"transpile\" | \"ignored\" | \"unsupported\";\nexport type RootConfigChain = ConfigChain & {\n babelrc: ConfigFile | void;\n config: ConfigFile | void;\n ignore: IgnoreFile | void;\n fileHandling: FileHandling;\n files: Set;\n};\n\n/**\n * Build a config chain for Babel's full root configuration.\n */\nexport function* buildRootChain(\n opts: ValidatedOptions,\n context: ConfigContext,\n): Handler {\n let configReport, babelRcReport;\n const programmaticLogger = new ConfigPrinter();\n const programmaticChain = yield* loadProgrammaticChain(\n {\n options: opts,\n dirname: context.cwd,\n },\n context,\n undefined,\n programmaticLogger,\n );\n if (!programmaticChain) return null;\n const programmaticReport = yield* programmaticLogger.output();\n\n let configFile;\n if (typeof opts.configFile === \"string\") {\n configFile = yield* loadConfig(\n opts.configFile,\n context.cwd,\n context.envName,\n context.caller,\n );\n } else if (opts.configFile !== false) {\n configFile = yield* findRootConfig(\n context.root,\n context.envName,\n context.caller,\n );\n }\n\n let { babelrc, babelrcRoots } = opts;\n let babelrcRootsDirectory = context.cwd;\n\n const configFileChain = emptyChain();\n const configFileLogger = new ConfigPrinter();\n if (configFile) {\n const validatedFile = validateConfigFile(configFile);\n const result = yield* loadFileChain(\n validatedFile,\n context,\n undefined,\n configFileLogger,\n );\n if (!result) return null;\n configReport = yield* configFileLogger.output();\n\n // Allow config files to toggle `.babelrc` resolution on and off and\n // specify where the roots are.\n if (babelrc === undefined) {\n babelrc = validatedFile.options.babelrc;\n }\n if (babelrcRoots === undefined) {\n babelrcRootsDirectory = validatedFile.dirname;\n babelrcRoots = validatedFile.options.babelrcRoots;\n }\n\n mergeChain(configFileChain, result);\n }\n\n let ignoreFile, babelrcFile;\n let isIgnored = false;\n const fileChain = emptyChain();\n // resolve all .babelrc files\n if (\n (babelrc === true || babelrc === undefined) &&\n typeof context.filename === \"string\"\n ) {\n const pkgData = yield* findPackageData(context.filename);\n\n if (\n pkgData &&\n babelrcLoadEnabled(context, pkgData, babelrcRoots, babelrcRootsDirectory)\n ) {\n ({ ignore: ignoreFile, config: babelrcFile } = yield* findRelativeConfig(\n pkgData,\n context.envName,\n context.caller,\n ));\n\n if (ignoreFile) {\n fileChain.files.add(ignoreFile.filepath);\n }\n\n if (\n ignoreFile &&\n shouldIgnore(context, ignoreFile.ignore, null, ignoreFile.dirname)\n ) {\n isIgnored = true;\n }\n\n if (babelrcFile && !isIgnored) {\n const validatedFile = validateBabelrcFile(babelrcFile);\n const babelrcLogger = new ConfigPrinter();\n const result = yield* loadFileChain(\n validatedFile,\n context,\n undefined,\n babelrcLogger,\n );\n if (!result) {\n isIgnored = true;\n } else {\n babelRcReport = yield* babelrcLogger.output();\n mergeChain(fileChain, result);\n }\n }\n\n if (babelrcFile && isIgnored) {\n fileChain.files.add(babelrcFile.filepath);\n }\n }\n }\n\n if (context.showConfig) {\n console.log(\n `Babel configs on \"${context.filename}\" (ascending priority):\\n` +\n // print config by the order of ascending priority\n [configReport, babelRcReport, programmaticReport]\n .filter(x => !!x)\n .join(\"\\n\\n\") +\n \"\\n-----End Babel configs-----\",\n );\n }\n // Insert file chain in front so programmatic options have priority\n // over configuration file chain items.\n const chain = mergeChain(\n mergeChain(mergeChain(emptyChain(), configFileChain), fileChain),\n programmaticChain,\n );\n\n return {\n plugins: isIgnored ? [] : dedupDescriptors(chain.plugins),\n presets: isIgnored ? [] : dedupDescriptors(chain.presets),\n options: isIgnored ? [] : chain.options.map(o => normalizeOptions(o)),\n fileHandling: isIgnored ? \"ignored\" : \"transpile\",\n ignore: ignoreFile || undefined,\n babelrc: babelrcFile || undefined,\n config: configFile || undefined,\n files: chain.files,\n };\n}\n\nfunction babelrcLoadEnabled(\n context: ConfigContext,\n pkgData: FilePackageData,\n babelrcRoots: BabelrcSearch | undefined,\n babelrcRootsDirectory: string,\n): boolean {\n if (typeof babelrcRoots === \"boolean\") return babelrcRoots;\n\n const absoluteRoot = context.root;\n\n // Fast path to avoid having to match patterns if the babelrc is just\n // loading in the standard root directory.\n if (babelrcRoots === undefined) {\n return pkgData.directories.includes(absoluteRoot);\n }\n\n let babelrcPatterns = babelrcRoots;\n if (!Array.isArray(babelrcPatterns)) {\n babelrcPatterns = [babelrcPatterns as IgnoreItem];\n }\n babelrcPatterns = babelrcPatterns.map(pat => {\n return typeof pat === \"string\"\n ? path.resolve(babelrcRootsDirectory, pat)\n : pat;\n });\n\n // Fast path to avoid having to match patterns if the babelrc is just\n // loading in the standard root directory.\n if (babelrcPatterns.length === 1 && babelrcPatterns[0] === absoluteRoot) {\n return pkgData.directories.includes(absoluteRoot);\n }\n\n return babelrcPatterns.some(pat => {\n if (typeof pat === \"string\") {\n pat = pathPatternToRegex(pat, babelrcRootsDirectory);\n }\n\n return pkgData.directories.some(directory => {\n return matchPattern(pat, babelrcRootsDirectory, directory, context);\n });\n });\n}\n\nconst validateConfigFile = makeWeakCacheSync(\n (file: ConfigFile): ValidatedFile => ({\n filepath: file.filepath,\n dirname: file.dirname,\n options: validate(\"configfile\", file.options, file.filepath),\n }),\n);\n\nconst validateBabelrcFile = makeWeakCacheSync(\n (file: ConfigFile): ValidatedFile => ({\n filepath: file.filepath,\n dirname: file.dirname,\n options: validate(\"babelrcfile\", file.options, file.filepath),\n }),\n);\n\nconst validateExtendFile = makeWeakCacheSync(\n (file: ConfigFile): ValidatedFile => ({\n filepath: file.filepath,\n dirname: file.dirname,\n options: validate(\"extendsfile\", file.options, file.filepath),\n }),\n);\n\n/**\n * Build a config chain for just the programmatic options passed into Babel.\n */\nconst loadProgrammaticChain = makeChainWalker({\n root: input => buildRootDescriptors(input, \"base\", createCachedDescriptors),\n env: (input, envName) =>\n buildEnvDescriptors(input, \"base\", createCachedDescriptors, envName),\n overrides: (input, index) =>\n buildOverrideDescriptors(input, \"base\", createCachedDescriptors, index),\n overridesEnv: (input, index, envName) =>\n buildOverrideEnvDescriptors(\n input,\n \"base\",\n createCachedDescriptors,\n index,\n envName,\n ),\n createLogger: (input, context, baseLogger) =>\n buildProgrammaticLogger(input, context, baseLogger),\n});\n\n/**\n * Build a config chain for a given file.\n */\nconst loadFileChainWalker = makeChainWalker({\n root: file => loadFileDescriptors(file),\n env: (file, envName) => loadFileEnvDescriptors(file)(envName),\n overrides: (file, index) => loadFileOverridesDescriptors(file)(index),\n overridesEnv: (file, index, envName) =>\n loadFileOverridesEnvDescriptors(file)(index)(envName),\n createLogger: (file, context, baseLogger) =>\n buildFileLogger(file.filepath, context, baseLogger),\n});\n\nfunction* loadFileChain(\n input: ValidatedFile,\n context: ConfigContext,\n files: Set,\n baseLogger: ConfigPrinter,\n) {\n const chain = yield* loadFileChainWalker(input, context, files, baseLogger);\n chain?.files.add(input.filepath);\n\n return chain;\n}\n\nconst loadFileDescriptors = makeWeakCacheSync((file: ValidatedFile) =>\n buildRootDescriptors(file, file.filepath, createUncachedDescriptors),\n);\nconst loadFileEnvDescriptors = makeWeakCacheSync((file: ValidatedFile) =>\n makeStrongCacheSync((envName: string) =>\n buildEnvDescriptors(\n file,\n file.filepath,\n createUncachedDescriptors,\n envName,\n ),\n ),\n);\nconst loadFileOverridesDescriptors = makeWeakCacheSync((file: ValidatedFile) =>\n makeStrongCacheSync((index: number) =>\n buildOverrideDescriptors(\n file,\n file.filepath,\n createUncachedDescriptors,\n index,\n ),\n ),\n);\nconst loadFileOverridesEnvDescriptors = makeWeakCacheSync(\n (file: ValidatedFile) =>\n makeStrongCacheSync((index: number) =>\n makeStrongCacheSync((envName: string) =>\n buildOverrideEnvDescriptors(\n file,\n file.filepath,\n createUncachedDescriptors,\n index,\n envName,\n ),\n ),\n ),\n);\n\nfunction buildFileLogger(\n filepath: string,\n context: ConfigContext,\n baseLogger: ConfigPrinter | void,\n) {\n if (!baseLogger) {\n return () => {};\n }\n return baseLogger.configure(context.showConfig, ChainFormatter.Config, {\n filepath,\n });\n}\n\nfunction buildRootDescriptors(\n { dirname, options }: Partial,\n alias: string,\n descriptors: (\n dirname: string,\n options: ValidatedOptions,\n alias: string,\n ) => OptionsAndDescriptors,\n) {\n return descriptors(dirname, options, alias);\n}\n\nfunction buildProgrammaticLogger(\n _: unknown,\n context: ConfigContext,\n baseLogger: ConfigPrinter | void,\n) {\n if (!baseLogger) {\n return () => {};\n }\n return baseLogger.configure(context.showConfig, ChainFormatter.Programmatic, {\n callerName: context.caller?.name,\n });\n}\n\nfunction buildEnvDescriptors(\n { dirname, options }: Partial,\n alias: string,\n descriptors: (\n dirname: string,\n options: ValidatedOptions,\n alias: string,\n ) => OptionsAndDescriptors,\n envName: string,\n) {\n const opts = options.env?.[envName];\n return opts ? descriptors(dirname, opts, `${alias}.env[\"${envName}\"]`) : null;\n}\n\nfunction buildOverrideDescriptors(\n { dirname, options }: Partial,\n alias: string,\n descriptors: (\n dirname: string,\n options: ValidatedOptions,\n alias: string,\n ) => OptionsAndDescriptors,\n index: number,\n) {\n const opts = options.overrides?.[index];\n if (!opts) throw new Error(\"Assertion failure - missing override\");\n\n return descriptors(dirname, opts, `${alias}.overrides[${index}]`);\n}\n\nfunction buildOverrideEnvDescriptors(\n { dirname, options }: Partial,\n alias: string,\n descriptors: (\n dirname: string,\n options: ValidatedOptions,\n alias: string,\n ) => OptionsAndDescriptors,\n index: number,\n envName: string,\n) {\n const override = options.overrides?.[index];\n if (!override) throw new Error(\"Assertion failure - missing override\");\n\n const opts = override.env?.[envName];\n return opts\n ? descriptors(\n dirname,\n opts,\n `${alias}.overrides[${index}].env[\"${envName}\"]`,\n )\n : null;\n}\n\nfunction makeChainWalker<\n ArgT extends {\n options: ValidatedOptions;\n dirname: string;\n filepath?: string;\n },\n>({\n root,\n env,\n overrides,\n overridesEnv,\n createLogger,\n}: {\n root: (configEntry: ArgT) => OptionsAndDescriptors;\n env: (configEntry: ArgT, env: string) => OptionsAndDescriptors | null;\n overrides: (configEntry: ArgT, index: number) => OptionsAndDescriptors;\n overridesEnv: (\n configEntry: ArgT,\n index: number,\n env: string,\n ) => OptionsAndDescriptors | null;\n createLogger: (\n configEntry: ArgT,\n context: ConfigContext,\n printer: ConfigPrinter | void,\n ) => (\n opts: OptionsAndDescriptors,\n index?: number | null,\n env?: string | null,\n ) => void;\n}): (\n configEntry: ArgT,\n context: ConfigContext,\n files?: Set,\n baseLogger?: ConfigPrinter,\n) => Handler {\n return function* chainWalker(input, context, files = new Set(), baseLogger) {\n const { dirname } = input;\n\n const flattenedConfigs: Array<{\n config: OptionsAndDescriptors;\n index: number | undefined | null;\n envName: string | undefined | null;\n }> = [];\n\n const rootOpts = root(input);\n if (configIsApplicable(rootOpts, dirname, context, input.filepath)) {\n flattenedConfigs.push({\n config: rootOpts,\n envName: undefined,\n index: undefined,\n });\n\n const envOpts = env(input, context.envName);\n if (\n envOpts &&\n configIsApplicable(envOpts, dirname, context, input.filepath)\n ) {\n flattenedConfigs.push({\n config: envOpts,\n envName: context.envName,\n index: undefined,\n });\n }\n\n (rootOpts.options.overrides || []).forEach((_, index) => {\n const overrideOps = overrides(input, index);\n if (configIsApplicable(overrideOps, dirname, context, input.filepath)) {\n flattenedConfigs.push({\n config: overrideOps,\n index,\n envName: undefined,\n });\n\n const overrideEnvOpts = overridesEnv(input, index, context.envName);\n if (\n overrideEnvOpts &&\n configIsApplicable(\n overrideEnvOpts,\n dirname,\n context,\n input.filepath,\n )\n ) {\n flattenedConfigs.push({\n config: overrideEnvOpts,\n index,\n envName: context.envName,\n });\n }\n }\n });\n }\n\n // Process 'ignore' and 'only' before 'extends' items are processed so\n // that we don't do extra work loading extended configs if a file is\n // ignored.\n if (\n flattenedConfigs.some(\n ({\n config: {\n options: { ignore, only },\n },\n }) => shouldIgnore(context, ignore, only, dirname),\n )\n ) {\n return null;\n }\n\n const chain = emptyChain();\n const logger = createLogger(input, context, baseLogger);\n\n for (const { config, index, envName } of flattenedConfigs) {\n if (\n !(yield* mergeExtendsChain(\n chain,\n config.options,\n dirname,\n context,\n files,\n baseLogger,\n ))\n ) {\n return null;\n }\n\n logger(config, index, envName);\n yield* mergeChainOpts(chain, config);\n }\n return chain;\n };\n}\n\nfunction* mergeExtendsChain(\n chain: ConfigChain,\n opts: ValidatedOptions,\n dirname: string,\n context: ConfigContext,\n files: Set,\n baseLogger?: ConfigPrinter,\n): Handler {\n if (opts.extends === undefined) return true;\n\n const file = yield* loadConfig(\n opts.extends,\n dirname,\n context.envName,\n context.caller,\n );\n\n if (files.has(file)) {\n throw new Error(\n `Configuration cycle detected loading ${file.filepath}.\\n` +\n `File already loaded following the config chain:\\n` +\n Array.from(files, file => ` - ${file.filepath}`).join(\"\\n\"),\n );\n }\n\n files.add(file);\n const fileChain = yield* loadFileChain(\n validateExtendFile(file),\n context,\n files,\n baseLogger,\n );\n files.delete(file);\n\n if (!fileChain) return false;\n\n mergeChain(chain, fileChain);\n\n return true;\n}\n\nfunction mergeChain(target: ConfigChain, source: ConfigChain): ConfigChain {\n target.options.push(...source.options);\n target.plugins.push(...source.plugins);\n target.presets.push(...source.presets);\n for (const file of source.files) {\n target.files.add(file);\n }\n\n return target;\n}\n\nfunction* mergeChainOpts(\n target: ConfigChain,\n { options, plugins, presets }: OptionsAndDescriptors,\n): Handler {\n target.options.push(options);\n target.plugins.push(...(yield* plugins()));\n target.presets.push(...(yield* presets()));\n\n return target;\n}\n\nfunction emptyChain(): ConfigChain {\n return {\n options: [],\n presets: [],\n plugins: [],\n files: new Set(),\n };\n}\n\nfunction normalizeOptions(opts: ValidatedOptions): ValidatedOptions {\n const options = {\n ...opts,\n };\n delete options.extends;\n delete options.env;\n delete options.overrides;\n delete options.plugins;\n delete options.presets;\n delete options.passPerPreset;\n delete options.ignore;\n delete options.only;\n delete options.test;\n delete options.include;\n delete options.exclude;\n\n // \"sourceMap\" is just aliased to sourceMap, so copy it over as\n // we merge the options together.\n if (Object.hasOwn(options, \"sourceMap\")) {\n options.sourceMaps = options.sourceMap;\n delete options.sourceMap;\n }\n return options;\n}\n\nfunction dedupDescriptors(\n items: Array>,\n): Array> {\n const map: Map<\n Function,\n Map }>\n > = new Map();\n\n const descriptors = [];\n\n for (const item of items) {\n if (typeof item.value === \"function\") {\n const fnKey = item.value;\n let nameMap = map.get(fnKey);\n if (!nameMap) {\n nameMap = new Map();\n map.set(fnKey, nameMap);\n }\n let desc = nameMap.get(item.name);\n if (!desc) {\n desc = { value: item };\n descriptors.push(desc);\n\n // Treat passPerPreset presets as unique, skipping them\n // in the merge processing steps.\n if (!item.ownPass) nameMap.set(item.name, desc);\n } else {\n desc.value = item;\n }\n } else {\n descriptors.push({ value: item });\n }\n }\n\n return descriptors.reduce((acc, desc) => {\n acc.push(desc.value);\n return acc;\n }, []);\n}\n\nfunction configIsApplicable(\n { options }: OptionsAndDescriptors,\n dirname: string,\n context: ConfigContext,\n configName: string,\n): boolean {\n return (\n (options.test === undefined ||\n configFieldIsApplicable(context, options.test, dirname, configName)) &&\n (options.include === undefined ||\n configFieldIsApplicable(context, options.include, dirname, configName)) &&\n (options.exclude === undefined ||\n !configFieldIsApplicable(context, options.exclude, dirname, configName))\n );\n}\n\nfunction configFieldIsApplicable(\n context: ConfigContext,\n test: ConfigApplicableTest,\n dirname: string,\n configName: string,\n): boolean {\n const patterns = Array.isArray(test) ? test : [test];\n\n return matchesPatterns(context, patterns, dirname, configName);\n}\n\n/**\n * Print the ignoreList-values in a more helpful way than the default.\n */\nfunction ignoreListReplacer(\n _key: string,\n value: IgnoreList | IgnoreItem,\n): IgnoreList | IgnoreItem | string {\n if (value instanceof RegExp) {\n return String(value);\n }\n\n return value;\n}\n\n/**\n * Tests if a filename should be ignored based on \"ignore\" and \"only\" options.\n */\nfunction shouldIgnore(\n context: ConfigContext,\n ignore: IgnoreList | undefined | null,\n only: IgnoreList | undefined | null,\n dirname: string,\n): boolean {\n if (ignore && matchesPatterns(context, ignore, dirname)) {\n const message = `No config is applied to \"${\n context.filename ?? \"(unknown)\"\n }\" because it matches one of \\`ignore: ${JSON.stringify(\n ignore,\n ignoreListReplacer,\n )}\\` from \"${dirname}\"`;\n debug(message);\n if (context.showConfig) {\n console.log(message);\n }\n return true;\n }\n\n if (only && !matchesPatterns(context, only, dirname)) {\n const message = `No config is applied to \"${\n context.filename ?? \"(unknown)\"\n }\" because it fails to match one of \\`only: ${JSON.stringify(\n only,\n ignoreListReplacer,\n )}\\` from \"${dirname}\"`;\n debug(message);\n if (context.showConfig) {\n console.log(message);\n }\n return true;\n }\n\n return false;\n}\n\n/**\n * Returns result of calling function with filename if pattern is a function.\n * Otherwise returns result of matching pattern Regex with filename.\n */\nfunction matchesPatterns(\n context: ConfigContext,\n patterns: IgnoreList,\n dirname: string,\n configName?: string,\n): boolean {\n return patterns.some(pattern =>\n matchPattern(pattern, dirname, context.filename, context, configName),\n );\n}\n\nfunction matchPattern(\n pattern: IgnoreItem,\n dirname: string,\n pathToTest: string | undefined,\n context: ConfigContext,\n configName?: string,\n): boolean {\n if (typeof pattern === \"function\") {\n return !!endHiddenCallStack(pattern)(pathToTest, {\n dirname,\n envName: context.envName,\n caller: context.caller,\n });\n }\n\n if (typeof pathToTest !== \"string\") {\n throw new ConfigError(\n `Configuration contains string/RegExp pattern, but no filename was passed to Babel`,\n configName,\n );\n }\n\n if (typeof pattern === \"string\") {\n pattern = pathPatternToRegex(pattern, dirname);\n }\n return pattern.test(pathToTest);\n}\n","import {\n assertString,\n assertFunction,\n assertObject,\n msg,\n} from \"./option-assertions.ts\";\n\nimport type {\n ValidatorSet,\n Validator,\n OptionPath,\n RootPath,\n} from \"./option-assertions.ts\";\nimport type { ParserOptions } from \"@babel/parser\";\nimport type { Visitor } from \"@babel/traverse\";\nimport type { ValidatedOptions } from \"./options.ts\";\nimport type { File, PluginAPI, PluginPass } from \"../../index.ts\";\n\n// Note: The casts here are just meant to be static assertions to make sure\n// that the assertion functions actually assert that the value's type matches\n// the declared types.\nconst VALIDATORS: ValidatorSet = {\n name: assertString as Validator,\n manipulateOptions: assertFunction as Validator<\n PluginObject[\"manipulateOptions\"]\n >,\n pre: assertFunction as Validator,\n post: assertFunction as Validator,\n inherits: assertFunction as Validator,\n visitor: assertVisitorMap as Validator,\n\n parserOverride: assertFunction as Validator,\n generatorOverride: assertFunction as Validator<\n PluginObject[\"generatorOverride\"]\n >,\n};\n\nfunction assertVisitorMap(loc: OptionPath, value: unknown): Visitor {\n const obj = assertObject(loc, value);\n if (obj) {\n Object.keys(obj).forEach(prop => {\n if (prop !== \"_exploded\" && prop !== \"_verified\") {\n assertVisitorHandler(prop, obj[prop]);\n }\n });\n\n if (obj.enter || obj.exit) {\n throw new Error(\n `${msg(\n loc,\n )} cannot contain catch-all \"enter\" or \"exit\" handlers. Please target individual nodes.`,\n );\n }\n }\n return obj as Visitor;\n}\n\nfunction assertVisitorHandler(\n key: string,\n value: unknown,\n): asserts value is VisitorHandler {\n if (value && typeof value === \"object\") {\n Object.keys(value).forEach((handler: string) => {\n if (handler !== \"enter\" && handler !== \"exit\") {\n throw new Error(\n `.visitor[\"${key}\"] may only have .enter and/or .exit handlers.`,\n );\n }\n });\n } else if (typeof value !== \"function\") {\n throw new Error(`.visitor[\"${key}\"] must be a function`);\n }\n}\n\ntype VisitorHandler =\n | Function\n | {\n enter?: Function;\n exit?: Function;\n };\n\nexport type PluginObject = {\n name?: string;\n manipulateOptions?: (\n options: ValidatedOptions,\n parserOpts: ParserOptions,\n ) => void;\n pre?: (this: S, file: File) => void;\n post?: (this: S, file: File) => void;\n inherits?: (\n api: PluginAPI,\n options: unknown,\n dirname: string,\n ) => PluginObject;\n visitor?: Visitor;\n parserOverride?: Function;\n generatorOverride?: Function;\n};\n\nexport function validatePluginObject(obj: {\n [key: string]: unknown;\n}): PluginObject {\n const rootPath: RootPath = {\n type: \"root\",\n source: \"plugin\",\n };\n Object.keys(obj).forEach((key: string) => {\n const validator = VALIDATORS[key];\n\n if (validator) {\n const optLoc: OptionPath = {\n type: \"option\",\n name: key,\n parent: rootPath,\n };\n validator(optLoc, obj[key]);\n } else {\n const invalidPluginPropertyError = new Error(\n `.${key} is not a valid Plugin property`,\n );\n // @ts-expect-error todo(flow->ts) consider adding BabelConfigError with code field\n invalidPluginPropertyError.code = \"BABEL_UNKNOWN_PLUGIN_PROPERTY\";\n throw invalidPluginPropertyError;\n }\n });\n\n return obj as any;\n}\n","import semver from \"semver\";\nimport type { Targets } from \"@babel/helper-compilation-targets\";\n\nimport { version as coreVersion } from \"../../index.ts\";\nimport { assertSimpleType } from \"../caching.ts\";\nimport type {\n CacheConfigurator,\n SimpleCacheConfigurator,\n SimpleType,\n} from \"../caching.ts\";\n\nimport type { AssumptionName, CallerMetadata } from \"../validation/options.ts\";\n\nimport type * as Context from \"../cache-contexts\";\n\ntype EnvFunction = {\n (): string;\n (extractor: (babelEnv: string) => T): T;\n (envVar: string): boolean;\n (envVars: Array): boolean;\n};\n\ntype CallerFactory = {\n (\n extractor: (callerMetadata: CallerMetadata | undefined) => T,\n ): T;\n (\n extractor: (callerMetadata: CallerMetadata | undefined) => unknown,\n ): SimpleType;\n};\ntype TargetsFunction = () => Targets;\ntype AssumptionFunction = (name: AssumptionName) => boolean | undefined;\n\nexport type ConfigAPI = {\n version: string;\n cache: SimpleCacheConfigurator;\n env: EnvFunction;\n async: () => boolean;\n assertVersion: typeof assertVersion;\n caller?: CallerFactory;\n};\n\nexport type PresetAPI = {\n targets: TargetsFunction;\n addExternalDependency: (ref: string) => void;\n} & ConfigAPI;\n\nexport type PluginAPI = {\n assumption: AssumptionFunction;\n} & PresetAPI;\n\nexport function makeConfigAPI(\n cache: CacheConfigurator,\n): ConfigAPI {\n // TODO(@nicolo-ribaudo): If we remove the explicit type from `value`\n // and the `as any` type cast, TypeScript crashes in an infinite\n // recursion. After upgrading to TS4.7 and finishing the noImplicitAny\n // PR, we should check if it still crashes and report it to the TS team.\n const env: EnvFunction = ((\n value: string | string[] | ((babelEnv: string) => T),\n ) =>\n cache.using(data => {\n if (typeof value === \"undefined\") return data.envName;\n if (typeof value === \"function\") {\n return assertSimpleType(value(data.envName));\n }\n return (Array.isArray(value) ? value : [value]).some(entry => {\n if (typeof entry !== \"string\") {\n throw new Error(\"Unexpected non-string value\");\n }\n return entry === data.envName;\n });\n })) as any;\n\n const caller = (\n cb: (CallerMetadata: CallerMetadata | undefined) => SimpleType,\n ) => cache.using(data => assertSimpleType(cb(data.caller)));\n\n return {\n version: coreVersion,\n cache: cache.simple(),\n // Expose \".env()\" so people can easily get the same env that we expose using the \"env\" key.\n env,\n async: () => false,\n caller,\n assertVersion,\n };\n}\n\nexport function makePresetAPI(\n cache: CacheConfigurator,\n externalDependencies: Array,\n): PresetAPI {\n const targets = () =>\n // We are using JSON.parse/JSON.stringify because it's only possible to cache\n // primitive values. We can safely stringify the targets object because it\n // only contains strings as its properties.\n // Please make the Record and Tuple proposal happen!\n JSON.parse(cache.using(data => JSON.stringify(data.targets)));\n\n const addExternalDependency = (ref: string) => {\n externalDependencies.push(ref);\n };\n\n return { ...makeConfigAPI(cache), targets, addExternalDependency };\n}\n\nexport function makePluginAPI(\n cache: CacheConfigurator,\n externalDependencies: Array,\n): PluginAPI {\n const assumption = (name: string) =>\n cache.using(data => data.assumptions[name]);\n\n return { ...makePresetAPI(cache, externalDependencies), assumption };\n}\n\nfunction assertVersion(range: string | number): void {\n if (typeof range === \"number\") {\n if (!Number.isInteger(range)) {\n throw new Error(\"Expected string or integer value.\");\n }\n range = `^${range}.0.0-0`;\n }\n if (typeof range !== \"string\") {\n throw new Error(\"Expected string or integer value.\");\n }\n\n // We want \"*\" to also allow any pre-release, but we do not pass\n // the includePrerelease option to semver.satisfies because we\n // do not want ^7.0.0 to match 8.0.0-alpha.1.\n if (range === \"*\" || semver.satisfies(coreVersion, range)) return;\n\n const limit = Error.stackTraceLimit;\n\n if (typeof limit === \"number\" && limit < 25) {\n // Bump up the limit if needed so that users are more likely\n // to be able to see what is calling Babel.\n Error.stackTraceLimit = 25;\n }\n\n const err = new Error(\n `Requires Babel \"${range}\", but was loaded with \"${coreVersion}\". ` +\n `If you are sure you have a compatible version of @babel/core, ` +\n `it is likely that something in your build process is loading the ` +\n `wrong version. Inspect the stack trace of this error to look for ` +\n `the first entry that doesn't mention \"@babel/core\" or \"babel-core\" ` +\n `to see what is calling Babel.`,\n );\n\n if (typeof limit === \"number\") {\n Error.stackTraceLimit = limit;\n }\n\n throw Object.assign(err, {\n code: \"BABEL_VERSION_UNSUPPORTED\",\n version: coreVersion,\n range,\n });\n}\n","import path from \"path\";\nimport type { Handler } from \"gensync\";\nimport Plugin from \"./plugin.ts\";\nimport { mergeOptions } from \"./util.ts\";\nimport { createItemFromDescriptor } from \"./item.ts\";\nimport { buildRootChain } from \"./config-chain.ts\";\nimport type { ConfigContext, FileHandling } from \"./config-chain.ts\";\nimport { getEnv } from \"./helpers/environment.ts\";\nimport { validate } from \"./validation/options.ts\";\n\nimport type {\n ValidatedOptions,\n NormalizedOptions,\n RootMode,\n} from \"./validation/options.ts\";\n\nimport {\n findConfigUpwards,\n resolveShowConfigPath,\n ROOT_CONFIG_FILENAMES,\n} from \"./files/index.ts\";\nimport type { ConfigFile, IgnoreFile } from \"./files/index.ts\";\nimport { resolveTargets } from \"./resolve-targets.ts\";\n\nfunction resolveRootMode(rootDir: string, rootMode: RootMode): string {\n switch (rootMode) {\n case \"root\":\n return rootDir;\n\n case \"upward-optional\": {\n const upwardRootDir = findConfigUpwards(rootDir);\n return upwardRootDir === null ? rootDir : upwardRootDir;\n }\n\n case \"upward\": {\n const upwardRootDir = findConfigUpwards(rootDir);\n if (upwardRootDir !== null) return upwardRootDir;\n\n throw Object.assign(\n new Error(\n `Babel was run with rootMode:\"upward\" but a root could not ` +\n `be found when searching upward from \"${rootDir}\".\\n` +\n `One of the following config files must be in the directory tree: ` +\n `\"${ROOT_CONFIG_FILENAMES.join(\", \")}\".`,\n ) as any,\n {\n code: \"BABEL_ROOT_NOT_FOUND\",\n dirname: rootDir,\n },\n );\n }\n default:\n throw new Error(`Assertion failure - unknown rootMode value.`);\n }\n}\n\ntype PrivPartialConfig = {\n options: NormalizedOptions;\n context: ConfigContext;\n fileHandling: FileHandling;\n ignore: IgnoreFile | void;\n babelrc: ConfigFile | void;\n config: ConfigFile | void;\n files: Set;\n};\n\nexport default function* loadPrivatePartialConfig(\n inputOpts: unknown,\n): Handler {\n if (\n inputOpts != null &&\n (typeof inputOpts !== \"object\" || Array.isArray(inputOpts))\n ) {\n throw new Error(\"Babel options must be an object, null, or undefined\");\n }\n\n const args = inputOpts ? validate(\"arguments\", inputOpts) : {};\n\n const {\n envName = getEnv(),\n cwd = \".\",\n root: rootDir = \".\",\n rootMode = \"root\",\n caller,\n cloneInputAst = true,\n } = args;\n const absoluteCwd = path.resolve(cwd);\n const absoluteRootDir = resolveRootMode(\n path.resolve(absoluteCwd, rootDir),\n rootMode,\n );\n\n const filename =\n typeof args.filename === \"string\"\n ? path.resolve(cwd, args.filename)\n : undefined;\n\n const showConfigPath = yield* resolveShowConfigPath(absoluteCwd);\n\n const context: ConfigContext = {\n filename,\n cwd: absoluteCwd,\n root: absoluteRootDir,\n envName,\n caller,\n showConfig: showConfigPath === filename,\n };\n\n const configChain = yield* buildRootChain(args, context);\n if (!configChain) return null;\n\n const merged: ValidatedOptions = {\n assumptions: {},\n };\n configChain.options.forEach(opts => {\n mergeOptions(merged as any, opts);\n });\n\n const options: NormalizedOptions = {\n ...merged,\n targets: resolveTargets(merged, absoluteRootDir),\n\n // Tack the passes onto the object itself so that, if this object is\n // passed back to Babel a second time, it will be in the right structure\n // to not change behavior.\n cloneInputAst,\n babelrc: false,\n configFile: false,\n browserslistConfigFile: false,\n passPerPreset: false,\n envName: context.envName,\n cwd: context.cwd,\n root: context.root,\n rootMode: \"root\",\n filename:\n typeof context.filename === \"string\" ? context.filename : undefined,\n\n plugins: configChain.plugins.map(descriptor =>\n createItemFromDescriptor(descriptor),\n ),\n presets: configChain.presets.map(descriptor =>\n createItemFromDescriptor(descriptor),\n ),\n };\n\n return {\n options,\n context,\n fileHandling: configChain.fileHandling,\n ignore: configChain.ignore,\n babelrc: configChain.babelrc,\n config: configChain.config,\n files: configChain.files,\n };\n}\n\ntype LoadPartialConfigOpts = {\n showIgnoredFiles?: boolean;\n};\n\nexport function* loadPartialConfig(\n opts?: LoadPartialConfigOpts,\n): Handler {\n let showIgnoredFiles = false;\n // We only extract showIgnoredFiles if opts is an object, so that\n // loadPrivatePartialConfig can throw the appropriate error if it's not.\n if (typeof opts === \"object\" && opts !== null && !Array.isArray(opts)) {\n ({ showIgnoredFiles, ...opts } = opts);\n }\n\n const result: PrivPartialConfig | undefined | null =\n yield* loadPrivatePartialConfig(opts);\n if (!result) return null;\n\n const { options, babelrc, ignore, config, fileHandling, files } = result;\n\n if (fileHandling === \"ignored\" && !showIgnoredFiles) {\n return null;\n }\n\n (options.plugins || []).forEach(item => {\n // @ts-expect-error todo(flow->ts): better type annotation for `item.value`\n if (item.value instanceof Plugin) {\n throw new Error(\n \"Passing cached plugin instances is not supported in \" +\n \"babel.loadPartialConfig()\",\n );\n }\n });\n\n return new PartialConfig(\n options,\n babelrc ? babelrc.filepath : undefined,\n ignore ? ignore.filepath : undefined,\n config ? config.filepath : undefined,\n fileHandling,\n files,\n );\n}\n\nexport type { PartialConfig };\n\nclass PartialConfig {\n /**\n * These properties are public, so any changes to them should be considered\n * a breaking change to Babel's API.\n */\n options: NormalizedOptions;\n babelrc: string | void;\n babelignore: string | void;\n config: string | void;\n fileHandling: FileHandling;\n files: Set;\n\n constructor(\n options: NormalizedOptions,\n babelrc: string | void,\n ignore: string | void,\n config: string | void,\n fileHandling: FileHandling,\n files: Set,\n ) {\n this.options = options;\n this.babelignore = ignore;\n this.babelrc = babelrc;\n this.config = config;\n this.fileHandling = fileHandling;\n this.files = files;\n\n // Freeze since this is a public API and it should be extremely obvious that\n // reassigning properties on here does nothing.\n Object.freeze(this);\n }\n\n /**\n * Returns true if there is a config file in the filesystem for this config.\n */\n hasFilesystemConfig(): boolean {\n return this.babelrc !== undefined || this.config !== undefined;\n }\n}\nObject.freeze(PartialConfig.prototype);\n","import gensync, { type Handler } from \"gensync\";\nimport {\n forwardAsync,\n maybeAsync,\n isThenable,\n} from \"../gensync-utils/async.ts\";\n\nimport { mergeOptions } from \"./util.ts\";\nimport * as context from \"../index.ts\";\nimport Plugin from \"./plugin.ts\";\nimport { getItemDescriptor } from \"./item.ts\";\nimport { buildPresetChain } from \"./config-chain.ts\";\nimport { finalize as freezeDeepArray } from \"./helpers/deep-array.ts\";\nimport type { DeepArray, ReadonlyDeepArray } from \"./helpers/deep-array.ts\";\nimport type {\n ConfigContext,\n ConfigChain,\n PresetInstance,\n} from \"./config-chain.ts\";\nimport type { UnloadedDescriptor } from \"./config-descriptors.ts\";\nimport traverse from \"@babel/traverse\";\nimport { makeWeakCache, makeWeakCacheSync } from \"./caching.ts\";\nimport type { CacheConfigurator } from \"./caching.ts\";\nimport {\n validate,\n checkNoUnwrappedItemOptionPairs,\n} from \"./validation/options.ts\";\nimport type { PluginItem } from \"./validation/options.ts\";\nimport { validatePluginObject } from \"./validation/plugins.ts\";\nimport { makePluginAPI, makePresetAPI } from \"./helpers/config-api.ts\";\nimport type { PluginAPI, PresetAPI } from \"./helpers/config-api.ts\";\n\nimport loadPrivatePartialConfig from \"./partial.ts\";\nimport type { ValidatedOptions } from \"./validation/options.ts\";\n\nimport type * as Context from \"./cache-contexts.ts\";\nimport ConfigError from \"../errors/config-error.ts\";\n\ntype LoadedDescriptor = {\n value: any;\n options: object;\n dirname: string;\n alias: string;\n externalDependencies: ReadonlyDeepArray;\n};\n\nexport type { InputOptions } from \"./validation/options.ts\";\n\nexport type ResolvedConfig = {\n options: any;\n passes: PluginPasses;\n externalDependencies: ReadonlyDeepArray;\n};\n\nexport type { Plugin };\nexport type PluginPassList = Array;\nexport type PluginPasses = Array;\n\nexport default gensync(function* loadFullConfig(\n inputOpts: unknown,\n): Handler {\n const result = yield* loadPrivatePartialConfig(inputOpts);\n if (!result) {\n return null;\n }\n const { options, context, fileHandling } = result;\n\n if (fileHandling === \"ignored\") {\n return null;\n }\n\n const optionDefaults = {};\n\n const { plugins, presets } = options;\n\n if (!plugins || !presets) {\n throw new Error(\"Assertion failure - plugins and presets exist\");\n }\n\n const presetContext: Context.FullPreset = {\n ...context,\n targets: options.targets,\n };\n\n const toDescriptor = (item: PluginItem) => {\n const desc = getItemDescriptor(item);\n if (!desc) {\n throw new Error(\"Assertion failure - must be config item\");\n }\n\n return desc;\n };\n\n const presetsDescriptors = presets.map(toDescriptor);\n const initialPluginsDescriptors = plugins.map(toDescriptor);\n const pluginDescriptorsByPass: Array>> = [\n [],\n ];\n const passes: Array> = [];\n\n const externalDependencies: DeepArray = [];\n\n const ignored = yield* enhanceError(\n context,\n function* recursePresetDescriptors(\n rawPresets: Array>,\n pluginDescriptorsPass: Array>,\n ): Handler {\n const presets: Array<{\n preset: ConfigChain | null;\n pass: Array>;\n }> = [];\n\n for (let i = 0; i < rawPresets.length; i++) {\n const descriptor = rawPresets[i];\n if (descriptor.options !== false) {\n try {\n // eslint-disable-next-line no-var\n var preset = yield* loadPresetDescriptor(descriptor, presetContext);\n } catch (e) {\n if (e.code === \"BABEL_UNKNOWN_OPTION\") {\n checkNoUnwrappedItemOptionPairs(rawPresets, i, \"preset\", e);\n }\n throw e;\n }\n\n externalDependencies.push(preset.externalDependencies);\n\n // Presets normally run in reverse order, but if they\n // have their own pass they run after the presets\n // in the previous pass.\n if (descriptor.ownPass) {\n presets.push({ preset: preset.chain, pass: [] });\n } else {\n presets.unshift({\n preset: preset.chain,\n pass: pluginDescriptorsPass,\n });\n }\n }\n }\n\n // resolve presets\n if (presets.length > 0) {\n // The passes are created in the same order as the preset list, but are inserted before any\n // existing additional passes.\n pluginDescriptorsByPass.splice(\n 1,\n 0,\n ...presets.map(o => o.pass).filter(p => p !== pluginDescriptorsPass),\n );\n\n for (const { preset, pass } of presets) {\n if (!preset) return true;\n\n pass.push(...preset.plugins);\n\n const ignored = yield* recursePresetDescriptors(preset.presets, pass);\n if (ignored) return true;\n\n preset.options.forEach(opts => {\n mergeOptions(optionDefaults, opts);\n });\n }\n }\n },\n )(presetsDescriptors, pluginDescriptorsByPass[0]);\n\n if (ignored) return null;\n\n const opts: any = optionDefaults;\n mergeOptions(opts, options);\n\n const pluginContext: Context.FullPlugin = {\n ...presetContext,\n assumptions: opts.assumptions ?? {},\n };\n\n yield* enhanceError(context, function* loadPluginDescriptors() {\n pluginDescriptorsByPass[0].unshift(...initialPluginsDescriptors);\n\n for (const descs of pluginDescriptorsByPass) {\n const pass: Plugin[] = [];\n passes.push(pass);\n\n for (let i = 0; i < descs.length; i++) {\n const descriptor = descs[i];\n if (descriptor.options !== false) {\n try {\n // eslint-disable-next-line no-var\n var plugin = yield* loadPluginDescriptor(descriptor, pluginContext);\n } catch (e) {\n if (e.code === \"BABEL_UNKNOWN_PLUGIN_PROPERTY\") {\n // print special message for `plugins: [\"@babel/foo\", { foo: \"option\" }]`\n checkNoUnwrappedItemOptionPairs(descs, i, \"plugin\", e);\n }\n throw e;\n }\n pass.push(plugin);\n\n externalDependencies.push(plugin.externalDependencies);\n }\n }\n }\n })();\n\n opts.plugins = passes[0];\n opts.presets = passes\n .slice(1)\n .filter(plugins => plugins.length > 0)\n .map(plugins => ({ plugins }));\n opts.passPerPreset = opts.presets.length > 0;\n\n return {\n options: opts,\n passes: passes,\n externalDependencies: freezeDeepArray(externalDependencies),\n };\n});\n\nfunction enhanceError(context: ConfigContext, fn: T): T {\n return function* (arg1: unknown, arg2: unknown) {\n try {\n return yield* fn(arg1, arg2);\n } catch (e) {\n // There are a few case where thrown errors will try to annotate themselves multiple times, so\n // to keep things simple we just bail out if re-wrapping the message.\n if (!/^\\[BABEL\\]/.test(e.message)) {\n e.message = `[BABEL] ${context.filename ?? \"unknown file\"}: ${\n e.message\n }`;\n }\n\n throw e;\n }\n } as any;\n}\n\n/**\n * Load a generic plugin/preset from the given descriptor loaded from the config object.\n */\nconst makeDescriptorLoader = (\n apiFactory: (\n cache: CacheConfigurator,\n externalDependencies: Array,\n ) => API,\n) =>\n makeWeakCache(function* (\n { value, options, dirname, alias }: UnloadedDescriptor,\n cache: CacheConfigurator,\n ): Handler {\n // Disabled presets should already have been filtered out\n if (options === false) throw new Error(\"Assertion failure\");\n\n options = options || {};\n\n const externalDependencies: Array = [];\n\n let item: unknown = value;\n if (typeof value === \"function\") {\n const factory = maybeAsync(\n value as (api: API, options: object, dirname: string) => unknown,\n `You appear to be using an async plugin/preset, but Babel has been called synchronously`,\n );\n\n const api = {\n ...context,\n ...apiFactory(cache, externalDependencies),\n };\n try {\n item = yield* factory(api, options, dirname);\n } catch (e) {\n if (alias) {\n e.message += ` (While processing: ${JSON.stringify(alias)})`;\n }\n throw e;\n }\n }\n\n if (!item || typeof item !== \"object\") {\n throw new Error(\"Plugin/Preset did not return an object.\");\n }\n\n if (isThenable(item)) {\n // @ts-expect-error - if we want to support async plugins\n yield* [];\n\n throw new Error(\n `You appear to be using a promise as a plugin, ` +\n `which your current version of Babel does not support. ` +\n `If you're using a published plugin, ` +\n `you may need to upgrade your @babel/core version. ` +\n `As an alternative, you can prefix the promise with \"await\". ` +\n `(While processing: ${JSON.stringify(alias)})`,\n );\n }\n\n if (\n externalDependencies.length > 0 &&\n (!cache.configured() || cache.mode() === \"forever\")\n ) {\n let error =\n `A plugin/preset has external untracked dependencies ` +\n `(${externalDependencies[0]}), but the cache `;\n if (!cache.configured()) {\n error += `has not been configured to be invalidated when the external dependencies change. `;\n } else {\n error += ` has been configured to never be invalidated. `;\n }\n error +=\n `Plugins/presets should configure their cache to be invalidated when the external ` +\n `dependencies change, for example using \\`api.cache.invalidate(() => ` +\n `statSync(filepath).mtimeMs)\\` or \\`api.cache.never()\\`\\n` +\n `(While processing: ${JSON.stringify(alias)})`;\n\n throw new Error(error);\n }\n\n return {\n value: item,\n options,\n dirname,\n alias,\n externalDependencies: freezeDeepArray(externalDependencies),\n };\n });\n\nconst pluginDescriptorLoader = makeDescriptorLoader<\n Context.SimplePlugin,\n PluginAPI\n>(makePluginAPI);\nconst presetDescriptorLoader = makeDescriptorLoader<\n Context.SimplePreset,\n PresetAPI\n>(makePresetAPI);\n\nconst instantiatePlugin = makeWeakCache(function* (\n { value, options, dirname, alias, externalDependencies }: LoadedDescriptor,\n cache: CacheConfigurator,\n): Handler {\n const pluginObj = validatePluginObject(value);\n\n const plugin = {\n ...pluginObj,\n };\n if (plugin.visitor) {\n plugin.visitor = traverse.explode({\n ...plugin.visitor,\n });\n }\n\n if (plugin.inherits) {\n const inheritsDescriptor: UnloadedDescriptor = {\n name: undefined,\n alias: `${alias}$inherits`,\n value: plugin.inherits,\n options,\n dirname,\n };\n\n const inherits = yield* forwardAsync(loadPluginDescriptor, run => {\n // If the inherited plugin changes, reinstantiate this plugin.\n return cache.invalidate(data => run(inheritsDescriptor, data));\n });\n\n plugin.pre = chain(inherits.pre, plugin.pre);\n plugin.post = chain(inherits.post, plugin.post);\n plugin.manipulateOptions = chain(\n inherits.manipulateOptions,\n plugin.manipulateOptions,\n );\n plugin.visitor = traverse.visitors.merge([\n inherits.visitor || {},\n plugin.visitor || {},\n ]);\n\n if (inherits.externalDependencies.length > 0) {\n if (externalDependencies.length === 0) {\n externalDependencies = inherits.externalDependencies;\n } else {\n externalDependencies = freezeDeepArray([\n externalDependencies,\n inherits.externalDependencies,\n ]);\n }\n }\n }\n\n return new Plugin(plugin, options, alias, externalDependencies);\n});\n\n/**\n * Instantiate a plugin for the given descriptor, returning the plugin/options pair.\n */\nfunction* loadPluginDescriptor(\n descriptor: UnloadedDescriptor,\n context: Context.SimplePlugin,\n): Handler {\n if (descriptor.value instanceof Plugin) {\n if (descriptor.options) {\n throw new Error(\n \"Passed options to an existing Plugin instance will not work.\",\n );\n }\n\n return descriptor.value;\n }\n\n return yield* instantiatePlugin(\n yield* pluginDescriptorLoader(descriptor, context),\n context,\n );\n}\n\nconst needsFilename = (val: unknown) => val && typeof val !== \"function\";\n\nconst validateIfOptionNeedsFilename = (\n options: ValidatedOptions,\n descriptor: UnloadedDescriptor,\n): void => {\n if (\n needsFilename(options.test) ||\n needsFilename(options.include) ||\n needsFilename(options.exclude)\n ) {\n const formattedPresetName = descriptor.name\n ? `\"${descriptor.name}\"`\n : \"/* your preset */\";\n throw new ConfigError(\n [\n `Preset ${formattedPresetName} requires a filename to be set when babel is called directly,`,\n `\\`\\`\\``,\n `babel.transformSync(code, { filename: 'file.ts', presets: [${formattedPresetName}] });`,\n `\\`\\`\\``,\n `See https://babeljs.io/docs/en/options#filename for more information.`,\n ].join(\"\\n\"),\n );\n }\n};\n\nconst validatePreset = (\n preset: PresetInstance,\n context: ConfigContext,\n descriptor: UnloadedDescriptor,\n): void => {\n if (!context.filename) {\n const { options } = preset;\n validateIfOptionNeedsFilename(options, descriptor);\n options.overrides?.forEach(overrideOptions =>\n validateIfOptionNeedsFilename(overrideOptions, descriptor),\n );\n }\n};\n\nconst instantiatePreset = makeWeakCacheSync(\n ({\n value,\n dirname,\n alias,\n externalDependencies,\n }: LoadedDescriptor): PresetInstance => {\n return {\n options: validate(\"preset\", value),\n alias,\n dirname,\n externalDependencies,\n };\n },\n);\n\n/**\n * Generate a config object that will act as the root of a new nested config.\n */\nfunction* loadPresetDescriptor(\n descriptor: UnloadedDescriptor,\n context: Context.FullPreset,\n): Handler<{\n chain: ConfigChain | null;\n externalDependencies: ReadonlyDeepArray;\n}> {\n const preset = instantiatePreset(\n yield* presetDescriptorLoader(descriptor, context),\n );\n validatePreset(preset, context, descriptor);\n return {\n chain: yield* buildPresetChain(preset, context),\n externalDependencies: preset.externalDependencies,\n };\n}\n\nfunction chain(\n a: undefined | ((...args: Args) => void),\n b: undefined | ((...args: Args) => void),\n) {\n const fns = [a, b].filter(Boolean);\n if (fns.length <= 1) return fns[0];\n\n return function (this: unknown, ...args: unknown[]) {\n for (const fn of fns) {\n fn.apply(this, args);\n }\n };\n}\n","import gensync, { type Handler } from \"gensync\";\n\nexport type {\n ResolvedConfig,\n InputOptions,\n PluginPasses,\n Plugin,\n} from \"./full.ts\";\n\nimport type { PluginTarget } from \"./validation/options.ts\";\n\nimport type {\n PluginAPI as basePluginAPI,\n PresetAPI as basePresetAPI,\n} from \"./helpers/config-api.ts\";\nexport type { PluginObject } from \"./validation/plugins.ts\";\ntype PluginAPI = basePluginAPI & typeof import(\"..\");\ntype PresetAPI = basePresetAPI & typeof import(\"..\");\nexport type { PluginAPI, PresetAPI };\n// todo: may need to refine PresetObject to be a subset of ValidatedOptions\nexport type {\n CallerMetadata,\n ValidatedOptions as PresetObject,\n} from \"./validation/options.ts\";\n\nimport loadFullConfig, { type ResolvedConfig } from \"./full.ts\";\nimport {\n type PartialConfig,\n loadPartialConfig as loadPartialConfigImpl,\n} from \"./partial.ts\";\n\nexport { loadFullConfig as default };\nexport type { PartialConfig } from \"./partial.ts\";\n\nimport { createConfigItem as createConfigItemImpl } from \"./item.ts\";\nimport type { ConfigItem } from \"./item.ts\";\nexport type { ConfigItem };\n\nimport { beginHiddenCallStack } from \"../errors/rewrite-stack-trace.ts\";\n\nconst loadPartialConfigRunner = gensync(loadPartialConfigImpl);\nexport function loadPartialConfigAsync(\n ...args: Parameters\n) {\n return beginHiddenCallStack(loadPartialConfigRunner.async)(...args);\n}\nexport function loadPartialConfigSync(\n ...args: Parameters\n) {\n return beginHiddenCallStack(loadPartialConfigRunner.sync)(...args);\n}\nexport function loadPartialConfig(\n opts: Parameters[0],\n callback?: (err: Error, val: PartialConfig | null) => void,\n) {\n if (callback !== undefined) {\n beginHiddenCallStack(loadPartialConfigRunner.errback)(opts, callback);\n } else if (typeof opts === \"function\") {\n beginHiddenCallStack(loadPartialConfigRunner.errback)(\n undefined,\n opts as (err: Error, val: PartialConfig | null) => void,\n );\n } else {\n if (process.env.BABEL_8_BREAKING) {\n throw new Error(\n \"Starting from Babel 8.0.0, the 'loadPartialConfig' function expects a callback. If you need to call it synchronously, please use 'loadPartialConfigSync'.\",\n );\n } else {\n return loadPartialConfigSync(opts);\n }\n }\n}\n\nfunction* loadOptionsImpl(opts: unknown): Handler {\n const config = yield* loadFullConfig(opts);\n // NOTE: We want to return \"null\" explicitly, while ?. alone returns undefined\n return config?.options ?? null;\n}\nconst loadOptionsRunner = gensync(loadOptionsImpl);\nexport function loadOptionsAsync(\n ...args: Parameters\n) {\n return beginHiddenCallStack(loadOptionsRunner.async)(...args);\n}\nexport function loadOptionsSync(\n ...args: Parameters\n) {\n return beginHiddenCallStack(loadOptionsRunner.sync)(...args);\n}\nexport function loadOptions(\n opts: Parameters[0],\n callback?: (err: Error, val: ResolvedConfig | null) => void,\n) {\n if (callback !== undefined) {\n beginHiddenCallStack(loadOptionsRunner.errback)(opts, callback);\n } else if (typeof opts === \"function\") {\n beginHiddenCallStack(loadOptionsRunner.errback)(\n undefined,\n opts as (err: Error, val: ResolvedConfig | null) => void,\n );\n } else {\n if (process.env.BABEL_8_BREAKING) {\n throw new Error(\n \"Starting from Babel 8.0.0, the 'loadOptions' function expects a callback. If you need to call it synchronously, please use 'loadOptionsSync'.\",\n );\n } else {\n return loadOptionsSync(opts);\n }\n }\n}\n\nconst createConfigItemRunner = gensync(createConfigItemImpl);\nexport function createConfigItemAsync(\n ...args: Parameters\n) {\n return beginHiddenCallStack(createConfigItemRunner.async)(...args);\n}\nexport function createConfigItemSync(\n ...args: Parameters\n) {\n return beginHiddenCallStack(createConfigItemRunner.sync)(...args);\n}\nexport function createConfigItem(\n target: PluginTarget,\n options: Parameters[1],\n callback?: (err: Error, val: ConfigItem | null) => void,\n) {\n if (callback !== undefined) {\n beginHiddenCallStack(createConfigItemRunner.errback)(\n target,\n options,\n callback,\n );\n } else if (typeof options === \"function\") {\n beginHiddenCallStack(createConfigItemRunner.errback)(\n target,\n undefined,\n callback,\n );\n } else {\n if (process.env.BABEL_8_BREAKING) {\n throw new Error(\n \"Starting from Babel 8.0.0, the 'createConfigItem' function expects a callback. If you need to call it synchronously, please use 'createConfigItemSync'.\",\n );\n } else {\n return createConfigItemSync(target, options);\n }\n }\n}\n","import traverse from \"@babel/traverse\";\nimport type { Statement } from \"@babel/types\";\nimport type { PluginObject } from \"../config/index.ts\";\nimport Plugin from \"../config/plugin.ts\";\n\nlet LOADED_PLUGIN: Plugin | void;\n\nconst blockHoistPlugin: PluginObject = {\n /**\n * [Please add a description.]\n *\n * Priority:\n *\n * - 0 We want this to be at the **very** bottom\n * - 1 Default node position\n * - 2 Priority over normal nodes\n * - 3 We want this to be at the **very** top\n * - 4 Reserved for the helpers used to implement module imports.\n */\n\n name: \"internal.blockHoist\",\n\n visitor: {\n Block: {\n exit({ node }) {\n node.body = performHoisting(node.body);\n },\n },\n SwitchCase: {\n exit({ node }) {\n // In case statements, hoisting is difficult to perform correctly due to\n // functions that are declared and referenced in different blocks.\n // Nevertheless, hoisting the statements *inside* of each case should at\n // least mitigate the failure cases.\n node.consequent = performHoisting(node.consequent);\n },\n },\n },\n};\n\nfunction performHoisting(body: Statement[]): Statement[] {\n // Largest SMI\n let max = 2 ** 30 - 1;\n let hasChange = false;\n for (let i = 0; i < body.length; i++) {\n const n = body[i];\n const p = priority(n);\n if (p > max) {\n hasChange = true;\n break;\n }\n max = p;\n }\n if (!hasChange) return body;\n\n // My kingdom for a stable sort!\n return stableSort(body.slice());\n}\n\nexport default function loadBlockHoistPlugin(): Plugin {\n if (!LOADED_PLUGIN) {\n // cache the loaded blockHoist plugin plugin\n LOADED_PLUGIN = new Plugin(\n {\n ...blockHoistPlugin,\n visitor: traverse.explode(blockHoistPlugin.visitor),\n },\n {},\n );\n }\n\n return LOADED_PLUGIN;\n}\n\nfunction priority(bodyNode: Statement & { _blockHoist?: number | true }) {\n const priority = bodyNode?._blockHoist;\n if (priority == null) return 1;\n if (priority === true) return 2;\n return priority;\n}\n\nfunction stableSort(body: Statement[]) {\n // By default, we use priorities of 0-4.\n const buckets = Object.create(null);\n\n // By collecting into buckets, we can guarantee a stable sort.\n for (let i = 0; i < body.length; i++) {\n const n = body[i];\n const p = priority(n);\n\n // In case some plugin is setting an unexpected priority.\n const bucket = buckets[p] || (buckets[p] = []);\n bucket.push(n);\n }\n\n // Sort our keys in descending order. Keys are unique, so we don't have to\n // worry about stability.\n const keys = Object.keys(buckets)\n .map(k => +k)\n .sort((a, b) => b - a);\n\n let index = 0;\n for (const key of keys) {\n const bucket = buckets[key];\n for (const n of bucket) {\n body[index++] = n;\n }\n }\n return body;\n}\n","import type * as t from \"@babel/types\";\nimport type File from \"./file/file.ts\";\n\nexport default class PluginPass {\n _map: Map = new Map();\n key: string | undefined | null;\n file: File;\n opts: Partial;\n\n // The working directory that Babel's programmatic options are loaded\n // relative to.\n cwd: string;\n\n // The absolute path of the file being compiled.\n filename: string | void;\n\n constructor(file: File, key?: string | null, options?: Options) {\n this.key = key;\n this.file = file;\n this.opts = options || {};\n this.cwd = file.opts.cwd;\n this.filename = file.opts.filename;\n }\n\n set(key: unknown, val: unknown) {\n this._map.set(key, val);\n }\n\n get(key: unknown): any {\n return this._map.get(key);\n }\n\n availableHelper(name: string, versionRange?: string | null) {\n return this.file.availableHelper(name, versionRange);\n }\n\n addHelper(name: string) {\n return this.file.addHelper(name);\n }\n\n buildCodeFrameError(\n node: t.Node | undefined | null,\n msg: string,\n _Error?: typeof Error,\n ) {\n return this.file.buildCodeFrameError(node, msg, _Error);\n }\n}\n\nif (!process.env.BABEL_8_BREAKING) {\n (PluginPass as any).prototype.getModuleName = function getModuleName(\n this: PluginPass,\n ): string | undefined {\n // @ts-expect-error only exists in Babel 7\n return this.file.getModuleName();\n };\n (PluginPass as any).prototype.addImport = function addImport(\n this: PluginPass,\n ): void {\n // @ts-expect-error only exists in Babel 7\n this.file.addImport();\n };\n}\n","import path from \"path\";\nimport type { ResolvedConfig } from \"../config/index.ts\";\n\nexport default function normalizeOptions(config: ResolvedConfig) {\n const {\n filename,\n cwd,\n filenameRelative = typeof filename === \"string\"\n ? path.relative(cwd, filename)\n : \"unknown\",\n sourceType = \"module\",\n inputSourceMap,\n sourceMaps = !!inputSourceMap,\n sourceRoot = process.env.BABEL_8_BREAKING\n ? undefined\n : config.options.moduleRoot,\n\n sourceFileName = path.basename(filenameRelative),\n\n comments = true,\n compact = \"auto\",\n } = config.options;\n\n const opts = config.options;\n\n const options = {\n ...opts,\n\n parserOpts: {\n sourceType:\n path.extname(filenameRelative) === \".mjs\" ? \"module\" : sourceType,\n\n sourceFileName: filename,\n plugins: [],\n ...opts.parserOpts,\n },\n\n generatorOpts: {\n // General generator flags.\n filename,\n\n auxiliaryCommentBefore: opts.auxiliaryCommentBefore,\n auxiliaryCommentAfter: opts.auxiliaryCommentAfter,\n retainLines: opts.retainLines,\n comments,\n shouldPrintComment: opts.shouldPrintComment,\n compact,\n minified: opts.minified,\n\n // Source-map generation flags.\n sourceMaps,\n\n sourceRoot,\n sourceFileName,\n ...opts.generatorOpts,\n },\n };\n\n for (const plugins of config.passes) {\n for (const plugin of plugins) {\n if (plugin.manipulateOptions) {\n plugin.manipulateOptions(options, options.parserOpts);\n }\n }\n }\n\n return options;\n}\n","'use strict';\n\nObject.defineProperty(exports, 'commentRegex', {\n get: function getCommentRegex () {\n // Groups: 1: media type, 2: MIME type, 3: charset, 4: encoding, 5: data.\n return /^\\s*?\\/[\\/\\*][@#]\\s+?sourceMappingURL=data:(((?:application|text)\\/json)(?:;charset=([^;,]+?)?)?)?(?:;(base64))?,(.*?)$/mg;\n }\n});\n\n\nObject.defineProperty(exports, 'mapFileCommentRegex', {\n get: function getMapFileCommentRegex () {\n // Matches sourceMappingURL in either // or /* comment styles.\n return /(?:\\/\\/[@#][ \\t]+?sourceMappingURL=([^\\s'\"`]+?)[ \\t]*?$)|(?:\\/\\*[@#][ \\t]+sourceMappingURL=([^*]+?)[ \\t]*?(?:\\*\\/){1}[ \\t]*?$)/mg;\n }\n});\n\nvar decodeBase64;\nif (typeof Buffer !== 'undefined') {\n if (typeof Buffer.from === 'function') {\n decodeBase64 = decodeBase64WithBufferFrom;\n } else {\n decodeBase64 = decodeBase64WithNewBuffer;\n }\n} else {\n decodeBase64 = decodeBase64WithAtob;\n}\n\nfunction decodeBase64WithBufferFrom(base64) {\n return Buffer.from(base64, 'base64').toString();\n}\n\nfunction decodeBase64WithNewBuffer(base64) {\n if (typeof value === 'number') {\n throw new TypeError('The value to decode must not be of type number.');\n }\n return new Buffer(base64, 'base64').toString();\n}\n\nfunction decodeBase64WithAtob(base64) {\n return decodeURIComponent(escape(atob(base64)));\n}\n\nfunction stripComment(sm) {\n return sm.split(',').pop();\n}\n\nfunction readFromFileMap(sm, read) {\n var r = exports.mapFileCommentRegex.exec(sm);\n // for some odd reason //# .. captures in 1 and /* .. */ in 2\n var filename = r[1] || r[2];\n\n try {\n var sm = read(filename);\n if (sm != null && typeof sm.catch === 'function') {\n return sm.catch(throwError);\n } else {\n return sm;\n }\n } catch (e) {\n throwError(e);\n }\n\n function throwError(e) {\n throw new Error('An error occurred while trying to read the map file at ' + filename + '\\n' + e.stack);\n }\n}\n\nfunction Converter (sm, opts) {\n opts = opts || {};\n\n if (opts.hasComment) {\n sm = stripComment(sm);\n }\n\n if (opts.encoding === 'base64') {\n sm = decodeBase64(sm);\n } else if (opts.encoding === 'uri') {\n sm = decodeURIComponent(sm);\n }\n\n if (opts.isJSON || opts.encoding) {\n sm = JSON.parse(sm);\n }\n\n this.sourcemap = sm;\n}\n\nConverter.prototype.toJSON = function (space) {\n return JSON.stringify(this.sourcemap, null, space);\n};\n\nif (typeof Buffer !== 'undefined') {\n if (typeof Buffer.from === 'function') {\n Converter.prototype.toBase64 = encodeBase64WithBufferFrom;\n } else {\n Converter.prototype.toBase64 = encodeBase64WithNewBuffer;\n }\n} else {\n Converter.prototype.toBase64 = encodeBase64WithBtoa;\n}\n\nfunction encodeBase64WithBufferFrom() {\n var json = this.toJSON();\n return Buffer.from(json, 'utf8').toString('base64');\n}\n\nfunction encodeBase64WithNewBuffer() {\n var json = this.toJSON();\n if (typeof json === 'number') {\n throw new TypeError('The json to encode must not be of type number.');\n }\n return new Buffer(json, 'utf8').toString('base64');\n}\n\nfunction encodeBase64WithBtoa() {\n var json = this.toJSON();\n return btoa(unescape(encodeURIComponent(json)));\n}\n\nConverter.prototype.toURI = function () {\n var json = this.toJSON();\n return encodeURIComponent(json);\n};\n\nConverter.prototype.toComment = function (options) {\n var encoding, content, data;\n if (options != null && options.encoding === 'uri') {\n encoding = '';\n content = this.toURI();\n } else {\n encoding = ';base64';\n content = this.toBase64();\n }\n data = 'sourceMappingURL=data:application/json;charset=utf-8' + encoding + ',' + content;\n return options != null && options.multiline ? '/*# ' + data + ' */' : '//# ' + data;\n};\n\n// returns copy instead of original\nConverter.prototype.toObject = function () {\n return JSON.parse(this.toJSON());\n};\n\nConverter.prototype.addProperty = function (key, value) {\n if (this.sourcemap.hasOwnProperty(key)) throw new Error('property \"' + key + '\" already exists on the sourcemap, use set property instead');\n return this.setProperty(key, value);\n};\n\nConverter.prototype.setProperty = function (key, value) {\n this.sourcemap[key] = value;\n return this;\n};\n\nConverter.prototype.getProperty = function (key) {\n return this.sourcemap[key];\n};\n\nexports.fromObject = function (obj) {\n return new Converter(obj);\n};\n\nexports.fromJSON = function (json) {\n return new Converter(json, { isJSON: true });\n};\n\nexports.fromURI = function (uri) {\n return new Converter(uri, { encoding: 'uri' });\n};\n\nexports.fromBase64 = function (base64) {\n return new Converter(base64, { encoding: 'base64' });\n};\n\nexports.fromComment = function (comment) {\n var m, encoding;\n comment = comment\n .replace(/^\\/\\*/g, '//')\n .replace(/\\*\\/$/g, '');\n m = exports.commentRegex.exec(comment);\n encoding = m && m[4] || 'uri';\n return new Converter(comment, { encoding: encoding, hasComment: true });\n};\n\nfunction makeConverter(sm) {\n return new Converter(sm, { isJSON: true });\n}\n\nexports.fromMapFileComment = function (comment, read) {\n if (typeof read === 'string') {\n throw new Error(\n 'String directory paths are no longer supported with `fromMapFileComment`\\n' +\n 'Please review the Upgrading documentation at https://github.com/thlorenz/convert-source-map#upgrading'\n )\n }\n\n var sm = readFromFileMap(comment, read);\n if (sm != null && typeof sm.then === 'function') {\n return sm.then(makeConverter);\n } else {\n return makeConverter(sm);\n }\n};\n\n// Finds last sourcemap comment in file or returns null if none was found\nexports.fromSource = function (content) {\n var m = content.match(exports.commentRegex);\n return m ? exports.fromComment(m.pop()) : null;\n};\n\n// Finds last sourcemap comment in file or returns null if none was found\nexports.fromMapFileSource = function (content, read) {\n if (typeof read === 'string') {\n throw new Error(\n 'String directory paths are no longer supported with `fromMapFileSource`\\n' +\n 'Please review the Upgrading documentation at https://github.com/thlorenz/convert-source-map#upgrading'\n )\n }\n var m = content.match(exports.mapFileCommentRegex);\n return m ? exports.fromMapFileComment(m.pop(), read) : null;\n};\n\nexports.removeComments = function (src) {\n return src.replace(exports.commentRegex, '');\n};\n\nexports.removeMapFileComments = function (src) {\n return src.replace(exports.mapFileCommentRegex, '');\n};\n\nexports.generateMapFileComment = function (file, options) {\n var data = 'sourceMappingURL=' + file;\n return options && options.multiline ? '/*# ' + data + ' */' : '//# ' + data;\n};\n","const pluginNameMap: Record<\n string,\n Partial>>\n> = {\n asyncDoExpressions: {\n syntax: {\n name: \"@babel/plugin-syntax-async-do-expressions\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-async-do-expressions\",\n },\n },\n decimal: {\n syntax: {\n name: \"@babel/plugin-syntax-decimal\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-decimal\",\n },\n },\n decorators: {\n syntax: {\n name: \"@babel/plugin-syntax-decorators\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-decorators\",\n },\n transform: {\n name: \"@babel/plugin-proposal-decorators\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-proposal-decorators\",\n },\n },\n doExpressions: {\n syntax: {\n name: \"@babel/plugin-syntax-do-expressions\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-do-expressions\",\n },\n transform: {\n name: \"@babel/plugin-proposal-do-expressions\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-proposal-do-expressions\",\n },\n },\n exportDefaultFrom: {\n syntax: {\n name: \"@babel/plugin-syntax-export-default-from\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-export-default-from\",\n },\n transform: {\n name: \"@babel/plugin-proposal-export-default-from\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-proposal-export-default-from\",\n },\n },\n flow: {\n syntax: {\n name: \"@babel/plugin-syntax-flow\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-flow\",\n },\n transform: {\n name: \"@babel/preset-flow\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-preset-flow\",\n },\n },\n functionBind: {\n syntax: {\n name: \"@babel/plugin-syntax-function-bind\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-function-bind\",\n },\n transform: {\n name: \"@babel/plugin-proposal-function-bind\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-proposal-function-bind\",\n },\n },\n functionSent: {\n syntax: {\n name: \"@babel/plugin-syntax-function-sent\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-function-sent\",\n },\n transform: {\n name: \"@babel/plugin-proposal-function-sent\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-proposal-function-sent\",\n },\n },\n jsx: {\n syntax: {\n name: \"@babel/plugin-syntax-jsx\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-jsx\",\n },\n transform: {\n name: \"@babel/preset-react\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-preset-react\",\n },\n },\n importAttributes: {\n syntax: {\n name: \"@babel/plugin-syntax-import-attributes\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-import-attributes\",\n },\n },\n pipelineOperator: {\n syntax: {\n name: \"@babel/plugin-syntax-pipeline-operator\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-pipeline-operator\",\n },\n transform: {\n name: \"@babel/plugin-proposal-pipeline-operator\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-proposal-pipeline-operator\",\n },\n },\n recordAndTuple: {\n syntax: {\n name: \"@babel/plugin-syntax-record-and-tuple\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-record-and-tuple\",\n },\n },\n throwExpressions: {\n syntax: {\n name: \"@babel/plugin-syntax-throw-expressions\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-throw-expressions\",\n },\n transform: {\n name: \"@babel/plugin-proposal-throw-expressions\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-proposal-throw-expressions\",\n },\n },\n typescript: {\n syntax: {\n name: \"@babel/plugin-syntax-typescript\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-typescript\",\n },\n transform: {\n name: \"@babel/preset-typescript\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-preset-typescript\",\n },\n },\n};\n\nif (!process.env.BABEL_8_BREAKING) {\n // TODO: This plugins are now supported by default by @babel/parser.\n Object.assign(pluginNameMap, {\n asyncGenerators: {\n syntax: {\n name: \"@babel/plugin-syntax-async-generators\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-async-generators\",\n },\n transform: {\n name: \"@babel/plugin-transform-async-generator-functions\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-transform-async-generator-functions\",\n },\n },\n classProperties: {\n syntax: {\n name: \"@babel/plugin-syntax-class-properties\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-class-properties\",\n },\n transform: {\n name: \"@babel/plugin-transform-class-properties\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-transform-class-properties\",\n },\n },\n classPrivateProperties: {\n syntax: {\n name: \"@babel/plugin-syntax-class-properties\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-class-properties\",\n },\n transform: {\n name: \"@babel/plugin-transform-class-properties\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-transform-class-properties\",\n },\n },\n classPrivateMethods: {\n syntax: {\n name: \"@babel/plugin-syntax-class-properties\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-class-properties\",\n },\n transform: {\n name: \"@babel/plugin-transform-private-methods\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-transform-private-methods\",\n },\n },\n classStaticBlock: {\n syntax: {\n name: \"@babel/plugin-syntax-class-static-block\",\n url: \"https://github.com/babel/babel/tree/HEAD/packages/babel-plugin-syntax-class-static-block\",\n },\n transform: {\n name: \"@babel/plugin-transform-class-static-block\",\n url: \"https://github.com/babel/babel/tree/HEAD/packages/babel-plugin-transform-class-static-block\",\n },\n },\n dynamicImport: {\n syntax: {\n name: \"@babel/plugin-syntax-dynamic-import\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-dynamic-import\",\n },\n },\n exportNamespaceFrom: {\n syntax: {\n name: \"@babel/plugin-syntax-export-namespace-from\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-export-namespace-from\",\n },\n transform: {\n name: \"@babel/plugin-transform-export-namespace-from\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-transform-export-namespace-from\",\n },\n },\n // Will be removed\n importAssertions: {\n syntax: {\n name: \"@babel/plugin-syntax-import-assertions\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-import-assertions\",\n },\n },\n importMeta: {\n syntax: {\n name: \"@babel/plugin-syntax-import-meta\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-import-meta\",\n },\n },\n logicalAssignment: {\n syntax: {\n name: \"@babel/plugin-syntax-logical-assignment-operators\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-logical-assignment-operators\",\n },\n transform: {\n name: \"@babel/plugin-transform-logical-assignment-operators\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-transform-logical-assignment-operators\",\n },\n },\n moduleStringNames: {\n syntax: {\n name: \"@babel/plugin-syntax-module-string-names\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-module-string-names\",\n },\n },\n numericSeparator: {\n syntax: {\n name: \"@babel/plugin-syntax-numeric-separator\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-numeric-separator\",\n },\n transform: {\n name: \"@babel/plugin-transform-numeric-separator\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-transform-numeric-separator\",\n },\n },\n nullishCoalescingOperator: {\n syntax: {\n name: \"@babel/plugin-syntax-nullish-coalescing-operator\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-nullish-coalescing-operator\",\n },\n transform: {\n name: \"@babel/plugin-transform-nullish-coalescing-operator\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-transform-nullish-coalescing-opearator\",\n },\n },\n objectRestSpread: {\n syntax: {\n name: \"@babel/plugin-syntax-object-rest-spread\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-object-rest-spread\",\n },\n transform: {\n name: \"@babel/plugin-transform-object-rest-spread\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-transform-object-rest-spread\",\n },\n },\n optionalCatchBinding: {\n syntax: {\n name: \"@babel/plugin-syntax-optional-catch-binding\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-optional-catch-binding\",\n },\n transform: {\n name: \"@babel/plugin-transform-optional-catch-binding\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-transform-optional-catch-binding\",\n },\n },\n optionalChaining: {\n syntax: {\n name: \"@babel/plugin-syntax-optional-chaining\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-optional-chaining\",\n },\n transform: {\n name: \"@babel/plugin-transform-optional-chaining\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-transform-optional-chaining\",\n },\n },\n privateIn: {\n syntax: {\n name: \"@babel/plugin-syntax-private-property-in-object\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-private-property-in-object\",\n },\n transform: {\n name: \"@babel/plugin-transform-private-property-in-object\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-transform-private-property-in-object\",\n },\n },\n regexpUnicodeSets: {\n syntax: {\n name: \"@babel/plugin-syntax-unicode-sets-regex\",\n url: \"https://github.com/babel/babel/blob/main/packages/babel-plugin-syntax-unicode-sets-regex/README.md\",\n },\n transform: {\n name: \"@babel/plugin-transform-unicode-sets-regex\",\n url: \"https://github.com/babel/babel/blob/main/packages/babel-plugin-proposalunicode-sets-regex/README.md\",\n },\n },\n });\n}\n\nconst getNameURLCombination = ({ name, url }: { name: string; url: string }) =>\n `${name} (${url})`;\n\n/*\nReturns a string of the format:\nSupport for the experimental syntax [@babel/parser plugin name] isn't currently enabled ([loc]):\n\n[code frame]\n\nAdd [npm package name] ([url]) to the 'plugins' section of your Babel config\nto enable [parsing|transformation].\n*/\nexport default function generateMissingPluginMessage(\n missingPluginName: string,\n loc: {\n line: number;\n column: number;\n },\n codeFrame: string,\n filename: string,\n): string {\n let helpMessage =\n `Support for the experimental syntax '${missingPluginName}' isn't currently enabled ` +\n `(${loc.line}:${loc.column + 1}):\\n\\n` +\n codeFrame;\n const pluginInfo = pluginNameMap[missingPluginName];\n if (pluginInfo) {\n const { syntax: syntaxPlugin, transform: transformPlugin } = pluginInfo;\n if (syntaxPlugin) {\n const syntaxPluginInfo = getNameURLCombination(syntaxPlugin);\n if (transformPlugin) {\n const transformPluginInfo = getNameURLCombination(transformPlugin);\n const sectionType = transformPlugin.name.startsWith(\"@babel/plugin\")\n ? \"plugins\"\n : \"presets\";\n helpMessage += `\\n\\nAdd ${transformPluginInfo} to the '${sectionType}' section of your Babel config to enable transformation.\nIf you want to leave it as-is, add ${syntaxPluginInfo} to the 'plugins' section to enable parsing.`;\n } else {\n helpMessage +=\n `\\n\\nAdd ${syntaxPluginInfo} to the 'plugins' section of your Babel config ` +\n `to enable parsing.`;\n }\n }\n }\n\n const msgFilename =\n filename === \"unknown\" ? \"\" : filename;\n helpMessage += `\n\nIf you already added the plugin for this syntax to your config, it's possible that your config \\\nisn't being loaded.\nYou can re-run Babel with the BABEL_SHOW_CONFIG_FOR environment variable to show the loaded \\\nconfiguration:\n\\tnpx cross-env BABEL_SHOW_CONFIG_FOR=${msgFilename} \nSee https://babeljs.io/docs/configuration#print-effective-configs for more info.\n`;\n return helpMessage;\n}\n","import type { Handler } from \"gensync\";\nimport { parse, type File as ParseResult } from \"@babel/parser\";\nimport { codeFrameColumns } from \"@babel/code-frame\";\nimport generateMissingPluginMessage from \"./util/missing-plugin-helper.ts\";\nimport type { PluginPasses } from \"../config/index.ts\";\n\nexport type { ParseResult };\n\nexport default function* parser(\n pluginPasses: PluginPasses,\n { parserOpts, highlightCode = true, filename = \"unknown\" }: any,\n code: string,\n): Handler {\n try {\n const results = [];\n for (const plugins of pluginPasses) {\n for (const plugin of plugins) {\n const { parserOverride } = plugin;\n if (parserOverride) {\n const ast = parserOverride(code, parserOpts, parse);\n\n if (ast !== undefined) results.push(ast);\n }\n }\n }\n\n if (results.length === 0) {\n return parse(code, parserOpts);\n } else if (results.length === 1) {\n // @ts-expect-error - If we want to allow async parsers\n yield* [];\n if (typeof results[0].then === \"function\") {\n throw new Error(\n `You appear to be using an async parser plugin, ` +\n `which your current version of Babel does not support. ` +\n `If you're using a published plugin, you may need to upgrade ` +\n `your @babel/core version.`,\n );\n }\n return results[0];\n }\n // TODO: Add an error code\n throw new Error(\"More than one plugin attempted to override parsing.\");\n } catch (err) {\n if (err.code === \"BABEL_PARSER_SOURCETYPE_MODULE_REQUIRED\") {\n err.message +=\n \"\\nConsider renaming the file to '.mjs', or setting sourceType:module \" +\n \"or sourceType:unambiguous in your Babel config for this file.\";\n // err.code will be changed to BABEL_PARSE_ERROR later.\n }\n\n const { loc, missingPlugin } = err;\n if (loc) {\n const codeFrame = codeFrameColumns(\n code,\n {\n start: {\n line: loc.line,\n column: loc.column + 1,\n },\n },\n {\n highlightCode,\n },\n );\n if (missingPlugin) {\n err.message =\n `${filename}: ` +\n generateMissingPluginMessage(\n missingPlugin[0],\n loc,\n codeFrame,\n filename,\n );\n } else {\n err.message = `${filename}: ${err.message}\\n\\n` + codeFrame;\n }\n err.code = \"BABEL_PARSE_ERROR\";\n }\n throw err;\n }\n}\n","//https://github.com/babel/babel/pull/14583#discussion_r882828856\nfunction deepClone(value: any, cache: Map): any {\n if (value !== null) {\n if (cache.has(value)) return cache.get(value);\n let cloned: any;\n if (Array.isArray(value)) {\n cloned = new Array(value.length);\n cache.set(value, cloned);\n for (let i = 0; i < value.length; i++) {\n cloned[i] =\n typeof value[i] !== \"object\" ? value[i] : deepClone(value[i], cache);\n }\n } else {\n cloned = {};\n cache.set(value, cloned);\n const keys = Object.keys(value);\n for (let i = 0; i < keys.length; i++) {\n const key = keys[i];\n cloned[key] =\n typeof value[key] !== \"object\"\n ? value[key]\n : deepClone(value[key], cache);\n }\n }\n return cloned;\n }\n return value;\n}\n\nexport default function (value: T): T {\n if (typeof value !== \"object\") return value;\n return deepClone(value, new Map());\n}\n","import fs from \"fs\";\nimport path from \"path\";\nimport buildDebug from \"debug\";\nimport type { Handler } from \"gensync\";\nimport { file, traverseFast } from \"@babel/types\";\nimport type * as t from \"@babel/types\";\nimport type { PluginPasses } from \"../config/index.ts\";\nimport convertSourceMap from \"convert-source-map\";\nimport type { SourceMapConverter as Converter } from \"convert-source-map\";\nimport File from \"./file/file.ts\";\nimport parser from \"../parser/index.ts\";\nimport cloneDeep from \"./util/clone-deep.ts\";\n\nconst debug = buildDebug(\"babel:transform:file\");\n\n// These regexps are copied from the convert-source-map package,\n// but without // or /* at the beginning of the comment.\n\nconst INLINE_SOURCEMAP_REGEX =\n /^[@#]\\s+sourceMappingURL=data:(?:application|text)\\/json;(?:charset[:=]\\S+?;)?base64,.*$/;\nconst EXTERNAL_SOURCEMAP_REGEX =\n /^[@#][ \\t]+sourceMappingURL=([^\\s'\"`]+)[ \\t]*$/;\n\nexport type NormalizedFile = {\n code: string;\n ast: t.File;\n inputMap: Converter | null;\n};\n\nexport default function* normalizeFile(\n pluginPasses: PluginPasses,\n options: { [key: string]: any },\n code: string,\n ast?: t.File | t.Program | null,\n): Handler {\n code = `${code || \"\"}`;\n\n if (ast) {\n if (ast.type === \"Program\") {\n ast = file(ast, [], []);\n } else if (ast.type !== \"File\") {\n throw new Error(\"AST root must be a Program or File node\");\n }\n\n if (options.cloneInputAst) {\n ast = cloneDeep(ast);\n }\n } else {\n // @ts-expect-error todo: use babel-types ast typings in Babel parser\n ast = yield* parser(pluginPasses, options, code);\n }\n\n let inputMap = null;\n if (options.inputSourceMap !== false) {\n // If an explicit object is passed in, it overrides the processing of\n // source maps that may be in the file itself.\n if (typeof options.inputSourceMap === \"object\") {\n inputMap = convertSourceMap.fromObject(options.inputSourceMap);\n }\n\n if (!inputMap) {\n const lastComment = extractComments(INLINE_SOURCEMAP_REGEX, ast);\n if (lastComment) {\n try {\n inputMap = convertSourceMap.fromComment(\"//\" + lastComment);\n } catch (err) {\n if (process.env.BABEL_8_BREAKING) {\n console.warn(\n \"discarding unknown inline input sourcemap\",\n options.filename,\n err,\n );\n } else {\n debug(\"discarding unknown inline input sourcemap\");\n }\n }\n }\n }\n\n if (!inputMap) {\n const lastComment = extractComments(EXTERNAL_SOURCEMAP_REGEX, ast);\n if (typeof options.filename === \"string\" && lastComment) {\n try {\n // when `lastComment` is non-null, EXTERNAL_SOURCEMAP_REGEX must have matches\n const match: [string, string] = EXTERNAL_SOURCEMAP_REGEX.exec(\n lastComment,\n ) as any;\n const inputMapContent = fs.readFileSync(\n path.resolve(path.dirname(options.filename), match[1]),\n \"utf8\",\n );\n inputMap = convertSourceMap.fromJSON(inputMapContent);\n } catch (err) {\n debug(\"discarding unknown file input sourcemap\", err);\n }\n } else if (lastComment) {\n debug(\"discarding un-loadable file input sourcemap\");\n }\n }\n }\n\n return new File(options, {\n code,\n ast: ast as t.File,\n inputMap,\n });\n}\n\nfunction extractCommentsFromList(\n regex: RegExp,\n comments: t.Comment[],\n lastComment: string | null,\n): [t.Comment[], string | null] {\n if (comments) {\n comments = comments.filter(({ value }) => {\n if (regex.test(value)) {\n lastComment = value;\n return false;\n }\n return true;\n });\n }\n return [comments, lastComment];\n}\n\nfunction extractComments(regex: RegExp, ast: t.Node) {\n let lastComment: string = null;\n traverseFast(ast, node => {\n [node.leadingComments, lastComment] = extractCommentsFromList(\n regex,\n node.leadingComments,\n lastComment,\n );\n [node.innerComments, lastComment] = extractCommentsFromList(\n regex,\n node.innerComments,\n lastComment,\n );\n [node.trailingComments, lastComment] = extractCommentsFromList(\n regex,\n node.trailingComments,\n lastComment,\n );\n });\n return lastComment;\n}\n","(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@jridgewell/set-array'), require('@jridgewell/sourcemap-codec')) :\n typeof define === 'function' && define.amd ? define(['exports', '@jridgewell/set-array', '@jridgewell/sourcemap-codec'], factory) :\n (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.genMapping = {}, global.setArray, global.sourcemapCodec));\n})(this, (function (exports, setArray, sourcemapCodec) { 'use strict';\n\n /**\n * A low-level API to associate a generated position with an original source position. Line and\n * column here are 0-based, unlike `addMapping`.\n */\n exports.addSegment = void 0;\n /**\n * A high-level API to associate a generated position with an original source position. Line is\n * 1-based, but column is 0-based, due to legacy behavior in `source-map` library.\n */\n exports.addMapping = void 0;\n /**\n * Adds/removes the content of the source file to the source map.\n */\n exports.setSourceContent = void 0;\n /**\n * Returns a sourcemap object (with decoded mappings) suitable for passing to a library that expects\n * a sourcemap, or to JSON.stringify.\n */\n exports.decodedMap = void 0;\n /**\n * Returns a sourcemap object (with encoded mappings) suitable for passing to a library that expects\n * a sourcemap, or to JSON.stringify.\n */\n exports.encodedMap = void 0;\n /**\n * Returns an array of high-level mapping objects for every recorded segment, which could then be\n * passed to the `source-map` library.\n */\n exports.allMappings = void 0;\n /**\n * Provides the state to generate a sourcemap.\n */\n class GenMapping {\n constructor({ file, sourceRoot } = {}) {\n this._names = new setArray.SetArray();\n this._sources = new setArray.SetArray();\n this._sourcesContent = [];\n this._mappings = [];\n this.file = file;\n this.sourceRoot = sourceRoot;\n }\n }\n (() => {\n exports.addSegment = (map, genLine, genColumn, source, sourceLine, sourceColumn, name) => {\n const { _mappings: mappings, _sources: sources, _sourcesContent: sourcesContent, _names: names, } = map;\n const line = getLine(mappings, genLine);\n if (source == null) {\n const seg = [genColumn];\n const index = getColumnIndex(line, genColumn, seg);\n return insert(line, index, seg);\n }\n const sourcesIndex = setArray.put(sources, source);\n const seg = name\n ? [genColumn, sourcesIndex, sourceLine, sourceColumn, setArray.put(names, name)]\n : [genColumn, sourcesIndex, sourceLine, sourceColumn];\n const index = getColumnIndex(line, genColumn, seg);\n if (sourcesIndex === sourcesContent.length)\n sourcesContent[sourcesIndex] = null;\n insert(line, index, seg);\n };\n exports.addMapping = (map, mapping) => {\n const { generated, source, original, name } = mapping;\n return exports.addSegment(map, generated.line - 1, generated.column, source, original == null ? undefined : original.line - 1, original === null || original === void 0 ? void 0 : original.column, name);\n };\n exports.setSourceContent = (map, source, content) => {\n const { _sources: sources, _sourcesContent: sourcesContent } = map;\n sourcesContent[setArray.put(sources, source)] = content;\n };\n exports.decodedMap = (map) => {\n const { file, sourceRoot, _mappings: mappings, _sources: sources, _sourcesContent: sourcesContent, _names: names, } = map;\n return {\n version: 3,\n file,\n names: names.array,\n sourceRoot: sourceRoot || undefined,\n sources: sources.array,\n sourcesContent,\n mappings,\n };\n };\n exports.encodedMap = (map) => {\n const decoded = exports.decodedMap(map);\n return Object.assign(Object.assign({}, decoded), { mappings: sourcemapCodec.encode(decoded.mappings) });\n };\n exports.allMappings = (map) => {\n const out = [];\n const { _mappings: mappings, _sources: sources, _names: names } = map;\n for (let i = 0; i < mappings.length; i++) {\n const line = mappings[i];\n for (let j = 0; j < line.length; j++) {\n const seg = line[j];\n const generated = { line: i + 1, column: seg[0] };\n let source = undefined;\n let original = undefined;\n let name = undefined;\n if (seg.length !== 1) {\n source = sources.array[seg[1]];\n original = { line: seg[2] + 1, column: seg[3] };\n if (seg.length === 5)\n name = names.array[seg[4]];\n }\n out.push({ generated, source, original, name });\n }\n }\n return out;\n };\n })();\n function getLine(mappings, index) {\n for (let i = mappings.length; i <= index; i++) {\n mappings[i] = [];\n }\n return mappings[index];\n }\n function getColumnIndex(line, column, seg) {\n let index = line.length;\n for (let i = index - 1; i >= 0; i--, index--) {\n const current = line[i];\n const col = current[0];\n if (col > column)\n continue;\n if (col < column)\n break;\n const cmp = compare(current, seg);\n if (cmp === 0)\n return index;\n if (cmp < 0)\n break;\n }\n return index;\n }\n function compare(a, b) {\n let cmp = compareNum(a.length, b.length);\n if (cmp !== 0)\n return cmp;\n // We've already checked genColumn\n if (a.length === 1)\n return 0;\n cmp = compareNum(a[1], b[1]);\n if (cmp !== 0)\n return cmp;\n cmp = compareNum(a[2], b[2]);\n if (cmp !== 0)\n return cmp;\n cmp = compareNum(a[3], b[3]);\n if (cmp !== 0)\n return cmp;\n if (a.length === 4)\n return 0;\n return compareNum(a[4], b[4]);\n }\n function compareNum(a, b) {\n return a - b;\n }\n function insert(array, index, value) {\n if (index === -1)\n return;\n for (let i = array.length; i > index; i--) {\n array[i] = array[i - 1];\n }\n array[index] = value;\n }\n\n exports.GenMapping = GenMapping;\n\n Object.defineProperty(exports, '__esModule', { value: true });\n\n}));\n//# sourceMappingURL=gen-mapping.umd.js.map\n","import { decodedMappings, traceSegment, TraceMap } from '@jridgewell/trace-mapping';\nimport { GenMapping, addSegment, setSourceContent, decodedMap, encodedMap } from '@jridgewell/gen-mapping';\n\nconst SOURCELESS_MAPPING = {\n source: null,\n column: null,\n line: null,\n name: null,\n content: null,\n};\nconst EMPTY_SOURCES = [];\nfunction Source(map, sources, source, content) {\n return {\n map,\n sources,\n source,\n content,\n };\n}\n/**\n * MapSource represents a single sourcemap, with the ability to trace mappings into its child nodes\n * (which may themselves be SourceMapTrees).\n */\nfunction MapSource(map, sources) {\n return Source(map, sources, '', null);\n}\n/**\n * A \"leaf\" node in the sourcemap tree, representing an original, unmodified source file. Recursive\n * segment tracing ends at the `OriginalSource`.\n */\nfunction OriginalSource(source, content) {\n return Source(null, EMPTY_SOURCES, source, content);\n}\n/**\n * traceMappings is only called on the root level SourceMapTree, and begins the process of\n * resolving each mapping in terms of the original source files.\n */\nfunction traceMappings(tree) {\n const gen = new GenMapping({ file: tree.map.file });\n const { sources: rootSources, map } = tree;\n const rootNames = map.names;\n const rootMappings = decodedMappings(map);\n for (let i = 0; i < rootMappings.length; i++) {\n const segments = rootMappings[i];\n let lastSource = null;\n let lastSourceLine = null;\n let lastSourceColumn = null;\n for (let j = 0; j < segments.length; j++) {\n const segment = segments[j];\n const genCol = segment[0];\n let traced = SOURCELESS_MAPPING;\n // 1-length segments only move the current generated column, there's no source information\n // to gather from it.\n if (segment.length !== 1) {\n const source = rootSources[segment[1]];\n traced = originalPositionFor(source, segment[2], segment[3], segment.length === 5 ? rootNames[segment[4]] : '');\n // If the trace is invalid, then the trace ran into a sourcemap that doesn't contain a\n // respective segment into an original source.\n if (traced == null)\n continue;\n }\n // So we traced a segment down into its original source file. Now push a\n // new segment pointing to this location.\n const { column, line, name, content, source } = traced;\n if (line === lastSourceLine && column === lastSourceColumn && source === lastSource) {\n continue;\n }\n lastSourceLine = line;\n lastSourceColumn = column;\n lastSource = source;\n // Sigh, TypeScript can't figure out source/line/column are either all null, or all non-null...\n addSegment(gen, i, genCol, source, line, column, name);\n if (content != null)\n setSourceContent(gen, source, content);\n }\n }\n return gen;\n}\n/**\n * originalPositionFor is only called on children SourceMapTrees. It recurses down into its own\n * child SourceMapTrees, until we find the original source map.\n */\nfunction originalPositionFor(source, line, column, name) {\n if (!source.map) {\n return { column, line, name, source: source.source, content: source.content };\n }\n const segment = traceSegment(source.map, line, column);\n // If we couldn't find a segment, then this doesn't exist in the sourcemap.\n if (segment == null)\n return null;\n // 1-length segments only move the current generated column, there's no source information\n // to gather from it.\n if (segment.length === 1)\n return SOURCELESS_MAPPING;\n return originalPositionFor(source.sources[segment[1]], segment[2], segment[3], segment.length === 5 ? source.map.names[segment[4]] : name);\n}\n\nfunction asArray(value) {\n if (Array.isArray(value))\n return value;\n return [value];\n}\n/**\n * Recursively builds a tree structure out of sourcemap files, with each node\n * being either an `OriginalSource` \"leaf\" or a `SourceMapTree` composed of\n * `OriginalSource`s and `SourceMapTree`s.\n *\n * Every sourcemap is composed of a collection of source files and mappings\n * into locations of those source files. When we generate a `SourceMapTree` for\n * the sourcemap, we attempt to load each source file's own sourcemap. If it\n * does not have an associated sourcemap, it is considered an original,\n * unmodified source file.\n */\nfunction buildSourceMapTree(input, loader) {\n const maps = asArray(input).map((m) => new TraceMap(m, ''));\n const map = maps.pop();\n for (let i = 0; i < maps.length; i++) {\n if (maps[i].sources.length > 1) {\n throw new Error(`Transformation map ${i} must have exactly one source file.\\n` +\n 'Did you specify these with the most recent transformation maps first?');\n }\n }\n let tree = build(map, loader, '', 0);\n for (let i = maps.length - 1; i >= 0; i--) {\n tree = MapSource(maps[i], [tree]);\n }\n return tree;\n}\nfunction build(map, loader, importer, importerDepth) {\n const { resolvedSources, sourcesContent } = map;\n const depth = importerDepth + 1;\n const children = resolvedSources.map((sourceFile, i) => {\n // The loading context gives the loader more information about why this file is being loaded\n // (eg, from which importer). It also allows the loader to override the location of the loaded\n // sourcemap/original source, or to override the content in the sourcesContent field if it's\n // an unmodified source file.\n const ctx = {\n importer,\n depth,\n source: sourceFile || '',\n content: undefined,\n };\n // Use the provided loader callback to retrieve the file's sourcemap.\n // TODO: We should eventually support async loading of sourcemap files.\n const sourceMap = loader(ctx.source, ctx);\n const { source, content } = ctx;\n // If there is a sourcemap, then we need to recurse into it to load its source files.\n if (sourceMap)\n return build(new TraceMap(sourceMap, source), loader, source, depth);\n // Else, it's an an unmodified source file.\n // The contents of this unmodified source file can be overridden via the loader context,\n // allowing it to be explicitly null or a string. If it remains undefined, we fall back to\n // the importing sourcemap's `sourcesContent` field.\n const sourceContent = content !== undefined ? content : sourcesContent ? sourcesContent[i] : null;\n return OriginalSource(source, sourceContent);\n });\n return MapSource(map, children);\n}\n\n/**\n * A SourceMap v3 compatible sourcemap, which only includes fields that were\n * provided to it.\n */\nclass SourceMap {\n constructor(map, options) {\n const out = options.decodedMappings ? decodedMap(map) : encodedMap(map);\n this.version = out.version; // SourceMap spec says this should be first.\n this.file = out.file;\n this.mappings = out.mappings;\n this.names = out.names;\n this.sourceRoot = out.sourceRoot;\n this.sources = out.sources;\n if (!options.excludeContent) {\n this.sourcesContent = out.sourcesContent;\n }\n }\n toString() {\n return JSON.stringify(this);\n }\n}\n\n/**\n * Traces through all the mappings in the root sourcemap, through the sources\n * (and their sourcemaps), all the way back to the original source location.\n *\n * `loader` will be called every time we encounter a source file. If it returns\n * a sourcemap, we will recurse into that sourcemap to continue the trace. If\n * it returns a falsey value, that source file is treated as an original,\n * unmodified source file.\n *\n * Pass `excludeContent` to exclude any self-containing source file content\n * from the output sourcemap.\n *\n * Pass `decodedMappings` to receive a SourceMap with decoded (instead of\n * VLQ encoded) mappings.\n */\nfunction remapping(input, loader, options) {\n const opts = typeof options === 'object' ? options : { excludeContent: !!options, decodedMappings: false };\n const tree = buildSourceMapTree(input, loader);\n return new SourceMap(traceMappings(tree), opts);\n}\n\nexport { remapping as default };\n//# sourceMappingURL=remapping.mjs.map\n","type SourceMap = any;\nimport remapping from \"@ampproject/remapping\";\n\nexport default function mergeSourceMap(\n inputMap: SourceMap,\n map: SourceMap,\n sourceFileName: string,\n): SourceMap {\n // On win32 machines, the sourceFileName uses backslash paths like\n // `C:\\foo\\bar.js`. But sourcemaps are always posix paths, so we need to\n // normalize to regular slashes before we can merge (else we won't find the\n // source associated with our input map).\n // This mirrors code done while generating the output map at\n // https://github.com/babel/babel/blob/5c2fcadc9ae34fd20dd72b1111d5cf50476d700d/packages/babel-generator/src/source-map.ts#L102\n const source = sourceFileName.replace(/\\\\/g, \"/\");\n\n // Prevent an infinite recursion if one of the input map's sources has the\n // same resolved path as the input map. In the case, it would keep find the\n // input map, then get it's sources which will include a path like the input\n // map, on and on.\n let found = false;\n const result = remapping(rootless(map), (s, ctx) => {\n if (s === source && !found) {\n found = true;\n // We empty the source location, which will prevent the sourcemap from\n // becoming relative to the input's location. Eg, if we're transforming a\n // file 'foo/bar.js', and it is a transformation of a `baz.js` file in the\n // same directory, the expected output is just `baz.js`. Without this step,\n // it would become `foo/baz.js`.\n ctx.source = \"\";\n\n return rootless(inputMap);\n }\n\n return null;\n });\n\n if (typeof inputMap.sourceRoot === \"string\") {\n result.sourceRoot = inputMap.sourceRoot;\n }\n\n // remapping returns a SourceMap class type, but this breaks code downstream in\n // @babel/traverse and @babel/types that relies on data being plain objects.\n // When it encounters the sourcemap type it outputs a \"don't know how to turn\n // this value into a node\" error. As a result, we are converting the merged\n // sourcemap to a plain js object.\n return { ...result };\n}\n\nfunction rootless(map: SourceMap): SourceMap {\n return {\n ...map,\n\n // This is a bit hack. Remapping will create absolute sources in our\n // sourcemap, but we want to maintain sources relative to the sourceRoot.\n // We'll re-add the sourceRoot after remapping.\n sourceRoot: null,\n };\n}\n","import type { PluginPasses } from \"../../config/index.ts\";\nimport convertSourceMap from \"convert-source-map\";\nimport type { GeneratorResult } from \"@babel/generator\";\nimport generate from \"@babel/generator\";\n\nimport type File from \"./file.ts\";\nimport mergeSourceMap from \"./merge-map.ts\";\n\nexport default function generateCode(\n pluginPasses: PluginPasses,\n file: File,\n): {\n outputCode: string;\n outputMap: GeneratorResult[\"map\"] | null;\n} {\n const { opts, ast, code, inputMap } = file;\n const { generatorOpts } = opts;\n\n generatorOpts.inputSourceMap = inputMap?.toObject();\n\n const results = [];\n for (const plugins of pluginPasses) {\n for (const plugin of plugins) {\n const { generatorOverride } = plugin;\n if (generatorOverride) {\n const result = generatorOverride(ast, generatorOpts, code, generate);\n\n if (result !== undefined) results.push(result);\n }\n }\n }\n\n let result;\n if (results.length === 0) {\n result = generate(ast, generatorOpts, code);\n } else if (results.length === 1) {\n result = results[0];\n\n if (typeof result.then === \"function\") {\n throw new Error(\n `You appear to be using an async codegen plugin, ` +\n `which your current version of Babel does not support. ` +\n `If you're using a published plugin, ` +\n `you may need to upgrade your @babel/core version.`,\n );\n }\n } else {\n throw new Error(\"More than one plugin attempted to override codegen.\");\n }\n\n // Decoded maps are faster to merge, so we attempt to get use the decodedMap\n // first. But to preserve backwards compat with older Generator, we'll fall\n // back to the encoded map.\n let { code: outputCode, decodedMap: outputMap = result.map } = result;\n\n // For backwards compat.\n if (result.__mergedMap) {\n /**\n * @see mergeSourceMap\n */\n outputMap = { ...result.map };\n } else {\n if (outputMap) {\n if (inputMap) {\n // mergeSourceMap returns an encoded map\n outputMap = mergeSourceMap(\n inputMap.toObject(),\n outputMap,\n generatorOpts.sourceFileName,\n );\n } else {\n // We cannot output a decoded map, so retrieve the encoded form. Because\n // the decoded form is free, it's fine to prioritize decoded first.\n outputMap = result.map;\n }\n }\n }\n\n if (opts.sourceMaps === \"inline\" || opts.sourceMaps === \"both\") {\n outputCode += \"\\n\" + convertSourceMap.fromObject(outputMap).toComment();\n }\n\n if (opts.sourceMaps === \"inline\") {\n outputMap = null;\n }\n\n return { outputCode, outputMap };\n}\n","import traverse from \"@babel/traverse\";\nimport type * as t from \"@babel/types\";\nimport type { GeneratorResult } from \"@babel/generator\";\n\nimport type { Handler } from \"gensync\";\n\nimport type { ResolvedConfig, Plugin, PluginPasses } from \"../config/index.ts\";\n\nimport PluginPass from \"./plugin-pass.ts\";\nimport loadBlockHoistPlugin from \"./block-hoist-plugin.ts\";\nimport normalizeOptions from \"./normalize-opts.ts\";\nimport normalizeFile from \"./normalize-file.ts\";\n\nimport generateCode from \"./file/generate.ts\";\nimport type File from \"./file/file.ts\";\n\nimport { flattenToSet } from \"../config/helpers/deep-array.ts\";\n\nexport type FileResultCallback = {\n (err: Error, file: null): void;\n (err: null, file: FileResult | null): void;\n};\n\nexport type FileResult = {\n metadata: { [key: string]: any };\n options: { [key: string]: any };\n ast: t.File | null;\n code: string | null;\n map: GeneratorResult[\"map\"] | null;\n sourceType: \"script\" | \"module\";\n externalDependencies: Set;\n};\n\nexport function* run(\n config: ResolvedConfig,\n code: string,\n ast?: t.File | t.Program | null,\n): Handler {\n const file = yield* normalizeFile(\n config.passes,\n normalizeOptions(config),\n code,\n ast,\n );\n\n const opts = file.opts;\n try {\n yield* transformFile(file, config.passes);\n } catch (e) {\n e.message = `${opts.filename ?? \"unknown file\"}: ${e.message}`;\n if (!e.code) {\n e.code = \"BABEL_TRANSFORM_ERROR\";\n }\n throw e;\n }\n\n let outputCode, outputMap;\n try {\n if (opts.code !== false) {\n ({ outputCode, outputMap } = generateCode(config.passes, file));\n }\n } catch (e) {\n e.message = `${opts.filename ?? \"unknown file\"}: ${e.message}`;\n if (!e.code) {\n e.code = \"BABEL_GENERATE_ERROR\";\n }\n throw e;\n }\n\n return {\n metadata: file.metadata,\n options: opts,\n ast: opts.ast === true ? file.ast : null,\n code: outputCode === undefined ? null : outputCode,\n map: outputMap === undefined ? null : outputMap,\n sourceType: file.ast.program.sourceType,\n externalDependencies: flattenToSet(config.externalDependencies),\n };\n}\n\nfunction* transformFile(file: File, pluginPasses: PluginPasses): Handler {\n for (const pluginPairs of pluginPasses) {\n const passPairs: [Plugin, PluginPass][] = [];\n const passes = [];\n const visitors = [];\n\n for (const plugin of pluginPairs.concat([loadBlockHoistPlugin()])) {\n const pass = new PluginPass(file, plugin.key, plugin.options);\n\n passPairs.push([plugin, pass]);\n passes.push(pass);\n visitors.push(plugin.visitor);\n }\n\n for (const [plugin, pass] of passPairs) {\n const fn = plugin.pre;\n if (fn) {\n // eslint-disable-next-line @typescript-eslint/no-confusing-void-expression\n const result = fn.call(pass, file);\n\n // @ts-expect-error - If we want to support async .pre\n yield* [];\n\n if (isThenable(result)) {\n throw new Error(\n `You appear to be using an plugin with an async .pre, ` +\n `which your current version of Babel does not support. ` +\n `If you're using a published plugin, you may need to upgrade ` +\n `your @babel/core version.`,\n );\n }\n }\n }\n\n // merge all plugin visitors into a single visitor\n const visitor = traverse.visitors.merge(\n visitors,\n passes,\n file.opts.wrapPluginVisitorMethod,\n );\n if (process.env.BABEL_8_BREAKING) {\n traverse(file.ast.program, visitor, file.scope, null, file.path, true);\n } else {\n traverse(file.ast, visitor, file.scope);\n }\n\n for (const [plugin, pass] of passPairs) {\n const fn = plugin.post;\n if (fn) {\n // eslint-disable-next-line @typescript-eslint/no-confusing-void-expression\n const result = fn.call(pass, file);\n\n // @ts-expect-error - If we want to support async .post\n yield* [];\n\n if (isThenable(result)) {\n throw new Error(\n `You appear to be using an plugin with an async .post, ` +\n `which your current version of Babel does not support. ` +\n `If you're using a published plugin, you may need to upgrade ` +\n `your @babel/core version.`,\n );\n }\n }\n }\n }\n}\n\nfunction isThenable>(val: any): val is T {\n return (\n !!val &&\n (typeof val === \"object\" || typeof val === \"function\") &&\n !!val.then &&\n typeof val.then === \"function\"\n );\n}\n","import gensync, { type Handler } from \"gensync\";\n\nimport loadConfig from \"./config/index.ts\";\nimport type { InputOptions, ResolvedConfig } from \"./config/index.ts\";\nimport { run } from \"./transformation/index.ts\";\n\nimport type { FileResult, FileResultCallback } from \"./transformation/index.ts\";\nimport { beginHiddenCallStack } from \"./errors/rewrite-stack-trace.ts\";\n\nexport type { FileResult } from \"./transformation/index.ts\";\n\ntype Transform = {\n (code: string, callback: FileResultCallback): void;\n (\n code: string,\n opts: InputOptions | undefined | null,\n callback: FileResultCallback,\n ): void;\n (code: string, opts?: InputOptions | null): FileResult | null;\n};\n\nconst transformRunner = gensync(function* transform(\n code: string,\n opts?: InputOptions,\n): Handler {\n const config: ResolvedConfig | null = yield* loadConfig(opts);\n if (config === null) return null;\n\n return yield* run(config, code);\n});\n\nexport const transform: Transform = function transform(\n code,\n optsOrCallback?: InputOptions | null | undefined | FileResultCallback,\n maybeCallback?: FileResultCallback,\n) {\n let opts: InputOptions | undefined | null;\n let callback: FileResultCallback | undefined;\n if (typeof optsOrCallback === \"function\") {\n callback = optsOrCallback;\n opts = undefined;\n } else {\n opts = optsOrCallback;\n callback = maybeCallback;\n }\n\n if (callback === undefined) {\n if (process.env.BABEL_8_BREAKING) {\n throw new Error(\n \"Starting from Babel 8.0.0, the 'transform' function expects a callback. If you need to call it synchronously, please use 'transformSync'.\",\n );\n } else {\n // console.warn(\n // \"Starting from Babel 8.0.0, the 'transform' function will expect a callback. If you need to call it synchronously, please use 'transformSync'.\",\n // );\n return beginHiddenCallStack(transformRunner.sync)(code, opts);\n }\n }\n\n beginHiddenCallStack(transformRunner.errback)(code, opts, callback);\n};\n\nexport function transformSync(\n ...args: Parameters\n) {\n return beginHiddenCallStack(transformRunner.sync)(...args);\n}\nexport function transformAsync(\n ...args: Parameters\n) {\n return beginHiddenCallStack(transformRunner.async)(...args);\n}\n","// duplicated from transform-file so we do not have to import anything here\ntype TransformFile = {\n (filename: string, callback: (error: Error, file: null) => void): void;\n (\n filename: string,\n opts: any,\n callback: (error: Error, file: null) => void,\n ): void;\n};\n\nexport const transformFile: TransformFile = function transformFile(\n filename,\n opts,\n callback?: (error: Error, file: null) => void,\n) {\n if (typeof opts === \"function\") {\n callback = opts;\n }\n\n callback(new Error(\"Transforming files is not supported in browsers\"), null);\n};\n\nexport function transformFileSync(): never {\n throw new Error(\"Transforming files is not supported in browsers\");\n}\n\nexport function transformFileAsync() {\n return Promise.reject(\n new Error(\"Transforming files is not supported in browsers\"),\n );\n}\n","import gensync, { type Handler } from \"gensync\";\n\nimport loadConfig from \"./config/index.ts\";\nimport type { InputOptions, ResolvedConfig } from \"./config/index.ts\";\nimport { run } from \"./transformation/index.ts\";\nimport type * as t from \"@babel/types\";\n\nimport { beginHiddenCallStack } from \"./errors/rewrite-stack-trace.ts\";\n\nimport type { FileResult, FileResultCallback } from \"./transformation/index.ts\";\ntype AstRoot = t.File | t.Program;\n\ntype TransformFromAst = {\n (ast: AstRoot, code: string, callback: FileResultCallback): void;\n (\n ast: AstRoot,\n code: string,\n opts: InputOptions | undefined | null,\n callback: FileResultCallback,\n ): void;\n (ast: AstRoot, code: string, opts?: InputOptions | null): FileResult | null;\n};\n\nconst transformFromAstRunner = gensync(function* (\n ast: AstRoot,\n code: string,\n opts: InputOptions | undefined | null,\n): Handler {\n const config: ResolvedConfig | null = yield* loadConfig(opts);\n if (config === null) return null;\n\n if (!ast) throw new Error(\"No AST given\");\n\n return yield* run(config, code, ast);\n});\n\nexport const transformFromAst: TransformFromAst = function transformFromAst(\n ast,\n code,\n optsOrCallback?: InputOptions | null | undefined | FileResultCallback,\n maybeCallback?: FileResultCallback,\n) {\n let opts: InputOptions | undefined | null;\n let callback: FileResultCallback | undefined;\n if (typeof optsOrCallback === \"function\") {\n callback = optsOrCallback;\n opts = undefined;\n } else {\n opts = optsOrCallback;\n callback = maybeCallback;\n }\n\n if (callback === undefined) {\n if (process.env.BABEL_8_BREAKING) {\n throw new Error(\n \"Starting from Babel 8.0.0, the 'transformFromAst' function expects a callback. If you need to call it synchronously, please use 'transformFromAstSync'.\",\n );\n } else {\n // console.warn(\n // \"Starting from Babel 8.0.0, the 'transformFromAst' function will expect a callback. If you need to call it synchronously, please use 'transformFromAstSync'.\",\n // );\n return beginHiddenCallStack(transformFromAstRunner.sync)(ast, code, opts);\n }\n }\n\n beginHiddenCallStack(transformFromAstRunner.errback)(\n ast,\n code,\n opts,\n callback,\n );\n};\n\nexport function transformFromAstSync(\n ...args: Parameters\n) {\n return beginHiddenCallStack(transformFromAstRunner.sync)(...args);\n}\n\nexport function transformFromAstAsync(\n ...args: Parameters\n) {\n return beginHiddenCallStack(transformFromAstRunner.async)(...args);\n}\n","import gensync, { type Handler } from \"gensync\";\n\nimport loadConfig, { type InputOptions } from \"./config/index.ts\";\nimport parser, { type ParseResult } from \"./parser/index.ts\";\nimport normalizeOptions from \"./transformation/normalize-opts.ts\";\nimport type { ValidatedOptions } from \"./config/validation/options.ts\";\n\nimport { beginHiddenCallStack } from \"./errors/rewrite-stack-trace.ts\";\n\ntype FileParseCallback = {\n (err: Error, ast: null): void;\n (err: null, ast: ParseResult | null): void;\n};\n\ntype Parse = {\n (code: string, callback: FileParseCallback): void;\n (\n code: string,\n opts: InputOptions | undefined | null,\n callback: FileParseCallback,\n ): void;\n (code: string, opts?: InputOptions | null): ParseResult | null;\n};\n\nconst parseRunner = gensync(function* parse(\n code: string,\n opts: InputOptions | undefined | null,\n): Handler {\n const config = yield* loadConfig(opts);\n\n if (config === null) {\n return null;\n }\n\n return yield* parser(config.passes, normalizeOptions(config), code);\n});\n\nexport const parse: Parse = function parse(\n code,\n opts?,\n callback?: FileParseCallback,\n) {\n if (typeof opts === \"function\") {\n callback = opts;\n opts = undefined as ValidatedOptions;\n }\n\n if (callback === undefined) {\n if (process.env.BABEL_8_BREAKING) {\n throw new Error(\n \"Starting from Babel 8.0.0, the 'parse' function expects a callback. If you need to call it synchronously, please use 'parseSync'.\",\n );\n } else {\n // console.warn(\n // \"Starting from Babel 8.0.0, the 'parse' function will expect a callback. If you need to call it synchronously, please use 'parseSync'.\",\n // );\n return beginHiddenCallStack(parseRunner.sync)(code, opts);\n }\n }\n\n beginHiddenCallStack(parseRunner.errback)(code, opts, callback);\n};\n\nexport function parseSync(...args: Parameters) {\n return beginHiddenCallStack(parseRunner.sync)(...args);\n}\nexport function parseAsync(...args: Parameters) {\n return beginHiddenCallStack(parseRunner.async)(...args);\n}\n","if (!process.env.IS_PUBLISH && !USE_ESM && process.env.BABEL_8_BREAKING) {\n throw new Error(\n \"BABEL_8_BREAKING is only supported in ESM. Please run `make use-esm`.\",\n );\n}\n\nexport const version = PACKAGE_JSON.version;\n\nexport { default as File } from \"./transformation/file/file.ts\";\nexport type { default as PluginPass } from \"./transformation/plugin-pass.ts\";\nexport { default as buildExternalHelpers } from \"./tools/build-external-helpers.ts\";\nexport { resolvePlugin, resolvePreset } from \"./config/files/index.ts\";\n\nexport { getEnv } from \"./config/helpers/environment.ts\";\n\n// NOTE: Lazy re-exports aren't detected by the Node.js CJS-ESM interop.\n// These are handled by pluginInjectNodeReexportsHints in our babel.config.js\n// so that they can work well.\nexport * as types from \"@babel/types\";\nexport { tokTypes } from \"@babel/parser\";\nexport { default as traverse } from \"@babel/traverse\";\nexport { default as template } from \"@babel/template\";\n\n// rollup-plugin-dts assumes that all re-exported types are also valid values\n// Visitor is only a type, so we need to use this workaround to prevent\n// rollup-plugin-dts from breaking it.\n// TODO: Figure out how to fix this upstream.\nexport type { NodePath, Scope } from \"@babel/traverse\";\nexport type Visitor = import(\"@babel/traverse\").Visitor;\n\nexport {\n createConfigItem,\n createConfigItemSync,\n createConfigItemAsync,\n} from \"./config/index.ts\";\n\nexport {\n loadPartialConfig,\n loadPartialConfigSync,\n loadPartialConfigAsync,\n loadOptions,\n loadOptionsAsync,\n} from \"./config/index.ts\";\nimport { loadOptionsSync } from \"./config/index.ts\";\nexport { loadOptionsSync };\n\nexport type {\n CallerMetadata,\n InputOptions,\n PluginAPI,\n PluginObject,\n PresetAPI,\n PresetObject,\n ConfigItem,\n} from \"./config/index.ts\";\n\nexport {\n transform,\n transformSync,\n transformAsync,\n type FileResult,\n} from \"./transform.ts\";\nexport {\n transformFile,\n transformFileSync,\n transformFileAsync,\n} from \"./transform-file.ts\";\nexport {\n transformFromAst,\n transformFromAstSync,\n transformFromAstAsync,\n} from \"./transform-ast.ts\";\nexport { parse, parseSync, parseAsync } from \"./parse.ts\";\n\n/**\n * Recommended set of compilable extensions. Not used in @babel/core directly, but meant as\n * as an easy source for tooling making use of @babel/core.\n */\nexport const DEFAULT_EXTENSIONS = Object.freeze([\n \".js\",\n \".jsx\",\n \".es6\",\n \".es\",\n \".mjs\",\n \".cjs\",\n] as const);\n\nimport Module from \"module\";\nimport * as thisFile from \"./index.ts\";\nif (USE_ESM && !IS_STANDALONE) {\n // Pass this module to the CJS proxy, so that it can be synchronously accessed.\n const cjsProxy = Module.createRequire(import.meta.url)(\"../cjs-proxy.cjs\");\n cjsProxy[\"__ initialize @babel/core cjs proxy __\"] = thisFile;\n}\n\nif (!process.env.BABEL_8_BREAKING && !USE_ESM) {\n // For easier backward-compatibility, provide an API like the one we exposed in Babel 6.\n // eslint-disable-next-line no-restricted-globals\n exports.OptionManager = class OptionManager {\n init(opts: unknown) {\n return loadOptionsSync(opts);\n }\n };\n\n // eslint-disable-next-line no-restricted-globals\n exports.Plugin = function Plugin(alias: string) {\n throw new Error(\n `The (${alias}) Babel 5 plugin is being run with an unsupported Babel version.`,\n );\n };\n}\n","export default function makeNoopPlugin() {\n let p;\n return ((p = (() => ({})) as any).default = p);\n}\n","/**\n * Since we bundle @babel/core, we don't need @babel/helper-plugin-utils\n * to handle older versions.\n */\n\nexport function declare(x: any) {\n return x;\n}\nexport { declare as declarePreset };\n","import { declare } from \"@babel/helper-plugin-utils\";\nimport { types as t } from \"@babel/core\";\n\nexport interface Options {\n helperVersion?: string;\n whitelist?: false | string[];\n}\n\nexport default declare((api, options: Options) => {\n api.assertVersion(REQUIRED_VERSION(7));\n\n const { helperVersion = \"7.0.0-beta.0\", whitelist = false } = options;\n\n if (\n whitelist !== false &&\n (!Array.isArray(whitelist) || whitelist.some(w => typeof w !== \"string\"))\n ) {\n throw new Error(\n \".whitelist must be undefined, false, or an array of strings\",\n );\n }\n\n const helperWhitelist = whitelist ? new Set(whitelist) : null;\n\n return {\n name: \"external-helpers\",\n pre(file) {\n file.set(\"helperGenerator\", (name: string) => {\n // If the helper didn't exist yet at the version given, we bail\n // out and let Babel either insert it directly, or throw an error\n // so that plugins can handle that case properly.\n if (\n file.availableHelper &&\n !file.availableHelper(name, helperVersion)\n ) {\n return;\n }\n\n // babelCore.buildExternalHelpers() allows a whitelist of helpers that\n // will be inserted into the external helpers list. That same whitelist\n // should be passed into the plugin here in that case, so that we can\n // avoid referencing 'babelHelpers.XX' when the helper does not exist.\n if (helperWhitelist && !helperWhitelist.has(name)) return;\n\n return t.memberExpression(\n t.identifier(\"babelHelpers\"),\n t.identifier(name),\n );\n });\n },\n };\n});\n","import { declare } from \"@babel/helper-plugin-utils\";\n\nexport default declare(api => {\n api.assertVersion(REQUIRED_VERSION(7));\n\n return {\n name: \"syntax-decimal\",\n\n manipulateOptions(opts, parserOpts) {\n parserOpts.plugins.push(\"decimal\");\n },\n };\n});\n","import { declare } from \"@babel/helper-plugin-utils\";\n\nexport interface Options {\n // TODO(Babel 8): Remove\n legacy?: boolean;\n // TODO(Babel 8): Remove \"2018-09\", \"2021-12\", '2022-03', '2023-01' and '2023-05'\n version?:\n | \"legacy\"\n | \"2018-09\"\n | \"2021-12\"\n | \"2022-03\"\n | \"2023-01\"\n | \"2023-05\"\n | \"2023-11\";\n // TODO(Babel 8): Remove\n decoratorsBeforeExport?: boolean;\n}\n\nexport default declare((api, options: Options) => {\n api.assertVersion(REQUIRED_VERSION(7));\n\n let { version } = options;\n\n if (process.env.BABEL_8_BREAKING) {\n if (version === undefined) {\n throw new Error(\n \"The decorators plugin requires a 'version' option, whose value must be one of: \" +\n \"'2023-11', '2023-05', '2023-01', '2022-03', '2021-12', '2018-09', or 'legacy'.\",\n );\n }\n if (\n version !== \"2023-11\" &&\n version !== \"2023-05\" &&\n version !== \"2023-01\" &&\n version !== \"2022-03\" &&\n version !== \"2021-12\" &&\n version !== \"legacy\"\n ) {\n throw new Error(\"Unsupported decorators version: \" + version);\n }\n if (options.legacy !== undefined) {\n throw new Error(\n `The .legacy option has been removed in Babel 8. Use .version: \"legacy\" instead.`,\n );\n }\n if (options.decoratorsBeforeExport !== undefined) {\n throw new Error(\n `The .decoratorsBeforeExport option has been removed in Babel 8.`,\n );\n }\n } else {\n const { legacy } = options;\n\n if (legacy !== undefined) {\n if (typeof legacy !== \"boolean\") {\n throw new Error(\".legacy must be a boolean.\");\n }\n if (version !== undefined) {\n throw new Error(\n \"You can either use the .legacy or the .version option, not both.\",\n );\n }\n }\n\n if (version === undefined) {\n version = legacy ? \"legacy\" : \"2018-09\";\n } else if (\n version !== \"2023-11\" &&\n version !== \"2023-05\" &&\n version !== \"2023-01\" &&\n version !== \"2022-03\" &&\n version !== \"2021-12\" &&\n version !== \"2018-09\" &&\n version !== \"legacy\"\n ) {\n // Fallback to print the invalid version option regardless of the type\n // eslint-disable-next-line @typescript-eslint/restrict-plus-operands\n throw new Error(\"Unsupported decorators version: \" + version);\n }\n\n // eslint-disable-next-line no-var\n var { decoratorsBeforeExport } = options;\n if (decoratorsBeforeExport === undefined) {\n if (version === \"2021-12\" || version === \"2022-03\") {\n decoratorsBeforeExport = false;\n } else if (version === \"2018-09\") {\n throw new Error(\n \"The decorators plugin, when .version is '2018-09' or not specified,\" +\n \" requires a 'decoratorsBeforeExport' option, whose value must be a boolean.\",\n );\n }\n } else {\n if (\n version === \"legacy\" ||\n version === \"2022-03\" ||\n version === \"2023-01\"\n ) {\n throw new Error(\n `'decoratorsBeforeExport' can't be used with ${version} decorators.`,\n );\n }\n if (typeof decoratorsBeforeExport !== \"boolean\") {\n throw new Error(\"'decoratorsBeforeExport' must be a boolean.\");\n }\n }\n }\n\n return {\n name: \"syntax-decorators\",\n\n manipulateOptions({ generatorOpts }, parserOpts) {\n if (version === \"legacy\") {\n parserOpts.plugins.push(\"decorators-legacy\");\n } else if (process.env.BABEL_8_BREAKING) {\n parserOpts.plugins.push(\n [\"decorators\", { allowCallParenthesized: false }],\n \"decoratorAutoAccessors\",\n );\n } else {\n if (\n version === \"2023-01\" ||\n version === \"2023-05\" ||\n version === \"2023-11\"\n ) {\n parserOpts.plugins.push(\n [\"decorators\", { allowCallParenthesized: false }],\n \"decoratorAutoAccessors\",\n );\n } else if (version === \"2022-03\") {\n parserOpts.plugins.push(\n [\n \"decorators\",\n { decoratorsBeforeExport: false, allowCallParenthesized: false },\n ],\n \"decoratorAutoAccessors\",\n );\n } else if (version === \"2021-12\") {\n parserOpts.plugins.push(\n [\"decorators\", { decoratorsBeforeExport }],\n \"decoratorAutoAccessors\",\n );\n generatorOpts.decoratorsBeforeExport = decoratorsBeforeExport;\n } else if (version === \"2018-09\") {\n parserOpts.plugins.push([\"decorators\", { decoratorsBeforeExport }]);\n generatorOpts.decoratorsBeforeExport = decoratorsBeforeExport;\n }\n }\n },\n };\n});\n","import { declare } from \"@babel/helper-plugin-utils\";\n\nexport default declare(api => {\n api.assertVersion(REQUIRED_VERSION(7));\n\n return {\n name: \"syntax-destructuring-private\",\n\n manipulateOptions(_, parserOpts) {\n parserOpts.plugins.push(\"destructuringPrivate\");\n },\n };\n});\n","import { declare } from \"@babel/helper-plugin-utils\";\n\nexport default declare(api => {\n api.assertVersion(REQUIRED_VERSION(7));\n\n return {\n name: \"syntax-do-expressions\",\n\n manipulateOptions(opts, parserOpts) {\n parserOpts.plugins.push(\"doExpressions\");\n },\n };\n});\n","import { declare } from \"@babel/helper-plugin-utils\";\n\nexport default declare(api => {\n api.assertVersion(REQUIRED_VERSION(7));\n\n return {\n name: \"syntax-explicit-resource-management\",\n\n manipulateOptions(opts, parserOpts) {\n parserOpts.plugins.push(\"explicitResourceManagement\");\n },\n };\n});\n","import { declare } from \"@babel/helper-plugin-utils\";\n\nexport default declare(api => {\n api.assertVersion(REQUIRED_VERSION(7));\n\n return {\n name: \"syntax-export-default-from\",\n\n manipulateOptions(opts, parserOpts) {\n parserOpts.plugins.push(\"exportDefaultFrom\");\n },\n };\n});\n","import { declare } from \"@babel/helper-plugin-utils\";\n\nexport interface Options {\n all?: boolean;\n enums?: boolean;\n}\n\nexport default declare((api, options: Options) => {\n api.assertVersion(REQUIRED_VERSION(7));\n\n // When enabled and plugins includes flow, all files should be parsed as if\n // the @flow pragma was provided.\n const { all, enums } = options;\n\n if (typeof all !== \"boolean\" && typeof all !== \"undefined\") {\n throw new Error(\".all must be a boolean, or undefined\");\n }\n\n if (typeof enums !== \"boolean\" && typeof enums !== \"undefined\") {\n throw new Error(\".enums must be a boolean, or undefined\");\n }\n\n return {\n name: \"syntax-flow\",\n\n manipulateOptions(opts, parserOpts) {\n if (!process.env.BABEL_8_BREAKING) {\n // If the file has already enabled TS, assume that this is not a\n // valid Flowtype file.\n if (\n parserOpts.plugins.some(\n p => (Array.isArray(p) ? p[0] : p) === \"typescript\",\n )\n ) {\n return;\n }\n }\n\n parserOpts.plugins.push([\"flow\", { all, enums }]);\n },\n };\n});\n","import { declare } from \"@babel/helper-plugin-utils\";\n\nexport default declare(api => {\n api.assertVersion(REQUIRED_VERSION(7));\n\n return {\n name: \"syntax-function-bind\",\n\n manipulateOptions(opts, parserOpts) {\n parserOpts.plugins.push(\"functionBind\");\n },\n };\n});\n","import { declare } from \"@babel/helper-plugin-utils\";\n\nexport default declare(api => {\n api.assertVersion(REQUIRED_VERSION(7));\n\n return {\n name: \"syntax-function-sent\",\n\n manipulateOptions(opts, parserOpts) {\n parserOpts.plugins.push(\"functionSent\");\n },\n };\n});\n","import { declare } from \"@babel/helper-plugin-utils\";\n\nexport default declare(api => {\n api.assertVersion(REQUIRED_VERSION(7));\n\n return {\n name: \"syntax-import-assertions\",\n\n manipulateOptions(opts, parserOpts) {\n parserOpts.plugins.push(\"importAssertions\");\n },\n };\n});\n","import { declare } from \"@babel/helper-plugin-utils\";\n\nexport interface Options {\n deprecatedAssertSyntax?: boolean;\n}\n\nexport default declare((api, { deprecatedAssertSyntax }: Options) => {\n api.assertVersion(REQUIRED_VERSION(\"^7.22.0\"));\n\n if (\n deprecatedAssertSyntax != null &&\n typeof deprecatedAssertSyntax !== \"boolean\"\n ) {\n throw new Error(\n \"'deprecatedAssertSyntax' must be a boolean, if specified.\",\n );\n }\n\n return {\n name: \"syntax-import-attributes\",\n\n manipulateOptions({ parserOpts, generatorOpts }) {\n generatorOpts.importAttributesKeyword ??= \"with\";\n parserOpts.plugins.push([\n \"importAttributes\",\n { deprecatedAssertSyntax: Boolean(deprecatedAssertSyntax) },\n ]);\n },\n };\n});\n","import { declare } from \"@babel/helper-plugin-utils\";\n\nexport default declare(api => {\n api.assertVersion(REQUIRED_VERSION(7));\n\n return {\n name: \"syntax-import-reflection\",\n\n manipulateOptions(_, parserOpts) {\n parserOpts.plugins.push(\"importReflection\");\n },\n };\n});\n","import { declare } from \"@babel/helper-plugin-utils\";\n\nexport default declare(api => {\n api.assertVersion(REQUIRED_VERSION(7));\n\n return {\n name: \"syntax-jsx\",\n\n manipulateOptions(opts, parserOpts) {\n if (!process.env.BABEL_8_BREAKING) {\n // If the Typescript plugin already ran, it will have decided whether\n // or not this is a TSX file.\n if (\n parserOpts.plugins.some(\n p => (Array.isArray(p) ? p[0] : p) === \"typescript\",\n )\n ) {\n return;\n }\n }\n\n parserOpts.plugins.push(\"jsx\");\n },\n };\n});\n","import { declare } from \"@babel/helper-plugin-utils\";\n\nexport default declare(api => {\n api.assertVersion(REQUIRED_VERSION(7));\n\n return {\n name: \"syntax-module-blocks\",\n\n manipulateOptions(opts, parserOpts) {\n parserOpts.plugins.push(\"moduleBlocks\");\n },\n };\n});\n","import { declare } from \"@babel/helper-plugin-utils\";\nimport { OptionValidator } from \"@babel/helper-validator-option\";\n\nconst v = new OptionValidator(PACKAGE_JSON.name);\n\nexport interface Options {\n version: \"2023-07\";\n}\n\nexport default declare((api, options: Options) => {\n api.assertVersion(REQUIRED_VERSION(\"^7.23.0\"));\n\n v.validateTopLevelOptions(options, { version: \"version\" });\n const { version } = options;\n v.invariant(\n version === \"2023-07\",\n \"'.version' option required, representing the last proposal update. \" +\n \"Currently, the only supported value is '2023-07'.\",\n );\n\n return {\n name: \"syntax-optional-chaining-assign\",\n\n manipulateOptions(opts, parserOpts) {\n parserOpts.plugins.push([\"optionalChainingAssign\", { version }]);\n },\n };\n});\n","import { declare } from \"@babel/helper-plugin-utils\";\n\nconst PIPELINE_PROPOSALS = [\"minimal\", \"fsharp\", \"hack\", \"smart\"] as const;\nconst TOPIC_TOKENS = [\"^^\", \"@@\", \"^\", \"%\", \"#\"] as const;\nconst documentationURL =\n \"https://babeljs.io/docs/en/babel-plugin-proposal-pipeline-operator\";\n\nexport interface Options {\n proposal: (typeof PIPELINE_PROPOSALS)[number];\n topicToken?: (typeof TOPIC_TOKENS)[number];\n}\n\nexport default declare((api, { proposal, topicToken }: Options) => {\n api.assertVersion(REQUIRED_VERSION(7));\n\n if (typeof proposal !== \"string\" || !PIPELINE_PROPOSALS.includes(proposal)) {\n const proposalList = PIPELINE_PROPOSALS.map(p => `\"${p}\"`).join(\", \");\n throw new Error(\n `The pipeline plugin requires a \"proposal\" option. \"proposal\" must be one of: ${proposalList}. See <${documentationURL}>.`,\n );\n }\n\n if (proposal === \"hack\" && !TOPIC_TOKENS.includes(topicToken)) {\n const topicTokenList = TOPIC_TOKENS.map(t => `\"${t}\"`).join(\", \");\n throw new Error(\n `The pipeline plugin in \"proposal\": \"hack\" mode also requires a \"topicToken\" option. \"topicToken\" must be one of: ${topicTokenList}. See <${documentationURL}>.`,\n );\n }\n\n return {\n name: \"syntax-pipeline-operator\",\n\n manipulateOptions(opts, parserOpts) {\n // Add parser options.\n parserOpts.plugins.push([\"pipelineOperator\", { proposal, topicToken }]);\n\n // Add generator options.\n opts.generatorOpts.topicToken = topicToken;\n },\n };\n});\n","import { declare } from \"@babel/helper-plugin-utils\";\n\nexport interface Options {\n syntaxType: \"hash\" | \"bar\";\n}\n\nexport default declare((api, options: Options) => {\n api.assertVersion(REQUIRED_VERSION(7));\n if (process.env.BABEL_8_BREAKING) {\n if (options.syntaxType === \"bar\") {\n throw new Error(\n '@babel/plugin-proposal-record-and-tuple: The syntaxType option is no longer supported. Please remove { syntaxType: \"bar\" } from your Babel config and migrate to the hash syntax #{} and #[].',\n );\n } else if (options.syntaxType === \"hash\") {\n throw new Error(\n '@babel/plugin-proposal-record-and-tuple: The syntaxType option is no longer supported. You can safely remove { syntaxType: \"hash\" } from your Babel config.',\n );\n }\n }\n\n return {\n name: \"syntax-record-and-tuple\",\n\n manipulateOptions(opts, parserOpts) {\n if (process.env.BABEL_8_BREAKING) {\n parserOpts.plugins.push(\"recordAndTuple\");\n } else {\n opts.generatorOpts.recordAndTupleSyntaxType = options.syntaxType;\n\n parserOpts.plugins.push([\n \"recordAndTuple\",\n { syntaxType: options.syntaxType },\n ]);\n }\n },\n };\n});\n","import { declare } from \"@babel/helper-plugin-utils\";\n\nif (!process.env.BABEL_8_BREAKING) {\n // eslint-disable-next-line no-var\n var removePlugin = function (plugins: any[], name: string) {\n const indices: number[] = [];\n plugins.forEach((plugin, i) => {\n const n = Array.isArray(plugin) ? plugin[0] : plugin;\n\n if (n === name) {\n indices.unshift(i);\n }\n });\n\n for (const i of indices) {\n plugins.splice(i, 1);\n }\n };\n}\n\nexport interface Options {\n disallowAmbiguousJSXLike?: boolean;\n dts?: boolean;\n isTSX?: boolean;\n}\n\nexport default declare((api, opts: Options) => {\n api.assertVersion(REQUIRED_VERSION(7));\n\n const { disallowAmbiguousJSXLike, dts } = opts;\n\n if (!process.env.BABEL_8_BREAKING) {\n // eslint-disable-next-line no-var\n var { isTSX } = opts;\n }\n\n return {\n name: \"syntax-typescript\",\n\n manipulateOptions(opts, parserOpts) {\n if (!process.env.BABEL_8_BREAKING) {\n const { plugins } = parserOpts;\n // If the Flow syntax plugin already ran, remove it since Typescript\n // takes priority.\n removePlugin(plugins, \"flow\");\n\n // If the JSX syntax plugin already ran, remove it because JSX handling\n // in TS depends on the extensions, and is purely dependent on 'isTSX'.\n removePlugin(plugins, \"jsx\");\n\n // These are now enabled by default in @babel/parser, but we push\n // them for compat with older versions.\n plugins.push(\"objectRestSpread\", \"classProperties\");\n\n if (isTSX) {\n plugins.push(\"jsx\");\n }\n }\n\n parserOpts.plugins.push([\n \"typescript\",\n { disallowAmbiguousJSXLike, dts },\n ]);\n },\n };\n});\n","import type { NodePath } from \"@babel/traverse\";\nimport template from \"@babel/template\";\nimport {\n blockStatement,\n callExpression,\n functionExpression,\n isAssignmentPattern,\n isFunctionDeclaration,\n isRestElement,\n returnStatement,\n isCallExpression,\n} from \"@babel/types\";\nimport type * as t from \"@babel/types\";\n\ntype ExpressionWrapperBuilder = (\n replacements?: Parameters>[0],\n) => t.CallExpression & {\n callee: t.FunctionExpression & {\n body: {\n body: [\n t.VariableDeclaration & {\n declarations: [\n { init: t.FunctionExpression | t.ArrowFunctionExpression },\n ];\n },\n ...ExtraBody,\n ];\n };\n };\n};\n\nconst buildAnonymousExpressionWrapper = template.expression(`\n (function () {\n var REF = FUNCTION;\n return function NAME(PARAMS) {\n return REF.apply(this, arguments);\n };\n })()\n`) as ExpressionWrapperBuilder<\n [t.ReturnStatement & { argument: t.FunctionExpression }]\n>;\n\nconst buildNamedExpressionWrapper = template.expression(`\n (function () {\n var REF = FUNCTION;\n function NAME(PARAMS) {\n return REF.apply(this, arguments);\n }\n return NAME;\n })()\n`) as ExpressionWrapperBuilder<\n [t.FunctionDeclaration, t.ReturnStatement & { argument: t.Identifier }]\n>;\n\nconst buildDeclarationWrapper = template.statements(`\n function NAME(PARAMS) { return REF.apply(this, arguments); }\n function REF() {\n REF = FUNCTION;\n return REF.apply(this, arguments);\n }\n`);\n\nfunction classOrObjectMethod(\n path: NodePath,\n callId: t.Expression,\n) {\n const node = path.node;\n const body = node.body;\n\n const container = functionExpression(\n null,\n [],\n blockStatement(body.body),\n true,\n );\n body.body = [\n returnStatement(callExpression(callExpression(callId, [container]), [])),\n ];\n\n // Regardless of whether or not the wrapped function is a an async method\n // or generator the outer function should not be\n node.async = false;\n node.generator = false;\n\n // Unwrap the wrapper IIFE's environment so super and this and such still work.\n (\n path.get(\"body.body.0.argument.callee.arguments.0\") as NodePath\n ).unwrapFunctionEnvironment();\n}\n\nfunction plainFunction(\n inPath: NodePath>,\n callId: t.Expression,\n noNewArrows: boolean,\n ignoreFunctionLength: boolean,\n hadName: boolean,\n) {\n let path: NodePath<\n | t.FunctionDeclaration\n | t.FunctionExpression\n | t.CallExpression\n | t.ArrowFunctionExpression\n > = inPath;\n let node;\n let functionId = null;\n const nodeParams = inPath.node.params;\n\n if (path.isArrowFunctionExpression()) {\n if (process.env.BABEL_8_BREAKING) {\n path = path.arrowFunctionToExpression({ noNewArrows });\n } else {\n // arrowFunctionToExpression returns undefined in @babel/traverse < 7.18.10\n path = path.arrowFunctionToExpression({ noNewArrows }) ?? path;\n }\n node = path.node as\n | t.FunctionDeclaration\n | t.FunctionExpression\n | t.CallExpression;\n } else {\n node = path.node;\n }\n\n const isDeclaration = isFunctionDeclaration(node);\n\n let built = node;\n if (!isCallExpression(node)) {\n functionId = node.id;\n node.id = null;\n node.type = \"FunctionExpression\";\n built = callExpression(callId, [\n node as Exclude,\n ]);\n }\n\n const params: t.Identifier[] = [];\n for (const param of nodeParams) {\n if (isAssignmentPattern(param) || isRestElement(param)) {\n break;\n }\n params.push(path.scope.generateUidIdentifier(\"x\"));\n }\n\n const wrapperArgs = {\n NAME: functionId || null,\n // TODO: Use `functionId` rather than `hadName` for the condition\n REF: path.scope.generateUidIdentifier(hadName ? functionId.name : \"ref\"),\n FUNCTION: built,\n PARAMS: params,\n };\n\n if (isDeclaration) {\n const container = buildDeclarationWrapper(wrapperArgs);\n path.replaceWith(container[0]);\n path.insertAfter(container[1]);\n } else {\n let container;\n\n if (hadName) {\n container = buildNamedExpressionWrapper(wrapperArgs);\n } else {\n container = buildAnonymousExpressionWrapper(wrapperArgs);\n }\n\n if (functionId || (!ignoreFunctionLength && params.length)) {\n path.replaceWith(container);\n } else {\n // we can omit this wrapper as the conditions it protects for do not apply\n path.replaceWith(built);\n }\n }\n}\n\nexport default function wrapFunction(\n path: NodePath,\n callId: t.Expression,\n // TODO(Babel 8): Consider defaulting to false for spec compliance\n noNewArrows: boolean = true,\n ignoreFunctionLength: boolean = false,\n) {\n if (path.isMethod()) {\n classOrObjectMethod(path, callId);\n } else {\n const hadName = \"id\" in path.node && !!path.node.id;\n if (!process.env.BABEL_8_BREAKING && !USE_ESM && !IS_STANDALONE) {\n // polyfill when being run by an older Babel version\n path.ensureFunctionName ??=\n // eslint-disable-next-line no-restricted-globals\n require(\"@babel/traverse\").NodePath.prototype.ensureFunctionName;\n }\n // @ts-expect-error It is invalid to call this on an arrow expression,\n // but we'll convert it to a function expression anyway.\n path = path.ensureFunctionName(false);\n plainFunction(\n path as NodePath>,\n callId,\n noNewArrows,\n ignoreFunctionLength,\n hadName,\n );\n }\n}\n","import { addComment, type Node } from \"@babel/types\";\n\nconst PURE_ANNOTATION = \"#__PURE__\";\n\nconst isPureAnnotated = ({ leadingComments }: Node): boolean =>\n !!leadingComments &&\n leadingComments.some(comment => /[@#]__PURE__/.test(comment.value));\n\nexport default function annotateAsPure(\n pathOrNode: Node | { node: Node },\n): void {\n const node =\n // @ts-expect-error Node will not have `node` property\n (pathOrNode[\"node\"] || pathOrNode) as Node;\n if (isPureAnnotated(node)) {\n return;\n }\n addComment(node, \"leading\", PURE_ANNOTATION);\n}\n","/* @noflow */\n\nimport type { NodePath } from \"@babel/core\";\nimport wrapFunction from \"@babel/helper-wrap-function\";\nimport annotateAsPure from \"@babel/helper-annotate-as-pure\";\nimport { types as t } from \"@babel/core\";\nimport { visitors } from \"@babel/traverse\";\nconst {\n callExpression,\n cloneNode,\n isIdentifier,\n isThisExpression,\n yieldExpression,\n} = t;\n\nconst awaitVisitor = visitors.environmentVisitor<{ wrapAwait: t.Expression }>({\n ArrowFunctionExpression(path) {\n path.skip();\n },\n\n AwaitExpression(path, { wrapAwait }) {\n const argument = path.get(\"argument\");\n\n path.replaceWith(\n yieldExpression(\n wrapAwait\n ? callExpression(cloneNode(wrapAwait), [argument.node])\n : argument.node,\n ),\n );\n },\n});\n\nexport default function (\n path: NodePath,\n helpers: {\n wrapAsync: t.Expression;\n wrapAwait?: t.Expression;\n },\n noNewArrows?: boolean,\n ignoreFunctionLength?: boolean,\n) {\n path.traverse(awaitVisitor, {\n wrapAwait: helpers.wrapAwait,\n });\n\n const isIIFE = checkIsIIFE(path);\n\n path.node.async = false;\n path.node.generator = true;\n\n wrapFunction(\n path,\n cloneNode(helpers.wrapAsync),\n noNewArrows,\n ignoreFunctionLength,\n );\n\n const isProperty =\n path.isObjectMethod() ||\n path.isClassMethod() ||\n path.parentPath.isObjectProperty() ||\n path.parentPath.isClassProperty();\n\n if (!isProperty && !isIIFE && path.isExpression()) {\n annotateAsPure(path);\n }\n\n function checkIsIIFE(path: NodePath) {\n if (path.parentPath.isCallExpression({ callee: path.node })) {\n return true;\n }\n\n // try to catch calls to Function#bind, as emitted by arrowFunctionToExpression in spec mode\n // this may also catch .bind(this) written by users, but does it matter? 🤔\n const { parentPath } = path;\n if (\n parentPath.isMemberExpression() &&\n isIdentifier(parentPath.node.property, { name: \"bind\" })\n ) {\n const { parentPath: bindCall } = parentPath;\n\n // (function () { ... }).bind(this)()\n\n return (\n // first, check if the .bind is actually being called\n bindCall.isCallExpression() &&\n // and whether its sole argument is 'this'\n bindCall.node.arguments.length === 1 &&\n isThisExpression(bindCall.node.arguments[0]) &&\n // and whether the result of the .bind(this) is being called\n bindCall.parentPath.isCallExpression({ callee: bindCall.node })\n );\n }\n\n return false;\n }\n}\n","import { types as t, template, type NodePath } from \"@babel/core\";\n\nconst buildForAwait = template(`\n async function wrapper() {\n var ITERATOR_ABRUPT_COMPLETION = false;\n var ITERATOR_HAD_ERROR_KEY = false;\n var ITERATOR_ERROR_KEY;\n try {\n for (\n var ITERATOR_KEY = GET_ITERATOR(OBJECT), STEP_KEY;\n ITERATOR_ABRUPT_COMPLETION = !(STEP_KEY = await ITERATOR_KEY.next()).done;\n ITERATOR_ABRUPT_COMPLETION = false\n ) {\n }\n } catch (err) {\n ITERATOR_HAD_ERROR_KEY = true;\n ITERATOR_ERROR_KEY = err;\n } finally {\n try {\n if (ITERATOR_ABRUPT_COMPLETION && ITERATOR_KEY.return != null) {\n await ITERATOR_KEY.return();\n }\n } finally {\n if (ITERATOR_HAD_ERROR_KEY) {\n throw ITERATOR_ERROR_KEY;\n }\n }\n }\n }\n`);\n\nexport default function (\n path: NodePath,\n { getAsyncIterator }: { getAsyncIterator: t.Identifier },\n) {\n const { node, scope, parent } = path;\n\n const stepKey = scope.generateUidIdentifier(\"step\");\n const stepValue = t.memberExpression(stepKey, t.identifier(\"value\"));\n const left = node.left;\n let declar;\n\n if (t.isIdentifier(left) || t.isPattern(left) || t.isMemberExpression(left)) {\n // for await (i of test), for await ({ i } of test)\n declar = t.expressionStatement(\n t.assignmentExpression(\"=\", left, stepValue),\n );\n } else if (t.isVariableDeclaration(left)) {\n // for await (let i of test)\n declar = t.variableDeclaration(left.kind, [\n t.variableDeclarator(left.declarations[0].id, stepValue),\n ]);\n }\n let template = buildForAwait({\n ITERATOR_HAD_ERROR_KEY: scope.generateUidIdentifier(\"didIteratorError\"),\n ITERATOR_ABRUPT_COMPLETION: scope.generateUidIdentifier(\n \"iteratorAbruptCompletion\",\n ),\n ITERATOR_ERROR_KEY: scope.generateUidIdentifier(\"iteratorError\"),\n ITERATOR_KEY: scope.generateUidIdentifier(\"iterator\"),\n GET_ITERATOR: getAsyncIterator,\n OBJECT: node.right,\n STEP_KEY: t.cloneNode(stepKey),\n });\n\n // remove async function wrapper\n // @ts-expect-error todo(flow->ts) improve type annotation for buildForAwait\n template = template.body.body as t.Statement[];\n\n const isLabeledParent = t.isLabeledStatement(parent);\n const tryBody = (template[3] as t.TryStatement).block.body;\n const loop = tryBody[0] as t.ForStatement;\n\n if (isLabeledParent) {\n tryBody[0] = t.labeledStatement(parent.label, loop);\n }\n\n return {\n replaceParent: isLabeledParent,\n node: template,\n declar,\n loop,\n };\n}\n","import { declare } from \"@babel/helper-plugin-utils\";\nimport remapAsyncToGenerator from \"@babel/helper-remap-async-to-generator\";\nimport type { NodePath, Visitor, PluginPass } from \"@babel/core\";\nimport { types as t } from \"@babel/core\";\nimport { visitors } from \"@babel/traverse\";\nimport rewriteForAwait from \"./for-await.ts\";\n\nexport default declare(api => {\n api.assertVersion(REQUIRED_VERSION(7));\n\n const yieldStarVisitor = visitors.environmentVisitor({\n ArrowFunctionExpression(path) {\n path.skip();\n },\n\n YieldExpression({ node }, state) {\n if (!node.delegate) return;\n const asyncIter = t.callExpression(state.addHelper(\"asyncIterator\"), [\n node.argument,\n ]);\n node.argument = t.callExpression(\n state.addHelper(\"asyncGeneratorDelegate\"),\n process.env.BABEL_8_BREAKING\n ? [asyncIter]\n : [asyncIter, state.addHelper(\"awaitAsyncGenerator\")],\n );\n },\n });\n\n const forAwaitVisitor = visitors.environmentVisitor({\n ArrowFunctionExpression(path) {\n path.skip();\n },\n\n ForOfStatement(path: NodePath, { file }) {\n const { node } = path;\n if (!node.await) return;\n\n const build = rewriteForAwait(path, {\n getAsyncIterator: file.addHelper(\"asyncIterator\"),\n });\n\n const { declar, loop } = build;\n const block = loop.body as t.BlockStatement;\n\n // ensure that it's a block so we can take all its statements\n path.ensureBlock();\n\n // add the value declaration to the new loop body\n if (declar) {\n block.body.push(declar);\n if (path.node.body.body.length) {\n block.body.push(t.blockStatement(path.node.body.body));\n }\n } else {\n block.body.push(...path.node.body.body);\n }\n\n t.inherits(loop, node);\n t.inherits(loop.body, node.body);\n\n const p = build.replaceParent ? path.parentPath : path;\n p.replaceWithMultiple(build.node);\n\n // TODO: Avoid crawl\n p.scope.parent.crawl();\n },\n });\n\n const visitor: Visitor = {\n Function(path, state) {\n if (!path.node.async) return;\n\n path.traverse(forAwaitVisitor, state);\n\n if (!path.node.generator) return;\n\n path.traverse(yieldStarVisitor, state);\n\n // We don't need to pass the noNewArrows assumption, since\n // async generators are never arrow functions.\n remapAsyncToGenerator(path, {\n wrapAsync: state.addHelper(\"wrapAsyncGenerator\"),\n wrapAwait: state.addHelper(\"awaitAsyncGenerator\"),\n });\n },\n };\n\n return {\n name: \"transform-async-generator-functions\",\n inherits:\n USE_ESM || IS_STANDALONE || api.version[0] === \"8\"\n ? undefined\n : // eslint-disable-next-line no-restricted-globals\n require(\"@babel/plugin-syntax-async-generators\").default,\n\n visitor: {\n Program(path, state) {\n // We need to traverse the ast here (instead of just vising Function\n // in the top level visitor) because for-await needs to run before the\n // async-to-generator plugin. This is because for-await is transpiled\n // using \"await\" expressions, which are then converted to \"yield\".\n //\n // This is bad for performance, but plugin ordering will allow as to\n // directly visit Function in the top level visitor.\n path.traverse(visitor, state);\n },\n },\n };\n});\n","import type { NodePath } from \"@babel/traverse\";\n\n/**\n * Test if a NodePath will be cast to boolean when evaluated.\n *\n * @example\n * // returns true\n * const nodePathAQDotB = NodePath(\"if (a?.#b) {}\").get(\"test\"); // a?.#b\n * willPathCastToBoolean(nodePathAQDotB)\n * @example\n * // returns false\n * willPathCastToBoolean(NodePath(\"a?.#b\"))\n * @todo Respect transparent expression wrappers\n * @see {@link packages/babel-plugin-transform-optional-chaining/src/util.js}\n * @param {NodePath} path\n * @returns {boolean}\n */\nexport function willPathCastToBoolean(path: NodePath): boolean {\n const maybeWrapped = path;\n const { node, parentPath } = maybeWrapped;\n if (parentPath.isLogicalExpression()) {\n const { operator, right } = parentPath.node;\n if (\n operator === \"&&\" ||\n operator === \"||\" ||\n (operator === \"??\" && node === right)\n ) {\n return willPathCastToBoolean(parentPath);\n }\n }\n if (parentPath.isSequenceExpression()) {\n const { expressions } = parentPath.node;\n if (expressions[expressions.length - 1] === node) {\n return willPathCastToBoolean(parentPath);\n } else {\n // if it is in the middle of a sequence expression, we don't\n // care the return value so just cast to boolean for smaller\n // output\n return true;\n }\n }\n return (\n parentPath.isConditional({ test: node }) ||\n parentPath.isUnaryExpression({ operator: \"!\" }) ||\n parentPath.isLoop({ test: node })\n );\n}\n","import type { NodePath, Visitor } from \"@babel/traverse\";\nimport {\n LOGICAL_OPERATORS,\n arrowFunctionExpression,\n assignmentExpression,\n binaryExpression,\n booleanLiteral,\n callExpression,\n cloneNode,\n conditionalExpression,\n identifier,\n isMemberExpression,\n isOptionalCallExpression,\n isOptionalMemberExpression,\n isUpdateExpression,\n logicalExpression,\n memberExpression,\n nullLiteral,\n optionalCallExpression,\n optionalMemberExpression,\n sequenceExpression,\n updateExpression,\n} from \"@babel/types\";\nimport type * as t from \"@babel/types\";\nimport { willPathCastToBoolean } from \"./util.ts\";\n\nclass AssignmentMemoiser {\n private _map: WeakMap;\n constructor() {\n this._map = new WeakMap();\n }\n\n has(key: t.Expression) {\n return this._map.has(key);\n }\n\n get(key: t.Expression) {\n if (!this.has(key)) return;\n\n const record = this._map.get(key);\n const { value } = record;\n\n record.count--;\n if (record.count === 0) {\n // The `count` access is the outermost function call (hopefully), so it\n // does the assignment.\n return assignmentExpression(\"=\", value, key);\n }\n return value;\n }\n\n set(key: t.Expression, value: t.Identifier, count: number) {\n return this._map.set(key, { count, value });\n }\n}\n\nfunction toNonOptional(\n path: NodePath,\n base: t.Expression,\n): t.Expression {\n const { node } = path;\n if (isOptionalMemberExpression(node)) {\n return memberExpression(base, node.property, node.computed);\n }\n\n if (path.isOptionalCallExpression()) {\n const callee = path.get(\"callee\");\n if (path.node.optional && callee.isOptionalMemberExpression()) {\n // object must be a conditional expression because the optional private access in object has been transformed\n const object = callee.node.object as t.ConditionalExpression;\n const context = path.scope.maybeGenerateMemoised(object);\n callee\n .get(\"object\")\n .replaceWith(assignmentExpression(\"=\", context, object));\n\n return callExpression(memberExpression(base, identifier(\"call\")), [\n context,\n ...path.node.arguments,\n ]);\n }\n\n return callExpression(base, path.node.arguments);\n }\n\n return path.node;\n}\n\n// Determines if the current path is in a detached tree. This can happen when\n// we are iterating on a path, and replace an ancestor with a new node. Babel\n// doesn't always stop traversing the old node tree, and that can cause\n// inconsistencies.\nfunction isInDetachedTree(path: NodePath) {\n while (path) {\n if (path.isProgram()) break;\n\n const { parentPath, container, listKey } = path;\n const parentNode = parentPath.node;\n if (listKey) {\n if (\n container !==\n // @ts-expect-error listKey must be a valid parent node key\n parentNode[listKey]\n ) {\n return true;\n }\n } else {\n if (container !== parentNode) return true;\n }\n\n path = parentPath;\n }\n\n return false;\n}\n\ntype Member = NodePath;\n\nconst handle = {\n memoise() {\n // noop.\n },\n\n handle(this: HandlerState, member: Member, noDocumentAll: boolean) {\n const { node, parent, parentPath, scope } = member;\n\n if (member.isOptionalMemberExpression()) {\n // Transforming optional chaining requires we replace ancestors.\n if (isInDetachedTree(member)) return;\n\n // We're looking for the end of _this_ optional chain, which is actually\n // the \"rightmost\" property access of the chain. This is because\n // everything up to that property access is \"optional\".\n //\n // Let's take the case of `FOO?.BAR.baz?.qux`, with `FOO?.BAR` being our\n // member. The \"end\" to most users would be `qux` property access.\n // Everything up to it could be skipped if it `FOO` were nullish. But\n // actually, we can consider the `baz` access to be the end. So we're\n // looking for the nearest optional chain that is `optional: true`.\n const endPath = member.find(({ node, parent }) => {\n if (isOptionalMemberExpression(parent)) {\n // We need to check `parent.object` since we could be inside the\n // computed expression of a `bad?.[FOO?.BAR]`. In this case, the\n // endPath is the `FOO?.BAR` member itself.\n return parent.optional || parent.object !== node;\n }\n if (isOptionalCallExpression(parent)) {\n // Checking `parent.callee` since we could be in the arguments, eg\n // `bad?.(FOO?.BAR)`.\n // Also skip `FOO?.BAR` in `FOO?.BAR?.()` since we need to transform the optional call to ensure proper this\n return (\n // In FOO?.#BAR?.(), endPath points the optional call expression so we skip FOO?.#BAR\n (node !== member.node && parent.optional) || parent.callee !== node\n );\n }\n return true;\n }) as NodePath;\n\n // Replace `function (a, x = a.b?.#c) {}` to `function (a, x = (() => a.b?.#c)() ){}`\n // so the temporary variable can be injected in correct scope\n // This can be further optimized to avoid unnecessary IIFE\n if (scope.path.isPattern()) {\n endPath.replaceWith(\n // The injected member will be queued and eventually transformed when visited\n callExpression(arrowFunctionExpression([], endPath.node), []),\n );\n return;\n }\n\n const willEndPathCastToBoolean = willPathCastToBoolean(endPath);\n\n const rootParentPath = endPath.parentPath;\n if (rootParentPath.isUpdateExpression({ argument: node })) {\n throw member.buildCodeFrameError(`can't handle update expression`);\n }\n const isAssignment = rootParentPath.isAssignmentExpression({\n left: endPath.node,\n });\n const isDeleteOperation = rootParentPath.isUnaryExpression({\n operator: \"delete\",\n });\n if (\n isDeleteOperation &&\n endPath.isOptionalMemberExpression() &&\n endPath.get(\"property\").isPrivateName()\n ) {\n // @babel/parser will throw error on `delete obj?.#x`.\n // This error serves as fallback when `delete obj?.#x` is constructed from babel types\n throw member.buildCodeFrameError(\n `can't delete a private class element`,\n );\n }\n\n // Now, we're looking for the start of this optional chain, which is\n // optional to the left of this member.\n //\n // Let's take the case of `foo?.bar?.baz.QUX?.BAM`, with `QUX?.BAM` being\n // our member. The \"start\" to most users would be `foo` object access.\n // But actually, we can consider the `bar` access to be the start. So\n // we're looking for the nearest optional chain that is `optional: true`,\n // which is guaranteed to be somewhere in the object/callee tree.\n let startingOptional: NodePath = member;\n for (;;) {\n if (startingOptional.isOptionalMemberExpression()) {\n if (startingOptional.node.optional) break;\n startingOptional = startingOptional.get(\"object\");\n continue;\n } else if (startingOptional.isOptionalCallExpression()) {\n if (startingOptional.node.optional) break;\n startingOptional = startingOptional.get(\"callee\");\n continue;\n }\n // prevent infinite loop: unreachable if the AST is well-formed\n throw new Error(\n `Internal error: unexpected ${startingOptional.node.type}`,\n );\n }\n\n const startingNode = startingOptional.isOptionalMemberExpression()\n ? startingOptional.node.object\n : startingOptional.node.callee;\n const baseNeedsMemoised = scope.maybeGenerateMemoised(startingNode);\n const baseRef = baseNeedsMemoised ?? startingNode;\n\n // Compute parentIsOptionalCall before `startingOptional` is replaced\n // as `node` may refer to `startingOptional.node` before replaced.\n const parentIsOptionalCall = parentPath.isOptionalCallExpression({\n callee: node,\n });\n // here we use a function to wrap `parentIsOptionalCall` to get type\n // for parent, do not use it anywhere else\n // See https://github.com/microsoft/TypeScript/issues/10421\n const isOptionalCall = (\n parent: t.Node,\n ): parent is t.OptionalCallExpression => parentIsOptionalCall;\n // if parentIsCall is true, it implies that node.extra.parenthesized is always true\n const parentIsCall = parentPath.isCallExpression({ callee: node });\n startingOptional.replaceWith(toNonOptional(startingOptional, baseRef));\n if (isOptionalCall(parent)) {\n if (parent.optional) {\n parentPath.replaceWith(this.optionalCall(member, parent.arguments));\n } else {\n parentPath.replaceWith(this.call(member, parent.arguments));\n }\n } else if (parentIsCall) {\n // `(a?.#b)()` to `(a == null ? void 0 : a.#b.bind(a))()`\n member.replaceWith(this.boundGet(member));\n } else if (\n (process.env.BABEL_8_BREAKING || this.delete) &&\n parentPath.isUnaryExpression({ operator: \"delete\" })\n ) {\n parentPath.replaceWith(this.delete(member));\n } else if (parentPath.isAssignmentExpression()) {\n // `a?.#b = c` to `(a == null ? void 0 : a.#b = c)`\n handleAssignment(this, member, parentPath);\n } else {\n member.replaceWith(this.get(member));\n }\n\n let regular: t.Expression = member.node;\n for (let current: NodePath = member; current !== endPath; ) {\n const parentPath = current.parentPath as NodePath;\n // skip transforming `Foo.#BAR?.call(FOO)`\n if (\n parentPath === endPath &&\n isOptionalCall(parent) &&\n parent.optional\n ) {\n regular = parentPath.node;\n break;\n }\n regular = toNonOptional(parentPath, regular);\n current = parentPath;\n }\n\n let context: t.Identifier;\n const endParentPath = endPath.parentPath as NodePath;\n if (\n isMemberExpression(regular) &&\n endParentPath.isOptionalCallExpression({\n callee: endPath.node,\n optional: true,\n })\n ) {\n const { object } = regular;\n context = member.scope.maybeGenerateMemoised(object);\n if (context) {\n regular.object = assignmentExpression(\n \"=\",\n context,\n // object must not be Super when `context` is an identifier\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion\n object as t.Expression,\n );\n }\n }\n\n let replacementPath: NodePath = endPath;\n if (isDeleteOperation || isAssignment) {\n replacementPath = endParentPath;\n regular = endParentPath.node;\n }\n\n const baseMemoised = baseNeedsMemoised\n ? assignmentExpression(\n \"=\",\n // When base needs memoised, the baseRef must be an identifier\n cloneNode(baseRef as t.Identifier),\n cloneNode(startingNode),\n )\n : cloneNode(baseRef);\n\n if (willEndPathCastToBoolean) {\n let nonNullishCheck;\n if (noDocumentAll) {\n nonNullishCheck = binaryExpression(\"!=\", baseMemoised, nullLiteral());\n } else {\n nonNullishCheck = logicalExpression(\n \"&&\",\n binaryExpression(\"!==\", baseMemoised, nullLiteral()),\n binaryExpression(\n \"!==\",\n cloneNode(baseRef),\n scope.buildUndefinedNode(),\n ),\n );\n }\n replacementPath.replaceWith(\n logicalExpression(\"&&\", nonNullishCheck, regular),\n );\n } else {\n let nullishCheck;\n if (noDocumentAll) {\n nullishCheck = binaryExpression(\"==\", baseMemoised, nullLiteral());\n } else {\n nullishCheck = logicalExpression(\n \"||\",\n binaryExpression(\"===\", baseMemoised, nullLiteral()),\n binaryExpression(\n \"===\",\n cloneNode(baseRef),\n scope.buildUndefinedNode(),\n ),\n );\n }\n\n replacementPath.replaceWith(\n conditionalExpression(\n nullishCheck,\n isDeleteOperation\n ? booleanLiteral(true)\n : scope.buildUndefinedNode(),\n regular,\n ),\n );\n }\n\n // context and isDeleteOperation can not be both truthy\n if (context) {\n const endParent = endParentPath.node as t.OptionalCallExpression;\n endParentPath.replaceWith(\n optionalCallExpression(\n optionalMemberExpression(\n endParent.callee,\n identifier(\"call\"),\n false,\n true,\n ),\n [cloneNode(context), ...endParent.arguments],\n false,\n ),\n );\n }\n\n return;\n }\n\n // MEMBER++ -> _set(MEMBER, (ref = _get(MEMBER), ref2 = ref++, ref)), ref2\n // ++MEMBER -> _set(MEMBER, (ref = _get(MEMBER), ++ref))\n if (isUpdateExpression(parent, { argument: node })) {\n if (this.simpleSet) {\n member.replaceWith(this.simpleSet(member));\n return;\n }\n\n const { operator, prefix } = parent;\n\n // Give the state handler a chance to memoise the member, since we'll\n // reference it twice. The second access (the set) should do the memo\n // assignment.\n this.memoise(member, 2);\n\n const ref = scope.generateUidIdentifierBasedOnNode(node);\n scope.push({ id: ref });\n\n const seq: t.Expression[] = [\n // ref = _get(MEMBER)\n assignmentExpression(\"=\", cloneNode(ref), this.get(member)),\n ];\n\n if (prefix) {\n seq.push(updateExpression(operator, cloneNode(ref), prefix));\n\n // (ref = _get(MEMBER), ++ref)\n const value = sequenceExpression(seq);\n parentPath.replaceWith(this.set(member, value));\n\n return;\n } else {\n const ref2 = scope.generateUidIdentifierBasedOnNode(node);\n scope.push({ id: ref2 });\n\n seq.push(\n assignmentExpression(\n \"=\",\n cloneNode(ref2),\n updateExpression(operator, cloneNode(ref), prefix),\n ),\n cloneNode(ref),\n );\n\n // (ref = _get(MEMBER), ref2 = ref++, ref)\n const value = sequenceExpression(seq);\n parentPath.replaceWith(\n sequenceExpression([this.set(member, value), cloneNode(ref2)]),\n );\n\n return;\n }\n }\n\n // MEMBER = VALUE -> _set(MEMBER, VALUE)\n // MEMBER += VALUE -> _set(MEMBER, _get(MEMBER) + VALUE)\n // MEMBER ??= VALUE -> _get(MEMBER) ?? _set(MEMBER, VALUE)\n if (parentPath.isAssignmentExpression({ left: node })) {\n handleAssignment(this, member, parentPath);\n return;\n }\n\n // MEMBER(ARGS) -> _call(MEMBER, ARGS)\n if (parentPath.isCallExpression({ callee: node })) {\n parentPath.replaceWith(this.call(member, parentPath.node.arguments));\n return;\n }\n\n // MEMBER?.(ARGS) -> _optionalCall(MEMBER, ARGS)\n if (parentPath.isOptionalCallExpression({ callee: node })) {\n // Replace `function (a, x = a.b.#c?.()) {}` to `function (a, x = (() => a.b.#c?.())() ){}`\n // so the temporary variable can be injected in correct scope\n // This can be further optimized to avoid unnecessary IIFE\n if (scope.path.isPattern()) {\n parentPath.replaceWith(\n // The injected member will be queued and eventually transformed when visited\n callExpression(arrowFunctionExpression([], parentPath.node), []),\n );\n return;\n }\n parentPath.replaceWith(\n this.optionalCall(member, parentPath.node.arguments),\n );\n return;\n }\n\n // delete MEMBER -> _delete(MEMBER)\n if (\n (process.env.BABEL_8_BREAKING || this.delete) &&\n parentPath.isUnaryExpression({ operator: \"delete\" })\n ) {\n parentPath.replaceWith(this.delete(member));\n return;\n }\n\n // for (MEMBER of ARR)\n // for (MEMBER in ARR)\n // { KEY: MEMBER } = OBJ -> { KEY: _destructureSet(MEMBER) } = OBJ\n // { KEY: MEMBER = _VALUE } = OBJ -> { KEY: _destructureSet(MEMBER) = _VALUE } = OBJ\n // {...MEMBER} -> {..._destructureSet(MEMBER)}\n //\n // [MEMBER] = ARR -> [_destructureSet(MEMBER)] = ARR\n // [MEMBER = _VALUE] = ARR -> [_destructureSet(MEMBER) = _VALUE] = ARR\n // [...MEMBER] -> [..._destructureSet(MEMBER)]\n if (\n // for (MEMBER of ARR)\n // for (MEMBER in ARR)\n parentPath.isForXStatement({ left: node }) ||\n // { KEY: MEMBER } = OBJ\n (parentPath.isObjectProperty({ value: node }) &&\n parentPath.parentPath.isObjectPattern()) ||\n // { KEY: MEMBER = _VALUE } = OBJ\n (parentPath.isAssignmentPattern({ left: node }) &&\n parentPath.parentPath.isObjectProperty({ value: parent }) &&\n parentPath.parentPath.parentPath.isObjectPattern()) ||\n // [MEMBER] = ARR\n parentPath.isArrayPattern() ||\n // [MEMBER = _VALUE] = ARR\n (parentPath.isAssignmentPattern({ left: node }) &&\n parentPath.parentPath.isArrayPattern()) ||\n // {...MEMBER}\n // [...MEMBER]\n parentPath.isRestElement()\n ) {\n member.replaceWith(this.destructureSet(member));\n return;\n }\n\n if (parentPath.isTaggedTemplateExpression()) {\n // MEMBER -> _get(MEMBER).bind(this)\n member.replaceWith(this.boundGet(member));\n } else {\n // MEMBER -> _get(MEMBER)\n member.replaceWith(this.get(member));\n }\n },\n};\n\nfunction handleAssignment(\n state: HandlerState,\n member: NodePath,\n parentPath: NodePath,\n) {\n if (state.simpleSet) {\n member.replaceWith(state.simpleSet(member));\n return;\n }\n\n const { operator, right: value } = parentPath.node;\n\n if (operator === \"=\") {\n parentPath.replaceWith(state.set(member, value));\n } else {\n const operatorTrunc = operator.slice(0, -1);\n if (LOGICAL_OPERATORS.includes(operatorTrunc)) {\n // Give the state handler a chance to memoise the member, since we'll\n // reference it twice. The first access (the get) should do the memo\n // assignment.\n state.memoise(member, 1);\n parentPath.replaceWith(\n logicalExpression(\n operatorTrunc as t.LogicalExpression[\"operator\"],\n state.get(member),\n state.set(member, value),\n ),\n );\n } else {\n // Here, the second access (the set) is evaluated first.\n state.memoise(member, 2);\n parentPath.replaceWith(\n state.set(\n member,\n binaryExpression(\n operatorTrunc as t.BinaryExpression[\"operator\"],\n state.get(member),\n value,\n ),\n ),\n );\n }\n }\n}\n\nexport interface Handler {\n memoise?(\n this: HandlerState & State,\n member: Member,\n count: number,\n ): void;\n destructureSet(\n this: HandlerState & State,\n member: Member,\n ): t.Expression;\n boundGet(this: HandlerState & State, member: Member): t.Expression;\n simpleSet?(this: HandlerState & State, member: Member): t.Expression;\n get(this: HandlerState & State, member: Member): t.Expression;\n set(\n this: HandlerState & State,\n member: Member,\n value: t.Expression,\n ): t.Expression;\n call(\n this: HandlerState & State,\n member: Member,\n args: t.CallExpression[\"arguments\"],\n ): t.Expression;\n optionalCall(\n this: HandlerState & State,\n member: Member,\n args: t.OptionalCallExpression[\"arguments\"],\n ): t.Expression;\n delete(this: HandlerState & State, member: Member): t.Expression;\n}\n\nexport interface HandlerState extends Handler {\n handle(\n this: HandlerState & State,\n member: Member,\n noDocumentAll?: boolean,\n ): void;\n memoiser: AssignmentMemoiser;\n}\n\n// We do not provide a default traversal visitor\n// Instead, caller passes one, and must call `state.handle` on the members\n// it wishes to be transformed.\n// Additionally, the caller must pass in a state object with at least\n// get, set, and call methods.\n// Optionally, a memoise method may be defined on the state, which will be\n// called when the member is a self-referential update.\nexport default function memberExpressionToFunctions(\n path: NodePath,\n visitor: Visitor>,\n state: Handler & CustomState,\n) {\n path.traverse(visitor, {\n ...handle,\n ...state,\n memoiser: new AssignmentMemoiser(),\n });\n}\n","import {\n callExpression,\n identifier,\n isIdentifier,\n isSpreadElement,\n memberExpression,\n optionalCallExpression,\n optionalMemberExpression,\n} from \"@babel/types\";\nimport type {\n CallExpression,\n Expression,\n OptionalCallExpression,\n} from \"@babel/types\";\n\n/**\n * A helper function that generates a new call expression with given thisNode.\n It will also optimize `(...arguments)` to `.apply(arguments)`\n *\n * @export\n * @param {Expression} callee The callee of call expression\n * @param {Expression} thisNode The desired this of call expression\n * @param {Readonly} args The arguments of call expression\n * @param {boolean} optional Whether the call expression is optional\n * @returns {CallExpression | OptionalCallExpression} The generated new call expression\n */\nexport default function optimiseCallExpression(\n callee: Expression,\n thisNode: Expression,\n args: Readonly,\n optional: boolean,\n): CallExpression | OptionalCallExpression {\n if (\n args.length === 1 &&\n isSpreadElement(args[0]) &&\n isIdentifier(args[0].argument, { name: \"arguments\" })\n ) {\n // a.b?.(...arguments);\n if (optional) {\n return optionalCallExpression(\n optionalMemberExpression(callee, identifier(\"apply\"), false, true),\n [thisNode, args[0].argument],\n false,\n );\n }\n // a.b(...arguments);\n return callExpression(memberExpression(callee, identifier(\"apply\")), [\n thisNode,\n args[0].argument,\n ]);\n } else {\n // a.b?.(arg1, arg2)\n if (optional) {\n return optionalCallExpression(\n optionalMemberExpression(callee, identifier(\"call\"), false, true),\n [thisNode, ...args],\n false,\n );\n }\n // a.b(arg1, arg2)\n return callExpression(memberExpression(callee, identifier(\"call\")), [\n thisNode,\n ...args,\n ]);\n }\n}\n","import type { File, NodePath, Scope } from \"@babel/core\";\nimport memberExpressionToFunctions from \"@babel/helper-member-expression-to-functions\";\nimport type { HandlerState } from \"@babel/helper-member-expression-to-functions\";\nimport optimiseCall from \"@babel/helper-optimise-call-expression\";\nimport { template, types as t } from \"@babel/core\";\nimport { visitors } from \"@babel/traverse\";\nconst {\n assignmentExpression,\n callExpression,\n cloneNode,\n identifier,\n memberExpression,\n sequenceExpression,\n stringLiteral,\n thisExpression,\n} = t;\n\nif (!process.env.BABEL_8_BREAKING && !USE_ESM && !IS_STANDALONE) {\n // eslint-disable-next-line no-restricted-globals\n exports.environmentVisitor = visitors.environmentVisitor({});\n // eslint-disable-next-line no-restricted-globals\n exports.skipAllButComputedKey = function skipAllButComputedKey(\n path: NodePath,\n ) {\n path.skip();\n if (path.node.computed) {\n path.context.maybeQueue(path.get(\"key\"));\n }\n };\n}\n\nconst visitor = visitors.environmentVisitor<\n HandlerState & ReplaceState\n>({\n Super(path, state) {\n const { node, parentPath } = path;\n if (!parentPath.isMemberExpression({ object: node })) return;\n state.handle(parentPath);\n },\n});\n\nconst unshadowSuperBindingVisitor = visitors.environmentVisitor<{\n refName: string;\n}>({\n Scopable(path, { refName }) {\n // https://github.com/Zzzen/babel/pull/1#pullrequestreview-564833183\n const binding = path.scope.getOwnBinding(refName);\n if (binding && binding.identifier.name === refName) {\n path.scope.rename(refName);\n }\n },\n});\n\ntype SharedState = {\n file: File;\n scope: Scope;\n isDerivedConstructor: boolean;\n isStatic: boolean;\n isPrivateMethod: boolean;\n getObjectRef: () => t.Identifier;\n getSuperRef: () => t.Identifier;\n // we dont need boundGet here, but memberExpressionToFunctions handler needs it.\n boundGet: HandlerState[\"get\"];\n};\n\ntype Handler = HandlerState & SharedState;\ntype SuperMember = NodePath<\n t.MemberExpression & {\n object: t.Super;\n property: Exclude;\n }\n>;\n\nconst enum Flags {\n Prototype = 0b1,\n Call = 0b10,\n}\n\ninterface SpecHandler\n extends Pick<\n Handler,\n | \"memoise\"\n | \"get\"\n | \"set\"\n | \"destructureSet\"\n | \"call\"\n | \"optionalCall\"\n | \"delete\"\n > {\n _get?(\n this: Handler & SpecHandler,\n superMember: SuperMember,\n ): t.CallExpression;\n _call?(\n this: Handler & SpecHandler,\n superMember: SuperMember,\n args: t.CallExpression[\"arguments\"],\n optional: boolean,\n ): t.CallExpression | t.OptionalCallExpression;\n _getPrototypeOfExpression(this: Handler & SpecHandler): t.CallExpression;\n prop(this: Handler & SpecHandler, superMember: SuperMember): t.Expression;\n}\n\nconst specHandlers: SpecHandler = {\n memoise(\n this: Handler & SpecHandler,\n superMember: SuperMember,\n count: number,\n ) {\n const { scope, node } = superMember;\n const { computed, property } = node;\n if (!computed) {\n return;\n }\n\n const memo = scope.maybeGenerateMemoised(property);\n if (!memo) {\n return;\n }\n\n this.memoiser.set(property, memo, count);\n },\n\n prop(this: Handler & SpecHandler, superMember: SuperMember) {\n const { computed, property } = superMember.node;\n if (this.memoiser.has(property)) {\n return cloneNode(this.memoiser.get(property));\n }\n\n if (computed) {\n return cloneNode(property);\n }\n\n return stringLiteral((property as t.Identifier).name);\n },\n\n /**\n * Creates an expression which result is the proto of objectRef.\n *\n * @example isStatic === true\n *\n * helpers.getPrototypeOf(CLASS)\n *\n * @example isStatic === false\n *\n * helpers.getPrototypeOf(CLASS.prototype)\n */\n _getPrototypeOfExpression(this: Handler & SpecHandler) {\n const objectRef = cloneNode(this.getObjectRef());\n const targetRef =\n this.isStatic || this.isPrivateMethod\n ? objectRef\n : memberExpression(objectRef, identifier(\"prototype\"));\n\n return callExpression(this.file.addHelper(\"getPrototypeOf\"), [targetRef]);\n },\n\n get(this: Handler & SpecHandler, superMember: SuperMember) {\n const objectRef = cloneNode(this.getObjectRef());\n return callExpression(this.file.addHelper(\"superPropGet\"), [\n this.isDerivedConstructor\n ? sequenceExpression([thisExpression(), objectRef])\n : objectRef,\n this.prop(superMember),\n thisExpression(),\n ...(this.isStatic || this.isPrivateMethod\n ? []\n : [t.numericLiteral(Flags.Prototype)]),\n ]);\n },\n\n _call(\n this: Handler & SpecHandler,\n superMember: SuperMember,\n args: t.CallExpression[\"arguments\"],\n optional: boolean,\n ): t.CallExpression | t.OptionalCallExpression {\n const objectRef = cloneNode(this.getObjectRef());\n let argsNode: t.ArrayExpression | t.Identifier;\n if (\n args.length === 1 &&\n t.isSpreadElement(args[0]) &&\n (t.isIdentifier(args[0].argument) ||\n t.isArrayExpression(args[0].argument))\n ) {\n argsNode = args[0].argument;\n } else {\n argsNode = t.arrayExpression(args as t.Expression[]);\n }\n\n const call = t.callExpression(this.file.addHelper(\"superPropGet\"), [\n this.isDerivedConstructor\n ? sequenceExpression([thisExpression(), objectRef])\n : objectRef,\n this.prop(superMember),\n thisExpression(),\n t.numericLiteral(\n Flags.Call |\n (this.isStatic || this.isPrivateMethod ? 0 : Flags.Prototype),\n ),\n ]);\n if (optional) {\n return t.optionalCallExpression(call, [argsNode], true);\n }\n return callExpression(call, [argsNode]);\n },\n\n set(\n this: Handler & SpecHandler,\n superMember: SuperMember,\n value: t.Expression,\n ) {\n const objectRef = cloneNode(this.getObjectRef());\n\n return callExpression(this.file.addHelper(\"superPropSet\"), [\n this.isDerivedConstructor\n ? sequenceExpression([thisExpression(), objectRef])\n : objectRef,\n this.prop(superMember),\n value,\n thisExpression(),\n t.numericLiteral(superMember.isInStrictMode() ? 1 : 0),\n ...(this.isStatic || this.isPrivateMethod ? [] : [t.numericLiteral(1)]),\n ]);\n },\n\n destructureSet(this: Handler & SpecHandler, superMember: SuperMember) {\n throw superMember.buildCodeFrameError(\n `Destructuring to a super field is not supported yet.`,\n );\n },\n\n call(\n this: Handler & SpecHandler,\n superMember: SuperMember,\n args: t.CallExpression[\"arguments\"],\n ) {\n return this._call(superMember, args, false);\n },\n\n optionalCall(\n this: Handler & SpecHandler,\n superMember: SuperMember,\n args: t.CallExpression[\"arguments\"],\n ) {\n return this._call(superMember, args, true);\n },\n\n delete(this: Handler & SpecHandler, superMember: SuperMember) {\n if (superMember.node.computed) {\n return sequenceExpression([\n callExpression(this.file.addHelper(\"toPropertyKey\"), [\n cloneNode(superMember.node.property),\n ]),\n template.expression.ast`\n function () { throw new ReferenceError(\"'delete super[expr]' is invalid\"); }()\n `,\n ]);\n } else {\n return template.expression.ast`\n function () { throw new ReferenceError(\"'delete super.prop' is invalid\"); }()\n `;\n }\n },\n};\n\nconst specHandlers_old: SpecHandler = {\n memoise(\n this: Handler & SpecHandler,\n superMember: SuperMember,\n count: number,\n ) {\n const { scope, node } = superMember;\n const { computed, property } = node;\n if (!computed) {\n return;\n }\n\n const memo = scope.maybeGenerateMemoised(property);\n if (!memo) {\n return;\n }\n\n this.memoiser.set(property, memo, count);\n },\n\n prop(this: Handler & SpecHandler, superMember: SuperMember) {\n const { computed, property } = superMember.node;\n if (this.memoiser.has(property)) {\n return cloneNode(this.memoiser.get(property));\n }\n\n if (computed) {\n return cloneNode(property);\n }\n\n return stringLiteral((property as t.Identifier).name);\n },\n\n /**\n * Creates an expression which result is the proto of objectRef.\n *\n * @example isStatic === true\n *\n * helpers.getPrototypeOf(CLASS)\n *\n * @example isStatic === false\n *\n * helpers.getPrototypeOf(CLASS.prototype)\n */\n _getPrototypeOfExpression(this: Handler & SpecHandler) {\n const objectRef = cloneNode(this.getObjectRef());\n const targetRef =\n this.isStatic || this.isPrivateMethod\n ? objectRef\n : memberExpression(objectRef, identifier(\"prototype\"));\n\n return callExpression(this.file.addHelper(\"getPrototypeOf\"), [targetRef]);\n },\n\n get(this: Handler & SpecHandler, superMember: SuperMember) {\n return this._get(superMember);\n },\n\n _get(this: Handler & SpecHandler, superMember: SuperMember) {\n const proto = this._getPrototypeOfExpression();\n return callExpression(this.file.addHelper(\"get\"), [\n this.isDerivedConstructor\n ? sequenceExpression([thisExpression(), proto])\n : proto,\n this.prop(superMember),\n thisExpression(),\n ]);\n },\n\n set(\n this: Handler & SpecHandler,\n superMember: SuperMember,\n value: t.Expression,\n ) {\n const proto = this._getPrototypeOfExpression();\n\n return callExpression(this.file.addHelper(\"set\"), [\n this.isDerivedConstructor\n ? sequenceExpression([thisExpression(), proto])\n : proto,\n this.prop(superMember),\n value,\n thisExpression(),\n t.booleanLiteral(superMember.isInStrictMode()),\n ]);\n },\n\n destructureSet(this: Handler & SpecHandler, superMember: SuperMember) {\n throw superMember.buildCodeFrameError(\n `Destructuring to a super field is not supported yet.`,\n );\n },\n\n call(\n this: Handler & SpecHandler,\n superMember: SuperMember,\n args: t.CallExpression[\"arguments\"],\n ) {\n return optimiseCall(this._get(superMember), thisExpression(), args, false);\n },\n\n optionalCall(\n this: Handler & SpecHandler,\n superMember: SuperMember,\n args: t.CallExpression[\"arguments\"],\n ) {\n return optimiseCall(\n this._get(superMember),\n cloneNode(thisExpression()),\n args,\n true,\n );\n },\n\n delete(this: Handler & SpecHandler, superMember: SuperMember) {\n if (superMember.node.computed) {\n return sequenceExpression([\n callExpression(this.file.addHelper(\"toPropertyKey\"), [\n cloneNode(superMember.node.property),\n ]),\n template.expression.ast`\n function () { throw new ReferenceError(\"'delete super[expr]' is invalid\"); }()\n `,\n ]);\n } else {\n return template.expression.ast`\n function () { throw new ReferenceError(\"'delete super.prop' is invalid\"); }()\n `;\n }\n },\n};\n\nconst looseHandlers = {\n ...specHandlers,\n\n prop(this: Handler & typeof specHandlers, superMember: SuperMember) {\n const { property } = superMember.node;\n if (this.memoiser.has(property)) {\n return cloneNode(this.memoiser.get(property));\n }\n\n return cloneNode(property);\n },\n\n get(this: Handler & typeof specHandlers, superMember: SuperMember) {\n const { isStatic, getSuperRef } = this;\n const { computed } = superMember.node;\n const prop = this.prop(superMember);\n\n let object;\n if (isStatic) {\n object =\n getSuperRef() ??\n memberExpression(identifier(\"Function\"), identifier(\"prototype\"));\n } else {\n object = memberExpression(\n getSuperRef() ?? identifier(\"Object\"),\n identifier(\"prototype\"),\n );\n }\n\n return memberExpression(object, prop, computed);\n },\n\n set(\n this: Handler & typeof specHandlers,\n superMember: SuperMember,\n value: t.Expression,\n ) {\n const { computed } = superMember.node;\n const prop = this.prop(superMember);\n\n return assignmentExpression(\n \"=\",\n memberExpression(thisExpression(), prop, computed),\n value,\n );\n },\n\n destructureSet(\n this: Handler & typeof specHandlers,\n superMember: SuperMember,\n ) {\n const { computed } = superMember.node;\n const prop = this.prop(superMember);\n\n return memberExpression(thisExpression(), prop, computed);\n },\n\n call(\n this: Handler & typeof specHandlers,\n superMember: SuperMember,\n args: t.CallExpression[\"arguments\"],\n ) {\n return optimiseCall(this.get(superMember), thisExpression(), args, false);\n },\n\n optionalCall(\n this: Handler & typeof specHandlers,\n superMember: SuperMember,\n args: t.CallExpression[\"arguments\"],\n ) {\n return optimiseCall(this.get(superMember), thisExpression(), args, true);\n },\n};\n\ntype ReplaceSupersOptionsBase = {\n methodPath: NodePath<\n | t.ClassMethod\n | t.ClassProperty\n | t.ObjectMethod\n | t.ClassPrivateMethod\n | t.ClassPrivateProperty\n | t.StaticBlock\n >;\n constantSuper?: boolean;\n file: File;\n // objectRef might have been shadowed in child scopes,\n // in that case, we need to rename related variables.\n refToPreserve?: t.Identifier;\n};\n\ntype ReplaceSupersOptions = ReplaceSupersOptionsBase &\n (\n | { objectRef?: undefined; getObjectRef: () => t.Node }\n | { objectRef: t.Node; getObjectRef?: undefined }\n ) &\n (\n | { superRef?: undefined; getSuperRef: () => t.Node }\n | { superRef: t.Node; getSuperRef?: undefined }\n );\n\ninterface ReplaceState {\n file: File;\n scope: Scope;\n isDerivedConstructor: boolean;\n isStatic: boolean;\n isPrivateMethod: boolean;\n getObjectRef: ReplaceSupers[\"getObjectRef\"];\n getSuperRef: ReplaceSupers[\"getSuperRef\"];\n}\n\nexport default class ReplaceSupers {\n constructor(opts: ReplaceSupersOptions) {\n const path = opts.methodPath;\n\n this.methodPath = path;\n this.isDerivedConstructor =\n path.isClassMethod({ kind: \"constructor\" }) && !!opts.superRef;\n this.isStatic =\n path.isObjectMethod() ||\n // @ts-expect-error static is not in ClassPrivateMethod\n path.node.static ||\n path.isStaticBlock?.();\n this.isPrivateMethod = path.isPrivate() && path.isMethod();\n\n this.file = opts.file;\n this.constantSuper = process.env.BABEL_8_BREAKING\n ? opts.constantSuper\n : // Fallback to isLoose for backward compatibility\n opts.constantSuper ?? (opts as any).isLoose;\n this.opts = opts;\n }\n\n declare file: File;\n declare isDerivedConstructor: boolean;\n declare constantSuper: boolean;\n declare isPrivateMethod: boolean;\n declare isStatic: boolean;\n declare methodPath: NodePath;\n declare opts: ReplaceSupersOptions;\n\n getObjectRef() {\n return cloneNode(this.opts.objectRef || this.opts.getObjectRef());\n }\n\n getSuperRef() {\n if (this.opts.superRef) return cloneNode(this.opts.superRef);\n if (this.opts.getSuperRef) {\n return cloneNode(this.opts.getSuperRef());\n }\n }\n\n replace() {\n const { methodPath } = this;\n // https://github.com/babel/babel/issues/11994\n if (this.opts.refToPreserve) {\n methodPath.traverse(unshadowSuperBindingVisitor, {\n refName: this.opts.refToPreserve.name,\n });\n }\n\n const handler = this.constantSuper\n ? looseHandlers\n : process.env.BABEL_8_BREAKING ||\n this.file.availableHelper(\"superPropSet\")\n ? specHandlers\n : specHandlers_old;\n\n // todo: this should have been handled by the environmentVisitor,\n // consider add visitSelf support for the path.traverse\n // @ts-expect-error: Refine typings in packages/babel-traverse/src/types.ts\n // shouldSkip is accepted in traverseNode\n visitor.shouldSkip = (path: NodePath) => {\n if (path.parentPath === methodPath) {\n if (path.parentKey === \"decorators\" || path.parentKey === \"key\") {\n return true;\n }\n }\n };\n\n memberExpressionToFunctions(methodPath, visitor, {\n file: this.file,\n scope: this.methodPath.scope,\n isDerivedConstructor: this.isDerivedConstructor,\n isStatic: this.isStatic,\n isPrivateMethod: this.isPrivateMethod,\n getObjectRef: this.getObjectRef.bind(this),\n getSuperRef: this.getSuperRef.bind(this),\n // we dont need boundGet here, but memberExpressionToFunctions handler needs it.\n boundGet: handler.get,\n ...handler,\n });\n }\n}\n","import {\n isParenthesizedExpression,\n isTSAsExpression,\n isTSNonNullExpression,\n isTSSatisfiesExpression,\n isTSTypeAssertion,\n isTypeCastExpression,\n} from \"@babel/types\";\n\nimport type * as t from \"@babel/types\";\nimport type { NodePath } from \"@babel/traverse\";\n\nexport type TransparentExprWrapper =\n | t.TSAsExpression\n | t.TSSatisfiesExpression\n | t.TSTypeAssertion\n | t.TSNonNullExpression\n | t.TypeCastExpression\n | t.ParenthesizedExpression;\n\n// A transparent expression wrapper is an AST node that most plugins will wish\n// to skip, as its presence does not affect the behaviour of the code. This\n// includes expressions used for types, and extra parenthesis. For example, in\n// (a as any)(), this helper can be used to skip the TSAsExpression when\n// determining the callee.\nexport function isTransparentExprWrapper(\n node: t.Node,\n): node is TransparentExprWrapper {\n return (\n isTSAsExpression(node) ||\n isTSSatisfiesExpression(node) ||\n isTSTypeAssertion(node) ||\n isTSNonNullExpression(node) ||\n isTypeCastExpression(node) ||\n isParenthesizedExpression(node)\n );\n}\n\nexport function skipTransparentExprWrappers(\n path: NodePath,\n): NodePath {\n while (isTransparentExprWrapper(path.node)) {\n path = path.get(\"expression\");\n }\n return path;\n}\n\nexport function skipTransparentExprWrapperNodes(\n node: t.Expression | t.Super,\n): t.Expression | t.Super {\n while (isTransparentExprWrapper(node)) {\n node = node.expression;\n }\n return node;\n}\n","import type { NodePath, types as t } from \"@babel/core\";\n\nexport function assertFieldTransformed(\n path: NodePath,\n) {\n if (\n path.node.declare ||\n (process.env.BABEL_8_BREAKING\n ? path.isClassProperty({ definite: true })\n : false)\n ) {\n throw path.buildCodeFrameError(\n `TypeScript 'declare' fields must first be transformed by ` +\n `@babel/plugin-transform-typescript.\\n` +\n `If you have already enabled that plugin (or '@babel/preset-typescript'), make sure ` +\n `that it runs before any plugin related to additional class features:\\n` +\n ` - @babel/plugin-transform-class-properties\\n` +\n ` - @babel/plugin-transform-private-methods\\n` +\n ` - @babel/plugin-proposal-decorators`,\n );\n }\n}\n","import { template, types as t } from \"@babel/core\";\nimport type { File, NodePath, Visitor, Scope } from \"@babel/core\";\nimport { visitors } from \"@babel/traverse\";\nimport ReplaceSupers from \"@babel/helper-replace-supers\";\nimport memberExpressionToFunctions from \"@babel/helper-member-expression-to-functions\";\nimport type {\n Handler,\n HandlerState,\n} from \"@babel/helper-member-expression-to-functions\";\nimport optimiseCall from \"@babel/helper-optimise-call-expression\";\nimport annotateAsPure from \"@babel/helper-annotate-as-pure\";\nimport { skipTransparentExprWrapperNodes } from \"@babel/helper-skip-transparent-expression-wrappers\";\n\nimport * as ts from \"./typescript.ts\";\n\ninterface PrivateNameMetadata {\n id: t.Identifier;\n static: boolean;\n method: boolean;\n getId?: t.Identifier;\n setId?: t.Identifier;\n methodId?: t.Identifier;\n initAdded?: boolean;\n getterDeclared?: boolean;\n setterDeclared?: boolean;\n}\n\ntype PrivateNamesMapGeneric = Map;\n\ntype PrivateNamesMap = PrivateNamesMapGeneric;\n\nif (!process.env.BABEL_8_BREAKING) {\n // eslint-disable-next-line no-var\n var newHelpers = (file: File) => {\n if (!process.env.IS_PUBLISH) {\n const { comments } = file.ast;\n // This is needed for the test in\n // babel-plugin-transform-class-properties/test/fixtures/regression/old-helpers\n if (comments?.some(c => c.value.includes(\"@force-old-private-helpers\"))) {\n return false;\n }\n }\n return file.availableHelper(\"classPrivateFieldGet2\");\n };\n}\n\nexport function buildPrivateNamesMap(\n className: string,\n privateFieldsAsSymbolsOrProperties: boolean,\n props: PropPath[],\n file: File,\n) {\n const privateNamesMap: PrivateNamesMap = new Map();\n let classBrandId: t.Identifier;\n for (const prop of props) {\n if (prop.isPrivate()) {\n const { name } = prop.node.key.id;\n let update: PrivateNameMetadata = privateNamesMap.get(name);\n if (!update) {\n const isMethod = !prop.isProperty();\n const isStatic = prop.node.static;\n let initAdded = false;\n let id: t.Identifier;\n if (\n !privateFieldsAsSymbolsOrProperties &&\n (process.env.BABEL_8_BREAKING || newHelpers(file)) &&\n isMethod &&\n !isStatic\n ) {\n initAdded = !!classBrandId;\n classBrandId ??= prop.scope.generateUidIdentifier(\n `${className}_brand`,\n );\n id = classBrandId;\n } else {\n id = prop.scope.generateUidIdentifier(name);\n }\n update = { id, static: isStatic, method: isMethod, initAdded };\n privateNamesMap.set(name, update);\n }\n if (prop.isClassPrivateMethod()) {\n if (prop.node.kind === \"get\") {\n const { body } = prop.node.body;\n let $: t.Node;\n if (\n // If we have\n // get #foo() { return _some_fn(this); }\n // we can use _some_fn directly.\n body.length === 1 &&\n t.isReturnStatement(($ = body[0])) &&\n t.isCallExpression(($ = $.argument)) &&\n $.arguments.length === 1 &&\n t.isThisExpression($.arguments[0]) &&\n t.isIdentifier(($ = $.callee))\n ) {\n update.getId = t.cloneNode($);\n update.getterDeclared = true;\n } else {\n update.getId = prop.scope.generateUidIdentifier(`get_${name}`);\n }\n } else if (prop.node.kind === \"set\") {\n const { params } = prop.node;\n const { body } = prop.node.body;\n let $: t.Node;\n if (\n // If we have\n // set #foo(val) { _some_fn(this, val); }\n // we can use _some_fn directly.\n body.length === 1 &&\n t.isExpressionStatement(($ = body[0])) &&\n t.isCallExpression(($ = $.expression)) &&\n $.arguments.length === 2 &&\n t.isThisExpression($.arguments[0]) &&\n t.isIdentifier($.arguments[1], {\n name: (params[0] as t.Identifier).name,\n }) &&\n t.isIdentifier(($ = $.callee))\n ) {\n update.setId = t.cloneNode($);\n update.setterDeclared = true;\n } else {\n update.setId = prop.scope.generateUidIdentifier(`set_${name}`);\n }\n } else if (prop.node.kind === \"method\") {\n update.methodId = prop.scope.generateUidIdentifier(name);\n }\n }\n privateNamesMap.set(name, update);\n }\n }\n return privateNamesMap;\n}\n\nexport function buildPrivateNamesNodes(\n privateNamesMap: PrivateNamesMap,\n privateFieldsAsProperties: boolean,\n privateFieldsAsSymbols: boolean,\n state: File,\n) {\n const initNodes: t.Statement[] = [];\n\n const injectedIds = new Set();\n\n for (const [name, value] of privateNamesMap) {\n // - When the privateFieldsAsProperties assumption is enabled,\n // both static and instance fields are transpiled using a\n // secret non-enumerable property. Hence, we also need to generate that\n // key (using the classPrivateFieldLooseKey helper).\n // - When the privateFieldsAsSymbols assumption is enabled,\n // both static and instance fields are transpiled using a\n // unique Symbol to define a non-enumerable property.\n // - In spec mode, only instance fields need a \"private name\" initializer\n // because static fields are directly assigned to a variable in the\n // buildPrivateStaticFieldInitSpec function.\n const { static: isStatic, method: isMethod, getId, setId } = value;\n const isGetterOrSetter = getId || setId;\n const id = t.cloneNode(value.id);\n\n let init: t.Expression;\n\n if (privateFieldsAsProperties) {\n init = t.callExpression(state.addHelper(\"classPrivateFieldLooseKey\"), [\n t.stringLiteral(name),\n ]);\n } else if (privateFieldsAsSymbols) {\n init = t.callExpression(t.identifier(\"Symbol\"), [t.stringLiteral(name)]);\n } else if (!isStatic) {\n if (injectedIds.has(id.name)) continue;\n injectedIds.add(id.name);\n\n init = t.newExpression(\n t.identifier(\n isMethod &&\n (process.env.BABEL_8_BREAKING ||\n !isGetterOrSetter ||\n newHelpers(state))\n ? \"WeakSet\"\n : \"WeakMap\",\n ),\n [],\n );\n }\n\n if (init) {\n if (!privateFieldsAsSymbols) {\n annotateAsPure(init);\n }\n initNodes.push(template.statement.ast`var ${id} = ${init}`);\n }\n }\n\n return initNodes;\n}\n\nexport interface PrivateNameVisitorState {\n privateNamesMap: PrivateNamesMapGeneric;\n redeclared?: string[];\n}\n\n// Traverses the class scope, handling private name references. If an inner\n// class redeclares the same private name, it will hand off traversal to the\n// restricted visitor (which doesn't traverse the inner class's inner scope).\nexport function privateNameVisitorFactory(\n visitor: Visitor & S>,\n) {\n // Traverses the outer portion of a class, without touching the class's inner\n // scope, for private names.\n const nestedVisitor = visitors.environmentVisitor({ ...visitor });\n\n const privateNameVisitor: Visitor<\n PrivateNameVisitorState & S\n > = {\n ...visitor,\n\n Class(path) {\n const { privateNamesMap } = this;\n const body = path.get(\"body.body\");\n\n const visiblePrivateNames = new Map(privateNamesMap);\n const redeclared = [];\n for (const prop of body) {\n if (!prop.isPrivate()) continue;\n const { name } = prop.node.key.id;\n visiblePrivateNames.delete(name);\n redeclared.push(name);\n }\n\n // If the class doesn't redeclare any private fields, we can continue with\n // our overall traversal.\n if (!redeclared.length) {\n return;\n }\n\n // This class redeclares some private field. We need to process the outer\n // environment with access to all the outer privates, then we can process\n // the inner environment with only the still-visible outer privates.\n path.get(\"body\").traverse(nestedVisitor, {\n ...this,\n redeclared,\n });\n path.traverse(privateNameVisitor, {\n ...this,\n privateNamesMap: visiblePrivateNames,\n });\n\n // We'll eventually hit this class node again with the overall Class\n // Features visitor, which'll process the redeclared privates.\n path.skipKey(\"body\");\n },\n };\n\n return privateNameVisitor;\n}\n\ninterface PrivateNameState {\n privateNamesMap: PrivateNamesMap;\n classRef: t.Identifier;\n file: File;\n noDocumentAll: boolean;\n noUninitializedPrivateFieldAccess: boolean;\n innerBinding?: t.Identifier;\n}\n\nconst privateNameVisitor = privateNameVisitorFactory<\n HandlerState & PrivateNameState,\n PrivateNameMetadata\n>({\n PrivateName(path, { noDocumentAll }) {\n const { privateNamesMap, redeclared } = this;\n const { node, parentPath } = path;\n\n if (\n !parentPath.isMemberExpression({ property: node }) &&\n !parentPath.isOptionalMemberExpression({ property: node })\n ) {\n return;\n }\n const { name } = node.id;\n if (!privateNamesMap.has(name)) return;\n if (redeclared?.includes(name)) return;\n\n this.handle(parentPath, noDocumentAll);\n },\n});\n\n// rename all bindings that shadows innerBinding\nfunction unshadow(\n name: string,\n scope: Scope,\n innerBinding: t.Identifier | undefined,\n) {\n // in some cases, scope.getBinding(name) === undefined\n // so we check hasBinding to avoid keeping looping\n // see: https://github.com/babel/babel/pull/13656#discussion_r686030715\n while (\n scope?.hasBinding(name) &&\n !scope.bindingIdentifierEquals(name, innerBinding)\n ) {\n scope.rename(name);\n scope = scope.parent;\n }\n}\n\nexport function buildCheckInRHS(\n rhs: t.Expression,\n file: File,\n inRHSIsObject?: boolean,\n) {\n if (inRHSIsObject || !file.availableHelper?.(\"checkInRHS\")) return rhs;\n return t.callExpression(file.addHelper(\"checkInRHS\"), [rhs]);\n}\n\nconst privateInVisitor = privateNameVisitorFactory<\n {\n classRef: t.Identifier;\n file: File;\n innerBinding?: t.Identifier;\n privateFieldsAsProperties: boolean;\n },\n PrivateNameMetadata\n>({\n BinaryExpression(path, { file }) {\n const { operator, left, right } = path.node;\n if (operator !== \"in\") return;\n if (!t.isPrivateName(left)) return;\n\n const { privateFieldsAsProperties, privateNamesMap, redeclared } = this;\n\n const { name } = left.id;\n\n if (!privateNamesMap.has(name)) return;\n if (redeclared?.includes(name)) return;\n\n // if there are any local variable shadowing classRef, unshadow it\n // see #12960\n unshadow(this.classRef.name, path.scope, this.innerBinding);\n\n if (privateFieldsAsProperties) {\n const { id } = privateNamesMap.get(name);\n path.replaceWith(template.expression.ast`\n Object.prototype.hasOwnProperty.call(${buildCheckInRHS(\n right,\n file,\n )}, ${t.cloneNode(id)})\n `);\n return;\n }\n\n const { id, static: isStatic } = privateNamesMap.get(name);\n\n if (isStatic) {\n path.replaceWith(\n template.expression.ast`${buildCheckInRHS(\n right,\n file,\n )} === ${t.cloneNode(this.classRef)}`,\n );\n return;\n }\n\n path.replaceWith(\n template.expression.ast`${t.cloneNode(id)}.has(${buildCheckInRHS(\n right,\n file,\n )})`,\n );\n },\n});\n\ninterface Receiver {\n receiver(\n this: HandlerState & PrivateNameState,\n member: NodePath,\n ): t.Expression;\n}\n\nfunction readOnlyError(file: File, name: string) {\n return t.callExpression(file.addHelper(\"readOnlyError\"), [\n t.stringLiteral(`#${name}`),\n ]);\n}\n\nfunction writeOnlyError(file: File, name: string) {\n if (\n !process.env.BABEL_8_BREAKING &&\n !file.availableHelper(\"writeOnlyError\")\n ) {\n console.warn(\n `@babel/helpers is outdated, update it to silence this warning.`,\n );\n return t.buildUndefinedNode();\n }\n return t.callExpression(file.addHelper(\"writeOnlyError\"), [\n t.stringLiteral(`#${name}`),\n ]);\n}\n\nfunction buildStaticPrivateFieldAccess(\n expr: N,\n noUninitializedPrivateFieldAccess: boolean,\n) {\n if (noUninitializedPrivateFieldAccess) return expr;\n return t.memberExpression(expr, t.identifier(\"_\"));\n}\n\nfunction autoInherits<\n Member extends { node: t.Node },\n Result extends t.Node,\n Fn extends (member: Member, ...args: unknown[]) => Result,\n>(fn: Fn): Fn {\n return function (this: ThisParameterType, member) {\n return t.inherits(fn.apply(this, arguments as any), member.node);\n } as Fn;\n}\n\nconst privateNameHandlerSpec: Handler & Receiver =\n {\n memoise(member, count) {\n const { scope } = member;\n const { object } = member.node as { object: t.Expression };\n\n const memo = scope.maybeGenerateMemoised(object);\n if (!memo) {\n return;\n }\n\n this.memoiser.set(object, memo, count);\n },\n\n receiver(member) {\n const { object } = member.node as { object: t.Expression };\n\n if (this.memoiser.has(object)) {\n return t.cloneNode(this.memoiser.get(object));\n }\n\n return t.cloneNode(object);\n },\n\n get: autoInherits(function (member) {\n const {\n classRef,\n privateNamesMap,\n file,\n innerBinding,\n noUninitializedPrivateFieldAccess,\n } = this;\n const privateName = member.node.property as t.PrivateName;\n const { name } = privateName.id;\n const {\n id,\n static: isStatic,\n method: isMethod,\n methodId,\n getId,\n setId,\n } = privateNamesMap.get(name);\n const isGetterOrSetter = getId || setId;\n\n const cloneId = (id: t.Identifier) =>\n t.inherits(t.cloneNode(id), privateName);\n\n if (isStatic) {\n // if there are any local variable shadowing classRef, unshadow it\n // see #12960\n unshadow(classRef.name, member.scope, innerBinding);\n\n if (!process.env.BABEL_8_BREAKING && !newHelpers(file)) {\n // NOTE: This package has a peerDependency on @babel/core@^7.0.0, but these\n // helpers have been introduced in @babel/helpers@7.1.0.\n const helperName =\n isMethod && !isGetterOrSetter\n ? \"classStaticPrivateMethodGet\"\n : \"classStaticPrivateFieldSpecGet\";\n\n return t.callExpression(file.addHelper(helperName), [\n this.receiver(member),\n t.cloneNode(classRef),\n cloneId(id),\n ]);\n }\n\n const receiver = this.receiver(member);\n const skipCheck =\n t.isIdentifier(receiver) && receiver.name === classRef.name;\n\n if (!isMethod) {\n if (skipCheck) {\n return buildStaticPrivateFieldAccess(\n cloneId(id),\n noUninitializedPrivateFieldAccess,\n );\n }\n\n return buildStaticPrivateFieldAccess(\n t.callExpression(file.addHelper(\"assertClassBrand\"), [\n t.cloneNode(classRef),\n receiver,\n cloneId(id),\n ]),\n noUninitializedPrivateFieldAccess,\n );\n }\n\n if (getId) {\n if (skipCheck) {\n return t.callExpression(cloneId(getId), [receiver]);\n }\n return t.callExpression(file.addHelper(\"classPrivateGetter\"), [\n t.cloneNode(classRef),\n receiver,\n cloneId(getId),\n ]);\n }\n\n if (setId) {\n const err = t.buildUndefinedNode(); // TODO: writeOnlyError(file, name)\n if (skipCheck) return err;\n return t.sequenceExpression([\n t.callExpression(file.addHelper(\"assertClassBrand\"), [\n t.cloneNode(classRef),\n receiver,\n ]),\n err,\n ]);\n }\n\n if (skipCheck) return cloneId(id);\n return t.callExpression(file.addHelper(\"assertClassBrand\"), [\n t.cloneNode(classRef),\n receiver,\n cloneId(id),\n ]);\n }\n\n if (isMethod) {\n if (isGetterOrSetter) {\n if (!getId) {\n return t.sequenceExpression([\n this.receiver(member),\n writeOnlyError(file, name),\n ]);\n }\n if (!process.env.BABEL_8_BREAKING && !newHelpers(file)) {\n return t.callExpression(file.addHelper(\"classPrivateFieldGet\"), [\n this.receiver(member),\n cloneId(id),\n ]);\n }\n return t.callExpression(file.addHelper(\"classPrivateGetter\"), [\n t.cloneNode(id),\n this.receiver(member),\n cloneId(getId),\n ]);\n }\n if (!process.env.BABEL_8_BREAKING && !newHelpers(file)) {\n return t.callExpression(file.addHelper(\"classPrivateMethodGet\"), [\n this.receiver(member),\n t.cloneNode(id),\n cloneId(methodId),\n ]);\n }\n return t.callExpression(file.addHelper(\"assertClassBrand\"), [\n t.cloneNode(id),\n this.receiver(member),\n cloneId(methodId),\n ]);\n }\n if (process.env.BABEL_8_BREAKING || newHelpers(file)) {\n return t.callExpression(file.addHelper(\"classPrivateFieldGet2\"), [\n cloneId(id),\n this.receiver(member),\n ]);\n }\n\n return t.callExpression(file.addHelper(\"classPrivateFieldGet\"), [\n this.receiver(member),\n cloneId(id),\n ]);\n }),\n\n boundGet(member) {\n this.memoise(member, 1);\n\n return t.callExpression(\n t.memberExpression(this.get(member), t.identifier(\"bind\")),\n [this.receiver(member)],\n );\n },\n\n set: autoInherits(function (member, value) {\n const {\n classRef,\n privateNamesMap,\n file,\n noUninitializedPrivateFieldAccess,\n } = this;\n const privateName = member.node.property as t.PrivateName;\n const { name } = privateName.id;\n const {\n id,\n static: isStatic,\n method: isMethod,\n setId,\n getId,\n } = privateNamesMap.get(name);\n const isGetterOrSetter = getId || setId;\n\n const cloneId = (id: t.Identifier) =>\n t.inherits(t.cloneNode(id), privateName);\n\n if (isStatic) {\n if (!process.env.BABEL_8_BREAKING && !newHelpers(file)) {\n const helperName =\n isMethod && !isGetterOrSetter\n ? \"classStaticPrivateMethodSet\"\n : \"classStaticPrivateFieldSpecSet\";\n\n return t.callExpression(file.addHelper(helperName), [\n this.receiver(member),\n t.cloneNode(classRef),\n cloneId(id),\n value,\n ]);\n }\n\n const receiver = this.receiver(member);\n const skipCheck =\n t.isIdentifier(receiver) && receiver.name === classRef.name;\n\n if (isMethod && !setId) {\n const err = readOnlyError(file, name);\n if (skipCheck) return t.sequenceExpression([value, err]);\n return t.sequenceExpression([\n value,\n t.callExpression(file.addHelper(\"assertClassBrand\"), [\n t.cloneNode(classRef),\n receiver,\n ]),\n readOnlyError(file, name),\n ]);\n }\n\n if (setId) {\n if (skipCheck) {\n return t.callExpression(t.cloneNode(setId), [receiver, value]);\n }\n return t.callExpression(file.addHelper(\"classPrivateSetter\"), [\n t.cloneNode(classRef),\n cloneId(setId),\n receiver,\n value,\n ]);\n }\n return t.assignmentExpression(\n \"=\",\n buildStaticPrivateFieldAccess(\n cloneId(id),\n noUninitializedPrivateFieldAccess,\n ),\n skipCheck\n ? value\n : t.callExpression(file.addHelper(\"assertClassBrand\"), [\n t.cloneNode(classRef),\n receiver,\n value,\n ]),\n );\n }\n if (isMethod) {\n if (setId) {\n if (!process.env.BABEL_8_BREAKING && !newHelpers(file)) {\n return t.callExpression(file.addHelper(\"classPrivateFieldSet\"), [\n this.receiver(member),\n cloneId(id),\n value,\n ]);\n }\n return t.callExpression(file.addHelper(\"classPrivateSetter\"), [\n t.cloneNode(id),\n cloneId(setId),\n this.receiver(member),\n value,\n ]);\n }\n return t.sequenceExpression([\n this.receiver(member),\n value,\n readOnlyError(file, name),\n ]);\n }\n\n if (process.env.BABEL_8_BREAKING || newHelpers(file)) {\n return t.callExpression(file.addHelper(\"classPrivateFieldSet2\"), [\n cloneId(id),\n this.receiver(member),\n value,\n ]);\n }\n\n return t.callExpression(file.addHelper(\"classPrivateFieldSet\"), [\n this.receiver(member),\n cloneId(id),\n value,\n ]);\n }),\n\n destructureSet(member) {\n const {\n classRef,\n privateNamesMap,\n file,\n noUninitializedPrivateFieldAccess,\n } = this;\n const privateName = member.node.property as t.PrivateName;\n const { name } = privateName.id;\n const {\n id,\n static: isStatic,\n method: isMethod,\n setId,\n } = privateNamesMap.get(name);\n\n const cloneId = (id: t.Identifier) =>\n t.inherits(t.cloneNode(id), privateName);\n\n if (!process.env.BABEL_8_BREAKING && !newHelpers(file)) {\n if (isStatic) {\n try {\n // classStaticPrivateFieldDestructureSet was introduced in 7.13.10\n // eslint-disable-next-line no-var\n var helper = file.addHelper(\n \"classStaticPrivateFieldDestructureSet\",\n );\n } catch {\n throw new Error(\n \"Babel can not transpile `[C.#p] = [0]` with @babel/helpers < 7.13.10, \\n\" +\n \"please update @babel/helpers to the latest version.\",\n );\n }\n return t.memberExpression(\n t.callExpression(helper, [\n this.receiver(member),\n t.cloneNode(classRef),\n cloneId(id),\n ]),\n t.identifier(\"value\"),\n );\n }\n\n return t.memberExpression(\n t.callExpression(file.addHelper(\"classPrivateFieldDestructureSet\"), [\n this.receiver(member),\n cloneId(id),\n ]),\n t.identifier(\"value\"),\n );\n }\n\n if (isMethod && !setId) {\n return t.memberExpression(\n t.sequenceExpression([\n // @ts-ignore(Babel 7 vs Babel 8) member.node.object is not t.Super\n member.node.object,\n readOnlyError(file, name),\n ]),\n t.identifier(\"_\"),\n );\n }\n\n if (isStatic && !isMethod) {\n const getCall = this.get(member);\n if (\n !noUninitializedPrivateFieldAccess ||\n !t.isCallExpression(getCall)\n ) {\n return getCall;\n }\n const ref = getCall.arguments.pop();\n getCall.arguments.push(template.expression.ast`(_) => ${ref} = _`);\n return t.memberExpression(\n t.callExpression(file.addHelper(\"toSetter\"), [getCall]),\n t.identifier(\"_\"),\n );\n }\n\n const setCall = this.set(member, t.identifier(\"_\"));\n if (\n !t.isCallExpression(setCall) ||\n !t.isIdentifier(setCall.arguments[setCall.arguments.length - 1], {\n name: \"_\",\n })\n ) {\n throw member.buildCodeFrameError(\n \"Internal Babel error while compiling this code. This is a Babel bug. \" +\n \"Please report it at https://github.com/babel/babel/issues.\",\n );\n }\n\n // someHelper(foo, bar, _) -> someHelper, [foo, bar]\n // aFn.call(foo, bar, _) -> aFn, [bar], foo\n let args: t.Expression[];\n if (\n t.isMemberExpression(setCall.callee, { computed: false }) &&\n t.isIdentifier(setCall.callee.property) &&\n setCall.callee.property.name === \"call\"\n ) {\n args = [\n // @ts-ignore(Babel 7 vs Babel 8) member.node.object is not t.Super\n setCall.callee.object,\n t.arrayExpression(\n // Remove '_'\n (setCall.arguments as t.Expression[]).slice(1, -1),\n ),\n setCall.arguments[0] as t.Expression,\n ];\n } else {\n args = [\n setCall.callee as t.Expression,\n t.arrayExpression(\n // Remove '_'\n (setCall.arguments as t.Expression[]).slice(0, -1),\n ),\n ];\n }\n\n return t.memberExpression(\n t.callExpression(file.addHelper(\"toSetter\"), args),\n t.identifier(\"_\"),\n );\n },\n\n call(member, args: (t.Expression | t.SpreadElement)[]) {\n // The first access (the get) should do the memo assignment.\n this.memoise(member, 1);\n\n return optimiseCall(this.get(member), this.receiver(member), args, false);\n },\n\n optionalCall(member, args: (t.Expression | t.SpreadElement)[]) {\n this.memoise(member, 1);\n\n return optimiseCall(this.get(member), this.receiver(member), args, true);\n },\n\n delete() {\n throw new Error(\n \"Internal Babel error: deleting private elements is a parsing error.\",\n );\n },\n };\n\nconst privateNameHandlerLoose: Handler = {\n get(member) {\n const { privateNamesMap, file } = this;\n const { object } = member.node;\n const { name } = (member.node.property as t.PrivateName).id;\n\n return template.expression`BASE(REF, PROP)[PROP]`({\n BASE: file.addHelper(\"classPrivateFieldLooseBase\"),\n REF: t.cloneNode(object),\n PROP: t.cloneNode(privateNamesMap.get(name).id),\n });\n },\n\n set() {\n // noop\n throw new Error(\"private name handler with loose = true don't need set()\");\n },\n\n boundGet(member) {\n return t.callExpression(\n t.memberExpression(this.get(member), t.identifier(\"bind\")),\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion\n [t.cloneNode(member.node.object as t.Expression)],\n );\n },\n\n simpleSet(member) {\n return this.get(member);\n },\n\n destructureSet(member) {\n return this.get(member);\n },\n\n call(member, args) {\n return t.callExpression(this.get(member), args);\n },\n\n optionalCall(member, args) {\n return t.optionalCallExpression(this.get(member), args, true);\n },\n\n delete() {\n throw new Error(\n \"Internal Babel error: deleting private elements is a parsing error.\",\n );\n },\n};\n\nexport function transformPrivateNamesUsage(\n ref: t.Identifier,\n path: NodePath,\n privateNamesMap: PrivateNamesMap,\n {\n privateFieldsAsProperties,\n noUninitializedPrivateFieldAccess,\n noDocumentAll,\n innerBinding,\n }: {\n privateFieldsAsProperties: boolean;\n noUninitializedPrivateFieldAccess: boolean;\n noDocumentAll: boolean;\n innerBinding: t.Identifier;\n },\n state: File,\n) {\n if (!privateNamesMap.size) return;\n\n const body = path.get(\"body\");\n const handler = privateFieldsAsProperties\n ? privateNameHandlerLoose\n : privateNameHandlerSpec;\n\n memberExpressionToFunctions(body, privateNameVisitor, {\n privateNamesMap,\n classRef: ref,\n file: state,\n ...handler,\n noDocumentAll,\n noUninitializedPrivateFieldAccess,\n innerBinding,\n });\n body.traverse(privateInVisitor, {\n privateNamesMap,\n classRef: ref,\n file: state,\n privateFieldsAsProperties,\n innerBinding,\n });\n}\n\nfunction buildPrivateFieldInitLoose(\n ref: t.Expression,\n prop: NodePath,\n privateNamesMap: PrivateNamesMap,\n) {\n const { id } = privateNamesMap.get(prop.node.key.id.name);\n const value = prop.node.value || prop.scope.buildUndefinedNode();\n\n return inheritPropComments(\n template.statement.ast`\n Object.defineProperty(${ref}, ${t.cloneNode(id)}, {\n // configurable is false by default\n // enumerable is false by default\n writable: true,\n value: ${value}\n });\n ` as t.ExpressionStatement,\n prop,\n );\n}\n\nfunction buildPrivateInstanceFieldInitSpec(\n ref: t.Expression,\n prop: NodePath,\n privateNamesMap: PrivateNamesMap,\n state: File,\n) {\n const { id } = privateNamesMap.get(prop.node.key.id.name);\n const value = prop.node.value || prop.scope.buildUndefinedNode();\n\n if (!process.env.BABEL_8_BREAKING) {\n if (!state.availableHelper(\"classPrivateFieldInitSpec\")) {\n return inheritPropComments(\n template.statement.ast`${t.cloneNode(id)}.set(${ref}, {\n // configurable is always false for private elements\n // enumerable is always false for private elements\n writable: true,\n value: ${value},\n })` as t.ExpressionStatement,\n prop,\n );\n }\n }\n\n const helper = state.addHelper(\"classPrivateFieldInitSpec\");\n return inheritLoc(\n inheritPropComments(\n t.expressionStatement(\n t.callExpression(helper, [\n t.thisExpression(),\n inheritLoc(t.cloneNode(id), prop.node.key),\n process.env.BABEL_8_BREAKING || newHelpers(state)\n ? value\n : template.expression.ast`{ writable: true, value: ${value} }`,\n ]),\n ),\n prop,\n ),\n prop.node,\n );\n}\n\nfunction buildPrivateStaticFieldInitSpec(\n prop: NodePath,\n privateNamesMap: PrivateNamesMap,\n noUninitializedPrivateFieldAccess: boolean,\n) {\n const privateName = privateNamesMap.get(prop.node.key.id.name);\n\n const value = noUninitializedPrivateFieldAccess\n ? prop.node.value\n : template.expression.ast`{\n _: ${prop.node.value || t.buildUndefinedNode()}\n }`;\n\n return inheritPropComments(\n t.variableDeclaration(\"var\", [\n t.variableDeclarator(t.cloneNode(privateName.id), value),\n ]),\n prop,\n );\n}\n\nif (!process.env.BABEL_8_BREAKING) {\n // eslint-disable-next-line no-var\n var buildPrivateStaticFieldInitSpecOld = function (\n prop: NodePath,\n privateNamesMap: PrivateNamesMap,\n ) {\n const privateName = privateNamesMap.get(prop.node.key.id.name);\n const { id, getId, setId, initAdded } = privateName;\n const isGetterOrSetter = getId || setId;\n\n if (!prop.isProperty() && (initAdded || !isGetterOrSetter)) return;\n\n if (isGetterOrSetter) {\n privateNamesMap.set(prop.node.key.id.name, {\n ...privateName,\n initAdded: true,\n });\n\n return inheritPropComments(\n template.statement.ast`\n var ${t.cloneNode(id)} = {\n // configurable is false by default\n // enumerable is false by default\n // writable is false by default\n get: ${getId ? getId.name : prop.scope.buildUndefinedNode()},\n set: ${setId ? setId.name : prop.scope.buildUndefinedNode()}\n }\n `,\n prop,\n );\n }\n\n const value = prop.node.value || prop.scope.buildUndefinedNode();\n return inheritPropComments(\n template.statement.ast`\n var ${t.cloneNode(id)} = {\n // configurable is false by default\n // enumerable is false by default\n writable: true,\n value: ${value}\n };\n `,\n prop,\n );\n };\n}\n\nfunction buildPrivateMethodInitLoose(\n ref: t.Expression,\n prop: NodePath,\n privateNamesMap: PrivateNamesMap,\n) {\n const privateName = privateNamesMap.get(prop.node.key.id.name);\n const { methodId, id, getId, setId, initAdded } = privateName;\n if (initAdded) return;\n\n if (methodId) {\n return inheritPropComments(\n template.statement.ast`\n Object.defineProperty(${ref}, ${id}, {\n // configurable is false by default\n // enumerable is false by default\n // writable is false by default\n value: ${methodId.name}\n });\n ` as t.ExpressionStatement,\n prop,\n );\n }\n const isGetterOrSetter = getId || setId;\n if (isGetterOrSetter) {\n privateNamesMap.set(prop.node.key.id.name, {\n ...privateName,\n initAdded: true,\n });\n\n return inheritPropComments(\n template.statement.ast`\n Object.defineProperty(${ref}, ${id}, {\n // configurable is false by default\n // enumerable is false by default\n // writable is false by default\n get: ${getId ? getId.name : prop.scope.buildUndefinedNode()},\n set: ${setId ? setId.name : prop.scope.buildUndefinedNode()}\n });\n ` as t.ExpressionStatement,\n prop,\n );\n }\n}\n\nfunction buildPrivateInstanceMethodInitSpec(\n ref: t.Expression,\n prop: NodePath,\n privateNamesMap: PrivateNamesMap,\n state: File,\n) {\n const privateName = privateNamesMap.get(prop.node.key.id.name);\n\n if (privateName.initAdded) return;\n\n if (!process.env.BABEL_8_BREAKING && !newHelpers(state)) {\n const isGetterOrSetter = privateName.getId || privateName.setId;\n if (isGetterOrSetter) {\n return buildPrivateAccessorInitialization(\n ref,\n prop,\n privateNamesMap,\n state,\n );\n }\n }\n\n return buildPrivateInstanceMethodInitialization(\n ref,\n prop,\n privateNamesMap,\n state,\n );\n}\n\nfunction buildPrivateAccessorInitialization(\n ref: t.Expression,\n prop: NodePath,\n privateNamesMap: PrivateNamesMap,\n state: File,\n) {\n const privateName = privateNamesMap.get(prop.node.key.id.name);\n const { id, getId, setId } = privateName;\n\n privateNamesMap.set(prop.node.key.id.name, {\n ...privateName,\n initAdded: true,\n });\n\n if (!process.env.BABEL_8_BREAKING) {\n if (!state.availableHelper(\"classPrivateFieldInitSpec\")) {\n return inheritPropComments(\n template.statement.ast`\n ${id}.set(${ref}, {\n get: ${getId ? getId.name : prop.scope.buildUndefinedNode()},\n set: ${setId ? setId.name : prop.scope.buildUndefinedNode()}\n });\n ` as t.ExpressionStatement,\n prop,\n );\n }\n }\n\n const helper = state.addHelper(\"classPrivateFieldInitSpec\");\n return inheritLoc(\n inheritPropComments(\n template.statement.ast`${helper}(\n ${t.thisExpression()},\n ${t.cloneNode(id)},\n {\n get: ${getId ? getId.name : prop.scope.buildUndefinedNode()},\n set: ${setId ? setId.name : prop.scope.buildUndefinedNode()}\n },\n )` as t.ExpressionStatement,\n prop,\n ),\n prop.node,\n );\n}\n\nfunction buildPrivateInstanceMethodInitialization(\n ref: t.Expression,\n prop: NodePath,\n privateNamesMap: PrivateNamesMap,\n state: File,\n) {\n const privateName = privateNamesMap.get(prop.node.key.id.name);\n const { id } = privateName;\n\n if (!process.env.BABEL_8_BREAKING) {\n if (!state.availableHelper(\"classPrivateMethodInitSpec\")) {\n return inheritPropComments(\n template.statement.ast`${id}.add(${ref})` as t.ExpressionStatement,\n prop,\n );\n }\n }\n\n const helper = state.addHelper(\"classPrivateMethodInitSpec\");\n return inheritPropComments(\n template.statement.ast`${helper}(\n ${t.thisExpression()},\n ${t.cloneNode(id)}\n )` as t.ExpressionStatement,\n prop,\n );\n}\n\nfunction buildPublicFieldInitLoose(\n ref: t.Expression,\n prop: NodePath,\n) {\n const { key, computed } = prop.node;\n const value = prop.node.value || prop.scope.buildUndefinedNode();\n\n return inheritPropComments(\n t.expressionStatement(\n t.assignmentExpression(\n \"=\",\n t.memberExpression(ref, key, computed || t.isLiteral(key)),\n value,\n ),\n ),\n prop,\n );\n}\n\nfunction buildPublicFieldInitSpec(\n ref: t.Expression,\n prop: NodePath,\n state: File,\n) {\n const { key, computed } = prop.node;\n const value = prop.node.value || prop.scope.buildUndefinedNode();\n\n return inheritPropComments(\n t.expressionStatement(\n t.callExpression(state.addHelper(\"defineProperty\"), [\n ref,\n computed || t.isLiteral(key)\n ? key\n : t.stringLiteral((key as t.Identifier).name),\n value,\n ]),\n ),\n prop,\n );\n}\n\nfunction buildPrivateStaticMethodInitLoose(\n ref: t.Expression,\n prop: NodePath,\n state: File,\n privateNamesMap: PrivateNamesMap,\n) {\n const privateName = privateNamesMap.get(prop.node.key.id.name);\n const { id, methodId, getId, setId, initAdded } = privateName;\n\n if (initAdded) return;\n\n const isGetterOrSetter = getId || setId;\n if (isGetterOrSetter) {\n privateNamesMap.set(prop.node.key.id.name, {\n ...privateName,\n initAdded: true,\n });\n\n return inheritPropComments(\n template.statement.ast`\n Object.defineProperty(${ref}, ${id}, {\n // configurable is false by default\n // enumerable is false by default\n // writable is false by default\n get: ${getId ? getId.name : prop.scope.buildUndefinedNode()},\n set: ${setId ? setId.name : prop.scope.buildUndefinedNode()}\n })\n `,\n prop,\n );\n }\n\n return inheritPropComments(\n template.statement.ast`\n Object.defineProperty(${ref}, ${id}, {\n // configurable is false by default\n // enumerable is false by default\n // writable is false by default\n value: ${methodId.name}\n });\n `,\n prop,\n );\n}\n\nfunction buildPrivateMethodDeclaration(\n file: File,\n prop: NodePath,\n privateNamesMap: PrivateNamesMap,\n privateFieldsAsSymbolsOrProperties = false,\n) {\n const privateName = privateNamesMap.get(prop.node.key.id.name);\n const {\n id,\n methodId,\n getId,\n setId,\n getterDeclared,\n setterDeclared,\n static: isStatic,\n } = privateName;\n const { params, body, generator, async } = prop.node;\n const isGetter = getId && params.length === 0;\n const isSetter = setId && params.length > 0;\n\n if ((isGetter && getterDeclared) || (isSetter && setterDeclared)) {\n privateNamesMap.set(prop.node.key.id.name, {\n ...privateName,\n initAdded: true,\n });\n return null;\n }\n\n if (\n (process.env.BABEL_8_BREAKING || newHelpers(file)) &&\n (isGetter || isSetter) &&\n !privateFieldsAsSymbolsOrProperties\n ) {\n const scope = prop.get(\"body\").scope;\n const thisArg = scope.generateUidIdentifier(\"this\");\n const state: ReplaceThisState = {\n thisRef: thisArg,\n argumentsPath: [],\n };\n // eslint-disable-next-line @typescript-eslint/no-use-before-define\n prop.traverse(thisContextVisitor, state);\n if (state.argumentsPath.length) {\n const argumentsId = scope.generateUidIdentifier(\"arguments\");\n scope.push({\n id: argumentsId,\n init: template.expression.ast`[].slice.call(arguments, 1)`,\n });\n for (const path of state.argumentsPath) {\n path.replaceWith(t.cloneNode(argumentsId));\n }\n }\n\n params.unshift(t.cloneNode(thisArg));\n }\n\n let declId = methodId;\n\n if (isGetter) {\n privateNamesMap.set(prop.node.key.id.name, {\n ...privateName,\n getterDeclared: true,\n initAdded: true,\n });\n declId = getId;\n } else if (isSetter) {\n privateNamesMap.set(prop.node.key.id.name, {\n ...privateName,\n setterDeclared: true,\n initAdded: true,\n });\n declId = setId;\n } else if (isStatic && !privateFieldsAsSymbolsOrProperties) {\n declId = id;\n }\n\n return inheritPropComments(\n t.functionDeclaration(\n t.cloneNode(declId),\n // @ts-expect-error params for ClassMethod has TSParameterProperty\n params,\n body,\n generator,\n async,\n ),\n prop,\n );\n}\n\ntype ReplaceThisState = {\n thisRef: t.Identifier;\n needsClassRef?: boolean;\n innerBinding?: t.Identifier | null;\n argumentsPath?: NodePath[];\n};\n\ntype ReplaceInnerBindingReferenceState = ReplaceThisState;\n\nconst thisContextVisitor = visitors.environmentVisitor({\n Identifier(path, state) {\n if (state.argumentsPath && path.node.name === \"arguments\") {\n state.argumentsPath.push(path);\n }\n },\n UnaryExpression(path) {\n // Replace `delete this` with `true`\n const { node } = path;\n if (node.operator === \"delete\") {\n const argument = skipTransparentExprWrapperNodes(node.argument);\n if (t.isThisExpression(argument)) {\n path.replaceWith(t.booleanLiteral(true));\n }\n }\n },\n ThisExpression(path, state) {\n state.needsClassRef = true;\n path.replaceWith(t.cloneNode(state.thisRef));\n },\n MetaProperty(path) {\n const { node, scope } = path;\n // if there are `new.target` in static field\n // we should replace it with `undefined`\n if (node.meta.name === \"new\" && node.property.name === \"target\") {\n path.replaceWith(scope.buildUndefinedNode());\n }\n },\n});\n\nconst innerReferencesVisitor: Visitor = {\n ReferencedIdentifier(path, state) {\n if (\n path.scope.bindingIdentifierEquals(path.node.name, state.innerBinding)\n ) {\n state.needsClassRef = true;\n path.node.name = state.thisRef.name;\n }\n },\n};\n\nfunction replaceThisContext(\n path: PropPath,\n ref: t.Identifier,\n innerBindingRef: t.Identifier | null,\n) {\n const state: ReplaceThisState = {\n thisRef: ref,\n needsClassRef: false,\n innerBinding: innerBindingRef,\n };\n if (!path.isMethod()) {\n // replace `this` in property initializers and static blocks\n path.traverse(thisContextVisitor, state);\n }\n\n // todo: use innerBinding.referencePaths to avoid full traversal\n if (\n innerBindingRef != null &&\n state.thisRef?.name &&\n state.thisRef.name !== innerBindingRef.name\n ) {\n path.traverse(innerReferencesVisitor, state);\n }\n\n return state.needsClassRef;\n}\n\nexport type PropNode =\n | t.ClassProperty\n | t.ClassPrivateMethod\n | t.ClassPrivateProperty\n | t.StaticBlock;\nexport type PropPath = NodePath;\n\nfunction isNameOrLength({ key, computed }: t.ClassProperty) {\n if (key.type === \"Identifier\") {\n return !computed && (key.name === \"name\" || key.name === \"length\");\n }\n if (key.type === \"StringLiteral\") {\n return key.value === \"name\" || key.value === \"length\";\n }\n return false;\n}\n\n/**\n * Inherit comments from class members. This is a reduced version of\n * t.inheritsComments: the trailing comments are not inherited because\n * for most class members except the last one, their trailing comments are\n * the next sibling's leading comments.\n *\n * @template T transformed class member type\n * @param {T} node transformed class member\n * @param {PropPath} prop class member\n * @returns transformed class member type with comments inherited\n */\nfunction inheritPropComments(node: T, prop: PropPath) {\n t.inheritLeadingComments(node, prop.node);\n t.inheritInnerComments(node, prop.node);\n return node;\n}\n\nfunction inheritLoc(node: T, original: t.Node) {\n node.start = original.start;\n node.end = original.end;\n node.loc = original.loc;\n return node;\n}\n\n/**\n * ClassRefFlag records the requirement of the class binding reference.\n *\n * @enum {number}\n */\nconst enum ClassRefFlag {\n None,\n /**\n * When this flag is enabled, the binding reference can be the class id,\n * if exists, or the uid identifier generated for class expression. The\n * reference is safe to be consumed by [[Define]].\n */\n ForDefine = 1 << 0,\n /**\n * When this flag is enabled, the reference must be a uid, because the outer\n * class binding can be mutated by user codes.\n * E.g.\n * class C { static p = C }; const oldC = C; C = null; oldC.p;\n * we must memoize class `C` before defining the property `p`.\n */\n ForInnerBinding = 1 << 1,\n}\n\nexport function buildFieldsInitNodes(\n ref: t.Identifier | null,\n superRef: t.Expression | undefined,\n props: PropPath[],\n privateNamesMap: PrivateNamesMap,\n file: File,\n setPublicClassFields: boolean,\n privateFieldsAsSymbolsOrProperties: boolean,\n noUninitializedPrivateFieldAccess: boolean,\n constantSuper: boolean,\n innerBindingRef: t.Identifier | null,\n) {\n let classRefFlags = ClassRefFlag.None;\n let injectSuperRef: t.Identifier;\n const staticNodes: t.Statement[] = [];\n const instanceNodes: t.ExpressionStatement[] = [];\n let lastInstanceNodeReturnsThis = false;\n // These nodes are pure and can be moved to the closest statement position\n const pureStaticNodes: t.FunctionDeclaration[] = [];\n let classBindingNode: t.ExpressionStatement | null = null;\n\n const getSuperRef = t.isIdentifier(superRef)\n ? () => superRef\n : () => {\n injectSuperRef ??=\n props[0].scope.generateUidIdentifierBasedOnNode(superRef);\n return injectSuperRef;\n };\n\n const classRefForInnerBinding =\n ref ??\n props[0].scope.generateUidIdentifier(innerBindingRef?.name || \"Class\");\n ref ??= t.cloneNode(innerBindingRef);\n\n for (const prop of props) {\n if (prop.isClassProperty()) {\n ts.assertFieldTransformed(prop);\n }\n\n // @ts-expect-error: TS doesn't infer that prop.node is not a StaticBlock\n const isStatic = !t.isStaticBlock?.(prop.node) && prop.node.static;\n const isInstance = !isStatic;\n const isPrivate = prop.isPrivate();\n const isPublic = !isPrivate;\n const isField = prop.isProperty();\n const isMethod = !isField;\n const isStaticBlock = prop.isStaticBlock?.();\n\n if (isStatic) classRefFlags |= ClassRefFlag.ForDefine;\n\n if (isStatic || (isMethod && isPrivate) || isStaticBlock) {\n new ReplaceSupers({\n methodPath: prop,\n constantSuper,\n file: file,\n refToPreserve: innerBindingRef,\n getSuperRef,\n getObjectRef() {\n classRefFlags |= ClassRefFlag.ForInnerBinding;\n if (isStatic || isStaticBlock) {\n return classRefForInnerBinding;\n } else {\n return t.memberExpression(\n classRefForInnerBinding,\n t.identifier(\"prototype\"),\n );\n }\n },\n }).replace();\n\n const replaced = replaceThisContext(\n prop,\n classRefForInnerBinding,\n innerBindingRef,\n );\n if (replaced) {\n classRefFlags |= ClassRefFlag.ForInnerBinding;\n }\n }\n\n lastInstanceNodeReturnsThis = false;\n\n // TODO(ts): there are so many `ts-expect-error` inside cases since\n // ts can not infer type from pre-computed values (or a case test)\n // even change `isStaticBlock` to `t.isStaticBlock(prop)` will not make prop\n // a `NodePath`\n // this maybe a bug for ts\n switch (true) {\n case isStaticBlock: {\n const blockBody = prop.node.body;\n // We special-case the single expression case to avoid the iife, since\n // it's common.\n if (blockBody.length === 1 && t.isExpressionStatement(blockBody[0])) {\n staticNodes.push(inheritPropComments(blockBody[0], prop));\n } else {\n staticNodes.push(\n t.inheritsComments(\n template.statement.ast`(() => { ${blockBody} })()`,\n prop.node,\n ),\n );\n }\n break;\n }\n case isStatic &&\n isPrivate &&\n isField &&\n privateFieldsAsSymbolsOrProperties:\n staticNodes.push(\n buildPrivateFieldInitLoose(t.cloneNode(ref), prop, privateNamesMap),\n );\n break;\n case isStatic &&\n isPrivate &&\n isField &&\n !privateFieldsAsSymbolsOrProperties:\n if (!process.env.BABEL_8_BREAKING && !newHelpers(file)) {\n staticNodes.push(\n buildPrivateStaticFieldInitSpecOld(prop, privateNamesMap),\n );\n } else {\n staticNodes.push(\n buildPrivateStaticFieldInitSpec(\n prop,\n privateNamesMap,\n noUninitializedPrivateFieldAccess,\n ),\n );\n }\n break;\n case isStatic && isPublic && isField && setPublicClassFields:\n // Functions always have non-writable .name and .length properties,\n // so we must always use [[Define]] for them.\n // It might still be possible to a computed static fields whose resulting\n // key is \"name\" or \"length\", but the assumption is telling us that it's\n // not going to happen.\n if (!isNameOrLength(prop.node)) {\n staticNodes.push(buildPublicFieldInitLoose(t.cloneNode(ref), prop));\n break;\n }\n // falls through\n case isStatic && isPublic && isField && !setPublicClassFields:\n staticNodes.push(\n buildPublicFieldInitSpec(t.cloneNode(ref), prop, file),\n );\n break;\n case isInstance &&\n isPrivate &&\n isField &&\n privateFieldsAsSymbolsOrProperties:\n instanceNodes.push(\n buildPrivateFieldInitLoose(t.thisExpression(), prop, privateNamesMap),\n );\n break;\n case isInstance &&\n isPrivate &&\n isField &&\n !privateFieldsAsSymbolsOrProperties:\n instanceNodes.push(\n buildPrivateInstanceFieldInitSpec(\n t.thisExpression(),\n prop,\n privateNamesMap,\n file,\n ),\n );\n break;\n case isInstance &&\n isPrivate &&\n isMethod &&\n privateFieldsAsSymbolsOrProperties:\n instanceNodes.unshift(\n buildPrivateMethodInitLoose(\n t.thisExpression(),\n prop,\n privateNamesMap,\n ),\n );\n pureStaticNodes.push(\n buildPrivateMethodDeclaration(\n file,\n prop,\n privateNamesMap,\n privateFieldsAsSymbolsOrProperties,\n ),\n );\n break;\n case isInstance &&\n isPrivate &&\n isMethod &&\n !privateFieldsAsSymbolsOrProperties:\n instanceNodes.unshift(\n buildPrivateInstanceMethodInitSpec(\n t.thisExpression(),\n prop,\n privateNamesMap,\n file,\n ),\n );\n pureStaticNodes.push(\n buildPrivateMethodDeclaration(\n file,\n prop,\n privateNamesMap,\n privateFieldsAsSymbolsOrProperties,\n ),\n );\n break;\n case isStatic &&\n isPrivate &&\n isMethod &&\n !privateFieldsAsSymbolsOrProperties:\n if (!process.env.BABEL_8_BREAKING && !newHelpers(file)) {\n staticNodes.unshift(\n // @ts-expect-error checked in switch\n buildPrivateStaticFieldInitSpecOld(prop, privateNamesMap),\n );\n }\n pureStaticNodes.push(\n buildPrivateMethodDeclaration(\n file,\n prop,\n privateNamesMap,\n privateFieldsAsSymbolsOrProperties,\n ),\n );\n break;\n case isStatic &&\n isPrivate &&\n isMethod &&\n privateFieldsAsSymbolsOrProperties:\n staticNodes.unshift(\n buildPrivateStaticMethodInitLoose(\n t.cloneNode(ref),\n prop,\n file,\n privateNamesMap,\n ),\n );\n pureStaticNodes.push(\n buildPrivateMethodDeclaration(\n file,\n prop,\n privateNamesMap,\n privateFieldsAsSymbolsOrProperties,\n ),\n );\n break;\n case isInstance && isPublic && isField && setPublicClassFields:\n instanceNodes.push(buildPublicFieldInitLoose(t.thisExpression(), prop));\n break;\n case isInstance && isPublic && isField && !setPublicClassFields:\n lastInstanceNodeReturnsThis = true;\n instanceNodes.push(\n buildPublicFieldInitSpec(t.thisExpression(), prop, file),\n );\n break;\n default:\n throw new Error(\"Unreachable.\");\n }\n }\n\n if (classRefFlags & ClassRefFlag.ForInnerBinding && innerBindingRef != null) {\n classBindingNode = t.expressionStatement(\n t.assignmentExpression(\n \"=\",\n t.cloneNode(classRefForInnerBinding),\n t.cloneNode(innerBindingRef),\n ),\n );\n }\n\n return {\n staticNodes: staticNodes.filter(Boolean),\n instanceNodes: instanceNodes.filter(Boolean),\n lastInstanceNodeReturnsThis,\n pureStaticNodes: pureStaticNodes.filter(Boolean),\n classBindingNode,\n wrapClass(path: NodePath) {\n for (const prop of props) {\n // Delete leading comments so that they don't get attached as\n // trailing comments of the previous sibling.\n // When transforming props, we explicitly attach their leading\n // comments to the transformed node with `inheritPropComments`\n // above.\n prop.node.leadingComments = null;\n prop.remove();\n }\n\n if (injectSuperRef) {\n path.scope.push({ id: t.cloneNode(injectSuperRef) });\n path.set(\n \"superClass\",\n t.assignmentExpression(\"=\", injectSuperRef, path.node.superClass),\n );\n }\n\n if (classRefFlags !== ClassRefFlag.None) {\n if (path.isClassExpression()) {\n path.scope.push({ id: ref });\n path.replaceWith(\n t.assignmentExpression(\"=\", t.cloneNode(ref), path.node),\n );\n } else {\n if (innerBindingRef == null) {\n // export anonymous class declaration\n path.node.id = ref;\n }\n if (classBindingNode != null) {\n path.scope.push({ id: classRefForInnerBinding });\n }\n }\n }\n\n return path;\n },\n };\n}\n","import { template, types as t } from \"@babel/core\";\nimport type { File, NodePath, Scope, Visitor } from \"@babel/core\";\nimport { visitors } from \"@babel/traverse\";\n\nconst findBareSupers = visitors.environmentVisitor<\n NodePath[]\n>({\n Super(path) {\n const { node, parentPath } = path;\n if (parentPath.isCallExpression({ callee: node })) {\n this.push(parentPath);\n }\n },\n});\n\nconst referenceVisitor: Visitor<{ scope: Scope }> = {\n \"TSTypeAnnotation|TypeAnnotation\"(\n path: NodePath,\n ) {\n path.skip();\n },\n\n ReferencedIdentifier(path: NodePath, { scope }) {\n if (scope.hasOwnBinding(path.node.name)) {\n scope.rename(path.node.name);\n path.skip();\n }\n },\n};\n\ntype HandleClassTDZState = {\n classBinding: Scope.Binding;\n file: File;\n};\n\nfunction handleClassTDZ(\n path: NodePath,\n state: HandleClassTDZState,\n) {\n if (\n state.classBinding &&\n state.classBinding === path.scope.getBinding(path.node.name)\n ) {\n const classNameTDZError = state.file.addHelper(\"classNameTDZError\");\n const throwNode = t.callExpression(classNameTDZError, [\n t.stringLiteral(path.node.name),\n ]);\n\n path.replaceWith(t.sequenceExpression([throwNode, path.node]));\n path.skip();\n }\n}\n\nconst classFieldDefinitionEvaluationTDZVisitor: Visitor = {\n ReferencedIdentifier: handleClassTDZ,\n};\n\ninterface RenamerState {\n scope: Scope;\n}\n\nexport function injectInitialization(\n path: NodePath,\n constructor: NodePath | undefined,\n nodes: t.ExpressionStatement[],\n renamer?: (visitor: Visitor, state: RenamerState) => void,\n lastReturnsThis?: boolean,\n) {\n if (!nodes.length) return;\n\n const isDerived = !!path.node.superClass;\n\n if (!constructor) {\n const newConstructor = t.classMethod(\n \"constructor\",\n t.identifier(\"constructor\"),\n [],\n t.blockStatement([]),\n );\n\n if (isDerived) {\n newConstructor.params = [t.restElement(t.identifier(\"args\"))];\n newConstructor.body.body.push(template.statement.ast`super(...args)`);\n }\n\n [constructor] = path\n .get(\"body\")\n .unshiftContainer(\"body\", newConstructor) as NodePath[];\n }\n\n if (renamer) {\n renamer(referenceVisitor, { scope: constructor.scope });\n }\n\n if (isDerived) {\n const bareSupers: NodePath[] = [];\n constructor.traverse(findBareSupers, bareSupers);\n let isFirst = true;\n for (const bareSuper of bareSupers) {\n if (isFirst) {\n isFirst = false;\n } else {\n nodes = nodes.map(n => t.cloneNode(n));\n }\n if (!bareSuper.parentPath.isExpressionStatement()) {\n const allNodes: t.Expression[] = [\n bareSuper.node,\n ...nodes.map(n => t.toExpression(n)),\n ];\n if (!lastReturnsThis) allNodes.push(t.thisExpression());\n bareSuper.replaceWith(t.sequenceExpression(allNodes));\n } else {\n bareSuper.insertAfter(nodes);\n }\n }\n } else {\n constructor.get(\"body\").unshiftContainer(\"body\", nodes);\n }\n}\n\ntype ComputedKeyAssignmentExpression = t.AssignmentExpression & {\n left: t.Identifier;\n};\n\n/**\n * Try to memoise a computed key.\n * It returns undefined when the computed key is an uid reference, otherwise\n * an assignment expression `memoiserId = computed key`\n * @export\n * @param {t.Expression} keyNode Computed key\n * @param {Scope} scope The scope where memoiser id should be registered\n * @param {string} hint The memoiser id hint\n * @returns {(ComputedKeyAssignmentExpression | undefined)}\n */\nexport function memoiseComputedKey(\n keyNode: t.Expression,\n scope: Scope,\n hint: string,\n): ComputedKeyAssignmentExpression | undefined {\n const isUidReference = t.isIdentifier(keyNode) && scope.hasUid(keyNode.name);\n if (isUidReference) {\n return;\n }\n const isMemoiseAssignment =\n t.isAssignmentExpression(keyNode, { operator: \"=\" }) &&\n t.isIdentifier(keyNode.left) &&\n scope.hasUid(keyNode.left.name);\n if (isMemoiseAssignment) {\n return t.cloneNode(keyNode as ComputedKeyAssignmentExpression);\n } else {\n const ident = t.identifier(hint);\n // Declaring in the same block scope\n // Ref: https://github.com/babel/babel/pull/10029/files#diff-fbbdd83e7a9c998721c1484529c2ce92\n scope.push({\n id: ident,\n kind: \"let\",\n });\n return t.assignmentExpression(\n \"=\",\n t.cloneNode(ident),\n keyNode,\n ) as ComputedKeyAssignmentExpression;\n }\n}\n\nexport function extractComputedKeys(\n path: NodePath,\n computedPaths: NodePath[],\n file: File,\n) {\n const { scope } = path;\n const declarations: t.ExpressionStatement[] = [];\n const state = {\n classBinding: path.node.id && scope.getBinding(path.node.id.name),\n file,\n };\n for (const computedPath of computedPaths) {\n const computedKey = computedPath.get(\"key\");\n if (computedKey.isReferencedIdentifier()) {\n handleClassTDZ(computedKey, state);\n } else {\n computedKey.traverse(classFieldDefinitionEvaluationTDZVisitor, state);\n }\n\n const computedNode = computedPath.node;\n // Make sure computed property names are only evaluated once (upon class definition)\n // and in the right order in combination with static properties\n if (!computedKey.isConstantExpression()) {\n const assignment = memoiseComputedKey(\n computedKey.node,\n scope,\n scope.generateUidBasedOnNode(computedKey.node),\n );\n if (assignment) {\n declarations.push(t.expressionStatement(assignment));\n computedNode.key = t.cloneNode(assignment.left);\n }\n }\n }\n\n return declarations;\n}\n","import type { NodePath, Scope, Visitor } from \"@babel/core\";\nimport { types as t, template } from \"@babel/core\";\nimport ReplaceSupers from \"@babel/helper-replace-supers\";\nimport type { PluginAPI, PluginObject, PluginPass } from \"@babel/core\";\nimport { skipTransparentExprWrappers } from \"@babel/helper-skip-transparent-expression-wrappers\";\nimport {\n privateNameVisitorFactory,\n type PrivateNameVisitorState,\n} from \"./fields.ts\";\nimport { memoiseComputedKey } from \"./misc.ts\";\n\n// We inline this package\n// eslint-disable-next-line import/no-extraneous-dependencies\nimport * as charCodes from \"charcodes\";\ninterface Options {\n /** @deprecated use `constantSuper` assumption instead. Only supported in 2021-12 version. */\n loose?: boolean;\n}\n\ntype ClassDecoratableElement =\n | t.ClassMethod\n | t.ClassPrivateMethod\n | t.ClassProperty\n | t.ClassPrivateProperty\n | t.ClassAccessorProperty;\n\ntype ClassElement =\n | ClassDecoratableElement\n | t.TSDeclareMethod\n | t.TSIndexSignature\n | t.StaticBlock;\n\ntype ClassElementCanHaveComputedKeys =\n | t.ClassMethod\n | t.ClassProperty\n | t.ClassAccessorProperty;\n\n// TODO(Babel 8): Only keep 2023-11\nexport type DecoratorVersionKind =\n | \"2023-11\"\n | \"2023-05\"\n | \"2023-01\"\n | \"2022-03\"\n | \"2021-12\";\n\nfunction incrementId(id: number[], idx = id.length - 1): void {\n // If index is -1, id needs an additional character, unshift A\n if (idx === -1) {\n id.unshift(charCodes.uppercaseA);\n return;\n }\n\n const current = id[idx];\n\n if (current === charCodes.uppercaseZ) {\n // if current is Z, skip to a\n id[idx] = charCodes.lowercaseA;\n } else if (current === charCodes.lowercaseZ) {\n // if current is z, reset to A and carry the 1\n id[idx] = charCodes.uppercaseA;\n incrementId(id, idx - 1);\n } else {\n // else, increment by one\n id[idx] = current + 1;\n }\n}\n\n/**\n * Generates a new private name that is unique to the given class. This can be\n * used to create extra class fields and methods for the implementation, while\n * keeping the length of those names as small as possible. This is important for\n * minification purposes (though private names can generally be minified,\n * transpilations and polyfills cannot yet).\n */\nfunction createPrivateUidGeneratorForClass(\n classPath: NodePath,\n): () => t.PrivateName {\n const currentPrivateId: number[] = [];\n const privateNames = new Set();\n\n classPath.traverse({\n PrivateName(path) {\n privateNames.add(path.node.id.name);\n },\n });\n\n return (): t.PrivateName => {\n let reifiedId;\n do {\n incrementId(currentPrivateId);\n reifiedId = String.fromCharCode(...currentPrivateId);\n } while (privateNames.has(reifiedId));\n\n return t.privateName(t.identifier(reifiedId));\n };\n}\n\n/**\n * Wraps the above generator function so that it's run lazily the first time\n * it's actually required. Several types of decoration do not require this, so it\n * saves iterating the class elements an additional time and allocating the space\n * for the Sets of element names.\n */\nfunction createLazyPrivateUidGeneratorForClass(\n classPath: NodePath,\n): () => t.PrivateName {\n let generator: () => t.PrivateName;\n\n return (): t.PrivateName => {\n if (!generator) {\n generator = createPrivateUidGeneratorForClass(classPath);\n }\n\n return generator();\n };\n}\n\n/**\n * Takes a class definition and the desired class name if anonymous and\n * replaces it with an equivalent class declaration (path) which is then\n * assigned to a local variable (id). This allows us to reassign the local variable with the\n * decorated version of the class. The class definition retains its original\n * name so that `toString` is not affected, other references to the class\n * are renamed instead.\n */\nfunction replaceClassWithVar(\n path: NodePath,\n className: string | t.Identifier | t.StringLiteral | undefined,\n): {\n id: t.Identifier;\n path: NodePath;\n} {\n const id = path.node.id;\n const scope = path.scope;\n if (path.type === \"ClassDeclaration\") {\n const className = id.name;\n const varId = scope.generateUidIdentifierBasedOnNode(id);\n const classId = t.identifier(className);\n\n scope.rename(className, varId.name);\n\n path.get(\"id\").replaceWith(classId);\n\n return { id: t.cloneNode(varId), path };\n } else {\n let varId: t.Identifier;\n\n if (id) {\n className = id.name;\n varId = generateLetUidIdentifier(scope.parent, className);\n scope.rename(className, varId.name);\n } else {\n varId = generateLetUidIdentifier(\n scope.parent,\n typeof className === \"string\" ? className : \"decorated_class\",\n );\n }\n\n const newClassExpr = t.classExpression(\n typeof className === \"string\" ? t.identifier(className) : null,\n path.node.superClass,\n path.node.body,\n );\n\n const [newPath] = path.replaceWith(\n t.sequenceExpression([newClassExpr, varId]),\n );\n\n return {\n id: t.cloneNode(varId),\n path: newPath.get(\"expressions.0\") as NodePath,\n };\n }\n}\n\nfunction generateClassProperty(\n key: t.PrivateName | t.Identifier,\n value: t.Expression | undefined,\n isStatic: boolean,\n): t.ClassPrivateProperty | t.ClassProperty {\n if (key.type === \"PrivateName\") {\n return t.classPrivateProperty(key, value, undefined, isStatic);\n } else {\n return t.classProperty(key, value, undefined, undefined, isStatic);\n }\n}\n\nfunction assignIdForAnonymousClass(\n path: NodePath,\n className: string | t.Identifier | t.StringLiteral | undefined,\n) {\n if (!path.node.id) {\n path.node.id =\n typeof className === \"string\"\n ? t.identifier(className)\n : path.scope.generateUidIdentifier(\"Class\");\n }\n}\n\nfunction addProxyAccessorsFor(\n className: t.Identifier,\n element: NodePath,\n getterKey: t.PrivateName | t.Expression,\n setterKey: t.PrivateName | t.Expression,\n targetKey: t.PrivateName,\n isComputed: boolean,\n isStatic: boolean,\n version: DecoratorVersionKind,\n): void {\n const thisArg =\n (version === \"2023-11\" ||\n (!process.env.BABEL_8_BREAKING && version === \"2023-05\")) &&\n isStatic\n ? className\n : t.thisExpression();\n\n const getterBody = t.blockStatement([\n t.returnStatement(\n t.memberExpression(t.cloneNode(thisArg), t.cloneNode(targetKey)),\n ),\n ]);\n\n const setterBody = t.blockStatement([\n t.expressionStatement(\n t.assignmentExpression(\n \"=\",\n t.memberExpression(t.cloneNode(thisArg), t.cloneNode(targetKey)),\n t.identifier(\"v\"),\n ),\n ),\n ]);\n\n let getter: t.ClassMethod | t.ClassPrivateMethod,\n setter: t.ClassMethod | t.ClassPrivateMethod;\n\n if (getterKey.type === \"PrivateName\") {\n getter = t.classPrivateMethod(\"get\", getterKey, [], getterBody, isStatic);\n setter = t.classPrivateMethod(\n \"set\",\n setterKey as t.PrivateName,\n [t.identifier(\"v\")],\n setterBody,\n isStatic,\n );\n } else {\n getter = t.classMethod(\n \"get\",\n getterKey,\n [],\n getterBody,\n isComputed,\n isStatic,\n );\n setter = t.classMethod(\n \"set\",\n setterKey as t.Expression,\n [t.identifier(\"v\")],\n setterBody,\n isComputed,\n isStatic,\n );\n }\n\n element.insertAfter(setter);\n element.insertAfter(getter);\n}\n\nfunction extractProxyAccessorsFor(\n targetKey: t.PrivateName,\n version: DecoratorVersionKind,\n): (t.FunctionExpression | t.ArrowFunctionExpression)[] {\n if (version !== \"2023-11\" && version !== \"2023-05\" && version !== \"2023-01\") {\n return [\n template.expression.ast`\n function () {\n return this.${t.cloneNode(targetKey)};\n }\n ` as t.FunctionExpression,\n template.expression.ast`\n function (value) {\n this.${t.cloneNode(targetKey)} = value;\n }\n ` as t.FunctionExpression,\n ];\n }\n return [\n template.expression.ast`\n o => o.${t.cloneNode(targetKey)}\n ` as t.ArrowFunctionExpression,\n template.expression.ast`\n (o, v) => o.${t.cloneNode(targetKey)} = v\n ` as t.ArrowFunctionExpression,\n ];\n}\n\n/**\n * Get the last element for the given computed key path.\n *\n * This function unwraps transparent wrappers and gets the last item when\n * the key is a SequenceExpression.\n *\n * @param {NodePath} path The key of a computed class element\n * @returns {NodePath} The simple completion result\n */\nfunction getComputedKeyLastElement(\n path: NodePath,\n): NodePath {\n path = skipTransparentExprWrappers(path);\n if (path.isSequenceExpression()) {\n const expressions = path.get(\"expressions\");\n return getComputedKeyLastElement(expressions[expressions.length - 1]);\n }\n return path;\n}\n\n/**\n * Get a memoiser of the computed key path.\n *\n * This function does not mutate AST. If the computed key is not a constant\n * expression, this function must be called after the key has been memoised.\n *\n * @param {NodePath} path The key of a computed class element.\n * @returns {t.Expression} A clone of key if key is a constant expression,\n * otherwise a memoiser identifier.\n */\nfunction getComputedKeyMemoiser(path: NodePath): t.Expression {\n const element = getComputedKeyLastElement(path);\n if (element.isConstantExpression()) {\n return t.cloneNode(path.node);\n } else if (element.isIdentifier() && path.scope.hasUid(element.node.name)) {\n return t.cloneNode(path.node);\n } else if (\n element.isAssignmentExpression() &&\n element.get(\"left\").isIdentifier()\n ) {\n return t.cloneNode(element.node.left as t.Identifier);\n } else {\n throw new Error(\n `Internal Error: the computed key ${path.toString()} has not yet been memoised.`,\n );\n }\n}\n\n/**\n * Prepend expressions to the computed key of the given field path.\n *\n * If the computed key is a sequence expression, this function will unwrap\n * the sequence expression for optimal output size.\n *\n * @param {t.Expression[]} expressions\n * @param {(NodePath<\n * t.ClassMethod | t.ClassProperty | t.ClassAccessorProperty\n * >)} fieldPath\n */\nfunction prependExpressionsToComputedKey(\n expressions: t.Expression[],\n fieldPath: NodePath<\n t.ClassMethod | t.ClassProperty | t.ClassAccessorProperty\n >,\n) {\n const key = fieldPath.get(\"key\") as NodePath;\n if (key.isSequenceExpression()) {\n expressions.push(...key.node.expressions);\n } else {\n expressions.push(key.node);\n }\n key.replaceWith(maybeSequenceExpression(expressions));\n}\n\n/**\n * Append expressions to the computed key of the given field path.\n *\n * If the computed key is a constant expression or uid reference, it\n * will prepend expressions before the comptued key. Otherwise it will\n * memoise the computed key to preserve its completion result.\n *\n * @param {t.Expression[]} expressions\n * @param {(NodePath<\n * t.ClassMethod | t.ClassProperty | t.ClassAccessorProperty\n * >)} fieldPath\n */\nfunction appendExpressionsToComputedKey(\n expressions: t.Expression[],\n fieldPath: NodePath<\n t.ClassMethod | t.ClassProperty | t.ClassAccessorProperty\n >,\n) {\n const key = fieldPath.get(\"key\") as NodePath;\n const completion = getComputedKeyLastElement(key);\n if (completion.isConstantExpression()) {\n prependExpressionsToComputedKey(expressions, fieldPath);\n } else {\n const scopeParent = key.scope.parent;\n const maybeAssignment = memoiseComputedKey(\n completion.node,\n scopeParent,\n scopeParent.generateUid(\"computedKey\"),\n );\n if (!maybeAssignment) {\n // If the memoiseComputedKey returns undefined, the key is already a uid reference,\n // treat it as a constant expression and prepend expressions before it\n prependExpressionsToComputedKey(expressions, fieldPath);\n } else {\n const expressionSequence = [\n ...expressions,\n // preserve the completion result\n t.cloneNode(maybeAssignment.left),\n ];\n const completionParent = completion.parentPath;\n if (completionParent.isSequenceExpression()) {\n completionParent.pushContainer(\"expressions\", expressionSequence);\n } else {\n completion.replaceWith(\n maybeSequenceExpression([\n t.cloneNode(maybeAssignment),\n ...expressionSequence,\n ]),\n );\n }\n }\n }\n}\n\n/**\n * Prepend expressions to the field initializer. If the initializer is not defined,\n * this function will wrap the last expression within a `void` unary expression.\n *\n * @param {t.Expression[]} expressions\n * @param {(NodePath<\n * t.ClassProperty | t.ClassPrivateProperty | t.ClassAccessorProperty\n * >)} fieldPath\n */\nfunction prependExpressionsToFieldInitializer(\n expressions: t.Expression[],\n fieldPath: NodePath<\n t.ClassProperty | t.ClassPrivateProperty | t.ClassAccessorProperty\n >,\n) {\n const initializer = fieldPath.get(\"value\");\n if (initializer.node) {\n expressions.push(initializer.node);\n } else if (expressions.length > 0) {\n expressions[expressions.length - 1] = t.unaryExpression(\n \"void\",\n expressions[expressions.length - 1],\n );\n }\n initializer.replaceWith(maybeSequenceExpression(expressions));\n}\n\nfunction prependExpressionsToStaticBlock(\n expressions: t.Expression[],\n blockPath: NodePath,\n) {\n blockPath.unshiftContainer(\n \"body\",\n t.expressionStatement(maybeSequenceExpression(expressions)),\n );\n}\n\nfunction prependExpressionsToConstructor(\n expressions: t.Expression[],\n constructorPath: NodePath,\n) {\n constructorPath.node.body.body.unshift(\n t.expressionStatement(maybeSequenceExpression(expressions)),\n );\n}\n\nfunction isProtoInitCallExpression(\n expression: t.Expression,\n protoInitCall: t.Identifier,\n) {\n return (\n t.isCallExpression(expression) &&\n t.isIdentifier(expression.callee, { name: protoInitCall.name })\n );\n}\n\n/**\n * Optimize super call and its following expressions\n *\n * @param {t.Expression[]} expressions Mutated by this function. The first element must by a super call\n * @param {t.Identifier} protoInitLocal The generated protoInit id\n * @returns optimized expression\n */\nfunction optimizeSuperCallAndExpressions(\n expressions: t.Expression[],\n protoInitLocal: t.Identifier,\n) {\n if (protoInitLocal) {\n if (\n expressions.length >= 2 &&\n isProtoInitCallExpression(expressions[1], protoInitLocal)\n ) {\n // Merge `super(), protoInit(this)` into `protoInit(super())`\n const mergedSuperCall = t.callExpression(t.cloneNode(protoInitLocal), [\n expressions[0],\n ]);\n expressions.splice(0, 2, mergedSuperCall);\n }\n // Merge `protoInit(super()), this` into `protoInit(super())`\n if (\n expressions.length >= 2 &&\n t.isThisExpression(expressions[expressions.length - 1]) &&\n isProtoInitCallExpression(\n expressions[expressions.length - 2],\n protoInitLocal,\n )\n ) {\n expressions.splice(expressions.length - 1, 1);\n }\n }\n return maybeSequenceExpression(expressions);\n}\n\n/**\n * Insert expressions immediately after super() and optimize the output if possible.\n * This function will preserve the completion result using the trailing this expression.\n *\n * @param {t.Expression[]} expressions\n * @param {NodePath} constructorPath\n * @param {t.Identifier} protoInitLocal The generated protoInit id\n * @returns\n */\nfunction insertExpressionsAfterSuperCallAndOptimize(\n expressions: t.Expression[],\n constructorPath: NodePath,\n protoInitLocal: t.Identifier,\n) {\n constructorPath.traverse({\n CallExpression: {\n exit(path) {\n if (!path.get(\"callee\").isSuper()) return;\n const newNodes = [\n path.node,\n ...expressions.map(expr => t.cloneNode(expr)),\n ];\n // preserve completion result if super() is in an RHS or a return statement\n if (path.isCompletionRecord()) {\n newNodes.push(t.thisExpression());\n }\n path.replaceWith(\n optimizeSuperCallAndExpressions(newNodes, protoInitLocal),\n );\n\n path.skip();\n },\n },\n ClassMethod(path) {\n if (path.node.kind === \"constructor\") {\n path.skip();\n }\n },\n });\n}\n\n/**\n * Build a class constructor node from the given expressions. If the class is\n * derived, the constructor will call super() first to ensure that `this`\n * in the expressions work as expected.\n *\n * @param {t.Expression[]} expressions\n * @param {boolean} isDerivedClass\n * @returns The class constructor node\n */\nfunction createConstructorFromExpressions(\n expressions: t.Expression[],\n isDerivedClass: boolean,\n) {\n const body: t.Statement[] = [\n t.expressionStatement(maybeSequenceExpression(expressions)),\n ];\n if (isDerivedClass) {\n body.unshift(\n t.expressionStatement(\n t.callExpression(t.super(), [t.spreadElement(t.identifier(\"args\"))]),\n ),\n );\n }\n return t.classMethod(\n \"constructor\",\n t.identifier(\"constructor\"),\n isDerivedClass ? [t.restElement(t.identifier(\"args\"))] : [],\n t.blockStatement(body),\n );\n}\n\nfunction createStaticBlockFromExpressions(expressions: t.Expression[]) {\n return t.staticBlock([\n t.expressionStatement(maybeSequenceExpression(expressions)),\n ]);\n}\n\n// 3 bits reserved to this (0-7)\nconst FIELD = 0;\nconst ACCESSOR = 1;\nconst METHOD = 2;\nconst GETTER = 3;\nconst SETTER = 4;\n\nconst STATIC_OLD_VERSION = 5; // Before 2023-05\nconst STATIC = 8; // 1 << 3\nconst DECORATORS_HAVE_THIS = 16; // 1 << 4\n\nfunction getElementKind(element: NodePath): number {\n switch (element.node.type) {\n case \"ClassProperty\":\n case \"ClassPrivateProperty\":\n return FIELD;\n case \"ClassAccessorProperty\":\n return ACCESSOR;\n case \"ClassMethod\":\n case \"ClassPrivateMethod\":\n if (element.node.kind === \"get\") {\n return GETTER;\n } else if (element.node.kind === \"set\") {\n return SETTER;\n } else {\n return METHOD;\n }\n }\n}\n\n// Information about the decorators applied to an element\ninterface DecoratorInfo {\n // An array of applied decorators or a memoised identifier\n decoratorsArray: t.Identifier | t.ArrayExpression | t.Expression;\n decoratorsHaveThis: boolean;\n\n // The kind of the decorated value, matches the kind value passed to applyDecs\n kind: number;\n\n // whether or not the field is static\n isStatic: boolean;\n\n // The name of the decorator\n name: t.StringLiteral | t.Expression;\n\n privateMethods:\n | (t.FunctionExpression | t.ArrowFunctionExpression)[]\n | undefined;\n\n // The names of local variables that will be used/returned from the decoration\n locals: t.Identifier | t.Identifier[] | undefined;\n}\n\n/**\n * Sort decoration info in the application order:\n * - static non-fields\n * - instance non-fields\n * - static fields\n * - instance fields\n *\n * @param {DecoratorInfo[]} info\n * @returns {DecoratorInfo[]} Sorted decoration info\n */\nfunction toSortedDecoratorInfo(info: DecoratorInfo[]): DecoratorInfo[] {\n return [\n ...info.filter(\n el => el.isStatic && el.kind >= ACCESSOR && el.kind <= SETTER,\n ),\n ...info.filter(\n el => !el.isStatic && el.kind >= ACCESSOR && el.kind <= SETTER,\n ),\n ...info.filter(el => el.isStatic && el.kind === FIELD),\n ...info.filter(el => !el.isStatic && el.kind === FIELD),\n ];\n}\n\ntype GenerateDecorationListResult = {\n // The zipped decorators array that will be passed to generateDecorationExprs\n decs: t.Expression[];\n // Whether there are non-empty decorator this values\n haveThis: boolean;\n};\n/**\n * Zip decorators and decorator this values into an array\n *\n * @param {t.Decorator[]} decorators\n * @param {((t.Expression | undefined)[])} decoratorsThis decorator this values\n * @param {DecoratorVersionKind} version\n * @returns {GenerateDecorationListResult}\n */\nfunction generateDecorationList(\n decorators: t.Decorator[],\n decoratorsThis: (t.Expression | undefined)[],\n version: DecoratorVersionKind,\n): GenerateDecorationListResult {\n const decsCount = decorators.length;\n const haveOneThis = decoratorsThis.some(Boolean);\n const decs: t.Expression[] = [];\n for (let i = 0; i < decsCount; i++) {\n if (\n (version === \"2023-11\" ||\n (!process.env.BABEL_8_BREAKING && version === \"2023-05\")) &&\n haveOneThis\n ) {\n decs.push(\n decoratorsThis[i] || t.unaryExpression(\"void\", t.numericLiteral(0)),\n );\n }\n decs.push(decorators[i].expression);\n }\n\n return { haveThis: haveOneThis, decs };\n}\n\nfunction generateDecorationExprs(\n decorationInfo: DecoratorInfo[],\n version: DecoratorVersionKind,\n): t.ArrayExpression {\n return t.arrayExpression(\n decorationInfo.map(el => {\n let flag = el.kind;\n if (el.isStatic) {\n flag +=\n version === \"2023-11\" ||\n (!process.env.BABEL_8_BREAKING && version === \"2023-05\")\n ? STATIC\n : STATIC_OLD_VERSION;\n }\n if (el.decoratorsHaveThis) flag += DECORATORS_HAVE_THIS;\n\n return t.arrayExpression([\n el.decoratorsArray,\n t.numericLiteral(flag),\n el.name,\n ...(el.privateMethods || []),\n ]);\n }),\n );\n}\n\nfunction extractElementLocalAssignments(decorationInfo: DecoratorInfo[]) {\n const localIds: t.Identifier[] = [];\n\n for (const el of decorationInfo) {\n const { locals } = el;\n\n if (Array.isArray(locals)) {\n localIds.push(...locals);\n } else if (locals !== undefined) {\n localIds.push(locals);\n }\n }\n\n return localIds;\n}\n\nfunction addCallAccessorsFor(\n version: DecoratorVersionKind,\n element: NodePath,\n key: t.PrivateName,\n getId: t.Identifier,\n setId: t.Identifier,\n isStatic: boolean,\n) {\n element.insertAfter(\n t.classPrivateMethod(\n \"get\",\n t.cloneNode(key),\n [],\n t.blockStatement([\n t.returnStatement(\n t.callExpression(\n t.cloneNode(getId),\n (process.env.BABEL_8_BREAKING || version === \"2023-11\") && isStatic\n ? []\n : [t.thisExpression()],\n ),\n ),\n ]),\n isStatic,\n ),\n );\n\n element.insertAfter(\n t.classPrivateMethod(\n \"set\",\n t.cloneNode(key),\n [t.identifier(\"v\")],\n t.blockStatement([\n t.expressionStatement(\n t.callExpression(\n t.cloneNode(setId),\n (process.env.BABEL_8_BREAKING || version === \"2023-11\") && isStatic\n ? [t.identifier(\"v\")]\n : [t.thisExpression(), t.identifier(\"v\")],\n ),\n ),\n ]),\n isStatic,\n ),\n );\n}\n\nfunction movePrivateAccessor(\n element: NodePath,\n key: t.PrivateName,\n methodLocalVar: t.Identifier,\n isStatic: boolean,\n) {\n let params: (t.Identifier | t.RestElement)[];\n let block: t.Statement[];\n\n if (element.node.kind === \"set\") {\n params = [t.identifier(\"v\")];\n block = [\n t.expressionStatement(\n t.callExpression(methodLocalVar, [\n t.thisExpression(),\n t.identifier(\"v\"),\n ]),\n ),\n ];\n } else {\n params = [];\n block = [\n t.returnStatement(t.callExpression(methodLocalVar, [t.thisExpression()])),\n ];\n }\n\n element.replaceWith(\n t.classPrivateMethod(\n element.node.kind,\n t.cloneNode(key),\n params,\n t.blockStatement(block),\n isStatic,\n ),\n );\n}\n\nfunction isClassDecoratableElementPath(\n path: NodePath,\n): path is NodePath {\n const { type } = path;\n\n return (\n type !== \"TSDeclareMethod\" &&\n type !== \"TSIndexSignature\" &&\n type !== \"StaticBlock\"\n );\n}\n\nfunction staticBlockToIIFE(block: t.StaticBlock) {\n return t.callExpression(\n t.arrowFunctionExpression([], t.blockStatement(block.body)),\n [],\n );\n}\n\nfunction staticBlockToFunctionClosure(block: t.StaticBlock) {\n return t.functionExpression(null, [], t.blockStatement(block.body));\n}\n\nfunction fieldInitializerToClosure(value: t.Expression) {\n return t.functionExpression(\n null,\n [],\n t.blockStatement([t.returnStatement(value)]),\n );\n}\n\nfunction maybeSequenceExpression(exprs: t.Expression[]) {\n if (exprs.length === 0) return t.unaryExpression(\"void\", t.numericLiteral(0));\n if (exprs.length === 1) return exprs[0];\n return t.sequenceExpression(exprs);\n}\n\n/**\n * Create FunctionExpression from a ClassPrivateMethod.\n * The returned FunctionExpression node takes ownership of the private method's body and params.\n *\n * @param {t.ClassPrivateMethod} node\n * @returns\n */\nfunction createFunctionExpressionFromPrivateMethod(node: t.ClassPrivateMethod) {\n const { params, body, generator: isGenerator, async: isAsync } = node;\n return t.functionExpression(\n undefined,\n // @ts-expect-error todo: Improve typings: TSParameterProperty is only allowed in constructor\n params,\n body,\n isGenerator,\n isAsync,\n );\n}\n\nfunction createSetFunctionNameCall(\n state: PluginPass,\n className: t.Identifier | t.StringLiteral,\n) {\n return t.callExpression(state.addHelper(\"setFunctionName\"), [\n t.thisExpression(),\n className,\n ]);\n}\n\nfunction createToPropertyKeyCall(state: PluginPass, propertyKey: t.Expression) {\n return t.callExpression(state.addHelper(\"toPropertyKey\"), [propertyKey]);\n}\n\nfunction createPrivateBrandCheckClosure(brandName: t.PrivateName) {\n return t.arrowFunctionExpression(\n [t.identifier(\"_\")],\n t.binaryExpression(\"in\", t.cloneNode(brandName), t.identifier(\"_\")),\n );\n}\n\nfunction usesPrivateField(expression: t.Node) {\n try {\n t.traverseFast(expression, node => {\n if (t.isPrivateName(node)) {\n // TODO: Add early return support to t.traverseFast\n // eslint-disable-next-line @typescript-eslint/only-throw-error\n throw null;\n }\n });\n return false;\n } catch {\n return true;\n }\n}\n\n/**\n * Convert a non-computed class element to its equivalent computed form.\n *\n * This function is to provide a decorator evaluation storage from non-computed\n * class elements.\n *\n * @param {(NodePath)} path A non-computed class property or method\n */\nfunction convertToComputedKey(path: NodePath) {\n const { node } = path;\n node.computed = true;\n if (t.isIdentifier(node.key)) {\n node.key = t.stringLiteral(node.key.name);\n }\n}\n\nfunction hasInstancePrivateAccess(path: NodePath, privateNames: string[]) {\n let containsInstancePrivateAccess = false;\n if (privateNames.length > 0) {\n const privateNameVisitor = privateNameVisitorFactory<\n PrivateNameVisitorState,\n null\n >({\n PrivateName(path, state) {\n if (state.privateNamesMap.has(path.node.id.name)) {\n containsInstancePrivateAccess = true;\n path.stop();\n }\n },\n });\n const privateNamesMap = new Map();\n for (const name of privateNames) {\n privateNamesMap.set(name, null);\n }\n path.traverse(privateNameVisitor, {\n privateNamesMap: privateNamesMap,\n });\n }\n return containsInstancePrivateAccess;\n}\n\nfunction checkPrivateMethodUpdateError(\n path: NodePath,\n decoratedPrivateMethods: Set,\n) {\n const privateNameVisitor = privateNameVisitorFactory<\n PrivateNameVisitorState,\n null\n >({\n PrivateName(path, state) {\n if (!state.privateNamesMap.has(path.node.id.name)) return;\n\n const parentPath = path.parentPath;\n const parentParentPath = parentPath.parentPath;\n\n if (\n // this.bar().#x = 123;\n (parentParentPath.node.type === \"AssignmentExpression\" &&\n parentParentPath.node.left === parentPath.node) ||\n // this.#x++;\n parentParentPath.node.type === \"UpdateExpression\" ||\n // ([...this.#x] = foo);\n parentParentPath.node.type === \"RestElement\" ||\n // ([this.#x] = foo);\n parentParentPath.node.type === \"ArrayPattern\" ||\n // ({ a: this.#x } = bar);\n (parentParentPath.node.type === \"ObjectProperty\" &&\n parentParentPath.node.value === parentPath.node &&\n parentParentPath.parentPath.type === \"ObjectPattern\") ||\n // for (this.#x of []);\n (parentParentPath.node.type === \"ForOfStatement\" &&\n parentParentPath.node.left === parentPath.node)\n ) {\n throw path.buildCodeFrameError(\n `Decorated private methods are read-only, but \"#${path.node.id.name}\" is updated via this expression.`,\n );\n }\n },\n });\n const privateNamesMap = new Map();\n for (const name of decoratedPrivateMethods) {\n privateNamesMap.set(name, null);\n }\n path.traverse(privateNameVisitor, {\n privateNamesMap: privateNamesMap,\n });\n}\n\n/**\n * Apply decorator and accessor transform\n * @param path The class path.\n * @param state The plugin pass.\n * @param constantSuper The constantSuper compiler assumption.\n * @param ignoreFunctionLength The ignoreFunctionLength compiler assumption.\n * @param className The class name.\n * - If className is a `string`, it will be a valid identifier name that can safely serve as a class id\n * - If className is an Identifier, it is the reference to the name derived from NamedEvaluation\n * - If className is a StringLiteral, it is derived from NamedEvaluation on literal computed keys\n * @param propertyVisitor The visitor that should be applied on property prior to the transform.\n * @param version The decorator version.\n * @returns The transformed class path or undefined if there are no decorators.\n */\nfunction transformClass(\n path: NodePath,\n state: PluginPass,\n constantSuper: boolean,\n ignoreFunctionLength: boolean,\n className: string | t.Identifier | t.StringLiteral | undefined,\n propertyVisitor: Visitor,\n version: DecoratorVersionKind,\n): NodePath | undefined {\n const body = path.get(\"body.body\");\n\n const classDecorators = path.node.decorators;\n let hasElementDecorators = false;\n let hasComputedKeysSideEffects = false;\n let elemDecsUseFnContext = false;\n\n const generateClassPrivateUid = createLazyPrivateUidGeneratorForClass(path);\n\n const classAssignments: t.AssignmentExpression[] = [];\n const scopeParent: Scope = path.scope.parent;\n const memoiseExpression = (\n expression: t.Expression,\n hint: string,\n assignments: t.AssignmentExpression[],\n ) => {\n const localEvaluatedId = generateLetUidIdentifier(scopeParent, hint);\n assignments.push(t.assignmentExpression(\"=\", localEvaluatedId, expression));\n return t.cloneNode(localEvaluatedId);\n };\n\n let protoInitLocal: t.Identifier;\n let staticInitLocal: t.Identifier;\n const classIdName = path.node.id?.name;\n // Whether to generate a setFunctionName call to preserve the class name\n const setClassName = typeof className === \"object\" ? className : undefined;\n // Check if the decorator does not reference function-specific\n // context or the given identifier name or contains yield or await expression.\n // `true` means \"maybe\" and `false` means \"no\".\n const usesFunctionContextOrYieldAwait = (decorator: t.Decorator) => {\n try {\n t.traverseFast(decorator, node => {\n if (\n t.isThisExpression(node) ||\n t.isSuper(node) ||\n t.isYieldExpression(node) ||\n t.isAwaitExpression(node) ||\n t.isIdentifier(node, { name: \"arguments\" }) ||\n (classIdName && t.isIdentifier(node, { name: classIdName })) ||\n (t.isMetaProperty(node) && node.meta.name !== \"import\")\n ) {\n // TODO: Add early return support to t.traverseFast\n // eslint-disable-next-line @typescript-eslint/only-throw-error\n throw null;\n }\n });\n return false;\n } catch {\n return true;\n }\n };\n\n const instancePrivateNames: string[] = [];\n // Iterate over the class to see if we need to decorate it, and also to\n // transform simple auto accessors which are not decorated, and handle inferred\n // class name when the initializer of the class field is a class expression\n for (const element of body) {\n if (!isClassDecoratableElementPath(element)) {\n continue;\n }\n\n const elementNode = element.node;\n\n if (!elementNode.static && t.isPrivateName(elementNode.key)) {\n instancePrivateNames.push(elementNode.key.id.name);\n }\n\n if (isDecorated(elementNode)) {\n switch (elementNode.type) {\n case \"ClassProperty\":\n // @ts-expect-error todo: propertyVisitor.ClassProperty should be callable. Improve typings.\n propertyVisitor.ClassProperty(\n element as NodePath,\n state,\n );\n break;\n case \"ClassPrivateProperty\":\n // @ts-expect-error todo: propertyVisitor.ClassPrivateProperty should be callable. Improve typings.\n propertyVisitor.ClassPrivateProperty(\n element as NodePath,\n state,\n );\n break;\n case \"ClassAccessorProperty\":\n // @ts-expect-error todo: propertyVisitor.ClassAccessorProperty should be callable. Improve typings.\n propertyVisitor.ClassAccessorProperty(\n element as NodePath,\n state,\n );\n if (version === \"2023-11\") {\n break;\n }\n /* fallthrough */\n default:\n if (elementNode.static) {\n staticInitLocal ??= generateLetUidIdentifier(\n scopeParent,\n \"initStatic\",\n );\n } else {\n protoInitLocal ??= generateLetUidIdentifier(\n scopeParent,\n \"initProto\",\n );\n }\n break;\n }\n hasElementDecorators = true;\n elemDecsUseFnContext ||= elementNode.decorators.some(\n usesFunctionContextOrYieldAwait,\n );\n } else if (elementNode.type === \"ClassAccessorProperty\") {\n // @ts-expect-error todo: propertyVisitor.ClassAccessorProperty should be callable. Improve typings.\n propertyVisitor.ClassAccessorProperty(\n element as NodePath,\n state,\n );\n const { key, value, static: isStatic, computed } = elementNode;\n\n const newId = generateClassPrivateUid();\n const newField = generateClassProperty(newId, value, isStatic);\n const keyPath = element.get(\"key\");\n const [newPath] = element.replaceWith(newField);\n\n let getterKey, setterKey;\n if (computed && !keyPath.isConstantExpression()) {\n getterKey = memoiseComputedKey(\n createToPropertyKeyCall(state, key as t.Expression),\n scopeParent,\n scopeParent.generateUid(\"computedKey\"),\n )!;\n setterKey = t.cloneNode(getterKey.left as t.Identifier);\n } else {\n getterKey = t.cloneNode(key);\n setterKey = t.cloneNode(key);\n }\n\n assignIdForAnonymousClass(path, className);\n\n addProxyAccessorsFor(\n path.node.id,\n newPath,\n getterKey,\n setterKey,\n newId,\n computed,\n isStatic,\n version,\n );\n }\n\n if (\"computed\" in element.node && element.node.computed) {\n hasComputedKeysSideEffects ||= !scopeParent.isStatic(element.node.key);\n }\n }\n\n if (!classDecorators && !hasElementDecorators) {\n if (!path.node.id && typeof className === \"string\") {\n path.node.id = t.identifier(className);\n }\n if (setClassName) {\n path.node.body.body.unshift(\n createStaticBlockFromExpressions([\n createSetFunctionNameCall(state, setClassName),\n ]),\n );\n }\n // If nothing is decorated and no assignments inserted, return\n return;\n }\n\n const elementDecoratorInfo: DecoratorInfo[] = [];\n\n let constructorPath: NodePath | undefined;\n const decoratedPrivateMethods = new Set();\n\n let classInitLocal: t.Identifier, classIdLocal: t.Identifier;\n let decoratorReceiverId: t.Identifier | null = null;\n\n // Memoise the this value `a.b` of decorator member expressions `@a.b.dec`,\n type HandleDecoratorsResult = {\n // whether the whole decorator list requires memoisation\n hasSideEffects: boolean;\n usesFnContext: boolean;\n // the this value of each decorator if applicable\n decoratorsThis: (t.Expression | undefined)[];\n };\n function handleDecorators(decorators: t.Decorator[]): HandleDecoratorsResult {\n let hasSideEffects = false;\n let usesFnContext = false;\n const decoratorsThis: (t.Expression | null)[] = [];\n for (const decorator of decorators) {\n const { expression } = decorator;\n let object;\n if (\n (version === \"2023-11\" ||\n (!process.env.BABEL_8_BREAKING && version === \"2023-05\")) &&\n t.isMemberExpression(expression)\n ) {\n if (t.isSuper(expression.object)) {\n object = t.thisExpression();\n } else if (scopeParent.isStatic(expression.object)) {\n object = t.cloneNode(expression.object);\n } else {\n decoratorReceiverId ??= generateLetUidIdentifier(scopeParent, \"obj\");\n object = t.assignmentExpression(\n \"=\",\n t.cloneNode(decoratorReceiverId),\n expression.object,\n );\n expression.object = t.cloneNode(decoratorReceiverId);\n }\n }\n decoratorsThis.push(object);\n hasSideEffects ||= !scopeParent.isStatic(expression);\n usesFnContext ||= usesFunctionContextOrYieldAwait(decorator);\n }\n return { hasSideEffects, usesFnContext, decoratorsThis };\n }\n\n const willExtractSomeElemDecs =\n hasComputedKeysSideEffects ||\n (process.env.BABEL_8_BREAKING\n ? elemDecsUseFnContext\n : elemDecsUseFnContext || version !== \"2023-11\");\n\n let needsDeclaraionForClassBinding = false;\n let classDecorationsFlag = 0;\n let classDecorations: t.Expression[] = [];\n let classDecorationsId: t.Identifier;\n let computedKeyAssignments: t.AssignmentExpression[] = [];\n if (classDecorators) {\n classInitLocal = generateLetUidIdentifier(scopeParent, \"initClass\");\n needsDeclaraionForClassBinding = path.isClassDeclaration();\n ({ id: classIdLocal, path } = replaceClassWithVar(path, className));\n\n path.node.decorators = null;\n\n const classDecsUsePrivateName = classDecorators.some(usesPrivateField);\n const { hasSideEffects, usesFnContext, decoratorsThis } =\n handleDecorators(classDecorators);\n\n const { haveThis, decs } = generateDecorationList(\n classDecorators,\n decoratorsThis,\n version,\n );\n classDecorationsFlag = haveThis ? 1 : 0;\n classDecorations = decs;\n\n if (\n usesFnContext ||\n (hasSideEffects && willExtractSomeElemDecs) ||\n classDecsUsePrivateName\n ) {\n classDecorationsId = memoiseExpression(\n t.arrayExpression(classDecorations),\n \"classDecs\",\n classAssignments,\n );\n }\n\n if (!hasElementDecorators) {\n // Sync body paths as non-decorated computed accessors have been transpiled\n // to getter-setter pairs.\n for (const element of path.get(\"body.body\")) {\n const { node } = element;\n const isComputed = \"computed\" in node && node.computed;\n if (isComputed) {\n if (element.isClassProperty({ static: true })) {\n if (!element.get(\"key\").isConstantExpression()) {\n const key = (node as t.ClassProperty).key;\n const maybeAssignment = memoiseComputedKey(\n key,\n scopeParent,\n scopeParent.generateUid(\"computedKey\"),\n );\n if (maybeAssignment != null) {\n // If it is a static computed field within a decorated class, we move the computed key\n // into `computedKeyAssignments` which will be then moved into the non-static class,\n // to ensure that the evaluation order and private environment are correct\n node.key = t.cloneNode(maybeAssignment.left);\n computedKeyAssignments.push(maybeAssignment);\n }\n }\n } else if (computedKeyAssignments.length > 0) {\n prependExpressionsToComputedKey(\n computedKeyAssignments,\n element as NodePath,\n );\n computedKeyAssignments = [];\n }\n }\n }\n }\n } else {\n assignIdForAnonymousClass(path, className);\n classIdLocal = t.cloneNode(path.node.id);\n }\n\n let lastInstancePrivateName: t.PrivateName;\n let needsInstancePrivateBrandCheck = false;\n\n let fieldInitializerExpressions = [];\n let staticFieldInitializerExpressions: t.Expression[] = [];\n\n if (hasElementDecorators) {\n if (protoInitLocal) {\n const protoInitCall = t.callExpression(t.cloneNode(protoInitLocal), [\n t.thisExpression(),\n ]);\n fieldInitializerExpressions.push(protoInitCall);\n }\n for (const element of body) {\n if (!isClassDecoratableElementPath(element)) {\n if (\n staticFieldInitializerExpressions.length > 0 &&\n element.isStaticBlock()\n ) {\n prependExpressionsToStaticBlock(\n staticFieldInitializerExpressions,\n element,\n );\n staticFieldInitializerExpressions = [];\n }\n continue;\n }\n\n const { node } = element;\n const decorators = node.decorators;\n\n const hasDecorators = !!decorators?.length;\n\n const isComputed = \"computed\" in node && node.computed;\n\n let name = \"computedKey\";\n\n if (node.key.type === \"PrivateName\") {\n name = node.key.id.name;\n } else if (!isComputed && node.key.type === \"Identifier\") {\n name = node.key.name;\n }\n let decoratorsArray: t.Identifier | t.ArrayExpression | t.Expression;\n let decoratorsHaveThis;\n\n if (hasDecorators) {\n const { hasSideEffects, usesFnContext, decoratorsThis } =\n handleDecorators(decorators);\n const { decs, haveThis } = generateDecorationList(\n decorators,\n decoratorsThis,\n version,\n );\n decoratorsHaveThis = haveThis;\n decoratorsArray = decs.length === 1 ? decs[0] : t.arrayExpression(decs);\n if (usesFnContext || (hasSideEffects && willExtractSomeElemDecs)) {\n decoratorsArray = memoiseExpression(\n decoratorsArray,\n name + \"Decs\",\n computedKeyAssignments,\n );\n }\n }\n\n if (isComputed) {\n if (!element.get(\"key\").isConstantExpression()) {\n const key = node.key as t.Expression;\n const maybeAssignment = memoiseComputedKey(\n hasDecorators ? createToPropertyKeyCall(state, key) : key,\n scopeParent,\n scopeParent.generateUid(\"computedKey\"),\n );\n if (maybeAssignment != null) {\n // If it is a static computed field within a decorated class, we move the computed key\n // into `computedKeyAssignments` which will be then moved into the non-static class,\n // to ensure that the evaluation order and private environment are correct\n if (classDecorators && element.isClassProperty({ static: true })) {\n node.key = t.cloneNode(maybeAssignment.left);\n computedKeyAssignments.push(maybeAssignment);\n } else {\n node.key = maybeAssignment;\n }\n }\n }\n }\n\n const { key, static: isStatic } = node;\n\n const isPrivate = key.type === \"PrivateName\";\n\n const kind = getElementKind(element);\n\n if (isPrivate && !isStatic) {\n if (hasDecorators) {\n needsInstancePrivateBrandCheck = true;\n }\n if (t.isClassPrivateProperty(node) || !lastInstancePrivateName) {\n lastInstancePrivateName = key;\n }\n }\n\n if (element.isClassMethod({ kind: \"constructor\" })) {\n constructorPath = element;\n }\n\n let locals: t.Identifier[];\n if (hasDecorators) {\n let privateMethods: Array<\n t.FunctionExpression | t.ArrowFunctionExpression\n >;\n\n let nameExpr: t.Expression;\n\n if (isComputed) {\n nameExpr = getComputedKeyMemoiser(\n element.get(\"key\") as NodePath,\n );\n } else if (key.type === \"PrivateName\") {\n nameExpr = t.stringLiteral(key.id.name);\n } else if (key.type === \"Identifier\") {\n nameExpr = t.stringLiteral(key.name);\n } else {\n nameExpr = t.cloneNode(key as t.Expression);\n }\n\n if (kind === ACCESSOR) {\n const { value } = element.node as t.ClassAccessorProperty;\n\n const params: t.Expression[] =\n (process.env.BABEL_8_BREAKING || version === \"2023-11\") && isStatic\n ? []\n : [t.thisExpression()];\n\n if (value) {\n params.push(t.cloneNode(value));\n }\n\n const newId = generateClassPrivateUid();\n const newFieldInitId = generateLetUidIdentifier(\n scopeParent,\n `init_${name}`,\n );\n const newValue = t.callExpression(\n t.cloneNode(newFieldInitId),\n params,\n );\n\n const newField = generateClassProperty(newId, newValue, isStatic);\n const [newPath] = element.replaceWith(newField);\n\n if (isPrivate) {\n privateMethods = extractProxyAccessorsFor(newId, version);\n\n const getId = generateLetUidIdentifier(scopeParent, `get_${name}`);\n const setId = generateLetUidIdentifier(scopeParent, `set_${name}`);\n\n addCallAccessorsFor(version, newPath, key, getId, setId, isStatic);\n\n locals = [newFieldInitId, getId, setId];\n } else {\n assignIdForAnonymousClass(path, className);\n addProxyAccessorsFor(\n path.node.id,\n newPath,\n t.cloneNode(key),\n t.isAssignmentExpression(key)\n ? t.cloneNode(key.left as t.Identifier)\n : t.cloneNode(key),\n newId,\n isComputed,\n isStatic,\n version,\n );\n locals = [newFieldInitId];\n }\n } else if (kind === FIELD) {\n const initId = generateLetUidIdentifier(scopeParent, `init_${name}`);\n const valuePath = (\n element as NodePath\n ).get(\"value\");\n\n const args: t.Expression[] =\n (process.env.BABEL_8_BREAKING || version === \"2023-11\") && isStatic\n ? []\n : [t.thisExpression()];\n if (valuePath.node) args.push(valuePath.node);\n\n valuePath.replaceWith(t.callExpression(t.cloneNode(initId), args));\n\n locals = [initId];\n\n if (isPrivate) {\n privateMethods = extractProxyAccessorsFor(key, version);\n }\n } else if (isPrivate) {\n const callId = generateLetUidIdentifier(scopeParent, `call_${name}`);\n locals = [callId];\n\n const replaceSupers = new ReplaceSupers({\n constantSuper,\n methodPath: element as NodePath,\n objectRef: classIdLocal,\n superRef: path.node.superClass,\n file: state.file,\n refToPreserve: classIdLocal,\n });\n\n replaceSupers.replace();\n\n privateMethods = [\n createFunctionExpressionFromPrivateMethod(\n element.node as t.ClassPrivateMethod,\n ),\n ];\n\n if (kind === GETTER || kind === SETTER) {\n movePrivateAccessor(\n element as NodePath,\n t.cloneNode(key),\n t.cloneNode(callId),\n isStatic,\n );\n } else {\n const node = element.node as t.ClassPrivateMethod;\n\n // Unshift\n path.node.body.body.unshift(\n t.classPrivateProperty(key, t.cloneNode(callId), [], node.static),\n );\n\n decoratedPrivateMethods.add(key.id.name);\n\n element.remove();\n }\n }\n\n elementDecoratorInfo.push({\n kind,\n decoratorsArray,\n decoratorsHaveThis,\n name: nameExpr,\n isStatic,\n privateMethods,\n locals,\n });\n\n if (element.node) {\n element.node.decorators = null;\n }\n }\n\n if (isComputed && computedKeyAssignments.length > 0) {\n if (classDecorators && element.isClassProperty({ static: true })) {\n // If the class is decorated, we don't insert computedKeyAssignments here\n // because any non-static computed elements defined after it will be moved\n // into the non-static class, so they will be evaluated before the key of\n // this field. At this momemnt, its key must be either a constant expression\n // or a uid reference which has been assigned _within_ the non-static class.\n } else {\n prependExpressionsToComputedKey(\n computedKeyAssignments,\n (kind === ACCESSOR\n ? element.getNextSibling() // the transpiled getter of the accessor property\n : element) as NodePath,\n );\n computedKeyAssignments = [];\n }\n }\n\n if (\n fieldInitializerExpressions.length > 0 &&\n !isStatic &&\n (kind === FIELD || kind === ACCESSOR)\n ) {\n prependExpressionsToFieldInitializer(\n fieldInitializerExpressions,\n element as NodePath,\n );\n fieldInitializerExpressions = [];\n }\n\n if (\n staticFieldInitializerExpressions.length > 0 &&\n isStatic &&\n (kind === FIELD || kind === ACCESSOR)\n ) {\n prependExpressionsToFieldInitializer(\n staticFieldInitializerExpressions,\n element as NodePath,\n );\n staticFieldInitializerExpressions = [];\n }\n\n if (hasDecorators && version === \"2023-11\") {\n if (kind === FIELD || kind === ACCESSOR) {\n const initExtraId = generateLetUidIdentifier(\n scopeParent,\n `init_extra_${name}`,\n );\n locals.push(initExtraId);\n const initExtraCall = t.callExpression(\n t.cloneNode(initExtraId),\n isStatic ? [] : [t.thisExpression()],\n );\n if (!isStatic) {\n fieldInitializerExpressions.push(initExtraCall);\n } else {\n staticFieldInitializerExpressions.push(initExtraCall);\n }\n }\n }\n }\n }\n\n if (computedKeyAssignments.length > 0) {\n const elements = path.get(\"body.body\");\n let lastComputedElement: NodePath;\n for (let i = elements.length - 1; i >= 0; i--) {\n const path = elements[i];\n const node = path.node as ClassElementCanHaveComputedKeys;\n if (node.computed) {\n if (classDecorators && t.isClassProperty(node, { static: true })) {\n continue;\n }\n lastComputedElement = path as NodePath;\n break;\n }\n }\n if (lastComputedElement != null) {\n appendExpressionsToComputedKey(\n computedKeyAssignments,\n lastComputedElement,\n );\n computedKeyAssignments = [];\n } else {\n // If there is no computed key, we will try to convert the first non-computed\n // class element into a computed key and insert assignments there. This will\n // be done after we handle the class elements split when the class is decorated.\n }\n }\n\n if (fieldInitializerExpressions.length > 0) {\n const isDerivedClass = !!path.node.superClass;\n if (constructorPath) {\n if (isDerivedClass) {\n insertExpressionsAfterSuperCallAndOptimize(\n fieldInitializerExpressions,\n constructorPath,\n protoInitLocal,\n );\n } else {\n prependExpressionsToConstructor(\n fieldInitializerExpressions,\n constructorPath,\n );\n }\n } else {\n path.node.body.body.unshift(\n createConstructorFromExpressions(\n fieldInitializerExpressions,\n isDerivedClass,\n ),\n );\n }\n fieldInitializerExpressions = [];\n }\n\n if (staticFieldInitializerExpressions.length > 0) {\n path.node.body.body.push(\n createStaticBlockFromExpressions(staticFieldInitializerExpressions),\n );\n staticFieldInitializerExpressions = [];\n }\n\n const sortedElementDecoratorInfo =\n toSortedDecoratorInfo(elementDecoratorInfo);\n\n const elementDecorations = generateDecorationExprs(\n process.env.BABEL_8_BREAKING || version === \"2023-11\"\n ? elementDecoratorInfo\n : sortedElementDecoratorInfo,\n version,\n );\n\n const elementLocals: t.Identifier[] = extractElementLocalAssignments(\n sortedElementDecoratorInfo,\n );\n\n if (protoInitLocal) {\n elementLocals.push(protoInitLocal);\n }\n\n if (staticInitLocal) {\n elementLocals.push(staticInitLocal);\n }\n\n const classLocals: t.Identifier[] = [];\n let classInitInjected = false;\n const classInitCall =\n classInitLocal && t.callExpression(t.cloneNode(classInitLocal), []);\n\n let originalClassPath = path;\n const originalClass = path.node;\n\n const staticClosures: t.AssignmentExpression[] = [];\n if (classDecorators) {\n classLocals.push(classIdLocal, classInitLocal);\n const statics: (\n | t.ClassProperty\n | t.ClassPrivateProperty\n | t.ClassPrivateMethod\n )[] = [];\n path.get(\"body.body\").forEach(element => {\n // Static blocks cannot be compiled to \"instance blocks\", but we can inline\n // them as IIFEs in the next property.\n if (element.isStaticBlock()) {\n if (hasInstancePrivateAccess(element, instancePrivateNames)) {\n const staticBlockClosureId = memoiseExpression(\n staticBlockToFunctionClosure(element.node),\n \"staticBlock\",\n staticClosures,\n );\n staticFieldInitializerExpressions.push(\n t.callExpression(\n t.memberExpression(staticBlockClosureId, t.identifier(\"call\")),\n [t.thisExpression()],\n ),\n );\n } else {\n staticFieldInitializerExpressions.push(\n staticBlockToIIFE(element.node),\n );\n }\n element.remove();\n return;\n }\n\n if (\n (element.isClassProperty() || element.isClassPrivateProperty()) &&\n element.node.static\n ) {\n const valuePath = (\n element as NodePath\n ).get(\"value\");\n if (hasInstancePrivateAccess(valuePath, instancePrivateNames)) {\n const fieldValueClosureId = memoiseExpression(\n fieldInitializerToClosure(valuePath.node),\n \"fieldValue\",\n staticClosures,\n );\n valuePath.replaceWith(\n t.callExpression(\n t.memberExpression(fieldValueClosureId, t.identifier(\"call\")),\n [t.thisExpression()],\n ),\n );\n }\n if (staticFieldInitializerExpressions.length > 0) {\n prependExpressionsToFieldInitializer(\n staticFieldInitializerExpressions,\n element,\n );\n staticFieldInitializerExpressions = [];\n }\n element.node.static = false;\n statics.push(element.node);\n element.remove();\n } else if (element.isClassPrivateMethod({ static: true })) {\n // At this moment the element must not have decorators, so any private name\n // within the element must come from either params or body\n if (hasInstancePrivateAccess(element, instancePrivateNames)) {\n const replaceSupers = new ReplaceSupers({\n constantSuper,\n methodPath: element,\n objectRef: classIdLocal,\n superRef: path.node.superClass,\n file: state.file,\n refToPreserve: classIdLocal,\n });\n\n replaceSupers.replace();\n\n const privateMethodDelegateId = memoiseExpression(\n createFunctionExpressionFromPrivateMethod(element.node),\n element.get(\"key.id\").node.name,\n staticClosures,\n );\n\n if (ignoreFunctionLength) {\n element.node.params = [t.restElement(t.identifier(\"arg\"))];\n element.node.body = t.blockStatement([\n t.returnStatement(\n t.callExpression(\n t.memberExpression(\n privateMethodDelegateId,\n t.identifier(\"apply\"),\n ),\n [t.thisExpression(), t.identifier(\"arg\")],\n ),\n ),\n ]);\n } else {\n element.node.params = element.node.params.map((p, i) => {\n if (t.isRestElement(p)) {\n return t.restElement(t.identifier(\"arg\"));\n } else {\n return t.identifier(\"_\" + i);\n }\n });\n element.node.body = t.blockStatement([\n t.returnStatement(\n t.callExpression(\n t.memberExpression(\n privateMethodDelegateId,\n t.identifier(\"apply\"),\n ),\n [t.thisExpression(), t.identifier(\"arguments\")],\n ),\n ),\n ]);\n }\n }\n element.node.static = false;\n statics.push(element.node);\n element.remove();\n }\n });\n\n if (statics.length > 0 || staticFieldInitializerExpressions.length > 0) {\n const staticsClass = template.expression.ast`\n class extends ${state.addHelper(\"identity\")} {}\n ` as t.ClassExpression;\n staticsClass.body.body = [\n // Insert the original class to a computed key of the wrapper so that\n // 1) they share the same function context with the wrapper class\n // 2) the memoisation of static computed field is evaluated before they\n // are referenced in the wrapper class keys\n // Note that any static elements of the wrapper class can not be accessed\n // in the user land, so we don't have to remove the temporary class field.\n t.classProperty(\n t.toExpression(originalClass),\n undefined,\n undefined,\n undefined,\n /* computed */ true,\n /* static */ true,\n ),\n ...statics,\n ];\n\n const constructorBody: t.Expression[] = [];\n\n const newExpr = t.newExpression(staticsClass, []);\n\n if (staticFieldInitializerExpressions.length > 0) {\n constructorBody.push(...staticFieldInitializerExpressions);\n }\n if (classInitCall) {\n classInitInjected = true;\n constructorBody.push(classInitCall);\n }\n if (constructorBody.length > 0) {\n constructorBody.unshift(\n t.callExpression(t.super(), [t.cloneNode(classIdLocal)]),\n );\n\n // set isDerivedClass to false as we have already prepended super call\n staticsClass.body.body.push(\n createConstructorFromExpressions(\n constructorBody,\n /* isDerivedClass */ false,\n ),\n );\n } else {\n newExpr.arguments.push(t.cloneNode(classIdLocal));\n }\n\n const [newPath] = path.replaceWith(newExpr);\n\n // update originalClassPath according to the new AST\n originalClassPath = (\n newPath.get(\"callee\").get(\"body\") as NodePath\n ).get(\"body.0.key\");\n }\n }\n if (!classInitInjected && classInitCall) {\n path.node.body.body.push(\n t.staticBlock([t.expressionStatement(classInitCall)]),\n );\n }\n\n let { superClass } = originalClass;\n if (\n superClass &&\n (process.env.BABEL_8_BREAKING ||\n version === \"2023-11\" ||\n version === \"2023-05\")\n ) {\n const id = path.scope.maybeGenerateMemoised(superClass);\n if (id) {\n originalClass.superClass = t.assignmentExpression(\"=\", id, superClass);\n superClass = id;\n }\n }\n\n const applyDecoratorWrapper = t.staticBlock([]);\n originalClass.body.body.unshift(applyDecoratorWrapper);\n const applyDecsBody = applyDecoratorWrapper.body;\n if (computedKeyAssignments.length > 0) {\n const elements = originalClassPath.get(\"body.body\");\n let firstPublicElement: NodePath;\n for (const path of elements) {\n if (\n (path.isClassProperty() || path.isClassMethod()) &&\n (path.node as t.ClassMethod).kind !== \"constructor\"\n ) {\n firstPublicElement = path;\n break;\n }\n }\n if (firstPublicElement != null) {\n // Convert its key to a computed one to host the decorator evaluations.\n convertToComputedKey(firstPublicElement);\n prependExpressionsToComputedKey(\n computedKeyAssignments,\n firstPublicElement,\n );\n } else {\n // When there is no public class elements, we inject a temporary computed\n // field whose key will host the decorator evaluations. The field will be\n // deleted immediately after it is defiend.\n originalClass.body.body.unshift(\n t.classProperty(\n t.sequenceExpression([\n ...computedKeyAssignments,\n t.stringLiteral(\"_\"),\n ]),\n undefined,\n undefined,\n undefined,\n /* computed */ true,\n /* static */ true,\n ),\n );\n applyDecsBody.push(\n t.expressionStatement(\n t.unaryExpression(\n \"delete\",\n t.memberExpression(t.thisExpression(), t.identifier(\"_\")),\n ),\n ),\n );\n }\n computedKeyAssignments = [];\n }\n\n applyDecsBody.push(\n t.expressionStatement(\n createLocalsAssignment(\n elementLocals,\n classLocals,\n elementDecorations,\n classDecorationsId ?? t.arrayExpression(classDecorations),\n t.numericLiteral(classDecorationsFlag),\n needsInstancePrivateBrandCheck ? lastInstancePrivateName : null,\n setClassName,\n t.cloneNode(superClass),\n state,\n version,\n ),\n ),\n );\n if (staticInitLocal) {\n applyDecsBody.push(\n t.expressionStatement(\n t.callExpression(t.cloneNode(staticInitLocal), [t.thisExpression()]),\n ),\n );\n }\n if (staticClosures.length > 0) {\n applyDecsBody.push(\n ...staticClosures.map(expr => t.expressionStatement(expr)),\n );\n }\n\n // When path is a ClassExpression, path.insertBefore will convert `path`\n // into a SequenceExpression\n path.insertBefore(classAssignments.map(expr => t.expressionStatement(expr)));\n\n if (needsDeclaraionForClassBinding) {\n const classBindingInfo = scopeParent.getBinding(classIdLocal.name);\n if (!classBindingInfo.constantViolations.length) {\n // optimization: reuse the inner class binding if the outer class binding is not mutated\n path.insertBefore(\n t.variableDeclaration(\"let\", [\n t.variableDeclarator(t.cloneNode(classIdLocal)),\n ]),\n );\n } else {\n const classOuterBindingDelegateLocal = scopeParent.generateUidIdentifier(\n \"t\" + classIdLocal.name,\n );\n const classOuterBindingLocal = classIdLocal;\n path.replaceWithMultiple([\n t.variableDeclaration(\"let\", [\n t.variableDeclarator(t.cloneNode(classOuterBindingLocal)),\n t.variableDeclarator(classOuterBindingDelegateLocal),\n ]),\n t.blockStatement([\n t.variableDeclaration(\"let\", [\n t.variableDeclarator(t.cloneNode(classIdLocal)),\n ]),\n // needsDeclaraionForClassBinding is true ↔ node is a class declaration\n path.node as t.ClassDeclaration,\n t.expressionStatement(\n t.assignmentExpression(\n \"=\",\n t.cloneNode(classOuterBindingDelegateLocal),\n t.cloneNode(classIdLocal),\n ),\n ),\n ]),\n t.expressionStatement(\n t.assignmentExpression(\n \"=\",\n t.cloneNode(classOuterBindingLocal),\n t.cloneNode(classOuterBindingDelegateLocal),\n ),\n ),\n ]);\n }\n }\n\n if (decoratedPrivateMethods.size > 0) {\n checkPrivateMethodUpdateError(path, decoratedPrivateMethods);\n }\n\n // Recrawl the scope to make sure new identifiers are properly synced\n path.scope.crawl();\n\n return path;\n}\n\nfunction createLocalsAssignment(\n elementLocals: t.Identifier[],\n classLocals: t.Identifier[],\n elementDecorations: t.ArrayExpression | t.Identifier,\n classDecorations: t.ArrayExpression | t.Identifier,\n classDecorationsFlag: t.NumericLiteral,\n maybePrivateBrandName: t.PrivateName | null,\n setClassName: t.Identifier | t.StringLiteral | undefined,\n superClass: null | t.Expression,\n state: PluginPass,\n version: DecoratorVersionKind,\n) {\n let lhs, rhs;\n const args: t.Expression[] = [\n setClassName\n ? createSetFunctionNameCall(state, setClassName)\n : t.thisExpression(),\n classDecorations,\n elementDecorations,\n ];\n\n if (!process.env.BABEL_8_BREAKING) {\n if (version !== \"2023-11\") {\n args.splice(1, 2, elementDecorations, classDecorations);\n }\n if (\n version === \"2021-12\" ||\n (version === \"2022-03\" && !state.availableHelper(\"applyDecs2203R\"))\n ) {\n lhs = t.arrayPattern([...elementLocals, ...classLocals]);\n rhs = t.callExpression(\n state.addHelper(version === \"2021-12\" ? \"applyDecs\" : \"applyDecs2203\"),\n args,\n );\n return t.assignmentExpression(\"=\", lhs, rhs);\n } else if (version === \"2022-03\") {\n rhs = t.callExpression(state.addHelper(\"applyDecs2203R\"), args);\n } else if (version === \"2023-01\") {\n if (maybePrivateBrandName) {\n args.push(createPrivateBrandCheckClosure(maybePrivateBrandName));\n }\n rhs = t.callExpression(state.addHelper(\"applyDecs2301\"), args);\n } else if (version === \"2023-05\") {\n if (\n maybePrivateBrandName ||\n superClass ||\n classDecorationsFlag.value !== 0\n ) {\n args.push(classDecorationsFlag);\n }\n if (maybePrivateBrandName) {\n args.push(createPrivateBrandCheckClosure(maybePrivateBrandName));\n } else if (superClass) {\n args.push(t.unaryExpression(\"void\", t.numericLiteral(0)));\n }\n if (superClass) args.push(superClass);\n rhs = t.callExpression(state.addHelper(\"applyDecs2305\"), args);\n }\n }\n if (process.env.BABEL_8_BREAKING || version === \"2023-11\") {\n if (\n maybePrivateBrandName ||\n superClass ||\n classDecorationsFlag.value !== 0\n ) {\n args.push(classDecorationsFlag);\n }\n if (maybePrivateBrandName) {\n args.push(createPrivateBrandCheckClosure(maybePrivateBrandName));\n } else if (superClass) {\n args.push(t.unaryExpression(\"void\", t.numericLiteral(0)));\n }\n if (superClass) args.push(superClass);\n rhs = t.callExpression(state.addHelper(\"applyDecs2311\"), args);\n }\n\n // optimize `{ c: [classLocals] } = applyDecsHelper(...)` to\n // `[classLocals] = applyDecsHelper(...).c`\n if (elementLocals.length > 0) {\n if (classLocals.length > 0) {\n lhs = t.objectPattern([\n t.objectProperty(t.identifier(\"e\"), t.arrayPattern(elementLocals)),\n t.objectProperty(t.identifier(\"c\"), t.arrayPattern(classLocals)),\n ]);\n } else {\n lhs = t.arrayPattern(elementLocals);\n rhs = t.memberExpression(rhs, t.identifier(\"e\"), false, false);\n }\n } else {\n // invariant: classLocals.length > 0\n lhs = t.arrayPattern(classLocals);\n rhs = t.memberExpression(rhs, t.identifier(\"c\"), false, false);\n }\n\n return t.assignmentExpression(\"=\", lhs, rhs);\n}\n\nfunction isProtoKey(\n node: t.Identifier | t.StringLiteral | t.BigIntLiteral | t.NumericLiteral,\n) {\n return node.type === \"Identifier\"\n ? node.name === \"__proto__\"\n : node.value === \"__proto__\";\n}\n\nfunction isDecorated(node: t.Class | ClassDecoratableElement) {\n return node.decorators && node.decorators.length > 0;\n}\n\nfunction shouldTransformElement(node: ClassElement) {\n switch (node.type) {\n case \"ClassAccessorProperty\":\n return true;\n case \"ClassMethod\":\n case \"ClassProperty\":\n case \"ClassPrivateMethod\":\n case \"ClassPrivateProperty\":\n return isDecorated(node);\n default:\n return false;\n }\n}\n\nfunction shouldTransformClass(node: t.Class) {\n return isDecorated(node) || node.body.body.some(shouldTransformElement);\n}\n\n// Todo: unify name references logic with helper-function-name\nfunction NamedEvaluationVisitoryFactory(\n isAnonymous: (path: NodePath) => boolean,\n visitor: (\n path: NodePath,\n state: PluginPass,\n name:\n | string\n | t.Identifier\n | t.StringLiteral\n | t.NumericLiteral\n | t.BigIntLiteral,\n ) => void,\n) {\n function handleComputedProperty(\n propertyPath: NodePath<\n t.ObjectProperty | t.ClassProperty | t.ClassAccessorProperty\n >,\n key: t.Expression,\n state: PluginPass,\n ): t.StringLiteral | t.Identifier {\n switch (key.type) {\n case \"StringLiteral\":\n return t.stringLiteral(key.value);\n case \"NumericLiteral\":\n case \"BigIntLiteral\": {\n const keyValue = key.value + \"\";\n propertyPath.get(\"key\").replaceWith(t.stringLiteral(keyValue));\n return t.stringLiteral(keyValue);\n }\n default: {\n const ref = propertyPath.scope.maybeGenerateMemoised(key);\n propertyPath\n .get(\"key\")\n .replaceWith(\n t.assignmentExpression(\n \"=\",\n ref,\n createToPropertyKeyCall(state, key),\n ),\n );\n return t.cloneNode(ref);\n }\n }\n }\n return {\n VariableDeclarator(path, state) {\n const id = path.node.id;\n if (id.type === \"Identifier\") {\n const initializer = skipTransparentExprWrappers(path.get(\"init\"));\n if (isAnonymous(initializer)) {\n const name = id.name;\n visitor(initializer, state, name);\n }\n }\n },\n AssignmentExpression(path, state) {\n const id = path.node.left;\n if (id.type === \"Identifier\") {\n const initializer = skipTransparentExprWrappers(path.get(\"right\"));\n if (isAnonymous(initializer)) {\n switch (path.node.operator) {\n case \"=\":\n case \"&&=\":\n case \"||=\":\n case \"??=\":\n visitor(initializer, state, id.name);\n }\n }\n }\n },\n AssignmentPattern(path, state) {\n const id = path.node.left;\n if (id.type === \"Identifier\") {\n const initializer = skipTransparentExprWrappers(path.get(\"right\"));\n if (isAnonymous(initializer)) {\n const name = id.name;\n visitor(initializer, state, name);\n }\n }\n },\n // We listen on ObjectExpression so that we don't have to visit\n // the object properties under object patterns\n ObjectExpression(path, state) {\n for (const propertyPath of path.get(\"properties\")) {\n if (!propertyPath.isObjectProperty()) continue;\n const { node } = propertyPath;\n const id = node.key;\n const initializer = skipTransparentExprWrappers(\n propertyPath.get(\"value\") as NodePath,\n );\n if (isAnonymous(initializer)) {\n if (!node.computed) {\n // 13.2.5.5 RS: PropertyDefinitionEvaluation\n if (!isProtoKey(id as t.StringLiteral | t.Identifier)) {\n if (id.type === \"Identifier\") {\n visitor(initializer, state, id.name);\n } else {\n const className = t.stringLiteral(\n (id as t.StringLiteral | t.NumericLiteral | t.BigIntLiteral)\n .value + \"\",\n );\n visitor(initializer, state, className);\n }\n }\n } else {\n const ref = handleComputedProperty(\n propertyPath,\n // The key of a computed object property must not be a private name\n id as t.Expression,\n state,\n );\n visitor(initializer, state, ref);\n }\n }\n }\n },\n ClassPrivateProperty(path, state) {\n const { node } = path;\n const initializer = skipTransparentExprWrappers(path.get(\"value\"));\n if (isAnonymous(initializer)) {\n const className = t.stringLiteral(\"#\" + node.key.id.name);\n visitor(initializer, state, className);\n }\n },\n ClassAccessorProperty(path, state) {\n const { node } = path;\n const id = node.key;\n const initializer = skipTransparentExprWrappers(path.get(\"value\"));\n if (isAnonymous(initializer)) {\n if (!node.computed) {\n if (id.type === \"Identifier\") {\n visitor(initializer, state, id.name);\n } else if (id.type === \"PrivateName\") {\n const className = t.stringLiteral(\"#\" + id.id.name);\n visitor(initializer, state, className);\n } else {\n const className = t.stringLiteral(\n (id as t.StringLiteral | t.NumericLiteral | t.BigIntLiteral)\n .value + \"\",\n );\n visitor(initializer, state, className);\n }\n } else {\n const ref = handleComputedProperty(\n path,\n // The key of a computed accessor property must not be a private name\n id as t.Expression,\n state,\n );\n visitor(initializer, state, ref);\n }\n }\n },\n ClassProperty(path, state) {\n const { node } = path;\n const id = node.key;\n const initializer = skipTransparentExprWrappers(path.get(\"value\"));\n if (isAnonymous(initializer)) {\n if (!node.computed) {\n if (id.type === \"Identifier\") {\n visitor(initializer, state, id.name);\n } else {\n const className = t.stringLiteral(\n (id as t.StringLiteral | t.NumericLiteral | t.BigIntLiteral)\n .value + \"\",\n );\n visitor(initializer, state, className);\n }\n } else {\n const ref = handleComputedProperty(path, id, state);\n visitor(initializer, state, ref);\n }\n }\n },\n } satisfies Visitor;\n}\n\nfunction isDecoratedAnonymousClassExpression(path: NodePath) {\n return (\n path.isClassExpression({ id: null }) && shouldTransformClass(path.node)\n );\n}\n\nfunction generateLetUidIdentifier(scope: Scope, name: string) {\n const id = scope.generateUidIdentifier(name);\n scope.push({ id, kind: \"let\" });\n return t.cloneNode(id);\n}\n\nexport default function (\n { assertVersion, assumption }: PluginAPI,\n { loose }: Options,\n version: DecoratorVersionKind,\n inherits: PluginObject[\"inherits\"],\n): PluginObject {\n if (process.env.BABEL_8_BREAKING) {\n assertVersion(REQUIRED_VERSION(\"^7.21.0\"));\n } else {\n if (\n version === \"2023-11\" ||\n version === \"2023-05\" ||\n version === \"2023-01\"\n ) {\n assertVersion(REQUIRED_VERSION(\"^7.21.0\"));\n } else if (version === \"2021-12\") {\n assertVersion(REQUIRED_VERSION(\"^7.16.0\"));\n } else {\n assertVersion(REQUIRED_VERSION(\"^7.19.0\"));\n }\n }\n\n const VISITED = new WeakSet();\n const constantSuper = assumption(\"constantSuper\") ?? loose;\n const ignoreFunctionLength = assumption(\"ignoreFunctionLength\") ?? loose;\n\n const namedEvaluationVisitor: Visitor =\n NamedEvaluationVisitoryFactory(\n isDecoratedAnonymousClassExpression,\n visitClass,\n );\n\n function visitClass(\n path: NodePath,\n state: PluginPass,\n className: string | t.Identifier | t.StringLiteral | undefined,\n ) {\n if (VISITED.has(path)) return;\n const { node } = path;\n className ??= node.id?.name;\n const newPath = transformClass(\n path,\n state,\n constantSuper,\n ignoreFunctionLength,\n className,\n namedEvaluationVisitor,\n version,\n );\n if (newPath) {\n VISITED.add(newPath);\n return;\n }\n VISITED.add(path);\n }\n\n return {\n name: \"proposal-decorators\",\n inherits: inherits,\n\n visitor: {\n ExportDefaultDeclaration(path, state) {\n const { declaration } = path.node;\n if (\n declaration?.type === \"ClassDeclaration\" &&\n // When compiling class decorators we need to replace the class\n // binding, so we must split it in two separate declarations.\n isDecorated(declaration)\n ) {\n const isAnonymous = !declaration.id;\n if (!process.env.BABEL_8_BREAKING && !USE_ESM && !IS_STANDALONE) {\n // polyfill when being run by an older Babel version\n path.splitExportDeclaration ??=\n // eslint-disable-next-line no-restricted-globals\n require(\"@babel/traverse\").NodePath.prototype.splitExportDeclaration;\n }\n const updatedVarDeclarationPath =\n path.splitExportDeclaration() as NodePath;\n if (isAnonymous) {\n visitClass(\n updatedVarDeclarationPath,\n state,\n t.stringLiteral(\"default\"),\n );\n }\n }\n },\n ExportNamedDeclaration(path) {\n const { declaration } = path.node;\n if (\n declaration?.type === \"ClassDeclaration\" &&\n // When compiling class decorators we need to replace the class\n // binding, so we must split it in two separate declarations.\n isDecorated(declaration)\n ) {\n if (!process.env.BABEL_8_BREAKING && !USE_ESM && !IS_STANDALONE) {\n // polyfill when being run by an older Babel version\n path.splitExportDeclaration ??=\n // eslint-disable-next-line no-restricted-globals\n require(\"@babel/traverse\").NodePath.prototype.splitExportDeclaration;\n }\n path.splitExportDeclaration();\n }\n },\n\n Class(path, state) {\n visitClass(path, state, undefined);\n },\n\n ...namedEvaluationVisitor,\n },\n };\n}\n","// env vars from the cli are always strings, so !!ENV_VAR returns true for \"false\"\nfunction bool(value) {\n if (value == null) return false;\n return value && value !== \"false\" && value !== \"0\";\n}\n\nmodule.exports = bool(process.env[\"BABEL_8_BREAKING\"])\n ? require(\"semver-BABEL_8_BREAKING-true\")\n : require(\"semver-BABEL_8_BREAKING-false\");\n","// TODO(Babel 8): Remove this file\n\nimport { types as t, template } from \"@babel/core\";\nimport type { File, NodePath } from \"@babel/core\";\nimport ReplaceSupers from \"@babel/helper-replace-supers\";\n\ntype Decoratable = Extract;\n\nexport function hasOwnDecorators(node: t.Class | t.ClassBody[\"body\"][number]) {\n // @ts-expect-error: 'decorators' not in TSIndexSignature\n return !!node.decorators?.length;\n}\n\nexport function hasDecorators(node: t.Class) {\n return hasOwnDecorators(node) || node.body.body.some(hasOwnDecorators);\n}\n\nfunction prop(key: string, value?: t.Expression) {\n if (!value) return null;\n return t.objectProperty(t.identifier(key), value);\n}\n\nfunction method(key: string, body: t.Statement[]) {\n return t.objectMethod(\n \"method\",\n t.identifier(key),\n [],\n t.blockStatement(body),\n );\n}\n\nfunction takeDecorators(node: Decoratable) {\n let result: t.ArrayExpression | undefined;\n if (node.decorators && node.decorators.length > 0) {\n result = t.arrayExpression(\n node.decorators.map(decorator => decorator.expression),\n );\n }\n node.decorators = undefined;\n return result;\n}\n\ntype AcceptedElement = Exclude;\ntype SupportedElement = Exclude<\n AcceptedElement,\n | t.ClassPrivateMethod\n | t.ClassPrivateProperty\n | t.ClassAccessorProperty\n | t.StaticBlock\n>;\n\nfunction getKey(node: SupportedElement) {\n if (node.computed) {\n return node.key;\n } else if (t.isIdentifier(node.key)) {\n return t.stringLiteral(node.key.name);\n } else {\n return t.stringLiteral(\n String(\n // A non-identifier non-computed key\n (node.key as t.StringLiteral | t.NumericLiteral | t.BigIntLiteral)\n .value,\n ),\n );\n }\n}\n\nfunction extractElementDescriptor(\n file: File,\n classRef: t.Identifier,\n superRef: t.Identifier,\n path: NodePath,\n) {\n const isMethod = path.isClassMethod();\n if (path.isPrivate()) {\n throw path.buildCodeFrameError(\n `Private ${\n isMethod ? \"methods\" : \"fields\"\n } in decorated classes are not supported yet.`,\n );\n }\n if (path.node.type === \"ClassAccessorProperty\") {\n throw path.buildCodeFrameError(\n `Accessor properties are not supported in 2018-09 decorator transform, please specify { \"version\": \"2021-12\" } instead.`,\n );\n }\n if (path.node.type === \"StaticBlock\") {\n throw path.buildCodeFrameError(\n `Static blocks are not supported in 2018-09 decorator transform, please specify { \"version\": \"2021-12\" } instead.`,\n );\n }\n\n if (path.isFunction()) {\n if (!process.env.BABEL_8_BREAKING && !USE_ESM && !IS_STANDALONE) {\n // polyfill when being run by an older Babel version\n path.ensureFunctionName ??=\n // eslint-disable-next-line no-restricted-globals\n require(\"@babel/traverse\").NodePath.prototype.ensureFunctionName;\n }\n // @ts-expect-error path is a ClassMethod, that technically\n // is not supported as it does not have an .id property\n // This plugin will however then transform the ClassMethod\n // to a function expression, so it's fine.\n path.ensureFunctionName(false);\n }\n\n const { node, scope } = path as NodePath;\n\n if (!path.isTSDeclareMethod()) {\n new ReplaceSupers({\n methodPath: path as NodePath<\n Exclude\n >,\n objectRef: classRef,\n superRef,\n file,\n refToPreserve: classRef,\n }).replace();\n }\n\n const properties: t.ObjectExpression[\"properties\"] = [\n prop(\"kind\", t.stringLiteral(t.isClassMethod(node) ? node.kind : \"field\")),\n prop(\"decorators\", takeDecorators(node as Decoratable)),\n prop(\"static\", node.static && t.booleanLiteral(true)),\n prop(\"key\", getKey(node)),\n ].filter(Boolean);\n\n if (t.isClassMethod(node)) {\n properties.push(prop(\"value\", t.toExpression(node)));\n } else if (t.isClassProperty(node) && node.value) {\n properties.push(\n method(\"value\", template.statements.ast`return ${node.value}`),\n );\n } else {\n properties.push(prop(\"value\", scope.buildUndefinedNode()));\n }\n\n path.remove();\n\n return t.objectExpression(properties);\n}\n\nfunction addDecorateHelper(file: File) {\n return file.addHelper(\"decorate\");\n}\n\ntype ClassElement = t.Class[\"body\"][\"body\"][number];\ntype ClassElementPath = NodePath;\n\nexport function buildDecoratedClass(\n ref: t.Identifier,\n path: NodePath,\n elements: ClassElementPath[],\n file: File,\n) {\n const { node, scope } = path;\n const initializeId = scope.generateUidIdentifier(\"initialize\");\n const isDeclaration = node.id && path.isDeclaration();\n const isStrict = path.isInStrictMode();\n const { superClass } = node;\n\n node.type = \"ClassDeclaration\";\n if (!node.id) node.id = t.cloneNode(ref);\n\n let superId: t.Identifier;\n if (superClass) {\n superId = scope.generateUidIdentifierBasedOnNode(node.superClass, \"super\");\n node.superClass = superId;\n }\n\n const classDecorators = takeDecorators(node);\n const definitions = t.arrayExpression(\n elements\n .filter(\n element =>\n // @ts-expect-error Ignore TypeScript's abstract methods (see #10514)\n !element.node.abstract && element.node.type !== \"TSIndexSignature\",\n )\n .map(path =>\n extractElementDescriptor(\n file,\n node.id,\n superId,\n // @ts-expect-error TS can not exclude TSIndexSignature\n path,\n ),\n ),\n );\n\n const wrapperCall = template.expression.ast`\n ${addDecorateHelper(file)}(\n ${classDecorators || t.nullLiteral()},\n function (${initializeId}, ${superClass ? t.cloneNode(superId) : null}) {\n ${node}\n return { F: ${t.cloneNode(node.id)}, d: ${definitions} };\n },\n ${superClass}\n )\n ` as t.CallExpression & { arguments: [unknown, t.FunctionExpression] };\n\n if (!isStrict) {\n wrapperCall.arguments[1].body.directives.push(\n t.directive(t.directiveLiteral(\"use strict\")),\n );\n }\n\n let replacement: t.Node = wrapperCall;\n let classPathDesc = \"arguments.1.body.body.0\";\n if (isDeclaration) {\n replacement = template.statement.ast`let ${ref} = ${wrapperCall}`;\n classPathDesc = \"declarations.0.init.\" + classPathDesc;\n }\n\n return {\n instanceNodes: [\n template.statement.ast`\n ${t.cloneNode(initializeId)}(this)\n ` as t.ExpressionStatement,\n ],\n wrapClass(path: NodePath) {\n path.replaceWith(replacement);\n return path.get(classPathDesc) as NodePath;\n },\n };\n}\n","import type { File, types as t } from \"@babel/core\";\nimport type { NodePath } from \"@babel/core\";\nimport { hasOwnDecorators } from \"./decorators-2018-09.ts\";\n\nexport const FEATURES = Object.freeze({\n //classes: 1 << 0,\n fields: 1 << 1,\n privateMethods: 1 << 2,\n decorators: 1 << 3,\n privateIn: 1 << 4,\n staticBlocks: 1 << 5,\n});\n\nconst featuresSameLoose = new Map([\n [FEATURES.fields, \"@babel/plugin-transform-class-properties\"],\n [FEATURES.privateMethods, \"@babel/plugin-transform-private-methods\"],\n [FEATURES.privateIn, \"@babel/plugin-transform-private-property-in-object\"],\n]);\n\n// We can't use a symbol because this needs to always be the same, even if\n// this package isn't deduped by npm. e.g.\n// - node_modules/\n// - @babel/plugin-class-features\n// - @babel/plugin-proposal-decorators\n// - node_modules\n// - @babel-plugin-class-features\nconst featuresKey = \"@babel/plugin-class-features/featuresKey\";\nconst looseKey = \"@babel/plugin-class-features/looseKey\";\n\nif (!process.env.BABEL_8_BREAKING) {\n // See https://github.com/babel/babel/issues/11622.\n // Since preset-env sets loose for the fields and private methods plugins, it can\n // cause conflicts with the loose mode set by an explicit plugin in the config.\n // To solve this problem, we ignore preset-env's loose mode if another plugin\n // explicitly sets it\n // The code to handle this logic doesn't check that \"low priority loose\" is always\n // the same. However, it is only set by the preset and not directly by users:\n // unless someone _wants_ to break it, it shouldn't be a problem.\n // eslint-disable-next-line no-var\n var looseLowPriorityKey =\n \"@babel/plugin-class-features/looseLowPriorityKey/#__internal__@babel/preset-env__please-overwrite-loose-instead-of-throwing\";\n}\n\nif (!process.env.BABEL_8_BREAKING) {\n // eslint-disable-next-line no-var\n var canIgnoreLoose = function (file: File, feature: number) {\n return !!(file.get(looseLowPriorityKey) & feature);\n };\n}\n\nexport function enableFeature(file: File, feature: number, loose: boolean) {\n // We can't blindly enable the feature because, if it was already set,\n // \"loose\" can't be changed, so that\n // @babel/plugin-class-properties { loose: true }\n // @babel/plugin-class-properties { loose: false }\n // is transformed in loose mode.\n // We only enabled the feature if it was previously disabled.\n if (process.env.BABEL_8_BREAKING) {\n if (!hasFeature(file, feature)) {\n file.set(featuresKey, file.get(featuresKey) | feature);\n setLoose(file, feature, loose);\n }\n } else if (!hasFeature(file, feature) || canIgnoreLoose(file, feature)) {\n file.set(featuresKey, file.get(featuresKey) | feature);\n if (\n // @ts-expect-error comparing loose with internal private magic string\n loose ===\n \"#__internal__@babel/preset-env__prefer-true-but-false-is-ok-if-it-prevents-an-error\"\n ) {\n setLoose(file, feature, true);\n file.set(looseLowPriorityKey, file.get(looseLowPriorityKey) | feature);\n } else if (\n // @ts-expect-error comparing loose with internal private magic string\n loose ===\n \"#__internal__@babel/preset-env__prefer-false-but-true-is-ok-if-it-prevents-an-error\"\n ) {\n setLoose(file, feature, false);\n file.set(looseLowPriorityKey, file.get(looseLowPriorityKey) | feature);\n } else {\n setLoose(file, feature, loose);\n }\n }\n\n let resolvedLoose: boolean | undefined;\n for (const [mask, name] of featuresSameLoose) {\n if (!hasFeature(file, mask)) continue;\n if (!process.env.BABEL_8_BREAKING) {\n if (canIgnoreLoose(file, mask)) continue;\n }\n\n const loose = isLoose(file, mask);\n\n if (resolvedLoose === !loose) {\n throw new Error(\n \"'loose' mode configuration must be the same for @babel/plugin-transform-class-properties, \" +\n \"@babel/plugin-transform-private-methods and \" +\n \"@babel/plugin-transform-private-property-in-object (when they are enabled).\" +\n \"\\n\\n\" +\n getBabelShowConfigForHint(file),\n );\n } else {\n resolvedLoose = loose;\n\n if (!process.env.BABEL_8_BREAKING) {\n // eslint-disable-next-line no-var\n var higherPriorityPluginName = name;\n }\n }\n }\n\n if (!process.env.BABEL_8_BREAKING && resolvedLoose !== undefined) {\n for (const [mask, name] of featuresSameLoose) {\n if (hasFeature(file, mask) && isLoose(file, mask) !== resolvedLoose) {\n setLoose(file, mask, resolvedLoose);\n console.warn(\n `Though the \"loose\" option was set to \"${!resolvedLoose}\" in your @babel/preset-env ` +\n `config, it will not be used for ${name} since the \"loose\" mode option was set to ` +\n `\"${resolvedLoose}\" for ${higherPriorityPluginName}.\\nThe \"loose\" option must be the ` +\n `same for @babel/plugin-transform-class-properties, @babel/plugin-transform-private-methods ` +\n `and @babel/plugin-transform-private-property-in-object (when they are enabled): you can ` +\n `silence this warning by explicitly adding\\n` +\n `\\t[\"${name}\", { \"loose\": ${resolvedLoose} }]\\n` +\n `to the \"plugins\" section of your Babel config.` +\n \"\\n\\n\" +\n getBabelShowConfigForHint(file),\n );\n }\n }\n }\n}\n\nfunction getBabelShowConfigForHint(file: File) {\n let { filename } = file.opts;\n if (!filename || filename === \"unknown\") {\n filename = \"[name of the input file]\";\n }\n return `\\\nIf you already set the same 'loose' mode for these plugins in your config, it's possible that they \\\nare enabled multiple times with different options.\nYou can re-run Babel with the BABEL_SHOW_CONFIG_FOR environment variable to show the loaded \\\nconfiguration:\n\\tnpx cross-env BABEL_SHOW_CONFIG_FOR=${filename} \nSee https://babeljs.io/docs/configuration#print-effective-configs for more info.`;\n}\n\nfunction hasFeature(file: File, feature: number) {\n return !!(file.get(featuresKey) & feature);\n}\n\nexport function isLoose(file: File, feature: number) {\n return !!(file.get(looseKey) & feature);\n}\n\nfunction setLoose(file: File, feature: number, loose: boolean) {\n if (loose) file.set(looseKey, file.get(looseKey) | feature);\n else file.set(looseKey, file.get(looseKey) & ~feature);\n\n if (!process.env.BABEL_8_BREAKING) {\n file.set(looseLowPriorityKey, file.get(looseLowPriorityKey) & ~feature);\n }\n}\n\nexport function shouldTransform(path: NodePath, file: File): boolean {\n let decoratorPath: NodePath | null = null;\n let publicFieldPath: NodePath | null = null;\n let privateFieldPath: NodePath | null = null;\n let privateMethodPath: NodePath | null = null;\n let staticBlockPath: NodePath | null = null;\n\n if (hasOwnDecorators(path.node)) {\n decoratorPath = path.get(\"decorators.0\");\n }\n for (const el of path.get(\"body.body\")) {\n if (!decoratorPath && hasOwnDecorators(el.node)) {\n decoratorPath = el.get(\"decorators.0\");\n }\n if (!publicFieldPath && el.isClassProperty()) {\n publicFieldPath = el;\n }\n if (!privateFieldPath && el.isClassPrivateProperty()) {\n privateFieldPath = el;\n }\n // NOTE: path.isClassPrivateMethod() it isn't supported in <7.2.0\n if (!privateMethodPath && el.isClassPrivateMethod?.()) {\n privateMethodPath = el;\n }\n if (!staticBlockPath && el.isStaticBlock?.()) {\n staticBlockPath = el;\n }\n }\n\n if (decoratorPath && privateFieldPath) {\n throw privateFieldPath.buildCodeFrameError(\n \"Private fields in decorated classes are not supported yet.\",\n );\n }\n if (decoratorPath && privateMethodPath) {\n throw privateMethodPath.buildCodeFrameError(\n \"Private methods in decorated classes are not supported yet.\",\n );\n }\n\n if (decoratorPath && !hasFeature(file, FEATURES.decorators)) {\n throw path.buildCodeFrameError(\n \"Decorators are not enabled.\" +\n \"\\nIf you are using \" +\n '[\"@babel/plugin-proposal-decorators\", { \"version\": \"legacy\" }], ' +\n 'make sure it comes *before* \"@babel/plugin-transform-class-properties\" ' +\n \"and enable loose mode, like so:\\n\" +\n '\\t[\"@babel/plugin-proposal-decorators\", { \"version\": \"legacy\" }]\\n' +\n '\\t[\"@babel/plugin-transform-class-properties\", { \"loose\": true }]',\n );\n }\n\n if (privateMethodPath && !hasFeature(file, FEATURES.privateMethods)) {\n throw privateMethodPath.buildCodeFrameError(\n \"Class private methods are not enabled. \" +\n \"Please add `@babel/plugin-transform-private-methods` to your configuration.\",\n );\n }\n\n if (\n (publicFieldPath || privateFieldPath) &&\n !hasFeature(file, FEATURES.fields) &&\n // We want to allow enabling the private-methods plugin even without enabling\n // the class-properties plugin. Class fields will still be compiled in classes\n // that contain private methods.\n // This is already allowed with the other various class features plugins, but\n // it's because they can fallback to a transform separated from this helper.\n !hasFeature(file, FEATURES.privateMethods)\n ) {\n throw path.buildCodeFrameError(\n \"Class fields are not enabled. \" +\n \"Please add `@babel/plugin-transform-class-properties` to your configuration.\",\n );\n }\n\n if (staticBlockPath && !hasFeature(file, FEATURES.staticBlocks)) {\n throw path.buildCodeFrameError(\n \"Static class blocks are not enabled. \" +\n \"Please add `@babel/plugin-transform-class-static-block` to your configuration.\",\n );\n }\n\n if (decoratorPath || privateMethodPath || staticBlockPath) {\n // If one of those feature is used we know that its transform is\n // enabled, otherwise the previous checks throw.\n return true;\n }\n if (\n (publicFieldPath || privateFieldPath) &&\n hasFeature(file, FEATURES.fields)\n ) {\n return true;\n }\n\n return false;\n}\n","import { types as t } from \"@babel/core\";\nimport type { PluginAPI, PluginObject, NodePath } from \"@babel/core\";\nimport createDecoratorTransform from \"./decorators.ts\";\nimport type { DecoratorVersionKind } from \"./decorators.ts\";\n\nimport semver from \"semver\";\n\nimport {\n buildPrivateNamesNodes,\n buildPrivateNamesMap,\n transformPrivateNamesUsage,\n buildFieldsInitNodes,\n buildCheckInRHS,\n} from \"./fields.ts\";\nimport type { PropPath } from \"./fields.ts\";\nimport { buildDecoratedClass, hasDecorators } from \"./decorators-2018-09.ts\";\nimport { injectInitialization, extractComputedKeys } from \"./misc.ts\";\nimport {\n enableFeature,\n FEATURES,\n isLoose,\n shouldTransform,\n} from \"./features.ts\";\nimport { assertFieldTransformed } from \"./typescript.ts\";\n\nexport { FEATURES, enableFeature, injectInitialization, buildCheckInRHS };\n\nconst versionKey = \"@babel/plugin-class-features/version\";\n\ninterface Options {\n name: string;\n feature: number;\n loose?: boolean;\n inherits?: PluginObject[\"inherits\"];\n manipulateOptions?: PluginObject[\"manipulateOptions\"];\n api?: PluginAPI;\n decoratorVersion?: DecoratorVersionKind | \"2018-09\";\n}\n\nexport function createClassFeaturePlugin({\n name,\n feature,\n loose,\n manipulateOptions,\n api,\n inherits,\n decoratorVersion,\n}: Options): PluginObject {\n if (feature & FEATURES.decorators) {\n if (process.env.BABEL_8_BREAKING) {\n return createDecoratorTransform(api, { loose }, \"2023-11\", inherits);\n } else {\n if (\n decoratorVersion === \"2023-11\" ||\n decoratorVersion === \"2023-05\" ||\n decoratorVersion === \"2023-01\" ||\n decoratorVersion === \"2022-03\" ||\n decoratorVersion === \"2021-12\"\n ) {\n return createDecoratorTransform(\n api,\n { loose },\n decoratorVersion,\n inherits,\n );\n }\n }\n }\n if (!process.env.BABEL_8_BREAKING) {\n api ??= { assumption: () => void 0 as any } as any;\n }\n const setPublicClassFields = api.assumption(\"setPublicClassFields\");\n const privateFieldsAsSymbols = api.assumption(\"privateFieldsAsSymbols\");\n const privateFieldsAsProperties = api.assumption(\"privateFieldsAsProperties\");\n const noUninitializedPrivateFieldAccess =\n api.assumption(\"noUninitializedPrivateFieldAccess\") ?? false;\n const constantSuper = api.assumption(\"constantSuper\");\n const noDocumentAll = api.assumption(\"noDocumentAll\");\n\n if (privateFieldsAsProperties && privateFieldsAsSymbols) {\n throw new Error(\n `Cannot enable both the \"privateFieldsAsProperties\" and ` +\n `\"privateFieldsAsSymbols\" assumptions as the same time.`,\n );\n }\n const privateFieldsAsSymbolsOrProperties =\n privateFieldsAsProperties || privateFieldsAsSymbols;\n\n if (loose === true) {\n type AssumptionName = Parameters[0];\n const explicit: `\"${AssumptionName}\"`[] = [];\n\n if (setPublicClassFields !== undefined) {\n explicit.push(`\"setPublicClassFields\"`);\n }\n if (privateFieldsAsProperties !== undefined) {\n explicit.push(`\"privateFieldsAsProperties\"`);\n }\n if (privateFieldsAsSymbols !== undefined) {\n explicit.push(`\"privateFieldsAsSymbols\"`);\n }\n if (explicit.length !== 0) {\n console.warn(\n `[${name}]: You are using the \"loose: true\" option and you are` +\n ` explicitly setting a value for the ${explicit.join(\" and \")}` +\n ` assumption${explicit.length > 1 ? \"s\" : \"\"}. The \"loose\" option` +\n ` can cause incompatibilities with the other class features` +\n ` plugins, so it's recommended that you replace it with the` +\n ` following top-level option:\\n` +\n `\\t\"assumptions\": {\\n` +\n `\\t\\t\"setPublicClassFields\": true,\\n` +\n `\\t\\t\"privateFieldsAsSymbols\": true\\n` +\n `\\t}`,\n );\n }\n }\n\n return {\n name,\n manipulateOptions,\n inherits,\n\n pre(file) {\n enableFeature(file, feature, loose);\n\n if (!process.env.BABEL_8_BREAKING) {\n // Until 7.21.4, we used to encode the version as a number.\n // If file.get(versionKey) is a number, it has thus been\n // set by an older version of this plugin.\n if (typeof file.get(versionKey) === \"number\") {\n file.set(versionKey, PACKAGE_JSON.version);\n return;\n }\n }\n if (\n !file.get(versionKey) ||\n semver.lt(file.get(versionKey), PACKAGE_JSON.version)\n ) {\n file.set(versionKey, PACKAGE_JSON.version);\n }\n },\n\n visitor: {\n Class(path, { file }) {\n if (file.get(versionKey) !== PACKAGE_JSON.version) return;\n\n if (!shouldTransform(path, file)) return;\n\n const pathIsClassDeclaration = path.isClassDeclaration();\n\n if (pathIsClassDeclaration) assertFieldTransformed(path);\n\n const loose = isLoose(file, feature);\n\n let constructor: NodePath;\n const isDecorated = hasDecorators(path.node);\n const props: PropPath[] = [];\n const elements = [];\n const computedPaths: NodePath[] = [];\n const privateNames = new Set();\n const body = path.get(\"body\");\n\n for (const path of body.get(\"body\")) {\n if (\n // check path.node.computed is enough, but ts will complain\n (path.isClassProperty() || path.isClassMethod()) &&\n path.node.computed\n ) {\n computedPaths.push(path);\n }\n\n if (path.isPrivate()) {\n const { name } = path.node.key.id;\n const getName = `get ${name}`;\n const setName = `set ${name}`;\n\n if (path.isClassPrivateMethod()) {\n if (path.node.kind === \"get\") {\n if (\n privateNames.has(getName) ||\n (privateNames.has(name) && !privateNames.has(setName))\n ) {\n throw path.buildCodeFrameError(\"Duplicate private field\");\n }\n privateNames.add(getName).add(name);\n } else if (path.node.kind === \"set\") {\n if (\n privateNames.has(setName) ||\n (privateNames.has(name) && !privateNames.has(getName))\n ) {\n throw path.buildCodeFrameError(\"Duplicate private field\");\n }\n privateNames.add(setName).add(name);\n }\n } else {\n if (\n (privateNames.has(name) &&\n !privateNames.has(getName) &&\n !privateNames.has(setName)) ||\n (privateNames.has(name) &&\n (privateNames.has(getName) || privateNames.has(setName)))\n ) {\n throw path.buildCodeFrameError(\"Duplicate private field\");\n }\n\n privateNames.add(name);\n }\n }\n\n if (path.isClassMethod({ kind: \"constructor\" })) {\n constructor = path;\n } else {\n elements.push(path);\n if (\n path.isProperty() ||\n path.isPrivate() ||\n path.isStaticBlock?.()\n ) {\n props.push(path as PropPath);\n }\n }\n }\n\n if (process.env.BABEL_8_BREAKING) {\n if (!props.length) return;\n } else {\n if (!props.length && !isDecorated) return;\n }\n\n const innerBinding = path.node.id;\n let ref: t.Identifier | null;\n if (!innerBinding || !pathIsClassDeclaration) {\n if (!process.env.BABEL_8_BREAKING && !USE_ESM && !IS_STANDALONE) {\n // polyfill when being run by an older Babel version\n path.ensureFunctionName ??=\n // eslint-disable-next-line no-restricted-globals\n require(\"@babel/traverse\").NodePath.prototype.ensureFunctionName;\n }\n (path as NodePath).ensureFunctionName(false);\n ref = path.scope.generateUidIdentifier(innerBinding?.name || \"Class\");\n }\n const classRefForDefine = ref ?? t.cloneNode(innerBinding);\n\n const privateNamesMap = buildPrivateNamesMap(\n classRefForDefine.name,\n privateFieldsAsSymbolsOrProperties ?? loose,\n props,\n file,\n );\n const privateNamesNodes = buildPrivateNamesNodes(\n privateNamesMap,\n privateFieldsAsProperties ?? loose,\n privateFieldsAsSymbols ?? false,\n file,\n );\n\n transformPrivateNamesUsage(\n classRefForDefine,\n path,\n privateNamesMap,\n {\n privateFieldsAsProperties:\n privateFieldsAsSymbolsOrProperties ?? loose,\n noUninitializedPrivateFieldAccess,\n noDocumentAll,\n innerBinding,\n },\n file,\n );\n\n let keysNodes: t.Statement[],\n staticNodes: t.Statement[],\n instanceNodes: t.ExpressionStatement[],\n lastInstanceNodeReturnsThis: boolean,\n pureStaticNodes: t.FunctionDeclaration[],\n classBindingNode: t.Statement | null,\n wrapClass: (path: NodePath) => NodePath;\n\n if (!process.env.BABEL_8_BREAKING) {\n if (isDecorated) {\n staticNodes = pureStaticNodes = keysNodes = [];\n ({ instanceNodes, wrapClass } = buildDecoratedClass(\n classRefForDefine,\n path,\n elements,\n file,\n ));\n } else {\n keysNodes = extractComputedKeys(path, computedPaths, file);\n ({\n staticNodes,\n pureStaticNodes,\n instanceNodes,\n lastInstanceNodeReturnsThis,\n classBindingNode,\n wrapClass,\n } = buildFieldsInitNodes(\n ref,\n path.node.superClass,\n props,\n privateNamesMap,\n file,\n setPublicClassFields ?? loose,\n privateFieldsAsSymbolsOrProperties ?? loose,\n noUninitializedPrivateFieldAccess,\n constantSuper ?? loose,\n innerBinding,\n ));\n }\n } else {\n keysNodes = extractComputedKeys(path, computedPaths, file);\n ({\n staticNodes,\n pureStaticNodes,\n instanceNodes,\n lastInstanceNodeReturnsThis,\n classBindingNode,\n wrapClass,\n } = buildFieldsInitNodes(\n ref,\n path.node.superClass,\n props,\n privateNamesMap,\n file,\n setPublicClassFields ?? loose,\n privateFieldsAsSymbolsOrProperties ?? loose,\n noUninitializedPrivateFieldAccess,\n constantSuper ?? loose,\n innerBinding,\n ));\n }\n\n if (instanceNodes.length > 0) {\n injectInitialization(\n path,\n constructor,\n instanceNodes,\n (referenceVisitor, state) => {\n if (!process.env.BABEL_8_BREAKING) {\n if (isDecorated) return;\n }\n for (const prop of props) {\n // @ts-expect-error: TS doesn't infer that prop.node is not a StaticBlock\n if (t.isStaticBlock?.(prop.node) || prop.node.static) continue;\n prop.traverse(referenceVisitor, state);\n }\n },\n lastInstanceNodeReturnsThis,\n );\n }\n\n // rename to make ts happy\n const wrappedPath = wrapClass(path);\n wrappedPath.insertBefore([...privateNamesNodes, ...keysNodes]);\n if (staticNodes.length > 0) {\n wrappedPath.insertAfter(staticNodes);\n }\n if (pureStaticNodes.length > 0) {\n wrappedPath\n .find(parent => parent.isStatement() || parent.isDeclaration())\n .insertAfter(pureStaticNodes);\n }\n if (classBindingNode != null && pathIsClassDeclaration) {\n wrappedPath.insertAfter(classBindingNode);\n }\n },\n\n ExportDefaultDeclaration(path, { file }) {\n if (!process.env.BABEL_8_BREAKING) {\n if (file.get(versionKey) !== PACKAGE_JSON.version) return;\n\n const decl = path.get(\"declaration\");\n\n if (decl.isClassDeclaration() && hasDecorators(decl.node)) {\n if (decl.node.id) {\n // export default class Foo {}\n // -->\n // class Foo {} export { Foo as default }\n if (!process.env.BABEL_8_BREAKING && !USE_ESM && !IS_STANDALONE) {\n // polyfill when being run by an older Babel version\n path.splitExportDeclaration ??=\n // eslint-disable-next-line no-restricted-globals\n require(\"@babel/traverse\").NodePath.prototype.splitExportDeclaration;\n }\n path.splitExportDeclaration();\n } else {\n // @ts-expect-error Anonymous class declarations can be\n // transformed as if they were expressions\n decl.node.type = \"ClassExpression\";\n }\n }\n }\n },\n },\n };\n}\n","/* eslint-disable @babel/development/plugin-name */\n\nimport { declare } from \"@babel/helper-plugin-utils\";\nimport {\n createClassFeaturePlugin,\n FEATURES,\n} from \"@babel/helper-create-class-features-plugin\";\n\nexport interface Options {\n loose?: boolean;\n}\n\nexport default declare((api, options: Options) => {\n api.assertVersion(REQUIRED_VERSION(7));\n\n return createClassFeaturePlugin({\n name: \"transform-class-properties\",\n\n api,\n feature: FEATURES.fields,\n loose: options.loose,\n\n manipulateOptions(opts, parserOpts) {\n parserOpts.plugins.push(\"classProperties\", \"classPrivateProperties\");\n },\n });\n});\n","import { declare } from \"@babel/helper-plugin-utils\";\nimport type { Scope } from \"@babel/core\";\n\nimport {\n enableFeature,\n FEATURES,\n} from \"@babel/helper-create-class-features-plugin\";\n\n/**\n * Generate a uid that is not in `denyList`\n *\n * @param {Scope} scope\n * @param {Set} denyList a deny list that the generated uid should avoid\n * @returns\n */\nfunction generateUid(scope: Scope, denyList: Set) {\n const name = \"\";\n let uid;\n let i = 1;\n do {\n uid = scope._generateUid(name, i);\n i++;\n } while (denyList.has(uid));\n return uid;\n}\n\nexport default declare(({ types: t, template, assertVersion, version }) => {\n assertVersion(REQUIRED_VERSION(\"^7.12.0\"));\n\n return {\n name: \"transform-class-static-block\",\n inherits:\n USE_ESM || IS_STANDALONE || version[0] === \"8\"\n ? undefined\n : // eslint-disable-next-line no-restricted-globals\n require(\"@babel/plugin-syntax-class-static-block\").default,\n\n pre() {\n // Enable this in @babel/helper-create-class-features-plugin, so that it\n // can be handled by the private fields and methods transform.\n enableFeature(this.file, FEATURES.staticBlocks, /* loose */ false);\n },\n\n visitor: {\n // Run on ClassBody and not on class so that if @babel/helper-create-class-features-plugin\n // is enabled it can generate optimized output without passing from the intermediate\n // private fields representation.\n ClassBody(classBody) {\n const { scope } = classBody;\n const privateNames = new Set();\n const body = classBody.get(\"body\");\n for (const path of body) {\n if (path.isPrivate()) {\n privateNames.add(path.get(\"key.id\").node.name);\n }\n }\n for (const path of body) {\n if (!path.isStaticBlock()) continue;\n const staticBlockPrivateId = generateUid(scope, privateNames);\n privateNames.add(staticBlockPrivateId);\n const staticBlockRef = t.privateName(\n t.identifier(staticBlockPrivateId),\n );\n\n let replacement;\n const blockBody = path.node.body;\n // We special-case the single expression case to avoid the iife, since\n // it's common.\n if (blockBody.length === 1 && t.isExpressionStatement(blockBody[0])) {\n replacement = t.inheritsComments(\n blockBody[0].expression,\n blockBody[0],\n );\n } else {\n replacement = template.expression.ast`(() => { ${blockBody} })()`;\n }\n\n path.replaceWith(\n t.classPrivateProperty(\n staticBlockRef,\n replacement,\n [],\n /* static */ true,\n ),\n );\n }\n },\n },\n };\n});\n","// Fork of https://github.com/loganfsmyth/babel-plugin-proposal-decorators-legacy\n\nimport { template, types as t } from \"@babel/core\";\nimport type { NodePath, Visitor, PluginPass } from \"@babel/core\";\n\nconst buildClassDecorator = template.statement(`\n DECORATOR(CLASS_REF = INNER) || CLASS_REF;\n`) as (replacements: {\n DECORATOR: t.Expression;\n CLASS_REF: t.Identifier;\n INNER: t.Expression;\n}) => t.ExpressionStatement;\n\nconst buildClassPrototype = template(`\n CLASS_REF.prototype;\n`) as (replacements: { CLASS_REF: t.Identifier }) => t.ExpressionStatement;\n\nconst buildGetDescriptor = template(`\n Object.getOwnPropertyDescriptor(TARGET, PROPERTY);\n`) as (replacements: {\n TARGET: t.Expression;\n PROPERTY: t.Literal;\n}) => t.ExpressionStatement;\n\nconst buildGetObjectInitializer = template(`\n (TEMP = Object.getOwnPropertyDescriptor(TARGET, PROPERTY), (TEMP = TEMP ? TEMP.value : undefined), {\n enumerable: true,\n configurable: true,\n writable: true,\n initializer: function(){\n return TEMP;\n }\n })\n`) as (replacements: {\n TEMP: t.Identifier;\n TARGET: t.Expression;\n PROPERTY: t.Literal;\n}) => t.ExpressionStatement;\n\nconst WARNING_CALLS = new WeakSet();\n\n// legacy decorator does not support ClassAccessorProperty\ntype ClassDecoratableElement =\n | t.ClassMethod\n | t.ClassPrivateMethod\n | t.ClassProperty\n | t.ClassPrivateProperty;\n\n/**\n * If the decorator expressions are non-identifiers, hoist them to before the class so we can be sure\n * that they are evaluated in order.\n */\nfunction applyEnsureOrdering(\n path: NodePath,\n) {\n // TODO: This should probably also hoist computed properties.\n const decorators: t.Decorator[] = (\n path.isClass()\n ? [\n path,\n ...(path.get(\"body.body\") as NodePath[]),\n ]\n : path.get(\"properties\")\n ).reduce(\n (\n acc: t.Decorator[],\n prop: NodePath<\n t.ObjectMember | t.ClassExpression | ClassDecoratableElement\n >,\n ) => acc.concat(prop.node.decorators || []),\n [],\n );\n\n const identDecorators = decorators.filter(\n decorator => !t.isIdentifier(decorator.expression),\n );\n if (identDecorators.length === 0) return;\n\n return t.sequenceExpression(\n identDecorators\n .map((decorator): t.Expression => {\n const expression = decorator.expression;\n const id = (decorator.expression =\n path.scope.generateDeclaredUidIdentifier(\"dec\"));\n return t.assignmentExpression(\"=\", id, expression);\n })\n .concat([path.node]),\n );\n}\n\n/**\n * Given a class expression with class-level decorators, create a new expression\n * with the proper decorated behavior.\n */\nfunction applyClassDecorators(classPath: NodePath) {\n if (!hasClassDecorators(classPath.node)) return;\n\n const decorators = classPath.node.decorators || [];\n classPath.node.decorators = null;\n\n const name = classPath.scope.generateDeclaredUidIdentifier(\"class\");\n\n return decorators\n .map(dec => dec.expression)\n .reverse()\n .reduce(function (acc, decorator) {\n return buildClassDecorator({\n CLASS_REF: t.cloneNode(name),\n DECORATOR: t.cloneNode(decorator),\n INNER: acc,\n }).expression;\n }, classPath.node);\n}\n\nfunction hasClassDecorators(classNode: t.Class) {\n return !!classNode.decorators?.length;\n}\n\n/**\n * Given a class expression with method-level decorators, create a new expression\n * with the proper decorated behavior.\n */\nfunction applyMethodDecorators(\n path: NodePath,\n state: PluginPass,\n) {\n if (!hasMethodDecorators(path.node.body.body)) return;\n\n return applyTargetDecorators(\n path,\n state,\n // @ts-expect-error ClassAccessorProperty is not supported in legacy decorator\n path.node.body.body,\n );\n}\n\nfunction hasMethodDecorators(\n body: t.ClassBody[\"body\"] | t.ObjectExpression[\"properties\"],\n) {\n return body.some(\n node =>\n // @ts-expect-error decorators not in SpreadElement/StaticBlock\n node.decorators?.length,\n );\n}\n\n/**\n * Given an object expression with property decorators, create a new expression\n * with the proper decorated behavior.\n */\nfunction applyObjectDecorators(\n path: NodePath,\n state: PluginPass,\n) {\n if (!hasMethodDecorators(path.node.properties)) return;\n\n return applyTargetDecorators(\n path,\n state,\n path.node.properties.filter(\n (prop): prop is t.ObjectMember => prop.type !== \"SpreadElement\",\n ),\n );\n}\n\n/**\n * A helper to pull out property decorators into a sequence expression.\n */\nfunction applyTargetDecorators(\n path: NodePath,\n state: PluginPass,\n decoratedProps: (t.ObjectMember | ClassDecoratableElement)[],\n) {\n const name = path.scope.generateDeclaredUidIdentifier(\n path.isClass() ? \"class\" : \"obj\",\n );\n\n const exprs = decoratedProps.reduce(function (acc, node) {\n let decorators: t.Decorator[] = [];\n if (node.decorators != null) {\n decorators = node.decorators;\n node.decorators = null;\n }\n\n if (decorators.length === 0) return acc;\n\n if (\n // @ts-expect-error computed is not in ClassPrivateProperty\n node.computed\n ) {\n throw path.buildCodeFrameError(\n \"Computed method/property decorators are not yet supported.\",\n );\n }\n\n const property: t.Literal = t.isLiteral(node.key)\n ? node.key\n : t.stringLiteral(\n // @ts-expect-error: should we handle ClassPrivateProperty?\n node.key.name,\n );\n\n const target =\n path.isClass() && !(node as ClassDecoratableElement).static\n ? buildClassPrototype({\n CLASS_REF: name,\n }).expression\n : name;\n\n if (t.isClassProperty(node, { static: false })) {\n const descriptor = path.scope.generateDeclaredUidIdentifier(\"descriptor\");\n\n const initializer = node.value\n ? t.functionExpression(\n null,\n [],\n t.blockStatement([t.returnStatement(node.value)]),\n )\n : t.nullLiteral();\n\n node.value = t.callExpression(\n state.addHelper(\"initializerWarningHelper\"),\n [descriptor, t.thisExpression()],\n );\n\n WARNING_CALLS.add(node.value);\n\n acc.push(\n t.assignmentExpression(\n \"=\",\n t.cloneNode(descriptor),\n t.callExpression(state.addHelper(\"applyDecoratedDescriptor\"), [\n t.cloneNode(target),\n t.cloneNode(property),\n t.arrayExpression(\n decorators.map(dec => t.cloneNode(dec.expression)),\n ),\n t.objectExpression([\n t.objectProperty(\n t.identifier(\"configurable\"),\n t.booleanLiteral(true),\n ),\n t.objectProperty(\n t.identifier(\"enumerable\"),\n t.booleanLiteral(true),\n ),\n t.objectProperty(\n t.identifier(\"writable\"),\n t.booleanLiteral(true),\n ),\n t.objectProperty(t.identifier(\"initializer\"), initializer),\n ]),\n ]),\n ),\n );\n } else {\n acc.push(\n t.callExpression(state.addHelper(\"applyDecoratedDescriptor\"), [\n t.cloneNode(target),\n t.cloneNode(property),\n t.arrayExpression(decorators.map(dec => t.cloneNode(dec.expression))),\n t.isObjectProperty(node) || t.isClassProperty(node, { static: true })\n ? buildGetObjectInitializer({\n TEMP: path.scope.generateDeclaredUidIdentifier(\"init\"),\n TARGET: t.cloneNode(target),\n PROPERTY: t.cloneNode(property),\n }).expression\n : buildGetDescriptor({\n TARGET: t.cloneNode(target),\n PROPERTY: t.cloneNode(property),\n }).expression,\n t.cloneNode(target),\n ]),\n );\n }\n\n return acc;\n }, []);\n\n return t.sequenceExpression([\n t.assignmentExpression(\"=\", t.cloneNode(name), path.node),\n t.sequenceExpression(exprs),\n t.cloneNode(name),\n ]);\n}\n\nfunction decoratedClassToExpression({ node, scope }: NodePath) {\n if (!hasClassDecorators(node) && !hasMethodDecorators(node.body.body)) {\n return;\n }\n\n const ref = node.id\n ? t.cloneNode(node.id)\n : scope.generateUidIdentifier(\"class\");\n\n return t.variableDeclaration(\"let\", [\n t.variableDeclarator(ref, t.toExpression(node)),\n ]);\n}\n\nconst visitor: Visitor = {\n ExportDefaultDeclaration(path) {\n const decl = path.get(\"declaration\");\n if (!decl.isClassDeclaration()) return;\n\n const replacement = decoratedClassToExpression(decl);\n if (replacement) {\n const [varDeclPath] = path.replaceWithMultiple([\n replacement,\n t.exportNamedDeclaration(null, [\n t.exportSpecifier(\n // @ts-expect-error todo(flow->ts) might be add more specific return type for decoratedClassToExpression\n t.cloneNode(replacement.declarations[0].id),\n t.identifier(\"default\"),\n ),\n ]),\n ]);\n\n if (!decl.node.id) {\n path.scope.registerDeclaration(varDeclPath);\n }\n }\n },\n ClassDeclaration(path) {\n const replacement = decoratedClassToExpression(path);\n if (replacement) {\n const [newPath] = path.replaceWith(replacement);\n\n const decl = newPath.get(\"declarations.0\");\n const id = decl.node.id as t.Identifier;\n\n // TODO: Maybe add this logic to @babel/traverse\n const binding = path.scope.getOwnBinding(id.name);\n binding.identifier = id;\n binding.path = decl;\n }\n },\n ClassExpression(path, state) {\n // Create a replacement for the class node if there is one. We do one pass to replace classes with\n // class decorators, and a second pass to process method decorators.\n const decoratedClass =\n applyEnsureOrdering(path) ||\n applyClassDecorators(path) ||\n applyMethodDecorators(path, state);\n\n if (decoratedClass) path.replaceWith(decoratedClass);\n },\n ObjectExpression(path, state) {\n const decoratedObject =\n applyEnsureOrdering(path) || applyObjectDecorators(path, state);\n\n if (decoratedObject) path.replaceWith(decoratedObject);\n },\n\n AssignmentExpression(path, state) {\n if (!WARNING_CALLS.has(path.node.right)) return;\n\n path.replaceWith(\n t.callExpression(state.addHelper(\"initializerDefineProperty\"), [\n // @ts-expect-error todo(flow->ts) typesafe NodePath.get\n t.cloneNode(path.get(\"left.object\").node),\n t.stringLiteral(\n // @ts-expect-error todo(flow->ts) typesafe NodePath.get\n path.get(\"left.property\").node.name ||\n // @ts-expect-error todo(flow->ts) typesafe NodePath.get\n path.get(\"left.property\").node.value,\n ),\n // @ts-expect-error todo(flow->ts)\n t.cloneNode(path.get(\"right.arguments\")[0].node),\n // @ts-expect-error todo(flow->ts)\n t.cloneNode(path.get(\"right.arguments\")[1].node),\n ]),\n );\n },\n\n CallExpression(path, state) {\n if (path.node.arguments.length !== 3) return;\n if (!WARNING_CALLS.has(path.node.arguments[2])) return;\n\n // If the class properties plugin isn't enabled, this line will add an unused helper\n // to the code. It's not ideal, but it's ok since the configuration is not valid anyway.\n // @ts-expect-error todo(flow->ts) check that `callee` is Identifier\n if (path.node.callee.name !== state.addHelper(\"defineProperty\").name) {\n return;\n }\n\n path.replaceWith(\n t.callExpression(state.addHelper(\"initializerDefineProperty\"), [\n t.cloneNode(path.get(\"arguments\")[0].node),\n t.cloneNode(path.get(\"arguments\")[1].node),\n // @ts-expect-error todo(flow->ts)\n t.cloneNode(path.get(\"arguments.2.arguments\")[0].node),\n // @ts-expect-error todo(flow->ts)\n t.cloneNode(path.get(\"arguments.2.arguments\")[1].node),\n ]),\n );\n },\n};\n\nexport default visitor;\n","/* eslint-disable @babel/development/plugin-name */\n\nimport { declare } from \"@babel/helper-plugin-utils\";\nimport syntaxDecorators from \"@babel/plugin-syntax-decorators\";\nimport {\n createClassFeaturePlugin,\n FEATURES,\n} from \"@babel/helper-create-class-features-plugin\";\nimport legacyVisitor from \"./transformer-legacy.ts\";\nimport type { Options as SyntaxOptions } from \"@babel/plugin-syntax-decorators\";\n\ninterface Options extends SyntaxOptions {\n /** @deprecated use `constantSuper` assumption instead. Only supported in 2021-12 version. */\n loose?: boolean;\n}\n\nexport type { Options };\n\nexport default declare((api, options: Options) => {\n api.assertVersion(REQUIRED_VERSION(7));\n\n // Options are validated in @babel/plugin-syntax-decorators\n if (!process.env.BABEL_8_BREAKING) {\n // eslint-disable-next-line no-var\n var { legacy } = options;\n }\n const { version } = options;\n\n if (\n process.env.BABEL_8_BREAKING\n ? version === \"legacy\"\n : legacy || version === \"legacy\"\n ) {\n return {\n name: \"proposal-decorators\",\n inherits: syntaxDecorators,\n visitor: legacyVisitor,\n };\n } else if (\n !version ||\n version === \"2018-09\" ||\n version === \"2021-12\" ||\n version === \"2022-03\" ||\n version === \"2023-01\" ||\n version === \"2023-05\" ||\n version === \"2023-11\"\n ) {\n api.assertVersion(REQUIRED_VERSION(\"^7.0.2\"));\n return createClassFeaturePlugin({\n name: \"proposal-decorators\",\n\n api,\n feature: FEATURES.decorators,\n inherits: syntaxDecorators,\n // @ts-expect-error version must not be \"legacy\" here\n decoratorVersion: version,\n // loose: options.loose, Not supported\n });\n } else {\n throw new Error(\n \"The '.version' option must be one of 'legacy', '2023-11', '2023-05', '2023-01', '2022-03', or '2021-12'.\",\n );\n }\n});\n","import { types as t } from \"@babel/core\";\nimport type { File, Scope, NodePath } from \"@babel/core\";\n\nfunction isPureVoid(node: t.Node) {\n return (\n t.isUnaryExpression(node) &&\n node.operator === \"void\" &&\n t.isPureish(node.argument)\n );\n}\n\nexport function unshiftForXStatementBody(\n statementPath: NodePath,\n newStatements: t.Statement[],\n) {\n statementPath.ensureBlock();\n const { scope, node } = statementPath;\n const bodyScopeBindings = statementPath.get(\"body\").scope.bindings;\n const hasShadowedBlockScopedBindings = Object.keys(bodyScopeBindings).some(\n name => scope.hasBinding(name),\n );\n\n if (hasShadowedBlockScopedBindings) {\n // handle shadowed variables referenced in computed keys:\n // var a = 0;for (const { #x: x, [a++]: y } of z) { const a = 1; }\n node.body = t.blockStatement([...newStatements, node.body]);\n } else {\n (node.body as t.BlockStatement).body.unshift(...newStatements);\n }\n}\n\n/**\n * Test if an ArrayPattern's elements contain any RestElements.\n */\n\nfunction hasArrayRest(pattern: t.ArrayPattern) {\n return pattern.elements.some(elem => t.isRestElement(elem));\n}\n\n/**\n * Test if an ObjectPattern's properties contain any RestElements.\n */\n\nfunction hasObjectRest(pattern: t.ObjectPattern) {\n return pattern.properties.some(prop => t.isRestElement(prop));\n}\n\ninterface UnpackableArrayExpression extends t.ArrayExpression {\n elements: (null | t.Expression)[];\n}\n\nconst STOP_TRAVERSAL = {};\n\ninterface ArrayUnpackVisitorState {\n deopt: boolean;\n bindings: Record;\n}\n\n// NOTE: This visitor is meant to be used via t.traverse\nconst arrayUnpackVisitor = (\n node: t.Node,\n ancestors: t.TraversalAncestors,\n state: ArrayUnpackVisitorState,\n) => {\n if (!ancestors.length) {\n // Top-level node: this is the array literal.\n return;\n }\n\n if (\n t.isIdentifier(node) &&\n t.isReferenced(node, ancestors[ancestors.length - 1].node) &&\n state.bindings[node.name]\n ) {\n state.deopt = true;\n // eslint-disable-next-line @typescript-eslint/only-throw-error\n throw STOP_TRAVERSAL;\n }\n};\n\nexport type DestructuringTransformerNode =\n | t.VariableDeclaration\n | t.ExpressionStatement\n | t.ReturnStatement;\n\ninterface DestructuringTransformerOption {\n blockHoist?: number;\n operator?: t.AssignmentExpression[\"operator\"];\n nodes?: DestructuringTransformerNode[];\n kind?: t.VariableDeclaration[\"kind\"];\n scope: Scope;\n arrayLikeIsIterable: boolean;\n iterableIsArray: boolean;\n objectRestNoSymbols: boolean;\n useBuiltIns: boolean;\n addHelper: File[\"addHelper\"];\n}\nexport class DestructuringTransformer {\n private blockHoist: number;\n private operator: t.AssignmentExpression[\"operator\"];\n arrayRefSet: Set;\n private nodes: DestructuringTransformerNode[];\n private scope: Scope;\n private kind: t.VariableDeclaration[\"kind\"];\n private iterableIsArray: boolean;\n private arrayLikeIsIterable: boolean;\n private objectRestNoSymbols: boolean;\n private useBuiltIns: boolean;\n private addHelper: File[\"addHelper\"];\n constructor(opts: DestructuringTransformerOption) {\n this.blockHoist = opts.blockHoist;\n this.operator = opts.operator;\n this.arrayRefSet = new Set();\n this.nodes = opts.nodes || [];\n this.scope = opts.scope;\n this.kind = opts.kind;\n this.iterableIsArray = opts.iterableIsArray;\n this.arrayLikeIsIterable = opts.arrayLikeIsIterable;\n this.objectRestNoSymbols = opts.objectRestNoSymbols;\n this.useBuiltIns = opts.useBuiltIns;\n this.addHelper = opts.addHelper;\n }\n\n getExtendsHelper() {\n return this.useBuiltIns\n ? t.memberExpression(t.identifier(\"Object\"), t.identifier(\"assign\"))\n : this.addHelper(\"extends\");\n }\n\n buildVariableAssignment(\n id: t.AssignmentExpression[\"left\"],\n init: t.Expression,\n ) {\n let op = this.operator;\n if (t.isMemberExpression(id) || t.isOptionalMemberExpression(id)) op = \"=\";\n\n let node: t.ExpressionStatement | t.VariableDeclaration;\n\n if (op) {\n node = t.expressionStatement(\n t.assignmentExpression(\n op,\n id,\n t.cloneNode(init) || this.scope.buildUndefinedNode(),\n ),\n );\n } else {\n let nodeInit: t.Expression;\n\n if ((this.kind === \"const\" || this.kind === \"using\") && init === null) {\n nodeInit = this.scope.buildUndefinedNode();\n } else {\n nodeInit = t.cloneNode(init);\n }\n\n node = t.variableDeclaration(this.kind, [\n t.variableDeclarator(id as t.LVal, nodeInit),\n ]);\n }\n\n //@ts-expect-error(todo): document block hoist property\n node._blockHoist = this.blockHoist;\n\n return node;\n }\n\n buildVariableDeclaration(id: t.Identifier, init: t.Expression) {\n const declar = t.variableDeclaration(\"var\", [\n t.variableDeclarator(t.cloneNode(id), t.cloneNode(init)),\n ]);\n // @ts-expect-error todo(flow->ts): avoid mutations\n declar._blockHoist = this.blockHoist;\n return declar;\n }\n\n push(id: t.LVal, _init: t.Expression | null) {\n const init = t.cloneNode(_init);\n if (t.isObjectPattern(id)) {\n this.pushObjectPattern(id, init);\n } else if (t.isArrayPattern(id)) {\n this.pushArrayPattern(id, init);\n } else if (t.isAssignmentPattern(id)) {\n this.pushAssignmentPattern(id, init);\n } else {\n this.nodes.push(this.buildVariableAssignment(id, init));\n }\n }\n\n toArray(node: t.Expression, count?: boolean | number) {\n if (\n this.iterableIsArray ||\n (t.isIdentifier(node) && this.arrayRefSet.has(node.name))\n ) {\n return node;\n } else {\n return this.scope.toArray(node, count, this.arrayLikeIsIterable);\n }\n }\n\n pushAssignmentPattern(\n { left, right }: t.AssignmentPattern,\n valueRef: t.Expression | null,\n ) {\n // handle array init with void 0. This also happens when\n // the value was originally a hole.\n // const [x = 42] = [void 0,];\n // -> const x = 42;\n if (isPureVoid(valueRef)) {\n this.push(left, right);\n return;\n }\n\n // we need to assign the current value of the assignment to avoid evaluating\n // it more than once\n const tempId = this.scope.generateUidIdentifierBasedOnNode(valueRef);\n\n this.nodes.push(this.buildVariableDeclaration(tempId, valueRef));\n\n const tempConditional = t.conditionalExpression(\n t.binaryExpression(\n \"===\",\n t.cloneNode(tempId),\n this.scope.buildUndefinedNode(),\n ),\n right,\n t.cloneNode(tempId),\n );\n\n if (t.isPattern(left)) {\n let patternId;\n let node;\n\n if (\n this.kind === \"const\" ||\n this.kind === \"let\" ||\n this.kind === \"using\"\n ) {\n patternId = this.scope.generateUidIdentifier(tempId.name);\n node = this.buildVariableDeclaration(patternId, tempConditional);\n } else {\n patternId = tempId;\n\n node = t.expressionStatement(\n t.assignmentExpression(\"=\", t.cloneNode(tempId), tempConditional),\n );\n }\n\n this.nodes.push(node);\n this.push(left, patternId);\n } else {\n this.nodes.push(this.buildVariableAssignment(left, tempConditional));\n }\n }\n\n pushObjectRest(\n pattern: t.ObjectPattern,\n objRef: t.Expression,\n spreadProp: t.RestElement,\n spreadPropIndex: number,\n ) {\n const value = buildObjectExcludingKeys(\n pattern.properties.slice(0, spreadPropIndex) as t.ObjectProperty[],\n objRef,\n this.scope,\n name => this.addHelper(name),\n this.objectRestNoSymbols,\n this.useBuiltIns,\n );\n this.nodes.push(this.buildVariableAssignment(spreadProp.argument, value));\n }\n\n pushObjectProperty(prop: t.ObjectProperty, propRef: t.Expression) {\n if (t.isLiteral(prop.key)) prop.computed = true;\n\n const pattern = prop.value as t.LVal;\n const objRef = t.memberExpression(\n t.cloneNode(propRef),\n prop.key,\n prop.computed,\n );\n\n if (t.isPattern(pattern)) {\n this.push(pattern, objRef);\n } else {\n this.nodes.push(this.buildVariableAssignment(pattern, objRef));\n }\n }\n\n pushObjectPattern(pattern: t.ObjectPattern, objRef: t.Expression) {\n // https://github.com/babel/babel/issues/681\n\n if (!pattern.properties.length) {\n this.nodes.push(\n t.expressionStatement(\n t.callExpression(\n this.addHelper(\"objectDestructuringEmpty\"),\n isPureVoid(objRef) ? [] : [objRef],\n ),\n ),\n );\n return;\n }\n\n // if we have more than one properties in this pattern and the objectRef is a\n // member expression then we need to assign it to a temporary variable so it's\n // only evaluated once\n\n if (pattern.properties.length > 1 && !this.scope.isStatic(objRef)) {\n const temp = this.scope.generateUidIdentifierBasedOnNode(objRef);\n this.nodes.push(this.buildVariableDeclaration(temp, objRef));\n objRef = temp;\n }\n\n // Replace impure computed key expressions if we have a rest parameter\n if (hasObjectRest(pattern)) {\n let copiedPattern: t.ObjectPattern;\n for (let i = 0; i < pattern.properties.length; i++) {\n const prop = pattern.properties[i];\n if (t.isRestElement(prop)) {\n break;\n }\n const key = prop.key;\n if (prop.computed && !this.scope.isPure(key)) {\n const name = this.scope.generateUidIdentifierBasedOnNode(key);\n this.nodes.push(\n //@ts-expect-error PrivateName has been handled by destructuring-private\n this.buildVariableDeclaration(name, key),\n );\n if (!copiedPattern) {\n copiedPattern = pattern = {\n ...pattern,\n properties: pattern.properties.slice(),\n };\n }\n copiedPattern.properties[i] = {\n ...prop,\n key: name,\n };\n }\n }\n }\n\n for (let i = 0; i < pattern.properties.length; i++) {\n const prop = pattern.properties[i];\n if (t.isRestElement(prop)) {\n this.pushObjectRest(pattern, objRef, prop, i);\n } else {\n this.pushObjectProperty(prop, objRef);\n }\n }\n }\n\n canUnpackArrayPattern(\n pattern: t.ArrayPattern,\n arr: t.Expression,\n ): arr is UnpackableArrayExpression {\n // not an array so there's no way we can deal with this\n if (!t.isArrayExpression(arr)) return false;\n\n // pattern has less elements than the array and doesn't have a rest so some\n // elements won't be evaluated\n if (pattern.elements.length > arr.elements.length) return;\n if (\n pattern.elements.length < arr.elements.length &&\n !hasArrayRest(pattern)\n ) {\n return false;\n }\n\n for (const elem of pattern.elements) {\n // deopt on holes\n if (!elem) return false;\n\n // deopt on member expressions as they may be included in the RHS\n if (t.isMemberExpression(elem)) return false;\n }\n\n for (const elem of arr.elements) {\n // deopt on spread elements\n if (t.isSpreadElement(elem)) return false;\n\n // deopt call expressions as they might change values of LHS variables\n if (t.isCallExpression(elem)) return false;\n\n // deopt on member expressions as they may be getter/setters and have side-effects\n if (t.isMemberExpression(elem)) return false;\n }\n\n // deopt on reference to left side identifiers\n const bindings = t.getBindingIdentifiers(pattern);\n const state: ArrayUnpackVisitorState = { deopt: false, bindings };\n\n try {\n t.traverse(arr, arrayUnpackVisitor, state);\n } catch (e) {\n if (e !== STOP_TRAVERSAL) throw e;\n }\n\n return !state.deopt;\n }\n\n pushUnpackedArrayPattern(\n pattern: t.ArrayPattern,\n arr: UnpackableArrayExpression,\n ) {\n const holeToUndefined = (el: t.Expression) =>\n el ?? this.scope.buildUndefinedNode();\n\n for (let i = 0; i < pattern.elements.length; i++) {\n const elem = pattern.elements[i];\n if (t.isRestElement(elem)) {\n this.push(\n elem.argument,\n t.arrayExpression(arr.elements.slice(i).map(holeToUndefined)),\n );\n } else {\n this.push(elem, holeToUndefined(arr.elements[i]));\n }\n }\n }\n\n pushArrayPattern(pattern: t.ArrayPattern, arrayRef: t.Expression | null) {\n if (arrayRef === null) {\n this.nodes.push(\n t.expressionStatement(\n t.callExpression(this.addHelper(\"objectDestructuringEmpty\"), []),\n ),\n );\n return;\n }\n if (!pattern.elements) return;\n\n // optimise basic array destructuring of an array expression\n //\n // we can't do this to a pattern of unequal size to it's right hand\n // array expression as then there will be values that won't be evaluated\n //\n // eg: let [a, b] = [1, 2];\n\n if (this.canUnpackArrayPattern(pattern, arrayRef)) {\n this.pushUnpackedArrayPattern(pattern, arrayRef);\n return;\n }\n\n // if we have a rest then we need all the elements so don't tell\n // `scope.toArray` to only get a certain amount\n\n const count = !hasArrayRest(pattern) && pattern.elements.length;\n\n // so we need to ensure that the `arrayRef` is an array, `scope.toArray` will\n // return a locally bound identifier if it's been inferred to be an array,\n // otherwise it'll be a call to a helper that will ensure it's one\n\n const toArray = this.toArray(arrayRef, count);\n\n if (t.isIdentifier(toArray)) {\n // we've been given an identifier so it must have been inferred to be an\n // array\n arrayRef = toArray;\n } else {\n arrayRef = this.scope.generateUidIdentifierBasedOnNode(arrayRef);\n this.arrayRefSet.add(arrayRef.name);\n this.nodes.push(this.buildVariableDeclaration(arrayRef, toArray));\n }\n\n for (let i = 0; i < pattern.elements.length; i++) {\n const elem = pattern.elements[i];\n\n // hole\n if (!elem) continue;\n\n let elemRef;\n\n if (t.isRestElement(elem)) {\n elemRef = this.toArray(arrayRef);\n elemRef = t.callExpression(\n t.memberExpression(elemRef, t.identifier(\"slice\")),\n [t.numericLiteral(i)],\n );\n\n // set the element to the rest element argument since we've dealt with it\n // being a rest already\n this.push(elem.argument, elemRef);\n } else {\n elemRef = t.memberExpression(arrayRef, t.numericLiteral(i), true);\n this.push(elem, elemRef);\n }\n }\n }\n\n init(pattern: t.LVal, ref: t.Expression) {\n // trying to destructure a value that we can't evaluate more than once so we\n // need to save it to a variable\n\n if (!t.isArrayExpression(ref) && !t.isMemberExpression(ref)) {\n const memo = this.scope.maybeGenerateMemoised(ref, true);\n if (memo) {\n this.nodes.push(this.buildVariableDeclaration(memo, t.cloneNode(ref)));\n ref = memo;\n }\n }\n\n this.push(pattern, ref);\n\n return this.nodes;\n }\n}\n\ninterface ExcludingKey {\n key: t.Expression | t.PrivateName;\n computed: boolean;\n}\n\nexport function buildObjectExcludingKeys(\n excludedKeys: T[],\n objRef: t.Expression,\n scope: Scope,\n addHelper: File[\"addHelper\"],\n objectRestNoSymbols: boolean,\n useBuiltIns: boolean,\n): t.CallExpression {\n // get all the keys that appear in this object before the current spread\n\n const keys = [];\n let allLiteral = true;\n let hasTemplateLiteral = false;\n for (let i = 0; i < excludedKeys.length; i++) {\n const prop = excludedKeys[i];\n const key = prop.key;\n if (t.isIdentifier(key) && !prop.computed) {\n keys.push(t.stringLiteral(key.name));\n } else if (t.isTemplateLiteral(key)) {\n keys.push(t.cloneNode(key));\n hasTemplateLiteral = true;\n } else if (t.isLiteral(key)) {\n // @ts-expect-error todo(flow->ts) NullLiteral\n keys.push(t.stringLiteral(String(key.value)));\n } else if (t.isPrivateName(key)) {\n // private key is not enumerable\n } else {\n keys.push(t.cloneNode(key));\n allLiteral = false;\n }\n }\n\n let value;\n if (keys.length === 0) {\n const extendsHelper = useBuiltIns\n ? t.memberExpression(t.identifier(\"Object\"), t.identifier(\"assign\"))\n : addHelper(\"extends\");\n value = t.callExpression(extendsHelper, [\n t.objectExpression([]),\n t.sequenceExpression([\n t.callExpression(addHelper(\"objectDestructuringEmpty\"), [\n t.cloneNode(objRef),\n ]),\n t.cloneNode(objRef),\n ]),\n ]);\n } else {\n let keyExpression: t.Expression = t.arrayExpression(keys);\n\n if (!allLiteral) {\n keyExpression = t.callExpression(\n t.memberExpression(keyExpression, t.identifier(\"map\")),\n [addHelper(\"toPropertyKey\")],\n );\n } else if (!hasTemplateLiteral && !t.isProgram(scope.block)) {\n // Hoist definition of excluded keys, so that it's not created each time.\n const programScope = scope.getProgramParent();\n const id = programScope.generateUidIdentifier(\"excluded\");\n\n programScope.push({\n id,\n init: keyExpression,\n kind: \"const\",\n });\n\n keyExpression = t.cloneNode(id);\n }\n\n value = t.callExpression(\n addHelper(`objectWithoutProperties${objectRestNoSymbols ? \"Loose\" : \"\"}`),\n [t.cloneNode(objRef), keyExpression],\n );\n }\n return value;\n}\n\nexport function convertVariableDeclaration(\n path: NodePath,\n addHelper: File[\"addHelper\"],\n arrayLikeIsIterable: boolean,\n iterableIsArray: boolean,\n objectRestNoSymbols: boolean,\n useBuiltIns: boolean,\n) {\n const { node, scope } = path;\n\n const nodeKind = node.kind;\n const nodeLoc = node.loc;\n const nodes = [];\n\n for (let i = 0; i < node.declarations.length; i++) {\n const declar = node.declarations[i];\n\n const patternId = declar.init;\n const pattern = declar.id;\n\n const destructuring: DestructuringTransformer =\n new DestructuringTransformer({\n // @ts-expect-error(todo): avoid internal properties access\n blockHoist: node._blockHoist,\n nodes: nodes,\n scope: scope,\n kind: node.kind,\n iterableIsArray,\n arrayLikeIsIterable,\n useBuiltIns,\n objectRestNoSymbols,\n addHelper,\n });\n\n if (t.isPattern(pattern)) {\n destructuring.init(pattern, patternId);\n\n if (+i !== node.declarations.length - 1) {\n // we aren't the last declarator so let's just make the\n // last transformed node inherit from us\n t.inherits(nodes[nodes.length - 1], declar);\n }\n } else {\n nodes.push(\n t.inherits(\n destructuring.buildVariableAssignment(pattern, patternId),\n declar,\n ),\n );\n }\n }\n\n let tail: t.VariableDeclaration | null = null;\n let nodesOut = [];\n for (const node of nodes) {\n if (t.isVariableDeclaration(node)) {\n if (tail !== null) {\n // Create a single compound declarations\n tail.declarations.push(...node.declarations);\n continue;\n } else {\n // Make sure the original node kind is used for each compound declaration\n node.kind = nodeKind;\n tail = node;\n }\n } else {\n tail = null;\n }\n // Propagate the original declaration node's location\n if (!node.loc) {\n node.loc = nodeLoc;\n }\n nodesOut.push(node);\n }\n\n if (\n nodesOut.length === 2 &&\n t.isVariableDeclaration(nodesOut[0]) &&\n t.isExpressionStatement(nodesOut[1]) &&\n t.isCallExpression(nodesOut[1].expression) &&\n nodesOut[0].declarations.length === 1\n ) {\n // This can only happen when we generate this code:\n // var _ref = DESTRUCTURED_VALUE;\n // babelHelpers.objectDestructuringEmpty(_ref);\n // Since pushing those two statements to the for loop .init will require an IIFE,\n // we can optimize them to\n // babelHelpers.objectDestructuringEmpty(DESTRUCTURED_VALUE);\n const expr = nodesOut[1].expression;\n expr.arguments = [nodesOut[0].declarations[0].init];\n nodesOut = [expr];\n } else {\n // We must keep nodes all are expressions or statements, so `replaceWithMultiple` can work.\n if (\n t.isForStatement(path.parent, { init: node }) &&\n !nodesOut.some(v => t.isVariableDeclaration(v))\n ) {\n for (let i = 0; i < nodesOut.length; i++) {\n const node: t.Node = nodesOut[i];\n if (t.isExpressionStatement(node)) {\n nodesOut[i] = node.expression;\n }\n }\n }\n }\n\n if (nodesOut.length === 1) {\n path.replaceWith(nodesOut[0]);\n } else {\n path.replaceWithMultiple(nodesOut);\n }\n scope.crawl();\n}\n\nexport function convertAssignmentExpression(\n path: NodePath,\n addHelper: File[\"addHelper\"],\n arrayLikeIsIterable: boolean,\n iterableIsArray: boolean,\n objectRestNoSymbols: boolean,\n useBuiltIns: boolean,\n) {\n const { node, scope, parentPath } = path;\n\n const nodes: DestructuringTransformerNode[] = [];\n\n const destructuring = new DestructuringTransformer({\n operator: node.operator,\n scope: scope,\n nodes: nodes,\n arrayLikeIsIterable,\n iterableIsArray,\n objectRestNoSymbols,\n useBuiltIns,\n addHelper,\n });\n\n let ref: t.Identifier | void;\n if (\n (!parentPath.isExpressionStatement() &&\n !parentPath.isSequenceExpression()) ||\n path.isCompletionRecord()\n ) {\n ref = scope.generateUidIdentifierBasedOnNode(node.right, \"ref\");\n\n nodes.push(\n t.variableDeclaration(\"var\", [t.variableDeclarator(ref, node.right)]),\n );\n\n if (t.isArrayExpression(node.right)) {\n destructuring.arrayRefSet.add(ref.name);\n }\n }\n\n destructuring.init(node.left, ref || node.right);\n\n if (ref) {\n if (parentPath.isArrowFunctionExpression()) {\n path.replaceWith(t.blockStatement([]));\n nodes.push(t.returnStatement(t.cloneNode(ref)));\n } else {\n nodes.push(t.expressionStatement(t.cloneNode(ref)));\n }\n }\n\n path.replaceWithMultiple(nodes);\n scope.crawl();\n}\n","import { declare } from \"@babel/helper-plugin-utils\";\nimport { types as t, type NodePath } from \"@babel/core\";\nimport {\n DestructuringTransformer,\n convertVariableDeclaration,\n convertAssignmentExpression,\n unshiftForXStatementBody,\n type DestructuringTransformerNode,\n} from \"./util.ts\";\nexport { buildObjectExcludingKeys, unshiftForXStatementBody } from \"./util.ts\";\n\n/**\n * Test if a VariableDeclaration's declarations contains any Patterns.\n */\n\nfunction variableDeclarationHasPattern(node: t.VariableDeclaration) {\n for (const declar of node.declarations) {\n if (t.isPattern(declar.id)) {\n return true;\n }\n }\n return false;\n}\n\nexport interface Options {\n allowArrayLike?: boolean;\n loose?: boolean;\n useBuiltIns?: boolean;\n}\n\nexport default declare((api, options: Options) => {\n api.assertVersion(REQUIRED_VERSION(7));\n\n const { useBuiltIns = false } = options;\n\n const iterableIsArray =\n api.assumption(\"iterableIsArray\") ?? options.loose ?? false;\n const arrayLikeIsIterable =\n options.allowArrayLike ?? api.assumption(\"arrayLikeIsIterable\") ?? false;\n const objectRestNoSymbols =\n api.assumption(\"objectRestNoSymbols\") ?? options.loose ?? false;\n\n return {\n name: \"transform-destructuring\",\n\n visitor: {\n ExportNamedDeclaration(path) {\n const declaration = path.get(\"declaration\");\n if (!declaration.isVariableDeclaration()) return;\n if (!variableDeclarationHasPattern(declaration.node)) return;\n\n const specifiers = [];\n\n for (const name of Object.keys(path.getOuterBindingIdentifiers())) {\n specifiers.push(\n t.exportSpecifier(t.identifier(name), t.identifier(name)),\n );\n }\n\n // Split the declaration and export list into two declarations so that the variable\n // declaration can be split up later without needing to worry about not being a\n // top-level statement.\n path.replaceWith(declaration.node);\n path.insertAfter(t.exportNamedDeclaration(null, specifiers));\n path.scope.crawl();\n },\n\n ForXStatement(path: NodePath) {\n const { node, scope } = path;\n const left = node.left;\n\n if (t.isPattern(left)) {\n // for ({ length: k } in { abc: 3 });\n\n const temp = scope.generateUidIdentifier(\"ref\");\n\n node.left = t.variableDeclaration(\"var\", [\n t.variableDeclarator(temp),\n ]);\n\n path.ensureBlock();\n const statementBody = (path.node.body as t.BlockStatement).body;\n const nodes = [];\n // todo: the completion of a for statement can only be observed from\n // a do block (or eval that we don't support),\n // but the new do-expression proposal plans to ban iteration ends in the\n // do block, maybe we can get rid of this\n if (statementBody.length === 0 && path.isCompletionRecord()) {\n nodes.unshift(t.expressionStatement(scope.buildUndefinedNode()));\n }\n\n nodes.unshift(\n t.expressionStatement(\n t.assignmentExpression(\"=\", left, t.cloneNode(temp)),\n ),\n );\n\n unshiftForXStatementBody(path, nodes);\n scope.crawl();\n return;\n }\n\n if (!t.isVariableDeclaration(left)) return;\n\n const pattern = left.declarations[0].id;\n if (!t.isPattern(pattern)) return;\n\n const key = scope.generateUidIdentifier(\"ref\");\n node.left = t.variableDeclaration(left.kind, [\n t.variableDeclarator(key, null),\n ]);\n\n const nodes: DestructuringTransformerNode[] = [];\n\n const destructuring = new DestructuringTransformer({\n kind: left.kind,\n scope: scope,\n nodes: nodes,\n arrayLikeIsIterable,\n iterableIsArray,\n objectRestNoSymbols,\n useBuiltIns,\n addHelper: name => this.addHelper(name),\n });\n\n destructuring.init(pattern, key);\n\n unshiftForXStatementBody(path, nodes);\n scope.crawl();\n },\n\n CatchClause({ node, scope }) {\n const pattern = node.param;\n if (!t.isPattern(pattern)) return;\n\n const ref = scope.generateUidIdentifier(\"ref\");\n node.param = ref;\n\n const nodes: DestructuringTransformerNode[] = [];\n\n const destructuring = new DestructuringTransformer({\n kind: \"let\",\n scope: scope,\n nodes: nodes,\n arrayLikeIsIterable,\n iterableIsArray,\n objectRestNoSymbols,\n useBuiltIns,\n addHelper: name => this.addHelper(name),\n });\n destructuring.init(pattern, ref);\n\n node.body.body = [...nodes, ...node.body.body];\n scope.crawl();\n },\n\n AssignmentExpression(path, state) {\n if (!t.isPattern(path.node.left)) return;\n convertAssignmentExpression(\n path as NodePath,\n name => state.addHelper(name),\n arrayLikeIsIterable,\n iterableIsArray,\n objectRestNoSymbols,\n useBuiltIns,\n );\n },\n\n VariableDeclaration(path, state) {\n const { node, parent } = path;\n if (t.isForXStatement(parent)) return;\n if (!parent || !path.container) return; // i don't know why this is necessary - TODO\n if (!variableDeclarationHasPattern(node)) return;\n convertVariableDeclaration(\n path,\n name => state.addHelper(name),\n arrayLikeIsIterable,\n iterableIsArray,\n objectRestNoSymbols,\n useBuiltIns,\n );\n },\n },\n };\n});\n","import { types as t } from \"@babel/core\";\nimport type { File, Scope } from \"@babel/core\";\nimport { buildObjectExcludingKeys } from \"@babel/plugin-transform-destructuring\";\nconst {\n assignmentExpression,\n binaryExpression,\n conditionalExpression,\n cloneNode,\n isObjectProperty,\n isPrivateName,\n memberExpression,\n numericLiteral,\n objectPattern,\n restElement,\n variableDeclarator,\n variableDeclaration,\n unaryExpression,\n} = t;\n\nfunction buildUndefinedNode() {\n return unaryExpression(\"void\", numericLiteral(0));\n}\n\nfunction transformAssignmentPattern(\n initializer: t.Expression,\n tempId: t.Identifier,\n) {\n return conditionalExpression(\n binaryExpression(\"===\", cloneNode(tempId), buildUndefinedNode()),\n initializer,\n cloneNode(tempId),\n );\n}\n\nfunction initRestExcludingKeys(pattern: t.LVal): ExcludingKey[] | null {\n if (pattern.type === \"ObjectPattern\") {\n const { properties } = pattern;\n if (properties[properties.length - 1].type === \"RestElement\") {\n return [];\n }\n }\n return null;\n}\n\n/**\n * grow `excludingKeys` from given properties. This routine mutates properties by\n * memoising the computed non-static keys.\n *\n * @param {ExcludingKey[]} excludingKeys\n * @param {t.ObjectProperty[]} properties An array of object properties that should be excluded by rest element transform\n * @param {Scope} scope Where should we register the memoised id\n */\nfunction growRestExcludingKeys(\n excludingKeys: ExcludingKey[],\n properties: t.ObjectProperty[],\n scope: Scope,\n) {\n if (excludingKeys === null) return;\n for (const property of properties) {\n const propertyKey = property.key;\n if (property.computed && !scope.isStatic(propertyKey)) {\n const tempId = scope.generateDeclaredUidIdentifier(\"m\");\n // @ts-expect-error A computed property key must not be a private name\n property.key = assignmentExpression(\"=\", tempId, propertyKey);\n excludingKeys.push({ key: tempId, computed: true });\n } else if (propertyKey.type !== \"PrivateName\") {\n excludingKeys.push(property);\n }\n }\n}\n\n/**\n * Prepare var declarations for params. Only param initializers\n * will be transformed to undefined coalescing, other features are preserved.\n * This function does NOT mutate given AST structures.\n *\n * @export\n * @param {Function[\"params\"]} params An array of function params\n * @param {Scope} scope A scope used to generate uid for function params\n * @returns {{ params: Identifier[]; variableDeclaration: VariableDeclaration }} An array of new id for params\n * and variable declaration to be prepended to the function body\n */\nexport function buildVariableDeclarationFromParams(\n params: t.Function[\"params\"],\n scope: Scope,\n): {\n params: (t.Identifier | t.RestElement)[];\n variableDeclaration: t.VariableDeclaration;\n} {\n const { elements, transformed } = buildAssignmentsFromPatternList(\n params,\n scope,\n /* isAssignment */ false,\n );\n return {\n params: elements,\n variableDeclaration: variableDeclaration(\n \"var\",\n transformed.map(({ left, right }) => variableDeclarator(left, right)),\n ),\n };\n}\n\ninterface Transformed {\n left: Exclude;\n right: t.Expression;\n}\n\nfunction buildAssignmentsFromPatternList(\n elements: (t.LVal | null)[],\n scope: Scope,\n isAssignment: boolean,\n): {\n elements: (t.Identifier | t.RestElement | null)[];\n transformed: Transformed[];\n} {\n const newElements: (t.Identifier | t.RestElement)[] = [],\n transformed: Transformed[] = [];\n for (let element of elements) {\n if (element === null) {\n newElements.push(null);\n transformed.push(null);\n continue;\n }\n const tempId = scope.generateUidIdentifier(\"p\");\n if (isAssignment) {\n scope.push({ id: cloneNode(tempId) });\n }\n if (element.type === \"RestElement\") {\n newElements.push(restElement(tempId));\n // The argument of a RestElement within a BindingPattern must be either Identifier or BindingPattern\n element = element.argument as t.Identifier | t.Pattern;\n } else {\n newElements.push(tempId);\n }\n if (element.type === \"AssignmentPattern\") {\n transformed.push({\n left: element.left,\n right: transformAssignmentPattern(element.right, tempId),\n });\n } else {\n transformed.push({\n left: element as Transformed[\"left\"],\n right: cloneNode(tempId),\n });\n }\n }\n return { elements: newElements, transformed };\n}\n\ntype StackItem = {\n node: t.AssignmentExpression[\"left\"] | t.ObjectProperty | null;\n index: number;\n depth: number;\n};\n\n/**\n * A DFS simplified pattern traverser. It skips computed property keys and assignment pattern\n * initializers. The following nodes will be delegated to the visitor:\n * - ArrayPattern\n * - ArrayPattern elements\n * - AssignmentPattern\n * - ObjectPattern\n * - ObjectProperty\n * - RestElement\n * @param root\n * @param visitor\n */\nexport function* traversePattern(\n root: t.AssignmentExpression[\"left\"],\n visitor: (\n node: t.AssignmentExpression[\"left\"] | t.ObjectProperty,\n index: number,\n depth: number,\n ) => Generator,\n) {\n const stack: StackItem[] = [];\n stack.push({ node: root, index: 0, depth: 0 });\n let item: StackItem;\n while ((item = stack.pop()) !== undefined) {\n const { node, index } = item;\n if (node === null) continue;\n yield* visitor(node, index, item.depth);\n const depth = item.depth + 1;\n switch (node.type) {\n case \"AssignmentPattern\":\n stack.push({ node: node.left, index: 0, depth });\n break;\n case \"ObjectProperty\":\n // inherit the depth and index as an object property can not be an LHS without object pattern\n stack.push({ node: node.value as t.LVal, index, depth: item.depth });\n break;\n case \"RestElement\":\n stack.push({ node: node.argument, index: 0, depth });\n break;\n case \"ObjectPattern\":\n for (let list = node.properties, i = list.length - 1; i >= 0; i--) {\n stack.push({ node: list[i], index: i, depth });\n }\n break;\n case \"ArrayPattern\":\n for (let list = node.elements, i = list.length - 1; i >= 0; i--) {\n stack.push({ node: list[i], index: i, depth });\n }\n break;\n case \"TSParameterProperty\":\n case \"TSAsExpression\":\n case \"TSTypeAssertion\":\n case \"TSNonNullExpression\":\n throw new Error(\n `TypeScript features must first be transformed by ` +\n `@babel/plugin-transform-typescript.\\n` +\n `If you have already enabled that plugin (or '@babel/preset-typescript'), make sure ` +\n `that it runs before @babel/plugin-proposal-destructuring-private.`,\n );\n default:\n break;\n }\n }\n}\n\nexport function hasPrivateKeys(pattern: t.AssignmentExpression[\"left\"]) {\n let result = false;\n traversePattern(pattern, function* (node) {\n if (isObjectProperty(node) && isPrivateName(node.key)) {\n result = true;\n // stop the traversal\n yield;\n }\n }).next();\n return result;\n}\n\nexport function hasPrivateClassElement(node: t.ClassBody): boolean {\n return node.body.some(element =>\n isPrivateName(\n // @ts-expect-error: for those class element without `key`, they must\n // not be a private element\n element.key,\n ),\n );\n}\n\n/**\n * Traverse the given pattern and report the private key path.\n * A private key path is analogous to an array of `key` from the pattern NodePath\n * to the private key NodePath. See also test/util.skip-bundled.js for an example output\n *\n * @export\n * @param {t.LVal} pattern\n */\nexport function* privateKeyPathIterator(pattern: t.LVal) {\n const indexPath: number[] = [];\n yield* traversePattern(pattern, function* (node, index, depth) {\n indexPath[depth] = index;\n if (isObjectProperty(node) && isPrivateName(node.key)) {\n // The indexPath[0, depth] contains the path from root pattern to the object property\n // with private key. The indexPath may have more than depth + 1 elements because we\n // don't shrink the indexPath when the traverser returns to parent nodes.\n yield indexPath.slice(1, depth + 1);\n }\n });\n}\n\ntype LHS = Exclude;\n\ntype ExcludingKey = {\n key: t.ObjectProperty[\"key\"];\n computed: t.ObjectProperty[\"computed\"];\n};\ntype Item = {\n left: LHS;\n right: t.Expression;\n restExcludingKeys?: ExcludingKey[] | null;\n};\n\nfunction rightWillBeReferencedOnce(left: LHS) {\n switch (left.type) {\n // Skip memoising the right when left is an identifier or\n // an array pattern\n case \"Identifier\":\n case \"ArrayPattern\":\n return true;\n case \"ObjectPattern\":\n return left.properties.length === 1;\n default:\n return false;\n }\n}\n/**\n * Transform private destructuring. It returns a generator\n * which yields a pair of transformed LHS and RHS, which can form VariableDeclaration or\n * AssignmentExpression later.\n *\n * @export\n * @param {LHS} left The root pattern\n * @param {t.Expression} right The initializer or the RHS of pattern\n * @param {Scope} scope The scope where memoized id should be registered\n * @param {boolean} isAssignment Whether we are transforming from an AssignmentExpression of VariableDeclaration\n * @returns {Generator}\n */\nexport function* transformPrivateKeyDestructuring(\n left: LHS,\n right: t.Expression,\n scope: Scope,\n isAssignment: boolean,\n shouldPreserveCompletion: boolean,\n addHelper: File[\"addHelper\"],\n objectRestNoSymbols: boolean,\n useBuiltIns: boolean,\n): Generator {\n const stack: Item[] = [];\n const rootRight = right;\n // The stack holds patterns that we don't known whether they contain private key\n stack.push({\n left,\n right,\n restExcludingKeys: initRestExcludingKeys(left),\n });\n let item: Item;\n while ((item = stack.pop()) !== undefined) {\n const { restExcludingKeys } = item;\n let { left, right } = item;\n const searchPrivateKey = privateKeyPathIterator(left).next();\n if (searchPrivateKey.done) {\n if (restExcludingKeys?.length > 0) {\n // optimize out the rest element because `objectWithoutProperties`\n // returns a new object\n // `{ ...z } = babelHelpers.objectWithoutProperties(m, [\"x\"])`\n // to\n // `z = babelHelpers.objectWithoutProperties(m, [\"x\"])`\n const { properties } = left as t.ObjectPattern;\n if (properties.length === 1) {\n // The argument of an object rest element must be an Identifier\n left = (properties[0] as t.RestElement).argument as t.Identifier;\n }\n yield {\n left: left as t.ObjectPattern,\n right: buildObjectExcludingKeys(\n restExcludingKeys,\n right,\n scope,\n addHelper,\n objectRestNoSymbols,\n useBuiltIns,\n ),\n };\n } else {\n yield {\n left:\n // An assignment pattern will not be pushed to the stack\n left as Transformed[\"left\"],\n right,\n };\n }\n } else {\n // now we need to split according to the indexPath;\n const indexPath = searchPrivateKey.value;\n for (\n let indexPathIndex = 0, index;\n (indexPathIndex < indexPath.length &&\n (index = indexPath[indexPathIndex]) !== undefined) ||\n left.type === \"AssignmentPattern\";\n indexPathIndex++\n ) {\n const isRightSafeToReuse =\n // If we should preserve completion and the right is the rootRight, then the\n // right is NOT safe to reuse because we will insert a new memoising statement\n // in the AssignmentExpression visitor, which causes right to be referenced more\n // than once\n !(shouldPreserveCompletion && right === rootRight) &&\n (rightWillBeReferencedOnce(left) || scope.isStatic(right));\n if (!isRightSafeToReuse) {\n const tempId = scope.generateUidIdentifier(\"m\");\n if (isAssignment) {\n scope.push({ id: cloneNode(tempId) });\n }\n yield { left: tempId, right };\n right = cloneNode(tempId);\n }\n // invariant: at this point right must be a static identifier;\n switch (left.type) {\n case \"ObjectPattern\": {\n const { properties } = left;\n if (index > 0) {\n // properties[0, index) must not contain private keys\n const propertiesSlice = properties.slice(0, index);\n yield {\n left: objectPattern(propertiesSlice),\n right: cloneNode(right),\n };\n }\n if (index < properties.length - 1) {\n // for properties after `index`, push them to stack so we can process them later\n // inherit the restExcludingKeys on the stack if we are at\n // the first level, otherwise initialize a new restExcludingKeys\n const nextRestExcludingKeys =\n indexPathIndex === 0\n ? restExcludingKeys\n : initRestExcludingKeys(left);\n growRestExcludingKeys(\n nextRestExcludingKeys,\n // @ts-expect-error properties[0, index] must not contain rest element\n // because properties[index] contains a private key\n properties.slice(0, index + 1),\n scope,\n );\n stack.push({\n left: objectPattern(properties.slice(index + 1)),\n right: cloneNode(right),\n restExcludingKeys: nextRestExcludingKeys,\n });\n }\n // An object rest element must not contain a private key\n const property = properties[index] as t.ObjectProperty;\n // The value of ObjectProperty under ObjectPattern must be an LHS\n left = property.value as LHS;\n const { key } = property;\n const computed =\n property.computed ||\n // `{ 0: x } = RHS` is transformed to a computed member expression `x = RHS[0]`\n (key.type !== \"Identifier\" && key.type !== \"PrivateName\");\n right = memberExpression(right, key, computed);\n break;\n }\n case \"AssignmentPattern\": {\n right = transformAssignmentPattern(\n left.right,\n right as t.Identifier,\n );\n left = left.left;\n break;\n }\n case \"ArrayPattern\": {\n // todo: the transform here assumes that any expression within\n // the array pattern, when evaluated, do not interfere with the iterable\n // in RHS. Otherwise we have to pause the iterable and interleave\n // the expressions.\n // See also https://gist.github.com/nicolo-ribaudo/f8ac7916f89450f2ead77d99855b2098\n // and ordering/array-pattern-side-effect-iterable test\n const leftElements = left.elements;\n const leftElementsAfterIndex = leftElements.splice(index);\n const { elements, transformed } = buildAssignmentsFromPatternList(\n leftElementsAfterIndex,\n scope,\n isAssignment,\n );\n leftElements.push(...elements);\n yield { left, right: cloneNode(right) };\n // for elements after `index`, push them to stack so we can process them later\n for (let i = transformed.length - 1; i > 0; i--) {\n // skipping array holes\n if (transformed[i] !== null) {\n stack.push(transformed[i]);\n }\n }\n ({ left, right } = transformed[0]);\n break;\n }\n default:\n break;\n }\n }\n stack.push({\n left,\n right,\n restExcludingKeys: initRestExcludingKeys(left),\n });\n }\n }\n}\n","import { types as t } from \"@babel/core\";\nimport type { NodePath, Scope, Visitor } from \"@babel/core\";\n\ntype State = {\n needsOuterBinding: boolean;\n scope: Scope;\n};\n\nexport const iifeVisitor: Visitor = {\n \"ReferencedIdentifier|BindingIdentifier\"(\n path: NodePath,\n state,\n ) {\n const { scope, node } = path;\n const { name } = node;\n\n if (\n name === \"eval\" ||\n (scope.getBinding(name) === state.scope.parent.getBinding(name) &&\n state.scope.hasOwnBinding(name))\n ) {\n state.needsOuterBinding = true;\n path.stop();\n }\n },\n // type annotations don't use or introduce \"real\" bindings\n \"TypeAnnotation|TSTypeAnnotation|TypeParameterDeclaration|TSTypeParameterDeclaration\":\n (path: NodePath) => path.skip(),\n};\n\nexport function collectShadowedParamsNames(\n param: NodePath,\n functionScope: Scope,\n shadowedParams: Set,\n) {\n for (const name of Object.keys(param.getBindingIdentifiers())) {\n const constantViolations = functionScope.bindings[name]?.constantViolations;\n if (constantViolations) {\n for (const redeclarator of constantViolations) {\n const node = redeclarator.node;\n // If a constant violation is a var or a function declaration,\n // we first check to see if it's a var without an init.\n // If so, we remove that declarator.\n // Otherwise, we have to wrap it in an IIFE.\n switch (node.type) {\n case \"VariableDeclarator\": {\n if (node.init === null) {\n const declaration = redeclarator.parentPath;\n // The following uninitialized var declarators should not be removed\n // for (var x in {})\n // for (var x;;)\n if (\n !declaration.parentPath.isFor() ||\n declaration.parentPath.get(\"body\") === declaration\n ) {\n redeclarator.remove();\n break;\n }\n }\n\n shadowedParams.add(name);\n break;\n }\n case \"FunctionDeclaration\":\n shadowedParams.add(name);\n break;\n }\n }\n }\n }\n}\n\nexport function buildScopeIIFE(\n shadowedParams: Set,\n body: t.BlockStatement,\n) {\n const args = [];\n const params = [];\n\n for (const name of shadowedParams) {\n // We create them twice; the other option is to use t.cloneNode\n args.push(t.identifier(name));\n params.push(t.identifier(name));\n }\n\n return t.returnStatement(\n t.callExpression(t.arrowFunctionExpression(params, body), args),\n );\n}\n","import { template, types as t, type NodePath } from \"@babel/core\";\n\nimport {\n iifeVisitor,\n collectShadowedParamsNames,\n buildScopeIIFE,\n} from \"./shadow-utils.ts\";\n\nconst buildDefaultParam = template.statement(`\n let VARIABLE_NAME =\n arguments.length > ARGUMENT_KEY && arguments[ARGUMENT_KEY] !== undefined ?\n arguments[ARGUMENT_KEY]\n :\n DEFAULT_VALUE;\n`);\n\nconst buildLooseDefaultParam = template.statement(`\n if (ASSIGNMENT_IDENTIFIER === UNDEFINED) {\n ASSIGNMENT_IDENTIFIER = DEFAULT_VALUE;\n }\n`);\n\nconst buildLooseDestructuredDefaultParam = template.statement(`\n let ASSIGNMENT_IDENTIFIER = PARAMETER_NAME === UNDEFINED ? DEFAULT_VALUE : PARAMETER_NAME ;\n`);\n\nconst buildSafeArgumentsAccess = template.statement(`\n let $0 = arguments.length > $1 ? arguments[$1] : undefined;\n`);\n\n// last 2 parameters are optional -- they are used by transform-object-rest-spread/src/index.js\nexport default function convertFunctionParams(\n path: NodePath,\n ignoreFunctionLength: boolean | void,\n shouldTransformParam?: (index: number) => boolean,\n replaceRestElement?: (\n path: NodePath,\n paramPath: NodePath,\n transformedRestNodes: t.Statement[],\n ) => void,\n) {\n const params = path.get(\"params\");\n\n const isSimpleParameterList = params.every(param => param.isIdentifier());\n if (isSimpleParameterList) return false;\n\n const { node, scope } = path;\n\n const body = [];\n const shadowedParams = new Set();\n\n for (const param of params) {\n collectShadowedParamsNames(param, scope, shadowedParams);\n }\n\n const state = {\n needsOuterBinding: false,\n scope,\n };\n if (shadowedParams.size === 0) {\n for (const param of params) {\n if (!param.isIdentifier()) param.traverse(iifeVisitor, state);\n if (state.needsOuterBinding) break;\n }\n }\n\n let firstOptionalIndex = null;\n\n for (let i = 0; i < params.length; i++) {\n const param = params[i];\n\n if (shouldTransformParam && !shouldTransformParam(i)) {\n continue;\n }\n const transformedRestNodes: t.Statement[] = [];\n if (replaceRestElement) {\n replaceRestElement(path, param, transformedRestNodes);\n }\n\n const paramIsAssignmentPattern = param.isAssignmentPattern();\n if (\n paramIsAssignmentPattern &&\n (ignoreFunctionLength || t.isMethod(node, { kind: \"set\" }))\n ) {\n const left = param.get(\"left\");\n const right = param.get(\"right\");\n\n const undefinedNode = scope.buildUndefinedNode();\n\n if (left.isIdentifier()) {\n body.push(\n buildLooseDefaultParam({\n ASSIGNMENT_IDENTIFIER: t.cloneNode(left.node),\n DEFAULT_VALUE: right.node,\n UNDEFINED: undefinedNode,\n }),\n );\n param.replaceWith(left.node);\n } else if (left.isObjectPattern() || left.isArrayPattern()) {\n const paramName = scope.generateUidIdentifier();\n body.push(\n buildLooseDestructuredDefaultParam({\n ASSIGNMENT_IDENTIFIER: left.node,\n DEFAULT_VALUE: right.node,\n PARAMETER_NAME: t.cloneNode(paramName),\n UNDEFINED: undefinedNode,\n }),\n );\n param.replaceWith(paramName);\n }\n } else if (paramIsAssignmentPattern) {\n if (firstOptionalIndex === null) firstOptionalIndex = i;\n\n const left = param.get(\"left\");\n const right = param.get(\"right\");\n\n const defNode = buildDefaultParam({\n VARIABLE_NAME: left.node,\n DEFAULT_VALUE: right.node,\n ARGUMENT_KEY: t.numericLiteral(i),\n });\n body.push(defNode);\n } else if (firstOptionalIndex !== null) {\n const defNode = buildSafeArgumentsAccess([\n param.node,\n t.numericLiteral(i),\n ]);\n body.push(defNode);\n } else if (param.isObjectPattern() || param.isArrayPattern()) {\n const uid = path.scope.generateUidIdentifier(\"ref\");\n uid.typeAnnotation = param.node.typeAnnotation;\n\n const defNode = t.variableDeclaration(\"let\", [\n t.variableDeclarator(param.node, uid),\n ]);\n body.push(defNode);\n\n param.replaceWith(t.cloneNode(uid));\n }\n\n if (transformedRestNodes) {\n for (const transformedNode of transformedRestNodes) {\n body.push(transformedNode);\n }\n }\n }\n\n // we need to cut off all trailing parameters\n if (firstOptionalIndex !== null) {\n node.params = node.params.slice(0, firstOptionalIndex);\n }\n\n // ensure it's a block, useful for arrow functions\n path.ensureBlock();\n const path2 = path as NodePath;\n\n const { async, generator } = node;\n if (generator || state.needsOuterBinding || shadowedParams.size > 0) {\n body.push(buildScopeIIFE(shadowedParams, path2.node.body));\n\n path.set(\"body\", t.blockStatement(body as t.Statement[]));\n\n // We inject an arrow and then transform it to a normal function, to be\n // sure that we correctly handle this and arguments.\n const bodyPath = path2.get(\"body.body\");\n const arrowPath = bodyPath[bodyPath.length - 1].get(\n \"argument.callee\",\n ) as NodePath;\n\n // This is an IIFE, so we don't need to worry about the noNewArrows assumption\n arrowPath.arrowFunctionToExpression();\n\n arrowPath.node.generator = generator;\n arrowPath.node.async = async;\n\n node.generator = false;\n node.async = false;\n if (async) {\n // If the default value of a parameter throws, it must reject asynchronously.\n path2.node.body = template.statement.ast`{\n try {\n ${path2.node.body.body}\n } catch (e) {\n return Promise.reject(e);\n }\n }` as t.BlockStatement;\n }\n } else {\n path2.get(\"body\").unshiftContainer(\"body\", body);\n }\n\n return true;\n}\n","import { template, types as t } from \"@babel/core\";\nimport type { NodePath, Visitor } from \"@babel/core\";\n\nimport {\n iifeVisitor,\n collectShadowedParamsNames,\n buildScopeIIFE,\n} from \"./shadow-utils.ts\";\n\nconst buildRest = template.statement(`\n for (var LEN = ARGUMENTS.length,\n ARRAY = new Array(ARRAY_LEN),\n KEY = START;\n KEY < LEN;\n KEY++) {\n ARRAY[ARRAY_KEY] = ARGUMENTS[KEY];\n }\n`);\n\nconst restIndex = template.expression(`\n (INDEX < OFFSET || ARGUMENTS.length <= INDEX) ? undefined : ARGUMENTS[INDEX]\n`);\n\nconst restIndexImpure = template.expression(`\n REF = INDEX, (REF < OFFSET || ARGUMENTS.length <= REF) ? undefined : ARGUMENTS[REF]\n`);\n\nconst restLength = template.expression(`\n ARGUMENTS.length <= OFFSET ? 0 : ARGUMENTS.length - OFFSET\n`);\n\nfunction referencesRest(\n path: NodePath,\n state: State,\n) {\n if (path.node.name === state.name) {\n // Check rest parameter is not shadowed by a binding in another scope.\n return path.scope.bindingIdentifierEquals(state.name, state.outerBinding);\n }\n\n return false;\n}\n\ntype Candidate = {\n cause: \"argSpread\" | \"indexGetter\" | \"lengthGetter\";\n path: NodePath;\n};\n\ntype State = {\n references: NodePath[];\n offset: number;\n\n argumentsNode: t.Identifier;\n outerBinding: t.Identifier;\n\n // candidate member expressions we could optimise if there are no other references\n candidates: Candidate[];\n\n // local rest binding name\n name: string;\n\n /*\n It may be possible to optimize the output code in certain ways, such as\n not generating code to initialize an array (perhaps substituting direct\n references to arguments[i] or arguments.length for reads of the\n corresponding rest parameter property) or positioning the initialization\n code so that it may not have to execute depending on runtime conditions.\n\n This property tracks eligibility for optimization. \"deopted\" means give up\n and don't perform optimization. For example, when any of rest's elements /\n properties is assigned to at the top level, or referenced at all in a\n nested function.\n */\n deopted: boolean;\n noOptimise?: boolean;\n};\n\nconst memberExpressionOptimisationVisitor: Visitor = {\n Scope(path, state) {\n // check if this scope has a local binding that will shadow the rest parameter\n if (!path.scope.bindingIdentifierEquals(state.name, state.outerBinding)) {\n path.skip();\n }\n },\n\n Flow(path: NodePath) {\n // Do not skip TypeCastExpressions as the contain valid non flow code\n if (path.isTypeCastExpression()) return;\n // don't touch reference in type annotations\n path.skip();\n },\n\n Function(path, state) {\n // Detect whether any reference to rest is contained in nested functions to\n // determine if deopt is necessary.\n const oldNoOptimise = state.noOptimise;\n state.noOptimise = true;\n path.traverse(memberExpressionOptimisationVisitor, state);\n state.noOptimise = oldNoOptimise;\n\n // Skip because optimizing references to rest would refer to the `arguments`\n // of the nested function.\n path.skip();\n },\n\n ReferencedIdentifier(path, state) {\n const { node } = path;\n\n // we can't guarantee the purity of arguments\n if (node.name === \"arguments\") {\n state.deopted = true;\n }\n\n // is this a referenced identifier and is it referencing the rest parameter?\n if (!referencesRest(path, state)) return;\n\n if (state.noOptimise) {\n state.deopted = true;\n } else {\n const { parentPath } = path;\n\n // Is this identifier the right hand side of a default parameter?\n if (\n parentPath.listKey === \"params\" &&\n (parentPath.key as number) < state.offset\n ) {\n return;\n }\n\n // ex: `args[0]`\n // ex: `args.whatever`\n if (parentPath.isMemberExpression({ object: node })) {\n const grandparentPath = parentPath.parentPath;\n\n const argsOptEligible =\n !state.deopted &&\n !(\n // ex: `args[0] = \"whatever\"`\n (\n (grandparentPath.isAssignmentExpression() &&\n parentPath.node === grandparentPath.node.left) ||\n // ex: `[args[0]] = [\"whatever\"]`\n grandparentPath.isLVal() ||\n // ex: `for (rest[0] in this)`\n // ex: `for (rest[0] of this)`\n grandparentPath.isForXStatement() ||\n // ex: `++args[0]`\n // ex: `args[0]--`\n grandparentPath.isUpdateExpression() ||\n // ex: `delete args[0]`\n grandparentPath.isUnaryExpression({ operator: \"delete\" }) ||\n // ex: `args[0]()`\n // ex: `new args[0]()`\n // ex: `new args[0]`\n ((grandparentPath.isCallExpression() ||\n grandparentPath.isNewExpression()) &&\n parentPath.node === grandparentPath.node.callee)\n )\n );\n\n if (argsOptEligible) {\n if (parentPath.node.computed) {\n // if we know that this member expression is referencing a number then\n // we can safely optimise it\n if (parentPath.get(\"property\").isBaseType(\"number\")) {\n state.candidates.push({ cause: \"indexGetter\", path });\n return;\n }\n } else if (\n // @ts-expect-error .length must not be a private name\n parentPath.node.property.name === \"length\"\n ) {\n // args.length\n state.candidates.push({ cause: \"lengthGetter\", path });\n return;\n }\n }\n }\n\n // we can only do these optimizations if the rest variable would match\n // the arguments exactly\n // optimise single spread args in calls\n // ex: fn(...args)\n if (state.offset === 0 && parentPath.isSpreadElement()) {\n const call = parentPath.parentPath;\n if (call.isCallExpression() && call.node.arguments.length === 1) {\n state.candidates.push({ cause: \"argSpread\", path });\n return;\n }\n }\n\n state.references.push(path);\n }\n },\n\n /**\n * Deopt on use of a binding identifier with the same name as our rest param.\n *\n * See https://github.com/babel/babel/issues/2091\n */\n\n BindingIdentifier(path, state) {\n if (referencesRest(path, state)) {\n state.deopted = true;\n }\n },\n};\n\nfunction getParamsCount(node: t.Function) {\n let count = node.params.length;\n // skip the first parameter if it is a TypeScript 'this parameter'\n if (count > 0 && t.isIdentifier(node.params[0], { name: \"this\" })) {\n count -= 1;\n }\n return count;\n}\n\nfunction hasRest(node: t.Function) {\n const length = node.params.length;\n return length > 0 && t.isRestElement(node.params[length - 1]);\n}\n\nfunction optimiseIndexGetter(\n path: NodePath,\n argsId: t.Identifier,\n offset: number,\n) {\n const offsetLiteral = t.numericLiteral(offset);\n let index;\n const parent = path.parent as t.MemberExpression;\n\n if (t.isNumericLiteral(parent.property)) {\n index = t.numericLiteral(parent.property.value + offset);\n } else if (offset === 0) {\n // Avoid unnecessary '+ 0'\n index = parent.property;\n } else {\n index = t.binaryExpression(\n \"+\",\n parent.property,\n t.cloneNode(offsetLiteral),\n );\n }\n\n const { scope, parentPath } = path;\n if (!scope.isPure(index)) {\n const temp = scope.generateUidIdentifierBasedOnNode(index);\n scope.push({ id: temp, kind: \"var\" });\n parentPath.replaceWith(\n restIndexImpure({\n ARGUMENTS: argsId,\n OFFSET: offsetLiteral,\n INDEX: index,\n REF: t.cloneNode(temp),\n }),\n );\n } else {\n parentPath.replaceWith(\n restIndex({\n ARGUMENTS: argsId,\n OFFSET: offsetLiteral,\n INDEX: index,\n }),\n );\n const replacedParentPath = parentPath as NodePath;\n\n // See if we can statically evaluate the first test (i.e. index < offset)\n // and optimize the AST accordingly.\n const offsetTestPath = replacedParentPath.get(\n \"test\",\n ) as NodePath;\n const valRes = offsetTestPath.get(\"left\").evaluate();\n if (valRes.confident) {\n if (valRes.value === true) {\n replacedParentPath.replaceWith(scope.buildUndefinedNode());\n } else {\n offsetTestPath.replaceWith(offsetTestPath.get(\"right\"));\n }\n }\n }\n}\n\nfunction optimiseLengthGetter(\n path: NodePath,\n argsId: t.Identifier,\n offset: number,\n) {\n if (offset) {\n path.parentPath.replaceWith(\n restLength({\n ARGUMENTS: argsId,\n OFFSET: t.numericLiteral(offset),\n }),\n );\n } else {\n path.replaceWith(argsId);\n }\n}\n\nexport default function convertFunctionRest(path: NodePath) {\n const { node, scope } = path;\n if (!hasRest(node)) return false;\n\n const restPath = path.get(\n `params.${node.params.length - 1}.argument`,\n ) as NodePath;\n\n if (!restPath.isIdentifier()) {\n const shadowedParams = new Set();\n collectShadowedParamsNames(restPath, path.scope, shadowedParams);\n\n let needsIIFE = shadowedParams.size > 0;\n if (!needsIIFE) {\n const state = {\n needsOuterBinding: false,\n scope,\n };\n restPath.traverse(iifeVisitor, state);\n needsIIFE = state.needsOuterBinding;\n }\n\n if (needsIIFE) {\n path.ensureBlock();\n path.set(\n \"body\",\n t.blockStatement([\n buildScopeIIFE(shadowedParams, path.node.body as t.BlockStatement),\n ]),\n );\n }\n }\n\n let rest = restPath.node;\n node.params.pop(); // This returns 'rest'\n\n if (t.isPattern(rest)) {\n const pattern = rest;\n rest = scope.generateUidIdentifier(\"ref\");\n\n const declar = t.variableDeclaration(\"let\", [\n t.variableDeclarator(pattern, rest),\n ]);\n path.ensureBlock();\n (node.body as t.BlockStatement).body.unshift(declar);\n } else if (rest.name === \"arguments\") {\n scope.rename(rest.name);\n }\n\n const argsId = t.identifier(\"arguments\");\n const paramsCount = getParamsCount(node);\n\n // check and optimise for extremely common cases\n const state: State = {\n references: [],\n offset: paramsCount,\n argumentsNode: argsId,\n outerBinding: scope.getBindingIdentifier(rest.name),\n candidates: [],\n name: rest.name,\n deopted: false,\n };\n\n path.traverse(memberExpressionOptimisationVisitor, state);\n\n // There are only \"shorthand\" references\n if (!state.deopted && !state.references.length) {\n for (const { path, cause } of state.candidates) {\n const clonedArgsId = t.cloneNode(argsId);\n switch (cause) {\n case \"indexGetter\":\n optimiseIndexGetter(path, clonedArgsId, state.offset);\n break;\n case \"lengthGetter\":\n optimiseLengthGetter(path, clonedArgsId, state.offset);\n break;\n default:\n path.replaceWith(clonedArgsId);\n }\n }\n return true;\n }\n\n state.references.push(...state.candidates.map(({ path }) => path));\n\n const start = t.numericLiteral(paramsCount);\n const key = scope.generateUidIdentifier(\"key\");\n const len = scope.generateUidIdentifier(\"len\");\n\n let arrKey, arrLen;\n if (paramsCount) {\n // this method has additional params, so we need to subtract\n // the index of the current argument position from the\n // position in the array that we want to populate\n arrKey = t.binaryExpression(\"-\", t.cloneNode(key), t.cloneNode(start));\n\n // we need to work out the size of the array that we're\n // going to store all the rest parameters\n //\n // we need to add a check to avoid constructing the array\n // with <0 if there are less arguments than params as it'll\n // cause an error\n arrLen = t.conditionalExpression(\n t.binaryExpression(\">\", t.cloneNode(len), t.cloneNode(start)),\n t.binaryExpression(\"-\", t.cloneNode(len), t.cloneNode(start)),\n t.numericLiteral(0),\n );\n } else {\n arrKey = t.identifier(key.name);\n arrLen = t.identifier(len.name);\n }\n\n const loop = buildRest({\n ARGUMENTS: argsId,\n ARRAY_KEY: arrKey,\n ARRAY_LEN: arrLen,\n START: start,\n ARRAY: rest,\n KEY: key,\n LEN: len,\n });\n\n if (state.deopted) {\n (node.body as t.BlockStatement).body.unshift(loop);\n } else {\n let target = path\n .getEarliestCommonAncestorFrom(state.references)\n .getStatementParent();\n\n // don't perform the allocation inside a loop\n target.findParent(path => {\n if (path.isLoop()) {\n target = path;\n } else {\n // Stop crawling up if this is a function.\n return path.isFunction();\n }\n });\n\n target.insertBefore(loop);\n }\n\n return true;\n}\n","import { declare } from \"@babel/helper-plugin-utils\";\nimport convertFunctionParams from \"./params.ts\";\nimport convertFunctionRest from \"./rest.ts\";\nexport { convertFunctionParams };\n\nexport interface Options {\n loose?: boolean;\n}\n\nexport default declare((api, options: Options) => {\n api.assertVersion(REQUIRED_VERSION(7));\n\n const ignoreFunctionLength =\n api.assumption(\"ignoreFunctionLength\") ?? options.loose;\n // Todo(BABEL 8): Consider default it to false\n const noNewArrows = api.assumption(\"noNewArrows\") ?? true;\n\n return {\n name: \"transform-parameters\",\n\n visitor: {\n Function(path) {\n if (\n path.isArrowFunctionExpression() &&\n path\n .get(\"params\")\n .some(param => param.isRestElement() || param.isAssignmentPattern())\n ) {\n // default/rest visitors require access to `arguments`, so it cannot be an arrow\n path.arrowFunctionToExpression({\n allowInsertArrowWithRest: false,\n noNewArrows,\n });\n\n // In some cases arrowFunctionToExpression replaces the function with a wrapper.\n // Return early; the wrapped function will be visited later in the AST traversal.\n if (!path.isFunctionExpression()) return;\n }\n\n const convertedRest = convertFunctionRest(path);\n const convertedParams = convertFunctionParams(\n path,\n ignoreFunctionLength,\n );\n\n if (convertedRest || convertedParams) {\n // Manually reprocess this scope to ensure that the moved params are updated.\n path.scope.crawl();\n }\n },\n },\n };\n});\n","import { declare } from \"@babel/helper-plugin-utils\";\nimport syntaxDestructuringPrivate from \"@babel/plugin-syntax-destructuring-private\";\nimport {\n hasPrivateKeys,\n hasPrivateClassElement,\n transformPrivateKeyDestructuring,\n buildVariableDeclarationFromParams,\n} from \"./util.ts\";\nimport { convertFunctionParams } from \"@babel/plugin-transform-parameters\";\nimport { unshiftForXStatementBody } from \"@babel/plugin-transform-destructuring\";\n\nimport type { PluginPass, NodePath, Visitor, types as t } from \"@babel/core\";\n\nexport default declare(function ({ assertVersion, assumption, types: t }) {\n assertVersion(REQUIRED_VERSION(\"^7.17.0\"));\n const {\n assignmentExpression,\n assignmentPattern,\n cloneNode,\n expressionStatement,\n isExpressionStatement,\n isIdentifier,\n isSequenceExpression,\n sequenceExpression,\n variableDeclaration,\n variableDeclarator,\n } = t;\n\n const ignoreFunctionLength = assumption(\"ignoreFunctionLength\");\n const objectRestNoSymbols = assumption(\"objectRestNoSymbols\");\n\n const privateKeyDestructuringVisitor: Visitor = {\n Function(path) {\n // (b, { #x: x } = I) => body\n // transforms to:\n // (b, p1) => { var { #x: x } = p1 === undefined ? I : p1; body; }\n const firstPrivateIndex = path.node.params.findIndex(param =>\n hasPrivateKeys(param),\n );\n if (firstPrivateIndex === -1) return;\n // wrap function body within IIFE if any param is shadowed\n convertFunctionParams(path, ignoreFunctionLength, () => false);\n // invariant: path.body is always a BlockStatement after `convertFunctionParams`\n const { node, scope } = path;\n const { params } = node;\n const firstAssignmentPatternIndex = ignoreFunctionLength\n ? -1\n : params.findIndex(param => param.type === \"AssignmentPattern\");\n const paramsAfterIndex = params.splice(firstPrivateIndex);\n const { params: transformedParams, variableDeclaration } =\n buildVariableDeclarationFromParams(paramsAfterIndex, scope);\n\n (path.get(\"body\") as NodePath).unshiftContainer(\n \"body\",\n variableDeclaration,\n );\n params.push(...transformedParams);\n // preserve function.length\n // (b, p1) => {}\n // transforms to\n // (b, p1 = void 0) => {}\n if (firstAssignmentPatternIndex >= firstPrivateIndex) {\n params[firstAssignmentPatternIndex] = assignmentPattern(\n // @ts-expect-error The transformed assignment pattern must not be a RestElement\n params[firstAssignmentPatternIndex],\n scope.buildUndefinedNode(),\n );\n }\n scope.crawl();\n // the pattern will be handled by VariableDeclaration visitor.\n },\n CatchClause(path) {\n // catch({ #x: x }) { body }\n // transforms to:\n // catch(_e) { var {#x: x } = _e; body }\n const { node, scope } = path;\n if (!hasPrivateKeys(node.param)) return;\n // todo: handle shadowed param as we did in convertFunctionParams\n const ref = scope.generateUidIdentifier(\"e\");\n path\n .get(\"body\")\n .unshiftContainer(\n \"body\",\n variableDeclaration(\"let\", [variableDeclarator(node.param, ref)]),\n );\n node.param = cloneNode(ref);\n scope.crawl();\n // the pattern will be handled by VariableDeclaration visitor.\n },\n ForXStatement(path) {\n const { node, scope } = path;\n const leftPath = path.get(\"left\");\n if (leftPath.isVariableDeclaration()) {\n const left = leftPath.node;\n if (!hasPrivateKeys(left.declarations[0].id)) return;\n // for (const { #x: x } of cls) body;\n // transforms to:\n // for (const ref of cls) { const { #x: x } = ref; body; }\n // todo: the transform here assumes that any expression within\n // the destructuring pattern (`{ #x: x }`), when evaluated, do not interfere\n // with the iterator of cls. Otherwise we have to pause the iterator and\n // interleave the expressions.\n // See also https://gist.github.com/nicolo-ribaudo/f8ac7916f89450f2ead77d99855b2098\n const temp = scope.generateUidIdentifier(\"ref\");\n node.left = variableDeclaration(left.kind, [\n variableDeclarator(temp, null),\n ]);\n left.declarations[0].init = cloneNode(temp);\n unshiftForXStatementBody(path, [left]);\n scope.crawl();\n // the pattern will be handled by VariableDeclaration visitor.\n } else if (leftPath.isPattern()) {\n if (!hasPrivateKeys(leftPath.node)) return;\n // for ({ #x: x } of cls);\n // transforms to:\n // for (const ref of cls) { ({ #x: x } = ref); body; }\n // This transform assumes that any expression within the pattern\n // does not interfere with the iterable `cls`.\n const temp = scope.generateUidIdentifier(\"ref\");\n node.left = variableDeclaration(\"const\", [\n variableDeclarator(temp, null),\n ]);\n const assignExpr = expressionStatement(\n assignmentExpression(\"=\", leftPath.node, cloneNode(temp)),\n );\n unshiftForXStatementBody(path, [assignExpr]);\n scope.crawl();\n }\n },\n VariableDeclaration(path, state) {\n const { scope, node } = path;\n const { declarations } = node;\n if (!declarations.some(declarator => hasPrivateKeys(declarator.id))) {\n return;\n }\n const newDeclarations = [];\n for (const declarator of declarations) {\n for (const { left, right } of transformPrivateKeyDestructuring(\n // @ts-expect-error The id of a variable declarator must not be a RestElement\n declarator.id,\n declarator.init,\n scope,\n /* isAssignment */ false,\n /* shouldPreserveCompletion */ false,\n name => state.addHelper(name),\n objectRestNoSymbols,\n /* useBuiltIns */ true,\n )) {\n newDeclarations.push(variableDeclarator(left, right));\n }\n }\n node.declarations = newDeclarations;\n scope.crawl();\n },\n\n AssignmentExpression(path, state) {\n const { node, scope, parent } = path;\n if (!hasPrivateKeys(node.left)) return;\n const assignments = [];\n const shouldPreserveCompletion =\n (!isExpressionStatement(parent) && !isSequenceExpression(parent)) ||\n path.isCompletionRecord();\n for (const { left, right } of transformPrivateKeyDestructuring(\n // @ts-expect-error The left of an assignment expression must not be a RestElement\n node.left,\n node.right,\n scope,\n /* isAssignment */ true,\n shouldPreserveCompletion,\n name => state.addHelper(name),\n objectRestNoSymbols,\n /* useBuiltIns */ true,\n )) {\n assignments.push(assignmentExpression(\"=\", left, right));\n }\n // preserve completion record\n if (shouldPreserveCompletion) {\n const { left, right } = assignments[0];\n // If node.right is right and left is an identifier, then the left is an effectively-constant memoised id\n if (isIdentifier(left) && right === node.right) {\n if (\n !isIdentifier(assignments[assignments.length - 1].right, {\n name: left.name,\n })\n ) {\n // If the last assignment does not end with left, then we push `left` as the completion value\n assignments.push(cloneNode(left));\n }\n // do nothing as `left` is already at the end of assignments\n } else {\n const tempId = scope.generateDeclaredUidIdentifier(\"m\");\n assignments.unshift(\n assignmentExpression(\"=\", tempId, cloneNode(node.right)),\n );\n assignments.push(cloneNode(tempId));\n }\n }\n\n path.replaceWith(sequenceExpression(assignments));\n scope.crawl();\n },\n };\n\n const visitor: Visitor = {\n Class(path, state) {\n if (!hasPrivateClassElement(path.node.body)) return;\n path.traverse(privateKeyDestructuringVisitor, state);\n },\n };\n\n return {\n name: \"proposal-destructuring-private\",\n inherits: syntaxDestructuringPrivate,\n visitor: visitor,\n };\n});\n","import { declare } from \"@babel/helper-plugin-utils\";\nimport syntaxDoExpressions from \"@babel/plugin-syntax-do-expressions\";\n\nexport default declare(api => {\n api.assertVersion(REQUIRED_VERSION(7));\n\n return {\n name: \"proposal-do-expressions\",\n inherits: syntaxDoExpressions,\n\n visitor: {\n DoExpression: {\n exit(path) {\n const { node } = path;\n if (node.async) {\n // Async do expressions are not yet supported\n return;\n }\n const body = node.body.body;\n if (body.length) {\n path.replaceExpressionWithStatements(body);\n } else {\n path.replaceWith(path.scope.buildUndefinedNode());\n }\n },\n },\n },\n };\n});\n","/*! https://mths.be/regenerate v1.4.2 by @mathias | MIT license */\n;(function(root) {\n\n\t// Detect free variables `exports`.\n\tvar freeExports = typeof exports == 'object' && exports;\n\n\t// Detect free variable `module`.\n\tvar freeModule = typeof module == 'object' && module &&\n\t\tmodule.exports == freeExports && module;\n\n\t// Detect free variable `global`, from Node.js/io.js or Browserified code,\n\t// and use it as `root`.\n\tvar freeGlobal = typeof global == 'object' && global;\n\tif (freeGlobal.global === freeGlobal || freeGlobal.window === freeGlobal) {\n\t\troot = freeGlobal;\n\t}\n\n\t/*--------------------------------------------------------------------------*/\n\n\tvar ERRORS = {\n\t\t'rangeOrder': 'A range\\u2019s `stop` value must be greater than or equal ' +\n\t\t\t'to the `start` value.',\n\t\t'codePointRange': 'Invalid code point value. Code points range from ' +\n\t\t\t'U+000000 to U+10FFFF.'\n\t};\n\n\t// https://mathiasbynens.be/notes/javascript-encoding#surrogate-pairs\n\tvar HIGH_SURROGATE_MIN = 0xD800;\n\tvar HIGH_SURROGATE_MAX = 0xDBFF;\n\tvar LOW_SURROGATE_MIN = 0xDC00;\n\tvar LOW_SURROGATE_MAX = 0xDFFF;\n\n\t// In Regenerate output, `\\0` is never preceded by `\\` because we sort by\n\t// code point value, so let’s keep this regular expression simple.\n\tvar regexNull = /\\\\x00([^0123456789]|$)/g;\n\n\tvar object = {};\n\tvar hasOwnProperty = object.hasOwnProperty;\n\tvar extend = function(destination, source) {\n\t\tvar key;\n\t\tfor (key in source) {\n\t\t\tif (hasOwnProperty.call(source, key)) {\n\t\t\t\tdestination[key] = source[key];\n\t\t\t}\n\t\t}\n\t\treturn destination;\n\t};\n\n\tvar forEach = function(array, callback) {\n\t\tvar index = -1;\n\t\tvar length = array.length;\n\t\twhile (++index < length) {\n\t\t\tcallback(array[index], index);\n\t\t}\n\t};\n\n\tvar toString = object.toString;\n\tvar isArray = function(value) {\n\t\treturn toString.call(value) == '[object Array]';\n\t};\n\tvar isNumber = function(value) {\n\t\treturn typeof value == 'number' ||\n\t\t\ttoString.call(value) == '[object Number]';\n\t};\n\n\t// This assumes that `number` is a positive integer that `toString()`s nicely\n\t// (which is the case for all code point values).\n\tvar zeroes = '0000';\n\tvar pad = function(number, totalCharacters) {\n\t\tvar string = String(number);\n\t\treturn string.length < totalCharacters\n\t\t\t? (zeroes + string).slice(-totalCharacters)\n\t\t\t: string;\n\t};\n\n\tvar hex = function(number) {\n\t\treturn Number(number).toString(16).toUpperCase();\n\t};\n\n\tvar slice = [].slice;\n\n\t/*--------------------------------------------------------------------------*/\n\n\tvar dataFromCodePoints = function(codePoints) {\n\t\tvar index = -1;\n\t\tvar length = codePoints.length;\n\t\tvar max = length - 1;\n\t\tvar result = [];\n\t\tvar isStart = true;\n\t\tvar tmp;\n\t\tvar previous = 0;\n\t\twhile (++index < length) {\n\t\t\ttmp = codePoints[index];\n\t\t\tif (isStart) {\n\t\t\t\tresult.push(tmp);\n\t\t\t\tprevious = tmp;\n\t\t\t\tisStart = false;\n\t\t\t} else {\n\t\t\t\tif (tmp == previous + 1) {\n\t\t\t\t\tif (index != max) {\n\t\t\t\t\t\tprevious = tmp;\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tisStart = true;\n\t\t\t\t\t\tresult.push(tmp + 1);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t// End the previous range and start a new one.\n\t\t\t\t\tresult.push(previous + 1, tmp);\n\t\t\t\t\tprevious = tmp;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (!isStart) {\n\t\t\tresult.push(tmp + 1);\n\t\t}\n\t\treturn result;\n\t};\n\n\tvar dataRemove = function(data, codePoint) {\n\t\t// Iterate over the data per `(start, end)` pair.\n\t\tvar index = 0;\n\t\tvar start;\n\t\tvar end;\n\t\tvar length = data.length;\n\t\twhile (index < length) {\n\t\t\tstart = data[index];\n\t\t\tend = data[index + 1];\n\t\t\tif (codePoint >= start && codePoint < end) {\n\t\t\t\t// Modify this pair.\n\t\t\t\tif (codePoint == start) {\n\t\t\t\t\tif (end == start + 1) {\n\t\t\t\t\t\t// Just remove `start` and `end`.\n\t\t\t\t\t\tdata.splice(index, 2);\n\t\t\t\t\t\treturn data;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// Just replace `start` with a new value.\n\t\t\t\t\t\tdata[index] = codePoint + 1;\n\t\t\t\t\t\treturn data;\n\t\t\t\t\t}\n\t\t\t\t} else if (codePoint == end - 1) {\n\t\t\t\t\t// Just replace `end` with a new value.\n\t\t\t\t\tdata[index + 1] = codePoint;\n\t\t\t\t\treturn data;\n\t\t\t\t} else {\n\t\t\t\t\t// Replace `[start, end]` with `[startA, endA, startB, endB]`.\n\t\t\t\t\tdata.splice(index, 2, start, codePoint, codePoint + 1, end);\n\t\t\t\t\treturn data;\n\t\t\t\t}\n\t\t\t}\n\t\t\tindex += 2;\n\t\t}\n\t\treturn data;\n\t};\n\n\tvar dataRemoveRange = function(data, rangeStart, rangeEnd) {\n\t\tif (rangeEnd < rangeStart) {\n\t\t\tthrow Error(ERRORS.rangeOrder);\n\t\t}\n\t\t// Iterate over the data per `(start, end)` pair.\n\t\tvar index = 0;\n\t\tvar start;\n\t\tvar end;\n\t\twhile (index < data.length) {\n\t\t\tstart = data[index];\n\t\t\tend = data[index + 1] - 1; // Note: the `- 1` makes `end` inclusive.\n\n\t\t\t// Exit as soon as no more matching pairs can be found.\n\t\t\tif (start > rangeEnd) {\n\t\t\t\treturn data;\n\t\t\t}\n\n\t\t\t// Check if this range pair is equal to, or forms a subset of, the range\n\t\t\t// to be removed.\n\t\t\t// E.g. we have `[0, 11, 40, 51]` and want to remove 0-10 → `[40, 51]`.\n\t\t\t// E.g. we have `[40, 51]` and want to remove 0-100 → `[]`.\n\t\t\tif (rangeStart <= start && rangeEnd >= end) {\n\t\t\t\t// Remove this pair.\n\t\t\t\tdata.splice(index, 2);\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// Check if both `rangeStart` and `rangeEnd` are within the bounds of\n\t\t\t// this pair.\n\t\t\t// E.g. we have `[0, 11]` and want to remove 4-6 → `[0, 4, 7, 11]`.\n\t\t\tif (rangeStart >= start && rangeEnd < end) {\n\t\t\t\tif (rangeStart == start) {\n\t\t\t\t\t// Replace `[start, end]` with `[startB, endB]`.\n\t\t\t\t\tdata[index] = rangeEnd + 1;\n\t\t\t\t\tdata[index + 1] = end + 1;\n\t\t\t\t\treturn data;\n\t\t\t\t}\n\t\t\t\t// Replace `[start, end]` with `[startA, endA, startB, endB]`.\n\t\t\t\tdata.splice(index, 2, start, rangeStart, rangeEnd + 1, end + 1);\n\t\t\t\treturn data;\n\t\t\t}\n\n\t\t\t// Check if only `rangeStart` is within the bounds of this pair.\n\t\t\t// E.g. we have `[0, 11]` and want to remove 4-20 → `[0, 4]`.\n\t\t\tif (rangeStart >= start && rangeStart <= end) {\n\t\t\t\t// Replace `end` with `rangeStart`.\n\t\t\t\tdata[index + 1] = rangeStart;\n\t\t\t\t// Note: we cannot `return` just yet, in case any following pairs still\n\t\t\t\t// contain matching code points.\n\t\t\t\t// E.g. we have `[0, 11, 14, 31]` and want to remove 4-20\n\t\t\t\t// → `[0, 4, 21, 31]`.\n\t\t\t}\n\n\t\t\t// Check if only `rangeEnd` is within the bounds of this pair.\n\t\t\t// E.g. we have `[14, 31]` and want to remove 4-20 → `[21, 31]`.\n\t\t\telse if (rangeEnd >= start && rangeEnd <= end) {\n\t\t\t\t// Just replace `start`.\n\t\t\t\tdata[index] = rangeEnd + 1;\n\t\t\t\treturn data;\n\t\t\t}\n\n\t\t\tindex += 2;\n\t\t}\n\t\treturn data;\n\t};\n\n\t var dataAdd = function(data, codePoint) {\n\t\t// Iterate over the data per `(start, end)` pair.\n\t\tvar index = 0;\n\t\tvar start;\n\t\tvar end;\n\t\tvar lastIndex = null;\n\t\tvar length = data.length;\n\t\tif (codePoint < 0x0 || codePoint > 0x10FFFF) {\n\t\t\tthrow RangeError(ERRORS.codePointRange);\n\t\t}\n\t\twhile (index < length) {\n\t\t\tstart = data[index];\n\t\t\tend = data[index + 1];\n\n\t\t\t// Check if the code point is already in the set.\n\t\t\tif (codePoint >= start && codePoint < end) {\n\t\t\t\treturn data;\n\t\t\t}\n\n\t\t\tif (codePoint == start - 1) {\n\t\t\t\t// Just replace `start` with a new value.\n\t\t\t\tdata[index] = codePoint;\n\t\t\t\treturn data;\n\t\t\t}\n\n\t\t\t// At this point, if `start` is `greater` than `codePoint`, insert a new\n\t\t\t// `[start, end]` pair before the current pair, or after the current pair\n\t\t\t// if there is a known `lastIndex`.\n\t\t\tif (start > codePoint) {\n\t\t\t\tdata.splice(\n\t\t\t\t\tlastIndex != null ? lastIndex + 2 : 0,\n\t\t\t\t\t0,\n\t\t\t\t\tcodePoint,\n\t\t\t\t\tcodePoint + 1\n\t\t\t\t);\n\t\t\t\treturn data;\n\t\t\t}\n\n\t\t\tif (codePoint == end) {\n\t\t\t\t// Check if adding this code point causes two separate ranges to become\n\t\t\t\t// a single range, e.g. `dataAdd([0, 4, 5, 10], 4)` → `[0, 10]`.\n\t\t\t\tif (codePoint + 1 == data[index + 2]) {\n\t\t\t\t\tdata.splice(index, 4, start, data[index + 3]);\n\t\t\t\t\treturn data;\n\t\t\t\t}\n\t\t\t\t// Else, just replace `end` with a new value.\n\t\t\t\tdata[index + 1] = codePoint + 1;\n\t\t\t\treturn data;\n\t\t\t}\n\t\t\tlastIndex = index;\n\t\t\tindex += 2;\n\t\t}\n\t\t// The loop has finished; add the new pair to the end of the data set.\n\t\tdata.push(codePoint, codePoint + 1);\n\t\treturn data;\n\t};\n\n\tvar dataAddData = function(dataA, dataB) {\n\t\t// Iterate over the data per `(start, end)` pair.\n\t\tvar index = 0;\n\t\tvar start;\n\t\tvar end;\n\t\tvar data = dataA.slice();\n\t\tvar length = dataB.length;\n\t\twhile (index < length) {\n\t\t\tstart = dataB[index];\n\t\t\tend = dataB[index + 1] - 1;\n\t\t\tif (start == end) {\n\t\t\t\tdata = dataAdd(data, start);\n\t\t\t} else {\n\t\t\t\tdata = dataAddRange(data, start, end);\n\t\t\t}\n\t\t\tindex += 2;\n\t\t}\n\t\treturn data;\n\t};\n\n\tvar dataRemoveData = function(dataA, dataB) {\n\t\t// Iterate over the data per `(start, end)` pair.\n\t\tvar index = 0;\n\t\tvar start;\n\t\tvar end;\n\t\tvar data = dataA.slice();\n\t\tvar length = dataB.length;\n\t\twhile (index < length) {\n\t\t\tstart = dataB[index];\n\t\t\tend = dataB[index + 1] - 1;\n\t\t\tif (start == end) {\n\t\t\t\tdata = dataRemove(data, start);\n\t\t\t} else {\n\t\t\t\tdata = dataRemoveRange(data, start, end);\n\t\t\t}\n\t\t\tindex += 2;\n\t\t}\n\t\treturn data;\n\t};\n\n\tvar dataAddRange = function(data, rangeStart, rangeEnd) {\n\t\tif (rangeEnd < rangeStart) {\n\t\t\tthrow Error(ERRORS.rangeOrder);\n\t\t}\n\t\tif (\n\t\t\trangeStart < 0x0 || rangeStart > 0x10FFFF ||\n\t\t\trangeEnd < 0x0 || rangeEnd > 0x10FFFF\n\t\t) {\n\t\t\tthrow RangeError(ERRORS.codePointRange);\n\t\t}\n\t\t// Iterate over the data per `(start, end)` pair.\n\t\tvar index = 0;\n\t\tvar start;\n\t\tvar end;\n\t\tvar added = false;\n\t\tvar length = data.length;\n\t\twhile (index < length) {\n\t\t\tstart = data[index];\n\t\t\tend = data[index + 1];\n\n\t\t\tif (added) {\n\t\t\t\t// The range has already been added to the set; at this point, we just\n\t\t\t\t// need to get rid of the following ranges in case they overlap.\n\n\t\t\t\t// Check if this range can be combined with the previous range.\n\t\t\t\tif (start == rangeEnd + 1) {\n\t\t\t\t\tdata.splice(index - 1, 2);\n\t\t\t\t\treturn data;\n\t\t\t\t}\n\n\t\t\t\t// Exit as soon as no more possibly overlapping pairs can be found.\n\t\t\t\tif (start > rangeEnd) {\n\t\t\t\t\treturn data;\n\t\t\t\t}\n\n\t\t\t\t// E.g. `[0, 11, 12, 16]` and we’ve added 5-15, so we now have\n\t\t\t\t// `[0, 16, 12, 16]`. Remove the `12,16` part, as it lies within the\n\t\t\t\t// `0,16` range that was previously added.\n\t\t\t\tif (start >= rangeStart && start <= rangeEnd) {\n\t\t\t\t\t// `start` lies within the range that was previously added.\n\n\t\t\t\t\tif (end > rangeStart && end - 1 <= rangeEnd) {\n\t\t\t\t\t\t// `end` lies within the range that was previously added as well,\n\t\t\t\t\t\t// so remove this pair.\n\t\t\t\t\t\tdata.splice(index, 2);\n\t\t\t\t\t\tindex -= 2;\n\t\t\t\t\t\t// Note: we cannot `return` just yet, as there may still be other\n\t\t\t\t\t\t// overlapping pairs.\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// `start` lies within the range that was previously added, but\n\t\t\t\t\t\t// `end` doesn’t. E.g. `[0, 11, 12, 31]` and we’ve added 5-15, so\n\t\t\t\t\t\t// now we have `[0, 16, 12, 31]`. This must be written as `[0, 31]`.\n\t\t\t\t\t\t// Remove the previously added `end` and the current `start`.\n\t\t\t\t\t\tdata.splice(index - 1, 2);\n\t\t\t\t\t\tindex -= 2;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Note: we cannot return yet.\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\telse if (start == rangeEnd + 1 || start == rangeEnd) {\n\t\t\t\tdata[index] = rangeStart;\n\t\t\t\treturn data;\n\t\t\t}\n\n\t\t\t// Check if a new pair must be inserted *before* the current one.\n\t\t\telse if (start > rangeEnd) {\n\t\t\t\tdata.splice(index, 0, rangeStart, rangeEnd + 1);\n\t\t\t\treturn data;\n\t\t\t}\n\n\t\t\telse if (rangeStart >= start && rangeStart < end && rangeEnd + 1 <= end) {\n\t\t\t\t// The new range lies entirely within an existing range pair. No action\n\t\t\t\t// needed.\n\t\t\t\treturn data;\n\t\t\t}\n\n\t\t\telse if (\n\t\t\t\t// E.g. `[0, 11]` and you add 5-15 → `[0, 16]`.\n\t\t\t\t(rangeStart >= start && rangeStart < end) ||\n\t\t\t\t// E.g. `[0, 3]` and you add 3-6 → `[0, 7]`.\n\t\t\t\tend == rangeStart\n\t\t\t) {\n\t\t\t\t// Replace `end` with the new value.\n\t\t\t\tdata[index + 1] = rangeEnd + 1;\n\t\t\t\t// Make sure the next range pair doesn’t overlap, e.g. `[0, 11, 12, 14]`\n\t\t\t\t// and you add 5-15 → `[0, 16]`, i.e. remove the `12,14` part.\n\t\t\t\tadded = true;\n\t\t\t\t// Note: we cannot `return` just yet.\n\t\t\t}\n\n\t\t\telse if (rangeStart <= start && rangeEnd + 1 >= end) {\n\t\t\t\t// The new range is a superset of the old range.\n\t\t\t\tdata[index] = rangeStart;\n\t\t\t\tdata[index + 1] = rangeEnd + 1;\n\t\t\t\tadded = true;\n\t\t\t}\n\n\t\t\tindex += 2;\n\t\t}\n\t\t// The loop has finished without doing anything; add the new pair to the end\n\t\t// of the data set.\n\t\tif (!added) {\n\t\t\tdata.push(rangeStart, rangeEnd + 1);\n\t\t}\n\t\treturn data;\n\t};\n\n\tvar dataContains = function(data, codePoint) {\n\t\tvar index = 0;\n\t\tvar length = data.length;\n\t\t// Exit early if `codePoint` is not within `data`’s overall range.\n\t\tvar start = data[index];\n\t\tvar end = data[length - 1];\n\t\tif (length >= 2) {\n\t\t\tif (codePoint < start || codePoint > end) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\t// Iterate over the data per `(start, end)` pair.\n\t\twhile (index < length) {\n\t\t\tstart = data[index];\n\t\t\tend = data[index + 1];\n\t\t\tif (codePoint >= start && codePoint < end) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\tindex += 2;\n\t\t}\n\t\treturn false;\n\t};\n\n\tvar dataIntersection = function(data, codePoints) {\n\t\tvar index = 0;\n\t\tvar length = codePoints.length;\n\t\tvar codePoint;\n\t\tvar result = [];\n\t\twhile (index < length) {\n\t\t\tcodePoint = codePoints[index];\n\t\t\tif (dataContains(data, codePoint)) {\n\t\t\t\tresult.push(codePoint);\n\t\t\t}\n\t\t\t++index;\n\t\t}\n\t\treturn dataFromCodePoints(result);\n\t};\n\n\tvar dataIsEmpty = function(data) {\n\t\treturn !data.length;\n\t};\n\n\tvar dataIsSingleton = function(data) {\n\t\t// Check if the set only represents a single code point.\n\t\treturn data.length == 2 && data[0] + 1 == data[1];\n\t};\n\n\tvar dataToArray = function(data) {\n\t\t// Iterate over the data per `(start, end)` pair.\n\t\tvar index = 0;\n\t\tvar start;\n\t\tvar end;\n\t\tvar result = [];\n\t\tvar length = data.length;\n\t\twhile (index < length) {\n\t\t\tstart = data[index];\n\t\t\tend = data[index + 1];\n\t\t\twhile (start < end) {\n\t\t\t\tresult.push(start);\n\t\t\t\t++start;\n\t\t\t}\n\t\t\tindex += 2;\n\t\t}\n\t\treturn result;\n\t};\n\n\t/*--------------------------------------------------------------------------*/\n\n\t// https://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae\n\tvar floor = Math.floor;\n\tvar highSurrogate = function(codePoint) {\n\t\treturn parseInt(\n\t\t\tfloor((codePoint - 0x10000) / 0x400) + HIGH_SURROGATE_MIN,\n\t\t\t10\n\t\t);\n\t};\n\n\tvar lowSurrogate = function(codePoint) {\n\t\treturn parseInt(\n\t\t\t(codePoint - 0x10000) % 0x400 + LOW_SURROGATE_MIN,\n\t\t\t10\n\t\t);\n\t};\n\n\tvar stringFromCharCode = String.fromCharCode;\n\tvar codePointToString = function(codePoint) {\n\t\tvar string;\n\t\t// https://mathiasbynens.be/notes/javascript-escapes#single\n\t\t// Note: the `\\b` escape sequence for U+0008 BACKSPACE in strings has a\n\t\t// different meaning in regular expressions (word boundary), so it cannot\n\t\t// be used here.\n\t\tif (codePoint == 0x09) {\n\t\t\tstring = '\\\\t';\n\t\t}\n\t\t// Note: IE < 9 treats `'\\v'` as `'v'`, so avoid using it.\n\t\t// else if (codePoint == 0x0B) {\n\t\t// \tstring = '\\\\v';\n\t\t// }\n\t\telse if (codePoint == 0x0A) {\n\t\t\tstring = '\\\\n';\n\t\t}\n\t\telse if (codePoint == 0x0C) {\n\t\t\tstring = '\\\\f';\n\t\t}\n\t\telse if (codePoint == 0x0D) {\n\t\t\tstring = '\\\\r';\n\t\t}\n\t\telse if (codePoint == 0x2D) {\n\t\t\t// https://mathiasbynens.be/notes/javascript-escapes#hexadecimal\n\t\t\t// Note: `-` (U+002D HYPHEN-MINUS) is escaped in this way rather\n\t\t\t// than by backslash-escaping, in case the output is used outside\n\t\t\t// of a character class in a `u` RegExp. /\\-/u throws, but\n\t\t\t// /\\x2D/u is fine.\n\t\t\tstring = '\\\\x2D';\n\t\t}\n\t\telse if (codePoint == 0x5C) {\n\t\t\tstring = '\\\\\\\\';\n\t\t}\n\t\telse if (\n\t\t\tcodePoint == 0x24 ||\n\t\t\t(codePoint >= 0x28 && codePoint <= 0x2B) ||\n\t\t\tcodePoint == 0x2E || codePoint == 0x2F ||\n\t\t\tcodePoint == 0x3F ||\n\t\t\t(codePoint >= 0x5B && codePoint <= 0x5E) ||\n\t\t\t(codePoint >= 0x7B && codePoint <= 0x7D)\n\t\t) {\n\t\t\t// The code point maps to an unsafe printable ASCII character;\n\t\t\t// backslash-escape it. Here’s the list of those symbols:\n\t\t\t//\n\t\t\t// $()*+./?[\\]^{|}\n\t\t\t//\n\t\t\t// This matches SyntaxCharacters as well as `/` (U+002F SOLIDUS).\n\t\t\t// https://tc39.github.io/ecma262/#prod-SyntaxCharacter\n\t\t\tstring = '\\\\' + stringFromCharCode(codePoint);\n\t\t}\n\t\telse if (codePoint >= 0x20 && codePoint <= 0x7E) {\n\t\t\t// The code point maps to one of these printable ASCII symbols\n\t\t\t// (including the space character):\n\t\t\t//\n\t\t\t// !\"#%&',/0123456789:;<=>@ABCDEFGHIJKLMNO\n\t\t\t// PQRSTUVWXYZ_`abcdefghijklmnopqrstuvwxyz~\n\t\t\t//\n\t\t\t// These can safely be used directly.\n\t\t\tstring = stringFromCharCode(codePoint);\n\t\t}\n\t\telse if (codePoint <= 0xFF) {\n\t\t\tstring = '\\\\x' + pad(hex(codePoint), 2);\n\t\t}\n\t\telse { // `codePoint <= 0xFFFF` holds true.\n\t\t\t// https://mathiasbynens.be/notes/javascript-escapes#unicode\n\t\t\tstring = '\\\\u' + pad(hex(codePoint), 4);\n\t\t}\n\n\t\t// There’s no need to account for astral symbols / surrogate pairs here,\n\t\t// since `codePointToString` is private and only used for BMP code points.\n\t\t// But if that’s what you need, just add an `else` block with this code:\n\t\t//\n\t\t// string = '\\\\u' + pad(hex(highSurrogate(codePoint)), 4)\n\t\t// \t+ '\\\\u' + pad(hex(lowSurrogate(codePoint)), 4);\n\n\t\treturn string;\n\t};\n\n\tvar codePointToStringUnicode = function(codePoint) {\n\t\tif (codePoint <= 0xFFFF) {\n\t\t\treturn codePointToString(codePoint);\n\t\t}\n\t\treturn '\\\\u{' + codePoint.toString(16).toUpperCase() + '}';\n\t};\n\n\tvar symbolToCodePoint = function(symbol) {\n\t\tvar length = symbol.length;\n\t\tvar first = symbol.charCodeAt(0);\n\t\tvar second;\n\t\tif (\n\t\t\tfirst >= HIGH_SURROGATE_MIN && first <= HIGH_SURROGATE_MAX &&\n\t\t\tlength > 1 // There is a next code unit.\n\t\t) {\n\t\t\t// `first` is a high surrogate, and there is a next character. Assume\n\t\t\t// it’s a low surrogate (else it’s invalid usage of Regenerate anyway).\n\t\t\tsecond = symbol.charCodeAt(1);\n\t\t\t// https://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae\n\t\t\treturn (first - HIGH_SURROGATE_MIN) * 0x400 +\n\t\t\t\tsecond - LOW_SURROGATE_MIN + 0x10000;\n\t\t}\n\t\treturn first;\n\t};\n\n\tvar createBMPCharacterClasses = function(data) {\n\t\t// Iterate over the data per `(start, end)` pair.\n\t\tvar result = '';\n\t\tvar index = 0;\n\t\tvar start;\n\t\tvar end;\n\t\tvar length = data.length;\n\t\tif (dataIsSingleton(data)) {\n\t\t\treturn codePointToString(data[0]);\n\t\t}\n\t\twhile (index < length) {\n\t\t\tstart = data[index];\n\t\t\tend = data[index + 1] - 1; // Note: the `- 1` makes `end` inclusive.\n\t\t\tif (start == end) {\n\t\t\t\tresult += codePointToString(start);\n\t\t\t} else if (start + 1 == end) {\n\t\t\t\tresult += codePointToString(start) + codePointToString(end);\n\t\t\t} else {\n\t\t\t\tresult += codePointToString(start) + '-' + codePointToString(end);\n\t\t\t}\n\t\t\tindex += 2;\n\t\t}\n\t\treturn '[' + result + ']';\n\t};\n\n\tvar createUnicodeCharacterClasses = function(data) {\n\t\t// Iterate over the data per `(start, end)` pair.\n\t\tvar result = '';\n\t\tvar index = 0;\n\t\tvar start;\n\t\tvar end;\n\t\tvar length = data.length;\n\t\tif (dataIsSingleton(data)) {\n\t\t\treturn codePointToStringUnicode(data[0]);\n\t\t}\n\t\twhile (index < length) {\n\t\t\tstart = data[index];\n\t\t\tend = data[index + 1] - 1; // Note: the `- 1` makes `end` inclusive.\n\t\t\tif (start == end) {\n\t\t\t\tresult += codePointToStringUnicode(start);\n\t\t\t} else if (start + 1 == end) {\n\t\t\t\tresult += codePointToStringUnicode(start) + codePointToStringUnicode(end);\n\t\t\t} else {\n\t\t\t\tresult += codePointToStringUnicode(start) + '-' + codePointToStringUnicode(end);\n\t\t\t}\n\t\t\tindex += 2;\n\t\t}\n\t\treturn '[' + result + ']';\n\t};\n\n\tvar splitAtBMP = function(data) {\n\t\t// Iterate over the data per `(start, end)` pair.\n\t\tvar loneHighSurrogates = [];\n\t\tvar loneLowSurrogates = [];\n\t\tvar bmp = [];\n\t\tvar astral = [];\n\t\tvar index = 0;\n\t\tvar start;\n\t\tvar end;\n\t\tvar length = data.length;\n\t\twhile (index < length) {\n\t\t\tstart = data[index];\n\t\t\tend = data[index + 1] - 1; // Note: the `- 1` makes `end` inclusive.\n\n\t\t\tif (start < HIGH_SURROGATE_MIN) {\n\n\t\t\t\t// The range starts and ends before the high surrogate range.\n\t\t\t\t// E.g. (0, 0x10).\n\t\t\t\tif (end < HIGH_SURROGATE_MIN) {\n\t\t\t\t\tbmp.push(start, end + 1);\n\t\t\t\t}\n\n\t\t\t\t// The range starts before the high surrogate range and ends within it.\n\t\t\t\t// E.g. (0, 0xD855).\n\t\t\t\tif (end >= HIGH_SURROGATE_MIN && end <= HIGH_SURROGATE_MAX) {\n\t\t\t\t\tbmp.push(start, HIGH_SURROGATE_MIN);\n\t\t\t\t\tloneHighSurrogates.push(HIGH_SURROGATE_MIN, end + 1);\n\t\t\t\t}\n\n\t\t\t\t// The range starts before the high surrogate range and ends in the low\n\t\t\t\t// surrogate range. E.g. (0, 0xDCFF).\n\t\t\t\tif (end >= LOW_SURROGATE_MIN && end <= LOW_SURROGATE_MAX) {\n\t\t\t\t\tbmp.push(start, HIGH_SURROGATE_MIN);\n\t\t\t\t\tloneHighSurrogates.push(HIGH_SURROGATE_MIN, HIGH_SURROGATE_MAX + 1);\n\t\t\t\t\tloneLowSurrogates.push(LOW_SURROGATE_MIN, end + 1);\n\t\t\t\t}\n\n\t\t\t\t// The range starts before the high surrogate range and ends after the\n\t\t\t\t// low surrogate range. E.g. (0, 0x10FFFF).\n\t\t\t\tif (end > LOW_SURROGATE_MAX) {\n\t\t\t\t\tbmp.push(start, HIGH_SURROGATE_MIN);\n\t\t\t\t\tloneHighSurrogates.push(HIGH_SURROGATE_MIN, HIGH_SURROGATE_MAX + 1);\n\t\t\t\t\tloneLowSurrogates.push(LOW_SURROGATE_MIN, LOW_SURROGATE_MAX + 1);\n\t\t\t\t\tif (end <= 0xFFFF) {\n\t\t\t\t\t\tbmp.push(LOW_SURROGATE_MAX + 1, end + 1);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tbmp.push(LOW_SURROGATE_MAX + 1, 0xFFFF + 1);\n\t\t\t\t\t\tastral.push(0xFFFF + 1, end + 1);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t} else if (start >= HIGH_SURROGATE_MIN && start <= HIGH_SURROGATE_MAX) {\n\n\t\t\t\t// The range starts and ends in the high surrogate range.\n\t\t\t\t// E.g. (0xD855, 0xD866).\n\t\t\t\tif (end >= HIGH_SURROGATE_MIN && end <= HIGH_SURROGATE_MAX) {\n\t\t\t\t\tloneHighSurrogates.push(start, end + 1);\n\t\t\t\t}\n\n\t\t\t\t// The range starts in the high surrogate range and ends in the low\n\t\t\t\t// surrogate range. E.g. (0xD855, 0xDCFF).\n\t\t\t\tif (end >= LOW_SURROGATE_MIN && end <= LOW_SURROGATE_MAX) {\n\t\t\t\t\tloneHighSurrogates.push(start, HIGH_SURROGATE_MAX + 1);\n\t\t\t\t\tloneLowSurrogates.push(LOW_SURROGATE_MIN, end + 1);\n\t\t\t\t}\n\n\t\t\t\t// The range starts in the high surrogate range and ends after the low\n\t\t\t\t// surrogate range. E.g. (0xD855, 0x10FFFF).\n\t\t\t\tif (end > LOW_SURROGATE_MAX) {\n\t\t\t\t\tloneHighSurrogates.push(start, HIGH_SURROGATE_MAX + 1);\n\t\t\t\t\tloneLowSurrogates.push(LOW_SURROGATE_MIN, LOW_SURROGATE_MAX + 1);\n\t\t\t\t\tif (end <= 0xFFFF) {\n\t\t\t\t\t\tbmp.push(LOW_SURROGATE_MAX + 1, end + 1);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tbmp.push(LOW_SURROGATE_MAX + 1, 0xFFFF + 1);\n\t\t\t\t\t\tastral.push(0xFFFF + 1, end + 1);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t} else if (start >= LOW_SURROGATE_MIN && start <= LOW_SURROGATE_MAX) {\n\n\t\t\t\t// The range starts and ends in the low surrogate range.\n\t\t\t\t// E.g. (0xDCFF, 0xDDFF).\n\t\t\t\tif (end >= LOW_SURROGATE_MIN && end <= LOW_SURROGATE_MAX) {\n\t\t\t\t\tloneLowSurrogates.push(start, end + 1);\n\t\t\t\t}\n\n\t\t\t\t// The range starts in the low surrogate range and ends after the low\n\t\t\t\t// surrogate range. E.g. (0xDCFF, 0x10FFFF).\n\t\t\t\tif (end > LOW_SURROGATE_MAX) {\n\t\t\t\t\tloneLowSurrogates.push(start, LOW_SURROGATE_MAX + 1);\n\t\t\t\t\tif (end <= 0xFFFF) {\n\t\t\t\t\t\tbmp.push(LOW_SURROGATE_MAX + 1, end + 1);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tbmp.push(LOW_SURROGATE_MAX + 1, 0xFFFF + 1);\n\t\t\t\t\t\tastral.push(0xFFFF + 1, end + 1);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t} else if (start > LOW_SURROGATE_MAX && start <= 0xFFFF) {\n\n\t\t\t\t// The range starts and ends after the low surrogate range.\n\t\t\t\t// E.g. (0xFFAA, 0x10FFFF).\n\t\t\t\tif (end <= 0xFFFF) {\n\t\t\t\t\tbmp.push(start, end + 1);\n\t\t\t\t} else {\n\t\t\t\t\tbmp.push(start, 0xFFFF + 1);\n\t\t\t\t\tastral.push(0xFFFF + 1, end + 1);\n\t\t\t\t}\n\n\t\t\t} else {\n\n\t\t\t\t// The range starts and ends in the astral range.\n\t\t\t\tastral.push(start, end + 1);\n\n\t\t\t}\n\n\t\t\tindex += 2;\n\t\t}\n\t\treturn {\n\t\t\t'loneHighSurrogates': loneHighSurrogates,\n\t\t\t'loneLowSurrogates': loneLowSurrogates,\n\t\t\t'bmp': bmp,\n\t\t\t'astral': astral\n\t\t};\n\t};\n\n\tvar optimizeSurrogateMappings = function(surrogateMappings) {\n\t\tvar result = [];\n\t\tvar tmpLow = [];\n\t\tvar addLow = false;\n\t\tvar mapping;\n\t\tvar nextMapping;\n\t\tvar highSurrogates;\n\t\tvar lowSurrogates;\n\t\tvar nextHighSurrogates;\n\t\tvar nextLowSurrogates;\n\t\tvar index = -1;\n\t\tvar length = surrogateMappings.length;\n\t\twhile (++index < length) {\n\t\t\tmapping = surrogateMappings[index];\n\t\t\tnextMapping = surrogateMappings[index + 1];\n\t\t\tif (!nextMapping) {\n\t\t\t\tresult.push(mapping);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\thighSurrogates = mapping[0];\n\t\t\tlowSurrogates = mapping[1];\n\t\t\tnextHighSurrogates = nextMapping[0];\n\t\t\tnextLowSurrogates = nextMapping[1];\n\n\t\t\t// Check for identical high surrogate ranges.\n\t\t\ttmpLow = lowSurrogates;\n\t\t\twhile (\n\t\t\t\tnextHighSurrogates &&\n\t\t\t\thighSurrogates[0] == nextHighSurrogates[0] &&\n\t\t\t\thighSurrogates[1] == nextHighSurrogates[1]\n\t\t\t) {\n\t\t\t\t// Merge with the next item.\n\t\t\t\tif (dataIsSingleton(nextLowSurrogates)) {\n\t\t\t\t\ttmpLow = dataAdd(tmpLow, nextLowSurrogates[0]);\n\t\t\t\t} else {\n\t\t\t\t\ttmpLow = dataAddRange(\n\t\t\t\t\t\ttmpLow,\n\t\t\t\t\t\tnextLowSurrogates[0],\n\t\t\t\t\t\tnextLowSurrogates[1] - 1\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\t++index;\n\t\t\t\tmapping = surrogateMappings[index];\n\t\t\t\thighSurrogates = mapping[0];\n\t\t\t\tlowSurrogates = mapping[1];\n\t\t\t\tnextMapping = surrogateMappings[index + 1];\n\t\t\t\tnextHighSurrogates = nextMapping && nextMapping[0];\n\t\t\t\tnextLowSurrogates = nextMapping && nextMapping[1];\n\t\t\t\taddLow = true;\n\t\t\t}\n\t\t\tresult.push([\n\t\t\t\thighSurrogates,\n\t\t\t\taddLow ? tmpLow : lowSurrogates\n\t\t\t]);\n\t\t\taddLow = false;\n\t\t}\n\t\treturn optimizeByLowSurrogates(result);\n\t};\n\n\tvar optimizeByLowSurrogates = function(surrogateMappings) {\n\t\tif (surrogateMappings.length == 1) {\n\t\t\treturn surrogateMappings;\n\t\t}\n\t\tvar index = -1;\n\t\tvar innerIndex = -1;\n\t\twhile (++index < surrogateMappings.length) {\n\t\t\tvar mapping = surrogateMappings[index];\n\t\t\tvar lowSurrogates = mapping[1];\n\t\t\tvar lowSurrogateStart = lowSurrogates[0];\n\t\t\tvar lowSurrogateEnd = lowSurrogates[1];\n\t\t\tinnerIndex = index; // Note: the loop starts at the next index.\n\t\t\twhile (++innerIndex < surrogateMappings.length) {\n\t\t\t\tvar otherMapping = surrogateMappings[innerIndex];\n\t\t\t\tvar otherLowSurrogates = otherMapping[1];\n\t\t\t\tvar otherLowSurrogateStart = otherLowSurrogates[0];\n\t\t\t\tvar otherLowSurrogateEnd = otherLowSurrogates[1];\n\t\t\t\tif (\n\t\t\t\t\tlowSurrogateStart == otherLowSurrogateStart &&\n\t\t\t\t\tlowSurrogateEnd == otherLowSurrogateEnd &&\n\t\t\t\t\totherLowSurrogates.length === 2\n\t\t\t\t) {\n\t\t\t\t\t// Add the code points in the other item to this one.\n\t\t\t\t\tif (dataIsSingleton(otherMapping[0])) {\n\t\t\t\t\t\tmapping[0] = dataAdd(mapping[0], otherMapping[0][0]);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tmapping[0] = dataAddRange(\n\t\t\t\t\t\t\tmapping[0],\n\t\t\t\t\t\t\totherMapping[0][0],\n\t\t\t\t\t\t\totherMapping[0][1] - 1\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t\t// Remove the other, now redundant, item.\n\t\t\t\t\tsurrogateMappings.splice(innerIndex, 1);\n\t\t\t\t\t--innerIndex;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn surrogateMappings;\n\t};\n\n\tvar surrogateSet = function(data) {\n\t\t// Exit early if `data` is an empty set.\n\t\tif (!data.length) {\n\t\t\treturn [];\n\t\t}\n\n\t\t// Iterate over the data per `(start, end)` pair.\n\t\tvar index = 0;\n\t\tvar start;\n\t\tvar end;\n\t\tvar startHigh;\n\t\tvar startLow;\n\t\tvar endHigh;\n\t\tvar endLow;\n\t\tvar surrogateMappings = [];\n\t\tvar length = data.length;\n\t\twhile (index < length) {\n\t\t\tstart = data[index];\n\t\t\tend = data[index + 1] - 1;\n\n\t\t\tstartHigh = highSurrogate(start);\n\t\t\tstartLow = lowSurrogate(start);\n\t\t\tendHigh = highSurrogate(end);\n\t\t\tendLow = lowSurrogate(end);\n\n\t\t\tvar startsWithLowestLowSurrogate = startLow == LOW_SURROGATE_MIN;\n\t\t\tvar endsWithHighestLowSurrogate = endLow == LOW_SURROGATE_MAX;\n\t\t\tvar complete = false;\n\n\t\t\t// Append the previous high-surrogate-to-low-surrogate mappings.\n\t\t\t// Step 1: `(startHigh, startLow)` to `(startHigh, LOW_SURROGATE_MAX)`.\n\t\t\tif (\n\t\t\t\tstartHigh == endHigh ||\n\t\t\t\tstartsWithLowestLowSurrogate && endsWithHighestLowSurrogate\n\t\t\t) {\n\t\t\t\tsurrogateMappings.push([\n\t\t\t\t\t[startHigh, endHigh + 1],\n\t\t\t\t\t[startLow, endLow + 1]\n\t\t\t\t]);\n\t\t\t\tcomplete = true;\n\t\t\t} else {\n\t\t\t\tsurrogateMappings.push([\n\t\t\t\t\t[startHigh, startHigh + 1],\n\t\t\t\t\t[startLow, LOW_SURROGATE_MAX + 1]\n\t\t\t\t]);\n\t\t\t}\n\n\t\t\t// Step 2: `(startHigh + 1, LOW_SURROGATE_MIN)` to\n\t\t\t// `(endHigh - 1, LOW_SURROGATE_MAX)`.\n\t\t\tif (!complete && startHigh + 1 < endHigh) {\n\t\t\t\tif (endsWithHighestLowSurrogate) {\n\t\t\t\t\t// Combine step 2 and step 3.\n\t\t\t\t\tsurrogateMappings.push([\n\t\t\t\t\t\t[startHigh + 1, endHigh + 1],\n\t\t\t\t\t\t[LOW_SURROGATE_MIN, endLow + 1]\n\t\t\t\t\t]);\n\t\t\t\t\tcomplete = true;\n\t\t\t\t} else {\n\t\t\t\t\tsurrogateMappings.push([\n\t\t\t\t\t\t[startHigh + 1, endHigh],\n\t\t\t\t\t\t[LOW_SURROGATE_MIN, LOW_SURROGATE_MAX + 1]\n\t\t\t\t\t]);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Step 3. `(endHigh, LOW_SURROGATE_MIN)` to `(endHigh, endLow)`.\n\t\t\tif (!complete) {\n\t\t\t\tsurrogateMappings.push([\n\t\t\t\t\t[endHigh, endHigh + 1],\n\t\t\t\t\t[LOW_SURROGATE_MIN, endLow + 1]\n\t\t\t\t]);\n\t\t\t}\n\n\t\t\tindex += 2;\n\t\t}\n\n\t\t// The format of `surrogateMappings` is as follows:\n\t\t//\n\t\t// [ surrogateMapping1, surrogateMapping2 ]\n\t\t//\n\t\t// i.e.:\n\t\t//\n\t\t// [\n\t\t// [ highSurrogates1, lowSurrogates1 ],\n\t\t// [ highSurrogates2, lowSurrogates2 ]\n\t\t// ]\n\t\treturn optimizeSurrogateMappings(surrogateMappings);\n\t};\n\n\tvar createSurrogateCharacterClasses = function(surrogateMappings) {\n\t\tvar result = [];\n\t\tforEach(surrogateMappings, function(surrogateMapping) {\n\t\t\tvar highSurrogates = surrogateMapping[0];\n\t\t\tvar lowSurrogates = surrogateMapping[1];\n\t\t\tresult.push(\n\t\t\t\tcreateBMPCharacterClasses(highSurrogates) +\n\t\t\t\tcreateBMPCharacterClasses(lowSurrogates)\n\t\t\t);\n\t\t});\n\t\treturn result.join('|');\n\t};\n\n\tvar createCharacterClassesFromData = function(data, bmpOnly, hasUnicodeFlag) {\n\t\tif (hasUnicodeFlag) {\n\t\t\treturn createUnicodeCharacterClasses(data);\n\t\t}\n\t\tvar result = [];\n\n\t\tvar parts = splitAtBMP(data);\n\t\tvar loneHighSurrogates = parts.loneHighSurrogates;\n\t\tvar loneLowSurrogates = parts.loneLowSurrogates;\n\t\tvar bmp = parts.bmp;\n\t\tvar astral = parts.astral;\n\t\tvar hasLoneHighSurrogates = !dataIsEmpty(loneHighSurrogates);\n\t\tvar hasLoneLowSurrogates = !dataIsEmpty(loneLowSurrogates);\n\n\t\tvar surrogateMappings = surrogateSet(astral);\n\n\t\tif (bmpOnly) {\n\t\t\tbmp = dataAddData(bmp, loneHighSurrogates);\n\t\t\thasLoneHighSurrogates = false;\n\t\t\tbmp = dataAddData(bmp, loneLowSurrogates);\n\t\t\thasLoneLowSurrogates = false;\n\t\t}\n\n\t\tif (!dataIsEmpty(bmp)) {\n\t\t\t// The data set contains BMP code points that are not high surrogates\n\t\t\t// needed for astral code points in the set.\n\t\t\tresult.push(createBMPCharacterClasses(bmp));\n\t\t}\n\t\tif (surrogateMappings.length) {\n\t\t\t// The data set contains astral code points; append character classes\n\t\t\t// based on their surrogate pairs.\n\t\t\tresult.push(createSurrogateCharacterClasses(surrogateMappings));\n\t\t}\n\t\t// https://gist.github.com/mathiasbynens/bbe7f870208abcfec860\n\t\tif (hasLoneHighSurrogates) {\n\t\t\tresult.push(\n\t\t\t\tcreateBMPCharacterClasses(loneHighSurrogates) +\n\t\t\t\t// Make sure the high surrogates aren’t part of a surrogate pair.\n\t\t\t\t'(?![\\\\uDC00-\\\\uDFFF])'\n\t\t\t);\n\t\t}\n\t\tif (hasLoneLowSurrogates) {\n\t\t\tresult.push(\n\t\t\t\t// It is not possible to accurately assert the low surrogates aren’t\n\t\t\t\t// part of a surrogate pair, since JavaScript regular expressions do\n\t\t\t\t// not support lookbehind.\n\t\t\t\t'(?:[^\\\\uD800-\\\\uDBFF]|^)' +\n\t\t\t\tcreateBMPCharacterClasses(loneLowSurrogates)\n\t\t\t);\n\t\t}\n\t\treturn result.join('|');\n\t};\n\n\t/*--------------------------------------------------------------------------*/\n\n\t// `regenerate` can be used as a constructor (and new methods can be added to\n\t// its prototype) but also as a regular function, the latter of which is the\n\t// documented and most common usage. For that reason, it’s not capitalized.\n\tvar regenerate = function(value) {\n\t\tif (arguments.length > 1) {\n\t\t\tvalue = slice.call(arguments);\n\t\t}\n\t\tif (this instanceof regenerate) {\n\t\t\tthis.data = [];\n\t\t\treturn value ? this.add(value) : this;\n\t\t}\n\t\treturn (new regenerate).add(value);\n\t};\n\n\tregenerate.version = '1.4.2';\n\n\tvar proto = regenerate.prototype;\n\textend(proto, {\n\t\t'add': function(value) {\n\t\t\tvar $this = this;\n\t\t\tif (value == null) {\n\t\t\t\treturn $this;\n\t\t\t}\n\t\t\tif (value instanceof regenerate) {\n\t\t\t\t// Allow passing other Regenerate instances.\n\t\t\t\t$this.data = dataAddData($this.data, value.data);\n\t\t\t\treturn $this;\n\t\t\t}\n\t\t\tif (arguments.length > 1) {\n\t\t\t\tvalue = slice.call(arguments);\n\t\t\t}\n\t\t\tif (isArray(value)) {\n\t\t\t\tforEach(value, function(item) {\n\t\t\t\t\t$this.add(item);\n\t\t\t\t});\n\t\t\t\treturn $this;\n\t\t\t}\n\t\t\t$this.data = dataAdd(\n\t\t\t\t$this.data,\n\t\t\t\tisNumber(value) ? value : symbolToCodePoint(value)\n\t\t\t);\n\t\t\treturn $this;\n\t\t},\n\t\t'remove': function(value) {\n\t\t\tvar $this = this;\n\t\t\tif (value == null) {\n\t\t\t\treturn $this;\n\t\t\t}\n\t\t\tif (value instanceof regenerate) {\n\t\t\t\t// Allow passing other Regenerate instances.\n\t\t\t\t$this.data = dataRemoveData($this.data, value.data);\n\t\t\t\treturn $this;\n\t\t\t}\n\t\t\tif (arguments.length > 1) {\n\t\t\t\tvalue = slice.call(arguments);\n\t\t\t}\n\t\t\tif (isArray(value)) {\n\t\t\t\tforEach(value, function(item) {\n\t\t\t\t\t$this.remove(item);\n\t\t\t\t});\n\t\t\t\treturn $this;\n\t\t\t}\n\t\t\t$this.data = dataRemove(\n\t\t\t\t$this.data,\n\t\t\t\tisNumber(value) ? value : symbolToCodePoint(value)\n\t\t\t);\n\t\t\treturn $this;\n\t\t},\n\t\t'addRange': function(start, end) {\n\t\t\tvar $this = this;\n\t\t\t$this.data = dataAddRange($this.data,\n\t\t\t\tisNumber(start) ? start : symbolToCodePoint(start),\n\t\t\t\tisNumber(end) ? end : symbolToCodePoint(end)\n\t\t\t);\n\t\t\treturn $this;\n\t\t},\n\t\t'removeRange': function(start, end) {\n\t\t\tvar $this = this;\n\t\t\tvar startCodePoint = isNumber(start) ? start : symbolToCodePoint(start);\n\t\t\tvar endCodePoint = isNumber(end) ? end : symbolToCodePoint(end);\n\t\t\t$this.data = dataRemoveRange(\n\t\t\t\t$this.data,\n\t\t\t\tstartCodePoint,\n\t\t\t\tendCodePoint\n\t\t\t);\n\t\t\treturn $this;\n\t\t},\n\t\t'intersection': function(argument) {\n\t\t\tvar $this = this;\n\t\t\t// Allow passing other Regenerate instances.\n\t\t\t// TODO: Optimize this by writing and using `dataIntersectionData()`.\n\t\t\tvar array = argument instanceof regenerate ?\n\t\t\t\tdataToArray(argument.data) :\n\t\t\t\targument;\n\t\t\t$this.data = dataIntersection($this.data, array);\n\t\t\treturn $this;\n\t\t},\n\t\t'contains': function(codePoint) {\n\t\t\treturn dataContains(\n\t\t\t\tthis.data,\n\t\t\t\tisNumber(codePoint) ? codePoint : symbolToCodePoint(codePoint)\n\t\t\t);\n\t\t},\n\t\t'clone': function() {\n\t\t\tvar set = new regenerate;\n\t\t\tset.data = this.data.slice(0);\n\t\t\treturn set;\n\t\t},\n\t\t'toString': function(options) {\n\t\t\tvar result = createCharacterClassesFromData(\n\t\t\t\tthis.data,\n\t\t\t\toptions ? options.bmpOnly : false,\n\t\t\t\toptions ? options.hasUnicodeFlag : false\n\t\t\t);\n\t\t\tif (!result) {\n\t\t\t\t// For an empty set, return something that can be inserted `/here/` to\n\t\t\t\t// form a valid regular expression. Avoid `(?:)` since that matches the\n\t\t\t\t// empty string.\n\t\t\t\treturn '[]';\n\t\t\t}\n\t\t\t// Use `\\0` instead of `\\x00` where possible.\n\t\t\treturn result.replace(regexNull, '\\\\0$1');\n\t\t},\n\t\t'toRegExp': function(flags) {\n\t\t\tvar pattern = this.toString(\n\t\t\t\tflags && flags.indexOf('u') != -1 ?\n\t\t\t\t\t{ 'hasUnicodeFlag': true } :\n\t\t\t\t\tnull\n\t\t\t);\n\t\t\treturn RegExp(pattern, flags || '');\n\t\t},\n\t\t'valueOf': function() { // Note: `valueOf` is aliased as `toArray`.\n\t\t\treturn dataToArray(this.data);\n\t\t}\n\t});\n\n\tproto.toArray = proto.valueOf;\n\n\t// Some AMD build optimizers, like r.js, check for specific condition patterns\n\t// like the following:\n\tif (\n\t\ttypeof define == 'function' &&\n\t\ttypeof define.amd == 'object' &&\n\t\tdefine.amd\n\t) {\n\t\tdefine(function() {\n\t\t\treturn regenerate;\n\t\t});\n\t}\telse if (freeExports && !freeExports.nodeType) {\n\t\tif (freeModule) { // in Node.js, io.js, or RingoJS v0.8.0+\n\t\t\tfreeModule.exports = regenerate;\n\t\t} else { // in Narwhal or RingoJS v0.7.0-\n\t\t\tfreeExports.regenerate = regenerate;\n\t\t}\n\t} else { // in Rhino or a web browser\n\t\troot.regenerate = regenerate;\n\t}\n\n}(this));\n","const set = require('regenerate')(0xAA, 0xB5, 0xBA, 0x2EC, 0x2EE, 0x345, 0x37F, 0x386, 0x38C, 0x559, 0x5BF, 0x5C7, 0x6FF, 0x7FA, 0x9B2, 0x9CE, 0x9D7, 0x9FC, 0xA51, 0xA5E, 0xAD0, 0xB71, 0xB9C, 0xBD0, 0xBD7, 0xC5D, 0xD4E, 0xDBD, 0xDD6, 0xE4D, 0xE84, 0xEA5, 0xEC6, 0xECD, 0xF00, 0x1038, 0x10C7, 0x10CD, 0x1258, 0x12C0, 0x17D7, 0x17DC, 0x1AA7, 0x1CFA, 0x1F59, 0x1F5B, 0x1F5D, 0x1FBE, 0x2071, 0x207F, 0x2102, 0x2107, 0x2115, 0x2124, 0x2126, 0x2128, 0x214E, 0x2D27, 0x2D2D, 0x2D6F, 0x2E2F, 0xA7D3, 0xA8C5, 0xA8FB, 0xA9CF, 0xAAC0, 0xAAC2, 0xFB3E, 0x10808, 0x1083C, 0x10F27, 0x110C2, 0x11176, 0x111DA, 0x111DC, 0x11237, 0x11288, 0x11350, 0x11357, 0x114C7, 0x11640, 0x11644, 0x116B8, 0x11909, 0x119E1, 0x11A9D, 0x11C40, 0x11D3A, 0x11D43, 0x11D98, 0x11FB0, 0x16FE3, 0x1B132, 0x1B155, 0x1BC9E, 0x1D4A2, 0x1D4BB, 0x1D546, 0x1E08F, 0x1E14E, 0x1E947, 0x1E94B, 0x1EE24, 0x1EE27, 0x1EE39, 0x1EE3B, 0x1EE42, 0x1EE47, 0x1EE49, 0x1EE4B, 0x1EE54, 0x1EE57, 0x1EE59, 0x1EE5B, 0x1EE5D, 0x1EE5F, 0x1EE64, 0x1EE7E);\nset.addRange(0x41, 0x5A).addRange(0x61, 0x7A).addRange(0xC0, 0xD6).addRange(0xD8, 0xF6).addRange(0xF8, 0x2C1).addRange(0x2C6, 0x2D1).addRange(0x2E0, 0x2E4).addRange(0x370, 0x374).addRange(0x376, 0x377).addRange(0x37A, 0x37D).addRange(0x388, 0x38A).addRange(0x38E, 0x3A1).addRange(0x3A3, 0x3F5).addRange(0x3F7, 0x481).addRange(0x48A, 0x52F).addRange(0x531, 0x556).addRange(0x560, 0x588).addRange(0x5B0, 0x5BD).addRange(0x5C1, 0x5C2).addRange(0x5C4, 0x5C5).addRange(0x5D0, 0x5EA).addRange(0x5EF, 0x5F2).addRange(0x610, 0x61A).addRange(0x620, 0x657).addRange(0x659, 0x65F).addRange(0x66E, 0x6D3).addRange(0x6D5, 0x6DC).addRange(0x6E1, 0x6E8).addRange(0x6ED, 0x6EF).addRange(0x6FA, 0x6FC).addRange(0x710, 0x73F).addRange(0x74D, 0x7B1).addRange(0x7CA, 0x7EA).addRange(0x7F4, 0x7F5).addRange(0x800, 0x817).addRange(0x81A, 0x82C).addRange(0x840, 0x858).addRange(0x860, 0x86A).addRange(0x870, 0x887).addRange(0x889, 0x88E).addRange(0x8A0, 0x8C9).addRange(0x8D4, 0x8DF).addRange(0x8E3, 0x8E9).addRange(0x8F0, 0x93B).addRange(0x93D, 0x94C).addRange(0x94E, 0x950).addRange(0x955, 0x963).addRange(0x971, 0x983).addRange(0x985, 0x98C).addRange(0x98F, 0x990).addRange(0x993, 0x9A8);\nset.addRange(0x9AA, 0x9B0).addRange(0x9B6, 0x9B9).addRange(0x9BD, 0x9C4).addRange(0x9C7, 0x9C8).addRange(0x9CB, 0x9CC).addRange(0x9DC, 0x9DD).addRange(0x9DF, 0x9E3).addRange(0x9F0, 0x9F1).addRange(0xA01, 0xA03).addRange(0xA05, 0xA0A).addRange(0xA0F, 0xA10).addRange(0xA13, 0xA28).addRange(0xA2A, 0xA30).addRange(0xA32, 0xA33).addRange(0xA35, 0xA36).addRange(0xA38, 0xA39).addRange(0xA3E, 0xA42).addRange(0xA47, 0xA48).addRange(0xA4B, 0xA4C).addRange(0xA59, 0xA5C).addRange(0xA70, 0xA75).addRange(0xA81, 0xA83).addRange(0xA85, 0xA8D).addRange(0xA8F, 0xA91).addRange(0xA93, 0xAA8).addRange(0xAAA, 0xAB0).addRange(0xAB2, 0xAB3).addRange(0xAB5, 0xAB9).addRange(0xABD, 0xAC5).addRange(0xAC7, 0xAC9).addRange(0xACB, 0xACC).addRange(0xAE0, 0xAE3).addRange(0xAF9, 0xAFC).addRange(0xB01, 0xB03).addRange(0xB05, 0xB0C).addRange(0xB0F, 0xB10).addRange(0xB13, 0xB28).addRange(0xB2A, 0xB30).addRange(0xB32, 0xB33).addRange(0xB35, 0xB39).addRange(0xB3D, 0xB44).addRange(0xB47, 0xB48).addRange(0xB4B, 0xB4C).addRange(0xB56, 0xB57).addRange(0xB5C, 0xB5D).addRange(0xB5F, 0xB63).addRange(0xB82, 0xB83).addRange(0xB85, 0xB8A).addRange(0xB8E, 0xB90).addRange(0xB92, 0xB95).addRange(0xB99, 0xB9A);\nset.addRange(0xB9E, 0xB9F).addRange(0xBA3, 0xBA4).addRange(0xBA8, 0xBAA).addRange(0xBAE, 0xBB9).addRange(0xBBE, 0xBC2).addRange(0xBC6, 0xBC8).addRange(0xBCA, 0xBCC).addRange(0xC00, 0xC0C).addRange(0xC0E, 0xC10).addRange(0xC12, 0xC28).addRange(0xC2A, 0xC39).addRange(0xC3D, 0xC44).addRange(0xC46, 0xC48).addRange(0xC4A, 0xC4C).addRange(0xC55, 0xC56).addRange(0xC58, 0xC5A).addRange(0xC60, 0xC63).addRange(0xC80, 0xC83).addRange(0xC85, 0xC8C).addRange(0xC8E, 0xC90).addRange(0xC92, 0xCA8).addRange(0xCAA, 0xCB3).addRange(0xCB5, 0xCB9).addRange(0xCBD, 0xCC4).addRange(0xCC6, 0xCC8).addRange(0xCCA, 0xCCC).addRange(0xCD5, 0xCD6).addRange(0xCDD, 0xCDE).addRange(0xCE0, 0xCE3).addRange(0xCF1, 0xCF3).addRange(0xD00, 0xD0C).addRange(0xD0E, 0xD10).addRange(0xD12, 0xD3A).addRange(0xD3D, 0xD44).addRange(0xD46, 0xD48).addRange(0xD4A, 0xD4C).addRange(0xD54, 0xD57).addRange(0xD5F, 0xD63).addRange(0xD7A, 0xD7F).addRange(0xD81, 0xD83).addRange(0xD85, 0xD96).addRange(0xD9A, 0xDB1).addRange(0xDB3, 0xDBB).addRange(0xDC0, 0xDC6).addRange(0xDCF, 0xDD4).addRange(0xDD8, 0xDDF).addRange(0xDF2, 0xDF3).addRange(0xE01, 0xE3A).addRange(0xE40, 0xE46).addRange(0xE81, 0xE82).addRange(0xE86, 0xE8A);\nset.addRange(0xE8C, 0xEA3).addRange(0xEA7, 0xEB9).addRange(0xEBB, 0xEBD).addRange(0xEC0, 0xEC4).addRange(0xEDC, 0xEDF).addRange(0xF40, 0xF47).addRange(0xF49, 0xF6C).addRange(0xF71, 0xF83).addRange(0xF88, 0xF97).addRange(0xF99, 0xFBC).addRange(0x1000, 0x1036).addRange(0x103B, 0x103F).addRange(0x1050, 0x108F).addRange(0x109A, 0x109D).addRange(0x10A0, 0x10C5).addRange(0x10D0, 0x10FA).addRange(0x10FC, 0x1248).addRange(0x124A, 0x124D).addRange(0x1250, 0x1256).addRange(0x125A, 0x125D).addRange(0x1260, 0x1288).addRange(0x128A, 0x128D).addRange(0x1290, 0x12B0).addRange(0x12B2, 0x12B5).addRange(0x12B8, 0x12BE).addRange(0x12C2, 0x12C5).addRange(0x12C8, 0x12D6).addRange(0x12D8, 0x1310).addRange(0x1312, 0x1315).addRange(0x1318, 0x135A).addRange(0x1380, 0x138F).addRange(0x13A0, 0x13F5).addRange(0x13F8, 0x13FD).addRange(0x1401, 0x166C).addRange(0x166F, 0x167F).addRange(0x1681, 0x169A).addRange(0x16A0, 0x16EA).addRange(0x16EE, 0x16F8).addRange(0x1700, 0x1713).addRange(0x171F, 0x1733).addRange(0x1740, 0x1753).addRange(0x1760, 0x176C).addRange(0x176E, 0x1770).addRange(0x1772, 0x1773).addRange(0x1780, 0x17B3).addRange(0x17B6, 0x17C8).addRange(0x1820, 0x1878).addRange(0x1880, 0x18AA).addRange(0x18B0, 0x18F5).addRange(0x1900, 0x191E).addRange(0x1920, 0x192B);\nset.addRange(0x1930, 0x1938).addRange(0x1950, 0x196D).addRange(0x1970, 0x1974).addRange(0x1980, 0x19AB).addRange(0x19B0, 0x19C9).addRange(0x1A00, 0x1A1B).addRange(0x1A20, 0x1A5E).addRange(0x1A61, 0x1A74).addRange(0x1ABF, 0x1AC0).addRange(0x1ACC, 0x1ACE).addRange(0x1B00, 0x1B33).addRange(0x1B35, 0x1B43).addRange(0x1B45, 0x1B4C).addRange(0x1B80, 0x1BA9).addRange(0x1BAC, 0x1BAF).addRange(0x1BBA, 0x1BE5).addRange(0x1BE7, 0x1BF1).addRange(0x1C00, 0x1C36).addRange(0x1C4D, 0x1C4F).addRange(0x1C5A, 0x1C7D).addRange(0x1C80, 0x1C88).addRange(0x1C90, 0x1CBA).addRange(0x1CBD, 0x1CBF).addRange(0x1CE9, 0x1CEC).addRange(0x1CEE, 0x1CF3).addRange(0x1CF5, 0x1CF6).addRange(0x1D00, 0x1DBF).addRange(0x1DE7, 0x1DF4).addRange(0x1E00, 0x1F15).addRange(0x1F18, 0x1F1D).addRange(0x1F20, 0x1F45).addRange(0x1F48, 0x1F4D).addRange(0x1F50, 0x1F57).addRange(0x1F5F, 0x1F7D).addRange(0x1F80, 0x1FB4).addRange(0x1FB6, 0x1FBC).addRange(0x1FC2, 0x1FC4).addRange(0x1FC6, 0x1FCC).addRange(0x1FD0, 0x1FD3).addRange(0x1FD6, 0x1FDB).addRange(0x1FE0, 0x1FEC).addRange(0x1FF2, 0x1FF4).addRange(0x1FF6, 0x1FFC).addRange(0x2090, 0x209C).addRange(0x210A, 0x2113).addRange(0x2119, 0x211D).addRange(0x212A, 0x212D).addRange(0x212F, 0x2139).addRange(0x213C, 0x213F).addRange(0x2145, 0x2149).addRange(0x2160, 0x2188);\nset.addRange(0x24B6, 0x24E9).addRange(0x2C00, 0x2CE4).addRange(0x2CEB, 0x2CEE).addRange(0x2CF2, 0x2CF3).addRange(0x2D00, 0x2D25).addRange(0x2D30, 0x2D67).addRange(0x2D80, 0x2D96).addRange(0x2DA0, 0x2DA6).addRange(0x2DA8, 0x2DAE).addRange(0x2DB0, 0x2DB6).addRange(0x2DB8, 0x2DBE).addRange(0x2DC0, 0x2DC6).addRange(0x2DC8, 0x2DCE).addRange(0x2DD0, 0x2DD6).addRange(0x2DD8, 0x2DDE).addRange(0x2DE0, 0x2DFF).addRange(0x3005, 0x3007).addRange(0x3021, 0x3029).addRange(0x3031, 0x3035).addRange(0x3038, 0x303C).addRange(0x3041, 0x3096).addRange(0x309D, 0x309F).addRange(0x30A1, 0x30FA).addRange(0x30FC, 0x30FF).addRange(0x3105, 0x312F).addRange(0x3131, 0x318E).addRange(0x31A0, 0x31BF).addRange(0x31F0, 0x31FF).addRange(0x3400, 0x4DBF).addRange(0x4E00, 0xA48C).addRange(0xA4D0, 0xA4FD).addRange(0xA500, 0xA60C).addRange(0xA610, 0xA61F).addRange(0xA62A, 0xA62B).addRange(0xA640, 0xA66E).addRange(0xA674, 0xA67B).addRange(0xA67F, 0xA6EF).addRange(0xA717, 0xA71F).addRange(0xA722, 0xA788).addRange(0xA78B, 0xA7CA).addRange(0xA7D0, 0xA7D1).addRange(0xA7D5, 0xA7D9).addRange(0xA7F2, 0xA805).addRange(0xA807, 0xA827).addRange(0xA840, 0xA873).addRange(0xA880, 0xA8C3).addRange(0xA8F2, 0xA8F7).addRange(0xA8FD, 0xA8FF).addRange(0xA90A, 0xA92A).addRange(0xA930, 0xA952).addRange(0xA960, 0xA97C);\nset.addRange(0xA980, 0xA9B2).addRange(0xA9B4, 0xA9BF).addRange(0xA9E0, 0xA9EF).addRange(0xA9FA, 0xA9FE).addRange(0xAA00, 0xAA36).addRange(0xAA40, 0xAA4D).addRange(0xAA60, 0xAA76).addRange(0xAA7A, 0xAABE).addRange(0xAADB, 0xAADD).addRange(0xAAE0, 0xAAEF).addRange(0xAAF2, 0xAAF5).addRange(0xAB01, 0xAB06).addRange(0xAB09, 0xAB0E).addRange(0xAB11, 0xAB16).addRange(0xAB20, 0xAB26).addRange(0xAB28, 0xAB2E).addRange(0xAB30, 0xAB5A).addRange(0xAB5C, 0xAB69).addRange(0xAB70, 0xABEA).addRange(0xAC00, 0xD7A3).addRange(0xD7B0, 0xD7C6).addRange(0xD7CB, 0xD7FB).addRange(0xF900, 0xFA6D).addRange(0xFA70, 0xFAD9).addRange(0xFB00, 0xFB06).addRange(0xFB13, 0xFB17).addRange(0xFB1D, 0xFB28).addRange(0xFB2A, 0xFB36).addRange(0xFB38, 0xFB3C).addRange(0xFB40, 0xFB41).addRange(0xFB43, 0xFB44).addRange(0xFB46, 0xFBB1).addRange(0xFBD3, 0xFD3D).addRange(0xFD50, 0xFD8F).addRange(0xFD92, 0xFDC7).addRange(0xFDF0, 0xFDFB).addRange(0xFE70, 0xFE74).addRange(0xFE76, 0xFEFC).addRange(0xFF21, 0xFF3A).addRange(0xFF41, 0xFF5A).addRange(0xFF66, 0xFFBE).addRange(0xFFC2, 0xFFC7).addRange(0xFFCA, 0xFFCF).addRange(0xFFD2, 0xFFD7).addRange(0xFFDA, 0xFFDC).addRange(0x10000, 0x1000B).addRange(0x1000D, 0x10026).addRange(0x10028, 0x1003A).addRange(0x1003C, 0x1003D).addRange(0x1003F, 0x1004D).addRange(0x10050, 0x1005D);\nset.addRange(0x10080, 0x100FA).addRange(0x10140, 0x10174).addRange(0x10280, 0x1029C).addRange(0x102A0, 0x102D0).addRange(0x10300, 0x1031F).addRange(0x1032D, 0x1034A).addRange(0x10350, 0x1037A).addRange(0x10380, 0x1039D).addRange(0x103A0, 0x103C3).addRange(0x103C8, 0x103CF).addRange(0x103D1, 0x103D5).addRange(0x10400, 0x1049D).addRange(0x104B0, 0x104D3).addRange(0x104D8, 0x104FB).addRange(0x10500, 0x10527).addRange(0x10530, 0x10563).addRange(0x10570, 0x1057A).addRange(0x1057C, 0x1058A).addRange(0x1058C, 0x10592).addRange(0x10594, 0x10595).addRange(0x10597, 0x105A1).addRange(0x105A3, 0x105B1).addRange(0x105B3, 0x105B9).addRange(0x105BB, 0x105BC).addRange(0x10600, 0x10736).addRange(0x10740, 0x10755).addRange(0x10760, 0x10767).addRange(0x10780, 0x10785).addRange(0x10787, 0x107B0).addRange(0x107B2, 0x107BA).addRange(0x10800, 0x10805).addRange(0x1080A, 0x10835).addRange(0x10837, 0x10838).addRange(0x1083F, 0x10855).addRange(0x10860, 0x10876).addRange(0x10880, 0x1089E).addRange(0x108E0, 0x108F2).addRange(0x108F4, 0x108F5).addRange(0x10900, 0x10915).addRange(0x10920, 0x10939).addRange(0x10980, 0x109B7).addRange(0x109BE, 0x109BF).addRange(0x10A00, 0x10A03).addRange(0x10A05, 0x10A06).addRange(0x10A0C, 0x10A13).addRange(0x10A15, 0x10A17).addRange(0x10A19, 0x10A35).addRange(0x10A60, 0x10A7C).addRange(0x10A80, 0x10A9C).addRange(0x10AC0, 0x10AC7).addRange(0x10AC9, 0x10AE4);\nset.addRange(0x10B00, 0x10B35).addRange(0x10B40, 0x10B55).addRange(0x10B60, 0x10B72).addRange(0x10B80, 0x10B91).addRange(0x10C00, 0x10C48).addRange(0x10C80, 0x10CB2).addRange(0x10CC0, 0x10CF2).addRange(0x10D00, 0x10D27).addRange(0x10E80, 0x10EA9).addRange(0x10EAB, 0x10EAC).addRange(0x10EB0, 0x10EB1).addRange(0x10F00, 0x10F1C).addRange(0x10F30, 0x10F45).addRange(0x10F70, 0x10F81).addRange(0x10FB0, 0x10FC4).addRange(0x10FE0, 0x10FF6).addRange(0x11000, 0x11045).addRange(0x11071, 0x11075).addRange(0x11080, 0x110B8).addRange(0x110D0, 0x110E8).addRange(0x11100, 0x11132).addRange(0x11144, 0x11147).addRange(0x11150, 0x11172).addRange(0x11180, 0x111BF).addRange(0x111C1, 0x111C4).addRange(0x111CE, 0x111CF).addRange(0x11200, 0x11211).addRange(0x11213, 0x11234).addRange(0x1123E, 0x11241).addRange(0x11280, 0x11286).addRange(0x1128A, 0x1128D).addRange(0x1128F, 0x1129D).addRange(0x1129F, 0x112A8).addRange(0x112B0, 0x112E8).addRange(0x11300, 0x11303).addRange(0x11305, 0x1130C).addRange(0x1130F, 0x11310).addRange(0x11313, 0x11328).addRange(0x1132A, 0x11330).addRange(0x11332, 0x11333).addRange(0x11335, 0x11339).addRange(0x1133D, 0x11344).addRange(0x11347, 0x11348).addRange(0x1134B, 0x1134C).addRange(0x1135D, 0x11363).addRange(0x11400, 0x11441).addRange(0x11443, 0x11445).addRange(0x11447, 0x1144A).addRange(0x1145F, 0x11461).addRange(0x11480, 0x114C1).addRange(0x114C4, 0x114C5);\nset.addRange(0x11580, 0x115B5).addRange(0x115B8, 0x115BE).addRange(0x115D8, 0x115DD).addRange(0x11600, 0x1163E).addRange(0x11680, 0x116B5).addRange(0x11700, 0x1171A).addRange(0x1171D, 0x1172A).addRange(0x11740, 0x11746).addRange(0x11800, 0x11838).addRange(0x118A0, 0x118DF).addRange(0x118FF, 0x11906).addRange(0x1190C, 0x11913).addRange(0x11915, 0x11916).addRange(0x11918, 0x11935).addRange(0x11937, 0x11938).addRange(0x1193B, 0x1193C).addRange(0x1193F, 0x11942).addRange(0x119A0, 0x119A7).addRange(0x119AA, 0x119D7).addRange(0x119DA, 0x119DF).addRange(0x119E3, 0x119E4).addRange(0x11A00, 0x11A32).addRange(0x11A35, 0x11A3E).addRange(0x11A50, 0x11A97).addRange(0x11AB0, 0x11AF8).addRange(0x11C00, 0x11C08).addRange(0x11C0A, 0x11C36).addRange(0x11C38, 0x11C3E).addRange(0x11C72, 0x11C8F).addRange(0x11C92, 0x11CA7).addRange(0x11CA9, 0x11CB6).addRange(0x11D00, 0x11D06).addRange(0x11D08, 0x11D09).addRange(0x11D0B, 0x11D36).addRange(0x11D3C, 0x11D3D).addRange(0x11D3F, 0x11D41).addRange(0x11D46, 0x11D47).addRange(0x11D60, 0x11D65).addRange(0x11D67, 0x11D68).addRange(0x11D6A, 0x11D8E).addRange(0x11D90, 0x11D91).addRange(0x11D93, 0x11D96).addRange(0x11EE0, 0x11EF6).addRange(0x11F00, 0x11F10).addRange(0x11F12, 0x11F3A).addRange(0x11F3E, 0x11F40).addRange(0x12000, 0x12399).addRange(0x12400, 0x1246E).addRange(0x12480, 0x12543).addRange(0x12F90, 0x12FF0).addRange(0x13000, 0x1342F);\nset.addRange(0x13441, 0x13446).addRange(0x14400, 0x14646).addRange(0x16800, 0x16A38).addRange(0x16A40, 0x16A5E).addRange(0x16A70, 0x16ABE).addRange(0x16AD0, 0x16AED).addRange(0x16B00, 0x16B2F).addRange(0x16B40, 0x16B43).addRange(0x16B63, 0x16B77).addRange(0x16B7D, 0x16B8F).addRange(0x16E40, 0x16E7F).addRange(0x16F00, 0x16F4A).addRange(0x16F4F, 0x16F87).addRange(0x16F8F, 0x16F9F).addRange(0x16FE0, 0x16FE1).addRange(0x16FF0, 0x16FF1).addRange(0x17000, 0x187F7).addRange(0x18800, 0x18CD5).addRange(0x18D00, 0x18D08).addRange(0x1AFF0, 0x1AFF3).addRange(0x1AFF5, 0x1AFFB).addRange(0x1AFFD, 0x1AFFE).addRange(0x1B000, 0x1B122).addRange(0x1B150, 0x1B152).addRange(0x1B164, 0x1B167).addRange(0x1B170, 0x1B2FB).addRange(0x1BC00, 0x1BC6A).addRange(0x1BC70, 0x1BC7C).addRange(0x1BC80, 0x1BC88).addRange(0x1BC90, 0x1BC99).addRange(0x1D400, 0x1D454).addRange(0x1D456, 0x1D49C).addRange(0x1D49E, 0x1D49F).addRange(0x1D4A5, 0x1D4A6).addRange(0x1D4A9, 0x1D4AC).addRange(0x1D4AE, 0x1D4B9).addRange(0x1D4BD, 0x1D4C3).addRange(0x1D4C5, 0x1D505).addRange(0x1D507, 0x1D50A).addRange(0x1D50D, 0x1D514).addRange(0x1D516, 0x1D51C).addRange(0x1D51E, 0x1D539).addRange(0x1D53B, 0x1D53E).addRange(0x1D540, 0x1D544).addRange(0x1D54A, 0x1D550).addRange(0x1D552, 0x1D6A5).addRange(0x1D6A8, 0x1D6C0).addRange(0x1D6C2, 0x1D6DA).addRange(0x1D6DC, 0x1D6FA).addRange(0x1D6FC, 0x1D714).addRange(0x1D716, 0x1D734);\nset.addRange(0x1D736, 0x1D74E).addRange(0x1D750, 0x1D76E).addRange(0x1D770, 0x1D788).addRange(0x1D78A, 0x1D7A8).addRange(0x1D7AA, 0x1D7C2).addRange(0x1D7C4, 0x1D7CB).addRange(0x1DF00, 0x1DF1E).addRange(0x1DF25, 0x1DF2A).addRange(0x1E000, 0x1E006).addRange(0x1E008, 0x1E018).addRange(0x1E01B, 0x1E021).addRange(0x1E023, 0x1E024).addRange(0x1E026, 0x1E02A).addRange(0x1E030, 0x1E06D).addRange(0x1E100, 0x1E12C).addRange(0x1E137, 0x1E13D).addRange(0x1E290, 0x1E2AD).addRange(0x1E2C0, 0x1E2EB).addRange(0x1E4D0, 0x1E4EB).addRange(0x1E7E0, 0x1E7E6).addRange(0x1E7E8, 0x1E7EB).addRange(0x1E7ED, 0x1E7EE).addRange(0x1E7F0, 0x1E7FE).addRange(0x1E800, 0x1E8C4).addRange(0x1E900, 0x1E943).addRange(0x1EE00, 0x1EE03).addRange(0x1EE05, 0x1EE1F).addRange(0x1EE21, 0x1EE22).addRange(0x1EE29, 0x1EE32).addRange(0x1EE34, 0x1EE37).addRange(0x1EE4D, 0x1EE4F).addRange(0x1EE51, 0x1EE52).addRange(0x1EE61, 0x1EE62).addRange(0x1EE67, 0x1EE6A).addRange(0x1EE6C, 0x1EE72).addRange(0x1EE74, 0x1EE77).addRange(0x1EE79, 0x1EE7C).addRange(0x1EE80, 0x1EE89).addRange(0x1EE8B, 0x1EE9B).addRange(0x1EEA1, 0x1EEA3).addRange(0x1EEA5, 0x1EEA9).addRange(0x1EEAB, 0x1EEBB).addRange(0x1F130, 0x1F149).addRange(0x1F150, 0x1F169).addRange(0x1F170, 0x1F189).addRange(0x20000, 0x2A6DF).addRange(0x2A700, 0x2B739).addRange(0x2B740, 0x2B81D).addRange(0x2B820, 0x2CEA1).addRange(0x2CEB0, 0x2EBE0).addRange(0x2EBF0, 0x2EE5D);\nset.addRange(0x2F800, 0x2FA1D).addRange(0x30000, 0x3134A).addRange(0x31350, 0x323AF);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x0, 0x10FFFF);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x30, 0x39).addRange(0x41, 0x46).addRange(0x61, 0x66);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x0, 0x7F);\nexports.characters = set;\n","const set = require('regenerate')(0x38C, 0x85E, 0x9B2, 0x9D7, 0xA3C, 0xA51, 0xA5E, 0xAD0, 0xB9C, 0xBD0, 0xBD7, 0xC5D, 0xDBD, 0xDCA, 0xDD6, 0xE84, 0xEA5, 0xEC6, 0x10C7, 0x10CD, 0x1258, 0x12C0, 0x1940, 0x1F59, 0x1F5B, 0x1F5D, 0x2D27, 0x2D2D, 0xA7D3, 0xFB3E, 0xFDCF, 0xFEFF, 0x101A0, 0x10808, 0x1083C, 0x1093F, 0x110CD, 0x11288, 0x11350, 0x11357, 0x11909, 0x11D3A, 0x11FB0, 0x1B132, 0x1B155, 0x1D4A2, 0x1D4BB, 0x1D546, 0x1E08F, 0x1E2FF, 0x1EE24, 0x1EE27, 0x1EE39, 0x1EE3B, 0x1EE42, 0x1EE47, 0x1EE49, 0x1EE4B, 0x1EE54, 0x1EE57, 0x1EE59, 0x1EE5B, 0x1EE5D, 0x1EE5F, 0x1EE64, 0x1EE7E, 0x1F7F0, 0xE0001);\nset.addRange(0x0, 0x377).addRange(0x37A, 0x37F).addRange(0x384, 0x38A).addRange(0x38E, 0x3A1).addRange(0x3A3, 0x52F).addRange(0x531, 0x556).addRange(0x559, 0x58A).addRange(0x58D, 0x58F).addRange(0x591, 0x5C7).addRange(0x5D0, 0x5EA).addRange(0x5EF, 0x5F4).addRange(0x600, 0x70D).addRange(0x70F, 0x74A).addRange(0x74D, 0x7B1).addRange(0x7C0, 0x7FA).addRange(0x7FD, 0x82D).addRange(0x830, 0x83E).addRange(0x840, 0x85B).addRange(0x860, 0x86A).addRange(0x870, 0x88E).addRange(0x890, 0x891).addRange(0x898, 0x983).addRange(0x985, 0x98C).addRange(0x98F, 0x990).addRange(0x993, 0x9A8).addRange(0x9AA, 0x9B0).addRange(0x9B6, 0x9B9).addRange(0x9BC, 0x9C4).addRange(0x9C7, 0x9C8).addRange(0x9CB, 0x9CE).addRange(0x9DC, 0x9DD).addRange(0x9DF, 0x9E3).addRange(0x9E6, 0x9FE).addRange(0xA01, 0xA03).addRange(0xA05, 0xA0A).addRange(0xA0F, 0xA10).addRange(0xA13, 0xA28).addRange(0xA2A, 0xA30).addRange(0xA32, 0xA33).addRange(0xA35, 0xA36).addRange(0xA38, 0xA39).addRange(0xA3E, 0xA42).addRange(0xA47, 0xA48).addRange(0xA4B, 0xA4D).addRange(0xA59, 0xA5C).addRange(0xA66, 0xA76).addRange(0xA81, 0xA83).addRange(0xA85, 0xA8D).addRange(0xA8F, 0xA91).addRange(0xA93, 0xAA8).addRange(0xAAA, 0xAB0);\nset.addRange(0xAB2, 0xAB3).addRange(0xAB5, 0xAB9).addRange(0xABC, 0xAC5).addRange(0xAC7, 0xAC9).addRange(0xACB, 0xACD).addRange(0xAE0, 0xAE3).addRange(0xAE6, 0xAF1).addRange(0xAF9, 0xAFF).addRange(0xB01, 0xB03).addRange(0xB05, 0xB0C).addRange(0xB0F, 0xB10).addRange(0xB13, 0xB28).addRange(0xB2A, 0xB30).addRange(0xB32, 0xB33).addRange(0xB35, 0xB39).addRange(0xB3C, 0xB44).addRange(0xB47, 0xB48).addRange(0xB4B, 0xB4D).addRange(0xB55, 0xB57).addRange(0xB5C, 0xB5D).addRange(0xB5F, 0xB63).addRange(0xB66, 0xB77).addRange(0xB82, 0xB83).addRange(0xB85, 0xB8A).addRange(0xB8E, 0xB90).addRange(0xB92, 0xB95).addRange(0xB99, 0xB9A).addRange(0xB9E, 0xB9F).addRange(0xBA3, 0xBA4).addRange(0xBA8, 0xBAA).addRange(0xBAE, 0xBB9).addRange(0xBBE, 0xBC2).addRange(0xBC6, 0xBC8).addRange(0xBCA, 0xBCD).addRange(0xBE6, 0xBFA).addRange(0xC00, 0xC0C).addRange(0xC0E, 0xC10).addRange(0xC12, 0xC28).addRange(0xC2A, 0xC39).addRange(0xC3C, 0xC44).addRange(0xC46, 0xC48).addRange(0xC4A, 0xC4D).addRange(0xC55, 0xC56).addRange(0xC58, 0xC5A).addRange(0xC60, 0xC63).addRange(0xC66, 0xC6F).addRange(0xC77, 0xC8C).addRange(0xC8E, 0xC90).addRange(0xC92, 0xCA8).addRange(0xCAA, 0xCB3).addRange(0xCB5, 0xCB9);\nset.addRange(0xCBC, 0xCC4).addRange(0xCC6, 0xCC8).addRange(0xCCA, 0xCCD).addRange(0xCD5, 0xCD6).addRange(0xCDD, 0xCDE).addRange(0xCE0, 0xCE3).addRange(0xCE6, 0xCEF).addRange(0xCF1, 0xCF3).addRange(0xD00, 0xD0C).addRange(0xD0E, 0xD10).addRange(0xD12, 0xD44).addRange(0xD46, 0xD48).addRange(0xD4A, 0xD4F).addRange(0xD54, 0xD63).addRange(0xD66, 0xD7F).addRange(0xD81, 0xD83).addRange(0xD85, 0xD96).addRange(0xD9A, 0xDB1).addRange(0xDB3, 0xDBB).addRange(0xDC0, 0xDC6).addRange(0xDCF, 0xDD4).addRange(0xDD8, 0xDDF).addRange(0xDE6, 0xDEF).addRange(0xDF2, 0xDF4).addRange(0xE01, 0xE3A).addRange(0xE3F, 0xE5B).addRange(0xE81, 0xE82).addRange(0xE86, 0xE8A).addRange(0xE8C, 0xEA3).addRange(0xEA7, 0xEBD).addRange(0xEC0, 0xEC4).addRange(0xEC8, 0xECE).addRange(0xED0, 0xED9).addRange(0xEDC, 0xEDF).addRange(0xF00, 0xF47).addRange(0xF49, 0xF6C).addRange(0xF71, 0xF97).addRange(0xF99, 0xFBC).addRange(0xFBE, 0xFCC).addRange(0xFCE, 0xFDA).addRange(0x1000, 0x10C5).addRange(0x10D0, 0x1248).addRange(0x124A, 0x124D).addRange(0x1250, 0x1256).addRange(0x125A, 0x125D).addRange(0x1260, 0x1288).addRange(0x128A, 0x128D).addRange(0x1290, 0x12B0).addRange(0x12B2, 0x12B5).addRange(0x12B8, 0x12BE).addRange(0x12C2, 0x12C5);\nset.addRange(0x12C8, 0x12D6).addRange(0x12D8, 0x1310).addRange(0x1312, 0x1315).addRange(0x1318, 0x135A).addRange(0x135D, 0x137C).addRange(0x1380, 0x1399).addRange(0x13A0, 0x13F5).addRange(0x13F8, 0x13FD).addRange(0x1400, 0x169C).addRange(0x16A0, 0x16F8).addRange(0x1700, 0x1715).addRange(0x171F, 0x1736).addRange(0x1740, 0x1753).addRange(0x1760, 0x176C).addRange(0x176E, 0x1770).addRange(0x1772, 0x1773).addRange(0x1780, 0x17DD).addRange(0x17E0, 0x17E9).addRange(0x17F0, 0x17F9).addRange(0x1800, 0x1819).addRange(0x1820, 0x1878).addRange(0x1880, 0x18AA).addRange(0x18B0, 0x18F5).addRange(0x1900, 0x191E).addRange(0x1920, 0x192B).addRange(0x1930, 0x193B).addRange(0x1944, 0x196D).addRange(0x1970, 0x1974).addRange(0x1980, 0x19AB).addRange(0x19B0, 0x19C9).addRange(0x19D0, 0x19DA).addRange(0x19DE, 0x1A1B).addRange(0x1A1E, 0x1A5E).addRange(0x1A60, 0x1A7C).addRange(0x1A7F, 0x1A89).addRange(0x1A90, 0x1A99).addRange(0x1AA0, 0x1AAD).addRange(0x1AB0, 0x1ACE).addRange(0x1B00, 0x1B4C).addRange(0x1B50, 0x1B7E).addRange(0x1B80, 0x1BF3).addRange(0x1BFC, 0x1C37).addRange(0x1C3B, 0x1C49).addRange(0x1C4D, 0x1C88).addRange(0x1C90, 0x1CBA).addRange(0x1CBD, 0x1CC7).addRange(0x1CD0, 0x1CFA).addRange(0x1D00, 0x1F15).addRange(0x1F18, 0x1F1D).addRange(0x1F20, 0x1F45).addRange(0x1F48, 0x1F4D);\nset.addRange(0x1F50, 0x1F57).addRange(0x1F5F, 0x1F7D).addRange(0x1F80, 0x1FB4).addRange(0x1FB6, 0x1FC4).addRange(0x1FC6, 0x1FD3).addRange(0x1FD6, 0x1FDB).addRange(0x1FDD, 0x1FEF).addRange(0x1FF2, 0x1FF4).addRange(0x1FF6, 0x1FFE).addRange(0x2000, 0x2064).addRange(0x2066, 0x2071).addRange(0x2074, 0x208E).addRange(0x2090, 0x209C).addRange(0x20A0, 0x20C0).addRange(0x20D0, 0x20F0).addRange(0x2100, 0x218B).addRange(0x2190, 0x2426).addRange(0x2440, 0x244A).addRange(0x2460, 0x2B73).addRange(0x2B76, 0x2B95).addRange(0x2B97, 0x2CF3).addRange(0x2CF9, 0x2D25).addRange(0x2D30, 0x2D67).addRange(0x2D6F, 0x2D70).addRange(0x2D7F, 0x2D96).addRange(0x2DA0, 0x2DA6).addRange(0x2DA8, 0x2DAE).addRange(0x2DB0, 0x2DB6).addRange(0x2DB8, 0x2DBE).addRange(0x2DC0, 0x2DC6).addRange(0x2DC8, 0x2DCE).addRange(0x2DD0, 0x2DD6).addRange(0x2DD8, 0x2DDE).addRange(0x2DE0, 0x2E5D).addRange(0x2E80, 0x2E99).addRange(0x2E9B, 0x2EF3).addRange(0x2F00, 0x2FD5).addRange(0x2FF0, 0x303F).addRange(0x3041, 0x3096).addRange(0x3099, 0x30FF).addRange(0x3105, 0x312F).addRange(0x3131, 0x318E).addRange(0x3190, 0x31E3).addRange(0x31EF, 0x321E).addRange(0x3220, 0xA48C).addRange(0xA490, 0xA4C6).addRange(0xA4D0, 0xA62B).addRange(0xA640, 0xA6F7).addRange(0xA700, 0xA7CA).addRange(0xA7D0, 0xA7D1).addRange(0xA7D5, 0xA7D9);\nset.addRange(0xA7F2, 0xA82C).addRange(0xA830, 0xA839).addRange(0xA840, 0xA877).addRange(0xA880, 0xA8C5).addRange(0xA8CE, 0xA8D9).addRange(0xA8E0, 0xA953).addRange(0xA95F, 0xA97C).addRange(0xA980, 0xA9CD).addRange(0xA9CF, 0xA9D9).addRange(0xA9DE, 0xA9FE).addRange(0xAA00, 0xAA36).addRange(0xAA40, 0xAA4D).addRange(0xAA50, 0xAA59).addRange(0xAA5C, 0xAAC2).addRange(0xAADB, 0xAAF6).addRange(0xAB01, 0xAB06).addRange(0xAB09, 0xAB0E).addRange(0xAB11, 0xAB16).addRange(0xAB20, 0xAB26).addRange(0xAB28, 0xAB2E).addRange(0xAB30, 0xAB6B).addRange(0xAB70, 0xABED).addRange(0xABF0, 0xABF9).addRange(0xAC00, 0xD7A3).addRange(0xD7B0, 0xD7C6).addRange(0xD7CB, 0xD7FB).addRange(0xD800, 0xFA6D).addRange(0xFA70, 0xFAD9).addRange(0xFB00, 0xFB06).addRange(0xFB13, 0xFB17).addRange(0xFB1D, 0xFB36).addRange(0xFB38, 0xFB3C).addRange(0xFB40, 0xFB41).addRange(0xFB43, 0xFB44).addRange(0xFB46, 0xFBC2).addRange(0xFBD3, 0xFD8F).addRange(0xFD92, 0xFDC7).addRange(0xFDF0, 0xFE19).addRange(0xFE20, 0xFE52).addRange(0xFE54, 0xFE66).addRange(0xFE68, 0xFE6B).addRange(0xFE70, 0xFE74).addRange(0xFE76, 0xFEFC).addRange(0xFF01, 0xFFBE).addRange(0xFFC2, 0xFFC7).addRange(0xFFCA, 0xFFCF).addRange(0xFFD2, 0xFFD7).addRange(0xFFDA, 0xFFDC).addRange(0xFFE0, 0xFFE6).addRange(0xFFE8, 0xFFEE).addRange(0xFFF9, 0xFFFD);\nset.addRange(0x10000, 0x1000B).addRange(0x1000D, 0x10026).addRange(0x10028, 0x1003A).addRange(0x1003C, 0x1003D).addRange(0x1003F, 0x1004D).addRange(0x10050, 0x1005D).addRange(0x10080, 0x100FA).addRange(0x10100, 0x10102).addRange(0x10107, 0x10133).addRange(0x10137, 0x1018E).addRange(0x10190, 0x1019C).addRange(0x101D0, 0x101FD).addRange(0x10280, 0x1029C).addRange(0x102A0, 0x102D0).addRange(0x102E0, 0x102FB).addRange(0x10300, 0x10323).addRange(0x1032D, 0x1034A).addRange(0x10350, 0x1037A).addRange(0x10380, 0x1039D).addRange(0x1039F, 0x103C3).addRange(0x103C8, 0x103D5).addRange(0x10400, 0x1049D).addRange(0x104A0, 0x104A9).addRange(0x104B0, 0x104D3).addRange(0x104D8, 0x104FB).addRange(0x10500, 0x10527).addRange(0x10530, 0x10563).addRange(0x1056F, 0x1057A).addRange(0x1057C, 0x1058A).addRange(0x1058C, 0x10592).addRange(0x10594, 0x10595).addRange(0x10597, 0x105A1).addRange(0x105A3, 0x105B1).addRange(0x105B3, 0x105B9).addRange(0x105BB, 0x105BC).addRange(0x10600, 0x10736).addRange(0x10740, 0x10755).addRange(0x10760, 0x10767).addRange(0x10780, 0x10785).addRange(0x10787, 0x107B0).addRange(0x107B2, 0x107BA).addRange(0x10800, 0x10805).addRange(0x1080A, 0x10835).addRange(0x10837, 0x10838).addRange(0x1083F, 0x10855).addRange(0x10857, 0x1089E).addRange(0x108A7, 0x108AF).addRange(0x108E0, 0x108F2).addRange(0x108F4, 0x108F5).addRange(0x108FB, 0x1091B).addRange(0x1091F, 0x10939);\nset.addRange(0x10980, 0x109B7).addRange(0x109BC, 0x109CF).addRange(0x109D2, 0x10A03).addRange(0x10A05, 0x10A06).addRange(0x10A0C, 0x10A13).addRange(0x10A15, 0x10A17).addRange(0x10A19, 0x10A35).addRange(0x10A38, 0x10A3A).addRange(0x10A3F, 0x10A48).addRange(0x10A50, 0x10A58).addRange(0x10A60, 0x10A9F).addRange(0x10AC0, 0x10AE6).addRange(0x10AEB, 0x10AF6).addRange(0x10B00, 0x10B35).addRange(0x10B39, 0x10B55).addRange(0x10B58, 0x10B72).addRange(0x10B78, 0x10B91).addRange(0x10B99, 0x10B9C).addRange(0x10BA9, 0x10BAF).addRange(0x10C00, 0x10C48).addRange(0x10C80, 0x10CB2).addRange(0x10CC0, 0x10CF2).addRange(0x10CFA, 0x10D27).addRange(0x10D30, 0x10D39).addRange(0x10E60, 0x10E7E).addRange(0x10E80, 0x10EA9).addRange(0x10EAB, 0x10EAD).addRange(0x10EB0, 0x10EB1).addRange(0x10EFD, 0x10F27).addRange(0x10F30, 0x10F59).addRange(0x10F70, 0x10F89).addRange(0x10FB0, 0x10FCB).addRange(0x10FE0, 0x10FF6).addRange(0x11000, 0x1104D).addRange(0x11052, 0x11075).addRange(0x1107F, 0x110C2).addRange(0x110D0, 0x110E8).addRange(0x110F0, 0x110F9).addRange(0x11100, 0x11134).addRange(0x11136, 0x11147).addRange(0x11150, 0x11176).addRange(0x11180, 0x111DF).addRange(0x111E1, 0x111F4).addRange(0x11200, 0x11211).addRange(0x11213, 0x11241).addRange(0x11280, 0x11286).addRange(0x1128A, 0x1128D).addRange(0x1128F, 0x1129D).addRange(0x1129F, 0x112A9).addRange(0x112B0, 0x112EA).addRange(0x112F0, 0x112F9);\nset.addRange(0x11300, 0x11303).addRange(0x11305, 0x1130C).addRange(0x1130F, 0x11310).addRange(0x11313, 0x11328).addRange(0x1132A, 0x11330).addRange(0x11332, 0x11333).addRange(0x11335, 0x11339).addRange(0x1133B, 0x11344).addRange(0x11347, 0x11348).addRange(0x1134B, 0x1134D).addRange(0x1135D, 0x11363).addRange(0x11366, 0x1136C).addRange(0x11370, 0x11374).addRange(0x11400, 0x1145B).addRange(0x1145D, 0x11461).addRange(0x11480, 0x114C7).addRange(0x114D0, 0x114D9).addRange(0x11580, 0x115B5).addRange(0x115B8, 0x115DD).addRange(0x11600, 0x11644).addRange(0x11650, 0x11659).addRange(0x11660, 0x1166C).addRange(0x11680, 0x116B9).addRange(0x116C0, 0x116C9).addRange(0x11700, 0x1171A).addRange(0x1171D, 0x1172B).addRange(0x11730, 0x11746).addRange(0x11800, 0x1183B).addRange(0x118A0, 0x118F2).addRange(0x118FF, 0x11906).addRange(0x1190C, 0x11913).addRange(0x11915, 0x11916).addRange(0x11918, 0x11935).addRange(0x11937, 0x11938).addRange(0x1193B, 0x11946).addRange(0x11950, 0x11959).addRange(0x119A0, 0x119A7).addRange(0x119AA, 0x119D7).addRange(0x119DA, 0x119E4).addRange(0x11A00, 0x11A47).addRange(0x11A50, 0x11AA2).addRange(0x11AB0, 0x11AF8).addRange(0x11B00, 0x11B09).addRange(0x11C00, 0x11C08).addRange(0x11C0A, 0x11C36).addRange(0x11C38, 0x11C45).addRange(0x11C50, 0x11C6C).addRange(0x11C70, 0x11C8F).addRange(0x11C92, 0x11CA7).addRange(0x11CA9, 0x11CB6).addRange(0x11D00, 0x11D06);\nset.addRange(0x11D08, 0x11D09).addRange(0x11D0B, 0x11D36).addRange(0x11D3C, 0x11D3D).addRange(0x11D3F, 0x11D47).addRange(0x11D50, 0x11D59).addRange(0x11D60, 0x11D65).addRange(0x11D67, 0x11D68).addRange(0x11D6A, 0x11D8E).addRange(0x11D90, 0x11D91).addRange(0x11D93, 0x11D98).addRange(0x11DA0, 0x11DA9).addRange(0x11EE0, 0x11EF8).addRange(0x11F00, 0x11F10).addRange(0x11F12, 0x11F3A).addRange(0x11F3E, 0x11F59).addRange(0x11FC0, 0x11FF1).addRange(0x11FFF, 0x12399).addRange(0x12400, 0x1246E).addRange(0x12470, 0x12474).addRange(0x12480, 0x12543).addRange(0x12F90, 0x12FF2).addRange(0x13000, 0x13455).addRange(0x14400, 0x14646).addRange(0x16800, 0x16A38).addRange(0x16A40, 0x16A5E).addRange(0x16A60, 0x16A69).addRange(0x16A6E, 0x16ABE).addRange(0x16AC0, 0x16AC9).addRange(0x16AD0, 0x16AED).addRange(0x16AF0, 0x16AF5).addRange(0x16B00, 0x16B45).addRange(0x16B50, 0x16B59).addRange(0x16B5B, 0x16B61).addRange(0x16B63, 0x16B77).addRange(0x16B7D, 0x16B8F).addRange(0x16E40, 0x16E9A).addRange(0x16F00, 0x16F4A).addRange(0x16F4F, 0x16F87).addRange(0x16F8F, 0x16F9F).addRange(0x16FE0, 0x16FE4).addRange(0x16FF0, 0x16FF1).addRange(0x17000, 0x187F7).addRange(0x18800, 0x18CD5).addRange(0x18D00, 0x18D08).addRange(0x1AFF0, 0x1AFF3).addRange(0x1AFF5, 0x1AFFB).addRange(0x1AFFD, 0x1AFFE).addRange(0x1B000, 0x1B122).addRange(0x1B150, 0x1B152).addRange(0x1B164, 0x1B167).addRange(0x1B170, 0x1B2FB);\nset.addRange(0x1BC00, 0x1BC6A).addRange(0x1BC70, 0x1BC7C).addRange(0x1BC80, 0x1BC88).addRange(0x1BC90, 0x1BC99).addRange(0x1BC9C, 0x1BCA3).addRange(0x1CF00, 0x1CF2D).addRange(0x1CF30, 0x1CF46).addRange(0x1CF50, 0x1CFC3).addRange(0x1D000, 0x1D0F5).addRange(0x1D100, 0x1D126).addRange(0x1D129, 0x1D1EA).addRange(0x1D200, 0x1D245).addRange(0x1D2C0, 0x1D2D3).addRange(0x1D2E0, 0x1D2F3).addRange(0x1D300, 0x1D356).addRange(0x1D360, 0x1D378).addRange(0x1D400, 0x1D454).addRange(0x1D456, 0x1D49C).addRange(0x1D49E, 0x1D49F).addRange(0x1D4A5, 0x1D4A6).addRange(0x1D4A9, 0x1D4AC).addRange(0x1D4AE, 0x1D4B9).addRange(0x1D4BD, 0x1D4C3).addRange(0x1D4C5, 0x1D505).addRange(0x1D507, 0x1D50A).addRange(0x1D50D, 0x1D514).addRange(0x1D516, 0x1D51C).addRange(0x1D51E, 0x1D539).addRange(0x1D53B, 0x1D53E).addRange(0x1D540, 0x1D544).addRange(0x1D54A, 0x1D550).addRange(0x1D552, 0x1D6A5).addRange(0x1D6A8, 0x1D7CB).addRange(0x1D7CE, 0x1DA8B).addRange(0x1DA9B, 0x1DA9F).addRange(0x1DAA1, 0x1DAAF).addRange(0x1DF00, 0x1DF1E).addRange(0x1DF25, 0x1DF2A).addRange(0x1E000, 0x1E006).addRange(0x1E008, 0x1E018).addRange(0x1E01B, 0x1E021).addRange(0x1E023, 0x1E024).addRange(0x1E026, 0x1E02A).addRange(0x1E030, 0x1E06D).addRange(0x1E100, 0x1E12C).addRange(0x1E130, 0x1E13D).addRange(0x1E140, 0x1E149).addRange(0x1E14E, 0x1E14F).addRange(0x1E290, 0x1E2AE).addRange(0x1E2C0, 0x1E2F9).addRange(0x1E4D0, 0x1E4F9);\nset.addRange(0x1E7E0, 0x1E7E6).addRange(0x1E7E8, 0x1E7EB).addRange(0x1E7ED, 0x1E7EE).addRange(0x1E7F0, 0x1E7FE).addRange(0x1E800, 0x1E8C4).addRange(0x1E8C7, 0x1E8D6).addRange(0x1E900, 0x1E94B).addRange(0x1E950, 0x1E959).addRange(0x1E95E, 0x1E95F).addRange(0x1EC71, 0x1ECB4).addRange(0x1ED01, 0x1ED3D).addRange(0x1EE00, 0x1EE03).addRange(0x1EE05, 0x1EE1F).addRange(0x1EE21, 0x1EE22).addRange(0x1EE29, 0x1EE32).addRange(0x1EE34, 0x1EE37).addRange(0x1EE4D, 0x1EE4F).addRange(0x1EE51, 0x1EE52).addRange(0x1EE61, 0x1EE62).addRange(0x1EE67, 0x1EE6A).addRange(0x1EE6C, 0x1EE72).addRange(0x1EE74, 0x1EE77).addRange(0x1EE79, 0x1EE7C).addRange(0x1EE80, 0x1EE89).addRange(0x1EE8B, 0x1EE9B).addRange(0x1EEA1, 0x1EEA3).addRange(0x1EEA5, 0x1EEA9).addRange(0x1EEAB, 0x1EEBB).addRange(0x1EEF0, 0x1EEF1).addRange(0x1F000, 0x1F02B).addRange(0x1F030, 0x1F093).addRange(0x1F0A0, 0x1F0AE).addRange(0x1F0B1, 0x1F0BF).addRange(0x1F0C1, 0x1F0CF).addRange(0x1F0D1, 0x1F0F5).addRange(0x1F100, 0x1F1AD).addRange(0x1F1E6, 0x1F202).addRange(0x1F210, 0x1F23B).addRange(0x1F240, 0x1F248).addRange(0x1F250, 0x1F251).addRange(0x1F260, 0x1F265).addRange(0x1F300, 0x1F6D7).addRange(0x1F6DC, 0x1F6EC).addRange(0x1F6F0, 0x1F6FC).addRange(0x1F700, 0x1F776).addRange(0x1F77B, 0x1F7D9).addRange(0x1F7E0, 0x1F7EB).addRange(0x1F800, 0x1F80B).addRange(0x1F810, 0x1F847).addRange(0x1F850, 0x1F859).addRange(0x1F860, 0x1F887);\nset.addRange(0x1F890, 0x1F8AD).addRange(0x1F8B0, 0x1F8B1).addRange(0x1F900, 0x1FA53).addRange(0x1FA60, 0x1FA6D).addRange(0x1FA70, 0x1FA7C).addRange(0x1FA80, 0x1FA88).addRange(0x1FA90, 0x1FABD).addRange(0x1FABF, 0x1FAC5).addRange(0x1FACE, 0x1FADB).addRange(0x1FAE0, 0x1FAE8).addRange(0x1FAF0, 0x1FAF8).addRange(0x1FB00, 0x1FB92).addRange(0x1FB94, 0x1FBCA).addRange(0x1FBF0, 0x1FBF9).addRange(0x20000, 0x2A6DF).addRange(0x2A700, 0x2B739).addRange(0x2B740, 0x2B81D).addRange(0x2B820, 0x2CEA1).addRange(0x2CEB0, 0x2EBE0).addRange(0x2EBF0, 0x2EE5D).addRange(0x2F800, 0x2FA1D).addRange(0x30000, 0x3134A).addRange(0x31350, 0x323AF).addRange(0xE0020, 0xE007F).addRange(0xE0100, 0xE01EF).addRange(0xF0000, 0xFFFFD).addRange(0x100000, 0x10FFFD);\nexports.characters = set;\n","const set = require('regenerate')(0x61C);\nset.addRange(0x200E, 0x200F).addRange(0x202A, 0x202E).addRange(0x2066, 0x2069);\nexports.characters = set;\n","const set = require('regenerate')(0x3C, 0x3E, 0x5B, 0x5D, 0x7B, 0x7D, 0xAB, 0xBB, 0x2140, 0x2211, 0x2224, 0x2226, 0x2239, 0x2262, 0x2298, 0x27C0, 0x29B8, 0x29C9, 0x29E1, 0x2A24, 0x2A26, 0x2A29, 0x2ADC, 0x2ADE, 0x2AF3, 0x2AFD, 0x2BFE, 0xFF1C, 0xFF1E, 0xFF3B, 0xFF3D, 0xFF5B, 0xFF5D, 0x1D6DB, 0x1D715, 0x1D74F, 0x1D789, 0x1D7C3);\nset.addRange(0x28, 0x29).addRange(0xF3A, 0xF3D).addRange(0x169B, 0x169C).addRange(0x2039, 0x203A).addRange(0x2045, 0x2046).addRange(0x207D, 0x207E).addRange(0x208D, 0x208E).addRange(0x2201, 0x2204).addRange(0x2208, 0x220D).addRange(0x2215, 0x2216).addRange(0x221A, 0x221D).addRange(0x221F, 0x2222).addRange(0x222B, 0x2233).addRange(0x223B, 0x224C).addRange(0x2252, 0x2255).addRange(0x225F, 0x2260).addRange(0x2264, 0x226B).addRange(0x226E, 0x228C).addRange(0x228F, 0x2292).addRange(0x22A2, 0x22A3).addRange(0x22A6, 0x22B8).addRange(0x22BE, 0x22BF).addRange(0x22C9, 0x22CD).addRange(0x22D0, 0x22D1).addRange(0x22D6, 0x22ED).addRange(0x22F0, 0x22FF).addRange(0x2308, 0x230B).addRange(0x2320, 0x2321).addRange(0x2329, 0x232A).addRange(0x2768, 0x2775).addRange(0x27C3, 0x27C6).addRange(0x27C8, 0x27C9).addRange(0x27CB, 0x27CD).addRange(0x27D3, 0x27D6).addRange(0x27DC, 0x27DE).addRange(0x27E2, 0x27EF).addRange(0x2983, 0x2998).addRange(0x299B, 0x29A0).addRange(0x29A2, 0x29AF).addRange(0x29C0, 0x29C5).addRange(0x29CE, 0x29D2).addRange(0x29D4, 0x29D5).addRange(0x29D8, 0x29DC).addRange(0x29E3, 0x29E5).addRange(0x29E8, 0x29E9).addRange(0x29F4, 0x29F9).addRange(0x29FC, 0x29FD).addRange(0x2A0A, 0x2A1C).addRange(0x2A1E, 0x2A21).addRange(0x2A2B, 0x2A2E).addRange(0x2A34, 0x2A35);\nset.addRange(0x2A3C, 0x2A3E).addRange(0x2A57, 0x2A58).addRange(0x2A64, 0x2A65).addRange(0x2A6A, 0x2A6D).addRange(0x2A6F, 0x2A70).addRange(0x2A73, 0x2A74).addRange(0x2A79, 0x2AA3).addRange(0x2AA6, 0x2AAD).addRange(0x2AAF, 0x2AD6).addRange(0x2AE2, 0x2AE6).addRange(0x2AEC, 0x2AEE).addRange(0x2AF7, 0x2AFB).addRange(0x2E02, 0x2E05).addRange(0x2E09, 0x2E0A).addRange(0x2E0C, 0x2E0D).addRange(0x2E1C, 0x2E1D).addRange(0x2E20, 0x2E29).addRange(0x2E55, 0x2E5C).addRange(0x3008, 0x3011).addRange(0x3014, 0x301B).addRange(0xFE59, 0xFE5E).addRange(0xFE64, 0xFE65).addRange(0xFF08, 0xFF09).addRange(0xFF5F, 0xFF60).addRange(0xFF62, 0xFF63);\nexports.characters = set;\n","const set = require('regenerate')(0x27, 0x2E, 0x3A, 0x5E, 0x60, 0xA8, 0xAD, 0xAF, 0xB4, 0x37A, 0x387, 0x559, 0x55F, 0x5BF, 0x5C7, 0x5F4, 0x61C, 0x640, 0x670, 0x70F, 0x711, 0x7FA, 0x7FD, 0x888, 0x93A, 0x93C, 0x94D, 0x971, 0x981, 0x9BC, 0x9CD, 0x9FE, 0xA3C, 0xA51, 0xA75, 0xABC, 0xACD, 0xB01, 0xB3C, 0xB3F, 0xB4D, 0xB82, 0xBC0, 0xBCD, 0xC00, 0xC04, 0xC3C, 0xC81, 0xCBC, 0xCBF, 0xCC6, 0xD4D, 0xD81, 0xDCA, 0xDD6, 0xE31, 0xEB1, 0xEC6, 0xF35, 0xF37, 0xF39, 0xFC6, 0x1082, 0x108D, 0x109D, 0x10FC, 0x17C6, 0x17D7, 0x17DD, 0x1843, 0x18A9, 0x1932, 0x1A1B, 0x1A56, 0x1A60, 0x1A62, 0x1A7F, 0x1AA7, 0x1B34, 0x1B3C, 0x1B42, 0x1BE6, 0x1BED, 0x1CED, 0x1CF4, 0x1D78, 0x1FBD, 0x2024, 0x2027, 0x2071, 0x207F, 0x2D6F, 0x2D7F, 0x2E2F, 0x3005, 0x303B, 0xA015, 0xA60C, 0xA67F, 0xA770, 0xA802, 0xA806, 0xA80B, 0xA82C, 0xA8FF, 0xA9B3, 0xA9CF, 0xAA43, 0xAA4C, 0xAA70, 0xAA7C, 0xAAB0, 0xAAC1, 0xAADD, 0xAAF6, 0xABE5, 0xABE8, 0xABED, 0xFB1E, 0xFE13, 0xFE52, 0xFE55, 0xFEFF, 0xFF07, 0xFF0E, 0xFF1A, 0xFF3E, 0xFF40, 0xFF70, 0xFFE3, 0x101FD, 0x102E0, 0x10A3F, 0x11001, 0x11070, 0x110BD, 0x110C2, 0x110CD, 0x11173, 0x111CF, 0x11234, 0x1123E, 0x11241, 0x112DF, 0x11340, 0x11446, 0x1145E, 0x114BA, 0x1163D, 0x116AB, 0x116AD, 0x116B7, 0x1193E, 0x11943, 0x119E0, 0x11A47, 0x11C3F, 0x11D3A, 0x11D47, 0x11D95, 0x11D97, 0x11F40, 0x11F42, 0x16F4F, 0x1DA75, 0x1DA84, 0x1E08F, 0x1E2AE, 0xE0001);\nset.addRange(0xB7, 0xB8).addRange(0x2B0, 0x36F).addRange(0x374, 0x375).addRange(0x384, 0x385).addRange(0x483, 0x489).addRange(0x591, 0x5BD).addRange(0x5C1, 0x5C2).addRange(0x5C4, 0x5C5).addRange(0x600, 0x605).addRange(0x610, 0x61A).addRange(0x64B, 0x65F).addRange(0x6D6, 0x6DD).addRange(0x6DF, 0x6E8).addRange(0x6EA, 0x6ED).addRange(0x730, 0x74A).addRange(0x7A6, 0x7B0).addRange(0x7EB, 0x7F5).addRange(0x816, 0x82D).addRange(0x859, 0x85B).addRange(0x890, 0x891).addRange(0x898, 0x89F).addRange(0x8C9, 0x902).addRange(0x941, 0x948).addRange(0x951, 0x957).addRange(0x962, 0x963).addRange(0x9C1, 0x9C4).addRange(0x9E2, 0x9E3).addRange(0xA01, 0xA02).addRange(0xA41, 0xA42).addRange(0xA47, 0xA48).addRange(0xA4B, 0xA4D).addRange(0xA70, 0xA71).addRange(0xA81, 0xA82).addRange(0xAC1, 0xAC5).addRange(0xAC7, 0xAC8).addRange(0xAE2, 0xAE3).addRange(0xAFA, 0xAFF).addRange(0xB41, 0xB44).addRange(0xB55, 0xB56).addRange(0xB62, 0xB63).addRange(0xC3E, 0xC40).addRange(0xC46, 0xC48).addRange(0xC4A, 0xC4D).addRange(0xC55, 0xC56).addRange(0xC62, 0xC63).addRange(0xCCC, 0xCCD).addRange(0xCE2, 0xCE3).addRange(0xD00, 0xD01).addRange(0xD3B, 0xD3C).addRange(0xD41, 0xD44).addRange(0xD62, 0xD63);\nset.addRange(0xDD2, 0xDD4).addRange(0xE34, 0xE3A).addRange(0xE46, 0xE4E).addRange(0xEB4, 0xEBC).addRange(0xEC8, 0xECE).addRange(0xF18, 0xF19).addRange(0xF71, 0xF7E).addRange(0xF80, 0xF84).addRange(0xF86, 0xF87).addRange(0xF8D, 0xF97).addRange(0xF99, 0xFBC).addRange(0x102D, 0x1030).addRange(0x1032, 0x1037).addRange(0x1039, 0x103A).addRange(0x103D, 0x103E).addRange(0x1058, 0x1059).addRange(0x105E, 0x1060).addRange(0x1071, 0x1074).addRange(0x1085, 0x1086).addRange(0x135D, 0x135F).addRange(0x1712, 0x1714).addRange(0x1732, 0x1733).addRange(0x1752, 0x1753).addRange(0x1772, 0x1773).addRange(0x17B4, 0x17B5).addRange(0x17B7, 0x17BD).addRange(0x17C9, 0x17D3).addRange(0x180B, 0x180F).addRange(0x1885, 0x1886).addRange(0x1920, 0x1922).addRange(0x1927, 0x1928).addRange(0x1939, 0x193B).addRange(0x1A17, 0x1A18).addRange(0x1A58, 0x1A5E).addRange(0x1A65, 0x1A6C).addRange(0x1A73, 0x1A7C).addRange(0x1AB0, 0x1ACE).addRange(0x1B00, 0x1B03).addRange(0x1B36, 0x1B3A).addRange(0x1B6B, 0x1B73).addRange(0x1B80, 0x1B81).addRange(0x1BA2, 0x1BA5).addRange(0x1BA8, 0x1BA9).addRange(0x1BAB, 0x1BAD).addRange(0x1BE8, 0x1BE9).addRange(0x1BEF, 0x1BF1).addRange(0x1C2C, 0x1C33).addRange(0x1C36, 0x1C37).addRange(0x1C78, 0x1C7D).addRange(0x1CD0, 0x1CD2).addRange(0x1CD4, 0x1CE0);\nset.addRange(0x1CE2, 0x1CE8).addRange(0x1CF8, 0x1CF9).addRange(0x1D2C, 0x1D6A).addRange(0x1D9B, 0x1DFF).addRange(0x1FBF, 0x1FC1).addRange(0x1FCD, 0x1FCF).addRange(0x1FDD, 0x1FDF).addRange(0x1FED, 0x1FEF).addRange(0x1FFD, 0x1FFE).addRange(0x200B, 0x200F).addRange(0x2018, 0x2019).addRange(0x202A, 0x202E).addRange(0x2060, 0x2064).addRange(0x2066, 0x206F).addRange(0x2090, 0x209C).addRange(0x20D0, 0x20F0).addRange(0x2C7C, 0x2C7D).addRange(0x2CEF, 0x2CF1).addRange(0x2DE0, 0x2DFF).addRange(0x302A, 0x302D).addRange(0x3031, 0x3035).addRange(0x3099, 0x309E).addRange(0x30FC, 0x30FE).addRange(0xA4F8, 0xA4FD).addRange(0xA66F, 0xA672).addRange(0xA674, 0xA67D).addRange(0xA69C, 0xA69F).addRange(0xA6F0, 0xA6F1).addRange(0xA700, 0xA721).addRange(0xA788, 0xA78A).addRange(0xA7F2, 0xA7F4).addRange(0xA7F8, 0xA7F9).addRange(0xA825, 0xA826).addRange(0xA8C4, 0xA8C5).addRange(0xA8E0, 0xA8F1).addRange(0xA926, 0xA92D).addRange(0xA947, 0xA951).addRange(0xA980, 0xA982).addRange(0xA9B6, 0xA9B9).addRange(0xA9BC, 0xA9BD).addRange(0xA9E5, 0xA9E6).addRange(0xAA29, 0xAA2E).addRange(0xAA31, 0xAA32).addRange(0xAA35, 0xAA36).addRange(0xAAB2, 0xAAB4).addRange(0xAAB7, 0xAAB8).addRange(0xAABE, 0xAABF).addRange(0xAAEC, 0xAAED).addRange(0xAAF3, 0xAAF4).addRange(0xAB5B, 0xAB5F).addRange(0xAB69, 0xAB6B);\nset.addRange(0xFBB2, 0xFBC2).addRange(0xFE00, 0xFE0F).addRange(0xFE20, 0xFE2F).addRange(0xFF9E, 0xFF9F).addRange(0xFFF9, 0xFFFB).addRange(0x10376, 0x1037A).addRange(0x10780, 0x10785).addRange(0x10787, 0x107B0).addRange(0x107B2, 0x107BA).addRange(0x10A01, 0x10A03).addRange(0x10A05, 0x10A06).addRange(0x10A0C, 0x10A0F).addRange(0x10A38, 0x10A3A).addRange(0x10AE5, 0x10AE6).addRange(0x10D24, 0x10D27).addRange(0x10EAB, 0x10EAC).addRange(0x10EFD, 0x10EFF).addRange(0x10F46, 0x10F50).addRange(0x10F82, 0x10F85).addRange(0x11038, 0x11046).addRange(0x11073, 0x11074).addRange(0x1107F, 0x11081).addRange(0x110B3, 0x110B6).addRange(0x110B9, 0x110BA).addRange(0x11100, 0x11102).addRange(0x11127, 0x1112B).addRange(0x1112D, 0x11134).addRange(0x11180, 0x11181).addRange(0x111B6, 0x111BE).addRange(0x111C9, 0x111CC).addRange(0x1122F, 0x11231).addRange(0x11236, 0x11237).addRange(0x112E3, 0x112EA).addRange(0x11300, 0x11301).addRange(0x1133B, 0x1133C).addRange(0x11366, 0x1136C).addRange(0x11370, 0x11374).addRange(0x11438, 0x1143F).addRange(0x11442, 0x11444).addRange(0x114B3, 0x114B8).addRange(0x114BF, 0x114C0).addRange(0x114C2, 0x114C3).addRange(0x115B2, 0x115B5).addRange(0x115BC, 0x115BD).addRange(0x115BF, 0x115C0).addRange(0x115DC, 0x115DD).addRange(0x11633, 0x1163A).addRange(0x1163F, 0x11640).addRange(0x116B0, 0x116B5).addRange(0x1171D, 0x1171F).addRange(0x11722, 0x11725);\nset.addRange(0x11727, 0x1172B).addRange(0x1182F, 0x11837).addRange(0x11839, 0x1183A).addRange(0x1193B, 0x1193C).addRange(0x119D4, 0x119D7).addRange(0x119DA, 0x119DB).addRange(0x11A01, 0x11A0A).addRange(0x11A33, 0x11A38).addRange(0x11A3B, 0x11A3E).addRange(0x11A51, 0x11A56).addRange(0x11A59, 0x11A5B).addRange(0x11A8A, 0x11A96).addRange(0x11A98, 0x11A99).addRange(0x11C30, 0x11C36).addRange(0x11C38, 0x11C3D).addRange(0x11C92, 0x11CA7).addRange(0x11CAA, 0x11CB0).addRange(0x11CB2, 0x11CB3).addRange(0x11CB5, 0x11CB6).addRange(0x11D31, 0x11D36).addRange(0x11D3C, 0x11D3D).addRange(0x11D3F, 0x11D45).addRange(0x11D90, 0x11D91).addRange(0x11EF3, 0x11EF4).addRange(0x11F00, 0x11F01).addRange(0x11F36, 0x11F3A).addRange(0x13430, 0x13440).addRange(0x13447, 0x13455).addRange(0x16AF0, 0x16AF4).addRange(0x16B30, 0x16B36).addRange(0x16B40, 0x16B43).addRange(0x16F8F, 0x16F9F).addRange(0x16FE0, 0x16FE1).addRange(0x16FE3, 0x16FE4).addRange(0x1AFF0, 0x1AFF3).addRange(0x1AFF5, 0x1AFFB).addRange(0x1AFFD, 0x1AFFE).addRange(0x1BC9D, 0x1BC9E).addRange(0x1BCA0, 0x1BCA3).addRange(0x1CF00, 0x1CF2D).addRange(0x1CF30, 0x1CF46).addRange(0x1D167, 0x1D169).addRange(0x1D173, 0x1D182).addRange(0x1D185, 0x1D18B).addRange(0x1D1AA, 0x1D1AD).addRange(0x1D242, 0x1D244).addRange(0x1DA00, 0x1DA36).addRange(0x1DA3B, 0x1DA6C).addRange(0x1DA9B, 0x1DA9F).addRange(0x1DAA1, 0x1DAAF).addRange(0x1E000, 0x1E006);\nset.addRange(0x1E008, 0x1E018).addRange(0x1E01B, 0x1E021).addRange(0x1E023, 0x1E024).addRange(0x1E026, 0x1E02A).addRange(0x1E030, 0x1E06D).addRange(0x1E130, 0x1E13D).addRange(0x1E2EC, 0x1E2EF).addRange(0x1E4EB, 0x1E4EF).addRange(0x1E8D0, 0x1E8D6).addRange(0x1E944, 0x1E94B).addRange(0x1F3FB, 0x1F3FF).addRange(0xE0020, 0xE007F).addRange(0xE0100, 0xE01EF);\nexports.characters = set;\n","const set = require('regenerate')(0xAA, 0xB5, 0xBA, 0x345, 0x37F, 0x386, 0x38C, 0x10C7, 0x10CD, 0x1F59, 0x1F5B, 0x1F5D, 0x1FBE, 0x2071, 0x207F, 0x2102, 0x2107, 0x2115, 0x2124, 0x2126, 0x2128, 0x2139, 0x214E, 0x2D27, 0x2D2D, 0xA7D3, 0x10780, 0x1D4A2, 0x1D4BB, 0x1D546);\nset.addRange(0x41, 0x5A).addRange(0x61, 0x7A).addRange(0xC0, 0xD6).addRange(0xD8, 0xF6).addRange(0xF8, 0x1BA).addRange(0x1BC, 0x1BF).addRange(0x1C4, 0x293).addRange(0x295, 0x2B8).addRange(0x2C0, 0x2C1).addRange(0x2E0, 0x2E4).addRange(0x370, 0x373).addRange(0x376, 0x377).addRange(0x37A, 0x37D).addRange(0x388, 0x38A).addRange(0x38E, 0x3A1).addRange(0x3A3, 0x3F5).addRange(0x3F7, 0x481).addRange(0x48A, 0x52F).addRange(0x531, 0x556).addRange(0x560, 0x588).addRange(0x10A0, 0x10C5).addRange(0x10D0, 0x10FA).addRange(0x10FC, 0x10FF).addRange(0x13A0, 0x13F5).addRange(0x13F8, 0x13FD).addRange(0x1C80, 0x1C88).addRange(0x1C90, 0x1CBA).addRange(0x1CBD, 0x1CBF).addRange(0x1D00, 0x1DBF).addRange(0x1E00, 0x1F15).addRange(0x1F18, 0x1F1D).addRange(0x1F20, 0x1F45).addRange(0x1F48, 0x1F4D).addRange(0x1F50, 0x1F57).addRange(0x1F5F, 0x1F7D).addRange(0x1F80, 0x1FB4).addRange(0x1FB6, 0x1FBC).addRange(0x1FC2, 0x1FC4).addRange(0x1FC6, 0x1FCC).addRange(0x1FD0, 0x1FD3).addRange(0x1FD6, 0x1FDB).addRange(0x1FE0, 0x1FEC).addRange(0x1FF2, 0x1FF4).addRange(0x1FF6, 0x1FFC).addRange(0x2090, 0x209C).addRange(0x210A, 0x2113).addRange(0x2119, 0x211D).addRange(0x212A, 0x212D).addRange(0x212F, 0x2134).addRange(0x213C, 0x213F).addRange(0x2145, 0x2149);\nset.addRange(0x2160, 0x217F).addRange(0x2183, 0x2184).addRange(0x24B6, 0x24E9).addRange(0x2C00, 0x2CE4).addRange(0x2CEB, 0x2CEE).addRange(0x2CF2, 0x2CF3).addRange(0x2D00, 0x2D25).addRange(0xA640, 0xA66D).addRange(0xA680, 0xA69D).addRange(0xA722, 0xA787).addRange(0xA78B, 0xA78E).addRange(0xA790, 0xA7CA).addRange(0xA7D0, 0xA7D1).addRange(0xA7D5, 0xA7D9).addRange(0xA7F2, 0xA7F6).addRange(0xA7F8, 0xA7FA).addRange(0xAB30, 0xAB5A).addRange(0xAB5C, 0xAB69).addRange(0xAB70, 0xABBF).addRange(0xFB00, 0xFB06).addRange(0xFB13, 0xFB17).addRange(0xFF21, 0xFF3A).addRange(0xFF41, 0xFF5A).addRange(0x10400, 0x1044F).addRange(0x104B0, 0x104D3).addRange(0x104D8, 0x104FB).addRange(0x10570, 0x1057A).addRange(0x1057C, 0x1058A).addRange(0x1058C, 0x10592).addRange(0x10594, 0x10595).addRange(0x10597, 0x105A1).addRange(0x105A3, 0x105B1).addRange(0x105B3, 0x105B9).addRange(0x105BB, 0x105BC).addRange(0x10783, 0x10785).addRange(0x10787, 0x107B0).addRange(0x107B2, 0x107BA).addRange(0x10C80, 0x10CB2).addRange(0x10CC0, 0x10CF2).addRange(0x118A0, 0x118DF).addRange(0x16E40, 0x16E7F).addRange(0x1D400, 0x1D454).addRange(0x1D456, 0x1D49C).addRange(0x1D49E, 0x1D49F).addRange(0x1D4A5, 0x1D4A6).addRange(0x1D4A9, 0x1D4AC).addRange(0x1D4AE, 0x1D4B9).addRange(0x1D4BD, 0x1D4C3).addRange(0x1D4C5, 0x1D505).addRange(0x1D507, 0x1D50A).addRange(0x1D50D, 0x1D514);\nset.addRange(0x1D516, 0x1D51C).addRange(0x1D51E, 0x1D539).addRange(0x1D53B, 0x1D53E).addRange(0x1D540, 0x1D544).addRange(0x1D54A, 0x1D550).addRange(0x1D552, 0x1D6A5).addRange(0x1D6A8, 0x1D6C0).addRange(0x1D6C2, 0x1D6DA).addRange(0x1D6DC, 0x1D6FA).addRange(0x1D6FC, 0x1D714).addRange(0x1D716, 0x1D734).addRange(0x1D736, 0x1D74E).addRange(0x1D750, 0x1D76E).addRange(0x1D770, 0x1D788).addRange(0x1D78A, 0x1D7A8).addRange(0x1D7AA, 0x1D7C2).addRange(0x1D7C4, 0x1D7CB).addRange(0x1DF00, 0x1DF09).addRange(0x1DF0B, 0x1DF1E).addRange(0x1DF25, 0x1DF2A).addRange(0x1E030, 0x1E06D).addRange(0x1E900, 0x1E943).addRange(0x1F130, 0x1F149).addRange(0x1F150, 0x1F169).addRange(0x1F170, 0x1F189);\nexports.characters = set;\n","const set = require('regenerate')(0xB5, 0x100, 0x102, 0x104, 0x106, 0x108, 0x10A, 0x10C, 0x10E, 0x110, 0x112, 0x114, 0x116, 0x118, 0x11A, 0x11C, 0x11E, 0x120, 0x122, 0x124, 0x126, 0x128, 0x12A, 0x12C, 0x12E, 0x130, 0x132, 0x134, 0x136, 0x139, 0x13B, 0x13D, 0x13F, 0x141, 0x143, 0x145, 0x147, 0x14C, 0x14E, 0x150, 0x152, 0x154, 0x156, 0x158, 0x15A, 0x15C, 0x15E, 0x160, 0x162, 0x164, 0x166, 0x168, 0x16A, 0x16C, 0x16E, 0x170, 0x172, 0x174, 0x176, 0x17B, 0x17D, 0x17F, 0x184, 0x1A2, 0x1A4, 0x1A9, 0x1AC, 0x1B5, 0x1BC, 0x1CD, 0x1CF, 0x1D1, 0x1D3, 0x1D5, 0x1D7, 0x1D9, 0x1DB, 0x1DE, 0x1E0, 0x1E2, 0x1E4, 0x1E6, 0x1E8, 0x1EA, 0x1EC, 0x1EE, 0x1F4, 0x1FA, 0x1FC, 0x1FE, 0x200, 0x202, 0x204, 0x206, 0x208, 0x20A, 0x20C, 0x20E, 0x210, 0x212, 0x214, 0x216, 0x218, 0x21A, 0x21C, 0x21E, 0x220, 0x222, 0x224, 0x226, 0x228, 0x22A, 0x22C, 0x22E, 0x230, 0x232, 0x241, 0x248, 0x24A, 0x24C, 0x24E, 0x345, 0x370, 0x372, 0x376, 0x37F, 0x386, 0x38C, 0x3C2, 0x3D8, 0x3DA, 0x3DC, 0x3DE, 0x3E0, 0x3E2, 0x3E4, 0x3E6, 0x3E8, 0x3EA, 0x3EC, 0x3EE, 0x3F7, 0x460, 0x462, 0x464, 0x466, 0x468, 0x46A, 0x46C, 0x46E, 0x470, 0x472, 0x474, 0x476, 0x478, 0x47A, 0x47C, 0x47E, 0x480, 0x48A, 0x48C, 0x48E, 0x490, 0x492, 0x494, 0x496, 0x498, 0x49A, 0x49C, 0x49E, 0x4A0, 0x4A2, 0x4A4, 0x4A6, 0x4A8, 0x4AA, 0x4AC, 0x4AE, 0x4B0, 0x4B2, 0x4B4, 0x4B6, 0x4B8, 0x4BA, 0x4BC, 0x4BE, 0x4C3, 0x4C5, 0x4C7, 0x4C9, 0x4CB, 0x4CD, 0x4D0, 0x4D2, 0x4D4, 0x4D6, 0x4D8, 0x4DA, 0x4DC, 0x4DE, 0x4E0, 0x4E2, 0x4E4, 0x4E6, 0x4E8, 0x4EA, 0x4EC, 0x4EE, 0x4F0, 0x4F2, 0x4F4, 0x4F6, 0x4F8, 0x4FA, 0x4FC, 0x4FE, 0x500, 0x502, 0x504, 0x506, 0x508, 0x50A, 0x50C, 0x50E, 0x510, 0x512, 0x514, 0x516, 0x518, 0x51A, 0x51C, 0x51E, 0x520, 0x522, 0x524, 0x526, 0x528, 0x52A, 0x52C, 0x52E, 0x587, 0x10C7, 0x10CD, 0x1E00, 0x1E02, 0x1E04, 0x1E06, 0x1E08, 0x1E0A, 0x1E0C, 0x1E0E, 0x1E10, 0x1E12, 0x1E14, 0x1E16, 0x1E18, 0x1E1A, 0x1E1C, 0x1E1E, 0x1E20, 0x1E22, 0x1E24, 0x1E26, 0x1E28, 0x1E2A, 0x1E2C, 0x1E2E, 0x1E30, 0x1E32, 0x1E34, 0x1E36, 0x1E38, 0x1E3A, 0x1E3C, 0x1E3E, 0x1E40, 0x1E42, 0x1E44, 0x1E46, 0x1E48, 0x1E4A, 0x1E4C, 0x1E4E, 0x1E50, 0x1E52, 0x1E54, 0x1E56, 0x1E58, 0x1E5A, 0x1E5C, 0x1E5E, 0x1E60, 0x1E62, 0x1E64, 0x1E66, 0x1E68, 0x1E6A, 0x1E6C, 0x1E6E, 0x1E70, 0x1E72, 0x1E74, 0x1E76, 0x1E78, 0x1E7A, 0x1E7C, 0x1E7E, 0x1E80, 0x1E82, 0x1E84, 0x1E86, 0x1E88, 0x1E8A, 0x1E8C, 0x1E8E, 0x1E90, 0x1E92, 0x1E94, 0x1E9E, 0x1EA0, 0x1EA2, 0x1EA4, 0x1EA6, 0x1EA8, 0x1EAA, 0x1EAC, 0x1EAE, 0x1EB0, 0x1EB2, 0x1EB4, 0x1EB6, 0x1EB8, 0x1EBA, 0x1EBC, 0x1EBE, 0x1EC0, 0x1EC2, 0x1EC4, 0x1EC6, 0x1EC8, 0x1ECA, 0x1ECC, 0x1ECE, 0x1ED0, 0x1ED2, 0x1ED4, 0x1ED6, 0x1ED8, 0x1EDA, 0x1EDC, 0x1EDE, 0x1EE0, 0x1EE2, 0x1EE4, 0x1EE6, 0x1EE8, 0x1EEA, 0x1EEC, 0x1EEE, 0x1EF0, 0x1EF2, 0x1EF4, 0x1EF6, 0x1EF8, 0x1EFA, 0x1EFC, 0x1EFE, 0x1F59, 0x1F5B, 0x1F5D, 0x1F5F, 0x2126, 0x2132, 0x2183, 0x2C60, 0x2C67, 0x2C69, 0x2C6B, 0x2C72, 0x2C75, 0x2C82, 0x2C84, 0x2C86, 0x2C88, 0x2C8A, 0x2C8C, 0x2C8E, 0x2C90, 0x2C92, 0x2C94, 0x2C96, 0x2C98, 0x2C9A, 0x2C9C, 0x2C9E, 0x2CA0, 0x2CA2, 0x2CA4, 0x2CA6, 0x2CA8, 0x2CAA, 0x2CAC, 0x2CAE, 0x2CB0, 0x2CB2, 0x2CB4, 0x2CB6, 0x2CB8, 0x2CBA, 0x2CBC, 0x2CBE, 0x2CC0, 0x2CC2, 0x2CC4, 0x2CC6, 0x2CC8, 0x2CCA, 0x2CCC, 0x2CCE, 0x2CD0, 0x2CD2, 0x2CD4, 0x2CD6, 0x2CD8, 0x2CDA, 0x2CDC, 0x2CDE, 0x2CE0, 0x2CE2, 0x2CEB, 0x2CED, 0x2CF2, 0xA640, 0xA642, 0xA644, 0xA646, 0xA648, 0xA64A, 0xA64C, 0xA64E, 0xA650, 0xA652, 0xA654, 0xA656, 0xA658, 0xA65A, 0xA65C, 0xA65E, 0xA660, 0xA662, 0xA664, 0xA666, 0xA668, 0xA66A, 0xA66C, 0xA680, 0xA682, 0xA684, 0xA686, 0xA688, 0xA68A, 0xA68C, 0xA68E, 0xA690, 0xA692, 0xA694, 0xA696, 0xA698, 0xA69A, 0xA722, 0xA724, 0xA726, 0xA728, 0xA72A, 0xA72C, 0xA72E, 0xA732, 0xA734, 0xA736, 0xA738, 0xA73A, 0xA73C, 0xA73E, 0xA740, 0xA742, 0xA744, 0xA746, 0xA748, 0xA74A, 0xA74C, 0xA74E, 0xA750, 0xA752, 0xA754, 0xA756, 0xA758, 0xA75A, 0xA75C, 0xA75E, 0xA760, 0xA762, 0xA764, 0xA766, 0xA768, 0xA76A, 0xA76C, 0xA76E, 0xA779, 0xA77B, 0xA780, 0xA782, 0xA784, 0xA786, 0xA78B, 0xA78D, 0xA790, 0xA792, 0xA796, 0xA798, 0xA79A, 0xA79C, 0xA79E, 0xA7A0, 0xA7A2, 0xA7A4, 0xA7A6, 0xA7A8, 0xA7B6, 0xA7B8, 0xA7BA, 0xA7BC, 0xA7BE, 0xA7C0, 0xA7C2, 0xA7C9, 0xA7D0, 0xA7D6, 0xA7D8, 0xA7F5);\nset.addRange(0x41, 0x5A).addRange(0xC0, 0xD6).addRange(0xD8, 0xDF).addRange(0x149, 0x14A).addRange(0x178, 0x179).addRange(0x181, 0x182).addRange(0x186, 0x187).addRange(0x189, 0x18B).addRange(0x18E, 0x191).addRange(0x193, 0x194).addRange(0x196, 0x198).addRange(0x19C, 0x19D).addRange(0x19F, 0x1A0).addRange(0x1A6, 0x1A7).addRange(0x1AE, 0x1AF).addRange(0x1B1, 0x1B3).addRange(0x1B7, 0x1B8).addRange(0x1C4, 0x1C5).addRange(0x1C7, 0x1C8).addRange(0x1CA, 0x1CB).addRange(0x1F1, 0x1F2).addRange(0x1F6, 0x1F8).addRange(0x23A, 0x23B).addRange(0x23D, 0x23E).addRange(0x243, 0x246).addRange(0x388, 0x38A).addRange(0x38E, 0x38F).addRange(0x391, 0x3A1).addRange(0x3A3, 0x3AB).addRange(0x3CF, 0x3D1).addRange(0x3D5, 0x3D6).addRange(0x3F0, 0x3F1).addRange(0x3F4, 0x3F5).addRange(0x3F9, 0x3FA).addRange(0x3FD, 0x42F).addRange(0x4C0, 0x4C1).addRange(0x531, 0x556).addRange(0x10A0, 0x10C5).addRange(0x13F8, 0x13FD).addRange(0x1C80, 0x1C88).addRange(0x1C90, 0x1CBA).addRange(0x1CBD, 0x1CBF).addRange(0x1E9A, 0x1E9B).addRange(0x1F08, 0x1F0F).addRange(0x1F18, 0x1F1D).addRange(0x1F28, 0x1F2F).addRange(0x1F38, 0x1F3F).addRange(0x1F48, 0x1F4D).addRange(0x1F68, 0x1F6F).addRange(0x1F80, 0x1FAF).addRange(0x1FB2, 0x1FB4);\nset.addRange(0x1FB7, 0x1FBC).addRange(0x1FC2, 0x1FC4).addRange(0x1FC7, 0x1FCC).addRange(0x1FD8, 0x1FDB).addRange(0x1FE8, 0x1FEC).addRange(0x1FF2, 0x1FF4).addRange(0x1FF7, 0x1FFC).addRange(0x212A, 0x212B).addRange(0x2160, 0x216F).addRange(0x24B6, 0x24CF).addRange(0x2C00, 0x2C2F).addRange(0x2C62, 0x2C64).addRange(0x2C6D, 0x2C70).addRange(0x2C7E, 0x2C80).addRange(0xA77D, 0xA77E).addRange(0xA7AA, 0xA7AE).addRange(0xA7B0, 0xA7B4).addRange(0xA7C4, 0xA7C7).addRange(0xAB70, 0xABBF).addRange(0xFB00, 0xFB06).addRange(0xFB13, 0xFB17).addRange(0xFF21, 0xFF3A).addRange(0x10400, 0x10427).addRange(0x104B0, 0x104D3).addRange(0x10570, 0x1057A).addRange(0x1057C, 0x1058A).addRange(0x1058C, 0x10592).addRange(0x10594, 0x10595).addRange(0x10C80, 0x10CB2).addRange(0x118A0, 0x118BF).addRange(0x16E40, 0x16E5F).addRange(0x1E900, 0x1E921);\nexports.characters = set;\n","const set = require('regenerate')(0xB5, 0x1BF, 0x259, 0x263, 0x26F, 0x275, 0x27D, 0x280, 0x292, 0x345, 0x37F, 0x386, 0x38C, 0x10C7, 0x10CD, 0x1D79, 0x1D7D, 0x1D8E, 0x1E9E, 0x1F59, 0x1F5B, 0x1F5D, 0x1FBE, 0x2126, 0x2132, 0x214E, 0x2D27, 0x2D2D, 0xAB53);\nset.addRange(0x41, 0x5A).addRange(0x61, 0x7A).addRange(0xC0, 0xD6).addRange(0xD8, 0xF6).addRange(0xF8, 0x137).addRange(0x139, 0x18C).addRange(0x18E, 0x19A).addRange(0x19C, 0x1A9).addRange(0x1AC, 0x1B9).addRange(0x1BC, 0x1BD).addRange(0x1C4, 0x220).addRange(0x222, 0x233).addRange(0x23A, 0x254).addRange(0x256, 0x257).addRange(0x25B, 0x25C).addRange(0x260, 0x261).addRange(0x265, 0x266).addRange(0x268, 0x26C).addRange(0x271, 0x272).addRange(0x282, 0x283).addRange(0x287, 0x28C).addRange(0x29D, 0x29E).addRange(0x370, 0x373).addRange(0x376, 0x377).addRange(0x37B, 0x37D).addRange(0x388, 0x38A).addRange(0x38E, 0x3A1).addRange(0x3A3, 0x3D1).addRange(0x3D5, 0x3F5).addRange(0x3F7, 0x3FB).addRange(0x3FD, 0x481).addRange(0x48A, 0x52F).addRange(0x531, 0x556).addRange(0x561, 0x587).addRange(0x10A0, 0x10C5).addRange(0x10D0, 0x10FA).addRange(0x10FD, 0x10FF).addRange(0x13A0, 0x13F5).addRange(0x13F8, 0x13FD).addRange(0x1C80, 0x1C88).addRange(0x1C90, 0x1CBA).addRange(0x1CBD, 0x1CBF).addRange(0x1E00, 0x1E9B).addRange(0x1EA0, 0x1F15).addRange(0x1F18, 0x1F1D).addRange(0x1F20, 0x1F45).addRange(0x1F48, 0x1F4D).addRange(0x1F50, 0x1F57).addRange(0x1F5F, 0x1F7D).addRange(0x1F80, 0x1FB4).addRange(0x1FB6, 0x1FBC);\nset.addRange(0x1FC2, 0x1FC4).addRange(0x1FC6, 0x1FCC).addRange(0x1FD0, 0x1FD3).addRange(0x1FD6, 0x1FDB).addRange(0x1FE0, 0x1FEC).addRange(0x1FF2, 0x1FF4).addRange(0x1FF6, 0x1FFC).addRange(0x212A, 0x212B).addRange(0x2160, 0x217F).addRange(0x2183, 0x2184).addRange(0x24B6, 0x24E9).addRange(0x2C00, 0x2C70).addRange(0x2C72, 0x2C73).addRange(0x2C75, 0x2C76).addRange(0x2C7E, 0x2CE3).addRange(0x2CEB, 0x2CEE).addRange(0x2CF2, 0x2CF3).addRange(0x2D00, 0x2D25).addRange(0xA640, 0xA66D).addRange(0xA680, 0xA69B).addRange(0xA722, 0xA72F).addRange(0xA732, 0xA76F).addRange(0xA779, 0xA787).addRange(0xA78B, 0xA78D).addRange(0xA790, 0xA794).addRange(0xA796, 0xA7AE).addRange(0xA7B0, 0xA7CA).addRange(0xA7D0, 0xA7D1).addRange(0xA7D6, 0xA7D9).addRange(0xA7F5, 0xA7F6).addRange(0xAB70, 0xABBF).addRange(0xFB00, 0xFB06).addRange(0xFB13, 0xFB17).addRange(0xFF21, 0xFF3A).addRange(0xFF41, 0xFF5A).addRange(0x10400, 0x1044F).addRange(0x104B0, 0x104D3).addRange(0x104D8, 0x104FB).addRange(0x10570, 0x1057A).addRange(0x1057C, 0x1058A).addRange(0x1058C, 0x10592).addRange(0x10594, 0x10595).addRange(0x10597, 0x105A1).addRange(0x105A3, 0x105B1).addRange(0x105B3, 0x105B9).addRange(0x105BB, 0x105BC).addRange(0x10C80, 0x10CB2).addRange(0x10CC0, 0x10CF2).addRange(0x118A0, 0x118DF).addRange(0x16E40, 0x16E7F).addRange(0x1E900, 0x1E943);\nset;\nexports.characters = set;\n","const set = require('regenerate')(0x100, 0x102, 0x104, 0x106, 0x108, 0x10A, 0x10C, 0x10E, 0x110, 0x112, 0x114, 0x116, 0x118, 0x11A, 0x11C, 0x11E, 0x120, 0x122, 0x124, 0x126, 0x128, 0x12A, 0x12C, 0x12E, 0x130, 0x132, 0x134, 0x136, 0x139, 0x13B, 0x13D, 0x13F, 0x141, 0x143, 0x145, 0x147, 0x14A, 0x14C, 0x14E, 0x150, 0x152, 0x154, 0x156, 0x158, 0x15A, 0x15C, 0x15E, 0x160, 0x162, 0x164, 0x166, 0x168, 0x16A, 0x16C, 0x16E, 0x170, 0x172, 0x174, 0x176, 0x17B, 0x17D, 0x184, 0x1A2, 0x1A4, 0x1A9, 0x1AC, 0x1B5, 0x1BC, 0x1CD, 0x1CF, 0x1D1, 0x1D3, 0x1D5, 0x1D7, 0x1D9, 0x1DB, 0x1DE, 0x1E0, 0x1E2, 0x1E4, 0x1E6, 0x1E8, 0x1EA, 0x1EC, 0x1EE, 0x1F4, 0x1FA, 0x1FC, 0x1FE, 0x200, 0x202, 0x204, 0x206, 0x208, 0x20A, 0x20C, 0x20E, 0x210, 0x212, 0x214, 0x216, 0x218, 0x21A, 0x21C, 0x21E, 0x220, 0x222, 0x224, 0x226, 0x228, 0x22A, 0x22C, 0x22E, 0x230, 0x232, 0x241, 0x248, 0x24A, 0x24C, 0x24E, 0x370, 0x372, 0x376, 0x37F, 0x386, 0x38C, 0x3CF, 0x3D8, 0x3DA, 0x3DC, 0x3DE, 0x3E0, 0x3E2, 0x3E4, 0x3E6, 0x3E8, 0x3EA, 0x3EC, 0x3EE, 0x3F4, 0x3F7, 0x460, 0x462, 0x464, 0x466, 0x468, 0x46A, 0x46C, 0x46E, 0x470, 0x472, 0x474, 0x476, 0x478, 0x47A, 0x47C, 0x47E, 0x480, 0x48A, 0x48C, 0x48E, 0x490, 0x492, 0x494, 0x496, 0x498, 0x49A, 0x49C, 0x49E, 0x4A0, 0x4A2, 0x4A4, 0x4A6, 0x4A8, 0x4AA, 0x4AC, 0x4AE, 0x4B0, 0x4B2, 0x4B4, 0x4B6, 0x4B8, 0x4BA, 0x4BC, 0x4BE, 0x4C3, 0x4C5, 0x4C7, 0x4C9, 0x4CB, 0x4CD, 0x4D0, 0x4D2, 0x4D4, 0x4D6, 0x4D8, 0x4DA, 0x4DC, 0x4DE, 0x4E0, 0x4E2, 0x4E4, 0x4E6, 0x4E8, 0x4EA, 0x4EC, 0x4EE, 0x4F0, 0x4F2, 0x4F4, 0x4F6, 0x4F8, 0x4FA, 0x4FC, 0x4FE, 0x500, 0x502, 0x504, 0x506, 0x508, 0x50A, 0x50C, 0x50E, 0x510, 0x512, 0x514, 0x516, 0x518, 0x51A, 0x51C, 0x51E, 0x520, 0x522, 0x524, 0x526, 0x528, 0x52A, 0x52C, 0x52E, 0x10C7, 0x10CD, 0x1E00, 0x1E02, 0x1E04, 0x1E06, 0x1E08, 0x1E0A, 0x1E0C, 0x1E0E, 0x1E10, 0x1E12, 0x1E14, 0x1E16, 0x1E18, 0x1E1A, 0x1E1C, 0x1E1E, 0x1E20, 0x1E22, 0x1E24, 0x1E26, 0x1E28, 0x1E2A, 0x1E2C, 0x1E2E, 0x1E30, 0x1E32, 0x1E34, 0x1E36, 0x1E38, 0x1E3A, 0x1E3C, 0x1E3E, 0x1E40, 0x1E42, 0x1E44, 0x1E46, 0x1E48, 0x1E4A, 0x1E4C, 0x1E4E, 0x1E50, 0x1E52, 0x1E54, 0x1E56, 0x1E58, 0x1E5A, 0x1E5C, 0x1E5E, 0x1E60, 0x1E62, 0x1E64, 0x1E66, 0x1E68, 0x1E6A, 0x1E6C, 0x1E6E, 0x1E70, 0x1E72, 0x1E74, 0x1E76, 0x1E78, 0x1E7A, 0x1E7C, 0x1E7E, 0x1E80, 0x1E82, 0x1E84, 0x1E86, 0x1E88, 0x1E8A, 0x1E8C, 0x1E8E, 0x1E90, 0x1E92, 0x1E94, 0x1E9E, 0x1EA0, 0x1EA2, 0x1EA4, 0x1EA6, 0x1EA8, 0x1EAA, 0x1EAC, 0x1EAE, 0x1EB0, 0x1EB2, 0x1EB4, 0x1EB6, 0x1EB8, 0x1EBA, 0x1EBC, 0x1EBE, 0x1EC0, 0x1EC2, 0x1EC4, 0x1EC6, 0x1EC8, 0x1ECA, 0x1ECC, 0x1ECE, 0x1ED0, 0x1ED2, 0x1ED4, 0x1ED6, 0x1ED8, 0x1EDA, 0x1EDC, 0x1EDE, 0x1EE0, 0x1EE2, 0x1EE4, 0x1EE6, 0x1EE8, 0x1EEA, 0x1EEC, 0x1EEE, 0x1EF0, 0x1EF2, 0x1EF4, 0x1EF6, 0x1EF8, 0x1EFA, 0x1EFC, 0x1EFE, 0x1F59, 0x1F5B, 0x1F5D, 0x1F5F, 0x2126, 0x2132, 0x2183, 0x2C60, 0x2C67, 0x2C69, 0x2C6B, 0x2C72, 0x2C75, 0x2C82, 0x2C84, 0x2C86, 0x2C88, 0x2C8A, 0x2C8C, 0x2C8E, 0x2C90, 0x2C92, 0x2C94, 0x2C96, 0x2C98, 0x2C9A, 0x2C9C, 0x2C9E, 0x2CA0, 0x2CA2, 0x2CA4, 0x2CA6, 0x2CA8, 0x2CAA, 0x2CAC, 0x2CAE, 0x2CB0, 0x2CB2, 0x2CB4, 0x2CB6, 0x2CB8, 0x2CBA, 0x2CBC, 0x2CBE, 0x2CC0, 0x2CC2, 0x2CC4, 0x2CC6, 0x2CC8, 0x2CCA, 0x2CCC, 0x2CCE, 0x2CD0, 0x2CD2, 0x2CD4, 0x2CD6, 0x2CD8, 0x2CDA, 0x2CDC, 0x2CDE, 0x2CE0, 0x2CE2, 0x2CEB, 0x2CED, 0x2CF2, 0xA640, 0xA642, 0xA644, 0xA646, 0xA648, 0xA64A, 0xA64C, 0xA64E, 0xA650, 0xA652, 0xA654, 0xA656, 0xA658, 0xA65A, 0xA65C, 0xA65E, 0xA660, 0xA662, 0xA664, 0xA666, 0xA668, 0xA66A, 0xA66C, 0xA680, 0xA682, 0xA684, 0xA686, 0xA688, 0xA68A, 0xA68C, 0xA68E, 0xA690, 0xA692, 0xA694, 0xA696, 0xA698, 0xA69A, 0xA722, 0xA724, 0xA726, 0xA728, 0xA72A, 0xA72C, 0xA72E, 0xA732, 0xA734, 0xA736, 0xA738, 0xA73A, 0xA73C, 0xA73E, 0xA740, 0xA742, 0xA744, 0xA746, 0xA748, 0xA74A, 0xA74C, 0xA74E, 0xA750, 0xA752, 0xA754, 0xA756, 0xA758, 0xA75A, 0xA75C, 0xA75E, 0xA760, 0xA762, 0xA764, 0xA766, 0xA768, 0xA76A, 0xA76C, 0xA76E, 0xA779, 0xA77B, 0xA780, 0xA782, 0xA784, 0xA786, 0xA78B, 0xA78D, 0xA790, 0xA792, 0xA796, 0xA798, 0xA79A, 0xA79C, 0xA79E, 0xA7A0, 0xA7A2, 0xA7A4, 0xA7A6, 0xA7A8, 0xA7B6, 0xA7B8, 0xA7BA, 0xA7BC, 0xA7BE, 0xA7C0, 0xA7C2, 0xA7C9, 0xA7D0, 0xA7D6, 0xA7D8, 0xA7F5);\nset.addRange(0x41, 0x5A).addRange(0xC0, 0xD6).addRange(0xD8, 0xDE).addRange(0x178, 0x179).addRange(0x181, 0x182).addRange(0x186, 0x187).addRange(0x189, 0x18B).addRange(0x18E, 0x191).addRange(0x193, 0x194).addRange(0x196, 0x198).addRange(0x19C, 0x19D).addRange(0x19F, 0x1A0).addRange(0x1A6, 0x1A7).addRange(0x1AE, 0x1AF).addRange(0x1B1, 0x1B3).addRange(0x1B7, 0x1B8).addRange(0x1C4, 0x1C5).addRange(0x1C7, 0x1C8).addRange(0x1CA, 0x1CB).addRange(0x1F1, 0x1F2).addRange(0x1F6, 0x1F8).addRange(0x23A, 0x23B).addRange(0x23D, 0x23E).addRange(0x243, 0x246).addRange(0x388, 0x38A).addRange(0x38E, 0x38F).addRange(0x391, 0x3A1).addRange(0x3A3, 0x3AB).addRange(0x3F9, 0x3FA).addRange(0x3FD, 0x42F).addRange(0x4C0, 0x4C1).addRange(0x531, 0x556).addRange(0x10A0, 0x10C5).addRange(0x13A0, 0x13F5).addRange(0x1C90, 0x1CBA).addRange(0x1CBD, 0x1CBF).addRange(0x1F08, 0x1F0F).addRange(0x1F18, 0x1F1D).addRange(0x1F28, 0x1F2F).addRange(0x1F38, 0x1F3F).addRange(0x1F48, 0x1F4D).addRange(0x1F68, 0x1F6F).addRange(0x1F88, 0x1F8F).addRange(0x1F98, 0x1F9F).addRange(0x1FA8, 0x1FAF).addRange(0x1FB8, 0x1FBC).addRange(0x1FC8, 0x1FCC).addRange(0x1FD8, 0x1FDB).addRange(0x1FE8, 0x1FEC).addRange(0x1FF8, 0x1FFC).addRange(0x212A, 0x212B);\nset.addRange(0x2160, 0x216F).addRange(0x24B6, 0x24CF).addRange(0x2C00, 0x2C2F).addRange(0x2C62, 0x2C64).addRange(0x2C6D, 0x2C70).addRange(0x2C7E, 0x2C80).addRange(0xA77D, 0xA77E).addRange(0xA7AA, 0xA7AE).addRange(0xA7B0, 0xA7B4).addRange(0xA7C4, 0xA7C7).addRange(0xFF21, 0xFF3A).addRange(0x10400, 0x10427).addRange(0x104B0, 0x104D3).addRange(0x10570, 0x1057A).addRange(0x1057C, 0x1058A).addRange(0x1058C, 0x10592).addRange(0x10594, 0x10595).addRange(0x10C80, 0x10CB2).addRange(0x118A0, 0x118BF).addRange(0x16E40, 0x16E5F).addRange(0x1E900, 0x1E921);\nexports.characters = set;\n","const set = require('regenerate')(0xA0, 0xA8, 0xAA, 0xAD, 0xAF, 0x100, 0x102, 0x104, 0x106, 0x108, 0x10A, 0x10C, 0x10E, 0x110, 0x112, 0x114, 0x116, 0x118, 0x11A, 0x11C, 0x11E, 0x120, 0x122, 0x124, 0x126, 0x128, 0x12A, 0x12C, 0x12E, 0x130, 0x136, 0x139, 0x13B, 0x13D, 0x143, 0x145, 0x147, 0x14C, 0x14E, 0x150, 0x152, 0x154, 0x156, 0x158, 0x15A, 0x15C, 0x15E, 0x160, 0x162, 0x164, 0x166, 0x168, 0x16A, 0x16C, 0x16E, 0x170, 0x172, 0x174, 0x176, 0x17B, 0x17D, 0x17F, 0x184, 0x1A2, 0x1A4, 0x1A9, 0x1AC, 0x1B5, 0x1BC, 0x1CF, 0x1D1, 0x1D3, 0x1D5, 0x1D7, 0x1D9, 0x1DB, 0x1DE, 0x1E0, 0x1E2, 0x1E4, 0x1E6, 0x1E8, 0x1EA, 0x1EC, 0x1EE, 0x1FA, 0x1FC, 0x1FE, 0x200, 0x202, 0x204, 0x206, 0x208, 0x20A, 0x20C, 0x20E, 0x210, 0x212, 0x214, 0x216, 0x218, 0x21A, 0x21C, 0x21E, 0x220, 0x222, 0x224, 0x226, 0x228, 0x22A, 0x22C, 0x22E, 0x230, 0x232, 0x241, 0x248, 0x24A, 0x24C, 0x24E, 0x34F, 0x370, 0x372, 0x374, 0x376, 0x37A, 0x38C, 0x3C2, 0x3D8, 0x3DA, 0x3DC, 0x3DE, 0x3E0, 0x3E2, 0x3E4, 0x3E6, 0x3E8, 0x3EA, 0x3EC, 0x3EE, 0x3F7, 0x460, 0x462, 0x464, 0x466, 0x468, 0x46A, 0x46C, 0x46E, 0x470, 0x472, 0x474, 0x476, 0x478, 0x47A, 0x47C, 0x47E, 0x480, 0x48A, 0x48C, 0x48E, 0x490, 0x492, 0x494, 0x496, 0x498, 0x49A, 0x49C, 0x49E, 0x4A0, 0x4A2, 0x4A4, 0x4A6, 0x4A8, 0x4AA, 0x4AC, 0x4AE, 0x4B0, 0x4B2, 0x4B4, 0x4B6, 0x4B8, 0x4BA, 0x4BC, 0x4BE, 0x4C3, 0x4C5, 0x4C7, 0x4C9, 0x4CB, 0x4CD, 0x4D0, 0x4D2, 0x4D4, 0x4D6, 0x4D8, 0x4DA, 0x4DC, 0x4DE, 0x4E0, 0x4E2, 0x4E4, 0x4E6, 0x4E8, 0x4EA, 0x4EC, 0x4EE, 0x4F0, 0x4F2, 0x4F4, 0x4F6, 0x4F8, 0x4FA, 0x4FC, 0x4FE, 0x500, 0x502, 0x504, 0x506, 0x508, 0x50A, 0x50C, 0x50E, 0x510, 0x512, 0x514, 0x516, 0x518, 0x51A, 0x51C, 0x51E, 0x520, 0x522, 0x524, 0x526, 0x528, 0x52A, 0x52C, 0x52E, 0x587, 0x61C, 0x9DF, 0xA33, 0xA36, 0xA5E, 0xE33, 0xEB3, 0xF0C, 0xF43, 0xF4D, 0xF52, 0xF57, 0xF5C, 0xF69, 0xF73, 0xF81, 0xF93, 0xF9D, 0xFA2, 0xFA7, 0xFAC, 0xFB9, 0x10C7, 0x10CD, 0x10FC, 0x1D78, 0x1E00, 0x1E02, 0x1E04, 0x1E06, 0x1E08, 0x1E0A, 0x1E0C, 0x1E0E, 0x1E10, 0x1E12, 0x1E14, 0x1E16, 0x1E18, 0x1E1A, 0x1E1C, 0x1E1E, 0x1E20, 0x1E22, 0x1E24, 0x1E26, 0x1E28, 0x1E2A, 0x1E2C, 0x1E2E, 0x1E30, 0x1E32, 0x1E34, 0x1E36, 0x1E38, 0x1E3A, 0x1E3C, 0x1E3E, 0x1E40, 0x1E42, 0x1E44, 0x1E46, 0x1E48, 0x1E4A, 0x1E4C, 0x1E4E, 0x1E50, 0x1E52, 0x1E54, 0x1E56, 0x1E58, 0x1E5A, 0x1E5C, 0x1E5E, 0x1E60, 0x1E62, 0x1E64, 0x1E66, 0x1E68, 0x1E6A, 0x1E6C, 0x1E6E, 0x1E70, 0x1E72, 0x1E74, 0x1E76, 0x1E78, 0x1E7A, 0x1E7C, 0x1E7E, 0x1E80, 0x1E82, 0x1E84, 0x1E86, 0x1E88, 0x1E8A, 0x1E8C, 0x1E8E, 0x1E90, 0x1E92, 0x1E94, 0x1E9E, 0x1EA0, 0x1EA2, 0x1EA4, 0x1EA6, 0x1EA8, 0x1EAA, 0x1EAC, 0x1EAE, 0x1EB0, 0x1EB2, 0x1EB4, 0x1EB6, 0x1EB8, 0x1EBA, 0x1EBC, 0x1EBE, 0x1EC0, 0x1EC2, 0x1EC4, 0x1EC6, 0x1EC8, 0x1ECA, 0x1ECC, 0x1ECE, 0x1ED0, 0x1ED2, 0x1ED4, 0x1ED6, 0x1ED8, 0x1EDA, 0x1EDC, 0x1EDE, 0x1EE0, 0x1EE2, 0x1EE4, 0x1EE6, 0x1EE8, 0x1EEA, 0x1EEC, 0x1EEE, 0x1EF0, 0x1EF2, 0x1EF4, 0x1EF6, 0x1EF8, 0x1EFA, 0x1EFC, 0x1EFE, 0x1F59, 0x1F5B, 0x1F5D, 0x1F5F, 0x1F71, 0x1F73, 0x1F75, 0x1F77, 0x1F79, 0x1F7B, 0x1F7D, 0x1FD3, 0x1FE3, 0x2011, 0x2017, 0x203C, 0x203E, 0x2057, 0x20A8, 0x2124, 0x2126, 0x2128, 0x2183, 0x2189, 0x2A0C, 0x2ADC, 0x2C60, 0x2C67, 0x2C69, 0x2C6B, 0x2C72, 0x2C75, 0x2C82, 0x2C84, 0x2C86, 0x2C88, 0x2C8A, 0x2C8C, 0x2C8E, 0x2C90, 0x2C92, 0x2C94, 0x2C96, 0x2C98, 0x2C9A, 0x2C9C, 0x2C9E, 0x2CA0, 0x2CA2, 0x2CA4, 0x2CA6, 0x2CA8, 0x2CAA, 0x2CAC, 0x2CAE, 0x2CB0, 0x2CB2, 0x2CB4, 0x2CB6, 0x2CB8, 0x2CBA, 0x2CBC, 0x2CBE, 0x2CC0, 0x2CC2, 0x2CC4, 0x2CC6, 0x2CC8, 0x2CCA, 0x2CCC, 0x2CCE, 0x2CD0, 0x2CD2, 0x2CD4, 0x2CD6, 0x2CD8, 0x2CDA, 0x2CDC, 0x2CDE, 0x2CE0, 0x2CE2, 0x2CEB, 0x2CED, 0x2CF2, 0x2D6F, 0x2E9F, 0x2EF3, 0x3000, 0x3036, 0x309F, 0x30FF, 0xA640, 0xA642, 0xA644, 0xA646, 0xA648, 0xA64A, 0xA64C, 0xA64E, 0xA650, 0xA652, 0xA654, 0xA656, 0xA658, 0xA65A, 0xA65C, 0xA65E, 0xA660, 0xA662, 0xA664, 0xA666, 0xA668, 0xA66A, 0xA66C, 0xA680, 0xA682, 0xA684, 0xA686, 0xA688, 0xA68A, 0xA68C, 0xA68E, 0xA690, 0xA692, 0xA694, 0xA696, 0xA698, 0xA69A, 0xA722, 0xA724, 0xA726, 0xA728, 0xA72A, 0xA72C, 0xA72E, 0xA732, 0xA734, 0xA736, 0xA738, 0xA73A, 0xA73C, 0xA73E, 0xA740, 0xA742, 0xA744, 0xA746, 0xA748, 0xA74A, 0xA74C, 0xA74E, 0xA750, 0xA752, 0xA754, 0xA756, 0xA758, 0xA75A, 0xA75C, 0xA75E, 0xA760, 0xA762, 0xA764, 0xA766, 0xA768, 0xA76A, 0xA76C, 0xA76E, 0xA770, 0xA779, 0xA77B, 0xA780, 0xA782, 0xA784, 0xA786, 0xA78B, 0xA78D, 0xA790, 0xA792, 0xA796, 0xA798, 0xA79A, 0xA79C, 0xA79E, 0xA7A0, 0xA7A2, 0xA7A4, 0xA7A6, 0xA7A8, 0xA7B6, 0xA7B8, 0xA7BA, 0xA7BC, 0xA7BE, 0xA7C0, 0xA7C2, 0xA7C9, 0xA7D0, 0xA7D6, 0xA7D8, 0xAB69, 0xFA10, 0xFA12, 0xFA20, 0xFA22, 0xFB1D, 0xFB3E, 0xFE74, 0xFEFF, 0x1D4A2, 0x1D4BB, 0x1D546, 0x1EE24, 0x1EE27, 0x1EE39, 0x1EE3B, 0x1EE42, 0x1EE47, 0x1EE49, 0x1EE4B, 0x1EE54, 0x1EE57, 0x1EE59, 0x1EE5B, 0x1EE5D, 0x1EE5F, 0x1EE64, 0x1EE7E, 0x1F190);\nset.addRange(0x41, 0x5A).addRange(0xB2, 0xB5).addRange(0xB8, 0xBA).addRange(0xBC, 0xBE).addRange(0xC0, 0xD6).addRange(0xD8, 0xDF).addRange(0x132, 0x134).addRange(0x13F, 0x141).addRange(0x149, 0x14A).addRange(0x178, 0x179).addRange(0x181, 0x182).addRange(0x186, 0x187).addRange(0x189, 0x18B).addRange(0x18E, 0x191).addRange(0x193, 0x194).addRange(0x196, 0x198).addRange(0x19C, 0x19D).addRange(0x19F, 0x1A0).addRange(0x1A6, 0x1A7).addRange(0x1AE, 0x1AF).addRange(0x1B1, 0x1B3).addRange(0x1B7, 0x1B8).addRange(0x1C4, 0x1CD).addRange(0x1F1, 0x1F4).addRange(0x1F6, 0x1F8).addRange(0x23A, 0x23B).addRange(0x23D, 0x23E).addRange(0x243, 0x246).addRange(0x2B0, 0x2B8).addRange(0x2D8, 0x2DD).addRange(0x2E0, 0x2E4).addRange(0x340, 0x341).addRange(0x343, 0x345).addRange(0x37E, 0x37F).addRange(0x384, 0x38A).addRange(0x38E, 0x38F).addRange(0x391, 0x3A1).addRange(0x3A3, 0x3AB).addRange(0x3CF, 0x3D6).addRange(0x3F0, 0x3F2).addRange(0x3F4, 0x3F5).addRange(0x3F9, 0x3FA).addRange(0x3FD, 0x42F).addRange(0x4C0, 0x4C1).addRange(0x531, 0x556).addRange(0x675, 0x678).addRange(0x958, 0x95F).addRange(0x9DC, 0x9DD).addRange(0xA59, 0xA5B).addRange(0xB5C, 0xB5D).addRange(0xEDC, 0xEDD);\nset.addRange(0xF75, 0xF79).addRange(0x10A0, 0x10C5).addRange(0x115F, 0x1160).addRange(0x13F8, 0x13FD).addRange(0x17B4, 0x17B5).addRange(0x180B, 0x180F).addRange(0x1C80, 0x1C88).addRange(0x1C90, 0x1CBA).addRange(0x1CBD, 0x1CBF).addRange(0x1D2C, 0x1D2E).addRange(0x1D30, 0x1D3A).addRange(0x1D3C, 0x1D4D).addRange(0x1D4F, 0x1D6A).addRange(0x1D9B, 0x1DBF).addRange(0x1E9A, 0x1E9B).addRange(0x1F08, 0x1F0F).addRange(0x1F18, 0x1F1D).addRange(0x1F28, 0x1F2F).addRange(0x1F38, 0x1F3F).addRange(0x1F48, 0x1F4D).addRange(0x1F68, 0x1F6F).addRange(0x1F80, 0x1FAF).addRange(0x1FB2, 0x1FB4).addRange(0x1FB7, 0x1FC4).addRange(0x1FC7, 0x1FCF).addRange(0x1FD8, 0x1FDB).addRange(0x1FDD, 0x1FDF).addRange(0x1FE8, 0x1FEF).addRange(0x1FF2, 0x1FF4).addRange(0x1FF7, 0x1FFE).addRange(0x2000, 0x200F).addRange(0x2024, 0x2026).addRange(0x202A, 0x202F).addRange(0x2033, 0x2034).addRange(0x2036, 0x2037).addRange(0x2047, 0x2049).addRange(0x205F, 0x2071).addRange(0x2074, 0x208E).addRange(0x2090, 0x209C).addRange(0x2100, 0x2103).addRange(0x2105, 0x2107).addRange(0x2109, 0x2113).addRange(0x2115, 0x2116).addRange(0x2119, 0x211D).addRange(0x2120, 0x2122).addRange(0x212A, 0x212D).addRange(0x212F, 0x2139).addRange(0x213B, 0x2140).addRange(0x2145, 0x2149).addRange(0x2150, 0x217F).addRange(0x222C, 0x222D);\nset.addRange(0x222F, 0x2230).addRange(0x2329, 0x232A).addRange(0x2460, 0x24EA).addRange(0x2A74, 0x2A76).addRange(0x2C00, 0x2C2F).addRange(0x2C62, 0x2C64).addRange(0x2C6D, 0x2C70).addRange(0x2C7C, 0x2C80).addRange(0x2F00, 0x2FD5).addRange(0x3038, 0x303A).addRange(0x309B, 0x309C).addRange(0x3131, 0x318E).addRange(0x3192, 0x319F).addRange(0x3200, 0x321E).addRange(0x3220, 0x3247).addRange(0x3250, 0x327E).addRange(0x3280, 0x33FF).addRange(0xA69C, 0xA69D).addRange(0xA77D, 0xA77E).addRange(0xA7AA, 0xA7AE).addRange(0xA7B0, 0xA7B4).addRange(0xA7C4, 0xA7C7).addRange(0xA7F2, 0xA7F5).addRange(0xA7F8, 0xA7F9).addRange(0xAB5C, 0xAB5F).addRange(0xAB70, 0xABBF).addRange(0xF900, 0xFA0D).addRange(0xFA15, 0xFA1E).addRange(0xFA25, 0xFA26).addRange(0xFA2A, 0xFA6D).addRange(0xFA70, 0xFAD9).addRange(0xFB00, 0xFB06).addRange(0xFB13, 0xFB17).addRange(0xFB1F, 0xFB36).addRange(0xFB38, 0xFB3C).addRange(0xFB40, 0xFB41).addRange(0xFB43, 0xFB44).addRange(0xFB46, 0xFBB1).addRange(0xFBD3, 0xFD3D).addRange(0xFD50, 0xFD8F).addRange(0xFD92, 0xFDC7).addRange(0xFDF0, 0xFDFC).addRange(0xFE00, 0xFE19).addRange(0xFE30, 0xFE44).addRange(0xFE47, 0xFE52).addRange(0xFE54, 0xFE66).addRange(0xFE68, 0xFE6B).addRange(0xFE70, 0xFE72).addRange(0xFE76, 0xFEFC).addRange(0xFF01, 0xFFBE).addRange(0xFFC2, 0xFFC7);\nset.addRange(0xFFCA, 0xFFCF).addRange(0xFFD2, 0xFFD7).addRange(0xFFDA, 0xFFDC).addRange(0xFFE0, 0xFFE6).addRange(0xFFE8, 0xFFEE).addRange(0xFFF0, 0xFFF8).addRange(0x10400, 0x10427).addRange(0x104B0, 0x104D3).addRange(0x10570, 0x1057A).addRange(0x1057C, 0x1058A).addRange(0x1058C, 0x10592).addRange(0x10594, 0x10595).addRange(0x10781, 0x10785).addRange(0x10787, 0x107B0).addRange(0x107B2, 0x107BA).addRange(0x10C80, 0x10CB2).addRange(0x118A0, 0x118BF).addRange(0x16E40, 0x16E5F).addRange(0x1BCA0, 0x1BCA3).addRange(0x1D15E, 0x1D164).addRange(0x1D173, 0x1D17A).addRange(0x1D1BB, 0x1D1C0).addRange(0x1D400, 0x1D454).addRange(0x1D456, 0x1D49C).addRange(0x1D49E, 0x1D49F).addRange(0x1D4A5, 0x1D4A6).addRange(0x1D4A9, 0x1D4AC).addRange(0x1D4AE, 0x1D4B9).addRange(0x1D4BD, 0x1D4C3).addRange(0x1D4C5, 0x1D505).addRange(0x1D507, 0x1D50A).addRange(0x1D50D, 0x1D514).addRange(0x1D516, 0x1D51C).addRange(0x1D51E, 0x1D539).addRange(0x1D53B, 0x1D53E).addRange(0x1D540, 0x1D544).addRange(0x1D54A, 0x1D550).addRange(0x1D552, 0x1D6A5).addRange(0x1D6A8, 0x1D7CB).addRange(0x1D7CE, 0x1D7FF).addRange(0x1E030, 0x1E06D).addRange(0x1E900, 0x1E921).addRange(0x1EE00, 0x1EE03).addRange(0x1EE05, 0x1EE1F).addRange(0x1EE21, 0x1EE22).addRange(0x1EE29, 0x1EE32).addRange(0x1EE34, 0x1EE37).addRange(0x1EE4D, 0x1EE4F).addRange(0x1EE51, 0x1EE52).addRange(0x1EE61, 0x1EE62).addRange(0x1EE67, 0x1EE6A);\nset.addRange(0x1EE6C, 0x1EE72).addRange(0x1EE74, 0x1EE77).addRange(0x1EE79, 0x1EE7C).addRange(0x1EE80, 0x1EE89).addRange(0x1EE8B, 0x1EE9B).addRange(0x1EEA1, 0x1EEA3).addRange(0x1EEA5, 0x1EEA9).addRange(0x1EEAB, 0x1EEBB).addRange(0x1F100, 0x1F10A).addRange(0x1F110, 0x1F12E).addRange(0x1F130, 0x1F14F).addRange(0x1F16A, 0x1F16C).addRange(0x1F200, 0x1F202).addRange(0x1F210, 0x1F23B).addRange(0x1F240, 0x1F248).addRange(0x1F250, 0x1F251).addRange(0x1FBF0, 0x1FBF9).addRange(0x2F800, 0x2FA1D).addRange(0xE0000, 0xE0FFF);\nexports.characters = set;\n","const set = require('regenerate')(0xB5, 0x101, 0x103, 0x105, 0x107, 0x109, 0x10B, 0x10D, 0x10F, 0x111, 0x113, 0x115, 0x117, 0x119, 0x11B, 0x11D, 0x11F, 0x121, 0x123, 0x125, 0x127, 0x129, 0x12B, 0x12D, 0x12F, 0x131, 0x133, 0x135, 0x137, 0x13A, 0x13C, 0x13E, 0x140, 0x142, 0x144, 0x146, 0x14B, 0x14D, 0x14F, 0x151, 0x153, 0x155, 0x157, 0x159, 0x15B, 0x15D, 0x15F, 0x161, 0x163, 0x165, 0x167, 0x169, 0x16B, 0x16D, 0x16F, 0x171, 0x173, 0x175, 0x177, 0x17A, 0x17C, 0x183, 0x185, 0x188, 0x18C, 0x192, 0x195, 0x19E, 0x1A1, 0x1A3, 0x1A5, 0x1A8, 0x1AD, 0x1B0, 0x1B4, 0x1B6, 0x1B9, 0x1BD, 0x1BF, 0x1C4, 0x1CC, 0x1CE, 0x1D0, 0x1D2, 0x1D4, 0x1D6, 0x1D8, 0x1DA, 0x1DF, 0x1E1, 0x1E3, 0x1E5, 0x1E7, 0x1E9, 0x1EB, 0x1ED, 0x1F3, 0x1F5, 0x1F9, 0x1FB, 0x1FD, 0x1FF, 0x201, 0x203, 0x205, 0x207, 0x209, 0x20B, 0x20D, 0x20F, 0x211, 0x213, 0x215, 0x217, 0x219, 0x21B, 0x21D, 0x21F, 0x223, 0x225, 0x227, 0x229, 0x22B, 0x22D, 0x22F, 0x231, 0x233, 0x23C, 0x242, 0x247, 0x249, 0x24B, 0x24D, 0x259, 0x263, 0x26F, 0x275, 0x27D, 0x280, 0x292, 0x345, 0x371, 0x373, 0x377, 0x390, 0x3D9, 0x3DB, 0x3DD, 0x3DF, 0x3E1, 0x3E3, 0x3E5, 0x3E7, 0x3E9, 0x3EB, 0x3ED, 0x3F5, 0x3F8, 0x3FB, 0x461, 0x463, 0x465, 0x467, 0x469, 0x46B, 0x46D, 0x46F, 0x471, 0x473, 0x475, 0x477, 0x479, 0x47B, 0x47D, 0x47F, 0x481, 0x48B, 0x48D, 0x48F, 0x491, 0x493, 0x495, 0x497, 0x499, 0x49B, 0x49D, 0x49F, 0x4A1, 0x4A3, 0x4A5, 0x4A7, 0x4A9, 0x4AB, 0x4AD, 0x4AF, 0x4B1, 0x4B3, 0x4B5, 0x4B7, 0x4B9, 0x4BB, 0x4BD, 0x4BF, 0x4C2, 0x4C4, 0x4C6, 0x4C8, 0x4CA, 0x4CC, 0x4D1, 0x4D3, 0x4D5, 0x4D7, 0x4D9, 0x4DB, 0x4DD, 0x4DF, 0x4E1, 0x4E3, 0x4E5, 0x4E7, 0x4E9, 0x4EB, 0x4ED, 0x4EF, 0x4F1, 0x4F3, 0x4F5, 0x4F7, 0x4F9, 0x4FB, 0x4FD, 0x4FF, 0x501, 0x503, 0x505, 0x507, 0x509, 0x50B, 0x50D, 0x50F, 0x511, 0x513, 0x515, 0x517, 0x519, 0x51B, 0x51D, 0x51F, 0x521, 0x523, 0x525, 0x527, 0x529, 0x52B, 0x52D, 0x52F, 0x1D79, 0x1D7D, 0x1D8E, 0x1E01, 0x1E03, 0x1E05, 0x1E07, 0x1E09, 0x1E0B, 0x1E0D, 0x1E0F, 0x1E11, 0x1E13, 0x1E15, 0x1E17, 0x1E19, 0x1E1B, 0x1E1D, 0x1E1F, 0x1E21, 0x1E23, 0x1E25, 0x1E27, 0x1E29, 0x1E2B, 0x1E2D, 0x1E2F, 0x1E31, 0x1E33, 0x1E35, 0x1E37, 0x1E39, 0x1E3B, 0x1E3D, 0x1E3F, 0x1E41, 0x1E43, 0x1E45, 0x1E47, 0x1E49, 0x1E4B, 0x1E4D, 0x1E4F, 0x1E51, 0x1E53, 0x1E55, 0x1E57, 0x1E59, 0x1E5B, 0x1E5D, 0x1E5F, 0x1E61, 0x1E63, 0x1E65, 0x1E67, 0x1E69, 0x1E6B, 0x1E6D, 0x1E6F, 0x1E71, 0x1E73, 0x1E75, 0x1E77, 0x1E79, 0x1E7B, 0x1E7D, 0x1E7F, 0x1E81, 0x1E83, 0x1E85, 0x1E87, 0x1E89, 0x1E8B, 0x1E8D, 0x1E8F, 0x1E91, 0x1E93, 0x1EA1, 0x1EA3, 0x1EA5, 0x1EA7, 0x1EA9, 0x1EAB, 0x1EAD, 0x1EAF, 0x1EB1, 0x1EB3, 0x1EB5, 0x1EB7, 0x1EB9, 0x1EBB, 0x1EBD, 0x1EBF, 0x1EC1, 0x1EC3, 0x1EC5, 0x1EC7, 0x1EC9, 0x1ECB, 0x1ECD, 0x1ECF, 0x1ED1, 0x1ED3, 0x1ED5, 0x1ED7, 0x1ED9, 0x1EDB, 0x1EDD, 0x1EDF, 0x1EE1, 0x1EE3, 0x1EE5, 0x1EE7, 0x1EE9, 0x1EEB, 0x1EED, 0x1EEF, 0x1EF1, 0x1EF3, 0x1EF5, 0x1EF7, 0x1EF9, 0x1EFB, 0x1EFD, 0x1FBE, 0x214E, 0x2184, 0x2C61, 0x2C68, 0x2C6A, 0x2C6C, 0x2C73, 0x2C76, 0x2C81, 0x2C83, 0x2C85, 0x2C87, 0x2C89, 0x2C8B, 0x2C8D, 0x2C8F, 0x2C91, 0x2C93, 0x2C95, 0x2C97, 0x2C99, 0x2C9B, 0x2C9D, 0x2C9F, 0x2CA1, 0x2CA3, 0x2CA5, 0x2CA7, 0x2CA9, 0x2CAB, 0x2CAD, 0x2CAF, 0x2CB1, 0x2CB3, 0x2CB5, 0x2CB7, 0x2CB9, 0x2CBB, 0x2CBD, 0x2CBF, 0x2CC1, 0x2CC3, 0x2CC5, 0x2CC7, 0x2CC9, 0x2CCB, 0x2CCD, 0x2CCF, 0x2CD1, 0x2CD3, 0x2CD5, 0x2CD7, 0x2CD9, 0x2CDB, 0x2CDD, 0x2CDF, 0x2CE1, 0x2CE3, 0x2CEC, 0x2CEE, 0x2CF3, 0x2D27, 0x2D2D, 0xA641, 0xA643, 0xA645, 0xA647, 0xA649, 0xA64B, 0xA64D, 0xA64F, 0xA651, 0xA653, 0xA655, 0xA657, 0xA659, 0xA65B, 0xA65D, 0xA65F, 0xA661, 0xA663, 0xA665, 0xA667, 0xA669, 0xA66B, 0xA66D, 0xA681, 0xA683, 0xA685, 0xA687, 0xA689, 0xA68B, 0xA68D, 0xA68F, 0xA691, 0xA693, 0xA695, 0xA697, 0xA699, 0xA69B, 0xA723, 0xA725, 0xA727, 0xA729, 0xA72B, 0xA72D, 0xA72F, 0xA733, 0xA735, 0xA737, 0xA739, 0xA73B, 0xA73D, 0xA73F, 0xA741, 0xA743, 0xA745, 0xA747, 0xA749, 0xA74B, 0xA74D, 0xA74F, 0xA751, 0xA753, 0xA755, 0xA757, 0xA759, 0xA75B, 0xA75D, 0xA75F, 0xA761, 0xA763, 0xA765, 0xA767, 0xA769, 0xA76B, 0xA76D, 0xA76F, 0xA77A, 0xA77C, 0xA77F, 0xA781, 0xA783, 0xA785, 0xA787, 0xA78C, 0xA791, 0xA797, 0xA799, 0xA79B, 0xA79D, 0xA79F, 0xA7A1, 0xA7A3, 0xA7A5, 0xA7A7, 0xA7A9, 0xA7B5, 0xA7B7, 0xA7B9, 0xA7BB, 0xA7BD, 0xA7BF, 0xA7C1, 0xA7C3, 0xA7C8, 0xA7CA, 0xA7D1, 0xA7D7, 0xA7D9, 0xA7F6, 0xAB53);\nset.addRange(0x61, 0x7A).addRange(0xDF, 0xF6).addRange(0xF8, 0xFF).addRange(0x148, 0x149).addRange(0x17E, 0x180).addRange(0x199, 0x19A).addRange(0x1C6, 0x1C7).addRange(0x1C9, 0x1CA).addRange(0x1DC, 0x1DD).addRange(0x1EF, 0x1F1).addRange(0x23F, 0x240).addRange(0x24F, 0x254).addRange(0x256, 0x257).addRange(0x25B, 0x25C).addRange(0x260, 0x261).addRange(0x265, 0x266).addRange(0x268, 0x26C).addRange(0x271, 0x272).addRange(0x282, 0x283).addRange(0x287, 0x28C).addRange(0x29D, 0x29E).addRange(0x37B, 0x37D).addRange(0x3AC, 0x3CE).addRange(0x3D0, 0x3D1).addRange(0x3D5, 0x3D7).addRange(0x3EF, 0x3F3).addRange(0x430, 0x45F).addRange(0x4CE, 0x4CF).addRange(0x561, 0x587).addRange(0x13F8, 0x13FD).addRange(0x1C80, 0x1C88).addRange(0x1E95, 0x1E9B).addRange(0x1EFF, 0x1F07).addRange(0x1F10, 0x1F15).addRange(0x1F20, 0x1F27).addRange(0x1F30, 0x1F37).addRange(0x1F40, 0x1F45).addRange(0x1F50, 0x1F57).addRange(0x1F60, 0x1F67).addRange(0x1F70, 0x1F7D).addRange(0x1F80, 0x1F87).addRange(0x1F90, 0x1F97).addRange(0x1FA0, 0x1FA7).addRange(0x1FB0, 0x1FB4).addRange(0x1FB6, 0x1FB7).addRange(0x1FC2, 0x1FC4).addRange(0x1FC6, 0x1FC7).addRange(0x1FD0, 0x1FD3).addRange(0x1FD6, 0x1FD7).addRange(0x1FE0, 0x1FE7).addRange(0x1FF2, 0x1FF4);\nset.addRange(0x1FF6, 0x1FF7).addRange(0x2170, 0x217F).addRange(0x24D0, 0x24E9).addRange(0x2C30, 0x2C5F).addRange(0x2C65, 0x2C66).addRange(0x2D00, 0x2D25).addRange(0xA793, 0xA794).addRange(0xAB70, 0xABBF).addRange(0xFB00, 0xFB06).addRange(0xFB13, 0xFB17).addRange(0xFF41, 0xFF5A).addRange(0x10428, 0x1044F).addRange(0x104D8, 0x104FB).addRange(0x10597, 0x105A1).addRange(0x105A3, 0x105B1).addRange(0x105B3, 0x105B9).addRange(0x105BB, 0x105BC).addRange(0x10CC0, 0x10CF2).addRange(0x118C0, 0x118DF).addRange(0x16E60, 0x16E7F).addRange(0x1E922, 0x1E943);\nexports.characters = set;\n","const set = require('regenerate')(0xB5, 0x101, 0x103, 0x105, 0x107, 0x109, 0x10B, 0x10D, 0x10F, 0x111, 0x113, 0x115, 0x117, 0x119, 0x11B, 0x11D, 0x11F, 0x121, 0x123, 0x125, 0x127, 0x129, 0x12B, 0x12D, 0x12F, 0x131, 0x133, 0x135, 0x137, 0x13A, 0x13C, 0x13E, 0x140, 0x142, 0x144, 0x146, 0x14B, 0x14D, 0x14F, 0x151, 0x153, 0x155, 0x157, 0x159, 0x15B, 0x15D, 0x15F, 0x161, 0x163, 0x165, 0x167, 0x169, 0x16B, 0x16D, 0x16F, 0x171, 0x173, 0x175, 0x177, 0x17A, 0x17C, 0x183, 0x185, 0x188, 0x18C, 0x192, 0x195, 0x19E, 0x1A1, 0x1A3, 0x1A5, 0x1A8, 0x1AD, 0x1B0, 0x1B4, 0x1B6, 0x1B9, 0x1BD, 0x1BF, 0x1CE, 0x1D0, 0x1D2, 0x1D4, 0x1D6, 0x1D8, 0x1DA, 0x1DF, 0x1E1, 0x1E3, 0x1E5, 0x1E7, 0x1E9, 0x1EB, 0x1ED, 0x1F5, 0x1F9, 0x1FB, 0x1FD, 0x1FF, 0x201, 0x203, 0x205, 0x207, 0x209, 0x20B, 0x20D, 0x20F, 0x211, 0x213, 0x215, 0x217, 0x219, 0x21B, 0x21D, 0x21F, 0x223, 0x225, 0x227, 0x229, 0x22B, 0x22D, 0x22F, 0x231, 0x233, 0x23C, 0x242, 0x247, 0x249, 0x24B, 0x24D, 0x259, 0x263, 0x26F, 0x275, 0x27D, 0x280, 0x292, 0x345, 0x371, 0x373, 0x377, 0x390, 0x3D9, 0x3DB, 0x3DD, 0x3DF, 0x3E1, 0x3E3, 0x3E5, 0x3E7, 0x3E9, 0x3EB, 0x3ED, 0x3F5, 0x3F8, 0x3FB, 0x461, 0x463, 0x465, 0x467, 0x469, 0x46B, 0x46D, 0x46F, 0x471, 0x473, 0x475, 0x477, 0x479, 0x47B, 0x47D, 0x47F, 0x481, 0x48B, 0x48D, 0x48F, 0x491, 0x493, 0x495, 0x497, 0x499, 0x49B, 0x49D, 0x49F, 0x4A1, 0x4A3, 0x4A5, 0x4A7, 0x4A9, 0x4AB, 0x4AD, 0x4AF, 0x4B1, 0x4B3, 0x4B5, 0x4B7, 0x4B9, 0x4BB, 0x4BD, 0x4BF, 0x4C2, 0x4C4, 0x4C6, 0x4C8, 0x4CA, 0x4CC, 0x4D1, 0x4D3, 0x4D5, 0x4D7, 0x4D9, 0x4DB, 0x4DD, 0x4DF, 0x4E1, 0x4E3, 0x4E5, 0x4E7, 0x4E9, 0x4EB, 0x4ED, 0x4EF, 0x4F1, 0x4F3, 0x4F5, 0x4F7, 0x4F9, 0x4FB, 0x4FD, 0x4FF, 0x501, 0x503, 0x505, 0x507, 0x509, 0x50B, 0x50D, 0x50F, 0x511, 0x513, 0x515, 0x517, 0x519, 0x51B, 0x51D, 0x51F, 0x521, 0x523, 0x525, 0x527, 0x529, 0x52B, 0x52D, 0x52F, 0x1D79, 0x1D7D, 0x1D8E, 0x1E01, 0x1E03, 0x1E05, 0x1E07, 0x1E09, 0x1E0B, 0x1E0D, 0x1E0F, 0x1E11, 0x1E13, 0x1E15, 0x1E17, 0x1E19, 0x1E1B, 0x1E1D, 0x1E1F, 0x1E21, 0x1E23, 0x1E25, 0x1E27, 0x1E29, 0x1E2B, 0x1E2D, 0x1E2F, 0x1E31, 0x1E33, 0x1E35, 0x1E37, 0x1E39, 0x1E3B, 0x1E3D, 0x1E3F, 0x1E41, 0x1E43, 0x1E45, 0x1E47, 0x1E49, 0x1E4B, 0x1E4D, 0x1E4F, 0x1E51, 0x1E53, 0x1E55, 0x1E57, 0x1E59, 0x1E5B, 0x1E5D, 0x1E5F, 0x1E61, 0x1E63, 0x1E65, 0x1E67, 0x1E69, 0x1E6B, 0x1E6D, 0x1E6F, 0x1E71, 0x1E73, 0x1E75, 0x1E77, 0x1E79, 0x1E7B, 0x1E7D, 0x1E7F, 0x1E81, 0x1E83, 0x1E85, 0x1E87, 0x1E89, 0x1E8B, 0x1E8D, 0x1E8F, 0x1E91, 0x1E93, 0x1EA1, 0x1EA3, 0x1EA5, 0x1EA7, 0x1EA9, 0x1EAB, 0x1EAD, 0x1EAF, 0x1EB1, 0x1EB3, 0x1EB5, 0x1EB7, 0x1EB9, 0x1EBB, 0x1EBD, 0x1EBF, 0x1EC1, 0x1EC3, 0x1EC5, 0x1EC7, 0x1EC9, 0x1ECB, 0x1ECD, 0x1ECF, 0x1ED1, 0x1ED3, 0x1ED5, 0x1ED7, 0x1ED9, 0x1EDB, 0x1EDD, 0x1EDF, 0x1EE1, 0x1EE3, 0x1EE5, 0x1EE7, 0x1EE9, 0x1EEB, 0x1EED, 0x1EEF, 0x1EF1, 0x1EF3, 0x1EF5, 0x1EF7, 0x1EF9, 0x1EFB, 0x1EFD, 0x1FBC, 0x1FBE, 0x1FCC, 0x1FFC, 0x214E, 0x2184, 0x2C61, 0x2C68, 0x2C6A, 0x2C6C, 0x2C73, 0x2C76, 0x2C81, 0x2C83, 0x2C85, 0x2C87, 0x2C89, 0x2C8B, 0x2C8D, 0x2C8F, 0x2C91, 0x2C93, 0x2C95, 0x2C97, 0x2C99, 0x2C9B, 0x2C9D, 0x2C9F, 0x2CA1, 0x2CA3, 0x2CA5, 0x2CA7, 0x2CA9, 0x2CAB, 0x2CAD, 0x2CAF, 0x2CB1, 0x2CB3, 0x2CB5, 0x2CB7, 0x2CB9, 0x2CBB, 0x2CBD, 0x2CBF, 0x2CC1, 0x2CC3, 0x2CC5, 0x2CC7, 0x2CC9, 0x2CCB, 0x2CCD, 0x2CCF, 0x2CD1, 0x2CD3, 0x2CD5, 0x2CD7, 0x2CD9, 0x2CDB, 0x2CDD, 0x2CDF, 0x2CE1, 0x2CE3, 0x2CEC, 0x2CEE, 0x2CF3, 0x2D27, 0x2D2D, 0xA641, 0xA643, 0xA645, 0xA647, 0xA649, 0xA64B, 0xA64D, 0xA64F, 0xA651, 0xA653, 0xA655, 0xA657, 0xA659, 0xA65B, 0xA65D, 0xA65F, 0xA661, 0xA663, 0xA665, 0xA667, 0xA669, 0xA66B, 0xA66D, 0xA681, 0xA683, 0xA685, 0xA687, 0xA689, 0xA68B, 0xA68D, 0xA68F, 0xA691, 0xA693, 0xA695, 0xA697, 0xA699, 0xA69B, 0xA723, 0xA725, 0xA727, 0xA729, 0xA72B, 0xA72D, 0xA72F, 0xA733, 0xA735, 0xA737, 0xA739, 0xA73B, 0xA73D, 0xA73F, 0xA741, 0xA743, 0xA745, 0xA747, 0xA749, 0xA74B, 0xA74D, 0xA74F, 0xA751, 0xA753, 0xA755, 0xA757, 0xA759, 0xA75B, 0xA75D, 0xA75F, 0xA761, 0xA763, 0xA765, 0xA767, 0xA769, 0xA76B, 0xA76D, 0xA76F, 0xA77A, 0xA77C, 0xA77F, 0xA781, 0xA783, 0xA785, 0xA787, 0xA78C, 0xA791, 0xA797, 0xA799, 0xA79B, 0xA79D, 0xA79F, 0xA7A1, 0xA7A3, 0xA7A5, 0xA7A7, 0xA7A9, 0xA7B5, 0xA7B7, 0xA7B9, 0xA7BB, 0xA7BD, 0xA7BF, 0xA7C1, 0xA7C3, 0xA7C8, 0xA7CA, 0xA7D1, 0xA7D7, 0xA7D9, 0xA7F6, 0xAB53);\nset.addRange(0x61, 0x7A).addRange(0xDF, 0xF6).addRange(0xF8, 0xFF).addRange(0x148, 0x149).addRange(0x17E, 0x180).addRange(0x199, 0x19A).addRange(0x1C5, 0x1C6).addRange(0x1C8, 0x1C9).addRange(0x1CB, 0x1CC).addRange(0x1DC, 0x1DD).addRange(0x1EF, 0x1F0).addRange(0x1F2, 0x1F3).addRange(0x23F, 0x240).addRange(0x24F, 0x254).addRange(0x256, 0x257).addRange(0x25B, 0x25C).addRange(0x260, 0x261).addRange(0x265, 0x266).addRange(0x268, 0x26C).addRange(0x271, 0x272).addRange(0x282, 0x283).addRange(0x287, 0x28C).addRange(0x29D, 0x29E).addRange(0x37B, 0x37D).addRange(0x3AC, 0x3CE).addRange(0x3D0, 0x3D1).addRange(0x3D5, 0x3D7).addRange(0x3EF, 0x3F3).addRange(0x430, 0x45F).addRange(0x4CE, 0x4CF).addRange(0x561, 0x587).addRange(0x10D0, 0x10FA).addRange(0x10FD, 0x10FF).addRange(0x13F8, 0x13FD).addRange(0x1C80, 0x1C88).addRange(0x1E95, 0x1E9B).addRange(0x1EFF, 0x1F07).addRange(0x1F10, 0x1F15).addRange(0x1F20, 0x1F27).addRange(0x1F30, 0x1F37).addRange(0x1F40, 0x1F45).addRange(0x1F50, 0x1F57).addRange(0x1F60, 0x1F67).addRange(0x1F70, 0x1F7D).addRange(0x1F80, 0x1FB4).addRange(0x1FB6, 0x1FB7).addRange(0x1FC2, 0x1FC4).addRange(0x1FC6, 0x1FC7).addRange(0x1FD0, 0x1FD3).addRange(0x1FD6, 0x1FD7).addRange(0x1FE0, 0x1FE7);\nset.addRange(0x1FF2, 0x1FF4).addRange(0x1FF6, 0x1FF7).addRange(0x2170, 0x217F).addRange(0x24D0, 0x24E9).addRange(0x2C30, 0x2C5F).addRange(0x2C65, 0x2C66).addRange(0x2D00, 0x2D25).addRange(0xA793, 0xA794).addRange(0xAB70, 0xABBF).addRange(0xFB00, 0xFB06).addRange(0xFB13, 0xFB17).addRange(0xFF41, 0xFF5A).addRange(0x10428, 0x1044F).addRange(0x104D8, 0x104FB).addRange(0x10597, 0x105A1).addRange(0x105A3, 0x105B1).addRange(0x105B3, 0x105B9).addRange(0x105BB, 0x105BC).addRange(0x10CC0, 0x10CF2).addRange(0x118C0, 0x118DF).addRange(0x16E60, 0x16E7F).addRange(0x1E922, 0x1E943);\nexports.characters = set;\n","const set = require('regenerate')(0x2D, 0x58A, 0x5BE, 0x1400, 0x1806, 0x2053, 0x207B, 0x208B, 0x2212, 0x2E17, 0x2E1A, 0x2E40, 0x2E5D, 0x301C, 0x3030, 0x30A0, 0xFE58, 0xFE63, 0xFF0D, 0x10EAD);\nset.addRange(0x2010, 0x2015).addRange(0x2E3A, 0x2E3B).addRange(0xFE31, 0xFE32);\nexports.characters = set;\n","const set = require('regenerate')(0xAD, 0x34F, 0x61C, 0x3164, 0xFEFF, 0xFFA0);\nset.addRange(0x115F, 0x1160).addRange(0x17B4, 0x17B5).addRange(0x180B, 0x180F).addRange(0x200B, 0x200F).addRange(0x202A, 0x202E).addRange(0x2060, 0x206F).addRange(0xFE00, 0xFE0F).addRange(0xFFF0, 0xFFF8).addRange(0x1BCA0, 0x1BCA3).addRange(0x1D173, 0x1D17A).addRange(0xE0000, 0xE0FFF);\nexports.characters = set;\n","const set = require('regenerate')(0x149, 0x673, 0xF77, 0xF79, 0xE0001);\nset.addRange(0x17A3, 0x17A4).addRange(0x206A, 0x206F).addRange(0x2329, 0x232A);\nexports.characters = set;\n","const set = require('regenerate')(0x5E, 0x60, 0xA8, 0xAF, 0xB4, 0x37A, 0x559, 0x5BF, 0x5C4, 0x93C, 0x94D, 0x971, 0x9BC, 0x9CD, 0xA3C, 0xA4D, 0xABC, 0xACD, 0xB3C, 0xB4D, 0xB55, 0xBCD, 0xC3C, 0xC4D, 0xCBC, 0xCCD, 0xD4D, 0xDCA, 0xE4E, 0xEBA, 0xF35, 0xF37, 0xF39, 0xFC6, 0x1037, 0x108F, 0x17DD, 0x1A7F, 0x1B34, 0x1B44, 0x1CED, 0x1CF4, 0x1FBD, 0x2E2F, 0x30FC, 0xA66F, 0xA67F, 0xA8C4, 0xA953, 0xA9B3, 0xA9C0, 0xA9E5, 0xAAF6, 0xFB1E, 0xFF3E, 0xFF40, 0xFF70, 0xFFE3, 0x102E0, 0x11046, 0x11070, 0x11173, 0x111C0, 0x1133C, 0x1134D, 0x11442, 0x11446, 0x1163F, 0x1172B, 0x11943, 0x119E0, 0x11A34, 0x11A47, 0x11A99, 0x11C3F, 0x11D42, 0x11D97, 0x1E2AE);\nset.addRange(0xB7, 0xB8).addRange(0x2B0, 0x34E).addRange(0x350, 0x357).addRange(0x35D, 0x362).addRange(0x374, 0x375).addRange(0x384, 0x385).addRange(0x483, 0x487).addRange(0x591, 0x5A1).addRange(0x5A3, 0x5BD).addRange(0x5C1, 0x5C2).addRange(0x64B, 0x652).addRange(0x657, 0x658).addRange(0x6DF, 0x6E0).addRange(0x6E5, 0x6E6).addRange(0x6EA, 0x6EC).addRange(0x730, 0x74A).addRange(0x7A6, 0x7B0).addRange(0x7EB, 0x7F5).addRange(0x818, 0x819).addRange(0x898, 0x89F).addRange(0x8C9, 0x8D2).addRange(0x8E3, 0x8FE).addRange(0x951, 0x954).addRange(0xAFD, 0xAFF).addRange(0xD3B, 0xD3C).addRange(0xE47, 0xE4C).addRange(0xEC8, 0xECC).addRange(0xF18, 0xF19).addRange(0xF3E, 0xF3F).addRange(0xF82, 0xF84).addRange(0xF86, 0xF87).addRange(0x1039, 0x103A).addRange(0x1063, 0x1064).addRange(0x1069, 0x106D).addRange(0x1087, 0x108D).addRange(0x109A, 0x109B).addRange(0x135D, 0x135F).addRange(0x1714, 0x1715).addRange(0x17C9, 0x17D3).addRange(0x1939, 0x193B).addRange(0x1A75, 0x1A7C).addRange(0x1AB0, 0x1ABE).addRange(0x1AC1, 0x1ACB).addRange(0x1B6B, 0x1B73).addRange(0x1BAA, 0x1BAB).addRange(0x1C36, 0x1C37).addRange(0x1C78, 0x1C7D).addRange(0x1CD0, 0x1CE8).addRange(0x1CF7, 0x1CF9).addRange(0x1D2C, 0x1D6A).addRange(0x1DC4, 0x1DCF);\nset.addRange(0x1DF5, 0x1DFF).addRange(0x1FBF, 0x1FC1).addRange(0x1FCD, 0x1FCF).addRange(0x1FDD, 0x1FDF).addRange(0x1FED, 0x1FEF).addRange(0x1FFD, 0x1FFE).addRange(0x2CEF, 0x2CF1).addRange(0x302A, 0x302F).addRange(0x3099, 0x309C).addRange(0xA67C, 0xA67D).addRange(0xA69C, 0xA69D).addRange(0xA6F0, 0xA6F1).addRange(0xA700, 0xA721).addRange(0xA788, 0xA78A).addRange(0xA7F8, 0xA7F9).addRange(0xA8E0, 0xA8F1).addRange(0xA92B, 0xA92E).addRange(0xAA7B, 0xAA7D).addRange(0xAABF, 0xAAC2).addRange(0xAB5B, 0xAB5F).addRange(0xAB69, 0xAB6B).addRange(0xABEC, 0xABED).addRange(0xFE20, 0xFE2F).addRange(0xFF9E, 0xFF9F).addRange(0x10780, 0x10785).addRange(0x10787, 0x107B0).addRange(0x107B2, 0x107BA).addRange(0x10AE5, 0x10AE6).addRange(0x10D22, 0x10D27).addRange(0x10EFD, 0x10EFF).addRange(0x10F46, 0x10F50).addRange(0x10F82, 0x10F85).addRange(0x110B9, 0x110BA).addRange(0x11133, 0x11134).addRange(0x111CA, 0x111CC).addRange(0x11235, 0x11236).addRange(0x112E9, 0x112EA).addRange(0x11366, 0x1136C).addRange(0x11370, 0x11374).addRange(0x114C2, 0x114C3).addRange(0x115BF, 0x115C0).addRange(0x116B6, 0x116B7).addRange(0x11839, 0x1183A).addRange(0x1193D, 0x1193E).addRange(0x11D44, 0x11D45).addRange(0x13447, 0x13455).addRange(0x16AF0, 0x16AF4).addRange(0x16B30, 0x16B36).addRange(0x16F8F, 0x16F9F).addRange(0x16FF0, 0x16FF1).addRange(0x1AFF0, 0x1AFF3);\nset.addRange(0x1AFF5, 0x1AFFB).addRange(0x1AFFD, 0x1AFFE).addRange(0x1CF00, 0x1CF2D).addRange(0x1CF30, 0x1CF46).addRange(0x1D167, 0x1D169).addRange(0x1D16D, 0x1D172).addRange(0x1D17B, 0x1D182).addRange(0x1D185, 0x1D18B).addRange(0x1D1AA, 0x1D1AD).addRange(0x1E030, 0x1E06D).addRange(0x1E130, 0x1E136).addRange(0x1E2EC, 0x1E2EF).addRange(0x1E8D0, 0x1E8D6).addRange(0x1E944, 0x1E946).addRange(0x1E948, 0x1E94A);\nexports.characters = set;\n","const set = require('regenerate')(0x23, 0x2A, 0x200D, 0x20E3, 0xFE0F);\nset.addRange(0x30, 0x39).addRange(0x1F1E6, 0x1F1FF).addRange(0x1F3FB, 0x1F3FF).addRange(0x1F9B0, 0x1F9B3).addRange(0xE0020, 0xE007F);\nexports.characters = set;\n","const set = require('regenerate')(0x261D, 0x26F9, 0x1F385, 0x1F3C7, 0x1F47C, 0x1F48F, 0x1F491, 0x1F4AA, 0x1F57A, 0x1F590, 0x1F6A3, 0x1F6C0, 0x1F6CC, 0x1F90C, 0x1F90F, 0x1F926, 0x1F977, 0x1F9BB);\nset.addRange(0x270A, 0x270D).addRange(0x1F3C2, 0x1F3C4).addRange(0x1F3CA, 0x1F3CC).addRange(0x1F442, 0x1F443).addRange(0x1F446, 0x1F450).addRange(0x1F466, 0x1F478).addRange(0x1F481, 0x1F483).addRange(0x1F485, 0x1F487).addRange(0x1F574, 0x1F575).addRange(0x1F595, 0x1F596).addRange(0x1F645, 0x1F647).addRange(0x1F64B, 0x1F64F).addRange(0x1F6B4, 0x1F6B6).addRange(0x1F918, 0x1F91F).addRange(0x1F930, 0x1F939).addRange(0x1F93C, 0x1F93E).addRange(0x1F9B5, 0x1F9B6).addRange(0x1F9B8, 0x1F9B9).addRange(0x1F9CD, 0x1F9CF).addRange(0x1F9D1, 0x1F9DD).addRange(0x1FAC3, 0x1FAC5).addRange(0x1FAF0, 0x1FAF8);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x1F3FB, 0x1F3FF);\nexports.characters = set;\n","const set = require('regenerate')(0x23F0, 0x23F3, 0x267F, 0x2693, 0x26A1, 0x26CE, 0x26D4, 0x26EA, 0x26F5, 0x26FA, 0x26FD, 0x2705, 0x2728, 0x274C, 0x274E, 0x2757, 0x27B0, 0x27BF, 0x2B50, 0x2B55, 0x1F004, 0x1F0CF, 0x1F18E, 0x1F201, 0x1F21A, 0x1F22F, 0x1F3F4, 0x1F440, 0x1F57A, 0x1F5A4, 0x1F6CC, 0x1F7F0);\nset.addRange(0x231A, 0x231B).addRange(0x23E9, 0x23EC).addRange(0x25FD, 0x25FE).addRange(0x2614, 0x2615).addRange(0x2648, 0x2653).addRange(0x26AA, 0x26AB).addRange(0x26BD, 0x26BE).addRange(0x26C4, 0x26C5).addRange(0x26F2, 0x26F3).addRange(0x270A, 0x270B).addRange(0x2753, 0x2755).addRange(0x2795, 0x2797).addRange(0x2B1B, 0x2B1C).addRange(0x1F191, 0x1F19A).addRange(0x1F1E6, 0x1F1FF).addRange(0x1F232, 0x1F236).addRange(0x1F238, 0x1F23A).addRange(0x1F250, 0x1F251).addRange(0x1F300, 0x1F320).addRange(0x1F32D, 0x1F335).addRange(0x1F337, 0x1F37C).addRange(0x1F37E, 0x1F393).addRange(0x1F3A0, 0x1F3CA).addRange(0x1F3CF, 0x1F3D3).addRange(0x1F3E0, 0x1F3F0).addRange(0x1F3F8, 0x1F43E).addRange(0x1F442, 0x1F4FC).addRange(0x1F4FF, 0x1F53D).addRange(0x1F54B, 0x1F54E).addRange(0x1F550, 0x1F567).addRange(0x1F595, 0x1F596).addRange(0x1F5FB, 0x1F64F).addRange(0x1F680, 0x1F6C5).addRange(0x1F6D0, 0x1F6D2).addRange(0x1F6D5, 0x1F6D7).addRange(0x1F6DC, 0x1F6DF).addRange(0x1F6EB, 0x1F6EC).addRange(0x1F6F4, 0x1F6FC).addRange(0x1F7E0, 0x1F7EB).addRange(0x1F90C, 0x1F93A).addRange(0x1F93C, 0x1F945).addRange(0x1F947, 0x1F9FF).addRange(0x1FA70, 0x1FA7C).addRange(0x1FA80, 0x1FA88).addRange(0x1FA90, 0x1FABD).addRange(0x1FABF, 0x1FAC5).addRange(0x1FACE, 0x1FADB).addRange(0x1FAE0, 0x1FAE8).addRange(0x1FAF0, 0x1FAF8);\nexports.characters = set;\n","const set = require('regenerate')(0x23, 0x2A, 0xA9, 0xAE, 0x203C, 0x2049, 0x2122, 0x2139, 0x2328, 0x23CF, 0x24C2, 0x25B6, 0x25C0, 0x260E, 0x2611, 0x2618, 0x261D, 0x2620, 0x2626, 0x262A, 0x2640, 0x2642, 0x2663, 0x2668, 0x267B, 0x2699, 0x26A7, 0x26C8, 0x26D1, 0x26FD, 0x2702, 0x2705, 0x270F, 0x2712, 0x2714, 0x2716, 0x271D, 0x2721, 0x2728, 0x2744, 0x2747, 0x274C, 0x274E, 0x2757, 0x27A1, 0x27B0, 0x27BF, 0x2B50, 0x2B55, 0x3030, 0x303D, 0x3297, 0x3299, 0x1F004, 0x1F0CF, 0x1F18E, 0x1F21A, 0x1F22F, 0x1F587, 0x1F590, 0x1F5A8, 0x1F5BC, 0x1F5E1, 0x1F5E3, 0x1F5E8, 0x1F5EF, 0x1F5F3, 0x1F6E9, 0x1F6F0, 0x1F7F0);\nset.addRange(0x30, 0x39).addRange(0x2194, 0x2199).addRange(0x21A9, 0x21AA).addRange(0x231A, 0x231B).addRange(0x23E9, 0x23F3).addRange(0x23F8, 0x23FA).addRange(0x25AA, 0x25AB).addRange(0x25FB, 0x25FE).addRange(0x2600, 0x2604).addRange(0x2614, 0x2615).addRange(0x2622, 0x2623).addRange(0x262E, 0x262F).addRange(0x2638, 0x263A).addRange(0x2648, 0x2653).addRange(0x265F, 0x2660).addRange(0x2665, 0x2666).addRange(0x267E, 0x267F).addRange(0x2692, 0x2697).addRange(0x269B, 0x269C).addRange(0x26A0, 0x26A1).addRange(0x26AA, 0x26AB).addRange(0x26B0, 0x26B1).addRange(0x26BD, 0x26BE).addRange(0x26C4, 0x26C5).addRange(0x26CE, 0x26CF).addRange(0x26D3, 0x26D4).addRange(0x26E9, 0x26EA).addRange(0x26F0, 0x26F5).addRange(0x26F7, 0x26FA).addRange(0x2708, 0x270D).addRange(0x2733, 0x2734).addRange(0x2753, 0x2755).addRange(0x2763, 0x2764).addRange(0x2795, 0x2797).addRange(0x2934, 0x2935).addRange(0x2B05, 0x2B07).addRange(0x2B1B, 0x2B1C).addRange(0x1F170, 0x1F171).addRange(0x1F17E, 0x1F17F).addRange(0x1F191, 0x1F19A).addRange(0x1F1E6, 0x1F1FF).addRange(0x1F201, 0x1F202).addRange(0x1F232, 0x1F23A).addRange(0x1F250, 0x1F251).addRange(0x1F300, 0x1F321).addRange(0x1F324, 0x1F393).addRange(0x1F396, 0x1F397).addRange(0x1F399, 0x1F39B).addRange(0x1F39E, 0x1F3F0).addRange(0x1F3F3, 0x1F3F5).addRange(0x1F3F7, 0x1F4FD);\nset.addRange(0x1F4FF, 0x1F53D).addRange(0x1F549, 0x1F54E).addRange(0x1F550, 0x1F567).addRange(0x1F56F, 0x1F570).addRange(0x1F573, 0x1F57A).addRange(0x1F58A, 0x1F58D).addRange(0x1F595, 0x1F596).addRange(0x1F5A4, 0x1F5A5).addRange(0x1F5B1, 0x1F5B2).addRange(0x1F5C2, 0x1F5C4).addRange(0x1F5D1, 0x1F5D3).addRange(0x1F5DC, 0x1F5DE).addRange(0x1F5FA, 0x1F64F).addRange(0x1F680, 0x1F6C5).addRange(0x1F6CB, 0x1F6D2).addRange(0x1F6D5, 0x1F6D7).addRange(0x1F6DC, 0x1F6E5).addRange(0x1F6EB, 0x1F6EC).addRange(0x1F6F3, 0x1F6FC).addRange(0x1F7E0, 0x1F7EB).addRange(0x1F90C, 0x1F93A).addRange(0x1F93C, 0x1F945).addRange(0x1F947, 0x1F9FF).addRange(0x1FA70, 0x1FA7C).addRange(0x1FA80, 0x1FA88).addRange(0x1FA90, 0x1FABD).addRange(0x1FABF, 0x1FAC5).addRange(0x1FACE, 0x1FADB).addRange(0x1FAE0, 0x1FAE8).addRange(0x1FAF0, 0x1FAF8);\nexports.characters = set;\n","const set = require('regenerate')(0xA9, 0xAE, 0x203C, 0x2049, 0x2122, 0x2139, 0x2328, 0x2388, 0x23CF, 0x24C2, 0x25B6, 0x25C0, 0x2714, 0x2716, 0x271D, 0x2721, 0x2728, 0x2744, 0x2747, 0x274C, 0x274E, 0x2757, 0x27A1, 0x27B0, 0x27BF, 0x2B50, 0x2B55, 0x3030, 0x303D, 0x3297, 0x3299, 0x1F12F, 0x1F18E, 0x1F21A, 0x1F22F);\nset.addRange(0x2194, 0x2199).addRange(0x21A9, 0x21AA).addRange(0x231A, 0x231B).addRange(0x23E9, 0x23F3).addRange(0x23F8, 0x23FA).addRange(0x25AA, 0x25AB).addRange(0x25FB, 0x25FE).addRange(0x2600, 0x2605).addRange(0x2607, 0x2612).addRange(0x2614, 0x2685).addRange(0x2690, 0x2705).addRange(0x2708, 0x2712).addRange(0x2733, 0x2734).addRange(0x2753, 0x2755).addRange(0x2763, 0x2767).addRange(0x2795, 0x2797).addRange(0x2934, 0x2935).addRange(0x2B05, 0x2B07).addRange(0x2B1B, 0x2B1C).addRange(0x1F000, 0x1F0FF).addRange(0x1F10D, 0x1F10F).addRange(0x1F16C, 0x1F171).addRange(0x1F17E, 0x1F17F).addRange(0x1F191, 0x1F19A).addRange(0x1F1AD, 0x1F1E5).addRange(0x1F201, 0x1F20F).addRange(0x1F232, 0x1F23A).addRange(0x1F23C, 0x1F23F).addRange(0x1F249, 0x1F3FA).addRange(0x1F400, 0x1F53D).addRange(0x1F546, 0x1F64F).addRange(0x1F680, 0x1F6FF).addRange(0x1F774, 0x1F77F).addRange(0x1F7D5, 0x1F7FF).addRange(0x1F80C, 0x1F80F).addRange(0x1F848, 0x1F84F).addRange(0x1F85A, 0x1F85F).addRange(0x1F888, 0x1F88F).addRange(0x1F8AE, 0x1F8FF).addRange(0x1F90C, 0x1F93A).addRange(0x1F93C, 0x1F945).addRange(0x1F947, 0x1FAFF).addRange(0x1FC00, 0x1FFFD);\nexports.characters = set;\n","const set = require('regenerate')(0xB7, 0x640, 0x7FA, 0xB55, 0xE46, 0xEC6, 0x180A, 0x1843, 0x1AA7, 0x1C36, 0x1C7B, 0x3005, 0xA015, 0xA60C, 0xA9CF, 0xA9E6, 0xAA70, 0xAADD, 0xFF70, 0x1135D, 0x11A98, 0x16FE3);\nset.addRange(0x2D0, 0x2D1).addRange(0x3031, 0x3035).addRange(0x309D, 0x309E).addRange(0x30FC, 0x30FE).addRange(0xAAF3, 0xAAF4).addRange(0x10781, 0x10782).addRange(0x115C6, 0x115C8).addRange(0x16B42, 0x16B43).addRange(0x16FE0, 0x16FE1).addRange(0x1E13C, 0x1E13D).addRange(0x1E944, 0x1E946);\nexports.characters = set;\n","const set = require('regenerate')(0x38C, 0x5BE, 0x5C0, 0x5C3, 0x5C6, 0x61B, 0x6DE, 0x6E9, 0x710, 0x7B1, 0x81A, 0x824, 0x828, 0x85E, 0x93B, 0x9B2, 0x9BD, 0x9CE, 0xA03, 0xA5E, 0xA76, 0xA83, 0xAC9, 0xAD0, 0xAF9, 0xB3D, 0xB40, 0xB83, 0xB9C, 0xBBF, 0xBD0, 0xC3D, 0xC5D, 0xD3D, 0xDBD, 0xE84, 0xEA5, 0xEBD, 0xEC6, 0xF36, 0xF38, 0xF7F, 0xF85, 0x1031, 0x1038, 0x10C7, 0x10CD, 0x1258, 0x12C0, 0x1715, 0x17B6, 0x18AA, 0x1940, 0x1A57, 0x1A61, 0x1B3B, 0x1BAA, 0x1BE7, 0x1BEE, 0x1CD3, 0x1CE1, 0x1CFA, 0x1F59, 0x1F5B, 0x1F5D, 0x2D27, 0x2D2D, 0xA673, 0xA7D3, 0xAA4D, 0xAAB1, 0xAAC0, 0xAAC2, 0xFB1D, 0xFB3E, 0xFDCF, 0x101A0, 0x10808, 0x1083C, 0x1093F, 0x10EAD, 0x11000, 0x11075, 0x1112C, 0x11235, 0x11288, 0x1133D, 0x1133F, 0x11350, 0x11445, 0x1145D, 0x114B9, 0x114BE, 0x114C1, 0x115BE, 0x1163E, 0x116AC, 0x116B6, 0x11726, 0x11838, 0x1183B, 0x11909, 0x1193D, 0x11A00, 0x11A50, 0x11A97, 0x11C3E, 0x11CA9, 0x11CB1, 0x11CB4, 0x11D46, 0x11D96, 0x11D98, 0x11F41, 0x11FB0, 0x16AF5, 0x1B132, 0x1B155, 0x1BC9C, 0x1BC9F, 0x1D166, 0x1D245, 0x1D4A2, 0x1D4BB, 0x1D546, 0x1E2FF, 0x1E94B, 0x1EE24, 0x1EE27, 0x1EE39, 0x1EE3B, 0x1EE42, 0x1EE47, 0x1EE49, 0x1EE4B, 0x1EE54, 0x1EE57, 0x1EE59, 0x1EE5B, 0x1EE5D, 0x1EE5F, 0x1EE64, 0x1EE7E, 0x1F7F0);\nset.addRange(0x20, 0x7E).addRange(0xA0, 0xAC).addRange(0xAE, 0x2FF).addRange(0x370, 0x377).addRange(0x37A, 0x37F).addRange(0x384, 0x38A).addRange(0x38E, 0x3A1).addRange(0x3A3, 0x482).addRange(0x48A, 0x52F).addRange(0x531, 0x556).addRange(0x559, 0x58A).addRange(0x58D, 0x58F).addRange(0x5D0, 0x5EA).addRange(0x5EF, 0x5F4).addRange(0x606, 0x60F).addRange(0x61D, 0x64A).addRange(0x660, 0x66F).addRange(0x671, 0x6D5).addRange(0x6E5, 0x6E6).addRange(0x6EE, 0x70D).addRange(0x712, 0x72F).addRange(0x74D, 0x7A5).addRange(0x7C0, 0x7EA).addRange(0x7F4, 0x7FA).addRange(0x7FE, 0x815).addRange(0x830, 0x83E).addRange(0x840, 0x858).addRange(0x860, 0x86A).addRange(0x870, 0x88E).addRange(0x8A0, 0x8C9).addRange(0x903, 0x939).addRange(0x93D, 0x940).addRange(0x949, 0x94C).addRange(0x94E, 0x950).addRange(0x958, 0x961).addRange(0x964, 0x980).addRange(0x982, 0x983).addRange(0x985, 0x98C).addRange(0x98F, 0x990).addRange(0x993, 0x9A8).addRange(0x9AA, 0x9B0).addRange(0x9B6, 0x9B9).addRange(0x9BF, 0x9C0).addRange(0x9C7, 0x9C8).addRange(0x9CB, 0x9CC).addRange(0x9DC, 0x9DD).addRange(0x9DF, 0x9E1).addRange(0x9E6, 0x9FD).addRange(0xA05, 0xA0A).addRange(0xA0F, 0xA10).addRange(0xA13, 0xA28);\nset.addRange(0xA2A, 0xA30).addRange(0xA32, 0xA33).addRange(0xA35, 0xA36).addRange(0xA38, 0xA39).addRange(0xA3E, 0xA40).addRange(0xA59, 0xA5C).addRange(0xA66, 0xA6F).addRange(0xA72, 0xA74).addRange(0xA85, 0xA8D).addRange(0xA8F, 0xA91).addRange(0xA93, 0xAA8).addRange(0xAAA, 0xAB0).addRange(0xAB2, 0xAB3).addRange(0xAB5, 0xAB9).addRange(0xABD, 0xAC0).addRange(0xACB, 0xACC).addRange(0xAE0, 0xAE1).addRange(0xAE6, 0xAF1).addRange(0xB02, 0xB03).addRange(0xB05, 0xB0C).addRange(0xB0F, 0xB10).addRange(0xB13, 0xB28).addRange(0xB2A, 0xB30).addRange(0xB32, 0xB33).addRange(0xB35, 0xB39).addRange(0xB47, 0xB48).addRange(0xB4B, 0xB4C).addRange(0xB5C, 0xB5D).addRange(0xB5F, 0xB61).addRange(0xB66, 0xB77).addRange(0xB85, 0xB8A).addRange(0xB8E, 0xB90).addRange(0xB92, 0xB95).addRange(0xB99, 0xB9A).addRange(0xB9E, 0xB9F).addRange(0xBA3, 0xBA4).addRange(0xBA8, 0xBAA).addRange(0xBAE, 0xBB9).addRange(0xBC1, 0xBC2).addRange(0xBC6, 0xBC8).addRange(0xBCA, 0xBCC).addRange(0xBE6, 0xBFA).addRange(0xC01, 0xC03).addRange(0xC05, 0xC0C).addRange(0xC0E, 0xC10).addRange(0xC12, 0xC28).addRange(0xC2A, 0xC39).addRange(0xC41, 0xC44).addRange(0xC58, 0xC5A).addRange(0xC60, 0xC61).addRange(0xC66, 0xC6F);\nset.addRange(0xC77, 0xC80).addRange(0xC82, 0xC8C).addRange(0xC8E, 0xC90).addRange(0xC92, 0xCA8).addRange(0xCAA, 0xCB3).addRange(0xCB5, 0xCB9).addRange(0xCBD, 0xCBE).addRange(0xCC0, 0xCC1).addRange(0xCC3, 0xCC4).addRange(0xCC7, 0xCC8).addRange(0xCCA, 0xCCB).addRange(0xCDD, 0xCDE).addRange(0xCE0, 0xCE1).addRange(0xCE6, 0xCEF).addRange(0xCF1, 0xCF3).addRange(0xD02, 0xD0C).addRange(0xD0E, 0xD10).addRange(0xD12, 0xD3A).addRange(0xD3F, 0xD40).addRange(0xD46, 0xD48).addRange(0xD4A, 0xD4C).addRange(0xD4E, 0xD4F).addRange(0xD54, 0xD56).addRange(0xD58, 0xD61).addRange(0xD66, 0xD7F).addRange(0xD82, 0xD83).addRange(0xD85, 0xD96).addRange(0xD9A, 0xDB1).addRange(0xDB3, 0xDBB).addRange(0xDC0, 0xDC6).addRange(0xDD0, 0xDD1).addRange(0xDD8, 0xDDE).addRange(0xDE6, 0xDEF).addRange(0xDF2, 0xDF4).addRange(0xE01, 0xE30).addRange(0xE32, 0xE33).addRange(0xE3F, 0xE46).addRange(0xE4F, 0xE5B).addRange(0xE81, 0xE82).addRange(0xE86, 0xE8A).addRange(0xE8C, 0xEA3).addRange(0xEA7, 0xEB0).addRange(0xEB2, 0xEB3).addRange(0xEC0, 0xEC4).addRange(0xED0, 0xED9).addRange(0xEDC, 0xEDF).addRange(0xF00, 0xF17).addRange(0xF1A, 0xF34).addRange(0xF3A, 0xF47).addRange(0xF49, 0xF6C).addRange(0xF88, 0xF8C);\nset.addRange(0xFBE, 0xFC5).addRange(0xFC7, 0xFCC).addRange(0xFCE, 0xFDA).addRange(0x1000, 0x102C).addRange(0x103B, 0x103C).addRange(0x103F, 0x1057).addRange(0x105A, 0x105D).addRange(0x1061, 0x1070).addRange(0x1075, 0x1081).addRange(0x1083, 0x1084).addRange(0x1087, 0x108C).addRange(0x108E, 0x109C).addRange(0x109E, 0x10C5).addRange(0x10D0, 0x1248).addRange(0x124A, 0x124D).addRange(0x1250, 0x1256).addRange(0x125A, 0x125D).addRange(0x1260, 0x1288).addRange(0x128A, 0x128D).addRange(0x1290, 0x12B0).addRange(0x12B2, 0x12B5).addRange(0x12B8, 0x12BE).addRange(0x12C2, 0x12C5).addRange(0x12C8, 0x12D6).addRange(0x12D8, 0x1310).addRange(0x1312, 0x1315).addRange(0x1318, 0x135A).addRange(0x1360, 0x137C).addRange(0x1380, 0x1399).addRange(0x13A0, 0x13F5).addRange(0x13F8, 0x13FD).addRange(0x1400, 0x169C).addRange(0x16A0, 0x16F8).addRange(0x1700, 0x1711).addRange(0x171F, 0x1731).addRange(0x1734, 0x1736).addRange(0x1740, 0x1751).addRange(0x1760, 0x176C).addRange(0x176E, 0x1770).addRange(0x1780, 0x17B3).addRange(0x17BE, 0x17C5).addRange(0x17C7, 0x17C8).addRange(0x17D4, 0x17DC).addRange(0x17E0, 0x17E9).addRange(0x17F0, 0x17F9).addRange(0x1800, 0x180A).addRange(0x1810, 0x1819).addRange(0x1820, 0x1878).addRange(0x1880, 0x1884).addRange(0x1887, 0x18A8).addRange(0x18B0, 0x18F5);\nset.addRange(0x1900, 0x191E).addRange(0x1923, 0x1926).addRange(0x1929, 0x192B).addRange(0x1930, 0x1931).addRange(0x1933, 0x1938).addRange(0x1944, 0x196D).addRange(0x1970, 0x1974).addRange(0x1980, 0x19AB).addRange(0x19B0, 0x19C9).addRange(0x19D0, 0x19DA).addRange(0x19DE, 0x1A16).addRange(0x1A19, 0x1A1A).addRange(0x1A1E, 0x1A55).addRange(0x1A63, 0x1A64).addRange(0x1A6D, 0x1A72).addRange(0x1A80, 0x1A89).addRange(0x1A90, 0x1A99).addRange(0x1AA0, 0x1AAD).addRange(0x1B04, 0x1B33).addRange(0x1B3D, 0x1B41).addRange(0x1B43, 0x1B4C).addRange(0x1B50, 0x1B6A).addRange(0x1B74, 0x1B7E).addRange(0x1B82, 0x1BA1).addRange(0x1BA6, 0x1BA7).addRange(0x1BAE, 0x1BE5).addRange(0x1BEA, 0x1BEC).addRange(0x1BF2, 0x1BF3).addRange(0x1BFC, 0x1C2B).addRange(0x1C34, 0x1C35).addRange(0x1C3B, 0x1C49).addRange(0x1C4D, 0x1C88).addRange(0x1C90, 0x1CBA).addRange(0x1CBD, 0x1CC7).addRange(0x1CE9, 0x1CEC).addRange(0x1CEE, 0x1CF3).addRange(0x1CF5, 0x1CF7).addRange(0x1D00, 0x1DBF).addRange(0x1E00, 0x1F15).addRange(0x1F18, 0x1F1D).addRange(0x1F20, 0x1F45).addRange(0x1F48, 0x1F4D).addRange(0x1F50, 0x1F57).addRange(0x1F5F, 0x1F7D).addRange(0x1F80, 0x1FB4).addRange(0x1FB6, 0x1FC4).addRange(0x1FC6, 0x1FD3).addRange(0x1FD6, 0x1FDB).addRange(0x1FDD, 0x1FEF).addRange(0x1FF2, 0x1FF4).addRange(0x1FF6, 0x1FFE);\nset.addRange(0x2000, 0x200A).addRange(0x2010, 0x2027).addRange(0x202F, 0x205F).addRange(0x2070, 0x2071).addRange(0x2074, 0x208E).addRange(0x2090, 0x209C).addRange(0x20A0, 0x20C0).addRange(0x2100, 0x218B).addRange(0x2190, 0x2426).addRange(0x2440, 0x244A).addRange(0x2460, 0x2B73).addRange(0x2B76, 0x2B95).addRange(0x2B97, 0x2CEE).addRange(0x2CF2, 0x2CF3).addRange(0x2CF9, 0x2D25).addRange(0x2D30, 0x2D67).addRange(0x2D6F, 0x2D70).addRange(0x2D80, 0x2D96).addRange(0x2DA0, 0x2DA6).addRange(0x2DA8, 0x2DAE).addRange(0x2DB0, 0x2DB6).addRange(0x2DB8, 0x2DBE).addRange(0x2DC0, 0x2DC6).addRange(0x2DC8, 0x2DCE).addRange(0x2DD0, 0x2DD6).addRange(0x2DD8, 0x2DDE).addRange(0x2E00, 0x2E5D).addRange(0x2E80, 0x2E99).addRange(0x2E9B, 0x2EF3).addRange(0x2F00, 0x2FD5).addRange(0x2FF0, 0x3029).addRange(0x3030, 0x303F).addRange(0x3041, 0x3096).addRange(0x309B, 0x30FF).addRange(0x3105, 0x312F).addRange(0x3131, 0x318E).addRange(0x3190, 0x31E3).addRange(0x31EF, 0x321E).addRange(0x3220, 0xA48C).addRange(0xA490, 0xA4C6).addRange(0xA4D0, 0xA62B).addRange(0xA640, 0xA66E).addRange(0xA67E, 0xA69D).addRange(0xA6A0, 0xA6EF).addRange(0xA6F2, 0xA6F7).addRange(0xA700, 0xA7CA).addRange(0xA7D0, 0xA7D1).addRange(0xA7D5, 0xA7D9).addRange(0xA7F2, 0xA801).addRange(0xA803, 0xA805).addRange(0xA807, 0xA80A);\nset.addRange(0xA80C, 0xA824).addRange(0xA827, 0xA82B).addRange(0xA830, 0xA839).addRange(0xA840, 0xA877).addRange(0xA880, 0xA8C3).addRange(0xA8CE, 0xA8D9).addRange(0xA8F2, 0xA8FE).addRange(0xA900, 0xA925).addRange(0xA92E, 0xA946).addRange(0xA952, 0xA953).addRange(0xA95F, 0xA97C).addRange(0xA983, 0xA9B2).addRange(0xA9B4, 0xA9B5).addRange(0xA9BA, 0xA9BB).addRange(0xA9BE, 0xA9CD).addRange(0xA9CF, 0xA9D9).addRange(0xA9DE, 0xA9E4).addRange(0xA9E6, 0xA9FE).addRange(0xAA00, 0xAA28).addRange(0xAA2F, 0xAA30).addRange(0xAA33, 0xAA34).addRange(0xAA40, 0xAA42).addRange(0xAA44, 0xAA4B).addRange(0xAA50, 0xAA59).addRange(0xAA5C, 0xAA7B).addRange(0xAA7D, 0xAAAF).addRange(0xAAB5, 0xAAB6).addRange(0xAAB9, 0xAABD).addRange(0xAADB, 0xAAEB).addRange(0xAAEE, 0xAAF5).addRange(0xAB01, 0xAB06).addRange(0xAB09, 0xAB0E).addRange(0xAB11, 0xAB16).addRange(0xAB20, 0xAB26).addRange(0xAB28, 0xAB2E).addRange(0xAB30, 0xAB6B).addRange(0xAB70, 0xABE4).addRange(0xABE6, 0xABE7).addRange(0xABE9, 0xABEC).addRange(0xABF0, 0xABF9).addRange(0xAC00, 0xD7A3).addRange(0xD7B0, 0xD7C6).addRange(0xD7CB, 0xD7FB).addRange(0xF900, 0xFA6D).addRange(0xFA70, 0xFAD9).addRange(0xFB00, 0xFB06).addRange(0xFB13, 0xFB17).addRange(0xFB1F, 0xFB36).addRange(0xFB38, 0xFB3C).addRange(0xFB40, 0xFB41).addRange(0xFB43, 0xFB44);\nset.addRange(0xFB46, 0xFBC2).addRange(0xFBD3, 0xFD8F).addRange(0xFD92, 0xFDC7).addRange(0xFDF0, 0xFDFF).addRange(0xFE10, 0xFE19).addRange(0xFE30, 0xFE52).addRange(0xFE54, 0xFE66).addRange(0xFE68, 0xFE6B).addRange(0xFE70, 0xFE74).addRange(0xFE76, 0xFEFC).addRange(0xFF01, 0xFF9D).addRange(0xFFA0, 0xFFBE).addRange(0xFFC2, 0xFFC7).addRange(0xFFCA, 0xFFCF).addRange(0xFFD2, 0xFFD7).addRange(0xFFDA, 0xFFDC).addRange(0xFFE0, 0xFFE6).addRange(0xFFE8, 0xFFEE).addRange(0xFFFC, 0xFFFD).addRange(0x10000, 0x1000B).addRange(0x1000D, 0x10026).addRange(0x10028, 0x1003A).addRange(0x1003C, 0x1003D).addRange(0x1003F, 0x1004D).addRange(0x10050, 0x1005D).addRange(0x10080, 0x100FA).addRange(0x10100, 0x10102).addRange(0x10107, 0x10133).addRange(0x10137, 0x1018E).addRange(0x10190, 0x1019C).addRange(0x101D0, 0x101FC).addRange(0x10280, 0x1029C).addRange(0x102A0, 0x102D0).addRange(0x102E1, 0x102FB).addRange(0x10300, 0x10323).addRange(0x1032D, 0x1034A).addRange(0x10350, 0x10375).addRange(0x10380, 0x1039D).addRange(0x1039F, 0x103C3).addRange(0x103C8, 0x103D5).addRange(0x10400, 0x1049D).addRange(0x104A0, 0x104A9).addRange(0x104B0, 0x104D3).addRange(0x104D8, 0x104FB).addRange(0x10500, 0x10527).addRange(0x10530, 0x10563).addRange(0x1056F, 0x1057A).addRange(0x1057C, 0x1058A).addRange(0x1058C, 0x10592).addRange(0x10594, 0x10595).addRange(0x10597, 0x105A1);\nset.addRange(0x105A3, 0x105B1).addRange(0x105B3, 0x105B9).addRange(0x105BB, 0x105BC).addRange(0x10600, 0x10736).addRange(0x10740, 0x10755).addRange(0x10760, 0x10767).addRange(0x10780, 0x10785).addRange(0x10787, 0x107B0).addRange(0x107B2, 0x107BA).addRange(0x10800, 0x10805).addRange(0x1080A, 0x10835).addRange(0x10837, 0x10838).addRange(0x1083F, 0x10855).addRange(0x10857, 0x1089E).addRange(0x108A7, 0x108AF).addRange(0x108E0, 0x108F2).addRange(0x108F4, 0x108F5).addRange(0x108FB, 0x1091B).addRange(0x1091F, 0x10939).addRange(0x10980, 0x109B7).addRange(0x109BC, 0x109CF).addRange(0x109D2, 0x10A00).addRange(0x10A10, 0x10A13).addRange(0x10A15, 0x10A17).addRange(0x10A19, 0x10A35).addRange(0x10A40, 0x10A48).addRange(0x10A50, 0x10A58).addRange(0x10A60, 0x10A9F).addRange(0x10AC0, 0x10AE4).addRange(0x10AEB, 0x10AF6).addRange(0x10B00, 0x10B35).addRange(0x10B39, 0x10B55).addRange(0x10B58, 0x10B72).addRange(0x10B78, 0x10B91).addRange(0x10B99, 0x10B9C).addRange(0x10BA9, 0x10BAF).addRange(0x10C00, 0x10C48).addRange(0x10C80, 0x10CB2).addRange(0x10CC0, 0x10CF2).addRange(0x10CFA, 0x10D23).addRange(0x10D30, 0x10D39).addRange(0x10E60, 0x10E7E).addRange(0x10E80, 0x10EA9).addRange(0x10EB0, 0x10EB1).addRange(0x10F00, 0x10F27).addRange(0x10F30, 0x10F45).addRange(0x10F51, 0x10F59).addRange(0x10F70, 0x10F81).addRange(0x10F86, 0x10F89).addRange(0x10FB0, 0x10FCB).addRange(0x10FE0, 0x10FF6);\nset.addRange(0x11002, 0x11037).addRange(0x11047, 0x1104D).addRange(0x11052, 0x1106F).addRange(0x11071, 0x11072).addRange(0x11082, 0x110B2).addRange(0x110B7, 0x110B8).addRange(0x110BB, 0x110BC).addRange(0x110BE, 0x110C1).addRange(0x110D0, 0x110E8).addRange(0x110F0, 0x110F9).addRange(0x11103, 0x11126).addRange(0x11136, 0x11147).addRange(0x11150, 0x11172).addRange(0x11174, 0x11176).addRange(0x11182, 0x111B5).addRange(0x111BF, 0x111C8).addRange(0x111CD, 0x111CE).addRange(0x111D0, 0x111DF).addRange(0x111E1, 0x111F4).addRange(0x11200, 0x11211).addRange(0x11213, 0x1122E).addRange(0x11232, 0x11233).addRange(0x11238, 0x1123D).addRange(0x1123F, 0x11240).addRange(0x11280, 0x11286).addRange(0x1128A, 0x1128D).addRange(0x1128F, 0x1129D).addRange(0x1129F, 0x112A9).addRange(0x112B0, 0x112DE).addRange(0x112E0, 0x112E2).addRange(0x112F0, 0x112F9).addRange(0x11302, 0x11303).addRange(0x11305, 0x1130C).addRange(0x1130F, 0x11310).addRange(0x11313, 0x11328).addRange(0x1132A, 0x11330).addRange(0x11332, 0x11333).addRange(0x11335, 0x11339).addRange(0x11341, 0x11344).addRange(0x11347, 0x11348).addRange(0x1134B, 0x1134D).addRange(0x1135D, 0x11363).addRange(0x11400, 0x11437).addRange(0x11440, 0x11441).addRange(0x11447, 0x1145B).addRange(0x1145F, 0x11461).addRange(0x11480, 0x114AF).addRange(0x114B1, 0x114B2).addRange(0x114BB, 0x114BC).addRange(0x114C4, 0x114C7).addRange(0x114D0, 0x114D9);\nset.addRange(0x11580, 0x115AE).addRange(0x115B0, 0x115B1).addRange(0x115B8, 0x115BB).addRange(0x115C1, 0x115DB).addRange(0x11600, 0x11632).addRange(0x1163B, 0x1163C).addRange(0x11641, 0x11644).addRange(0x11650, 0x11659).addRange(0x11660, 0x1166C).addRange(0x11680, 0x116AA).addRange(0x116AE, 0x116AF).addRange(0x116B8, 0x116B9).addRange(0x116C0, 0x116C9).addRange(0x11700, 0x1171A).addRange(0x11720, 0x11721).addRange(0x11730, 0x11746).addRange(0x11800, 0x1182E).addRange(0x118A0, 0x118F2).addRange(0x118FF, 0x11906).addRange(0x1190C, 0x11913).addRange(0x11915, 0x11916).addRange(0x11918, 0x1192F).addRange(0x11931, 0x11935).addRange(0x11937, 0x11938).addRange(0x1193F, 0x11942).addRange(0x11944, 0x11946).addRange(0x11950, 0x11959).addRange(0x119A0, 0x119A7).addRange(0x119AA, 0x119D3).addRange(0x119DC, 0x119DF).addRange(0x119E1, 0x119E4).addRange(0x11A0B, 0x11A32).addRange(0x11A39, 0x11A3A).addRange(0x11A3F, 0x11A46).addRange(0x11A57, 0x11A58).addRange(0x11A5C, 0x11A89).addRange(0x11A9A, 0x11AA2).addRange(0x11AB0, 0x11AF8).addRange(0x11B00, 0x11B09).addRange(0x11C00, 0x11C08).addRange(0x11C0A, 0x11C2F).addRange(0x11C40, 0x11C45).addRange(0x11C50, 0x11C6C).addRange(0x11C70, 0x11C8F).addRange(0x11D00, 0x11D06).addRange(0x11D08, 0x11D09).addRange(0x11D0B, 0x11D30).addRange(0x11D50, 0x11D59).addRange(0x11D60, 0x11D65).addRange(0x11D67, 0x11D68).addRange(0x11D6A, 0x11D8E);\nset.addRange(0x11D93, 0x11D94).addRange(0x11DA0, 0x11DA9).addRange(0x11EE0, 0x11EF2).addRange(0x11EF5, 0x11EF8).addRange(0x11F02, 0x11F10).addRange(0x11F12, 0x11F35).addRange(0x11F3E, 0x11F3F).addRange(0x11F43, 0x11F59).addRange(0x11FC0, 0x11FF1).addRange(0x11FFF, 0x12399).addRange(0x12400, 0x1246E).addRange(0x12470, 0x12474).addRange(0x12480, 0x12543).addRange(0x12F90, 0x12FF2).addRange(0x13000, 0x1342F).addRange(0x13441, 0x13446).addRange(0x14400, 0x14646).addRange(0x16800, 0x16A38).addRange(0x16A40, 0x16A5E).addRange(0x16A60, 0x16A69).addRange(0x16A6E, 0x16ABE).addRange(0x16AC0, 0x16AC9).addRange(0x16AD0, 0x16AED).addRange(0x16B00, 0x16B2F).addRange(0x16B37, 0x16B45).addRange(0x16B50, 0x16B59).addRange(0x16B5B, 0x16B61).addRange(0x16B63, 0x16B77).addRange(0x16B7D, 0x16B8F).addRange(0x16E40, 0x16E9A).addRange(0x16F00, 0x16F4A).addRange(0x16F50, 0x16F87).addRange(0x16F93, 0x16F9F).addRange(0x16FE0, 0x16FE3).addRange(0x16FF0, 0x16FF1).addRange(0x17000, 0x187F7).addRange(0x18800, 0x18CD5).addRange(0x18D00, 0x18D08).addRange(0x1AFF0, 0x1AFF3).addRange(0x1AFF5, 0x1AFFB).addRange(0x1AFFD, 0x1AFFE).addRange(0x1B000, 0x1B122).addRange(0x1B150, 0x1B152).addRange(0x1B164, 0x1B167).addRange(0x1B170, 0x1B2FB).addRange(0x1BC00, 0x1BC6A).addRange(0x1BC70, 0x1BC7C).addRange(0x1BC80, 0x1BC88).addRange(0x1BC90, 0x1BC99).addRange(0x1CF50, 0x1CFC3).addRange(0x1D000, 0x1D0F5);\nset.addRange(0x1D100, 0x1D126).addRange(0x1D129, 0x1D164).addRange(0x1D16A, 0x1D16D).addRange(0x1D183, 0x1D184).addRange(0x1D18C, 0x1D1A9).addRange(0x1D1AE, 0x1D1EA).addRange(0x1D200, 0x1D241).addRange(0x1D2C0, 0x1D2D3).addRange(0x1D2E0, 0x1D2F3).addRange(0x1D300, 0x1D356).addRange(0x1D360, 0x1D378).addRange(0x1D400, 0x1D454).addRange(0x1D456, 0x1D49C).addRange(0x1D49E, 0x1D49F).addRange(0x1D4A5, 0x1D4A6).addRange(0x1D4A9, 0x1D4AC).addRange(0x1D4AE, 0x1D4B9).addRange(0x1D4BD, 0x1D4C3).addRange(0x1D4C5, 0x1D505).addRange(0x1D507, 0x1D50A).addRange(0x1D50D, 0x1D514).addRange(0x1D516, 0x1D51C).addRange(0x1D51E, 0x1D539).addRange(0x1D53B, 0x1D53E).addRange(0x1D540, 0x1D544).addRange(0x1D54A, 0x1D550).addRange(0x1D552, 0x1D6A5).addRange(0x1D6A8, 0x1D7CB).addRange(0x1D7CE, 0x1D9FF).addRange(0x1DA37, 0x1DA3A).addRange(0x1DA6D, 0x1DA74).addRange(0x1DA76, 0x1DA83).addRange(0x1DA85, 0x1DA8B).addRange(0x1DF00, 0x1DF1E).addRange(0x1DF25, 0x1DF2A).addRange(0x1E030, 0x1E06D).addRange(0x1E100, 0x1E12C).addRange(0x1E137, 0x1E13D).addRange(0x1E140, 0x1E149).addRange(0x1E14E, 0x1E14F).addRange(0x1E290, 0x1E2AD).addRange(0x1E2C0, 0x1E2EB).addRange(0x1E2F0, 0x1E2F9).addRange(0x1E4D0, 0x1E4EB).addRange(0x1E4F0, 0x1E4F9).addRange(0x1E7E0, 0x1E7E6).addRange(0x1E7E8, 0x1E7EB).addRange(0x1E7ED, 0x1E7EE).addRange(0x1E7F0, 0x1E7FE).addRange(0x1E800, 0x1E8C4).addRange(0x1E8C7, 0x1E8CF);\nset.addRange(0x1E900, 0x1E943).addRange(0x1E950, 0x1E959).addRange(0x1E95E, 0x1E95F).addRange(0x1EC71, 0x1ECB4).addRange(0x1ED01, 0x1ED3D).addRange(0x1EE00, 0x1EE03).addRange(0x1EE05, 0x1EE1F).addRange(0x1EE21, 0x1EE22).addRange(0x1EE29, 0x1EE32).addRange(0x1EE34, 0x1EE37).addRange(0x1EE4D, 0x1EE4F).addRange(0x1EE51, 0x1EE52).addRange(0x1EE61, 0x1EE62).addRange(0x1EE67, 0x1EE6A).addRange(0x1EE6C, 0x1EE72).addRange(0x1EE74, 0x1EE77).addRange(0x1EE79, 0x1EE7C).addRange(0x1EE80, 0x1EE89).addRange(0x1EE8B, 0x1EE9B).addRange(0x1EEA1, 0x1EEA3).addRange(0x1EEA5, 0x1EEA9).addRange(0x1EEAB, 0x1EEBB).addRange(0x1EEF0, 0x1EEF1).addRange(0x1F000, 0x1F02B).addRange(0x1F030, 0x1F093).addRange(0x1F0A0, 0x1F0AE).addRange(0x1F0B1, 0x1F0BF).addRange(0x1F0C1, 0x1F0CF).addRange(0x1F0D1, 0x1F0F5).addRange(0x1F100, 0x1F1AD).addRange(0x1F1E6, 0x1F202).addRange(0x1F210, 0x1F23B).addRange(0x1F240, 0x1F248).addRange(0x1F250, 0x1F251).addRange(0x1F260, 0x1F265).addRange(0x1F300, 0x1F6D7).addRange(0x1F6DC, 0x1F6EC).addRange(0x1F6F0, 0x1F6FC).addRange(0x1F700, 0x1F776).addRange(0x1F77B, 0x1F7D9).addRange(0x1F7E0, 0x1F7EB).addRange(0x1F800, 0x1F80B).addRange(0x1F810, 0x1F847).addRange(0x1F850, 0x1F859).addRange(0x1F860, 0x1F887).addRange(0x1F890, 0x1F8AD).addRange(0x1F8B0, 0x1F8B1).addRange(0x1F900, 0x1FA53).addRange(0x1FA60, 0x1FA6D).addRange(0x1FA70, 0x1FA7C).addRange(0x1FA80, 0x1FA88);\nset.addRange(0x1FA90, 0x1FABD).addRange(0x1FABF, 0x1FAC5).addRange(0x1FACE, 0x1FADB).addRange(0x1FAE0, 0x1FAE8).addRange(0x1FAF0, 0x1FAF8).addRange(0x1FB00, 0x1FB92).addRange(0x1FB94, 0x1FBCA).addRange(0x1FBF0, 0x1FBF9).addRange(0x20000, 0x2A6DF).addRange(0x2A700, 0x2B739).addRange(0x2B740, 0x2B81D).addRange(0x2B820, 0x2CEA1).addRange(0x2CEB0, 0x2EBE0).addRange(0x2EBF0, 0x2EE5D).addRange(0x2F800, 0x2FA1D).addRange(0x30000, 0x3134A).addRange(0x31350, 0x323AF);\nexports.characters = set;\n","const set = require('regenerate')(0x5BF, 0x5C7, 0x670, 0x711, 0x7FD, 0x93A, 0x93C, 0x94D, 0x981, 0x9BC, 0x9BE, 0x9CD, 0x9D7, 0x9FE, 0xA3C, 0xA51, 0xA75, 0xABC, 0xACD, 0xB01, 0xB3C, 0xB4D, 0xB82, 0xBBE, 0xBC0, 0xBCD, 0xBD7, 0xC00, 0xC04, 0xC3C, 0xC81, 0xCBC, 0xCBF, 0xCC2, 0xCC6, 0xD3E, 0xD4D, 0xD57, 0xD81, 0xDCA, 0xDCF, 0xDD6, 0xDDF, 0xE31, 0xEB1, 0xF35, 0xF37, 0xF39, 0xFC6, 0x1082, 0x108D, 0x109D, 0x17C6, 0x17DD, 0x180F, 0x18A9, 0x1932, 0x1A1B, 0x1A56, 0x1A60, 0x1A62, 0x1A7F, 0x1B3C, 0x1B42, 0x1BE6, 0x1BED, 0x1CED, 0x1CF4, 0x200C, 0x2D7F, 0xA802, 0xA806, 0xA80B, 0xA82C, 0xA8FF, 0xA9B3, 0xA9E5, 0xAA43, 0xAA4C, 0xAA7C, 0xAAB0, 0xAAC1, 0xAAF6, 0xABE5, 0xABE8, 0xABED, 0xFB1E, 0x101FD, 0x102E0, 0x10A3F, 0x11001, 0x11070, 0x110C2, 0x11173, 0x111CF, 0x11234, 0x1123E, 0x11241, 0x112DF, 0x1133E, 0x11340, 0x11357, 0x11446, 0x1145E, 0x114B0, 0x114BA, 0x114BD, 0x115AF, 0x1163D, 0x116AB, 0x116AD, 0x116B7, 0x11930, 0x1193E, 0x11943, 0x119E0, 0x11A47, 0x11C3F, 0x11D3A, 0x11D47, 0x11D95, 0x11D97, 0x11F40, 0x11F42, 0x13440, 0x16F4F, 0x16FE4, 0x1D165, 0x1DA75, 0x1DA84, 0x1E08F, 0x1E2AE);\nset.addRange(0x300, 0x36F).addRange(0x483, 0x489).addRange(0x591, 0x5BD).addRange(0x5C1, 0x5C2).addRange(0x5C4, 0x5C5).addRange(0x610, 0x61A).addRange(0x64B, 0x65F).addRange(0x6D6, 0x6DC).addRange(0x6DF, 0x6E4).addRange(0x6E7, 0x6E8).addRange(0x6EA, 0x6ED).addRange(0x730, 0x74A).addRange(0x7A6, 0x7B0).addRange(0x7EB, 0x7F3).addRange(0x816, 0x819).addRange(0x81B, 0x823).addRange(0x825, 0x827).addRange(0x829, 0x82D).addRange(0x859, 0x85B).addRange(0x898, 0x89F).addRange(0x8CA, 0x8E1).addRange(0x8E3, 0x902).addRange(0x941, 0x948).addRange(0x951, 0x957).addRange(0x962, 0x963).addRange(0x9C1, 0x9C4).addRange(0x9E2, 0x9E3).addRange(0xA01, 0xA02).addRange(0xA41, 0xA42).addRange(0xA47, 0xA48).addRange(0xA4B, 0xA4D).addRange(0xA70, 0xA71).addRange(0xA81, 0xA82).addRange(0xAC1, 0xAC5).addRange(0xAC7, 0xAC8).addRange(0xAE2, 0xAE3).addRange(0xAFA, 0xAFF).addRange(0xB3E, 0xB3F).addRange(0xB41, 0xB44).addRange(0xB55, 0xB57).addRange(0xB62, 0xB63).addRange(0xC3E, 0xC40).addRange(0xC46, 0xC48).addRange(0xC4A, 0xC4D).addRange(0xC55, 0xC56).addRange(0xC62, 0xC63).addRange(0xCCC, 0xCCD).addRange(0xCD5, 0xCD6).addRange(0xCE2, 0xCE3).addRange(0xD00, 0xD01).addRange(0xD3B, 0xD3C);\nset.addRange(0xD41, 0xD44).addRange(0xD62, 0xD63).addRange(0xDD2, 0xDD4).addRange(0xE34, 0xE3A).addRange(0xE47, 0xE4E).addRange(0xEB4, 0xEBC).addRange(0xEC8, 0xECE).addRange(0xF18, 0xF19).addRange(0xF71, 0xF7E).addRange(0xF80, 0xF84).addRange(0xF86, 0xF87).addRange(0xF8D, 0xF97).addRange(0xF99, 0xFBC).addRange(0x102D, 0x1030).addRange(0x1032, 0x1037).addRange(0x1039, 0x103A).addRange(0x103D, 0x103E).addRange(0x1058, 0x1059).addRange(0x105E, 0x1060).addRange(0x1071, 0x1074).addRange(0x1085, 0x1086).addRange(0x135D, 0x135F).addRange(0x1712, 0x1714).addRange(0x1732, 0x1733).addRange(0x1752, 0x1753).addRange(0x1772, 0x1773).addRange(0x17B4, 0x17B5).addRange(0x17B7, 0x17BD).addRange(0x17C9, 0x17D3).addRange(0x180B, 0x180D).addRange(0x1885, 0x1886).addRange(0x1920, 0x1922).addRange(0x1927, 0x1928).addRange(0x1939, 0x193B).addRange(0x1A17, 0x1A18).addRange(0x1A58, 0x1A5E).addRange(0x1A65, 0x1A6C).addRange(0x1A73, 0x1A7C).addRange(0x1AB0, 0x1ACE).addRange(0x1B00, 0x1B03).addRange(0x1B34, 0x1B3A).addRange(0x1B6B, 0x1B73).addRange(0x1B80, 0x1B81).addRange(0x1BA2, 0x1BA5).addRange(0x1BA8, 0x1BA9).addRange(0x1BAB, 0x1BAD).addRange(0x1BE8, 0x1BE9).addRange(0x1BEF, 0x1BF1).addRange(0x1C2C, 0x1C33).addRange(0x1C36, 0x1C37).addRange(0x1CD0, 0x1CD2);\nset.addRange(0x1CD4, 0x1CE0).addRange(0x1CE2, 0x1CE8).addRange(0x1CF8, 0x1CF9).addRange(0x1DC0, 0x1DFF).addRange(0x20D0, 0x20F0).addRange(0x2CEF, 0x2CF1).addRange(0x2DE0, 0x2DFF).addRange(0x302A, 0x302F).addRange(0x3099, 0x309A).addRange(0xA66F, 0xA672).addRange(0xA674, 0xA67D).addRange(0xA69E, 0xA69F).addRange(0xA6F0, 0xA6F1).addRange(0xA825, 0xA826).addRange(0xA8C4, 0xA8C5).addRange(0xA8E0, 0xA8F1).addRange(0xA926, 0xA92D).addRange(0xA947, 0xA951).addRange(0xA980, 0xA982).addRange(0xA9B6, 0xA9B9).addRange(0xA9BC, 0xA9BD).addRange(0xAA29, 0xAA2E).addRange(0xAA31, 0xAA32).addRange(0xAA35, 0xAA36).addRange(0xAAB2, 0xAAB4).addRange(0xAAB7, 0xAAB8).addRange(0xAABE, 0xAABF).addRange(0xAAEC, 0xAAED).addRange(0xFE00, 0xFE0F).addRange(0xFE20, 0xFE2F).addRange(0xFF9E, 0xFF9F).addRange(0x10376, 0x1037A).addRange(0x10A01, 0x10A03).addRange(0x10A05, 0x10A06).addRange(0x10A0C, 0x10A0F).addRange(0x10A38, 0x10A3A).addRange(0x10AE5, 0x10AE6).addRange(0x10D24, 0x10D27).addRange(0x10EAB, 0x10EAC).addRange(0x10EFD, 0x10EFF).addRange(0x10F46, 0x10F50).addRange(0x10F82, 0x10F85).addRange(0x11038, 0x11046).addRange(0x11073, 0x11074).addRange(0x1107F, 0x11081).addRange(0x110B3, 0x110B6).addRange(0x110B9, 0x110BA).addRange(0x11100, 0x11102).addRange(0x11127, 0x1112B).addRange(0x1112D, 0x11134).addRange(0x11180, 0x11181);\nset.addRange(0x111B6, 0x111BE).addRange(0x111C9, 0x111CC).addRange(0x1122F, 0x11231).addRange(0x11236, 0x11237).addRange(0x112E3, 0x112EA).addRange(0x11300, 0x11301).addRange(0x1133B, 0x1133C).addRange(0x11366, 0x1136C).addRange(0x11370, 0x11374).addRange(0x11438, 0x1143F).addRange(0x11442, 0x11444).addRange(0x114B3, 0x114B8).addRange(0x114BF, 0x114C0).addRange(0x114C2, 0x114C3).addRange(0x115B2, 0x115B5).addRange(0x115BC, 0x115BD).addRange(0x115BF, 0x115C0).addRange(0x115DC, 0x115DD).addRange(0x11633, 0x1163A).addRange(0x1163F, 0x11640).addRange(0x116B0, 0x116B5).addRange(0x1171D, 0x1171F).addRange(0x11722, 0x11725).addRange(0x11727, 0x1172B).addRange(0x1182F, 0x11837).addRange(0x11839, 0x1183A).addRange(0x1193B, 0x1193C).addRange(0x119D4, 0x119D7).addRange(0x119DA, 0x119DB).addRange(0x11A01, 0x11A0A).addRange(0x11A33, 0x11A38).addRange(0x11A3B, 0x11A3E).addRange(0x11A51, 0x11A56).addRange(0x11A59, 0x11A5B).addRange(0x11A8A, 0x11A96).addRange(0x11A98, 0x11A99).addRange(0x11C30, 0x11C36).addRange(0x11C38, 0x11C3D).addRange(0x11C92, 0x11CA7).addRange(0x11CAA, 0x11CB0).addRange(0x11CB2, 0x11CB3).addRange(0x11CB5, 0x11CB6).addRange(0x11D31, 0x11D36).addRange(0x11D3C, 0x11D3D).addRange(0x11D3F, 0x11D45).addRange(0x11D90, 0x11D91).addRange(0x11EF3, 0x11EF4).addRange(0x11F00, 0x11F01).addRange(0x11F36, 0x11F3A).addRange(0x13447, 0x13455).addRange(0x16AF0, 0x16AF4);\nset.addRange(0x16B30, 0x16B36).addRange(0x16F8F, 0x16F92).addRange(0x1BC9D, 0x1BC9E).addRange(0x1CF00, 0x1CF2D).addRange(0x1CF30, 0x1CF46).addRange(0x1D167, 0x1D169).addRange(0x1D16E, 0x1D172).addRange(0x1D17B, 0x1D182).addRange(0x1D185, 0x1D18B).addRange(0x1D1AA, 0x1D1AD).addRange(0x1D242, 0x1D244).addRange(0x1DA00, 0x1DA36).addRange(0x1DA3B, 0x1DA6C).addRange(0x1DA9B, 0x1DA9F).addRange(0x1DAA1, 0x1DAAF).addRange(0x1E000, 0x1E006).addRange(0x1E008, 0x1E018).addRange(0x1E01B, 0x1E021).addRange(0x1E023, 0x1E024).addRange(0x1E026, 0x1E02A).addRange(0x1E130, 0x1E136).addRange(0x1E2EC, 0x1E2EF).addRange(0x1E4EC, 0x1E4EF).addRange(0x1E8D0, 0x1E8D6).addRange(0x1E944, 0x1E94A).addRange(0xE0020, 0xE007F).addRange(0xE0100, 0xE01EF);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x30, 0x39).addRange(0x41, 0x46).addRange(0x61, 0x66).addRange(0xFF10, 0xFF19).addRange(0xFF21, 0xFF26).addRange(0xFF41, 0xFF46);\nexports.characters = set;\n","const set = require('regenerate')(0x5F, 0xAA, 0xB5, 0xB7, 0xBA, 0x2EC, 0x2EE, 0x37F, 0x38C, 0x559, 0x5BF, 0x5C7, 0x6FF, 0x7FA, 0x7FD, 0x9B2, 0x9D7, 0x9FC, 0x9FE, 0xA3C, 0xA51, 0xA5E, 0xAD0, 0xB71, 0xB9C, 0xBD0, 0xBD7, 0xC5D, 0xDBD, 0xDCA, 0xDD6, 0xE84, 0xEA5, 0xEC6, 0xF00, 0xF35, 0xF37, 0xF39, 0xFC6, 0x10C7, 0x10CD, 0x1258, 0x12C0, 0x17D7, 0x1AA7, 0x1F59, 0x1F5B, 0x1F5D, 0x1FBE, 0x2054, 0x2071, 0x207F, 0x20E1, 0x2102, 0x2107, 0x2115, 0x2124, 0x2126, 0x2128, 0x214E, 0x2D27, 0x2D2D, 0x2D6F, 0xA7D3, 0xA82C, 0xA8FB, 0xFB3E, 0xFF3F, 0x101FD, 0x102E0, 0x10808, 0x1083C, 0x10A3F, 0x10F27, 0x110C2, 0x11176, 0x111DC, 0x11288, 0x11350, 0x11357, 0x114C7, 0x11644, 0x11909, 0x11A47, 0x11A9D, 0x11D3A, 0x11FB0, 0x1B132, 0x1B155, 0x1D4A2, 0x1D4BB, 0x1D546, 0x1DA75, 0x1DA84, 0x1E08F, 0x1E14E, 0x1EE24, 0x1EE27, 0x1EE39, 0x1EE3B, 0x1EE42, 0x1EE47, 0x1EE49, 0x1EE4B, 0x1EE54, 0x1EE57, 0x1EE59, 0x1EE5B, 0x1EE5D, 0x1EE5F, 0x1EE64, 0x1EE7E);\nset.addRange(0x30, 0x39).addRange(0x41, 0x5A).addRange(0x61, 0x7A).addRange(0xC0, 0xD6).addRange(0xD8, 0xF6).addRange(0xF8, 0x2C1).addRange(0x2C6, 0x2D1).addRange(0x2E0, 0x2E4).addRange(0x300, 0x374).addRange(0x376, 0x377).addRange(0x37A, 0x37D).addRange(0x386, 0x38A).addRange(0x38E, 0x3A1).addRange(0x3A3, 0x3F5).addRange(0x3F7, 0x481).addRange(0x483, 0x487).addRange(0x48A, 0x52F).addRange(0x531, 0x556).addRange(0x560, 0x588).addRange(0x591, 0x5BD).addRange(0x5C1, 0x5C2).addRange(0x5C4, 0x5C5).addRange(0x5D0, 0x5EA).addRange(0x5EF, 0x5F2).addRange(0x610, 0x61A).addRange(0x620, 0x669).addRange(0x66E, 0x6D3).addRange(0x6D5, 0x6DC).addRange(0x6DF, 0x6E8).addRange(0x6EA, 0x6FC).addRange(0x710, 0x74A).addRange(0x74D, 0x7B1).addRange(0x7C0, 0x7F5).addRange(0x800, 0x82D).addRange(0x840, 0x85B).addRange(0x860, 0x86A).addRange(0x870, 0x887).addRange(0x889, 0x88E).addRange(0x898, 0x8E1).addRange(0x8E3, 0x963).addRange(0x966, 0x96F).addRange(0x971, 0x983).addRange(0x985, 0x98C).addRange(0x98F, 0x990).addRange(0x993, 0x9A8).addRange(0x9AA, 0x9B0).addRange(0x9B6, 0x9B9).addRange(0x9BC, 0x9C4).addRange(0x9C7, 0x9C8).addRange(0x9CB, 0x9CE).addRange(0x9DC, 0x9DD);\nset.addRange(0x9DF, 0x9E3).addRange(0x9E6, 0x9F1).addRange(0xA01, 0xA03).addRange(0xA05, 0xA0A).addRange(0xA0F, 0xA10).addRange(0xA13, 0xA28).addRange(0xA2A, 0xA30).addRange(0xA32, 0xA33).addRange(0xA35, 0xA36).addRange(0xA38, 0xA39).addRange(0xA3E, 0xA42).addRange(0xA47, 0xA48).addRange(0xA4B, 0xA4D).addRange(0xA59, 0xA5C).addRange(0xA66, 0xA75).addRange(0xA81, 0xA83).addRange(0xA85, 0xA8D).addRange(0xA8F, 0xA91).addRange(0xA93, 0xAA8).addRange(0xAAA, 0xAB0).addRange(0xAB2, 0xAB3).addRange(0xAB5, 0xAB9).addRange(0xABC, 0xAC5).addRange(0xAC7, 0xAC9).addRange(0xACB, 0xACD).addRange(0xAE0, 0xAE3).addRange(0xAE6, 0xAEF).addRange(0xAF9, 0xAFF).addRange(0xB01, 0xB03).addRange(0xB05, 0xB0C).addRange(0xB0F, 0xB10).addRange(0xB13, 0xB28).addRange(0xB2A, 0xB30).addRange(0xB32, 0xB33).addRange(0xB35, 0xB39).addRange(0xB3C, 0xB44).addRange(0xB47, 0xB48).addRange(0xB4B, 0xB4D).addRange(0xB55, 0xB57).addRange(0xB5C, 0xB5D).addRange(0xB5F, 0xB63).addRange(0xB66, 0xB6F).addRange(0xB82, 0xB83).addRange(0xB85, 0xB8A).addRange(0xB8E, 0xB90).addRange(0xB92, 0xB95).addRange(0xB99, 0xB9A).addRange(0xB9E, 0xB9F).addRange(0xBA3, 0xBA4).addRange(0xBA8, 0xBAA).addRange(0xBAE, 0xBB9);\nset.addRange(0xBBE, 0xBC2).addRange(0xBC6, 0xBC8).addRange(0xBCA, 0xBCD).addRange(0xBE6, 0xBEF).addRange(0xC00, 0xC0C).addRange(0xC0E, 0xC10).addRange(0xC12, 0xC28).addRange(0xC2A, 0xC39).addRange(0xC3C, 0xC44).addRange(0xC46, 0xC48).addRange(0xC4A, 0xC4D).addRange(0xC55, 0xC56).addRange(0xC58, 0xC5A).addRange(0xC60, 0xC63).addRange(0xC66, 0xC6F).addRange(0xC80, 0xC83).addRange(0xC85, 0xC8C).addRange(0xC8E, 0xC90).addRange(0xC92, 0xCA8).addRange(0xCAA, 0xCB3).addRange(0xCB5, 0xCB9).addRange(0xCBC, 0xCC4).addRange(0xCC6, 0xCC8).addRange(0xCCA, 0xCCD).addRange(0xCD5, 0xCD6).addRange(0xCDD, 0xCDE).addRange(0xCE0, 0xCE3).addRange(0xCE6, 0xCEF).addRange(0xCF1, 0xCF3).addRange(0xD00, 0xD0C).addRange(0xD0E, 0xD10).addRange(0xD12, 0xD44).addRange(0xD46, 0xD48).addRange(0xD4A, 0xD4E).addRange(0xD54, 0xD57).addRange(0xD5F, 0xD63).addRange(0xD66, 0xD6F).addRange(0xD7A, 0xD7F).addRange(0xD81, 0xD83).addRange(0xD85, 0xD96).addRange(0xD9A, 0xDB1).addRange(0xDB3, 0xDBB).addRange(0xDC0, 0xDC6).addRange(0xDCF, 0xDD4).addRange(0xDD8, 0xDDF).addRange(0xDE6, 0xDEF).addRange(0xDF2, 0xDF3).addRange(0xE01, 0xE3A).addRange(0xE40, 0xE4E).addRange(0xE50, 0xE59).addRange(0xE81, 0xE82);\nset.addRange(0xE86, 0xE8A).addRange(0xE8C, 0xEA3).addRange(0xEA7, 0xEBD).addRange(0xEC0, 0xEC4).addRange(0xEC8, 0xECE).addRange(0xED0, 0xED9).addRange(0xEDC, 0xEDF).addRange(0xF18, 0xF19).addRange(0xF20, 0xF29).addRange(0xF3E, 0xF47).addRange(0xF49, 0xF6C).addRange(0xF71, 0xF84).addRange(0xF86, 0xF97).addRange(0xF99, 0xFBC).addRange(0x1000, 0x1049).addRange(0x1050, 0x109D).addRange(0x10A0, 0x10C5).addRange(0x10D0, 0x10FA).addRange(0x10FC, 0x1248).addRange(0x124A, 0x124D).addRange(0x1250, 0x1256).addRange(0x125A, 0x125D).addRange(0x1260, 0x1288).addRange(0x128A, 0x128D).addRange(0x1290, 0x12B0).addRange(0x12B2, 0x12B5).addRange(0x12B8, 0x12BE).addRange(0x12C2, 0x12C5).addRange(0x12C8, 0x12D6).addRange(0x12D8, 0x1310).addRange(0x1312, 0x1315).addRange(0x1318, 0x135A).addRange(0x135D, 0x135F).addRange(0x1369, 0x1371).addRange(0x1380, 0x138F).addRange(0x13A0, 0x13F5).addRange(0x13F8, 0x13FD).addRange(0x1401, 0x166C).addRange(0x166F, 0x167F).addRange(0x1681, 0x169A).addRange(0x16A0, 0x16EA).addRange(0x16EE, 0x16F8).addRange(0x1700, 0x1715).addRange(0x171F, 0x1734).addRange(0x1740, 0x1753).addRange(0x1760, 0x176C).addRange(0x176E, 0x1770).addRange(0x1772, 0x1773).addRange(0x1780, 0x17D3).addRange(0x17DC, 0x17DD).addRange(0x17E0, 0x17E9);\nset.addRange(0x180B, 0x180D).addRange(0x180F, 0x1819).addRange(0x1820, 0x1878).addRange(0x1880, 0x18AA).addRange(0x18B0, 0x18F5).addRange(0x1900, 0x191E).addRange(0x1920, 0x192B).addRange(0x1930, 0x193B).addRange(0x1946, 0x196D).addRange(0x1970, 0x1974).addRange(0x1980, 0x19AB).addRange(0x19B0, 0x19C9).addRange(0x19D0, 0x19DA).addRange(0x1A00, 0x1A1B).addRange(0x1A20, 0x1A5E).addRange(0x1A60, 0x1A7C).addRange(0x1A7F, 0x1A89).addRange(0x1A90, 0x1A99).addRange(0x1AB0, 0x1ABD).addRange(0x1ABF, 0x1ACE).addRange(0x1B00, 0x1B4C).addRange(0x1B50, 0x1B59).addRange(0x1B6B, 0x1B73).addRange(0x1B80, 0x1BF3).addRange(0x1C00, 0x1C37).addRange(0x1C40, 0x1C49).addRange(0x1C4D, 0x1C7D).addRange(0x1C80, 0x1C88).addRange(0x1C90, 0x1CBA).addRange(0x1CBD, 0x1CBF).addRange(0x1CD0, 0x1CD2).addRange(0x1CD4, 0x1CFA).addRange(0x1D00, 0x1F15).addRange(0x1F18, 0x1F1D).addRange(0x1F20, 0x1F45).addRange(0x1F48, 0x1F4D).addRange(0x1F50, 0x1F57).addRange(0x1F5F, 0x1F7D).addRange(0x1F80, 0x1FB4).addRange(0x1FB6, 0x1FBC).addRange(0x1FC2, 0x1FC4).addRange(0x1FC6, 0x1FCC).addRange(0x1FD0, 0x1FD3).addRange(0x1FD6, 0x1FDB).addRange(0x1FE0, 0x1FEC).addRange(0x1FF2, 0x1FF4).addRange(0x1FF6, 0x1FFC).addRange(0x200C, 0x200D).addRange(0x203F, 0x2040).addRange(0x2090, 0x209C).addRange(0x20D0, 0x20DC);\nset.addRange(0x20E5, 0x20F0).addRange(0x210A, 0x2113).addRange(0x2118, 0x211D).addRange(0x212A, 0x2139).addRange(0x213C, 0x213F).addRange(0x2145, 0x2149).addRange(0x2160, 0x2188).addRange(0x2C00, 0x2CE4).addRange(0x2CEB, 0x2CF3).addRange(0x2D00, 0x2D25).addRange(0x2D30, 0x2D67).addRange(0x2D7F, 0x2D96).addRange(0x2DA0, 0x2DA6).addRange(0x2DA8, 0x2DAE).addRange(0x2DB0, 0x2DB6).addRange(0x2DB8, 0x2DBE).addRange(0x2DC0, 0x2DC6).addRange(0x2DC8, 0x2DCE).addRange(0x2DD0, 0x2DD6).addRange(0x2DD8, 0x2DDE).addRange(0x2DE0, 0x2DFF).addRange(0x3005, 0x3007).addRange(0x3021, 0x302F).addRange(0x3031, 0x3035).addRange(0x3038, 0x303C).addRange(0x3041, 0x3096).addRange(0x3099, 0x309F).addRange(0x30A1, 0x30FF).addRange(0x3105, 0x312F).addRange(0x3131, 0x318E).addRange(0x31A0, 0x31BF).addRange(0x31F0, 0x31FF).addRange(0x3400, 0x4DBF).addRange(0x4E00, 0xA48C).addRange(0xA4D0, 0xA4FD).addRange(0xA500, 0xA60C).addRange(0xA610, 0xA62B).addRange(0xA640, 0xA66F).addRange(0xA674, 0xA67D).addRange(0xA67F, 0xA6F1).addRange(0xA717, 0xA71F).addRange(0xA722, 0xA788).addRange(0xA78B, 0xA7CA).addRange(0xA7D0, 0xA7D1).addRange(0xA7D5, 0xA7D9).addRange(0xA7F2, 0xA827).addRange(0xA840, 0xA873).addRange(0xA880, 0xA8C5).addRange(0xA8D0, 0xA8D9).addRange(0xA8E0, 0xA8F7).addRange(0xA8FD, 0xA92D);\nset.addRange(0xA930, 0xA953).addRange(0xA960, 0xA97C).addRange(0xA980, 0xA9C0).addRange(0xA9CF, 0xA9D9).addRange(0xA9E0, 0xA9FE).addRange(0xAA00, 0xAA36).addRange(0xAA40, 0xAA4D).addRange(0xAA50, 0xAA59).addRange(0xAA60, 0xAA76).addRange(0xAA7A, 0xAAC2).addRange(0xAADB, 0xAADD).addRange(0xAAE0, 0xAAEF).addRange(0xAAF2, 0xAAF6).addRange(0xAB01, 0xAB06).addRange(0xAB09, 0xAB0E).addRange(0xAB11, 0xAB16).addRange(0xAB20, 0xAB26).addRange(0xAB28, 0xAB2E).addRange(0xAB30, 0xAB5A).addRange(0xAB5C, 0xAB69).addRange(0xAB70, 0xABEA).addRange(0xABEC, 0xABED).addRange(0xABF0, 0xABF9).addRange(0xAC00, 0xD7A3).addRange(0xD7B0, 0xD7C6).addRange(0xD7CB, 0xD7FB).addRange(0xF900, 0xFA6D).addRange(0xFA70, 0xFAD9).addRange(0xFB00, 0xFB06).addRange(0xFB13, 0xFB17).addRange(0xFB1D, 0xFB28).addRange(0xFB2A, 0xFB36).addRange(0xFB38, 0xFB3C).addRange(0xFB40, 0xFB41).addRange(0xFB43, 0xFB44).addRange(0xFB46, 0xFBB1).addRange(0xFBD3, 0xFD3D).addRange(0xFD50, 0xFD8F).addRange(0xFD92, 0xFDC7).addRange(0xFDF0, 0xFDFB).addRange(0xFE00, 0xFE0F).addRange(0xFE20, 0xFE2F).addRange(0xFE33, 0xFE34).addRange(0xFE4D, 0xFE4F).addRange(0xFE70, 0xFE74).addRange(0xFE76, 0xFEFC).addRange(0xFF10, 0xFF19).addRange(0xFF21, 0xFF3A).addRange(0xFF41, 0xFF5A).addRange(0xFF65, 0xFFBE).addRange(0xFFC2, 0xFFC7);\nset.addRange(0xFFCA, 0xFFCF).addRange(0xFFD2, 0xFFD7).addRange(0xFFDA, 0xFFDC).addRange(0x10000, 0x1000B).addRange(0x1000D, 0x10026).addRange(0x10028, 0x1003A).addRange(0x1003C, 0x1003D).addRange(0x1003F, 0x1004D).addRange(0x10050, 0x1005D).addRange(0x10080, 0x100FA).addRange(0x10140, 0x10174).addRange(0x10280, 0x1029C).addRange(0x102A0, 0x102D0).addRange(0x10300, 0x1031F).addRange(0x1032D, 0x1034A).addRange(0x10350, 0x1037A).addRange(0x10380, 0x1039D).addRange(0x103A0, 0x103C3).addRange(0x103C8, 0x103CF).addRange(0x103D1, 0x103D5).addRange(0x10400, 0x1049D).addRange(0x104A0, 0x104A9).addRange(0x104B0, 0x104D3).addRange(0x104D8, 0x104FB).addRange(0x10500, 0x10527).addRange(0x10530, 0x10563).addRange(0x10570, 0x1057A).addRange(0x1057C, 0x1058A).addRange(0x1058C, 0x10592).addRange(0x10594, 0x10595).addRange(0x10597, 0x105A1).addRange(0x105A3, 0x105B1).addRange(0x105B3, 0x105B9).addRange(0x105BB, 0x105BC).addRange(0x10600, 0x10736).addRange(0x10740, 0x10755).addRange(0x10760, 0x10767).addRange(0x10780, 0x10785).addRange(0x10787, 0x107B0).addRange(0x107B2, 0x107BA).addRange(0x10800, 0x10805).addRange(0x1080A, 0x10835).addRange(0x10837, 0x10838).addRange(0x1083F, 0x10855).addRange(0x10860, 0x10876).addRange(0x10880, 0x1089E).addRange(0x108E0, 0x108F2).addRange(0x108F4, 0x108F5).addRange(0x10900, 0x10915).addRange(0x10920, 0x10939).addRange(0x10980, 0x109B7);\nset.addRange(0x109BE, 0x109BF).addRange(0x10A00, 0x10A03).addRange(0x10A05, 0x10A06).addRange(0x10A0C, 0x10A13).addRange(0x10A15, 0x10A17).addRange(0x10A19, 0x10A35).addRange(0x10A38, 0x10A3A).addRange(0x10A60, 0x10A7C).addRange(0x10A80, 0x10A9C).addRange(0x10AC0, 0x10AC7).addRange(0x10AC9, 0x10AE6).addRange(0x10B00, 0x10B35).addRange(0x10B40, 0x10B55).addRange(0x10B60, 0x10B72).addRange(0x10B80, 0x10B91).addRange(0x10C00, 0x10C48).addRange(0x10C80, 0x10CB2).addRange(0x10CC0, 0x10CF2).addRange(0x10D00, 0x10D27).addRange(0x10D30, 0x10D39).addRange(0x10E80, 0x10EA9).addRange(0x10EAB, 0x10EAC).addRange(0x10EB0, 0x10EB1).addRange(0x10EFD, 0x10F1C).addRange(0x10F30, 0x10F50).addRange(0x10F70, 0x10F85).addRange(0x10FB0, 0x10FC4).addRange(0x10FE0, 0x10FF6).addRange(0x11000, 0x11046).addRange(0x11066, 0x11075).addRange(0x1107F, 0x110BA).addRange(0x110D0, 0x110E8).addRange(0x110F0, 0x110F9).addRange(0x11100, 0x11134).addRange(0x11136, 0x1113F).addRange(0x11144, 0x11147).addRange(0x11150, 0x11173).addRange(0x11180, 0x111C4).addRange(0x111C9, 0x111CC).addRange(0x111CE, 0x111DA).addRange(0x11200, 0x11211).addRange(0x11213, 0x11237).addRange(0x1123E, 0x11241).addRange(0x11280, 0x11286).addRange(0x1128A, 0x1128D).addRange(0x1128F, 0x1129D).addRange(0x1129F, 0x112A8).addRange(0x112B0, 0x112EA).addRange(0x112F0, 0x112F9).addRange(0x11300, 0x11303).addRange(0x11305, 0x1130C);\nset.addRange(0x1130F, 0x11310).addRange(0x11313, 0x11328).addRange(0x1132A, 0x11330).addRange(0x11332, 0x11333).addRange(0x11335, 0x11339).addRange(0x1133B, 0x11344).addRange(0x11347, 0x11348).addRange(0x1134B, 0x1134D).addRange(0x1135D, 0x11363).addRange(0x11366, 0x1136C).addRange(0x11370, 0x11374).addRange(0x11400, 0x1144A).addRange(0x11450, 0x11459).addRange(0x1145E, 0x11461).addRange(0x11480, 0x114C5).addRange(0x114D0, 0x114D9).addRange(0x11580, 0x115B5).addRange(0x115B8, 0x115C0).addRange(0x115D8, 0x115DD).addRange(0x11600, 0x11640).addRange(0x11650, 0x11659).addRange(0x11680, 0x116B8).addRange(0x116C0, 0x116C9).addRange(0x11700, 0x1171A).addRange(0x1171D, 0x1172B).addRange(0x11730, 0x11739).addRange(0x11740, 0x11746).addRange(0x11800, 0x1183A).addRange(0x118A0, 0x118E9).addRange(0x118FF, 0x11906).addRange(0x1190C, 0x11913).addRange(0x11915, 0x11916).addRange(0x11918, 0x11935).addRange(0x11937, 0x11938).addRange(0x1193B, 0x11943).addRange(0x11950, 0x11959).addRange(0x119A0, 0x119A7).addRange(0x119AA, 0x119D7).addRange(0x119DA, 0x119E1).addRange(0x119E3, 0x119E4).addRange(0x11A00, 0x11A3E).addRange(0x11A50, 0x11A99).addRange(0x11AB0, 0x11AF8).addRange(0x11C00, 0x11C08).addRange(0x11C0A, 0x11C36).addRange(0x11C38, 0x11C40).addRange(0x11C50, 0x11C59).addRange(0x11C72, 0x11C8F).addRange(0x11C92, 0x11CA7).addRange(0x11CA9, 0x11CB6).addRange(0x11D00, 0x11D06);\nset.addRange(0x11D08, 0x11D09).addRange(0x11D0B, 0x11D36).addRange(0x11D3C, 0x11D3D).addRange(0x11D3F, 0x11D47).addRange(0x11D50, 0x11D59).addRange(0x11D60, 0x11D65).addRange(0x11D67, 0x11D68).addRange(0x11D6A, 0x11D8E).addRange(0x11D90, 0x11D91).addRange(0x11D93, 0x11D98).addRange(0x11DA0, 0x11DA9).addRange(0x11EE0, 0x11EF6).addRange(0x11F00, 0x11F10).addRange(0x11F12, 0x11F3A).addRange(0x11F3E, 0x11F42).addRange(0x11F50, 0x11F59).addRange(0x12000, 0x12399).addRange(0x12400, 0x1246E).addRange(0x12480, 0x12543).addRange(0x12F90, 0x12FF0).addRange(0x13000, 0x1342F).addRange(0x13440, 0x13455).addRange(0x14400, 0x14646).addRange(0x16800, 0x16A38).addRange(0x16A40, 0x16A5E).addRange(0x16A60, 0x16A69).addRange(0x16A70, 0x16ABE).addRange(0x16AC0, 0x16AC9).addRange(0x16AD0, 0x16AED).addRange(0x16AF0, 0x16AF4).addRange(0x16B00, 0x16B36).addRange(0x16B40, 0x16B43).addRange(0x16B50, 0x16B59).addRange(0x16B63, 0x16B77).addRange(0x16B7D, 0x16B8F).addRange(0x16E40, 0x16E7F).addRange(0x16F00, 0x16F4A).addRange(0x16F4F, 0x16F87).addRange(0x16F8F, 0x16F9F).addRange(0x16FE0, 0x16FE1).addRange(0x16FE3, 0x16FE4).addRange(0x16FF0, 0x16FF1).addRange(0x17000, 0x187F7).addRange(0x18800, 0x18CD5).addRange(0x18D00, 0x18D08).addRange(0x1AFF0, 0x1AFF3).addRange(0x1AFF5, 0x1AFFB).addRange(0x1AFFD, 0x1AFFE).addRange(0x1B000, 0x1B122).addRange(0x1B150, 0x1B152).addRange(0x1B164, 0x1B167);\nset.addRange(0x1B170, 0x1B2FB).addRange(0x1BC00, 0x1BC6A).addRange(0x1BC70, 0x1BC7C).addRange(0x1BC80, 0x1BC88).addRange(0x1BC90, 0x1BC99).addRange(0x1BC9D, 0x1BC9E).addRange(0x1CF00, 0x1CF2D).addRange(0x1CF30, 0x1CF46).addRange(0x1D165, 0x1D169).addRange(0x1D16D, 0x1D172).addRange(0x1D17B, 0x1D182).addRange(0x1D185, 0x1D18B).addRange(0x1D1AA, 0x1D1AD).addRange(0x1D242, 0x1D244).addRange(0x1D400, 0x1D454).addRange(0x1D456, 0x1D49C).addRange(0x1D49E, 0x1D49F).addRange(0x1D4A5, 0x1D4A6).addRange(0x1D4A9, 0x1D4AC).addRange(0x1D4AE, 0x1D4B9).addRange(0x1D4BD, 0x1D4C3).addRange(0x1D4C5, 0x1D505).addRange(0x1D507, 0x1D50A).addRange(0x1D50D, 0x1D514).addRange(0x1D516, 0x1D51C).addRange(0x1D51E, 0x1D539).addRange(0x1D53B, 0x1D53E).addRange(0x1D540, 0x1D544).addRange(0x1D54A, 0x1D550).addRange(0x1D552, 0x1D6A5).addRange(0x1D6A8, 0x1D6C0).addRange(0x1D6C2, 0x1D6DA).addRange(0x1D6DC, 0x1D6FA).addRange(0x1D6FC, 0x1D714).addRange(0x1D716, 0x1D734).addRange(0x1D736, 0x1D74E).addRange(0x1D750, 0x1D76E).addRange(0x1D770, 0x1D788).addRange(0x1D78A, 0x1D7A8).addRange(0x1D7AA, 0x1D7C2).addRange(0x1D7C4, 0x1D7CB).addRange(0x1D7CE, 0x1D7FF).addRange(0x1DA00, 0x1DA36).addRange(0x1DA3B, 0x1DA6C).addRange(0x1DA9B, 0x1DA9F).addRange(0x1DAA1, 0x1DAAF).addRange(0x1DF00, 0x1DF1E).addRange(0x1DF25, 0x1DF2A).addRange(0x1E000, 0x1E006).addRange(0x1E008, 0x1E018).addRange(0x1E01B, 0x1E021);\nset.addRange(0x1E023, 0x1E024).addRange(0x1E026, 0x1E02A).addRange(0x1E030, 0x1E06D).addRange(0x1E100, 0x1E12C).addRange(0x1E130, 0x1E13D).addRange(0x1E140, 0x1E149).addRange(0x1E290, 0x1E2AE).addRange(0x1E2C0, 0x1E2F9).addRange(0x1E4D0, 0x1E4F9).addRange(0x1E7E0, 0x1E7E6).addRange(0x1E7E8, 0x1E7EB).addRange(0x1E7ED, 0x1E7EE).addRange(0x1E7F0, 0x1E7FE).addRange(0x1E800, 0x1E8C4).addRange(0x1E8D0, 0x1E8D6).addRange(0x1E900, 0x1E94B).addRange(0x1E950, 0x1E959).addRange(0x1EE00, 0x1EE03).addRange(0x1EE05, 0x1EE1F).addRange(0x1EE21, 0x1EE22).addRange(0x1EE29, 0x1EE32).addRange(0x1EE34, 0x1EE37).addRange(0x1EE4D, 0x1EE4F).addRange(0x1EE51, 0x1EE52).addRange(0x1EE61, 0x1EE62).addRange(0x1EE67, 0x1EE6A).addRange(0x1EE6C, 0x1EE72).addRange(0x1EE74, 0x1EE77).addRange(0x1EE79, 0x1EE7C).addRange(0x1EE80, 0x1EE89).addRange(0x1EE8B, 0x1EE9B).addRange(0x1EEA1, 0x1EEA3).addRange(0x1EEA5, 0x1EEA9).addRange(0x1EEAB, 0x1EEBB).addRange(0x1FBF0, 0x1FBF9).addRange(0x20000, 0x2A6DF).addRange(0x2A700, 0x2B739).addRange(0x2B740, 0x2B81D).addRange(0x2B820, 0x2CEA1).addRange(0x2CEB0, 0x2EBE0).addRange(0x2EBF0, 0x2EE5D).addRange(0x2F800, 0x2FA1D).addRange(0x30000, 0x3134A).addRange(0x31350, 0x323AF).addRange(0xE0100, 0xE01EF);\nexports.characters = set;\n","const set = require('regenerate')(0xAA, 0xB5, 0xBA, 0x2EC, 0x2EE, 0x37F, 0x386, 0x38C, 0x559, 0x6D5, 0x6FF, 0x710, 0x7B1, 0x7FA, 0x81A, 0x824, 0x828, 0x93D, 0x950, 0x9B2, 0x9BD, 0x9CE, 0x9FC, 0xA5E, 0xABD, 0xAD0, 0xAF9, 0xB3D, 0xB71, 0xB83, 0xB9C, 0xBD0, 0xC3D, 0xC5D, 0xC80, 0xCBD, 0xD3D, 0xD4E, 0xDBD, 0xE84, 0xEA5, 0xEBD, 0xEC6, 0xF00, 0x103F, 0x1061, 0x108E, 0x10C7, 0x10CD, 0x1258, 0x12C0, 0x17D7, 0x17DC, 0x18AA, 0x1AA7, 0x1CFA, 0x1F59, 0x1F5B, 0x1F5D, 0x1FBE, 0x2071, 0x207F, 0x2102, 0x2107, 0x2115, 0x2124, 0x2126, 0x2128, 0x214E, 0x2D27, 0x2D2D, 0x2D6F, 0xA7D3, 0xA8FB, 0xA9CF, 0xAA7A, 0xAAB1, 0xAAC0, 0xAAC2, 0xFB1D, 0xFB3E, 0x10808, 0x1083C, 0x10A00, 0x10F27, 0x11075, 0x11144, 0x11147, 0x11176, 0x111DA, 0x111DC, 0x11288, 0x1133D, 0x11350, 0x114C7, 0x11644, 0x116B8, 0x11909, 0x1193F, 0x11941, 0x119E1, 0x119E3, 0x11A00, 0x11A3A, 0x11A50, 0x11A9D, 0x11C40, 0x11D46, 0x11D98, 0x11F02, 0x11FB0, 0x16F50, 0x16FE3, 0x1B132, 0x1B155, 0x1D4A2, 0x1D4BB, 0x1D546, 0x1E14E, 0x1E94B, 0x1EE24, 0x1EE27, 0x1EE39, 0x1EE3B, 0x1EE42, 0x1EE47, 0x1EE49, 0x1EE4B, 0x1EE54, 0x1EE57, 0x1EE59, 0x1EE5B, 0x1EE5D, 0x1EE5F, 0x1EE64, 0x1EE7E);\nset.addRange(0x41, 0x5A).addRange(0x61, 0x7A).addRange(0xC0, 0xD6).addRange(0xD8, 0xF6).addRange(0xF8, 0x2C1).addRange(0x2C6, 0x2D1).addRange(0x2E0, 0x2E4).addRange(0x370, 0x374).addRange(0x376, 0x377).addRange(0x37A, 0x37D).addRange(0x388, 0x38A).addRange(0x38E, 0x3A1).addRange(0x3A3, 0x3F5).addRange(0x3F7, 0x481).addRange(0x48A, 0x52F).addRange(0x531, 0x556).addRange(0x560, 0x588).addRange(0x5D0, 0x5EA).addRange(0x5EF, 0x5F2).addRange(0x620, 0x64A).addRange(0x66E, 0x66F).addRange(0x671, 0x6D3).addRange(0x6E5, 0x6E6).addRange(0x6EE, 0x6EF).addRange(0x6FA, 0x6FC).addRange(0x712, 0x72F).addRange(0x74D, 0x7A5).addRange(0x7CA, 0x7EA).addRange(0x7F4, 0x7F5).addRange(0x800, 0x815).addRange(0x840, 0x858).addRange(0x860, 0x86A).addRange(0x870, 0x887).addRange(0x889, 0x88E).addRange(0x8A0, 0x8C9).addRange(0x904, 0x939).addRange(0x958, 0x961).addRange(0x971, 0x980).addRange(0x985, 0x98C).addRange(0x98F, 0x990).addRange(0x993, 0x9A8).addRange(0x9AA, 0x9B0).addRange(0x9B6, 0x9B9).addRange(0x9DC, 0x9DD).addRange(0x9DF, 0x9E1).addRange(0x9F0, 0x9F1).addRange(0xA05, 0xA0A).addRange(0xA0F, 0xA10).addRange(0xA13, 0xA28).addRange(0xA2A, 0xA30).addRange(0xA32, 0xA33);\nset.addRange(0xA35, 0xA36).addRange(0xA38, 0xA39).addRange(0xA59, 0xA5C).addRange(0xA72, 0xA74).addRange(0xA85, 0xA8D).addRange(0xA8F, 0xA91).addRange(0xA93, 0xAA8).addRange(0xAAA, 0xAB0).addRange(0xAB2, 0xAB3).addRange(0xAB5, 0xAB9).addRange(0xAE0, 0xAE1).addRange(0xB05, 0xB0C).addRange(0xB0F, 0xB10).addRange(0xB13, 0xB28).addRange(0xB2A, 0xB30).addRange(0xB32, 0xB33).addRange(0xB35, 0xB39).addRange(0xB5C, 0xB5D).addRange(0xB5F, 0xB61).addRange(0xB85, 0xB8A).addRange(0xB8E, 0xB90).addRange(0xB92, 0xB95).addRange(0xB99, 0xB9A).addRange(0xB9E, 0xB9F).addRange(0xBA3, 0xBA4).addRange(0xBA8, 0xBAA).addRange(0xBAE, 0xBB9).addRange(0xC05, 0xC0C).addRange(0xC0E, 0xC10).addRange(0xC12, 0xC28).addRange(0xC2A, 0xC39).addRange(0xC58, 0xC5A).addRange(0xC60, 0xC61).addRange(0xC85, 0xC8C).addRange(0xC8E, 0xC90).addRange(0xC92, 0xCA8).addRange(0xCAA, 0xCB3).addRange(0xCB5, 0xCB9).addRange(0xCDD, 0xCDE).addRange(0xCE0, 0xCE1).addRange(0xCF1, 0xCF2).addRange(0xD04, 0xD0C).addRange(0xD0E, 0xD10).addRange(0xD12, 0xD3A).addRange(0xD54, 0xD56).addRange(0xD5F, 0xD61).addRange(0xD7A, 0xD7F).addRange(0xD85, 0xD96).addRange(0xD9A, 0xDB1).addRange(0xDB3, 0xDBB).addRange(0xDC0, 0xDC6);\nset.addRange(0xE01, 0xE30).addRange(0xE32, 0xE33).addRange(0xE40, 0xE46).addRange(0xE81, 0xE82).addRange(0xE86, 0xE8A).addRange(0xE8C, 0xEA3).addRange(0xEA7, 0xEB0).addRange(0xEB2, 0xEB3).addRange(0xEC0, 0xEC4).addRange(0xEDC, 0xEDF).addRange(0xF40, 0xF47).addRange(0xF49, 0xF6C).addRange(0xF88, 0xF8C).addRange(0x1000, 0x102A).addRange(0x1050, 0x1055).addRange(0x105A, 0x105D).addRange(0x1065, 0x1066).addRange(0x106E, 0x1070).addRange(0x1075, 0x1081).addRange(0x10A0, 0x10C5).addRange(0x10D0, 0x10FA).addRange(0x10FC, 0x1248).addRange(0x124A, 0x124D).addRange(0x1250, 0x1256).addRange(0x125A, 0x125D).addRange(0x1260, 0x1288).addRange(0x128A, 0x128D).addRange(0x1290, 0x12B0).addRange(0x12B2, 0x12B5).addRange(0x12B8, 0x12BE).addRange(0x12C2, 0x12C5).addRange(0x12C8, 0x12D6).addRange(0x12D8, 0x1310).addRange(0x1312, 0x1315).addRange(0x1318, 0x135A).addRange(0x1380, 0x138F).addRange(0x13A0, 0x13F5).addRange(0x13F8, 0x13FD).addRange(0x1401, 0x166C).addRange(0x166F, 0x167F).addRange(0x1681, 0x169A).addRange(0x16A0, 0x16EA).addRange(0x16EE, 0x16F8).addRange(0x1700, 0x1711).addRange(0x171F, 0x1731).addRange(0x1740, 0x1751).addRange(0x1760, 0x176C).addRange(0x176E, 0x1770).addRange(0x1780, 0x17B3).addRange(0x1820, 0x1878).addRange(0x1880, 0x18A8);\nset.addRange(0x18B0, 0x18F5).addRange(0x1900, 0x191E).addRange(0x1950, 0x196D).addRange(0x1970, 0x1974).addRange(0x1980, 0x19AB).addRange(0x19B0, 0x19C9).addRange(0x1A00, 0x1A16).addRange(0x1A20, 0x1A54).addRange(0x1B05, 0x1B33).addRange(0x1B45, 0x1B4C).addRange(0x1B83, 0x1BA0).addRange(0x1BAE, 0x1BAF).addRange(0x1BBA, 0x1BE5).addRange(0x1C00, 0x1C23).addRange(0x1C4D, 0x1C4F).addRange(0x1C5A, 0x1C7D).addRange(0x1C80, 0x1C88).addRange(0x1C90, 0x1CBA).addRange(0x1CBD, 0x1CBF).addRange(0x1CE9, 0x1CEC).addRange(0x1CEE, 0x1CF3).addRange(0x1CF5, 0x1CF6).addRange(0x1D00, 0x1DBF).addRange(0x1E00, 0x1F15).addRange(0x1F18, 0x1F1D).addRange(0x1F20, 0x1F45).addRange(0x1F48, 0x1F4D).addRange(0x1F50, 0x1F57).addRange(0x1F5F, 0x1F7D).addRange(0x1F80, 0x1FB4).addRange(0x1FB6, 0x1FBC).addRange(0x1FC2, 0x1FC4).addRange(0x1FC6, 0x1FCC).addRange(0x1FD0, 0x1FD3).addRange(0x1FD6, 0x1FDB).addRange(0x1FE0, 0x1FEC).addRange(0x1FF2, 0x1FF4).addRange(0x1FF6, 0x1FFC).addRange(0x2090, 0x209C).addRange(0x210A, 0x2113).addRange(0x2118, 0x211D).addRange(0x212A, 0x2139).addRange(0x213C, 0x213F).addRange(0x2145, 0x2149).addRange(0x2160, 0x2188).addRange(0x2C00, 0x2CE4).addRange(0x2CEB, 0x2CEE).addRange(0x2CF2, 0x2CF3).addRange(0x2D00, 0x2D25).addRange(0x2D30, 0x2D67).addRange(0x2D80, 0x2D96);\nset.addRange(0x2DA0, 0x2DA6).addRange(0x2DA8, 0x2DAE).addRange(0x2DB0, 0x2DB6).addRange(0x2DB8, 0x2DBE).addRange(0x2DC0, 0x2DC6).addRange(0x2DC8, 0x2DCE).addRange(0x2DD0, 0x2DD6).addRange(0x2DD8, 0x2DDE).addRange(0x3005, 0x3007).addRange(0x3021, 0x3029).addRange(0x3031, 0x3035).addRange(0x3038, 0x303C).addRange(0x3041, 0x3096).addRange(0x309B, 0x309F).addRange(0x30A1, 0x30FA).addRange(0x30FC, 0x30FF).addRange(0x3105, 0x312F).addRange(0x3131, 0x318E).addRange(0x31A0, 0x31BF).addRange(0x31F0, 0x31FF).addRange(0x3400, 0x4DBF).addRange(0x4E00, 0xA48C).addRange(0xA4D0, 0xA4FD).addRange(0xA500, 0xA60C).addRange(0xA610, 0xA61F).addRange(0xA62A, 0xA62B).addRange(0xA640, 0xA66E).addRange(0xA67F, 0xA69D).addRange(0xA6A0, 0xA6EF).addRange(0xA717, 0xA71F).addRange(0xA722, 0xA788).addRange(0xA78B, 0xA7CA).addRange(0xA7D0, 0xA7D1).addRange(0xA7D5, 0xA7D9).addRange(0xA7F2, 0xA801).addRange(0xA803, 0xA805).addRange(0xA807, 0xA80A).addRange(0xA80C, 0xA822).addRange(0xA840, 0xA873).addRange(0xA882, 0xA8B3).addRange(0xA8F2, 0xA8F7).addRange(0xA8FD, 0xA8FE).addRange(0xA90A, 0xA925).addRange(0xA930, 0xA946).addRange(0xA960, 0xA97C).addRange(0xA984, 0xA9B2).addRange(0xA9E0, 0xA9E4).addRange(0xA9E6, 0xA9EF).addRange(0xA9FA, 0xA9FE).addRange(0xAA00, 0xAA28).addRange(0xAA40, 0xAA42);\nset.addRange(0xAA44, 0xAA4B).addRange(0xAA60, 0xAA76).addRange(0xAA7E, 0xAAAF).addRange(0xAAB5, 0xAAB6).addRange(0xAAB9, 0xAABD).addRange(0xAADB, 0xAADD).addRange(0xAAE0, 0xAAEA).addRange(0xAAF2, 0xAAF4).addRange(0xAB01, 0xAB06).addRange(0xAB09, 0xAB0E).addRange(0xAB11, 0xAB16).addRange(0xAB20, 0xAB26).addRange(0xAB28, 0xAB2E).addRange(0xAB30, 0xAB5A).addRange(0xAB5C, 0xAB69).addRange(0xAB70, 0xABE2).addRange(0xAC00, 0xD7A3).addRange(0xD7B0, 0xD7C6).addRange(0xD7CB, 0xD7FB).addRange(0xF900, 0xFA6D).addRange(0xFA70, 0xFAD9).addRange(0xFB00, 0xFB06).addRange(0xFB13, 0xFB17).addRange(0xFB1F, 0xFB28).addRange(0xFB2A, 0xFB36).addRange(0xFB38, 0xFB3C).addRange(0xFB40, 0xFB41).addRange(0xFB43, 0xFB44).addRange(0xFB46, 0xFBB1).addRange(0xFBD3, 0xFD3D).addRange(0xFD50, 0xFD8F).addRange(0xFD92, 0xFDC7).addRange(0xFDF0, 0xFDFB).addRange(0xFE70, 0xFE74).addRange(0xFE76, 0xFEFC).addRange(0xFF21, 0xFF3A).addRange(0xFF41, 0xFF5A).addRange(0xFF66, 0xFFBE).addRange(0xFFC2, 0xFFC7).addRange(0xFFCA, 0xFFCF).addRange(0xFFD2, 0xFFD7).addRange(0xFFDA, 0xFFDC).addRange(0x10000, 0x1000B).addRange(0x1000D, 0x10026).addRange(0x10028, 0x1003A).addRange(0x1003C, 0x1003D).addRange(0x1003F, 0x1004D).addRange(0x10050, 0x1005D).addRange(0x10080, 0x100FA).addRange(0x10140, 0x10174).addRange(0x10280, 0x1029C);\nset.addRange(0x102A0, 0x102D0).addRange(0x10300, 0x1031F).addRange(0x1032D, 0x1034A).addRange(0x10350, 0x10375).addRange(0x10380, 0x1039D).addRange(0x103A0, 0x103C3).addRange(0x103C8, 0x103CF).addRange(0x103D1, 0x103D5).addRange(0x10400, 0x1049D).addRange(0x104B0, 0x104D3).addRange(0x104D8, 0x104FB).addRange(0x10500, 0x10527).addRange(0x10530, 0x10563).addRange(0x10570, 0x1057A).addRange(0x1057C, 0x1058A).addRange(0x1058C, 0x10592).addRange(0x10594, 0x10595).addRange(0x10597, 0x105A1).addRange(0x105A3, 0x105B1).addRange(0x105B3, 0x105B9).addRange(0x105BB, 0x105BC).addRange(0x10600, 0x10736).addRange(0x10740, 0x10755).addRange(0x10760, 0x10767).addRange(0x10780, 0x10785).addRange(0x10787, 0x107B0).addRange(0x107B2, 0x107BA).addRange(0x10800, 0x10805).addRange(0x1080A, 0x10835).addRange(0x10837, 0x10838).addRange(0x1083F, 0x10855).addRange(0x10860, 0x10876).addRange(0x10880, 0x1089E).addRange(0x108E0, 0x108F2).addRange(0x108F4, 0x108F5).addRange(0x10900, 0x10915).addRange(0x10920, 0x10939).addRange(0x10980, 0x109B7).addRange(0x109BE, 0x109BF).addRange(0x10A10, 0x10A13).addRange(0x10A15, 0x10A17).addRange(0x10A19, 0x10A35).addRange(0x10A60, 0x10A7C).addRange(0x10A80, 0x10A9C).addRange(0x10AC0, 0x10AC7).addRange(0x10AC9, 0x10AE4).addRange(0x10B00, 0x10B35).addRange(0x10B40, 0x10B55).addRange(0x10B60, 0x10B72).addRange(0x10B80, 0x10B91).addRange(0x10C00, 0x10C48);\nset.addRange(0x10C80, 0x10CB2).addRange(0x10CC0, 0x10CF2).addRange(0x10D00, 0x10D23).addRange(0x10E80, 0x10EA9).addRange(0x10EB0, 0x10EB1).addRange(0x10F00, 0x10F1C).addRange(0x10F30, 0x10F45).addRange(0x10F70, 0x10F81).addRange(0x10FB0, 0x10FC4).addRange(0x10FE0, 0x10FF6).addRange(0x11003, 0x11037).addRange(0x11071, 0x11072).addRange(0x11083, 0x110AF).addRange(0x110D0, 0x110E8).addRange(0x11103, 0x11126).addRange(0x11150, 0x11172).addRange(0x11183, 0x111B2).addRange(0x111C1, 0x111C4).addRange(0x11200, 0x11211).addRange(0x11213, 0x1122B).addRange(0x1123F, 0x11240).addRange(0x11280, 0x11286).addRange(0x1128A, 0x1128D).addRange(0x1128F, 0x1129D).addRange(0x1129F, 0x112A8).addRange(0x112B0, 0x112DE).addRange(0x11305, 0x1130C).addRange(0x1130F, 0x11310).addRange(0x11313, 0x11328).addRange(0x1132A, 0x11330).addRange(0x11332, 0x11333).addRange(0x11335, 0x11339).addRange(0x1135D, 0x11361).addRange(0x11400, 0x11434).addRange(0x11447, 0x1144A).addRange(0x1145F, 0x11461).addRange(0x11480, 0x114AF).addRange(0x114C4, 0x114C5).addRange(0x11580, 0x115AE).addRange(0x115D8, 0x115DB).addRange(0x11600, 0x1162F).addRange(0x11680, 0x116AA).addRange(0x11700, 0x1171A).addRange(0x11740, 0x11746).addRange(0x11800, 0x1182B).addRange(0x118A0, 0x118DF).addRange(0x118FF, 0x11906).addRange(0x1190C, 0x11913).addRange(0x11915, 0x11916).addRange(0x11918, 0x1192F).addRange(0x119A0, 0x119A7);\nset.addRange(0x119AA, 0x119D0).addRange(0x11A0B, 0x11A32).addRange(0x11A5C, 0x11A89).addRange(0x11AB0, 0x11AF8).addRange(0x11C00, 0x11C08).addRange(0x11C0A, 0x11C2E).addRange(0x11C72, 0x11C8F).addRange(0x11D00, 0x11D06).addRange(0x11D08, 0x11D09).addRange(0x11D0B, 0x11D30).addRange(0x11D60, 0x11D65).addRange(0x11D67, 0x11D68).addRange(0x11D6A, 0x11D89).addRange(0x11EE0, 0x11EF2).addRange(0x11F04, 0x11F10).addRange(0x11F12, 0x11F33).addRange(0x12000, 0x12399).addRange(0x12400, 0x1246E).addRange(0x12480, 0x12543).addRange(0x12F90, 0x12FF0).addRange(0x13000, 0x1342F).addRange(0x13441, 0x13446).addRange(0x14400, 0x14646).addRange(0x16800, 0x16A38).addRange(0x16A40, 0x16A5E).addRange(0x16A70, 0x16ABE).addRange(0x16AD0, 0x16AED).addRange(0x16B00, 0x16B2F).addRange(0x16B40, 0x16B43).addRange(0x16B63, 0x16B77).addRange(0x16B7D, 0x16B8F).addRange(0x16E40, 0x16E7F).addRange(0x16F00, 0x16F4A).addRange(0x16F93, 0x16F9F).addRange(0x16FE0, 0x16FE1).addRange(0x17000, 0x187F7).addRange(0x18800, 0x18CD5).addRange(0x18D00, 0x18D08).addRange(0x1AFF0, 0x1AFF3).addRange(0x1AFF5, 0x1AFFB).addRange(0x1AFFD, 0x1AFFE).addRange(0x1B000, 0x1B122).addRange(0x1B150, 0x1B152).addRange(0x1B164, 0x1B167).addRange(0x1B170, 0x1B2FB).addRange(0x1BC00, 0x1BC6A).addRange(0x1BC70, 0x1BC7C).addRange(0x1BC80, 0x1BC88).addRange(0x1BC90, 0x1BC99).addRange(0x1D400, 0x1D454).addRange(0x1D456, 0x1D49C);\nset.addRange(0x1D49E, 0x1D49F).addRange(0x1D4A5, 0x1D4A6).addRange(0x1D4A9, 0x1D4AC).addRange(0x1D4AE, 0x1D4B9).addRange(0x1D4BD, 0x1D4C3).addRange(0x1D4C5, 0x1D505).addRange(0x1D507, 0x1D50A).addRange(0x1D50D, 0x1D514).addRange(0x1D516, 0x1D51C).addRange(0x1D51E, 0x1D539).addRange(0x1D53B, 0x1D53E).addRange(0x1D540, 0x1D544).addRange(0x1D54A, 0x1D550).addRange(0x1D552, 0x1D6A5).addRange(0x1D6A8, 0x1D6C0).addRange(0x1D6C2, 0x1D6DA).addRange(0x1D6DC, 0x1D6FA).addRange(0x1D6FC, 0x1D714).addRange(0x1D716, 0x1D734).addRange(0x1D736, 0x1D74E).addRange(0x1D750, 0x1D76E).addRange(0x1D770, 0x1D788).addRange(0x1D78A, 0x1D7A8).addRange(0x1D7AA, 0x1D7C2).addRange(0x1D7C4, 0x1D7CB).addRange(0x1DF00, 0x1DF1E).addRange(0x1DF25, 0x1DF2A).addRange(0x1E030, 0x1E06D).addRange(0x1E100, 0x1E12C).addRange(0x1E137, 0x1E13D).addRange(0x1E290, 0x1E2AD).addRange(0x1E2C0, 0x1E2EB).addRange(0x1E4D0, 0x1E4EB).addRange(0x1E7E0, 0x1E7E6).addRange(0x1E7E8, 0x1E7EB).addRange(0x1E7ED, 0x1E7EE).addRange(0x1E7F0, 0x1E7FE).addRange(0x1E800, 0x1E8C4).addRange(0x1E900, 0x1E943).addRange(0x1EE00, 0x1EE03).addRange(0x1EE05, 0x1EE1F).addRange(0x1EE21, 0x1EE22).addRange(0x1EE29, 0x1EE32).addRange(0x1EE34, 0x1EE37).addRange(0x1EE4D, 0x1EE4F).addRange(0x1EE51, 0x1EE52).addRange(0x1EE61, 0x1EE62).addRange(0x1EE67, 0x1EE6A).addRange(0x1EE6C, 0x1EE72).addRange(0x1EE74, 0x1EE77).addRange(0x1EE79, 0x1EE7C);\nset.addRange(0x1EE80, 0x1EE89).addRange(0x1EE8B, 0x1EE9B).addRange(0x1EEA1, 0x1EEA3).addRange(0x1EEA5, 0x1EEA9).addRange(0x1EEAB, 0x1EEBB).addRange(0x20000, 0x2A6DF).addRange(0x2A700, 0x2B739).addRange(0x2B740, 0x2B81D).addRange(0x2B820, 0x2CEA1).addRange(0x2CEB0, 0x2EBE0).addRange(0x2EBF0, 0x2EE5D).addRange(0x2F800, 0x2FA1D).addRange(0x30000, 0x3134A).addRange(0x31350, 0x323AF);\nexports.characters = set;\n","const set = require('regenerate')(0x16FE4);\nset.addRange(0x3006, 0x3007).addRange(0x3021, 0x3029).addRange(0x3038, 0x303A).addRange(0x3400, 0x4DBF).addRange(0x4E00, 0x9FFF).addRange(0xF900, 0xFA6D).addRange(0xFA70, 0xFAD9).addRange(0x17000, 0x187F7).addRange(0x18800, 0x18CD5).addRange(0x18D00, 0x18D08).addRange(0x1B170, 0x1B2FB).addRange(0x20000, 0x2A6DF).addRange(0x2A700, 0x2B739).addRange(0x2B740, 0x2B81D).addRange(0x2B820, 0x2CEA1).addRange(0x2CEB0, 0x2EBE0).addRange(0x2EBF0, 0x2EE5D).addRange(0x2F800, 0x2FA1D).addRange(0x30000, 0x3134A).addRange(0x31350, 0x323AF);\nexports.characters = set;\n","const set = require('regenerate')(0x31EF);\nset.addRange(0x2FF0, 0x2FF1).addRange(0x2FF4, 0x2FFD);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x2FF2, 0x2FF3);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x200C, 0x200D);\nexports.characters = set;\n","const set = require('regenerate')(0x19BA, 0xAAB9);\nset.addRange(0xE40, 0xE44).addRange(0xEC0, 0xEC4).addRange(0x19B5, 0x19B7).addRange(0xAAB5, 0xAAB6).addRange(0xAABB, 0xAABC);\nexports.characters = set;\n","const set = require('regenerate')(0xAA, 0xB5, 0xBA, 0x101, 0x103, 0x105, 0x107, 0x109, 0x10B, 0x10D, 0x10F, 0x111, 0x113, 0x115, 0x117, 0x119, 0x11B, 0x11D, 0x11F, 0x121, 0x123, 0x125, 0x127, 0x129, 0x12B, 0x12D, 0x12F, 0x131, 0x133, 0x135, 0x13A, 0x13C, 0x13E, 0x140, 0x142, 0x144, 0x146, 0x14B, 0x14D, 0x14F, 0x151, 0x153, 0x155, 0x157, 0x159, 0x15B, 0x15D, 0x15F, 0x161, 0x163, 0x165, 0x167, 0x169, 0x16B, 0x16D, 0x16F, 0x171, 0x173, 0x175, 0x177, 0x17A, 0x17C, 0x183, 0x185, 0x188, 0x192, 0x195, 0x19E, 0x1A1, 0x1A3, 0x1A5, 0x1A8, 0x1AD, 0x1B0, 0x1B4, 0x1B6, 0x1C6, 0x1C9, 0x1CC, 0x1CE, 0x1D0, 0x1D2, 0x1D4, 0x1D6, 0x1D8, 0x1DA, 0x1DF, 0x1E1, 0x1E3, 0x1E5, 0x1E7, 0x1E9, 0x1EB, 0x1ED, 0x1F3, 0x1F5, 0x1F9, 0x1FB, 0x1FD, 0x1FF, 0x201, 0x203, 0x205, 0x207, 0x209, 0x20B, 0x20D, 0x20F, 0x211, 0x213, 0x215, 0x217, 0x219, 0x21B, 0x21D, 0x21F, 0x221, 0x223, 0x225, 0x227, 0x229, 0x22B, 0x22D, 0x22F, 0x231, 0x23C, 0x242, 0x247, 0x249, 0x24B, 0x24D, 0x345, 0x371, 0x373, 0x377, 0x390, 0x3D9, 0x3DB, 0x3DD, 0x3DF, 0x3E1, 0x3E3, 0x3E5, 0x3E7, 0x3E9, 0x3EB, 0x3ED, 0x3F5, 0x3F8, 0x461, 0x463, 0x465, 0x467, 0x469, 0x46B, 0x46D, 0x46F, 0x471, 0x473, 0x475, 0x477, 0x479, 0x47B, 0x47D, 0x47F, 0x481, 0x48B, 0x48D, 0x48F, 0x491, 0x493, 0x495, 0x497, 0x499, 0x49B, 0x49D, 0x49F, 0x4A1, 0x4A3, 0x4A5, 0x4A7, 0x4A9, 0x4AB, 0x4AD, 0x4AF, 0x4B1, 0x4B3, 0x4B5, 0x4B7, 0x4B9, 0x4BB, 0x4BD, 0x4BF, 0x4C2, 0x4C4, 0x4C6, 0x4C8, 0x4CA, 0x4CC, 0x4D1, 0x4D3, 0x4D5, 0x4D7, 0x4D9, 0x4DB, 0x4DD, 0x4DF, 0x4E1, 0x4E3, 0x4E5, 0x4E7, 0x4E9, 0x4EB, 0x4ED, 0x4EF, 0x4F1, 0x4F3, 0x4F5, 0x4F7, 0x4F9, 0x4FB, 0x4FD, 0x4FF, 0x501, 0x503, 0x505, 0x507, 0x509, 0x50B, 0x50D, 0x50F, 0x511, 0x513, 0x515, 0x517, 0x519, 0x51B, 0x51D, 0x51F, 0x521, 0x523, 0x525, 0x527, 0x529, 0x52B, 0x52D, 0x52F, 0x1E01, 0x1E03, 0x1E05, 0x1E07, 0x1E09, 0x1E0B, 0x1E0D, 0x1E0F, 0x1E11, 0x1E13, 0x1E15, 0x1E17, 0x1E19, 0x1E1B, 0x1E1D, 0x1E1F, 0x1E21, 0x1E23, 0x1E25, 0x1E27, 0x1E29, 0x1E2B, 0x1E2D, 0x1E2F, 0x1E31, 0x1E33, 0x1E35, 0x1E37, 0x1E39, 0x1E3B, 0x1E3D, 0x1E3F, 0x1E41, 0x1E43, 0x1E45, 0x1E47, 0x1E49, 0x1E4B, 0x1E4D, 0x1E4F, 0x1E51, 0x1E53, 0x1E55, 0x1E57, 0x1E59, 0x1E5B, 0x1E5D, 0x1E5F, 0x1E61, 0x1E63, 0x1E65, 0x1E67, 0x1E69, 0x1E6B, 0x1E6D, 0x1E6F, 0x1E71, 0x1E73, 0x1E75, 0x1E77, 0x1E79, 0x1E7B, 0x1E7D, 0x1E7F, 0x1E81, 0x1E83, 0x1E85, 0x1E87, 0x1E89, 0x1E8B, 0x1E8D, 0x1E8F, 0x1E91, 0x1E93, 0x1E9F, 0x1EA1, 0x1EA3, 0x1EA5, 0x1EA7, 0x1EA9, 0x1EAB, 0x1EAD, 0x1EAF, 0x1EB1, 0x1EB3, 0x1EB5, 0x1EB7, 0x1EB9, 0x1EBB, 0x1EBD, 0x1EBF, 0x1EC1, 0x1EC3, 0x1EC5, 0x1EC7, 0x1EC9, 0x1ECB, 0x1ECD, 0x1ECF, 0x1ED1, 0x1ED3, 0x1ED5, 0x1ED7, 0x1ED9, 0x1EDB, 0x1EDD, 0x1EDF, 0x1EE1, 0x1EE3, 0x1EE5, 0x1EE7, 0x1EE9, 0x1EEB, 0x1EED, 0x1EEF, 0x1EF1, 0x1EF3, 0x1EF5, 0x1EF7, 0x1EF9, 0x1EFB, 0x1EFD, 0x1FBE, 0x2071, 0x207F, 0x210A, 0x2113, 0x212F, 0x2134, 0x2139, 0x214E, 0x2184, 0x2C61, 0x2C68, 0x2C6A, 0x2C6C, 0x2C71, 0x2C81, 0x2C83, 0x2C85, 0x2C87, 0x2C89, 0x2C8B, 0x2C8D, 0x2C8F, 0x2C91, 0x2C93, 0x2C95, 0x2C97, 0x2C99, 0x2C9B, 0x2C9D, 0x2C9F, 0x2CA1, 0x2CA3, 0x2CA5, 0x2CA7, 0x2CA9, 0x2CAB, 0x2CAD, 0x2CAF, 0x2CB1, 0x2CB3, 0x2CB5, 0x2CB7, 0x2CB9, 0x2CBB, 0x2CBD, 0x2CBF, 0x2CC1, 0x2CC3, 0x2CC5, 0x2CC7, 0x2CC9, 0x2CCB, 0x2CCD, 0x2CCF, 0x2CD1, 0x2CD3, 0x2CD5, 0x2CD7, 0x2CD9, 0x2CDB, 0x2CDD, 0x2CDF, 0x2CE1, 0x2CEC, 0x2CEE, 0x2CF3, 0x2D27, 0x2D2D, 0xA641, 0xA643, 0xA645, 0xA647, 0xA649, 0xA64B, 0xA64D, 0xA64F, 0xA651, 0xA653, 0xA655, 0xA657, 0xA659, 0xA65B, 0xA65D, 0xA65F, 0xA661, 0xA663, 0xA665, 0xA667, 0xA669, 0xA66B, 0xA66D, 0xA681, 0xA683, 0xA685, 0xA687, 0xA689, 0xA68B, 0xA68D, 0xA68F, 0xA691, 0xA693, 0xA695, 0xA697, 0xA699, 0xA723, 0xA725, 0xA727, 0xA729, 0xA72B, 0xA72D, 0xA733, 0xA735, 0xA737, 0xA739, 0xA73B, 0xA73D, 0xA73F, 0xA741, 0xA743, 0xA745, 0xA747, 0xA749, 0xA74B, 0xA74D, 0xA74F, 0xA751, 0xA753, 0xA755, 0xA757, 0xA759, 0xA75B, 0xA75D, 0xA75F, 0xA761, 0xA763, 0xA765, 0xA767, 0xA769, 0xA76B, 0xA76D, 0xA77A, 0xA77C, 0xA77F, 0xA781, 0xA783, 0xA785, 0xA787, 0xA78C, 0xA78E, 0xA791, 0xA797, 0xA799, 0xA79B, 0xA79D, 0xA79F, 0xA7A1, 0xA7A3, 0xA7A5, 0xA7A7, 0xA7A9, 0xA7AF, 0xA7B5, 0xA7B7, 0xA7B9, 0xA7BB, 0xA7BD, 0xA7BF, 0xA7C1, 0xA7C3, 0xA7C8, 0xA7CA, 0xA7D1, 0xA7D3, 0xA7D5, 0xA7D7, 0xA7D9, 0xA7F6, 0x10780, 0x1D4BB, 0x1D7CB);\nset.addRange(0x61, 0x7A).addRange(0xDF, 0xF6).addRange(0xF8, 0xFF).addRange(0x137, 0x138).addRange(0x148, 0x149).addRange(0x17E, 0x180).addRange(0x18C, 0x18D).addRange(0x199, 0x19B).addRange(0x1AA, 0x1AB).addRange(0x1B9, 0x1BA).addRange(0x1BD, 0x1BF).addRange(0x1DC, 0x1DD).addRange(0x1EF, 0x1F0).addRange(0x233, 0x239).addRange(0x23F, 0x240).addRange(0x24F, 0x293).addRange(0x295, 0x2B8).addRange(0x2C0, 0x2C1).addRange(0x2E0, 0x2E4).addRange(0x37A, 0x37D).addRange(0x3AC, 0x3CE).addRange(0x3D0, 0x3D1).addRange(0x3D5, 0x3D7).addRange(0x3EF, 0x3F3).addRange(0x3FB, 0x3FC).addRange(0x430, 0x45F).addRange(0x4CE, 0x4CF).addRange(0x560, 0x588).addRange(0x10D0, 0x10FA).addRange(0x10FC, 0x10FF).addRange(0x13F8, 0x13FD).addRange(0x1C80, 0x1C88).addRange(0x1D00, 0x1DBF).addRange(0x1E95, 0x1E9D).addRange(0x1EFF, 0x1F07).addRange(0x1F10, 0x1F15).addRange(0x1F20, 0x1F27).addRange(0x1F30, 0x1F37).addRange(0x1F40, 0x1F45).addRange(0x1F50, 0x1F57).addRange(0x1F60, 0x1F67).addRange(0x1F70, 0x1F7D).addRange(0x1F80, 0x1F87).addRange(0x1F90, 0x1F97).addRange(0x1FA0, 0x1FA7).addRange(0x1FB0, 0x1FB4).addRange(0x1FB6, 0x1FB7).addRange(0x1FC2, 0x1FC4).addRange(0x1FC6, 0x1FC7).addRange(0x1FD0, 0x1FD3).addRange(0x1FD6, 0x1FD7);\nset.addRange(0x1FE0, 0x1FE7).addRange(0x1FF2, 0x1FF4).addRange(0x1FF6, 0x1FF7).addRange(0x2090, 0x209C).addRange(0x210E, 0x210F).addRange(0x213C, 0x213D).addRange(0x2146, 0x2149).addRange(0x2170, 0x217F).addRange(0x24D0, 0x24E9).addRange(0x2C30, 0x2C5F).addRange(0x2C65, 0x2C66).addRange(0x2C73, 0x2C74).addRange(0x2C76, 0x2C7D).addRange(0x2CE3, 0x2CE4).addRange(0x2D00, 0x2D25).addRange(0xA69B, 0xA69D).addRange(0xA72F, 0xA731).addRange(0xA76F, 0xA778).addRange(0xA793, 0xA795).addRange(0xA7F2, 0xA7F4).addRange(0xA7F8, 0xA7FA).addRange(0xAB30, 0xAB5A).addRange(0xAB5C, 0xAB69).addRange(0xAB70, 0xABBF).addRange(0xFB00, 0xFB06).addRange(0xFB13, 0xFB17).addRange(0xFF41, 0xFF5A).addRange(0x10428, 0x1044F).addRange(0x104D8, 0x104FB).addRange(0x10597, 0x105A1).addRange(0x105A3, 0x105B1).addRange(0x105B3, 0x105B9).addRange(0x105BB, 0x105BC).addRange(0x10783, 0x10785).addRange(0x10787, 0x107B0).addRange(0x107B2, 0x107BA).addRange(0x10CC0, 0x10CF2).addRange(0x118C0, 0x118DF).addRange(0x16E60, 0x16E7F).addRange(0x1D41A, 0x1D433).addRange(0x1D44E, 0x1D454).addRange(0x1D456, 0x1D467).addRange(0x1D482, 0x1D49B).addRange(0x1D4B6, 0x1D4B9).addRange(0x1D4BD, 0x1D4C3).addRange(0x1D4C5, 0x1D4CF).addRange(0x1D4EA, 0x1D503).addRange(0x1D51E, 0x1D537).addRange(0x1D552, 0x1D56B).addRange(0x1D586, 0x1D59F).addRange(0x1D5BA, 0x1D5D3);\nset.addRange(0x1D5EE, 0x1D607).addRange(0x1D622, 0x1D63B).addRange(0x1D656, 0x1D66F).addRange(0x1D68A, 0x1D6A5).addRange(0x1D6C2, 0x1D6DA).addRange(0x1D6DC, 0x1D6E1).addRange(0x1D6FC, 0x1D714).addRange(0x1D716, 0x1D71B).addRange(0x1D736, 0x1D74E).addRange(0x1D750, 0x1D755).addRange(0x1D770, 0x1D788).addRange(0x1D78A, 0x1D78F).addRange(0x1D7AA, 0x1D7C2).addRange(0x1D7C4, 0x1D7C9).addRange(0x1DF00, 0x1DF09).addRange(0x1DF0B, 0x1DF1E).addRange(0x1DF25, 0x1DF2A).addRange(0x1E030, 0x1E06D).addRange(0x1E922, 0x1E943);\nexports.characters = set;\n","const set = require('regenerate')(0x2B, 0x5E, 0x7C, 0x7E, 0xAC, 0xB1, 0xD7, 0xF7, 0x3D5, 0x2016, 0x2040, 0x2044, 0x2052, 0x20E1, 0x2102, 0x2107, 0x2115, 0x2124, 0x214B, 0x21DD, 0x237C, 0x23B7, 0x23D0, 0x25E2, 0x25E4, 0x2640, 0x2642, 0xFB29, 0xFE68, 0xFF0B, 0xFF3C, 0xFF3E, 0xFF5C, 0xFF5E, 0xFFE2, 0x1D4A2, 0x1D4BB, 0x1D546, 0x1EE24, 0x1EE27, 0x1EE39, 0x1EE3B, 0x1EE42, 0x1EE47, 0x1EE49, 0x1EE4B, 0x1EE54, 0x1EE57, 0x1EE59, 0x1EE5B, 0x1EE5D, 0x1EE5F, 0x1EE64, 0x1EE7E);\nset.addRange(0x3C, 0x3E).addRange(0x3D0, 0x3D2).addRange(0x3F0, 0x3F1).addRange(0x3F4, 0x3F6).addRange(0x606, 0x608).addRange(0x2032, 0x2034).addRange(0x2061, 0x2064).addRange(0x207A, 0x207E).addRange(0x208A, 0x208E).addRange(0x20D0, 0x20DC).addRange(0x20E5, 0x20E6).addRange(0x20EB, 0x20EF).addRange(0x210A, 0x2113).addRange(0x2118, 0x211D).addRange(0x2128, 0x2129).addRange(0x212C, 0x212D).addRange(0x212F, 0x2131).addRange(0x2133, 0x2138).addRange(0x213C, 0x2149).addRange(0x2190, 0x21A7).addRange(0x21A9, 0x21AE).addRange(0x21B0, 0x21B1).addRange(0x21B6, 0x21B7).addRange(0x21BC, 0x21DB).addRange(0x21E4, 0x21E5).addRange(0x21F4, 0x22FF).addRange(0x2308, 0x230B).addRange(0x2320, 0x2321).addRange(0x239B, 0x23B5).addRange(0x23DC, 0x23E2).addRange(0x25A0, 0x25A1).addRange(0x25AE, 0x25B7).addRange(0x25BC, 0x25C1).addRange(0x25C6, 0x25C7).addRange(0x25CA, 0x25CB).addRange(0x25CF, 0x25D3).addRange(0x25E7, 0x25EC).addRange(0x25F8, 0x25FF).addRange(0x2605, 0x2606).addRange(0x2660, 0x2663).addRange(0x266D, 0x266F).addRange(0x27C0, 0x27FF).addRange(0x2900, 0x2AFF).addRange(0x2B30, 0x2B44).addRange(0x2B47, 0x2B4C).addRange(0xFE61, 0xFE66).addRange(0xFF1C, 0xFF1E).addRange(0xFFE9, 0xFFEC).addRange(0x1D400, 0x1D454).addRange(0x1D456, 0x1D49C).addRange(0x1D49E, 0x1D49F);\nset.addRange(0x1D4A5, 0x1D4A6).addRange(0x1D4A9, 0x1D4AC).addRange(0x1D4AE, 0x1D4B9).addRange(0x1D4BD, 0x1D4C3).addRange(0x1D4C5, 0x1D505).addRange(0x1D507, 0x1D50A).addRange(0x1D50D, 0x1D514).addRange(0x1D516, 0x1D51C).addRange(0x1D51E, 0x1D539).addRange(0x1D53B, 0x1D53E).addRange(0x1D540, 0x1D544).addRange(0x1D54A, 0x1D550).addRange(0x1D552, 0x1D6A5).addRange(0x1D6A8, 0x1D7CB).addRange(0x1D7CE, 0x1D7FF).addRange(0x1EE00, 0x1EE03).addRange(0x1EE05, 0x1EE1F).addRange(0x1EE21, 0x1EE22).addRange(0x1EE29, 0x1EE32).addRange(0x1EE34, 0x1EE37).addRange(0x1EE4D, 0x1EE4F).addRange(0x1EE51, 0x1EE52).addRange(0x1EE61, 0x1EE62).addRange(0x1EE67, 0x1EE6A).addRange(0x1EE6C, 0x1EE72).addRange(0x1EE74, 0x1EE77).addRange(0x1EE79, 0x1EE7C).addRange(0x1EE80, 0x1EE89).addRange(0x1EE8B, 0x1EE9B).addRange(0x1EEA1, 0x1EEA3).addRange(0x1EEA5, 0x1EEA9).addRange(0x1EEAB, 0x1EEBB).addRange(0x1EEF0, 0x1EEF1);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0xFDD0, 0xFDEF).addRange(0xFFFE, 0xFFFF).addRange(0x1FFFE, 0x1FFFF).addRange(0x2FFFE, 0x2FFFF).addRange(0x3FFFE, 0x3FFFF).addRange(0x4FFFE, 0x4FFFF).addRange(0x5FFFE, 0x5FFFF).addRange(0x6FFFE, 0x6FFFF).addRange(0x7FFFE, 0x7FFFF).addRange(0x8FFFE, 0x8FFFF).addRange(0x9FFFE, 0x9FFFF).addRange(0xAFFFE, 0xAFFFF).addRange(0xBFFFE, 0xBFFFF).addRange(0xCFFFE, 0xCFFFF).addRange(0xDFFFE, 0xDFFFF).addRange(0xEFFFE, 0xEFFFF).addRange(0xFFFFE, 0xFFFFF).addRange(0x10FFFE, 0x10FFFF);\nexports.characters = set;\n","const set = require('regenerate')(0x60, 0xA9, 0xAE, 0xB6, 0xBB, 0xBF, 0xD7, 0xF7, 0x3030);\nset.addRange(0x21, 0x2F).addRange(0x3A, 0x40).addRange(0x5B, 0x5E).addRange(0x7B, 0x7E).addRange(0xA1, 0xA7).addRange(0xAB, 0xAC).addRange(0xB0, 0xB1).addRange(0x2010, 0x2027).addRange(0x2030, 0x203E).addRange(0x2041, 0x2053).addRange(0x2055, 0x205E).addRange(0x2190, 0x245F).addRange(0x2500, 0x2775).addRange(0x2794, 0x2BFF).addRange(0x2E00, 0x2E7F).addRange(0x3001, 0x3003).addRange(0x3008, 0x3020).addRange(0xFD3E, 0xFD3F).addRange(0xFE45, 0xFE46);\nexports.characters = set;\n","const set = require('regenerate')(0x20, 0x85);\nset.addRange(0x9, 0xD).addRange(0x200E, 0x200F).addRange(0x2028, 0x2029);\nexports.characters = set;\n","const set = require('regenerate')(0x22, 0x27, 0xAB, 0xBB, 0x2E42, 0xFF02, 0xFF07);\nset.addRange(0x2018, 0x201F).addRange(0x2039, 0x203A).addRange(0x300C, 0x300F).addRange(0x301D, 0x301F).addRange(0xFE41, 0xFE44).addRange(0xFF62, 0xFF63);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x2E80, 0x2E99).addRange(0x2E9B, 0x2EF3).addRange(0x2F00, 0x2FD5);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x1F1E6, 0x1F1FF);\nexports.characters = set;\n","const set = require('regenerate')(0x21, 0x2E, 0x3F, 0x589, 0x6D4, 0x7F9, 0x837, 0x839, 0x1362, 0x166E, 0x1803, 0x1809, 0x2E2E, 0x2E3C, 0x3002, 0xA4FF, 0xA6F3, 0xA6F7, 0xA92F, 0xABEB, 0xFE52, 0xFF01, 0xFF0E, 0xFF1F, 0xFF61, 0x111CD, 0x112A9, 0x11944, 0x11946, 0x16AF5, 0x16B44, 0x16E98, 0x1BC9F, 0x1DA88);\nset.addRange(0x61D, 0x61F).addRange(0x700, 0x702).addRange(0x83D, 0x83E).addRange(0x964, 0x965).addRange(0x104A, 0x104B).addRange(0x1367, 0x1368).addRange(0x1735, 0x1736).addRange(0x17D4, 0x17D5).addRange(0x1944, 0x1945).addRange(0x1AA8, 0x1AAB).addRange(0x1B5A, 0x1B5B).addRange(0x1B5E, 0x1B5F).addRange(0x1B7D, 0x1B7E).addRange(0x1C3B, 0x1C3C).addRange(0x1C7E, 0x1C7F).addRange(0x203C, 0x203D).addRange(0x2047, 0x2049).addRange(0x2E53, 0x2E54).addRange(0xA60E, 0xA60F).addRange(0xA876, 0xA877).addRange(0xA8CE, 0xA8CF).addRange(0xA9C8, 0xA9C9).addRange(0xAA5D, 0xAA5F).addRange(0xAAF0, 0xAAF1).addRange(0xFE56, 0xFE57).addRange(0x10A56, 0x10A57).addRange(0x10F55, 0x10F59).addRange(0x10F86, 0x10F89).addRange(0x11047, 0x11048).addRange(0x110BE, 0x110C1).addRange(0x11141, 0x11143).addRange(0x111C5, 0x111C6).addRange(0x111DE, 0x111DF).addRange(0x11238, 0x11239).addRange(0x1123B, 0x1123C).addRange(0x1144B, 0x1144C).addRange(0x115C2, 0x115C3).addRange(0x115C9, 0x115D7).addRange(0x11641, 0x11642).addRange(0x1173C, 0x1173E).addRange(0x11A42, 0x11A43).addRange(0x11A9B, 0x11A9C).addRange(0x11C41, 0x11C42).addRange(0x11EF7, 0x11EF8).addRange(0x11F43, 0x11F44).addRange(0x16A6E, 0x16A6F).addRange(0x16B37, 0x16B38);\nexports.characters = set;\n","const set = require('regenerate')(0x12F, 0x249, 0x268, 0x29D, 0x2B2, 0x3F3, 0x456, 0x458, 0x1D62, 0x1D96, 0x1DA4, 0x1DA8, 0x1E2D, 0x1ECB, 0x2071, 0x2C7C, 0x1DF1A, 0x1E068);\nset.addRange(0x69, 0x6A).addRange(0x2148, 0x2149).addRange(0x1D422, 0x1D423).addRange(0x1D456, 0x1D457).addRange(0x1D48A, 0x1D48B).addRange(0x1D4BE, 0x1D4BF).addRange(0x1D4F2, 0x1D4F3).addRange(0x1D526, 0x1D527).addRange(0x1D55A, 0x1D55B).addRange(0x1D58E, 0x1D58F).addRange(0x1D5C2, 0x1D5C3).addRange(0x1D5F6, 0x1D5F7).addRange(0x1D62A, 0x1D62B).addRange(0x1D65E, 0x1D65F).addRange(0x1D692, 0x1D693).addRange(0x1E04C, 0x1E04D);\nexports.characters = set;\n","const set = require('regenerate')(0x21, 0x2C, 0x2E, 0x3F, 0x37E, 0x387, 0x589, 0x5C3, 0x60C, 0x61B, 0x6D4, 0x70C, 0x85E, 0xF08, 0x166E, 0x17DA, 0x2E2E, 0x2E3C, 0x2E41, 0x2E4C, 0xA92F, 0xAADF, 0xABEB, 0xFF01, 0xFF0C, 0xFF0E, 0xFF1F, 0xFF61, 0xFF64, 0x1039F, 0x103D0, 0x10857, 0x1091F, 0x111CD, 0x112A9, 0x11944, 0x11946, 0x11C71, 0x16AF5, 0x16B44, 0x1BC9F);\nset.addRange(0x3A, 0x3B).addRange(0x61D, 0x61F).addRange(0x700, 0x70A).addRange(0x7F8, 0x7F9).addRange(0x830, 0x83E).addRange(0x964, 0x965).addRange(0xE5A, 0xE5B).addRange(0xF0D, 0xF12).addRange(0x104A, 0x104B).addRange(0x1361, 0x1368).addRange(0x16EB, 0x16ED).addRange(0x1735, 0x1736).addRange(0x17D4, 0x17D6).addRange(0x1802, 0x1805).addRange(0x1808, 0x1809).addRange(0x1944, 0x1945).addRange(0x1AA8, 0x1AAB).addRange(0x1B5A, 0x1B5B).addRange(0x1B5D, 0x1B5F).addRange(0x1B7D, 0x1B7E).addRange(0x1C3B, 0x1C3F).addRange(0x1C7E, 0x1C7F).addRange(0x203C, 0x203D).addRange(0x2047, 0x2049).addRange(0x2E4E, 0x2E4F).addRange(0x2E53, 0x2E54).addRange(0x3001, 0x3002).addRange(0xA4FE, 0xA4FF).addRange(0xA60D, 0xA60F).addRange(0xA6F3, 0xA6F7).addRange(0xA876, 0xA877).addRange(0xA8CE, 0xA8CF).addRange(0xA9C7, 0xA9C9).addRange(0xAA5D, 0xAA5F).addRange(0xAAF0, 0xAAF1).addRange(0xFE50, 0xFE52).addRange(0xFE54, 0xFE57).addRange(0xFF1A, 0xFF1B).addRange(0x10A56, 0x10A57).addRange(0x10AF0, 0x10AF5).addRange(0x10B3A, 0x10B3F).addRange(0x10B99, 0x10B9C).addRange(0x10F55, 0x10F59).addRange(0x10F86, 0x10F89).addRange(0x11047, 0x1104D).addRange(0x110BE, 0x110C1).addRange(0x11141, 0x11143).addRange(0x111C5, 0x111C6).addRange(0x111DE, 0x111DF).addRange(0x11238, 0x1123C).addRange(0x1144B, 0x1144D);\nset.addRange(0x1145A, 0x1145B).addRange(0x115C2, 0x115C5).addRange(0x115C9, 0x115D7).addRange(0x11641, 0x11642).addRange(0x1173C, 0x1173E).addRange(0x11A42, 0x11A43).addRange(0x11A9B, 0x11A9C).addRange(0x11AA1, 0x11AA2).addRange(0x11C41, 0x11C43).addRange(0x11EF7, 0x11EF8).addRange(0x11F43, 0x11F44).addRange(0x12470, 0x12474).addRange(0x16A6E, 0x16A6F).addRange(0x16B37, 0x16B39).addRange(0x16E97, 0x16E98).addRange(0x1DA87, 0x1DA8A);\nexports.characters = set;\n","const set = require('regenerate')(0xFA11, 0xFA1F, 0xFA21);\nset.addRange(0x3400, 0x4DBF).addRange(0x4E00, 0x9FFF).addRange(0xFA0E, 0xFA0F).addRange(0xFA13, 0xFA14).addRange(0xFA23, 0xFA24).addRange(0xFA27, 0xFA29).addRange(0x20000, 0x2A6DF).addRange(0x2A700, 0x2B739).addRange(0x2B740, 0x2B81D).addRange(0x2B820, 0x2CEA1).addRange(0x2CEB0, 0x2EBE0).addRange(0x2EBF0, 0x2EE5D).addRange(0x30000, 0x3134A).addRange(0x31350, 0x323AF);\nexports.characters = set;\n","const set = require('regenerate')(0x100, 0x102, 0x104, 0x106, 0x108, 0x10A, 0x10C, 0x10E, 0x110, 0x112, 0x114, 0x116, 0x118, 0x11A, 0x11C, 0x11E, 0x120, 0x122, 0x124, 0x126, 0x128, 0x12A, 0x12C, 0x12E, 0x130, 0x132, 0x134, 0x136, 0x139, 0x13B, 0x13D, 0x13F, 0x141, 0x143, 0x145, 0x147, 0x14A, 0x14C, 0x14E, 0x150, 0x152, 0x154, 0x156, 0x158, 0x15A, 0x15C, 0x15E, 0x160, 0x162, 0x164, 0x166, 0x168, 0x16A, 0x16C, 0x16E, 0x170, 0x172, 0x174, 0x176, 0x17B, 0x17D, 0x184, 0x1A2, 0x1A4, 0x1A9, 0x1AC, 0x1B5, 0x1BC, 0x1C4, 0x1C7, 0x1CA, 0x1CD, 0x1CF, 0x1D1, 0x1D3, 0x1D5, 0x1D7, 0x1D9, 0x1DB, 0x1DE, 0x1E0, 0x1E2, 0x1E4, 0x1E6, 0x1E8, 0x1EA, 0x1EC, 0x1EE, 0x1F1, 0x1F4, 0x1FA, 0x1FC, 0x1FE, 0x200, 0x202, 0x204, 0x206, 0x208, 0x20A, 0x20C, 0x20E, 0x210, 0x212, 0x214, 0x216, 0x218, 0x21A, 0x21C, 0x21E, 0x220, 0x222, 0x224, 0x226, 0x228, 0x22A, 0x22C, 0x22E, 0x230, 0x232, 0x241, 0x248, 0x24A, 0x24C, 0x24E, 0x370, 0x372, 0x376, 0x37F, 0x386, 0x38C, 0x3CF, 0x3D8, 0x3DA, 0x3DC, 0x3DE, 0x3E0, 0x3E2, 0x3E4, 0x3E6, 0x3E8, 0x3EA, 0x3EC, 0x3EE, 0x3F4, 0x3F7, 0x460, 0x462, 0x464, 0x466, 0x468, 0x46A, 0x46C, 0x46E, 0x470, 0x472, 0x474, 0x476, 0x478, 0x47A, 0x47C, 0x47E, 0x480, 0x48A, 0x48C, 0x48E, 0x490, 0x492, 0x494, 0x496, 0x498, 0x49A, 0x49C, 0x49E, 0x4A0, 0x4A2, 0x4A4, 0x4A6, 0x4A8, 0x4AA, 0x4AC, 0x4AE, 0x4B0, 0x4B2, 0x4B4, 0x4B6, 0x4B8, 0x4BA, 0x4BC, 0x4BE, 0x4C3, 0x4C5, 0x4C7, 0x4C9, 0x4CB, 0x4CD, 0x4D0, 0x4D2, 0x4D4, 0x4D6, 0x4D8, 0x4DA, 0x4DC, 0x4DE, 0x4E0, 0x4E2, 0x4E4, 0x4E6, 0x4E8, 0x4EA, 0x4EC, 0x4EE, 0x4F0, 0x4F2, 0x4F4, 0x4F6, 0x4F8, 0x4FA, 0x4FC, 0x4FE, 0x500, 0x502, 0x504, 0x506, 0x508, 0x50A, 0x50C, 0x50E, 0x510, 0x512, 0x514, 0x516, 0x518, 0x51A, 0x51C, 0x51E, 0x520, 0x522, 0x524, 0x526, 0x528, 0x52A, 0x52C, 0x52E, 0x10C7, 0x10CD, 0x1E00, 0x1E02, 0x1E04, 0x1E06, 0x1E08, 0x1E0A, 0x1E0C, 0x1E0E, 0x1E10, 0x1E12, 0x1E14, 0x1E16, 0x1E18, 0x1E1A, 0x1E1C, 0x1E1E, 0x1E20, 0x1E22, 0x1E24, 0x1E26, 0x1E28, 0x1E2A, 0x1E2C, 0x1E2E, 0x1E30, 0x1E32, 0x1E34, 0x1E36, 0x1E38, 0x1E3A, 0x1E3C, 0x1E3E, 0x1E40, 0x1E42, 0x1E44, 0x1E46, 0x1E48, 0x1E4A, 0x1E4C, 0x1E4E, 0x1E50, 0x1E52, 0x1E54, 0x1E56, 0x1E58, 0x1E5A, 0x1E5C, 0x1E5E, 0x1E60, 0x1E62, 0x1E64, 0x1E66, 0x1E68, 0x1E6A, 0x1E6C, 0x1E6E, 0x1E70, 0x1E72, 0x1E74, 0x1E76, 0x1E78, 0x1E7A, 0x1E7C, 0x1E7E, 0x1E80, 0x1E82, 0x1E84, 0x1E86, 0x1E88, 0x1E8A, 0x1E8C, 0x1E8E, 0x1E90, 0x1E92, 0x1E94, 0x1E9E, 0x1EA0, 0x1EA2, 0x1EA4, 0x1EA6, 0x1EA8, 0x1EAA, 0x1EAC, 0x1EAE, 0x1EB0, 0x1EB2, 0x1EB4, 0x1EB6, 0x1EB8, 0x1EBA, 0x1EBC, 0x1EBE, 0x1EC0, 0x1EC2, 0x1EC4, 0x1EC6, 0x1EC8, 0x1ECA, 0x1ECC, 0x1ECE, 0x1ED0, 0x1ED2, 0x1ED4, 0x1ED6, 0x1ED8, 0x1EDA, 0x1EDC, 0x1EDE, 0x1EE0, 0x1EE2, 0x1EE4, 0x1EE6, 0x1EE8, 0x1EEA, 0x1EEC, 0x1EEE, 0x1EF0, 0x1EF2, 0x1EF4, 0x1EF6, 0x1EF8, 0x1EFA, 0x1EFC, 0x1EFE, 0x1F59, 0x1F5B, 0x1F5D, 0x1F5F, 0x2102, 0x2107, 0x2115, 0x2124, 0x2126, 0x2128, 0x2145, 0x2183, 0x2C60, 0x2C67, 0x2C69, 0x2C6B, 0x2C72, 0x2C75, 0x2C82, 0x2C84, 0x2C86, 0x2C88, 0x2C8A, 0x2C8C, 0x2C8E, 0x2C90, 0x2C92, 0x2C94, 0x2C96, 0x2C98, 0x2C9A, 0x2C9C, 0x2C9E, 0x2CA0, 0x2CA2, 0x2CA4, 0x2CA6, 0x2CA8, 0x2CAA, 0x2CAC, 0x2CAE, 0x2CB0, 0x2CB2, 0x2CB4, 0x2CB6, 0x2CB8, 0x2CBA, 0x2CBC, 0x2CBE, 0x2CC0, 0x2CC2, 0x2CC4, 0x2CC6, 0x2CC8, 0x2CCA, 0x2CCC, 0x2CCE, 0x2CD0, 0x2CD2, 0x2CD4, 0x2CD6, 0x2CD8, 0x2CDA, 0x2CDC, 0x2CDE, 0x2CE0, 0x2CE2, 0x2CEB, 0x2CED, 0x2CF2, 0xA640, 0xA642, 0xA644, 0xA646, 0xA648, 0xA64A, 0xA64C, 0xA64E, 0xA650, 0xA652, 0xA654, 0xA656, 0xA658, 0xA65A, 0xA65C, 0xA65E, 0xA660, 0xA662, 0xA664, 0xA666, 0xA668, 0xA66A, 0xA66C, 0xA680, 0xA682, 0xA684, 0xA686, 0xA688, 0xA68A, 0xA68C, 0xA68E, 0xA690, 0xA692, 0xA694, 0xA696, 0xA698, 0xA69A, 0xA722, 0xA724, 0xA726, 0xA728, 0xA72A, 0xA72C, 0xA72E, 0xA732, 0xA734, 0xA736, 0xA738, 0xA73A, 0xA73C, 0xA73E, 0xA740, 0xA742, 0xA744, 0xA746, 0xA748, 0xA74A, 0xA74C, 0xA74E, 0xA750, 0xA752, 0xA754, 0xA756, 0xA758, 0xA75A, 0xA75C, 0xA75E, 0xA760, 0xA762, 0xA764, 0xA766, 0xA768, 0xA76A, 0xA76C, 0xA76E, 0xA779, 0xA77B, 0xA780, 0xA782, 0xA784, 0xA786, 0xA78B, 0xA78D, 0xA790, 0xA792, 0xA796, 0xA798, 0xA79A, 0xA79C, 0xA79E, 0xA7A0, 0xA7A2, 0xA7A4, 0xA7A6, 0xA7A8, 0xA7B6, 0xA7B8, 0xA7BA, 0xA7BC, 0xA7BE, 0xA7C0, 0xA7C2, 0xA7C9, 0xA7D0, 0xA7D6, 0xA7D8, 0xA7F5, 0x1D49C, 0x1D4A2, 0x1D546, 0x1D7CA);\nset.addRange(0x41, 0x5A).addRange(0xC0, 0xD6).addRange(0xD8, 0xDE).addRange(0x178, 0x179).addRange(0x181, 0x182).addRange(0x186, 0x187).addRange(0x189, 0x18B).addRange(0x18E, 0x191).addRange(0x193, 0x194).addRange(0x196, 0x198).addRange(0x19C, 0x19D).addRange(0x19F, 0x1A0).addRange(0x1A6, 0x1A7).addRange(0x1AE, 0x1AF).addRange(0x1B1, 0x1B3).addRange(0x1B7, 0x1B8).addRange(0x1F6, 0x1F8).addRange(0x23A, 0x23B).addRange(0x23D, 0x23E).addRange(0x243, 0x246).addRange(0x388, 0x38A).addRange(0x38E, 0x38F).addRange(0x391, 0x3A1).addRange(0x3A3, 0x3AB).addRange(0x3D2, 0x3D4).addRange(0x3F9, 0x3FA).addRange(0x3FD, 0x42F).addRange(0x4C0, 0x4C1).addRange(0x531, 0x556).addRange(0x10A0, 0x10C5).addRange(0x13A0, 0x13F5).addRange(0x1C90, 0x1CBA).addRange(0x1CBD, 0x1CBF).addRange(0x1F08, 0x1F0F).addRange(0x1F18, 0x1F1D).addRange(0x1F28, 0x1F2F).addRange(0x1F38, 0x1F3F).addRange(0x1F48, 0x1F4D).addRange(0x1F68, 0x1F6F).addRange(0x1FB8, 0x1FBB).addRange(0x1FC8, 0x1FCB).addRange(0x1FD8, 0x1FDB).addRange(0x1FE8, 0x1FEC).addRange(0x1FF8, 0x1FFB).addRange(0x210B, 0x210D).addRange(0x2110, 0x2112).addRange(0x2119, 0x211D).addRange(0x212A, 0x212D).addRange(0x2130, 0x2133).addRange(0x213E, 0x213F).addRange(0x2160, 0x216F);\nset.addRange(0x24B6, 0x24CF).addRange(0x2C00, 0x2C2F).addRange(0x2C62, 0x2C64).addRange(0x2C6D, 0x2C70).addRange(0x2C7E, 0x2C80).addRange(0xA77D, 0xA77E).addRange(0xA7AA, 0xA7AE).addRange(0xA7B0, 0xA7B4).addRange(0xA7C4, 0xA7C7).addRange(0xFF21, 0xFF3A).addRange(0x10400, 0x10427).addRange(0x104B0, 0x104D3).addRange(0x10570, 0x1057A).addRange(0x1057C, 0x1058A).addRange(0x1058C, 0x10592).addRange(0x10594, 0x10595).addRange(0x10C80, 0x10CB2).addRange(0x118A0, 0x118BF).addRange(0x16E40, 0x16E5F).addRange(0x1D400, 0x1D419).addRange(0x1D434, 0x1D44D).addRange(0x1D468, 0x1D481).addRange(0x1D49E, 0x1D49F).addRange(0x1D4A5, 0x1D4A6).addRange(0x1D4A9, 0x1D4AC).addRange(0x1D4AE, 0x1D4B5).addRange(0x1D4D0, 0x1D4E9).addRange(0x1D504, 0x1D505).addRange(0x1D507, 0x1D50A).addRange(0x1D50D, 0x1D514).addRange(0x1D516, 0x1D51C).addRange(0x1D538, 0x1D539).addRange(0x1D53B, 0x1D53E).addRange(0x1D540, 0x1D544).addRange(0x1D54A, 0x1D550).addRange(0x1D56C, 0x1D585).addRange(0x1D5A0, 0x1D5B9).addRange(0x1D5D4, 0x1D5ED).addRange(0x1D608, 0x1D621).addRange(0x1D63C, 0x1D655).addRange(0x1D670, 0x1D689).addRange(0x1D6A8, 0x1D6C0).addRange(0x1D6E2, 0x1D6FA).addRange(0x1D71C, 0x1D734).addRange(0x1D756, 0x1D76E).addRange(0x1D790, 0x1D7A8).addRange(0x1E900, 0x1E921).addRange(0x1F130, 0x1F149).addRange(0x1F150, 0x1F169).addRange(0x1F170, 0x1F189);\nexports.characters = set;\n","const set = require('regenerate')(0x180F);\nset.addRange(0x180B, 0x180D).addRange(0xFE00, 0xFE0F).addRange(0xE0100, 0xE01EF);\nexports.characters = set;\n","const set = require('regenerate')(0x20, 0x85, 0xA0, 0x1680, 0x202F, 0x205F, 0x3000);\nset.addRange(0x9, 0xD).addRange(0x2000, 0x200A).addRange(0x2028, 0x2029);\nexports.characters = set;\n","const set = require('regenerate')(0x5F, 0xAA, 0xB5, 0xB7, 0xBA, 0x2EC, 0x2EE, 0x37F, 0x38C, 0x559, 0x5BF, 0x5C7, 0x6FF, 0x7FA, 0x7FD, 0x9B2, 0x9D7, 0x9FC, 0x9FE, 0xA3C, 0xA51, 0xA5E, 0xAD0, 0xB71, 0xB9C, 0xBD0, 0xBD7, 0xC5D, 0xDBD, 0xDCA, 0xDD6, 0xE84, 0xEA5, 0xEC6, 0xF00, 0xF35, 0xF37, 0xF39, 0xFC6, 0x10C7, 0x10CD, 0x1258, 0x12C0, 0x17D7, 0x1AA7, 0x1F59, 0x1F5B, 0x1F5D, 0x1FBE, 0x2054, 0x2071, 0x207F, 0x20E1, 0x2102, 0x2107, 0x2115, 0x2124, 0x2126, 0x2128, 0x214E, 0x2D27, 0x2D2D, 0x2D6F, 0xA7D3, 0xA82C, 0xA8FB, 0xFB3E, 0xFE71, 0xFE73, 0xFE77, 0xFE79, 0xFE7B, 0xFE7D, 0xFF3F, 0x101FD, 0x102E0, 0x10808, 0x1083C, 0x10A3F, 0x10F27, 0x110C2, 0x11176, 0x111DC, 0x11288, 0x11350, 0x11357, 0x114C7, 0x11644, 0x11909, 0x11A47, 0x11A9D, 0x11D3A, 0x11FB0, 0x1B132, 0x1B155, 0x1D4A2, 0x1D4BB, 0x1D546, 0x1DA75, 0x1DA84, 0x1E08F, 0x1E14E, 0x1EE24, 0x1EE27, 0x1EE39, 0x1EE3B, 0x1EE42, 0x1EE47, 0x1EE49, 0x1EE4B, 0x1EE54, 0x1EE57, 0x1EE59, 0x1EE5B, 0x1EE5D, 0x1EE5F, 0x1EE64, 0x1EE7E);\nset.addRange(0x30, 0x39).addRange(0x41, 0x5A).addRange(0x61, 0x7A).addRange(0xC0, 0xD6).addRange(0xD8, 0xF6).addRange(0xF8, 0x2C1).addRange(0x2C6, 0x2D1).addRange(0x2E0, 0x2E4).addRange(0x300, 0x374).addRange(0x376, 0x377).addRange(0x37B, 0x37D).addRange(0x386, 0x38A).addRange(0x38E, 0x3A1).addRange(0x3A3, 0x3F5).addRange(0x3F7, 0x481).addRange(0x483, 0x487).addRange(0x48A, 0x52F).addRange(0x531, 0x556).addRange(0x560, 0x588).addRange(0x591, 0x5BD).addRange(0x5C1, 0x5C2).addRange(0x5C4, 0x5C5).addRange(0x5D0, 0x5EA).addRange(0x5EF, 0x5F2).addRange(0x610, 0x61A).addRange(0x620, 0x669).addRange(0x66E, 0x6D3).addRange(0x6D5, 0x6DC).addRange(0x6DF, 0x6E8).addRange(0x6EA, 0x6FC).addRange(0x710, 0x74A).addRange(0x74D, 0x7B1).addRange(0x7C0, 0x7F5).addRange(0x800, 0x82D).addRange(0x840, 0x85B).addRange(0x860, 0x86A).addRange(0x870, 0x887).addRange(0x889, 0x88E).addRange(0x898, 0x8E1).addRange(0x8E3, 0x963).addRange(0x966, 0x96F).addRange(0x971, 0x983).addRange(0x985, 0x98C).addRange(0x98F, 0x990).addRange(0x993, 0x9A8).addRange(0x9AA, 0x9B0).addRange(0x9B6, 0x9B9).addRange(0x9BC, 0x9C4).addRange(0x9C7, 0x9C8).addRange(0x9CB, 0x9CE).addRange(0x9DC, 0x9DD);\nset.addRange(0x9DF, 0x9E3).addRange(0x9E6, 0x9F1).addRange(0xA01, 0xA03).addRange(0xA05, 0xA0A).addRange(0xA0F, 0xA10).addRange(0xA13, 0xA28).addRange(0xA2A, 0xA30).addRange(0xA32, 0xA33).addRange(0xA35, 0xA36).addRange(0xA38, 0xA39).addRange(0xA3E, 0xA42).addRange(0xA47, 0xA48).addRange(0xA4B, 0xA4D).addRange(0xA59, 0xA5C).addRange(0xA66, 0xA75).addRange(0xA81, 0xA83).addRange(0xA85, 0xA8D).addRange(0xA8F, 0xA91).addRange(0xA93, 0xAA8).addRange(0xAAA, 0xAB0).addRange(0xAB2, 0xAB3).addRange(0xAB5, 0xAB9).addRange(0xABC, 0xAC5).addRange(0xAC7, 0xAC9).addRange(0xACB, 0xACD).addRange(0xAE0, 0xAE3).addRange(0xAE6, 0xAEF).addRange(0xAF9, 0xAFF).addRange(0xB01, 0xB03).addRange(0xB05, 0xB0C).addRange(0xB0F, 0xB10).addRange(0xB13, 0xB28).addRange(0xB2A, 0xB30).addRange(0xB32, 0xB33).addRange(0xB35, 0xB39).addRange(0xB3C, 0xB44).addRange(0xB47, 0xB48).addRange(0xB4B, 0xB4D).addRange(0xB55, 0xB57).addRange(0xB5C, 0xB5D).addRange(0xB5F, 0xB63).addRange(0xB66, 0xB6F).addRange(0xB82, 0xB83).addRange(0xB85, 0xB8A).addRange(0xB8E, 0xB90).addRange(0xB92, 0xB95).addRange(0xB99, 0xB9A).addRange(0xB9E, 0xB9F).addRange(0xBA3, 0xBA4).addRange(0xBA8, 0xBAA).addRange(0xBAE, 0xBB9);\nset.addRange(0xBBE, 0xBC2).addRange(0xBC6, 0xBC8).addRange(0xBCA, 0xBCD).addRange(0xBE6, 0xBEF).addRange(0xC00, 0xC0C).addRange(0xC0E, 0xC10).addRange(0xC12, 0xC28).addRange(0xC2A, 0xC39).addRange(0xC3C, 0xC44).addRange(0xC46, 0xC48).addRange(0xC4A, 0xC4D).addRange(0xC55, 0xC56).addRange(0xC58, 0xC5A).addRange(0xC60, 0xC63).addRange(0xC66, 0xC6F).addRange(0xC80, 0xC83).addRange(0xC85, 0xC8C).addRange(0xC8E, 0xC90).addRange(0xC92, 0xCA8).addRange(0xCAA, 0xCB3).addRange(0xCB5, 0xCB9).addRange(0xCBC, 0xCC4).addRange(0xCC6, 0xCC8).addRange(0xCCA, 0xCCD).addRange(0xCD5, 0xCD6).addRange(0xCDD, 0xCDE).addRange(0xCE0, 0xCE3).addRange(0xCE6, 0xCEF).addRange(0xCF1, 0xCF3).addRange(0xD00, 0xD0C).addRange(0xD0E, 0xD10).addRange(0xD12, 0xD44).addRange(0xD46, 0xD48).addRange(0xD4A, 0xD4E).addRange(0xD54, 0xD57).addRange(0xD5F, 0xD63).addRange(0xD66, 0xD6F).addRange(0xD7A, 0xD7F).addRange(0xD81, 0xD83).addRange(0xD85, 0xD96).addRange(0xD9A, 0xDB1).addRange(0xDB3, 0xDBB).addRange(0xDC0, 0xDC6).addRange(0xDCF, 0xDD4).addRange(0xDD8, 0xDDF).addRange(0xDE6, 0xDEF).addRange(0xDF2, 0xDF3).addRange(0xE01, 0xE3A).addRange(0xE40, 0xE4E).addRange(0xE50, 0xE59).addRange(0xE81, 0xE82);\nset.addRange(0xE86, 0xE8A).addRange(0xE8C, 0xEA3).addRange(0xEA7, 0xEBD).addRange(0xEC0, 0xEC4).addRange(0xEC8, 0xECE).addRange(0xED0, 0xED9).addRange(0xEDC, 0xEDF).addRange(0xF18, 0xF19).addRange(0xF20, 0xF29).addRange(0xF3E, 0xF47).addRange(0xF49, 0xF6C).addRange(0xF71, 0xF84).addRange(0xF86, 0xF97).addRange(0xF99, 0xFBC).addRange(0x1000, 0x1049).addRange(0x1050, 0x109D).addRange(0x10A0, 0x10C5).addRange(0x10D0, 0x10FA).addRange(0x10FC, 0x1248).addRange(0x124A, 0x124D).addRange(0x1250, 0x1256).addRange(0x125A, 0x125D).addRange(0x1260, 0x1288).addRange(0x128A, 0x128D).addRange(0x1290, 0x12B0).addRange(0x12B2, 0x12B5).addRange(0x12B8, 0x12BE).addRange(0x12C2, 0x12C5).addRange(0x12C8, 0x12D6).addRange(0x12D8, 0x1310).addRange(0x1312, 0x1315).addRange(0x1318, 0x135A).addRange(0x135D, 0x135F).addRange(0x1369, 0x1371).addRange(0x1380, 0x138F).addRange(0x13A0, 0x13F5).addRange(0x13F8, 0x13FD).addRange(0x1401, 0x166C).addRange(0x166F, 0x167F).addRange(0x1681, 0x169A).addRange(0x16A0, 0x16EA).addRange(0x16EE, 0x16F8).addRange(0x1700, 0x1715).addRange(0x171F, 0x1734).addRange(0x1740, 0x1753).addRange(0x1760, 0x176C).addRange(0x176E, 0x1770).addRange(0x1772, 0x1773).addRange(0x1780, 0x17D3).addRange(0x17DC, 0x17DD).addRange(0x17E0, 0x17E9);\nset.addRange(0x180B, 0x180D).addRange(0x180F, 0x1819).addRange(0x1820, 0x1878).addRange(0x1880, 0x18AA).addRange(0x18B0, 0x18F5).addRange(0x1900, 0x191E).addRange(0x1920, 0x192B).addRange(0x1930, 0x193B).addRange(0x1946, 0x196D).addRange(0x1970, 0x1974).addRange(0x1980, 0x19AB).addRange(0x19B0, 0x19C9).addRange(0x19D0, 0x19DA).addRange(0x1A00, 0x1A1B).addRange(0x1A20, 0x1A5E).addRange(0x1A60, 0x1A7C).addRange(0x1A7F, 0x1A89).addRange(0x1A90, 0x1A99).addRange(0x1AB0, 0x1ABD).addRange(0x1ABF, 0x1ACE).addRange(0x1B00, 0x1B4C).addRange(0x1B50, 0x1B59).addRange(0x1B6B, 0x1B73).addRange(0x1B80, 0x1BF3).addRange(0x1C00, 0x1C37).addRange(0x1C40, 0x1C49).addRange(0x1C4D, 0x1C7D).addRange(0x1C80, 0x1C88).addRange(0x1C90, 0x1CBA).addRange(0x1CBD, 0x1CBF).addRange(0x1CD0, 0x1CD2).addRange(0x1CD4, 0x1CFA).addRange(0x1D00, 0x1F15).addRange(0x1F18, 0x1F1D).addRange(0x1F20, 0x1F45).addRange(0x1F48, 0x1F4D).addRange(0x1F50, 0x1F57).addRange(0x1F5F, 0x1F7D).addRange(0x1F80, 0x1FB4).addRange(0x1FB6, 0x1FBC).addRange(0x1FC2, 0x1FC4).addRange(0x1FC6, 0x1FCC).addRange(0x1FD0, 0x1FD3).addRange(0x1FD6, 0x1FDB).addRange(0x1FE0, 0x1FEC).addRange(0x1FF2, 0x1FF4).addRange(0x1FF6, 0x1FFC).addRange(0x200C, 0x200D).addRange(0x203F, 0x2040).addRange(0x2090, 0x209C).addRange(0x20D0, 0x20DC);\nset.addRange(0x20E5, 0x20F0).addRange(0x210A, 0x2113).addRange(0x2118, 0x211D).addRange(0x212A, 0x2139).addRange(0x213C, 0x213F).addRange(0x2145, 0x2149).addRange(0x2160, 0x2188).addRange(0x2C00, 0x2CE4).addRange(0x2CEB, 0x2CF3).addRange(0x2D00, 0x2D25).addRange(0x2D30, 0x2D67).addRange(0x2D7F, 0x2D96).addRange(0x2DA0, 0x2DA6).addRange(0x2DA8, 0x2DAE).addRange(0x2DB0, 0x2DB6).addRange(0x2DB8, 0x2DBE).addRange(0x2DC0, 0x2DC6).addRange(0x2DC8, 0x2DCE).addRange(0x2DD0, 0x2DD6).addRange(0x2DD8, 0x2DDE).addRange(0x2DE0, 0x2DFF).addRange(0x3005, 0x3007).addRange(0x3021, 0x302F).addRange(0x3031, 0x3035).addRange(0x3038, 0x303C).addRange(0x3041, 0x3096).addRange(0x3099, 0x309A).addRange(0x309D, 0x309F).addRange(0x30A1, 0x30FF).addRange(0x3105, 0x312F).addRange(0x3131, 0x318E).addRange(0x31A0, 0x31BF).addRange(0x31F0, 0x31FF).addRange(0x3400, 0x4DBF).addRange(0x4E00, 0xA48C).addRange(0xA4D0, 0xA4FD).addRange(0xA500, 0xA60C).addRange(0xA610, 0xA62B).addRange(0xA640, 0xA66F).addRange(0xA674, 0xA67D).addRange(0xA67F, 0xA6F1).addRange(0xA717, 0xA71F).addRange(0xA722, 0xA788).addRange(0xA78B, 0xA7CA).addRange(0xA7D0, 0xA7D1).addRange(0xA7D5, 0xA7D9).addRange(0xA7F2, 0xA827).addRange(0xA840, 0xA873).addRange(0xA880, 0xA8C5).addRange(0xA8D0, 0xA8D9).addRange(0xA8E0, 0xA8F7);\nset.addRange(0xA8FD, 0xA92D).addRange(0xA930, 0xA953).addRange(0xA960, 0xA97C).addRange(0xA980, 0xA9C0).addRange(0xA9CF, 0xA9D9).addRange(0xA9E0, 0xA9FE).addRange(0xAA00, 0xAA36).addRange(0xAA40, 0xAA4D).addRange(0xAA50, 0xAA59).addRange(0xAA60, 0xAA76).addRange(0xAA7A, 0xAAC2).addRange(0xAADB, 0xAADD).addRange(0xAAE0, 0xAAEF).addRange(0xAAF2, 0xAAF6).addRange(0xAB01, 0xAB06).addRange(0xAB09, 0xAB0E).addRange(0xAB11, 0xAB16).addRange(0xAB20, 0xAB26).addRange(0xAB28, 0xAB2E).addRange(0xAB30, 0xAB5A).addRange(0xAB5C, 0xAB69).addRange(0xAB70, 0xABEA).addRange(0xABEC, 0xABED).addRange(0xABF0, 0xABF9).addRange(0xAC00, 0xD7A3).addRange(0xD7B0, 0xD7C6).addRange(0xD7CB, 0xD7FB).addRange(0xF900, 0xFA6D).addRange(0xFA70, 0xFAD9).addRange(0xFB00, 0xFB06).addRange(0xFB13, 0xFB17).addRange(0xFB1D, 0xFB28).addRange(0xFB2A, 0xFB36).addRange(0xFB38, 0xFB3C).addRange(0xFB40, 0xFB41).addRange(0xFB43, 0xFB44).addRange(0xFB46, 0xFBB1).addRange(0xFBD3, 0xFC5D).addRange(0xFC64, 0xFD3D).addRange(0xFD50, 0xFD8F).addRange(0xFD92, 0xFDC7).addRange(0xFDF0, 0xFDF9).addRange(0xFE00, 0xFE0F).addRange(0xFE20, 0xFE2F).addRange(0xFE33, 0xFE34).addRange(0xFE4D, 0xFE4F).addRange(0xFE7F, 0xFEFC).addRange(0xFF10, 0xFF19).addRange(0xFF21, 0xFF3A).addRange(0xFF41, 0xFF5A).addRange(0xFF65, 0xFFBE);\nset.addRange(0xFFC2, 0xFFC7).addRange(0xFFCA, 0xFFCF).addRange(0xFFD2, 0xFFD7).addRange(0xFFDA, 0xFFDC).addRange(0x10000, 0x1000B).addRange(0x1000D, 0x10026).addRange(0x10028, 0x1003A).addRange(0x1003C, 0x1003D).addRange(0x1003F, 0x1004D).addRange(0x10050, 0x1005D).addRange(0x10080, 0x100FA).addRange(0x10140, 0x10174).addRange(0x10280, 0x1029C).addRange(0x102A0, 0x102D0).addRange(0x10300, 0x1031F).addRange(0x1032D, 0x1034A).addRange(0x10350, 0x1037A).addRange(0x10380, 0x1039D).addRange(0x103A0, 0x103C3).addRange(0x103C8, 0x103CF).addRange(0x103D1, 0x103D5).addRange(0x10400, 0x1049D).addRange(0x104A0, 0x104A9).addRange(0x104B0, 0x104D3).addRange(0x104D8, 0x104FB).addRange(0x10500, 0x10527).addRange(0x10530, 0x10563).addRange(0x10570, 0x1057A).addRange(0x1057C, 0x1058A).addRange(0x1058C, 0x10592).addRange(0x10594, 0x10595).addRange(0x10597, 0x105A1).addRange(0x105A3, 0x105B1).addRange(0x105B3, 0x105B9).addRange(0x105BB, 0x105BC).addRange(0x10600, 0x10736).addRange(0x10740, 0x10755).addRange(0x10760, 0x10767).addRange(0x10780, 0x10785).addRange(0x10787, 0x107B0).addRange(0x107B2, 0x107BA).addRange(0x10800, 0x10805).addRange(0x1080A, 0x10835).addRange(0x10837, 0x10838).addRange(0x1083F, 0x10855).addRange(0x10860, 0x10876).addRange(0x10880, 0x1089E).addRange(0x108E0, 0x108F2).addRange(0x108F4, 0x108F5).addRange(0x10900, 0x10915).addRange(0x10920, 0x10939);\nset.addRange(0x10980, 0x109B7).addRange(0x109BE, 0x109BF).addRange(0x10A00, 0x10A03).addRange(0x10A05, 0x10A06).addRange(0x10A0C, 0x10A13).addRange(0x10A15, 0x10A17).addRange(0x10A19, 0x10A35).addRange(0x10A38, 0x10A3A).addRange(0x10A60, 0x10A7C).addRange(0x10A80, 0x10A9C).addRange(0x10AC0, 0x10AC7).addRange(0x10AC9, 0x10AE6).addRange(0x10B00, 0x10B35).addRange(0x10B40, 0x10B55).addRange(0x10B60, 0x10B72).addRange(0x10B80, 0x10B91).addRange(0x10C00, 0x10C48).addRange(0x10C80, 0x10CB2).addRange(0x10CC0, 0x10CF2).addRange(0x10D00, 0x10D27).addRange(0x10D30, 0x10D39).addRange(0x10E80, 0x10EA9).addRange(0x10EAB, 0x10EAC).addRange(0x10EB0, 0x10EB1).addRange(0x10EFD, 0x10F1C).addRange(0x10F30, 0x10F50).addRange(0x10F70, 0x10F85).addRange(0x10FB0, 0x10FC4).addRange(0x10FE0, 0x10FF6).addRange(0x11000, 0x11046).addRange(0x11066, 0x11075).addRange(0x1107F, 0x110BA).addRange(0x110D0, 0x110E8).addRange(0x110F0, 0x110F9).addRange(0x11100, 0x11134).addRange(0x11136, 0x1113F).addRange(0x11144, 0x11147).addRange(0x11150, 0x11173).addRange(0x11180, 0x111C4).addRange(0x111C9, 0x111CC).addRange(0x111CE, 0x111DA).addRange(0x11200, 0x11211).addRange(0x11213, 0x11237).addRange(0x1123E, 0x11241).addRange(0x11280, 0x11286).addRange(0x1128A, 0x1128D).addRange(0x1128F, 0x1129D).addRange(0x1129F, 0x112A8).addRange(0x112B0, 0x112EA).addRange(0x112F0, 0x112F9).addRange(0x11300, 0x11303);\nset.addRange(0x11305, 0x1130C).addRange(0x1130F, 0x11310).addRange(0x11313, 0x11328).addRange(0x1132A, 0x11330).addRange(0x11332, 0x11333).addRange(0x11335, 0x11339).addRange(0x1133B, 0x11344).addRange(0x11347, 0x11348).addRange(0x1134B, 0x1134D).addRange(0x1135D, 0x11363).addRange(0x11366, 0x1136C).addRange(0x11370, 0x11374).addRange(0x11400, 0x1144A).addRange(0x11450, 0x11459).addRange(0x1145E, 0x11461).addRange(0x11480, 0x114C5).addRange(0x114D0, 0x114D9).addRange(0x11580, 0x115B5).addRange(0x115B8, 0x115C0).addRange(0x115D8, 0x115DD).addRange(0x11600, 0x11640).addRange(0x11650, 0x11659).addRange(0x11680, 0x116B8).addRange(0x116C0, 0x116C9).addRange(0x11700, 0x1171A).addRange(0x1171D, 0x1172B).addRange(0x11730, 0x11739).addRange(0x11740, 0x11746).addRange(0x11800, 0x1183A).addRange(0x118A0, 0x118E9).addRange(0x118FF, 0x11906).addRange(0x1190C, 0x11913).addRange(0x11915, 0x11916).addRange(0x11918, 0x11935).addRange(0x11937, 0x11938).addRange(0x1193B, 0x11943).addRange(0x11950, 0x11959).addRange(0x119A0, 0x119A7).addRange(0x119AA, 0x119D7).addRange(0x119DA, 0x119E1).addRange(0x119E3, 0x119E4).addRange(0x11A00, 0x11A3E).addRange(0x11A50, 0x11A99).addRange(0x11AB0, 0x11AF8).addRange(0x11C00, 0x11C08).addRange(0x11C0A, 0x11C36).addRange(0x11C38, 0x11C40).addRange(0x11C50, 0x11C59).addRange(0x11C72, 0x11C8F).addRange(0x11C92, 0x11CA7).addRange(0x11CA9, 0x11CB6);\nset.addRange(0x11D00, 0x11D06).addRange(0x11D08, 0x11D09).addRange(0x11D0B, 0x11D36).addRange(0x11D3C, 0x11D3D).addRange(0x11D3F, 0x11D47).addRange(0x11D50, 0x11D59).addRange(0x11D60, 0x11D65).addRange(0x11D67, 0x11D68).addRange(0x11D6A, 0x11D8E).addRange(0x11D90, 0x11D91).addRange(0x11D93, 0x11D98).addRange(0x11DA0, 0x11DA9).addRange(0x11EE0, 0x11EF6).addRange(0x11F00, 0x11F10).addRange(0x11F12, 0x11F3A).addRange(0x11F3E, 0x11F42).addRange(0x11F50, 0x11F59).addRange(0x12000, 0x12399).addRange(0x12400, 0x1246E).addRange(0x12480, 0x12543).addRange(0x12F90, 0x12FF0).addRange(0x13000, 0x1342F).addRange(0x13440, 0x13455).addRange(0x14400, 0x14646).addRange(0x16800, 0x16A38).addRange(0x16A40, 0x16A5E).addRange(0x16A60, 0x16A69).addRange(0x16A70, 0x16ABE).addRange(0x16AC0, 0x16AC9).addRange(0x16AD0, 0x16AED).addRange(0x16AF0, 0x16AF4).addRange(0x16B00, 0x16B36).addRange(0x16B40, 0x16B43).addRange(0x16B50, 0x16B59).addRange(0x16B63, 0x16B77).addRange(0x16B7D, 0x16B8F).addRange(0x16E40, 0x16E7F).addRange(0x16F00, 0x16F4A).addRange(0x16F4F, 0x16F87).addRange(0x16F8F, 0x16F9F).addRange(0x16FE0, 0x16FE1).addRange(0x16FE3, 0x16FE4).addRange(0x16FF0, 0x16FF1).addRange(0x17000, 0x187F7).addRange(0x18800, 0x18CD5).addRange(0x18D00, 0x18D08).addRange(0x1AFF0, 0x1AFF3).addRange(0x1AFF5, 0x1AFFB).addRange(0x1AFFD, 0x1AFFE).addRange(0x1B000, 0x1B122).addRange(0x1B150, 0x1B152);\nset.addRange(0x1B164, 0x1B167).addRange(0x1B170, 0x1B2FB).addRange(0x1BC00, 0x1BC6A).addRange(0x1BC70, 0x1BC7C).addRange(0x1BC80, 0x1BC88).addRange(0x1BC90, 0x1BC99).addRange(0x1BC9D, 0x1BC9E).addRange(0x1CF00, 0x1CF2D).addRange(0x1CF30, 0x1CF46).addRange(0x1D165, 0x1D169).addRange(0x1D16D, 0x1D172).addRange(0x1D17B, 0x1D182).addRange(0x1D185, 0x1D18B).addRange(0x1D1AA, 0x1D1AD).addRange(0x1D242, 0x1D244).addRange(0x1D400, 0x1D454).addRange(0x1D456, 0x1D49C).addRange(0x1D49E, 0x1D49F).addRange(0x1D4A5, 0x1D4A6).addRange(0x1D4A9, 0x1D4AC).addRange(0x1D4AE, 0x1D4B9).addRange(0x1D4BD, 0x1D4C3).addRange(0x1D4C5, 0x1D505).addRange(0x1D507, 0x1D50A).addRange(0x1D50D, 0x1D514).addRange(0x1D516, 0x1D51C).addRange(0x1D51E, 0x1D539).addRange(0x1D53B, 0x1D53E).addRange(0x1D540, 0x1D544).addRange(0x1D54A, 0x1D550).addRange(0x1D552, 0x1D6A5).addRange(0x1D6A8, 0x1D6C0).addRange(0x1D6C2, 0x1D6DA).addRange(0x1D6DC, 0x1D6FA).addRange(0x1D6FC, 0x1D714).addRange(0x1D716, 0x1D734).addRange(0x1D736, 0x1D74E).addRange(0x1D750, 0x1D76E).addRange(0x1D770, 0x1D788).addRange(0x1D78A, 0x1D7A8).addRange(0x1D7AA, 0x1D7C2).addRange(0x1D7C4, 0x1D7CB).addRange(0x1D7CE, 0x1D7FF).addRange(0x1DA00, 0x1DA36).addRange(0x1DA3B, 0x1DA6C).addRange(0x1DA9B, 0x1DA9F).addRange(0x1DAA1, 0x1DAAF).addRange(0x1DF00, 0x1DF1E).addRange(0x1DF25, 0x1DF2A).addRange(0x1E000, 0x1E006).addRange(0x1E008, 0x1E018);\nset.addRange(0x1E01B, 0x1E021).addRange(0x1E023, 0x1E024).addRange(0x1E026, 0x1E02A).addRange(0x1E030, 0x1E06D).addRange(0x1E100, 0x1E12C).addRange(0x1E130, 0x1E13D).addRange(0x1E140, 0x1E149).addRange(0x1E290, 0x1E2AE).addRange(0x1E2C0, 0x1E2F9).addRange(0x1E4D0, 0x1E4F9).addRange(0x1E7E0, 0x1E7E6).addRange(0x1E7E8, 0x1E7EB).addRange(0x1E7ED, 0x1E7EE).addRange(0x1E7F0, 0x1E7FE).addRange(0x1E800, 0x1E8C4).addRange(0x1E8D0, 0x1E8D6).addRange(0x1E900, 0x1E94B).addRange(0x1E950, 0x1E959).addRange(0x1EE00, 0x1EE03).addRange(0x1EE05, 0x1EE1F).addRange(0x1EE21, 0x1EE22).addRange(0x1EE29, 0x1EE32).addRange(0x1EE34, 0x1EE37).addRange(0x1EE4D, 0x1EE4F).addRange(0x1EE51, 0x1EE52).addRange(0x1EE61, 0x1EE62).addRange(0x1EE67, 0x1EE6A).addRange(0x1EE6C, 0x1EE72).addRange(0x1EE74, 0x1EE77).addRange(0x1EE79, 0x1EE7C).addRange(0x1EE80, 0x1EE89).addRange(0x1EE8B, 0x1EE9B).addRange(0x1EEA1, 0x1EEA3).addRange(0x1EEA5, 0x1EEA9).addRange(0x1EEAB, 0x1EEBB).addRange(0x1FBF0, 0x1FBF9).addRange(0x20000, 0x2A6DF).addRange(0x2A700, 0x2B739).addRange(0x2B740, 0x2B81D).addRange(0x2B820, 0x2CEA1).addRange(0x2CEB0, 0x2EBE0).addRange(0x2EBF0, 0x2EE5D).addRange(0x2F800, 0x2FA1D).addRange(0x30000, 0x3134A).addRange(0x31350, 0x323AF).addRange(0xE0100, 0xE01EF);\nexports.characters = set;\n","const set = require('regenerate')(0xAA, 0xB5, 0xBA, 0x2EC, 0x2EE, 0x37F, 0x386, 0x38C, 0x559, 0x6D5, 0x6FF, 0x710, 0x7B1, 0x7FA, 0x81A, 0x824, 0x828, 0x93D, 0x950, 0x9B2, 0x9BD, 0x9CE, 0x9FC, 0xA5E, 0xABD, 0xAD0, 0xAF9, 0xB3D, 0xB71, 0xB83, 0xB9C, 0xBD0, 0xC3D, 0xC5D, 0xC80, 0xCBD, 0xD3D, 0xD4E, 0xDBD, 0xE32, 0xE84, 0xEA5, 0xEB2, 0xEBD, 0xEC6, 0xF00, 0x103F, 0x1061, 0x108E, 0x10C7, 0x10CD, 0x1258, 0x12C0, 0x17D7, 0x17DC, 0x18AA, 0x1AA7, 0x1CFA, 0x1F59, 0x1F5B, 0x1F5D, 0x1FBE, 0x2071, 0x207F, 0x2102, 0x2107, 0x2115, 0x2124, 0x2126, 0x2128, 0x214E, 0x2D27, 0x2D2D, 0x2D6F, 0xA7D3, 0xA8FB, 0xA9CF, 0xAA7A, 0xAAB1, 0xAAC0, 0xAAC2, 0xFB1D, 0xFB3E, 0xFE71, 0xFE73, 0xFE77, 0xFE79, 0xFE7B, 0xFE7D, 0x10808, 0x1083C, 0x10A00, 0x10F27, 0x11075, 0x11144, 0x11147, 0x11176, 0x111DA, 0x111DC, 0x11288, 0x1133D, 0x11350, 0x114C7, 0x11644, 0x116B8, 0x11909, 0x1193F, 0x11941, 0x119E1, 0x119E3, 0x11A00, 0x11A3A, 0x11A50, 0x11A9D, 0x11C40, 0x11D46, 0x11D98, 0x11F02, 0x11FB0, 0x16F50, 0x16FE3, 0x1B132, 0x1B155, 0x1D4A2, 0x1D4BB, 0x1D546, 0x1E14E, 0x1E94B, 0x1EE24, 0x1EE27, 0x1EE39, 0x1EE3B, 0x1EE42, 0x1EE47, 0x1EE49, 0x1EE4B, 0x1EE54, 0x1EE57, 0x1EE59, 0x1EE5B, 0x1EE5D, 0x1EE5F, 0x1EE64, 0x1EE7E);\nset.addRange(0x41, 0x5A).addRange(0x61, 0x7A).addRange(0xC0, 0xD6).addRange(0xD8, 0xF6).addRange(0xF8, 0x2C1).addRange(0x2C6, 0x2D1).addRange(0x2E0, 0x2E4).addRange(0x370, 0x374).addRange(0x376, 0x377).addRange(0x37B, 0x37D).addRange(0x388, 0x38A).addRange(0x38E, 0x3A1).addRange(0x3A3, 0x3F5).addRange(0x3F7, 0x481).addRange(0x48A, 0x52F).addRange(0x531, 0x556).addRange(0x560, 0x588).addRange(0x5D0, 0x5EA).addRange(0x5EF, 0x5F2).addRange(0x620, 0x64A).addRange(0x66E, 0x66F).addRange(0x671, 0x6D3).addRange(0x6E5, 0x6E6).addRange(0x6EE, 0x6EF).addRange(0x6FA, 0x6FC).addRange(0x712, 0x72F).addRange(0x74D, 0x7A5).addRange(0x7CA, 0x7EA).addRange(0x7F4, 0x7F5).addRange(0x800, 0x815).addRange(0x840, 0x858).addRange(0x860, 0x86A).addRange(0x870, 0x887).addRange(0x889, 0x88E).addRange(0x8A0, 0x8C9).addRange(0x904, 0x939).addRange(0x958, 0x961).addRange(0x971, 0x980).addRange(0x985, 0x98C).addRange(0x98F, 0x990).addRange(0x993, 0x9A8).addRange(0x9AA, 0x9B0).addRange(0x9B6, 0x9B9).addRange(0x9DC, 0x9DD).addRange(0x9DF, 0x9E1).addRange(0x9F0, 0x9F1).addRange(0xA05, 0xA0A).addRange(0xA0F, 0xA10).addRange(0xA13, 0xA28).addRange(0xA2A, 0xA30).addRange(0xA32, 0xA33);\nset.addRange(0xA35, 0xA36).addRange(0xA38, 0xA39).addRange(0xA59, 0xA5C).addRange(0xA72, 0xA74).addRange(0xA85, 0xA8D).addRange(0xA8F, 0xA91).addRange(0xA93, 0xAA8).addRange(0xAAA, 0xAB0).addRange(0xAB2, 0xAB3).addRange(0xAB5, 0xAB9).addRange(0xAE0, 0xAE1).addRange(0xB05, 0xB0C).addRange(0xB0F, 0xB10).addRange(0xB13, 0xB28).addRange(0xB2A, 0xB30).addRange(0xB32, 0xB33).addRange(0xB35, 0xB39).addRange(0xB5C, 0xB5D).addRange(0xB5F, 0xB61).addRange(0xB85, 0xB8A).addRange(0xB8E, 0xB90).addRange(0xB92, 0xB95).addRange(0xB99, 0xB9A).addRange(0xB9E, 0xB9F).addRange(0xBA3, 0xBA4).addRange(0xBA8, 0xBAA).addRange(0xBAE, 0xBB9).addRange(0xC05, 0xC0C).addRange(0xC0E, 0xC10).addRange(0xC12, 0xC28).addRange(0xC2A, 0xC39).addRange(0xC58, 0xC5A).addRange(0xC60, 0xC61).addRange(0xC85, 0xC8C).addRange(0xC8E, 0xC90).addRange(0xC92, 0xCA8).addRange(0xCAA, 0xCB3).addRange(0xCB5, 0xCB9).addRange(0xCDD, 0xCDE).addRange(0xCE0, 0xCE1).addRange(0xCF1, 0xCF2).addRange(0xD04, 0xD0C).addRange(0xD0E, 0xD10).addRange(0xD12, 0xD3A).addRange(0xD54, 0xD56).addRange(0xD5F, 0xD61).addRange(0xD7A, 0xD7F).addRange(0xD85, 0xD96).addRange(0xD9A, 0xDB1).addRange(0xDB3, 0xDBB).addRange(0xDC0, 0xDC6);\nset.addRange(0xE01, 0xE30).addRange(0xE40, 0xE46).addRange(0xE81, 0xE82).addRange(0xE86, 0xE8A).addRange(0xE8C, 0xEA3).addRange(0xEA7, 0xEB0).addRange(0xEC0, 0xEC4).addRange(0xEDC, 0xEDF).addRange(0xF40, 0xF47).addRange(0xF49, 0xF6C).addRange(0xF88, 0xF8C).addRange(0x1000, 0x102A).addRange(0x1050, 0x1055).addRange(0x105A, 0x105D).addRange(0x1065, 0x1066).addRange(0x106E, 0x1070).addRange(0x1075, 0x1081).addRange(0x10A0, 0x10C5).addRange(0x10D0, 0x10FA).addRange(0x10FC, 0x1248).addRange(0x124A, 0x124D).addRange(0x1250, 0x1256).addRange(0x125A, 0x125D).addRange(0x1260, 0x1288).addRange(0x128A, 0x128D).addRange(0x1290, 0x12B0).addRange(0x12B2, 0x12B5).addRange(0x12B8, 0x12BE).addRange(0x12C2, 0x12C5).addRange(0x12C8, 0x12D6).addRange(0x12D8, 0x1310).addRange(0x1312, 0x1315).addRange(0x1318, 0x135A).addRange(0x1380, 0x138F).addRange(0x13A0, 0x13F5).addRange(0x13F8, 0x13FD).addRange(0x1401, 0x166C).addRange(0x166F, 0x167F).addRange(0x1681, 0x169A).addRange(0x16A0, 0x16EA).addRange(0x16EE, 0x16F8).addRange(0x1700, 0x1711).addRange(0x171F, 0x1731).addRange(0x1740, 0x1751).addRange(0x1760, 0x176C).addRange(0x176E, 0x1770).addRange(0x1780, 0x17B3).addRange(0x1820, 0x1878).addRange(0x1880, 0x18A8).addRange(0x18B0, 0x18F5).addRange(0x1900, 0x191E);\nset.addRange(0x1950, 0x196D).addRange(0x1970, 0x1974).addRange(0x1980, 0x19AB).addRange(0x19B0, 0x19C9).addRange(0x1A00, 0x1A16).addRange(0x1A20, 0x1A54).addRange(0x1B05, 0x1B33).addRange(0x1B45, 0x1B4C).addRange(0x1B83, 0x1BA0).addRange(0x1BAE, 0x1BAF).addRange(0x1BBA, 0x1BE5).addRange(0x1C00, 0x1C23).addRange(0x1C4D, 0x1C4F).addRange(0x1C5A, 0x1C7D).addRange(0x1C80, 0x1C88).addRange(0x1C90, 0x1CBA).addRange(0x1CBD, 0x1CBF).addRange(0x1CE9, 0x1CEC).addRange(0x1CEE, 0x1CF3).addRange(0x1CF5, 0x1CF6).addRange(0x1D00, 0x1DBF).addRange(0x1E00, 0x1F15).addRange(0x1F18, 0x1F1D).addRange(0x1F20, 0x1F45).addRange(0x1F48, 0x1F4D).addRange(0x1F50, 0x1F57).addRange(0x1F5F, 0x1F7D).addRange(0x1F80, 0x1FB4).addRange(0x1FB6, 0x1FBC).addRange(0x1FC2, 0x1FC4).addRange(0x1FC6, 0x1FCC).addRange(0x1FD0, 0x1FD3).addRange(0x1FD6, 0x1FDB).addRange(0x1FE0, 0x1FEC).addRange(0x1FF2, 0x1FF4).addRange(0x1FF6, 0x1FFC).addRange(0x2090, 0x209C).addRange(0x210A, 0x2113).addRange(0x2118, 0x211D).addRange(0x212A, 0x2139).addRange(0x213C, 0x213F).addRange(0x2145, 0x2149).addRange(0x2160, 0x2188).addRange(0x2C00, 0x2CE4).addRange(0x2CEB, 0x2CEE).addRange(0x2CF2, 0x2CF3).addRange(0x2D00, 0x2D25).addRange(0x2D30, 0x2D67).addRange(0x2D80, 0x2D96).addRange(0x2DA0, 0x2DA6).addRange(0x2DA8, 0x2DAE);\nset.addRange(0x2DB0, 0x2DB6).addRange(0x2DB8, 0x2DBE).addRange(0x2DC0, 0x2DC6).addRange(0x2DC8, 0x2DCE).addRange(0x2DD0, 0x2DD6).addRange(0x2DD8, 0x2DDE).addRange(0x3005, 0x3007).addRange(0x3021, 0x3029).addRange(0x3031, 0x3035).addRange(0x3038, 0x303C).addRange(0x3041, 0x3096).addRange(0x309D, 0x309F).addRange(0x30A1, 0x30FA).addRange(0x30FC, 0x30FF).addRange(0x3105, 0x312F).addRange(0x3131, 0x318E).addRange(0x31A0, 0x31BF).addRange(0x31F0, 0x31FF).addRange(0x3400, 0x4DBF).addRange(0x4E00, 0xA48C).addRange(0xA4D0, 0xA4FD).addRange(0xA500, 0xA60C).addRange(0xA610, 0xA61F).addRange(0xA62A, 0xA62B).addRange(0xA640, 0xA66E).addRange(0xA67F, 0xA69D).addRange(0xA6A0, 0xA6EF).addRange(0xA717, 0xA71F).addRange(0xA722, 0xA788).addRange(0xA78B, 0xA7CA).addRange(0xA7D0, 0xA7D1).addRange(0xA7D5, 0xA7D9).addRange(0xA7F2, 0xA801).addRange(0xA803, 0xA805).addRange(0xA807, 0xA80A).addRange(0xA80C, 0xA822).addRange(0xA840, 0xA873).addRange(0xA882, 0xA8B3).addRange(0xA8F2, 0xA8F7).addRange(0xA8FD, 0xA8FE).addRange(0xA90A, 0xA925).addRange(0xA930, 0xA946).addRange(0xA960, 0xA97C).addRange(0xA984, 0xA9B2).addRange(0xA9E0, 0xA9E4).addRange(0xA9E6, 0xA9EF).addRange(0xA9FA, 0xA9FE).addRange(0xAA00, 0xAA28).addRange(0xAA40, 0xAA42).addRange(0xAA44, 0xAA4B).addRange(0xAA60, 0xAA76);\nset.addRange(0xAA7E, 0xAAAF).addRange(0xAAB5, 0xAAB6).addRange(0xAAB9, 0xAABD).addRange(0xAADB, 0xAADD).addRange(0xAAE0, 0xAAEA).addRange(0xAAF2, 0xAAF4).addRange(0xAB01, 0xAB06).addRange(0xAB09, 0xAB0E).addRange(0xAB11, 0xAB16).addRange(0xAB20, 0xAB26).addRange(0xAB28, 0xAB2E).addRange(0xAB30, 0xAB5A).addRange(0xAB5C, 0xAB69).addRange(0xAB70, 0xABE2).addRange(0xAC00, 0xD7A3).addRange(0xD7B0, 0xD7C6).addRange(0xD7CB, 0xD7FB).addRange(0xF900, 0xFA6D).addRange(0xFA70, 0xFAD9).addRange(0xFB00, 0xFB06).addRange(0xFB13, 0xFB17).addRange(0xFB1F, 0xFB28).addRange(0xFB2A, 0xFB36).addRange(0xFB38, 0xFB3C).addRange(0xFB40, 0xFB41).addRange(0xFB43, 0xFB44).addRange(0xFB46, 0xFBB1).addRange(0xFBD3, 0xFC5D).addRange(0xFC64, 0xFD3D).addRange(0xFD50, 0xFD8F).addRange(0xFD92, 0xFDC7).addRange(0xFDF0, 0xFDF9).addRange(0xFE7F, 0xFEFC).addRange(0xFF21, 0xFF3A).addRange(0xFF41, 0xFF5A).addRange(0xFF66, 0xFF9D).addRange(0xFFA0, 0xFFBE).addRange(0xFFC2, 0xFFC7).addRange(0xFFCA, 0xFFCF).addRange(0xFFD2, 0xFFD7).addRange(0xFFDA, 0xFFDC).addRange(0x10000, 0x1000B).addRange(0x1000D, 0x10026).addRange(0x10028, 0x1003A).addRange(0x1003C, 0x1003D).addRange(0x1003F, 0x1004D).addRange(0x10050, 0x1005D).addRange(0x10080, 0x100FA).addRange(0x10140, 0x10174).addRange(0x10280, 0x1029C).addRange(0x102A0, 0x102D0);\nset.addRange(0x10300, 0x1031F).addRange(0x1032D, 0x1034A).addRange(0x10350, 0x10375).addRange(0x10380, 0x1039D).addRange(0x103A0, 0x103C3).addRange(0x103C8, 0x103CF).addRange(0x103D1, 0x103D5).addRange(0x10400, 0x1049D).addRange(0x104B0, 0x104D3).addRange(0x104D8, 0x104FB).addRange(0x10500, 0x10527).addRange(0x10530, 0x10563).addRange(0x10570, 0x1057A).addRange(0x1057C, 0x1058A).addRange(0x1058C, 0x10592).addRange(0x10594, 0x10595).addRange(0x10597, 0x105A1).addRange(0x105A3, 0x105B1).addRange(0x105B3, 0x105B9).addRange(0x105BB, 0x105BC).addRange(0x10600, 0x10736).addRange(0x10740, 0x10755).addRange(0x10760, 0x10767).addRange(0x10780, 0x10785).addRange(0x10787, 0x107B0).addRange(0x107B2, 0x107BA).addRange(0x10800, 0x10805).addRange(0x1080A, 0x10835).addRange(0x10837, 0x10838).addRange(0x1083F, 0x10855).addRange(0x10860, 0x10876).addRange(0x10880, 0x1089E).addRange(0x108E0, 0x108F2).addRange(0x108F4, 0x108F5).addRange(0x10900, 0x10915).addRange(0x10920, 0x10939).addRange(0x10980, 0x109B7).addRange(0x109BE, 0x109BF).addRange(0x10A10, 0x10A13).addRange(0x10A15, 0x10A17).addRange(0x10A19, 0x10A35).addRange(0x10A60, 0x10A7C).addRange(0x10A80, 0x10A9C).addRange(0x10AC0, 0x10AC7).addRange(0x10AC9, 0x10AE4).addRange(0x10B00, 0x10B35).addRange(0x10B40, 0x10B55).addRange(0x10B60, 0x10B72).addRange(0x10B80, 0x10B91).addRange(0x10C00, 0x10C48).addRange(0x10C80, 0x10CB2);\nset.addRange(0x10CC0, 0x10CF2).addRange(0x10D00, 0x10D23).addRange(0x10E80, 0x10EA9).addRange(0x10EB0, 0x10EB1).addRange(0x10F00, 0x10F1C).addRange(0x10F30, 0x10F45).addRange(0x10F70, 0x10F81).addRange(0x10FB0, 0x10FC4).addRange(0x10FE0, 0x10FF6).addRange(0x11003, 0x11037).addRange(0x11071, 0x11072).addRange(0x11083, 0x110AF).addRange(0x110D0, 0x110E8).addRange(0x11103, 0x11126).addRange(0x11150, 0x11172).addRange(0x11183, 0x111B2).addRange(0x111C1, 0x111C4).addRange(0x11200, 0x11211).addRange(0x11213, 0x1122B).addRange(0x1123F, 0x11240).addRange(0x11280, 0x11286).addRange(0x1128A, 0x1128D).addRange(0x1128F, 0x1129D).addRange(0x1129F, 0x112A8).addRange(0x112B0, 0x112DE).addRange(0x11305, 0x1130C).addRange(0x1130F, 0x11310).addRange(0x11313, 0x11328).addRange(0x1132A, 0x11330).addRange(0x11332, 0x11333).addRange(0x11335, 0x11339).addRange(0x1135D, 0x11361).addRange(0x11400, 0x11434).addRange(0x11447, 0x1144A).addRange(0x1145F, 0x11461).addRange(0x11480, 0x114AF).addRange(0x114C4, 0x114C5).addRange(0x11580, 0x115AE).addRange(0x115D8, 0x115DB).addRange(0x11600, 0x1162F).addRange(0x11680, 0x116AA).addRange(0x11700, 0x1171A).addRange(0x11740, 0x11746).addRange(0x11800, 0x1182B).addRange(0x118A0, 0x118DF).addRange(0x118FF, 0x11906).addRange(0x1190C, 0x11913).addRange(0x11915, 0x11916).addRange(0x11918, 0x1192F).addRange(0x119A0, 0x119A7).addRange(0x119AA, 0x119D0);\nset.addRange(0x11A0B, 0x11A32).addRange(0x11A5C, 0x11A89).addRange(0x11AB0, 0x11AF8).addRange(0x11C00, 0x11C08).addRange(0x11C0A, 0x11C2E).addRange(0x11C72, 0x11C8F).addRange(0x11D00, 0x11D06).addRange(0x11D08, 0x11D09).addRange(0x11D0B, 0x11D30).addRange(0x11D60, 0x11D65).addRange(0x11D67, 0x11D68).addRange(0x11D6A, 0x11D89).addRange(0x11EE0, 0x11EF2).addRange(0x11F04, 0x11F10).addRange(0x11F12, 0x11F33).addRange(0x12000, 0x12399).addRange(0x12400, 0x1246E).addRange(0x12480, 0x12543).addRange(0x12F90, 0x12FF0).addRange(0x13000, 0x1342F).addRange(0x13441, 0x13446).addRange(0x14400, 0x14646).addRange(0x16800, 0x16A38).addRange(0x16A40, 0x16A5E).addRange(0x16A70, 0x16ABE).addRange(0x16AD0, 0x16AED).addRange(0x16B00, 0x16B2F).addRange(0x16B40, 0x16B43).addRange(0x16B63, 0x16B77).addRange(0x16B7D, 0x16B8F).addRange(0x16E40, 0x16E7F).addRange(0x16F00, 0x16F4A).addRange(0x16F93, 0x16F9F).addRange(0x16FE0, 0x16FE1).addRange(0x17000, 0x187F7).addRange(0x18800, 0x18CD5).addRange(0x18D00, 0x18D08).addRange(0x1AFF0, 0x1AFF3).addRange(0x1AFF5, 0x1AFFB).addRange(0x1AFFD, 0x1AFFE).addRange(0x1B000, 0x1B122).addRange(0x1B150, 0x1B152).addRange(0x1B164, 0x1B167).addRange(0x1B170, 0x1B2FB).addRange(0x1BC00, 0x1BC6A).addRange(0x1BC70, 0x1BC7C).addRange(0x1BC80, 0x1BC88).addRange(0x1BC90, 0x1BC99).addRange(0x1D400, 0x1D454).addRange(0x1D456, 0x1D49C).addRange(0x1D49E, 0x1D49F);\nset.addRange(0x1D4A5, 0x1D4A6).addRange(0x1D4A9, 0x1D4AC).addRange(0x1D4AE, 0x1D4B9).addRange(0x1D4BD, 0x1D4C3).addRange(0x1D4C5, 0x1D505).addRange(0x1D507, 0x1D50A).addRange(0x1D50D, 0x1D514).addRange(0x1D516, 0x1D51C).addRange(0x1D51E, 0x1D539).addRange(0x1D53B, 0x1D53E).addRange(0x1D540, 0x1D544).addRange(0x1D54A, 0x1D550).addRange(0x1D552, 0x1D6A5).addRange(0x1D6A8, 0x1D6C0).addRange(0x1D6C2, 0x1D6DA).addRange(0x1D6DC, 0x1D6FA).addRange(0x1D6FC, 0x1D714).addRange(0x1D716, 0x1D734).addRange(0x1D736, 0x1D74E).addRange(0x1D750, 0x1D76E).addRange(0x1D770, 0x1D788).addRange(0x1D78A, 0x1D7A8).addRange(0x1D7AA, 0x1D7C2).addRange(0x1D7C4, 0x1D7CB).addRange(0x1DF00, 0x1DF1E).addRange(0x1DF25, 0x1DF2A).addRange(0x1E030, 0x1E06D).addRange(0x1E100, 0x1E12C).addRange(0x1E137, 0x1E13D).addRange(0x1E290, 0x1E2AD).addRange(0x1E2C0, 0x1E2EB).addRange(0x1E4D0, 0x1E4EB).addRange(0x1E7E0, 0x1E7E6).addRange(0x1E7E8, 0x1E7EB).addRange(0x1E7ED, 0x1E7EE).addRange(0x1E7F0, 0x1E7FE).addRange(0x1E800, 0x1E8C4).addRange(0x1E900, 0x1E943).addRange(0x1EE00, 0x1EE03).addRange(0x1EE05, 0x1EE1F).addRange(0x1EE21, 0x1EE22).addRange(0x1EE29, 0x1EE32).addRange(0x1EE34, 0x1EE37).addRange(0x1EE4D, 0x1EE4F).addRange(0x1EE51, 0x1EE52).addRange(0x1EE61, 0x1EE62).addRange(0x1EE67, 0x1EE6A).addRange(0x1EE6C, 0x1EE72).addRange(0x1EE74, 0x1EE77).addRange(0x1EE79, 0x1EE7C).addRange(0x1EE80, 0x1EE89);\nset.addRange(0x1EE8B, 0x1EE9B).addRange(0x1EEA1, 0x1EEA3).addRange(0x1EEA5, 0x1EEA9).addRange(0x1EEAB, 0x1EEBB).addRange(0x20000, 0x2A6DF).addRange(0x2A700, 0x2B739).addRange(0x2B740, 0x2B81D).addRange(0x2B820, 0x2CEA1).addRange(0x2CEB0, 0x2EBE0).addRange(0x2EBF0, 0x2EE5D).addRange(0x2F800, 0x2FA1D).addRange(0x30000, 0x3134A).addRange(0x31350, 0x323AF);\nexports.characters = set;\n","const set = require('regenerate')(0xB5, 0x37F, 0x386, 0x38C, 0x10C7, 0x10CD, 0x1F59, 0x1F5B, 0x1F5D, 0x1FBE, 0x2102, 0x2107, 0x2115, 0x2124, 0x2126, 0x2128, 0x2139, 0x214E, 0x2D27, 0x2D2D, 0xA7D3, 0xA7FA, 0x1D4A2, 0x1D4BB, 0x1D546);\nset.addRange(0x41, 0x5A).addRange(0x61, 0x7A).addRange(0xC0, 0xD6).addRange(0xD8, 0xF6).addRange(0xF8, 0x1BA).addRange(0x1BC, 0x1BF).addRange(0x1C4, 0x293).addRange(0x295, 0x2AF).addRange(0x370, 0x373).addRange(0x376, 0x377).addRange(0x37B, 0x37D).addRange(0x388, 0x38A).addRange(0x38E, 0x3A1).addRange(0x3A3, 0x3F5).addRange(0x3F7, 0x481).addRange(0x48A, 0x52F).addRange(0x531, 0x556).addRange(0x560, 0x588).addRange(0x10A0, 0x10C5).addRange(0x10D0, 0x10FA).addRange(0x10FD, 0x10FF).addRange(0x13A0, 0x13F5).addRange(0x13F8, 0x13FD).addRange(0x1C80, 0x1C88).addRange(0x1C90, 0x1CBA).addRange(0x1CBD, 0x1CBF).addRange(0x1D00, 0x1D2B).addRange(0x1D6B, 0x1D77).addRange(0x1D79, 0x1D9A).addRange(0x1E00, 0x1F15).addRange(0x1F18, 0x1F1D).addRange(0x1F20, 0x1F45).addRange(0x1F48, 0x1F4D).addRange(0x1F50, 0x1F57).addRange(0x1F5F, 0x1F7D).addRange(0x1F80, 0x1FB4).addRange(0x1FB6, 0x1FBC).addRange(0x1FC2, 0x1FC4).addRange(0x1FC6, 0x1FCC).addRange(0x1FD0, 0x1FD3).addRange(0x1FD6, 0x1FDB).addRange(0x1FE0, 0x1FEC).addRange(0x1FF2, 0x1FF4).addRange(0x1FF6, 0x1FFC).addRange(0x210A, 0x2113).addRange(0x2119, 0x211D).addRange(0x212A, 0x212D).addRange(0x212F, 0x2134).addRange(0x213C, 0x213F).addRange(0x2145, 0x2149).addRange(0x2183, 0x2184);\nset.addRange(0x2C00, 0x2C7B).addRange(0x2C7E, 0x2CE4).addRange(0x2CEB, 0x2CEE).addRange(0x2CF2, 0x2CF3).addRange(0x2D00, 0x2D25).addRange(0xA640, 0xA66D).addRange(0xA680, 0xA69B).addRange(0xA722, 0xA76F).addRange(0xA771, 0xA787).addRange(0xA78B, 0xA78E).addRange(0xA790, 0xA7CA).addRange(0xA7D0, 0xA7D1).addRange(0xA7D5, 0xA7D9).addRange(0xA7F5, 0xA7F6).addRange(0xAB30, 0xAB5A).addRange(0xAB60, 0xAB68).addRange(0xAB70, 0xABBF).addRange(0xFB00, 0xFB06).addRange(0xFB13, 0xFB17).addRange(0xFF21, 0xFF3A).addRange(0xFF41, 0xFF5A).addRange(0x10400, 0x1044F).addRange(0x104B0, 0x104D3).addRange(0x104D8, 0x104FB).addRange(0x10570, 0x1057A).addRange(0x1057C, 0x1058A).addRange(0x1058C, 0x10592).addRange(0x10594, 0x10595).addRange(0x10597, 0x105A1).addRange(0x105A3, 0x105B1).addRange(0x105B3, 0x105B9).addRange(0x105BB, 0x105BC).addRange(0x10C80, 0x10CB2).addRange(0x10CC0, 0x10CF2).addRange(0x118A0, 0x118DF).addRange(0x16E40, 0x16E7F).addRange(0x1D400, 0x1D454).addRange(0x1D456, 0x1D49C).addRange(0x1D49E, 0x1D49F).addRange(0x1D4A5, 0x1D4A6).addRange(0x1D4A9, 0x1D4AC).addRange(0x1D4AE, 0x1D4B9).addRange(0x1D4BD, 0x1D4C3).addRange(0x1D4C5, 0x1D505).addRange(0x1D507, 0x1D50A).addRange(0x1D50D, 0x1D514).addRange(0x1D516, 0x1D51C).addRange(0x1D51E, 0x1D539).addRange(0x1D53B, 0x1D53E).addRange(0x1D540, 0x1D544).addRange(0x1D54A, 0x1D550);\nset.addRange(0x1D552, 0x1D6A5).addRange(0x1D6A8, 0x1D6C0).addRange(0x1D6C2, 0x1D6DA).addRange(0x1D6DC, 0x1D6FA).addRange(0x1D6FC, 0x1D714).addRange(0x1D716, 0x1D734).addRange(0x1D736, 0x1D74E).addRange(0x1D750, 0x1D76E).addRange(0x1D770, 0x1D788).addRange(0x1D78A, 0x1D7A8).addRange(0x1D7AA, 0x1D7C2).addRange(0x1D7C4, 0x1D7CB).addRange(0x1DF00, 0x1DF09).addRange(0x1DF0B, 0x1DF1E).addRange(0x1DF25, 0x1DF2A).addRange(0x1E900, 0x1E943);\nexports.characters = set;\n","const set = require('regenerate')(0x29, 0x5D, 0x7D, 0xF3B, 0xF3D, 0x169C, 0x2046, 0x207E, 0x208E, 0x2309, 0x230B, 0x232A, 0x2769, 0x276B, 0x276D, 0x276F, 0x2771, 0x2773, 0x2775, 0x27C6, 0x27E7, 0x27E9, 0x27EB, 0x27ED, 0x27EF, 0x2984, 0x2986, 0x2988, 0x298A, 0x298C, 0x298E, 0x2990, 0x2992, 0x2994, 0x2996, 0x2998, 0x29D9, 0x29DB, 0x29FD, 0x2E23, 0x2E25, 0x2E27, 0x2E29, 0x2E56, 0x2E58, 0x2E5A, 0x2E5C, 0x3009, 0x300B, 0x300D, 0x300F, 0x3011, 0x3015, 0x3017, 0x3019, 0x301B, 0xFD3E, 0xFE18, 0xFE36, 0xFE38, 0xFE3A, 0xFE3C, 0xFE3E, 0xFE40, 0xFE42, 0xFE44, 0xFE48, 0xFE5A, 0xFE5C, 0xFE5E, 0xFF09, 0xFF3D, 0xFF5D, 0xFF60, 0xFF63);\nset.addRange(0x301E, 0x301F);\nexports.characters = set;\n","const set = require('regenerate')(0x5F, 0x2054, 0xFF3F);\nset.addRange(0x203F, 0x2040).addRange(0xFE33, 0xFE34).addRange(0xFE4D, 0xFE4F);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x0, 0x1F).addRange(0x7F, 0x9F);\nexports.characters = set;\n","const set = require('regenerate')(0x24, 0x58F, 0x60B, 0x9FB, 0xAF1, 0xBF9, 0xE3F, 0x17DB, 0xA838, 0xFDFC, 0xFE69, 0xFF04, 0x1E2FF, 0x1ECB0);\nset.addRange(0xA2, 0xA5).addRange(0x7FE, 0x7FF).addRange(0x9F2, 0x9F3).addRange(0x20A0, 0x20C0).addRange(0xFFE0, 0xFFE1).addRange(0xFFE5, 0xFFE6).addRange(0x11FDD, 0x11FE0);\nexports.characters = set;\n","const set = require('regenerate')(0x2D, 0x58A, 0x5BE, 0x1400, 0x1806, 0x2E17, 0x2E1A, 0x2E40, 0x2E5D, 0x301C, 0x3030, 0x30A0, 0xFE58, 0xFE63, 0xFF0D, 0x10EAD);\nset.addRange(0x2010, 0x2015).addRange(0x2E3A, 0x2E3B).addRange(0xFE31, 0xFE32);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x30, 0x39).addRange(0x660, 0x669).addRange(0x6F0, 0x6F9).addRange(0x7C0, 0x7C9).addRange(0x966, 0x96F).addRange(0x9E6, 0x9EF).addRange(0xA66, 0xA6F).addRange(0xAE6, 0xAEF).addRange(0xB66, 0xB6F).addRange(0xBE6, 0xBEF).addRange(0xC66, 0xC6F).addRange(0xCE6, 0xCEF).addRange(0xD66, 0xD6F).addRange(0xDE6, 0xDEF).addRange(0xE50, 0xE59).addRange(0xED0, 0xED9).addRange(0xF20, 0xF29).addRange(0x1040, 0x1049).addRange(0x1090, 0x1099).addRange(0x17E0, 0x17E9).addRange(0x1810, 0x1819).addRange(0x1946, 0x194F).addRange(0x19D0, 0x19D9).addRange(0x1A80, 0x1A89).addRange(0x1A90, 0x1A99).addRange(0x1B50, 0x1B59).addRange(0x1BB0, 0x1BB9).addRange(0x1C40, 0x1C49).addRange(0x1C50, 0x1C59).addRange(0xA620, 0xA629).addRange(0xA8D0, 0xA8D9).addRange(0xA900, 0xA909).addRange(0xA9D0, 0xA9D9).addRange(0xA9F0, 0xA9F9).addRange(0xAA50, 0xAA59).addRange(0xABF0, 0xABF9).addRange(0xFF10, 0xFF19).addRange(0x104A0, 0x104A9).addRange(0x10D30, 0x10D39).addRange(0x11066, 0x1106F).addRange(0x110F0, 0x110F9).addRange(0x11136, 0x1113F).addRange(0x111D0, 0x111D9).addRange(0x112F0, 0x112F9).addRange(0x11450, 0x11459).addRange(0x114D0, 0x114D9).addRange(0x11650, 0x11659).addRange(0x116C0, 0x116C9).addRange(0x11730, 0x11739).addRange(0x118E0, 0x118E9).addRange(0x11950, 0x11959);\nset.addRange(0x11C50, 0x11C59).addRange(0x11D50, 0x11D59).addRange(0x11DA0, 0x11DA9).addRange(0x11F50, 0x11F59).addRange(0x16A60, 0x16A69).addRange(0x16AC0, 0x16AC9).addRange(0x16B50, 0x16B59).addRange(0x1D7CE, 0x1D7FF).addRange(0x1E140, 0x1E149).addRange(0x1E2F0, 0x1E2F9).addRange(0x1E4F0, 0x1E4F9).addRange(0x1E950, 0x1E959).addRange(0x1FBF0, 0x1FBF9);\nexports.characters = set;\n","const set = require('regenerate')(0x1ABE);\nset.addRange(0x488, 0x489).addRange(0x20DD, 0x20E0).addRange(0x20E2, 0x20E4).addRange(0xA670, 0xA672);\nexports.characters = set;\n","const set = require('regenerate')(0xBB, 0x2019, 0x201D, 0x203A, 0x2E03, 0x2E05, 0x2E0A, 0x2E0D, 0x2E1D, 0x2E21);\n\nexports.characters = set;\n","const set = require('regenerate')(0xAD, 0x61C, 0x6DD, 0x70F, 0x8E2, 0x180E, 0xFEFF, 0x110BD, 0x110CD, 0xE0001);\nset.addRange(0x600, 0x605).addRange(0x890, 0x891).addRange(0x200B, 0x200F).addRange(0x202A, 0x202E).addRange(0x2060, 0x2064).addRange(0x2066, 0x206F).addRange(0xFFF9, 0xFFFB).addRange(0x13430, 0x1343F).addRange(0x1BCA0, 0x1BCA3).addRange(0x1D173, 0x1D17A).addRange(0xE0020, 0xE007F);\nexports.characters = set;\n","const set = require('regenerate')(0xAB, 0x2018, 0x201F, 0x2039, 0x2E02, 0x2E04, 0x2E09, 0x2E0C, 0x2E1C, 0x2E20);\nset.addRange(0x201B, 0x201C);\nexports.characters = set;\n","const set = require('regenerate')(0x3007, 0x10341, 0x1034A);\nset.addRange(0x16EE, 0x16F0).addRange(0x2160, 0x2182).addRange(0x2185, 0x2188).addRange(0x3021, 0x3029).addRange(0x3038, 0x303A).addRange(0xA6E6, 0xA6EF).addRange(0x10140, 0x10174).addRange(0x103D1, 0x103D5).addRange(0x12400, 0x1246E);\nexports.characters = set;\n","const set = require('regenerate')(0xAA, 0xB5, 0xBA, 0x2EC, 0x2EE, 0x37F, 0x386, 0x38C, 0x559, 0x6D5, 0x6FF, 0x710, 0x7B1, 0x7FA, 0x81A, 0x824, 0x828, 0x93D, 0x950, 0x9B2, 0x9BD, 0x9CE, 0x9FC, 0xA5E, 0xABD, 0xAD0, 0xAF9, 0xB3D, 0xB71, 0xB83, 0xB9C, 0xBD0, 0xC3D, 0xC5D, 0xC80, 0xCBD, 0xD3D, 0xD4E, 0xDBD, 0xE84, 0xEA5, 0xEBD, 0xEC6, 0xF00, 0x103F, 0x1061, 0x108E, 0x10C7, 0x10CD, 0x1258, 0x12C0, 0x17D7, 0x17DC, 0x18AA, 0x1AA7, 0x1CFA, 0x1F59, 0x1F5B, 0x1F5D, 0x1FBE, 0x2071, 0x207F, 0x2102, 0x2107, 0x2115, 0x2124, 0x2126, 0x2128, 0x214E, 0x2D27, 0x2D2D, 0x2D6F, 0x2E2F, 0xA7D3, 0xA8FB, 0xA9CF, 0xAA7A, 0xAAB1, 0xAAC0, 0xAAC2, 0xFB1D, 0xFB3E, 0x10808, 0x1083C, 0x10A00, 0x10F27, 0x11075, 0x11144, 0x11147, 0x11176, 0x111DA, 0x111DC, 0x11288, 0x1133D, 0x11350, 0x114C7, 0x11644, 0x116B8, 0x11909, 0x1193F, 0x11941, 0x119E1, 0x119E3, 0x11A00, 0x11A3A, 0x11A50, 0x11A9D, 0x11C40, 0x11D46, 0x11D98, 0x11F02, 0x11FB0, 0x16F50, 0x16FE3, 0x1B132, 0x1B155, 0x1D4A2, 0x1D4BB, 0x1D546, 0x1E14E, 0x1E94B, 0x1EE24, 0x1EE27, 0x1EE39, 0x1EE3B, 0x1EE42, 0x1EE47, 0x1EE49, 0x1EE4B, 0x1EE54, 0x1EE57, 0x1EE59, 0x1EE5B, 0x1EE5D, 0x1EE5F, 0x1EE64, 0x1EE7E);\nset.addRange(0x41, 0x5A).addRange(0x61, 0x7A).addRange(0xC0, 0xD6).addRange(0xD8, 0xF6).addRange(0xF8, 0x2C1).addRange(0x2C6, 0x2D1).addRange(0x2E0, 0x2E4).addRange(0x370, 0x374).addRange(0x376, 0x377).addRange(0x37A, 0x37D).addRange(0x388, 0x38A).addRange(0x38E, 0x3A1).addRange(0x3A3, 0x3F5).addRange(0x3F7, 0x481).addRange(0x48A, 0x52F).addRange(0x531, 0x556).addRange(0x560, 0x588).addRange(0x5D0, 0x5EA).addRange(0x5EF, 0x5F2).addRange(0x620, 0x64A).addRange(0x66E, 0x66F).addRange(0x671, 0x6D3).addRange(0x6E5, 0x6E6).addRange(0x6EE, 0x6EF).addRange(0x6FA, 0x6FC).addRange(0x712, 0x72F).addRange(0x74D, 0x7A5).addRange(0x7CA, 0x7EA).addRange(0x7F4, 0x7F5).addRange(0x800, 0x815).addRange(0x840, 0x858).addRange(0x860, 0x86A).addRange(0x870, 0x887).addRange(0x889, 0x88E).addRange(0x8A0, 0x8C9).addRange(0x904, 0x939).addRange(0x958, 0x961).addRange(0x971, 0x980).addRange(0x985, 0x98C).addRange(0x98F, 0x990).addRange(0x993, 0x9A8).addRange(0x9AA, 0x9B0).addRange(0x9B6, 0x9B9).addRange(0x9DC, 0x9DD).addRange(0x9DF, 0x9E1).addRange(0x9F0, 0x9F1).addRange(0xA05, 0xA0A).addRange(0xA0F, 0xA10).addRange(0xA13, 0xA28).addRange(0xA2A, 0xA30).addRange(0xA32, 0xA33);\nset.addRange(0xA35, 0xA36).addRange(0xA38, 0xA39).addRange(0xA59, 0xA5C).addRange(0xA72, 0xA74).addRange(0xA85, 0xA8D).addRange(0xA8F, 0xA91).addRange(0xA93, 0xAA8).addRange(0xAAA, 0xAB0).addRange(0xAB2, 0xAB3).addRange(0xAB5, 0xAB9).addRange(0xAE0, 0xAE1).addRange(0xB05, 0xB0C).addRange(0xB0F, 0xB10).addRange(0xB13, 0xB28).addRange(0xB2A, 0xB30).addRange(0xB32, 0xB33).addRange(0xB35, 0xB39).addRange(0xB5C, 0xB5D).addRange(0xB5F, 0xB61).addRange(0xB85, 0xB8A).addRange(0xB8E, 0xB90).addRange(0xB92, 0xB95).addRange(0xB99, 0xB9A).addRange(0xB9E, 0xB9F).addRange(0xBA3, 0xBA4).addRange(0xBA8, 0xBAA).addRange(0xBAE, 0xBB9).addRange(0xC05, 0xC0C).addRange(0xC0E, 0xC10).addRange(0xC12, 0xC28).addRange(0xC2A, 0xC39).addRange(0xC58, 0xC5A).addRange(0xC60, 0xC61).addRange(0xC85, 0xC8C).addRange(0xC8E, 0xC90).addRange(0xC92, 0xCA8).addRange(0xCAA, 0xCB3).addRange(0xCB5, 0xCB9).addRange(0xCDD, 0xCDE).addRange(0xCE0, 0xCE1).addRange(0xCF1, 0xCF2).addRange(0xD04, 0xD0C).addRange(0xD0E, 0xD10).addRange(0xD12, 0xD3A).addRange(0xD54, 0xD56).addRange(0xD5F, 0xD61).addRange(0xD7A, 0xD7F).addRange(0xD85, 0xD96).addRange(0xD9A, 0xDB1).addRange(0xDB3, 0xDBB).addRange(0xDC0, 0xDC6);\nset.addRange(0xE01, 0xE30).addRange(0xE32, 0xE33).addRange(0xE40, 0xE46).addRange(0xE81, 0xE82).addRange(0xE86, 0xE8A).addRange(0xE8C, 0xEA3).addRange(0xEA7, 0xEB0).addRange(0xEB2, 0xEB3).addRange(0xEC0, 0xEC4).addRange(0xEDC, 0xEDF).addRange(0xF40, 0xF47).addRange(0xF49, 0xF6C).addRange(0xF88, 0xF8C).addRange(0x1000, 0x102A).addRange(0x1050, 0x1055).addRange(0x105A, 0x105D).addRange(0x1065, 0x1066).addRange(0x106E, 0x1070).addRange(0x1075, 0x1081).addRange(0x10A0, 0x10C5).addRange(0x10D0, 0x10FA).addRange(0x10FC, 0x1248).addRange(0x124A, 0x124D).addRange(0x1250, 0x1256).addRange(0x125A, 0x125D).addRange(0x1260, 0x1288).addRange(0x128A, 0x128D).addRange(0x1290, 0x12B0).addRange(0x12B2, 0x12B5).addRange(0x12B8, 0x12BE).addRange(0x12C2, 0x12C5).addRange(0x12C8, 0x12D6).addRange(0x12D8, 0x1310).addRange(0x1312, 0x1315).addRange(0x1318, 0x135A).addRange(0x1380, 0x138F).addRange(0x13A0, 0x13F5).addRange(0x13F8, 0x13FD).addRange(0x1401, 0x166C).addRange(0x166F, 0x167F).addRange(0x1681, 0x169A).addRange(0x16A0, 0x16EA).addRange(0x16F1, 0x16F8).addRange(0x1700, 0x1711).addRange(0x171F, 0x1731).addRange(0x1740, 0x1751).addRange(0x1760, 0x176C).addRange(0x176E, 0x1770).addRange(0x1780, 0x17B3).addRange(0x1820, 0x1878).addRange(0x1880, 0x1884);\nset.addRange(0x1887, 0x18A8).addRange(0x18B0, 0x18F5).addRange(0x1900, 0x191E).addRange(0x1950, 0x196D).addRange(0x1970, 0x1974).addRange(0x1980, 0x19AB).addRange(0x19B0, 0x19C9).addRange(0x1A00, 0x1A16).addRange(0x1A20, 0x1A54).addRange(0x1B05, 0x1B33).addRange(0x1B45, 0x1B4C).addRange(0x1B83, 0x1BA0).addRange(0x1BAE, 0x1BAF).addRange(0x1BBA, 0x1BE5).addRange(0x1C00, 0x1C23).addRange(0x1C4D, 0x1C4F).addRange(0x1C5A, 0x1C7D).addRange(0x1C80, 0x1C88).addRange(0x1C90, 0x1CBA).addRange(0x1CBD, 0x1CBF).addRange(0x1CE9, 0x1CEC).addRange(0x1CEE, 0x1CF3).addRange(0x1CF5, 0x1CF6).addRange(0x1D00, 0x1DBF).addRange(0x1E00, 0x1F15).addRange(0x1F18, 0x1F1D).addRange(0x1F20, 0x1F45).addRange(0x1F48, 0x1F4D).addRange(0x1F50, 0x1F57).addRange(0x1F5F, 0x1F7D).addRange(0x1F80, 0x1FB4).addRange(0x1FB6, 0x1FBC).addRange(0x1FC2, 0x1FC4).addRange(0x1FC6, 0x1FCC).addRange(0x1FD0, 0x1FD3).addRange(0x1FD6, 0x1FDB).addRange(0x1FE0, 0x1FEC).addRange(0x1FF2, 0x1FF4).addRange(0x1FF6, 0x1FFC).addRange(0x2090, 0x209C).addRange(0x210A, 0x2113).addRange(0x2119, 0x211D).addRange(0x212A, 0x212D).addRange(0x212F, 0x2139).addRange(0x213C, 0x213F).addRange(0x2145, 0x2149).addRange(0x2183, 0x2184).addRange(0x2C00, 0x2CE4).addRange(0x2CEB, 0x2CEE).addRange(0x2CF2, 0x2CF3).addRange(0x2D00, 0x2D25);\nset.addRange(0x2D30, 0x2D67).addRange(0x2D80, 0x2D96).addRange(0x2DA0, 0x2DA6).addRange(0x2DA8, 0x2DAE).addRange(0x2DB0, 0x2DB6).addRange(0x2DB8, 0x2DBE).addRange(0x2DC0, 0x2DC6).addRange(0x2DC8, 0x2DCE).addRange(0x2DD0, 0x2DD6).addRange(0x2DD8, 0x2DDE).addRange(0x3005, 0x3006).addRange(0x3031, 0x3035).addRange(0x303B, 0x303C).addRange(0x3041, 0x3096).addRange(0x309D, 0x309F).addRange(0x30A1, 0x30FA).addRange(0x30FC, 0x30FF).addRange(0x3105, 0x312F).addRange(0x3131, 0x318E).addRange(0x31A0, 0x31BF).addRange(0x31F0, 0x31FF).addRange(0x3400, 0x4DBF).addRange(0x4E00, 0xA48C).addRange(0xA4D0, 0xA4FD).addRange(0xA500, 0xA60C).addRange(0xA610, 0xA61F).addRange(0xA62A, 0xA62B).addRange(0xA640, 0xA66E).addRange(0xA67F, 0xA69D).addRange(0xA6A0, 0xA6E5).addRange(0xA717, 0xA71F).addRange(0xA722, 0xA788).addRange(0xA78B, 0xA7CA).addRange(0xA7D0, 0xA7D1).addRange(0xA7D5, 0xA7D9).addRange(0xA7F2, 0xA801).addRange(0xA803, 0xA805).addRange(0xA807, 0xA80A).addRange(0xA80C, 0xA822).addRange(0xA840, 0xA873).addRange(0xA882, 0xA8B3).addRange(0xA8F2, 0xA8F7).addRange(0xA8FD, 0xA8FE).addRange(0xA90A, 0xA925).addRange(0xA930, 0xA946).addRange(0xA960, 0xA97C).addRange(0xA984, 0xA9B2).addRange(0xA9E0, 0xA9E4).addRange(0xA9E6, 0xA9EF).addRange(0xA9FA, 0xA9FE).addRange(0xAA00, 0xAA28);\nset.addRange(0xAA40, 0xAA42).addRange(0xAA44, 0xAA4B).addRange(0xAA60, 0xAA76).addRange(0xAA7E, 0xAAAF).addRange(0xAAB5, 0xAAB6).addRange(0xAAB9, 0xAABD).addRange(0xAADB, 0xAADD).addRange(0xAAE0, 0xAAEA).addRange(0xAAF2, 0xAAF4).addRange(0xAB01, 0xAB06).addRange(0xAB09, 0xAB0E).addRange(0xAB11, 0xAB16).addRange(0xAB20, 0xAB26).addRange(0xAB28, 0xAB2E).addRange(0xAB30, 0xAB5A).addRange(0xAB5C, 0xAB69).addRange(0xAB70, 0xABE2).addRange(0xAC00, 0xD7A3).addRange(0xD7B0, 0xD7C6).addRange(0xD7CB, 0xD7FB).addRange(0xF900, 0xFA6D).addRange(0xFA70, 0xFAD9).addRange(0xFB00, 0xFB06).addRange(0xFB13, 0xFB17).addRange(0xFB1F, 0xFB28).addRange(0xFB2A, 0xFB36).addRange(0xFB38, 0xFB3C).addRange(0xFB40, 0xFB41).addRange(0xFB43, 0xFB44).addRange(0xFB46, 0xFBB1).addRange(0xFBD3, 0xFD3D).addRange(0xFD50, 0xFD8F).addRange(0xFD92, 0xFDC7).addRange(0xFDF0, 0xFDFB).addRange(0xFE70, 0xFE74).addRange(0xFE76, 0xFEFC).addRange(0xFF21, 0xFF3A).addRange(0xFF41, 0xFF5A).addRange(0xFF66, 0xFFBE).addRange(0xFFC2, 0xFFC7).addRange(0xFFCA, 0xFFCF).addRange(0xFFD2, 0xFFD7).addRange(0xFFDA, 0xFFDC).addRange(0x10000, 0x1000B).addRange(0x1000D, 0x10026).addRange(0x10028, 0x1003A).addRange(0x1003C, 0x1003D).addRange(0x1003F, 0x1004D).addRange(0x10050, 0x1005D).addRange(0x10080, 0x100FA).addRange(0x10280, 0x1029C);\nset.addRange(0x102A0, 0x102D0).addRange(0x10300, 0x1031F).addRange(0x1032D, 0x10340).addRange(0x10342, 0x10349).addRange(0x10350, 0x10375).addRange(0x10380, 0x1039D).addRange(0x103A0, 0x103C3).addRange(0x103C8, 0x103CF).addRange(0x10400, 0x1049D).addRange(0x104B0, 0x104D3).addRange(0x104D8, 0x104FB).addRange(0x10500, 0x10527).addRange(0x10530, 0x10563).addRange(0x10570, 0x1057A).addRange(0x1057C, 0x1058A).addRange(0x1058C, 0x10592).addRange(0x10594, 0x10595).addRange(0x10597, 0x105A1).addRange(0x105A3, 0x105B1).addRange(0x105B3, 0x105B9).addRange(0x105BB, 0x105BC).addRange(0x10600, 0x10736).addRange(0x10740, 0x10755).addRange(0x10760, 0x10767).addRange(0x10780, 0x10785).addRange(0x10787, 0x107B0).addRange(0x107B2, 0x107BA).addRange(0x10800, 0x10805).addRange(0x1080A, 0x10835).addRange(0x10837, 0x10838).addRange(0x1083F, 0x10855).addRange(0x10860, 0x10876).addRange(0x10880, 0x1089E).addRange(0x108E0, 0x108F2).addRange(0x108F4, 0x108F5).addRange(0x10900, 0x10915).addRange(0x10920, 0x10939).addRange(0x10980, 0x109B7).addRange(0x109BE, 0x109BF).addRange(0x10A10, 0x10A13).addRange(0x10A15, 0x10A17).addRange(0x10A19, 0x10A35).addRange(0x10A60, 0x10A7C).addRange(0x10A80, 0x10A9C).addRange(0x10AC0, 0x10AC7).addRange(0x10AC9, 0x10AE4).addRange(0x10B00, 0x10B35).addRange(0x10B40, 0x10B55).addRange(0x10B60, 0x10B72).addRange(0x10B80, 0x10B91).addRange(0x10C00, 0x10C48);\nset.addRange(0x10C80, 0x10CB2).addRange(0x10CC0, 0x10CF2).addRange(0x10D00, 0x10D23).addRange(0x10E80, 0x10EA9).addRange(0x10EB0, 0x10EB1).addRange(0x10F00, 0x10F1C).addRange(0x10F30, 0x10F45).addRange(0x10F70, 0x10F81).addRange(0x10FB0, 0x10FC4).addRange(0x10FE0, 0x10FF6).addRange(0x11003, 0x11037).addRange(0x11071, 0x11072).addRange(0x11083, 0x110AF).addRange(0x110D0, 0x110E8).addRange(0x11103, 0x11126).addRange(0x11150, 0x11172).addRange(0x11183, 0x111B2).addRange(0x111C1, 0x111C4).addRange(0x11200, 0x11211).addRange(0x11213, 0x1122B).addRange(0x1123F, 0x11240).addRange(0x11280, 0x11286).addRange(0x1128A, 0x1128D).addRange(0x1128F, 0x1129D).addRange(0x1129F, 0x112A8).addRange(0x112B0, 0x112DE).addRange(0x11305, 0x1130C).addRange(0x1130F, 0x11310).addRange(0x11313, 0x11328).addRange(0x1132A, 0x11330).addRange(0x11332, 0x11333).addRange(0x11335, 0x11339).addRange(0x1135D, 0x11361).addRange(0x11400, 0x11434).addRange(0x11447, 0x1144A).addRange(0x1145F, 0x11461).addRange(0x11480, 0x114AF).addRange(0x114C4, 0x114C5).addRange(0x11580, 0x115AE).addRange(0x115D8, 0x115DB).addRange(0x11600, 0x1162F).addRange(0x11680, 0x116AA).addRange(0x11700, 0x1171A).addRange(0x11740, 0x11746).addRange(0x11800, 0x1182B).addRange(0x118A0, 0x118DF).addRange(0x118FF, 0x11906).addRange(0x1190C, 0x11913).addRange(0x11915, 0x11916).addRange(0x11918, 0x1192F).addRange(0x119A0, 0x119A7);\nset.addRange(0x119AA, 0x119D0).addRange(0x11A0B, 0x11A32).addRange(0x11A5C, 0x11A89).addRange(0x11AB0, 0x11AF8).addRange(0x11C00, 0x11C08).addRange(0x11C0A, 0x11C2E).addRange(0x11C72, 0x11C8F).addRange(0x11D00, 0x11D06).addRange(0x11D08, 0x11D09).addRange(0x11D0B, 0x11D30).addRange(0x11D60, 0x11D65).addRange(0x11D67, 0x11D68).addRange(0x11D6A, 0x11D89).addRange(0x11EE0, 0x11EF2).addRange(0x11F04, 0x11F10).addRange(0x11F12, 0x11F33).addRange(0x12000, 0x12399).addRange(0x12480, 0x12543).addRange(0x12F90, 0x12FF0).addRange(0x13000, 0x1342F).addRange(0x13441, 0x13446).addRange(0x14400, 0x14646).addRange(0x16800, 0x16A38).addRange(0x16A40, 0x16A5E).addRange(0x16A70, 0x16ABE).addRange(0x16AD0, 0x16AED).addRange(0x16B00, 0x16B2F).addRange(0x16B40, 0x16B43).addRange(0x16B63, 0x16B77).addRange(0x16B7D, 0x16B8F).addRange(0x16E40, 0x16E7F).addRange(0x16F00, 0x16F4A).addRange(0x16F93, 0x16F9F).addRange(0x16FE0, 0x16FE1).addRange(0x17000, 0x187F7).addRange(0x18800, 0x18CD5).addRange(0x18D00, 0x18D08).addRange(0x1AFF0, 0x1AFF3).addRange(0x1AFF5, 0x1AFFB).addRange(0x1AFFD, 0x1AFFE).addRange(0x1B000, 0x1B122).addRange(0x1B150, 0x1B152).addRange(0x1B164, 0x1B167).addRange(0x1B170, 0x1B2FB).addRange(0x1BC00, 0x1BC6A).addRange(0x1BC70, 0x1BC7C).addRange(0x1BC80, 0x1BC88).addRange(0x1BC90, 0x1BC99).addRange(0x1D400, 0x1D454).addRange(0x1D456, 0x1D49C).addRange(0x1D49E, 0x1D49F);\nset.addRange(0x1D4A5, 0x1D4A6).addRange(0x1D4A9, 0x1D4AC).addRange(0x1D4AE, 0x1D4B9).addRange(0x1D4BD, 0x1D4C3).addRange(0x1D4C5, 0x1D505).addRange(0x1D507, 0x1D50A).addRange(0x1D50D, 0x1D514).addRange(0x1D516, 0x1D51C).addRange(0x1D51E, 0x1D539).addRange(0x1D53B, 0x1D53E).addRange(0x1D540, 0x1D544).addRange(0x1D54A, 0x1D550).addRange(0x1D552, 0x1D6A5).addRange(0x1D6A8, 0x1D6C0).addRange(0x1D6C2, 0x1D6DA).addRange(0x1D6DC, 0x1D6FA).addRange(0x1D6FC, 0x1D714).addRange(0x1D716, 0x1D734).addRange(0x1D736, 0x1D74E).addRange(0x1D750, 0x1D76E).addRange(0x1D770, 0x1D788).addRange(0x1D78A, 0x1D7A8).addRange(0x1D7AA, 0x1D7C2).addRange(0x1D7C4, 0x1D7CB).addRange(0x1DF00, 0x1DF1E).addRange(0x1DF25, 0x1DF2A).addRange(0x1E030, 0x1E06D).addRange(0x1E100, 0x1E12C).addRange(0x1E137, 0x1E13D).addRange(0x1E290, 0x1E2AD).addRange(0x1E2C0, 0x1E2EB).addRange(0x1E4D0, 0x1E4EB).addRange(0x1E7E0, 0x1E7E6).addRange(0x1E7E8, 0x1E7EB).addRange(0x1E7ED, 0x1E7EE).addRange(0x1E7F0, 0x1E7FE).addRange(0x1E800, 0x1E8C4).addRange(0x1E900, 0x1E943).addRange(0x1EE00, 0x1EE03).addRange(0x1EE05, 0x1EE1F).addRange(0x1EE21, 0x1EE22).addRange(0x1EE29, 0x1EE32).addRange(0x1EE34, 0x1EE37).addRange(0x1EE4D, 0x1EE4F).addRange(0x1EE51, 0x1EE52).addRange(0x1EE61, 0x1EE62).addRange(0x1EE67, 0x1EE6A).addRange(0x1EE6C, 0x1EE72).addRange(0x1EE74, 0x1EE77).addRange(0x1EE79, 0x1EE7C).addRange(0x1EE80, 0x1EE89);\nset.addRange(0x1EE8B, 0x1EE9B).addRange(0x1EEA1, 0x1EEA3).addRange(0x1EEA5, 0x1EEA9).addRange(0x1EEAB, 0x1EEBB).addRange(0x20000, 0x2A6DF).addRange(0x2A700, 0x2B739).addRange(0x2B740, 0x2B81D).addRange(0x2B820, 0x2CEA1).addRange(0x2CEB0, 0x2EBE0).addRange(0x2EBF0, 0x2EE5D).addRange(0x2F800, 0x2FA1D).addRange(0x30000, 0x3134A).addRange(0x31350, 0x323AF);\nexports.characters = set;\n","const set = require('regenerate')(0x2028);\n\nexports.characters = set;\n","const set = require('regenerate')(0xB5, 0x101, 0x103, 0x105, 0x107, 0x109, 0x10B, 0x10D, 0x10F, 0x111, 0x113, 0x115, 0x117, 0x119, 0x11B, 0x11D, 0x11F, 0x121, 0x123, 0x125, 0x127, 0x129, 0x12B, 0x12D, 0x12F, 0x131, 0x133, 0x135, 0x13A, 0x13C, 0x13E, 0x140, 0x142, 0x144, 0x146, 0x14B, 0x14D, 0x14F, 0x151, 0x153, 0x155, 0x157, 0x159, 0x15B, 0x15D, 0x15F, 0x161, 0x163, 0x165, 0x167, 0x169, 0x16B, 0x16D, 0x16F, 0x171, 0x173, 0x175, 0x177, 0x17A, 0x17C, 0x183, 0x185, 0x188, 0x192, 0x195, 0x19E, 0x1A1, 0x1A3, 0x1A5, 0x1A8, 0x1AD, 0x1B0, 0x1B4, 0x1B6, 0x1C6, 0x1C9, 0x1CC, 0x1CE, 0x1D0, 0x1D2, 0x1D4, 0x1D6, 0x1D8, 0x1DA, 0x1DF, 0x1E1, 0x1E3, 0x1E5, 0x1E7, 0x1E9, 0x1EB, 0x1ED, 0x1F3, 0x1F5, 0x1F9, 0x1FB, 0x1FD, 0x1FF, 0x201, 0x203, 0x205, 0x207, 0x209, 0x20B, 0x20D, 0x20F, 0x211, 0x213, 0x215, 0x217, 0x219, 0x21B, 0x21D, 0x21F, 0x221, 0x223, 0x225, 0x227, 0x229, 0x22B, 0x22D, 0x22F, 0x231, 0x23C, 0x242, 0x247, 0x249, 0x24B, 0x24D, 0x371, 0x373, 0x377, 0x390, 0x3D9, 0x3DB, 0x3DD, 0x3DF, 0x3E1, 0x3E3, 0x3E5, 0x3E7, 0x3E9, 0x3EB, 0x3ED, 0x3F5, 0x3F8, 0x461, 0x463, 0x465, 0x467, 0x469, 0x46B, 0x46D, 0x46F, 0x471, 0x473, 0x475, 0x477, 0x479, 0x47B, 0x47D, 0x47F, 0x481, 0x48B, 0x48D, 0x48F, 0x491, 0x493, 0x495, 0x497, 0x499, 0x49B, 0x49D, 0x49F, 0x4A1, 0x4A3, 0x4A5, 0x4A7, 0x4A9, 0x4AB, 0x4AD, 0x4AF, 0x4B1, 0x4B3, 0x4B5, 0x4B7, 0x4B9, 0x4BB, 0x4BD, 0x4BF, 0x4C2, 0x4C4, 0x4C6, 0x4C8, 0x4CA, 0x4CC, 0x4D1, 0x4D3, 0x4D5, 0x4D7, 0x4D9, 0x4DB, 0x4DD, 0x4DF, 0x4E1, 0x4E3, 0x4E5, 0x4E7, 0x4E9, 0x4EB, 0x4ED, 0x4EF, 0x4F1, 0x4F3, 0x4F5, 0x4F7, 0x4F9, 0x4FB, 0x4FD, 0x4FF, 0x501, 0x503, 0x505, 0x507, 0x509, 0x50B, 0x50D, 0x50F, 0x511, 0x513, 0x515, 0x517, 0x519, 0x51B, 0x51D, 0x51F, 0x521, 0x523, 0x525, 0x527, 0x529, 0x52B, 0x52D, 0x52F, 0x1E01, 0x1E03, 0x1E05, 0x1E07, 0x1E09, 0x1E0B, 0x1E0D, 0x1E0F, 0x1E11, 0x1E13, 0x1E15, 0x1E17, 0x1E19, 0x1E1B, 0x1E1D, 0x1E1F, 0x1E21, 0x1E23, 0x1E25, 0x1E27, 0x1E29, 0x1E2B, 0x1E2D, 0x1E2F, 0x1E31, 0x1E33, 0x1E35, 0x1E37, 0x1E39, 0x1E3B, 0x1E3D, 0x1E3F, 0x1E41, 0x1E43, 0x1E45, 0x1E47, 0x1E49, 0x1E4B, 0x1E4D, 0x1E4F, 0x1E51, 0x1E53, 0x1E55, 0x1E57, 0x1E59, 0x1E5B, 0x1E5D, 0x1E5F, 0x1E61, 0x1E63, 0x1E65, 0x1E67, 0x1E69, 0x1E6B, 0x1E6D, 0x1E6F, 0x1E71, 0x1E73, 0x1E75, 0x1E77, 0x1E79, 0x1E7B, 0x1E7D, 0x1E7F, 0x1E81, 0x1E83, 0x1E85, 0x1E87, 0x1E89, 0x1E8B, 0x1E8D, 0x1E8F, 0x1E91, 0x1E93, 0x1E9F, 0x1EA1, 0x1EA3, 0x1EA5, 0x1EA7, 0x1EA9, 0x1EAB, 0x1EAD, 0x1EAF, 0x1EB1, 0x1EB3, 0x1EB5, 0x1EB7, 0x1EB9, 0x1EBB, 0x1EBD, 0x1EBF, 0x1EC1, 0x1EC3, 0x1EC5, 0x1EC7, 0x1EC9, 0x1ECB, 0x1ECD, 0x1ECF, 0x1ED1, 0x1ED3, 0x1ED5, 0x1ED7, 0x1ED9, 0x1EDB, 0x1EDD, 0x1EDF, 0x1EE1, 0x1EE3, 0x1EE5, 0x1EE7, 0x1EE9, 0x1EEB, 0x1EED, 0x1EEF, 0x1EF1, 0x1EF3, 0x1EF5, 0x1EF7, 0x1EF9, 0x1EFB, 0x1EFD, 0x1FBE, 0x210A, 0x2113, 0x212F, 0x2134, 0x2139, 0x214E, 0x2184, 0x2C61, 0x2C68, 0x2C6A, 0x2C6C, 0x2C71, 0x2C81, 0x2C83, 0x2C85, 0x2C87, 0x2C89, 0x2C8B, 0x2C8D, 0x2C8F, 0x2C91, 0x2C93, 0x2C95, 0x2C97, 0x2C99, 0x2C9B, 0x2C9D, 0x2C9F, 0x2CA1, 0x2CA3, 0x2CA5, 0x2CA7, 0x2CA9, 0x2CAB, 0x2CAD, 0x2CAF, 0x2CB1, 0x2CB3, 0x2CB5, 0x2CB7, 0x2CB9, 0x2CBB, 0x2CBD, 0x2CBF, 0x2CC1, 0x2CC3, 0x2CC5, 0x2CC7, 0x2CC9, 0x2CCB, 0x2CCD, 0x2CCF, 0x2CD1, 0x2CD3, 0x2CD5, 0x2CD7, 0x2CD9, 0x2CDB, 0x2CDD, 0x2CDF, 0x2CE1, 0x2CEC, 0x2CEE, 0x2CF3, 0x2D27, 0x2D2D, 0xA641, 0xA643, 0xA645, 0xA647, 0xA649, 0xA64B, 0xA64D, 0xA64F, 0xA651, 0xA653, 0xA655, 0xA657, 0xA659, 0xA65B, 0xA65D, 0xA65F, 0xA661, 0xA663, 0xA665, 0xA667, 0xA669, 0xA66B, 0xA66D, 0xA681, 0xA683, 0xA685, 0xA687, 0xA689, 0xA68B, 0xA68D, 0xA68F, 0xA691, 0xA693, 0xA695, 0xA697, 0xA699, 0xA69B, 0xA723, 0xA725, 0xA727, 0xA729, 0xA72B, 0xA72D, 0xA733, 0xA735, 0xA737, 0xA739, 0xA73B, 0xA73D, 0xA73F, 0xA741, 0xA743, 0xA745, 0xA747, 0xA749, 0xA74B, 0xA74D, 0xA74F, 0xA751, 0xA753, 0xA755, 0xA757, 0xA759, 0xA75B, 0xA75D, 0xA75F, 0xA761, 0xA763, 0xA765, 0xA767, 0xA769, 0xA76B, 0xA76D, 0xA76F, 0xA77A, 0xA77C, 0xA77F, 0xA781, 0xA783, 0xA785, 0xA787, 0xA78C, 0xA78E, 0xA791, 0xA797, 0xA799, 0xA79B, 0xA79D, 0xA79F, 0xA7A1, 0xA7A3, 0xA7A5, 0xA7A7, 0xA7A9, 0xA7AF, 0xA7B5, 0xA7B7, 0xA7B9, 0xA7BB, 0xA7BD, 0xA7BF, 0xA7C1, 0xA7C3, 0xA7C8, 0xA7CA, 0xA7D1, 0xA7D3, 0xA7D5, 0xA7D7, 0xA7D9, 0xA7F6, 0xA7FA, 0x1D4BB, 0x1D7CB);\nset.addRange(0x61, 0x7A).addRange(0xDF, 0xF6).addRange(0xF8, 0xFF).addRange(0x137, 0x138).addRange(0x148, 0x149).addRange(0x17E, 0x180).addRange(0x18C, 0x18D).addRange(0x199, 0x19B).addRange(0x1AA, 0x1AB).addRange(0x1B9, 0x1BA).addRange(0x1BD, 0x1BF).addRange(0x1DC, 0x1DD).addRange(0x1EF, 0x1F0).addRange(0x233, 0x239).addRange(0x23F, 0x240).addRange(0x24F, 0x293).addRange(0x295, 0x2AF).addRange(0x37B, 0x37D).addRange(0x3AC, 0x3CE).addRange(0x3D0, 0x3D1).addRange(0x3D5, 0x3D7).addRange(0x3EF, 0x3F3).addRange(0x3FB, 0x3FC).addRange(0x430, 0x45F).addRange(0x4CE, 0x4CF).addRange(0x560, 0x588).addRange(0x10D0, 0x10FA).addRange(0x10FD, 0x10FF).addRange(0x13F8, 0x13FD).addRange(0x1C80, 0x1C88).addRange(0x1D00, 0x1D2B).addRange(0x1D6B, 0x1D77).addRange(0x1D79, 0x1D9A).addRange(0x1E95, 0x1E9D).addRange(0x1EFF, 0x1F07).addRange(0x1F10, 0x1F15).addRange(0x1F20, 0x1F27).addRange(0x1F30, 0x1F37).addRange(0x1F40, 0x1F45).addRange(0x1F50, 0x1F57).addRange(0x1F60, 0x1F67).addRange(0x1F70, 0x1F7D).addRange(0x1F80, 0x1F87).addRange(0x1F90, 0x1F97).addRange(0x1FA0, 0x1FA7).addRange(0x1FB0, 0x1FB4).addRange(0x1FB6, 0x1FB7).addRange(0x1FC2, 0x1FC4).addRange(0x1FC6, 0x1FC7).addRange(0x1FD0, 0x1FD3).addRange(0x1FD6, 0x1FD7);\nset.addRange(0x1FE0, 0x1FE7).addRange(0x1FF2, 0x1FF4).addRange(0x1FF6, 0x1FF7).addRange(0x210E, 0x210F).addRange(0x213C, 0x213D).addRange(0x2146, 0x2149).addRange(0x2C30, 0x2C5F).addRange(0x2C65, 0x2C66).addRange(0x2C73, 0x2C74).addRange(0x2C76, 0x2C7B).addRange(0x2CE3, 0x2CE4).addRange(0x2D00, 0x2D25).addRange(0xA72F, 0xA731).addRange(0xA771, 0xA778).addRange(0xA793, 0xA795).addRange(0xAB30, 0xAB5A).addRange(0xAB60, 0xAB68).addRange(0xAB70, 0xABBF).addRange(0xFB00, 0xFB06).addRange(0xFB13, 0xFB17).addRange(0xFF41, 0xFF5A).addRange(0x10428, 0x1044F).addRange(0x104D8, 0x104FB).addRange(0x10597, 0x105A1).addRange(0x105A3, 0x105B1).addRange(0x105B3, 0x105B9).addRange(0x105BB, 0x105BC).addRange(0x10CC0, 0x10CF2).addRange(0x118C0, 0x118DF).addRange(0x16E60, 0x16E7F).addRange(0x1D41A, 0x1D433).addRange(0x1D44E, 0x1D454).addRange(0x1D456, 0x1D467).addRange(0x1D482, 0x1D49B).addRange(0x1D4B6, 0x1D4B9).addRange(0x1D4BD, 0x1D4C3).addRange(0x1D4C5, 0x1D4CF).addRange(0x1D4EA, 0x1D503).addRange(0x1D51E, 0x1D537).addRange(0x1D552, 0x1D56B).addRange(0x1D586, 0x1D59F).addRange(0x1D5BA, 0x1D5D3).addRange(0x1D5EE, 0x1D607).addRange(0x1D622, 0x1D63B).addRange(0x1D656, 0x1D66F).addRange(0x1D68A, 0x1D6A5).addRange(0x1D6C2, 0x1D6DA).addRange(0x1D6DC, 0x1D6E1).addRange(0x1D6FC, 0x1D714).addRange(0x1D716, 0x1D71B).addRange(0x1D736, 0x1D74E);\nset.addRange(0x1D750, 0x1D755).addRange(0x1D770, 0x1D788).addRange(0x1D78A, 0x1D78F).addRange(0x1D7AA, 0x1D7C2).addRange(0x1D7C4, 0x1D7C9).addRange(0x1DF00, 0x1DF09).addRange(0x1DF0B, 0x1DF1E).addRange(0x1DF25, 0x1DF2A).addRange(0x1E922, 0x1E943);\nexports.characters = set;\n","const set = require('regenerate')(0x5BF, 0x5C7, 0x670, 0x711, 0x7FD, 0x9BC, 0x9D7, 0x9FE, 0xA3C, 0xA51, 0xA75, 0xABC, 0xB3C, 0xB82, 0xBD7, 0xC3C, 0xCBC, 0xCF3, 0xD57, 0xDCA, 0xDD6, 0xE31, 0xEB1, 0xF35, 0xF37, 0xF39, 0xFC6, 0x108F, 0x17DD, 0x180F, 0x18A9, 0x1A7F, 0x1CED, 0x1CF4, 0x2D7F, 0xA802, 0xA806, 0xA80B, 0xA82C, 0xA8FF, 0xA9E5, 0xAA43, 0xAAB0, 0xAAC1, 0xFB1E, 0x101FD, 0x102E0, 0x10A3F, 0x11070, 0x110C2, 0x11173, 0x1123E, 0x11241, 0x11357, 0x1145E, 0x11940, 0x119E4, 0x11A47, 0x11D3A, 0x11D47, 0x11F03, 0x13440, 0x16F4F, 0x16FE4, 0x1DA75, 0x1DA84, 0x1E08F, 0x1E2AE);\nset.addRange(0x300, 0x36F).addRange(0x483, 0x489).addRange(0x591, 0x5BD).addRange(0x5C1, 0x5C2).addRange(0x5C4, 0x5C5).addRange(0x610, 0x61A).addRange(0x64B, 0x65F).addRange(0x6D6, 0x6DC).addRange(0x6DF, 0x6E4).addRange(0x6E7, 0x6E8).addRange(0x6EA, 0x6ED).addRange(0x730, 0x74A).addRange(0x7A6, 0x7B0).addRange(0x7EB, 0x7F3).addRange(0x816, 0x819).addRange(0x81B, 0x823).addRange(0x825, 0x827).addRange(0x829, 0x82D).addRange(0x859, 0x85B).addRange(0x898, 0x89F).addRange(0x8CA, 0x8E1).addRange(0x8E3, 0x903).addRange(0x93A, 0x93C).addRange(0x93E, 0x94F).addRange(0x951, 0x957).addRange(0x962, 0x963).addRange(0x981, 0x983).addRange(0x9BE, 0x9C4).addRange(0x9C7, 0x9C8).addRange(0x9CB, 0x9CD).addRange(0x9E2, 0x9E3).addRange(0xA01, 0xA03).addRange(0xA3E, 0xA42).addRange(0xA47, 0xA48).addRange(0xA4B, 0xA4D).addRange(0xA70, 0xA71).addRange(0xA81, 0xA83).addRange(0xABE, 0xAC5).addRange(0xAC7, 0xAC9).addRange(0xACB, 0xACD).addRange(0xAE2, 0xAE3).addRange(0xAFA, 0xAFF).addRange(0xB01, 0xB03).addRange(0xB3E, 0xB44).addRange(0xB47, 0xB48).addRange(0xB4B, 0xB4D).addRange(0xB55, 0xB57).addRange(0xB62, 0xB63).addRange(0xBBE, 0xBC2).addRange(0xBC6, 0xBC8).addRange(0xBCA, 0xBCD);\nset.addRange(0xC00, 0xC04).addRange(0xC3E, 0xC44).addRange(0xC46, 0xC48).addRange(0xC4A, 0xC4D).addRange(0xC55, 0xC56).addRange(0xC62, 0xC63).addRange(0xC81, 0xC83).addRange(0xCBE, 0xCC4).addRange(0xCC6, 0xCC8).addRange(0xCCA, 0xCCD).addRange(0xCD5, 0xCD6).addRange(0xCE2, 0xCE3).addRange(0xD00, 0xD03).addRange(0xD3B, 0xD3C).addRange(0xD3E, 0xD44).addRange(0xD46, 0xD48).addRange(0xD4A, 0xD4D).addRange(0xD62, 0xD63).addRange(0xD81, 0xD83).addRange(0xDCF, 0xDD4).addRange(0xDD8, 0xDDF).addRange(0xDF2, 0xDF3).addRange(0xE34, 0xE3A).addRange(0xE47, 0xE4E).addRange(0xEB4, 0xEBC).addRange(0xEC8, 0xECE).addRange(0xF18, 0xF19).addRange(0xF3E, 0xF3F).addRange(0xF71, 0xF84).addRange(0xF86, 0xF87).addRange(0xF8D, 0xF97).addRange(0xF99, 0xFBC).addRange(0x102B, 0x103E).addRange(0x1056, 0x1059).addRange(0x105E, 0x1060).addRange(0x1062, 0x1064).addRange(0x1067, 0x106D).addRange(0x1071, 0x1074).addRange(0x1082, 0x108D).addRange(0x109A, 0x109D).addRange(0x135D, 0x135F).addRange(0x1712, 0x1715).addRange(0x1732, 0x1734).addRange(0x1752, 0x1753).addRange(0x1772, 0x1773).addRange(0x17B4, 0x17D3).addRange(0x180B, 0x180D).addRange(0x1885, 0x1886).addRange(0x1920, 0x192B).addRange(0x1930, 0x193B).addRange(0x1A17, 0x1A1B);\nset.addRange(0x1A55, 0x1A5E).addRange(0x1A60, 0x1A7C).addRange(0x1AB0, 0x1ACE).addRange(0x1B00, 0x1B04).addRange(0x1B34, 0x1B44).addRange(0x1B6B, 0x1B73).addRange(0x1B80, 0x1B82).addRange(0x1BA1, 0x1BAD).addRange(0x1BE6, 0x1BF3).addRange(0x1C24, 0x1C37).addRange(0x1CD0, 0x1CD2).addRange(0x1CD4, 0x1CE8).addRange(0x1CF7, 0x1CF9).addRange(0x1DC0, 0x1DFF).addRange(0x20D0, 0x20F0).addRange(0x2CEF, 0x2CF1).addRange(0x2DE0, 0x2DFF).addRange(0x302A, 0x302F).addRange(0x3099, 0x309A).addRange(0xA66F, 0xA672).addRange(0xA674, 0xA67D).addRange(0xA69E, 0xA69F).addRange(0xA6F0, 0xA6F1).addRange(0xA823, 0xA827).addRange(0xA880, 0xA881).addRange(0xA8B4, 0xA8C5).addRange(0xA8E0, 0xA8F1).addRange(0xA926, 0xA92D).addRange(0xA947, 0xA953).addRange(0xA980, 0xA983).addRange(0xA9B3, 0xA9C0).addRange(0xAA29, 0xAA36).addRange(0xAA4C, 0xAA4D).addRange(0xAA7B, 0xAA7D).addRange(0xAAB2, 0xAAB4).addRange(0xAAB7, 0xAAB8).addRange(0xAABE, 0xAABF).addRange(0xAAEB, 0xAAEF).addRange(0xAAF5, 0xAAF6).addRange(0xABE3, 0xABEA).addRange(0xABEC, 0xABED).addRange(0xFE00, 0xFE0F).addRange(0xFE20, 0xFE2F).addRange(0x10376, 0x1037A).addRange(0x10A01, 0x10A03).addRange(0x10A05, 0x10A06).addRange(0x10A0C, 0x10A0F).addRange(0x10A38, 0x10A3A).addRange(0x10AE5, 0x10AE6).addRange(0x10D24, 0x10D27).addRange(0x10EAB, 0x10EAC);\nset.addRange(0x10EFD, 0x10EFF).addRange(0x10F46, 0x10F50).addRange(0x10F82, 0x10F85).addRange(0x11000, 0x11002).addRange(0x11038, 0x11046).addRange(0x11073, 0x11074).addRange(0x1107F, 0x11082).addRange(0x110B0, 0x110BA).addRange(0x11100, 0x11102).addRange(0x11127, 0x11134).addRange(0x11145, 0x11146).addRange(0x11180, 0x11182).addRange(0x111B3, 0x111C0).addRange(0x111C9, 0x111CC).addRange(0x111CE, 0x111CF).addRange(0x1122C, 0x11237).addRange(0x112DF, 0x112EA).addRange(0x11300, 0x11303).addRange(0x1133B, 0x1133C).addRange(0x1133E, 0x11344).addRange(0x11347, 0x11348).addRange(0x1134B, 0x1134D).addRange(0x11362, 0x11363).addRange(0x11366, 0x1136C).addRange(0x11370, 0x11374).addRange(0x11435, 0x11446).addRange(0x114B0, 0x114C3).addRange(0x115AF, 0x115B5).addRange(0x115B8, 0x115C0).addRange(0x115DC, 0x115DD).addRange(0x11630, 0x11640).addRange(0x116AB, 0x116B7).addRange(0x1171D, 0x1172B).addRange(0x1182C, 0x1183A).addRange(0x11930, 0x11935).addRange(0x11937, 0x11938).addRange(0x1193B, 0x1193E).addRange(0x11942, 0x11943).addRange(0x119D1, 0x119D7).addRange(0x119DA, 0x119E0).addRange(0x11A01, 0x11A0A).addRange(0x11A33, 0x11A39).addRange(0x11A3B, 0x11A3E).addRange(0x11A51, 0x11A5B).addRange(0x11A8A, 0x11A99).addRange(0x11C2F, 0x11C36).addRange(0x11C38, 0x11C3F).addRange(0x11C92, 0x11CA7).addRange(0x11CA9, 0x11CB6).addRange(0x11D31, 0x11D36).addRange(0x11D3C, 0x11D3D);\nset.addRange(0x11D3F, 0x11D45).addRange(0x11D8A, 0x11D8E).addRange(0x11D90, 0x11D91).addRange(0x11D93, 0x11D97).addRange(0x11EF3, 0x11EF6).addRange(0x11F00, 0x11F01).addRange(0x11F34, 0x11F3A).addRange(0x11F3E, 0x11F42).addRange(0x13447, 0x13455).addRange(0x16AF0, 0x16AF4).addRange(0x16B30, 0x16B36).addRange(0x16F51, 0x16F87).addRange(0x16F8F, 0x16F92).addRange(0x16FF0, 0x16FF1).addRange(0x1BC9D, 0x1BC9E).addRange(0x1CF00, 0x1CF2D).addRange(0x1CF30, 0x1CF46).addRange(0x1D165, 0x1D169).addRange(0x1D16D, 0x1D172).addRange(0x1D17B, 0x1D182).addRange(0x1D185, 0x1D18B).addRange(0x1D1AA, 0x1D1AD).addRange(0x1D242, 0x1D244).addRange(0x1DA00, 0x1DA36).addRange(0x1DA3B, 0x1DA6C).addRange(0x1DA9B, 0x1DA9F).addRange(0x1DAA1, 0x1DAAF).addRange(0x1E000, 0x1E006).addRange(0x1E008, 0x1E018).addRange(0x1E01B, 0x1E021).addRange(0x1E023, 0x1E024).addRange(0x1E026, 0x1E02A).addRange(0x1E130, 0x1E136).addRange(0x1E2EC, 0x1E2EF).addRange(0x1E4EC, 0x1E4EF).addRange(0x1E8D0, 0x1E8D6).addRange(0x1E944, 0x1E94A).addRange(0xE0100, 0xE01EF);\nexports.characters = set;\n","const set = require('regenerate')(0x2B, 0x7C, 0x7E, 0xAC, 0xB1, 0xD7, 0xF7, 0x3F6, 0x2044, 0x2052, 0x2118, 0x214B, 0x21A0, 0x21A3, 0x21A6, 0x21AE, 0x21D2, 0x21D4, 0x237C, 0x25B7, 0x25C1, 0x266F, 0xFB29, 0xFE62, 0xFF0B, 0xFF5C, 0xFF5E, 0xFFE2, 0x1D6C1, 0x1D6DB, 0x1D6FB, 0x1D715, 0x1D735, 0x1D74F, 0x1D76F, 0x1D789, 0x1D7A9, 0x1D7C3);\nset.addRange(0x3C, 0x3E).addRange(0x606, 0x608).addRange(0x207A, 0x207C).addRange(0x208A, 0x208C).addRange(0x2140, 0x2144).addRange(0x2190, 0x2194).addRange(0x219A, 0x219B).addRange(0x21CE, 0x21CF).addRange(0x21F4, 0x22FF).addRange(0x2320, 0x2321).addRange(0x239B, 0x23B3).addRange(0x23DC, 0x23E1).addRange(0x25F8, 0x25FF).addRange(0x27C0, 0x27C4).addRange(0x27C7, 0x27E5).addRange(0x27F0, 0x27FF).addRange(0x2900, 0x2982).addRange(0x2999, 0x29D7).addRange(0x29DC, 0x29FB).addRange(0x29FE, 0x2AFF).addRange(0x2B30, 0x2B44).addRange(0x2B47, 0x2B4C).addRange(0xFE64, 0xFE66).addRange(0xFF1C, 0xFF1E).addRange(0xFFE9, 0xFFEC).addRange(0x1EEF0, 0x1EEF1);\nexports.characters = set;\n","const set = require('regenerate')(0x2EC, 0x2EE, 0x374, 0x37A, 0x559, 0x640, 0x7FA, 0x81A, 0x824, 0x828, 0x8C9, 0x971, 0xE46, 0xEC6, 0x10FC, 0x17D7, 0x1843, 0x1AA7, 0x1D78, 0x2071, 0x207F, 0x2D6F, 0x2E2F, 0x3005, 0x303B, 0xA015, 0xA60C, 0xA67F, 0xA770, 0xA788, 0xA9CF, 0xA9E6, 0xAA70, 0xAADD, 0xAB69, 0xFF70, 0x16FE3, 0x1E4EB, 0x1E94B);\nset.addRange(0x2B0, 0x2C1).addRange(0x2C6, 0x2D1).addRange(0x2E0, 0x2E4).addRange(0x6E5, 0x6E6).addRange(0x7F4, 0x7F5).addRange(0x1C78, 0x1C7D).addRange(0x1D2C, 0x1D6A).addRange(0x1D9B, 0x1DBF).addRange(0x2090, 0x209C).addRange(0x2C7C, 0x2C7D).addRange(0x3031, 0x3035).addRange(0x309D, 0x309E).addRange(0x30FC, 0x30FE).addRange(0xA4F8, 0xA4FD).addRange(0xA69C, 0xA69D).addRange(0xA717, 0xA71F).addRange(0xA7F2, 0xA7F4).addRange(0xA7F8, 0xA7F9).addRange(0xAAF3, 0xAAF4).addRange(0xAB5C, 0xAB5F).addRange(0xFF9E, 0xFF9F).addRange(0x10780, 0x10785).addRange(0x10787, 0x107B0).addRange(0x107B2, 0x107BA).addRange(0x16B40, 0x16B43).addRange(0x16F93, 0x16F9F).addRange(0x16FE0, 0x16FE1).addRange(0x1AFF0, 0x1AFF3).addRange(0x1AFF5, 0x1AFFB).addRange(0x1AFFD, 0x1AFFE).addRange(0x1E030, 0x1E06D).addRange(0x1E137, 0x1E13D);\nexports.characters = set;\n","const set = require('regenerate')(0x5E, 0x60, 0xA8, 0xAF, 0xB4, 0xB8, 0x2ED, 0x375, 0x888, 0x1FBD, 0xAB5B, 0xFF3E, 0xFF40, 0xFFE3);\nset.addRange(0x2C2, 0x2C5).addRange(0x2D2, 0x2DF).addRange(0x2E5, 0x2EB).addRange(0x2EF, 0x2FF).addRange(0x384, 0x385).addRange(0x1FBF, 0x1FC1).addRange(0x1FCD, 0x1FCF).addRange(0x1FDD, 0x1FDF).addRange(0x1FED, 0x1FEF).addRange(0x1FFD, 0x1FFE).addRange(0x309B, 0x309C).addRange(0xA700, 0xA716).addRange(0xA720, 0xA721).addRange(0xA789, 0xA78A).addRange(0xAB6A, 0xAB6B).addRange(0xFBB2, 0xFBC2).addRange(0x1F3FB, 0x1F3FF);\nexports.characters = set;\n","const set = require('regenerate')(0x5BF, 0x5C7, 0x670, 0x711, 0x7FD, 0x93A, 0x93C, 0x94D, 0x981, 0x9BC, 0x9CD, 0x9FE, 0xA3C, 0xA51, 0xA75, 0xABC, 0xACD, 0xB01, 0xB3C, 0xB3F, 0xB4D, 0xB82, 0xBC0, 0xBCD, 0xC00, 0xC04, 0xC3C, 0xC81, 0xCBC, 0xCBF, 0xCC6, 0xD4D, 0xD81, 0xDCA, 0xDD6, 0xE31, 0xEB1, 0xF35, 0xF37, 0xF39, 0xFC6, 0x1082, 0x108D, 0x109D, 0x17C6, 0x17DD, 0x180F, 0x18A9, 0x1932, 0x1A1B, 0x1A56, 0x1A60, 0x1A62, 0x1A7F, 0x1B34, 0x1B3C, 0x1B42, 0x1BE6, 0x1BED, 0x1CED, 0x1CF4, 0x20E1, 0x2D7F, 0xA66F, 0xA802, 0xA806, 0xA80B, 0xA82C, 0xA8FF, 0xA9B3, 0xA9E5, 0xAA43, 0xAA4C, 0xAA7C, 0xAAB0, 0xAAC1, 0xAAF6, 0xABE5, 0xABE8, 0xABED, 0xFB1E, 0x101FD, 0x102E0, 0x10A3F, 0x11001, 0x11070, 0x110C2, 0x11173, 0x111CF, 0x11234, 0x1123E, 0x11241, 0x112DF, 0x11340, 0x11446, 0x1145E, 0x114BA, 0x1163D, 0x116AB, 0x116AD, 0x116B7, 0x1193E, 0x11943, 0x119E0, 0x11A47, 0x11C3F, 0x11D3A, 0x11D47, 0x11D95, 0x11D97, 0x11F40, 0x11F42, 0x13440, 0x16F4F, 0x16FE4, 0x1DA75, 0x1DA84, 0x1E08F, 0x1E2AE);\nset.addRange(0x300, 0x36F).addRange(0x483, 0x487).addRange(0x591, 0x5BD).addRange(0x5C1, 0x5C2).addRange(0x5C4, 0x5C5).addRange(0x610, 0x61A).addRange(0x64B, 0x65F).addRange(0x6D6, 0x6DC).addRange(0x6DF, 0x6E4).addRange(0x6E7, 0x6E8).addRange(0x6EA, 0x6ED).addRange(0x730, 0x74A).addRange(0x7A6, 0x7B0).addRange(0x7EB, 0x7F3).addRange(0x816, 0x819).addRange(0x81B, 0x823).addRange(0x825, 0x827).addRange(0x829, 0x82D).addRange(0x859, 0x85B).addRange(0x898, 0x89F).addRange(0x8CA, 0x8E1).addRange(0x8E3, 0x902).addRange(0x941, 0x948).addRange(0x951, 0x957).addRange(0x962, 0x963).addRange(0x9C1, 0x9C4).addRange(0x9E2, 0x9E3).addRange(0xA01, 0xA02).addRange(0xA41, 0xA42).addRange(0xA47, 0xA48).addRange(0xA4B, 0xA4D).addRange(0xA70, 0xA71).addRange(0xA81, 0xA82).addRange(0xAC1, 0xAC5).addRange(0xAC7, 0xAC8).addRange(0xAE2, 0xAE3).addRange(0xAFA, 0xAFF).addRange(0xB41, 0xB44).addRange(0xB55, 0xB56).addRange(0xB62, 0xB63).addRange(0xC3E, 0xC40).addRange(0xC46, 0xC48).addRange(0xC4A, 0xC4D).addRange(0xC55, 0xC56).addRange(0xC62, 0xC63).addRange(0xCCC, 0xCCD).addRange(0xCE2, 0xCE3).addRange(0xD00, 0xD01).addRange(0xD3B, 0xD3C).addRange(0xD41, 0xD44).addRange(0xD62, 0xD63);\nset.addRange(0xDD2, 0xDD4).addRange(0xE34, 0xE3A).addRange(0xE47, 0xE4E).addRange(0xEB4, 0xEBC).addRange(0xEC8, 0xECE).addRange(0xF18, 0xF19).addRange(0xF71, 0xF7E).addRange(0xF80, 0xF84).addRange(0xF86, 0xF87).addRange(0xF8D, 0xF97).addRange(0xF99, 0xFBC).addRange(0x102D, 0x1030).addRange(0x1032, 0x1037).addRange(0x1039, 0x103A).addRange(0x103D, 0x103E).addRange(0x1058, 0x1059).addRange(0x105E, 0x1060).addRange(0x1071, 0x1074).addRange(0x1085, 0x1086).addRange(0x135D, 0x135F).addRange(0x1712, 0x1714).addRange(0x1732, 0x1733).addRange(0x1752, 0x1753).addRange(0x1772, 0x1773).addRange(0x17B4, 0x17B5).addRange(0x17B7, 0x17BD).addRange(0x17C9, 0x17D3).addRange(0x180B, 0x180D).addRange(0x1885, 0x1886).addRange(0x1920, 0x1922).addRange(0x1927, 0x1928).addRange(0x1939, 0x193B).addRange(0x1A17, 0x1A18).addRange(0x1A58, 0x1A5E).addRange(0x1A65, 0x1A6C).addRange(0x1A73, 0x1A7C).addRange(0x1AB0, 0x1ABD).addRange(0x1ABF, 0x1ACE).addRange(0x1B00, 0x1B03).addRange(0x1B36, 0x1B3A).addRange(0x1B6B, 0x1B73).addRange(0x1B80, 0x1B81).addRange(0x1BA2, 0x1BA5).addRange(0x1BA8, 0x1BA9).addRange(0x1BAB, 0x1BAD).addRange(0x1BE8, 0x1BE9).addRange(0x1BEF, 0x1BF1).addRange(0x1C2C, 0x1C33).addRange(0x1C36, 0x1C37).addRange(0x1CD0, 0x1CD2).addRange(0x1CD4, 0x1CE0);\nset.addRange(0x1CE2, 0x1CE8).addRange(0x1CF8, 0x1CF9).addRange(0x1DC0, 0x1DFF).addRange(0x20D0, 0x20DC).addRange(0x20E5, 0x20F0).addRange(0x2CEF, 0x2CF1).addRange(0x2DE0, 0x2DFF).addRange(0x302A, 0x302D).addRange(0x3099, 0x309A).addRange(0xA674, 0xA67D).addRange(0xA69E, 0xA69F).addRange(0xA6F0, 0xA6F1).addRange(0xA825, 0xA826).addRange(0xA8C4, 0xA8C5).addRange(0xA8E0, 0xA8F1).addRange(0xA926, 0xA92D).addRange(0xA947, 0xA951).addRange(0xA980, 0xA982).addRange(0xA9B6, 0xA9B9).addRange(0xA9BC, 0xA9BD).addRange(0xAA29, 0xAA2E).addRange(0xAA31, 0xAA32).addRange(0xAA35, 0xAA36).addRange(0xAAB2, 0xAAB4).addRange(0xAAB7, 0xAAB8).addRange(0xAABE, 0xAABF).addRange(0xAAEC, 0xAAED).addRange(0xFE00, 0xFE0F).addRange(0xFE20, 0xFE2F).addRange(0x10376, 0x1037A).addRange(0x10A01, 0x10A03).addRange(0x10A05, 0x10A06).addRange(0x10A0C, 0x10A0F).addRange(0x10A38, 0x10A3A).addRange(0x10AE5, 0x10AE6).addRange(0x10D24, 0x10D27).addRange(0x10EAB, 0x10EAC).addRange(0x10EFD, 0x10EFF).addRange(0x10F46, 0x10F50).addRange(0x10F82, 0x10F85).addRange(0x11038, 0x11046).addRange(0x11073, 0x11074).addRange(0x1107F, 0x11081).addRange(0x110B3, 0x110B6).addRange(0x110B9, 0x110BA).addRange(0x11100, 0x11102).addRange(0x11127, 0x1112B).addRange(0x1112D, 0x11134).addRange(0x11180, 0x11181).addRange(0x111B6, 0x111BE).addRange(0x111C9, 0x111CC);\nset.addRange(0x1122F, 0x11231).addRange(0x11236, 0x11237).addRange(0x112E3, 0x112EA).addRange(0x11300, 0x11301).addRange(0x1133B, 0x1133C).addRange(0x11366, 0x1136C).addRange(0x11370, 0x11374).addRange(0x11438, 0x1143F).addRange(0x11442, 0x11444).addRange(0x114B3, 0x114B8).addRange(0x114BF, 0x114C0).addRange(0x114C2, 0x114C3).addRange(0x115B2, 0x115B5).addRange(0x115BC, 0x115BD).addRange(0x115BF, 0x115C0).addRange(0x115DC, 0x115DD).addRange(0x11633, 0x1163A).addRange(0x1163F, 0x11640).addRange(0x116B0, 0x116B5).addRange(0x1171D, 0x1171F).addRange(0x11722, 0x11725).addRange(0x11727, 0x1172B).addRange(0x1182F, 0x11837).addRange(0x11839, 0x1183A).addRange(0x1193B, 0x1193C).addRange(0x119D4, 0x119D7).addRange(0x119DA, 0x119DB).addRange(0x11A01, 0x11A0A).addRange(0x11A33, 0x11A38).addRange(0x11A3B, 0x11A3E).addRange(0x11A51, 0x11A56).addRange(0x11A59, 0x11A5B).addRange(0x11A8A, 0x11A96).addRange(0x11A98, 0x11A99).addRange(0x11C30, 0x11C36).addRange(0x11C38, 0x11C3D).addRange(0x11C92, 0x11CA7).addRange(0x11CAA, 0x11CB0).addRange(0x11CB2, 0x11CB3).addRange(0x11CB5, 0x11CB6).addRange(0x11D31, 0x11D36).addRange(0x11D3C, 0x11D3D).addRange(0x11D3F, 0x11D45).addRange(0x11D90, 0x11D91).addRange(0x11EF3, 0x11EF4).addRange(0x11F00, 0x11F01).addRange(0x11F36, 0x11F3A).addRange(0x13447, 0x13455).addRange(0x16AF0, 0x16AF4).addRange(0x16B30, 0x16B36).addRange(0x16F8F, 0x16F92);\nset.addRange(0x1BC9D, 0x1BC9E).addRange(0x1CF00, 0x1CF2D).addRange(0x1CF30, 0x1CF46).addRange(0x1D167, 0x1D169).addRange(0x1D17B, 0x1D182).addRange(0x1D185, 0x1D18B).addRange(0x1D1AA, 0x1D1AD).addRange(0x1D242, 0x1D244).addRange(0x1DA00, 0x1DA36).addRange(0x1DA3B, 0x1DA6C).addRange(0x1DA9B, 0x1DA9F).addRange(0x1DAA1, 0x1DAAF).addRange(0x1E000, 0x1E006).addRange(0x1E008, 0x1E018).addRange(0x1E01B, 0x1E021).addRange(0x1E023, 0x1E024).addRange(0x1E026, 0x1E02A).addRange(0x1E130, 0x1E136).addRange(0x1E2EC, 0x1E2EF).addRange(0x1E4EC, 0x1E4EF).addRange(0x1E8D0, 0x1E8D6).addRange(0x1E944, 0x1E94A).addRange(0xE0100, 0xE01EF);\nexports.characters = set;\n","const set = require('regenerate')(0xB9, 0x2070, 0x2CFD, 0x3007, 0x10341, 0x1034A);\nset.addRange(0x30, 0x39).addRange(0xB2, 0xB3).addRange(0xBC, 0xBE).addRange(0x660, 0x669).addRange(0x6F0, 0x6F9).addRange(0x7C0, 0x7C9).addRange(0x966, 0x96F).addRange(0x9E6, 0x9EF).addRange(0x9F4, 0x9F9).addRange(0xA66, 0xA6F).addRange(0xAE6, 0xAEF).addRange(0xB66, 0xB6F).addRange(0xB72, 0xB77).addRange(0xBE6, 0xBF2).addRange(0xC66, 0xC6F).addRange(0xC78, 0xC7E).addRange(0xCE6, 0xCEF).addRange(0xD58, 0xD5E).addRange(0xD66, 0xD78).addRange(0xDE6, 0xDEF).addRange(0xE50, 0xE59).addRange(0xED0, 0xED9).addRange(0xF20, 0xF33).addRange(0x1040, 0x1049).addRange(0x1090, 0x1099).addRange(0x1369, 0x137C).addRange(0x16EE, 0x16F0).addRange(0x17E0, 0x17E9).addRange(0x17F0, 0x17F9).addRange(0x1810, 0x1819).addRange(0x1946, 0x194F).addRange(0x19D0, 0x19DA).addRange(0x1A80, 0x1A89).addRange(0x1A90, 0x1A99).addRange(0x1B50, 0x1B59).addRange(0x1BB0, 0x1BB9).addRange(0x1C40, 0x1C49).addRange(0x1C50, 0x1C59).addRange(0x2074, 0x2079).addRange(0x2080, 0x2089).addRange(0x2150, 0x2182).addRange(0x2185, 0x2189).addRange(0x2460, 0x249B).addRange(0x24EA, 0x24FF).addRange(0x2776, 0x2793).addRange(0x3021, 0x3029).addRange(0x3038, 0x303A).addRange(0x3192, 0x3195).addRange(0x3220, 0x3229).addRange(0x3248, 0x324F).addRange(0x3251, 0x325F);\nset.addRange(0x3280, 0x3289).addRange(0x32B1, 0x32BF).addRange(0xA620, 0xA629).addRange(0xA6E6, 0xA6EF).addRange(0xA830, 0xA835).addRange(0xA8D0, 0xA8D9).addRange(0xA900, 0xA909).addRange(0xA9D0, 0xA9D9).addRange(0xA9F0, 0xA9F9).addRange(0xAA50, 0xAA59).addRange(0xABF0, 0xABF9).addRange(0xFF10, 0xFF19).addRange(0x10107, 0x10133).addRange(0x10140, 0x10178).addRange(0x1018A, 0x1018B).addRange(0x102E1, 0x102FB).addRange(0x10320, 0x10323).addRange(0x103D1, 0x103D5).addRange(0x104A0, 0x104A9).addRange(0x10858, 0x1085F).addRange(0x10879, 0x1087F).addRange(0x108A7, 0x108AF).addRange(0x108FB, 0x108FF).addRange(0x10916, 0x1091B).addRange(0x109BC, 0x109BD).addRange(0x109C0, 0x109CF).addRange(0x109D2, 0x109FF).addRange(0x10A40, 0x10A48).addRange(0x10A7D, 0x10A7E).addRange(0x10A9D, 0x10A9F).addRange(0x10AEB, 0x10AEF).addRange(0x10B58, 0x10B5F).addRange(0x10B78, 0x10B7F).addRange(0x10BA9, 0x10BAF).addRange(0x10CFA, 0x10CFF).addRange(0x10D30, 0x10D39).addRange(0x10E60, 0x10E7E).addRange(0x10F1D, 0x10F26).addRange(0x10F51, 0x10F54).addRange(0x10FC5, 0x10FCB).addRange(0x11052, 0x1106F).addRange(0x110F0, 0x110F9).addRange(0x11136, 0x1113F).addRange(0x111D0, 0x111D9).addRange(0x111E1, 0x111F4).addRange(0x112F0, 0x112F9).addRange(0x11450, 0x11459).addRange(0x114D0, 0x114D9).addRange(0x11650, 0x11659).addRange(0x116C0, 0x116C9).addRange(0x11730, 0x1173B);\nset.addRange(0x118E0, 0x118F2).addRange(0x11950, 0x11959).addRange(0x11C50, 0x11C6C).addRange(0x11D50, 0x11D59).addRange(0x11DA0, 0x11DA9).addRange(0x11F50, 0x11F59).addRange(0x11FC0, 0x11FD4).addRange(0x12400, 0x1246E).addRange(0x16A60, 0x16A69).addRange(0x16AC0, 0x16AC9).addRange(0x16B50, 0x16B59).addRange(0x16B5B, 0x16B61).addRange(0x16E80, 0x16E96).addRange(0x1D2C0, 0x1D2D3).addRange(0x1D2E0, 0x1D2F3).addRange(0x1D360, 0x1D378).addRange(0x1D7CE, 0x1D7FF).addRange(0x1E140, 0x1E149).addRange(0x1E2F0, 0x1E2F9).addRange(0x1E4F0, 0x1E4F9).addRange(0x1E8C7, 0x1E8CF).addRange(0x1E950, 0x1E959).addRange(0x1EC71, 0x1ECAB).addRange(0x1ECAD, 0x1ECAF).addRange(0x1ECB1, 0x1ECB4).addRange(0x1ED01, 0x1ED2D).addRange(0x1ED2F, 0x1ED3D).addRange(0x1F100, 0x1F10C).addRange(0x1FBF0, 0x1FBF9);\nexports.characters = set;\n","const set = require('regenerate')(0x28, 0x5B, 0x7B, 0xF3A, 0xF3C, 0x169B, 0x201A, 0x201E, 0x2045, 0x207D, 0x208D, 0x2308, 0x230A, 0x2329, 0x2768, 0x276A, 0x276C, 0x276E, 0x2770, 0x2772, 0x2774, 0x27C5, 0x27E6, 0x27E8, 0x27EA, 0x27EC, 0x27EE, 0x2983, 0x2985, 0x2987, 0x2989, 0x298B, 0x298D, 0x298F, 0x2991, 0x2993, 0x2995, 0x2997, 0x29D8, 0x29DA, 0x29FC, 0x2E22, 0x2E24, 0x2E26, 0x2E28, 0x2E42, 0x2E55, 0x2E57, 0x2E59, 0x2E5B, 0x3008, 0x300A, 0x300C, 0x300E, 0x3010, 0x3014, 0x3016, 0x3018, 0x301A, 0x301D, 0xFD3F, 0xFE17, 0xFE35, 0xFE37, 0xFE39, 0xFE3B, 0xFE3D, 0xFE3F, 0xFE41, 0xFE43, 0xFE47, 0xFE59, 0xFE5B, 0xFE5D, 0xFF08, 0xFF3B, 0xFF5B, 0xFF5F, 0xFF62);\n\nexports.characters = set;\n","const set = require('regenerate')(0xAA, 0xBA, 0x1BB, 0x294, 0x6D5, 0x6FF, 0x710, 0x7B1, 0x93D, 0x950, 0x9B2, 0x9BD, 0x9CE, 0x9FC, 0xA5E, 0xABD, 0xAD0, 0xAF9, 0xB3D, 0xB71, 0xB83, 0xB9C, 0xBD0, 0xC3D, 0xC5D, 0xC80, 0xCBD, 0xD3D, 0xD4E, 0xDBD, 0xE84, 0xEA5, 0xEBD, 0xF00, 0x103F, 0x1061, 0x108E, 0x1258, 0x12C0, 0x17DC, 0x18AA, 0x1CFA, 0x3006, 0x303C, 0x309F, 0x30FF, 0xA66E, 0xA78F, 0xA7F7, 0xA8FB, 0xAA7A, 0xAAB1, 0xAAC0, 0xAAC2, 0xAAF2, 0xFB1D, 0xFB3E, 0x10808, 0x1083C, 0x10A00, 0x10F27, 0x11075, 0x11144, 0x11147, 0x11176, 0x111DA, 0x111DC, 0x11288, 0x1133D, 0x11350, 0x114C7, 0x11644, 0x116B8, 0x11909, 0x1193F, 0x11941, 0x119E1, 0x119E3, 0x11A00, 0x11A3A, 0x11A50, 0x11A9D, 0x11C40, 0x11D46, 0x11D98, 0x11F02, 0x11FB0, 0x16F50, 0x1B132, 0x1B155, 0x1DF0A, 0x1E14E, 0x1EE24, 0x1EE27, 0x1EE39, 0x1EE3B, 0x1EE42, 0x1EE47, 0x1EE49, 0x1EE4B, 0x1EE54, 0x1EE57, 0x1EE59, 0x1EE5B, 0x1EE5D, 0x1EE5F, 0x1EE64, 0x1EE7E);\nset.addRange(0x1C0, 0x1C3).addRange(0x5D0, 0x5EA).addRange(0x5EF, 0x5F2).addRange(0x620, 0x63F).addRange(0x641, 0x64A).addRange(0x66E, 0x66F).addRange(0x671, 0x6D3).addRange(0x6EE, 0x6EF).addRange(0x6FA, 0x6FC).addRange(0x712, 0x72F).addRange(0x74D, 0x7A5).addRange(0x7CA, 0x7EA).addRange(0x800, 0x815).addRange(0x840, 0x858).addRange(0x860, 0x86A).addRange(0x870, 0x887).addRange(0x889, 0x88E).addRange(0x8A0, 0x8C8).addRange(0x904, 0x939).addRange(0x958, 0x961).addRange(0x972, 0x980).addRange(0x985, 0x98C).addRange(0x98F, 0x990).addRange(0x993, 0x9A8).addRange(0x9AA, 0x9B0).addRange(0x9B6, 0x9B9).addRange(0x9DC, 0x9DD).addRange(0x9DF, 0x9E1).addRange(0x9F0, 0x9F1).addRange(0xA05, 0xA0A).addRange(0xA0F, 0xA10).addRange(0xA13, 0xA28).addRange(0xA2A, 0xA30).addRange(0xA32, 0xA33).addRange(0xA35, 0xA36).addRange(0xA38, 0xA39).addRange(0xA59, 0xA5C).addRange(0xA72, 0xA74).addRange(0xA85, 0xA8D).addRange(0xA8F, 0xA91).addRange(0xA93, 0xAA8).addRange(0xAAA, 0xAB0).addRange(0xAB2, 0xAB3).addRange(0xAB5, 0xAB9).addRange(0xAE0, 0xAE1).addRange(0xB05, 0xB0C).addRange(0xB0F, 0xB10).addRange(0xB13, 0xB28).addRange(0xB2A, 0xB30).addRange(0xB32, 0xB33).addRange(0xB35, 0xB39);\nset.addRange(0xB5C, 0xB5D).addRange(0xB5F, 0xB61).addRange(0xB85, 0xB8A).addRange(0xB8E, 0xB90).addRange(0xB92, 0xB95).addRange(0xB99, 0xB9A).addRange(0xB9E, 0xB9F).addRange(0xBA3, 0xBA4).addRange(0xBA8, 0xBAA).addRange(0xBAE, 0xBB9).addRange(0xC05, 0xC0C).addRange(0xC0E, 0xC10).addRange(0xC12, 0xC28).addRange(0xC2A, 0xC39).addRange(0xC58, 0xC5A).addRange(0xC60, 0xC61).addRange(0xC85, 0xC8C).addRange(0xC8E, 0xC90).addRange(0xC92, 0xCA8).addRange(0xCAA, 0xCB3).addRange(0xCB5, 0xCB9).addRange(0xCDD, 0xCDE).addRange(0xCE0, 0xCE1).addRange(0xCF1, 0xCF2).addRange(0xD04, 0xD0C).addRange(0xD0E, 0xD10).addRange(0xD12, 0xD3A).addRange(0xD54, 0xD56).addRange(0xD5F, 0xD61).addRange(0xD7A, 0xD7F).addRange(0xD85, 0xD96).addRange(0xD9A, 0xDB1).addRange(0xDB3, 0xDBB).addRange(0xDC0, 0xDC6).addRange(0xE01, 0xE30).addRange(0xE32, 0xE33).addRange(0xE40, 0xE45).addRange(0xE81, 0xE82).addRange(0xE86, 0xE8A).addRange(0xE8C, 0xEA3).addRange(0xEA7, 0xEB0).addRange(0xEB2, 0xEB3).addRange(0xEC0, 0xEC4).addRange(0xEDC, 0xEDF).addRange(0xF40, 0xF47).addRange(0xF49, 0xF6C).addRange(0xF88, 0xF8C).addRange(0x1000, 0x102A).addRange(0x1050, 0x1055).addRange(0x105A, 0x105D).addRange(0x1065, 0x1066);\nset.addRange(0x106E, 0x1070).addRange(0x1075, 0x1081).addRange(0x1100, 0x1248).addRange(0x124A, 0x124D).addRange(0x1250, 0x1256).addRange(0x125A, 0x125D).addRange(0x1260, 0x1288).addRange(0x128A, 0x128D).addRange(0x1290, 0x12B0).addRange(0x12B2, 0x12B5).addRange(0x12B8, 0x12BE).addRange(0x12C2, 0x12C5).addRange(0x12C8, 0x12D6).addRange(0x12D8, 0x1310).addRange(0x1312, 0x1315).addRange(0x1318, 0x135A).addRange(0x1380, 0x138F).addRange(0x1401, 0x166C).addRange(0x166F, 0x167F).addRange(0x1681, 0x169A).addRange(0x16A0, 0x16EA).addRange(0x16F1, 0x16F8).addRange(0x1700, 0x1711).addRange(0x171F, 0x1731).addRange(0x1740, 0x1751).addRange(0x1760, 0x176C).addRange(0x176E, 0x1770).addRange(0x1780, 0x17B3).addRange(0x1820, 0x1842).addRange(0x1844, 0x1878).addRange(0x1880, 0x1884).addRange(0x1887, 0x18A8).addRange(0x18B0, 0x18F5).addRange(0x1900, 0x191E).addRange(0x1950, 0x196D).addRange(0x1970, 0x1974).addRange(0x1980, 0x19AB).addRange(0x19B0, 0x19C9).addRange(0x1A00, 0x1A16).addRange(0x1A20, 0x1A54).addRange(0x1B05, 0x1B33).addRange(0x1B45, 0x1B4C).addRange(0x1B83, 0x1BA0).addRange(0x1BAE, 0x1BAF).addRange(0x1BBA, 0x1BE5).addRange(0x1C00, 0x1C23).addRange(0x1C4D, 0x1C4F).addRange(0x1C5A, 0x1C77).addRange(0x1CE9, 0x1CEC).addRange(0x1CEE, 0x1CF3).addRange(0x1CF5, 0x1CF6);\nset.addRange(0x2135, 0x2138).addRange(0x2D30, 0x2D67).addRange(0x2D80, 0x2D96).addRange(0x2DA0, 0x2DA6).addRange(0x2DA8, 0x2DAE).addRange(0x2DB0, 0x2DB6).addRange(0x2DB8, 0x2DBE).addRange(0x2DC0, 0x2DC6).addRange(0x2DC8, 0x2DCE).addRange(0x2DD0, 0x2DD6).addRange(0x2DD8, 0x2DDE).addRange(0x3041, 0x3096).addRange(0x30A1, 0x30FA).addRange(0x3105, 0x312F).addRange(0x3131, 0x318E).addRange(0x31A0, 0x31BF).addRange(0x31F0, 0x31FF).addRange(0x3400, 0x4DBF).addRange(0x4E00, 0xA014).addRange(0xA016, 0xA48C).addRange(0xA4D0, 0xA4F7).addRange(0xA500, 0xA60B).addRange(0xA610, 0xA61F).addRange(0xA62A, 0xA62B).addRange(0xA6A0, 0xA6E5).addRange(0xA7FB, 0xA801).addRange(0xA803, 0xA805).addRange(0xA807, 0xA80A).addRange(0xA80C, 0xA822).addRange(0xA840, 0xA873).addRange(0xA882, 0xA8B3).addRange(0xA8F2, 0xA8F7).addRange(0xA8FD, 0xA8FE).addRange(0xA90A, 0xA925).addRange(0xA930, 0xA946).addRange(0xA960, 0xA97C).addRange(0xA984, 0xA9B2).addRange(0xA9E0, 0xA9E4).addRange(0xA9E7, 0xA9EF).addRange(0xA9FA, 0xA9FE).addRange(0xAA00, 0xAA28).addRange(0xAA40, 0xAA42).addRange(0xAA44, 0xAA4B).addRange(0xAA60, 0xAA6F).addRange(0xAA71, 0xAA76).addRange(0xAA7E, 0xAAAF).addRange(0xAAB5, 0xAAB6).addRange(0xAAB9, 0xAABD).addRange(0xAADB, 0xAADC).addRange(0xAAE0, 0xAAEA).addRange(0xAB01, 0xAB06);\nset.addRange(0xAB09, 0xAB0E).addRange(0xAB11, 0xAB16).addRange(0xAB20, 0xAB26).addRange(0xAB28, 0xAB2E).addRange(0xABC0, 0xABE2).addRange(0xAC00, 0xD7A3).addRange(0xD7B0, 0xD7C6).addRange(0xD7CB, 0xD7FB).addRange(0xF900, 0xFA6D).addRange(0xFA70, 0xFAD9).addRange(0xFB1F, 0xFB28).addRange(0xFB2A, 0xFB36).addRange(0xFB38, 0xFB3C).addRange(0xFB40, 0xFB41).addRange(0xFB43, 0xFB44).addRange(0xFB46, 0xFBB1).addRange(0xFBD3, 0xFD3D).addRange(0xFD50, 0xFD8F).addRange(0xFD92, 0xFDC7).addRange(0xFDF0, 0xFDFB).addRange(0xFE70, 0xFE74).addRange(0xFE76, 0xFEFC).addRange(0xFF66, 0xFF6F).addRange(0xFF71, 0xFF9D).addRange(0xFFA0, 0xFFBE).addRange(0xFFC2, 0xFFC7).addRange(0xFFCA, 0xFFCF).addRange(0xFFD2, 0xFFD7).addRange(0xFFDA, 0xFFDC).addRange(0x10000, 0x1000B).addRange(0x1000D, 0x10026).addRange(0x10028, 0x1003A).addRange(0x1003C, 0x1003D).addRange(0x1003F, 0x1004D).addRange(0x10050, 0x1005D).addRange(0x10080, 0x100FA).addRange(0x10280, 0x1029C).addRange(0x102A0, 0x102D0).addRange(0x10300, 0x1031F).addRange(0x1032D, 0x10340).addRange(0x10342, 0x10349).addRange(0x10350, 0x10375).addRange(0x10380, 0x1039D).addRange(0x103A0, 0x103C3).addRange(0x103C8, 0x103CF).addRange(0x10450, 0x1049D).addRange(0x10500, 0x10527).addRange(0x10530, 0x10563).addRange(0x10600, 0x10736).addRange(0x10740, 0x10755).addRange(0x10760, 0x10767);\nset.addRange(0x10800, 0x10805).addRange(0x1080A, 0x10835).addRange(0x10837, 0x10838).addRange(0x1083F, 0x10855).addRange(0x10860, 0x10876).addRange(0x10880, 0x1089E).addRange(0x108E0, 0x108F2).addRange(0x108F4, 0x108F5).addRange(0x10900, 0x10915).addRange(0x10920, 0x10939).addRange(0x10980, 0x109B7).addRange(0x109BE, 0x109BF).addRange(0x10A10, 0x10A13).addRange(0x10A15, 0x10A17).addRange(0x10A19, 0x10A35).addRange(0x10A60, 0x10A7C).addRange(0x10A80, 0x10A9C).addRange(0x10AC0, 0x10AC7).addRange(0x10AC9, 0x10AE4).addRange(0x10B00, 0x10B35).addRange(0x10B40, 0x10B55).addRange(0x10B60, 0x10B72).addRange(0x10B80, 0x10B91).addRange(0x10C00, 0x10C48).addRange(0x10D00, 0x10D23).addRange(0x10E80, 0x10EA9).addRange(0x10EB0, 0x10EB1).addRange(0x10F00, 0x10F1C).addRange(0x10F30, 0x10F45).addRange(0x10F70, 0x10F81).addRange(0x10FB0, 0x10FC4).addRange(0x10FE0, 0x10FF6).addRange(0x11003, 0x11037).addRange(0x11071, 0x11072).addRange(0x11083, 0x110AF).addRange(0x110D0, 0x110E8).addRange(0x11103, 0x11126).addRange(0x11150, 0x11172).addRange(0x11183, 0x111B2).addRange(0x111C1, 0x111C4).addRange(0x11200, 0x11211).addRange(0x11213, 0x1122B).addRange(0x1123F, 0x11240).addRange(0x11280, 0x11286).addRange(0x1128A, 0x1128D).addRange(0x1128F, 0x1129D).addRange(0x1129F, 0x112A8).addRange(0x112B0, 0x112DE).addRange(0x11305, 0x1130C).addRange(0x1130F, 0x11310).addRange(0x11313, 0x11328);\nset.addRange(0x1132A, 0x11330).addRange(0x11332, 0x11333).addRange(0x11335, 0x11339).addRange(0x1135D, 0x11361).addRange(0x11400, 0x11434).addRange(0x11447, 0x1144A).addRange(0x1145F, 0x11461).addRange(0x11480, 0x114AF).addRange(0x114C4, 0x114C5).addRange(0x11580, 0x115AE).addRange(0x115D8, 0x115DB).addRange(0x11600, 0x1162F).addRange(0x11680, 0x116AA).addRange(0x11700, 0x1171A).addRange(0x11740, 0x11746).addRange(0x11800, 0x1182B).addRange(0x118FF, 0x11906).addRange(0x1190C, 0x11913).addRange(0x11915, 0x11916).addRange(0x11918, 0x1192F).addRange(0x119A0, 0x119A7).addRange(0x119AA, 0x119D0).addRange(0x11A0B, 0x11A32).addRange(0x11A5C, 0x11A89).addRange(0x11AB0, 0x11AF8).addRange(0x11C00, 0x11C08).addRange(0x11C0A, 0x11C2E).addRange(0x11C72, 0x11C8F).addRange(0x11D00, 0x11D06).addRange(0x11D08, 0x11D09).addRange(0x11D0B, 0x11D30).addRange(0x11D60, 0x11D65).addRange(0x11D67, 0x11D68).addRange(0x11D6A, 0x11D89).addRange(0x11EE0, 0x11EF2).addRange(0x11F04, 0x11F10).addRange(0x11F12, 0x11F33).addRange(0x12000, 0x12399).addRange(0x12480, 0x12543).addRange(0x12F90, 0x12FF0).addRange(0x13000, 0x1342F).addRange(0x13441, 0x13446).addRange(0x14400, 0x14646).addRange(0x16800, 0x16A38).addRange(0x16A40, 0x16A5E).addRange(0x16A70, 0x16ABE).addRange(0x16AD0, 0x16AED).addRange(0x16B00, 0x16B2F).addRange(0x16B63, 0x16B77).addRange(0x16B7D, 0x16B8F).addRange(0x16F00, 0x16F4A);\nset.addRange(0x17000, 0x187F7).addRange(0x18800, 0x18CD5).addRange(0x18D00, 0x18D08).addRange(0x1B000, 0x1B122).addRange(0x1B150, 0x1B152).addRange(0x1B164, 0x1B167).addRange(0x1B170, 0x1B2FB).addRange(0x1BC00, 0x1BC6A).addRange(0x1BC70, 0x1BC7C).addRange(0x1BC80, 0x1BC88).addRange(0x1BC90, 0x1BC99).addRange(0x1E100, 0x1E12C).addRange(0x1E290, 0x1E2AD).addRange(0x1E2C0, 0x1E2EB).addRange(0x1E4D0, 0x1E4EA).addRange(0x1E7E0, 0x1E7E6).addRange(0x1E7E8, 0x1E7EB).addRange(0x1E7ED, 0x1E7EE).addRange(0x1E7F0, 0x1E7FE).addRange(0x1E800, 0x1E8C4).addRange(0x1EE00, 0x1EE03).addRange(0x1EE05, 0x1EE1F).addRange(0x1EE21, 0x1EE22).addRange(0x1EE29, 0x1EE32).addRange(0x1EE34, 0x1EE37).addRange(0x1EE4D, 0x1EE4F).addRange(0x1EE51, 0x1EE52).addRange(0x1EE61, 0x1EE62).addRange(0x1EE67, 0x1EE6A).addRange(0x1EE6C, 0x1EE72).addRange(0x1EE74, 0x1EE77).addRange(0x1EE79, 0x1EE7C).addRange(0x1EE80, 0x1EE89).addRange(0x1EE8B, 0x1EE9B).addRange(0x1EEA1, 0x1EEA3).addRange(0x1EEA5, 0x1EEA9).addRange(0x1EEAB, 0x1EEBB).addRange(0x20000, 0x2A6DF).addRange(0x2A700, 0x2B739).addRange(0x2B740, 0x2B81D).addRange(0x2B820, 0x2CEA1).addRange(0x2CEB0, 0x2EBE0).addRange(0x2EBF0, 0x2EE5D).addRange(0x2F800, 0x2FA1D).addRange(0x30000, 0x3134A).addRange(0x31350, 0x323AF);\nexports.characters = set;\n","const set = require('regenerate')(0xB9, 0x19DA, 0x2070, 0x2189, 0x2CFD);\nset.addRange(0xB2, 0xB3).addRange(0xBC, 0xBE).addRange(0x9F4, 0x9F9).addRange(0xB72, 0xB77).addRange(0xBF0, 0xBF2).addRange(0xC78, 0xC7E).addRange(0xD58, 0xD5E).addRange(0xD70, 0xD78).addRange(0xF2A, 0xF33).addRange(0x1369, 0x137C).addRange(0x17F0, 0x17F9).addRange(0x2074, 0x2079).addRange(0x2080, 0x2089).addRange(0x2150, 0x215F).addRange(0x2460, 0x249B).addRange(0x24EA, 0x24FF).addRange(0x2776, 0x2793).addRange(0x3192, 0x3195).addRange(0x3220, 0x3229).addRange(0x3248, 0x324F).addRange(0x3251, 0x325F).addRange(0x3280, 0x3289).addRange(0x32B1, 0x32BF).addRange(0xA830, 0xA835).addRange(0x10107, 0x10133).addRange(0x10175, 0x10178).addRange(0x1018A, 0x1018B).addRange(0x102E1, 0x102FB).addRange(0x10320, 0x10323).addRange(0x10858, 0x1085F).addRange(0x10879, 0x1087F).addRange(0x108A7, 0x108AF).addRange(0x108FB, 0x108FF).addRange(0x10916, 0x1091B).addRange(0x109BC, 0x109BD).addRange(0x109C0, 0x109CF).addRange(0x109D2, 0x109FF).addRange(0x10A40, 0x10A48).addRange(0x10A7D, 0x10A7E).addRange(0x10A9D, 0x10A9F).addRange(0x10AEB, 0x10AEF).addRange(0x10B58, 0x10B5F).addRange(0x10B78, 0x10B7F).addRange(0x10BA9, 0x10BAF).addRange(0x10CFA, 0x10CFF).addRange(0x10E60, 0x10E7E).addRange(0x10F1D, 0x10F26).addRange(0x10F51, 0x10F54).addRange(0x10FC5, 0x10FCB).addRange(0x11052, 0x11065).addRange(0x111E1, 0x111F4);\nset.addRange(0x1173A, 0x1173B).addRange(0x118EA, 0x118F2).addRange(0x11C5A, 0x11C6C).addRange(0x11FC0, 0x11FD4).addRange(0x16B5B, 0x16B61).addRange(0x16E80, 0x16E96).addRange(0x1D2C0, 0x1D2D3).addRange(0x1D2E0, 0x1D2F3).addRange(0x1D360, 0x1D378).addRange(0x1E8C7, 0x1E8CF).addRange(0x1EC71, 0x1ECAB).addRange(0x1ECAD, 0x1ECAF).addRange(0x1ECB1, 0x1ECB4).addRange(0x1ED01, 0x1ED2D).addRange(0x1ED2F, 0x1ED3D).addRange(0x1F100, 0x1F10C);\nexports.characters = set;\n","const set = require('regenerate')(0x2A, 0x2C, 0x5C, 0xA1, 0xA7, 0xBF, 0x37E, 0x387, 0x589, 0x5C0, 0x5C3, 0x5C6, 0x61B, 0x6D4, 0x85E, 0x970, 0x9FD, 0xA76, 0xAF0, 0xC77, 0xC84, 0xDF4, 0xE4F, 0xF14, 0xF85, 0x10FB, 0x166E, 0x1CD3, 0x2053, 0x2D70, 0x2E0B, 0x2E1B, 0x2E41, 0x303D, 0x30FB, 0xA673, 0xA67E, 0xA8FC, 0xA95F, 0xABEB, 0xFE19, 0xFE30, 0xFE68, 0xFF0A, 0xFF0C, 0xFF3C, 0xFF61, 0x1039F, 0x103D0, 0x1056F, 0x10857, 0x1091F, 0x1093F, 0x10A7F, 0x111CD, 0x111DB, 0x112A9, 0x1145D, 0x114C6, 0x116B9, 0x1183B, 0x119E2, 0x11FFF, 0x16AF5, 0x16B44, 0x16FE2, 0x1BC9F);\nset.addRange(0x21, 0x23).addRange(0x25, 0x27).addRange(0x2E, 0x2F).addRange(0x3A, 0x3B).addRange(0x3F, 0x40).addRange(0xB6, 0xB7).addRange(0x55A, 0x55F).addRange(0x5F3, 0x5F4).addRange(0x609, 0x60A).addRange(0x60C, 0x60D).addRange(0x61D, 0x61F).addRange(0x66A, 0x66D).addRange(0x700, 0x70D).addRange(0x7F7, 0x7F9).addRange(0x830, 0x83E).addRange(0x964, 0x965).addRange(0xE5A, 0xE5B).addRange(0xF04, 0xF12).addRange(0xFD0, 0xFD4).addRange(0xFD9, 0xFDA).addRange(0x104A, 0x104F).addRange(0x1360, 0x1368).addRange(0x16EB, 0x16ED).addRange(0x1735, 0x1736).addRange(0x17D4, 0x17D6).addRange(0x17D8, 0x17DA).addRange(0x1800, 0x1805).addRange(0x1807, 0x180A).addRange(0x1944, 0x1945).addRange(0x1A1E, 0x1A1F).addRange(0x1AA0, 0x1AA6).addRange(0x1AA8, 0x1AAD).addRange(0x1B5A, 0x1B60).addRange(0x1B7D, 0x1B7E).addRange(0x1BFC, 0x1BFF).addRange(0x1C3B, 0x1C3F).addRange(0x1C7E, 0x1C7F).addRange(0x1CC0, 0x1CC7).addRange(0x2016, 0x2017).addRange(0x2020, 0x2027).addRange(0x2030, 0x2038).addRange(0x203B, 0x203E).addRange(0x2041, 0x2043).addRange(0x2047, 0x2051).addRange(0x2055, 0x205E).addRange(0x2CF9, 0x2CFC).addRange(0x2CFE, 0x2CFF).addRange(0x2E00, 0x2E01).addRange(0x2E06, 0x2E08).addRange(0x2E0E, 0x2E16).addRange(0x2E18, 0x2E19);\nset.addRange(0x2E1E, 0x2E1F).addRange(0x2E2A, 0x2E2E).addRange(0x2E30, 0x2E39).addRange(0x2E3C, 0x2E3F).addRange(0x2E43, 0x2E4F).addRange(0x2E52, 0x2E54).addRange(0x3001, 0x3003).addRange(0xA4FE, 0xA4FF).addRange(0xA60D, 0xA60F).addRange(0xA6F2, 0xA6F7).addRange(0xA874, 0xA877).addRange(0xA8CE, 0xA8CF).addRange(0xA8F8, 0xA8FA).addRange(0xA92E, 0xA92F).addRange(0xA9C1, 0xA9CD).addRange(0xA9DE, 0xA9DF).addRange(0xAA5C, 0xAA5F).addRange(0xAADE, 0xAADF).addRange(0xAAF0, 0xAAF1).addRange(0xFE10, 0xFE16).addRange(0xFE45, 0xFE46).addRange(0xFE49, 0xFE4C).addRange(0xFE50, 0xFE52).addRange(0xFE54, 0xFE57).addRange(0xFE5F, 0xFE61).addRange(0xFE6A, 0xFE6B).addRange(0xFF01, 0xFF03).addRange(0xFF05, 0xFF07).addRange(0xFF0E, 0xFF0F).addRange(0xFF1A, 0xFF1B).addRange(0xFF1F, 0xFF20).addRange(0xFF64, 0xFF65).addRange(0x10100, 0x10102).addRange(0x10A50, 0x10A58).addRange(0x10AF0, 0x10AF6).addRange(0x10B39, 0x10B3F).addRange(0x10B99, 0x10B9C).addRange(0x10F55, 0x10F59).addRange(0x10F86, 0x10F89).addRange(0x11047, 0x1104D).addRange(0x110BB, 0x110BC).addRange(0x110BE, 0x110C1).addRange(0x11140, 0x11143).addRange(0x11174, 0x11175).addRange(0x111C5, 0x111C8).addRange(0x111DD, 0x111DF).addRange(0x11238, 0x1123D).addRange(0x1144B, 0x1144F).addRange(0x1145A, 0x1145B).addRange(0x115C1, 0x115D7).addRange(0x11641, 0x11643);\nset.addRange(0x11660, 0x1166C).addRange(0x1173C, 0x1173E).addRange(0x11944, 0x11946).addRange(0x11A3F, 0x11A46).addRange(0x11A9A, 0x11A9C).addRange(0x11A9E, 0x11AA2).addRange(0x11B00, 0x11B09).addRange(0x11C41, 0x11C45).addRange(0x11C70, 0x11C71).addRange(0x11EF7, 0x11EF8).addRange(0x11F43, 0x11F4F).addRange(0x12470, 0x12474).addRange(0x12FF1, 0x12FF2).addRange(0x16A6E, 0x16A6F).addRange(0x16B37, 0x16B3B).addRange(0x16E97, 0x16E9A).addRange(0x1DA87, 0x1DA8B).addRange(0x1E95E, 0x1E95F);\nexports.characters = set;\n","const set = require('regenerate')(0xA6, 0xA9, 0xAE, 0xB0, 0x482, 0x6DE, 0x6E9, 0x7F6, 0x9FA, 0xB70, 0xBFA, 0xC7F, 0xD4F, 0xD79, 0xF13, 0xF34, 0xF36, 0xF38, 0x166D, 0x1940, 0x2114, 0x2125, 0x2127, 0x2129, 0x212E, 0x214A, 0x214F, 0x21D3, 0x3004, 0x3020, 0x31EF, 0x3250, 0xA839, 0xFDCF, 0xFFE4, 0xFFE8, 0x101A0, 0x10AC8, 0x1173F, 0x16B45, 0x1BC9C, 0x1D245, 0x1E14F, 0x1ECAC, 0x1ED2E, 0x1F7F0);\nset.addRange(0x58D, 0x58E).addRange(0x60E, 0x60F).addRange(0x6FD, 0x6FE).addRange(0xBF3, 0xBF8).addRange(0xF01, 0xF03).addRange(0xF15, 0xF17).addRange(0xF1A, 0xF1F).addRange(0xFBE, 0xFC5).addRange(0xFC7, 0xFCC).addRange(0xFCE, 0xFCF).addRange(0xFD5, 0xFD8).addRange(0x109E, 0x109F).addRange(0x1390, 0x1399).addRange(0x19DE, 0x19FF).addRange(0x1B61, 0x1B6A).addRange(0x1B74, 0x1B7C).addRange(0x2100, 0x2101).addRange(0x2103, 0x2106).addRange(0x2108, 0x2109).addRange(0x2116, 0x2117).addRange(0x211E, 0x2123).addRange(0x213A, 0x213B).addRange(0x214C, 0x214D).addRange(0x218A, 0x218B).addRange(0x2195, 0x2199).addRange(0x219C, 0x219F).addRange(0x21A1, 0x21A2).addRange(0x21A4, 0x21A5).addRange(0x21A7, 0x21AD).addRange(0x21AF, 0x21CD).addRange(0x21D0, 0x21D1).addRange(0x21D5, 0x21F3).addRange(0x2300, 0x2307).addRange(0x230C, 0x231F).addRange(0x2322, 0x2328).addRange(0x232B, 0x237B).addRange(0x237D, 0x239A).addRange(0x23B4, 0x23DB).addRange(0x23E2, 0x2426).addRange(0x2440, 0x244A).addRange(0x249C, 0x24E9).addRange(0x2500, 0x25B6).addRange(0x25B8, 0x25C0).addRange(0x25C2, 0x25F7).addRange(0x2600, 0x266E).addRange(0x2670, 0x2767).addRange(0x2794, 0x27BF).addRange(0x2800, 0x28FF).addRange(0x2B00, 0x2B2F).addRange(0x2B45, 0x2B46).addRange(0x2B4D, 0x2B73);\nset.addRange(0x2B76, 0x2B95).addRange(0x2B97, 0x2BFF).addRange(0x2CE5, 0x2CEA).addRange(0x2E50, 0x2E51).addRange(0x2E80, 0x2E99).addRange(0x2E9B, 0x2EF3).addRange(0x2F00, 0x2FD5).addRange(0x2FF0, 0x2FFF).addRange(0x3012, 0x3013).addRange(0x3036, 0x3037).addRange(0x303E, 0x303F).addRange(0x3190, 0x3191).addRange(0x3196, 0x319F).addRange(0x31C0, 0x31E3).addRange(0x3200, 0x321E).addRange(0x322A, 0x3247).addRange(0x3260, 0x327F).addRange(0x328A, 0x32B0).addRange(0x32C0, 0x33FF).addRange(0x4DC0, 0x4DFF).addRange(0xA490, 0xA4C6).addRange(0xA828, 0xA82B).addRange(0xA836, 0xA837).addRange(0xAA77, 0xAA79).addRange(0xFD40, 0xFD4F).addRange(0xFDFD, 0xFDFF).addRange(0xFFED, 0xFFEE).addRange(0xFFFC, 0xFFFD).addRange(0x10137, 0x1013F).addRange(0x10179, 0x10189).addRange(0x1018C, 0x1018E).addRange(0x10190, 0x1019C).addRange(0x101D0, 0x101FC).addRange(0x10877, 0x10878).addRange(0x11FD5, 0x11FDC).addRange(0x11FE1, 0x11FF1).addRange(0x16B3C, 0x16B3F).addRange(0x1CF50, 0x1CFC3).addRange(0x1D000, 0x1D0F5).addRange(0x1D100, 0x1D126).addRange(0x1D129, 0x1D164).addRange(0x1D16A, 0x1D16C).addRange(0x1D183, 0x1D184).addRange(0x1D18C, 0x1D1A9).addRange(0x1D1AE, 0x1D1EA).addRange(0x1D200, 0x1D241).addRange(0x1D300, 0x1D356).addRange(0x1D800, 0x1D9FF).addRange(0x1DA37, 0x1DA3A).addRange(0x1DA6D, 0x1DA74).addRange(0x1DA76, 0x1DA83);\nset.addRange(0x1DA85, 0x1DA86).addRange(0x1F000, 0x1F02B).addRange(0x1F030, 0x1F093).addRange(0x1F0A0, 0x1F0AE).addRange(0x1F0B1, 0x1F0BF).addRange(0x1F0C1, 0x1F0CF).addRange(0x1F0D1, 0x1F0F5).addRange(0x1F10D, 0x1F1AD).addRange(0x1F1E6, 0x1F202).addRange(0x1F210, 0x1F23B).addRange(0x1F240, 0x1F248).addRange(0x1F250, 0x1F251).addRange(0x1F260, 0x1F265).addRange(0x1F300, 0x1F3FA).addRange(0x1F400, 0x1F6D7).addRange(0x1F6DC, 0x1F6EC).addRange(0x1F6F0, 0x1F6FC).addRange(0x1F700, 0x1F776).addRange(0x1F77B, 0x1F7D9).addRange(0x1F7E0, 0x1F7EB).addRange(0x1F800, 0x1F80B).addRange(0x1F810, 0x1F847).addRange(0x1F850, 0x1F859).addRange(0x1F860, 0x1F887).addRange(0x1F890, 0x1F8AD).addRange(0x1F8B0, 0x1F8B1).addRange(0x1F900, 0x1FA53).addRange(0x1FA60, 0x1FA6D).addRange(0x1FA70, 0x1FA7C).addRange(0x1FA80, 0x1FA88).addRange(0x1FA90, 0x1FABD).addRange(0x1FABF, 0x1FAC5).addRange(0x1FACE, 0x1FADB).addRange(0x1FAE0, 0x1FAE8).addRange(0x1FAF0, 0x1FAF8).addRange(0x1FB00, 0x1FB92).addRange(0x1FB94, 0x1FBCA);\nexports.characters = set;\n","const set = require('regenerate')(0xAD, 0x38B, 0x38D, 0x3A2, 0x530, 0x590, 0x61C, 0x6DD, 0x83F, 0x85F, 0x8E2, 0x984, 0x9A9, 0x9B1, 0x9DE, 0xA04, 0xA29, 0xA31, 0xA34, 0xA37, 0xA3D, 0xA5D, 0xA84, 0xA8E, 0xA92, 0xAA9, 0xAB1, 0xAB4, 0xAC6, 0xACA, 0xB00, 0xB04, 0xB29, 0xB31, 0xB34, 0xB5E, 0xB84, 0xB91, 0xB9B, 0xB9D, 0xBC9, 0xC0D, 0xC11, 0xC29, 0xC45, 0xC49, 0xC57, 0xC8D, 0xC91, 0xCA9, 0xCB4, 0xCC5, 0xCC9, 0xCDF, 0xCF0, 0xD0D, 0xD11, 0xD45, 0xD49, 0xD80, 0xD84, 0xDB2, 0xDBC, 0xDD5, 0xDD7, 0xE83, 0xE85, 0xE8B, 0xEA4, 0xEA6, 0xEC5, 0xEC7, 0xECF, 0xF48, 0xF98, 0xFBD, 0xFCD, 0x10C6, 0x1249, 0x1257, 0x1259, 0x1289, 0x12B1, 0x12BF, 0x12C1, 0x12D7, 0x1311, 0x176D, 0x1771, 0x180E, 0x191F, 0x1A5F, 0x1B7F, 0x1F58, 0x1F5A, 0x1F5C, 0x1F5E, 0x1FB5, 0x1FC5, 0x1FDC, 0x1FF5, 0x1FFF, 0x208F, 0x2B96, 0x2D26, 0x2DA7, 0x2DAF, 0x2DB7, 0x2DBF, 0x2DC7, 0x2DCF, 0x2DD7, 0x2DDF, 0x2E9A, 0x3040, 0x3130, 0x318F, 0x321F, 0xA7D2, 0xA7D4, 0xA9CE, 0xA9FF, 0xAB27, 0xAB2F, 0xFB37, 0xFB3D, 0xFB3F, 0xFB42, 0xFB45, 0xFE53, 0xFE67, 0xFE75, 0xFFE7, 0x1000C, 0x10027, 0x1003B, 0x1003E, 0x1018F, 0x1039E, 0x1057B, 0x1058B, 0x10593, 0x10596, 0x105A2, 0x105B2, 0x105BA, 0x10786, 0x107B1, 0x10809, 0x10836, 0x10856, 0x108F3, 0x10A04, 0x10A14, 0x10A18, 0x10E7F, 0x10EAA, 0x110BD, 0x11135, 0x111E0, 0x11212, 0x11287, 0x11289, 0x1128E, 0x1129E, 0x11304, 0x11329, 0x11331, 0x11334, 0x1133A, 0x1145C, 0x11914, 0x11917, 0x11936, 0x11C09, 0x11C37, 0x11CA8, 0x11D07, 0x11D0A, 0x11D3B, 0x11D3E, 0x11D66, 0x11D69, 0x11D8F, 0x11D92, 0x11F11, 0x1246F, 0x16A5F, 0x16ABF, 0x16B5A, 0x16B62, 0x1AFF4, 0x1AFFC, 0x1AFFF, 0x1D455, 0x1D49D, 0x1D4AD, 0x1D4BA, 0x1D4BC, 0x1D4C4, 0x1D506, 0x1D515, 0x1D51D, 0x1D53A, 0x1D53F, 0x1D545, 0x1D551, 0x1DAA0, 0x1E007, 0x1E022, 0x1E025, 0x1E7E7, 0x1E7EC, 0x1E7EF, 0x1E7FF, 0x1EE04, 0x1EE20, 0x1EE23, 0x1EE28, 0x1EE33, 0x1EE38, 0x1EE3A, 0x1EE48, 0x1EE4A, 0x1EE4C, 0x1EE50, 0x1EE53, 0x1EE58, 0x1EE5A, 0x1EE5C, 0x1EE5E, 0x1EE60, 0x1EE63, 0x1EE6B, 0x1EE73, 0x1EE78, 0x1EE7D, 0x1EE7F, 0x1EE8A, 0x1EEA4, 0x1EEAA, 0x1F0C0, 0x1F0D0, 0x1FABE, 0x1FB93);\nset.addRange(0x0, 0x1F).addRange(0x7F, 0x9F).addRange(0x378, 0x379).addRange(0x380, 0x383).addRange(0x557, 0x558).addRange(0x58B, 0x58C).addRange(0x5C8, 0x5CF).addRange(0x5EB, 0x5EE).addRange(0x5F5, 0x605).addRange(0x70E, 0x70F).addRange(0x74B, 0x74C).addRange(0x7B2, 0x7BF).addRange(0x7FB, 0x7FC).addRange(0x82E, 0x82F).addRange(0x85C, 0x85D).addRange(0x86B, 0x86F).addRange(0x88F, 0x897).addRange(0x98D, 0x98E).addRange(0x991, 0x992).addRange(0x9B3, 0x9B5).addRange(0x9BA, 0x9BB).addRange(0x9C5, 0x9C6).addRange(0x9C9, 0x9CA).addRange(0x9CF, 0x9D6).addRange(0x9D8, 0x9DB).addRange(0x9E4, 0x9E5).addRange(0x9FF, 0xA00).addRange(0xA0B, 0xA0E).addRange(0xA11, 0xA12).addRange(0xA3A, 0xA3B).addRange(0xA43, 0xA46).addRange(0xA49, 0xA4A).addRange(0xA4E, 0xA50).addRange(0xA52, 0xA58).addRange(0xA5F, 0xA65).addRange(0xA77, 0xA80).addRange(0xABA, 0xABB).addRange(0xACE, 0xACF).addRange(0xAD1, 0xADF).addRange(0xAE4, 0xAE5).addRange(0xAF2, 0xAF8).addRange(0xB0D, 0xB0E).addRange(0xB11, 0xB12).addRange(0xB3A, 0xB3B).addRange(0xB45, 0xB46).addRange(0xB49, 0xB4A).addRange(0xB4E, 0xB54).addRange(0xB58, 0xB5B).addRange(0xB64, 0xB65).addRange(0xB78, 0xB81).addRange(0xB8B, 0xB8D);\nset.addRange(0xB96, 0xB98).addRange(0xBA0, 0xBA2).addRange(0xBA5, 0xBA7).addRange(0xBAB, 0xBAD).addRange(0xBBA, 0xBBD).addRange(0xBC3, 0xBC5).addRange(0xBCE, 0xBCF).addRange(0xBD1, 0xBD6).addRange(0xBD8, 0xBE5).addRange(0xBFB, 0xBFF).addRange(0xC3A, 0xC3B).addRange(0xC4E, 0xC54).addRange(0xC5B, 0xC5C).addRange(0xC5E, 0xC5F).addRange(0xC64, 0xC65).addRange(0xC70, 0xC76).addRange(0xCBA, 0xCBB).addRange(0xCCE, 0xCD4).addRange(0xCD7, 0xCDC).addRange(0xCE4, 0xCE5).addRange(0xCF4, 0xCFF).addRange(0xD50, 0xD53).addRange(0xD64, 0xD65).addRange(0xD97, 0xD99).addRange(0xDBE, 0xDBF).addRange(0xDC7, 0xDC9).addRange(0xDCB, 0xDCE).addRange(0xDE0, 0xDE5).addRange(0xDF0, 0xDF1).addRange(0xDF5, 0xE00).addRange(0xE3B, 0xE3E).addRange(0xE5C, 0xE80).addRange(0xEBE, 0xEBF).addRange(0xEDA, 0xEDB).addRange(0xEE0, 0xEFF).addRange(0xF6D, 0xF70).addRange(0xFDB, 0xFFF).addRange(0x10C8, 0x10CC).addRange(0x10CE, 0x10CF).addRange(0x124E, 0x124F).addRange(0x125E, 0x125F).addRange(0x128E, 0x128F).addRange(0x12B6, 0x12B7).addRange(0x12C6, 0x12C7).addRange(0x1316, 0x1317).addRange(0x135B, 0x135C).addRange(0x137D, 0x137F).addRange(0x139A, 0x139F).addRange(0x13F6, 0x13F7).addRange(0x13FE, 0x13FF).addRange(0x169D, 0x169F);\nset.addRange(0x16F9, 0x16FF).addRange(0x1716, 0x171E).addRange(0x1737, 0x173F).addRange(0x1754, 0x175F).addRange(0x1774, 0x177F).addRange(0x17DE, 0x17DF).addRange(0x17EA, 0x17EF).addRange(0x17FA, 0x17FF).addRange(0x181A, 0x181F).addRange(0x1879, 0x187F).addRange(0x18AB, 0x18AF).addRange(0x18F6, 0x18FF).addRange(0x192C, 0x192F).addRange(0x193C, 0x193F).addRange(0x1941, 0x1943).addRange(0x196E, 0x196F).addRange(0x1975, 0x197F).addRange(0x19AC, 0x19AF).addRange(0x19CA, 0x19CF).addRange(0x19DB, 0x19DD).addRange(0x1A1C, 0x1A1D).addRange(0x1A7D, 0x1A7E).addRange(0x1A8A, 0x1A8F).addRange(0x1A9A, 0x1A9F).addRange(0x1AAE, 0x1AAF).addRange(0x1ACF, 0x1AFF).addRange(0x1B4D, 0x1B4F).addRange(0x1BF4, 0x1BFB).addRange(0x1C38, 0x1C3A).addRange(0x1C4A, 0x1C4C).addRange(0x1C89, 0x1C8F).addRange(0x1CBB, 0x1CBC).addRange(0x1CC8, 0x1CCF).addRange(0x1CFB, 0x1CFF).addRange(0x1F16, 0x1F17).addRange(0x1F1E, 0x1F1F).addRange(0x1F46, 0x1F47).addRange(0x1F4E, 0x1F4F).addRange(0x1F7E, 0x1F7F).addRange(0x1FD4, 0x1FD5).addRange(0x1FF0, 0x1FF1).addRange(0x200B, 0x200F).addRange(0x202A, 0x202E).addRange(0x2060, 0x206F).addRange(0x2072, 0x2073).addRange(0x209D, 0x209F).addRange(0x20C1, 0x20CF).addRange(0x20F1, 0x20FF).addRange(0x218C, 0x218F).addRange(0x2427, 0x243F).addRange(0x244B, 0x245F);\nset.addRange(0x2B74, 0x2B75).addRange(0x2CF4, 0x2CF8).addRange(0x2D28, 0x2D2C).addRange(0x2D2E, 0x2D2F).addRange(0x2D68, 0x2D6E).addRange(0x2D71, 0x2D7E).addRange(0x2D97, 0x2D9F).addRange(0x2E5E, 0x2E7F).addRange(0x2EF4, 0x2EFF).addRange(0x2FD6, 0x2FEF).addRange(0x3097, 0x3098).addRange(0x3100, 0x3104).addRange(0x31E4, 0x31EE).addRange(0xA48D, 0xA48F).addRange(0xA4C7, 0xA4CF).addRange(0xA62C, 0xA63F).addRange(0xA6F8, 0xA6FF).addRange(0xA7CB, 0xA7CF).addRange(0xA7DA, 0xA7F1).addRange(0xA82D, 0xA82F).addRange(0xA83A, 0xA83F).addRange(0xA878, 0xA87F).addRange(0xA8C6, 0xA8CD).addRange(0xA8DA, 0xA8DF).addRange(0xA954, 0xA95E).addRange(0xA97D, 0xA97F).addRange(0xA9DA, 0xA9DD).addRange(0xAA37, 0xAA3F).addRange(0xAA4E, 0xAA4F).addRange(0xAA5A, 0xAA5B).addRange(0xAAC3, 0xAADA).addRange(0xAAF7, 0xAB00).addRange(0xAB07, 0xAB08).addRange(0xAB0F, 0xAB10).addRange(0xAB17, 0xAB1F).addRange(0xAB6C, 0xAB6F).addRange(0xABEE, 0xABEF).addRange(0xABFA, 0xABFF).addRange(0xD7A4, 0xD7AF).addRange(0xD7C7, 0xD7CA).addRange(0xD7FC, 0xF8FF).addRange(0xFA6E, 0xFA6F).addRange(0xFADA, 0xFAFF).addRange(0xFB07, 0xFB12).addRange(0xFB18, 0xFB1C).addRange(0xFBC3, 0xFBD2).addRange(0xFD90, 0xFD91).addRange(0xFDC8, 0xFDCE).addRange(0xFDD0, 0xFDEF).addRange(0xFE1A, 0xFE1F).addRange(0xFE6C, 0xFE6F);\nset.addRange(0xFEFD, 0xFF00).addRange(0xFFBF, 0xFFC1).addRange(0xFFC8, 0xFFC9).addRange(0xFFD0, 0xFFD1).addRange(0xFFD8, 0xFFD9).addRange(0xFFDD, 0xFFDF).addRange(0xFFEF, 0xFFFB).addRange(0xFFFE, 0xFFFF).addRange(0x1004E, 0x1004F).addRange(0x1005E, 0x1007F).addRange(0x100FB, 0x100FF).addRange(0x10103, 0x10106).addRange(0x10134, 0x10136).addRange(0x1019D, 0x1019F).addRange(0x101A1, 0x101CF).addRange(0x101FE, 0x1027F).addRange(0x1029D, 0x1029F).addRange(0x102D1, 0x102DF).addRange(0x102FC, 0x102FF).addRange(0x10324, 0x1032C).addRange(0x1034B, 0x1034F).addRange(0x1037B, 0x1037F).addRange(0x103C4, 0x103C7).addRange(0x103D6, 0x103FF).addRange(0x1049E, 0x1049F).addRange(0x104AA, 0x104AF).addRange(0x104D4, 0x104D7).addRange(0x104FC, 0x104FF).addRange(0x10528, 0x1052F).addRange(0x10564, 0x1056E).addRange(0x105BD, 0x105FF).addRange(0x10737, 0x1073F).addRange(0x10756, 0x1075F).addRange(0x10768, 0x1077F).addRange(0x107BB, 0x107FF).addRange(0x10806, 0x10807).addRange(0x10839, 0x1083B).addRange(0x1083D, 0x1083E).addRange(0x1089F, 0x108A6).addRange(0x108B0, 0x108DF).addRange(0x108F6, 0x108FA).addRange(0x1091C, 0x1091E).addRange(0x1093A, 0x1093E).addRange(0x10940, 0x1097F).addRange(0x109B8, 0x109BB).addRange(0x109D0, 0x109D1).addRange(0x10A07, 0x10A0B).addRange(0x10A36, 0x10A37).addRange(0x10A3B, 0x10A3E).addRange(0x10A49, 0x10A4F).addRange(0x10A59, 0x10A5F);\nset.addRange(0x10AA0, 0x10ABF).addRange(0x10AE7, 0x10AEA).addRange(0x10AF7, 0x10AFF).addRange(0x10B36, 0x10B38).addRange(0x10B56, 0x10B57).addRange(0x10B73, 0x10B77).addRange(0x10B92, 0x10B98).addRange(0x10B9D, 0x10BA8).addRange(0x10BB0, 0x10BFF).addRange(0x10C49, 0x10C7F).addRange(0x10CB3, 0x10CBF).addRange(0x10CF3, 0x10CF9).addRange(0x10D28, 0x10D2F).addRange(0x10D3A, 0x10E5F).addRange(0x10EAE, 0x10EAF).addRange(0x10EB2, 0x10EFC).addRange(0x10F28, 0x10F2F).addRange(0x10F5A, 0x10F6F).addRange(0x10F8A, 0x10FAF).addRange(0x10FCC, 0x10FDF).addRange(0x10FF7, 0x10FFF).addRange(0x1104E, 0x11051).addRange(0x11076, 0x1107E).addRange(0x110C3, 0x110CF).addRange(0x110E9, 0x110EF).addRange(0x110FA, 0x110FF).addRange(0x11148, 0x1114F).addRange(0x11177, 0x1117F).addRange(0x111F5, 0x111FF).addRange(0x11242, 0x1127F).addRange(0x112AA, 0x112AF).addRange(0x112EB, 0x112EF).addRange(0x112FA, 0x112FF).addRange(0x1130D, 0x1130E).addRange(0x11311, 0x11312).addRange(0x11345, 0x11346).addRange(0x11349, 0x1134A).addRange(0x1134E, 0x1134F).addRange(0x11351, 0x11356).addRange(0x11358, 0x1135C).addRange(0x11364, 0x11365).addRange(0x1136D, 0x1136F).addRange(0x11375, 0x113FF).addRange(0x11462, 0x1147F).addRange(0x114C8, 0x114CF).addRange(0x114DA, 0x1157F).addRange(0x115B6, 0x115B7).addRange(0x115DE, 0x115FF).addRange(0x11645, 0x1164F).addRange(0x1165A, 0x1165F).addRange(0x1166D, 0x1167F);\nset.addRange(0x116BA, 0x116BF).addRange(0x116CA, 0x116FF).addRange(0x1171B, 0x1171C).addRange(0x1172C, 0x1172F).addRange(0x11747, 0x117FF).addRange(0x1183C, 0x1189F).addRange(0x118F3, 0x118FE).addRange(0x11907, 0x11908).addRange(0x1190A, 0x1190B).addRange(0x11939, 0x1193A).addRange(0x11947, 0x1194F).addRange(0x1195A, 0x1199F).addRange(0x119A8, 0x119A9).addRange(0x119D8, 0x119D9).addRange(0x119E5, 0x119FF).addRange(0x11A48, 0x11A4F).addRange(0x11AA3, 0x11AAF).addRange(0x11AF9, 0x11AFF).addRange(0x11B0A, 0x11BFF).addRange(0x11C46, 0x11C4F).addRange(0x11C6D, 0x11C6F).addRange(0x11C90, 0x11C91).addRange(0x11CB7, 0x11CFF).addRange(0x11D37, 0x11D39).addRange(0x11D48, 0x11D4F).addRange(0x11D5A, 0x11D5F).addRange(0x11D99, 0x11D9F).addRange(0x11DAA, 0x11EDF).addRange(0x11EF9, 0x11EFF).addRange(0x11F3B, 0x11F3D).addRange(0x11F5A, 0x11FAF).addRange(0x11FB1, 0x11FBF).addRange(0x11FF2, 0x11FFE).addRange(0x1239A, 0x123FF).addRange(0x12475, 0x1247F).addRange(0x12544, 0x12F8F).addRange(0x12FF3, 0x12FFF).addRange(0x13430, 0x1343F).addRange(0x13456, 0x143FF).addRange(0x14647, 0x167FF).addRange(0x16A39, 0x16A3F).addRange(0x16A6A, 0x16A6D).addRange(0x16ACA, 0x16ACF).addRange(0x16AEE, 0x16AEF).addRange(0x16AF6, 0x16AFF).addRange(0x16B46, 0x16B4F).addRange(0x16B78, 0x16B7C).addRange(0x16B90, 0x16E3F).addRange(0x16E9B, 0x16EFF).addRange(0x16F4B, 0x16F4E).addRange(0x16F88, 0x16F8E);\nset.addRange(0x16FA0, 0x16FDF).addRange(0x16FE5, 0x16FEF).addRange(0x16FF2, 0x16FFF).addRange(0x187F8, 0x187FF).addRange(0x18CD6, 0x18CFF).addRange(0x18D09, 0x1AFEF).addRange(0x1B123, 0x1B131).addRange(0x1B133, 0x1B14F).addRange(0x1B153, 0x1B154).addRange(0x1B156, 0x1B163).addRange(0x1B168, 0x1B16F).addRange(0x1B2FC, 0x1BBFF).addRange(0x1BC6B, 0x1BC6F).addRange(0x1BC7D, 0x1BC7F).addRange(0x1BC89, 0x1BC8F).addRange(0x1BC9A, 0x1BC9B).addRange(0x1BCA0, 0x1CEFF).addRange(0x1CF2E, 0x1CF2F).addRange(0x1CF47, 0x1CF4F).addRange(0x1CFC4, 0x1CFFF).addRange(0x1D0F6, 0x1D0FF).addRange(0x1D127, 0x1D128).addRange(0x1D173, 0x1D17A).addRange(0x1D1EB, 0x1D1FF).addRange(0x1D246, 0x1D2BF).addRange(0x1D2D4, 0x1D2DF).addRange(0x1D2F4, 0x1D2FF).addRange(0x1D357, 0x1D35F).addRange(0x1D379, 0x1D3FF).addRange(0x1D4A0, 0x1D4A1).addRange(0x1D4A3, 0x1D4A4).addRange(0x1D4A7, 0x1D4A8).addRange(0x1D50B, 0x1D50C).addRange(0x1D547, 0x1D549).addRange(0x1D6A6, 0x1D6A7).addRange(0x1D7CC, 0x1D7CD).addRange(0x1DA8C, 0x1DA9A).addRange(0x1DAB0, 0x1DEFF).addRange(0x1DF1F, 0x1DF24).addRange(0x1DF2B, 0x1DFFF).addRange(0x1E019, 0x1E01A).addRange(0x1E02B, 0x1E02F).addRange(0x1E06E, 0x1E08E).addRange(0x1E090, 0x1E0FF).addRange(0x1E12D, 0x1E12F).addRange(0x1E13E, 0x1E13F).addRange(0x1E14A, 0x1E14D).addRange(0x1E150, 0x1E28F).addRange(0x1E2AF, 0x1E2BF).addRange(0x1E2FA, 0x1E2FE).addRange(0x1E300, 0x1E4CF);\nset.addRange(0x1E4FA, 0x1E7DF).addRange(0x1E8C5, 0x1E8C6).addRange(0x1E8D7, 0x1E8FF).addRange(0x1E94C, 0x1E94F).addRange(0x1E95A, 0x1E95D).addRange(0x1E960, 0x1EC70).addRange(0x1ECB5, 0x1ED00).addRange(0x1ED3E, 0x1EDFF).addRange(0x1EE25, 0x1EE26).addRange(0x1EE3C, 0x1EE41).addRange(0x1EE43, 0x1EE46).addRange(0x1EE55, 0x1EE56).addRange(0x1EE65, 0x1EE66).addRange(0x1EE9C, 0x1EEA0).addRange(0x1EEBC, 0x1EEEF).addRange(0x1EEF2, 0x1EFFF).addRange(0x1F02C, 0x1F02F).addRange(0x1F094, 0x1F09F).addRange(0x1F0AF, 0x1F0B0).addRange(0x1F0F6, 0x1F0FF).addRange(0x1F1AE, 0x1F1E5).addRange(0x1F203, 0x1F20F).addRange(0x1F23C, 0x1F23F).addRange(0x1F249, 0x1F24F).addRange(0x1F252, 0x1F25F).addRange(0x1F266, 0x1F2FF).addRange(0x1F6D8, 0x1F6DB).addRange(0x1F6ED, 0x1F6EF).addRange(0x1F6FD, 0x1F6FF).addRange(0x1F777, 0x1F77A).addRange(0x1F7DA, 0x1F7DF).addRange(0x1F7EC, 0x1F7EF).addRange(0x1F7F1, 0x1F7FF).addRange(0x1F80C, 0x1F80F).addRange(0x1F848, 0x1F84F).addRange(0x1F85A, 0x1F85F).addRange(0x1F888, 0x1F88F).addRange(0x1F8AE, 0x1F8AF).addRange(0x1F8B2, 0x1F8FF).addRange(0x1FA54, 0x1FA5F).addRange(0x1FA6E, 0x1FA6F).addRange(0x1FA7D, 0x1FA7F).addRange(0x1FA89, 0x1FA8F).addRange(0x1FAC6, 0x1FACD).addRange(0x1FADC, 0x1FADF).addRange(0x1FAE9, 0x1FAEF).addRange(0x1FAF9, 0x1FAFF).addRange(0x1FBCB, 0x1FBEF).addRange(0x1FBFA, 0x1FFFF).addRange(0x2A6E0, 0x2A6FF).addRange(0x2B73A, 0x2B73F);\nset.addRange(0x2B81E, 0x2B81F).addRange(0x2CEA2, 0x2CEAF).addRange(0x2EBE1, 0x2EBEF).addRange(0x2EE5E, 0x2F7FF).addRange(0x2FA1E, 0x2FFFF).addRange(0x3134B, 0x3134F).addRange(0x323B0, 0xE00FF).addRange(0xE01F0, 0x10FFFF);\nexports.characters = set;\n","const set = require('regenerate')(0x2029);\n\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0xE000, 0xF8FF).addRange(0xF0000, 0xFFFFD).addRange(0x100000, 0x10FFFD);\nexports.characters = set;\n","const set = require('regenerate')(0x5F, 0x7B, 0x7D, 0xA1, 0xA7, 0xAB, 0xBB, 0xBF, 0x37E, 0x387, 0x5BE, 0x5C0, 0x5C3, 0x5C6, 0x61B, 0x6D4, 0x85E, 0x970, 0x9FD, 0xA76, 0xAF0, 0xC77, 0xC84, 0xDF4, 0xE4F, 0xF14, 0xF85, 0x10FB, 0x1400, 0x166E, 0x1CD3, 0x2D70, 0x3030, 0x303D, 0x30A0, 0x30FB, 0xA673, 0xA67E, 0xA8FC, 0xA95F, 0xABEB, 0xFE63, 0xFE68, 0xFF3F, 0xFF5B, 0xFF5D, 0x1039F, 0x103D0, 0x1056F, 0x10857, 0x1091F, 0x1093F, 0x10A7F, 0x10EAD, 0x111CD, 0x111DB, 0x112A9, 0x1145D, 0x114C6, 0x116B9, 0x1183B, 0x119E2, 0x11FFF, 0x16AF5, 0x16B44, 0x16FE2, 0x1BC9F);\nset.addRange(0x21, 0x23).addRange(0x25, 0x2A).addRange(0x2C, 0x2F).addRange(0x3A, 0x3B).addRange(0x3F, 0x40).addRange(0x5B, 0x5D).addRange(0xB6, 0xB7).addRange(0x55A, 0x55F).addRange(0x589, 0x58A).addRange(0x5F3, 0x5F4).addRange(0x609, 0x60A).addRange(0x60C, 0x60D).addRange(0x61D, 0x61F).addRange(0x66A, 0x66D).addRange(0x700, 0x70D).addRange(0x7F7, 0x7F9).addRange(0x830, 0x83E).addRange(0x964, 0x965).addRange(0xE5A, 0xE5B).addRange(0xF04, 0xF12).addRange(0xF3A, 0xF3D).addRange(0xFD0, 0xFD4).addRange(0xFD9, 0xFDA).addRange(0x104A, 0x104F).addRange(0x1360, 0x1368).addRange(0x169B, 0x169C).addRange(0x16EB, 0x16ED).addRange(0x1735, 0x1736).addRange(0x17D4, 0x17D6).addRange(0x17D8, 0x17DA).addRange(0x1800, 0x180A).addRange(0x1944, 0x1945).addRange(0x1A1E, 0x1A1F).addRange(0x1AA0, 0x1AA6).addRange(0x1AA8, 0x1AAD).addRange(0x1B5A, 0x1B60).addRange(0x1B7D, 0x1B7E).addRange(0x1BFC, 0x1BFF).addRange(0x1C3B, 0x1C3F).addRange(0x1C7E, 0x1C7F).addRange(0x1CC0, 0x1CC7).addRange(0x2010, 0x2027).addRange(0x2030, 0x2043).addRange(0x2045, 0x2051).addRange(0x2053, 0x205E).addRange(0x207D, 0x207E).addRange(0x208D, 0x208E).addRange(0x2308, 0x230B).addRange(0x2329, 0x232A).addRange(0x2768, 0x2775).addRange(0x27C5, 0x27C6);\nset.addRange(0x27E6, 0x27EF).addRange(0x2983, 0x2998).addRange(0x29D8, 0x29DB).addRange(0x29FC, 0x29FD).addRange(0x2CF9, 0x2CFC).addRange(0x2CFE, 0x2CFF).addRange(0x2E00, 0x2E2E).addRange(0x2E30, 0x2E4F).addRange(0x2E52, 0x2E5D).addRange(0x3001, 0x3003).addRange(0x3008, 0x3011).addRange(0x3014, 0x301F).addRange(0xA4FE, 0xA4FF).addRange(0xA60D, 0xA60F).addRange(0xA6F2, 0xA6F7).addRange(0xA874, 0xA877).addRange(0xA8CE, 0xA8CF).addRange(0xA8F8, 0xA8FA).addRange(0xA92E, 0xA92F).addRange(0xA9C1, 0xA9CD).addRange(0xA9DE, 0xA9DF).addRange(0xAA5C, 0xAA5F).addRange(0xAADE, 0xAADF).addRange(0xAAF0, 0xAAF1).addRange(0xFD3E, 0xFD3F).addRange(0xFE10, 0xFE19).addRange(0xFE30, 0xFE52).addRange(0xFE54, 0xFE61).addRange(0xFE6A, 0xFE6B).addRange(0xFF01, 0xFF03).addRange(0xFF05, 0xFF0A).addRange(0xFF0C, 0xFF0F).addRange(0xFF1A, 0xFF1B).addRange(0xFF1F, 0xFF20).addRange(0xFF3B, 0xFF3D).addRange(0xFF5F, 0xFF65).addRange(0x10100, 0x10102).addRange(0x10A50, 0x10A58).addRange(0x10AF0, 0x10AF6).addRange(0x10B39, 0x10B3F).addRange(0x10B99, 0x10B9C).addRange(0x10F55, 0x10F59).addRange(0x10F86, 0x10F89).addRange(0x11047, 0x1104D).addRange(0x110BB, 0x110BC).addRange(0x110BE, 0x110C1).addRange(0x11140, 0x11143).addRange(0x11174, 0x11175).addRange(0x111C5, 0x111C8).addRange(0x111DD, 0x111DF).addRange(0x11238, 0x1123D);\nset.addRange(0x1144B, 0x1144F).addRange(0x1145A, 0x1145B).addRange(0x115C1, 0x115D7).addRange(0x11641, 0x11643).addRange(0x11660, 0x1166C).addRange(0x1173C, 0x1173E).addRange(0x11944, 0x11946).addRange(0x11A3F, 0x11A46).addRange(0x11A9A, 0x11A9C).addRange(0x11A9E, 0x11AA2).addRange(0x11B00, 0x11B09).addRange(0x11C41, 0x11C45).addRange(0x11C70, 0x11C71).addRange(0x11EF7, 0x11EF8).addRange(0x11F43, 0x11F4F).addRange(0x12470, 0x12474).addRange(0x12FF1, 0x12FF2).addRange(0x16A6E, 0x16A6F).addRange(0x16B37, 0x16B3B).addRange(0x16E97, 0x16E9A).addRange(0x1DA87, 0x1DA8B).addRange(0x1E95E, 0x1E95F);\nexports.characters = set;\n","const set = require('regenerate')(0x20, 0xA0, 0x1680, 0x202F, 0x205F, 0x3000);\nset.addRange(0x2000, 0x200A).addRange(0x2028, 0x2029);\nexports.characters = set;\n","const set = require('regenerate')(0x20, 0xA0, 0x1680, 0x202F, 0x205F, 0x3000);\nset.addRange(0x2000, 0x200A);\nexports.characters = set;\n","const set = require('regenerate')(0x903, 0x93B, 0x9D7, 0xA03, 0xA83, 0xAC9, 0xB3E, 0xB40, 0xB57, 0xBD7, 0xCBE, 0xCF3, 0xD57, 0xF7F, 0x1031, 0x1038, 0x108F, 0x1715, 0x1734, 0x17B6, 0x1A55, 0x1A57, 0x1A61, 0x1B04, 0x1B35, 0x1B3B, 0x1B82, 0x1BA1, 0x1BAA, 0x1BE7, 0x1BEE, 0x1CE1, 0x1CF7, 0xA827, 0xA983, 0xAA4D, 0xAA7B, 0xAA7D, 0xAAEB, 0xAAF5, 0xABEC, 0x11000, 0x11002, 0x11082, 0x1112C, 0x11182, 0x111CE, 0x11235, 0x11357, 0x11445, 0x114B9, 0x114C1, 0x115BE, 0x1163E, 0x116AC, 0x116B6, 0x11726, 0x11838, 0x1193D, 0x11940, 0x11942, 0x119E4, 0x11A39, 0x11A97, 0x11C2F, 0x11C3E, 0x11CA9, 0x11CB1, 0x11CB4, 0x11D96, 0x11F03, 0x11F41);\nset.addRange(0x93E, 0x940).addRange(0x949, 0x94C).addRange(0x94E, 0x94F).addRange(0x982, 0x983).addRange(0x9BE, 0x9C0).addRange(0x9C7, 0x9C8).addRange(0x9CB, 0x9CC).addRange(0xA3E, 0xA40).addRange(0xABE, 0xAC0).addRange(0xACB, 0xACC).addRange(0xB02, 0xB03).addRange(0xB47, 0xB48).addRange(0xB4B, 0xB4C).addRange(0xBBE, 0xBBF).addRange(0xBC1, 0xBC2).addRange(0xBC6, 0xBC8).addRange(0xBCA, 0xBCC).addRange(0xC01, 0xC03).addRange(0xC41, 0xC44).addRange(0xC82, 0xC83).addRange(0xCC0, 0xCC4).addRange(0xCC7, 0xCC8).addRange(0xCCA, 0xCCB).addRange(0xCD5, 0xCD6).addRange(0xD02, 0xD03).addRange(0xD3E, 0xD40).addRange(0xD46, 0xD48).addRange(0xD4A, 0xD4C).addRange(0xD82, 0xD83).addRange(0xDCF, 0xDD1).addRange(0xDD8, 0xDDF).addRange(0xDF2, 0xDF3).addRange(0xF3E, 0xF3F).addRange(0x102B, 0x102C).addRange(0x103B, 0x103C).addRange(0x1056, 0x1057).addRange(0x1062, 0x1064).addRange(0x1067, 0x106D).addRange(0x1083, 0x1084).addRange(0x1087, 0x108C).addRange(0x109A, 0x109C).addRange(0x17BE, 0x17C5).addRange(0x17C7, 0x17C8).addRange(0x1923, 0x1926).addRange(0x1929, 0x192B).addRange(0x1930, 0x1931).addRange(0x1933, 0x1938).addRange(0x1A19, 0x1A1A).addRange(0x1A63, 0x1A64).addRange(0x1A6D, 0x1A72).addRange(0x1B3D, 0x1B41);\nset.addRange(0x1B43, 0x1B44).addRange(0x1BA6, 0x1BA7).addRange(0x1BEA, 0x1BEC).addRange(0x1BF2, 0x1BF3).addRange(0x1C24, 0x1C2B).addRange(0x1C34, 0x1C35).addRange(0x302E, 0x302F).addRange(0xA823, 0xA824).addRange(0xA880, 0xA881).addRange(0xA8B4, 0xA8C3).addRange(0xA952, 0xA953).addRange(0xA9B4, 0xA9B5).addRange(0xA9BA, 0xA9BB).addRange(0xA9BE, 0xA9C0).addRange(0xAA2F, 0xAA30).addRange(0xAA33, 0xAA34).addRange(0xAAEE, 0xAAEF).addRange(0xABE3, 0xABE4).addRange(0xABE6, 0xABE7).addRange(0xABE9, 0xABEA).addRange(0x110B0, 0x110B2).addRange(0x110B7, 0x110B8).addRange(0x11145, 0x11146).addRange(0x111B3, 0x111B5).addRange(0x111BF, 0x111C0).addRange(0x1122C, 0x1122E).addRange(0x11232, 0x11233).addRange(0x112E0, 0x112E2).addRange(0x11302, 0x11303).addRange(0x1133E, 0x1133F).addRange(0x11341, 0x11344).addRange(0x11347, 0x11348).addRange(0x1134B, 0x1134D).addRange(0x11362, 0x11363).addRange(0x11435, 0x11437).addRange(0x11440, 0x11441).addRange(0x114B0, 0x114B2).addRange(0x114BB, 0x114BE).addRange(0x115AF, 0x115B1).addRange(0x115B8, 0x115BB).addRange(0x11630, 0x11632).addRange(0x1163B, 0x1163C).addRange(0x116AE, 0x116AF).addRange(0x11720, 0x11721).addRange(0x1182C, 0x1182E).addRange(0x11930, 0x11935).addRange(0x11937, 0x11938).addRange(0x119D1, 0x119D3).addRange(0x119DC, 0x119DF).addRange(0x11A57, 0x11A58).addRange(0x11D8A, 0x11D8E);\nset.addRange(0x11D93, 0x11D94).addRange(0x11EF5, 0x11EF6).addRange(0x11F34, 0x11F35).addRange(0x11F3E, 0x11F3F).addRange(0x16F51, 0x16F87).addRange(0x16FF0, 0x16FF1).addRange(0x1D165, 0x1D166).addRange(0x1D16D, 0x1D172);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0xD800, 0xDFFF);\nexports.characters = set;\n","const set = require('regenerate')(0x24, 0x2B, 0x5E, 0x60, 0x7C, 0x7E, 0xAC, 0xB4, 0xB8, 0xD7, 0xF7, 0x2ED, 0x375, 0x3F6, 0x482, 0x60B, 0x6DE, 0x6E9, 0x7F6, 0x888, 0xAF1, 0xB70, 0xC7F, 0xD4F, 0xD79, 0xE3F, 0xF13, 0xF34, 0xF36, 0xF38, 0x166D, 0x17DB, 0x1940, 0x1FBD, 0x2044, 0x2052, 0x2114, 0x2125, 0x2127, 0x2129, 0x212E, 0x214F, 0x3004, 0x3020, 0x31EF, 0x3250, 0xAB5B, 0xFB29, 0xFDCF, 0xFE62, 0xFE69, 0xFF04, 0xFF0B, 0xFF3E, 0xFF40, 0xFF5C, 0xFF5E, 0x101A0, 0x10AC8, 0x1173F, 0x16B45, 0x1BC9C, 0x1D245, 0x1D6C1, 0x1D6DB, 0x1D6FB, 0x1D715, 0x1D735, 0x1D74F, 0x1D76F, 0x1D789, 0x1D7A9, 0x1D7C3, 0x1E14F, 0x1E2FF, 0x1ECAC, 0x1ECB0, 0x1ED2E, 0x1F7F0);\nset.addRange(0x3C, 0x3E).addRange(0xA2, 0xA6).addRange(0xA8, 0xA9).addRange(0xAE, 0xB1).addRange(0x2C2, 0x2C5).addRange(0x2D2, 0x2DF).addRange(0x2E5, 0x2EB).addRange(0x2EF, 0x2FF).addRange(0x384, 0x385).addRange(0x58D, 0x58F).addRange(0x606, 0x608).addRange(0x60E, 0x60F).addRange(0x6FD, 0x6FE).addRange(0x7FE, 0x7FF).addRange(0x9F2, 0x9F3).addRange(0x9FA, 0x9FB).addRange(0xBF3, 0xBFA).addRange(0xF01, 0xF03).addRange(0xF15, 0xF17).addRange(0xF1A, 0xF1F).addRange(0xFBE, 0xFC5).addRange(0xFC7, 0xFCC).addRange(0xFCE, 0xFCF).addRange(0xFD5, 0xFD8).addRange(0x109E, 0x109F).addRange(0x1390, 0x1399).addRange(0x19DE, 0x19FF).addRange(0x1B61, 0x1B6A).addRange(0x1B74, 0x1B7C).addRange(0x1FBF, 0x1FC1).addRange(0x1FCD, 0x1FCF).addRange(0x1FDD, 0x1FDF).addRange(0x1FED, 0x1FEF).addRange(0x1FFD, 0x1FFE).addRange(0x207A, 0x207C).addRange(0x208A, 0x208C).addRange(0x20A0, 0x20C0).addRange(0x2100, 0x2101).addRange(0x2103, 0x2106).addRange(0x2108, 0x2109).addRange(0x2116, 0x2118).addRange(0x211E, 0x2123).addRange(0x213A, 0x213B).addRange(0x2140, 0x2144).addRange(0x214A, 0x214D).addRange(0x218A, 0x218B).addRange(0x2190, 0x2307).addRange(0x230C, 0x2328).addRange(0x232B, 0x2426).addRange(0x2440, 0x244A).addRange(0x249C, 0x24E9);\nset.addRange(0x2500, 0x2767).addRange(0x2794, 0x27C4).addRange(0x27C7, 0x27E5).addRange(0x27F0, 0x2982).addRange(0x2999, 0x29D7).addRange(0x29DC, 0x29FB).addRange(0x29FE, 0x2B73).addRange(0x2B76, 0x2B95).addRange(0x2B97, 0x2BFF).addRange(0x2CE5, 0x2CEA).addRange(0x2E50, 0x2E51).addRange(0x2E80, 0x2E99).addRange(0x2E9B, 0x2EF3).addRange(0x2F00, 0x2FD5).addRange(0x2FF0, 0x2FFF).addRange(0x3012, 0x3013).addRange(0x3036, 0x3037).addRange(0x303E, 0x303F).addRange(0x309B, 0x309C).addRange(0x3190, 0x3191).addRange(0x3196, 0x319F).addRange(0x31C0, 0x31E3).addRange(0x3200, 0x321E).addRange(0x322A, 0x3247).addRange(0x3260, 0x327F).addRange(0x328A, 0x32B0).addRange(0x32C0, 0x33FF).addRange(0x4DC0, 0x4DFF).addRange(0xA490, 0xA4C6).addRange(0xA700, 0xA716).addRange(0xA720, 0xA721).addRange(0xA789, 0xA78A).addRange(0xA828, 0xA82B).addRange(0xA836, 0xA839).addRange(0xAA77, 0xAA79).addRange(0xAB6A, 0xAB6B).addRange(0xFBB2, 0xFBC2).addRange(0xFD40, 0xFD4F).addRange(0xFDFC, 0xFDFF).addRange(0xFE64, 0xFE66).addRange(0xFF1C, 0xFF1E).addRange(0xFFE0, 0xFFE6).addRange(0xFFE8, 0xFFEE).addRange(0xFFFC, 0xFFFD).addRange(0x10137, 0x1013F).addRange(0x10179, 0x10189).addRange(0x1018C, 0x1018E).addRange(0x10190, 0x1019C).addRange(0x101D0, 0x101FC).addRange(0x10877, 0x10878).addRange(0x11FD5, 0x11FF1);\nset.addRange(0x16B3C, 0x16B3F).addRange(0x1CF50, 0x1CFC3).addRange(0x1D000, 0x1D0F5).addRange(0x1D100, 0x1D126).addRange(0x1D129, 0x1D164).addRange(0x1D16A, 0x1D16C).addRange(0x1D183, 0x1D184).addRange(0x1D18C, 0x1D1A9).addRange(0x1D1AE, 0x1D1EA).addRange(0x1D200, 0x1D241).addRange(0x1D300, 0x1D356).addRange(0x1D800, 0x1D9FF).addRange(0x1DA37, 0x1DA3A).addRange(0x1DA6D, 0x1DA74).addRange(0x1DA76, 0x1DA83).addRange(0x1DA85, 0x1DA86).addRange(0x1EEF0, 0x1EEF1).addRange(0x1F000, 0x1F02B).addRange(0x1F030, 0x1F093).addRange(0x1F0A0, 0x1F0AE).addRange(0x1F0B1, 0x1F0BF).addRange(0x1F0C1, 0x1F0CF).addRange(0x1F0D1, 0x1F0F5).addRange(0x1F10D, 0x1F1AD).addRange(0x1F1E6, 0x1F202).addRange(0x1F210, 0x1F23B).addRange(0x1F240, 0x1F248).addRange(0x1F250, 0x1F251).addRange(0x1F260, 0x1F265).addRange(0x1F300, 0x1F6D7).addRange(0x1F6DC, 0x1F6EC).addRange(0x1F6F0, 0x1F6FC).addRange(0x1F700, 0x1F776).addRange(0x1F77B, 0x1F7D9).addRange(0x1F7E0, 0x1F7EB).addRange(0x1F800, 0x1F80B).addRange(0x1F810, 0x1F847).addRange(0x1F850, 0x1F859).addRange(0x1F860, 0x1F887).addRange(0x1F890, 0x1F8AD).addRange(0x1F8B0, 0x1F8B1).addRange(0x1F900, 0x1FA53).addRange(0x1FA60, 0x1FA6D).addRange(0x1FA70, 0x1FA7C).addRange(0x1FA80, 0x1FA88).addRange(0x1FA90, 0x1FABD).addRange(0x1FABF, 0x1FAC5).addRange(0x1FACE, 0x1FADB).addRange(0x1FAE0, 0x1FAE8).addRange(0x1FAF0, 0x1FAF8).addRange(0x1FB00, 0x1FB92);\nset.addRange(0x1FB94, 0x1FBCA);\nexports.characters = set;\n","const set = require('regenerate')(0x1C5, 0x1C8, 0x1CB, 0x1F2, 0x1FBC, 0x1FCC, 0x1FFC);\nset.addRange(0x1F88, 0x1F8F).addRange(0x1F98, 0x1F9F).addRange(0x1FA8, 0x1FAF);\nexports.characters = set;\n","const set = require('regenerate')(0x38B, 0x38D, 0x3A2, 0x530, 0x590, 0x70E, 0x83F, 0x85F, 0x88F, 0x984, 0x9A9, 0x9B1, 0x9DE, 0xA04, 0xA29, 0xA31, 0xA34, 0xA37, 0xA3D, 0xA5D, 0xA84, 0xA8E, 0xA92, 0xAA9, 0xAB1, 0xAB4, 0xAC6, 0xACA, 0xB00, 0xB04, 0xB29, 0xB31, 0xB34, 0xB5E, 0xB84, 0xB91, 0xB9B, 0xB9D, 0xBC9, 0xC0D, 0xC11, 0xC29, 0xC45, 0xC49, 0xC57, 0xC8D, 0xC91, 0xCA9, 0xCB4, 0xCC5, 0xCC9, 0xCDF, 0xCF0, 0xD0D, 0xD11, 0xD45, 0xD49, 0xD80, 0xD84, 0xDB2, 0xDBC, 0xDD5, 0xDD7, 0xE83, 0xE85, 0xE8B, 0xEA4, 0xEA6, 0xEC5, 0xEC7, 0xECF, 0xF48, 0xF98, 0xFBD, 0xFCD, 0x10C6, 0x1249, 0x1257, 0x1259, 0x1289, 0x12B1, 0x12BF, 0x12C1, 0x12D7, 0x1311, 0x176D, 0x1771, 0x191F, 0x1A5F, 0x1B7F, 0x1F58, 0x1F5A, 0x1F5C, 0x1F5E, 0x1FB5, 0x1FC5, 0x1FDC, 0x1FF5, 0x1FFF, 0x2065, 0x208F, 0x2B96, 0x2D26, 0x2DA7, 0x2DAF, 0x2DB7, 0x2DBF, 0x2DC7, 0x2DCF, 0x2DD7, 0x2DDF, 0x2E9A, 0x3040, 0x3130, 0x318F, 0x321F, 0xA7D2, 0xA7D4, 0xA9CE, 0xA9FF, 0xAB27, 0xAB2F, 0xFB37, 0xFB3D, 0xFB3F, 0xFB42, 0xFB45, 0xFE53, 0xFE67, 0xFE75, 0xFF00, 0xFFE7, 0x1000C, 0x10027, 0x1003B, 0x1003E, 0x1018F, 0x1039E, 0x1057B, 0x1058B, 0x10593, 0x10596, 0x105A2, 0x105B2, 0x105BA, 0x10786, 0x107B1, 0x10809, 0x10836, 0x10856, 0x108F3, 0x10A04, 0x10A14, 0x10A18, 0x10E7F, 0x10EAA, 0x11135, 0x111E0, 0x11212, 0x11287, 0x11289, 0x1128E, 0x1129E, 0x11304, 0x11329, 0x11331, 0x11334, 0x1133A, 0x1145C, 0x11914, 0x11917, 0x11936, 0x11C09, 0x11C37, 0x11CA8, 0x11D07, 0x11D0A, 0x11D3B, 0x11D3E, 0x11D66, 0x11D69, 0x11D8F, 0x11D92, 0x11F11, 0x1246F, 0x16A5F, 0x16ABF, 0x16B5A, 0x16B62, 0x1AFF4, 0x1AFFC, 0x1AFFF, 0x1D455, 0x1D49D, 0x1D4AD, 0x1D4BA, 0x1D4BC, 0x1D4C4, 0x1D506, 0x1D515, 0x1D51D, 0x1D53A, 0x1D53F, 0x1D545, 0x1D551, 0x1DAA0, 0x1E007, 0x1E022, 0x1E025, 0x1E7E7, 0x1E7EC, 0x1E7EF, 0x1E7FF, 0x1EE04, 0x1EE20, 0x1EE23, 0x1EE28, 0x1EE33, 0x1EE38, 0x1EE3A, 0x1EE48, 0x1EE4A, 0x1EE4C, 0x1EE50, 0x1EE53, 0x1EE58, 0x1EE5A, 0x1EE5C, 0x1EE5E, 0x1EE60, 0x1EE63, 0x1EE6B, 0x1EE73, 0x1EE78, 0x1EE7D, 0x1EE7F, 0x1EE8A, 0x1EEA4, 0x1EEAA, 0x1F0C0, 0x1F0D0, 0x1FABE, 0x1FB93);\nset.addRange(0x378, 0x379).addRange(0x380, 0x383).addRange(0x557, 0x558).addRange(0x58B, 0x58C).addRange(0x5C8, 0x5CF).addRange(0x5EB, 0x5EE).addRange(0x5F5, 0x5FF).addRange(0x74B, 0x74C).addRange(0x7B2, 0x7BF).addRange(0x7FB, 0x7FC).addRange(0x82E, 0x82F).addRange(0x85C, 0x85D).addRange(0x86B, 0x86F).addRange(0x892, 0x897).addRange(0x98D, 0x98E).addRange(0x991, 0x992).addRange(0x9B3, 0x9B5).addRange(0x9BA, 0x9BB).addRange(0x9C5, 0x9C6).addRange(0x9C9, 0x9CA).addRange(0x9CF, 0x9D6).addRange(0x9D8, 0x9DB).addRange(0x9E4, 0x9E5).addRange(0x9FF, 0xA00).addRange(0xA0B, 0xA0E).addRange(0xA11, 0xA12).addRange(0xA3A, 0xA3B).addRange(0xA43, 0xA46).addRange(0xA49, 0xA4A).addRange(0xA4E, 0xA50).addRange(0xA52, 0xA58).addRange(0xA5F, 0xA65).addRange(0xA77, 0xA80).addRange(0xABA, 0xABB).addRange(0xACE, 0xACF).addRange(0xAD1, 0xADF).addRange(0xAE4, 0xAE5).addRange(0xAF2, 0xAF8).addRange(0xB0D, 0xB0E).addRange(0xB11, 0xB12).addRange(0xB3A, 0xB3B).addRange(0xB45, 0xB46).addRange(0xB49, 0xB4A).addRange(0xB4E, 0xB54).addRange(0xB58, 0xB5B).addRange(0xB64, 0xB65).addRange(0xB78, 0xB81).addRange(0xB8B, 0xB8D).addRange(0xB96, 0xB98).addRange(0xBA0, 0xBA2).addRange(0xBA5, 0xBA7);\nset.addRange(0xBAB, 0xBAD).addRange(0xBBA, 0xBBD).addRange(0xBC3, 0xBC5).addRange(0xBCE, 0xBCF).addRange(0xBD1, 0xBD6).addRange(0xBD8, 0xBE5).addRange(0xBFB, 0xBFF).addRange(0xC3A, 0xC3B).addRange(0xC4E, 0xC54).addRange(0xC5B, 0xC5C).addRange(0xC5E, 0xC5F).addRange(0xC64, 0xC65).addRange(0xC70, 0xC76).addRange(0xCBA, 0xCBB).addRange(0xCCE, 0xCD4).addRange(0xCD7, 0xCDC).addRange(0xCE4, 0xCE5).addRange(0xCF4, 0xCFF).addRange(0xD50, 0xD53).addRange(0xD64, 0xD65).addRange(0xD97, 0xD99).addRange(0xDBE, 0xDBF).addRange(0xDC7, 0xDC9).addRange(0xDCB, 0xDCE).addRange(0xDE0, 0xDE5).addRange(0xDF0, 0xDF1).addRange(0xDF5, 0xE00).addRange(0xE3B, 0xE3E).addRange(0xE5C, 0xE80).addRange(0xEBE, 0xEBF).addRange(0xEDA, 0xEDB).addRange(0xEE0, 0xEFF).addRange(0xF6D, 0xF70).addRange(0xFDB, 0xFFF).addRange(0x10C8, 0x10CC).addRange(0x10CE, 0x10CF).addRange(0x124E, 0x124F).addRange(0x125E, 0x125F).addRange(0x128E, 0x128F).addRange(0x12B6, 0x12B7).addRange(0x12C6, 0x12C7).addRange(0x1316, 0x1317).addRange(0x135B, 0x135C).addRange(0x137D, 0x137F).addRange(0x139A, 0x139F).addRange(0x13F6, 0x13F7).addRange(0x13FE, 0x13FF).addRange(0x169D, 0x169F).addRange(0x16F9, 0x16FF).addRange(0x1716, 0x171E).addRange(0x1737, 0x173F);\nset.addRange(0x1754, 0x175F).addRange(0x1774, 0x177F).addRange(0x17DE, 0x17DF).addRange(0x17EA, 0x17EF).addRange(0x17FA, 0x17FF).addRange(0x181A, 0x181F).addRange(0x1879, 0x187F).addRange(0x18AB, 0x18AF).addRange(0x18F6, 0x18FF).addRange(0x192C, 0x192F).addRange(0x193C, 0x193F).addRange(0x1941, 0x1943).addRange(0x196E, 0x196F).addRange(0x1975, 0x197F).addRange(0x19AC, 0x19AF).addRange(0x19CA, 0x19CF).addRange(0x19DB, 0x19DD).addRange(0x1A1C, 0x1A1D).addRange(0x1A7D, 0x1A7E).addRange(0x1A8A, 0x1A8F).addRange(0x1A9A, 0x1A9F).addRange(0x1AAE, 0x1AAF).addRange(0x1ACF, 0x1AFF).addRange(0x1B4D, 0x1B4F).addRange(0x1BF4, 0x1BFB).addRange(0x1C38, 0x1C3A).addRange(0x1C4A, 0x1C4C).addRange(0x1C89, 0x1C8F).addRange(0x1CBB, 0x1CBC).addRange(0x1CC8, 0x1CCF).addRange(0x1CFB, 0x1CFF).addRange(0x1F16, 0x1F17).addRange(0x1F1E, 0x1F1F).addRange(0x1F46, 0x1F47).addRange(0x1F4E, 0x1F4F).addRange(0x1F7E, 0x1F7F).addRange(0x1FD4, 0x1FD5).addRange(0x1FF0, 0x1FF1).addRange(0x2072, 0x2073).addRange(0x209D, 0x209F).addRange(0x20C1, 0x20CF).addRange(0x20F1, 0x20FF).addRange(0x218C, 0x218F).addRange(0x2427, 0x243F).addRange(0x244B, 0x245F).addRange(0x2B74, 0x2B75).addRange(0x2CF4, 0x2CF8).addRange(0x2D28, 0x2D2C).addRange(0x2D2E, 0x2D2F).addRange(0x2D68, 0x2D6E).addRange(0x2D71, 0x2D7E);\nset.addRange(0x2D97, 0x2D9F).addRange(0x2E5E, 0x2E7F).addRange(0x2EF4, 0x2EFF).addRange(0x2FD6, 0x2FEF).addRange(0x3097, 0x3098).addRange(0x3100, 0x3104).addRange(0x31E4, 0x31EE).addRange(0xA48D, 0xA48F).addRange(0xA4C7, 0xA4CF).addRange(0xA62C, 0xA63F).addRange(0xA6F8, 0xA6FF).addRange(0xA7CB, 0xA7CF).addRange(0xA7DA, 0xA7F1).addRange(0xA82D, 0xA82F).addRange(0xA83A, 0xA83F).addRange(0xA878, 0xA87F).addRange(0xA8C6, 0xA8CD).addRange(0xA8DA, 0xA8DF).addRange(0xA954, 0xA95E).addRange(0xA97D, 0xA97F).addRange(0xA9DA, 0xA9DD).addRange(0xAA37, 0xAA3F).addRange(0xAA4E, 0xAA4F).addRange(0xAA5A, 0xAA5B).addRange(0xAAC3, 0xAADA).addRange(0xAAF7, 0xAB00).addRange(0xAB07, 0xAB08).addRange(0xAB0F, 0xAB10).addRange(0xAB17, 0xAB1F).addRange(0xAB6C, 0xAB6F).addRange(0xABEE, 0xABEF).addRange(0xABFA, 0xABFF).addRange(0xD7A4, 0xD7AF).addRange(0xD7C7, 0xD7CA).addRange(0xD7FC, 0xD7FF).addRange(0xFA6E, 0xFA6F).addRange(0xFADA, 0xFAFF).addRange(0xFB07, 0xFB12).addRange(0xFB18, 0xFB1C).addRange(0xFBC3, 0xFBD2).addRange(0xFD90, 0xFD91).addRange(0xFDC8, 0xFDCE).addRange(0xFDD0, 0xFDEF).addRange(0xFE1A, 0xFE1F).addRange(0xFE6C, 0xFE6F).addRange(0xFEFD, 0xFEFE).addRange(0xFFBF, 0xFFC1).addRange(0xFFC8, 0xFFC9).addRange(0xFFD0, 0xFFD1).addRange(0xFFD8, 0xFFD9).addRange(0xFFDD, 0xFFDF);\nset.addRange(0xFFEF, 0xFFF8).addRange(0xFFFE, 0xFFFF).addRange(0x1004E, 0x1004F).addRange(0x1005E, 0x1007F).addRange(0x100FB, 0x100FF).addRange(0x10103, 0x10106).addRange(0x10134, 0x10136).addRange(0x1019D, 0x1019F).addRange(0x101A1, 0x101CF).addRange(0x101FE, 0x1027F).addRange(0x1029D, 0x1029F).addRange(0x102D1, 0x102DF).addRange(0x102FC, 0x102FF).addRange(0x10324, 0x1032C).addRange(0x1034B, 0x1034F).addRange(0x1037B, 0x1037F).addRange(0x103C4, 0x103C7).addRange(0x103D6, 0x103FF).addRange(0x1049E, 0x1049F).addRange(0x104AA, 0x104AF).addRange(0x104D4, 0x104D7).addRange(0x104FC, 0x104FF).addRange(0x10528, 0x1052F).addRange(0x10564, 0x1056E).addRange(0x105BD, 0x105FF).addRange(0x10737, 0x1073F).addRange(0x10756, 0x1075F).addRange(0x10768, 0x1077F).addRange(0x107BB, 0x107FF).addRange(0x10806, 0x10807).addRange(0x10839, 0x1083B).addRange(0x1083D, 0x1083E).addRange(0x1089F, 0x108A6).addRange(0x108B0, 0x108DF).addRange(0x108F6, 0x108FA).addRange(0x1091C, 0x1091E).addRange(0x1093A, 0x1093E).addRange(0x10940, 0x1097F).addRange(0x109B8, 0x109BB).addRange(0x109D0, 0x109D1).addRange(0x10A07, 0x10A0B).addRange(0x10A36, 0x10A37).addRange(0x10A3B, 0x10A3E).addRange(0x10A49, 0x10A4F).addRange(0x10A59, 0x10A5F).addRange(0x10AA0, 0x10ABF).addRange(0x10AE7, 0x10AEA).addRange(0x10AF7, 0x10AFF).addRange(0x10B36, 0x10B38).addRange(0x10B56, 0x10B57).addRange(0x10B73, 0x10B77);\nset.addRange(0x10B92, 0x10B98).addRange(0x10B9D, 0x10BA8).addRange(0x10BB0, 0x10BFF).addRange(0x10C49, 0x10C7F).addRange(0x10CB3, 0x10CBF).addRange(0x10CF3, 0x10CF9).addRange(0x10D28, 0x10D2F).addRange(0x10D3A, 0x10E5F).addRange(0x10EAE, 0x10EAF).addRange(0x10EB2, 0x10EFC).addRange(0x10F28, 0x10F2F).addRange(0x10F5A, 0x10F6F).addRange(0x10F8A, 0x10FAF).addRange(0x10FCC, 0x10FDF).addRange(0x10FF7, 0x10FFF).addRange(0x1104E, 0x11051).addRange(0x11076, 0x1107E).addRange(0x110C3, 0x110CC).addRange(0x110CE, 0x110CF).addRange(0x110E9, 0x110EF).addRange(0x110FA, 0x110FF).addRange(0x11148, 0x1114F).addRange(0x11177, 0x1117F).addRange(0x111F5, 0x111FF).addRange(0x11242, 0x1127F).addRange(0x112AA, 0x112AF).addRange(0x112EB, 0x112EF).addRange(0x112FA, 0x112FF).addRange(0x1130D, 0x1130E).addRange(0x11311, 0x11312).addRange(0x11345, 0x11346).addRange(0x11349, 0x1134A).addRange(0x1134E, 0x1134F).addRange(0x11351, 0x11356).addRange(0x11358, 0x1135C).addRange(0x11364, 0x11365).addRange(0x1136D, 0x1136F).addRange(0x11375, 0x113FF).addRange(0x11462, 0x1147F).addRange(0x114C8, 0x114CF).addRange(0x114DA, 0x1157F).addRange(0x115B6, 0x115B7).addRange(0x115DE, 0x115FF).addRange(0x11645, 0x1164F).addRange(0x1165A, 0x1165F).addRange(0x1166D, 0x1167F).addRange(0x116BA, 0x116BF).addRange(0x116CA, 0x116FF).addRange(0x1171B, 0x1171C).addRange(0x1172C, 0x1172F).addRange(0x11747, 0x117FF);\nset.addRange(0x1183C, 0x1189F).addRange(0x118F3, 0x118FE).addRange(0x11907, 0x11908).addRange(0x1190A, 0x1190B).addRange(0x11939, 0x1193A).addRange(0x11947, 0x1194F).addRange(0x1195A, 0x1199F).addRange(0x119A8, 0x119A9).addRange(0x119D8, 0x119D9).addRange(0x119E5, 0x119FF).addRange(0x11A48, 0x11A4F).addRange(0x11AA3, 0x11AAF).addRange(0x11AF9, 0x11AFF).addRange(0x11B0A, 0x11BFF).addRange(0x11C46, 0x11C4F).addRange(0x11C6D, 0x11C6F).addRange(0x11C90, 0x11C91).addRange(0x11CB7, 0x11CFF).addRange(0x11D37, 0x11D39).addRange(0x11D48, 0x11D4F).addRange(0x11D5A, 0x11D5F).addRange(0x11D99, 0x11D9F).addRange(0x11DAA, 0x11EDF).addRange(0x11EF9, 0x11EFF).addRange(0x11F3B, 0x11F3D).addRange(0x11F5A, 0x11FAF).addRange(0x11FB1, 0x11FBF).addRange(0x11FF2, 0x11FFE).addRange(0x1239A, 0x123FF).addRange(0x12475, 0x1247F).addRange(0x12544, 0x12F8F).addRange(0x12FF3, 0x12FFF).addRange(0x13456, 0x143FF).addRange(0x14647, 0x167FF).addRange(0x16A39, 0x16A3F).addRange(0x16A6A, 0x16A6D).addRange(0x16ACA, 0x16ACF).addRange(0x16AEE, 0x16AEF).addRange(0x16AF6, 0x16AFF).addRange(0x16B46, 0x16B4F).addRange(0x16B78, 0x16B7C).addRange(0x16B90, 0x16E3F).addRange(0x16E9B, 0x16EFF).addRange(0x16F4B, 0x16F4E).addRange(0x16F88, 0x16F8E).addRange(0x16FA0, 0x16FDF).addRange(0x16FE5, 0x16FEF).addRange(0x16FF2, 0x16FFF).addRange(0x187F8, 0x187FF).addRange(0x18CD6, 0x18CFF).addRange(0x18D09, 0x1AFEF);\nset.addRange(0x1B123, 0x1B131).addRange(0x1B133, 0x1B14F).addRange(0x1B153, 0x1B154).addRange(0x1B156, 0x1B163).addRange(0x1B168, 0x1B16F).addRange(0x1B2FC, 0x1BBFF).addRange(0x1BC6B, 0x1BC6F).addRange(0x1BC7D, 0x1BC7F).addRange(0x1BC89, 0x1BC8F).addRange(0x1BC9A, 0x1BC9B).addRange(0x1BCA4, 0x1CEFF).addRange(0x1CF2E, 0x1CF2F).addRange(0x1CF47, 0x1CF4F).addRange(0x1CFC4, 0x1CFFF).addRange(0x1D0F6, 0x1D0FF).addRange(0x1D127, 0x1D128).addRange(0x1D1EB, 0x1D1FF).addRange(0x1D246, 0x1D2BF).addRange(0x1D2D4, 0x1D2DF).addRange(0x1D2F4, 0x1D2FF).addRange(0x1D357, 0x1D35F).addRange(0x1D379, 0x1D3FF).addRange(0x1D4A0, 0x1D4A1).addRange(0x1D4A3, 0x1D4A4).addRange(0x1D4A7, 0x1D4A8).addRange(0x1D50B, 0x1D50C).addRange(0x1D547, 0x1D549).addRange(0x1D6A6, 0x1D6A7).addRange(0x1D7CC, 0x1D7CD).addRange(0x1DA8C, 0x1DA9A).addRange(0x1DAB0, 0x1DEFF).addRange(0x1DF1F, 0x1DF24).addRange(0x1DF2B, 0x1DFFF).addRange(0x1E019, 0x1E01A).addRange(0x1E02B, 0x1E02F).addRange(0x1E06E, 0x1E08E).addRange(0x1E090, 0x1E0FF).addRange(0x1E12D, 0x1E12F).addRange(0x1E13E, 0x1E13F).addRange(0x1E14A, 0x1E14D).addRange(0x1E150, 0x1E28F).addRange(0x1E2AF, 0x1E2BF).addRange(0x1E2FA, 0x1E2FE).addRange(0x1E300, 0x1E4CF).addRange(0x1E4FA, 0x1E7DF).addRange(0x1E8C5, 0x1E8C6).addRange(0x1E8D7, 0x1E8FF).addRange(0x1E94C, 0x1E94F).addRange(0x1E95A, 0x1E95D).addRange(0x1E960, 0x1EC70).addRange(0x1ECB5, 0x1ED00);\nset.addRange(0x1ED3E, 0x1EDFF).addRange(0x1EE25, 0x1EE26).addRange(0x1EE3C, 0x1EE41).addRange(0x1EE43, 0x1EE46).addRange(0x1EE55, 0x1EE56).addRange(0x1EE65, 0x1EE66).addRange(0x1EE9C, 0x1EEA0).addRange(0x1EEBC, 0x1EEEF).addRange(0x1EEF2, 0x1EFFF).addRange(0x1F02C, 0x1F02F).addRange(0x1F094, 0x1F09F).addRange(0x1F0AF, 0x1F0B0).addRange(0x1F0F6, 0x1F0FF).addRange(0x1F1AE, 0x1F1E5).addRange(0x1F203, 0x1F20F).addRange(0x1F23C, 0x1F23F).addRange(0x1F249, 0x1F24F).addRange(0x1F252, 0x1F25F).addRange(0x1F266, 0x1F2FF).addRange(0x1F6D8, 0x1F6DB).addRange(0x1F6ED, 0x1F6EF).addRange(0x1F6FD, 0x1F6FF).addRange(0x1F777, 0x1F77A).addRange(0x1F7DA, 0x1F7DF).addRange(0x1F7EC, 0x1F7EF).addRange(0x1F7F1, 0x1F7FF).addRange(0x1F80C, 0x1F80F).addRange(0x1F848, 0x1F84F).addRange(0x1F85A, 0x1F85F).addRange(0x1F888, 0x1F88F).addRange(0x1F8AE, 0x1F8AF).addRange(0x1F8B2, 0x1F8FF).addRange(0x1FA54, 0x1FA5F).addRange(0x1FA6E, 0x1FA6F).addRange(0x1FA7D, 0x1FA7F).addRange(0x1FA89, 0x1FA8F).addRange(0x1FAC6, 0x1FACD).addRange(0x1FADC, 0x1FADF).addRange(0x1FAE9, 0x1FAEF).addRange(0x1FAF9, 0x1FAFF).addRange(0x1FBCB, 0x1FBEF).addRange(0x1FBFA, 0x1FFFF).addRange(0x2A6E0, 0x2A6FF).addRange(0x2B73A, 0x2B73F).addRange(0x2B81E, 0x2B81F).addRange(0x2CEA2, 0x2CEAF).addRange(0x2EBE1, 0x2EBEF).addRange(0x2EE5E, 0x2F7FF).addRange(0x2FA1E, 0x2FFFF).addRange(0x3134B, 0x3134F).addRange(0x323B0, 0xE0000);\nset.addRange(0xE0002, 0xE001F).addRange(0xE0080, 0xE00FF).addRange(0xE01F0, 0xEFFFF).addRange(0xFFFFE, 0xFFFFF).addRange(0x10FFFE, 0x10FFFF);\nexports.characters = set;\n","const set = require('regenerate')(0x100, 0x102, 0x104, 0x106, 0x108, 0x10A, 0x10C, 0x10E, 0x110, 0x112, 0x114, 0x116, 0x118, 0x11A, 0x11C, 0x11E, 0x120, 0x122, 0x124, 0x126, 0x128, 0x12A, 0x12C, 0x12E, 0x130, 0x132, 0x134, 0x136, 0x139, 0x13B, 0x13D, 0x13F, 0x141, 0x143, 0x145, 0x147, 0x14A, 0x14C, 0x14E, 0x150, 0x152, 0x154, 0x156, 0x158, 0x15A, 0x15C, 0x15E, 0x160, 0x162, 0x164, 0x166, 0x168, 0x16A, 0x16C, 0x16E, 0x170, 0x172, 0x174, 0x176, 0x17B, 0x17D, 0x184, 0x1A2, 0x1A4, 0x1A9, 0x1AC, 0x1B5, 0x1BC, 0x1C4, 0x1C7, 0x1CA, 0x1CD, 0x1CF, 0x1D1, 0x1D3, 0x1D5, 0x1D7, 0x1D9, 0x1DB, 0x1DE, 0x1E0, 0x1E2, 0x1E4, 0x1E6, 0x1E8, 0x1EA, 0x1EC, 0x1EE, 0x1F1, 0x1F4, 0x1FA, 0x1FC, 0x1FE, 0x200, 0x202, 0x204, 0x206, 0x208, 0x20A, 0x20C, 0x20E, 0x210, 0x212, 0x214, 0x216, 0x218, 0x21A, 0x21C, 0x21E, 0x220, 0x222, 0x224, 0x226, 0x228, 0x22A, 0x22C, 0x22E, 0x230, 0x232, 0x241, 0x248, 0x24A, 0x24C, 0x24E, 0x370, 0x372, 0x376, 0x37F, 0x386, 0x38C, 0x3CF, 0x3D8, 0x3DA, 0x3DC, 0x3DE, 0x3E0, 0x3E2, 0x3E4, 0x3E6, 0x3E8, 0x3EA, 0x3EC, 0x3EE, 0x3F4, 0x3F7, 0x460, 0x462, 0x464, 0x466, 0x468, 0x46A, 0x46C, 0x46E, 0x470, 0x472, 0x474, 0x476, 0x478, 0x47A, 0x47C, 0x47E, 0x480, 0x48A, 0x48C, 0x48E, 0x490, 0x492, 0x494, 0x496, 0x498, 0x49A, 0x49C, 0x49E, 0x4A0, 0x4A2, 0x4A4, 0x4A6, 0x4A8, 0x4AA, 0x4AC, 0x4AE, 0x4B0, 0x4B2, 0x4B4, 0x4B6, 0x4B8, 0x4BA, 0x4BC, 0x4BE, 0x4C3, 0x4C5, 0x4C7, 0x4C9, 0x4CB, 0x4CD, 0x4D0, 0x4D2, 0x4D4, 0x4D6, 0x4D8, 0x4DA, 0x4DC, 0x4DE, 0x4E0, 0x4E2, 0x4E4, 0x4E6, 0x4E8, 0x4EA, 0x4EC, 0x4EE, 0x4F0, 0x4F2, 0x4F4, 0x4F6, 0x4F8, 0x4FA, 0x4FC, 0x4FE, 0x500, 0x502, 0x504, 0x506, 0x508, 0x50A, 0x50C, 0x50E, 0x510, 0x512, 0x514, 0x516, 0x518, 0x51A, 0x51C, 0x51E, 0x520, 0x522, 0x524, 0x526, 0x528, 0x52A, 0x52C, 0x52E, 0x10C7, 0x10CD, 0x1E00, 0x1E02, 0x1E04, 0x1E06, 0x1E08, 0x1E0A, 0x1E0C, 0x1E0E, 0x1E10, 0x1E12, 0x1E14, 0x1E16, 0x1E18, 0x1E1A, 0x1E1C, 0x1E1E, 0x1E20, 0x1E22, 0x1E24, 0x1E26, 0x1E28, 0x1E2A, 0x1E2C, 0x1E2E, 0x1E30, 0x1E32, 0x1E34, 0x1E36, 0x1E38, 0x1E3A, 0x1E3C, 0x1E3E, 0x1E40, 0x1E42, 0x1E44, 0x1E46, 0x1E48, 0x1E4A, 0x1E4C, 0x1E4E, 0x1E50, 0x1E52, 0x1E54, 0x1E56, 0x1E58, 0x1E5A, 0x1E5C, 0x1E5E, 0x1E60, 0x1E62, 0x1E64, 0x1E66, 0x1E68, 0x1E6A, 0x1E6C, 0x1E6E, 0x1E70, 0x1E72, 0x1E74, 0x1E76, 0x1E78, 0x1E7A, 0x1E7C, 0x1E7E, 0x1E80, 0x1E82, 0x1E84, 0x1E86, 0x1E88, 0x1E8A, 0x1E8C, 0x1E8E, 0x1E90, 0x1E92, 0x1E94, 0x1E9E, 0x1EA0, 0x1EA2, 0x1EA4, 0x1EA6, 0x1EA8, 0x1EAA, 0x1EAC, 0x1EAE, 0x1EB0, 0x1EB2, 0x1EB4, 0x1EB6, 0x1EB8, 0x1EBA, 0x1EBC, 0x1EBE, 0x1EC0, 0x1EC2, 0x1EC4, 0x1EC6, 0x1EC8, 0x1ECA, 0x1ECC, 0x1ECE, 0x1ED0, 0x1ED2, 0x1ED4, 0x1ED6, 0x1ED8, 0x1EDA, 0x1EDC, 0x1EDE, 0x1EE0, 0x1EE2, 0x1EE4, 0x1EE6, 0x1EE8, 0x1EEA, 0x1EEC, 0x1EEE, 0x1EF0, 0x1EF2, 0x1EF4, 0x1EF6, 0x1EF8, 0x1EFA, 0x1EFC, 0x1EFE, 0x1F59, 0x1F5B, 0x1F5D, 0x1F5F, 0x2102, 0x2107, 0x2115, 0x2124, 0x2126, 0x2128, 0x2145, 0x2183, 0x2C60, 0x2C67, 0x2C69, 0x2C6B, 0x2C72, 0x2C75, 0x2C82, 0x2C84, 0x2C86, 0x2C88, 0x2C8A, 0x2C8C, 0x2C8E, 0x2C90, 0x2C92, 0x2C94, 0x2C96, 0x2C98, 0x2C9A, 0x2C9C, 0x2C9E, 0x2CA0, 0x2CA2, 0x2CA4, 0x2CA6, 0x2CA8, 0x2CAA, 0x2CAC, 0x2CAE, 0x2CB0, 0x2CB2, 0x2CB4, 0x2CB6, 0x2CB8, 0x2CBA, 0x2CBC, 0x2CBE, 0x2CC0, 0x2CC2, 0x2CC4, 0x2CC6, 0x2CC8, 0x2CCA, 0x2CCC, 0x2CCE, 0x2CD0, 0x2CD2, 0x2CD4, 0x2CD6, 0x2CD8, 0x2CDA, 0x2CDC, 0x2CDE, 0x2CE0, 0x2CE2, 0x2CEB, 0x2CED, 0x2CF2, 0xA640, 0xA642, 0xA644, 0xA646, 0xA648, 0xA64A, 0xA64C, 0xA64E, 0xA650, 0xA652, 0xA654, 0xA656, 0xA658, 0xA65A, 0xA65C, 0xA65E, 0xA660, 0xA662, 0xA664, 0xA666, 0xA668, 0xA66A, 0xA66C, 0xA680, 0xA682, 0xA684, 0xA686, 0xA688, 0xA68A, 0xA68C, 0xA68E, 0xA690, 0xA692, 0xA694, 0xA696, 0xA698, 0xA69A, 0xA722, 0xA724, 0xA726, 0xA728, 0xA72A, 0xA72C, 0xA72E, 0xA732, 0xA734, 0xA736, 0xA738, 0xA73A, 0xA73C, 0xA73E, 0xA740, 0xA742, 0xA744, 0xA746, 0xA748, 0xA74A, 0xA74C, 0xA74E, 0xA750, 0xA752, 0xA754, 0xA756, 0xA758, 0xA75A, 0xA75C, 0xA75E, 0xA760, 0xA762, 0xA764, 0xA766, 0xA768, 0xA76A, 0xA76C, 0xA76E, 0xA779, 0xA77B, 0xA780, 0xA782, 0xA784, 0xA786, 0xA78B, 0xA78D, 0xA790, 0xA792, 0xA796, 0xA798, 0xA79A, 0xA79C, 0xA79E, 0xA7A0, 0xA7A2, 0xA7A4, 0xA7A6, 0xA7A8, 0xA7B6, 0xA7B8, 0xA7BA, 0xA7BC, 0xA7BE, 0xA7C0, 0xA7C2, 0xA7C9, 0xA7D0, 0xA7D6, 0xA7D8, 0xA7F5, 0x1D49C, 0x1D4A2, 0x1D546, 0x1D7CA);\nset.addRange(0x41, 0x5A).addRange(0xC0, 0xD6).addRange(0xD8, 0xDE).addRange(0x178, 0x179).addRange(0x181, 0x182).addRange(0x186, 0x187).addRange(0x189, 0x18B).addRange(0x18E, 0x191).addRange(0x193, 0x194).addRange(0x196, 0x198).addRange(0x19C, 0x19D).addRange(0x19F, 0x1A0).addRange(0x1A6, 0x1A7).addRange(0x1AE, 0x1AF).addRange(0x1B1, 0x1B3).addRange(0x1B7, 0x1B8).addRange(0x1F6, 0x1F8).addRange(0x23A, 0x23B).addRange(0x23D, 0x23E).addRange(0x243, 0x246).addRange(0x388, 0x38A).addRange(0x38E, 0x38F).addRange(0x391, 0x3A1).addRange(0x3A3, 0x3AB).addRange(0x3D2, 0x3D4).addRange(0x3F9, 0x3FA).addRange(0x3FD, 0x42F).addRange(0x4C0, 0x4C1).addRange(0x531, 0x556).addRange(0x10A0, 0x10C5).addRange(0x13A0, 0x13F5).addRange(0x1C90, 0x1CBA).addRange(0x1CBD, 0x1CBF).addRange(0x1F08, 0x1F0F).addRange(0x1F18, 0x1F1D).addRange(0x1F28, 0x1F2F).addRange(0x1F38, 0x1F3F).addRange(0x1F48, 0x1F4D).addRange(0x1F68, 0x1F6F).addRange(0x1FB8, 0x1FBB).addRange(0x1FC8, 0x1FCB).addRange(0x1FD8, 0x1FDB).addRange(0x1FE8, 0x1FEC).addRange(0x1FF8, 0x1FFB).addRange(0x210B, 0x210D).addRange(0x2110, 0x2112).addRange(0x2119, 0x211D).addRange(0x212A, 0x212D).addRange(0x2130, 0x2133).addRange(0x213E, 0x213F).addRange(0x2C00, 0x2C2F);\nset.addRange(0x2C62, 0x2C64).addRange(0x2C6D, 0x2C70).addRange(0x2C7E, 0x2C80).addRange(0xA77D, 0xA77E).addRange(0xA7AA, 0xA7AE).addRange(0xA7B0, 0xA7B4).addRange(0xA7C4, 0xA7C7).addRange(0xFF21, 0xFF3A).addRange(0x10400, 0x10427).addRange(0x104B0, 0x104D3).addRange(0x10570, 0x1057A).addRange(0x1057C, 0x1058A).addRange(0x1058C, 0x10592).addRange(0x10594, 0x10595).addRange(0x10C80, 0x10CB2).addRange(0x118A0, 0x118BF).addRange(0x16E40, 0x16E5F).addRange(0x1D400, 0x1D419).addRange(0x1D434, 0x1D44D).addRange(0x1D468, 0x1D481).addRange(0x1D49E, 0x1D49F).addRange(0x1D4A5, 0x1D4A6).addRange(0x1D4A9, 0x1D4AC).addRange(0x1D4AE, 0x1D4B5).addRange(0x1D4D0, 0x1D4E9).addRange(0x1D504, 0x1D505).addRange(0x1D507, 0x1D50A).addRange(0x1D50D, 0x1D514).addRange(0x1D516, 0x1D51C).addRange(0x1D538, 0x1D539).addRange(0x1D53B, 0x1D53E).addRange(0x1D540, 0x1D544).addRange(0x1D54A, 0x1D550).addRange(0x1D56C, 0x1D585).addRange(0x1D5A0, 0x1D5B9).addRange(0x1D5D4, 0x1D5ED).addRange(0x1D608, 0x1D621).addRange(0x1D63C, 0x1D655).addRange(0x1D670, 0x1D689).addRange(0x1D6A8, 0x1D6C0).addRange(0x1D6E2, 0x1D6FA).addRange(0x1D71C, 0x1D734).addRange(0x1D756, 0x1D76E).addRange(0x1D790, 0x1D7A8).addRange(0x1E900, 0x1E921);\nexports.characters = set;\n","module.exports = new Map([\n\t['General_Category', [\n\t\t'Cased_Letter',\n\t\t'Close_Punctuation',\n\t\t'Connector_Punctuation',\n\t\t'Control',\n\t\t'Currency_Symbol',\n\t\t'Dash_Punctuation',\n\t\t'Decimal_Number',\n\t\t'Enclosing_Mark',\n\t\t'Final_Punctuation',\n\t\t'Format',\n\t\t'Initial_Punctuation',\n\t\t'Letter',\n\t\t'Letter_Number',\n\t\t'Line_Separator',\n\t\t'Lowercase_Letter',\n\t\t'Mark',\n\t\t'Math_Symbol',\n\t\t'Modifier_Letter',\n\t\t'Modifier_Symbol',\n\t\t'Nonspacing_Mark',\n\t\t'Number',\n\t\t'Open_Punctuation',\n\t\t'Other',\n\t\t'Other_Letter',\n\t\t'Other_Number',\n\t\t'Other_Punctuation',\n\t\t'Other_Symbol',\n\t\t'Paragraph_Separator',\n\t\t'Private_Use',\n\t\t'Punctuation',\n\t\t'Separator',\n\t\t'Space_Separator',\n\t\t'Spacing_Mark',\n\t\t'Surrogate',\n\t\t'Symbol',\n\t\t'Titlecase_Letter',\n\t\t'Unassigned',\n\t\t'Uppercase_Letter'\n\t]],\n\t['Script', [\n\t\t'Adlam',\n\t\t'Ahom',\n\t\t'Anatolian_Hieroglyphs',\n\t\t'Arabic',\n\t\t'Armenian',\n\t\t'Avestan',\n\t\t'Balinese',\n\t\t'Bamum',\n\t\t'Bassa_Vah',\n\t\t'Batak',\n\t\t'Bengali',\n\t\t'Bhaiksuki',\n\t\t'Bopomofo',\n\t\t'Brahmi',\n\t\t'Braille',\n\t\t'Buginese',\n\t\t'Buhid',\n\t\t'Canadian_Aboriginal',\n\t\t'Carian',\n\t\t'Caucasian_Albanian',\n\t\t'Chakma',\n\t\t'Cham',\n\t\t'Cherokee',\n\t\t'Chorasmian',\n\t\t'Common',\n\t\t'Coptic',\n\t\t'Cuneiform',\n\t\t'Cypriot',\n\t\t'Cypro_Minoan',\n\t\t'Cyrillic',\n\t\t'Deseret',\n\t\t'Devanagari',\n\t\t'Dives_Akuru',\n\t\t'Dogra',\n\t\t'Duployan',\n\t\t'Egyptian_Hieroglyphs',\n\t\t'Elbasan',\n\t\t'Elymaic',\n\t\t'Ethiopic',\n\t\t'Georgian',\n\t\t'Glagolitic',\n\t\t'Gothic',\n\t\t'Grantha',\n\t\t'Greek',\n\t\t'Gujarati',\n\t\t'Gunjala_Gondi',\n\t\t'Gurmukhi',\n\t\t'Han',\n\t\t'Hangul',\n\t\t'Hanifi_Rohingya',\n\t\t'Hanunoo',\n\t\t'Hatran',\n\t\t'Hebrew',\n\t\t'Hiragana',\n\t\t'Imperial_Aramaic',\n\t\t'Inherited',\n\t\t'Inscriptional_Pahlavi',\n\t\t'Inscriptional_Parthian',\n\t\t'Javanese',\n\t\t'Kaithi',\n\t\t'Kannada',\n\t\t'Katakana',\n\t\t'Kawi',\n\t\t'Kayah_Li',\n\t\t'Kharoshthi',\n\t\t'Khitan_Small_Script',\n\t\t'Khmer',\n\t\t'Khojki',\n\t\t'Khudawadi',\n\t\t'Lao',\n\t\t'Latin',\n\t\t'Lepcha',\n\t\t'Limbu',\n\t\t'Linear_A',\n\t\t'Linear_B',\n\t\t'Lisu',\n\t\t'Lycian',\n\t\t'Lydian',\n\t\t'Mahajani',\n\t\t'Makasar',\n\t\t'Malayalam',\n\t\t'Mandaic',\n\t\t'Manichaean',\n\t\t'Marchen',\n\t\t'Masaram_Gondi',\n\t\t'Medefaidrin',\n\t\t'Meetei_Mayek',\n\t\t'Mende_Kikakui',\n\t\t'Meroitic_Cursive',\n\t\t'Meroitic_Hieroglyphs',\n\t\t'Miao',\n\t\t'Modi',\n\t\t'Mongolian',\n\t\t'Mro',\n\t\t'Multani',\n\t\t'Myanmar',\n\t\t'Nabataean',\n\t\t'Nag_Mundari',\n\t\t'Nandinagari',\n\t\t'New_Tai_Lue',\n\t\t'Newa',\n\t\t'Nko',\n\t\t'Nushu',\n\t\t'Nyiakeng_Puachue_Hmong',\n\t\t'Ogham',\n\t\t'Ol_Chiki',\n\t\t'Old_Hungarian',\n\t\t'Old_Italic',\n\t\t'Old_North_Arabian',\n\t\t'Old_Permic',\n\t\t'Old_Persian',\n\t\t'Old_Sogdian',\n\t\t'Old_South_Arabian',\n\t\t'Old_Turkic',\n\t\t'Old_Uyghur',\n\t\t'Oriya',\n\t\t'Osage',\n\t\t'Osmanya',\n\t\t'Pahawh_Hmong',\n\t\t'Palmyrene',\n\t\t'Pau_Cin_Hau',\n\t\t'Phags_Pa',\n\t\t'Phoenician',\n\t\t'Psalter_Pahlavi',\n\t\t'Rejang',\n\t\t'Runic',\n\t\t'Samaritan',\n\t\t'Saurashtra',\n\t\t'Sharada',\n\t\t'Shavian',\n\t\t'Siddham',\n\t\t'SignWriting',\n\t\t'Sinhala',\n\t\t'Sogdian',\n\t\t'Sora_Sompeng',\n\t\t'Soyombo',\n\t\t'Sundanese',\n\t\t'Syloti_Nagri',\n\t\t'Syriac',\n\t\t'Tagalog',\n\t\t'Tagbanwa',\n\t\t'Tai_Le',\n\t\t'Tai_Tham',\n\t\t'Tai_Viet',\n\t\t'Takri',\n\t\t'Tamil',\n\t\t'Tangsa',\n\t\t'Tangut',\n\t\t'Telugu',\n\t\t'Thaana',\n\t\t'Thai',\n\t\t'Tibetan',\n\t\t'Tifinagh',\n\t\t'Tirhuta',\n\t\t'Toto',\n\t\t'Ugaritic',\n\t\t'Vai',\n\t\t'Vithkuqi',\n\t\t'Wancho',\n\t\t'Warang_Citi',\n\t\t'Yezidi',\n\t\t'Yi',\n\t\t'Zanabazar_Square'\n\t]],\n\t['Script_Extensions', [\n\t\t'Adlam',\n\t\t'Ahom',\n\t\t'Anatolian_Hieroglyphs',\n\t\t'Arabic',\n\t\t'Armenian',\n\t\t'Avestan',\n\t\t'Balinese',\n\t\t'Bamum',\n\t\t'Bassa_Vah',\n\t\t'Batak',\n\t\t'Bengali',\n\t\t'Bhaiksuki',\n\t\t'Bopomofo',\n\t\t'Brahmi',\n\t\t'Braille',\n\t\t'Buginese',\n\t\t'Buhid',\n\t\t'Canadian_Aboriginal',\n\t\t'Carian',\n\t\t'Caucasian_Albanian',\n\t\t'Chakma',\n\t\t'Cham',\n\t\t'Cherokee',\n\t\t'Chorasmian',\n\t\t'Common',\n\t\t'Coptic',\n\t\t'Cuneiform',\n\t\t'Cypriot',\n\t\t'Cypro_Minoan',\n\t\t'Cyrillic',\n\t\t'Deseret',\n\t\t'Devanagari',\n\t\t'Dives_Akuru',\n\t\t'Dogra',\n\t\t'Duployan',\n\t\t'Egyptian_Hieroglyphs',\n\t\t'Elbasan',\n\t\t'Elymaic',\n\t\t'Ethiopic',\n\t\t'Georgian',\n\t\t'Glagolitic',\n\t\t'Gothic',\n\t\t'Grantha',\n\t\t'Greek',\n\t\t'Gujarati',\n\t\t'Gunjala_Gondi',\n\t\t'Gurmukhi',\n\t\t'Han',\n\t\t'Hangul',\n\t\t'Hanifi_Rohingya',\n\t\t'Hanunoo',\n\t\t'Hatran',\n\t\t'Hebrew',\n\t\t'Hiragana',\n\t\t'Imperial_Aramaic',\n\t\t'Inherited',\n\t\t'Inscriptional_Pahlavi',\n\t\t'Inscriptional_Parthian',\n\t\t'Javanese',\n\t\t'Kaithi',\n\t\t'Kannada',\n\t\t'Katakana',\n\t\t'Kawi',\n\t\t'Kayah_Li',\n\t\t'Kharoshthi',\n\t\t'Khitan_Small_Script',\n\t\t'Khmer',\n\t\t'Khojki',\n\t\t'Khudawadi',\n\t\t'Lao',\n\t\t'Latin',\n\t\t'Lepcha',\n\t\t'Limbu',\n\t\t'Linear_A',\n\t\t'Linear_B',\n\t\t'Lisu',\n\t\t'Lycian',\n\t\t'Lydian',\n\t\t'Mahajani',\n\t\t'Makasar',\n\t\t'Malayalam',\n\t\t'Mandaic',\n\t\t'Manichaean',\n\t\t'Marchen',\n\t\t'Masaram_Gondi',\n\t\t'Medefaidrin',\n\t\t'Meetei_Mayek',\n\t\t'Mende_Kikakui',\n\t\t'Meroitic_Cursive',\n\t\t'Meroitic_Hieroglyphs',\n\t\t'Miao',\n\t\t'Modi',\n\t\t'Mongolian',\n\t\t'Mro',\n\t\t'Multani',\n\t\t'Myanmar',\n\t\t'Nabataean',\n\t\t'Nag_Mundari',\n\t\t'Nandinagari',\n\t\t'New_Tai_Lue',\n\t\t'Newa',\n\t\t'Nko',\n\t\t'Nushu',\n\t\t'Nyiakeng_Puachue_Hmong',\n\t\t'Ogham',\n\t\t'Ol_Chiki',\n\t\t'Old_Hungarian',\n\t\t'Old_Italic',\n\t\t'Old_North_Arabian',\n\t\t'Old_Permic',\n\t\t'Old_Persian',\n\t\t'Old_Sogdian',\n\t\t'Old_South_Arabian',\n\t\t'Old_Turkic',\n\t\t'Old_Uyghur',\n\t\t'Oriya',\n\t\t'Osage',\n\t\t'Osmanya',\n\t\t'Pahawh_Hmong',\n\t\t'Palmyrene',\n\t\t'Pau_Cin_Hau',\n\t\t'Phags_Pa',\n\t\t'Phoenician',\n\t\t'Psalter_Pahlavi',\n\t\t'Rejang',\n\t\t'Runic',\n\t\t'Samaritan',\n\t\t'Saurashtra',\n\t\t'Sharada',\n\t\t'Shavian',\n\t\t'Siddham',\n\t\t'SignWriting',\n\t\t'Sinhala',\n\t\t'Sogdian',\n\t\t'Sora_Sompeng',\n\t\t'Soyombo',\n\t\t'Sundanese',\n\t\t'Syloti_Nagri',\n\t\t'Syriac',\n\t\t'Tagalog',\n\t\t'Tagbanwa',\n\t\t'Tai_Le',\n\t\t'Tai_Tham',\n\t\t'Tai_Viet',\n\t\t'Takri',\n\t\t'Tamil',\n\t\t'Tangsa',\n\t\t'Tangut',\n\t\t'Telugu',\n\t\t'Thaana',\n\t\t'Thai',\n\t\t'Tibetan',\n\t\t'Tifinagh',\n\t\t'Tirhuta',\n\t\t'Toto',\n\t\t'Ugaritic',\n\t\t'Vai',\n\t\t'Vithkuqi',\n\t\t'Wancho',\n\t\t'Warang_Citi',\n\t\t'Yezidi',\n\t\t'Yi',\n\t\t'Zanabazar_Square'\n\t]],\n\t['Binary_Property', [\n\t\t'ASCII',\n\t\t'ASCII_Hex_Digit',\n\t\t'Alphabetic',\n\t\t'Any',\n\t\t'Assigned',\n\t\t'Bidi_Control',\n\t\t'Bidi_Mirrored',\n\t\t'Case_Ignorable',\n\t\t'Cased',\n\t\t'Changes_When_Casefolded',\n\t\t'Changes_When_Casemapped',\n\t\t'Changes_When_Lowercased',\n\t\t'Changes_When_NFKC_Casefolded',\n\t\t'Changes_When_Titlecased',\n\t\t'Changes_When_Uppercased',\n\t\t'Dash',\n\t\t'Default_Ignorable_Code_Point',\n\t\t'Deprecated',\n\t\t'Diacritic',\n\t\t'Emoji',\n\t\t'Emoji_Component',\n\t\t'Emoji_Modifier',\n\t\t'Emoji_Modifier_Base',\n\t\t'Emoji_Presentation',\n\t\t'Extended_Pictographic',\n\t\t'Extender',\n\t\t'Grapheme_Base',\n\t\t'Grapheme_Extend',\n\t\t'Hex_Digit',\n\t\t'IDS_Binary_Operator',\n\t\t'IDS_Trinary_Operator',\n\t\t'ID_Continue',\n\t\t'ID_Start',\n\t\t'Ideographic',\n\t\t'Join_Control',\n\t\t'Logical_Order_Exception',\n\t\t'Lowercase',\n\t\t'Math',\n\t\t'Noncharacter_Code_Point',\n\t\t'Pattern_Syntax',\n\t\t'Pattern_White_Space',\n\t\t'Quotation_Mark',\n\t\t'Radical',\n\t\t'Regional_Indicator',\n\t\t'Sentence_Terminal',\n\t\t'Soft_Dotted',\n\t\t'Terminal_Punctuation',\n\t\t'Unified_Ideograph',\n\t\t'Uppercase',\n\t\t'Variation_Selector',\n\t\t'White_Space',\n\t\t'XID_Continue',\n\t\t'XID_Start'\n\t]],\n\t['Property_of_Strings', [\n\t\t'Basic_Emoji',\n\t\t'Emoji_Keycap_Sequence',\n\t\t'RGI_Emoji',\n\t\t'RGI_Emoji_Flag_Sequence',\n\t\t'RGI_Emoji_Modifier_Sequence',\n\t\t'RGI_Emoji_Tag_Sequence',\n\t\t'RGI_Emoji_ZWJ_Sequence'\n\t]]\n]);\n","const set = require('regenerate')(0x23F0, 0x23F3, 0x267F, 0x2693, 0x26A1, 0x26CE, 0x26D4, 0x26EA, 0x26F5, 0x26FA, 0x26FD, 0x2705, 0x2728, 0x274C, 0x274E, 0x2757, 0x27B0, 0x27BF, 0x2B50, 0x2B55, 0x1F004, 0x1F0CF, 0x1F18E, 0x1F201, 0x1F21A, 0x1F22F, 0x1F3F4, 0x1F440, 0x1F57A, 0x1F5A4, 0x1F6CC, 0x1F7F0);\nset.addRange(0x231A, 0x231B).addRange(0x23E9, 0x23EC).addRange(0x25FD, 0x25FE).addRange(0x2614, 0x2615).addRange(0x2648, 0x2653).addRange(0x26AA, 0x26AB).addRange(0x26BD, 0x26BE).addRange(0x26C4, 0x26C5).addRange(0x26F2, 0x26F3).addRange(0x270A, 0x270B).addRange(0x2753, 0x2755).addRange(0x2795, 0x2797).addRange(0x2B1B, 0x2B1C).addRange(0x1F191, 0x1F19A).addRange(0x1F232, 0x1F236).addRange(0x1F238, 0x1F23A).addRange(0x1F250, 0x1F251).addRange(0x1F300, 0x1F320).addRange(0x1F32D, 0x1F335).addRange(0x1F337, 0x1F37C).addRange(0x1F37E, 0x1F393).addRange(0x1F3A0, 0x1F3CA).addRange(0x1F3CF, 0x1F3D3).addRange(0x1F3E0, 0x1F3F0).addRange(0x1F3F8, 0x1F43E).addRange(0x1F442, 0x1F4FC).addRange(0x1F4FF, 0x1F53D).addRange(0x1F54B, 0x1F54E).addRange(0x1F550, 0x1F567).addRange(0x1F595, 0x1F596).addRange(0x1F5FB, 0x1F64F).addRange(0x1F680, 0x1F6C5).addRange(0x1F6D0, 0x1F6D2).addRange(0x1F6D5, 0x1F6D7).addRange(0x1F6DC, 0x1F6DF).addRange(0x1F6EB, 0x1F6EC).addRange(0x1F6F4, 0x1F6FC).addRange(0x1F7E0, 0x1F7EB).addRange(0x1F90C, 0x1F93A).addRange(0x1F93C, 0x1F945).addRange(0x1F947, 0x1F9FF).addRange(0x1FA70, 0x1FA7C).addRange(0x1FA80, 0x1FA88).addRange(0x1FA90, 0x1FABD).addRange(0x1FABF, 0x1FAC5).addRange(0x1FACE, 0x1FADB).addRange(0x1FAE0, 0x1FAE8).addRange(0x1FAF0, 0x1FAF8);\nexports.characters = set;\nexports.strings = ['\\xA9\\uFE0F','\\xAE\\uFE0F','\\u203C\\uFE0F','\\u2049\\uFE0F','\\u2122\\uFE0F','\\u2139\\uFE0F','\\u2194\\uFE0F','\\u2195\\uFE0F','\\u2196\\uFE0F','\\u2197\\uFE0F','\\u2198\\uFE0F','\\u2199\\uFE0F','\\u21A9\\uFE0F','\\u21AA\\uFE0F','\\u2328\\uFE0F','\\u23CF\\uFE0F','\\u23ED\\uFE0F','\\u23EE\\uFE0F','\\u23EF\\uFE0F','\\u23F1\\uFE0F','\\u23F2\\uFE0F','\\u23F8\\uFE0F','\\u23F9\\uFE0F','\\u23FA\\uFE0F','\\u24C2\\uFE0F','\\u25AA\\uFE0F','\\u25AB\\uFE0F','\\u25B6\\uFE0F','\\u25C0\\uFE0F','\\u25FB\\uFE0F','\\u25FC\\uFE0F','\\u2600\\uFE0F','\\u2601\\uFE0F','\\u2602\\uFE0F','\\u2603\\uFE0F','\\u2604\\uFE0F','\\u260E\\uFE0F','\\u2611\\uFE0F','\\u2618\\uFE0F','\\u261D\\uFE0F','\\u2620\\uFE0F','\\u2622\\uFE0F','\\u2623\\uFE0F','\\u2626\\uFE0F','\\u262A\\uFE0F','\\u262E\\uFE0F','\\u262F\\uFE0F','\\u2638\\uFE0F','\\u2639\\uFE0F','\\u263A\\uFE0F','\\u2640\\uFE0F','\\u2642\\uFE0F','\\u265F\\uFE0F','\\u2660\\uFE0F','\\u2663\\uFE0F','\\u2665\\uFE0F','\\u2666\\uFE0F','\\u2668\\uFE0F','\\u267B\\uFE0F','\\u267E\\uFE0F','\\u2692\\uFE0F','\\u2694\\uFE0F','\\u2695\\uFE0F','\\u2696\\uFE0F','\\u2697\\uFE0F','\\u2699\\uFE0F','\\u269B\\uFE0F','\\u269C\\uFE0F','\\u26A0\\uFE0F','\\u26A7\\uFE0F','\\u26B0\\uFE0F','\\u26B1\\uFE0F','\\u26C8\\uFE0F','\\u26CF\\uFE0F','\\u26D1\\uFE0F','\\u26D3\\uFE0F','\\u26E9\\uFE0F','\\u26F0\\uFE0F','\\u26F1\\uFE0F','\\u26F4\\uFE0F','\\u26F7\\uFE0F','\\u26F8\\uFE0F','\\u26F9\\uFE0F','\\u2702\\uFE0F','\\u2708\\uFE0F','\\u2709\\uFE0F','\\u270C\\uFE0F','\\u270D\\uFE0F','\\u270F\\uFE0F','\\u2712\\uFE0F','\\u2714\\uFE0F','\\u2716\\uFE0F','\\u271D\\uFE0F','\\u2721\\uFE0F','\\u2733\\uFE0F','\\u2734\\uFE0F','\\u2744\\uFE0F','\\u2747\\uFE0F','\\u2763\\uFE0F','\\u2764\\uFE0F','\\u27A1\\uFE0F','\\u2934\\uFE0F','\\u2935\\uFE0F','\\u2B05\\uFE0F','\\u2B06\\uFE0F','\\u2B07\\uFE0F','\\u3030\\uFE0F','\\u303D\\uFE0F','\\u3297\\uFE0F','\\u3299\\uFE0F','\\u{1F170}\\uFE0F','\\u{1F171}\\uFE0F','\\u{1F17E}\\uFE0F','\\u{1F17F}\\uFE0F','\\u{1F202}\\uFE0F','\\u{1F237}\\uFE0F','\\u{1F321}\\uFE0F','\\u{1F324}\\uFE0F','\\u{1F325}\\uFE0F','\\u{1F326}\\uFE0F','\\u{1F327}\\uFE0F','\\u{1F328}\\uFE0F','\\u{1F329}\\uFE0F','\\u{1F32A}\\uFE0F','\\u{1F32B}\\uFE0F','\\u{1F32C}\\uFE0F','\\u{1F336}\\uFE0F','\\u{1F37D}\\uFE0F','\\u{1F396}\\uFE0F','\\u{1F397}\\uFE0F','\\u{1F399}\\uFE0F','\\u{1F39A}\\uFE0F','\\u{1F39B}\\uFE0F','\\u{1F39E}\\uFE0F','\\u{1F39F}\\uFE0F','\\u{1F3CB}\\uFE0F','\\u{1F3CC}\\uFE0F','\\u{1F3CD}\\uFE0F','\\u{1F3CE}\\uFE0F','\\u{1F3D4}\\uFE0F','\\u{1F3D5}\\uFE0F','\\u{1F3D6}\\uFE0F','\\u{1F3D7}\\uFE0F','\\u{1F3D8}\\uFE0F','\\u{1F3D9}\\uFE0F','\\u{1F3DA}\\uFE0F','\\u{1F3DB}\\uFE0F','\\u{1F3DC}\\uFE0F','\\u{1F3DD}\\uFE0F','\\u{1F3DE}\\uFE0F','\\u{1F3DF}\\uFE0F','\\u{1F3F3}\\uFE0F','\\u{1F3F5}\\uFE0F','\\u{1F3F7}\\uFE0F','\\u{1F43F}\\uFE0F','\\u{1F441}\\uFE0F','\\u{1F4FD}\\uFE0F','\\u{1F549}\\uFE0F','\\u{1F54A}\\uFE0F','\\u{1F56F}\\uFE0F','\\u{1F570}\\uFE0F','\\u{1F573}\\uFE0F','\\u{1F574}\\uFE0F','\\u{1F575}\\uFE0F','\\u{1F576}\\uFE0F','\\u{1F577}\\uFE0F','\\u{1F578}\\uFE0F','\\u{1F579}\\uFE0F','\\u{1F587}\\uFE0F','\\u{1F58A}\\uFE0F','\\u{1F58B}\\uFE0F','\\u{1F58C}\\uFE0F','\\u{1F58D}\\uFE0F','\\u{1F590}\\uFE0F','\\u{1F5A5}\\uFE0F','\\u{1F5A8}\\uFE0F','\\u{1F5B1}\\uFE0F','\\u{1F5B2}\\uFE0F','\\u{1F5BC}\\uFE0F','\\u{1F5C2}\\uFE0F','\\u{1F5C3}\\uFE0F','\\u{1F5C4}\\uFE0F','\\u{1F5D1}\\uFE0F','\\u{1F5D2}\\uFE0F','\\u{1F5D3}\\uFE0F','\\u{1F5DC}\\uFE0F','\\u{1F5DD}\\uFE0F','\\u{1F5DE}\\uFE0F','\\u{1F5E1}\\uFE0F','\\u{1F5E3}\\uFE0F','\\u{1F5E8}\\uFE0F','\\u{1F5EF}\\uFE0F','\\u{1F5F3}\\uFE0F','\\u{1F5FA}\\uFE0F','\\u{1F6CB}\\uFE0F','\\u{1F6CD}\\uFE0F','\\u{1F6CE}\\uFE0F','\\u{1F6CF}\\uFE0F','\\u{1F6E0}\\uFE0F','\\u{1F6E1}\\uFE0F','\\u{1F6E2}\\uFE0F','\\u{1F6E3}\\uFE0F','\\u{1F6E4}\\uFE0F','\\u{1F6E5}\\uFE0F','\\u{1F6E9}\\uFE0F','\\u{1F6F0}\\uFE0F','\\u{1F6F3}\\uFE0F'];\n","const set = require('regenerate')();\n\nexports.characters = set;\nexports.strings = ['#\\uFE0F\\u20E3','*\\uFE0F\\u20E3','0\\uFE0F\\u20E3','1\\uFE0F\\u20E3','2\\uFE0F\\u20E3','3\\uFE0F\\u20E3','4\\uFE0F\\u20E3','5\\uFE0F\\u20E3','6\\uFE0F\\u20E3','7\\uFE0F\\u20E3','8\\uFE0F\\u20E3','9\\uFE0F\\u20E3'];\n","const set = require('regenerate')();\n\nexports.characters = set;\nexports.strings = ['\\u{1F1E6}\\u{1F1E8}','\\u{1F1E6}\\u{1F1E9}','\\u{1F1E6}\\u{1F1EA}','\\u{1F1E6}\\u{1F1EB}','\\u{1F1E6}\\u{1F1EC}','\\u{1F1E6}\\u{1F1EE}','\\u{1F1E6}\\u{1F1F1}','\\u{1F1E6}\\u{1F1F2}','\\u{1F1E6}\\u{1F1F4}','\\u{1F1E6}\\u{1F1F6}','\\u{1F1E6}\\u{1F1F7}','\\u{1F1E6}\\u{1F1F8}','\\u{1F1E6}\\u{1F1F9}','\\u{1F1E6}\\u{1F1FA}','\\u{1F1E6}\\u{1F1FC}','\\u{1F1E6}\\u{1F1FD}','\\u{1F1E6}\\u{1F1FF}','\\u{1F1E7}\\u{1F1E6}','\\u{1F1E7}\\u{1F1E7}','\\u{1F1E7}\\u{1F1E9}','\\u{1F1E7}\\u{1F1EA}','\\u{1F1E7}\\u{1F1EB}','\\u{1F1E7}\\u{1F1EC}','\\u{1F1E7}\\u{1F1ED}','\\u{1F1E7}\\u{1F1EE}','\\u{1F1E7}\\u{1F1EF}','\\u{1F1E7}\\u{1F1F1}','\\u{1F1E7}\\u{1F1F2}','\\u{1F1E7}\\u{1F1F3}','\\u{1F1E7}\\u{1F1F4}','\\u{1F1E7}\\u{1F1F6}','\\u{1F1E7}\\u{1F1F7}','\\u{1F1E7}\\u{1F1F8}','\\u{1F1E7}\\u{1F1F9}','\\u{1F1E7}\\u{1F1FB}','\\u{1F1E7}\\u{1F1FC}','\\u{1F1E7}\\u{1F1FE}','\\u{1F1E7}\\u{1F1FF}','\\u{1F1E8}\\u{1F1E6}','\\u{1F1E8}\\u{1F1E8}','\\u{1F1E8}\\u{1F1E9}','\\u{1F1E8}\\u{1F1EB}','\\u{1F1E8}\\u{1F1EC}','\\u{1F1E8}\\u{1F1ED}','\\u{1F1E8}\\u{1F1EE}','\\u{1F1E8}\\u{1F1F0}','\\u{1F1E8}\\u{1F1F1}','\\u{1F1E8}\\u{1F1F2}','\\u{1F1E8}\\u{1F1F3}','\\u{1F1E8}\\u{1F1F4}','\\u{1F1E8}\\u{1F1F5}','\\u{1F1E8}\\u{1F1F7}','\\u{1F1E8}\\u{1F1FA}','\\u{1F1E8}\\u{1F1FB}','\\u{1F1E8}\\u{1F1FC}','\\u{1F1E8}\\u{1F1FD}','\\u{1F1E8}\\u{1F1FE}','\\u{1F1E8}\\u{1F1FF}','\\u{1F1E9}\\u{1F1EA}','\\u{1F1E9}\\u{1F1EC}','\\u{1F1E9}\\u{1F1EF}','\\u{1F1E9}\\u{1F1F0}','\\u{1F1E9}\\u{1F1F2}','\\u{1F1E9}\\u{1F1F4}','\\u{1F1E9}\\u{1F1FF}','\\u{1F1EA}\\u{1F1E6}','\\u{1F1EA}\\u{1F1E8}','\\u{1F1EA}\\u{1F1EA}','\\u{1F1EA}\\u{1F1EC}','\\u{1F1EA}\\u{1F1ED}','\\u{1F1EA}\\u{1F1F7}','\\u{1F1EA}\\u{1F1F8}','\\u{1F1EA}\\u{1F1F9}','\\u{1F1EA}\\u{1F1FA}','\\u{1F1EB}\\u{1F1EE}','\\u{1F1EB}\\u{1F1EF}','\\u{1F1EB}\\u{1F1F0}','\\u{1F1EB}\\u{1F1F2}','\\u{1F1EB}\\u{1F1F4}','\\u{1F1EB}\\u{1F1F7}','\\u{1F1EC}\\u{1F1E6}','\\u{1F1EC}\\u{1F1E7}','\\u{1F1EC}\\u{1F1E9}','\\u{1F1EC}\\u{1F1EA}','\\u{1F1EC}\\u{1F1EB}','\\u{1F1EC}\\u{1F1EC}','\\u{1F1EC}\\u{1F1ED}','\\u{1F1EC}\\u{1F1EE}','\\u{1F1EC}\\u{1F1F1}','\\u{1F1EC}\\u{1F1F2}','\\u{1F1EC}\\u{1F1F3}','\\u{1F1EC}\\u{1F1F5}','\\u{1F1EC}\\u{1F1F6}','\\u{1F1EC}\\u{1F1F7}','\\u{1F1EC}\\u{1F1F8}','\\u{1F1EC}\\u{1F1F9}','\\u{1F1EC}\\u{1F1FA}','\\u{1F1EC}\\u{1F1FC}','\\u{1F1EC}\\u{1F1FE}','\\u{1F1ED}\\u{1F1F0}','\\u{1F1ED}\\u{1F1F2}','\\u{1F1ED}\\u{1F1F3}','\\u{1F1ED}\\u{1F1F7}','\\u{1F1ED}\\u{1F1F9}','\\u{1F1ED}\\u{1F1FA}','\\u{1F1EE}\\u{1F1E8}','\\u{1F1EE}\\u{1F1E9}','\\u{1F1EE}\\u{1F1EA}','\\u{1F1EE}\\u{1F1F1}','\\u{1F1EE}\\u{1F1F2}','\\u{1F1EE}\\u{1F1F3}','\\u{1F1EE}\\u{1F1F4}','\\u{1F1EE}\\u{1F1F6}','\\u{1F1EE}\\u{1F1F7}','\\u{1F1EE}\\u{1F1F8}','\\u{1F1EE}\\u{1F1F9}','\\u{1F1EF}\\u{1F1EA}','\\u{1F1EF}\\u{1F1F2}','\\u{1F1EF}\\u{1F1F4}','\\u{1F1EF}\\u{1F1F5}','\\u{1F1F0}\\u{1F1EA}','\\u{1F1F0}\\u{1F1EC}','\\u{1F1F0}\\u{1F1ED}','\\u{1F1F0}\\u{1F1EE}','\\u{1F1F0}\\u{1F1F2}','\\u{1F1F0}\\u{1F1F3}','\\u{1F1F0}\\u{1F1F5}','\\u{1F1F0}\\u{1F1F7}','\\u{1F1F0}\\u{1F1FC}','\\u{1F1F0}\\u{1F1FE}','\\u{1F1F0}\\u{1F1FF}','\\u{1F1F1}\\u{1F1E6}','\\u{1F1F1}\\u{1F1E7}','\\u{1F1F1}\\u{1F1E8}','\\u{1F1F1}\\u{1F1EE}','\\u{1F1F1}\\u{1F1F0}','\\u{1F1F1}\\u{1F1F7}','\\u{1F1F1}\\u{1F1F8}','\\u{1F1F1}\\u{1F1F9}','\\u{1F1F1}\\u{1F1FA}','\\u{1F1F1}\\u{1F1FB}','\\u{1F1F1}\\u{1F1FE}','\\u{1F1F2}\\u{1F1E6}','\\u{1F1F2}\\u{1F1E8}','\\u{1F1F2}\\u{1F1E9}','\\u{1F1F2}\\u{1F1EA}','\\u{1F1F2}\\u{1F1EB}','\\u{1F1F2}\\u{1F1EC}','\\u{1F1F2}\\u{1F1ED}','\\u{1F1F2}\\u{1F1F0}','\\u{1F1F2}\\u{1F1F1}','\\u{1F1F2}\\u{1F1F2}','\\u{1F1F2}\\u{1F1F3}','\\u{1F1F2}\\u{1F1F4}','\\u{1F1F2}\\u{1F1F5}','\\u{1F1F2}\\u{1F1F6}','\\u{1F1F2}\\u{1F1F7}','\\u{1F1F2}\\u{1F1F8}','\\u{1F1F2}\\u{1F1F9}','\\u{1F1F2}\\u{1F1FA}','\\u{1F1F2}\\u{1F1FB}','\\u{1F1F2}\\u{1F1FC}','\\u{1F1F2}\\u{1F1FD}','\\u{1F1F2}\\u{1F1FE}','\\u{1F1F2}\\u{1F1FF}','\\u{1F1F3}\\u{1F1E6}','\\u{1F1F3}\\u{1F1E8}','\\u{1F1F3}\\u{1F1EA}','\\u{1F1F3}\\u{1F1EB}','\\u{1F1F3}\\u{1F1EC}','\\u{1F1F3}\\u{1F1EE}','\\u{1F1F3}\\u{1F1F1}','\\u{1F1F3}\\u{1F1F4}','\\u{1F1F3}\\u{1F1F5}','\\u{1F1F3}\\u{1F1F7}','\\u{1F1F3}\\u{1F1FA}','\\u{1F1F3}\\u{1F1FF}','\\u{1F1F4}\\u{1F1F2}','\\u{1F1F5}\\u{1F1E6}','\\u{1F1F5}\\u{1F1EA}','\\u{1F1F5}\\u{1F1EB}','\\u{1F1F5}\\u{1F1EC}','\\u{1F1F5}\\u{1F1ED}','\\u{1F1F5}\\u{1F1F0}','\\u{1F1F5}\\u{1F1F1}','\\u{1F1F5}\\u{1F1F2}','\\u{1F1F5}\\u{1F1F3}','\\u{1F1F5}\\u{1F1F7}','\\u{1F1F5}\\u{1F1F8}','\\u{1F1F5}\\u{1F1F9}','\\u{1F1F5}\\u{1F1FC}','\\u{1F1F5}\\u{1F1FE}','\\u{1F1F6}\\u{1F1E6}','\\u{1F1F7}\\u{1F1EA}','\\u{1F1F7}\\u{1F1F4}','\\u{1F1F7}\\u{1F1F8}','\\u{1F1F7}\\u{1F1FA}','\\u{1F1F7}\\u{1F1FC}','\\u{1F1F8}\\u{1F1E6}','\\u{1F1F8}\\u{1F1E7}','\\u{1F1F8}\\u{1F1E8}','\\u{1F1F8}\\u{1F1E9}','\\u{1F1F8}\\u{1F1EA}','\\u{1F1F8}\\u{1F1EC}','\\u{1F1F8}\\u{1F1ED}','\\u{1F1F8}\\u{1F1EE}','\\u{1F1F8}\\u{1F1EF}','\\u{1F1F8}\\u{1F1F0}','\\u{1F1F8}\\u{1F1F1}','\\u{1F1F8}\\u{1F1F2}','\\u{1F1F8}\\u{1F1F3}','\\u{1F1F8}\\u{1F1F4}','\\u{1F1F8}\\u{1F1F7}','\\u{1F1F8}\\u{1F1F8}','\\u{1F1F8}\\u{1F1F9}','\\u{1F1F8}\\u{1F1FB}','\\u{1F1F8}\\u{1F1FD}','\\u{1F1F8}\\u{1F1FE}','\\u{1F1F8}\\u{1F1FF}','\\u{1F1F9}\\u{1F1E6}','\\u{1F1F9}\\u{1F1E8}','\\u{1F1F9}\\u{1F1E9}','\\u{1F1F9}\\u{1F1EB}','\\u{1F1F9}\\u{1F1EC}','\\u{1F1F9}\\u{1F1ED}','\\u{1F1F9}\\u{1F1EF}','\\u{1F1F9}\\u{1F1F0}','\\u{1F1F9}\\u{1F1F1}','\\u{1F1F9}\\u{1F1F2}','\\u{1F1F9}\\u{1F1F3}','\\u{1F1F9}\\u{1F1F4}','\\u{1F1F9}\\u{1F1F7}','\\u{1F1F9}\\u{1F1F9}','\\u{1F1F9}\\u{1F1FB}','\\u{1F1F9}\\u{1F1FC}','\\u{1F1F9}\\u{1F1FF}','\\u{1F1FA}\\u{1F1E6}','\\u{1F1FA}\\u{1F1EC}','\\u{1F1FA}\\u{1F1F2}','\\u{1F1FA}\\u{1F1F3}','\\u{1F1FA}\\u{1F1F8}','\\u{1F1FA}\\u{1F1FE}','\\u{1F1FA}\\u{1F1FF}','\\u{1F1FB}\\u{1F1E6}','\\u{1F1FB}\\u{1F1E8}','\\u{1F1FB}\\u{1F1EA}','\\u{1F1FB}\\u{1F1EC}','\\u{1F1FB}\\u{1F1EE}','\\u{1F1FB}\\u{1F1F3}','\\u{1F1FB}\\u{1F1FA}','\\u{1F1FC}\\u{1F1EB}','\\u{1F1FC}\\u{1F1F8}','\\u{1F1FD}\\u{1F1F0}','\\u{1F1FE}\\u{1F1EA}','\\u{1F1FE}\\u{1F1F9}','\\u{1F1FF}\\u{1F1E6}','\\u{1F1FF}\\u{1F1F2}','\\u{1F1FF}\\u{1F1FC}'];\n","const set = require('regenerate')();\n\nexports.characters = set;\nexports.strings = ['\\u261D\\u{1F3FB}','\\u261D\\u{1F3FC}','\\u261D\\u{1F3FD}','\\u261D\\u{1F3FE}','\\u261D\\u{1F3FF}','\\u26F9\\u{1F3FB}','\\u26F9\\u{1F3FC}','\\u26F9\\u{1F3FD}','\\u26F9\\u{1F3FE}','\\u26F9\\u{1F3FF}','\\u270A\\u{1F3FB}','\\u270A\\u{1F3FC}','\\u270A\\u{1F3FD}','\\u270A\\u{1F3FE}','\\u270A\\u{1F3FF}','\\u270B\\u{1F3FB}','\\u270B\\u{1F3FC}','\\u270B\\u{1F3FD}','\\u270B\\u{1F3FE}','\\u270B\\u{1F3FF}','\\u270C\\u{1F3FB}','\\u270C\\u{1F3FC}','\\u270C\\u{1F3FD}','\\u270C\\u{1F3FE}','\\u270C\\u{1F3FF}','\\u270D\\u{1F3FB}','\\u270D\\u{1F3FC}','\\u270D\\u{1F3FD}','\\u270D\\u{1F3FE}','\\u270D\\u{1F3FF}','\\u{1F385}\\u{1F3FB}','\\u{1F385}\\u{1F3FC}','\\u{1F385}\\u{1F3FD}','\\u{1F385}\\u{1F3FE}','\\u{1F385}\\u{1F3FF}','\\u{1F3C2}\\u{1F3FB}','\\u{1F3C2}\\u{1F3FC}','\\u{1F3C2}\\u{1F3FD}','\\u{1F3C2}\\u{1F3FE}','\\u{1F3C2}\\u{1F3FF}','\\u{1F3C3}\\u{1F3FB}','\\u{1F3C3}\\u{1F3FC}','\\u{1F3C3}\\u{1F3FD}','\\u{1F3C3}\\u{1F3FE}','\\u{1F3C3}\\u{1F3FF}','\\u{1F3C4}\\u{1F3FB}','\\u{1F3C4}\\u{1F3FC}','\\u{1F3C4}\\u{1F3FD}','\\u{1F3C4}\\u{1F3FE}','\\u{1F3C4}\\u{1F3FF}','\\u{1F3C7}\\u{1F3FB}','\\u{1F3C7}\\u{1F3FC}','\\u{1F3C7}\\u{1F3FD}','\\u{1F3C7}\\u{1F3FE}','\\u{1F3C7}\\u{1F3FF}','\\u{1F3CA}\\u{1F3FB}','\\u{1F3CA}\\u{1F3FC}','\\u{1F3CA}\\u{1F3FD}','\\u{1F3CA}\\u{1F3FE}','\\u{1F3CA}\\u{1F3FF}','\\u{1F3CB}\\u{1F3FB}','\\u{1F3CB}\\u{1F3FC}','\\u{1F3CB}\\u{1F3FD}','\\u{1F3CB}\\u{1F3FE}','\\u{1F3CB}\\u{1F3FF}','\\u{1F3CC}\\u{1F3FB}','\\u{1F3CC}\\u{1F3FC}','\\u{1F3CC}\\u{1F3FD}','\\u{1F3CC}\\u{1F3FE}','\\u{1F3CC}\\u{1F3FF}','\\u{1F442}\\u{1F3FB}','\\u{1F442}\\u{1F3FC}','\\u{1F442}\\u{1F3FD}','\\u{1F442}\\u{1F3FE}','\\u{1F442}\\u{1F3FF}','\\u{1F443}\\u{1F3FB}','\\u{1F443}\\u{1F3FC}','\\u{1F443}\\u{1F3FD}','\\u{1F443}\\u{1F3FE}','\\u{1F443}\\u{1F3FF}','\\u{1F446}\\u{1F3FB}','\\u{1F446}\\u{1F3FC}','\\u{1F446}\\u{1F3FD}','\\u{1F446}\\u{1F3FE}','\\u{1F446}\\u{1F3FF}','\\u{1F447}\\u{1F3FB}','\\u{1F447}\\u{1F3FC}','\\u{1F447}\\u{1F3FD}','\\u{1F447}\\u{1F3FE}','\\u{1F447}\\u{1F3FF}','\\u{1F448}\\u{1F3FB}','\\u{1F448}\\u{1F3FC}','\\u{1F448}\\u{1F3FD}','\\u{1F448}\\u{1F3FE}','\\u{1F448}\\u{1F3FF}','\\u{1F449}\\u{1F3FB}','\\u{1F449}\\u{1F3FC}','\\u{1F449}\\u{1F3FD}','\\u{1F449}\\u{1F3FE}','\\u{1F449}\\u{1F3FF}','\\u{1F44A}\\u{1F3FB}','\\u{1F44A}\\u{1F3FC}','\\u{1F44A}\\u{1F3FD}','\\u{1F44A}\\u{1F3FE}','\\u{1F44A}\\u{1F3FF}','\\u{1F44B}\\u{1F3FB}','\\u{1F44B}\\u{1F3FC}','\\u{1F44B}\\u{1F3FD}','\\u{1F44B}\\u{1F3FE}','\\u{1F44B}\\u{1F3FF}','\\u{1F44C}\\u{1F3FB}','\\u{1F44C}\\u{1F3FC}','\\u{1F44C}\\u{1F3FD}','\\u{1F44C}\\u{1F3FE}','\\u{1F44C}\\u{1F3FF}','\\u{1F44D}\\u{1F3FB}','\\u{1F44D}\\u{1F3FC}','\\u{1F44D}\\u{1F3FD}','\\u{1F44D}\\u{1F3FE}','\\u{1F44D}\\u{1F3FF}','\\u{1F44E}\\u{1F3FB}','\\u{1F44E}\\u{1F3FC}','\\u{1F44E}\\u{1F3FD}','\\u{1F44E}\\u{1F3FE}','\\u{1F44E}\\u{1F3FF}','\\u{1F44F}\\u{1F3FB}','\\u{1F44F}\\u{1F3FC}','\\u{1F44F}\\u{1F3FD}','\\u{1F44F}\\u{1F3FE}','\\u{1F44F}\\u{1F3FF}','\\u{1F450}\\u{1F3FB}','\\u{1F450}\\u{1F3FC}','\\u{1F450}\\u{1F3FD}','\\u{1F450}\\u{1F3FE}','\\u{1F450}\\u{1F3FF}','\\u{1F466}\\u{1F3FB}','\\u{1F466}\\u{1F3FC}','\\u{1F466}\\u{1F3FD}','\\u{1F466}\\u{1F3FE}','\\u{1F466}\\u{1F3FF}','\\u{1F467}\\u{1F3FB}','\\u{1F467}\\u{1F3FC}','\\u{1F467}\\u{1F3FD}','\\u{1F467}\\u{1F3FE}','\\u{1F467}\\u{1F3FF}','\\u{1F468}\\u{1F3FB}','\\u{1F468}\\u{1F3FC}','\\u{1F468}\\u{1F3FD}','\\u{1F468}\\u{1F3FE}','\\u{1F468}\\u{1F3FF}','\\u{1F469}\\u{1F3FB}','\\u{1F469}\\u{1F3FC}','\\u{1F469}\\u{1F3FD}','\\u{1F469}\\u{1F3FE}','\\u{1F469}\\u{1F3FF}','\\u{1F46B}\\u{1F3FB}','\\u{1F46B}\\u{1F3FC}','\\u{1F46B}\\u{1F3FD}','\\u{1F46B}\\u{1F3FE}','\\u{1F46B}\\u{1F3FF}','\\u{1F46C}\\u{1F3FB}','\\u{1F46C}\\u{1F3FC}','\\u{1F46C}\\u{1F3FD}','\\u{1F46C}\\u{1F3FE}','\\u{1F46C}\\u{1F3FF}','\\u{1F46D}\\u{1F3FB}','\\u{1F46D}\\u{1F3FC}','\\u{1F46D}\\u{1F3FD}','\\u{1F46D}\\u{1F3FE}','\\u{1F46D}\\u{1F3FF}','\\u{1F46E}\\u{1F3FB}','\\u{1F46E}\\u{1F3FC}','\\u{1F46E}\\u{1F3FD}','\\u{1F46E}\\u{1F3FE}','\\u{1F46E}\\u{1F3FF}','\\u{1F470}\\u{1F3FB}','\\u{1F470}\\u{1F3FC}','\\u{1F470}\\u{1F3FD}','\\u{1F470}\\u{1F3FE}','\\u{1F470}\\u{1F3FF}','\\u{1F471}\\u{1F3FB}','\\u{1F471}\\u{1F3FC}','\\u{1F471}\\u{1F3FD}','\\u{1F471}\\u{1F3FE}','\\u{1F471}\\u{1F3FF}','\\u{1F472}\\u{1F3FB}','\\u{1F472}\\u{1F3FC}','\\u{1F472}\\u{1F3FD}','\\u{1F472}\\u{1F3FE}','\\u{1F472}\\u{1F3FF}','\\u{1F473}\\u{1F3FB}','\\u{1F473}\\u{1F3FC}','\\u{1F473}\\u{1F3FD}','\\u{1F473}\\u{1F3FE}','\\u{1F473}\\u{1F3FF}','\\u{1F474}\\u{1F3FB}','\\u{1F474}\\u{1F3FC}','\\u{1F474}\\u{1F3FD}','\\u{1F474}\\u{1F3FE}','\\u{1F474}\\u{1F3FF}','\\u{1F475}\\u{1F3FB}','\\u{1F475}\\u{1F3FC}','\\u{1F475}\\u{1F3FD}','\\u{1F475}\\u{1F3FE}','\\u{1F475}\\u{1F3FF}','\\u{1F476}\\u{1F3FB}','\\u{1F476}\\u{1F3FC}','\\u{1F476}\\u{1F3FD}','\\u{1F476}\\u{1F3FE}','\\u{1F476}\\u{1F3FF}','\\u{1F477}\\u{1F3FB}','\\u{1F477}\\u{1F3FC}','\\u{1F477}\\u{1F3FD}','\\u{1F477}\\u{1F3FE}','\\u{1F477}\\u{1F3FF}','\\u{1F478}\\u{1F3FB}','\\u{1F478}\\u{1F3FC}','\\u{1F478}\\u{1F3FD}','\\u{1F478}\\u{1F3FE}','\\u{1F478}\\u{1F3FF}','\\u{1F47C}\\u{1F3FB}','\\u{1F47C}\\u{1F3FC}','\\u{1F47C}\\u{1F3FD}','\\u{1F47C}\\u{1F3FE}','\\u{1F47C}\\u{1F3FF}','\\u{1F481}\\u{1F3FB}','\\u{1F481}\\u{1F3FC}','\\u{1F481}\\u{1F3FD}','\\u{1F481}\\u{1F3FE}','\\u{1F481}\\u{1F3FF}','\\u{1F482}\\u{1F3FB}','\\u{1F482}\\u{1F3FC}','\\u{1F482}\\u{1F3FD}','\\u{1F482}\\u{1F3FE}','\\u{1F482}\\u{1F3FF}','\\u{1F483}\\u{1F3FB}','\\u{1F483}\\u{1F3FC}','\\u{1F483}\\u{1F3FD}','\\u{1F483}\\u{1F3FE}','\\u{1F483}\\u{1F3FF}','\\u{1F485}\\u{1F3FB}','\\u{1F485}\\u{1F3FC}','\\u{1F485}\\u{1F3FD}','\\u{1F485}\\u{1F3FE}','\\u{1F485}\\u{1F3FF}','\\u{1F486}\\u{1F3FB}','\\u{1F486}\\u{1F3FC}','\\u{1F486}\\u{1F3FD}','\\u{1F486}\\u{1F3FE}','\\u{1F486}\\u{1F3FF}','\\u{1F487}\\u{1F3FB}','\\u{1F487}\\u{1F3FC}','\\u{1F487}\\u{1F3FD}','\\u{1F487}\\u{1F3FE}','\\u{1F487}\\u{1F3FF}','\\u{1F48F}\\u{1F3FB}','\\u{1F48F}\\u{1F3FC}','\\u{1F48F}\\u{1F3FD}','\\u{1F48F}\\u{1F3FE}','\\u{1F48F}\\u{1F3FF}','\\u{1F491}\\u{1F3FB}','\\u{1F491}\\u{1F3FC}','\\u{1F491}\\u{1F3FD}','\\u{1F491}\\u{1F3FE}','\\u{1F491}\\u{1F3FF}','\\u{1F4AA}\\u{1F3FB}','\\u{1F4AA}\\u{1F3FC}','\\u{1F4AA}\\u{1F3FD}','\\u{1F4AA}\\u{1F3FE}','\\u{1F4AA}\\u{1F3FF}','\\u{1F574}\\u{1F3FB}','\\u{1F574}\\u{1F3FC}','\\u{1F574}\\u{1F3FD}','\\u{1F574}\\u{1F3FE}','\\u{1F574}\\u{1F3FF}','\\u{1F575}\\u{1F3FB}','\\u{1F575}\\u{1F3FC}','\\u{1F575}\\u{1F3FD}','\\u{1F575}\\u{1F3FE}','\\u{1F575}\\u{1F3FF}','\\u{1F57A}\\u{1F3FB}','\\u{1F57A}\\u{1F3FC}','\\u{1F57A}\\u{1F3FD}','\\u{1F57A}\\u{1F3FE}','\\u{1F57A}\\u{1F3FF}','\\u{1F590}\\u{1F3FB}','\\u{1F590}\\u{1F3FC}','\\u{1F590}\\u{1F3FD}','\\u{1F590}\\u{1F3FE}','\\u{1F590}\\u{1F3FF}','\\u{1F595}\\u{1F3FB}','\\u{1F595}\\u{1F3FC}','\\u{1F595}\\u{1F3FD}','\\u{1F595}\\u{1F3FE}','\\u{1F595}\\u{1F3FF}','\\u{1F596}\\u{1F3FB}','\\u{1F596}\\u{1F3FC}','\\u{1F596}\\u{1F3FD}','\\u{1F596}\\u{1F3FE}','\\u{1F596}\\u{1F3FF}','\\u{1F645}\\u{1F3FB}','\\u{1F645}\\u{1F3FC}','\\u{1F645}\\u{1F3FD}','\\u{1F645}\\u{1F3FE}','\\u{1F645}\\u{1F3FF}','\\u{1F646}\\u{1F3FB}','\\u{1F646}\\u{1F3FC}','\\u{1F646}\\u{1F3FD}','\\u{1F646}\\u{1F3FE}','\\u{1F646}\\u{1F3FF}','\\u{1F647}\\u{1F3FB}','\\u{1F647}\\u{1F3FC}','\\u{1F647}\\u{1F3FD}','\\u{1F647}\\u{1F3FE}','\\u{1F647}\\u{1F3FF}','\\u{1F64B}\\u{1F3FB}','\\u{1F64B}\\u{1F3FC}','\\u{1F64B}\\u{1F3FD}','\\u{1F64B}\\u{1F3FE}','\\u{1F64B}\\u{1F3FF}','\\u{1F64C}\\u{1F3FB}','\\u{1F64C}\\u{1F3FC}','\\u{1F64C}\\u{1F3FD}','\\u{1F64C}\\u{1F3FE}','\\u{1F64C}\\u{1F3FF}','\\u{1F64D}\\u{1F3FB}','\\u{1F64D}\\u{1F3FC}','\\u{1F64D}\\u{1F3FD}','\\u{1F64D}\\u{1F3FE}','\\u{1F64D}\\u{1F3FF}','\\u{1F64E}\\u{1F3FB}','\\u{1F64E}\\u{1F3FC}','\\u{1F64E}\\u{1F3FD}','\\u{1F64E}\\u{1F3FE}','\\u{1F64E}\\u{1F3FF}','\\u{1F64F}\\u{1F3FB}','\\u{1F64F}\\u{1F3FC}','\\u{1F64F}\\u{1F3FD}','\\u{1F64F}\\u{1F3FE}','\\u{1F64F}\\u{1F3FF}','\\u{1F6A3}\\u{1F3FB}','\\u{1F6A3}\\u{1F3FC}','\\u{1F6A3}\\u{1F3FD}','\\u{1F6A3}\\u{1F3FE}','\\u{1F6A3}\\u{1F3FF}','\\u{1F6B4}\\u{1F3FB}','\\u{1F6B4}\\u{1F3FC}','\\u{1F6B4}\\u{1F3FD}','\\u{1F6B4}\\u{1F3FE}','\\u{1F6B4}\\u{1F3FF}','\\u{1F6B5}\\u{1F3FB}','\\u{1F6B5}\\u{1F3FC}','\\u{1F6B5}\\u{1F3FD}','\\u{1F6B5}\\u{1F3FE}','\\u{1F6B5}\\u{1F3FF}','\\u{1F6B6}\\u{1F3FB}','\\u{1F6B6}\\u{1F3FC}','\\u{1F6B6}\\u{1F3FD}','\\u{1F6B6}\\u{1F3FE}','\\u{1F6B6}\\u{1F3FF}','\\u{1F6C0}\\u{1F3FB}','\\u{1F6C0}\\u{1F3FC}','\\u{1F6C0}\\u{1F3FD}','\\u{1F6C0}\\u{1F3FE}','\\u{1F6C0}\\u{1F3FF}','\\u{1F6CC}\\u{1F3FB}','\\u{1F6CC}\\u{1F3FC}','\\u{1F6CC}\\u{1F3FD}','\\u{1F6CC}\\u{1F3FE}','\\u{1F6CC}\\u{1F3FF}','\\u{1F90C}\\u{1F3FB}','\\u{1F90C}\\u{1F3FC}','\\u{1F90C}\\u{1F3FD}','\\u{1F90C}\\u{1F3FE}','\\u{1F90C}\\u{1F3FF}','\\u{1F90F}\\u{1F3FB}','\\u{1F90F}\\u{1F3FC}','\\u{1F90F}\\u{1F3FD}','\\u{1F90F}\\u{1F3FE}','\\u{1F90F}\\u{1F3FF}','\\u{1F918}\\u{1F3FB}','\\u{1F918}\\u{1F3FC}','\\u{1F918}\\u{1F3FD}','\\u{1F918}\\u{1F3FE}','\\u{1F918}\\u{1F3FF}','\\u{1F919}\\u{1F3FB}','\\u{1F919}\\u{1F3FC}','\\u{1F919}\\u{1F3FD}','\\u{1F919}\\u{1F3FE}','\\u{1F919}\\u{1F3FF}','\\u{1F91A}\\u{1F3FB}','\\u{1F91A}\\u{1F3FC}','\\u{1F91A}\\u{1F3FD}','\\u{1F91A}\\u{1F3FE}','\\u{1F91A}\\u{1F3FF}','\\u{1F91B}\\u{1F3FB}','\\u{1F91B}\\u{1F3FC}','\\u{1F91B}\\u{1F3FD}','\\u{1F91B}\\u{1F3FE}','\\u{1F91B}\\u{1F3FF}','\\u{1F91C}\\u{1F3FB}','\\u{1F91C}\\u{1F3FC}','\\u{1F91C}\\u{1F3FD}','\\u{1F91C}\\u{1F3FE}','\\u{1F91C}\\u{1F3FF}','\\u{1F91D}\\u{1F3FB}','\\u{1F91D}\\u{1F3FC}','\\u{1F91D}\\u{1F3FD}','\\u{1F91D}\\u{1F3FE}','\\u{1F91D}\\u{1F3FF}','\\u{1F91E}\\u{1F3FB}','\\u{1F91E}\\u{1F3FC}','\\u{1F91E}\\u{1F3FD}','\\u{1F91E}\\u{1F3FE}','\\u{1F91E}\\u{1F3FF}','\\u{1F91F}\\u{1F3FB}','\\u{1F91F}\\u{1F3FC}','\\u{1F91F}\\u{1F3FD}','\\u{1F91F}\\u{1F3FE}','\\u{1F91F}\\u{1F3FF}','\\u{1F926}\\u{1F3FB}','\\u{1F926}\\u{1F3FC}','\\u{1F926}\\u{1F3FD}','\\u{1F926}\\u{1F3FE}','\\u{1F926}\\u{1F3FF}','\\u{1F930}\\u{1F3FB}','\\u{1F930}\\u{1F3FC}','\\u{1F930}\\u{1F3FD}','\\u{1F930}\\u{1F3FE}','\\u{1F930}\\u{1F3FF}','\\u{1F931}\\u{1F3FB}','\\u{1F931}\\u{1F3FC}','\\u{1F931}\\u{1F3FD}','\\u{1F931}\\u{1F3FE}','\\u{1F931}\\u{1F3FF}','\\u{1F932}\\u{1F3FB}','\\u{1F932}\\u{1F3FC}','\\u{1F932}\\u{1F3FD}','\\u{1F932}\\u{1F3FE}','\\u{1F932}\\u{1F3FF}','\\u{1F933}\\u{1F3FB}','\\u{1F933}\\u{1F3FC}','\\u{1F933}\\u{1F3FD}','\\u{1F933}\\u{1F3FE}','\\u{1F933}\\u{1F3FF}','\\u{1F934}\\u{1F3FB}','\\u{1F934}\\u{1F3FC}','\\u{1F934}\\u{1F3FD}','\\u{1F934}\\u{1F3FE}','\\u{1F934}\\u{1F3FF}','\\u{1F935}\\u{1F3FB}','\\u{1F935}\\u{1F3FC}','\\u{1F935}\\u{1F3FD}','\\u{1F935}\\u{1F3FE}','\\u{1F935}\\u{1F3FF}','\\u{1F936}\\u{1F3FB}','\\u{1F936}\\u{1F3FC}','\\u{1F936}\\u{1F3FD}','\\u{1F936}\\u{1F3FE}','\\u{1F936}\\u{1F3FF}','\\u{1F937}\\u{1F3FB}','\\u{1F937}\\u{1F3FC}','\\u{1F937}\\u{1F3FD}','\\u{1F937}\\u{1F3FE}','\\u{1F937}\\u{1F3FF}','\\u{1F938}\\u{1F3FB}','\\u{1F938}\\u{1F3FC}','\\u{1F938}\\u{1F3FD}','\\u{1F938}\\u{1F3FE}','\\u{1F938}\\u{1F3FF}','\\u{1F939}\\u{1F3FB}','\\u{1F939}\\u{1F3FC}','\\u{1F939}\\u{1F3FD}','\\u{1F939}\\u{1F3FE}','\\u{1F939}\\u{1F3FF}','\\u{1F93D}\\u{1F3FB}','\\u{1F93D}\\u{1F3FC}','\\u{1F93D}\\u{1F3FD}','\\u{1F93D}\\u{1F3FE}','\\u{1F93D}\\u{1F3FF}','\\u{1F93E}\\u{1F3FB}','\\u{1F93E}\\u{1F3FC}','\\u{1F93E}\\u{1F3FD}','\\u{1F93E}\\u{1F3FE}','\\u{1F93E}\\u{1F3FF}','\\u{1F977}\\u{1F3FB}','\\u{1F977}\\u{1F3FC}','\\u{1F977}\\u{1F3FD}','\\u{1F977}\\u{1F3FE}','\\u{1F977}\\u{1F3FF}','\\u{1F9B5}\\u{1F3FB}','\\u{1F9B5}\\u{1F3FC}','\\u{1F9B5}\\u{1F3FD}','\\u{1F9B5}\\u{1F3FE}','\\u{1F9B5}\\u{1F3FF}','\\u{1F9B6}\\u{1F3FB}','\\u{1F9B6}\\u{1F3FC}','\\u{1F9B6}\\u{1F3FD}','\\u{1F9B6}\\u{1F3FE}','\\u{1F9B6}\\u{1F3FF}','\\u{1F9B8}\\u{1F3FB}','\\u{1F9B8}\\u{1F3FC}','\\u{1F9B8}\\u{1F3FD}','\\u{1F9B8}\\u{1F3FE}','\\u{1F9B8}\\u{1F3FF}','\\u{1F9B9}\\u{1F3FB}','\\u{1F9B9}\\u{1F3FC}','\\u{1F9B9}\\u{1F3FD}','\\u{1F9B9}\\u{1F3FE}','\\u{1F9B9}\\u{1F3FF}','\\u{1F9BB}\\u{1F3FB}','\\u{1F9BB}\\u{1F3FC}','\\u{1F9BB}\\u{1F3FD}','\\u{1F9BB}\\u{1F3FE}','\\u{1F9BB}\\u{1F3FF}','\\u{1F9CD}\\u{1F3FB}','\\u{1F9CD}\\u{1F3FC}','\\u{1F9CD}\\u{1F3FD}','\\u{1F9CD}\\u{1F3FE}','\\u{1F9CD}\\u{1F3FF}','\\u{1F9CE}\\u{1F3FB}','\\u{1F9CE}\\u{1F3FC}','\\u{1F9CE}\\u{1F3FD}','\\u{1F9CE}\\u{1F3FE}','\\u{1F9CE}\\u{1F3FF}','\\u{1F9CF}\\u{1F3FB}','\\u{1F9CF}\\u{1F3FC}','\\u{1F9CF}\\u{1F3FD}','\\u{1F9CF}\\u{1F3FE}','\\u{1F9CF}\\u{1F3FF}','\\u{1F9D1}\\u{1F3FB}','\\u{1F9D1}\\u{1F3FC}','\\u{1F9D1}\\u{1F3FD}','\\u{1F9D1}\\u{1F3FE}','\\u{1F9D1}\\u{1F3FF}','\\u{1F9D2}\\u{1F3FB}','\\u{1F9D2}\\u{1F3FC}','\\u{1F9D2}\\u{1F3FD}','\\u{1F9D2}\\u{1F3FE}','\\u{1F9D2}\\u{1F3FF}','\\u{1F9D3}\\u{1F3FB}','\\u{1F9D3}\\u{1F3FC}','\\u{1F9D3}\\u{1F3FD}','\\u{1F9D3}\\u{1F3FE}','\\u{1F9D3}\\u{1F3FF}','\\u{1F9D4}\\u{1F3FB}','\\u{1F9D4}\\u{1F3FC}','\\u{1F9D4}\\u{1F3FD}','\\u{1F9D4}\\u{1F3FE}','\\u{1F9D4}\\u{1F3FF}','\\u{1F9D5}\\u{1F3FB}','\\u{1F9D5}\\u{1F3FC}','\\u{1F9D5}\\u{1F3FD}','\\u{1F9D5}\\u{1F3FE}','\\u{1F9D5}\\u{1F3FF}','\\u{1F9D6}\\u{1F3FB}','\\u{1F9D6}\\u{1F3FC}','\\u{1F9D6}\\u{1F3FD}','\\u{1F9D6}\\u{1F3FE}','\\u{1F9D6}\\u{1F3FF}','\\u{1F9D7}\\u{1F3FB}','\\u{1F9D7}\\u{1F3FC}','\\u{1F9D7}\\u{1F3FD}','\\u{1F9D7}\\u{1F3FE}','\\u{1F9D7}\\u{1F3FF}','\\u{1F9D8}\\u{1F3FB}','\\u{1F9D8}\\u{1F3FC}','\\u{1F9D8}\\u{1F3FD}','\\u{1F9D8}\\u{1F3FE}','\\u{1F9D8}\\u{1F3FF}','\\u{1F9D9}\\u{1F3FB}','\\u{1F9D9}\\u{1F3FC}','\\u{1F9D9}\\u{1F3FD}','\\u{1F9D9}\\u{1F3FE}','\\u{1F9D9}\\u{1F3FF}','\\u{1F9DA}\\u{1F3FB}','\\u{1F9DA}\\u{1F3FC}','\\u{1F9DA}\\u{1F3FD}','\\u{1F9DA}\\u{1F3FE}','\\u{1F9DA}\\u{1F3FF}','\\u{1F9DB}\\u{1F3FB}','\\u{1F9DB}\\u{1F3FC}','\\u{1F9DB}\\u{1F3FD}','\\u{1F9DB}\\u{1F3FE}','\\u{1F9DB}\\u{1F3FF}','\\u{1F9DC}\\u{1F3FB}','\\u{1F9DC}\\u{1F3FC}','\\u{1F9DC}\\u{1F3FD}','\\u{1F9DC}\\u{1F3FE}','\\u{1F9DC}\\u{1F3FF}','\\u{1F9DD}\\u{1F3FB}','\\u{1F9DD}\\u{1F3FC}','\\u{1F9DD}\\u{1F3FD}','\\u{1F9DD}\\u{1F3FE}','\\u{1F9DD}\\u{1F3FF}','\\u{1FAC3}\\u{1F3FB}','\\u{1FAC3}\\u{1F3FC}','\\u{1FAC3}\\u{1F3FD}','\\u{1FAC3}\\u{1F3FE}','\\u{1FAC3}\\u{1F3FF}','\\u{1FAC4}\\u{1F3FB}','\\u{1FAC4}\\u{1F3FC}','\\u{1FAC4}\\u{1F3FD}','\\u{1FAC4}\\u{1F3FE}','\\u{1FAC4}\\u{1F3FF}','\\u{1FAC5}\\u{1F3FB}','\\u{1FAC5}\\u{1F3FC}','\\u{1FAC5}\\u{1F3FD}','\\u{1FAC5}\\u{1F3FE}','\\u{1FAC5}\\u{1F3FF}','\\u{1FAF0}\\u{1F3FB}','\\u{1FAF0}\\u{1F3FC}','\\u{1FAF0}\\u{1F3FD}','\\u{1FAF0}\\u{1F3FE}','\\u{1FAF0}\\u{1F3FF}','\\u{1FAF1}\\u{1F3FB}','\\u{1FAF1}\\u{1F3FC}','\\u{1FAF1}\\u{1F3FD}','\\u{1FAF1}\\u{1F3FE}','\\u{1FAF1}\\u{1F3FF}','\\u{1FAF2}\\u{1F3FB}','\\u{1FAF2}\\u{1F3FC}','\\u{1FAF2}\\u{1F3FD}','\\u{1FAF2}\\u{1F3FE}','\\u{1FAF2}\\u{1F3FF}','\\u{1FAF3}\\u{1F3FB}','\\u{1FAF3}\\u{1F3FC}','\\u{1FAF3}\\u{1F3FD}','\\u{1FAF3}\\u{1F3FE}','\\u{1FAF3}\\u{1F3FF}','\\u{1FAF4}\\u{1F3FB}','\\u{1FAF4}\\u{1F3FC}','\\u{1FAF4}\\u{1F3FD}','\\u{1FAF4}\\u{1F3FE}','\\u{1FAF4}\\u{1F3FF}','\\u{1FAF5}\\u{1F3FB}','\\u{1FAF5}\\u{1F3FC}','\\u{1FAF5}\\u{1F3FD}','\\u{1FAF5}\\u{1F3FE}','\\u{1FAF5}\\u{1F3FF}','\\u{1FAF6}\\u{1F3FB}','\\u{1FAF6}\\u{1F3FC}','\\u{1FAF6}\\u{1F3FD}','\\u{1FAF6}\\u{1F3FE}','\\u{1FAF6}\\u{1F3FF}','\\u{1FAF7}\\u{1F3FB}','\\u{1FAF7}\\u{1F3FC}','\\u{1FAF7}\\u{1F3FD}','\\u{1FAF7}\\u{1F3FE}','\\u{1FAF7}\\u{1F3FF}','\\u{1FAF8}\\u{1F3FB}','\\u{1FAF8}\\u{1F3FC}','\\u{1FAF8}\\u{1F3FD}','\\u{1FAF8}\\u{1F3FE}','\\u{1FAF8}\\u{1F3FF}'];\n","const set = require('regenerate')();\n\nexports.characters = set;\nexports.strings = ['\\u{1F3F4}\\u{E0067}\\u{E0062}\\u{E0065}\\u{E006E}\\u{E0067}\\u{E007F}','\\u{1F3F4}\\u{E0067}\\u{E0062}\\u{E0073}\\u{E0063}\\u{E0074}\\u{E007F}','\\u{1F3F4}\\u{E0067}\\u{E0062}\\u{E0077}\\u{E006C}\\u{E0073}\\u{E007F}'];\n","const set = require('regenerate')();\n\nexports.characters = set;\nexports.strings = ['\\u{1F468}\\u200D\\u2764\\uFE0F\\u200D\\u{1F468}','\\u{1F468}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F468}','\\u{1F468}\\u200D\\u{1F466}','\\u{1F468}\\u200D\\u{1F466}\\u200D\\u{1F466}','\\u{1F468}\\u200D\\u{1F467}','\\u{1F468}\\u200D\\u{1F467}\\u200D\\u{1F466}','\\u{1F468}\\u200D\\u{1F467}\\u200D\\u{1F467}','\\u{1F468}\\u200D\\u{1F468}\\u200D\\u{1F466}','\\u{1F468}\\u200D\\u{1F468}\\u200D\\u{1F466}\\u200D\\u{1F466}','\\u{1F468}\\u200D\\u{1F468}\\u200D\\u{1F467}','\\u{1F468}\\u200D\\u{1F468}\\u200D\\u{1F467}\\u200D\\u{1F466}','\\u{1F468}\\u200D\\u{1F468}\\u200D\\u{1F467}\\u200D\\u{1F467}','\\u{1F468}\\u200D\\u{1F469}\\u200D\\u{1F466}','\\u{1F468}\\u200D\\u{1F469}\\u200D\\u{1F466}\\u200D\\u{1F466}','\\u{1F468}\\u200D\\u{1F469}\\u200D\\u{1F467}','\\u{1F468}\\u200D\\u{1F469}\\u200D\\u{1F467}\\u200D\\u{1F466}','\\u{1F468}\\u200D\\u{1F469}\\u200D\\u{1F467}\\u200D\\u{1F467}','\\u{1F468}\\u{1F3FB}\\u200D\\u2764\\uFE0F\\u200D\\u{1F468}\\u{1F3FB}','\\u{1F468}\\u{1F3FB}\\u200D\\u2764\\uFE0F\\u200D\\u{1F468}\\u{1F3FC}','\\u{1F468}\\u{1F3FB}\\u200D\\u2764\\uFE0F\\u200D\\u{1F468}\\u{1F3FD}','\\u{1F468}\\u{1F3FB}\\u200D\\u2764\\uFE0F\\u200D\\u{1F468}\\u{1F3FE}','\\u{1F468}\\u{1F3FB}\\u200D\\u2764\\uFE0F\\u200D\\u{1F468}\\u{1F3FF}','\\u{1F468}\\u{1F3FB}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F468}\\u{1F3FB}','\\u{1F468}\\u{1F3FB}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F468}\\u{1F3FC}','\\u{1F468}\\u{1F3FB}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F468}\\u{1F3FD}','\\u{1F468}\\u{1F3FB}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F468}\\u{1F3FE}','\\u{1F468}\\u{1F3FB}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F468}\\u{1F3FF}','\\u{1F468}\\u{1F3FB}\\u200D\\u{1F91D}\\u200D\\u{1F468}\\u{1F3FC}','\\u{1F468}\\u{1F3FB}\\u200D\\u{1F91D}\\u200D\\u{1F468}\\u{1F3FD}','\\u{1F468}\\u{1F3FB}\\u200D\\u{1F91D}\\u200D\\u{1F468}\\u{1F3FE}','\\u{1F468}\\u{1F3FB}\\u200D\\u{1F91D}\\u200D\\u{1F468}\\u{1F3FF}','\\u{1F468}\\u{1F3FC}\\u200D\\u2764\\uFE0F\\u200D\\u{1F468}\\u{1F3FB}','\\u{1F468}\\u{1F3FC}\\u200D\\u2764\\uFE0F\\u200D\\u{1F468}\\u{1F3FC}','\\u{1F468}\\u{1F3FC}\\u200D\\u2764\\uFE0F\\u200D\\u{1F468}\\u{1F3FD}','\\u{1F468}\\u{1F3FC}\\u200D\\u2764\\uFE0F\\u200D\\u{1F468}\\u{1F3FE}','\\u{1F468}\\u{1F3FC}\\u200D\\u2764\\uFE0F\\u200D\\u{1F468}\\u{1F3FF}','\\u{1F468}\\u{1F3FC}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F468}\\u{1F3FB}','\\u{1F468}\\u{1F3FC}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F468}\\u{1F3FC}','\\u{1F468}\\u{1F3FC}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F468}\\u{1F3FD}','\\u{1F468}\\u{1F3FC}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F468}\\u{1F3FE}','\\u{1F468}\\u{1F3FC}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F468}\\u{1F3FF}','\\u{1F468}\\u{1F3FC}\\u200D\\u{1F91D}\\u200D\\u{1F468}\\u{1F3FB}','\\u{1F468}\\u{1F3FC}\\u200D\\u{1F91D}\\u200D\\u{1F468}\\u{1F3FD}','\\u{1F468}\\u{1F3FC}\\u200D\\u{1F91D}\\u200D\\u{1F468}\\u{1F3FE}','\\u{1F468}\\u{1F3FC}\\u200D\\u{1F91D}\\u200D\\u{1F468}\\u{1F3FF}','\\u{1F468}\\u{1F3FD}\\u200D\\u2764\\uFE0F\\u200D\\u{1F468}\\u{1F3FB}','\\u{1F468}\\u{1F3FD}\\u200D\\u2764\\uFE0F\\u200D\\u{1F468}\\u{1F3FC}','\\u{1F468}\\u{1F3FD}\\u200D\\u2764\\uFE0F\\u200D\\u{1F468}\\u{1F3FD}','\\u{1F468}\\u{1F3FD}\\u200D\\u2764\\uFE0F\\u200D\\u{1F468}\\u{1F3FE}','\\u{1F468}\\u{1F3FD}\\u200D\\u2764\\uFE0F\\u200D\\u{1F468}\\u{1F3FF}','\\u{1F468}\\u{1F3FD}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F468}\\u{1F3FB}','\\u{1F468}\\u{1F3FD}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F468}\\u{1F3FC}','\\u{1F468}\\u{1F3FD}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F468}\\u{1F3FD}','\\u{1F468}\\u{1F3FD}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F468}\\u{1F3FE}','\\u{1F468}\\u{1F3FD}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F468}\\u{1F3FF}','\\u{1F468}\\u{1F3FD}\\u200D\\u{1F91D}\\u200D\\u{1F468}\\u{1F3FB}','\\u{1F468}\\u{1F3FD}\\u200D\\u{1F91D}\\u200D\\u{1F468}\\u{1F3FC}','\\u{1F468}\\u{1F3FD}\\u200D\\u{1F91D}\\u200D\\u{1F468}\\u{1F3FE}','\\u{1F468}\\u{1F3FD}\\u200D\\u{1F91D}\\u200D\\u{1F468}\\u{1F3FF}','\\u{1F468}\\u{1F3FE}\\u200D\\u2764\\uFE0F\\u200D\\u{1F468}\\u{1F3FB}','\\u{1F468}\\u{1F3FE}\\u200D\\u2764\\uFE0F\\u200D\\u{1F468}\\u{1F3FC}','\\u{1F468}\\u{1F3FE}\\u200D\\u2764\\uFE0F\\u200D\\u{1F468}\\u{1F3FD}','\\u{1F468}\\u{1F3FE}\\u200D\\u2764\\uFE0F\\u200D\\u{1F468}\\u{1F3FE}','\\u{1F468}\\u{1F3FE}\\u200D\\u2764\\uFE0F\\u200D\\u{1F468}\\u{1F3FF}','\\u{1F468}\\u{1F3FE}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F468}\\u{1F3FB}','\\u{1F468}\\u{1F3FE}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F468}\\u{1F3FC}','\\u{1F468}\\u{1F3FE}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F468}\\u{1F3FD}','\\u{1F468}\\u{1F3FE}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F468}\\u{1F3FE}','\\u{1F468}\\u{1F3FE}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F468}\\u{1F3FF}','\\u{1F468}\\u{1F3FE}\\u200D\\u{1F91D}\\u200D\\u{1F468}\\u{1F3FB}','\\u{1F468}\\u{1F3FE}\\u200D\\u{1F91D}\\u200D\\u{1F468}\\u{1F3FC}','\\u{1F468}\\u{1F3FE}\\u200D\\u{1F91D}\\u200D\\u{1F468}\\u{1F3FD}','\\u{1F468}\\u{1F3FE}\\u200D\\u{1F91D}\\u200D\\u{1F468}\\u{1F3FF}','\\u{1F468}\\u{1F3FF}\\u200D\\u2764\\uFE0F\\u200D\\u{1F468}\\u{1F3FB}','\\u{1F468}\\u{1F3FF}\\u200D\\u2764\\uFE0F\\u200D\\u{1F468}\\u{1F3FC}','\\u{1F468}\\u{1F3FF}\\u200D\\u2764\\uFE0F\\u200D\\u{1F468}\\u{1F3FD}','\\u{1F468}\\u{1F3FF}\\u200D\\u2764\\uFE0F\\u200D\\u{1F468}\\u{1F3FE}','\\u{1F468}\\u{1F3FF}\\u200D\\u2764\\uFE0F\\u200D\\u{1F468}\\u{1F3FF}','\\u{1F468}\\u{1F3FF}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F468}\\u{1F3FB}','\\u{1F468}\\u{1F3FF}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F468}\\u{1F3FC}','\\u{1F468}\\u{1F3FF}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F468}\\u{1F3FD}','\\u{1F468}\\u{1F3FF}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F468}\\u{1F3FE}','\\u{1F468}\\u{1F3FF}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F468}\\u{1F3FF}','\\u{1F468}\\u{1F3FF}\\u200D\\u{1F91D}\\u200D\\u{1F468}\\u{1F3FB}','\\u{1F468}\\u{1F3FF}\\u200D\\u{1F91D}\\u200D\\u{1F468}\\u{1F3FC}','\\u{1F468}\\u{1F3FF}\\u200D\\u{1F91D}\\u200D\\u{1F468}\\u{1F3FD}','\\u{1F468}\\u{1F3FF}\\u200D\\u{1F91D}\\u200D\\u{1F468}\\u{1F3FE}','\\u{1F469}\\u200D\\u2764\\uFE0F\\u200D\\u{1F468}','\\u{1F469}\\u200D\\u2764\\uFE0F\\u200D\\u{1F469}','\\u{1F469}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F468}','\\u{1F469}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F469}','\\u{1F469}\\u200D\\u{1F466}','\\u{1F469}\\u200D\\u{1F466}\\u200D\\u{1F466}','\\u{1F469}\\u200D\\u{1F467}','\\u{1F469}\\u200D\\u{1F467}\\u200D\\u{1F466}','\\u{1F469}\\u200D\\u{1F467}\\u200D\\u{1F467}','\\u{1F469}\\u200D\\u{1F469}\\u200D\\u{1F466}','\\u{1F469}\\u200D\\u{1F469}\\u200D\\u{1F466}\\u200D\\u{1F466}','\\u{1F469}\\u200D\\u{1F469}\\u200D\\u{1F467}','\\u{1F469}\\u200D\\u{1F469}\\u200D\\u{1F467}\\u200D\\u{1F466}','\\u{1F469}\\u200D\\u{1F469}\\u200D\\u{1F467}\\u200D\\u{1F467}','\\u{1F469}\\u{1F3FB}\\u200D\\u2764\\uFE0F\\u200D\\u{1F468}\\u{1F3FB}','\\u{1F469}\\u{1F3FB}\\u200D\\u2764\\uFE0F\\u200D\\u{1F468}\\u{1F3FC}','\\u{1F469}\\u{1F3FB}\\u200D\\u2764\\uFE0F\\u200D\\u{1F468}\\u{1F3FD}','\\u{1F469}\\u{1F3FB}\\u200D\\u2764\\uFE0F\\u200D\\u{1F468}\\u{1F3FE}','\\u{1F469}\\u{1F3FB}\\u200D\\u2764\\uFE0F\\u200D\\u{1F468}\\u{1F3FF}','\\u{1F469}\\u{1F3FB}\\u200D\\u2764\\uFE0F\\u200D\\u{1F469}\\u{1F3FB}','\\u{1F469}\\u{1F3FB}\\u200D\\u2764\\uFE0F\\u200D\\u{1F469}\\u{1F3FC}','\\u{1F469}\\u{1F3FB}\\u200D\\u2764\\uFE0F\\u200D\\u{1F469}\\u{1F3FD}','\\u{1F469}\\u{1F3FB}\\u200D\\u2764\\uFE0F\\u200D\\u{1F469}\\u{1F3FE}','\\u{1F469}\\u{1F3FB}\\u200D\\u2764\\uFE0F\\u200D\\u{1F469}\\u{1F3FF}','\\u{1F469}\\u{1F3FB}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F468}\\u{1F3FB}','\\u{1F469}\\u{1F3FB}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F468}\\u{1F3FC}','\\u{1F469}\\u{1F3FB}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F468}\\u{1F3FD}','\\u{1F469}\\u{1F3FB}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F468}\\u{1F3FE}','\\u{1F469}\\u{1F3FB}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F468}\\u{1F3FF}','\\u{1F469}\\u{1F3FB}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F469}\\u{1F3FB}','\\u{1F469}\\u{1F3FB}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F469}\\u{1F3FC}','\\u{1F469}\\u{1F3FB}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F469}\\u{1F3FD}','\\u{1F469}\\u{1F3FB}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F469}\\u{1F3FE}','\\u{1F469}\\u{1F3FB}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F469}\\u{1F3FF}','\\u{1F469}\\u{1F3FB}\\u200D\\u{1F91D}\\u200D\\u{1F468}\\u{1F3FC}','\\u{1F469}\\u{1F3FB}\\u200D\\u{1F91D}\\u200D\\u{1F468}\\u{1F3FD}','\\u{1F469}\\u{1F3FB}\\u200D\\u{1F91D}\\u200D\\u{1F468}\\u{1F3FE}','\\u{1F469}\\u{1F3FB}\\u200D\\u{1F91D}\\u200D\\u{1F468}\\u{1F3FF}','\\u{1F469}\\u{1F3FB}\\u200D\\u{1F91D}\\u200D\\u{1F469}\\u{1F3FC}','\\u{1F469}\\u{1F3FB}\\u200D\\u{1F91D}\\u200D\\u{1F469}\\u{1F3FD}','\\u{1F469}\\u{1F3FB}\\u200D\\u{1F91D}\\u200D\\u{1F469}\\u{1F3FE}','\\u{1F469}\\u{1F3FB}\\u200D\\u{1F91D}\\u200D\\u{1F469}\\u{1F3FF}','\\u{1F469}\\u{1F3FC}\\u200D\\u2764\\uFE0F\\u200D\\u{1F468}\\u{1F3FB}','\\u{1F469}\\u{1F3FC}\\u200D\\u2764\\uFE0F\\u200D\\u{1F468}\\u{1F3FC}','\\u{1F469}\\u{1F3FC}\\u200D\\u2764\\uFE0F\\u200D\\u{1F468}\\u{1F3FD}','\\u{1F469}\\u{1F3FC}\\u200D\\u2764\\uFE0F\\u200D\\u{1F468}\\u{1F3FE}','\\u{1F469}\\u{1F3FC}\\u200D\\u2764\\uFE0F\\u200D\\u{1F468}\\u{1F3FF}','\\u{1F469}\\u{1F3FC}\\u200D\\u2764\\uFE0F\\u200D\\u{1F469}\\u{1F3FB}','\\u{1F469}\\u{1F3FC}\\u200D\\u2764\\uFE0F\\u200D\\u{1F469}\\u{1F3FC}','\\u{1F469}\\u{1F3FC}\\u200D\\u2764\\uFE0F\\u200D\\u{1F469}\\u{1F3FD}','\\u{1F469}\\u{1F3FC}\\u200D\\u2764\\uFE0F\\u200D\\u{1F469}\\u{1F3FE}','\\u{1F469}\\u{1F3FC}\\u200D\\u2764\\uFE0F\\u200D\\u{1F469}\\u{1F3FF}','\\u{1F469}\\u{1F3FC}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F468}\\u{1F3FB}','\\u{1F469}\\u{1F3FC}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F468}\\u{1F3FC}','\\u{1F469}\\u{1F3FC}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F468}\\u{1F3FD}','\\u{1F469}\\u{1F3FC}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F468}\\u{1F3FE}','\\u{1F469}\\u{1F3FC}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F468}\\u{1F3FF}','\\u{1F469}\\u{1F3FC}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F469}\\u{1F3FB}','\\u{1F469}\\u{1F3FC}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F469}\\u{1F3FC}','\\u{1F469}\\u{1F3FC}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F469}\\u{1F3FD}','\\u{1F469}\\u{1F3FC}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F469}\\u{1F3FE}','\\u{1F469}\\u{1F3FC}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F469}\\u{1F3FF}','\\u{1F469}\\u{1F3FC}\\u200D\\u{1F91D}\\u200D\\u{1F468}\\u{1F3FB}','\\u{1F469}\\u{1F3FC}\\u200D\\u{1F91D}\\u200D\\u{1F468}\\u{1F3FD}','\\u{1F469}\\u{1F3FC}\\u200D\\u{1F91D}\\u200D\\u{1F468}\\u{1F3FE}','\\u{1F469}\\u{1F3FC}\\u200D\\u{1F91D}\\u200D\\u{1F468}\\u{1F3FF}','\\u{1F469}\\u{1F3FC}\\u200D\\u{1F91D}\\u200D\\u{1F469}\\u{1F3FB}','\\u{1F469}\\u{1F3FC}\\u200D\\u{1F91D}\\u200D\\u{1F469}\\u{1F3FD}','\\u{1F469}\\u{1F3FC}\\u200D\\u{1F91D}\\u200D\\u{1F469}\\u{1F3FE}','\\u{1F469}\\u{1F3FC}\\u200D\\u{1F91D}\\u200D\\u{1F469}\\u{1F3FF}','\\u{1F469}\\u{1F3FD}\\u200D\\u2764\\uFE0F\\u200D\\u{1F468}\\u{1F3FB}','\\u{1F469}\\u{1F3FD}\\u200D\\u2764\\uFE0F\\u200D\\u{1F468}\\u{1F3FC}','\\u{1F469}\\u{1F3FD}\\u200D\\u2764\\uFE0F\\u200D\\u{1F468}\\u{1F3FD}','\\u{1F469}\\u{1F3FD}\\u200D\\u2764\\uFE0F\\u200D\\u{1F468}\\u{1F3FE}','\\u{1F469}\\u{1F3FD}\\u200D\\u2764\\uFE0F\\u200D\\u{1F468}\\u{1F3FF}','\\u{1F469}\\u{1F3FD}\\u200D\\u2764\\uFE0F\\u200D\\u{1F469}\\u{1F3FB}','\\u{1F469}\\u{1F3FD}\\u200D\\u2764\\uFE0F\\u200D\\u{1F469}\\u{1F3FC}','\\u{1F469}\\u{1F3FD}\\u200D\\u2764\\uFE0F\\u200D\\u{1F469}\\u{1F3FD}','\\u{1F469}\\u{1F3FD}\\u200D\\u2764\\uFE0F\\u200D\\u{1F469}\\u{1F3FE}','\\u{1F469}\\u{1F3FD}\\u200D\\u2764\\uFE0F\\u200D\\u{1F469}\\u{1F3FF}','\\u{1F469}\\u{1F3FD}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F468}\\u{1F3FB}','\\u{1F469}\\u{1F3FD}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F468}\\u{1F3FC}','\\u{1F469}\\u{1F3FD}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F468}\\u{1F3FD}','\\u{1F469}\\u{1F3FD}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F468}\\u{1F3FE}','\\u{1F469}\\u{1F3FD}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F468}\\u{1F3FF}','\\u{1F469}\\u{1F3FD}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F469}\\u{1F3FB}','\\u{1F469}\\u{1F3FD}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F469}\\u{1F3FC}','\\u{1F469}\\u{1F3FD}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F469}\\u{1F3FD}','\\u{1F469}\\u{1F3FD}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F469}\\u{1F3FE}','\\u{1F469}\\u{1F3FD}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F469}\\u{1F3FF}','\\u{1F469}\\u{1F3FD}\\u200D\\u{1F91D}\\u200D\\u{1F468}\\u{1F3FB}','\\u{1F469}\\u{1F3FD}\\u200D\\u{1F91D}\\u200D\\u{1F468}\\u{1F3FC}','\\u{1F469}\\u{1F3FD}\\u200D\\u{1F91D}\\u200D\\u{1F468}\\u{1F3FE}','\\u{1F469}\\u{1F3FD}\\u200D\\u{1F91D}\\u200D\\u{1F468}\\u{1F3FF}','\\u{1F469}\\u{1F3FD}\\u200D\\u{1F91D}\\u200D\\u{1F469}\\u{1F3FB}','\\u{1F469}\\u{1F3FD}\\u200D\\u{1F91D}\\u200D\\u{1F469}\\u{1F3FC}','\\u{1F469}\\u{1F3FD}\\u200D\\u{1F91D}\\u200D\\u{1F469}\\u{1F3FE}','\\u{1F469}\\u{1F3FD}\\u200D\\u{1F91D}\\u200D\\u{1F469}\\u{1F3FF}','\\u{1F469}\\u{1F3FE}\\u200D\\u2764\\uFE0F\\u200D\\u{1F468}\\u{1F3FB}','\\u{1F469}\\u{1F3FE}\\u200D\\u2764\\uFE0F\\u200D\\u{1F468}\\u{1F3FC}','\\u{1F469}\\u{1F3FE}\\u200D\\u2764\\uFE0F\\u200D\\u{1F468}\\u{1F3FD}','\\u{1F469}\\u{1F3FE}\\u200D\\u2764\\uFE0F\\u200D\\u{1F468}\\u{1F3FE}','\\u{1F469}\\u{1F3FE}\\u200D\\u2764\\uFE0F\\u200D\\u{1F468}\\u{1F3FF}','\\u{1F469}\\u{1F3FE}\\u200D\\u2764\\uFE0F\\u200D\\u{1F469}\\u{1F3FB}','\\u{1F469}\\u{1F3FE}\\u200D\\u2764\\uFE0F\\u200D\\u{1F469}\\u{1F3FC}','\\u{1F469}\\u{1F3FE}\\u200D\\u2764\\uFE0F\\u200D\\u{1F469}\\u{1F3FD}','\\u{1F469}\\u{1F3FE}\\u200D\\u2764\\uFE0F\\u200D\\u{1F469}\\u{1F3FE}','\\u{1F469}\\u{1F3FE}\\u200D\\u2764\\uFE0F\\u200D\\u{1F469}\\u{1F3FF}','\\u{1F469}\\u{1F3FE}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F468}\\u{1F3FB}','\\u{1F469}\\u{1F3FE}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F468}\\u{1F3FC}','\\u{1F469}\\u{1F3FE}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F468}\\u{1F3FD}','\\u{1F469}\\u{1F3FE}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F468}\\u{1F3FE}','\\u{1F469}\\u{1F3FE}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F468}\\u{1F3FF}','\\u{1F469}\\u{1F3FE}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F469}\\u{1F3FB}','\\u{1F469}\\u{1F3FE}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F469}\\u{1F3FC}','\\u{1F469}\\u{1F3FE}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F469}\\u{1F3FD}','\\u{1F469}\\u{1F3FE}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F469}\\u{1F3FE}','\\u{1F469}\\u{1F3FE}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F469}\\u{1F3FF}','\\u{1F469}\\u{1F3FE}\\u200D\\u{1F91D}\\u200D\\u{1F468}\\u{1F3FB}','\\u{1F469}\\u{1F3FE}\\u200D\\u{1F91D}\\u200D\\u{1F468}\\u{1F3FC}','\\u{1F469}\\u{1F3FE}\\u200D\\u{1F91D}\\u200D\\u{1F468}\\u{1F3FD}','\\u{1F469}\\u{1F3FE}\\u200D\\u{1F91D}\\u200D\\u{1F468}\\u{1F3FF}','\\u{1F469}\\u{1F3FE}\\u200D\\u{1F91D}\\u200D\\u{1F469}\\u{1F3FB}','\\u{1F469}\\u{1F3FE}\\u200D\\u{1F91D}\\u200D\\u{1F469}\\u{1F3FC}','\\u{1F469}\\u{1F3FE}\\u200D\\u{1F91D}\\u200D\\u{1F469}\\u{1F3FD}','\\u{1F469}\\u{1F3FE}\\u200D\\u{1F91D}\\u200D\\u{1F469}\\u{1F3FF}','\\u{1F469}\\u{1F3FF}\\u200D\\u2764\\uFE0F\\u200D\\u{1F468}\\u{1F3FB}','\\u{1F469}\\u{1F3FF}\\u200D\\u2764\\uFE0F\\u200D\\u{1F468}\\u{1F3FC}','\\u{1F469}\\u{1F3FF}\\u200D\\u2764\\uFE0F\\u200D\\u{1F468}\\u{1F3FD}','\\u{1F469}\\u{1F3FF}\\u200D\\u2764\\uFE0F\\u200D\\u{1F468}\\u{1F3FE}','\\u{1F469}\\u{1F3FF}\\u200D\\u2764\\uFE0F\\u200D\\u{1F468}\\u{1F3FF}','\\u{1F469}\\u{1F3FF}\\u200D\\u2764\\uFE0F\\u200D\\u{1F469}\\u{1F3FB}','\\u{1F469}\\u{1F3FF}\\u200D\\u2764\\uFE0F\\u200D\\u{1F469}\\u{1F3FC}','\\u{1F469}\\u{1F3FF}\\u200D\\u2764\\uFE0F\\u200D\\u{1F469}\\u{1F3FD}','\\u{1F469}\\u{1F3FF}\\u200D\\u2764\\uFE0F\\u200D\\u{1F469}\\u{1F3FE}','\\u{1F469}\\u{1F3FF}\\u200D\\u2764\\uFE0F\\u200D\\u{1F469}\\u{1F3FF}','\\u{1F469}\\u{1F3FF}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F468}\\u{1F3FB}','\\u{1F469}\\u{1F3FF}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F468}\\u{1F3FC}','\\u{1F469}\\u{1F3FF}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F468}\\u{1F3FD}','\\u{1F469}\\u{1F3FF}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F468}\\u{1F3FE}','\\u{1F469}\\u{1F3FF}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F468}\\u{1F3FF}','\\u{1F469}\\u{1F3FF}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F469}\\u{1F3FB}','\\u{1F469}\\u{1F3FF}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F469}\\u{1F3FC}','\\u{1F469}\\u{1F3FF}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F469}\\u{1F3FD}','\\u{1F469}\\u{1F3FF}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F469}\\u{1F3FE}','\\u{1F469}\\u{1F3FF}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F469}\\u{1F3FF}','\\u{1F469}\\u{1F3FF}\\u200D\\u{1F91D}\\u200D\\u{1F468}\\u{1F3FB}','\\u{1F469}\\u{1F3FF}\\u200D\\u{1F91D}\\u200D\\u{1F468}\\u{1F3FC}','\\u{1F469}\\u{1F3FF}\\u200D\\u{1F91D}\\u200D\\u{1F468}\\u{1F3FD}','\\u{1F469}\\u{1F3FF}\\u200D\\u{1F91D}\\u200D\\u{1F468}\\u{1F3FE}','\\u{1F469}\\u{1F3FF}\\u200D\\u{1F91D}\\u200D\\u{1F469}\\u{1F3FB}','\\u{1F469}\\u{1F3FF}\\u200D\\u{1F91D}\\u200D\\u{1F469}\\u{1F3FC}','\\u{1F469}\\u{1F3FF}\\u200D\\u{1F91D}\\u200D\\u{1F469}\\u{1F3FD}','\\u{1F469}\\u{1F3FF}\\u200D\\u{1F91D}\\u200D\\u{1F469}\\u{1F3FE}','\\u{1F9D1}\\u200D\\u{1F91D}\\u200D\\u{1F9D1}','\\u{1F9D1}\\u200D\\u{1F9D1}\\u200D\\u{1F9D2}','\\u{1F9D1}\\u200D\\u{1F9D1}\\u200D\\u{1F9D2}\\u200D\\u{1F9D2}','\\u{1F9D1}\\u200D\\u{1F9D2}','\\u{1F9D1}\\u200D\\u{1F9D2}\\u200D\\u{1F9D2}','\\u{1F9D1}\\u{1F3FB}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F9D1}\\u{1F3FC}','\\u{1F9D1}\\u{1F3FB}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F9D1}\\u{1F3FD}','\\u{1F9D1}\\u{1F3FB}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F9D1}\\u{1F3FE}','\\u{1F9D1}\\u{1F3FB}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F9D1}\\u{1F3FF}','\\u{1F9D1}\\u{1F3FB}\\u200D\\u2764\\uFE0F\\u200D\\u{1F9D1}\\u{1F3FC}','\\u{1F9D1}\\u{1F3FB}\\u200D\\u2764\\uFE0F\\u200D\\u{1F9D1}\\u{1F3FD}','\\u{1F9D1}\\u{1F3FB}\\u200D\\u2764\\uFE0F\\u200D\\u{1F9D1}\\u{1F3FE}','\\u{1F9D1}\\u{1F3FB}\\u200D\\u2764\\uFE0F\\u200D\\u{1F9D1}\\u{1F3FF}','\\u{1F9D1}\\u{1F3FB}\\u200D\\u{1F91D}\\u200D\\u{1F9D1}\\u{1F3FB}','\\u{1F9D1}\\u{1F3FB}\\u200D\\u{1F91D}\\u200D\\u{1F9D1}\\u{1F3FC}','\\u{1F9D1}\\u{1F3FB}\\u200D\\u{1F91D}\\u200D\\u{1F9D1}\\u{1F3FD}','\\u{1F9D1}\\u{1F3FB}\\u200D\\u{1F91D}\\u200D\\u{1F9D1}\\u{1F3FE}','\\u{1F9D1}\\u{1F3FB}\\u200D\\u{1F91D}\\u200D\\u{1F9D1}\\u{1F3FF}','\\u{1F9D1}\\u{1F3FC}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F9D1}\\u{1F3FB}','\\u{1F9D1}\\u{1F3FC}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F9D1}\\u{1F3FD}','\\u{1F9D1}\\u{1F3FC}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F9D1}\\u{1F3FE}','\\u{1F9D1}\\u{1F3FC}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F9D1}\\u{1F3FF}','\\u{1F9D1}\\u{1F3FC}\\u200D\\u2764\\uFE0F\\u200D\\u{1F9D1}\\u{1F3FB}','\\u{1F9D1}\\u{1F3FC}\\u200D\\u2764\\uFE0F\\u200D\\u{1F9D1}\\u{1F3FD}','\\u{1F9D1}\\u{1F3FC}\\u200D\\u2764\\uFE0F\\u200D\\u{1F9D1}\\u{1F3FE}','\\u{1F9D1}\\u{1F3FC}\\u200D\\u2764\\uFE0F\\u200D\\u{1F9D1}\\u{1F3FF}','\\u{1F9D1}\\u{1F3FC}\\u200D\\u{1F91D}\\u200D\\u{1F9D1}\\u{1F3FB}','\\u{1F9D1}\\u{1F3FC}\\u200D\\u{1F91D}\\u200D\\u{1F9D1}\\u{1F3FC}','\\u{1F9D1}\\u{1F3FC}\\u200D\\u{1F91D}\\u200D\\u{1F9D1}\\u{1F3FD}','\\u{1F9D1}\\u{1F3FC}\\u200D\\u{1F91D}\\u200D\\u{1F9D1}\\u{1F3FE}','\\u{1F9D1}\\u{1F3FC}\\u200D\\u{1F91D}\\u200D\\u{1F9D1}\\u{1F3FF}','\\u{1F9D1}\\u{1F3FD}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F9D1}\\u{1F3FB}','\\u{1F9D1}\\u{1F3FD}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F9D1}\\u{1F3FC}','\\u{1F9D1}\\u{1F3FD}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F9D1}\\u{1F3FE}','\\u{1F9D1}\\u{1F3FD}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F9D1}\\u{1F3FF}','\\u{1F9D1}\\u{1F3FD}\\u200D\\u2764\\uFE0F\\u200D\\u{1F9D1}\\u{1F3FB}','\\u{1F9D1}\\u{1F3FD}\\u200D\\u2764\\uFE0F\\u200D\\u{1F9D1}\\u{1F3FC}','\\u{1F9D1}\\u{1F3FD}\\u200D\\u2764\\uFE0F\\u200D\\u{1F9D1}\\u{1F3FE}','\\u{1F9D1}\\u{1F3FD}\\u200D\\u2764\\uFE0F\\u200D\\u{1F9D1}\\u{1F3FF}','\\u{1F9D1}\\u{1F3FD}\\u200D\\u{1F91D}\\u200D\\u{1F9D1}\\u{1F3FB}','\\u{1F9D1}\\u{1F3FD}\\u200D\\u{1F91D}\\u200D\\u{1F9D1}\\u{1F3FC}','\\u{1F9D1}\\u{1F3FD}\\u200D\\u{1F91D}\\u200D\\u{1F9D1}\\u{1F3FD}','\\u{1F9D1}\\u{1F3FD}\\u200D\\u{1F91D}\\u200D\\u{1F9D1}\\u{1F3FE}','\\u{1F9D1}\\u{1F3FD}\\u200D\\u{1F91D}\\u200D\\u{1F9D1}\\u{1F3FF}','\\u{1F9D1}\\u{1F3FE}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F9D1}\\u{1F3FB}','\\u{1F9D1}\\u{1F3FE}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F9D1}\\u{1F3FC}','\\u{1F9D1}\\u{1F3FE}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F9D1}\\u{1F3FD}','\\u{1F9D1}\\u{1F3FE}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F9D1}\\u{1F3FF}','\\u{1F9D1}\\u{1F3FE}\\u200D\\u2764\\uFE0F\\u200D\\u{1F9D1}\\u{1F3FB}','\\u{1F9D1}\\u{1F3FE}\\u200D\\u2764\\uFE0F\\u200D\\u{1F9D1}\\u{1F3FC}','\\u{1F9D1}\\u{1F3FE}\\u200D\\u2764\\uFE0F\\u200D\\u{1F9D1}\\u{1F3FD}','\\u{1F9D1}\\u{1F3FE}\\u200D\\u2764\\uFE0F\\u200D\\u{1F9D1}\\u{1F3FF}','\\u{1F9D1}\\u{1F3FE}\\u200D\\u{1F91D}\\u200D\\u{1F9D1}\\u{1F3FB}','\\u{1F9D1}\\u{1F3FE}\\u200D\\u{1F91D}\\u200D\\u{1F9D1}\\u{1F3FC}','\\u{1F9D1}\\u{1F3FE}\\u200D\\u{1F91D}\\u200D\\u{1F9D1}\\u{1F3FD}','\\u{1F9D1}\\u{1F3FE}\\u200D\\u{1F91D}\\u200D\\u{1F9D1}\\u{1F3FE}','\\u{1F9D1}\\u{1F3FE}\\u200D\\u{1F91D}\\u200D\\u{1F9D1}\\u{1F3FF}','\\u{1F9D1}\\u{1F3FF}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F9D1}\\u{1F3FB}','\\u{1F9D1}\\u{1F3FF}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F9D1}\\u{1F3FC}','\\u{1F9D1}\\u{1F3FF}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F9D1}\\u{1F3FD}','\\u{1F9D1}\\u{1F3FF}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F9D1}\\u{1F3FE}','\\u{1F9D1}\\u{1F3FF}\\u200D\\u2764\\uFE0F\\u200D\\u{1F9D1}\\u{1F3FB}','\\u{1F9D1}\\u{1F3FF}\\u200D\\u2764\\uFE0F\\u200D\\u{1F9D1}\\u{1F3FC}','\\u{1F9D1}\\u{1F3FF}\\u200D\\u2764\\uFE0F\\u200D\\u{1F9D1}\\u{1F3FD}','\\u{1F9D1}\\u{1F3FF}\\u200D\\u2764\\uFE0F\\u200D\\u{1F9D1}\\u{1F3FE}','\\u{1F9D1}\\u{1F3FF}\\u200D\\u{1F91D}\\u200D\\u{1F9D1}\\u{1F3FB}','\\u{1F9D1}\\u{1F3FF}\\u200D\\u{1F91D}\\u200D\\u{1F9D1}\\u{1F3FC}','\\u{1F9D1}\\u{1F3FF}\\u200D\\u{1F91D}\\u200D\\u{1F9D1}\\u{1F3FD}','\\u{1F9D1}\\u{1F3FF}\\u200D\\u{1F91D}\\u200D\\u{1F9D1}\\u{1F3FE}','\\u{1F9D1}\\u{1F3FF}\\u200D\\u{1F91D}\\u200D\\u{1F9D1}\\u{1F3FF}','\\u{1FAF1}\\u{1F3FB}\\u200D\\u{1FAF2}\\u{1F3FC}','\\u{1FAF1}\\u{1F3FB}\\u200D\\u{1FAF2}\\u{1F3FD}','\\u{1FAF1}\\u{1F3FB}\\u200D\\u{1FAF2}\\u{1F3FE}','\\u{1FAF1}\\u{1F3FB}\\u200D\\u{1FAF2}\\u{1F3FF}','\\u{1FAF1}\\u{1F3FC}\\u200D\\u{1FAF2}\\u{1F3FB}','\\u{1FAF1}\\u{1F3FC}\\u200D\\u{1FAF2}\\u{1F3FD}','\\u{1FAF1}\\u{1F3FC}\\u200D\\u{1FAF2}\\u{1F3FE}','\\u{1FAF1}\\u{1F3FC}\\u200D\\u{1FAF2}\\u{1F3FF}','\\u{1FAF1}\\u{1F3FD}\\u200D\\u{1FAF2}\\u{1F3FB}','\\u{1FAF1}\\u{1F3FD}\\u200D\\u{1FAF2}\\u{1F3FC}','\\u{1FAF1}\\u{1F3FD}\\u200D\\u{1FAF2}\\u{1F3FE}','\\u{1FAF1}\\u{1F3FD}\\u200D\\u{1FAF2}\\u{1F3FF}','\\u{1FAF1}\\u{1F3FE}\\u200D\\u{1FAF2}\\u{1F3FB}','\\u{1FAF1}\\u{1F3FE}\\u200D\\u{1FAF2}\\u{1F3FC}','\\u{1FAF1}\\u{1F3FE}\\u200D\\u{1FAF2}\\u{1F3FD}','\\u{1FAF1}\\u{1F3FE}\\u200D\\u{1FAF2}\\u{1F3FF}','\\u{1FAF1}\\u{1F3FF}\\u200D\\u{1FAF2}\\u{1F3FB}','\\u{1FAF1}\\u{1F3FF}\\u200D\\u{1FAF2}\\u{1F3FC}','\\u{1FAF1}\\u{1F3FF}\\u200D\\u{1FAF2}\\u{1F3FD}','\\u{1FAF1}\\u{1F3FF}\\u200D\\u{1FAF2}\\u{1F3FE}','\\u{1F3C3}\\u200D\\u27A1\\uFE0F','\\u{1F3C3}\\u{1F3FB}\\u200D\\u27A1\\uFE0F','\\u{1F3C3}\\u{1F3FC}\\u200D\\u27A1\\uFE0F','\\u{1F3C3}\\u{1F3FD}\\u200D\\u27A1\\uFE0F','\\u{1F3C3}\\u{1F3FE}\\u200D\\u27A1\\uFE0F','\\u{1F3C3}\\u{1F3FF}\\u200D\\u27A1\\uFE0F','\\u{1F468}\\u200D\\u2695\\uFE0F','\\u{1F468}\\u200D\\u2696\\uFE0F','\\u{1F468}\\u200D\\u2708\\uFE0F','\\u{1F468}\\u200D\\u{1F33E}','\\u{1F468}\\u200D\\u{1F373}','\\u{1F468}\\u200D\\u{1F37C}','\\u{1F468}\\u200D\\u{1F393}','\\u{1F468}\\u200D\\u{1F3A4}','\\u{1F468}\\u200D\\u{1F3A8}','\\u{1F468}\\u200D\\u{1F3EB}','\\u{1F468}\\u200D\\u{1F3ED}','\\u{1F468}\\u200D\\u{1F4BB}','\\u{1F468}\\u200D\\u{1F4BC}','\\u{1F468}\\u200D\\u{1F527}','\\u{1F468}\\u200D\\u{1F52C}','\\u{1F468}\\u200D\\u{1F680}','\\u{1F468}\\u200D\\u{1F692}','\\u{1F468}\\u200D\\u{1F9AF}','\\u{1F468}\\u200D\\u{1F9AF}\\u200D\\u27A1\\uFE0F','\\u{1F468}\\u200D\\u{1F9BC}','\\u{1F468}\\u200D\\u{1F9BC}\\u200D\\u27A1\\uFE0F','\\u{1F468}\\u200D\\u{1F9BD}','\\u{1F468}\\u200D\\u{1F9BD}\\u200D\\u27A1\\uFE0F','\\u{1F468}\\u{1F3FB}\\u200D\\u2695\\uFE0F','\\u{1F468}\\u{1F3FB}\\u200D\\u2696\\uFE0F','\\u{1F468}\\u{1F3FB}\\u200D\\u2708\\uFE0F','\\u{1F468}\\u{1F3FB}\\u200D\\u{1F33E}','\\u{1F468}\\u{1F3FB}\\u200D\\u{1F373}','\\u{1F468}\\u{1F3FB}\\u200D\\u{1F37C}','\\u{1F468}\\u{1F3FB}\\u200D\\u{1F393}','\\u{1F468}\\u{1F3FB}\\u200D\\u{1F3A4}','\\u{1F468}\\u{1F3FB}\\u200D\\u{1F3A8}','\\u{1F468}\\u{1F3FB}\\u200D\\u{1F3EB}','\\u{1F468}\\u{1F3FB}\\u200D\\u{1F3ED}','\\u{1F468}\\u{1F3FB}\\u200D\\u{1F4BB}','\\u{1F468}\\u{1F3FB}\\u200D\\u{1F4BC}','\\u{1F468}\\u{1F3FB}\\u200D\\u{1F527}','\\u{1F468}\\u{1F3FB}\\u200D\\u{1F52C}','\\u{1F468}\\u{1F3FB}\\u200D\\u{1F680}','\\u{1F468}\\u{1F3FB}\\u200D\\u{1F692}','\\u{1F468}\\u{1F3FB}\\u200D\\u{1F9AF}','\\u{1F468}\\u{1F3FB}\\u200D\\u{1F9AF}\\u200D\\u27A1\\uFE0F','\\u{1F468}\\u{1F3FB}\\u200D\\u{1F9BC}','\\u{1F468}\\u{1F3FB}\\u200D\\u{1F9BC}\\u200D\\u27A1\\uFE0F','\\u{1F468}\\u{1F3FB}\\u200D\\u{1F9BD}','\\u{1F468}\\u{1F3FB}\\u200D\\u{1F9BD}\\u200D\\u27A1\\uFE0F','\\u{1F468}\\u{1F3FC}\\u200D\\u2695\\uFE0F','\\u{1F468}\\u{1F3FC}\\u200D\\u2696\\uFE0F','\\u{1F468}\\u{1F3FC}\\u200D\\u2708\\uFE0F','\\u{1F468}\\u{1F3FC}\\u200D\\u{1F33E}','\\u{1F468}\\u{1F3FC}\\u200D\\u{1F373}','\\u{1F468}\\u{1F3FC}\\u200D\\u{1F37C}','\\u{1F468}\\u{1F3FC}\\u200D\\u{1F393}','\\u{1F468}\\u{1F3FC}\\u200D\\u{1F3A4}','\\u{1F468}\\u{1F3FC}\\u200D\\u{1F3A8}','\\u{1F468}\\u{1F3FC}\\u200D\\u{1F3EB}','\\u{1F468}\\u{1F3FC}\\u200D\\u{1F3ED}','\\u{1F468}\\u{1F3FC}\\u200D\\u{1F4BB}','\\u{1F468}\\u{1F3FC}\\u200D\\u{1F4BC}','\\u{1F468}\\u{1F3FC}\\u200D\\u{1F527}','\\u{1F468}\\u{1F3FC}\\u200D\\u{1F52C}','\\u{1F468}\\u{1F3FC}\\u200D\\u{1F680}','\\u{1F468}\\u{1F3FC}\\u200D\\u{1F692}','\\u{1F468}\\u{1F3FC}\\u200D\\u{1F9AF}','\\u{1F468}\\u{1F3FC}\\u200D\\u{1F9AF}\\u200D\\u27A1\\uFE0F','\\u{1F468}\\u{1F3FC}\\u200D\\u{1F9BC}','\\u{1F468}\\u{1F3FC}\\u200D\\u{1F9BC}\\u200D\\u27A1\\uFE0F','\\u{1F468}\\u{1F3FC}\\u200D\\u{1F9BD}','\\u{1F468}\\u{1F3FC}\\u200D\\u{1F9BD}\\u200D\\u27A1\\uFE0F','\\u{1F468}\\u{1F3FD}\\u200D\\u2695\\uFE0F','\\u{1F468}\\u{1F3FD}\\u200D\\u2696\\uFE0F','\\u{1F468}\\u{1F3FD}\\u200D\\u2708\\uFE0F','\\u{1F468}\\u{1F3FD}\\u200D\\u{1F33E}','\\u{1F468}\\u{1F3FD}\\u200D\\u{1F373}','\\u{1F468}\\u{1F3FD}\\u200D\\u{1F37C}','\\u{1F468}\\u{1F3FD}\\u200D\\u{1F393}','\\u{1F468}\\u{1F3FD}\\u200D\\u{1F3A4}','\\u{1F468}\\u{1F3FD}\\u200D\\u{1F3A8}','\\u{1F468}\\u{1F3FD}\\u200D\\u{1F3EB}','\\u{1F468}\\u{1F3FD}\\u200D\\u{1F3ED}','\\u{1F468}\\u{1F3FD}\\u200D\\u{1F4BB}','\\u{1F468}\\u{1F3FD}\\u200D\\u{1F4BC}','\\u{1F468}\\u{1F3FD}\\u200D\\u{1F527}','\\u{1F468}\\u{1F3FD}\\u200D\\u{1F52C}','\\u{1F468}\\u{1F3FD}\\u200D\\u{1F680}','\\u{1F468}\\u{1F3FD}\\u200D\\u{1F692}','\\u{1F468}\\u{1F3FD}\\u200D\\u{1F9AF}','\\u{1F468}\\u{1F3FD}\\u200D\\u{1F9AF}\\u200D\\u27A1\\uFE0F','\\u{1F468}\\u{1F3FD}\\u200D\\u{1F9BC}','\\u{1F468}\\u{1F3FD}\\u200D\\u{1F9BC}\\u200D\\u27A1\\uFE0F','\\u{1F468}\\u{1F3FD}\\u200D\\u{1F9BD}','\\u{1F468}\\u{1F3FD}\\u200D\\u{1F9BD}\\u200D\\u27A1\\uFE0F','\\u{1F468}\\u{1F3FE}\\u200D\\u2695\\uFE0F','\\u{1F468}\\u{1F3FE}\\u200D\\u2696\\uFE0F','\\u{1F468}\\u{1F3FE}\\u200D\\u2708\\uFE0F','\\u{1F468}\\u{1F3FE}\\u200D\\u{1F33E}','\\u{1F468}\\u{1F3FE}\\u200D\\u{1F373}','\\u{1F468}\\u{1F3FE}\\u200D\\u{1F37C}','\\u{1F468}\\u{1F3FE}\\u200D\\u{1F393}','\\u{1F468}\\u{1F3FE}\\u200D\\u{1F3A4}','\\u{1F468}\\u{1F3FE}\\u200D\\u{1F3A8}','\\u{1F468}\\u{1F3FE}\\u200D\\u{1F3EB}','\\u{1F468}\\u{1F3FE}\\u200D\\u{1F3ED}','\\u{1F468}\\u{1F3FE}\\u200D\\u{1F4BB}','\\u{1F468}\\u{1F3FE}\\u200D\\u{1F4BC}','\\u{1F468}\\u{1F3FE}\\u200D\\u{1F527}','\\u{1F468}\\u{1F3FE}\\u200D\\u{1F52C}','\\u{1F468}\\u{1F3FE}\\u200D\\u{1F680}','\\u{1F468}\\u{1F3FE}\\u200D\\u{1F692}','\\u{1F468}\\u{1F3FE}\\u200D\\u{1F9AF}','\\u{1F468}\\u{1F3FE}\\u200D\\u{1F9AF}\\u200D\\u27A1\\uFE0F','\\u{1F468}\\u{1F3FE}\\u200D\\u{1F9BC}','\\u{1F468}\\u{1F3FE}\\u200D\\u{1F9BC}\\u200D\\u27A1\\uFE0F','\\u{1F468}\\u{1F3FE}\\u200D\\u{1F9BD}','\\u{1F468}\\u{1F3FE}\\u200D\\u{1F9BD}\\u200D\\u27A1\\uFE0F','\\u{1F468}\\u{1F3FF}\\u200D\\u2695\\uFE0F','\\u{1F468}\\u{1F3FF}\\u200D\\u2696\\uFE0F','\\u{1F468}\\u{1F3FF}\\u200D\\u2708\\uFE0F','\\u{1F468}\\u{1F3FF}\\u200D\\u{1F33E}','\\u{1F468}\\u{1F3FF}\\u200D\\u{1F373}','\\u{1F468}\\u{1F3FF}\\u200D\\u{1F37C}','\\u{1F468}\\u{1F3FF}\\u200D\\u{1F393}','\\u{1F468}\\u{1F3FF}\\u200D\\u{1F3A4}','\\u{1F468}\\u{1F3FF}\\u200D\\u{1F3A8}','\\u{1F468}\\u{1F3FF}\\u200D\\u{1F3EB}','\\u{1F468}\\u{1F3FF}\\u200D\\u{1F3ED}','\\u{1F468}\\u{1F3FF}\\u200D\\u{1F4BB}','\\u{1F468}\\u{1F3FF}\\u200D\\u{1F4BC}','\\u{1F468}\\u{1F3FF}\\u200D\\u{1F527}','\\u{1F468}\\u{1F3FF}\\u200D\\u{1F52C}','\\u{1F468}\\u{1F3FF}\\u200D\\u{1F680}','\\u{1F468}\\u{1F3FF}\\u200D\\u{1F692}','\\u{1F468}\\u{1F3FF}\\u200D\\u{1F9AF}','\\u{1F468}\\u{1F3FF}\\u200D\\u{1F9AF}\\u200D\\u27A1\\uFE0F','\\u{1F468}\\u{1F3FF}\\u200D\\u{1F9BC}','\\u{1F468}\\u{1F3FF}\\u200D\\u{1F9BC}\\u200D\\u27A1\\uFE0F','\\u{1F468}\\u{1F3FF}\\u200D\\u{1F9BD}','\\u{1F468}\\u{1F3FF}\\u200D\\u{1F9BD}\\u200D\\u27A1\\uFE0F','\\u{1F469}\\u200D\\u2695\\uFE0F','\\u{1F469}\\u200D\\u2696\\uFE0F','\\u{1F469}\\u200D\\u2708\\uFE0F','\\u{1F469}\\u200D\\u{1F33E}','\\u{1F469}\\u200D\\u{1F373}','\\u{1F469}\\u200D\\u{1F37C}','\\u{1F469}\\u200D\\u{1F393}','\\u{1F469}\\u200D\\u{1F3A4}','\\u{1F469}\\u200D\\u{1F3A8}','\\u{1F469}\\u200D\\u{1F3EB}','\\u{1F469}\\u200D\\u{1F3ED}','\\u{1F469}\\u200D\\u{1F4BB}','\\u{1F469}\\u200D\\u{1F4BC}','\\u{1F469}\\u200D\\u{1F527}','\\u{1F469}\\u200D\\u{1F52C}','\\u{1F469}\\u200D\\u{1F680}','\\u{1F469}\\u200D\\u{1F692}','\\u{1F469}\\u200D\\u{1F9AF}','\\u{1F469}\\u200D\\u{1F9AF}\\u200D\\u27A1\\uFE0F','\\u{1F469}\\u200D\\u{1F9BC}','\\u{1F469}\\u200D\\u{1F9BC}\\u200D\\u27A1\\uFE0F','\\u{1F469}\\u200D\\u{1F9BD}','\\u{1F469}\\u200D\\u{1F9BD}\\u200D\\u27A1\\uFE0F','\\u{1F469}\\u{1F3FB}\\u200D\\u2695\\uFE0F','\\u{1F469}\\u{1F3FB}\\u200D\\u2696\\uFE0F','\\u{1F469}\\u{1F3FB}\\u200D\\u2708\\uFE0F','\\u{1F469}\\u{1F3FB}\\u200D\\u{1F33E}','\\u{1F469}\\u{1F3FB}\\u200D\\u{1F373}','\\u{1F469}\\u{1F3FB}\\u200D\\u{1F37C}','\\u{1F469}\\u{1F3FB}\\u200D\\u{1F393}','\\u{1F469}\\u{1F3FB}\\u200D\\u{1F3A4}','\\u{1F469}\\u{1F3FB}\\u200D\\u{1F3A8}','\\u{1F469}\\u{1F3FB}\\u200D\\u{1F3EB}','\\u{1F469}\\u{1F3FB}\\u200D\\u{1F3ED}','\\u{1F469}\\u{1F3FB}\\u200D\\u{1F4BB}','\\u{1F469}\\u{1F3FB}\\u200D\\u{1F4BC}','\\u{1F469}\\u{1F3FB}\\u200D\\u{1F527}','\\u{1F469}\\u{1F3FB}\\u200D\\u{1F52C}','\\u{1F469}\\u{1F3FB}\\u200D\\u{1F680}','\\u{1F469}\\u{1F3FB}\\u200D\\u{1F692}','\\u{1F469}\\u{1F3FB}\\u200D\\u{1F9AF}','\\u{1F469}\\u{1F3FB}\\u200D\\u{1F9AF}\\u200D\\u27A1\\uFE0F','\\u{1F469}\\u{1F3FB}\\u200D\\u{1F9BC}','\\u{1F469}\\u{1F3FB}\\u200D\\u{1F9BC}\\u200D\\u27A1\\uFE0F','\\u{1F469}\\u{1F3FB}\\u200D\\u{1F9BD}','\\u{1F469}\\u{1F3FB}\\u200D\\u{1F9BD}\\u200D\\u27A1\\uFE0F','\\u{1F469}\\u{1F3FC}\\u200D\\u2695\\uFE0F','\\u{1F469}\\u{1F3FC}\\u200D\\u2696\\uFE0F','\\u{1F469}\\u{1F3FC}\\u200D\\u2708\\uFE0F','\\u{1F469}\\u{1F3FC}\\u200D\\u{1F33E}','\\u{1F469}\\u{1F3FC}\\u200D\\u{1F373}','\\u{1F469}\\u{1F3FC}\\u200D\\u{1F37C}','\\u{1F469}\\u{1F3FC}\\u200D\\u{1F393}','\\u{1F469}\\u{1F3FC}\\u200D\\u{1F3A4}','\\u{1F469}\\u{1F3FC}\\u200D\\u{1F3A8}','\\u{1F469}\\u{1F3FC}\\u200D\\u{1F3EB}','\\u{1F469}\\u{1F3FC}\\u200D\\u{1F3ED}','\\u{1F469}\\u{1F3FC}\\u200D\\u{1F4BB}','\\u{1F469}\\u{1F3FC}\\u200D\\u{1F4BC}','\\u{1F469}\\u{1F3FC}\\u200D\\u{1F527}','\\u{1F469}\\u{1F3FC}\\u200D\\u{1F52C}','\\u{1F469}\\u{1F3FC}\\u200D\\u{1F680}','\\u{1F469}\\u{1F3FC}\\u200D\\u{1F692}','\\u{1F469}\\u{1F3FC}\\u200D\\u{1F9AF}','\\u{1F469}\\u{1F3FC}\\u200D\\u{1F9AF}\\u200D\\u27A1\\uFE0F','\\u{1F469}\\u{1F3FC}\\u200D\\u{1F9BC}','\\u{1F469}\\u{1F3FC}\\u200D\\u{1F9BC}\\u200D\\u27A1\\uFE0F','\\u{1F469}\\u{1F3FC}\\u200D\\u{1F9BD}','\\u{1F469}\\u{1F3FC}\\u200D\\u{1F9BD}\\u200D\\u27A1\\uFE0F','\\u{1F469}\\u{1F3FD}\\u200D\\u2695\\uFE0F','\\u{1F469}\\u{1F3FD}\\u200D\\u2696\\uFE0F','\\u{1F469}\\u{1F3FD}\\u200D\\u2708\\uFE0F','\\u{1F469}\\u{1F3FD}\\u200D\\u{1F33E}','\\u{1F469}\\u{1F3FD}\\u200D\\u{1F373}','\\u{1F469}\\u{1F3FD}\\u200D\\u{1F37C}','\\u{1F469}\\u{1F3FD}\\u200D\\u{1F393}','\\u{1F469}\\u{1F3FD}\\u200D\\u{1F3A4}','\\u{1F469}\\u{1F3FD}\\u200D\\u{1F3A8}','\\u{1F469}\\u{1F3FD}\\u200D\\u{1F3EB}','\\u{1F469}\\u{1F3FD}\\u200D\\u{1F3ED}','\\u{1F469}\\u{1F3FD}\\u200D\\u{1F4BB}','\\u{1F469}\\u{1F3FD}\\u200D\\u{1F4BC}','\\u{1F469}\\u{1F3FD}\\u200D\\u{1F527}','\\u{1F469}\\u{1F3FD}\\u200D\\u{1F52C}','\\u{1F469}\\u{1F3FD}\\u200D\\u{1F680}','\\u{1F469}\\u{1F3FD}\\u200D\\u{1F692}','\\u{1F469}\\u{1F3FD}\\u200D\\u{1F9AF}','\\u{1F469}\\u{1F3FD}\\u200D\\u{1F9AF}\\u200D\\u27A1\\uFE0F','\\u{1F469}\\u{1F3FD}\\u200D\\u{1F9BC}','\\u{1F469}\\u{1F3FD}\\u200D\\u{1F9BC}\\u200D\\u27A1\\uFE0F','\\u{1F469}\\u{1F3FD}\\u200D\\u{1F9BD}','\\u{1F469}\\u{1F3FD}\\u200D\\u{1F9BD}\\u200D\\u27A1\\uFE0F','\\u{1F469}\\u{1F3FE}\\u200D\\u2695\\uFE0F','\\u{1F469}\\u{1F3FE}\\u200D\\u2696\\uFE0F','\\u{1F469}\\u{1F3FE}\\u200D\\u2708\\uFE0F','\\u{1F469}\\u{1F3FE}\\u200D\\u{1F33E}','\\u{1F469}\\u{1F3FE}\\u200D\\u{1F373}','\\u{1F469}\\u{1F3FE}\\u200D\\u{1F37C}','\\u{1F469}\\u{1F3FE}\\u200D\\u{1F393}','\\u{1F469}\\u{1F3FE}\\u200D\\u{1F3A4}','\\u{1F469}\\u{1F3FE}\\u200D\\u{1F3A8}','\\u{1F469}\\u{1F3FE}\\u200D\\u{1F3EB}','\\u{1F469}\\u{1F3FE}\\u200D\\u{1F3ED}','\\u{1F469}\\u{1F3FE}\\u200D\\u{1F4BB}','\\u{1F469}\\u{1F3FE}\\u200D\\u{1F4BC}','\\u{1F469}\\u{1F3FE}\\u200D\\u{1F527}','\\u{1F469}\\u{1F3FE}\\u200D\\u{1F52C}','\\u{1F469}\\u{1F3FE}\\u200D\\u{1F680}','\\u{1F469}\\u{1F3FE}\\u200D\\u{1F692}','\\u{1F469}\\u{1F3FE}\\u200D\\u{1F9AF}','\\u{1F469}\\u{1F3FE}\\u200D\\u{1F9AF}\\u200D\\u27A1\\uFE0F','\\u{1F469}\\u{1F3FE}\\u200D\\u{1F9BC}','\\u{1F469}\\u{1F3FE}\\u200D\\u{1F9BC}\\u200D\\u27A1\\uFE0F','\\u{1F469}\\u{1F3FE}\\u200D\\u{1F9BD}','\\u{1F469}\\u{1F3FE}\\u200D\\u{1F9BD}\\u200D\\u27A1\\uFE0F','\\u{1F469}\\u{1F3FF}\\u200D\\u2695\\uFE0F','\\u{1F469}\\u{1F3FF}\\u200D\\u2696\\uFE0F','\\u{1F469}\\u{1F3FF}\\u200D\\u2708\\uFE0F','\\u{1F469}\\u{1F3FF}\\u200D\\u{1F33E}','\\u{1F469}\\u{1F3FF}\\u200D\\u{1F373}','\\u{1F469}\\u{1F3FF}\\u200D\\u{1F37C}','\\u{1F469}\\u{1F3FF}\\u200D\\u{1F393}','\\u{1F469}\\u{1F3FF}\\u200D\\u{1F3A4}','\\u{1F469}\\u{1F3FF}\\u200D\\u{1F3A8}','\\u{1F469}\\u{1F3FF}\\u200D\\u{1F3EB}','\\u{1F469}\\u{1F3FF}\\u200D\\u{1F3ED}','\\u{1F469}\\u{1F3FF}\\u200D\\u{1F4BB}','\\u{1F469}\\u{1F3FF}\\u200D\\u{1F4BC}','\\u{1F469}\\u{1F3FF}\\u200D\\u{1F527}','\\u{1F469}\\u{1F3FF}\\u200D\\u{1F52C}','\\u{1F469}\\u{1F3FF}\\u200D\\u{1F680}','\\u{1F469}\\u{1F3FF}\\u200D\\u{1F692}','\\u{1F469}\\u{1F3FF}\\u200D\\u{1F9AF}','\\u{1F469}\\u{1F3FF}\\u200D\\u{1F9AF}\\u200D\\u27A1\\uFE0F','\\u{1F469}\\u{1F3FF}\\u200D\\u{1F9BC}','\\u{1F469}\\u{1F3FF}\\u200D\\u{1F9BC}\\u200D\\u27A1\\uFE0F','\\u{1F469}\\u{1F3FF}\\u200D\\u{1F9BD}','\\u{1F469}\\u{1F3FF}\\u200D\\u{1F9BD}\\u200D\\u27A1\\uFE0F','\\u{1F6B6}\\u200D\\u27A1\\uFE0F','\\u{1F6B6}\\u{1F3FB}\\u200D\\u27A1\\uFE0F','\\u{1F6B6}\\u{1F3FC}\\u200D\\u27A1\\uFE0F','\\u{1F6B6}\\u{1F3FD}\\u200D\\u27A1\\uFE0F','\\u{1F6B6}\\u{1F3FE}\\u200D\\u27A1\\uFE0F','\\u{1F6B6}\\u{1F3FF}\\u200D\\u27A1\\uFE0F','\\u{1F9CE}\\u200D\\u27A1\\uFE0F','\\u{1F9CE}\\u{1F3FB}\\u200D\\u27A1\\uFE0F','\\u{1F9CE}\\u{1F3FC}\\u200D\\u27A1\\uFE0F','\\u{1F9CE}\\u{1F3FD}\\u200D\\u27A1\\uFE0F','\\u{1F9CE}\\u{1F3FE}\\u200D\\u27A1\\uFE0F','\\u{1F9CE}\\u{1F3FF}\\u200D\\u27A1\\uFE0F','\\u{1F9D1}\\u200D\\u2695\\uFE0F','\\u{1F9D1}\\u200D\\u2696\\uFE0F','\\u{1F9D1}\\u200D\\u2708\\uFE0F','\\u{1F9D1}\\u200D\\u{1F33E}','\\u{1F9D1}\\u200D\\u{1F373}','\\u{1F9D1}\\u200D\\u{1F37C}','\\u{1F9D1}\\u200D\\u{1F384}','\\u{1F9D1}\\u200D\\u{1F393}','\\u{1F9D1}\\u200D\\u{1F3A4}','\\u{1F9D1}\\u200D\\u{1F3A8}','\\u{1F9D1}\\u200D\\u{1F3EB}','\\u{1F9D1}\\u200D\\u{1F3ED}','\\u{1F9D1}\\u200D\\u{1F4BB}','\\u{1F9D1}\\u200D\\u{1F4BC}','\\u{1F9D1}\\u200D\\u{1F527}','\\u{1F9D1}\\u200D\\u{1F52C}','\\u{1F9D1}\\u200D\\u{1F680}','\\u{1F9D1}\\u200D\\u{1F692}','\\u{1F9D1}\\u200D\\u{1F9AF}','\\u{1F9D1}\\u200D\\u{1F9AF}\\u200D\\u27A1\\uFE0F','\\u{1F9D1}\\u200D\\u{1F9BC}','\\u{1F9D1}\\u200D\\u{1F9BC}\\u200D\\u27A1\\uFE0F','\\u{1F9D1}\\u200D\\u{1F9BD}','\\u{1F9D1}\\u200D\\u{1F9BD}\\u200D\\u27A1\\uFE0F','\\u{1F9D1}\\u{1F3FB}\\u200D\\u2695\\uFE0F','\\u{1F9D1}\\u{1F3FB}\\u200D\\u2696\\uFE0F','\\u{1F9D1}\\u{1F3FB}\\u200D\\u2708\\uFE0F','\\u{1F9D1}\\u{1F3FB}\\u200D\\u{1F33E}','\\u{1F9D1}\\u{1F3FB}\\u200D\\u{1F373}','\\u{1F9D1}\\u{1F3FB}\\u200D\\u{1F37C}','\\u{1F9D1}\\u{1F3FB}\\u200D\\u{1F384}','\\u{1F9D1}\\u{1F3FB}\\u200D\\u{1F393}','\\u{1F9D1}\\u{1F3FB}\\u200D\\u{1F3A4}','\\u{1F9D1}\\u{1F3FB}\\u200D\\u{1F3A8}','\\u{1F9D1}\\u{1F3FB}\\u200D\\u{1F3EB}','\\u{1F9D1}\\u{1F3FB}\\u200D\\u{1F3ED}','\\u{1F9D1}\\u{1F3FB}\\u200D\\u{1F4BB}','\\u{1F9D1}\\u{1F3FB}\\u200D\\u{1F4BC}','\\u{1F9D1}\\u{1F3FB}\\u200D\\u{1F527}','\\u{1F9D1}\\u{1F3FB}\\u200D\\u{1F52C}','\\u{1F9D1}\\u{1F3FB}\\u200D\\u{1F680}','\\u{1F9D1}\\u{1F3FB}\\u200D\\u{1F692}','\\u{1F9D1}\\u{1F3FB}\\u200D\\u{1F9AF}','\\u{1F9D1}\\u{1F3FB}\\u200D\\u{1F9AF}\\u200D\\u27A1\\uFE0F','\\u{1F9D1}\\u{1F3FB}\\u200D\\u{1F9BC}','\\u{1F9D1}\\u{1F3FB}\\u200D\\u{1F9BC}\\u200D\\u27A1\\uFE0F','\\u{1F9D1}\\u{1F3FB}\\u200D\\u{1F9BD}','\\u{1F9D1}\\u{1F3FB}\\u200D\\u{1F9BD}\\u200D\\u27A1\\uFE0F','\\u{1F9D1}\\u{1F3FC}\\u200D\\u2695\\uFE0F','\\u{1F9D1}\\u{1F3FC}\\u200D\\u2696\\uFE0F','\\u{1F9D1}\\u{1F3FC}\\u200D\\u2708\\uFE0F','\\u{1F9D1}\\u{1F3FC}\\u200D\\u{1F33E}','\\u{1F9D1}\\u{1F3FC}\\u200D\\u{1F373}','\\u{1F9D1}\\u{1F3FC}\\u200D\\u{1F37C}','\\u{1F9D1}\\u{1F3FC}\\u200D\\u{1F384}','\\u{1F9D1}\\u{1F3FC}\\u200D\\u{1F393}','\\u{1F9D1}\\u{1F3FC}\\u200D\\u{1F3A4}','\\u{1F9D1}\\u{1F3FC}\\u200D\\u{1F3A8}','\\u{1F9D1}\\u{1F3FC}\\u200D\\u{1F3EB}','\\u{1F9D1}\\u{1F3FC}\\u200D\\u{1F3ED}','\\u{1F9D1}\\u{1F3FC}\\u200D\\u{1F4BB}','\\u{1F9D1}\\u{1F3FC}\\u200D\\u{1F4BC}','\\u{1F9D1}\\u{1F3FC}\\u200D\\u{1F527}','\\u{1F9D1}\\u{1F3FC}\\u200D\\u{1F52C}','\\u{1F9D1}\\u{1F3FC}\\u200D\\u{1F680}','\\u{1F9D1}\\u{1F3FC}\\u200D\\u{1F692}','\\u{1F9D1}\\u{1F3FC}\\u200D\\u{1F9AF}','\\u{1F9D1}\\u{1F3FC}\\u200D\\u{1F9AF}\\u200D\\u27A1\\uFE0F','\\u{1F9D1}\\u{1F3FC}\\u200D\\u{1F9BC}','\\u{1F9D1}\\u{1F3FC}\\u200D\\u{1F9BC}\\u200D\\u27A1\\uFE0F','\\u{1F9D1}\\u{1F3FC}\\u200D\\u{1F9BD}','\\u{1F9D1}\\u{1F3FC}\\u200D\\u{1F9BD}\\u200D\\u27A1\\uFE0F','\\u{1F9D1}\\u{1F3FD}\\u200D\\u2695\\uFE0F','\\u{1F9D1}\\u{1F3FD}\\u200D\\u2696\\uFE0F','\\u{1F9D1}\\u{1F3FD}\\u200D\\u2708\\uFE0F','\\u{1F9D1}\\u{1F3FD}\\u200D\\u{1F33E}','\\u{1F9D1}\\u{1F3FD}\\u200D\\u{1F373}','\\u{1F9D1}\\u{1F3FD}\\u200D\\u{1F37C}','\\u{1F9D1}\\u{1F3FD}\\u200D\\u{1F384}','\\u{1F9D1}\\u{1F3FD}\\u200D\\u{1F393}','\\u{1F9D1}\\u{1F3FD}\\u200D\\u{1F3A4}','\\u{1F9D1}\\u{1F3FD}\\u200D\\u{1F3A8}','\\u{1F9D1}\\u{1F3FD}\\u200D\\u{1F3EB}','\\u{1F9D1}\\u{1F3FD}\\u200D\\u{1F3ED}','\\u{1F9D1}\\u{1F3FD}\\u200D\\u{1F4BB}','\\u{1F9D1}\\u{1F3FD}\\u200D\\u{1F4BC}','\\u{1F9D1}\\u{1F3FD}\\u200D\\u{1F527}','\\u{1F9D1}\\u{1F3FD}\\u200D\\u{1F52C}','\\u{1F9D1}\\u{1F3FD}\\u200D\\u{1F680}','\\u{1F9D1}\\u{1F3FD}\\u200D\\u{1F692}','\\u{1F9D1}\\u{1F3FD}\\u200D\\u{1F9AF}','\\u{1F9D1}\\u{1F3FD}\\u200D\\u{1F9AF}\\u200D\\u27A1\\uFE0F','\\u{1F9D1}\\u{1F3FD}\\u200D\\u{1F9BC}','\\u{1F9D1}\\u{1F3FD}\\u200D\\u{1F9BC}\\u200D\\u27A1\\uFE0F','\\u{1F9D1}\\u{1F3FD}\\u200D\\u{1F9BD}','\\u{1F9D1}\\u{1F3FD}\\u200D\\u{1F9BD}\\u200D\\u27A1\\uFE0F','\\u{1F9D1}\\u{1F3FE}\\u200D\\u2695\\uFE0F','\\u{1F9D1}\\u{1F3FE}\\u200D\\u2696\\uFE0F','\\u{1F9D1}\\u{1F3FE}\\u200D\\u2708\\uFE0F','\\u{1F9D1}\\u{1F3FE}\\u200D\\u{1F33E}','\\u{1F9D1}\\u{1F3FE}\\u200D\\u{1F373}','\\u{1F9D1}\\u{1F3FE}\\u200D\\u{1F37C}','\\u{1F9D1}\\u{1F3FE}\\u200D\\u{1F384}','\\u{1F9D1}\\u{1F3FE}\\u200D\\u{1F393}','\\u{1F9D1}\\u{1F3FE}\\u200D\\u{1F3A4}','\\u{1F9D1}\\u{1F3FE}\\u200D\\u{1F3A8}','\\u{1F9D1}\\u{1F3FE}\\u200D\\u{1F3EB}','\\u{1F9D1}\\u{1F3FE}\\u200D\\u{1F3ED}','\\u{1F9D1}\\u{1F3FE}\\u200D\\u{1F4BB}','\\u{1F9D1}\\u{1F3FE}\\u200D\\u{1F4BC}','\\u{1F9D1}\\u{1F3FE}\\u200D\\u{1F527}','\\u{1F9D1}\\u{1F3FE}\\u200D\\u{1F52C}','\\u{1F9D1}\\u{1F3FE}\\u200D\\u{1F680}','\\u{1F9D1}\\u{1F3FE}\\u200D\\u{1F692}','\\u{1F9D1}\\u{1F3FE}\\u200D\\u{1F9AF}','\\u{1F9D1}\\u{1F3FE}\\u200D\\u{1F9AF}\\u200D\\u27A1\\uFE0F','\\u{1F9D1}\\u{1F3FE}\\u200D\\u{1F9BC}','\\u{1F9D1}\\u{1F3FE}\\u200D\\u{1F9BC}\\u200D\\u27A1\\uFE0F','\\u{1F9D1}\\u{1F3FE}\\u200D\\u{1F9BD}','\\u{1F9D1}\\u{1F3FE}\\u200D\\u{1F9BD}\\u200D\\u27A1\\uFE0F','\\u{1F9D1}\\u{1F3FF}\\u200D\\u2695\\uFE0F','\\u{1F9D1}\\u{1F3FF}\\u200D\\u2696\\uFE0F','\\u{1F9D1}\\u{1F3FF}\\u200D\\u2708\\uFE0F','\\u{1F9D1}\\u{1F3FF}\\u200D\\u{1F33E}','\\u{1F9D1}\\u{1F3FF}\\u200D\\u{1F373}','\\u{1F9D1}\\u{1F3FF}\\u200D\\u{1F37C}','\\u{1F9D1}\\u{1F3FF}\\u200D\\u{1F384}','\\u{1F9D1}\\u{1F3FF}\\u200D\\u{1F393}','\\u{1F9D1}\\u{1F3FF}\\u200D\\u{1F3A4}','\\u{1F9D1}\\u{1F3FF}\\u200D\\u{1F3A8}','\\u{1F9D1}\\u{1F3FF}\\u200D\\u{1F3EB}','\\u{1F9D1}\\u{1F3FF}\\u200D\\u{1F3ED}','\\u{1F9D1}\\u{1F3FF}\\u200D\\u{1F4BB}','\\u{1F9D1}\\u{1F3FF}\\u200D\\u{1F4BC}','\\u{1F9D1}\\u{1F3FF}\\u200D\\u{1F527}','\\u{1F9D1}\\u{1F3FF}\\u200D\\u{1F52C}','\\u{1F9D1}\\u{1F3FF}\\u200D\\u{1F680}','\\u{1F9D1}\\u{1F3FF}\\u200D\\u{1F692}','\\u{1F9D1}\\u{1F3FF}\\u200D\\u{1F9AF}','\\u{1F9D1}\\u{1F3FF}\\u200D\\u{1F9AF}\\u200D\\u27A1\\uFE0F','\\u{1F9D1}\\u{1F3FF}\\u200D\\u{1F9BC}','\\u{1F9D1}\\u{1F3FF}\\u200D\\u{1F9BC}\\u200D\\u27A1\\uFE0F','\\u{1F9D1}\\u{1F3FF}\\u200D\\u{1F9BD}','\\u{1F9D1}\\u{1F3FF}\\u200D\\u{1F9BD}\\u200D\\u27A1\\uFE0F','\\u26F9\\u{1F3FB}\\u200D\\u2640\\uFE0F','\\u26F9\\u{1F3FB}\\u200D\\u2642\\uFE0F','\\u26F9\\u{1F3FC}\\u200D\\u2640\\uFE0F','\\u26F9\\u{1F3FC}\\u200D\\u2642\\uFE0F','\\u26F9\\u{1F3FD}\\u200D\\u2640\\uFE0F','\\u26F9\\u{1F3FD}\\u200D\\u2642\\uFE0F','\\u26F9\\u{1F3FE}\\u200D\\u2640\\uFE0F','\\u26F9\\u{1F3FE}\\u200D\\u2642\\uFE0F','\\u26F9\\u{1F3FF}\\u200D\\u2640\\uFE0F','\\u26F9\\u{1F3FF}\\u200D\\u2642\\uFE0F','\\u26F9\\uFE0F\\u200D\\u2640\\uFE0F','\\u26F9\\uFE0F\\u200D\\u2642\\uFE0F','\\u{1F3C3}\\u200D\\u2640\\uFE0F','\\u{1F3C3}\\u200D\\u2640\\uFE0F\\u200D\\u27A1\\uFE0F','\\u{1F3C3}\\u200D\\u2642\\uFE0F','\\u{1F3C3}\\u200D\\u2642\\uFE0F\\u200D\\u27A1\\uFE0F','\\u{1F3C3}\\u{1F3FB}\\u200D\\u2640\\uFE0F','\\u{1F3C3}\\u{1F3FB}\\u200D\\u2640\\uFE0F\\u200D\\u27A1\\uFE0F','\\u{1F3C3}\\u{1F3FB}\\u200D\\u2642\\uFE0F','\\u{1F3C3}\\u{1F3FB}\\u200D\\u2642\\uFE0F\\u200D\\u27A1\\uFE0F','\\u{1F3C3}\\u{1F3FC}\\u200D\\u2640\\uFE0F','\\u{1F3C3}\\u{1F3FC}\\u200D\\u2640\\uFE0F\\u200D\\u27A1\\uFE0F','\\u{1F3C3}\\u{1F3FC}\\u200D\\u2642\\uFE0F','\\u{1F3C3}\\u{1F3FC}\\u200D\\u2642\\uFE0F\\u200D\\u27A1\\uFE0F','\\u{1F3C3}\\u{1F3FD}\\u200D\\u2640\\uFE0F','\\u{1F3C3}\\u{1F3FD}\\u200D\\u2640\\uFE0F\\u200D\\u27A1\\uFE0F','\\u{1F3C3}\\u{1F3FD}\\u200D\\u2642\\uFE0F','\\u{1F3C3}\\u{1F3FD}\\u200D\\u2642\\uFE0F\\u200D\\u27A1\\uFE0F','\\u{1F3C3}\\u{1F3FE}\\u200D\\u2640\\uFE0F','\\u{1F3C3}\\u{1F3FE}\\u200D\\u2640\\uFE0F\\u200D\\u27A1\\uFE0F','\\u{1F3C3}\\u{1F3FE}\\u200D\\u2642\\uFE0F','\\u{1F3C3}\\u{1F3FE}\\u200D\\u2642\\uFE0F\\u200D\\u27A1\\uFE0F','\\u{1F3C3}\\u{1F3FF}\\u200D\\u2640\\uFE0F','\\u{1F3C3}\\u{1F3FF}\\u200D\\u2640\\uFE0F\\u200D\\u27A1\\uFE0F','\\u{1F3C3}\\u{1F3FF}\\u200D\\u2642\\uFE0F','\\u{1F3C3}\\u{1F3FF}\\u200D\\u2642\\uFE0F\\u200D\\u27A1\\uFE0F','\\u{1F3C4}\\u200D\\u2640\\uFE0F','\\u{1F3C4}\\u200D\\u2642\\uFE0F','\\u{1F3C4}\\u{1F3FB}\\u200D\\u2640\\uFE0F','\\u{1F3C4}\\u{1F3FB}\\u200D\\u2642\\uFE0F','\\u{1F3C4}\\u{1F3FC}\\u200D\\u2640\\uFE0F','\\u{1F3C4}\\u{1F3FC}\\u200D\\u2642\\uFE0F','\\u{1F3C4}\\u{1F3FD}\\u200D\\u2640\\uFE0F','\\u{1F3C4}\\u{1F3FD}\\u200D\\u2642\\uFE0F','\\u{1F3C4}\\u{1F3FE}\\u200D\\u2640\\uFE0F','\\u{1F3C4}\\u{1F3FE}\\u200D\\u2642\\uFE0F','\\u{1F3C4}\\u{1F3FF}\\u200D\\u2640\\uFE0F','\\u{1F3C4}\\u{1F3FF}\\u200D\\u2642\\uFE0F','\\u{1F3CA}\\u200D\\u2640\\uFE0F','\\u{1F3CA}\\u200D\\u2642\\uFE0F','\\u{1F3CA}\\u{1F3FB}\\u200D\\u2640\\uFE0F','\\u{1F3CA}\\u{1F3FB}\\u200D\\u2642\\uFE0F','\\u{1F3CA}\\u{1F3FC}\\u200D\\u2640\\uFE0F','\\u{1F3CA}\\u{1F3FC}\\u200D\\u2642\\uFE0F','\\u{1F3CA}\\u{1F3FD}\\u200D\\u2640\\uFE0F','\\u{1F3CA}\\u{1F3FD}\\u200D\\u2642\\uFE0F','\\u{1F3CA}\\u{1F3FE}\\u200D\\u2640\\uFE0F','\\u{1F3CA}\\u{1F3FE}\\u200D\\u2642\\uFE0F','\\u{1F3CA}\\u{1F3FF}\\u200D\\u2640\\uFE0F','\\u{1F3CA}\\u{1F3FF}\\u200D\\u2642\\uFE0F','\\u{1F3CB}\\u{1F3FB}\\u200D\\u2640\\uFE0F','\\u{1F3CB}\\u{1F3FB}\\u200D\\u2642\\uFE0F','\\u{1F3CB}\\u{1F3FC}\\u200D\\u2640\\uFE0F','\\u{1F3CB}\\u{1F3FC}\\u200D\\u2642\\uFE0F','\\u{1F3CB}\\u{1F3FD}\\u200D\\u2640\\uFE0F','\\u{1F3CB}\\u{1F3FD}\\u200D\\u2642\\uFE0F','\\u{1F3CB}\\u{1F3FE}\\u200D\\u2640\\uFE0F','\\u{1F3CB}\\u{1F3FE}\\u200D\\u2642\\uFE0F','\\u{1F3CB}\\u{1F3FF}\\u200D\\u2640\\uFE0F','\\u{1F3CB}\\u{1F3FF}\\u200D\\u2642\\uFE0F','\\u{1F3CB}\\uFE0F\\u200D\\u2640\\uFE0F','\\u{1F3CB}\\uFE0F\\u200D\\u2642\\uFE0F','\\u{1F3CC}\\u{1F3FB}\\u200D\\u2640\\uFE0F','\\u{1F3CC}\\u{1F3FB}\\u200D\\u2642\\uFE0F','\\u{1F3CC}\\u{1F3FC}\\u200D\\u2640\\uFE0F','\\u{1F3CC}\\u{1F3FC}\\u200D\\u2642\\uFE0F','\\u{1F3CC}\\u{1F3FD}\\u200D\\u2640\\uFE0F','\\u{1F3CC}\\u{1F3FD}\\u200D\\u2642\\uFE0F','\\u{1F3CC}\\u{1F3FE}\\u200D\\u2640\\uFE0F','\\u{1F3CC}\\u{1F3FE}\\u200D\\u2642\\uFE0F','\\u{1F3CC}\\u{1F3FF}\\u200D\\u2640\\uFE0F','\\u{1F3CC}\\u{1F3FF}\\u200D\\u2642\\uFE0F','\\u{1F3CC}\\uFE0F\\u200D\\u2640\\uFE0F','\\u{1F3CC}\\uFE0F\\u200D\\u2642\\uFE0F','\\u{1F46E}\\u200D\\u2640\\uFE0F','\\u{1F46E}\\u200D\\u2642\\uFE0F','\\u{1F46E}\\u{1F3FB}\\u200D\\u2640\\uFE0F','\\u{1F46E}\\u{1F3FB}\\u200D\\u2642\\uFE0F','\\u{1F46E}\\u{1F3FC}\\u200D\\u2640\\uFE0F','\\u{1F46E}\\u{1F3FC}\\u200D\\u2642\\uFE0F','\\u{1F46E}\\u{1F3FD}\\u200D\\u2640\\uFE0F','\\u{1F46E}\\u{1F3FD}\\u200D\\u2642\\uFE0F','\\u{1F46E}\\u{1F3FE}\\u200D\\u2640\\uFE0F','\\u{1F46E}\\u{1F3FE}\\u200D\\u2642\\uFE0F','\\u{1F46E}\\u{1F3FF}\\u200D\\u2640\\uFE0F','\\u{1F46E}\\u{1F3FF}\\u200D\\u2642\\uFE0F','\\u{1F46F}\\u200D\\u2640\\uFE0F','\\u{1F46F}\\u200D\\u2642\\uFE0F','\\u{1F470}\\u200D\\u2640\\uFE0F','\\u{1F470}\\u200D\\u2642\\uFE0F','\\u{1F470}\\u{1F3FB}\\u200D\\u2640\\uFE0F','\\u{1F470}\\u{1F3FB}\\u200D\\u2642\\uFE0F','\\u{1F470}\\u{1F3FC}\\u200D\\u2640\\uFE0F','\\u{1F470}\\u{1F3FC}\\u200D\\u2642\\uFE0F','\\u{1F470}\\u{1F3FD}\\u200D\\u2640\\uFE0F','\\u{1F470}\\u{1F3FD}\\u200D\\u2642\\uFE0F','\\u{1F470}\\u{1F3FE}\\u200D\\u2640\\uFE0F','\\u{1F470}\\u{1F3FE}\\u200D\\u2642\\uFE0F','\\u{1F470}\\u{1F3FF}\\u200D\\u2640\\uFE0F','\\u{1F470}\\u{1F3FF}\\u200D\\u2642\\uFE0F','\\u{1F471}\\u200D\\u2640\\uFE0F','\\u{1F471}\\u200D\\u2642\\uFE0F','\\u{1F471}\\u{1F3FB}\\u200D\\u2640\\uFE0F','\\u{1F471}\\u{1F3FB}\\u200D\\u2642\\uFE0F','\\u{1F471}\\u{1F3FC}\\u200D\\u2640\\uFE0F','\\u{1F471}\\u{1F3FC}\\u200D\\u2642\\uFE0F','\\u{1F471}\\u{1F3FD}\\u200D\\u2640\\uFE0F','\\u{1F471}\\u{1F3FD}\\u200D\\u2642\\uFE0F','\\u{1F471}\\u{1F3FE}\\u200D\\u2640\\uFE0F','\\u{1F471}\\u{1F3FE}\\u200D\\u2642\\uFE0F','\\u{1F471}\\u{1F3FF}\\u200D\\u2640\\uFE0F','\\u{1F471}\\u{1F3FF}\\u200D\\u2642\\uFE0F','\\u{1F473}\\u200D\\u2640\\uFE0F','\\u{1F473}\\u200D\\u2642\\uFE0F','\\u{1F473}\\u{1F3FB}\\u200D\\u2640\\uFE0F','\\u{1F473}\\u{1F3FB}\\u200D\\u2642\\uFE0F','\\u{1F473}\\u{1F3FC}\\u200D\\u2640\\uFE0F','\\u{1F473}\\u{1F3FC}\\u200D\\u2642\\uFE0F','\\u{1F473}\\u{1F3FD}\\u200D\\u2640\\uFE0F','\\u{1F473}\\u{1F3FD}\\u200D\\u2642\\uFE0F','\\u{1F473}\\u{1F3FE}\\u200D\\u2640\\uFE0F','\\u{1F473}\\u{1F3FE}\\u200D\\u2642\\uFE0F','\\u{1F473}\\u{1F3FF}\\u200D\\u2640\\uFE0F','\\u{1F473}\\u{1F3FF}\\u200D\\u2642\\uFE0F','\\u{1F477}\\u200D\\u2640\\uFE0F','\\u{1F477}\\u200D\\u2642\\uFE0F','\\u{1F477}\\u{1F3FB}\\u200D\\u2640\\uFE0F','\\u{1F477}\\u{1F3FB}\\u200D\\u2642\\uFE0F','\\u{1F477}\\u{1F3FC}\\u200D\\u2640\\uFE0F','\\u{1F477}\\u{1F3FC}\\u200D\\u2642\\uFE0F','\\u{1F477}\\u{1F3FD}\\u200D\\u2640\\uFE0F','\\u{1F477}\\u{1F3FD}\\u200D\\u2642\\uFE0F','\\u{1F477}\\u{1F3FE}\\u200D\\u2640\\uFE0F','\\u{1F477}\\u{1F3FE}\\u200D\\u2642\\uFE0F','\\u{1F477}\\u{1F3FF}\\u200D\\u2640\\uFE0F','\\u{1F477}\\u{1F3FF}\\u200D\\u2642\\uFE0F','\\u{1F481}\\u200D\\u2640\\uFE0F','\\u{1F481}\\u200D\\u2642\\uFE0F','\\u{1F481}\\u{1F3FB}\\u200D\\u2640\\uFE0F','\\u{1F481}\\u{1F3FB}\\u200D\\u2642\\uFE0F','\\u{1F481}\\u{1F3FC}\\u200D\\u2640\\uFE0F','\\u{1F481}\\u{1F3FC}\\u200D\\u2642\\uFE0F','\\u{1F481}\\u{1F3FD}\\u200D\\u2640\\uFE0F','\\u{1F481}\\u{1F3FD}\\u200D\\u2642\\uFE0F','\\u{1F481}\\u{1F3FE}\\u200D\\u2640\\uFE0F','\\u{1F481}\\u{1F3FE}\\u200D\\u2642\\uFE0F','\\u{1F481}\\u{1F3FF}\\u200D\\u2640\\uFE0F','\\u{1F481}\\u{1F3FF}\\u200D\\u2642\\uFE0F','\\u{1F482}\\u200D\\u2640\\uFE0F','\\u{1F482}\\u200D\\u2642\\uFE0F','\\u{1F482}\\u{1F3FB}\\u200D\\u2640\\uFE0F','\\u{1F482}\\u{1F3FB}\\u200D\\u2642\\uFE0F','\\u{1F482}\\u{1F3FC}\\u200D\\u2640\\uFE0F','\\u{1F482}\\u{1F3FC}\\u200D\\u2642\\uFE0F','\\u{1F482}\\u{1F3FD}\\u200D\\u2640\\uFE0F','\\u{1F482}\\u{1F3FD}\\u200D\\u2642\\uFE0F','\\u{1F482}\\u{1F3FE}\\u200D\\u2640\\uFE0F','\\u{1F482}\\u{1F3FE}\\u200D\\u2642\\uFE0F','\\u{1F482}\\u{1F3FF}\\u200D\\u2640\\uFE0F','\\u{1F482}\\u{1F3FF}\\u200D\\u2642\\uFE0F','\\u{1F486}\\u200D\\u2640\\uFE0F','\\u{1F486}\\u200D\\u2642\\uFE0F','\\u{1F486}\\u{1F3FB}\\u200D\\u2640\\uFE0F','\\u{1F486}\\u{1F3FB}\\u200D\\u2642\\uFE0F','\\u{1F486}\\u{1F3FC}\\u200D\\u2640\\uFE0F','\\u{1F486}\\u{1F3FC}\\u200D\\u2642\\uFE0F','\\u{1F486}\\u{1F3FD}\\u200D\\u2640\\uFE0F','\\u{1F486}\\u{1F3FD}\\u200D\\u2642\\uFE0F','\\u{1F486}\\u{1F3FE}\\u200D\\u2640\\uFE0F','\\u{1F486}\\u{1F3FE}\\u200D\\u2642\\uFE0F','\\u{1F486}\\u{1F3FF}\\u200D\\u2640\\uFE0F','\\u{1F486}\\u{1F3FF}\\u200D\\u2642\\uFE0F','\\u{1F487}\\u200D\\u2640\\uFE0F','\\u{1F487}\\u200D\\u2642\\uFE0F','\\u{1F487}\\u{1F3FB}\\u200D\\u2640\\uFE0F','\\u{1F487}\\u{1F3FB}\\u200D\\u2642\\uFE0F','\\u{1F487}\\u{1F3FC}\\u200D\\u2640\\uFE0F','\\u{1F487}\\u{1F3FC}\\u200D\\u2642\\uFE0F','\\u{1F487}\\u{1F3FD}\\u200D\\u2640\\uFE0F','\\u{1F487}\\u{1F3FD}\\u200D\\u2642\\uFE0F','\\u{1F487}\\u{1F3FE}\\u200D\\u2640\\uFE0F','\\u{1F487}\\u{1F3FE}\\u200D\\u2642\\uFE0F','\\u{1F487}\\u{1F3FF}\\u200D\\u2640\\uFE0F','\\u{1F487}\\u{1F3FF}\\u200D\\u2642\\uFE0F','\\u{1F575}\\u{1F3FB}\\u200D\\u2640\\uFE0F','\\u{1F575}\\u{1F3FB}\\u200D\\u2642\\uFE0F','\\u{1F575}\\u{1F3FC}\\u200D\\u2640\\uFE0F','\\u{1F575}\\u{1F3FC}\\u200D\\u2642\\uFE0F','\\u{1F575}\\u{1F3FD}\\u200D\\u2640\\uFE0F','\\u{1F575}\\u{1F3FD}\\u200D\\u2642\\uFE0F','\\u{1F575}\\u{1F3FE}\\u200D\\u2640\\uFE0F','\\u{1F575}\\u{1F3FE}\\u200D\\u2642\\uFE0F','\\u{1F575}\\u{1F3FF}\\u200D\\u2640\\uFE0F','\\u{1F575}\\u{1F3FF}\\u200D\\u2642\\uFE0F','\\u{1F575}\\uFE0F\\u200D\\u2640\\uFE0F','\\u{1F575}\\uFE0F\\u200D\\u2642\\uFE0F','\\u{1F645}\\u200D\\u2640\\uFE0F','\\u{1F645}\\u200D\\u2642\\uFE0F','\\u{1F645}\\u{1F3FB}\\u200D\\u2640\\uFE0F','\\u{1F645}\\u{1F3FB}\\u200D\\u2642\\uFE0F','\\u{1F645}\\u{1F3FC}\\u200D\\u2640\\uFE0F','\\u{1F645}\\u{1F3FC}\\u200D\\u2642\\uFE0F','\\u{1F645}\\u{1F3FD}\\u200D\\u2640\\uFE0F','\\u{1F645}\\u{1F3FD}\\u200D\\u2642\\uFE0F','\\u{1F645}\\u{1F3FE}\\u200D\\u2640\\uFE0F','\\u{1F645}\\u{1F3FE}\\u200D\\u2642\\uFE0F','\\u{1F645}\\u{1F3FF}\\u200D\\u2640\\uFE0F','\\u{1F645}\\u{1F3FF}\\u200D\\u2642\\uFE0F','\\u{1F646}\\u200D\\u2640\\uFE0F','\\u{1F646}\\u200D\\u2642\\uFE0F','\\u{1F646}\\u{1F3FB}\\u200D\\u2640\\uFE0F','\\u{1F646}\\u{1F3FB}\\u200D\\u2642\\uFE0F','\\u{1F646}\\u{1F3FC}\\u200D\\u2640\\uFE0F','\\u{1F646}\\u{1F3FC}\\u200D\\u2642\\uFE0F','\\u{1F646}\\u{1F3FD}\\u200D\\u2640\\uFE0F','\\u{1F646}\\u{1F3FD}\\u200D\\u2642\\uFE0F','\\u{1F646}\\u{1F3FE}\\u200D\\u2640\\uFE0F','\\u{1F646}\\u{1F3FE}\\u200D\\u2642\\uFE0F','\\u{1F646}\\u{1F3FF}\\u200D\\u2640\\uFE0F','\\u{1F646}\\u{1F3FF}\\u200D\\u2642\\uFE0F','\\u{1F647}\\u200D\\u2640\\uFE0F','\\u{1F647}\\u200D\\u2642\\uFE0F','\\u{1F647}\\u{1F3FB}\\u200D\\u2640\\uFE0F','\\u{1F647}\\u{1F3FB}\\u200D\\u2642\\uFE0F','\\u{1F647}\\u{1F3FC}\\u200D\\u2640\\uFE0F','\\u{1F647}\\u{1F3FC}\\u200D\\u2642\\uFE0F','\\u{1F647}\\u{1F3FD}\\u200D\\u2640\\uFE0F','\\u{1F647}\\u{1F3FD}\\u200D\\u2642\\uFE0F','\\u{1F647}\\u{1F3FE}\\u200D\\u2640\\uFE0F','\\u{1F647}\\u{1F3FE}\\u200D\\u2642\\uFE0F','\\u{1F647}\\u{1F3FF}\\u200D\\u2640\\uFE0F','\\u{1F647}\\u{1F3FF}\\u200D\\u2642\\uFE0F','\\u{1F64B}\\u200D\\u2640\\uFE0F','\\u{1F64B}\\u200D\\u2642\\uFE0F','\\u{1F64B}\\u{1F3FB}\\u200D\\u2640\\uFE0F','\\u{1F64B}\\u{1F3FB}\\u200D\\u2642\\uFE0F','\\u{1F64B}\\u{1F3FC}\\u200D\\u2640\\uFE0F','\\u{1F64B}\\u{1F3FC}\\u200D\\u2642\\uFE0F','\\u{1F64B}\\u{1F3FD}\\u200D\\u2640\\uFE0F','\\u{1F64B}\\u{1F3FD}\\u200D\\u2642\\uFE0F','\\u{1F64B}\\u{1F3FE}\\u200D\\u2640\\uFE0F','\\u{1F64B}\\u{1F3FE}\\u200D\\u2642\\uFE0F','\\u{1F64B}\\u{1F3FF}\\u200D\\u2640\\uFE0F','\\u{1F64B}\\u{1F3FF}\\u200D\\u2642\\uFE0F','\\u{1F64D}\\u200D\\u2640\\uFE0F','\\u{1F64D}\\u200D\\u2642\\uFE0F','\\u{1F64D}\\u{1F3FB}\\u200D\\u2640\\uFE0F','\\u{1F64D}\\u{1F3FB}\\u200D\\u2642\\uFE0F','\\u{1F64D}\\u{1F3FC}\\u200D\\u2640\\uFE0F','\\u{1F64D}\\u{1F3FC}\\u200D\\u2642\\uFE0F','\\u{1F64D}\\u{1F3FD}\\u200D\\u2640\\uFE0F','\\u{1F64D}\\u{1F3FD}\\u200D\\u2642\\uFE0F','\\u{1F64D}\\u{1F3FE}\\u200D\\u2640\\uFE0F','\\u{1F64D}\\u{1F3FE}\\u200D\\u2642\\uFE0F','\\u{1F64D}\\u{1F3FF}\\u200D\\u2640\\uFE0F','\\u{1F64D}\\u{1F3FF}\\u200D\\u2642\\uFE0F','\\u{1F64E}\\u200D\\u2640\\uFE0F','\\u{1F64E}\\u200D\\u2642\\uFE0F','\\u{1F64E}\\u{1F3FB}\\u200D\\u2640\\uFE0F','\\u{1F64E}\\u{1F3FB}\\u200D\\u2642\\uFE0F','\\u{1F64E}\\u{1F3FC}\\u200D\\u2640\\uFE0F','\\u{1F64E}\\u{1F3FC}\\u200D\\u2642\\uFE0F','\\u{1F64E}\\u{1F3FD}\\u200D\\u2640\\uFE0F','\\u{1F64E}\\u{1F3FD}\\u200D\\u2642\\uFE0F','\\u{1F64E}\\u{1F3FE}\\u200D\\u2640\\uFE0F','\\u{1F64E}\\u{1F3FE}\\u200D\\u2642\\uFE0F','\\u{1F64E}\\u{1F3FF}\\u200D\\u2640\\uFE0F','\\u{1F64E}\\u{1F3FF}\\u200D\\u2642\\uFE0F','\\u{1F6A3}\\u200D\\u2640\\uFE0F','\\u{1F6A3}\\u200D\\u2642\\uFE0F','\\u{1F6A3}\\u{1F3FB}\\u200D\\u2640\\uFE0F','\\u{1F6A3}\\u{1F3FB}\\u200D\\u2642\\uFE0F','\\u{1F6A3}\\u{1F3FC}\\u200D\\u2640\\uFE0F','\\u{1F6A3}\\u{1F3FC}\\u200D\\u2642\\uFE0F','\\u{1F6A3}\\u{1F3FD}\\u200D\\u2640\\uFE0F','\\u{1F6A3}\\u{1F3FD}\\u200D\\u2642\\uFE0F','\\u{1F6A3}\\u{1F3FE}\\u200D\\u2640\\uFE0F','\\u{1F6A3}\\u{1F3FE}\\u200D\\u2642\\uFE0F','\\u{1F6A3}\\u{1F3FF}\\u200D\\u2640\\uFE0F','\\u{1F6A3}\\u{1F3FF}\\u200D\\u2642\\uFE0F','\\u{1F6B4}\\u200D\\u2640\\uFE0F','\\u{1F6B4}\\u200D\\u2642\\uFE0F','\\u{1F6B4}\\u{1F3FB}\\u200D\\u2640\\uFE0F','\\u{1F6B4}\\u{1F3FB}\\u200D\\u2642\\uFE0F','\\u{1F6B4}\\u{1F3FC}\\u200D\\u2640\\uFE0F','\\u{1F6B4}\\u{1F3FC}\\u200D\\u2642\\uFE0F','\\u{1F6B4}\\u{1F3FD}\\u200D\\u2640\\uFE0F','\\u{1F6B4}\\u{1F3FD}\\u200D\\u2642\\uFE0F','\\u{1F6B4}\\u{1F3FE}\\u200D\\u2640\\uFE0F','\\u{1F6B4}\\u{1F3FE}\\u200D\\u2642\\uFE0F','\\u{1F6B4}\\u{1F3FF}\\u200D\\u2640\\uFE0F','\\u{1F6B4}\\u{1F3FF}\\u200D\\u2642\\uFE0F','\\u{1F6B5}\\u200D\\u2640\\uFE0F','\\u{1F6B5}\\u200D\\u2642\\uFE0F','\\u{1F6B5}\\u{1F3FB}\\u200D\\u2640\\uFE0F','\\u{1F6B5}\\u{1F3FB}\\u200D\\u2642\\uFE0F','\\u{1F6B5}\\u{1F3FC}\\u200D\\u2640\\uFE0F','\\u{1F6B5}\\u{1F3FC}\\u200D\\u2642\\uFE0F','\\u{1F6B5}\\u{1F3FD}\\u200D\\u2640\\uFE0F','\\u{1F6B5}\\u{1F3FD}\\u200D\\u2642\\uFE0F','\\u{1F6B5}\\u{1F3FE}\\u200D\\u2640\\uFE0F','\\u{1F6B5}\\u{1F3FE}\\u200D\\u2642\\uFE0F','\\u{1F6B5}\\u{1F3FF}\\u200D\\u2640\\uFE0F','\\u{1F6B5}\\u{1F3FF}\\u200D\\u2642\\uFE0F','\\u{1F6B6}\\u200D\\u2640\\uFE0F','\\u{1F6B6}\\u200D\\u2640\\uFE0F\\u200D\\u27A1\\uFE0F','\\u{1F6B6}\\u200D\\u2642\\uFE0F','\\u{1F6B6}\\u200D\\u2642\\uFE0F\\u200D\\u27A1\\uFE0F','\\u{1F6B6}\\u{1F3FB}\\u200D\\u2640\\uFE0F','\\u{1F6B6}\\u{1F3FB}\\u200D\\u2640\\uFE0F\\u200D\\u27A1\\uFE0F','\\u{1F6B6}\\u{1F3FB}\\u200D\\u2642\\uFE0F','\\u{1F6B6}\\u{1F3FB}\\u200D\\u2642\\uFE0F\\u200D\\u27A1\\uFE0F','\\u{1F6B6}\\u{1F3FC}\\u200D\\u2640\\uFE0F','\\u{1F6B6}\\u{1F3FC}\\u200D\\u2640\\uFE0F\\u200D\\u27A1\\uFE0F','\\u{1F6B6}\\u{1F3FC}\\u200D\\u2642\\uFE0F','\\u{1F6B6}\\u{1F3FC}\\u200D\\u2642\\uFE0F\\u200D\\u27A1\\uFE0F','\\u{1F6B6}\\u{1F3FD}\\u200D\\u2640\\uFE0F','\\u{1F6B6}\\u{1F3FD}\\u200D\\u2640\\uFE0F\\u200D\\u27A1\\uFE0F','\\u{1F6B6}\\u{1F3FD}\\u200D\\u2642\\uFE0F','\\u{1F6B6}\\u{1F3FD}\\u200D\\u2642\\uFE0F\\u200D\\u27A1\\uFE0F','\\u{1F6B6}\\u{1F3FE}\\u200D\\u2640\\uFE0F','\\u{1F6B6}\\u{1F3FE}\\u200D\\u2640\\uFE0F\\u200D\\u27A1\\uFE0F','\\u{1F6B6}\\u{1F3FE}\\u200D\\u2642\\uFE0F','\\u{1F6B6}\\u{1F3FE}\\u200D\\u2642\\uFE0F\\u200D\\u27A1\\uFE0F','\\u{1F6B6}\\u{1F3FF}\\u200D\\u2640\\uFE0F','\\u{1F6B6}\\u{1F3FF}\\u200D\\u2640\\uFE0F\\u200D\\u27A1\\uFE0F','\\u{1F6B6}\\u{1F3FF}\\u200D\\u2642\\uFE0F','\\u{1F6B6}\\u{1F3FF}\\u200D\\u2642\\uFE0F\\u200D\\u27A1\\uFE0F','\\u{1F926}\\u200D\\u2640\\uFE0F','\\u{1F926}\\u200D\\u2642\\uFE0F','\\u{1F926}\\u{1F3FB}\\u200D\\u2640\\uFE0F','\\u{1F926}\\u{1F3FB}\\u200D\\u2642\\uFE0F','\\u{1F926}\\u{1F3FC}\\u200D\\u2640\\uFE0F','\\u{1F926}\\u{1F3FC}\\u200D\\u2642\\uFE0F','\\u{1F926}\\u{1F3FD}\\u200D\\u2640\\uFE0F','\\u{1F926}\\u{1F3FD}\\u200D\\u2642\\uFE0F','\\u{1F926}\\u{1F3FE}\\u200D\\u2640\\uFE0F','\\u{1F926}\\u{1F3FE}\\u200D\\u2642\\uFE0F','\\u{1F926}\\u{1F3FF}\\u200D\\u2640\\uFE0F','\\u{1F926}\\u{1F3FF}\\u200D\\u2642\\uFE0F','\\u{1F935}\\u200D\\u2640\\uFE0F','\\u{1F935}\\u200D\\u2642\\uFE0F','\\u{1F935}\\u{1F3FB}\\u200D\\u2640\\uFE0F','\\u{1F935}\\u{1F3FB}\\u200D\\u2642\\uFE0F','\\u{1F935}\\u{1F3FC}\\u200D\\u2640\\uFE0F','\\u{1F935}\\u{1F3FC}\\u200D\\u2642\\uFE0F','\\u{1F935}\\u{1F3FD}\\u200D\\u2640\\uFE0F','\\u{1F935}\\u{1F3FD}\\u200D\\u2642\\uFE0F','\\u{1F935}\\u{1F3FE}\\u200D\\u2640\\uFE0F','\\u{1F935}\\u{1F3FE}\\u200D\\u2642\\uFE0F','\\u{1F935}\\u{1F3FF}\\u200D\\u2640\\uFE0F','\\u{1F935}\\u{1F3FF}\\u200D\\u2642\\uFE0F','\\u{1F937}\\u200D\\u2640\\uFE0F','\\u{1F937}\\u200D\\u2642\\uFE0F','\\u{1F937}\\u{1F3FB}\\u200D\\u2640\\uFE0F','\\u{1F937}\\u{1F3FB}\\u200D\\u2642\\uFE0F','\\u{1F937}\\u{1F3FC}\\u200D\\u2640\\uFE0F','\\u{1F937}\\u{1F3FC}\\u200D\\u2642\\uFE0F','\\u{1F937}\\u{1F3FD}\\u200D\\u2640\\uFE0F','\\u{1F937}\\u{1F3FD}\\u200D\\u2642\\uFE0F','\\u{1F937}\\u{1F3FE}\\u200D\\u2640\\uFE0F','\\u{1F937}\\u{1F3FE}\\u200D\\u2642\\uFE0F','\\u{1F937}\\u{1F3FF}\\u200D\\u2640\\uFE0F','\\u{1F937}\\u{1F3FF}\\u200D\\u2642\\uFE0F','\\u{1F938}\\u200D\\u2640\\uFE0F','\\u{1F938}\\u200D\\u2642\\uFE0F','\\u{1F938}\\u{1F3FB}\\u200D\\u2640\\uFE0F','\\u{1F938}\\u{1F3FB}\\u200D\\u2642\\uFE0F','\\u{1F938}\\u{1F3FC}\\u200D\\u2640\\uFE0F','\\u{1F938}\\u{1F3FC}\\u200D\\u2642\\uFE0F','\\u{1F938}\\u{1F3FD}\\u200D\\u2640\\uFE0F','\\u{1F938}\\u{1F3FD}\\u200D\\u2642\\uFE0F','\\u{1F938}\\u{1F3FE}\\u200D\\u2640\\uFE0F','\\u{1F938}\\u{1F3FE}\\u200D\\u2642\\uFE0F','\\u{1F938}\\u{1F3FF}\\u200D\\u2640\\uFE0F','\\u{1F938}\\u{1F3FF}\\u200D\\u2642\\uFE0F','\\u{1F939}\\u200D\\u2640\\uFE0F','\\u{1F939}\\u200D\\u2642\\uFE0F','\\u{1F939}\\u{1F3FB}\\u200D\\u2640\\uFE0F','\\u{1F939}\\u{1F3FB}\\u200D\\u2642\\uFE0F','\\u{1F939}\\u{1F3FC}\\u200D\\u2640\\uFE0F','\\u{1F939}\\u{1F3FC}\\u200D\\u2642\\uFE0F','\\u{1F939}\\u{1F3FD}\\u200D\\u2640\\uFE0F','\\u{1F939}\\u{1F3FD}\\u200D\\u2642\\uFE0F','\\u{1F939}\\u{1F3FE}\\u200D\\u2640\\uFE0F','\\u{1F939}\\u{1F3FE}\\u200D\\u2642\\uFE0F','\\u{1F939}\\u{1F3FF}\\u200D\\u2640\\uFE0F','\\u{1F939}\\u{1F3FF}\\u200D\\u2642\\uFE0F','\\u{1F93C}\\u200D\\u2640\\uFE0F','\\u{1F93C}\\u200D\\u2642\\uFE0F','\\u{1F93D}\\u200D\\u2640\\uFE0F','\\u{1F93D}\\u200D\\u2642\\uFE0F','\\u{1F93D}\\u{1F3FB}\\u200D\\u2640\\uFE0F','\\u{1F93D}\\u{1F3FB}\\u200D\\u2642\\uFE0F','\\u{1F93D}\\u{1F3FC}\\u200D\\u2640\\uFE0F','\\u{1F93D}\\u{1F3FC}\\u200D\\u2642\\uFE0F','\\u{1F93D}\\u{1F3FD}\\u200D\\u2640\\uFE0F','\\u{1F93D}\\u{1F3FD}\\u200D\\u2642\\uFE0F','\\u{1F93D}\\u{1F3FE}\\u200D\\u2640\\uFE0F','\\u{1F93D}\\u{1F3FE}\\u200D\\u2642\\uFE0F','\\u{1F93D}\\u{1F3FF}\\u200D\\u2640\\uFE0F','\\u{1F93D}\\u{1F3FF}\\u200D\\u2642\\uFE0F','\\u{1F93E}\\u200D\\u2640\\uFE0F','\\u{1F93E}\\u200D\\u2642\\uFE0F','\\u{1F93E}\\u{1F3FB}\\u200D\\u2640\\uFE0F','\\u{1F93E}\\u{1F3FB}\\u200D\\u2642\\uFE0F','\\u{1F93E}\\u{1F3FC}\\u200D\\u2640\\uFE0F','\\u{1F93E}\\u{1F3FC}\\u200D\\u2642\\uFE0F','\\u{1F93E}\\u{1F3FD}\\u200D\\u2640\\uFE0F','\\u{1F93E}\\u{1F3FD}\\u200D\\u2642\\uFE0F','\\u{1F93E}\\u{1F3FE}\\u200D\\u2640\\uFE0F','\\u{1F93E}\\u{1F3FE}\\u200D\\u2642\\uFE0F','\\u{1F93E}\\u{1F3FF}\\u200D\\u2640\\uFE0F','\\u{1F93E}\\u{1F3FF}\\u200D\\u2642\\uFE0F','\\u{1F9B8}\\u200D\\u2640\\uFE0F','\\u{1F9B8}\\u200D\\u2642\\uFE0F','\\u{1F9B8}\\u{1F3FB}\\u200D\\u2640\\uFE0F','\\u{1F9B8}\\u{1F3FB}\\u200D\\u2642\\uFE0F','\\u{1F9B8}\\u{1F3FC}\\u200D\\u2640\\uFE0F','\\u{1F9B8}\\u{1F3FC}\\u200D\\u2642\\uFE0F','\\u{1F9B8}\\u{1F3FD}\\u200D\\u2640\\uFE0F','\\u{1F9B8}\\u{1F3FD}\\u200D\\u2642\\uFE0F','\\u{1F9B8}\\u{1F3FE}\\u200D\\u2640\\uFE0F','\\u{1F9B8}\\u{1F3FE}\\u200D\\u2642\\uFE0F','\\u{1F9B8}\\u{1F3FF}\\u200D\\u2640\\uFE0F','\\u{1F9B8}\\u{1F3FF}\\u200D\\u2642\\uFE0F','\\u{1F9B9}\\u200D\\u2640\\uFE0F','\\u{1F9B9}\\u200D\\u2642\\uFE0F','\\u{1F9B9}\\u{1F3FB}\\u200D\\u2640\\uFE0F','\\u{1F9B9}\\u{1F3FB}\\u200D\\u2642\\uFE0F','\\u{1F9B9}\\u{1F3FC}\\u200D\\u2640\\uFE0F','\\u{1F9B9}\\u{1F3FC}\\u200D\\u2642\\uFE0F','\\u{1F9B9}\\u{1F3FD}\\u200D\\u2640\\uFE0F','\\u{1F9B9}\\u{1F3FD}\\u200D\\u2642\\uFE0F','\\u{1F9B9}\\u{1F3FE}\\u200D\\u2640\\uFE0F','\\u{1F9B9}\\u{1F3FE}\\u200D\\u2642\\uFE0F','\\u{1F9B9}\\u{1F3FF}\\u200D\\u2640\\uFE0F','\\u{1F9B9}\\u{1F3FF}\\u200D\\u2642\\uFE0F','\\u{1F9CD}\\u200D\\u2640\\uFE0F','\\u{1F9CD}\\u200D\\u2642\\uFE0F','\\u{1F9CD}\\u{1F3FB}\\u200D\\u2640\\uFE0F','\\u{1F9CD}\\u{1F3FB}\\u200D\\u2642\\uFE0F','\\u{1F9CD}\\u{1F3FC}\\u200D\\u2640\\uFE0F','\\u{1F9CD}\\u{1F3FC}\\u200D\\u2642\\uFE0F','\\u{1F9CD}\\u{1F3FD}\\u200D\\u2640\\uFE0F','\\u{1F9CD}\\u{1F3FD}\\u200D\\u2642\\uFE0F','\\u{1F9CD}\\u{1F3FE}\\u200D\\u2640\\uFE0F','\\u{1F9CD}\\u{1F3FE}\\u200D\\u2642\\uFE0F','\\u{1F9CD}\\u{1F3FF}\\u200D\\u2640\\uFE0F','\\u{1F9CD}\\u{1F3FF}\\u200D\\u2642\\uFE0F','\\u{1F9CE}\\u200D\\u2640\\uFE0F','\\u{1F9CE}\\u200D\\u2640\\uFE0F\\u200D\\u27A1\\uFE0F','\\u{1F9CE}\\u200D\\u2642\\uFE0F','\\u{1F9CE}\\u200D\\u2642\\uFE0F\\u200D\\u27A1\\uFE0F','\\u{1F9CE}\\u{1F3FB}\\u200D\\u2640\\uFE0F','\\u{1F9CE}\\u{1F3FB}\\u200D\\u2640\\uFE0F\\u200D\\u27A1\\uFE0F','\\u{1F9CE}\\u{1F3FB}\\u200D\\u2642\\uFE0F','\\u{1F9CE}\\u{1F3FB}\\u200D\\u2642\\uFE0F\\u200D\\u27A1\\uFE0F','\\u{1F9CE}\\u{1F3FC}\\u200D\\u2640\\uFE0F','\\u{1F9CE}\\u{1F3FC}\\u200D\\u2640\\uFE0F\\u200D\\u27A1\\uFE0F','\\u{1F9CE}\\u{1F3FC}\\u200D\\u2642\\uFE0F','\\u{1F9CE}\\u{1F3FC}\\u200D\\u2642\\uFE0F\\u200D\\u27A1\\uFE0F','\\u{1F9CE}\\u{1F3FD}\\u200D\\u2640\\uFE0F','\\u{1F9CE}\\u{1F3FD}\\u200D\\u2640\\uFE0F\\u200D\\u27A1\\uFE0F','\\u{1F9CE}\\u{1F3FD}\\u200D\\u2642\\uFE0F','\\u{1F9CE}\\u{1F3FD}\\u200D\\u2642\\uFE0F\\u200D\\u27A1\\uFE0F','\\u{1F9CE}\\u{1F3FE}\\u200D\\u2640\\uFE0F','\\u{1F9CE}\\u{1F3FE}\\u200D\\u2640\\uFE0F\\u200D\\u27A1\\uFE0F','\\u{1F9CE}\\u{1F3FE}\\u200D\\u2642\\uFE0F','\\u{1F9CE}\\u{1F3FE}\\u200D\\u2642\\uFE0F\\u200D\\u27A1\\uFE0F','\\u{1F9CE}\\u{1F3FF}\\u200D\\u2640\\uFE0F','\\u{1F9CE}\\u{1F3FF}\\u200D\\u2640\\uFE0F\\u200D\\u27A1\\uFE0F','\\u{1F9CE}\\u{1F3FF}\\u200D\\u2642\\uFE0F','\\u{1F9CE}\\u{1F3FF}\\u200D\\u2642\\uFE0F\\u200D\\u27A1\\uFE0F','\\u{1F9CF}\\u200D\\u2640\\uFE0F','\\u{1F9CF}\\u200D\\u2642\\uFE0F','\\u{1F9CF}\\u{1F3FB}\\u200D\\u2640\\uFE0F','\\u{1F9CF}\\u{1F3FB}\\u200D\\u2642\\uFE0F','\\u{1F9CF}\\u{1F3FC}\\u200D\\u2640\\uFE0F','\\u{1F9CF}\\u{1F3FC}\\u200D\\u2642\\uFE0F','\\u{1F9CF}\\u{1F3FD}\\u200D\\u2640\\uFE0F','\\u{1F9CF}\\u{1F3FD}\\u200D\\u2642\\uFE0F','\\u{1F9CF}\\u{1F3FE}\\u200D\\u2640\\uFE0F','\\u{1F9CF}\\u{1F3FE}\\u200D\\u2642\\uFE0F','\\u{1F9CF}\\u{1F3FF}\\u200D\\u2640\\uFE0F','\\u{1F9CF}\\u{1F3FF}\\u200D\\u2642\\uFE0F','\\u{1F9D4}\\u200D\\u2640\\uFE0F','\\u{1F9D4}\\u200D\\u2642\\uFE0F','\\u{1F9D4}\\u{1F3FB}\\u200D\\u2640\\uFE0F','\\u{1F9D4}\\u{1F3FB}\\u200D\\u2642\\uFE0F','\\u{1F9D4}\\u{1F3FC}\\u200D\\u2640\\uFE0F','\\u{1F9D4}\\u{1F3FC}\\u200D\\u2642\\uFE0F','\\u{1F9D4}\\u{1F3FD}\\u200D\\u2640\\uFE0F','\\u{1F9D4}\\u{1F3FD}\\u200D\\u2642\\uFE0F','\\u{1F9D4}\\u{1F3FE}\\u200D\\u2640\\uFE0F','\\u{1F9D4}\\u{1F3FE}\\u200D\\u2642\\uFE0F','\\u{1F9D4}\\u{1F3FF}\\u200D\\u2640\\uFE0F','\\u{1F9D4}\\u{1F3FF}\\u200D\\u2642\\uFE0F','\\u{1F9D6}\\u200D\\u2640\\uFE0F','\\u{1F9D6}\\u200D\\u2642\\uFE0F','\\u{1F9D6}\\u{1F3FB}\\u200D\\u2640\\uFE0F','\\u{1F9D6}\\u{1F3FB}\\u200D\\u2642\\uFE0F','\\u{1F9D6}\\u{1F3FC}\\u200D\\u2640\\uFE0F','\\u{1F9D6}\\u{1F3FC}\\u200D\\u2642\\uFE0F','\\u{1F9D6}\\u{1F3FD}\\u200D\\u2640\\uFE0F','\\u{1F9D6}\\u{1F3FD}\\u200D\\u2642\\uFE0F','\\u{1F9D6}\\u{1F3FE}\\u200D\\u2640\\uFE0F','\\u{1F9D6}\\u{1F3FE}\\u200D\\u2642\\uFE0F','\\u{1F9D6}\\u{1F3FF}\\u200D\\u2640\\uFE0F','\\u{1F9D6}\\u{1F3FF}\\u200D\\u2642\\uFE0F','\\u{1F9D7}\\u200D\\u2640\\uFE0F','\\u{1F9D7}\\u200D\\u2642\\uFE0F','\\u{1F9D7}\\u{1F3FB}\\u200D\\u2640\\uFE0F','\\u{1F9D7}\\u{1F3FB}\\u200D\\u2642\\uFE0F','\\u{1F9D7}\\u{1F3FC}\\u200D\\u2640\\uFE0F','\\u{1F9D7}\\u{1F3FC}\\u200D\\u2642\\uFE0F','\\u{1F9D7}\\u{1F3FD}\\u200D\\u2640\\uFE0F','\\u{1F9D7}\\u{1F3FD}\\u200D\\u2642\\uFE0F','\\u{1F9D7}\\u{1F3FE}\\u200D\\u2640\\uFE0F','\\u{1F9D7}\\u{1F3FE}\\u200D\\u2642\\uFE0F','\\u{1F9D7}\\u{1F3FF}\\u200D\\u2640\\uFE0F','\\u{1F9D7}\\u{1F3FF}\\u200D\\u2642\\uFE0F','\\u{1F9D8}\\u200D\\u2640\\uFE0F','\\u{1F9D8}\\u200D\\u2642\\uFE0F','\\u{1F9D8}\\u{1F3FB}\\u200D\\u2640\\uFE0F','\\u{1F9D8}\\u{1F3FB}\\u200D\\u2642\\uFE0F','\\u{1F9D8}\\u{1F3FC}\\u200D\\u2640\\uFE0F','\\u{1F9D8}\\u{1F3FC}\\u200D\\u2642\\uFE0F','\\u{1F9D8}\\u{1F3FD}\\u200D\\u2640\\uFE0F','\\u{1F9D8}\\u{1F3FD}\\u200D\\u2642\\uFE0F','\\u{1F9D8}\\u{1F3FE}\\u200D\\u2640\\uFE0F','\\u{1F9D8}\\u{1F3FE}\\u200D\\u2642\\uFE0F','\\u{1F9D8}\\u{1F3FF}\\u200D\\u2640\\uFE0F','\\u{1F9D8}\\u{1F3FF}\\u200D\\u2642\\uFE0F','\\u{1F9D9}\\u200D\\u2640\\uFE0F','\\u{1F9D9}\\u200D\\u2642\\uFE0F','\\u{1F9D9}\\u{1F3FB}\\u200D\\u2640\\uFE0F','\\u{1F9D9}\\u{1F3FB}\\u200D\\u2642\\uFE0F','\\u{1F9D9}\\u{1F3FC}\\u200D\\u2640\\uFE0F','\\u{1F9D9}\\u{1F3FC}\\u200D\\u2642\\uFE0F','\\u{1F9D9}\\u{1F3FD}\\u200D\\u2640\\uFE0F','\\u{1F9D9}\\u{1F3FD}\\u200D\\u2642\\uFE0F','\\u{1F9D9}\\u{1F3FE}\\u200D\\u2640\\uFE0F','\\u{1F9D9}\\u{1F3FE}\\u200D\\u2642\\uFE0F','\\u{1F9D9}\\u{1F3FF}\\u200D\\u2640\\uFE0F','\\u{1F9D9}\\u{1F3FF}\\u200D\\u2642\\uFE0F','\\u{1F9DA}\\u200D\\u2640\\uFE0F','\\u{1F9DA}\\u200D\\u2642\\uFE0F','\\u{1F9DA}\\u{1F3FB}\\u200D\\u2640\\uFE0F','\\u{1F9DA}\\u{1F3FB}\\u200D\\u2642\\uFE0F','\\u{1F9DA}\\u{1F3FC}\\u200D\\u2640\\uFE0F','\\u{1F9DA}\\u{1F3FC}\\u200D\\u2642\\uFE0F','\\u{1F9DA}\\u{1F3FD}\\u200D\\u2640\\uFE0F','\\u{1F9DA}\\u{1F3FD}\\u200D\\u2642\\uFE0F','\\u{1F9DA}\\u{1F3FE}\\u200D\\u2640\\uFE0F','\\u{1F9DA}\\u{1F3FE}\\u200D\\u2642\\uFE0F','\\u{1F9DA}\\u{1F3FF}\\u200D\\u2640\\uFE0F','\\u{1F9DA}\\u{1F3FF}\\u200D\\u2642\\uFE0F','\\u{1F9DB}\\u200D\\u2640\\uFE0F','\\u{1F9DB}\\u200D\\u2642\\uFE0F','\\u{1F9DB}\\u{1F3FB}\\u200D\\u2640\\uFE0F','\\u{1F9DB}\\u{1F3FB}\\u200D\\u2642\\uFE0F','\\u{1F9DB}\\u{1F3FC}\\u200D\\u2640\\uFE0F','\\u{1F9DB}\\u{1F3FC}\\u200D\\u2642\\uFE0F','\\u{1F9DB}\\u{1F3FD}\\u200D\\u2640\\uFE0F','\\u{1F9DB}\\u{1F3FD}\\u200D\\u2642\\uFE0F','\\u{1F9DB}\\u{1F3FE}\\u200D\\u2640\\uFE0F','\\u{1F9DB}\\u{1F3FE}\\u200D\\u2642\\uFE0F','\\u{1F9DB}\\u{1F3FF}\\u200D\\u2640\\uFE0F','\\u{1F9DB}\\u{1F3FF}\\u200D\\u2642\\uFE0F','\\u{1F9DC}\\u200D\\u2640\\uFE0F','\\u{1F9DC}\\u200D\\u2642\\uFE0F','\\u{1F9DC}\\u{1F3FB}\\u200D\\u2640\\uFE0F','\\u{1F9DC}\\u{1F3FB}\\u200D\\u2642\\uFE0F','\\u{1F9DC}\\u{1F3FC}\\u200D\\u2640\\uFE0F','\\u{1F9DC}\\u{1F3FC}\\u200D\\u2642\\uFE0F','\\u{1F9DC}\\u{1F3FD}\\u200D\\u2640\\uFE0F','\\u{1F9DC}\\u{1F3FD}\\u200D\\u2642\\uFE0F','\\u{1F9DC}\\u{1F3FE}\\u200D\\u2640\\uFE0F','\\u{1F9DC}\\u{1F3FE}\\u200D\\u2642\\uFE0F','\\u{1F9DC}\\u{1F3FF}\\u200D\\u2640\\uFE0F','\\u{1F9DC}\\u{1F3FF}\\u200D\\u2642\\uFE0F','\\u{1F9DD}\\u200D\\u2640\\uFE0F','\\u{1F9DD}\\u200D\\u2642\\uFE0F','\\u{1F9DD}\\u{1F3FB}\\u200D\\u2640\\uFE0F','\\u{1F9DD}\\u{1F3FB}\\u200D\\u2642\\uFE0F','\\u{1F9DD}\\u{1F3FC}\\u200D\\u2640\\uFE0F','\\u{1F9DD}\\u{1F3FC}\\u200D\\u2642\\uFE0F','\\u{1F9DD}\\u{1F3FD}\\u200D\\u2640\\uFE0F','\\u{1F9DD}\\u{1F3FD}\\u200D\\u2642\\uFE0F','\\u{1F9DD}\\u{1F3FE}\\u200D\\u2640\\uFE0F','\\u{1F9DD}\\u{1F3FE}\\u200D\\u2642\\uFE0F','\\u{1F9DD}\\u{1F3FF}\\u200D\\u2640\\uFE0F','\\u{1F9DD}\\u{1F3FF}\\u200D\\u2642\\uFE0F','\\u{1F9DE}\\u200D\\u2640\\uFE0F','\\u{1F9DE}\\u200D\\u2642\\uFE0F','\\u{1F9DF}\\u200D\\u2640\\uFE0F','\\u{1F9DF}\\u200D\\u2642\\uFE0F','\\u{1F468}\\u200D\\u{1F9B0}','\\u{1F468}\\u200D\\u{1F9B1}','\\u{1F468}\\u200D\\u{1F9B2}','\\u{1F468}\\u200D\\u{1F9B3}','\\u{1F468}\\u{1F3FB}\\u200D\\u{1F9B0}','\\u{1F468}\\u{1F3FB}\\u200D\\u{1F9B1}','\\u{1F468}\\u{1F3FB}\\u200D\\u{1F9B2}','\\u{1F468}\\u{1F3FB}\\u200D\\u{1F9B3}','\\u{1F468}\\u{1F3FC}\\u200D\\u{1F9B0}','\\u{1F468}\\u{1F3FC}\\u200D\\u{1F9B1}','\\u{1F468}\\u{1F3FC}\\u200D\\u{1F9B2}','\\u{1F468}\\u{1F3FC}\\u200D\\u{1F9B3}','\\u{1F468}\\u{1F3FD}\\u200D\\u{1F9B0}','\\u{1F468}\\u{1F3FD}\\u200D\\u{1F9B1}','\\u{1F468}\\u{1F3FD}\\u200D\\u{1F9B2}','\\u{1F468}\\u{1F3FD}\\u200D\\u{1F9B3}','\\u{1F468}\\u{1F3FE}\\u200D\\u{1F9B0}','\\u{1F468}\\u{1F3FE}\\u200D\\u{1F9B1}','\\u{1F468}\\u{1F3FE}\\u200D\\u{1F9B2}','\\u{1F468}\\u{1F3FE}\\u200D\\u{1F9B3}','\\u{1F468}\\u{1F3FF}\\u200D\\u{1F9B0}','\\u{1F468}\\u{1F3FF}\\u200D\\u{1F9B1}','\\u{1F468}\\u{1F3FF}\\u200D\\u{1F9B2}','\\u{1F468}\\u{1F3FF}\\u200D\\u{1F9B3}','\\u{1F469}\\u200D\\u{1F9B0}','\\u{1F469}\\u200D\\u{1F9B1}','\\u{1F469}\\u200D\\u{1F9B2}','\\u{1F469}\\u200D\\u{1F9B3}','\\u{1F469}\\u{1F3FB}\\u200D\\u{1F9B0}','\\u{1F469}\\u{1F3FB}\\u200D\\u{1F9B1}','\\u{1F469}\\u{1F3FB}\\u200D\\u{1F9B2}','\\u{1F469}\\u{1F3FB}\\u200D\\u{1F9B3}','\\u{1F469}\\u{1F3FC}\\u200D\\u{1F9B0}','\\u{1F469}\\u{1F3FC}\\u200D\\u{1F9B1}','\\u{1F469}\\u{1F3FC}\\u200D\\u{1F9B2}','\\u{1F469}\\u{1F3FC}\\u200D\\u{1F9B3}','\\u{1F469}\\u{1F3FD}\\u200D\\u{1F9B0}','\\u{1F469}\\u{1F3FD}\\u200D\\u{1F9B1}','\\u{1F469}\\u{1F3FD}\\u200D\\u{1F9B2}','\\u{1F469}\\u{1F3FD}\\u200D\\u{1F9B3}','\\u{1F469}\\u{1F3FE}\\u200D\\u{1F9B0}','\\u{1F469}\\u{1F3FE}\\u200D\\u{1F9B1}','\\u{1F469}\\u{1F3FE}\\u200D\\u{1F9B2}','\\u{1F469}\\u{1F3FE}\\u200D\\u{1F9B3}','\\u{1F469}\\u{1F3FF}\\u200D\\u{1F9B0}','\\u{1F469}\\u{1F3FF}\\u200D\\u{1F9B1}','\\u{1F469}\\u{1F3FF}\\u200D\\u{1F9B2}','\\u{1F469}\\u{1F3FF}\\u200D\\u{1F9B3}','\\u{1F9D1}\\u200D\\u{1F9B0}','\\u{1F9D1}\\u200D\\u{1F9B1}','\\u{1F9D1}\\u200D\\u{1F9B2}','\\u{1F9D1}\\u200D\\u{1F9B3}','\\u{1F9D1}\\u{1F3FB}\\u200D\\u{1F9B0}','\\u{1F9D1}\\u{1F3FB}\\u200D\\u{1F9B1}','\\u{1F9D1}\\u{1F3FB}\\u200D\\u{1F9B2}','\\u{1F9D1}\\u{1F3FB}\\u200D\\u{1F9B3}','\\u{1F9D1}\\u{1F3FC}\\u200D\\u{1F9B0}','\\u{1F9D1}\\u{1F3FC}\\u200D\\u{1F9B1}','\\u{1F9D1}\\u{1F3FC}\\u200D\\u{1F9B2}','\\u{1F9D1}\\u{1F3FC}\\u200D\\u{1F9B3}','\\u{1F9D1}\\u{1F3FD}\\u200D\\u{1F9B0}','\\u{1F9D1}\\u{1F3FD}\\u200D\\u{1F9B1}','\\u{1F9D1}\\u{1F3FD}\\u200D\\u{1F9B2}','\\u{1F9D1}\\u{1F3FD}\\u200D\\u{1F9B3}','\\u{1F9D1}\\u{1F3FE}\\u200D\\u{1F9B0}','\\u{1F9D1}\\u{1F3FE}\\u200D\\u{1F9B1}','\\u{1F9D1}\\u{1F3FE}\\u200D\\u{1F9B2}','\\u{1F9D1}\\u{1F3FE}\\u200D\\u{1F9B3}','\\u{1F9D1}\\u{1F3FF}\\u200D\\u{1F9B0}','\\u{1F9D1}\\u{1F3FF}\\u200D\\u{1F9B1}','\\u{1F9D1}\\u{1F3FF}\\u200D\\u{1F9B2}','\\u{1F9D1}\\u{1F3FF}\\u200D\\u{1F9B3}','\\u26D3\\uFE0F\\u200D\\u{1F4A5}','\\u2764\\uFE0F\\u200D\\u{1F525}','\\u2764\\uFE0F\\u200D\\u{1FA79}','\\u{1F344}\\u200D\\u{1F7EB}','\\u{1F34B}\\u200D\\u{1F7E9}','\\u{1F3F3}\\uFE0F\\u200D\\u26A7\\uFE0F','\\u{1F3F3}\\uFE0F\\u200D\\u{1F308}','\\u{1F3F4}\\u200D\\u2620\\uFE0F','\\u{1F408}\\u200D\\u2B1B','\\u{1F415}\\u200D\\u{1F9BA}','\\u{1F426}\\u200D\\u2B1B','\\u{1F426}\\u200D\\u{1F525}','\\u{1F43B}\\u200D\\u2744\\uFE0F','\\u{1F441}\\uFE0F\\u200D\\u{1F5E8}\\uFE0F','\\u{1F62E}\\u200D\\u{1F4A8}','\\u{1F635}\\u200D\\u{1F4AB}','\\u{1F636}\\u200D\\u{1F32B}\\uFE0F','\\u{1F642}\\u200D\\u2194\\uFE0F','\\u{1F642}\\u200D\\u2195\\uFE0F'];\n","const set = require('regenerate')(0x23F0, 0x23F3, 0x267F, 0x2693, 0x26A1, 0x26CE, 0x26D4, 0x26EA, 0x26F5, 0x26FA, 0x26FD, 0x2705, 0x2728, 0x274C, 0x274E, 0x2757, 0x27B0, 0x27BF, 0x2B50, 0x2B55, 0x1F004, 0x1F0CF, 0x1F18E, 0x1F201, 0x1F21A, 0x1F22F, 0x1F3F4, 0x1F440, 0x1F57A, 0x1F5A4, 0x1F6CC, 0x1F7F0);\nset.addRange(0x231A, 0x231B).addRange(0x23E9, 0x23EC).addRange(0x25FD, 0x25FE).addRange(0x2614, 0x2615).addRange(0x2648, 0x2653).addRange(0x26AA, 0x26AB).addRange(0x26BD, 0x26BE).addRange(0x26C4, 0x26C5).addRange(0x26F2, 0x26F3).addRange(0x270A, 0x270B).addRange(0x2753, 0x2755).addRange(0x2795, 0x2797).addRange(0x2B1B, 0x2B1C).addRange(0x1F191, 0x1F19A).addRange(0x1F232, 0x1F236).addRange(0x1F238, 0x1F23A).addRange(0x1F250, 0x1F251).addRange(0x1F300, 0x1F320).addRange(0x1F32D, 0x1F335).addRange(0x1F337, 0x1F37C).addRange(0x1F37E, 0x1F393).addRange(0x1F3A0, 0x1F3CA).addRange(0x1F3CF, 0x1F3D3).addRange(0x1F3E0, 0x1F3F0).addRange(0x1F3F8, 0x1F43E).addRange(0x1F442, 0x1F4FC).addRange(0x1F4FF, 0x1F53D).addRange(0x1F54B, 0x1F54E).addRange(0x1F550, 0x1F567).addRange(0x1F595, 0x1F596).addRange(0x1F5FB, 0x1F64F).addRange(0x1F680, 0x1F6C5).addRange(0x1F6D0, 0x1F6D2).addRange(0x1F6D5, 0x1F6D7).addRange(0x1F6DC, 0x1F6DF).addRange(0x1F6EB, 0x1F6EC).addRange(0x1F6F4, 0x1F6FC).addRange(0x1F7E0, 0x1F7EB).addRange(0x1F90C, 0x1F93A).addRange(0x1F93C, 0x1F945).addRange(0x1F947, 0x1F9FF).addRange(0x1FA70, 0x1FA7C).addRange(0x1FA80, 0x1FA88).addRange(0x1FA90, 0x1FABD).addRange(0x1FABF, 0x1FAC5).addRange(0x1FACE, 0x1FADB).addRange(0x1FAE0, 0x1FAE8).addRange(0x1FAF0, 0x1FAF8);\nexports.characters = set;\nexports.strings = ['#\\uFE0F\\u20E3','*\\uFE0F\\u20E3','0\\uFE0F\\u20E3','1\\uFE0F\\u20E3','2\\uFE0F\\u20E3','3\\uFE0F\\u20E3','4\\uFE0F\\u20E3','5\\uFE0F\\u20E3','6\\uFE0F\\u20E3','7\\uFE0F\\u20E3','8\\uFE0F\\u20E3','9\\uFE0F\\u20E3','\\xA9\\uFE0F','\\xAE\\uFE0F','\\u203C\\uFE0F','\\u2049\\uFE0F','\\u2122\\uFE0F','\\u2139\\uFE0F','\\u2194\\uFE0F','\\u2195\\uFE0F','\\u2196\\uFE0F','\\u2197\\uFE0F','\\u2198\\uFE0F','\\u2199\\uFE0F','\\u21A9\\uFE0F','\\u21AA\\uFE0F','\\u2328\\uFE0F','\\u23CF\\uFE0F','\\u23ED\\uFE0F','\\u23EE\\uFE0F','\\u23EF\\uFE0F','\\u23F1\\uFE0F','\\u23F2\\uFE0F','\\u23F8\\uFE0F','\\u23F9\\uFE0F','\\u23FA\\uFE0F','\\u24C2\\uFE0F','\\u25AA\\uFE0F','\\u25AB\\uFE0F','\\u25B6\\uFE0F','\\u25C0\\uFE0F','\\u25FB\\uFE0F','\\u25FC\\uFE0F','\\u2600\\uFE0F','\\u2601\\uFE0F','\\u2602\\uFE0F','\\u2603\\uFE0F','\\u2604\\uFE0F','\\u260E\\uFE0F','\\u2611\\uFE0F','\\u2618\\uFE0F','\\u261D\\u{1F3FB}','\\u261D\\u{1F3FC}','\\u261D\\u{1F3FD}','\\u261D\\u{1F3FE}','\\u261D\\u{1F3FF}','\\u261D\\uFE0F','\\u2620\\uFE0F','\\u2622\\uFE0F','\\u2623\\uFE0F','\\u2626\\uFE0F','\\u262A\\uFE0F','\\u262E\\uFE0F','\\u262F\\uFE0F','\\u2638\\uFE0F','\\u2639\\uFE0F','\\u263A\\uFE0F','\\u2640\\uFE0F','\\u2642\\uFE0F','\\u265F\\uFE0F','\\u2660\\uFE0F','\\u2663\\uFE0F','\\u2665\\uFE0F','\\u2666\\uFE0F','\\u2668\\uFE0F','\\u267B\\uFE0F','\\u267E\\uFE0F','\\u2692\\uFE0F','\\u2694\\uFE0F','\\u2695\\uFE0F','\\u2696\\uFE0F','\\u2697\\uFE0F','\\u2699\\uFE0F','\\u269B\\uFE0F','\\u269C\\uFE0F','\\u26A0\\uFE0F','\\u26A7\\uFE0F','\\u26B0\\uFE0F','\\u26B1\\uFE0F','\\u26C8\\uFE0F','\\u26CF\\uFE0F','\\u26D1\\uFE0F','\\u26D3\\uFE0F','\\u26D3\\uFE0F\\u200D\\u{1F4A5}','\\u26E9\\uFE0F','\\u26F0\\uFE0F','\\u26F1\\uFE0F','\\u26F4\\uFE0F','\\u26F7\\uFE0F','\\u26F8\\uFE0F','\\u26F9\\u{1F3FB}','\\u26F9\\u{1F3FB}\\u200D\\u2640\\uFE0F','\\u26F9\\u{1F3FB}\\u200D\\u2642\\uFE0F','\\u26F9\\u{1F3FC}','\\u26F9\\u{1F3FC}\\u200D\\u2640\\uFE0F','\\u26F9\\u{1F3FC}\\u200D\\u2642\\uFE0F','\\u26F9\\u{1F3FD}','\\u26F9\\u{1F3FD}\\u200D\\u2640\\uFE0F','\\u26F9\\u{1F3FD}\\u200D\\u2642\\uFE0F','\\u26F9\\u{1F3FE}','\\u26F9\\u{1F3FE}\\u200D\\u2640\\uFE0F','\\u26F9\\u{1F3FE}\\u200D\\u2642\\uFE0F','\\u26F9\\u{1F3FF}','\\u26F9\\u{1F3FF}\\u200D\\u2640\\uFE0F','\\u26F9\\u{1F3FF}\\u200D\\u2642\\uFE0F','\\u26F9\\uFE0F','\\u26F9\\uFE0F\\u200D\\u2640\\uFE0F','\\u26F9\\uFE0F\\u200D\\u2642\\uFE0F','\\u2702\\uFE0F','\\u2708\\uFE0F','\\u2709\\uFE0F','\\u270A\\u{1F3FB}','\\u270A\\u{1F3FC}','\\u270A\\u{1F3FD}','\\u270A\\u{1F3FE}','\\u270A\\u{1F3FF}','\\u270B\\u{1F3FB}','\\u270B\\u{1F3FC}','\\u270B\\u{1F3FD}','\\u270B\\u{1F3FE}','\\u270B\\u{1F3FF}','\\u270C\\u{1F3FB}','\\u270C\\u{1F3FC}','\\u270C\\u{1F3FD}','\\u270C\\u{1F3FE}','\\u270C\\u{1F3FF}','\\u270C\\uFE0F','\\u270D\\u{1F3FB}','\\u270D\\u{1F3FC}','\\u270D\\u{1F3FD}','\\u270D\\u{1F3FE}','\\u270D\\u{1F3FF}','\\u270D\\uFE0F','\\u270F\\uFE0F','\\u2712\\uFE0F','\\u2714\\uFE0F','\\u2716\\uFE0F','\\u271D\\uFE0F','\\u2721\\uFE0F','\\u2733\\uFE0F','\\u2734\\uFE0F','\\u2744\\uFE0F','\\u2747\\uFE0F','\\u2763\\uFE0F','\\u2764\\uFE0F','\\u2764\\uFE0F\\u200D\\u{1F525}','\\u2764\\uFE0F\\u200D\\u{1FA79}','\\u27A1\\uFE0F','\\u2934\\uFE0F','\\u2935\\uFE0F','\\u2B05\\uFE0F','\\u2B06\\uFE0F','\\u2B07\\uFE0F','\\u3030\\uFE0F','\\u303D\\uFE0F','\\u3297\\uFE0F','\\u3299\\uFE0F','\\u{1F170}\\uFE0F','\\u{1F171}\\uFE0F','\\u{1F17E}\\uFE0F','\\u{1F17F}\\uFE0F','\\u{1F1E6}\\u{1F1E8}','\\u{1F1E6}\\u{1F1E9}','\\u{1F1E6}\\u{1F1EA}','\\u{1F1E6}\\u{1F1EB}','\\u{1F1E6}\\u{1F1EC}','\\u{1F1E6}\\u{1F1EE}','\\u{1F1E6}\\u{1F1F1}','\\u{1F1E6}\\u{1F1F2}','\\u{1F1E6}\\u{1F1F4}','\\u{1F1E6}\\u{1F1F6}','\\u{1F1E6}\\u{1F1F7}','\\u{1F1E6}\\u{1F1F8}','\\u{1F1E6}\\u{1F1F9}','\\u{1F1E6}\\u{1F1FA}','\\u{1F1E6}\\u{1F1FC}','\\u{1F1E6}\\u{1F1FD}','\\u{1F1E6}\\u{1F1FF}','\\u{1F1E7}\\u{1F1E6}','\\u{1F1E7}\\u{1F1E7}','\\u{1F1E7}\\u{1F1E9}','\\u{1F1E7}\\u{1F1EA}','\\u{1F1E7}\\u{1F1EB}','\\u{1F1E7}\\u{1F1EC}','\\u{1F1E7}\\u{1F1ED}','\\u{1F1E7}\\u{1F1EE}','\\u{1F1E7}\\u{1F1EF}','\\u{1F1E7}\\u{1F1F1}','\\u{1F1E7}\\u{1F1F2}','\\u{1F1E7}\\u{1F1F3}','\\u{1F1E7}\\u{1F1F4}','\\u{1F1E7}\\u{1F1F6}','\\u{1F1E7}\\u{1F1F7}','\\u{1F1E7}\\u{1F1F8}','\\u{1F1E7}\\u{1F1F9}','\\u{1F1E7}\\u{1F1FB}','\\u{1F1E7}\\u{1F1FC}','\\u{1F1E7}\\u{1F1FE}','\\u{1F1E7}\\u{1F1FF}','\\u{1F1E8}\\u{1F1E6}','\\u{1F1E8}\\u{1F1E8}','\\u{1F1E8}\\u{1F1E9}','\\u{1F1E8}\\u{1F1EB}','\\u{1F1E8}\\u{1F1EC}','\\u{1F1E8}\\u{1F1ED}','\\u{1F1E8}\\u{1F1EE}','\\u{1F1E8}\\u{1F1F0}','\\u{1F1E8}\\u{1F1F1}','\\u{1F1E8}\\u{1F1F2}','\\u{1F1E8}\\u{1F1F3}','\\u{1F1E8}\\u{1F1F4}','\\u{1F1E8}\\u{1F1F5}','\\u{1F1E8}\\u{1F1F7}','\\u{1F1E8}\\u{1F1FA}','\\u{1F1E8}\\u{1F1FB}','\\u{1F1E8}\\u{1F1FC}','\\u{1F1E8}\\u{1F1FD}','\\u{1F1E8}\\u{1F1FE}','\\u{1F1E8}\\u{1F1FF}','\\u{1F1E9}\\u{1F1EA}','\\u{1F1E9}\\u{1F1EC}','\\u{1F1E9}\\u{1F1EF}','\\u{1F1E9}\\u{1F1F0}','\\u{1F1E9}\\u{1F1F2}','\\u{1F1E9}\\u{1F1F4}','\\u{1F1E9}\\u{1F1FF}','\\u{1F1EA}\\u{1F1E6}','\\u{1F1EA}\\u{1F1E8}','\\u{1F1EA}\\u{1F1EA}','\\u{1F1EA}\\u{1F1EC}','\\u{1F1EA}\\u{1F1ED}','\\u{1F1EA}\\u{1F1F7}','\\u{1F1EA}\\u{1F1F8}','\\u{1F1EA}\\u{1F1F9}','\\u{1F1EA}\\u{1F1FA}','\\u{1F1EB}\\u{1F1EE}','\\u{1F1EB}\\u{1F1EF}','\\u{1F1EB}\\u{1F1F0}','\\u{1F1EB}\\u{1F1F2}','\\u{1F1EB}\\u{1F1F4}','\\u{1F1EB}\\u{1F1F7}','\\u{1F1EC}\\u{1F1E6}','\\u{1F1EC}\\u{1F1E7}','\\u{1F1EC}\\u{1F1E9}','\\u{1F1EC}\\u{1F1EA}','\\u{1F1EC}\\u{1F1EB}','\\u{1F1EC}\\u{1F1EC}','\\u{1F1EC}\\u{1F1ED}','\\u{1F1EC}\\u{1F1EE}','\\u{1F1EC}\\u{1F1F1}','\\u{1F1EC}\\u{1F1F2}','\\u{1F1EC}\\u{1F1F3}','\\u{1F1EC}\\u{1F1F5}','\\u{1F1EC}\\u{1F1F6}','\\u{1F1EC}\\u{1F1F7}','\\u{1F1EC}\\u{1F1F8}','\\u{1F1EC}\\u{1F1F9}','\\u{1F1EC}\\u{1F1FA}','\\u{1F1EC}\\u{1F1FC}','\\u{1F1EC}\\u{1F1FE}','\\u{1F1ED}\\u{1F1F0}','\\u{1F1ED}\\u{1F1F2}','\\u{1F1ED}\\u{1F1F3}','\\u{1F1ED}\\u{1F1F7}','\\u{1F1ED}\\u{1F1F9}','\\u{1F1ED}\\u{1F1FA}','\\u{1F1EE}\\u{1F1E8}','\\u{1F1EE}\\u{1F1E9}','\\u{1F1EE}\\u{1F1EA}','\\u{1F1EE}\\u{1F1F1}','\\u{1F1EE}\\u{1F1F2}','\\u{1F1EE}\\u{1F1F3}','\\u{1F1EE}\\u{1F1F4}','\\u{1F1EE}\\u{1F1F6}','\\u{1F1EE}\\u{1F1F7}','\\u{1F1EE}\\u{1F1F8}','\\u{1F1EE}\\u{1F1F9}','\\u{1F1EF}\\u{1F1EA}','\\u{1F1EF}\\u{1F1F2}','\\u{1F1EF}\\u{1F1F4}','\\u{1F1EF}\\u{1F1F5}','\\u{1F1F0}\\u{1F1EA}','\\u{1F1F0}\\u{1F1EC}','\\u{1F1F0}\\u{1F1ED}','\\u{1F1F0}\\u{1F1EE}','\\u{1F1F0}\\u{1F1F2}','\\u{1F1F0}\\u{1F1F3}','\\u{1F1F0}\\u{1F1F5}','\\u{1F1F0}\\u{1F1F7}','\\u{1F1F0}\\u{1F1FC}','\\u{1F1F0}\\u{1F1FE}','\\u{1F1F0}\\u{1F1FF}','\\u{1F1F1}\\u{1F1E6}','\\u{1F1F1}\\u{1F1E7}','\\u{1F1F1}\\u{1F1E8}','\\u{1F1F1}\\u{1F1EE}','\\u{1F1F1}\\u{1F1F0}','\\u{1F1F1}\\u{1F1F7}','\\u{1F1F1}\\u{1F1F8}','\\u{1F1F1}\\u{1F1F9}','\\u{1F1F1}\\u{1F1FA}','\\u{1F1F1}\\u{1F1FB}','\\u{1F1F1}\\u{1F1FE}','\\u{1F1F2}\\u{1F1E6}','\\u{1F1F2}\\u{1F1E8}','\\u{1F1F2}\\u{1F1E9}','\\u{1F1F2}\\u{1F1EA}','\\u{1F1F2}\\u{1F1EB}','\\u{1F1F2}\\u{1F1EC}','\\u{1F1F2}\\u{1F1ED}','\\u{1F1F2}\\u{1F1F0}','\\u{1F1F2}\\u{1F1F1}','\\u{1F1F2}\\u{1F1F2}','\\u{1F1F2}\\u{1F1F3}','\\u{1F1F2}\\u{1F1F4}','\\u{1F1F2}\\u{1F1F5}','\\u{1F1F2}\\u{1F1F6}','\\u{1F1F2}\\u{1F1F7}','\\u{1F1F2}\\u{1F1F8}','\\u{1F1F2}\\u{1F1F9}','\\u{1F1F2}\\u{1F1FA}','\\u{1F1F2}\\u{1F1FB}','\\u{1F1F2}\\u{1F1FC}','\\u{1F1F2}\\u{1F1FD}','\\u{1F1F2}\\u{1F1FE}','\\u{1F1F2}\\u{1F1FF}','\\u{1F1F3}\\u{1F1E6}','\\u{1F1F3}\\u{1F1E8}','\\u{1F1F3}\\u{1F1EA}','\\u{1F1F3}\\u{1F1EB}','\\u{1F1F3}\\u{1F1EC}','\\u{1F1F3}\\u{1F1EE}','\\u{1F1F3}\\u{1F1F1}','\\u{1F1F3}\\u{1F1F4}','\\u{1F1F3}\\u{1F1F5}','\\u{1F1F3}\\u{1F1F7}','\\u{1F1F3}\\u{1F1FA}','\\u{1F1F3}\\u{1F1FF}','\\u{1F1F4}\\u{1F1F2}','\\u{1F1F5}\\u{1F1E6}','\\u{1F1F5}\\u{1F1EA}','\\u{1F1F5}\\u{1F1EB}','\\u{1F1F5}\\u{1F1EC}','\\u{1F1F5}\\u{1F1ED}','\\u{1F1F5}\\u{1F1F0}','\\u{1F1F5}\\u{1F1F1}','\\u{1F1F5}\\u{1F1F2}','\\u{1F1F5}\\u{1F1F3}','\\u{1F1F5}\\u{1F1F7}','\\u{1F1F5}\\u{1F1F8}','\\u{1F1F5}\\u{1F1F9}','\\u{1F1F5}\\u{1F1FC}','\\u{1F1F5}\\u{1F1FE}','\\u{1F1F6}\\u{1F1E6}','\\u{1F1F7}\\u{1F1EA}','\\u{1F1F7}\\u{1F1F4}','\\u{1F1F7}\\u{1F1F8}','\\u{1F1F7}\\u{1F1FA}','\\u{1F1F7}\\u{1F1FC}','\\u{1F1F8}\\u{1F1E6}','\\u{1F1F8}\\u{1F1E7}','\\u{1F1F8}\\u{1F1E8}','\\u{1F1F8}\\u{1F1E9}','\\u{1F1F8}\\u{1F1EA}','\\u{1F1F8}\\u{1F1EC}','\\u{1F1F8}\\u{1F1ED}','\\u{1F1F8}\\u{1F1EE}','\\u{1F1F8}\\u{1F1EF}','\\u{1F1F8}\\u{1F1F0}','\\u{1F1F8}\\u{1F1F1}','\\u{1F1F8}\\u{1F1F2}','\\u{1F1F8}\\u{1F1F3}','\\u{1F1F8}\\u{1F1F4}','\\u{1F1F8}\\u{1F1F7}','\\u{1F1F8}\\u{1F1F8}','\\u{1F1F8}\\u{1F1F9}','\\u{1F1F8}\\u{1F1FB}','\\u{1F1F8}\\u{1F1FD}','\\u{1F1F8}\\u{1F1FE}','\\u{1F1F8}\\u{1F1FF}','\\u{1F1F9}\\u{1F1E6}','\\u{1F1F9}\\u{1F1E8}','\\u{1F1F9}\\u{1F1E9}','\\u{1F1F9}\\u{1F1EB}','\\u{1F1F9}\\u{1F1EC}','\\u{1F1F9}\\u{1F1ED}','\\u{1F1F9}\\u{1F1EF}','\\u{1F1F9}\\u{1F1F0}','\\u{1F1F9}\\u{1F1F1}','\\u{1F1F9}\\u{1F1F2}','\\u{1F1F9}\\u{1F1F3}','\\u{1F1F9}\\u{1F1F4}','\\u{1F1F9}\\u{1F1F7}','\\u{1F1F9}\\u{1F1F9}','\\u{1F1F9}\\u{1F1FB}','\\u{1F1F9}\\u{1F1FC}','\\u{1F1F9}\\u{1F1FF}','\\u{1F1FA}\\u{1F1E6}','\\u{1F1FA}\\u{1F1EC}','\\u{1F1FA}\\u{1F1F2}','\\u{1F1FA}\\u{1F1F3}','\\u{1F1FA}\\u{1F1F8}','\\u{1F1FA}\\u{1F1FE}','\\u{1F1FA}\\u{1F1FF}','\\u{1F1FB}\\u{1F1E6}','\\u{1F1FB}\\u{1F1E8}','\\u{1F1FB}\\u{1F1EA}','\\u{1F1FB}\\u{1F1EC}','\\u{1F1FB}\\u{1F1EE}','\\u{1F1FB}\\u{1F1F3}','\\u{1F1FB}\\u{1F1FA}','\\u{1F1FC}\\u{1F1EB}','\\u{1F1FC}\\u{1F1F8}','\\u{1F1FD}\\u{1F1F0}','\\u{1F1FE}\\u{1F1EA}','\\u{1F1FE}\\u{1F1F9}','\\u{1F1FF}\\u{1F1E6}','\\u{1F1FF}\\u{1F1F2}','\\u{1F1FF}\\u{1F1FC}','\\u{1F202}\\uFE0F','\\u{1F237}\\uFE0F','\\u{1F321}\\uFE0F','\\u{1F324}\\uFE0F','\\u{1F325}\\uFE0F','\\u{1F326}\\uFE0F','\\u{1F327}\\uFE0F','\\u{1F328}\\uFE0F','\\u{1F329}\\uFE0F','\\u{1F32A}\\uFE0F','\\u{1F32B}\\uFE0F','\\u{1F32C}\\uFE0F','\\u{1F336}\\uFE0F','\\u{1F344}\\u200D\\u{1F7EB}','\\u{1F34B}\\u200D\\u{1F7E9}','\\u{1F37D}\\uFE0F','\\u{1F385}\\u{1F3FB}','\\u{1F385}\\u{1F3FC}','\\u{1F385}\\u{1F3FD}','\\u{1F385}\\u{1F3FE}','\\u{1F385}\\u{1F3FF}','\\u{1F396}\\uFE0F','\\u{1F397}\\uFE0F','\\u{1F399}\\uFE0F','\\u{1F39A}\\uFE0F','\\u{1F39B}\\uFE0F','\\u{1F39E}\\uFE0F','\\u{1F39F}\\uFE0F','\\u{1F3C2}\\u{1F3FB}','\\u{1F3C2}\\u{1F3FC}','\\u{1F3C2}\\u{1F3FD}','\\u{1F3C2}\\u{1F3FE}','\\u{1F3C2}\\u{1F3FF}','\\u{1F3C3}\\u200D\\u2640\\uFE0F','\\u{1F3C3}\\u200D\\u2640\\uFE0F\\u200D\\u27A1\\uFE0F','\\u{1F3C3}\\u200D\\u2642\\uFE0F','\\u{1F3C3}\\u200D\\u2642\\uFE0F\\u200D\\u27A1\\uFE0F','\\u{1F3C3}\\u200D\\u27A1\\uFE0F','\\u{1F3C3}\\u{1F3FB}','\\u{1F3C3}\\u{1F3FB}\\u200D\\u2640\\uFE0F','\\u{1F3C3}\\u{1F3FB}\\u200D\\u2640\\uFE0F\\u200D\\u27A1\\uFE0F','\\u{1F3C3}\\u{1F3FB}\\u200D\\u2642\\uFE0F','\\u{1F3C3}\\u{1F3FB}\\u200D\\u2642\\uFE0F\\u200D\\u27A1\\uFE0F','\\u{1F3C3}\\u{1F3FB}\\u200D\\u27A1\\uFE0F','\\u{1F3C3}\\u{1F3FC}','\\u{1F3C3}\\u{1F3FC}\\u200D\\u2640\\uFE0F','\\u{1F3C3}\\u{1F3FC}\\u200D\\u2640\\uFE0F\\u200D\\u27A1\\uFE0F','\\u{1F3C3}\\u{1F3FC}\\u200D\\u2642\\uFE0F','\\u{1F3C3}\\u{1F3FC}\\u200D\\u2642\\uFE0F\\u200D\\u27A1\\uFE0F','\\u{1F3C3}\\u{1F3FC}\\u200D\\u27A1\\uFE0F','\\u{1F3C3}\\u{1F3FD}','\\u{1F3C3}\\u{1F3FD}\\u200D\\u2640\\uFE0F','\\u{1F3C3}\\u{1F3FD}\\u200D\\u2640\\uFE0F\\u200D\\u27A1\\uFE0F','\\u{1F3C3}\\u{1F3FD}\\u200D\\u2642\\uFE0F','\\u{1F3C3}\\u{1F3FD}\\u200D\\u2642\\uFE0F\\u200D\\u27A1\\uFE0F','\\u{1F3C3}\\u{1F3FD}\\u200D\\u27A1\\uFE0F','\\u{1F3C3}\\u{1F3FE}','\\u{1F3C3}\\u{1F3FE}\\u200D\\u2640\\uFE0F','\\u{1F3C3}\\u{1F3FE}\\u200D\\u2640\\uFE0F\\u200D\\u27A1\\uFE0F','\\u{1F3C3}\\u{1F3FE}\\u200D\\u2642\\uFE0F','\\u{1F3C3}\\u{1F3FE}\\u200D\\u2642\\uFE0F\\u200D\\u27A1\\uFE0F','\\u{1F3C3}\\u{1F3FE}\\u200D\\u27A1\\uFE0F','\\u{1F3C3}\\u{1F3FF}','\\u{1F3C3}\\u{1F3FF}\\u200D\\u2640\\uFE0F','\\u{1F3C3}\\u{1F3FF}\\u200D\\u2640\\uFE0F\\u200D\\u27A1\\uFE0F','\\u{1F3C3}\\u{1F3FF}\\u200D\\u2642\\uFE0F','\\u{1F3C3}\\u{1F3FF}\\u200D\\u2642\\uFE0F\\u200D\\u27A1\\uFE0F','\\u{1F3C3}\\u{1F3FF}\\u200D\\u27A1\\uFE0F','\\u{1F3C4}\\u200D\\u2640\\uFE0F','\\u{1F3C4}\\u200D\\u2642\\uFE0F','\\u{1F3C4}\\u{1F3FB}','\\u{1F3C4}\\u{1F3FB}\\u200D\\u2640\\uFE0F','\\u{1F3C4}\\u{1F3FB}\\u200D\\u2642\\uFE0F','\\u{1F3C4}\\u{1F3FC}','\\u{1F3C4}\\u{1F3FC}\\u200D\\u2640\\uFE0F','\\u{1F3C4}\\u{1F3FC}\\u200D\\u2642\\uFE0F','\\u{1F3C4}\\u{1F3FD}','\\u{1F3C4}\\u{1F3FD}\\u200D\\u2640\\uFE0F','\\u{1F3C4}\\u{1F3FD}\\u200D\\u2642\\uFE0F','\\u{1F3C4}\\u{1F3FE}','\\u{1F3C4}\\u{1F3FE}\\u200D\\u2640\\uFE0F','\\u{1F3C4}\\u{1F3FE}\\u200D\\u2642\\uFE0F','\\u{1F3C4}\\u{1F3FF}','\\u{1F3C4}\\u{1F3FF}\\u200D\\u2640\\uFE0F','\\u{1F3C4}\\u{1F3FF}\\u200D\\u2642\\uFE0F','\\u{1F3C7}\\u{1F3FB}','\\u{1F3C7}\\u{1F3FC}','\\u{1F3C7}\\u{1F3FD}','\\u{1F3C7}\\u{1F3FE}','\\u{1F3C7}\\u{1F3FF}','\\u{1F3CA}\\u200D\\u2640\\uFE0F','\\u{1F3CA}\\u200D\\u2642\\uFE0F','\\u{1F3CA}\\u{1F3FB}','\\u{1F3CA}\\u{1F3FB}\\u200D\\u2640\\uFE0F','\\u{1F3CA}\\u{1F3FB}\\u200D\\u2642\\uFE0F','\\u{1F3CA}\\u{1F3FC}','\\u{1F3CA}\\u{1F3FC}\\u200D\\u2640\\uFE0F','\\u{1F3CA}\\u{1F3FC}\\u200D\\u2642\\uFE0F','\\u{1F3CA}\\u{1F3FD}','\\u{1F3CA}\\u{1F3FD}\\u200D\\u2640\\uFE0F','\\u{1F3CA}\\u{1F3FD}\\u200D\\u2642\\uFE0F','\\u{1F3CA}\\u{1F3FE}','\\u{1F3CA}\\u{1F3FE}\\u200D\\u2640\\uFE0F','\\u{1F3CA}\\u{1F3FE}\\u200D\\u2642\\uFE0F','\\u{1F3CA}\\u{1F3FF}','\\u{1F3CA}\\u{1F3FF}\\u200D\\u2640\\uFE0F','\\u{1F3CA}\\u{1F3FF}\\u200D\\u2642\\uFE0F','\\u{1F3CB}\\u{1F3FB}','\\u{1F3CB}\\u{1F3FB}\\u200D\\u2640\\uFE0F','\\u{1F3CB}\\u{1F3FB}\\u200D\\u2642\\uFE0F','\\u{1F3CB}\\u{1F3FC}','\\u{1F3CB}\\u{1F3FC}\\u200D\\u2640\\uFE0F','\\u{1F3CB}\\u{1F3FC}\\u200D\\u2642\\uFE0F','\\u{1F3CB}\\u{1F3FD}','\\u{1F3CB}\\u{1F3FD}\\u200D\\u2640\\uFE0F','\\u{1F3CB}\\u{1F3FD}\\u200D\\u2642\\uFE0F','\\u{1F3CB}\\u{1F3FE}','\\u{1F3CB}\\u{1F3FE}\\u200D\\u2640\\uFE0F','\\u{1F3CB}\\u{1F3FE}\\u200D\\u2642\\uFE0F','\\u{1F3CB}\\u{1F3FF}','\\u{1F3CB}\\u{1F3FF}\\u200D\\u2640\\uFE0F','\\u{1F3CB}\\u{1F3FF}\\u200D\\u2642\\uFE0F','\\u{1F3CB}\\uFE0F','\\u{1F3CB}\\uFE0F\\u200D\\u2640\\uFE0F','\\u{1F3CB}\\uFE0F\\u200D\\u2642\\uFE0F','\\u{1F3CC}\\u{1F3FB}','\\u{1F3CC}\\u{1F3FB}\\u200D\\u2640\\uFE0F','\\u{1F3CC}\\u{1F3FB}\\u200D\\u2642\\uFE0F','\\u{1F3CC}\\u{1F3FC}','\\u{1F3CC}\\u{1F3FC}\\u200D\\u2640\\uFE0F','\\u{1F3CC}\\u{1F3FC}\\u200D\\u2642\\uFE0F','\\u{1F3CC}\\u{1F3FD}','\\u{1F3CC}\\u{1F3FD}\\u200D\\u2640\\uFE0F','\\u{1F3CC}\\u{1F3FD}\\u200D\\u2642\\uFE0F','\\u{1F3CC}\\u{1F3FE}','\\u{1F3CC}\\u{1F3FE}\\u200D\\u2640\\uFE0F','\\u{1F3CC}\\u{1F3FE}\\u200D\\u2642\\uFE0F','\\u{1F3CC}\\u{1F3FF}','\\u{1F3CC}\\u{1F3FF}\\u200D\\u2640\\uFE0F','\\u{1F3CC}\\u{1F3FF}\\u200D\\u2642\\uFE0F','\\u{1F3CC}\\uFE0F','\\u{1F3CC}\\uFE0F\\u200D\\u2640\\uFE0F','\\u{1F3CC}\\uFE0F\\u200D\\u2642\\uFE0F','\\u{1F3CD}\\uFE0F','\\u{1F3CE}\\uFE0F','\\u{1F3D4}\\uFE0F','\\u{1F3D5}\\uFE0F','\\u{1F3D6}\\uFE0F','\\u{1F3D7}\\uFE0F','\\u{1F3D8}\\uFE0F','\\u{1F3D9}\\uFE0F','\\u{1F3DA}\\uFE0F','\\u{1F3DB}\\uFE0F','\\u{1F3DC}\\uFE0F','\\u{1F3DD}\\uFE0F','\\u{1F3DE}\\uFE0F','\\u{1F3DF}\\uFE0F','\\u{1F3F3}\\uFE0F','\\u{1F3F3}\\uFE0F\\u200D\\u26A7\\uFE0F','\\u{1F3F3}\\uFE0F\\u200D\\u{1F308}','\\u{1F3F4}\\u200D\\u2620\\uFE0F','\\u{1F3F4}\\u{E0067}\\u{E0062}\\u{E0065}\\u{E006E}\\u{E0067}\\u{E007F}','\\u{1F3F4}\\u{E0067}\\u{E0062}\\u{E0073}\\u{E0063}\\u{E0074}\\u{E007F}','\\u{1F3F4}\\u{E0067}\\u{E0062}\\u{E0077}\\u{E006C}\\u{E0073}\\u{E007F}','\\u{1F3F5}\\uFE0F','\\u{1F3F7}\\uFE0F','\\u{1F408}\\u200D\\u2B1B','\\u{1F415}\\u200D\\u{1F9BA}','\\u{1F426}\\u200D\\u2B1B','\\u{1F426}\\u200D\\u{1F525}','\\u{1F43B}\\u200D\\u2744\\uFE0F','\\u{1F43F}\\uFE0F','\\u{1F441}\\uFE0F','\\u{1F441}\\uFE0F\\u200D\\u{1F5E8}\\uFE0F','\\u{1F442}\\u{1F3FB}','\\u{1F442}\\u{1F3FC}','\\u{1F442}\\u{1F3FD}','\\u{1F442}\\u{1F3FE}','\\u{1F442}\\u{1F3FF}','\\u{1F443}\\u{1F3FB}','\\u{1F443}\\u{1F3FC}','\\u{1F443}\\u{1F3FD}','\\u{1F443}\\u{1F3FE}','\\u{1F443}\\u{1F3FF}','\\u{1F446}\\u{1F3FB}','\\u{1F446}\\u{1F3FC}','\\u{1F446}\\u{1F3FD}','\\u{1F446}\\u{1F3FE}','\\u{1F446}\\u{1F3FF}','\\u{1F447}\\u{1F3FB}','\\u{1F447}\\u{1F3FC}','\\u{1F447}\\u{1F3FD}','\\u{1F447}\\u{1F3FE}','\\u{1F447}\\u{1F3FF}','\\u{1F448}\\u{1F3FB}','\\u{1F448}\\u{1F3FC}','\\u{1F448}\\u{1F3FD}','\\u{1F448}\\u{1F3FE}','\\u{1F448}\\u{1F3FF}','\\u{1F449}\\u{1F3FB}','\\u{1F449}\\u{1F3FC}','\\u{1F449}\\u{1F3FD}','\\u{1F449}\\u{1F3FE}','\\u{1F449}\\u{1F3FF}','\\u{1F44A}\\u{1F3FB}','\\u{1F44A}\\u{1F3FC}','\\u{1F44A}\\u{1F3FD}','\\u{1F44A}\\u{1F3FE}','\\u{1F44A}\\u{1F3FF}','\\u{1F44B}\\u{1F3FB}','\\u{1F44B}\\u{1F3FC}','\\u{1F44B}\\u{1F3FD}','\\u{1F44B}\\u{1F3FE}','\\u{1F44B}\\u{1F3FF}','\\u{1F44C}\\u{1F3FB}','\\u{1F44C}\\u{1F3FC}','\\u{1F44C}\\u{1F3FD}','\\u{1F44C}\\u{1F3FE}','\\u{1F44C}\\u{1F3FF}','\\u{1F44D}\\u{1F3FB}','\\u{1F44D}\\u{1F3FC}','\\u{1F44D}\\u{1F3FD}','\\u{1F44D}\\u{1F3FE}','\\u{1F44D}\\u{1F3FF}','\\u{1F44E}\\u{1F3FB}','\\u{1F44E}\\u{1F3FC}','\\u{1F44E}\\u{1F3FD}','\\u{1F44E}\\u{1F3FE}','\\u{1F44E}\\u{1F3FF}','\\u{1F44F}\\u{1F3FB}','\\u{1F44F}\\u{1F3FC}','\\u{1F44F}\\u{1F3FD}','\\u{1F44F}\\u{1F3FE}','\\u{1F44F}\\u{1F3FF}','\\u{1F450}\\u{1F3FB}','\\u{1F450}\\u{1F3FC}','\\u{1F450}\\u{1F3FD}','\\u{1F450}\\u{1F3FE}','\\u{1F450}\\u{1F3FF}','\\u{1F466}\\u{1F3FB}','\\u{1F466}\\u{1F3FC}','\\u{1F466}\\u{1F3FD}','\\u{1F466}\\u{1F3FE}','\\u{1F466}\\u{1F3FF}','\\u{1F467}\\u{1F3FB}','\\u{1F467}\\u{1F3FC}','\\u{1F467}\\u{1F3FD}','\\u{1F467}\\u{1F3FE}','\\u{1F467}\\u{1F3FF}','\\u{1F468}\\u200D\\u2695\\uFE0F','\\u{1F468}\\u200D\\u2696\\uFE0F','\\u{1F468}\\u200D\\u2708\\uFE0F','\\u{1F468}\\u200D\\u2764\\uFE0F\\u200D\\u{1F468}','\\u{1F468}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F468}','\\u{1F468}\\u200D\\u{1F33E}','\\u{1F468}\\u200D\\u{1F373}','\\u{1F468}\\u200D\\u{1F37C}','\\u{1F468}\\u200D\\u{1F393}','\\u{1F468}\\u200D\\u{1F3A4}','\\u{1F468}\\u200D\\u{1F3A8}','\\u{1F468}\\u200D\\u{1F3EB}','\\u{1F468}\\u200D\\u{1F3ED}','\\u{1F468}\\u200D\\u{1F466}','\\u{1F468}\\u200D\\u{1F466}\\u200D\\u{1F466}','\\u{1F468}\\u200D\\u{1F467}','\\u{1F468}\\u200D\\u{1F467}\\u200D\\u{1F466}','\\u{1F468}\\u200D\\u{1F467}\\u200D\\u{1F467}','\\u{1F468}\\u200D\\u{1F468}\\u200D\\u{1F466}','\\u{1F468}\\u200D\\u{1F468}\\u200D\\u{1F466}\\u200D\\u{1F466}','\\u{1F468}\\u200D\\u{1F468}\\u200D\\u{1F467}','\\u{1F468}\\u200D\\u{1F468}\\u200D\\u{1F467}\\u200D\\u{1F466}','\\u{1F468}\\u200D\\u{1F468}\\u200D\\u{1F467}\\u200D\\u{1F467}','\\u{1F468}\\u200D\\u{1F469}\\u200D\\u{1F466}','\\u{1F468}\\u200D\\u{1F469}\\u200D\\u{1F466}\\u200D\\u{1F466}','\\u{1F468}\\u200D\\u{1F469}\\u200D\\u{1F467}','\\u{1F468}\\u200D\\u{1F469}\\u200D\\u{1F467}\\u200D\\u{1F466}','\\u{1F468}\\u200D\\u{1F469}\\u200D\\u{1F467}\\u200D\\u{1F467}','\\u{1F468}\\u200D\\u{1F4BB}','\\u{1F468}\\u200D\\u{1F4BC}','\\u{1F468}\\u200D\\u{1F527}','\\u{1F468}\\u200D\\u{1F52C}','\\u{1F468}\\u200D\\u{1F680}','\\u{1F468}\\u200D\\u{1F692}','\\u{1F468}\\u200D\\u{1F9AF}','\\u{1F468}\\u200D\\u{1F9AF}\\u200D\\u27A1\\uFE0F','\\u{1F468}\\u200D\\u{1F9B0}','\\u{1F468}\\u200D\\u{1F9B1}','\\u{1F468}\\u200D\\u{1F9B2}','\\u{1F468}\\u200D\\u{1F9B3}','\\u{1F468}\\u200D\\u{1F9BC}','\\u{1F468}\\u200D\\u{1F9BC}\\u200D\\u27A1\\uFE0F','\\u{1F468}\\u200D\\u{1F9BD}','\\u{1F468}\\u200D\\u{1F9BD}\\u200D\\u27A1\\uFE0F','\\u{1F468}\\u{1F3FB}','\\u{1F468}\\u{1F3FB}\\u200D\\u2695\\uFE0F','\\u{1F468}\\u{1F3FB}\\u200D\\u2696\\uFE0F','\\u{1F468}\\u{1F3FB}\\u200D\\u2708\\uFE0F','\\u{1F468}\\u{1F3FB}\\u200D\\u2764\\uFE0F\\u200D\\u{1F468}\\u{1F3FB}','\\u{1F468}\\u{1F3FB}\\u200D\\u2764\\uFE0F\\u200D\\u{1F468}\\u{1F3FC}','\\u{1F468}\\u{1F3FB}\\u200D\\u2764\\uFE0F\\u200D\\u{1F468}\\u{1F3FD}','\\u{1F468}\\u{1F3FB}\\u200D\\u2764\\uFE0F\\u200D\\u{1F468}\\u{1F3FE}','\\u{1F468}\\u{1F3FB}\\u200D\\u2764\\uFE0F\\u200D\\u{1F468}\\u{1F3FF}','\\u{1F468}\\u{1F3FB}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F468}\\u{1F3FB}','\\u{1F468}\\u{1F3FB}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F468}\\u{1F3FC}','\\u{1F468}\\u{1F3FB}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F468}\\u{1F3FD}','\\u{1F468}\\u{1F3FB}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F468}\\u{1F3FE}','\\u{1F468}\\u{1F3FB}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F468}\\u{1F3FF}','\\u{1F468}\\u{1F3FB}\\u200D\\u{1F33E}','\\u{1F468}\\u{1F3FB}\\u200D\\u{1F373}','\\u{1F468}\\u{1F3FB}\\u200D\\u{1F37C}','\\u{1F468}\\u{1F3FB}\\u200D\\u{1F393}','\\u{1F468}\\u{1F3FB}\\u200D\\u{1F3A4}','\\u{1F468}\\u{1F3FB}\\u200D\\u{1F3A8}','\\u{1F468}\\u{1F3FB}\\u200D\\u{1F3EB}','\\u{1F468}\\u{1F3FB}\\u200D\\u{1F3ED}','\\u{1F468}\\u{1F3FB}\\u200D\\u{1F4BB}','\\u{1F468}\\u{1F3FB}\\u200D\\u{1F4BC}','\\u{1F468}\\u{1F3FB}\\u200D\\u{1F527}','\\u{1F468}\\u{1F3FB}\\u200D\\u{1F52C}','\\u{1F468}\\u{1F3FB}\\u200D\\u{1F680}','\\u{1F468}\\u{1F3FB}\\u200D\\u{1F692}','\\u{1F468}\\u{1F3FB}\\u200D\\u{1F91D}\\u200D\\u{1F468}\\u{1F3FC}','\\u{1F468}\\u{1F3FB}\\u200D\\u{1F91D}\\u200D\\u{1F468}\\u{1F3FD}','\\u{1F468}\\u{1F3FB}\\u200D\\u{1F91D}\\u200D\\u{1F468}\\u{1F3FE}','\\u{1F468}\\u{1F3FB}\\u200D\\u{1F91D}\\u200D\\u{1F468}\\u{1F3FF}','\\u{1F468}\\u{1F3FB}\\u200D\\u{1F9AF}','\\u{1F468}\\u{1F3FB}\\u200D\\u{1F9AF}\\u200D\\u27A1\\uFE0F','\\u{1F468}\\u{1F3FB}\\u200D\\u{1F9B0}','\\u{1F468}\\u{1F3FB}\\u200D\\u{1F9B1}','\\u{1F468}\\u{1F3FB}\\u200D\\u{1F9B2}','\\u{1F468}\\u{1F3FB}\\u200D\\u{1F9B3}','\\u{1F468}\\u{1F3FB}\\u200D\\u{1F9BC}','\\u{1F468}\\u{1F3FB}\\u200D\\u{1F9BC}\\u200D\\u27A1\\uFE0F','\\u{1F468}\\u{1F3FB}\\u200D\\u{1F9BD}','\\u{1F468}\\u{1F3FB}\\u200D\\u{1F9BD}\\u200D\\u27A1\\uFE0F','\\u{1F468}\\u{1F3FC}','\\u{1F468}\\u{1F3FC}\\u200D\\u2695\\uFE0F','\\u{1F468}\\u{1F3FC}\\u200D\\u2696\\uFE0F','\\u{1F468}\\u{1F3FC}\\u200D\\u2708\\uFE0F','\\u{1F468}\\u{1F3FC}\\u200D\\u2764\\uFE0F\\u200D\\u{1F468}\\u{1F3FB}','\\u{1F468}\\u{1F3FC}\\u200D\\u2764\\uFE0F\\u200D\\u{1F468}\\u{1F3FC}','\\u{1F468}\\u{1F3FC}\\u200D\\u2764\\uFE0F\\u200D\\u{1F468}\\u{1F3FD}','\\u{1F468}\\u{1F3FC}\\u200D\\u2764\\uFE0F\\u200D\\u{1F468}\\u{1F3FE}','\\u{1F468}\\u{1F3FC}\\u200D\\u2764\\uFE0F\\u200D\\u{1F468}\\u{1F3FF}','\\u{1F468}\\u{1F3FC}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F468}\\u{1F3FB}','\\u{1F468}\\u{1F3FC}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F468}\\u{1F3FC}','\\u{1F468}\\u{1F3FC}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F468}\\u{1F3FD}','\\u{1F468}\\u{1F3FC}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F468}\\u{1F3FE}','\\u{1F468}\\u{1F3FC}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F468}\\u{1F3FF}','\\u{1F468}\\u{1F3FC}\\u200D\\u{1F33E}','\\u{1F468}\\u{1F3FC}\\u200D\\u{1F373}','\\u{1F468}\\u{1F3FC}\\u200D\\u{1F37C}','\\u{1F468}\\u{1F3FC}\\u200D\\u{1F393}','\\u{1F468}\\u{1F3FC}\\u200D\\u{1F3A4}','\\u{1F468}\\u{1F3FC}\\u200D\\u{1F3A8}','\\u{1F468}\\u{1F3FC}\\u200D\\u{1F3EB}','\\u{1F468}\\u{1F3FC}\\u200D\\u{1F3ED}','\\u{1F468}\\u{1F3FC}\\u200D\\u{1F4BB}','\\u{1F468}\\u{1F3FC}\\u200D\\u{1F4BC}','\\u{1F468}\\u{1F3FC}\\u200D\\u{1F527}','\\u{1F468}\\u{1F3FC}\\u200D\\u{1F52C}','\\u{1F468}\\u{1F3FC}\\u200D\\u{1F680}','\\u{1F468}\\u{1F3FC}\\u200D\\u{1F692}','\\u{1F468}\\u{1F3FC}\\u200D\\u{1F91D}\\u200D\\u{1F468}\\u{1F3FB}','\\u{1F468}\\u{1F3FC}\\u200D\\u{1F91D}\\u200D\\u{1F468}\\u{1F3FD}','\\u{1F468}\\u{1F3FC}\\u200D\\u{1F91D}\\u200D\\u{1F468}\\u{1F3FE}','\\u{1F468}\\u{1F3FC}\\u200D\\u{1F91D}\\u200D\\u{1F468}\\u{1F3FF}','\\u{1F468}\\u{1F3FC}\\u200D\\u{1F9AF}','\\u{1F468}\\u{1F3FC}\\u200D\\u{1F9AF}\\u200D\\u27A1\\uFE0F','\\u{1F468}\\u{1F3FC}\\u200D\\u{1F9B0}','\\u{1F468}\\u{1F3FC}\\u200D\\u{1F9B1}','\\u{1F468}\\u{1F3FC}\\u200D\\u{1F9B2}','\\u{1F468}\\u{1F3FC}\\u200D\\u{1F9B3}','\\u{1F468}\\u{1F3FC}\\u200D\\u{1F9BC}','\\u{1F468}\\u{1F3FC}\\u200D\\u{1F9BC}\\u200D\\u27A1\\uFE0F','\\u{1F468}\\u{1F3FC}\\u200D\\u{1F9BD}','\\u{1F468}\\u{1F3FC}\\u200D\\u{1F9BD}\\u200D\\u27A1\\uFE0F','\\u{1F468}\\u{1F3FD}','\\u{1F468}\\u{1F3FD}\\u200D\\u2695\\uFE0F','\\u{1F468}\\u{1F3FD}\\u200D\\u2696\\uFE0F','\\u{1F468}\\u{1F3FD}\\u200D\\u2708\\uFE0F','\\u{1F468}\\u{1F3FD}\\u200D\\u2764\\uFE0F\\u200D\\u{1F468}\\u{1F3FB}','\\u{1F468}\\u{1F3FD}\\u200D\\u2764\\uFE0F\\u200D\\u{1F468}\\u{1F3FC}','\\u{1F468}\\u{1F3FD}\\u200D\\u2764\\uFE0F\\u200D\\u{1F468}\\u{1F3FD}','\\u{1F468}\\u{1F3FD}\\u200D\\u2764\\uFE0F\\u200D\\u{1F468}\\u{1F3FE}','\\u{1F468}\\u{1F3FD}\\u200D\\u2764\\uFE0F\\u200D\\u{1F468}\\u{1F3FF}','\\u{1F468}\\u{1F3FD}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F468}\\u{1F3FB}','\\u{1F468}\\u{1F3FD}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F468}\\u{1F3FC}','\\u{1F468}\\u{1F3FD}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F468}\\u{1F3FD}','\\u{1F468}\\u{1F3FD}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F468}\\u{1F3FE}','\\u{1F468}\\u{1F3FD}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F468}\\u{1F3FF}','\\u{1F468}\\u{1F3FD}\\u200D\\u{1F33E}','\\u{1F468}\\u{1F3FD}\\u200D\\u{1F373}','\\u{1F468}\\u{1F3FD}\\u200D\\u{1F37C}','\\u{1F468}\\u{1F3FD}\\u200D\\u{1F393}','\\u{1F468}\\u{1F3FD}\\u200D\\u{1F3A4}','\\u{1F468}\\u{1F3FD}\\u200D\\u{1F3A8}','\\u{1F468}\\u{1F3FD}\\u200D\\u{1F3EB}','\\u{1F468}\\u{1F3FD}\\u200D\\u{1F3ED}','\\u{1F468}\\u{1F3FD}\\u200D\\u{1F4BB}','\\u{1F468}\\u{1F3FD}\\u200D\\u{1F4BC}','\\u{1F468}\\u{1F3FD}\\u200D\\u{1F527}','\\u{1F468}\\u{1F3FD}\\u200D\\u{1F52C}','\\u{1F468}\\u{1F3FD}\\u200D\\u{1F680}','\\u{1F468}\\u{1F3FD}\\u200D\\u{1F692}','\\u{1F468}\\u{1F3FD}\\u200D\\u{1F91D}\\u200D\\u{1F468}\\u{1F3FB}','\\u{1F468}\\u{1F3FD}\\u200D\\u{1F91D}\\u200D\\u{1F468}\\u{1F3FC}','\\u{1F468}\\u{1F3FD}\\u200D\\u{1F91D}\\u200D\\u{1F468}\\u{1F3FE}','\\u{1F468}\\u{1F3FD}\\u200D\\u{1F91D}\\u200D\\u{1F468}\\u{1F3FF}','\\u{1F468}\\u{1F3FD}\\u200D\\u{1F9AF}','\\u{1F468}\\u{1F3FD}\\u200D\\u{1F9AF}\\u200D\\u27A1\\uFE0F','\\u{1F468}\\u{1F3FD}\\u200D\\u{1F9B0}','\\u{1F468}\\u{1F3FD}\\u200D\\u{1F9B1}','\\u{1F468}\\u{1F3FD}\\u200D\\u{1F9B2}','\\u{1F468}\\u{1F3FD}\\u200D\\u{1F9B3}','\\u{1F468}\\u{1F3FD}\\u200D\\u{1F9BC}','\\u{1F468}\\u{1F3FD}\\u200D\\u{1F9BC}\\u200D\\u27A1\\uFE0F','\\u{1F468}\\u{1F3FD}\\u200D\\u{1F9BD}','\\u{1F468}\\u{1F3FD}\\u200D\\u{1F9BD}\\u200D\\u27A1\\uFE0F','\\u{1F468}\\u{1F3FE}','\\u{1F468}\\u{1F3FE}\\u200D\\u2695\\uFE0F','\\u{1F468}\\u{1F3FE}\\u200D\\u2696\\uFE0F','\\u{1F468}\\u{1F3FE}\\u200D\\u2708\\uFE0F','\\u{1F468}\\u{1F3FE}\\u200D\\u2764\\uFE0F\\u200D\\u{1F468}\\u{1F3FB}','\\u{1F468}\\u{1F3FE}\\u200D\\u2764\\uFE0F\\u200D\\u{1F468}\\u{1F3FC}','\\u{1F468}\\u{1F3FE}\\u200D\\u2764\\uFE0F\\u200D\\u{1F468}\\u{1F3FD}','\\u{1F468}\\u{1F3FE}\\u200D\\u2764\\uFE0F\\u200D\\u{1F468}\\u{1F3FE}','\\u{1F468}\\u{1F3FE}\\u200D\\u2764\\uFE0F\\u200D\\u{1F468}\\u{1F3FF}','\\u{1F468}\\u{1F3FE}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F468}\\u{1F3FB}','\\u{1F468}\\u{1F3FE}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F468}\\u{1F3FC}','\\u{1F468}\\u{1F3FE}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F468}\\u{1F3FD}','\\u{1F468}\\u{1F3FE}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F468}\\u{1F3FE}','\\u{1F468}\\u{1F3FE}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F468}\\u{1F3FF}','\\u{1F468}\\u{1F3FE}\\u200D\\u{1F33E}','\\u{1F468}\\u{1F3FE}\\u200D\\u{1F373}','\\u{1F468}\\u{1F3FE}\\u200D\\u{1F37C}','\\u{1F468}\\u{1F3FE}\\u200D\\u{1F393}','\\u{1F468}\\u{1F3FE}\\u200D\\u{1F3A4}','\\u{1F468}\\u{1F3FE}\\u200D\\u{1F3A8}','\\u{1F468}\\u{1F3FE}\\u200D\\u{1F3EB}','\\u{1F468}\\u{1F3FE}\\u200D\\u{1F3ED}','\\u{1F468}\\u{1F3FE}\\u200D\\u{1F4BB}','\\u{1F468}\\u{1F3FE}\\u200D\\u{1F4BC}','\\u{1F468}\\u{1F3FE}\\u200D\\u{1F527}','\\u{1F468}\\u{1F3FE}\\u200D\\u{1F52C}','\\u{1F468}\\u{1F3FE}\\u200D\\u{1F680}','\\u{1F468}\\u{1F3FE}\\u200D\\u{1F692}','\\u{1F468}\\u{1F3FE}\\u200D\\u{1F91D}\\u200D\\u{1F468}\\u{1F3FB}','\\u{1F468}\\u{1F3FE}\\u200D\\u{1F91D}\\u200D\\u{1F468}\\u{1F3FC}','\\u{1F468}\\u{1F3FE}\\u200D\\u{1F91D}\\u200D\\u{1F468}\\u{1F3FD}','\\u{1F468}\\u{1F3FE}\\u200D\\u{1F91D}\\u200D\\u{1F468}\\u{1F3FF}','\\u{1F468}\\u{1F3FE}\\u200D\\u{1F9AF}','\\u{1F468}\\u{1F3FE}\\u200D\\u{1F9AF}\\u200D\\u27A1\\uFE0F','\\u{1F468}\\u{1F3FE}\\u200D\\u{1F9B0}','\\u{1F468}\\u{1F3FE}\\u200D\\u{1F9B1}','\\u{1F468}\\u{1F3FE}\\u200D\\u{1F9B2}','\\u{1F468}\\u{1F3FE}\\u200D\\u{1F9B3}','\\u{1F468}\\u{1F3FE}\\u200D\\u{1F9BC}','\\u{1F468}\\u{1F3FE}\\u200D\\u{1F9BC}\\u200D\\u27A1\\uFE0F','\\u{1F468}\\u{1F3FE}\\u200D\\u{1F9BD}','\\u{1F468}\\u{1F3FE}\\u200D\\u{1F9BD}\\u200D\\u27A1\\uFE0F','\\u{1F468}\\u{1F3FF}','\\u{1F468}\\u{1F3FF}\\u200D\\u2695\\uFE0F','\\u{1F468}\\u{1F3FF}\\u200D\\u2696\\uFE0F','\\u{1F468}\\u{1F3FF}\\u200D\\u2708\\uFE0F','\\u{1F468}\\u{1F3FF}\\u200D\\u2764\\uFE0F\\u200D\\u{1F468}\\u{1F3FB}','\\u{1F468}\\u{1F3FF}\\u200D\\u2764\\uFE0F\\u200D\\u{1F468}\\u{1F3FC}','\\u{1F468}\\u{1F3FF}\\u200D\\u2764\\uFE0F\\u200D\\u{1F468}\\u{1F3FD}','\\u{1F468}\\u{1F3FF}\\u200D\\u2764\\uFE0F\\u200D\\u{1F468}\\u{1F3FE}','\\u{1F468}\\u{1F3FF}\\u200D\\u2764\\uFE0F\\u200D\\u{1F468}\\u{1F3FF}','\\u{1F468}\\u{1F3FF}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F468}\\u{1F3FB}','\\u{1F468}\\u{1F3FF}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F468}\\u{1F3FC}','\\u{1F468}\\u{1F3FF}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F468}\\u{1F3FD}','\\u{1F468}\\u{1F3FF}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F468}\\u{1F3FE}','\\u{1F468}\\u{1F3FF}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F468}\\u{1F3FF}','\\u{1F468}\\u{1F3FF}\\u200D\\u{1F33E}','\\u{1F468}\\u{1F3FF}\\u200D\\u{1F373}','\\u{1F468}\\u{1F3FF}\\u200D\\u{1F37C}','\\u{1F468}\\u{1F3FF}\\u200D\\u{1F393}','\\u{1F468}\\u{1F3FF}\\u200D\\u{1F3A4}','\\u{1F468}\\u{1F3FF}\\u200D\\u{1F3A8}','\\u{1F468}\\u{1F3FF}\\u200D\\u{1F3EB}','\\u{1F468}\\u{1F3FF}\\u200D\\u{1F3ED}','\\u{1F468}\\u{1F3FF}\\u200D\\u{1F4BB}','\\u{1F468}\\u{1F3FF}\\u200D\\u{1F4BC}','\\u{1F468}\\u{1F3FF}\\u200D\\u{1F527}','\\u{1F468}\\u{1F3FF}\\u200D\\u{1F52C}','\\u{1F468}\\u{1F3FF}\\u200D\\u{1F680}','\\u{1F468}\\u{1F3FF}\\u200D\\u{1F692}','\\u{1F468}\\u{1F3FF}\\u200D\\u{1F91D}\\u200D\\u{1F468}\\u{1F3FB}','\\u{1F468}\\u{1F3FF}\\u200D\\u{1F91D}\\u200D\\u{1F468}\\u{1F3FC}','\\u{1F468}\\u{1F3FF}\\u200D\\u{1F91D}\\u200D\\u{1F468}\\u{1F3FD}','\\u{1F468}\\u{1F3FF}\\u200D\\u{1F91D}\\u200D\\u{1F468}\\u{1F3FE}','\\u{1F468}\\u{1F3FF}\\u200D\\u{1F9AF}','\\u{1F468}\\u{1F3FF}\\u200D\\u{1F9AF}\\u200D\\u27A1\\uFE0F','\\u{1F468}\\u{1F3FF}\\u200D\\u{1F9B0}','\\u{1F468}\\u{1F3FF}\\u200D\\u{1F9B1}','\\u{1F468}\\u{1F3FF}\\u200D\\u{1F9B2}','\\u{1F468}\\u{1F3FF}\\u200D\\u{1F9B3}','\\u{1F468}\\u{1F3FF}\\u200D\\u{1F9BC}','\\u{1F468}\\u{1F3FF}\\u200D\\u{1F9BC}\\u200D\\u27A1\\uFE0F','\\u{1F468}\\u{1F3FF}\\u200D\\u{1F9BD}','\\u{1F468}\\u{1F3FF}\\u200D\\u{1F9BD}\\u200D\\u27A1\\uFE0F','\\u{1F469}\\u200D\\u2695\\uFE0F','\\u{1F469}\\u200D\\u2696\\uFE0F','\\u{1F469}\\u200D\\u2708\\uFE0F','\\u{1F469}\\u200D\\u2764\\uFE0F\\u200D\\u{1F468}','\\u{1F469}\\u200D\\u2764\\uFE0F\\u200D\\u{1F469}','\\u{1F469}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F468}','\\u{1F469}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F469}','\\u{1F469}\\u200D\\u{1F33E}','\\u{1F469}\\u200D\\u{1F373}','\\u{1F469}\\u200D\\u{1F37C}','\\u{1F469}\\u200D\\u{1F393}','\\u{1F469}\\u200D\\u{1F3A4}','\\u{1F469}\\u200D\\u{1F3A8}','\\u{1F469}\\u200D\\u{1F3EB}','\\u{1F469}\\u200D\\u{1F3ED}','\\u{1F469}\\u200D\\u{1F466}','\\u{1F469}\\u200D\\u{1F466}\\u200D\\u{1F466}','\\u{1F469}\\u200D\\u{1F467}','\\u{1F469}\\u200D\\u{1F467}\\u200D\\u{1F466}','\\u{1F469}\\u200D\\u{1F467}\\u200D\\u{1F467}','\\u{1F469}\\u200D\\u{1F469}\\u200D\\u{1F466}','\\u{1F469}\\u200D\\u{1F469}\\u200D\\u{1F466}\\u200D\\u{1F466}','\\u{1F469}\\u200D\\u{1F469}\\u200D\\u{1F467}','\\u{1F469}\\u200D\\u{1F469}\\u200D\\u{1F467}\\u200D\\u{1F466}','\\u{1F469}\\u200D\\u{1F469}\\u200D\\u{1F467}\\u200D\\u{1F467}','\\u{1F469}\\u200D\\u{1F4BB}','\\u{1F469}\\u200D\\u{1F4BC}','\\u{1F469}\\u200D\\u{1F527}','\\u{1F469}\\u200D\\u{1F52C}','\\u{1F469}\\u200D\\u{1F680}','\\u{1F469}\\u200D\\u{1F692}','\\u{1F469}\\u200D\\u{1F9AF}','\\u{1F469}\\u200D\\u{1F9AF}\\u200D\\u27A1\\uFE0F','\\u{1F469}\\u200D\\u{1F9B0}','\\u{1F469}\\u200D\\u{1F9B1}','\\u{1F469}\\u200D\\u{1F9B2}','\\u{1F469}\\u200D\\u{1F9B3}','\\u{1F469}\\u200D\\u{1F9BC}','\\u{1F469}\\u200D\\u{1F9BC}\\u200D\\u27A1\\uFE0F','\\u{1F469}\\u200D\\u{1F9BD}','\\u{1F469}\\u200D\\u{1F9BD}\\u200D\\u27A1\\uFE0F','\\u{1F469}\\u{1F3FB}','\\u{1F469}\\u{1F3FB}\\u200D\\u2695\\uFE0F','\\u{1F469}\\u{1F3FB}\\u200D\\u2696\\uFE0F','\\u{1F469}\\u{1F3FB}\\u200D\\u2708\\uFE0F','\\u{1F469}\\u{1F3FB}\\u200D\\u2764\\uFE0F\\u200D\\u{1F468}\\u{1F3FB}','\\u{1F469}\\u{1F3FB}\\u200D\\u2764\\uFE0F\\u200D\\u{1F468}\\u{1F3FC}','\\u{1F469}\\u{1F3FB}\\u200D\\u2764\\uFE0F\\u200D\\u{1F468}\\u{1F3FD}','\\u{1F469}\\u{1F3FB}\\u200D\\u2764\\uFE0F\\u200D\\u{1F468}\\u{1F3FE}','\\u{1F469}\\u{1F3FB}\\u200D\\u2764\\uFE0F\\u200D\\u{1F468}\\u{1F3FF}','\\u{1F469}\\u{1F3FB}\\u200D\\u2764\\uFE0F\\u200D\\u{1F469}\\u{1F3FB}','\\u{1F469}\\u{1F3FB}\\u200D\\u2764\\uFE0F\\u200D\\u{1F469}\\u{1F3FC}','\\u{1F469}\\u{1F3FB}\\u200D\\u2764\\uFE0F\\u200D\\u{1F469}\\u{1F3FD}','\\u{1F469}\\u{1F3FB}\\u200D\\u2764\\uFE0F\\u200D\\u{1F469}\\u{1F3FE}','\\u{1F469}\\u{1F3FB}\\u200D\\u2764\\uFE0F\\u200D\\u{1F469}\\u{1F3FF}','\\u{1F469}\\u{1F3FB}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F468}\\u{1F3FB}','\\u{1F469}\\u{1F3FB}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F468}\\u{1F3FC}','\\u{1F469}\\u{1F3FB}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F468}\\u{1F3FD}','\\u{1F469}\\u{1F3FB}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F468}\\u{1F3FE}','\\u{1F469}\\u{1F3FB}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F468}\\u{1F3FF}','\\u{1F469}\\u{1F3FB}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F469}\\u{1F3FB}','\\u{1F469}\\u{1F3FB}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F469}\\u{1F3FC}','\\u{1F469}\\u{1F3FB}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F469}\\u{1F3FD}','\\u{1F469}\\u{1F3FB}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F469}\\u{1F3FE}','\\u{1F469}\\u{1F3FB}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F469}\\u{1F3FF}','\\u{1F469}\\u{1F3FB}\\u200D\\u{1F33E}','\\u{1F469}\\u{1F3FB}\\u200D\\u{1F373}','\\u{1F469}\\u{1F3FB}\\u200D\\u{1F37C}','\\u{1F469}\\u{1F3FB}\\u200D\\u{1F393}','\\u{1F469}\\u{1F3FB}\\u200D\\u{1F3A4}','\\u{1F469}\\u{1F3FB}\\u200D\\u{1F3A8}','\\u{1F469}\\u{1F3FB}\\u200D\\u{1F3EB}','\\u{1F469}\\u{1F3FB}\\u200D\\u{1F3ED}','\\u{1F469}\\u{1F3FB}\\u200D\\u{1F4BB}','\\u{1F469}\\u{1F3FB}\\u200D\\u{1F4BC}','\\u{1F469}\\u{1F3FB}\\u200D\\u{1F527}','\\u{1F469}\\u{1F3FB}\\u200D\\u{1F52C}','\\u{1F469}\\u{1F3FB}\\u200D\\u{1F680}','\\u{1F469}\\u{1F3FB}\\u200D\\u{1F692}','\\u{1F469}\\u{1F3FB}\\u200D\\u{1F91D}\\u200D\\u{1F468}\\u{1F3FC}','\\u{1F469}\\u{1F3FB}\\u200D\\u{1F91D}\\u200D\\u{1F468}\\u{1F3FD}','\\u{1F469}\\u{1F3FB}\\u200D\\u{1F91D}\\u200D\\u{1F468}\\u{1F3FE}','\\u{1F469}\\u{1F3FB}\\u200D\\u{1F91D}\\u200D\\u{1F468}\\u{1F3FF}','\\u{1F469}\\u{1F3FB}\\u200D\\u{1F91D}\\u200D\\u{1F469}\\u{1F3FC}','\\u{1F469}\\u{1F3FB}\\u200D\\u{1F91D}\\u200D\\u{1F469}\\u{1F3FD}','\\u{1F469}\\u{1F3FB}\\u200D\\u{1F91D}\\u200D\\u{1F469}\\u{1F3FE}','\\u{1F469}\\u{1F3FB}\\u200D\\u{1F91D}\\u200D\\u{1F469}\\u{1F3FF}','\\u{1F469}\\u{1F3FB}\\u200D\\u{1F9AF}','\\u{1F469}\\u{1F3FB}\\u200D\\u{1F9AF}\\u200D\\u27A1\\uFE0F','\\u{1F469}\\u{1F3FB}\\u200D\\u{1F9B0}','\\u{1F469}\\u{1F3FB}\\u200D\\u{1F9B1}','\\u{1F469}\\u{1F3FB}\\u200D\\u{1F9B2}','\\u{1F469}\\u{1F3FB}\\u200D\\u{1F9B3}','\\u{1F469}\\u{1F3FB}\\u200D\\u{1F9BC}','\\u{1F469}\\u{1F3FB}\\u200D\\u{1F9BC}\\u200D\\u27A1\\uFE0F','\\u{1F469}\\u{1F3FB}\\u200D\\u{1F9BD}','\\u{1F469}\\u{1F3FB}\\u200D\\u{1F9BD}\\u200D\\u27A1\\uFE0F','\\u{1F469}\\u{1F3FC}','\\u{1F469}\\u{1F3FC}\\u200D\\u2695\\uFE0F','\\u{1F469}\\u{1F3FC}\\u200D\\u2696\\uFE0F','\\u{1F469}\\u{1F3FC}\\u200D\\u2708\\uFE0F','\\u{1F469}\\u{1F3FC}\\u200D\\u2764\\uFE0F\\u200D\\u{1F468}\\u{1F3FB}','\\u{1F469}\\u{1F3FC}\\u200D\\u2764\\uFE0F\\u200D\\u{1F468}\\u{1F3FC}','\\u{1F469}\\u{1F3FC}\\u200D\\u2764\\uFE0F\\u200D\\u{1F468}\\u{1F3FD}','\\u{1F469}\\u{1F3FC}\\u200D\\u2764\\uFE0F\\u200D\\u{1F468}\\u{1F3FE}','\\u{1F469}\\u{1F3FC}\\u200D\\u2764\\uFE0F\\u200D\\u{1F468}\\u{1F3FF}','\\u{1F469}\\u{1F3FC}\\u200D\\u2764\\uFE0F\\u200D\\u{1F469}\\u{1F3FB}','\\u{1F469}\\u{1F3FC}\\u200D\\u2764\\uFE0F\\u200D\\u{1F469}\\u{1F3FC}','\\u{1F469}\\u{1F3FC}\\u200D\\u2764\\uFE0F\\u200D\\u{1F469}\\u{1F3FD}','\\u{1F469}\\u{1F3FC}\\u200D\\u2764\\uFE0F\\u200D\\u{1F469}\\u{1F3FE}','\\u{1F469}\\u{1F3FC}\\u200D\\u2764\\uFE0F\\u200D\\u{1F469}\\u{1F3FF}','\\u{1F469}\\u{1F3FC}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F468}\\u{1F3FB}','\\u{1F469}\\u{1F3FC}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F468}\\u{1F3FC}','\\u{1F469}\\u{1F3FC}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F468}\\u{1F3FD}','\\u{1F469}\\u{1F3FC}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F468}\\u{1F3FE}','\\u{1F469}\\u{1F3FC}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F468}\\u{1F3FF}','\\u{1F469}\\u{1F3FC}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F469}\\u{1F3FB}','\\u{1F469}\\u{1F3FC}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F469}\\u{1F3FC}','\\u{1F469}\\u{1F3FC}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F469}\\u{1F3FD}','\\u{1F469}\\u{1F3FC}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F469}\\u{1F3FE}','\\u{1F469}\\u{1F3FC}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F469}\\u{1F3FF}','\\u{1F469}\\u{1F3FC}\\u200D\\u{1F33E}','\\u{1F469}\\u{1F3FC}\\u200D\\u{1F373}','\\u{1F469}\\u{1F3FC}\\u200D\\u{1F37C}','\\u{1F469}\\u{1F3FC}\\u200D\\u{1F393}','\\u{1F469}\\u{1F3FC}\\u200D\\u{1F3A4}','\\u{1F469}\\u{1F3FC}\\u200D\\u{1F3A8}','\\u{1F469}\\u{1F3FC}\\u200D\\u{1F3EB}','\\u{1F469}\\u{1F3FC}\\u200D\\u{1F3ED}','\\u{1F469}\\u{1F3FC}\\u200D\\u{1F4BB}','\\u{1F469}\\u{1F3FC}\\u200D\\u{1F4BC}','\\u{1F469}\\u{1F3FC}\\u200D\\u{1F527}','\\u{1F469}\\u{1F3FC}\\u200D\\u{1F52C}','\\u{1F469}\\u{1F3FC}\\u200D\\u{1F680}','\\u{1F469}\\u{1F3FC}\\u200D\\u{1F692}','\\u{1F469}\\u{1F3FC}\\u200D\\u{1F91D}\\u200D\\u{1F468}\\u{1F3FB}','\\u{1F469}\\u{1F3FC}\\u200D\\u{1F91D}\\u200D\\u{1F468}\\u{1F3FD}','\\u{1F469}\\u{1F3FC}\\u200D\\u{1F91D}\\u200D\\u{1F468}\\u{1F3FE}','\\u{1F469}\\u{1F3FC}\\u200D\\u{1F91D}\\u200D\\u{1F468}\\u{1F3FF}','\\u{1F469}\\u{1F3FC}\\u200D\\u{1F91D}\\u200D\\u{1F469}\\u{1F3FB}','\\u{1F469}\\u{1F3FC}\\u200D\\u{1F91D}\\u200D\\u{1F469}\\u{1F3FD}','\\u{1F469}\\u{1F3FC}\\u200D\\u{1F91D}\\u200D\\u{1F469}\\u{1F3FE}','\\u{1F469}\\u{1F3FC}\\u200D\\u{1F91D}\\u200D\\u{1F469}\\u{1F3FF}','\\u{1F469}\\u{1F3FC}\\u200D\\u{1F9AF}','\\u{1F469}\\u{1F3FC}\\u200D\\u{1F9AF}\\u200D\\u27A1\\uFE0F','\\u{1F469}\\u{1F3FC}\\u200D\\u{1F9B0}','\\u{1F469}\\u{1F3FC}\\u200D\\u{1F9B1}','\\u{1F469}\\u{1F3FC}\\u200D\\u{1F9B2}','\\u{1F469}\\u{1F3FC}\\u200D\\u{1F9B3}','\\u{1F469}\\u{1F3FC}\\u200D\\u{1F9BC}','\\u{1F469}\\u{1F3FC}\\u200D\\u{1F9BC}\\u200D\\u27A1\\uFE0F','\\u{1F469}\\u{1F3FC}\\u200D\\u{1F9BD}','\\u{1F469}\\u{1F3FC}\\u200D\\u{1F9BD}\\u200D\\u27A1\\uFE0F','\\u{1F469}\\u{1F3FD}','\\u{1F469}\\u{1F3FD}\\u200D\\u2695\\uFE0F','\\u{1F469}\\u{1F3FD}\\u200D\\u2696\\uFE0F','\\u{1F469}\\u{1F3FD}\\u200D\\u2708\\uFE0F','\\u{1F469}\\u{1F3FD}\\u200D\\u2764\\uFE0F\\u200D\\u{1F468}\\u{1F3FB}','\\u{1F469}\\u{1F3FD}\\u200D\\u2764\\uFE0F\\u200D\\u{1F468}\\u{1F3FC}','\\u{1F469}\\u{1F3FD}\\u200D\\u2764\\uFE0F\\u200D\\u{1F468}\\u{1F3FD}','\\u{1F469}\\u{1F3FD}\\u200D\\u2764\\uFE0F\\u200D\\u{1F468}\\u{1F3FE}','\\u{1F469}\\u{1F3FD}\\u200D\\u2764\\uFE0F\\u200D\\u{1F468}\\u{1F3FF}','\\u{1F469}\\u{1F3FD}\\u200D\\u2764\\uFE0F\\u200D\\u{1F469}\\u{1F3FB}','\\u{1F469}\\u{1F3FD}\\u200D\\u2764\\uFE0F\\u200D\\u{1F469}\\u{1F3FC}','\\u{1F469}\\u{1F3FD}\\u200D\\u2764\\uFE0F\\u200D\\u{1F469}\\u{1F3FD}','\\u{1F469}\\u{1F3FD}\\u200D\\u2764\\uFE0F\\u200D\\u{1F469}\\u{1F3FE}','\\u{1F469}\\u{1F3FD}\\u200D\\u2764\\uFE0F\\u200D\\u{1F469}\\u{1F3FF}','\\u{1F469}\\u{1F3FD}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F468}\\u{1F3FB}','\\u{1F469}\\u{1F3FD}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F468}\\u{1F3FC}','\\u{1F469}\\u{1F3FD}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F468}\\u{1F3FD}','\\u{1F469}\\u{1F3FD}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F468}\\u{1F3FE}','\\u{1F469}\\u{1F3FD}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F468}\\u{1F3FF}','\\u{1F469}\\u{1F3FD}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F469}\\u{1F3FB}','\\u{1F469}\\u{1F3FD}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F469}\\u{1F3FC}','\\u{1F469}\\u{1F3FD}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F469}\\u{1F3FD}','\\u{1F469}\\u{1F3FD}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F469}\\u{1F3FE}','\\u{1F469}\\u{1F3FD}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F469}\\u{1F3FF}','\\u{1F469}\\u{1F3FD}\\u200D\\u{1F33E}','\\u{1F469}\\u{1F3FD}\\u200D\\u{1F373}','\\u{1F469}\\u{1F3FD}\\u200D\\u{1F37C}','\\u{1F469}\\u{1F3FD}\\u200D\\u{1F393}','\\u{1F469}\\u{1F3FD}\\u200D\\u{1F3A4}','\\u{1F469}\\u{1F3FD}\\u200D\\u{1F3A8}','\\u{1F469}\\u{1F3FD}\\u200D\\u{1F3EB}','\\u{1F469}\\u{1F3FD}\\u200D\\u{1F3ED}','\\u{1F469}\\u{1F3FD}\\u200D\\u{1F4BB}','\\u{1F469}\\u{1F3FD}\\u200D\\u{1F4BC}','\\u{1F469}\\u{1F3FD}\\u200D\\u{1F527}','\\u{1F469}\\u{1F3FD}\\u200D\\u{1F52C}','\\u{1F469}\\u{1F3FD}\\u200D\\u{1F680}','\\u{1F469}\\u{1F3FD}\\u200D\\u{1F692}','\\u{1F469}\\u{1F3FD}\\u200D\\u{1F91D}\\u200D\\u{1F468}\\u{1F3FB}','\\u{1F469}\\u{1F3FD}\\u200D\\u{1F91D}\\u200D\\u{1F468}\\u{1F3FC}','\\u{1F469}\\u{1F3FD}\\u200D\\u{1F91D}\\u200D\\u{1F468}\\u{1F3FE}','\\u{1F469}\\u{1F3FD}\\u200D\\u{1F91D}\\u200D\\u{1F468}\\u{1F3FF}','\\u{1F469}\\u{1F3FD}\\u200D\\u{1F91D}\\u200D\\u{1F469}\\u{1F3FB}','\\u{1F469}\\u{1F3FD}\\u200D\\u{1F91D}\\u200D\\u{1F469}\\u{1F3FC}','\\u{1F469}\\u{1F3FD}\\u200D\\u{1F91D}\\u200D\\u{1F469}\\u{1F3FE}','\\u{1F469}\\u{1F3FD}\\u200D\\u{1F91D}\\u200D\\u{1F469}\\u{1F3FF}','\\u{1F469}\\u{1F3FD}\\u200D\\u{1F9AF}','\\u{1F469}\\u{1F3FD}\\u200D\\u{1F9AF}\\u200D\\u27A1\\uFE0F','\\u{1F469}\\u{1F3FD}\\u200D\\u{1F9B0}','\\u{1F469}\\u{1F3FD}\\u200D\\u{1F9B1}','\\u{1F469}\\u{1F3FD}\\u200D\\u{1F9B2}','\\u{1F469}\\u{1F3FD}\\u200D\\u{1F9B3}','\\u{1F469}\\u{1F3FD}\\u200D\\u{1F9BC}','\\u{1F469}\\u{1F3FD}\\u200D\\u{1F9BC}\\u200D\\u27A1\\uFE0F','\\u{1F469}\\u{1F3FD}\\u200D\\u{1F9BD}','\\u{1F469}\\u{1F3FD}\\u200D\\u{1F9BD}\\u200D\\u27A1\\uFE0F','\\u{1F469}\\u{1F3FE}','\\u{1F469}\\u{1F3FE}\\u200D\\u2695\\uFE0F','\\u{1F469}\\u{1F3FE}\\u200D\\u2696\\uFE0F','\\u{1F469}\\u{1F3FE}\\u200D\\u2708\\uFE0F','\\u{1F469}\\u{1F3FE}\\u200D\\u2764\\uFE0F\\u200D\\u{1F468}\\u{1F3FB}','\\u{1F469}\\u{1F3FE}\\u200D\\u2764\\uFE0F\\u200D\\u{1F468}\\u{1F3FC}','\\u{1F469}\\u{1F3FE}\\u200D\\u2764\\uFE0F\\u200D\\u{1F468}\\u{1F3FD}','\\u{1F469}\\u{1F3FE}\\u200D\\u2764\\uFE0F\\u200D\\u{1F468}\\u{1F3FE}','\\u{1F469}\\u{1F3FE}\\u200D\\u2764\\uFE0F\\u200D\\u{1F468}\\u{1F3FF}','\\u{1F469}\\u{1F3FE}\\u200D\\u2764\\uFE0F\\u200D\\u{1F469}\\u{1F3FB}','\\u{1F469}\\u{1F3FE}\\u200D\\u2764\\uFE0F\\u200D\\u{1F469}\\u{1F3FC}','\\u{1F469}\\u{1F3FE}\\u200D\\u2764\\uFE0F\\u200D\\u{1F469}\\u{1F3FD}','\\u{1F469}\\u{1F3FE}\\u200D\\u2764\\uFE0F\\u200D\\u{1F469}\\u{1F3FE}','\\u{1F469}\\u{1F3FE}\\u200D\\u2764\\uFE0F\\u200D\\u{1F469}\\u{1F3FF}','\\u{1F469}\\u{1F3FE}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F468}\\u{1F3FB}','\\u{1F469}\\u{1F3FE}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F468}\\u{1F3FC}','\\u{1F469}\\u{1F3FE}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F468}\\u{1F3FD}','\\u{1F469}\\u{1F3FE}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F468}\\u{1F3FE}','\\u{1F469}\\u{1F3FE}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F468}\\u{1F3FF}','\\u{1F469}\\u{1F3FE}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F469}\\u{1F3FB}','\\u{1F469}\\u{1F3FE}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F469}\\u{1F3FC}','\\u{1F469}\\u{1F3FE}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F469}\\u{1F3FD}','\\u{1F469}\\u{1F3FE}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F469}\\u{1F3FE}','\\u{1F469}\\u{1F3FE}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F469}\\u{1F3FF}','\\u{1F469}\\u{1F3FE}\\u200D\\u{1F33E}','\\u{1F469}\\u{1F3FE}\\u200D\\u{1F373}','\\u{1F469}\\u{1F3FE}\\u200D\\u{1F37C}','\\u{1F469}\\u{1F3FE}\\u200D\\u{1F393}','\\u{1F469}\\u{1F3FE}\\u200D\\u{1F3A4}','\\u{1F469}\\u{1F3FE}\\u200D\\u{1F3A8}','\\u{1F469}\\u{1F3FE}\\u200D\\u{1F3EB}','\\u{1F469}\\u{1F3FE}\\u200D\\u{1F3ED}','\\u{1F469}\\u{1F3FE}\\u200D\\u{1F4BB}','\\u{1F469}\\u{1F3FE}\\u200D\\u{1F4BC}','\\u{1F469}\\u{1F3FE}\\u200D\\u{1F527}','\\u{1F469}\\u{1F3FE}\\u200D\\u{1F52C}','\\u{1F469}\\u{1F3FE}\\u200D\\u{1F680}','\\u{1F469}\\u{1F3FE}\\u200D\\u{1F692}','\\u{1F469}\\u{1F3FE}\\u200D\\u{1F91D}\\u200D\\u{1F468}\\u{1F3FB}','\\u{1F469}\\u{1F3FE}\\u200D\\u{1F91D}\\u200D\\u{1F468}\\u{1F3FC}','\\u{1F469}\\u{1F3FE}\\u200D\\u{1F91D}\\u200D\\u{1F468}\\u{1F3FD}','\\u{1F469}\\u{1F3FE}\\u200D\\u{1F91D}\\u200D\\u{1F468}\\u{1F3FF}','\\u{1F469}\\u{1F3FE}\\u200D\\u{1F91D}\\u200D\\u{1F469}\\u{1F3FB}','\\u{1F469}\\u{1F3FE}\\u200D\\u{1F91D}\\u200D\\u{1F469}\\u{1F3FC}','\\u{1F469}\\u{1F3FE}\\u200D\\u{1F91D}\\u200D\\u{1F469}\\u{1F3FD}','\\u{1F469}\\u{1F3FE}\\u200D\\u{1F91D}\\u200D\\u{1F469}\\u{1F3FF}','\\u{1F469}\\u{1F3FE}\\u200D\\u{1F9AF}','\\u{1F469}\\u{1F3FE}\\u200D\\u{1F9AF}\\u200D\\u27A1\\uFE0F','\\u{1F469}\\u{1F3FE}\\u200D\\u{1F9B0}','\\u{1F469}\\u{1F3FE}\\u200D\\u{1F9B1}','\\u{1F469}\\u{1F3FE}\\u200D\\u{1F9B2}','\\u{1F469}\\u{1F3FE}\\u200D\\u{1F9B3}','\\u{1F469}\\u{1F3FE}\\u200D\\u{1F9BC}','\\u{1F469}\\u{1F3FE}\\u200D\\u{1F9BC}\\u200D\\u27A1\\uFE0F','\\u{1F469}\\u{1F3FE}\\u200D\\u{1F9BD}','\\u{1F469}\\u{1F3FE}\\u200D\\u{1F9BD}\\u200D\\u27A1\\uFE0F','\\u{1F469}\\u{1F3FF}','\\u{1F469}\\u{1F3FF}\\u200D\\u2695\\uFE0F','\\u{1F469}\\u{1F3FF}\\u200D\\u2696\\uFE0F','\\u{1F469}\\u{1F3FF}\\u200D\\u2708\\uFE0F','\\u{1F469}\\u{1F3FF}\\u200D\\u2764\\uFE0F\\u200D\\u{1F468}\\u{1F3FB}','\\u{1F469}\\u{1F3FF}\\u200D\\u2764\\uFE0F\\u200D\\u{1F468}\\u{1F3FC}','\\u{1F469}\\u{1F3FF}\\u200D\\u2764\\uFE0F\\u200D\\u{1F468}\\u{1F3FD}','\\u{1F469}\\u{1F3FF}\\u200D\\u2764\\uFE0F\\u200D\\u{1F468}\\u{1F3FE}','\\u{1F469}\\u{1F3FF}\\u200D\\u2764\\uFE0F\\u200D\\u{1F468}\\u{1F3FF}','\\u{1F469}\\u{1F3FF}\\u200D\\u2764\\uFE0F\\u200D\\u{1F469}\\u{1F3FB}','\\u{1F469}\\u{1F3FF}\\u200D\\u2764\\uFE0F\\u200D\\u{1F469}\\u{1F3FC}','\\u{1F469}\\u{1F3FF}\\u200D\\u2764\\uFE0F\\u200D\\u{1F469}\\u{1F3FD}','\\u{1F469}\\u{1F3FF}\\u200D\\u2764\\uFE0F\\u200D\\u{1F469}\\u{1F3FE}','\\u{1F469}\\u{1F3FF}\\u200D\\u2764\\uFE0F\\u200D\\u{1F469}\\u{1F3FF}','\\u{1F469}\\u{1F3FF}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F468}\\u{1F3FB}','\\u{1F469}\\u{1F3FF}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F468}\\u{1F3FC}','\\u{1F469}\\u{1F3FF}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F468}\\u{1F3FD}','\\u{1F469}\\u{1F3FF}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F468}\\u{1F3FE}','\\u{1F469}\\u{1F3FF}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F468}\\u{1F3FF}','\\u{1F469}\\u{1F3FF}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F469}\\u{1F3FB}','\\u{1F469}\\u{1F3FF}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F469}\\u{1F3FC}','\\u{1F469}\\u{1F3FF}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F469}\\u{1F3FD}','\\u{1F469}\\u{1F3FF}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F469}\\u{1F3FE}','\\u{1F469}\\u{1F3FF}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F469}\\u{1F3FF}','\\u{1F469}\\u{1F3FF}\\u200D\\u{1F33E}','\\u{1F469}\\u{1F3FF}\\u200D\\u{1F373}','\\u{1F469}\\u{1F3FF}\\u200D\\u{1F37C}','\\u{1F469}\\u{1F3FF}\\u200D\\u{1F393}','\\u{1F469}\\u{1F3FF}\\u200D\\u{1F3A4}','\\u{1F469}\\u{1F3FF}\\u200D\\u{1F3A8}','\\u{1F469}\\u{1F3FF}\\u200D\\u{1F3EB}','\\u{1F469}\\u{1F3FF}\\u200D\\u{1F3ED}','\\u{1F469}\\u{1F3FF}\\u200D\\u{1F4BB}','\\u{1F469}\\u{1F3FF}\\u200D\\u{1F4BC}','\\u{1F469}\\u{1F3FF}\\u200D\\u{1F527}','\\u{1F469}\\u{1F3FF}\\u200D\\u{1F52C}','\\u{1F469}\\u{1F3FF}\\u200D\\u{1F680}','\\u{1F469}\\u{1F3FF}\\u200D\\u{1F692}','\\u{1F469}\\u{1F3FF}\\u200D\\u{1F91D}\\u200D\\u{1F468}\\u{1F3FB}','\\u{1F469}\\u{1F3FF}\\u200D\\u{1F91D}\\u200D\\u{1F468}\\u{1F3FC}','\\u{1F469}\\u{1F3FF}\\u200D\\u{1F91D}\\u200D\\u{1F468}\\u{1F3FD}','\\u{1F469}\\u{1F3FF}\\u200D\\u{1F91D}\\u200D\\u{1F468}\\u{1F3FE}','\\u{1F469}\\u{1F3FF}\\u200D\\u{1F91D}\\u200D\\u{1F469}\\u{1F3FB}','\\u{1F469}\\u{1F3FF}\\u200D\\u{1F91D}\\u200D\\u{1F469}\\u{1F3FC}','\\u{1F469}\\u{1F3FF}\\u200D\\u{1F91D}\\u200D\\u{1F469}\\u{1F3FD}','\\u{1F469}\\u{1F3FF}\\u200D\\u{1F91D}\\u200D\\u{1F469}\\u{1F3FE}','\\u{1F469}\\u{1F3FF}\\u200D\\u{1F9AF}','\\u{1F469}\\u{1F3FF}\\u200D\\u{1F9AF}\\u200D\\u27A1\\uFE0F','\\u{1F469}\\u{1F3FF}\\u200D\\u{1F9B0}','\\u{1F469}\\u{1F3FF}\\u200D\\u{1F9B1}','\\u{1F469}\\u{1F3FF}\\u200D\\u{1F9B2}','\\u{1F469}\\u{1F3FF}\\u200D\\u{1F9B3}','\\u{1F469}\\u{1F3FF}\\u200D\\u{1F9BC}','\\u{1F469}\\u{1F3FF}\\u200D\\u{1F9BC}\\u200D\\u27A1\\uFE0F','\\u{1F469}\\u{1F3FF}\\u200D\\u{1F9BD}','\\u{1F469}\\u{1F3FF}\\u200D\\u{1F9BD}\\u200D\\u27A1\\uFE0F','\\u{1F46B}\\u{1F3FB}','\\u{1F46B}\\u{1F3FC}','\\u{1F46B}\\u{1F3FD}','\\u{1F46B}\\u{1F3FE}','\\u{1F46B}\\u{1F3FF}','\\u{1F46C}\\u{1F3FB}','\\u{1F46C}\\u{1F3FC}','\\u{1F46C}\\u{1F3FD}','\\u{1F46C}\\u{1F3FE}','\\u{1F46C}\\u{1F3FF}','\\u{1F46D}\\u{1F3FB}','\\u{1F46D}\\u{1F3FC}','\\u{1F46D}\\u{1F3FD}','\\u{1F46D}\\u{1F3FE}','\\u{1F46D}\\u{1F3FF}','\\u{1F46E}\\u200D\\u2640\\uFE0F','\\u{1F46E}\\u200D\\u2642\\uFE0F','\\u{1F46E}\\u{1F3FB}','\\u{1F46E}\\u{1F3FB}\\u200D\\u2640\\uFE0F','\\u{1F46E}\\u{1F3FB}\\u200D\\u2642\\uFE0F','\\u{1F46E}\\u{1F3FC}','\\u{1F46E}\\u{1F3FC}\\u200D\\u2640\\uFE0F','\\u{1F46E}\\u{1F3FC}\\u200D\\u2642\\uFE0F','\\u{1F46E}\\u{1F3FD}','\\u{1F46E}\\u{1F3FD}\\u200D\\u2640\\uFE0F','\\u{1F46E}\\u{1F3FD}\\u200D\\u2642\\uFE0F','\\u{1F46E}\\u{1F3FE}','\\u{1F46E}\\u{1F3FE}\\u200D\\u2640\\uFE0F','\\u{1F46E}\\u{1F3FE}\\u200D\\u2642\\uFE0F','\\u{1F46E}\\u{1F3FF}','\\u{1F46E}\\u{1F3FF}\\u200D\\u2640\\uFE0F','\\u{1F46E}\\u{1F3FF}\\u200D\\u2642\\uFE0F','\\u{1F46F}\\u200D\\u2640\\uFE0F','\\u{1F46F}\\u200D\\u2642\\uFE0F','\\u{1F470}\\u200D\\u2640\\uFE0F','\\u{1F470}\\u200D\\u2642\\uFE0F','\\u{1F470}\\u{1F3FB}','\\u{1F470}\\u{1F3FB}\\u200D\\u2640\\uFE0F','\\u{1F470}\\u{1F3FB}\\u200D\\u2642\\uFE0F','\\u{1F470}\\u{1F3FC}','\\u{1F470}\\u{1F3FC}\\u200D\\u2640\\uFE0F','\\u{1F470}\\u{1F3FC}\\u200D\\u2642\\uFE0F','\\u{1F470}\\u{1F3FD}','\\u{1F470}\\u{1F3FD}\\u200D\\u2640\\uFE0F','\\u{1F470}\\u{1F3FD}\\u200D\\u2642\\uFE0F','\\u{1F470}\\u{1F3FE}','\\u{1F470}\\u{1F3FE}\\u200D\\u2640\\uFE0F','\\u{1F470}\\u{1F3FE}\\u200D\\u2642\\uFE0F','\\u{1F470}\\u{1F3FF}','\\u{1F470}\\u{1F3FF}\\u200D\\u2640\\uFE0F','\\u{1F470}\\u{1F3FF}\\u200D\\u2642\\uFE0F','\\u{1F471}\\u200D\\u2640\\uFE0F','\\u{1F471}\\u200D\\u2642\\uFE0F','\\u{1F471}\\u{1F3FB}','\\u{1F471}\\u{1F3FB}\\u200D\\u2640\\uFE0F','\\u{1F471}\\u{1F3FB}\\u200D\\u2642\\uFE0F','\\u{1F471}\\u{1F3FC}','\\u{1F471}\\u{1F3FC}\\u200D\\u2640\\uFE0F','\\u{1F471}\\u{1F3FC}\\u200D\\u2642\\uFE0F','\\u{1F471}\\u{1F3FD}','\\u{1F471}\\u{1F3FD}\\u200D\\u2640\\uFE0F','\\u{1F471}\\u{1F3FD}\\u200D\\u2642\\uFE0F','\\u{1F471}\\u{1F3FE}','\\u{1F471}\\u{1F3FE}\\u200D\\u2640\\uFE0F','\\u{1F471}\\u{1F3FE}\\u200D\\u2642\\uFE0F','\\u{1F471}\\u{1F3FF}','\\u{1F471}\\u{1F3FF}\\u200D\\u2640\\uFE0F','\\u{1F471}\\u{1F3FF}\\u200D\\u2642\\uFE0F','\\u{1F472}\\u{1F3FB}','\\u{1F472}\\u{1F3FC}','\\u{1F472}\\u{1F3FD}','\\u{1F472}\\u{1F3FE}','\\u{1F472}\\u{1F3FF}','\\u{1F473}\\u200D\\u2640\\uFE0F','\\u{1F473}\\u200D\\u2642\\uFE0F','\\u{1F473}\\u{1F3FB}','\\u{1F473}\\u{1F3FB}\\u200D\\u2640\\uFE0F','\\u{1F473}\\u{1F3FB}\\u200D\\u2642\\uFE0F','\\u{1F473}\\u{1F3FC}','\\u{1F473}\\u{1F3FC}\\u200D\\u2640\\uFE0F','\\u{1F473}\\u{1F3FC}\\u200D\\u2642\\uFE0F','\\u{1F473}\\u{1F3FD}','\\u{1F473}\\u{1F3FD}\\u200D\\u2640\\uFE0F','\\u{1F473}\\u{1F3FD}\\u200D\\u2642\\uFE0F','\\u{1F473}\\u{1F3FE}','\\u{1F473}\\u{1F3FE}\\u200D\\u2640\\uFE0F','\\u{1F473}\\u{1F3FE}\\u200D\\u2642\\uFE0F','\\u{1F473}\\u{1F3FF}','\\u{1F473}\\u{1F3FF}\\u200D\\u2640\\uFE0F','\\u{1F473}\\u{1F3FF}\\u200D\\u2642\\uFE0F','\\u{1F474}\\u{1F3FB}','\\u{1F474}\\u{1F3FC}','\\u{1F474}\\u{1F3FD}','\\u{1F474}\\u{1F3FE}','\\u{1F474}\\u{1F3FF}','\\u{1F475}\\u{1F3FB}','\\u{1F475}\\u{1F3FC}','\\u{1F475}\\u{1F3FD}','\\u{1F475}\\u{1F3FE}','\\u{1F475}\\u{1F3FF}','\\u{1F476}\\u{1F3FB}','\\u{1F476}\\u{1F3FC}','\\u{1F476}\\u{1F3FD}','\\u{1F476}\\u{1F3FE}','\\u{1F476}\\u{1F3FF}','\\u{1F477}\\u200D\\u2640\\uFE0F','\\u{1F477}\\u200D\\u2642\\uFE0F','\\u{1F477}\\u{1F3FB}','\\u{1F477}\\u{1F3FB}\\u200D\\u2640\\uFE0F','\\u{1F477}\\u{1F3FB}\\u200D\\u2642\\uFE0F','\\u{1F477}\\u{1F3FC}','\\u{1F477}\\u{1F3FC}\\u200D\\u2640\\uFE0F','\\u{1F477}\\u{1F3FC}\\u200D\\u2642\\uFE0F','\\u{1F477}\\u{1F3FD}','\\u{1F477}\\u{1F3FD}\\u200D\\u2640\\uFE0F','\\u{1F477}\\u{1F3FD}\\u200D\\u2642\\uFE0F','\\u{1F477}\\u{1F3FE}','\\u{1F477}\\u{1F3FE}\\u200D\\u2640\\uFE0F','\\u{1F477}\\u{1F3FE}\\u200D\\u2642\\uFE0F','\\u{1F477}\\u{1F3FF}','\\u{1F477}\\u{1F3FF}\\u200D\\u2640\\uFE0F','\\u{1F477}\\u{1F3FF}\\u200D\\u2642\\uFE0F','\\u{1F478}\\u{1F3FB}','\\u{1F478}\\u{1F3FC}','\\u{1F478}\\u{1F3FD}','\\u{1F478}\\u{1F3FE}','\\u{1F478}\\u{1F3FF}','\\u{1F47C}\\u{1F3FB}','\\u{1F47C}\\u{1F3FC}','\\u{1F47C}\\u{1F3FD}','\\u{1F47C}\\u{1F3FE}','\\u{1F47C}\\u{1F3FF}','\\u{1F481}\\u200D\\u2640\\uFE0F','\\u{1F481}\\u200D\\u2642\\uFE0F','\\u{1F481}\\u{1F3FB}','\\u{1F481}\\u{1F3FB}\\u200D\\u2640\\uFE0F','\\u{1F481}\\u{1F3FB}\\u200D\\u2642\\uFE0F','\\u{1F481}\\u{1F3FC}','\\u{1F481}\\u{1F3FC}\\u200D\\u2640\\uFE0F','\\u{1F481}\\u{1F3FC}\\u200D\\u2642\\uFE0F','\\u{1F481}\\u{1F3FD}','\\u{1F481}\\u{1F3FD}\\u200D\\u2640\\uFE0F','\\u{1F481}\\u{1F3FD}\\u200D\\u2642\\uFE0F','\\u{1F481}\\u{1F3FE}','\\u{1F481}\\u{1F3FE}\\u200D\\u2640\\uFE0F','\\u{1F481}\\u{1F3FE}\\u200D\\u2642\\uFE0F','\\u{1F481}\\u{1F3FF}','\\u{1F481}\\u{1F3FF}\\u200D\\u2640\\uFE0F','\\u{1F481}\\u{1F3FF}\\u200D\\u2642\\uFE0F','\\u{1F482}\\u200D\\u2640\\uFE0F','\\u{1F482}\\u200D\\u2642\\uFE0F','\\u{1F482}\\u{1F3FB}','\\u{1F482}\\u{1F3FB}\\u200D\\u2640\\uFE0F','\\u{1F482}\\u{1F3FB}\\u200D\\u2642\\uFE0F','\\u{1F482}\\u{1F3FC}','\\u{1F482}\\u{1F3FC}\\u200D\\u2640\\uFE0F','\\u{1F482}\\u{1F3FC}\\u200D\\u2642\\uFE0F','\\u{1F482}\\u{1F3FD}','\\u{1F482}\\u{1F3FD}\\u200D\\u2640\\uFE0F','\\u{1F482}\\u{1F3FD}\\u200D\\u2642\\uFE0F','\\u{1F482}\\u{1F3FE}','\\u{1F482}\\u{1F3FE}\\u200D\\u2640\\uFE0F','\\u{1F482}\\u{1F3FE}\\u200D\\u2642\\uFE0F','\\u{1F482}\\u{1F3FF}','\\u{1F482}\\u{1F3FF}\\u200D\\u2640\\uFE0F','\\u{1F482}\\u{1F3FF}\\u200D\\u2642\\uFE0F','\\u{1F483}\\u{1F3FB}','\\u{1F483}\\u{1F3FC}','\\u{1F483}\\u{1F3FD}','\\u{1F483}\\u{1F3FE}','\\u{1F483}\\u{1F3FF}','\\u{1F485}\\u{1F3FB}','\\u{1F485}\\u{1F3FC}','\\u{1F485}\\u{1F3FD}','\\u{1F485}\\u{1F3FE}','\\u{1F485}\\u{1F3FF}','\\u{1F486}\\u200D\\u2640\\uFE0F','\\u{1F486}\\u200D\\u2642\\uFE0F','\\u{1F486}\\u{1F3FB}','\\u{1F486}\\u{1F3FB}\\u200D\\u2640\\uFE0F','\\u{1F486}\\u{1F3FB}\\u200D\\u2642\\uFE0F','\\u{1F486}\\u{1F3FC}','\\u{1F486}\\u{1F3FC}\\u200D\\u2640\\uFE0F','\\u{1F486}\\u{1F3FC}\\u200D\\u2642\\uFE0F','\\u{1F486}\\u{1F3FD}','\\u{1F486}\\u{1F3FD}\\u200D\\u2640\\uFE0F','\\u{1F486}\\u{1F3FD}\\u200D\\u2642\\uFE0F','\\u{1F486}\\u{1F3FE}','\\u{1F486}\\u{1F3FE}\\u200D\\u2640\\uFE0F','\\u{1F486}\\u{1F3FE}\\u200D\\u2642\\uFE0F','\\u{1F486}\\u{1F3FF}','\\u{1F486}\\u{1F3FF}\\u200D\\u2640\\uFE0F','\\u{1F486}\\u{1F3FF}\\u200D\\u2642\\uFE0F','\\u{1F487}\\u200D\\u2640\\uFE0F','\\u{1F487}\\u200D\\u2642\\uFE0F','\\u{1F487}\\u{1F3FB}','\\u{1F487}\\u{1F3FB}\\u200D\\u2640\\uFE0F','\\u{1F487}\\u{1F3FB}\\u200D\\u2642\\uFE0F','\\u{1F487}\\u{1F3FC}','\\u{1F487}\\u{1F3FC}\\u200D\\u2640\\uFE0F','\\u{1F487}\\u{1F3FC}\\u200D\\u2642\\uFE0F','\\u{1F487}\\u{1F3FD}','\\u{1F487}\\u{1F3FD}\\u200D\\u2640\\uFE0F','\\u{1F487}\\u{1F3FD}\\u200D\\u2642\\uFE0F','\\u{1F487}\\u{1F3FE}','\\u{1F487}\\u{1F3FE}\\u200D\\u2640\\uFE0F','\\u{1F487}\\u{1F3FE}\\u200D\\u2642\\uFE0F','\\u{1F487}\\u{1F3FF}','\\u{1F487}\\u{1F3FF}\\u200D\\u2640\\uFE0F','\\u{1F487}\\u{1F3FF}\\u200D\\u2642\\uFE0F','\\u{1F48F}\\u{1F3FB}','\\u{1F48F}\\u{1F3FC}','\\u{1F48F}\\u{1F3FD}','\\u{1F48F}\\u{1F3FE}','\\u{1F48F}\\u{1F3FF}','\\u{1F491}\\u{1F3FB}','\\u{1F491}\\u{1F3FC}','\\u{1F491}\\u{1F3FD}','\\u{1F491}\\u{1F3FE}','\\u{1F491}\\u{1F3FF}','\\u{1F4AA}\\u{1F3FB}','\\u{1F4AA}\\u{1F3FC}','\\u{1F4AA}\\u{1F3FD}','\\u{1F4AA}\\u{1F3FE}','\\u{1F4AA}\\u{1F3FF}','\\u{1F4FD}\\uFE0F','\\u{1F549}\\uFE0F','\\u{1F54A}\\uFE0F','\\u{1F56F}\\uFE0F','\\u{1F570}\\uFE0F','\\u{1F573}\\uFE0F','\\u{1F574}\\u{1F3FB}','\\u{1F574}\\u{1F3FC}','\\u{1F574}\\u{1F3FD}','\\u{1F574}\\u{1F3FE}','\\u{1F574}\\u{1F3FF}','\\u{1F574}\\uFE0F','\\u{1F575}\\u{1F3FB}','\\u{1F575}\\u{1F3FB}\\u200D\\u2640\\uFE0F','\\u{1F575}\\u{1F3FB}\\u200D\\u2642\\uFE0F','\\u{1F575}\\u{1F3FC}','\\u{1F575}\\u{1F3FC}\\u200D\\u2640\\uFE0F','\\u{1F575}\\u{1F3FC}\\u200D\\u2642\\uFE0F','\\u{1F575}\\u{1F3FD}','\\u{1F575}\\u{1F3FD}\\u200D\\u2640\\uFE0F','\\u{1F575}\\u{1F3FD}\\u200D\\u2642\\uFE0F','\\u{1F575}\\u{1F3FE}','\\u{1F575}\\u{1F3FE}\\u200D\\u2640\\uFE0F','\\u{1F575}\\u{1F3FE}\\u200D\\u2642\\uFE0F','\\u{1F575}\\u{1F3FF}','\\u{1F575}\\u{1F3FF}\\u200D\\u2640\\uFE0F','\\u{1F575}\\u{1F3FF}\\u200D\\u2642\\uFE0F','\\u{1F575}\\uFE0F','\\u{1F575}\\uFE0F\\u200D\\u2640\\uFE0F','\\u{1F575}\\uFE0F\\u200D\\u2642\\uFE0F','\\u{1F576}\\uFE0F','\\u{1F577}\\uFE0F','\\u{1F578}\\uFE0F','\\u{1F579}\\uFE0F','\\u{1F57A}\\u{1F3FB}','\\u{1F57A}\\u{1F3FC}','\\u{1F57A}\\u{1F3FD}','\\u{1F57A}\\u{1F3FE}','\\u{1F57A}\\u{1F3FF}','\\u{1F587}\\uFE0F','\\u{1F58A}\\uFE0F','\\u{1F58B}\\uFE0F','\\u{1F58C}\\uFE0F','\\u{1F58D}\\uFE0F','\\u{1F590}\\u{1F3FB}','\\u{1F590}\\u{1F3FC}','\\u{1F590}\\u{1F3FD}','\\u{1F590}\\u{1F3FE}','\\u{1F590}\\u{1F3FF}','\\u{1F590}\\uFE0F','\\u{1F595}\\u{1F3FB}','\\u{1F595}\\u{1F3FC}','\\u{1F595}\\u{1F3FD}','\\u{1F595}\\u{1F3FE}','\\u{1F595}\\u{1F3FF}','\\u{1F596}\\u{1F3FB}','\\u{1F596}\\u{1F3FC}','\\u{1F596}\\u{1F3FD}','\\u{1F596}\\u{1F3FE}','\\u{1F596}\\u{1F3FF}','\\u{1F5A5}\\uFE0F','\\u{1F5A8}\\uFE0F','\\u{1F5B1}\\uFE0F','\\u{1F5B2}\\uFE0F','\\u{1F5BC}\\uFE0F','\\u{1F5C2}\\uFE0F','\\u{1F5C3}\\uFE0F','\\u{1F5C4}\\uFE0F','\\u{1F5D1}\\uFE0F','\\u{1F5D2}\\uFE0F','\\u{1F5D3}\\uFE0F','\\u{1F5DC}\\uFE0F','\\u{1F5DD}\\uFE0F','\\u{1F5DE}\\uFE0F','\\u{1F5E1}\\uFE0F','\\u{1F5E3}\\uFE0F','\\u{1F5E8}\\uFE0F','\\u{1F5EF}\\uFE0F','\\u{1F5F3}\\uFE0F','\\u{1F5FA}\\uFE0F','\\u{1F62E}\\u200D\\u{1F4A8}','\\u{1F635}\\u200D\\u{1F4AB}','\\u{1F636}\\u200D\\u{1F32B}\\uFE0F','\\u{1F642}\\u200D\\u2194\\uFE0F','\\u{1F642}\\u200D\\u2195\\uFE0F','\\u{1F645}\\u200D\\u2640\\uFE0F','\\u{1F645}\\u200D\\u2642\\uFE0F','\\u{1F645}\\u{1F3FB}','\\u{1F645}\\u{1F3FB}\\u200D\\u2640\\uFE0F','\\u{1F645}\\u{1F3FB}\\u200D\\u2642\\uFE0F','\\u{1F645}\\u{1F3FC}','\\u{1F645}\\u{1F3FC}\\u200D\\u2640\\uFE0F','\\u{1F645}\\u{1F3FC}\\u200D\\u2642\\uFE0F','\\u{1F645}\\u{1F3FD}','\\u{1F645}\\u{1F3FD}\\u200D\\u2640\\uFE0F','\\u{1F645}\\u{1F3FD}\\u200D\\u2642\\uFE0F','\\u{1F645}\\u{1F3FE}','\\u{1F645}\\u{1F3FE}\\u200D\\u2640\\uFE0F','\\u{1F645}\\u{1F3FE}\\u200D\\u2642\\uFE0F','\\u{1F645}\\u{1F3FF}','\\u{1F645}\\u{1F3FF}\\u200D\\u2640\\uFE0F','\\u{1F645}\\u{1F3FF}\\u200D\\u2642\\uFE0F','\\u{1F646}\\u200D\\u2640\\uFE0F','\\u{1F646}\\u200D\\u2642\\uFE0F','\\u{1F646}\\u{1F3FB}','\\u{1F646}\\u{1F3FB}\\u200D\\u2640\\uFE0F','\\u{1F646}\\u{1F3FB}\\u200D\\u2642\\uFE0F','\\u{1F646}\\u{1F3FC}','\\u{1F646}\\u{1F3FC}\\u200D\\u2640\\uFE0F','\\u{1F646}\\u{1F3FC}\\u200D\\u2642\\uFE0F','\\u{1F646}\\u{1F3FD}','\\u{1F646}\\u{1F3FD}\\u200D\\u2640\\uFE0F','\\u{1F646}\\u{1F3FD}\\u200D\\u2642\\uFE0F','\\u{1F646}\\u{1F3FE}','\\u{1F646}\\u{1F3FE}\\u200D\\u2640\\uFE0F','\\u{1F646}\\u{1F3FE}\\u200D\\u2642\\uFE0F','\\u{1F646}\\u{1F3FF}','\\u{1F646}\\u{1F3FF}\\u200D\\u2640\\uFE0F','\\u{1F646}\\u{1F3FF}\\u200D\\u2642\\uFE0F','\\u{1F647}\\u200D\\u2640\\uFE0F','\\u{1F647}\\u200D\\u2642\\uFE0F','\\u{1F647}\\u{1F3FB}','\\u{1F647}\\u{1F3FB}\\u200D\\u2640\\uFE0F','\\u{1F647}\\u{1F3FB}\\u200D\\u2642\\uFE0F','\\u{1F647}\\u{1F3FC}','\\u{1F647}\\u{1F3FC}\\u200D\\u2640\\uFE0F','\\u{1F647}\\u{1F3FC}\\u200D\\u2642\\uFE0F','\\u{1F647}\\u{1F3FD}','\\u{1F647}\\u{1F3FD}\\u200D\\u2640\\uFE0F','\\u{1F647}\\u{1F3FD}\\u200D\\u2642\\uFE0F','\\u{1F647}\\u{1F3FE}','\\u{1F647}\\u{1F3FE}\\u200D\\u2640\\uFE0F','\\u{1F647}\\u{1F3FE}\\u200D\\u2642\\uFE0F','\\u{1F647}\\u{1F3FF}','\\u{1F647}\\u{1F3FF}\\u200D\\u2640\\uFE0F','\\u{1F647}\\u{1F3FF}\\u200D\\u2642\\uFE0F','\\u{1F64B}\\u200D\\u2640\\uFE0F','\\u{1F64B}\\u200D\\u2642\\uFE0F','\\u{1F64B}\\u{1F3FB}','\\u{1F64B}\\u{1F3FB}\\u200D\\u2640\\uFE0F','\\u{1F64B}\\u{1F3FB}\\u200D\\u2642\\uFE0F','\\u{1F64B}\\u{1F3FC}','\\u{1F64B}\\u{1F3FC}\\u200D\\u2640\\uFE0F','\\u{1F64B}\\u{1F3FC}\\u200D\\u2642\\uFE0F','\\u{1F64B}\\u{1F3FD}','\\u{1F64B}\\u{1F3FD}\\u200D\\u2640\\uFE0F','\\u{1F64B}\\u{1F3FD}\\u200D\\u2642\\uFE0F','\\u{1F64B}\\u{1F3FE}','\\u{1F64B}\\u{1F3FE}\\u200D\\u2640\\uFE0F','\\u{1F64B}\\u{1F3FE}\\u200D\\u2642\\uFE0F','\\u{1F64B}\\u{1F3FF}','\\u{1F64B}\\u{1F3FF}\\u200D\\u2640\\uFE0F','\\u{1F64B}\\u{1F3FF}\\u200D\\u2642\\uFE0F','\\u{1F64C}\\u{1F3FB}','\\u{1F64C}\\u{1F3FC}','\\u{1F64C}\\u{1F3FD}','\\u{1F64C}\\u{1F3FE}','\\u{1F64C}\\u{1F3FF}','\\u{1F64D}\\u200D\\u2640\\uFE0F','\\u{1F64D}\\u200D\\u2642\\uFE0F','\\u{1F64D}\\u{1F3FB}','\\u{1F64D}\\u{1F3FB}\\u200D\\u2640\\uFE0F','\\u{1F64D}\\u{1F3FB}\\u200D\\u2642\\uFE0F','\\u{1F64D}\\u{1F3FC}','\\u{1F64D}\\u{1F3FC}\\u200D\\u2640\\uFE0F','\\u{1F64D}\\u{1F3FC}\\u200D\\u2642\\uFE0F','\\u{1F64D}\\u{1F3FD}','\\u{1F64D}\\u{1F3FD}\\u200D\\u2640\\uFE0F','\\u{1F64D}\\u{1F3FD}\\u200D\\u2642\\uFE0F','\\u{1F64D}\\u{1F3FE}','\\u{1F64D}\\u{1F3FE}\\u200D\\u2640\\uFE0F','\\u{1F64D}\\u{1F3FE}\\u200D\\u2642\\uFE0F','\\u{1F64D}\\u{1F3FF}','\\u{1F64D}\\u{1F3FF}\\u200D\\u2640\\uFE0F','\\u{1F64D}\\u{1F3FF}\\u200D\\u2642\\uFE0F','\\u{1F64E}\\u200D\\u2640\\uFE0F','\\u{1F64E}\\u200D\\u2642\\uFE0F','\\u{1F64E}\\u{1F3FB}','\\u{1F64E}\\u{1F3FB}\\u200D\\u2640\\uFE0F','\\u{1F64E}\\u{1F3FB}\\u200D\\u2642\\uFE0F','\\u{1F64E}\\u{1F3FC}','\\u{1F64E}\\u{1F3FC}\\u200D\\u2640\\uFE0F','\\u{1F64E}\\u{1F3FC}\\u200D\\u2642\\uFE0F','\\u{1F64E}\\u{1F3FD}','\\u{1F64E}\\u{1F3FD}\\u200D\\u2640\\uFE0F','\\u{1F64E}\\u{1F3FD}\\u200D\\u2642\\uFE0F','\\u{1F64E}\\u{1F3FE}','\\u{1F64E}\\u{1F3FE}\\u200D\\u2640\\uFE0F','\\u{1F64E}\\u{1F3FE}\\u200D\\u2642\\uFE0F','\\u{1F64E}\\u{1F3FF}','\\u{1F64E}\\u{1F3FF}\\u200D\\u2640\\uFE0F','\\u{1F64E}\\u{1F3FF}\\u200D\\u2642\\uFE0F','\\u{1F64F}\\u{1F3FB}','\\u{1F64F}\\u{1F3FC}','\\u{1F64F}\\u{1F3FD}','\\u{1F64F}\\u{1F3FE}','\\u{1F64F}\\u{1F3FF}','\\u{1F6A3}\\u200D\\u2640\\uFE0F','\\u{1F6A3}\\u200D\\u2642\\uFE0F','\\u{1F6A3}\\u{1F3FB}','\\u{1F6A3}\\u{1F3FB}\\u200D\\u2640\\uFE0F','\\u{1F6A3}\\u{1F3FB}\\u200D\\u2642\\uFE0F','\\u{1F6A3}\\u{1F3FC}','\\u{1F6A3}\\u{1F3FC}\\u200D\\u2640\\uFE0F','\\u{1F6A3}\\u{1F3FC}\\u200D\\u2642\\uFE0F','\\u{1F6A3}\\u{1F3FD}','\\u{1F6A3}\\u{1F3FD}\\u200D\\u2640\\uFE0F','\\u{1F6A3}\\u{1F3FD}\\u200D\\u2642\\uFE0F','\\u{1F6A3}\\u{1F3FE}','\\u{1F6A3}\\u{1F3FE}\\u200D\\u2640\\uFE0F','\\u{1F6A3}\\u{1F3FE}\\u200D\\u2642\\uFE0F','\\u{1F6A3}\\u{1F3FF}','\\u{1F6A3}\\u{1F3FF}\\u200D\\u2640\\uFE0F','\\u{1F6A3}\\u{1F3FF}\\u200D\\u2642\\uFE0F','\\u{1F6B4}\\u200D\\u2640\\uFE0F','\\u{1F6B4}\\u200D\\u2642\\uFE0F','\\u{1F6B4}\\u{1F3FB}','\\u{1F6B4}\\u{1F3FB}\\u200D\\u2640\\uFE0F','\\u{1F6B4}\\u{1F3FB}\\u200D\\u2642\\uFE0F','\\u{1F6B4}\\u{1F3FC}','\\u{1F6B4}\\u{1F3FC}\\u200D\\u2640\\uFE0F','\\u{1F6B4}\\u{1F3FC}\\u200D\\u2642\\uFE0F','\\u{1F6B4}\\u{1F3FD}','\\u{1F6B4}\\u{1F3FD}\\u200D\\u2640\\uFE0F','\\u{1F6B4}\\u{1F3FD}\\u200D\\u2642\\uFE0F','\\u{1F6B4}\\u{1F3FE}','\\u{1F6B4}\\u{1F3FE}\\u200D\\u2640\\uFE0F','\\u{1F6B4}\\u{1F3FE}\\u200D\\u2642\\uFE0F','\\u{1F6B4}\\u{1F3FF}','\\u{1F6B4}\\u{1F3FF}\\u200D\\u2640\\uFE0F','\\u{1F6B4}\\u{1F3FF}\\u200D\\u2642\\uFE0F','\\u{1F6B5}\\u200D\\u2640\\uFE0F','\\u{1F6B5}\\u200D\\u2642\\uFE0F','\\u{1F6B5}\\u{1F3FB}','\\u{1F6B5}\\u{1F3FB}\\u200D\\u2640\\uFE0F','\\u{1F6B5}\\u{1F3FB}\\u200D\\u2642\\uFE0F','\\u{1F6B5}\\u{1F3FC}','\\u{1F6B5}\\u{1F3FC}\\u200D\\u2640\\uFE0F','\\u{1F6B5}\\u{1F3FC}\\u200D\\u2642\\uFE0F','\\u{1F6B5}\\u{1F3FD}','\\u{1F6B5}\\u{1F3FD}\\u200D\\u2640\\uFE0F','\\u{1F6B5}\\u{1F3FD}\\u200D\\u2642\\uFE0F','\\u{1F6B5}\\u{1F3FE}','\\u{1F6B5}\\u{1F3FE}\\u200D\\u2640\\uFE0F','\\u{1F6B5}\\u{1F3FE}\\u200D\\u2642\\uFE0F','\\u{1F6B5}\\u{1F3FF}','\\u{1F6B5}\\u{1F3FF}\\u200D\\u2640\\uFE0F','\\u{1F6B5}\\u{1F3FF}\\u200D\\u2642\\uFE0F','\\u{1F6B6}\\u200D\\u2640\\uFE0F','\\u{1F6B6}\\u200D\\u2640\\uFE0F\\u200D\\u27A1\\uFE0F','\\u{1F6B6}\\u200D\\u2642\\uFE0F','\\u{1F6B6}\\u200D\\u2642\\uFE0F\\u200D\\u27A1\\uFE0F','\\u{1F6B6}\\u200D\\u27A1\\uFE0F','\\u{1F6B6}\\u{1F3FB}','\\u{1F6B6}\\u{1F3FB}\\u200D\\u2640\\uFE0F','\\u{1F6B6}\\u{1F3FB}\\u200D\\u2640\\uFE0F\\u200D\\u27A1\\uFE0F','\\u{1F6B6}\\u{1F3FB}\\u200D\\u2642\\uFE0F','\\u{1F6B6}\\u{1F3FB}\\u200D\\u2642\\uFE0F\\u200D\\u27A1\\uFE0F','\\u{1F6B6}\\u{1F3FB}\\u200D\\u27A1\\uFE0F','\\u{1F6B6}\\u{1F3FC}','\\u{1F6B6}\\u{1F3FC}\\u200D\\u2640\\uFE0F','\\u{1F6B6}\\u{1F3FC}\\u200D\\u2640\\uFE0F\\u200D\\u27A1\\uFE0F','\\u{1F6B6}\\u{1F3FC}\\u200D\\u2642\\uFE0F','\\u{1F6B6}\\u{1F3FC}\\u200D\\u2642\\uFE0F\\u200D\\u27A1\\uFE0F','\\u{1F6B6}\\u{1F3FC}\\u200D\\u27A1\\uFE0F','\\u{1F6B6}\\u{1F3FD}','\\u{1F6B6}\\u{1F3FD}\\u200D\\u2640\\uFE0F','\\u{1F6B6}\\u{1F3FD}\\u200D\\u2640\\uFE0F\\u200D\\u27A1\\uFE0F','\\u{1F6B6}\\u{1F3FD}\\u200D\\u2642\\uFE0F','\\u{1F6B6}\\u{1F3FD}\\u200D\\u2642\\uFE0F\\u200D\\u27A1\\uFE0F','\\u{1F6B6}\\u{1F3FD}\\u200D\\u27A1\\uFE0F','\\u{1F6B6}\\u{1F3FE}','\\u{1F6B6}\\u{1F3FE}\\u200D\\u2640\\uFE0F','\\u{1F6B6}\\u{1F3FE}\\u200D\\u2640\\uFE0F\\u200D\\u27A1\\uFE0F','\\u{1F6B6}\\u{1F3FE}\\u200D\\u2642\\uFE0F','\\u{1F6B6}\\u{1F3FE}\\u200D\\u2642\\uFE0F\\u200D\\u27A1\\uFE0F','\\u{1F6B6}\\u{1F3FE}\\u200D\\u27A1\\uFE0F','\\u{1F6B6}\\u{1F3FF}','\\u{1F6B6}\\u{1F3FF}\\u200D\\u2640\\uFE0F','\\u{1F6B6}\\u{1F3FF}\\u200D\\u2640\\uFE0F\\u200D\\u27A1\\uFE0F','\\u{1F6B6}\\u{1F3FF}\\u200D\\u2642\\uFE0F','\\u{1F6B6}\\u{1F3FF}\\u200D\\u2642\\uFE0F\\u200D\\u27A1\\uFE0F','\\u{1F6B6}\\u{1F3FF}\\u200D\\u27A1\\uFE0F','\\u{1F6C0}\\u{1F3FB}','\\u{1F6C0}\\u{1F3FC}','\\u{1F6C0}\\u{1F3FD}','\\u{1F6C0}\\u{1F3FE}','\\u{1F6C0}\\u{1F3FF}','\\u{1F6CB}\\uFE0F','\\u{1F6CC}\\u{1F3FB}','\\u{1F6CC}\\u{1F3FC}','\\u{1F6CC}\\u{1F3FD}','\\u{1F6CC}\\u{1F3FE}','\\u{1F6CC}\\u{1F3FF}','\\u{1F6CD}\\uFE0F','\\u{1F6CE}\\uFE0F','\\u{1F6CF}\\uFE0F','\\u{1F6E0}\\uFE0F','\\u{1F6E1}\\uFE0F','\\u{1F6E2}\\uFE0F','\\u{1F6E3}\\uFE0F','\\u{1F6E4}\\uFE0F','\\u{1F6E5}\\uFE0F','\\u{1F6E9}\\uFE0F','\\u{1F6F0}\\uFE0F','\\u{1F6F3}\\uFE0F','\\u{1F90C}\\u{1F3FB}','\\u{1F90C}\\u{1F3FC}','\\u{1F90C}\\u{1F3FD}','\\u{1F90C}\\u{1F3FE}','\\u{1F90C}\\u{1F3FF}','\\u{1F90F}\\u{1F3FB}','\\u{1F90F}\\u{1F3FC}','\\u{1F90F}\\u{1F3FD}','\\u{1F90F}\\u{1F3FE}','\\u{1F90F}\\u{1F3FF}','\\u{1F918}\\u{1F3FB}','\\u{1F918}\\u{1F3FC}','\\u{1F918}\\u{1F3FD}','\\u{1F918}\\u{1F3FE}','\\u{1F918}\\u{1F3FF}','\\u{1F919}\\u{1F3FB}','\\u{1F919}\\u{1F3FC}','\\u{1F919}\\u{1F3FD}','\\u{1F919}\\u{1F3FE}','\\u{1F919}\\u{1F3FF}','\\u{1F91A}\\u{1F3FB}','\\u{1F91A}\\u{1F3FC}','\\u{1F91A}\\u{1F3FD}','\\u{1F91A}\\u{1F3FE}','\\u{1F91A}\\u{1F3FF}','\\u{1F91B}\\u{1F3FB}','\\u{1F91B}\\u{1F3FC}','\\u{1F91B}\\u{1F3FD}','\\u{1F91B}\\u{1F3FE}','\\u{1F91B}\\u{1F3FF}','\\u{1F91C}\\u{1F3FB}','\\u{1F91C}\\u{1F3FC}','\\u{1F91C}\\u{1F3FD}','\\u{1F91C}\\u{1F3FE}','\\u{1F91C}\\u{1F3FF}','\\u{1F91D}\\u{1F3FB}','\\u{1F91D}\\u{1F3FC}','\\u{1F91D}\\u{1F3FD}','\\u{1F91D}\\u{1F3FE}','\\u{1F91D}\\u{1F3FF}','\\u{1F91E}\\u{1F3FB}','\\u{1F91E}\\u{1F3FC}','\\u{1F91E}\\u{1F3FD}','\\u{1F91E}\\u{1F3FE}','\\u{1F91E}\\u{1F3FF}','\\u{1F91F}\\u{1F3FB}','\\u{1F91F}\\u{1F3FC}','\\u{1F91F}\\u{1F3FD}','\\u{1F91F}\\u{1F3FE}','\\u{1F91F}\\u{1F3FF}','\\u{1F926}\\u200D\\u2640\\uFE0F','\\u{1F926}\\u200D\\u2642\\uFE0F','\\u{1F926}\\u{1F3FB}','\\u{1F926}\\u{1F3FB}\\u200D\\u2640\\uFE0F','\\u{1F926}\\u{1F3FB}\\u200D\\u2642\\uFE0F','\\u{1F926}\\u{1F3FC}','\\u{1F926}\\u{1F3FC}\\u200D\\u2640\\uFE0F','\\u{1F926}\\u{1F3FC}\\u200D\\u2642\\uFE0F','\\u{1F926}\\u{1F3FD}','\\u{1F926}\\u{1F3FD}\\u200D\\u2640\\uFE0F','\\u{1F926}\\u{1F3FD}\\u200D\\u2642\\uFE0F','\\u{1F926}\\u{1F3FE}','\\u{1F926}\\u{1F3FE}\\u200D\\u2640\\uFE0F','\\u{1F926}\\u{1F3FE}\\u200D\\u2642\\uFE0F','\\u{1F926}\\u{1F3FF}','\\u{1F926}\\u{1F3FF}\\u200D\\u2640\\uFE0F','\\u{1F926}\\u{1F3FF}\\u200D\\u2642\\uFE0F','\\u{1F930}\\u{1F3FB}','\\u{1F930}\\u{1F3FC}','\\u{1F930}\\u{1F3FD}','\\u{1F930}\\u{1F3FE}','\\u{1F930}\\u{1F3FF}','\\u{1F931}\\u{1F3FB}','\\u{1F931}\\u{1F3FC}','\\u{1F931}\\u{1F3FD}','\\u{1F931}\\u{1F3FE}','\\u{1F931}\\u{1F3FF}','\\u{1F932}\\u{1F3FB}','\\u{1F932}\\u{1F3FC}','\\u{1F932}\\u{1F3FD}','\\u{1F932}\\u{1F3FE}','\\u{1F932}\\u{1F3FF}','\\u{1F933}\\u{1F3FB}','\\u{1F933}\\u{1F3FC}','\\u{1F933}\\u{1F3FD}','\\u{1F933}\\u{1F3FE}','\\u{1F933}\\u{1F3FF}','\\u{1F934}\\u{1F3FB}','\\u{1F934}\\u{1F3FC}','\\u{1F934}\\u{1F3FD}','\\u{1F934}\\u{1F3FE}','\\u{1F934}\\u{1F3FF}','\\u{1F935}\\u200D\\u2640\\uFE0F','\\u{1F935}\\u200D\\u2642\\uFE0F','\\u{1F935}\\u{1F3FB}','\\u{1F935}\\u{1F3FB}\\u200D\\u2640\\uFE0F','\\u{1F935}\\u{1F3FB}\\u200D\\u2642\\uFE0F','\\u{1F935}\\u{1F3FC}','\\u{1F935}\\u{1F3FC}\\u200D\\u2640\\uFE0F','\\u{1F935}\\u{1F3FC}\\u200D\\u2642\\uFE0F','\\u{1F935}\\u{1F3FD}','\\u{1F935}\\u{1F3FD}\\u200D\\u2640\\uFE0F','\\u{1F935}\\u{1F3FD}\\u200D\\u2642\\uFE0F','\\u{1F935}\\u{1F3FE}','\\u{1F935}\\u{1F3FE}\\u200D\\u2640\\uFE0F','\\u{1F935}\\u{1F3FE}\\u200D\\u2642\\uFE0F','\\u{1F935}\\u{1F3FF}','\\u{1F935}\\u{1F3FF}\\u200D\\u2640\\uFE0F','\\u{1F935}\\u{1F3FF}\\u200D\\u2642\\uFE0F','\\u{1F936}\\u{1F3FB}','\\u{1F936}\\u{1F3FC}','\\u{1F936}\\u{1F3FD}','\\u{1F936}\\u{1F3FE}','\\u{1F936}\\u{1F3FF}','\\u{1F937}\\u200D\\u2640\\uFE0F','\\u{1F937}\\u200D\\u2642\\uFE0F','\\u{1F937}\\u{1F3FB}','\\u{1F937}\\u{1F3FB}\\u200D\\u2640\\uFE0F','\\u{1F937}\\u{1F3FB}\\u200D\\u2642\\uFE0F','\\u{1F937}\\u{1F3FC}','\\u{1F937}\\u{1F3FC}\\u200D\\u2640\\uFE0F','\\u{1F937}\\u{1F3FC}\\u200D\\u2642\\uFE0F','\\u{1F937}\\u{1F3FD}','\\u{1F937}\\u{1F3FD}\\u200D\\u2640\\uFE0F','\\u{1F937}\\u{1F3FD}\\u200D\\u2642\\uFE0F','\\u{1F937}\\u{1F3FE}','\\u{1F937}\\u{1F3FE}\\u200D\\u2640\\uFE0F','\\u{1F937}\\u{1F3FE}\\u200D\\u2642\\uFE0F','\\u{1F937}\\u{1F3FF}','\\u{1F937}\\u{1F3FF}\\u200D\\u2640\\uFE0F','\\u{1F937}\\u{1F3FF}\\u200D\\u2642\\uFE0F','\\u{1F938}\\u200D\\u2640\\uFE0F','\\u{1F938}\\u200D\\u2642\\uFE0F','\\u{1F938}\\u{1F3FB}','\\u{1F938}\\u{1F3FB}\\u200D\\u2640\\uFE0F','\\u{1F938}\\u{1F3FB}\\u200D\\u2642\\uFE0F','\\u{1F938}\\u{1F3FC}','\\u{1F938}\\u{1F3FC}\\u200D\\u2640\\uFE0F','\\u{1F938}\\u{1F3FC}\\u200D\\u2642\\uFE0F','\\u{1F938}\\u{1F3FD}','\\u{1F938}\\u{1F3FD}\\u200D\\u2640\\uFE0F','\\u{1F938}\\u{1F3FD}\\u200D\\u2642\\uFE0F','\\u{1F938}\\u{1F3FE}','\\u{1F938}\\u{1F3FE}\\u200D\\u2640\\uFE0F','\\u{1F938}\\u{1F3FE}\\u200D\\u2642\\uFE0F','\\u{1F938}\\u{1F3FF}','\\u{1F938}\\u{1F3FF}\\u200D\\u2640\\uFE0F','\\u{1F938}\\u{1F3FF}\\u200D\\u2642\\uFE0F','\\u{1F939}\\u200D\\u2640\\uFE0F','\\u{1F939}\\u200D\\u2642\\uFE0F','\\u{1F939}\\u{1F3FB}','\\u{1F939}\\u{1F3FB}\\u200D\\u2640\\uFE0F','\\u{1F939}\\u{1F3FB}\\u200D\\u2642\\uFE0F','\\u{1F939}\\u{1F3FC}','\\u{1F939}\\u{1F3FC}\\u200D\\u2640\\uFE0F','\\u{1F939}\\u{1F3FC}\\u200D\\u2642\\uFE0F','\\u{1F939}\\u{1F3FD}','\\u{1F939}\\u{1F3FD}\\u200D\\u2640\\uFE0F','\\u{1F939}\\u{1F3FD}\\u200D\\u2642\\uFE0F','\\u{1F939}\\u{1F3FE}','\\u{1F939}\\u{1F3FE}\\u200D\\u2640\\uFE0F','\\u{1F939}\\u{1F3FE}\\u200D\\u2642\\uFE0F','\\u{1F939}\\u{1F3FF}','\\u{1F939}\\u{1F3FF}\\u200D\\u2640\\uFE0F','\\u{1F939}\\u{1F3FF}\\u200D\\u2642\\uFE0F','\\u{1F93C}\\u200D\\u2640\\uFE0F','\\u{1F93C}\\u200D\\u2642\\uFE0F','\\u{1F93D}\\u200D\\u2640\\uFE0F','\\u{1F93D}\\u200D\\u2642\\uFE0F','\\u{1F93D}\\u{1F3FB}','\\u{1F93D}\\u{1F3FB}\\u200D\\u2640\\uFE0F','\\u{1F93D}\\u{1F3FB}\\u200D\\u2642\\uFE0F','\\u{1F93D}\\u{1F3FC}','\\u{1F93D}\\u{1F3FC}\\u200D\\u2640\\uFE0F','\\u{1F93D}\\u{1F3FC}\\u200D\\u2642\\uFE0F','\\u{1F93D}\\u{1F3FD}','\\u{1F93D}\\u{1F3FD}\\u200D\\u2640\\uFE0F','\\u{1F93D}\\u{1F3FD}\\u200D\\u2642\\uFE0F','\\u{1F93D}\\u{1F3FE}','\\u{1F93D}\\u{1F3FE}\\u200D\\u2640\\uFE0F','\\u{1F93D}\\u{1F3FE}\\u200D\\u2642\\uFE0F','\\u{1F93D}\\u{1F3FF}','\\u{1F93D}\\u{1F3FF}\\u200D\\u2640\\uFE0F','\\u{1F93D}\\u{1F3FF}\\u200D\\u2642\\uFE0F','\\u{1F93E}\\u200D\\u2640\\uFE0F','\\u{1F93E}\\u200D\\u2642\\uFE0F','\\u{1F93E}\\u{1F3FB}','\\u{1F93E}\\u{1F3FB}\\u200D\\u2640\\uFE0F','\\u{1F93E}\\u{1F3FB}\\u200D\\u2642\\uFE0F','\\u{1F93E}\\u{1F3FC}','\\u{1F93E}\\u{1F3FC}\\u200D\\u2640\\uFE0F','\\u{1F93E}\\u{1F3FC}\\u200D\\u2642\\uFE0F','\\u{1F93E}\\u{1F3FD}','\\u{1F93E}\\u{1F3FD}\\u200D\\u2640\\uFE0F','\\u{1F93E}\\u{1F3FD}\\u200D\\u2642\\uFE0F','\\u{1F93E}\\u{1F3FE}','\\u{1F93E}\\u{1F3FE}\\u200D\\u2640\\uFE0F','\\u{1F93E}\\u{1F3FE}\\u200D\\u2642\\uFE0F','\\u{1F93E}\\u{1F3FF}','\\u{1F93E}\\u{1F3FF}\\u200D\\u2640\\uFE0F','\\u{1F93E}\\u{1F3FF}\\u200D\\u2642\\uFE0F','\\u{1F977}\\u{1F3FB}','\\u{1F977}\\u{1F3FC}','\\u{1F977}\\u{1F3FD}','\\u{1F977}\\u{1F3FE}','\\u{1F977}\\u{1F3FF}','\\u{1F9B5}\\u{1F3FB}','\\u{1F9B5}\\u{1F3FC}','\\u{1F9B5}\\u{1F3FD}','\\u{1F9B5}\\u{1F3FE}','\\u{1F9B5}\\u{1F3FF}','\\u{1F9B6}\\u{1F3FB}','\\u{1F9B6}\\u{1F3FC}','\\u{1F9B6}\\u{1F3FD}','\\u{1F9B6}\\u{1F3FE}','\\u{1F9B6}\\u{1F3FF}','\\u{1F9B8}\\u200D\\u2640\\uFE0F','\\u{1F9B8}\\u200D\\u2642\\uFE0F','\\u{1F9B8}\\u{1F3FB}','\\u{1F9B8}\\u{1F3FB}\\u200D\\u2640\\uFE0F','\\u{1F9B8}\\u{1F3FB}\\u200D\\u2642\\uFE0F','\\u{1F9B8}\\u{1F3FC}','\\u{1F9B8}\\u{1F3FC}\\u200D\\u2640\\uFE0F','\\u{1F9B8}\\u{1F3FC}\\u200D\\u2642\\uFE0F','\\u{1F9B8}\\u{1F3FD}','\\u{1F9B8}\\u{1F3FD}\\u200D\\u2640\\uFE0F','\\u{1F9B8}\\u{1F3FD}\\u200D\\u2642\\uFE0F','\\u{1F9B8}\\u{1F3FE}','\\u{1F9B8}\\u{1F3FE}\\u200D\\u2640\\uFE0F','\\u{1F9B8}\\u{1F3FE}\\u200D\\u2642\\uFE0F','\\u{1F9B8}\\u{1F3FF}','\\u{1F9B8}\\u{1F3FF}\\u200D\\u2640\\uFE0F','\\u{1F9B8}\\u{1F3FF}\\u200D\\u2642\\uFE0F','\\u{1F9B9}\\u200D\\u2640\\uFE0F','\\u{1F9B9}\\u200D\\u2642\\uFE0F','\\u{1F9B9}\\u{1F3FB}','\\u{1F9B9}\\u{1F3FB}\\u200D\\u2640\\uFE0F','\\u{1F9B9}\\u{1F3FB}\\u200D\\u2642\\uFE0F','\\u{1F9B9}\\u{1F3FC}','\\u{1F9B9}\\u{1F3FC}\\u200D\\u2640\\uFE0F','\\u{1F9B9}\\u{1F3FC}\\u200D\\u2642\\uFE0F','\\u{1F9B9}\\u{1F3FD}','\\u{1F9B9}\\u{1F3FD}\\u200D\\u2640\\uFE0F','\\u{1F9B9}\\u{1F3FD}\\u200D\\u2642\\uFE0F','\\u{1F9B9}\\u{1F3FE}','\\u{1F9B9}\\u{1F3FE}\\u200D\\u2640\\uFE0F','\\u{1F9B9}\\u{1F3FE}\\u200D\\u2642\\uFE0F','\\u{1F9B9}\\u{1F3FF}','\\u{1F9B9}\\u{1F3FF}\\u200D\\u2640\\uFE0F','\\u{1F9B9}\\u{1F3FF}\\u200D\\u2642\\uFE0F','\\u{1F9BB}\\u{1F3FB}','\\u{1F9BB}\\u{1F3FC}','\\u{1F9BB}\\u{1F3FD}','\\u{1F9BB}\\u{1F3FE}','\\u{1F9BB}\\u{1F3FF}','\\u{1F9CD}\\u200D\\u2640\\uFE0F','\\u{1F9CD}\\u200D\\u2642\\uFE0F','\\u{1F9CD}\\u{1F3FB}','\\u{1F9CD}\\u{1F3FB}\\u200D\\u2640\\uFE0F','\\u{1F9CD}\\u{1F3FB}\\u200D\\u2642\\uFE0F','\\u{1F9CD}\\u{1F3FC}','\\u{1F9CD}\\u{1F3FC}\\u200D\\u2640\\uFE0F','\\u{1F9CD}\\u{1F3FC}\\u200D\\u2642\\uFE0F','\\u{1F9CD}\\u{1F3FD}','\\u{1F9CD}\\u{1F3FD}\\u200D\\u2640\\uFE0F','\\u{1F9CD}\\u{1F3FD}\\u200D\\u2642\\uFE0F','\\u{1F9CD}\\u{1F3FE}','\\u{1F9CD}\\u{1F3FE}\\u200D\\u2640\\uFE0F','\\u{1F9CD}\\u{1F3FE}\\u200D\\u2642\\uFE0F','\\u{1F9CD}\\u{1F3FF}','\\u{1F9CD}\\u{1F3FF}\\u200D\\u2640\\uFE0F','\\u{1F9CD}\\u{1F3FF}\\u200D\\u2642\\uFE0F','\\u{1F9CE}\\u200D\\u2640\\uFE0F','\\u{1F9CE}\\u200D\\u2640\\uFE0F\\u200D\\u27A1\\uFE0F','\\u{1F9CE}\\u200D\\u2642\\uFE0F','\\u{1F9CE}\\u200D\\u2642\\uFE0F\\u200D\\u27A1\\uFE0F','\\u{1F9CE}\\u200D\\u27A1\\uFE0F','\\u{1F9CE}\\u{1F3FB}','\\u{1F9CE}\\u{1F3FB}\\u200D\\u2640\\uFE0F','\\u{1F9CE}\\u{1F3FB}\\u200D\\u2640\\uFE0F\\u200D\\u27A1\\uFE0F','\\u{1F9CE}\\u{1F3FB}\\u200D\\u2642\\uFE0F','\\u{1F9CE}\\u{1F3FB}\\u200D\\u2642\\uFE0F\\u200D\\u27A1\\uFE0F','\\u{1F9CE}\\u{1F3FB}\\u200D\\u27A1\\uFE0F','\\u{1F9CE}\\u{1F3FC}','\\u{1F9CE}\\u{1F3FC}\\u200D\\u2640\\uFE0F','\\u{1F9CE}\\u{1F3FC}\\u200D\\u2640\\uFE0F\\u200D\\u27A1\\uFE0F','\\u{1F9CE}\\u{1F3FC}\\u200D\\u2642\\uFE0F','\\u{1F9CE}\\u{1F3FC}\\u200D\\u2642\\uFE0F\\u200D\\u27A1\\uFE0F','\\u{1F9CE}\\u{1F3FC}\\u200D\\u27A1\\uFE0F','\\u{1F9CE}\\u{1F3FD}','\\u{1F9CE}\\u{1F3FD}\\u200D\\u2640\\uFE0F','\\u{1F9CE}\\u{1F3FD}\\u200D\\u2640\\uFE0F\\u200D\\u27A1\\uFE0F','\\u{1F9CE}\\u{1F3FD}\\u200D\\u2642\\uFE0F','\\u{1F9CE}\\u{1F3FD}\\u200D\\u2642\\uFE0F\\u200D\\u27A1\\uFE0F','\\u{1F9CE}\\u{1F3FD}\\u200D\\u27A1\\uFE0F','\\u{1F9CE}\\u{1F3FE}','\\u{1F9CE}\\u{1F3FE}\\u200D\\u2640\\uFE0F','\\u{1F9CE}\\u{1F3FE}\\u200D\\u2640\\uFE0F\\u200D\\u27A1\\uFE0F','\\u{1F9CE}\\u{1F3FE}\\u200D\\u2642\\uFE0F','\\u{1F9CE}\\u{1F3FE}\\u200D\\u2642\\uFE0F\\u200D\\u27A1\\uFE0F','\\u{1F9CE}\\u{1F3FE}\\u200D\\u27A1\\uFE0F','\\u{1F9CE}\\u{1F3FF}','\\u{1F9CE}\\u{1F3FF}\\u200D\\u2640\\uFE0F','\\u{1F9CE}\\u{1F3FF}\\u200D\\u2640\\uFE0F\\u200D\\u27A1\\uFE0F','\\u{1F9CE}\\u{1F3FF}\\u200D\\u2642\\uFE0F','\\u{1F9CE}\\u{1F3FF}\\u200D\\u2642\\uFE0F\\u200D\\u27A1\\uFE0F','\\u{1F9CE}\\u{1F3FF}\\u200D\\u27A1\\uFE0F','\\u{1F9CF}\\u200D\\u2640\\uFE0F','\\u{1F9CF}\\u200D\\u2642\\uFE0F','\\u{1F9CF}\\u{1F3FB}','\\u{1F9CF}\\u{1F3FB}\\u200D\\u2640\\uFE0F','\\u{1F9CF}\\u{1F3FB}\\u200D\\u2642\\uFE0F','\\u{1F9CF}\\u{1F3FC}','\\u{1F9CF}\\u{1F3FC}\\u200D\\u2640\\uFE0F','\\u{1F9CF}\\u{1F3FC}\\u200D\\u2642\\uFE0F','\\u{1F9CF}\\u{1F3FD}','\\u{1F9CF}\\u{1F3FD}\\u200D\\u2640\\uFE0F','\\u{1F9CF}\\u{1F3FD}\\u200D\\u2642\\uFE0F','\\u{1F9CF}\\u{1F3FE}','\\u{1F9CF}\\u{1F3FE}\\u200D\\u2640\\uFE0F','\\u{1F9CF}\\u{1F3FE}\\u200D\\u2642\\uFE0F','\\u{1F9CF}\\u{1F3FF}','\\u{1F9CF}\\u{1F3FF}\\u200D\\u2640\\uFE0F','\\u{1F9CF}\\u{1F3FF}\\u200D\\u2642\\uFE0F','\\u{1F9D1}\\u200D\\u2695\\uFE0F','\\u{1F9D1}\\u200D\\u2696\\uFE0F','\\u{1F9D1}\\u200D\\u2708\\uFE0F','\\u{1F9D1}\\u200D\\u{1F33E}','\\u{1F9D1}\\u200D\\u{1F373}','\\u{1F9D1}\\u200D\\u{1F37C}','\\u{1F9D1}\\u200D\\u{1F384}','\\u{1F9D1}\\u200D\\u{1F393}','\\u{1F9D1}\\u200D\\u{1F3A4}','\\u{1F9D1}\\u200D\\u{1F3A8}','\\u{1F9D1}\\u200D\\u{1F3EB}','\\u{1F9D1}\\u200D\\u{1F3ED}','\\u{1F9D1}\\u200D\\u{1F4BB}','\\u{1F9D1}\\u200D\\u{1F4BC}','\\u{1F9D1}\\u200D\\u{1F527}','\\u{1F9D1}\\u200D\\u{1F52C}','\\u{1F9D1}\\u200D\\u{1F680}','\\u{1F9D1}\\u200D\\u{1F692}','\\u{1F9D1}\\u200D\\u{1F91D}\\u200D\\u{1F9D1}','\\u{1F9D1}\\u200D\\u{1F9AF}','\\u{1F9D1}\\u200D\\u{1F9AF}\\u200D\\u27A1\\uFE0F','\\u{1F9D1}\\u200D\\u{1F9B0}','\\u{1F9D1}\\u200D\\u{1F9B1}','\\u{1F9D1}\\u200D\\u{1F9B2}','\\u{1F9D1}\\u200D\\u{1F9B3}','\\u{1F9D1}\\u200D\\u{1F9BC}','\\u{1F9D1}\\u200D\\u{1F9BC}\\u200D\\u27A1\\uFE0F','\\u{1F9D1}\\u200D\\u{1F9BD}','\\u{1F9D1}\\u200D\\u{1F9BD}\\u200D\\u27A1\\uFE0F','\\u{1F9D1}\\u200D\\u{1F9D1}\\u200D\\u{1F9D2}','\\u{1F9D1}\\u200D\\u{1F9D1}\\u200D\\u{1F9D2}\\u200D\\u{1F9D2}','\\u{1F9D1}\\u200D\\u{1F9D2}','\\u{1F9D1}\\u200D\\u{1F9D2}\\u200D\\u{1F9D2}','\\u{1F9D1}\\u{1F3FB}','\\u{1F9D1}\\u{1F3FB}\\u200D\\u2695\\uFE0F','\\u{1F9D1}\\u{1F3FB}\\u200D\\u2696\\uFE0F','\\u{1F9D1}\\u{1F3FB}\\u200D\\u2708\\uFE0F','\\u{1F9D1}\\u{1F3FB}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F9D1}\\u{1F3FC}','\\u{1F9D1}\\u{1F3FB}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F9D1}\\u{1F3FD}','\\u{1F9D1}\\u{1F3FB}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F9D1}\\u{1F3FE}','\\u{1F9D1}\\u{1F3FB}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F9D1}\\u{1F3FF}','\\u{1F9D1}\\u{1F3FB}\\u200D\\u2764\\uFE0F\\u200D\\u{1F9D1}\\u{1F3FC}','\\u{1F9D1}\\u{1F3FB}\\u200D\\u2764\\uFE0F\\u200D\\u{1F9D1}\\u{1F3FD}','\\u{1F9D1}\\u{1F3FB}\\u200D\\u2764\\uFE0F\\u200D\\u{1F9D1}\\u{1F3FE}','\\u{1F9D1}\\u{1F3FB}\\u200D\\u2764\\uFE0F\\u200D\\u{1F9D1}\\u{1F3FF}','\\u{1F9D1}\\u{1F3FB}\\u200D\\u{1F33E}','\\u{1F9D1}\\u{1F3FB}\\u200D\\u{1F373}','\\u{1F9D1}\\u{1F3FB}\\u200D\\u{1F37C}','\\u{1F9D1}\\u{1F3FB}\\u200D\\u{1F384}','\\u{1F9D1}\\u{1F3FB}\\u200D\\u{1F393}','\\u{1F9D1}\\u{1F3FB}\\u200D\\u{1F3A4}','\\u{1F9D1}\\u{1F3FB}\\u200D\\u{1F3A8}','\\u{1F9D1}\\u{1F3FB}\\u200D\\u{1F3EB}','\\u{1F9D1}\\u{1F3FB}\\u200D\\u{1F3ED}','\\u{1F9D1}\\u{1F3FB}\\u200D\\u{1F4BB}','\\u{1F9D1}\\u{1F3FB}\\u200D\\u{1F4BC}','\\u{1F9D1}\\u{1F3FB}\\u200D\\u{1F527}','\\u{1F9D1}\\u{1F3FB}\\u200D\\u{1F52C}','\\u{1F9D1}\\u{1F3FB}\\u200D\\u{1F680}','\\u{1F9D1}\\u{1F3FB}\\u200D\\u{1F692}','\\u{1F9D1}\\u{1F3FB}\\u200D\\u{1F91D}\\u200D\\u{1F9D1}\\u{1F3FB}','\\u{1F9D1}\\u{1F3FB}\\u200D\\u{1F91D}\\u200D\\u{1F9D1}\\u{1F3FC}','\\u{1F9D1}\\u{1F3FB}\\u200D\\u{1F91D}\\u200D\\u{1F9D1}\\u{1F3FD}','\\u{1F9D1}\\u{1F3FB}\\u200D\\u{1F91D}\\u200D\\u{1F9D1}\\u{1F3FE}','\\u{1F9D1}\\u{1F3FB}\\u200D\\u{1F91D}\\u200D\\u{1F9D1}\\u{1F3FF}','\\u{1F9D1}\\u{1F3FB}\\u200D\\u{1F9AF}','\\u{1F9D1}\\u{1F3FB}\\u200D\\u{1F9AF}\\u200D\\u27A1\\uFE0F','\\u{1F9D1}\\u{1F3FB}\\u200D\\u{1F9B0}','\\u{1F9D1}\\u{1F3FB}\\u200D\\u{1F9B1}','\\u{1F9D1}\\u{1F3FB}\\u200D\\u{1F9B2}','\\u{1F9D1}\\u{1F3FB}\\u200D\\u{1F9B3}','\\u{1F9D1}\\u{1F3FB}\\u200D\\u{1F9BC}','\\u{1F9D1}\\u{1F3FB}\\u200D\\u{1F9BC}\\u200D\\u27A1\\uFE0F','\\u{1F9D1}\\u{1F3FB}\\u200D\\u{1F9BD}','\\u{1F9D1}\\u{1F3FB}\\u200D\\u{1F9BD}\\u200D\\u27A1\\uFE0F','\\u{1F9D1}\\u{1F3FC}','\\u{1F9D1}\\u{1F3FC}\\u200D\\u2695\\uFE0F','\\u{1F9D1}\\u{1F3FC}\\u200D\\u2696\\uFE0F','\\u{1F9D1}\\u{1F3FC}\\u200D\\u2708\\uFE0F','\\u{1F9D1}\\u{1F3FC}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F9D1}\\u{1F3FB}','\\u{1F9D1}\\u{1F3FC}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F9D1}\\u{1F3FD}','\\u{1F9D1}\\u{1F3FC}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F9D1}\\u{1F3FE}','\\u{1F9D1}\\u{1F3FC}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F9D1}\\u{1F3FF}','\\u{1F9D1}\\u{1F3FC}\\u200D\\u2764\\uFE0F\\u200D\\u{1F9D1}\\u{1F3FB}','\\u{1F9D1}\\u{1F3FC}\\u200D\\u2764\\uFE0F\\u200D\\u{1F9D1}\\u{1F3FD}','\\u{1F9D1}\\u{1F3FC}\\u200D\\u2764\\uFE0F\\u200D\\u{1F9D1}\\u{1F3FE}','\\u{1F9D1}\\u{1F3FC}\\u200D\\u2764\\uFE0F\\u200D\\u{1F9D1}\\u{1F3FF}','\\u{1F9D1}\\u{1F3FC}\\u200D\\u{1F33E}','\\u{1F9D1}\\u{1F3FC}\\u200D\\u{1F373}','\\u{1F9D1}\\u{1F3FC}\\u200D\\u{1F37C}','\\u{1F9D1}\\u{1F3FC}\\u200D\\u{1F384}','\\u{1F9D1}\\u{1F3FC}\\u200D\\u{1F393}','\\u{1F9D1}\\u{1F3FC}\\u200D\\u{1F3A4}','\\u{1F9D1}\\u{1F3FC}\\u200D\\u{1F3A8}','\\u{1F9D1}\\u{1F3FC}\\u200D\\u{1F3EB}','\\u{1F9D1}\\u{1F3FC}\\u200D\\u{1F3ED}','\\u{1F9D1}\\u{1F3FC}\\u200D\\u{1F4BB}','\\u{1F9D1}\\u{1F3FC}\\u200D\\u{1F4BC}','\\u{1F9D1}\\u{1F3FC}\\u200D\\u{1F527}','\\u{1F9D1}\\u{1F3FC}\\u200D\\u{1F52C}','\\u{1F9D1}\\u{1F3FC}\\u200D\\u{1F680}','\\u{1F9D1}\\u{1F3FC}\\u200D\\u{1F692}','\\u{1F9D1}\\u{1F3FC}\\u200D\\u{1F91D}\\u200D\\u{1F9D1}\\u{1F3FB}','\\u{1F9D1}\\u{1F3FC}\\u200D\\u{1F91D}\\u200D\\u{1F9D1}\\u{1F3FC}','\\u{1F9D1}\\u{1F3FC}\\u200D\\u{1F91D}\\u200D\\u{1F9D1}\\u{1F3FD}','\\u{1F9D1}\\u{1F3FC}\\u200D\\u{1F91D}\\u200D\\u{1F9D1}\\u{1F3FE}','\\u{1F9D1}\\u{1F3FC}\\u200D\\u{1F91D}\\u200D\\u{1F9D1}\\u{1F3FF}','\\u{1F9D1}\\u{1F3FC}\\u200D\\u{1F9AF}','\\u{1F9D1}\\u{1F3FC}\\u200D\\u{1F9AF}\\u200D\\u27A1\\uFE0F','\\u{1F9D1}\\u{1F3FC}\\u200D\\u{1F9B0}','\\u{1F9D1}\\u{1F3FC}\\u200D\\u{1F9B1}','\\u{1F9D1}\\u{1F3FC}\\u200D\\u{1F9B2}','\\u{1F9D1}\\u{1F3FC}\\u200D\\u{1F9B3}','\\u{1F9D1}\\u{1F3FC}\\u200D\\u{1F9BC}','\\u{1F9D1}\\u{1F3FC}\\u200D\\u{1F9BC}\\u200D\\u27A1\\uFE0F','\\u{1F9D1}\\u{1F3FC}\\u200D\\u{1F9BD}','\\u{1F9D1}\\u{1F3FC}\\u200D\\u{1F9BD}\\u200D\\u27A1\\uFE0F','\\u{1F9D1}\\u{1F3FD}','\\u{1F9D1}\\u{1F3FD}\\u200D\\u2695\\uFE0F','\\u{1F9D1}\\u{1F3FD}\\u200D\\u2696\\uFE0F','\\u{1F9D1}\\u{1F3FD}\\u200D\\u2708\\uFE0F','\\u{1F9D1}\\u{1F3FD}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F9D1}\\u{1F3FB}','\\u{1F9D1}\\u{1F3FD}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F9D1}\\u{1F3FC}','\\u{1F9D1}\\u{1F3FD}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F9D1}\\u{1F3FE}','\\u{1F9D1}\\u{1F3FD}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F9D1}\\u{1F3FF}','\\u{1F9D1}\\u{1F3FD}\\u200D\\u2764\\uFE0F\\u200D\\u{1F9D1}\\u{1F3FB}','\\u{1F9D1}\\u{1F3FD}\\u200D\\u2764\\uFE0F\\u200D\\u{1F9D1}\\u{1F3FC}','\\u{1F9D1}\\u{1F3FD}\\u200D\\u2764\\uFE0F\\u200D\\u{1F9D1}\\u{1F3FE}','\\u{1F9D1}\\u{1F3FD}\\u200D\\u2764\\uFE0F\\u200D\\u{1F9D1}\\u{1F3FF}','\\u{1F9D1}\\u{1F3FD}\\u200D\\u{1F33E}','\\u{1F9D1}\\u{1F3FD}\\u200D\\u{1F373}','\\u{1F9D1}\\u{1F3FD}\\u200D\\u{1F37C}','\\u{1F9D1}\\u{1F3FD}\\u200D\\u{1F384}','\\u{1F9D1}\\u{1F3FD}\\u200D\\u{1F393}','\\u{1F9D1}\\u{1F3FD}\\u200D\\u{1F3A4}','\\u{1F9D1}\\u{1F3FD}\\u200D\\u{1F3A8}','\\u{1F9D1}\\u{1F3FD}\\u200D\\u{1F3EB}','\\u{1F9D1}\\u{1F3FD}\\u200D\\u{1F3ED}','\\u{1F9D1}\\u{1F3FD}\\u200D\\u{1F4BB}','\\u{1F9D1}\\u{1F3FD}\\u200D\\u{1F4BC}','\\u{1F9D1}\\u{1F3FD}\\u200D\\u{1F527}','\\u{1F9D1}\\u{1F3FD}\\u200D\\u{1F52C}','\\u{1F9D1}\\u{1F3FD}\\u200D\\u{1F680}','\\u{1F9D1}\\u{1F3FD}\\u200D\\u{1F692}','\\u{1F9D1}\\u{1F3FD}\\u200D\\u{1F91D}\\u200D\\u{1F9D1}\\u{1F3FB}','\\u{1F9D1}\\u{1F3FD}\\u200D\\u{1F91D}\\u200D\\u{1F9D1}\\u{1F3FC}','\\u{1F9D1}\\u{1F3FD}\\u200D\\u{1F91D}\\u200D\\u{1F9D1}\\u{1F3FD}','\\u{1F9D1}\\u{1F3FD}\\u200D\\u{1F91D}\\u200D\\u{1F9D1}\\u{1F3FE}','\\u{1F9D1}\\u{1F3FD}\\u200D\\u{1F91D}\\u200D\\u{1F9D1}\\u{1F3FF}','\\u{1F9D1}\\u{1F3FD}\\u200D\\u{1F9AF}','\\u{1F9D1}\\u{1F3FD}\\u200D\\u{1F9AF}\\u200D\\u27A1\\uFE0F','\\u{1F9D1}\\u{1F3FD}\\u200D\\u{1F9B0}','\\u{1F9D1}\\u{1F3FD}\\u200D\\u{1F9B1}','\\u{1F9D1}\\u{1F3FD}\\u200D\\u{1F9B2}','\\u{1F9D1}\\u{1F3FD}\\u200D\\u{1F9B3}','\\u{1F9D1}\\u{1F3FD}\\u200D\\u{1F9BC}','\\u{1F9D1}\\u{1F3FD}\\u200D\\u{1F9BC}\\u200D\\u27A1\\uFE0F','\\u{1F9D1}\\u{1F3FD}\\u200D\\u{1F9BD}','\\u{1F9D1}\\u{1F3FD}\\u200D\\u{1F9BD}\\u200D\\u27A1\\uFE0F','\\u{1F9D1}\\u{1F3FE}','\\u{1F9D1}\\u{1F3FE}\\u200D\\u2695\\uFE0F','\\u{1F9D1}\\u{1F3FE}\\u200D\\u2696\\uFE0F','\\u{1F9D1}\\u{1F3FE}\\u200D\\u2708\\uFE0F','\\u{1F9D1}\\u{1F3FE}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F9D1}\\u{1F3FB}','\\u{1F9D1}\\u{1F3FE}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F9D1}\\u{1F3FC}','\\u{1F9D1}\\u{1F3FE}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F9D1}\\u{1F3FD}','\\u{1F9D1}\\u{1F3FE}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F9D1}\\u{1F3FF}','\\u{1F9D1}\\u{1F3FE}\\u200D\\u2764\\uFE0F\\u200D\\u{1F9D1}\\u{1F3FB}','\\u{1F9D1}\\u{1F3FE}\\u200D\\u2764\\uFE0F\\u200D\\u{1F9D1}\\u{1F3FC}','\\u{1F9D1}\\u{1F3FE}\\u200D\\u2764\\uFE0F\\u200D\\u{1F9D1}\\u{1F3FD}','\\u{1F9D1}\\u{1F3FE}\\u200D\\u2764\\uFE0F\\u200D\\u{1F9D1}\\u{1F3FF}','\\u{1F9D1}\\u{1F3FE}\\u200D\\u{1F33E}','\\u{1F9D1}\\u{1F3FE}\\u200D\\u{1F373}','\\u{1F9D1}\\u{1F3FE}\\u200D\\u{1F37C}','\\u{1F9D1}\\u{1F3FE}\\u200D\\u{1F384}','\\u{1F9D1}\\u{1F3FE}\\u200D\\u{1F393}','\\u{1F9D1}\\u{1F3FE}\\u200D\\u{1F3A4}','\\u{1F9D1}\\u{1F3FE}\\u200D\\u{1F3A8}','\\u{1F9D1}\\u{1F3FE}\\u200D\\u{1F3EB}','\\u{1F9D1}\\u{1F3FE}\\u200D\\u{1F3ED}','\\u{1F9D1}\\u{1F3FE}\\u200D\\u{1F4BB}','\\u{1F9D1}\\u{1F3FE}\\u200D\\u{1F4BC}','\\u{1F9D1}\\u{1F3FE}\\u200D\\u{1F527}','\\u{1F9D1}\\u{1F3FE}\\u200D\\u{1F52C}','\\u{1F9D1}\\u{1F3FE}\\u200D\\u{1F680}','\\u{1F9D1}\\u{1F3FE}\\u200D\\u{1F692}','\\u{1F9D1}\\u{1F3FE}\\u200D\\u{1F91D}\\u200D\\u{1F9D1}\\u{1F3FB}','\\u{1F9D1}\\u{1F3FE}\\u200D\\u{1F91D}\\u200D\\u{1F9D1}\\u{1F3FC}','\\u{1F9D1}\\u{1F3FE}\\u200D\\u{1F91D}\\u200D\\u{1F9D1}\\u{1F3FD}','\\u{1F9D1}\\u{1F3FE}\\u200D\\u{1F91D}\\u200D\\u{1F9D1}\\u{1F3FE}','\\u{1F9D1}\\u{1F3FE}\\u200D\\u{1F91D}\\u200D\\u{1F9D1}\\u{1F3FF}','\\u{1F9D1}\\u{1F3FE}\\u200D\\u{1F9AF}','\\u{1F9D1}\\u{1F3FE}\\u200D\\u{1F9AF}\\u200D\\u27A1\\uFE0F','\\u{1F9D1}\\u{1F3FE}\\u200D\\u{1F9B0}','\\u{1F9D1}\\u{1F3FE}\\u200D\\u{1F9B1}','\\u{1F9D1}\\u{1F3FE}\\u200D\\u{1F9B2}','\\u{1F9D1}\\u{1F3FE}\\u200D\\u{1F9B3}','\\u{1F9D1}\\u{1F3FE}\\u200D\\u{1F9BC}','\\u{1F9D1}\\u{1F3FE}\\u200D\\u{1F9BC}\\u200D\\u27A1\\uFE0F','\\u{1F9D1}\\u{1F3FE}\\u200D\\u{1F9BD}','\\u{1F9D1}\\u{1F3FE}\\u200D\\u{1F9BD}\\u200D\\u27A1\\uFE0F','\\u{1F9D1}\\u{1F3FF}','\\u{1F9D1}\\u{1F3FF}\\u200D\\u2695\\uFE0F','\\u{1F9D1}\\u{1F3FF}\\u200D\\u2696\\uFE0F','\\u{1F9D1}\\u{1F3FF}\\u200D\\u2708\\uFE0F','\\u{1F9D1}\\u{1F3FF}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F9D1}\\u{1F3FB}','\\u{1F9D1}\\u{1F3FF}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F9D1}\\u{1F3FC}','\\u{1F9D1}\\u{1F3FF}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F9D1}\\u{1F3FD}','\\u{1F9D1}\\u{1F3FF}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F9D1}\\u{1F3FE}','\\u{1F9D1}\\u{1F3FF}\\u200D\\u2764\\uFE0F\\u200D\\u{1F9D1}\\u{1F3FB}','\\u{1F9D1}\\u{1F3FF}\\u200D\\u2764\\uFE0F\\u200D\\u{1F9D1}\\u{1F3FC}','\\u{1F9D1}\\u{1F3FF}\\u200D\\u2764\\uFE0F\\u200D\\u{1F9D1}\\u{1F3FD}','\\u{1F9D1}\\u{1F3FF}\\u200D\\u2764\\uFE0F\\u200D\\u{1F9D1}\\u{1F3FE}','\\u{1F9D1}\\u{1F3FF}\\u200D\\u{1F33E}','\\u{1F9D1}\\u{1F3FF}\\u200D\\u{1F373}','\\u{1F9D1}\\u{1F3FF}\\u200D\\u{1F37C}','\\u{1F9D1}\\u{1F3FF}\\u200D\\u{1F384}','\\u{1F9D1}\\u{1F3FF}\\u200D\\u{1F393}','\\u{1F9D1}\\u{1F3FF}\\u200D\\u{1F3A4}','\\u{1F9D1}\\u{1F3FF}\\u200D\\u{1F3A8}','\\u{1F9D1}\\u{1F3FF}\\u200D\\u{1F3EB}','\\u{1F9D1}\\u{1F3FF}\\u200D\\u{1F3ED}','\\u{1F9D1}\\u{1F3FF}\\u200D\\u{1F4BB}','\\u{1F9D1}\\u{1F3FF}\\u200D\\u{1F4BC}','\\u{1F9D1}\\u{1F3FF}\\u200D\\u{1F527}','\\u{1F9D1}\\u{1F3FF}\\u200D\\u{1F52C}','\\u{1F9D1}\\u{1F3FF}\\u200D\\u{1F680}','\\u{1F9D1}\\u{1F3FF}\\u200D\\u{1F692}','\\u{1F9D1}\\u{1F3FF}\\u200D\\u{1F91D}\\u200D\\u{1F9D1}\\u{1F3FB}','\\u{1F9D1}\\u{1F3FF}\\u200D\\u{1F91D}\\u200D\\u{1F9D1}\\u{1F3FC}','\\u{1F9D1}\\u{1F3FF}\\u200D\\u{1F91D}\\u200D\\u{1F9D1}\\u{1F3FD}','\\u{1F9D1}\\u{1F3FF}\\u200D\\u{1F91D}\\u200D\\u{1F9D1}\\u{1F3FE}','\\u{1F9D1}\\u{1F3FF}\\u200D\\u{1F91D}\\u200D\\u{1F9D1}\\u{1F3FF}','\\u{1F9D1}\\u{1F3FF}\\u200D\\u{1F9AF}','\\u{1F9D1}\\u{1F3FF}\\u200D\\u{1F9AF}\\u200D\\u27A1\\uFE0F','\\u{1F9D1}\\u{1F3FF}\\u200D\\u{1F9B0}','\\u{1F9D1}\\u{1F3FF}\\u200D\\u{1F9B1}','\\u{1F9D1}\\u{1F3FF}\\u200D\\u{1F9B2}','\\u{1F9D1}\\u{1F3FF}\\u200D\\u{1F9B3}','\\u{1F9D1}\\u{1F3FF}\\u200D\\u{1F9BC}','\\u{1F9D1}\\u{1F3FF}\\u200D\\u{1F9BC}\\u200D\\u27A1\\uFE0F','\\u{1F9D1}\\u{1F3FF}\\u200D\\u{1F9BD}','\\u{1F9D1}\\u{1F3FF}\\u200D\\u{1F9BD}\\u200D\\u27A1\\uFE0F','\\u{1F9D2}\\u{1F3FB}','\\u{1F9D2}\\u{1F3FC}','\\u{1F9D2}\\u{1F3FD}','\\u{1F9D2}\\u{1F3FE}','\\u{1F9D2}\\u{1F3FF}','\\u{1F9D3}\\u{1F3FB}','\\u{1F9D3}\\u{1F3FC}','\\u{1F9D3}\\u{1F3FD}','\\u{1F9D3}\\u{1F3FE}','\\u{1F9D3}\\u{1F3FF}','\\u{1F9D4}\\u200D\\u2640\\uFE0F','\\u{1F9D4}\\u200D\\u2642\\uFE0F','\\u{1F9D4}\\u{1F3FB}','\\u{1F9D4}\\u{1F3FB}\\u200D\\u2640\\uFE0F','\\u{1F9D4}\\u{1F3FB}\\u200D\\u2642\\uFE0F','\\u{1F9D4}\\u{1F3FC}','\\u{1F9D4}\\u{1F3FC}\\u200D\\u2640\\uFE0F','\\u{1F9D4}\\u{1F3FC}\\u200D\\u2642\\uFE0F','\\u{1F9D4}\\u{1F3FD}','\\u{1F9D4}\\u{1F3FD}\\u200D\\u2640\\uFE0F','\\u{1F9D4}\\u{1F3FD}\\u200D\\u2642\\uFE0F','\\u{1F9D4}\\u{1F3FE}','\\u{1F9D4}\\u{1F3FE}\\u200D\\u2640\\uFE0F','\\u{1F9D4}\\u{1F3FE}\\u200D\\u2642\\uFE0F','\\u{1F9D4}\\u{1F3FF}','\\u{1F9D4}\\u{1F3FF}\\u200D\\u2640\\uFE0F','\\u{1F9D4}\\u{1F3FF}\\u200D\\u2642\\uFE0F','\\u{1F9D5}\\u{1F3FB}','\\u{1F9D5}\\u{1F3FC}','\\u{1F9D5}\\u{1F3FD}','\\u{1F9D5}\\u{1F3FE}','\\u{1F9D5}\\u{1F3FF}','\\u{1F9D6}\\u200D\\u2640\\uFE0F','\\u{1F9D6}\\u200D\\u2642\\uFE0F','\\u{1F9D6}\\u{1F3FB}','\\u{1F9D6}\\u{1F3FB}\\u200D\\u2640\\uFE0F','\\u{1F9D6}\\u{1F3FB}\\u200D\\u2642\\uFE0F','\\u{1F9D6}\\u{1F3FC}','\\u{1F9D6}\\u{1F3FC}\\u200D\\u2640\\uFE0F','\\u{1F9D6}\\u{1F3FC}\\u200D\\u2642\\uFE0F','\\u{1F9D6}\\u{1F3FD}','\\u{1F9D6}\\u{1F3FD}\\u200D\\u2640\\uFE0F','\\u{1F9D6}\\u{1F3FD}\\u200D\\u2642\\uFE0F','\\u{1F9D6}\\u{1F3FE}','\\u{1F9D6}\\u{1F3FE}\\u200D\\u2640\\uFE0F','\\u{1F9D6}\\u{1F3FE}\\u200D\\u2642\\uFE0F','\\u{1F9D6}\\u{1F3FF}','\\u{1F9D6}\\u{1F3FF}\\u200D\\u2640\\uFE0F','\\u{1F9D6}\\u{1F3FF}\\u200D\\u2642\\uFE0F','\\u{1F9D7}\\u200D\\u2640\\uFE0F','\\u{1F9D7}\\u200D\\u2642\\uFE0F','\\u{1F9D7}\\u{1F3FB}','\\u{1F9D7}\\u{1F3FB}\\u200D\\u2640\\uFE0F','\\u{1F9D7}\\u{1F3FB}\\u200D\\u2642\\uFE0F','\\u{1F9D7}\\u{1F3FC}','\\u{1F9D7}\\u{1F3FC}\\u200D\\u2640\\uFE0F','\\u{1F9D7}\\u{1F3FC}\\u200D\\u2642\\uFE0F','\\u{1F9D7}\\u{1F3FD}','\\u{1F9D7}\\u{1F3FD}\\u200D\\u2640\\uFE0F','\\u{1F9D7}\\u{1F3FD}\\u200D\\u2642\\uFE0F','\\u{1F9D7}\\u{1F3FE}','\\u{1F9D7}\\u{1F3FE}\\u200D\\u2640\\uFE0F','\\u{1F9D7}\\u{1F3FE}\\u200D\\u2642\\uFE0F','\\u{1F9D7}\\u{1F3FF}','\\u{1F9D7}\\u{1F3FF}\\u200D\\u2640\\uFE0F','\\u{1F9D7}\\u{1F3FF}\\u200D\\u2642\\uFE0F','\\u{1F9D8}\\u200D\\u2640\\uFE0F','\\u{1F9D8}\\u200D\\u2642\\uFE0F','\\u{1F9D8}\\u{1F3FB}','\\u{1F9D8}\\u{1F3FB}\\u200D\\u2640\\uFE0F','\\u{1F9D8}\\u{1F3FB}\\u200D\\u2642\\uFE0F','\\u{1F9D8}\\u{1F3FC}','\\u{1F9D8}\\u{1F3FC}\\u200D\\u2640\\uFE0F','\\u{1F9D8}\\u{1F3FC}\\u200D\\u2642\\uFE0F','\\u{1F9D8}\\u{1F3FD}','\\u{1F9D8}\\u{1F3FD}\\u200D\\u2640\\uFE0F','\\u{1F9D8}\\u{1F3FD}\\u200D\\u2642\\uFE0F','\\u{1F9D8}\\u{1F3FE}','\\u{1F9D8}\\u{1F3FE}\\u200D\\u2640\\uFE0F','\\u{1F9D8}\\u{1F3FE}\\u200D\\u2642\\uFE0F','\\u{1F9D8}\\u{1F3FF}','\\u{1F9D8}\\u{1F3FF}\\u200D\\u2640\\uFE0F','\\u{1F9D8}\\u{1F3FF}\\u200D\\u2642\\uFE0F','\\u{1F9D9}\\u200D\\u2640\\uFE0F','\\u{1F9D9}\\u200D\\u2642\\uFE0F','\\u{1F9D9}\\u{1F3FB}','\\u{1F9D9}\\u{1F3FB}\\u200D\\u2640\\uFE0F','\\u{1F9D9}\\u{1F3FB}\\u200D\\u2642\\uFE0F','\\u{1F9D9}\\u{1F3FC}','\\u{1F9D9}\\u{1F3FC}\\u200D\\u2640\\uFE0F','\\u{1F9D9}\\u{1F3FC}\\u200D\\u2642\\uFE0F','\\u{1F9D9}\\u{1F3FD}','\\u{1F9D9}\\u{1F3FD}\\u200D\\u2640\\uFE0F','\\u{1F9D9}\\u{1F3FD}\\u200D\\u2642\\uFE0F','\\u{1F9D9}\\u{1F3FE}','\\u{1F9D9}\\u{1F3FE}\\u200D\\u2640\\uFE0F','\\u{1F9D9}\\u{1F3FE}\\u200D\\u2642\\uFE0F','\\u{1F9D9}\\u{1F3FF}','\\u{1F9D9}\\u{1F3FF}\\u200D\\u2640\\uFE0F','\\u{1F9D9}\\u{1F3FF}\\u200D\\u2642\\uFE0F','\\u{1F9DA}\\u200D\\u2640\\uFE0F','\\u{1F9DA}\\u200D\\u2642\\uFE0F','\\u{1F9DA}\\u{1F3FB}','\\u{1F9DA}\\u{1F3FB}\\u200D\\u2640\\uFE0F','\\u{1F9DA}\\u{1F3FB}\\u200D\\u2642\\uFE0F','\\u{1F9DA}\\u{1F3FC}','\\u{1F9DA}\\u{1F3FC}\\u200D\\u2640\\uFE0F','\\u{1F9DA}\\u{1F3FC}\\u200D\\u2642\\uFE0F','\\u{1F9DA}\\u{1F3FD}','\\u{1F9DA}\\u{1F3FD}\\u200D\\u2640\\uFE0F','\\u{1F9DA}\\u{1F3FD}\\u200D\\u2642\\uFE0F','\\u{1F9DA}\\u{1F3FE}','\\u{1F9DA}\\u{1F3FE}\\u200D\\u2640\\uFE0F','\\u{1F9DA}\\u{1F3FE}\\u200D\\u2642\\uFE0F','\\u{1F9DA}\\u{1F3FF}','\\u{1F9DA}\\u{1F3FF}\\u200D\\u2640\\uFE0F','\\u{1F9DA}\\u{1F3FF}\\u200D\\u2642\\uFE0F','\\u{1F9DB}\\u200D\\u2640\\uFE0F','\\u{1F9DB}\\u200D\\u2642\\uFE0F','\\u{1F9DB}\\u{1F3FB}','\\u{1F9DB}\\u{1F3FB}\\u200D\\u2640\\uFE0F','\\u{1F9DB}\\u{1F3FB}\\u200D\\u2642\\uFE0F','\\u{1F9DB}\\u{1F3FC}','\\u{1F9DB}\\u{1F3FC}\\u200D\\u2640\\uFE0F','\\u{1F9DB}\\u{1F3FC}\\u200D\\u2642\\uFE0F','\\u{1F9DB}\\u{1F3FD}','\\u{1F9DB}\\u{1F3FD}\\u200D\\u2640\\uFE0F','\\u{1F9DB}\\u{1F3FD}\\u200D\\u2642\\uFE0F','\\u{1F9DB}\\u{1F3FE}','\\u{1F9DB}\\u{1F3FE}\\u200D\\u2640\\uFE0F','\\u{1F9DB}\\u{1F3FE}\\u200D\\u2642\\uFE0F','\\u{1F9DB}\\u{1F3FF}','\\u{1F9DB}\\u{1F3FF}\\u200D\\u2640\\uFE0F','\\u{1F9DB}\\u{1F3FF}\\u200D\\u2642\\uFE0F','\\u{1F9DC}\\u200D\\u2640\\uFE0F','\\u{1F9DC}\\u200D\\u2642\\uFE0F','\\u{1F9DC}\\u{1F3FB}','\\u{1F9DC}\\u{1F3FB}\\u200D\\u2640\\uFE0F','\\u{1F9DC}\\u{1F3FB}\\u200D\\u2642\\uFE0F','\\u{1F9DC}\\u{1F3FC}','\\u{1F9DC}\\u{1F3FC}\\u200D\\u2640\\uFE0F','\\u{1F9DC}\\u{1F3FC}\\u200D\\u2642\\uFE0F','\\u{1F9DC}\\u{1F3FD}','\\u{1F9DC}\\u{1F3FD}\\u200D\\u2640\\uFE0F','\\u{1F9DC}\\u{1F3FD}\\u200D\\u2642\\uFE0F','\\u{1F9DC}\\u{1F3FE}','\\u{1F9DC}\\u{1F3FE}\\u200D\\u2640\\uFE0F','\\u{1F9DC}\\u{1F3FE}\\u200D\\u2642\\uFE0F','\\u{1F9DC}\\u{1F3FF}','\\u{1F9DC}\\u{1F3FF}\\u200D\\u2640\\uFE0F','\\u{1F9DC}\\u{1F3FF}\\u200D\\u2642\\uFE0F','\\u{1F9DD}\\u200D\\u2640\\uFE0F','\\u{1F9DD}\\u200D\\u2642\\uFE0F','\\u{1F9DD}\\u{1F3FB}','\\u{1F9DD}\\u{1F3FB}\\u200D\\u2640\\uFE0F','\\u{1F9DD}\\u{1F3FB}\\u200D\\u2642\\uFE0F','\\u{1F9DD}\\u{1F3FC}','\\u{1F9DD}\\u{1F3FC}\\u200D\\u2640\\uFE0F','\\u{1F9DD}\\u{1F3FC}\\u200D\\u2642\\uFE0F','\\u{1F9DD}\\u{1F3FD}','\\u{1F9DD}\\u{1F3FD}\\u200D\\u2640\\uFE0F','\\u{1F9DD}\\u{1F3FD}\\u200D\\u2642\\uFE0F','\\u{1F9DD}\\u{1F3FE}','\\u{1F9DD}\\u{1F3FE}\\u200D\\u2640\\uFE0F','\\u{1F9DD}\\u{1F3FE}\\u200D\\u2642\\uFE0F','\\u{1F9DD}\\u{1F3FF}','\\u{1F9DD}\\u{1F3FF}\\u200D\\u2640\\uFE0F','\\u{1F9DD}\\u{1F3FF}\\u200D\\u2642\\uFE0F','\\u{1F9DE}\\u200D\\u2640\\uFE0F','\\u{1F9DE}\\u200D\\u2642\\uFE0F','\\u{1F9DF}\\u200D\\u2640\\uFE0F','\\u{1F9DF}\\u200D\\u2642\\uFE0F','\\u{1FAC3}\\u{1F3FB}','\\u{1FAC3}\\u{1F3FC}','\\u{1FAC3}\\u{1F3FD}','\\u{1FAC3}\\u{1F3FE}','\\u{1FAC3}\\u{1F3FF}','\\u{1FAC4}\\u{1F3FB}','\\u{1FAC4}\\u{1F3FC}','\\u{1FAC4}\\u{1F3FD}','\\u{1FAC4}\\u{1F3FE}','\\u{1FAC4}\\u{1F3FF}','\\u{1FAC5}\\u{1F3FB}','\\u{1FAC5}\\u{1F3FC}','\\u{1FAC5}\\u{1F3FD}','\\u{1FAC5}\\u{1F3FE}','\\u{1FAC5}\\u{1F3FF}','\\u{1FAF0}\\u{1F3FB}','\\u{1FAF0}\\u{1F3FC}','\\u{1FAF0}\\u{1F3FD}','\\u{1FAF0}\\u{1F3FE}','\\u{1FAF0}\\u{1F3FF}','\\u{1FAF1}\\u{1F3FB}','\\u{1FAF1}\\u{1F3FB}\\u200D\\u{1FAF2}\\u{1F3FC}','\\u{1FAF1}\\u{1F3FB}\\u200D\\u{1FAF2}\\u{1F3FD}','\\u{1FAF1}\\u{1F3FB}\\u200D\\u{1FAF2}\\u{1F3FE}','\\u{1FAF1}\\u{1F3FB}\\u200D\\u{1FAF2}\\u{1F3FF}','\\u{1FAF1}\\u{1F3FC}','\\u{1FAF1}\\u{1F3FC}\\u200D\\u{1FAF2}\\u{1F3FB}','\\u{1FAF1}\\u{1F3FC}\\u200D\\u{1FAF2}\\u{1F3FD}','\\u{1FAF1}\\u{1F3FC}\\u200D\\u{1FAF2}\\u{1F3FE}','\\u{1FAF1}\\u{1F3FC}\\u200D\\u{1FAF2}\\u{1F3FF}','\\u{1FAF1}\\u{1F3FD}','\\u{1FAF1}\\u{1F3FD}\\u200D\\u{1FAF2}\\u{1F3FB}','\\u{1FAF1}\\u{1F3FD}\\u200D\\u{1FAF2}\\u{1F3FC}','\\u{1FAF1}\\u{1F3FD}\\u200D\\u{1FAF2}\\u{1F3FE}','\\u{1FAF1}\\u{1F3FD}\\u200D\\u{1FAF2}\\u{1F3FF}','\\u{1FAF1}\\u{1F3FE}','\\u{1FAF1}\\u{1F3FE}\\u200D\\u{1FAF2}\\u{1F3FB}','\\u{1FAF1}\\u{1F3FE}\\u200D\\u{1FAF2}\\u{1F3FC}','\\u{1FAF1}\\u{1F3FE}\\u200D\\u{1FAF2}\\u{1F3FD}','\\u{1FAF1}\\u{1F3FE}\\u200D\\u{1FAF2}\\u{1F3FF}','\\u{1FAF1}\\u{1F3FF}','\\u{1FAF1}\\u{1F3FF}\\u200D\\u{1FAF2}\\u{1F3FB}','\\u{1FAF1}\\u{1F3FF}\\u200D\\u{1FAF2}\\u{1F3FC}','\\u{1FAF1}\\u{1F3FF}\\u200D\\u{1FAF2}\\u{1F3FD}','\\u{1FAF1}\\u{1F3FF}\\u200D\\u{1FAF2}\\u{1F3FE}','\\u{1FAF2}\\u{1F3FB}','\\u{1FAF2}\\u{1F3FC}','\\u{1FAF2}\\u{1F3FD}','\\u{1FAF2}\\u{1F3FE}','\\u{1FAF2}\\u{1F3FF}','\\u{1FAF3}\\u{1F3FB}','\\u{1FAF3}\\u{1F3FC}','\\u{1FAF3}\\u{1F3FD}','\\u{1FAF3}\\u{1F3FE}','\\u{1FAF3}\\u{1F3FF}','\\u{1FAF4}\\u{1F3FB}','\\u{1FAF4}\\u{1F3FC}','\\u{1FAF4}\\u{1F3FD}','\\u{1FAF4}\\u{1F3FE}','\\u{1FAF4}\\u{1F3FF}','\\u{1FAF5}\\u{1F3FB}','\\u{1FAF5}\\u{1F3FC}','\\u{1FAF5}\\u{1F3FD}','\\u{1FAF5}\\u{1F3FE}','\\u{1FAF5}\\u{1F3FF}','\\u{1FAF6}\\u{1F3FB}','\\u{1FAF6}\\u{1F3FC}','\\u{1FAF6}\\u{1F3FD}','\\u{1FAF6}\\u{1F3FE}','\\u{1FAF6}\\u{1F3FF}','\\u{1FAF7}\\u{1F3FB}','\\u{1FAF7}\\u{1F3FC}','\\u{1FAF7}\\u{1F3FD}','\\u{1FAF7}\\u{1F3FE}','\\u{1FAF7}\\u{1F3FF}','\\u{1FAF8}\\u{1F3FB}','\\u{1FAF8}\\u{1F3FC}','\\u{1FAF8}\\u{1F3FD}','\\u{1FAF8}\\u{1F3FE}','\\u{1FAF8}\\u{1F3FF}'];\n","const set = require('regenerate')(0x61F, 0x640);\nset.addRange(0x1E900, 0x1E94B).addRange(0x1E950, 0x1E959).addRange(0x1E95E, 0x1E95F);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x11700, 0x1171A).addRange(0x1171D, 0x1172B).addRange(0x11730, 0x11746);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x14400, 0x14646);\nexports.characters = set;\n","const set = require('regenerate')(0xFDCF, 0x1EE24, 0x1EE27, 0x1EE39, 0x1EE3B, 0x1EE42, 0x1EE47, 0x1EE49, 0x1EE4B, 0x1EE54, 0x1EE57, 0x1EE59, 0x1EE5B, 0x1EE5D, 0x1EE5F, 0x1EE64, 0x1EE7E);\nset.addRange(0x600, 0x604).addRange(0x606, 0x6DC).addRange(0x6DE, 0x6FF).addRange(0x750, 0x77F).addRange(0x870, 0x88E).addRange(0x890, 0x891).addRange(0x898, 0x8E1).addRange(0x8E3, 0x8FF).addRange(0xFB50, 0xFBC2).addRange(0xFBD3, 0xFD8F).addRange(0xFD92, 0xFDC7).addRange(0xFDF0, 0xFDFF).addRange(0xFE70, 0xFE74).addRange(0xFE76, 0xFEFC).addRange(0x102E0, 0x102FB).addRange(0x10E60, 0x10E7E).addRange(0x10EFD, 0x10EFF).addRange(0x1EE00, 0x1EE03).addRange(0x1EE05, 0x1EE1F).addRange(0x1EE21, 0x1EE22).addRange(0x1EE29, 0x1EE32).addRange(0x1EE34, 0x1EE37).addRange(0x1EE4D, 0x1EE4F).addRange(0x1EE51, 0x1EE52).addRange(0x1EE61, 0x1EE62).addRange(0x1EE67, 0x1EE6A).addRange(0x1EE6C, 0x1EE72).addRange(0x1EE74, 0x1EE77).addRange(0x1EE79, 0x1EE7C).addRange(0x1EE80, 0x1EE89).addRange(0x1EE8B, 0x1EE9B).addRange(0x1EEA1, 0x1EEA3).addRange(0x1EEA5, 0x1EEA9).addRange(0x1EEAB, 0x1EEBB).addRange(0x1EEF0, 0x1EEF1);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x531, 0x556).addRange(0x559, 0x58A).addRange(0x58D, 0x58F).addRange(0xFB13, 0xFB17);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x10B00, 0x10B35).addRange(0x10B39, 0x10B3F);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x1B00, 0x1B4C).addRange(0x1B50, 0x1B7E);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0xA6A0, 0xA6F7).addRange(0x16800, 0x16A38);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x16AD0, 0x16AED).addRange(0x16AF0, 0x16AF5);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x1BC0, 0x1BF3).addRange(0x1BFC, 0x1BFF);\nexports.characters = set;\n","const set = require('regenerate')(0x9B2, 0x9D7, 0x1CD0, 0x1CD2, 0x1CD8, 0x1CE1, 0x1CEA, 0x1CED, 0x1CF2, 0xA8F1);\nset.addRange(0x951, 0x952).addRange(0x964, 0x965).addRange(0x980, 0x983).addRange(0x985, 0x98C).addRange(0x98F, 0x990).addRange(0x993, 0x9A8).addRange(0x9AA, 0x9B0).addRange(0x9B6, 0x9B9).addRange(0x9BC, 0x9C4).addRange(0x9C7, 0x9C8).addRange(0x9CB, 0x9CE).addRange(0x9DC, 0x9DD).addRange(0x9DF, 0x9E3).addRange(0x9E6, 0x9FE).addRange(0x1CD5, 0x1CD6).addRange(0x1CF5, 0x1CF7);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x11C00, 0x11C08).addRange(0x11C0A, 0x11C36).addRange(0x11C38, 0x11C45).addRange(0x11C50, 0x11C6C);\nexports.characters = set;\n","const set = require('regenerate')(0x3030, 0x3037, 0x30FB);\nset.addRange(0x2EA, 0x2EB).addRange(0x3001, 0x3003).addRange(0x3008, 0x3011).addRange(0x3013, 0x301F).addRange(0x302A, 0x302D).addRange(0x3105, 0x312F).addRange(0x31A0, 0x31BF).addRange(0xFE45, 0xFE46).addRange(0xFF61, 0xFF65);\nexports.characters = set;\n","const set = require('regenerate')(0x1107F);\nset.addRange(0x11000, 0x1104D).addRange(0x11052, 0x11075);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x2800, 0x28FF);\nexports.characters = set;\n","const set = require('regenerate')(0xA9CF);\nset.addRange(0x1A00, 0x1A1B).addRange(0x1A1E, 0x1A1F);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x1735, 0x1736).addRange(0x1740, 0x1753);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x1400, 0x167F).addRange(0x18B0, 0x18F5).addRange(0x11AB0, 0x11ABF);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x102A0, 0x102D0);\nexports.characters = set;\n","const set = require('regenerate')(0x1056F);\nset.addRange(0x10530, 0x10563);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x9E6, 0x9EF).addRange(0x1040, 0x1049).addRange(0x11100, 0x11134).addRange(0x11136, 0x11147);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0xAA00, 0xAA36).addRange(0xAA40, 0xAA4D).addRange(0xAA50, 0xAA59).addRange(0xAA5C, 0xAA5F);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x13A0, 0x13F5).addRange(0x13F8, 0x13FD).addRange(0xAB70, 0xABBF);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x10FB0, 0x10FCB);\nexports.characters = set;\n","const set = require('regenerate')(0xD7, 0xF7, 0x374, 0x37E, 0x385, 0x387, 0x605, 0x6DD, 0x8E2, 0xE3F, 0x3004, 0x3012, 0x3020, 0x3036, 0x31EF, 0x327F, 0x33FF, 0xAB5B, 0xFEFF, 0x1D4A2, 0x1D4BB, 0x1D546, 0x1F7F0, 0xE0001);\nset.addRange(0x0, 0x40).addRange(0x5B, 0x60).addRange(0x7B, 0xA9).addRange(0xAB, 0xB9).addRange(0xBB, 0xBF).addRange(0x2B9, 0x2DF).addRange(0x2E5, 0x2E9).addRange(0x2EC, 0x2FF).addRange(0xFD5, 0xFD8).addRange(0x16EB, 0x16ED).addRange(0x2000, 0x200B).addRange(0x200E, 0x202E).addRange(0x2030, 0x2064).addRange(0x2066, 0x2070).addRange(0x2074, 0x207E).addRange(0x2080, 0x208E).addRange(0x20A0, 0x20C0).addRange(0x2100, 0x2125).addRange(0x2127, 0x2129).addRange(0x212C, 0x2131).addRange(0x2133, 0x214D).addRange(0x214F, 0x215F).addRange(0x2189, 0x218B).addRange(0x2190, 0x2426).addRange(0x2440, 0x244A).addRange(0x2460, 0x27FF).addRange(0x2900, 0x2B73).addRange(0x2B76, 0x2B95).addRange(0x2B97, 0x2BFF).addRange(0x2E00, 0x2E42).addRange(0x2E44, 0x2E5D).addRange(0x2FF0, 0x3000).addRange(0x3248, 0x325F).addRange(0x32B1, 0x32BF).addRange(0x32CC, 0x32CF).addRange(0x3371, 0x337A).addRange(0x3380, 0x33DF).addRange(0x4DC0, 0x4DFF).addRange(0xA708, 0xA721).addRange(0xA788, 0xA78A).addRange(0xAB6A, 0xAB6B).addRange(0xFE10, 0xFE19).addRange(0xFE30, 0xFE44).addRange(0xFE47, 0xFE52).addRange(0xFE54, 0xFE66).addRange(0xFE68, 0xFE6B).addRange(0xFF01, 0xFF20).addRange(0xFF3B, 0xFF40).addRange(0xFF5B, 0xFF60).addRange(0xFFE0, 0xFFE6).addRange(0xFFE8, 0xFFEE);\nset.addRange(0xFFF9, 0xFFFD).addRange(0x10190, 0x1019C).addRange(0x101D0, 0x101FC).addRange(0x1CF50, 0x1CFC3).addRange(0x1D000, 0x1D0F5).addRange(0x1D100, 0x1D126).addRange(0x1D129, 0x1D166).addRange(0x1D16A, 0x1D17A).addRange(0x1D183, 0x1D184).addRange(0x1D18C, 0x1D1A9).addRange(0x1D1AE, 0x1D1EA).addRange(0x1D2C0, 0x1D2D3).addRange(0x1D2E0, 0x1D2F3).addRange(0x1D300, 0x1D356).addRange(0x1D372, 0x1D378).addRange(0x1D400, 0x1D454).addRange(0x1D456, 0x1D49C).addRange(0x1D49E, 0x1D49F).addRange(0x1D4A5, 0x1D4A6).addRange(0x1D4A9, 0x1D4AC).addRange(0x1D4AE, 0x1D4B9).addRange(0x1D4BD, 0x1D4C3).addRange(0x1D4C5, 0x1D505).addRange(0x1D507, 0x1D50A).addRange(0x1D50D, 0x1D514).addRange(0x1D516, 0x1D51C).addRange(0x1D51E, 0x1D539).addRange(0x1D53B, 0x1D53E).addRange(0x1D540, 0x1D544).addRange(0x1D54A, 0x1D550).addRange(0x1D552, 0x1D6A5).addRange(0x1D6A8, 0x1D7CB).addRange(0x1D7CE, 0x1D7FF).addRange(0x1EC71, 0x1ECB4).addRange(0x1ED01, 0x1ED3D).addRange(0x1F000, 0x1F02B).addRange(0x1F030, 0x1F093).addRange(0x1F0A0, 0x1F0AE).addRange(0x1F0B1, 0x1F0BF).addRange(0x1F0C1, 0x1F0CF).addRange(0x1F0D1, 0x1F0F5).addRange(0x1F100, 0x1F1AD).addRange(0x1F1E6, 0x1F1FF).addRange(0x1F201, 0x1F202).addRange(0x1F210, 0x1F23B).addRange(0x1F240, 0x1F248).addRange(0x1F260, 0x1F265).addRange(0x1F300, 0x1F6D7).addRange(0x1F6DC, 0x1F6EC).addRange(0x1F6F0, 0x1F6FC).addRange(0x1F700, 0x1F776);\nset.addRange(0x1F77B, 0x1F7D9).addRange(0x1F7E0, 0x1F7EB).addRange(0x1F800, 0x1F80B).addRange(0x1F810, 0x1F847).addRange(0x1F850, 0x1F859).addRange(0x1F860, 0x1F887).addRange(0x1F890, 0x1F8AD).addRange(0x1F8B0, 0x1F8B1).addRange(0x1F900, 0x1FA53).addRange(0x1FA60, 0x1FA6D).addRange(0x1FA70, 0x1FA7C).addRange(0x1FA80, 0x1FA88).addRange(0x1FA90, 0x1FABD).addRange(0x1FABF, 0x1FAC5).addRange(0x1FACE, 0x1FADB).addRange(0x1FAE0, 0x1FAE8).addRange(0x1FAF0, 0x1FAF8).addRange(0x1FB00, 0x1FB92).addRange(0x1FB94, 0x1FBCA).addRange(0x1FBF0, 0x1FBF9).addRange(0xE0020, 0xE007F);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x3E2, 0x3EF).addRange(0x2C80, 0x2CF3).addRange(0x2CF9, 0x2CFF).addRange(0x102E0, 0x102FB);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x12000, 0x12399).addRange(0x12400, 0x1246E).addRange(0x12470, 0x12474).addRange(0x12480, 0x12543);\nexports.characters = set;\n","const set = require('regenerate')(0x10808, 0x1083C, 0x1083F);\nset.addRange(0x10100, 0x10102).addRange(0x10107, 0x10133).addRange(0x10137, 0x1013F).addRange(0x10800, 0x10805).addRange(0x1080A, 0x10835).addRange(0x10837, 0x10838);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x10100, 0x10101).addRange(0x12F90, 0x12FF2);\nexports.characters = set;\n","const set = require('regenerate')(0x1D2B, 0x1D78, 0x1DF8, 0x2E43, 0x1E08F);\nset.addRange(0x400, 0x52F).addRange(0x1C80, 0x1C88).addRange(0x2DE0, 0x2DFF).addRange(0xA640, 0xA69F).addRange(0xFE2E, 0xFE2F).addRange(0x1E030, 0x1E06D);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x10400, 0x1044F);\nexports.characters = set;\n","const set = require('regenerate')(0x20F0);\nset.addRange(0x900, 0x952).addRange(0x955, 0x97F).addRange(0x1CD0, 0x1CF6).addRange(0x1CF8, 0x1CF9).addRange(0xA830, 0xA839).addRange(0xA8E0, 0xA8FF).addRange(0x11B00, 0x11B09);\nexports.characters = set;\n","const set = require('regenerate')(0x11909);\nset.addRange(0x11900, 0x11906).addRange(0x1190C, 0x11913).addRange(0x11915, 0x11916).addRange(0x11918, 0x11935).addRange(0x11937, 0x11938).addRange(0x1193B, 0x11946).addRange(0x11950, 0x11959);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x964, 0x96F).addRange(0xA830, 0xA839).addRange(0x11800, 0x1183B);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x1BC00, 0x1BC6A).addRange(0x1BC70, 0x1BC7C).addRange(0x1BC80, 0x1BC88).addRange(0x1BC90, 0x1BC99).addRange(0x1BC9C, 0x1BCA3);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x13000, 0x13455);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x10500, 0x10527);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x10FE0, 0x10FF6);\nexports.characters = set;\n","const set = require('regenerate')(0x1258, 0x12C0);\nset.addRange(0x1200, 0x1248).addRange(0x124A, 0x124D).addRange(0x1250, 0x1256).addRange(0x125A, 0x125D).addRange(0x1260, 0x1288).addRange(0x128A, 0x128D).addRange(0x1290, 0x12B0).addRange(0x12B2, 0x12B5).addRange(0x12B8, 0x12BE).addRange(0x12C2, 0x12C5).addRange(0x12C8, 0x12D6).addRange(0x12D8, 0x1310).addRange(0x1312, 0x1315).addRange(0x1318, 0x135A).addRange(0x135D, 0x137C).addRange(0x1380, 0x1399).addRange(0x2D80, 0x2D96).addRange(0x2DA0, 0x2DA6).addRange(0x2DA8, 0x2DAE).addRange(0x2DB0, 0x2DB6).addRange(0x2DB8, 0x2DBE).addRange(0x2DC0, 0x2DC6).addRange(0x2DC8, 0x2DCE).addRange(0x2DD0, 0x2DD6).addRange(0x2DD8, 0x2DDE).addRange(0xAB01, 0xAB06).addRange(0xAB09, 0xAB0E).addRange(0xAB11, 0xAB16).addRange(0xAB20, 0xAB26).addRange(0xAB28, 0xAB2E).addRange(0x1E7E0, 0x1E7E6).addRange(0x1E7E8, 0x1E7EB).addRange(0x1E7ED, 0x1E7EE).addRange(0x1E7F0, 0x1E7FE);\nexports.characters = set;\n","const set = require('regenerate')(0x10C7, 0x10CD, 0x2D27, 0x2D2D);\nset.addRange(0x10A0, 0x10C5).addRange(0x10D0, 0x10FF).addRange(0x1C90, 0x1CBA).addRange(0x1CBD, 0x1CBF).addRange(0x2D00, 0x2D25);\nexports.characters = set;\n","const set = require('regenerate')(0x484, 0x487, 0x2E43, 0xA66F);\nset.addRange(0x2C00, 0x2C5F).addRange(0x1E000, 0x1E006).addRange(0x1E008, 0x1E018).addRange(0x1E01B, 0x1E021).addRange(0x1E023, 0x1E024).addRange(0x1E026, 0x1E02A);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x10330, 0x1034A);\nexports.characters = set;\n","const set = require('regenerate')(0x1CD0, 0x20F0, 0x11350, 0x11357, 0x11FD3);\nset.addRange(0x951, 0x952).addRange(0x964, 0x965).addRange(0xBE6, 0xBF3).addRange(0x1CD2, 0x1CD3).addRange(0x1CF2, 0x1CF4).addRange(0x1CF8, 0x1CF9).addRange(0x11300, 0x11303).addRange(0x11305, 0x1130C).addRange(0x1130F, 0x11310).addRange(0x11313, 0x11328).addRange(0x1132A, 0x11330).addRange(0x11332, 0x11333).addRange(0x11335, 0x11339).addRange(0x1133B, 0x11344).addRange(0x11347, 0x11348).addRange(0x1134B, 0x1134D).addRange(0x1135D, 0x11363).addRange(0x11366, 0x1136C).addRange(0x11370, 0x11374).addRange(0x11FD0, 0x11FD1);\nexports.characters = set;\n","const set = require('regenerate')(0x342, 0x345, 0x37F, 0x384, 0x386, 0x38C, 0x1F59, 0x1F5B, 0x1F5D, 0x2126, 0xAB65, 0x101A0);\nset.addRange(0x370, 0x373).addRange(0x375, 0x377).addRange(0x37A, 0x37D).addRange(0x388, 0x38A).addRange(0x38E, 0x3A1).addRange(0x3A3, 0x3E1).addRange(0x3F0, 0x3FF).addRange(0x1D26, 0x1D2A).addRange(0x1D5D, 0x1D61).addRange(0x1D66, 0x1D6A).addRange(0x1DBF, 0x1DC1).addRange(0x1F00, 0x1F15).addRange(0x1F18, 0x1F1D).addRange(0x1F20, 0x1F45).addRange(0x1F48, 0x1F4D).addRange(0x1F50, 0x1F57).addRange(0x1F5F, 0x1F7D).addRange(0x1F80, 0x1FB4).addRange(0x1FB6, 0x1FC4).addRange(0x1FC6, 0x1FD3).addRange(0x1FD6, 0x1FDB).addRange(0x1FDD, 0x1FEF).addRange(0x1FF2, 0x1FF4).addRange(0x1FF6, 0x1FFE).addRange(0x10140, 0x1018E).addRange(0x1D200, 0x1D245);\nexports.characters = set;\n","const set = require('regenerate')(0xAD0);\nset.addRange(0x951, 0x952).addRange(0x964, 0x965).addRange(0xA81, 0xA83).addRange(0xA85, 0xA8D).addRange(0xA8F, 0xA91).addRange(0xA93, 0xAA8).addRange(0xAAA, 0xAB0).addRange(0xAB2, 0xAB3).addRange(0xAB5, 0xAB9).addRange(0xABC, 0xAC5).addRange(0xAC7, 0xAC9).addRange(0xACB, 0xACD).addRange(0xAE0, 0xAE3).addRange(0xAE6, 0xAF1).addRange(0xAF9, 0xAFF).addRange(0xA830, 0xA839);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x964, 0x965).addRange(0x11D60, 0x11D65).addRange(0x11D67, 0x11D68).addRange(0x11D6A, 0x11D8E).addRange(0x11D90, 0x11D91).addRange(0x11D93, 0x11D98).addRange(0x11DA0, 0x11DA9);\nexports.characters = set;\n","const set = require('regenerate')(0xA3C, 0xA51, 0xA5E);\nset.addRange(0x951, 0x952).addRange(0x964, 0x965).addRange(0xA01, 0xA03).addRange(0xA05, 0xA0A).addRange(0xA0F, 0xA10).addRange(0xA13, 0xA28).addRange(0xA2A, 0xA30).addRange(0xA32, 0xA33).addRange(0xA35, 0xA36).addRange(0xA38, 0xA39).addRange(0xA3E, 0xA42).addRange(0xA47, 0xA48).addRange(0xA4B, 0xA4D).addRange(0xA59, 0xA5C).addRange(0xA66, 0xA76).addRange(0xA830, 0xA839);\nexports.characters = set;\n","const set = require('regenerate')(0x3030, 0x30FB, 0x32FF);\nset.addRange(0x2E80, 0x2E99).addRange(0x2E9B, 0x2EF3).addRange(0x2F00, 0x2FD5).addRange(0x3001, 0x3003).addRange(0x3005, 0x3011).addRange(0x3013, 0x301F).addRange(0x3021, 0x302D).addRange(0x3037, 0x303F).addRange(0x3190, 0x319F).addRange(0x31C0, 0x31E3).addRange(0x3220, 0x3247).addRange(0x3280, 0x32B0).addRange(0x32C0, 0x32CB).addRange(0x3358, 0x3370).addRange(0x337B, 0x337F).addRange(0x33E0, 0x33FE).addRange(0x3400, 0x4DBF).addRange(0x4E00, 0x9FFF).addRange(0xA700, 0xA707).addRange(0xF900, 0xFA6D).addRange(0xFA70, 0xFAD9).addRange(0xFE45, 0xFE46).addRange(0xFF61, 0xFF65).addRange(0x16FE2, 0x16FE3).addRange(0x16FF0, 0x16FF1).addRange(0x1D360, 0x1D371).addRange(0x1F250, 0x1F251).addRange(0x20000, 0x2A6DF).addRange(0x2A700, 0x2B739).addRange(0x2B740, 0x2B81D).addRange(0x2B820, 0x2CEA1).addRange(0x2CEB0, 0x2EBE0).addRange(0x2EBF0, 0x2EE5D).addRange(0x2F800, 0x2FA1D).addRange(0x30000, 0x3134A).addRange(0x31350, 0x323AF);\nexports.characters = set;\n","const set = require('regenerate')(0x3037, 0x30FB);\nset.addRange(0x1100, 0x11FF).addRange(0x3001, 0x3003).addRange(0x3008, 0x3011).addRange(0x3013, 0x301F).addRange(0x302E, 0x3030).addRange(0x3131, 0x318E).addRange(0x3200, 0x321E).addRange(0x3260, 0x327E).addRange(0xA960, 0xA97C).addRange(0xAC00, 0xD7A3).addRange(0xD7B0, 0xD7C6).addRange(0xD7CB, 0xD7FB).addRange(0xFE45, 0xFE46).addRange(0xFF61, 0xFF65).addRange(0xFFA0, 0xFFBE).addRange(0xFFC2, 0xFFC7).addRange(0xFFCA, 0xFFCF).addRange(0xFFD2, 0xFFD7).addRange(0xFFDA, 0xFFDC);\nexports.characters = set;\n","const set = require('regenerate')(0x60C, 0x61B, 0x61F, 0x640, 0x6D4);\nset.addRange(0x10D00, 0x10D27).addRange(0x10D30, 0x10D39);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x1720, 0x1736);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x108E0, 0x108F2).addRange(0x108F4, 0x108F5).addRange(0x108FB, 0x108FF);\nexports.characters = set;\n","const set = require('regenerate')(0xFB3E);\nset.addRange(0x591, 0x5C7).addRange(0x5D0, 0x5EA).addRange(0x5EF, 0x5F4).addRange(0xFB1D, 0xFB36).addRange(0xFB38, 0xFB3C).addRange(0xFB40, 0xFB41).addRange(0xFB43, 0xFB44).addRange(0xFB46, 0xFB4F);\nexports.characters = set;\n","const set = require('regenerate')(0x3037, 0xFF70, 0x1B132, 0x1F200);\nset.addRange(0x3001, 0x3003).addRange(0x3008, 0x3011).addRange(0x3013, 0x301F).addRange(0x3030, 0x3035).addRange(0x303C, 0x303D).addRange(0x3041, 0x3096).addRange(0x3099, 0x30A0).addRange(0x30FB, 0x30FC).addRange(0xFE45, 0xFE46).addRange(0xFF61, 0xFF65).addRange(0xFF9E, 0xFF9F).addRange(0x1B001, 0x1B11F).addRange(0x1B150, 0x1B152);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x10840, 0x10855).addRange(0x10857, 0x1085F);\nexports.characters = set;\n","const set = require('regenerate')(0x1DF9, 0x101FD);\nset.addRange(0x300, 0x341).addRange(0x343, 0x344).addRange(0x346, 0x362).addRange(0x953, 0x954).addRange(0x1AB0, 0x1ACE).addRange(0x1DC2, 0x1DF7).addRange(0x1DFB, 0x1DFF).addRange(0x200C, 0x200D).addRange(0x20D0, 0x20EF).addRange(0xFE00, 0xFE0F).addRange(0xFE20, 0xFE2D).addRange(0x1CF00, 0x1CF2D).addRange(0x1CF30, 0x1CF46).addRange(0x1D167, 0x1D169).addRange(0x1D17B, 0x1D182).addRange(0x1D185, 0x1D18B).addRange(0x1D1AA, 0x1D1AD).addRange(0xE0100, 0xE01EF);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x10B60, 0x10B72).addRange(0x10B78, 0x10B7F);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x10B40, 0x10B55).addRange(0x10B58, 0x10B5F);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0xA980, 0xA9CD).addRange(0xA9CF, 0xA9D9).addRange(0xA9DE, 0xA9DF);\nexports.characters = set;\n","const set = require('regenerate')(0x110CD);\nset.addRange(0x966, 0x96F).addRange(0xA830, 0xA839).addRange(0x11080, 0x110C2);\nexports.characters = set;\n","const set = require('regenerate')(0x1CD0, 0x1CD2, 0x1CDA, 0x1CF2, 0x1CF4);\nset.addRange(0x951, 0x952).addRange(0x964, 0x965).addRange(0xC80, 0xC8C).addRange(0xC8E, 0xC90).addRange(0xC92, 0xCA8).addRange(0xCAA, 0xCB3).addRange(0xCB5, 0xCB9).addRange(0xCBC, 0xCC4).addRange(0xCC6, 0xCC8).addRange(0xCCA, 0xCCD).addRange(0xCD5, 0xCD6).addRange(0xCDD, 0xCDE).addRange(0xCE0, 0xCE3).addRange(0xCE6, 0xCEF).addRange(0xCF1, 0xCF3).addRange(0xA830, 0xA835);\nexports.characters = set;\n","const set = require('regenerate')(0x3037, 0x1B000, 0x1B155);\nset.addRange(0x3001, 0x3003).addRange(0x3008, 0x3011).addRange(0x3013, 0x301F).addRange(0x3030, 0x3035).addRange(0x303C, 0x303D).addRange(0x3099, 0x309C).addRange(0x30A0, 0x30FF).addRange(0x31F0, 0x31FF).addRange(0x32D0, 0x32FE).addRange(0x3300, 0x3357).addRange(0xFE45, 0xFE46).addRange(0xFF61, 0xFF9F).addRange(0x1AFF0, 0x1AFF3).addRange(0x1AFF5, 0x1AFFB).addRange(0x1AFFD, 0x1AFFE).addRange(0x1B120, 0x1B122).addRange(0x1B164, 0x1B167);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x11F00, 0x11F10).addRange(0x11F12, 0x11F3A).addRange(0x11F3E, 0x11F59);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0xA900, 0xA92F);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x10A00, 0x10A03).addRange(0x10A05, 0x10A06).addRange(0x10A0C, 0x10A13).addRange(0x10A15, 0x10A17).addRange(0x10A19, 0x10A35).addRange(0x10A38, 0x10A3A).addRange(0x10A3F, 0x10A48).addRange(0x10A50, 0x10A58);\nexports.characters = set;\n","const set = require('regenerate')(0x16FE4);\nset.addRange(0x18B00, 0x18CD5);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x1780, 0x17DD).addRange(0x17E0, 0x17E9).addRange(0x17F0, 0x17F9).addRange(0x19E0, 0x19FF);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0xAE6, 0xAEF).addRange(0xA830, 0xA839).addRange(0x11200, 0x11211).addRange(0x11213, 0x11241);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x964, 0x965).addRange(0xA830, 0xA839).addRange(0x112B0, 0x112EA).addRange(0x112F0, 0x112F9);\nexports.characters = set;\n","const set = require('regenerate')(0xE84, 0xEA5, 0xEC6);\nset.addRange(0xE81, 0xE82).addRange(0xE86, 0xE8A).addRange(0xE8C, 0xEA3).addRange(0xEA7, 0xEBD).addRange(0xEC0, 0xEC4).addRange(0xEC8, 0xECE).addRange(0xED0, 0xED9).addRange(0xEDC, 0xEDF);\nexports.characters = set;\n","const set = require('regenerate')(0xAA, 0xBA, 0x10FB, 0x202F, 0x2071, 0x207F, 0x20F0, 0x2132, 0x214E, 0xA7D3, 0xA92E);\nset.addRange(0x41, 0x5A).addRange(0x61, 0x7A).addRange(0xC0, 0xD6).addRange(0xD8, 0xF6).addRange(0xF8, 0x2B8).addRange(0x2E0, 0x2E4).addRange(0x363, 0x36F).addRange(0x485, 0x486).addRange(0x951, 0x952).addRange(0x1D00, 0x1D25).addRange(0x1D2C, 0x1D5C).addRange(0x1D62, 0x1D65).addRange(0x1D6B, 0x1D77).addRange(0x1D79, 0x1DBE).addRange(0x1E00, 0x1EFF).addRange(0x2090, 0x209C).addRange(0x212A, 0x212B).addRange(0x2160, 0x2188).addRange(0x2C60, 0x2C7F).addRange(0xA700, 0xA707).addRange(0xA722, 0xA787).addRange(0xA78B, 0xA7CA).addRange(0xA7D0, 0xA7D1).addRange(0xA7D5, 0xA7D9).addRange(0xA7F2, 0xA7FF).addRange(0xAB30, 0xAB5A).addRange(0xAB5C, 0xAB64).addRange(0xAB66, 0xAB69).addRange(0xFB00, 0xFB06).addRange(0xFF21, 0xFF3A).addRange(0xFF41, 0xFF5A).addRange(0x10780, 0x10785).addRange(0x10787, 0x107B0).addRange(0x107B2, 0x107BA).addRange(0x1DF00, 0x1DF1E).addRange(0x1DF25, 0x1DF2A);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x1C00, 0x1C37).addRange(0x1C3B, 0x1C49).addRange(0x1C4D, 0x1C4F);\nexports.characters = set;\n","const set = require('regenerate')(0x965, 0x1940);\nset.addRange(0x1900, 0x191E).addRange(0x1920, 0x192B).addRange(0x1930, 0x193B).addRange(0x1944, 0x194F);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x10107, 0x10133).addRange(0x10600, 0x10736).addRange(0x10740, 0x10755).addRange(0x10760, 0x10767);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x10000, 0x1000B).addRange(0x1000D, 0x10026).addRange(0x10028, 0x1003A).addRange(0x1003C, 0x1003D).addRange(0x1003F, 0x1004D).addRange(0x10050, 0x1005D).addRange(0x10080, 0x100FA).addRange(0x10100, 0x10102).addRange(0x10107, 0x10133).addRange(0x10137, 0x1013F);\nexports.characters = set;\n","const set = require('regenerate')(0x11FB0);\nset.addRange(0xA4D0, 0xA4FF);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x10280, 0x1029C);\nexports.characters = set;\n","const set = require('regenerate')(0x1093F);\nset.addRange(0x10920, 0x10939);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x964, 0x96F).addRange(0xA830, 0xA839).addRange(0x11150, 0x11176);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x11EE0, 0x11EF8);\nexports.characters = set;\n","const set = require('regenerate')(0x1CDA, 0x1CF2);\nset.addRange(0x951, 0x952).addRange(0x964, 0x965).addRange(0xD00, 0xD0C).addRange(0xD0E, 0xD10).addRange(0xD12, 0xD44).addRange(0xD46, 0xD48).addRange(0xD4A, 0xD4F).addRange(0xD54, 0xD63).addRange(0xD66, 0xD7F).addRange(0xA830, 0xA832);\nexports.characters = set;\n","const set = require('regenerate')(0x640, 0x85E);\nset.addRange(0x840, 0x85B);\nexports.characters = set;\n","const set = require('regenerate')(0x640);\nset.addRange(0x10AC0, 0x10AE6).addRange(0x10AEB, 0x10AF6);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x11C70, 0x11C8F).addRange(0x11C92, 0x11CA7).addRange(0x11CA9, 0x11CB6);\nexports.characters = set;\n","const set = require('regenerate')(0x11D3A);\nset.addRange(0x964, 0x965).addRange(0x11D00, 0x11D06).addRange(0x11D08, 0x11D09).addRange(0x11D0B, 0x11D36).addRange(0x11D3C, 0x11D3D).addRange(0x11D3F, 0x11D47).addRange(0x11D50, 0x11D59);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x16E40, 0x16E9A);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0xAAE0, 0xAAF6).addRange(0xABC0, 0xABED).addRange(0xABF0, 0xABF9);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x1E800, 0x1E8C4).addRange(0x1E8C7, 0x1E8D6);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x109A0, 0x109B7).addRange(0x109BC, 0x109CF).addRange(0x109D2, 0x109FF);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x10980, 0x1099F);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x16F00, 0x16F4A).addRange(0x16F4F, 0x16F87).addRange(0x16F8F, 0x16F9F);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0xA830, 0xA839).addRange(0x11600, 0x11644).addRange(0x11650, 0x11659);\nexports.characters = set;\n","const set = require('regenerate')(0x202F);\nset.addRange(0x1800, 0x1819).addRange(0x1820, 0x1878).addRange(0x1880, 0x18AA).addRange(0x11660, 0x1166C);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x16A40, 0x16A5E).addRange(0x16A60, 0x16A69).addRange(0x16A6E, 0x16A6F);\nexports.characters = set;\n","const set = require('regenerate')(0x11288);\nset.addRange(0xA66, 0xA6F).addRange(0x11280, 0x11286).addRange(0x1128A, 0x1128D).addRange(0x1128F, 0x1129D).addRange(0x1129F, 0x112A9);\nexports.characters = set;\n","const set = require('regenerate')(0xA92E);\nset.addRange(0x1000, 0x109F).addRange(0xA9E0, 0xA9FE).addRange(0xAA60, 0xAA7F);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x10880, 0x1089E).addRange(0x108A7, 0x108AF);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x1E4D0, 0x1E4F9);\nexports.characters = set;\n","const set = require('regenerate')(0x1CE9, 0x1CF2, 0x1CFA);\nset.addRange(0x964, 0x965).addRange(0xCE6, 0xCEF).addRange(0xA830, 0xA835).addRange(0x119A0, 0x119A7).addRange(0x119AA, 0x119D7).addRange(0x119DA, 0x119E4);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x1980, 0x19AB).addRange(0x19B0, 0x19C9).addRange(0x19D0, 0x19DA).addRange(0x19DE, 0x19DF);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x11400, 0x1145B).addRange(0x1145D, 0x11461);\nexports.characters = set;\n","const set = require('regenerate')(0x60C, 0x61B, 0x61F);\nset.addRange(0x7C0, 0x7FA).addRange(0x7FD, 0x7FF).addRange(0xFD3E, 0xFD3F);\nexports.characters = set;\n","const set = require('regenerate')(0x16FE1);\nset.addRange(0x1B170, 0x1B2FB);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x1E100, 0x1E12C).addRange(0x1E130, 0x1E13D).addRange(0x1E140, 0x1E149).addRange(0x1E14E, 0x1E14F);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x1680, 0x169C);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x1C50, 0x1C7F);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x10C80, 0x10CB2).addRange(0x10CC0, 0x10CF2).addRange(0x10CFA, 0x10CFF);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x10300, 0x10323).addRange(0x1032D, 0x1032F);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x10A80, 0x10A9F);\nexports.characters = set;\n","const set = require('regenerate')(0x483);\nset.addRange(0x10350, 0x1037A);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x103A0, 0x103C3).addRange(0x103C8, 0x103D5);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x10F00, 0x10F27);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x10A60, 0x10A7F);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x10C00, 0x10C48);\nexports.characters = set;\n","const set = require('regenerate')(0x640, 0x10AF2);\nset.addRange(0x10F70, 0x10F89);\nexports.characters = set;\n","const set = require('regenerate')(0x1CDA, 0x1CF2);\nset.addRange(0x951, 0x952).addRange(0x964, 0x965).addRange(0xB01, 0xB03).addRange(0xB05, 0xB0C).addRange(0xB0F, 0xB10).addRange(0xB13, 0xB28).addRange(0xB2A, 0xB30).addRange(0xB32, 0xB33).addRange(0xB35, 0xB39).addRange(0xB3C, 0xB44).addRange(0xB47, 0xB48).addRange(0xB4B, 0xB4D).addRange(0xB55, 0xB57).addRange(0xB5C, 0xB5D).addRange(0xB5F, 0xB63).addRange(0xB66, 0xB77);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x104B0, 0x104D3).addRange(0x104D8, 0x104FB);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x10480, 0x1049D).addRange(0x104A0, 0x104A9);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x16B00, 0x16B45).addRange(0x16B50, 0x16B59).addRange(0x16B5B, 0x16B61).addRange(0x16B63, 0x16B77).addRange(0x16B7D, 0x16B8F);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x10860, 0x1087F);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x11AC0, 0x11AF8);\nexports.characters = set;\n","const set = require('regenerate')(0x1805);\nset.addRange(0x1802, 0x1803).addRange(0xA840, 0xA877);\nexports.characters = set;\n","const set = require('regenerate')(0x1091F);\nset.addRange(0x10900, 0x1091B);\nexports.characters = set;\n","const set = require('regenerate')(0x640);\nset.addRange(0x10B80, 0x10B91).addRange(0x10B99, 0x10B9C).addRange(0x10BA9, 0x10BAF);\nexports.characters = set;\n","const set = require('regenerate')(0xA95F);\nset.addRange(0xA930, 0xA953);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x16A0, 0x16EA).addRange(0x16EE, 0x16F8);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x800, 0x82D).addRange(0x830, 0x83E);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0xA880, 0xA8C5).addRange(0xA8CE, 0xA8D9);\nexports.characters = set;\n","const set = require('regenerate')(0x951, 0x1CD7, 0x1CD9, 0x1CE0, 0xA838);\nset.addRange(0x1CDC, 0x1CDD).addRange(0xA830, 0xA835).addRange(0x11180, 0x111DF);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x10450, 0x1047F);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x11580, 0x115B5).addRange(0x115B8, 0x115DD);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x1D800, 0x1DA8B).addRange(0x1DA9B, 0x1DA9F).addRange(0x1DAA1, 0x1DAAF);\nexports.characters = set;\n","const set = require('regenerate')(0xDBD, 0xDCA, 0xDD6, 0x1CF2);\nset.addRange(0x964, 0x965).addRange(0xD81, 0xD83).addRange(0xD85, 0xD96).addRange(0xD9A, 0xDB1).addRange(0xDB3, 0xDBB).addRange(0xDC0, 0xDC6).addRange(0xDCF, 0xDD4).addRange(0xDD8, 0xDDF).addRange(0xDE6, 0xDEF).addRange(0xDF2, 0xDF4).addRange(0x111E1, 0x111F4);\nexports.characters = set;\n","const set = require('regenerate')(0x640);\nset.addRange(0x10F30, 0x10F59);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x110D0, 0x110E8).addRange(0x110F0, 0x110F9);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x11A50, 0x11AA2);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x1B80, 0x1BBF).addRange(0x1CC0, 0x1CC7);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x964, 0x965).addRange(0x9E6, 0x9EF).addRange(0xA800, 0xA82C);\nexports.characters = set;\n","const set = require('regenerate')(0x60C, 0x61F, 0x640, 0x670, 0x1DF8, 0x1DFA);\nset.addRange(0x61B, 0x61C).addRange(0x64B, 0x655).addRange(0x700, 0x70D).addRange(0x70F, 0x74A).addRange(0x74D, 0x74F).addRange(0x860, 0x86A);\nexports.characters = set;\n","const set = require('regenerate')(0x171F);\nset.addRange(0x1700, 0x1715).addRange(0x1735, 0x1736);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x1735, 0x1736).addRange(0x1760, 0x176C).addRange(0x176E, 0x1770).addRange(0x1772, 0x1773);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x1040, 0x1049).addRange(0x1950, 0x196D).addRange(0x1970, 0x1974);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x1A20, 0x1A5E).addRange(0x1A60, 0x1A7C).addRange(0x1A7F, 0x1A89).addRange(0x1A90, 0x1A99).addRange(0x1AA0, 0x1AAD);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0xAA80, 0xAAC2).addRange(0xAADB, 0xAADF);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x964, 0x965).addRange(0xA830, 0xA839).addRange(0x11680, 0x116B9).addRange(0x116C0, 0x116C9);\nexports.characters = set;\n","const set = require('regenerate')(0xB9C, 0xBD0, 0xBD7, 0x1CDA, 0xA8F3, 0x11301, 0x11303, 0x11FFF);\nset.addRange(0x951, 0x952).addRange(0x964, 0x965).addRange(0xB82, 0xB83).addRange(0xB85, 0xB8A).addRange(0xB8E, 0xB90).addRange(0xB92, 0xB95).addRange(0xB99, 0xB9A).addRange(0xB9E, 0xB9F).addRange(0xBA3, 0xBA4).addRange(0xBA8, 0xBAA).addRange(0xBAE, 0xBB9).addRange(0xBBE, 0xBC2).addRange(0xBC6, 0xBC8).addRange(0xBCA, 0xBCD).addRange(0xBE6, 0xBFA).addRange(0x1133B, 0x1133C).addRange(0x11FC0, 0x11FF1);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x16A70, 0x16ABE).addRange(0x16AC0, 0x16AC9);\nexports.characters = set;\n","const set = require('regenerate')(0x16FE0);\nset.addRange(0x17000, 0x187F7).addRange(0x18800, 0x18AFF).addRange(0x18D00, 0x18D08);\nexports.characters = set;\n","const set = require('regenerate')(0xC5D, 0x1CDA, 0x1CF2);\nset.addRange(0x951, 0x952).addRange(0x964, 0x965).addRange(0xC00, 0xC0C).addRange(0xC0E, 0xC10).addRange(0xC12, 0xC28).addRange(0xC2A, 0xC39).addRange(0xC3C, 0xC44).addRange(0xC46, 0xC48).addRange(0xC4A, 0xC4D).addRange(0xC55, 0xC56).addRange(0xC58, 0xC5A).addRange(0xC60, 0xC63).addRange(0xC66, 0xC6F).addRange(0xC77, 0xC7F);\nexports.characters = set;\n","const set = require('regenerate')(0x60C, 0x61F, 0xFDF2, 0xFDFD);\nset.addRange(0x61B, 0x61C).addRange(0x660, 0x669).addRange(0x780, 0x7B1);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0xE01, 0xE3A).addRange(0xE40, 0xE5B);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0xF00, 0xF47).addRange(0xF49, 0xF6C).addRange(0xF71, 0xF97).addRange(0xF99, 0xFBC).addRange(0xFBE, 0xFCC).addRange(0xFCE, 0xFD4).addRange(0xFD9, 0xFDA);\nexports.characters = set;\n","const set = require('regenerate')(0x2D7F);\nset.addRange(0x2D30, 0x2D67).addRange(0x2D6F, 0x2D70);\nexports.characters = set;\n","const set = require('regenerate')(0x1CF2);\nset.addRange(0x951, 0x952).addRange(0x964, 0x965).addRange(0xA830, 0xA839).addRange(0x11480, 0x114C7).addRange(0x114D0, 0x114D9);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x1E290, 0x1E2AE);\nexports.characters = set;\n","const set = require('regenerate')(0x1039F);\nset.addRange(0x10380, 0x1039D);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0xA500, 0xA62B);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x10570, 0x1057A).addRange(0x1057C, 0x1058A).addRange(0x1058C, 0x10592).addRange(0x10594, 0x10595).addRange(0x10597, 0x105A1).addRange(0x105A3, 0x105B1).addRange(0x105B3, 0x105B9).addRange(0x105BB, 0x105BC);\nexports.characters = set;\n","const set = require('regenerate')(0x1E2FF);\nset.addRange(0x1E2C0, 0x1E2F9);\nexports.characters = set;\n","const set = require('regenerate')(0x118FF);\nset.addRange(0x118A0, 0x118F2);\nexports.characters = set;\n","const set = require('regenerate')(0x60C, 0x61B, 0x61F);\nset.addRange(0x660, 0x669).addRange(0x10E80, 0x10EA9).addRange(0x10EAB, 0x10EAD).addRange(0x10EB0, 0x10EB1);\nexports.characters = set;\n","const set = require('regenerate')(0x30FB);\nset.addRange(0x3001, 0x3002).addRange(0x3008, 0x3011).addRange(0x3014, 0x301B).addRange(0xA000, 0xA48C).addRange(0xA490, 0xA4C6).addRange(0xFF61, 0xFF65);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x11A00, 0x11A47);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x1E900, 0x1E94B).addRange(0x1E950, 0x1E959).addRange(0x1E95E, 0x1E95F);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x11700, 0x1171A).addRange(0x1171D, 0x1172B).addRange(0x11730, 0x11746);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x14400, 0x14646);\nexports.characters = set;\n","const set = require('regenerate')(0xFDCF, 0x1EE24, 0x1EE27, 0x1EE39, 0x1EE3B, 0x1EE42, 0x1EE47, 0x1EE49, 0x1EE4B, 0x1EE54, 0x1EE57, 0x1EE59, 0x1EE5B, 0x1EE5D, 0x1EE5F, 0x1EE64, 0x1EE7E);\nset.addRange(0x600, 0x604).addRange(0x606, 0x60B).addRange(0x60D, 0x61A).addRange(0x61C, 0x61E).addRange(0x620, 0x63F).addRange(0x641, 0x64A).addRange(0x656, 0x66F).addRange(0x671, 0x6DC).addRange(0x6DE, 0x6FF).addRange(0x750, 0x77F).addRange(0x870, 0x88E).addRange(0x890, 0x891).addRange(0x898, 0x8E1).addRange(0x8E3, 0x8FF).addRange(0xFB50, 0xFBC2).addRange(0xFBD3, 0xFD3D).addRange(0xFD40, 0xFD8F).addRange(0xFD92, 0xFDC7).addRange(0xFDF0, 0xFDFF).addRange(0xFE70, 0xFE74).addRange(0xFE76, 0xFEFC).addRange(0x10E60, 0x10E7E).addRange(0x10EFD, 0x10EFF).addRange(0x1EE00, 0x1EE03).addRange(0x1EE05, 0x1EE1F).addRange(0x1EE21, 0x1EE22).addRange(0x1EE29, 0x1EE32).addRange(0x1EE34, 0x1EE37).addRange(0x1EE4D, 0x1EE4F).addRange(0x1EE51, 0x1EE52).addRange(0x1EE61, 0x1EE62).addRange(0x1EE67, 0x1EE6A).addRange(0x1EE6C, 0x1EE72).addRange(0x1EE74, 0x1EE77).addRange(0x1EE79, 0x1EE7C).addRange(0x1EE80, 0x1EE89).addRange(0x1EE8B, 0x1EE9B).addRange(0x1EEA1, 0x1EEA3).addRange(0x1EEA5, 0x1EEA9).addRange(0x1EEAB, 0x1EEBB).addRange(0x1EEF0, 0x1EEF1);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x531, 0x556).addRange(0x559, 0x58A).addRange(0x58D, 0x58F).addRange(0xFB13, 0xFB17);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x10B00, 0x10B35).addRange(0x10B39, 0x10B3F);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x1B00, 0x1B4C).addRange(0x1B50, 0x1B7E);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0xA6A0, 0xA6F7).addRange(0x16800, 0x16A38);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x16AD0, 0x16AED).addRange(0x16AF0, 0x16AF5);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x1BC0, 0x1BF3).addRange(0x1BFC, 0x1BFF);\nexports.characters = set;\n","const set = require('regenerate')(0x9B2, 0x9D7);\nset.addRange(0x980, 0x983).addRange(0x985, 0x98C).addRange(0x98F, 0x990).addRange(0x993, 0x9A8).addRange(0x9AA, 0x9B0).addRange(0x9B6, 0x9B9).addRange(0x9BC, 0x9C4).addRange(0x9C7, 0x9C8).addRange(0x9CB, 0x9CE).addRange(0x9DC, 0x9DD).addRange(0x9DF, 0x9E3).addRange(0x9E6, 0x9FE);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x11C00, 0x11C08).addRange(0x11C0A, 0x11C36).addRange(0x11C38, 0x11C45).addRange(0x11C50, 0x11C6C);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x2EA, 0x2EB).addRange(0x3105, 0x312F).addRange(0x31A0, 0x31BF);\nexports.characters = set;\n","const set = require('regenerate')(0x1107F);\nset.addRange(0x11000, 0x1104D).addRange(0x11052, 0x11075);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x2800, 0x28FF);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x1A00, 0x1A1B).addRange(0x1A1E, 0x1A1F);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x1740, 0x1753);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x1400, 0x167F).addRange(0x18B0, 0x18F5).addRange(0x11AB0, 0x11ABF);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x102A0, 0x102D0);\nexports.characters = set;\n","const set = require('regenerate')(0x1056F);\nset.addRange(0x10530, 0x10563);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x11100, 0x11134).addRange(0x11136, 0x11147);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0xAA00, 0xAA36).addRange(0xAA40, 0xAA4D).addRange(0xAA50, 0xAA59).addRange(0xAA5C, 0xAA5F);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x13A0, 0x13F5).addRange(0x13F8, 0x13FD).addRange(0xAB70, 0xABBF);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x10FB0, 0x10FCB);\nexports.characters = set;\n","const set = require('regenerate')(0xD7, 0xF7, 0x374, 0x37E, 0x385, 0x387, 0x605, 0x60C, 0x61B, 0x61F, 0x640, 0x6DD, 0x8E2, 0xE3F, 0x10FB, 0x1805, 0x1CD3, 0x1CE1, 0x1CFA, 0x3006, 0x30A0, 0x31EF, 0x32FF, 0xA92E, 0xA9CF, 0xAB5B, 0xFEFF, 0xFF70, 0x1D4A2, 0x1D4BB, 0x1D546, 0x1F7F0, 0xE0001);\nset.addRange(0x0, 0x40).addRange(0x5B, 0x60).addRange(0x7B, 0xA9).addRange(0xAB, 0xB9).addRange(0xBB, 0xBF).addRange(0x2B9, 0x2DF).addRange(0x2E5, 0x2E9).addRange(0x2EC, 0x2FF).addRange(0x964, 0x965).addRange(0xFD5, 0xFD8).addRange(0x16EB, 0x16ED).addRange(0x1735, 0x1736).addRange(0x1802, 0x1803).addRange(0x1CE9, 0x1CEC).addRange(0x1CEE, 0x1CF3).addRange(0x1CF5, 0x1CF7).addRange(0x2000, 0x200B).addRange(0x200E, 0x2064).addRange(0x2066, 0x2070).addRange(0x2074, 0x207E).addRange(0x2080, 0x208E).addRange(0x20A0, 0x20C0).addRange(0x2100, 0x2125).addRange(0x2127, 0x2129).addRange(0x212C, 0x2131).addRange(0x2133, 0x214D).addRange(0x214F, 0x215F).addRange(0x2189, 0x218B).addRange(0x2190, 0x2426).addRange(0x2440, 0x244A).addRange(0x2460, 0x27FF).addRange(0x2900, 0x2B73).addRange(0x2B76, 0x2B95).addRange(0x2B97, 0x2BFF).addRange(0x2E00, 0x2E5D).addRange(0x2FF0, 0x3004).addRange(0x3008, 0x3020).addRange(0x3030, 0x3037).addRange(0x303C, 0x303F).addRange(0x309B, 0x309C).addRange(0x30FB, 0x30FC).addRange(0x3190, 0x319F).addRange(0x31C0, 0x31E3).addRange(0x3220, 0x325F).addRange(0x327F, 0x32CF).addRange(0x3358, 0x33FF).addRange(0x4DC0, 0x4DFF).addRange(0xA700, 0xA721).addRange(0xA788, 0xA78A).addRange(0xA830, 0xA839).addRange(0xAB6A, 0xAB6B);\nset.addRange(0xFD3E, 0xFD3F).addRange(0xFE10, 0xFE19).addRange(0xFE30, 0xFE52).addRange(0xFE54, 0xFE66).addRange(0xFE68, 0xFE6B).addRange(0xFF01, 0xFF20).addRange(0xFF3B, 0xFF40).addRange(0xFF5B, 0xFF65).addRange(0xFF9E, 0xFF9F).addRange(0xFFE0, 0xFFE6).addRange(0xFFE8, 0xFFEE).addRange(0xFFF9, 0xFFFD).addRange(0x10100, 0x10102).addRange(0x10107, 0x10133).addRange(0x10137, 0x1013F).addRange(0x10190, 0x1019C).addRange(0x101D0, 0x101FC).addRange(0x102E1, 0x102FB).addRange(0x1BCA0, 0x1BCA3).addRange(0x1CF50, 0x1CFC3).addRange(0x1D000, 0x1D0F5).addRange(0x1D100, 0x1D126).addRange(0x1D129, 0x1D166).addRange(0x1D16A, 0x1D17A).addRange(0x1D183, 0x1D184).addRange(0x1D18C, 0x1D1A9).addRange(0x1D1AE, 0x1D1EA).addRange(0x1D2C0, 0x1D2D3).addRange(0x1D2E0, 0x1D2F3).addRange(0x1D300, 0x1D356).addRange(0x1D360, 0x1D378).addRange(0x1D400, 0x1D454).addRange(0x1D456, 0x1D49C).addRange(0x1D49E, 0x1D49F).addRange(0x1D4A5, 0x1D4A6).addRange(0x1D4A9, 0x1D4AC).addRange(0x1D4AE, 0x1D4B9).addRange(0x1D4BD, 0x1D4C3).addRange(0x1D4C5, 0x1D505).addRange(0x1D507, 0x1D50A).addRange(0x1D50D, 0x1D514).addRange(0x1D516, 0x1D51C).addRange(0x1D51E, 0x1D539).addRange(0x1D53B, 0x1D53E).addRange(0x1D540, 0x1D544).addRange(0x1D54A, 0x1D550).addRange(0x1D552, 0x1D6A5).addRange(0x1D6A8, 0x1D7CB).addRange(0x1D7CE, 0x1D7FF).addRange(0x1EC71, 0x1ECB4).addRange(0x1ED01, 0x1ED3D);\nset.addRange(0x1F000, 0x1F02B).addRange(0x1F030, 0x1F093).addRange(0x1F0A0, 0x1F0AE).addRange(0x1F0B1, 0x1F0BF).addRange(0x1F0C1, 0x1F0CF).addRange(0x1F0D1, 0x1F0F5).addRange(0x1F100, 0x1F1AD).addRange(0x1F1E6, 0x1F1FF).addRange(0x1F201, 0x1F202).addRange(0x1F210, 0x1F23B).addRange(0x1F240, 0x1F248).addRange(0x1F250, 0x1F251).addRange(0x1F260, 0x1F265).addRange(0x1F300, 0x1F6D7).addRange(0x1F6DC, 0x1F6EC).addRange(0x1F6F0, 0x1F6FC).addRange(0x1F700, 0x1F776).addRange(0x1F77B, 0x1F7D9).addRange(0x1F7E0, 0x1F7EB).addRange(0x1F800, 0x1F80B).addRange(0x1F810, 0x1F847).addRange(0x1F850, 0x1F859).addRange(0x1F860, 0x1F887).addRange(0x1F890, 0x1F8AD).addRange(0x1F8B0, 0x1F8B1).addRange(0x1F900, 0x1FA53).addRange(0x1FA60, 0x1FA6D).addRange(0x1FA70, 0x1FA7C).addRange(0x1FA80, 0x1FA88).addRange(0x1FA90, 0x1FABD).addRange(0x1FABF, 0x1FAC5).addRange(0x1FACE, 0x1FADB).addRange(0x1FAE0, 0x1FAE8).addRange(0x1FAF0, 0x1FAF8).addRange(0x1FB00, 0x1FB92).addRange(0x1FB94, 0x1FBCA).addRange(0x1FBF0, 0x1FBF9).addRange(0xE0020, 0xE007F);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x3E2, 0x3EF).addRange(0x2C80, 0x2CF3).addRange(0x2CF9, 0x2CFF);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x12000, 0x12399).addRange(0x12400, 0x1246E).addRange(0x12470, 0x12474).addRange(0x12480, 0x12543);\nexports.characters = set;\n","const set = require('regenerate')(0x10808, 0x1083C, 0x1083F);\nset.addRange(0x10800, 0x10805).addRange(0x1080A, 0x10835).addRange(0x10837, 0x10838);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x12F90, 0x12FF2);\nexports.characters = set;\n","const set = require('regenerate')(0x1D2B, 0x1D78, 0x1E08F);\nset.addRange(0x400, 0x484).addRange(0x487, 0x52F).addRange(0x1C80, 0x1C88).addRange(0x2DE0, 0x2DFF).addRange(0xA640, 0xA69F).addRange(0xFE2E, 0xFE2F).addRange(0x1E030, 0x1E06D);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x10400, 0x1044F);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x900, 0x950).addRange(0x955, 0x963).addRange(0x966, 0x97F).addRange(0xA8E0, 0xA8FF).addRange(0x11B00, 0x11B09);\nexports.characters = set;\n","const set = require('regenerate')(0x11909);\nset.addRange(0x11900, 0x11906).addRange(0x1190C, 0x11913).addRange(0x11915, 0x11916).addRange(0x11918, 0x11935).addRange(0x11937, 0x11938).addRange(0x1193B, 0x11946).addRange(0x11950, 0x11959);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x11800, 0x1183B);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x1BC00, 0x1BC6A).addRange(0x1BC70, 0x1BC7C).addRange(0x1BC80, 0x1BC88).addRange(0x1BC90, 0x1BC99).addRange(0x1BC9C, 0x1BC9F);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x13000, 0x13455);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x10500, 0x10527);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x10FE0, 0x10FF6);\nexports.characters = set;\n","const set = require('regenerate')(0x1258, 0x12C0);\nset.addRange(0x1200, 0x1248).addRange(0x124A, 0x124D).addRange(0x1250, 0x1256).addRange(0x125A, 0x125D).addRange(0x1260, 0x1288).addRange(0x128A, 0x128D).addRange(0x1290, 0x12B0).addRange(0x12B2, 0x12B5).addRange(0x12B8, 0x12BE).addRange(0x12C2, 0x12C5).addRange(0x12C8, 0x12D6).addRange(0x12D8, 0x1310).addRange(0x1312, 0x1315).addRange(0x1318, 0x135A).addRange(0x135D, 0x137C).addRange(0x1380, 0x1399).addRange(0x2D80, 0x2D96).addRange(0x2DA0, 0x2DA6).addRange(0x2DA8, 0x2DAE).addRange(0x2DB0, 0x2DB6).addRange(0x2DB8, 0x2DBE).addRange(0x2DC0, 0x2DC6).addRange(0x2DC8, 0x2DCE).addRange(0x2DD0, 0x2DD6).addRange(0x2DD8, 0x2DDE).addRange(0xAB01, 0xAB06).addRange(0xAB09, 0xAB0E).addRange(0xAB11, 0xAB16).addRange(0xAB20, 0xAB26).addRange(0xAB28, 0xAB2E).addRange(0x1E7E0, 0x1E7E6).addRange(0x1E7E8, 0x1E7EB).addRange(0x1E7ED, 0x1E7EE).addRange(0x1E7F0, 0x1E7FE);\nexports.characters = set;\n","const set = require('regenerate')(0x10C7, 0x10CD, 0x2D27, 0x2D2D);\nset.addRange(0x10A0, 0x10C5).addRange(0x10D0, 0x10FA).addRange(0x10FC, 0x10FF).addRange(0x1C90, 0x1CBA).addRange(0x1CBD, 0x1CBF).addRange(0x2D00, 0x2D25);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x2C00, 0x2C5F).addRange(0x1E000, 0x1E006).addRange(0x1E008, 0x1E018).addRange(0x1E01B, 0x1E021).addRange(0x1E023, 0x1E024).addRange(0x1E026, 0x1E02A);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x10330, 0x1034A);\nexports.characters = set;\n","const set = require('regenerate')(0x11350, 0x11357);\nset.addRange(0x11300, 0x11303).addRange(0x11305, 0x1130C).addRange(0x1130F, 0x11310).addRange(0x11313, 0x11328).addRange(0x1132A, 0x11330).addRange(0x11332, 0x11333).addRange(0x11335, 0x11339).addRange(0x1133C, 0x11344).addRange(0x11347, 0x11348).addRange(0x1134B, 0x1134D).addRange(0x1135D, 0x11363).addRange(0x11366, 0x1136C).addRange(0x11370, 0x11374);\nexports.characters = set;\n","const set = require('regenerate')(0x37F, 0x384, 0x386, 0x38C, 0x1DBF, 0x1F59, 0x1F5B, 0x1F5D, 0x2126, 0xAB65, 0x101A0);\nset.addRange(0x370, 0x373).addRange(0x375, 0x377).addRange(0x37A, 0x37D).addRange(0x388, 0x38A).addRange(0x38E, 0x3A1).addRange(0x3A3, 0x3E1).addRange(0x3F0, 0x3FF).addRange(0x1D26, 0x1D2A).addRange(0x1D5D, 0x1D61).addRange(0x1D66, 0x1D6A).addRange(0x1F00, 0x1F15).addRange(0x1F18, 0x1F1D).addRange(0x1F20, 0x1F45).addRange(0x1F48, 0x1F4D).addRange(0x1F50, 0x1F57).addRange(0x1F5F, 0x1F7D).addRange(0x1F80, 0x1FB4).addRange(0x1FB6, 0x1FC4).addRange(0x1FC6, 0x1FD3).addRange(0x1FD6, 0x1FDB).addRange(0x1FDD, 0x1FEF).addRange(0x1FF2, 0x1FF4).addRange(0x1FF6, 0x1FFE).addRange(0x10140, 0x1018E).addRange(0x1D200, 0x1D245);\nexports.characters = set;\n","const set = require('regenerate')(0xAD0);\nset.addRange(0xA81, 0xA83).addRange(0xA85, 0xA8D).addRange(0xA8F, 0xA91).addRange(0xA93, 0xAA8).addRange(0xAAA, 0xAB0).addRange(0xAB2, 0xAB3).addRange(0xAB5, 0xAB9).addRange(0xABC, 0xAC5).addRange(0xAC7, 0xAC9).addRange(0xACB, 0xACD).addRange(0xAE0, 0xAE3).addRange(0xAE6, 0xAF1).addRange(0xAF9, 0xAFF);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x11D60, 0x11D65).addRange(0x11D67, 0x11D68).addRange(0x11D6A, 0x11D8E).addRange(0x11D90, 0x11D91).addRange(0x11D93, 0x11D98).addRange(0x11DA0, 0x11DA9);\nexports.characters = set;\n","const set = require('regenerate')(0xA3C, 0xA51, 0xA5E);\nset.addRange(0xA01, 0xA03).addRange(0xA05, 0xA0A).addRange(0xA0F, 0xA10).addRange(0xA13, 0xA28).addRange(0xA2A, 0xA30).addRange(0xA32, 0xA33).addRange(0xA35, 0xA36).addRange(0xA38, 0xA39).addRange(0xA3E, 0xA42).addRange(0xA47, 0xA48).addRange(0xA4B, 0xA4D).addRange(0xA59, 0xA5C).addRange(0xA66, 0xA76);\nexports.characters = set;\n","const set = require('regenerate')(0x3005, 0x3007);\nset.addRange(0x2E80, 0x2E99).addRange(0x2E9B, 0x2EF3).addRange(0x2F00, 0x2FD5).addRange(0x3021, 0x3029).addRange(0x3038, 0x303B).addRange(0x3400, 0x4DBF).addRange(0x4E00, 0x9FFF).addRange(0xF900, 0xFA6D).addRange(0xFA70, 0xFAD9).addRange(0x16FE2, 0x16FE3).addRange(0x16FF0, 0x16FF1).addRange(0x20000, 0x2A6DF).addRange(0x2A700, 0x2B739).addRange(0x2B740, 0x2B81D).addRange(0x2B820, 0x2CEA1).addRange(0x2CEB0, 0x2EBE0).addRange(0x2EBF0, 0x2EE5D).addRange(0x2F800, 0x2FA1D).addRange(0x30000, 0x3134A).addRange(0x31350, 0x323AF);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x1100, 0x11FF).addRange(0x302E, 0x302F).addRange(0x3131, 0x318E).addRange(0x3200, 0x321E).addRange(0x3260, 0x327E).addRange(0xA960, 0xA97C).addRange(0xAC00, 0xD7A3).addRange(0xD7B0, 0xD7C6).addRange(0xD7CB, 0xD7FB).addRange(0xFFA0, 0xFFBE).addRange(0xFFC2, 0xFFC7).addRange(0xFFCA, 0xFFCF).addRange(0xFFD2, 0xFFD7).addRange(0xFFDA, 0xFFDC);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x10D00, 0x10D27).addRange(0x10D30, 0x10D39);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x1720, 0x1734);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x108E0, 0x108F2).addRange(0x108F4, 0x108F5).addRange(0x108FB, 0x108FF);\nexports.characters = set;\n","const set = require('regenerate')(0xFB3E);\nset.addRange(0x591, 0x5C7).addRange(0x5D0, 0x5EA).addRange(0x5EF, 0x5F4).addRange(0xFB1D, 0xFB36).addRange(0xFB38, 0xFB3C).addRange(0xFB40, 0xFB41).addRange(0xFB43, 0xFB44).addRange(0xFB46, 0xFB4F);\nexports.characters = set;\n","const set = require('regenerate')(0x1B132, 0x1F200);\nset.addRange(0x3041, 0x3096).addRange(0x309D, 0x309F).addRange(0x1B001, 0x1B11F).addRange(0x1B150, 0x1B152);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x10840, 0x10855).addRange(0x10857, 0x1085F);\nexports.characters = set;\n","const set = require('regenerate')(0x670, 0x1CED, 0x1CF4, 0x101FD, 0x102E0, 0x1133B);\nset.addRange(0x300, 0x36F).addRange(0x485, 0x486).addRange(0x64B, 0x655).addRange(0x951, 0x954).addRange(0x1AB0, 0x1ACE).addRange(0x1CD0, 0x1CD2).addRange(0x1CD4, 0x1CE0).addRange(0x1CE2, 0x1CE8).addRange(0x1CF8, 0x1CF9).addRange(0x1DC0, 0x1DFF).addRange(0x200C, 0x200D).addRange(0x20D0, 0x20F0).addRange(0x302A, 0x302D).addRange(0x3099, 0x309A).addRange(0xFE00, 0xFE0F).addRange(0xFE20, 0xFE2D).addRange(0x1CF00, 0x1CF2D).addRange(0x1CF30, 0x1CF46).addRange(0x1D167, 0x1D169).addRange(0x1D17B, 0x1D182).addRange(0x1D185, 0x1D18B).addRange(0x1D1AA, 0x1D1AD).addRange(0xE0100, 0xE01EF);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x10B60, 0x10B72).addRange(0x10B78, 0x10B7F);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x10B40, 0x10B55).addRange(0x10B58, 0x10B5F);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0xA980, 0xA9CD).addRange(0xA9D0, 0xA9D9).addRange(0xA9DE, 0xA9DF);\nexports.characters = set;\n","const set = require('regenerate')(0x110CD);\nset.addRange(0x11080, 0x110C2);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0xC80, 0xC8C).addRange(0xC8E, 0xC90).addRange(0xC92, 0xCA8).addRange(0xCAA, 0xCB3).addRange(0xCB5, 0xCB9).addRange(0xCBC, 0xCC4).addRange(0xCC6, 0xCC8).addRange(0xCCA, 0xCCD).addRange(0xCD5, 0xCD6).addRange(0xCDD, 0xCDE).addRange(0xCE0, 0xCE3).addRange(0xCE6, 0xCEF).addRange(0xCF1, 0xCF3);\nexports.characters = set;\n","const set = require('regenerate')(0x1B000, 0x1B155);\nset.addRange(0x30A1, 0x30FA).addRange(0x30FD, 0x30FF).addRange(0x31F0, 0x31FF).addRange(0x32D0, 0x32FE).addRange(0x3300, 0x3357).addRange(0xFF66, 0xFF6F).addRange(0xFF71, 0xFF9D).addRange(0x1AFF0, 0x1AFF3).addRange(0x1AFF5, 0x1AFFB).addRange(0x1AFFD, 0x1AFFE).addRange(0x1B120, 0x1B122).addRange(0x1B164, 0x1B167);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x11F00, 0x11F10).addRange(0x11F12, 0x11F3A).addRange(0x11F3E, 0x11F59);\nexports.characters = set;\n","const set = require('regenerate')(0xA92F);\nset.addRange(0xA900, 0xA92D);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x10A00, 0x10A03).addRange(0x10A05, 0x10A06).addRange(0x10A0C, 0x10A13).addRange(0x10A15, 0x10A17).addRange(0x10A19, 0x10A35).addRange(0x10A38, 0x10A3A).addRange(0x10A3F, 0x10A48).addRange(0x10A50, 0x10A58);\nexports.characters = set;\n","const set = require('regenerate')(0x16FE4);\nset.addRange(0x18B00, 0x18CD5);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x1780, 0x17DD).addRange(0x17E0, 0x17E9).addRange(0x17F0, 0x17F9).addRange(0x19E0, 0x19FF);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x11200, 0x11211).addRange(0x11213, 0x11241);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x112B0, 0x112EA).addRange(0x112F0, 0x112F9);\nexports.characters = set;\n","const set = require('regenerate')(0xE84, 0xEA5, 0xEC6);\nset.addRange(0xE81, 0xE82).addRange(0xE86, 0xE8A).addRange(0xE8C, 0xEA3).addRange(0xEA7, 0xEBD).addRange(0xEC0, 0xEC4).addRange(0xEC8, 0xECE).addRange(0xED0, 0xED9).addRange(0xEDC, 0xEDF);\nexports.characters = set;\n","const set = require('regenerate')(0xAA, 0xBA, 0x2071, 0x207F, 0x2132, 0x214E, 0xA7D3);\nset.addRange(0x41, 0x5A).addRange(0x61, 0x7A).addRange(0xC0, 0xD6).addRange(0xD8, 0xF6).addRange(0xF8, 0x2B8).addRange(0x2E0, 0x2E4).addRange(0x1D00, 0x1D25).addRange(0x1D2C, 0x1D5C).addRange(0x1D62, 0x1D65).addRange(0x1D6B, 0x1D77).addRange(0x1D79, 0x1DBE).addRange(0x1E00, 0x1EFF).addRange(0x2090, 0x209C).addRange(0x212A, 0x212B).addRange(0x2160, 0x2188).addRange(0x2C60, 0x2C7F).addRange(0xA722, 0xA787).addRange(0xA78B, 0xA7CA).addRange(0xA7D0, 0xA7D1).addRange(0xA7D5, 0xA7D9).addRange(0xA7F2, 0xA7FF).addRange(0xAB30, 0xAB5A).addRange(0xAB5C, 0xAB64).addRange(0xAB66, 0xAB69).addRange(0xFB00, 0xFB06).addRange(0xFF21, 0xFF3A).addRange(0xFF41, 0xFF5A).addRange(0x10780, 0x10785).addRange(0x10787, 0x107B0).addRange(0x107B2, 0x107BA).addRange(0x1DF00, 0x1DF1E).addRange(0x1DF25, 0x1DF2A);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x1C00, 0x1C37).addRange(0x1C3B, 0x1C49).addRange(0x1C4D, 0x1C4F);\nexports.characters = set;\n","const set = require('regenerate')(0x1940);\nset.addRange(0x1900, 0x191E).addRange(0x1920, 0x192B).addRange(0x1930, 0x193B).addRange(0x1944, 0x194F);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x10600, 0x10736).addRange(0x10740, 0x10755).addRange(0x10760, 0x10767);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x10000, 0x1000B).addRange(0x1000D, 0x10026).addRange(0x10028, 0x1003A).addRange(0x1003C, 0x1003D).addRange(0x1003F, 0x1004D).addRange(0x10050, 0x1005D).addRange(0x10080, 0x100FA);\nexports.characters = set;\n","const set = require('regenerate')(0x11FB0);\nset.addRange(0xA4D0, 0xA4FF);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x10280, 0x1029C);\nexports.characters = set;\n","const set = require('regenerate')(0x1093F);\nset.addRange(0x10920, 0x10939);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x11150, 0x11176);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x11EE0, 0x11EF8);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0xD00, 0xD0C).addRange(0xD0E, 0xD10).addRange(0xD12, 0xD44).addRange(0xD46, 0xD48).addRange(0xD4A, 0xD4F).addRange(0xD54, 0xD63).addRange(0xD66, 0xD7F);\nexports.characters = set;\n","const set = require('regenerate')(0x85E);\nset.addRange(0x840, 0x85B);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x10AC0, 0x10AE6).addRange(0x10AEB, 0x10AF6);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x11C70, 0x11C8F).addRange(0x11C92, 0x11CA7).addRange(0x11CA9, 0x11CB6);\nexports.characters = set;\n","const set = require('regenerate')(0x11D3A);\nset.addRange(0x11D00, 0x11D06).addRange(0x11D08, 0x11D09).addRange(0x11D0B, 0x11D36).addRange(0x11D3C, 0x11D3D).addRange(0x11D3F, 0x11D47).addRange(0x11D50, 0x11D59);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x16E40, 0x16E9A);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0xAAE0, 0xAAF6).addRange(0xABC0, 0xABED).addRange(0xABF0, 0xABF9);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x1E800, 0x1E8C4).addRange(0x1E8C7, 0x1E8D6);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x109A0, 0x109B7).addRange(0x109BC, 0x109CF).addRange(0x109D2, 0x109FF);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x10980, 0x1099F);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x16F00, 0x16F4A).addRange(0x16F4F, 0x16F87).addRange(0x16F8F, 0x16F9F);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x11600, 0x11644).addRange(0x11650, 0x11659);\nexports.characters = set;\n","const set = require('regenerate')(0x1804);\nset.addRange(0x1800, 0x1801).addRange(0x1806, 0x1819).addRange(0x1820, 0x1878).addRange(0x1880, 0x18AA).addRange(0x11660, 0x1166C);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x16A40, 0x16A5E).addRange(0x16A60, 0x16A69).addRange(0x16A6E, 0x16A6F);\nexports.characters = set;\n","const set = require('regenerate')(0x11288);\nset.addRange(0x11280, 0x11286).addRange(0x1128A, 0x1128D).addRange(0x1128F, 0x1129D).addRange(0x1129F, 0x112A9);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x1000, 0x109F).addRange(0xA9E0, 0xA9FE).addRange(0xAA60, 0xAA7F);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x10880, 0x1089E).addRange(0x108A7, 0x108AF);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x1E4D0, 0x1E4F9);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x119A0, 0x119A7).addRange(0x119AA, 0x119D7).addRange(0x119DA, 0x119E4);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x1980, 0x19AB).addRange(0x19B0, 0x19C9).addRange(0x19D0, 0x19DA).addRange(0x19DE, 0x19DF);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x11400, 0x1145B).addRange(0x1145D, 0x11461);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x7C0, 0x7FA).addRange(0x7FD, 0x7FF);\nexports.characters = set;\n","const set = require('regenerate')(0x16FE1);\nset.addRange(0x1B170, 0x1B2FB);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x1E100, 0x1E12C).addRange(0x1E130, 0x1E13D).addRange(0x1E140, 0x1E149).addRange(0x1E14E, 0x1E14F);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x1680, 0x169C);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x1C50, 0x1C7F);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x10C80, 0x10CB2).addRange(0x10CC0, 0x10CF2).addRange(0x10CFA, 0x10CFF);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x10300, 0x10323).addRange(0x1032D, 0x1032F);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x10A80, 0x10A9F);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x10350, 0x1037A);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x103A0, 0x103C3).addRange(0x103C8, 0x103D5);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x10F00, 0x10F27);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x10A60, 0x10A7F);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x10C00, 0x10C48);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x10F70, 0x10F89);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0xB01, 0xB03).addRange(0xB05, 0xB0C).addRange(0xB0F, 0xB10).addRange(0xB13, 0xB28).addRange(0xB2A, 0xB30).addRange(0xB32, 0xB33).addRange(0xB35, 0xB39).addRange(0xB3C, 0xB44).addRange(0xB47, 0xB48).addRange(0xB4B, 0xB4D).addRange(0xB55, 0xB57).addRange(0xB5C, 0xB5D).addRange(0xB5F, 0xB63).addRange(0xB66, 0xB77);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x104B0, 0x104D3).addRange(0x104D8, 0x104FB);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x10480, 0x1049D).addRange(0x104A0, 0x104A9);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x16B00, 0x16B45).addRange(0x16B50, 0x16B59).addRange(0x16B5B, 0x16B61).addRange(0x16B63, 0x16B77).addRange(0x16B7D, 0x16B8F);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x10860, 0x1087F);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x11AC0, 0x11AF8);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0xA840, 0xA877);\nexports.characters = set;\n","const set = require('regenerate')(0x1091F);\nset.addRange(0x10900, 0x1091B);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x10B80, 0x10B91).addRange(0x10B99, 0x10B9C).addRange(0x10BA9, 0x10BAF);\nexports.characters = set;\n","const set = require('regenerate')(0xA95F);\nset.addRange(0xA930, 0xA953);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x16A0, 0x16EA).addRange(0x16EE, 0x16F8);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x800, 0x82D).addRange(0x830, 0x83E);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0xA880, 0xA8C5).addRange(0xA8CE, 0xA8D9);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x11180, 0x111DF);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x10450, 0x1047F);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x11580, 0x115B5).addRange(0x115B8, 0x115DD);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x1D800, 0x1DA8B).addRange(0x1DA9B, 0x1DA9F).addRange(0x1DAA1, 0x1DAAF);\nexports.characters = set;\n","const set = require('regenerate')(0xDBD, 0xDCA, 0xDD6);\nset.addRange(0xD81, 0xD83).addRange(0xD85, 0xD96).addRange(0xD9A, 0xDB1).addRange(0xDB3, 0xDBB).addRange(0xDC0, 0xDC6).addRange(0xDCF, 0xDD4).addRange(0xDD8, 0xDDF).addRange(0xDE6, 0xDEF).addRange(0xDF2, 0xDF4).addRange(0x111E1, 0x111F4);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x10F30, 0x10F59);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x110D0, 0x110E8).addRange(0x110F0, 0x110F9);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x11A50, 0x11AA2);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x1B80, 0x1BBF).addRange(0x1CC0, 0x1CC7);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0xA800, 0xA82C);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x700, 0x70D).addRange(0x70F, 0x74A).addRange(0x74D, 0x74F).addRange(0x860, 0x86A);\nexports.characters = set;\n","const set = require('regenerate')(0x171F);\nset.addRange(0x1700, 0x1715);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x1760, 0x176C).addRange(0x176E, 0x1770).addRange(0x1772, 0x1773);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x1950, 0x196D).addRange(0x1970, 0x1974);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x1A20, 0x1A5E).addRange(0x1A60, 0x1A7C).addRange(0x1A7F, 0x1A89).addRange(0x1A90, 0x1A99).addRange(0x1AA0, 0x1AAD);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0xAA80, 0xAAC2).addRange(0xAADB, 0xAADF);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x11680, 0x116B9).addRange(0x116C0, 0x116C9);\nexports.characters = set;\n","const set = require('regenerate')(0xB9C, 0xBD0, 0xBD7, 0x11FFF);\nset.addRange(0xB82, 0xB83).addRange(0xB85, 0xB8A).addRange(0xB8E, 0xB90).addRange(0xB92, 0xB95).addRange(0xB99, 0xB9A).addRange(0xB9E, 0xB9F).addRange(0xBA3, 0xBA4).addRange(0xBA8, 0xBAA).addRange(0xBAE, 0xBB9).addRange(0xBBE, 0xBC2).addRange(0xBC6, 0xBC8).addRange(0xBCA, 0xBCD).addRange(0xBE6, 0xBFA).addRange(0x11FC0, 0x11FF1);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x16A70, 0x16ABE).addRange(0x16AC0, 0x16AC9);\nexports.characters = set;\n","const set = require('regenerate')(0x16FE0);\nset.addRange(0x17000, 0x187F7).addRange(0x18800, 0x18AFF).addRange(0x18D00, 0x18D08);\nexports.characters = set;\n","const set = require('regenerate')(0xC5D);\nset.addRange(0xC00, 0xC0C).addRange(0xC0E, 0xC10).addRange(0xC12, 0xC28).addRange(0xC2A, 0xC39).addRange(0xC3C, 0xC44).addRange(0xC46, 0xC48).addRange(0xC4A, 0xC4D).addRange(0xC55, 0xC56).addRange(0xC58, 0xC5A).addRange(0xC60, 0xC63).addRange(0xC66, 0xC6F).addRange(0xC77, 0xC7F);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x780, 0x7B1);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0xE01, 0xE3A).addRange(0xE40, 0xE5B);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0xF00, 0xF47).addRange(0xF49, 0xF6C).addRange(0xF71, 0xF97).addRange(0xF99, 0xFBC).addRange(0xFBE, 0xFCC).addRange(0xFCE, 0xFD4).addRange(0xFD9, 0xFDA);\nexports.characters = set;\n","const set = require('regenerate')(0x2D7F);\nset.addRange(0x2D30, 0x2D67).addRange(0x2D6F, 0x2D70);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x11480, 0x114C7).addRange(0x114D0, 0x114D9);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x1E290, 0x1E2AE);\nexports.characters = set;\n","const set = require('regenerate')(0x1039F);\nset.addRange(0x10380, 0x1039D);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0xA500, 0xA62B);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x10570, 0x1057A).addRange(0x1057C, 0x1058A).addRange(0x1058C, 0x10592).addRange(0x10594, 0x10595).addRange(0x10597, 0x105A1).addRange(0x105A3, 0x105B1).addRange(0x105B3, 0x105B9).addRange(0x105BB, 0x105BC);\nexports.characters = set;\n","const set = require('regenerate')(0x1E2FF);\nset.addRange(0x1E2C0, 0x1E2F9);\nexports.characters = set;\n","const set = require('regenerate')(0x118FF);\nset.addRange(0x118A0, 0x118F2);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x10E80, 0x10EA9).addRange(0x10EAB, 0x10EAD).addRange(0x10EB0, 0x10EB1);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0xA000, 0xA48C).addRange(0xA490, 0xA4C6);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x11A00, 0x11A47);\nexports.characters = set;\n","module.exports = '15.1.0';\n","/*!\n * regjsgen 0.5.2\n * Copyright 2014-2020 Benjamin Tan \n * Available under the MIT license \n */\n;(function() {\n 'use strict';\n\n // Used to determine if values are of the language type `Object`.\n var objectTypes = {\n 'function': true,\n 'object': true\n };\n\n // Used as a reference to the global object.\n var root = (objectTypes[typeof window] && window) || this;\n\n // Detect free variable `exports`.\n var freeExports = objectTypes[typeof exports] && exports && !exports.nodeType && exports;\n\n // Detect free variable `module`.\n var hasFreeModule = objectTypes[typeof module] && module && !module.nodeType;\n\n // Detect free variable `global` from Node.js or Browserified code and use it as `root`.\n var freeGlobal = freeExports && hasFreeModule && typeof global == 'object' && global;\n if (freeGlobal && (freeGlobal.global === freeGlobal || freeGlobal.window === freeGlobal || freeGlobal.self === freeGlobal)) {\n root = freeGlobal;\n }\n\n // Used to check objects for own properties.\n var hasOwnProperty = Object.prototype.hasOwnProperty;\n\n /*--------------------------------------------------------------------------*/\n\n // Generates a string based on the given code point.\n // Based on https://mths.be/fromcodepoint by @mathias.\n function fromCodePoint() {\n var codePoint = Number(arguments[0]);\n\n if (\n !isFinite(codePoint) || // `NaN`, `+Infinity`, or `-Infinity`\n codePoint < 0 || // not a valid Unicode code point\n codePoint > 0x10FFFF || // not a valid Unicode code point\n Math.floor(codePoint) != codePoint // not an integer\n ) {\n throw RangeError('Invalid code point: ' + codePoint);\n }\n\n if (codePoint <= 0xFFFF) {\n // BMP code point\n return String.fromCharCode(codePoint);\n } else {\n // Astral code point; split in surrogate halves\n // http://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae\n codePoint -= 0x10000;\n var highSurrogate = (codePoint >> 10) + 0xD800;\n var lowSurrogate = (codePoint % 0x400) + 0xDC00;\n return String.fromCharCode(highSurrogate, lowSurrogate);\n }\n }\n\n /*--------------------------------------------------------------------------*/\n\n // Ensures that nodes have the correct types.\n var assertTypeRegexMap = {};\n function assertType(type, expected) {\n if (expected.indexOf('|') == -1) {\n if (type == expected) {\n return;\n }\n\n throw Error('Invalid node type: ' + type + '; expected type: ' + expected);\n }\n\n expected = hasOwnProperty.call(assertTypeRegexMap, expected)\n ? assertTypeRegexMap[expected]\n : (assertTypeRegexMap[expected] = RegExp('^(?:' + expected + ')$'));\n\n if (expected.test(type)) {\n return;\n }\n\n throw Error('Invalid node type: ' + type + '; expected types: ' + expected);\n }\n\n /*--------------------------------------------------------------------------*/\n\n // Generates a regular expression string based on an AST.\n function generate(node) {\n var type = node.type;\n\n if (hasOwnProperty.call(generators, type)) {\n return generators[type](node);\n }\n\n throw Error('Invalid node type: ' + type);\n }\n\n // Constructs a string by concatentating the output of each term.\n function generateSequence(generator, terms, /* optional */ separator) {\n var i = -1,\n length = terms.length,\n result = '',\n term;\n\n while (++i < length) {\n term = terms[i];\n\n if (separator && i > 0) result += separator;\n\n // Ensure that `\\0` null escapes followed by number symbols are not\n // treated as backreferences.\n if (\n i + 1 < length &&\n terms[i].type == 'value' &&\n terms[i].kind == 'null' &&\n terms[i + 1].type == 'value' &&\n terms[i + 1].kind == 'symbol' &&\n terms[i + 1].codePoint >= 48 &&\n terms[i + 1].codePoint <= 57\n ) {\n result += '\\\\000';\n continue;\n }\n\n result += generator(term);\n }\n\n return result;\n }\n\n /*--------------------------------------------------------------------------*/\n\n function generateAlternative(node) {\n assertType(node.type, 'alternative');\n\n return generateSequence(generateTerm, node.body);\n }\n\n function generateAnchor(node) {\n assertType(node.type, 'anchor');\n\n switch (node.kind) {\n case 'start':\n return '^';\n case 'end':\n return '$';\n case 'boundary':\n return '\\\\b';\n case 'not-boundary':\n return '\\\\B';\n default:\n throw Error('Invalid assertion');\n }\n }\n\n var atomType = 'anchor|characterClass|characterClassEscape|dot|group|reference|unicodePropertyEscape|value';\n\n function generateAtom(node) {\n assertType(node.type, atomType);\n\n return generate(node);\n }\n\n function generateCharacterClass(node) {\n assertType(node.type, 'characterClass');\n\n var kind = node.kind;\n var separator = kind === 'intersection' ? '&&' : kind === 'subtraction' ? '--' : '';\n\n return '[' +\n (node.negative ? '^' : '') +\n generateSequence(generateClassAtom, node.body, separator) +\n ']';\n }\n\n function generateCharacterClassEscape(node) {\n assertType(node.type, 'characterClassEscape');\n\n return '\\\\' + node.value;\n }\n\n function generateCharacterClassRange(node) {\n assertType(node.type, 'characterClassRange');\n\n var min = node.min,\n max = node.max;\n\n if (min.type == 'characterClassRange' || max.type == 'characterClassRange') {\n throw Error('Invalid character class range');\n }\n\n return generateClassAtom(min) + '-' + generateClassAtom(max);\n }\n\n function generateClassAtom(node) {\n assertType(node.type, 'anchor|characterClass|characterClassEscape|characterClassRange|dot|value|unicodePropertyEscape|classStrings');\n\n return generate(node);\n }\n\n function generateClassStrings(node) {\n assertType(node.type, 'classStrings');\n\n return '\\\\q{' + generateSequence(generateClassString, node.strings, '|') + '}';\n }\n\n function generateClassString(node) {\n assertType(node.type, 'classString');\n\n return generateSequence(generate, node.characters);\n }\n\n function generateDisjunction(node) {\n assertType(node.type, 'disjunction');\n\n return generateSequence(generate, node.body, '|');\n }\n\n\n function generateDot(node) {\n assertType(node.type, 'dot');\n\n return '.';\n }\n\n function generateGroup(node) {\n assertType(node.type, 'group');\n\n var result = '';\n\n switch (node.behavior) {\n case 'normal':\n if (node.name) {\n result += '?<' + generateIdentifier(node.name) + '>';\n }\n break;\n case 'ignore':\n if (node.modifierFlags) {\n result += '?';\n if(node.modifierFlags.enabling) result += node.modifierFlags.enabling;\n if(node.modifierFlags.disabling) result += \"-\" + node.modifierFlags.disabling;\n result += ':';\n } else {\n result += '?:';\n }\n break;\n case 'lookahead':\n result += '?=';\n break;\n case 'negativeLookahead':\n result += '?!';\n break;\n case 'lookbehind':\n result += '?<=';\n break;\n case 'negativeLookbehind':\n result += '?';\n }\n\n throw new Error('Unknown reference type');\n }\n\n function generateTerm(node) {\n assertType(node.type, atomType + '|empty|quantifier');\n\n return generate(node);\n }\n\n function generateUnicodePropertyEscape(node) {\n assertType(node.type, 'unicodePropertyEscape');\n\n return '\\\\' + (node.negative ? 'P' : 'p') + '{' + node.value + '}';\n }\n\n function generateValue(node) {\n assertType(node.type, 'value');\n\n var kind = node.kind,\n codePoint = node.codePoint;\n\n if (typeof codePoint != 'number') {\n throw new Error('Invalid code point: ' + codePoint);\n }\n\n switch (kind) {\n case 'controlLetter':\n return '\\\\c' + fromCodePoint(codePoint + 64);\n case 'hexadecimalEscape':\n return '\\\\x' + ('00' + codePoint.toString(16).toUpperCase()).slice(-2);\n case 'identifier':\n return '\\\\' + fromCodePoint(codePoint);\n case 'null':\n return '\\\\' + codePoint;\n case 'octal':\n return '\\\\' + ('000' + codePoint.toString(8)).slice(-3);\n case 'singleEscape':\n switch (codePoint) {\n case 0x0008:\n return '\\\\b';\n case 0x0009:\n return '\\\\t';\n case 0x000A:\n return '\\\\n';\n case 0x000B:\n return '\\\\v';\n case 0x000C:\n return '\\\\f';\n case 0x000D:\n return '\\\\r';\n case 0x002D:\n return '\\\\-';\n default:\n throw Error('Invalid code point: ' + codePoint);\n }\n case 'symbol':\n return fromCodePoint(codePoint);\n case 'unicodeEscape':\n return '\\\\u' + ('0000' + codePoint.toString(16).toUpperCase()).slice(-4);\n case 'unicodeCodePointEscape':\n return '\\\\u{' + codePoint.toString(16).toUpperCase() + '}';\n default:\n throw Error('Unsupported node kind: ' + kind);\n }\n }\n\n /*--------------------------------------------------------------------------*/\n\n // Used to generate strings for each node type.\n var generators = {\n 'alternative': generateAlternative,\n 'anchor': generateAnchor,\n 'characterClass': generateCharacterClass,\n 'characterClassEscape': generateCharacterClassEscape,\n 'characterClassRange': generateCharacterClassRange,\n 'classStrings': generateClassStrings,\n 'disjunction': generateDisjunction,\n 'dot': generateDot,\n 'group': generateGroup,\n 'quantifier': generateQuantifier,\n 'reference': generateReference,\n 'unicodePropertyEscape': generateUnicodePropertyEscape,\n 'value': generateValue\n };\n\n /*--------------------------------------------------------------------------*/\n\n // Export regjsgen.\n var regjsgen = {\n 'generate': generate\n };\n\n // Some AMD build optimizers, like r.js, check for condition patterns like the following:\n if (typeof define == 'function' && typeof define.amd == 'object' && define.amd) {\n // Define as an anonymous module so it can be aliased through path mapping.\n define(function() {\n return regjsgen;\n });\n\n root.regjsgen = regjsgen;\n }\n // Check for `exports` after `define` in case a build optimizer adds an `exports` object.\n else if (freeExports && hasFreeModule) {\n // Export for CommonJS support.\n freeExports.generate = generate;\n }\n else {\n // Export to the global object.\n root.regjsgen = regjsgen;\n }\n}.call(this));\n","// regjsparser\n//\n// ==================================================================\n//\n// See ECMA-262 Standard: 15.10.1\n//\n// NOTE: The ECMA-262 standard uses the term \"Assertion\" for /^/. Here the\n// term \"Anchor\" is used.\n//\n// Pattern ::\n// Disjunction\n//\n// Disjunction ::\n// Alternative\n// Alternative | Disjunction\n//\n// Alternative ::\n// [empty]\n// Alternative Term\n//\n// Term ::\n// Anchor\n// Atom\n// Atom Quantifier\n//\n// Anchor ::\n// ^\n// $\n// \\ b\n// \\ B\n// ( ? = Disjunction )\n// ( ? ! Disjunction )\n// ( ? < = Disjunction )\n// ( ? < ! Disjunction )\n//\n// Quantifier ::\n// QuantifierPrefix\n// QuantifierPrefix ?\n//\n// QuantifierPrefix ::\n// *\n// +\n// ?\n// { DecimalDigits }\n// { DecimalDigits , }\n// { DecimalDigits , DecimalDigits }\n//\n// Atom ::\n// PatternCharacter\n// .\n// \\ AtomEscape\n// CharacterClass\n// ( GroupSpecifier Disjunction )\n// ( ? : Disjunction )\n//\n// PatternCharacter ::\n// SourceCharacter but not any of: ^ $ \\ . * + ? ( ) [ ] { } |\n//\n// AtomEscape ::\n// DecimalEscape\n// CharacterClassEscape\n// CharacterEscape\n// k GroupName\n//\n// CharacterEscape[U] ::\n// ControlEscape\n// c ControlLetter\n// HexEscapeSequence\n// RegExpUnicodeEscapeSequence[?U] (ES6)\n// IdentityEscape[?U]\n//\n// ControlEscape ::\n// one of f n r t v\n// ControlLetter ::\n// one of\n// a b c d e f g h i j k l m n o p q r s t u v w x y z\n// A B C D E F G H I J K L M N O P Q R S T U V W X Y Z\n//\n// IdentityEscape ::\n// SourceCharacter but not c\n//\n// DecimalEscape ::\n// DecimalIntegerLiteral [lookahead ∉ DecimalDigit]\n//\n// CharacterClassEscape ::\n// one of d D s S w W\n//\n// CharacterClass ::\n// [ [lookahead ∉ {^}] ClassRanges ]\n// [ ^ ClassRanges ]\n//\n// ClassRanges ::\n// [empty]\n// [~V] NonemptyClassRanges\n// [+V] ClassContents\n//\n// NonemptyClassRanges ::\n// ClassAtom\n// ClassAtom NonemptyClassRangesNoDash\n// ClassAtom - ClassAtom ClassRanges\n//\n// NonemptyClassRangesNoDash ::\n// ClassAtom\n// ClassAtomNoDash NonemptyClassRangesNoDash\n// ClassAtomNoDash - ClassAtom ClassRanges\n//\n// ClassAtom ::\n// -\n// ClassAtomNoDash\n//\n// ClassAtomNoDash ::\n// SourceCharacter but not one of \\ or ] or -\n// \\ ClassEscape\n//\n// ClassEscape ::\n// DecimalEscape\n// b\n// CharacterEscape\n// CharacterClassEscape\n//\n// GroupSpecifier ::\n// [empty]\n// ? GroupName\n//\n// GroupName ::\n// < RegExpIdentifierName >\n//\n// RegExpIdentifierName ::\n// RegExpIdentifierStart\n// RegExpIdentifierName RegExpIdentifierContinue\n//\n// RegExpIdentifierStart ::\n// UnicodeIDStart\n// $\n// _\n// \\ RegExpUnicodeEscapeSequence\n//\n// RegExpIdentifierContinue ::\n// UnicodeIDContinue\n// $\n// _\n// \\ RegExpUnicodeEscapeSequence\n// \n// \n//\n// --------------------------------------------------------------\n// NOTE: The following productions refer to the \"set notation and\n// properties of strings\" proposal.\n// https://github.com/tc39/proposal-regexp-set-notation\n// --------------------------------------------------------------\n//\n// ClassContents ::\n// ClassUnion\n// ClassIntersection\n// ClassSubtraction\n//\n// ClassUnion ::\n// ClassRange ClassUnion?\n// ClassOperand ClassUnion?\n//\n// ClassIntersection ::\n// ClassOperand && [lookahead ≠ &] ClassOperand\n// ClassIntersection && [lookahead ≠ &] ClassOperand\n//\n// ClassSubtraction ::\n// ClassOperand -- ClassOperand\n// ClassSubtraction -- ClassOperand\n//\n// ClassOperand ::\n// ClassCharacter\n// ClassStrings\n// NestedClass\n//\n// NestedClass ::\n// [ [lookahead ≠ ^] ClassRanges[+U,+V] ]\n// [ ^ ClassRanges[+U,+V] ]\n// \\ CharacterClassEscape[+U, +V]\n//\n// ClassRange ::\n// ClassCharacter - ClassCharacter\n//\n// ClassCharacter ::\n// [lookahead ∉ ClassReservedDouble] SourceCharacter but not ClassSyntaxCharacter\n// \\ CharacterEscape[+U]\n// \\ ClassHalfOfDouble\n// \\ b\n//\n// ClassSyntaxCharacter ::\n// one of ( ) [ ] { } / - \\ |\n//\n// ClassStrings ::\n// ( ClassString MoreClassStrings? )\n//\n// MoreClassStrings ::\n// | ClassString MoreClassStrings?\n//\n// ClassString ::\n// [empty]\n// NonEmptyClassString\n//\n// NonEmptyClassString ::\n// ClassCharacter NonEmptyClassString?\n//\n// ClassReservedDouble ::\n// one of && !! ## $$ %% ** ++ ,, .. :: ;; << == >> ?? @@ ^^ __ `` ~~\n//\n// ClassHalfOfDouble ::\n// one of & - ! # % , : ; < = > @ _ ` ~\n//\n// --------------------------------------------------------------\n// NOTE: The following productions refer to the\n// \"Regular Expression Pattern Modifiers for ECMAScript\" proposal.\n// https://github.com/tc39/proposal-regexp-modifiers\n// --------------------------------------------------------------\n//\n// Atom ::\n// ( ? RegularExpressionFlags : Disjunction )\n// ( ? RegularExpressionFlags - RegularExpressionFlags : Disjunction )\n//\n\n\"use strict\";\n(function() {\n\n var fromCodePoint = String.fromCodePoint || (function() {\n // Implementation taken from\n // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/fromCodePoint\n\n var stringFromCharCode = String.fromCharCode;\n var floor = Math.floor;\n\n return function fromCodePoint() {\n var MAX_SIZE = 0x4000;\n var codeUnits = [];\n var highSurrogate;\n var lowSurrogate;\n var index = -1;\n var length = arguments.length;\n if (!length) {\n return '';\n }\n var result = '';\n while (++index < length) {\n var codePoint = Number(arguments[index]);\n if (\n !isFinite(codePoint) || // `NaN`, `+Infinity`, or `-Infinity`\n codePoint < 0 || // not a valid Unicode code point\n codePoint > 0x10FFFF || // not a valid Unicode code point\n floor(codePoint) != codePoint // not an integer\n ) {\n throw RangeError('Invalid code point: ' + codePoint);\n }\n if (codePoint <= 0xFFFF) { // BMP code point\n codeUnits.push(codePoint);\n } else { // Astral code point; split in surrogate halves\n // http://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae\n codePoint -= 0x10000;\n highSurrogate = (codePoint >> 10) + 0xD800;\n lowSurrogate = (codePoint % 0x400) + 0xDC00;\n codeUnits.push(highSurrogate, lowSurrogate);\n }\n if (index + 1 == length || codeUnits.length > MAX_SIZE) {\n result += stringFromCharCode.apply(null, codeUnits);\n codeUnits.length = 0;\n }\n }\n return result;\n };\n }());\n\n function parse(str, flags, features) {\n if (!features) {\n features = {};\n }\n function addRaw(node) {\n node.raw = str.substring(node.range[0], node.range[1]);\n return node;\n }\n\n function updateRawStart(node, start) {\n node.range[0] = start;\n return addRaw(node);\n }\n\n function createAnchor(kind, rawLength) {\n return addRaw({\n type: 'anchor',\n kind: kind,\n range: [\n pos - rawLength,\n pos\n ]\n });\n }\n\n function createValue(kind, codePoint, from, to) {\n return addRaw({\n type: 'value',\n kind: kind,\n codePoint: codePoint,\n range: [from, to]\n });\n }\n\n function createEscaped(kind, codePoint, value, fromOffset) {\n fromOffset = fromOffset || 0;\n return createValue(kind, codePoint, pos - (value.length + fromOffset), pos);\n }\n\n function createCharacter(matches) {\n var _char = matches[0];\n var first = _char.charCodeAt(0);\n if (isUnicodeMode) {\n var second;\n if (_char.length === 1 && first >= 0xD800 && first <= 0xDBFF) {\n second = lookahead().charCodeAt(0);\n if (second >= 0xDC00 && second <= 0xDFFF) {\n // Unicode surrogate pair\n pos++;\n return createValue(\n 'symbol',\n (first - 0xD800) * 0x400 + second - 0xDC00 + 0x10000,\n pos - 2, pos);\n }\n }\n }\n return createValue('symbol', first, pos - 1, pos);\n }\n\n function createDisjunction(alternatives, from, to) {\n return addRaw({\n type: 'disjunction',\n body: alternatives,\n range: [\n from,\n to\n ]\n });\n }\n\n function createDot() {\n return addRaw({\n type: 'dot',\n range: [\n pos - 1,\n pos\n ]\n });\n }\n\n function createCharacterClassEscape(value) {\n return addRaw({\n type: 'characterClassEscape',\n value: value,\n range: [\n pos - 2,\n pos\n ]\n });\n }\n\n function createReference(matchIndex) {\n return addRaw({\n type: 'reference',\n matchIndex: parseInt(matchIndex, 10),\n range: [\n pos - 1 - matchIndex.length,\n pos\n ]\n });\n }\n\n function createNamedReference(name) {\n return addRaw({\n type: 'reference',\n name: name,\n range: [\n name.range[0] - 3,\n pos\n ]\n });\n }\n\n function createGroup(behavior, disjunction, from, to) {\n return addRaw({\n type: 'group',\n behavior: behavior,\n body: disjunction,\n range: [\n from,\n to\n ]\n });\n }\n\n function createQuantifier(min, max, from, to, symbol) {\n if (to == null) {\n from = pos - 1;\n to = pos;\n }\n\n return addRaw({\n type: 'quantifier',\n min: min,\n max: max,\n greedy: true,\n body: null, // set later on\n symbol: symbol,\n range: [\n from,\n to\n ]\n });\n }\n\n function createAlternative(terms, from, to) {\n return addRaw({\n type: 'alternative',\n body: terms,\n range: [\n from,\n to\n ]\n });\n }\n\n function createCharacterClass(contents, negative, from, to) {\n return addRaw({\n type: 'characterClass',\n kind: contents.kind,\n body: contents.body,\n negative: negative,\n range: [\n from,\n to\n ]\n });\n }\n\n function createClassRange(min, max, from, to) {\n // See 15.10.2.15:\n if (min.codePoint > max.codePoint) {\n bail('invalid range in character class', min.raw + '-' + max.raw, from, to);\n }\n\n return addRaw({\n type: 'characterClassRange',\n min: min,\n max: max,\n range: [\n from,\n to\n ]\n });\n }\n\n function createClassStrings(strings, from, to) {\n return addRaw({\n type: 'classStrings',\n strings: strings,\n range: [from, to]\n });\n }\n\n function createClassString(characters, from, to) {\n return addRaw({\n type: 'classString',\n characters: characters,\n range: [from, to]\n });\n }\n\n function flattenBody(body) {\n if (body.type === 'alternative') {\n return body.body;\n } else {\n return [body];\n }\n }\n\n function incr(amount) {\n amount = (amount || 1);\n var res = str.substring(pos, pos + amount);\n pos += (amount || 1);\n return res;\n }\n\n function skip(value) {\n if (!match(value)) {\n bail('character', value);\n }\n }\n\n function match(value) {\n if (str.indexOf(value, pos) === pos) {\n return incr(value.length);\n }\n }\n\n function lookahead() {\n return str[pos];\n }\n\n function current(value) {\n return str.indexOf(value, pos) === pos;\n }\n\n function next(value) {\n return str[pos + 1] === value;\n }\n\n function matchReg(regExp) {\n var subStr = str.substring(pos);\n var res = subStr.match(regExp);\n if (res) {\n res.range = [];\n res.range[0] = pos;\n incr(res[0].length);\n res.range[1] = pos;\n }\n return res;\n }\n\n function parseDisjunction() {\n // Disjunction ::\n // Alternative\n // Alternative | Disjunction\n var res = [], from = pos;\n res.push(parseAlternative());\n\n while (match('|')) {\n res.push(parseAlternative());\n }\n\n if (res.length === 1) {\n return res[0];\n }\n\n return createDisjunction(res, from, pos);\n }\n\n function parseAlternative() {\n var res = [], from = pos;\n var term;\n\n // Alternative ::\n // [empty]\n // Alternative Term\n while (term = parseTerm()) {\n res.push(term);\n }\n\n if (res.length === 1) {\n return res[0];\n }\n\n return createAlternative(res, from, pos);\n }\n\n function parseTerm() {\n // Term ::\n // Anchor\n // Atom\n // Atom Quantifier\n\n if (pos >= str.length || current('|') || current(')')) {\n return null; /* Means: The term is empty */\n }\n\n var anchor = parseAnchor();\n\n if (anchor) {\n return anchor;\n }\n\n var atom = parseAtomAndExtendedAtom();\n var quantifier;\n if (!atom) {\n // Check if a quantifier is following. A quantifier without an atom\n // is an error.\n var pos_backup = pos\n quantifier = parseQuantifier() || false;\n if (quantifier) {\n pos = pos_backup\n bail('Expected atom');\n }\n\n // If no unicode flag, then try to parse ExtendedAtom -> ExtendedPatternCharacter.\n // ExtendedPatternCharacter\n var res;\n if (!isUnicodeMode && (res = matchReg(/^{/))) {\n atom = createCharacter(res);\n } else {\n bail('Expected atom');\n }\n }\n quantifier = parseQuantifier() || false;\n if (quantifier) {\n quantifier.body = flattenBody(atom);\n // The quantifier contains the atom. Therefore, the beginning of the\n // quantifier range is given by the beginning of the atom.\n updateRawStart(quantifier, atom.range[0]);\n return quantifier;\n }\n return atom;\n }\n\n function parseGroup(matchA, typeA, matchB, typeB) {\n var type = null, from = pos;\n\n if (match(matchA)) {\n type = typeA;\n } else if (match(matchB)) {\n type = typeB;\n } else {\n return false;\n }\n\n return finishGroup(type, from);\n }\n\n function finishGroup(type, from) {\n var body = parseDisjunction();\n if (!body) {\n bail('Expected disjunction');\n }\n skip(')');\n var group = createGroup(type, flattenBody(body), from, pos);\n\n if (type == 'normal') {\n // Keep track of the number of closed groups. This is required for\n // parseDecimalEscape(). In case the string is parsed a second time the\n // value already holds the total count and no incrementation is required.\n if (firstIteration) {\n closedCaptureCounter++;\n }\n }\n return group;\n }\n\n function parseAnchor() {\n // Anchor ::\n // ^\n // $\n // \\ b\n // \\ B\n // ( ? = Disjunction )\n // ( ? ! Disjunction )\n\n if (match('^')) {\n return createAnchor('start', 1 /* rawLength */);\n } else if (match('$')) {\n return createAnchor('end', 1 /* rawLength */);\n } else if (match('\\\\b')) {\n return createAnchor('boundary', 2 /* rawLength */);\n } else if (match('\\\\B')) {\n return createAnchor('not-boundary', 2 /* rawLength */);\n } else {\n return parseGroup('(?=', 'lookahead', '(?!', 'negativeLookahead');\n }\n }\n\n function parseQuantifier() {\n // Quantifier ::\n // QuantifierPrefix\n // QuantifierPrefix ?\n //\n // QuantifierPrefix ::\n // *\n // +\n // ?\n // { DecimalDigits }\n // { DecimalDigits , }\n // { DecimalDigits , DecimalDigits }\n\n var res, from = pos;\n var quantifier;\n var min, max;\n\n if (match('*')) {\n quantifier = createQuantifier(0, undefined, undefined, undefined, '*');\n }\n else if (match('+')) {\n quantifier = createQuantifier(1, undefined, undefined, undefined, \"+\");\n }\n else if (match('?')) {\n quantifier = createQuantifier(0, 1, undefined, undefined, \"?\");\n }\n else if (res = matchReg(/^\\{([0-9]+)\\}/)) {\n min = parseInt(res[1], 10);\n quantifier = createQuantifier(min, min, res.range[0], res.range[1]);\n }\n else if (res = matchReg(/^\\{([0-9]+),\\}/)) {\n min = parseInt(res[1], 10);\n quantifier = createQuantifier(min, undefined, res.range[0], res.range[1]);\n }\n else if (res = matchReg(/^\\{([0-9]+),([0-9]+)\\}/)) {\n min = parseInt(res[1], 10);\n max = parseInt(res[2], 10);\n if (min > max) {\n bail('numbers out of order in {} quantifier', '', from, pos);\n }\n quantifier = createQuantifier(min, max, res.range[0], res.range[1]);\n }\n\n if ((min && !Number.isSafeInteger(min)) || (max && !Number.isSafeInteger(max))) {\n bail(\"iterations outside JS safe integer range in quantifier\", \"\", from, pos);\n }\n\n if (quantifier) {\n if (match('?')) {\n quantifier.greedy = false;\n quantifier.range[1] += 1;\n }\n }\n\n return quantifier;\n }\n\n function parseAtomAndExtendedAtom() {\n // Parsing Atom and ExtendedAtom together due to redundancy.\n // ExtendedAtom is defined in Apendix B of the ECMA-262 standard.\n //\n // SEE: https://www.ecma-international.org/ecma-262/10.0/index.html#prod-annexB-ExtendedPatternCharacter\n //\n // Atom ::\n // PatternCharacter\n // .\n // \\ AtomEscape\n // CharacterClass\n // ( GroupSpecifier Disjunction )\n // ( ? RegularExpressionFlags : Disjunction )\n // ( ? RegularExpressionFlags - RegularExpressionFlags : Disjunction )\n // ExtendedAtom ::\n // ExtendedPatternCharacter\n // ExtendedPatternCharacter ::\n // SourceCharacter but not one of ^$\\.*+?()[|\n\n var res;\n\n // jviereck: allow ']', '}' here as well to be compatible with browser's\n // implementations: ']'.match(/]/);\n if (res = matchReg(/^[^^$\\\\.*+?()[\\]{}|]/)) {\n // PatternCharacter\n return createCharacter(res);\n }\n else if (!isUnicodeMode && (res = matchReg(/^(?:]|})/))) {\n // ExtendedPatternCharacter, first part. See parseTerm.\n return createCharacter(res);\n }\n else if (match('.')) {\n // .\n return createDot();\n }\n else if (match('\\\\')) {\n // \\ AtomEscape\n res = parseAtomEscape();\n if (!res) {\n if (!isUnicodeMode && lookahead() == 'c') {\n // B.1.4 ExtendedAtom\n // \\[lookahead = c]\n return createValue('symbol', 92, pos - 1, pos);\n }\n bail('atomEscape');\n }\n return res;\n }\n else if (res = parseCharacterClass()) {\n return res;\n }\n else if (features.lookbehind && (res = parseGroup('(?<=', 'lookbehind', '(?\");\n var group = finishGroup(\"normal\", name.range[0] - 3);\n group.name = name;\n return group;\n }\n else if (features.modifiers && str.indexOf(\"(?\") == pos && str[pos+2] != \":\") {\n return parseModifiersGroup();\n }\n else {\n // ( Disjunction )\n // ( ? : Disjunction )\n return parseGroup('(?:', 'ignore', '(', 'normal');\n }\n }\n\n function parseModifiersGroup() {\n function hasDupChar(str) {\n var i = 0;\n while (i < str.length) {\n if (str.indexOf(str[i], i + 1) != -1) {\n return true;\n }\n i++;\n }\n return false;\n }\n\n var from = pos;\n incr(2);\n\n var enablingFlags = matchReg(/^[sim]+/);\n var disablingFlags;\n if(match(\"-\")){\n disablingFlags = matchReg(/^[sim]+/);\n if (!disablingFlags) {\n bail('Invalid flags for modifiers group');\n }\n } else if(!enablingFlags){\n bail('Invalid flags for modifiers group');\n }\n\n enablingFlags = enablingFlags ? enablingFlags[0] : \"\";\n disablingFlags = disablingFlags ? disablingFlags[0] : \"\";\n\n var flags = enablingFlags + disablingFlags;\n if(flags.length > 3 || hasDupChar(flags)) {\n bail('flags cannot be duplicated for modifiers group');\n }\n\n skip(\":\");\n\n var modifiersGroup = finishGroup(\"ignore\", from);\n\n modifiersGroup.modifierFlags = {\n enabling: enablingFlags,\n disabling: disablingFlags\n };\n\n return modifiersGroup;\n }\n\n function parseUnicodeSurrogatePairEscape(firstEscape) {\n if (isUnicodeMode) {\n var first, second;\n if (firstEscape.kind == 'unicodeEscape' &&\n (first = firstEscape.codePoint) >= 0xD800 && first <= 0xDBFF &&\n current('\\\\') && next('u') ) {\n var prevPos = pos;\n pos++;\n var secondEscape = parseClassEscape();\n if (secondEscape.kind == 'unicodeEscape' &&\n (second = secondEscape.codePoint) >= 0xDC00 && second <= 0xDFFF) {\n // Unicode surrogate pair\n firstEscape.range[1] = secondEscape.range[1];\n firstEscape.codePoint = (first - 0xD800) * 0x400 + second - 0xDC00 + 0x10000;\n firstEscape.type = 'value';\n firstEscape.kind = 'unicodeCodePointEscape';\n addRaw(firstEscape);\n }\n else {\n pos = prevPos;\n }\n }\n }\n return firstEscape;\n }\n\n function parseClassEscape() {\n return parseAtomEscape(true);\n }\n\n function parseAtomEscape(insideCharacterClass) {\n // AtomEscape ::\n // DecimalEscape\n // CharacterEscape\n // CharacterClassEscape\n // k GroupName\n\n var res, from = pos;\n\n res = parseDecimalEscape(insideCharacterClass) || parseNamedReference();\n if (res) {\n return res;\n }\n\n // For ClassEscape\n if (insideCharacterClass) {\n // b\n if (match('b')) {\n // 15.10.2.19\n // The production ClassEscape :: b evaluates by returning the\n // CharSet containing the one character (Unicode value 0008).\n return createEscaped('singleEscape', 0x0008, '\\\\b');\n } else if (match('B')) {\n bail('\\\\B not possible inside of CharacterClass', '', from);\n } else if (!isUnicodeMode && (res = matchReg(/^c([0-9])/))) {\n // B.1.4\n // c ClassControlLetter, ClassControlLetter = DecimalDigit\n return createEscaped('controlLetter', res[1] + 16, res[1], 2);\n } else if (!isUnicodeMode && (res = matchReg(/^c_/))) {\n // B.1.4\n // c ClassControlLetter, ClassControlLetter = _\n return createEscaped('controlLetter', 31, '_', 2);\n }\n // [+U] -\n if (isUnicodeMode && match('-')) {\n return createEscaped('singleEscape', 0x002d, '\\\\-');\n }\n }\n\n res = parseCharacterClassEscape() || parseCharacterEscape();\n\n return res;\n }\n\n\n function parseDecimalEscape(insideCharacterClass) {\n // DecimalEscape ::\n // DecimalIntegerLiteral [lookahead ∉ DecimalDigit]\n\n var res, match, from = pos;\n\n if (res = matchReg(/^(?!0)\\d+/)) {\n match = res[0];\n var refIdx = parseInt(res[0], 10);\n if (refIdx <= closedCaptureCounter && !insideCharacterClass) {\n // If the number is smaller than the normal-groups found so\n // far, then it is a reference...\n return createReference(res[0]);\n } else {\n // ... otherwise it needs to be interpreted as a octal (if the\n // number is in an octal format). If it is NOT octal format,\n // then the slash is ignored and the number is matched later\n // as normal characters.\n\n // Recall the negative decision to decide if the input must be parsed\n // a second time with the total normal-groups.\n backrefDenied.push(refIdx);\n\n // \\1 octal escapes are disallowed in unicode mode, but they might\n // be references to groups which haven't been parsed yet.\n // We must parse a second time to determine if \\1 is a reference\n // or an octal scape, and then we can report the error.\n if (firstIteration) {\n shouldReparse = true;\n } else {\n bailOctalEscapeIfUnicode(from, pos);\n }\n\n // Reset the position again, as maybe only parts of the previous\n // matched numbers are actual octal numbers. E.g. in '019' only\n // the '01' should be matched.\n incr(-res[0].length);\n if (res = matchReg(/^[0-7]{1,3}/)) {\n return createEscaped('octal', parseInt(res[0], 8), res[0], 1);\n } else {\n // If we end up here, we have a case like /\\91/. Then the\n // first slash is to be ignored and the 9 & 1 to be treated\n // like ordinary characters. Create a character for the\n // first number only here - other number-characters\n // (if available) will be matched later.\n res = createCharacter(matchReg(/^[89]/));\n return updateRawStart(res, res.range[0] - 1);\n }\n }\n }\n // Only allow octal numbers in the following. All matched numbers start\n // with a zero (if the do not, the previous if-branch is executed).\n // If the number is not octal format and starts with zero (e.g. `091`)\n // then only the zeros `0` is treated here and the `91` are ordinary\n // characters.\n // Example:\n // /\\091/.exec('\\091')[0].length === 3\n else if (res = matchReg(/^[0-7]{1,3}/)) {\n match = res[0];\n if (match !== '0') {\n bailOctalEscapeIfUnicode(from, pos);\n }\n if (/^0{1,3}$/.test(match)) {\n // If they are all zeros, then only take the first one.\n return createEscaped('null', 0x0000, '0', match.length);\n } else {\n return createEscaped('octal', parseInt(match, 8), match, 1);\n }\n }\n return false;\n }\n\n function bailOctalEscapeIfUnicode(from, pos) {\n if (isUnicodeMode) {\n bail(\"Invalid decimal escape in unicode mode\", null, from, pos);\n }\n }\n\n function parseCharacterClassEscape() {\n // CharacterClassEscape :: one of d D s S w W\n var res;\n if (res = matchReg(/^[dDsSwW]/)) {\n return createCharacterClassEscape(res[0]);\n } else if (features.unicodePropertyEscape && isUnicodeMode && (res = matchReg(/^([pP])\\{([^\\}]+)\\}/))) {\n // https://github.com/jviereck/regjsparser/issues/77\n return addRaw({\n type: 'unicodePropertyEscape',\n negative: res[1] === 'P',\n value: res[2],\n range: [res.range[0] - 1, res.range[1]],\n raw: res[0]\n });\n } else if (features.unicodeSet && hasUnicodeSetFlag && match('q{')) {\n return parseClassStrings();\n }\n return false;\n }\n\n function parseNamedReference() {\n if (features.namedGroups && matchReg(/^k<(?=.*?>)/)) {\n var name = parseIdentifier();\n skip('>');\n return createNamedReference(name);\n }\n }\n\n function parseRegExpUnicodeEscapeSequence() {\n var res;\n if (res = matchReg(/^u([0-9a-fA-F]{4})/)) {\n // UnicodeEscapeSequence\n return parseUnicodeSurrogatePairEscape(\n createEscaped('unicodeEscape', parseInt(res[1], 16), res[1], 2)\n );\n } else if (isUnicodeMode && (res = matchReg(/^u\\{([0-9a-fA-F]+)\\}/))) {\n // RegExpUnicodeEscapeSequence (ES6 Unicode code point escape)\n return createEscaped('unicodeCodePointEscape', parseInt(res[1], 16), res[1], 4);\n }\n }\n\n function parseCharacterEscape() {\n // CharacterEscape ::\n // ControlEscape\n // c ControlLetter\n // HexEscapeSequence\n // UnicodeEscapeSequence\n // IdentityEscape\n\n var res;\n var from = pos;\n if (res = matchReg(/^[fnrtv]/)) {\n // ControlEscape\n var codePoint = 0;\n switch (res[0]) {\n case 't': codePoint = 0x009; break;\n case 'n': codePoint = 0x00A; break;\n case 'v': codePoint = 0x00B; break;\n case 'f': codePoint = 0x00C; break;\n case 'r': codePoint = 0x00D; break;\n }\n return createEscaped('singleEscape', codePoint, '\\\\' + res[0]);\n } else if (res = matchReg(/^c([a-zA-Z])/)) {\n // c ControlLetter\n return createEscaped('controlLetter', res[1].charCodeAt(0) % 32, res[1], 2);\n } else if (res = matchReg(/^x([0-9a-fA-F]{2})/)) {\n // HexEscapeSequence\n return createEscaped('hexadecimalEscape', parseInt(res[1], 16), res[1], 2);\n } else if (res = parseRegExpUnicodeEscapeSequence()) {\n if (!res || res.codePoint > 0x10FFFF) {\n bail('Invalid escape sequence', null, from, pos);\n }\n return res;\n } else {\n // IdentityEscape\n return parseIdentityEscape();\n }\n }\n\n function parseIdentifierAtom(check) {\n var ch = lookahead();\n var from = pos;\n if (ch === '\\\\') {\n incr();\n var esc = parseRegExpUnicodeEscapeSequence();\n if (!esc || !check(esc.codePoint)) {\n bail('Invalid escape sequence', null, from, pos);\n }\n return fromCodePoint(esc.codePoint);\n }\n var code = ch.charCodeAt(0);\n if (code >= 0xD800 && code <= 0xDBFF) {\n ch += str[pos + 1];\n var second = ch.charCodeAt(1);\n if (second >= 0xDC00 && second <= 0xDFFF) {\n // Unicode surrogate pair\n code = (code - 0xD800) * 0x400 + second - 0xDC00 + 0x10000;\n }\n }\n if (!check(code)) return;\n incr();\n if (code > 0xFFFF) incr();\n return ch;\n }\n\n function parseIdentifier() {\n // RegExpIdentifierName ::\n // RegExpIdentifierStart\n // RegExpIdentifierName RegExpIdentifierContinue\n //\n // RegExpIdentifierStart ::\n // UnicodeIDStart\n // $\n // _\n // \\ RegExpUnicodeEscapeSequence\n //\n // RegExpIdentifierContinue ::\n // UnicodeIDContinue\n // $\n // _\n // \\ RegExpUnicodeEscapeSequence\n // \n // \n\n var start = pos;\n var res = parseIdentifierAtom(isIdentifierStart);\n if (!res) {\n bail('Invalid identifier');\n }\n\n var ch;\n while (ch = parseIdentifierAtom(isIdentifierPart)) {\n res += ch;\n }\n\n return addRaw({\n type: 'identifier',\n value: res,\n range: [start, pos]\n });\n }\n\n function isIdentifierStart(ch) {\n // Generated by `tools/generate-identifier-regex.js`.\n var NonAsciiIdentifierStart = /[\\$A-Z_a-z\\xAA\\xB5\\xBA\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\u02C1\\u02C6-\\u02D1\\u02E0-\\u02E4\\u02EC\\u02EE\\u0370-\\u0374\\u0376\\u0377\\u037A-\\u037D\\u037F\\u0386\\u0388-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u03F5\\u03F7-\\u0481\\u048A-\\u052F\\u0531-\\u0556\\u0559\\u0560-\\u0588\\u05D0-\\u05EA\\u05EF-\\u05F2\\u0620-\\u064A\\u066E\\u066F\\u0671-\\u06D3\\u06D5\\u06E5\\u06E6\\u06EE\\u06EF\\u06FA-\\u06FC\\u06FF\\u0710\\u0712-\\u072F\\u074D-\\u07A5\\u07B1\\u07CA-\\u07EA\\u07F4\\u07F5\\u07FA\\u0800-\\u0815\\u081A\\u0824\\u0828\\u0840-\\u0858\\u0860-\\u086A\\u08A0-\\u08B4\\u08B6-\\u08BD\\u0904-\\u0939\\u093D\\u0950\\u0958-\\u0961\\u0971-\\u0980\\u0985-\\u098C\\u098F\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2\\u09B6-\\u09B9\\u09BD\\u09CE\\u09DC\\u09DD\\u09DF-\\u09E1\\u09F0\\u09F1\\u09FC\\u0A05-\\u0A0A\\u0A0F\\u0A10\\u0A13-\\u0A28\\u0A2A-\\u0A30\\u0A32\\u0A33\\u0A35\\u0A36\\u0A38\\u0A39\\u0A59-\\u0A5C\\u0A5E\\u0A72-\\u0A74\\u0A85-\\u0A8D\\u0A8F-\\u0A91\\u0A93-\\u0AA8\\u0AAA-\\u0AB0\\u0AB2\\u0AB3\\u0AB5-\\u0AB9\\u0ABD\\u0AD0\\u0AE0\\u0AE1\\u0AF9\\u0B05-\\u0B0C\\u0B0F\\u0B10\\u0B13-\\u0B28\\u0B2A-\\u0B30\\u0B32\\u0B33\\u0B35-\\u0B39\\u0B3D\\u0B5C\\u0B5D\\u0B5F-\\u0B61\\u0B71\\u0B83\\u0B85-\\u0B8A\\u0B8E-\\u0B90\\u0B92-\\u0B95\\u0B99\\u0B9A\\u0B9C\\u0B9E\\u0B9F\\u0BA3\\u0BA4\\u0BA8-\\u0BAA\\u0BAE-\\u0BB9\\u0BD0\\u0C05-\\u0C0C\\u0C0E-\\u0C10\\u0C12-\\u0C28\\u0C2A-\\u0C39\\u0C3D\\u0C58-\\u0C5A\\u0C60\\u0C61\\u0C80\\u0C85-\\u0C8C\\u0C8E-\\u0C90\\u0C92-\\u0CA8\\u0CAA-\\u0CB3\\u0CB5-\\u0CB9\\u0CBD\\u0CDE\\u0CE0\\u0CE1\\u0CF1\\u0CF2\\u0D05-\\u0D0C\\u0D0E-\\u0D10\\u0D12-\\u0D3A\\u0D3D\\u0D4E\\u0D54-\\u0D56\\u0D5F-\\u0D61\\u0D7A-\\u0D7F\\u0D85-\\u0D96\\u0D9A-\\u0DB1\\u0DB3-\\u0DBB\\u0DBD\\u0DC0-\\u0DC6\\u0E01-\\u0E30\\u0E32\\u0E33\\u0E40-\\u0E46\\u0E81\\u0E82\\u0E84\\u0E87\\u0E88\\u0E8A\\u0E8D\\u0E94-\\u0E97\\u0E99-\\u0E9F\\u0EA1-\\u0EA3\\u0EA5\\u0EA7\\u0EAA\\u0EAB\\u0EAD-\\u0EB0\\u0EB2\\u0EB3\\u0EBD\\u0EC0-\\u0EC4\\u0EC6\\u0EDC-\\u0EDF\\u0F00\\u0F40-\\u0F47\\u0F49-\\u0F6C\\u0F88-\\u0F8C\\u1000-\\u102A\\u103F\\u1050-\\u1055\\u105A-\\u105D\\u1061\\u1065\\u1066\\u106E-\\u1070\\u1075-\\u1081\\u108E\\u10A0-\\u10C5\\u10C7\\u10CD\\u10D0-\\u10FA\\u10FC-\\u1248\\u124A-\\u124D\\u1250-\\u1256\\u1258\\u125A-\\u125D\\u1260-\\u1288\\u128A-\\u128D\\u1290-\\u12B0\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-\\u1310\\u1312-\\u1315\\u1318-\\u135A\\u1380-\\u138F\\u13A0-\\u13F5\\u13F8-\\u13FD\\u1401-\\u166C\\u166F-\\u167F\\u1681-\\u169A\\u16A0-\\u16EA\\u16EE-\\u16F8\\u1700-\\u170C\\u170E-\\u1711\\u1720-\\u1731\\u1740-\\u1751\\u1760-\\u176C\\u176E-\\u1770\\u1780-\\u17B3\\u17D7\\u17DC\\u1820-\\u1878\\u1880-\\u18A8\\u18AA\\u18B0-\\u18F5\\u1900-\\u191E\\u1950-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\\u19B0-\\u19C9\\u1A00-\\u1A16\\u1A20-\\u1A54\\u1AA7\\u1B05-\\u1B33\\u1B45-\\u1B4B\\u1B83-\\u1BA0\\u1BAE\\u1BAF\\u1BBA-\\u1BE5\\u1C00-\\u1C23\\u1C4D-\\u1C4F\\u1C5A-\\u1C7D\\u1C80-\\u1C88\\u1C90-\\u1CBA\\u1CBD-\\u1CBF\\u1CE9-\\u1CEC\\u1CEE-\\u1CF1\\u1CF5\\u1CF6\\u1D00-\\u1DBF\\u1E00-\\u1F15\\u1F18-\\u1F1D\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-\\u1F7D\\u1F80-\\u1FB4\\u1FB6-\\u1FBC\\u1FBE\\u1FC2-\\u1FC4\\u1FC6-\\u1FCC\\u1FD0-\\u1FD3\\u1FD6-\\u1FDB\\u1FE0-\\u1FEC\\u1FF2-\\u1FF4\\u1FF6-\\u1FFC\\u2071\\u207F\\u2090-\\u209C\\u2102\\u2107\\u210A-\\u2113\\u2115\\u2118-\\u211D\\u2124\\u2126\\u2128\\u212A-\\u2139\\u213C-\\u213F\\u2145-\\u2149\\u214E\\u2160-\\u2188\\u2C00-\\u2C2E\\u2C30-\\u2C5E\\u2C60-\\u2CE4\\u2CEB-\\u2CEE\\u2CF2\\u2CF3\\u2D00-\\u2D25\\u2D27\\u2D2D\\u2D30-\\u2D67\\u2D6F\\u2D80-\\u2D96\\u2DA0-\\u2DA6\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u3005-\\u3007\\u3021-\\u3029\\u3031-\\u3035\\u3038-\\u303C\\u3041-\\u3096\\u309B-\\u309F\\u30A1-\\u30FA\\u30FC-\\u30FF\\u3105-\\u312F\\u3131-\\u318E\\u31A0-\\u31BA\\u31F0-\\u31FF\\u3400-\\u4DB5\\u4E00-\\u9FEF\\uA000-\\uA48C\\uA4D0-\\uA4FD\\uA500-\\uA60C\\uA610-\\uA61F\\uA62A\\uA62B\\uA640-\\uA66E\\uA67F-\\uA69D\\uA6A0-\\uA6EF\\uA717-\\uA71F\\uA722-\\uA788\\uA78B-\\uA7B9\\uA7F7-\\uA801\\uA803-\\uA805\\uA807-\\uA80A\\uA80C-\\uA822\\uA840-\\uA873\\uA882-\\uA8B3\\uA8F2-\\uA8F7\\uA8FB\\uA8FD\\uA8FE\\uA90A-\\uA925\\uA930-\\uA946\\uA960-\\uA97C\\uA984-\\uA9B2\\uA9CF\\uA9E0-\\uA9E4\\uA9E6-\\uA9EF\\uA9FA-\\uA9FE\\uAA00-\\uAA28\\uAA40-\\uAA42\\uAA44-\\uAA4B\\uAA60-\\uAA76\\uAA7A\\uAA7E-\\uAAAF\\uAAB1\\uAAB5\\uAAB6\\uAAB9-\\uAABD\\uAAC0\\uAAC2\\uAADB-\\uAADD\\uAAE0-\\uAAEA\\uAAF2-\\uAAF4\\uAB01-\\uAB06\\uAB09-\\uAB0E\\uAB11-\\uAB16\\uAB20-\\uAB26\\uAB28-\\uAB2E\\uAB30-\\uAB5A\\uAB5C-\\uAB65\\uAB70-\\uABE2\\uAC00-\\uD7A3\\uD7B0-\\uD7C6\\uD7CB-\\uD7FB\\uF900-\\uFA6D\\uFA70-\\uFAD9\\uFB00-\\uFB06\\uFB13-\\uFB17\\uFB1D\\uFB1F-\\uFB28\\uFB2A-\\uFB36\\uFB38-\\uFB3C\\uFB3E\\uFB40\\uFB41\\uFB43\\uFB44\\uFB46-\\uFBB1\\uFBD3-\\uFD3D\\uFD50-\\uFD8F\\uFD92-\\uFDC7\\uFDF0-\\uFDFB\\uFE70-\\uFE74\\uFE76-\\uFEFC\\uFF21-\\uFF3A\\uFF41-\\uFF5A\\uFF66-\\uFFBE\\uFFC2-\\uFFC7\\uFFCA-\\uFFCF\\uFFD2-\\uFFD7\\uFFDA-\\uFFDC]|\\uD800[\\uDC00-\\uDC0B\\uDC0D-\\uDC26\\uDC28-\\uDC3A\\uDC3C\\uDC3D\\uDC3F-\\uDC4D\\uDC50-\\uDC5D\\uDC80-\\uDCFA\\uDD40-\\uDD74\\uDE80-\\uDE9C\\uDEA0-\\uDED0\\uDF00-\\uDF1F\\uDF2D-\\uDF4A\\uDF50-\\uDF75\\uDF80-\\uDF9D\\uDFA0-\\uDFC3\\uDFC8-\\uDFCF\\uDFD1-\\uDFD5]|\\uD801[\\uDC00-\\uDC9D\\uDCB0-\\uDCD3\\uDCD8-\\uDCFB\\uDD00-\\uDD27\\uDD30-\\uDD63\\uDE00-\\uDF36\\uDF40-\\uDF55\\uDF60-\\uDF67]|\\uD802[\\uDC00-\\uDC05\\uDC08\\uDC0A-\\uDC35\\uDC37\\uDC38\\uDC3C\\uDC3F-\\uDC55\\uDC60-\\uDC76\\uDC80-\\uDC9E\\uDCE0-\\uDCF2\\uDCF4\\uDCF5\\uDD00-\\uDD15\\uDD20-\\uDD39\\uDD80-\\uDDB7\\uDDBE\\uDDBF\\uDE00\\uDE10-\\uDE13\\uDE15-\\uDE17\\uDE19-\\uDE35\\uDE60-\\uDE7C\\uDE80-\\uDE9C\\uDEC0-\\uDEC7\\uDEC9-\\uDEE4\\uDF00-\\uDF35\\uDF40-\\uDF55\\uDF60-\\uDF72\\uDF80-\\uDF91]|\\uD803[\\uDC00-\\uDC48\\uDC80-\\uDCB2\\uDCC0-\\uDCF2\\uDD00-\\uDD23\\uDF00-\\uDF1C\\uDF27\\uDF30-\\uDF45]|\\uD804[\\uDC03-\\uDC37\\uDC83-\\uDCAF\\uDCD0-\\uDCE8\\uDD03-\\uDD26\\uDD44\\uDD50-\\uDD72\\uDD76\\uDD83-\\uDDB2\\uDDC1-\\uDDC4\\uDDDA\\uDDDC\\uDE00-\\uDE11\\uDE13-\\uDE2B\\uDE80-\\uDE86\\uDE88\\uDE8A-\\uDE8D\\uDE8F-\\uDE9D\\uDE9F-\\uDEA8\\uDEB0-\\uDEDE\\uDF05-\\uDF0C\\uDF0F\\uDF10\\uDF13-\\uDF28\\uDF2A-\\uDF30\\uDF32\\uDF33\\uDF35-\\uDF39\\uDF3D\\uDF50\\uDF5D-\\uDF61]|\\uD805[\\uDC00-\\uDC34\\uDC47-\\uDC4A\\uDC80-\\uDCAF\\uDCC4\\uDCC5\\uDCC7\\uDD80-\\uDDAE\\uDDD8-\\uDDDB\\uDE00-\\uDE2F\\uDE44\\uDE80-\\uDEAA\\uDF00-\\uDF1A]|\\uD806[\\uDC00-\\uDC2B\\uDCA0-\\uDCDF\\uDCFF\\uDE00\\uDE0B-\\uDE32\\uDE3A\\uDE50\\uDE5C-\\uDE83\\uDE86-\\uDE89\\uDE9D\\uDEC0-\\uDEF8]|\\uD807[\\uDC00-\\uDC08\\uDC0A-\\uDC2E\\uDC40\\uDC72-\\uDC8F\\uDD00-\\uDD06\\uDD08\\uDD09\\uDD0B-\\uDD30\\uDD46\\uDD60-\\uDD65\\uDD67\\uDD68\\uDD6A-\\uDD89\\uDD98\\uDEE0-\\uDEF2]|\\uD808[\\uDC00-\\uDF99]|\\uD809[\\uDC00-\\uDC6E\\uDC80-\\uDD43]|[\\uD80C\\uD81C-\\uD820\\uD840-\\uD868\\uD86A-\\uD86C\\uD86F-\\uD872\\uD874-\\uD879][\\uDC00-\\uDFFF]|\\uD80D[\\uDC00-\\uDC2E]|\\uD811[\\uDC00-\\uDE46]|\\uD81A[\\uDC00-\\uDE38\\uDE40-\\uDE5E\\uDED0-\\uDEED\\uDF00-\\uDF2F\\uDF40-\\uDF43\\uDF63-\\uDF77\\uDF7D-\\uDF8F]|\\uD81B[\\uDE40-\\uDE7F\\uDF00-\\uDF44\\uDF50\\uDF93-\\uDF9F\\uDFE0\\uDFE1]|\\uD821[\\uDC00-\\uDFF1]|\\uD822[\\uDC00-\\uDEF2]|\\uD82C[\\uDC00-\\uDD1E\\uDD70-\\uDEFB]|\\uD82F[\\uDC00-\\uDC6A\\uDC70-\\uDC7C\\uDC80-\\uDC88\\uDC90-\\uDC99]|\\uD835[\\uDC00-\\uDC54\\uDC56-\\uDC9C\\uDC9E\\uDC9F\\uDCA2\\uDCA5\\uDCA6\\uDCA9-\\uDCAC\\uDCAE-\\uDCB9\\uDCBB\\uDCBD-\\uDCC3\\uDCC5-\\uDD05\\uDD07-\\uDD0A\\uDD0D-\\uDD14\\uDD16-\\uDD1C\\uDD1E-\\uDD39\\uDD3B-\\uDD3E\\uDD40-\\uDD44\\uDD46\\uDD4A-\\uDD50\\uDD52-\\uDEA5\\uDEA8-\\uDEC0\\uDEC2-\\uDEDA\\uDEDC-\\uDEFA\\uDEFC-\\uDF14\\uDF16-\\uDF34\\uDF36-\\uDF4E\\uDF50-\\uDF6E\\uDF70-\\uDF88\\uDF8A-\\uDFA8\\uDFAA-\\uDFC2\\uDFC4-\\uDFCB]|\\uD83A[\\uDC00-\\uDCC4\\uDD00-\\uDD43]|\\uD83B[\\uDE00-\\uDE03\\uDE05-\\uDE1F\\uDE21\\uDE22\\uDE24\\uDE27\\uDE29-\\uDE32\\uDE34-\\uDE37\\uDE39\\uDE3B\\uDE42\\uDE47\\uDE49\\uDE4B\\uDE4D-\\uDE4F\\uDE51\\uDE52\\uDE54\\uDE57\\uDE59\\uDE5B\\uDE5D\\uDE5F\\uDE61\\uDE62\\uDE64\\uDE67-\\uDE6A\\uDE6C-\\uDE72\\uDE74-\\uDE77\\uDE79-\\uDE7C\\uDE7E\\uDE80-\\uDE89\\uDE8B-\\uDE9B\\uDEA1-\\uDEA3\\uDEA5-\\uDEA9\\uDEAB-\\uDEBB]|\\uD869[\\uDC00-\\uDED6\\uDF00-\\uDFFF]|\\uD86D[\\uDC00-\\uDF34\\uDF40-\\uDFFF]|\\uD86E[\\uDC00-\\uDC1D\\uDC20-\\uDFFF]|\\uD873[\\uDC00-\\uDEA1\\uDEB0-\\uDFFF]|\\uD87A[\\uDC00-\\uDFE0]|\\uD87E[\\uDC00-\\uDE1D]/;\n\n return (ch === 36) || (ch === 95) || // $ (dollar) and _ (underscore)\n (ch >= 65 && ch <= 90) || // A..Z\n (ch >= 97 && ch <= 122) || // a..z\n ((ch >= 0x80) && NonAsciiIdentifierStart.test(fromCodePoint(ch)));\n }\n\n // Taken from the Esprima parser.\n function isIdentifierPart(ch) {\n // Generated by `tools/generate-identifier-regex.js`.\n // eslint-disable-next-line no-misleading-character-class\n var NonAsciiIdentifierPartOnly = /[0-9_\\xB7\\u0300-\\u036F\\u0387\\u0483-\\u0487\\u0591-\\u05BD\\u05BF\\u05C1\\u05C2\\u05C4\\u05C5\\u05C7\\u0610-\\u061A\\u064B-\\u0669\\u0670\\u06D6-\\u06DC\\u06DF-\\u06E4\\u06E7\\u06E8\\u06EA-\\u06ED\\u06F0-\\u06F9\\u0711\\u0730-\\u074A\\u07A6-\\u07B0\\u07C0-\\u07C9\\u07EB-\\u07F3\\u07FD\\u0816-\\u0819\\u081B-\\u0823\\u0825-\\u0827\\u0829-\\u082D\\u0859-\\u085B\\u08D3-\\u08E1\\u08E3-\\u0903\\u093A-\\u093C\\u093E-\\u094F\\u0951-\\u0957\\u0962\\u0963\\u0966-\\u096F\\u0981-\\u0983\\u09BC\\u09BE-\\u09C4\\u09C7\\u09C8\\u09CB-\\u09CD\\u09D7\\u09E2\\u09E3\\u09E6-\\u09EF\\u09FE\\u0A01-\\u0A03\\u0A3C\\u0A3E-\\u0A42\\u0A47\\u0A48\\u0A4B-\\u0A4D\\u0A51\\u0A66-\\u0A71\\u0A75\\u0A81-\\u0A83\\u0ABC\\u0ABE-\\u0AC5\\u0AC7-\\u0AC9\\u0ACB-\\u0ACD\\u0AE2\\u0AE3\\u0AE6-\\u0AEF\\u0AFA-\\u0AFF\\u0B01-\\u0B03\\u0B3C\\u0B3E-\\u0B44\\u0B47\\u0B48\\u0B4B-\\u0B4D\\u0B56\\u0B57\\u0B62\\u0B63\\u0B66-\\u0B6F\\u0B82\\u0BBE-\\u0BC2\\u0BC6-\\u0BC8\\u0BCA-\\u0BCD\\u0BD7\\u0BE6-\\u0BEF\\u0C00-\\u0C04\\u0C3E-\\u0C44\\u0C46-\\u0C48\\u0C4A-\\u0C4D\\u0C55\\u0C56\\u0C62\\u0C63\\u0C66-\\u0C6F\\u0C81-\\u0C83\\u0CBC\\u0CBE-\\u0CC4\\u0CC6-\\u0CC8\\u0CCA-\\u0CCD\\u0CD5\\u0CD6\\u0CE2\\u0CE3\\u0CE6-\\u0CEF\\u0D00-\\u0D03\\u0D3B\\u0D3C\\u0D3E-\\u0D44\\u0D46-\\u0D48\\u0D4A-\\u0D4D\\u0D57\\u0D62\\u0D63\\u0D66-\\u0D6F\\u0D82\\u0D83\\u0DCA\\u0DCF-\\u0DD4\\u0DD6\\u0DD8-\\u0DDF\\u0DE6-\\u0DEF\\u0DF2\\u0DF3\\u0E31\\u0E34-\\u0E3A\\u0E47-\\u0E4E\\u0E50-\\u0E59\\u0EB1\\u0EB4-\\u0EB9\\u0EBB\\u0EBC\\u0EC8-\\u0ECD\\u0ED0-\\u0ED9\\u0F18\\u0F19\\u0F20-\\u0F29\\u0F35\\u0F37\\u0F39\\u0F3E\\u0F3F\\u0F71-\\u0F84\\u0F86\\u0F87\\u0F8D-\\u0F97\\u0F99-\\u0FBC\\u0FC6\\u102B-\\u103E\\u1040-\\u1049\\u1056-\\u1059\\u105E-\\u1060\\u1062-\\u1064\\u1067-\\u106D\\u1071-\\u1074\\u1082-\\u108D\\u108F-\\u109D\\u135D-\\u135F\\u1369-\\u1371\\u1712-\\u1714\\u1732-\\u1734\\u1752\\u1753\\u1772\\u1773\\u17B4-\\u17D3\\u17DD\\u17E0-\\u17E9\\u180B-\\u180D\\u1810-\\u1819\\u18A9\\u1920-\\u192B\\u1930-\\u193B\\u1946-\\u194F\\u19D0-\\u19DA\\u1A17-\\u1A1B\\u1A55-\\u1A5E\\u1A60-\\u1A7C\\u1A7F-\\u1A89\\u1A90-\\u1A99\\u1AB0-\\u1ABD\\u1B00-\\u1B04\\u1B34-\\u1B44\\u1B50-\\u1B59\\u1B6B-\\u1B73\\u1B80-\\u1B82\\u1BA1-\\u1BAD\\u1BB0-\\u1BB9\\u1BE6-\\u1BF3\\u1C24-\\u1C37\\u1C40-\\u1C49\\u1C50-\\u1C59\\u1CD0-\\u1CD2\\u1CD4-\\u1CE8\\u1CED\\u1CF2-\\u1CF4\\u1CF7-\\u1CF9\\u1DC0-\\u1DF9\\u1DFB-\\u1DFF\\u200C\\u200D\\u203F\\u2040\\u2054\\u20D0-\\u20DC\\u20E1\\u20E5-\\u20F0\\u2CEF-\\u2CF1\\u2D7F\\u2DE0-\\u2DFF\\u302A-\\u302F\\u3099\\u309A\\uA620-\\uA629\\uA66F\\uA674-\\uA67D\\uA69E\\uA69F\\uA6F0\\uA6F1\\uA802\\uA806\\uA80B\\uA823-\\uA827\\uA880\\uA881\\uA8B4-\\uA8C5\\uA8D0-\\uA8D9\\uA8E0-\\uA8F1\\uA8FF-\\uA909\\uA926-\\uA92D\\uA947-\\uA953\\uA980-\\uA983\\uA9B3-\\uA9C0\\uA9D0-\\uA9D9\\uA9E5\\uA9F0-\\uA9F9\\uAA29-\\uAA36\\uAA43\\uAA4C\\uAA4D\\uAA50-\\uAA59\\uAA7B-\\uAA7D\\uAAB0\\uAAB2-\\uAAB4\\uAAB7\\uAAB8\\uAABE\\uAABF\\uAAC1\\uAAEB-\\uAAEF\\uAAF5\\uAAF6\\uABE3-\\uABEA\\uABEC\\uABED\\uABF0-\\uABF9\\uFB1E\\uFE00-\\uFE0F\\uFE20-\\uFE2F\\uFE33\\uFE34\\uFE4D-\\uFE4F\\uFF10-\\uFF19\\uFF3F]|\\uD800[\\uDDFD\\uDEE0\\uDF76-\\uDF7A]|\\uD801[\\uDCA0-\\uDCA9]|\\uD802[\\uDE01-\\uDE03\\uDE05\\uDE06\\uDE0C-\\uDE0F\\uDE38-\\uDE3A\\uDE3F\\uDEE5\\uDEE6]|\\uD803[\\uDD24-\\uDD27\\uDD30-\\uDD39\\uDF46-\\uDF50]|\\uD804[\\uDC00-\\uDC02\\uDC38-\\uDC46\\uDC66-\\uDC6F\\uDC7F-\\uDC82\\uDCB0-\\uDCBA\\uDCF0-\\uDCF9\\uDD00-\\uDD02\\uDD27-\\uDD34\\uDD36-\\uDD3F\\uDD45\\uDD46\\uDD73\\uDD80-\\uDD82\\uDDB3-\\uDDC0\\uDDC9-\\uDDCC\\uDDD0-\\uDDD9\\uDE2C-\\uDE37\\uDE3E\\uDEDF-\\uDEEA\\uDEF0-\\uDEF9\\uDF00-\\uDF03\\uDF3B\\uDF3C\\uDF3E-\\uDF44\\uDF47\\uDF48\\uDF4B-\\uDF4D\\uDF57\\uDF62\\uDF63\\uDF66-\\uDF6C\\uDF70-\\uDF74]|\\uD805[\\uDC35-\\uDC46\\uDC50-\\uDC59\\uDC5E\\uDCB0-\\uDCC3\\uDCD0-\\uDCD9\\uDDAF-\\uDDB5\\uDDB8-\\uDDC0\\uDDDC\\uDDDD\\uDE30-\\uDE40\\uDE50-\\uDE59\\uDEAB-\\uDEB7\\uDEC0-\\uDEC9\\uDF1D-\\uDF2B\\uDF30-\\uDF39]|\\uD806[\\uDC2C-\\uDC3A\\uDCE0-\\uDCE9\\uDE01-\\uDE0A\\uDE33-\\uDE39\\uDE3B-\\uDE3E\\uDE47\\uDE51-\\uDE5B\\uDE8A-\\uDE99]|\\uD807[\\uDC2F-\\uDC36\\uDC38-\\uDC3F\\uDC50-\\uDC59\\uDC92-\\uDCA7\\uDCA9-\\uDCB6\\uDD31-\\uDD36\\uDD3A\\uDD3C\\uDD3D\\uDD3F-\\uDD45\\uDD47\\uDD50-\\uDD59\\uDD8A-\\uDD8E\\uDD90\\uDD91\\uDD93-\\uDD97\\uDDA0-\\uDDA9\\uDEF3-\\uDEF6]|\\uD81A[\\uDE60-\\uDE69\\uDEF0-\\uDEF4\\uDF30-\\uDF36\\uDF50-\\uDF59]|\\uD81B[\\uDF51-\\uDF7E\\uDF8F-\\uDF92]|\\uD82F[\\uDC9D\\uDC9E]|\\uD834[\\uDD65-\\uDD69\\uDD6D-\\uDD72\\uDD7B-\\uDD82\\uDD85-\\uDD8B\\uDDAA-\\uDDAD\\uDE42-\\uDE44]|\\uD835[\\uDFCE-\\uDFFF]|\\uD836[\\uDE00-\\uDE36\\uDE3B-\\uDE6C\\uDE75\\uDE84\\uDE9B-\\uDE9F\\uDEA1-\\uDEAF]|\\uD838[\\uDC00-\\uDC06\\uDC08-\\uDC18\\uDC1B-\\uDC21\\uDC23\\uDC24\\uDC26-\\uDC2A]|\\uD83A[\\uDCD0-\\uDCD6\\uDD44-\\uDD4A\\uDD50-\\uDD59]|\\uDB40[\\uDD00-\\uDDEF]/;\n\n return isIdentifierStart(ch) ||\n (ch >= 48 && ch <= 57) || // 0..9\n ((ch >= 0x80) && NonAsciiIdentifierPartOnly.test(fromCodePoint(ch)));\n }\n\n function parseIdentityEscape() {\n // IdentityEscape ::\n // [+U] SyntaxCharacter\n // [+U] /\n // [~U] SourceCharacterIdentityEscape[?N]\n // SourceCharacterIdentityEscape[?N] ::\n // [~N] SourceCharacter but not c\n // [+N] SourceCharacter but not one of c or k\n\n\n var tmp;\n var l = lookahead();\n if (\n (isUnicodeMode && /[\\^\\$\\.\\*\\+\\?\\(\\)\\\\\\[\\]\\{\\}\\|\\/]/.test(l)) ||\n (!isUnicodeMode && l !== \"c\")\n ) {\n if (l === \"k\" && features.lookbehind) {\n return null;\n }\n tmp = incr();\n return createEscaped('identifier', tmp.charCodeAt(0), tmp, 1);\n }\n\n return null;\n }\n\n function parseCharacterClass() {\n // CharacterClass ::\n // [ [lookahead ∉ {^}] ClassRanges ]\n // [ ^ ClassRanges ]\n\n var res, from = pos;\n if (res = matchReg(/^\\[\\^/)) {\n res = parseClassRanges();\n skip(']');\n return createCharacterClass(res, true, from, pos);\n } else if (match('[')) {\n res = parseClassRanges();\n skip(']');\n return createCharacterClass(res, false, from, pos);\n }\n\n return null;\n }\n\n function parseClassRanges() {\n // ClassRanges ::\n // [empty]\n // [~V] NonemptyClassRanges\n // [+V] ClassContents\n\n var res;\n if (current(']')) {\n // Empty array means nothing inside of the ClassRange.\n return { kind: 'union', body: [] };\n } else if (hasUnicodeSetFlag) {\n return parseClassContents();\n } else {\n res = parseNonemptyClassRanges();\n if (!res) {\n bail('nonEmptyClassRanges');\n }\n return { kind: 'union', body: res };\n }\n }\n\n function parseHelperClassRanges(atom) {\n var from, to, res, atomTo, dash;\n if (current('-') && !next(']')) {\n // ClassAtom - ClassAtom ClassRanges\n from = atom.range[0];\n dash = createCharacter(match('-'));\n\n atomTo = parseClassAtom();\n if (!atomTo) {\n bail('classAtom');\n }\n to = pos;\n\n // Parse the next class range if exists.\n var classRanges = parseClassRanges();\n if (!classRanges) {\n bail('classRanges');\n }\n\n // Check if both the from and atomTo have codePoints.\n if (!('codePoint' in atom) || !('codePoint' in atomTo)) {\n if (!isUnicodeMode) {\n // If not, don't create a range but treat them as\n // `atom` `-` `atom` instead.\n //\n // SEE: https://tc39.es/ecma262/#sec-regular-expression-patterns-semantics\n // NonemptyClassRanges::ClassAtom-ClassAtomClassRanges\n // CharacterRangeOrUnion\n res = [atom, dash, atomTo];\n } else {\n // With unicode flag, both sides must have codePoints if\n // one side has a codePoint.\n //\n // SEE: https://tc39.es/ecma262/#sec-patterns-static-semantics-early-errors\n // NonemptyClassRanges :: ClassAtom - ClassAtom ClassRanges\n bail('invalid character class');\n }\n } else {\n res = [createClassRange(atom, atomTo, from, to)];\n }\n\n if (classRanges.type === 'empty') {\n return res;\n }\n return res.concat(classRanges.body);\n }\n\n res = parseNonemptyClassRangesNoDash();\n if (!res) {\n bail('nonEmptyClassRangesNoDash');\n }\n\n return [atom].concat(res);\n }\n\n function parseNonemptyClassRanges() {\n // NonemptyClassRanges ::\n // ClassAtom\n // ClassAtom NonemptyClassRangesNoDash\n // ClassAtom - ClassAtom ClassRanges\n\n var atom = parseClassAtom();\n if (!atom) {\n bail('classAtom');\n }\n\n if (current(']')) {\n // ClassAtom\n return [atom];\n }\n\n // ClassAtom NonemptyClassRangesNoDash\n // ClassAtom - ClassAtom ClassRanges\n return parseHelperClassRanges(atom);\n }\n\n function parseNonemptyClassRangesNoDash() {\n // NonemptyClassRangesNoDash ::\n // ClassAtom\n // ClassAtomNoDash NonemptyClassRangesNoDash\n // ClassAtomNoDash - ClassAtom ClassRanges\n\n var res = parseClassAtom();\n if (!res) {\n bail('classAtom');\n }\n if (current(']')) {\n // ClassAtom\n return res;\n }\n\n // ClassAtomNoDash NonemptyClassRangesNoDash\n // ClassAtomNoDash - ClassAtom ClassRanges\n return parseHelperClassRanges(res);\n }\n\n function parseClassAtom() {\n // ClassAtom ::\n // -\n // ClassAtomNoDash\n if (match('-')) {\n return createCharacter('-');\n } else {\n return parseClassAtomNoDash();\n }\n }\n\n function parseClassAtomNoDash() {\n // ClassAtomNoDash ::\n // SourceCharacter but not one of \\ or ] or -\n // \\ ClassEscape\n\n var res;\n if (res = matchReg(/^[^\\\\\\]-]/)) {\n return createCharacter(res[0]);\n } else if (match('\\\\')) {\n res = parseClassEscape();\n if (!res) {\n bail('classEscape');\n }\n\n return parseUnicodeSurrogatePairEscape(res);\n }\n }\n\n function parseClassContents() {\n // ClassContents ::\n // ClassUnion\n // ClassIntersection\n // ClassSubtraction\n //\n // ClassUnion ::\n // ClassRange ClassUnion?\n // ClassOperand ClassUnion?\n //\n // ClassIntersection ::\n // ClassOperand && [lookahead ≠ &] ClassOperand\n // ClassIntersection && [lookahead ≠ &] ClassOperand\n //\n // ClassSubtraction ::\n // ClassOperand -- ClassOperand\n // ClassSubtraction -- ClassOperand\n\n var body = [];\n var kind;\n\n var operand = parseClassOperand(/* allowRanges*/ true);\n body.push(operand);\n\n if (operand.type === 'classRange') {\n kind = 'union';\n } else if (current('&')) {\n kind = 'intersection';\n } else if (current('-')) {\n kind = 'subtraction';\n } else {\n kind = 'union';\n }\n\n while (!current(']')) {\n if (kind === 'intersection') {\n skip('&');\n skip('&');\n if (current('&')) {\n bail('&& cannot be followed by &. Wrap it in brackets: &&[&].');\n }\n } else if (kind === 'subtraction') {\n skip('-');\n skip('-');\n }\n\n operand = parseClassOperand(/* allowRanges*/ kind === 'union');\n body.push(operand);\n }\n\n return { kind: kind, body: body };\n }\n\n function parseClassOperand(allowRanges) {\n // ClassOperand ::\n // ClassCharacter\n // ClassStrings\n // NestedClass\n //\n // NestedClass ::\n // [ [lookahead ≠ ^] ClassRanges[+U,+V] ]\n // [ ^ ClassRanges[+U,+V] ]\n // \\ CharacterClassEscape[+U, +V]\n //\n // ClassRange ::\n // ClassCharacter - ClassCharacter\n //\n // ClassCharacter ::\n // [lookahead ∉ ClassReservedDouble] SourceCharacter but not ClassSyntaxCharacter\n // \\ CharacterEscape[+U]\n // \\ ClassHalfOfDouble\n // \\ b\n //\n // ClassSyntaxCharacter ::\n // one of ( ) [ ] { } / - \\ |\n\n var from = pos;\n var start, res;\n\n if (match('\\\\')) {\n // ClassOperand ::\n // ...\n // ClassStrings\n // NestedClass\n //\n // NestedClass ::\n // ...\n // \\ CharacterClassEscape[+U, +V]\n if (res = parseClassEscape()) {\n start = res;\n } else if (res = parseClassCharacterEscapedHelper()) {\n return res;\n } else {\n bail('Invalid escape', '\\\\' + lookahead(), from);\n }\n } else if (res = parseClassCharacterUnescapedHelper()) {\n start = res;\n } else if (res = parseCharacterClass()) {\n // ClassOperand ::\n // ...\n // NestedClass\n //\n // NestedClass ::\n // [ [lookahead ≠ ^] ClassRanges[+U,+V] ]\n // [ ^ ClassRanges[+U,+V] ]\n // ...\n return res;\n } else {\n bail('Invalid character', lookahead());\n }\n\n if (allowRanges && current('-') && !next('-')) {\n skip('-');\n\n if (res = parseClassCharacter()) {\n // ClassRange ::\n // ClassCharacter - ClassCharacter\n return createClassRange(start, res, from, pos);\n }\n\n bail('Invalid range end', lookahead());\n }\n\n // ClassOperand ::\n // ClassCharacter\n // ...\n return start;\n }\n\n function parseClassCharacter() {\n // ClassCharacter ::\n // [lookahead ∉ ClassReservedDouble] SourceCharacter but not ClassSyntaxCharacter\n // \\ CharacterEscape[+U]\n // \\ ClassHalfOfDouble\n // \\ b\n\n if (match('\\\\')) {\n var res, from = pos;\n if (res = parseClassCharacterEscapedHelper()) {\n return res;\n } else {\n bail('Invalid escape', '\\\\' + lookahead(), from);\n }\n }\n\n return parseClassCharacterUnescapedHelper();\n }\n\n function parseClassCharacterUnescapedHelper() {\n // ClassCharacter ::\n // [lookahead ∉ ClassReservedDouble] SourceCharacter but not ClassSyntaxCharacter\n // ...\n\n var res;\n if (res = matchReg(/^[^()[\\]{}/\\-\\\\|]/)) {\n return createCharacter(res);\n }\n }\n\n function parseClassCharacterEscapedHelper() {\n // ClassCharacter ::\n // ...\n // \\ CharacterEscape[+U]\n // \\ ClassHalfOfDouble\n // \\ b\n\n var res;\n if (match('b')) {\n return createEscaped('singleEscape', 0x0008, '\\\\b');\n } else if (match('B')) {\n bail('\\\\B not possible inside of ClassContents', '', pos - 2);\n } else if (res = matchReg(/^[&\\-!#%,:;<=>@_`~]/)) {\n return createEscaped('identifier', res[0].codePointAt(0), res[0]);\n } else if (res = parseCharacterEscape()) {\n return res;\n } else {\n return null;\n }\n }\n\n function parseClassStrings() {\n // ClassStrings ::\n // \\q{ ClassString MoreClassStrings? }\n\n // When calling this function, \\q{ has already been consumed.\n var from = pos - 3;\n\n var res = [];\n do {\n res.push(parseClassString());\n } while (match('|'));\n\n skip('}');\n\n return createClassStrings(res, from, pos);\n }\n\n function parseClassString() {\n // ClassString ::\n // [empty]\n // NonEmptyClassString\n //\n // NonEmptyClassString ::\n // ClassCharacter NonEmptyClassString?\n\n var res = [], from = pos;\n var char;\n\n while (char = parseClassCharacter()) {\n res.push(char);\n }\n\n return createClassString(res, from, pos);\n }\n\n function bail(message, details, from, to) {\n from = from == null ? pos : from;\n to = to == null ? from : to;\n\n var contextStart = Math.max(0, from - 10);\n var contextEnd = Math.min(to + 10, str.length);\n\n // Output a bit of context and a line pointing to where our error is.\n //\n // We are assuming that there are no actual newlines in the content as this is a regular expression.\n var context = ' ' + str.substring(contextStart, contextEnd);\n var pointer = ' ' + new Array(from - contextStart + 1).join(' ') + '^';\n\n throw SyntaxError(message + ' at position ' + from + (details ? ': ' + details : '') + '\\n' + context + '\\n' + pointer);\n }\n\n var backrefDenied = [];\n var closedCaptureCounter = 0;\n var firstIteration = true;\n var shouldReparse = false;\n var hasUnicodeFlag = (flags || \"\").indexOf(\"u\") !== -1;\n var hasUnicodeSetFlag = (flags || \"\").indexOf(\"v\") !== -1;\n var isUnicodeMode = hasUnicodeFlag || hasUnicodeSetFlag;\n var pos = 0;\n\n if (hasUnicodeSetFlag && !features.unicodeSet) {\n throw new Error('The \"v\" flag is only supported when the .unicodeSet option is enabled.');\n }\n\n if (hasUnicodeFlag && hasUnicodeSetFlag) {\n throw new Error('The \"u\" and \"v\" flags are mutually exclusive.');\n }\n\n // Convert the input to a string and treat the empty string special.\n str = String(str);\n if (str === '') {\n str = '(?:)';\n }\n\n var result = parseDisjunction();\n\n if (result.range[1] !== str.length) {\n bail('Could not parse entire input - got stuck', '', result.range[1]);\n }\n\n // The spec requires to interpret the `\\2` in `/\\2()()/` as backreference.\n // As the parser collects the number of capture groups as the string is\n // parsed it is impossible to make these decisions at the point when the\n // `\\2` is handled. In case the local decision turns out to be wrong after\n // the parsing has finished, the input string is parsed a second time with\n // the total number of capture groups set.\n //\n // SEE: https://github.com/jviereck/regjsparser/issues/70\n shouldReparse = shouldReparse || backrefDenied.some(function (ref) {\n return ref <= closedCaptureCounter;\n });\n if (shouldReparse) {\n // Parse the input a second time.\n pos = 0;\n firstIteration = false;\n return parseDisjunction();\n }\n\n return result;\n }\n\n var regjsparser = {\n parse: parse\n };\n\n if (typeof module !== 'undefined' && module.exports) {\n module.exports = regjsparser;\n } else {\n window.regjsparser = regjsparser;\n }\n\n}());\n","module.exports = new Set([\n\t// Non-binary properties:\n\t'General_Category',\n\t'Script',\n\t'Script_Extensions',\n\t// Binary properties:\n\t'Alphabetic',\n\t'Any',\n\t'ASCII',\n\t'ASCII_Hex_Digit',\n\t'Assigned',\n\t'Bidi_Control',\n\t'Bidi_Mirrored',\n\t'Case_Ignorable',\n\t'Cased',\n\t'Changes_When_Casefolded',\n\t'Changes_When_Casemapped',\n\t'Changes_When_Lowercased',\n\t'Changes_When_NFKC_Casefolded',\n\t'Changes_When_Titlecased',\n\t'Changes_When_Uppercased',\n\t'Dash',\n\t'Default_Ignorable_Code_Point',\n\t'Deprecated',\n\t'Diacritic',\n\t'Emoji',\n\t'Emoji_Component',\n\t'Emoji_Modifier',\n\t'Emoji_Modifier_Base',\n\t'Emoji_Presentation',\n\t'Extended_Pictographic',\n\t'Extender',\n\t'Grapheme_Base',\n\t'Grapheme_Extend',\n\t'Hex_Digit',\n\t'ID_Continue',\n\t'ID_Start',\n\t'Ideographic',\n\t'IDS_Binary_Operator',\n\t'IDS_Trinary_Operator',\n\t'Join_Control',\n\t'Logical_Order_Exception',\n\t'Lowercase',\n\t'Math',\n\t'Noncharacter_Code_Point',\n\t'Pattern_Syntax',\n\t'Pattern_White_Space',\n\t'Quotation_Mark',\n\t'Radical',\n\t'Regional_Indicator',\n\t'Sentence_Terminal',\n\t'Soft_Dotted',\n\t'Terminal_Punctuation',\n\t'Unified_Ideograph',\n\t'Uppercase',\n\t'Variation_Selector',\n\t'White_Space',\n\t'XID_Continue',\n\t'XID_Start'\n]);\n","// Generated using `npm run build`. Do not edit!\nmodule.exports = new Map([\n\t['scx', 'Script_Extensions'],\n\t['sc', 'Script'],\n\t['gc', 'General_Category'],\n\t['AHex', 'ASCII_Hex_Digit'],\n\t['Alpha', 'Alphabetic'],\n\t['Bidi_C', 'Bidi_Control'],\n\t['Bidi_M', 'Bidi_Mirrored'],\n\t['Cased', 'Cased'],\n\t['CI', 'Case_Ignorable'],\n\t['CWCF', 'Changes_When_Casefolded'],\n\t['CWCM', 'Changes_When_Casemapped'],\n\t['CWKCF', 'Changes_When_NFKC_Casefolded'],\n\t['CWL', 'Changes_When_Lowercased'],\n\t['CWT', 'Changes_When_Titlecased'],\n\t['CWU', 'Changes_When_Uppercased'],\n\t['Dash', 'Dash'],\n\t['Dep', 'Deprecated'],\n\t['DI', 'Default_Ignorable_Code_Point'],\n\t['Dia', 'Diacritic'],\n\t['EBase', 'Emoji_Modifier_Base'],\n\t['EComp', 'Emoji_Component'],\n\t['EMod', 'Emoji_Modifier'],\n\t['Emoji', 'Emoji'],\n\t['EPres', 'Emoji_Presentation'],\n\t['Ext', 'Extender'],\n\t['ExtPict', 'Extended_Pictographic'],\n\t['Gr_Base', 'Grapheme_Base'],\n\t['Gr_Ext', 'Grapheme_Extend'],\n\t['Hex', 'Hex_Digit'],\n\t['IDC', 'ID_Continue'],\n\t['Ideo', 'Ideographic'],\n\t['IDS', 'ID_Start'],\n\t['IDSB', 'IDS_Binary_Operator'],\n\t['IDST', 'IDS_Trinary_Operator'],\n\t['Join_C', 'Join_Control'],\n\t['LOE', 'Logical_Order_Exception'],\n\t['Lower', 'Lowercase'],\n\t['Math', 'Math'],\n\t['NChar', 'Noncharacter_Code_Point'],\n\t['Pat_Syn', 'Pattern_Syntax'],\n\t['Pat_WS', 'Pattern_White_Space'],\n\t['QMark', 'Quotation_Mark'],\n\t['Radical', 'Radical'],\n\t['RI', 'Regional_Indicator'],\n\t['SD', 'Soft_Dotted'],\n\t['STerm', 'Sentence_Terminal'],\n\t['Term', 'Terminal_Punctuation'],\n\t['UIdeo', 'Unified_Ideograph'],\n\t['Upper', 'Uppercase'],\n\t['VS', 'Variation_Selector'],\n\t['WSpace', 'White_Space'],\n\t['space', 'White_Space'],\n\t['XIDC', 'XID_Continue'],\n\t['XIDS', 'XID_Start']\n]);\n","'use strict';\n\nconst canonicalProperties = require('unicode-canonical-property-names-ecmascript');\nconst propertyAliases = require('unicode-property-aliases-ecmascript');\n\nconst matchProperty = function(property) {\n\tif (canonicalProperties.has(property)) {\n\t\treturn property;\n\t}\n\tif (propertyAliases.has(property)) {\n\t\treturn propertyAliases.get(property);\n\t}\n\tthrow new Error(`Unknown property: ${ property }`);\n};\n\nmodule.exports = matchProperty;\n","'use strict';\n\nconst propertyToValueAliases = require('./data/mappings.js');\n\nconst matchPropertyValue = function(property, value) {\n\tconst aliasToValue = propertyToValueAliases.get(property);\n\tif (!aliasToValue) {\n\t\tthrow new Error(`Unknown property \\`${ property }\\`.`);\n\t}\n\tconst canonicalValue = aliasToValue.get(value);\n\tif (canonicalValue) {\n\t\treturn canonicalValue;\n\t}\n\tthrow new Error(\n\t\t`Unknown value \\`${ value }\\` for property \\`${ property }\\`.`\n\t);\n};\n\nmodule.exports = matchPropertyValue;\n","module.exports = new Map([\n\t['General_Category', new Map([\n\t\t['C', 'Other'],\n\t\t['Cc', 'Control'],\n\t\t['cntrl', 'Control'],\n\t\t['Cf', 'Format'],\n\t\t['Cn', 'Unassigned'],\n\t\t['Co', 'Private_Use'],\n\t\t['Cs', 'Surrogate'],\n\t\t['L', 'Letter'],\n\t\t['LC', 'Cased_Letter'],\n\t\t['Ll', 'Lowercase_Letter'],\n\t\t['Lm', 'Modifier_Letter'],\n\t\t['Lo', 'Other_Letter'],\n\t\t['Lt', 'Titlecase_Letter'],\n\t\t['Lu', 'Uppercase_Letter'],\n\t\t['M', 'Mark'],\n\t\t['Combining_Mark', 'Mark'],\n\t\t['Mc', 'Spacing_Mark'],\n\t\t['Me', 'Enclosing_Mark'],\n\t\t['Mn', 'Nonspacing_Mark'],\n\t\t['N', 'Number'],\n\t\t['Nd', 'Decimal_Number'],\n\t\t['digit', 'Decimal_Number'],\n\t\t['Nl', 'Letter_Number'],\n\t\t['No', 'Other_Number'],\n\t\t['P', 'Punctuation'],\n\t\t['punct', 'Punctuation'],\n\t\t['Pc', 'Connector_Punctuation'],\n\t\t['Pd', 'Dash_Punctuation'],\n\t\t['Pe', 'Close_Punctuation'],\n\t\t['Pf', 'Final_Punctuation'],\n\t\t['Pi', 'Initial_Punctuation'],\n\t\t['Po', 'Other_Punctuation'],\n\t\t['Ps', 'Open_Punctuation'],\n\t\t['S', 'Symbol'],\n\t\t['Sc', 'Currency_Symbol'],\n\t\t['Sk', 'Modifier_Symbol'],\n\t\t['Sm', 'Math_Symbol'],\n\t\t['So', 'Other_Symbol'],\n\t\t['Z', 'Separator'],\n\t\t['Zl', 'Line_Separator'],\n\t\t['Zp', 'Paragraph_Separator'],\n\t\t['Zs', 'Space_Separator'],\n\t\t['Other', 'Other'],\n\t\t['Control', 'Control'],\n\t\t['Format', 'Format'],\n\t\t['Unassigned', 'Unassigned'],\n\t\t['Private_Use', 'Private_Use'],\n\t\t['Surrogate', 'Surrogate'],\n\t\t['Letter', 'Letter'],\n\t\t['Cased_Letter', 'Cased_Letter'],\n\t\t['Lowercase_Letter', 'Lowercase_Letter'],\n\t\t['Modifier_Letter', 'Modifier_Letter'],\n\t\t['Other_Letter', 'Other_Letter'],\n\t\t['Titlecase_Letter', 'Titlecase_Letter'],\n\t\t['Uppercase_Letter', 'Uppercase_Letter'],\n\t\t['Mark', 'Mark'],\n\t\t['Spacing_Mark', 'Spacing_Mark'],\n\t\t['Enclosing_Mark', 'Enclosing_Mark'],\n\t\t['Nonspacing_Mark', 'Nonspacing_Mark'],\n\t\t['Number', 'Number'],\n\t\t['Decimal_Number', 'Decimal_Number'],\n\t\t['Letter_Number', 'Letter_Number'],\n\t\t['Other_Number', 'Other_Number'],\n\t\t['Punctuation', 'Punctuation'],\n\t\t['Connector_Punctuation', 'Connector_Punctuation'],\n\t\t['Dash_Punctuation', 'Dash_Punctuation'],\n\t\t['Close_Punctuation', 'Close_Punctuation'],\n\t\t['Final_Punctuation', 'Final_Punctuation'],\n\t\t['Initial_Punctuation', 'Initial_Punctuation'],\n\t\t['Other_Punctuation', 'Other_Punctuation'],\n\t\t['Open_Punctuation', 'Open_Punctuation'],\n\t\t['Symbol', 'Symbol'],\n\t\t['Currency_Symbol', 'Currency_Symbol'],\n\t\t['Modifier_Symbol', 'Modifier_Symbol'],\n\t\t['Math_Symbol', 'Math_Symbol'],\n\t\t['Other_Symbol', 'Other_Symbol'],\n\t\t['Separator', 'Separator'],\n\t\t['Line_Separator', 'Line_Separator'],\n\t\t['Paragraph_Separator', 'Paragraph_Separator'],\n\t\t['Space_Separator', 'Space_Separator']\n\t])],\n\t['Script', new Map([\n\t\t['Adlm', 'Adlam'],\n\t\t['Aghb', 'Caucasian_Albanian'],\n\t\t['Ahom', 'Ahom'],\n\t\t['Arab', 'Arabic'],\n\t\t['Armi', 'Imperial_Aramaic'],\n\t\t['Armn', 'Armenian'],\n\t\t['Avst', 'Avestan'],\n\t\t['Bali', 'Balinese'],\n\t\t['Bamu', 'Bamum'],\n\t\t['Bass', 'Bassa_Vah'],\n\t\t['Batk', 'Batak'],\n\t\t['Beng', 'Bengali'],\n\t\t['Bhks', 'Bhaiksuki'],\n\t\t['Bopo', 'Bopomofo'],\n\t\t['Brah', 'Brahmi'],\n\t\t['Brai', 'Braille'],\n\t\t['Bugi', 'Buginese'],\n\t\t['Buhd', 'Buhid'],\n\t\t['Cakm', 'Chakma'],\n\t\t['Cans', 'Canadian_Aboriginal'],\n\t\t['Cari', 'Carian'],\n\t\t['Cham', 'Cham'],\n\t\t['Cher', 'Cherokee'],\n\t\t['Chrs', 'Chorasmian'],\n\t\t['Copt', 'Coptic'],\n\t\t['Qaac', 'Coptic'],\n\t\t['Cpmn', 'Cypro_Minoan'],\n\t\t['Cprt', 'Cypriot'],\n\t\t['Cyrl', 'Cyrillic'],\n\t\t['Deva', 'Devanagari'],\n\t\t['Diak', 'Dives_Akuru'],\n\t\t['Dogr', 'Dogra'],\n\t\t['Dsrt', 'Deseret'],\n\t\t['Dupl', 'Duployan'],\n\t\t['Egyp', 'Egyptian_Hieroglyphs'],\n\t\t['Elba', 'Elbasan'],\n\t\t['Elym', 'Elymaic'],\n\t\t['Ethi', 'Ethiopic'],\n\t\t['Geor', 'Georgian'],\n\t\t['Glag', 'Glagolitic'],\n\t\t['Gong', 'Gunjala_Gondi'],\n\t\t['Gonm', 'Masaram_Gondi'],\n\t\t['Goth', 'Gothic'],\n\t\t['Gran', 'Grantha'],\n\t\t['Grek', 'Greek'],\n\t\t['Gujr', 'Gujarati'],\n\t\t['Guru', 'Gurmukhi'],\n\t\t['Hang', 'Hangul'],\n\t\t['Hani', 'Han'],\n\t\t['Hano', 'Hanunoo'],\n\t\t['Hatr', 'Hatran'],\n\t\t['Hebr', 'Hebrew'],\n\t\t['Hira', 'Hiragana'],\n\t\t['Hluw', 'Anatolian_Hieroglyphs'],\n\t\t['Hmng', 'Pahawh_Hmong'],\n\t\t['Hmnp', 'Nyiakeng_Puachue_Hmong'],\n\t\t['Hrkt', 'Katakana_Or_Hiragana'],\n\t\t['Hung', 'Old_Hungarian'],\n\t\t['Ital', 'Old_Italic'],\n\t\t['Java', 'Javanese'],\n\t\t['Kali', 'Kayah_Li'],\n\t\t['Kana', 'Katakana'],\n\t\t['Kawi', 'Kawi'],\n\t\t['Khar', 'Kharoshthi'],\n\t\t['Khmr', 'Khmer'],\n\t\t['Khoj', 'Khojki'],\n\t\t['Kits', 'Khitan_Small_Script'],\n\t\t['Knda', 'Kannada'],\n\t\t['Kthi', 'Kaithi'],\n\t\t['Lana', 'Tai_Tham'],\n\t\t['Laoo', 'Lao'],\n\t\t['Latn', 'Latin'],\n\t\t['Lepc', 'Lepcha'],\n\t\t['Limb', 'Limbu'],\n\t\t['Lina', 'Linear_A'],\n\t\t['Linb', 'Linear_B'],\n\t\t['Lisu', 'Lisu'],\n\t\t['Lyci', 'Lycian'],\n\t\t['Lydi', 'Lydian'],\n\t\t['Mahj', 'Mahajani'],\n\t\t['Maka', 'Makasar'],\n\t\t['Mand', 'Mandaic'],\n\t\t['Mani', 'Manichaean'],\n\t\t['Marc', 'Marchen'],\n\t\t['Medf', 'Medefaidrin'],\n\t\t['Mend', 'Mende_Kikakui'],\n\t\t['Merc', 'Meroitic_Cursive'],\n\t\t['Mero', 'Meroitic_Hieroglyphs'],\n\t\t['Mlym', 'Malayalam'],\n\t\t['Modi', 'Modi'],\n\t\t['Mong', 'Mongolian'],\n\t\t['Mroo', 'Mro'],\n\t\t['Mtei', 'Meetei_Mayek'],\n\t\t['Mult', 'Multani'],\n\t\t['Mymr', 'Myanmar'],\n\t\t['Nagm', 'Nag_Mundari'],\n\t\t['Nand', 'Nandinagari'],\n\t\t['Narb', 'Old_North_Arabian'],\n\t\t['Nbat', 'Nabataean'],\n\t\t['Newa', 'Newa'],\n\t\t['Nkoo', 'Nko'],\n\t\t['Nshu', 'Nushu'],\n\t\t['Ogam', 'Ogham'],\n\t\t['Olck', 'Ol_Chiki'],\n\t\t['Orkh', 'Old_Turkic'],\n\t\t['Orya', 'Oriya'],\n\t\t['Osge', 'Osage'],\n\t\t['Osma', 'Osmanya'],\n\t\t['Ougr', 'Old_Uyghur'],\n\t\t['Palm', 'Palmyrene'],\n\t\t['Pauc', 'Pau_Cin_Hau'],\n\t\t['Perm', 'Old_Permic'],\n\t\t['Phag', 'Phags_Pa'],\n\t\t['Phli', 'Inscriptional_Pahlavi'],\n\t\t['Phlp', 'Psalter_Pahlavi'],\n\t\t['Phnx', 'Phoenician'],\n\t\t['Plrd', 'Miao'],\n\t\t['Prti', 'Inscriptional_Parthian'],\n\t\t['Rjng', 'Rejang'],\n\t\t['Rohg', 'Hanifi_Rohingya'],\n\t\t['Runr', 'Runic'],\n\t\t['Samr', 'Samaritan'],\n\t\t['Sarb', 'Old_South_Arabian'],\n\t\t['Saur', 'Saurashtra'],\n\t\t['Sgnw', 'SignWriting'],\n\t\t['Shaw', 'Shavian'],\n\t\t['Shrd', 'Sharada'],\n\t\t['Sidd', 'Siddham'],\n\t\t['Sind', 'Khudawadi'],\n\t\t['Sinh', 'Sinhala'],\n\t\t['Sogd', 'Sogdian'],\n\t\t['Sogo', 'Old_Sogdian'],\n\t\t['Sora', 'Sora_Sompeng'],\n\t\t['Soyo', 'Soyombo'],\n\t\t['Sund', 'Sundanese'],\n\t\t['Sylo', 'Syloti_Nagri'],\n\t\t['Syrc', 'Syriac'],\n\t\t['Tagb', 'Tagbanwa'],\n\t\t['Takr', 'Takri'],\n\t\t['Tale', 'Tai_Le'],\n\t\t['Talu', 'New_Tai_Lue'],\n\t\t['Taml', 'Tamil'],\n\t\t['Tang', 'Tangut'],\n\t\t['Tavt', 'Tai_Viet'],\n\t\t['Telu', 'Telugu'],\n\t\t['Tfng', 'Tifinagh'],\n\t\t['Tglg', 'Tagalog'],\n\t\t['Thaa', 'Thaana'],\n\t\t['Thai', 'Thai'],\n\t\t['Tibt', 'Tibetan'],\n\t\t['Tirh', 'Tirhuta'],\n\t\t['Tnsa', 'Tangsa'],\n\t\t['Toto', 'Toto'],\n\t\t['Ugar', 'Ugaritic'],\n\t\t['Vaii', 'Vai'],\n\t\t['Vith', 'Vithkuqi'],\n\t\t['Wara', 'Warang_Citi'],\n\t\t['Wcho', 'Wancho'],\n\t\t['Xpeo', 'Old_Persian'],\n\t\t['Xsux', 'Cuneiform'],\n\t\t['Yezi', 'Yezidi'],\n\t\t['Yiii', 'Yi'],\n\t\t['Zanb', 'Zanabazar_Square'],\n\t\t['Zinh', 'Inherited'],\n\t\t['Qaai', 'Inherited'],\n\t\t['Zyyy', 'Common'],\n\t\t['Zzzz', 'Unknown'],\n\t\t['Adlam', 'Adlam'],\n\t\t['Caucasian_Albanian', 'Caucasian_Albanian'],\n\t\t['Arabic', 'Arabic'],\n\t\t['Imperial_Aramaic', 'Imperial_Aramaic'],\n\t\t['Armenian', 'Armenian'],\n\t\t['Avestan', 'Avestan'],\n\t\t['Balinese', 'Balinese'],\n\t\t['Bamum', 'Bamum'],\n\t\t['Bassa_Vah', 'Bassa_Vah'],\n\t\t['Batak', 'Batak'],\n\t\t['Bengali', 'Bengali'],\n\t\t['Bhaiksuki', 'Bhaiksuki'],\n\t\t['Bopomofo', 'Bopomofo'],\n\t\t['Brahmi', 'Brahmi'],\n\t\t['Braille', 'Braille'],\n\t\t['Buginese', 'Buginese'],\n\t\t['Buhid', 'Buhid'],\n\t\t['Chakma', 'Chakma'],\n\t\t['Canadian_Aboriginal', 'Canadian_Aboriginal'],\n\t\t['Carian', 'Carian'],\n\t\t['Cherokee', 'Cherokee'],\n\t\t['Chorasmian', 'Chorasmian'],\n\t\t['Coptic', 'Coptic'],\n\t\t['Cypro_Minoan', 'Cypro_Minoan'],\n\t\t['Cypriot', 'Cypriot'],\n\t\t['Cyrillic', 'Cyrillic'],\n\t\t['Devanagari', 'Devanagari'],\n\t\t['Dives_Akuru', 'Dives_Akuru'],\n\t\t['Dogra', 'Dogra'],\n\t\t['Deseret', 'Deseret'],\n\t\t['Duployan', 'Duployan'],\n\t\t['Egyptian_Hieroglyphs', 'Egyptian_Hieroglyphs'],\n\t\t['Elbasan', 'Elbasan'],\n\t\t['Elymaic', 'Elymaic'],\n\t\t['Ethiopic', 'Ethiopic'],\n\t\t['Georgian', 'Georgian'],\n\t\t['Glagolitic', 'Glagolitic'],\n\t\t['Gunjala_Gondi', 'Gunjala_Gondi'],\n\t\t['Masaram_Gondi', 'Masaram_Gondi'],\n\t\t['Gothic', 'Gothic'],\n\t\t['Grantha', 'Grantha'],\n\t\t['Greek', 'Greek'],\n\t\t['Gujarati', 'Gujarati'],\n\t\t['Gurmukhi', 'Gurmukhi'],\n\t\t['Hangul', 'Hangul'],\n\t\t['Han', 'Han'],\n\t\t['Hanunoo', 'Hanunoo'],\n\t\t['Hatran', 'Hatran'],\n\t\t['Hebrew', 'Hebrew'],\n\t\t['Hiragana', 'Hiragana'],\n\t\t['Anatolian_Hieroglyphs', 'Anatolian_Hieroglyphs'],\n\t\t['Pahawh_Hmong', 'Pahawh_Hmong'],\n\t\t['Nyiakeng_Puachue_Hmong', 'Nyiakeng_Puachue_Hmong'],\n\t\t['Katakana_Or_Hiragana', 'Katakana_Or_Hiragana'],\n\t\t['Old_Hungarian', 'Old_Hungarian'],\n\t\t['Old_Italic', 'Old_Italic'],\n\t\t['Javanese', 'Javanese'],\n\t\t['Kayah_Li', 'Kayah_Li'],\n\t\t['Katakana', 'Katakana'],\n\t\t['Kharoshthi', 'Kharoshthi'],\n\t\t['Khmer', 'Khmer'],\n\t\t['Khojki', 'Khojki'],\n\t\t['Khitan_Small_Script', 'Khitan_Small_Script'],\n\t\t['Kannada', 'Kannada'],\n\t\t['Kaithi', 'Kaithi'],\n\t\t['Tai_Tham', 'Tai_Tham'],\n\t\t['Lao', 'Lao'],\n\t\t['Latin', 'Latin'],\n\t\t['Lepcha', 'Lepcha'],\n\t\t['Limbu', 'Limbu'],\n\t\t['Linear_A', 'Linear_A'],\n\t\t['Linear_B', 'Linear_B'],\n\t\t['Lycian', 'Lycian'],\n\t\t['Lydian', 'Lydian'],\n\t\t['Mahajani', 'Mahajani'],\n\t\t['Makasar', 'Makasar'],\n\t\t['Mandaic', 'Mandaic'],\n\t\t['Manichaean', 'Manichaean'],\n\t\t['Marchen', 'Marchen'],\n\t\t['Medefaidrin', 'Medefaidrin'],\n\t\t['Mende_Kikakui', 'Mende_Kikakui'],\n\t\t['Meroitic_Cursive', 'Meroitic_Cursive'],\n\t\t['Meroitic_Hieroglyphs', 'Meroitic_Hieroglyphs'],\n\t\t['Malayalam', 'Malayalam'],\n\t\t['Mongolian', 'Mongolian'],\n\t\t['Mro', 'Mro'],\n\t\t['Meetei_Mayek', 'Meetei_Mayek'],\n\t\t['Multani', 'Multani'],\n\t\t['Myanmar', 'Myanmar'],\n\t\t['Nag_Mundari', 'Nag_Mundari'],\n\t\t['Nandinagari', 'Nandinagari'],\n\t\t['Old_North_Arabian', 'Old_North_Arabian'],\n\t\t['Nabataean', 'Nabataean'],\n\t\t['Nko', 'Nko'],\n\t\t['Nushu', 'Nushu'],\n\t\t['Ogham', 'Ogham'],\n\t\t['Ol_Chiki', 'Ol_Chiki'],\n\t\t['Old_Turkic', 'Old_Turkic'],\n\t\t['Oriya', 'Oriya'],\n\t\t['Osage', 'Osage'],\n\t\t['Osmanya', 'Osmanya'],\n\t\t['Old_Uyghur', 'Old_Uyghur'],\n\t\t['Palmyrene', 'Palmyrene'],\n\t\t['Pau_Cin_Hau', 'Pau_Cin_Hau'],\n\t\t['Old_Permic', 'Old_Permic'],\n\t\t['Phags_Pa', 'Phags_Pa'],\n\t\t['Inscriptional_Pahlavi', 'Inscriptional_Pahlavi'],\n\t\t['Psalter_Pahlavi', 'Psalter_Pahlavi'],\n\t\t['Phoenician', 'Phoenician'],\n\t\t['Miao', 'Miao'],\n\t\t['Inscriptional_Parthian', 'Inscriptional_Parthian'],\n\t\t['Rejang', 'Rejang'],\n\t\t['Hanifi_Rohingya', 'Hanifi_Rohingya'],\n\t\t['Runic', 'Runic'],\n\t\t['Samaritan', 'Samaritan'],\n\t\t['Old_South_Arabian', 'Old_South_Arabian'],\n\t\t['Saurashtra', 'Saurashtra'],\n\t\t['SignWriting', 'SignWriting'],\n\t\t['Shavian', 'Shavian'],\n\t\t['Sharada', 'Sharada'],\n\t\t['Siddham', 'Siddham'],\n\t\t['Khudawadi', 'Khudawadi'],\n\t\t['Sinhala', 'Sinhala'],\n\t\t['Sogdian', 'Sogdian'],\n\t\t['Old_Sogdian', 'Old_Sogdian'],\n\t\t['Sora_Sompeng', 'Sora_Sompeng'],\n\t\t['Soyombo', 'Soyombo'],\n\t\t['Sundanese', 'Sundanese'],\n\t\t['Syloti_Nagri', 'Syloti_Nagri'],\n\t\t['Syriac', 'Syriac'],\n\t\t['Tagbanwa', 'Tagbanwa'],\n\t\t['Takri', 'Takri'],\n\t\t['Tai_Le', 'Tai_Le'],\n\t\t['New_Tai_Lue', 'New_Tai_Lue'],\n\t\t['Tamil', 'Tamil'],\n\t\t['Tangut', 'Tangut'],\n\t\t['Tai_Viet', 'Tai_Viet'],\n\t\t['Telugu', 'Telugu'],\n\t\t['Tifinagh', 'Tifinagh'],\n\t\t['Tagalog', 'Tagalog'],\n\t\t['Thaana', 'Thaana'],\n\t\t['Tibetan', 'Tibetan'],\n\t\t['Tirhuta', 'Tirhuta'],\n\t\t['Tangsa', 'Tangsa'],\n\t\t['Ugaritic', 'Ugaritic'],\n\t\t['Vai', 'Vai'],\n\t\t['Vithkuqi', 'Vithkuqi'],\n\t\t['Warang_Citi', 'Warang_Citi'],\n\t\t['Wancho', 'Wancho'],\n\t\t['Old_Persian', 'Old_Persian'],\n\t\t['Cuneiform', 'Cuneiform'],\n\t\t['Yezidi', 'Yezidi'],\n\t\t['Yi', 'Yi'],\n\t\t['Zanabazar_Square', 'Zanabazar_Square'],\n\t\t['Inherited', 'Inherited'],\n\t\t['Common', 'Common'],\n\t\t['Unknown', 'Unknown']\n\t])],\n\t['Script_Extensions', new Map([\n\t\t['Adlm', 'Adlam'],\n\t\t['Aghb', 'Caucasian_Albanian'],\n\t\t['Ahom', 'Ahom'],\n\t\t['Arab', 'Arabic'],\n\t\t['Armi', 'Imperial_Aramaic'],\n\t\t['Armn', 'Armenian'],\n\t\t['Avst', 'Avestan'],\n\t\t['Bali', 'Balinese'],\n\t\t['Bamu', 'Bamum'],\n\t\t['Bass', 'Bassa_Vah'],\n\t\t['Batk', 'Batak'],\n\t\t['Beng', 'Bengali'],\n\t\t['Bhks', 'Bhaiksuki'],\n\t\t['Bopo', 'Bopomofo'],\n\t\t['Brah', 'Brahmi'],\n\t\t['Brai', 'Braille'],\n\t\t['Bugi', 'Buginese'],\n\t\t['Buhd', 'Buhid'],\n\t\t['Cakm', 'Chakma'],\n\t\t['Cans', 'Canadian_Aboriginal'],\n\t\t['Cari', 'Carian'],\n\t\t['Cham', 'Cham'],\n\t\t['Cher', 'Cherokee'],\n\t\t['Chrs', 'Chorasmian'],\n\t\t['Copt', 'Coptic'],\n\t\t['Qaac', 'Coptic'],\n\t\t['Cpmn', 'Cypro_Minoan'],\n\t\t['Cprt', 'Cypriot'],\n\t\t['Cyrl', 'Cyrillic'],\n\t\t['Deva', 'Devanagari'],\n\t\t['Diak', 'Dives_Akuru'],\n\t\t['Dogr', 'Dogra'],\n\t\t['Dsrt', 'Deseret'],\n\t\t['Dupl', 'Duployan'],\n\t\t['Egyp', 'Egyptian_Hieroglyphs'],\n\t\t['Elba', 'Elbasan'],\n\t\t['Elym', 'Elymaic'],\n\t\t['Ethi', 'Ethiopic'],\n\t\t['Geor', 'Georgian'],\n\t\t['Glag', 'Glagolitic'],\n\t\t['Gong', 'Gunjala_Gondi'],\n\t\t['Gonm', 'Masaram_Gondi'],\n\t\t['Goth', 'Gothic'],\n\t\t['Gran', 'Grantha'],\n\t\t['Grek', 'Greek'],\n\t\t['Gujr', 'Gujarati'],\n\t\t['Guru', 'Gurmukhi'],\n\t\t['Hang', 'Hangul'],\n\t\t['Hani', 'Han'],\n\t\t['Hano', 'Hanunoo'],\n\t\t['Hatr', 'Hatran'],\n\t\t['Hebr', 'Hebrew'],\n\t\t['Hira', 'Hiragana'],\n\t\t['Hluw', 'Anatolian_Hieroglyphs'],\n\t\t['Hmng', 'Pahawh_Hmong'],\n\t\t['Hmnp', 'Nyiakeng_Puachue_Hmong'],\n\t\t['Hrkt', 'Katakana_Or_Hiragana'],\n\t\t['Hung', 'Old_Hungarian'],\n\t\t['Ital', 'Old_Italic'],\n\t\t['Java', 'Javanese'],\n\t\t['Kali', 'Kayah_Li'],\n\t\t['Kana', 'Katakana'],\n\t\t['Kawi', 'Kawi'],\n\t\t['Khar', 'Kharoshthi'],\n\t\t['Khmr', 'Khmer'],\n\t\t['Khoj', 'Khojki'],\n\t\t['Kits', 'Khitan_Small_Script'],\n\t\t['Knda', 'Kannada'],\n\t\t['Kthi', 'Kaithi'],\n\t\t['Lana', 'Tai_Tham'],\n\t\t['Laoo', 'Lao'],\n\t\t['Latn', 'Latin'],\n\t\t['Lepc', 'Lepcha'],\n\t\t['Limb', 'Limbu'],\n\t\t['Lina', 'Linear_A'],\n\t\t['Linb', 'Linear_B'],\n\t\t['Lisu', 'Lisu'],\n\t\t['Lyci', 'Lycian'],\n\t\t['Lydi', 'Lydian'],\n\t\t['Mahj', 'Mahajani'],\n\t\t['Maka', 'Makasar'],\n\t\t['Mand', 'Mandaic'],\n\t\t['Mani', 'Manichaean'],\n\t\t['Marc', 'Marchen'],\n\t\t['Medf', 'Medefaidrin'],\n\t\t['Mend', 'Mende_Kikakui'],\n\t\t['Merc', 'Meroitic_Cursive'],\n\t\t['Mero', 'Meroitic_Hieroglyphs'],\n\t\t['Mlym', 'Malayalam'],\n\t\t['Modi', 'Modi'],\n\t\t['Mong', 'Mongolian'],\n\t\t['Mroo', 'Mro'],\n\t\t['Mtei', 'Meetei_Mayek'],\n\t\t['Mult', 'Multani'],\n\t\t['Mymr', 'Myanmar'],\n\t\t['Nagm', 'Nag_Mundari'],\n\t\t['Nand', 'Nandinagari'],\n\t\t['Narb', 'Old_North_Arabian'],\n\t\t['Nbat', 'Nabataean'],\n\t\t['Newa', 'Newa'],\n\t\t['Nkoo', 'Nko'],\n\t\t['Nshu', 'Nushu'],\n\t\t['Ogam', 'Ogham'],\n\t\t['Olck', 'Ol_Chiki'],\n\t\t['Orkh', 'Old_Turkic'],\n\t\t['Orya', 'Oriya'],\n\t\t['Osge', 'Osage'],\n\t\t['Osma', 'Osmanya'],\n\t\t['Ougr', 'Old_Uyghur'],\n\t\t['Palm', 'Palmyrene'],\n\t\t['Pauc', 'Pau_Cin_Hau'],\n\t\t['Perm', 'Old_Permic'],\n\t\t['Phag', 'Phags_Pa'],\n\t\t['Phli', 'Inscriptional_Pahlavi'],\n\t\t['Phlp', 'Psalter_Pahlavi'],\n\t\t['Phnx', 'Phoenician'],\n\t\t['Plrd', 'Miao'],\n\t\t['Prti', 'Inscriptional_Parthian'],\n\t\t['Rjng', 'Rejang'],\n\t\t['Rohg', 'Hanifi_Rohingya'],\n\t\t['Runr', 'Runic'],\n\t\t['Samr', 'Samaritan'],\n\t\t['Sarb', 'Old_South_Arabian'],\n\t\t['Saur', 'Saurashtra'],\n\t\t['Sgnw', 'SignWriting'],\n\t\t['Shaw', 'Shavian'],\n\t\t['Shrd', 'Sharada'],\n\t\t['Sidd', 'Siddham'],\n\t\t['Sind', 'Khudawadi'],\n\t\t['Sinh', 'Sinhala'],\n\t\t['Sogd', 'Sogdian'],\n\t\t['Sogo', 'Old_Sogdian'],\n\t\t['Sora', 'Sora_Sompeng'],\n\t\t['Soyo', 'Soyombo'],\n\t\t['Sund', 'Sundanese'],\n\t\t['Sylo', 'Syloti_Nagri'],\n\t\t['Syrc', 'Syriac'],\n\t\t['Tagb', 'Tagbanwa'],\n\t\t['Takr', 'Takri'],\n\t\t['Tale', 'Tai_Le'],\n\t\t['Talu', 'New_Tai_Lue'],\n\t\t['Taml', 'Tamil'],\n\t\t['Tang', 'Tangut'],\n\t\t['Tavt', 'Tai_Viet'],\n\t\t['Telu', 'Telugu'],\n\t\t['Tfng', 'Tifinagh'],\n\t\t['Tglg', 'Tagalog'],\n\t\t['Thaa', 'Thaana'],\n\t\t['Thai', 'Thai'],\n\t\t['Tibt', 'Tibetan'],\n\t\t['Tirh', 'Tirhuta'],\n\t\t['Tnsa', 'Tangsa'],\n\t\t['Toto', 'Toto'],\n\t\t['Ugar', 'Ugaritic'],\n\t\t['Vaii', 'Vai'],\n\t\t['Vith', 'Vithkuqi'],\n\t\t['Wara', 'Warang_Citi'],\n\t\t['Wcho', 'Wancho'],\n\t\t['Xpeo', 'Old_Persian'],\n\t\t['Xsux', 'Cuneiform'],\n\t\t['Yezi', 'Yezidi'],\n\t\t['Yiii', 'Yi'],\n\t\t['Zanb', 'Zanabazar_Square'],\n\t\t['Zinh', 'Inherited'],\n\t\t['Qaai', 'Inherited'],\n\t\t['Zyyy', 'Common'],\n\t\t['Zzzz', 'Unknown'],\n\t\t['Adlam', 'Adlam'],\n\t\t['Caucasian_Albanian', 'Caucasian_Albanian'],\n\t\t['Arabic', 'Arabic'],\n\t\t['Imperial_Aramaic', 'Imperial_Aramaic'],\n\t\t['Armenian', 'Armenian'],\n\t\t['Avestan', 'Avestan'],\n\t\t['Balinese', 'Balinese'],\n\t\t['Bamum', 'Bamum'],\n\t\t['Bassa_Vah', 'Bassa_Vah'],\n\t\t['Batak', 'Batak'],\n\t\t['Bengali', 'Bengali'],\n\t\t['Bhaiksuki', 'Bhaiksuki'],\n\t\t['Bopomofo', 'Bopomofo'],\n\t\t['Brahmi', 'Brahmi'],\n\t\t['Braille', 'Braille'],\n\t\t['Buginese', 'Buginese'],\n\t\t['Buhid', 'Buhid'],\n\t\t['Chakma', 'Chakma'],\n\t\t['Canadian_Aboriginal', 'Canadian_Aboriginal'],\n\t\t['Carian', 'Carian'],\n\t\t['Cherokee', 'Cherokee'],\n\t\t['Chorasmian', 'Chorasmian'],\n\t\t['Coptic', 'Coptic'],\n\t\t['Cypro_Minoan', 'Cypro_Minoan'],\n\t\t['Cypriot', 'Cypriot'],\n\t\t['Cyrillic', 'Cyrillic'],\n\t\t['Devanagari', 'Devanagari'],\n\t\t['Dives_Akuru', 'Dives_Akuru'],\n\t\t['Dogra', 'Dogra'],\n\t\t['Deseret', 'Deseret'],\n\t\t['Duployan', 'Duployan'],\n\t\t['Egyptian_Hieroglyphs', 'Egyptian_Hieroglyphs'],\n\t\t['Elbasan', 'Elbasan'],\n\t\t['Elymaic', 'Elymaic'],\n\t\t['Ethiopic', 'Ethiopic'],\n\t\t['Georgian', 'Georgian'],\n\t\t['Glagolitic', 'Glagolitic'],\n\t\t['Gunjala_Gondi', 'Gunjala_Gondi'],\n\t\t['Masaram_Gondi', 'Masaram_Gondi'],\n\t\t['Gothic', 'Gothic'],\n\t\t['Grantha', 'Grantha'],\n\t\t['Greek', 'Greek'],\n\t\t['Gujarati', 'Gujarati'],\n\t\t['Gurmukhi', 'Gurmukhi'],\n\t\t['Hangul', 'Hangul'],\n\t\t['Han', 'Han'],\n\t\t['Hanunoo', 'Hanunoo'],\n\t\t['Hatran', 'Hatran'],\n\t\t['Hebrew', 'Hebrew'],\n\t\t['Hiragana', 'Hiragana'],\n\t\t['Anatolian_Hieroglyphs', 'Anatolian_Hieroglyphs'],\n\t\t['Pahawh_Hmong', 'Pahawh_Hmong'],\n\t\t['Nyiakeng_Puachue_Hmong', 'Nyiakeng_Puachue_Hmong'],\n\t\t['Katakana_Or_Hiragana', 'Katakana_Or_Hiragana'],\n\t\t['Old_Hungarian', 'Old_Hungarian'],\n\t\t['Old_Italic', 'Old_Italic'],\n\t\t['Javanese', 'Javanese'],\n\t\t['Kayah_Li', 'Kayah_Li'],\n\t\t['Katakana', 'Katakana'],\n\t\t['Kharoshthi', 'Kharoshthi'],\n\t\t['Khmer', 'Khmer'],\n\t\t['Khojki', 'Khojki'],\n\t\t['Khitan_Small_Script', 'Khitan_Small_Script'],\n\t\t['Kannada', 'Kannada'],\n\t\t['Kaithi', 'Kaithi'],\n\t\t['Tai_Tham', 'Tai_Tham'],\n\t\t['Lao', 'Lao'],\n\t\t['Latin', 'Latin'],\n\t\t['Lepcha', 'Lepcha'],\n\t\t['Limbu', 'Limbu'],\n\t\t['Linear_A', 'Linear_A'],\n\t\t['Linear_B', 'Linear_B'],\n\t\t['Lycian', 'Lycian'],\n\t\t['Lydian', 'Lydian'],\n\t\t['Mahajani', 'Mahajani'],\n\t\t['Makasar', 'Makasar'],\n\t\t['Mandaic', 'Mandaic'],\n\t\t['Manichaean', 'Manichaean'],\n\t\t['Marchen', 'Marchen'],\n\t\t['Medefaidrin', 'Medefaidrin'],\n\t\t['Mende_Kikakui', 'Mende_Kikakui'],\n\t\t['Meroitic_Cursive', 'Meroitic_Cursive'],\n\t\t['Meroitic_Hieroglyphs', 'Meroitic_Hieroglyphs'],\n\t\t['Malayalam', 'Malayalam'],\n\t\t['Mongolian', 'Mongolian'],\n\t\t['Mro', 'Mro'],\n\t\t['Meetei_Mayek', 'Meetei_Mayek'],\n\t\t['Multani', 'Multani'],\n\t\t['Myanmar', 'Myanmar'],\n\t\t['Nag_Mundari', 'Nag_Mundari'],\n\t\t['Nandinagari', 'Nandinagari'],\n\t\t['Old_North_Arabian', 'Old_North_Arabian'],\n\t\t['Nabataean', 'Nabataean'],\n\t\t['Nko', 'Nko'],\n\t\t['Nushu', 'Nushu'],\n\t\t['Ogham', 'Ogham'],\n\t\t['Ol_Chiki', 'Ol_Chiki'],\n\t\t['Old_Turkic', 'Old_Turkic'],\n\t\t['Oriya', 'Oriya'],\n\t\t['Osage', 'Osage'],\n\t\t['Osmanya', 'Osmanya'],\n\t\t['Old_Uyghur', 'Old_Uyghur'],\n\t\t['Palmyrene', 'Palmyrene'],\n\t\t['Pau_Cin_Hau', 'Pau_Cin_Hau'],\n\t\t['Old_Permic', 'Old_Permic'],\n\t\t['Phags_Pa', 'Phags_Pa'],\n\t\t['Inscriptional_Pahlavi', 'Inscriptional_Pahlavi'],\n\t\t['Psalter_Pahlavi', 'Psalter_Pahlavi'],\n\t\t['Phoenician', 'Phoenician'],\n\t\t['Miao', 'Miao'],\n\t\t['Inscriptional_Parthian', 'Inscriptional_Parthian'],\n\t\t['Rejang', 'Rejang'],\n\t\t['Hanifi_Rohingya', 'Hanifi_Rohingya'],\n\t\t['Runic', 'Runic'],\n\t\t['Samaritan', 'Samaritan'],\n\t\t['Old_South_Arabian', 'Old_South_Arabian'],\n\t\t['Saurashtra', 'Saurashtra'],\n\t\t['SignWriting', 'SignWriting'],\n\t\t['Shavian', 'Shavian'],\n\t\t['Sharada', 'Sharada'],\n\t\t['Siddham', 'Siddham'],\n\t\t['Khudawadi', 'Khudawadi'],\n\t\t['Sinhala', 'Sinhala'],\n\t\t['Sogdian', 'Sogdian'],\n\t\t['Old_Sogdian', 'Old_Sogdian'],\n\t\t['Sora_Sompeng', 'Sora_Sompeng'],\n\t\t['Soyombo', 'Soyombo'],\n\t\t['Sundanese', 'Sundanese'],\n\t\t['Syloti_Nagri', 'Syloti_Nagri'],\n\t\t['Syriac', 'Syriac'],\n\t\t['Tagbanwa', 'Tagbanwa'],\n\t\t['Takri', 'Takri'],\n\t\t['Tai_Le', 'Tai_Le'],\n\t\t['New_Tai_Lue', 'New_Tai_Lue'],\n\t\t['Tamil', 'Tamil'],\n\t\t['Tangut', 'Tangut'],\n\t\t['Tai_Viet', 'Tai_Viet'],\n\t\t['Telugu', 'Telugu'],\n\t\t['Tifinagh', 'Tifinagh'],\n\t\t['Tagalog', 'Tagalog'],\n\t\t['Thaana', 'Thaana'],\n\t\t['Tibetan', 'Tibetan'],\n\t\t['Tirhuta', 'Tirhuta'],\n\t\t['Tangsa', 'Tangsa'],\n\t\t['Ugaritic', 'Ugaritic'],\n\t\t['Vai', 'Vai'],\n\t\t['Vithkuqi', 'Vithkuqi'],\n\t\t['Warang_Citi', 'Warang_Citi'],\n\t\t['Wancho', 'Wancho'],\n\t\t['Old_Persian', 'Old_Persian'],\n\t\t['Cuneiform', 'Cuneiform'],\n\t\t['Yezidi', 'Yezidi'],\n\t\t['Yi', 'Yi'],\n\t\t['Zanabazar_Square', 'Zanabazar_Square'],\n\t\t['Inherited', 'Inherited'],\n\t\t['Common', 'Common'],\n\t\t['Unknown', 'Unknown']\n\t])]\n]);\n","module.exports = new Map([\n\t[0x4B, 0x212A],\n\t[0x53, 0x17F],\n\t[0x6B, 0x212A],\n\t[0x73, 0x17F],\n\t[0xB5, 0x39C],\n\t[0xC5, 0x212B],\n\t[0xDF, 0x1E9E],\n\t[0xE5, 0x212B],\n\t[0x17F, 0x53],\n\t[0x1C4, 0x1C5],\n\t[0x1C5, 0x1C4],\n\t[0x1C7, 0x1C8],\n\t[0x1C8, 0x1C7],\n\t[0x1CA, 0x1CB],\n\t[0x1CB, 0x1CA],\n\t[0x1F1, 0x1F2],\n\t[0x1F2, 0x1F1],\n\t[0x345, 0x1FBE],\n\t[0x392, 0x3D0],\n\t[0x395, 0x3F5],\n\t[0x398, 0x3F4],\n\t[0x399, 0x1FBE],\n\t[0x39A, 0x3F0],\n\t[0x39C, 0xB5],\n\t[0x3A0, 0x3D6],\n\t[0x3A1, 0x3F1],\n\t[0x3A3, 0x3C2],\n\t[0x3A6, 0x3D5],\n\t[0x3A9, 0x2126],\n\t[0x3B8, 0x3F4],\n\t[0x3C2, 0x3A3],\n\t[0x3C9, 0x2126],\n\t[0x3D0, 0x392],\n\t[0x3D1, 0x3F4],\n\t[0x3D5, 0x3A6],\n\t[0x3D6, 0x3A0],\n\t[0x3F0, 0x39A],\n\t[0x3F1, 0x3A1],\n\t[0x3F4, [\n\t\t0x398,\n\t\t0x3D1,\n\t\t0x3B8\n\t]],\n\t[0x3F5, 0x395],\n\t[0x412, 0x1C80],\n\t[0x414, 0x1C81],\n\t[0x41E, 0x1C82],\n\t[0x421, 0x1C83],\n\t[0x422, 0x1C85],\n\t[0x42A, 0x1C86],\n\t[0x462, 0x1C87],\n\t[0x1C80, 0x412],\n\t[0x1C81, 0x414],\n\t[0x1C82, 0x41E],\n\t[0x1C83, 0x421],\n\t[0x1C84, 0x1C85],\n\t[0x1C85, [\n\t\t0x422,\n\t\t0x1C84\n\t]],\n\t[0x1C86, 0x42A],\n\t[0x1C87, 0x462],\n\t[0x1C88, 0xA64A],\n\t[0x1E60, 0x1E9B],\n\t[0x1E9B, 0x1E60],\n\t[0x1E9E, 0xDF],\n\t[0x1F80, 0x1F88],\n\t[0x1F81, 0x1F89],\n\t[0x1F82, 0x1F8A],\n\t[0x1F83, 0x1F8B],\n\t[0x1F84, 0x1F8C],\n\t[0x1F85, 0x1F8D],\n\t[0x1F86, 0x1F8E],\n\t[0x1F87, 0x1F8F],\n\t[0x1F88, 0x1F80],\n\t[0x1F89, 0x1F81],\n\t[0x1F8A, 0x1F82],\n\t[0x1F8B, 0x1F83],\n\t[0x1F8C, 0x1F84],\n\t[0x1F8D, 0x1F85],\n\t[0x1F8E, 0x1F86],\n\t[0x1F8F, 0x1F87],\n\t[0x1F90, 0x1F98],\n\t[0x1F91, 0x1F99],\n\t[0x1F92, 0x1F9A],\n\t[0x1F93, 0x1F9B],\n\t[0x1F94, 0x1F9C],\n\t[0x1F95, 0x1F9D],\n\t[0x1F96, 0x1F9E],\n\t[0x1F97, 0x1F9F],\n\t[0x1F98, 0x1F90],\n\t[0x1F99, 0x1F91],\n\t[0x1F9A, 0x1F92],\n\t[0x1F9B, 0x1F93],\n\t[0x1F9C, 0x1F94],\n\t[0x1F9D, 0x1F95],\n\t[0x1F9E, 0x1F96],\n\t[0x1F9F, 0x1F97],\n\t[0x1FA0, 0x1FA8],\n\t[0x1FA1, 0x1FA9],\n\t[0x1FA2, 0x1FAA],\n\t[0x1FA3, 0x1FAB],\n\t[0x1FA4, 0x1FAC],\n\t[0x1FA5, 0x1FAD],\n\t[0x1FA6, 0x1FAE],\n\t[0x1FA7, 0x1FAF],\n\t[0x1FA8, 0x1FA0],\n\t[0x1FA9, 0x1FA1],\n\t[0x1FAA, 0x1FA2],\n\t[0x1FAB, 0x1FA3],\n\t[0x1FAC, 0x1FA4],\n\t[0x1FAD, 0x1FA5],\n\t[0x1FAE, 0x1FA6],\n\t[0x1FAF, 0x1FA7],\n\t[0x1FB3, 0x1FBC],\n\t[0x1FBC, 0x1FB3],\n\t[0x1FBE, [\n\t\t0x345,\n\t\t0x399\n\t]],\n\t[0x1FC3, 0x1FCC],\n\t[0x1FCC, 0x1FC3],\n\t[0x1FF3, 0x1FFC],\n\t[0x1FFC, 0x1FF3],\n\t[0x2126, [\n\t\t0x3A9,\n\t\t0x3C9\n\t]],\n\t[0x212A, 0x4B],\n\t[0x212B, [\n\t\t0xC5,\n\t\t0xE5\n\t]],\n\t[0xA64A, 0x1C88],\n\t[0x10400, 0x10428],\n\t[0x10401, 0x10429],\n\t[0x10402, 0x1042A],\n\t[0x10403, 0x1042B],\n\t[0x10404, 0x1042C],\n\t[0x10405, 0x1042D],\n\t[0x10406, 0x1042E],\n\t[0x10407, 0x1042F],\n\t[0x10408, 0x10430],\n\t[0x10409, 0x10431],\n\t[0x1040A, 0x10432],\n\t[0x1040B, 0x10433],\n\t[0x1040C, 0x10434],\n\t[0x1040D, 0x10435],\n\t[0x1040E, 0x10436],\n\t[0x1040F, 0x10437],\n\t[0x10410, 0x10438],\n\t[0x10411, 0x10439],\n\t[0x10412, 0x1043A],\n\t[0x10413, 0x1043B],\n\t[0x10414, 0x1043C],\n\t[0x10415, 0x1043D],\n\t[0x10416, 0x1043E],\n\t[0x10417, 0x1043F],\n\t[0x10418, 0x10440],\n\t[0x10419, 0x10441],\n\t[0x1041A, 0x10442],\n\t[0x1041B, 0x10443],\n\t[0x1041C, 0x10444],\n\t[0x1041D, 0x10445],\n\t[0x1041E, 0x10446],\n\t[0x1041F, 0x10447],\n\t[0x10420, 0x10448],\n\t[0x10421, 0x10449],\n\t[0x10422, 0x1044A],\n\t[0x10423, 0x1044B],\n\t[0x10424, 0x1044C],\n\t[0x10425, 0x1044D],\n\t[0x10426, 0x1044E],\n\t[0x10427, 0x1044F],\n\t[0x10428, 0x10400],\n\t[0x10429, 0x10401],\n\t[0x1042A, 0x10402],\n\t[0x1042B, 0x10403],\n\t[0x1042C, 0x10404],\n\t[0x1042D, 0x10405],\n\t[0x1042E, 0x10406],\n\t[0x1042F, 0x10407],\n\t[0x10430, 0x10408],\n\t[0x10431, 0x10409],\n\t[0x10432, 0x1040A],\n\t[0x10433, 0x1040B],\n\t[0x10434, 0x1040C],\n\t[0x10435, 0x1040D],\n\t[0x10436, 0x1040E],\n\t[0x10437, 0x1040F],\n\t[0x10438, 0x10410],\n\t[0x10439, 0x10411],\n\t[0x1043A, 0x10412],\n\t[0x1043B, 0x10413],\n\t[0x1043C, 0x10414],\n\t[0x1043D, 0x10415],\n\t[0x1043E, 0x10416],\n\t[0x1043F, 0x10417],\n\t[0x10440, 0x10418],\n\t[0x10441, 0x10419],\n\t[0x10442, 0x1041A],\n\t[0x10443, 0x1041B],\n\t[0x10444, 0x1041C],\n\t[0x10445, 0x1041D],\n\t[0x10446, 0x1041E],\n\t[0x10447, 0x1041F],\n\t[0x10448, 0x10420],\n\t[0x10449, 0x10421],\n\t[0x1044A, 0x10422],\n\t[0x1044B, 0x10423],\n\t[0x1044C, 0x10424],\n\t[0x1044D, 0x10425],\n\t[0x1044E, 0x10426],\n\t[0x1044F, 0x10427],\n\t[0x104B0, 0x104D8],\n\t[0x104B1, 0x104D9],\n\t[0x104B2, 0x104DA],\n\t[0x104B3, 0x104DB],\n\t[0x104B4, 0x104DC],\n\t[0x104B5, 0x104DD],\n\t[0x104B6, 0x104DE],\n\t[0x104B7, 0x104DF],\n\t[0x104B8, 0x104E0],\n\t[0x104B9, 0x104E1],\n\t[0x104BA, 0x104E2],\n\t[0x104BB, 0x104E3],\n\t[0x104BC, 0x104E4],\n\t[0x104BD, 0x104E5],\n\t[0x104BE, 0x104E6],\n\t[0x104BF, 0x104E7],\n\t[0x104C0, 0x104E8],\n\t[0x104C1, 0x104E9],\n\t[0x104C2, 0x104EA],\n\t[0x104C3, 0x104EB],\n\t[0x104C4, 0x104EC],\n\t[0x104C5, 0x104ED],\n\t[0x104C6, 0x104EE],\n\t[0x104C7, 0x104EF],\n\t[0x104C8, 0x104F0],\n\t[0x104C9, 0x104F1],\n\t[0x104CA, 0x104F2],\n\t[0x104CB, 0x104F3],\n\t[0x104CC, 0x104F4],\n\t[0x104CD, 0x104F5],\n\t[0x104CE, 0x104F6],\n\t[0x104CF, 0x104F7],\n\t[0x104D0, 0x104F8],\n\t[0x104D1, 0x104F9],\n\t[0x104D2, 0x104FA],\n\t[0x104D3, 0x104FB],\n\t[0x104D8, 0x104B0],\n\t[0x104D9, 0x104B1],\n\t[0x104DA, 0x104B2],\n\t[0x104DB, 0x104B3],\n\t[0x104DC, 0x104B4],\n\t[0x104DD, 0x104B5],\n\t[0x104DE, 0x104B6],\n\t[0x104DF, 0x104B7],\n\t[0x104E0, 0x104B8],\n\t[0x104E1, 0x104B9],\n\t[0x104E2, 0x104BA],\n\t[0x104E3, 0x104BB],\n\t[0x104E4, 0x104BC],\n\t[0x104E5, 0x104BD],\n\t[0x104E6, 0x104BE],\n\t[0x104E7, 0x104BF],\n\t[0x104E8, 0x104C0],\n\t[0x104E9, 0x104C1],\n\t[0x104EA, 0x104C2],\n\t[0x104EB, 0x104C3],\n\t[0x104EC, 0x104C4],\n\t[0x104ED, 0x104C5],\n\t[0x104EE, 0x104C6],\n\t[0x104EF, 0x104C7],\n\t[0x104F0, 0x104C8],\n\t[0x104F1, 0x104C9],\n\t[0x104F2, 0x104CA],\n\t[0x104F3, 0x104CB],\n\t[0x104F4, 0x104CC],\n\t[0x104F5, 0x104CD],\n\t[0x104F6, 0x104CE],\n\t[0x104F7, 0x104CF],\n\t[0x104F8, 0x104D0],\n\t[0x104F9, 0x104D1],\n\t[0x104FA, 0x104D2],\n\t[0x104FB, 0x104D3],\n\t[0x10570, 0x10597],\n\t[0x10571, 0x10598],\n\t[0x10572, 0x10599],\n\t[0x10573, 0x1059A],\n\t[0x10574, 0x1059B],\n\t[0x10575, 0x1059C],\n\t[0x10576, 0x1059D],\n\t[0x10577, 0x1059E],\n\t[0x10578, 0x1059F],\n\t[0x10579, 0x105A0],\n\t[0x1057A, 0x105A1],\n\t[0x1057C, 0x105A3],\n\t[0x1057D, 0x105A4],\n\t[0x1057E, 0x105A5],\n\t[0x1057F, 0x105A6],\n\t[0x10580, 0x105A7],\n\t[0x10581, 0x105A8],\n\t[0x10582, 0x105A9],\n\t[0x10583, 0x105AA],\n\t[0x10584, 0x105AB],\n\t[0x10585, 0x105AC],\n\t[0x10586, 0x105AD],\n\t[0x10587, 0x105AE],\n\t[0x10588, 0x105AF],\n\t[0x10589, 0x105B0],\n\t[0x1058A, 0x105B1],\n\t[0x1058C, 0x105B3],\n\t[0x1058D, 0x105B4],\n\t[0x1058E, 0x105B5],\n\t[0x1058F, 0x105B6],\n\t[0x10590, 0x105B7],\n\t[0x10591, 0x105B8],\n\t[0x10592, 0x105B9],\n\t[0x10594, 0x105BB],\n\t[0x10595, 0x105BC],\n\t[0x10597, 0x10570],\n\t[0x10598, 0x10571],\n\t[0x10599, 0x10572],\n\t[0x1059A, 0x10573],\n\t[0x1059B, 0x10574],\n\t[0x1059C, 0x10575],\n\t[0x1059D, 0x10576],\n\t[0x1059E, 0x10577],\n\t[0x1059F, 0x10578],\n\t[0x105A0, 0x10579],\n\t[0x105A1, 0x1057A],\n\t[0x105A3, 0x1057C],\n\t[0x105A4, 0x1057D],\n\t[0x105A5, 0x1057E],\n\t[0x105A6, 0x1057F],\n\t[0x105A7, 0x10580],\n\t[0x105A8, 0x10581],\n\t[0x105A9, 0x10582],\n\t[0x105AA, 0x10583],\n\t[0x105AB, 0x10584],\n\t[0x105AC, 0x10585],\n\t[0x105AD, 0x10586],\n\t[0x105AE, 0x10587],\n\t[0x105AF, 0x10588],\n\t[0x105B0, 0x10589],\n\t[0x105B1, 0x1058A],\n\t[0x105B3, 0x1058C],\n\t[0x105B4, 0x1058D],\n\t[0x105B5, 0x1058E],\n\t[0x105B6, 0x1058F],\n\t[0x105B7, 0x10590],\n\t[0x105B8, 0x10591],\n\t[0x105B9, 0x10592],\n\t[0x105BB, 0x10594],\n\t[0x105BC, 0x10595],\n\t[0x10C80, 0x10CC0],\n\t[0x10C81, 0x10CC1],\n\t[0x10C82, 0x10CC2],\n\t[0x10C83, 0x10CC3],\n\t[0x10C84, 0x10CC4],\n\t[0x10C85, 0x10CC5],\n\t[0x10C86, 0x10CC6],\n\t[0x10C87, 0x10CC7],\n\t[0x10C88, 0x10CC8],\n\t[0x10C89, 0x10CC9],\n\t[0x10C8A, 0x10CCA],\n\t[0x10C8B, 0x10CCB],\n\t[0x10C8C, 0x10CCC],\n\t[0x10C8D, 0x10CCD],\n\t[0x10C8E, 0x10CCE],\n\t[0x10C8F, 0x10CCF],\n\t[0x10C90, 0x10CD0],\n\t[0x10C91, 0x10CD1],\n\t[0x10C92, 0x10CD2],\n\t[0x10C93, 0x10CD3],\n\t[0x10C94, 0x10CD4],\n\t[0x10C95, 0x10CD5],\n\t[0x10C96, 0x10CD6],\n\t[0x10C97, 0x10CD7],\n\t[0x10C98, 0x10CD8],\n\t[0x10C99, 0x10CD9],\n\t[0x10C9A, 0x10CDA],\n\t[0x10C9B, 0x10CDB],\n\t[0x10C9C, 0x10CDC],\n\t[0x10C9D, 0x10CDD],\n\t[0x10C9E, 0x10CDE],\n\t[0x10C9F, 0x10CDF],\n\t[0x10CA0, 0x10CE0],\n\t[0x10CA1, 0x10CE1],\n\t[0x10CA2, 0x10CE2],\n\t[0x10CA3, 0x10CE3],\n\t[0x10CA4, 0x10CE4],\n\t[0x10CA5, 0x10CE5],\n\t[0x10CA6, 0x10CE6],\n\t[0x10CA7, 0x10CE7],\n\t[0x10CA8, 0x10CE8],\n\t[0x10CA9, 0x10CE9],\n\t[0x10CAA, 0x10CEA],\n\t[0x10CAB, 0x10CEB],\n\t[0x10CAC, 0x10CEC],\n\t[0x10CAD, 0x10CED],\n\t[0x10CAE, 0x10CEE],\n\t[0x10CAF, 0x10CEF],\n\t[0x10CB0, 0x10CF0],\n\t[0x10CB1, 0x10CF1],\n\t[0x10CB2, 0x10CF2],\n\t[0x10CC0, 0x10C80],\n\t[0x10CC1, 0x10C81],\n\t[0x10CC2, 0x10C82],\n\t[0x10CC3, 0x10C83],\n\t[0x10CC4, 0x10C84],\n\t[0x10CC5, 0x10C85],\n\t[0x10CC6, 0x10C86],\n\t[0x10CC7, 0x10C87],\n\t[0x10CC8, 0x10C88],\n\t[0x10CC9, 0x10C89],\n\t[0x10CCA, 0x10C8A],\n\t[0x10CCB, 0x10C8B],\n\t[0x10CCC, 0x10C8C],\n\t[0x10CCD, 0x10C8D],\n\t[0x10CCE, 0x10C8E],\n\t[0x10CCF, 0x10C8F],\n\t[0x10CD0, 0x10C90],\n\t[0x10CD1, 0x10C91],\n\t[0x10CD2, 0x10C92],\n\t[0x10CD3, 0x10C93],\n\t[0x10CD4, 0x10C94],\n\t[0x10CD5, 0x10C95],\n\t[0x10CD6, 0x10C96],\n\t[0x10CD7, 0x10C97],\n\t[0x10CD8, 0x10C98],\n\t[0x10CD9, 0x10C99],\n\t[0x10CDA, 0x10C9A],\n\t[0x10CDB, 0x10C9B],\n\t[0x10CDC, 0x10C9C],\n\t[0x10CDD, 0x10C9D],\n\t[0x10CDE, 0x10C9E],\n\t[0x10CDF, 0x10C9F],\n\t[0x10CE0, 0x10CA0],\n\t[0x10CE1, 0x10CA1],\n\t[0x10CE2, 0x10CA2],\n\t[0x10CE3, 0x10CA3],\n\t[0x10CE4, 0x10CA4],\n\t[0x10CE5, 0x10CA5],\n\t[0x10CE6, 0x10CA6],\n\t[0x10CE7, 0x10CA7],\n\t[0x10CE8, 0x10CA8],\n\t[0x10CE9, 0x10CA9],\n\t[0x10CEA, 0x10CAA],\n\t[0x10CEB, 0x10CAB],\n\t[0x10CEC, 0x10CAC],\n\t[0x10CED, 0x10CAD],\n\t[0x10CEE, 0x10CAE],\n\t[0x10CEF, 0x10CAF],\n\t[0x10CF0, 0x10CB0],\n\t[0x10CF1, 0x10CB1],\n\t[0x10CF2, 0x10CB2],\n\t[0x118A0, 0x118C0],\n\t[0x118A1, 0x118C1],\n\t[0x118A2, 0x118C2],\n\t[0x118A3, 0x118C3],\n\t[0x118A4, 0x118C4],\n\t[0x118A5, 0x118C5],\n\t[0x118A6, 0x118C6],\n\t[0x118A7, 0x118C7],\n\t[0x118A8, 0x118C8],\n\t[0x118A9, 0x118C9],\n\t[0x118AA, 0x118CA],\n\t[0x118AB, 0x118CB],\n\t[0x118AC, 0x118CC],\n\t[0x118AD, 0x118CD],\n\t[0x118AE, 0x118CE],\n\t[0x118AF, 0x118CF],\n\t[0x118B0, 0x118D0],\n\t[0x118B1, 0x118D1],\n\t[0x118B2, 0x118D2],\n\t[0x118B3, 0x118D3],\n\t[0x118B4, 0x118D4],\n\t[0x118B5, 0x118D5],\n\t[0x118B6, 0x118D6],\n\t[0x118B7, 0x118D7],\n\t[0x118B8, 0x118D8],\n\t[0x118B9, 0x118D9],\n\t[0x118BA, 0x118DA],\n\t[0x118BB, 0x118DB],\n\t[0x118BC, 0x118DC],\n\t[0x118BD, 0x118DD],\n\t[0x118BE, 0x118DE],\n\t[0x118BF, 0x118DF],\n\t[0x118C0, 0x118A0],\n\t[0x118C1, 0x118A1],\n\t[0x118C2, 0x118A2],\n\t[0x118C3, 0x118A3],\n\t[0x118C4, 0x118A4],\n\t[0x118C5, 0x118A5],\n\t[0x118C6, 0x118A6],\n\t[0x118C7, 0x118A7],\n\t[0x118C8, 0x118A8],\n\t[0x118C9, 0x118A9],\n\t[0x118CA, 0x118AA],\n\t[0x118CB, 0x118AB],\n\t[0x118CC, 0x118AC],\n\t[0x118CD, 0x118AD],\n\t[0x118CE, 0x118AE],\n\t[0x118CF, 0x118AF],\n\t[0x118D0, 0x118B0],\n\t[0x118D1, 0x118B1],\n\t[0x118D2, 0x118B2],\n\t[0x118D3, 0x118B3],\n\t[0x118D4, 0x118B4],\n\t[0x118D5, 0x118B5],\n\t[0x118D6, 0x118B6],\n\t[0x118D7, 0x118B7],\n\t[0x118D8, 0x118B8],\n\t[0x118D9, 0x118B9],\n\t[0x118DA, 0x118BA],\n\t[0x118DB, 0x118BB],\n\t[0x118DC, 0x118BC],\n\t[0x118DD, 0x118BD],\n\t[0x118DE, 0x118BE],\n\t[0x118DF, 0x118BF],\n\t[0x16E40, 0x16E60],\n\t[0x16E41, 0x16E61],\n\t[0x16E42, 0x16E62],\n\t[0x16E43, 0x16E63],\n\t[0x16E44, 0x16E64],\n\t[0x16E45, 0x16E65],\n\t[0x16E46, 0x16E66],\n\t[0x16E47, 0x16E67],\n\t[0x16E48, 0x16E68],\n\t[0x16E49, 0x16E69],\n\t[0x16E4A, 0x16E6A],\n\t[0x16E4B, 0x16E6B],\n\t[0x16E4C, 0x16E6C],\n\t[0x16E4D, 0x16E6D],\n\t[0x16E4E, 0x16E6E],\n\t[0x16E4F, 0x16E6F],\n\t[0x16E50, 0x16E70],\n\t[0x16E51, 0x16E71],\n\t[0x16E52, 0x16E72],\n\t[0x16E53, 0x16E73],\n\t[0x16E54, 0x16E74],\n\t[0x16E55, 0x16E75],\n\t[0x16E56, 0x16E76],\n\t[0x16E57, 0x16E77],\n\t[0x16E58, 0x16E78],\n\t[0x16E59, 0x16E79],\n\t[0x16E5A, 0x16E7A],\n\t[0x16E5B, 0x16E7B],\n\t[0x16E5C, 0x16E7C],\n\t[0x16E5D, 0x16E7D],\n\t[0x16E5E, 0x16E7E],\n\t[0x16E5F, 0x16E7F],\n\t[0x16E60, 0x16E40],\n\t[0x16E61, 0x16E41],\n\t[0x16E62, 0x16E42],\n\t[0x16E63, 0x16E43],\n\t[0x16E64, 0x16E44],\n\t[0x16E65, 0x16E45],\n\t[0x16E66, 0x16E46],\n\t[0x16E67, 0x16E47],\n\t[0x16E68, 0x16E48],\n\t[0x16E69, 0x16E49],\n\t[0x16E6A, 0x16E4A],\n\t[0x16E6B, 0x16E4B],\n\t[0x16E6C, 0x16E4C],\n\t[0x16E6D, 0x16E4D],\n\t[0x16E6E, 0x16E4E],\n\t[0x16E6F, 0x16E4F],\n\t[0x16E70, 0x16E50],\n\t[0x16E71, 0x16E51],\n\t[0x16E72, 0x16E52],\n\t[0x16E73, 0x16E53],\n\t[0x16E74, 0x16E54],\n\t[0x16E75, 0x16E55],\n\t[0x16E76, 0x16E56],\n\t[0x16E77, 0x16E57],\n\t[0x16E78, 0x16E58],\n\t[0x16E79, 0x16E59],\n\t[0x16E7A, 0x16E5A],\n\t[0x16E7B, 0x16E5B],\n\t[0x16E7C, 0x16E5C],\n\t[0x16E7D, 0x16E5D],\n\t[0x16E7E, 0x16E5E],\n\t[0x16E7F, 0x16E5F],\n\t[0x1E900, 0x1E922],\n\t[0x1E901, 0x1E923],\n\t[0x1E902, 0x1E924],\n\t[0x1E903, 0x1E925],\n\t[0x1E904, 0x1E926],\n\t[0x1E905, 0x1E927],\n\t[0x1E906, 0x1E928],\n\t[0x1E907, 0x1E929],\n\t[0x1E908, 0x1E92A],\n\t[0x1E909, 0x1E92B],\n\t[0x1E90A, 0x1E92C],\n\t[0x1E90B, 0x1E92D],\n\t[0x1E90C, 0x1E92E],\n\t[0x1E90D, 0x1E92F],\n\t[0x1E90E, 0x1E930],\n\t[0x1E90F, 0x1E931],\n\t[0x1E910, 0x1E932],\n\t[0x1E911, 0x1E933],\n\t[0x1E912, 0x1E934],\n\t[0x1E913, 0x1E935],\n\t[0x1E914, 0x1E936],\n\t[0x1E915, 0x1E937],\n\t[0x1E916, 0x1E938],\n\t[0x1E917, 0x1E939],\n\t[0x1E918, 0x1E93A],\n\t[0x1E919, 0x1E93B],\n\t[0x1E91A, 0x1E93C],\n\t[0x1E91B, 0x1E93D],\n\t[0x1E91C, 0x1E93E],\n\t[0x1E91D, 0x1E93F],\n\t[0x1E91E, 0x1E940],\n\t[0x1E91F, 0x1E941],\n\t[0x1E920, 0x1E942],\n\t[0x1E921, 0x1E943],\n\t[0x1E922, 0x1E900],\n\t[0x1E923, 0x1E901],\n\t[0x1E924, 0x1E902],\n\t[0x1E925, 0x1E903],\n\t[0x1E926, 0x1E904],\n\t[0x1E927, 0x1E905],\n\t[0x1E928, 0x1E906],\n\t[0x1E929, 0x1E907],\n\t[0x1E92A, 0x1E908],\n\t[0x1E92B, 0x1E909],\n\t[0x1E92C, 0x1E90A],\n\t[0x1E92D, 0x1E90B],\n\t[0x1E92E, 0x1E90C],\n\t[0x1E92F, 0x1E90D],\n\t[0x1E930, 0x1E90E],\n\t[0x1E931, 0x1E90F],\n\t[0x1E932, 0x1E910],\n\t[0x1E933, 0x1E911],\n\t[0x1E934, 0x1E912],\n\t[0x1E935, 0x1E913],\n\t[0x1E936, 0x1E914],\n\t[0x1E937, 0x1E915],\n\t[0x1E938, 0x1E916],\n\t[0x1E939, 0x1E917],\n\t[0x1E93A, 0x1E918],\n\t[0x1E93B, 0x1E919],\n\t[0x1E93C, 0x1E91A],\n\t[0x1E93D, 0x1E91B],\n\t[0x1E93E, 0x1E91C],\n\t[0x1E93F, 0x1E91D],\n\t[0x1E940, 0x1E91E],\n\t[0x1E941, 0x1E91F],\n\t[0x1E942, 0x1E920],\n\t[0x1E943, 0x1E921]\n]);\n","// Generated using `npm run build`. Do not edit.\n'use strict';\n\nconst regenerate = require('regenerate');\n\nexports.REGULAR = new Map([\n\t['d', regenerate()\n\t\t.addRange(0x30, 0x39)],\n\t['D', regenerate()\n\t\t.addRange(0x0, 0x2F)\n\t\t.addRange(0x3A, 0xFFFF)],\n\t['s', regenerate(0x20, 0xA0, 0x1680, 0x202F, 0x205F, 0x3000, 0xFEFF)\n\t\t.addRange(0x9, 0xD)\n\t\t.addRange(0x2000, 0x200A)\n\t\t.addRange(0x2028, 0x2029)],\n\t['S', regenerate()\n\t\t.addRange(0x0, 0x8)\n\t\t.addRange(0xE, 0x1F)\n\t\t.addRange(0x21, 0x9F)\n\t\t.addRange(0xA1, 0x167F)\n\t\t.addRange(0x1681, 0x1FFF)\n\t\t.addRange(0x200B, 0x2027)\n\t\t.addRange(0x202A, 0x202E)\n\t\t.addRange(0x2030, 0x205E)\n\t\t.addRange(0x2060, 0x2FFF)\n\t\t.addRange(0x3001, 0xFEFE)\n\t\t.addRange(0xFF00, 0xFFFF)],\n\t['w', regenerate(0x5F)\n\t\t.addRange(0x30, 0x39)\n\t\t.addRange(0x41, 0x5A)\n\t\t.addRange(0x61, 0x7A)],\n\t['W', regenerate(0x60)\n\t\t.addRange(0x0, 0x2F)\n\t\t.addRange(0x3A, 0x40)\n\t\t.addRange(0x5B, 0x5E)\n\t\t.addRange(0x7B, 0xFFFF)]\n]);\n\nexports.UNICODE = new Map([\n\t['d', regenerate()\n\t\t.addRange(0x30, 0x39)],\n\t['D', regenerate()\n\t\t.addRange(0x0, 0x2F)\n\t\t.addRange(0x3A, 0x10FFFF)],\n\t['s', regenerate(0x20, 0xA0, 0x1680, 0x202F, 0x205F, 0x3000, 0xFEFF)\n\t\t.addRange(0x9, 0xD)\n\t\t.addRange(0x2000, 0x200A)\n\t\t.addRange(0x2028, 0x2029)],\n\t['S', regenerate()\n\t\t.addRange(0x0, 0x8)\n\t\t.addRange(0xE, 0x1F)\n\t\t.addRange(0x21, 0x9F)\n\t\t.addRange(0xA1, 0x167F)\n\t\t.addRange(0x1681, 0x1FFF)\n\t\t.addRange(0x200B, 0x2027)\n\t\t.addRange(0x202A, 0x202E)\n\t\t.addRange(0x2030, 0x205E)\n\t\t.addRange(0x2060, 0x2FFF)\n\t\t.addRange(0x3001, 0xFEFE)\n\t\t.addRange(0xFF00, 0x10FFFF)],\n\t['w', regenerate(0x5F)\n\t\t.addRange(0x30, 0x39)\n\t\t.addRange(0x41, 0x5A)\n\t\t.addRange(0x61, 0x7A)],\n\t['W', regenerate(0x60)\n\t\t.addRange(0x0, 0x2F)\n\t\t.addRange(0x3A, 0x40)\n\t\t.addRange(0x5B, 0x5E)\n\t\t.addRange(0x7B, 0x10FFFF)]\n]);\n\nexports.UNICODE_IGNORE_CASE = new Map([\n\t['d', regenerate()\n\t\t.addRange(0x30, 0x39)],\n\t['D', regenerate()\n\t\t.addRange(0x0, 0x2F)\n\t\t.addRange(0x3A, 0x10FFFF)],\n\t['s', regenerate(0x20, 0xA0, 0x1680, 0x202F, 0x205F, 0x3000, 0xFEFF)\n\t\t.addRange(0x9, 0xD)\n\t\t.addRange(0x2000, 0x200A)\n\t\t.addRange(0x2028, 0x2029)],\n\t['S', regenerate()\n\t\t.addRange(0x0, 0x8)\n\t\t.addRange(0xE, 0x1F)\n\t\t.addRange(0x21, 0x9F)\n\t\t.addRange(0xA1, 0x167F)\n\t\t.addRange(0x1681, 0x1FFF)\n\t\t.addRange(0x200B, 0x2027)\n\t\t.addRange(0x202A, 0x202E)\n\t\t.addRange(0x2030, 0x205E)\n\t\t.addRange(0x2060, 0x2FFF)\n\t\t.addRange(0x3001, 0xFEFE)\n\t\t.addRange(0xFF00, 0x10FFFF)],\n\t['w', regenerate(0x5F, 0x17F, 0x212A)\n\t\t.addRange(0x30, 0x39)\n\t\t.addRange(0x41, 0x5A)\n\t\t.addRange(0x61, 0x7A)],\n\t['W', regenerate(0x60)\n\t\t.addRange(0x0, 0x2F)\n\t\t.addRange(0x3A, 0x40)\n\t\t.addRange(0x5B, 0x5E)\n\t\t.addRange(0x7B, 0x17E)\n\t\t.addRange(0x180, 0x2129)\n\t\t.addRange(0x212B, 0x10FFFF)]\n]);\n","'use strict';\n\nconst generate = require('@babel/regjsgen').generate;\nconst parse = require('regjsparser').parse;\nconst regenerate = require('regenerate');\nconst unicodeMatchProperty = require('unicode-match-property-ecmascript');\nconst unicodeMatchPropertyValue = require('unicode-match-property-value-ecmascript');\nconst iuMappings = require('./data/iu-mappings.js');\nconst ESCAPE_SETS = require('./data/character-class-escape-sets.js');\n\nfunction flatMap(array, callback) {\n\tconst result = [];\n\tarray.forEach(item => {\n\t\tconst res = callback(item);\n\t\tif (Array.isArray(res)) {\n\t\t\tresult.push.apply(result, res);\n\t\t} else {\n\t\t\tresult.push(res);\n\t\t}\n\t});\n\treturn result;\n}\n\nconst SPECIAL_CHARS = /([\\\\^$.*+?()[\\]{}|])/g;\n\n// Prepare a Regenerate set containing all code points, used for negative\n// character classes (if any).\nconst UNICODE_SET = regenerate().addRange(0x0, 0x10FFFF);\n\nconst ASTRAL_SET = regenerate().addRange(0x10000, 0x10FFFF);\n\nconst NEWLINE_SET = regenerate().add(\n\t// `LineTerminator`s (https://mths.be/es6#sec-line-terminators):\n\t0x000A, // Line Feed \n\t0x000D, // Carriage Return \n\t0x2028, // Line Separator \n\t0x2029 // Paragraph Separator \n);\n\n// Prepare a Regenerate set containing all code points that are supposed to be\n// matched by `/./u`. https://mths.be/es6#sec-atom\nconst DOT_SET_UNICODE = UNICODE_SET.clone() // all Unicode code points\n\t.remove(NEWLINE_SET);\n\nconst getCharacterClassEscapeSet = (character, unicode, ignoreCase) => {\n\tif (unicode) {\n\t\tif (ignoreCase) {\n\t\t\treturn ESCAPE_SETS.UNICODE_IGNORE_CASE.get(character);\n\t\t}\n\t\treturn ESCAPE_SETS.UNICODE.get(character);\n\t}\n\treturn ESCAPE_SETS.REGULAR.get(character);\n};\n\nconst getUnicodeDotSet = (dotAll) => {\n\treturn dotAll ? UNICODE_SET : DOT_SET_UNICODE;\n};\n\nconst getUnicodePropertyValueSet = (property, value) => {\n\tconst path = value ?\n\t\t`${ property }/${ value }` :\n\t\t`Binary_Property/${ property }`;\n\ttry {\n\t\treturn require(`regenerate-unicode-properties/${ path }.js`);\n\t} catch (exception) {\n\t\tthrow new Error(\n\t\t\t`Failed to recognize value \\`${ value }\\` for property ` +\n\t\t\t`\\`${ property }\\`.`\n\t\t);\n\t}\n};\n\nconst handleLoneUnicodePropertyNameOrValue = (value) => {\n\t// It could be a `General_Category` value or a binary property.\n\t// Note: `unicodeMatchPropertyValue` throws on invalid values.\n\ttry {\n\t\tconst property = 'General_Category';\n\t\tconst category = unicodeMatchPropertyValue(property, value);\n\t\treturn getUnicodePropertyValueSet(property, category);\n\t} catch (exception) {}\n\t// It’s not a `General_Category` value, so check if it’s a property\n\t// of strings.\n\ttry {\n\t\treturn getUnicodePropertyValueSet('Property_of_Strings', value);\n\t} catch (exception) {}\n\t// Lastly, check if it’s a binary property of single code points.\n\t// Note: `unicodeMatchProperty` throws on invalid properties.\n\tconst property = unicodeMatchProperty(value);\n\treturn getUnicodePropertyValueSet(property);\n};\n\nconst getUnicodePropertyEscapeSet = (value, isNegative) => {\n\tconst parts = value.split('=');\n\tconst firstPart = parts[0];\n\tlet set;\n\tif (parts.length == 1) {\n\t\tset = handleLoneUnicodePropertyNameOrValue(firstPart);\n\t} else {\n\t\t// The pattern consists of two parts, i.e. `Property=Value`.\n\t\tconst property = unicodeMatchProperty(firstPart);\n\t\tconst value = unicodeMatchPropertyValue(property, parts[1]);\n\t\tset = getUnicodePropertyValueSet(property, value);\n\t}\n\tif (isNegative) {\n\t\tif (set.strings) {\n\t\t\tthrow new Error('Cannot negate Unicode property of strings');\n\t\t}\n\t\treturn {\n\t\t\tcharacters: UNICODE_SET.clone().remove(set.characters),\n\t\t\tstrings: new Set()\n\t\t};\n\t}\n\treturn {\n\t\tcharacters: set.characters.clone(),\n\t\tstrings: set.strings\n\t\t\t// We need to escape strings like *️⃣ to make sure that they can be safely used in unions.\n\t\t\t? new Set(set.strings.map(str => str.replace(SPECIAL_CHARS, '\\\\$1')))\n\t\t\t: new Set()\n\t};\n};\n\nconst getUnicodePropertyEscapeCharacterClassData = (property, isNegative) => {\n\tconst set = getUnicodePropertyEscapeSet(property, isNegative);\n\tconst data = getCharacterClassEmptyData();\n\tdata.singleChars = set.characters;\n\tif (set.strings.size > 0) {\n\t\tdata.longStrings = set.strings;\n\t\tdata.maybeIncludesStrings = true;\n\t}\n\treturn data;\n};\n\nfunction configNeedCaseFoldAscii() {\n\treturn !!config.modifiersData.i;\n}\n\nfunction configNeedCaseFoldUnicode() {\n\t// config.modifiersData.i : undefined | false\n\tif (config.modifiersData.i === false) return false;\n\tif (!config.transform.unicodeFlag) return false;\n\treturn Boolean(config.modifiersData.i || config.flags.ignoreCase);\n}\n\n// Given a range of code points, add any case-folded code points in that range\n// to a set.\nregenerate.prototype.iuAddRange = function(min, max) {\n\tconst $this = this;\n\tdo {\n\t\tconst folded = caseFold(min, configNeedCaseFoldAscii(), configNeedCaseFoldUnicode());\n\t\tif (folded) {\n\t\t\t$this.add(folded);\n\t\t}\n\t} while (++min <= max);\n\treturn $this;\n};\nregenerate.prototype.iuRemoveRange = function(min, max) {\n\tconst $this = this;\n\tdo {\n\t\tconst folded = caseFold(min, configNeedCaseFoldAscii(), configNeedCaseFoldUnicode());\n\t\tif (folded) {\n\t\t\t$this.remove(folded);\n\t\t}\n\t} while (++min <= max);\n\treturn $this;\n};\n\nconst update = (item, pattern) => {\n\tlet tree = parse(pattern, config.useUnicodeFlag ? 'u' : '', {\n\t\tlookbehind: true,\n\t\tnamedGroups: true,\n\t\tunicodePropertyEscape: true,\n\t\tunicodeSet: true,\n\t\tmodifiers: true,\n\t});\n\tswitch (tree.type) {\n\t\tcase 'characterClass':\n\t\tcase 'group':\n\t\tcase 'value':\n\t\t\t// No wrapping needed.\n\t\t\tbreak;\n\t\tdefault:\n\t\t\t// Wrap the pattern in a non-capturing group.\n\t\t\ttree = wrap(tree, pattern);\n\t}\n\tObject.assign(item, tree);\n};\n\nconst wrap = (tree, pattern) => {\n\t// Wrap the pattern in a non-capturing group.\n\treturn {\n\t\t'type': 'group',\n\t\t'behavior': 'ignore',\n\t\t'body': [tree],\n\t\t'raw': `(?:${ pattern })`\n\t};\n};\n\nconst caseFold = (codePoint, includeAscii, includeUnicode) => {\n\tlet folded = (includeUnicode ? iuMappings.get(codePoint) : undefined) || [];\n\tif (typeof folded === 'number') folded = [folded];\n\tif (includeAscii) {\n\t\tif (codePoint >= 0x41 && codePoint <= 0x5A) {\n\t\t\tfolded.push(codePoint + 0x20);\n\t\t} else if (codePoint >= 0x61 && codePoint <= 0x7A) {\n\t\t\tfolded.push(codePoint - 0x20);\n\t\t}\n\t}\n\treturn folded.length == 0 ? false : folded;\n};\n\nconst buildHandler = (action) => {\n\tswitch (action) {\n\t\tcase 'union':\n\t\t\treturn {\n\t\t\t\tsingle: (data, cp) => {\n\t\t\t\t\tdata.singleChars.add(cp);\n\t\t\t\t},\n\t\t\t\tregSet: (data, set2) => {\n\t\t\t\t\tdata.singleChars.add(set2);\n\t\t\t\t},\n\t\t\t\trange: (data, start, end) => {\n\t\t\t\t\tdata.singleChars.addRange(start, end);\n\t\t\t\t},\n\t\t\t\tiuRange: (data, start, end) => {\n\t\t\t\t\tdata.singleChars.iuAddRange(start, end);\n\t\t\t\t},\n\t\t\t\tnested: (data, nestedData) => {\n\t\t\t\t\tdata.singleChars.add(nestedData.singleChars);\n\t\t\t\t\tfor (const str of nestedData.longStrings) data.longStrings.add(str);\n\t\t\t\t\tif (nestedData.maybeIncludesStrings) data.maybeIncludesStrings = true;\n\t\t\t\t}\n\t\t\t};\n\t\tcase 'union-negative': {\n\t\t\tconst regSet = (data, set2) => {\n\t\t\t\tdata.singleChars = UNICODE_SET.clone().remove(set2).add(data.singleChars);\n\t\t\t};\n\t\t\treturn {\n\t\t\t\tsingle: (data, cp) => {\n\t\t\t\t\tconst unicode = UNICODE_SET.clone();\n\t\t\t\t\tdata.singleChars = data.singleChars.contains(cp) ? unicode : unicode.remove(cp);\n\t\t\t\t},\n\t\t\t\tregSet: regSet,\n\t\t\t\trange: (data, start, end) => {\n\t\t\t\t\tdata.singleChars = UNICODE_SET.clone().removeRange(start, end).add(data.singleChars);\n\t\t\t\t},\n\t\t\t\tiuRange: (data, start, end) => {\n\t\t\t\t\tdata.singleChars = UNICODE_SET.clone().iuRemoveRange(start, end).add(data.singleChars);\n\t\t\t\t},\n\t\t\t\tnested: (data, nestedData) => {\n\t\t\t\t\tregSet(data, nestedData.singleChars);\n\t\t\t\t\tif (nestedData.maybeIncludesStrings) throw new Error('ASSERTION ERROR');\n\t\t\t\t}\n\t\t\t};\n\t\t}\n\t\tcase 'intersection': {\n\t\t\tconst regSet = (data, set2) => {\n\t\t\t\tif (data.first) data.singleChars = set2;\n\t\t\t\telse data.singleChars.intersection(set2);\n\t\t\t};\n\t\t\treturn {\n\t\t\t\tsingle: (data, cp) => {\n\t\t\t\t\tdata.singleChars = data.first || data.singleChars.contains(cp) ? regenerate(cp) : regenerate();\n\t\t\t\t\tdata.longStrings.clear();\n\t\t\t\t\tdata.maybeIncludesStrings = false;\n\t\t\t\t},\n\t\t\t\tregSet: (data, set) => {\n\t\t\t\t\tregSet(data, set);\n\t\t\t\t\tdata.longStrings.clear();\n\t\t\t\t\tdata.maybeIncludesStrings = false;\n\t\t\t\t},\n\t\t\t\trange: (data, start, end) => {\n\t\t\t\t\tif (data.first) data.singleChars.addRange(start, end);\n\t\t\t\t\telse data.singleChars.intersection(regenerate().addRange(start, end));\n\t\t\t\t\tdata.longStrings.clear();\n\t\t\t\t\tdata.maybeIncludesStrings = false;\n\t\t\t\t},\n\t\t\t\tiuRange: (data, start, end) => {\n\t\t\t\t\tif (data.first) data.singleChars.iuAddRange(start, end);\n\t\t\t\t\telse data.singleChars.intersection(regenerate().iuAddRange(start, end));\n\t\t\t\t\tdata.longStrings.clear();\n\t\t\t\t\tdata.maybeIncludesStrings = false;\n\t\t\t\t},\n\t\t\t\tnested: (data, nestedData) => {\n\t\t\t\t\tregSet(data, nestedData.singleChars);\n\n\t\t\t\t\tif (data.first) {\n\t\t\t\t\t\tdata.longStrings = nestedData.longStrings;\n\t\t\t\t\t\tdata.maybeIncludesStrings = nestedData.maybeIncludesStrings;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tfor (const str of data.longStrings) {\n\t\t\t\t\t\t\tif (!nestedData.longStrings.has(str)) data.longStrings.delete(str);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (!nestedData.maybeIncludesStrings) data.maybeIncludesStrings = false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t};\n\t\t}\n\t\tcase 'subtraction': {\n\t\t\tconst regSet = (data, set2) => {\n\t\t\t\tif (data.first) data.singleChars.add(set2);\n\t\t\t\telse data.singleChars.remove(set2);\n\t\t\t};\n\t\t\treturn {\n\t\t\t\tsingle: (data, cp) => {\n\t\t\t\t\tif (data.first) data.singleChars.add(cp);\n\t\t\t\t\telse data.singleChars.remove(cp);\n\t\t\t\t},\n\t\t\t\tregSet: regSet,\n\t\t\t\trange: (data, start, end) => {\n\t\t\t\t\tif (data.first) data.singleChars.addRange(start, end);\n\t\t\t\t\telse data.singleChars.removeRange(start, end);\n\t\t\t\t},\n\t\t\t\tiuRange: (data, start, end) => {\n\t\t\t\t\tif (data.first) data.singleChars.iuAddRange(start, end);\n\t\t\t\t\telse data.singleChars.iuRemoveRange(start, end);\n\t\t\t\t},\n\t\t\t\tnested: (data, nestedData) => {\n\t\t\t\t\tregSet(data, nestedData.singleChars);\n\n\t\t\t\t\tif (data.first) {\n\t\t\t\t\t\tdata.longStrings = nestedData.longStrings;\n\t\t\t\t\t\tdata.maybeIncludesStrings = nestedData.maybeIncludesStrings;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tfor (const str of data.longStrings) {\n\t\t\t\t\t\t\tif (nestedData.longStrings.has(str)) data.longStrings.delete(str);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t};\n\t\t}\n\t\t// The `default` clause is only here as a safeguard; it should never be\n\t\t// reached. Code coverage tools should ignore it.\n\t\t/* istanbul ignore next */\n\t\tdefault:\n\t\t\tthrow new Error(`Unknown set action: ${ characterClassItem.kind }`);\n\t}\n};\n\nconst getCharacterClassEmptyData = () => ({\n\ttransformed: config.transform.unicodeFlag,\n\tsingleChars: regenerate(),\n\tlongStrings: new Set(),\n\thasEmptyString: false,\n\tfirst: true,\n\tmaybeIncludesStrings: false\n});\n\nconst maybeFold = (codePoint) => {\n\tconst caseFoldAscii = configNeedCaseFoldAscii();\n\tconst caseFoldUnicode = configNeedCaseFoldUnicode();\n\n\tif (caseFoldAscii || caseFoldUnicode) {\n\t\tconst folded = caseFold(codePoint, caseFoldAscii, caseFoldUnicode);\n\t\tif (folded) {\n\t\t\treturn [codePoint, folded];\n\t\t}\n\t}\n\treturn [codePoint];\n};\n\nconst computeClassStrings = (classStrings, regenerateOptions) => {\n\tlet data = getCharacterClassEmptyData();\n\n\tconst caseFoldAscii = configNeedCaseFoldAscii();\n\tconst caseFoldUnicode = configNeedCaseFoldUnicode();\n\n\tfor (const string of classStrings.strings) {\n\t\tif (string.characters.length === 1) {\n\t\t\tmaybeFold(string.characters[0].codePoint).forEach((cp) => {\n\t\t\t\tdata.singleChars.add(cp);\n\t\t\t});\n\t\t} else {\n\t\t\tlet stringifiedString;\n\t\t\tif (caseFoldUnicode || caseFoldAscii) {\n\t\t\t\tstringifiedString = '';\n\t\t\t\tfor (const ch of string.characters) {\n\t\t\t\t\tlet set = regenerate(ch.codePoint);\n\t\t\t\t\tconst folded = maybeFold(ch.codePoint);\n\t\t\t\t\tif (folded) set.add(folded);\n\t\t\t\t\tstringifiedString += set.toString(regenerateOptions);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tstringifiedString = string.characters.map(ch => generate(ch)).join('')\n\t\t\t}\n\n\t\t\tdata.longStrings.add(stringifiedString);\n\t\t\tdata.maybeIncludesStrings = true;\n\t\t}\n\t}\n\n\treturn data;\n}\n\nconst computeCharacterClass = (characterClassItem, regenerateOptions) => {\n\tlet data = getCharacterClassEmptyData();\n\n\tlet handlePositive;\n\tlet handleNegative;\n\n\tswitch (characterClassItem.kind) {\n\t\tcase 'union':\n\t\t\thandlePositive = buildHandler('union');\n\t\t\thandleNegative = buildHandler('union-negative');\n\t\t\tbreak;\n\t\tcase 'intersection':\n\t\t\thandlePositive = buildHandler('intersection');\n\t\t\thandleNegative = buildHandler('subtraction');\n\t\t\tbreak;\n\t\tcase 'subtraction':\n\t\t\thandlePositive = buildHandler('subtraction');\n\t\t\thandleNegative = buildHandler('intersection');\n\t\t\tbreak;\n\t\t// The `default` clause is only here as a safeguard; it should never be\n\t\t// reached. Code coverage tools should ignore it.\n\t\t/* istanbul ignore next */\n\t\tdefault:\n\t\t\tthrow new Error(`Unknown character class kind: ${ characterClassItem.kind }`);\n\t}\n\n\tconst caseFoldAscii = configNeedCaseFoldAscii();\n\tconst caseFoldUnicode = configNeedCaseFoldUnicode();\n\n\tfor (const item of characterClassItem.body) {\n\t\tswitch (item.type) {\n\t\t\tcase 'value':\n\t\t\t\tmaybeFold(item.codePoint).forEach((cp) => {\n\t\t\t\t\thandlePositive.single(data, cp);\n\t\t\t\t});\n\t\t\t\tbreak;\n\t\t\tcase 'characterClassRange':\n\t\t\t\tconst min = item.min.codePoint;\n\t\t\t\tconst max = item.max.codePoint;\n\t\t\t\thandlePositive.range(data, min, max);\n\t\t\t\tif (caseFoldAscii || caseFoldUnicode) {\n\t\t\t\t\thandlePositive.iuRange(data, min, max);\n\t\t\t\t\tdata.transformed = true;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 'characterClassEscape':\n\t\t\t\thandlePositive.regSet(data, getCharacterClassEscapeSet(\n\t\t\t\t\titem.value,\n\t\t\t\t\tconfig.flags.unicode,\n\t\t\t\t\tconfig.flags.ignoreCase\n\t\t\t\t));\n\t\t\t\tbreak;\n\t\t\tcase 'unicodePropertyEscape':\n\t\t\t\tconst nestedData = getUnicodePropertyEscapeCharacterClassData(item.value, item.negative);\n\t\t\t\thandlePositive.nested(data, nestedData);\n\t\t\t\tdata.transformed =\n\t\t\t\t\tdata.transformed ||\n\t\t\t\t\tconfig.transform.unicodePropertyEscapes ||\n\t\t\t\t\t(config.transform.unicodeSetsFlag && nestedData.maybeIncludesStrings);\n\t\t\t\tbreak;\n\t\t\tcase 'characterClass':\n\t\t\t\tconst handler = item.negative ? handleNegative : handlePositive;\n\t\t\t\tconst res = computeCharacterClass(item, regenerateOptions);\n\t\t\t\thandler.nested(data, res);\n\t\t\t\tdata.transformed = true;\n\t\t\t\tbreak;\n\t\t\tcase 'classStrings':\n\t\t\t\thandlePositive.nested(data, computeClassStrings(item, regenerateOptions));\n\t\t\t\tdata.transformed = true;\n\t\t\t\tbreak;\n\t\t\t// The `default` clause is only here as a safeguard; it should never be\n\t\t\t// reached. Code coverage tools should ignore it.\n\t\t\t/* istanbul ignore next */\n\t\t\tdefault:\n\t\t\t\tthrow new Error(`Unknown term type: ${ item.type }`);\n\t\t}\n\n\t\tdata.first = false;\n\t}\n\n\tif (characterClassItem.negative && data.maybeIncludesStrings) {\n\t\tthrow new SyntaxError('Cannot negate set containing strings');\n\t}\n\n\treturn data;\n}\n\nconst processCharacterClass = (\n\tcharacterClassItem,\n\tregenerateOptions,\n\tcomputed = computeCharacterClass(characterClassItem, regenerateOptions)\n) => {\n\tconst negative = characterClassItem.negative;\n\tconst { singleChars, transformed, longStrings } = computed;\n\tif (transformed) {\n\t\tconst setStr = singleChars.toString(regenerateOptions);\n\n\t\tif (negative) {\n\t\t\tif (config.useUnicodeFlag) {\n\t\t\t\tupdate(characterClassItem, `[^${setStr[0] === '[' ? setStr.slice(1, -1) : setStr}]`)\n\t\t\t} else {\n\t\t\t\tif (config.flags.unicode) {\n\t\t\t\t\tif (config.flags.ignoreCase) {\n\t\t\t\t\t\tconst astralCharsSet = singleChars.clone().intersection(ASTRAL_SET);\n\t\t\t\t\t\t// Assumption: singleChars do not contain lone surrogates.\n\t\t\t\t\t\t// Regex like /[^\\ud800]/u is not supported\n\t\t\t\t\t\tconst surrogateOrBMPSetStr = singleChars\n\t\t\t\t\t\t\t.clone()\n\t\t\t\t\t\t\t.remove(astralCharsSet)\n\t\t\t\t\t\t\t.addRange(0xd800, 0xdfff)\n\t\t\t\t\t\t\t.toString({ bmpOnly: true });\n\t\t\t\t\t\t// Don't generate negative lookahead for astral characters\n\t\t\t\t\t\t// because the case folding is not working anyway as we break\n\t\t\t\t\t\t// code points into surrogate pairs.\n\t\t\t\t\t\tconst astralNegativeSetStr = ASTRAL_SET\n\t\t\t\t\t\t\t.clone()\n\t\t\t\t\t\t\t.remove(astralCharsSet)\n\t\t\t\t\t\t\t.toString(regenerateOptions);\n\t\t\t\t\t\t// The transform here does not support lone surrogates.\n\t\t\t\t\t\tupdate(\n\t\t\t\t\t\t\tcharacterClassItem,\n\t\t\t\t\t\t\t`(?!${surrogateOrBMPSetStr})[\\\\s\\\\S]|${astralNegativeSetStr}`\n\t\t\t\t\t\t);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// Generate negative set directly when case folding is not involved.\n\t\t\t\t\t\tupdate(\n\t\t\t\t\t\t\tcharacterClassItem,\n\t\t\t\t\t\t\tUNICODE_SET.clone().remove(singleChars).toString(regenerateOptions)\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tupdate(characterClassItem, `(?!${setStr})[\\\\s\\\\S]`);\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tconst hasEmptyString = longStrings.has('');\n\t\t\tconst pieces = Array.from(longStrings).sort((a, b) => b.length - a.length);\n\n\t\t\tif (setStr !== '[]' || longStrings.size === 0) {\n\t\t\t\tpieces.splice(pieces.length - (hasEmptyString ? 1 : 0), 0, setStr);\n\t\t\t}\n\n\t\t\tupdate(characterClassItem, pieces.join('|'));\n\t\t}\n\t}\n\treturn characterClassItem;\n};\n\nconst assertNoUnmatchedReferences = (groups) => {\n\tconst unmatchedReferencesNames = Object.keys(groups.unmatchedReferences);\n\tif (unmatchedReferencesNames.length > 0) {\n\t\tthrow new Error(`Unknown group names: ${unmatchedReferencesNames}`);\n\t}\n};\n\nconst processModifiers = (item, regenerateOptions, groups) => {\n\tconst enabling = item.modifierFlags.enabling;\n\tconst disabling = item.modifierFlags.disabling;\n\n\tdelete item.modifierFlags;\n\titem.behavior = 'ignore';\n\n\tconst oldData = Object.assign({}, config.modifiersData);\n\n\tenabling.split('').forEach(flag => {\n\t\tconfig.modifiersData[flag] = true;\n\t});\n\tdisabling.split('').forEach(flag => {\n\t\tconfig.modifiersData[flag] = false;\n\t});\n\n\titem.body = item.body.map(term => {\n\t\treturn processTerm(term, regenerateOptions, groups);\n\t});\n\n\tconfig.modifiersData = oldData;\n\n\treturn item;\n}\n\nconst processTerm = (item, regenerateOptions, groups) => {\n\tswitch (item.type) {\n\t\tcase 'dot':\n\t\t\tif (config.transform.unicodeFlag) {\n\t\t\t\tupdate(\n\t\t\t\t\titem,\n\t\t\t\t\tgetUnicodeDotSet(config.flags.dotAll || config.modifiersData.s).toString(regenerateOptions)\n\t\t\t\t);\n\t\t\t} else if (config.transform.dotAllFlag || config.modifiersData.s) {\n\t\t\t\t// TODO: consider changing this at the regenerate level.\n\t\t\t\tupdate(item, '[\\\\s\\\\S]');\n\t\t\t}\n\t\t\tbreak;\n\t\tcase 'characterClass':\n\t\t\titem = processCharacterClass(item, regenerateOptions);\n\t\t\tbreak;\n\t\tcase 'unicodePropertyEscape':\n\t\t\tconst data = getUnicodePropertyEscapeCharacterClassData(item.value, item.negative);\n\t\t\tif (data.maybeIncludesStrings) {\n\t\t\t\tif (!config.flags.unicodeSets) {\n\t\t\t\t\tthrow new Error(\n\t\t\t\t\t\t'Properties of strings are only supported when using the unicodeSets (v) flag.'\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\tif (config.transform.unicodeSetsFlag) {\n\t\t\t\t\tdata.transformed = true;\n\t\t\t\t\titem = processCharacterClass(item, regenerateOptions, data);\n\t\t\t\t}\n\t\t\t} else if (config.transform.unicodePropertyEscapes) {\n\t\t\t\tupdate(\n\t\t\t\t\titem,\n\t\t\t\t\tdata.singleChars.toString(regenerateOptions)\n\t\t\t\t);\n\t\t\t}\n\t\t\tbreak;\n\t\tcase 'characterClassEscape':\n\t\t\tif (config.transform.unicodeFlag) {\n\t\t\t\tupdate(\n\t\t\t\t\titem,\n\t\t\t\t\tgetCharacterClassEscapeSet(\n\t\t\t\t\t\titem.value,\n\t\t\t\t\t\t/* config.transform.unicodeFlag implies config.flags.unicode */ true,\n\t\t\t\t\t\tconfig.flags.ignoreCase\n\t\t\t\t\t).toString(regenerateOptions)\n\t\t\t\t);\n\t\t\t}\n\t\t\tbreak;\n\t\tcase 'group':\n\t\t\tif (item.behavior == 'normal') {\n\t\t\t\tgroups.lastIndex++;\n\t\t\t}\n\t\t\tif (item.name) {\n\t\t\t\tconst name = item.name.value;\n\n\t\t\t\tif (groups.namesConflicts[name]) {\n\t\t\t\t\tthrow new Error(\n\t\t\t\t\t\t`Group '${ name }' has already been defined in this context.`\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\tgroups.namesConflicts[name] = true;\n\n\t\t\t\tif (config.transform.namedGroups) {\n\t\t\t\t\tdelete item.name;\n\t\t\t\t}\n\n\t\t\t\tconst index = groups.lastIndex;\n\t\t\t\tif (!groups.names[name]) {\n\t\t\t\t\tgroups.names[name] = [];\n\t\t\t\t}\n\t\t\t\tgroups.names[name].push(index);\n\n\t\t\t\tif (groups.onNamedGroup) {\n\t\t\t\t\tgroups.onNamedGroup.call(null, name, index);\n\t\t\t\t}\n\n\t\t\t\tif (groups.unmatchedReferences[name]) {\n\t\t\t\t\tdelete groups.unmatchedReferences[name];\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (item.modifierFlags && config.transform.modifiers) {\n\t\t\t\treturn processModifiers(item, regenerateOptions, groups);\n\t\t\t}\n\t\t\t/* falls through */\n\t\tcase 'quantifier':\n\t\t\titem.body = item.body.map(term => {\n\t\t\t\treturn processTerm(term, regenerateOptions, groups);\n\t\t\t});\n\t\t\tbreak;\n\t\tcase 'disjunction':\n\t\t\tconst outerNamesConflicts = groups.namesConflicts;\n\t\t\titem.body = item.body.map(term => {\n\t\t\t\tgroups.namesConflicts = Object.create(outerNamesConflicts);\n\t\t\t\treturn processTerm(term, regenerateOptions, groups);\n\t\t\t});\n\t\t\tbreak;\n\t\tcase 'alternative':\n\t\t\titem.body = flatMap(item.body, term => {\n\t\t\t\tconst res = processTerm(term, regenerateOptions, groups);\n\t\t\t\t// Alternatives cannot contain alternatives; flatten them.\n\t\t\t\treturn res.type === 'alternative' ? res.body : res;\n\t\t\t});\n\t\t\tbreak;\n\t\tcase 'value':\n\t\t\tconst codePoint = item.codePoint;\n\t\t\tconst set = regenerate(codePoint);\n\t\t\tconst folded = maybeFold(codePoint);\n\t\t\tset.add(folded);\n\t\t\tupdate(item, set.toString(regenerateOptions));\n\t\t\tbreak;\n\t\tcase 'reference':\n\t\t\tif (item.name) {\n\t\t\t\tconst name = item.name.value;\n\t\t\t\tconst indexes = groups.names[name];\n\t\t\t\tif (!indexes) {\n\t\t\t\t\tgroups.unmatchedReferences[name] = true;\n\t\t\t\t}\n\n\t\t\t\tif (config.transform.namedGroups) {\n\t\t\t\t\tif (indexes) {\n\t\t\t\t\t\tconst body = indexes.map(index => ({\n\t\t\t\t\t\t\t'type': 'reference',\n\t\t\t\t\t\t\t'matchIndex': index,\n\t\t\t\t\t\t\t'raw': '\\\\' + index,\n\t\t\t\t\t\t}));\n\t\t\t\t\t\tif (body.length === 1) {\n\t\t\t\t\t\t\treturn body[0];\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\t'type': 'alternative',\n\t\t\t\t\t\t\t'body': body,\n\t\t\t\t\t\t\t'raw': body.map(term => term.raw).join(''),\n\t\t\t\t\t\t};\n\t\t\t\t\t}\n\n\t\t\t\t\t// This named reference comes before the group where it’s defined,\n\t\t\t\t\t// so it’s always an empty match.\n\t\t\t\t\treturn {\n\t\t\t\t\t\t'type': 'group',\n\t\t\t\t\t\t'behavior': 'ignore',\n\t\t\t\t\t\t'body': [],\n\t\t\t\t\t\t'raw': '(?:)',\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t}\n\t\t\tbreak;\n\t\tcase 'anchor':\n\t\t\tif (config.modifiersData.m) {\n\t\t\t\tif (item.kind == 'start') {\n\t\t\t\t\tupdate(item, `(?:^|(?<=${NEWLINE_SET.toString()}))`);\n\t\t\t\t} else if (item.kind == 'end') {\n\t\t\t\t\tupdate(item, `(?:$|(?=${NEWLINE_SET.toString()}))`);\n\t\t\t\t}\n\t\t\t}\n\t\tcase 'empty':\n\t\t\t// Nothing to do here.\n\t\t\tbreak;\n\t\t// The `default` clause is only here as a safeguard; it should never be\n\t\t// reached. Code coverage tools should ignore it.\n\t\t/* istanbul ignore next */\n\t\tdefault:\n\t\t\tthrow new Error(`Unknown term type: ${ item.type }`);\n\t}\n\treturn item;\n};\n\nconst config = {\n\t'flags': {\n\t\t'ignoreCase': false,\n\t\t'unicode': false,\n\t\t'unicodeSets': false,\n\t\t'dotAll': false,\n\t\t'multiline': false,\n\t},\n\t'transform': {\n\t\t'dotAllFlag': false,\n\t\t'unicodeFlag': false,\n\t\t'unicodeSetsFlag': false,\n\t\t'unicodePropertyEscapes': false,\n\t\t'namedGroups': false,\n\t\t'modifiers': false,\n\t},\n\t'modifiersData': {\n\t\t'i': undefined,\n\t\t's': undefined,\n\t\t'm': undefined,\n\t},\n\tget useUnicodeFlag() {\n\t\treturn (this.flags.unicode || this.flags.unicodeSets) && !this.transform.unicodeFlag;\n\t}\n};\n\nconst validateOptions = (options) => {\n\tif (!options) return;\n\n\tfor (const key of Object.keys(options)) {\n\t\tconst value = options[key];\n\t\tswitch (key) {\n\t\t\tcase 'dotAllFlag':\n\t\t\tcase 'unicodeFlag':\n\t\t\tcase 'unicodePropertyEscapes':\n\t\t\tcase 'namedGroups':\n\t\t\t\tif (value != null && value !== false && value !== 'transform') {\n\t\t\t\t\tthrow new Error(`.${key} must be false (default) or 'transform'.`);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 'modifiers':\n\t\t\tcase 'unicodeSetsFlag':\n\t\t\t\tif (value != null && value !== false && value !== 'parse' && value !== 'transform') {\n\t\t\t\t\tthrow new Error(`.${key} must be false (default), 'parse' or 'transform'.`);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 'onNamedGroup':\n\t\t\tcase 'onNewFlags':\n\t\t\t\tif (value != null && typeof value !== 'function') {\n\t\t\t\t\tthrow new Error(`.${key} must be a function.`);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tthrow new Error(`.${key} is not a valid regexpu-core option.`);\n\t\t}\n\t}\n};\n\nconst hasFlag = (flags, flag) => flags ? flags.includes(flag) : false;\nconst transform = (options, name) => options ? options[name] === 'transform' : false;\n\nconst rewritePattern = (pattern, flags, options) => {\n\tvalidateOptions(options);\n\n\tconfig.flags.unicode = hasFlag(flags, 'u');\n\tconfig.flags.unicodeSets = hasFlag(flags, 'v');\n\tconfig.flags.ignoreCase = hasFlag(flags, 'i');\n\tconfig.flags.dotAll = hasFlag(flags, 's');\n\tconfig.flags.multiline = hasFlag(flags, 'm');\n\n\tconfig.transform.dotAllFlag = config.flags.dotAll && transform(options, 'dotAllFlag');\n\tconfig.transform.unicodeFlag = (config.flags.unicode || config.flags.unicodeSets) && transform(options, 'unicodeFlag');\n\tconfig.transform.unicodeSetsFlag = config.flags.unicodeSets && transform(options, 'unicodeSetsFlag');\n\n\t// unicodeFlag: 'transform' implies unicodePropertyEscapes: 'transform'\n\tconfig.transform.unicodePropertyEscapes = config.flags.unicode && (\n\t\ttransform(options, 'unicodeFlag') || transform(options, 'unicodePropertyEscapes')\n\t);\n\tconfig.transform.namedGroups = transform(options, 'namedGroups');\n\tconfig.transform.modifiers = transform(options, 'modifiers');\n\n\tconfig.modifiersData.i = undefined;\n\tconfig.modifiersData.s = undefined;\n\tconfig.modifiersData.m = undefined;\n\n\tconst regjsparserFeatures = {\n\t\t'unicodeSet': Boolean(options && options.unicodeSetsFlag),\n\t\t'modifiers': Boolean(options && options.modifiers),\n\n\t\t// Enable every stable RegExp feature by default\n\t\t'unicodePropertyEscape': true,\n\t\t'namedGroups': true,\n\t\t'lookbehind': true,\n\t};\n\n\tconst regenerateOptions = {\n\t\t'hasUnicodeFlag': config.useUnicodeFlag,\n\t\t'bmpOnly': !config.flags.unicode\n\t};\n\n\tconst groups = {\n\t\t'onNamedGroup': options && options.onNamedGroup,\n\t\t'lastIndex': 0,\n\t\t'names': Object.create(null), // { [name]: Array }\n\t\t'namesConflicts': Object.create(null), // { [name]: true }\n\t\t'unmatchedReferences': Object.create(null) // { [name]: true }\n\t};\n\n\tconst tree = parse(pattern, flags, regjsparserFeatures);\n\n\tif (config.transform.modifiers) {\n\t\tif (/\\(\\?[a-z]*-[a-z]+:/.test(pattern)) {\n\t\t\t// the pattern _likely_ contain inline disabled modifiers\n\t\t\t// we need to traverse to make sure that they are actually modifiers and to collect them\n\t\t\tconst allDisabledModifiers = Object.create(null)\n\t\t\tconst itemStack = [tree];\n\t\t\tlet node;\n\t\t\twhile (node = itemStack.pop(), node != undefined) {\n\t\t\t\tif (Array.isArray(node)) {\n\t\t\t\t\tArray.prototype.push.apply(itemStack, node);\n\t\t\t\t} else if (typeof node == 'object' && node != null) {\n\t\t\t\t\tfor (const key of Object.keys(node)) {\n\t\t\t\t\t\tconst value = node[key];\n\t\t\t\t\t\tif (key == 'modifierFlags') {\n\t\t\t\t\t\t\tif (value.disabling.length > 0){\n\t\t\t\t\t\t\t\tvalue.disabling.split('').forEach((flag)=>{\n\t\t\t\t\t\t\t\t\tallDisabledModifiers[flag] = true\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else if (typeof value == 'object' && value != null) {\n\t\t\t\t\t\t\titemStack.push(value);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor (const flag of Object.keys(allDisabledModifiers)) {\n\t\t\t\tconfig.modifiersData[flag] = true;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Note: `processTerm` mutates `tree` and `groups`.\n\tprocessTerm(tree, regenerateOptions, groups);\n\tassertNoUnmatchedReferences(groups);\n\n\tconst onNewFlags = options && options.onNewFlags;\n\tif (onNewFlags) {\n\t\tlet newFlags = flags.split('').filter((flag) => !config.modifiersData[flag]).join('');\n\t\tif (config.transform.unicodeSetsFlag) {\n\t\t\tnewFlags = newFlags.replace('v', 'u');\n\t\t}\n\t\tif (config.transform.unicodeFlag) {\n\t\t\tnewFlags = newFlags.replace('u', '');\n\t\t}\n\t\tif (config.transform.dotAllFlag === 'transform') {\n\t\t\tnewFlags = newFlags.replace('s', '');\n\t\t}\n\t\tonNewFlags(newFlags);\n\t}\n\n\treturn generate(tree);\n};\n\nmodule.exports = rewritePattern;\n","// env vars from the cli are always strings, so !!ENV_VAR returns true for \"false\"\nfunction bool(value) {\n if (value == null) return false;\n return value && value !== \"false\" && value !== \"0\";\n}\n\nmodule.exports = bool(process.env[\"BABEL_8_BREAKING\"])\n ? require(\"semver-BABEL_8_BREAKING-true\")\n : require(\"semver-BABEL_8_BREAKING-false\");\n","export const FEATURES = Object.freeze({\n unicodeFlag: 1 << 0,\n dotAllFlag: 1 << 1,\n unicodePropertyEscape: 1 << 2,\n namedCaptureGroups: 1 << 3,\n // Not used, for backward compatibility with syntax-unicode-sets-regex\n unicodeSetsFlag_syntax: 1 << 4,\n unicodeSetsFlag: 1 << 5,\n duplicateNamedCaptureGroups: 1 << 6,\n modifiers: 1 << 7,\n});\n\n// We can't use a symbol because this needs to always be the same, even if\n// this package isn't deduped by npm. e.g.\n// - node_modules/\n// - @babel/plugin-regexp-features\n// - @babel/plugin-transform-unicode-property-regex\n// - node_modules\n// - @babel-plugin-regexp-features\nexport const featuresKey = \"@babel/plugin-regexp-features/featuresKey\";\nexport const runtimeKey = \"@babel/plugin-regexp-features/runtimeKey\";\n\ntype FeatureType = (typeof FEATURES)[keyof typeof FEATURES];\n\nexport function enableFeature(features: number, feature: FeatureType): number {\n return features | feature;\n}\n\nexport function hasFeature(features: number, feature: FeatureType) {\n return !!(features & feature);\n}\n","import type { types as t } from \"@babel/core\";\nimport { FEATURES, hasFeature } from \"./features.ts\";\n\nimport type { RegexpuOptions } from \"regexpu-core\";\n\nexport function generateRegexpuOptions(\n pattern: string,\n toTransform: number,\n): RegexpuOptions {\n type Experimental = 1;\n\n const feat = (\n name: keyof typeof FEATURES,\n ok: \"transform\" | (Stability extends 0 ? never : \"parse\") = \"transform\",\n ) => {\n return hasFeature(toTransform, FEATURES[name]) ? ok : false;\n };\n\n const featDuplicateNamedGroups = (): \"transform\" | false => {\n if (!feat(\"duplicateNamedCaptureGroups\")) return false;\n\n // This can return false positive, for example for /\\(?\\)/.\n // However, it's such a rare occurrence that it's ok to compile\n // the regexp even if we only need to compile regexps with\n // duplicate named capturing groups.\n const regex = /\\(\\?<([^>]+)>/g;\n const seen = new Set();\n for (let match; (match = regex.exec(pattern)); seen.add(match[1])) {\n if (seen.has(match[1])) return \"transform\";\n }\n return false;\n };\n\n return {\n unicodeFlag: feat(\"unicodeFlag\"),\n unicodeSetsFlag: feat(\"unicodeSetsFlag\") || \"parse\",\n dotAllFlag: feat(\"dotAllFlag\"),\n unicodePropertyEscapes: feat(\"unicodePropertyEscape\"),\n namedGroups: feat(\"namedCaptureGroups\") || featDuplicateNamedGroups(),\n onNamedGroup: () => {},\n modifiers: feat(\"modifiers\"),\n };\n}\n\nexport function canSkipRegexpu(\n node: t.RegExpLiteral,\n options: RegexpuOptions,\n): boolean {\n const { flags, pattern } = node;\n\n if (flags.includes(\"v\")) {\n if (options.unicodeSetsFlag === \"transform\") return false;\n }\n\n if (flags.includes(\"u\")) {\n if (options.unicodeFlag === \"transform\") return false;\n if (\n options.unicodePropertyEscapes === \"transform\" &&\n /\\\\p\\{/i.test(pattern)\n ) {\n return false;\n }\n }\n\n if (flags.includes(\"s\")) {\n if (options.dotAllFlag === \"transform\") return false;\n }\n\n if (options.namedGroups === \"transform\" && /\\(\\?<(?![=!])/.test(pattern)) {\n return false;\n }\n\n if (options.modifiers === \"transform\" && /\\(\\?[\\w-]+:/.test(pattern)) {\n return false;\n }\n\n return true;\n}\n\nexport function transformFlags(regexpuOptions: RegexpuOptions, flags: string) {\n if (regexpuOptions.unicodeSetsFlag === \"transform\") {\n flags = flags.replace(\"v\", \"u\");\n }\n if (regexpuOptions.unicodeFlag === \"transform\") {\n flags = flags.replace(\"u\", \"\");\n }\n if (regexpuOptions.dotAllFlag === \"transform\") {\n flags = flags.replace(\"s\", \"\");\n }\n return flags;\n}\n","import rewritePattern from \"regexpu-core\";\nimport { types as t, type PluginObject, type NodePath } from \"@babel/core\";\nimport annotateAsPure from \"@babel/helper-annotate-as-pure\";\n\nimport semver from \"semver\";\n\nimport {\n featuresKey,\n FEATURES,\n enableFeature,\n runtimeKey,\n hasFeature,\n} from \"./features.ts\";\nimport {\n generateRegexpuOptions,\n canSkipRegexpu,\n transformFlags,\n} from \"./util.ts\";\n\nconst versionKey = \"@babel/plugin-regexp-features/version\";\n\nexport interface Options {\n name: string;\n feature: keyof typeof FEATURES;\n options?: {\n useUnicodeFlag?: boolean;\n runtime?: boolean;\n };\n manipulateOptions?: PluginObject[\"manipulateOptions\"];\n}\n\nexport function createRegExpFeaturePlugin({\n name,\n feature,\n options = {},\n manipulateOptions = () => {},\n}: Options): PluginObject {\n return {\n name,\n\n manipulateOptions,\n\n pre() {\n const { file } = this;\n const features = file.get(featuresKey) ?? 0;\n let newFeatures = enableFeature(features, FEATURES[feature]);\n\n const { useUnicodeFlag, runtime } = options;\n if (useUnicodeFlag === false) {\n newFeatures = enableFeature(newFeatures, FEATURES.unicodeFlag);\n }\n if (newFeatures !== features) {\n file.set(featuresKey, newFeatures);\n }\n\n if (runtime !== undefined) {\n if (\n file.has(runtimeKey) &&\n file.get(runtimeKey) !== runtime &&\n (process.env.BABEL_8_BREAKING ||\n // This check. Is necessary because in Babel 7 we allow multiple\n // copies of transform-named-capturing-groups-regex with\n // conflicting 'runtime' options.\n hasFeature(newFeatures, FEATURES.duplicateNamedCaptureGroups))\n ) {\n throw new Error(\n `The 'runtime' option must be the same for ` +\n `'@babel/plugin-transform-named-capturing-groups-regex' and ` +\n `'@babel/plugin-transform-duplicate-named-capturing-groups-regex'.`,\n );\n }\n\n if (process.env.BABEL_8_BREAKING) {\n file.set(runtimeKey, runtime);\n } else if (\n // This check. Is necessary because in Babel 7 we allow multiple\n // copies of transform-named-capturing-groups-regex with\n // conflicting 'runtime' options.\n feature === \"namedCaptureGroups\"\n ) {\n if (!runtime || !file.has(runtimeKey)) file.set(runtimeKey, runtime);\n } else {\n file.set(runtimeKey, runtime);\n }\n }\n\n if (!process.env.BABEL_8_BREAKING) {\n // Until 7.21.4, we used to encode the version as a number.\n // If file.get(versionKey) is a number, it has thus been\n // set by an older version of this plugin.\n if (typeof file.get(versionKey) === \"number\") {\n file.set(versionKey, PACKAGE_JSON.version);\n return;\n }\n }\n if (\n !file.get(versionKey) ||\n semver.lt(file.get(versionKey), PACKAGE_JSON.version)\n ) {\n file.set(versionKey, PACKAGE_JSON.version);\n }\n },\n\n visitor: {\n RegExpLiteral(path) {\n const { node } = path;\n const { file } = this;\n const features = file.get(featuresKey);\n const runtime = file.get(runtimeKey) ?? true;\n\n const regexpuOptions = generateRegexpuOptions(node.pattern, features);\n if (canSkipRegexpu(node, regexpuOptions)) {\n return;\n }\n\n const namedCaptureGroups: Record = {\n __proto__: null,\n };\n if (regexpuOptions.namedGroups === \"transform\") {\n regexpuOptions.onNamedGroup = (name, index) => {\n const prev = namedCaptureGroups[name];\n if (typeof prev === \"number\") {\n namedCaptureGroups[name] = [prev, index];\n } else if (Array.isArray(prev)) {\n prev.push(index);\n } else {\n namedCaptureGroups[name] = index;\n }\n };\n }\n\n let newFlags;\n if (regexpuOptions.modifiers === \"transform\") {\n regexpuOptions.onNewFlags = flags => {\n newFlags = flags;\n };\n }\n\n node.pattern = rewritePattern(node.pattern, node.flags, regexpuOptions);\n\n if (\n regexpuOptions.namedGroups === \"transform\" &&\n Object.keys(namedCaptureGroups).length > 0 &&\n runtime &&\n !isRegExpTest(path)\n ) {\n const call = t.callExpression(this.addHelper(\"wrapRegExp\"), [\n node,\n t.valueToNode(namedCaptureGroups),\n ]);\n annotateAsPure(call);\n\n path.replaceWith(call);\n }\n\n node.flags = transformFlags(regexpuOptions, newFlags ?? node.flags);\n },\n },\n };\n}\n\nfunction isRegExpTest(path: NodePath) {\n return (\n path.parentPath.isMemberExpression({\n object: path.node,\n computed: false,\n }) && path.parentPath.get(\"property\").isIdentifier({ name: \"test\" })\n );\n}\n","/* eslint-disable @babel/development/plugin-name */\nimport { createRegExpFeaturePlugin } from \"@babel/helper-create-regexp-features-plugin\";\nimport { declare } from \"@babel/helper-plugin-utils\";\n\nexport interface Options {\n runtime?: boolean;\n}\n\nexport default declare((api, options: Options) => {\n api.assertVersion(REQUIRED_VERSION(\"^7.19.0\"));\n\n const { runtime } = options;\n if (runtime !== undefined && typeof runtime !== \"boolean\") {\n throw new Error(\"The 'runtime' option must be boolean\");\n }\n\n return createRegExpFeaturePlugin({\n name: \"transform-duplicate-named-capturing-groups-regex\",\n feature: \"duplicateNamedCaptureGroups\",\n options: { runtime },\n });\n});\n","import { declare } from \"@babel/helper-plugin-utils\";\n\nconst SUPPORTED_MODULES = [\"commonjs\", \"amd\", \"systemjs\"];\n\nconst MODULES_NOT_FOUND = `\\\n@babel/plugin-transform-dynamic-import depends on a modules\ntransform plugin. Supported plugins are:\n - @babel/plugin-transform-modules-commonjs ^7.4.0\n - @babel/plugin-transform-modules-amd ^7.4.0\n - @babel/plugin-transform-modules-systemjs ^7.4.0\n\nIf you are using Webpack or Rollup and thus don't want\nBabel to transpile your imports and exports, you can use\nthe @babel/plugin-syntax-dynamic-import plugin and let your\nbundler handle dynamic imports.\n`;\n\nexport default declare(api => {\n api.assertVersion(REQUIRED_VERSION(7));\n\n return {\n name: \"transform-dynamic-import\",\n inherits:\n USE_ESM || IS_STANDALONE || api.version[0] === \"8\"\n ? undefined\n : // eslint-disable-next-line no-restricted-globals\n require(\"@babel/plugin-syntax-dynamic-import\").default,\n\n pre() {\n // We keep using the old name, for compatibility with older\n // version of the CommonJS transform.\n this.file.set(\n \"@babel/plugin-proposal-dynamic-import\",\n PACKAGE_JSON.version,\n );\n },\n\n visitor: {\n Program() {\n const modules = this.file.get(\"@babel/plugin-transform-modules-*\");\n\n if (!SUPPORTED_MODULES.includes(modules)) {\n throw new Error(MODULES_NOT_FOUND);\n }\n },\n },\n };\n});\n","import { declare } from \"@babel/helper-plugin-utils\";\nimport syntaxExportDefaultFrom from \"@babel/plugin-syntax-export-default-from\";\nimport { types as t } from \"@babel/core\";\n\nexport default declare(api => {\n api.assertVersion(REQUIRED_VERSION(7));\n\n return {\n name: \"proposal-export-default-from\",\n inherits: syntaxExportDefaultFrom,\n\n visitor: {\n ExportNamedDeclaration(path) {\n const { node } = path;\n const { specifiers, source } = node;\n if (!t.isExportDefaultSpecifier(specifiers[0])) return;\n\n const { exported } = specifiers.shift();\n\n if (specifiers.every(s => t.isExportSpecifier(s))) {\n specifiers.unshift(\n t.exportSpecifier(t.identifier(\"default\"), exported),\n );\n return;\n }\n\n path.insertBefore(\n t.exportNamedDeclaration(\n null,\n [t.exportSpecifier(t.identifier(\"default\"), exported)],\n t.cloneNode(source),\n ),\n );\n },\n },\n };\n});\n","import { declare } from \"@babel/helper-plugin-utils\";\nimport { types as t } from \"@babel/core\";\n\nexport default declare(api => {\n api.assertVersion(REQUIRED_VERSION(7));\n\n return {\n name: \"transform-export-namespace-from\",\n inherits:\n USE_ESM || IS_STANDALONE || api.version[0] === \"8\"\n ? undefined\n : // eslint-disable-next-line no-restricted-globals\n require(\"@babel/plugin-syntax-export-namespace-from\").default,\n\n visitor: {\n ExportNamedDeclaration(path) {\n const { node, scope } = path;\n const { specifiers } = node;\n\n const index = t.isExportDefaultSpecifier(specifiers[0]) ? 1 : 0;\n if (!t.isExportNamespaceSpecifier(specifiers[index])) return;\n\n const nodes = [];\n\n if (index === 1) {\n nodes.push(\n t.exportNamedDeclaration(null, [specifiers.shift()], node.source),\n );\n }\n\n const specifier = specifiers.shift();\n const { exported } = specifier;\n const uid = scope.generateUidIdentifier(\n // @ts-expect-error Identifier ?? StringLiteral\n exported.name ?? exported.value,\n );\n\n nodes.push(\n t.importDeclaration(\n [t.importNamespaceSpecifier(uid)],\n t.cloneNode(node.source),\n ),\n t.exportNamedDeclaration(null, [\n t.exportSpecifier(t.cloneNode(uid), exported),\n ]),\n );\n\n if (node.specifiers.length >= 1) {\n nodes.push(node);\n }\n\n const [importDeclaration] = path.replaceWithMultiple(nodes);\n path.scope.registerDeclaration(importDeclaration);\n },\n },\n };\n});\n","import { declare } from \"@babel/helper-plugin-utils\";\nimport syntaxFunctionBind from \"@babel/plugin-syntax-function-bind\";\nimport { types as t, type Scope } from \"@babel/core\";\n\nexport default declare(api => {\n api.assertVersion(REQUIRED_VERSION(7));\n\n function getTempId(scope: Scope) {\n let id = scope.path.getData(\"functionBind\");\n if (id) return t.cloneNode(id);\n\n id = scope.generateDeclaredUidIdentifier(\"context\");\n return scope.path.setData(\"functionBind\", id);\n }\n\n function getObject(bind: t.BindExpression) {\n if (t.isExpression(bind.object)) {\n return bind.object;\n }\n\n return (bind.callee as t.MemberExpression).object;\n }\n\n function getStaticContext(bind: t.BindExpression, scope: Scope) {\n const object = getObject(bind);\n return (\n scope.isStatic(object) &&\n (t.isSuper(object) ? t.thisExpression() : object)\n );\n }\n\n function inferBindContext(bind: t.BindExpression, scope: Scope) {\n const staticContext = getStaticContext(bind, scope);\n if (staticContext) return t.cloneNode(staticContext);\n\n const tempId = getTempId(scope);\n if (bind.object) {\n bind.callee = t.sequenceExpression([\n t.assignmentExpression(\"=\", tempId, bind.object),\n bind.callee,\n ]);\n } else if (t.isMemberExpression(bind.callee)) {\n bind.callee.object = t.assignmentExpression(\n \"=\",\n tempId,\n // @ts-ignore(Babel 7 vs Babel 8) Fixme: support `super.foo(?)`\n bind.callee.object,\n );\n }\n return t.cloneNode(tempId);\n }\n\n return {\n name: \"proposal-function-bind\",\n inherits: syntaxFunctionBind,\n\n visitor: {\n CallExpression({ node, scope }) {\n const bind = node.callee;\n if (!t.isBindExpression(bind)) return;\n\n const context = inferBindContext(bind, scope);\n node.callee = t.memberExpression(bind.callee, t.identifier(\"call\"));\n node.arguments.unshift(context);\n },\n\n BindExpression(path) {\n const { node, scope } = path;\n const context = inferBindContext(node, scope);\n path.replaceWith(\n t.callExpression(\n t.memberExpression(node.callee, t.identifier(\"bind\")),\n [context],\n ),\n );\n },\n },\n };\n});\n","import { declare } from \"@babel/helper-plugin-utils\";\nimport syntaxFunctionSent from \"@babel/plugin-syntax-function-sent\";\nimport wrapFunction from \"@babel/helper-wrap-function\";\nimport { types as t, type Visitor } from \"@babel/core\";\n\nexport default declare(api => {\n api.assertVersion(REQUIRED_VERSION(7));\n\n const isFunctionSent = (node: t.MetaProperty) =>\n t.isIdentifier(node.meta, { name: \"function\" }) &&\n t.isIdentifier(node.property, { name: \"sent\" });\n\n const hasBeenReplaced = (\n node: t.Node,\n sentId: string,\n ): node is t.AssignmentExpression =>\n t.isAssignmentExpression(node) &&\n t.isIdentifier(node.left, { name: sentId });\n\n const yieldVisitor: Visitor<{ sentId: string }> = {\n Function(path) {\n path.skip();\n },\n\n YieldExpression(path) {\n if (!hasBeenReplaced(path.parent, this.sentId)) {\n path.replaceWith(\n t.assignmentExpression(\"=\", t.identifier(this.sentId), path.node),\n );\n }\n },\n\n MetaProperty(path) {\n if (isFunctionSent(path.node)) {\n path.replaceWith(t.identifier(this.sentId));\n }\n },\n };\n\n return {\n name: \"proposal-function-sent\",\n inherits: syntaxFunctionSent,\n\n visitor: {\n MetaProperty(path, state) {\n if (!isFunctionSent(path.node)) return;\n\n const fnPath = path.getFunctionParent();\n\n if (!fnPath.node.generator) {\n throw new Error(\"Parent generator function not found\");\n }\n\n const sentId = path.scope.generateUid(\"function.sent\");\n\n fnPath.traverse(yieldVisitor, { sentId });\n // @ts-expect-error A generator must not be an arrow function\n fnPath.node.body.body.unshift(\n t.variableDeclaration(\"let\", [\n t.variableDeclarator(t.identifier(sentId), t.yieldExpression()),\n ]),\n );\n\n wrapFunction(fnPath, state.addHelper(\"skipFirstGeneratorNext\"));\n },\n },\n };\n});\n","import { declare } from \"@babel/helper-plugin-utils\";\nimport type { NodePath, types as t } from \"@babel/core\";\n\nexport default declare(api => {\n api.assertVersion(REQUIRED_VERSION(7));\n const regex = /(\\\\*)([\\u2028\\u2029])/g;\n function replace(match: string, escapes: string, separator: string) {\n // If there's an odd number, that means the separator itself was escaped.\n // \"\\X\" escapes X.\n // \"\\\\X\" escapes the backslash, so X is unescaped.\n const isEscaped = escapes.length % 2 === 1;\n if (isEscaped) return match;\n\n return `${escapes}\\\\u${separator.charCodeAt(0).toString(16)}`;\n }\n\n return {\n name: \"transform-json-strings\",\n inherits:\n USE_ESM || IS_STANDALONE || api.version[0] === \"8\"\n ? undefined\n : // eslint-disable-next-line no-restricted-globals\n require(\"@babel/plugin-syntax-json-strings\").default,\n\n visitor: {\n \"DirectiveLiteral|StringLiteral\"({\n node,\n }: NodePath) {\n const { extra } = node;\n if (!extra?.raw) return;\n\n extra.raw = (extra.raw as string).replace(regex, replace);\n },\n },\n };\n});\n","import { declare } from \"@babel/helper-plugin-utils\";\nimport { types as t } from \"@babel/core\";\n\nexport default declare(api => {\n api.assertVersion(REQUIRED_VERSION(7));\n\n return {\n name: \"transform-logical-assignment-operators\",\n inherits:\n USE_ESM || IS_STANDALONE || api.version[0] === \"8\"\n ? undefined\n : // eslint-disable-next-line no-restricted-globals\n require(\"@babel/plugin-syntax-logical-assignment-operators\").default,\n\n visitor: {\n AssignmentExpression(path) {\n const { node, scope } = path;\n const { operator, left, right } = node;\n const operatorTrunc = operator.slice(0, -1);\n if (!t.LOGICAL_OPERATORS.includes(operatorTrunc)) {\n return;\n }\n\n const lhs = t.cloneNode(left) as t.Identifier | t.MemberExpression;\n if (t.isMemberExpression(left)) {\n const { object, property, computed } = left;\n const memo = scope.maybeGenerateMemoised(object);\n if (memo) {\n left.object = memo;\n (lhs as t.MemberExpression).object = t.assignmentExpression(\n \"=\",\n t.cloneNode(memo),\n // object must not be Super when `memo` is an identifier\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion\n object as t.Expression,\n );\n }\n\n if (computed) {\n const memo = scope.maybeGenerateMemoised(property);\n if (memo) {\n left.property = memo;\n (lhs as t.MemberExpression).property = t.assignmentExpression(\n \"=\",\n t.cloneNode(memo),\n // @ts-expect-error todo(flow->ts): property can be t.PrivateName\n property,\n );\n }\n }\n }\n\n path.replaceWith(\n t.logicalExpression(\n // @ts-expect-error operatorTrunc has been tested by t.LOGICAL_OPERATORS\n operatorTrunc,\n lhs,\n t.assignmentExpression(\"=\", left, right),\n ),\n );\n },\n },\n };\n});\n","import { declare } from \"@babel/helper-plugin-utils\";\nimport { types as t, template } from \"@babel/core\";\n\nexport interface Options {\n loose?: boolean;\n}\n\nexport default declare((api, { loose = false }: Options) => {\n api.assertVersion(REQUIRED_VERSION(7));\n const noDocumentAll = api.assumption(\"noDocumentAll\") ?? loose;\n\n return {\n name: \"transform-nullish-coalescing-operator\",\n inherits:\n USE_ESM || IS_STANDALONE || api.version[0] === \"8\"\n ? undefined\n : // eslint-disable-next-line no-restricted-globals\n require(\"@babel/plugin-syntax-nullish-coalescing-operator\").default,\n\n visitor: {\n LogicalExpression(path) {\n const { node, scope } = path;\n if (node.operator !== \"??\") {\n return;\n }\n\n let ref;\n let assignment;\n // skip creating extra reference when `left` is static\n if (scope.isStatic(node.left)) {\n ref = node.left;\n assignment = t.cloneNode(node.left);\n } else if (scope.path.isPattern()) {\n // Replace `function (a, x = a.b ?? c) {}` to `function (a, x = (() => a.b ?? c)() ){}`\n // so the temporary variable can be injected in correct scope\n path.replaceWith(template.statement.ast`(() => ${path.node})()`);\n // The injected nullish expression will be queued and eventually transformed when visited\n return;\n } else {\n ref = scope.generateUidIdentifierBasedOnNode(node.left);\n scope.push({ id: t.cloneNode(ref) });\n assignment = t.assignmentExpression(\"=\", ref, node.left);\n }\n\n path.replaceWith(\n t.conditionalExpression(\n // We cannot use `!= null` in spec mode because\n // `document.all == null` and `document.all` is not \"nullish\".\n noDocumentAll\n ? t.binaryExpression(\"!=\", assignment, t.nullLiteral())\n : t.logicalExpression(\n \"&&\",\n t.binaryExpression(\"!==\", assignment, t.nullLiteral()),\n t.binaryExpression(\n \"!==\",\n t.cloneNode(ref),\n scope.buildUndefinedNode(),\n ),\n ),\n t.cloneNode(ref),\n node.right,\n ),\n );\n },\n },\n };\n});\n","import { declare } from \"@babel/helper-plugin-utils\";\nimport type { NodePath, types as t } from \"@babel/core\";\n\n/**\n * Given a bigIntLiteral or NumericLiteral, remove numeric\n * separator `_` from its raw representation\n *\n * @param {NodePath} { node }: A Babel AST node path\n */\nfunction remover({ node }: NodePath) {\n const { extra } = node;\n // @ts-expect-error todo(flow->ts)\n if (extra?.raw?.includes(\"_\")) {\n // @ts-expect-error todo(flow->ts)\n extra.raw = extra.raw.replace(/_/g, \"\");\n }\n}\n\nexport default declare(api => {\n api.assertVersion(REQUIRED_VERSION(7));\n\n return {\n name: \"transform-numeric-separator\",\n inherits:\n USE_ESM || IS_STANDALONE || api.version[0] === \"8\"\n ? undefined\n : // eslint-disable-next-line no-restricted-globals\n require(\"@babel/plugin-syntax-numeric-separator\").default,\n\n visitor: {\n NumericLiteral: remover,\n BigIntLiteral: remover,\n },\n };\n});\n","import type { types as t } from \"@babel/core\";\n\n/**\n * This is a helper function to determine if we should create an intermediate variable\n * such that the RHS of an assignment is not duplicated.\n *\n * See https://github.com/babel/babel/pull/13711#issuecomment-914388382 for discussion\n * on further optimizations.\n */\nexport default function shouldStoreRHSInTemporaryVariable(\n node: t.LVal,\n): boolean {\n if (!node) return false;\n if (node.type === \"ArrayPattern\") {\n const nonNullElements = node.elements.filter(element => element !== null);\n if (nonNullElements.length > 1) return true;\n else return shouldStoreRHSInTemporaryVariable(nonNullElements[0]);\n } else if (node.type === \"ObjectPattern\") {\n const { properties } = node;\n if (properties.length > 1) return true;\n else if (properties.length === 0) return false;\n else {\n const firstProperty = properties[0];\n if (firstProperty.type === \"ObjectProperty\") {\n // the value of the property must be an LVal\n return shouldStoreRHSInTemporaryVariable(firstProperty.value as t.LVal);\n } else {\n return shouldStoreRHSInTemporaryVariable(firstProperty);\n }\n }\n } else if (node.type === \"AssignmentPattern\") {\n return shouldStoreRHSInTemporaryVariable(node.left);\n } else if (node.type === \"RestElement\") {\n if (node.argument.type === \"Identifier\") return true;\n return shouldStoreRHSInTemporaryVariable(node.argument);\n } else {\n // node is Identifier or MemberExpression\n return false;\n }\n}\n","export default {\n \"Object.assign\": {\n chrome: \"49\",\n opera: \"36\",\n edge: \"13\",\n firefox: \"36\",\n safari: \"10\",\n node: \"6\",\n deno: \"1\",\n ios: \"10\",\n samsung: \"5\",\n opera_mobile: \"36\",\n electron: \"0.37\",\n },\n};\n","import { declare } from \"@babel/helper-plugin-utils\";\nimport { types as t } from \"@babel/core\";\nimport type { PluginPass, NodePath, Scope } from \"@babel/core\";\nimport { convertFunctionParams } from \"@babel/plugin-transform-parameters\";\nimport { isRequired } from \"@babel/helper-compilation-targets\";\nimport shouldStoreRHSInTemporaryVariable from \"./shouldStoreRHSInTemporaryVariable.ts\";\nimport compatData from \"./compat-data.ts\";\n\nconst { isAssignmentPattern, isObjectProperty } = t;\n// @babel/types <=7.3.3 counts FOO as referenced in var { x: FOO }.\n// We need to detect this bug to know if \"unused\" means 0 or 1 references.\nif (!process.env.BABEL_8_BREAKING) {\n const node = t.identifier(\"a\");\n const property = t.objectProperty(t.identifier(\"key\"), node);\n const pattern = t.objectPattern([property]);\n\n // eslint-disable-next-line no-var\n var ZERO_REFS = t.isReferenced(node, property, pattern) ? 1 : 0;\n}\n\ntype Param = NodePath;\nexport interface Options {\n useBuiltIns?: boolean;\n loose?: boolean;\n}\n\nexport default declare((api, opts: Options) => {\n api.assertVersion(REQUIRED_VERSION(7));\n\n const targets = api.targets();\n const supportsObjectAssign = !isRequired(\"Object.assign\", targets, {\n compatData,\n });\n\n const { useBuiltIns = supportsObjectAssign, loose = false } = opts;\n\n if (typeof loose !== \"boolean\") {\n throw new Error(\".loose must be a boolean, or undefined\");\n }\n\n const ignoreFunctionLength = api.assumption(\"ignoreFunctionLength\") ?? loose;\n const objectRestNoSymbols = api.assumption(\"objectRestNoSymbols\") ?? loose;\n const pureGetters = api.assumption(\"pureGetters\") ?? loose;\n const setSpreadProperties = api.assumption(\"setSpreadProperties\") ?? loose;\n\n function getExtendsHelper(\n file: PluginPass,\n ): t.MemberExpression | t.Identifier {\n return useBuiltIns\n ? t.memberExpression(t.identifier(\"Object\"), t.identifier(\"assign\"))\n : file.addHelper(\"extends\");\n }\n\n function hasRestElement(path: Param) {\n let foundRestElement = false;\n visitRestElements(path, restElement => {\n foundRestElement = true;\n restElement.stop();\n });\n return foundRestElement;\n }\n\n function hasObjectPatternRestElement(path: NodePath): boolean {\n let foundRestElement = false;\n visitRestElements(path, restElement => {\n if (restElement.parentPath.isObjectPattern()) {\n foundRestElement = true;\n restElement.stop();\n }\n });\n return foundRestElement;\n }\n\n function visitRestElements(\n path: NodePath,\n visitor: (path: NodePath) => any,\n ) {\n path.traverse({\n Expression(path) {\n const { parent, key } = path;\n if (\n (isAssignmentPattern(parent) && key === \"right\") ||\n (isObjectProperty(parent) && parent.computed && key === \"key\")\n ) {\n path.skip();\n }\n },\n RestElement: visitor,\n });\n }\n\n function hasSpread(node: t.ObjectExpression): boolean {\n for (const prop of node.properties) {\n if (t.isSpreadElement(prop)) {\n return true;\n }\n }\n return false;\n }\n\n // returns an array of all keys of an object, and a status flag indicating if all extracted keys\n // were converted to stringLiterals or not\n // e.g. extracts {keys: [\"a\", \"b\", \"3\", ++x], allPrimitives: false }\n // from ast of {a: \"foo\", b, 3: \"bar\", [++x]: \"baz\"}\n // `allPrimitives: false` doesn't necessarily mean that there is a non-primitive, but just\n // that we are not sure.\n function extractNormalizedKeys(node: t.ObjectPattern) {\n // RestElement has been removed in createObjectRest\n const props = node.properties as t.ObjectProperty[];\n const keys: t.Expression[] = [];\n let allPrimitives = true;\n let hasTemplateLiteral = false;\n\n for (const prop of props) {\n const { key } = prop;\n if (t.isIdentifier(key) && !prop.computed) {\n // since a key {a: 3} is equivalent to {\"a\": 3}, use the latter\n keys.push(t.stringLiteral(key.name));\n } else if (t.isTemplateLiteral(key)) {\n keys.push(t.cloneNode(key));\n hasTemplateLiteral = true;\n } else if (t.isLiteral(key)) {\n keys.push(\n t.stringLiteral(\n String(\n // @ts-expect-error prop.key can not be a NullLiteral\n key.value,\n ),\n ),\n );\n } else {\n // @ts-expect-error private name has been handled by destructuring-private\n keys.push(t.cloneNode(key));\n\n if (\n (t.isMemberExpression(key, { computed: false }) &&\n t.isIdentifier(key.object, { name: \"Symbol\" })) ||\n (t.isCallExpression(key) &&\n t.matchesPattern(key.callee, \"Symbol.for\"))\n ) {\n // there all return a primitive\n } else {\n allPrimitives = false;\n }\n }\n }\n\n return { keys, allPrimitives, hasTemplateLiteral };\n }\n\n // replaces impure computed keys with new identifiers\n // and returns variable declarators of these new identifiers\n function replaceImpureComputedKeys(\n properties: NodePath[],\n scope: Scope,\n ) {\n const impureComputedPropertyDeclarators: t.VariableDeclarator[] = [];\n for (const propPath of properties) {\n // PrivateName is handled in destructuring-private plugin\n const key = propPath.get(\"key\") as NodePath;\n if (propPath.node.computed && !key.isPure()) {\n const name = scope.generateUidBasedOnNode(key.node);\n const declarator = t.variableDeclarator(t.identifier(name), key.node);\n impureComputedPropertyDeclarators.push(declarator);\n key.replaceWith(t.identifier(name));\n }\n }\n return impureComputedPropertyDeclarators;\n }\n\n function removeUnusedExcludedKeys(path: NodePath): void {\n const bindings = path.getOuterBindingIdentifierPaths();\n\n Object.keys(bindings).forEach(bindingName => {\n const bindingParentPath = bindings[bindingName].parentPath;\n if (\n path.scope.getBinding(bindingName).references >\n (process.env.BABEL_8_BREAKING ? 0 : ZERO_REFS) ||\n !bindingParentPath.isObjectProperty()\n ) {\n return;\n }\n bindingParentPath.remove();\n });\n }\n\n //expects path to an object pattern\n function createObjectRest(\n path: NodePath,\n file: PluginPass,\n objRef: t.Identifier | t.MemberExpression,\n ): [t.VariableDeclarator[], t.LVal, t.CallExpression] {\n const props = path.get(\"properties\");\n const last = props[props.length - 1];\n t.assertRestElement(last.node);\n const restElement = t.cloneNode(last.node);\n last.remove();\n\n const impureComputedPropertyDeclarators = replaceImpureComputedKeys(\n path.get(\"properties\") as NodePath[],\n path.scope,\n );\n const { keys, allPrimitives, hasTemplateLiteral } = extractNormalizedKeys(\n path.node,\n );\n\n if (keys.length === 0) {\n return [\n impureComputedPropertyDeclarators,\n restElement.argument,\n t.callExpression(getExtendsHelper(file), [\n t.objectExpression([]),\n t.sequenceExpression([\n t.callExpression(file.addHelper(\"objectDestructuringEmpty\"), [\n t.cloneNode(objRef),\n ]),\n t.cloneNode(objRef),\n ]),\n ]),\n ];\n }\n\n let keyExpression;\n if (!allPrimitives) {\n // map to toPropertyKey to handle the possible non-string values\n keyExpression = t.callExpression(\n t.memberExpression(t.arrayExpression(keys), t.identifier(\"map\")),\n [file.addHelper(\"toPropertyKey\")],\n );\n } else {\n keyExpression = t.arrayExpression(keys);\n\n if (!hasTemplateLiteral && !t.isProgram(path.scope.block)) {\n // Hoist definition of excluded keys, so that it's not created each time.\n const program = path.findParent(path => path.isProgram());\n const id = path.scope.generateUidIdentifier(\"excluded\");\n\n program.scope.push({\n id,\n init: keyExpression,\n kind: \"const\",\n });\n\n keyExpression = t.cloneNode(id);\n }\n }\n\n return [\n impureComputedPropertyDeclarators,\n restElement.argument,\n t.callExpression(\n file.addHelper(\n `objectWithoutProperties${objectRestNoSymbols ? \"Loose\" : \"\"}`,\n ),\n [t.cloneNode(objRef), keyExpression],\n ),\n ];\n }\n\n function replaceRestElement(\n parentPath: NodePath,\n paramPath: NodePath<\n t.Function[\"params\"][number] | t.AssignmentPattern[\"left\"]\n >,\n container?: t.VariableDeclaration[],\n ): void {\n if (paramPath.isAssignmentPattern()) {\n replaceRestElement(parentPath, paramPath.get(\"left\"), container);\n return;\n }\n\n if (paramPath.isArrayPattern() && hasRestElement(paramPath)) {\n const elements = paramPath.get(\"elements\");\n\n for (let i = 0; i < elements.length; i++) {\n replaceRestElement(parentPath, elements[i], container);\n }\n }\n\n if (paramPath.isObjectPattern() && hasRestElement(paramPath)) {\n const uid = parentPath.scope.generateUidIdentifier(\"ref\");\n\n const declar = t.variableDeclaration(\"let\", [\n t.variableDeclarator(paramPath.node, uid),\n ]);\n\n if (container) {\n container.push(declar);\n } else {\n parentPath.ensureBlock();\n (parentPath.get(\"body\") as NodePath).unshiftContainer(\n \"body\",\n declar,\n );\n }\n paramPath.replaceWith(t.cloneNode(uid));\n }\n }\n\n return {\n name: \"transform-object-rest-spread\",\n inherits:\n USE_ESM || IS_STANDALONE || api.version[0] === \"8\"\n ? undefined\n : // eslint-disable-next-line no-restricted-globals\n require(\"@babel/plugin-syntax-object-rest-spread\").default,\n\n visitor: {\n // function a({ b, ...c }) {}\n Function(path) {\n const params = path.get(\"params\");\n const paramsWithRestElement = new Set();\n const idsInRestParams = new Set();\n for (let i = 0; i < params.length; ++i) {\n const param = params[i];\n if (hasRestElement(param)) {\n paramsWithRestElement.add(i);\n for (const name of Object.keys(param.getBindingIdentifiers())) {\n idsInRestParams.add(name);\n }\n }\n }\n\n // if true, a parameter exists that has an id in its initializer\n // that is also an id bound in a rest parameter\n // example: f({...R}, a = R)\n let idInRest = false;\n\n const IdentifierHandler = function (\n path: NodePath,\n functionScope: Scope,\n ) {\n const name = path.node.name;\n if (\n path.scope.getBinding(name) === functionScope.getBinding(name) &&\n idsInRestParams.has(name)\n ) {\n idInRest = true;\n path.stop();\n }\n };\n\n let i: number;\n for (i = 0; i < params.length && !idInRest; ++i) {\n const param = params[i];\n if (!paramsWithRestElement.has(i)) {\n if (param.isReferencedIdentifier() || param.isBindingIdentifier()) {\n IdentifierHandler(param, path.scope);\n } else {\n param.traverse(\n {\n \"Scope|TypeAnnotation|TSTypeAnnotation\": path => path.skip(),\n \"ReferencedIdentifier|BindingIdentifier\": IdentifierHandler,\n },\n path.scope,\n );\n }\n }\n }\n\n if (!idInRest) {\n for (let i = 0; i < params.length; ++i) {\n const param = params[i];\n if (paramsWithRestElement.has(i)) {\n replaceRestElement(path, param);\n }\n }\n } else {\n const shouldTransformParam = (idx: number) =>\n idx >= i - 1 || paramsWithRestElement.has(idx);\n convertFunctionParams(\n path,\n ignoreFunctionLength,\n shouldTransformParam,\n replaceRestElement,\n );\n }\n },\n\n // adapted from transform-destructuring/src/index.js#pushObjectRest\n // const { a, ...b } = c;\n VariableDeclarator(path, file) {\n if (!path.get(\"id\").isObjectPattern()) {\n return;\n }\n\n let insertionPath = path;\n const originalPath = path;\n\n visitRestElements(path.get(\"id\"), path => {\n if (!path.parentPath.isObjectPattern()) {\n // Return early if the parent is not an ObjectPattern, but\n // (for example) an ArrayPattern or Function, because that\n // means this RestElement is an not an object property.\n return;\n }\n\n if (\n // skip single-property case, e.g.\n // const { ...x } = foo();\n // since the RHS will not be duplicated\n shouldStoreRHSInTemporaryVariable(originalPath.node.id) &&\n !t.isIdentifier(originalPath.node.init)\n ) {\n // const { a, ...b } = foo();\n // to avoid calling foo() twice, as a first step convert it to:\n // const _foo = foo(),\n // { a, ...b } = _foo;\n const initRef = path.scope.generateUidIdentifierBasedOnNode(\n originalPath.node.init,\n \"ref\",\n );\n // insert _foo = foo()\n originalPath.insertBefore(\n t.variableDeclarator(initRef, originalPath.node.init),\n );\n // replace foo() with _foo\n originalPath.replaceWith(\n t.variableDeclarator(originalPath.node.id, t.cloneNode(initRef)),\n );\n\n return;\n }\n\n let ref = originalPath.node.init;\n const refPropertyPath: NodePath[] = [];\n let kind;\n\n path.findParent((path: NodePath): boolean => {\n if (path.isObjectProperty()) {\n refPropertyPath.unshift(path);\n } else if (path.isVariableDeclarator()) {\n kind = path.parentPath.node.kind;\n return true;\n }\n });\n\n const impureObjRefComputedDeclarators = replaceImpureComputedKeys(\n refPropertyPath,\n path.scope,\n );\n refPropertyPath.forEach(prop => {\n const { node } = prop;\n ref = t.memberExpression(\n ref,\n t.cloneNode(node.key),\n node.computed || t.isLiteral(node.key),\n );\n });\n\n //@ts-expect-error: findParent can not apply assertions on result shape\n const objectPatternPath: NodePath = path.findParent(\n path => path.isObjectPattern(),\n );\n\n const [impureComputedPropertyDeclarators, argument, callExpression] =\n createObjectRest(\n objectPatternPath,\n file,\n ref as t.MemberExpression,\n );\n\n if (pureGetters) {\n removeUnusedExcludedKeys(objectPatternPath);\n }\n\n t.assertIdentifier(argument);\n\n insertionPath.insertBefore(impureComputedPropertyDeclarators);\n\n insertionPath.insertBefore(impureObjRefComputedDeclarators);\n\n insertionPath = insertionPath.insertAfter(\n t.variableDeclarator(argument, callExpression),\n )[0] as NodePath;\n\n path.scope.registerBinding(kind, insertionPath);\n\n if (objectPatternPath.node.properties.length === 0) {\n objectPatternPath\n .findParent(\n path => path.isObjectProperty() || path.isVariableDeclarator(),\n )\n .remove();\n }\n });\n },\n\n // taken from transform-destructuring/src/index.js#visitor\n // export var { a, ...b } = c;\n ExportNamedDeclaration(path) {\n const declaration = path.get(\"declaration\");\n if (!declaration.isVariableDeclaration()) return;\n\n const hasRest = declaration\n .get(\"declarations\")\n .some(path => hasObjectPatternRestElement(path.get(\"id\")));\n if (!hasRest) return;\n\n const specifiers = [];\n\n for (const name of Object.keys(path.getOuterBindingIdentifiers(true))) {\n specifiers.push(\n t.exportSpecifier(t.identifier(name), t.identifier(name)),\n );\n }\n\n // Split the declaration and export list into two declarations so that the variable\n // declaration can be split up later without needing to worry about not being a\n // top-level statement.\n path.replaceWith(declaration.node);\n path.insertAfter(t.exportNamedDeclaration(null, specifiers));\n },\n\n // try {} catch ({a, ...b}) {}\n CatchClause(path) {\n const paramPath = path.get(\"param\");\n replaceRestElement(path, paramPath);\n },\n\n // ({a, ...b} = c);\n AssignmentExpression(path, file) {\n const leftPath = path.get(\"left\");\n if (leftPath.isObjectPattern() && hasRestElement(leftPath)) {\n const nodes = [];\n\n const refName = path.scope.generateUidBasedOnNode(\n path.node.right,\n \"ref\",\n );\n\n nodes.push(\n t.variableDeclaration(\"var\", [\n t.variableDeclarator(t.identifier(refName), path.node.right),\n ]),\n );\n\n const [impureComputedPropertyDeclarators, argument, callExpression] =\n createObjectRest(leftPath, file, t.identifier(refName));\n\n if (impureComputedPropertyDeclarators.length > 0) {\n nodes.push(\n t.variableDeclaration(\"var\", impureComputedPropertyDeclarators),\n );\n }\n\n const nodeWithoutSpread = t.cloneNode(path.node);\n nodeWithoutSpread.right = t.identifier(refName);\n nodes.push(t.expressionStatement(nodeWithoutSpread));\n nodes.push(\n t.expressionStatement(\n t.assignmentExpression(\"=\", argument, callExpression),\n ),\n );\n nodes.push(t.expressionStatement(t.identifier(refName)));\n\n path.replaceWithMultiple(nodes);\n }\n },\n\n // taken from transform-destructuring/src/index.js#visitor\n ForXStatement(path: NodePath) {\n const { node, scope } = path;\n const leftPath = path.get(\"left\");\n const left = node.left;\n\n if (!hasObjectPatternRestElement(leftPath)) {\n return;\n }\n\n if (!t.isVariableDeclaration(left)) {\n // for ({a, ...b} of []) {}\n const temp = scope.generateUidIdentifier(\"ref\");\n\n node.left = t.variableDeclaration(\"var\", [\n t.variableDeclarator(temp),\n ]);\n\n path.ensureBlock();\n const body = path.node.body as t.BlockStatement;\n\n if (body.body.length === 0 && path.isCompletionRecord()) {\n body.body.unshift(\n t.expressionStatement(scope.buildUndefinedNode()),\n );\n }\n\n body.body.unshift(\n t.expressionStatement(\n t.assignmentExpression(\"=\", left, t.cloneNode(temp)),\n ),\n );\n } else {\n // for (var {a, ...b} of []) {}\n const pattern = left.declarations[0].id;\n\n const key = scope.generateUidIdentifier(\"ref\");\n node.left = t.variableDeclaration(left.kind, [\n t.variableDeclarator(key, null),\n ]);\n\n path.ensureBlock();\n const body = node.body as t.BlockStatement;\n\n body.body.unshift(\n t.variableDeclaration(node.left.kind, [\n t.variableDeclarator(pattern, t.cloneNode(key)),\n ]),\n );\n }\n },\n\n // [{a, ...b}] = c;\n ArrayPattern(path) {\n const objectPatterns: t.VariableDeclarator[] = [];\n\n visitRestElements(path, path => {\n if (!path.parentPath.isObjectPattern()) {\n // Return early if the parent is not an ObjectPattern, but\n // (for example) an ArrayPattern or Function, because that\n // means this RestElement is an not an object property.\n return;\n }\n\n const objectPattern = path.parentPath;\n\n const uid = path.scope.generateUidIdentifier(\"ref\");\n objectPatterns.push(t.variableDeclarator(objectPattern.node, uid));\n\n objectPattern.replaceWith(t.cloneNode(uid));\n path.skip();\n });\n\n if (objectPatterns.length > 0) {\n const statementPath = path.getStatementParent();\n const statementNode = statementPath.node;\n const kind =\n statementNode.type === \"VariableDeclaration\"\n ? statementNode.kind\n : \"var\";\n statementPath.insertAfter(\n t.variableDeclaration(kind, objectPatterns),\n );\n }\n },\n\n // var a = { ...b, ...c }\n ObjectExpression(path, file) {\n if (!hasSpread(path.node)) return;\n\n let helper: t.Identifier | t.MemberExpression;\n if (setSpreadProperties) {\n helper = getExtendsHelper(file);\n } else {\n if (process.env.BABEL_8_BREAKING) {\n helper = file.addHelper(\"objectSpread2\");\n } else {\n try {\n helper = file.addHelper(\"objectSpread2\");\n } catch {\n // TODO: This is needed to workaround https://github.com/babel/babel/issues/10187\n // and https://github.com/babel/babel/issues/10179 for older @babel/core versions\n // where #10187 isn't fixed.\n this.file.declarations[\"objectSpread2\"] = null;\n\n // objectSpread2 has been introduced in v7.5.0\n // We have to maintain backward compatibility.\n helper = file.addHelper(\"objectSpread\");\n }\n }\n }\n\n let exp: t.CallExpression = null;\n let props: t.ObjectMember[] = [];\n\n function make() {\n const hadProps = props.length > 0;\n const obj = t.objectExpression(props);\n props = [];\n\n if (!exp) {\n exp = t.callExpression(helper, [obj]);\n return;\n }\n\n // When we can assume that getters are pure and don't depend on\n // the order of evaluation, we can avoid making multiple calls.\n if (pureGetters) {\n if (hadProps) {\n exp.arguments.push(obj);\n }\n return;\n }\n\n exp = t.callExpression(t.cloneNode(helper), [\n exp,\n // If we have static props, we need to insert an empty object\n // because the odd arguments are copied with [[Get]], not\n // [[GetOwnProperty]]\n ...(hadProps ? [t.objectExpression([]), obj] : []),\n ]);\n }\n\n for (const prop of path.node.properties) {\n if (t.isSpreadElement(prop)) {\n make();\n exp.arguments.push(prop.argument);\n } else {\n props.push(prop);\n }\n }\n\n if (props.length) make();\n\n path.replaceWith(exp);\n },\n },\n };\n});\n","import { declare } from \"@babel/helper-plugin-utils\";\n\nexport default declare(api => {\n api.assertVersion(REQUIRED_VERSION(7));\n\n return {\n name: \"transform-optional-catch-binding\",\n inherits:\n USE_ESM || IS_STANDALONE || api.version[0] === \"8\"\n ? undefined\n : // eslint-disable-next-line no-restricted-globals\n require(\"@babel/plugin-syntax-optional-catch-binding\").default,\n\n visitor: {\n CatchClause(path) {\n if (!path.node.param) {\n const uid = path.scope.generateUidIdentifier(\"unused\");\n const paramPath = path.get(\"param\");\n paramPath.replaceWith(uid);\n }\n },\n },\n };\n});\n","import type { NodePath } from \"@babel/core\";\nimport { isTransparentExprWrapper } from \"@babel/helper-skip-transparent-expression-wrappers\";\n/**\n * Test if a NodePath will be cast to boolean when evaluated.\n * It respects transparent expression wrappers defined in\n * \"@babel/helper-skip-transparent-expression-wrappers\"\n *\n * @example\n * // returns true\n * const nodePathADotB = NodePath(\"if (a.b) {}\").get(\"test\"); // a.b\n * willPathCastToBoolean(nodePathADotB)\n * @example\n * // returns false\n * willPathCastToBoolean(NodePath(\"a.b\"))\n * @param {NodePath} path\n * @returns {boolean}\n */\nexport function willPathCastToBoolean(path: NodePath): boolean {\n const maybeWrapped = findOutermostTransparentParent(path);\n const { node, parentPath } = maybeWrapped;\n if (parentPath.isLogicalExpression()) {\n const { operator, right } = parentPath.node;\n if (\n operator === \"&&\" ||\n operator === \"||\" ||\n (operator === \"??\" && node === right)\n ) {\n return willPathCastToBoolean(parentPath);\n }\n }\n if (parentPath.isSequenceExpression()) {\n const { expressions } = parentPath.node;\n if (expressions[expressions.length - 1] === node) {\n return willPathCastToBoolean(parentPath);\n } else {\n // if it is in the middle of a sequence expression, we don't\n // care the return value so just cast to boolean for smaller\n // output\n return true;\n }\n }\n return (\n parentPath.isConditional({ test: node }) ||\n parentPath.isUnaryExpression({ operator: \"!\" }) ||\n parentPath.isLoop({ test: node })\n );\n}\n\n/**\n * Return the outermost transparent expression wrapper of a given path,\n * otherwise returns path itself.\n * @example\n * const nodePathADotB = NodePath(\"(a.b as any)\").get(\"expression\"); // a.b\n * // returns NodePath(\"(a.b as any)\")\n * findOutermostTransparentParent(nodePathADotB);\n * @param {NodePath} path\n * @returns {NodePath}\n */\nexport function findOutermostTransparentParent(path: NodePath): NodePath {\n let maybeWrapped = path;\n path.findParent(p => {\n if (!isTransparentExprWrapper(p.node)) return true;\n maybeWrapped = p;\n });\n return maybeWrapped;\n}\n","import { types as t, template, type NodePath } from \"@babel/core\";\nimport {\n skipTransparentExprWrapperNodes,\n skipTransparentExprWrappers,\n} from \"@babel/helper-skip-transparent-expression-wrappers\";\nimport {\n willPathCastToBoolean,\n findOutermostTransparentParent,\n} from \"./util.ts\";\n\n// TODO(Babel 9): Use .at(-1)\nconst last = (arr: T[]) => arr[arr.length - 1];\n\nfunction isSimpleMemberExpression(\n expression: t.Expression | t.Super,\n): expression is t.Identifier | t.Super | t.MemberExpression {\n expression = skipTransparentExprWrapperNodes(expression);\n return (\n t.isIdentifier(expression) ||\n t.isSuper(expression) ||\n (t.isMemberExpression(expression) &&\n !expression.computed &&\n isSimpleMemberExpression(expression.object))\n );\n}\n\n/**\n * Test if a given optional chain `path` needs to be memoized\n * @param {NodePath} path\n * @returns {boolean}\n */\nfunction needsMemoize(\n path: NodePath,\n) {\n let optionalPath: NodePath = path;\n const { scope } = path;\n while (\n optionalPath.isOptionalMemberExpression() ||\n optionalPath.isOptionalCallExpression()\n ) {\n const { node } = optionalPath;\n const childPath = skipTransparentExprWrappers(\n optionalPath.isOptionalMemberExpression()\n ? optionalPath.get(\"object\")\n : optionalPath.get(\"callee\"),\n );\n if (node.optional) {\n return !scope.isStatic(childPath.node);\n }\n\n optionalPath = childPath;\n }\n}\n\nconst NULLISH_CHECK = template.expression(\n `%%check%% === null || %%ref%% === void 0`,\n);\nconst NULLISH_CHECK_NO_DDA = template.expression(`%%check%% == null`);\nconst NULLISH_CHECK_NEG = template.expression(\n `%%check%% !== null && %%ref%% !== void 0`,\n);\nconst NULLISH_CHECK_NO_DDA_NEG = template.expression(`%%check%% != null`);\n\ninterface OptionalChainAssumptions {\n pureGetters: boolean;\n noDocumentAll: boolean;\n}\n\nexport function transformOptionalChain(\n path: NodePath,\n { pureGetters, noDocumentAll }: OptionalChainAssumptions,\n replacementPath: NodePath,\n ifNullish: t.Expression,\n wrapLast?: (value: t.Expression) => t.Expression,\n) {\n const { scope } = path;\n\n // Replace `function (a, x = a.b?.c) {}` to `function (a, x = (() => a.b?.c)() ){}`\n // so the temporary variable can be injected in correct scope\n if (scope.path.isPattern() && needsMemoize(path)) {\n replacementPath.replaceWith(\n template.expression.ast`(() => ${replacementPath.node})()`,\n );\n // The injected optional chain will be queued and eventually transformed when visited\n return;\n }\n\n const optionals = [];\n\n let optionalPath = path;\n while (\n optionalPath.isOptionalMemberExpression() ||\n optionalPath.isOptionalCallExpression()\n ) {\n const { node } = optionalPath;\n if (node.optional) {\n optionals.push(node);\n }\n if (optionalPath.isOptionalMemberExpression()) {\n // @ts-expect-error todo(flow->ts) avoid changing more type\n optionalPath.node.type = \"MemberExpression\";\n // @ts-expect-error todo(flow->ts)\n optionalPath = skipTransparentExprWrappers(optionalPath.get(\"object\"));\n } else if (optionalPath.isOptionalCallExpression()) {\n // @ts-expect-error todo(flow->ts) avoid changing more type\n optionalPath.node.type = \"CallExpression\";\n // @ts-expect-error todo(flow->ts)\n optionalPath = skipTransparentExprWrappers(optionalPath.get(\"callee\"));\n }\n }\n\n if (optionals.length === 0) {\n // Malformed AST: there was an OptionalMemberExpression node\n // with no actual optional elements.\n return;\n }\n\n const checks = [];\n\n let tmpVar;\n\n for (let i = optionals.length - 1; i >= 0; i--) {\n const node = optionals[i] as unknown as\n | t.MemberExpression\n | t.CallExpression;\n\n const isCall = t.isCallExpression(node);\n\n const chainWithTypes = isCall\n ? // V8 intrinsics must not be an optional call\n (node.callee as t.Expression)\n : node.object;\n const chain = skipTransparentExprWrapperNodes(chainWithTypes);\n\n let ref;\n let check;\n if (isCall && t.isIdentifier(chain, { name: \"eval\" })) {\n check = ref = chain;\n // `eval?.()` is an indirect eval call transformed to `(0,eval)()`\n node.callee = t.sequenceExpression([t.numericLiteral(0), ref]);\n } else if (pureGetters && isCall && isSimpleMemberExpression(chain)) {\n // If we assume getters are pure (avoiding a Function#call) and we are at the call,\n // we can avoid a needless memoize. We only do this if the callee is a simple member\n // expression, to avoid multiple calls to nested call expressions.\n check = ref = node.callee;\n } else if (scope.isStatic(chain)) {\n check = ref = chainWithTypes;\n } else {\n // We cannot reuse the tmpVar for calls, because we need to\n // store both the method and the receiver.\n if (!tmpVar || isCall) {\n tmpVar = scope.generateUidIdentifierBasedOnNode(chain);\n scope.push({ id: t.cloneNode(tmpVar) });\n }\n ref = tmpVar;\n check = t.assignmentExpression(\n \"=\",\n t.cloneNode(tmpVar),\n // Here `chainWithTypes` MUST NOT be cloned because it could be\n // updated when generating the memoised context of a call\n // expression. It must be an Expression when `ref` is an identifier\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion\n chainWithTypes as t.Expression,\n );\n\n if (isCall) {\n node.callee = ref;\n } else {\n node.object = ref;\n }\n }\n\n // Ensure call expressions have the proper `this`\n // `foo.bar()` has context `foo`.\n if (isCall && t.isMemberExpression(chain)) {\n if (pureGetters && isSimpleMemberExpression(chain)) {\n // To avoid a Function#call, we can instead re-grab the property from the context object.\n // `a.?b.?()` translates roughly to `_a.b != null && _a.b()`\n node.callee = chainWithTypes;\n } else {\n // Otherwise, we need to memoize the context object, and change the call into a Function#call.\n // `a.?b.?()` translates roughly to `(_b = _a.b) != null && _b.call(_a)`\n const { object } = chain;\n let context: t.Expression;\n if (t.isSuper(object)) {\n context = t.thisExpression();\n } else {\n const memoized = scope.maybeGenerateMemoised(object);\n if (memoized) {\n context = memoized;\n chain.object = t.assignmentExpression(\"=\", memoized, object);\n } else {\n context = object;\n }\n }\n\n node.arguments.unshift(t.cloneNode(context));\n // @ts-expect-error node.callee can not be an V8IntrinsicIdentifier: V8 intrinsic is disallowed in optional chain\n node.callee = t.memberExpression(node.callee, t.identifier(\"call\"));\n }\n }\n\n const data = { check: t.cloneNode(check), ref: t.cloneNode(ref) };\n // We make `ref` non-enumerable, so that @babel/template doesn't throw\n // in the noDocumentAll template if it's not used.\n Object.defineProperty(data, \"ref\", { enumerable: false });\n checks.push(data);\n }\n\n let result = replacementPath.node;\n if (wrapLast) result = wrapLast(result);\n\n const ifNullishBoolean = t.isBooleanLiteral(ifNullish);\n const ifNullishFalse = ifNullishBoolean && ifNullish.value === false;\n const ifNullishVoid =\n !ifNullishBoolean && t.isUnaryExpression(ifNullish, { operator: \"void\" });\n\n const isEvaluationValueIgnored =\n (t.isExpressionStatement(replacementPath.parent) &&\n !replacementPath.isCompletionRecord()) ||\n (t.isSequenceExpression(replacementPath.parent) &&\n last(replacementPath.parent.expressions) !== replacementPath.node);\n\n // prettier-ignore\n const tpl = ifNullishFalse\n ? (noDocumentAll ? NULLISH_CHECK_NO_DDA_NEG : NULLISH_CHECK_NEG)\n : (noDocumentAll ? NULLISH_CHECK_NO_DDA : NULLISH_CHECK);\n const logicalOp = ifNullishFalse ? \"&&\" : \"||\";\n\n const check = checks\n .map(tpl)\n .reduce((expr, check) => t.logicalExpression(logicalOp, expr, check));\n\n replacementPath.replaceWith(\n ifNullishBoolean || (ifNullishVoid && isEvaluationValueIgnored)\n ? t.logicalExpression(logicalOp, check, result)\n : t.conditionalExpression(check, ifNullish, result),\n );\n}\n\nexport function transform(\n path: NodePath,\n assumptions: OptionalChainAssumptions,\n) {\n const { scope } = path;\n\n // maybeWrapped points to the outermost transparent expression wrapper\n // or the path itself\n const maybeWrapped = findOutermostTransparentParent(path);\n const { parentPath } = maybeWrapped;\n\n if (parentPath.isUnaryExpression({ operator: \"delete\" })) {\n transformOptionalChain(\n path,\n assumptions,\n parentPath,\n t.booleanLiteral(true),\n );\n } else {\n let wrapLast;\n if (\n parentPath.isCallExpression({ callee: maybeWrapped.node }) &&\n // note that the first condition must implies that `path.optional` is `true`,\n // otherwise the parentPath should be an OptionalCallExpression\n path.isOptionalMemberExpression()\n ) {\n // Ensure (a?.b)() has proper `this`\n wrapLast = (replacement: t.MemberExpression) => {\n // `(a?.b)()` to `(a == null ? undefined : a.b.bind(a))()`\n // object must not be Super as super?.foo is invalid\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion\n const object = skipTransparentExprWrapperNodes(\n replacement.object,\n ) as t.Expression;\n let baseRef: t.Expression;\n if (!assumptions.pureGetters || !isSimpleMemberExpression(object)) {\n // memoize the context object when getters are not always pure\n // or the object is not a simple member expression\n // `(a?.b.c)()` to `(a == null ? undefined : (_a$b = a.b).c.bind(_a$b))()`\n baseRef = scope.maybeGenerateMemoised(object);\n if (baseRef) {\n replacement.object = t.assignmentExpression(\"=\", baseRef, object);\n }\n }\n return t.callExpression(\n t.memberExpression(replacement, t.identifier(\"bind\")),\n [t.cloneNode(baseRef ?? object)],\n );\n };\n }\n\n transformOptionalChain(\n path,\n assumptions,\n path,\n willPathCastToBoolean(maybeWrapped)\n ? t.booleanLiteral(false)\n : scope.buildUndefinedNode(),\n wrapLast,\n );\n }\n}\n","import { declare } from \"@babel/helper-plugin-utils\";\nimport { transform, transformOptionalChain } from \"./transform.ts\";\nimport type { NodePath, types as t } from \"@babel/core\";\n\nexport interface Options {\n loose?: boolean;\n}\nexport default declare((api, options: Options) => {\n api.assertVersion(REQUIRED_VERSION(7));\n\n const { loose = false } = options;\n const noDocumentAll = api.assumption(\"noDocumentAll\") ?? loose;\n const pureGetters = api.assumption(\"pureGetters\") ?? loose;\n\n return {\n name: \"transform-optional-chaining\",\n inherits:\n USE_ESM || IS_STANDALONE || api.version[0] === \"8\"\n ? undefined\n : // eslint-disable-next-line no-restricted-globals\n require(\"@babel/plugin-syntax-optional-chaining\").default,\n\n visitor: {\n \"OptionalCallExpression|OptionalMemberExpression\"(\n path: NodePath,\n ) {\n transform(path, { noDocumentAll, pureGetters });\n },\n },\n };\n});\n\nexport { transform, transformOptionalChain };\n","import { declare } from \"@babel/helper-plugin-utils\";\nimport syntaxOptionalChainingAssign from \"@babel/plugin-syntax-optional-chaining-assign\";\nimport type { NodePath, types as t } from \"@babel/core\";\nimport { skipTransparentExprWrappers } from \"@babel/helper-skip-transparent-expression-wrappers\";\nimport { transformOptionalChain } from \"@babel/plugin-transform-optional-chaining\";\n\nexport default declare(api => {\n api.assertVersion(REQUIRED_VERSION(\"^7.22.5\"));\n\n const assumptions = {\n noDocumentAll: api.assumption(\"noDocumentAll\") ?? false,\n pureGetters: api.assumption(\"pureGetters\") ?? false,\n };\n\n const { types: t } = api;\n\n return {\n name: \"transform-optional-chaining-assign\",\n inherits: syntaxOptionalChainingAssign,\n\n visitor: {\n AssignmentExpression(path, state) {\n let lhs = path.get(\"left\");\n if (!lhs.isExpression()) return;\n const isParenthesized =\n lhs.node.extra?.parenthesized ||\n t.isParenthesizedExpression(lhs.node);\n\n lhs = skipTransparentExprWrappers(lhs) as NodePath<\n t.LVal & t.Expression\n >;\n if (!lhs.isOptionalMemberExpression()) return;\n\n let ifNullish: t.Expression = path.scope.buildUndefinedNode();\n if (isParenthesized) {\n ifNullish = t.callExpression(\n state.addHelper(\"nullishReceiverError\"),\n [],\n );\n if (path.node.operator === \"=\") {\n ifNullish = t.sequenceExpression([\n t.cloneNode(path.node.right),\n ifNullish,\n ]);\n }\n }\n\n transformOptionalChain(lhs, assumptions, path, ifNullish);\n },\n },\n };\n});\n","import { types as t, type NodePath } from \"@babel/core\";\n\n// tries to optimize sequence expressions in the format\n// (a = b, (c => c + e)(a))\n// to\n// (a = b, a + e)\n\ntype Options = {\n call: t.CallExpression | t.AwaitExpression;\n path: NodePath\" }>;\n placeholder: t.Identifier;\n};\n\nfunction isConciseArrowExpression(\n node: t.Node,\n): node is t.ArrowFunctionExpression & { body: t.Expression } {\n return (\n t.isArrowFunctionExpression(node) &&\n t.isExpression(node.body) &&\n !node.async\n );\n}\n\nconst buildOptimizedSequenceExpression = ({\n call,\n path,\n placeholder,\n}: Options) => {\n // @ts-expect-error AwaitExpression does not have callee property\n const { callee: calledExpression } = call;\n // pipelineLeft must not be a PrivateName\n const pipelineLeft = path.node.left as t.Expression;\n const assign = t.assignmentExpression(\n \"=\",\n t.cloneNode(placeholder),\n pipelineLeft,\n );\n\n const expressionIsArrow = isConciseArrowExpression(calledExpression);\n\n if (expressionIsArrow) {\n let param;\n let optimizeArrow = true;\n const { params } = calledExpression;\n if (params.length === 1 && t.isIdentifier(params[0])) {\n param = params[0];\n } else if (params.length > 0) {\n optimizeArrow = false;\n }\n if (optimizeArrow && !param) {\n // fixme: arrow function with 1 pattern argument will also go into this branch\n // Arrow function with 0 arguments\n return t.sequenceExpression([pipelineLeft, calledExpression.body]);\n } else if (param) {\n path.scope.push({ id: t.cloneNode(placeholder) });\n path.get(\"right\").scope.rename(param.name, placeholder.name);\n\n return t.sequenceExpression([assign, calledExpression.body]);\n }\n } else if (t.isIdentifier(calledExpression, { name: \"eval\" })) {\n const evalSequence = t.sequenceExpression([\n t.numericLiteral(0),\n calledExpression,\n ]);\n\n (call as t.CallExpression).callee = evalSequence;\n }\n path.scope.push({ id: t.cloneNode(placeholder) });\n\n return t.sequenceExpression([assign, call]);\n};\n\nexport default buildOptimizedSequenceExpression;\n","import { types as t } from \"@babel/core\";\nimport type { PluginPass, NodePath, Visitor } from \"@babel/core\";\nimport buildOptimizedSequenceExpression from \"./buildOptimizedSequenceExpression.ts\";\n\nconst minimalVisitor: Visitor = {\n BinaryExpression(path) {\n const { scope, node } = path;\n const { operator, left, right } = node;\n if (operator !== \"|>\") return;\n\n const placeholder = scope.generateUidIdentifierBasedOnNode(left);\n\n const call = t.callExpression(right, [t.cloneNode(placeholder)]);\n path.replaceWith(\n buildOptimizedSequenceExpression({\n placeholder,\n call,\n path: path as NodePath\" }>,\n }),\n );\n },\n};\n\nexport default minimalVisitor;\n","import { types as t } from \"@babel/core\";\nimport type { PluginPass, NodePath, Visitor } from \"@babel/core\";\n\ntype State = {\n topicReferences: NodePath[];\n sideEffectsBeforeFirstTopicReference: boolean;\n};\n\nconst topicReferenceVisitor: Visitor = {\n exit(path, state) {\n if (path.isTopicReference()) {\n state.topicReferences.push(path);\n } else {\n if (\n state.topicReferences.length === 0 &&\n !state.sideEffectsBeforeFirstTopicReference &&\n !path.isPure()\n ) {\n state.sideEffectsBeforeFirstTopicReference = true;\n }\n }\n },\n \"ClassBody|Function\"(_, state) {\n if (state.topicReferences.length === 0) {\n state.sideEffectsBeforeFirstTopicReference = true;\n }\n },\n};\n\n// This visitor traverses `BinaryExpression`\n// and replaces any that use `|>`\n// with sequence expressions containing assignment expressions\n// with automatically generated variables,\n// from inside to outside, from left to right.\nconst visitor: Visitor = {\n BinaryExpression: {\n exit(path) {\n const { scope, node } = path;\n\n if (node.operator !== \"|>\") {\n // The path node is a binary expression,\n // but it is not a pipe expression.\n return;\n }\n\n const pipeBodyPath = path.get(\"right\");\n if (pipeBodyPath.node.type === \"TopicReference\") {\n // If the pipe body is itself a lone topic reference,\n // then replace the whole expression with its left operand.\n path.replaceWith(node.left);\n return;\n }\n\n const visitorState: State = {\n topicReferences: [],\n // pipeBodyPath might be a function, and it won't be visited by\n // topicReferenceVisitor because traverse() skips the top-level\n // node. We must handle that case here manually.\n sideEffectsBeforeFirstTopicReference: pipeBodyPath.isFunction(),\n };\n pipeBodyPath.traverse(topicReferenceVisitor, visitorState);\n\n if (\n visitorState.topicReferences.length === 1 &&\n (!visitorState.sideEffectsBeforeFirstTopicReference ||\n path.scope.isPure(node.left, true))\n ) {\n visitorState.topicReferences[0].replaceWith(node.left);\n path.replaceWith(node.right);\n return;\n }\n\n const topicVariable = scope.generateUidIdentifierBasedOnNode(node);\n scope.push({ id: topicVariable });\n\n // Replace topic references with the topic variable.\n visitorState.topicReferences.forEach(path =>\n path.replaceWith(t.cloneNode(topicVariable)),\n );\n\n // Replace the pipe expression itself with an assignment expression.\n path.replaceWith(\n t.sequenceExpression([\n t.assignmentExpression(\n \"=\",\n t.cloneNode(topicVariable),\n // @ts-expect-error node.left must not be a PrivateName when operator is |>\n node.left,\n ),\n node.right,\n ]),\n );\n },\n },\n};\n\nexport default visitor;\n","import { types as t, type PluginObject, type NodePath } from \"@babel/core\";\nimport buildOptimizedSequenceExpression from \"./buildOptimizedSequenceExpression.ts\";\n\nconst fsharpVisitor: PluginObject[\"visitor\"] = {\n BinaryExpression(path) {\n const { scope, node } = path;\n const { operator, left, right } = node;\n if (operator !== \"|>\") return;\n\n const placeholder = scope.generateUidIdentifierBasedOnNode(left);\n\n const call =\n right.type === \"AwaitExpression\"\n ? t.awaitExpression(t.cloneNode(placeholder))\n : t.callExpression(right, [t.cloneNode(placeholder)]);\n const sequence = buildOptimizedSequenceExpression({\n placeholder,\n call,\n path: path as NodePath\" }>,\n });\n path.replaceWith(sequence);\n },\n};\n\nexport default fsharpVisitor;\n","import { types as t } from \"@babel/core\";\nimport type { PluginPass, Visitor } from \"@babel/core\";\n\nconst updateTopicReferenceVisitor: Visitor<{ topicId: t.Identifier }> = {\n PipelinePrimaryTopicReference(path) {\n path.replaceWith(t.cloneNode(this.topicId));\n },\n PipelineTopicExpression(path) {\n path.skip();\n },\n};\n\nconst smartVisitor: Visitor = {\n BinaryExpression(path) {\n const { scope } = path;\n const { node } = path;\n const { operator, left, right } = node;\n if (operator !== \"|>\") return;\n\n const placeholder = scope.generateUidIdentifierBasedOnNode(left);\n scope.push({ id: placeholder });\n\n let call;\n if (t.isPipelineTopicExpression(right)) {\n path\n .get(\"right\")\n .traverse(updateTopicReferenceVisitor, { topicId: placeholder });\n\n call = right.expression;\n } else {\n // PipelineBareFunction\n let callee = (right as t.CallExpression).callee;\n if (t.isIdentifier(callee, { name: \"eval\" })) {\n callee = t.sequenceExpression([t.numericLiteral(0), callee]);\n }\n\n call = t.callExpression(callee, [t.cloneNode(placeholder)]);\n }\n\n path.replaceWith(\n t.sequenceExpression([\n t.assignmentExpression(\n \"=\",\n t.cloneNode(placeholder),\n // left must not be a PrivateName because operator is not \"in\"\n left as t.Expression,\n ),\n call,\n ]),\n );\n },\n};\n\nexport default smartVisitor;\n","import { declare } from \"@babel/helper-plugin-utils\";\nimport syntaxPipelineOperator from \"@babel/plugin-syntax-pipeline-operator\";\nimport minimalVisitor from \"./minimalVisitor.ts\";\nimport hackVisitor from \"./hackVisitor.ts\";\nimport fsharpVisitor from \"./fsharpVisitor.ts\";\nimport smartVisitor from \"./smartVisitor.ts\";\nimport type { Options } from \"@babel/plugin-syntax-pipeline-operator\";\n\nconst visitorsPerProposal = {\n minimal: minimalVisitor,\n hack: hackVisitor,\n fsharp: fsharpVisitor,\n smart: smartVisitor,\n};\n\nexport default declare((api, options: Options) => {\n api.assertVersion(REQUIRED_VERSION(7));\n\n const { proposal } = options;\n\n if (proposal === \"smart\") {\n console.warn(\n `The smart-mix pipe operator is deprecated. Use \"proposal\": \"hack\" instead.`,\n );\n }\n\n return {\n name: \"proposal-pipeline-operator\",\n inherits: syntaxPipelineOperator,\n visitor: visitorsPerProposal[options.proposal],\n };\n});\n","/* eslint-disable @babel/development/plugin-name */\n\nimport { declare } from \"@babel/helper-plugin-utils\";\nimport {\n createClassFeaturePlugin,\n FEATURES,\n} from \"@babel/helper-create-class-features-plugin\";\n\nexport interface Options {\n loose?: boolean;\n}\n\nexport default declare((api, options: Options) => {\n api.assertVersion(REQUIRED_VERSION(7));\n\n return createClassFeaturePlugin({\n name: \"transform-private-methods\",\n\n api,\n feature: FEATURES.privateMethods,\n loose: options.loose,\n\n manipulateOptions(opts, parserOpts) {\n parserOpts.plugins.push(\"classPrivateMethods\");\n },\n });\n});\n","import { declare } from \"@babel/helper-plugin-utils\";\nimport {\n enableFeature,\n FEATURES,\n injectInitialization as injectConstructorInit,\n buildCheckInRHS,\n} from \"@babel/helper-create-class-features-plugin\";\nimport annotateAsPure from \"@babel/helper-annotate-as-pure\";\nimport type { NodePath, Scope, types as t } from \"@babel/core\";\n\nexport interface Options {\n loose?: boolean;\n}\nexport default declare((api, opt: Options) => {\n api.assertVersion(REQUIRED_VERSION(7));\n const { types: t, template } = api;\n const { loose } = opt;\n\n // NOTE: When using the class fields or private methods plugins,\n // they will also take care of '#priv in obj' checks when visiting\n // the ClassExpression or ClassDeclaration nodes.\n // The visitor of this plugin is only effective when not compiling\n // private fields and methods.\n\n const classWeakSets: WeakMap = new WeakMap();\n const fieldsWeakSets: WeakMap<\n t.ClassPrivateProperty | t.ClassPrivateMethod,\n t.Identifier\n > = new WeakMap();\n\n function unshadow(name: string, targetScope: Scope, scope: Scope) {\n while (scope !== targetScope) {\n if (scope.hasOwnBinding(name)) scope.rename(name);\n scope = scope.parent;\n }\n }\n\n function injectToFieldInit(\n fieldPath: NodePath,\n expr: t.Expression,\n before = false,\n ) {\n if (fieldPath.node.value) {\n const value = fieldPath.get(\"value\");\n if (before) {\n value.insertBefore(expr);\n } else {\n value.insertAfter(expr);\n }\n } else {\n fieldPath.set(\"value\", t.unaryExpression(\"void\", expr));\n }\n }\n\n function injectInitialization(\n classPath: NodePath,\n init: t.Expression,\n ) {\n let firstFieldPath;\n let constructorPath;\n\n for (const el of classPath.get(\"body.body\")) {\n if (\n (el.isClassProperty() || el.isClassPrivateProperty()) &&\n !el.node.static\n ) {\n firstFieldPath = el;\n break;\n }\n if (!constructorPath && el.isClassMethod({ kind: \"constructor\" })) {\n constructorPath = el;\n }\n }\n\n if (firstFieldPath) {\n injectToFieldInit(firstFieldPath, init, true);\n } else {\n injectConstructorInit(classPath, constructorPath, [\n t.expressionStatement(init),\n ]);\n }\n }\n\n function getWeakSetId(\n weakSets: WeakMap,\n outerClass: NodePath,\n reference: NodePath,\n name = \"\",\n inject: (\n reference: NodePath,\n expression: t.Expression,\n before?: boolean,\n ) => void,\n ) {\n let id = weakSets.get(reference.node);\n\n if (!id) {\n id = outerClass.scope.generateUidIdentifier(`${name || \"\"} brandCheck`);\n weakSets.set(reference.node, id);\n\n inject(reference, template.expression.ast`${t.cloneNode(id)}.add(this)`);\n\n const newExpr = t.newExpression(t.identifier(\"WeakSet\"), []);\n annotateAsPure(newExpr);\n\n outerClass.insertBefore(template.ast`var ${id} = ${newExpr}`);\n }\n\n return t.cloneNode(id);\n }\n\n return {\n name: \"transform-private-property-in-object\",\n inherits:\n USE_ESM || IS_STANDALONE || api.version[0] === \"8\"\n ? undefined\n : // eslint-disable-next-line no-restricted-globals\n require(\"@babel/plugin-syntax-private-property-in-object\").default,\n pre() {\n // Enable this in @babel/helper-create-class-features-plugin, so that it\n // can be handled by the private fields and methods transform.\n enableFeature(this.file, FEATURES.privateIn, loose);\n },\n visitor: {\n BinaryExpression(path, state) {\n const { node } = path;\n const { file } = state;\n if (node.operator !== \"in\") return;\n if (!t.isPrivateName(node.left)) return;\n\n const { name } = node.left.id;\n\n let privateElement: NodePath<\n t.ClassPrivateMethod | t.ClassPrivateProperty\n >;\n const outerClass = path.findParent(path => {\n if (!path.isClass()) return false;\n\n privateElement = path.get(\"body.body\").find(\n ({ node }) =>\n // fixme: Support class accessor property\n t.isPrivate(node) && node.key.id.name === name,\n ) as NodePath;\n\n return !!privateElement;\n }) as NodePath;\n\n if (outerClass.parentPath.scope.path.isPattern()) {\n outerClass.replaceWith(\n template.ast`(() => ${outerClass.node})()` as t.Statement,\n );\n // The injected class will be queued and eventually transformed when visited\n return;\n }\n\n if (privateElement.node.type === \"ClassPrivateMethod\") {\n if (privateElement.node.static) {\n if (outerClass.node.id) {\n unshadow(outerClass.node.id.name, outerClass.scope, path.scope);\n } else {\n outerClass.set(\"id\", path.scope.generateUidIdentifier(\"class\"));\n }\n path.replaceWith(\n template.expression.ast`\n ${t.cloneNode(outerClass.node.id)} === ${buildCheckInRHS(\n node.right,\n file,\n )}\n `,\n );\n } else {\n const id = getWeakSetId(\n classWeakSets,\n outerClass,\n outerClass,\n outerClass.node.id?.name,\n injectInitialization,\n );\n\n path.replaceWith(\n template.expression.ast`${id}.has(${buildCheckInRHS(\n node.right,\n file,\n )})`,\n );\n }\n } else {\n // Private fields might not all be initialized: see the 'halfConstructed'\n // example at https://v8.dev/features/private-brand-checks.\n\n const id = getWeakSetId(\n fieldsWeakSets,\n outerClass,\n privateElement as NodePath,\n privateElement.node.key.id.name,\n injectToFieldInit,\n );\n\n path.replaceWith(\n template.expression.ast`${id}.has(${buildCheckInRHS(\n node.right,\n file,\n )})`,\n );\n }\n },\n },\n };\n});\n","/*\n ** Copyright 2020 Bloomberg Finance L.P.\n **\n ** Licensed under the MIT License (the \"License\");\n ** you may not use this file except in compliance with the License.\n ** You may obtain a copy of the License at\n **\n ** https://opensource.org/licenses/MIT\n **\n ** Unless required by applicable law or agreed to in writing, software\n ** distributed under the License is distributed on an \"AS IS\" BASIS,\n ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ** See the License for the specific language governing permissions and\n ** limitations under the License.\n */\n\nimport { declare } from \"@babel/helper-plugin-utils\";\nimport syntaxRecordAndTuple from \"@babel/plugin-syntax-record-and-tuple\";\nimport type { Options as SyntaxOptions } from \"@babel/plugin-syntax-record-and-tuple\";\nimport { types as t, type NodePath } from \"@babel/core\";\nimport { addNamed, isModule } from \"@babel/helper-module-imports\";\nimport { OptionValidator } from \"@babel/helper-validator-option\";\n\nconst v = new OptionValidator(PACKAGE_JSON.name);\n\nexport interface Options extends SyntaxOptions {\n polyfillModuleName?: string;\n importPolyfill?: boolean;\n}\n\ntype State = {\n programPath: NodePath;\n};\n\n// program -> cacheKey -> localBindingName\ntype Cache = Map;\ntype ImportCache = WeakMap;\n\nexport default declare((api, options: Options) => {\n api.assertVersion(REQUIRED_VERSION(7));\n\n const polyfillModuleName = v.validateStringOption(\n \"polyfillModuleName\",\n options.polyfillModuleName,\n \"@bloomberg/record-tuple-polyfill\",\n );\n const shouldImportPolyfill = v.validateBooleanOption(\n \"importPolyfill\",\n options.importPolyfill,\n !!options.polyfillModuleName,\n );\n\n const importCaches: ImportCache = new WeakMap();\n\n function getOr(map: Map, key: K, getDefault: () => V): V;\n function getOr(\n map: WeakMap,\n key: K,\n getDefault: () => V,\n ): V;\n function getOr(\n map: WeakMap,\n key: K,\n getDefault: () => V,\n ) {\n let value = map.get(key);\n if (!value) map.set(key, (value = getDefault()));\n return value;\n }\n\n function getBuiltIn(\n name: \"Record\" | \"Tuple\",\n programPath: NodePath,\n ) {\n if (!shouldImportPolyfill) return t.identifier(name);\n if (!programPath) {\n throw new Error(\"Internal error: unable to find the Program node.\");\n }\n\n const cacheKey = `${name}:${isModule(programPath)}`;\n\n const cache = getOr(\n importCaches,\n programPath.node,\n () => new Map(),\n );\n const localBindingName = getOr(cache, cacheKey, () => {\n return addNamed(programPath, name, polyfillModuleName, {\n importedInterop: \"uncompiled\",\n }).name;\n });\n\n return t.identifier(localBindingName);\n }\n\n return {\n name: \"proposal-record-and-tuple\",\n inherits: syntaxRecordAndTuple,\n visitor: {\n Program(path, state) {\n state.programPath = path;\n },\n RecordExpression(path, state) {\n const record = getBuiltIn(\"Record\", state.programPath);\n\n const object = t.objectExpression(path.node.properties);\n const wrapped = t.callExpression(record, [object]);\n path.replaceWith(wrapped);\n },\n TupleExpression(path, state) {\n const tuple = getBuiltIn(\"Tuple\", state.programPath);\n\n const wrapped = t.callExpression(tuple, path.node.elements);\n path.replaceWith(wrapped);\n },\n },\n };\n});\n","/* eslint-disable @babel/development/plugin-name */\nimport { createRegExpFeaturePlugin } from \"@babel/helper-create-regexp-features-plugin\";\nimport { declare } from \"@babel/helper-plugin-utils\";\n\nexport default declare(api => {\n api.assertVersion(REQUIRED_VERSION(\"^7.19.0\"));\n\n return createRegExpFeaturePlugin({\n name: \"proposal-regexp-modifiers\",\n feature: \"modifiers\",\n });\n});\n","import { declare } from \"@babel/helper-plugin-utils\";\n\nexport default declare(api => {\n api.assertVersion(REQUIRED_VERSION(7));\n\n return {\n name: \"syntax-throw-expressions\",\n\n manipulateOptions(opts, parserOpts) {\n parserOpts.plugins.push(\"throwExpressions\");\n },\n };\n});\n","import { declare } from \"@babel/helper-plugin-utils\";\nimport syntaxThrowExpressions from \"@babel/plugin-syntax-throw-expressions\";\nimport { types as t } from \"@babel/core\";\n\nexport default declare(api => {\n api.assertVersion(REQUIRED_VERSION(7));\n\n return {\n name: \"proposal-throw-expressions\",\n inherits: syntaxThrowExpressions,\n\n visitor: {\n UnaryExpression(path) {\n const { operator, argument } = path.node;\n if (operator !== \"throw\") return;\n\n const arrow = t.functionExpression(\n null,\n [t.identifier(\"e\")],\n t.blockStatement([t.throwStatement(t.identifier(\"e\"))]),\n );\n\n path.replaceWith(t.callExpression(arrow, [argument]));\n },\n },\n };\n});\n","/* eslint-disable @babel/development/plugin-name */\nimport { createRegExpFeaturePlugin } from \"@babel/helper-create-regexp-features-plugin\";\nimport { declare } from \"@babel/helper-plugin-utils\";\n\nexport interface Options {\n useUnicodeFlag?: boolean;\n}\n\nexport default declare((api, options: Options) => {\n api.assertVersion(REQUIRED_VERSION(7));\n\n const { useUnicodeFlag = true } = options;\n if (typeof useUnicodeFlag !== \"boolean\") {\n throw new Error(\".useUnicodeFlag must be a boolean, or undefined\");\n }\n\n return createRegExpFeaturePlugin({\n name: \"transform-unicode-property-regex\",\n feature: \"unicodePropertyEscape\",\n options: { useUnicodeFlag },\n });\n});\n","/* eslint-disable @babel/development/plugin-name */\nimport { createRegExpFeaturePlugin } from \"@babel/helper-create-regexp-features-plugin\";\nimport { declare } from \"@babel/helper-plugin-utils\";\n\nexport default declare(api => {\n api.assertVersion(REQUIRED_VERSION(7));\n\n return createRegExpFeaturePlugin({\n name: \"transform-unicode-sets-regex\",\n feature: \"unicodeSetsFlag\",\n manipulateOptions(opts, parserOpts) {\n parserOpts.plugins.push(\"regexpUnicodeSets\");\n },\n });\n});\n","import { declare } from \"@babel/helper-plugin-utils\";\nimport remapAsyncToGenerator from \"@babel/helper-remap-async-to-generator\";\nimport { addNamed } from \"@babel/helper-module-imports\";\nimport { types as t } from \"@babel/core\";\n\nexport interface Options {\n method?: string;\n module?: string;\n}\n\ntype State = {\n methodWrapper?: t.Identifier | t.SequenceExpression;\n};\n\nexport default declare((api, options: Options) => {\n api.assertVersion(REQUIRED_VERSION(7));\n\n const { method, module } = options;\n // Todo(BABEL 8): Consider default it to false\n const noNewArrows = api.assumption(\"noNewArrows\") ?? true;\n const ignoreFunctionLength = api.assumption(\"ignoreFunctionLength\") ?? false;\n\n if (method && module) {\n return {\n name: \"transform-async-to-generator\",\n\n visitor: {\n Function(path, state) {\n if (!path.node.async || path.node.generator) return;\n\n let wrapAsync = state.methodWrapper;\n if (wrapAsync) {\n wrapAsync = t.cloneNode(wrapAsync);\n } else {\n wrapAsync = state.methodWrapper = addNamed(path, method, module);\n }\n\n remapAsyncToGenerator(\n path,\n { wrapAsync },\n noNewArrows,\n ignoreFunctionLength,\n );\n },\n },\n };\n }\n\n return {\n name: \"transform-async-to-generator\",\n\n visitor: {\n Function(path, state) {\n if (!path.node.async || path.node.generator) return;\n\n remapAsyncToGenerator(\n path,\n { wrapAsync: state.addHelper(\"asyncToGenerator\") },\n noNewArrows,\n ignoreFunctionLength,\n );\n },\n },\n };\n});\n","import { declare } from \"@babel/helper-plugin-utils\";\n\nexport interface Options {\n spec?: boolean;\n}\n\nexport default declare((api, options: Options) => {\n api.assertVersion(REQUIRED_VERSION(7));\n\n const noNewArrows = api.assumption(\"noNewArrows\") ?? !options.spec;\n\n return {\n name: \"transform-arrow-functions\",\n\n visitor: {\n ArrowFunctionExpression(path) {\n // In some conversion cases, it may have already been converted to a function while this callback\n // was queued up.\n if (!path.isArrowFunctionExpression()) return;\n\n if (process.env.BABEL_8_BREAKING) {\n path.arrowFunctionToExpression({\n // While other utils may be fine inserting other arrows to make more transforms possible,\n // the arrow transform itself absolutely cannot insert new arrow functions.\n allowInsertArrow: false,\n noNewArrows,\n });\n } else {\n path.arrowFunctionToExpression({\n allowInsertArrow: false,\n noNewArrows,\n\n // This is only needed for backward compat with @babel/traverse <7.13.0\n // @ts-ignore(Babel 7 vs Babel 8) Removed in Babel 8\n specCompliant: !noNewArrows,\n });\n }\n },\n },\n };\n});\n","import { declare } from \"@babel/helper-plugin-utils\";\nimport { types as t, type NodePath } from \"@babel/core\";\n\nexport default declare(api => {\n api.assertVersion(REQUIRED_VERSION(7));\n\n function transformStatementList(paths: NodePath[]) {\n for (const path of paths) {\n if (!path.isFunctionDeclaration()) continue;\n const func = path.node;\n const declar = t.variableDeclaration(\"let\", [\n t.variableDeclarator(func.id, t.toExpression(func)),\n ]);\n\n // hoist it up above everything else\n // @ts-expect-error todo(flow->ts): avoid mutations\n declar._blockHoist = 2;\n\n // todo: name this\n func.id = null;\n\n path.replaceWith(declar);\n }\n }\n\n return {\n name: \"transform-block-scoped-functions\",\n\n visitor: {\n BlockStatement(path) {\n const { node, parent } = path;\n if (\n t.isFunction(parent, { body: node }) ||\n t.isExportDeclaration(parent)\n ) {\n return;\n }\n\n transformStatementList(path.get(\"body\"));\n },\n\n SwitchCase(path) {\n transformStatementList(path.get(\"consequent\"));\n },\n },\n };\n});\n","import { template, types as t } from \"@babel/core\";\nimport type { NodePath, Visitor, Scope } from \"@babel/core\";\n\ninterface LoopBodyBindingsState {\n blockScoped: Scope.Binding[];\n}\n\nconst collectLoopBodyBindingsVisitor: Visitor = {\n \"Expression|Declaration|Loop\"(path) {\n path.skip();\n },\n Scope(path, state) {\n if (path.isFunctionParent()) path.skip();\n\n const { bindings } = path.scope;\n for (const name of Object.keys(bindings)) {\n const binding = bindings[name];\n if (\n binding.kind === \"let\" ||\n binding.kind === \"const\" ||\n binding.kind === \"hoisted\"\n ) {\n state.blockScoped.push(binding);\n }\n }\n },\n};\n\nexport function getLoopBodyBindings(loopPath: NodePath) {\n const state: LoopBodyBindingsState = { blockScoped: [] };\n loopPath.traverse(collectLoopBodyBindingsVisitor, state);\n return state.blockScoped;\n}\n\nexport function getUsageInBody(\n binding: Scope.Binding,\n loopPath: NodePath,\n) {\n // UpdateExpressions are counted both as a reference and a mutation,\n // so we need to de-duplicate them.\n const seen = new WeakSet();\n\n let capturedInClosure = false;\n\n const constantViolations = filterMap(binding.constantViolations, path => {\n const { inBody, inClosure } = relativeLoopLocation(path, loopPath);\n if (!inBody) return null;\n capturedInClosure ||= inClosure;\n\n const id = path.isUpdateExpression()\n ? path.get(\"argument\")\n : path.isAssignmentExpression()\n ? path.get(\"left\")\n : null;\n if (id) seen.add(id.node);\n return id as NodePath | null;\n });\n\n const references = filterMap(binding.referencePaths, path => {\n if (seen.has(path.node)) return null;\n\n const { inBody, inClosure } = relativeLoopLocation(path, loopPath);\n if (!inBody) return null;\n capturedInClosure ||= inClosure;\n\n return path as NodePath;\n });\n\n return {\n capturedInClosure,\n hasConstantViolations: constantViolations.length > 0,\n usages: references.concat(constantViolations),\n };\n}\n\nfunction relativeLoopLocation(path: NodePath, loopPath: NodePath) {\n const bodyPath = loopPath.get(\"body\");\n let inClosure = false;\n\n for (let currPath = path; currPath; currPath = currPath.parentPath) {\n if (currPath.isFunction() || currPath.isClass() || currPath.isMethod()) {\n inClosure = true;\n }\n if (currPath === bodyPath) {\n return { inBody: true, inClosure };\n } else if (currPath === loopPath) {\n return { inBody: false, inClosure };\n }\n }\n\n throw new Error(\n \"Internal Babel error: path is not in loop. Please report this as a bug.\",\n );\n}\n\ninterface CompletionsAndVarsState {\n breaksContinues: NodePath[];\n returns: NodePath[];\n labelsStack: string[];\n labellessContinueTargets: number;\n labellessBreakTargets: number;\n\n vars: NodePath[];\n loopNode: t.Loop;\n}\n\nconst collectCompletionsAndVarsVisitor: Visitor = {\n Function(path) {\n path.skip();\n },\n LabeledStatement: {\n enter({ node }, state) {\n state.labelsStack.push(node.label.name);\n },\n exit({ node }, state) {\n const popped = state.labelsStack.pop();\n if (popped !== node.label.name) {\n throw new Error(\"Assertion failure. Please report this bug to Babel.\");\n }\n },\n },\n Loop: {\n enter(_, state) {\n state.labellessContinueTargets++;\n state.labellessBreakTargets++;\n },\n exit(_, state) {\n state.labellessContinueTargets--;\n state.labellessBreakTargets--;\n },\n },\n SwitchStatement: {\n enter(_, state) {\n state.labellessBreakTargets++;\n },\n exit(_, state) {\n state.labellessBreakTargets--;\n },\n },\n \"BreakStatement|ContinueStatement\"(\n path: NodePath,\n state,\n ) {\n const { label } = path.node;\n if (label) {\n if (state.labelsStack.includes(label.name)) return;\n } else if (\n path.isBreakStatement()\n ? state.labellessBreakTargets > 0\n : state.labellessContinueTargets > 0\n ) {\n return;\n }\n state.breaksContinues.push(path);\n },\n ReturnStatement(path, state) {\n state.returns.push(path);\n },\n VariableDeclaration(path, state) {\n if (path.parent === state.loopNode && isVarInLoopHead(path)) return;\n if (path.node.kind === \"var\") state.vars.push(path);\n },\n};\n\nexport function wrapLoopBody(\n loopPath: NodePath,\n captured: string[],\n updatedBindingsUsages: Map[]>,\n) {\n const loopNode = loopPath.node;\n const state: CompletionsAndVarsState = {\n breaksContinues: [],\n returns: [],\n labelsStack: [],\n labellessBreakTargets: 0,\n labellessContinueTargets: 0,\n vars: [],\n loopNode,\n };\n loopPath.traverse(collectCompletionsAndVarsVisitor, state);\n\n const callArgs = [];\n const closureParams = [];\n const updater = [];\n for (const [name, updatedUsage] of updatedBindingsUsages) {\n callArgs.push(t.identifier(name));\n\n const innerName = loopPath.scope.generateUid(name);\n closureParams.push(t.identifier(innerName));\n updater.push(\n t.assignmentExpression(\"=\", t.identifier(name), t.identifier(innerName)),\n );\n for (const path of updatedUsage) path.replaceWith(t.identifier(innerName));\n }\n for (const name of captured) {\n if (updatedBindingsUsages.has(name)) continue; // already injected\n callArgs.push(t.identifier(name));\n closureParams.push(t.identifier(name));\n }\n\n const id = loopPath.scope.generateUid(\"loop\");\n const fn = t.functionExpression(\n null,\n closureParams,\n t.toBlock(loopNode.body),\n );\n let call: t.Expression = t.callExpression(t.identifier(id), callArgs);\n\n const fnParent = loopPath.findParent(p => p.isFunction());\n if (fnParent) {\n const { async, generator } = fnParent.node as t.Function;\n fn.async = async;\n fn.generator = generator;\n if (generator) call = t.yieldExpression(call, true);\n else if (async) call = t.awaitExpression(call);\n }\n\n const updaterNode =\n updater.length > 0\n ? t.expressionStatement(t.sequenceExpression(updater))\n : null;\n if (updaterNode) fn.body.body.push(updaterNode);\n\n // NOTE: Calling .insertBefore on the loop path might cause the\n // loop to be moved in the AST. For example, in\n // if (true) for (let x of y) ...\n // .insertBefore will replace the loop with a block:\n // if (true) { var _loop = ...; for (let x of y) ... }\n // All subsequent operations in this function on the loop node\n // must not assume that loopPath still represents the loop.\n // TODO: Consider using a function declaration\n const [varPath] = loopPath.insertBefore(\n t.variableDeclaration(\"var\", [t.variableDeclarator(t.identifier(id), fn)]),\n ) as [NodePath];\n\n const bodyStmts: t.Statement[] = [];\n\n const varNames: string[] = [];\n for (const varPath of state.vars) {\n const assign = [];\n for (const decl of varPath.node.declarations) {\n varNames.push(...Object.keys(t.getBindingIdentifiers(decl.id)));\n if (decl.init) {\n assign.push(t.assignmentExpression(\"=\", decl.id, decl.init));\n } else if (t.isForXStatement(varPath.parent, { left: varPath.node })) {\n assign.push(decl.id as t.Identifier);\n }\n }\n if (assign.length > 0) {\n const replacement: t.Node =\n assign.length === 1 ? assign[0] : t.sequenceExpression(assign);\n varPath.replaceWith(replacement);\n } else {\n varPath.remove();\n }\n }\n if (varNames.length) {\n varPath.pushContainer(\n \"declarations\",\n varNames.map(name => t.variableDeclarator(t.identifier(name))),\n );\n }\n\n const labelNum = state.breaksContinues.length;\n const returnNum = state.returns.length;\n if (labelNum + returnNum === 0) {\n bodyStmts.push(t.expressionStatement(call));\n } else if (labelNum === 1 && returnNum === 0) {\n for (const path of state.breaksContinues) {\n const { node } = path;\n const { type, label } = node;\n let name = type === \"BreakStatement\" ? \"break\" : \"continue\";\n if (label) name += \" \" + label.name;\n path.replaceWith(\n t.addComment(\n t.returnStatement(t.numericLiteral(1)),\n \"trailing\",\n \" \" + name,\n true,\n ),\n );\n if (updaterNode) path.insertBefore(t.cloneNode(updaterNode));\n\n bodyStmts.push(\n template.statement.ast`\n if (${call}) ${node}\n `,\n );\n }\n } else {\n const completionId = loopPath.scope.generateUid(\"ret\");\n\n if (varPath.isVariableDeclaration()) {\n varPath.pushContainer(\"declarations\", [\n t.variableDeclarator(t.identifier(completionId)),\n ]);\n bodyStmts.push(\n t.expressionStatement(\n t.assignmentExpression(\"=\", t.identifier(completionId), call),\n ),\n );\n } else {\n bodyStmts.push(\n t.variableDeclaration(\"var\", [\n t.variableDeclarator(t.identifier(completionId), call),\n ]),\n );\n }\n\n const injected: string[] = [];\n for (const path of state.breaksContinues) {\n const { node } = path;\n const { type, label } = node;\n let name = type === \"BreakStatement\" ? \"break\" : \"continue\";\n if (label) name += \" \" + label.name;\n\n let i = injected.indexOf(name);\n const hasInjected = i !== -1;\n if (!hasInjected) {\n injected.push(name);\n i = injected.length - 1;\n }\n\n path.replaceWith(\n t.addComment(\n t.returnStatement(t.numericLiteral(i)),\n \"trailing\",\n \" \" + name,\n true,\n ),\n );\n if (updaterNode) path.insertBefore(t.cloneNode(updaterNode));\n\n if (hasInjected) continue;\n\n bodyStmts.push(\n template.statement.ast`\n if (${t.identifier(completionId)} === ${t.numericLiteral(i)}) ${node}\n `,\n );\n }\n\n if (returnNum) {\n for (const path of state.returns) {\n const arg = path.node.argument || path.scope.buildUndefinedNode();\n path.replaceWith(\n template.statement.ast`\n return { v: ${arg} };\n `,\n );\n }\n\n bodyStmts.push(\n template.statement.ast`\n if (${t.identifier(completionId)}) return ${t.identifier(\n completionId,\n )}.v;\n `,\n );\n }\n }\n\n loopNode.body = t.blockStatement(bodyStmts);\n\n return varPath;\n}\n\nexport function isVarInLoopHead(path: NodePath) {\n if (t.isForStatement(path.parent)) return path.key === \"init\";\n if (t.isForXStatement(path.parent)) return path.key === \"left\";\n return false;\n}\n\nfunction filterMap(list: T[], fn: (item: T) => U | null) {\n const result: U[] = [];\n for (const item of list) {\n const mapped = fn(item);\n if (mapped) result.push(mapped);\n }\n return result;\n}\n","import { types as t } from \"@babel/core\";\nimport type { Scope, NodePath, PluginPass } from \"@babel/core\";\n\nexport function validateUsage(\n path: NodePath,\n state: PluginPass,\n tdzEnabled: boolean,\n) {\n const dynamicTDZNames = [];\n\n for (const name of Object.keys(path.getBindingIdentifiers())) {\n const binding = path.scope.getBinding(name);\n // binding may be null. ref: https://github.com/babel/babel/issues/15300\n if (!binding) continue;\n if (tdzEnabled) {\n if (injectTDZChecks(binding, state)) dynamicTDZNames.push(name);\n }\n if (path.node.kind === \"const\") {\n disallowConstantViolations(name, binding, state);\n }\n }\n\n return dynamicTDZNames;\n}\n\nfunction disallowConstantViolations(\n name: string,\n binding: Scope.Binding,\n state: PluginPass,\n) {\n for (const violation of binding.constantViolations) {\n const readOnlyError = state.addHelper(\"readOnlyError\");\n const throwNode = t.callExpression(readOnlyError, [t.stringLiteral(name)]);\n\n if (violation.isAssignmentExpression()) {\n const { operator, left, right } = violation.node;\n if (operator === \"=\") {\n const exprs = [right];\n exprs.push(throwNode);\n violation.replaceWith(t.sequenceExpression(exprs));\n } else if ([\"&&=\", \"||=\", \"??=\"].includes(operator)) {\n violation.replaceWith(\n t.logicalExpression(\n // @ts-expect-error todo: give a better type to operator\n operator.slice(0, -1),\n left,\n t.sequenceExpression([right, throwNode]),\n ),\n );\n } else {\n violation.replaceWith(\n t.sequenceExpression([\n t.binaryExpression(\n // @ts-expect-error todo: give a better type to operator\n operator.slice(0, -1),\n left,\n right,\n ),\n throwNode,\n ]),\n );\n }\n } else if (violation.isUpdateExpression()) {\n violation.replaceWith(\n t.sequenceExpression([\n t.unaryExpression(\"+\", violation.get(\"argument\").node),\n throwNode,\n ]),\n );\n } else if (violation.isForXStatement()) {\n violation.ensureBlock();\n violation\n .get(\"left\")\n .replaceWith(\n t.variableDeclaration(\"var\", [\n t.variableDeclarator(violation.scope.generateUidIdentifier(name)),\n ]),\n );\n (violation.node.body as t.BlockStatement).body.unshift(\n t.expressionStatement(throwNode),\n );\n }\n }\n}\n\nfunction getTDZStatus(refPath: NodePath, bindingPath: NodePath) {\n const executionStatus = bindingPath._guessExecutionStatusRelativeTo(refPath);\n\n if (executionStatus === \"before\") {\n return \"outside\";\n } else if (executionStatus === \"after\") {\n return \"inside\";\n } else {\n return \"maybe\";\n }\n}\n\nconst skipTDZChecks = new WeakSet();\n\nfunction buildTDZAssert(\n status: \"maybe\" | \"inside\",\n node: t.Identifier | t.JSXIdentifier,\n state: PluginPass,\n) {\n if (status === \"maybe\") {\n const clone = t.cloneNode(node);\n skipTDZChecks.add(clone);\n return t.callExpression(state.addHelper(\"temporalRef\"), [\n // @ts-expect-error Fixme: we may need to handle JSXIdentifier\n clone,\n t.stringLiteral(node.name),\n ]);\n } else {\n return t.callExpression(state.addHelper(\"tdz\"), [\n t.stringLiteral(node.name),\n ]);\n }\n}\n\ntype TDZReplacement = { status: \"maybe\" | \"inside\"; node: t.Expression };\nfunction getTDZReplacement(\n path: NodePath,\n state: PluginPass,\n): TDZReplacement | undefined;\nfunction getTDZReplacement(\n path: NodePath,\n state: PluginPass,\n id: t.Identifier | t.JSXIdentifier,\n): TDZReplacement | undefined;\nfunction getTDZReplacement(\n path: NodePath,\n state: PluginPass,\n id: t.Identifier | t.JSXIdentifier = path.node as any,\n): TDZReplacement | undefined {\n if (skipTDZChecks.has(id)) return;\n skipTDZChecks.add(id);\n\n const bindingPath = path.scope.getBinding(id.name)?.path;\n\n if (!bindingPath || bindingPath.isFunctionDeclaration()) return;\n\n const status = getTDZStatus(path, bindingPath);\n if (status === \"outside\") return;\n\n if (status === \"maybe\") {\n // add tdzThis to parent variable declarator so it's exploded\n // @ts-expect-error todo(flow->ts): avoid mutations\n bindingPath.parent._tdzThis = true;\n }\n\n return { status, node: buildTDZAssert(status, id, state) };\n}\n\nfunction injectTDZChecks(binding: Scope.Binding, state: PluginPass) {\n const allUsages = new Set(binding.referencePaths);\n binding.constantViolations.forEach(allUsages.add, allUsages);\n\n let dynamicTdz = false;\n\n for (const path of binding.constantViolations) {\n const { node } = path;\n if (skipTDZChecks.has(node)) continue;\n skipTDZChecks.add(node);\n\n if (path.isUpdateExpression()) {\n // arg is an identifier referencing the current binding\n const arg = path.get(\"argument\") as NodePath;\n\n const replacement = getTDZReplacement(path, state, arg.node);\n if (!replacement) continue;\n\n if (replacement.status === \"maybe\") {\n dynamicTdz = true;\n path.insertBefore(replacement.node);\n } else {\n path.replaceWith(replacement.node);\n }\n } else if (path.isAssignmentExpression()) {\n const nodes = [];\n const ids = process.env.BABEL_8_BREAKING\n ? path.getAssignmentIdentifiers()\n : path.getBindingIdentifiers();\n\n for (const name of Object.keys(ids)) {\n const replacement = getTDZReplacement(path, state, ids[name]);\n if (replacement) {\n nodes.push(t.expressionStatement(replacement.node));\n if (replacement.status === \"inside\") break;\n if (replacement.status === \"maybe\") dynamicTdz = true;\n }\n }\n\n if (nodes.length > 0) path.insertBefore(nodes);\n }\n }\n\n for (const path of binding.referencePaths as NodePath[]) {\n if (path.parentPath.isUpdateExpression()) continue;\n // It will be handled after transforming the loop\n if (path.parentPath.isFor({ left: path.node })) continue;\n\n const replacement = getTDZReplacement(path, state);\n if (!replacement) continue;\n if (replacement.status === \"maybe\") dynamicTdz = true;\n\n path.replaceWith(replacement.node);\n }\n\n return dynamicTdz;\n}\n","import { types as t } from \"@babel/core\";\nimport type { NodePath, Visitor, Scope } from \"@babel/core\";\n\n// Whenever a function declaration in a nested block scope\n// doesn't conflict with a block-scoped binding from an outer\n// scope, we transform it to a variable declaration.\n//\n// This implements the Annex B.3.3 behavior.\n//\n// TODO(Babel 8): Figure out how this should interact with\n// the transform-block-scoped functions plugin (it feels\n// wrong to handle this transform here), and what we want\n// to do with Annex B behavior in general.\n\n// To avoid confusing block-scoped variables transformed to\n// var with original vars, this transformation happens in two\n// different places:\n// 1. For functions that \"conflict\" with var-variables, in\n// the VariableDeclaration visitor.\n// 2. For functions that don't conflict with any variable,\n// in the FunctionDeclaration visitor.\n\nexport const annexB33FunctionsVisitor: Visitor = {\n VariableDeclaration(path) {\n if (isStrict(path)) return;\n if (path.node.kind !== \"var\") return;\n\n const varScope =\n path.scope.getFunctionParent() || path.scope.getProgramParent();\n // eslint-disable-next-line @typescript-eslint/no-use-before-define\n varScope.path.traverse(functionsToVarVisitor, {\n names: Object.keys(path.getBindingIdentifiers()),\n });\n },\n\n // NOTE: These two visitors target the same nodes as the\n // block-scoped-functions plugin\n\n BlockStatement(path) {\n if (isStrict(path)) return;\n if (t.isFunction(path.parent, { body: path.node })) return;\n transformStatementList(path.get(\"body\"));\n },\n\n SwitchCase(path) {\n if (isStrict(path)) return;\n transformStatementList(path.get(\"consequent\"));\n },\n};\n\nfunction transformStatementList(paths: NodePath[]) {\n outer: for (const path of paths) {\n if (!path.isFunctionDeclaration()) continue;\n // Annex B.3.3 only applies to plain functions.\n if (path.node.async || path.node.generator) return;\n\n const { scope } = path.parentPath;\n if (isVarScope(scope)) return;\n\n const { name } = path.node.id;\n let currScope = scope;\n do {\n if (currScope.parent.hasOwnBinding(name)) continue outer;\n currScope = currScope.parent;\n } while (!isVarScope(currScope));\n\n maybeTransformBlockScopedFunction(path);\n }\n}\n\nfunction maybeTransformBlockScopedFunction(\n path: NodePath,\n) {\n const {\n node,\n parentPath: { scope },\n } = path;\n\n const { id } = node;\n scope.removeOwnBinding(id.name);\n node.id = null;\n\n const varNode = t.variableDeclaration(\"var\", [\n t.variableDeclarator(id, t.toExpression(node)),\n ]);\n // @ts-expect-error undocumented property\n varNode._blockHoist = 2;\n\n const [varPath] = path.replaceWith(varNode);\n scope.registerDeclaration(varPath);\n}\n\nconst functionsToVarVisitor: Visitor<{ names: string[] }> = {\n Scope(path, { names }) {\n for (const name of names) {\n const binding = path.scope.getOwnBinding(name);\n if (binding && binding.kind === \"hoisted\") {\n maybeTransformBlockScopedFunction(\n binding.path as NodePath,\n );\n }\n }\n },\n \"Expression|Declaration\"(path) {\n path.skip();\n },\n};\n\nexport function isVarScope(scope: Scope) {\n return scope.path.isFunctionParent() || scope.path.isProgram();\n}\n\nfunction isStrict(path: NodePath) {\n return !!path.find(({ node }) => {\n if (t.isProgram(node)) {\n if (node.sourceType === \"module\") return true;\n } else if (t.isClass(node)) {\n return true;\n } else if (!t.isBlockStatement(node)) {\n return false;\n }\n\n return node.directives?.some(\n directive => directive.value.value === \"use strict\",\n );\n });\n}\n","import { declare } from \"@babel/helper-plugin-utils\";\nimport type { NodePath, Scope, Visitor, PluginPass } from \"@babel/core\";\nimport { types as t, traverse } from \"@babel/core\";\n\nimport {\n getLoopBodyBindings,\n getUsageInBody,\n isVarInLoopHead,\n wrapLoopBody,\n} from \"./loop.ts\";\nimport { validateUsage } from \"./validation.ts\";\nimport { annexB33FunctionsVisitor, isVarScope } from \"./annex-B_3_3.ts\";\n\nexport interface Options {\n tdz?: boolean;\n throwIfClosureRequired?: boolean;\n}\n\nexport default declare((api, opts: Options) => {\n api.assertVersion(REQUIRED_VERSION(7));\n\n const { throwIfClosureRequired = false, tdz: tdzEnabled = false } = opts;\n if (typeof throwIfClosureRequired !== \"boolean\") {\n throw new Error(`.throwIfClosureRequired must be a boolean, or undefined`);\n }\n if (typeof tdzEnabled !== \"boolean\") {\n throw new Error(`.tdz must be a boolean, or undefined`);\n }\n\n return {\n name: \"transform-block-scoping\",\n\n visitor: traverse.visitors.merge([\n // TODO: Consider adding an option to control Annex B behavior.\n annexB33FunctionsVisitor,\n {\n Loop(path: NodePath, state) {\n const isForStatement = path.isForStatement();\n const headPath = isForStatement\n ? path.get(\"init\")\n : path.isForXStatement()\n ? path.get(\"left\")\n : null;\n\n let needsBodyWrap = false;\n const markNeedsBodyWrap = () => {\n if (throwIfClosureRequired) {\n throw path.buildCodeFrameError(\n \"Compiling let/const in this block would add a closure \" +\n \"(throwIfClosureRequired).\",\n );\n }\n needsBodyWrap = true;\n };\n\n const body = path.get(\"body\");\n let bodyScope: Scope | null;\n if (body.isBlockStatement()) {\n bodyScope = body.scope;\n }\n const bindings = getLoopBodyBindings(path);\n for (const binding of bindings) {\n const { capturedInClosure } = getUsageInBody(binding, path);\n if (capturedInClosure) markNeedsBodyWrap();\n }\n\n const captured: string[] = [];\n const updatedBindingsUsages: Map[]> =\n new Map();\n\n if (headPath && isBlockScoped(headPath.node)) {\n const names = Object.keys(headPath.getBindingIdentifiers());\n const headScope = headPath.scope;\n\n for (let name of names) {\n if (bodyScope?.hasOwnBinding(name)) continue; // shadowed\n\n let binding = headScope.getOwnBinding(name);\n if (!binding) {\n headScope.crawl();\n binding = headScope.getOwnBinding(name);\n }\n const { usages, capturedInClosure, hasConstantViolations } =\n getUsageInBody(binding, path);\n\n if (\n headScope.parent.hasBinding(name) ||\n headScope.parent.hasGlobal(name)\n ) {\n // If the binding is not captured, there is no need\n // of adding it to the closure param. However, rename\n // it if it shadows an outer binding, because the\n // closure will be moved to an outer level.\n const newName = headScope.generateUid(name);\n headScope.rename(name, newName);\n name = newName;\n }\n\n if (capturedInClosure) {\n markNeedsBodyWrap();\n captured.push(name);\n }\n\n if (isForStatement && hasConstantViolations) {\n updatedBindingsUsages.set(name, usages);\n }\n }\n }\n\n if (needsBodyWrap) {\n const varPath = wrapLoopBody(path, captured, updatedBindingsUsages);\n\n if (headPath?.isVariableDeclaration()) {\n // If we wrap the loop body, we transform the var\n // declaration in the loop head now, to avoid\n // invalid references that break other plugins:\n //\n // for (let head of x) {\n // let i = head;\n // setTimeout(() => i);\n // }\n //\n // would become\n //\n // function _loop() {\n // let i = head;\n // setTimeout(() => i);\n // }\n // for (let head of x) _loop();\n //\n // which references `head` in a scope where it's not visible.\n transformBlockScopedVariable(headPath, state, tdzEnabled);\n }\n\n varPath.get(\"declarations.0.init\").unwrapFunctionEnvironment();\n }\n },\n\n VariableDeclaration(path, state) {\n transformBlockScopedVariable(path, state, tdzEnabled);\n },\n\n // Class declarations are block-scoped: if there is\n // a class declaration in a nested block that conflicts\n // with an outer block-scoped binding, rename it.\n // TODO: Should this be moved to the classes plugin?\n ClassDeclaration(path) {\n const { id } = path.node;\n if (!id) return;\n\n const { scope } = path.parentPath;\n if (\n !isVarScope(scope) &&\n scope.parent.hasBinding(id.name, { noUids: true })\n ) {\n path.scope.rename(id.name);\n }\n },\n },\n ]),\n };\n});\n\nconst conflictingFunctionsVisitor: Visitor<{ names: string[] }> = {\n Scope(path, { names }) {\n for (const name of names) {\n const binding = path.scope.getOwnBinding(name);\n if (binding && binding.kind === \"hoisted\") {\n path.scope.rename(name);\n }\n }\n },\n \"Expression|Declaration\"(path) {\n path.skip();\n },\n};\n\nfunction transformBlockScopedVariable(\n path: NodePath,\n state: PluginPass,\n tdzEnabled: boolean,\n) {\n if (!isBlockScoped(path.node)) return;\n\n const dynamicTDZNames = validateUsage(path, state, tdzEnabled);\n\n path.node.kind = \"var\";\n\n const bindingNames = Object.keys(path.getBindingIdentifiers());\n for (const name of bindingNames) {\n const binding = path.scope.getOwnBinding(name);\n if (!binding) continue;\n binding.kind = \"var\";\n }\n\n if (\n (isInLoop(path) && !isVarInLoopHead(path)) ||\n dynamicTDZNames.length > 0\n ) {\n for (const decl of path.node.declarations) {\n // We explicitly add `void 0` to cases like\n // for (;;) { let a; }\n // to make sure that `a` doesn't keep the value from\n // the previous iteration.\n decl.init ??= path.scope.buildUndefinedNode();\n }\n }\n\n const blockScope = path.scope;\n const varScope =\n blockScope.getFunctionParent() || blockScope.getProgramParent();\n\n if (varScope !== blockScope) {\n for (const name of bindingNames) {\n let newName = name;\n if (\n // We pass `noUids` true because, if `name` was a generated\n // UID, it has been used to declare the current variable in\n // a nested scope and thus we don't need to assume that it\n // may be declared (but not registered yet) in an upper one.\n blockScope.parent.hasBinding(name, { noUids: true }) ||\n blockScope.parent.hasGlobal(name)\n ) {\n newName = blockScope.generateUid(name);\n blockScope.rename(name, newName);\n }\n\n blockScope.moveBindingTo(newName, varScope);\n }\n }\n\n blockScope.path.traverse(conflictingFunctionsVisitor, {\n names: bindingNames,\n });\n\n for (const name of dynamicTDZNames) {\n path.scope.push({\n id: t.identifier(name),\n init: state.addHelper(\"temporalUndefined\"),\n });\n }\n}\n\nfunction isLetOrConst(kind: string): kind is \"let\" | \"const\" {\n return kind === \"let\" || kind === \"const\";\n}\n\nfunction isInLoop(path: NodePath): boolean {\n if (!path.parentPath) return false;\n if (path.parentPath.isLoop()) return true;\n if (path.parentPath.isFunctionParent()) return false;\n return isInLoop(path.parentPath);\n}\n\nfunction isBlockScoped(node: t.Node): node is t.VariableDeclaration {\n if (!t.isVariableDeclaration(node)) return false;\n if (\n // @ts-expect-error Fixme: document symbol properties\n node[t.BLOCK_SCOPED_SYMBOL]\n ) {\n return true;\n }\n\n if (!isLetOrConst(node.kind) && node.kind !== \"using\") {\n return false;\n }\n\n return true;\n}\n","// env vars from the cli are always strings, so !!ENV_VAR returns true for \"false\"\nfunction bool(value) {\n if (value == null) return false;\n return value && value !== \"false\" && value !== \"0\";\n}\n\nmodule.exports = bool(process.env[\"BABEL_8_BREAKING\"])\n ? require(\"globals-BABEL_8_BREAKING-true\")\n : require(\"globals-BABEL_8_BREAKING-false\");\n","import { template, types as t, type File } from \"@babel/core\";\n\nconst helper = template.statement`\n function CALL_SUPER(\n _this,\n derived,\n args,\n ) {\n function isNativeReflectConstruct() {\n if (typeof Reflect === \"undefined\" || !Reflect.construct) return false;\n\n // core-js@3\n if (Reflect.construct.sham) return false;\n\n // Proxy can't be polyfilled. Every browser implemented\n // proxies before or at the same time as Reflect.construct,\n // so if they support Proxy they also support Reflect.construct.\n if (typeof Proxy === \"function\") return true;\n\n // Since Reflect.construct can't be properly polyfilled, some\n // implementations (e.g. core-js@2) don't set the correct internal slots.\n // Those polyfills don't allow us to subclass built-ins, so we need to\n // use our fallback implementation.\n try {\n // If the internal slots aren't set, this throws an error similar to\n // TypeError: this is not a Boolean object.\n return !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}),);\n } catch (e) {\n return false;\n }\n }\n\n // Super\n derived = GET_PROTOTYPE_OF(derived);\n return POSSIBLE_CONSTRUCTOR_RETURN(\n _this,\n isNativeReflectConstruct()\n ? // NOTE: This doesn't work if this.__proto__.constructor has been modified.\n Reflect.construct(\n derived,\n args || [],\n GET_PROTOTYPE_OF(_this).constructor,\n )\n : derived.apply(_this, args),\n );\n }\n`;\n\nconst helperIDs = new WeakMap();\n\nexport default function addCallSuperHelper(file: File) {\n if (helperIDs.has(file)) {\n // TODO: Only use t.cloneNode in Babel 8\n // t.cloneNode isn't supported in every version\n return (t.cloneNode || t.clone)(helperIDs.get(file));\n }\n\n try {\n return file.addHelper(\"callSuper\");\n } catch {\n // old Babel doesn't support the helper.\n }\n\n const id = file.scope.generateUidIdentifier(\"callSuper\");\n helperIDs.set(file, id);\n\n const fn = helper({\n CALL_SUPER: id,\n GET_PROTOTYPE_OF: file.addHelper(\"getPrototypeOf\"),\n POSSIBLE_CONSTRUCTOR_RETURN: file.addHelper(\"possibleConstructorReturn\"),\n });\n\n file.path.unshiftContainer(\"body\", [fn]);\n file.scope.registerDeclaration(file.path.get(\"body.0\"));\n\n return t.cloneNode(id);\n}\n","import type { NodePath, Scope, File } from \"@babel/core\";\nimport ReplaceSupers from \"@babel/helper-replace-supers\";\nimport { template, types as t } from \"@babel/core\";\nimport { visitors } from \"@babel/traverse\";\nimport annotateAsPure from \"@babel/helper-annotate-as-pure\";\n\nimport addCallSuperHelper from \"./inline-callSuper-helpers.ts\";\n\ntype ClassAssumptions = {\n setClassMethods: boolean;\n constantSuper: boolean;\n superIsCallableConstructor: boolean;\n noClassCalls: boolean;\n};\n\ntype ClassConstructor = t.ClassMethod & { kind: \"constructor\" };\n\nfunction buildConstructor(\n classRef: t.Identifier,\n constructorBody: t.BlockStatement,\n node: t.Class,\n) {\n const func = t.functionDeclaration(\n t.cloneNode(classRef),\n [],\n constructorBody,\n );\n t.inherits(func, node);\n return func;\n}\n\ntype Descriptor = {\n key: t.Expression;\n get?: t.Expression | null;\n set?: t.Expression | null;\n value?: t.Expression | null;\n constructor?: t.Expression | null;\n};\n\ntype State = {\n parent: t.Node;\n scope: Scope;\n node: t.Class;\n path: NodePath;\n file: File;\n\n classId: t.Identifier | void;\n classRef: t.Identifier;\n superName: t.Expression | null;\n superReturns: NodePath[];\n isDerived: boolean;\n extendsNative: boolean;\n\n construct: t.FunctionDeclaration;\n constructorBody: t.BlockStatement;\n userConstructor: ClassConstructor;\n userConstructorPath: NodePath;\n hasConstructor: boolean;\n\n body: t.Statement[];\n superThises: NodePath[];\n pushedInherits: boolean;\n pushedCreateClass: boolean;\n protoAlias: t.Identifier | null;\n isLoose: boolean;\n\n dynamicKeys: Map;\n\n methods: {\n // 'list' is in the same order as the elements appear in the class body.\n // if there aren't computed keys, we can safely reorder class elements\n // and use 'map' to merge duplicates.\n instance: {\n hasComputed: boolean;\n list: Descriptor[];\n map: Map;\n };\n static: {\n hasComputed: boolean;\n list: Descriptor[];\n map: Map;\n };\n };\n};\n\ntype PropertyInfo = {\n instance: t.ObjectExpression[] | null;\n static: t.ObjectExpression[] | null;\n};\n\nexport default function transformClass(\n path: NodePath,\n file: File,\n builtinClasses: ReadonlySet,\n isLoose: boolean,\n assumptions: ClassAssumptions,\n supportUnicodeId: boolean,\n) {\n const classState: State = {\n parent: undefined,\n scope: undefined,\n node: undefined,\n path: undefined,\n file: undefined,\n\n classId: undefined,\n classRef: undefined,\n superName: null,\n superReturns: [],\n isDerived: false,\n extendsNative: false,\n\n construct: undefined,\n constructorBody: undefined,\n userConstructor: undefined,\n userConstructorPath: undefined,\n hasConstructor: false,\n\n body: [],\n superThises: [],\n pushedInherits: false,\n pushedCreateClass: false,\n protoAlias: null,\n isLoose: false,\n\n dynamicKeys: new Map(),\n\n methods: {\n instance: {\n hasComputed: false,\n list: [],\n map: new Map(),\n },\n static: {\n hasComputed: false,\n list: [],\n map: new Map(),\n },\n },\n };\n\n const setState = (newState: Partial) => {\n Object.assign(classState, newState);\n };\n\n const findThisesVisitor = visitors.environmentVisitor({\n ThisExpression(path) {\n classState.superThises.push(path);\n },\n });\n\n function createClassHelper(args: t.Expression[]) {\n return t.callExpression(classState.file.addHelper(\"createClass\"), args);\n }\n\n /**\n * Creates a class constructor or bail out if there is one\n */\n function maybeCreateConstructor() {\n const classBodyPath = classState.path.get(\"body\");\n for (const path of classBodyPath.get(\"body\")) {\n if (path.isClassMethod({ kind: \"constructor\" })) return;\n }\n\n let params: t.FunctionExpression[\"params\"], body;\n\n if (classState.isDerived) {\n const constructor = template.expression.ast`\n (function () {\n super(...arguments);\n })\n ` as t.FunctionExpression;\n params = constructor.params;\n body = constructor.body;\n } else {\n params = [];\n body = t.blockStatement([]);\n }\n\n classBodyPath.unshiftContainer(\n \"body\",\n t.classMethod(\"constructor\", t.identifier(\"constructor\"), params, body),\n );\n }\n\n function buildBody() {\n maybeCreateConstructor();\n pushBody();\n verifyConstructor();\n\n if (classState.userConstructor) {\n const { constructorBody, userConstructor, construct } = classState;\n\n constructorBody.body.push(...userConstructor.body.body);\n t.inherits(construct, userConstructor);\n t.inherits(constructorBody, userConstructor.body);\n }\n\n pushDescriptors();\n }\n\n function pushBody() {\n const classBodyPaths: Array = classState.path.get(\"body.body\");\n\n for (const path of classBodyPaths) {\n const node = path.node;\n\n if (path.isClassProperty() || path.isClassPrivateProperty()) {\n throw path.buildCodeFrameError(\"Missing class properties transform.\");\n }\n\n if (node.decorators) {\n throw path.buildCodeFrameError(\n \"Method has decorators, put the decorator plugin before the classes one.\",\n );\n }\n\n if (t.isClassMethod(node)) {\n const isConstructor = node.kind === \"constructor\";\n\n const replaceSupers = new ReplaceSupers({\n methodPath: path,\n objectRef: classState.classRef,\n superRef: classState.superName,\n constantSuper: assumptions.constantSuper,\n file: classState.file,\n refToPreserve: classState.classRef,\n });\n\n replaceSupers.replace();\n\n const superReturns: NodePath[] = [];\n path.traverse(\n visitors.environmentVisitor({\n ReturnStatement(path) {\n if (!path.getFunctionParent().isArrowFunctionExpression()) {\n superReturns.push(path);\n }\n },\n }),\n );\n\n if (isConstructor) {\n pushConstructor(superReturns, node as ClassConstructor, path);\n } else {\n if (!process.env.BABEL_8_BREAKING && !USE_ESM && !IS_STANDALONE) {\n // polyfill when being run by an older Babel version\n path.ensureFunctionName ??=\n // eslint-disable-next-line no-restricted-globals\n require(\"@babel/traverse\").NodePath.prototype.ensureFunctionName;\n }\n path.ensureFunctionName(supportUnicodeId);\n let wrapped;\n if (node !== path.node) {\n wrapped = path.node;\n // The node has been wrapped. Reset it to the original once, but store the wrapper.\n path.replaceWith(node);\n }\n\n pushMethod(node, wrapped);\n }\n }\n }\n }\n\n function pushDescriptors() {\n pushInheritsToBody();\n\n const { body } = classState;\n\n const props: PropertyInfo = {\n instance: null,\n static: null,\n };\n\n for (const placement of [\"static\", \"instance\"] as const) {\n if (classState.methods[placement].list.length) {\n props[placement] = classState.methods[placement].list.map(desc => {\n const obj = t.objectExpression([\n t.objectProperty(t.identifier(\"key\"), desc.key),\n ]);\n\n for (const kind of [\"get\", \"set\", \"value\"] as const) {\n if (desc[kind] != null) {\n obj.properties.push(\n t.objectProperty(t.identifier(kind), desc[kind]),\n );\n }\n }\n\n return obj;\n });\n }\n }\n\n if (props.instance || props.static) {\n let args = [\n t.cloneNode(classState.classRef), // Constructor\n props.instance ? t.arrayExpression(props.instance) : t.nullLiteral(), // instanceDescriptors\n props.static ? t.arrayExpression(props.static) : t.nullLiteral(), // staticDescriptors\n ];\n\n let lastNonNullIndex = 0;\n for (let i = 0; i < args.length; i++) {\n if (!t.isNullLiteral(args[i])) lastNonNullIndex = i;\n }\n args = args.slice(0, lastNonNullIndex + 1);\n\n body.push(t.returnStatement(createClassHelper(args)));\n classState.pushedCreateClass = true;\n }\n }\n\n function wrapSuperCall(\n bareSuper: NodePath,\n superRef: t.Expression,\n thisRef: () => t.Identifier,\n body: NodePath,\n ) {\n const bareSuperNode = bareSuper.node;\n let call;\n\n if (assumptions.superIsCallableConstructor) {\n bareSuperNode.arguments.unshift(t.thisExpression());\n if (\n bareSuperNode.arguments.length === 2 &&\n t.isSpreadElement(bareSuperNode.arguments[1]) &&\n t.isIdentifier(bareSuperNode.arguments[1].argument, {\n name: \"arguments\",\n })\n ) {\n // special case single arguments spread\n bareSuperNode.arguments[1] = bareSuperNode.arguments[1].argument;\n bareSuperNode.callee = t.memberExpression(\n t.cloneNode(superRef),\n t.identifier(\"apply\"),\n );\n } else {\n bareSuperNode.callee = t.memberExpression(\n t.cloneNode(superRef),\n t.identifier(\"call\"),\n );\n }\n\n call = t.logicalExpression(\"||\", bareSuperNode, t.thisExpression());\n } else {\n const args: t.Expression[] = [\n t.thisExpression(),\n t.cloneNode(classState.classRef),\n ];\n if (bareSuperNode.arguments?.length) {\n const bareSuperNodeArguments = bareSuperNode.arguments as (\n | t.Expression\n | t.SpreadElement\n )[];\n\n /**\n * test262/test/language/expressions/super/call-spread-err-sngl-err-itr-get-get.js\n *\n * var iter = {};\n * Object.defineProperty(iter, Symbol.iterator, {\n * get: function() {\n * throw new Test262Error();\n * }\n * })\n * super(...iter);\n */\n\n if (\n bareSuperNodeArguments.length === 1 &&\n t.isSpreadElement(bareSuperNodeArguments[0]) &&\n t.isIdentifier(bareSuperNodeArguments[0].argument, {\n name: \"arguments\",\n })\n ) {\n args.push(bareSuperNodeArguments[0].argument);\n } else {\n args.push(t.arrayExpression(bareSuperNodeArguments));\n }\n }\n call = t.callExpression(addCallSuperHelper(classState.file), args);\n }\n\n if (\n bareSuper.parentPath.isExpressionStatement() &&\n bareSuper.parentPath.container === body.node.body &&\n body.node.body.length - 1 === bareSuper.parentPath.key\n ) {\n // this super call is the last statement in the body so we can just straight up\n // turn it into a return\n\n if (classState.superThises.length) {\n call = t.assignmentExpression(\"=\", thisRef(), call);\n }\n\n bareSuper.parentPath.replaceWith(t.returnStatement(call));\n } else {\n bareSuper.replaceWith(t.assignmentExpression(\"=\", thisRef(), call));\n }\n }\n\n function verifyConstructor() {\n if (!classState.isDerived) return;\n\n const path = classState.userConstructorPath;\n const body = path.get(\"body\");\n\n const constructorBody = path.get(\"body\");\n\n let maxGuaranteedSuperBeforeIndex = constructorBody.node.body.length;\n\n path.traverse(findThisesVisitor);\n\n let thisRef = function () {\n const ref = path.scope.generateDeclaredUidIdentifier(\"this\");\n maxGuaranteedSuperBeforeIndex++;\n thisRef = () => t.cloneNode(ref);\n return ref;\n };\n\n const buildAssertThisInitialized = function () {\n return t.callExpression(\n classState.file.addHelper(\"assertThisInitialized\"),\n [thisRef()],\n );\n };\n\n const bareSupers: NodePath[] = [];\n path.traverse(\n visitors.environmentVisitor({\n Super(path) {\n const { node, parentPath } = path;\n if (parentPath.isCallExpression({ callee: node })) {\n bareSupers.unshift(parentPath);\n }\n },\n }),\n );\n\n for (const bareSuper of bareSupers) {\n wrapSuperCall(bareSuper, classState.superName, thisRef, body);\n\n if (maxGuaranteedSuperBeforeIndex >= 0) {\n let lastParentPath: NodePath;\n bareSuper.find(function (parentPath) {\n // hit top so short circuit\n if (parentPath === constructorBody) {\n maxGuaranteedSuperBeforeIndex = Math.min(\n maxGuaranteedSuperBeforeIndex,\n lastParentPath.key as number,\n );\n return true;\n }\n\n if (\n parentPath.isLoop() ||\n parentPath.isConditional() ||\n parentPath.isArrowFunctionExpression()\n ) {\n maxGuaranteedSuperBeforeIndex = -1;\n return true;\n }\n\n lastParentPath = parentPath;\n });\n }\n }\n\n const guaranteedCalls = new Set();\n\n for (const thisPath of classState.superThises) {\n const { node, parentPath } = thisPath;\n if (parentPath.isMemberExpression({ object: node })) {\n thisPath.replaceWith(thisRef());\n continue;\n }\n\n let thisIndex: number;\n thisPath.find(function (parentPath) {\n if (parentPath.parentPath === constructorBody) {\n thisIndex = parentPath.key as number;\n return true;\n }\n });\n\n let exprPath: NodePath = thisPath.parentPath.isSequenceExpression()\n ? thisPath.parentPath\n : thisPath;\n if (\n exprPath.listKey === \"arguments\" &&\n (exprPath.parentPath.isCallExpression() ||\n exprPath.parentPath.isOptionalCallExpression())\n ) {\n exprPath = exprPath.parentPath;\n } else {\n exprPath = null;\n }\n\n if (\n (maxGuaranteedSuperBeforeIndex !== -1 &&\n thisIndex > maxGuaranteedSuperBeforeIndex) ||\n guaranteedCalls.has(exprPath)\n ) {\n thisPath.replaceWith(thisRef());\n } else {\n if (exprPath) {\n guaranteedCalls.add(exprPath);\n }\n thisPath.replaceWith(buildAssertThisInitialized());\n }\n }\n\n let wrapReturn;\n\n if (classState.isLoose) {\n wrapReturn = (returnArg: t.Expression | void) => {\n const thisExpr = buildAssertThisInitialized();\n return returnArg\n ? t.logicalExpression(\"||\", returnArg, thisExpr)\n : thisExpr;\n };\n } else {\n wrapReturn = (returnArg: t.Expression | undefined) => {\n const returnParams: t.Expression[] = [thisRef()];\n if (returnArg != null) {\n returnParams.push(returnArg);\n }\n return t.callExpression(\n classState.file.addHelper(\"possibleConstructorReturn\"),\n returnParams,\n );\n };\n }\n\n // if we have a return as the last node in the body then we've already caught that\n // return\n const bodyPaths = body.get(\"body\");\n const guaranteedSuperBeforeFinish =\n maxGuaranteedSuperBeforeIndex !== -1 &&\n maxGuaranteedSuperBeforeIndex < bodyPaths.length;\n if (!bodyPaths.length || !bodyPaths.pop().isReturnStatement()) {\n body.pushContainer(\n \"body\",\n t.returnStatement(\n guaranteedSuperBeforeFinish\n ? thisRef()\n : buildAssertThisInitialized(),\n ),\n );\n }\n\n for (const returnPath of classState.superReturns) {\n returnPath\n .get(\"argument\")\n .replaceWith(wrapReturn(returnPath.node.argument));\n }\n }\n\n /**\n * Push a method to its respective mutatorMap.\n */\n function pushMethod(node: t.ClassMethod, wrapped?: t.Expression) {\n if (node.kind === \"method\") {\n if (processMethod(node)) return;\n }\n\n const placement = node.static ? \"static\" : \"instance\";\n const methods = classState.methods[placement];\n\n const descKey = node.kind === \"method\" ? \"value\" : node.kind;\n const key =\n t.isNumericLiteral(node.key) || t.isBigIntLiteral(node.key)\n ? t.stringLiteral(String(node.key.value))\n : t.toComputedKey(node);\n methods.hasComputed = !t.isStringLiteral(key);\n\n const fn: t.Expression = wrapped ?? t.toExpression(node);\n\n let descriptor: Descriptor;\n if (\n !methods.hasComputed &&\n methods.map.has((key as t.StringLiteral).value)\n ) {\n descriptor = methods.map.get((key as t.StringLiteral).value);\n descriptor[descKey] = fn;\n\n if (descKey === \"value\") {\n descriptor.get = null;\n descriptor.set = null;\n } else {\n descriptor.value = null;\n }\n } else {\n descriptor = {\n key:\n // private name has been handled in class-properties transform\n key as t.Expression,\n [descKey]: fn,\n } as Descriptor;\n methods.list.push(descriptor);\n\n if (!methods.hasComputed) {\n methods.map.set((key as t.StringLiteral).value, descriptor);\n }\n }\n }\n\n function processMethod(node: t.ClassMethod) {\n if (assumptions.setClassMethods && !node.decorators) {\n // use assignments instead of define properties for loose classes\n let { classRef } = classState;\n if (!node.static) {\n insertProtoAliasOnce();\n classRef = classState.protoAlias;\n }\n const methodName = t.memberExpression(\n t.cloneNode(classRef),\n node.key,\n node.computed || t.isLiteral(node.key),\n );\n\n const func: t.Expression = t.functionExpression(\n // @ts-expect-error We actually set and id through .ensureFunctionName\n node.id,\n // @ts-expect-error Fixme: should throw when we see TSParameterProperty\n node.params,\n node.body,\n node.generator,\n node.async,\n );\n t.inherits(func, node);\n\n const expr = t.expressionStatement(\n t.assignmentExpression(\"=\", methodName, func),\n );\n t.inheritsComments(expr, node);\n classState.body.push(expr);\n return true;\n }\n\n return false;\n }\n\n function insertProtoAliasOnce() {\n if (classState.protoAlias === null) {\n setState({ protoAlias: classState.scope.generateUidIdentifier(\"proto\") });\n const classProto = t.memberExpression(\n classState.classRef,\n t.identifier(\"prototype\"),\n );\n const protoDeclaration = t.variableDeclaration(\"var\", [\n t.variableDeclarator(classState.protoAlias, classProto),\n ]);\n\n classState.body.push(protoDeclaration);\n }\n }\n\n /**\n * Replace the constructor body of our class.\n */\n function pushConstructor(\n superReturns: NodePath[],\n method: ClassConstructor,\n path: NodePath,\n ) {\n setState({\n userConstructorPath: path,\n userConstructor: method,\n hasConstructor: true,\n superReturns,\n });\n\n const { construct } = classState;\n\n t.inheritsComments(construct, method);\n\n // @ts-expect-error Fixme: should throw when we see TSParameterProperty\n construct.params = method.params;\n\n t.inherits(construct.body, method.body);\n construct.body.directives = method.body.directives;\n\n // we haven't pushed any descriptors yet\n // @ts-expect-error todo(flow->ts) maybe remove this block - properties from condition are not used anywhere else\n if (classState.hasInstanceDescriptors || classState.hasStaticDescriptors) {\n pushDescriptors();\n }\n\n pushInheritsToBody();\n }\n\n /**\n * Push inherits helper to body.\n */\n function pushInheritsToBody() {\n if (!classState.isDerived || classState.pushedInherits) return;\n\n classState.pushedInherits = true;\n\n // Unshift to ensure that the constructor inheritance is set up before\n // any properties can be assigned to the prototype.\n\n classState.body.unshift(\n t.expressionStatement(\n t.callExpression(\n classState.file.addHelper(\n classState.isLoose ? \"inheritsLoose\" : \"inherits\",\n ),\n [t.cloneNode(classState.classRef), t.cloneNode(classState.superName)],\n ),\n ),\n );\n }\n\n function extractDynamicKeys() {\n const { dynamicKeys, node, scope } = classState;\n\n for (const elem of node.body.body) {\n if (!t.isClassMethod(elem) || !elem.computed) continue;\n if (scope.isPure(elem.key, /* constants only*/ true)) continue;\n\n const id = scope.generateUidIdentifierBasedOnNode(elem.key);\n dynamicKeys.set(id.name, elem.key);\n\n elem.key = id;\n }\n }\n\n function setupClosureParamsArgs() {\n const { superName, dynamicKeys } = classState;\n const closureParams = [];\n const closureArgs = [];\n\n if (classState.isDerived) {\n let arg = t.cloneNode(superName);\n if (classState.extendsNative) {\n arg = t.callExpression(classState.file.addHelper(\"wrapNativeSuper\"), [\n arg,\n ]);\n annotateAsPure(arg);\n }\n\n const param =\n classState.scope.generateUidIdentifierBasedOnNode(superName);\n\n closureParams.push(param);\n closureArgs.push(arg);\n\n setState({ superName: t.cloneNode(param) });\n }\n\n for (const [name, value] of dynamicKeys) {\n closureParams.push(t.identifier(name));\n closureArgs.push(value);\n }\n\n return { closureParams, closureArgs };\n }\n\n function classTransformer(\n path: NodePath,\n file: File,\n builtinClasses: ReadonlySet,\n isLoose: boolean,\n ) {\n setState({\n parent: path.parent,\n scope: path.scope,\n node: path.node,\n path,\n file,\n isLoose,\n });\n\n setState({\n classId: classState.node.id,\n // this is the name of the binding that will **always** reference the class we've constructed\n classRef: classState.node.id\n ? t.identifier(classState.node.id.name)\n : classState.scope.generateUidIdentifier(\"class\"),\n superName: classState.node.superClass,\n isDerived: !!classState.node.superClass,\n constructorBody: t.blockStatement([]),\n });\n\n setState({\n extendsNative:\n t.isIdentifier(classState.superName) &&\n builtinClasses.has(classState.superName.name) &&\n !classState.scope.hasBinding(\n classState.superName.name,\n /* noGlobals */ true,\n ),\n });\n\n const { classRef, node, constructorBody } = classState;\n\n setState({\n construct: buildConstructor(classRef, constructorBody, node),\n });\n\n extractDynamicKeys();\n\n const { body } = classState;\n const { closureParams, closureArgs } = setupClosureParamsArgs();\n\n buildBody();\n\n // make sure this class isn't directly called (with A() instead new A())\n if (!assumptions.noClassCalls) {\n constructorBody.body.unshift(\n t.expressionStatement(\n t.callExpression(classState.file.addHelper(\"classCallCheck\"), [\n t.thisExpression(),\n t.cloneNode(classState.classRef),\n ]),\n ),\n );\n }\n\n const isStrict = path.isInStrictMode();\n let constructorOnly = body.length === 0;\n if (constructorOnly && !isStrict) {\n for (const param of classState.construct.params) {\n // It's illegal to put a use strict directive into the body of a function\n // with non-simple parameters for some reason. So, we have to use a strict\n // wrapper function.\n if (!t.isIdentifier(param)) {\n constructorOnly = false;\n break;\n }\n }\n }\n\n const directives = constructorOnly\n ? classState.construct.body.directives\n : [];\n if (!isStrict) {\n directives.push(t.directive(t.directiveLiteral(\"use strict\")));\n }\n\n if (constructorOnly) {\n // named class with only a constructor\n const expr = t.toExpression(classState.construct);\n return classState.isLoose ? expr : createClassHelper([expr]);\n }\n\n if (!classState.pushedCreateClass) {\n body.push(\n t.returnStatement(\n classState.isLoose\n ? t.cloneNode(classState.classRef)\n : createClassHelper([t.cloneNode(classState.classRef)]),\n ),\n );\n }\n\n body.unshift(classState.construct);\n\n const container = t.arrowFunctionExpression(\n closureParams,\n t.blockStatement(body, directives),\n );\n return t.callExpression(container, closureArgs);\n }\n\n return classTransformer(path, file, builtinClasses, isLoose);\n}\n","import { declare } from \"@babel/helper-plugin-utils\";\nimport { isRequired } from \"@babel/helper-compilation-targets\";\nimport annotateAsPure from \"@babel/helper-annotate-as-pure\";\nimport { types as t } from \"@babel/core\";\nimport globals from \"globals\";\nimport transformClass from \"./transformClass.ts\";\n\nconst getBuiltinClasses = (category: keyof typeof globals) =>\n Object.keys(globals[category]).filter(name => /^[A-Z]/.test(name));\n\nconst builtinClasses = new Set([\n ...getBuiltinClasses(\"builtin\"),\n ...getBuiltinClasses(\"browser\"),\n]);\n\nexport interface Options {\n loose?: boolean;\n}\n\nexport default declare((api, options: Options) => {\n api.assertVersion(REQUIRED_VERSION(7));\n\n const { loose = false } = options;\n\n const setClassMethods = api.assumption(\"setClassMethods\") ?? loose;\n const constantSuper = api.assumption(\"constantSuper\") ?? loose;\n const superIsCallableConstructor =\n api.assumption(\"superIsCallableConstructor\") ?? loose;\n const noClassCalls = api.assumption(\"noClassCalls\") ?? loose;\n const supportUnicodeId = !isRequired(\n \"transform-unicode-escapes\",\n api.targets(),\n );\n\n // todo: investigate traversal requeueing\n const VISITED = new WeakSet();\n\n return {\n name: \"transform-classes\",\n\n visitor: {\n ExportDefaultDeclaration(path) {\n if (!path.get(\"declaration\").isClassDeclaration()) return;\n if (!process.env.BABEL_8_BREAKING && !USE_ESM && !IS_STANDALONE) {\n // polyfill when being run by an older Babel version\n path.splitExportDeclaration ??=\n // eslint-disable-next-line no-restricted-globals\n require(\"@babel/traverse\").NodePath.prototype.splitExportDeclaration;\n }\n path.splitExportDeclaration();\n },\n\n ClassDeclaration(path) {\n const { node } = path;\n\n const ref = node.id || path.scope.generateUidIdentifier(\"class\");\n\n path.replaceWith(\n t.variableDeclaration(\"let\", [\n t.variableDeclarator(ref, t.toExpression(node)),\n ]),\n );\n },\n\n ClassExpression(path, state) {\n const { node } = path;\n if (VISITED.has(node)) return;\n\n if (!process.env.BABEL_8_BREAKING && !USE_ESM && !IS_STANDALONE) {\n // polyfill when being run by an older Babel version\n path.ensureFunctionName ??=\n // eslint-disable-next-line no-restricted-globals\n require(\"@babel/traverse\").NodePath.prototype.ensureFunctionName;\n }\n const replacement = path.ensureFunctionName(supportUnicodeId);\n if (replacement && replacement.node !== node) return;\n\n VISITED.add(node);\n\n const [replacedPath] = path.replaceWith(\n transformClass(\n path,\n state.file,\n builtinClasses,\n loose,\n {\n setClassMethods,\n constantSuper,\n superIsCallableConstructor,\n noClassCalls,\n },\n supportUnicodeId,\n ),\n );\n\n if (replacedPath.isCallExpression()) {\n annotateAsPure(replacedPath);\n const callee = replacedPath.get(\"callee\");\n if (callee.isArrowFunctionExpression()) {\n // This is an IIFE, so we don't need to worry about the noNewArrows assumption\n callee.arrowFunctionToExpression();\n }\n }\n },\n },\n };\n});\n","import { types as t } from \"@babel/core\";\nimport type { PluginPass, Scope } from \"@babel/core\";\nimport { declare } from \"@babel/helper-plugin-utils\";\nimport template from \"@babel/template\";\n\nexport interface Options {\n loose?: boolean;\n}\n\ntype PropertyInfo = {\n scope: Scope;\n objId: t.Identifier;\n body: t.Statement[];\n computedProps: t.ObjectMember[];\n initPropExpression: t.ObjectExpression;\n state: PluginPass;\n};\n\nif (!process.env.BABEL_8_BREAKING) {\n // eslint-disable-next-line no-var\n var DefineAccessorHelper = template.expression.ast`\n function (type, obj, key, fn) {\n var desc = { configurable: true, enumerable: true };\n desc[type] = fn;\n return Object.defineProperty(obj, key, desc);\n }\n `;\n // @ts-expect-error undocumented _compact node property\n DefineAccessorHelper._compact = true;\n}\n\nexport default declare((api, options: Options) => {\n api.assertVersion(REQUIRED_VERSION(7));\n\n const setComputedProperties =\n api.assumption(\"setComputedProperties\") ?? options.loose;\n\n const pushComputedProps = setComputedProperties\n ? pushComputedPropsLoose\n : pushComputedPropsSpec;\n\n function buildDefineAccessor(\n state: PluginPass,\n obj: t.Expression,\n prop: t.ObjectMethod,\n ) {\n const type = prop.kind as \"get\" | \"set\";\n const key =\n !prop.computed && t.isIdentifier(prop.key)\n ? t.stringLiteral(prop.key.name)\n : prop.key;\n const fn = getValue(prop);\n if (process.env.BABEL_8_BREAKING) {\n return t.callExpression(state.addHelper(\"defineAccessor\"), [\n t.stringLiteral(type),\n obj,\n key,\n fn,\n ]);\n } else {\n let helper: t.Identifier;\n if (state.availableHelper(\"defineAccessor\")) {\n helper = state.addHelper(\"defineAccessor\");\n } else {\n // Fallback for @babel/helpers <= 7.20.6, manually add helper function\n const file = state.file;\n helper = file.get(\"fallbackDefineAccessorHelper\");\n if (!helper) {\n const id = file.scope.generateUidIdentifier(\"defineAccessor\");\n file.scope.push({\n id,\n init: DefineAccessorHelper,\n });\n file.set(\"fallbackDefineAccessorHelper\", (helper = id));\n }\n helper = t.cloneNode(helper);\n }\n\n return t.callExpression(helper, [t.stringLiteral(type), obj, key, fn]);\n }\n }\n\n /**\n * Get value of an object member under object expression.\n * Returns a function expression if prop is a ObjectMethod.\n *\n * @param {t.ObjectMember} prop\n * @returns t.Expression\n */\n function getValue(prop: t.ObjectMember) {\n if (t.isObjectProperty(prop)) {\n return prop.value as t.Expression;\n } else if (t.isObjectMethod(prop)) {\n return t.functionExpression(\n null,\n prop.params,\n prop.body,\n prop.generator,\n prop.async,\n );\n }\n }\n\n function pushAssign(\n objId: t.Identifier,\n prop: t.ObjectMember,\n body: t.Statement[],\n ) {\n body.push(\n t.expressionStatement(\n t.assignmentExpression(\n \"=\",\n t.memberExpression(\n t.cloneNode(objId),\n prop.key,\n prop.computed || t.isLiteral(prop.key),\n ),\n getValue(prop),\n ),\n ),\n );\n }\n\n function pushComputedPropsLoose(info: PropertyInfo) {\n const { computedProps, state, initPropExpression, objId, body } = info;\n\n for (const prop of computedProps) {\n if (\n t.isObjectMethod(prop) &&\n (prop.kind === \"get\" || prop.kind === \"set\")\n ) {\n if (computedProps.length === 1) {\n return buildDefineAccessor(state, initPropExpression, prop);\n } else {\n body.push(\n t.expressionStatement(\n buildDefineAccessor(state, t.cloneNode(objId), prop),\n ),\n );\n }\n } else {\n pushAssign(t.cloneNode(objId), prop, body);\n }\n }\n }\n\n function pushComputedPropsSpec(info: PropertyInfo) {\n const { objId, body, computedProps, state } = info;\n\n // To prevent too deep AST structures in case of large objects\n const CHUNK_LENGTH_CAP = 10;\n\n let currentChunk: t.ObjectMember[] = null;\n const computedPropsChunks: Array = [];\n for (const prop of computedProps) {\n if (!currentChunk || currentChunk.length === CHUNK_LENGTH_CAP) {\n currentChunk = [];\n computedPropsChunks.push(currentChunk);\n }\n currentChunk.push(prop);\n }\n\n for (const chunk of computedPropsChunks) {\n const single = computedPropsChunks.length === 1;\n let node: t.Expression = single\n ? info.initPropExpression\n : t.cloneNode(objId);\n for (const prop of chunk) {\n if (\n t.isObjectMethod(prop) &&\n (prop.kind === \"get\" || prop.kind === \"set\")\n ) {\n node = buildDefineAccessor(info.state, node, prop);\n } else {\n node = t.callExpression(state.addHelper(\"defineProperty\"), [\n node,\n // PrivateName must not be in ObjectExpression\n t.toComputedKey(prop) as t.Expression,\n // the value of ObjectProperty in ObjectExpression must be an expression\n getValue(prop),\n ]);\n }\n }\n if (single) return node;\n body.push(t.expressionStatement(node));\n }\n }\n\n return {\n name: \"transform-computed-properties\",\n\n visitor: {\n ObjectExpression: {\n exit(path, state) {\n const { node, parent, scope } = path;\n let hasComputed = false;\n for (const prop of node.properties) {\n // @ts-expect-error SpreadElement must not have computed property\n hasComputed = prop.computed === true;\n if (hasComputed) break;\n }\n if (!hasComputed) return;\n\n // put all getters/setters into the first object expression as well as all initialisers up\n // to the first computed property\n\n const initProps: t.ObjectMember[] = [];\n const computedProps: t.ObjectMember[] = [];\n let foundComputed = false;\n\n for (const prop of node.properties) {\n if (t.isSpreadElement(prop)) {\n continue;\n }\n if (prop.computed) {\n foundComputed = true;\n }\n\n if (foundComputed) {\n computedProps.push(prop);\n } else {\n initProps.push(prop);\n }\n }\n\n const objId = scope.generateUidIdentifierBasedOnNode(parent);\n const initPropExpression = t.objectExpression(initProps);\n const body = [];\n\n body.push(\n t.variableDeclaration(\"var\", [\n t.variableDeclarator(objId, initPropExpression),\n ]),\n );\n\n const single = pushComputedProps({\n scope,\n objId,\n body,\n computedProps,\n initPropExpression,\n state,\n });\n\n if (single) {\n path.replaceWith(single);\n } else {\n if (setComputedProperties) {\n body.push(t.expressionStatement(t.cloneNode(objId)));\n }\n path.replaceWithMultiple(body);\n }\n },\n },\n },\n };\n});\n","/* eslint-disable @babel/development/plugin-name */\nimport { createRegExpFeaturePlugin } from \"@babel/helper-create-regexp-features-plugin\";\nimport { declare } from \"@babel/helper-plugin-utils\";\n\nexport default declare(api => {\n api.assertVersion(REQUIRED_VERSION(7));\n\n return createRegExpFeaturePlugin({\n name: \"transform-dotall-regex\",\n feature: \"dotAllFlag\",\n });\n});\n","import { declare } from \"@babel/helper-plugin-utils\";\nimport { types as t } from \"@babel/core\";\n\nfunction getName(\n key: t.Identifier | t.StringLiteral | t.NumericLiteral | t.BigIntLiteral,\n) {\n if (t.isIdentifier(key)) {\n return key.name;\n }\n return key.value.toString();\n}\n\nexport default declare(api => {\n api.assertVersion(REQUIRED_VERSION(7));\n\n return {\n name: \"transform-duplicate-keys\",\n\n visitor: {\n ObjectExpression(path) {\n const { node } = path;\n const plainProps = node.properties.filter(\n prop => !t.isSpreadElement(prop) && !prop.computed,\n ) as (t.ObjectMethod | t.ObjectProperty)[];\n\n // A property is a duplicate key if:\n // * the property is a data property, and is preceded by a data,\n // getter, or setter property of the same name.\n // * the property is a getter property, and is preceded by a data or\n // getter property of the same name.\n // * the property is a setter property, and is preceded by a data or\n // setter property of the same name.\n\n const alreadySeenData = Object.create(null);\n const alreadySeenGetters = Object.create(null);\n const alreadySeenSetters = Object.create(null);\n\n for (const prop of plainProps) {\n const name = getName(\n // prop must be non-computed\n prop.key as\n | t.Identifier\n | t.StringLiteral\n | t.NumericLiteral\n | t.BigIntLiteral,\n );\n let isDuplicate = false;\n // @ts-expect-error prop.kind is not defined in ObjectProperty\n switch (prop.kind) {\n case \"get\":\n if (alreadySeenData[name] || alreadySeenGetters[name]) {\n isDuplicate = true;\n }\n alreadySeenGetters[name] = true;\n break;\n case \"set\":\n if (alreadySeenData[name] || alreadySeenSetters[name]) {\n isDuplicate = true;\n }\n alreadySeenSetters[name] = true;\n break;\n default:\n if (\n alreadySeenData[name] ||\n alreadySeenGetters[name] ||\n alreadySeenSetters[name]\n ) {\n isDuplicate = true;\n }\n alreadySeenData[name] = true;\n }\n\n if (isDuplicate) {\n // Rely on the computed properties transform to split the property\n // assignment out of the object literal.\n prop.computed = true;\n prop.key = t.stringLiteral(name);\n }\n }\n },\n },\n };\n});\n","import type { Scope } from \"@babel/traverse\";\nimport {\n assignmentExpression,\n cloneNode,\n isIdentifier,\n isLiteral,\n isMemberExpression,\n isPrivateName,\n isPureish,\n isSuper,\n memberExpression,\n toComputedKey,\n} from \"@babel/types\";\nimport type * as t from \"@babel/types\";\n\nfunction getObjRef(\n node: t.Identifier | t.MemberExpression,\n nodes: Array,\n scope: Scope,\n): t.Identifier | t.Super {\n let ref;\n if (isIdentifier(node)) {\n if (scope.hasBinding(node.name)) {\n // this variable is declared in scope so we can be 100% sure\n // that evaluating it multiple times won't trigger a getter\n // or something else\n return node;\n } else {\n // could possibly trigger a getter so we need to only evaluate\n // it once\n ref = node;\n }\n } else if (isMemberExpression(node)) {\n ref = node.object;\n\n if (isSuper(ref) || (isIdentifier(ref) && scope.hasBinding(ref.name))) {\n // the object reference that we need to save is locally declared\n // so as per the previous comment we can be 100% sure evaluating\n // it multiple times will be safe\n // Super cannot be directly assigned so lets return it also\n return ref;\n }\n } else {\n throw new Error(`We can't explode this node type ${node[\"type\"]}`);\n }\n\n const temp = scope.generateUidIdentifierBasedOnNode(ref);\n scope.push({ id: temp });\n nodes.push(assignmentExpression(\"=\", cloneNode(temp), cloneNode(ref)));\n return temp;\n}\n\nfunction getPropRef(\n node: t.MemberExpression,\n nodes: Array,\n scope: Scope,\n): t.Identifier | t.Literal {\n const prop = node.property;\n if (isPrivateName(prop)) {\n throw new Error(\n \"We can't generate property ref for private name, please install `@babel/plugin-transform-class-properties`\",\n );\n }\n const key = toComputedKey(node, prop);\n if (isLiteral(key) && isPureish(key)) return key;\n\n const temp = scope.generateUidIdentifierBasedOnNode(prop);\n scope.push({ id: temp });\n nodes.push(assignmentExpression(\"=\", cloneNode(temp), cloneNode(prop)));\n return temp;\n}\n\nexport default function explode(\n node: t.Identifier | t.MemberExpression,\n nodes: Array,\n scope: Scope,\n): {\n uid: t.Identifier | t.MemberExpression | t.Super;\n ref: t.Identifier | t.MemberExpression;\n} {\n const obj = getObjRef(node, nodes, scope);\n\n let ref, uid;\n\n if (isIdentifier(node)) {\n ref = cloneNode(node);\n uid = obj;\n } else {\n const prop = getPropRef(node, nodes, scope);\n const computed = node.computed || isLiteral(prop);\n uid = memberExpression(cloneNode(obj), cloneNode(prop), computed);\n ref = memberExpression(cloneNode(obj), cloneNode(prop), computed);\n }\n\n return {\n uid: uid,\n ref: ref,\n };\n}\n","import { assignmentExpression, sequenceExpression } from \"@babel/types\";\nimport type { Visitor } from \"@babel/traverse\";\nimport type * as t from \"@babel/types\";\n\nimport explode from \"./explode-assignable-expression.ts\";\n\nexport default function (opts: {\n build: (\n left: t.Expression | t.PrivateName | t.Super,\n right: t.Expression,\n ) => t.Expression;\n operator: t.BinaryExpression[\"operator\"];\n}) {\n const { build, operator } = opts;\n\n const visitor: Visitor = {\n AssignmentExpression(path) {\n const { node, scope } = path;\n if (node.operator !== operator + \"=\") return;\n\n const nodes: t.AssignmentExpression[] = [];\n // @ts-expect-error Fixme: node.left can be a TSAsExpression\n const exploded = explode(node.left, nodes, scope);\n nodes.push(\n assignmentExpression(\n \"=\",\n exploded.ref,\n build(exploded.uid, node.right),\n ),\n );\n path.replaceWith(sequenceExpression(nodes));\n },\n\n BinaryExpression(path) {\n const { node } = path;\n if (node.operator === operator) {\n path.replaceWith(build(node.left, node.right));\n }\n },\n };\n return visitor;\n}\n","import { declare } from \"@babel/helper-plugin-utils\";\nimport build from \"@babel/helper-builder-binary-assignment-operator-visitor\";\nimport { types as t } from \"@babel/core\";\n\nexport default declare(api => {\n api.assertVersion(REQUIRED_VERSION(7));\n\n return {\n name: \"transform-exponentiation-operator\",\n\n visitor: build({\n operator: \"**\",\n\n build(left, right) {\n return t.callExpression(\n t.memberExpression(t.identifier(\"Math\"), t.identifier(\"pow\")),\n [\n // left can be PrivateName only if operator is `\"in\"`\n left as t.Expression,\n right,\n ],\n );\n },\n }),\n };\n});\n","import { declare } from \"@babel/helper-plugin-utils\";\nimport syntaxFlow from \"@babel/plugin-syntax-flow\";\nimport { types as t, type NodePath } from \"@babel/core\";\nimport generateCode from \"@babel/generator\";\n\nexport default declare(api => {\n api.assertVersion(REQUIRED_VERSION(7));\n\n function commentFromString(comment: string | t.Comment): t.Comment {\n return typeof comment === \"string\"\n ? { type: \"CommentBlock\", value: comment }\n : comment;\n }\n\n function attachComment({\n ofPath,\n toPath,\n where = \"trailing\",\n optional = false,\n comments = generateComment(ofPath, optional),\n keepType = false,\n }: {\n ofPath?: NodePath;\n toPath?: NodePath;\n where?: t.CommentTypeShorthand;\n optional?: boolean;\n comments?: string | t.Comment | (string | t.Comment)[];\n keepType?: boolean;\n }) {\n if (!toPath?.node) {\n toPath = ofPath.getPrevSibling();\n where = \"trailing\";\n }\n if (!toPath.node) {\n toPath = ofPath.getNextSibling();\n where = \"leading\";\n }\n if (!toPath.node) {\n toPath = ofPath.parentPath;\n where = \"inner\";\n }\n if (!Array.isArray(comments)) {\n comments = [comments];\n }\n const newComments = comments.map(commentFromString);\n if (!keepType && ofPath?.node) {\n // Removes the node at `ofPath` while conserving the comments attached\n // to it.\n const node = ofPath.node;\n const parent = ofPath.parentPath;\n const prev = ofPath.getPrevSibling();\n const next = ofPath.getNextSibling();\n const isSingleChild = !(prev.node || next.node);\n const leading = node.leadingComments;\n const trailing = node.trailingComments;\n\n if (isSingleChild && leading) {\n parent.addComments(\"inner\", leading);\n }\n toPath.addComments(where, newComments);\n ofPath.remove();\n if (isSingleChild && trailing) {\n parent.addComments(\"inner\", trailing);\n }\n } else {\n toPath.addComments(where, newComments);\n }\n }\n\n function wrapInFlowComment<\n N extends\n | t.ClassProperty\n | t.ExportNamedDeclaration\n | t.Flow\n | t.ImportDeclaration\n | t.ExportDeclaration\n | t.ImportSpecifier\n | t.ImportDeclaration,\n >(path: NodePath) {\n attachComment({\n ofPath: path,\n // @ts-expect-error optional may not exist in path.parent\n comments: generateComment(path, path.parent.optional),\n });\n }\n\n function generateComment(path: NodePath, optional?: boolean | void) {\n let comment = path\n .getSource()\n .replace(/\\*-\\//g, \"*-ESCAPED/\")\n .replace(/\\*\\//g, \"*-/\");\n if (optional) comment = \"?\" + comment;\n if (comment[0] !== \":\") comment = \":: \" + comment;\n return comment;\n }\n\n function isTypeImport(importKind: \"type\" | \"typeof\" | \"value\") {\n return importKind === \"type\" || importKind === \"typeof\";\n }\n\n return {\n name: \"transform-flow-comments\",\n inherits: syntaxFlow,\n\n visitor: {\n TypeCastExpression(path) {\n const { node } = path;\n attachComment({\n ofPath: path.get(\"typeAnnotation\"),\n toPath: path.get(\"expression\"),\n keepType: true,\n });\n path.replaceWith(t.parenthesizedExpression(node.expression));\n },\n\n // support function a(b?) {}\n Identifier(path) {\n if (path.parentPath.isFlow()) return;\n const { node } = path;\n if (node.typeAnnotation) {\n attachComment({\n ofPath: path.get(\"typeAnnotation\"),\n toPath: path,\n optional:\n node.optional ||\n // @ts-expect-error Fixme: optional is not in t.TypeAnnotation,\n // maybe we can remove it\n node.typeAnnotation.optional,\n });\n if (node.optional) {\n node.optional = false;\n }\n } else if (node.optional) {\n attachComment({\n toPath: path,\n comments: \":: ?\",\n });\n node.optional = false;\n }\n },\n\n AssignmentPattern: {\n exit({ node }) {\n const { left } = node;\n // @ts-expect-error optional is not in TSAsExpression\n if (left.optional) {\n // @ts-expect-error optional is not in TSAsExpression\n left.optional = false;\n }\n },\n },\n\n // strip optional property from function params - facebook/fbjs#17\n Function(path) {\n if (path.isDeclareFunction()) return;\n const { node } = path;\n if (node.typeParameters) {\n attachComment({\n ofPath: path.get(\"typeParameters\"),\n toPath: path.get(\"id\"),\n // @ts-expect-error Fixme: optional is not in t.TypeParameterDeclaration\n optional: node.typeParameters.optional,\n });\n }\n if (node.returnType) {\n attachComment({\n ofPath: path.get(\"returnType\"),\n toPath: path.get(\"body\"),\n where: \"leading\",\n // @ts-expect-error Fixme: optional is not in t.TypeAnnotation\n optional: node.returnType.typeAnnotation.optional,\n });\n }\n },\n\n // support for `class X { foo: string }` - #4622\n ClassProperty(path) {\n const { node } = path;\n if (!node.value) {\n wrapInFlowComment(path);\n } else if (node.typeAnnotation) {\n attachComment({\n ofPath: path.get(\"typeAnnotation\"),\n toPath: path.get(\"key\"),\n // @ts-expect-error Fixme: optional is not in t.TypeAnnotation\n optional: node.typeAnnotation.optional,\n });\n }\n },\n\n // support `export type a = {}` - #8 Error: You passed path.replaceWith() a falsy node\n ExportNamedDeclaration(path) {\n const { node } = path;\n if (node.exportKind !== \"type\" && !t.isFlow(node.declaration)) {\n return;\n }\n wrapInFlowComment(path);\n },\n\n // support `import type A` and `import typeof A` #10\n ImportDeclaration(path) {\n const { node } = path;\n if (isTypeImport(node.importKind)) {\n wrapInFlowComment(path);\n return;\n }\n\n const typeSpecifiers = node.specifiers.filter(\n specifier =>\n specifier.type === \"ImportSpecifier\" &&\n isTypeImport(specifier.importKind),\n );\n\n const nonTypeSpecifiers = node.specifiers.filter(\n specifier =>\n specifier.type !== \"ImportSpecifier\" ||\n !isTypeImport(specifier.importKind),\n );\n node.specifiers = nonTypeSpecifiers;\n\n if (typeSpecifiers.length > 0) {\n const typeImportNode = t.cloneNode(node);\n typeImportNode.specifiers = typeSpecifiers;\n const comment = `:: ${generateCode(typeImportNode).code}`;\n\n if (nonTypeSpecifiers.length > 0) {\n attachComment({ toPath: path, comments: comment });\n } else {\n attachComment({ ofPath: path, comments: comment });\n }\n }\n },\n ObjectPattern(path) {\n const { node } = path;\n if (node.typeAnnotation) {\n attachComment({\n ofPath: path.get(\"typeAnnotation\"),\n toPath: path,\n optional:\n node.optional ||\n // @ts-expect-error Fixme: optional is not in t.TypeAnnotation\n node.typeAnnotation.optional,\n });\n }\n },\n\n Flow(\n path: NodePath<\n t.Flow | t.ImportDeclaration | t.ExportDeclaration | t.ImportSpecifier\n >,\n ) {\n wrapInFlowComment(path);\n },\n\n Class(path) {\n const { node } = path;\n let comments: [string?, ...(string | t.Comment)[]] = [];\n if (node.typeParameters) {\n const typeParameters = path.get(\"typeParameters\");\n comments.push(\n // @ts-expect-error optional is not in TypeParameterDeclaration\n generateComment(typeParameters, node.typeParameters.optional),\n );\n const trailingComments = node.typeParameters.trailingComments;\n if (trailingComments) {\n comments.push(...trailingComments);\n }\n typeParameters.remove();\n }\n\n if (node.superClass) {\n if (comments.length > 0) {\n attachComment({\n toPath: path.get(\"id\"),\n comments: comments,\n });\n comments = [];\n }\n\n if (node.superTypeParameters) {\n const superTypeParameters = path.get(\n \"superTypeParameters\",\n ) as NodePath;\n comments.push(\n generateComment(\n superTypeParameters,\n // @ts-expect-error optional is not in TypeParameterInstantiation\n superTypeParameters.node.optional,\n ),\n );\n superTypeParameters.remove();\n }\n }\n\n if (node.implements) {\n const impls = path.get(\"implements\");\n const comment =\n \"implements \" +\n impls\n .map(impl => generateComment(impl).replace(/^:: /, \"\"))\n .join(\", \");\n delete node[\"implements\"];\n\n if (comments.length === 1) {\n comments[0] += ` ${comment}`;\n } else {\n comments.push(`:: ${comment}`);\n }\n }\n\n if (comments.length > 0) {\n attachComment({\n toPath: path.get(\"body\"),\n where: \"leading\",\n comments: comments,\n });\n }\n },\n },\n };\n});\n","import { declare } from \"@babel/helper-plugin-utils\";\nimport syntaxFlow from \"@babel/plugin-syntax-flow\";\nimport { types as t, type NodePath } from \"@babel/core\";\n\nexport interface Options {\n requireDirective?: boolean;\n allowDeclareFields?: boolean;\n}\n\nexport default declare((api, opts: Options) => {\n api.assertVersion(REQUIRED_VERSION(7));\n\n const FLOW_DIRECTIVE = /@flow(?:\\s+(?:strict(?:-local)?|weak))?|@noflow/;\n\n let skipStrip = false;\n\n const { requireDirective = false } = opts;\n\n if (!process.env.BABEL_8_BREAKING) {\n // eslint-disable-next-line no-var\n var { allowDeclareFields = false } = opts;\n }\n\n return {\n name: \"transform-flow-strip-types\",\n inherits: syntaxFlow,\n\n visitor: {\n Program(\n path,\n {\n file: {\n ast: { comments },\n },\n },\n ) {\n skipStrip = false;\n let directiveFound = false;\n\n if (comments) {\n for (const comment of comments) {\n if (FLOW_DIRECTIVE.test(comment.value)) {\n directiveFound = true;\n\n // remove flow directive\n comment.value = comment.value.replace(FLOW_DIRECTIVE, \"\");\n\n // remove the comment completely if it only consists of whitespace and/or stars\n if (!comment.value.replace(/\\*/g, \"\").trim()) {\n comment.ignore = true;\n }\n }\n }\n }\n\n if (!directiveFound && requireDirective) {\n skipStrip = true;\n }\n },\n ImportDeclaration(path) {\n if (skipStrip) return;\n if (!path.node.specifiers.length) return;\n\n let typeCount = 0;\n\n // @ts-expect-error importKind is only in importSpecifier\n path.node.specifiers.forEach(({ importKind }) => {\n if (importKind === \"type\" || importKind === \"typeof\") {\n typeCount++;\n }\n });\n\n if (typeCount === path.node.specifiers.length) {\n path.remove();\n }\n },\n\n Flow(\n path: NodePath<\n t.Flow | t.ImportDeclaration | t.ExportDeclaration | t.ImportSpecifier\n >,\n ) {\n if (skipStrip) {\n throw path.buildCodeFrameError(\n \"A @flow directive is required when using Flow annotations with \" +\n \"the `requireDirective` option.\",\n );\n }\n\n path.remove();\n },\n\n ClassPrivateProperty(path) {\n if (skipStrip) return;\n path.node.typeAnnotation = null;\n },\n\n Class(path) {\n if (skipStrip) return;\n path.node.implements = null;\n\n // We do this here instead of in a `ClassProperty` visitor because the class transform\n // would transform the class before we reached the class property.\n path.get(\"body.body\").forEach(child => {\n if (child.isClassProperty()) {\n const { node } = child;\n\n if (!process.env.BABEL_8_BREAKING) {\n if (!allowDeclareFields && node.declare) {\n throw child.buildCodeFrameError(\n `The 'declare' modifier is only allowed when the ` +\n `'allowDeclareFields' option of ` +\n `@babel/plugin-transform-flow-strip-types or ` +\n `@babel/preset-flow is enabled.`,\n );\n }\n }\n\n if (node.declare) {\n child.remove();\n } else {\n if (!process.env.BABEL_8_BREAKING) {\n if (!allowDeclareFields && !node.value && !node.decorators) {\n child.remove();\n return;\n }\n }\n\n node.variance = null;\n node.typeAnnotation = null;\n }\n }\n });\n },\n\n AssignmentPattern({ node }) {\n if (skipStrip) return;\n // @ts-expect-error optional is not in TSAsExpression\n if (node.left.optional) {\n // @ts-expect-error optional is not in TSAsExpression\n node.left.optional = false;\n }\n },\n\n Function({ node }) {\n if (skipStrip) return;\n if (\n node.params.length > 0 &&\n node.params[0].type === \"Identifier\" &&\n node.params[0].name === \"this\"\n ) {\n node.params.shift();\n }\n for (let i = 0; i < node.params.length; i++) {\n let param = node.params[i];\n if (param.type === \"AssignmentPattern\") {\n // @ts-expect-error: refine AST types, the left of an assignment pattern as a binding\n // must not be a MemberExpression\n param = param.left;\n }\n // @ts-expect-error optional is not in TSAsExpression\n if (param.optional) {\n // @ts-expect-error optional is not in TSAsExpression\n param.optional = false;\n }\n }\n\n if (!t.isMethod(node)) {\n node.predicate = null;\n }\n },\n\n TypeCastExpression(path) {\n if (skipStrip) return;\n let { node } = path;\n do {\n // @ts-expect-error node is a search pointer\n node = node.expression;\n } while (t.isTypeCastExpression(node));\n path.replaceWith(node);\n },\n\n CallExpression({ node }) {\n if (skipStrip) return;\n node.typeArguments = null;\n },\n\n OptionalCallExpression({ node }) {\n if (skipStrip) return;\n node.typeArguments = null;\n },\n\n NewExpression({ node }) {\n if (skipStrip) return;\n node.typeArguments = null;\n },\n },\n };\n});\n","import { template, types as t } from \"@babel/core\";\nimport type { PluginPass, NodePath } from \"@babel/core\";\n\n// This is the legacy implementation, which inlines all the code.\n// It must be kept for compatibility reasons.\n// TODO(Babel 8): Remove this file.\n\nexport default function transformWithoutHelper(\n loose: boolean | void,\n path: NodePath,\n state: PluginPass,\n) {\n const pushComputedProps = loose\n ? pushComputedPropsLoose\n : pushComputedPropsSpec;\n\n const { node } = path;\n const build = pushComputedProps(path, state);\n const declar = build.declar;\n const loop = build.loop;\n const block = loop.body as t.BlockStatement;\n\n // ensure that it's a block so we can take all its statements\n path.ensureBlock();\n\n // add the value declaration to the new loop body\n if (declar) {\n block.body.push(declar);\n }\n\n // push the rest of the original loop body onto our new body\n block.body.push(...(node.body as t.BlockStatement).body);\n\n t.inherits(loop, node);\n t.inherits(loop.body, node.body);\n\n if (build.replaceParent) {\n path.parentPath.replaceWithMultiple(build.node);\n path.remove();\n } else {\n path.replaceWithMultiple(build.node);\n }\n}\n\nconst buildForOfLoose = template.statement(`\n for (var LOOP_OBJECT = OBJECT,\n IS_ARRAY = Array.isArray(LOOP_OBJECT),\n INDEX = 0,\n LOOP_OBJECT = IS_ARRAY ? LOOP_OBJECT : LOOP_OBJECT[Symbol.iterator]();;) {\n INTERMEDIATE;\n if (IS_ARRAY) {\n if (INDEX >= LOOP_OBJECT.length) break;\n ID = LOOP_OBJECT[INDEX++];\n } else {\n INDEX = LOOP_OBJECT.next();\n if (INDEX.done) break;\n ID = INDEX.value;\n }\n }\n`);\n\nconst buildForOf = template.statements(`\n var ITERATOR_COMPLETION = true;\n var ITERATOR_HAD_ERROR_KEY = false;\n var ITERATOR_ERROR_KEY = undefined;\n try {\n for (\n var ITERATOR_KEY = OBJECT[Symbol.iterator](), STEP_KEY;\n !(ITERATOR_COMPLETION = (STEP_KEY = ITERATOR_KEY.next()).done);\n ITERATOR_COMPLETION = true\n ) {}\n } catch (err) {\n ITERATOR_HAD_ERROR_KEY = true;\n ITERATOR_ERROR_KEY = err;\n } finally {\n try {\n if (!ITERATOR_COMPLETION && ITERATOR_KEY.return != null) {\n ITERATOR_KEY.return();\n }\n } finally {\n if (ITERATOR_HAD_ERROR_KEY) {\n throw ITERATOR_ERROR_KEY;\n }\n }\n }\n`);\n\nfunction pushComputedPropsLoose(\n path: NodePath,\n state: PluginPass,\n) {\n const { node, scope, parent } = path;\n const { left } = node;\n let declar, id, intermediate;\n\n if (t.isIdentifier(left) || t.isPattern(left) || t.isMemberExpression(left)) {\n // for (i of test), for ({ i } of test)\n id = left;\n intermediate = null;\n } else if (t.isVariableDeclaration(left)) {\n // for (let i of test)\n id = scope.generateUidIdentifier(\"ref\");\n declar = t.variableDeclaration(left.kind, [\n t.variableDeclarator(left.declarations[0].id, t.identifier(id.name)),\n ]);\n intermediate = t.variableDeclaration(\"var\", [\n t.variableDeclarator(t.identifier(id.name)),\n ]);\n } else {\n throw state.buildCodeFrameError(\n left,\n `Unknown node type ${left.type} in ForStatement`,\n );\n }\n\n const iteratorKey = scope.generateUidIdentifier(\"iterator\");\n const isArrayKey = scope.generateUidIdentifier(\"isArray\");\n\n const loop = buildForOfLoose({\n LOOP_OBJECT: iteratorKey,\n IS_ARRAY: isArrayKey,\n OBJECT: node.right,\n INDEX: scope.generateUidIdentifier(\"i\"),\n ID: id,\n INTERMEDIATE: intermediate,\n }) as t.ForStatement;\n\n //\n const isLabeledParent = t.isLabeledStatement(parent);\n let labeled;\n\n if (isLabeledParent) {\n labeled = t.labeledStatement(parent.label, loop);\n }\n\n return {\n replaceParent: isLabeledParent,\n declar: declar,\n node: labeled || loop,\n loop: loop,\n };\n}\n\nfunction pushComputedPropsSpec(\n path: NodePath,\n state: PluginPass,\n) {\n const { node, scope, parent } = path;\n const left = node.left;\n let declar;\n\n const stepKey = scope.generateUid(\"step\");\n const stepValue = t.memberExpression(\n t.identifier(stepKey),\n t.identifier(\"value\"),\n );\n\n if (t.isIdentifier(left) || t.isPattern(left) || t.isMemberExpression(left)) {\n // for (i of test), for ({ i } of test)\n declar = t.expressionStatement(\n t.assignmentExpression(\"=\", left, stepValue),\n );\n } else if (t.isVariableDeclaration(left)) {\n // for (let i of test)\n declar = t.variableDeclaration(left.kind, [\n t.variableDeclarator(left.declarations[0].id, stepValue),\n ]);\n } else {\n throw state.buildCodeFrameError(\n left,\n `Unknown node type ${left.type} in ForStatement`,\n );\n }\n\n const template = buildForOf({\n ITERATOR_HAD_ERROR_KEY: scope.generateUidIdentifier(\"didIteratorError\"),\n ITERATOR_COMPLETION: scope.generateUidIdentifier(\n \"iteratorNormalCompletion\",\n ),\n ITERATOR_ERROR_KEY: scope.generateUidIdentifier(\"iteratorError\"),\n ITERATOR_KEY: scope.generateUidIdentifier(\"iterator\"),\n STEP_KEY: t.identifier(stepKey),\n OBJECT: node.right,\n });\n\n const isLabeledParent = t.isLabeledStatement(parent);\n\n const tryBody = (template[3] as t.TryStatement).block.body;\n const loop = tryBody[0] as t.ForStatement;\n\n if (isLabeledParent) {\n tryBody[0] = t.labeledStatement(parent.label, loop);\n }\n\n //\n\n return {\n replaceParent: isLabeledParent,\n declar: declar,\n loop: loop,\n node: template,\n };\n}\n","import { declare } from \"@babel/helper-plugin-utils\";\nimport { template, types as t, type NodePath } from \"@babel/core\";\n\nimport transformWithoutHelper from \"./no-helper-implementation.ts\";\nimport { skipTransparentExprWrapperNodes } from \"@babel/helper-skip-transparent-expression-wrappers\";\n\nexport interface Options {\n allowArrayLike?: boolean;\n assumeArray?: boolean;\n loose?: boolean;\n}\n\nfunction buildLoopBody(\n path: NodePath,\n declar: t.Statement,\n newBody?: t.Statement | t.Expression,\n) {\n let block;\n const bodyPath = path.get(\"body\");\n const body = newBody ?? bodyPath.node;\n if (\n t.isBlockStatement(body) &&\n Object.keys(path.getBindingIdentifiers()).some(id =>\n bodyPath.scope.hasOwnBinding(id),\n )\n ) {\n block = t.blockStatement([declar, body]);\n } else {\n block = t.toBlock(body);\n block.body.unshift(declar);\n }\n return block;\n}\n\nexport default declare((api, options: Options) => {\n api.assertVersion(REQUIRED_VERSION(7));\n\n {\n const { assumeArray, allowArrayLike, loose } = options;\n\n if (loose === true && assumeArray === true) {\n throw new Error(\n `The loose and assumeArray options cannot be used together in @babel/plugin-transform-for-of`,\n );\n }\n\n if (assumeArray === true && allowArrayLike === true) {\n throw new Error(\n `The assumeArray and allowArrayLike options cannot be used together in @babel/plugin-transform-for-of`,\n );\n }\n\n if (!process.env.BABEL_8_BREAKING) {\n // TODO: Remove in Babel 8\n if (allowArrayLike && /^7\\.\\d\\./.test(api.version)) {\n throw new Error(\n `The allowArrayLike is only supported when using @babel/core@^7.10.0`,\n );\n }\n }\n }\n\n const iterableIsArray =\n options.assumeArray ??\n // Loose mode is not compatible with 'assumeArray', so we shouldn't read\n // 'iterableIsArray' if 'loose' is true.\n (!options.loose && api.assumption(\"iterableIsArray\"));\n\n const arrayLikeIsIterable =\n options.allowArrayLike ?? api.assumption(\"arrayLikeIsIterable\");\n\n const skipIteratorClosing =\n api.assumption(\"skipForOfIteratorClosing\") ?? options.loose;\n\n if (iterableIsArray && arrayLikeIsIterable) {\n throw new Error(\n `The \"iterableIsArray\" and \"arrayLikeIsIterable\" assumptions are not compatible.`,\n );\n }\n\n if (iterableIsArray) {\n return {\n name: \"transform-for-of\",\n\n visitor: {\n ForOfStatement(path) {\n const { scope } = path;\n const { left, await: isAwait } = path.node;\n if (isAwait) {\n return;\n }\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion\n const right = skipTransparentExprWrapperNodes(\n path.node.right,\n ) as t.Expression;\n const i = scope.generateUidIdentifier(\"i\");\n let array: t.Identifier | t.ThisExpression =\n scope.maybeGenerateMemoised(right, true);\n if (\n !array &&\n t.isIdentifier(right) &&\n path.get(\"body\").scope.hasOwnBinding(right.name)\n ) {\n array = scope.generateUidIdentifier(\"arr\");\n }\n\n const inits = [t.variableDeclarator(i, t.numericLiteral(0))];\n if (array) {\n inits.push(t.variableDeclarator(array, right));\n } else {\n array = right as t.Identifier | t.ThisExpression;\n }\n\n const item = t.memberExpression(\n t.cloneNode(array),\n t.cloneNode(i),\n true,\n );\n let assignment;\n if (t.isVariableDeclaration(left)) {\n assignment = left;\n assignment.declarations[0].init = item;\n } else {\n assignment = t.expressionStatement(\n t.assignmentExpression(\"=\", left, item),\n );\n }\n\n path.replaceWith(\n t.forStatement(\n t.variableDeclaration(\"let\", inits),\n t.binaryExpression(\n \"<\",\n t.cloneNode(i),\n t.memberExpression(t.cloneNode(array), t.identifier(\"length\")),\n ),\n t.updateExpression(\"++\", t.cloneNode(i)),\n buildLoopBody(path, assignment),\n ),\n );\n },\n },\n };\n }\n\n const buildForOfArray = template`\n for (var KEY = 0, NAME = ARR; KEY < NAME.length; KEY++) BODY;\n `;\n\n const buildForOfNoIteratorClosing = template.statements`\n for (var ITERATOR_HELPER = CREATE_ITERATOR_HELPER(OBJECT, ARRAY_LIKE_IS_ITERABLE), STEP_KEY;\n !(STEP_KEY = ITERATOR_HELPER()).done;) BODY;\n `;\n\n const buildForOf = template.statements`\n var ITERATOR_HELPER = CREATE_ITERATOR_HELPER(OBJECT, ARRAY_LIKE_IS_ITERABLE), STEP_KEY;\n try {\n for (ITERATOR_HELPER.s(); !(STEP_KEY = ITERATOR_HELPER.n()).done;) BODY;\n } catch (err) {\n ITERATOR_HELPER.e(err);\n } finally {\n ITERATOR_HELPER.f();\n }\n `;\n\n const builder = skipIteratorClosing\n ? {\n build: buildForOfNoIteratorClosing,\n helper: \"createForOfIteratorHelperLoose\",\n getContainer: (nodes: t.Statement[]): [t.ForStatement] =>\n nodes as [t.ForStatement],\n }\n : {\n build: buildForOf,\n helper: \"createForOfIteratorHelper\",\n getContainer: (nodes: t.Statement[]): [t.ForStatement] =>\n (nodes[1] as t.TryStatement).block.body as [t.ForStatement],\n };\n\n function _ForOfStatementArray(path: NodePath) {\n const { node, scope } = path;\n\n const right = scope.generateUidIdentifierBasedOnNode(node.right, \"arr\");\n const iterationKey = scope.generateUidIdentifier(\"i\");\n\n const loop = buildForOfArray({\n BODY: node.body,\n KEY: iterationKey,\n NAME: right,\n ARR: node.right,\n }) as t.For;\n\n t.inherits(loop, node);\n\n const iterationValue = t.memberExpression(\n t.cloneNode(right),\n t.cloneNode(iterationKey),\n true,\n );\n\n let declar;\n const left = node.left;\n if (t.isVariableDeclaration(left)) {\n left.declarations[0].init = iterationValue;\n declar = left;\n } else {\n declar = t.expressionStatement(\n t.assignmentExpression(\"=\", left, iterationValue),\n );\n }\n\n loop.body = buildLoopBody(path, declar, loop.body);\n\n return loop;\n }\n\n return {\n name: \"transform-for-of\",\n visitor: {\n ForOfStatement(path, state) {\n const right = path.get(\"right\");\n if (\n right.isArrayExpression() ||\n (process.env.BABEL_8_BREAKING\n ? right.isGenericType(\"Array\")\n : right.isGenericType(\"Array\") ||\n t.isArrayTypeAnnotation(right.getTypeAnnotation()))\n ) {\n path.replaceWith(_ForOfStatementArray(path));\n return;\n }\n\n if (!process.env.BABEL_8_BREAKING) {\n if (!state.availableHelper(builder.helper)) {\n // Babel <7.9.0 doesn't support this helper\n transformWithoutHelper(skipIteratorClosing, path, state);\n return;\n }\n }\n\n const { node, parent, scope } = path;\n const left = node.left;\n let declar;\n\n const stepKey = scope.generateUid(\"step\");\n const stepValue = t.memberExpression(\n t.identifier(stepKey),\n t.identifier(\"value\"),\n );\n\n if (t.isVariableDeclaration(left)) {\n // for (let i of test)\n declar = t.variableDeclaration(left.kind, [\n t.variableDeclarator(left.declarations[0].id, stepValue),\n ]);\n } else {\n // for (i of test), for ({ i } of test)\n declar = t.expressionStatement(\n t.assignmentExpression(\"=\", left, stepValue),\n );\n }\n\n const nodes = builder.build({\n CREATE_ITERATOR_HELPER: state.addHelper(builder.helper),\n ITERATOR_HELPER: scope.generateUidIdentifier(\"iterator\"),\n ARRAY_LIKE_IS_ITERABLE: arrayLikeIsIterable\n ? t.booleanLiteral(true)\n : null,\n STEP_KEY: t.identifier(stepKey),\n OBJECT: node.right,\n BODY: buildLoopBody(path, declar),\n });\n const container = builder.getContainer(nodes);\n\n t.inherits(container[0], node);\n t.inherits(container[0].body, node.body);\n\n if (t.isLabeledStatement(parent)) {\n // @ts-expect-error replacing node types\n container[0] = t.labeledStatement(parent.label, container[0]);\n\n path.parentPath.replaceWithMultiple(nodes);\n\n // The parent has been replaced, prevent Babel from traversing a detached path\n path.skip();\n } else {\n path.replaceWithMultiple(nodes);\n }\n },\n },\n };\n});\n","import { isRequired } from \"@babel/helper-compilation-targets\";\nimport { declare } from \"@babel/helper-plugin-utils\";\n\nexport default declare(api => {\n api.assertVersion(REQUIRED_VERSION(7));\n const supportUnicodeId = !isRequired(\n \"transform-unicode-escapes\",\n api.targets(),\n );\n\n return {\n name: \"transform-function-name\",\n\n visitor: {\n FunctionExpression: {\n exit(path) {\n if (path.key !== \"value\" && !path.parentPath.isObjectProperty()) {\n if (!process.env.BABEL_8_BREAKING && !USE_ESM && !IS_STANDALONE) {\n // polyfill when being run by an older Babel version\n path.ensureFunctionName ??=\n // eslint-disable-next-line no-restricted-globals\n require(\"@babel/traverse\").NodePath.prototype.ensureFunctionName;\n }\n path.ensureFunctionName(supportUnicodeId);\n }\n },\n },\n\n ObjectProperty(path) {\n const value = path.get(\"value\");\n if (value.isFunction()) {\n if (!process.env.BABEL_8_BREAKING && !USE_ESM && !IS_STANDALONE) {\n // polyfill when being run by an older Babel version\n value.ensureFunctionName ??=\n // eslint-disable-next-line no-restricted-globals\n require(\"@babel/traverse\").NodePath.prototype.ensureFunctionName;\n }\n // @ts-expect-error Fixme: should check ArrowFunctionExpression\n value.ensureFunctionName(supportUnicodeId);\n }\n },\n },\n };\n});\n","import { declare } from \"@babel/helper-plugin-utils\";\nimport { types as t } from \"@babel/core\";\n\nexport default declare(api => {\n api.assertVersion(REQUIRED_VERSION(7));\n\n return {\n name: \"transform-instanceof\",\n\n visitor: {\n BinaryExpression(path) {\n const { node } = path;\n if (node.operator === \"instanceof\") {\n const helper = this.addHelper(\"instanceof\");\n const isUnderHelper = path.findParent(path => {\n return (\n (path.isVariableDeclarator() && path.node.id === helper) ||\n (path.isFunctionDeclaration() &&\n path.node.id &&\n path.node.id.name === helper.name)\n );\n });\n\n if (isUnderHelper) {\n return;\n } else {\n path.replaceWith(\n t.callExpression(helper, [\n // @ts-expect-error node.left can be PrivateName only when node.operator is \"in\"\n node.left,\n node.right,\n ]),\n );\n }\n }\n },\n },\n };\n});\n","import { declare } from \"@babel/helper-plugin-utils\";\nimport { types as t } from \"@babel/core\";\n\nexport default declare(api => {\n api.assertVersion(REQUIRED_VERSION(7));\n\n return {\n name: \"transform-jscript\",\n\n visitor: {\n FunctionExpression: {\n exit(path) {\n const { node } = path;\n if (!node.id) return;\n\n path.replaceWith(\n t.callExpression(\n t.functionExpression(\n null,\n [],\n t.blockStatement([\n // @ts-expect-error t.toStatement must return a FunctionDeclaration if node.id is defined\n t.toStatement(node),\n t.returnStatement(t.cloneNode(node.id)),\n ]),\n ),\n [],\n ),\n );\n },\n },\n },\n };\n});\n","import { declare } from \"@babel/helper-plugin-utils\";\n\nexport default declare(api => {\n api.assertVersion(REQUIRED_VERSION(7));\n\n return {\n name: \"transform-literals\",\n\n visitor: {\n NumericLiteral({ node }) {\n // number octal like 0b10 or 0o70\n // @ts-expect-error Add node.extra typings\n if (node.extra && /^0[ob]/i.test(node.extra.raw)) {\n node.extra = undefined;\n }\n },\n\n StringLiteral({ node }) {\n // unicode escape\n // @ts-expect-error Add node.extra typings\n if (node.extra && /\\\\u/i.test(node.extra.raw)) {\n node.extra = undefined;\n }\n },\n },\n };\n});\n","import { declare } from \"@babel/helper-plugin-utils\";\nimport { types as t } from \"@babel/core\";\n\nexport default declare(api => {\n api.assertVersion(REQUIRED_VERSION(7));\n\n return {\n name: \"transform-member-expression-literals\",\n\n visitor: {\n MemberExpression: {\n exit({ node }) {\n const prop = node.property;\n if (\n !node.computed &&\n t.isIdentifier(prop) &&\n !t.isValidES3Identifier(prop.name)\n ) {\n // foo.default -> foo[\"default\"]\n node.property = t.stringLiteral(prop.name);\n node.computed = true;\n }\n },\n },\n },\n };\n});\n","import { declare } from \"@babel/helper-plugin-utils\";\nimport {\n buildDynamicImport,\n isModule,\n rewriteModuleStatementsAndPrepareHeader,\n type RewriteModuleStatementsAndPrepareHeaderOptions,\n hasExports,\n isSideEffectImport,\n buildNamespaceInitStatements,\n ensureStatementsHoisted,\n wrapInterop,\n getModuleName,\n} from \"@babel/helper-module-transforms\";\nimport { template, types as t } from \"@babel/core\";\nimport type { PluginOptions } from \"@babel/helper-module-transforms\";\nimport type { NodePath, PluginPass } from \"@babel/core\";\n\nconst buildWrapper = template.statement(`\n define(MODULE_NAME, AMD_ARGUMENTS, function(IMPORT_NAMES) {\n })\n`);\n\nconst buildAnonymousWrapper = template.statement(`\n define([\"require\"], function(REQUIRE) {\n })\n`);\n\nfunction injectWrapper(\n path: NodePath,\n wrapper: t.ExpressionStatement,\n) {\n const { body, directives } = path.node;\n path.node.directives = [];\n path.node.body = [];\n const amdFactoryCall = path\n .pushContainer(\"body\", wrapper)[0]\n .get(\"expression\") as NodePath;\n const amdFactoryCallArgs = amdFactoryCall.get(\"arguments\");\n const amdFactory = (\n amdFactoryCallArgs[\n amdFactoryCallArgs.length - 1\n ] as NodePath\n ).get(\"body\");\n amdFactory.pushContainer(\"directives\", directives);\n amdFactory.pushContainer(\"body\", body);\n}\n\nexport interface Options extends PluginOptions {\n allowTopLevelThis?: boolean;\n importInterop?: RewriteModuleStatementsAndPrepareHeaderOptions[\"importInterop\"];\n loose?: boolean;\n noInterop?: boolean;\n strict?: boolean;\n strictMode?: boolean;\n}\n\ntype State = {\n requireId?: t.Identifier;\n resolveId?: t.Identifier;\n rejectId?: t.Identifier;\n};\n\nexport default declare((api, options: Options) => {\n api.assertVersion(REQUIRED_VERSION(7));\n\n const { allowTopLevelThis, strict, strictMode, importInterop, noInterop } =\n options;\n\n const constantReexports =\n api.assumption(\"constantReexports\") ?? options.loose;\n const enumerableModuleMeta =\n api.assumption(\"enumerableModuleMeta\") ?? options.loose;\n\n return {\n name: \"transform-modules-amd\",\n\n pre() {\n this.file.set(\"@babel/plugin-transform-modules-*\", \"amd\");\n },\n\n visitor: {\n [\"CallExpression\" +\n (api.types.importExpression ? \"|ImportExpression\" : \"\")](\n this: State & PluginPass,\n path: NodePath,\n state: State,\n ) {\n if (!this.file.has(\"@babel/plugin-proposal-dynamic-import\")) return;\n if (path.isCallExpression() && !path.get(\"callee\").isImport()) return;\n\n let { requireId, resolveId, rejectId } = state;\n if (!requireId) {\n requireId = path.scope.generateUidIdentifier(\"require\");\n state.requireId = requireId;\n }\n if (!resolveId || !rejectId) {\n resolveId = path.scope.generateUidIdentifier(\"resolve\");\n rejectId = path.scope.generateUidIdentifier(\"reject\");\n state.resolveId = resolveId;\n state.rejectId = rejectId;\n }\n\n let result: t.Node = t.identifier(\"imported\");\n if (!noInterop) {\n result = wrapInterop(this.file.path, result, \"namespace\");\n }\n\n path.replaceWith(\n buildDynamicImport(\n path.node,\n false,\n false,\n specifier => template.expression.ast`\n new Promise((${resolveId}, ${rejectId}) =>\n ${requireId}(\n [${specifier}],\n imported => ${t.cloneNode(resolveId)}(${result}),\n ${t.cloneNode(rejectId)}\n )\n )\n `,\n ),\n );\n },\n Program: {\n exit(path, { requireId }) {\n if (!isModule(path)) {\n if (requireId) {\n injectWrapper(\n path,\n buildAnonymousWrapper({\n REQUIRE: t.cloneNode(requireId),\n }) as t.ExpressionStatement,\n );\n }\n return;\n }\n\n const amdArgs = [];\n const importNames = [];\n if (requireId) {\n amdArgs.push(t.stringLiteral(\"require\"));\n importNames.push(t.cloneNode(requireId));\n }\n\n let moduleName = getModuleName(this.file.opts, options);\n // @ts-expect-error todo(flow->ts): do not reuse variables\n if (moduleName) moduleName = t.stringLiteral(moduleName);\n\n const { meta, headers } = rewriteModuleStatementsAndPrepareHeader(\n path,\n {\n enumerableModuleMeta,\n constantReexports,\n strict,\n strictMode,\n allowTopLevelThis,\n importInterop,\n noInterop,\n filename: this.file.opts.filename,\n },\n );\n\n if (hasExports(meta)) {\n amdArgs.push(t.stringLiteral(\"exports\"));\n\n importNames.push(t.identifier(meta.exportName));\n }\n\n for (const [source, metadata] of meta.source) {\n amdArgs.push(t.stringLiteral(source));\n importNames.push(t.identifier(metadata.name));\n\n if (!isSideEffectImport(metadata)) {\n const interop = wrapInterop(\n path,\n t.identifier(metadata.name),\n metadata.interop,\n );\n if (interop) {\n const header = t.expressionStatement(\n t.assignmentExpression(\n \"=\",\n t.identifier(metadata.name),\n interop,\n ),\n );\n header.loc = metadata.loc;\n headers.push(header);\n }\n }\n\n headers.push(\n ...buildNamespaceInitStatements(\n meta,\n metadata,\n constantReexports,\n ),\n );\n }\n\n ensureStatementsHoisted(headers);\n path.unshiftContainer(\"body\", headers);\n\n injectWrapper(\n path,\n buildWrapper({\n MODULE_NAME: moduleName,\n\n AMD_ARGUMENTS: t.arrayExpression(amdArgs),\n IMPORT_NAMES: importNames,\n }) as t.ExpressionStatement,\n );\n },\n },\n },\n };\n});\n","// Heavily inspired by\n// https://github.com/airbnb/babel-plugin-dynamic-import-node/blob/master/src/utils.js\n\nimport type { File, NodePath } from \"@babel/core\";\nimport { types as t, template } from \"@babel/core\";\nimport { buildDynamicImport } from \"@babel/helper-module-transforms\";\n\nconst requireNoInterop = (source: t.Expression) =>\n template.expression.ast`require(${source})`;\n\nconst requireInterop = (source: t.Expression, file: File) =>\n t.callExpression(file.addHelper(\"interopRequireWildcard\"), [\n requireNoInterop(source),\n ]);\n\nexport function transformDynamicImport(\n path: NodePath,\n noInterop: boolean,\n file: File,\n) {\n const buildRequire = noInterop ? requireNoInterop : requireInterop;\n\n path.replaceWith(\n buildDynamicImport(path.node, true, false, specifier =>\n buildRequire(specifier, file),\n ),\n );\n}\n","import { template, types as t } from \"@babel/core\";\nimport { isSideEffectImport } from \"@babel/helper-module-transforms\";\nimport type { CommonJSHook } from \"./hooks.ts\";\n\ntype Lazy = boolean | string[] | ((source: string) => boolean);\n\nexport const lazyImportsHook = (lazy: Lazy): CommonJSHook => ({\n name: `${PACKAGE_JSON.name}/lazy`,\n version: PACKAGE_JSON.version,\n getWrapperPayload(source, metadata) {\n if (isSideEffectImport(metadata) || metadata.reexportAll) {\n return null;\n }\n if (lazy === true) {\n // 'true' means that local relative files are eagerly loaded and\n // dependency modules are loaded lazily.\n return source.includes(\".\") ? null : \"lazy/function\";\n }\n if (Array.isArray(lazy)) {\n return !lazy.includes(source) ? null : \"lazy/function\";\n }\n if (typeof lazy === \"function\") {\n return lazy(source) ? \"lazy/function\" : null;\n }\n },\n buildRequireWrapper(name, init, payload, referenced) {\n if (payload === \"lazy/function\") {\n if (!referenced) return false;\n return template.statement.ast`\n function ${name}() {\n const data = ${init};\n ${name} = function(){ return data; };\n return data;\n }\n `;\n }\n },\n wrapReference(ref, payload) {\n if (payload === \"lazy/function\") return t.callExpression(ref, []);\n },\n});\n","import type { types as t, File } from \"@babel/core\";\nimport type { isSideEffectImport } from \"@babel/helper-module-transforms\";\n\nconst commonJSHooksKey =\n \"@babel/plugin-transform-modules-commonjs/customWrapperPlugin\";\n\ntype SourceMetadata = Parameters[0];\n\n// A hook exposes a set of function that can customize how `require()` calls and\n// references to the imported bindings are handled. These functions can either\n// return a result, or return `null` to delegate to the next hook.\nexport interface CommonJSHook {\n name: string;\n version: string;\n wrapReference?(ref: t.Expression, payload: unknown): t.CallExpression | null;\n // Optionally wrap a `require` call. If this function returns `false`, the\n // `require` call is removed from the generated code.\n buildRequireWrapper?(\n name: string,\n init: t.Expression,\n payload: unknown,\n referenced: boolean,\n ): t.Statement | false | null;\n getWrapperPayload?(\n source: string,\n metadata: SourceMetadata,\n importNodes: t.Node[],\n ): string | null;\n}\n\nexport function defineCommonJSHook(file: File, hook: CommonJSHook) {\n let hooks = file.get(commonJSHooksKey);\n if (!hooks) file.set(commonJSHooksKey, (hooks = []));\n hooks.push(hook);\n}\n\nfunction findMap(arr: T[] | null, cb: (el: T) => U): U | null {\n if (arr) {\n for (const el of arr) {\n const res = cb(el);\n if (res != null) return res;\n }\n }\n}\n\nexport function makeInvokers(\n file: File,\n): Pick<\n CommonJSHook,\n \"wrapReference\" | \"getWrapperPayload\" | \"buildRequireWrapper\"\n> {\n const hooks: CommonJSHook[] | null = file.get(commonJSHooksKey);\n\n return {\n getWrapperPayload(...args) {\n return findMap(hooks, hook => hook.getWrapperPayload?.(...args));\n },\n wrapReference(...args) {\n return findMap(hooks, hook => hook.wrapReference?.(...args));\n },\n buildRequireWrapper(...args) {\n return findMap(hooks, hook => hook.buildRequireWrapper?.(...args));\n },\n };\n}\n","import { declare } from \"@babel/helper-plugin-utils\";\nimport {\n isModule,\n rewriteModuleStatementsAndPrepareHeader,\n type RewriteModuleStatementsAndPrepareHeaderOptions,\n isSideEffectImport,\n buildNamespaceInitStatements,\n ensureStatementsHoisted,\n wrapInterop,\n getModuleName,\n} from \"@babel/helper-module-transforms\";\nimport simplifyAccess from \"@babel/helper-simple-access\";\nimport { template, types as t } from \"@babel/core\";\nimport type { PluginPass, Visitor, Scope, NodePath } from \"@babel/core\";\nimport type { PluginOptions } from \"@babel/helper-module-transforms\";\n\nimport { transformDynamicImport } from \"./dynamic-import.ts\";\nimport { lazyImportsHook } from \"./lazy.ts\";\n\nimport { defineCommonJSHook, makeInvokers } from \"./hooks.ts\";\nexport { defineCommonJSHook };\n\nexport interface Options extends PluginOptions {\n allowCommonJSExports?: boolean;\n allowTopLevelThis?: boolean;\n importInterop?: RewriteModuleStatementsAndPrepareHeaderOptions[\"importInterop\"];\n lazy?: RewriteModuleStatementsAndPrepareHeaderOptions[\"lazy\"];\n loose?: boolean;\n mjsStrictNamespace?: boolean;\n noInterop?: boolean;\n strict?: boolean;\n strictMode?: boolean;\n strictNamespace?: boolean;\n}\n\nexport default declare((api, options: Options) => {\n api.assertVersion(REQUIRED_VERSION(7));\n\n const {\n // 'true' for imports to strictly have .default, instead of having\n // destructuring-like behavior for their properties. This matches the behavior\n // of the initial Node.js (v12) behavior when importing a CommonJS without\n // the __esMoule property.\n // .strictNamespace is for non-mjs files, mjsStrictNamespace if for mjs files.\n strictNamespace = false,\n mjsStrictNamespace = strictNamespace,\n\n allowTopLevelThis,\n strict,\n strictMode,\n noInterop,\n importInterop,\n lazy = false,\n // Defaulting to 'true' for now. May change before 7.x major.\n allowCommonJSExports = true,\n loose = false,\n } = options;\n\n const constantReexports = api.assumption(\"constantReexports\") ?? loose;\n const enumerableModuleMeta = api.assumption(\"enumerableModuleMeta\") ?? loose;\n const noIncompleteNsImportDetection =\n api.assumption(\"noIncompleteNsImportDetection\") ?? false;\n\n if (\n typeof lazy !== \"boolean\" &&\n typeof lazy !== \"function\" &&\n (!Array.isArray(lazy) || !lazy.every(item => typeof item === \"string\"))\n ) {\n throw new Error(`.lazy must be a boolean, array of strings, or a function`);\n }\n\n if (typeof strictNamespace !== \"boolean\") {\n throw new Error(`.strictNamespace must be a boolean, or undefined`);\n }\n if (typeof mjsStrictNamespace !== \"boolean\") {\n throw new Error(`.mjsStrictNamespace must be a boolean, or undefined`);\n }\n\n const getAssertion = (localName: string) => template.expression.ast`\n (function(){\n throw new Error(\n \"The CommonJS '\" + \"${localName}\" + \"' variable is not available in ES6 modules.\" +\n \"Consider setting setting sourceType:script or sourceType:unambiguous in your \" +\n \"Babel config for this file.\");\n })()\n `;\n\n const moduleExportsVisitor: Visitor<{ scope: Scope }> = {\n ReferencedIdentifier(path) {\n const localName = path.node.name;\n if (localName !== \"module\" && localName !== \"exports\") return;\n\n const localBinding = path.scope.getBinding(localName);\n const rootBinding = this.scope.getBinding(localName);\n\n if (\n // redeclared in this scope\n rootBinding !== localBinding ||\n (path.parentPath.isObjectProperty({ value: path.node }) &&\n path.parentPath.parentPath.isObjectPattern()) ||\n path.parentPath.isAssignmentExpression({ left: path.node }) ||\n path.isAssignmentExpression({ left: path.node })\n ) {\n return;\n }\n\n path.replaceWith(getAssertion(localName));\n },\n\n UpdateExpression(path) {\n const arg = path.get(\"argument\");\n if (!arg.isIdentifier()) return;\n const localName = arg.node.name;\n if (localName !== \"module\" && localName !== \"exports\") return;\n\n const localBinding = path.scope.getBinding(localName);\n const rootBinding = this.scope.getBinding(localName);\n\n // redeclared in this scope\n if (rootBinding !== localBinding) return;\n\n path.replaceWith(\n t.assignmentExpression(\n path.node.operator[0] + \"=\",\n arg.node,\n getAssertion(localName),\n ),\n );\n },\n\n AssignmentExpression(path) {\n const left = path.get(\"left\");\n if (left.isIdentifier()) {\n const localName = left.node.name;\n if (localName !== \"module\" && localName !== \"exports\") return;\n\n const localBinding = path.scope.getBinding(localName);\n const rootBinding = this.scope.getBinding(localName);\n\n // redeclared in this scope\n if (rootBinding !== localBinding) return;\n\n const right = path.get(\"right\");\n right.replaceWith(\n t.sequenceExpression([right.node, getAssertion(localName)]),\n );\n } else if (left.isPattern()) {\n const ids = left.getOuterBindingIdentifiers();\n const localName = Object.keys(ids).find(localName => {\n if (localName !== \"module\" && localName !== \"exports\") return false;\n\n return (\n this.scope.getBinding(localName) ===\n path.scope.getBinding(localName)\n );\n });\n\n if (localName) {\n const right = path.get(\"right\");\n right.replaceWith(\n t.sequenceExpression([right.node, getAssertion(localName)]),\n );\n }\n }\n },\n };\n\n return {\n name: \"transform-modules-commonjs\",\n\n pre() {\n this.file.set(\"@babel/plugin-transform-modules-*\", \"commonjs\");\n\n if (lazy) defineCommonJSHook(this.file, lazyImportsHook(lazy));\n },\n\n visitor: {\n [\"CallExpression\" +\n (api.types.importExpression ? \"|ImportExpression\" : \"\")](\n this: PluginPass,\n path: NodePath,\n ) {\n if (!this.file.has(\"@babel/plugin-proposal-dynamic-import\")) return;\n if (path.isCallExpression() && !t.isImport(path.node.callee)) return;\n\n let { scope } = path;\n do {\n scope.rename(\"require\");\n } while ((scope = scope.parent));\n\n transformDynamicImport(path, noInterop, this.file);\n },\n\n Program: {\n exit(path, state) {\n if (!isModule(path)) return;\n\n // Rename the bindings auto-injected into the scope so there is no\n // risk of conflict between the bindings.\n path.scope.rename(\"exports\");\n path.scope.rename(\"module\");\n path.scope.rename(\"require\");\n path.scope.rename(\"__filename\");\n path.scope.rename(\"__dirname\");\n\n // Rewrite references to 'module' and 'exports' to throw exceptions.\n // These objects are specific to CommonJS and are not available in\n // real ES6 implementations.\n if (!allowCommonJSExports) {\n if (process.env.BABEL_8_BREAKING) {\n simplifyAccess(path, new Set([\"module\", \"exports\"]));\n } else {\n // @ts-ignore(Babel 7 vs Babel 8) The third param has been removed in Babel 8.\n simplifyAccess(path, new Set([\"module\", \"exports\"]), false);\n }\n path.traverse(moduleExportsVisitor, {\n scope: path.scope,\n });\n }\n\n let moduleName = getModuleName(this.file.opts, options);\n // @ts-expect-error todo(flow->ts): do not reuse variables\n if (moduleName) moduleName = t.stringLiteral(moduleName);\n\n const hooks = makeInvokers(this.file);\n\n const { meta, headers } = rewriteModuleStatementsAndPrepareHeader(\n path,\n {\n exportName: \"exports\",\n constantReexports,\n enumerableModuleMeta,\n strict,\n strictMode,\n allowTopLevelThis,\n noInterop,\n importInterop,\n wrapReference: hooks.wrapReference,\n getWrapperPayload: hooks.getWrapperPayload,\n esNamespaceOnly:\n typeof state.filename === \"string\" &&\n /\\.mjs$/.test(state.filename)\n ? mjsStrictNamespace\n : strictNamespace,\n noIncompleteNsImportDetection,\n filename: this.file.opts.filename,\n },\n );\n\n for (const [source, metadata] of meta.source) {\n const loadExpr = t.callExpression(t.identifier(\"require\"), [\n t.stringLiteral(source),\n ]);\n\n let header: t.Statement;\n if (isSideEffectImport(metadata)) {\n if (lazy && metadata.wrap === \"function\") {\n throw new Error(\"Assertion failure\");\n }\n\n header = t.expressionStatement(loadExpr);\n } else {\n const init =\n wrapInterop(path, loadExpr, metadata.interop) || loadExpr;\n\n if (metadata.wrap) {\n const res = hooks.buildRequireWrapper(\n metadata.name,\n init,\n metadata.wrap,\n metadata.referenced,\n );\n if (res === false) continue;\n else header = res;\n }\n header ??= template.statement.ast`\n var ${metadata.name} = ${init};\n `;\n }\n header.loc = metadata.loc;\n\n headers.push(header);\n headers.push(\n ...buildNamespaceInitStatements(\n meta,\n metadata,\n constantReexports,\n hooks.wrapReference,\n ),\n );\n }\n\n ensureStatementsHoisted(headers);\n path.unshiftContainer(\"body\", headers);\n path.get(\"body\").forEach(path => {\n if (!headers.includes(path.node)) return;\n if (path.isVariableDeclaration()) {\n path.scope.registerDeclaration(path);\n }\n });\n },\n },\n },\n };\n});\n","import { declare } from \"@babel/helper-plugin-utils\";\nimport { template, types as t } from \"@babel/core\";\nimport type { PluginPass, NodePath, Scope, Visitor } from \"@babel/core\";\nimport {\n buildDynamicImport,\n getModuleName,\n rewriteThis,\n} from \"@babel/helper-module-transforms\";\nimport type { PluginOptions } from \"@babel/helper-module-transforms\";\nimport { isIdentifierName } from \"@babel/helper-validator-identifier\";\n\nconst buildTemplate = template.statement(`\n SYSTEM_REGISTER(MODULE_NAME, SOURCES, function (EXPORT_IDENTIFIER, CONTEXT_IDENTIFIER) {\n \"use strict\";\n BEFORE_BODY;\n return {\n setters: SETTERS,\n execute: EXECUTE,\n };\n });\n`);\n\nconst buildExportAll = template.statement(`\n for (var KEY in TARGET) {\n if (KEY !== \"default\" && KEY !== \"__esModule\") EXPORT_OBJ[KEY] = TARGET[KEY];\n }\n`);\n\nconst MISSING_PLUGIN_WARNING = `\\\nWARNING: Dynamic import() transformation must be enabled using the\n @babel/plugin-transform-dynamic-import plugin. Babel 8 will\n no longer transform import() without using that plugin.\n`;\n\nconst MISSING_PLUGIN_ERROR = `\\\nERROR: Dynamic import() transformation must be enabled using the\n @babel/plugin-transform-dynamic-import plugin. Babel 8\n no longer transforms import() without using that plugin.\n`;\n\n//todo: use getExportSpecifierName in `helper-module-transforms` when this library is refactored to NodePath usage.\n\nexport function getExportSpecifierName(\n node: t.Node,\n stringSpecifiers: Set,\n): string {\n if (node.type === \"Identifier\") {\n return node.name;\n } else if (node.type === \"StringLiteral\") {\n const stringValue = node.value;\n // add specifier value to `stringSpecifiers` only when it can not be converted to an identifier name\n // i.e In `import { \"foo\" as bar }`\n // we do not consider `\"foo\"` to be a `stringSpecifier` because we can treat it as\n // `import { foo as bar }`\n // This helps minimize the size of `stringSpecifiers` and reduce overhead of checking valid identifier names\n // when building transpiled code from metadata\n if (!isIdentifierName(stringValue)) {\n stringSpecifiers.add(stringValue);\n }\n return stringValue;\n } else {\n throw new Error(\n `Expected export specifier to be either Identifier or StringLiteral, got ${node.type}`,\n );\n }\n}\n\ntype PluginState = {\n contextIdent: string;\n // List of names that should only be printed as string literals.\n // i.e. `import { \"any unicode\" as foo } from \"some-module\"`\n // `stringSpecifiers` is Set(1) [\"any unicode\"]\n // In most cases `stringSpecifiers` is an empty Set\n stringSpecifiers: Set;\n};\n\ntype ModuleMetadata = {\n key: string;\n imports: any[];\n exports: any[];\n};\n\nfunction constructExportCall(\n path: NodePath,\n exportIdent: t.Identifier,\n exportNames: string[],\n exportValues: t.Expression[],\n exportStarTarget: t.Identifier | null,\n stringSpecifiers: Set,\n) {\n const statements = [];\n if (!exportStarTarget) {\n if (exportNames.length === 1) {\n statements.push(\n t.expressionStatement(\n t.callExpression(exportIdent, [\n t.stringLiteral(exportNames[0]),\n exportValues[0],\n ]),\n ),\n );\n } else {\n const objectProperties = [];\n for (let i = 0; i < exportNames.length; i++) {\n const exportName = exportNames[i];\n const exportValue = exportValues[i];\n objectProperties.push(\n t.objectProperty(\n stringSpecifiers.has(exportName)\n ? t.stringLiteral(exportName)\n : t.identifier(exportName),\n exportValue,\n ),\n );\n }\n statements.push(\n t.expressionStatement(\n t.callExpression(exportIdent, [t.objectExpression(objectProperties)]),\n ),\n );\n }\n } else {\n const exportObj = path.scope.generateUid(\"exportObj\");\n\n statements.push(\n t.variableDeclaration(\"var\", [\n t.variableDeclarator(t.identifier(exportObj), t.objectExpression([])),\n ]),\n );\n\n statements.push(\n buildExportAll({\n KEY: path.scope.generateUidIdentifier(\"key\"),\n EXPORT_OBJ: t.identifier(exportObj),\n TARGET: exportStarTarget,\n }),\n );\n\n for (let i = 0; i < exportNames.length; i++) {\n const exportName = exportNames[i];\n const exportValue = exportValues[i];\n\n statements.push(\n t.expressionStatement(\n t.assignmentExpression(\n \"=\",\n t.memberExpression(\n t.identifier(exportObj),\n t.identifier(exportName),\n ),\n exportValue,\n ),\n ),\n );\n }\n\n statements.push(\n t.expressionStatement(\n t.callExpression(exportIdent, [t.identifier(exportObj)]),\n ),\n );\n }\n return statements;\n}\n\nexport interface Options extends PluginOptions {\n allowTopLevelThis?: boolean;\n systemGlobal?: string;\n}\n\ntype ReassignmentVisitorState = {\n scope: Scope;\n exports: any;\n buildCall: (name: string, value: t.Expression) => t.ExpressionStatement;\n};\n\nexport default declare((api, options: Options) => {\n api.assertVersion(REQUIRED_VERSION(7));\n\n const { systemGlobal = \"System\", allowTopLevelThis = false } = options;\n const reassignmentVisited = new WeakSet();\n\n const reassignmentVisitor: Visitor = {\n \"AssignmentExpression|UpdateExpression\"(\n path: NodePath,\n ) {\n if (reassignmentVisited.has(path.node)) return;\n reassignmentVisited.add(path.node);\n\n const arg = path.isAssignmentExpression()\n ? path.get(\"left\")\n : path.get(\"argument\");\n\n if (arg.isObjectPattern() || arg.isArrayPattern()) {\n const exprs: t.SequenceExpression[\"expressions\"] = [path.node];\n for (const name of Object.keys(arg.getBindingIdentifiers())) {\n if (this.scope.getBinding(name) !== path.scope.getBinding(name)) {\n return;\n }\n const exportedNames = this.exports[name];\n if (!exportedNames) continue;\n for (const exportedName of exportedNames) {\n exprs.push(\n this.buildCall(exportedName, t.identifier(name)).expression,\n );\n }\n }\n path.replaceWith(t.sequenceExpression(exprs));\n return;\n }\n\n if (!arg.isIdentifier()) return;\n\n const name = arg.node.name;\n\n // redeclared in this scope\n if (this.scope.getBinding(name) !== path.scope.getBinding(name)) return;\n\n const exportedNames = this.exports[name];\n if (!exportedNames) return;\n\n let node: t.Expression = path.node;\n\n // if it is a non-prefix update expression (x++ etc)\n // then we must replace with the expression (_export('x', x + 1), x++)\n // in order to ensure the same update expression value\n const isPostUpdateExpression = t.isUpdateExpression(node, {\n prefix: false,\n });\n if (isPostUpdateExpression) {\n node = t.binaryExpression(\n // @ts-expect-error The operator of a post-update expression must be \"++\" | \"--\"\n node.operator[0],\n t.unaryExpression(\n \"+\",\n t.cloneNode(\n // @ts-expect-error node is UpdateExpression\n node.argument,\n ),\n ),\n t.numericLiteral(1),\n );\n }\n\n for (const exportedName of exportedNames) {\n node = this.buildCall(exportedName, node).expression;\n }\n\n if (isPostUpdateExpression) {\n node = t.sequenceExpression([node, path.node]);\n }\n\n path.replaceWith(node);\n },\n };\n\n return {\n name: \"transform-modules-systemjs\",\n\n pre() {\n this.file.set(\"@babel/plugin-transform-modules-*\", \"systemjs\");\n },\n\n visitor: {\n [\"CallExpression\" +\n (api.types.importExpression ? \"|ImportExpression\" : \"\")](\n this: PluginPass & PluginState,\n path: NodePath,\n state: PluginState,\n ) {\n if (path.isCallExpression() && !t.isImport(path.node.callee)) return;\n if (path.isCallExpression()) {\n if (!this.file.has(\"@babel/plugin-proposal-dynamic-import\")) {\n if (process.env.BABEL_8_BREAKING) {\n throw new Error(MISSING_PLUGIN_ERROR);\n } else {\n console.warn(MISSING_PLUGIN_WARNING);\n }\n }\n } else {\n // when createImportExpressions is true, we require the dynamic import transform\n if (!this.file.has(\"@babel/plugin-proposal-dynamic-import\")) {\n throw new Error(MISSING_PLUGIN_ERROR);\n }\n }\n path.replaceWith(\n buildDynamicImport(path.node, false, true, specifier =>\n t.callExpression(\n t.memberExpression(\n t.identifier(state.contextIdent),\n t.identifier(\"import\"),\n ),\n [specifier],\n ),\n ),\n );\n },\n\n MetaProperty(path, state: PluginState) {\n if (\n path.node.meta.name === \"import\" &&\n path.node.property.name === \"meta\"\n ) {\n path.replaceWith(\n t.memberExpression(\n t.identifier(state.contextIdent),\n t.identifier(\"meta\"),\n ),\n );\n }\n },\n\n ReferencedIdentifier(path, state) {\n if (\n path.node.name === \"__moduleName\" &&\n !path.scope.hasBinding(\"__moduleName\")\n ) {\n path.replaceWith(\n t.memberExpression(\n t.identifier(state.contextIdent),\n t.identifier(\"id\"),\n ),\n );\n }\n },\n\n Program: {\n enter(path, state) {\n state.contextIdent = path.scope.generateUid(\"context\");\n state.stringSpecifiers = new Set();\n if (!allowTopLevelThis) {\n rewriteThis(path);\n }\n },\n exit(path, state) {\n const scope = path.scope;\n const exportIdent = scope.generateUid(\"export\");\n const { contextIdent, stringSpecifiers } = state;\n\n const exportMap: Record = Object.create(null);\n const modules: ModuleMetadata[] = [];\n\n const beforeBody = [];\n const setters: t.Expression[] = [];\n const sources: t.StringLiteral[] = [];\n const variableIds = [];\n const removedPaths = [];\n\n function addExportName(key: string, val: string) {\n exportMap[key] = exportMap[key] || [];\n exportMap[key].push(val);\n }\n\n function pushModule(\n source: string,\n key: \"imports\" | \"exports\",\n specifiers: t.ModuleSpecifier[] | t.ExportAllDeclaration,\n ) {\n let module: ModuleMetadata;\n modules.forEach(function (m) {\n if (m.key === source) {\n module = m;\n }\n });\n if (!module) {\n modules.push(\n (module = { key: source, imports: [], exports: [] }),\n );\n }\n module[key] = module[key].concat(specifiers);\n }\n\n function buildExportCall(name: string, val: t.Expression) {\n return t.expressionStatement(\n t.callExpression(t.identifier(exportIdent), [\n t.stringLiteral(name),\n val,\n ]),\n );\n }\n\n const exportNames = [];\n const exportValues: t.Expression[] = [];\n\n const body = path.get(\"body\");\n\n for (const path of body) {\n if (path.isFunctionDeclaration()) {\n beforeBody.push(path.node);\n removedPaths.push(path);\n } else if (path.isClassDeclaration()) {\n variableIds.push(t.cloneNode(path.node.id));\n path.replaceWith(\n t.expressionStatement(\n t.assignmentExpression(\n \"=\",\n t.cloneNode(path.node.id),\n t.toExpression(path.node),\n ),\n ),\n );\n } else if (path.isVariableDeclaration()) {\n // Convert top-level variable declarations to \"var\",\n // because they must be hoisted\n path.node.kind = \"var\";\n } else if (path.isImportDeclaration()) {\n const source = path.node.source.value;\n pushModule(source, \"imports\", path.node.specifiers);\n for (const name of Object.keys(path.getBindingIdentifiers())) {\n scope.removeBinding(name);\n variableIds.push(t.identifier(name));\n }\n path.remove();\n } else if (path.isExportAllDeclaration()) {\n pushModule(path.node.source.value, \"exports\", path.node);\n path.remove();\n } else if (path.isExportDefaultDeclaration()) {\n const declar = path.node.declaration;\n if (t.isClassDeclaration(declar)) {\n const id = declar.id;\n if (id) {\n exportNames.push(\"default\");\n exportValues.push(scope.buildUndefinedNode());\n variableIds.push(t.cloneNode(id));\n addExportName(id.name, \"default\");\n path.replaceWith(\n t.expressionStatement(\n t.assignmentExpression(\n \"=\",\n t.cloneNode(id),\n t.toExpression(declar),\n ),\n ),\n );\n } else {\n exportNames.push(\"default\");\n exportValues.push(t.toExpression(declar));\n removedPaths.push(path);\n }\n } else if (t.isFunctionDeclaration(declar)) {\n const id = declar.id;\n if (id) {\n beforeBody.push(declar);\n exportNames.push(\"default\");\n exportValues.push(t.cloneNode(id));\n addExportName(id.name, \"default\");\n } else {\n exportNames.push(\"default\");\n exportValues.push(t.toExpression(declar));\n }\n removedPaths.push(path);\n } else {\n // @ts-expect-error TSDeclareFunction is not expected here\n path.replaceWith(buildExportCall(\"default\", declar));\n }\n } else if (path.isExportNamedDeclaration()) {\n const declar = path.node.declaration;\n\n if (declar) {\n path.replaceWith(declar);\n\n if (t.isFunction(declar)) {\n const name = declar.id.name;\n addExportName(name, name);\n beforeBody.push(declar);\n exportNames.push(name);\n exportValues.push(t.cloneNode(declar.id));\n removedPaths.push(path);\n } else if (t.isClass(declar)) {\n const name = declar.id.name;\n exportNames.push(name);\n exportValues.push(scope.buildUndefinedNode());\n variableIds.push(t.cloneNode(declar.id));\n path.replaceWith(\n t.expressionStatement(\n t.assignmentExpression(\n \"=\",\n t.cloneNode(declar.id),\n t.toExpression(declar),\n ),\n ),\n );\n addExportName(name, name);\n } else {\n if (t.isVariableDeclaration(declar)) {\n // Convert top-level variable declarations to \"var\",\n // because they must be hoisted\n declar.kind = \"var\";\n }\n for (const name of Object.keys(\n t.getBindingIdentifiers(declar),\n )) {\n addExportName(name, name);\n }\n }\n } else {\n const specifiers = path.node.specifiers;\n if (specifiers?.length) {\n if (path.node.source) {\n pushModule(path.node.source.value, \"exports\", specifiers);\n path.remove();\n } else {\n const nodes = [];\n\n for (const specifier of specifiers) {\n // @ts-expect-error This isn't an \"export ... from\" declaration\n // because path.node.source is falsy, so the local specifier exists.\n const { local, exported } = specifier;\n\n const binding = scope.getBinding(local.name);\n const exportedName = getExportSpecifierName(\n exported,\n stringSpecifiers,\n );\n // hoisted function export\n if (\n binding &&\n t.isFunctionDeclaration(binding.path.node)\n ) {\n exportNames.push(exportedName);\n exportValues.push(t.cloneNode(local));\n }\n // only globals also exported this way\n else if (!binding) {\n nodes.push(buildExportCall(exportedName, local));\n }\n addExportName(local.name, exportedName);\n }\n\n path.replaceWithMultiple(nodes);\n }\n } else {\n path.remove();\n }\n }\n }\n }\n\n modules.forEach(function (specifiers) {\n const setterBody = [];\n const target = scope.generateUid(specifiers.key);\n\n for (let specifier of specifiers.imports) {\n if (t.isImportNamespaceSpecifier(specifier)) {\n setterBody.push(\n t.expressionStatement(\n t.assignmentExpression(\n \"=\",\n specifier.local,\n t.identifier(target),\n ),\n ),\n );\n } else if (t.isImportDefaultSpecifier(specifier)) {\n specifier = t.importSpecifier(\n specifier.local,\n t.identifier(\"default\"),\n );\n }\n\n if (t.isImportSpecifier(specifier)) {\n const { imported } = specifier;\n setterBody.push(\n t.expressionStatement(\n t.assignmentExpression(\n \"=\",\n specifier.local,\n t.memberExpression(\n t.identifier(target),\n specifier.imported,\n /* computed */ imported.type === \"StringLiteral\",\n ),\n ),\n ),\n );\n }\n }\n\n if (specifiers.exports.length) {\n const exportNames = [];\n const exportValues = [];\n let hasExportStar = false;\n\n for (const node of specifiers.exports) {\n if (t.isExportAllDeclaration(node)) {\n hasExportStar = true;\n } else if (t.isExportSpecifier(node)) {\n const exportedName = getExportSpecifierName(\n node.exported,\n stringSpecifiers,\n );\n exportNames.push(exportedName);\n exportValues.push(\n t.memberExpression(\n t.identifier(target),\n node.local,\n t.isStringLiteral(node.local),\n ),\n );\n } else {\n // todo\n }\n }\n\n setterBody.push(\n ...constructExportCall(\n path,\n t.identifier(exportIdent),\n exportNames,\n exportValues,\n hasExportStar ? t.identifier(target) : null,\n stringSpecifiers,\n ),\n );\n }\n\n sources.push(t.stringLiteral(specifiers.key));\n setters.push(\n t.functionExpression(\n null,\n [t.identifier(target)],\n t.blockStatement(setterBody),\n ),\n );\n });\n\n let moduleName = getModuleName(this.file.opts, options);\n // @ts-expect-error todo(flow->ts): do not reuse variables\n if (moduleName) moduleName = t.stringLiteral(moduleName);\n\n if (!process.env.BABEL_8_BREAKING && !USE_ESM && !IS_STANDALONE) {\n // polyfill when being run by an older Babel version\n path.scope.hoistVariables ??=\n // eslint-disable-next-line no-restricted-globals\n require(\"@babel/traverse\").Scope.prototype.hoistVariables;\n }\n\n path.scope.hoistVariables((id, hasInit) => {\n variableIds.push(id);\n if (!hasInit && id.name in exportMap) {\n for (const exported of exportMap[id.name]) {\n exportNames.push(exported);\n exportValues.push(t.buildUndefinedNode());\n }\n }\n });\n\n if (variableIds.length) {\n beforeBody.unshift(\n t.variableDeclaration(\n \"var\",\n variableIds.map(id => t.variableDeclarator(id)),\n ),\n );\n }\n\n if (exportNames.length) {\n beforeBody.push(\n ...constructExportCall(\n path,\n t.identifier(exportIdent),\n exportNames,\n exportValues,\n null,\n stringSpecifiers,\n ),\n );\n }\n\n path.traverse(reassignmentVisitor, {\n exports: exportMap,\n buildCall: buildExportCall,\n scope,\n });\n\n for (const path of removedPaths) {\n path.remove();\n }\n\n let hasTLA = false;\n path.traverse({\n AwaitExpression(path) {\n hasTLA = true;\n path.stop();\n },\n Function(path) {\n path.skip();\n },\n // @ts-expect-error - todo: add noScope to type definitions\n noScope: true,\n });\n\n path.node.body = [\n buildTemplate({\n SYSTEM_REGISTER: t.memberExpression(\n t.identifier(systemGlobal),\n t.identifier(\"register\"),\n ),\n BEFORE_BODY: beforeBody,\n MODULE_NAME: moduleName,\n SETTERS: t.arrayExpression(setters),\n EXECUTE: t.functionExpression(\n null,\n [],\n t.blockStatement(path.node.body),\n false,\n hasTLA,\n ),\n SOURCES: t.arrayExpression(sources),\n EXPORT_IDENTIFIER: t.identifier(exportIdent),\n CONTEXT_IDENTIFIER: t.identifier(contextIdent),\n }),\n ];\n path.requeue(path.get(\"body.0\"));\n },\n },\n },\n };\n});\n","import { declare } from \"@babel/helper-plugin-utils\";\nimport { basename, extname } from \"path\";\nimport {\n isModule,\n rewriteModuleStatementsAndPrepareHeader,\n type RewriteModuleStatementsAndPrepareHeaderOptions,\n hasExports,\n isSideEffectImport,\n buildNamespaceInitStatements,\n ensureStatementsHoisted,\n wrapInterop,\n getModuleName,\n} from \"@babel/helper-module-transforms\";\nimport type { PluginOptions } from \"@babel/helper-module-transforms\";\nimport { types as t, template, type NodePath } from \"@babel/core\";\n\nconst buildPrerequisiteAssignment = template(`\n GLOBAL_REFERENCE = GLOBAL_REFERENCE || {}\n`);\n// Note: we avoid comparing typeof results with \"object\" or \"symbol\" otherwise\n// they will be processed by `transform-typeof-symbol`, which in return could\n// cause typeof helper used before declaration\nconst buildWrapper = template(`\n (function (global, factory) {\n if (typeof define === \"function\" && define.amd) {\n define(MODULE_NAME, AMD_ARGUMENTS, factory);\n } else if (typeof exports !== \"undefined\") {\n factory(COMMONJS_ARGUMENTS);\n } else {\n var mod = { exports: {} };\n factory(BROWSER_ARGUMENTS);\n\n GLOBAL_TO_ASSIGN;\n }\n })(\n typeof globalThis !== \"undefined\" ? globalThis\n : typeof self !== \"undefined\" ? self\n : this,\n function(IMPORT_NAMES) {\n })\n`);\n\nexport interface Options extends PluginOptions {\n allowTopLevelThis?: boolean;\n exactGlobals?: boolean;\n globals?: Record;\n importInterop?: RewriteModuleStatementsAndPrepareHeaderOptions[\"importInterop\"];\n loose?: boolean;\n noInterop?: boolean;\n strict?: boolean;\n strictMode?: boolean;\n}\n\nexport default declare((api, options: Options) => {\n api.assertVersion(REQUIRED_VERSION(7));\n\n const {\n globals,\n exactGlobals,\n allowTopLevelThis,\n strict,\n strictMode,\n noInterop,\n importInterop,\n } = options;\n\n const constantReexports =\n api.assumption(\"constantReexports\") ?? options.loose;\n const enumerableModuleMeta =\n api.assumption(\"enumerableModuleMeta\") ?? options.loose;\n\n /**\n * Build the assignment statements that initialize the UMD global.\n */\n function buildBrowserInit(\n browserGlobals: Record,\n exactGlobals: boolean,\n filename: string,\n moduleName: t.StringLiteral | void,\n ) {\n const moduleNameOrBasename = moduleName\n ? moduleName.value\n : basename(filename, extname(filename));\n let globalToAssign = t.memberExpression(\n t.identifier(\"global\"),\n t.identifier(t.toIdentifier(moduleNameOrBasename)),\n );\n let initAssignments = [];\n\n if (exactGlobals) {\n const globalName = browserGlobals[moduleNameOrBasename];\n\n if (globalName) {\n initAssignments = [];\n\n const members = globalName.split(\".\");\n globalToAssign = members.slice(1).reduce(\n (accum, curr) => {\n initAssignments.push(\n buildPrerequisiteAssignment({\n GLOBAL_REFERENCE: t.cloneNode(accum),\n }),\n );\n return t.memberExpression(accum, t.identifier(curr));\n },\n t.memberExpression(t.identifier(\"global\"), t.identifier(members[0])),\n );\n }\n }\n\n initAssignments.push(\n t.expressionStatement(\n t.assignmentExpression(\n \"=\",\n globalToAssign,\n t.memberExpression(t.identifier(\"mod\"), t.identifier(\"exports\")),\n ),\n ),\n );\n\n return initAssignments;\n }\n\n /**\n * Build the member expression that reads from a global for a given source.\n */\n function buildBrowserArg(\n browserGlobals: Record,\n exactGlobals: boolean,\n source: string,\n ) {\n let memberExpression: t.MemberExpression;\n if (exactGlobals) {\n const globalRef = browserGlobals[source];\n if (globalRef) {\n memberExpression = globalRef\n .split(\".\")\n .reduce(\n (accum: t.Identifier | t.MemberExpression, curr) =>\n t.memberExpression(accum, t.identifier(curr)),\n t.identifier(\"global\"),\n ) as t.MemberExpression;\n } else {\n memberExpression = t.memberExpression(\n t.identifier(\"global\"),\n t.identifier(t.toIdentifier(source)),\n );\n }\n } else {\n const requireName = basename(source, extname(source));\n const globalName = browserGlobals[requireName] || requireName;\n memberExpression = t.memberExpression(\n t.identifier(\"global\"),\n t.identifier(t.toIdentifier(globalName)),\n );\n }\n return memberExpression;\n }\n\n return {\n name: \"transform-modules-umd\",\n\n visitor: {\n Program: {\n exit(path) {\n if (!isModule(path)) return;\n\n const browserGlobals = globals || {};\n\n const moduleName = getModuleName(this.file.opts, options);\n let moduleNameLiteral: void | t.StringLiteral;\n if (moduleName) moduleNameLiteral = t.stringLiteral(moduleName);\n\n const { meta, headers } = rewriteModuleStatementsAndPrepareHeader(\n path,\n {\n constantReexports,\n enumerableModuleMeta,\n strict,\n strictMode,\n allowTopLevelThis,\n noInterop,\n importInterop,\n filename: this.file.opts.filename,\n },\n );\n\n const amdArgs = [];\n const commonjsArgs = [];\n const browserArgs = [];\n const importNames = [];\n\n if (hasExports(meta)) {\n amdArgs.push(t.stringLiteral(\"exports\"));\n commonjsArgs.push(t.identifier(\"exports\"));\n browserArgs.push(\n t.memberExpression(t.identifier(\"mod\"), t.identifier(\"exports\")),\n );\n importNames.push(t.identifier(meta.exportName));\n }\n\n for (const [source, metadata] of meta.source) {\n amdArgs.push(t.stringLiteral(source));\n commonjsArgs.push(\n t.callExpression(t.identifier(\"require\"), [\n t.stringLiteral(source),\n ]),\n );\n browserArgs.push(\n buildBrowserArg(browserGlobals, exactGlobals, source),\n );\n importNames.push(t.identifier(metadata.name));\n\n if (!isSideEffectImport(metadata)) {\n const interop = wrapInterop(\n path,\n t.identifier(metadata.name),\n metadata.interop,\n );\n if (interop) {\n const header = t.expressionStatement(\n t.assignmentExpression(\n \"=\",\n t.identifier(metadata.name),\n interop,\n ),\n );\n // @ts-expect-error todo(flow->ts)\n header.loc = meta.loc;\n headers.push(header);\n }\n }\n\n headers.push(\n ...buildNamespaceInitStatements(\n meta,\n metadata,\n constantReexports,\n ),\n );\n }\n\n ensureStatementsHoisted(headers);\n path.unshiftContainer(\"body\", headers);\n\n const { body, directives } = path.node;\n path.node.directives = [];\n path.node.body = [];\n const umdWrapper = path.pushContainer(\"body\", [\n buildWrapper({\n //todo: buildWrapper does not handle void moduleNameLiteral\n MODULE_NAME: moduleNameLiteral,\n\n AMD_ARGUMENTS: t.arrayExpression(amdArgs),\n COMMONJS_ARGUMENTS: commonjsArgs,\n BROWSER_ARGUMENTS: browserArgs,\n IMPORT_NAMES: importNames,\n\n GLOBAL_TO_ASSIGN: buildBrowserInit(\n browserGlobals,\n exactGlobals,\n this.filename || \"unknown\",\n moduleNameLiteral,\n ),\n }) as t.Statement,\n ])[0] as NodePath;\n const umdFactory = (\n umdWrapper.get(\"expression.arguments\")[1] as NodePath\n ).get(\"body\") as NodePath;\n umdFactory.pushContainer(\"directives\", directives);\n umdFactory.pushContainer(\"body\", body);\n },\n },\n },\n };\n});\n","/* eslint-disable @babel/development/plugin-name */\nimport { createRegExpFeaturePlugin } from \"@babel/helper-create-regexp-features-plugin\";\nimport { declare } from \"@babel/helper-plugin-utils\";\n\nexport interface Options {\n runtime?: boolean;\n}\n\nexport default declare((api, options: Options) => {\n const { runtime } = options;\n if (runtime !== undefined && typeof runtime !== \"boolean\") {\n throw new Error(\"The 'runtime' option must be boolean\");\n }\n\n return createRegExpFeaturePlugin({\n name: \"transform-named-capturing-groups-regex\",\n feature: \"namedCaptureGroups\",\n options: { runtime },\n });\n});\n","import { declare } from \"@babel/helper-plugin-utils\";\nimport { types as t, type NodePath } from \"@babel/core\";\n\nexport default declare(api => {\n api.assertVersion(REQUIRED_VERSION(7));\n\n return {\n name: \"transform-new-target\",\n\n visitor: {\n MetaProperty(path) {\n const meta = path.get(\"meta\");\n const property = path.get(\"property\");\n const { scope } = path;\n\n if (\n meta.isIdentifier({ name: \"new\" }) &&\n property.isIdentifier({ name: \"target\" })\n ) {\n const func = path.findParent(path => {\n if (path.isClass()) return true;\n if (path.isFunction() && !path.isArrowFunctionExpression()) {\n if (path.isClassMethod({ kind: \"constructor\" })) {\n return false;\n }\n\n return true;\n }\n return false;\n }) as NodePath<\n | t.FunctionDeclaration\n | t.FunctionExpression\n | t.Class\n | t.ClassMethod\n | t.ClassPrivateMethod\n >;\n\n if (!func) {\n throw path.buildCodeFrameError(\n \"new.target must be under a (non-arrow) function or a class.\",\n );\n }\n\n const { node } = func;\n if (t.isMethod(node)) {\n path.replaceWith(scope.buildUndefinedNode());\n return;\n }\n\n const constructor = t.memberExpression(\n t.thisExpression(),\n t.identifier(\"constructor\"),\n );\n\n if (func.isClass()) {\n path.replaceWith(constructor);\n return;\n }\n\n if (!node.id) {\n node.id = scope.generateUidIdentifier(\"target\");\n } else {\n // packages/babel-helper-create-class-features-plugin/src/fields.ts#L192 unshadow\n let scope = path.scope;\n const name = node.id.name;\n while (scope !== func.parentPath.scope) {\n if (\n scope.hasOwnBinding(name) &&\n !scope.bindingIdentifierEquals(name, node.id)\n ) {\n scope.rename(name);\n }\n scope = scope.parent;\n }\n }\n\n path.replaceWith(\n t.conditionalExpression(\n t.binaryExpression(\n \"instanceof\",\n t.thisExpression(),\n t.cloneNode(node.id),\n ),\n constructor,\n scope.buildUndefinedNode(),\n ),\n );\n }\n },\n },\n };\n});\n","import { declare } from \"@babel/helper-plugin-utils\";\n\nexport default declare(api => {\n api.assertVersion(REQUIRED_VERSION(7));\n\n return {\n name: \"transform-object-assign\",\n\n visitor: {\n CallExpression: function (path, file) {\n if (path.get(\"callee\").matchesPattern(\"Object.assign\")) {\n path.node.callee = file.addHelper(\"extends\");\n }\n },\n },\n };\n});\n","import { declare } from \"@babel/helper-plugin-utils\";\nimport ReplaceSupers from \"@babel/helper-replace-supers\";\nimport { types as t } from \"@babel/core\";\nimport type { File, NodePath } from \"@babel/core\";\n\nfunction replacePropertySuper(\n path: NodePath,\n getObjectRef: () => t.Identifier,\n file: File,\n) {\n // @ts-expect-error todo(flow->ts):\n const replaceSupers = new ReplaceSupers({\n getObjectRef: getObjectRef,\n methodPath: path,\n file: file,\n });\n\n replaceSupers.replace();\n}\n\nexport default declare(api => {\n api.assertVersion(REQUIRED_VERSION(7));\n const newLets = new Set<{\n scopePath: NodePath;\n id: t.Identifier;\n }>();\n\n return {\n name: \"transform-object-super\",\n\n visitor: {\n Loop: {\n exit(path) {\n newLets.forEach(v => {\n if (v.scopePath === path) {\n path.scope.push({\n id: v.id,\n kind: \"let\",\n });\n path.scope.crawl();\n path.requeue();\n newLets.delete(v);\n }\n });\n },\n },\n ObjectExpression(path, state) {\n let objectRef: t.Identifier;\n const getObjectRef = () =>\n (objectRef = objectRef || path.scope.generateUidIdentifier(\"obj\"));\n\n path.get(\"properties\").forEach(propPath => {\n if (!propPath.isMethod()) return;\n\n replacePropertySuper(propPath, getObjectRef, state.file);\n });\n\n if (objectRef) {\n const scopePath = path.findParent(\n p => p.isFunction() || p.isProgram() || p.isLoop(),\n );\n const useLet = scopePath.isLoop();\n // For transform-block-scoping\n if (useLet) {\n newLets.add({ scopePath, id: t.cloneNode(objectRef) });\n } else {\n path.scope.push({\n id: t.cloneNode(objectRef),\n kind: \"var\",\n });\n }\n\n path.replaceWith(\n t.assignmentExpression(\"=\", t.cloneNode(objectRef), path.node),\n );\n }\n },\n },\n };\n});\n","import { declare } from \"@babel/helper-plugin-utils\";\n\nexport default declare(api => {\n api.assertVersion(REQUIRED_VERSION(7));\n\n return {\n name: \"transform-object-set-prototype-of-to-assign\",\n\n visitor: {\n CallExpression(path, file) {\n if (path.get(\"callee\").matchesPattern(\"Object.setPrototypeOf\")) {\n path.node.callee = file.addHelper(\"defaults\");\n }\n },\n },\n };\n});\n","import { declare } from \"@babel/helper-plugin-utils\";\nimport { types as t } from \"@babel/core\";\n\nexport default declare(api => {\n api.assertVersion(REQUIRED_VERSION(7));\n\n return {\n name: \"transform-property-literals\",\n\n visitor: {\n ObjectProperty: {\n exit({ node }) {\n const key = node.key;\n if (\n !node.computed &&\n t.isIdentifier(key) &&\n !t.isValidES3Identifier(key.name)\n ) {\n // default: \"bar\" -> \"default\": \"bar\"\n node.key = t.stringLiteral(key.name);\n }\n },\n },\n },\n };\n});\n","import { types as t } from \"@babel/core\";\n\ntype DefineMap = {\n _inherits: t.Node[];\n _key: t.Expression;\n get?: t.Expression;\n set?: t.Expression;\n kind: \"get\" | \"set\";\n};\n\nexport type MutatorMap = Record;\n\nexport function pushAccessor(\n mutatorMap: MutatorMap,\n node: t.ObjectMethod & { kind: \"get\" | \"set\"; computed: false },\n) {\n const alias = t.toKeyAlias(node);\n const map = (mutatorMap[alias] ??= {\n _inherits: [],\n _key: node.key,\n } as DefineMap);\n\n map._inherits.push(node);\n\n const value = t.functionExpression(\n null,\n node.params,\n node.body,\n node.generator,\n node.async,\n );\n value.returnType = node.returnType;\n t.inheritsComments(value, node);\n map[node.kind] = value;\n\n return map;\n}\n\nexport function toDefineObject(mutatorMap: any) {\n const objExpr = t.objectExpression([]);\n\n Object.keys(mutatorMap).forEach(function (mutatorMapKey) {\n const map = mutatorMap[mutatorMapKey];\n map.configurable = t.booleanLiteral(true);\n map.enumerable = t.booleanLiteral(true);\n\n const mapNode = t.objectExpression([]);\n\n const propNode = t.objectProperty(map._key, mapNode, map._computed);\n\n Object.keys(map).forEach(function (key) {\n const node = map[key];\n if (key[0] === \"_\") return;\n\n const prop = t.objectProperty(t.identifier(key), node);\n t.inheritsComments(prop, node);\n t.removeComments(node);\n\n mapNode.properties.push(prop);\n });\n\n objExpr.properties.push(propNode);\n });\n\n return objExpr;\n}\n","import { declare } from \"@babel/helper-plugin-utils\";\nimport { type MutatorMap, pushAccessor, toDefineObject } from \"./define-map.ts\";\nimport { types as t } from \"@babel/core\";\n\nexport default declare(api => {\n api.assertVersion(REQUIRED_VERSION(7));\n\n return {\n name: \"transform-property-mutators\",\n\n visitor: {\n ObjectExpression(path) {\n const { node } = path;\n let mutatorMap: MutatorMap | undefined;\n const newProperties = node.properties.filter(function (prop) {\n if (\n t.isObjectMethod(prop) &&\n !prop.computed &&\n (prop.kind === \"get\" || prop.kind === \"set\")\n ) {\n pushAccessor(\n (mutatorMap ??= {}),\n prop as t.ObjectMethod & { kind: \"get\" | \"set\"; computed: false },\n );\n return false;\n }\n return true;\n });\n\n if (mutatorMap === undefined) {\n return;\n }\n\n node.properties = newProperties;\n\n path.replaceWith(\n t.callExpression(\n t.memberExpression(\n t.identifier(\"Object\"),\n t.identifier(\"defineProperties\"),\n ),\n [node, toDefineObject(mutatorMap)],\n ),\n );\n },\n },\n };\n});\n","import { declare } from \"@babel/helper-plugin-utils\";\nimport { types as t, type File } from \"@babel/core\";\n\nexport default declare(api => {\n api.assertVersion(REQUIRED_VERSION(7));\n\n function isProtoKey(node: t.ObjectExpression[\"properties\"][number]) {\n return (\n !t.isSpreadElement(node) &&\n t.isStringLiteral(t.toComputedKey(node, node.key), {\n value: \"__proto__\",\n })\n );\n }\n\n function isProtoAssignmentExpression(\n node: t.Node,\n ): node is t.MemberExpression {\n const left = node;\n return (\n t.isMemberExpression(left) &&\n t.isStringLiteral(t.toComputedKey(left, left.property), {\n value: \"__proto__\",\n })\n );\n }\n\n function buildDefaultsCallExpression(\n expr: t.AssignmentExpression,\n ref: t.MemberExpression[\"object\"],\n file: File,\n ) {\n return t.expressionStatement(\n t.callExpression(file.addHelper(\"defaults\"), [\n // @ts-ignore(Babel 7 vs Babel 8) Fixme: support `super.__proto__ = ...`\n ref,\n expr.right,\n ]),\n );\n }\n\n return {\n name: \"transform-proto-to-assign\",\n\n visitor: {\n AssignmentExpression(path, { file }) {\n if (!isProtoAssignmentExpression(path.node.left)) return;\n\n const nodes = [];\n const left = path.node.left.object;\n const temp = path.scope.maybeGenerateMemoised(left);\n\n if (temp) {\n nodes.push(\n t.expressionStatement(\n t.assignmentExpression(\n \"=\",\n temp,\n // left must not be Super when `temp` is an identifier\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion\n left as t.Expression,\n ),\n ),\n );\n }\n nodes.push(\n buildDefaultsCallExpression(\n path.node,\n t.cloneNode(temp || left),\n file,\n ),\n );\n if (temp) nodes.push(t.cloneNode(temp));\n\n path.replaceWithMultiple(nodes);\n },\n\n ExpressionStatement(path, { file }) {\n const expr = path.node.expression;\n if (!t.isAssignmentExpression(expr, { operator: \"=\" })) return;\n\n if (isProtoAssignmentExpression(expr.left)) {\n path.replaceWith(\n buildDefaultsCallExpression(expr, expr.left.object, file),\n );\n }\n },\n\n ObjectExpression(path, { file }) {\n let proto;\n const { node } = path;\n const { properties } = node;\n\n for (let i = 0; i < properties.length; i++) {\n const prop = properties[i];\n if (isProtoKey(prop)) {\n // @ts-expect-error Fixme: we should also handle ObjectMethod with __proto__ key\n proto = prop.value;\n properties.splice(i, 1);\n break;\n }\n }\n\n if (proto) {\n const args = [t.objectExpression([]), proto];\n if (node.properties.length) args.push(node);\n path.replaceWith(t.callExpression(file.addHelper(\"extends\"), args));\n }\n },\n },\n };\n});\n","import { declare } from \"@babel/helper-plugin-utils\";\nimport { types as t, template } from \"@babel/core\";\nimport type { Visitor, Scope, NodePath } from \"@babel/core\";\n\nexport interface Options {\n allowMutablePropsOnTags?: null | string[];\n}\n\ninterface VisitorState {\n isImmutable: boolean;\n mutablePropsAllowed: boolean;\n jsxScope: Scope;\n targetScope: Scope;\n}\nexport default declare((api, options: Options) => {\n api.assertVersion(REQUIRED_VERSION(7));\n\n const { allowMutablePropsOnTags } = options;\n\n if (\n allowMutablePropsOnTags != null &&\n !Array.isArray(allowMutablePropsOnTags)\n ) {\n throw new Error(\n \".allowMutablePropsOnTags must be an array, null, or undefined.\",\n );\n }\n\n // Element -> Target scope\n const HOISTED = new WeakMap();\n\n function declares(node: t.Identifier | t.JSXIdentifier, scope: Scope) {\n if (\n t.isJSXIdentifier(node, { name: \"this\" }) ||\n t.isJSXIdentifier(node, { name: \"arguments\" }) ||\n t.isJSXIdentifier(node, { name: \"super\" }) ||\n t.isJSXIdentifier(node, { name: \"new\" })\n ) {\n const { path } = scope;\n return path.isFunctionParent() && !path.isArrowFunctionExpression();\n }\n\n return scope.hasOwnBinding(node.name);\n }\n\n function isHoistingScope({ path }: Scope) {\n return path.isFunctionParent() || path.isLoop() || path.isProgram();\n }\n\n function getHoistingScope(scope: Scope) {\n while (!isHoistingScope(scope)) scope = scope.parent;\n return scope;\n }\n\n const targetScopeVisitor: Visitor = {\n ReferencedIdentifier(path, state) {\n const { node } = path;\n let { scope } = path;\n\n while (scope !== state.jsxScope) {\n // If a binding is declared in an inner function, it doesn't affect hoisting.\n if (declares(node, scope)) return;\n\n scope = scope.parent;\n }\n\n while (scope) {\n // We cannot hoist outside of the previous hoisting target\n // scope, so we return early and we don't update it.\n if (scope === state.targetScope) return;\n\n // If the scope declares this identifier (or we're at the function\n // providing the lexical env binding), we can't hoist the var any\n // higher.\n if (declares(node, scope)) break;\n\n scope = scope.parent;\n }\n\n state.targetScope = getHoistingScope(scope);\n },\n };\n\n const immutabilityVisitor: Visitor = {\n enter(path, state) {\n const stop = () => {\n state.isImmutable = false;\n path.stop();\n };\n\n const skip = () => {\n path.skip();\n };\n\n if (path.isJSXClosingElement()) {\n skip();\n return;\n }\n\n // Elements with refs are not safe to hoist.\n if (\n path.isJSXIdentifier({ name: \"ref\" }) &&\n path.parentPath.isJSXAttribute({ name: path.node })\n ) {\n stop();\n return;\n }\n\n // Ignore JSX expressions and immutable values.\n if (\n path.isJSXIdentifier() ||\n path.isJSXMemberExpression() ||\n path.isJSXNamespacedName() ||\n path.isImmutable()\n ) {\n return;\n }\n\n // Ignore constant bindings.\n if (path.isIdentifier()) {\n const binding = path.scope.getBinding(path.node.name);\n if (binding?.constant) return;\n }\n\n // If we allow mutable props, tags with function expressions can be\n // safely hoisted.\n const { mutablePropsAllowed } = state;\n if (mutablePropsAllowed && path.isFunction()) {\n path.traverse(targetScopeVisitor, state);\n skip();\n return;\n }\n\n if (!path.isPure()) {\n stop();\n return;\n }\n\n // If it's not immutable, it may still be a pure expression, such as string concatenation.\n // It is still safe to hoist that, so long as its result is immutable.\n // If not, it is not safe to replace as mutable values (like objects) could be mutated after render.\n // https://github.com/facebook/react/issues/3226\n const expressionResult = path.evaluate();\n if (expressionResult.confident) {\n // We know the result; check its mutability.\n const { value } = expressionResult;\n if (\n mutablePropsAllowed ||\n value === null ||\n (typeof value !== \"object\" && typeof value !== \"function\")\n ) {\n // It evaluated to an immutable value, so we can hoist it.\n skip();\n return;\n }\n } else if (expressionResult.deopt?.isIdentifier()) {\n // It's safe to hoist here if the deopt reason is an identifier (e.g. func param).\n // The hoister will take care of how high up it can be hoisted.\n return;\n }\n\n stop();\n },\n };\n\n // We cannot use traverse.visitors.merge because it doesn't support\n // immutabilityVisitor's bare `enter` visitor.\n // It's safe to just use ... because the two visitors don't share any key.\n const hoistingVisitor = { ...immutabilityVisitor, ...targetScopeVisitor };\n\n return {\n name: \"transform-react-constant-elements\",\n\n visitor: {\n \"JSXElement|JSXFragment\"(path: NodePath) {\n if (HOISTED.has(path.node)) return;\n let mutablePropsAllowed = false;\n let name: t.JSXOpeningElement[\"name\"] | t.JSXFragment;\n if (path.isJSXElement()) {\n name = path.node.openingElement.name;\n\n // This transform takes the option `allowMutablePropsOnTags`, which is an array\n // of JSX tags to allow mutable props (such as objects, functions) on. Use sparingly\n // and only on tags you know will never modify their own props.\n if (allowMutablePropsOnTags != null) {\n // Get the element's name. If it's a member expression, we use the last part of the path.\n // So the option [\"FormattedMessage\"] would match \"Intl.FormattedMessage\".\n let lastSegment = name;\n while (t.isJSXMemberExpression(lastSegment)) {\n lastSegment = lastSegment.property;\n }\n\n const elementName = lastSegment.name;\n // @ts-expect-error Fixme: allowMutablePropsOnTags should handle JSXNamespacedName\n mutablePropsAllowed = allowMutablePropsOnTags.includes(elementName);\n }\n } else {\n name = path.node;\n }\n\n // In order to avoid hoisting unnecessarily, we need to know which is\n // the scope containing the current JSX element. If a parent of the\n // current element has already been hoisted, we can consider its target\n // scope as the base scope for the current element.\n let jsxScope;\n let current: NodePath = path;\n while (!jsxScope && current.parentPath.isJSX()) {\n current = current.parentPath;\n jsxScope = HOISTED.get(current.node);\n }\n jsxScope ??= path.scope;\n // The initial HOISTED is set to jsxScope, s.t.\n // if the element's JSX ancestor has been hoisted, it will be skipped\n HOISTED.set(path.node, jsxScope);\n\n const visitorState: VisitorState = {\n isImmutable: true,\n mutablePropsAllowed,\n jsxScope,\n targetScope: path.scope.getProgramParent(),\n };\n path.traverse(hoistingVisitor, visitorState);\n if (!visitorState.isImmutable) return;\n\n const { targetScope } = visitorState;\n // Only hoist if it would give us an advantage.\n for (let currentScope = jsxScope; ; ) {\n if (targetScope === currentScope) return;\n if (isHoistingScope(currentScope)) break;\n\n currentScope = currentScope.parent;\n if (!currentScope) {\n throw new Error(\n \"Internal @babel/plugin-transform-react-constant-elements error: \" +\n \"targetScope must be an ancestor of jsxScope. \" +\n \"This is a Babel bug, please report it.\",\n );\n }\n }\n\n const id = path.scope.generateUidBasedOnNode(name);\n targetScope.push({ id: t.identifier(id) });\n // If the element is to be hoisted, update HOISTED to be the target scope\n HOISTED.set(path.node, targetScope);\n\n let replacement: t.Expression | t.JSXExpressionContainer = template\n .expression.ast`\n ${t.identifier(id)} || (${t.identifier(id)} = ${path.node})\n `;\n if (\n path.parentPath.isJSXElement() ||\n path.parentPath.isJSXAttribute() ||\n path.parentPath.isJSXFragment()\n ) {\n replacement = t.jsxExpressionContainer(replacement);\n }\n\n path.replaceWith(replacement);\n },\n },\n };\n});\n","import { declare } from \"@babel/helper-plugin-utils\";\nimport path from \"path\";\nimport { types as t } from \"@babel/core\";\n\ntype ReactCreateClassCall = t.CallExpression & {\n arguments: [t.ObjectExpression];\n};\n\nexport default declare(api => {\n api.assertVersion(REQUIRED_VERSION(7));\n\n function addDisplayName(id: string, call: ReactCreateClassCall) {\n const props = call.arguments[0].properties;\n let safe = true;\n\n for (let i = 0; i < props.length; i++) {\n const prop = props[i];\n if (t.isSpreadElement(prop)) {\n continue;\n }\n const key = t.toComputedKey(prop);\n if (t.isStringLiteral(key, { value: \"displayName\" })) {\n safe = false;\n break;\n }\n }\n\n if (safe) {\n props.unshift(\n t.objectProperty(t.identifier(\"displayName\"), t.stringLiteral(id)),\n );\n }\n }\n\n const isCreateClassCallExpression =\n t.buildMatchMemberExpression(\"React.createClass\");\n const isCreateClassAddon = (callee: t.CallExpression[\"callee\"]) =>\n t.isIdentifier(callee, { name: \"createReactClass\" });\n\n function isCreateClass(node?: t.Node): node is ReactCreateClassCall {\n if (!node || !t.isCallExpression(node)) return false;\n\n // not createReactClass nor React.createClass call member object\n if (\n !isCreateClassCallExpression(node.callee) &&\n !isCreateClassAddon(node.callee)\n ) {\n return false;\n }\n\n // no call arguments\n const args = node.arguments;\n if (args.length !== 1) return false;\n\n // first node arg is not an object\n const first = args[0];\n if (!t.isObjectExpression(first)) return false;\n\n return true;\n }\n\n return {\n name: \"transform-react-display-name\",\n\n visitor: {\n ExportDefaultDeclaration({ node }, state) {\n if (isCreateClass(node.declaration)) {\n const filename = state.filename || \"unknown\";\n\n let displayName = path.basename(filename, path.extname(filename));\n\n // ./{module name}/index.js\n if (displayName === \"index\") {\n displayName = path.basename(path.dirname(filename));\n }\n\n addDisplayName(displayName, node.declaration);\n }\n },\n\n CallExpression(path) {\n const { node } = path;\n if (!isCreateClass(node)) return;\n\n let id: t.LVal | t.Expression | t.PrivateName | null;\n\n // crawl up the ancestry looking for possible candidates for displayName inference\n path.find(function (path) {\n if (path.isAssignmentExpression()) {\n id = path.node.left;\n } else if (path.isObjectProperty()) {\n id = path.node.key;\n } else if (path.isVariableDeclarator()) {\n id = path.node.id;\n } else if (path.isStatement()) {\n // we've hit a statement, we should stop crawling up\n return true;\n }\n\n // we've got an id! no need to continue\n if (id) return true;\n });\n\n // ensure that we have an identifier we can inherit from\n if (!id) return;\n\n // foo.bar -> bar\n if (t.isMemberExpression(id)) {\n id = id.property;\n }\n\n // identifiers are the only thing we can reliably get a name from\n if (t.isIdentifier(id)) {\n addDisplayName(id.name, node);\n }\n },\n },\n };\n});\n","import {\n booleanLiteral,\n callExpression,\n identifier,\n inherits,\n isIdentifier,\n isJSXExpressionContainer,\n isJSXIdentifier,\n isJSXMemberExpression,\n isJSXNamespacedName,\n isJSXSpreadAttribute,\n isObjectExpression,\n isReferenced,\n isStringLiteral,\n isValidIdentifier,\n memberExpression,\n nullLiteral,\n objectExpression,\n objectProperty,\n react,\n spreadElement,\n stringLiteral,\n thisExpression,\n} from \"@babel/types\";\nimport annotateAsPure from \"@babel/helper-annotate-as-pure\";\nimport type { PluginPass, NodePath, Visitor, types as t } from \"@babel/core\";\n\ntype ElementState = {\n tagExpr: t.Expression; // tag node,\n tagName: string | undefined | null; // raw string tag name,\n args: Array; // array of call arguments,\n call?: any; // optional call property that can be set to override the call expression returned,\n pure: boolean; // true if the element can be marked with a #__PURE__ annotation\n callee?: any;\n};\n\nexport interface Options {\n filter?: (node: t.Node, pass: PluginPass) => boolean;\n pre?: (state: ElementState, pass: PluginPass) => void;\n post?: (state: ElementState, pass: PluginPass) => void;\n compat?: boolean;\n pure?: string;\n throwIfNamespace?: boolean;\n useSpread?: boolean;\n useBuiltIns?: boolean;\n}\n\nexport default function (opts: Options) {\n const visitor: Visitor> = {};\n\n visitor.JSXNamespacedName = function (path) {\n if (opts.throwIfNamespace) {\n throw path.buildCodeFrameError(\n `Namespace tags are not supported by default. React's JSX doesn't support namespace tags. \\\nYou can set \\`throwIfNamespace: false\\` to bypass this warning.`,\n );\n }\n };\n\n visitor.JSXSpreadChild = function (path) {\n throw path.buildCodeFrameError(\n \"Spread children are not supported in React.\",\n );\n };\n\n visitor.JSXElement = {\n exit(path, state) {\n const callExpr = buildElementCall(path, state);\n if (callExpr) {\n path.replaceWith(inherits(callExpr, path.node));\n }\n },\n };\n\n visitor.JSXFragment = {\n exit(path, state) {\n if (opts.compat) {\n throw path.buildCodeFrameError(\n \"Fragment tags are only supported in React 16 and up.\",\n );\n }\n const callExpr = buildFragmentCall(path, state);\n if (callExpr) {\n path.replaceWith(inherits(callExpr, path.node));\n }\n },\n };\n\n return visitor;\n\n function convertJSXIdentifier(\n node: t.JSXIdentifier | t.JSXMemberExpression | t.JSXNamespacedName,\n parent: t.JSXOpeningElement | t.JSXMemberExpression,\n ): t.ThisExpression | t.StringLiteral | t.MemberExpression | t.Identifier {\n if (isJSXIdentifier(node)) {\n if (node.name === \"this\" && isReferenced(node, parent)) {\n return thisExpression();\n } else if (isValidIdentifier(node.name, false)) {\n // @ts-expect-error casting JSXIdentifier to Identifier\n node.type = \"Identifier\";\n return node as unknown as t.Identifier;\n } else {\n return stringLiteral(node.name);\n }\n } else if (isJSXMemberExpression(node)) {\n return memberExpression(\n convertJSXIdentifier(node.object, node),\n convertJSXIdentifier(node.property, node),\n );\n } else if (isJSXNamespacedName(node)) {\n /**\n * If there is flag \"throwIfNamespace\"\n * print XMLNamespace like string literal\n */\n return stringLiteral(`${node.namespace.name}:${node.name.name}`);\n }\n\n return node;\n }\n\n function convertAttributeValue(\n node: t.JSXAttribute[\"value\"] | t.BooleanLiteral,\n ) {\n if (isJSXExpressionContainer(node)) {\n return node.expression;\n } else {\n return node;\n }\n }\n\n function convertAttribute(node: t.JSXAttribute | t.JSXSpreadAttribute) {\n if (isJSXSpreadAttribute(node)) {\n return spreadElement(node.argument);\n }\n const value = convertAttributeValue(node.value || booleanLiteral(true));\n\n if (isStringLiteral(value) && !isJSXExpressionContainer(node.value)) {\n value.value = value.value.replace(/\\n\\s+/g, \" \");\n\n // \"raw\" JSXText should not be used from a StringLiteral because it needs to be escaped.\n delete value.extra?.raw;\n }\n\n if (isJSXNamespacedName(node.name)) {\n // @ts-expect-error Mutating AST nodes\n node.name = stringLiteral(\n node.name.namespace.name + \":\" + node.name.name.name,\n );\n } else if (isValidIdentifier(node.name.name, false)) {\n // @ts-expect-error Mutating AST nodes\n node.name.type = \"Identifier\";\n } else {\n // @ts-expect-error Mutating AST nodes\n node.name = stringLiteral(node.name.name);\n }\n\n return inherits(\n objectProperty(\n // @ts-expect-error Mutating AST nodes\n node.name,\n value,\n ),\n node,\n );\n }\n\n function buildElementCall(path: NodePath, pass: PluginPass) {\n if (opts.filter && !opts.filter(path.node, pass)) return;\n\n const openingPath = path.get(\"openingElement\");\n // @ts-expect-error mutating AST nodes\n path.node.children = react.buildChildren(path.node);\n\n const tagExpr = convertJSXIdentifier(\n openingPath.node.name,\n openingPath.node,\n );\n const args: (t.Expression | t.JSXElement | t.JSXFragment)[] = [];\n\n let tagName: string;\n if (isIdentifier(tagExpr)) {\n tagName = tagExpr.name;\n } else if (isStringLiteral(tagExpr)) {\n tagName = tagExpr.value;\n }\n\n const state: ElementState = {\n tagExpr: tagExpr,\n tagName: tagName,\n args: args,\n pure: false,\n };\n\n if (opts.pre) {\n opts.pre(state, pass);\n }\n\n const attribs = openingPath.node.attributes;\n let convertedAttributes: t.Expression;\n if (attribs.length) {\n if (process.env.BABEL_8_BREAKING) {\n convertedAttributes = objectExpression(attribs.map(convertAttribute));\n } else {\n convertedAttributes = buildOpeningElementAttributes(attribs, pass);\n }\n } else {\n convertedAttributes = nullLiteral();\n }\n\n args.push(\n convertedAttributes,\n // @ts-expect-error JSXExpressionContainer has been transformed by convertAttributeValue\n ...path.node.children,\n );\n\n if (opts.post) {\n opts.post(state, pass);\n }\n\n const call = state.call || callExpression(state.callee, args);\n if (state.pure) annotateAsPure(call);\n\n return call;\n }\n\n function pushProps(\n _props: (t.ObjectProperty | t.SpreadElement)[],\n objs: t.Expression[],\n ) {\n if (!_props.length) return _props;\n\n objs.push(objectExpression(_props));\n return [];\n }\n\n /**\n * The logic for this is quite terse. It's because we need to\n * support spread elements. We loop over all attributes,\n * breaking on spreads, we then push a new object containing\n * all prior attributes to an array for later processing.\n */\n\n function buildOpeningElementAttributes(\n attribs: (t.JSXAttribute | t.JSXSpreadAttribute)[],\n pass: PluginPass,\n ): t.Expression {\n let _props: (t.ObjectProperty | t.SpreadElement)[] = [];\n const objs: t.Expression[] = [];\n\n const { useSpread = false } = pass.opts;\n if (typeof useSpread !== \"boolean\") {\n throw new Error(\n \"transform-react-jsx currently only accepts a boolean option for \" +\n \"useSpread (defaults to false)\",\n );\n }\n\n const useBuiltIns = pass.opts.useBuiltIns || false;\n if (typeof useBuiltIns !== \"boolean\") {\n throw new Error(\n \"transform-react-jsx currently only accepts a boolean option for \" +\n \"useBuiltIns (defaults to false)\",\n );\n }\n\n if (useSpread && useBuiltIns) {\n throw new Error(\n \"transform-react-jsx currently only accepts useBuiltIns or useSpread \" +\n \"but not both\",\n );\n }\n\n if (useSpread) {\n const props = attribs.map(convertAttribute);\n return objectExpression(props);\n }\n\n while (attribs.length) {\n const prop = attribs.shift();\n if (isJSXSpreadAttribute(prop)) {\n _props = pushProps(_props, objs);\n objs.push(prop.argument);\n } else {\n _props.push(convertAttribute(prop));\n }\n }\n\n pushProps(_props, objs);\n let convertedAttribs: t.Expression;\n\n if (objs.length === 1) {\n // only one object\n convertedAttribs = objs[0];\n } else {\n // looks like we have multiple objects\n if (!isObjectExpression(objs[0])) {\n objs.unshift(objectExpression([]));\n }\n\n const helper = useBuiltIns\n ? memberExpression(identifier(\"Object\"), identifier(\"assign\"))\n : pass.addHelper(\"extends\");\n\n // spread it\n convertedAttribs = callExpression(helper, objs);\n }\n\n return convertedAttribs;\n }\n\n function buildFragmentCall(path: NodePath, pass: PluginPass) {\n if (opts.filter && !opts.filter(path.node, pass)) return;\n\n // @ts-expect-error mutating AST nodes\n path.node.children = react.buildChildren(path.node);\n\n const args: t.Expression[] = [];\n const tagName: null = null;\n const tagExpr = pass.get(\"jsxFragIdentifier\")();\n\n const state: ElementState = {\n tagExpr: tagExpr,\n tagName: tagName,\n args: args,\n pure: false,\n };\n\n if (opts.pre) {\n opts.pre(state, pass);\n }\n\n // no attributes are allowed with <> syntax\n args.push(\n nullLiteral(),\n // @ts-expect-error JSXExpressionContainer has been transformed by convertAttributeValue\n ...path.node.children,\n );\n\n if (opts.post) {\n opts.post(state, pass);\n }\n\n pass.set(\"usedFragment\", true);\n\n const call = state.call || callExpression(state.callee, args);\n if (state.pure) annotateAsPure(call);\n\n return call;\n }\n}\n","import { declare } from \"@babel/helper-plugin-utils\";\nimport helper from \"@babel/helper-builder-react-jsx\";\nimport { types as t } from \"@babel/core\";\n\nexport default declare(api => {\n api.assertVersion(REQUIRED_VERSION(7));\n\n function hasRefOrSpread(attrs: t.JSXOpeningElement[\"attributes\"]) {\n for (let i = 0; i < attrs.length; i++) {\n const attr = attrs[i];\n if (t.isJSXSpreadAttribute(attr)) return true;\n if (isJSXAttributeOfName(attr, \"ref\")) return true;\n }\n return false;\n }\n\n function isJSXAttributeOfName(attr: t.JSXAttribute, name: string) {\n return (\n t.isJSXAttribute(attr) && t.isJSXIdentifier(attr.name, { name: name })\n );\n }\n\n const visitor = helper({\n filter(node) {\n return (\n node.type === \"JSXElement\" &&\n !hasRefOrSpread(node.openingElement.attributes)\n );\n },\n pre(state) {\n const tagName = state.tagName;\n const args = state.args;\n if (t.react.isCompatTag(tagName)) {\n args.push(t.stringLiteral(tagName));\n } else {\n args.push(state.tagExpr);\n }\n },\n post(state, pass) {\n state.callee = pass.addHelper(\"jsx\");\n // NOTE: The arguments passed to the \"jsx\" helper are:\n // (element, props, key, ...children) or (element, props)\n // The argument generated by the helper are:\n // (element, { ...props, key }, ...children)\n\n const props = state.args[1];\n let hasKey = false;\n if (t.isObjectExpression(props)) {\n const keyIndex = props.properties.findIndex(prop =>\n // @ts-expect-error todo(flow->ts) key does not exist on SpreadElement\n t.isIdentifier(prop.key, { name: \"key\" }),\n );\n if (keyIndex > -1) {\n // @ts-expect-error todo(flow->ts) value does not exist on ObjectMethod\n state.args.splice(2, 0, props.properties[keyIndex].value);\n props.properties.splice(keyIndex, 1);\n hasKey = true;\n }\n } else if (t.isNullLiteral(props)) {\n state.args.splice(1, 1, t.objectExpression([]));\n }\n\n if (!hasKey && state.args.length > 2) {\n state.args.splice(2, 0, t.unaryExpression(\"void\", t.numericLiteral(0)));\n }\n\n state.pure = true;\n },\n });\n return {\n name: \"transform-react-inline-elements\",\n visitor,\n };\n});\n","import jsx from \"@babel/plugin-syntax-jsx\";\nimport { declare } from \"@babel/helper-plugin-utils\";\nimport { template, types as t } from \"@babel/core\";\nimport type { PluginPass, NodePath, Scope, Visitor } from \"@babel/core\";\nimport { addNamed, addNamespace, isModule } from \"@babel/helper-module-imports\";\nimport annotateAsPure from \"@babel/helper-annotate-as-pure\";\nimport type {\n CallExpression,\n Class,\n Expression,\n Identifier,\n JSXAttribute,\n JSXElement,\n JSXFragment,\n JSXOpeningElement,\n JSXSpreadAttribute,\n MemberExpression,\n ObjectExpression,\n Program,\n} from \"@babel/types\";\n\nconst DEFAULT = {\n importSource: \"react\",\n runtime: \"automatic\",\n pragma: \"React.createElement\",\n pragmaFrag: \"React.Fragment\",\n};\n\nconst JSX_SOURCE_ANNOTATION_REGEX =\n /^\\s*(?:\\*\\s*)?@jsxImportSource\\s+(\\S+)\\s*$/m;\nconst JSX_RUNTIME_ANNOTATION_REGEX = /^\\s*(?:\\*\\s*)?@jsxRuntime\\s+(\\S+)\\s*$/m;\n\nconst JSX_ANNOTATION_REGEX = /^\\s*(?:\\*\\s*)?@jsx\\s+(\\S+)\\s*$/m;\nconst JSX_FRAG_ANNOTATION_REGEX = /^\\s*(?:\\*\\s*)?@jsxFrag\\s+(\\S+)\\s*$/m;\n\nconst get = (pass: PluginPass, name: string) =>\n pass.get(`@babel/plugin-react-jsx/${name}`);\nconst set = (pass: PluginPass, name: string, v: any) =>\n pass.set(`@babel/plugin-react-jsx/${name}`, v);\n\nfunction hasProto(node: t.ObjectExpression) {\n return node.properties.some(\n value =>\n t.isObjectProperty(value, { computed: false, shorthand: false }) &&\n (t.isIdentifier(value.key, { name: \"__proto__\" }) ||\n t.isStringLiteral(value.key, { value: \"__proto__\" })),\n );\n}\n\nexport interface Options {\n filter?: (node: t.Node, pass: PluginPass) => boolean;\n importSource?: string;\n pragma?: string;\n pragmaFrag?: string;\n pure?: string;\n runtime?: \"automatic\" | \"classic\";\n throwIfNamespace?: boolean;\n useBuiltIns: boolean;\n useSpread?: boolean;\n}\nexport default function createPlugin({\n name,\n development,\n}: {\n name: string;\n development: boolean;\n}) {\n return declare((_, options: Options) => {\n const {\n pure: PURE_ANNOTATION,\n\n throwIfNamespace = true,\n\n filter,\n\n runtime: RUNTIME_DEFAULT = process.env.BABEL_8_BREAKING\n ? \"automatic\"\n : development\n ? \"automatic\"\n : \"classic\",\n\n importSource: IMPORT_SOURCE_DEFAULT = DEFAULT.importSource,\n pragma: PRAGMA_DEFAULT = DEFAULT.pragma,\n pragmaFrag: PRAGMA_FRAG_DEFAULT = DEFAULT.pragmaFrag,\n } = options;\n\n if (process.env.BABEL_8_BREAKING) {\n if (\"useSpread\" in options) {\n throw new Error(\n '@babel/plugin-transform-react-jsx: Since Babel 8, an inline object with spread elements is always used, and the \"useSpread\" option is no longer available. Please remove it from your config.',\n );\n }\n\n if (\"useBuiltIns\" in options) {\n const useBuiltInsFormatted = JSON.stringify(options.useBuiltIns);\n throw new Error(\n `@babel/plugin-transform-react-jsx: Since \"useBuiltIns\" is removed in Babel 8, you can remove it from the config.\n- Babel 8 now transforms JSX spread to object spread. If you need to transpile object spread with\n\\`useBuiltIns: ${useBuiltInsFormatted}\\`, you can use the following config\n{\n \"plugins\": [\n \"@babel/plugin-transform-react-jsx\"\n [\"@babel/plugin-transform-object-rest-spread\", { \"loose\": true, \"useBuiltIns\": ${useBuiltInsFormatted} }]\n ]\n}`,\n );\n }\n\n if (filter != null && RUNTIME_DEFAULT === \"automatic\") {\n throw new Error(\n '@babel/plugin-transform-react-jsx: \"filter\" option can not be used with automatic runtime. If you are upgrading from Babel 7, please specify `runtime: \"classic\"`.',\n );\n }\n } else {\n // eslint-disable-next-line no-var\n var { useSpread = false, useBuiltIns = false } = options;\n\n if (RUNTIME_DEFAULT === \"classic\") {\n if (typeof useSpread !== \"boolean\") {\n throw new Error(\n \"transform-react-jsx currently only accepts a boolean option for \" +\n \"useSpread (defaults to false)\",\n );\n }\n\n if (typeof useBuiltIns !== \"boolean\") {\n throw new Error(\n \"transform-react-jsx currently only accepts a boolean option for \" +\n \"useBuiltIns (defaults to false)\",\n );\n }\n\n if (useSpread && useBuiltIns) {\n throw new Error(\n \"transform-react-jsx currently only accepts useBuiltIns or useSpread \" +\n \"but not both\",\n );\n }\n }\n }\n\n const injectMetaPropertiesVisitor: Visitor = {\n JSXOpeningElement(path, state) {\n const attributes = [];\n if (isThisAllowed(path.scope)) {\n attributes.push(\n t.jsxAttribute(\n t.jsxIdentifier(\"__self\"),\n t.jsxExpressionContainer(t.thisExpression()),\n ),\n );\n }\n attributes.push(\n t.jsxAttribute(\n t.jsxIdentifier(\"__source\"),\n t.jsxExpressionContainer(makeSource(path, state)),\n ),\n );\n path.pushContainer(\"attributes\", attributes);\n },\n };\n\n return {\n name,\n inherits: jsx,\n visitor: {\n JSXNamespacedName(path) {\n if (throwIfNamespace) {\n throw path.buildCodeFrameError(\n `Namespace tags are not supported by default. React's JSX doesn't support namespace tags. \\\nYou can set \\`throwIfNamespace: false\\` to bypass this warning.`,\n );\n }\n },\n\n JSXSpreadChild(path) {\n throw path.buildCodeFrameError(\n \"Spread children are not supported in React.\",\n );\n },\n\n Program: {\n enter(path, state) {\n const { file } = state;\n let runtime: string = RUNTIME_DEFAULT;\n\n let source: string = IMPORT_SOURCE_DEFAULT;\n let pragma: string = PRAGMA_DEFAULT;\n let pragmaFrag: string = PRAGMA_FRAG_DEFAULT;\n\n let sourceSet = !!options.importSource;\n let pragmaSet = !!options.pragma;\n let pragmaFragSet = !!options.pragmaFrag;\n\n if (file.ast.comments) {\n for (const comment of file.ast.comments) {\n const sourceMatches = JSX_SOURCE_ANNOTATION_REGEX.exec(\n comment.value,\n );\n if (sourceMatches) {\n source = sourceMatches[1];\n sourceSet = true;\n }\n\n const runtimeMatches = JSX_RUNTIME_ANNOTATION_REGEX.exec(\n comment.value,\n );\n if (runtimeMatches) {\n runtime = runtimeMatches[1];\n }\n\n const jsxMatches = JSX_ANNOTATION_REGEX.exec(comment.value);\n if (jsxMatches) {\n pragma = jsxMatches[1];\n pragmaSet = true;\n }\n const jsxFragMatches = JSX_FRAG_ANNOTATION_REGEX.exec(\n comment.value,\n );\n if (jsxFragMatches) {\n pragmaFrag = jsxFragMatches[1];\n pragmaFragSet = true;\n }\n }\n }\n\n set(state, \"runtime\", runtime);\n if (runtime === \"classic\") {\n if (sourceSet) {\n throw path.buildCodeFrameError(\n `importSource cannot be set when runtime is classic.`,\n );\n }\n\n const createElement = toMemberExpression(pragma);\n const fragment = toMemberExpression(pragmaFrag);\n\n set(state, \"id/createElement\", () => t.cloneNode(createElement));\n set(state, \"id/fragment\", () => t.cloneNode(fragment));\n\n set(state, \"defaultPure\", pragma === DEFAULT.pragma);\n } else if (runtime === \"automatic\") {\n if (pragmaSet || pragmaFragSet) {\n throw path.buildCodeFrameError(\n `pragma and pragmaFrag cannot be set when runtime is automatic.`,\n );\n }\n\n const define = (name: string, id: string) =>\n set(state, name, createImportLazily(state, path, id, source));\n\n define(\"id/jsx\", development ? \"jsxDEV\" : \"jsx\");\n define(\"id/jsxs\", development ? \"jsxDEV\" : \"jsxs\");\n define(\"id/createElement\", \"createElement\");\n define(\"id/fragment\", \"Fragment\");\n\n set(state, \"defaultPure\", source === DEFAULT.importSource);\n } else {\n throw path.buildCodeFrameError(\n `Runtime must be either \"classic\" or \"automatic\".`,\n );\n }\n\n if (development) {\n path.traverse(injectMetaPropertiesVisitor, state);\n }\n },\n\n // TODO(Babel 8): Decide if this should be removed or brought back.\n // see: https://github.com/babel/babel/pull/12253#discussion_r513086528\n //\n // exit(path, state) {\n // if (\n // get(state, \"runtime\") === \"classic\" &&\n // get(state, \"pragmaSet\") &&\n // get(state, \"usedFragment\") &&\n // !get(state, \"pragmaFragSet\")\n // ) {\n // throw new Error(\n // \"transform-react-jsx: pragma has been set but \" +\n // \"pragmaFrag has not been set\",\n // );\n // }\n // },\n },\n\n JSXFragment: {\n exit(path, file) {\n let callExpr;\n if (get(file, \"runtime\") === \"classic\") {\n callExpr = buildCreateElementFragmentCall(path, file);\n } else {\n callExpr = buildJSXFragmentCall(path, file);\n }\n\n path.replaceWith(t.inherits(callExpr, path.node));\n },\n },\n\n JSXElement: {\n exit(path, file) {\n let callExpr;\n if (\n get(file, \"runtime\") === \"classic\" ||\n shouldUseCreateElement(path)\n ) {\n callExpr = buildCreateElementCall(path, file);\n } else {\n callExpr = buildJSXElementCall(path, file);\n }\n\n path.replaceWith(t.inherits(callExpr, path.node));\n },\n },\n\n JSXAttribute(path) {\n if (t.isJSXElement(path.node.value)) {\n path.node.value = t.jsxExpressionContainer(path.node.value);\n }\n },\n },\n };\n\n // Returns whether the class has specified a superclass.\n function isDerivedClass(classPath: NodePath) {\n return classPath.node.superClass !== null;\n }\n\n // Returns whether `this` is allowed at given scope.\n function isThisAllowed(scope: Scope) {\n // This specifically skips arrow functions as they do not rewrite `this`.\n do {\n const { path } = scope;\n if (path.isFunctionParent() && !path.isArrowFunctionExpression()) {\n if (!path.isMethod()) {\n // If the closest parent is a regular function, `this` will be rebound, therefore it is fine to use `this`.\n return true;\n }\n // Current node is within a method, so we need to check if the method is a constructor.\n if (path.node.kind !== \"constructor\") {\n // We are not in a constructor, therefore it is always fine to use `this`.\n return true;\n }\n // Now we are in a constructor. If it is a derived class, we do not reference `this`.\n return !isDerivedClass(path.parentPath.parentPath as NodePath);\n }\n if (path.isTSModuleBlock()) {\n // If the closest parent is a TS Module block, `this` will not be allowed.\n return false;\n }\n } while ((scope = scope.parent));\n // We are not in a method or function. It is fine to use `this`.\n return true;\n }\n\n function call(\n pass: PluginPass,\n name: string,\n args: CallExpression[\"arguments\"],\n ) {\n const node = t.callExpression(get(pass, `id/${name}`)(), args);\n if (PURE_ANNOTATION ?? get(pass, \"defaultPure\")) annotateAsPure(node);\n return node;\n }\n\n // We want to use React.createElement, even in the case of\n // jsx, for
to distinguish it\n // from
. This is an intermediary\n // step while we deprecate key spread from props. Afterwards,\n // we will stop using createElement in the transform.\n function shouldUseCreateElement(path: NodePath) {\n const openingPath = path.get(\"openingElement\");\n const attributes = openingPath.node.attributes;\n\n let seenPropsSpread = false;\n for (let i = 0; i < attributes.length; i++) {\n const attr = attributes[i];\n if (\n seenPropsSpread &&\n t.isJSXAttribute(attr) &&\n attr.name.name === \"key\"\n ) {\n return true;\n } else if (t.isJSXSpreadAttribute(attr)) {\n seenPropsSpread = true;\n }\n }\n return false;\n }\n\n function convertJSXIdentifier(\n node: t.JSXIdentifier | t.JSXMemberExpression | t.JSXNamespacedName,\n parent: t.JSXOpeningElement | t.JSXMemberExpression,\n ): t.ThisExpression | t.StringLiteral | t.MemberExpression | t.Identifier {\n if (t.isJSXIdentifier(node)) {\n if (node.name === \"this\" && t.isReferenced(node, parent)) {\n return t.thisExpression();\n } else if (t.isValidIdentifier(node.name, false)) {\n // @ts-expect-error cast AST type to Identifier\n node.type = \"Identifier\";\n return node as unknown as t.Identifier;\n } else {\n return t.stringLiteral(node.name);\n }\n } else if (t.isJSXMemberExpression(node)) {\n return t.memberExpression(\n convertJSXIdentifier(node.object, node),\n convertJSXIdentifier(node.property, node),\n );\n } else if (t.isJSXNamespacedName(node)) {\n /**\n * If the flag \"throwIfNamespace\" is false\n * print XMLNamespace like string literal\n */\n return t.stringLiteral(`${node.namespace.name}:${node.name.name}`);\n }\n\n // todo: this branch should be unreachable\n return node;\n }\n\n function convertAttributeValue(\n node: t.JSXAttribute[\"value\"] | t.BooleanLiteral,\n ) {\n if (t.isJSXExpressionContainer(node)) {\n return node.expression;\n } else {\n return node;\n }\n }\n\n function accumulateAttribute(\n array: ObjectExpression[\"properties\"],\n attribute: NodePath,\n ) {\n if (t.isJSXSpreadAttribute(attribute.node)) {\n const arg = attribute.node.argument;\n // Collect properties into props array if spreading object expression\n if (t.isObjectExpression(arg) && !hasProto(arg)) {\n array.push(...arg.properties);\n } else {\n array.push(t.spreadElement(arg));\n }\n return array;\n }\n\n const value = convertAttributeValue(\n attribute.node.name.name !== \"key\"\n ? attribute.node.value || t.booleanLiteral(true)\n : attribute.node.value,\n );\n\n if (attribute.node.name.name === \"key\" && value === null) {\n throw attribute.buildCodeFrameError(\n 'Please provide an explicit key value. Using \"key\" as a shorthand for \"key={true}\" is not allowed.',\n );\n }\n\n if (\n t.isStringLiteral(value) &&\n !t.isJSXExpressionContainer(attribute.node.value)\n ) {\n value.value = value.value.replace(/\\n\\s+/g, \" \");\n\n // \"raw\" JSXText should not be used from a StringLiteral because it needs to be escaped.\n delete value.extra?.raw;\n }\n\n if (t.isJSXNamespacedName(attribute.node.name)) {\n // @ts-expect-error mutating AST\n attribute.node.name = t.stringLiteral(\n attribute.node.name.namespace.name +\n \":\" +\n attribute.node.name.name.name,\n );\n } else if (t.isValidIdentifier(attribute.node.name.name, false)) {\n // @ts-expect-error mutating AST\n attribute.node.name.type = \"Identifier\";\n } else {\n // @ts-expect-error mutating AST\n attribute.node.name = t.stringLiteral(attribute.node.name.name);\n }\n\n array.push(\n t.inherits(\n t.objectProperty(\n // @ts-expect-error The attribute.node.name is an Identifier now\n attribute.node.name,\n value,\n ),\n attribute.node,\n ),\n );\n return array;\n }\n\n function buildChildrenProperty(children: Expression[]) {\n let childrenNode;\n if (children.length === 1) {\n childrenNode = children[0];\n } else if (children.length > 1) {\n childrenNode = t.arrayExpression(children);\n } else {\n return undefined;\n }\n\n return t.objectProperty(t.identifier(\"children\"), childrenNode);\n }\n\n // Builds JSX into:\n // Production: React.jsx(type, arguments, key)\n // Development: React.jsxDEV(type, arguments, key, isStaticChildren, source, self)\n function buildJSXElementCall(path: NodePath, file: PluginPass) {\n const openingPath = path.get(\"openingElement\");\n const args: t.Expression[] = [getTag(openingPath)];\n\n const attribsArray = [];\n const extracted = Object.create(null);\n\n // for React.jsx, key, __source (dev), and __self (dev) is passed in as\n // a separate argument rather than in the args object. We go through the\n // props and filter out these three keywords so we can pass them in\n // as separate arguments later\n for (const attr of openingPath.get(\"attributes\")) {\n if (attr.isJSXAttribute() && t.isJSXIdentifier(attr.node.name)) {\n const { name } = attr.node.name;\n switch (name) {\n case \"__source\":\n case \"__self\":\n if (extracted[name]) throw sourceSelfError(path, name);\n /* falls through */\n case \"key\": {\n const keyValue = convertAttributeValue(attr.node.value);\n if (keyValue === null) {\n throw attr.buildCodeFrameError(\n 'Please provide an explicit key value. Using \"key\" as a shorthand for \"key={true}\" is not allowed.',\n );\n }\n\n extracted[name] = keyValue;\n break;\n }\n default:\n attribsArray.push(attr);\n }\n } else {\n attribsArray.push(attr);\n }\n }\n\n const children = t.react.buildChildren(path.node);\n\n let attribs: t.ObjectExpression;\n\n if (attribsArray.length || children.length) {\n attribs = buildJSXOpeningElementAttributes(\n attribsArray,\n //@ts-expect-error The children here contains JSXSpreadChild,\n // which will be thrown later\n children,\n );\n } else {\n // attributes should never be null\n attribs = t.objectExpression([]);\n }\n\n args.push(attribs);\n\n if (development) {\n // isStaticChildren, __source, and __self are only used in development\n // automatically include __source and __self in this plugin\n // so we can eliminate the need for separate Babel plugins in Babel 8\n args.push(\n extracted.key ?? path.scope.buildUndefinedNode(),\n t.booleanLiteral(children.length > 1),\n );\n if (extracted.__source) {\n args.push(extracted.__source);\n if (extracted.__self) args.push(extracted.__self);\n } else if (extracted.__self) {\n args.push(path.scope.buildUndefinedNode(), extracted.__self);\n }\n } else if (extracted.key !== undefined) {\n args.push(extracted.key);\n }\n\n return call(file, children.length > 1 ? \"jsxs\" : \"jsx\", args);\n }\n\n // Builds props for React.jsx. This function adds children into the props\n // and ensures that props is always an object\n function buildJSXOpeningElementAttributes(\n attribs: NodePath[],\n children: Expression[],\n ) {\n const props = attribs.reduce(accumulateAttribute, []);\n\n // In React.jsx, children is no longer a separate argument, but passed in\n // through the argument object\n if (children?.length > 0) {\n props.push(buildChildrenProperty(children));\n }\n\n return t.objectExpression(props);\n }\n\n // Builds JSX Fragment <> into\n // Production: React.jsx(type, arguments)\n // Development: React.jsxDEV(type, { children })\n function buildJSXFragmentCall(\n path: NodePath,\n file: PluginPass,\n ) {\n const args = [get(file, \"id/fragment\")()];\n\n const children = t.react.buildChildren(path.node);\n\n args.push(\n t.objectExpression(\n children.length > 0\n ? [\n buildChildrenProperty(\n //@ts-expect-error The children here contains JSXSpreadChild,\n // which will be thrown later\n children,\n ),\n ]\n : [],\n ),\n );\n\n if (development) {\n args.push(\n path.scope.buildUndefinedNode(),\n t.booleanLiteral(children.length > 1),\n );\n }\n\n return call(file, children.length > 1 ? \"jsxs\" : \"jsx\", args);\n }\n\n // Builds JSX Fragment <> into\n // React.createElement(React.Fragment, null, ...children)\n function buildCreateElementFragmentCall(\n path: NodePath,\n file: PluginPass,\n ) {\n if (filter && !filter(path.node, file)) return;\n\n return call(file, \"createElement\", [\n get(file, \"id/fragment\")(),\n t.nullLiteral(),\n ...t.react.buildChildren(path.node),\n ]);\n }\n\n // Builds JSX into:\n // Production: React.createElement(type, arguments, children)\n // Development: React.createElement(type, arguments, children, source, self)\n function buildCreateElementCall(\n path: NodePath,\n file: PluginPass,\n ) {\n const openingPath = path.get(\"openingElement\");\n\n return call(file, \"createElement\", [\n getTag(openingPath),\n buildCreateElementOpeningElementAttributes(\n file,\n path,\n openingPath.get(\"attributes\"),\n ),\n // @ts-expect-error JSXSpreadChild has been transformed in convertAttributeValue\n ...t.react.buildChildren(path.node),\n ]);\n }\n\n function getTag(openingPath: NodePath) {\n const tagExpr = convertJSXIdentifier(\n openingPath.node.name,\n openingPath.node,\n );\n\n let tagName: string;\n if (t.isIdentifier(tagExpr)) {\n tagName = tagExpr.name;\n } else if (t.isStringLiteral(tagExpr)) {\n tagName = tagExpr.value;\n }\n\n if (t.react.isCompatTag(tagName)) {\n return t.stringLiteral(tagName);\n } else {\n return tagExpr;\n }\n }\n\n /**\n * The logic for this is quite terse. It's because we need to\n * support spread elements. We loop over all attributes,\n * breaking on spreads, we then push a new object containing\n * all prior attributes to an array for later processing.\n */\n function buildCreateElementOpeningElementAttributes(\n file: PluginPass,\n path: NodePath,\n attribs: NodePath[],\n ) {\n const runtime = get(file, \"runtime\");\n if (!process.env.BABEL_8_BREAKING) {\n if (runtime !== \"automatic\") {\n const objs = [];\n const props = attribs.reduce(accumulateAttribute, []);\n\n if (!useSpread) {\n // Convert syntax to use multiple objects instead of spread\n let start = 0;\n props.forEach((prop, i) => {\n if (t.isSpreadElement(prop)) {\n if (i > start) {\n objs.push(t.objectExpression(props.slice(start, i)));\n }\n objs.push(prop.argument);\n start = i + 1;\n }\n });\n if (props.length > start) {\n objs.push(t.objectExpression(props.slice(start)));\n }\n } else if (props.length) {\n objs.push(t.objectExpression(props));\n }\n\n if (!objs.length) {\n return t.nullLiteral();\n }\n\n if (objs.length === 1) {\n if (\n !(\n t.isSpreadElement(props[0]) &&\n // If an object expression is spread element's argument\n // it is very likely to contain __proto__ and we should stop\n // optimizing spread element\n t.isObjectExpression(props[0].argument)\n )\n ) {\n return objs[0];\n }\n }\n\n // looks like we have multiple objects\n if (!t.isObjectExpression(objs[0])) {\n objs.unshift(t.objectExpression([]));\n }\n\n const helper = useBuiltIns\n ? t.memberExpression(t.identifier(\"Object\"), t.identifier(\"assign\"))\n : file.addHelper(\"extends\");\n\n // spread it\n return t.callExpression(helper, objs);\n }\n }\n\n const props: ObjectExpression[\"properties\"] = [];\n const found = Object.create(null);\n\n for (const attr of attribs) {\n const { node } = attr;\n const name =\n t.isJSXAttribute(node) &&\n t.isJSXIdentifier(node.name) &&\n node.name.name;\n\n if (\n runtime === \"automatic\" &&\n (name === \"__source\" || name === \"__self\")\n ) {\n if (found[name]) throw sourceSelfError(path, name);\n found[name] = true;\n }\n\n accumulateAttribute(props, attr);\n }\n\n return props.length === 1 &&\n t.isSpreadElement(props[0]) &&\n // If an object expression is spread element's argument\n // it is very likely to contain __proto__ and we should stop\n // optimizing spread element\n !t.isObjectExpression(props[0].argument)\n ? props[0].argument\n : props.length > 0\n ? t.objectExpression(props)\n : t.nullLiteral();\n }\n });\n\n function getSource(source: string, importName: string) {\n switch (importName) {\n case \"Fragment\":\n return `${source}/${development ? \"jsx-dev-runtime\" : \"jsx-runtime\"}`;\n case \"jsxDEV\":\n return `${source}/jsx-dev-runtime`;\n case \"jsx\":\n case \"jsxs\":\n return `${source}/jsx-runtime`;\n case \"createElement\":\n return source;\n }\n }\n\n function createImportLazily(\n pass: PluginPass,\n path: NodePath,\n importName: string,\n source: string,\n ): () => Identifier | MemberExpression {\n return () => {\n const actualSource = getSource(source, importName);\n if (isModule(path)) {\n let reference = get(pass, `imports/${importName}`);\n if (reference) return t.cloneNode(reference);\n\n reference = addNamed(path, importName, actualSource, {\n importedInterop: \"uncompiled\",\n importPosition: \"after\",\n });\n set(pass, `imports/${importName}`, reference);\n\n return reference;\n } else {\n let reference = get(pass, `requires/${actualSource}`);\n if (reference) {\n reference = t.cloneNode(reference);\n } else {\n reference = addNamespace(path, actualSource, {\n importedInterop: \"uncompiled\",\n });\n set(pass, `requires/${actualSource}`, reference);\n }\n\n return t.memberExpression(reference, t.identifier(importName));\n }\n };\n }\n}\n\nfunction toMemberExpression(id: string): Identifier | MemberExpression {\n return (\n id\n .split(\".\")\n .map(name => t.identifier(name))\n // @ts-expect-error - The Array#reduce does not have a signature\n // where the type of initial value differs from callback return type\n .reduce((object, property) => t.memberExpression(object, property))\n );\n}\n\nfunction makeSource(path: NodePath, state: PluginPass) {\n const location = path.node.loc;\n if (!location) {\n // the element was generated and doesn't have location information\n return path.scope.buildUndefinedNode();\n }\n\n // @ts-expect-error todo: avoid mutating PluginPass\n if (!state.fileNameIdentifier) {\n const { filename = \"\" } = state;\n\n const fileNameIdentifier = path.scope.generateUidIdentifier(\"_jsxFileName\");\n path.scope.getProgramParent().push({\n id: fileNameIdentifier,\n init: t.stringLiteral(filename),\n });\n // @ts-expect-error todo: avoid mutating PluginPass\n state.fileNameIdentifier = fileNameIdentifier;\n }\n\n return makeTrace(\n t.cloneNode(\n // @ts-expect-error todo: avoid mutating PluginPass\n state.fileNameIdentifier,\n ),\n location.start.line,\n location.start.column,\n );\n}\n\nfunction makeTrace(\n fileNameIdentifier: Identifier,\n lineNumber?: number,\n column0Based?: number,\n) {\n const fileLineLiteral =\n lineNumber != null ? t.numericLiteral(lineNumber) : t.nullLiteral();\n\n const fileColumnLiteral =\n column0Based != null ? t.numericLiteral(column0Based + 1) : t.nullLiteral();\n\n return template.expression.ast`{\n fileName: ${fileNameIdentifier},\n lineNumber: ${fileLineLiteral},\n columnNumber: ${fileColumnLiteral},\n }`;\n}\n\nfunction sourceSelfError(path: NodePath, name: string) {\n const pluginName = `transform-react-jsx-${name.slice(2)}`;\n\n return path.buildCodeFrameError(\n `Duplicate ${name} prop found. You are most likely using the deprecated ${pluginName} Babel plugin. Both __source and __self are automatically set when using the automatic runtime. Please remove transform-react-jsx-source and transform-react-jsx-self from your Babel config.`,\n );\n}\n","/* eslint-disable @babel/development/plugin-name */\n\nimport createPlugin from \"./create-plugin.ts\";\n\nexport default createPlugin({\n name: \"transform-react-jsx\",\n development: false,\n});\n\nexport type { Options } from \"./create-plugin.ts\";\n","import { declare } from \"@babel/helper-plugin-utils\";\nimport helper from \"@babel/helper-builder-react-jsx\";\nimport { types as t } from \"@babel/core\";\n\nexport default declare(api => {\n api.assertVersion(REQUIRED_VERSION(7));\n\n return {\n name: \"transform-react-jsx-compat\",\n\n manipulateOptions(_, parserOpts) {\n parserOpts.plugins.push(\"jsx\");\n },\n\n visitor: helper({\n pre(state) {\n state.callee = state.tagExpr;\n },\n\n post(state) {\n if (t.react.isCompatTag(state.tagName)) {\n state.call = t.callExpression(\n t.memberExpression(\n t.memberExpression(t.identifier(\"React\"), t.identifier(\"DOM\")),\n state.tagExpr,\n t.isLiteral(state.tagExpr),\n ),\n state.args,\n );\n }\n },\n compat: true,\n }),\n };\n});\n","import createPlugin from \"./create-plugin.ts\";\n\nexport default createPlugin({\n name: \"transform-react-jsx/development\",\n development: true,\n});\n","/**\n * This adds a __self={this} JSX attribute to all JSX elements, which React will use\n * to generate some runtime warnings. However, if the JSX element appears within a\n * constructor of a derived class, `__self={this}` will not be inserted in order to\n * prevent runtime errors.\n *\n * == JSX Literals ==\n *\n * \n *\n * becomes:\n *\n * \n */\nimport { declare } from \"@babel/helper-plugin-utils\";\nimport { types as t } from \"@babel/core\";\nimport type { Visitor, NodePath } from \"@babel/core\";\n\nconst TRACE_ID = \"__self\";\n\n/**\n * Finds the closest parent function that provides `this`. Specifically, this looks for\n * the first parent function that isn't an arrow function.\n *\n * Derived from `Scope#getFunctionParent`\n */\nfunction getThisFunctionParent(\n path: NodePath,\n): NodePath> | null {\n let scope = path.scope;\n do {\n const { path } = scope;\n if (path.isFunctionParent() && !path.isArrowFunctionExpression()) {\n return path;\n }\n } while ((scope = scope.parent));\n return null;\n}\n\n/**\n * Returns whether the class has specified a superclass.\n */\nfunction isDerivedClass(classPath: NodePath) {\n return classPath.node.superClass !== null;\n}\n\n/**\n * Returns whether `this` is allowed at given path.\n */\nfunction isThisAllowed(path: NodePath) {\n // This specifically skips arrow functions as they do not rewrite `this`.\n const parentMethodOrFunction = getThisFunctionParent(path);\n if (parentMethodOrFunction === null) {\n // We are not in a method or function. It is fine to use `this`.\n return true;\n }\n if (!parentMethodOrFunction.isMethod()) {\n // If the closest parent is a regular function, `this` will be rebound, therefore it is fine to use `this`.\n return true;\n }\n // Current node is within a method, so we need to check if the method is a constructor.\n if (parentMethodOrFunction.node.kind !== \"constructor\") {\n // We are not in a constructor, therefore it is always fine to use `this`.\n return true;\n }\n // Now we are in a constructor. If it is a derived class, we do not reference `this`.\n return !isDerivedClass(\n parentMethodOrFunction.parentPath.parentPath as NodePath,\n );\n}\n\nexport default declare(api => {\n api.assertVersion(REQUIRED_VERSION(7));\n\n const visitor: Visitor = {\n JSXOpeningElement(path) {\n if (!isThisAllowed(path)) {\n return;\n }\n const node = path.node;\n const id = t.jsxIdentifier(TRACE_ID);\n const trace = t.thisExpression();\n\n node.attributes.push(t.jsxAttribute(id, t.jsxExpressionContainer(trace)));\n },\n };\n\n return {\n name: \"transform-react-jsx-self\",\n visitor: {\n Program(path) {\n path.traverse(visitor);\n },\n },\n };\n});\n","/**\n * This adds {fileName, lineNumber, columnNumber} annotations to JSX tags.\n *\n * NOTE: lineNumber and columnNumber are both 1-based.\n *\n * == JSX Literals ==\n *\n * \n *\n * becomes:\n *\n * var __jsxFileName = 'this/file.js';\n * \n */\nimport { declare } from \"@babel/helper-plugin-utils\";\nimport { types as t, template } from \"@babel/core\";\n\nconst TRACE_ID = \"__source\";\nconst FILE_NAME_VAR = \"_jsxFileName\";\n\nconst createNodeFromNullish = (\n val: T | null,\n fn: (val: T) => N,\n): N | t.NullLiteral => (val == null ? t.nullLiteral() : fn(val));\n\ntype State = {\n fileNameIdentifier: t.Identifier;\n};\nexport default declare(api => {\n api.assertVersion(REQUIRED_VERSION(7));\n\n function makeTrace(\n fileNameIdentifier: t.Identifier,\n { line, column }: { line: number; column: number },\n ) {\n const fileLineLiteral = createNodeFromNullish(line, t.numericLiteral);\n const fileColumnLiteral = createNodeFromNullish(column, c =>\n // c + 1 to make it 1-based instead of 0-based.\n t.numericLiteral(c + 1),\n );\n\n return template.expression.ast`{\n fileName: ${fileNameIdentifier},\n lineNumber: ${fileLineLiteral},\n columnNumber: ${fileColumnLiteral},\n }`;\n }\n\n const isSourceAttr = (attr: t.Node) =>\n t.isJSXAttribute(attr) && attr.name.name === TRACE_ID;\n\n return {\n name: \"transform-react-jsx-source\",\n visitor: {\n JSXOpeningElement(path, state) {\n const { node } = path;\n if (\n // the element was generated and doesn't have location information\n !node.loc ||\n // Already has __source\n path.node.attributes.some(isSourceAttr)\n ) {\n return;\n }\n\n if (!state.fileNameIdentifier) {\n const fileNameId = path.scope.generateUidIdentifier(FILE_NAME_VAR);\n state.fileNameIdentifier = fileNameId;\n\n path.scope.getProgramParent().push({\n id: fileNameId,\n init: t.stringLiteral(state.filename || \"\"),\n });\n }\n\n node.attributes.push(\n t.jsxAttribute(\n t.jsxIdentifier(TRACE_ID),\n t.jsxExpressionContainer(\n makeTrace(t.cloneNode(state.fileNameIdentifier), node.loc.start),\n ),\n ),\n );\n },\n },\n };\n});\n","function _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n \"default\": obj\n };\n}\nmodule.exports = _interopRequireDefault, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","\"use strict\";\n\nexports.__esModule = true;\nexports.getTypes = getTypes;\nexports.isReference = isReference;\nexports.replaceWithOrRemove = replaceWithOrRemove;\nexports.runtimeProperty = runtimeProperty;\nexports.wrapWithTypes = wrapWithTypes;\n/**\n * Copyright (c) 2014-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nvar currentTypes = null;\nfunction wrapWithTypes(types, fn) {\n return function () {\n var oldTypes = currentTypes;\n currentTypes = types;\n try {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n return fn.apply(this, args);\n } finally {\n currentTypes = oldTypes;\n }\n };\n}\nfunction getTypes() {\n return currentTypes;\n}\nfunction runtimeProperty(name) {\n var t = getTypes();\n return t.memberExpression(t.identifier(\"regeneratorRuntime\"), t.identifier(name), false);\n}\nfunction isReference(path) {\n return path.isReferenced() || path.parentPath.isAssignmentExpression({\n left: path.node\n });\n}\nfunction replaceWithOrRemove(path, replacement) {\n if (replacement) {\n path.replaceWith(replacement);\n } else {\n path.remove();\n }\n}","\"use strict\";\n\nvar util = _interopRequireWildcard(require(\"./util\"));\nfunction _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== \"function\") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }\nfunction _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== \"object\" && typeof obj !== \"function\") { return { \"default\": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== \"default\" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj[\"default\"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }\n/**\n * Copyright (c) 2014-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nvar hasOwn = Object.prototype.hasOwnProperty;\n\n// The hoist function takes a FunctionExpression or FunctionDeclaration\n// and replaces any Declaration nodes in its body with assignments, then\n// returns a VariableDeclaration containing just the names of the removed\n// declarations.\nexports.hoist = function (funPath) {\n var t = util.getTypes();\n t.assertFunction(funPath.node);\n var vars = {};\n function varDeclToExpr(_ref, includeIdentifiers) {\n var vdec = _ref.node,\n scope = _ref.scope;\n t.assertVariableDeclaration(vdec);\n // TODO assert.equal(vdec.kind, \"var\");\n var exprs = [];\n vdec.declarations.forEach(function (dec) {\n // Note: We duplicate 'dec.id' here to ensure that the variable declaration IDs don't\n // have the same 'loc' value, since that can make sourcemaps and retainLines behave poorly.\n vars[dec.id.name] = t.identifier(dec.id.name);\n\n // Remove the binding, to avoid \"duplicate declaration\" errors when it will\n // be injected again.\n scope.removeBinding(dec.id.name);\n if (dec.init) {\n exprs.push(t.assignmentExpression(\"=\", dec.id, dec.init));\n } else if (includeIdentifiers) {\n exprs.push(dec.id);\n }\n });\n if (exprs.length === 0) return null;\n if (exprs.length === 1) return exprs[0];\n return t.sequenceExpression(exprs);\n }\n funPath.get(\"body\").traverse({\n VariableDeclaration: {\n exit: function exit(path) {\n var expr = varDeclToExpr(path, false);\n if (expr === null) {\n path.remove();\n } else {\n // We don't need to traverse this expression any further because\n // there can't be any new declarations inside an expression.\n util.replaceWithOrRemove(path, t.expressionStatement(expr));\n }\n\n // Since the original node has been either removed or replaced,\n // avoid traversing it any further.\n path.skip();\n }\n },\n ForStatement: function ForStatement(path) {\n var init = path.get(\"init\");\n if (init.isVariableDeclaration()) {\n util.replaceWithOrRemove(init, varDeclToExpr(init, false));\n }\n },\n ForXStatement: function ForXStatement(path) {\n var left = path.get(\"left\");\n if (left.isVariableDeclaration()) {\n util.replaceWithOrRemove(left, varDeclToExpr(left, true));\n }\n },\n FunctionDeclaration: function FunctionDeclaration(path) {\n var node = path.node;\n vars[node.id.name] = node.id;\n var assignment = t.expressionStatement(t.assignmentExpression(\"=\", t.clone(node.id), t.functionExpression(path.scope.generateUidIdentifierBasedOnNode(node), node.params, node.body, node.generator, node.expression)));\n if (path.parentPath.isBlockStatement()) {\n // Insert the assignment form before the first statement in the\n // enclosing block.\n path.parentPath.unshiftContainer(\"body\", assignment);\n\n // Remove the function declaration now that we've inserted the\n // equivalent assignment form at the beginning of the block.\n path.remove();\n } else {\n // If the parent node is not a block statement, then we can just\n // replace the declaration with the equivalent assignment form\n // without worrying about hoisting it.\n util.replaceWithOrRemove(path, assignment);\n }\n\n // Remove the binding, to avoid \"duplicate declaration\" errors when it will\n // be injected again.\n path.scope.removeBinding(node.id.name);\n\n // Don't hoist variables out of inner functions.\n path.skip();\n },\n FunctionExpression: function FunctionExpression(path) {\n // Don't descend into nested function expressions.\n path.skip();\n },\n ArrowFunctionExpression: function ArrowFunctionExpression(path) {\n // Don't descend into nested function expressions.\n path.skip();\n }\n });\n var paramNames = {};\n funPath.get(\"params\").forEach(function (paramPath) {\n var param = paramPath.node;\n if (t.isIdentifier(param)) {\n paramNames[param.name] = param;\n } else {\n // Variables declared by destructuring parameter patterns will be\n // harmlessly re-declared.\n }\n });\n var declarations = [];\n Object.keys(vars).forEach(function (name) {\n if (!hasOwn.call(paramNames, name)) {\n declarations.push(t.variableDeclarator(vars[name], null));\n }\n });\n if (declarations.length === 0) {\n return null; // Be sure to handle this case!\n }\n\n return t.variableDeclaration(\"var\", declarations);\n};","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\nvar _assert = _interopRequireDefault(require(\"assert\"));\nvar _emit = require(\"./emit\");\nvar _util = require(\"util\");\nvar _util2 = require(\"./util\");\n/**\n * Copyright (c) 2014-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nfunction Entry() {\n _assert[\"default\"].ok(this instanceof Entry);\n}\nfunction FunctionEntry(returnLoc) {\n Entry.call(this);\n (0, _util2.getTypes)().assertLiteral(returnLoc);\n this.returnLoc = returnLoc;\n}\n(0, _util.inherits)(FunctionEntry, Entry);\nexports.FunctionEntry = FunctionEntry;\nfunction LoopEntry(breakLoc, continueLoc, label) {\n Entry.call(this);\n var t = (0, _util2.getTypes)();\n t.assertLiteral(breakLoc);\n t.assertLiteral(continueLoc);\n if (label) {\n t.assertIdentifier(label);\n } else {\n label = null;\n }\n this.breakLoc = breakLoc;\n this.continueLoc = continueLoc;\n this.label = label;\n}\n(0, _util.inherits)(LoopEntry, Entry);\nexports.LoopEntry = LoopEntry;\nfunction SwitchEntry(breakLoc) {\n Entry.call(this);\n (0, _util2.getTypes)().assertLiteral(breakLoc);\n this.breakLoc = breakLoc;\n}\n(0, _util.inherits)(SwitchEntry, Entry);\nexports.SwitchEntry = SwitchEntry;\nfunction TryEntry(firstLoc, catchEntry, finallyEntry) {\n Entry.call(this);\n var t = (0, _util2.getTypes)();\n t.assertLiteral(firstLoc);\n if (catchEntry) {\n _assert[\"default\"].ok(catchEntry instanceof CatchEntry);\n } else {\n catchEntry = null;\n }\n if (finallyEntry) {\n _assert[\"default\"].ok(finallyEntry instanceof FinallyEntry);\n } else {\n finallyEntry = null;\n }\n\n // Have to have one or the other (or both).\n _assert[\"default\"].ok(catchEntry || finallyEntry);\n this.firstLoc = firstLoc;\n this.catchEntry = catchEntry;\n this.finallyEntry = finallyEntry;\n}\n(0, _util.inherits)(TryEntry, Entry);\nexports.TryEntry = TryEntry;\nfunction CatchEntry(firstLoc, paramId) {\n Entry.call(this);\n var t = (0, _util2.getTypes)();\n t.assertLiteral(firstLoc);\n t.assertIdentifier(paramId);\n this.firstLoc = firstLoc;\n this.paramId = paramId;\n}\n(0, _util.inherits)(CatchEntry, Entry);\nexports.CatchEntry = CatchEntry;\nfunction FinallyEntry(firstLoc, afterLoc) {\n Entry.call(this);\n var t = (0, _util2.getTypes)();\n t.assertLiteral(firstLoc);\n t.assertLiteral(afterLoc);\n this.firstLoc = firstLoc;\n this.afterLoc = afterLoc;\n}\n(0, _util.inherits)(FinallyEntry, Entry);\nexports.FinallyEntry = FinallyEntry;\nfunction LabeledEntry(breakLoc, label) {\n Entry.call(this);\n var t = (0, _util2.getTypes)();\n t.assertLiteral(breakLoc);\n t.assertIdentifier(label);\n this.breakLoc = breakLoc;\n this.label = label;\n}\n(0, _util.inherits)(LabeledEntry, Entry);\nexports.LabeledEntry = LabeledEntry;\nfunction LeapManager(emitter) {\n _assert[\"default\"].ok(this instanceof LeapManager);\n _assert[\"default\"].ok(emitter instanceof _emit.Emitter);\n this.emitter = emitter;\n this.entryStack = [new FunctionEntry(emitter.finalLoc)];\n}\nvar LMp = LeapManager.prototype;\nexports.LeapManager = LeapManager;\nLMp.withEntry = function (entry, callback) {\n _assert[\"default\"].ok(entry instanceof Entry);\n this.entryStack.push(entry);\n try {\n callback.call(this.emitter);\n } finally {\n var popped = this.entryStack.pop();\n _assert[\"default\"].strictEqual(popped, entry);\n }\n};\nLMp._findLeapLocation = function (property, label) {\n for (var i = this.entryStack.length - 1; i >= 0; --i) {\n var entry = this.entryStack[i];\n var loc = entry[property];\n if (loc) {\n if (label) {\n if (entry.label && entry.label.name === label.name) {\n return loc;\n }\n } else if (entry instanceof LabeledEntry) {\n // Ignore LabeledEntry entries unless we are actually breaking to\n // a label.\n } else {\n return loc;\n }\n }\n }\n return null;\n};\nLMp.getBreakLoc = function (label) {\n return this._findLeapLocation(\"breakLoc\", label);\n};\nLMp.getContinueLoc = function (label) {\n return this._findLeapLocation(\"continueLoc\", label);\n};","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\nvar _assert = _interopRequireDefault(require(\"assert\"));\nvar _util = require(\"./util.js\");\n/**\n * Copyright (c) 2014-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nvar mMap = new WeakMap();\nfunction m(node) {\n if (!mMap.has(node)) {\n mMap.set(node, {});\n }\n return mMap.get(node);\n}\nvar hasOwn = Object.prototype.hasOwnProperty;\nfunction makePredicate(propertyName, knownTypes) {\n function onlyChildren(node) {\n var t = (0, _util.getTypes)();\n t.assertNode(node);\n\n // Assume no side effects until we find out otherwise.\n var result = false;\n function check(child) {\n if (result) {\n // Do nothing.\n } else if (Array.isArray(child)) {\n child.some(check);\n } else if (t.isNode(child)) {\n _assert[\"default\"].strictEqual(result, false);\n result = predicate(child);\n }\n return result;\n }\n var keys = t.VISITOR_KEYS[node.type];\n if (keys) {\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n var child = node[key];\n check(child);\n }\n }\n return result;\n }\n function predicate(node) {\n (0, _util.getTypes)().assertNode(node);\n var meta = m(node);\n if (hasOwn.call(meta, propertyName)) return meta[propertyName];\n\n // Certain types are \"opaque,\" which means they have no side\n // effects or leaps and we don't care about their subexpressions.\n if (hasOwn.call(opaqueTypes, node.type)) return meta[propertyName] = false;\n if (hasOwn.call(knownTypes, node.type)) return meta[propertyName] = true;\n return meta[propertyName] = onlyChildren(node);\n }\n predicate.onlyChildren = onlyChildren;\n return predicate;\n}\nvar opaqueTypes = {\n FunctionExpression: true,\n ArrowFunctionExpression: true\n};\n\n// These types potentially have side effects regardless of what side\n// effects their subexpressions have.\nvar sideEffectTypes = {\n CallExpression: true,\n // Anything could happen!\n ForInStatement: true,\n // Modifies the key variable.\n UnaryExpression: true,\n // Think delete.\n BinaryExpression: true,\n // Might invoke .toString() or .valueOf().\n AssignmentExpression: true,\n // Side-effecting by definition.\n UpdateExpression: true,\n // Updates are essentially assignments.\n NewExpression: true // Similar to CallExpression.\n};\n\n// These types are the direct cause of all leaps in control flow.\nvar leapTypes = {\n YieldExpression: true,\n BreakStatement: true,\n ContinueStatement: true,\n ReturnStatement: true,\n ThrowStatement: true\n};\n\n// All leap types are also side effect types.\nfor (var type in leapTypes) {\n if (hasOwn.call(leapTypes, type)) {\n sideEffectTypes[type] = leapTypes[type];\n }\n}\nexports.hasSideEffects = makePredicate(\"hasSideEffects\", sideEffectTypes);\nexports.containsLeap = makePredicate(\"containsLeap\", leapTypes);","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\nvar _assert = _interopRequireDefault(require(\"assert\"));\nvar leap = _interopRequireWildcard(require(\"./leap\"));\nvar meta = _interopRequireWildcard(require(\"./meta\"));\nvar util = _interopRequireWildcard(require(\"./util\"));\nfunction _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== \"function\") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }\nfunction _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== \"object\" && typeof obj !== \"function\") { return { \"default\": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== \"default\" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj[\"default\"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }\n/**\n * Copyright (c) 2014-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nvar hasOwn = Object.prototype.hasOwnProperty;\nfunction Emitter(contextId) {\n _assert[\"default\"].ok(this instanceof Emitter);\n util.getTypes().assertIdentifier(contextId);\n\n // Used to generate unique temporary names.\n this.nextTempId = 0;\n\n // In order to make sure the context object does not collide with\n // anything in the local scope, we might have to rename it, so we\n // refer to it symbolically instead of just assuming that it will be\n // called \"context\".\n this.contextId = contextId;\n\n // An append-only list of Statements that grows each time this.emit is\n // called.\n this.listing = [];\n\n // A sparse array whose keys correspond to locations in this.listing\n // that have been marked as branch/jump targets.\n this.marked = [true];\n this.insertedLocs = new Set();\n\n // The last location will be marked when this.getDispatchLoop is\n // called.\n this.finalLoc = this.loc();\n\n // A list of all leap.TryEntry statements emitted.\n this.tryEntries = [];\n\n // Each time we evaluate the body of a loop, we tell this.leapManager\n // to enter a nested loop context that determines the meaning of break\n // and continue statements therein.\n this.leapManager = new leap.LeapManager(this);\n}\nvar Ep = Emitter.prototype;\nexports.Emitter = Emitter;\n\n// Offsets into this.listing that could be used as targets for branches or\n// jumps are represented as numeric Literal nodes. This representation has\n// the amazingly convenient benefit of allowing the exact value of the\n// location to be determined at any time, even after generating code that\n// refers to the location.\n// We use 'Number.MAX_VALUE' to mark uninitialized location. We can safely do\n// so because no code can realistically have about 1.8e+308 locations before\n// hitting memory limit of the machine it's running on. For comparison, the\n// estimated number of atoms in the observable universe is around 1e+80.\nvar PENDING_LOCATION = Number.MAX_VALUE;\nEp.loc = function () {\n var l = util.getTypes().numericLiteral(PENDING_LOCATION);\n this.insertedLocs.add(l);\n return l;\n};\nEp.getInsertedLocs = function () {\n return this.insertedLocs;\n};\nEp.getContextId = function () {\n return util.getTypes().clone(this.contextId);\n};\n\n// Sets the exact value of the given location to the offset of the next\n// Statement emitted.\nEp.mark = function (loc) {\n util.getTypes().assertLiteral(loc);\n var index = this.listing.length;\n if (loc.value === PENDING_LOCATION) {\n loc.value = index;\n } else {\n // Locations can be marked redundantly, but their values cannot change\n // once set the first time.\n _assert[\"default\"].strictEqual(loc.value, index);\n }\n this.marked[index] = true;\n return loc;\n};\nEp.emit = function (node) {\n var t = util.getTypes();\n if (t.isExpression(node)) {\n node = t.expressionStatement(node);\n }\n t.assertStatement(node);\n this.listing.push(node);\n};\n\n// Shorthand for emitting assignment statements. This will come in handy\n// for assignments to temporary variables.\nEp.emitAssign = function (lhs, rhs) {\n this.emit(this.assign(lhs, rhs));\n return lhs;\n};\n\n// Shorthand for an assignment statement.\nEp.assign = function (lhs, rhs) {\n var t = util.getTypes();\n return t.expressionStatement(t.assignmentExpression(\"=\", t.cloneDeep(lhs), rhs));\n};\n\n// Convenience function for generating expressions like context.next,\n// context.sent, and context.rval.\nEp.contextProperty = function (name, computed) {\n var t = util.getTypes();\n return t.memberExpression(this.getContextId(), computed ? t.stringLiteral(name) : t.identifier(name), !!computed);\n};\n\n// Shorthand for setting context.rval and jumping to `context.stop()`.\nEp.stop = function (rval) {\n if (rval) {\n this.setReturnValue(rval);\n }\n this.jump(this.finalLoc);\n};\nEp.setReturnValue = function (valuePath) {\n util.getTypes().assertExpression(valuePath.value);\n this.emitAssign(this.contextProperty(\"rval\"), this.explodeExpression(valuePath));\n};\nEp.clearPendingException = function (tryLoc, assignee) {\n var t = util.getTypes();\n t.assertLiteral(tryLoc);\n var catchCall = t.callExpression(this.contextProperty(\"catch\", true), [t.clone(tryLoc)]);\n if (assignee) {\n this.emitAssign(assignee, catchCall);\n } else {\n this.emit(catchCall);\n }\n};\n\n// Emits code for an unconditional jump to the given location, even if the\n// exact value of the location is not yet known.\nEp.jump = function (toLoc) {\n this.emitAssign(this.contextProperty(\"next\"), toLoc);\n this.emit(util.getTypes().breakStatement());\n};\n\n// Conditional jump.\nEp.jumpIf = function (test, toLoc) {\n var t = util.getTypes();\n t.assertExpression(test);\n t.assertLiteral(toLoc);\n this.emit(t.ifStatement(test, t.blockStatement([this.assign(this.contextProperty(\"next\"), toLoc), t.breakStatement()])));\n};\n\n// Conditional jump, with the condition negated.\nEp.jumpIfNot = function (test, toLoc) {\n var t = util.getTypes();\n t.assertExpression(test);\n t.assertLiteral(toLoc);\n var negatedTest;\n if (t.isUnaryExpression(test) && test.operator === \"!\") {\n // Avoid double negation.\n negatedTest = test.argument;\n } else {\n negatedTest = t.unaryExpression(\"!\", test);\n }\n this.emit(t.ifStatement(negatedTest, t.blockStatement([this.assign(this.contextProperty(\"next\"), toLoc), t.breakStatement()])));\n};\n\n// Returns a unique MemberExpression that can be used to store and\n// retrieve temporary values. Since the object of the member expression is\n// the context object, which is presumed to coexist peacefully with all\n// other local variables, and since we just increment `nextTempId`\n// monotonically, uniqueness is assured.\nEp.makeTempVar = function () {\n return this.contextProperty(\"t\" + this.nextTempId++);\n};\nEp.getContextFunction = function (id) {\n var t = util.getTypes();\n return t.functionExpression(id || null /*Anonymous*/, [this.getContextId()], t.blockStatement([this.getDispatchLoop()]), false,\n // Not a generator anymore!\n false // Nor an expression.\n );\n};\n\n// Turns this.listing into a loop of the form\n//\n// while (1) switch (context.next) {\n// case 0:\n// ...\n// case n:\n// return context.stop();\n// }\n//\n// Each marked location in this.listing will correspond to one generated\n// case statement.\nEp.getDispatchLoop = function () {\n var self = this;\n var t = util.getTypes();\n var cases = [];\n var current;\n\n // If we encounter a break, continue, or return statement in a switch\n // case, we can skip the rest of the statements until the next case.\n var alreadyEnded = false;\n self.listing.forEach(function (stmt, i) {\n if (self.marked.hasOwnProperty(i)) {\n cases.push(t.switchCase(t.numericLiteral(i), current = []));\n alreadyEnded = false;\n }\n if (!alreadyEnded) {\n current.push(stmt);\n if (t.isCompletionStatement(stmt)) alreadyEnded = true;\n }\n });\n\n // Now that we know how many statements there will be in this.listing,\n // we can finally resolve this.finalLoc.value.\n this.finalLoc.value = this.listing.length;\n cases.push(t.switchCase(this.finalLoc, [\n // Intentionally fall through to the \"end\" case...\n ]),\n // So that the runtime can jump to the final location without having\n // to know its offset, we provide the \"end\" case as a synonym.\n t.switchCase(t.stringLiteral(\"end\"), [\n // This will check/clear both context.thrown and context.rval.\n t.returnStatement(t.callExpression(this.contextProperty(\"stop\"), []))]));\n return t.whileStatement(t.numericLiteral(1), t.switchStatement(t.assignmentExpression(\"=\", this.contextProperty(\"prev\"), this.contextProperty(\"next\")), cases));\n};\nEp.getTryLocsList = function () {\n if (this.tryEntries.length === 0) {\n // To avoid adding a needless [] to the majority of runtime.wrap\n // argument lists, force the caller to handle this case specially.\n return null;\n }\n var t = util.getTypes();\n var lastLocValue = 0;\n return t.arrayExpression(this.tryEntries.map(function (tryEntry) {\n var thisLocValue = tryEntry.firstLoc.value;\n _assert[\"default\"].ok(thisLocValue >= lastLocValue, \"try entries out of order\");\n lastLocValue = thisLocValue;\n var ce = tryEntry.catchEntry;\n var fe = tryEntry.finallyEntry;\n var locs = [tryEntry.firstLoc,\n // The null here makes a hole in the array.\n ce ? ce.firstLoc : null];\n if (fe) {\n locs[2] = fe.firstLoc;\n locs[3] = fe.afterLoc;\n }\n return t.arrayExpression(locs.map(function (loc) {\n return loc && t.clone(loc);\n }));\n }));\n};\n\n// All side effects must be realized in order.\n\n// If any subexpression harbors a leap, all subexpressions must be\n// neutered of side effects.\n\n// No destructive modification of AST nodes.\n\nEp.explode = function (path, ignoreResult) {\n var t = util.getTypes();\n var node = path.node;\n var self = this;\n t.assertNode(node);\n if (t.isDeclaration(node)) throw getDeclError(node);\n if (t.isStatement(node)) return self.explodeStatement(path);\n if (t.isExpression(node)) return self.explodeExpression(path, ignoreResult);\n switch (node.type) {\n case \"Program\":\n return path.get(\"body\").map(self.explodeStatement, self);\n case \"VariableDeclarator\":\n throw getDeclError(node);\n\n // These node types should be handled by their parent nodes\n // (ObjectExpression, SwitchStatement, and TryStatement, respectively).\n case \"Property\":\n case \"SwitchCase\":\n case \"CatchClause\":\n throw new Error(node.type + \" nodes should be handled by their parents\");\n default:\n throw new Error(\"unknown Node of type \" + JSON.stringify(node.type));\n }\n};\nfunction getDeclError(node) {\n return new Error(\"all declarations should have been transformed into \" + \"assignments before the Exploder began its work: \" + JSON.stringify(node));\n}\nEp.explodeStatement = function (path, labelId) {\n var t = util.getTypes();\n var stmt = path.node;\n var self = this;\n var before, after, head;\n t.assertStatement(stmt);\n if (labelId) {\n t.assertIdentifier(labelId);\n } else {\n labelId = null;\n }\n\n // Explode BlockStatement nodes even if they do not contain a yield,\n // because we don't want or need the curly braces.\n if (t.isBlockStatement(stmt)) {\n path.get(\"body\").forEach(function (path) {\n self.explodeStatement(path);\n });\n return;\n }\n if (!meta.containsLeap(stmt)) {\n // Technically we should be able to avoid emitting the statement\n // altogether if !meta.hasSideEffects(stmt), but that leads to\n // confusing generated code (for instance, `while (true) {}` just\n // disappears) and is probably a more appropriate job for a dedicated\n // dead code elimination pass.\n self.emit(stmt);\n return;\n }\n switch (stmt.type) {\n case \"ExpressionStatement\":\n self.explodeExpression(path.get(\"expression\"), true);\n break;\n case \"LabeledStatement\":\n after = this.loc();\n\n // Did you know you can break from any labeled block statement or\n // control structure? Well, you can! Note: when a labeled loop is\n // encountered, the leap.LabeledEntry created here will immediately\n // enclose a leap.LoopEntry on the leap manager's stack, and both\n // entries will have the same label. Though this works just fine, it\n // may seem a bit redundant. In theory, we could check here to\n // determine if stmt knows how to handle its own label; for example,\n // stmt happens to be a WhileStatement and so we know it's going to\n // establish its own LoopEntry when we explode it (below). Then this\n // LabeledEntry would be unnecessary. Alternatively, we might be\n // tempted not to pass stmt.label down into self.explodeStatement,\n // because we've handled the label here, but that's a mistake because\n // labeled loops may contain labeled continue statements, which is not\n // something we can handle in this generic case. All in all, I think a\n // little redundancy greatly simplifies the logic of this case, since\n // it's clear that we handle all possible LabeledStatements correctly\n // here, regardless of whether they interact with the leap manager\n // themselves. Also remember that labels and break/continue-to-label\n // statements are rare, and all of this logic happens at transform\n // time, so it has no additional runtime cost.\n self.leapManager.withEntry(new leap.LabeledEntry(after, stmt.label), function () {\n self.explodeStatement(path.get(\"body\"), stmt.label);\n });\n self.mark(after);\n break;\n case \"WhileStatement\":\n before = this.loc();\n after = this.loc();\n self.mark(before);\n self.jumpIfNot(self.explodeExpression(path.get(\"test\")), after);\n self.leapManager.withEntry(new leap.LoopEntry(after, before, labelId), function () {\n self.explodeStatement(path.get(\"body\"));\n });\n self.jump(before);\n self.mark(after);\n break;\n case \"DoWhileStatement\":\n var first = this.loc();\n var test = this.loc();\n after = this.loc();\n self.mark(first);\n self.leapManager.withEntry(new leap.LoopEntry(after, test, labelId), function () {\n self.explode(path.get(\"body\"));\n });\n self.mark(test);\n self.jumpIf(self.explodeExpression(path.get(\"test\")), first);\n self.mark(after);\n break;\n case \"ForStatement\":\n head = this.loc();\n var update = this.loc();\n after = this.loc();\n if (stmt.init) {\n // We pass true here to indicate that if stmt.init is an expression\n // then we do not care about its result.\n self.explode(path.get(\"init\"), true);\n }\n self.mark(head);\n if (stmt.test) {\n self.jumpIfNot(self.explodeExpression(path.get(\"test\")), after);\n } else {\n // No test means continue unconditionally.\n }\n self.leapManager.withEntry(new leap.LoopEntry(after, update, labelId), function () {\n self.explodeStatement(path.get(\"body\"));\n });\n self.mark(update);\n if (stmt.update) {\n // We pass true here to indicate that if stmt.update is an\n // expression then we do not care about its result.\n self.explode(path.get(\"update\"), true);\n }\n self.jump(head);\n self.mark(after);\n break;\n case \"TypeCastExpression\":\n return self.explodeExpression(path.get(\"expression\"));\n case \"ForInStatement\":\n head = this.loc();\n after = this.loc();\n var keyIterNextFn = self.makeTempVar();\n self.emitAssign(keyIterNextFn, t.callExpression(util.runtimeProperty(\"keys\"), [self.explodeExpression(path.get(\"right\"))]));\n self.mark(head);\n var keyInfoTmpVar = self.makeTempVar();\n self.jumpIf(t.memberExpression(t.assignmentExpression(\"=\", keyInfoTmpVar, t.callExpression(t.cloneDeep(keyIterNextFn), [])), t.identifier(\"done\"), false), after);\n self.emitAssign(stmt.left, t.memberExpression(t.cloneDeep(keyInfoTmpVar), t.identifier(\"value\"), false));\n self.leapManager.withEntry(new leap.LoopEntry(after, head, labelId), function () {\n self.explodeStatement(path.get(\"body\"));\n });\n self.jump(head);\n self.mark(after);\n break;\n case \"BreakStatement\":\n self.emitAbruptCompletion({\n type: \"break\",\n target: self.leapManager.getBreakLoc(stmt.label)\n });\n break;\n case \"ContinueStatement\":\n self.emitAbruptCompletion({\n type: \"continue\",\n target: self.leapManager.getContinueLoc(stmt.label)\n });\n break;\n case \"SwitchStatement\":\n // Always save the discriminant into a temporary variable in case the\n // test expressions overwrite values like context.sent.\n var disc = self.emitAssign(self.makeTempVar(), self.explodeExpression(path.get(\"discriminant\")));\n after = this.loc();\n var defaultLoc = this.loc();\n var condition = defaultLoc;\n var caseLocs = [];\n\n // If there are no cases, .cases might be undefined.\n var cases = stmt.cases || [];\n for (var i = cases.length - 1; i >= 0; --i) {\n var c = cases[i];\n t.assertSwitchCase(c);\n if (c.test) {\n condition = t.conditionalExpression(t.binaryExpression(\"===\", t.cloneDeep(disc), c.test), caseLocs[i] = this.loc(), condition);\n } else {\n caseLocs[i] = defaultLoc;\n }\n }\n var discriminant = path.get(\"discriminant\");\n util.replaceWithOrRemove(discriminant, condition);\n self.jump(self.explodeExpression(discriminant));\n self.leapManager.withEntry(new leap.SwitchEntry(after), function () {\n path.get(\"cases\").forEach(function (casePath) {\n var i = casePath.key;\n self.mark(caseLocs[i]);\n casePath.get(\"consequent\").forEach(function (path) {\n self.explodeStatement(path);\n });\n });\n });\n self.mark(after);\n if (defaultLoc.value === PENDING_LOCATION) {\n self.mark(defaultLoc);\n _assert[\"default\"].strictEqual(after.value, defaultLoc.value);\n }\n break;\n case \"IfStatement\":\n var elseLoc = stmt.alternate && this.loc();\n after = this.loc();\n self.jumpIfNot(self.explodeExpression(path.get(\"test\")), elseLoc || after);\n self.explodeStatement(path.get(\"consequent\"));\n if (elseLoc) {\n self.jump(after);\n self.mark(elseLoc);\n self.explodeStatement(path.get(\"alternate\"));\n }\n self.mark(after);\n break;\n case \"ReturnStatement\":\n self.emitAbruptCompletion({\n type: \"return\",\n value: self.explodeExpression(path.get(\"argument\"))\n });\n break;\n case \"WithStatement\":\n throw new Error(\"WithStatement not supported in generator functions.\");\n case \"TryStatement\":\n after = this.loc();\n var handler = stmt.handler;\n var catchLoc = handler && this.loc();\n var catchEntry = catchLoc && new leap.CatchEntry(catchLoc, handler.param);\n var finallyLoc = stmt.finalizer && this.loc();\n var finallyEntry = finallyLoc && new leap.FinallyEntry(finallyLoc, after);\n var tryEntry = new leap.TryEntry(self.getUnmarkedCurrentLoc(), catchEntry, finallyEntry);\n self.tryEntries.push(tryEntry);\n self.updateContextPrevLoc(tryEntry.firstLoc);\n self.leapManager.withEntry(tryEntry, function () {\n self.explodeStatement(path.get(\"block\"));\n if (catchLoc) {\n if (finallyLoc) {\n // If we have both a catch block and a finally block, then\n // because we emit the catch block first, we need to jump over\n // it to the finally block.\n self.jump(finallyLoc);\n } else {\n // If there is no finally block, then we need to jump over the\n // catch block to the fall-through location.\n self.jump(after);\n }\n self.updateContextPrevLoc(self.mark(catchLoc));\n var bodyPath = path.get(\"handler.body\");\n var safeParam = self.makeTempVar();\n self.clearPendingException(tryEntry.firstLoc, safeParam);\n bodyPath.traverse(catchParamVisitor, {\n getSafeParam: function getSafeParam() {\n return t.cloneDeep(safeParam);\n },\n catchParamName: handler.param.name\n });\n self.leapManager.withEntry(catchEntry, function () {\n self.explodeStatement(bodyPath);\n });\n }\n if (finallyLoc) {\n self.updateContextPrevLoc(self.mark(finallyLoc));\n self.leapManager.withEntry(finallyEntry, function () {\n self.explodeStatement(path.get(\"finalizer\"));\n });\n self.emit(t.returnStatement(t.callExpression(self.contextProperty(\"finish\"), [finallyEntry.firstLoc])));\n }\n });\n self.mark(after);\n break;\n case \"ThrowStatement\":\n self.emit(t.throwStatement(self.explodeExpression(path.get(\"argument\"))));\n break;\n case \"ClassDeclaration\":\n self.emit(self.explodeClass(path));\n break;\n default:\n throw new Error(\"unknown Statement of type \" + JSON.stringify(stmt.type));\n }\n};\nvar catchParamVisitor = {\n Identifier: function Identifier(path, state) {\n if (path.node.name === state.catchParamName && util.isReference(path)) {\n util.replaceWithOrRemove(path, state.getSafeParam());\n }\n },\n Scope: function Scope(path, state) {\n if (path.scope.hasOwnBinding(state.catchParamName)) {\n // Don't descend into nested scopes that shadow the catch\n // parameter with their own declarations.\n path.skip();\n }\n }\n};\nEp.emitAbruptCompletion = function (record) {\n if (!isValidCompletion(record)) {\n _assert[\"default\"].ok(false, \"invalid completion record: \" + JSON.stringify(record));\n }\n _assert[\"default\"].notStrictEqual(record.type, \"normal\", \"normal completions are not abrupt\");\n var t = util.getTypes();\n var abruptArgs = [t.stringLiteral(record.type)];\n if (record.type === \"break\" || record.type === \"continue\") {\n t.assertLiteral(record.target);\n abruptArgs[1] = this.insertedLocs.has(record.target) ? record.target : t.cloneDeep(record.target);\n } else if (record.type === \"return\" || record.type === \"throw\") {\n if (record.value) {\n t.assertExpression(record.value);\n abruptArgs[1] = this.insertedLocs.has(record.value) ? record.value : t.cloneDeep(record.value);\n }\n }\n this.emit(t.returnStatement(t.callExpression(this.contextProperty(\"abrupt\"), abruptArgs)));\n};\nfunction isValidCompletion(record) {\n var type = record.type;\n if (type === \"normal\") {\n return !hasOwn.call(record, \"target\");\n }\n if (type === \"break\" || type === \"continue\") {\n return !hasOwn.call(record, \"value\") && util.getTypes().isLiteral(record.target);\n }\n if (type === \"return\" || type === \"throw\") {\n return hasOwn.call(record, \"value\") && !hasOwn.call(record, \"target\");\n }\n return false;\n}\n\n// Not all offsets into emitter.listing are potential jump targets. For\n// example, execution typically falls into the beginning of a try block\n// without jumping directly there. This method returns the current offset\n// without marking it, so that a switch case will not necessarily be\n// generated for this offset (I say \"not necessarily\" because the same\n// location might end up being marked in the process of emitting other\n// statements). There's no logical harm in marking such locations as jump\n// targets, but minimizing the number of switch cases keeps the generated\n// code shorter.\nEp.getUnmarkedCurrentLoc = function () {\n return util.getTypes().numericLiteral(this.listing.length);\n};\n\n// The context.prev property takes the value of context.next whenever we\n// evaluate the switch statement discriminant, which is generally good\n// enough for tracking the last location we jumped to, but sometimes\n// context.prev needs to be more precise, such as when we fall\n// successfully out of a try block and into a finally block without\n// jumping. This method exists to update context.prev to the freshest\n// available location. If we were implementing a full interpreter, we\n// would know the location of the current instruction with complete\n// precision at all times, but we don't have that luxury here, as it would\n// be costly and verbose to set context.prev before every statement.\nEp.updateContextPrevLoc = function (loc) {\n var t = util.getTypes();\n if (loc) {\n t.assertLiteral(loc);\n if (loc.value === PENDING_LOCATION) {\n // If an uninitialized location literal was passed in, set its value\n // to the current this.listing.length.\n loc.value = this.listing.length;\n } else {\n // Otherwise assert that the location matches the current offset.\n _assert[\"default\"].strictEqual(loc.value, this.listing.length);\n }\n } else {\n loc = this.getUnmarkedCurrentLoc();\n }\n\n // Make sure context.prev is up to date in case we fell into this try\n // statement without jumping to it. TODO Consider avoiding this\n // assignment when we know control must have jumped here.\n this.emitAssign(this.contextProperty(\"prev\"), loc);\n};\n\n// In order to save the rest of explodeExpression from a combinatorial\n// trainwreck of special cases, explodeViaTempVar is responsible for\n// deciding when a subexpression needs to be \"exploded,\" which is my\n// very technical term for emitting the subexpression as an assignment\n// to a temporary variable and the substituting the temporary variable\n// for the original subexpression. Think of exploded view diagrams, not\n// Michael Bay movies. The point of exploding subexpressions is to\n// control the precise order in which the generated code realizes the\n// side effects of those subexpressions.\nEp.explodeViaTempVar = function (tempVar, childPath, hasLeapingChildren, ignoreChildResult) {\n _assert[\"default\"].ok(!ignoreChildResult || !tempVar, \"Ignoring the result of a child expression but forcing it to \" + \"be assigned to a temporary variable?\");\n var t = util.getTypes();\n var result = this.explodeExpression(childPath, ignoreChildResult);\n if (ignoreChildResult) {\n // Side effects already emitted above.\n } else if (tempVar || hasLeapingChildren && !t.isLiteral(result)) {\n // If tempVar was provided, then the result will always be assigned\n // to it, even if the result does not otherwise need to be assigned\n // to a temporary variable. When no tempVar is provided, we have\n // the flexibility to decide whether a temporary variable is really\n // necessary. Unfortunately, in general, a temporary variable is\n // required whenever any child contains a yield expression, since it\n // is difficult to prove (at all, let alone efficiently) whether\n // this result would evaluate to the same value before and after the\n // yield (see #206). One narrow case where we can prove it doesn't\n // matter (and thus we do not need a temporary variable) is when the\n // result in question is a Literal value.\n result = this.emitAssign(tempVar || this.makeTempVar(), result);\n }\n return result;\n};\nEp.explodeExpression = function (path, ignoreResult) {\n var t = util.getTypes();\n var expr = path.node;\n if (expr) {\n t.assertExpression(expr);\n } else {\n return expr;\n }\n var self = this;\n var result; // Used optionally by several cases below.\n var after;\n function finish(expr) {\n t.assertExpression(expr);\n if (ignoreResult) {\n self.emit(expr);\n }\n return expr;\n }\n\n // If the expression does not contain a leap, then we either emit the\n // expression as a standalone statement or return it whole.\n if (!meta.containsLeap(expr)) {\n return finish(expr);\n }\n\n // If any child contains a leap (such as a yield or labeled continue or\n // break statement), then any sibling subexpressions will almost\n // certainly have to be exploded in order to maintain the order of their\n // side effects relative to the leaping child(ren).\n var hasLeapingChildren = meta.containsLeap.onlyChildren(expr);\n\n // If ignoreResult is true, then we must take full responsibility for\n // emitting the expression with all its side effects, and we should not\n // return a result.\n\n switch (expr.type) {\n case \"MemberExpression\":\n return finish(t.memberExpression(self.explodeExpression(path.get(\"object\")), expr.computed ? self.explodeViaTempVar(null, path.get(\"property\"), hasLeapingChildren) : expr.property, expr.computed));\n case \"CallExpression\":\n var calleePath = path.get(\"callee\");\n var argsPath = path.get(\"arguments\");\n var newCallee;\n var newArgs;\n var hasLeapingArgs = argsPath.some(function (argPath) {\n return meta.containsLeap(argPath.node);\n });\n var injectFirstArg = null;\n if (t.isMemberExpression(calleePath.node)) {\n if (hasLeapingArgs) {\n // If the arguments of the CallExpression contained any yield\n // expressions, then we need to be sure to evaluate the callee\n // before evaluating the arguments, but if the callee was a member\n // expression, then we must be careful that the object of the\n // member expression still gets bound to `this` for the call.\n\n var newObject = self.explodeViaTempVar(\n // Assign the exploded callee.object expression to a temporary\n // variable so that we can use it twice without reevaluating it.\n self.makeTempVar(), calleePath.get(\"object\"), hasLeapingChildren);\n var newProperty = calleePath.node.computed ? self.explodeViaTempVar(null, calleePath.get(\"property\"), hasLeapingChildren) : calleePath.node.property;\n injectFirstArg = newObject;\n newCallee = t.memberExpression(t.memberExpression(t.cloneDeep(newObject), newProperty, calleePath.node.computed), t.identifier(\"call\"), false);\n } else {\n newCallee = self.explodeExpression(calleePath);\n }\n } else {\n newCallee = self.explodeViaTempVar(null, calleePath, hasLeapingChildren);\n if (t.isMemberExpression(newCallee)) {\n // If the callee was not previously a MemberExpression, then the\n // CallExpression was \"unqualified,\" meaning its `this` object\n // should be the global object. If the exploded expression has\n // become a MemberExpression (e.g. a context property, probably a\n // temporary variable), then we need to force it to be unqualified\n // by using the (0, object.property)(...) trick; otherwise, it\n // will receive the object of the MemberExpression as its `this`\n // object.\n newCallee = t.sequenceExpression([t.numericLiteral(0), t.cloneDeep(newCallee)]);\n }\n }\n if (hasLeapingArgs) {\n newArgs = argsPath.map(function (argPath) {\n return self.explodeViaTempVar(null, argPath, hasLeapingChildren);\n });\n if (injectFirstArg) newArgs.unshift(injectFirstArg);\n newArgs = newArgs.map(function (arg) {\n return t.cloneDeep(arg);\n });\n } else {\n newArgs = path.node.arguments;\n }\n return finish(t.callExpression(newCallee, newArgs));\n case \"NewExpression\":\n return finish(t.newExpression(self.explodeViaTempVar(null, path.get(\"callee\"), hasLeapingChildren), path.get(\"arguments\").map(function (argPath) {\n return self.explodeViaTempVar(null, argPath, hasLeapingChildren);\n })));\n case \"ObjectExpression\":\n return finish(t.objectExpression(path.get(\"properties\").map(function (propPath) {\n if (propPath.isObjectProperty()) {\n return t.objectProperty(propPath.node.key, self.explodeViaTempVar(null, propPath.get(\"value\"), hasLeapingChildren), propPath.node.computed);\n } else {\n return propPath.node;\n }\n })));\n case \"ArrayExpression\":\n return finish(t.arrayExpression(path.get(\"elements\").map(function (elemPath) {\n if (!elemPath.node) {\n return null;\n }\n if (elemPath.isSpreadElement()) {\n return t.spreadElement(self.explodeViaTempVar(null, elemPath.get(\"argument\"), hasLeapingChildren));\n } else {\n return self.explodeViaTempVar(null, elemPath, hasLeapingChildren);\n }\n })));\n case \"SequenceExpression\":\n var lastIndex = expr.expressions.length - 1;\n path.get(\"expressions\").forEach(function (exprPath) {\n if (exprPath.key === lastIndex) {\n result = self.explodeExpression(exprPath, ignoreResult);\n } else {\n self.explodeExpression(exprPath, true);\n }\n });\n return result;\n case \"LogicalExpression\":\n after = this.loc();\n if (!ignoreResult) {\n result = self.makeTempVar();\n }\n var left = self.explodeViaTempVar(result, path.get(\"left\"), hasLeapingChildren);\n if (expr.operator === \"&&\") {\n self.jumpIfNot(left, after);\n } else {\n _assert[\"default\"].strictEqual(expr.operator, \"||\");\n self.jumpIf(left, after);\n }\n self.explodeViaTempVar(result, path.get(\"right\"), hasLeapingChildren, ignoreResult);\n self.mark(after);\n return result;\n case \"ConditionalExpression\":\n var elseLoc = this.loc();\n after = this.loc();\n var test = self.explodeExpression(path.get(\"test\"));\n self.jumpIfNot(test, elseLoc);\n if (!ignoreResult) {\n result = self.makeTempVar();\n }\n self.explodeViaTempVar(result, path.get(\"consequent\"), hasLeapingChildren, ignoreResult);\n self.jump(after);\n self.mark(elseLoc);\n self.explodeViaTempVar(result, path.get(\"alternate\"), hasLeapingChildren, ignoreResult);\n self.mark(after);\n return result;\n case \"UnaryExpression\":\n return finish(t.unaryExpression(expr.operator,\n // Can't (and don't need to) break up the syntax of the argument.\n // Think about delete a[b].\n self.explodeExpression(path.get(\"argument\")), !!expr.prefix));\n case \"BinaryExpression\":\n return finish(t.binaryExpression(expr.operator, self.explodeViaTempVar(null, path.get(\"left\"), hasLeapingChildren), self.explodeViaTempVar(null, path.get(\"right\"), hasLeapingChildren)));\n case \"AssignmentExpression\":\n if (expr.operator === \"=\") {\n // If this is a simple assignment, the left hand side does not need\n // to be read before the right hand side is evaluated, so we can\n // avoid the more complicated logic below.\n return finish(t.assignmentExpression(expr.operator, self.explodeExpression(path.get(\"left\")), self.explodeExpression(path.get(\"right\"))));\n }\n var lhs = self.explodeExpression(path.get(\"left\"));\n var temp = self.emitAssign(self.makeTempVar(), lhs);\n\n // For example,\n //\n // x += yield y\n //\n // becomes\n //\n // context.t0 = x\n // x = context.t0 += yield y\n //\n // so that the left-hand side expression is read before the yield.\n // Fixes https://github.com/facebook/regenerator/issues/345.\n\n return finish(t.assignmentExpression(\"=\", t.cloneDeep(lhs), t.assignmentExpression(expr.operator, t.cloneDeep(temp), self.explodeExpression(path.get(\"right\")))));\n case \"UpdateExpression\":\n return finish(t.updateExpression(expr.operator, self.explodeExpression(path.get(\"argument\")), expr.prefix));\n case \"YieldExpression\":\n after = this.loc();\n var arg = expr.argument && self.explodeExpression(path.get(\"argument\"));\n if (arg && expr.delegate) {\n var _result = self.makeTempVar();\n var _ret = t.returnStatement(t.callExpression(self.contextProperty(\"delegateYield\"), [arg, t.stringLiteral(_result.property.name), after]));\n _ret.loc = expr.loc;\n self.emit(_ret);\n self.mark(after);\n return _result;\n }\n self.emitAssign(self.contextProperty(\"next\"), after);\n var ret = t.returnStatement(t.cloneDeep(arg) || null);\n // Preserve the `yield` location so that source mappings for the statements\n // link back to the yield properly.\n ret.loc = expr.loc;\n self.emit(ret);\n self.mark(after);\n return self.contextProperty(\"sent\");\n case \"ClassExpression\":\n return finish(self.explodeClass(path));\n default:\n throw new Error(\"unknown Expression of type \" + JSON.stringify(expr.type));\n }\n};\nEp.explodeClass = function (path) {\n var explodingChildren = [];\n if (path.node.superClass) {\n explodingChildren.push(path.get(\"superClass\"));\n }\n path.get(\"body.body\").forEach(function (member) {\n if (member.node.computed) {\n explodingChildren.push(member.get(\"key\"));\n }\n });\n var hasLeapingChildren = explodingChildren.some(function (child) {\n return meta.containsLeap(child);\n });\n for (var i = 0; i < explodingChildren.length; i++) {\n var child = explodingChildren[i];\n var isLast = i === explodingChildren.length - 1;\n if (isLast) {\n child.replaceWith(this.explodeExpression(child));\n } else {\n child.replaceWith(this.explodeViaTempVar(null, child, hasLeapingChildren));\n }\n }\n return path.node;\n};","\"use strict\";\n\nexports.__esModule = true;\nexports[\"default\"] = replaceShorthandObjectMethod;\nvar util = _interopRequireWildcard(require(\"./util\"));\nfunction _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== \"function\") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }\nfunction _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== \"object\" && typeof obj !== \"function\") { return { \"default\": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== \"default\" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj[\"default\"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }\n/**\n * Copyright (c) 2014-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n// this function converts a shorthand object generator method into a normal\n// (non-shorthand) object property which is a generator function expression. for\n// example, this:\n//\n// var foo = {\n// *bar(baz) { return 5; }\n// }\n//\n// should be replaced with:\n//\n// var foo = {\n// bar: function*(baz) { return 5; }\n// }\n//\n// to do this, it clones the parameter array and the body of the object generator\n// method into a new FunctionExpression.\n//\n// this method can be passed any Function AST node path, and it will return\n// either:\n// a) the path that was passed in (iff the path did not need to be replaced) or\n// b) the path of the new FunctionExpression that was created as a replacement\n// (iff the path did need to be replaced)\n//\n// In either case, though, the caller can count on the fact that the return value\n// is a Function AST node path.\n//\n// If this function is called with an AST node path that is not a Function (or with an\n// argument that isn't an AST node path), it will throw an error.\nfunction replaceShorthandObjectMethod(path) {\n var t = util.getTypes();\n if (!path.node || !t.isFunction(path.node)) {\n throw new Error(\"replaceShorthandObjectMethod can only be called on Function AST node paths.\");\n }\n\n // this function only replaces shorthand object methods (called ObjectMethod\n // in Babel-speak).\n if (!t.isObjectMethod(path.node)) {\n return path;\n }\n\n // this function only replaces generators.\n if (!path.node.generator) {\n return path;\n }\n var parameters = path.node.params.map(function (param) {\n return t.cloneDeep(param);\n });\n var functionExpression = t.functionExpression(null,\n // id\n parameters,\n // params\n t.cloneDeep(path.node.body),\n // body\n path.node.generator, path.node.async);\n util.replaceWithOrRemove(path, t.objectProperty(t.cloneDeep(path.node.key),\n // key\n functionExpression,\n //value\n path.node.computed,\n // computed\n false // shorthand\n ));\n\n // path now refers to the ObjectProperty AST node path, but we want to return a\n // Function AST node path for the function expression we created. we know that\n // the FunctionExpression we just created is the value of the ObjectProperty,\n // so return the \"value\" path off of this path.\n return path.get(\"value\");\n}","/**\n * Copyright (c) 2014-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\nvar _assert = _interopRequireDefault(require(\"assert\"));\nvar _hoist = require(\"./hoist\");\nvar _emit = require(\"./emit\");\nvar _replaceShorthandObjectMethod = _interopRequireDefault(require(\"./replaceShorthandObjectMethod\"));\nvar util = _interopRequireWildcard(require(\"./util\"));\nfunction _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== \"function\") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }\nfunction _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== \"object\" && typeof obj !== \"function\") { return { \"default\": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== \"default\" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj[\"default\"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }\nexports.getVisitor = function (_ref) {\n var t = _ref.types;\n return {\n Method: function Method(path, state) {\n var node = path.node;\n if (!shouldRegenerate(node, state)) return;\n var container = t.functionExpression(null, [], t.cloneNode(node.body, false), node.generator, node.async);\n path.get(\"body\").set(\"body\", [t.returnStatement(t.callExpression(container, []))]);\n\n // Regardless of whether or not the wrapped function is a an async method\n // or generator the outer function should not be\n node.async = false;\n node.generator = false;\n\n // Unwrap the wrapper IIFE's environment so super and this and such still work.\n path.get(\"body.body.0.argument.callee\").unwrapFunctionEnvironment();\n },\n Function: {\n exit: util.wrapWithTypes(t, function (path, state) {\n var node = path.node;\n if (!shouldRegenerate(node, state)) return;\n\n // if this is an ObjectMethod, we need to convert it to an ObjectProperty\n path = (0, _replaceShorthandObjectMethod[\"default\"])(path);\n node = path.node;\n var contextId = path.scope.generateUidIdentifier(\"context\");\n var argsId = path.scope.generateUidIdentifier(\"args\");\n path.ensureBlock();\n var bodyBlockPath = path.get(\"body\");\n if (node.async) {\n bodyBlockPath.traverse(awaitVisitor);\n }\n bodyBlockPath.traverse(functionSentVisitor, {\n context: contextId\n });\n var outerBody = [];\n var innerBody = [];\n bodyBlockPath.get(\"body\").forEach(function (childPath) {\n var node = childPath.node;\n if (t.isExpressionStatement(node) && t.isStringLiteral(node.expression)) {\n // Babylon represents directives like \"use strict\" as elements\n // of a bodyBlockPath.node.directives array, but they could just\n // as easily be represented (by other parsers) as traditional\n // string-literal-valued expression statements, so we need to\n // handle that here. (#248)\n outerBody.push(node);\n } else if (node && node._blockHoist != null) {\n outerBody.push(node);\n } else {\n innerBody.push(node);\n }\n });\n if (outerBody.length > 0) {\n // Only replace the inner body if we actually hoisted any statements\n // to the outer body.\n bodyBlockPath.node.body = innerBody;\n }\n var outerFnExpr = getOuterFnExpr(path);\n // Note that getOuterFnExpr has the side-effect of ensuring that the\n // function has a name (so node.id will always be an Identifier), even\n // if a temporary name has to be synthesized.\n t.assertIdentifier(node.id);\n var innerFnId = t.identifier(node.id.name + \"$\");\n\n // Turn all declarations into vars, and replace the original\n // declarations with equivalent assignment expressions.\n var vars = (0, _hoist.hoist)(path);\n var context = {\n usesThis: false,\n usesArguments: false,\n getArgsId: function getArgsId() {\n return t.clone(argsId);\n }\n };\n path.traverse(argumentsThisVisitor, context);\n if (context.usesArguments) {\n vars = vars || t.variableDeclaration(\"var\", []);\n vars.declarations.push(t.variableDeclarator(t.clone(argsId), t.identifier(\"arguments\")));\n }\n var emitter = new _emit.Emitter(contextId);\n emitter.explode(path.get(\"body\"));\n if (vars && vars.declarations.length > 0) {\n outerBody.push(vars);\n }\n var wrapArgs = [emitter.getContextFunction(innerFnId)];\n var tryLocsList = emitter.getTryLocsList();\n if (node.generator) {\n wrapArgs.push(outerFnExpr);\n } else if (context.usesThis || tryLocsList || node.async) {\n // Async functions that are not generators don't care about the\n // outer function because they don't need it to be marked and don't\n // inherit from its .prototype.\n wrapArgs.push(t.nullLiteral());\n }\n if (context.usesThis) {\n wrapArgs.push(t.thisExpression());\n } else if (tryLocsList || node.async) {\n wrapArgs.push(t.nullLiteral());\n }\n if (tryLocsList) {\n wrapArgs.push(tryLocsList);\n } else if (node.async) {\n wrapArgs.push(t.nullLiteral());\n }\n if (node.async) {\n // Rename any locally declared \"Promise\" variable,\n // to use the global one.\n var currentScope = path.scope;\n do {\n if (currentScope.hasOwnBinding(\"Promise\")) currentScope.rename(\"Promise\");\n } while (currentScope = currentScope.parent);\n wrapArgs.push(t.identifier(\"Promise\"));\n }\n var wrapCall = t.callExpression(util.runtimeProperty(node.async ? \"async\" : \"wrap\"), wrapArgs);\n outerBody.push(t.returnStatement(wrapCall));\n node.body = t.blockStatement(outerBody);\n // We injected a few new variable declarations (for every hoisted var),\n // so we need to add them to the scope.\n path.get(\"body.body\").forEach(function (p) {\n return p.scope.registerDeclaration(p);\n });\n var oldDirectives = bodyBlockPath.node.directives;\n if (oldDirectives) {\n // Babylon represents directives like \"use strict\" as elements of\n // a bodyBlockPath.node.directives array. (#248)\n node.body.directives = oldDirectives;\n }\n var wasGeneratorFunction = node.generator;\n if (wasGeneratorFunction) {\n node.generator = false;\n }\n if (node.async) {\n node.async = false;\n }\n if (wasGeneratorFunction && t.isExpression(node)) {\n util.replaceWithOrRemove(path, t.callExpression(util.runtimeProperty(\"mark\"), [node]));\n path.addComment(\"leading\", \"#__PURE__\");\n }\n var insertedLocs = emitter.getInsertedLocs();\n path.traverse({\n NumericLiteral: function NumericLiteral(path) {\n if (!insertedLocs.has(path.node)) {\n return;\n }\n path.replaceWith(t.numericLiteral(path.node.value));\n }\n });\n\n // Generators are processed in 'exit' handlers so that regenerator only has to run on\n // an ES5 AST, but that means traversal will not pick up newly inserted references\n // to things like 'regeneratorRuntime'. To avoid this, we explicitly requeue.\n path.requeue();\n })\n }\n };\n};\n\n// Check if a node should be transformed by regenerator\nfunction shouldRegenerate(node, state) {\n if (node.generator) {\n if (node.async) {\n // Async generator\n return state.opts.asyncGenerators !== false;\n } else {\n // Plain generator\n return state.opts.generators !== false;\n }\n } else if (node.async) {\n // Async function\n return state.opts.async !== false;\n } else {\n // Not a generator or async function.\n return false;\n }\n}\n\n// Given a NodePath for a Function, return an Expression node that can be\n// used to refer reliably to the function object from inside the function.\n// This expression is essentially a replacement for arguments.callee, with\n// the key advantage that it works in strict mode.\nfunction getOuterFnExpr(funPath) {\n var t = util.getTypes();\n var node = funPath.node;\n t.assertFunction(node);\n if (!node.id) {\n // Default-exported function declarations, and function expressions may not\n // have a name to reference, so we explicitly add one.\n node.id = funPath.scope.parent.generateUidIdentifier(\"callee\");\n }\n if (node.generator &&\n // Non-generator functions don't need to be marked.\n t.isFunctionDeclaration(node)) {\n // Return the identifier returned by runtime.mark().\n return getMarkedFunctionId(funPath);\n }\n return t.clone(node.id);\n}\nvar markInfo = new WeakMap();\nfunction getMarkInfo(node) {\n if (!markInfo.has(node)) {\n markInfo.set(node, {});\n }\n return markInfo.get(node);\n}\nfunction getMarkedFunctionId(funPath) {\n var t = util.getTypes();\n var node = funPath.node;\n t.assertIdentifier(node.id);\n var blockPath = funPath.findParent(function (path) {\n return path.isProgram() || path.isBlockStatement();\n });\n if (!blockPath) {\n return node.id;\n }\n var block = blockPath.node;\n _assert[\"default\"].ok(Array.isArray(block.body));\n var info = getMarkInfo(block);\n if (!info.decl) {\n info.decl = t.variableDeclaration(\"var\", []);\n blockPath.unshiftContainer(\"body\", info.decl);\n info.declPath = blockPath.get(\"body.0\");\n }\n _assert[\"default\"].strictEqual(info.declPath.node, info.decl);\n\n // Get a new unique identifier for our marked variable.\n var markedId = blockPath.scope.generateUidIdentifier(\"marked\");\n var markCallExp = t.callExpression(util.runtimeProperty(\"mark\"), [t.clone(node.id)]);\n var index = info.decl.declarations.push(t.variableDeclarator(markedId, markCallExp)) - 1;\n var markCallExpPath = info.declPath.get(\"declarations.\" + index + \".init\");\n _assert[\"default\"].strictEqual(markCallExpPath.node, markCallExp);\n markCallExpPath.addComment(\"leading\", \"#__PURE__\");\n return t.clone(markedId);\n}\nvar argumentsThisVisitor = {\n \"FunctionExpression|FunctionDeclaration|Method\": function FunctionExpressionFunctionDeclarationMethod(path) {\n path.skip();\n },\n Identifier: function Identifier(path, state) {\n if (path.node.name === \"arguments\" && util.isReference(path)) {\n util.replaceWithOrRemove(path, state.getArgsId());\n state.usesArguments = true;\n }\n },\n ThisExpression: function ThisExpression(path, state) {\n state.usesThis = true;\n }\n};\nvar functionSentVisitor = {\n MetaProperty: function MetaProperty(path) {\n var node = path.node;\n if (node.meta.name === \"function\" && node.property.name === \"sent\") {\n var t = util.getTypes();\n util.replaceWithOrRemove(path, t.memberExpression(t.clone(this.context), t.identifier(\"_sent\")));\n }\n }\n};\nvar awaitVisitor = {\n Function: function Function(path) {\n path.skip(); // Don't descend into nested function scopes.\n },\n\n AwaitExpression: function AwaitExpression(path) {\n var t = util.getTypes();\n\n // Convert await expressions to yield expressions.\n var argument = path.node.argument;\n\n // Transforming `await x` to `yield regeneratorRuntime.awrap(x)`\n // causes the argument to be wrapped in such a way that the runtime\n // can distinguish between awaited and merely yielded values.\n util.replaceWithOrRemove(path, t.yieldExpression(t.callExpression(util.runtimeProperty(\"awrap\"), [argument]), false));\n }\n};","\"use strict\";\n\nexports.__esModule = true;\nexports[\"default\"] = _default;\nvar _visit = require(\"./visit\");\n/**\n * Copyright (c) 2014-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nfunction _default(context) {\n var plugin = {\n visitor: (0, _visit.getVisitor)(context)\n };\n\n // Some presets manually call child presets, but fail to pass along the\n // context object. Out of an abundance of caution, we verify that it\n // exists first to avoid causing unnecessary breaking changes.\n var version = context && context.version;\n\n // The \"name\" property is not allowed in older versions of Babel (6.x)\n // and will cause the plugin validator to throw an exception.\n if (version && parseInt(version, 10) >= 7) {\n plugin.name = \"regenerator-transform\";\n }\n return plugin;\n}","import { declare } from \"@babel/helper-plugin-utils\";\nimport type { types as t } from \"@babel/core\";\nimport regeneratorTransform from \"regenerator-transform\";\n\nexport default declare(({ types: t, assertVersion }) => {\n assertVersion(REQUIRED_VERSION(7));\n\n return {\n name: \"transform-regenerator\",\n\n inherits: regeneratorTransform.default,\n\n visitor: {\n // We visit CallExpression so that we always transform\n // regeneratorRuntime.*() before babel-plugin-polyfill-regenerator.\n CallExpression(path) {\n if (!process.env.BABEL_8_BREAKING) {\n if (!this.availableHelper?.(\"regeneratorRuntime\")) {\n // When using an older @babel/helpers version, fallback\n // to the old behavior.\n // TODO: Remove this in Babel 8.\n return;\n }\n }\n\n const callee = path.get(\"callee\");\n if (!callee.isMemberExpression()) return;\n\n const obj = callee.get(\"object\");\n if (obj.isIdentifier({ name: \"regeneratorRuntime\" })) {\n const helper = this.addHelper(\"regeneratorRuntime\") as\n | t.Identifier\n | t.ArrowFunctionExpression;\n\n if (!process.env.BABEL_8_BREAKING) {\n if (\n // TODO: Remove this in Babel 8, it's necessary to\n // avoid the IIFE when using older Babel versions.\n t.isArrowFunctionExpression(helper)\n ) {\n obj.replaceWith(helper.body);\n return;\n }\n }\n\n obj.replaceWith(t.callExpression(helper, []));\n }\n },\n },\n };\n});\n","import { declare } from \"@babel/helper-plugin-utils\";\nimport { types as t, type NodePath } from \"@babel/core\";\n\nexport default declare(api => {\n api.assertVersion(REQUIRED_VERSION(7));\n\n return {\n name: \"transform-reserved-words\",\n\n visitor: {\n \"BindingIdentifier|ReferencedIdentifier\"(path: NodePath) {\n if (!t.isValidES3Identifier(path.node.name)) {\n path.scope.rename(path.node.name);\n }\n },\n },\n };\n});\n","// env vars from the cli are always strings, so !!ENV_VAR returns true for \"false\"\nfunction bool(value) {\n if (value == null) return false;\n return value && value !== \"false\" && value !== \"0\";\n}\n\nmodule.exports = bool(process.env[\"BABEL_8_BREAKING\"])\n ? require(\"semver-BABEL_8_BREAKING-true\")\n : require(\"semver-BABEL_8_BREAKING-false\");\n","import semver from \"semver\";\n\nexport function hasMinVersion(\n minVersion: string,\n runtimeVersion: string | void,\n) {\n // If the range is unavailable, we're running the script during Babel's\n // build process, and we want to assume that all versions are satisfied so\n // that the built output will include all definitions.\n if (!runtimeVersion) return true;\n\n // semver.intersects() has some surprising behavior with comparing ranges\n // with pre-release versions. We add '^' to ensure that we are always\n // comparing ranges with ranges, which sidesteps this logic.\n // For example:\n //\n // semver.intersects(`<7.0.1`, \"7.0.0-beta.0\") // false - surprising\n // semver.intersects(`<7.0.1`, \"^7.0.0-beta.0\") // true - expected\n //\n // This is because the first falls back to\n //\n // semver.satisfies(\"7.0.0-beta.0\", `<7.0.1`) // false - surprising\n //\n // and this fails because a prerelease version can only satisfy a range\n // if it is a prerelease within the same major/minor/patch range.\n //\n // Note: If this is found to have issues, please also revisit the logic in\n // babel-core's availableHelper() API.\n if (semver.valid(runtimeVersion)) runtimeVersion = `^${runtimeVersion}`;\n\n return (\n !semver.intersects(`<${minVersion}`, runtimeVersion) &&\n !semver.intersects(`>=8.0.0`, runtimeVersion)\n );\n}\n","export default function (\n moduleName: string,\n dirname: string,\n absoluteRuntime: string | boolean,\n) {\n if (absoluteRuntime === false) return moduleName;\n\n resolveFSPath();\n}\n\nexport function resolveFSPath() {\n throw new Error(\n \"The 'absoluteRuntime' option is not supported when using @babel/standalone.\",\n );\n}\n","// Todo (Babel 8): remove this file as Babel 8 drop support of core-js 2\nmodule.exports = require(\"./data/corejs2-built-ins.json\");\n","\"use strict\";\n\nexports.__esModule = true;\nexports.StaticProperties = exports.InstanceProperties = exports.CommonIterators = exports.BuiltIns = void 0;\nvar _corejs2BuiltIns = _interopRequireDefault(require(\"@babel/compat-data/corejs2-built-ins\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nconst define = (name, pure, global = [], meta) => {\n return {\n name,\n pure,\n global,\n meta\n };\n};\nconst pureAndGlobal = (pure, global, minRuntimeVersion = null) => define(global[0], pure, global, {\n minRuntimeVersion\n});\nconst globalOnly = global => define(global[0], null, global);\nconst pureOnly = (pure, name) => define(name, pure, []);\nconst ArrayNatureIterators = [\"es6.object.to-string\", \"es6.array.iterator\", \"web.dom.iterable\"];\nconst CommonIterators = [\"es6.string.iterator\", ...ArrayNatureIterators];\nexports.CommonIterators = CommonIterators;\nconst PromiseDependencies = [\"es6.object.to-string\", \"es6.promise\"];\nconst BuiltIns = {\n DataView: globalOnly([\"es6.typed.data-view\"]),\n Float32Array: globalOnly([\"es6.typed.float32-array\"]),\n Float64Array: globalOnly([\"es6.typed.float64-array\"]),\n Int8Array: globalOnly([\"es6.typed.int8-array\"]),\n Int16Array: globalOnly([\"es6.typed.int16-array\"]),\n Int32Array: globalOnly([\"es6.typed.int32-array\"]),\n Map: pureAndGlobal(\"map\", [\"es6.map\", ...CommonIterators]),\n Number: globalOnly([\"es6.number.constructor\"]),\n Promise: pureAndGlobal(\"promise\", PromiseDependencies),\n RegExp: globalOnly([\"es6.regexp.constructor\"]),\n Set: pureAndGlobal(\"set\", [\"es6.set\", ...CommonIterators]),\n Symbol: pureAndGlobal(\"symbol/index\", [\"es6.symbol\"]),\n Uint8Array: globalOnly([\"es6.typed.uint8-array\"]),\n Uint8ClampedArray: globalOnly([\"es6.typed.uint8-clamped-array\"]),\n Uint16Array: globalOnly([\"es6.typed.uint16-array\"]),\n Uint32Array: globalOnly([\"es6.typed.uint32-array\"]),\n WeakMap: pureAndGlobal(\"weak-map\", [\"es6.weak-map\", ...CommonIterators]),\n WeakSet: pureAndGlobal(\"weak-set\", [\"es6.weak-set\", ...CommonIterators]),\n setImmediate: pureOnly(\"set-immediate\", \"web.immediate\"),\n clearImmediate: pureOnly(\"clear-immediate\", \"web.immediate\"),\n parseFloat: pureOnly(\"parse-float\", \"es6.parse-float\"),\n parseInt: pureOnly(\"parse-int\", \"es6.parse-int\")\n};\nexports.BuiltIns = BuiltIns;\nconst InstanceProperties = {\n __defineGetter__: globalOnly([\"es7.object.define-getter\"]),\n __defineSetter__: globalOnly([\"es7.object.define-setter\"]),\n __lookupGetter__: globalOnly([\"es7.object.lookup-getter\"]),\n __lookupSetter__: globalOnly([\"es7.object.lookup-setter\"]),\n anchor: globalOnly([\"es6.string.anchor\"]),\n big: globalOnly([\"es6.string.big\"]),\n bind: globalOnly([\"es6.function.bind\"]),\n blink: globalOnly([\"es6.string.blink\"]),\n bold: globalOnly([\"es6.string.bold\"]),\n codePointAt: globalOnly([\"es6.string.code-point-at\"]),\n copyWithin: globalOnly([\"es6.array.copy-within\"]),\n endsWith: globalOnly([\"es6.string.ends-with\"]),\n entries: globalOnly(ArrayNatureIterators),\n every: globalOnly([\"es6.array.every\"]),\n fill: globalOnly([\"es6.array.fill\"]),\n filter: globalOnly([\"es6.array.filter\"]),\n finally: globalOnly([\"es7.promise.finally\", ...PromiseDependencies]),\n find: globalOnly([\"es6.array.find\"]),\n findIndex: globalOnly([\"es6.array.find-index\"]),\n fixed: globalOnly([\"es6.string.fixed\"]),\n flags: globalOnly([\"es6.regexp.flags\"]),\n flatMap: globalOnly([\"es7.array.flat-map\"]),\n fontcolor: globalOnly([\"es6.string.fontcolor\"]),\n fontsize: globalOnly([\"es6.string.fontsize\"]),\n forEach: globalOnly([\"es6.array.for-each\"]),\n includes: globalOnly([\"es6.string.includes\", \"es7.array.includes\"]),\n indexOf: globalOnly([\"es6.array.index-of\"]),\n italics: globalOnly([\"es6.string.italics\"]),\n keys: globalOnly(ArrayNatureIterators),\n lastIndexOf: globalOnly([\"es6.array.last-index-of\"]),\n link: globalOnly([\"es6.string.link\"]),\n map: globalOnly([\"es6.array.map\"]),\n match: globalOnly([\"es6.regexp.match\"]),\n name: globalOnly([\"es6.function.name\"]),\n padStart: globalOnly([\"es7.string.pad-start\"]),\n padEnd: globalOnly([\"es7.string.pad-end\"]),\n reduce: globalOnly([\"es6.array.reduce\"]),\n reduceRight: globalOnly([\"es6.array.reduce-right\"]),\n repeat: globalOnly([\"es6.string.repeat\"]),\n replace: globalOnly([\"es6.regexp.replace\"]),\n search: globalOnly([\"es6.regexp.search\"]),\n small: globalOnly([\"es6.string.small\"]),\n some: globalOnly([\"es6.array.some\"]),\n sort: globalOnly([\"es6.array.sort\"]),\n split: globalOnly([\"es6.regexp.split\"]),\n startsWith: globalOnly([\"es6.string.starts-with\"]),\n strike: globalOnly([\"es6.string.strike\"]),\n sub: globalOnly([\"es6.string.sub\"]),\n sup: globalOnly([\"es6.string.sup\"]),\n toISOString: globalOnly([\"es6.date.to-iso-string\"]),\n toJSON: globalOnly([\"es6.date.to-json\"]),\n toString: globalOnly([\"es6.object.to-string\", \"es6.date.to-string\", \"es6.regexp.to-string\"]),\n trim: globalOnly([\"es6.string.trim\"]),\n trimEnd: globalOnly([\"es7.string.trim-right\"]),\n trimLeft: globalOnly([\"es7.string.trim-left\"]),\n trimRight: globalOnly([\"es7.string.trim-right\"]),\n trimStart: globalOnly([\"es7.string.trim-left\"]),\n values: globalOnly(ArrayNatureIterators)\n};\n\n// This isn't present in older @babel/compat-data versions\nexports.InstanceProperties = InstanceProperties;\nif (\"es6.array.slice\" in _corejs2BuiltIns.default) {\n InstanceProperties.slice = globalOnly([\"es6.array.slice\"]);\n}\nconst StaticProperties = {\n Array: {\n from: pureAndGlobal(\"array/from\", [\"es6.symbol\", \"es6.array.from\", ...CommonIterators]),\n isArray: pureAndGlobal(\"array/is-array\", [\"es6.array.is-array\"]),\n of: pureAndGlobal(\"array/of\", [\"es6.array.of\"])\n },\n Date: {\n now: pureAndGlobal(\"date/now\", [\"es6.date.now\"])\n },\n JSON: {\n stringify: pureOnly(\"json/stringify\", \"es6.symbol\")\n },\n Math: {\n // 'Math' was not included in the 7.0.0\n // release of '@babel/runtime'. See issue https://github.com/babel/babel/pull/8616.\n acosh: pureAndGlobal(\"math/acosh\", [\"es6.math.acosh\"], \"7.0.1\"),\n asinh: pureAndGlobal(\"math/asinh\", [\"es6.math.asinh\"], \"7.0.1\"),\n atanh: pureAndGlobal(\"math/atanh\", [\"es6.math.atanh\"], \"7.0.1\"),\n cbrt: pureAndGlobal(\"math/cbrt\", [\"es6.math.cbrt\"], \"7.0.1\"),\n clz32: pureAndGlobal(\"math/clz32\", [\"es6.math.clz32\"], \"7.0.1\"),\n cosh: pureAndGlobal(\"math/cosh\", [\"es6.math.cosh\"], \"7.0.1\"),\n expm1: pureAndGlobal(\"math/expm1\", [\"es6.math.expm1\"], \"7.0.1\"),\n fround: pureAndGlobal(\"math/fround\", [\"es6.math.fround\"], \"7.0.1\"),\n hypot: pureAndGlobal(\"math/hypot\", [\"es6.math.hypot\"], \"7.0.1\"),\n imul: pureAndGlobal(\"math/imul\", [\"es6.math.imul\"], \"7.0.1\"),\n log1p: pureAndGlobal(\"math/log1p\", [\"es6.math.log1p\"], \"7.0.1\"),\n log10: pureAndGlobal(\"math/log10\", [\"es6.math.log10\"], \"7.0.1\"),\n log2: pureAndGlobal(\"math/log2\", [\"es6.math.log2\"], \"7.0.1\"),\n sign: pureAndGlobal(\"math/sign\", [\"es6.math.sign\"], \"7.0.1\"),\n sinh: pureAndGlobal(\"math/sinh\", [\"es6.math.sinh\"], \"7.0.1\"),\n tanh: pureAndGlobal(\"math/tanh\", [\"es6.math.tanh\"], \"7.0.1\"),\n trunc: pureAndGlobal(\"math/trunc\", [\"es6.math.trunc\"], \"7.0.1\")\n },\n Number: {\n EPSILON: pureAndGlobal(\"number/epsilon\", [\"es6.number.epsilon\"]),\n MIN_SAFE_INTEGER: pureAndGlobal(\"number/min-safe-integer\", [\"es6.number.min-safe-integer\"]),\n MAX_SAFE_INTEGER: pureAndGlobal(\"number/max-safe-integer\", [\"es6.number.max-safe-integer\"]),\n isFinite: pureAndGlobal(\"number/is-finite\", [\"es6.number.is-finite\"]),\n isInteger: pureAndGlobal(\"number/is-integer\", [\"es6.number.is-integer\"]),\n isSafeInteger: pureAndGlobal(\"number/is-safe-integer\", [\"es6.number.is-safe-integer\"]),\n isNaN: pureAndGlobal(\"number/is-nan\", [\"es6.number.is-nan\"]),\n parseFloat: pureAndGlobal(\"number/parse-float\", [\"es6.number.parse-float\"]),\n parseInt: pureAndGlobal(\"number/parse-int\", [\"es6.number.parse-int\"])\n },\n Object: {\n assign: pureAndGlobal(\"object/assign\", [\"es6.object.assign\"]),\n create: pureAndGlobal(\"object/create\", [\"es6.object.create\"]),\n defineProperties: pureAndGlobal(\"object/define-properties\", [\"es6.object.define-properties\"]),\n defineProperty: pureAndGlobal(\"object/define-property\", [\"es6.object.define-property\"]),\n entries: pureAndGlobal(\"object/entries\", [\"es7.object.entries\"]),\n freeze: pureAndGlobal(\"object/freeze\", [\"es6.object.freeze\"]),\n getOwnPropertyDescriptor: pureAndGlobal(\"object/get-own-property-descriptor\", [\"es6.object.get-own-property-descriptor\"]),\n getOwnPropertyDescriptors: pureAndGlobal(\"object/get-own-property-descriptors\", [\"es7.object.get-own-property-descriptors\"]),\n getOwnPropertyNames: pureAndGlobal(\"object/get-own-property-names\", [\"es6.object.get-own-property-names\"]),\n getOwnPropertySymbols: pureAndGlobal(\"object/get-own-property-symbols\", [\"es6.symbol\"]),\n getPrototypeOf: pureAndGlobal(\"object/get-prototype-of\", [\"es6.object.get-prototype-of\"]),\n is: pureAndGlobal(\"object/is\", [\"es6.object.is\"]),\n isExtensible: pureAndGlobal(\"object/is-extensible\", [\"es6.object.is-extensible\"]),\n isFrozen: pureAndGlobal(\"object/is-frozen\", [\"es6.object.is-frozen\"]),\n isSealed: pureAndGlobal(\"object/is-sealed\", [\"es6.object.is-sealed\"]),\n keys: pureAndGlobal(\"object/keys\", [\"es6.object.keys\"]),\n preventExtensions: pureAndGlobal(\"object/prevent-extensions\", [\"es6.object.prevent-extensions\"]),\n seal: pureAndGlobal(\"object/seal\", [\"es6.object.seal\"]),\n setPrototypeOf: pureAndGlobal(\"object/set-prototype-of\", [\"es6.object.set-prototype-of\"]),\n values: pureAndGlobal(\"object/values\", [\"es7.object.values\"])\n },\n Promise: {\n all: globalOnly(CommonIterators),\n race: globalOnly(CommonIterators)\n },\n Reflect: {\n apply: pureAndGlobal(\"reflect/apply\", [\"es6.reflect.apply\"]),\n construct: pureAndGlobal(\"reflect/construct\", [\"es6.reflect.construct\"]),\n defineProperty: pureAndGlobal(\"reflect/define-property\", [\"es6.reflect.define-property\"]),\n deleteProperty: pureAndGlobal(\"reflect/delete-property\", [\"es6.reflect.delete-property\"]),\n get: pureAndGlobal(\"reflect/get\", [\"es6.reflect.get\"]),\n getOwnPropertyDescriptor: pureAndGlobal(\"reflect/get-own-property-descriptor\", [\"es6.reflect.get-own-property-descriptor\"]),\n getPrototypeOf: pureAndGlobal(\"reflect/get-prototype-of\", [\"es6.reflect.get-prototype-of\"]),\n has: pureAndGlobal(\"reflect/has\", [\"es6.reflect.has\"]),\n isExtensible: pureAndGlobal(\"reflect/is-extensible\", [\"es6.reflect.is-extensible\"]),\n ownKeys: pureAndGlobal(\"reflect/own-keys\", [\"es6.reflect.own-keys\"]),\n preventExtensions: pureAndGlobal(\"reflect/prevent-extensions\", [\"es6.reflect.prevent-extensions\"]),\n set: pureAndGlobal(\"reflect/set\", [\"es6.reflect.set\"]),\n setPrototypeOf: pureAndGlobal(\"reflect/set-prototype-of\", [\"es6.reflect.set-prototype-of\"])\n },\n String: {\n at: pureOnly(\"string/at\", \"es7.string.at\"),\n fromCodePoint: pureAndGlobal(\"string/from-code-point\", [\"es6.string.from-code-point\"]),\n raw: pureAndGlobal(\"string/raw\", [\"es6.string.raw\"])\n },\n Symbol: {\n // FIXME: Pure disabled to work around zloirock/core-js#262.\n asyncIterator: globalOnly([\"es6.symbol\", \"es7.symbol.async-iterator\"]),\n for: pureOnly(\"symbol/for\", \"es6.symbol\"),\n hasInstance: pureOnly(\"symbol/has-instance\", \"es6.symbol\"),\n isConcatSpreadable: pureOnly(\"symbol/is-concat-spreadable\", \"es6.symbol\"),\n iterator: define(\"es6.symbol\", \"symbol/iterator\", CommonIterators),\n keyFor: pureOnly(\"symbol/key-for\", \"es6.symbol\"),\n match: pureAndGlobal(\"symbol/match\", [\"es6.regexp.match\"]),\n replace: pureOnly(\"symbol/replace\", \"es6.symbol\"),\n search: pureOnly(\"symbol/search\", \"es6.symbol\"),\n species: pureOnly(\"symbol/species\", \"es6.symbol\"),\n split: pureOnly(\"symbol/split\", \"es6.symbol\"),\n toPrimitive: pureOnly(\"symbol/to-primitive\", \"es6.symbol\"),\n toStringTag: pureOnly(\"symbol/to-string-tag\", \"es6.symbol\"),\n unscopables: pureOnly(\"symbol/unscopables\", \"es6.symbol\")\n }\n};\nexports.StaticProperties = StaticProperties;","\"use strict\";\n\nexports.__esModule = true;\nexports.default = _default;\nfunction _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nconst webPolyfills = {\n \"web.timers\": {},\n \"web.immediate\": {},\n \"web.dom.iterable\": {}\n};\nconst purePolyfills = {\n \"es6.parse-float\": {},\n \"es6.parse-int\": {},\n \"es7.string.at\": {}\n};\nfunction _default(targets, method, polyfills) {\n const targetNames = Object.keys(targets);\n const isAnyTarget = !targetNames.length;\n const isWebTarget = targetNames.some(name => name !== \"node\");\n return _extends({}, polyfills, method === \"usage-pure\" ? purePolyfills : null, isAnyTarget || isWebTarget ? webPolyfills : null);\n}","exports = module.exports = SemVer\n\nvar debug\n/* istanbul ignore next */\nif (typeof process === 'object' &&\n process.env &&\n process.env.NODE_DEBUG &&\n /\\bsemver\\b/i.test(process.env.NODE_DEBUG)) {\n debug = function () {\n var args = Array.prototype.slice.call(arguments, 0)\n args.unshift('SEMVER')\n console.log.apply(console, args)\n }\n} else {\n debug = function () {}\n}\n\n// Note: this is the semver.org version of the spec that it implements\n// Not necessarily the package version of this code.\nexports.SEMVER_SPEC_VERSION = '2.0.0'\n\nvar MAX_LENGTH = 256\nvar MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER ||\n /* istanbul ignore next */ 9007199254740991\n\n// Max safe segment length for coercion.\nvar MAX_SAFE_COMPONENT_LENGTH = 16\n\nvar MAX_SAFE_BUILD_LENGTH = MAX_LENGTH - 6\n\n// The actual regexps go on exports.re\nvar re = exports.re = []\nvar safeRe = exports.safeRe = []\nvar src = exports.src = []\nvar t = exports.tokens = {}\nvar R = 0\n\nfunction tok (n) {\n t[n] = R++\n}\n\nvar LETTERDASHNUMBER = '[a-zA-Z0-9-]'\n\n// Replace some greedy regex tokens to prevent regex dos issues. These regex are\n// used internally via the safeRe object since all inputs in this library get\n// normalized first to trim and collapse all extra whitespace. The original\n// regexes are exported for userland consumption and lower level usage. A\n// future breaking change could export the safer regex only with a note that\n// all input should have extra whitespace removed.\nvar safeRegexReplacements = [\n ['\\\\s', 1],\n ['\\\\d', MAX_LENGTH],\n [LETTERDASHNUMBER, MAX_SAFE_BUILD_LENGTH],\n]\n\nfunction makeSafeRe (value) {\n for (var i = 0; i < safeRegexReplacements.length; i++) {\n var token = safeRegexReplacements[i][0]\n var max = safeRegexReplacements[i][1]\n value = value\n .split(token + '*').join(token + '{0,' + max + '}')\n .split(token + '+').join(token + '{1,' + max + '}')\n }\n return value\n}\n\n// The following Regular Expressions can be used for tokenizing,\n// validating, and parsing SemVer version strings.\n\n// ## Numeric Identifier\n// A single `0`, or a non-zero digit followed by zero or more digits.\n\ntok('NUMERICIDENTIFIER')\nsrc[t.NUMERICIDENTIFIER] = '0|[1-9]\\\\d*'\ntok('NUMERICIDENTIFIERLOOSE')\nsrc[t.NUMERICIDENTIFIERLOOSE] = '\\\\d+'\n\n// ## Non-numeric Identifier\n// Zero or more digits, followed by a letter or hyphen, and then zero or\n// more letters, digits, or hyphens.\n\ntok('NONNUMERICIDENTIFIER')\nsrc[t.NONNUMERICIDENTIFIER] = '\\\\d*[a-zA-Z-]' + LETTERDASHNUMBER + '*'\n\n// ## Main Version\n// Three dot-separated numeric identifiers.\n\ntok('MAINVERSION')\nsrc[t.MAINVERSION] = '(' + src[t.NUMERICIDENTIFIER] + ')\\\\.' +\n '(' + src[t.NUMERICIDENTIFIER] + ')\\\\.' +\n '(' + src[t.NUMERICIDENTIFIER] + ')'\n\ntok('MAINVERSIONLOOSE')\nsrc[t.MAINVERSIONLOOSE] = '(' + src[t.NUMERICIDENTIFIERLOOSE] + ')\\\\.' +\n '(' + src[t.NUMERICIDENTIFIERLOOSE] + ')\\\\.' +\n '(' + src[t.NUMERICIDENTIFIERLOOSE] + ')'\n\n// ## Pre-release Version Identifier\n// A numeric identifier, or a non-numeric identifier.\n\ntok('PRERELEASEIDENTIFIER')\nsrc[t.PRERELEASEIDENTIFIER] = '(?:' + src[t.NUMERICIDENTIFIER] +\n '|' + src[t.NONNUMERICIDENTIFIER] + ')'\n\ntok('PRERELEASEIDENTIFIERLOOSE')\nsrc[t.PRERELEASEIDENTIFIERLOOSE] = '(?:' + src[t.NUMERICIDENTIFIERLOOSE] +\n '|' + src[t.NONNUMERICIDENTIFIER] + ')'\n\n// ## Pre-release Version\n// Hyphen, followed by one or more dot-separated pre-release version\n// identifiers.\n\ntok('PRERELEASE')\nsrc[t.PRERELEASE] = '(?:-(' + src[t.PRERELEASEIDENTIFIER] +\n '(?:\\\\.' + src[t.PRERELEASEIDENTIFIER] + ')*))'\n\ntok('PRERELEASELOOSE')\nsrc[t.PRERELEASELOOSE] = '(?:-?(' + src[t.PRERELEASEIDENTIFIERLOOSE] +\n '(?:\\\\.' + src[t.PRERELEASEIDENTIFIERLOOSE] + ')*))'\n\n// ## Build Metadata Identifier\n// Any combination of digits, letters, or hyphens.\n\ntok('BUILDIDENTIFIER')\nsrc[t.BUILDIDENTIFIER] = LETTERDASHNUMBER + '+'\n\n// ## Build Metadata\n// Plus sign, followed by one or more period-separated build metadata\n// identifiers.\n\ntok('BUILD')\nsrc[t.BUILD] = '(?:\\\\+(' + src[t.BUILDIDENTIFIER] +\n '(?:\\\\.' + src[t.BUILDIDENTIFIER] + ')*))'\n\n// ## Full Version String\n// A main version, followed optionally by a pre-release version and\n// build metadata.\n\n// Note that the only major, minor, patch, and pre-release sections of\n// the version string are capturing groups. The build metadata is not a\n// capturing group, because it should not ever be used in version\n// comparison.\n\ntok('FULL')\ntok('FULLPLAIN')\nsrc[t.FULLPLAIN] = 'v?' + src[t.MAINVERSION] +\n src[t.PRERELEASE] + '?' +\n src[t.BUILD] + '?'\n\nsrc[t.FULL] = '^' + src[t.FULLPLAIN] + '$'\n\n// like full, but allows v1.2.3 and =1.2.3, which people do sometimes.\n// also, 1.0.0alpha1 (prerelease without the hyphen) which is pretty\n// common in the npm registry.\ntok('LOOSEPLAIN')\nsrc[t.LOOSEPLAIN] = '[v=\\\\s]*' + src[t.MAINVERSIONLOOSE] +\n src[t.PRERELEASELOOSE] + '?' +\n src[t.BUILD] + '?'\n\ntok('LOOSE')\nsrc[t.LOOSE] = '^' + src[t.LOOSEPLAIN] + '$'\n\ntok('GTLT')\nsrc[t.GTLT] = '((?:<|>)?=?)'\n\n// Something like \"2.*\" or \"1.2.x\".\n// Note that \"x.x\" is a valid xRange identifer, meaning \"any version\"\n// Only the first item is strictly required.\ntok('XRANGEIDENTIFIERLOOSE')\nsrc[t.XRANGEIDENTIFIERLOOSE] = src[t.NUMERICIDENTIFIERLOOSE] + '|x|X|\\\\*'\ntok('XRANGEIDENTIFIER')\nsrc[t.XRANGEIDENTIFIER] = src[t.NUMERICIDENTIFIER] + '|x|X|\\\\*'\n\ntok('XRANGEPLAIN')\nsrc[t.XRANGEPLAIN] = '[v=\\\\s]*(' + src[t.XRANGEIDENTIFIER] + ')' +\n '(?:\\\\.(' + src[t.XRANGEIDENTIFIER] + ')' +\n '(?:\\\\.(' + src[t.XRANGEIDENTIFIER] + ')' +\n '(?:' + src[t.PRERELEASE] + ')?' +\n src[t.BUILD] + '?' +\n ')?)?'\n\ntok('XRANGEPLAINLOOSE')\nsrc[t.XRANGEPLAINLOOSE] = '[v=\\\\s]*(' + src[t.XRANGEIDENTIFIERLOOSE] + ')' +\n '(?:\\\\.(' + src[t.XRANGEIDENTIFIERLOOSE] + ')' +\n '(?:\\\\.(' + src[t.XRANGEIDENTIFIERLOOSE] + ')' +\n '(?:' + src[t.PRERELEASELOOSE] + ')?' +\n src[t.BUILD] + '?' +\n ')?)?'\n\ntok('XRANGE')\nsrc[t.XRANGE] = '^' + src[t.GTLT] + '\\\\s*' + src[t.XRANGEPLAIN] + '$'\ntok('XRANGELOOSE')\nsrc[t.XRANGELOOSE] = '^' + src[t.GTLT] + '\\\\s*' + src[t.XRANGEPLAINLOOSE] + '$'\n\n// Coercion.\n// Extract anything that could conceivably be a part of a valid semver\ntok('COERCE')\nsrc[t.COERCE] = '(^|[^\\\\d])' +\n '(\\\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '})' +\n '(?:\\\\.(\\\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '}))?' +\n '(?:\\\\.(\\\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '}))?' +\n '(?:$|[^\\\\d])'\ntok('COERCERTL')\nre[t.COERCERTL] = new RegExp(src[t.COERCE], 'g')\nsafeRe[t.COERCERTL] = new RegExp(makeSafeRe(src[t.COERCE]), 'g')\n\n// Tilde ranges.\n// Meaning is \"reasonably at or greater than\"\ntok('LONETILDE')\nsrc[t.LONETILDE] = '(?:~>?)'\n\ntok('TILDETRIM')\nsrc[t.TILDETRIM] = '(\\\\s*)' + src[t.LONETILDE] + '\\\\s+'\nre[t.TILDETRIM] = new RegExp(src[t.TILDETRIM], 'g')\nsafeRe[t.TILDETRIM] = new RegExp(makeSafeRe(src[t.TILDETRIM]), 'g')\nvar tildeTrimReplace = '$1~'\n\ntok('TILDE')\nsrc[t.TILDE] = '^' + src[t.LONETILDE] + src[t.XRANGEPLAIN] + '$'\ntok('TILDELOOSE')\nsrc[t.TILDELOOSE] = '^' + src[t.LONETILDE] + src[t.XRANGEPLAINLOOSE] + '$'\n\n// Caret ranges.\n// Meaning is \"at least and backwards compatible with\"\ntok('LONECARET')\nsrc[t.LONECARET] = '(?:\\\\^)'\n\ntok('CARETTRIM')\nsrc[t.CARETTRIM] = '(\\\\s*)' + src[t.LONECARET] + '\\\\s+'\nre[t.CARETTRIM] = new RegExp(src[t.CARETTRIM], 'g')\nsafeRe[t.CARETTRIM] = new RegExp(makeSafeRe(src[t.CARETTRIM]), 'g')\nvar caretTrimReplace = '$1^'\n\ntok('CARET')\nsrc[t.CARET] = '^' + src[t.LONECARET] + src[t.XRANGEPLAIN] + '$'\ntok('CARETLOOSE')\nsrc[t.CARETLOOSE] = '^' + src[t.LONECARET] + src[t.XRANGEPLAINLOOSE] + '$'\n\n// A simple gt/lt/eq thing, or just \"\" to indicate \"any version\"\ntok('COMPARATORLOOSE')\nsrc[t.COMPARATORLOOSE] = '^' + src[t.GTLT] + '\\\\s*(' + src[t.LOOSEPLAIN] + ')$|^$'\ntok('COMPARATOR')\nsrc[t.COMPARATOR] = '^' + src[t.GTLT] + '\\\\s*(' + src[t.FULLPLAIN] + ')$|^$'\n\n// An expression to strip any whitespace between the gtlt and the thing\n// it modifies, so that `> 1.2.3` ==> `>1.2.3`\ntok('COMPARATORTRIM')\nsrc[t.COMPARATORTRIM] = '(\\\\s*)' + src[t.GTLT] +\n '\\\\s*(' + src[t.LOOSEPLAIN] + '|' + src[t.XRANGEPLAIN] + ')'\n\n// this one has to use the /g flag\nre[t.COMPARATORTRIM] = new RegExp(src[t.COMPARATORTRIM], 'g')\nsafeRe[t.COMPARATORTRIM] = new RegExp(makeSafeRe(src[t.COMPARATORTRIM]), 'g')\nvar comparatorTrimReplace = '$1$2$3'\n\n// Something like `1.2.3 - 1.2.4`\n// Note that these all use the loose form, because they'll be\n// checked against either the strict or loose comparator form\n// later.\ntok('HYPHENRANGE')\nsrc[t.HYPHENRANGE] = '^\\\\s*(' + src[t.XRANGEPLAIN] + ')' +\n '\\\\s+-\\\\s+' +\n '(' + src[t.XRANGEPLAIN] + ')' +\n '\\\\s*$'\n\ntok('HYPHENRANGELOOSE')\nsrc[t.HYPHENRANGELOOSE] = '^\\\\s*(' + src[t.XRANGEPLAINLOOSE] + ')' +\n '\\\\s+-\\\\s+' +\n '(' + src[t.XRANGEPLAINLOOSE] + ')' +\n '\\\\s*$'\n\n// Star ranges basically just allow anything at all.\ntok('STAR')\nsrc[t.STAR] = '(<|>)?=?\\\\s*\\\\*'\n\n// Compile to actual regexp objects.\n// All are flag-free, unless they were created above with a flag.\nfor (var i = 0; i < R; i++) {\n debug(i, src[i])\n if (!re[i]) {\n re[i] = new RegExp(src[i])\n\n // Replace all greedy whitespace to prevent regex dos issues. These regex are\n // used internally via the safeRe object since all inputs in this library get\n // normalized first to trim and collapse all extra whitespace. The original\n // regexes are exported for userland consumption and lower level usage. A\n // future breaking change could export the safer regex only with a note that\n // all input should have extra whitespace removed.\n safeRe[i] = new RegExp(makeSafeRe(src[i]))\n }\n}\n\nexports.parse = parse\nfunction parse (version, options) {\n if (!options || typeof options !== 'object') {\n options = {\n loose: !!options,\n includePrerelease: false\n }\n }\n\n if (version instanceof SemVer) {\n return version\n }\n\n if (typeof version !== 'string') {\n return null\n }\n\n if (version.length > MAX_LENGTH) {\n return null\n }\n\n var r = options.loose ? safeRe[t.LOOSE] : safeRe[t.FULL]\n if (!r.test(version)) {\n return null\n }\n\n try {\n return new SemVer(version, options)\n } catch (er) {\n return null\n }\n}\n\nexports.valid = valid\nfunction valid (version, options) {\n var v = parse(version, options)\n return v ? v.version : null\n}\n\nexports.clean = clean\nfunction clean (version, options) {\n var s = parse(version.trim().replace(/^[=v]+/, ''), options)\n return s ? s.version : null\n}\n\nexports.SemVer = SemVer\n\nfunction SemVer (version, options) {\n if (!options || typeof options !== 'object') {\n options = {\n loose: !!options,\n includePrerelease: false\n }\n }\n if (version instanceof SemVer) {\n if (version.loose === options.loose) {\n return version\n } else {\n version = version.version\n }\n } else if (typeof version !== 'string') {\n throw new TypeError('Invalid Version: ' + version)\n }\n\n if (version.length > MAX_LENGTH) {\n throw new TypeError('version is longer than ' + MAX_LENGTH + ' characters')\n }\n\n if (!(this instanceof SemVer)) {\n return new SemVer(version, options)\n }\n\n debug('SemVer', version, options)\n this.options = options\n this.loose = !!options.loose\n\n var m = version.trim().match(options.loose ? safeRe[t.LOOSE] : safeRe[t.FULL])\n\n if (!m) {\n throw new TypeError('Invalid Version: ' + version)\n }\n\n this.raw = version\n\n // these are actually numbers\n this.major = +m[1]\n this.minor = +m[2]\n this.patch = +m[3]\n\n if (this.major > MAX_SAFE_INTEGER || this.major < 0) {\n throw new TypeError('Invalid major version')\n }\n\n if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) {\n throw new TypeError('Invalid minor version')\n }\n\n if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) {\n throw new TypeError('Invalid patch version')\n }\n\n // numberify any prerelease numeric ids\n if (!m[4]) {\n this.prerelease = []\n } else {\n this.prerelease = m[4].split('.').map(function (id) {\n if (/^[0-9]+$/.test(id)) {\n var num = +id\n if (num >= 0 && num < MAX_SAFE_INTEGER) {\n return num\n }\n }\n return id\n })\n }\n\n this.build = m[5] ? m[5].split('.') : []\n this.format()\n}\n\nSemVer.prototype.format = function () {\n this.version = this.major + '.' + this.minor + '.' + this.patch\n if (this.prerelease.length) {\n this.version += '-' + this.prerelease.join('.')\n }\n return this.version\n}\n\nSemVer.prototype.toString = function () {\n return this.version\n}\n\nSemVer.prototype.compare = function (other) {\n debug('SemVer.compare', this.version, this.options, other)\n if (!(other instanceof SemVer)) {\n other = new SemVer(other, this.options)\n }\n\n return this.compareMain(other) || this.comparePre(other)\n}\n\nSemVer.prototype.compareMain = function (other) {\n if (!(other instanceof SemVer)) {\n other = new SemVer(other, this.options)\n }\n\n return compareIdentifiers(this.major, other.major) ||\n compareIdentifiers(this.minor, other.minor) ||\n compareIdentifiers(this.patch, other.patch)\n}\n\nSemVer.prototype.comparePre = function (other) {\n if (!(other instanceof SemVer)) {\n other = new SemVer(other, this.options)\n }\n\n // NOT having a prerelease is > having one\n if (this.prerelease.length && !other.prerelease.length) {\n return -1\n } else if (!this.prerelease.length && other.prerelease.length) {\n return 1\n } else if (!this.prerelease.length && !other.prerelease.length) {\n return 0\n }\n\n var i = 0\n do {\n var a = this.prerelease[i]\n var b = other.prerelease[i]\n debug('prerelease compare', i, a, b)\n if (a === undefined && b === undefined) {\n return 0\n } else if (b === undefined) {\n return 1\n } else if (a === undefined) {\n return -1\n } else if (a === b) {\n continue\n } else {\n return compareIdentifiers(a, b)\n }\n } while (++i)\n}\n\nSemVer.prototype.compareBuild = function (other) {\n if (!(other instanceof SemVer)) {\n other = new SemVer(other, this.options)\n }\n\n var i = 0\n do {\n var a = this.build[i]\n var b = other.build[i]\n debug('prerelease compare', i, a, b)\n if (a === undefined && b === undefined) {\n return 0\n } else if (b === undefined) {\n return 1\n } else if (a === undefined) {\n return -1\n } else if (a === b) {\n continue\n } else {\n return compareIdentifiers(a, b)\n }\n } while (++i)\n}\n\n// preminor will bump the version up to the next minor release, and immediately\n// down to pre-release. premajor and prepatch work the same way.\nSemVer.prototype.inc = function (release, identifier) {\n switch (release) {\n case 'premajor':\n this.prerelease.length = 0\n this.patch = 0\n this.minor = 0\n this.major++\n this.inc('pre', identifier)\n break\n case 'preminor':\n this.prerelease.length = 0\n this.patch = 0\n this.minor++\n this.inc('pre', identifier)\n break\n case 'prepatch':\n // If this is already a prerelease, it will bump to the next version\n // drop any prereleases that might already exist, since they are not\n // relevant at this point.\n this.prerelease.length = 0\n this.inc('patch', identifier)\n this.inc('pre', identifier)\n break\n // If the input is a non-prerelease version, this acts the same as\n // prepatch.\n case 'prerelease':\n if (this.prerelease.length === 0) {\n this.inc('patch', identifier)\n }\n this.inc('pre', identifier)\n break\n\n case 'major':\n // If this is a pre-major version, bump up to the same major version.\n // Otherwise increment major.\n // 1.0.0-5 bumps to 1.0.0\n // 1.1.0 bumps to 2.0.0\n if (this.minor !== 0 ||\n this.patch !== 0 ||\n this.prerelease.length === 0) {\n this.major++\n }\n this.minor = 0\n this.patch = 0\n this.prerelease = []\n break\n case 'minor':\n // If this is a pre-minor version, bump up to the same minor version.\n // Otherwise increment minor.\n // 1.2.0-5 bumps to 1.2.0\n // 1.2.1 bumps to 1.3.0\n if (this.patch !== 0 || this.prerelease.length === 0) {\n this.minor++\n }\n this.patch = 0\n this.prerelease = []\n break\n case 'patch':\n // If this is not a pre-release version, it will increment the patch.\n // If it is a pre-release it will bump up to the same patch version.\n // 1.2.0-5 patches to 1.2.0\n // 1.2.0 patches to 1.2.1\n if (this.prerelease.length === 0) {\n this.patch++\n }\n this.prerelease = []\n break\n // This probably shouldn't be used publicly.\n // 1.0.0 \"pre\" would become 1.0.0-0 which is the wrong direction.\n case 'pre':\n if (this.prerelease.length === 0) {\n this.prerelease = [0]\n } else {\n var i = this.prerelease.length\n while (--i >= 0) {\n if (typeof this.prerelease[i] === 'number') {\n this.prerelease[i]++\n i = -2\n }\n }\n if (i === -1) {\n // didn't increment anything\n this.prerelease.push(0)\n }\n }\n if (identifier) {\n // 1.2.0-beta.1 bumps to 1.2.0-beta.2,\n // 1.2.0-beta.fooblz or 1.2.0-beta bumps to 1.2.0-beta.0\n if (this.prerelease[0] === identifier) {\n if (isNaN(this.prerelease[1])) {\n this.prerelease = [identifier, 0]\n }\n } else {\n this.prerelease = [identifier, 0]\n }\n }\n break\n\n default:\n throw new Error('invalid increment argument: ' + release)\n }\n this.format()\n this.raw = this.version\n return this\n}\n\nexports.inc = inc\nfunction inc (version, release, loose, identifier) {\n if (typeof (loose) === 'string') {\n identifier = loose\n loose = undefined\n }\n\n try {\n return new SemVer(version, loose).inc(release, identifier).version\n } catch (er) {\n return null\n }\n}\n\nexports.diff = diff\nfunction diff (version1, version2) {\n if (eq(version1, version2)) {\n return null\n } else {\n var v1 = parse(version1)\n var v2 = parse(version2)\n var prefix = ''\n if (v1.prerelease.length || v2.prerelease.length) {\n prefix = 'pre'\n var defaultResult = 'prerelease'\n }\n for (var key in v1) {\n if (key === 'major' || key === 'minor' || key === 'patch') {\n if (v1[key] !== v2[key]) {\n return prefix + key\n }\n }\n }\n return defaultResult // may be undefined\n }\n}\n\nexports.compareIdentifiers = compareIdentifiers\n\nvar numeric = /^[0-9]+$/\nfunction compareIdentifiers (a, b) {\n var anum = numeric.test(a)\n var bnum = numeric.test(b)\n\n if (anum && bnum) {\n a = +a\n b = +b\n }\n\n return a === b ? 0\n : (anum && !bnum) ? -1\n : (bnum && !anum) ? 1\n : a < b ? -1\n : 1\n}\n\nexports.rcompareIdentifiers = rcompareIdentifiers\nfunction rcompareIdentifiers (a, b) {\n return compareIdentifiers(b, a)\n}\n\nexports.major = major\nfunction major (a, loose) {\n return new SemVer(a, loose).major\n}\n\nexports.minor = minor\nfunction minor (a, loose) {\n return new SemVer(a, loose).minor\n}\n\nexports.patch = patch\nfunction patch (a, loose) {\n return new SemVer(a, loose).patch\n}\n\nexports.compare = compare\nfunction compare (a, b, loose) {\n return new SemVer(a, loose).compare(new SemVer(b, loose))\n}\n\nexports.compareLoose = compareLoose\nfunction compareLoose (a, b) {\n return compare(a, b, true)\n}\n\nexports.compareBuild = compareBuild\nfunction compareBuild (a, b, loose) {\n var versionA = new SemVer(a, loose)\n var versionB = new SemVer(b, loose)\n return versionA.compare(versionB) || versionA.compareBuild(versionB)\n}\n\nexports.rcompare = rcompare\nfunction rcompare (a, b, loose) {\n return compare(b, a, loose)\n}\n\nexports.sort = sort\nfunction sort (list, loose) {\n return list.sort(function (a, b) {\n return exports.compareBuild(a, b, loose)\n })\n}\n\nexports.rsort = rsort\nfunction rsort (list, loose) {\n return list.sort(function (a, b) {\n return exports.compareBuild(b, a, loose)\n })\n}\n\nexports.gt = gt\nfunction gt (a, b, loose) {\n return compare(a, b, loose) > 0\n}\n\nexports.lt = lt\nfunction lt (a, b, loose) {\n return compare(a, b, loose) < 0\n}\n\nexports.eq = eq\nfunction eq (a, b, loose) {\n return compare(a, b, loose) === 0\n}\n\nexports.neq = neq\nfunction neq (a, b, loose) {\n return compare(a, b, loose) !== 0\n}\n\nexports.gte = gte\nfunction gte (a, b, loose) {\n return compare(a, b, loose) >= 0\n}\n\nexports.lte = lte\nfunction lte (a, b, loose) {\n return compare(a, b, loose) <= 0\n}\n\nexports.cmp = cmp\nfunction cmp (a, op, b, loose) {\n switch (op) {\n case '===':\n if (typeof a === 'object')\n a = a.version\n if (typeof b === 'object')\n b = b.version\n return a === b\n\n case '!==':\n if (typeof a === 'object')\n a = a.version\n if (typeof b === 'object')\n b = b.version\n return a !== b\n\n case '':\n case '=':\n case '==':\n return eq(a, b, loose)\n\n case '!=':\n return neq(a, b, loose)\n\n case '>':\n return gt(a, b, loose)\n\n case '>=':\n return gte(a, b, loose)\n\n case '<':\n return lt(a, b, loose)\n\n case '<=':\n return lte(a, b, loose)\n\n default:\n throw new TypeError('Invalid operator: ' + op)\n }\n}\n\nexports.Comparator = Comparator\nfunction Comparator (comp, options) {\n if (!options || typeof options !== 'object') {\n options = {\n loose: !!options,\n includePrerelease: false\n }\n }\n\n if (comp instanceof Comparator) {\n if (comp.loose === !!options.loose) {\n return comp\n } else {\n comp = comp.value\n }\n }\n\n if (!(this instanceof Comparator)) {\n return new Comparator(comp, options)\n }\n\n comp = comp.trim().split(/\\s+/).join(' ')\n debug('comparator', comp, options)\n this.options = options\n this.loose = !!options.loose\n this.parse(comp)\n\n if (this.semver === ANY) {\n this.value = ''\n } else {\n this.value = this.operator + this.semver.version\n }\n\n debug('comp', this)\n}\n\nvar ANY = {}\nComparator.prototype.parse = function (comp) {\n var r = this.options.loose ? safeRe[t.COMPARATORLOOSE] : safeRe[t.COMPARATOR]\n var m = comp.match(r)\n\n if (!m) {\n throw new TypeError('Invalid comparator: ' + comp)\n }\n\n this.operator = m[1] !== undefined ? m[1] : ''\n if (this.operator === '=') {\n this.operator = ''\n }\n\n // if it literally is just '>' or '' then allow anything.\n if (!m[2]) {\n this.semver = ANY\n } else {\n this.semver = new SemVer(m[2], this.options.loose)\n }\n}\n\nComparator.prototype.toString = function () {\n return this.value\n}\n\nComparator.prototype.test = function (version) {\n debug('Comparator.test', version, this.options.loose)\n\n if (this.semver === ANY || version === ANY) {\n return true\n }\n\n if (typeof version === 'string') {\n try {\n version = new SemVer(version, this.options)\n } catch (er) {\n return false\n }\n }\n\n return cmp(version, this.operator, this.semver, this.options)\n}\n\nComparator.prototype.intersects = function (comp, options) {\n if (!(comp instanceof Comparator)) {\n throw new TypeError('a Comparator is required')\n }\n\n if (!options || typeof options !== 'object') {\n options = {\n loose: !!options,\n includePrerelease: false\n }\n }\n\n var rangeTmp\n\n if (this.operator === '') {\n if (this.value === '') {\n return true\n }\n rangeTmp = new Range(comp.value, options)\n return satisfies(this.value, rangeTmp, options)\n } else if (comp.operator === '') {\n if (comp.value === '') {\n return true\n }\n rangeTmp = new Range(this.value, options)\n return satisfies(comp.semver, rangeTmp, options)\n }\n\n var sameDirectionIncreasing =\n (this.operator === '>=' || this.operator === '>') &&\n (comp.operator === '>=' || comp.operator === '>')\n var sameDirectionDecreasing =\n (this.operator === '<=' || this.operator === '<') &&\n (comp.operator === '<=' || comp.operator === '<')\n var sameSemVer = this.semver.version === comp.semver.version\n var differentDirectionsInclusive =\n (this.operator === '>=' || this.operator === '<=') &&\n (comp.operator === '>=' || comp.operator === '<=')\n var oppositeDirectionsLessThan =\n cmp(this.semver, '<', comp.semver, options) &&\n ((this.operator === '>=' || this.operator === '>') &&\n (comp.operator === '<=' || comp.operator === '<'))\n var oppositeDirectionsGreaterThan =\n cmp(this.semver, '>', comp.semver, options) &&\n ((this.operator === '<=' || this.operator === '<') &&\n (comp.operator === '>=' || comp.operator === '>'))\n\n return sameDirectionIncreasing || sameDirectionDecreasing ||\n (sameSemVer && differentDirectionsInclusive) ||\n oppositeDirectionsLessThan || oppositeDirectionsGreaterThan\n}\n\nexports.Range = Range\nfunction Range (range, options) {\n if (!options || typeof options !== 'object') {\n options = {\n loose: !!options,\n includePrerelease: false\n }\n }\n\n if (range instanceof Range) {\n if (range.loose === !!options.loose &&\n range.includePrerelease === !!options.includePrerelease) {\n return range\n } else {\n return new Range(range.raw, options)\n }\n }\n\n if (range instanceof Comparator) {\n return new Range(range.value, options)\n }\n\n if (!(this instanceof Range)) {\n return new Range(range, options)\n }\n\n this.options = options\n this.loose = !!options.loose\n this.includePrerelease = !!options.includePrerelease\n\n // First reduce all whitespace as much as possible so we do not have to rely\n // on potentially slow regexes like \\s*. This is then stored and used for\n // future error messages as well.\n this.raw = range\n .trim()\n .split(/\\s+/)\n .join(' ')\n\n // First, split based on boolean or ||\n this.set = this.raw.split('||').map(function (range) {\n return this.parseRange(range.trim())\n }, this).filter(function (c) {\n // throw out any that are not relevant for whatever reason\n return c.length\n })\n\n if (!this.set.length) {\n throw new TypeError('Invalid SemVer Range: ' + this.raw)\n }\n\n this.format()\n}\n\nRange.prototype.format = function () {\n this.range = this.set.map(function (comps) {\n return comps.join(' ').trim()\n }).join('||').trim()\n return this.range\n}\n\nRange.prototype.toString = function () {\n return this.range\n}\n\nRange.prototype.parseRange = function (range) {\n var loose = this.options.loose\n // `1.2.3 - 1.2.4` => `>=1.2.3 <=1.2.4`\n var hr = loose ? safeRe[t.HYPHENRANGELOOSE] : safeRe[t.HYPHENRANGE]\n range = range.replace(hr, hyphenReplace)\n debug('hyphen replace', range)\n // `> 1.2.3 < 1.2.5` => `>1.2.3 <1.2.5`\n range = range.replace(safeRe[t.COMPARATORTRIM], comparatorTrimReplace)\n debug('comparator trim', range, safeRe[t.COMPARATORTRIM])\n\n // `~ 1.2.3` => `~1.2.3`\n range = range.replace(safeRe[t.TILDETRIM], tildeTrimReplace)\n\n // `^ 1.2.3` => `^1.2.3`\n range = range.replace(safeRe[t.CARETTRIM], caretTrimReplace)\n\n // normalize spaces\n range = range.split(/\\s+/).join(' ')\n\n // At this point, the range is completely trimmed and\n // ready to be split into comparators.\n\n var compRe = loose ? safeRe[t.COMPARATORLOOSE] : safeRe[t.COMPARATOR]\n var set = range.split(' ').map(function (comp) {\n return parseComparator(comp, this.options)\n }, this).join(' ').split(/\\s+/)\n if (this.options.loose) {\n // in loose mode, throw out any that are not valid comparators\n set = set.filter(function (comp) {\n return !!comp.match(compRe)\n })\n }\n set = set.map(function (comp) {\n return new Comparator(comp, this.options)\n }, this)\n\n return set\n}\n\nRange.prototype.intersects = function (range, options) {\n if (!(range instanceof Range)) {\n throw new TypeError('a Range is required')\n }\n\n return this.set.some(function (thisComparators) {\n return (\n isSatisfiable(thisComparators, options) &&\n range.set.some(function (rangeComparators) {\n return (\n isSatisfiable(rangeComparators, options) &&\n thisComparators.every(function (thisComparator) {\n return rangeComparators.every(function (rangeComparator) {\n return thisComparator.intersects(rangeComparator, options)\n })\n })\n )\n })\n )\n })\n}\n\n// take a set of comparators and determine whether there\n// exists a version which can satisfy it\nfunction isSatisfiable (comparators, options) {\n var result = true\n var remainingComparators = comparators.slice()\n var testComparator = remainingComparators.pop()\n\n while (result && remainingComparators.length) {\n result = remainingComparators.every(function (otherComparator) {\n return testComparator.intersects(otherComparator, options)\n })\n\n testComparator = remainingComparators.pop()\n }\n\n return result\n}\n\n// Mostly just for testing and legacy API reasons\nexports.toComparators = toComparators\nfunction toComparators (range, options) {\n return new Range(range, options).set.map(function (comp) {\n return comp.map(function (c) {\n return c.value\n }).join(' ').trim().split(' ')\n })\n}\n\n// comprised of xranges, tildes, stars, and gtlt's at this point.\n// already replaced the hyphen ranges\n// turn into a set of JUST comparators.\nfunction parseComparator (comp, options) {\n debug('comp', comp, options)\n comp = replaceCarets(comp, options)\n debug('caret', comp)\n comp = replaceTildes(comp, options)\n debug('tildes', comp)\n comp = replaceXRanges(comp, options)\n debug('xrange', comp)\n comp = replaceStars(comp, options)\n debug('stars', comp)\n return comp\n}\n\nfunction isX (id) {\n return !id || id.toLowerCase() === 'x' || id === '*'\n}\n\n// ~, ~> --> * (any, kinda silly)\n// ~2, ~2.x, ~2.x.x, ~>2, ~>2.x ~>2.x.x --> >=2.0.0 <3.0.0\n// ~2.0, ~2.0.x, ~>2.0, ~>2.0.x --> >=2.0.0 <2.1.0\n// ~1.2, ~1.2.x, ~>1.2, ~>1.2.x --> >=1.2.0 <1.3.0\n// ~1.2.3, ~>1.2.3 --> >=1.2.3 <1.3.0\n// ~1.2.0, ~>1.2.0 --> >=1.2.0 <1.3.0\nfunction replaceTildes (comp, options) {\n return comp.trim().split(/\\s+/).map(function (comp) {\n return replaceTilde(comp, options)\n }).join(' ')\n}\n\nfunction replaceTilde (comp, options) {\n var r = options.loose ? safeRe[t.TILDELOOSE] : safeRe[t.TILDE]\n return comp.replace(r, function (_, M, m, p, pr) {\n debug('tilde', comp, _, M, m, p, pr)\n var ret\n\n if (isX(M)) {\n ret = ''\n } else if (isX(m)) {\n ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0'\n } else if (isX(p)) {\n // ~1.2 == >=1.2.0 <1.3.0\n ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0'\n } else if (pr) {\n debug('replaceTilde pr', pr)\n ret = '>=' + M + '.' + m + '.' + p + '-' + pr +\n ' <' + M + '.' + (+m + 1) + '.0'\n } else {\n // ~1.2.3 == >=1.2.3 <1.3.0\n ret = '>=' + M + '.' + m + '.' + p +\n ' <' + M + '.' + (+m + 1) + '.0'\n }\n\n debug('tilde return', ret)\n return ret\n })\n}\n\n// ^ --> * (any, kinda silly)\n// ^2, ^2.x, ^2.x.x --> >=2.0.0 <3.0.0\n// ^2.0, ^2.0.x --> >=2.0.0 <3.0.0\n// ^1.2, ^1.2.x --> >=1.2.0 <2.0.0\n// ^1.2.3 --> >=1.2.3 <2.0.0\n// ^1.2.0 --> >=1.2.0 <2.0.0\nfunction replaceCarets (comp, options) {\n return comp.trim().split(/\\s+/).map(function (comp) {\n return replaceCaret(comp, options)\n }).join(' ')\n}\n\nfunction replaceCaret (comp, options) {\n debug('caret', comp, options)\n var r = options.loose ? safeRe[t.CARETLOOSE] : safeRe[t.CARET]\n return comp.replace(r, function (_, M, m, p, pr) {\n debug('caret', comp, _, M, m, p, pr)\n var ret\n\n if (isX(M)) {\n ret = ''\n } else if (isX(m)) {\n ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0'\n } else if (isX(p)) {\n if (M === '0') {\n ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0'\n } else {\n ret = '>=' + M + '.' + m + '.0 <' + (+M + 1) + '.0.0'\n }\n } else if (pr) {\n debug('replaceCaret pr', pr)\n if (M === '0') {\n if (m === '0') {\n ret = '>=' + M + '.' + m + '.' + p + '-' + pr +\n ' <' + M + '.' + m + '.' + (+p + 1)\n } else {\n ret = '>=' + M + '.' + m + '.' + p + '-' + pr +\n ' <' + M + '.' + (+m + 1) + '.0'\n }\n } else {\n ret = '>=' + M + '.' + m + '.' + p + '-' + pr +\n ' <' + (+M + 1) + '.0.0'\n }\n } else {\n debug('no pr')\n if (M === '0') {\n if (m === '0') {\n ret = '>=' + M + '.' + m + '.' + p +\n ' <' + M + '.' + m + '.' + (+p + 1)\n } else {\n ret = '>=' + M + '.' + m + '.' + p +\n ' <' + M + '.' + (+m + 1) + '.0'\n }\n } else {\n ret = '>=' + M + '.' + m + '.' + p +\n ' <' + (+M + 1) + '.0.0'\n }\n }\n\n debug('caret return', ret)\n return ret\n })\n}\n\nfunction replaceXRanges (comp, options) {\n debug('replaceXRanges', comp, options)\n return comp.split(/\\s+/).map(function (comp) {\n return replaceXRange(comp, options)\n }).join(' ')\n}\n\nfunction replaceXRange (comp, options) {\n comp = comp.trim()\n var r = options.loose ? safeRe[t.XRANGELOOSE] : safeRe[t.XRANGE]\n return comp.replace(r, function (ret, gtlt, M, m, p, pr) {\n debug('xRange', comp, ret, gtlt, M, m, p, pr)\n var xM = isX(M)\n var xm = xM || isX(m)\n var xp = xm || isX(p)\n var anyX = xp\n\n if (gtlt === '=' && anyX) {\n gtlt = ''\n }\n\n // if we're including prereleases in the match, then we need\n // to fix this to -0, the lowest possible prerelease value\n pr = options.includePrerelease ? '-0' : ''\n\n if (xM) {\n if (gtlt === '>' || gtlt === '<') {\n // nothing is allowed\n ret = '<0.0.0-0'\n } else {\n // nothing is forbidden\n ret = '*'\n }\n } else if (gtlt && anyX) {\n // we know patch is an x, because we have any x at all.\n // replace X with 0\n if (xm) {\n m = 0\n }\n p = 0\n\n if (gtlt === '>') {\n // >1 => >=2.0.0\n // >1.2 => >=1.3.0\n // >1.2.3 => >= 1.2.4\n gtlt = '>='\n if (xm) {\n M = +M + 1\n m = 0\n p = 0\n } else {\n m = +m + 1\n p = 0\n }\n } else if (gtlt === '<=') {\n // <=0.7.x is actually <0.8.0, since any 0.7.x should\n // pass. Similarly, <=7.x is actually <8.0.0, etc.\n gtlt = '<'\n if (xm) {\n M = +M + 1\n } else {\n m = +m + 1\n }\n }\n\n ret = gtlt + M + '.' + m + '.' + p + pr\n } else if (xm) {\n ret = '>=' + M + '.0.0' + pr + ' <' + (+M + 1) + '.0.0' + pr\n } else if (xp) {\n ret = '>=' + M + '.' + m + '.0' + pr +\n ' <' + M + '.' + (+m + 1) + '.0' + pr\n }\n\n debug('xRange return', ret)\n\n return ret\n })\n}\n\n// Because * is AND-ed with everything else in the comparator,\n// and '' means \"any version\", just remove the *s entirely.\nfunction replaceStars (comp, options) {\n debug('replaceStars', comp, options)\n // Looseness is ignored here. star is always as loose as it gets!\n return comp.trim().replace(safeRe[t.STAR], '')\n}\n\n// This function is passed to string.replace(re[t.HYPHENRANGE])\n// M, m, patch, prerelease, build\n// 1.2 - 3.4.5 => >=1.2.0 <=3.4.5\n// 1.2.3 - 3.4 => >=1.2.0 <3.5.0 Any 3.4.x will do\n// 1.2 - 3.4 => >=1.2.0 <3.5.0\nfunction hyphenReplace ($0,\n from, fM, fm, fp, fpr, fb,\n to, tM, tm, tp, tpr, tb) {\n if (isX(fM)) {\n from = ''\n } else if (isX(fm)) {\n from = '>=' + fM + '.0.0'\n } else if (isX(fp)) {\n from = '>=' + fM + '.' + fm + '.0'\n } else {\n from = '>=' + from\n }\n\n if (isX(tM)) {\n to = ''\n } else if (isX(tm)) {\n to = '<' + (+tM + 1) + '.0.0'\n } else if (isX(tp)) {\n to = '<' + tM + '.' + (+tm + 1) + '.0'\n } else if (tpr) {\n to = '<=' + tM + '.' + tm + '.' + tp + '-' + tpr\n } else {\n to = '<=' + to\n }\n\n return (from + ' ' + to).trim()\n}\n\n// if ANY of the sets match ALL of its comparators, then pass\nRange.prototype.test = function (version) {\n if (!version) {\n return false\n }\n\n if (typeof version === 'string') {\n try {\n version = new SemVer(version, this.options)\n } catch (er) {\n return false\n }\n }\n\n for (var i = 0; i < this.set.length; i++) {\n if (testSet(this.set[i], version, this.options)) {\n return true\n }\n }\n return false\n}\n\nfunction testSet (set, version, options) {\n for (var i = 0; i < set.length; i++) {\n if (!set[i].test(version)) {\n return false\n }\n }\n\n if (version.prerelease.length && !options.includePrerelease) {\n // Find the set of versions that are allowed to have prereleases\n // For example, ^1.2.3-pr.1 desugars to >=1.2.3-pr.1 <2.0.0\n // That should allow `1.2.3-pr.2` to pass.\n // However, `1.2.4-alpha.notready` should NOT be allowed,\n // even though it's within the range set by the comparators.\n for (i = 0; i < set.length; i++) {\n debug(set[i].semver)\n if (set[i].semver === ANY) {\n continue\n }\n\n if (set[i].semver.prerelease.length > 0) {\n var allowed = set[i].semver\n if (allowed.major === version.major &&\n allowed.minor === version.minor &&\n allowed.patch === version.patch) {\n return true\n }\n }\n }\n\n // Version has a -pre, but it's not one of the ones we like.\n return false\n }\n\n return true\n}\n\nexports.satisfies = satisfies\nfunction satisfies (version, range, options) {\n try {\n range = new Range(range, options)\n } catch (er) {\n return false\n }\n return range.test(version)\n}\n\nexports.maxSatisfying = maxSatisfying\nfunction maxSatisfying (versions, range, options) {\n var max = null\n var maxSV = null\n try {\n var rangeObj = new Range(range, options)\n } catch (er) {\n return null\n }\n versions.forEach(function (v) {\n if (rangeObj.test(v)) {\n // satisfies(v, range, options)\n if (!max || maxSV.compare(v) === -1) {\n // compare(max, v, true)\n max = v\n maxSV = new SemVer(max, options)\n }\n }\n })\n return max\n}\n\nexports.minSatisfying = minSatisfying\nfunction minSatisfying (versions, range, options) {\n var min = null\n var minSV = null\n try {\n var rangeObj = new Range(range, options)\n } catch (er) {\n return null\n }\n versions.forEach(function (v) {\n if (rangeObj.test(v)) {\n // satisfies(v, range, options)\n if (!min || minSV.compare(v) === 1) {\n // compare(min, v, true)\n min = v\n minSV = new SemVer(min, options)\n }\n }\n })\n return min\n}\n\nexports.minVersion = minVersion\nfunction minVersion (range, loose) {\n range = new Range(range, loose)\n\n var minver = new SemVer('0.0.0')\n if (range.test(minver)) {\n return minver\n }\n\n minver = new SemVer('0.0.0-0')\n if (range.test(minver)) {\n return minver\n }\n\n minver = null\n for (var i = 0; i < range.set.length; ++i) {\n var comparators = range.set[i]\n\n comparators.forEach(function (comparator) {\n // Clone to avoid manipulating the comparator's semver object.\n var compver = new SemVer(comparator.semver.version)\n switch (comparator.operator) {\n case '>':\n if (compver.prerelease.length === 0) {\n compver.patch++\n } else {\n compver.prerelease.push(0)\n }\n compver.raw = compver.format()\n /* fallthrough */\n case '':\n case '>=':\n if (!minver || gt(minver, compver)) {\n minver = compver\n }\n break\n case '<':\n case '<=':\n /* Ignore maximum versions */\n break\n /* istanbul ignore next */\n default:\n throw new Error('Unexpected operation: ' + comparator.operator)\n }\n })\n }\n\n if (minver && range.test(minver)) {\n return minver\n }\n\n return null\n}\n\nexports.validRange = validRange\nfunction validRange (range, options) {\n try {\n // Return '*' instead of '' so that truthiness works.\n // This will throw if it's invalid anyway\n return new Range(range, options).range || '*'\n } catch (er) {\n return null\n }\n}\n\n// Determine if version is less than all the versions possible in the range\nexports.ltr = ltr\nfunction ltr (version, range, options) {\n return outside(version, range, '<', options)\n}\n\n// Determine if version is greater than all the versions possible in the range.\nexports.gtr = gtr\nfunction gtr (version, range, options) {\n return outside(version, range, '>', options)\n}\n\nexports.outside = outside\nfunction outside (version, range, hilo, options) {\n version = new SemVer(version, options)\n range = new Range(range, options)\n\n var gtfn, ltefn, ltfn, comp, ecomp\n switch (hilo) {\n case '>':\n gtfn = gt\n ltefn = lte\n ltfn = lt\n comp = '>'\n ecomp = '>='\n break\n case '<':\n gtfn = lt\n ltefn = gte\n ltfn = gt\n comp = '<'\n ecomp = '<='\n break\n default:\n throw new TypeError('Must provide a hilo val of \"<\" or \">\"')\n }\n\n // If it satisifes the range it is not outside\n if (satisfies(version, range, options)) {\n return false\n }\n\n // From now on, variable terms are as if we're in \"gtr\" mode.\n // but note that everything is flipped for the \"ltr\" function.\n\n for (var i = 0; i < range.set.length; ++i) {\n var comparators = range.set[i]\n\n var high = null\n var low = null\n\n comparators.forEach(function (comparator) {\n if (comparator.semver === ANY) {\n comparator = new Comparator('>=0.0.0')\n }\n high = high || comparator\n low = low || comparator\n if (gtfn(comparator.semver, high.semver, options)) {\n high = comparator\n } else if (ltfn(comparator.semver, low.semver, options)) {\n low = comparator\n }\n })\n\n // If the edge version comparator has a operator then our version\n // isn't outside it\n if (high.operator === comp || high.operator === ecomp) {\n return false\n }\n\n // If the lowest version comparator has an operator and our version\n // is less than it then it isn't higher than the range\n if ((!low.operator || low.operator === comp) &&\n ltefn(version, low.semver)) {\n return false\n } else if (low.operator === ecomp && ltfn(version, low.semver)) {\n return false\n }\n }\n return true\n}\n\nexports.prerelease = prerelease\nfunction prerelease (version, options) {\n var parsed = parse(version, options)\n return (parsed && parsed.prerelease.length) ? parsed.prerelease : null\n}\n\nexports.intersects = intersects\nfunction intersects (r1, r2, options) {\n r1 = new Range(r1, options)\n r2 = new Range(r2, options)\n return r1.intersects(r2)\n}\n\nexports.coerce = coerce\nfunction coerce (version, options) {\n if (version instanceof SemVer) {\n return version\n }\n\n if (typeof version === 'number') {\n version = String(version)\n }\n\n if (typeof version !== 'string') {\n return null\n }\n\n options = options || {}\n\n var match = null\n if (!options.rtl) {\n match = version.match(safeRe[t.COERCE])\n } else {\n // Find the right-most coercible string that does not share\n // a terminus with a more left-ward coercible string.\n // Eg, '1.2.3.4' wants to coerce '2.3.4', not '3.4' or '4'\n //\n // Walk through the string checking with a /g regexp\n // Manually set the index so as to pick up overlapping matches.\n // Stop when we get a match that ends at the string end, since no\n // coercible string can be more right-ward without the same terminus.\n var next\n while ((next = safeRe[t.COERCERTL].exec(version)) &&\n (!match || match.index + match[0].length !== version.length)\n ) {\n if (!match ||\n next.index + next[0].length !== match.index + match[0].length) {\n match = next\n }\n safeRe[t.COERCERTL].lastIndex = next.index + next[1].length + next[2].length\n }\n // leave it in a clean state\n safeRe[t.COERCERTL].lastIndex = -1\n }\n\n if (match === null) {\n return null\n }\n\n return parse(match[2] +\n '.' + (match[3] || '0') +\n '.' + (match[4] || '0'), options)\n}\n","\"use strict\";\n\nexports.__esModule = true;\nexports.hasMinVersion = hasMinVersion;\nvar _semver = _interopRequireDefault(require(\"semver\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nfunction hasMinVersion(minVersion, runtimeVersion) {\n // If the range is unavailable, we're running the script during Babel's\n // build process, and we want to assume that all versions are satisfied so\n // that the built output will include all definitions.\n if (!runtimeVersion || !minVersion) return true;\n runtimeVersion = String(runtimeVersion);\n\n // semver.intersects() has some surprising behavior with comparing ranges\n // with preprelease versions. We add '^' to ensure that we are always\n // comparing ranges with ranges, which sidesteps this logic.\n // For example:\n //\n // semver.intersects(`<7.0.1`, \"7.0.0-beta.0\") // false - surprising\n // semver.intersects(`<7.0.1`, \"^7.0.0-beta.0\") // true - expected\n //\n // This is because the first falls back to\n //\n // semver.satisfies(\"7.0.0-beta.0\", `<7.0.1`) // false - surprising\n //\n // and this fails because a prerelease version can only satisfy a range\n // if it is a prerelease within the same major/minor/patch range.\n //\n // Note: If this is found to have issues, please also revist the logic in\n // babel-core's availableHelper() API.\n if (_semver.default.valid(runtimeVersion)) runtimeVersion = `^${runtimeVersion}`;\n return !_semver.default.intersects(`<${minVersion}`, runtimeVersion) && !_semver.default.intersects(`>=8.0.0`, runtimeVersion);\n}","\"use strict\";\n\nexports.__esModule = true;\nexports.createUtilsGetter = createUtilsGetter;\nexports.getImportSource = getImportSource;\nexports.getRequireSource = getRequireSource;\nexports.has = has;\nexports.intersection = intersection;\nexports.resolveKey = resolveKey;\nexports.resolveSource = resolveSource;\nvar _babel = _interopRequireWildcard(require(\"@babel/core\"));\nfunction _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== \"function\") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }\nfunction _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== \"object\" && typeof obj !== \"function\") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== \"default\" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }\nconst {\n types: t,\n template: template\n} = _babel.default || _babel;\nfunction intersection(a, b) {\n const result = new Set();\n a.forEach(v => b.has(v) && result.add(v));\n return result;\n}\nfunction has(object, key) {\n return Object.prototype.hasOwnProperty.call(object, key);\n}\nfunction getType(target) {\n return Object.prototype.toString.call(target).slice(8, -1);\n}\nfunction resolveId(path) {\n if (path.isIdentifier() && !path.scope.hasBinding(path.node.name, /* noGlobals */true)) {\n return path.node.name;\n }\n if (path.isPure()) {\n const {\n deopt\n } = path.evaluate();\n if (deopt && deopt.isIdentifier()) {\n return deopt.node.name;\n }\n }\n}\nfunction resolveKey(path, computed = false) {\n const {\n scope\n } = path;\n if (path.isStringLiteral()) return path.node.value;\n const isIdentifier = path.isIdentifier();\n if (isIdentifier && !(computed || path.parent.computed)) {\n return path.node.name;\n }\n if (computed && path.isMemberExpression() && path.get(\"object\").isIdentifier({\n name: \"Symbol\"\n }) && !scope.hasBinding(\"Symbol\", /* noGlobals */true)) {\n const sym = resolveKey(path.get(\"property\"), path.node.computed);\n if (sym) return \"Symbol.\" + sym;\n }\n if (isIdentifier ? scope.hasBinding(path.node.name, /* noGlobals */true) : path.isPure()) {\n const {\n value\n } = path.evaluate();\n if (typeof value === \"string\") return value;\n }\n}\nfunction resolveSource(obj) {\n if (obj.isMemberExpression() && obj.get(\"property\").isIdentifier({\n name: \"prototype\"\n })) {\n const id = resolveId(obj.get(\"object\"));\n if (id) {\n return {\n id,\n placement: \"prototype\"\n };\n }\n return {\n id: null,\n placement: null\n };\n }\n const id = resolveId(obj);\n if (id) {\n return {\n id,\n placement: \"static\"\n };\n }\n if (obj.isRegExpLiteral()) {\n return {\n id: \"RegExp\",\n placement: \"prototype\"\n };\n } else if (obj.isFunction()) {\n return {\n id: \"Function\",\n placement: \"prototype\"\n };\n } else if (obj.isPure()) {\n const {\n value\n } = obj.evaluate();\n if (value !== undefined) {\n return {\n id: getType(value),\n placement: \"prototype\"\n };\n }\n }\n return {\n id: null,\n placement: null\n };\n}\nfunction getImportSource({\n node\n}) {\n if (node.specifiers.length === 0) return node.source.value;\n}\nfunction getRequireSource({\n node\n}) {\n if (!t.isExpressionStatement(node)) return;\n const {\n expression\n } = node;\n if (t.isCallExpression(expression) && t.isIdentifier(expression.callee) && expression.callee.name === \"require\" && expression.arguments.length === 1 && t.isStringLiteral(expression.arguments[0])) {\n return expression.arguments[0].value;\n }\n}\nfunction hoist(node) {\n // @ts-expect-error\n node._blockHoist = 3;\n return node;\n}\nfunction createUtilsGetter(cache) {\n return path => {\n const prog = path.findParent(p => p.isProgram());\n return {\n injectGlobalImport(url, moduleName) {\n cache.storeAnonymous(prog, url, moduleName, (isScript, source) => {\n return isScript ? template.statement.ast`require(${source})` : t.importDeclaration([], source);\n });\n },\n injectNamedImport(url, name, hint = name, moduleName) {\n return cache.storeNamed(prog, url, name, moduleName, (isScript, source, name) => {\n const id = prog.scope.generateUidIdentifier(hint);\n return {\n node: isScript ? hoist(template.statement.ast`\n var ${id} = require(${source}).${name}\n `) : t.importDeclaration([t.importSpecifier(id, name)], source),\n name: id.name\n };\n });\n },\n injectDefaultImport(url, hint = url, moduleName) {\n return cache.storeNamed(prog, url, \"default\", moduleName, (isScript, source) => {\n const id = prog.scope.generateUidIdentifier(hint);\n return {\n node: isScript ? hoist(template.statement.ast`var ${id} = require(${source})`) : t.importDeclaration([t.importDefaultSpecifier(id)], source),\n name: id.name\n };\n });\n }\n };\n };\n}","\"use strict\";\n\nexports.__esModule = true;\nexports.default = void 0;\nvar _babel = _interopRequireWildcard(require(\"@babel/core\"));\nfunction _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== \"function\") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }\nfunction _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== \"object\" && typeof obj !== \"function\") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== \"default\" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }\nconst {\n types: t\n} = _babel.default || _babel;\nclass ImportsCachedInjector {\n constructor(resolver, getPreferredIndex) {\n this._imports = new WeakMap();\n this._anonymousImports = new WeakMap();\n this._lastImports = new WeakMap();\n this._resolver = resolver;\n this._getPreferredIndex = getPreferredIndex;\n }\n storeAnonymous(programPath, url, moduleName, getVal) {\n const key = this._normalizeKey(programPath, url);\n const imports = this._ensure(this._anonymousImports, programPath, Set);\n if (imports.has(key)) return;\n const node = getVal(programPath.node.sourceType === \"script\", t.stringLiteral(this._resolver(url)));\n imports.add(key);\n this._injectImport(programPath, node, moduleName);\n }\n storeNamed(programPath, url, name, moduleName, getVal) {\n const key = this._normalizeKey(programPath, url, name);\n const imports = this._ensure(this._imports, programPath, Map);\n if (!imports.has(key)) {\n const {\n node,\n name: id\n } = getVal(programPath.node.sourceType === \"script\", t.stringLiteral(this._resolver(url)), t.identifier(name));\n imports.set(key, id);\n this._injectImport(programPath, node, moduleName);\n }\n return t.identifier(imports.get(key));\n }\n _injectImport(programPath, node, moduleName) {\n var _this$_lastImports$ge;\n const newIndex = this._getPreferredIndex(moduleName);\n const lastImports = (_this$_lastImports$ge = this._lastImports.get(programPath)) != null ? _this$_lastImports$ge : [];\n const isPathStillValid = path => path.node &&\n // Sometimes the AST is modified and the \"last import\"\n // we have has been replaced\n path.parent === programPath.node && path.container === programPath.node.body;\n let last;\n if (newIndex === Infinity) {\n // Fast path: we can always just insert at the end if newIndex is `Infinity`\n if (lastImports.length > 0) {\n last = lastImports[lastImports.length - 1].path;\n if (!isPathStillValid(last)) last = undefined;\n }\n } else {\n for (const [i, data] of lastImports.entries()) {\n const {\n path,\n index\n } = data;\n if (isPathStillValid(path)) {\n if (newIndex < index) {\n const [newPath] = path.insertBefore(node);\n lastImports.splice(i, 0, {\n path: newPath,\n index: newIndex\n });\n return;\n }\n last = path;\n }\n }\n }\n if (last) {\n const [newPath] = last.insertAfter(node);\n lastImports.push({\n path: newPath,\n index: newIndex\n });\n } else {\n const [newPath] = programPath.unshiftContainer(\"body\", node);\n this._lastImports.set(programPath, [{\n path: newPath,\n index: newIndex\n }]);\n }\n }\n _ensure(map, programPath, Collection) {\n let collection = map.get(programPath);\n if (!collection) {\n collection = new Collection();\n map.set(programPath, collection);\n }\n return collection;\n }\n _normalizeKey(programPath, url, name = \"\") {\n const {\n sourceType\n } = programPath.node;\n\n // If we rely on the imported binding (the \"name\" parameter), we also need to cache\n // based on the sourceType. This is because the module transforms change the names\n // of the import variables.\n return `${name && sourceType}::${url}::${name}`;\n }\n}\nexports.default = ImportsCachedInjector;","\"use strict\";\n\nexports.__esModule = true;\nexports.presetEnvSilentDebugHeader = void 0;\nexports.stringifyTargets = stringifyTargets;\nexports.stringifyTargetsMultiline = stringifyTargetsMultiline;\nvar _helperCompilationTargets = require(\"@babel/helper-compilation-targets\");\nconst presetEnvSilentDebugHeader = \"#__secret_key__@babel/preset-env__don't_log_debug_header_and_resolved_targets\";\nexports.presetEnvSilentDebugHeader = presetEnvSilentDebugHeader;\nfunction stringifyTargetsMultiline(targets) {\n return JSON.stringify((0, _helperCompilationTargets.prettifyTargets)(targets), null, 2);\n}\nfunction stringifyTargets(targets) {\n return JSON.stringify(targets).replace(/,/g, \", \").replace(/^\\{\"/, '{ \"').replace(/\"\\}$/, '\" }');\n}","\"use strict\";\n\nexports.__esModule = true;\nexports.applyMissingDependenciesDefaults = applyMissingDependenciesDefaults;\nexports.validateIncludeExclude = validateIncludeExclude;\nvar _utils = require(\"./utils\");\nfunction patternToRegExp(pattern) {\n if (pattern instanceof RegExp) return pattern;\n try {\n return new RegExp(`^${pattern}$`);\n } catch (_unused) {\n return null;\n }\n}\nfunction buildUnusedError(label, unused) {\n if (!unused.length) return \"\";\n return ` - The following \"${label}\" patterns didn't match any polyfill:\\n` + unused.map(original => ` ${String(original)}\\n`).join(\"\");\n}\nfunction buldDuplicatesError(duplicates) {\n if (!duplicates.size) return \"\";\n return ` - The following polyfills were matched both by \"include\" and \"exclude\" patterns:\\n` + Array.from(duplicates, name => ` ${name}\\n`).join(\"\");\n}\nfunction validateIncludeExclude(provider, polyfills, includePatterns, excludePatterns) {\n let current;\n const filter = pattern => {\n const regexp = patternToRegExp(pattern);\n if (!regexp) return false;\n let matched = false;\n for (const polyfill of polyfills.keys()) {\n if (regexp.test(polyfill)) {\n matched = true;\n current.add(polyfill);\n }\n }\n return !matched;\n };\n\n // prettier-ignore\n const include = current = new Set();\n const unusedInclude = Array.from(includePatterns).filter(filter);\n\n // prettier-ignore\n const exclude = current = new Set();\n const unusedExclude = Array.from(excludePatterns).filter(filter);\n const duplicates = (0, _utils.intersection)(include, exclude);\n if (duplicates.size > 0 || unusedInclude.length > 0 || unusedExclude.length > 0) {\n throw new Error(`Error while validating the \"${provider}\" provider options:\\n` + buildUnusedError(\"include\", unusedInclude) + buildUnusedError(\"exclude\", unusedExclude) + buldDuplicatesError(duplicates));\n }\n return {\n include,\n exclude\n };\n}\nfunction applyMissingDependenciesDefaults(options, babelApi) {\n const {\n missingDependencies = {}\n } = options;\n if (missingDependencies === false) return false;\n const caller = babelApi.caller(caller => caller == null ? void 0 : caller.name);\n const {\n log = \"deferred\",\n inject = caller === \"rollup-plugin-babel\" ? \"throw\" : \"import\",\n all = false\n } = missingDependencies;\n return {\n log,\n inject,\n all\n };\n}","\"use strict\";\n\nexports.__esModule = true;\nexports.default = void 0;\nvar _utils = require(\"../utils\");\nfunction isRemoved(path) {\n if (path.removed) return true;\n if (!path.parentPath) return false;\n if (path.listKey) {\n if (!path.parentPath.node[path.listKey].includes(path.node)) return true;\n } else {\n if (path.parentPath.node[path.key] !== path.node) return true;\n }\n return isRemoved(path.parentPath);\n}\nvar _default = callProvider => {\n function property(object, key, placement, path) {\n return callProvider({\n kind: \"property\",\n object,\n key,\n placement\n }, path);\n }\n function handleReferencedIdentifier(path) {\n const {\n node: {\n name\n },\n scope\n } = path;\n if (scope.getBindingIdentifier(name)) return;\n callProvider({\n kind: \"global\",\n name\n }, path);\n }\n function analyzeMemberExpression(path) {\n const key = (0, _utils.resolveKey)(path.get(\"property\"), path.node.computed);\n return {\n key,\n handleAsMemberExpression: !!key && key !== \"prototype\"\n };\n }\n return {\n // Symbol(), new Promise\n ReferencedIdentifier(path) {\n const {\n parentPath\n } = path;\n if (parentPath.isMemberExpression({\n object: path.node\n }) && analyzeMemberExpression(parentPath).handleAsMemberExpression) {\n return;\n }\n handleReferencedIdentifier(path);\n },\n MemberExpression(path) {\n const {\n key,\n handleAsMemberExpression\n } = analyzeMemberExpression(path);\n if (!handleAsMemberExpression) return;\n const object = path.get(\"object\");\n let objectIsGlobalIdentifier = object.isIdentifier();\n if (objectIsGlobalIdentifier) {\n const binding = object.scope.getBinding(object.node.name);\n if (binding) {\n if (binding.path.isImportNamespaceSpecifier()) return;\n objectIsGlobalIdentifier = false;\n }\n }\n const source = (0, _utils.resolveSource)(object);\n let skipObject = property(source.id, key, source.placement, path);\n skipObject || (skipObject = !objectIsGlobalIdentifier || path.shouldSkip || object.shouldSkip || isRemoved(object));\n if (!skipObject) handleReferencedIdentifier(object);\n },\n ObjectPattern(path) {\n const {\n parentPath,\n parent\n } = path;\n let obj;\n\n // const { keys, values } = Object\n if (parentPath.isVariableDeclarator()) {\n obj = parentPath.get(\"init\");\n // ({ keys, values } = Object)\n } else if (parentPath.isAssignmentExpression()) {\n obj = parentPath.get(\"right\");\n // !function ({ keys, values }) {...} (Object)\n // resolution does not work after properties transform :-(\n } else if (parentPath.isFunction()) {\n const grand = parentPath.parentPath;\n if (grand.isCallExpression() || grand.isNewExpression()) {\n if (grand.node.callee === parent) {\n obj = grand.get(\"arguments\")[path.key];\n }\n }\n }\n let id = null;\n let placement = null;\n if (obj) ({\n id,\n placement\n } = (0, _utils.resolveSource)(obj));\n for (const prop of path.get(\"properties\")) {\n if (prop.isObjectProperty()) {\n const key = (0, _utils.resolveKey)(prop.get(\"key\"));\n if (key) property(id, key, placement, prop);\n }\n }\n },\n BinaryExpression(path) {\n if (path.node.operator !== \"in\") return;\n const source = (0, _utils.resolveSource)(path.get(\"right\"));\n const key = (0, _utils.resolveKey)(path.get(\"left\"), true);\n if (!key) return;\n callProvider({\n kind: \"in\",\n object: source.id,\n key,\n placement: source.placement\n }, path);\n }\n };\n};\nexports.default = _default;","\"use strict\";\n\nexports.__esModule = true;\nexports.default = void 0;\nvar _utils = require(\"../utils\");\nvar _default = callProvider => ({\n ImportDeclaration(path) {\n const source = (0, _utils.getImportSource)(path);\n if (!source) return;\n callProvider({\n kind: \"import\",\n source\n }, path);\n },\n Program(path) {\n path.get(\"body\").forEach(bodyPath => {\n const source = (0, _utils.getRequireSource)(bodyPath);\n if (!source) return;\n callProvider({\n kind: \"import\",\n source\n }, bodyPath);\n });\n }\n});\nexports.default = _default;","\"use strict\";\n\nexports.__esModule = true;\nexports.usage = exports.entry = void 0;\nvar _usage = _interopRequireDefault(require(\"./usage\"));\nexports.usage = _usage.default;\nvar _entry = _interopRequireDefault(require(\"./entry\"));\nexports.entry = _entry.default;\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }","\"use strict\";\n\nexports.__esModule = true;\nexports.has = has;\nexports.laterLogMissing = laterLogMissing;\nexports.logMissing = logMissing;\nexports.resolve = resolve;\nfunction resolve(dirname, moduleName, absoluteImports) {\n if (absoluteImports === false) return moduleName;\n throw new Error(`\"absoluteImports\" is not supported in bundles prepared for the browser.`);\n}\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nfunction has(basedir, name) {\n return true;\n}\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nfunction logMissing(missingDeps) {}\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nfunction laterLogMissing(missingDeps) {}","\"use strict\";\n\nexports.__esModule = true;\nexports.default = createMetaResolver;\nvar _utils = require(\"./utils\");\nconst PossibleGlobalObjects = new Set([\"global\", \"globalThis\", \"self\", \"window\"]);\nfunction createMetaResolver(polyfills) {\n const {\n static: staticP,\n instance: instanceP,\n global: globalP\n } = polyfills;\n return meta => {\n if (meta.kind === \"global\" && globalP && (0, _utils.has)(globalP, meta.name)) {\n return {\n kind: \"global\",\n desc: globalP[meta.name],\n name: meta.name\n };\n }\n if (meta.kind === \"property\" || meta.kind === \"in\") {\n const {\n placement,\n object,\n key\n } = meta;\n if (object && placement === \"static\") {\n if (globalP && PossibleGlobalObjects.has(object) && (0, _utils.has)(globalP, key)) {\n return {\n kind: \"global\",\n desc: globalP[key],\n name: key\n };\n }\n if (staticP && (0, _utils.has)(staticP, object) && (0, _utils.has)(staticP[object], key)) {\n return {\n kind: \"static\",\n desc: staticP[object][key],\n name: `${object}$${key}`\n };\n }\n }\n if (instanceP && (0, _utils.has)(instanceP, key)) {\n return {\n kind: \"instance\",\n desc: instanceP[key],\n name: `${key}`\n };\n }\n }\n };\n}","\"use strict\";\n\nexports.__esModule = true;\nexports.default = definePolyfillProvider;\nvar _helperPluginUtils = require(\"@babel/helper-plugin-utils\");\nvar _helperCompilationTargets = _interopRequireWildcard(require(\"@babel/helper-compilation-targets\"));\nvar _utils = require(\"./utils\");\nvar _importsInjector = _interopRequireDefault(require(\"./imports-injector\"));\nvar _debugUtils = require(\"./debug-utils\");\nvar _normalizeOptions = require(\"./normalize-options\");\nvar v = _interopRequireWildcard(require(\"./visitors\"));\nvar deps = _interopRequireWildcard(require(\"./node/dependencies\"));\nvar _metaResolver = _interopRequireDefault(require(\"./meta-resolver\"));\nconst _excluded = [\"method\", \"targets\", \"ignoreBrowserslistConfig\", \"configPath\", \"debug\", \"shouldInjectPolyfill\", \"absoluteImports\"];\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nfunction _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== \"function\") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }\nfunction _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== \"object\" && typeof obj !== \"function\") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== \"default\" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\nconst getTargets = _helperCompilationTargets.default.default || _helperCompilationTargets.default;\nfunction resolveOptions(options, babelApi) {\n const {\n method,\n targets: targetsOption,\n ignoreBrowserslistConfig,\n configPath,\n debug,\n shouldInjectPolyfill,\n absoluteImports\n } = options,\n providerOptions = _objectWithoutPropertiesLoose(options, _excluded);\n if (isEmpty(options)) {\n throw new Error(`\\\nThis plugin requires options, for example:\n {\n \"plugins\": [\n [\"\", { method: \"usage-pure\" }]\n ]\n }\n\nSee more options at https://github.com/babel/babel-polyfills/blob/main/docs/usage.md`);\n }\n let methodName;\n if (method === \"usage-global\") methodName = \"usageGlobal\";else if (method === \"entry-global\") methodName = \"entryGlobal\";else if (method === \"usage-pure\") methodName = \"usagePure\";else if (typeof method !== \"string\") {\n throw new Error(\".method must be a string\");\n } else {\n throw new Error(`.method must be one of \"entry-global\", \"usage-global\"` + ` or \"usage-pure\" (received ${JSON.stringify(method)})`);\n }\n if (typeof shouldInjectPolyfill === \"function\") {\n if (options.include || options.exclude) {\n throw new Error(`.include and .exclude are not supported when using the` + ` .shouldInjectPolyfill function.`);\n }\n } else if (shouldInjectPolyfill != null) {\n throw new Error(`.shouldInjectPolyfill must be a function, or undefined` + ` (received ${JSON.stringify(shouldInjectPolyfill)})`);\n }\n if (absoluteImports != null && typeof absoluteImports !== \"boolean\" && typeof absoluteImports !== \"string\") {\n throw new Error(`.absoluteImports must be a boolean, a string, or undefined` + ` (received ${JSON.stringify(absoluteImports)})`);\n }\n let targets;\n if (\n // If any browserslist-related option is specified, fallback to the old\n // behavior of not using the targets specified in the top-level options.\n targetsOption || configPath || ignoreBrowserslistConfig) {\n const targetsObj = typeof targetsOption === \"string\" || Array.isArray(targetsOption) ? {\n browsers: targetsOption\n } : targetsOption;\n targets = getTargets(targetsObj, {\n ignoreBrowserslistConfig,\n configPath\n });\n } else {\n targets = babelApi.targets();\n }\n return {\n method,\n methodName,\n targets,\n absoluteImports: absoluteImports != null ? absoluteImports : false,\n shouldInjectPolyfill,\n debug: !!debug,\n providerOptions: providerOptions\n };\n}\nfunction instantiateProvider(factory, options, missingDependencies, dirname, debugLog, babelApi) {\n const {\n method,\n methodName,\n targets,\n debug,\n shouldInjectPolyfill,\n providerOptions,\n absoluteImports\n } = resolveOptions(options, babelApi);\n\n // eslint-disable-next-line prefer-const\n let include, exclude;\n let polyfillsSupport;\n let polyfillsNames;\n let filterPolyfills;\n const getUtils = (0, _utils.createUtilsGetter)(new _importsInjector.default(moduleName => deps.resolve(dirname, moduleName, absoluteImports), name => {\n var _polyfillsNames$get, _polyfillsNames;\n return (_polyfillsNames$get = (_polyfillsNames = polyfillsNames) == null ? void 0 : _polyfillsNames.get(name)) != null ? _polyfillsNames$get : Infinity;\n }));\n const depsCache = new Map();\n const api = {\n babel: babelApi,\n getUtils,\n method: options.method,\n targets,\n createMetaResolver: _metaResolver.default,\n shouldInjectPolyfill(name) {\n if (polyfillsNames === undefined) {\n throw new Error(`Internal error in the ${factory.name} provider: ` + `shouldInjectPolyfill() can't be called during initialization.`);\n }\n if (!polyfillsNames.has(name)) {\n console.warn(`Internal error in the ${providerName} provider: ` + `unknown polyfill \"${name}\".`);\n }\n if (filterPolyfills && !filterPolyfills(name)) return false;\n let shouldInject = (0, _helperCompilationTargets.isRequired)(name, targets, {\n compatData: polyfillsSupport,\n includes: include,\n excludes: exclude\n });\n if (shouldInjectPolyfill) {\n shouldInject = shouldInjectPolyfill(name, shouldInject);\n if (typeof shouldInject !== \"boolean\") {\n throw new Error(`.shouldInjectPolyfill must return a boolean.`);\n }\n }\n return shouldInject;\n },\n debug(name) {\n var _debugLog, _debugLog$polyfillsSu;\n debugLog().found = true;\n if (!debug || !name) return;\n if (debugLog().polyfills.has(providerName)) return;\n debugLog().polyfills.add(name);\n (_debugLog$polyfillsSu = (_debugLog = debugLog()).polyfillsSupport) != null ? _debugLog$polyfillsSu : _debugLog.polyfillsSupport = polyfillsSupport;\n },\n assertDependency(name, version = \"*\") {\n if (missingDependencies === false) return;\n if (absoluteImports) {\n // If absoluteImports is not false, we will try resolving\n // the dependency and throw if it's not possible. We can\n // skip the check here.\n return;\n }\n const dep = version === \"*\" ? name : `${name}@^${version}`;\n const found = missingDependencies.all ? false : mapGetOr(depsCache, `${name} :: ${dirname}`, () => deps.has(dirname, name));\n if (!found) {\n debugLog().missingDeps.add(dep);\n }\n }\n };\n const provider = factory(api, providerOptions, dirname);\n const providerName = provider.name || factory.name;\n if (typeof provider[methodName] !== \"function\") {\n throw new Error(`The \"${providerName}\" provider doesn't support the \"${method}\" polyfilling method.`);\n }\n if (Array.isArray(provider.polyfills)) {\n polyfillsNames = new Map(provider.polyfills.map((name, index) => [name, index]));\n filterPolyfills = provider.filterPolyfills;\n } else if (provider.polyfills) {\n polyfillsNames = new Map(Object.keys(provider.polyfills).map((name, index) => [name, index]));\n polyfillsSupport = provider.polyfills;\n filterPolyfills = provider.filterPolyfills;\n } else {\n polyfillsNames = new Map();\n }\n ({\n include,\n exclude\n } = (0, _normalizeOptions.validateIncludeExclude)(providerName, polyfillsNames, providerOptions.include || [], providerOptions.exclude || []));\n let callProvider;\n if (methodName === \"usageGlobal\") {\n callProvider = (payload, path) => {\n var _ref;\n const utils = getUtils(path);\n return (_ref = provider[methodName](payload, utils, path)) != null ? _ref : false;\n };\n } else {\n callProvider = (payload, path) => {\n const utils = getUtils(path);\n provider[methodName](payload, utils, path);\n return false;\n };\n }\n return {\n debug,\n method,\n targets,\n provider,\n providerName,\n callProvider\n };\n}\nfunction definePolyfillProvider(factory) {\n return (0, _helperPluginUtils.declare)((babelApi, options, dirname) => {\n babelApi.assertVersion(\"^7.0.0 || ^8.0.0-alpha.0\");\n const {\n traverse\n } = babelApi;\n let debugLog;\n const missingDependencies = (0, _normalizeOptions.applyMissingDependenciesDefaults)(options, babelApi);\n const {\n debug,\n method,\n targets,\n provider,\n providerName,\n callProvider\n } = instantiateProvider(factory, options, missingDependencies, dirname, () => debugLog, babelApi);\n const createVisitor = method === \"entry-global\" ? v.entry : v.usage;\n const visitor = provider.visitor ? traverse.visitors.merge([createVisitor(callProvider), provider.visitor]) : createVisitor(callProvider);\n if (debug && debug !== _debugUtils.presetEnvSilentDebugHeader) {\n console.log(`${providerName}: \\`DEBUG\\` option`);\n console.log(`\\nUsing targets: ${(0, _debugUtils.stringifyTargetsMultiline)(targets)}`);\n console.log(`\\nUsing polyfills with \\`${method}\\` method:`);\n }\n const {\n runtimeName\n } = provider;\n return {\n name: \"inject-polyfills\",\n visitor,\n pre(file) {\n var _provider$pre;\n if (runtimeName) {\n if (file.get(\"runtimeHelpersModuleName\") && file.get(\"runtimeHelpersModuleName\") !== runtimeName) {\n console.warn(`Two different polyfill providers` + ` (${file.get(\"runtimeHelpersModuleProvider\")}` + ` and ${providerName}) are trying to define two` + ` conflicting @babel/runtime alternatives:` + ` ${file.get(\"runtimeHelpersModuleName\")} and ${runtimeName}.` + ` The second one will be ignored.`);\n } else {\n file.set(\"runtimeHelpersModuleName\", runtimeName);\n file.set(\"runtimeHelpersModuleProvider\", providerName);\n }\n }\n debugLog = {\n polyfills: new Set(),\n polyfillsSupport: undefined,\n found: false,\n providers: new Set(),\n missingDeps: new Set()\n };\n (_provider$pre = provider.pre) == null ? void 0 : _provider$pre.apply(this, arguments);\n },\n post() {\n var _provider$post;\n (_provider$post = provider.post) == null ? void 0 : _provider$post.apply(this, arguments);\n if (missingDependencies !== false) {\n if (missingDependencies.log === \"per-file\") {\n deps.logMissing(debugLog.missingDeps);\n } else {\n deps.laterLogMissing(debugLog.missingDeps);\n }\n }\n if (!debug) return;\n if (this.filename) console.log(`\\n[${this.filename}]`);\n if (debugLog.polyfills.size === 0) {\n console.log(method === \"entry-global\" ? debugLog.found ? `Based on your targets, the ${providerName} polyfill did not add any polyfill.` : `The entry point for the ${providerName} polyfill has not been found.` : `Based on your code and targets, the ${providerName} polyfill did not add any polyfill.`);\n return;\n }\n if (method === \"entry-global\") {\n console.log(`The ${providerName} polyfill entry has been replaced with ` + `the following polyfills:`);\n } else {\n console.log(`The ${providerName} polyfill added the following polyfills:`);\n }\n for (const name of debugLog.polyfills) {\n var _debugLog$polyfillsSu2;\n if ((_debugLog$polyfillsSu2 = debugLog.polyfillsSupport) != null && _debugLog$polyfillsSu2[name]) {\n const filteredTargets = (0, _helperCompilationTargets.getInclusionReasons)(name, targets, debugLog.polyfillsSupport);\n const formattedTargets = JSON.stringify(filteredTargets).replace(/,/g, \", \").replace(/^\\{\"/, '{ \"').replace(/\"\\}$/, '\" }');\n console.log(` ${name} ${formattedTargets}`);\n } else {\n console.log(` ${name}`);\n }\n }\n }\n };\n });\n}\nfunction mapGetOr(map, key, getDefault) {\n let val = map.get(key);\n if (val === undefined) {\n val = getDefault();\n map.set(key, val);\n }\n return val;\n}\nfunction isEmpty(obj) {\n return Object.keys(obj).length === 0;\n}","\"use strict\";\n\nexports.__esModule = true;\nexports.default = void 0;\nvar _corejs2BuiltIns = _interopRequireDefault(require(\"@babel/compat-data/corejs2-built-ins\"));\nvar _builtInDefinitions = require(\"./built-in-definitions\");\nvar _addPlatformSpecificPolyfills = _interopRequireDefault(require(\"./add-platform-specific-polyfills\"));\nvar _helpers = require(\"./helpers\");\nvar _helperDefinePolyfillProvider = _interopRequireDefault(require(\"@babel/helper-define-polyfill-provider\"));\nvar _babel = _interopRequireWildcard(require(\"@babel/core\"));\nfunction _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== \"function\") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }\nfunction _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== \"object\" && typeof obj !== \"function\") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== \"default\" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nconst {\n types: t\n} = _babel.default || _babel;\nconst BABEL_RUNTIME = \"@babel/runtime-corejs2\";\nconst presetEnvCompat = \"#__secret_key__@babel/preset-env__compatibility\";\nconst runtimeCompat = \"#__secret_key__@babel/runtime__compatibility\";\nconst has = Function.call.bind(Object.hasOwnProperty);\nvar _default = (0, _helperDefinePolyfillProvider.default)(function (api, {\n [presetEnvCompat]: {\n entryInjectRegenerator = false,\n noRuntimeName = false\n } = {},\n [runtimeCompat]: {\n useBabelRuntime = false,\n runtimeVersion = \"\",\n ext = \".js\"\n } = {}\n}) {\n const resolve = api.createMetaResolver({\n global: _builtInDefinitions.BuiltIns,\n static: _builtInDefinitions.StaticProperties,\n instance: _builtInDefinitions.InstanceProperties\n });\n const {\n debug,\n shouldInjectPolyfill,\n method\n } = api;\n const polyfills = (0, _addPlatformSpecificPolyfills.default)(api.targets, method, _corejs2BuiltIns.default);\n const coreJSBase = useBabelRuntime ? `${BABEL_RUNTIME}/core-js` : method === \"usage-pure\" ? \"core-js/library/fn\" : \"core-js/modules\";\n function inject(name, utils) {\n if (typeof name === \"string\") {\n // Some polyfills aren't always available, for example\n // web.dom.iterable when targeting node\n if (has(polyfills, name) && shouldInjectPolyfill(name)) {\n debug(name);\n utils.injectGlobalImport(`${coreJSBase}/${name}.js`);\n }\n return;\n }\n name.forEach(name => inject(name, utils));\n }\n function maybeInjectPure(desc, hint, utils) {\n let {\n pure,\n meta,\n name\n } = desc;\n if (!pure || !shouldInjectPolyfill(name)) return;\n if (runtimeVersion && meta && meta.minRuntimeVersion && !(0, _helpers.hasMinVersion)(meta && meta.minRuntimeVersion, runtimeVersion)) {\n return;\n }\n\n // Unfortunately core-js and @babel/runtime-corejs2 don't have the same\n // directory structure, so we need to special case this.\n if (useBabelRuntime && pure === \"symbol/index\") pure = \"symbol\";\n return utils.injectDefaultImport(`${coreJSBase}/${pure}${ext}`, hint);\n }\n return {\n name: \"corejs2\",\n runtimeName: noRuntimeName ? null : BABEL_RUNTIME,\n polyfills,\n entryGlobal(meta, utils, path) {\n if (meta.kind === \"import\" && meta.source === \"core-js\") {\n debug(null);\n inject(Object.keys(polyfills), utils);\n if (entryInjectRegenerator) {\n utils.injectGlobalImport(\"regenerator-runtime/runtime.js\");\n }\n path.remove();\n }\n },\n usageGlobal(meta, utils) {\n const resolved = resolve(meta);\n if (!resolved) return;\n let deps = resolved.desc.global;\n if (resolved.kind !== \"global\" && \"object\" in meta && meta.object && meta.placement === \"prototype\") {\n const low = meta.object.toLowerCase();\n deps = deps.filter(m => m.includes(low));\n }\n inject(deps, utils);\n },\n usagePure(meta, utils, path) {\n if (meta.kind === \"in\") {\n if (meta.key === \"Symbol.iterator\") {\n path.replaceWith(t.callExpression(utils.injectDefaultImport(`${coreJSBase}/is-iterable${ext}`, \"isIterable\"), [path.node.right] // meta.kind === \"in\" narrows this\n ));\n }\n\n return;\n }\n if (path.parentPath.isUnaryExpression({\n operator: \"delete\"\n })) return;\n if (meta.kind === \"property\") {\n // We can't compile destructuring.\n if (!path.isMemberExpression()) return;\n if (!path.isReferenced()) return;\n if (meta.key === \"Symbol.iterator\" && shouldInjectPolyfill(\"es6.symbol\") && path.parentPath.isCallExpression({\n callee: path.node\n }) && path.parentPath.node.arguments.length === 0) {\n path.parentPath.replaceWith(t.callExpression(utils.injectDefaultImport(`${coreJSBase}/get-iterator${ext}`, \"getIterator\"), [path.node.object]));\n path.skip();\n return;\n }\n }\n const resolved = resolve(meta);\n if (!resolved) return;\n const id = maybeInjectPure(resolved.desc, resolved.name, utils);\n if (id) path.replaceWith(id);\n },\n visitor: method === \"usage-global\" && {\n // yield*\n YieldExpression(path) {\n if (path.node.delegate) {\n inject(\"web.dom.iterable\", api.getUtils(path));\n }\n },\n // for-of, [a, b] = c\n \"ForOfStatement|ArrayPattern\"(path) {\n _builtInDefinitions.CommonIterators.forEach(name => inject(name, api.getUtils(path)));\n }\n }\n };\n});\nexports.default = _default;","// env vars from the cli are always strings, so !!ENV_VAR returns true for \"false\"\nfunction bool(value) {\n if (value == null) return false;\n return value && value !== \"false\" && value !== \"0\";\n}\n\nmodule.exports = bool(process.env[\"BABEL_8_BREAKING\"])\n ? null\n : require(\"babel-plugin-polyfill-corejs2-BABEL_8_BREAKING-false\");\n","module.exports = require(\"core-js-compat/data\");\n","\"use strict\";\n\nexports.__esModule = true;\nexports.default = void 0;\n// This file is automatically generated by scripts/build-corejs3-shipped-proposals.mjs\nvar _default = new Set([\"esnext.suppressed-error.constructor\", \"esnext.array.from-async\", \"esnext.array.group\", \"esnext.array.group-to-map\", \"esnext.iterator.constructor\", \"esnext.iterator.drop\", \"esnext.iterator.every\", \"esnext.iterator.filter\", \"esnext.iterator.find\", \"esnext.iterator.flat-map\", \"esnext.iterator.for-each\", \"esnext.iterator.from\", \"esnext.iterator.map\", \"esnext.iterator.reduce\", \"esnext.iterator.some\", \"esnext.iterator.take\", \"esnext.iterator.to-array\", \"esnext.json.is-raw-json\", \"esnext.json.parse\", \"esnext.json.raw-json\", \"esnext.set.difference.v2\", \"esnext.set.intersection.v2\", \"esnext.set.is-disjoint-from.v2\", \"esnext.set.is-subset-of.v2\", \"esnext.set.is-superset-of.v2\", \"esnext.set.symmetric-difference.v2\", \"esnext.set.union.v2\", \"esnext.symbol.async-dispose\", \"esnext.symbol.dispose\", \"esnext.symbol.metadata\"]);\nexports.default = _default;","'use strict';\n// eslint-disable-next-line es/no-object-hasown -- safe\nconst has = Object.hasOwn || Function.call.bind({}.hasOwnProperty);\n\nfunction semver(input) {\n if (input instanceof semver) return input;\n // eslint-disable-next-line new-cap -- ok\n if (!(this instanceof semver)) return new semver(input);\n const match = /(\\d+)(?:\\.(\\d+))?(?:\\.(\\d+))?/.exec(input);\n if (!match) throw new TypeError(`Invalid version: ${ input }`);\n const [, $major, $minor, $patch] = match;\n this.major = +$major;\n this.minor = $minor ? +$minor : 0;\n this.patch = $patch ? +$patch : 0;\n}\n\nsemver.prototype.toString = function () {\n return `${ this.major }.${ this.minor }.${ this.patch }`;\n};\n\nfunction compare($a, operator, $b) {\n const a = semver($a);\n const b = semver($b);\n for (const component of ['major', 'minor', 'patch']) {\n if (a[component] < b[component]) return operator === '<' || operator === '<=' || operator === '!=';\n if (a[component] > b[component]) return operator === '>' || operator === '>=' || operator === '!=';\n } return operator === '==' || operator === '<=' || operator === '>=';\n}\n\nfunction filterOutStabilizedProposals(modules) {\n const modulesSet = new Set(modules);\n\n for (const $module of modulesSet) {\n if ($module.startsWith('esnext.') && modulesSet.has($module.replace(/^esnext\\./, 'es.'))) {\n modulesSet.delete($module);\n }\n }\n\n return [...modulesSet];\n}\n\nfunction intersection(list, order) {\n const set = list instanceof Set ? list : new Set(list);\n return order.filter(name => set.has(name));\n}\n\nfunction sortObjectByKey(object, fn) {\n return Object.keys(object).sort(fn).reduce((memo, key) => {\n memo[key] = object[key];\n return memo;\n }, {});\n}\n\nmodule.exports = {\n compare,\n filterOutStabilizedProposals,\n has,\n intersection,\n semver,\n sortObjectByKey,\n};\n","'use strict';\nconst { compare, intersection, semver } = require('./helpers');\nconst modulesByVersions = require('./modules-by-versions');\nconst modules = require('./modules');\n\nmodule.exports = function (raw) {\n const corejs = semver(raw);\n if (corejs.major !== 3) {\n throw new RangeError('This version of `core-js-compat` works only with `core-js@3`.');\n }\n const result = [];\n for (const version of Object.keys(modulesByVersions)) {\n if (compare(version, '<=', corejs)) {\n result.push(...modulesByVersions[version]);\n }\n }\n return intersection(result, modules);\n};\n","module.exports = require(\"core-js-compat/get-modules-list-for-target-version\");\n","\"use strict\";\n\nexports.__esModule = true;\nexports.StaticProperties = exports.PromiseDependenciesWithIterators = exports.PromiseDependencies = exports.InstanceProperties = exports.DecoratorMetadataDependencies = exports.CommonIterators = exports.BuiltIns = void 0;\nvar _data = _interopRequireDefault(require(\"../core-js-compat/data.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nfunction _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nconst polyfillsOrder = {};\nObject.keys(_data.default).forEach((name, index) => {\n polyfillsOrder[name] = index;\n});\nconst define = (pure, global, name = global[0], exclude) => {\n return {\n name,\n pure,\n global: global.sort((a, b) => polyfillsOrder[a] - polyfillsOrder[b]),\n exclude\n };\n};\nconst typed = (...modules) => define(null, [...modules, ...TypedArrayDependencies]);\nconst ArrayNatureIterators = [\"es.array.iterator\", \"web.dom-collections.iterator\"];\nconst CommonIterators = [\"es.string.iterator\", ...ArrayNatureIterators];\nexports.CommonIterators = CommonIterators;\nconst ArrayNatureIteratorsWithTag = [\"es.object.to-string\", ...ArrayNatureIterators];\nconst CommonIteratorsWithTag = [\"es.object.to-string\", ...CommonIterators];\nconst ErrorDependencies = [\"es.error.cause\", \"es.error.to-string\"];\nconst SuppressedErrorDependencies = [\"esnext.suppressed-error.constructor\", ...ErrorDependencies];\nconst TypedArrayDependencies = [\"es.typed-array.at\", \"es.typed-array.copy-within\", \"es.typed-array.every\", \"es.typed-array.fill\", \"es.typed-array.filter\", \"es.typed-array.find\", \"es.typed-array.find-index\", \"es.typed-array.find-last\", \"es.typed-array.find-last-index\", \"es.typed-array.for-each\", \"es.typed-array.includes\", \"es.typed-array.index-of\", \"es.typed-array.iterator\", \"es.typed-array.join\", \"es.typed-array.last-index-of\", \"es.typed-array.map\", \"es.typed-array.reduce\", \"es.typed-array.reduce-right\", \"es.typed-array.reverse\", \"es.typed-array.set\", \"es.typed-array.slice\", \"es.typed-array.some\", \"es.typed-array.sort\", \"es.typed-array.subarray\", \"es.typed-array.to-locale-string\", \"es.typed-array.to-reversed\", \"es.typed-array.to-sorted\", \"es.typed-array.to-string\", \"es.typed-array.with\", \"es.object.to-string\", \"es.array.iterator\", \"es.array-buffer.slice\", \"es.data-view\", \"es.array-buffer.detached\", \"es.array-buffer.transfer\", \"es.array-buffer.transfer-to-fixed-length\", \"esnext.typed-array.filter-reject\", \"esnext.typed-array.group-by\", \"esnext.typed-array.to-spliced\", \"esnext.typed-array.unique-by\"];\nconst PromiseDependencies = [\"es.promise\", \"es.object.to-string\"];\nexports.PromiseDependencies = PromiseDependencies;\nconst PromiseDependenciesWithIterators = [...PromiseDependencies, ...CommonIterators];\nexports.PromiseDependenciesWithIterators = PromiseDependenciesWithIterators;\nconst SymbolDependencies = [\"es.symbol\", \"es.symbol.description\", \"es.object.to-string\"];\nconst MapDependencies = [\"es.map\", \"esnext.map.delete-all\", \"esnext.map.emplace\", \"esnext.map.every\", \"esnext.map.filter\", \"esnext.map.find\", \"esnext.map.find-key\", \"esnext.map.includes\", \"esnext.map.key-of\", \"esnext.map.map-keys\", \"esnext.map.map-values\", \"esnext.map.merge\", \"esnext.map.reduce\", \"esnext.map.some\", \"esnext.map.update\", ...CommonIteratorsWithTag];\nconst SetDependencies = [\"es.set\", \"esnext.set.add-all\", \"esnext.set.delete-all\", \"esnext.set.difference\", \"esnext.set.difference.v2\", \"esnext.set.every\", \"esnext.set.filter\", \"esnext.set.find\", \"esnext.set.intersection\", \"esnext.set.intersection.v2\", \"esnext.set.is-disjoint-from\", \"esnext.set.is-disjoint-from.v2\", \"esnext.set.is-subset-of\", \"esnext.set.is-subset-of.v2\", \"esnext.set.is-superset-of\", \"esnext.set.is-superset-of.v2\", \"esnext.set.join\", \"esnext.set.map\", \"esnext.set.reduce\", \"esnext.set.some\", \"esnext.set.symmetric-difference\", \"esnext.set.symmetric-difference.v2\", \"esnext.set.union\", \"esnext.set.union.v2\", ...CommonIteratorsWithTag];\nconst WeakMapDependencies = [\"es.weak-map\", \"esnext.weak-map.delete-all\", \"esnext.weak-map.emplace\", ...CommonIteratorsWithTag];\nconst WeakSetDependencies = [\"es.weak-set\", \"esnext.weak-set.add-all\", \"esnext.weak-set.delete-all\", ...CommonIteratorsWithTag];\nconst DOMExceptionDependencies = [\"web.dom-exception.constructor\", \"web.dom-exception.stack\", \"web.dom-exception.to-string-tag\", \"es.error.to-string\"];\nconst URLSearchParamsDependencies = [\"web.url-search-params\", \"web.url-search-params.delete\", \"web.url-search-params.has\", \"web.url-search-params.size\", ...CommonIteratorsWithTag];\nconst AsyncIteratorDependencies = [\"esnext.async-iterator.constructor\", ...PromiseDependencies];\nconst AsyncIteratorProblemMethods = [\"esnext.async-iterator.every\", \"esnext.async-iterator.filter\", \"esnext.async-iterator.find\", \"esnext.async-iterator.flat-map\", \"esnext.async-iterator.for-each\", \"esnext.async-iterator.map\", \"esnext.async-iterator.reduce\", \"esnext.async-iterator.some\"];\nconst IteratorDependencies = [\"esnext.iterator.constructor\", \"es.object.to-string\"];\nconst DecoratorMetadataDependencies = [\"esnext.symbol.metadata\", \"esnext.function.metadata\"];\nexports.DecoratorMetadataDependencies = DecoratorMetadataDependencies;\nconst TypedArrayStaticMethods = base => ({\n from: define(null, [\"es.typed-array.from\", base, ...TypedArrayDependencies]),\n fromAsync: define(null, [\"esnext.typed-array.from-async\", base, ...PromiseDependenciesWithIterators, ...TypedArrayDependencies]),\n of: define(null, [\"es.typed-array.of\", base, ...TypedArrayDependencies])\n});\nconst DataViewDependencies = [\"es.data-view\", \"es.array-buffer.constructor\", \"es.array-buffer.slice\", \"es.array-buffer.detached\", \"es.array-buffer.transfer\", \"es.array-buffer.transfer-to-fixed-length\", \"es.object.to-string\"];\nconst BuiltIns = {\n AsyncDisposableStack: define(\"async-disposable-stack/index\", [\"esnext.async-disposable-stack.constructor\", \"es.object.to-string\", \"esnext.async-iterator.async-dispose\", \"esnext.iterator.dispose\", ...PromiseDependencies, ...SuppressedErrorDependencies]),\n AsyncIterator: define(\"async-iterator/index\", AsyncIteratorDependencies),\n AggregateError: define(\"aggregate-error\", [\"es.aggregate-error\", ...ErrorDependencies, ...CommonIteratorsWithTag, \"es.aggregate-error.cause\"]),\n ArrayBuffer: define(null, [\"es.array-buffer.constructor\", \"es.array-buffer.slice\", \"es.data-view\", \"es.array-buffer.detached\", \"es.array-buffer.transfer\", \"es.array-buffer.transfer-to-fixed-length\", \"es.object.to-string\"]),\n DataView: define(null, DataViewDependencies),\n Date: define(null, [\"es.date.to-string\"]),\n DOMException: define(\"dom-exception/index\", DOMExceptionDependencies),\n DisposableStack: define(\"disposable-stack/index\", [\"esnext.disposable-stack.constructor\", \"es.object.to-string\", \"esnext.iterator.dispose\", ...SuppressedErrorDependencies]),\n Error: define(null, ErrorDependencies),\n EvalError: define(null, ErrorDependencies),\n Float32Array: typed(\"es.typed-array.float32-array\"),\n Float64Array: typed(\"es.typed-array.float64-array\"),\n Int8Array: typed(\"es.typed-array.int8-array\"),\n Int16Array: typed(\"es.typed-array.int16-array\"),\n Int32Array: typed(\"es.typed-array.int32-array\"),\n Iterator: define(\"iterator/index\", IteratorDependencies),\n Uint8Array: typed(\"es.typed-array.uint8-array\", \"esnext.uint8-array.to-base64\", \"esnext.uint8-array.to-hex\"),\n Uint8ClampedArray: typed(\"es.typed-array.uint8-clamped-array\"),\n Uint16Array: typed(\"es.typed-array.uint16-array\"),\n Uint32Array: typed(\"es.typed-array.uint32-array\"),\n Map: define(\"map/index\", MapDependencies),\n Number: define(null, [\"es.number.constructor\"]),\n Observable: define(\"observable/index\", [\"esnext.observable\", \"esnext.symbol.observable\", \"es.object.to-string\", ...CommonIteratorsWithTag]),\n Promise: define(\"promise/index\", PromiseDependencies),\n RangeError: define(null, ErrorDependencies),\n ReferenceError: define(null, ErrorDependencies),\n Reflect: define(null, [\"es.reflect.to-string-tag\", \"es.object.to-string\"]),\n RegExp: define(null, [\"es.regexp.constructor\", \"es.regexp.dot-all\", \"es.regexp.exec\", \"es.regexp.sticky\", \"es.regexp.to-string\"]),\n Set: define(\"set/index\", SetDependencies),\n SuppressedError: define(\"suppressed-error\", SuppressedErrorDependencies),\n Symbol: define(\"symbol/index\", SymbolDependencies),\n SyntaxError: define(null, ErrorDependencies),\n TypeError: define(null, ErrorDependencies),\n URIError: define(null, ErrorDependencies),\n URL: define(\"url/index\", [\"web.url\", \"web.url.to-json\", ...URLSearchParamsDependencies]),\n URLSearchParams: define(\"url-search-params/index\", URLSearchParamsDependencies),\n WeakMap: define(\"weak-map/index\", WeakMapDependencies),\n WeakSet: define(\"weak-set/index\", WeakSetDependencies),\n atob: define(\"atob\", [\"web.atob\", ...DOMExceptionDependencies]),\n btoa: define(\"btoa\", [\"web.btoa\", ...DOMExceptionDependencies]),\n clearImmediate: define(\"clear-immediate\", [\"web.immediate\"]),\n compositeKey: define(\"composite-key\", [\"esnext.composite-key\"]),\n compositeSymbol: define(\"composite-symbol\", [\"esnext.composite-symbol\"]),\n escape: define(\"escape\", [\"es.escape\"]),\n fetch: define(null, PromiseDependencies),\n globalThis: define(\"global-this\", [\"es.global-this\"]),\n parseFloat: define(\"parse-float\", [\"es.parse-float\"]),\n parseInt: define(\"parse-int\", [\"es.parse-int\"]),\n queueMicrotask: define(\"queue-microtask\", [\"web.queue-microtask\"]),\n self: define(\"self\", [\"web.self\"]),\n setImmediate: define(\"set-immediate\", [\"web.immediate\"]),\n setInterval: define(\"set-interval\", [\"web.timers\"]),\n setTimeout: define(\"set-timeout\", [\"web.timers\"]),\n structuredClone: define(\"structured-clone\", [\"web.structured-clone\", ...DOMExceptionDependencies, \"es.array.iterator\", \"es.object.keys\", \"es.object.to-string\", \"es.map\", \"es.set\"]),\n unescape: define(\"unescape\", [\"es.unescape\"])\n};\nexports.BuiltIns = BuiltIns;\nconst StaticProperties = {\n AsyncIterator: {\n from: define(\"async-iterator/from\", [\"esnext.async-iterator.from\", ...AsyncIteratorDependencies, ...AsyncIteratorProblemMethods, ...CommonIterators])\n },\n Array: {\n from: define(\"array/from\", [\"es.array.from\", \"es.string.iterator\"]),\n fromAsync: define(\"array/from-async\", [\"esnext.array.from-async\", ...PromiseDependenciesWithIterators]),\n isArray: define(\"array/is-array\", [\"es.array.is-array\"]),\n isTemplateObject: define(\"array/is-template-object\", [\"esnext.array.is-template-object\"]),\n of: define(\"array/of\", [\"es.array.of\"])\n },\n ArrayBuffer: {\n isView: define(null, [\"es.array-buffer.is-view\"])\n },\n BigInt: {\n range: define(\"bigint/range\", [\"esnext.bigint.range\", \"es.object.to-string\"])\n },\n Date: {\n now: define(\"date/now\", [\"es.date.now\"])\n },\n Function: {\n isCallable: define(\"function/is-callable\", [\"esnext.function.is-callable\"]),\n isConstructor: define(\"function/is-constructor\", [\"esnext.function.is-constructor\"])\n },\n Iterator: {\n from: define(\"iterator/from\", [\"esnext.iterator.from\", ...IteratorDependencies, ...CommonIterators]),\n range: define(\"iterator/range\", [\"esnext.iterator.range\", \"es.object.to-string\"])\n },\n JSON: {\n isRawJSON: define(\"json/is-raw-json\", [\"esnext.json.is-raw-json\"]),\n parse: define(\"json/parse\", [\"esnext.json.parse\", \"es.object.keys\"]),\n rawJSON: define(\"json/raw-json\", [\"esnext.json.raw-json\", \"es.object.create\", \"es.object.freeze\"]),\n stringify: define(\"json/stringify\", [\"es.json.stringify\", \"es.date.to-json\"], \"es.symbol\")\n },\n Math: {\n DEG_PER_RAD: define(\"math/deg-per-rad\", [\"esnext.math.deg-per-rad\"]),\n RAD_PER_DEG: define(\"math/rad-per-deg\", [\"esnext.math.rad-per-deg\"]),\n acosh: define(\"math/acosh\", [\"es.math.acosh\"]),\n asinh: define(\"math/asinh\", [\"es.math.asinh\"]),\n atanh: define(\"math/atanh\", [\"es.math.atanh\"]),\n cbrt: define(\"math/cbrt\", [\"es.math.cbrt\"]),\n clamp: define(\"math/clamp\", [\"esnext.math.clamp\"]),\n clz32: define(\"math/clz32\", [\"es.math.clz32\"]),\n cosh: define(\"math/cosh\", [\"es.math.cosh\"]),\n degrees: define(\"math/degrees\", [\"esnext.math.degrees\"]),\n expm1: define(\"math/expm1\", [\"es.math.expm1\"]),\n fround: define(\"math/fround\", [\"es.math.fround\"]),\n f16round: define(\"math/f16round\", [\"esnext.math.f16round\"]),\n fscale: define(\"math/fscale\", [\"esnext.math.fscale\"]),\n hypot: define(\"math/hypot\", [\"es.math.hypot\"]),\n iaddh: define(\"math/iaddh\", [\"esnext.math.iaddh\"]),\n imul: define(\"math/imul\", [\"es.math.imul\"]),\n imulh: define(\"math/imulh\", [\"esnext.math.imulh\"]),\n isubh: define(\"math/isubh\", [\"esnext.math.isubh\"]),\n log10: define(\"math/log10\", [\"es.math.log10\"]),\n log1p: define(\"math/log1p\", [\"es.math.log1p\"]),\n log2: define(\"math/log2\", [\"es.math.log2\"]),\n radians: define(\"math/radians\", [\"esnext.math.radians\"]),\n scale: define(\"math/scale\", [\"esnext.math.scale\"]),\n seededPRNG: define(\"math/seeded-prng\", [\"esnext.math.seeded-prng\"]),\n sign: define(\"math/sign\", [\"es.math.sign\"]),\n signbit: define(\"math/signbit\", [\"esnext.math.signbit\"]),\n sinh: define(\"math/sinh\", [\"es.math.sinh\"]),\n tanh: define(\"math/tanh\", [\"es.math.tanh\"]),\n trunc: define(\"math/trunc\", [\"es.math.trunc\"]),\n umulh: define(\"math/umulh\", [\"esnext.math.umulh\"])\n },\n Map: {\n from: define(null, [\"esnext.map.from\", ...MapDependencies]),\n groupBy: define(\"map/group-by\", [\"es.map.group-by\", ...MapDependencies]),\n keyBy: define(\"map/key-by\", [\"esnext.map.key-by\", ...MapDependencies]),\n of: define(null, [\"esnext.map.of\", ...MapDependencies])\n },\n Number: {\n EPSILON: define(\"number/epsilon\", [\"es.number.epsilon\"]),\n MAX_SAFE_INTEGER: define(\"number/max-safe-integer\", [\"es.number.max-safe-integer\"]),\n MIN_SAFE_INTEGER: define(\"number/min-safe-integer\", [\"es.number.min-safe-integer\"]),\n fromString: define(\"number/from-string\", [\"esnext.number.from-string\"]),\n isFinite: define(\"number/is-finite\", [\"es.number.is-finite\"]),\n isInteger: define(\"number/is-integer\", [\"es.number.is-integer\"]),\n isNaN: define(\"number/is-nan\", [\"es.number.is-nan\"]),\n isSafeInteger: define(\"number/is-safe-integer\", [\"es.number.is-safe-integer\"]),\n parseFloat: define(\"number/parse-float\", [\"es.number.parse-float\"]),\n parseInt: define(\"number/parse-int\", [\"es.number.parse-int\"]),\n range: define(\"number/range\", [\"esnext.number.range\", \"es.object.to-string\"])\n },\n Object: {\n assign: define(\"object/assign\", [\"es.object.assign\"]),\n create: define(\"object/create\", [\"es.object.create\"]),\n defineProperties: define(\"object/define-properties\", [\"es.object.define-properties\"]),\n defineProperty: define(\"object/define-property\", [\"es.object.define-property\"]),\n entries: define(\"object/entries\", [\"es.object.entries\"]),\n freeze: define(\"object/freeze\", [\"es.object.freeze\"]),\n fromEntries: define(\"object/from-entries\", [\"es.object.from-entries\", \"es.array.iterator\"]),\n getOwnPropertyDescriptor: define(\"object/get-own-property-descriptor\", [\"es.object.get-own-property-descriptor\"]),\n getOwnPropertyDescriptors: define(\"object/get-own-property-descriptors\", [\"es.object.get-own-property-descriptors\"]),\n getOwnPropertyNames: define(\"object/get-own-property-names\", [\"es.object.get-own-property-names\"]),\n getOwnPropertySymbols: define(\"object/get-own-property-symbols\", [\"es.symbol\"]),\n getPrototypeOf: define(\"object/get-prototype-of\", [\"es.object.get-prototype-of\"]),\n groupBy: define(\"object/group-by\", [\"es.object.group-by\", \"es.object.create\"]),\n hasOwn: define(\"object/has-own\", [\"es.object.has-own\"]),\n is: define(\"object/is\", [\"es.object.is\"]),\n isExtensible: define(\"object/is-extensible\", [\"es.object.is-extensible\"]),\n isFrozen: define(\"object/is-frozen\", [\"es.object.is-frozen\"]),\n isSealed: define(\"object/is-sealed\", [\"es.object.is-sealed\"]),\n keys: define(\"object/keys\", [\"es.object.keys\"]),\n preventExtensions: define(\"object/prevent-extensions\", [\"es.object.prevent-extensions\"]),\n seal: define(\"object/seal\", [\"es.object.seal\"]),\n setPrototypeOf: define(\"object/set-prototype-of\", [\"es.object.set-prototype-of\"]),\n values: define(\"object/values\", [\"es.object.values\"])\n },\n Promise: {\n all: define(null, PromiseDependenciesWithIterators),\n allSettled: define(\"promise/all-settled\", [\"es.promise.all-settled\", ...PromiseDependenciesWithIterators]),\n any: define(\"promise/any\", [\"es.promise.any\", \"es.aggregate-error\", ...PromiseDependenciesWithIterators]),\n race: define(null, PromiseDependenciesWithIterators),\n try: define(\"promise/try\", [\"esnext.promise.try\", ...PromiseDependencies]),\n withResolvers: define(\"promise/with-resolvers\", [\"es.promise.with-resolvers\", ...PromiseDependencies])\n },\n Reflect: {\n apply: define(\"reflect/apply\", [\"es.reflect.apply\"]),\n construct: define(\"reflect/construct\", [\"es.reflect.construct\"]),\n defineMetadata: define(\"reflect/define-metadata\", [\"esnext.reflect.define-metadata\"]),\n defineProperty: define(\"reflect/define-property\", [\"es.reflect.define-property\"]),\n deleteMetadata: define(\"reflect/delete-metadata\", [\"esnext.reflect.delete-metadata\"]),\n deleteProperty: define(\"reflect/delete-property\", [\"es.reflect.delete-property\"]),\n get: define(\"reflect/get\", [\"es.reflect.get\"]),\n getMetadata: define(\"reflect/get-metadata\", [\"esnext.reflect.get-metadata\"]),\n getMetadataKeys: define(\"reflect/get-metadata-keys\", [\"esnext.reflect.get-metadata-keys\"]),\n getOwnMetadata: define(\"reflect/get-own-metadata\", [\"esnext.reflect.get-own-metadata\"]),\n getOwnMetadataKeys: define(\"reflect/get-own-metadata-keys\", [\"esnext.reflect.get-own-metadata-keys\"]),\n getOwnPropertyDescriptor: define(\"reflect/get-own-property-descriptor\", [\"es.reflect.get-own-property-descriptor\"]),\n getPrototypeOf: define(\"reflect/get-prototype-of\", [\"es.reflect.get-prototype-of\"]),\n has: define(\"reflect/has\", [\"es.reflect.has\"]),\n hasMetadata: define(\"reflect/has-metadata\", [\"esnext.reflect.has-metadata\"]),\n hasOwnMetadata: define(\"reflect/has-own-metadata\", [\"esnext.reflect.has-own-metadata\"]),\n isExtensible: define(\"reflect/is-extensible\", [\"es.reflect.is-extensible\"]),\n metadata: define(\"reflect/metadata\", [\"esnext.reflect.metadata\"]),\n ownKeys: define(\"reflect/own-keys\", [\"es.reflect.own-keys\"]),\n preventExtensions: define(\"reflect/prevent-extensions\", [\"es.reflect.prevent-extensions\"]),\n set: define(\"reflect/set\", [\"es.reflect.set\"]),\n setPrototypeOf: define(\"reflect/set-prototype-of\", [\"es.reflect.set-prototype-of\"])\n },\n RegExp: {\n escape: define(\"regexp/escape\", [\"esnext.regexp.escape\"])\n },\n Set: {\n from: define(null, [\"esnext.set.from\", ...SetDependencies]),\n of: define(null, [\"esnext.set.of\", ...SetDependencies])\n },\n String: {\n cooked: define(\"string/cooked\", [\"esnext.string.cooked\"]),\n dedent: define(\"string/dedent\", [\"esnext.string.dedent\", \"es.string.from-code-point\", \"es.weak-map\"]),\n fromCodePoint: define(\"string/from-code-point\", [\"es.string.from-code-point\"]),\n raw: define(\"string/raw\", [\"es.string.raw\"])\n },\n Symbol: {\n asyncDispose: define(\"symbol/async-dispose\", [\"esnext.symbol.async-dispose\", \"esnext.async-iterator.async-dispose\"]),\n asyncIterator: define(\"symbol/async-iterator\", [\"es.symbol.async-iterator\"]),\n dispose: define(\"symbol/dispose\", [\"esnext.symbol.dispose\", \"esnext.iterator.dispose\"]),\n for: define(\"symbol/for\", [], \"es.symbol\"),\n hasInstance: define(\"symbol/has-instance\", [\"es.symbol.has-instance\", \"es.function.has-instance\"]),\n isConcatSpreadable: define(\"symbol/is-concat-spreadable\", [\"es.symbol.is-concat-spreadable\", \"es.array.concat\"]),\n isRegistered: define(\"symbol/is-registered\", [\"esnext.symbol.is-registered\", \"es.symbol\"]),\n isRegisteredSymbol: define(\"symbol/is-registered-symbol\", [\"esnext.symbol.is-registered-symbol\", \"es.symbol\"]),\n isWellKnown: define(\"symbol/is-well-known\", [\"esnext.symbol.is-well-known\", \"es.symbol\"]),\n isWellKnownSymbol: define(\"symbol/is-well-known-symbol\", [\"esnext.symbol.is-well-known-symbol\", \"es.symbol\"]),\n iterator: define(\"symbol/iterator\", [\"es.symbol.iterator\", ...CommonIteratorsWithTag]),\n keyFor: define(\"symbol/key-for\", [], \"es.symbol\"),\n match: define(\"symbol/match\", [\"es.symbol.match\", \"es.string.match\"]),\n matcher: define(\"symbol/matcher\", [\"esnext.symbol.matcher\"]),\n matchAll: define(\"symbol/match-all\", [\"es.symbol.match-all\", \"es.string.match-all\"]),\n metadata: define(\"symbol/metadata\", DecoratorMetadataDependencies),\n metadataKey: define(\"symbol/metadata-key\", [\"esnext.symbol.metadata-key\"]),\n observable: define(\"symbol/observable\", [\"esnext.symbol.observable\"]),\n patternMatch: define(\"symbol/pattern-match\", [\"esnext.symbol.pattern-match\"]),\n replace: define(\"symbol/replace\", [\"es.symbol.replace\", \"es.string.replace\"]),\n search: define(\"symbol/search\", [\"es.symbol.search\", \"es.string.search\"]),\n species: define(\"symbol/species\", [\"es.symbol.species\", \"es.array.species\"]),\n split: define(\"symbol/split\", [\"es.symbol.split\", \"es.string.split\"]),\n toPrimitive: define(\"symbol/to-primitive\", [\"es.symbol.to-primitive\", \"es.date.to-primitive\"]),\n toStringTag: define(\"symbol/to-string-tag\", [\"es.symbol.to-string-tag\", \"es.object.to-string\", \"es.math.to-string-tag\", \"es.json.to-string-tag\"]),\n unscopables: define(\"symbol/unscopables\", [\"es.symbol.unscopables\"])\n },\n URL: {\n canParse: define(\"url/can-parse\", [\"web.url.can-parse\", \"web.url\"])\n },\n WeakMap: {\n from: define(null, [\"esnext.weak-map.from\", ...WeakMapDependencies]),\n of: define(null, [\"esnext.weak-map.of\", ...WeakMapDependencies])\n },\n WeakSet: {\n from: define(null, [\"esnext.weak-set.from\", ...WeakSetDependencies]),\n of: define(null, [\"esnext.weak-set.of\", ...WeakSetDependencies])\n },\n Int8Array: TypedArrayStaticMethods(\"es.typed-array.int8-array\"),\n Uint8Array: _extends({\n fromBase64: define(null, [\"esnext.uint8-array.from-base64\", ...TypedArrayDependencies]),\n fromHex: define(null, [\"esnext.uint8-array.from-hex\", ...TypedArrayDependencies])\n }, TypedArrayStaticMethods(\"es.typed-array.uint8-array\")),\n Uint8ClampedArray: TypedArrayStaticMethods(\"es.typed-array.uint8-clamped-array\"),\n Int16Array: TypedArrayStaticMethods(\"es.typed-array.int16-array\"),\n Uint16Array: TypedArrayStaticMethods(\"es.typed-array.uint16-array\"),\n Int32Array: TypedArrayStaticMethods(\"es.typed-array.int32-array\"),\n Uint32Array: TypedArrayStaticMethods(\"es.typed-array.uint32-array\"),\n Float32Array: TypedArrayStaticMethods(\"es.typed-array.float32-array\"),\n Float64Array: TypedArrayStaticMethods(\"es.typed-array.float64-array\"),\n WebAssembly: {\n CompileError: define(null, ErrorDependencies),\n LinkError: define(null, ErrorDependencies),\n RuntimeError: define(null, ErrorDependencies)\n }\n};\nexports.StaticProperties = StaticProperties;\nconst InstanceProperties = {\n asIndexedPairs: define(\"instance/asIndexedPairs\", [\"esnext.async-iterator.as-indexed-pairs\", ...AsyncIteratorDependencies, \"esnext.iterator.as-indexed-pairs\", ...IteratorDependencies]),\n at: define(\"instance/at\", [\n // TODO: We should introduce overloaded instance methods definition\n // Before that is implemented, the `esnext.string.at` must be the first\n // In pure mode, the provider resolves the descriptor as a \"pure\" `esnext.string.at`\n // and treats the compat-data of `esnext.string.at` as the compat-data of\n // pure import `instance/at`. The first polyfill here should have the lowest corejs\n // supported versions.\n \"esnext.string.at\", \"es.string.at-alternative\", \"es.array.at\"]),\n anchor: define(null, [\"es.string.anchor\"]),\n big: define(null, [\"es.string.big\"]),\n bind: define(\"instance/bind\", [\"es.function.bind\"]),\n blink: define(null, [\"es.string.blink\"]),\n bold: define(null, [\"es.string.bold\"]),\n codePointAt: define(\"instance/code-point-at\", [\"es.string.code-point-at\"]),\n codePoints: define(\"instance/code-points\", [\"esnext.string.code-points\"]),\n concat: define(\"instance/concat\", [\"es.array.concat\"], undefined, [\"String\"]),\n copyWithin: define(\"instance/copy-within\", [\"es.array.copy-within\"]),\n demethodize: define(\"instance/demethodize\", [\"esnext.function.demethodize\"]),\n description: define(null, [\"es.symbol\", \"es.symbol.description\"]),\n dotAll: define(null, [\"es.regexp.dot-all\"]),\n drop: define(null, [\"esnext.async-iterator.drop\", ...AsyncIteratorDependencies, \"esnext.iterator.drop\", ...IteratorDependencies]),\n emplace: define(\"instance/emplace\", [\"esnext.map.emplace\", \"esnext.weak-map.emplace\"]),\n endsWith: define(\"instance/ends-with\", [\"es.string.ends-with\"]),\n entries: define(\"instance/entries\", ArrayNatureIteratorsWithTag),\n every: define(\"instance/every\", [\"es.array.every\", \"esnext.async-iterator.every\",\n // TODO: add async iterator dependencies when we support sub-dependencies\n // esnext.async-iterator.every depends on es.promise\n // but we don't want to pull es.promise when esnext.async-iterator is disabled\n //\n // ...AsyncIteratorDependencies\n \"esnext.iterator.every\", ...IteratorDependencies]),\n exec: define(null, [\"es.regexp.exec\"]),\n fill: define(\"instance/fill\", [\"es.array.fill\"]),\n filter: define(\"instance/filter\", [\"es.array.filter\", \"esnext.async-iterator.filter\", \"esnext.iterator.filter\", ...IteratorDependencies]),\n filterReject: define(\"instance/filterReject\", [\"esnext.array.filter-reject\"]),\n finally: define(null, [\"es.promise.finally\", ...PromiseDependencies]),\n find: define(\"instance/find\", [\"es.array.find\", \"esnext.async-iterator.find\", \"esnext.iterator.find\", ...IteratorDependencies]),\n findIndex: define(\"instance/find-index\", [\"es.array.find-index\"]),\n findLast: define(\"instance/find-last\", [\"es.array.find-last\"]),\n findLastIndex: define(\"instance/find-last-index\", [\"es.array.find-last-index\"]),\n fixed: define(null, [\"es.string.fixed\"]),\n flags: define(\"instance/flags\", [\"es.regexp.flags\"]),\n flatMap: define(\"instance/flat-map\", [\"es.array.flat-map\", \"es.array.unscopables.flat-map\", \"esnext.async-iterator.flat-map\", \"esnext.iterator.flat-map\", ...IteratorDependencies]),\n flat: define(\"instance/flat\", [\"es.array.flat\", \"es.array.unscopables.flat\"]),\n getFloat16: define(null, [\"esnext.data-view.get-float16\", ...DataViewDependencies]),\n getUint8Clamped: define(null, [\"esnext.data-view.get-uint8-clamped\", ...DataViewDependencies]),\n getYear: define(null, [\"es.date.get-year\"]),\n group: define(\"instance/group\", [\"esnext.array.group\"]),\n groupBy: define(\"instance/group-by\", [\"esnext.array.group-by\"]),\n groupByToMap: define(\"instance/group-by-to-map\", [\"esnext.array.group-by-to-map\", \"es.map\", \"es.object.to-string\"]),\n groupToMap: define(\"instance/group-to-map\", [\"esnext.array.group-to-map\", \"es.map\", \"es.object.to-string\"]),\n fontcolor: define(null, [\"es.string.fontcolor\"]),\n fontsize: define(null, [\"es.string.fontsize\"]),\n forEach: define(\"instance/for-each\", [\"es.array.for-each\", \"esnext.async-iterator.for-each\", \"esnext.iterator.for-each\", ...IteratorDependencies, \"web.dom-collections.for-each\"]),\n includes: define(\"instance/includes\", [\"es.array.includes\", \"es.string.includes\"]),\n indexed: define(null, [\"esnext.async-iterator.indexed\", ...AsyncIteratorDependencies, \"esnext.iterator.indexed\", ...IteratorDependencies]),\n indexOf: define(\"instance/index-of\", [\"es.array.index-of\"]),\n isWellFormed: define(\"instance/is-well-formed\", [\"es.string.is-well-formed\"]),\n italic: define(null, [\"es.string.italics\"]),\n join: define(null, [\"es.array.join\"]),\n keys: define(\"instance/keys\", ArrayNatureIteratorsWithTag),\n lastIndex: define(null, [\"esnext.array.last-index\"]),\n lastIndexOf: define(\"instance/last-index-of\", [\"es.array.last-index-of\"]),\n lastItem: define(null, [\"esnext.array.last-item\"]),\n link: define(null, [\"es.string.link\"]),\n map: define(\"instance/map\", [\"es.array.map\", \"esnext.async-iterator.map\", \"esnext.iterator.map\"]),\n match: define(null, [\"es.string.match\", \"es.regexp.exec\"]),\n matchAll: define(\"instance/match-all\", [\"es.string.match-all\", \"es.regexp.exec\"]),\n name: define(null, [\"es.function.name\"]),\n padEnd: define(\"instance/pad-end\", [\"es.string.pad-end\"]),\n padStart: define(\"instance/pad-start\", [\"es.string.pad-start\"]),\n push: define(\"instance/push\", [\"es.array.push\"]),\n reduce: define(\"instance/reduce\", [\"es.array.reduce\", \"esnext.async-iterator.reduce\", \"esnext.iterator.reduce\", ...IteratorDependencies]),\n reduceRight: define(\"instance/reduce-right\", [\"es.array.reduce-right\"]),\n repeat: define(\"instance/repeat\", [\"es.string.repeat\"]),\n replace: define(null, [\"es.string.replace\", \"es.regexp.exec\"]),\n replaceAll: define(\"instance/replace-all\", [\"es.string.replace-all\", \"es.string.replace\", \"es.regexp.exec\"]),\n reverse: define(\"instance/reverse\", [\"es.array.reverse\"]),\n search: define(null, [\"es.string.search\", \"es.regexp.exec\"]),\n setFloat16: define(null, [\"esnext.data-view.set-float16\", ...DataViewDependencies]),\n setUint8Clamped: define(null, [\"esnext.data-view.set-uint8-clamped\", ...DataViewDependencies]),\n setYear: define(null, [\"es.date.set-year\"]),\n slice: define(\"instance/slice\", [\"es.array.slice\"]),\n small: define(null, [\"es.string.small\"]),\n some: define(\"instance/some\", [\"es.array.some\", \"esnext.async-iterator.some\", \"esnext.iterator.some\", ...IteratorDependencies]),\n sort: define(\"instance/sort\", [\"es.array.sort\"]),\n splice: define(\"instance/splice\", [\"es.array.splice\"]),\n split: define(null, [\"es.string.split\", \"es.regexp.exec\"]),\n startsWith: define(\"instance/starts-with\", [\"es.string.starts-with\"]),\n sticky: define(null, [\"es.regexp.sticky\"]),\n strike: define(null, [\"es.string.strike\"]),\n sub: define(null, [\"es.string.sub\"]),\n substr: define(null, [\"es.string.substr\"]),\n sup: define(null, [\"es.string.sup\"]),\n take: define(null, [\"esnext.async-iterator.take\", ...AsyncIteratorDependencies, \"esnext.iterator.take\", ...IteratorDependencies]),\n test: define(null, [\"es.regexp.test\", \"es.regexp.exec\"]),\n toArray: define(null, [\"esnext.async-iterator.to-array\", ...AsyncIteratorDependencies, \"esnext.iterator.to-array\", ...IteratorDependencies]),\n toAsync: define(null, [\"esnext.iterator.to-async\", ...IteratorDependencies, ...AsyncIteratorDependencies, ...AsyncIteratorProblemMethods]),\n toExponential: define(null, [\"es.number.to-exponential\"]),\n toFixed: define(null, [\"es.number.to-fixed\"]),\n toGMTString: define(null, [\"es.date.to-gmt-string\"]),\n toISOString: define(null, [\"es.date.to-iso-string\"]),\n toJSON: define(null, [\"es.date.to-json\"]),\n toPrecision: define(null, [\"es.number.to-precision\"]),\n toReversed: define(\"instance/to-reversed\", [\"es.array.to-reversed\"]),\n toSorted: define(\"instance/to-sorted\", [\"es.array.to-sorted\", \"es.array.sort\"]),\n toSpliced: define(\"instance/to-spliced\", [\"es.array.to-spliced\"]),\n toString: define(null, [\"es.object.to-string\", \"es.error.to-string\", \"es.date.to-string\", \"es.regexp.to-string\"]),\n toWellFormed: define(\"instance/to-well-formed\", [\"es.string.to-well-formed\"]),\n trim: define(\"instance/trim\", [\"es.string.trim\"]),\n trimEnd: define(\"instance/trim-end\", [\"es.string.trim-end\"]),\n trimLeft: define(\"instance/trim-left\", [\"es.string.trim-start\"]),\n trimRight: define(\"instance/trim-right\", [\"es.string.trim-end\"]),\n trimStart: define(\"instance/trim-start\", [\"es.string.trim-start\"]),\n uniqueBy: define(\"instance/unique-by\", [\"esnext.array.unique-by\", \"es.map\"]),\n unshift: define(\"instance/unshift\", [\"es.array.unshift\"]),\n unThis: define(\"instance/un-this\", [\"esnext.function.un-this\"]),\n values: define(\"instance/values\", ArrayNatureIteratorsWithTag),\n with: define(\"instance/with\", [\"es.array.with\"]),\n __defineGetter__: define(null, [\"es.object.define-getter\"]),\n __defineSetter__: define(null, [\"es.object.define-setter\"]),\n __lookupGetter__: define(null, [\"es.object.lookup-getter\"]),\n __lookupSetter__: define(null, [\"es.object.lookup-setter\"]),\n [\"__proto__\"]: define(null, [\"es.object.proto\"])\n};\nexports.InstanceProperties = InstanceProperties;","\"use strict\";\n\nexports.__esModule = true;\nexports.stable = exports.proposals = void 0;\n// This file contains the list of paths supported by @babel/runtime-corejs3.\n// It must _not_ be edited, as all new features should go through direct\n// injection of core-js-pure imports.\n\nconst stable = new Set([\"array\", \"array/from\", \"array/is-array\", \"array/of\", \"clear-immediate\", \"date/now\", \"instance/bind\", \"instance/code-point-at\", \"instance/concat\", \"instance/copy-within\", \"instance/ends-with\", \"instance/entries\", \"instance/every\", \"instance/fill\", \"instance/filter\", \"instance/find\", \"instance/find-index\", \"instance/flags\", \"instance/flat\", \"instance/flat-map\", \"instance/for-each\", \"instance/includes\", \"instance/index-of\", \"instance/keys\", \"instance/last-index-of\", \"instance/map\", \"instance/pad-end\", \"instance/pad-start\", \"instance/reduce\", \"instance/reduce-right\", \"instance/repeat\", \"instance/reverse\", \"instance/slice\", \"instance/some\", \"instance/sort\", \"instance/splice\", \"instance/starts-with\", \"instance/trim\", \"instance/trim-end\", \"instance/trim-left\", \"instance/trim-right\", \"instance/trim-start\", \"instance/values\", \"json/stringify\", \"map\", \"math/acosh\", \"math/asinh\", \"math/atanh\", \"math/cbrt\", \"math/clz32\", \"math/cosh\", \"math/expm1\", \"math/fround\", \"math/hypot\", \"math/imul\", \"math/log10\", \"math/log1p\", \"math/log2\", \"math/sign\", \"math/sinh\", \"math/tanh\", \"math/trunc\", \"number/epsilon\", \"number/is-finite\", \"number/is-integer\", \"number/is-nan\", \"number/is-safe-integer\", \"number/max-safe-integer\", \"number/min-safe-integer\", \"number/parse-float\", \"number/parse-int\", \"object/assign\", \"object/create\", \"object/define-properties\", \"object/define-property\", \"object/entries\", \"object/freeze\", \"object/from-entries\", \"object/get-own-property-descriptor\", \"object/get-own-property-descriptors\", \"object/get-own-property-names\", \"object/get-own-property-symbols\", \"object/get-prototype-of\", \"object/is\", \"object/is-extensible\", \"object/is-frozen\", \"object/is-sealed\", \"object/keys\", \"object/prevent-extensions\", \"object/seal\", \"object/set-prototype-of\", \"object/values\", \"parse-float\", \"parse-int\", \"promise\", \"queue-microtask\", \"reflect/apply\", \"reflect/construct\", \"reflect/define-property\", \"reflect/delete-property\", \"reflect/get\", \"reflect/get-own-property-descriptor\", \"reflect/get-prototype-of\", \"reflect/has\", \"reflect/is-extensible\", \"reflect/own-keys\", \"reflect/prevent-extensions\", \"reflect/set\", \"reflect/set-prototype-of\", \"set\", \"set-immediate\", \"set-interval\", \"set-timeout\", \"string/from-code-point\", \"string/raw\", \"symbol\", \"symbol/async-iterator\", \"symbol/for\", \"symbol/has-instance\", \"symbol/is-concat-spreadable\", \"symbol/iterator\", \"symbol/key-for\", \"symbol/match\", \"symbol/replace\", \"symbol/search\", \"symbol/species\", \"symbol/split\", \"symbol/to-primitive\", \"symbol/to-string-tag\", \"symbol/unscopables\", \"url\", \"url-search-params\", \"weak-map\", \"weak-set\"]);\nexports.stable = stable;\nconst proposals = new Set([...stable, \"aggregate-error\", \"composite-key\", \"composite-symbol\", \"global-this\", \"instance/at\", \"instance/code-points\", \"instance/match-all\", \"instance/replace-all\", \"math/clamp\", \"math/degrees\", \"math/deg-per-rad\", \"math/fscale\", \"math/iaddh\", \"math/imulh\", \"math/isubh\", \"math/rad-per-deg\", \"math/radians\", \"math/scale\", \"math/seeded-prng\", \"math/signbit\", \"math/umulh\", \"number/from-string\", \"observable\", \"reflect/define-metadata\", \"reflect/delete-metadata\", \"reflect/get-metadata\", \"reflect/get-metadata-keys\", \"reflect/get-own-metadata\", \"reflect/get-own-metadata-keys\", \"reflect/has-metadata\", \"reflect/has-own-metadata\", \"reflect/metadata\", \"symbol/dispose\", \"symbol/observable\", \"symbol/pattern-match\"]);\nexports.proposals = proposals;","\"use strict\";\n\nexports.__esModule = true;\nexports.default = canSkipPolyfill;\nvar _babel = _interopRequireWildcard(require(\"@babel/core\"));\nfunction _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== \"function\") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }\nfunction _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== \"object\" && typeof obj !== \"function\") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== \"default\" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }\nconst {\n types: t\n} = _babel.default || _babel;\nfunction canSkipPolyfill(desc, path) {\n const {\n node,\n parent\n } = path;\n switch (desc.name) {\n case \"es.string.split\":\n {\n if (!t.isCallExpression(parent, {\n callee: node\n })) return false;\n if (parent.arguments.length < 1) return true;\n const splitter = parent.arguments[0];\n return t.isStringLiteral(splitter) || t.isTemplateLiteral(splitter);\n }\n }\n}","module.exports = require(\"core-js-compat/entries\");\n","\"use strict\";\n\nexports.__esModule = true;\nexports.BABEL_RUNTIME = void 0;\nexports.callMethod = callMethod;\nexports.coreJSModule = coreJSModule;\nexports.coreJSPureHelper = coreJSPureHelper;\nexports.isCoreJSSource = isCoreJSSource;\nvar _babel = _interopRequireWildcard(require(\"@babel/core\"));\nvar _entries = _interopRequireDefault(require(\"../core-js-compat/entries.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nfunction _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== \"function\") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }\nfunction _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== \"object\" && typeof obj !== \"function\") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== \"default\" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }\nconst {\n types: t\n} = _babel.default || _babel;\nconst BABEL_RUNTIME = \"@babel/runtime-corejs3\";\nexports.BABEL_RUNTIME = BABEL_RUNTIME;\nfunction callMethod(path, id) {\n const {\n object\n } = path.node;\n let context1, context2;\n if (t.isIdentifier(object)) {\n context1 = object;\n context2 = t.cloneNode(object);\n } else {\n context1 = path.scope.generateDeclaredUidIdentifier(\"context\");\n context2 = t.assignmentExpression(\"=\", t.cloneNode(context1), object);\n }\n path.replaceWith(t.memberExpression(t.callExpression(id, [context2]), t.identifier(\"call\")));\n path.parentPath.unshiftContainer(\"arguments\", context1);\n}\nfunction isCoreJSSource(source) {\n if (typeof source === \"string\") {\n source = source.replace(/\\\\/g, \"/\").replace(/(\\/(index)?)?(\\.js)?$/i, \"\").toLowerCase();\n }\n return Object.prototype.hasOwnProperty.call(_entries.default, source) && _entries.default[source];\n}\nfunction coreJSModule(name) {\n return `core-js/modules/${name}.js`;\n}\nfunction coreJSPureHelper(name, useBabelRuntime, ext) {\n return useBabelRuntime ? `${BABEL_RUNTIME}/core-js/${name}${ext}` : `core-js-pure/features/${name}.js`;\n}","\"use strict\";\n\nexports.__esModule = true;\nexports.default = void 0;\nvar _data = _interopRequireDefault(require(\"../core-js-compat/data.js\"));\nvar _shippedProposals = _interopRequireDefault(require(\"./shipped-proposals\"));\nvar _getModulesListForTargetVersion = _interopRequireDefault(require(\"../core-js-compat/get-modules-list-for-target-version.js\"));\nvar _builtInDefinitions = require(\"./built-in-definitions\");\nvar BabelRuntimePaths = _interopRequireWildcard(require(\"./babel-runtime-corejs3-paths\"));\nvar _usageFilters = _interopRequireDefault(require(\"./usage-filters\"));\nvar _babel = _interopRequireWildcard(require(\"@babel/core\"));\nvar _utils = require(\"./utils\");\nvar _helperDefinePolyfillProvider = _interopRequireDefault(require(\"@babel/helper-define-polyfill-provider\"));\nfunction _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== \"function\") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }\nfunction _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== \"object\" && typeof obj !== \"function\") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== \"default\" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nfunction _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nconst {\n types: t\n} = _babel.default || _babel;\nconst presetEnvCompat = \"#__secret_key__@babel/preset-env__compatibility\";\nconst runtimeCompat = \"#__secret_key__@babel/runtime__compatibility\";\nconst uniqueObjects = [\"array\", \"string\", \"iterator\", \"async-iterator\", \"dom-collections\"].map(v => new RegExp(`[a-z]*\\\\.${v}\\\\..*`));\nconst esnextFallback = (name, cb) => {\n if (cb(name)) return true;\n if (!name.startsWith(\"es.\")) return false;\n const fallback = `esnext.${name.slice(3)}`;\n if (!_data.default[fallback]) return false;\n return cb(fallback);\n};\nvar _default = (0, _helperDefinePolyfillProvider.default)(function ({\n getUtils,\n method,\n shouldInjectPolyfill,\n createMetaResolver,\n debug,\n babel\n}, {\n version = 3,\n proposals,\n shippedProposals,\n [presetEnvCompat]: {\n noRuntimeName = false\n } = {},\n [runtimeCompat]: {\n useBabelRuntime = false,\n ext = \".js\"\n } = {}\n}) {\n const isWebpack = babel.caller(caller => (caller == null ? void 0 : caller.name) === \"babel-loader\");\n const resolve = createMetaResolver({\n global: _builtInDefinitions.BuiltIns,\n static: _builtInDefinitions.StaticProperties,\n instance: _builtInDefinitions.InstanceProperties\n });\n const available = new Set((0, _getModulesListForTargetVersion.default)(version));\n function getCoreJSPureBase(useProposalBase) {\n return useBabelRuntime ? useProposalBase ? `${_utils.BABEL_RUNTIME}/core-js` : `${_utils.BABEL_RUNTIME}/core-js-stable` : useProposalBase ? \"core-js-pure/features\" : \"core-js-pure/stable\";\n }\n function maybeInjectGlobalImpl(name, utils) {\n if (shouldInjectPolyfill(name)) {\n debug(name);\n utils.injectGlobalImport((0, _utils.coreJSModule)(name), name);\n return true;\n }\n return false;\n }\n function maybeInjectGlobal(names, utils, fallback = true) {\n for (const name of names) {\n if (fallback) {\n esnextFallback(name, name => maybeInjectGlobalImpl(name, utils));\n } else {\n maybeInjectGlobalImpl(name, utils);\n }\n }\n }\n function maybeInjectPure(desc, hint, utils, object) {\n if (desc.pure && !(object && desc.exclude && desc.exclude.includes(object)) && esnextFallback(desc.name, shouldInjectPolyfill)) {\n const {\n name\n } = desc;\n let useProposalBase = false;\n if (proposals || shippedProposals && name.startsWith(\"esnext.\")) {\n useProposalBase = true;\n } else if (name.startsWith(\"es.\") && !available.has(name)) {\n useProposalBase = true;\n }\n if (useBabelRuntime && !(useProposalBase ? BabelRuntimePaths.proposals : BabelRuntimePaths.stable).has(desc.pure)) {\n return;\n }\n const coreJSPureBase = getCoreJSPureBase(useProposalBase);\n return utils.injectDefaultImport(`${coreJSPureBase}/${desc.pure}${ext}`, hint);\n }\n }\n function isFeatureStable(name) {\n if (name.startsWith(\"esnext.\")) {\n const esName = `es.${name.slice(7)}`;\n // If its imaginative esName is not in latest compat data, it means\n // the proposal is not stage 4\n return esName in _data.default;\n }\n return true;\n }\n return {\n name: \"corejs3\",\n runtimeName: noRuntimeName ? null : _utils.BABEL_RUNTIME,\n polyfills: _data.default,\n filterPolyfills(name) {\n if (!available.has(name)) return false;\n if (proposals || method === \"entry-global\") return true;\n if (shippedProposals && _shippedProposals.default.has(name)) {\n return true;\n }\n return isFeatureStable(name);\n },\n entryGlobal(meta, utils, path) {\n if (meta.kind !== \"import\") return;\n const modules = (0, _utils.isCoreJSSource)(meta.source);\n if (!modules) return;\n if (modules.length === 1 && meta.source === (0, _utils.coreJSModule)(modules[0]) && shouldInjectPolyfill(modules[0])) {\n // Avoid infinite loop: do not replace imports with a new copy of\n // themselves.\n debug(null);\n return;\n }\n const modulesSet = new Set(modules);\n const filteredModules = modules.filter(module => {\n if (!module.startsWith(\"esnext.\")) return true;\n const stable = module.replace(\"esnext.\", \"es.\");\n if (modulesSet.has(stable) && shouldInjectPolyfill(stable)) {\n return false;\n }\n return true;\n });\n maybeInjectGlobal(filteredModules, utils, false);\n path.remove();\n },\n usageGlobal(meta, utils, path) {\n const resolved = resolve(meta);\n if (!resolved) return;\n if ((0, _usageFilters.default)(resolved.desc, path)) return;\n let deps = resolved.desc.global;\n if (resolved.kind !== \"global\" && \"object\" in meta && meta.object && meta.placement === \"prototype\") {\n const low = meta.object.toLowerCase();\n deps = deps.filter(m => uniqueObjects.some(v => v.test(m)) ? m.includes(low) : true);\n }\n maybeInjectGlobal(deps, utils);\n return true;\n },\n usagePure(meta, utils, path) {\n if (meta.kind === \"in\") {\n if (meta.key === \"Symbol.iterator\") {\n path.replaceWith(t.callExpression(utils.injectDefaultImport((0, _utils.coreJSPureHelper)(\"is-iterable\", useBabelRuntime, ext), \"isIterable\"), [path.node.right] // meta.kind === \"in\" narrows this\n ));\n }\n\n return;\n }\n if (path.parentPath.isUnaryExpression({\n operator: \"delete\"\n })) return;\n if (meta.kind === \"property\") {\n // We can't compile destructuring and updateExpression.\n if (!path.isMemberExpression()) return;\n if (!path.isReferenced()) return;\n if (path.parentPath.isUpdateExpression()) return;\n if (t.isSuper(path.node.object)) {\n return;\n }\n if (meta.key === \"Symbol.iterator\") {\n if (!shouldInjectPolyfill(\"es.symbol.iterator\")) return;\n const {\n parent,\n node\n } = path;\n if (t.isCallExpression(parent, {\n callee: node\n })) {\n if (parent.arguments.length === 0) {\n path.parentPath.replaceWith(t.callExpression(utils.injectDefaultImport((0, _utils.coreJSPureHelper)(\"get-iterator\", useBabelRuntime, ext), \"getIterator\"), [node.object]));\n path.skip();\n } else {\n (0, _utils.callMethod)(path, utils.injectDefaultImport((0, _utils.coreJSPureHelper)(\"get-iterator-method\", useBabelRuntime, ext), \"getIteratorMethod\"));\n }\n } else {\n path.replaceWith(t.callExpression(utils.injectDefaultImport((0, _utils.coreJSPureHelper)(\"get-iterator-method\", useBabelRuntime, ext), \"getIteratorMethod\"), [path.node.object]));\n }\n return;\n }\n }\n let resolved = resolve(meta);\n if (!resolved) return;\n if ((0, _usageFilters.default)(resolved.desc, path)) return;\n if (useBabelRuntime && resolved.desc.pure && resolved.desc.pure.slice(-6) === \"/index\") {\n // Remove /index, since it doesn't exist in @babel/runtime-corejs3s\n resolved = _extends({}, resolved, {\n desc: _extends({}, resolved.desc, {\n pure: resolved.desc.pure.slice(0, -6)\n })\n });\n }\n if (resolved.kind === \"global\") {\n const id = maybeInjectPure(resolved.desc, resolved.name, utils);\n if (id) path.replaceWith(id);\n } else if (resolved.kind === \"static\") {\n const id = maybeInjectPure(resolved.desc, resolved.name, utils,\n // @ts-expect-error\n meta.object);\n if (id) path.replaceWith(id);\n } else if (resolved.kind === \"instance\") {\n const id = maybeInjectPure(resolved.desc, `${resolved.name}InstanceProperty`, utils,\n // @ts-expect-error\n meta.object);\n if (!id) return;\n const {\n node\n } = path;\n if (t.isCallExpression(path.parent, {\n callee: node\n })) {\n (0, _utils.callMethod)(path, id);\n } else {\n path.replaceWith(t.callExpression(id, [node.object]));\n }\n }\n },\n visitor: method === \"usage-global\" && {\n // import(\"foo\")\n CallExpression(path) {\n if (path.get(\"callee\").isImport()) {\n const utils = getUtils(path);\n if (isWebpack) {\n // Webpack uses Promise.all to handle dynamic import.\n maybeInjectGlobal(_builtInDefinitions.PromiseDependenciesWithIterators, utils);\n } else {\n maybeInjectGlobal(_builtInDefinitions.PromiseDependencies, utils);\n }\n }\n },\n // (async function () { }).finally(...)\n Function(path) {\n if (path.node.async) {\n maybeInjectGlobal(_builtInDefinitions.PromiseDependencies, getUtils(path));\n }\n },\n // for-of, [a, b] = c\n \"ForOfStatement|ArrayPattern\"(path) {\n maybeInjectGlobal(_builtInDefinitions.CommonIterators, getUtils(path));\n },\n // [...spread]\n SpreadElement(path) {\n if (!path.parentPath.isObjectExpression()) {\n maybeInjectGlobal(_builtInDefinitions.CommonIterators, getUtils(path));\n }\n },\n // yield*\n YieldExpression(path) {\n if (path.node.delegate) {\n maybeInjectGlobal(_builtInDefinitions.CommonIterators, getUtils(path));\n }\n },\n // Decorators metadata\n Class(path) {\n var _path$node$decorators;\n const hasDecorators = ((_path$node$decorators = path.node.decorators) == null ? void 0 : _path$node$decorators.length) || path.node.body.body.some(el => {\n var _decorators;\n return (_decorators = el.decorators) == null ? void 0 : _decorators.length;\n });\n if (hasDecorators) {\n maybeInjectGlobal(_builtInDefinitions.DecoratorMetadataDependencies, getUtils(path));\n }\n }\n }\n };\n});\nexports.default = _default;","\"use strict\";\n\nexports.__esModule = true;\nexports.default = void 0;\nvar _helperDefinePolyfillProvider = _interopRequireDefault(require(\"@babel/helper-define-polyfill-provider\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nconst runtimeCompat = \"#__secret_key__@babel/runtime__compatibility\";\nvar _default = (0, _helperDefinePolyfillProvider.default)(({\n debug,\n targets,\n babel\n}, options) => {\n if (!shallowEqual(targets, babel.targets())) {\n throw new Error(\"This plugin does not use the targets option. Only preset-env's targets\" + \" or top-level targets need to be configured for this plugin to work.\" + \" See https://github.com/babel/babel-polyfills/issues/36 for more\" + \" details.\");\n }\n const {\n [runtimeCompat]: {\n moduleName = null,\n useBabelRuntime = false\n } = {}\n } = options;\n return {\n name: \"regenerator\",\n polyfills: [\"regenerator-runtime\"],\n usageGlobal(meta, utils) {\n if (isRegenerator(meta)) {\n debug(\"regenerator-runtime\");\n utils.injectGlobalImport(\"regenerator-runtime/runtime.js\");\n }\n },\n usagePure(meta, utils, path) {\n if (isRegenerator(meta)) {\n let pureName = \"regenerator-runtime\";\n if (useBabelRuntime) {\n var _ref;\n const runtimeName = (_ref = moduleName != null ? moduleName : path.hub.file.get(\"runtimeHelpersModuleName\")) != null ? _ref : \"@babel/runtime\";\n pureName = `${runtimeName}/regenerator`;\n }\n path.replaceWith(utils.injectDefaultImport(pureName, \"regenerator-runtime\"));\n }\n }\n };\n});\nexports.default = _default;\nconst isRegenerator = meta => meta.kind === \"global\" && meta.name === \"regeneratorRuntime\";\nfunction shallowEqual(obj1, obj2) {\n return JSON.stringify(obj1) === JSON.stringify(obj2);\n}","// env vars from the cli are always strings, so !!ENV_VAR returns true for \"false\"\nfunction bool(value) {\n if (value == null) return false;\n return value && value !== \"false\" && value !== \"0\";\n}\n\nmodule.exports = bool(process.env[\"BABEL_8_BREAKING\"])\n ? null\n : require(\"babel-plugin-polyfill-regenerator-BABEL_8_BREAKING-false\");\n","// TODO(Babel 8) Remove this file\nif (process.env.BABEL_8_BREAKING) {\n throw new Error(\n \"Internal Babel error: This file should only be loaded in Babel 7\",\n );\n}\n\nconst pluginCorejs2 = require(\"babel-plugin-polyfill-corejs2\").default;\nconst pluginCorejs3 = require(\"babel-plugin-polyfill-corejs3\").default;\nconst pluginRegenerator = require(\"babel-plugin-polyfill-regenerator\").default;\n\nconst pluginsCompat = \"#__secret_key__@babel/runtime__compatibility\";\n\nfunction createCorejs2Plugin(options) {\n return (api, _, filename) => pluginCorejs2(api, options, filename);\n}\n\nfunction createCorejs3Plugin(options) {\n return (api, _, filename) => pluginCorejs3(api, options, filename);\n}\n\nfunction createRegeneratorPlugin(options, useRuntimeRegenerator, corejsPlugin) {\n if (!useRuntimeRegenerator) return corejsPlugin ?? undefined;\n return (api, _, filename) => {\n return {\n ...pluginRegenerator(api, options, filename),\n inherits: corejsPlugin ?? undefined,\n };\n };\n}\n\nmodule.exports = function createBasePolyfillsPlugin(\n { corejs, regenerator = true, moduleName },\n runtimeVersion,\n absoluteImports,\n) {\n let proposals = false;\n let rawVersion;\n\n if (typeof corejs === \"object\" && corejs !== null) {\n rawVersion = corejs.version;\n proposals = Boolean(corejs.proposals);\n } else {\n rawVersion = corejs;\n }\n\n const corejsVersion = rawVersion ? Number(rawVersion) : false;\n\n if (![false, 2, 3].includes(corejsVersion)) {\n throw new Error(\n `The \\`core-js\\` version must be false, 2 or 3, but got ${JSON.stringify(\n rawVersion,\n )}.`,\n );\n }\n\n if (proposals && (!corejsVersion || corejsVersion < 3)) {\n throw new Error(\n \"The 'proposals' option is only supported when using 'corejs: 3'\",\n );\n }\n\n if (typeof regenerator !== \"boolean\") {\n throw new Error(\n \"The 'regenerator' option must be undefined, or a boolean.\",\n );\n }\n\n const polyfillOpts = {\n method: \"usage-pure\",\n absoluteImports,\n proposals,\n [pluginsCompat]: {\n useBabelRuntime: true,\n runtimeVersion,\n ext: \"\",\n moduleName,\n },\n };\n\n return createRegeneratorPlugin(\n polyfillOpts,\n regenerator,\n corejsVersion === 2\n ? createCorejs2Plugin(polyfillOpts)\n : corejsVersion === 3\n ? createCorejs3Plugin(polyfillOpts)\n : null,\n );\n};\n","Object.defineProperty(exports, \"createPolyfillPlugins\", {\n get: () => require(\"./polyfills.cjs\"),\n});\n","import { declare } from \"@babel/helper-plugin-utils\";\nimport { addDefault, isModule } from \"@babel/helper-module-imports\";\nimport { types as t } from \"@babel/core\";\n\nimport { hasMinVersion } from \"./helpers.ts\";\nimport getRuntimePath, { resolveFSPath } from \"./get-runtime-path/index.ts\";\n\n// TODO(Babel 8): Remove this\nimport babel7 from \"./babel-7/index.cjs\";\n\nexport interface Options {\n absoluteRuntime?: boolean;\n corejs?: string | number | { version: string | number; proposals?: boolean };\n helpers?: boolean;\n version?: string;\n moduleName?: null | string;\n}\n\nexport default declare((api, options: Options, dirname) => {\n api.assertVersion(REQUIRED_VERSION(7));\n\n const {\n version: runtimeVersion = \"7.0.0-beta.0\",\n absoluteRuntime = false,\n moduleName = null,\n } = options;\n\n if (\n typeof absoluteRuntime !== \"boolean\" &&\n typeof absoluteRuntime !== \"string\"\n ) {\n throw new Error(\n \"The 'absoluteRuntime' option must be undefined, a boolean, or a string.\",\n );\n }\n\n if (typeof runtimeVersion !== \"string\") {\n throw new Error(`The 'version' option must be a version string.`);\n }\n\n if (moduleName !== null && typeof moduleName !== \"string\") {\n throw new Error(\"The 'moduleName' option must be null or a string.\");\n }\n\n if (!process.env.BABEL_8_BREAKING) {\n // In recent @babel/runtime versions, we can use require(\"helper\").default\n // instead of require(\"helper\") so that it has the same interface as the\n // ESM helper, and bundlers can better exchange one format for the other.\n const DUAL_MODE_RUNTIME = \"7.13.0\";\n // eslint-disable-next-line no-var\n var supportsCJSDefault = hasMinVersion(DUAL_MODE_RUNTIME, runtimeVersion);\n }\n\n if (Object.hasOwn(options, \"useBuiltIns\")) {\n // @ts-expect-error deprecated options\n if (options[\"useBuiltIns\"]) {\n throw new Error(\n \"The 'useBuiltIns' option has been removed. The @babel/runtime \" +\n \"module now uses builtins by default.\",\n );\n } else {\n throw new Error(\n \"The 'useBuiltIns' option has been removed. Use the 'corejs'\" +\n \"option to polyfill with `core-js` via @babel/runtime.\",\n );\n }\n }\n\n if (Object.hasOwn(options, \"polyfill\")) {\n // @ts-expect-error deprecated options\n if (options[\"polyfill\"] === false) {\n throw new Error(\n \"The 'polyfill' option has been removed. The @babel/runtime \" +\n \"module now skips polyfilling by default.\",\n );\n } else {\n throw new Error(\n \"The 'polyfill' option has been removed. Use the 'corejs'\" +\n \"option to polyfill with `core-js` via @babel/runtime.\",\n );\n }\n }\n\n if (process.env.BABEL_8_BREAKING) {\n if (Object.hasOwn(options, \"regenerator\")) {\n throw new Error(\n \"The 'regenerator' option has been removed. The generators transform \" +\n \"no longers relies on a 'regeneratorRuntime' global. \" +\n \"If you still need to replace imports to the 'regeneratorRuntime' \" +\n \"global, you can use babel-plugin-polyfill-regenerator.\",\n );\n }\n }\n\n if (process.env.BABEL_8_BREAKING) {\n if (Object.hasOwn(options, \"useESModules\")) {\n throw new Error(\n \"The 'useESModules' option has been removed. @babel/runtime now uses \" +\n \"package.json#exports to support both CommonJS and ESM helpers.\",\n );\n }\n } else {\n // @ts-expect-error(Babel 7 vs Babel 8)\n const { useESModules = false } = options;\n if (typeof useESModules !== \"boolean\" && useESModules !== \"auto\") {\n throw new Error(\n \"The 'useESModules' option must be undefined, or a boolean, or 'auto'.\",\n );\n }\n\n // eslint-disable-next-line no-var\n var esModules =\n useESModules === \"auto\"\n ? api.caller(\n // @ts-expect-error CallerMetadata does not define supportsStaticESM\n caller => !!caller?.supportsStaticESM,\n )\n : useESModules;\n }\n\n if (process.env.BABEL_8_BREAKING) {\n if (Object.hasOwn(options, \"helpers\")) {\n throw new Error(\n \"The 'helpers' option has been removed. \" +\n \"Remove the plugin from your config if \" +\n \"you want to disable helpers import injection.\",\n );\n }\n } else {\n // eslint-disable-next-line no-var\n var { helpers: useRuntimeHelpers = true } = options;\n\n if (typeof useRuntimeHelpers !== \"boolean\") {\n throw new Error(\"The 'helpers' option must be undefined, or a boolean.\");\n }\n }\n\n const HEADER_HELPERS = new Set([\n \"interopRequireWildcard\",\n \"interopRequireDefault\",\n ]);\n\n return {\n name: \"transform-runtime\",\n\n inherits: process.env.BABEL_8_BREAKING\n ? undefined\n : babel7.createPolyfillPlugins(options, runtimeVersion, absoluteRuntime),\n\n pre(file) {\n if (!process.env.BABEL_8_BREAKING && !useRuntimeHelpers) return;\n\n let modulePath: string;\n\n file.set(\"helperGenerator\", (name: string) => {\n modulePath ??= getRuntimePath(\n moduleName ??\n file.get(\"runtimeHelpersModuleName\") ??\n \"@babel/runtime\",\n dirname,\n absoluteRuntime,\n );\n\n // If the helper didn't exist yet at the version given, we bail\n // out and let Babel either insert it directly, or throw an error\n // so that plugins can handle that case properly.\n if (!process.env.BABEL_8_BREAKING) {\n if (!file.availableHelper?.(name, runtimeVersion)) {\n if (name === \"regeneratorRuntime\") {\n // For regeneratorRuntime, we can fallback to the old behavior of\n // relying on the regeneratorRuntime global. If the 'regenerator'\n // option is not disabled, babel-plugin-polyfill-regenerator will\n // then replace it with a @babel/helpers/regenerator import.\n //\n // We must wrap it in a function, because built-in Babel helpers\n // are functions.\n return t.arrowFunctionExpression(\n [],\n t.identifier(\"regeneratorRuntime\"),\n );\n }\n return;\n }\n } else {\n if (!file.availableHelper(name, runtimeVersion)) return;\n }\n\n // Explicitly set the CommonJS interop helpers to their reserve\n // blockHoist of 4 so they are guaranteed to exist\n // when other things used them to import.\n const blockHoist =\n HEADER_HELPERS.has(name) && !isModule(file.path) ? 4 : undefined;\n\n let helperPath = `${modulePath}/helpers/${\n !process.env.BABEL_8_BREAKING &&\n esModules &&\n file.path.node.sourceType === \"module\"\n ? \"esm/\" + name\n : name\n }`;\n if (absoluteRuntime) helperPath = resolveFSPath(helperPath);\n\n return addDefaultImport(helperPath, name, blockHoist, true);\n });\n\n const cache = new Map();\n\n function addDefaultImport(\n source: string,\n nameHint: string,\n blockHoist: number,\n isHelper = false,\n ) {\n // If something on the page adds a helper when the file is an ES6\n // file, we can't reused the cached helper name after things have been\n // transformed because it has almost certainly been renamed.\n const cacheKey = isModule(file.path);\n const key = `${source}:${nameHint}:${cacheKey || \"\"}`;\n\n let cached = cache.get(key);\n if (cached) {\n cached = t.cloneNode(cached);\n } else {\n cached = addDefault(file.path, source, {\n importedInterop: (\n process.env.BABEL_8_BREAKING\n ? isHelper\n : isHelper && supportsCJSDefault\n )\n ? \"compiled\"\n : \"uncompiled\",\n nameHint,\n blockHoist,\n });\n\n cache.set(key, cached);\n }\n return cached;\n }\n },\n };\n});\n","import { declare } from \"@babel/helper-plugin-utils\";\nimport { types as t } from \"@babel/core\";\n\nexport default declare(api => {\n api.assertVersion(REQUIRED_VERSION(7));\n\n return {\n name: \"transform-shorthand-properties\",\n\n visitor: {\n ObjectMethod(path) {\n const { node } = path;\n if (node.kind === \"method\") {\n const func = t.functionExpression(\n null,\n node.params,\n node.body,\n node.generator,\n node.async,\n );\n func.returnType = node.returnType;\n\n const computedKey = t.toComputedKey(node);\n if (t.isStringLiteral(computedKey, { value: \"__proto__\" })) {\n path.replaceWith(t.objectProperty(computedKey, func, true));\n } else {\n path.replaceWith(t.objectProperty(node.key, func, node.computed));\n }\n }\n },\n\n ObjectProperty(path) {\n const { node } = path;\n if (node.shorthand) {\n const computedKey = t.toComputedKey(node);\n if (t.isStringLiteral(computedKey, { value: \"__proto__\" })) {\n path.replaceWith(t.objectProperty(computedKey, node.value, true));\n } else {\n node.shorthand = false;\n }\n }\n },\n },\n };\n});\n","import { declare } from \"@babel/helper-plugin-utils\";\nimport { skipTransparentExprWrappers } from \"@babel/helper-skip-transparent-expression-wrappers\";\nimport { types as t } from \"@babel/core\";\nimport type { File, NodePath, Scope } from \"@babel/core\";\n\ntype ListElement = t.SpreadElement | t.Expression;\n\nexport interface Options {\n allowArrayLike?: boolean;\n loose?: boolean;\n}\n\nexport default declare((api, options: Options) => {\n api.assertVersion(REQUIRED_VERSION(7));\n\n const iterableIsArray = api.assumption(\"iterableIsArray\") ?? options.loose;\n const arrayLikeIsIterable =\n options.allowArrayLike ?? api.assumption(\"arrayLikeIsIterable\");\n\n function getSpreadLiteral(\n spread: t.SpreadElement,\n scope: Scope,\n ): t.Expression {\n if (\n iterableIsArray &&\n !t.isIdentifier(spread.argument, { name: \"arguments\" })\n ) {\n return spread.argument;\n } else {\n return scope.toArray(spread.argument, true, arrayLikeIsIterable);\n }\n }\n\n function hasHole(spread: t.ArrayExpression): boolean {\n return spread.elements.some(el => el === null);\n }\n\n function hasSpread(nodes: Array): boolean {\n for (let i = 0; i < nodes.length; i++) {\n if (t.isSpreadElement(nodes[i])) {\n return true;\n }\n }\n return false;\n }\n\n function push(_props: Array, nodes: Array) {\n if (!_props.length) return _props;\n nodes.push(t.arrayExpression(_props));\n return [];\n }\n\n function build(\n props: Array,\n scope: Scope,\n file: File,\n ): t.Expression[] {\n const nodes: Array = [];\n let _props: Array = [];\n\n for (const prop of props) {\n if (t.isSpreadElement(prop)) {\n _props = push(_props, nodes);\n let spreadLiteral = getSpreadLiteral(prop, scope);\n\n if (t.isArrayExpression(spreadLiteral) && hasHole(spreadLiteral)) {\n spreadLiteral = t.callExpression(\n file.addHelper(\n process.env.BABEL_8_BREAKING\n ? \"arrayLikeToArray\"\n : \"arrayWithoutHoles\",\n ),\n [spreadLiteral],\n );\n }\n\n nodes.push(spreadLiteral);\n } else {\n _props.push(prop);\n }\n }\n\n push(_props, nodes);\n\n return nodes;\n }\n\n return {\n name: \"transform-spread\",\n\n visitor: {\n ArrayExpression(path): void {\n const { node, scope } = path;\n const elements = node.elements;\n if (!hasSpread(elements)) return;\n\n const nodes = build(elements, scope, this.file);\n let first = nodes[0];\n\n // If there is only one element in the ArrayExpression and\n // the element was transformed (Array.prototype.slice.call or toConsumableArray)\n // we know that the transformed code already takes care of cloning the array.\n // So we can simply return that element.\n if (\n nodes.length === 1 &&\n first !== (elements[0] as t.SpreadElement).argument\n ) {\n path.replaceWith(first);\n return;\n }\n\n // If the first element is a ArrayExpression we can directly call\n // concat on it.\n // `[..].concat(..)`\n // If not then we have to use `[].concat(arr)` and not `arr.concat`\n // because `arr` could be extended/modified (e.g. Immutable) and we do not know exactly\n // what concat would produce.\n if (!t.isArrayExpression(first)) {\n first = t.arrayExpression([]);\n } else {\n nodes.shift();\n }\n\n path.replaceWith(\n t.callExpression(\n t.memberExpression(first, t.identifier(\"concat\")),\n nodes,\n ),\n );\n },\n CallExpression(path): void {\n const { node, scope } = path;\n\n const args = node.arguments as Array;\n if (!hasSpread(args)) return;\n const calleePath = skipTransparentExprWrappers(\n path.get(\"callee\") as NodePath,\n );\n if (calleePath.isSuper()) {\n // NOTE: spread and classes have almost the same compat data, so this is very unlikely to happen in practice.\n throw path.buildCodeFrameError(\n \"It's not possible to compile spread arguments in `super()` without compiling classes.\\n\" +\n \"Please add '@babel/plugin-transform-classes' to your Babel configuration.\",\n );\n }\n let contextLiteral: t.Expression | t.Super = scope.buildUndefinedNode();\n node.arguments = [];\n\n let nodes: t.Expression[];\n if (\n args.length === 1 &&\n t.isIdentifier((args[0] as t.SpreadElement).argument, {\n name: \"arguments\",\n })\n ) {\n nodes = [(args[0] as t.SpreadElement).argument];\n } else {\n nodes = build(args, scope, this.file);\n }\n\n const first = nodes.shift();\n if (nodes.length) {\n node.arguments.push(\n t.callExpression(\n t.memberExpression(first, t.identifier(\"concat\")),\n nodes,\n ),\n );\n } else {\n node.arguments.push(first);\n }\n\n const callee = calleePath.node as t.MemberExpression;\n\n if (t.isMemberExpression(callee)) {\n const temp = scope.maybeGenerateMemoised(callee.object);\n if (temp) {\n callee.object = t.assignmentExpression(\n \"=\",\n temp,\n // object must not be Super when `temp` is an identifier\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion\n callee.object as t.Expression,\n );\n contextLiteral = temp;\n } else {\n contextLiteral = t.cloneNode(callee.object);\n }\n }\n\n // We use the original callee here, to preserve any types/parentheses\n node.callee = t.memberExpression(\n node.callee as t.Expression,\n t.identifier(\"apply\"),\n );\n if (t.isSuper(contextLiteral)) {\n contextLiteral = t.thisExpression();\n }\n\n node.arguments.unshift(t.cloneNode(contextLiteral));\n },\n\n NewExpression(path): void {\n const { node, scope } = path;\n if (!hasSpread(node.arguments)) return;\n\n const nodes = build(\n node.arguments as Array,\n scope,\n this.file,\n );\n\n const first = nodes.shift();\n\n let args: t.Expression;\n if (nodes.length) {\n args = t.callExpression(\n t.memberExpression(first, t.identifier(\"concat\")),\n nodes,\n );\n } else {\n args = first;\n }\n\n path.replaceWith(\n t.callExpression(path.hub.addHelper(\"construct\"), [\n node.callee as t.Expression,\n args,\n ]),\n );\n },\n },\n };\n});\n","import { declare } from \"@babel/helper-plugin-utils\";\nimport { types as t } from \"@babel/core\";\n\nexport default declare(api => {\n api.assertVersion(REQUIRED_VERSION(7));\n\n return {\n name: \"transform-sticky-regex\",\n\n visitor: {\n RegExpLiteral(path) {\n const { node } = path;\n if (!node.flags.includes(\"y\")) return;\n\n path.replaceWith(\n t.newExpression(t.identifier(\"RegExp\"), [\n t.stringLiteral(node.pattern),\n t.stringLiteral(node.flags),\n ]),\n );\n },\n },\n };\n});\n","import { declare } from \"@babel/helper-plugin-utils\";\nimport { types as t } from \"@babel/core\";\n\nexport default declare(api => {\n api.assertVersion(REQUIRED_VERSION(7));\n\n return {\n name: \"transform-strict-mode\",\n\n visitor: {\n Program(path) {\n const { node } = path;\n\n for (const directive of node.directives) {\n if (directive.value.value === \"use strict\") return;\n }\n\n path.unshiftContainer(\n \"directives\",\n t.directive(t.directiveLiteral(\"use strict\")),\n );\n },\n },\n };\n});\n","import { declare } from \"@babel/helper-plugin-utils\";\nimport { template, types as t, type NodePath } from \"@babel/core\";\n\nexport interface Options {\n loose?: boolean;\n}\n\nexport default declare((api, options: Options) => {\n api.assertVersion(REQUIRED_VERSION(7));\n\n const ignoreToPrimitiveHint =\n api.assumption(\"ignoreToPrimitiveHint\") ?? options.loose;\n const mutableTemplateObject =\n api.assumption(\"mutableTemplateObject\") ?? options.loose;\n\n let helperName = \"taggedTemplateLiteral\";\n if (mutableTemplateObject) helperName += \"Loose\";\n\n /**\n * This function groups the objects into multiple calls to `.concat()` in\n * order to preserve execution order of the primitive conversion, e.g.\n *\n * \"\".concat(obj.foo, \"foo\", obj2.foo, \"foo2\")\n *\n * would evaluate both member expressions _first_ then, `concat` will\n * convert each one to a primitive, whereas\n *\n * \"\".concat(obj.foo, \"foo\").concat(obj2.foo, \"foo2\")\n *\n * would evaluate the member, then convert it to a primitive, then evaluate\n * the second member and convert that one, which reflects the spec behavior\n * of template literals.\n */\n function buildConcatCallExpressions(items: t.Expression[]): t.CallExpression {\n let avail = true;\n // @ts-expect-error items must not be empty\n return items.reduce(function (left, right) {\n let canBeInserted = t.isLiteral(right);\n\n if (!canBeInserted && avail) {\n canBeInserted = true;\n avail = false;\n }\n if (canBeInserted && t.isCallExpression(left)) {\n left.arguments.push(right);\n return left;\n }\n return t.callExpression(\n t.memberExpression(left, t.identifier(\"concat\")),\n [right],\n );\n });\n }\n\n return {\n name: \"transform-template-literals\",\n\n visitor: {\n TaggedTemplateExpression(path) {\n const { node } = path;\n const { quasi } = node;\n\n const strings = [];\n const raws = [];\n\n // Flag variable to check if contents of strings and raw are equal\n let isStringsRawEqual = true;\n\n for (const elem of quasi.quasis) {\n const { raw, cooked } = elem.value;\n const value =\n cooked == null\n ? path.scope.buildUndefinedNode()\n : t.stringLiteral(cooked);\n\n strings.push(value);\n raws.push(t.stringLiteral(raw));\n\n if (raw !== cooked) {\n // false even if one of raw and cooked are not equal\n isStringsRawEqual = false;\n }\n }\n\n const helperArgs = [t.arrayExpression(strings)];\n // only add raw arrayExpression if there is any difference between raws and strings\n if (!isStringsRawEqual) {\n helperArgs.push(t.arrayExpression(raws));\n }\n\n const tmp = path.scope.generateUidIdentifier(\"templateObject\");\n path.scope.getProgramParent().push({ id: t.cloneNode(tmp) });\n\n path.replaceWith(\n t.callExpression(node.tag, [\n template.expression.ast`\n ${t.cloneNode(tmp)} || (\n ${tmp} = ${this.addHelper(helperName)}(${helperArgs})\n )\n `,\n // @ts-expect-error Fixme: quasi.expressions may contain TSAnyKeyword\n ...quasi.expressions,\n ]),\n );\n },\n\n TemplateLiteral(path) {\n // Skip TemplateLiteral in TSLiteralType\n if (path.parent.type === \"TSLiteralType\") {\n return;\n }\n const nodes: t.Expression[] = [];\n const expressions = path.get(\"expressions\") as NodePath[];\n\n let index = 0;\n for (const elem of path.node.quasis) {\n if (elem.value.cooked) {\n nodes.push(t.stringLiteral(elem.value.cooked));\n }\n\n if (index < expressions.length) {\n const expr = expressions[index++];\n const node = expr.node;\n if (!t.isStringLiteral(node, { value: \"\" })) {\n nodes.push(node);\n }\n }\n }\n\n // since `+` is left-to-right associative\n // ensure the first node is a string if first/second isn't\n if (\n !t.isStringLiteral(nodes[0]) &&\n !(ignoreToPrimitiveHint && t.isStringLiteral(nodes[1]))\n ) {\n nodes.unshift(t.stringLiteral(\"\"));\n }\n let root = nodes[0];\n\n if (ignoreToPrimitiveHint) {\n for (let i = 1; i < nodes.length; i++) {\n root = t.binaryExpression(\"+\", root, nodes[i]);\n }\n } else if (nodes.length > 1) {\n root = buildConcatCallExpressions(nodes);\n }\n\n path.replaceWith(root);\n },\n },\n };\n});\n","import { declare } from \"@babel/helper-plugin-utils\";\nimport { types as t } from \"@babel/core\";\n\nexport default declare(api => {\n api.assertVersion(REQUIRED_VERSION(7));\n\n return {\n name: \"transform-typeof-symbol\",\n\n visitor: {\n Scope({ scope }) {\n if (!scope.getBinding(\"Symbol\")) {\n return;\n }\n\n scope.rename(\"Symbol\");\n },\n\n UnaryExpression(path) {\n const { node, parent } = path;\n if (node.operator !== \"typeof\") return;\n\n if (\n path.parentPath.isBinaryExpression() &&\n t.EQUALITY_BINARY_OPERATORS.includes(\n (parent as t.BinaryExpression).operator,\n )\n ) {\n // optimise `typeof foo === \"string\"` since we can determine that they'll never\n // need to handle symbols\n const opposite = path.getOpposite();\n if (\n opposite.isStringLiteral() &&\n opposite.node.value !== \"symbol\" &&\n opposite.node.value !== \"object\"\n ) {\n return;\n }\n }\n\n let isUnderHelper = path.findParent(path => {\n if (path.isFunction()) {\n return (\n path.get(\"body.directives.0\")?.node.value.value ===\n \"@babel/helpers - typeof\"\n );\n }\n });\n\n if (isUnderHelper) return;\n\n const helper = this.addHelper(\"typeof\");\n\n // TODO: This is needed for backward compatibility with\n // @babel/helpers <= 7.8.3.\n // Remove in Babel 8\n isUnderHelper = path.findParent(path => {\n return (\n (path.isVariableDeclarator() && path.node.id === helper) ||\n (path.isFunctionDeclaration() &&\n path.node.id &&\n path.node.id.name === helper.name)\n );\n });\n\n if (isUnderHelper) {\n return;\n }\n\n const call = t.callExpression(helper, [node.argument]);\n const arg = path.get(\"argument\");\n if (arg.isIdentifier() && !path.scope.hasBinding(arg.node.name, true)) {\n const unary = t.unaryExpression(\"typeof\", t.cloneNode(node.argument));\n path.replaceWith(\n t.conditionalExpression(\n t.binaryExpression(\"===\", unary, t.stringLiteral(\"undefined\")),\n t.stringLiteral(\"undefined\"),\n call,\n ),\n );\n } else {\n path.replaceWith(call);\n }\n },\n },\n };\n});\n","import { template, types as t, type NodePath } from \"@babel/core\";\nimport assert from \"assert\";\nimport annotateAsPure from \"@babel/helper-annotate-as-pure\";\nimport { skipTransparentExprWrapperNodes } from \"@babel/helper-skip-transparent-expression-wrappers\";\n\ntype t = typeof t;\n\nconst ENUMS = new WeakMap();\n\nconst buildEnumWrapper = template.expression(\n `\n (function (ID) {\n ASSIGNMENTS;\n return ID;\n })(INIT)\n `,\n);\n\nexport default function transpileEnum(\n path: NodePath,\n t: t,\n) {\n const { node, parentPath } = path;\n\n if (node.declare) {\n path.remove();\n return;\n }\n\n const name = node.id.name;\n const { fill, data, isPure } = enumFill(path, t, node.id);\n\n switch (parentPath.type) {\n case \"BlockStatement\":\n case \"ExportNamedDeclaration\":\n case \"Program\": {\n // todo: Consider exclude program with import/export\n // && !path.parent.body.some(n => t.isImportDeclaration(n) || t.isExportDeclaration(n));\n const isGlobal = t.isProgram(path.parent);\n const isSeen = seen(parentPath);\n\n let init: t.Expression = t.objectExpression([]);\n if (isSeen || isGlobal) {\n init = t.logicalExpression(\"||\", t.cloneNode(fill.ID), init);\n }\n const enumIIFE = buildEnumWrapper({ ...fill, INIT: init });\n if (isPure) annotateAsPure(enumIIFE);\n\n if (isSeen) {\n const toReplace = parentPath.isExportDeclaration() ? parentPath : path;\n toReplace.replaceWith(\n t.expressionStatement(\n t.assignmentExpression(\"=\", t.cloneNode(node.id), enumIIFE),\n ),\n );\n } else {\n path.scope.registerDeclaration(\n path.replaceWith(\n t.variableDeclaration(isGlobal ? \"var\" : \"let\", [\n t.variableDeclarator(node.id, enumIIFE),\n ]),\n )[0],\n );\n }\n ENUMS.set(path.scope.getBindingIdentifier(name), data);\n break;\n }\n\n default:\n throw new Error(`Unexpected enum parent '${path.parent.type}`);\n }\n\n function seen(parentPath: NodePath): boolean {\n if (parentPath.isExportDeclaration()) {\n return seen(parentPath.parentPath);\n }\n\n if (parentPath.getData(name)) {\n return true;\n } else {\n parentPath.setData(name, true);\n return false;\n }\n }\n}\n\nconst buildStringAssignment = template(`\n ENUM[\"NAME\"] = VALUE;\n`);\n\nconst buildNumericAssignment = template(`\n ENUM[ENUM[\"NAME\"] = VALUE] = \"NAME\";\n`);\n\nconst buildEnumMember = (isString: boolean, options: Record) =>\n (isString ? buildStringAssignment : buildNumericAssignment)(options);\n\n/**\n * Generates the statement that fills in the variable declared by the enum.\n * `(function (E) { ... assignments ... })(E || (E = {}));`\n */\nfunction enumFill(path: NodePath, t: t, id: t.Identifier) {\n const { enumValues: x, data, isPure } = translateEnumValues(path, t);\n const assignments = x.map(([memberName, memberValue]) =>\n buildEnumMember(isSyntacticallyString(memberValue), {\n ENUM: t.cloneNode(id),\n NAME: memberName,\n VALUE: memberValue,\n }),\n );\n\n return {\n fill: {\n ID: t.cloneNode(id),\n ASSIGNMENTS: assignments,\n },\n data,\n isPure,\n };\n}\n\nexport function isSyntacticallyString(expr: t.Expression): boolean {\n // @ts-ignore(Babel 7 vs Babel 8) Type 'Expression | Super' is not assignable to type 'Expression' in Babel 8\n expr = skipTransparentExprWrapperNodes(expr);\n switch (expr.type) {\n case \"BinaryExpression\": {\n const left = expr.left;\n const right = expr.right;\n return (\n expr.operator === \"+\" &&\n (isSyntacticallyString(left as t.Expression) ||\n isSyntacticallyString(right))\n );\n }\n case \"TemplateLiteral\":\n case \"StringLiteral\":\n return true;\n }\n return false;\n}\n\n/**\n * Maps the name of an enum member to its value.\n * We keep track of the previous enum members so you can write code like:\n * enum E {\n * X = 1 << 0,\n * Y = 1 << 1,\n * Z = X | Y,\n * }\n */\ntype PreviousEnumMembers = Map;\n\ntype EnumSelfReferenceVisitorState = {\n seen: PreviousEnumMembers;\n path: NodePath;\n t: t;\n};\n\nfunction ReferencedIdentifier(\n expr: NodePath,\n state: EnumSelfReferenceVisitorState,\n) {\n const { seen, path, t } = state;\n const name = expr.node.name;\n if (seen.has(name) && !expr.scope.hasOwnBinding(name)) {\n expr.replaceWith(\n t.memberExpression(t.cloneNode(path.node.id), t.cloneNode(expr.node)),\n );\n expr.skip();\n }\n}\n\nconst enumSelfReferenceVisitor = {\n ReferencedIdentifier,\n};\n\nexport function translateEnumValues(path: NodePath, t: t) {\n const bindingIdentifier = path.scope.getBindingIdentifier(path.node.id.name);\n const seen: PreviousEnumMembers = ENUMS.get(bindingIdentifier) ?? new Map();\n\n // Start at -1 so the first enum member is its increment, 0.\n let constValue: number | string | undefined = -1;\n let lastName: string;\n let isPure = true;\n\n const enumValues: Array<[name: string, value: t.Expression]> = path\n .get(\"members\")\n .map(memberPath => {\n const member = memberPath.node;\n const name = t.isIdentifier(member.id) ? member.id.name : member.id.value;\n const initializerPath = memberPath.get(\"initializer\");\n const initializer = member.initializer;\n let value: t.Expression;\n if (initializer) {\n constValue = computeConstantValue(initializerPath, seen);\n if (constValue !== undefined) {\n seen.set(name, constValue);\n assert(\n typeof constValue === \"number\" || typeof constValue === \"string\",\n );\n // We do not use `t.valueToNode` because `Infinity`/`NaN` might refer\n // to a local variable. Even 1/0\n // Revisit once https://github.com/microsoft/TypeScript/issues/55091\n // is fixed. Note: we will have to distinguish between actual\n // infinities and reference to non-infinite variables names Infinity.\n if (constValue === Infinity || Number.isNaN(constValue)) {\n value = t.identifier(String(constValue));\n } else if (constValue === -Infinity) {\n value = t.unaryExpression(\"-\", t.identifier(\"Infinity\"));\n } else {\n value = t.valueToNode(constValue);\n }\n } else {\n isPure &&= initializerPath.isPure();\n\n if (initializerPath.isReferencedIdentifier()) {\n ReferencedIdentifier(initializerPath, {\n t,\n seen,\n path,\n });\n } else {\n initializerPath.traverse(enumSelfReferenceVisitor, {\n t,\n seen,\n path,\n });\n }\n\n value = initializerPath.node;\n seen.set(name, undefined);\n }\n } else if (typeof constValue === \"number\") {\n constValue += 1;\n value = t.numericLiteral(constValue);\n seen.set(name, constValue);\n } else if (typeof constValue === \"string\") {\n throw path.buildCodeFrameError(\"Enum member must have initializer.\");\n } else {\n // create dynamic initializer: 1 + ENUM[\"PREVIOUS\"]\n const lastRef = t.memberExpression(\n t.cloneNode(path.node.id),\n t.stringLiteral(lastName),\n true,\n );\n value = t.binaryExpression(\"+\", t.numericLiteral(1), lastRef);\n seen.set(name, undefined);\n }\n\n lastName = name;\n return [name, value];\n });\n\n return {\n isPure,\n data: seen,\n enumValues,\n };\n}\n\n// Based on the TypeScript repository's `computeConstantValue` in `checker.ts`.\nfunction computeConstantValue(\n path: NodePath,\n prevMembers?: PreviousEnumMembers,\n seen: Set = new Set(),\n): number | string | undefined {\n return evaluate(path);\n\n function evaluate(path: NodePath): number | string | undefined {\n const expr = path.node;\n switch (expr.type) {\n case \"MemberExpression\":\n return evaluateRef(path, prevMembers, seen);\n case \"StringLiteral\":\n return expr.value;\n case \"UnaryExpression\":\n return evalUnaryExpression(path as NodePath);\n case \"BinaryExpression\":\n return evalBinaryExpression(path as NodePath);\n case \"NumericLiteral\":\n return expr.value;\n case \"ParenthesizedExpression\":\n return evaluate(path.get(\"expression\"));\n case \"Identifier\":\n return evaluateRef(path, prevMembers, seen);\n case \"TemplateLiteral\": {\n if (expr.quasis.length === 1) {\n return expr.quasis[0].value.cooked;\n }\n\n const paths = (path as NodePath).get(\"expressions\");\n const quasis = expr.quasis;\n let str = \"\";\n\n for (let i = 0; i < quasis.length; i++) {\n str += quasis[i].value.cooked;\n\n if (i + 1 < quasis.length) {\n const value = evaluateRef(paths[i], prevMembers, seen);\n if (value === undefined) return undefined;\n str += value;\n }\n }\n return str;\n }\n default:\n return undefined;\n }\n }\n\n function evaluateRef(\n path: NodePath,\n prevMembers: PreviousEnumMembers,\n seen: Set,\n ): number | string | undefined {\n if (path.isMemberExpression()) {\n const expr = path.node;\n\n const obj = expr.object;\n const prop = expr.property;\n if (\n !t.isIdentifier(obj) ||\n (expr.computed ? !t.isStringLiteral(prop) : !t.isIdentifier(prop))\n ) {\n return;\n }\n const bindingIdentifier = path.scope.getBindingIdentifier(obj.name);\n const data = ENUMS.get(bindingIdentifier);\n if (!data) return;\n // @ts-expect-error checked above\n return data.get(prop.computed ? prop.value : prop.name);\n } else if (path.isIdentifier()) {\n const name = path.node.name;\n\n if ([\"Infinity\", \"NaN\"].includes(name)) {\n return Number(name);\n }\n\n let value = prevMembers?.get(name);\n if (value !== undefined) {\n return value;\n }\n\n if (seen.has(path.node)) return;\n seen.add(path.node);\n\n value = computeConstantValue(path.resolve(), prevMembers, seen);\n prevMembers?.set(name, value);\n return value;\n }\n }\n\n function evalUnaryExpression(\n path: NodePath,\n ): number | string | undefined {\n const value = evaluate(path.get(\"argument\"));\n if (value === undefined) {\n return undefined;\n }\n\n switch (path.node.operator) {\n case \"+\":\n return value;\n case \"-\":\n // eslint-disable-next-line @typescript-eslint/no-unsafe-unary-minus\n return -value;\n case \"~\":\n return ~value;\n default:\n return undefined;\n }\n }\n\n function evalBinaryExpression(\n path: NodePath,\n ): number | string | undefined {\n const left = evaluate(path.get(\"left\")) as any;\n if (left === undefined) {\n return undefined;\n }\n const right = evaluate(path.get(\"right\")) as any;\n if (right === undefined) {\n return undefined;\n }\n\n switch (path.node.operator) {\n case \"|\":\n return left | right;\n case \"&\":\n return left & right;\n case \">>\":\n return left >> right;\n case \">>>\":\n return left >>> right;\n case \"<<\":\n return left << right;\n case \"^\":\n return left ^ right;\n case \"*\":\n return left * right;\n case \"/\":\n return left / right;\n case \"+\":\n return left + right;\n case \"-\":\n return left - right;\n case \"%\":\n return left % right;\n case \"**\":\n return left ** right;\n default:\n return undefined;\n }\n }\n}\n","import type { NodePath, types as t } from \"@babel/core\";\n\nimport { translateEnumValues } from \"./enum.ts\";\n\nexport type NodePathConstEnum = NodePath;\nexport default function transpileConstEnum(\n path: NodePathConstEnum,\n t: typeof import(\"@babel/types\"),\n) {\n const { name } = path.node.id;\n\n const parentIsExport = path.parentPath.isExportNamedDeclaration();\n let isExported = parentIsExport;\n if (!isExported && t.isProgram(path.parent)) {\n isExported = path.parent.body.some(\n stmt =>\n t.isExportNamedDeclaration(stmt) &&\n stmt.exportKind !== \"type\" &&\n !stmt.source &&\n stmt.specifiers.some(\n spec =>\n t.isExportSpecifier(spec) &&\n spec.exportKind !== \"type\" &&\n spec.local.name === name,\n ),\n );\n }\n\n const { enumValues: entries } = translateEnumValues(path, t);\n\n if (isExported) {\n const obj = t.objectExpression(\n entries.map(([name, value]) =>\n t.objectProperty(\n t.isValidIdentifier(name)\n ? t.identifier(name)\n : t.stringLiteral(name),\n value,\n ),\n ),\n );\n\n if (path.scope.hasOwnBinding(name)) {\n (parentIsExport ? path.parentPath : path).replaceWith(\n t.expressionStatement(\n t.callExpression(\n t.memberExpression(t.identifier(\"Object\"), t.identifier(\"assign\")),\n [path.node.id, obj],\n ),\n ),\n );\n } else {\n path.replaceWith(\n t.variableDeclaration(process.env.BABEL_8_BREAKING ? \"const\" : \"var\", [\n t.variableDeclarator(path.node.id, obj),\n ]),\n );\n path.scope.registerDeclaration(path);\n }\n\n return;\n }\n\n const entriesMap = new Map(entries);\n\n // TODO: After fixing https://github.com/babel/babel/pull/11065, we can\n // use path.scope.getBinding(name).referencePaths rather than doing\n // a full traversal.\n path.scope.path.traverse({\n Scope(path) {\n if (path.scope.hasOwnBinding(name)) path.skip();\n },\n MemberExpression(path) {\n if (!t.isIdentifier(path.node.object, { name })) return;\n\n let key: string;\n if (path.node.computed) {\n if (t.isStringLiteral(path.node.property)) {\n key = path.node.property.value;\n } else {\n return;\n }\n } else if (t.isIdentifier(path.node.property)) {\n key = path.node.property.name;\n } else {\n return;\n }\n if (!entriesMap.has(key)) return;\n\n path.replaceWith(t.cloneNode(entriesMap.get(key)));\n },\n });\n\n path.remove();\n}\n","import type { NodePath, Scope } from \"@babel/core\";\n\nexport const GLOBAL_TYPES = new WeakMap>();\n\nexport function isGlobalType({ scope }: NodePath, name: string) {\n if (scope.hasBinding(name)) return false;\n if (GLOBAL_TYPES.get(scope).has(name)) return true;\n\n console.warn(\n `The exported identifier \"${name}\" is not declared in Babel's scope tracker\\n` +\n `as a JavaScript value binding, and \"@babel/plugin-transform-typescript\"\\n` +\n `never encountered it as a TypeScript type declaration.\\n` +\n `It will be treated as a JavaScript value.\\n\\n` +\n `This problem is likely caused by another plugin injecting\\n` +\n `\"${name}\" without registering it in the scope tracker. If you are the author\\n` +\n ` of that plugin, please use \"scope.registerDeclaration(declarationPath)\".`,\n );\n\n return false;\n}\n\nexport function registerGlobalType(programScope: Scope, name: string) {\n GLOBAL_TYPES.get(programScope).add(name);\n}\n","import { template, types as t, type NodePath } from \"@babel/core\";\n\nimport { registerGlobalType } from \"./global-types.ts\";\n\nexport default function transpileNamespace(\n path: NodePath,\n allowNamespaces: boolean,\n) {\n if (path.node.declare || path.node.id.type === \"StringLiteral\") {\n path.remove();\n return;\n }\n\n if (!allowNamespaces) {\n throw path\n .get(\"id\")\n .buildCodeFrameError(\n \"Namespace not marked type-only declare.\" +\n \" Non-declarative namespaces are only supported experimentally in Babel.\" +\n \" To enable and review caveats see:\" +\n \" https://babeljs.io/docs/en/babel-plugin-transform-typescript\",\n );\n }\n\n const name = path.node.id.name;\n const value = handleNested(path, t.cloneNode(path.node, true));\n if (value === null) {\n // This means that `path` is a type-only namespace.\n // We call `registerGlobalType` here to allow it to be stripped.\n const program = path.findParent(p => p.isProgram());\n registerGlobalType(program.scope, name);\n\n path.remove();\n } else if (path.scope.hasOwnBinding(name)) {\n path.replaceWith(value);\n } else {\n path.scope.registerDeclaration(\n path.replaceWithMultiple([getDeclaration(name), value])[0],\n );\n }\n}\n\nfunction getDeclaration(name: string) {\n return t.variableDeclaration(\"let\", [\n t.variableDeclarator(t.identifier(name)),\n ]);\n}\n\nfunction getMemberExpression(name: string, itemName: string) {\n return t.memberExpression(t.identifier(name), t.identifier(itemName));\n}\n\n/**\n * Convert export const foo = 1 to Namespace.foo = 1;\n *\n * @param {t.VariableDeclaration} node given variable declaration, e.g. `const foo = 1`\n * @param {string} name the generated unique namespace member name\n * @param {*} hub An instance implements HubInterface defined in `@babel/traverse` that can throw a code frame error\n */\nfunction handleVariableDeclaration(\n node: t.VariableDeclaration,\n name: string,\n hub: any,\n): t.Statement[] {\n if (node.kind !== \"const\") {\n throw hub.file.buildCodeFrameError(\n node,\n \"Namespaces exporting non-const are not supported by Babel.\" +\n \" Change to const or see:\" +\n \" https://babeljs.io/docs/en/babel-plugin-transform-typescript\",\n );\n }\n const { declarations } = node;\n if (\n declarations.every(\n (declarator): declarator is t.VariableDeclarator & { id: t.Identifier } =>\n t.isIdentifier(declarator.id),\n )\n ) {\n // `export const a = 1` transforms to `const a = N.a = 1`, the output\n // is smaller than `const a = 1; N.a = a`;\n for (const declarator of declarations) {\n declarator.init = t.assignmentExpression(\n \"=\",\n getMemberExpression(name, declarator.id.name),\n declarator.init,\n );\n }\n return [node];\n }\n // Now we have pattern in declarators\n // `export const [a] = 1` transforms to `const [a] = 1; N.a = a`\n const bindingIdentifiers = t.getBindingIdentifiers(node);\n const assignments = [];\n // getBindingIdentifiers returns an object without prototype.\n // eslint-disable-next-line guard-for-in\n for (const idName in bindingIdentifiers) {\n assignments.push(\n t.assignmentExpression(\n \"=\",\n getMemberExpression(name, idName),\n t.cloneNode(bindingIdentifiers[idName]),\n ),\n );\n }\n return [node, t.expressionStatement(t.sequenceExpression(assignments))];\n}\n\nfunction buildNestedAmbientModuleError(path: NodePath, node: t.Node) {\n return path.hub.buildError(\n node,\n \"Ambient modules cannot be nested in other modules or namespaces.\",\n Error,\n );\n}\n\nfunction handleNested(\n path: NodePath,\n node: t.TSModuleDeclaration,\n parentExport?: t.Expression,\n): t.Statement | null {\n const names = new Set();\n const realName = node.id;\n t.assertIdentifier(realName);\n\n const name = path.scope.generateUid(realName.name);\n\n const namespaceTopLevel: t.Statement[] = t.isTSModuleBlock(node.body)\n ? node.body.body\n : // We handle `namespace X.Y {}` as if it was\n // namespace X {\n // export namespace Y {}\n // }\n [t.exportNamedDeclaration(node.body)];\n\n let isEmpty = true;\n\n for (let i = 0; i < namespaceTopLevel.length; i++) {\n const subNode = namespaceTopLevel[i];\n\n // The first switch is mainly to detect name usage. Only export\n // declarations require further transformation.\n switch (subNode.type) {\n case \"TSModuleDeclaration\": {\n if (!t.isIdentifier(subNode.id)) {\n throw buildNestedAmbientModuleError(path, subNode);\n }\n\n const transformed = handleNested(path, subNode);\n if (transformed !== null) {\n isEmpty = false;\n const moduleName = subNode.id.name;\n if (names.has(moduleName)) {\n namespaceTopLevel[i] = transformed;\n } else {\n names.add(moduleName);\n namespaceTopLevel.splice(\n i++,\n 1,\n getDeclaration(moduleName),\n transformed,\n );\n }\n }\n continue;\n }\n case \"TSEnumDeclaration\":\n case \"FunctionDeclaration\":\n case \"ClassDeclaration\":\n isEmpty = false;\n names.add(subNode.id.name);\n continue;\n case \"VariableDeclaration\": {\n isEmpty = false;\n // getBindingIdentifiers returns an object without prototype.\n // eslint-disable-next-line guard-for-in\n for (const name in t.getBindingIdentifiers(subNode)) {\n names.add(name);\n }\n continue;\n }\n default:\n isEmpty &&= t.isTypeScript(subNode);\n // Neither named declaration nor export, continue to next item.\n continue;\n case \"ExportNamedDeclaration\":\n // Export declarations get parsed using the next switch.\n }\n\n if (\"declare\" in subNode.declaration && subNode.declaration.declare) {\n continue;\n }\n\n // Transform the export declarations that occur inside of a namespace.\n switch (subNode.declaration.type) {\n case \"TSEnumDeclaration\":\n case \"FunctionDeclaration\":\n case \"ClassDeclaration\": {\n isEmpty = false;\n const itemName = subNode.declaration.id.name;\n names.add(itemName);\n namespaceTopLevel.splice(\n i++,\n 1,\n subNode.declaration,\n t.expressionStatement(\n t.assignmentExpression(\n \"=\",\n getMemberExpression(name, itemName),\n t.identifier(itemName),\n ),\n ),\n );\n break;\n }\n case \"VariableDeclaration\": {\n isEmpty = false;\n const nodes = handleVariableDeclaration(\n subNode.declaration,\n name,\n path.hub,\n );\n namespaceTopLevel.splice(i, nodes.length, ...nodes);\n i += nodes.length - 1;\n break;\n }\n case \"TSModuleDeclaration\": {\n if (!t.isIdentifier(subNode.declaration.id)) {\n throw buildNestedAmbientModuleError(path, subNode.declaration);\n }\n\n const transformed = handleNested(\n path,\n subNode.declaration,\n t.identifier(name),\n );\n if (transformed !== null) {\n isEmpty = false;\n const moduleName = subNode.declaration.id.name;\n if (names.has(moduleName)) {\n namespaceTopLevel[i] = transformed;\n } else {\n names.add(moduleName);\n namespaceTopLevel.splice(\n i++,\n 1,\n getDeclaration(moduleName),\n transformed,\n );\n }\n } else {\n namespaceTopLevel.splice(i, 1);\n i--;\n }\n }\n }\n }\n\n if (isEmpty) return null;\n\n // {}\n let fallthroughValue: t.Expression = t.objectExpression([]);\n\n if (parentExport) {\n const memberExpr = t.memberExpression(parentExport, realName);\n fallthroughValue = template.expression.ast`\n ${t.cloneNode(memberExpr)} ||\n (${t.cloneNode(memberExpr)} = ${fallthroughValue})\n `;\n }\n\n return template.statement.ast`\n (function (${t.identifier(name)}) {\n ${namespaceTopLevel}\n })(${realName} || (${t.cloneNode(realName)} = ${fallthroughValue}));\n `;\n}\n","import { declare } from \"@babel/helper-plugin-utils\";\nimport syntaxTypeScript from \"@babel/plugin-syntax-typescript\";\nimport type { PluginPass, types as t, Scope, NodePath } from \"@babel/core\";\nimport { injectInitialization } from \"@babel/helper-create-class-features-plugin\";\nimport type { Options as SyntaxOptions } from \"@babel/plugin-syntax-typescript\";\n\nimport transpileConstEnum from \"./const-enum.ts\";\nimport type { NodePathConstEnum } from \"./const-enum.ts\";\nimport transpileEnum from \"./enum.ts\";\nimport {\n GLOBAL_TYPES,\n isGlobalType,\n registerGlobalType,\n} from \"./global-types.ts\";\nimport transpileNamespace from \"./namespace.ts\";\n\nfunction isInType(path: NodePath) {\n switch (path.parent.type) {\n case \"TSTypeReference\":\n case \"TSExpressionWithTypeArguments\":\n case \"TSTypeQuery\":\n return true;\n case \"TSQualifiedName\":\n return (\n // `import foo = ns.bar` is transformed to `var foo = ns.bar` and should not be removed\n path.parentPath.findParent(path => path.type !== \"TSQualifiedName\")\n .type !== \"TSImportEqualsDeclaration\"\n );\n case \"ExportSpecifier\":\n return (\n // export { type foo };\n path.parent.exportKind === \"type\" ||\n // export type { foo };\n // @ts-expect-error: DeclareExportDeclaration does not have `exportKind`\n (path.parentPath as NodePath).parent.exportKind ===\n \"type\"\n );\n default:\n return false;\n }\n}\n\n// Track programs which contain imports/exports of values, so that we can include\n// empty exports for programs that do not, but were parsed as modules. This allows\n// tools to infer unambiguously that results are ESM.\nconst NEEDS_EXPLICIT_ESM = new WeakMap();\nconst PARSED_PARAMS = new WeakSet();\n\n// A hack to avoid removing the impl Binding when we remove the declare NodePath\nfunction safeRemove(path: NodePath) {\n const ids = path.getBindingIdentifiers();\n for (const name of Object.keys(ids)) {\n const binding = path.scope.getBinding(name);\n if (binding && binding.identifier === ids[name]) {\n binding.scope.removeBinding(name);\n }\n }\n path.opts.noScope = true;\n path.remove();\n path.opts.noScope = false;\n}\n\nfunction assertCjsTransformEnabled(\n path: NodePath,\n pass: PluginPass,\n wrong: string,\n suggestion: string,\n extra: string = \"\",\n): void {\n if (pass.file.get(\"@babel/plugin-transform-modules-*\") !== \"commonjs\") {\n throw path.buildCodeFrameError(\n `\\`${wrong}\\` is only supported when compiling modules to CommonJS.\\n` +\n `Please consider using \\`${suggestion}\\`${extra}, or add ` +\n `@babel/plugin-transform-modules-commonjs to your Babel config.`,\n );\n }\n}\n\nexport interface Options extends SyntaxOptions {\n /** @default true */\n allowNamespaces?: boolean;\n /** @default \"React.createElement\" */\n jsxPragma?: string;\n /** @default \"React.Fragment\" */\n jsxPragmaFrag?: string;\n onlyRemoveTypeImports?: boolean;\n optimizeConstEnums?: boolean;\n allowDeclareFields?: boolean;\n}\n\ntype ExtraNodeProps = {\n declare?: unknown;\n accessibility?: unknown;\n abstract?: unknown;\n optional?: unknown;\n override?: unknown;\n};\n\nexport default declare((api, opts: Options) => {\n // `@babel/core` and `@babel/types` are bundled in some downstream libraries.\n // Ref: https://github.com/babel/babel/issues/15089\n const { types: t, template } = api;\n\n api.assertVersion(REQUIRED_VERSION(7));\n\n const JSX_PRAGMA_REGEX = /\\*?\\s*@jsx((?:Frag)?)\\s+(\\S+)/;\n\n const {\n allowNamespaces = true,\n jsxPragma = \"React.createElement\",\n jsxPragmaFrag = \"React.Fragment\",\n onlyRemoveTypeImports = false,\n optimizeConstEnums = false,\n } = opts;\n\n if (!process.env.BABEL_8_BREAKING) {\n // eslint-disable-next-line no-var\n var { allowDeclareFields = false } = opts;\n }\n\n const classMemberVisitors = {\n field(\n path: NodePath<\n (t.ClassPrivateProperty | t.ClassProperty | t.ClassAccessorProperty) &\n ExtraNodeProps\n >,\n ) {\n const { node } = path;\n\n if (!process.env.BABEL_8_BREAKING) {\n if (!allowDeclareFields && node.declare) {\n throw path.buildCodeFrameError(\n `The 'declare' modifier is only allowed when the 'allowDeclareFields' option of ` +\n `@babel/plugin-transform-typescript or @babel/preset-typescript is enabled.`,\n );\n }\n }\n if (node.declare) {\n if (node.value) {\n throw path.buildCodeFrameError(\n `Fields with the 'declare' modifier cannot be initialized here, but only in the constructor`,\n );\n }\n if (!node.decorators) {\n path.remove();\n }\n } else if (node.definite) {\n if (node.value) {\n throw path.buildCodeFrameError(\n `Definitely assigned fields cannot be initialized here, but only in the constructor`,\n );\n }\n if (!process.env.BABEL_8_BREAKING) {\n // keep the definitely assigned fields only when `allowDeclareFields` (equivalent of\n // Typescript's `useDefineForClassFields`) is true\n if (\n !allowDeclareFields &&\n !node.decorators &&\n !t.isClassPrivateProperty(node)\n ) {\n path.remove();\n }\n }\n } else if (node.abstract) {\n path.remove();\n } else if (!process.env.BABEL_8_BREAKING) {\n if (\n !allowDeclareFields &&\n !node.value &&\n !node.decorators &&\n !t.isClassPrivateProperty(node)\n ) {\n path.remove();\n }\n }\n\n if (node.accessibility) node.accessibility = null;\n if (node.abstract) node.abstract = null;\n if (node.readonly) node.readonly = null;\n if (node.optional) node.optional = null;\n if (node.typeAnnotation) node.typeAnnotation = null;\n if (node.definite) node.definite = null;\n if (node.declare) node.declare = null;\n if (node.override) node.override = null;\n },\n method({ node }: NodePath) {\n if (node.accessibility) node.accessibility = null;\n if (node.abstract) node.abstract = null;\n if (node.optional) node.optional = null;\n if (node.override) node.override = null;\n\n // Rest handled by Function visitor\n },\n constructor(path: NodePath, classPath: NodePath) {\n if (path.node.accessibility) path.node.accessibility = null;\n // Collects parameter properties so that we can add an assignment\n // for each of them in the constructor body\n //\n // We use a WeakSet to ensure an assignment for a parameter\n // property is only added once. This is necessary for cases like\n // using `transform-classes`, which causes this visitor to run\n // twice.\n const assigns: t.ExpressionStatement[] = [];\n const { scope } = path;\n for (const paramPath of path.get(\"params\")) {\n const param = paramPath.node;\n if (param.type === \"TSParameterProperty\") {\n const parameter = param.parameter;\n if (PARSED_PARAMS.has(parameter)) continue;\n PARSED_PARAMS.add(parameter);\n let id;\n if (t.isIdentifier(parameter)) {\n id = parameter;\n } else if (\n t.isAssignmentPattern(parameter) &&\n t.isIdentifier(parameter.left)\n ) {\n id = parameter.left;\n } else {\n throw paramPath.buildCodeFrameError(\n \"Parameter properties can not be destructuring patterns.\",\n );\n }\n assigns.push(\n template.statement.ast`\n this.${t.cloneNode(id)} = ${t.cloneNode(id)}\n ` as t.ExpressionStatement,\n );\n\n paramPath.replaceWith(paramPath.get(\"parameter\"));\n scope.registerBinding(\"param\", paramPath);\n }\n }\n injectInitialization(classPath, path, assigns);\n },\n };\n\n return {\n name: \"transform-typescript\",\n inherits: syntaxTypeScript,\n\n visitor: {\n //\"Pattern\" alias doesn't include Identifier or RestElement.\n Pattern: visitPattern,\n Identifier: visitPattern,\n RestElement: visitPattern,\n\n Program: {\n enter(path, state) {\n const { file } = state;\n let fileJsxPragma = null;\n let fileJsxPragmaFrag = null;\n const programScope = path.scope;\n\n if (!GLOBAL_TYPES.has(programScope)) {\n GLOBAL_TYPES.set(programScope, new Set());\n }\n\n if (file.ast.comments) {\n for (const comment of file.ast.comments) {\n const jsxMatches = JSX_PRAGMA_REGEX.exec(comment.value);\n if (jsxMatches) {\n if (jsxMatches[1]) {\n // isFragment\n fileJsxPragmaFrag = jsxMatches[2];\n } else {\n fileJsxPragma = jsxMatches[2];\n }\n }\n }\n }\n\n let pragmaImportName = fileJsxPragma || jsxPragma;\n if (pragmaImportName) {\n [pragmaImportName] = pragmaImportName.split(\".\");\n }\n\n let pragmaFragImportName = fileJsxPragmaFrag || jsxPragmaFrag;\n if (pragmaFragImportName) {\n [pragmaFragImportName] = pragmaFragImportName.split(\".\");\n }\n\n // remove type imports\n for (let stmt of path.get(\"body\") as Iterable<\n NodePath\n >) {\n if (stmt.isImportDeclaration()) {\n if (!NEEDS_EXPLICIT_ESM.has(state.file.ast.program)) {\n NEEDS_EXPLICIT_ESM.set(state.file.ast.program, true);\n }\n\n if (stmt.node.importKind === \"type\") {\n for (const specifier of stmt.node.specifiers) {\n registerGlobalType(programScope, specifier.local.name);\n }\n stmt.remove();\n continue;\n }\n\n const importsToRemove: Set> = new Set();\n const specifiersLength = stmt.node.specifiers.length;\n const isAllSpecifiersElided = () =>\n specifiersLength > 0 &&\n specifiersLength === importsToRemove.size;\n\n for (const specifier of stmt.node.specifiers) {\n if (\n specifier.type === \"ImportSpecifier\" &&\n specifier.importKind === \"type\"\n ) {\n registerGlobalType(programScope, specifier.local.name);\n const binding = stmt.scope.getBinding(specifier.local.name);\n if (binding) {\n importsToRemove.add(binding.path);\n }\n }\n }\n\n // If onlyRemoveTypeImports is `true`, only remove type-only imports\n // and exports introduced in TypeScript 3.8.\n if (onlyRemoveTypeImports) {\n NEEDS_EXPLICIT_ESM.set(path.node, false);\n } else {\n // Note: this will allow both `import { } from \"m\"` and `import \"m\";`.\n // In TypeScript, the former would be elided.\n if (stmt.node.specifiers.length === 0) {\n NEEDS_EXPLICIT_ESM.set(path.node, false);\n continue;\n }\n\n for (const specifier of stmt.node.specifiers) {\n const binding = stmt.scope.getBinding(specifier.local.name);\n\n // The binding may not exist if the import node was explicitly\n // injected by another plugin. Currently core does not do a good job\n // of keeping scope bindings synchronized with the AST. For now we\n // just bail if there is no binding, since chances are good that if\n // the import statement was injected then it wasn't a typescript type\n // import anyway.\n if (binding && !importsToRemove.has(binding.path)) {\n if (\n isImportTypeOnly({\n binding,\n programPath: path,\n pragmaImportName,\n pragmaFragImportName,\n })\n ) {\n importsToRemove.add(binding.path);\n } else {\n NEEDS_EXPLICIT_ESM.set(path.node, false);\n }\n }\n }\n }\n\n if (isAllSpecifiersElided() && !onlyRemoveTypeImports) {\n stmt.remove();\n } else {\n for (const importPath of importsToRemove) {\n importPath.remove();\n }\n }\n\n continue;\n }\n\n if (stmt.isExportDeclaration()) {\n stmt = stmt.get(\"declaration\");\n }\n\n if (stmt.isVariableDeclaration({ declare: true })) {\n for (const name of Object.keys(stmt.getBindingIdentifiers())) {\n registerGlobalType(programScope, name);\n }\n } else if (\n stmt.isTSTypeAliasDeclaration() ||\n (stmt.isTSDeclareFunction() && stmt.get(\"id\").isIdentifier()) ||\n stmt.isTSInterfaceDeclaration() ||\n stmt.isClassDeclaration({ declare: true }) ||\n stmt.isTSEnumDeclaration({ declare: true }) ||\n (stmt.isTSModuleDeclaration({ declare: true }) &&\n stmt.get(\"id\").isIdentifier())\n ) {\n registerGlobalType(\n programScope,\n (stmt.node.id as t.Identifier).name,\n );\n }\n }\n },\n exit(path) {\n if (\n path.node.sourceType === \"module\" &&\n NEEDS_EXPLICIT_ESM.get(path.node)\n ) {\n // If there are no remaining value exports, this file can no longer\n // be inferred to be ESM. Leave behind an empty export declaration\n // so it can be.\n path.pushContainer(\"body\", t.exportNamedDeclaration());\n }\n },\n },\n\n ExportNamedDeclaration(path, state) {\n if (!NEEDS_EXPLICIT_ESM.has(state.file.ast.program)) {\n NEEDS_EXPLICIT_ESM.set(state.file.ast.program, true);\n }\n\n if (path.node.exportKind === \"type\") {\n path.remove();\n return;\n }\n\n // remove export declaration that is filled with type-only specifiers\n // export { type A1, type A2 } from \"a\";\n if (\n path.node.source &&\n path.node.specifiers.length > 0 &&\n path.node.specifiers.every(\n specifier =>\n specifier.type === \"ExportSpecifier\" &&\n specifier.exportKind === \"type\",\n )\n ) {\n path.remove();\n return;\n }\n\n // remove export declaration if it's exporting only types\n // This logic is needed when exportKind is \"value\", because\n // currently the \"type\" keyword is optional.\n // TODO:\n // Also, currently @babel/parser sets exportKind to \"value\" for\n // export interface A {}\n // etc.\n if (\n !path.node.source &&\n path.node.specifiers.length > 0 &&\n path.node.specifiers.every(\n specifier =>\n t.isExportSpecifier(specifier) &&\n isGlobalType(path, specifier.local.name),\n )\n ) {\n path.remove();\n return;\n }\n\n // Convert `export namespace X {}` into `export let X; namespace X {}`,\n // so that when visiting TSModuleDeclaration we do not have to possibly\n // replace its parent path.\n if (t.isTSModuleDeclaration(path.node.declaration)) {\n const namespace = path.node.declaration;\n const { id } = namespace;\n if (t.isIdentifier(id)) {\n if (path.scope.hasOwnBinding(id.name)) {\n path.replaceWith(namespace);\n } else {\n const [newExport] = path.replaceWithMultiple([\n t.exportNamedDeclaration(\n t.variableDeclaration(\"let\", [\n t.variableDeclarator(t.cloneNode(id)),\n ]),\n ),\n namespace,\n ]);\n path.scope.registerDeclaration(newExport);\n }\n }\n }\n\n NEEDS_EXPLICIT_ESM.set(state.file.ast.program, false);\n },\n\n ExportAllDeclaration(path) {\n if (path.node.exportKind === \"type\") path.remove();\n },\n\n ExportSpecifier(path) {\n // remove type exports\n type Parent = t.ExportDeclaration & { source?: t.StringLiteral };\n const parent = path.parent as Parent;\n if (\n (!parent.source && isGlobalType(path, path.node.local.name)) ||\n path.node.exportKind === \"type\"\n ) {\n path.remove();\n }\n },\n\n ExportDefaultDeclaration(path, state) {\n if (!NEEDS_EXPLICIT_ESM.has(state.file.ast.program)) {\n NEEDS_EXPLICIT_ESM.set(state.file.ast.program, true);\n }\n\n // remove whole declaration if it's exporting a TS type\n if (\n t.isIdentifier(path.node.declaration) &&\n isGlobalType(path, path.node.declaration.name)\n ) {\n path.remove();\n\n return;\n }\n\n NEEDS_EXPLICIT_ESM.set(state.file.ast.program, false);\n },\n\n TSDeclareFunction(path) {\n safeRemove(path);\n },\n\n TSDeclareMethod(path) {\n safeRemove(path);\n },\n\n VariableDeclaration(path) {\n if (path.node.declare) {\n safeRemove(path);\n }\n },\n\n VariableDeclarator({ node }) {\n if (node.definite) node.definite = null;\n },\n\n TSIndexSignature(path) {\n path.remove();\n },\n\n ClassDeclaration(path) {\n const { node } = path;\n if (node.declare) {\n safeRemove(path);\n }\n },\n\n Class(path) {\n const { node }: { node: typeof path.node & ExtraNodeProps } = path;\n\n if (node.typeParameters) node.typeParameters = null;\n if (node.superTypeParameters) node.superTypeParameters = null;\n if (node.implements) node.implements = null;\n if (node.abstract) node.abstract = null;\n\n // Similar to the logic in `transform-flow-strip-types`, we need to\n // handle `TSParameterProperty` and `ClassProperty` here because the\n // class transform would transform the class, causing more specific\n // visitors to not run.\n path.get(\"body.body\").forEach(child => {\n if (child.isClassMethod() || child.isClassPrivateMethod()) {\n if (child.node.kind === \"constructor\") {\n classMemberVisitors.constructor(\n // @ts-expect-error A constructor must not be a private method\n child,\n path,\n );\n } else {\n classMemberVisitors.method(child);\n }\n } else if (\n child.isClassProperty() ||\n child.isClassPrivateProperty() ||\n child.isClassAccessorProperty()\n ) {\n classMemberVisitors.field(child);\n }\n });\n },\n\n Function(path) {\n const { node } = path;\n if (node.typeParameters) node.typeParameters = null;\n if (node.returnType) node.returnType = null;\n\n const params = node.params;\n if (params.length > 0 && t.isIdentifier(params[0], { name: \"this\" })) {\n params.shift();\n }\n },\n\n TSModuleDeclaration(path) {\n transpileNamespace(path, allowNamespaces);\n },\n\n TSInterfaceDeclaration(path) {\n path.remove();\n },\n\n TSTypeAliasDeclaration(path) {\n path.remove();\n },\n\n TSEnumDeclaration(path) {\n if (optimizeConstEnums && path.node.const) {\n transpileConstEnum(path as NodePathConstEnum, t);\n } else {\n transpileEnum(path, t);\n }\n },\n\n TSImportEqualsDeclaration(\n path: NodePath,\n pass,\n ) {\n const { id, moduleReference, isExport } = path.node;\n\n let init: t.Expression;\n let varKind: \"var\" | \"const\";\n if (t.isTSExternalModuleReference(moduleReference)) {\n // import alias = require('foo');\n assertCjsTransformEnabled(\n path,\n pass,\n `import ${id.name} = require(...);`,\n `import ${id.name} from '...';`,\n \" alongside Typescript's --allowSyntheticDefaultImports option\",\n );\n init = t.callExpression(t.identifier(\"require\"), [\n moduleReference.expression,\n ]);\n varKind = \"const\";\n } else {\n // import alias = Namespace;\n init = entityNameToExpr(moduleReference);\n varKind = \"var\";\n }\n const newNode = t.variableDeclaration(varKind, [\n t.variableDeclarator(id, init),\n ]);\n\n path.replaceWith(\n isExport ? t.exportNamedDeclaration(newNode) : newNode,\n );\n path.scope.registerDeclaration(path);\n },\n\n TSExportAssignment(path, pass) {\n assertCjsTransformEnabled(\n path,\n pass,\n `export = ;`,\n `export default ;`,\n );\n path.replaceWith(\n template.statement.ast`module.exports = ${path.node.expression}`,\n );\n },\n\n TSTypeAssertion(path) {\n path.replaceWith(path.node.expression);\n },\n\n [`TSAsExpression${\n // Added in Babel 7.20.0\n t.tsSatisfiesExpression ? \"|TSSatisfiesExpression\" : \"\"\n }`](path: NodePath) {\n let { node }: { node: t.Expression } = path;\n do {\n node = node.expression;\n } while (t.isTSAsExpression(node) || t.isTSSatisfiesExpression?.(node));\n path.replaceWith(node);\n },\n\n [process.env.BABEL_8_BREAKING\n ? \"TSNonNullExpression|TSInstantiationExpression\"\n : /* This has been introduced in Babel 7.18.0\n We use api.types.* and not t.* for feature detection,\n because the Babel version that is running this plugin\n (where we check if the visitor is valid) might be different\n from the Babel version that we resolve with `import \"@babel/core\"`.\n This happens, for example, with Next.js that bundled `@babel/core`\n but allows loading unbundled plugin (which cannot obviously import\n the bundled `@babel/core` version).\n */\n api.types.tsInstantiationExpression\n ? \"TSNonNullExpression|TSInstantiationExpression\"\n : \"TSNonNullExpression\"](\n path: NodePath,\n ) {\n path.replaceWith(path.node.expression);\n },\n\n CallExpression(path) {\n path.node.typeParameters = null;\n },\n\n OptionalCallExpression(path) {\n path.node.typeParameters = null;\n },\n\n NewExpression(path) {\n path.node.typeParameters = null;\n },\n\n JSXOpeningElement(path) {\n path.node.typeParameters = null;\n },\n\n TaggedTemplateExpression(path) {\n path.node.typeParameters = null;\n },\n },\n };\n\n function entityNameToExpr(node: t.TSEntityName): t.Expression {\n if (t.isTSQualifiedName(node)) {\n return t.memberExpression(entityNameToExpr(node.left), node.right);\n }\n\n return node;\n }\n\n function visitPattern({\n node,\n }: NodePath) {\n if (node.typeAnnotation) node.typeAnnotation = null;\n if (t.isIdentifier(node) && node.optional) node.optional = null;\n // 'access' and 'readonly' are only for parameter properties, so constructor visitor will handle them.\n }\n\n function isImportTypeOnly({\n binding,\n programPath,\n pragmaImportName,\n pragmaFragImportName,\n }: {\n binding: Scope.Binding;\n programPath: NodePath;\n pragmaImportName: string;\n pragmaFragImportName: string;\n }) {\n for (const path of binding.referencePaths) {\n if (!isInType(path)) {\n return false;\n }\n }\n\n if (\n binding.identifier.name !== pragmaImportName &&\n binding.identifier.name !== pragmaFragImportName\n ) {\n return true;\n }\n\n // \"React\" or the JSX pragma is referenced as a value if there are any JSX elements/fragments in the code.\n let sourceFileHasJsx = false;\n programPath.traverse({\n \"JSXElement|JSXFragment\"(path) {\n sourceFileHasJsx = true;\n path.stop();\n },\n });\n return !sourceFileHasJsx;\n }\n});\n","import { declare } from \"@babel/helper-plugin-utils\";\nimport { types as t, type NodePath } from \"@babel/core\";\n\nexport default declare(api => {\n api.assertVersion(REQUIRED_VERSION(7));\n\n const surrogate = /[\\ud800-\\udfff]/g;\n const unicodeEscape = /(\\\\+)u\\{([0-9a-fA-F]+)\\}/g;\n\n function escape(code: number) {\n if (process.env.BABEL_8_BREAKING) {\n return \"\\\\u\" + code.toString(16).padStart(4, \"0\");\n } else {\n let str = code.toString(16);\n while (str.length < 4) str = \"0\" + str;\n return \"\\\\u\" + str;\n }\n }\n\n function replacer(match: string, backslashes: string, code: string) {\n if (backslashes.length % 2 === 0) {\n return match;\n }\n\n const char = String.fromCodePoint(parseInt(code, 16));\n const escaped = backslashes.slice(0, -1) + escape(char.charCodeAt(0));\n\n return char.length === 1 ? escaped : escaped + escape(char.charCodeAt(1));\n }\n\n function replaceUnicodeEscapes(str: string) {\n return str.replace(unicodeEscape, replacer);\n }\n\n function getUnicodeEscape(str: string) {\n let match;\n while ((match = unicodeEscape.exec(str))) {\n if (match[1].length % 2 === 0) continue;\n unicodeEscape.lastIndex = 0;\n return match[0];\n }\n return null;\n }\n\n return {\n name: \"transform-unicode-escapes\",\n manipulateOptions({ generatorOpts }) {\n // Babel 8 will enable jsesc minimal mode by default, which outputs\n // unescaped unicode string\n if (!generatorOpts.jsescOption) {\n generatorOpts.jsescOption = {};\n }\n generatorOpts.jsescOption.minimal ??= false;\n },\n visitor: {\n Identifier(path) {\n const { node, key } = path;\n const { name } = node;\n const replaced = name.replace(surrogate, c => {\n return `_u${c.charCodeAt(0).toString(16)}`;\n });\n if (name === replaced) return;\n\n const str = t.inherits(t.stringLiteral(name), node);\n\n if (key === \"key\") {\n path.replaceWith(str);\n return;\n }\n\n const { parentPath, scope } = path;\n if (\n parentPath.isMemberExpression({ property: node }) ||\n parentPath.isOptionalMemberExpression({ property: node })\n ) {\n parentPath.node.computed = true;\n path.replaceWith(str);\n return;\n }\n\n const binding = scope.getBinding(name);\n if (binding) {\n scope.rename(name, scope.generateUid(replaced));\n return;\n }\n\n throw path.buildCodeFrameError(\n `Can't reference '${name}' as a bare identifier`,\n );\n },\n\n \"StringLiteral|DirectiveLiteral\"(\n path: NodePath,\n ) {\n const { node } = path;\n const { extra } = node;\n\n if (extra?.raw) extra.raw = replaceUnicodeEscapes(extra.raw as string);\n },\n\n TemplateElement(path) {\n const { node, parentPath } = path;\n const { value } = node;\n\n const firstEscape = getUnicodeEscape(value.raw);\n if (!firstEscape) return;\n\n const grandParent = parentPath.parentPath;\n if (grandParent.isTaggedTemplateExpression()) {\n throw path.buildCodeFrameError(\n `Can't replace Unicode escape '${firstEscape}' inside tagged template literals. You can enable '@babel/plugin-transform-template-literals' to compile them to classic strings.`,\n );\n }\n\n value.raw = replaceUnicodeEscapes(value.raw);\n },\n },\n };\n});\n","/* eslint-disable @babel/development/plugin-name */\nimport { createRegExpFeaturePlugin } from \"@babel/helper-create-regexp-features-plugin\";\nimport { declare } from \"@babel/helper-plugin-utils\";\n\nexport default declare(api => {\n api.assertVersion(REQUIRED_VERSION(7));\n\n return createRegExpFeaturePlugin({\n name: \"transform-unicode-regex\",\n feature: \"unicodeFlag\",\n });\n});\n","import { declare } from \"@babel/helper-plugin-utils\";\nimport syntaxExplicitResourceManagement from \"@babel/plugin-syntax-explicit-resource-management\";\nimport { types as t, template, traverse } from \"@babel/core\";\nimport type { NodePath, Visitor, PluginPass } from \"@babel/core\";\n\nconst enum USING_KIND {\n NORMAL,\n AWAIT,\n}\n\nexport default declare(api => {\n api.assertVersion(REQUIRED_VERSION(\"^7.22.0\"));\n\n const TOP_LEVEL_USING = new Map();\n\n function isUsingDeclaration(node: t.Node): node is t.VariableDeclaration {\n if (!t.isVariableDeclaration(node)) return false;\n return (\n node.kind === \"using\" ||\n node.kind === \"await using\" ||\n TOP_LEVEL_USING.has(node)\n );\n }\n\n const transformUsingDeclarationsVisitor: Visitor = {\n ForOfStatement(path: NodePath) {\n const { left } = path.node;\n if (!isUsingDeclaration(left)) return;\n\n const { id } = left.declarations[0];\n const tmpId = path.scope.generateUidIdentifierBasedOnNode(id);\n left.declarations[0].id = tmpId;\n left.kind = \"const\";\n\n path.ensureBlock();\n path.node.body.body.unshift(\n t.variableDeclaration(\"using\", [\n t.variableDeclarator(id, t.cloneNode(tmpId)),\n ]),\n );\n },\n \"BlockStatement|StaticBlock\"(\n path: NodePath,\n state,\n ) {\n if (process.env.BABEL_8_BREAKING || state.availableHelper(\"usingCtx\")) {\n let ctx: t.Identifier | null = null;\n let needsAwait = false;\n\n for (const node of path.node.body) {\n if (!isUsingDeclaration(node)) continue;\n ctx ??= path.scope.generateUidIdentifier(\"usingCtx\");\n const isAwaitUsing =\n node.kind === \"await using\" ||\n TOP_LEVEL_USING.get(node) === USING_KIND.AWAIT;\n needsAwait ||= isAwaitUsing;\n\n if (!TOP_LEVEL_USING.delete(node)) {\n node.kind = \"const\";\n }\n for (const decl of node.declarations) {\n decl.init = t.callExpression(\n t.memberExpression(\n t.cloneNode(ctx),\n isAwaitUsing ? t.identifier(\"a\") : t.identifier(\"u\"),\n ),\n [decl.init],\n );\n }\n }\n if (!ctx) return;\n\n const disposeCall = t.callExpression(\n t.memberExpression(t.cloneNode(ctx), t.identifier(\"d\")),\n [],\n );\n\n const replacement = template.statement.ast`\n try {\n var ${t.cloneNode(ctx)} = ${state.addHelper(\"usingCtx\")}();\n ${path.node.body}\n } catch (_) {\n ${t.cloneNode(ctx)}.e = _;\n } finally {\n ${needsAwait ? t.awaitExpression(disposeCall) : disposeCall}\n }\n ` as t.TryStatement;\n\n t.inherits(replacement, path.node);\n\n const { parentPath } = path;\n if (\n parentPath.isFunction() ||\n parentPath.isTryStatement() ||\n parentPath.isCatchClause()\n ) {\n path.replaceWith(t.blockStatement([replacement]));\n } else if (path.isStaticBlock()) {\n path.node.body = [replacement];\n } else {\n path.replaceWith(replacement);\n }\n } else {\n let stackId: t.Identifier | null = null;\n let needsAwait = false;\n\n for (const node of path.node.body) {\n if (!isUsingDeclaration(node)) continue;\n stackId ??= path.scope.generateUidIdentifier(\"stack\");\n const isAwaitUsing =\n node.kind === \"await using\" ||\n TOP_LEVEL_USING.get(node) === USING_KIND.AWAIT;\n needsAwait ||= isAwaitUsing;\n\n if (!TOP_LEVEL_USING.delete(node)) {\n node.kind = \"const\";\n }\n node.declarations.forEach(decl => {\n const args = [t.cloneNode(stackId), decl.init];\n if (isAwaitUsing) args.push(t.booleanLiteral(true));\n decl.init = t.callExpression(state.addHelper(\"using\"), args);\n });\n }\n if (!stackId) return;\n\n const errorId = path.scope.generateUidIdentifier(\"error\");\n const hasErrorId = path.scope.generateUidIdentifier(\"hasError\");\n\n let disposeCall: t.Expression = t.callExpression(\n state.addHelper(\"dispose\"),\n [t.cloneNode(stackId), t.cloneNode(errorId), t.cloneNode(hasErrorId)],\n );\n if (needsAwait) disposeCall = t.awaitExpression(disposeCall);\n\n const replacement = template.statement.ast`\n try {\n var ${stackId} = [];\n ${path.node.body}\n } catch (_) {\n var ${errorId} = _;\n var ${hasErrorId} = true;\n } finally {\n ${disposeCall}\n }\n ` as t.TryStatement;\n\n t.inherits(replacement.block, path.node);\n\n const { parentPath } = path;\n if (\n parentPath.isFunction() ||\n parentPath.isTryStatement() ||\n parentPath.isCatchClause()\n ) {\n path.replaceWith(t.blockStatement([replacement]));\n } else if (path.isStaticBlock()) {\n path.node.body = [replacement];\n } else {\n path.replaceWith(replacement);\n }\n }\n },\n SwitchStatement(path, state) {\n let ctx: t.Identifier | null = null;\n let needsAwait = false;\n\n const { cases } = path.node;\n for (const c of cases) {\n for (const stmt of c.consequent) {\n if (isUsingDeclaration(stmt)) {\n if (\n !process.env.BABEL_8_BREAKING &&\n !state.availableHelper(\"usingCtx\")\n ) {\n path.traverse({\n VariableDeclaration(path) {\n const { node } = path;\n if (!isUsingDeclaration(node)) return;\n throw path.buildCodeFrameError(\n \"`using` declarations inside `switch` statements are not supported by your current `@babel/core` version, please update to a more recent one\",\n );\n },\n });\n }\n\n ctx ??= path.scope.generateUidIdentifier(\"usingCtx\");\n\n const isAwaitUsing = stmt.kind === \"await using\";\n needsAwait ||= isAwaitUsing;\n\n stmt.kind = \"const\";\n for (const decl of stmt.declarations) {\n decl.init = t.callExpression(\n t.memberExpression(\n t.cloneNode(ctx),\n isAwaitUsing ? t.identifier(\"a\") : t.identifier(\"u\"),\n ),\n [decl.init],\n );\n }\n }\n }\n }\n if (!ctx) return;\n\n const disposeCall = t.callExpression(\n t.memberExpression(t.cloneNode(ctx), t.identifier(\"d\")),\n [],\n );\n\n const replacement = template.statement.ast`\n try {\n var ${t.cloneNode(ctx)} = ${state.addHelper(\"usingCtx\")}();\n ${path.node}\n } catch (_) {\n ${t.cloneNode(ctx)}.e = _;\n } finally {\n ${needsAwait ? t.awaitExpression(disposeCall) : disposeCall}\n }\n ` as t.TryStatement;\n\n t.inherits(replacement, path.node);\n\n path.replaceWith(replacement);\n },\n };\n\n const transformUsingDeclarationsVisitorSkipFn: Visitor =\n traverse.visitors.merge([\n transformUsingDeclarationsVisitor,\n {\n Function(path) {\n path.skip();\n },\n },\n ]);\n\n return {\n name: \"proposal-explicit-resource-management\",\n inherits: syntaxExplicitResourceManagement,\n\n visitor: traverse.visitors.merge([\n transformUsingDeclarationsVisitor,\n {\n // To transform top-level using declarations, we must wrap the\n // module body in a block after hoisting all the exports and imports.\n // This might cause some variables to be `undefined` rather than TDZ.\n Program(path) {\n TOP_LEVEL_USING.clear();\n\n if (path.node.sourceType !== \"module\") return;\n if (!path.node.body.some(isUsingDeclaration)) return;\n\n const innerBlockBody = [];\n for (const stmt of path.get(\"body\")) {\n if (stmt.isFunctionDeclaration() || stmt.isImportDeclaration()) {\n continue;\n }\n\n let node: t.Statement | t.Declaration = stmt.node;\n let shouldRemove = true;\n\n if (stmt.isExportDefaultDeclaration()) {\n let { declaration } = stmt.node;\n let varId;\n if (t.isClassDeclaration(declaration)) {\n varId = declaration.id;\n declaration.id = null;\n declaration = t.toExpression(declaration);\n } else if (!t.isExpression(declaration)) {\n continue;\n }\n\n varId ??= path.scope.generateUidIdentifier(\"_default\");\n innerBlockBody.push(\n t.variableDeclaration(\"var\", [\n t.variableDeclarator(varId, declaration),\n ]),\n );\n stmt.replaceWith(\n t.exportNamedDeclaration(null, [\n t.exportSpecifier(\n t.cloneNode(varId),\n t.identifier(\"default\"),\n ),\n ]),\n );\n continue;\n }\n\n if (stmt.isExportNamedDeclaration()) {\n node = stmt.node.declaration;\n if (!node || t.isFunction(node)) continue;\n\n stmt.replaceWith(\n t.exportNamedDeclaration(\n null,\n Object.keys(t.getOuterBindingIdentifiers(node, false)).map(\n id => t.exportSpecifier(t.identifier(id), t.identifier(id)),\n ),\n ),\n );\n shouldRemove = false;\n } else if (stmt.isExportDeclaration()) {\n continue;\n }\n\n if (t.isClassDeclaration(node)) {\n const { id } = node;\n node.id = null;\n innerBlockBody.push(\n t.variableDeclaration(\"var\", [\n t.variableDeclarator(id, t.toExpression(node)),\n ]),\n );\n } else if (t.isVariableDeclaration(node)) {\n if (node.kind === \"using\") {\n TOP_LEVEL_USING.set(stmt.node, USING_KIND.NORMAL);\n } else if (node.kind === \"await using\") {\n TOP_LEVEL_USING.set(stmt.node, USING_KIND.AWAIT);\n }\n node.kind = \"var\";\n innerBlockBody.push(node);\n } else {\n innerBlockBody.push(stmt.node);\n }\n\n if (shouldRemove) stmt.remove();\n }\n\n path.pushContainer(\"body\", t.blockStatement(innerBlockBody));\n },\n // We must transform `await using` in async functions before that\n // async-to-generator will transform `await` expressions into `yield`\n Function(path, state) {\n if (path.node.async) {\n path.traverse(transformUsingDeclarationsVisitorSkipFn, state);\n }\n },\n },\n ]),\n };\n});\n","import { declare } from \"@babel/helper-plugin-utils\";\n\nexport default declare(api => {\n api.assertVersion(REQUIRED_VERSION(7));\n\n return {\n name: \"syntax-import-defer\",\n\n manipulateOptions(_, parserOpts) {\n parserOpts.plugins.push(\"deferredImportEvaluation\");\n },\n };\n});\n","import { declare } from \"@babel/helper-plugin-utils\";\nimport type { types as t, Scope } from \"@babel/core\";\nimport { defineCommonJSHook } from \"@babel/plugin-transform-modules-commonjs\";\n\nimport syntaxImportDefer from \"@babel/plugin-syntax-import-defer\";\n\nexport default declare(api => {\n api.assertVersion(REQUIRED_VERSION(\"^7.23.0\"));\n // We need the explicit type annotation otherwise when using t.assert* ts\n // reports that 'Assertions require every name in the call target to be\n // declared with an explicit type annotation'\n const t: typeof api.types = api.types;\n const { template } = api;\n\n function allReferencesAreProps(scope: Scope, node: t.ImportDeclaration) {\n const specifier = node.specifiers[0];\n t.assertImportNamespaceSpecifier(specifier);\n\n const binding = scope.getOwnBinding(specifier.local.name);\n return !!binding?.referencePaths.every(path =>\n path.parentPath.isMemberExpression({ object: path.node }),\n );\n }\n\n return {\n name: \"proposal-import-defer\",\n\n inherits: syntaxImportDefer,\n\n pre() {\n const { file } = this;\n\n defineCommonJSHook(file, {\n name: PACKAGE_JSON.name,\n version: PACKAGE_JSON.version,\n getWrapperPayload(source, metadata, importNodes) {\n let needsProxy = false;\n for (const node of importNodes) {\n if (!t.isImportDeclaration(node)) return null;\n if (node.phase !== \"defer\") return null;\n if (!allReferencesAreProps(file.scope, node)) needsProxy = true;\n }\n return needsProxy ? \"defer/proxy\" : \"defer/function\";\n },\n buildRequireWrapper(name, init, payload, referenced) {\n if (payload === \"defer/proxy\") {\n if (!referenced) return false;\n return template.statement.ast`\n var ${name} = ${file.addHelper(\"importDeferProxy\")}(\n () => ${init}\n )\n `;\n }\n if (payload === \"defer/function\") {\n if (!referenced) return false;\n return template.statement.ast`\n function ${name}(data) {\n ${name} = () => data;\n return data = ${init};\n }\n `;\n }\n },\n wrapReference(ref, payload) {\n if (payload === \"defer/function\") return t.callExpression(ref, []);\n },\n });\n },\n\n visitor: {\n Program(path) {\n if (this.file.get(\"@babel/plugin-transform-modules-*\") !== \"commonjs\") {\n throw new Error(\n `@babel/plugin-proposal-import-defer can only be used when` +\n ` transpiling modules to CommonJS.`,\n );\n }\n\n // Move all deferred imports to the end, so that in case of\n // import defer * as a from \"a\"\n // import \"b\"\n // import \"a\"\n // we have the correct evaluation order\n\n const eagerImports = new Set();\n\n for (const child of path.get(\"body\")) {\n if (\n (child.isImportDeclaration() && child.node.phase == null) ||\n (child.isExportNamedDeclaration() && child.node.source !== null) ||\n child.isExportAllDeclaration()\n ) {\n const specifier = child.node.source.value;\n if (!eagerImports.has(specifier)) {\n eagerImports.add(specifier);\n }\n }\n }\n\n const importsToPush = [];\n for (const child of path.get(\"body\")) {\n if (child.isImportDeclaration({ phase: \"defer\" })) {\n const specifier = child.node.source.value;\n if (!eagerImports.has(specifier)) continue;\n\n child.node.phase = null;\n importsToPush.push(child.node);\n child.remove();\n }\n }\n if (importsToPush.length) {\n path.pushContainer(\"body\", importsToPush);\n // Re-collect references to moved imports\n path.scope.crawl();\n }\n },\n },\n };\n});\n","import { isRequired, type Targets } from \"@babel/helper-compilation-targets\";\n\nfunction isEmpty(obj: object) {\n return Object.keys(obj).length === 0;\n}\n\nconst isRequiredOptions = {\n compatData: {\n // `import.meta.resolve` compat data.\n // Source: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/import.meta/resolve#browser_compatibility\n // Once Node.js implements `fetch` of local files, we can re-use the web implementation for it\n // similarly to how we do for Deno.\n webIMR: {\n chrome: \"105.0.0\",\n edge: \"105.0.0\",\n firefox: \"106.0.0\",\n opera: \"91.0.0\",\n safari: \"16.4.0\",\n opera_mobile: \"72.0.0\",\n ios: \"16.4.0\",\n samsung: \"20.0\",\n deno: \"1.24.0\",\n },\n nodeIMR: {\n node: \"20.6.0\",\n },\n // Node.js require(\"fs\").promises compat data.\n nodeFSP: {\n node: \"10.0.0\",\n },\n },\n};\n\ninterface Support {\n needsNodeSupport: boolean;\n needsWebSupport: boolean;\n nodeSupportsIMR: boolean;\n webSupportsIMR: boolean;\n nodeSupportsFsPromises: boolean;\n}\n\nconst SUPPORT_CACHE = new WeakMap();\nexport default function getSupport(targets: Targets): Support {\n if (SUPPORT_CACHE.has(targets)) return SUPPORT_CACHE.get(targets);\n\n const { node: nodeTarget, ...webTargets } = targets;\n const emptyNodeTarget = nodeTarget == null;\n const emptyWebTargets = isEmpty(webTargets);\n const needsNodeSupport = !emptyNodeTarget || emptyWebTargets;\n const needsWebSupport = !emptyWebTargets || emptyNodeTarget;\n\n const webSupportsIMR =\n !emptyWebTargets && !isRequired(\"webIMR\", webTargets, isRequiredOptions);\n const nodeSupportsIMR =\n !emptyNodeTarget &&\n !isRequired(\"nodeIMR\", { node: nodeTarget }, isRequiredOptions);\n const nodeSupportsFsPromises =\n !emptyNodeTarget &&\n !isRequired(\"nodeFSP\", { node: nodeTarget }, isRequiredOptions);\n\n const result = {\n needsNodeSupport,\n needsWebSupport,\n nodeSupportsIMR,\n webSupportsIMR,\n nodeSupportsFsPromises,\n };\n SUPPORT_CACHE.set(targets, result);\n return result;\n}\n","import { types as t, template, type NodePath } from \"@babel/core\";\nimport type { Targets } from \"@babel/helper-compilation-targets\";\nimport { addNamed } from \"@babel/helper-module-imports\";\n\nimport getSupport from \"./platforms-support.ts\";\n\nfunction imp(path: NodePath, name: string, module: string) {\n return addNamed(path, name, module, { importedType: \"es6\" });\n}\n\nexport interface Pieces {\n commonJS?: (require: t.Expression, specifier: t.Expression) => t.Expression;\n webFetch: (fetch: t.Expression) => t.Expression;\n nodeFsSync: (read: t.Expression) => t.Expression;\n nodeFsAsync: () => t.Expression;\n}\n\nexport interface Builders {\n buildFetch: (specifier: t.Expression, path: NodePath) => t.Expression;\n buildFetchAsync: (specifier: t.Expression, path: NodePath) => t.Expression;\n needsAwait: boolean;\n}\n\nconst imr = (s: t.Expression) => template.expression.ast`\n import.meta.resolve(${s})\n`;\nconst imrWithFallback = (s: t.Expression) => template.expression.ast`\n import.meta.resolve?.(${s}) ?? new URL(${t.cloneNode(s)}, import.meta.url)\n`;\n\nexport function importToPlatformApi(\n targets: Targets,\n transformers: Pieces,\n toCommonJS: boolean,\n) {\n const {\n needsNodeSupport,\n needsWebSupport,\n nodeSupportsIMR,\n webSupportsIMR,\n nodeSupportsFsPromises,\n } = getSupport(targets);\n const supportIsomorphicCJS = transformers.commonJS != null;\n\n let buildFetchAsync: (\n specifier: t.Expression,\n path: NodePath,\n ) => t.Expression;\n let buildFetchSync: typeof buildFetchAsync;\n\n // \"p\" stands for pattern matching :)\n const p = ({\n web: w = needsWebSupport,\n node: n = needsNodeSupport,\n nodeFSP: nF = nodeSupportsFsPromises,\n webIMR: wI = webSupportsIMR,\n nodeIMR: nI = nodeSupportsIMR,\n toCJS: c = toCommonJS,\n supportIsomorphicCJS: iC = supportIsomorphicCJS,\n }: {\n web?: boolean;\n node?: boolean;\n nodeFSP?: boolean;\n webIMR?: boolean;\n nodeIMR?: boolean;\n toCJS?: boolean;\n supportIsomorphicCJS?: boolean;\n }) =>\n +w +\n (+n << 1) +\n (+wI << 2) +\n (+nI << 3) +\n (+c << 4) +\n (+nF << 5) +\n (+iC << 6);\n\n const readFileP = (fs: t.Expression, arg: t.Expression) => {\n if (nodeSupportsFsPromises) {\n return template.expression.ast`${fs}.promises.readFile(${arg})`;\n }\n return template.expression.ast`\n new Promise(\n (a =>\n (r, j) => ${fs}.readFile(a, (e, d) => e ? j(e) : r(d))\n )(${arg})\n )`;\n };\n\n switch (\n p({\n web: needsWebSupport,\n node: needsNodeSupport,\n webIMR: webSupportsIMR,\n nodeIMR: nodeSupportsIMR,\n toCJS: toCommonJS,\n })\n ) {\n case p({ toCJS: true, supportIsomorphicCJS: true }):\n buildFetchSync = specifier =>\n transformers.commonJS(t.identifier(\"require\"), specifier);\n break;\n case p({ web: true, node: true }):\n buildFetchAsync = specifier => {\n const web = transformers.webFetch(\n t.callExpression(t.identifier(\"fetch\"), [\n (webSupportsIMR ? imr : imrWithFallback)(t.cloneNode(specifier)),\n ]),\n );\n const node = supportIsomorphicCJS\n ? template.expression.ast`\n import(\"module\").then(module => ${transformers.commonJS(\n template.expression.ast`module.createRequire(import.meta.url)`,\n specifier,\n )})\n `\n : nodeSupportsIMR\n ? template.expression.ast`\n import(\"fs\").then(\n fs => ${readFileP(\n t.identifier(\"fs\"),\n template.expression.ast`new URL(${imr(specifier)})`,\n )}\n ).then(${transformers.nodeFsAsync()})\n `\n : template.expression.ast`\n Promise.all([import(\"fs\"), import(\"module\")])\n .then(([fs, module]) =>\n ${readFileP(\n t.identifier(\"fs\"),\n template.expression.ast`\n module.createRequire(import.meta.url).resolve(${specifier})\n `,\n )}\n )\n .then(${transformers.nodeFsAsync()})\n `;\n\n return template.expression.ast`\n typeof process === \"object\" && process.versions?.node\n ? ${node}\n : ${web}\n `;\n };\n break;\n case p({ web: true, node: false, webIMR: true }):\n buildFetchAsync = specifier =>\n transformers.webFetch(\n t.callExpression(t.identifier(\"fetch\"), [imr(specifier)]),\n );\n break;\n case p({ web: true, node: false, webIMR: false }):\n buildFetchAsync = specifier =>\n transformers.webFetch(\n t.callExpression(t.identifier(\"fetch\"), [imrWithFallback(specifier)]),\n );\n break;\n case p({ web: false, node: true, toCJS: true }):\n buildFetchSync = specifier =>\n transformers.nodeFsSync(template.expression.ast`\n require(\"fs\").readFileSync(require.resolve(${specifier}))\n `);\n buildFetchAsync = specifier => template.expression.ast`\n require(\"fs\").promises.readFile(require.resolve(${specifier}))\n .then(${transformers.nodeFsAsync()})\n `;\n break;\n case p({\n web: false,\n node: true,\n toCJS: false,\n supportIsomorphicCJS: true,\n }):\n buildFetchSync = (specifier, path) =>\n transformers.commonJS(\n template.expression.ast`\n ${imp(path, \"createRequire\", \"module\")}(import.meta.url)\n `,\n specifier,\n );\n break;\n case p({ web: false, node: true, toCJS: false, nodeIMR: true }):\n buildFetchSync = (specifier, path) =>\n transformers.nodeFsSync(template.expression.ast`\n ${imp(path, \"readFileSync\", \"fs\")}(\n new URL(${imr(specifier)})\n )\n `);\n buildFetchAsync = (specifier, path) =>\n template.expression.ast`\n ${imp(path, \"promises\", \"fs\")}\n .readFile(new URL(${imr(specifier)}))\n .then(${transformers.nodeFsAsync()})\n `;\n break;\n case p({ web: false, node: true, toCJS: false, nodeIMR: false }):\n buildFetchSync = (specifier, path) =>\n transformers.nodeFsSync(template.expression.ast`\n ${imp(path, \"readFileSync\", \"fs\")}(\n ${imp(path, \"createRequire\", \"module\")}(import.meta.url)\n .resolve(${specifier})\n )\n `);\n buildFetchAsync = (specifier, path) =>\n transformers.webFetch(template.expression.ast`\n ${imp(path, \"promises\", \"fs\")}\n .readFile(\n ${imp(path, \"createRequire\", \"module\")}(import.meta.url)\n .resolve(${specifier})\n )\n `);\n break;\n default:\n throw new Error(\"Internal Babel error: unreachable code.\");\n }\n\n buildFetchAsync ??= buildFetchSync;\n const buildFetchAsyncWrapped: typeof buildFetchAsync = (expression, path) => {\n if (t.isStringLiteral(expression)) {\n return template.expression.ast`\n Promise.resolve().then(() => ${buildFetchAsync(expression, path)})\n `;\n } else {\n return template.expression.ast`\n Promise.resolve(\\`\\${${expression}}\\`).then((s) => ${buildFetchAsync(\n t.identifier(\"s\"),\n path,\n )})\n `;\n }\n };\n\n let buildFetch = buildFetchSync;\n if (!buildFetchSync) {\n if (toCommonJS) {\n buildFetch = (specifier, path) => {\n throw path.buildCodeFrameError(\n \"Cannot compile to CommonJS, since it would require top-level await.\",\n );\n };\n } else {\n buildFetch = buildFetchAsync;\n }\n }\n\n return {\n buildFetch,\n buildFetchAsync: buildFetchAsyncWrapped,\n needsAwait: !buildFetchSync,\n };\n}\n\nexport function buildParallelStaticImports(\n data: Array<{ id: t.Identifier; fetch: t.Expression }>,\n needsAwait: boolean,\n): t.VariableDeclaration | null {\n if (data.length === 0) return null;\n\n const declarators: t.VariableDeclarator[] = [];\n\n if (data.length === 1) {\n let rhs = data[0].fetch;\n if (needsAwait) rhs = t.awaitExpression(rhs);\n declarators.push(t.variableDeclarator(data[0].id, rhs));\n } else if (needsAwait) {\n const ids = data.map(({ id }) => id);\n const fetches = data.map(({ fetch }) => fetch);\n declarators.push(\n t.variableDeclarator(\n t.arrayPattern(ids),\n t.awaitExpression(\n template.expression.ast`\n Promise.all(${t.arrayExpression(fetches)})\n `,\n ),\n ),\n );\n } else {\n for (const { id, fetch } of data) {\n declarators.push(t.variableDeclarator(id, fetch));\n }\n }\n\n return t.variableDeclaration(\"const\", declarators);\n}\n","import { declare } from \"@babel/helper-plugin-utils\";\nimport type { types as t, File } from \"@babel/core\";\nimport syntaxImportAttributes from \"@babel/plugin-syntax-import-attributes\";\nimport {\n importToPlatformApi,\n buildParallelStaticImports,\n type Pieces,\n type Builders,\n} from \"@babel/helper-import-to-platform-api\";\n\nexport interface Options {\n uncheckedRequire: boolean;\n}\n\nexport default declare((api, options: Options) => {\n const { types: t, template } = api;\n api.assertVersion(REQUIRED_VERSION(\"^7.22.0\"));\n\n const targets = api.targets();\n\n let helperESM: Builders;\n let helperCJS: Builders;\n\n const transformers: Pieces = {\n commonJS: options.uncheckedRequire\n ? (require: t.Expression, specifier: t.Expression) =>\n t.callExpression(require, [specifier])\n : null,\n webFetch: (fetch: t.Expression) =>\n template.expression.ast`${fetch}.then(r => r.json())`,\n nodeFsSync: (read: t.Expression) =>\n template.expression.ast`JSON.parse(${read})`,\n nodeFsAsync: () => template.expression.ast`JSON.parse`,\n };\n\n const getHelper = (file: File) => {\n const modules = file.get(\"@babel/plugin-transform-modules-*\");\n if (modules === \"commonjs\") {\n return (helperCJS ??= importToPlatformApi(targets, transformers, true));\n }\n if (modules == null) {\n return (helperESM ??= importToPlatformApi(targets, transformers, false));\n }\n throw new Error(\n `@babel/plugin-proposal-json-modules can only be used when not ` +\n `compiling modules, or when compiling them to CommonJS.`,\n );\n };\n\n function getAttributeKey({ key }: t.ImportAttribute): string {\n return t.isIdentifier(key) ? key.name : key.value;\n }\n\n function hasTypeJson(attributes: t.ImportAttribute[]) {\n return !!attributes?.some(\n attr => getAttributeKey(attr) === \"type\" && attr.value.value === \"json\",\n );\n }\n\n return {\n name: \"proposal-json-modules\",\n\n inherits: syntaxImportAttributes,\n\n visitor: {\n Program(path) {\n if (path.node.sourceType !== \"module\") return;\n\n const helper = getHelper(this.file);\n\n const data = [];\n for (const decl of path.get(\"body\")) {\n if (!decl.isImportDeclaration()) continue;\n const attributes = decl.node.attributes || decl.node.assertions;\n if (!hasTypeJson(attributes)) continue;\n\n if (decl.node.phase != null) {\n throw decl.buildCodeFrameError(\n \"JSON modules do not support phase modifiers.\",\n );\n }\n if (attributes.length > 1) {\n const paths = decl.node.attributes\n ? decl.get(\"attributes\")\n : decl.get(\"assertions\");\n const index = getAttributeKey(attributes[0]) === \"type\" ? 1 : 0;\n throw paths[index].buildCodeFrameError(\n \"Unknown attribute for JSON modules.\",\n );\n }\n\n let id: t.Identifier;\n let needsNS = false;\n for (const specifier of decl.get(\"specifiers\")) {\n if (specifier.isImportSpecifier()) {\n throw specifier.buildCodeFrameError(\n \"JSON modules do not support named imports.\",\n );\n }\n\n id = specifier.node.local;\n needsNS = specifier.isImportNamespaceSpecifier();\n }\n id ??= path.scope.generateUidIdentifier(\"_\");\n\n let fetch = helper.buildFetch(decl.node.source, path);\n\n if (needsNS) {\n if (helper.needsAwait) {\n fetch = template.expression.ast`\n ${fetch}.then(j => ({ default: j }))\n `;\n } else {\n fetch = template.expression.ast`{ default: ${fetch} }`;\n }\n }\n\n data.push({ id, fetch });\n decl.remove();\n }\n if (data.length === 0) return;\n\n const decl = buildParallelStaticImports(data, helper.needsAwait);\n if (decl) path.unshiftContainer(\"body\", decl);\n },\n },\n };\n});\n","/*\n * This file is auto-generated! Do not modify it directly.\n * To re-generate run 'yarn gulp generate-standalone'\n */\nimport makeNoopPlugin from \"../make-noop-plugin.ts\";\nimport externalHelpers from \"@babel/plugin-external-helpers\";\nimport syntaxDecimal from \"@babel/plugin-syntax-decimal\";\nimport syntaxDecorators from \"@babel/plugin-syntax-decorators\";\nimport syntaxDestructuringPrivate from \"@babel/plugin-syntax-destructuring-private\";\nimport syntaxDoExpressions from \"@babel/plugin-syntax-do-expressions\";\nimport syntaxExplicitResourceManagement from \"@babel/plugin-syntax-explicit-resource-management\";\nimport syntaxExportDefaultFrom from \"@babel/plugin-syntax-export-default-from\";\nimport syntaxFlow from \"@babel/plugin-syntax-flow\";\nimport syntaxFunctionBind from \"@babel/plugin-syntax-function-bind\";\nimport syntaxFunctionSent from \"@babel/plugin-syntax-function-sent\";\nimport syntaxImportAssertions from \"@babel/plugin-syntax-import-assertions\";\nimport syntaxImportAttributes from \"@babel/plugin-syntax-import-attributes\";\nimport syntaxImportReflection from \"@babel/plugin-syntax-import-reflection\";\nimport syntaxJsx from \"@babel/plugin-syntax-jsx\";\nimport syntaxModuleBlocks from \"@babel/plugin-syntax-module-blocks\";\nimport syntaxOptionalChainingAssign from \"@babel/plugin-syntax-optional-chaining-assign\";\nimport syntaxPipelineOperator from \"@babel/plugin-syntax-pipeline-operator\";\nimport syntaxRecordAndTuple from \"@babel/plugin-syntax-record-and-tuple\";\nimport syntaxTypescript from \"@babel/plugin-syntax-typescript\";\nimport transformAsyncGeneratorFunctions from \"@babel/plugin-transform-async-generator-functions\";\nimport transformClassProperties from \"@babel/plugin-transform-class-properties\";\nimport transformClassStaticBlock from \"@babel/plugin-transform-class-static-block\";\nimport proposalDecorators from \"@babel/plugin-proposal-decorators\";\nimport proposalDestructuringPrivate from \"@babel/plugin-proposal-destructuring-private\";\nimport proposalDoExpressions from \"@babel/plugin-proposal-do-expressions\";\nimport transformDuplicateNamedCapturingGroupsRegex from \"@babel/plugin-transform-duplicate-named-capturing-groups-regex\";\nimport transformDynamicImport from \"@babel/plugin-transform-dynamic-import\";\nimport proposalExportDefaultFrom from \"@babel/plugin-proposal-export-default-from\";\nimport transformExportNamespaceFrom from \"@babel/plugin-transform-export-namespace-from\";\nimport proposalFunctionBind from \"@babel/plugin-proposal-function-bind\";\nimport proposalFunctionSent from \"@babel/plugin-proposal-function-sent\";\nimport transformJsonStrings from \"@babel/plugin-transform-json-strings\";\nimport transformLogicalAssignmentOperators from \"@babel/plugin-transform-logical-assignment-operators\";\nimport transformNullishCoalescingOperator from \"@babel/plugin-transform-nullish-coalescing-operator\";\nimport transformNumericSeparator from \"@babel/plugin-transform-numeric-separator\";\nimport transformObjectRestSpread from \"@babel/plugin-transform-object-rest-spread\";\nimport transformOptionalCatchBinding from \"@babel/plugin-transform-optional-catch-binding\";\nimport transformOptionalChaining from \"@babel/plugin-transform-optional-chaining\";\nimport proposalOptionalChainingAssign from \"@babel/plugin-proposal-optional-chaining-assign\";\nimport proposalPipelineOperator from \"@babel/plugin-proposal-pipeline-operator\";\nimport transformPrivateMethods from \"@babel/plugin-transform-private-methods\";\nimport transformPrivatePropertyInObject from \"@babel/plugin-transform-private-property-in-object\";\nimport proposalRecordAndTuple from \"@babel/plugin-proposal-record-and-tuple\";\nimport proposalRegexpModifiers from \"@babel/plugin-proposal-regexp-modifiers\";\nimport proposalThrowExpressions from \"@babel/plugin-proposal-throw-expressions\";\nimport transformUnicodePropertyRegex from \"@babel/plugin-transform-unicode-property-regex\";\nimport transformUnicodeSetsRegex from \"@babel/plugin-transform-unicode-sets-regex\";\nimport transformAsyncToGenerator from \"@babel/plugin-transform-async-to-generator\";\nimport transformArrowFunctions from \"@babel/plugin-transform-arrow-functions\";\nimport transformBlockScopedFunctions from \"@babel/plugin-transform-block-scoped-functions\";\nimport transformBlockScoping from \"@babel/plugin-transform-block-scoping\";\nimport transformClasses from \"@babel/plugin-transform-classes\";\nimport transformComputedProperties from \"@babel/plugin-transform-computed-properties\";\nimport transformDestructuring from \"@babel/plugin-transform-destructuring\";\nimport transformDotallRegex from \"@babel/plugin-transform-dotall-regex\";\nimport transformDuplicateKeys from \"@babel/plugin-transform-duplicate-keys\";\nimport transformExponentiationOperator from \"@babel/plugin-transform-exponentiation-operator\";\nimport transformFlowComments from \"@babel/plugin-transform-flow-comments\";\nimport transformFlowStripTypes from \"@babel/plugin-transform-flow-strip-types\";\nimport transformForOf from \"@babel/plugin-transform-for-of\";\nimport transformFunctionName from \"@babel/plugin-transform-function-name\";\nimport transformInstanceof from \"@babel/plugin-transform-instanceof\";\nimport transformJscript from \"@babel/plugin-transform-jscript\";\nimport transformLiterals from \"@babel/plugin-transform-literals\";\nimport transformMemberExpressionLiterals from \"@babel/plugin-transform-member-expression-literals\";\nimport transformModulesAmd from \"@babel/plugin-transform-modules-amd\";\nimport transformModulesCommonjs from \"@babel/plugin-transform-modules-commonjs\";\nimport transformModulesSystemjs from \"@babel/plugin-transform-modules-systemjs\";\nimport transformModulesUmd from \"@babel/plugin-transform-modules-umd\";\nimport transformNamedCapturingGroupsRegex from \"@babel/plugin-transform-named-capturing-groups-regex\";\nimport transformNewTarget from \"@babel/plugin-transform-new-target\";\nimport transformObjectAssign from \"@babel/plugin-transform-object-assign\";\nimport transformObjectSuper from \"@babel/plugin-transform-object-super\";\nimport transformObjectSetPrototypeOfToAssign from \"@babel/plugin-transform-object-set-prototype-of-to-assign\";\nimport transformParameters from \"@babel/plugin-transform-parameters\";\nimport transformPropertyLiterals from \"@babel/plugin-transform-property-literals\";\nimport transformPropertyMutators from \"@babel/plugin-transform-property-mutators\";\nimport transformProtoToAssign from \"@babel/plugin-transform-proto-to-assign\";\nimport transformReactConstantElements from \"@babel/plugin-transform-react-constant-elements\";\nimport transformReactDisplayName from \"@babel/plugin-transform-react-display-name\";\nimport transformReactInlineElements from \"@babel/plugin-transform-react-inline-elements\";\nimport transformReactJsx from \"@babel/plugin-transform-react-jsx\";\nimport transformReactJsxCompat from \"@babel/plugin-transform-react-jsx-compat\";\nimport transformReactJsxDevelopment from \"@babel/plugin-transform-react-jsx-development\";\nimport transformReactJsxSelf from \"@babel/plugin-transform-react-jsx-self\";\nimport transformReactJsxSource from \"@babel/plugin-transform-react-jsx-source\";\nimport transformRegenerator from \"@babel/plugin-transform-regenerator\";\nimport transformReservedWords from \"@babel/plugin-transform-reserved-words\";\nimport transformRuntime from \"@babel/plugin-transform-runtime\";\nimport transformShorthandProperties from \"@babel/plugin-transform-shorthand-properties\";\nimport transformSpread from \"@babel/plugin-transform-spread\";\nimport transformStickyRegex from \"@babel/plugin-transform-sticky-regex\";\nimport transformStrictMode from \"@babel/plugin-transform-strict-mode\";\nimport transformTemplateLiterals from \"@babel/plugin-transform-template-literals\";\nimport transformTypeofSymbol from \"@babel/plugin-transform-typeof-symbol\";\nimport transformTypescript from \"@babel/plugin-transform-typescript\";\nimport transformUnicodeEscapes from \"@babel/plugin-transform-unicode-escapes\";\nimport transformUnicodeRegex from \"@babel/plugin-transform-unicode-regex\";\nimport proposalExplicitResourceManagement from \"@babel/plugin-proposal-explicit-resource-management\";\nimport proposalImportDefer from \"@babel/plugin-proposal-import-defer\";\nimport proposalJsonModules from \"@babel/plugin-proposal-json-modules\";\nexport const syntaxAsyncGenerators = makeNoopPlugin(),\n syntaxClassProperties = makeNoopPlugin(),\n syntaxClassStaticBlock = makeNoopPlugin(),\n syntaxImportMeta = makeNoopPlugin(),\n syntaxObjectRestSpread = makeNoopPlugin(),\n syntaxOptionalCatchBinding = makeNoopPlugin(),\n syntaxTopLevelAwait = makeNoopPlugin();\nexport {\n externalHelpers,\n syntaxDecimal,\n syntaxDecorators,\n syntaxDestructuringPrivate,\n syntaxDoExpressions,\n syntaxExplicitResourceManagement,\n syntaxExportDefaultFrom,\n syntaxFlow,\n syntaxFunctionBind,\n syntaxFunctionSent,\n syntaxImportAssertions,\n syntaxImportAttributes,\n syntaxImportReflection,\n syntaxJsx,\n syntaxModuleBlocks,\n syntaxOptionalChainingAssign,\n syntaxPipelineOperator,\n syntaxRecordAndTuple,\n syntaxTypescript,\n transformAsyncGeneratorFunctions,\n transformClassProperties,\n transformClassStaticBlock,\n proposalDecorators,\n proposalDestructuringPrivate,\n proposalDoExpressions,\n transformDuplicateNamedCapturingGroupsRegex,\n transformDynamicImport,\n proposalExportDefaultFrom,\n transformExportNamespaceFrom,\n proposalFunctionBind,\n proposalFunctionSent,\n transformJsonStrings,\n transformLogicalAssignmentOperators,\n transformNullishCoalescingOperator,\n transformNumericSeparator,\n transformObjectRestSpread,\n transformOptionalCatchBinding,\n transformOptionalChaining,\n proposalOptionalChainingAssign,\n proposalPipelineOperator,\n transformPrivateMethods,\n transformPrivatePropertyInObject,\n proposalRecordAndTuple,\n proposalRegexpModifiers,\n proposalThrowExpressions,\n transformUnicodePropertyRegex,\n transformUnicodeSetsRegex,\n transformAsyncToGenerator,\n transformArrowFunctions,\n transformBlockScopedFunctions,\n transformBlockScoping,\n transformClasses,\n transformComputedProperties,\n transformDestructuring,\n transformDotallRegex,\n transformDuplicateKeys,\n transformExponentiationOperator,\n transformFlowComments,\n transformFlowStripTypes,\n transformForOf,\n transformFunctionName,\n transformInstanceof,\n transformJscript,\n transformLiterals,\n transformMemberExpressionLiterals,\n transformModulesAmd,\n transformModulesCommonjs,\n transformModulesSystemjs,\n transformModulesUmd,\n transformNamedCapturingGroupsRegex,\n transformNewTarget,\n transformObjectAssign,\n transformObjectSuper,\n transformObjectSetPrototypeOfToAssign,\n transformParameters,\n transformPropertyLiterals,\n transformPropertyMutators,\n transformProtoToAssign,\n transformReactConstantElements,\n transformReactDisplayName,\n transformReactInlineElements,\n transformReactJsx,\n transformReactJsxCompat,\n transformReactJsxDevelopment,\n transformReactJsxSelf,\n transformReactJsxSource,\n transformRegenerator,\n transformReservedWords,\n transformRuntime,\n transformShorthandProperties,\n transformSpread,\n transformStickyRegex,\n transformStrictMode,\n transformTemplateLiterals,\n transformTypeofSymbol,\n transformTypescript,\n transformUnicodeEscapes,\n transformUnicodeRegex,\n proposalExplicitResourceManagement,\n proposalImportDefer,\n proposalJsonModules,\n};\nexport const all: { [k: string]: any } = {\n \"syntax-async-generators\": syntaxAsyncGenerators,\n \"syntax-class-properties\": syntaxClassProperties,\n \"syntax-class-static-block\": syntaxClassStaticBlock,\n \"syntax-import-meta\": syntaxImportMeta,\n \"syntax-object-rest-spread\": syntaxObjectRestSpread,\n \"syntax-optional-catch-binding\": syntaxOptionalCatchBinding,\n \"syntax-top-level-await\": syntaxTopLevelAwait,\n \"external-helpers\": externalHelpers,\n \"syntax-decimal\": syntaxDecimal,\n \"syntax-decorators\": syntaxDecorators,\n \"syntax-destructuring-private\": syntaxDestructuringPrivate,\n \"syntax-do-expressions\": syntaxDoExpressions,\n \"syntax-explicit-resource-management\": syntaxExplicitResourceManagement,\n \"syntax-export-default-from\": syntaxExportDefaultFrom,\n \"syntax-flow\": syntaxFlow,\n \"syntax-function-bind\": syntaxFunctionBind,\n \"syntax-function-sent\": syntaxFunctionSent,\n \"syntax-import-assertions\": syntaxImportAssertions,\n \"syntax-import-attributes\": syntaxImportAttributes,\n \"syntax-import-reflection\": syntaxImportReflection,\n \"syntax-jsx\": syntaxJsx,\n \"syntax-module-blocks\": syntaxModuleBlocks,\n \"syntax-optional-chaining-assign\": syntaxOptionalChainingAssign,\n \"syntax-pipeline-operator\": syntaxPipelineOperator,\n \"syntax-record-and-tuple\": syntaxRecordAndTuple,\n \"syntax-typescript\": syntaxTypescript,\n \"transform-async-generator-functions\": transformAsyncGeneratorFunctions,\n \"transform-class-properties\": transformClassProperties,\n \"transform-class-static-block\": transformClassStaticBlock,\n \"proposal-decorators\": proposalDecorators,\n \"proposal-destructuring-private\": proposalDestructuringPrivate,\n \"proposal-do-expressions\": proposalDoExpressions,\n \"transform-duplicate-named-capturing-groups-regex\":\n transformDuplicateNamedCapturingGroupsRegex,\n \"transform-dynamic-import\": transformDynamicImport,\n \"proposal-export-default-from\": proposalExportDefaultFrom,\n \"transform-export-namespace-from\": transformExportNamespaceFrom,\n \"proposal-function-bind\": proposalFunctionBind,\n \"proposal-function-sent\": proposalFunctionSent,\n \"transform-json-strings\": transformJsonStrings,\n \"transform-logical-assignment-operators\": transformLogicalAssignmentOperators,\n \"transform-nullish-coalescing-operator\": transformNullishCoalescingOperator,\n \"transform-numeric-separator\": transformNumericSeparator,\n \"transform-object-rest-spread\": transformObjectRestSpread,\n \"transform-optional-catch-binding\": transformOptionalCatchBinding,\n \"transform-optional-chaining\": transformOptionalChaining,\n \"proposal-optional-chaining-assign\": proposalOptionalChainingAssign,\n \"proposal-pipeline-operator\": proposalPipelineOperator,\n \"transform-private-methods\": transformPrivateMethods,\n \"transform-private-property-in-object\": transformPrivatePropertyInObject,\n \"proposal-record-and-tuple\": proposalRecordAndTuple,\n \"proposal-regexp-modifiers\": proposalRegexpModifiers,\n \"proposal-throw-expressions\": proposalThrowExpressions,\n \"transform-unicode-property-regex\": transformUnicodePropertyRegex,\n \"transform-unicode-sets-regex\": transformUnicodeSetsRegex,\n \"transform-async-to-generator\": transformAsyncToGenerator,\n \"transform-arrow-functions\": transformArrowFunctions,\n \"transform-block-scoped-functions\": transformBlockScopedFunctions,\n \"transform-block-scoping\": transformBlockScoping,\n \"transform-classes\": transformClasses,\n \"transform-computed-properties\": transformComputedProperties,\n \"transform-destructuring\": transformDestructuring,\n \"transform-dotall-regex\": transformDotallRegex,\n \"transform-duplicate-keys\": transformDuplicateKeys,\n \"transform-exponentiation-operator\": transformExponentiationOperator,\n \"transform-flow-comments\": transformFlowComments,\n \"transform-flow-strip-types\": transformFlowStripTypes,\n \"transform-for-of\": transformForOf,\n \"transform-function-name\": transformFunctionName,\n \"transform-instanceof\": transformInstanceof,\n \"transform-jscript\": transformJscript,\n \"transform-literals\": transformLiterals,\n \"transform-member-expression-literals\": transformMemberExpressionLiterals,\n \"transform-modules-amd\": transformModulesAmd,\n \"transform-modules-commonjs\": transformModulesCommonjs,\n \"transform-modules-systemjs\": transformModulesSystemjs,\n \"transform-modules-umd\": transformModulesUmd,\n \"transform-named-capturing-groups-regex\": transformNamedCapturingGroupsRegex,\n \"transform-new-target\": transformNewTarget,\n \"transform-object-assign\": transformObjectAssign,\n \"transform-object-super\": transformObjectSuper,\n \"transform-object-set-prototype-of-to-assign\":\n transformObjectSetPrototypeOfToAssign,\n \"transform-parameters\": transformParameters,\n \"transform-property-literals\": transformPropertyLiterals,\n \"transform-property-mutators\": transformPropertyMutators,\n \"transform-proto-to-assign\": transformProtoToAssign,\n \"transform-react-constant-elements\": transformReactConstantElements,\n \"transform-react-display-name\": transformReactDisplayName,\n \"transform-react-inline-elements\": transformReactInlineElements,\n \"transform-react-jsx\": transformReactJsx,\n \"transform-react-jsx-compat\": transformReactJsxCompat,\n \"transform-react-jsx-development\": transformReactJsxDevelopment,\n \"transform-react-jsx-self\": transformReactJsxSelf,\n \"transform-react-jsx-source\": transformReactJsxSource,\n \"transform-regenerator\": transformRegenerator,\n \"transform-reserved-words\": transformReservedWords,\n \"transform-runtime\": transformRuntime,\n \"transform-shorthand-properties\": transformShorthandProperties,\n \"transform-spread\": transformSpread,\n \"transform-sticky-regex\": transformStickyRegex,\n \"transform-strict-mode\": transformStrictMode,\n \"transform-template-literals\": transformTemplateLiterals,\n \"transform-typeof-symbol\": transformTypeofSymbol,\n \"transform-typescript\": transformTypescript,\n \"transform-unicode-escapes\": transformUnicodeEscapes,\n \"transform-unicode-regex\": transformUnicodeRegex,\n \"proposal-explicit-resource-management\": proposalExplicitResourceManagement,\n \"proposal-import-defer\": proposalImportDefer,\n \"proposal-json-modules\": proposalJsonModules,\n};\n","import * as babelPlugins from \"./generated/plugins.ts\";\n\nexport default (_: any, opts: any): any => {\n let loose = false;\n let modules = \"commonjs\";\n let spec = false;\n\n if (opts !== undefined) {\n if (opts.loose !== undefined) loose = opts.loose;\n if (opts.modules !== undefined) modules = opts.modules;\n if (opts.spec !== undefined) spec = opts.spec;\n }\n\n // be DRY\n const optsLoose = { loose };\n\n return {\n plugins: [\n [babelPlugins.transformTemplateLiterals, { loose, spec }],\n babelPlugins.transformLiterals,\n babelPlugins.transformFunctionName,\n [babelPlugins.transformArrowFunctions, { spec }],\n babelPlugins.transformBlockScopedFunctions,\n [babelPlugins.transformClasses, optsLoose],\n babelPlugins.transformObjectSuper,\n babelPlugins.transformShorthandProperties,\n babelPlugins.transformDuplicateKeys,\n [babelPlugins.transformComputedProperties, optsLoose],\n [babelPlugins.transformForOf, optsLoose],\n babelPlugins.transformStickyRegex,\n babelPlugins.transformUnicodeEscapes,\n babelPlugins.transformUnicodeRegex,\n [babelPlugins.transformSpread, optsLoose],\n [babelPlugins.transformParameters, optsLoose],\n [babelPlugins.transformDestructuring, optsLoose],\n babelPlugins.transformBlockScoping,\n babelPlugins.transformTypeofSymbol,\n babelPlugins.transformInstanceof,\n (modules === \"commonjs\" || modules === \"cjs\") && [\n babelPlugins.transformModulesCommonjs,\n optsLoose,\n ],\n modules === \"systemjs\" && [\n babelPlugins.transformModulesSystemjs,\n optsLoose,\n ],\n modules === \"amd\" && [babelPlugins.transformModulesAmd, optsLoose],\n modules === \"umd\" && [babelPlugins.transformModulesUmd, optsLoose],\n [\n babelPlugins.transformRegenerator,\n { async: false, asyncGenerators: false },\n ],\n ].filter(Boolean), // filter out falsy values\n };\n};\n","import * as babelPlugins from \"./generated/plugins.ts\";\n\nexport default (_: any, opts: any = {}) => {\n const {\n loose = false,\n decoratorsLegacy = false,\n decoratorsVersion = \"2018-09\",\n decoratorsBeforeExport,\n } = opts;\n\n const plugins = [\n [babelPlugins.syntaxImportAttributes, { deprecatedAssertSyntax: true }],\n [\n babelPlugins.proposalDecorators,\n {\n version: decoratorsLegacy ? \"legacy\" : decoratorsVersion,\n decoratorsBeforeExport,\n },\n ],\n babelPlugins.proposalRegexpModifiers,\n babelPlugins.proposalExplicitResourceManagement,\n babelPlugins.proposalJsonModules,\n // These are Stage 4\n ...(process.env.BABEL_8_BREAKING\n ? []\n : [\n babelPlugins.transformExportNamespaceFrom,\n babelPlugins.transformLogicalAssignmentOperators,\n [babelPlugins.transformOptionalChaining, { loose }],\n [babelPlugins.transformNullishCoalescingOperator, { loose }],\n [babelPlugins.transformClassProperties, { loose }],\n babelPlugins.transformJsonStrings,\n babelPlugins.transformNumericSeparator,\n [babelPlugins.transformPrivateMethods, { loose }],\n babelPlugins.transformPrivatePropertyInObject,\n babelPlugins.transformClassStaticBlock,\n babelPlugins.transformUnicodeSetsRegex,\n babelPlugins.transformDuplicateNamedCapturingGroupsRegex,\n ]),\n ];\n\n return { plugins };\n};\n","import presetStage3 from \"./preset-stage-3.ts\";\nimport * as babelPlugins from \"./generated/plugins.ts\";\n\nexport default (_: any, opts: any = {}) => {\n const { pipelineProposal = \"minimal\", pipelineTopicToken = \"%\" } = opts;\n\n return {\n presets: [[presetStage3, opts]],\n plugins: [\n babelPlugins.proposalDestructuringPrivate,\n [\n babelPlugins.proposalPipelineOperator,\n { proposal: pipelineProposal, topicToken: pipelineTopicToken },\n ],\n babelPlugins.proposalFunctionSent,\n babelPlugins.proposalThrowExpressions,\n process.env.BABEL_8_BREAKING\n ? babelPlugins.proposalRecordAndTuple\n : [\n babelPlugins.proposalRecordAndTuple,\n { syntaxType: opts.recordAndTupleSyntax ?? \"hash\" },\n ],\n babelPlugins.syntaxModuleBlocks,\n babelPlugins.syntaxImportReflection,\n ],\n };\n};\n","import presetStage2 from \"./preset-stage-2.ts\";\nimport * as babelPlugins from \"./generated/plugins.ts\";\n\nexport default (_: any, opts: any = {}) => {\n const {\n loose = false,\n useBuiltIns = false,\n decoratorsLegacy,\n decoratorsVersion,\n decoratorsBeforeExport,\n pipelineProposal,\n pipelineTopicToken,\n optionalChainingAssignVersion = \"2023-07\",\n } = opts;\n\n return {\n presets: [\n [\n presetStage2,\n process.env.BABEL_8_BREAKING\n ? {\n loose,\n useBuiltIns,\n decoratorsLegacy,\n decoratorsVersion,\n decoratorsBeforeExport,\n pipelineProposal,\n pipelineTopicToken,\n }\n : {\n loose,\n useBuiltIns,\n decoratorsLegacy,\n decoratorsVersion,\n decoratorsBeforeExport,\n pipelineProposal,\n pipelineTopicToken,\n recordAndTupleSyntax: opts.recordAndTupleSyntax,\n },\n ],\n ],\n plugins: [\n babelPlugins.syntaxDecimal,\n babelPlugins.proposalExportDefaultFrom,\n babelPlugins.proposalDoExpressions,\n [\n babelPlugins.proposalOptionalChainingAssign,\n { version: optionalChainingAssignVersion },\n ],\n ],\n };\n};\n","import presetStage1 from \"./preset-stage-1.ts\";\nimport { proposalFunctionBind } from \"./generated/plugins.ts\";\n\nexport default (_: any, opts: any = {}) => {\n const {\n loose = false,\n useBuiltIns = false,\n decoratorsLegacy,\n decoratorsVersion,\n decoratorsBeforeExport,\n pipelineProposal,\n pipelineTopicToken,\n } = opts;\n\n return {\n presets: [\n [\n presetStage1,\n {\n loose,\n useBuiltIns,\n decoratorsLegacy,\n decoratorsVersion,\n decoratorsBeforeExport,\n pipelineProposal,\n pipelineTopicToken,\n },\n ],\n ],\n plugins: [proposalFunctionBind],\n };\n};\n","// env vars from the cli are always strings, so !!ENV_VAR returns true for \"false\"\nfunction bool(value) {\n if (value == null) return false;\n return value && value !== \"false\" && value !== \"0\";\n}\n\nmodule.exports = bool(process.env[\"BABEL_8_BREAKING\"])\n ? require(\"semver-BABEL_8_BREAKING-true\")\n : require(\"semver-BABEL_8_BREAKING-false\");\n","import {\n getInclusionReasons,\n type Targets,\n type Target,\n} from \"@babel/helper-compilation-targets\";\nimport compatData from \"@babel/compat-data/plugins\";\n\n// Outputs a message that shows which target(s) caused an item to be included:\n// transform-foo { \"edge\":\"13\", \"firefox\":\"49\", \"ie\":\"10\" }\nexport const logPlugin = (\n item: string,\n targetVersions: Targets,\n list: { [key: string]: Targets },\n) => {\n const filteredList = getInclusionReasons(item, targetVersions, list);\n\n const support = list[item];\n\n if (!process.env.BABEL_8_BREAKING) {\n // It's needed to keep outputting proposal- in the debug log.\n if (item.startsWith(\"transform-\")) {\n const proposalName = `proposal-${item.slice(10)}`;\n if (\n proposalName === \"proposal-dynamic-import\" ||\n Object.hasOwn(compatData, proposalName)\n ) {\n item = proposalName;\n }\n }\n }\n\n if (!support) {\n console.log(` ${item}`);\n return;\n }\n\n let formattedTargets = `{`;\n let first = true;\n for (const target of Object.keys(filteredList) as Target[]) {\n if (!first) formattedTargets += `,`;\n first = false;\n formattedTargets += ` ${target}`;\n if (support[target]) formattedTargets += ` < ${support[target]}`;\n }\n formattedTargets += ` }`;\n\n console.log(` ${item} ${formattedTargets}`);\n};\n","\"use strict\";\n\nexports.__esModule = true;\nexports.default = void 0;\n\n/**\n * Safari 10.3 had an issue where async arrow function expressions within any class method would throw.\n * After an initial fix, any references to the instance via `this` within those methods would also throw.\n * This is fixed by converting arrow functions in class methods into equivalent function expressions.\n * @see https://bugs.webkit.org/show_bug.cgi?id=166879\n *\n * @example\n * class X{ a(){ async () => {}; } } // throws\n * class X{ a(){ async function() {}; } } // works\n *\n * @example\n * class X{ a(){\n * async () => this.a; // throws\n * } }\n * class X{ a(){\n * var _this=this;\n * async function() { return _this.a }; // works\n * } }\n */\nconst OPTS = {\n allowInsertArrow: false,\n specCompliant: false\n};\n\nvar _default = ({\n types: t\n}) => ({\n name: \"transform-async-arrows-in-class\",\n visitor: {\n ArrowFunctionExpression(path) {\n if (path.node.async && path.findParent(t.isClassMethod)) {\n path.arrowFunctionToExpression(OPTS);\n }\n }\n\n }\n});\n\nexports.default = _default;\nmodule.exports = exports.default;","\"use strict\";\n\nexports.__esModule = true;\nexports.default = void 0;\n\n/**\n * Converts destructured parameters with default values to non-shorthand syntax.\n * This fixes the only arguments-related bug in ES Modules-supporting browsers (Edge 16 & 17).\n * Use this plugin instead of @babel/plugin-transform-parameters when targeting ES Modules.\n */\nvar _default = ({\n types: t\n}) => {\n const isArrowParent = p => p.parentKey === \"params\" && p.parentPath && t.isArrowFunctionExpression(p.parentPath);\n\n return {\n name: \"transform-edge-default-parameters\",\n visitor: {\n AssignmentPattern(path) {\n const arrowArgParent = path.find(isArrowParent);\n\n if (arrowArgParent && path.parent.shorthand) {\n // In Babel 7+, there is no way to force non-shorthand properties.\n path.parent.shorthand = false;\n (path.parent.extra || {}).shorthand = false; // So, to ensure non-shorthand, rename the local identifier so it no longer matches:\n\n path.scope.rename(path.parent.key.name);\n }\n }\n\n }\n };\n};\n\nexports.default = _default;\nmodule.exports = exports.default;","\"use strict\";\n\nexports.__esModule = true;\nexports.default = void 0;\n\n/**\n * Edge 16 & 17 do not infer function.name from variable assignment.\n * All other `function.name` behavior works fine, so we can skip most of @babel/transform-function-name.\n * @see https://kangax.github.io/compat-table/es6/#test-function_name_property_variables_(function)\n *\n * Note: contrary to various Github issues, Edge 16+ *does* correctly infer the name of Arrow Functions.\n * The variable declarator name inference issue only affects function expressions, so that's all we fix here.\n *\n * A Note on Minification: Terser undoes this transform *by default* unless `keep_fnames` is set to true.\n * There is by design - if Function.name is critical to your application, you must configure\n * your minifier to preserve function names.\n */\nvar _default = ({\n types: t\n}) => ({\n name: \"transform-edge-function-name\",\n visitor: {\n FunctionExpression: {\n exit(path) {\n if (!path.node.id && t.isIdentifier(path.parent.id)) {\n const id = t.cloneNode(path.parent.id);\n const binding = path.scope.getBinding(id.name); // if the binding gets reassigned anywhere, rename it\n\n if (binding == null ? void 0 : binding.constantViolations.length) {\n path.scope.rename(id.name);\n }\n\n path.node.id = id;\n }\n }\n\n }\n }\n});\n\nexports.default = _default;\nmodule.exports = exports.default;","import type { types as t, NodePath, Visitor } from \"@babel/core\";\nimport { visitors } from \"@babel/traverse\";\nimport { declare } from \"@babel/helper-plugin-utils\";\n\nexport default declare(({ types: t, assertVersion }) => {\n assertVersion(REQUIRED_VERSION(7));\n\n const containsClassExpressionVisitor: Visitor<{ found: boolean }> = {\n ClassExpression(path, state) {\n state.found = true;\n path.stop();\n },\n Function(path) {\n path.skip();\n },\n };\n\n const containsYieldOrAwaitVisitor = visitors.environmentVisitor<{\n yield: boolean;\n await: boolean;\n }>({\n YieldExpression(path, state) {\n state.yield = true;\n if (state.await) path.stop();\n },\n AwaitExpression(path, state) {\n state.await = true;\n if (state.yield) path.stop();\n },\n });\n\n function containsClassExpression(path: NodePath) {\n if (t.isClassExpression(path.node)) return true;\n if (t.isFunction(path.node)) return false;\n const state = { found: false };\n path.traverse(containsClassExpressionVisitor, state);\n return state.found;\n }\n\n function wrap(path: NodePath) {\n const context = {\n yield: t.isYieldExpression(path.node),\n await: t.isAwaitExpression(path.node),\n };\n path.traverse(containsYieldOrAwaitVisitor, context);\n\n let replacement;\n\n if (context.yield) {\n const fn = t.functionExpression(\n null,\n [],\n t.blockStatement([t.returnStatement(path.node)]),\n /* generator */ true,\n /* async */ context.await,\n );\n\n replacement = t.yieldExpression(\n t.callExpression(t.memberExpression(fn, t.identifier(\"call\")), [\n t.thisExpression(),\n // NOTE: In some context arguments is invalid (it might not be defined\n // in the top-level scope, or it's a syntax error in static class blocks).\n // However, `yield` is also invalid in those contexts, so we can safely\n // inject a reference to arguments.\n t.identifier(\"arguments\"),\n ]),\n true,\n );\n } else {\n const fn = t.arrowFunctionExpression([], path.node, context.await);\n\n replacement = t.callExpression(fn, []);\n if (context.await) replacement = t.awaitExpression(replacement);\n }\n\n path.replaceWith(replacement);\n }\n\n return {\n name: \"bugfix-firefox-class-in-computed-class-key\",\n\n visitor: {\n Class(path) {\n const hasPrivateElement = path.node.body.body.some(node =>\n t.isPrivate(node),\n );\n if (!hasPrivateElement) return;\n\n for (const elem of path.get(\"body.body\")) {\n if (\n \"computed\" in elem.node &&\n elem.node.computed &&\n containsClassExpression(elem.get(\"key\"))\n ) {\n wrap(\n // @ts-expect-error .key also includes t.PrivateName\n elem.get(\"key\") satisfies NodePath,\n );\n }\n }\n },\n },\n };\n});\n","\"use strict\";\n\nexports.__esModule = true;\nexports.default = void 0;\n\n/**\n * Converts destructured parameters with default values to non-shorthand syntax.\n * This fixes the only Tagged Templates-related bug in ES Modules-supporting browsers (Safari 10 & 11).\n * Use this plugin instead of `@babel/plugin-transform-template-literals` when targeting ES Modules.\n *\n * @example\n * // Bug 1: Safari 10/11 doesn't reliably return the same Strings value.\n * // The value changes depending on invocation and function optimization state.\n * function f() { return Object`` }\n * f() === new f() // false, should be true.\n *\n * @example\n * // Bug 2: Safari 10/11 use the same cached strings value when the string parts are the same.\n * // This behavior comes from an earlier version of the spec, and can cause tricky bugs.\n * Object``===Object`` // true, should be false.\n *\n * Benchmarks: https://jsperf.com/compiled-tagged-template-performance\n */\nvar _default = ({\n types: t\n}) => ({\n name: \"transform-tagged-template-caching\",\n visitor: {\n TaggedTemplateExpression(path, state) {\n // tagged templates we've already dealt with\n let processed = state.get(\"processed\");\n\n if (!processed) {\n processed = new WeakSet();\n state.set(\"processed\", processed);\n }\n\n if (processed.has(path.node)) return path.skip(); // Grab the expressions from the original tag.\n // tag`a${'hello'}` // ['hello']\n\n const expressions = path.node.quasi.expressions; // Create an identity function helper:\n // identity = t => t\n\n let identity = state.get(\"identity\");\n\n if (!identity) {\n identity = path.scope.getProgramParent().generateDeclaredUidIdentifier(\"_\");\n state.set(\"identity\", identity);\n const binding = path.scope.getBinding(identity.name);\n binding.path.get(\"init\").replaceWith(t.arrowFunctionExpression( // re-use the helper identifier for compressability\n [t.identifier(\"t\")], t.identifier(\"t\")));\n } // Use the identity function helper to get a reference to the template's Strings.\n // We replace all expressions with `0` ensure Strings has the same shape.\n // identity`a${0}`\n\n\n const template = t.taggedTemplateExpression(t.cloneNode(identity), t.templateLiteral(path.node.quasi.quasis, expressions.map(() => t.numericLiteral(0))));\n processed.add(template); // Install an inline cache at the callsite using the global variable:\n // _t || (_t = identity`a${0}`)\n\n const ident = path.scope.getProgramParent().generateDeclaredUidIdentifier(\"t\");\n path.scope.getBinding(ident.name).path.parent.kind = \"let\";\n const inlineCache = t.logicalExpression(\"||\", ident, t.assignmentExpression(\"=\", t.cloneNode(ident), template)); // The original tag function becomes a plain function call.\n // The expressions omitted from the cached Strings tag are directly applied as arguments.\n // tag(_t || (_t = Object`a${0}`), 'hello')\n\n const node = t.callExpression(path.node.tag, [inlineCache, ...expressions]);\n path.replaceWith(node);\n }\n\n }\n});\n\nexports.default = _default;\nmodule.exports = exports.default;","\"use strict\";\n\nexports.__esModule = true;\nexports.default = _default;\n\n/**\n * Fixes block-shadowed let/const bindings in Safari 10/11.\n * https://kangax.github.io/compat-table/es6/#test-let_scope_shadow_resolution\n */\nfunction _default({\n types: t\n}) {\n return {\n name: \"transform-safari-block-shadowing\",\n visitor: {\n VariableDeclarator(path) {\n // the issue only affects let and const bindings:\n const kind = path.parent.kind;\n if (kind !== \"let\" && kind !== \"const\") return; // ignore non-block-scoped bindings:\n\n const block = path.scope.block;\n if (t.isFunction(block) || t.isProgram(block)) return;\n const bindings = t.getOuterBindingIdentifiers(path.node.id);\n\n for (const name of Object.keys(bindings)) {\n let scope = path.scope; // ignore parent bindings (note: impossible due to let/const?)\n\n if (!scope.hasOwnBinding(name)) continue; // check if shadowed within the nearest function/program boundary\n\n while (scope = scope.parent) {\n if (scope.hasOwnBinding(name)) {\n path.scope.rename(name);\n break;\n }\n\n if (t.isFunction(scope.block) || t.isProgram(scope.block)) {\n break;\n }\n }\n }\n }\n\n }\n };\n}\n\nmodule.exports = exports.default;","\"use strict\";\n\nexports.__esModule = true;\nexports.default = void 0;\n\n/**\n * Safari ~11 has an issue where variable declarations in a For statement throw if they shadow parameters.\n * This is fixed by renaming any declarations in the left/init part of a For* statement so they don't shadow.\n * @see https://bugs.webkit.org/show_bug.cgi?id=171041\n *\n * @example\n * e => { for (let e of []) e } // throws\n * e => { for (let _e of []) _e } // works\n */\nfunction handle(declaration) {\n if (!declaration.isVariableDeclaration()) return;\n const fn = declaration.getFunctionParent();\n const {\n name\n } = declaration.node.declarations[0].id; // check if there is a shadowed binding coming from a parameter\n\n if (fn && fn.scope.hasOwnBinding(name) && fn.scope.getOwnBinding(name).kind === \"param\") {\n declaration.scope.rename(name);\n }\n}\n\nvar _default = () => ({\n name: \"transform-safari-for-shadowing\",\n visitor: {\n ForXStatement(path) {\n handle(path.get(\"left\"));\n },\n\n ForStatement(path) {\n handle(path.get(\"init\"));\n }\n\n }\n});\n\nexports.default = _default;\nmodule.exports = exports.default;","import type { NodePath, types as t } from \"@babel/core\";\n\n/**\n * Check whether a function expression can be affected by\n * https://bugs.webkit.org/show_bug.cgi?id=220517\n * @param path The function expression NodePath\n * @returns the name of function id if it should be transformed, otherwise returns false\n */\nexport function shouldTransform(\n path: NodePath,\n): string | false {\n const { node } = path;\n const functionId = node.id;\n if (!functionId) return false;\n\n const name = functionId.name;\n // On collision, `getOwnBinding` returns the param binding\n // with the id binding be registered as constant violation\n const paramNameBinding = path.scope.getOwnBinding(name);\n if (paramNameBinding === undefined) {\n // Case 1: the function id is injected by babel-helper-name-function, which\n // assigns `NOT_LOCAL_BINDING` to the `functionId` and thus not registering id\n // in scope tracking\n // Case 2: the function id is injected by a third party plugin which does not update the\n // scope info\n return false;\n }\n if (paramNameBinding.kind !== \"param\") {\n // the function id does not reproduce in params\n return false;\n }\n\n if (paramNameBinding.identifier === paramNameBinding.path.node) {\n // the param binding is a simple parameter\n // e.g. (function a(a) {})\n return false;\n }\n\n return name;\n}\n","import { declare } from \"@babel/helper-plugin-utils\";\nimport { shouldTransform } from \"./util.ts\";\n\nexport default declare(api => {\n api.assertVersion(REQUIRED_VERSION(\"^7.16.0\"));\n\n return {\n name: \"plugin-bugfix-safari-id-destructuring-collision-in-function-expression\",\n\n visitor: {\n FunctionExpression(path) {\n const name = shouldTransform(path);\n if (name) {\n // Now we have (function a([a]) {})\n const { scope } = path;\n // invariant: path.node.id is always an Identifier here\n const newParamName = scope.generateUid(name);\n scope.rename(name, newParamName);\n }\n },\n },\n };\n});\n","import { declare } from \"@babel/helper-plugin-utils\";\nimport { types as t } from \"@babel/core\";\nimport type { NodePath } from \"@babel/core\";\n\nfunction needsWrapping(node: t.Node): boolean {\n if (t.isLiteral(node) && !t.isTemplateLiteral(node)) {\n return false;\n }\n\n if (\n t.isCallExpression(node) ||\n t.isOptionalCallExpression(node) ||\n t.isNewExpression(node)\n ) {\n return needsWrapping(node.callee) || node.arguments.some(needsWrapping);\n }\n\n if (t.isTemplateLiteral(node)) {\n return node.expressions.some(needsWrapping);\n }\n\n if (t.isTaggedTemplateExpression(node)) {\n return needsWrapping(node.tag) || needsWrapping(node.quasi);\n }\n\n if (t.isArrayExpression(node)) {\n return node.elements.some(needsWrapping);\n }\n\n if (t.isObjectExpression(node)) {\n return node.properties.some(prop => {\n if (t.isObjectProperty(prop)) {\n return (\n needsWrapping(prop.value) ||\n (prop.computed && needsWrapping(prop.key))\n );\n }\n if (t.isObjectMethod(prop)) {\n return false;\n }\n return false;\n });\n }\n\n if (t.isMemberExpression(node) || t.isOptionalMemberExpression(node)) {\n return (\n needsWrapping(node.object) ||\n (node.computed && needsWrapping(node.property))\n );\n }\n\n if (\n t.isFunctionExpression(node) ||\n t.isArrowFunctionExpression(node) ||\n t.isClassExpression(node)\n ) {\n return false;\n }\n\n if (t.isThisExpression(node)) {\n return false;\n }\n\n if (t.isSequenceExpression(node)) {\n return node.expressions.some(needsWrapping);\n }\n\n // Is an identifier, or anything else not covered above\n return true;\n}\n\nfunction wrapInitializer(\n path: NodePath,\n) {\n const { value } = path.node;\n\n if (value && needsWrapping(value)) {\n path.node.value = t.callExpression(\n t.arrowFunctionExpression([], value),\n [],\n );\n }\n}\n\nexport default declare(api => {\n api.assertVersion(REQUIRED_VERSION(\"^7.16.0\"));\n\n return {\n name: \"plugin-bugfix-safari-class-field-initializer-scope\",\n\n visitor: {\n ClassProperty(path) {\n wrapInitializer(path);\n },\n ClassPrivateProperty(path) {\n wrapInitializer(path);\n },\n },\n };\n});\n","import { skipTransparentExprWrappers } from \"@babel/helper-skip-transparent-expression-wrappers\";\nimport { types as t, type NodePath } from \"@babel/core\";\n// https://crbug.com/v8/11558\n\n// check if there is a spread element followed by another argument.\n// (...[], 0) or (...[], ...[])\n\nfunction matchAffectedArguments(argumentNodes: t.CallExpression[\"arguments\"]) {\n const spreadIndex = argumentNodes.findIndex(node => t.isSpreadElement(node));\n return spreadIndex >= 0 && spreadIndex !== argumentNodes.length - 1;\n}\n\n/**\n * Check whether the optional chain is affected by https://crbug.com/v8/11558.\n * This routine MUST not manipulate NodePath\n *\n * @export\n * @param {(NodePath)} path\n * @returns {boolean}\n */\nexport function shouldTransform(\n path: NodePath,\n): boolean {\n let optionalPath: NodePath = path;\n const chains: (t.OptionalCallExpression | t.OptionalMemberExpression)[] = [];\n for (;;) {\n if (optionalPath.isOptionalMemberExpression()) {\n chains.push(optionalPath.node);\n optionalPath = skipTransparentExprWrappers(optionalPath.get(\"object\"));\n } else if (optionalPath.isOptionalCallExpression()) {\n chains.push(optionalPath.node);\n optionalPath = skipTransparentExprWrappers(optionalPath.get(\"callee\"));\n } else {\n break;\n }\n }\n for (let i = 0; i < chains.length; i++) {\n const node = chains[i];\n if (\n t.isOptionalCallExpression(node) &&\n matchAffectedArguments(node.arguments)\n ) {\n // f?.(...[], 0)\n if (node.optional) {\n return true;\n }\n // o?.m(...[], 0)\n // when node.optional is false, chains[i + 1] is always well defined\n const callee = chains[i + 1];\n if (t.isOptionalMemberExpression(callee, { optional: true })) {\n return true;\n }\n }\n }\n return false;\n}\n","import { declare } from \"@babel/helper-plugin-utils\";\nimport { transform } from \"@babel/plugin-transform-optional-chaining\";\nimport { shouldTransform } from \"./util.ts\";\nimport type { NodePath, types as t } from \"@babel/core\";\n\nexport default declare(api => {\n api.assertVersion(REQUIRED_VERSION(7));\n\n const noDocumentAll = api.assumption(\"noDocumentAll\") ?? false;\n const pureGetters = api.assumption(\"pureGetters\") ?? false;\n\n return {\n name: \"bugfix-v8-spread-parameters-in-optional-chaining\",\n\n visitor: {\n \"OptionalCallExpression|OptionalMemberExpression\"(\n path: NodePath,\n ) {\n if (shouldTransform(path)) {\n transform(path, { noDocumentAll, pureGetters });\n }\n },\n },\n };\n});\n","import { types as t, type NodePath, type Visitor } from \"@babel/core\";\n\nfunction isNameOrLength(key: t.Node): boolean {\n if (t.isIdentifier(key)) {\n return key.name === \"name\" || key.name === \"length\";\n }\n if (t.isStringLiteral(key)) {\n return key.value === \"name\" || key.value === \"length\";\n }\n return false;\n}\n\nfunction isStaticFieldWithValue(\n node: t.Node,\n): node is t.ClassProperty | t.ClassPrivateProperty {\n return (\n (t.isClassProperty(node) || t.isClassPrivateProperty(node)) &&\n node.static &&\n !!node.value\n );\n}\n\nconst hasReferenceVisitor: Visitor<{ name: string; ref: () => void }> = {\n ReferencedIdentifier(path, state) {\n if (path.node.name === state.name) {\n state.ref();\n path.stop();\n }\n },\n Scope(path, { name }) {\n if (path.scope.hasOwnBinding(name)) {\n path.skip();\n }\n },\n};\n\nfunction isReferenceOrThis(node: t.Node, name?: string) {\n return t.isThisExpression(node) || (name && t.isIdentifier(node, { name }));\n}\n\nconst hasReferenceOrThisVisitor: Visitor<{ name?: string; ref: () => void }> = {\n \"ThisExpression|ReferencedIdentifier\"(path, state) {\n if (isReferenceOrThis(path.node, state.name)) {\n state.ref();\n path.stop();\n }\n },\n FunctionParent(path, state) {\n if (path.isArrowFunctionExpression()) return;\n if (state.name && !path.scope.hasOwnBinding(state.name)) {\n path.traverse(hasReferenceVisitor, state);\n }\n path.skip();\n if (path.isMethod()) {\n if (\n process.env.BABEL_8_BREAKING ||\n USE_ESM ||\n IS_STANDALONE ||\n path.requeueComputedKeyAndDecorators\n ) {\n path.requeueComputedKeyAndDecorators();\n } else {\n // eslint-disable-next-line no-restricted-globals\n require(\"@babel/traverse\").NodePath.prototype.requeueComputedKeyAndDecorators.call(\n path,\n );\n }\n }\n },\n};\n\ntype ClassElementWithComputedKeySupport = Extract<\n t.ClassBody[\"body\"][number],\n { computed?: boolean }\n>;\n\n/**\n * This function returns an array containing the indexes of class elements\n * that might be affected by https://crbug.com/v8/12421 bug.\n *\n * This bug affects public static class fields that have the same name as an\n * existing non-writable property with the same name. This usually happens when\n * the static field is named 'length' or 'name', since it clashes with the\n * predefined fn.length and fn.name properties. We must also compile static\n * fields with computed key, because they might end up being named 'length' or\n * 'name'.\n *\n * However, this bug can potentially affect public static fields with any name.\n * Consider this example:\n *\n * class A {\n * static {\n * Object.defineProperty(A, \"readonly\", {\n * value: 1,\n * writable: false,\n * configurable: true\n * })\n * }\n *\n * static readonly = 2;\n * }\n *\n * When initializing the 'static readonly' field, the class already has a\n * non-writable property named 'readonly' and thus V8 9.7 incorrectly throws.\n *\n * To avoid unconditionally compiling every public static field, we track how\n * the class is referenced during definition & static evaluation: any side\n * effect after a reference to the class can potentially define a non-writable\n * conficting property, so subsequent public static fields must be compiled.\n * The class could be referenced using the class name in computed keys, which\n * run before static fields, or using either the class name or 'this' in static\n * fields (both public and private) and static blocks.\n *\n * We don't need to check if computed keys referencing the class have any side\n * effect, because during the computed keys evaluation the internal class\n * binding is in TDZ. However, the first side effect in a static field/block\n * could have access to a function defined in a computed key that modifies the\n * class.\n *\n * This logic is already quite complex, so we assume that static blocks always\n * have side effects and reference the class (the reason to use them is to\n * perform additional initialization logic on the class anyway), so that we do\n * not have to check their contents.\n */\nexport function getPotentiallyBuggyFieldsIndexes(path: NodePath) {\n const buggyPublicStaticFieldsIndexes: number[] = [];\n\n let classReferenced = false;\n const className = path.node.id?.name;\n\n const hasReferenceState = {\n name: className,\n ref: () => (classReferenced = true),\n };\n\n if (className) {\n for (const el of path.get(\"body.body\")) {\n if ((el.node as ClassElementWithComputedKeySupport).computed) {\n // Since .traverse skips the top-level node, it doesn't detect\n // a reference happening immediately:\n // class A { [A]() {} }\n // However, it's a TDZ error so it's ok not to consider this case.\n (el as NodePath)\n .get(\"key\")\n .traverse(hasReferenceVisitor, hasReferenceState);\n\n if (classReferenced) break;\n }\n }\n }\n\n let nextPotentiallyBuggy = false;\n\n const { body } = path.node.body;\n for (let i = 0; i < body.length; i++) {\n const node = body[i];\n\n if (!nextPotentiallyBuggy) {\n if (t.isStaticBlock(node)) {\n classReferenced = true;\n nextPotentiallyBuggy = true;\n } else if (isStaticFieldWithValue(node)) {\n if (!classReferenced) {\n if (isReferenceOrThis(node.value, className)) {\n classReferenced = true;\n } else {\n (\n path.get(`body.body.${i}.value`) as NodePath\n ).traverse(hasReferenceOrThisVisitor, hasReferenceState);\n }\n }\n\n if (classReferenced) {\n nextPotentiallyBuggy = !path.scope.isPure(node.value);\n }\n }\n }\n\n if (\n t.isClassProperty(node, { static: true }) &&\n (nextPotentiallyBuggy || node.computed || isNameOrLength(node.key))\n ) {\n buggyPublicStaticFieldsIndexes.push(i);\n }\n }\n\n return buggyPublicStaticFieldsIndexes;\n}\n\nexport function getNameOrLengthStaticFieldsIndexes(path: NodePath) {\n const indexes: number[] = [];\n\n const { body } = path.node.body;\n for (let i = 0; i < body.length; i++) {\n const node = body[i];\n if (\n t.isClassProperty(node, { static: true, computed: false }) &&\n isNameOrLength(node.key)\n ) {\n indexes.push(i);\n }\n }\n\n return indexes;\n}\n\ntype Range = [start: number, end: number];\n\n/**\n * Converts a sorted list of numbers into a list of (inclusive-exclusive)\n * ranges representing the same numbers.\n *\n * @example toRanges([1, 3, 4, 5, 8, 9]) -> [[1, 2], [3, 6], [8, 10]]\n */\nexport function toRanges(nums: number[]): Range[] {\n const ranges: Range[] = [];\n\n if (nums.length === 0) return ranges;\n\n let start = nums[0];\n let end = start + 1;\n for (let i = 1; i < nums.length; i++) {\n if (nums[i] <= nums[i - 1]) {\n throw new Error(\"Internal Babel error: nums must be in ascending order\");\n }\n if (nums[i] === end) {\n end++;\n } else {\n ranges.push([start, end]);\n start = nums[i];\n end = start + 1;\n }\n }\n ranges.push([start, end]);\n\n return ranges;\n}\n","import type { NodePath, Scope, PluginPass, File } from \"@babel/core\";\nimport { types as t } from \"@babel/core\";\nimport { declare } from \"@babel/helper-plugin-utils\";\n\nimport {\n getPotentiallyBuggyFieldsIndexes,\n getNameOrLengthStaticFieldsIndexes,\n toRanges,\n} from \"./util.ts\";\n\nfunction buildFieldsReplacement(\n fields: t.ClassProperty[],\n scope: Scope,\n file: File,\n) {\n return t.staticBlock(\n fields.map(field => {\n const key =\n field.computed || !t.isIdentifier(field.key)\n ? field.key\n : t.stringLiteral(field.key.name);\n\n return t.expressionStatement(\n t.callExpression(file.addHelper(\"defineProperty\"), [\n t.thisExpression(),\n key,\n field.value || scope.buildUndefinedNode(),\n ]),\n );\n }),\n );\n}\n\nexport default declare(api => {\n api.assertVersion(REQUIRED_VERSION(7));\n\n const setPublicClassFields = api.assumption(\"setPublicClassFields\");\n\n return {\n name: \"bugfix-v8-static-class-fields-redefine-readonly\",\n\n visitor: {\n Class(this: PluginPass, path: NodePath) {\n const ranges = toRanges(\n setPublicClassFields\n ? getNameOrLengthStaticFieldsIndexes(path)\n : getPotentiallyBuggyFieldsIndexes(path),\n );\n\n for (let i = ranges.length - 1; i >= 0; i--) {\n const [start, end] = ranges[i];\n\n const startPath = path.get(\"body.body\")[start];\n\n startPath.replaceWith(\n buildFieldsReplacement(\n path.node.body.body.slice(start, end) as t.ClassProperty[],\n path.scope,\n this.file,\n ),\n );\n\n for (let j = end - 1; j > start; j--) {\n path.get(\"body.body\")[j].remove();\n }\n }\n },\n },\n };\n});\n","/* eslint sort-keys: \"error\" */\n\nimport syntaxImportAssertions from \"@babel/plugin-syntax-import-assertions\";\nimport syntaxImportAttributes from \"@babel/plugin-syntax-import-attributes\";\n\nimport transformAsyncGeneratorFunctions from \"@babel/plugin-transform-async-generator-functions\";\nimport transformAsyncToGenerator from \"@babel/plugin-transform-async-to-generator\";\nimport transformArrowFunctions from \"@babel/plugin-transform-arrow-functions\";\nimport transformBlockScopedFunctions from \"@babel/plugin-transform-block-scoped-functions\";\nimport transformBlockScoping from \"@babel/plugin-transform-block-scoping\";\nimport transformClasses from \"@babel/plugin-transform-classes\";\nimport transformClassProperties from \"@babel/plugin-transform-class-properties\";\nimport transformClassStaticBlock from \"@babel/plugin-transform-class-static-block\";\nimport transformComputedProperties from \"@babel/plugin-transform-computed-properties\";\nimport transformDestructuring from \"@babel/plugin-transform-destructuring\";\nimport transformDotallRegex from \"@babel/plugin-transform-dotall-regex\";\nimport transformDuplicateKeys from \"@babel/plugin-transform-duplicate-keys\";\nimport transformDuplicateNamedCapturingGroupsRegex from \"@babel/plugin-transform-duplicate-named-capturing-groups-regex\";\nimport transformDynamicImport from \"@babel/plugin-transform-dynamic-import\";\nimport transformExponentialOperator from \"@babel/plugin-transform-exponentiation-operator\";\nimport transformExportNamespaceFrom from \"@babel/plugin-transform-export-namespace-from\";\nimport transformForOf from \"@babel/plugin-transform-for-of\";\nimport transformFunctionName from \"@babel/plugin-transform-function-name\";\nimport transformJsonStrings from \"@babel/plugin-transform-json-strings\";\nimport transformLiterals from \"@babel/plugin-transform-literals\";\nimport transformLogicalAssignmentOperators from \"@babel/plugin-transform-logical-assignment-operators\";\nimport transformMemberExpressionLiterals from \"@babel/plugin-transform-member-expression-literals\";\nimport transformModulesAmd from \"@babel/plugin-transform-modules-amd\";\nimport transformModulesCommonjs from \"@babel/plugin-transform-modules-commonjs\";\nimport transformModulesSystemjs from \"@babel/plugin-transform-modules-systemjs\";\nimport transformModulesUmd from \"@babel/plugin-transform-modules-umd\";\nimport transformNamedCapturingGroupsRegex from \"@babel/plugin-transform-named-capturing-groups-regex\";\nimport transformNewTarget from \"@babel/plugin-transform-new-target\";\nimport transformNullishCoalescingOperator from \"@babel/plugin-transform-nullish-coalescing-operator\";\nimport transformNumericSeparator from \"@babel/plugin-transform-numeric-separator\";\nimport transformObjectRestSpread from \"@babel/plugin-transform-object-rest-spread\";\nimport transformObjectSuper from \"@babel/plugin-transform-object-super\";\nimport transformOptionalCatchBinding from \"@babel/plugin-transform-optional-catch-binding\";\nimport transformOptionalChaining from \"@babel/plugin-transform-optional-chaining\";\nimport transformParameters from \"@babel/plugin-transform-parameters\";\nimport transformPrivateMethods from \"@babel/plugin-transform-private-methods\";\nimport transformPrivatePropertyInObject from \"@babel/plugin-transform-private-property-in-object\";\nimport transformPropertyLiterals from \"@babel/plugin-transform-property-literals\";\nimport transformRegenerator from \"@babel/plugin-transform-regenerator\";\nimport transformReservedWords from \"@babel/plugin-transform-reserved-words\";\nimport transformShorthandProperties from \"@babel/plugin-transform-shorthand-properties\";\nimport transformSpread from \"@babel/plugin-transform-spread\";\nimport transformStickyRegex from \"@babel/plugin-transform-sticky-regex\";\nimport transformTemplateLiterals from \"@babel/plugin-transform-template-literals\";\nimport transformTypeofSymbol from \"@babel/plugin-transform-typeof-symbol\";\nimport transformUnicodeEscapes from \"@babel/plugin-transform-unicode-escapes\";\nimport transformUnicodePropertyRegex from \"@babel/plugin-transform-unicode-property-regex\";\nimport transformUnicodeRegex from \"@babel/plugin-transform-unicode-regex\";\nimport transformUnicodeSetsRegex from \"@babel/plugin-transform-unicode-sets-regex\";\n\nimport bugfixAsyncArrowsInClass from \"@babel/preset-modules/lib/plugins/transform-async-arrows-in-class/index.js\";\nimport bugfixEdgeDefaultParameters from \"@babel/preset-modules/lib/plugins/transform-edge-default-parameters/index.js\";\nimport bugfixEdgeFunctionName from \"@babel/preset-modules/lib/plugins/transform-edge-function-name/index.js\";\nimport bugfixFirefoxClassInComputedKey from \"@babel/plugin-bugfix-firefox-class-in-computed-class-key\";\nimport bugfixTaggedTemplateCaching from \"@babel/preset-modules/lib/plugins/transform-tagged-template-caching/index.js\";\nimport bugfixSafariBlockShadowing from \"@babel/preset-modules/lib/plugins/transform-safari-block-shadowing/index.js\";\nimport bugfixSafariForShadowing from \"@babel/preset-modules/lib/plugins/transform-safari-for-shadowing/index.js\";\nimport bugfixSafariIdDestructuringCollisionInFunctionExpression from \"@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression\";\nimport bugfixSafariClassFieldInitializerScope from \"@babel/plugin-bugfix-safari-class-field-initializer-scope\";\nimport bugfixV8SpreadParametersInOptionalChaining from \"@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining\";\nimport bugfixV8StaticClassFieldsRedefineReadonly from \"@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly\";\n\nexport { availablePlugins as default };\nconst availablePlugins = {\n \"bugfix/transform-async-arrows-in-class\": () => bugfixAsyncArrowsInClass,\n \"bugfix/transform-edge-default-parameters\": () => bugfixEdgeDefaultParameters,\n \"bugfix/transform-edge-function-name\": () => bugfixEdgeFunctionName,\n \"bugfix/transform-firefox-class-in-computed-class-key\": () =>\n bugfixFirefoxClassInComputedKey,\n \"bugfix/transform-safari-block-shadowing\": () => bugfixSafariBlockShadowing,\n \"bugfix/transform-safari-class-field-initializer-scope\": () =>\n bugfixSafariClassFieldInitializerScope,\n \"bugfix/transform-safari-for-shadowing\": () => bugfixSafariForShadowing,\n \"bugfix/transform-safari-id-destructuring-collision-in-function-expression\":\n () => bugfixSafariIdDestructuringCollisionInFunctionExpression,\n \"bugfix/transform-tagged-template-caching\": () => bugfixTaggedTemplateCaching,\n \"bugfix/transform-v8-spread-parameters-in-optional-chaining\": () =>\n bugfixV8SpreadParametersInOptionalChaining,\n \"bugfix/transform-v8-static-class-fields-redefine-readonly\": () =>\n bugfixV8StaticClassFieldsRedefineReadonly,\n \"syntax-import-assertions\": () => syntaxImportAssertions,\n \"syntax-import-attributes\": () => syntaxImportAttributes,\n \"transform-arrow-functions\": () => transformArrowFunctions,\n \"transform-async-generator-functions\": () => transformAsyncGeneratorFunctions,\n \"transform-async-to-generator\": () => transformAsyncToGenerator,\n \"transform-block-scoped-functions\": () => transformBlockScopedFunctions,\n \"transform-block-scoping\": () => transformBlockScoping,\n \"transform-class-properties\": () => transformClassProperties,\n \"transform-class-static-block\": () => transformClassStaticBlock,\n \"transform-classes\": () => transformClasses,\n \"transform-computed-properties\": () => transformComputedProperties,\n \"transform-destructuring\": () => transformDestructuring,\n \"transform-dotall-regex\": () => transformDotallRegex,\n \"transform-duplicate-keys\": () => transformDuplicateKeys,\n \"transform-duplicate-named-capturing-groups-regex\": () =>\n transformDuplicateNamedCapturingGroupsRegex,\n \"transform-dynamic-import\": () => transformDynamicImport,\n \"transform-exponentiation-operator\": () => transformExponentialOperator,\n \"transform-export-namespace-from\": () => transformExportNamespaceFrom,\n \"transform-for-of\": () => transformForOf,\n \"transform-function-name\": () => transformFunctionName,\n \"transform-json-strings\": () => transformJsonStrings,\n \"transform-literals\": () => transformLiterals,\n \"transform-logical-assignment-operators\": () =>\n transformLogicalAssignmentOperators,\n \"transform-member-expression-literals\": () =>\n transformMemberExpressionLiterals,\n \"transform-modules-amd\": () => transformModulesAmd,\n \"transform-modules-commonjs\": () => transformModulesCommonjs,\n \"transform-modules-systemjs\": () => transformModulesSystemjs,\n \"transform-modules-umd\": () => transformModulesUmd,\n \"transform-named-capturing-groups-regex\": () =>\n transformNamedCapturingGroupsRegex,\n \"transform-new-target\": () => transformNewTarget,\n \"transform-nullish-coalescing-operator\": () =>\n transformNullishCoalescingOperator,\n \"transform-numeric-separator\": () => transformNumericSeparator,\n \"transform-object-rest-spread\": () => transformObjectRestSpread,\n \"transform-object-super\": () => transformObjectSuper,\n \"transform-optional-catch-binding\": () => transformOptionalCatchBinding,\n \"transform-optional-chaining\": () => transformOptionalChaining,\n \"transform-parameters\": () => transformParameters,\n \"transform-private-methods\": () => transformPrivateMethods,\n \"transform-private-property-in-object\": () =>\n transformPrivatePropertyInObject,\n \"transform-property-literals\": () => transformPropertyLiterals,\n \"transform-regenerator\": () => transformRegenerator,\n \"transform-reserved-words\": () => transformReservedWords,\n \"transform-shorthand-properties\": () => transformShorthandProperties,\n \"transform-spread\": () => transformSpread,\n \"transform-sticky-regex\": () => transformStickyRegex,\n \"transform-template-literals\": () => transformTemplateLiterals,\n \"transform-typeof-symbol\": () => transformTypeofSymbol,\n \"transform-unicode-escapes\": () => transformUnicodeEscapes,\n \"transform-unicode-property-regex\": () => transformUnicodePropertyRegex,\n \"transform-unicode-regex\": () => transformUnicodeRegex,\n \"transform-unicode-sets-regex\": () => transformUnicodeSetsRegex,\n};\n\nexport const minVersions = {};\n// TODO(Babel 8): Remove this\nexport let legacyBabel7SyntaxPlugins: Set;\n\nif (!process.env.BABEL_8_BREAKING) {\n /* eslint-disable no-restricted-globals */\n\n Object.assign(minVersions, {\n \"bugfix/transform-safari-id-destructuring-collision-in-function-expression\":\n \"7.16.0\",\n \"bugfix/transform-v8-static-class-fields-redefine-readonly\": \"7.12.0\",\n \"syntax-import-attributes\": \"7.22.0\",\n \"transform-class-static-block\": \"7.12.0\",\n \"transform-duplicate-named-capturing-groups-regex\": \"7.19.0\",\n \"transform-private-property-in-object\": \"7.10.0\",\n });\n\n // We cannot use the require call in ESM and when bundling.\n // Babel standalone uses a modern parser, so just include a noop plugin.\n // Use `bind` so that it's not detected as a duplicate plugin when using it.\n\n // This is a factory to create a function that returns a no-op plugn\n const e = () => () => () => ({});\n\n const legacyBabel7SyntaxPluginsLoaders = {\n \"syntax-async-generators\":\n USE_ESM || IS_STANDALONE\n ? e()\n : () => require(\"@babel/plugin-syntax-async-generators\"),\n \"syntax-class-properties\":\n USE_ESM || IS_STANDALONE\n ? e()\n : () => require(\"@babel/plugin-syntax-class-properties\"),\n \"syntax-class-static-block\":\n USE_ESM || IS_STANDALONE\n ? e()\n : () => require(\"@babel/plugin-syntax-class-static-block\"),\n \"syntax-dynamic-import\":\n USE_ESM || IS_STANDALONE\n ? e()\n : () => require(\"@babel/plugin-syntax-dynamic-import\"),\n \"syntax-export-namespace-from\":\n USE_ESM || IS_STANDALONE\n ? e()\n : () => require(\"@babel/plugin-syntax-export-namespace-from\"),\n \"syntax-import-meta\":\n USE_ESM || IS_STANDALONE\n ? e()\n : () => require(\"@babel/plugin-syntax-import-meta\"),\n \"syntax-json-strings\":\n USE_ESM || IS_STANDALONE\n ? e()\n : () => require(\"@babel/plugin-syntax-json-strings\"),\n \"syntax-logical-assignment-operators\":\n USE_ESM || IS_STANDALONE\n ? e()\n : () => require(\"@babel/plugin-syntax-logical-assignment-operators\"),\n \"syntax-nullish-coalescing-operator\":\n USE_ESM || IS_STANDALONE\n ? e()\n : () => require(\"@babel/plugin-syntax-nullish-coalescing-operator\"),\n \"syntax-numeric-separator\":\n USE_ESM || IS_STANDALONE\n ? e()\n : () => require(\"@babel/plugin-syntax-numeric-separator\"),\n \"syntax-object-rest-spread\":\n USE_ESM || IS_STANDALONE\n ? e()\n : () => require(\"@babel/plugin-syntax-object-rest-spread\"),\n \"syntax-optional-catch-binding\":\n USE_ESM || IS_STANDALONE\n ? e()\n : () => require(\"@babel/plugin-syntax-optional-catch-binding\"),\n \"syntax-optional-chaining\":\n USE_ESM || IS_STANDALONE\n ? e()\n : () => require(\"@babel/plugin-syntax-optional-chaining\"),\n \"syntax-private-property-in-object\":\n USE_ESM || IS_STANDALONE\n ? e()\n : () => require(\"@babel/plugin-syntax-private-property-in-object\"),\n \"syntax-top-level-await\":\n USE_ESM || IS_STANDALONE\n ? e()\n : () => require(\"@babel/plugin-syntax-top-level-await\"),\n };\n\n // This is a CJS plugin that depends on a package from the monorepo, so it\n // breaks using ESM. Given that ESM builds are new enough to have this\n // syntax enabled by default, we can safely skip enabling it.\n if (!USE_ESM) {\n // @ts-expect-error unknown key\n legacyBabel7SyntaxPluginsLoaders[\"syntax-unicode-sets-regex\"] =\n IS_STANDALONE\n ? e()\n : () => require(\"@babel/plugin-syntax-unicode-sets-regex\");\n }\n\n Object.assign(availablePlugins, legacyBabel7SyntaxPluginsLoaders);\n\n legacyBabel7SyntaxPlugins = new Set(\n Object.keys(legacyBabel7SyntaxPluginsLoaders),\n );\n}\n","import semver from \"semver\";\nimport { minVersions, legacyBabel7SyntaxPlugins } from \"./available-plugins.ts\";\n\nexport function addProposalSyntaxPlugins(\n items: Set,\n proposalSyntaxPlugins: readonly string[],\n) {\n proposalSyntaxPlugins.forEach(plugin => {\n items.add(plugin);\n });\n}\nexport function removeUnnecessaryItems(\n items: Set,\n overlapping: { [name: string]: string[] },\n) {\n items.forEach(item => {\n overlapping[item]?.forEach(name => items.delete(name));\n });\n}\nexport function removeUnsupportedItems(\n items: Set,\n babelVersion: string,\n) {\n items.forEach(item => {\n if (\n Object.hasOwn(minVersions, item) &&\n semver.lt(\n babelVersion,\n // @ts-expect-error we have checked minVersions[item] in has call\n minVersions[item],\n )\n ) {\n items.delete(item);\n } else if (\n !process.env.BABEL_8_BREAKING &&\n babelVersion[0] === \"8\" &&\n legacyBabel7SyntaxPlugins.has(item)\n ) {\n items.delete(item);\n }\n });\n}\n","type AvailablePlugins = typeof import(\"./available-plugins\").default;\n\nexport default {\n amd: \"transform-modules-amd\",\n commonjs: \"transform-modules-commonjs\",\n cjs: \"transform-modules-commonjs\",\n systemjs: \"transform-modules-systemjs\",\n umd: \"transform-modules-umd\",\n} as { [transform: string]: keyof AvailablePlugins };\n","module.exports = require(\"./data/plugin-bugfixes.json\");\n","module.exports = require(\"./data/overlapping-plugins.json\");\n","import originalPlugins from \"@babel/compat-data/plugins\";\nimport originalPluginsBugfixes from \"@babel/compat-data/plugin-bugfixes\";\nimport originalOverlappingPlugins from \"@babel/compat-data/overlapping-plugins\";\nimport availablePlugins from \"./available-plugins.ts\";\n\nconst keys: (o: O) => (keyof O)[] = Object.keys;\n\nexport const plugins = filterAvailable(originalPlugins);\nexport const pluginsBugfixes = filterAvailable(originalPluginsBugfixes);\nexport const overlappingPlugins = filterAvailable(originalOverlappingPlugins);\n\n// @ts-expect-error: we extend this here, since it's a syntax plugin and thus\n// doesn't make sense to store it in a compat-data package.\noverlappingPlugins[\"syntax-import-attributes\"] = [\"syntax-import-assertions\"];\n\nfunction filterAvailable(\n data: Data,\n): { [Name in keyof Data & keyof typeof availablePlugins]: Data[Name] } {\n const result = {} as any;\n for (const plugin of keys(data)) {\n if (Object.hasOwn(availablePlugins, plugin)) {\n result[plugin] = data[plugin];\n }\n }\n return result;\n}\n","export const TopLevelOptions = {\n bugfixes: \"bugfixes\",\n configPath: \"configPath\",\n corejs: \"corejs\",\n debug: \"debug\",\n exclude: \"exclude\",\n forceAllTransforms: \"forceAllTransforms\",\n ignoreBrowserslistConfig: \"ignoreBrowserslistConfig\",\n include: \"include\",\n modules: \"modules\",\n shippedProposals: \"shippedProposals\",\n targets: \"targets\",\n useBuiltIns: \"useBuiltIns\",\n browserslistEnv: \"browserslistEnv\",\n} as const;\n\nif (!process.env.BABEL_8_BREAKING) {\n Object.assign(TopLevelOptions, {\n loose: \"loose\",\n spec: \"spec\",\n });\n}\n\nexport const ModulesOption = {\n false: false,\n auto: \"auto\",\n amd: \"amd\",\n commonjs: \"commonjs\",\n cjs: \"cjs\",\n systemjs: \"systemjs\",\n umd: \"umd\",\n} as const;\n\nexport const UseBuiltInsOption = {\n false: false,\n entry: \"entry\",\n usage: \"usage\",\n} as const;\n","\"use strict\";\n\nexports.__esModule = true;\nexports.StaticProperties = exports.InstanceProperties = exports.CommonIterators = exports.BuiltIns = void 0;\nvar _corejs2BuiltIns = _interopRequireDefault(require(\"@babel/compat-data/corejs2-built-ins\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nconst define = (name, pure, global = [], meta) => {\n return {\n name,\n pure,\n global,\n meta\n };\n};\nconst pureAndGlobal = (pure, global, minRuntimeVersion = null) => define(global[0], pure, global, {\n minRuntimeVersion\n});\nconst globalOnly = global => define(global[0], null, global);\nconst pureOnly = (pure, name) => define(name, pure, []);\nconst ArrayNatureIterators = [\"es6.object.to-string\", \"es6.array.iterator\", \"web.dom.iterable\"];\nconst CommonIterators = [\"es6.string.iterator\", ...ArrayNatureIterators];\nexports.CommonIterators = CommonIterators;\nconst PromiseDependencies = [\"es6.object.to-string\", \"es6.promise\"];\nconst BuiltIns = {\n DataView: globalOnly([\"es6.typed.data-view\"]),\n Float32Array: globalOnly([\"es6.typed.float32-array\"]),\n Float64Array: globalOnly([\"es6.typed.float64-array\"]),\n Int8Array: globalOnly([\"es6.typed.int8-array\"]),\n Int16Array: globalOnly([\"es6.typed.int16-array\"]),\n Int32Array: globalOnly([\"es6.typed.int32-array\"]),\n Map: pureAndGlobal(\"map\", [\"es6.map\", ...CommonIterators]),\n Number: globalOnly([\"es6.number.constructor\"]),\n Promise: pureAndGlobal(\"promise\", PromiseDependencies),\n RegExp: globalOnly([\"es6.regexp.constructor\"]),\n Set: pureAndGlobal(\"set\", [\"es6.set\", ...CommonIterators]),\n Symbol: pureAndGlobal(\"symbol/index\", [\"es6.symbol\"]),\n Uint8Array: globalOnly([\"es6.typed.uint8-array\"]),\n Uint8ClampedArray: globalOnly([\"es6.typed.uint8-clamped-array\"]),\n Uint16Array: globalOnly([\"es6.typed.uint16-array\"]),\n Uint32Array: globalOnly([\"es6.typed.uint32-array\"]),\n WeakMap: pureAndGlobal(\"weak-map\", [\"es6.weak-map\", ...CommonIterators]),\n WeakSet: pureAndGlobal(\"weak-set\", [\"es6.weak-set\", ...CommonIterators]),\n setImmediate: pureOnly(\"set-immediate\", \"web.immediate\"),\n clearImmediate: pureOnly(\"clear-immediate\", \"web.immediate\"),\n parseFloat: pureOnly(\"parse-float\", \"es6.parse-float\"),\n parseInt: pureOnly(\"parse-int\", \"es6.parse-int\")\n};\nexports.BuiltIns = BuiltIns;\nconst InstanceProperties = {\n __defineGetter__: globalOnly([\"es7.object.define-getter\"]),\n __defineSetter__: globalOnly([\"es7.object.define-setter\"]),\n __lookupGetter__: globalOnly([\"es7.object.lookup-getter\"]),\n __lookupSetter__: globalOnly([\"es7.object.lookup-setter\"]),\n anchor: globalOnly([\"es6.string.anchor\"]),\n big: globalOnly([\"es6.string.big\"]),\n bind: globalOnly([\"es6.function.bind\"]),\n blink: globalOnly([\"es6.string.blink\"]),\n bold: globalOnly([\"es6.string.bold\"]),\n codePointAt: globalOnly([\"es6.string.code-point-at\"]),\n copyWithin: globalOnly([\"es6.array.copy-within\"]),\n endsWith: globalOnly([\"es6.string.ends-with\"]),\n entries: globalOnly(ArrayNatureIterators),\n every: globalOnly([\"es6.array.every\"]),\n fill: globalOnly([\"es6.array.fill\"]),\n filter: globalOnly([\"es6.array.filter\"]),\n finally: globalOnly([\"es7.promise.finally\", ...PromiseDependencies]),\n find: globalOnly([\"es6.array.find\"]),\n findIndex: globalOnly([\"es6.array.find-index\"]),\n fixed: globalOnly([\"es6.string.fixed\"]),\n flags: globalOnly([\"es6.regexp.flags\"]),\n flatMap: globalOnly([\"es7.array.flat-map\"]),\n fontcolor: globalOnly([\"es6.string.fontcolor\"]),\n fontsize: globalOnly([\"es6.string.fontsize\"]),\n forEach: globalOnly([\"es6.array.for-each\"]),\n includes: globalOnly([\"es6.string.includes\", \"es7.array.includes\"]),\n indexOf: globalOnly([\"es6.array.index-of\"]),\n italics: globalOnly([\"es6.string.italics\"]),\n keys: globalOnly(ArrayNatureIterators),\n lastIndexOf: globalOnly([\"es6.array.last-index-of\"]),\n link: globalOnly([\"es6.string.link\"]),\n map: globalOnly([\"es6.array.map\"]),\n match: globalOnly([\"es6.regexp.match\"]),\n name: globalOnly([\"es6.function.name\"]),\n padStart: globalOnly([\"es7.string.pad-start\"]),\n padEnd: globalOnly([\"es7.string.pad-end\"]),\n reduce: globalOnly([\"es6.array.reduce\"]),\n reduceRight: globalOnly([\"es6.array.reduce-right\"]),\n repeat: globalOnly([\"es6.string.repeat\"]),\n replace: globalOnly([\"es6.regexp.replace\"]),\n search: globalOnly([\"es6.regexp.search\"]),\n small: globalOnly([\"es6.string.small\"]),\n some: globalOnly([\"es6.array.some\"]),\n sort: globalOnly([\"es6.array.sort\"]),\n split: globalOnly([\"es6.regexp.split\"]),\n startsWith: globalOnly([\"es6.string.starts-with\"]),\n strike: globalOnly([\"es6.string.strike\"]),\n sub: globalOnly([\"es6.string.sub\"]),\n sup: globalOnly([\"es6.string.sup\"]),\n toISOString: globalOnly([\"es6.date.to-iso-string\"]),\n toJSON: globalOnly([\"es6.date.to-json\"]),\n toString: globalOnly([\"es6.object.to-string\", \"es6.date.to-string\", \"es6.regexp.to-string\"]),\n trim: globalOnly([\"es6.string.trim\"]),\n trimEnd: globalOnly([\"es7.string.trim-right\"]),\n trimLeft: globalOnly([\"es7.string.trim-left\"]),\n trimRight: globalOnly([\"es7.string.trim-right\"]),\n trimStart: globalOnly([\"es7.string.trim-left\"]),\n values: globalOnly(ArrayNatureIterators)\n};\n\n// This isn't present in older @babel/compat-data versions\nexports.InstanceProperties = InstanceProperties;\nif (\"es6.array.slice\" in _corejs2BuiltIns.default) {\n InstanceProperties.slice = globalOnly([\"es6.array.slice\"]);\n}\nconst StaticProperties = {\n Array: {\n from: pureAndGlobal(\"array/from\", [\"es6.symbol\", \"es6.array.from\", ...CommonIterators]),\n isArray: pureAndGlobal(\"array/is-array\", [\"es6.array.is-array\"]),\n of: pureAndGlobal(\"array/of\", [\"es6.array.of\"])\n },\n Date: {\n now: pureAndGlobal(\"date/now\", [\"es6.date.now\"])\n },\n JSON: {\n stringify: pureOnly(\"json/stringify\", \"es6.symbol\")\n },\n Math: {\n // 'Math' was not included in the 7.0.0\n // release of '@babel/runtime'. See issue https://github.com/babel/babel/pull/8616.\n acosh: pureAndGlobal(\"math/acosh\", [\"es6.math.acosh\"], \"7.0.1\"),\n asinh: pureAndGlobal(\"math/asinh\", [\"es6.math.asinh\"], \"7.0.1\"),\n atanh: pureAndGlobal(\"math/atanh\", [\"es6.math.atanh\"], \"7.0.1\"),\n cbrt: pureAndGlobal(\"math/cbrt\", [\"es6.math.cbrt\"], \"7.0.1\"),\n clz32: pureAndGlobal(\"math/clz32\", [\"es6.math.clz32\"], \"7.0.1\"),\n cosh: pureAndGlobal(\"math/cosh\", [\"es6.math.cosh\"], \"7.0.1\"),\n expm1: pureAndGlobal(\"math/expm1\", [\"es6.math.expm1\"], \"7.0.1\"),\n fround: pureAndGlobal(\"math/fround\", [\"es6.math.fround\"], \"7.0.1\"),\n hypot: pureAndGlobal(\"math/hypot\", [\"es6.math.hypot\"], \"7.0.1\"),\n imul: pureAndGlobal(\"math/imul\", [\"es6.math.imul\"], \"7.0.1\"),\n log1p: pureAndGlobal(\"math/log1p\", [\"es6.math.log1p\"], \"7.0.1\"),\n log10: pureAndGlobal(\"math/log10\", [\"es6.math.log10\"], \"7.0.1\"),\n log2: pureAndGlobal(\"math/log2\", [\"es6.math.log2\"], \"7.0.1\"),\n sign: pureAndGlobal(\"math/sign\", [\"es6.math.sign\"], \"7.0.1\"),\n sinh: pureAndGlobal(\"math/sinh\", [\"es6.math.sinh\"], \"7.0.1\"),\n tanh: pureAndGlobal(\"math/tanh\", [\"es6.math.tanh\"], \"7.0.1\"),\n trunc: pureAndGlobal(\"math/trunc\", [\"es6.math.trunc\"], \"7.0.1\")\n },\n Number: {\n EPSILON: pureAndGlobal(\"number/epsilon\", [\"es6.number.epsilon\"]),\n MIN_SAFE_INTEGER: pureAndGlobal(\"number/min-safe-integer\", [\"es6.number.min-safe-integer\"]),\n MAX_SAFE_INTEGER: pureAndGlobal(\"number/max-safe-integer\", [\"es6.number.max-safe-integer\"]),\n isFinite: pureAndGlobal(\"number/is-finite\", [\"es6.number.is-finite\"]),\n isInteger: pureAndGlobal(\"number/is-integer\", [\"es6.number.is-integer\"]),\n isSafeInteger: pureAndGlobal(\"number/is-safe-integer\", [\"es6.number.is-safe-integer\"]),\n isNaN: pureAndGlobal(\"number/is-nan\", [\"es6.number.is-nan\"]),\n parseFloat: pureAndGlobal(\"number/parse-float\", [\"es6.number.parse-float\"]),\n parseInt: pureAndGlobal(\"number/parse-int\", [\"es6.number.parse-int\"])\n },\n Object: {\n assign: pureAndGlobal(\"object/assign\", [\"es6.object.assign\"]),\n create: pureAndGlobal(\"object/create\", [\"es6.object.create\"]),\n defineProperties: pureAndGlobal(\"object/define-properties\", [\"es6.object.define-properties\"]),\n defineProperty: pureAndGlobal(\"object/define-property\", [\"es6.object.define-property\"]),\n entries: pureAndGlobal(\"object/entries\", [\"es7.object.entries\"]),\n freeze: pureAndGlobal(\"object/freeze\", [\"es6.object.freeze\"]),\n getOwnPropertyDescriptor: pureAndGlobal(\"object/get-own-property-descriptor\", [\"es6.object.get-own-property-descriptor\"]),\n getOwnPropertyDescriptors: pureAndGlobal(\"object/get-own-property-descriptors\", [\"es7.object.get-own-property-descriptors\"]),\n getOwnPropertyNames: pureAndGlobal(\"object/get-own-property-names\", [\"es6.object.get-own-property-names\"]),\n getOwnPropertySymbols: pureAndGlobal(\"object/get-own-property-symbols\", [\"es6.symbol\"]),\n getPrototypeOf: pureAndGlobal(\"object/get-prototype-of\", [\"es6.object.get-prototype-of\"]),\n is: pureAndGlobal(\"object/is\", [\"es6.object.is\"]),\n isExtensible: pureAndGlobal(\"object/is-extensible\", [\"es6.object.is-extensible\"]),\n isFrozen: pureAndGlobal(\"object/is-frozen\", [\"es6.object.is-frozen\"]),\n isSealed: pureAndGlobal(\"object/is-sealed\", [\"es6.object.is-sealed\"]),\n keys: pureAndGlobal(\"object/keys\", [\"es6.object.keys\"]),\n preventExtensions: pureAndGlobal(\"object/prevent-extensions\", [\"es6.object.prevent-extensions\"]),\n seal: pureAndGlobal(\"object/seal\", [\"es6.object.seal\"]),\n setPrototypeOf: pureAndGlobal(\"object/set-prototype-of\", [\"es6.object.set-prototype-of\"]),\n values: pureAndGlobal(\"object/values\", [\"es7.object.values\"])\n },\n Promise: {\n all: globalOnly(CommonIterators),\n race: globalOnly(CommonIterators)\n },\n Reflect: {\n apply: pureAndGlobal(\"reflect/apply\", [\"es6.reflect.apply\"]),\n construct: pureAndGlobal(\"reflect/construct\", [\"es6.reflect.construct\"]),\n defineProperty: pureAndGlobal(\"reflect/define-property\", [\"es6.reflect.define-property\"]),\n deleteProperty: pureAndGlobal(\"reflect/delete-property\", [\"es6.reflect.delete-property\"]),\n get: pureAndGlobal(\"reflect/get\", [\"es6.reflect.get\"]),\n getOwnPropertyDescriptor: pureAndGlobal(\"reflect/get-own-property-descriptor\", [\"es6.reflect.get-own-property-descriptor\"]),\n getPrototypeOf: pureAndGlobal(\"reflect/get-prototype-of\", [\"es6.reflect.get-prototype-of\"]),\n has: pureAndGlobal(\"reflect/has\", [\"es6.reflect.has\"]),\n isExtensible: pureAndGlobal(\"reflect/is-extensible\", [\"es6.reflect.is-extensible\"]),\n ownKeys: pureAndGlobal(\"reflect/own-keys\", [\"es6.reflect.own-keys\"]),\n preventExtensions: pureAndGlobal(\"reflect/prevent-extensions\", [\"es6.reflect.prevent-extensions\"]),\n set: pureAndGlobal(\"reflect/set\", [\"es6.reflect.set\"]),\n setPrototypeOf: pureAndGlobal(\"reflect/set-prototype-of\", [\"es6.reflect.set-prototype-of\"])\n },\n String: {\n at: pureOnly(\"string/at\", \"es7.string.at\"),\n fromCodePoint: pureAndGlobal(\"string/from-code-point\", [\"es6.string.from-code-point\"]),\n raw: pureAndGlobal(\"string/raw\", [\"es6.string.raw\"])\n },\n Symbol: {\n // FIXME: Pure disabled to work around zloirock/core-js#262.\n asyncIterator: globalOnly([\"es6.symbol\", \"es7.symbol.async-iterator\"]),\n for: pureOnly(\"symbol/for\", \"es6.symbol\"),\n hasInstance: pureOnly(\"symbol/has-instance\", \"es6.symbol\"),\n isConcatSpreadable: pureOnly(\"symbol/is-concat-spreadable\", \"es6.symbol\"),\n iterator: define(\"es6.symbol\", \"symbol/iterator\", CommonIterators),\n keyFor: pureOnly(\"symbol/key-for\", \"es6.symbol\"),\n match: pureAndGlobal(\"symbol/match\", [\"es6.regexp.match\"]),\n replace: pureOnly(\"symbol/replace\", \"es6.symbol\"),\n search: pureOnly(\"symbol/search\", \"es6.symbol\"),\n species: pureOnly(\"symbol/species\", \"es6.symbol\"),\n split: pureOnly(\"symbol/split\", \"es6.symbol\"),\n toPrimitive: pureOnly(\"symbol/to-primitive\", \"es6.symbol\"),\n toStringTag: pureOnly(\"symbol/to-string-tag\", \"es6.symbol\"),\n unscopables: pureOnly(\"symbol/unscopables\", \"es6.symbol\")\n }\n};\nexports.StaticProperties = StaticProperties;","\"use strict\";\n\nexports.__esModule = true;\nexports.default = _default;\nfunction _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nconst webPolyfills = {\n \"web.timers\": {},\n \"web.immediate\": {},\n \"web.dom.iterable\": {}\n};\nconst purePolyfills = {\n \"es6.parse-float\": {},\n \"es6.parse-int\": {},\n \"es7.string.at\": {}\n};\nfunction _default(targets, method, polyfills) {\n const targetNames = Object.keys(targets);\n const isAnyTarget = !targetNames.length;\n const isWebTarget = targetNames.some(name => name !== \"node\");\n return _extends({}, polyfills, method === \"usage-pure\" ? purePolyfills : null, isAnyTarget || isWebTarget ? webPolyfills : null);\n}","exports = module.exports = SemVer\n\nvar debug\n/* istanbul ignore next */\nif (typeof process === 'object' &&\n process.env &&\n process.env.NODE_DEBUG &&\n /\\bsemver\\b/i.test(process.env.NODE_DEBUG)) {\n debug = function () {\n var args = Array.prototype.slice.call(arguments, 0)\n args.unshift('SEMVER')\n console.log.apply(console, args)\n }\n} else {\n debug = function () {}\n}\n\n// Note: this is the semver.org version of the spec that it implements\n// Not necessarily the package version of this code.\nexports.SEMVER_SPEC_VERSION = '2.0.0'\n\nvar MAX_LENGTH = 256\nvar MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER ||\n /* istanbul ignore next */ 9007199254740991\n\n// Max safe segment length for coercion.\nvar MAX_SAFE_COMPONENT_LENGTH = 16\n\nvar MAX_SAFE_BUILD_LENGTH = MAX_LENGTH - 6\n\n// The actual regexps go on exports.re\nvar re = exports.re = []\nvar safeRe = exports.safeRe = []\nvar src = exports.src = []\nvar t = exports.tokens = {}\nvar R = 0\n\nfunction tok (n) {\n t[n] = R++\n}\n\nvar LETTERDASHNUMBER = '[a-zA-Z0-9-]'\n\n// Replace some greedy regex tokens to prevent regex dos issues. These regex are\n// used internally via the safeRe object since all inputs in this library get\n// normalized first to trim and collapse all extra whitespace. The original\n// regexes are exported for userland consumption and lower level usage. A\n// future breaking change could export the safer regex only with a note that\n// all input should have extra whitespace removed.\nvar safeRegexReplacements = [\n ['\\\\s', 1],\n ['\\\\d', MAX_LENGTH],\n [LETTERDASHNUMBER, MAX_SAFE_BUILD_LENGTH],\n]\n\nfunction makeSafeRe (value) {\n for (var i = 0; i < safeRegexReplacements.length; i++) {\n var token = safeRegexReplacements[i][0]\n var max = safeRegexReplacements[i][1]\n value = value\n .split(token + '*').join(token + '{0,' + max + '}')\n .split(token + '+').join(token + '{1,' + max + '}')\n }\n return value\n}\n\n// The following Regular Expressions can be used for tokenizing,\n// validating, and parsing SemVer version strings.\n\n// ## Numeric Identifier\n// A single `0`, or a non-zero digit followed by zero or more digits.\n\ntok('NUMERICIDENTIFIER')\nsrc[t.NUMERICIDENTIFIER] = '0|[1-9]\\\\d*'\ntok('NUMERICIDENTIFIERLOOSE')\nsrc[t.NUMERICIDENTIFIERLOOSE] = '\\\\d+'\n\n// ## Non-numeric Identifier\n// Zero or more digits, followed by a letter or hyphen, and then zero or\n// more letters, digits, or hyphens.\n\ntok('NONNUMERICIDENTIFIER')\nsrc[t.NONNUMERICIDENTIFIER] = '\\\\d*[a-zA-Z-]' + LETTERDASHNUMBER + '*'\n\n// ## Main Version\n// Three dot-separated numeric identifiers.\n\ntok('MAINVERSION')\nsrc[t.MAINVERSION] = '(' + src[t.NUMERICIDENTIFIER] + ')\\\\.' +\n '(' + src[t.NUMERICIDENTIFIER] + ')\\\\.' +\n '(' + src[t.NUMERICIDENTIFIER] + ')'\n\ntok('MAINVERSIONLOOSE')\nsrc[t.MAINVERSIONLOOSE] = '(' + src[t.NUMERICIDENTIFIERLOOSE] + ')\\\\.' +\n '(' + src[t.NUMERICIDENTIFIERLOOSE] + ')\\\\.' +\n '(' + src[t.NUMERICIDENTIFIERLOOSE] + ')'\n\n// ## Pre-release Version Identifier\n// A numeric identifier, or a non-numeric identifier.\n\ntok('PRERELEASEIDENTIFIER')\nsrc[t.PRERELEASEIDENTIFIER] = '(?:' + src[t.NUMERICIDENTIFIER] +\n '|' + src[t.NONNUMERICIDENTIFIER] + ')'\n\ntok('PRERELEASEIDENTIFIERLOOSE')\nsrc[t.PRERELEASEIDENTIFIERLOOSE] = '(?:' + src[t.NUMERICIDENTIFIERLOOSE] +\n '|' + src[t.NONNUMERICIDENTIFIER] + ')'\n\n// ## Pre-release Version\n// Hyphen, followed by one or more dot-separated pre-release version\n// identifiers.\n\ntok('PRERELEASE')\nsrc[t.PRERELEASE] = '(?:-(' + src[t.PRERELEASEIDENTIFIER] +\n '(?:\\\\.' + src[t.PRERELEASEIDENTIFIER] + ')*))'\n\ntok('PRERELEASELOOSE')\nsrc[t.PRERELEASELOOSE] = '(?:-?(' + src[t.PRERELEASEIDENTIFIERLOOSE] +\n '(?:\\\\.' + src[t.PRERELEASEIDENTIFIERLOOSE] + ')*))'\n\n// ## Build Metadata Identifier\n// Any combination of digits, letters, or hyphens.\n\ntok('BUILDIDENTIFIER')\nsrc[t.BUILDIDENTIFIER] = LETTERDASHNUMBER + '+'\n\n// ## Build Metadata\n// Plus sign, followed by one or more period-separated build metadata\n// identifiers.\n\ntok('BUILD')\nsrc[t.BUILD] = '(?:\\\\+(' + src[t.BUILDIDENTIFIER] +\n '(?:\\\\.' + src[t.BUILDIDENTIFIER] + ')*))'\n\n// ## Full Version String\n// A main version, followed optionally by a pre-release version and\n// build metadata.\n\n// Note that the only major, minor, patch, and pre-release sections of\n// the version string are capturing groups. The build metadata is not a\n// capturing group, because it should not ever be used in version\n// comparison.\n\ntok('FULL')\ntok('FULLPLAIN')\nsrc[t.FULLPLAIN] = 'v?' + src[t.MAINVERSION] +\n src[t.PRERELEASE] + '?' +\n src[t.BUILD] + '?'\n\nsrc[t.FULL] = '^' + src[t.FULLPLAIN] + '$'\n\n// like full, but allows v1.2.3 and =1.2.3, which people do sometimes.\n// also, 1.0.0alpha1 (prerelease without the hyphen) which is pretty\n// common in the npm registry.\ntok('LOOSEPLAIN')\nsrc[t.LOOSEPLAIN] = '[v=\\\\s]*' + src[t.MAINVERSIONLOOSE] +\n src[t.PRERELEASELOOSE] + '?' +\n src[t.BUILD] + '?'\n\ntok('LOOSE')\nsrc[t.LOOSE] = '^' + src[t.LOOSEPLAIN] + '$'\n\ntok('GTLT')\nsrc[t.GTLT] = '((?:<|>)?=?)'\n\n// Something like \"2.*\" or \"1.2.x\".\n// Note that \"x.x\" is a valid xRange identifer, meaning \"any version\"\n// Only the first item is strictly required.\ntok('XRANGEIDENTIFIERLOOSE')\nsrc[t.XRANGEIDENTIFIERLOOSE] = src[t.NUMERICIDENTIFIERLOOSE] + '|x|X|\\\\*'\ntok('XRANGEIDENTIFIER')\nsrc[t.XRANGEIDENTIFIER] = src[t.NUMERICIDENTIFIER] + '|x|X|\\\\*'\n\ntok('XRANGEPLAIN')\nsrc[t.XRANGEPLAIN] = '[v=\\\\s]*(' + src[t.XRANGEIDENTIFIER] + ')' +\n '(?:\\\\.(' + src[t.XRANGEIDENTIFIER] + ')' +\n '(?:\\\\.(' + src[t.XRANGEIDENTIFIER] + ')' +\n '(?:' + src[t.PRERELEASE] + ')?' +\n src[t.BUILD] + '?' +\n ')?)?'\n\ntok('XRANGEPLAINLOOSE')\nsrc[t.XRANGEPLAINLOOSE] = '[v=\\\\s]*(' + src[t.XRANGEIDENTIFIERLOOSE] + ')' +\n '(?:\\\\.(' + src[t.XRANGEIDENTIFIERLOOSE] + ')' +\n '(?:\\\\.(' + src[t.XRANGEIDENTIFIERLOOSE] + ')' +\n '(?:' + src[t.PRERELEASELOOSE] + ')?' +\n src[t.BUILD] + '?' +\n ')?)?'\n\ntok('XRANGE')\nsrc[t.XRANGE] = '^' + src[t.GTLT] + '\\\\s*' + src[t.XRANGEPLAIN] + '$'\ntok('XRANGELOOSE')\nsrc[t.XRANGELOOSE] = '^' + src[t.GTLT] + '\\\\s*' + src[t.XRANGEPLAINLOOSE] + '$'\n\n// Coercion.\n// Extract anything that could conceivably be a part of a valid semver\ntok('COERCE')\nsrc[t.COERCE] = '(^|[^\\\\d])' +\n '(\\\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '})' +\n '(?:\\\\.(\\\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '}))?' +\n '(?:\\\\.(\\\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '}))?' +\n '(?:$|[^\\\\d])'\ntok('COERCERTL')\nre[t.COERCERTL] = new RegExp(src[t.COERCE], 'g')\nsafeRe[t.COERCERTL] = new RegExp(makeSafeRe(src[t.COERCE]), 'g')\n\n// Tilde ranges.\n// Meaning is \"reasonably at or greater than\"\ntok('LONETILDE')\nsrc[t.LONETILDE] = '(?:~>?)'\n\ntok('TILDETRIM')\nsrc[t.TILDETRIM] = '(\\\\s*)' + src[t.LONETILDE] + '\\\\s+'\nre[t.TILDETRIM] = new RegExp(src[t.TILDETRIM], 'g')\nsafeRe[t.TILDETRIM] = new RegExp(makeSafeRe(src[t.TILDETRIM]), 'g')\nvar tildeTrimReplace = '$1~'\n\ntok('TILDE')\nsrc[t.TILDE] = '^' + src[t.LONETILDE] + src[t.XRANGEPLAIN] + '$'\ntok('TILDELOOSE')\nsrc[t.TILDELOOSE] = '^' + src[t.LONETILDE] + src[t.XRANGEPLAINLOOSE] + '$'\n\n// Caret ranges.\n// Meaning is \"at least and backwards compatible with\"\ntok('LONECARET')\nsrc[t.LONECARET] = '(?:\\\\^)'\n\ntok('CARETTRIM')\nsrc[t.CARETTRIM] = '(\\\\s*)' + src[t.LONECARET] + '\\\\s+'\nre[t.CARETTRIM] = new RegExp(src[t.CARETTRIM], 'g')\nsafeRe[t.CARETTRIM] = new RegExp(makeSafeRe(src[t.CARETTRIM]), 'g')\nvar caretTrimReplace = '$1^'\n\ntok('CARET')\nsrc[t.CARET] = '^' + src[t.LONECARET] + src[t.XRANGEPLAIN] + '$'\ntok('CARETLOOSE')\nsrc[t.CARETLOOSE] = '^' + src[t.LONECARET] + src[t.XRANGEPLAINLOOSE] + '$'\n\n// A simple gt/lt/eq thing, or just \"\" to indicate \"any version\"\ntok('COMPARATORLOOSE')\nsrc[t.COMPARATORLOOSE] = '^' + src[t.GTLT] + '\\\\s*(' + src[t.LOOSEPLAIN] + ')$|^$'\ntok('COMPARATOR')\nsrc[t.COMPARATOR] = '^' + src[t.GTLT] + '\\\\s*(' + src[t.FULLPLAIN] + ')$|^$'\n\n// An expression to strip any whitespace between the gtlt and the thing\n// it modifies, so that `> 1.2.3` ==> `>1.2.3`\ntok('COMPARATORTRIM')\nsrc[t.COMPARATORTRIM] = '(\\\\s*)' + src[t.GTLT] +\n '\\\\s*(' + src[t.LOOSEPLAIN] + '|' + src[t.XRANGEPLAIN] + ')'\n\n// this one has to use the /g flag\nre[t.COMPARATORTRIM] = new RegExp(src[t.COMPARATORTRIM], 'g')\nsafeRe[t.COMPARATORTRIM] = new RegExp(makeSafeRe(src[t.COMPARATORTRIM]), 'g')\nvar comparatorTrimReplace = '$1$2$3'\n\n// Something like `1.2.3 - 1.2.4`\n// Note that these all use the loose form, because they'll be\n// checked against either the strict or loose comparator form\n// later.\ntok('HYPHENRANGE')\nsrc[t.HYPHENRANGE] = '^\\\\s*(' + src[t.XRANGEPLAIN] + ')' +\n '\\\\s+-\\\\s+' +\n '(' + src[t.XRANGEPLAIN] + ')' +\n '\\\\s*$'\n\ntok('HYPHENRANGELOOSE')\nsrc[t.HYPHENRANGELOOSE] = '^\\\\s*(' + src[t.XRANGEPLAINLOOSE] + ')' +\n '\\\\s+-\\\\s+' +\n '(' + src[t.XRANGEPLAINLOOSE] + ')' +\n '\\\\s*$'\n\n// Star ranges basically just allow anything at all.\ntok('STAR')\nsrc[t.STAR] = '(<|>)?=?\\\\s*\\\\*'\n\n// Compile to actual regexp objects.\n// All are flag-free, unless they were created above with a flag.\nfor (var i = 0; i < R; i++) {\n debug(i, src[i])\n if (!re[i]) {\n re[i] = new RegExp(src[i])\n\n // Replace all greedy whitespace to prevent regex dos issues. These regex are\n // used internally via the safeRe object since all inputs in this library get\n // normalized first to trim and collapse all extra whitespace. The original\n // regexes are exported for userland consumption and lower level usage. A\n // future breaking change could export the safer regex only with a note that\n // all input should have extra whitespace removed.\n safeRe[i] = new RegExp(makeSafeRe(src[i]))\n }\n}\n\nexports.parse = parse\nfunction parse (version, options) {\n if (!options || typeof options !== 'object') {\n options = {\n loose: !!options,\n includePrerelease: false\n }\n }\n\n if (version instanceof SemVer) {\n return version\n }\n\n if (typeof version !== 'string') {\n return null\n }\n\n if (version.length > MAX_LENGTH) {\n return null\n }\n\n var r = options.loose ? safeRe[t.LOOSE] : safeRe[t.FULL]\n if (!r.test(version)) {\n return null\n }\n\n try {\n return new SemVer(version, options)\n } catch (er) {\n return null\n }\n}\n\nexports.valid = valid\nfunction valid (version, options) {\n var v = parse(version, options)\n return v ? v.version : null\n}\n\nexports.clean = clean\nfunction clean (version, options) {\n var s = parse(version.trim().replace(/^[=v]+/, ''), options)\n return s ? s.version : null\n}\n\nexports.SemVer = SemVer\n\nfunction SemVer (version, options) {\n if (!options || typeof options !== 'object') {\n options = {\n loose: !!options,\n includePrerelease: false\n }\n }\n if (version instanceof SemVer) {\n if (version.loose === options.loose) {\n return version\n } else {\n version = version.version\n }\n } else if (typeof version !== 'string') {\n throw new TypeError('Invalid Version: ' + version)\n }\n\n if (version.length > MAX_LENGTH) {\n throw new TypeError('version is longer than ' + MAX_LENGTH + ' characters')\n }\n\n if (!(this instanceof SemVer)) {\n return new SemVer(version, options)\n }\n\n debug('SemVer', version, options)\n this.options = options\n this.loose = !!options.loose\n\n var m = version.trim().match(options.loose ? safeRe[t.LOOSE] : safeRe[t.FULL])\n\n if (!m) {\n throw new TypeError('Invalid Version: ' + version)\n }\n\n this.raw = version\n\n // these are actually numbers\n this.major = +m[1]\n this.minor = +m[2]\n this.patch = +m[3]\n\n if (this.major > MAX_SAFE_INTEGER || this.major < 0) {\n throw new TypeError('Invalid major version')\n }\n\n if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) {\n throw new TypeError('Invalid minor version')\n }\n\n if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) {\n throw new TypeError('Invalid patch version')\n }\n\n // numberify any prerelease numeric ids\n if (!m[4]) {\n this.prerelease = []\n } else {\n this.prerelease = m[4].split('.').map(function (id) {\n if (/^[0-9]+$/.test(id)) {\n var num = +id\n if (num >= 0 && num < MAX_SAFE_INTEGER) {\n return num\n }\n }\n return id\n })\n }\n\n this.build = m[5] ? m[5].split('.') : []\n this.format()\n}\n\nSemVer.prototype.format = function () {\n this.version = this.major + '.' + this.minor + '.' + this.patch\n if (this.prerelease.length) {\n this.version += '-' + this.prerelease.join('.')\n }\n return this.version\n}\n\nSemVer.prototype.toString = function () {\n return this.version\n}\n\nSemVer.prototype.compare = function (other) {\n debug('SemVer.compare', this.version, this.options, other)\n if (!(other instanceof SemVer)) {\n other = new SemVer(other, this.options)\n }\n\n return this.compareMain(other) || this.comparePre(other)\n}\n\nSemVer.prototype.compareMain = function (other) {\n if (!(other instanceof SemVer)) {\n other = new SemVer(other, this.options)\n }\n\n return compareIdentifiers(this.major, other.major) ||\n compareIdentifiers(this.minor, other.minor) ||\n compareIdentifiers(this.patch, other.patch)\n}\n\nSemVer.prototype.comparePre = function (other) {\n if (!(other instanceof SemVer)) {\n other = new SemVer(other, this.options)\n }\n\n // NOT having a prerelease is > having one\n if (this.prerelease.length && !other.prerelease.length) {\n return -1\n } else if (!this.prerelease.length && other.prerelease.length) {\n return 1\n } else if (!this.prerelease.length && !other.prerelease.length) {\n return 0\n }\n\n var i = 0\n do {\n var a = this.prerelease[i]\n var b = other.prerelease[i]\n debug('prerelease compare', i, a, b)\n if (a === undefined && b === undefined) {\n return 0\n } else if (b === undefined) {\n return 1\n } else if (a === undefined) {\n return -1\n } else if (a === b) {\n continue\n } else {\n return compareIdentifiers(a, b)\n }\n } while (++i)\n}\n\nSemVer.prototype.compareBuild = function (other) {\n if (!(other instanceof SemVer)) {\n other = new SemVer(other, this.options)\n }\n\n var i = 0\n do {\n var a = this.build[i]\n var b = other.build[i]\n debug('prerelease compare', i, a, b)\n if (a === undefined && b === undefined) {\n return 0\n } else if (b === undefined) {\n return 1\n } else if (a === undefined) {\n return -1\n } else if (a === b) {\n continue\n } else {\n return compareIdentifiers(a, b)\n }\n } while (++i)\n}\n\n// preminor will bump the version up to the next minor release, and immediately\n// down to pre-release. premajor and prepatch work the same way.\nSemVer.prototype.inc = function (release, identifier) {\n switch (release) {\n case 'premajor':\n this.prerelease.length = 0\n this.patch = 0\n this.minor = 0\n this.major++\n this.inc('pre', identifier)\n break\n case 'preminor':\n this.prerelease.length = 0\n this.patch = 0\n this.minor++\n this.inc('pre', identifier)\n break\n case 'prepatch':\n // If this is already a prerelease, it will bump to the next version\n // drop any prereleases that might already exist, since they are not\n // relevant at this point.\n this.prerelease.length = 0\n this.inc('patch', identifier)\n this.inc('pre', identifier)\n break\n // If the input is a non-prerelease version, this acts the same as\n // prepatch.\n case 'prerelease':\n if (this.prerelease.length === 0) {\n this.inc('patch', identifier)\n }\n this.inc('pre', identifier)\n break\n\n case 'major':\n // If this is a pre-major version, bump up to the same major version.\n // Otherwise increment major.\n // 1.0.0-5 bumps to 1.0.0\n // 1.1.0 bumps to 2.0.0\n if (this.minor !== 0 ||\n this.patch !== 0 ||\n this.prerelease.length === 0) {\n this.major++\n }\n this.minor = 0\n this.patch = 0\n this.prerelease = []\n break\n case 'minor':\n // If this is a pre-minor version, bump up to the same minor version.\n // Otherwise increment minor.\n // 1.2.0-5 bumps to 1.2.0\n // 1.2.1 bumps to 1.3.0\n if (this.patch !== 0 || this.prerelease.length === 0) {\n this.minor++\n }\n this.patch = 0\n this.prerelease = []\n break\n case 'patch':\n // If this is not a pre-release version, it will increment the patch.\n // If it is a pre-release it will bump up to the same patch version.\n // 1.2.0-5 patches to 1.2.0\n // 1.2.0 patches to 1.2.1\n if (this.prerelease.length === 0) {\n this.patch++\n }\n this.prerelease = []\n break\n // This probably shouldn't be used publicly.\n // 1.0.0 \"pre\" would become 1.0.0-0 which is the wrong direction.\n case 'pre':\n if (this.prerelease.length === 0) {\n this.prerelease = [0]\n } else {\n var i = this.prerelease.length\n while (--i >= 0) {\n if (typeof this.prerelease[i] === 'number') {\n this.prerelease[i]++\n i = -2\n }\n }\n if (i === -1) {\n // didn't increment anything\n this.prerelease.push(0)\n }\n }\n if (identifier) {\n // 1.2.0-beta.1 bumps to 1.2.0-beta.2,\n // 1.2.0-beta.fooblz or 1.2.0-beta bumps to 1.2.0-beta.0\n if (this.prerelease[0] === identifier) {\n if (isNaN(this.prerelease[1])) {\n this.prerelease = [identifier, 0]\n }\n } else {\n this.prerelease = [identifier, 0]\n }\n }\n break\n\n default:\n throw new Error('invalid increment argument: ' + release)\n }\n this.format()\n this.raw = this.version\n return this\n}\n\nexports.inc = inc\nfunction inc (version, release, loose, identifier) {\n if (typeof (loose) === 'string') {\n identifier = loose\n loose = undefined\n }\n\n try {\n return new SemVer(version, loose).inc(release, identifier).version\n } catch (er) {\n return null\n }\n}\n\nexports.diff = diff\nfunction diff (version1, version2) {\n if (eq(version1, version2)) {\n return null\n } else {\n var v1 = parse(version1)\n var v2 = parse(version2)\n var prefix = ''\n if (v1.prerelease.length || v2.prerelease.length) {\n prefix = 'pre'\n var defaultResult = 'prerelease'\n }\n for (var key in v1) {\n if (key === 'major' || key === 'minor' || key === 'patch') {\n if (v1[key] !== v2[key]) {\n return prefix + key\n }\n }\n }\n return defaultResult // may be undefined\n }\n}\n\nexports.compareIdentifiers = compareIdentifiers\n\nvar numeric = /^[0-9]+$/\nfunction compareIdentifiers (a, b) {\n var anum = numeric.test(a)\n var bnum = numeric.test(b)\n\n if (anum && bnum) {\n a = +a\n b = +b\n }\n\n return a === b ? 0\n : (anum && !bnum) ? -1\n : (bnum && !anum) ? 1\n : a < b ? -1\n : 1\n}\n\nexports.rcompareIdentifiers = rcompareIdentifiers\nfunction rcompareIdentifiers (a, b) {\n return compareIdentifiers(b, a)\n}\n\nexports.major = major\nfunction major (a, loose) {\n return new SemVer(a, loose).major\n}\n\nexports.minor = minor\nfunction minor (a, loose) {\n return new SemVer(a, loose).minor\n}\n\nexports.patch = patch\nfunction patch (a, loose) {\n return new SemVer(a, loose).patch\n}\n\nexports.compare = compare\nfunction compare (a, b, loose) {\n return new SemVer(a, loose).compare(new SemVer(b, loose))\n}\n\nexports.compareLoose = compareLoose\nfunction compareLoose (a, b) {\n return compare(a, b, true)\n}\n\nexports.compareBuild = compareBuild\nfunction compareBuild (a, b, loose) {\n var versionA = new SemVer(a, loose)\n var versionB = new SemVer(b, loose)\n return versionA.compare(versionB) || versionA.compareBuild(versionB)\n}\n\nexports.rcompare = rcompare\nfunction rcompare (a, b, loose) {\n return compare(b, a, loose)\n}\n\nexports.sort = sort\nfunction sort (list, loose) {\n return list.sort(function (a, b) {\n return exports.compareBuild(a, b, loose)\n })\n}\n\nexports.rsort = rsort\nfunction rsort (list, loose) {\n return list.sort(function (a, b) {\n return exports.compareBuild(b, a, loose)\n })\n}\n\nexports.gt = gt\nfunction gt (a, b, loose) {\n return compare(a, b, loose) > 0\n}\n\nexports.lt = lt\nfunction lt (a, b, loose) {\n return compare(a, b, loose) < 0\n}\n\nexports.eq = eq\nfunction eq (a, b, loose) {\n return compare(a, b, loose) === 0\n}\n\nexports.neq = neq\nfunction neq (a, b, loose) {\n return compare(a, b, loose) !== 0\n}\n\nexports.gte = gte\nfunction gte (a, b, loose) {\n return compare(a, b, loose) >= 0\n}\n\nexports.lte = lte\nfunction lte (a, b, loose) {\n return compare(a, b, loose) <= 0\n}\n\nexports.cmp = cmp\nfunction cmp (a, op, b, loose) {\n switch (op) {\n case '===':\n if (typeof a === 'object')\n a = a.version\n if (typeof b === 'object')\n b = b.version\n return a === b\n\n case '!==':\n if (typeof a === 'object')\n a = a.version\n if (typeof b === 'object')\n b = b.version\n return a !== b\n\n case '':\n case '=':\n case '==':\n return eq(a, b, loose)\n\n case '!=':\n return neq(a, b, loose)\n\n case '>':\n return gt(a, b, loose)\n\n case '>=':\n return gte(a, b, loose)\n\n case '<':\n return lt(a, b, loose)\n\n case '<=':\n return lte(a, b, loose)\n\n default:\n throw new TypeError('Invalid operator: ' + op)\n }\n}\n\nexports.Comparator = Comparator\nfunction Comparator (comp, options) {\n if (!options || typeof options !== 'object') {\n options = {\n loose: !!options,\n includePrerelease: false\n }\n }\n\n if (comp instanceof Comparator) {\n if (comp.loose === !!options.loose) {\n return comp\n } else {\n comp = comp.value\n }\n }\n\n if (!(this instanceof Comparator)) {\n return new Comparator(comp, options)\n }\n\n comp = comp.trim().split(/\\s+/).join(' ')\n debug('comparator', comp, options)\n this.options = options\n this.loose = !!options.loose\n this.parse(comp)\n\n if (this.semver === ANY) {\n this.value = ''\n } else {\n this.value = this.operator + this.semver.version\n }\n\n debug('comp', this)\n}\n\nvar ANY = {}\nComparator.prototype.parse = function (comp) {\n var r = this.options.loose ? safeRe[t.COMPARATORLOOSE] : safeRe[t.COMPARATOR]\n var m = comp.match(r)\n\n if (!m) {\n throw new TypeError('Invalid comparator: ' + comp)\n }\n\n this.operator = m[1] !== undefined ? m[1] : ''\n if (this.operator === '=') {\n this.operator = ''\n }\n\n // if it literally is just '>' or '' then allow anything.\n if (!m[2]) {\n this.semver = ANY\n } else {\n this.semver = new SemVer(m[2], this.options.loose)\n }\n}\n\nComparator.prototype.toString = function () {\n return this.value\n}\n\nComparator.prototype.test = function (version) {\n debug('Comparator.test', version, this.options.loose)\n\n if (this.semver === ANY || version === ANY) {\n return true\n }\n\n if (typeof version === 'string') {\n try {\n version = new SemVer(version, this.options)\n } catch (er) {\n return false\n }\n }\n\n return cmp(version, this.operator, this.semver, this.options)\n}\n\nComparator.prototype.intersects = function (comp, options) {\n if (!(comp instanceof Comparator)) {\n throw new TypeError('a Comparator is required')\n }\n\n if (!options || typeof options !== 'object') {\n options = {\n loose: !!options,\n includePrerelease: false\n }\n }\n\n var rangeTmp\n\n if (this.operator === '') {\n if (this.value === '') {\n return true\n }\n rangeTmp = new Range(comp.value, options)\n return satisfies(this.value, rangeTmp, options)\n } else if (comp.operator === '') {\n if (comp.value === '') {\n return true\n }\n rangeTmp = new Range(this.value, options)\n return satisfies(comp.semver, rangeTmp, options)\n }\n\n var sameDirectionIncreasing =\n (this.operator === '>=' || this.operator === '>') &&\n (comp.operator === '>=' || comp.operator === '>')\n var sameDirectionDecreasing =\n (this.operator === '<=' || this.operator === '<') &&\n (comp.operator === '<=' || comp.operator === '<')\n var sameSemVer = this.semver.version === comp.semver.version\n var differentDirectionsInclusive =\n (this.operator === '>=' || this.operator === '<=') &&\n (comp.operator === '>=' || comp.operator === '<=')\n var oppositeDirectionsLessThan =\n cmp(this.semver, '<', comp.semver, options) &&\n ((this.operator === '>=' || this.operator === '>') &&\n (comp.operator === '<=' || comp.operator === '<'))\n var oppositeDirectionsGreaterThan =\n cmp(this.semver, '>', comp.semver, options) &&\n ((this.operator === '<=' || this.operator === '<') &&\n (comp.operator === '>=' || comp.operator === '>'))\n\n return sameDirectionIncreasing || sameDirectionDecreasing ||\n (sameSemVer && differentDirectionsInclusive) ||\n oppositeDirectionsLessThan || oppositeDirectionsGreaterThan\n}\n\nexports.Range = Range\nfunction Range (range, options) {\n if (!options || typeof options !== 'object') {\n options = {\n loose: !!options,\n includePrerelease: false\n }\n }\n\n if (range instanceof Range) {\n if (range.loose === !!options.loose &&\n range.includePrerelease === !!options.includePrerelease) {\n return range\n } else {\n return new Range(range.raw, options)\n }\n }\n\n if (range instanceof Comparator) {\n return new Range(range.value, options)\n }\n\n if (!(this instanceof Range)) {\n return new Range(range, options)\n }\n\n this.options = options\n this.loose = !!options.loose\n this.includePrerelease = !!options.includePrerelease\n\n // First reduce all whitespace as much as possible so we do not have to rely\n // on potentially slow regexes like \\s*. This is then stored and used for\n // future error messages as well.\n this.raw = range\n .trim()\n .split(/\\s+/)\n .join(' ')\n\n // First, split based on boolean or ||\n this.set = this.raw.split('||').map(function (range) {\n return this.parseRange(range.trim())\n }, this).filter(function (c) {\n // throw out any that are not relevant for whatever reason\n return c.length\n })\n\n if (!this.set.length) {\n throw new TypeError('Invalid SemVer Range: ' + this.raw)\n }\n\n this.format()\n}\n\nRange.prototype.format = function () {\n this.range = this.set.map(function (comps) {\n return comps.join(' ').trim()\n }).join('||').trim()\n return this.range\n}\n\nRange.prototype.toString = function () {\n return this.range\n}\n\nRange.prototype.parseRange = function (range) {\n var loose = this.options.loose\n // `1.2.3 - 1.2.4` => `>=1.2.3 <=1.2.4`\n var hr = loose ? safeRe[t.HYPHENRANGELOOSE] : safeRe[t.HYPHENRANGE]\n range = range.replace(hr, hyphenReplace)\n debug('hyphen replace', range)\n // `> 1.2.3 < 1.2.5` => `>1.2.3 <1.2.5`\n range = range.replace(safeRe[t.COMPARATORTRIM], comparatorTrimReplace)\n debug('comparator trim', range, safeRe[t.COMPARATORTRIM])\n\n // `~ 1.2.3` => `~1.2.3`\n range = range.replace(safeRe[t.TILDETRIM], tildeTrimReplace)\n\n // `^ 1.2.3` => `^1.2.3`\n range = range.replace(safeRe[t.CARETTRIM], caretTrimReplace)\n\n // normalize spaces\n range = range.split(/\\s+/).join(' ')\n\n // At this point, the range is completely trimmed and\n // ready to be split into comparators.\n\n var compRe = loose ? safeRe[t.COMPARATORLOOSE] : safeRe[t.COMPARATOR]\n var set = range.split(' ').map(function (comp) {\n return parseComparator(comp, this.options)\n }, this).join(' ').split(/\\s+/)\n if (this.options.loose) {\n // in loose mode, throw out any that are not valid comparators\n set = set.filter(function (comp) {\n return !!comp.match(compRe)\n })\n }\n set = set.map(function (comp) {\n return new Comparator(comp, this.options)\n }, this)\n\n return set\n}\n\nRange.prototype.intersects = function (range, options) {\n if (!(range instanceof Range)) {\n throw new TypeError('a Range is required')\n }\n\n return this.set.some(function (thisComparators) {\n return (\n isSatisfiable(thisComparators, options) &&\n range.set.some(function (rangeComparators) {\n return (\n isSatisfiable(rangeComparators, options) &&\n thisComparators.every(function (thisComparator) {\n return rangeComparators.every(function (rangeComparator) {\n return thisComparator.intersects(rangeComparator, options)\n })\n })\n )\n })\n )\n })\n}\n\n// take a set of comparators and determine whether there\n// exists a version which can satisfy it\nfunction isSatisfiable (comparators, options) {\n var result = true\n var remainingComparators = comparators.slice()\n var testComparator = remainingComparators.pop()\n\n while (result && remainingComparators.length) {\n result = remainingComparators.every(function (otherComparator) {\n return testComparator.intersects(otherComparator, options)\n })\n\n testComparator = remainingComparators.pop()\n }\n\n return result\n}\n\n// Mostly just for testing and legacy API reasons\nexports.toComparators = toComparators\nfunction toComparators (range, options) {\n return new Range(range, options).set.map(function (comp) {\n return comp.map(function (c) {\n return c.value\n }).join(' ').trim().split(' ')\n })\n}\n\n// comprised of xranges, tildes, stars, and gtlt's at this point.\n// already replaced the hyphen ranges\n// turn into a set of JUST comparators.\nfunction parseComparator (comp, options) {\n debug('comp', comp, options)\n comp = replaceCarets(comp, options)\n debug('caret', comp)\n comp = replaceTildes(comp, options)\n debug('tildes', comp)\n comp = replaceXRanges(comp, options)\n debug('xrange', comp)\n comp = replaceStars(comp, options)\n debug('stars', comp)\n return comp\n}\n\nfunction isX (id) {\n return !id || id.toLowerCase() === 'x' || id === '*'\n}\n\n// ~, ~> --> * (any, kinda silly)\n// ~2, ~2.x, ~2.x.x, ~>2, ~>2.x ~>2.x.x --> >=2.0.0 <3.0.0\n// ~2.0, ~2.0.x, ~>2.0, ~>2.0.x --> >=2.0.0 <2.1.0\n// ~1.2, ~1.2.x, ~>1.2, ~>1.2.x --> >=1.2.0 <1.3.0\n// ~1.2.3, ~>1.2.3 --> >=1.2.3 <1.3.0\n// ~1.2.0, ~>1.2.0 --> >=1.2.0 <1.3.0\nfunction replaceTildes (comp, options) {\n return comp.trim().split(/\\s+/).map(function (comp) {\n return replaceTilde(comp, options)\n }).join(' ')\n}\n\nfunction replaceTilde (comp, options) {\n var r = options.loose ? safeRe[t.TILDELOOSE] : safeRe[t.TILDE]\n return comp.replace(r, function (_, M, m, p, pr) {\n debug('tilde', comp, _, M, m, p, pr)\n var ret\n\n if (isX(M)) {\n ret = ''\n } else if (isX(m)) {\n ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0'\n } else if (isX(p)) {\n // ~1.2 == >=1.2.0 <1.3.0\n ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0'\n } else if (pr) {\n debug('replaceTilde pr', pr)\n ret = '>=' + M + '.' + m + '.' + p + '-' + pr +\n ' <' + M + '.' + (+m + 1) + '.0'\n } else {\n // ~1.2.3 == >=1.2.3 <1.3.0\n ret = '>=' + M + '.' + m + '.' + p +\n ' <' + M + '.' + (+m + 1) + '.0'\n }\n\n debug('tilde return', ret)\n return ret\n })\n}\n\n// ^ --> * (any, kinda silly)\n// ^2, ^2.x, ^2.x.x --> >=2.0.0 <3.0.0\n// ^2.0, ^2.0.x --> >=2.0.0 <3.0.0\n// ^1.2, ^1.2.x --> >=1.2.0 <2.0.0\n// ^1.2.3 --> >=1.2.3 <2.0.0\n// ^1.2.0 --> >=1.2.0 <2.0.0\nfunction replaceCarets (comp, options) {\n return comp.trim().split(/\\s+/).map(function (comp) {\n return replaceCaret(comp, options)\n }).join(' ')\n}\n\nfunction replaceCaret (comp, options) {\n debug('caret', comp, options)\n var r = options.loose ? safeRe[t.CARETLOOSE] : safeRe[t.CARET]\n return comp.replace(r, function (_, M, m, p, pr) {\n debug('caret', comp, _, M, m, p, pr)\n var ret\n\n if (isX(M)) {\n ret = ''\n } else if (isX(m)) {\n ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0'\n } else if (isX(p)) {\n if (M === '0') {\n ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0'\n } else {\n ret = '>=' + M + '.' + m + '.0 <' + (+M + 1) + '.0.0'\n }\n } else if (pr) {\n debug('replaceCaret pr', pr)\n if (M === '0') {\n if (m === '0') {\n ret = '>=' + M + '.' + m + '.' + p + '-' + pr +\n ' <' + M + '.' + m + '.' + (+p + 1)\n } else {\n ret = '>=' + M + '.' + m + '.' + p + '-' + pr +\n ' <' + M + '.' + (+m + 1) + '.0'\n }\n } else {\n ret = '>=' + M + '.' + m + '.' + p + '-' + pr +\n ' <' + (+M + 1) + '.0.0'\n }\n } else {\n debug('no pr')\n if (M === '0') {\n if (m === '0') {\n ret = '>=' + M + '.' + m + '.' + p +\n ' <' + M + '.' + m + '.' + (+p + 1)\n } else {\n ret = '>=' + M + '.' + m + '.' + p +\n ' <' + M + '.' + (+m + 1) + '.0'\n }\n } else {\n ret = '>=' + M + '.' + m + '.' + p +\n ' <' + (+M + 1) + '.0.0'\n }\n }\n\n debug('caret return', ret)\n return ret\n })\n}\n\nfunction replaceXRanges (comp, options) {\n debug('replaceXRanges', comp, options)\n return comp.split(/\\s+/).map(function (comp) {\n return replaceXRange(comp, options)\n }).join(' ')\n}\n\nfunction replaceXRange (comp, options) {\n comp = comp.trim()\n var r = options.loose ? safeRe[t.XRANGELOOSE] : safeRe[t.XRANGE]\n return comp.replace(r, function (ret, gtlt, M, m, p, pr) {\n debug('xRange', comp, ret, gtlt, M, m, p, pr)\n var xM = isX(M)\n var xm = xM || isX(m)\n var xp = xm || isX(p)\n var anyX = xp\n\n if (gtlt === '=' && anyX) {\n gtlt = ''\n }\n\n // if we're including prereleases in the match, then we need\n // to fix this to -0, the lowest possible prerelease value\n pr = options.includePrerelease ? '-0' : ''\n\n if (xM) {\n if (gtlt === '>' || gtlt === '<') {\n // nothing is allowed\n ret = '<0.0.0-0'\n } else {\n // nothing is forbidden\n ret = '*'\n }\n } else if (gtlt && anyX) {\n // we know patch is an x, because we have any x at all.\n // replace X with 0\n if (xm) {\n m = 0\n }\n p = 0\n\n if (gtlt === '>') {\n // >1 => >=2.0.0\n // >1.2 => >=1.3.0\n // >1.2.3 => >= 1.2.4\n gtlt = '>='\n if (xm) {\n M = +M + 1\n m = 0\n p = 0\n } else {\n m = +m + 1\n p = 0\n }\n } else if (gtlt === '<=') {\n // <=0.7.x is actually <0.8.0, since any 0.7.x should\n // pass. Similarly, <=7.x is actually <8.0.0, etc.\n gtlt = '<'\n if (xm) {\n M = +M + 1\n } else {\n m = +m + 1\n }\n }\n\n ret = gtlt + M + '.' + m + '.' + p + pr\n } else if (xm) {\n ret = '>=' + M + '.0.0' + pr + ' <' + (+M + 1) + '.0.0' + pr\n } else if (xp) {\n ret = '>=' + M + '.' + m + '.0' + pr +\n ' <' + M + '.' + (+m + 1) + '.0' + pr\n }\n\n debug('xRange return', ret)\n\n return ret\n })\n}\n\n// Because * is AND-ed with everything else in the comparator,\n// and '' means \"any version\", just remove the *s entirely.\nfunction replaceStars (comp, options) {\n debug('replaceStars', comp, options)\n // Looseness is ignored here. star is always as loose as it gets!\n return comp.trim().replace(safeRe[t.STAR], '')\n}\n\n// This function is passed to string.replace(re[t.HYPHENRANGE])\n// M, m, patch, prerelease, build\n// 1.2 - 3.4.5 => >=1.2.0 <=3.4.5\n// 1.2.3 - 3.4 => >=1.2.0 <3.5.0 Any 3.4.x will do\n// 1.2 - 3.4 => >=1.2.0 <3.5.0\nfunction hyphenReplace ($0,\n from, fM, fm, fp, fpr, fb,\n to, tM, tm, tp, tpr, tb) {\n if (isX(fM)) {\n from = ''\n } else if (isX(fm)) {\n from = '>=' + fM + '.0.0'\n } else if (isX(fp)) {\n from = '>=' + fM + '.' + fm + '.0'\n } else {\n from = '>=' + from\n }\n\n if (isX(tM)) {\n to = ''\n } else if (isX(tm)) {\n to = '<' + (+tM + 1) + '.0.0'\n } else if (isX(tp)) {\n to = '<' + tM + '.' + (+tm + 1) + '.0'\n } else if (tpr) {\n to = '<=' + tM + '.' + tm + '.' + tp + '-' + tpr\n } else {\n to = '<=' + to\n }\n\n return (from + ' ' + to).trim()\n}\n\n// if ANY of the sets match ALL of its comparators, then pass\nRange.prototype.test = function (version) {\n if (!version) {\n return false\n }\n\n if (typeof version === 'string') {\n try {\n version = new SemVer(version, this.options)\n } catch (er) {\n return false\n }\n }\n\n for (var i = 0; i < this.set.length; i++) {\n if (testSet(this.set[i], version, this.options)) {\n return true\n }\n }\n return false\n}\n\nfunction testSet (set, version, options) {\n for (var i = 0; i < set.length; i++) {\n if (!set[i].test(version)) {\n return false\n }\n }\n\n if (version.prerelease.length && !options.includePrerelease) {\n // Find the set of versions that are allowed to have prereleases\n // For example, ^1.2.3-pr.1 desugars to >=1.2.3-pr.1 <2.0.0\n // That should allow `1.2.3-pr.2` to pass.\n // However, `1.2.4-alpha.notready` should NOT be allowed,\n // even though it's within the range set by the comparators.\n for (i = 0; i < set.length; i++) {\n debug(set[i].semver)\n if (set[i].semver === ANY) {\n continue\n }\n\n if (set[i].semver.prerelease.length > 0) {\n var allowed = set[i].semver\n if (allowed.major === version.major &&\n allowed.minor === version.minor &&\n allowed.patch === version.patch) {\n return true\n }\n }\n }\n\n // Version has a -pre, but it's not one of the ones we like.\n return false\n }\n\n return true\n}\n\nexports.satisfies = satisfies\nfunction satisfies (version, range, options) {\n try {\n range = new Range(range, options)\n } catch (er) {\n return false\n }\n return range.test(version)\n}\n\nexports.maxSatisfying = maxSatisfying\nfunction maxSatisfying (versions, range, options) {\n var max = null\n var maxSV = null\n try {\n var rangeObj = new Range(range, options)\n } catch (er) {\n return null\n }\n versions.forEach(function (v) {\n if (rangeObj.test(v)) {\n // satisfies(v, range, options)\n if (!max || maxSV.compare(v) === -1) {\n // compare(max, v, true)\n max = v\n maxSV = new SemVer(max, options)\n }\n }\n })\n return max\n}\n\nexports.minSatisfying = minSatisfying\nfunction minSatisfying (versions, range, options) {\n var min = null\n var minSV = null\n try {\n var rangeObj = new Range(range, options)\n } catch (er) {\n return null\n }\n versions.forEach(function (v) {\n if (rangeObj.test(v)) {\n // satisfies(v, range, options)\n if (!min || minSV.compare(v) === 1) {\n // compare(min, v, true)\n min = v\n minSV = new SemVer(min, options)\n }\n }\n })\n return min\n}\n\nexports.minVersion = minVersion\nfunction minVersion (range, loose) {\n range = new Range(range, loose)\n\n var minver = new SemVer('0.0.0')\n if (range.test(minver)) {\n return minver\n }\n\n minver = new SemVer('0.0.0-0')\n if (range.test(minver)) {\n return minver\n }\n\n minver = null\n for (var i = 0; i < range.set.length; ++i) {\n var comparators = range.set[i]\n\n comparators.forEach(function (comparator) {\n // Clone to avoid manipulating the comparator's semver object.\n var compver = new SemVer(comparator.semver.version)\n switch (comparator.operator) {\n case '>':\n if (compver.prerelease.length === 0) {\n compver.patch++\n } else {\n compver.prerelease.push(0)\n }\n compver.raw = compver.format()\n /* fallthrough */\n case '':\n case '>=':\n if (!minver || gt(minver, compver)) {\n minver = compver\n }\n break\n case '<':\n case '<=':\n /* Ignore maximum versions */\n break\n /* istanbul ignore next */\n default:\n throw new Error('Unexpected operation: ' + comparator.operator)\n }\n })\n }\n\n if (minver && range.test(minver)) {\n return minver\n }\n\n return null\n}\n\nexports.validRange = validRange\nfunction validRange (range, options) {\n try {\n // Return '*' instead of '' so that truthiness works.\n // This will throw if it's invalid anyway\n return new Range(range, options).range || '*'\n } catch (er) {\n return null\n }\n}\n\n// Determine if version is less than all the versions possible in the range\nexports.ltr = ltr\nfunction ltr (version, range, options) {\n return outside(version, range, '<', options)\n}\n\n// Determine if version is greater than all the versions possible in the range.\nexports.gtr = gtr\nfunction gtr (version, range, options) {\n return outside(version, range, '>', options)\n}\n\nexports.outside = outside\nfunction outside (version, range, hilo, options) {\n version = new SemVer(version, options)\n range = new Range(range, options)\n\n var gtfn, ltefn, ltfn, comp, ecomp\n switch (hilo) {\n case '>':\n gtfn = gt\n ltefn = lte\n ltfn = lt\n comp = '>'\n ecomp = '>='\n break\n case '<':\n gtfn = lt\n ltefn = gte\n ltfn = gt\n comp = '<'\n ecomp = '<='\n break\n default:\n throw new TypeError('Must provide a hilo val of \"<\" or \">\"')\n }\n\n // If it satisifes the range it is not outside\n if (satisfies(version, range, options)) {\n return false\n }\n\n // From now on, variable terms are as if we're in \"gtr\" mode.\n // but note that everything is flipped for the \"ltr\" function.\n\n for (var i = 0; i < range.set.length; ++i) {\n var comparators = range.set[i]\n\n var high = null\n var low = null\n\n comparators.forEach(function (comparator) {\n if (comparator.semver === ANY) {\n comparator = new Comparator('>=0.0.0')\n }\n high = high || comparator\n low = low || comparator\n if (gtfn(comparator.semver, high.semver, options)) {\n high = comparator\n } else if (ltfn(comparator.semver, low.semver, options)) {\n low = comparator\n }\n })\n\n // If the edge version comparator has a operator then our version\n // isn't outside it\n if (high.operator === comp || high.operator === ecomp) {\n return false\n }\n\n // If the lowest version comparator has an operator and our version\n // is less than it then it isn't higher than the range\n if ((!low.operator || low.operator === comp) &&\n ltefn(version, low.semver)) {\n return false\n } else if (low.operator === ecomp && ltfn(version, low.semver)) {\n return false\n }\n }\n return true\n}\n\nexports.prerelease = prerelease\nfunction prerelease (version, options) {\n var parsed = parse(version, options)\n return (parsed && parsed.prerelease.length) ? parsed.prerelease : null\n}\n\nexports.intersects = intersects\nfunction intersects (r1, r2, options) {\n r1 = new Range(r1, options)\n r2 = new Range(r2, options)\n return r1.intersects(r2)\n}\n\nexports.coerce = coerce\nfunction coerce (version, options) {\n if (version instanceof SemVer) {\n return version\n }\n\n if (typeof version === 'number') {\n version = String(version)\n }\n\n if (typeof version !== 'string') {\n return null\n }\n\n options = options || {}\n\n var match = null\n if (!options.rtl) {\n match = version.match(safeRe[t.COERCE])\n } else {\n // Find the right-most coercible string that does not share\n // a terminus with a more left-ward coercible string.\n // Eg, '1.2.3.4' wants to coerce '2.3.4', not '3.4' or '4'\n //\n // Walk through the string checking with a /g regexp\n // Manually set the index so as to pick up overlapping matches.\n // Stop when we get a match that ends at the string end, since no\n // coercible string can be more right-ward without the same terminus.\n var next\n while ((next = safeRe[t.COERCERTL].exec(version)) &&\n (!match || match.index + match[0].length !== version.length)\n ) {\n if (!match ||\n next.index + next[0].length !== match.index + match[0].length) {\n match = next\n }\n safeRe[t.COERCERTL].lastIndex = next.index + next[1].length + next[2].length\n }\n // leave it in a clean state\n safeRe[t.COERCERTL].lastIndex = -1\n }\n\n if (match === null) {\n return null\n }\n\n return parse(match[2] +\n '.' + (match[3] || '0') +\n '.' + (match[4] || '0'), options)\n}\n","\"use strict\";\n\nexports.__esModule = true;\nexports.hasMinVersion = hasMinVersion;\nvar _semver = _interopRequireDefault(require(\"semver\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nfunction hasMinVersion(minVersion, runtimeVersion) {\n // If the range is unavailable, we're running the script during Babel's\n // build process, and we want to assume that all versions are satisfied so\n // that the built output will include all definitions.\n if (!runtimeVersion || !minVersion) return true;\n runtimeVersion = String(runtimeVersion);\n\n // semver.intersects() has some surprising behavior with comparing ranges\n // with preprelease versions. We add '^' to ensure that we are always\n // comparing ranges with ranges, which sidesteps this logic.\n // For example:\n //\n // semver.intersects(`<7.0.1`, \"7.0.0-beta.0\") // false - surprising\n // semver.intersects(`<7.0.1`, \"^7.0.0-beta.0\") // true - expected\n //\n // This is because the first falls back to\n //\n // semver.satisfies(\"7.0.0-beta.0\", `<7.0.1`) // false - surprising\n //\n // and this fails because a prerelease version can only satisfy a range\n // if it is a prerelease within the same major/minor/patch range.\n //\n // Note: If this is found to have issues, please also revist the logic in\n // babel-core's availableHelper() API.\n if (_semver.default.valid(runtimeVersion)) runtimeVersion = `^${runtimeVersion}`;\n return !_semver.default.intersects(`<${minVersion}`, runtimeVersion) && !_semver.default.intersects(`>=8.0.0`, runtimeVersion);\n}","\"use strict\";\n\nexports.__esModule = true;\nexports.createUtilsGetter = createUtilsGetter;\nexports.getImportSource = getImportSource;\nexports.getRequireSource = getRequireSource;\nexports.has = has;\nexports.intersection = intersection;\nexports.resolveKey = resolveKey;\nexports.resolveSource = resolveSource;\nvar _babel = _interopRequireWildcard(require(\"@babel/core\"));\nfunction _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== \"function\") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }\nfunction _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== \"object\" && typeof obj !== \"function\") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== \"default\" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }\nconst {\n types: t,\n template: template\n} = _babel.default || _babel;\nfunction intersection(a, b) {\n const result = new Set();\n a.forEach(v => b.has(v) && result.add(v));\n return result;\n}\nfunction has(object, key) {\n return Object.prototype.hasOwnProperty.call(object, key);\n}\nfunction getType(target) {\n return Object.prototype.toString.call(target).slice(8, -1);\n}\nfunction resolveId(path) {\n if (path.isIdentifier() && !path.scope.hasBinding(path.node.name, /* noGlobals */true)) {\n return path.node.name;\n }\n if (path.isPure()) {\n const {\n deopt\n } = path.evaluate();\n if (deopt && deopt.isIdentifier()) {\n return deopt.node.name;\n }\n }\n}\nfunction resolveKey(path, computed = false) {\n const {\n scope\n } = path;\n if (path.isStringLiteral()) return path.node.value;\n const isIdentifier = path.isIdentifier();\n if (isIdentifier && !(computed || path.parent.computed)) {\n return path.node.name;\n }\n if (computed && path.isMemberExpression() && path.get(\"object\").isIdentifier({\n name: \"Symbol\"\n }) && !scope.hasBinding(\"Symbol\", /* noGlobals */true)) {\n const sym = resolveKey(path.get(\"property\"), path.node.computed);\n if (sym) return \"Symbol.\" + sym;\n }\n if (isIdentifier ? scope.hasBinding(path.node.name, /* noGlobals */true) : path.isPure()) {\n const {\n value\n } = path.evaluate();\n if (typeof value === \"string\") return value;\n }\n}\nfunction resolveSource(obj) {\n if (obj.isMemberExpression() && obj.get(\"property\").isIdentifier({\n name: \"prototype\"\n })) {\n const id = resolveId(obj.get(\"object\"));\n if (id) {\n return {\n id,\n placement: \"prototype\"\n };\n }\n return {\n id: null,\n placement: null\n };\n }\n const id = resolveId(obj);\n if (id) {\n return {\n id,\n placement: \"static\"\n };\n }\n if (obj.isRegExpLiteral()) {\n return {\n id: \"RegExp\",\n placement: \"prototype\"\n };\n } else if (obj.isFunction()) {\n return {\n id: \"Function\",\n placement: \"prototype\"\n };\n } else if (obj.isPure()) {\n const {\n value\n } = obj.evaluate();\n if (value !== undefined) {\n return {\n id: getType(value),\n placement: \"prototype\"\n };\n }\n }\n return {\n id: null,\n placement: null\n };\n}\nfunction getImportSource({\n node\n}) {\n if (node.specifiers.length === 0) return node.source.value;\n}\nfunction getRequireSource({\n node\n}) {\n if (!t.isExpressionStatement(node)) return;\n const {\n expression\n } = node;\n if (t.isCallExpression(expression) && t.isIdentifier(expression.callee) && expression.callee.name === \"require\" && expression.arguments.length === 1 && t.isStringLiteral(expression.arguments[0])) {\n return expression.arguments[0].value;\n }\n}\nfunction hoist(node) {\n // @ts-expect-error\n node._blockHoist = 3;\n return node;\n}\nfunction createUtilsGetter(cache) {\n return path => {\n const prog = path.findParent(p => p.isProgram());\n return {\n injectGlobalImport(url, moduleName) {\n cache.storeAnonymous(prog, url, moduleName, (isScript, source) => {\n return isScript ? template.statement.ast`require(${source})` : t.importDeclaration([], source);\n });\n },\n injectNamedImport(url, name, hint = name, moduleName) {\n return cache.storeNamed(prog, url, name, moduleName, (isScript, source, name) => {\n const id = prog.scope.generateUidIdentifier(hint);\n return {\n node: isScript ? hoist(template.statement.ast`\n var ${id} = require(${source}).${name}\n `) : t.importDeclaration([t.importSpecifier(id, name)], source),\n name: id.name\n };\n });\n },\n injectDefaultImport(url, hint = url, moduleName) {\n return cache.storeNamed(prog, url, \"default\", moduleName, (isScript, source) => {\n const id = prog.scope.generateUidIdentifier(hint);\n return {\n node: isScript ? hoist(template.statement.ast`var ${id} = require(${source})`) : t.importDeclaration([t.importDefaultSpecifier(id)], source),\n name: id.name\n };\n });\n }\n };\n };\n}","\"use strict\";\n\nexports.__esModule = true;\nexports.default = void 0;\nvar _babel = _interopRequireWildcard(require(\"@babel/core\"));\nfunction _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== \"function\") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }\nfunction _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== \"object\" && typeof obj !== \"function\") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== \"default\" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }\nconst {\n types: t\n} = _babel.default || _babel;\nclass ImportsCachedInjector {\n constructor(resolver, getPreferredIndex) {\n this._imports = new WeakMap();\n this._anonymousImports = new WeakMap();\n this._lastImports = new WeakMap();\n this._resolver = resolver;\n this._getPreferredIndex = getPreferredIndex;\n }\n storeAnonymous(programPath, url, moduleName, getVal) {\n const key = this._normalizeKey(programPath, url);\n const imports = this._ensure(this._anonymousImports, programPath, Set);\n if (imports.has(key)) return;\n const node = getVal(programPath.node.sourceType === \"script\", t.stringLiteral(this._resolver(url)));\n imports.add(key);\n this._injectImport(programPath, node, moduleName);\n }\n storeNamed(programPath, url, name, moduleName, getVal) {\n const key = this._normalizeKey(programPath, url, name);\n const imports = this._ensure(this._imports, programPath, Map);\n if (!imports.has(key)) {\n const {\n node,\n name: id\n } = getVal(programPath.node.sourceType === \"script\", t.stringLiteral(this._resolver(url)), t.identifier(name));\n imports.set(key, id);\n this._injectImport(programPath, node, moduleName);\n }\n return t.identifier(imports.get(key));\n }\n _injectImport(programPath, node, moduleName) {\n var _this$_lastImports$ge;\n const newIndex = this._getPreferredIndex(moduleName);\n const lastImports = (_this$_lastImports$ge = this._lastImports.get(programPath)) != null ? _this$_lastImports$ge : [];\n const isPathStillValid = path => path.node &&\n // Sometimes the AST is modified and the \"last import\"\n // we have has been replaced\n path.parent === programPath.node && path.container === programPath.node.body;\n let last;\n if (newIndex === Infinity) {\n // Fast path: we can always just insert at the end if newIndex is `Infinity`\n if (lastImports.length > 0) {\n last = lastImports[lastImports.length - 1].path;\n if (!isPathStillValid(last)) last = undefined;\n }\n } else {\n for (const [i, data] of lastImports.entries()) {\n const {\n path,\n index\n } = data;\n if (isPathStillValid(path)) {\n if (newIndex < index) {\n const [newPath] = path.insertBefore(node);\n lastImports.splice(i, 0, {\n path: newPath,\n index: newIndex\n });\n return;\n }\n last = path;\n }\n }\n }\n if (last) {\n const [newPath] = last.insertAfter(node);\n lastImports.push({\n path: newPath,\n index: newIndex\n });\n } else {\n const [newPath] = programPath.unshiftContainer(\"body\", node);\n this._lastImports.set(programPath, [{\n path: newPath,\n index: newIndex\n }]);\n }\n }\n _ensure(map, programPath, Collection) {\n let collection = map.get(programPath);\n if (!collection) {\n collection = new Collection();\n map.set(programPath, collection);\n }\n return collection;\n }\n _normalizeKey(programPath, url, name = \"\") {\n const {\n sourceType\n } = programPath.node;\n\n // If we rely on the imported binding (the \"name\" parameter), we also need to cache\n // based on the sourceType. This is because the module transforms change the names\n // of the import variables.\n return `${name && sourceType}::${url}::${name}`;\n }\n}\nexports.default = ImportsCachedInjector;","\"use strict\";\n\nexports.__esModule = true;\nexports.presetEnvSilentDebugHeader = void 0;\nexports.stringifyTargets = stringifyTargets;\nexports.stringifyTargetsMultiline = stringifyTargetsMultiline;\nvar _helperCompilationTargets = require(\"@babel/helper-compilation-targets\");\nconst presetEnvSilentDebugHeader = \"#__secret_key__@babel/preset-env__don't_log_debug_header_and_resolved_targets\";\nexports.presetEnvSilentDebugHeader = presetEnvSilentDebugHeader;\nfunction stringifyTargetsMultiline(targets) {\n return JSON.stringify((0, _helperCompilationTargets.prettifyTargets)(targets), null, 2);\n}\nfunction stringifyTargets(targets) {\n return JSON.stringify(targets).replace(/,/g, \", \").replace(/^\\{\"/, '{ \"').replace(/\"\\}$/, '\" }');\n}","\"use strict\";\n\nexports.__esModule = true;\nexports.applyMissingDependenciesDefaults = applyMissingDependenciesDefaults;\nexports.validateIncludeExclude = validateIncludeExclude;\nvar _utils = require(\"./utils\");\nfunction patternToRegExp(pattern) {\n if (pattern instanceof RegExp) return pattern;\n try {\n return new RegExp(`^${pattern}$`);\n } catch (_unused) {\n return null;\n }\n}\nfunction buildUnusedError(label, unused) {\n if (!unused.length) return \"\";\n return ` - The following \"${label}\" patterns didn't match any polyfill:\\n` + unused.map(original => ` ${String(original)}\\n`).join(\"\");\n}\nfunction buldDuplicatesError(duplicates) {\n if (!duplicates.size) return \"\";\n return ` - The following polyfills were matched both by \"include\" and \"exclude\" patterns:\\n` + Array.from(duplicates, name => ` ${name}\\n`).join(\"\");\n}\nfunction validateIncludeExclude(provider, polyfills, includePatterns, excludePatterns) {\n let current;\n const filter = pattern => {\n const regexp = patternToRegExp(pattern);\n if (!regexp) return false;\n let matched = false;\n for (const polyfill of polyfills.keys()) {\n if (regexp.test(polyfill)) {\n matched = true;\n current.add(polyfill);\n }\n }\n return !matched;\n };\n\n // prettier-ignore\n const include = current = new Set();\n const unusedInclude = Array.from(includePatterns).filter(filter);\n\n // prettier-ignore\n const exclude = current = new Set();\n const unusedExclude = Array.from(excludePatterns).filter(filter);\n const duplicates = (0, _utils.intersection)(include, exclude);\n if (duplicates.size > 0 || unusedInclude.length > 0 || unusedExclude.length > 0) {\n throw new Error(`Error while validating the \"${provider}\" provider options:\\n` + buildUnusedError(\"include\", unusedInclude) + buildUnusedError(\"exclude\", unusedExclude) + buldDuplicatesError(duplicates));\n }\n return {\n include,\n exclude\n };\n}\nfunction applyMissingDependenciesDefaults(options, babelApi) {\n const {\n missingDependencies = {}\n } = options;\n if (missingDependencies === false) return false;\n const caller = babelApi.caller(caller => caller == null ? void 0 : caller.name);\n const {\n log = \"deferred\",\n inject = caller === \"rollup-plugin-babel\" ? \"throw\" : \"import\",\n all = false\n } = missingDependencies;\n return {\n log,\n inject,\n all\n };\n}","\"use strict\";\n\nexports.__esModule = true;\nexports.default = void 0;\nvar _utils = require(\"../utils\");\nfunction isRemoved(path) {\n if (path.removed) return true;\n if (!path.parentPath) return false;\n if (path.listKey) {\n if (!path.parentPath.node[path.listKey].includes(path.node)) return true;\n } else {\n if (path.parentPath.node[path.key] !== path.node) return true;\n }\n return isRemoved(path.parentPath);\n}\nvar _default = callProvider => {\n function property(object, key, placement, path) {\n return callProvider({\n kind: \"property\",\n object,\n key,\n placement\n }, path);\n }\n function handleReferencedIdentifier(path) {\n const {\n node: {\n name\n },\n scope\n } = path;\n if (scope.getBindingIdentifier(name)) return;\n callProvider({\n kind: \"global\",\n name\n }, path);\n }\n function analyzeMemberExpression(path) {\n const key = (0, _utils.resolveKey)(path.get(\"property\"), path.node.computed);\n return {\n key,\n handleAsMemberExpression: !!key && key !== \"prototype\"\n };\n }\n return {\n // Symbol(), new Promise\n ReferencedIdentifier(path) {\n const {\n parentPath\n } = path;\n if (parentPath.isMemberExpression({\n object: path.node\n }) && analyzeMemberExpression(parentPath).handleAsMemberExpression) {\n return;\n }\n handleReferencedIdentifier(path);\n },\n MemberExpression(path) {\n const {\n key,\n handleAsMemberExpression\n } = analyzeMemberExpression(path);\n if (!handleAsMemberExpression) return;\n const object = path.get(\"object\");\n let objectIsGlobalIdentifier = object.isIdentifier();\n if (objectIsGlobalIdentifier) {\n const binding = object.scope.getBinding(object.node.name);\n if (binding) {\n if (binding.path.isImportNamespaceSpecifier()) return;\n objectIsGlobalIdentifier = false;\n }\n }\n const source = (0, _utils.resolveSource)(object);\n let skipObject = property(source.id, key, source.placement, path);\n skipObject || (skipObject = !objectIsGlobalIdentifier || path.shouldSkip || object.shouldSkip || isRemoved(object));\n if (!skipObject) handleReferencedIdentifier(object);\n },\n ObjectPattern(path) {\n const {\n parentPath,\n parent\n } = path;\n let obj;\n\n // const { keys, values } = Object\n if (parentPath.isVariableDeclarator()) {\n obj = parentPath.get(\"init\");\n // ({ keys, values } = Object)\n } else if (parentPath.isAssignmentExpression()) {\n obj = parentPath.get(\"right\");\n // !function ({ keys, values }) {...} (Object)\n // resolution does not work after properties transform :-(\n } else if (parentPath.isFunction()) {\n const grand = parentPath.parentPath;\n if (grand.isCallExpression() || grand.isNewExpression()) {\n if (grand.node.callee === parent) {\n obj = grand.get(\"arguments\")[path.key];\n }\n }\n }\n let id = null;\n let placement = null;\n if (obj) ({\n id,\n placement\n } = (0, _utils.resolveSource)(obj));\n for (const prop of path.get(\"properties\")) {\n if (prop.isObjectProperty()) {\n const key = (0, _utils.resolveKey)(prop.get(\"key\"));\n if (key) property(id, key, placement, prop);\n }\n }\n },\n BinaryExpression(path) {\n if (path.node.operator !== \"in\") return;\n const source = (0, _utils.resolveSource)(path.get(\"right\"));\n const key = (0, _utils.resolveKey)(path.get(\"left\"), true);\n if (!key) return;\n callProvider({\n kind: \"in\",\n object: source.id,\n key,\n placement: source.placement\n }, path);\n }\n };\n};\nexports.default = _default;","\"use strict\";\n\nexports.__esModule = true;\nexports.default = void 0;\nvar _utils = require(\"../utils\");\nvar _default = callProvider => ({\n ImportDeclaration(path) {\n const source = (0, _utils.getImportSource)(path);\n if (!source) return;\n callProvider({\n kind: \"import\",\n source\n }, path);\n },\n Program(path) {\n path.get(\"body\").forEach(bodyPath => {\n const source = (0, _utils.getRequireSource)(bodyPath);\n if (!source) return;\n callProvider({\n kind: \"import\",\n source\n }, bodyPath);\n });\n }\n});\nexports.default = _default;","\"use strict\";\n\nexports.__esModule = true;\nexports.usage = exports.entry = void 0;\nvar _usage = _interopRequireDefault(require(\"./usage\"));\nexports.usage = _usage.default;\nvar _entry = _interopRequireDefault(require(\"./entry\"));\nexports.entry = _entry.default;\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }","\"use strict\";\n\nexports.__esModule = true;\nexports.has = has;\nexports.laterLogMissing = laterLogMissing;\nexports.logMissing = logMissing;\nexports.resolve = resolve;\nfunction resolve(dirname, moduleName, absoluteImports) {\n if (absoluteImports === false) return moduleName;\n throw new Error(`\"absoluteImports\" is not supported in bundles prepared for the browser.`);\n}\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nfunction has(basedir, name) {\n return true;\n}\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nfunction logMissing(missingDeps) {}\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nfunction laterLogMissing(missingDeps) {}","\"use strict\";\n\nexports.__esModule = true;\nexports.default = createMetaResolver;\nvar _utils = require(\"./utils\");\nconst PossibleGlobalObjects = new Set([\"global\", \"globalThis\", \"self\", \"window\"]);\nfunction createMetaResolver(polyfills) {\n const {\n static: staticP,\n instance: instanceP,\n global: globalP\n } = polyfills;\n return meta => {\n if (meta.kind === \"global\" && globalP && (0, _utils.has)(globalP, meta.name)) {\n return {\n kind: \"global\",\n desc: globalP[meta.name],\n name: meta.name\n };\n }\n if (meta.kind === \"property\" || meta.kind === \"in\") {\n const {\n placement,\n object,\n key\n } = meta;\n if (object && placement === \"static\") {\n if (globalP && PossibleGlobalObjects.has(object) && (0, _utils.has)(globalP, key)) {\n return {\n kind: \"global\",\n desc: globalP[key],\n name: key\n };\n }\n if (staticP && (0, _utils.has)(staticP, object) && (0, _utils.has)(staticP[object], key)) {\n return {\n kind: \"static\",\n desc: staticP[object][key],\n name: `${object}$${key}`\n };\n }\n }\n if (instanceP && (0, _utils.has)(instanceP, key)) {\n return {\n kind: \"instance\",\n desc: instanceP[key],\n name: `${key}`\n };\n }\n }\n };\n}","\"use strict\";\n\nexports.__esModule = true;\nexports.default = definePolyfillProvider;\nvar _helperPluginUtils = require(\"@babel/helper-plugin-utils\");\nvar _helperCompilationTargets = _interopRequireWildcard(require(\"@babel/helper-compilation-targets\"));\nvar _utils = require(\"./utils\");\nvar _importsInjector = _interopRequireDefault(require(\"./imports-injector\"));\nvar _debugUtils = require(\"./debug-utils\");\nvar _normalizeOptions = require(\"./normalize-options\");\nvar v = _interopRequireWildcard(require(\"./visitors\"));\nvar deps = _interopRequireWildcard(require(\"./node/dependencies\"));\nvar _metaResolver = _interopRequireDefault(require(\"./meta-resolver\"));\nconst _excluded = [\"method\", \"targets\", \"ignoreBrowserslistConfig\", \"configPath\", \"debug\", \"shouldInjectPolyfill\", \"absoluteImports\"];\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nfunction _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== \"function\") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }\nfunction _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== \"object\" && typeof obj !== \"function\") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== \"default\" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\nconst getTargets = _helperCompilationTargets.default.default || _helperCompilationTargets.default;\nfunction resolveOptions(options, babelApi) {\n const {\n method,\n targets: targetsOption,\n ignoreBrowserslistConfig,\n configPath,\n debug,\n shouldInjectPolyfill,\n absoluteImports\n } = options,\n providerOptions = _objectWithoutPropertiesLoose(options, _excluded);\n if (isEmpty(options)) {\n throw new Error(`\\\nThis plugin requires options, for example:\n {\n \"plugins\": [\n [\"\", { method: \"usage-pure\" }]\n ]\n }\n\nSee more options at https://github.com/babel/babel-polyfills/blob/main/docs/usage.md`);\n }\n let methodName;\n if (method === \"usage-global\") methodName = \"usageGlobal\";else if (method === \"entry-global\") methodName = \"entryGlobal\";else if (method === \"usage-pure\") methodName = \"usagePure\";else if (typeof method !== \"string\") {\n throw new Error(\".method must be a string\");\n } else {\n throw new Error(`.method must be one of \"entry-global\", \"usage-global\"` + ` or \"usage-pure\" (received ${JSON.stringify(method)})`);\n }\n if (typeof shouldInjectPolyfill === \"function\") {\n if (options.include || options.exclude) {\n throw new Error(`.include and .exclude are not supported when using the` + ` .shouldInjectPolyfill function.`);\n }\n } else if (shouldInjectPolyfill != null) {\n throw new Error(`.shouldInjectPolyfill must be a function, or undefined` + ` (received ${JSON.stringify(shouldInjectPolyfill)})`);\n }\n if (absoluteImports != null && typeof absoluteImports !== \"boolean\" && typeof absoluteImports !== \"string\") {\n throw new Error(`.absoluteImports must be a boolean, a string, or undefined` + ` (received ${JSON.stringify(absoluteImports)})`);\n }\n let targets;\n if (\n // If any browserslist-related option is specified, fallback to the old\n // behavior of not using the targets specified in the top-level options.\n targetsOption || configPath || ignoreBrowserslistConfig) {\n const targetsObj = typeof targetsOption === \"string\" || Array.isArray(targetsOption) ? {\n browsers: targetsOption\n } : targetsOption;\n targets = getTargets(targetsObj, {\n ignoreBrowserslistConfig,\n configPath\n });\n } else {\n targets = babelApi.targets();\n }\n return {\n method,\n methodName,\n targets,\n absoluteImports: absoluteImports != null ? absoluteImports : false,\n shouldInjectPolyfill,\n debug: !!debug,\n providerOptions: providerOptions\n };\n}\nfunction instantiateProvider(factory, options, missingDependencies, dirname, debugLog, babelApi) {\n const {\n method,\n methodName,\n targets,\n debug,\n shouldInjectPolyfill,\n providerOptions,\n absoluteImports\n } = resolveOptions(options, babelApi);\n\n // eslint-disable-next-line prefer-const\n let include, exclude;\n let polyfillsSupport;\n let polyfillsNames;\n let filterPolyfills;\n const getUtils = (0, _utils.createUtilsGetter)(new _importsInjector.default(moduleName => deps.resolve(dirname, moduleName, absoluteImports), name => {\n var _polyfillsNames$get, _polyfillsNames;\n return (_polyfillsNames$get = (_polyfillsNames = polyfillsNames) == null ? void 0 : _polyfillsNames.get(name)) != null ? _polyfillsNames$get : Infinity;\n }));\n const depsCache = new Map();\n const api = {\n babel: babelApi,\n getUtils,\n method: options.method,\n targets,\n createMetaResolver: _metaResolver.default,\n shouldInjectPolyfill(name) {\n if (polyfillsNames === undefined) {\n throw new Error(`Internal error in the ${factory.name} provider: ` + `shouldInjectPolyfill() can't be called during initialization.`);\n }\n if (!polyfillsNames.has(name)) {\n console.warn(`Internal error in the ${providerName} provider: ` + `unknown polyfill \"${name}\".`);\n }\n if (filterPolyfills && !filterPolyfills(name)) return false;\n let shouldInject = (0, _helperCompilationTargets.isRequired)(name, targets, {\n compatData: polyfillsSupport,\n includes: include,\n excludes: exclude\n });\n if (shouldInjectPolyfill) {\n shouldInject = shouldInjectPolyfill(name, shouldInject);\n if (typeof shouldInject !== \"boolean\") {\n throw new Error(`.shouldInjectPolyfill must return a boolean.`);\n }\n }\n return shouldInject;\n },\n debug(name) {\n var _debugLog, _debugLog$polyfillsSu;\n debugLog().found = true;\n if (!debug || !name) return;\n if (debugLog().polyfills.has(providerName)) return;\n debugLog().polyfills.add(name);\n (_debugLog$polyfillsSu = (_debugLog = debugLog()).polyfillsSupport) != null ? _debugLog$polyfillsSu : _debugLog.polyfillsSupport = polyfillsSupport;\n },\n assertDependency(name, version = \"*\") {\n if (missingDependencies === false) return;\n if (absoluteImports) {\n // If absoluteImports is not false, we will try resolving\n // the dependency and throw if it's not possible. We can\n // skip the check here.\n return;\n }\n const dep = version === \"*\" ? name : `${name}@^${version}`;\n const found = missingDependencies.all ? false : mapGetOr(depsCache, `${name} :: ${dirname}`, () => deps.has(dirname, name));\n if (!found) {\n debugLog().missingDeps.add(dep);\n }\n }\n };\n const provider = factory(api, providerOptions, dirname);\n const providerName = provider.name || factory.name;\n if (typeof provider[methodName] !== \"function\") {\n throw new Error(`The \"${providerName}\" provider doesn't support the \"${method}\" polyfilling method.`);\n }\n if (Array.isArray(provider.polyfills)) {\n polyfillsNames = new Map(provider.polyfills.map((name, index) => [name, index]));\n filterPolyfills = provider.filterPolyfills;\n } else if (provider.polyfills) {\n polyfillsNames = new Map(Object.keys(provider.polyfills).map((name, index) => [name, index]));\n polyfillsSupport = provider.polyfills;\n filterPolyfills = provider.filterPolyfills;\n } else {\n polyfillsNames = new Map();\n }\n ({\n include,\n exclude\n } = (0, _normalizeOptions.validateIncludeExclude)(providerName, polyfillsNames, providerOptions.include || [], providerOptions.exclude || []));\n let callProvider;\n if (methodName === \"usageGlobal\") {\n callProvider = (payload, path) => {\n var _ref;\n const utils = getUtils(path);\n return (_ref = provider[methodName](payload, utils, path)) != null ? _ref : false;\n };\n } else {\n callProvider = (payload, path) => {\n const utils = getUtils(path);\n provider[methodName](payload, utils, path);\n return false;\n };\n }\n return {\n debug,\n method,\n targets,\n provider,\n providerName,\n callProvider\n };\n}\nfunction definePolyfillProvider(factory) {\n return (0, _helperPluginUtils.declare)((babelApi, options, dirname) => {\n babelApi.assertVersion(\"^7.0.0 || ^8.0.0-alpha.0\");\n const {\n traverse\n } = babelApi;\n let debugLog;\n const missingDependencies = (0, _normalizeOptions.applyMissingDependenciesDefaults)(options, babelApi);\n const {\n debug,\n method,\n targets,\n provider,\n providerName,\n callProvider\n } = instantiateProvider(factory, options, missingDependencies, dirname, () => debugLog, babelApi);\n const createVisitor = method === \"entry-global\" ? v.entry : v.usage;\n const visitor = provider.visitor ? traverse.visitors.merge([createVisitor(callProvider), provider.visitor]) : createVisitor(callProvider);\n if (debug && debug !== _debugUtils.presetEnvSilentDebugHeader) {\n console.log(`${providerName}: \\`DEBUG\\` option`);\n console.log(`\\nUsing targets: ${(0, _debugUtils.stringifyTargetsMultiline)(targets)}`);\n console.log(`\\nUsing polyfills with \\`${method}\\` method:`);\n }\n const {\n runtimeName\n } = provider;\n return {\n name: \"inject-polyfills\",\n visitor,\n pre(file) {\n var _provider$pre;\n if (runtimeName) {\n if (file.get(\"runtimeHelpersModuleName\") && file.get(\"runtimeHelpersModuleName\") !== runtimeName) {\n console.warn(`Two different polyfill providers` + ` (${file.get(\"runtimeHelpersModuleProvider\")}` + ` and ${providerName}) are trying to define two` + ` conflicting @babel/runtime alternatives:` + ` ${file.get(\"runtimeHelpersModuleName\")} and ${runtimeName}.` + ` The second one will be ignored.`);\n } else {\n file.set(\"runtimeHelpersModuleName\", runtimeName);\n file.set(\"runtimeHelpersModuleProvider\", providerName);\n }\n }\n debugLog = {\n polyfills: new Set(),\n polyfillsSupport: undefined,\n found: false,\n providers: new Set(),\n missingDeps: new Set()\n };\n (_provider$pre = provider.pre) == null ? void 0 : _provider$pre.apply(this, arguments);\n },\n post() {\n var _provider$post;\n (_provider$post = provider.post) == null ? void 0 : _provider$post.apply(this, arguments);\n if (missingDependencies !== false) {\n if (missingDependencies.log === \"per-file\") {\n deps.logMissing(debugLog.missingDeps);\n } else {\n deps.laterLogMissing(debugLog.missingDeps);\n }\n }\n if (!debug) return;\n if (this.filename) console.log(`\\n[${this.filename}]`);\n if (debugLog.polyfills.size === 0) {\n console.log(method === \"entry-global\" ? debugLog.found ? `Based on your targets, the ${providerName} polyfill did not add any polyfill.` : `The entry point for the ${providerName} polyfill has not been found.` : `Based on your code and targets, the ${providerName} polyfill did not add any polyfill.`);\n return;\n }\n if (method === \"entry-global\") {\n console.log(`The ${providerName} polyfill entry has been replaced with ` + `the following polyfills:`);\n } else {\n console.log(`The ${providerName} polyfill added the following polyfills:`);\n }\n for (const name of debugLog.polyfills) {\n var _debugLog$polyfillsSu2;\n if ((_debugLog$polyfillsSu2 = debugLog.polyfillsSupport) != null && _debugLog$polyfillsSu2[name]) {\n const filteredTargets = (0, _helperCompilationTargets.getInclusionReasons)(name, targets, debugLog.polyfillsSupport);\n const formattedTargets = JSON.stringify(filteredTargets).replace(/,/g, \", \").replace(/^\\{\"/, '{ \"').replace(/\"\\}$/, '\" }');\n console.log(` ${name} ${formattedTargets}`);\n } else {\n console.log(` ${name}`);\n }\n }\n }\n };\n });\n}\nfunction mapGetOr(map, key, getDefault) {\n let val = map.get(key);\n if (val === undefined) {\n val = getDefault();\n map.set(key, val);\n }\n return val;\n}\nfunction isEmpty(obj) {\n return Object.keys(obj).length === 0;\n}","\"use strict\";\n\nexports.__esModule = true;\nexports.default = void 0;\nvar _corejs2BuiltIns = _interopRequireDefault(require(\"@babel/compat-data/corejs2-built-ins\"));\nvar _builtInDefinitions = require(\"./built-in-definitions\");\nvar _addPlatformSpecificPolyfills = _interopRequireDefault(require(\"./add-platform-specific-polyfills\"));\nvar _helpers = require(\"./helpers\");\nvar _helperDefinePolyfillProvider = _interopRequireDefault(require(\"@babel/helper-define-polyfill-provider\"));\nvar _babel = _interopRequireWildcard(require(\"@babel/core\"));\nfunction _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== \"function\") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }\nfunction _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== \"object\" && typeof obj !== \"function\") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== \"default\" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nconst {\n types: t\n} = _babel.default || _babel;\nconst BABEL_RUNTIME = \"@babel/runtime-corejs2\";\nconst presetEnvCompat = \"#__secret_key__@babel/preset-env__compatibility\";\nconst runtimeCompat = \"#__secret_key__@babel/runtime__compatibility\";\nconst has = Function.call.bind(Object.hasOwnProperty);\nvar _default = (0, _helperDefinePolyfillProvider.default)(function (api, {\n [presetEnvCompat]: {\n entryInjectRegenerator = false,\n noRuntimeName = false\n } = {},\n [runtimeCompat]: {\n useBabelRuntime = false,\n runtimeVersion = \"\",\n ext = \".js\"\n } = {}\n}) {\n const resolve = api.createMetaResolver({\n global: _builtInDefinitions.BuiltIns,\n static: _builtInDefinitions.StaticProperties,\n instance: _builtInDefinitions.InstanceProperties\n });\n const {\n debug,\n shouldInjectPolyfill,\n method\n } = api;\n const polyfills = (0, _addPlatformSpecificPolyfills.default)(api.targets, method, _corejs2BuiltIns.default);\n const coreJSBase = useBabelRuntime ? `${BABEL_RUNTIME}/core-js` : method === \"usage-pure\" ? \"core-js/library/fn\" : \"core-js/modules\";\n function inject(name, utils) {\n if (typeof name === \"string\") {\n // Some polyfills aren't always available, for example\n // web.dom.iterable when targeting node\n if (has(polyfills, name) && shouldInjectPolyfill(name)) {\n debug(name);\n utils.injectGlobalImport(`${coreJSBase}/${name}.js`);\n }\n return;\n }\n name.forEach(name => inject(name, utils));\n }\n function maybeInjectPure(desc, hint, utils) {\n let {\n pure,\n meta,\n name\n } = desc;\n if (!pure || !shouldInjectPolyfill(name)) return;\n if (runtimeVersion && meta && meta.minRuntimeVersion && !(0, _helpers.hasMinVersion)(meta && meta.minRuntimeVersion, runtimeVersion)) {\n return;\n }\n\n // Unfortunately core-js and @babel/runtime-corejs2 don't have the same\n // directory structure, so we need to special case this.\n if (useBabelRuntime && pure === \"symbol/index\") pure = \"symbol\";\n return utils.injectDefaultImport(`${coreJSBase}/${pure}${ext}`, hint);\n }\n return {\n name: \"corejs2\",\n runtimeName: noRuntimeName ? null : BABEL_RUNTIME,\n polyfills,\n entryGlobal(meta, utils, path) {\n if (meta.kind === \"import\" && meta.source === \"core-js\") {\n debug(null);\n inject(Object.keys(polyfills), utils);\n if (entryInjectRegenerator) {\n utils.injectGlobalImport(\"regenerator-runtime/runtime.js\");\n }\n path.remove();\n }\n },\n usageGlobal(meta, utils) {\n const resolved = resolve(meta);\n if (!resolved) return;\n let deps = resolved.desc.global;\n if (resolved.kind !== \"global\" && \"object\" in meta && meta.object && meta.placement === \"prototype\") {\n const low = meta.object.toLowerCase();\n deps = deps.filter(m => m.includes(low));\n }\n inject(deps, utils);\n },\n usagePure(meta, utils, path) {\n if (meta.kind === \"in\") {\n if (meta.key === \"Symbol.iterator\") {\n path.replaceWith(t.callExpression(utils.injectDefaultImport(`${coreJSBase}/is-iterable${ext}`, \"isIterable\"), [path.node.right] // meta.kind === \"in\" narrows this\n ));\n }\n\n return;\n }\n if (path.parentPath.isUnaryExpression({\n operator: \"delete\"\n })) return;\n if (meta.kind === \"property\") {\n // We can't compile destructuring.\n if (!path.isMemberExpression()) return;\n if (!path.isReferenced()) return;\n if (meta.key === \"Symbol.iterator\" && shouldInjectPolyfill(\"es6.symbol\") && path.parentPath.isCallExpression({\n callee: path.node\n }) && path.parentPath.node.arguments.length === 0) {\n path.parentPath.replaceWith(t.callExpression(utils.injectDefaultImport(`${coreJSBase}/get-iterator${ext}`, \"getIterator\"), [path.node.object]));\n path.skip();\n return;\n }\n }\n const resolved = resolve(meta);\n if (!resolved) return;\n const id = maybeInjectPure(resolved.desc, resolved.name, utils);\n if (id) path.replaceWith(id);\n },\n visitor: method === \"usage-global\" && {\n // yield*\n YieldExpression(path) {\n if (path.node.delegate) {\n inject(\"web.dom.iterable\", api.getUtils(path));\n }\n },\n // for-of, [a, b] = c\n \"ForOfStatement|ArrayPattern\"(path) {\n _builtInDefinitions.CommonIterators.forEach(name => inject(name, api.getUtils(path)));\n }\n }\n };\n});\nexports.default = _default;","// env vars from the cli are always strings, so !!ENV_VAR returns true for \"false\"\nfunction bool(value) {\n if (value == null) return false;\n return value && value !== \"false\" && value !== \"0\";\n}\n\nmodule.exports = bool(process.env[\"BABEL_8_BREAKING\"])\n ? null\n : require(\"babel-plugin-polyfill-corejs2-BABEL_8_BREAKING-false\");\n0 && (exports.default = 0);","\"use strict\";\n\nexports.__esModule = true;\nexports.default = void 0;\nvar _helperDefinePolyfillProvider = _interopRequireDefault(require(\"@babel/helper-define-polyfill-provider\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nconst runtimeCompat = \"#__secret_key__@babel/runtime__compatibility\";\nvar _default = (0, _helperDefinePolyfillProvider.default)(({\n debug,\n targets,\n babel\n}, options) => {\n if (!shallowEqual(targets, babel.targets())) {\n throw new Error(\"This plugin does not use the targets option. Only preset-env's targets\" + \" or top-level targets need to be configured for this plugin to work.\" + \" See https://github.com/babel/babel-polyfills/issues/36 for more\" + \" details.\");\n }\n const {\n [runtimeCompat]: {\n moduleName = null,\n useBabelRuntime = false\n } = {}\n } = options;\n return {\n name: \"regenerator\",\n polyfills: [\"regenerator-runtime\"],\n usageGlobal(meta, utils) {\n if (isRegenerator(meta)) {\n debug(\"regenerator-runtime\");\n utils.injectGlobalImport(\"regenerator-runtime/runtime.js\");\n }\n },\n usagePure(meta, utils, path) {\n if (isRegenerator(meta)) {\n let pureName = \"regenerator-runtime\";\n if (useBabelRuntime) {\n var _ref;\n const runtimeName = (_ref = moduleName != null ? moduleName : path.hub.file.get(\"runtimeHelpersModuleName\")) != null ? _ref : \"@babel/runtime\";\n pureName = `${runtimeName}/regenerator`;\n }\n path.replaceWith(utils.injectDefaultImport(pureName, \"regenerator-runtime\"));\n }\n }\n };\n});\nexports.default = _default;\nconst isRegenerator = meta => meta.kind === \"global\" && meta.name === \"regeneratorRuntime\";\nfunction shallowEqual(obj1, obj2) {\n return JSON.stringify(obj1) === JSON.stringify(obj2);\n}","// env vars from the cli are always strings, so !!ENV_VAR returns true for \"false\"\nfunction bool(value) {\n if (value == null) return false;\n return value && value !== \"false\" && value !== \"0\";\n}\n\nmodule.exports = bool(process.env[\"BABEL_8_BREAKING\"])\n ? null\n : require(\"babel-plugin-polyfill-regenerator-BABEL_8_BREAKING-false\");\n0 && (exports.default = 0);","// TODO(Babel 8) Remove this file\nif (process.env.BABEL_8_BREAKING) {\n throw new Error(\n \"Internal Babel error: This file should only be loaded in Babel 7\",\n );\n}\n\nexports.getImportSource = function ({ node }) {\n if (node.specifiers.length === 0) return node.source.value;\n};\n\nexports.getRequireSource = function ({ node }) {\n if (node.type !== \"ExpressionStatement\") return;\n const { expression } = node;\n if (\n expression.type === \"CallExpression\" &&\n expression.callee.type === \"Identifier\" &&\n expression.callee.name === \"require\" &&\n expression.arguments.length === 1 &&\n expression.arguments[0].type === \"StringLiteral\"\n ) {\n return expression.arguments[0].value;\n }\n};\n\nexports.isPolyfillSource = function (source) {\n return source === \"@babel/polyfill\" || source === \"core-js\";\n};\n","// TODO(Babel 8) Remove this file\nif (process.env.BABEL_8_BREAKING) {\n throw new Error(\n \"Internal Babel error: This file should only be loaded in Babel 7\",\n );\n}\n\nconst {\n getImportSource,\n getRequireSource,\n isPolyfillSource,\n} = require(\"./utils.cjs\");\n\nconst BABEL_POLYFILL_DEPRECATION = `\n \\`@babel/polyfill\\` is deprecated. Please, use required parts of \\`core-js\\`\n and \\`regenerator-runtime/runtime\\` separately`;\n\nconst NO_DIRECT_POLYFILL_IMPORT = `\n When setting \\`useBuiltIns: 'usage'\\`, polyfills are automatically imported when needed.\n Please remove the direct import of \\`SPECIFIER\\` or use \\`useBuiltIns: 'entry'\\` instead.`;\n\nmodule.exports = function ({ template }, { regenerator, deprecated, usage }) {\n return {\n name: \"preset-env/replace-babel-polyfill\",\n visitor: {\n ImportDeclaration(path) {\n const src = getImportSource(path);\n if (usage && isPolyfillSource(src)) {\n console.warn(NO_DIRECT_POLYFILL_IMPORT.replace(\"SPECIFIER\", src));\n if (!deprecated) path.remove();\n } else if (src === \"@babel/polyfill\") {\n if (deprecated) {\n console.warn(BABEL_POLYFILL_DEPRECATION);\n } else if (regenerator) {\n path.replaceWithMultiple(template.ast`\n import \"core-js\";\n import \"regenerator-runtime/runtime.js\";\n `);\n } else {\n path.replaceWith(template.ast`\n import \"core-js\";\n `);\n }\n }\n },\n Program(path) {\n path.get(\"body\").forEach(bodyPath => {\n const src = getRequireSource(bodyPath);\n if (usage && isPolyfillSource(src)) {\n console.warn(NO_DIRECT_POLYFILL_IMPORT.replace(\"SPECIFIER\", src));\n if (!deprecated) bodyPath.remove();\n } else if (src === \"@babel/polyfill\") {\n if (deprecated) {\n console.warn(BABEL_POLYFILL_DEPRECATION);\n } else if (regenerator) {\n bodyPath.replaceWithMultiple(template.ast`\n require(\"core-js\");\n require(\"regenerator-runtime/runtime.js\");\n `);\n } else {\n bodyPath.replaceWith(template.ast`\n require(\"core-js\");\n `);\n }\n }\n });\n },\n },\n };\n};\n","// TODO(Babel 8) Remove this file\nif (process.env.BABEL_8_BREAKING) {\n throw new Error(\n \"Internal Babel error: This file should only be loaded in Babel 7\",\n );\n}\n\nconst { getImportSource, getRequireSource } = require(\"./utils.cjs\");\n\nfunction isRegeneratorSource(source) {\n return (\n source === \"regenerator-runtime/runtime\" ||\n source === \"regenerator-runtime/runtime.js\"\n );\n}\n\nmodule.exports = function () {\n const visitor = {\n ImportDeclaration(path) {\n if (isRegeneratorSource(getImportSource(path))) {\n this.regeneratorImportExcluded = true;\n path.remove();\n }\n },\n Program(path) {\n path.get(\"body\").forEach(bodyPath => {\n if (isRegeneratorSource(getRequireSource(bodyPath))) {\n this.regeneratorImportExcluded = true;\n bodyPath.remove();\n }\n });\n },\n };\n\n return {\n name: \"preset-env/remove-regenerator\",\n visitor,\n pre() {\n this.regeneratorImportExcluded = false;\n },\n post() {\n if (this.opts.debug && this.regeneratorImportExcluded) {\n let filename = this.file.opts.filename;\n // normalize filename to generate consistent preset-env test fixtures\n if (process.env.BABEL_ENV === \"test\") {\n filename = filename.replace(/\\\\/g, \"/\");\n }\n console.log(\n `\\n[${filename}] Based on your targets, regenerator-runtime import excluded.`,\n );\n }\n },\n };\n};\n","// TODO(Babel 8): Remove this file\n\nif (!process.env.BABEL_8_BREAKING) {\n Object.defineProperties(exports, {\n pluginCoreJS2: {\n get: () => require(\"babel-plugin-polyfill-corejs2\").default,\n },\n pluginRegenerator: {\n get: () => require(\"babel-plugin-polyfill-regenerator\").default,\n },\n legacyBabelPolyfillPlugin: { get: () => require(\"./babel-polyfill.cjs\") },\n removeRegeneratorEntryPlugin: { get: () => require(\"./regenerator.cjs\") },\n corejs2Polyfills: {\n get: () => require(\"@babel/compat-data/corejs2-built-ins\"),\n },\n });\n}\n","import semver, { type SemVer } from \"semver\";\nimport corejs3Polyfills from \"core-js-compat/data.json\" with { type: \"json\" };\nimport { plugins as pluginsList } from \"./plugins-compat-data.ts\";\nimport moduleTransformations from \"./module-transformations.ts\";\nimport {\n TopLevelOptions,\n ModulesOption,\n UseBuiltInsOption,\n} from \"./options.ts\";\nimport { OptionValidator } from \"@babel/helper-validator-option\";\n\n// TODO(Babel 8): Remove this\nimport babel7 from \"./polyfills/babel-7-plugins.cjs\";\n\nimport type {\n BuiltInsOption,\n CorejsOption,\n ModuleOption,\n Options,\n PluginListOption,\n} from \"./types.ts\";\n\nconst v = new OptionValidator(PACKAGE_JSON.name);\n\nconst allPluginsList = Object.keys(pluginsList);\n\n// NOTE: Since module plugins are handled separately compared to other plugins (via the \"modules\" option) it\n// should only be possible to exclude and not include module plugins, otherwise it's possible that preset-env\n// will add a module plugin twice.\nconst modulePlugins = [\n \"transform-dynamic-import\",\n ...Object.keys(moduleTransformations).map(m => moduleTransformations[m]),\n];\n\nconst getValidIncludesAndExcludes = (\n type: \"include\" | \"exclude\",\n corejs: number | false,\n) => {\n const set = new Set(allPluginsList);\n if (type === \"exclude\") modulePlugins.map(set.add, set);\n if (corejs) {\n if (!process.env.BABEL_8_BREAKING && corejs === 2) {\n Object.keys(babel7.corejs2Polyfills).map(set.add, set);\n set.add(\"web.timers\").add(\"web.immediate\").add(\"web.dom.iterable\");\n } else {\n Object.keys(corejs3Polyfills).map(set.add, set);\n }\n }\n return Array.from(set);\n};\n\nfunction flatMap(array: Array, fn: (item: T) => Array): Array {\n return Array.prototype.concat.apply([], array.map(fn));\n}\n\nexport const normalizePluginName = (plugin: string) =>\n plugin.replace(/^(?:@babel\\/|babel-)(?:plugin-)?/, \"\");\n\nconst expandIncludesAndExcludes = (\n filterList: PluginListOption = [],\n type: \"include\" | \"exclude\",\n corejs: number | false,\n) => {\n if (filterList.length === 0) return [];\n\n const filterableItems = getValidIncludesAndExcludes(type, corejs);\n\n const invalidFilters: PluginListOption = [];\n const selectedPlugins = flatMap(filterList, filter => {\n let re: RegExp;\n if (typeof filter === \"string\") {\n try {\n re = new RegExp(`^${normalizePluginName(filter)}$`);\n } catch (_) {\n invalidFilters.push(filter);\n return [];\n }\n } else {\n re = filter;\n }\n const items = filterableItems.filter(item => {\n return process.env.BABEL_8_BREAKING\n ? re.test(item)\n : re.test(item) ||\n // For backwards compatibility, we also support matching against the\n // proposal- name.\n re.test(item.replace(/^transform-/, \"proposal-\"));\n });\n if (items.length === 0) invalidFilters.push(filter);\n return items;\n });\n\n v.invariant(\n invalidFilters.length === 0,\n `The plugins/built-ins '${invalidFilters.join(\n \", \",\n )}' passed to the '${type}' option are not\n valid. Please check data/[plugin-features|built-in-features].js in babel-preset-env`,\n );\n\n return selectedPlugins;\n};\n\nexport const checkDuplicateIncludeExcludes = (\n include: Array = [],\n exclude: Array = [],\n) => {\n const duplicates = include.filter(opt => exclude.includes(opt));\n\n v.invariant(\n duplicates.length === 0,\n `The plugins/built-ins '${duplicates.join(\n \", \",\n )}' were found in both the \"include\" and\n \"exclude\" options.`,\n );\n};\n\nconst normalizeTargets = (\n targets: string | string[] | Options[\"targets\"],\n): Options[\"targets\"] => {\n // TODO: Allow to use only query or strings as a targets from next breaking change.\n if (typeof targets === \"string\" || Array.isArray(targets)) {\n return { browsers: targets };\n }\n return { ...targets };\n};\n\nexport const validateModulesOption = (\n modulesOpt: ModuleOption = ModulesOption.auto,\n) => {\n v.invariant(\n // @ts-expect-error we have provided fallback for undefined keys\n ModulesOption[modulesOpt.toString()] || modulesOpt === ModulesOption.false,\n `The 'modules' option must be one of \\n` +\n ` - 'false' to indicate no module processing\\n` +\n ` - a specific module type: 'commonjs', 'amd', 'umd', 'systemjs'` +\n ` - 'auto' (default) which will automatically select 'false' if the current\\n` +\n ` process is known to support ES module syntax, or \"commonjs\" otherwise\\n`,\n );\n\n return modulesOpt;\n};\n\nexport const validateUseBuiltInsOption = (\n builtInsOpt: BuiltInsOption = false,\n) => {\n v.invariant(\n // @ts-expect-error we have provided fallback for undefined keys\n UseBuiltInsOption[builtInsOpt.toString()] ||\n builtInsOpt === UseBuiltInsOption.false,\n `The 'useBuiltIns' option must be either\n 'false' (default) to indicate no polyfill,\n '\"entry\"' to indicate replacing the entry polyfill, or\n '\"usage\"' to import only used polyfills per file`,\n );\n\n return builtInsOpt;\n};\n\nexport type NormalizedCorejsOption = {\n proposals: boolean;\n version: SemVer | null | false;\n};\n\nexport function normalizeCoreJSOption(\n corejs: CorejsOption | undefined | null,\n useBuiltIns: BuiltInsOption,\n): NormalizedCorejsOption {\n let proposals = false;\n let rawVersion: false | string | number | undefined | null;\n\n if (useBuiltIns && corejs === undefined) {\n if (process.env.BABEL_8_BREAKING) {\n throw new Error(\n \"When using the `useBuiltIns` option you must specify\" +\n ' the code-js version you are using, such as `\"corejs\": \"3.32.0\"`.',\n );\n } else {\n rawVersion = 2;\n console.warn(\n \"\\nWARNING (@babel/preset-env): We noticed you're using the `useBuiltIns` option without declaring a \" +\n `core-js version. Currently, we assume version 2.x when no version ` +\n \"is passed. Since this default version will likely change in future \" +\n \"versions of Babel, we recommend explicitly setting the core-js version \" +\n \"you are using via the `corejs` option.\\n\" +\n \"\\nYou should also be sure that the version you pass to the `corejs` \" +\n \"option matches the version specified in your `package.json`'s \" +\n \"`dependencies` section. If it doesn't, you need to run one of the \" +\n \"following commands:\\n\\n\" +\n \" npm install --save core-js@2 npm install --save core-js@3\\n\" +\n \" yarn add core-js@2 yarn add core-js@3\\n\\n\" +\n \"More info about useBuiltIns: https://babeljs.io/docs/en/babel-preset-env#usebuiltins\\n\" +\n \"More info about core-js: https://babeljs.io/docs/en/babel-preset-env#corejs\",\n );\n }\n } else if (typeof corejs === \"object\" && corejs !== null) {\n rawVersion = corejs.version;\n proposals = Boolean(corejs.proposals);\n } else {\n rawVersion = corejs as false | string | number | undefined | null;\n }\n\n const version = rawVersion ? semver.coerce(String(rawVersion)) : false;\n\n if (version) {\n if (useBuiltIns) {\n if (process.env.BABEL_8_BREAKING) {\n if (version.major !== 3) {\n throw new RangeError(\n \"Invalid Option: The version passed to `corejs` is invalid. Currently, \" +\n \"only core-js@3 is supported.\",\n );\n }\n\n if (\n typeof rawVersion !== \"string\" ||\n !String(rawVersion).includes(\".\")\n ) {\n throw new Error(\n 'Invalid Option: The version passed to `corejs` is invalid. Please use string and specify the minor version, such as `\"3.33\"`.',\n );\n }\n } else {\n if (version.major < 2 || version.major > 3) {\n throw new RangeError(\n \"Invalid Option: The version passed to `corejs` is invalid. Currently, \" +\n \"only core-js@2 and core-js@3 are supported.\",\n );\n }\n }\n } else {\n console.warn(\n \"\\nWARNING (@babel/preset-env): The `corejs` option only has an effect when the `useBuiltIns` option is not `false`\\n\",\n );\n }\n }\n\n return { version, proposals };\n}\n\nexport default function normalizeOptions(opts: Options) {\n v.validateTopLevelOptions(opts, TopLevelOptions);\n\n const useBuiltIns = validateUseBuiltInsOption(opts.useBuiltIns);\n\n const corejs = normalizeCoreJSOption(opts.corejs, useBuiltIns);\n\n const include = expandIncludesAndExcludes(\n opts.include,\n TopLevelOptions.include,\n !!corejs.version && corejs.version.major,\n );\n\n const exclude = expandIncludesAndExcludes(\n opts.exclude,\n TopLevelOptions.exclude,\n !!corejs.version && corejs.version.major,\n );\n\n checkDuplicateIncludeExcludes(include, exclude);\n\n if (!process.env.BABEL_8_BREAKING) {\n v.validateBooleanOption(\"loose\", opts.loose);\n v.validateBooleanOption(\"spec\", opts.spec);\n }\n\n return {\n bugfixes: v.validateBooleanOption(\n TopLevelOptions.bugfixes,\n opts.bugfixes,\n process.env.BABEL_8_BREAKING ? true : false,\n ),\n configPath: v.validateStringOption(\n TopLevelOptions.configPath,\n opts.configPath,\n process.cwd(),\n ),\n corejs,\n debug: v.validateBooleanOption(TopLevelOptions.debug, opts.debug, false),\n include,\n exclude,\n forceAllTransforms: v.validateBooleanOption(\n TopLevelOptions.forceAllTransforms,\n opts.forceAllTransforms,\n false,\n ),\n ignoreBrowserslistConfig: v.validateBooleanOption(\n TopLevelOptions.ignoreBrowserslistConfig,\n opts.ignoreBrowserslistConfig,\n false,\n ),\n modules: validateModulesOption(opts.modules),\n shippedProposals: v.validateBooleanOption(\n TopLevelOptions.shippedProposals,\n opts.shippedProposals,\n false,\n ),\n targets: normalizeTargets(opts.targets),\n useBuiltIns: useBuiltIns,\n browserslistEnv: v.validateStringOption(\n TopLevelOptions.browserslistEnv,\n opts.browserslistEnv,\n ),\n };\n}\n","// TODO(Babel 8): Remove this file\n/* eslint sort-keys: \"error\" */\n// These mappings represent the transform plugins that have been\n// shipped by browsers, and are enabled by the `shippedProposals` option.\n\nconst proposalPlugins = new Set();\n\n// proposal syntax plugins enabled by the `shippedProposals` option.\n// Unlike proposalPlugins above, they are independent of compiler targets.\nconst proposalSyntaxPlugins = [\n \"syntax-import-assertions\",\n \"syntax-import-attributes\",\n] as const;\n\n// use intermediary object to enforce alphabetical key order\nconst pluginSyntaxObject = process.env.BABEL_8_BREAKING\n ? {}\n : ({\n \"transform-async-generator-functions\": \"syntax-async-generators\",\n \"transform-class-properties\": \"syntax-class-properties\",\n \"transform-class-static-block\": \"syntax-class-static-block\",\n \"transform-export-namespace-from\": \"syntax-export-namespace-from\",\n \"transform-json-strings\": \"syntax-json-strings\",\n \"transform-nullish-coalescing-operator\":\n \"syntax-nullish-coalescing-operator\",\n \"transform-numeric-separator\": \"syntax-numeric-separator\",\n \"transform-object-rest-spread\": \"syntax-object-rest-spread\",\n \"transform-optional-catch-binding\": \"syntax-optional-catch-binding\",\n \"transform-optional-chaining\": \"syntax-optional-chaining\",\n // note: we don't have syntax-private-methods\n \"transform-private-methods\": \"syntax-class-properties\",\n \"transform-private-property-in-object\":\n \"syntax-private-property-in-object\",\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion\n \"transform-unicode-property-regex\": null as null,\n } as const);\n\ntype PluginSyntaxObjectKeys = keyof typeof pluginSyntaxObject;\n\nconst pluginSyntaxEntries = Object.keys(pluginSyntaxObject).map<\n [PluginSyntaxObjectKeys, string | null]\n>(function (key: PluginSyntaxObjectKeys) {\n return [key, pluginSyntaxObject[key]];\n});\n\nconst pluginSyntaxMap = new Map(pluginSyntaxEntries);\n\nexport { proposalPlugins, proposalSyntaxPlugins, pluginSyntaxMap };\n","module.exports = require(\"core-js-compat/data\");\n","module.exports = require(\"core-js-compat/get-modules-list-for-target-version\");\n","module.exports = require(\"core-js-compat/entries\");\n","import { declare } from '@babel/helper-plugin-utils';\nimport _getTargets, { prettifyTargets, getInclusionReasons, isRequired } from '@babel/helper-compilation-targets';\nimport * as _babel from '@babel/core';\n\nconst {\n types: t$1,\n template: template\n} = _babel.default || _babel;\nfunction intersection(a, b) {\n const result = new Set();\n a.forEach(v => b.has(v) && result.add(v));\n return result;\n}\nfunction has$1(object, key) {\n return Object.prototype.hasOwnProperty.call(object, key);\n}\nfunction getType(target) {\n return Object.prototype.toString.call(target).slice(8, -1);\n}\nfunction resolveId(path) {\n if (path.isIdentifier() && !path.scope.hasBinding(path.node.name, /* noGlobals */true)) {\n return path.node.name;\n }\n if (path.isPure()) {\n const {\n deopt\n } = path.evaluate();\n if (deopt && deopt.isIdentifier()) {\n return deopt.node.name;\n }\n }\n}\nfunction resolveKey(path, computed = false) {\n const {\n scope\n } = path;\n if (path.isStringLiteral()) return path.node.value;\n const isIdentifier = path.isIdentifier();\n if (isIdentifier && !(computed || path.parent.computed)) {\n return path.node.name;\n }\n if (computed && path.isMemberExpression() && path.get(\"object\").isIdentifier({\n name: \"Symbol\"\n }) && !scope.hasBinding(\"Symbol\", /* noGlobals */true)) {\n const sym = resolveKey(path.get(\"property\"), path.node.computed);\n if (sym) return \"Symbol.\" + sym;\n }\n if (isIdentifier ? scope.hasBinding(path.node.name, /* noGlobals */true) : path.isPure()) {\n const {\n value\n } = path.evaluate();\n if (typeof value === \"string\") return value;\n }\n}\nfunction resolveSource(obj) {\n if (obj.isMemberExpression() && obj.get(\"property\").isIdentifier({\n name: \"prototype\"\n })) {\n const id = resolveId(obj.get(\"object\"));\n if (id) {\n return {\n id,\n placement: \"prototype\"\n };\n }\n return {\n id: null,\n placement: null\n };\n }\n const id = resolveId(obj);\n if (id) {\n return {\n id,\n placement: \"static\"\n };\n }\n if (obj.isRegExpLiteral()) {\n return {\n id: \"RegExp\",\n placement: \"prototype\"\n };\n } else if (obj.isFunction()) {\n return {\n id: \"Function\",\n placement: \"prototype\"\n };\n } else if (obj.isPure()) {\n const {\n value\n } = obj.evaluate();\n if (value !== undefined) {\n return {\n id: getType(value),\n placement: \"prototype\"\n };\n }\n }\n return {\n id: null,\n placement: null\n };\n}\nfunction getImportSource({\n node\n}) {\n if (node.specifiers.length === 0) return node.source.value;\n}\nfunction getRequireSource({\n node\n}) {\n if (!t$1.isExpressionStatement(node)) return;\n const {\n expression\n } = node;\n if (t$1.isCallExpression(expression) && t$1.isIdentifier(expression.callee) && expression.callee.name === \"require\" && expression.arguments.length === 1 && t$1.isStringLiteral(expression.arguments[0])) {\n return expression.arguments[0].value;\n }\n}\nfunction hoist(node) {\n // @ts-expect-error\n node._blockHoist = 3;\n return node;\n}\nfunction createUtilsGetter(cache) {\n return path => {\n const prog = path.findParent(p => p.isProgram());\n return {\n injectGlobalImport(url, moduleName) {\n cache.storeAnonymous(prog, url, moduleName, (isScript, source) => {\n return isScript ? template.statement.ast`require(${source})` : t$1.importDeclaration([], source);\n });\n },\n injectNamedImport(url, name, hint = name, moduleName) {\n return cache.storeNamed(prog, url, name, moduleName, (isScript, source, name) => {\n const id = prog.scope.generateUidIdentifier(hint);\n return {\n node: isScript ? hoist(template.statement.ast`\n var ${id} = require(${source}).${name}\n `) : t$1.importDeclaration([t$1.importSpecifier(id, name)], source),\n name: id.name\n };\n });\n },\n injectDefaultImport(url, hint = url, moduleName) {\n return cache.storeNamed(prog, url, \"default\", moduleName, (isScript, source) => {\n const id = prog.scope.generateUidIdentifier(hint);\n return {\n node: isScript ? hoist(template.statement.ast`var ${id} = require(${source})`) : t$1.importDeclaration([t$1.importDefaultSpecifier(id)], source),\n name: id.name\n };\n });\n }\n };\n };\n}\n\nconst {\n types: t\n} = _babel.default || _babel;\nclass ImportsCachedInjector {\n constructor(resolver, getPreferredIndex) {\n this._imports = new WeakMap();\n this._anonymousImports = new WeakMap();\n this._lastImports = new WeakMap();\n this._resolver = resolver;\n this._getPreferredIndex = getPreferredIndex;\n }\n storeAnonymous(programPath, url, moduleName, getVal) {\n const key = this._normalizeKey(programPath, url);\n const imports = this._ensure(this._anonymousImports, programPath, Set);\n if (imports.has(key)) return;\n const node = getVal(programPath.node.sourceType === \"script\", t.stringLiteral(this._resolver(url)));\n imports.add(key);\n this._injectImport(programPath, node, moduleName);\n }\n storeNamed(programPath, url, name, moduleName, getVal) {\n const key = this._normalizeKey(programPath, url, name);\n const imports = this._ensure(this._imports, programPath, Map);\n if (!imports.has(key)) {\n const {\n node,\n name: id\n } = getVal(programPath.node.sourceType === \"script\", t.stringLiteral(this._resolver(url)), t.identifier(name));\n imports.set(key, id);\n this._injectImport(programPath, node, moduleName);\n }\n return t.identifier(imports.get(key));\n }\n _injectImport(programPath, node, moduleName) {\n var _this$_lastImports$ge;\n const newIndex = this._getPreferredIndex(moduleName);\n const lastImports = (_this$_lastImports$ge = this._lastImports.get(programPath)) != null ? _this$_lastImports$ge : [];\n const isPathStillValid = path => path.node &&\n // Sometimes the AST is modified and the \"last import\"\n // we have has been replaced\n path.parent === programPath.node && path.container === programPath.node.body;\n let last;\n if (newIndex === Infinity) {\n // Fast path: we can always just insert at the end if newIndex is `Infinity`\n if (lastImports.length > 0) {\n last = lastImports[lastImports.length - 1].path;\n if (!isPathStillValid(last)) last = undefined;\n }\n } else {\n for (const [i, data] of lastImports.entries()) {\n const {\n path,\n index\n } = data;\n if (isPathStillValid(path)) {\n if (newIndex < index) {\n const [newPath] = path.insertBefore(node);\n lastImports.splice(i, 0, {\n path: newPath,\n index: newIndex\n });\n return;\n }\n last = path;\n }\n }\n }\n if (last) {\n const [newPath] = last.insertAfter(node);\n lastImports.push({\n path: newPath,\n index: newIndex\n });\n } else {\n const [newPath] = programPath.unshiftContainer(\"body\", node);\n this._lastImports.set(programPath, [{\n path: newPath,\n index: newIndex\n }]);\n }\n }\n _ensure(map, programPath, Collection) {\n let collection = map.get(programPath);\n if (!collection) {\n collection = new Collection();\n map.set(programPath, collection);\n }\n return collection;\n }\n _normalizeKey(programPath, url, name = \"\") {\n const {\n sourceType\n } = programPath.node;\n\n // If we rely on the imported binding (the \"name\" parameter), we also need to cache\n // based on the sourceType. This is because the module transforms change the names\n // of the import variables.\n return `${name && sourceType}::${url}::${name}`;\n }\n}\n\nconst presetEnvSilentDebugHeader = \"#__secret_key__@babel/preset-env__don't_log_debug_header_and_resolved_targets\";\nfunction stringifyTargetsMultiline(targets) {\n return JSON.stringify(prettifyTargets(targets), null, 2);\n}\n\nfunction patternToRegExp(pattern) {\n if (pattern instanceof RegExp) return pattern;\n try {\n return new RegExp(`^${pattern}$`);\n } catch {\n return null;\n }\n}\nfunction buildUnusedError(label, unused) {\n if (!unused.length) return \"\";\n return ` - The following \"${label}\" patterns didn't match any polyfill:\\n` + unused.map(original => ` ${String(original)}\\n`).join(\"\");\n}\nfunction buldDuplicatesError(duplicates) {\n if (!duplicates.size) return \"\";\n return ` - The following polyfills were matched both by \"include\" and \"exclude\" patterns:\\n` + Array.from(duplicates, name => ` ${name}\\n`).join(\"\");\n}\nfunction validateIncludeExclude(provider, polyfills, includePatterns, excludePatterns) {\n let current;\n const filter = pattern => {\n const regexp = patternToRegExp(pattern);\n if (!regexp) return false;\n let matched = false;\n for (const polyfill of polyfills.keys()) {\n if (regexp.test(polyfill)) {\n matched = true;\n current.add(polyfill);\n }\n }\n return !matched;\n };\n\n // prettier-ignore\n const include = current = new Set();\n const unusedInclude = Array.from(includePatterns).filter(filter);\n\n // prettier-ignore\n const exclude = current = new Set();\n const unusedExclude = Array.from(excludePatterns).filter(filter);\n const duplicates = intersection(include, exclude);\n if (duplicates.size > 0 || unusedInclude.length > 0 || unusedExclude.length > 0) {\n throw new Error(`Error while validating the \"${provider}\" provider options:\\n` + buildUnusedError(\"include\", unusedInclude) + buildUnusedError(\"exclude\", unusedExclude) + buldDuplicatesError(duplicates));\n }\n return {\n include,\n exclude\n };\n}\nfunction applyMissingDependenciesDefaults(options, babelApi) {\n const {\n missingDependencies = {}\n } = options;\n if (missingDependencies === false) return false;\n const caller = babelApi.caller(caller => caller == null ? void 0 : caller.name);\n const {\n log = \"deferred\",\n inject = caller === \"rollup-plugin-babel\" ? \"throw\" : \"import\",\n all = false\n } = missingDependencies;\n return {\n log,\n inject,\n all\n };\n}\n\nfunction isRemoved(path) {\n if (path.removed) return true;\n if (!path.parentPath) return false;\n if (path.listKey) {\n if (!path.parentPath.node[path.listKey].includes(path.node)) return true;\n } else {\n if (path.parentPath.node[path.key] !== path.node) return true;\n }\n return isRemoved(path.parentPath);\n}\nvar usage = (callProvider => {\n function property(object, key, placement, path) {\n return callProvider({\n kind: \"property\",\n object,\n key,\n placement\n }, path);\n }\n function handleReferencedIdentifier(path) {\n const {\n node: {\n name\n },\n scope\n } = path;\n if (scope.getBindingIdentifier(name)) return;\n callProvider({\n kind: \"global\",\n name\n }, path);\n }\n function analyzeMemberExpression(path) {\n const key = resolveKey(path.get(\"property\"), path.node.computed);\n return {\n key,\n handleAsMemberExpression: !!key && key !== \"prototype\"\n };\n }\n return {\n // Symbol(), new Promise\n ReferencedIdentifier(path) {\n const {\n parentPath\n } = path;\n if (parentPath.isMemberExpression({\n object: path.node\n }) && analyzeMemberExpression(parentPath).handleAsMemberExpression) {\n return;\n }\n handleReferencedIdentifier(path);\n },\n MemberExpression(path) {\n const {\n key,\n handleAsMemberExpression\n } = analyzeMemberExpression(path);\n if (!handleAsMemberExpression) return;\n const object = path.get(\"object\");\n let objectIsGlobalIdentifier = object.isIdentifier();\n if (objectIsGlobalIdentifier) {\n const binding = object.scope.getBinding(object.node.name);\n if (binding) {\n if (binding.path.isImportNamespaceSpecifier()) return;\n objectIsGlobalIdentifier = false;\n }\n }\n const source = resolveSource(object);\n let skipObject = property(source.id, key, source.placement, path);\n skipObject || (skipObject = !objectIsGlobalIdentifier || path.shouldSkip || object.shouldSkip || isRemoved(object));\n if (!skipObject) handleReferencedIdentifier(object);\n },\n ObjectPattern(path) {\n const {\n parentPath,\n parent\n } = path;\n let obj;\n\n // const { keys, values } = Object\n if (parentPath.isVariableDeclarator()) {\n obj = parentPath.get(\"init\");\n // ({ keys, values } = Object)\n } else if (parentPath.isAssignmentExpression()) {\n obj = parentPath.get(\"right\");\n // !function ({ keys, values }) {...} (Object)\n // resolution does not work after properties transform :-(\n } else if (parentPath.isFunction()) {\n const grand = parentPath.parentPath;\n if (grand.isCallExpression() || grand.isNewExpression()) {\n if (grand.node.callee === parent) {\n obj = grand.get(\"arguments\")[path.key];\n }\n }\n }\n let id = null;\n let placement = null;\n if (obj) ({\n id,\n placement\n } = resolveSource(obj));\n for (const prop of path.get(\"properties\")) {\n if (prop.isObjectProperty()) {\n const key = resolveKey(prop.get(\"key\"));\n if (key) property(id, key, placement, prop);\n }\n }\n },\n BinaryExpression(path) {\n if (path.node.operator !== \"in\") return;\n const source = resolveSource(path.get(\"right\"));\n const key = resolveKey(path.get(\"left\"), true);\n if (!key) return;\n callProvider({\n kind: \"in\",\n object: source.id,\n key,\n placement: source.placement\n }, path);\n }\n };\n});\n\nvar entry = (callProvider => ({\n ImportDeclaration(path) {\n const source = getImportSource(path);\n if (!source) return;\n callProvider({\n kind: \"import\",\n source\n }, path);\n },\n Program(path) {\n path.get(\"body\").forEach(bodyPath => {\n const source = getRequireSource(bodyPath);\n if (!source) return;\n callProvider({\n kind: \"import\",\n source\n }, bodyPath);\n });\n }\n}));\n\nfunction resolve(dirname, moduleName, absoluteImports) {\n if (absoluteImports === false) return moduleName;\n throw new Error(`\"absoluteImports\" is not supported in bundles prepared for the browser.`);\n}\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nfunction has(basedir, name) {\n return true;\n}\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nfunction logMissing(missingDeps) {}\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nfunction laterLogMissing(missingDeps) {}\n\nconst PossibleGlobalObjects = new Set([\"global\", \"globalThis\", \"self\", \"window\"]);\nfunction createMetaResolver(polyfills) {\n const {\n static: staticP,\n instance: instanceP,\n global: globalP\n } = polyfills;\n return meta => {\n if (meta.kind === \"global\" && globalP && has$1(globalP, meta.name)) {\n return {\n kind: \"global\",\n desc: globalP[meta.name],\n name: meta.name\n };\n }\n if (meta.kind === \"property\" || meta.kind === \"in\") {\n const {\n placement,\n object,\n key\n } = meta;\n if (object && placement === \"static\") {\n if (globalP && PossibleGlobalObjects.has(object) && has$1(globalP, key)) {\n return {\n kind: \"global\",\n desc: globalP[key],\n name: key\n };\n }\n if (staticP && has$1(staticP, object) && has$1(staticP[object], key)) {\n return {\n kind: \"static\",\n desc: staticP[object][key],\n name: `${object}$${key}`\n };\n }\n }\n if (instanceP && has$1(instanceP, key)) {\n return {\n kind: \"instance\",\n desc: instanceP[key],\n name: `${key}`\n };\n }\n }\n };\n}\n\nconst getTargets = _getTargets.default || _getTargets;\nfunction resolveOptions(options, babelApi) {\n const {\n method,\n targets: targetsOption,\n ignoreBrowserslistConfig,\n configPath,\n debug,\n shouldInjectPolyfill,\n absoluteImports,\n ...providerOptions\n } = options;\n if (isEmpty(options)) {\n throw new Error(`\\\nThis plugin requires options, for example:\n {\n \"plugins\": [\n [\"\", { method: \"usage-pure\" }]\n ]\n }\n\nSee more options at https://github.com/babel/babel-polyfills/blob/main/docs/usage.md`);\n }\n let methodName;\n if (method === \"usage-global\") methodName = \"usageGlobal\";else if (method === \"entry-global\") methodName = \"entryGlobal\";else if (method === \"usage-pure\") methodName = \"usagePure\";else if (typeof method !== \"string\") {\n throw new Error(\".method must be a string\");\n } else {\n throw new Error(`.method must be one of \"entry-global\", \"usage-global\"` + ` or \"usage-pure\" (received ${JSON.stringify(method)})`);\n }\n if (typeof shouldInjectPolyfill === \"function\") {\n if (options.include || options.exclude) {\n throw new Error(`.include and .exclude are not supported when using the` + ` .shouldInjectPolyfill function.`);\n }\n } else if (shouldInjectPolyfill != null) {\n throw new Error(`.shouldInjectPolyfill must be a function, or undefined` + ` (received ${JSON.stringify(shouldInjectPolyfill)})`);\n }\n if (absoluteImports != null && typeof absoluteImports !== \"boolean\" && typeof absoluteImports !== \"string\") {\n throw new Error(`.absoluteImports must be a boolean, a string, or undefined` + ` (received ${JSON.stringify(absoluteImports)})`);\n }\n let targets;\n if (\n // If any browserslist-related option is specified, fallback to the old\n // behavior of not using the targets specified in the top-level options.\n targetsOption || configPath || ignoreBrowserslistConfig) {\n const targetsObj = typeof targetsOption === \"string\" || Array.isArray(targetsOption) ? {\n browsers: targetsOption\n } : targetsOption;\n targets = getTargets(targetsObj, {\n ignoreBrowserslistConfig,\n configPath\n });\n } else {\n targets = babelApi.targets();\n }\n return {\n method,\n methodName,\n targets,\n absoluteImports: absoluteImports != null ? absoluteImports : false,\n shouldInjectPolyfill,\n debug: !!debug,\n providerOptions: providerOptions\n };\n}\nfunction instantiateProvider(factory, options, missingDependencies, dirname, debugLog, babelApi) {\n const {\n method,\n methodName,\n targets,\n debug,\n shouldInjectPolyfill,\n providerOptions,\n absoluteImports\n } = resolveOptions(options, babelApi);\n\n // eslint-disable-next-line prefer-const\n let include, exclude;\n let polyfillsSupport;\n let polyfillsNames;\n let filterPolyfills;\n const getUtils = createUtilsGetter(new ImportsCachedInjector(moduleName => resolve(dirname, moduleName, absoluteImports), name => {\n var _polyfillsNames$get, _polyfillsNames;\n return (_polyfillsNames$get = (_polyfillsNames = polyfillsNames) == null ? void 0 : _polyfillsNames.get(name)) != null ? _polyfillsNames$get : Infinity;\n }));\n const depsCache = new Map();\n const api = {\n babel: babelApi,\n getUtils,\n method: options.method,\n targets,\n createMetaResolver,\n shouldInjectPolyfill(name) {\n if (polyfillsNames === undefined) {\n throw new Error(`Internal error in the ${factory.name} provider: ` + `shouldInjectPolyfill() can't be called during initialization.`);\n }\n if (!polyfillsNames.has(name)) {\n console.warn(`Internal error in the ${providerName} provider: ` + `unknown polyfill \"${name}\".`);\n }\n if (filterPolyfills && !filterPolyfills(name)) return false;\n let shouldInject = isRequired(name, targets, {\n compatData: polyfillsSupport,\n includes: include,\n excludes: exclude\n });\n if (shouldInjectPolyfill) {\n shouldInject = shouldInjectPolyfill(name, shouldInject);\n if (typeof shouldInject !== \"boolean\") {\n throw new Error(`.shouldInjectPolyfill must return a boolean.`);\n }\n }\n return shouldInject;\n },\n debug(name) {\n var _debugLog, _debugLog$polyfillsSu;\n debugLog().found = true;\n if (!debug || !name) return;\n if (debugLog().polyfills.has(providerName)) return;\n debugLog().polyfills.add(name);\n (_debugLog$polyfillsSu = (_debugLog = debugLog()).polyfillsSupport) != null ? _debugLog$polyfillsSu : _debugLog.polyfillsSupport = polyfillsSupport;\n },\n assertDependency(name, version = \"*\") {\n if (missingDependencies === false) return;\n if (absoluteImports) {\n // If absoluteImports is not false, we will try resolving\n // the dependency and throw if it's not possible. We can\n // skip the check here.\n return;\n }\n const dep = version === \"*\" ? name : `${name}@^${version}`;\n const found = missingDependencies.all ? false : mapGetOr(depsCache, `${name} :: ${dirname}`, () => has());\n if (!found) {\n debugLog().missingDeps.add(dep);\n }\n }\n };\n const provider = factory(api, providerOptions, dirname);\n const providerName = provider.name || factory.name;\n if (typeof provider[methodName] !== \"function\") {\n throw new Error(`The \"${providerName}\" provider doesn't support the \"${method}\" polyfilling method.`);\n }\n if (Array.isArray(provider.polyfills)) {\n polyfillsNames = new Map(provider.polyfills.map((name, index) => [name, index]));\n filterPolyfills = provider.filterPolyfills;\n } else if (provider.polyfills) {\n polyfillsNames = new Map(Object.keys(provider.polyfills).map((name, index) => [name, index]));\n polyfillsSupport = provider.polyfills;\n filterPolyfills = provider.filterPolyfills;\n } else {\n polyfillsNames = new Map();\n }\n ({\n include,\n exclude\n } = validateIncludeExclude(providerName, polyfillsNames, providerOptions.include || [], providerOptions.exclude || []));\n let callProvider;\n if (methodName === \"usageGlobal\") {\n callProvider = (payload, path) => {\n var _ref;\n const utils = getUtils(path);\n return (_ref = provider[methodName](payload, utils, path)) != null ? _ref : false;\n };\n } else {\n callProvider = (payload, path) => {\n const utils = getUtils(path);\n provider[methodName](payload, utils, path);\n return false;\n };\n }\n return {\n debug,\n method,\n targets,\n provider,\n providerName,\n callProvider\n };\n}\nfunction definePolyfillProvider(factory) {\n return declare((babelApi, options, dirname) => {\n babelApi.assertVersion(\"^7.0.0 || ^8.0.0-alpha.0\");\n const {\n traverse\n } = babelApi;\n let debugLog;\n const missingDependencies = applyMissingDependenciesDefaults(options, babelApi);\n const {\n debug,\n method,\n targets,\n provider,\n providerName,\n callProvider\n } = instantiateProvider(factory, options, missingDependencies, dirname, () => debugLog, babelApi);\n const createVisitor = method === \"entry-global\" ? entry : usage;\n const visitor = provider.visitor ? traverse.visitors.merge([createVisitor(callProvider), provider.visitor]) : createVisitor(callProvider);\n if (debug && debug !== presetEnvSilentDebugHeader) {\n console.log(`${providerName}: \\`DEBUG\\` option`);\n console.log(`\\nUsing targets: ${stringifyTargetsMultiline(targets)}`);\n console.log(`\\nUsing polyfills with \\`${method}\\` method:`);\n }\n const {\n runtimeName\n } = provider;\n return {\n name: \"inject-polyfills\",\n visitor,\n pre(file) {\n var _provider$pre;\n if (runtimeName) {\n if (file.get(\"runtimeHelpersModuleName\") && file.get(\"runtimeHelpersModuleName\") !== runtimeName) {\n console.warn(`Two different polyfill providers` + ` (${file.get(\"runtimeHelpersModuleProvider\")}` + ` and ${providerName}) are trying to define two` + ` conflicting @babel/runtime alternatives:` + ` ${file.get(\"runtimeHelpersModuleName\")} and ${runtimeName}.` + ` The second one will be ignored.`);\n } else {\n file.set(\"runtimeHelpersModuleName\", runtimeName);\n file.set(\"runtimeHelpersModuleProvider\", providerName);\n }\n }\n debugLog = {\n polyfills: new Set(),\n polyfillsSupport: undefined,\n found: false,\n providers: new Set(),\n missingDeps: new Set()\n };\n (_provider$pre = provider.pre) == null ? void 0 : _provider$pre.apply(this, arguments);\n },\n post() {\n var _provider$post;\n (_provider$post = provider.post) == null ? void 0 : _provider$post.apply(this, arguments);\n if (missingDependencies !== false) {\n if (missingDependencies.log === \"per-file\") {\n logMissing(debugLog.missingDeps);\n } else {\n laterLogMissing(debugLog.missingDeps);\n }\n }\n if (!debug) return;\n if (this.filename) console.log(`\\n[${this.filename}]`);\n if (debugLog.polyfills.size === 0) {\n console.log(method === \"entry-global\" ? debugLog.found ? `Based on your targets, the ${providerName} polyfill did not add any polyfill.` : `The entry point for the ${providerName} polyfill has not been found.` : `Based on your code and targets, the ${providerName} polyfill did not add any polyfill.`);\n return;\n }\n if (method === \"entry-global\") {\n console.log(`The ${providerName} polyfill entry has been replaced with ` + `the following polyfills:`);\n } else {\n console.log(`The ${providerName} polyfill added the following polyfills:`);\n }\n for (const name of debugLog.polyfills) {\n var _debugLog$polyfillsSu2;\n if ((_debugLog$polyfillsSu2 = debugLog.polyfillsSupport) != null && _debugLog$polyfillsSu2[name]) {\n const filteredTargets = getInclusionReasons(name, targets, debugLog.polyfillsSupport);\n const formattedTargets = JSON.stringify(filteredTargets).replace(/,/g, \", \").replace(/^\\{\"/, '{ \"').replace(/\"\\}$/, '\" }');\n console.log(` ${name} ${formattedTargets}`);\n } else {\n console.log(` ${name}`);\n }\n }\n }\n };\n });\n}\nfunction mapGetOr(map, key, getDefault) {\n let val = map.get(key);\n if (val === undefined) {\n val = getDefault();\n map.set(key, val);\n }\n return val;\n}\nfunction isEmpty(obj) {\n return Object.keys(obj).length === 0;\n}\n\nexport default definePolyfillProvider;\n//# sourceMappingURL=index.browser.mjs.map\n","import corejs3Polyfills from '../core-js-compat/data.js';\nimport getModulesListForTargetVersion from '../core-js-compat/get-modules-list-for-target-version.js';\nimport * as _babel from '@babel/core';\nimport corejsEntries from '../core-js-compat/entries.js';\nimport defineProvider from '@babel/helper-define-polyfill-provider';\n\n// This file is automatically generated by scripts/build-corejs3-shipped-proposals.mjs\n\nvar corejs3ShippedProposalsList = new Set([\"esnext.suppressed-error.constructor\", \"esnext.array.from-async\", \"esnext.array.group\", \"esnext.array.group-to-map\", \"esnext.iterator.constructor\", \"esnext.iterator.drop\", \"esnext.iterator.every\", \"esnext.iterator.filter\", \"esnext.iterator.find\", \"esnext.iterator.flat-map\", \"esnext.iterator.for-each\", \"esnext.iterator.from\", \"esnext.iterator.map\", \"esnext.iterator.reduce\", \"esnext.iterator.some\", \"esnext.iterator.take\", \"esnext.iterator.to-array\", \"esnext.json.is-raw-json\", \"esnext.json.parse\", \"esnext.json.raw-json\", \"esnext.set.difference.v2\", \"esnext.set.intersection.v2\", \"esnext.set.is-disjoint-from.v2\", \"esnext.set.is-subset-of.v2\", \"esnext.set.is-superset-of.v2\", \"esnext.set.symmetric-difference.v2\", \"esnext.set.union.v2\", \"esnext.symbol.async-dispose\", \"esnext.symbol.dispose\", \"esnext.symbol.metadata\"]);\n\nconst polyfillsOrder = {};\nObject.keys(corejs3Polyfills).forEach((name, index) => {\n polyfillsOrder[name] = index;\n});\nconst define = (pure, global, name = global[0], exclude) => {\n return {\n name,\n pure,\n global: global.sort((a, b) => polyfillsOrder[a] - polyfillsOrder[b]),\n exclude\n };\n};\nconst typed = (...modules) => define(null, [...modules, ...TypedArrayDependencies]);\nconst ArrayNatureIterators = [\"es.array.iterator\", \"web.dom-collections.iterator\"];\nconst CommonIterators = [\"es.string.iterator\", ...ArrayNatureIterators];\nconst ArrayNatureIteratorsWithTag = [\"es.object.to-string\", ...ArrayNatureIterators];\nconst CommonIteratorsWithTag = [\"es.object.to-string\", ...CommonIterators];\nconst ErrorDependencies = [\"es.error.cause\", \"es.error.to-string\"];\nconst SuppressedErrorDependencies = [\"esnext.suppressed-error.constructor\", ...ErrorDependencies];\nconst TypedArrayDependencies = [\"es.typed-array.at\", \"es.typed-array.copy-within\", \"es.typed-array.every\", \"es.typed-array.fill\", \"es.typed-array.filter\", \"es.typed-array.find\", \"es.typed-array.find-index\", \"es.typed-array.find-last\", \"es.typed-array.find-last-index\", \"es.typed-array.for-each\", \"es.typed-array.includes\", \"es.typed-array.index-of\", \"es.typed-array.iterator\", \"es.typed-array.join\", \"es.typed-array.last-index-of\", \"es.typed-array.map\", \"es.typed-array.reduce\", \"es.typed-array.reduce-right\", \"es.typed-array.reverse\", \"es.typed-array.set\", \"es.typed-array.slice\", \"es.typed-array.some\", \"es.typed-array.sort\", \"es.typed-array.subarray\", \"es.typed-array.to-locale-string\", \"es.typed-array.to-reversed\", \"es.typed-array.to-sorted\", \"es.typed-array.to-string\", \"es.typed-array.with\", \"es.object.to-string\", \"es.array.iterator\", \"es.array-buffer.slice\", \"es.data-view\", \"es.array-buffer.detached\", \"es.array-buffer.transfer\", \"es.array-buffer.transfer-to-fixed-length\", \"esnext.typed-array.filter-reject\", \"esnext.typed-array.group-by\", \"esnext.typed-array.to-spliced\", \"esnext.typed-array.unique-by\"];\nconst PromiseDependencies = [\"es.promise\", \"es.object.to-string\"];\nconst PromiseDependenciesWithIterators = [...PromiseDependencies, ...CommonIterators];\nconst SymbolDependencies = [\"es.symbol\", \"es.symbol.description\", \"es.object.to-string\"];\nconst MapDependencies = [\"es.map\", \"esnext.map.delete-all\", \"esnext.map.emplace\", \"esnext.map.every\", \"esnext.map.filter\", \"esnext.map.find\", \"esnext.map.find-key\", \"esnext.map.includes\", \"esnext.map.key-of\", \"esnext.map.map-keys\", \"esnext.map.map-values\", \"esnext.map.merge\", \"esnext.map.reduce\", \"esnext.map.some\", \"esnext.map.update\", ...CommonIteratorsWithTag];\nconst SetDependencies = [\"es.set\", \"esnext.set.add-all\", \"esnext.set.delete-all\", \"esnext.set.difference\", \"esnext.set.difference.v2\", \"esnext.set.every\", \"esnext.set.filter\", \"esnext.set.find\", \"esnext.set.intersection\", \"esnext.set.intersection.v2\", \"esnext.set.is-disjoint-from\", \"esnext.set.is-disjoint-from.v2\", \"esnext.set.is-subset-of\", \"esnext.set.is-subset-of.v2\", \"esnext.set.is-superset-of\", \"esnext.set.is-superset-of.v2\", \"esnext.set.join\", \"esnext.set.map\", \"esnext.set.reduce\", \"esnext.set.some\", \"esnext.set.symmetric-difference\", \"esnext.set.symmetric-difference.v2\", \"esnext.set.union\", \"esnext.set.union.v2\", ...CommonIteratorsWithTag];\nconst WeakMapDependencies = [\"es.weak-map\", \"esnext.weak-map.delete-all\", \"esnext.weak-map.emplace\", ...CommonIteratorsWithTag];\nconst WeakSetDependencies = [\"es.weak-set\", \"esnext.weak-set.add-all\", \"esnext.weak-set.delete-all\", ...CommonIteratorsWithTag];\nconst DOMExceptionDependencies = [\"web.dom-exception.constructor\", \"web.dom-exception.stack\", \"web.dom-exception.to-string-tag\", \"es.error.to-string\"];\nconst URLSearchParamsDependencies = [\"web.url-search-params\", \"web.url-search-params.delete\", \"web.url-search-params.has\", \"web.url-search-params.size\", ...CommonIteratorsWithTag];\nconst AsyncIteratorDependencies = [\"esnext.async-iterator.constructor\", ...PromiseDependencies];\nconst AsyncIteratorProblemMethods = [\"esnext.async-iterator.every\", \"esnext.async-iterator.filter\", \"esnext.async-iterator.find\", \"esnext.async-iterator.flat-map\", \"esnext.async-iterator.for-each\", \"esnext.async-iterator.map\", \"esnext.async-iterator.reduce\", \"esnext.async-iterator.some\"];\nconst IteratorDependencies = [\"esnext.iterator.constructor\", \"es.object.to-string\"];\nconst DecoratorMetadataDependencies = [\"esnext.symbol.metadata\", \"esnext.function.metadata\"];\nconst TypedArrayStaticMethods = base => ({\n from: define(null, [\"es.typed-array.from\", base, ...TypedArrayDependencies]),\n fromAsync: define(null, [\"esnext.typed-array.from-async\", base, ...PromiseDependenciesWithIterators, ...TypedArrayDependencies]),\n of: define(null, [\"es.typed-array.of\", base, ...TypedArrayDependencies])\n});\nconst DataViewDependencies = [\"es.data-view\", \"es.array-buffer.constructor\", \"es.array-buffer.slice\", \"es.array-buffer.detached\", \"es.array-buffer.transfer\", \"es.array-buffer.transfer-to-fixed-length\", \"es.object.to-string\"];\nconst BuiltIns = {\n AsyncDisposableStack: define(\"async-disposable-stack/index\", [\"esnext.async-disposable-stack.constructor\", \"es.object.to-string\", \"esnext.async-iterator.async-dispose\", \"esnext.iterator.dispose\", ...PromiseDependencies, ...SuppressedErrorDependencies]),\n AsyncIterator: define(\"async-iterator/index\", AsyncIteratorDependencies),\n AggregateError: define(\"aggregate-error\", [\"es.aggregate-error\", ...ErrorDependencies, ...CommonIteratorsWithTag, \"es.aggregate-error.cause\"]),\n ArrayBuffer: define(null, [\"es.array-buffer.constructor\", \"es.array-buffer.slice\", \"es.data-view\", \"es.array-buffer.detached\", \"es.array-buffer.transfer\", \"es.array-buffer.transfer-to-fixed-length\", \"es.object.to-string\"]),\n DataView: define(null, DataViewDependencies),\n Date: define(null, [\"es.date.to-string\"]),\n DOMException: define(\"dom-exception/index\", DOMExceptionDependencies),\n DisposableStack: define(\"disposable-stack/index\", [\"esnext.disposable-stack.constructor\", \"es.object.to-string\", \"esnext.iterator.dispose\", ...SuppressedErrorDependencies]),\n Error: define(null, ErrorDependencies),\n EvalError: define(null, ErrorDependencies),\n Float32Array: typed(\"es.typed-array.float32-array\"),\n Float64Array: typed(\"es.typed-array.float64-array\"),\n Int8Array: typed(\"es.typed-array.int8-array\"),\n Int16Array: typed(\"es.typed-array.int16-array\"),\n Int32Array: typed(\"es.typed-array.int32-array\"),\n Iterator: define(\"iterator/index\", IteratorDependencies),\n Uint8Array: typed(\"es.typed-array.uint8-array\", \"esnext.uint8-array.to-base64\", \"esnext.uint8-array.to-hex\"),\n Uint8ClampedArray: typed(\"es.typed-array.uint8-clamped-array\"),\n Uint16Array: typed(\"es.typed-array.uint16-array\"),\n Uint32Array: typed(\"es.typed-array.uint32-array\"),\n Map: define(\"map/index\", MapDependencies),\n Number: define(null, [\"es.number.constructor\"]),\n Observable: define(\"observable/index\", [\"esnext.observable\", \"esnext.symbol.observable\", \"es.object.to-string\", ...CommonIteratorsWithTag]),\n Promise: define(\"promise/index\", PromiseDependencies),\n RangeError: define(null, ErrorDependencies),\n ReferenceError: define(null, ErrorDependencies),\n Reflect: define(null, [\"es.reflect.to-string-tag\", \"es.object.to-string\"]),\n RegExp: define(null, [\"es.regexp.constructor\", \"es.regexp.dot-all\", \"es.regexp.exec\", \"es.regexp.sticky\", \"es.regexp.to-string\"]),\n Set: define(\"set/index\", SetDependencies),\n SuppressedError: define(\"suppressed-error\", SuppressedErrorDependencies),\n Symbol: define(\"symbol/index\", SymbolDependencies),\n SyntaxError: define(null, ErrorDependencies),\n TypeError: define(null, ErrorDependencies),\n URIError: define(null, ErrorDependencies),\n URL: define(\"url/index\", [\"web.url\", \"web.url.to-json\", ...URLSearchParamsDependencies]),\n URLSearchParams: define(\"url-search-params/index\", URLSearchParamsDependencies),\n WeakMap: define(\"weak-map/index\", WeakMapDependencies),\n WeakSet: define(\"weak-set/index\", WeakSetDependencies),\n atob: define(\"atob\", [\"web.atob\", ...DOMExceptionDependencies]),\n btoa: define(\"btoa\", [\"web.btoa\", ...DOMExceptionDependencies]),\n clearImmediate: define(\"clear-immediate\", [\"web.immediate\"]),\n compositeKey: define(\"composite-key\", [\"esnext.composite-key\"]),\n compositeSymbol: define(\"composite-symbol\", [\"esnext.composite-symbol\"]),\n escape: define(\"escape\", [\"es.escape\"]),\n fetch: define(null, PromiseDependencies),\n globalThis: define(\"global-this\", [\"es.global-this\"]),\n parseFloat: define(\"parse-float\", [\"es.parse-float\"]),\n parseInt: define(\"parse-int\", [\"es.parse-int\"]),\n queueMicrotask: define(\"queue-microtask\", [\"web.queue-microtask\"]),\n self: define(\"self\", [\"web.self\"]),\n setImmediate: define(\"set-immediate\", [\"web.immediate\"]),\n setInterval: define(\"set-interval\", [\"web.timers\"]),\n setTimeout: define(\"set-timeout\", [\"web.timers\"]),\n structuredClone: define(\"structured-clone\", [\"web.structured-clone\", ...DOMExceptionDependencies, \"es.array.iterator\", \"es.object.keys\", \"es.object.to-string\", \"es.map\", \"es.set\"]),\n unescape: define(\"unescape\", [\"es.unescape\"])\n};\nconst StaticProperties = {\n AsyncIterator: {\n from: define(\"async-iterator/from\", [\"esnext.async-iterator.from\", ...AsyncIteratorDependencies, ...AsyncIteratorProblemMethods, ...CommonIterators])\n },\n Array: {\n from: define(\"array/from\", [\"es.array.from\", \"es.string.iterator\"]),\n fromAsync: define(\"array/from-async\", [\"esnext.array.from-async\", ...PromiseDependenciesWithIterators]),\n isArray: define(\"array/is-array\", [\"es.array.is-array\"]),\n isTemplateObject: define(\"array/is-template-object\", [\"esnext.array.is-template-object\"]),\n of: define(\"array/of\", [\"es.array.of\"])\n },\n ArrayBuffer: {\n isView: define(null, [\"es.array-buffer.is-view\"])\n },\n BigInt: {\n range: define(\"bigint/range\", [\"esnext.bigint.range\", \"es.object.to-string\"])\n },\n Date: {\n now: define(\"date/now\", [\"es.date.now\"])\n },\n Function: {\n isCallable: define(\"function/is-callable\", [\"esnext.function.is-callable\"]),\n isConstructor: define(\"function/is-constructor\", [\"esnext.function.is-constructor\"])\n },\n Iterator: {\n from: define(\"iterator/from\", [\"esnext.iterator.from\", ...IteratorDependencies, ...CommonIterators]),\n range: define(\"iterator/range\", [\"esnext.iterator.range\", \"es.object.to-string\"])\n },\n JSON: {\n isRawJSON: define(\"json/is-raw-json\", [\"esnext.json.is-raw-json\"]),\n parse: define(\"json/parse\", [\"esnext.json.parse\", \"es.object.keys\"]),\n rawJSON: define(\"json/raw-json\", [\"esnext.json.raw-json\", \"es.object.create\", \"es.object.freeze\"]),\n stringify: define(\"json/stringify\", [\"es.json.stringify\", \"es.date.to-json\"], \"es.symbol\")\n },\n Math: {\n DEG_PER_RAD: define(\"math/deg-per-rad\", [\"esnext.math.deg-per-rad\"]),\n RAD_PER_DEG: define(\"math/rad-per-deg\", [\"esnext.math.rad-per-deg\"]),\n acosh: define(\"math/acosh\", [\"es.math.acosh\"]),\n asinh: define(\"math/asinh\", [\"es.math.asinh\"]),\n atanh: define(\"math/atanh\", [\"es.math.atanh\"]),\n cbrt: define(\"math/cbrt\", [\"es.math.cbrt\"]),\n clamp: define(\"math/clamp\", [\"esnext.math.clamp\"]),\n clz32: define(\"math/clz32\", [\"es.math.clz32\"]),\n cosh: define(\"math/cosh\", [\"es.math.cosh\"]),\n degrees: define(\"math/degrees\", [\"esnext.math.degrees\"]),\n expm1: define(\"math/expm1\", [\"es.math.expm1\"]),\n fround: define(\"math/fround\", [\"es.math.fround\"]),\n f16round: define(\"math/f16round\", [\"esnext.math.f16round\"]),\n fscale: define(\"math/fscale\", [\"esnext.math.fscale\"]),\n hypot: define(\"math/hypot\", [\"es.math.hypot\"]),\n iaddh: define(\"math/iaddh\", [\"esnext.math.iaddh\"]),\n imul: define(\"math/imul\", [\"es.math.imul\"]),\n imulh: define(\"math/imulh\", [\"esnext.math.imulh\"]),\n isubh: define(\"math/isubh\", [\"esnext.math.isubh\"]),\n log10: define(\"math/log10\", [\"es.math.log10\"]),\n log1p: define(\"math/log1p\", [\"es.math.log1p\"]),\n log2: define(\"math/log2\", [\"es.math.log2\"]),\n radians: define(\"math/radians\", [\"esnext.math.radians\"]),\n scale: define(\"math/scale\", [\"esnext.math.scale\"]),\n seededPRNG: define(\"math/seeded-prng\", [\"esnext.math.seeded-prng\"]),\n sign: define(\"math/sign\", [\"es.math.sign\"]),\n signbit: define(\"math/signbit\", [\"esnext.math.signbit\"]),\n sinh: define(\"math/sinh\", [\"es.math.sinh\"]),\n tanh: define(\"math/tanh\", [\"es.math.tanh\"]),\n trunc: define(\"math/trunc\", [\"es.math.trunc\"]),\n umulh: define(\"math/umulh\", [\"esnext.math.umulh\"])\n },\n Map: {\n from: define(null, [\"esnext.map.from\", ...MapDependencies]),\n groupBy: define(\"map/group-by\", [\"es.map.group-by\", ...MapDependencies]),\n keyBy: define(\"map/key-by\", [\"esnext.map.key-by\", ...MapDependencies]),\n of: define(null, [\"esnext.map.of\", ...MapDependencies])\n },\n Number: {\n EPSILON: define(\"number/epsilon\", [\"es.number.epsilon\"]),\n MAX_SAFE_INTEGER: define(\"number/max-safe-integer\", [\"es.number.max-safe-integer\"]),\n MIN_SAFE_INTEGER: define(\"number/min-safe-integer\", [\"es.number.min-safe-integer\"]),\n fromString: define(\"number/from-string\", [\"esnext.number.from-string\"]),\n isFinite: define(\"number/is-finite\", [\"es.number.is-finite\"]),\n isInteger: define(\"number/is-integer\", [\"es.number.is-integer\"]),\n isNaN: define(\"number/is-nan\", [\"es.number.is-nan\"]),\n isSafeInteger: define(\"number/is-safe-integer\", [\"es.number.is-safe-integer\"]),\n parseFloat: define(\"number/parse-float\", [\"es.number.parse-float\"]),\n parseInt: define(\"number/parse-int\", [\"es.number.parse-int\"]),\n range: define(\"number/range\", [\"esnext.number.range\", \"es.object.to-string\"])\n },\n Object: {\n assign: define(\"object/assign\", [\"es.object.assign\"]),\n create: define(\"object/create\", [\"es.object.create\"]),\n defineProperties: define(\"object/define-properties\", [\"es.object.define-properties\"]),\n defineProperty: define(\"object/define-property\", [\"es.object.define-property\"]),\n entries: define(\"object/entries\", [\"es.object.entries\"]),\n freeze: define(\"object/freeze\", [\"es.object.freeze\"]),\n fromEntries: define(\"object/from-entries\", [\"es.object.from-entries\", \"es.array.iterator\"]),\n getOwnPropertyDescriptor: define(\"object/get-own-property-descriptor\", [\"es.object.get-own-property-descriptor\"]),\n getOwnPropertyDescriptors: define(\"object/get-own-property-descriptors\", [\"es.object.get-own-property-descriptors\"]),\n getOwnPropertyNames: define(\"object/get-own-property-names\", [\"es.object.get-own-property-names\"]),\n getOwnPropertySymbols: define(\"object/get-own-property-symbols\", [\"es.symbol\"]),\n getPrototypeOf: define(\"object/get-prototype-of\", [\"es.object.get-prototype-of\"]),\n groupBy: define(\"object/group-by\", [\"es.object.group-by\", \"es.object.create\"]),\n hasOwn: define(\"object/has-own\", [\"es.object.has-own\"]),\n is: define(\"object/is\", [\"es.object.is\"]),\n isExtensible: define(\"object/is-extensible\", [\"es.object.is-extensible\"]),\n isFrozen: define(\"object/is-frozen\", [\"es.object.is-frozen\"]),\n isSealed: define(\"object/is-sealed\", [\"es.object.is-sealed\"]),\n keys: define(\"object/keys\", [\"es.object.keys\"]),\n preventExtensions: define(\"object/prevent-extensions\", [\"es.object.prevent-extensions\"]),\n seal: define(\"object/seal\", [\"es.object.seal\"]),\n setPrototypeOf: define(\"object/set-prototype-of\", [\"es.object.set-prototype-of\"]),\n values: define(\"object/values\", [\"es.object.values\"])\n },\n Promise: {\n all: define(null, PromiseDependenciesWithIterators),\n allSettled: define(\"promise/all-settled\", [\"es.promise.all-settled\", ...PromiseDependenciesWithIterators]),\n any: define(\"promise/any\", [\"es.promise.any\", \"es.aggregate-error\", ...PromiseDependenciesWithIterators]),\n race: define(null, PromiseDependenciesWithIterators),\n try: define(\"promise/try\", [\"esnext.promise.try\", ...PromiseDependencies]),\n withResolvers: define(\"promise/with-resolvers\", [\"es.promise.with-resolvers\", ...PromiseDependencies])\n },\n Reflect: {\n apply: define(\"reflect/apply\", [\"es.reflect.apply\"]),\n construct: define(\"reflect/construct\", [\"es.reflect.construct\"]),\n defineMetadata: define(\"reflect/define-metadata\", [\"esnext.reflect.define-metadata\"]),\n defineProperty: define(\"reflect/define-property\", [\"es.reflect.define-property\"]),\n deleteMetadata: define(\"reflect/delete-metadata\", [\"esnext.reflect.delete-metadata\"]),\n deleteProperty: define(\"reflect/delete-property\", [\"es.reflect.delete-property\"]),\n get: define(\"reflect/get\", [\"es.reflect.get\"]),\n getMetadata: define(\"reflect/get-metadata\", [\"esnext.reflect.get-metadata\"]),\n getMetadataKeys: define(\"reflect/get-metadata-keys\", [\"esnext.reflect.get-metadata-keys\"]),\n getOwnMetadata: define(\"reflect/get-own-metadata\", [\"esnext.reflect.get-own-metadata\"]),\n getOwnMetadataKeys: define(\"reflect/get-own-metadata-keys\", [\"esnext.reflect.get-own-metadata-keys\"]),\n getOwnPropertyDescriptor: define(\"reflect/get-own-property-descriptor\", [\"es.reflect.get-own-property-descriptor\"]),\n getPrototypeOf: define(\"reflect/get-prototype-of\", [\"es.reflect.get-prototype-of\"]),\n has: define(\"reflect/has\", [\"es.reflect.has\"]),\n hasMetadata: define(\"reflect/has-metadata\", [\"esnext.reflect.has-metadata\"]),\n hasOwnMetadata: define(\"reflect/has-own-metadata\", [\"esnext.reflect.has-own-metadata\"]),\n isExtensible: define(\"reflect/is-extensible\", [\"es.reflect.is-extensible\"]),\n metadata: define(\"reflect/metadata\", [\"esnext.reflect.metadata\"]),\n ownKeys: define(\"reflect/own-keys\", [\"es.reflect.own-keys\"]),\n preventExtensions: define(\"reflect/prevent-extensions\", [\"es.reflect.prevent-extensions\"]),\n set: define(\"reflect/set\", [\"es.reflect.set\"]),\n setPrototypeOf: define(\"reflect/set-prototype-of\", [\"es.reflect.set-prototype-of\"])\n },\n RegExp: {\n escape: define(\"regexp/escape\", [\"esnext.regexp.escape\"])\n },\n Set: {\n from: define(null, [\"esnext.set.from\", ...SetDependencies]),\n of: define(null, [\"esnext.set.of\", ...SetDependencies])\n },\n String: {\n cooked: define(\"string/cooked\", [\"esnext.string.cooked\"]),\n dedent: define(\"string/dedent\", [\"esnext.string.dedent\", \"es.string.from-code-point\", \"es.weak-map\"]),\n fromCodePoint: define(\"string/from-code-point\", [\"es.string.from-code-point\"]),\n raw: define(\"string/raw\", [\"es.string.raw\"])\n },\n Symbol: {\n asyncDispose: define(\"symbol/async-dispose\", [\"esnext.symbol.async-dispose\", \"esnext.async-iterator.async-dispose\"]),\n asyncIterator: define(\"symbol/async-iterator\", [\"es.symbol.async-iterator\"]),\n dispose: define(\"symbol/dispose\", [\"esnext.symbol.dispose\", \"esnext.iterator.dispose\"]),\n for: define(\"symbol/for\", [], \"es.symbol\"),\n hasInstance: define(\"symbol/has-instance\", [\"es.symbol.has-instance\", \"es.function.has-instance\"]),\n isConcatSpreadable: define(\"symbol/is-concat-spreadable\", [\"es.symbol.is-concat-spreadable\", \"es.array.concat\"]),\n isRegistered: define(\"symbol/is-registered\", [\"esnext.symbol.is-registered\", \"es.symbol\"]),\n isRegisteredSymbol: define(\"symbol/is-registered-symbol\", [\"esnext.symbol.is-registered-symbol\", \"es.symbol\"]),\n isWellKnown: define(\"symbol/is-well-known\", [\"esnext.symbol.is-well-known\", \"es.symbol\"]),\n isWellKnownSymbol: define(\"symbol/is-well-known-symbol\", [\"esnext.symbol.is-well-known-symbol\", \"es.symbol\"]),\n iterator: define(\"symbol/iterator\", [\"es.symbol.iterator\", ...CommonIteratorsWithTag]),\n keyFor: define(\"symbol/key-for\", [], \"es.symbol\"),\n match: define(\"symbol/match\", [\"es.symbol.match\", \"es.string.match\"]),\n matcher: define(\"symbol/matcher\", [\"esnext.symbol.matcher\"]),\n matchAll: define(\"symbol/match-all\", [\"es.symbol.match-all\", \"es.string.match-all\"]),\n metadata: define(\"symbol/metadata\", DecoratorMetadataDependencies),\n metadataKey: define(\"symbol/metadata-key\", [\"esnext.symbol.metadata-key\"]),\n observable: define(\"symbol/observable\", [\"esnext.symbol.observable\"]),\n patternMatch: define(\"symbol/pattern-match\", [\"esnext.symbol.pattern-match\"]),\n replace: define(\"symbol/replace\", [\"es.symbol.replace\", \"es.string.replace\"]),\n search: define(\"symbol/search\", [\"es.symbol.search\", \"es.string.search\"]),\n species: define(\"symbol/species\", [\"es.symbol.species\", \"es.array.species\"]),\n split: define(\"symbol/split\", [\"es.symbol.split\", \"es.string.split\"]),\n toPrimitive: define(\"symbol/to-primitive\", [\"es.symbol.to-primitive\", \"es.date.to-primitive\"]),\n toStringTag: define(\"symbol/to-string-tag\", [\"es.symbol.to-string-tag\", \"es.object.to-string\", \"es.math.to-string-tag\", \"es.json.to-string-tag\"]),\n unscopables: define(\"symbol/unscopables\", [\"es.symbol.unscopables\"])\n },\n URL: {\n canParse: define(\"url/can-parse\", [\"web.url.can-parse\", \"web.url\"])\n },\n WeakMap: {\n from: define(null, [\"esnext.weak-map.from\", ...WeakMapDependencies]),\n of: define(null, [\"esnext.weak-map.of\", ...WeakMapDependencies])\n },\n WeakSet: {\n from: define(null, [\"esnext.weak-set.from\", ...WeakSetDependencies]),\n of: define(null, [\"esnext.weak-set.of\", ...WeakSetDependencies])\n },\n Int8Array: TypedArrayStaticMethods(\"es.typed-array.int8-array\"),\n Uint8Array: {\n fromBase64: define(null, [\"esnext.uint8-array.from-base64\", ...TypedArrayDependencies]),\n fromHex: define(null, [\"esnext.uint8-array.from-hex\", ...TypedArrayDependencies]),\n ...TypedArrayStaticMethods(\"es.typed-array.uint8-array\")\n },\n Uint8ClampedArray: TypedArrayStaticMethods(\"es.typed-array.uint8-clamped-array\"),\n Int16Array: TypedArrayStaticMethods(\"es.typed-array.int16-array\"),\n Uint16Array: TypedArrayStaticMethods(\"es.typed-array.uint16-array\"),\n Int32Array: TypedArrayStaticMethods(\"es.typed-array.int32-array\"),\n Uint32Array: TypedArrayStaticMethods(\"es.typed-array.uint32-array\"),\n Float32Array: TypedArrayStaticMethods(\"es.typed-array.float32-array\"),\n Float64Array: TypedArrayStaticMethods(\"es.typed-array.float64-array\"),\n WebAssembly: {\n CompileError: define(null, ErrorDependencies),\n LinkError: define(null, ErrorDependencies),\n RuntimeError: define(null, ErrorDependencies)\n }\n};\nconst InstanceProperties = {\n asIndexedPairs: define(\"instance/asIndexedPairs\", [\"esnext.async-iterator.as-indexed-pairs\", ...AsyncIteratorDependencies, \"esnext.iterator.as-indexed-pairs\", ...IteratorDependencies]),\n at: define(\"instance/at\", [\n // TODO: We should introduce overloaded instance methods definition\n // Before that is implemented, the `esnext.string.at` must be the first\n // In pure mode, the provider resolves the descriptor as a \"pure\" `esnext.string.at`\n // and treats the compat-data of `esnext.string.at` as the compat-data of\n // pure import `instance/at`. The first polyfill here should have the lowest corejs\n // supported versions.\n \"esnext.string.at\", \"es.string.at-alternative\", \"es.array.at\"]),\n anchor: define(null, [\"es.string.anchor\"]),\n big: define(null, [\"es.string.big\"]),\n bind: define(\"instance/bind\", [\"es.function.bind\"]),\n blink: define(null, [\"es.string.blink\"]),\n bold: define(null, [\"es.string.bold\"]),\n codePointAt: define(\"instance/code-point-at\", [\"es.string.code-point-at\"]),\n codePoints: define(\"instance/code-points\", [\"esnext.string.code-points\"]),\n concat: define(\"instance/concat\", [\"es.array.concat\"], undefined, [\"String\"]),\n copyWithin: define(\"instance/copy-within\", [\"es.array.copy-within\"]),\n demethodize: define(\"instance/demethodize\", [\"esnext.function.demethodize\"]),\n description: define(null, [\"es.symbol\", \"es.symbol.description\"]),\n dotAll: define(null, [\"es.regexp.dot-all\"]),\n drop: define(null, [\"esnext.async-iterator.drop\", ...AsyncIteratorDependencies, \"esnext.iterator.drop\", ...IteratorDependencies]),\n emplace: define(\"instance/emplace\", [\"esnext.map.emplace\", \"esnext.weak-map.emplace\"]),\n endsWith: define(\"instance/ends-with\", [\"es.string.ends-with\"]),\n entries: define(\"instance/entries\", ArrayNatureIteratorsWithTag),\n every: define(\"instance/every\", [\"es.array.every\", \"esnext.async-iterator.every\",\n // TODO: add async iterator dependencies when we support sub-dependencies\n // esnext.async-iterator.every depends on es.promise\n // but we don't want to pull es.promise when esnext.async-iterator is disabled\n //\n // ...AsyncIteratorDependencies\n \"esnext.iterator.every\", ...IteratorDependencies]),\n exec: define(null, [\"es.regexp.exec\"]),\n fill: define(\"instance/fill\", [\"es.array.fill\"]),\n filter: define(\"instance/filter\", [\"es.array.filter\", \"esnext.async-iterator.filter\", \"esnext.iterator.filter\", ...IteratorDependencies]),\n filterReject: define(\"instance/filterReject\", [\"esnext.array.filter-reject\"]),\n finally: define(null, [\"es.promise.finally\", ...PromiseDependencies]),\n find: define(\"instance/find\", [\"es.array.find\", \"esnext.async-iterator.find\", \"esnext.iterator.find\", ...IteratorDependencies]),\n findIndex: define(\"instance/find-index\", [\"es.array.find-index\"]),\n findLast: define(\"instance/find-last\", [\"es.array.find-last\"]),\n findLastIndex: define(\"instance/find-last-index\", [\"es.array.find-last-index\"]),\n fixed: define(null, [\"es.string.fixed\"]),\n flags: define(\"instance/flags\", [\"es.regexp.flags\"]),\n flatMap: define(\"instance/flat-map\", [\"es.array.flat-map\", \"es.array.unscopables.flat-map\", \"esnext.async-iterator.flat-map\", \"esnext.iterator.flat-map\", ...IteratorDependencies]),\n flat: define(\"instance/flat\", [\"es.array.flat\", \"es.array.unscopables.flat\"]),\n getFloat16: define(null, [\"esnext.data-view.get-float16\", ...DataViewDependencies]),\n getUint8Clamped: define(null, [\"esnext.data-view.get-uint8-clamped\", ...DataViewDependencies]),\n getYear: define(null, [\"es.date.get-year\"]),\n group: define(\"instance/group\", [\"esnext.array.group\"]),\n groupBy: define(\"instance/group-by\", [\"esnext.array.group-by\"]),\n groupByToMap: define(\"instance/group-by-to-map\", [\"esnext.array.group-by-to-map\", \"es.map\", \"es.object.to-string\"]),\n groupToMap: define(\"instance/group-to-map\", [\"esnext.array.group-to-map\", \"es.map\", \"es.object.to-string\"]),\n fontcolor: define(null, [\"es.string.fontcolor\"]),\n fontsize: define(null, [\"es.string.fontsize\"]),\n forEach: define(\"instance/for-each\", [\"es.array.for-each\", \"esnext.async-iterator.for-each\", \"esnext.iterator.for-each\", ...IteratorDependencies, \"web.dom-collections.for-each\"]),\n includes: define(\"instance/includes\", [\"es.array.includes\", \"es.string.includes\"]),\n indexed: define(null, [\"esnext.async-iterator.indexed\", ...AsyncIteratorDependencies, \"esnext.iterator.indexed\", ...IteratorDependencies]),\n indexOf: define(\"instance/index-of\", [\"es.array.index-of\"]),\n isWellFormed: define(\"instance/is-well-formed\", [\"es.string.is-well-formed\"]),\n italic: define(null, [\"es.string.italics\"]),\n join: define(null, [\"es.array.join\"]),\n keys: define(\"instance/keys\", ArrayNatureIteratorsWithTag),\n lastIndex: define(null, [\"esnext.array.last-index\"]),\n lastIndexOf: define(\"instance/last-index-of\", [\"es.array.last-index-of\"]),\n lastItem: define(null, [\"esnext.array.last-item\"]),\n link: define(null, [\"es.string.link\"]),\n map: define(\"instance/map\", [\"es.array.map\", \"esnext.async-iterator.map\", \"esnext.iterator.map\"]),\n match: define(null, [\"es.string.match\", \"es.regexp.exec\"]),\n matchAll: define(\"instance/match-all\", [\"es.string.match-all\", \"es.regexp.exec\"]),\n name: define(null, [\"es.function.name\"]),\n padEnd: define(\"instance/pad-end\", [\"es.string.pad-end\"]),\n padStart: define(\"instance/pad-start\", [\"es.string.pad-start\"]),\n push: define(\"instance/push\", [\"es.array.push\"]),\n reduce: define(\"instance/reduce\", [\"es.array.reduce\", \"esnext.async-iterator.reduce\", \"esnext.iterator.reduce\", ...IteratorDependencies]),\n reduceRight: define(\"instance/reduce-right\", [\"es.array.reduce-right\"]),\n repeat: define(\"instance/repeat\", [\"es.string.repeat\"]),\n replace: define(null, [\"es.string.replace\", \"es.regexp.exec\"]),\n replaceAll: define(\"instance/replace-all\", [\"es.string.replace-all\", \"es.string.replace\", \"es.regexp.exec\"]),\n reverse: define(\"instance/reverse\", [\"es.array.reverse\"]),\n search: define(null, [\"es.string.search\", \"es.regexp.exec\"]),\n setFloat16: define(null, [\"esnext.data-view.set-float16\", ...DataViewDependencies]),\n setUint8Clamped: define(null, [\"esnext.data-view.set-uint8-clamped\", ...DataViewDependencies]),\n setYear: define(null, [\"es.date.set-year\"]),\n slice: define(\"instance/slice\", [\"es.array.slice\"]),\n small: define(null, [\"es.string.small\"]),\n some: define(\"instance/some\", [\"es.array.some\", \"esnext.async-iterator.some\", \"esnext.iterator.some\", ...IteratorDependencies]),\n sort: define(\"instance/sort\", [\"es.array.sort\"]),\n splice: define(\"instance/splice\", [\"es.array.splice\"]),\n split: define(null, [\"es.string.split\", \"es.regexp.exec\"]),\n startsWith: define(\"instance/starts-with\", [\"es.string.starts-with\"]),\n sticky: define(null, [\"es.regexp.sticky\"]),\n strike: define(null, [\"es.string.strike\"]),\n sub: define(null, [\"es.string.sub\"]),\n substr: define(null, [\"es.string.substr\"]),\n sup: define(null, [\"es.string.sup\"]),\n take: define(null, [\"esnext.async-iterator.take\", ...AsyncIteratorDependencies, \"esnext.iterator.take\", ...IteratorDependencies]),\n test: define(null, [\"es.regexp.test\", \"es.regexp.exec\"]),\n toArray: define(null, [\"esnext.async-iterator.to-array\", ...AsyncIteratorDependencies, \"esnext.iterator.to-array\", ...IteratorDependencies]),\n toAsync: define(null, [\"esnext.iterator.to-async\", ...IteratorDependencies, ...AsyncIteratorDependencies, ...AsyncIteratorProblemMethods]),\n toExponential: define(null, [\"es.number.to-exponential\"]),\n toFixed: define(null, [\"es.number.to-fixed\"]),\n toGMTString: define(null, [\"es.date.to-gmt-string\"]),\n toISOString: define(null, [\"es.date.to-iso-string\"]),\n toJSON: define(null, [\"es.date.to-json\"]),\n toPrecision: define(null, [\"es.number.to-precision\"]),\n toReversed: define(\"instance/to-reversed\", [\"es.array.to-reversed\"]),\n toSorted: define(\"instance/to-sorted\", [\"es.array.to-sorted\", \"es.array.sort\"]),\n toSpliced: define(\"instance/to-spliced\", [\"es.array.to-spliced\"]),\n toString: define(null, [\"es.object.to-string\", \"es.error.to-string\", \"es.date.to-string\", \"es.regexp.to-string\"]),\n toWellFormed: define(\"instance/to-well-formed\", [\"es.string.to-well-formed\"]),\n trim: define(\"instance/trim\", [\"es.string.trim\"]),\n trimEnd: define(\"instance/trim-end\", [\"es.string.trim-end\"]),\n trimLeft: define(\"instance/trim-left\", [\"es.string.trim-start\"]),\n trimRight: define(\"instance/trim-right\", [\"es.string.trim-end\"]),\n trimStart: define(\"instance/trim-start\", [\"es.string.trim-start\"]),\n uniqueBy: define(\"instance/unique-by\", [\"esnext.array.unique-by\", \"es.map\"]),\n unshift: define(\"instance/unshift\", [\"es.array.unshift\"]),\n unThis: define(\"instance/un-this\", [\"esnext.function.un-this\"]),\n values: define(\"instance/values\", ArrayNatureIteratorsWithTag),\n with: define(\"instance/with\", [\"es.array.with\"]),\n __defineGetter__: define(null, [\"es.object.define-getter\"]),\n __defineSetter__: define(null, [\"es.object.define-setter\"]),\n __lookupGetter__: define(null, [\"es.object.lookup-getter\"]),\n __lookupSetter__: define(null, [\"es.object.lookup-setter\"]),\n [\"__proto__\"]: define(null, [\"es.object.proto\"])\n};\n\n// This file contains the list of paths supported by @babel/runtime-corejs3.\n// It must _not_ be edited, as all new features should go through direct\n// injection of core-js-pure imports.\n\nconst stable = new Set([\"array\", \"array/from\", \"array/is-array\", \"array/of\", \"clear-immediate\", \"date/now\", \"instance/bind\", \"instance/code-point-at\", \"instance/concat\", \"instance/copy-within\", \"instance/ends-with\", \"instance/entries\", \"instance/every\", \"instance/fill\", \"instance/filter\", \"instance/find\", \"instance/find-index\", \"instance/flags\", \"instance/flat\", \"instance/flat-map\", \"instance/for-each\", \"instance/includes\", \"instance/index-of\", \"instance/keys\", \"instance/last-index-of\", \"instance/map\", \"instance/pad-end\", \"instance/pad-start\", \"instance/reduce\", \"instance/reduce-right\", \"instance/repeat\", \"instance/reverse\", \"instance/slice\", \"instance/some\", \"instance/sort\", \"instance/splice\", \"instance/starts-with\", \"instance/trim\", \"instance/trim-end\", \"instance/trim-left\", \"instance/trim-right\", \"instance/trim-start\", \"instance/values\", \"json/stringify\", \"map\", \"math/acosh\", \"math/asinh\", \"math/atanh\", \"math/cbrt\", \"math/clz32\", \"math/cosh\", \"math/expm1\", \"math/fround\", \"math/hypot\", \"math/imul\", \"math/log10\", \"math/log1p\", \"math/log2\", \"math/sign\", \"math/sinh\", \"math/tanh\", \"math/trunc\", \"number/epsilon\", \"number/is-finite\", \"number/is-integer\", \"number/is-nan\", \"number/is-safe-integer\", \"number/max-safe-integer\", \"number/min-safe-integer\", \"number/parse-float\", \"number/parse-int\", \"object/assign\", \"object/create\", \"object/define-properties\", \"object/define-property\", \"object/entries\", \"object/freeze\", \"object/from-entries\", \"object/get-own-property-descriptor\", \"object/get-own-property-descriptors\", \"object/get-own-property-names\", \"object/get-own-property-symbols\", \"object/get-prototype-of\", \"object/is\", \"object/is-extensible\", \"object/is-frozen\", \"object/is-sealed\", \"object/keys\", \"object/prevent-extensions\", \"object/seal\", \"object/set-prototype-of\", \"object/values\", \"parse-float\", \"parse-int\", \"promise\", \"queue-microtask\", \"reflect/apply\", \"reflect/construct\", \"reflect/define-property\", \"reflect/delete-property\", \"reflect/get\", \"reflect/get-own-property-descriptor\", \"reflect/get-prototype-of\", \"reflect/has\", \"reflect/is-extensible\", \"reflect/own-keys\", \"reflect/prevent-extensions\", \"reflect/set\", \"reflect/set-prototype-of\", \"set\", \"set-immediate\", \"set-interval\", \"set-timeout\", \"string/from-code-point\", \"string/raw\", \"symbol\", \"symbol/async-iterator\", \"symbol/for\", \"symbol/has-instance\", \"symbol/is-concat-spreadable\", \"symbol/iterator\", \"symbol/key-for\", \"symbol/match\", \"symbol/replace\", \"symbol/search\", \"symbol/species\", \"symbol/split\", \"symbol/to-primitive\", \"symbol/to-string-tag\", \"symbol/unscopables\", \"url\", \"url-search-params\", \"weak-map\", \"weak-set\"]);\nconst proposals = new Set([...stable, \"aggregate-error\", \"composite-key\", \"composite-symbol\", \"global-this\", \"instance/at\", \"instance/code-points\", \"instance/match-all\", \"instance/replace-all\", \"math/clamp\", \"math/degrees\", \"math/deg-per-rad\", \"math/fscale\", \"math/iaddh\", \"math/imulh\", \"math/isubh\", \"math/rad-per-deg\", \"math/radians\", \"math/scale\", \"math/seeded-prng\", \"math/signbit\", \"math/umulh\", \"number/from-string\", \"observable\", \"reflect/define-metadata\", \"reflect/delete-metadata\", \"reflect/get-metadata\", \"reflect/get-metadata-keys\", \"reflect/get-own-metadata\", \"reflect/get-own-metadata-keys\", \"reflect/has-metadata\", \"reflect/has-own-metadata\", \"reflect/metadata\", \"symbol/dispose\", \"symbol/observable\", \"symbol/pattern-match\"]);\n\nconst {\n types: t$2\n} = _babel.default || _babel;\nfunction canSkipPolyfill(desc, path) {\n const {\n node,\n parent\n } = path;\n switch (desc.name) {\n case \"es.string.split\":\n {\n if (!t$2.isCallExpression(parent, {\n callee: node\n })) return false;\n if (parent.arguments.length < 1) return true;\n const splitter = parent.arguments[0];\n return t$2.isStringLiteral(splitter) || t$2.isTemplateLiteral(splitter);\n }\n }\n}\n\nconst {\n types: t$1\n} = _babel.default || _babel;\nconst BABEL_RUNTIME = \"@babel/runtime-corejs3\";\nfunction callMethod(path, id) {\n const {\n object\n } = path.node;\n let context1, context2;\n if (t$1.isIdentifier(object)) {\n context1 = object;\n context2 = t$1.cloneNode(object);\n } else {\n context1 = path.scope.generateDeclaredUidIdentifier(\"context\");\n context2 = t$1.assignmentExpression(\"=\", t$1.cloneNode(context1), object);\n }\n path.replaceWith(t$1.memberExpression(t$1.callExpression(id, [context2]), t$1.identifier(\"call\")));\n path.parentPath.unshiftContainer(\"arguments\", context1);\n}\nfunction isCoreJSSource(source) {\n if (typeof source === \"string\") {\n source = source.replace(/\\\\/g, \"/\").replace(/(\\/(index)?)?(\\.js)?$/i, \"\").toLowerCase();\n }\n return Object.prototype.hasOwnProperty.call(corejsEntries, source) && corejsEntries[source];\n}\nfunction coreJSModule(name) {\n return `core-js/modules/${name}.js`;\n}\nfunction coreJSPureHelper(name, useBabelRuntime, ext) {\n return useBabelRuntime ? `${BABEL_RUNTIME}/core-js/${name}${ext}` : `core-js-pure/features/${name}.js`;\n}\n\nconst {\n types: t\n} = _babel.default || _babel;\nconst presetEnvCompat = \"#__secret_key__@babel/preset-env__compatibility\";\nconst runtimeCompat = \"#__secret_key__@babel/runtime__compatibility\";\nconst uniqueObjects = [\"array\", \"string\", \"iterator\", \"async-iterator\", \"dom-collections\"].map(v => new RegExp(`[a-z]*\\\\.${v}\\\\..*`));\nconst esnextFallback = (name, cb) => {\n if (cb(name)) return true;\n if (!name.startsWith(\"es.\")) return false;\n const fallback = `esnext.${name.slice(3)}`;\n if (!corejs3Polyfills[fallback]) return false;\n return cb(fallback);\n};\nvar index = defineProvider(function ({\n getUtils,\n method,\n shouldInjectPolyfill,\n createMetaResolver,\n debug,\n babel\n}, {\n version = 3,\n proposals: proposals$1,\n shippedProposals,\n [presetEnvCompat]: {\n noRuntimeName = false\n } = {},\n [runtimeCompat]: {\n useBabelRuntime = false,\n ext = \".js\"\n } = {}\n}) {\n const isWebpack = babel.caller(caller => (caller == null ? void 0 : caller.name) === \"babel-loader\");\n const resolve = createMetaResolver({\n global: BuiltIns,\n static: StaticProperties,\n instance: InstanceProperties\n });\n const available = new Set(getModulesListForTargetVersion(version));\n function getCoreJSPureBase(useProposalBase) {\n return useBabelRuntime ? useProposalBase ? `${BABEL_RUNTIME}/core-js` : `${BABEL_RUNTIME}/core-js-stable` : useProposalBase ? \"core-js-pure/features\" : \"core-js-pure/stable\";\n }\n function maybeInjectGlobalImpl(name, utils) {\n if (shouldInjectPolyfill(name)) {\n debug(name);\n utils.injectGlobalImport(coreJSModule(name), name);\n return true;\n }\n return false;\n }\n function maybeInjectGlobal(names, utils, fallback = true) {\n for (const name of names) {\n if (fallback) {\n esnextFallback(name, name => maybeInjectGlobalImpl(name, utils));\n } else {\n maybeInjectGlobalImpl(name, utils);\n }\n }\n }\n function maybeInjectPure(desc, hint, utils, object) {\n if (desc.pure && !(object && desc.exclude && desc.exclude.includes(object)) && esnextFallback(desc.name, shouldInjectPolyfill)) {\n const {\n name\n } = desc;\n let useProposalBase = false;\n if (proposals$1 || shippedProposals && name.startsWith(\"esnext.\")) {\n useProposalBase = true;\n } else if (name.startsWith(\"es.\") && !available.has(name)) {\n useProposalBase = true;\n }\n if (useBabelRuntime && !(useProposalBase ? proposals : stable).has(desc.pure)) {\n return;\n }\n const coreJSPureBase = getCoreJSPureBase(useProposalBase);\n return utils.injectDefaultImport(`${coreJSPureBase}/${desc.pure}${ext}`, hint);\n }\n }\n function isFeatureStable(name) {\n if (name.startsWith(\"esnext.\")) {\n const esName = `es.${name.slice(7)}`;\n // If its imaginative esName is not in latest compat data, it means\n // the proposal is not stage 4\n return esName in corejs3Polyfills;\n }\n return true;\n }\n return {\n name: \"corejs3\",\n runtimeName: noRuntimeName ? null : BABEL_RUNTIME,\n polyfills: corejs3Polyfills,\n filterPolyfills(name) {\n if (!available.has(name)) return false;\n if (proposals$1 || method === \"entry-global\") return true;\n if (shippedProposals && corejs3ShippedProposalsList.has(name)) {\n return true;\n }\n return isFeatureStable(name);\n },\n entryGlobal(meta, utils, path) {\n if (meta.kind !== \"import\") return;\n const modules = isCoreJSSource(meta.source);\n if (!modules) return;\n if (modules.length === 1 && meta.source === coreJSModule(modules[0]) && shouldInjectPolyfill(modules[0])) {\n // Avoid infinite loop: do not replace imports with a new copy of\n // themselves.\n debug(null);\n return;\n }\n const modulesSet = new Set(modules);\n const filteredModules = modules.filter(module => {\n if (!module.startsWith(\"esnext.\")) return true;\n const stable = module.replace(\"esnext.\", \"es.\");\n if (modulesSet.has(stable) && shouldInjectPolyfill(stable)) {\n return false;\n }\n return true;\n });\n maybeInjectGlobal(filteredModules, utils, false);\n path.remove();\n },\n usageGlobal(meta, utils, path) {\n const resolved = resolve(meta);\n if (!resolved) return;\n if (canSkipPolyfill(resolved.desc, path)) return;\n let deps = resolved.desc.global;\n if (resolved.kind !== \"global\" && \"object\" in meta && meta.object && meta.placement === \"prototype\") {\n const low = meta.object.toLowerCase();\n deps = deps.filter(m => uniqueObjects.some(v => v.test(m)) ? m.includes(low) : true);\n }\n maybeInjectGlobal(deps, utils);\n return true;\n },\n usagePure(meta, utils, path) {\n if (meta.kind === \"in\") {\n if (meta.key === \"Symbol.iterator\") {\n path.replaceWith(t.callExpression(utils.injectDefaultImport(coreJSPureHelper(\"is-iterable\", useBabelRuntime, ext), \"isIterable\"), [path.node.right] // meta.kind === \"in\" narrows this\n ));\n }\n\n return;\n }\n if (path.parentPath.isUnaryExpression({\n operator: \"delete\"\n })) return;\n if (meta.kind === \"property\") {\n // We can't compile destructuring and updateExpression.\n if (!path.isMemberExpression()) return;\n if (!path.isReferenced()) return;\n if (path.parentPath.isUpdateExpression()) return;\n if (t.isSuper(path.node.object)) {\n return;\n }\n if (meta.key === \"Symbol.iterator\") {\n if (!shouldInjectPolyfill(\"es.symbol.iterator\")) return;\n const {\n parent,\n node\n } = path;\n if (t.isCallExpression(parent, {\n callee: node\n })) {\n if (parent.arguments.length === 0) {\n path.parentPath.replaceWith(t.callExpression(utils.injectDefaultImport(coreJSPureHelper(\"get-iterator\", useBabelRuntime, ext), \"getIterator\"), [node.object]));\n path.skip();\n } else {\n callMethod(path, utils.injectDefaultImport(coreJSPureHelper(\"get-iterator-method\", useBabelRuntime, ext), \"getIteratorMethod\"));\n }\n } else {\n path.replaceWith(t.callExpression(utils.injectDefaultImport(coreJSPureHelper(\"get-iterator-method\", useBabelRuntime, ext), \"getIteratorMethod\"), [path.node.object]));\n }\n return;\n }\n }\n let resolved = resolve(meta);\n if (!resolved) return;\n if (canSkipPolyfill(resolved.desc, path)) return;\n if (useBabelRuntime && resolved.desc.pure && resolved.desc.pure.slice(-6) === \"/index\") {\n // Remove /index, since it doesn't exist in @babel/runtime-corejs3s\n resolved = {\n ...resolved,\n desc: {\n ...resolved.desc,\n pure: resolved.desc.pure.slice(0, -6)\n }\n };\n }\n if (resolved.kind === \"global\") {\n const id = maybeInjectPure(resolved.desc, resolved.name, utils);\n if (id) path.replaceWith(id);\n } else if (resolved.kind === \"static\") {\n const id = maybeInjectPure(resolved.desc, resolved.name, utils,\n // @ts-expect-error\n meta.object);\n if (id) path.replaceWith(id);\n } else if (resolved.kind === \"instance\") {\n const id = maybeInjectPure(resolved.desc, `${resolved.name}InstanceProperty`, utils,\n // @ts-expect-error\n meta.object);\n if (!id) return;\n const {\n node\n } = path;\n if (t.isCallExpression(path.parent, {\n callee: node\n })) {\n callMethod(path, id);\n } else {\n path.replaceWith(t.callExpression(id, [node.object]));\n }\n }\n },\n visitor: method === \"usage-global\" && {\n // import(\"foo\")\n CallExpression(path) {\n if (path.get(\"callee\").isImport()) {\n const utils = getUtils(path);\n if (isWebpack) {\n // Webpack uses Promise.all to handle dynamic import.\n maybeInjectGlobal(PromiseDependenciesWithIterators, utils);\n } else {\n maybeInjectGlobal(PromiseDependencies, utils);\n }\n }\n },\n // (async function () { }).finally(...)\n Function(path) {\n if (path.node.async) {\n maybeInjectGlobal(PromiseDependencies, getUtils(path));\n }\n },\n // for-of, [a, b] = c\n \"ForOfStatement|ArrayPattern\"(path) {\n maybeInjectGlobal(CommonIterators, getUtils(path));\n },\n // [...spread]\n SpreadElement(path) {\n if (!path.parentPath.isObjectExpression()) {\n maybeInjectGlobal(CommonIterators, getUtils(path));\n }\n },\n // yield*\n YieldExpression(path) {\n if (path.node.delegate) {\n maybeInjectGlobal(CommonIterators, getUtils(path));\n }\n },\n // Decorators metadata\n Class(path) {\n var _path$node$decorators;\n const hasDecorators = ((_path$node$decorators = path.node.decorators) == null ? void 0 : _path$node$decorators.length) || path.node.body.body.some(el => {\n var _decorators;\n return (_decorators = el.decorators) == null ? void 0 : _decorators.length;\n });\n if (hasDecorators) {\n maybeInjectGlobal(DecoratorMetadataDependencies, getUtils(path));\n }\n }\n }\n };\n});\n\nexport default index;\n//# sourceMappingURL=index.mjs.map\n","import semver, { type SemVer } from \"semver\";\nimport { logPlugin } from \"./debug.ts\";\nimport {\n addProposalSyntaxPlugins,\n removeUnnecessaryItems,\n removeUnsupportedItems,\n} from \"./filter-items.ts\";\nimport moduleTransformations from \"./module-transformations.ts\";\nimport normalizeOptions from \"./normalize-options.ts\";\nimport {\n pluginSyntaxMap,\n proposalPlugins,\n proposalSyntaxPlugins,\n} from \"./shipped-proposals.ts\";\nimport {\n plugins as pluginsList,\n pluginsBugfixes as pluginsBugfixesList,\n overlappingPlugins,\n} from \"./plugins-compat-data.ts\";\n\nimport type { CallerMetadata } from \"@babel/core\";\n\nimport _pluginCoreJS3 from \"babel-plugin-polyfill-corejs3\";\n// TODO(Babel 8): Just use the default import\nconst pluginCoreJS3 = _pluginCoreJS3.default || _pluginCoreJS3;\n\n// TODO(Babel 8): Remove this\nimport babel7 from \"./polyfills/babel-7-plugins.cjs\";\n\nimport getTargets, {\n prettifyTargets,\n filterItems,\n isRequired,\n} from \"@babel/helper-compilation-targets\";\nimport type { Targets, InputTargets } from \"@babel/helper-compilation-targets\";\nimport availablePlugins from \"./available-plugins.ts\";\nimport { declarePreset } from \"@babel/helper-plugin-utils\";\n\nimport type { BuiltInsOption, ModuleOption, Options } from \"./types.ts\";\nexport type { Options };\n\n// TODO: Remove in Babel 8\nexport function isPluginRequired(targets: Targets, support: Targets) {\n return isRequired(\"fake-name\", targets, {\n compatData: { \"fake-name\": support },\n });\n}\n\nfunction filterStageFromList(\n list: { [feature: string]: Targets },\n stageList: Set,\n) {\n return Object.keys(list).reduce((result, item) => {\n if (!stageList.has(item)) {\n // @ts-expect-error todo: refine result types\n result[item] = list[item];\n }\n\n return result;\n }, {});\n}\n\nconst pluginLists = {\n withProposals: {\n withoutBugfixes: pluginsList,\n withBugfixes: Object.assign({}, pluginsList, pluginsBugfixesList),\n },\n withoutProposals: {\n withoutBugfixes: filterStageFromList(pluginsList, proposalPlugins),\n withBugfixes: filterStageFromList(\n Object.assign({}, pluginsList, pluginsBugfixesList),\n proposalPlugins,\n ),\n },\n};\n\nfunction getPluginList(proposals: boolean, bugfixes: boolean) {\n if (proposals) {\n if (bugfixes) return pluginLists.withProposals.withBugfixes;\n else return pluginLists.withProposals.withoutBugfixes;\n } else {\n if (bugfixes) return pluginLists.withoutProposals.withBugfixes;\n else return pluginLists.withoutProposals.withoutBugfixes;\n }\n}\n\nconst getPlugin = (pluginName: string) => {\n const plugin =\n // @ts-expect-error plugin name is constructed from available plugin list\n availablePlugins[pluginName]();\n\n if (!plugin) {\n throw new Error(\n `Could not find plugin \"${pluginName}\". Ensure there is an entry in ./available-plugins.js for it.`,\n );\n }\n\n return plugin;\n};\n\nexport const transformIncludesAndExcludes = (opts: Array): any => {\n return opts.reduce(\n (result, opt) => {\n const target = /^(?:es|es6|es7|esnext|web)\\./.test(opt)\n ? \"builtIns\"\n : \"plugins\";\n result[target].add(opt);\n return result;\n },\n {\n all: opts,\n plugins: new Set(),\n builtIns: new Set(),\n },\n );\n};\n\nfunction getSpecialModulesPluginNames(\n modules: Exclude,\n shouldTransformDynamicImport: boolean,\n babelVersion: string,\n) {\n const modulesPluginNames = [];\n if (modules) {\n modulesPluginNames.push(moduleTransformations[modules]);\n }\n\n if (shouldTransformDynamicImport) {\n if (modules && modules !== \"umd\") {\n modulesPluginNames.push(\"transform-dynamic-import\");\n } else {\n console.warn(\n \"Dynamic import can only be transformed when transforming ES\" +\n \" modules to AMD, CommonJS or SystemJS.\",\n );\n }\n }\n\n if (!process.env.BABEL_8_BREAKING && babelVersion[0] !== \"8\") {\n // Enable module-related syntax plugins for older Babel versions\n if (!shouldTransformDynamicImport) {\n modulesPluginNames.push(\"syntax-dynamic-import\");\n }\n modulesPluginNames.push(\"syntax-top-level-await\");\n modulesPluginNames.push(\"syntax-import-meta\");\n }\n\n return modulesPluginNames;\n}\n\nconst getCoreJSOptions = ({\n useBuiltIns,\n corejs,\n polyfillTargets,\n include,\n exclude,\n proposals,\n shippedProposals,\n debug,\n}: {\n useBuiltIns: BuiltInsOption;\n corejs: SemVer | null | false;\n polyfillTargets: Targets;\n include: Set;\n exclude: Set;\n proposals: boolean;\n shippedProposals: boolean;\n debug: boolean;\n}) => ({\n method: `${useBuiltIns}-global`,\n version: corejs ? corejs.toString() : undefined,\n targets: polyfillTargets,\n include,\n exclude,\n proposals,\n shippedProposals,\n debug,\n \"#__secret_key__@babel/preset-env__compatibility\": {\n noRuntimeName: true,\n },\n});\n\nif (!process.env.BABEL_8_BREAKING) {\n // eslint-disable-next-line no-var\n var getPolyfillPlugins = ({\n useBuiltIns,\n corejs,\n polyfillTargets,\n include,\n exclude,\n proposals,\n shippedProposals,\n regenerator,\n debug,\n }: {\n useBuiltIns: BuiltInsOption;\n corejs: SemVer | null | false;\n polyfillTargets: Targets;\n include: Set;\n exclude: Set;\n proposals: boolean;\n shippedProposals: boolean;\n regenerator: boolean;\n debug: boolean;\n }) => {\n const polyfillPlugins = [];\n if (useBuiltIns === \"usage\" || useBuiltIns === \"entry\") {\n const pluginOptions = getCoreJSOptions({\n useBuiltIns,\n corejs,\n polyfillTargets,\n include,\n exclude,\n proposals,\n shippedProposals,\n debug,\n });\n\n if (corejs) {\n if (process.env.BABEL_8_BREAKING) {\n polyfillPlugins.push([pluginCoreJS3, pluginOptions]);\n } else {\n if (useBuiltIns === \"usage\") {\n if (corejs.major === 2) {\n polyfillPlugins.push(\n [babel7.pluginCoreJS2, pluginOptions],\n [babel7.legacyBabelPolyfillPlugin, { usage: true }],\n );\n } else {\n polyfillPlugins.push(\n [pluginCoreJS3, pluginOptions],\n [\n babel7.legacyBabelPolyfillPlugin,\n { usage: true, deprecated: true },\n ],\n );\n }\n if (regenerator) {\n polyfillPlugins.push([\n babel7.pluginRegenerator,\n { method: \"usage-global\", debug },\n ]);\n }\n } else {\n if (corejs.major === 2) {\n polyfillPlugins.push(\n [babel7.legacyBabelPolyfillPlugin, { regenerator }],\n [babel7.pluginCoreJS2, pluginOptions],\n );\n } else {\n polyfillPlugins.push(\n [pluginCoreJS3, pluginOptions],\n [babel7.legacyBabelPolyfillPlugin, { deprecated: true }],\n );\n if (!regenerator) {\n polyfillPlugins.push([\n babel7.removeRegeneratorEntryPlugin,\n pluginOptions,\n ]);\n }\n }\n }\n }\n }\n }\n return polyfillPlugins;\n };\n\n if (!USE_ESM) {\n // eslint-disable-next-line no-restricted-globals\n exports.getPolyfillPlugins = getPolyfillPlugins;\n }\n}\n\nfunction getLocalTargets(\n optionsTargets: Options[\"targets\"],\n ignoreBrowserslistConfig: boolean,\n configPath: string,\n browserslistEnv: string,\n) {\n if (optionsTargets?.esmodules && optionsTargets.browsers) {\n console.warn(`\n@babel/preset-env: esmodules and browsers targets have been specified together.\n\\`browsers\\` target, \\`${optionsTargets.browsers.toString()}\\` will be ignored.\n`);\n }\n\n return getTargets(optionsTargets as InputTargets, {\n ignoreBrowserslistConfig,\n configPath,\n browserslistEnv,\n });\n}\n\nfunction supportsStaticESM(caller: CallerMetadata | undefined) {\n // TODO(Babel 8): Fallback to true\n // @ts-expect-error supportsStaticESM is not defined in CallerMetadata\n return !!caller?.supportsStaticESM;\n}\n\nfunction supportsDynamicImport(caller: CallerMetadata | undefined) {\n // TODO(Babel 8): Fallback to true\n // @ts-expect-error supportsDynamicImport is not defined in CallerMetadata\n return !!caller?.supportsDynamicImport;\n}\n\nfunction supportsExportNamespaceFrom(caller: CallerMetadata | undefined) {\n // TODO(Babel 8): Fallback to null\n // @ts-expect-error supportsExportNamespaceFrom is not defined in CallerMetadata\n return !!caller?.supportsExportNamespaceFrom;\n}\n\nexport default declarePreset((api, opts: Options) => {\n api.assertVersion(REQUIRED_VERSION(7));\n\n const babelTargets = api.targets();\n\n if (process.env.BABEL_8_BREAKING && (\"loose\" in opts || \"spec\" in opts)) {\n throw new Error(\n \"@babel/preset-env: The 'loose' and 'spec' options have been removed, \" +\n \"and you should configure granular compiler assumptions instead. See \" +\n \"https://babeljs.io/assumptions for more information.\",\n );\n }\n\n const {\n bugfixes,\n configPath,\n debug,\n exclude: optionsExclude,\n forceAllTransforms,\n ignoreBrowserslistConfig,\n include: optionsInclude,\n modules: optionsModules,\n shippedProposals,\n targets: optionsTargets,\n useBuiltIns,\n corejs: { version: corejs, proposals },\n browserslistEnv,\n } = normalizeOptions(opts);\n\n if (!process.env.BABEL_8_BREAKING) {\n // eslint-disable-next-line no-var\n var { loose, spec = false } = opts;\n }\n\n let targets = babelTargets;\n\n if (\n // @babel/core < 7.13.0 doesn't load targets (api.targets() always\n // returns {} thanks to @babel/helper-plugin-utils), so we always want\n // to fallback to the old targets behavior in this case.\n semver.lt(api.version, \"7.13.0\") ||\n // If any browserslist-related option is specified, fallback to the old\n // behavior of not using the targets specified in the top-level options.\n opts.targets ||\n opts.configPath ||\n opts.browserslistEnv ||\n opts.ignoreBrowserslistConfig\n ) {\n if (!process.env.BABEL_8_BREAKING) {\n // eslint-disable-next-line no-var\n var hasUglifyTarget = false;\n\n if (optionsTargets?.uglify) {\n hasUglifyTarget = true;\n delete optionsTargets.uglify;\n\n console.warn(`\nThe uglify target has been deprecated. Set the top level\noption \\`forceAllTransforms: true\\` instead.\n`);\n }\n }\n\n targets = getLocalTargets(\n optionsTargets,\n ignoreBrowserslistConfig,\n configPath,\n browserslistEnv,\n );\n }\n\n const transformTargets = (\n process.env.BABEL_8_BREAKING\n ? forceAllTransforms\n : forceAllTransforms || hasUglifyTarget\n )\n ? ({} as Targets)\n : targets;\n\n const include = transformIncludesAndExcludes(optionsInclude);\n const exclude = transformIncludesAndExcludes(optionsExclude);\n\n const compatData = getPluginList(shippedProposals, bugfixes);\n const modules =\n optionsModules === \"auto\"\n ? api.caller(supportsStaticESM)\n ? false\n : \"commonjs\"\n : optionsModules;\n const shouldTransformDynamicImport =\n optionsModules === \"auto\" ? !api.caller(supportsDynamicImport) : !!modules;\n\n // If the caller does not support export-namespace-from, we forcefully add\n // the plugin to `includes`.\n // TODO(Babel 8): stop doing this, similarly to how we don't do this for any\n // other plugin. We can consider adding bundlers as targets in the future,\n // but we should not have a one-off special case for this plugin.\n if (\n !exclude.plugins.has(\"transform-export-namespace-from\") &&\n (optionsModules === \"auto\"\n ? !api.caller(supportsExportNamespaceFrom)\n : !!modules)\n ) {\n include.plugins.add(\"transform-export-namespace-from\");\n }\n\n const pluginNames = filterItems(\n compatData,\n include.plugins,\n exclude.plugins,\n transformTargets,\n getSpecialModulesPluginNames(\n modules,\n shouldTransformDynamicImport,\n api.version,\n ),\n process.env.BABEL_8_BREAKING || !loose\n ? undefined\n : [\"transform-typeof-symbol\"],\n pluginSyntaxMap,\n );\n if (shippedProposals) {\n addProposalSyntaxPlugins(pluginNames, proposalSyntaxPlugins);\n }\n removeUnsupportedItems(pluginNames, api.version);\n removeUnnecessaryItems(pluginNames, overlappingPlugins);\n\n const polyfillPlugins = process.env.BABEL_8_BREAKING\n ? useBuiltIns\n ? [\n [\n pluginCoreJS3,\n getCoreJSOptions({\n useBuiltIns,\n corejs,\n polyfillTargets: targets,\n include: include.builtIns,\n exclude: exclude.builtIns,\n proposals,\n shippedProposals,\n debug,\n }),\n ],\n ]\n : []\n : getPolyfillPlugins({\n useBuiltIns,\n corejs,\n polyfillTargets: targets,\n include: include.builtIns,\n exclude: exclude.builtIns,\n proposals,\n shippedProposals,\n regenerator: pluginNames.has(\"transform-regenerator\"),\n debug,\n });\n\n const pluginUseBuiltIns = useBuiltIns !== false;\n const plugins = Array.from(pluginNames)\n .map(pluginName => {\n if (\n !process.env.BABEL_8_BREAKING &&\n (pluginName === \"transform-class-properties\" ||\n pluginName === \"transform-private-methods\" ||\n pluginName === \"transform-private-property-in-object\")\n ) {\n return [\n getPlugin(pluginName),\n {\n loose: loose\n ? \"#__internal__@babel/preset-env__prefer-true-but-false-is-ok-if-it-prevents-an-error\"\n : \"#__internal__@babel/preset-env__prefer-false-but-true-is-ok-if-it-prevents-an-error\",\n },\n ];\n }\n if (pluginName === \"syntax-import-attributes\") {\n // For backward compatibility with the import-assertions plugin, we\n // allow the deprecated `assert` keyword.\n // TODO(Babel 8): Revisit this.\n return [getPlugin(pluginName), { deprecatedAssertSyntax: true }];\n }\n return [\n getPlugin(pluginName),\n process.env.BABEL_8_BREAKING\n ? { useBuiltIns: pluginUseBuiltIns }\n : { spec, loose, useBuiltIns: pluginUseBuiltIns },\n ];\n })\n .concat(polyfillPlugins);\n\n if (debug) {\n console.log(\"@babel/preset-env: `DEBUG` option\");\n console.log(\"\\nUsing targets:\");\n console.log(JSON.stringify(prettifyTargets(targets), null, 2));\n console.log(`\\nUsing modules transform: ${optionsModules.toString()}`);\n console.log(\"\\nUsing plugins:\");\n pluginNames.forEach(pluginName => {\n logPlugin(pluginName, targets, compatData);\n });\n\n if (!useBuiltIns) {\n console.log(\n \"\\nUsing polyfills: No polyfills were added, since the `useBuiltIns` option was not set.\",\n );\n }\n }\n\n return { plugins };\n});\n\nif (!process.env.BABEL_8_BREAKING && !USE_ESM) {\n // eslint-disable-next-line no-restricted-globals\n exports.getModulesPluginNames = ({\n modules,\n transformations,\n shouldTransformESM,\n shouldTransformDynamicImport,\n shouldTransformExportNamespaceFrom,\n }: {\n modules: ModuleOption;\n transformations: typeof import(\"./module-transformations\").default;\n shouldTransformESM: boolean;\n shouldTransformDynamicImport: boolean;\n shouldTransformExportNamespaceFrom: boolean;\n }) => {\n const modulesPluginNames = [];\n if (modules !== false && transformations[modules]) {\n if (shouldTransformESM) {\n modulesPluginNames.push(transformations[modules]);\n }\n\n if (shouldTransformDynamicImport) {\n if (shouldTransformESM && modules !== \"umd\") {\n modulesPluginNames.push(\"transform-dynamic-import\");\n } else {\n console.warn(\n \"Dynamic import can only be transformed when transforming ES\" +\n \" modules to AMD, CommonJS or SystemJS.\",\n );\n }\n }\n }\n\n if (shouldTransformExportNamespaceFrom) {\n modulesPluginNames.push(\"transform-export-namespace-from\");\n }\n if (!shouldTransformDynamicImport) {\n modulesPluginNames.push(\"syntax-dynamic-import\");\n }\n if (!shouldTransformExportNamespaceFrom) {\n modulesPluginNames.push(\"syntax-export-namespace-from\");\n }\n modulesPluginNames.push(\"syntax-top-level-await\");\n modulesPluginNames.push(\"syntax-import-meta\");\n\n return modulesPluginNames;\n };\n}\n","import { OptionValidator } from \"@babel/helper-validator-option\";\nconst v = new OptionValidator(\"@babel/preset-flow\");\n\nexport default function normalizeOptions(options: any = {}) {\n let { all, ignoreExtensions, experimental_useHermesParser } = options;\n const { allowDeclareFields } = options;\n\n if (process.env.BABEL_8_BREAKING) {\n v.invariant(\n !(\"allowDeclareFields\" in options),\n `Since Babel 8, \\`declare property: A\\` is always supported, and the \"allowDeclareFields\" option is no longer available. Please remove it from your config.`,\n );\n const TopLevelOptions = {\n all: \"all\",\n ignoreExtensions: \"ignoreExtensions\",\n experimental_useHermesParser: \"experimental_useHermesParser\",\n };\n v.validateTopLevelOptions(options, TopLevelOptions);\n all = v.validateBooleanOption(TopLevelOptions.all, all);\n ignoreExtensions = v.validateBooleanOption(\n TopLevelOptions.ignoreExtensions,\n ignoreExtensions,\n );\n experimental_useHermesParser = v.validateBooleanOption(\n TopLevelOptions.experimental_useHermesParser,\n experimental_useHermesParser,\n );\n return {\n all,\n ignoreExtensions,\n experimental_useHermesParser,\n };\n } else {\n return {\n all,\n allowDeclareFields,\n ignoreExtensions,\n experimental_useHermesParser,\n };\n }\n}\n","import { declarePreset } from \"@babel/helper-plugin-utils\";\nimport transformFlowStripTypes from \"@babel/plugin-transform-flow-strip-types\";\nimport normalizeOptions from \"./normalize-options.ts\";\n\nexport default declarePreset((api, opts) => {\n api.assertVersion(REQUIRED_VERSION(7));\n const {\n all,\n allowDeclareFields,\n ignoreExtensions = process.env.BABEL_8_BREAKING ? false : true,\n experimental_useHermesParser: useHermesParser = false,\n } = normalizeOptions(opts);\n\n const plugins: any[] = [\n [transformFlowStripTypes, { all, allowDeclareFields }],\n ];\n\n if (useHermesParser) {\n if (Number.parseInt(process.versions.node, 10) < 12) {\n throw new Error(\n \"The Hermes parser is only supported in Node 12 and later.\",\n );\n }\n if (IS_STANDALONE) {\n throw new Error(\n \"The Hermes parser is not supported in the @babel/standalone.\",\n );\n }\n plugins.unshift(\"babel-plugin-syntax-hermes-parser\");\n }\n\n if (ignoreExtensions) {\n return { plugins };\n }\n\n return {\n overrides: [\n {\n test: filename => filename == null || !/\\.tsx?$/.test(filename),\n plugins,\n },\n ],\n };\n});\n","import { declare } from \"@babel/helper-plugin-utils\";\nimport annotateAsPure from \"@babel/helper-annotate-as-pure\";\nimport { types as t, type NodePath } from \"@babel/core\";\n\n// Mapping of React top-level methods that are pure.\n// This plugin adds a /*#__PURE__#/ annotation to calls to these methods,\n// so that terser and other minifiers can safely remove them during dead\n// code elimination.\n// See https://reactjs.org/docs/react-api.html\nconst PURE_CALLS: [string, Set][] = [\n [\n \"react\",\n new Set([\n \"cloneElement\",\n \"createContext\",\n \"createElement\",\n \"createFactory\",\n \"createRef\",\n \"forwardRef\",\n \"isValidElement\",\n \"memo\",\n \"lazy\",\n ]),\n ],\n [\"react-dom\", new Set([\"createPortal\"])],\n];\n\nexport default declare(api => {\n api.assertVersion(REQUIRED_VERSION(7));\n\n return {\n name: \"transform-react-pure-annotations\",\n visitor: {\n CallExpression(path) {\n if (isReactCall(path)) {\n annotateAsPure(path);\n }\n },\n },\n };\n});\n\nfunction isReactCall(path: NodePath) {\n // If the callee is not a member expression, then check if it matches\n // a named import, e.g. `import {forwardRef} from 'react'`.\n const calleePath = path.get(\"callee\");\n if (!calleePath.isMemberExpression()) {\n for (const [module, methods] of PURE_CALLS) {\n for (const method of methods) {\n if (calleePath.referencesImport(module, method)) {\n return true;\n }\n }\n }\n\n return false;\n }\n\n // Otherwise, check if the member expression's object matches\n // a default import (`import React from 'react'`) or namespace\n // import (`import * as React from 'react'), and check if the\n // property matches one of the pure methods.\n const object = calleePath.get(\"object\");\n const callee = calleePath.node;\n if (!callee.computed && t.isIdentifier(callee.property)) {\n const propertyName = callee.property.name;\n for (const [module, methods] of PURE_CALLS) {\n if (\n object.referencesImport(module, \"default\") ||\n object.referencesImport(module, \"*\")\n ) {\n return methods.has(propertyName);\n }\n }\n }\n\n return false;\n}\n","import {\n OptionValidator,\n findSuggestion,\n} from \"@babel/helper-validator-option\";\nconst v = new OptionValidator(\"@babel/preset-react\");\n\nexport default function normalizeOptions(options: any = {}) {\n if (process.env.BABEL_8_BREAKING) {\n if (\"useSpread\" in options) {\n throw new Error(\n '@babel/preset-react: Since Babel 8, an inline object with spread elements is always used, and the \"useSpread\" option is no longer available. Please remove it from your config.',\n );\n }\n\n if (\"useBuiltIns\" in options) {\n const useBuiltInsFormatted = JSON.stringify(options.useBuiltIns);\n throw new Error(\n `@babel/preset-react: Since \"useBuiltIns\" is removed in Babel 8, you can remove it from the config.\n- Babel 8 now transforms JSX spread to object spread. If you need to transpile object spread with\n\\`useBuiltIns: ${useBuiltInsFormatted}\\`, you can use the following config\n{\n \"plugins\": [\n [\"@babel/plugin-transform-object-rest-spread\", { \"loose\": true, \"useBuiltIns\": ${useBuiltInsFormatted} }]\n ],\n \"presets\": [\"@babel/preset-react\"]\n}`,\n );\n }\n\n const TopLevelOptions = {\n development: \"development\",\n importSource: \"importSource\",\n pragma: \"pragma\",\n pragmaFrag: \"pragmaFrag\",\n pure: \"pure\",\n runtime: \"runtime\",\n throwIfNamespace: \"throwIfNamespace\",\n };\n v.validateTopLevelOptions(options, TopLevelOptions);\n const development = v.validateBooleanOption(\n TopLevelOptions.development,\n options.development,\n false,\n );\n let importSource = v.validateStringOption(\n TopLevelOptions.importSource,\n options.importSource,\n );\n let pragma = v.validateStringOption(TopLevelOptions.pragma, options.pragma);\n let pragmaFrag = v.validateStringOption(\n TopLevelOptions.pragmaFrag,\n options.pragmaFrag,\n );\n const pure = v.validateBooleanOption(TopLevelOptions.pure, options.pure);\n const runtime = v.validateStringOption(\n TopLevelOptions.runtime,\n options.runtime,\n \"automatic\",\n );\n const throwIfNamespace = v.validateBooleanOption(\n TopLevelOptions.throwIfNamespace,\n options.throwIfNamespace,\n true,\n );\n\n const validRuntime = [\"classic\", \"automatic\"];\n\n if (runtime === \"classic\") {\n pragma = pragma || \"React.createElement\";\n pragmaFrag = pragmaFrag || \"React.Fragment\";\n } else if (runtime === \"automatic\") {\n importSource = importSource || \"react\";\n } else {\n throw new Error(\n `@babel/preset-react: 'runtime' must be one of ['automatic', 'classic'] but we have '${runtime}'\\n` +\n `- Did you mean '${findSuggestion(runtime, validRuntime)}'?`,\n );\n }\n\n return {\n development,\n importSource,\n pragma,\n pragmaFrag,\n pure,\n runtime,\n throwIfNamespace,\n };\n } else {\n let { pragma, pragmaFrag } = options;\n\n const {\n pure,\n throwIfNamespace = true,\n runtime = \"classic\",\n importSource,\n useBuiltIns,\n useSpread,\n } = options;\n\n if (runtime === \"classic\") {\n pragma = pragma || \"React.createElement\";\n pragmaFrag = pragmaFrag || \"React.Fragment\";\n }\n\n const development = !!options.development;\n\n return {\n development,\n importSource,\n pragma,\n pragmaFrag,\n pure,\n runtime,\n throwIfNamespace,\n useBuiltIns,\n useSpread,\n };\n }\n}\n","import { declarePreset } from \"@babel/helper-plugin-utils\";\nimport transformReactJSX from \"@babel/plugin-transform-react-jsx\";\nimport transformReactJSXDevelopment from \"@babel/plugin-transform-react-jsx-development\";\nimport transformReactDisplayName from \"@babel/plugin-transform-react-display-name\";\nimport transformReactPure from \"@babel/plugin-transform-react-pure-annotations\";\nimport normalizeOptions from \"./normalize-options.ts\";\n\nexport interface Options {\n development?: boolean;\n importSource?: string;\n pragma?: string;\n pragmaFrag?: string;\n pure?: string;\n runtime?: \"automatic\" | \"classic\";\n throwIfNamespace?: boolean;\n useBuiltIns?: boolean;\n useSpread?: boolean;\n}\n\nexport default declarePreset((api, opts: Options) => {\n api.assertVersion(REQUIRED_VERSION(7));\n\n const {\n development,\n importSource,\n pragma,\n pragmaFrag,\n pure,\n runtime,\n throwIfNamespace,\n } = normalizeOptions(opts);\n\n return {\n plugins: [\n [\n development ? transformReactJSXDevelopment : transformReactJSX,\n process.env.BABEL_8_BREAKING\n ? {\n importSource,\n pragma,\n pragmaFrag,\n runtime,\n throwIfNamespace,\n pure,\n }\n : {\n importSource,\n pragma,\n pragmaFrag,\n runtime,\n throwIfNamespace,\n pure,\n useBuiltIns: !!opts.useBuiltIns,\n useSpread: opts.useSpread,\n },\n ],\n transformReactDisplayName,\n pure !== false && transformReactPure,\n ].filter(Boolean),\n };\n});\n","import { OptionValidator } from \"@babel/helper-validator-option\";\nconst v = new OptionValidator(\"@babel/preset-typescript\");\n\nexport interface Options {\n ignoreExtensions?: boolean;\n allowDeclareFields?: boolean;\n allowNamespaces?: boolean;\n disallowAmbiguousJSXLike?: boolean;\n jsxPragma?: string;\n jsxPragmaFrag?: string;\n onlyRemoveTypeImports?: boolean;\n optimizeConstEnums?: boolean;\n rewriteImportExtensions?: boolean;\n\n // TODO: Remove in Babel 8\n allExtensions?: boolean;\n isTSX?: boolean;\n}\n\nexport default function normalizeOptions(options: Options = {}) {\n let { allowNamespaces = true, jsxPragma, onlyRemoveTypeImports } = options;\n\n const TopLevelOptions: {\n [Key in keyof Omit]-?: Key;\n } = {\n ignoreExtensions: \"ignoreExtensions\",\n allowNamespaces: \"allowNamespaces\",\n disallowAmbiguousJSXLike: \"disallowAmbiguousJSXLike\",\n jsxPragma: \"jsxPragma\",\n jsxPragmaFrag: \"jsxPragmaFrag\",\n onlyRemoveTypeImports: \"onlyRemoveTypeImports\",\n optimizeConstEnums: \"optimizeConstEnums\",\n rewriteImportExtensions: \"rewriteImportExtensions\",\n\n // TODO: Remove in Babel 8\n allExtensions: \"allExtensions\",\n isTSX: \"isTSX\",\n };\n\n if (process.env.BABEL_8_BREAKING) {\n v.invariant(\n !(\"allowDeclareFields\" in options),\n \"The .allowDeclareFields option has been removed and it's now always enabled. Please remove it from your config.\",\n );\n v.invariant(\n !(\"allExtensions\" in options) && !(\"isTSX\" in options),\n \"The .allExtensions and .isTSX options have been removed.\\n\" +\n \"If you want to disable JSX detection based on file extensions, \" +\n \"you can set the .ignoreExtensions option to true.\\n\" +\n \"If you want to force JSX parsing, you can enable the \" +\n \"@babel/plugin-syntax-jsx plugin.\",\n );\n\n v.validateTopLevelOptions(options, TopLevelOptions);\n allowNamespaces = v.validateBooleanOption(\n TopLevelOptions.allowNamespaces,\n options.allowNamespaces,\n true,\n );\n jsxPragma = v.validateStringOption(\n TopLevelOptions.jsxPragma,\n options.jsxPragma,\n \"React\",\n );\n onlyRemoveTypeImports = v.validateBooleanOption(\n TopLevelOptions.onlyRemoveTypeImports,\n options.onlyRemoveTypeImports,\n true,\n );\n }\n\n const jsxPragmaFrag = v.validateStringOption(\n TopLevelOptions.jsxPragmaFrag,\n options.jsxPragmaFrag,\n \"React.Fragment\",\n );\n\n if (!process.env.BABEL_8_BREAKING) {\n // eslint-disable-next-line no-var\n var allExtensions = v.validateBooleanOption(\n TopLevelOptions.allExtensions,\n options.allExtensions,\n false,\n );\n\n // eslint-disable-next-line no-var\n var isTSX = v.validateBooleanOption(\n TopLevelOptions.isTSX,\n options.isTSX,\n false,\n );\n if (isTSX) {\n v.invariant(allExtensions, \"isTSX:true requires allExtensions:true\");\n }\n }\n\n const ignoreExtensions = v.validateBooleanOption(\n TopLevelOptions.ignoreExtensions,\n options.ignoreExtensions,\n false,\n );\n\n const disallowAmbiguousJSXLike = v.validateBooleanOption(\n TopLevelOptions.disallowAmbiguousJSXLike,\n options.disallowAmbiguousJSXLike,\n false,\n );\n if (disallowAmbiguousJSXLike) {\n if (process.env.BABEL_8_BREAKING) {\n v.invariant(\n ignoreExtensions,\n \"disallowAmbiguousJSXLike:true requires ignoreExtensions:true\",\n );\n } else {\n v.invariant(\n allExtensions,\n \"disallowAmbiguousJSXLike:true requires allExtensions:true\",\n );\n }\n }\n\n const optimizeConstEnums = v.validateBooleanOption(\n TopLevelOptions.optimizeConstEnums,\n options.optimizeConstEnums,\n false,\n );\n\n const rewriteImportExtensions = v.validateBooleanOption(\n TopLevelOptions.rewriteImportExtensions,\n options.rewriteImportExtensions,\n false,\n );\n\n const normalized: Options = {\n ignoreExtensions,\n allowNamespaces,\n disallowAmbiguousJSXLike,\n jsxPragma,\n jsxPragmaFrag,\n onlyRemoveTypeImports,\n optimizeConstEnums,\n rewriteImportExtensions,\n };\n if (!process.env.BABEL_8_BREAKING) {\n normalized.allExtensions = allExtensions;\n normalized.isTSX = isTSX;\n }\n return normalized;\n}\n","import { declare } from \"@babel/helper-plugin-utils\";\nimport type { types as t, NodePath } from \"@babel/core\";\n\nexport default declare(function ({ types: t }) {\n return {\n name: \"preset-typescript/plugin-rewrite-ts-imports\",\n visitor: {\n \"ImportDeclaration|ExportAllDeclaration|ExportNamedDeclaration\"({\n node,\n }: NodePath<\n t.ImportDeclaration | t.ExportAllDeclaration | t.ExportNamedDeclaration\n >) {\n const { source } = node;\n const kind = t.isImportDeclaration(node)\n ? node.importKind\n : node.exportKind;\n if (kind === \"value\" && source && /[\\\\/]/.test(source.value)) {\n source.value = source.value\n .replace(/(\\.[mc]?)ts$/, \"$1js\")\n .replace(/\\.tsx$/, \".js\");\n }\n },\n },\n };\n});\n","/**\n * Copyright 2013-2015, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of the React source tree.\n */\n\nconst scriptTypes = [\"text/jsx\", \"text/babel\"];\n\nimport type { transform } from \"./index.ts\";\nimport type { InputOptions } from \"@babel/core\";\n\nlet headEl: HTMLHeadElement;\nlet inlineScriptCount = 0;\n\ntype CompilationResult = {\n async: boolean;\n type: string;\n error: boolean;\n loaded: boolean;\n content: string | null;\n executed: boolean;\n // nonce is undefined in browsers that don't support the nonce global attribute\n nonce: string | undefined;\n // todo: refine plugins/presets\n plugins: InputOptions[\"plugins\"];\n presets: InputOptions[\"presets\"];\n url: string | null;\n};\n\n/**\n * Actually transform the code.\n */\nfunction transformCode(\n transformFn: typeof transform,\n script: CompilationResult,\n) {\n let source;\n if (script.url != null) {\n source = script.url;\n } else {\n source = \"Inline Babel script\";\n inlineScriptCount++;\n if (inlineScriptCount > 1) {\n source += \" (\" + inlineScriptCount + \")\";\n }\n }\n\n return transformFn(script.content, buildBabelOptions(script, source)).code;\n}\n\n/**\n * Builds the Babel options for transforming the specified script, using some\n * sensible default presets and plugins if none were explicitly provided.\n */\nfunction buildBabelOptions(script: CompilationResult, filename: string) {\n let presets = script.presets;\n if (!presets) {\n if (script.type === \"module\") {\n presets = [\n \"react\",\n [\n \"env\",\n {\n targets: {\n esmodules: true,\n },\n modules: false,\n },\n ],\n ];\n } else {\n presets = [\"react\", \"env\"];\n }\n }\n\n return {\n filename,\n presets,\n plugins: script.plugins || [\n \"transform-class-properties\",\n \"transform-object-rest-spread\",\n \"transform-flow-strip-types\",\n ],\n sourceMaps: \"inline\" as const,\n sourceFileName: filename,\n };\n}\n\n/**\n * Appends a script element at the end of the with the content of code,\n * after transforming it.\n */\nfunction run(transformFn: typeof transform, script: CompilationResult) {\n const scriptEl = document.createElement(\"script\");\n if (script.type) {\n scriptEl.setAttribute(\"type\", script.type);\n }\n if (script.nonce) {\n scriptEl.nonce = script.nonce;\n }\n scriptEl.text = transformCode(transformFn, script);\n headEl.appendChild(scriptEl);\n}\n\n/**\n * Load script from the provided url and pass the content to the callback.\n */\nfunction load(\n url: string,\n successCallback: (content: string) => void,\n errorCallback: () => void,\n) {\n const xhr = new XMLHttpRequest();\n\n // async, however scripts will be executed in the order they are in the\n // DOM to mirror normal script loading.\n xhr.open(\"GET\", url, true);\n if (\"overrideMimeType\" in xhr) {\n xhr.overrideMimeType(\"text/plain\");\n }\n xhr.onreadystatechange = function () {\n if (xhr.readyState === 4) {\n if (xhr.status === 0 || xhr.status === 200) {\n successCallback(xhr.responseText);\n } else {\n errorCallback();\n throw new Error(\"Could not load \" + url);\n }\n }\n };\n xhr.send(null);\n}\n\n/**\n * Converts a comma-separated data attribute string into an array of values. If\n * the string is empty, returns an empty array. If the string is not defined,\n * returns null.\n */\nfunction getPluginsOrPresetsFromScript(\n script: HTMLScriptElement,\n attributeName: string,\n) {\n const rawValue = script.getAttribute(attributeName);\n if (rawValue === \"\") {\n // Empty string means to not load ANY presets or plugins\n return [];\n }\n if (!rawValue) {\n // Any other falsy value (null, undefined) means we're not overriding this\n // setting, and should use the default.\n return null;\n }\n return rawValue.split(\",\").map(item => item.trim());\n}\n\n/**\n * Loop over provided script tags and get the content, via innerHTML if an\n * inline script, or by using XHR. Transforms are applied if needed. The scripts\n * are executed in the order they are found on the page.\n */\nfunction loadScripts(\n transformFn: typeof transform,\n scripts: HTMLScriptElement[],\n) {\n const results: CompilationResult[] = [];\n const count = scripts.length;\n\n function check() {\n for (let i = 0; i < count; i++) {\n const result = results[i];\n\n if (result.loaded && !result.executed) {\n result.executed = true;\n run(transformFn, result);\n } else if (!result.loaded && !result.error && !result.async) {\n break;\n }\n }\n }\n\n for (let i = 0; i < count; i++) {\n const script = scripts[i];\n const result: CompilationResult = {\n // script.async is always true for non-JavaScript script tags\n async: script.hasAttribute(\"async\"),\n type: script.getAttribute(\"data-type\"),\n nonce: script.nonce,\n error: false,\n executed: false,\n plugins: getPluginsOrPresetsFromScript(script, \"data-plugins\"),\n presets: getPluginsOrPresetsFromScript(script, \"data-presets\"),\n loaded: false,\n url: null,\n content: null,\n };\n results.push(result);\n\n if (script.src) {\n result.url = script.src;\n\n load(\n script.src,\n content => {\n result.loaded = true;\n result.content = content;\n check();\n },\n () => {\n result.error = true;\n check();\n },\n );\n } else {\n result.url = script.getAttribute(\"data-module\") || null;\n result.loaded = true;\n result.content = script.innerHTML;\n }\n }\n\n check();\n}\n\n/**\n * Run script tags with type=\"text/jsx\".\n * @param {Array} scriptTags specify script tags to run, run all in the if not given\n */\nexport function runScripts(\n transformFn: typeof transform,\n scripts?: HTMLCollectionOf,\n) {\n headEl = document.getElementsByTagName(\"head\")[0];\n if (!scripts) {\n scripts = document.getElementsByTagName(\"script\");\n }\n\n // Array.prototype.slice cannot be used on NodeList on IE8\n const jsxScripts = [];\n for (let i = 0; i < scripts.length; i++) {\n const script = scripts.item(i);\n // Support the old type=\"text/jsx;harmony=true\"\n const type = script.type.split(\";\")[0];\n if (scriptTypes.includes(type)) {\n jsxScripts.push(script);\n }\n }\n\n if (jsxScripts.length === 0) {\n return;\n }\n\n console.warn(\n \"You are using the in-browser Babel transformer. Be sure to precompile \" +\n \"your scripts for production - https://babeljs.io/docs/setup/\",\n );\n\n loadScripts(transformFn, jsxScripts);\n}\n","import { declarePreset } from \"@babel/helper-plugin-utils\";\nimport transformTypeScript from \"@babel/plugin-transform-typescript\";\nimport syntaxJSX from \"@babel/plugin-syntax-jsx\";\nimport transformModulesCommonJS from \"@babel/plugin-transform-modules-commonjs\";\nimport normalizeOptions from \"./normalize-options.ts\";\nimport type { Options } from \"./normalize-options.ts\";\nimport pluginRewriteTSImports from \"./plugin-rewrite-ts-imports.ts\";\n\nexport default declarePreset((api, opts: Options) => {\n api.assertVersion(REQUIRED_VERSION(7));\n\n const {\n allExtensions,\n ignoreExtensions,\n allowNamespaces,\n disallowAmbiguousJSXLike,\n isTSX,\n jsxPragma,\n jsxPragmaFrag,\n onlyRemoveTypeImports,\n optimizeConstEnums,\n rewriteImportExtensions,\n } = normalizeOptions(opts);\n\n const pluginOptions = process.env.BABEL_8_BREAKING\n ? (disallowAmbiguousJSXLike: boolean) => ({\n allowNamespaces,\n disallowAmbiguousJSXLike,\n jsxPragma,\n jsxPragmaFrag,\n onlyRemoveTypeImports,\n optimizeConstEnums,\n })\n : (disallowAmbiguousJSXLike: boolean) => ({\n allowDeclareFields: opts.allowDeclareFields,\n allowNamespaces,\n disallowAmbiguousJSXLike,\n jsxPragma,\n jsxPragmaFrag,\n onlyRemoveTypeImports,\n optimizeConstEnums,\n });\n\n const getPlugins = (isTSX: boolean, disallowAmbiguousJSXLike: boolean) => {\n if (process.env.BABEL_8_BREAKING) {\n const tsPlugin = [\n transformTypeScript,\n pluginOptions(disallowAmbiguousJSXLike),\n ];\n return isTSX ? [tsPlugin, syntaxJSX] : [tsPlugin];\n } else {\n return [\n [\n transformTypeScript,\n { isTSX, ...pluginOptions(disallowAmbiguousJSXLike) },\n ],\n ];\n }\n };\n\n const disableExtensionDetect = allExtensions || ignoreExtensions;\n\n return {\n plugins: rewriteImportExtensions ? [pluginRewriteTSImports] : [],\n overrides: disableExtensionDetect\n ? [{ plugins: getPlugins(isTSX, disallowAmbiguousJSXLike) }]\n : // Only set 'test' if explicitly requested, since it requires that\n // Babel is being called with a filename.\n [\n {\n test: !process.env.BABEL_8_BREAKING\n ? /\\.ts$/\n : filename => filename == null || filename.endsWith(\".ts\"),\n plugins: getPlugins(false, false),\n },\n {\n test: !process.env.BABEL_8_BREAKING\n ? /\\.mts$/\n : filename => filename?.endsWith(\".mts\"),\n sourceType: \"module\",\n plugins: getPlugins(false, true),\n },\n {\n test: !process.env.BABEL_8_BREAKING\n ? /\\.cts$/\n : filename => filename?.endsWith(\".cts\"),\n sourceType: \"unambiguous\",\n plugins: [\n [transformModulesCommonJS, { allowTopLevelThis: true }],\n [transformTypeScript, pluginOptions(true)],\n ],\n },\n {\n test: !process.env.BABEL_8_BREAKING\n ? /\\.tsx$/\n : filename => filename?.endsWith(\".tsx\"),\n // disallowAmbiguousJSXLike is a no-op when parsing TSX, since it's\n // always disallowed.\n plugins: getPlugins(true, false),\n },\n ],\n };\n});\n","// TODO(Babel 8): This won't be needed anymore\n\n// prettier-ignore\nmodule.exports = {\n __proto__: null,\n \"transform-class-static-block\": \"proposal-class-static-block\",\n \"transform-private-property-in-object\": \"proposal-private-property-in-object\",\n \"transform-class-properties\": \"proposal-class-properties\",\n \"transform-private-methods\": \"proposal-private-methods\",\n \"transform-numeric-separator\": \"proposal-numeric-separator\",\n \"transform-logical-assignment-operators\": \"proposal-logical-assignment-operators\",\n \"transform-nullish-coalescing-operator\": \"proposal-nullish-coalescing-operator\",\n \"transform-optional-chaining\": \"proposal-optional-chaining\",\n \"transform-json-strings\": \"proposal-json-strings\",\n \"transform-optional-catch-binding\": \"proposal-optional-catch-binding\",\n \"transform-async-generator-functions\": \"proposal-async-generator-functions\",\n \"transform-object-rest-spread\": \"proposal-object-rest-spread\",\n \"transform-unicode-property-regex\": \"proposal-unicode-property-regex\",\n \"transform-export-namespace-from\": \"proposal-export-namespace-from\",\n};\n","/**\n * Entry point for @babel/standalone. This wraps Babel's API in a version that's\n * friendlier for use in web browsers. It removes the automagical detection of\n * plugins, instead explicitly registering all the available plugins and\n * presets, and requiring custom ones to be registered through `registerPlugin`\n * and `registerPreset` respectively.\n */\n\n/* global VERSION */\n/// \n\nimport {\n transformFromAstSync as babelTransformFromAstSync,\n transformSync as babelTransformSync,\n buildExternalHelpers as babelBuildExternalHelpers,\n type PluginObject,\n type PresetObject,\n} from \"@babel/core\";\nimport { all } from \"./generated/plugins.ts\";\nimport preset2015 from \"./preset-es2015.ts\";\nimport presetStage0 from \"./preset-stage-0.ts\";\nimport presetStage1 from \"./preset-stage-1.ts\";\nimport presetStage2 from \"./preset-stage-2.ts\";\nimport presetStage3 from \"./preset-stage-3.ts\";\nimport presetEnv from \"@babel/preset-env\";\nimport presetFlow from \"@babel/preset-flow\";\nimport presetReact from \"@babel/preset-react\";\nimport presetTypescript from \"@babel/preset-typescript\";\nimport type { InputOptions } from \"@babel/core\";\n\nimport { runScripts } from \"./transformScriptTags.ts\";\n\nexport * as packages from \"./packages.ts\";\n\n// We import this file from another package using a relative path because it's\n// meant to just be build-time script; it's ok because @babel/standalone is\n// bundled anyway.\n// TODO: Remove this in Babel 8\n// @ts-expect-error TS complains about importing a JS file without type declarations\nimport legacyPluginAliases from \"../../babel-compat-data/scripts/data/legacy-plugin-aliases.js\";\n// eslint-disable-next-line guard-for-in\nfor (const name in legacyPluginAliases) {\n all[legacyPluginAliases[name]] = all[name];\n}\nall[\"proposal-unicode-sets-regex\"] = all[\"transform-unicode-sets-regex\"];\n\nexport const availablePlugins: typeof all = {};\n\n// All the plugins we should bundle\n// Want to get rid of this long list of allowed plugins?\n// Wait! Please read https://github.com/babel/babel/pull/6177 first.\nregisterPlugins(all);\n\n// All the presets we should bundle\n// Want to get rid of this list of allowed presets?\n// Wait! Please read https://github.com/babel/babel/pull/6177 first.\nexport const availablePresets = {\n env: presetEnv,\n es2015: preset2015,\n es2016: () => {\n return {\n plugins: [availablePlugins[\"transform-exponentiation-operator\"]],\n };\n },\n es2017: () => {\n return {\n plugins: [availablePlugins[\"transform-async-to-generator\"]],\n };\n },\n react: presetReact,\n \"stage-0\": presetStage0,\n \"stage-1\": presetStage1,\n \"stage-2\": presetStage2,\n \"stage-3\": presetStage3,\n \"es2015-loose\": {\n presets: [[preset2015, { loose: true }]],\n },\n // ES2015 preset with es2015-modules-commonjs removed\n \"es2015-no-commonjs\": {\n presets: [[preset2015, { modules: false }]],\n },\n typescript: presetTypescript,\n flow: presetFlow,\n};\n\nconst isArray =\n Array.isArray ||\n (arg => Object.prototype.toString.call(arg) === \"[object Array]\");\n\n/**\n * Loads the given name (or [name, options] pair) from the given table object\n * holding the available presets or plugins.\n *\n * Returns undefined if the preset or plugin is not available; passes through\n * name unmodified if it (or the first element of the pair) is not a string.\n */\nfunction loadBuiltin(builtinTable: Record, name: any) {\n if (isArray(name) && typeof name[0] === \"string\") {\n if (Object.hasOwn(builtinTable, name[0])) {\n return [builtinTable[name[0]]].concat(name.slice(1));\n }\n return;\n } else if (typeof name === \"string\") {\n return builtinTable[name];\n }\n // Could be an actual preset/plugin module\n return name;\n}\n\n/**\n * Parses plugin names and presets from the specified options.\n */\nfunction processOptions(options: InputOptions) {\n // Parse preset names\n const presets = (options.presets || []).map(presetName => {\n const preset = loadBuiltin(availablePresets, presetName);\n\n if (preset) {\n // workaround for babel issue\n // at some point, babel copies the preset, losing the non-enumerable\n // buildPreset key; convert it into an enumerable key.\n if (\n isArray(preset) &&\n typeof preset[0] === \"object\" &&\n Object.hasOwn(preset[0], \"buildPreset\")\n ) {\n preset[0] = { ...preset[0], buildPreset: preset[0].buildPreset };\n }\n } else {\n throw new Error(\n `Invalid preset specified in Babel options: \"${presetName}\"`,\n );\n }\n return preset;\n });\n\n // Parse plugin names\n const plugins = (options.plugins || []).map(pluginName => {\n const plugin = loadBuiltin(availablePlugins, pluginName);\n\n if (!plugin) {\n throw new Error(\n `Invalid plugin specified in Babel options: \"${pluginName}\"`,\n );\n }\n return plugin;\n });\n\n return {\n babelrc: false,\n ...options,\n presets,\n plugins,\n };\n}\n\nexport function transform(code: string, options: InputOptions) {\n return babelTransformSync(code, processOptions(options));\n}\n\nexport function transformFromAst(\n ast: Parameters[0],\n code: string,\n options: InputOptions,\n) {\n return babelTransformFromAstSync(ast, code, processOptions(options));\n}\n\nexport const buildExternalHelpers = babelBuildExternalHelpers;\n/**\n * Registers a named plugin for use with Babel.\n */\nexport function registerPlugin(name: string, plugin: () => PluginObject): void {\n if (Object.hasOwn(availablePlugins, name)) {\n console.warn(\n `A plugin named \"${name}\" is already registered, it will be overridden`,\n );\n }\n availablePlugins[name] = plugin;\n}\n/**\n * Registers multiple plugins for use with Babel. `newPlugins` should be an object where the key\n * is the name of the plugin, and the value is the plugin itself.\n */\nexport function registerPlugins(newPlugins: {\n [x: string]: () => PluginObject;\n}): void {\n Object.keys(newPlugins).forEach(name =>\n registerPlugin(name, newPlugins[name]),\n );\n}\n\n/**\n * Registers a named preset for use with Babel.\n */\nexport function registerPreset(name: string, preset: () => PresetObject): void {\n if (Object.hasOwn(availablePresets, name)) {\n if (name === \"env\") {\n console.warn(\n \"@babel/preset-env is now included in @babel/standalone, please remove @babel/preset-env-standalone\",\n );\n } else {\n console.warn(\n `A preset named \"${name}\" is already registered, it will be overridden`,\n );\n }\n }\n // @ts-expect-error mutating available presets\n availablePresets[name] = preset;\n}\n\n/**\n * Registers multiple presets for use with Babel. `newPresets` should be an object where the key\n * is the name of the preset, and the value is the preset itself.\n */\nexport function registerPresets(newPresets: {\n [x: string]: () => PresetObject;\n}): void {\n Object.keys(newPresets).forEach(name =>\n registerPreset(name, newPresets[name]),\n );\n}\n\n// @ts-expect-error VERSION is to be replaced by rollup\nexport const version: string = VERSION;\n\nfunction onDOMContentLoaded() {\n transformScriptTags();\n}\n\n// Listen for load event if we're in a browser and then kick off finding and\n// running of scripts with \"text/babel\" type.\nif (typeof window !== \"undefined\" && window?.addEventListener) {\n window.addEventListener(\"DOMContentLoaded\", onDOMContentLoaded, false);\n}\n\n/**\n * Transform \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 ` | \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 effects.consume(code);\n // @ts-expect-error: not null.\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 * > | &<]]>\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 * > | \n * ^\n * > | \n * ^\n * > | &<]]>\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 * > | \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 * > | \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 * @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 * @type {Tokenizer}\n */\nfunction tokenizeBlankLineBefore(effects, ok, nok) {\n return start;\n\n /**\n * Before eol, expecting blank line.\n *\n * ```markdown\n * > |
\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 * @typedef {import('micromark-util-types').Code} Code\n * @typedef {import('micromark-util-types').Construct} Construct\n * @typedef {import('micromark-util-types').State} State\n * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext\n * @typedef {import('micromark-util-types').Tokenizer} Tokenizer\n */\n\nimport { factorySpace } from 'micromark-factory-space';\nimport { markdownLineEnding, markdownSpace } from 'micromark-util-character';\n/** @type {Construct} */\nconst nonLazyContinuation = {\n tokenize: tokenizeNonLazyContinuation,\n partial: true\n};\n\n/** @type {Construct} */\nexport const codeFenced = {\n name: 'codeFenced',\n tokenize: tokenizeCodeFenced,\n concrete: true\n};\n\n/**\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\nfunction tokenizeCodeFenced(effects, ok, nok) {\n const self = this;\n /** @type {Construct} */\n const closeStart = {\n tokenize: tokenizeCloseStart,\n partial: true\n };\n let initialPrefix = 0;\n let sizeOpen = 0;\n /** @type {NonNullable} */\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 * @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 * @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 * @typedef {import('micromark-util-types').Code} Code\n * @typedef {import('micromark-util-types').Construct} Construct\n * @typedef {import('micromark-util-types').State} State\n * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext\n * @typedef {import('micromark-util-types').Tokenizer} Tokenizer\n */\n\nimport { 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 * @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 * @typedef {import('micromark-util-types').Construct} Construct\n * @typedef {import('micromark-util-types').State} State\n * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext\n * @typedef {import('micromark-util-types').Tokenizer} Tokenizer\n */\n\nimport { asciiPunctuation } from 'micromark-util-character';\n/** @type {Construct} */\nexport const characterEscape = {\n name: 'characterEscape',\n tokenize: tokenizeCharacterEscape\n};\n\n/**\n * @this {TokenizeContext}\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 * @typedef {import('micromark-util-types').Construct} Construct\n * @typedef {import('micromark-util-types').State} State\n * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext\n * @typedef {import('micromark-util-types').Tokenizer} Tokenizer\n */\n\nimport { factorySpace } from 'micromark-factory-space';\nimport { markdownLineEnding } from 'micromark-util-character';\n/** @type {Construct} */\nexport const lineEnding = {\n name: 'lineEnding',\n tokenize: tokenizeLineEnding\n};\n\n/**\n * @this {TokenizeContext}\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 * @typedef {import('micromark-util-types').Construct} Construct\n * @typedef {import('micromark-util-types').Event} Event\n * @typedef {import('micromark-util-types').Resolver} Resolver\n * @typedef {import('micromark-util-types').State} State\n * @typedef {import('micromark-util-types').Token} Token\n * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext\n * @typedef {import('micromark-util-types').Tokenizer} Tokenizer\n */\n\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 tokenize: tokenizeLabelEnd,\n resolveTo: resolveToLabelEnd,\n resolveAll: resolveAllLabelEnd\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 while (++index < events.length) {\n const token = events[index][1];\n if (token.type === \"labelImage\" || token.type === \"labelLink\" || token.type === \"labelEnd\") {\n // Remove the marker.\n events.splice(index + 1, token.type === \"labelImage\" ? 4 : 2);\n token.type = \"data\";\n index++;\n }\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} */\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: Object.assign({}, events[open][1].start),\n end: Object.assign({}, events[events.length - 1][1].end)\n };\n const label = {\n type: \"label\",\n start: Object.assign({}, events[open][1].start),\n end: Object.assign({}, events[close][1].end)\n };\n const text = {\n type: \"labelText\",\n start: Object.assign({}, events[open + offset + 2][1].end),\n end: Object.assign({}, events[close - 2][1].start)\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 * @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 * @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 * @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 * @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 * @typedef {import('micromark-util-types').Construct} Construct\n * @typedef {import('micromark-util-types').State} State\n * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext\n * @typedef {import('micromark-util-types').Tokenizer} Tokenizer\n */\n\nimport { labelEnd } from './label-end.js';\n\n/** @type {Construct} */\nexport const labelStartImage = {\n name: 'labelStartImage',\n tokenize: tokenizeLabelStartImage,\n resolveAll: labelEnd.resolveAll\n};\n\n/**\n * @this {TokenizeContext}\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 * ![^a](b)\n *\n * ![^a][b]\n *\n * [b]: c\n * ```\n *\n * ```html\n *

!^a

\n *

!^a

\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 * @typedef {import('micromark-util-types').Code} Code\n */\n\nimport {\n markdownLineEndingOrSpace,\n unicodePunctuation,\n unicodeWhitespace\n} 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 (\n code === null ||\n markdownLineEndingOrSpace(code) ||\n unicodeWhitespace(code)\n ) {\n return 1\n }\n if (unicodePunctuation(code)) {\n return 2\n }\n}\n","/**\n * @typedef {import('micromark-util-types').Code} Code\n * @typedef {import('micromark-util-types').Construct} Construct\n * @typedef {import('micromark-util-types').Event} Event\n * @typedef {import('micromark-util-types').Point} Point\n * @typedef {import('micromark-util-types').Resolver} Resolver\n * @typedef {import('micromark-util-types').State} State\n * @typedef {import('micromark-util-types').Token} Token\n * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext\n * @typedef {import('micromark-util-types').Tokenizer} Tokenizer\n */\n\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 tokenize: tokenizeAttention,\n resolveAll: resolveAllAttention\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} */\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 = Object.assign({}, events[open][1].end);\n const end = Object.assign({}, events[index][1].start);\n movePoint(start, -use);\n movePoint(end, use);\n openingSequence = {\n type: use > 1 ? \"strongSequence\" : \"emphasisSequence\",\n start,\n end: Object.assign({}, events[open][1].end)\n };\n closingSequence = {\n type: use > 1 ? \"strongSequence\" : \"emphasisSequence\",\n start: Object.assign({}, events[index][1].start),\n end\n };\n text = {\n type: use > 1 ? \"strongText\" : \"emphasisText\",\n start: Object.assign({}, events[open][1].end),\n end: Object.assign({}, events[index][1].start)\n };\n group = {\n type: use > 1 ? \"strong\" : \"emphasis\",\n start: Object.assign({}, openingSequence.start),\n end: Object.assign({}, closingSequence.end)\n };\n events[open][1].end = Object.assign({}, openingSequence.start);\n events[index][1].start = Object.assign({}, closingSequence.end);\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 * @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} */\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 * @param {number} offset\n * @returns {undefined}\n */\nfunction movePoint(point, offset) {\n point.column += offset;\n point.offset += offset;\n point._bufferIndex += offset;\n}","/**\n * @typedef {import('micromark-util-types').Construct} Construct\n * @typedef {import('micromark-util-types').State} State\n * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext\n * @typedef {import('micromark-util-types').Tokenizer} Tokenizer\n */\n\nimport { asciiAlpha, asciiAlphanumeric, 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 * @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 * > | ab\n * ^\n * > | ab\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 * > | ab\n * ^\n * > | ab\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 * > | ab\n * ^\n * > | ab\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 * > | ab\n * ^\n * > | ab\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 * > | ab\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 * > | ab\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 * > | ab\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 * > | ab\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 * > | ab\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 * @typedef {import('micromark-util-types').Code} Code\n * @typedef {import('micromark-util-types').Construct} Construct\n * @typedef {import('micromark-util-types').State} State\n * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext\n * @typedef {import('micromark-util-types').Tokenizer} Tokenizer\n */\n\nimport { factorySpace } from 'micromark-factory-space';\nimport { asciiAlpha, asciiAlphanumeric, markdownLineEnding, markdownLineEndingOrSpace, markdownSpace } from 'micromark-util-character';\n/** @type {Construct} */\nexport const htmlText = {\n name: 'htmlText',\n tokenize: tokenizeHtmlText\n};\n\n/**\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\nfunction tokenizeHtmlText(effects, ok, nok) {\n const self = this;\n /** @type {NonNullable | 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 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 c\n * ^\n * > | a c\n * ^\n * > | a 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 ` | a c\n * ^\n * > | a c\n * ^\n * > | a &<]]> 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 ` | a 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 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 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 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 ` | a &<]]> 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 &<]]> 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 &<]]> 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 &<]]> 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 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 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 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 ` | a 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 ` | a 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 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 ` | a 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 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 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 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 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 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 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 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 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 \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 \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 \n * ^\n * ```\n *\n * @type {State}\n */\n function lineEndingAfterPrefix(code) {\n effects.enter(\"htmlTextData\");\n return returnState(code);\n }\n}","/**\n * @typedef {import('micromark-util-types').Construct} Construct\n * @typedef {import('micromark-util-types').State} State\n * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext\n * @typedef {import('micromark-util-types').Tokenizer} Tokenizer\n */\n\nimport { labelEnd } from './label-end.js';\n\n/** @type {Construct} */\nexport const labelStartLink = {\n name: 'labelStartLink',\n tokenize: tokenizeLabelStartLink,\n resolveAll: labelEnd.resolveAll\n};\n\n/**\n * @this {TokenizeContext}\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 * @typedef {import('micromark-util-types').Construct} Construct\n * @typedef {import('micromark-util-types').State} State\n * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext\n * @typedef {import('micromark-util-types').Tokenizer} Tokenizer\n */\n\nimport { markdownLineEnding } from 'micromark-util-character';\n/** @type {Construct} */\nexport const hardBreakEscape = {\n name: 'hardBreakEscape',\n tokenize: tokenizeHardBreakEscape\n};\n\n/**\n * @this {TokenizeContext}\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 * @typedef {import('micromark-util-types').Construct} Construct\n * @typedef {import('micromark-util-types').Previous} Previous\n * @typedef {import('micromark-util-types').Resolver} Resolver\n * @typedef {import('micromark-util-types').State} State\n * @typedef {import('micromark-util-types').Token} Token\n * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext\n * @typedef {import('micromark-util-types').Tokenizer} Tokenizer\n */\n\nimport { markdownLineEnding } from 'micromark-util-character';\n/** @type {Construct} */\nexport const codeText = {\n name: 'codeText',\n tokenize: tokenizeCodeText,\n resolve: resolveCodeText,\n previous\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 * @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 * @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 * @typedef {import('micromark-util-types').Extension} Extension\n */\n\nimport {\n attention,\n autolink,\n blockQuote,\n characterEscape,\n characterReference,\n codeFenced,\n codeIndented,\n codeText,\n definition,\n hardBreakEscape,\n headingAtx,\n htmlFlow,\n htmlText,\n labelEnd,\n labelStartImage,\n labelStartLink,\n lineEnding,\n list,\n setextUnderline,\n thematicBreak\n} 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","/**\n * @typedef {import('micromark-util-types').Chunk} Chunk\n * @typedef {import('micromark-util-types').Code} Code\n * @typedef {import('micromark-util-types').Encoding} Encoding\n * @typedef {import('micromark-util-types').Value} Value\n */\n\n/**\n * @callback Preprocessor\n * @param {Value} value\n * @param {Encoding | null | undefined} [encoding]\n * @param {boolean | null | undefined} [end=false]\n * @returns {Array}\n */\n\nconst search = /[\\0\\t\\n\\r]/g\n\n/**\n * @returns {Preprocessor}\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} */\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 =\n buffer +\n (typeof value === 'string'\n ? value.toString()\n : 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 =\n 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 chunks.push(65533)\n column++\n break\n }\n case 9: {\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 chunks.push(-4)\n column = 1\n break\n }\n default: {\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","/**\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}","import {decodeNamedCharacterReference} from 'decode-named-character-reference'\nimport {decodeNumericCharacterReference} from 'micromark-util-decode-numeric-character-reference'\nconst characterEscapeOrReference =\n /\\\\([!-/:-@[-`{-~])|&(#(?:\\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 * @param {string} $1\n * @param {string} $2\n * @returns {string}\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","/**\n * @typedef {import('mdast').Break} Break\n * @typedef {import('mdast').Blockquote} Blockquote\n * @typedef {import('mdast').Code} Code\n * @typedef {import('mdast').Definition} Definition\n * @typedef {import('mdast').Emphasis} Emphasis\n * @typedef {import('mdast').Heading} Heading\n * @typedef {import('mdast').Html} Html\n * @typedef {import('mdast').Image} Image\n * @typedef {import('mdast').InlineCode} InlineCode\n * @typedef {import('mdast').Link} Link\n * @typedef {import('mdast').List} List\n * @typedef {import('mdast').ListItem} ListItem\n * @typedef {import('mdast').Nodes} Nodes\n * @typedef {import('mdast').Paragraph} Paragraph\n * @typedef {import('mdast').Parent} Parent\n * @typedef {import('mdast').PhrasingContent} PhrasingContent\n * @typedef {import('mdast').ReferenceType} ReferenceType\n * @typedef {import('mdast').Root} Root\n * @typedef {import('mdast').Strong} Strong\n * @typedef {import('mdast').Text} Text\n * @typedef {import('mdast').ThematicBreak} ThematicBreak\n *\n * @typedef {import('micromark-util-types').Encoding} Encoding\n * @typedef {import('micromark-util-types').Event} Event\n * @typedef {import('micromark-util-types').ParseOptions} ParseOptions\n * @typedef {import('micromark-util-types').Token} Token\n * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext\n * @typedef {import('micromark-util-types').Value} Value\n *\n * @typedef {import('unist').Point} Point\n *\n * @typedef {import('../index.js').CompileData} CompileData\n */\n\n/**\n * @typedef {Omit & {type: 'fragment', children: Array}} Fragment\n */\n\n/**\n * @callback Transform\n * Extra transform, to change the AST afterwards.\n * @param {Root} tree\n * Tree to transform.\n * @returns {Root | null | undefined | void}\n * New tree or nothing (in which case the current tree is used).\n *\n * @callback Handle\n * Handle a token.\n * @param {CompileContext} this\n * Context.\n * @param {Token} token\n * Current token.\n * @returns {undefined | void}\n * Nothing.\n *\n * @typedef {Record} Handles\n * Token types mapping to handles\n *\n * @callback OnEnterError\n * Handle the case where the `right` token is open, but it is closed (by the\n * `left` token) or because we reached the end of the document.\n * @param {Omit} this\n * Context.\n * @param {Token | undefined} left\n * Left token.\n * @param {Token} right\n * Right token.\n * @returns {undefined}\n * Nothing.\n *\n * @callback OnExitError\n * Handle the case where the `right` token is open but it is closed by\n * exiting the `left` token.\n * @param {Omit} this\n * Context.\n * @param {Token} left\n * Left token.\n * @param {Token} right\n * Right token.\n * @returns {undefined}\n * Nothing.\n *\n * @typedef {[Token, OnEnterError | undefined]} TokenTuple\n * Open token on the stack, with an optional error handler for when\n * that token isn’t closed properly.\n */\n\n/**\n * @typedef Config\n * Configuration.\n *\n * We have our defaults, but extensions will add more.\n * @property {Array} canContainEols\n * Token types where line endings are used.\n * @property {Handles} enter\n * Opening handles.\n * @property {Handles} exit\n * Closing handles.\n * @property {Array} transforms\n * Tree transforms.\n *\n * @typedef {Partial} Extension\n * Change how markdown tokens from micromark are turned into mdast.\n *\n * @typedef CompileContext\n * mdast compiler context.\n * @property {Array} stack\n * Stack of nodes.\n * @property {Array} tokenStack\n * Stack of tokens.\n * @property {(this: CompileContext) => undefined} buffer\n * Capture some of the output data.\n * @property {(this: CompileContext) => string} resume\n * Stop capturing and access the output data.\n * @property {(this: CompileContext, node: Nodes, token: Token, onError?: OnEnterError) => undefined} enter\n * Enter a node.\n * @property {(this: CompileContext, token: Token, onError?: OnExitError) => undefined} exit\n * Exit a node.\n * @property {TokenizeContext['sliceSerialize']} sliceSerialize\n * Get the string value of a token.\n * @property {Config} config\n * Configuration.\n * @property {CompileData} data\n * Info passed around; key/value store.\n *\n * @typedef FromMarkdownOptions\n * Configuration for how to build mdast.\n * @property {Array> | null | undefined} [mdastExtensions]\n * Extensions for this utility to change how tokens are turned into a tree.\n *\n * @typedef {ParseOptions & FromMarkdownOptions} Options\n * Configuration.\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 (typeof encoding !== 'string') {\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} 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} */\n const context = {\n stack: [tree],\n tokenStack: [],\n config,\n enter,\n exit,\n buffer,\n resume,\n data\n };\n /** @type {Array} */\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} 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 * @this {CompileContext}\n * @returns {undefined}\n */\n function buffer() {\n this.stack.push({\n type: 'fragment',\n children: []\n });\n }\n\n /**\n * @this {CompileContext}\n * Context.\n * @param {Nodes} node\n * Node to enter.\n * @param {Token} token\n * Corresponding token.\n * @param {OnEnterError | undefined} [errorHandler]\n * Handle the case where this token is open, but it is closed by something else.\n * @returns {undefined}\n * Nothing.\n */\n function enter(node, token, errorHandler) {\n const parent = this.stack[this.stack.length - 1];\n /** @type {Array} */\n const siblings = parent.children;\n siblings.push(node);\n this.stack.push(node);\n this.tokenStack.push([token, errorHandler]);\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 * @this {CompileContext}\n * Context.\n * @param {Token} token\n * Corresponding token.\n * @param {OnExitError | undefined} [onExitError]\n * Handle the case where another token is open.\n * @returns {undefined}\n * Nothing.\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 * @this {CompileContext}\n * @returns {string}\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} */\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} */\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 | 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('micromark-util-types').Event} Event\n */\n\nimport {subtokenize} from 'micromark-util-subtokenize'\n\n/**\n * @param {Array} events\n * @returns {Array}\n */\nexport function postprocess(events) {\n while (!subtokenize(events)) {\n // Empty\n }\n return events\n}\n","/**\n * @typedef {import('micromark-util-types').Create} Create\n * @typedef {import('micromark-util-types').FullNormalizedExtension} FullNormalizedExtension\n * @typedef {import('micromark-util-types').InitialConstruct} InitialConstruct\n * @typedef {import('micromark-util-types').ParseContext} ParseContext\n * @typedef {import('micromark-util-types').ParseOptions} ParseOptions\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 {createTokenizer} from './create-tokenizer.js'\nimport * as defaultConstructs from './constructs.js'\n\n/**\n * @param {ParseOptions | null | undefined} [options]\n * @returns {ParseContext}\n */\nexport function parse(options) {\n const settings = options || {}\n const constructs =\n /** @type {FullNormalizedExtension} */\n combineExtensions([defaultConstructs, ...(settings.extensions || [])])\n\n /** @type {ParseContext} */\n const parser = {\n defined: [],\n lazy: {},\n constructs,\n content: create(content),\n document: create(document),\n flow: create(flow),\n string: create(string),\n text: create(text)\n }\n return parser\n\n /**\n * @param {InitialConstruct} initial\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","/**\n * @typedef {import('mdast').Root} Root\n * @typedef {import('mdast-util-from-markdown').Options} FromMarkdownOptions\n * @typedef {import('unified').Parser} Parser\n * @typedef {import('unified').Processor} Processor\n */\n\n/**\n * @typedef {Omit} Options\n */\n\nimport {fromMarkdown} from 'mdast-util-from-markdown'\n\n/**\n * Aadd support for parsing from markdown.\n *\n * @param {Readonly | 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","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) ||\n (questionMark > -1 && colon > questionMark) ||\n (numberSign > -1 && colon > numberSign) ||\n // It is a protocol, it should be allowed.\n protocol.test(value.slice(0, colon))\n ) {\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} */\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 (\n code === 37 &&\n asciiAlphanumeric(value.charCodeAt(index + 1)) &&\n asciiAlphanumeric(value.charCodeAt(index + 2))\n ) {\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","/**\n * @typedef {import('hast').Element} Element\n * @typedef {import('hast').ElementContent} ElementContent\n *\n * @typedef {import('./state.js').State} State\n */\n\n/**\n * @callback FootnoteBackContentTemplate\n * Generate content for the backreference dynamically.\n *\n * For the following markdown:\n *\n * ```markdown\n * Alpha[^micromark], bravo[^micromark], and charlie[^remark].\n *\n * [^remark]: things about remark\n * [^micromark]: things about micromark\n * ```\n *\n * This function will be called with:\n *\n * * `0` and `0` for the backreference from `things about micromark` to\n * `alpha`, as it is the first used definition, and the first call to it\n * * `0` and `1` for the backreference from `things about micromark` to\n * `bravo`, as it is the first used definition, and the second call to it\n * * `1` and `0` for the backreference from `things about remark` to\n * `charlie`, as it is the second used definition\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 {Array | ElementContent | string}\n * Content for the backreference when linking back from definitions to their\n * reference.\n *\n * @callback FootnoteBackLabelTemplate\n * Generate a back label dynamically.\n *\n * For the following markdown:\n *\n * ```markdown\n * Alpha[^micromark], bravo[^micromark], and charlie[^remark].\n *\n * [^remark]: things about remark\n * [^micromark]: things about micromark\n * ```\n *\n * This function will be called with:\n *\n * * `0` and `0` for the backreference from `things about micromark` to\n * `alpha`, as it is the first used definition, and the first call to it\n * * `0` and `1` for the backreference from `things about micromark` to\n * `bravo`, as it is the first used definition, and the second call to it\n * * `1` and `0` for the backreference from `things about remark` to\n * `charlie`, as it is the second used definition\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 * Back label to use when linking back from definitions to their reference.\n */\n\nimport structuredClone from '@ungap/structured-clone'\nimport {normalizeUri} from 'micromark-util-sanitize-uri'\n\n/**\n * Generate the default content that GitHub uses on backreferences.\n *\n * @param {number} _\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 {Array}\n * Content.\n */\nexport function defaultFootnoteBackContent(_, rereferenceIndex) {\n /** @type {Array} */\n const result = [{type: 'text', value: '↩'}]\n\n if (rereferenceIndex > 1) {\n result.push({\n type: 'element',\n tagName: 'sup',\n properties: {},\n children: [{type: 'text', value: String(rereferenceIndex)}]\n })\n }\n\n return result\n}\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 * Label.\n */\nexport function defaultFootnoteBackLabel(referenceIndex, rereferenceIndex) {\n return (\n 'Back to reference ' +\n (referenceIndex + 1) +\n (rereferenceIndex > 1 ? '-' + rereferenceIndex : '')\n )\n}\n\n/**\n * Generate a hast footer for called footnote definitions.\n *\n * @param {State} state\n * Info passed around.\n * @returns {Element | undefined}\n * `section` element or `undefined`.\n */\n// eslint-disable-next-line complexity\nexport function footer(state) {\n const clobberPrefix =\n typeof state.options.clobberPrefix === 'string'\n ? state.options.clobberPrefix\n : 'user-content-'\n const footnoteBackContent =\n state.options.footnoteBackContent || defaultFootnoteBackContent\n const footnoteBackLabel =\n state.options.footnoteBackLabel || defaultFootnoteBackLabel\n const footnoteLabel = state.options.footnoteLabel || 'Footnotes'\n const footnoteLabelTagName = state.options.footnoteLabelTagName || 'h2'\n const footnoteLabelProperties = state.options.footnoteLabelProperties || {\n className: ['sr-only']\n }\n /** @type {Array} */\n const listItems = []\n let referenceIndex = -1\n\n while (++referenceIndex < state.footnoteOrder.length) {\n const definition = state.footnoteById.get(\n state.footnoteOrder[referenceIndex]\n )\n\n if (!definition) {\n continue\n }\n\n const content = state.all(definition)\n const id = String(definition.identifier).toUpperCase()\n const safeId = normalizeUri(id.toLowerCase())\n let rereferenceIndex = 0\n /** @type {Array} */\n const backReferences = []\n const counts = state.footnoteCounts.get(id)\n\n // eslint-disable-next-line no-unmodified-loop-condition\n while (counts !== undefined && ++rereferenceIndex <= counts) {\n if (backReferences.length > 0) {\n backReferences.push({type: 'text', value: ' '})\n }\n\n let children =\n typeof footnoteBackContent === 'string'\n ? footnoteBackContent\n : footnoteBackContent(referenceIndex, rereferenceIndex)\n\n if (typeof children === 'string') {\n children = {type: 'text', value: children}\n }\n\n backReferences.push({\n type: 'element',\n tagName: 'a',\n properties: {\n href:\n '#' +\n clobberPrefix +\n 'fnref-' +\n safeId +\n (rereferenceIndex > 1 ? '-' + rereferenceIndex : ''),\n dataFootnoteBackref: '',\n ariaLabel:\n typeof footnoteBackLabel === 'string'\n ? footnoteBackLabel\n : footnoteBackLabel(referenceIndex, rereferenceIndex),\n className: ['data-footnote-backref']\n },\n children: Array.isArray(children) ? children : [children]\n })\n }\n\n const tail = content[content.length - 1]\n\n if (tail && tail.type === 'element' && tail.tagName === 'p') {\n const tailTail = tail.children[tail.children.length - 1]\n if (tailTail && tailTail.type === 'text') {\n tailTail.value += ' '\n } else {\n tail.children.push({type: 'text', value: ' '})\n }\n\n tail.children.push(...backReferences)\n } else {\n content.push(...backReferences)\n }\n\n /** @type {Element} */\n const listItem = {\n type: 'element',\n tagName: 'li',\n properties: {id: clobberPrefix + 'fn-' + safeId},\n children: state.wrap(content, true)\n }\n\n state.patch(definition, listItem)\n\n listItems.push(listItem)\n }\n\n if (listItems.length === 0) {\n return\n }\n\n return {\n type: 'element',\n tagName: 'section',\n properties: {dataFootnotes: true, className: ['footnotes']},\n children: [\n {\n type: 'element',\n tagName: footnoteLabelTagName,\n properties: {\n ...structuredClone(footnoteLabelProperties),\n id: 'footnote-label'\n },\n children: [{type: 'text', value: footnoteLabel}]\n },\n {type: 'text', value: '\\n'},\n {\n type: 'element',\n tagName: 'ol',\n properties: {},\n children: state.wrap(listItems, true)\n },\n {type: 'text', value: '\\n'}\n ]\n }\n}\n","/**\n * @typedef {import('hast').ElementContent} ElementContent\n *\n * @typedef {import('mdast').Nodes} Nodes\n * @typedef {import('mdast').Reference} Reference\n *\n * @typedef {import('./state.js').State} State\n */\n\n// Make VS Code show references to the above types.\n''\n\n/**\n * Return the content of a reference without definition as plain text.\n *\n * @param {State} state\n * Info passed around.\n * @param {Extract} node\n * Reference node (image, link).\n * @returns {Array}\n * hast content.\n */\nexport function revert(state, node) {\n const subtype = node.referenceType\n let suffix = ']'\n\n if (subtype === 'collapsed') {\n suffix += '[]'\n } else if (subtype === 'full') {\n suffix += '[' + (node.label || node.identifier) + ']'\n }\n\n if (node.type === 'imageReference') {\n return [{type: 'text', value: '![' + node.alt + suffix}]\n }\n\n const contents = state.all(node)\n const head = contents[0]\n\n if (head && head.type === 'text') {\n head.value = '[' + head.value\n } else {\n contents.unshift({type: 'text', value: '['})\n }\n\n const tail = contents[contents.length - 1]\n\n if (tail && tail.type === 'text') {\n tail.value += suffix\n } else {\n contents.push({type: 'text', value: suffix})\n }\n\n return contents\n}\n","/**\n * @typedef {import('hast').Element} Element\n * @typedef {import('hast').ElementContent} ElementContent\n * @typedef {import('hast').Properties} Properties\n * @typedef {import('mdast').ListItem} ListItem\n * @typedef {import('mdast').Parents} Parents\n * @typedef {import('../state.js').State} State\n */\n\n// Make VS Code show references to the above types.\n''\n\n/**\n * Turn an mdast `listItem` node into hast.\n *\n * @param {State} state\n * Info passed around.\n * @param {ListItem} node\n * mdast node.\n * @param {Parents | undefined} parent\n * Parent of `node`.\n * @returns {Element}\n * hast node.\n */\nexport function listItem(state, node, parent) {\n const results = state.all(node)\n const loose = parent ? listLoose(parent) : listItemLoose(node)\n /** @type {Properties} */\n const properties = {}\n /** @type {Array} */\n const children = []\n\n if (typeof node.checked === 'boolean') {\n const head = results[0]\n /** @type {Element} */\n let paragraph\n\n if (head && head.type === 'element' && head.tagName === 'p') {\n paragraph = head\n } else {\n paragraph = {type: 'element', tagName: 'p', properties: {}, children: []}\n results.unshift(paragraph)\n }\n\n if (paragraph.children.length > 0) {\n paragraph.children.unshift({type: 'text', value: ' '})\n }\n\n paragraph.children.unshift({\n type: 'element',\n tagName: 'input',\n properties: {type: 'checkbox', checked: node.checked, disabled: true},\n children: []\n })\n\n // According to github-markdown-css, this class hides bullet.\n // See: .\n properties.className = ['task-list-item']\n }\n\n let index = -1\n\n while (++index < results.length) {\n const child = results[index]\n\n // Add eols before nodes, except if this is a loose, first paragraph.\n if (\n loose ||\n index !== 0 ||\n child.type !== 'element' ||\n child.tagName !== 'p'\n ) {\n children.push({type: 'text', value: '\\n'})\n }\n\n if (child.type === 'element' && child.tagName === 'p' && !loose) {\n children.push(...child.children)\n } else {\n children.push(child)\n }\n }\n\n const tail = results[results.length - 1]\n\n // Add a final eol.\n if (tail && (loose || tail.type !== 'element' || tail.tagName !== 'p')) {\n children.push({type: 'text', value: '\\n'})\n }\n\n /** @type {Element} */\n const result = {type: 'element', tagName: 'li', properties, children}\n state.patch(node, result)\n return state.applyData(node, result)\n}\n\n/**\n * @param {Parents} node\n * @return {Boolean}\n */\nfunction listLoose(node) {\n let loose = false\n if (node.type === 'list') {\n loose = node.spread || false\n const children = node.children\n let index = -1\n\n while (!loose && ++index < children.length) {\n loose = listItemLoose(children[index])\n }\n }\n\n return loose\n}\n\n/**\n * @param {ListItem} node\n * @return {Boolean}\n */\nfunction listItemLoose(node) {\n const spread = node.spread\n\n return spread === null || spread === undefined\n ? node.children.length > 1\n : spread\n}\n","const tab = 9 /* `\\t` */\nconst space = 32 /* ` ` */\n\n/**\n * Remove initial and final spaces and tabs at the line breaks in `value`.\n * Does not trim initial and final spaces and tabs of the value itself.\n *\n * @param {string} value\n * Value to trim.\n * @returns {string}\n * Trimmed value.\n */\nexport function trimLines(value) {\n const source = String(value)\n const search = /\\r?\\n|\\r/g\n let match = search.exec(source)\n let last = 0\n /** @type {Array} */\n const lines = []\n\n while (match) {\n lines.push(\n trimLine(source.slice(last, match.index), last > 0, true),\n match[0]\n )\n\n last = match.index + match[0].length\n match = search.exec(source)\n }\n\n lines.push(trimLine(source.slice(last), last > 0, false))\n\n return lines.join('')\n}\n\n/**\n * @param {string} value\n * Line to trim.\n * @param {boolean} start\n * Whether to trim the start of the line.\n * @param {boolean} end\n * Whether to trim the end of the line.\n * @returns {string}\n * Trimmed line.\n */\nfunction trimLine(value, start, end) {\n let startIndex = 0\n let endIndex = value.length\n\n if (start) {\n let code = value.codePointAt(startIndex)\n\n while (code === tab || code === space) {\n startIndex++\n code = value.codePointAt(startIndex)\n }\n }\n\n if (end) {\n let code = value.codePointAt(endIndex - 1)\n\n while (code === tab || code === space) {\n endIndex--\n code = value.codePointAt(endIndex - 1)\n }\n }\n\n return endIndex > startIndex ? value.slice(startIndex, endIndex) : ''\n}\n","import {blockquote} from './blockquote.js'\nimport {hardBreak} from './break.js'\nimport {code} from './code.js'\nimport {strikethrough} from './delete.js'\nimport {emphasis} from './emphasis.js'\nimport {footnoteReference} from './footnote-reference.js'\nimport {heading} from './heading.js'\nimport {html} from './html.js'\nimport {imageReference} from './image-reference.js'\nimport {image} from './image.js'\nimport {inlineCode} from './inline-code.js'\nimport {linkReference} from './link-reference.js'\nimport {link} from './link.js'\nimport {listItem} from './list-item.js'\nimport {list} from './list.js'\nimport {paragraph} from './paragraph.js'\nimport {root} from './root.js'\nimport {strong} from './strong.js'\nimport {table} from './table.js'\nimport {tableRow} from './table-row.js'\nimport {tableCell} from './table-cell.js'\nimport {text} from './text.js'\nimport {thematicBreak} from './thematic-break.js'\n\n/**\n * Default handlers for nodes.\n *\n * @satisfies {import('../state.js').Handlers}\n */\nexport const handlers = {\n blockquote,\n break: hardBreak,\n code,\n delete: strikethrough,\n emphasis,\n footnoteReference,\n heading,\n html,\n imageReference,\n image,\n inlineCode,\n linkReference,\n link,\n listItem,\n list,\n paragraph,\n // @ts-expect-error: root is different, but hard to type.\n root,\n strong,\n table,\n tableCell,\n tableRow,\n text,\n thematicBreak,\n toml: ignore,\n yaml: ignore,\n definition: ignore,\n footnoteDefinition: ignore\n}\n\n// Return nothing for nodes that are ignored.\nfunction ignore() {\n return undefined\n}\n","/**\n * @typedef {import('hast').Element} Element\n * @typedef {import('mdast').Blockquote} Blockquote\n * @typedef {import('../state.js').State} State\n */\n\n// Make VS Code show references to the above types.\n''\n\n/**\n * Turn an mdast `blockquote` node into hast.\n *\n * @param {State} state\n * Info passed around.\n * @param {Blockquote} node\n * mdast node.\n * @returns {Element}\n * hast node.\n */\nexport function blockquote(state, node) {\n /** @type {Element} */\n const result = {\n type: 'element',\n tagName: 'blockquote',\n properties: {},\n children: state.wrap(state.all(node), true)\n }\n state.patch(node, result)\n return state.applyData(node, result)\n}\n","/**\n * @typedef {import('hast').Element} Element\n * @typedef {import('hast').Text} Text\n * @typedef {import('mdast').Break} Break\n * @typedef {import('../state.js').State} State\n */\n\n// Make VS Code show references to the above types.\n''\n\n/**\n * Turn an mdast `break` node into hast.\n *\n * @param {State} state\n * Info passed around.\n * @param {Break} node\n * mdast node.\n * @returns {Array}\n * hast element content.\n */\nexport function hardBreak(state, node) {\n /** @type {Element} */\n const result = {type: 'element', tagName: 'br', properties: {}, children: []}\n state.patch(node, result)\n return [state.applyData(node, result), {type: 'text', value: '\\n'}]\n}\n","/**\n * @typedef {import('hast').Element} Element\n * @typedef {import('hast').Properties} Properties\n * @typedef {import('mdast').Code} Code\n * @typedef {import('../state.js').State} State\n */\n\n// Make VS Code show references to the above types.\n''\n\n/**\n * Turn an mdast `code` node into hast.\n *\n * @param {State} state\n * Info passed around.\n * @param {Code} node\n * mdast node.\n * @returns {Element}\n * hast node.\n */\nexport function code(state, node) {\n const value = node.value ? node.value + '\\n' : ''\n /** @type {Properties} */\n const properties = {}\n\n if (node.lang) {\n properties.className = ['language-' + node.lang]\n }\n\n // Create ``.\n /** @type {Element} */\n let result = {\n type: 'element',\n tagName: 'code',\n properties,\n children: [{type: 'text', value}]\n }\n\n if (node.meta) {\n result.data = {meta: node.meta}\n }\n\n state.patch(node, result)\n result = state.applyData(node, result)\n\n // Create `
`.\n  result = {type: 'element', tagName: 'pre', properties: {}, children: [result]}\n  state.patch(node, result)\n  return result\n}\n","/**\n * @typedef {import('hast').Element} Element\n * @typedef {import('mdast').Delete} Delete\n * @typedef {import('../state.js').State} State\n */\n\n// Make VS Code show references to the above types.\n''\n\n/**\n * Turn an mdast `delete` node into hast.\n *\n * @param {State} state\n *   Info passed around.\n * @param {Delete} node\n *   mdast node.\n * @returns {Element}\n *   hast node.\n */\nexport function strikethrough(state, node) {\n  /** @type {Element} */\n  const result = {\n    type: 'element',\n    tagName: 'del',\n    properties: {},\n    children: state.all(node)\n  }\n  state.patch(node, result)\n  return state.applyData(node, result)\n}\n","/**\n * @typedef {import('hast').Element} Element\n * @typedef {import('mdast').Emphasis} Emphasis\n * @typedef {import('../state.js').State} State\n */\n\n// Make VS Code show references to the above types.\n''\n\n/**\n * Turn an mdast `emphasis` node into hast.\n *\n * @param {State} state\n *   Info passed around.\n * @param {Emphasis} node\n *   mdast node.\n * @returns {Element}\n *   hast node.\n */\nexport function emphasis(state, node) {\n  /** @type {Element} */\n  const result = {\n    type: 'element',\n    tagName: 'em',\n    properties: {},\n    children: state.all(node)\n  }\n  state.patch(node, result)\n  return state.applyData(node, result)\n}\n","/**\n * @typedef {import('hast').Element} Element\n * @typedef {import('mdast').FootnoteReference} FootnoteReference\n * @typedef {import('../state.js').State} State\n */\n\nimport {normalizeUri} from 'micromark-util-sanitize-uri'\n\n/**\n * Turn an mdast `footnoteReference` node into hast.\n *\n * @param {State} state\n *   Info passed around.\n * @param {FootnoteReference} node\n *   mdast node.\n * @returns {Element}\n *   hast node.\n */\nexport function footnoteReference(state, node) {\n  const clobberPrefix =\n    typeof state.options.clobberPrefix === 'string'\n      ? state.options.clobberPrefix\n      : 'user-content-'\n  const id = String(node.identifier).toUpperCase()\n  const safeId = normalizeUri(id.toLowerCase())\n  const index = state.footnoteOrder.indexOf(id)\n  /** @type {number} */\n  let counter\n\n  let reuseCounter = state.footnoteCounts.get(id)\n\n  if (reuseCounter === undefined) {\n    reuseCounter = 0\n    state.footnoteOrder.push(id)\n    counter = state.footnoteOrder.length\n  } else {\n    counter = index + 1\n  }\n\n  reuseCounter += 1\n  state.footnoteCounts.set(id, reuseCounter)\n\n  /** @type {Element} */\n  const link = {\n    type: 'element',\n    tagName: 'a',\n    properties: {\n      href: '#' + clobberPrefix + 'fn-' + safeId,\n      id:\n        clobberPrefix +\n        'fnref-' +\n        safeId +\n        (reuseCounter > 1 ? '-' + reuseCounter : ''),\n      dataFootnoteRef: true,\n      ariaDescribedBy: ['footnote-label']\n    },\n    children: [{type: 'text', value: String(counter)}]\n  }\n  state.patch(node, link)\n\n  /** @type {Element} */\n  const sup = {\n    type: 'element',\n    tagName: 'sup',\n    properties: {},\n    children: [link]\n  }\n  state.patch(node, sup)\n  return state.applyData(node, sup)\n}\n","/**\n * @typedef {import('hast').Element} Element\n * @typedef {import('mdast').Heading} Heading\n * @typedef {import('../state.js').State} State\n */\n\n// Make VS Code show references to the above types.\n''\n\n/**\n * Turn an mdast `heading` node into hast.\n *\n * @param {State} state\n *   Info passed around.\n * @param {Heading} node\n *   mdast node.\n * @returns {Element}\n *   hast node.\n */\nexport function heading(state, node) {\n  /** @type {Element} */\n  const result = {\n    type: 'element',\n    tagName: 'h' + node.depth,\n    properties: {},\n    children: state.all(node)\n  }\n  state.patch(node, result)\n  return state.applyData(node, result)\n}\n","/**\n * @typedef {import('hast').Element} Element\n * @typedef {import('mdast').Html} Html\n * @typedef {import('../state.js').State} State\n * @typedef {import('../../index.js').Raw} Raw\n */\n\n// Make VS Code show references to the above types.\n''\n\n/**\n * Turn an mdast `html` node into hast (`raw` node in dangerous mode, otherwise\n * nothing).\n *\n * @param {State} state\n *   Info passed around.\n * @param {Html} node\n *   mdast node.\n * @returns {Element | Raw | undefined}\n *   hast node.\n */\nexport function html(state, node) {\n  if (state.options.allowDangerousHtml) {\n    /** @type {Raw} */\n    const result = {type: 'raw', value: node.value}\n    state.patch(node, result)\n    return state.applyData(node, result)\n  }\n\n  return undefined\n}\n","/**\n * @typedef {import('hast').Element} Element\n * @typedef {import('hast').ElementContent} ElementContent\n * @typedef {import('hast').Properties} Properties\n * @typedef {import('mdast').ImageReference} ImageReference\n * @typedef {import('../state.js').State} State\n */\n\nimport {normalizeUri} from 'micromark-util-sanitize-uri'\nimport {revert} from '../revert.js'\n\n/**\n * Turn an mdast `imageReference` node into hast.\n *\n * @param {State} state\n *   Info passed around.\n * @param {ImageReference} node\n *   mdast node.\n * @returns {Array | ElementContent}\n *   hast node.\n */\nexport function imageReference(state, node) {\n  const id = String(node.identifier).toUpperCase()\n  const definition = state.definitionById.get(id)\n\n  if (!definition) {\n    return revert(state, node)\n  }\n\n  /** @type {Properties} */\n  const properties = {src: normalizeUri(definition.url || ''), alt: node.alt}\n\n  if (definition.title !== null && definition.title !== undefined) {\n    properties.title = definition.title\n  }\n\n  /** @type {Element} */\n  const result = {type: 'element', tagName: 'img', properties, children: []}\n  state.patch(node, result)\n  return state.applyData(node, result)\n}\n","/**\n * @typedef {import('hast').Element} Element\n * @typedef {import('hast').Properties} Properties\n * @typedef {import('mdast').Image} Image\n * @typedef {import('../state.js').State} State\n */\n\nimport {normalizeUri} from 'micromark-util-sanitize-uri'\n\n/**\n * Turn an mdast `image` node into hast.\n *\n * @param {State} state\n *   Info passed around.\n * @param {Image} node\n *   mdast node.\n * @returns {Element}\n *   hast node.\n */\nexport function image(state, node) {\n  /** @type {Properties} */\n  const properties = {src: normalizeUri(node.url)}\n\n  if (node.alt !== null && node.alt !== undefined) {\n    properties.alt = node.alt\n  }\n\n  if (node.title !== null && node.title !== undefined) {\n    properties.title = node.title\n  }\n\n  /** @type {Element} */\n  const result = {type: 'element', tagName: 'img', properties, children: []}\n  state.patch(node, result)\n  return state.applyData(node, result)\n}\n","/**\n * @typedef {import('hast').Element} Element\n * @typedef {import('hast').Text} Text\n * @typedef {import('mdast').InlineCode} InlineCode\n * @typedef {import('../state.js').State} State\n */\n\n// Make VS Code show references to the above types.\n''\n\n/**\n * Turn an mdast `inlineCode` node into hast.\n *\n * @param {State} state\n *   Info passed around.\n * @param {InlineCode} node\n *   mdast node.\n * @returns {Element}\n *   hast node.\n */\nexport function inlineCode(state, node) {\n  /** @type {Text} */\n  const text = {type: 'text', value: node.value.replace(/\\r?\\n|\\r/g, ' ')}\n  state.patch(node, text)\n\n  /** @type {Element} */\n  const result = {\n    type: 'element',\n    tagName: 'code',\n    properties: {},\n    children: [text]\n  }\n  state.patch(node, result)\n  return state.applyData(node, result)\n}\n","/**\n * @typedef {import('hast').Element} Element\n * @typedef {import('hast').ElementContent} ElementContent\n * @typedef {import('hast').Properties} Properties\n * @typedef {import('mdast').LinkReference} LinkReference\n * @typedef {import('../state.js').State} State\n */\n\nimport {normalizeUri} from 'micromark-util-sanitize-uri'\nimport {revert} from '../revert.js'\n\n/**\n * Turn an mdast `linkReference` node into hast.\n *\n * @param {State} state\n *   Info passed around.\n * @param {LinkReference} node\n *   mdast node.\n * @returns {Array | ElementContent}\n *   hast node.\n */\nexport function linkReference(state, node) {\n  const id = String(node.identifier).toUpperCase()\n  const definition = state.definitionById.get(id)\n\n  if (!definition) {\n    return revert(state, node)\n  }\n\n  /** @type {Properties} */\n  const properties = {href: normalizeUri(definition.url || '')}\n\n  if (definition.title !== null && definition.title !== undefined) {\n    properties.title = definition.title\n  }\n\n  /** @type {Element} */\n  const result = {\n    type: 'element',\n    tagName: 'a',\n    properties,\n    children: state.all(node)\n  }\n  state.patch(node, result)\n  return state.applyData(node, result)\n}\n","/**\n * @typedef {import('hast').Element} Element\n * @typedef {import('hast').Properties} Properties\n * @typedef {import('mdast').Link} Link\n * @typedef {import('../state.js').State} State\n */\n\nimport {normalizeUri} from 'micromark-util-sanitize-uri'\n\n/**\n * Turn an mdast `link` node into hast.\n *\n * @param {State} state\n *   Info passed around.\n * @param {Link} node\n *   mdast node.\n * @returns {Element}\n *   hast node.\n */\nexport function link(state, node) {\n  /** @type {Properties} */\n  const properties = {href: normalizeUri(node.url)}\n\n  if (node.title !== null && node.title !== undefined) {\n    properties.title = node.title\n  }\n\n  /** @type {Element} */\n  const result = {\n    type: 'element',\n    tagName: 'a',\n    properties,\n    children: state.all(node)\n  }\n  state.patch(node, result)\n  return state.applyData(node, result)\n}\n","/**\n * @typedef {import('hast').Element} Element\n * @typedef {import('hast').Properties} Properties\n * @typedef {import('mdast').List} List\n * @typedef {import('../state.js').State} State\n */\n\n// Make VS Code show references to the above types.\n''\n\n/**\n * Turn an mdast `list` node into hast.\n *\n * @param {State} state\n *   Info passed around.\n * @param {List} node\n *   mdast node.\n * @returns {Element}\n *   hast node.\n */\nexport function list(state, node) {\n  /** @type {Properties} */\n  const properties = {}\n  const results = state.all(node)\n  let index = -1\n\n  if (typeof node.start === 'number' && node.start !== 1) {\n    properties.start = node.start\n  }\n\n  // Like GitHub, add a class for custom styling.\n  while (++index < results.length) {\n    const child = results[index]\n\n    if (\n      child.type === 'element' &&\n      child.tagName === 'li' &&\n      child.properties &&\n      Array.isArray(child.properties.className) &&\n      child.properties.className.includes('task-list-item')\n    ) {\n      properties.className = ['contains-task-list']\n      break\n    }\n  }\n\n  /** @type {Element} */\n  const result = {\n    type: 'element',\n    tagName: node.ordered ? 'ol' : 'ul',\n    properties,\n    children: state.wrap(results, true)\n  }\n  state.patch(node, result)\n  return state.applyData(node, result)\n}\n","/**\n * @typedef {import('hast').Element} Element\n * @typedef {import('mdast').Paragraph} Paragraph\n * @typedef {import('../state.js').State} State\n */\n\n// Make VS Code show references to the above types.\n''\n\n/**\n * Turn an mdast `paragraph` node into hast.\n *\n * @param {State} state\n *   Info passed around.\n * @param {Paragraph} node\n *   mdast node.\n * @returns {Element}\n *   hast node.\n */\nexport function paragraph(state, node) {\n  /** @type {Element} */\n  const result = {\n    type: 'element',\n    tagName: 'p',\n    properties: {},\n    children: state.all(node)\n  }\n  state.patch(node, result)\n  return state.applyData(node, result)\n}\n","/**\n * @typedef {import('hast').Parents} HastParents\n * @typedef {import('hast').Root} HastRoot\n * @typedef {import('mdast').Root} MdastRoot\n * @typedef {import('../state.js').State} State\n */\n\n// Make VS Code show references to the above types.\n''\n\n/**\n * Turn an mdast `root` node into hast.\n *\n * @param {State} state\n *   Info passed around.\n * @param {MdastRoot} node\n *   mdast node.\n * @returns {HastParents}\n *   hast node.\n */\nexport function root(state, node) {\n  /** @type {HastRoot} */\n  const result = {type: 'root', children: state.wrap(state.all(node))}\n  state.patch(node, result)\n  return state.applyData(node, result)\n}\n","/**\n * @typedef {import('hast').Element} Element\n * @typedef {import('mdast').Strong} Strong\n * @typedef {import('../state.js').State} State\n */\n\n// Make VS Code show references to the above types.\n''\n\n/**\n * Turn an mdast `strong` node into hast.\n *\n * @param {State} state\n *   Info passed around.\n * @param {Strong} node\n *   mdast node.\n * @returns {Element}\n *   hast node.\n */\nexport function strong(state, node) {\n  /** @type {Element} */\n  const result = {\n    type: 'element',\n    tagName: 'strong',\n    properties: {},\n    children: state.all(node)\n  }\n  state.patch(node, result)\n  return state.applyData(node, result)\n}\n","/**\n * @typedef {import('hast').Element} Element\n * @typedef {import('mdast').Table} Table\n * @typedef {import('../state.js').State} State\n */\n\nimport {pointEnd, pointStart} from 'unist-util-position'\n\n/**\n * Turn an mdast `table` node into hast.\n *\n * @param {State} state\n *   Info passed around.\n * @param {Table} node\n *   mdast node.\n * @returns {Element}\n *   hast node.\n */\nexport function table(state, node) {\n  const rows = state.all(node)\n  const firstRow = rows.shift()\n  /** @type {Array} */\n  const tableContent = []\n\n  if (firstRow) {\n    /** @type {Element} */\n    const head = {\n      type: 'element',\n      tagName: 'thead',\n      properties: {},\n      children: state.wrap([firstRow], true)\n    }\n    state.patch(node.children[0], head)\n    tableContent.push(head)\n  }\n\n  if (rows.length > 0) {\n    /** @type {Element} */\n    const body = {\n      type: 'element',\n      tagName: 'tbody',\n      properties: {},\n      children: state.wrap(rows, true)\n    }\n\n    const start = pointStart(node.children[1])\n    const end = pointEnd(node.children[node.children.length - 1])\n    if (start && end) body.position = {start, end}\n    tableContent.push(body)\n  }\n\n  /** @type {Element} */\n  const result = {\n    type: 'element',\n    tagName: 'table',\n    properties: {},\n    children: state.wrap(tableContent, true)\n  }\n  state.patch(node, result)\n  return state.applyData(node, result)\n}\n","/**\n * @typedef {import('hast').Element} Element\n * @typedef {import('mdast').TableCell} TableCell\n * @typedef {import('../state.js').State} State\n */\n\n// Make VS Code show references to the above types.\n''\n\n/**\n * Turn an mdast `tableCell` node into hast.\n *\n * @param {State} state\n *   Info passed around.\n * @param {TableCell} node\n *   mdast node.\n * @returns {Element}\n *   hast node.\n */\nexport function tableCell(state, node) {\n  // Note: this function is normally not called: see `table-row` for how rows\n  // and their cells are compiled.\n  /** @type {Element} */\n  const result = {\n    type: 'element',\n    tagName: 'td', // Assume body cell.\n    properties: {},\n    children: state.all(node)\n  }\n  state.patch(node, result)\n  return state.applyData(node, result)\n}\n","/**\n * @typedef {import('hast').Element} Element\n * @typedef {import('hast').ElementContent} ElementContent\n * @typedef {import('hast').Properties} Properties\n * @typedef {import('mdast').Parents} Parents\n * @typedef {import('mdast').TableRow} TableRow\n * @typedef {import('../state.js').State} State\n */\n\n// Make VS Code show references to the above types.\n''\n\n/**\n * Turn an mdast `tableRow` node into hast.\n *\n * @param {State} state\n *   Info passed around.\n * @param {TableRow} node\n *   mdast node.\n * @param {Parents | undefined} parent\n *   Parent of `node`.\n * @returns {Element}\n *   hast node.\n */\nexport function tableRow(state, node, parent) {\n  const siblings = parent ? parent.children : undefined\n  // Generate a body row when without parent.\n  const rowIndex = siblings ? siblings.indexOf(node) : 1\n  const tagName = rowIndex === 0 ? 'th' : 'td'\n  // To do: option to use `style`?\n  const align = parent && parent.type === 'table' ? parent.align : undefined\n  const length = align ? align.length : node.children.length\n  let cellIndex = -1\n  /** @type {Array} */\n  const cells = []\n\n  while (++cellIndex < length) {\n    // Note: can also be undefined.\n    const cell = node.children[cellIndex]\n    /** @type {Properties} */\n    const properties = {}\n    const alignValue = align ? align[cellIndex] : undefined\n\n    if (alignValue) {\n      properties.align = alignValue\n    }\n\n    /** @type {Element} */\n    let result = {type: 'element', tagName, properties, children: []}\n\n    if (cell) {\n      result.children = state.all(cell)\n      state.patch(cell, result)\n      result = state.applyData(cell, result)\n    }\n\n    cells.push(result)\n  }\n\n  /** @type {Element} */\n  const result = {\n    type: 'element',\n    tagName: 'tr',\n    properties: {},\n    children: state.wrap(cells, true)\n  }\n  state.patch(node, result)\n  return state.applyData(node, result)\n}\n","/**\n * @typedef {import('hast').Element} HastElement\n * @typedef {import('hast').Text} HastText\n * @typedef {import('mdast').Text} MdastText\n * @typedef {import('../state.js').State} State\n */\n\nimport {trimLines} from 'trim-lines'\n\n/**\n * Turn an mdast `text` node into hast.\n *\n * @param {State} state\n *   Info passed around.\n * @param {MdastText} node\n *   mdast node.\n * @returns {HastElement | HastText}\n *   hast node.\n */\nexport function text(state, node) {\n  /** @type {HastText} */\n  const result = {type: 'text', value: trimLines(String(node.value))}\n  state.patch(node, result)\n  return state.applyData(node, result)\n}\n","/**\n * @typedef {import('hast').Element} Element\n * @typedef {import('mdast').ThematicBreak} ThematicBreak\n * @typedef {import('../state.js').State} State\n */\n\n// Make VS Code show references to the above types.\n''\n\n/**\n * Turn an mdast `thematicBreak` node into hast.\n *\n * @param {State} state\n *   Info passed around.\n * @param {ThematicBreak} node\n *   mdast node.\n * @returns {Element}\n *   hast node.\n */\nexport function thematicBreak(state, node) {\n  /** @type {Element} */\n  const result = {\n    type: 'element',\n    tagName: 'hr',\n    properties: {},\n    children: []\n  }\n  state.patch(node, result)\n  return state.applyData(node, result)\n}\n","/**\n * @typedef {import('hast').Element} HastElement\n * @typedef {import('hast').ElementContent} HastElementContent\n * @typedef {import('hast').Nodes} HastNodes\n * @typedef {import('hast').Properties} HastProperties\n * @typedef {import('hast').RootContent} HastRootContent\n * @typedef {import('hast').Text} HastText\n *\n * @typedef {import('mdast').Definition} MdastDefinition\n * @typedef {import('mdast').FootnoteDefinition} MdastFootnoteDefinition\n * @typedef {import('mdast').Nodes} MdastNodes\n * @typedef {import('mdast').Parents} MdastParents\n *\n * @typedef {import('vfile').VFile} VFile\n *\n * @typedef {import('./footer.js').FootnoteBackContentTemplate} FootnoteBackContentTemplate\n * @typedef {import('./footer.js').FootnoteBackLabelTemplate} FootnoteBackLabelTemplate\n */\n\n/**\n * @callback Handler\n *   Handle a node.\n * @param {State} state\n *   Info passed around.\n * @param {any} node\n *   mdast node to handle.\n * @param {MdastParents | undefined} parent\n *   Parent of `node`.\n * @returns {Array | HastElementContent | undefined}\n *   hast node.\n *\n * @typedef {Partial>} Handlers\n *   Handle nodes.\n *\n * @typedef Options\n *   Configuration (optional).\n * @property {boolean | null | undefined} [allowDangerousHtml=false]\n *   Whether to persist raw HTML in markdown in the hast tree (default:\n *   `false`).\n * @property {string | null | undefined} [clobberPrefix='user-content-']\n *   Prefix to use before the `id` property on footnotes to prevent them from\n *   *clobbering* (default: `'user-content-'`).\n *\n *   Pass `''` for trusted markdown and when you are careful with\n *   polyfilling.\n *   You could pass a different prefix.\n *\n *   DOM clobbering is this:\n *\n *   ```html\n *   

\n * \n * ```\n *\n * The above example shows that elements are made available by browsers, by\n * their ID, on the `window` object.\n * This is a security risk because you might be expecting some other variable\n * at that place.\n * It can also break polyfills.\n * Using a prefix solves these problems.\n * @property {VFile | null | undefined} [file]\n * Corresponding virtual file representing the input document (optional).\n * @property {FootnoteBackContentTemplate | string | null | undefined} [footnoteBackContent]\n * Content of the backreference back to references (default: `defaultFootnoteBackContent`).\n *\n * The default value is:\n *\n * ```js\n * function defaultFootnoteBackContent(_, rereferenceIndex) {\n * const result = [{type: 'text', value: '↩'}]\n *\n * if (rereferenceIndex > 1) {\n * result.push({\n * type: 'element',\n * tagName: 'sup',\n * properties: {},\n * children: [{type: 'text', value: String(rereferenceIndex)}]\n * })\n * }\n *\n * return result\n * }\n * ```\n *\n * This content is used in the `a` element of each backreference (the `↩`\n * links).\n * @property {FootnoteBackLabelTemplate | string | null | undefined} [footnoteBackLabel]\n * Label to describe the backreference back to references (default:\n * `defaultFootnoteBackLabel`).\n *\n * The default value is:\n *\n * ```js\n * function defaultFootnoteBackLabel(referenceIndex, rereferenceIndex) {\n * return (\n * 'Back to reference ' +\n * (referenceIndex + 1) +\n * (rereferenceIndex > 1 ? '-' + rereferenceIndex : '')\n * )\n * }\n * ```\n *\n * Change it when the markdown is not in English.\n *\n * This label is used in the `ariaLabel` property on each backreference\n * (the `↩` links).\n * It affects users of assistive technology.\n * @property {string | null | undefined} [footnoteLabel='Footnotes']\n * Textual label to use for the footnotes section (default: `'Footnotes'`).\n *\n * Change it when the markdown is not in English.\n *\n * This label is typically hidden visually (assuming a `sr-only` CSS class\n * is defined that does that) and so affects screen readers only.\n * If you do have such a class, but want to show this section to everyone,\n * pass different properties with the `footnoteLabelProperties` option.\n * @property {HastProperties | null | undefined} [footnoteLabelProperties={className: ['sr-only']}]\n * Properties to use on the footnote label (default: `{className:\n * ['sr-only']}`).\n *\n * Change it to show the label and add other properties.\n *\n * This label is typically hidden visually (assuming an `sr-only` CSS class\n * is defined that does that) and so affects screen readers only.\n * If you do have such a class, but want to show this section to everyone,\n * pass an empty string.\n * You can also add different properties.\n *\n * > **Note**: `id: 'footnote-label'` is always added, because footnote\n * > calls use it with `aria-describedby` to provide an accessible label.\n * @property {string | null | undefined} [footnoteLabelTagName='h2']\n * HTML tag name to use for the footnote label element (default: `'h2'`).\n *\n * Change it to match your document structure.\n *\n * This label is typically hidden visually (assuming a `sr-only` CSS class\n * is defined that does that) and so affects screen readers only.\n * If you do have such a class, but want to show this section to everyone,\n * pass different properties with the `footnoteLabelProperties` option.\n * @property {Handlers | null | undefined} [handlers]\n * Extra handlers for nodes (optional).\n * @property {Array | null | undefined} [passThrough]\n * List of custom mdast node types to pass through (keep) in hast (note that\n * the node itself is passed, but eventual children are transformed)\n * (optional).\n * @property {Handler | null | undefined} [unknownHandler]\n * Handler for all unknown nodes (optional).\n *\n * @typedef State\n * Info passed around.\n * @property {(node: MdastNodes) => Array} all\n * Transform the children of an mdast parent to hast.\n * @property {(from: MdastNodes, to: Type) => HastElement | Type} applyData\n * Honor the `data` of `from`, and generate an element instead of `node`.\n * @property {Map} definitionById\n * Definitions by their identifier.\n * @property {Map} footnoteById\n * Footnote definitions by their identifier.\n * @property {Map} footnoteCounts\n * Counts for how often the same footnote was called.\n * @property {Array} footnoteOrder\n * Identifiers of order when footnote calls first appear in tree order.\n * @property {Handlers} handlers\n * Applied handlers.\n * @property {(node: MdastNodes, parent: MdastParents | undefined) => Array | HastElementContent | undefined} one\n * Transform an mdast node to hast.\n * @property {Options} options\n * Configuration.\n * @property {(from: MdastNodes, node: HastNodes) => undefined} patch\n * Copy a node’s positional info.\n * @property {(nodes: Array, loose?: boolean | undefined) => Array} wrap\n * Wrap `nodes` with line endings between each node, adds initial/final line endings when `loose`.\n */\n\nimport structuredClone from '@ungap/structured-clone'\nimport {visit} from 'unist-util-visit'\nimport {position} from 'unist-util-position'\nimport {handlers as defaultHandlers} from './handlers/index.js'\n\nconst own = {}.hasOwnProperty\n\n/** @type {Options} */\nconst emptyOptions = {}\n\n/**\n * Create `state` from an mdast tree.\n *\n * @param {MdastNodes} tree\n * mdast node to transform.\n * @param {Options | null | undefined} [options]\n * Configuration (optional).\n * @returns {State}\n * `state` function.\n */\nexport function createState(tree, options) {\n const settings = options || emptyOptions\n /** @type {Map} */\n const definitionById = new Map()\n /** @type {Map} */\n const footnoteById = new Map()\n /** @type {Map} */\n const footnoteCounts = new Map()\n /** @type {Handlers} */\n // @ts-expect-error: the root handler returns a root.\n // Hard to type.\n const handlers = {...defaultHandlers, ...settings.handlers}\n\n /** @type {State} */\n const state = {\n all,\n applyData,\n definitionById,\n footnoteById,\n footnoteCounts,\n footnoteOrder: [],\n handlers,\n one,\n options: settings,\n patch,\n wrap\n }\n\n visit(tree, function (node) {\n if (node.type === 'definition' || node.type === 'footnoteDefinition') {\n const map = node.type === 'definition' ? definitionById : footnoteById\n const id = String(node.identifier).toUpperCase()\n\n // Mimick CM behavior of link definitions.\n // See: .\n if (!map.has(id)) {\n // @ts-expect-error: node type matches map.\n map.set(id, node)\n }\n }\n })\n\n return state\n\n /**\n * Transform an mdast node into a hast node.\n *\n * @param {MdastNodes} node\n * mdast node.\n * @param {MdastParents | undefined} [parent]\n * Parent of `node`.\n * @returns {Array | HastElementContent | undefined}\n * Resulting hast node.\n */\n function one(node, parent) {\n const type = node.type\n const handle = state.handlers[type]\n\n if (own.call(state.handlers, type) && handle) {\n return handle(state, node, parent)\n }\n\n if (state.options.passThrough && state.options.passThrough.includes(type)) {\n if ('children' in node) {\n const {children, ...shallow} = node\n const result = structuredClone(shallow)\n // @ts-expect-error: TS doesn’t understand…\n result.children = state.all(node)\n // @ts-expect-error: TS doesn’t understand…\n return result\n }\n\n // @ts-expect-error: it’s custom.\n return structuredClone(node)\n }\n\n const unknown = state.options.unknownHandler || defaultUnknownHandler\n\n return unknown(state, node, parent)\n }\n\n /**\n * Transform the children of an mdast node into hast nodes.\n *\n * @param {MdastNodes} parent\n * mdast node to compile\n * @returns {Array}\n * Resulting hast nodes.\n */\n function all(parent) {\n /** @type {Array} */\n const values = []\n\n if ('children' in parent) {\n const nodes = parent.children\n let index = -1\n while (++index < nodes.length) {\n const result = state.one(nodes[index], parent)\n\n // To do: see if we van clean this? Can we merge texts?\n if (result) {\n if (index && nodes[index - 1].type === 'break') {\n if (!Array.isArray(result) && result.type === 'text') {\n result.value = trimMarkdownSpaceStart(result.value)\n }\n\n if (!Array.isArray(result) && result.type === 'element') {\n const head = result.children[0]\n\n if (head && head.type === 'text') {\n head.value = trimMarkdownSpaceStart(head.value)\n }\n }\n }\n\n if (Array.isArray(result)) {\n values.push(...result)\n } else {\n values.push(result)\n }\n }\n }\n }\n\n return values\n }\n}\n\n/**\n * Copy a node’s positional info.\n *\n * @param {MdastNodes} from\n * mdast node to copy from.\n * @param {HastNodes} to\n * hast node to copy into.\n * @returns {undefined}\n * Nothing.\n */\nfunction patch(from, to) {\n if (from.position) to.position = position(from)\n}\n\n/**\n * Honor the `data` of `from` and maybe generate an element instead of `to`.\n *\n * @template {HastNodes} Type\n * Node type.\n * @param {MdastNodes} from\n * mdast node to use data from.\n * @param {Type} to\n * hast node to change.\n * @returns {HastElement | Type}\n * Nothing.\n */\nfunction applyData(from, to) {\n /** @type {HastElement | Type} */\n let result = to\n\n // Handle `data.hName`, `data.hProperties, `data.hChildren`.\n if (from && from.data) {\n const hName = from.data.hName\n const hChildren = from.data.hChildren\n const hProperties = from.data.hProperties\n\n if (typeof hName === 'string') {\n // Transforming the node resulted in an element with a different name\n // than wanted:\n if (result.type === 'element') {\n result.tagName = hName\n }\n // Transforming the node resulted in a non-element, which happens for\n // raw, text, and root nodes (unless custom handlers are passed).\n // The intent of `hName` is to create an element, but likely also to keep\n // the content around (otherwise: pass `hChildren`).\n else {\n /** @type {Array} */\n // @ts-expect-error: assume no doctypes in `root`.\n const children = 'children' in result ? result.children : [result]\n result = {type: 'element', tagName: hName, properties: {}, children}\n }\n }\n\n if (result.type === 'element' && hProperties) {\n Object.assign(result.properties, structuredClone(hProperties))\n }\n\n if (\n 'children' in result &&\n result.children &&\n hChildren !== null &&\n hChildren !== undefined\n ) {\n result.children = hChildren\n }\n }\n\n return result\n}\n\n/**\n * Transform an unknown node.\n *\n * @param {State} state\n * Info passed around.\n * @param {MdastNodes} node\n * Unknown mdast node.\n * @returns {HastElement | HastText}\n * Resulting hast node.\n */\nfunction defaultUnknownHandler(state, node) {\n const data = node.data || {}\n /** @type {HastElement | HastText} */\n const result =\n 'value' in node &&\n !(own.call(data, 'hProperties') || own.call(data, 'hChildren'))\n ? {type: 'text', value: node.value}\n : {\n type: 'element',\n tagName: 'div',\n properties: {},\n children: state.all(node)\n }\n\n state.patch(node, result)\n return state.applyData(node, result)\n}\n\n/**\n * Wrap `nodes` with line endings between each node.\n *\n * @template {HastRootContent} Type\n * Node type.\n * @param {Array} nodes\n * List of nodes to wrap.\n * @param {boolean | undefined} [loose=false]\n * Whether to add line endings at start and end (default: `false`).\n * @returns {Array}\n * Wrapped nodes.\n */\nexport function wrap(nodes, loose) {\n /** @type {Array} */\n const result = []\n let index = -1\n\n if (loose) {\n result.push({type: 'text', value: '\\n'})\n }\n\n while (++index < nodes.length) {\n if (index) result.push({type: 'text', value: '\\n'})\n result.push(nodes[index])\n }\n\n if (loose && nodes.length > 0) {\n result.push({type: 'text', value: '\\n'})\n }\n\n return result\n}\n\n/**\n * Trim spaces and tabs at the start of `value`.\n *\n * @param {string} value\n * Value to trim.\n * @returns {string}\n * Result.\n */\nfunction trimMarkdownSpaceStart(value) {\n let index = 0\n let code = value.charCodeAt(index)\n\n while (code === 9 || code === 32) {\n index++\n code = value.charCodeAt(index)\n }\n\n return value.slice(index)\n}\n","/**\n * @typedef {import('hast').Nodes} HastNodes\n * @typedef {import('mdast').Nodes} MdastNodes\n * @typedef {import('./state.js').Options} Options\n */\n\nimport {ok as assert} from 'devlop'\nimport {footer} from './footer.js'\nimport {createState} from './state.js'\n\n/**\n * Transform mdast to hast.\n *\n * ##### Notes\n *\n * ###### HTML\n *\n * Raw HTML is available in mdast as `html` nodes and can be embedded in hast\n * as semistandard `raw` nodes.\n * Most utilities ignore `raw` nodes but two notable ones don’t:\n *\n * * `hast-util-to-html` also has an option `allowDangerousHtml` which will\n * output the raw HTML.\n * This is typically discouraged as noted by the option name but is useful\n * if you completely trust authors\n * * `hast-util-raw` can handle the raw embedded HTML strings by parsing them\n * into standard hast nodes (`element`, `text`, etc).\n * This is a heavy task as it needs a full HTML parser, but it is the only\n * way to support untrusted content\n *\n * ###### Footnotes\n *\n * Many options supported here relate to footnotes.\n * Footnotes are not specified by CommonMark, which we follow by default.\n * They are supported by GitHub, so footnotes can be enabled in markdown with\n * `mdast-util-gfm`.\n *\n * The options `footnoteBackLabel` and `footnoteLabel` define natural language\n * that explains footnotes, which is hidden for sighted users but shown to\n * assistive technology.\n * When your page is not in English, you must define translated values.\n *\n * Back references use ARIA attributes, but the section label itself uses a\n * heading that is hidden with an `sr-only` class.\n * To show it to sighted users, define different attributes in\n * `footnoteLabelProperties`.\n *\n * ###### Clobbering\n *\n * Footnotes introduces a problem, as it links footnote calls to footnote\n * definitions on the page through `id` attributes generated from user content,\n * which results in DOM clobbering.\n *\n * DOM clobbering is this:\n *\n * ```html\n *

\n * \n * ```\n *\n * Elements by their ID are made available by browsers on the `window` object,\n * which is a security risk.\n * Using a prefix solves this problem.\n *\n * More information on how to handle clobbering and the prefix is explained in\n * Example: headings (DOM clobbering) in `rehype-sanitize`.\n *\n * ###### Unknown nodes\n *\n * Unknown nodes are nodes with a type that isn’t in `handlers` or `passThrough`.\n * The default behavior for unknown nodes is:\n *\n * * when the node has a `value` (and doesn’t have `data.hName`,\n * `data.hProperties`, or `data.hChildren`, see later), create a hast `text`\n * node\n * * otherwise, create a `
` element (which could be changed with\n * `data.hName`), with its children mapped from mdast to hast as well\n *\n * This behavior can be changed by passing an `unknownHandler`.\n *\n * @param {MdastNodes} tree\n * mdast tree.\n * @param {Options | null | undefined} [options]\n * Configuration (optional).\n * @returns {HastNodes}\n * hast tree.\n */\nexport function toHast(tree, options) {\n const state = createState(tree, options)\n const node = state.one(tree, undefined)\n const foot = footer(state)\n /** @type {HastNodes} */\n const result = Array.isArray(node)\n ? {type: 'root', children: node}\n : node || {type: 'root', children: []}\n\n if (foot) {\n // If there’s a footer, there were definitions, meaning block\n // content.\n // So `result` is a parent node.\n assert('children' in result)\n result.children.push({type: 'text', value: '\\n'}, foot)\n }\n\n return result\n}\n","// Include `data` fields in mdast and `raw` nodes in hast.\n/// \n\n/**\n * @typedef {import('hast').Root} HastRoot\n * @typedef {import('mdast').Root} MdastRoot\n * @typedef {import('mdast-util-to-hast').Options} ToHastOptions\n * @typedef {import('unified').Processor} Processor\n * @typedef {import('vfile').VFile} VFile\n */\n\n/**\n * @typedef {Omit} Options\n *\n * @callback TransformBridge\n * Bridge-mode.\n *\n * Runs the destination with the new hast tree.\n * Discards result.\n * @param {MdastRoot} tree\n * Tree.\n * @param {VFile} file\n * File.\n * @returns {Promise}\n * Nothing.\n *\n * @callback TransformMutate\n * Mutate-mode.\n *\n * Further transformers run on the hast tree.\n * @param {MdastRoot} tree\n * Tree.\n * @param {VFile} file\n * File.\n * @returns {HastRoot}\n * Tree (hast).\n */\n\nimport {toHast} from 'mdast-util-to-hast'\n\n/**\n * Turn markdown into HTML.\n *\n * ##### Notes\n *\n * ###### Signature\n *\n * * if a processor is given, runs the (rehype) plugins used on it with a\n * hast tree, then discards the result (*bridge mode*)\n * * otherwise, returns a hast tree, the plugins used after `remarkRehype`\n * are rehype plugins (*mutate mode*)\n *\n * > 👉 **Note**: It’s highly unlikely that you want to pass a `processor`.\n *\n * ###### HTML\n *\n * Raw HTML is available in mdast as `html` nodes and can be embedded in hast\n * as semistandard `raw` nodes.\n * Most plugins ignore `raw` nodes but two notable ones don’t:\n *\n * * `rehype-stringify` also has an option `allowDangerousHtml` which will\n * output the raw HTML.\n * This is typically discouraged as noted by the option name but is useful if\n * you completely trust authors\n * * `rehype-raw` can handle the raw embedded HTML strings by parsing them\n * into standard hast nodes (`element`, `text`, etc).\n * This is a heavy task as it needs a full HTML parser, but it is the only way\n * to support untrusted content\n *\n * ###### Footnotes\n *\n * Many options supported here relate to footnotes.\n * Footnotes are not specified by CommonMark, which we follow by default.\n * They are supported by GitHub, so footnotes can be enabled in markdown with\n * `remark-gfm`.\n *\n * The options `footnoteBackLabel` and `footnoteLabel` define natural language\n * that explains footnotes, which is hidden for sighted users but shown to\n * assistive technology.\n * When your page is not in English, you must define translated values.\n *\n * Back references use ARIA attributes, but the section label itself uses a\n * heading that is hidden with an `sr-only` class.\n * To show it to sighted users, define different attributes in\n * `footnoteLabelProperties`.\n *\n * ###### Clobbering\n *\n * Footnotes introduces a problem, as it links footnote calls to footnote\n * definitions on the page through `id` attributes generated from user content,\n * which results in DOM clobbering.\n *\n * DOM clobbering is this:\n *\n * ```html\n *

\n * \n * ```\n *\n * Elements by their ID are made available by browsers on the `window` object,\n * which is a security risk.\n * Using a prefix solves this problem.\n *\n * More information on how to handle clobbering and the prefix is explained in\n * *Example: headings (DOM clobbering)* in `rehype-sanitize`.\n *\n * ###### Unknown nodes\n *\n * Unknown nodes are nodes with a type that isn’t in `handlers` or `passThrough`.\n * The default behavior for unknown nodes is:\n *\n * * when the node has a `value` (and doesn’t have `data.hName`,\n * `data.hProperties`, or `data.hChildren`, see later), create a hast `text`\n * node\n * * otherwise, create a `
` element (which could be changed with\n * `data.hName`), with its children mapped from mdast to hast as well\n *\n * This behavior can be changed by passing an `unknownHandler`.\n *\n * @overload\n * @param {Processor} processor\n * @param {Readonly | null | undefined} [options]\n * @returns {TransformBridge}\n *\n * @overload\n * @param {Readonly | null | undefined} [options]\n * @returns {TransformMutate}\n *\n * @param {Readonly | Processor | null | undefined} [destination]\n * Processor or configuration (optional).\n * @param {Readonly | null | undefined} [options]\n * When a processor was given, configuration (optional).\n * @returns {TransformBridge | TransformMutate}\n * Transform.\n */\nexport default function remarkRehype(destination, options) {\n if (destination && 'run' in destination) {\n /**\n * @type {TransformBridge}\n */\n return async function (tree, file) {\n // Cast because root in -> root out.\n const hastTree = /** @type {HastRoot} */ (\n toHast(tree, {file, ...options})\n )\n await destination.run(hastTree, file)\n }\n }\n\n /**\n * @type {TransformMutate}\n */\n return function (tree, file) {\n // Cast because root in -> root out.\n return /** @type {HastRoot} */ (\n toHast(tree, {file, ...(options || destination)})\n )\n }\n}\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 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) => void} Callback\n * Callback.\n *\n * @typedef {(...input: Array) => 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) => 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} */\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} 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} 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","// A derivative work based on:\n// .\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// .\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} 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// .\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: \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: \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}\n */\n this.history = []\n\n /**\n * List of messages associated with the file.\n *\n * @type {Array}\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 * > .\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 , 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}\n */\n function (property) {\n const self = this\n const constr = self.constructor\n const proto = /** @type {Record} */ (\n // Prototypes do exist.\n // type-coverage:ignore-next-line\n constr.prototype\n )\n const value = proto[property]\n /** @type {(...parameters: Array) => 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, any, any> |\n * PluginTuple, any, any> |\n * Preset\n * )} Pluggable\n * Union of the different ways to add plugins and settings.\n */\n\n/**\n * @typedef {Array} PluggableList\n * List of plugins and presets.\n */\n\n// Note: we can’t use `callback` yet as it messes up `this`:\n// .\n/**\n * @template {Array} [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} [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,\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} next\n * Callback.\n * @returns {(\n * Promise |\n * Promise | // 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` or `undefined` — the next transformer keeps using\n * same tree\n * * `Promise` 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\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\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\n * : // Unknown.\n * Processor\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>}\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 |\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>>}\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 |\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}\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} */ (\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}\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}\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}\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>} done\n * @returns {undefined}\n *\n * @overload\n * @param {Compatible | undefined} [file]\n * @returns {Promise>}\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> | undefined} [done]\n * Callback (optional).\n * @returns {Promise | 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) => 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} */ (file))\n })\n\n /**\n * @param {Error | undefined} error\n * @param {VFileWithOutput | 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}\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 | 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>}\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} done\n * @returns {undefined}\n *\n * @overload\n * @param {HeadTree extends undefined ? Node : HeadTree} tree\n * @param {Compatible | undefined} file\n * @param {RunCallback} done\n * @returns {undefined}\n *\n * @overload\n * @param {HeadTree extends undefined ? Node : HeadTree} tree\n * @param {Compatible | undefined} [file]\n * @returns {Promise}\n *\n * @param {HeadTree extends undefined ? Node : HeadTree} tree\n * Tree to transform and inspect.\n * @param {(\n * RunCallback |\n * Compatible\n * )} [file]\n * File associated with `node` (optional); any value accepted as `x` in\n * `new VFile(x)`.\n * @param {RunCallback} [done]\n * Callback (optional).\n * @returns {Promise | 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}\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} [Parameters=[]]\n * @template {Node | string | undefined} [Input=undefined]\n * @template [Output=Input]\n *\n * @overload\n * @param {Preset | null | undefined} [preset]\n * @returns {Processor}\n *\n * @overload\n * @param {PluggableList} list\n * @returns {Processor}\n *\n * @overload\n * @param {Plugin} plugin\n * @param {...(Parameters | [boolean])} parameters\n * @returns {UsePlugin}\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}\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>} */ (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} 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","// Register `Raw` in tree:\n/// \n\n/**\n * @typedef {import('hast').Element} Element\n * @typedef {import('hast').ElementContent} ElementContent\n * @typedef {import('hast').Nodes} Nodes\n * @typedef {import('hast').Parents} Parents\n * @typedef {import('hast').Root} Root\n * @typedef {import('hast-util-to-jsx-runtime').Components} JsxRuntimeComponents\n * @typedef {import('remark-rehype').Options} RemarkRehypeOptions\n * @typedef {import('unist-util-visit').BuildVisitor} Visitor\n * @typedef {import('unified').PluggableList} PluggableList\n */\n\n/**\n * @callback AllowElement\n * Filter elements.\n * @param {Readonly} element\n * Element to check.\n * @param {number} index\n * Index of `element` in `parent`.\n * @param {Readonly | undefined} parent\n * Parent of `element`.\n * @returns {boolean | null | undefined}\n * Whether to allow `element` (default: `false`).\n *\n * @typedef {Partial} Components\n * Map tag names to components.\n *\n * @typedef Deprecation\n * Deprecation.\n * @property {string} from\n * Old field.\n * @property {string} id\n * ID in readme.\n * @property {keyof Options} [to]\n * New field.\n *\n * @typedef Options\n * Configuration.\n * @property {AllowElement | null | undefined} [allowElement]\n * Filter elements (optional);\n * `allowedElements` / `disallowedElements` is used first.\n * @property {ReadonlyArray | null | undefined} [allowedElements]\n * Tag names to allow (default: all tag names);\n * cannot combine w/ `disallowedElements`.\n * @property {string | null | undefined} [children]\n * Markdown.\n * @property {string | null | undefined} [className]\n * Wrap in a `div` with this class name.\n * @property {Components | null | undefined} [components]\n * Map tag names to components.\n * @property {ReadonlyArray | null | undefined} [disallowedElements]\n * Tag names to disallow (default: `[]`);\n * cannot combine w/ `allowedElements`.\n * @property {PluggableList | null | undefined} [rehypePlugins]\n * List of rehype plugins to use.\n * @property {PluggableList | null | undefined} [remarkPlugins]\n * List of remark plugins to use.\n * @property {Readonly | null | undefined} [remarkRehypeOptions]\n * Options to pass through to `remark-rehype`.\n * @property {boolean | null | undefined} [skipHtml=false]\n * Ignore HTML in markdown completely (default: `false`).\n * @property {boolean | null | undefined} [unwrapDisallowed=false]\n * Extract (unwrap) what’s in disallowed elements (default: `false`);\n * normally when say `strong` is not allowed, it and it’s children are dropped,\n * with `unwrapDisallowed` the element itself is replaced by its children.\n * @property {UrlTransform | null | undefined} [urlTransform]\n * Change URLs (default: `defaultUrlTransform`)\n *\n * @callback UrlTransform\n * Transform all URLs.\n * @param {string} url\n * URL.\n * @param {string} key\n * Property name (example: `'href'`).\n * @param {Readonly} node\n * Node.\n * @returns {string | null | undefined}\n * Transformed URL (optional).\n */\n\nimport {unreachable} from 'devlop'\nimport {toJsxRuntime} from 'hast-util-to-jsx-runtime'\nimport {urlAttributes} from 'html-url-attributes'\n// @ts-expect-error: untyped.\nimport {Fragment, jsx, jsxs} from 'react/jsx-runtime'\nimport remarkParse from 'remark-parse'\nimport remarkRehype from 'remark-rehype'\nimport {unified} from 'unified'\nimport {visit} from 'unist-util-visit'\nimport {VFile} from 'vfile'\n\nconst changelog =\n 'https://github.com/remarkjs/react-markdown/blob/main/changelog.md'\n\n/** @type {PluggableList} */\nconst emptyPlugins = []\n/** @type {Readonly} */\nconst emptyRemarkRehypeOptions = {allowDangerousHtml: true}\nconst safeProtocol = /^(https?|ircs?|mailto|xmpp)$/i\n\n// Mutable because we `delete` any time it’s used and a message is sent.\n/** @type {ReadonlyArray>} */\nconst deprecations = [\n {from: 'astPlugins', id: 'remove-buggy-html-in-markdown-parser'},\n {from: 'allowDangerousHtml', id: 'remove-buggy-html-in-markdown-parser'},\n {\n from: 'allowNode',\n id: 'replace-allownode-allowedtypes-and-disallowedtypes',\n to: 'allowElement'\n },\n {\n from: 'allowedTypes',\n id: 'replace-allownode-allowedtypes-and-disallowedtypes',\n to: 'allowedElements'\n },\n {\n from: 'disallowedTypes',\n id: 'replace-allownode-allowedtypes-and-disallowedtypes',\n to: 'disallowedElements'\n },\n {from: 'escapeHtml', id: 'remove-buggy-html-in-markdown-parser'},\n {from: 'includeElementIndex', id: '#remove-includeelementindex'},\n {\n from: 'includeNodeIndex',\n id: 'change-includenodeindex-to-includeelementindex'\n },\n {from: 'linkTarget', id: 'remove-linktarget'},\n {from: 'plugins', id: 'change-plugins-to-remarkplugins', to: 'remarkPlugins'},\n {from: 'rawSourcePos', id: '#remove-rawsourcepos'},\n {from: 'renderers', id: 'change-renderers-to-components', to: 'components'},\n {from: 'source', id: 'change-source-to-children', to: 'children'},\n {from: 'sourcePos', id: '#remove-sourcepos'},\n {from: 'transformImageUri', id: '#add-urltransform', to: 'urlTransform'},\n {from: 'transformLinkUri', id: '#add-urltransform', to: 'urlTransform'}\n]\n\n/**\n * Component to render markdown.\n *\n * @param {Readonly} options\n * Props.\n * @returns {JSX.Element}\n * React element.\n */\nexport function Markdown(options) {\n const allowedElements = options.allowedElements\n const allowElement = options.allowElement\n const children = options.children || ''\n const className = options.className\n const components = options.components\n const disallowedElements = options.disallowedElements\n const rehypePlugins = options.rehypePlugins || emptyPlugins\n const remarkPlugins = options.remarkPlugins || emptyPlugins\n const remarkRehypeOptions = options.remarkRehypeOptions\n ? {...options.remarkRehypeOptions, ...emptyRemarkRehypeOptions}\n : emptyRemarkRehypeOptions\n const skipHtml = options.skipHtml\n const unwrapDisallowed = options.unwrapDisallowed\n const urlTransform = options.urlTransform || defaultUrlTransform\n\n const processor = unified()\n .use(remarkParse)\n .use(remarkPlugins)\n .use(remarkRehype, remarkRehypeOptions)\n .use(rehypePlugins)\n\n const file = new VFile()\n\n if (typeof children === 'string') {\n file.value = children\n } else {\n unreachable(\n 'Unexpected value `' +\n children +\n '` for `children` prop, expected `string`'\n )\n }\n\n if (allowedElements && disallowedElements) {\n unreachable(\n 'Unexpected combined `allowedElements` and `disallowedElements`, expected one or the other'\n )\n }\n\n for (const deprecation of deprecations) {\n if (Object.hasOwn(options, deprecation.from)) {\n unreachable(\n 'Unexpected `' +\n deprecation.from +\n '` prop, ' +\n (deprecation.to\n ? 'use `' + deprecation.to + '` instead'\n : 'remove it') +\n ' (see <' +\n changelog +\n '#' +\n deprecation.id +\n '> for more info)'\n )\n }\n }\n\n const mdastTree = processor.parse(file)\n /** @type {Nodes} */\n let hastTree = processor.runSync(mdastTree, file)\n\n // Wrap in `div` if there’s a class name.\n if (className) {\n hastTree = {\n type: 'element',\n tagName: 'div',\n properties: {className},\n // Assume no doctypes.\n children: /** @type {Array} */ (\n hastTree.type === 'root' ? hastTree.children : [hastTree]\n )\n }\n }\n\n visit(hastTree, transform)\n\n return toJsxRuntime(hastTree, {\n Fragment,\n components,\n ignoreInvalidStyle: true,\n jsx,\n jsxs,\n passKeys: true,\n passNode: true\n })\n\n /** @type {Visitor} */\n function transform(node, index, parent) {\n if (node.type === 'raw' && parent && typeof index === 'number') {\n if (skipHtml) {\n parent.children.splice(index, 1)\n } else {\n parent.children[index] = {type: 'text', value: node.value}\n }\n\n return index\n }\n\n if (node.type === 'element') {\n /** @type {string} */\n let key\n\n for (key in urlAttributes) {\n if (\n Object.hasOwn(urlAttributes, key) &&\n Object.hasOwn(node.properties, key)\n ) {\n const value = node.properties[key]\n const test = urlAttributes[key]\n if (test === null || test.includes(node.tagName)) {\n node.properties[key] = urlTransform(String(value || ''), key, node)\n }\n }\n }\n }\n\n if (node.type === 'element') {\n let remove = allowedElements\n ? !allowedElements.includes(node.tagName)\n : disallowedElements\n ? disallowedElements.includes(node.tagName)\n : false\n\n if (!remove && allowElement && typeof index === 'number') {\n remove = !allowElement(node, index, parent)\n }\n\n if (remove && parent && typeof index === 'number') {\n if (unwrapDisallowed && node.children) {\n parent.children.splice(index, 1, ...node.children)\n } else {\n parent.children.splice(index, 1)\n }\n\n return index\n }\n }\n }\n}\n\n/**\n * Make a URL safe.\n *\n * @satisfies {UrlTransform}\n * @param {string} value\n * URL.\n * @returns {string}\n * Safe URL.\n */\nexport function defaultUrlTransform(value) {\n // Same as:\n // \n // But without the `encode` part.\n const colon = value.indexOf(':')\n const questionMark = value.indexOf('?')\n const numberSign = value.indexOf('#')\n const slash = value.indexOf('/')\n\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) ||\n (questionMark > -1 && colon > questionMark) ||\n (numberSign > -1 && colon > numberSign) ||\n // It is a protocol, it should be allowed.\n safeProtocol.test(value.slice(0, colon))\n ) {\n return value\n }\n\n return ''\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","/**\n * @typedef {import('mdast').Nodes} Nodes\n * @typedef {import('mdast').Parents} Parents\n * @typedef {import('mdast').PhrasingContent} PhrasingContent\n * @typedef {import('mdast').Root} Root\n * @typedef {import('mdast').Text} Text\n * @typedef {import('unist-util-visit-parents').Test} Test\n * @typedef {import('unist-util-visit-parents').VisitorResult} VisitorResult\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, 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} 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`) — matches from regex capture groups\n * * `match` (`RegExpMatchObject`) — info on the match\n * @returns {Array | 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`, replace with those nodes\n *\n * @typedef {[RegExp, ReplaceFunction]} Pair\n * Normalized find and replace.\n *\n * @typedef {Array} 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 {import('unist-util-visit-parents').BuildVisitor} */\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 | 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\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} */\n const siblings = parent.children\n const index = siblings.indexOf(node)\n let change = false\n /** @type {Array} */\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","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 {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} */\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 | 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 * @typedef {import('mdast').FootnoteDefinition} FootnoteDefinition\n * @typedef {import('mdast').FootnoteReference} FootnoteReference\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').Handle} ToMarkdownHandle\n * @typedef {import('mdast-util-to-markdown').Map} Map\n * @typedef {import('mdast-util-to-markdown').Options} ToMarkdownExtension\n */\n\nimport {ok as assert} from 'devlop'\nimport {normalizeIdentifier} from 'micromark-util-normalize-identifier'\n\nfootnoteReference.peek = footnoteReferencePeek\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 gfmFootnoteDefinition: enterFootnoteDefinition,\n gfmFootnoteDefinitionLabelString: enterFootnoteDefinitionLabelString,\n gfmFootnoteCall: enterFootnoteCall,\n gfmFootnoteCallString: enterFootnoteCallString\n },\n exit: {\n gfmFootnoteDefinition: exitFootnoteDefinition,\n gfmFootnoteDefinitionLabelString: exitFootnoteDefinitionLabelString,\n gfmFootnoteCall: exitFootnoteCall,\n gfmFootnoteCallString: exitFootnoteCallString\n }\n }\n}\n\n/**\n * Create an extension for `mdast-util-to-markdown` to enable GFM footnotes\n * in markdown.\n *\n * @returns {ToMarkdownExtension}\n * Extension for `mdast-util-to-markdown`.\n */\nexport function gfmFootnoteToMarkdown() {\n return {\n // This is on by default already.\n unsafe: [{character: '[', inConstruct: ['phrasing', 'label', 'reference']}],\n handlers: {footnoteDefinition, footnoteReference}\n }\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 enterFootnoteDefinitionLabelString() {\n this.buffer()\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.label = label\n node.identifier = normalizeIdentifier(\n this.sliceSerialize(token)\n ).toLowerCase()\n}\n\n/**\n * @this {CompileContext}\n * @type {FromMarkdownHandle}\n */\nfunction exitFootnoteDefinition(token) {\n this.exit(token)\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 enterFootnoteCallString() {\n this.buffer()\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.label = label\n node.identifier = normalizeIdentifier(\n this.sliceSerialize(token)\n ).toLowerCase()\n}\n\n/**\n * @this {CompileContext}\n * @type {FromMarkdownHandle}\n */\nfunction exitFootnoteCall(token) {\n this.exit(token)\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), {\n ...tracker.current(),\n before: value,\n after: ']'\n })\n )\n subexit()\n exit()\n value += tracker.move(']')\n return value\n}\n\n/** @type {ToMarkdownHandle} */\nfunction footnoteReferencePeek() {\n return '['\n}\n\n/**\n * @type {ToMarkdownHandle}\n * @param {FootnoteDefinition} node\n */\nfunction 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), {\n ...tracker.current(),\n before: value,\n after: ']'\n })\n )\n subexit()\n value += tracker.move(\n ']:' + (node.children && node.children.length > 0 ? ' ' : '')\n )\n tracker.shift(4)\n value += tracker.move(\n state.indentLines(state.containerFlow(node, tracker.current()), map)\n )\n exit()\n\n return value\n}\n\n/** @type {Map} */\nfunction map(line, index, blank) {\n if (index === 0) {\n return line\n }\n\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: \n *\n * @type {Array}\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","/**\n * @typedef Options\n * Configuration (optional).\n * @property {string|null|ReadonlyArray} [align]\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} [padding=true]\n * Whether to add a space of padding between delimiters and cells.\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 {boolean} [delimiterStart=true]\n * Whether to begin each row with the delimiter.\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} [delimiterEnd=true]\n * Whether to end each row with the delimiter.\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} [alignDelimiters=true]\n * Whether to align the delimiters.\n * By default, they are aligned:\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 {(value: string) => number} [stringLength]\n * Function to detect the length of table cell content.\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, which receives the cell content\n * 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 * @typedef {Options} MarkdownTableOptions\n * @todo\n * Remove next major.\n */\n\n/**\n * Generate a markdown ([GFM](https://docs.github.com/en/github/writing-on-github/working-with-advanced-formatting/organizing-information-with-tables)) table..\n *\n * @param {ReadonlyArray>} table\n * Table data (matrix of strings).\n * @param {Options} [options]\n * Configuration (optional).\n * @returns {string}\n */\nexport function markdownTable(table, options = {}) {\n const align = (options.align || []).concat()\n const stringLength = options.stringLength || defaultStringLength\n /** @type {Array} Character codes as symbols for alignment per column. */\n const alignments = []\n /** @type {Array>} Cells per row. */\n const cellMatrix = []\n /** @type {Array>} Sizes of each cell per row. */\n const sizeMatrix = []\n /** @type {Array} */\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} */\n const row = []\n /** @type {Array} */\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 (options.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} */\n const row = []\n /** @type {Array} */\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 options.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 (options.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} */\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} */\n const line = []\n\n while (++columnIndex < mostCellsPerRow) {\n const cell = row[columnIndex] || ''\n let before = ''\n let after = ''\n\n if (options.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 (options.delimiterStart !== false && !columnIndex) {\n line.push('|')\n }\n\n if (\n options.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 !(options.alignDelimiters === false && cell === '') &&\n (options.delimiterStart !== false || columnIndex)\n ) {\n line.push(' ')\n }\n\n if (options.alignDelimiters !== false) {\n line.push(before)\n }\n\n line.push(cell)\n\n if (options.alignDelimiters !== false) {\n line.push(after)\n }\n\n if (options.padding !== false) {\n line.push(' ')\n }\n\n if (\n options.delimiterEnd !== false ||\n columnIndex !== mostCellsPerRow - 1\n ) {\n line.push('|')\n }\n }\n\n lines.push(\n options.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 * @returns {string}\n */\nfunction serialize(value) {\n return value === null || value === undefined ? '' : String(value)\n}\n\n/**\n * @param {string} value\n * @returns {number}\n */\nfunction defaultStringLength(value) {\n return value.length\n}\n\n/**\n * @param {string|null|undefined} value\n * @returns {number}\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 * @typedef {import('mdast').Blockquote} Blockquote\n * @typedef {import('mdast').Parents} Parents\n * @typedef {import('../types.js').Info} Info\n * @typedef {import('../types.js').Map} Map\n * @typedef {import('../types.js').State} State\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 * @typedef {import('../types.js').ConstructName} ConstructName\n * @typedef {import('../types.js').Unsafe} Unsafe\n */\n\n/**\n * @param {Array} 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} 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 * @typedef {import('mdast').Break} Break\n * @typedef {import('mdast').Parents} Parents\n * @typedef {import('../types.js').Info} Info\n * @typedef {import('../types.js').State} State\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 * @typedef {import('mdast').Code} Code\n * @typedef {import('mdast').Parents} Parents\n * @typedef {import('../types.js').Info} Info\n * @typedef {import('../types.js').Map} Map\n * @typedef {import('../types.js').State} State\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 * @typedef {import('../types.js').Options} Options\n * @typedef {import('../types.js').State} State\n */\n\n/**\n * @param {State} state\n * @returns {Exclude}\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 * @typedef {import('mdast').Emphasis} Emphasis\n * @typedef {import('mdast').Parents} Parents\n * @typedef {import('../types.js').Info} Info\n * @typedef {import('../types.js').State} State\n */\n\nimport {checkEmphasis} from '../util/check-emphasis.js'\n\nemphasis.peek = emphasisPeek\n\n// To do: there are cases where emphasis cannot “form” depending on the\n// previous or next character of sequences.\n// There’s no way around that though, except for injecting zero-width stuff.\n// Do we need to safeguard against that?\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 let value = tracker.move(marker)\n value += tracker.move(\n state.containerPhrasing(node, {\n before: value,\n after: marker,\n ...tracker.current()\n })\n )\n value += tracker.move(marker)\n exit()\n return value\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 * @typedef {import('../types.js').Options} Options\n * @typedef {import('../types.js').State} State\n */\n\n/**\n * @param {State} state\n * @returns {Exclude}\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 * @typedef {import('mdast').Html} Html\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 * @typedef {import('mdast').Image} Image\n * @typedef {import('mdast').Parents} Parents\n * @typedef {import('../types.js').Info} Info\n * @typedef {import('../types.js').State} State\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 * @typedef {import('mdast').ImageReference} ImageReference\n * @typedef {import('mdast').Parents} Parents\n * @typedef {import('../types.js').Info} Info\n * @typedef {import('../types.js').State} State\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 * @typedef {import('mdast').InlineCode} InlineCode\n * @typedef {import('mdast').Parents} Parents\n * @typedef {import('../types.js').State} State\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 * @typedef {import('mdast').Link} Link\n * @typedef {import('../types.js').State} State\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 * @typedef {import('mdast').Link} Link\n * @typedef {import('mdast').Parents} Parents\n * @typedef {import('../types.js').Exit} Exit\n * @typedef {import('../types.js').Info} Info\n * @typedef {import('../types.js').State} State\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 * @typedef {import('mdast').LinkReference} LinkReference\n * @typedef {import('mdast').Parents} Parents\n * @typedef {import('../types.js').Info} Info\n * @typedef {import('../types.js').State} State\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 * @typedef {import('../types.js').Options} Options\n * @typedef {import('../types.js').State} State\n */\n\n/**\n * @param {State} state\n * @returns {Exclude}\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 * @typedef {import('../types.js').Options} Options\n * @typedef {import('../types.js').State} State\n */\n\n/**\n * @param {State} state\n * @returns {Exclude}\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 * @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} */\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 * @typedef {import('mdast').Parents} Parents\n * @typedef {import('mdast').Strong} Strong\n * @typedef {import('../types.js').Info} Info\n * @typedef {import('../types.js').State} State\n */\n\nimport {checkStrong} from '../util/check-strong.js'\n\nstrong.peek = strongPeek\n\n// To do: there are cases where emphasis cannot “form” depending on the\n// previous or next character of sequences.\n// There’s no way around that though, except for injecting zero-width stuff.\n// Do we need to safeguard against that?\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 let value = tracker.move(marker + marker)\n value += tracker.move(\n state.containerPhrasing(node, {\n before: value,\n after: marker,\n ...tracker.current()\n })\n )\n value += tracker.move(marker + marker)\n exit()\n return value\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 * @typedef {import('../types.js').Options} Options\n * @typedef {import('../types.js').State} State\n */\n\n/**\n * @param {State} state\n * @returns {Exclude}\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","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 * @typedef {import('../types.js').Options} Options\n * @typedef {import('../types.js').State} State\n */\n\n/**\n * @param {State} state\n * @returns {Exclude}\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 * @typedef {import('mdast').Code} Code\n * @typedef {import('../types.js').State} State\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 * 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 * @typedef {import('mdast').Definition} Definition\n * @typedef {import('mdast').Parents} Parents\n * @typedef {import('../types.js').Info} Info\n * @typedef {import('../types.js').State} State\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 * @typedef {import('mdast').Heading} Heading\n * @typedef {import('mdast').Parents} Parents\n * @typedef {import('../types.js').Info} Info\n * @typedef {import('../types.js').State} State\n */\n\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 =\n '&#x' +\n value.charCodeAt(0).toString(16).toUpperCase() +\n ';' +\n 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 * @typedef {import('mdast').Heading} Heading\n * @typedef {import('../types.js').State} State\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 * @typedef {import('mdast').List} List\n * @typedef {import('mdast').Parents} Parents\n * @typedef {import('../types.js').Info} Info\n * @typedef {import('../types.js').State} State\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 * @typedef {import('../types.js').Options} Options\n * @typedef {import('../types.js').State} State\n */\n\n/**\n * @param {State} state\n * @returns {Exclude}\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 * @typedef {import('../types.js').Options} Options\n * @typedef {import('../types.js').State} State\n */\n\nimport {checkBullet} from './check-bullet.js'\n\n/**\n * @param {State} state\n * @returns {Exclude}\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 * @typedef {import('mdast').ListItem} ListItem\n * @typedef {import('mdast').Parents} Parents\n * @typedef {import('../types.js').Info} Info\n * @typedef {import('../types.js').Map} Map\n * @typedef {import('../types.js').State} State\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 * @typedef {import('../types.js').Options} Options\n * @typedef {import('../types.js').State} State\n */\n\n/**\n * @param {State} state\n * @returns {Exclude}\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 * @typedef {import('mdast').Paragraph} Paragraph\n * @typedef {import('mdast').Parents} Parents\n * @typedef {import('../types.js').Info} Info\n * @typedef {import('../types.js').State} State\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').Parents} Parents\n * @typedef {import('mdast').Root} Root\n * @typedef {import('../types.js').Info} Info\n * @typedef {import('../types.js').State} State\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 const fn = hasPhrasing ? state.containerPhrasing : state.containerFlow\n return fn.call(state, node, info)\n}\n","/**\n * @typedef {import('mdast').Parents} Parents\n * @typedef {import('mdast').Text} Text\n * @typedef {import('../types.js').Info} Info\n * @typedef {import('../types.js').State} State\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 * @typedef {import('mdast').Parents} Parents\n * @typedef {import('mdast').ThematicBreak} ThematicBreak\n * @typedef {import('../types.js').State} State\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","/**\n * @typedef {import('../types.js').Options} Options\n * @typedef {import('../types.js').State} State\n */\n\n/**\n * @param {State} state\n * @returns {Exclude}\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 * @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 // \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>} matrix\n * @param {Array | 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>} */\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} */\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 {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: \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: .\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: .\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 // \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 // .\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 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 * .\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 * .\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: .\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} 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 {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} */\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 * > \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 {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} */\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 {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]} 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}\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} 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} 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} 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} */\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>} */\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]);\n events.length = 0;\n let slice = vecs.pop();\n while (slice) {\n events.push(...slice);\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} 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} events\n// * @param {Array} 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>} events\n * List of events.\n * @param {number} index\n * Table enter event.\n * @returns {Array}\n * List of aligns.\n */\nexport function gfmTableAlign(events, index) {\n let inDelimiterRow = false;\n /** @type {Array} */\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} context\n * @param {Readonly} 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} map\n * @param {Readonly} context\n * @param {number} index\n * @param {Token} table\n * @param {Token | undefined} tableBody\n */\n// eslint-disable-next-line max-params\nfunction flushTableEnd(map, context, index, table, tableBody) {\n /** @type {Array} */\n const exits = [];\n const related = getPoint(context.events, index);\n if (tableBody) {\n tableBody.end = Object.assign({}, related);\n exits.push(['exit', tableBody, context]);\n }\n table.end = Object.assign({}, related);\n exits.push(['exit', table, context]);\n map.add(index + 1, 0, exits);\n}\n\n/**\n * @param {Readonly>} events\n * @param {number} index\n * @returns {Readonly}\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 * @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/// \n\n/**\n * @typedef {import('mdast').Root} Root\n * @typedef {import('mdast-util-gfm').Options} MdastOptions\n * @typedef {import('micromark-extension-gfm').Options} MicromarkOptions\n * @typedef {import('unified').Processor} Processor\n */\n\n/**\n * @typedef {MicromarkOptions & MdastOptions} Options\n * Configuration.\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} */ (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","/**\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 * @typedef {import('mdast-util-from-markdown').Extension} FromMarkdownExtension\n * @typedef {import('mdast-util-to-markdown').Options} ToMarkdownExtension\n */\n\n/**\n * @typedef {import('mdast-util-gfm-table').Options} Options\n * Configuration.\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}\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.\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(),\n gfmStrikethroughToMarkdown(),\n gfmTableToMarkdown(options),\n gfmTaskListItemToMarkdown()\n ]\n }\n}\n","import { visit } from 'unist-util-visit';\nimport type { Plugin } from 'unified';\nimport type { Root, PhrasingContent } from \"mdast\";\n\nconst alertRegex = /^\\[!(NOTE|TIP|IMPORTANT|WARNING|CAUTION)\\]/i;\nconst alertLegacyRegex = /^\\[!(NOTE|TIP|IMPORTANT|WARNING|CAUTION)(\\/.*)?\\]/i;\n\ntype Option = {\n /**\n * Use the legacy title format, which includes a slash and a title after the alert type.\n * \n * Enabling legacyTitle allows modifying the title, but this is not GitHub standard.\n */\n legacyTitle?: boolean\n}\n\n/**\n * Alerts are a Markdown extension based on the blockquote syntax that you can use to emphasize critical information.\n * On GitHub, they are displayed with distinctive colors and icons to indicate the significance of the content.\n * https://docs.github.com/en/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax#alerts\n */\nexport const remarkAlert: Plugin<[Option?], Root> = ({ legacyTitle = false } = {}) => {\n return (tree) => {\n visit(tree, \"blockquote\", (node, index, parent) => {\n let alertType = '';\n let title = '';\n let isNext = true;\n let child = node.children.map((item) => {\n if (isNext && item.type === \"paragraph\") {\n const firstNode = item.children[0];\n const text = firstNode.type === 'text' ? firstNode.value : '';\n const reg = legacyTitle ? alertLegacyRegex : alertRegex;\n const match = text.match(reg);\n if (match) {\n isNext = false;\n alertType = match[1].toLocaleLowerCase();\n title = legacyTitle ? match[2] || alertType.toLocaleUpperCase() : alertType.toLocaleUpperCase();\n if (text.includes('\\n')) {\n item.children[0] = {\n type: 'text',\n value: text.replace(reg, '').replace(/^\\n+/, ''),\n };\n }\n\n if (!text.includes('\\n')) {\n const itemChild: Array = [];\n item.children.forEach((item, idx) => {\n if (idx == 0) return;\n if (idx == 1 && item.type === 'break') {\n return;\n }\n itemChild.push(item);\n });\n item.children = [...itemChild];\n }\n }\n }\n return item;\n })\n\n if (!!alertType) {\n node.data = {\n hName: \"div\",\n hProperties: {\n class: `markdown-alert markdown-alert-${alertType}`,\n dir: 'auto'\n },\n }\n child.unshift({\n type: \"paragraph\",\n children: [\n getAlertIcon(alertType as IconType),\n {\n type: \"text\",\n value: title.replace(/^\\//, ''),\n }\n ],\n data: {\n hProperties: {\n class: \"markdown-alert-title\",\n dir: \"auto\"\n }\n }\n })\n }\n node.children = [...child];\n });\n };\n};\n\nexport function getAlertIcon(type: IconType): PhrasingContent {\n let pathD = pathData[type] ?? '';\n return {\n type: \"emphasis\",\n data: {\n hName: \"svg\",\n hProperties: {\n class: \"octicon\",\n viewBox: '0 0 16 16',\n width: '16',\n height: '16',\n ariaHidden: 'true',\n },\n },\n children: [\n {\n type: \"emphasis\",\n data: {\n hName: \"path\",\n hProperties: {\n d: pathD\n }\n },\n children: []\n }\n ]\n }\n}\n\ntype IconType = 'note' | 'tip' | 'important' | 'warning' | 'caution';\n\nconst pathData: Record = {\n note: 'M0 8a8 8 0 1 1 16 0A8 8 0 0 1 0 8Zm8-6.5a6.5 6.5 0 1 0 0 13 6.5 6.5 0 0 0 0-13ZM6.5 7.75A.75.75 0 0 1 7.25 7h1a.75.75 0 0 1 .75.75v2.75h.25a.75.75 0 0 1 0 1.5h-2a.75.75 0 0 1 0-1.5h.25v-2h-.25a.75.75 0 0 1-.75-.75ZM8 6a1 1 0 1 1 0-2 1 1 0 0 1 0 2Z',\n tip: 'M8 1.5c-2.363 0-4 1.69-4 3.75 0 .984.424 1.625.984 2.304l.214.253c.223.264.47.556.673.848.284.411.537.896.621 1.49a.75.75 0 0 1-1.484.211c-.04-.282-.163-.547-.37-.847a8.456 8.456 0 0 0-.542-.68c-.084-.1-.173-.205-.268-.32C3.201 7.75 2.5 6.766 2.5 5.25 2.5 2.31 4.863 0 8 0s5.5 2.31 5.5 5.25c0 1.516-.701 2.5-1.328 3.259-.095.115-.184.22-.268.319-.207.245-.383.453-.541.681-.208.3-.33.565-.37.847a.751.751 0 0 1-1.485-.212c.084-.593.337-1.078.621-1.489.203-.292.45-.584.673-.848.075-.088.147-.173.213-.253.561-.679.985-1.32.985-2.304 0-2.06-1.637-3.75-4-3.75ZM5.75 12h4.5a.75.75 0 0 1 0 1.5h-4.5a.75.75 0 0 1 0-1.5ZM6 15.25a.75.75 0 0 1 .75-.75h2.5a.75.75 0 0 1 0 1.5h-2.5a.75.75 0 0 1-.75-.75Z',\n important:\n 'M0 1.75C0 .784.784 0 1.75 0h12.5C15.216 0 16 .784 16 1.75v9.5A1.75 1.75 0 0 1 14.25 13H8.06l-2.573 2.573A1.458 1.458 0 0 1 3 14.543V13H1.75A1.75 1.75 0 0 1 0 11.25Zm1.75-.25a.25.25 0 0 0-.25.25v9.5c0 .138.112.25.25.25h2a.75.75 0 0 1 .75.75v2.19l2.72-2.72a.749.749 0 0 1 .53-.22h6.5a.25.25 0 0 0 .25-.25v-9.5a.25.25 0 0 0-.25-.25Zm7 2.25v2.5a.75.75 0 0 1-1.5 0v-2.5a.75.75 0 0 1 1.5 0ZM9 9a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z',\n warning:\n 'M6.457 1.047c.659-1.234 2.427-1.234 3.086 0l6.082 11.378A1.75 1.75 0 0 1 14.082 15H1.918a1.75 1.75 0 0 1-1.543-2.575Zm1.763.707a.25.25 0 0 0-.44 0L1.698 13.132a.25.25 0 0 0 .22.368h12.164a.25.25 0 0 0 .22-.368Zm.53 3.996v2.5a.75.75 0 0 1-1.5 0v-2.5a.75.75 0 0 1 1.5 0ZM9 11a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z',\n caution:\n 'M4.47.22A.749.749 0 0 1 5 0h6c.199 0 .389.079.53.22l4.25 4.25c.141.14.22.331.22.53v6a.749.749 0 0 1-.22.53l-4.25 4.25A.749.749 0 0 1 11 16H5a.749.749 0 0 1-.53-.22L.22 11.53A.749.749 0 0 1 0 11V5c0-.199.079-.389.22-.53Zm.84 1.28L1.5 5.31v5.38l3.81 3.81h5.38l3.81-3.81V5.31L10.69 1.5ZM8 4a.75.75 0 0 1 .75.75v3.5a.75.75 0 0 1-1.5 0v-3.5A.75.75 0 0 1 8 4Zm0 8a1 1 0 1 1 0-2 1 1 0 0 1 0 2Z',\n};\n","import copyTextToClipboard from '@uiw/copy-to-clipboard';\nimport { useEffect } from 'react';\nfunction getParentElement(target) {\n if (!target) return null;\n var dom = target;\n if (dom.dataset.code && dom.classList.contains('copied')) {\n return dom;\n }\n if (dom.parentElement) {\n return getParentElement(dom.parentElement);\n }\n return null;\n}\nexport function useCopied(container) {\n var handle = event => {\n var target = getParentElement(event.target);\n if (!target) return;\n target.classList.add('active');\n copyTextToClipboard(target.dataset.code, function () {\n setTimeout(() => {\n target.classList.remove('active');\n }, 2000);\n });\n };\n useEffect(() => {\n var _container$current, _container$current2;\n (_container$current = container.current) == null || _container$current.removeEventListener('click', handle, false);\n (_container$current2 = container.current) == null || _container$current2.addEventListener('click', handle, false);\n return () => {\n var _container$current3;\n (_container$current3 = container.current) == null || _container$current3.removeEventListener('click', handle, false);\n };\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [container]);\n}","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/objectWithoutPropertiesLoose\";\nvar _excluded = [\"prefixCls\", \"className\", \"source\", \"style\", \"disableCopy\", \"skipHtml\", \"onScroll\", \"onMouseOver\", \"pluginsFilter\", \"rehypeRewrite\", \"wrapperElement\", \"warpperElement\", \"urlTransform\"];\nimport React, { useImperativeHandle } from 'react';\nimport ReactMarkdown from 'react-markdown';\nimport gfm from 'remark-gfm';\nimport raw from 'rehype-raw';\nimport { remarkAlert } from 'remark-github-blockquote-alert';\nimport { useCopied } from './plugins/useCopied';\nimport \"./styles/markdown.css\";\n\n/**\n * https://github.com/uiwjs/react-md-editor/issues/607\n */\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nvar defaultUrlTransform = url => url;\nexport default /*#__PURE__*/React.forwardRef((props, ref) => {\n var {\n prefixCls = 'wmde-markdown wmde-markdown-color',\n className,\n source,\n style,\n disableCopy = false,\n skipHtml = true,\n onScroll,\n onMouseOver,\n pluginsFilter,\n wrapperElement = {},\n warpperElement = {},\n urlTransform\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n var mdp = React.useRef(null);\n useImperativeHandle(ref, () => _extends({}, props, {\n mdp\n }), [mdp, props]);\n var cls = (prefixCls || '') + \" \" + (className || '');\n useCopied(mdp);\n var rehypePlugins = [...(other.rehypePlugins || [])];\n var customProps = {\n allowElement: (element, index, parent) => {\n if (other.allowElement) {\n return other.allowElement(element, index, parent);\n }\n return /^[A-Za-z0-9]+$/.test(element.tagName);\n }\n };\n if (skipHtml) {\n rehypePlugins.push(raw);\n }\n var remarkPlugins = [remarkAlert, ...(other.remarkPlugins || []), gfm];\n var wrapperProps = _extends({}, warpperElement, wrapperElement);\n return /*#__PURE__*/_jsx(\"div\", _extends({\n ref: mdp,\n onScroll: onScroll,\n onMouseOver: onMouseOver\n }, wrapperProps, {\n className: cls,\n style: style,\n children: /*#__PURE__*/_jsx(ReactMarkdown, _extends({}, customProps, other, {\n skipHtml: skipHtml,\n urlTransform: urlTransform || defaultUrlTransform,\n rehypePlugins: pluginsFilter ? pluginsFilter('rehype', rehypePlugins) : rehypePlugins,\n remarkPlugins: pluginsFilter ? pluginsFilter('remark', remarkPlugins) : remarkPlugins,\n children: source || ''\n }))\n }));\n});","import _extends from \"@babel/runtime/helpers/extends\";\nimport { visit } from 'unist-util-visit';\nexport var reservedMeta = function reservedMeta(options) {\n if (options === void 0) {\n options = {};\n }\n return tree => {\n visit(tree, node => {\n if (node.type === 'element' && node.tagName === 'code' && node.data && node.data.meta) {\n node.properties = _extends({}, node.properties, {\n 'data-meta': String(node.data.meta)\n });\n }\n });\n };\n};","import { visit } from 'unist-util-visit';\nexport var retrieveMeta = function retrieveMeta(options) {\n if (options === void 0) {\n options = {};\n }\n return tree => {\n visit(tree, node => {\n if (node.type === 'element' && node.tagName === 'code' && node.properties && node.properties['dataMeta']) {\n if (!node.data) {\n node.data = {};\n }\n var metaString = node.properties['dataMeta'];\n if (typeof metaString === 'string') {\n node.data.meta = metaString;\n }\n delete node.properties['dataMeta'];\n }\n });\n };\n};","// This module is generated by `script/`.\n/* eslint-disable no-control-regex, no-misleading-character-class, no-useless-escape */\nexport const regex = /[\\0-\\x1F!-,\\.\\/:-@\\[-\\^`\\{-\\xA9\\xAB-\\xB4\\xB6-\\xB9\\xBB-\\xBF\\xD7\\xF7\\u02C2-\\u02C5\\u02D2-\\u02DF\\u02E5-\\u02EB\\u02ED\\u02EF-\\u02FF\\u0375\\u0378\\u0379\\u037E\\u0380-\\u0385\\u0387\\u038B\\u038D\\u03A2\\u03F6\\u0482\\u0530\\u0557\\u0558\\u055A-\\u055F\\u0589-\\u0590\\u05BE\\u05C0\\u05C3\\u05C6\\u05C8-\\u05CF\\u05EB-\\u05EE\\u05F3-\\u060F\\u061B-\\u061F\\u066A-\\u066D\\u06D4\\u06DD\\u06DE\\u06E9\\u06FD\\u06FE\\u0700-\\u070F\\u074B\\u074C\\u07B2-\\u07BF\\u07F6-\\u07F9\\u07FB\\u07FC\\u07FE\\u07FF\\u082E-\\u083F\\u085C-\\u085F\\u086B-\\u089F\\u08B5\\u08C8-\\u08D2\\u08E2\\u0964\\u0965\\u0970\\u0984\\u098D\\u098E\\u0991\\u0992\\u09A9\\u09B1\\u09B3-\\u09B5\\u09BA\\u09BB\\u09C5\\u09C6\\u09C9\\u09CA\\u09CF-\\u09D6\\u09D8-\\u09DB\\u09DE\\u09E4\\u09E5\\u09F2-\\u09FB\\u09FD\\u09FF\\u0A00\\u0A04\\u0A0B-\\u0A0E\\u0A11\\u0A12\\u0A29\\u0A31\\u0A34\\u0A37\\u0A3A\\u0A3B\\u0A3D\\u0A43-\\u0A46\\u0A49\\u0A4A\\u0A4E-\\u0A50\\u0A52-\\u0A58\\u0A5D\\u0A5F-\\u0A65\\u0A76-\\u0A80\\u0A84\\u0A8E\\u0A92\\u0AA9\\u0AB1\\u0AB4\\u0ABA\\u0ABB\\u0AC6\\u0ACA\\u0ACE\\u0ACF\\u0AD1-\\u0ADF\\u0AE4\\u0AE5\\u0AF0-\\u0AF8\\u0B00\\u0B04\\u0B0D\\u0B0E\\u0B11\\u0B12\\u0B29\\u0B31\\u0B34\\u0B3A\\u0B3B\\u0B45\\u0B46\\u0B49\\u0B4A\\u0B4E-\\u0B54\\u0B58-\\u0B5B\\u0B5E\\u0B64\\u0B65\\u0B70\\u0B72-\\u0B81\\u0B84\\u0B8B-\\u0B8D\\u0B91\\u0B96-\\u0B98\\u0B9B\\u0B9D\\u0BA0-\\u0BA2\\u0BA5-\\u0BA7\\u0BAB-\\u0BAD\\u0BBA-\\u0BBD\\u0BC3-\\u0BC5\\u0BC9\\u0BCE\\u0BCF\\u0BD1-\\u0BD6\\u0BD8-\\u0BE5\\u0BF0-\\u0BFF\\u0C0D\\u0C11\\u0C29\\u0C3A-\\u0C3C\\u0C45\\u0C49\\u0C4E-\\u0C54\\u0C57\\u0C5B-\\u0C5F\\u0C64\\u0C65\\u0C70-\\u0C7F\\u0C84\\u0C8D\\u0C91\\u0CA9\\u0CB4\\u0CBA\\u0CBB\\u0CC5\\u0CC9\\u0CCE-\\u0CD4\\u0CD7-\\u0CDD\\u0CDF\\u0CE4\\u0CE5\\u0CF0\\u0CF3-\\u0CFF\\u0D0D\\u0D11\\u0D45\\u0D49\\u0D4F-\\u0D53\\u0D58-\\u0D5E\\u0D64\\u0D65\\u0D70-\\u0D79\\u0D80\\u0D84\\u0D97-\\u0D99\\u0DB2\\u0DBC\\u0DBE\\u0DBF\\u0DC7-\\u0DC9\\u0DCB-\\u0DCE\\u0DD5\\u0DD7\\u0DE0-\\u0DE5\\u0DF0\\u0DF1\\u0DF4-\\u0E00\\u0E3B-\\u0E3F\\u0E4F\\u0E5A-\\u0E80\\u0E83\\u0E85\\u0E8B\\u0EA4\\u0EA6\\u0EBE\\u0EBF\\u0EC5\\u0EC7\\u0ECE\\u0ECF\\u0EDA\\u0EDB\\u0EE0-\\u0EFF\\u0F01-\\u0F17\\u0F1A-\\u0F1F\\u0F2A-\\u0F34\\u0F36\\u0F38\\u0F3A-\\u0F3D\\u0F48\\u0F6D-\\u0F70\\u0F85\\u0F98\\u0FBD-\\u0FC5\\u0FC7-\\u0FFF\\u104A-\\u104F\\u109E\\u109F\\u10C6\\u10C8-\\u10CC\\u10CE\\u10CF\\u10FB\\u1249\\u124E\\u124F\\u1257\\u1259\\u125E\\u125F\\u1289\\u128E\\u128F\\u12B1\\u12B6\\u12B7\\u12BF\\u12C1\\u12C6\\u12C7\\u12D7\\u1311\\u1316\\u1317\\u135B\\u135C\\u1360-\\u137F\\u1390-\\u139F\\u13F6\\u13F7\\u13FE-\\u1400\\u166D\\u166E\\u1680\\u169B-\\u169F\\u16EB-\\u16ED\\u16F9-\\u16FF\\u170D\\u1715-\\u171F\\u1735-\\u173F\\u1754-\\u175F\\u176D\\u1771\\u1774-\\u177F\\u17D4-\\u17D6\\u17D8-\\u17DB\\u17DE\\u17DF\\u17EA-\\u180A\\u180E\\u180F\\u181A-\\u181F\\u1879-\\u187F\\u18AB-\\u18AF\\u18F6-\\u18FF\\u191F\\u192C-\\u192F\\u193C-\\u1945\\u196E\\u196F\\u1975-\\u197F\\u19AC-\\u19AF\\u19CA-\\u19CF\\u19DA-\\u19FF\\u1A1C-\\u1A1F\\u1A5F\\u1A7D\\u1A7E\\u1A8A-\\u1A8F\\u1A9A-\\u1AA6\\u1AA8-\\u1AAF\\u1AC1-\\u1AFF\\u1B4C-\\u1B4F\\u1B5A-\\u1B6A\\u1B74-\\u1B7F\\u1BF4-\\u1BFF\\u1C38-\\u1C3F\\u1C4A-\\u1C4C\\u1C7E\\u1C7F\\u1C89-\\u1C8F\\u1CBB\\u1CBC\\u1CC0-\\u1CCF\\u1CD3\\u1CFB-\\u1CFF\\u1DFA\\u1F16\\u1F17\\u1F1E\\u1F1F\\u1F46\\u1F47\\u1F4E\\u1F4F\\u1F58\\u1F5A\\u1F5C\\u1F5E\\u1F7E\\u1F7F\\u1FB5\\u1FBD\\u1FBF-\\u1FC1\\u1FC5\\u1FCD-\\u1FCF\\u1FD4\\u1FD5\\u1FDC-\\u1FDF\\u1FED-\\u1FF1\\u1FF5\\u1FFD-\\u203E\\u2041-\\u2053\\u2055-\\u2070\\u2072-\\u207E\\u2080-\\u208F\\u209D-\\u20CF\\u20F1-\\u2101\\u2103-\\u2106\\u2108\\u2109\\u2114\\u2116-\\u2118\\u211E-\\u2123\\u2125\\u2127\\u2129\\u212E\\u213A\\u213B\\u2140-\\u2144\\u214A-\\u214D\\u214F-\\u215F\\u2189-\\u24B5\\u24EA-\\u2BFF\\u2C2F\\u2C5F\\u2CE5-\\u2CEA\\u2CF4-\\u2CFF\\u2D26\\u2D28-\\u2D2C\\u2D2E\\u2D2F\\u2D68-\\u2D6E\\u2D70-\\u2D7E\\u2D97-\\u2D9F\\u2DA7\\u2DAF\\u2DB7\\u2DBF\\u2DC7\\u2DCF\\u2DD7\\u2DDF\\u2E00-\\u2E2E\\u2E30-\\u3004\\u3008-\\u3020\\u3030\\u3036\\u3037\\u303D-\\u3040\\u3097\\u3098\\u309B\\u309C\\u30A0\\u30FB\\u3100-\\u3104\\u3130\\u318F-\\u319F\\u31C0-\\u31EF\\u3200-\\u33FF\\u4DC0-\\u4DFF\\u9FFD-\\u9FFF\\uA48D-\\uA4CF\\uA4FE\\uA4FF\\uA60D-\\uA60F\\uA62C-\\uA63F\\uA673\\uA67E\\uA6F2-\\uA716\\uA720\\uA721\\uA789\\uA78A\\uA7C0\\uA7C1\\uA7CB-\\uA7F4\\uA828-\\uA82B\\uA82D-\\uA83F\\uA874-\\uA87F\\uA8C6-\\uA8CF\\uA8DA-\\uA8DF\\uA8F8-\\uA8FA\\uA8FC\\uA92E\\uA92F\\uA954-\\uA95F\\uA97D-\\uA97F\\uA9C1-\\uA9CE\\uA9DA-\\uA9DF\\uA9FF\\uAA37-\\uAA3F\\uAA4E\\uAA4F\\uAA5A-\\uAA5F\\uAA77-\\uAA79\\uAAC3-\\uAADA\\uAADE\\uAADF\\uAAF0\\uAAF1\\uAAF7-\\uAB00\\uAB07\\uAB08\\uAB0F\\uAB10\\uAB17-\\uAB1F\\uAB27\\uAB2F\\uAB5B\\uAB6A-\\uAB6F\\uABEB\\uABEE\\uABEF\\uABFA-\\uABFF\\uD7A4-\\uD7AF\\uD7C7-\\uD7CA\\uD7FC-\\uD7FF\\uE000-\\uF8FF\\uFA6E\\uFA6F\\uFADA-\\uFAFF\\uFB07-\\uFB12\\uFB18-\\uFB1C\\uFB29\\uFB37\\uFB3D\\uFB3F\\uFB42\\uFB45\\uFBB2-\\uFBD2\\uFD3E-\\uFD4F\\uFD90\\uFD91\\uFDC8-\\uFDEF\\uFDFC-\\uFDFF\\uFE10-\\uFE1F\\uFE30-\\uFE32\\uFE35-\\uFE4C\\uFE50-\\uFE6F\\uFE75\\uFEFD-\\uFF0F\\uFF1A-\\uFF20\\uFF3B-\\uFF3E\\uFF40\\uFF5B-\\uFF65\\uFFBF-\\uFFC1\\uFFC8\\uFFC9\\uFFD0\\uFFD1\\uFFD8\\uFFD9\\uFFDD-\\uFFFF]|\\uD800[\\uDC0C\\uDC27\\uDC3B\\uDC3E\\uDC4E\\uDC4F\\uDC5E-\\uDC7F\\uDCFB-\\uDD3F\\uDD75-\\uDDFC\\uDDFE-\\uDE7F\\uDE9D-\\uDE9F\\uDED1-\\uDEDF\\uDEE1-\\uDEFF\\uDF20-\\uDF2C\\uDF4B-\\uDF4F\\uDF7B-\\uDF7F\\uDF9E\\uDF9F\\uDFC4-\\uDFC7\\uDFD0\\uDFD6-\\uDFFF]|\\uD801[\\uDC9E\\uDC9F\\uDCAA-\\uDCAF\\uDCD4-\\uDCD7\\uDCFC-\\uDCFF\\uDD28-\\uDD2F\\uDD64-\\uDDFF\\uDF37-\\uDF3F\\uDF56-\\uDF5F\\uDF68-\\uDFFF]|\\uD802[\\uDC06\\uDC07\\uDC09\\uDC36\\uDC39-\\uDC3B\\uDC3D\\uDC3E\\uDC56-\\uDC5F\\uDC77-\\uDC7F\\uDC9F-\\uDCDF\\uDCF3\\uDCF6-\\uDCFF\\uDD16-\\uDD1F\\uDD3A-\\uDD7F\\uDDB8-\\uDDBD\\uDDC0-\\uDDFF\\uDE04\\uDE07-\\uDE0B\\uDE14\\uDE18\\uDE36\\uDE37\\uDE3B-\\uDE3E\\uDE40-\\uDE5F\\uDE7D-\\uDE7F\\uDE9D-\\uDEBF\\uDEC8\\uDEE7-\\uDEFF\\uDF36-\\uDF3F\\uDF56-\\uDF5F\\uDF73-\\uDF7F\\uDF92-\\uDFFF]|\\uD803[\\uDC49-\\uDC7F\\uDCB3-\\uDCBF\\uDCF3-\\uDCFF\\uDD28-\\uDD2F\\uDD3A-\\uDE7F\\uDEAA\\uDEAD-\\uDEAF\\uDEB2-\\uDEFF\\uDF1D-\\uDF26\\uDF28-\\uDF2F\\uDF51-\\uDFAF\\uDFC5-\\uDFDF\\uDFF7-\\uDFFF]|\\uD804[\\uDC47-\\uDC65\\uDC70-\\uDC7E\\uDCBB-\\uDCCF\\uDCE9-\\uDCEF\\uDCFA-\\uDCFF\\uDD35\\uDD40-\\uDD43\\uDD48-\\uDD4F\\uDD74\\uDD75\\uDD77-\\uDD7F\\uDDC5-\\uDDC8\\uDDCD\\uDDDB\\uDDDD-\\uDDFF\\uDE12\\uDE38-\\uDE3D\\uDE3F-\\uDE7F\\uDE87\\uDE89\\uDE8E\\uDE9E\\uDEA9-\\uDEAF\\uDEEB-\\uDEEF\\uDEFA-\\uDEFF\\uDF04\\uDF0D\\uDF0E\\uDF11\\uDF12\\uDF29\\uDF31\\uDF34\\uDF3A\\uDF45\\uDF46\\uDF49\\uDF4A\\uDF4E\\uDF4F\\uDF51-\\uDF56\\uDF58-\\uDF5C\\uDF64\\uDF65\\uDF6D-\\uDF6F\\uDF75-\\uDFFF]|\\uD805[\\uDC4B-\\uDC4F\\uDC5A-\\uDC5D\\uDC62-\\uDC7F\\uDCC6\\uDCC8-\\uDCCF\\uDCDA-\\uDD7F\\uDDB6\\uDDB7\\uDDC1-\\uDDD7\\uDDDE-\\uDDFF\\uDE41-\\uDE43\\uDE45-\\uDE4F\\uDE5A-\\uDE7F\\uDEB9-\\uDEBF\\uDECA-\\uDEFF\\uDF1B\\uDF1C\\uDF2C-\\uDF2F\\uDF3A-\\uDFFF]|\\uD806[\\uDC3B-\\uDC9F\\uDCEA-\\uDCFE\\uDD07\\uDD08\\uDD0A\\uDD0B\\uDD14\\uDD17\\uDD36\\uDD39\\uDD3A\\uDD44-\\uDD4F\\uDD5A-\\uDD9F\\uDDA8\\uDDA9\\uDDD8\\uDDD9\\uDDE2\\uDDE5-\\uDDFF\\uDE3F-\\uDE46\\uDE48-\\uDE4F\\uDE9A-\\uDE9C\\uDE9E-\\uDEBF\\uDEF9-\\uDFFF]|\\uD807[\\uDC09\\uDC37\\uDC41-\\uDC4F\\uDC5A-\\uDC71\\uDC90\\uDC91\\uDCA8\\uDCB7-\\uDCFF\\uDD07\\uDD0A\\uDD37-\\uDD39\\uDD3B\\uDD3E\\uDD48-\\uDD4F\\uDD5A-\\uDD5F\\uDD66\\uDD69\\uDD8F\\uDD92\\uDD99-\\uDD9F\\uDDAA-\\uDEDF\\uDEF7-\\uDFAF\\uDFB1-\\uDFFF]|\\uD808[\\uDF9A-\\uDFFF]|\\uD809[\\uDC6F-\\uDC7F\\uDD44-\\uDFFF]|[\\uD80A\\uD80B\\uD80E-\\uD810\\uD812-\\uD819\\uD824-\\uD82B\\uD82D\\uD82E\\uD830-\\uD833\\uD837\\uD839\\uD83D\\uD83F\\uD87B-\\uD87D\\uD87F\\uD885-\\uDB3F\\uDB41-\\uDBFF][\\uDC00-\\uDFFF]|\\uD80D[\\uDC2F-\\uDFFF]|\\uD811[\\uDE47-\\uDFFF]|\\uD81A[\\uDE39-\\uDE3F\\uDE5F\\uDE6A-\\uDECF\\uDEEE\\uDEEF\\uDEF5-\\uDEFF\\uDF37-\\uDF3F\\uDF44-\\uDF4F\\uDF5A-\\uDF62\\uDF78-\\uDF7C\\uDF90-\\uDFFF]|\\uD81B[\\uDC00-\\uDE3F\\uDE80-\\uDEFF\\uDF4B-\\uDF4E\\uDF88-\\uDF8E\\uDFA0-\\uDFDF\\uDFE2\\uDFE5-\\uDFEF\\uDFF2-\\uDFFF]|\\uD821[\\uDFF8-\\uDFFF]|\\uD823[\\uDCD6-\\uDCFF\\uDD09-\\uDFFF]|\\uD82C[\\uDD1F-\\uDD4F\\uDD53-\\uDD63\\uDD68-\\uDD6F\\uDEFC-\\uDFFF]|\\uD82F[\\uDC6B-\\uDC6F\\uDC7D-\\uDC7F\\uDC89-\\uDC8F\\uDC9A-\\uDC9C\\uDC9F-\\uDFFF]|\\uD834[\\uDC00-\\uDD64\\uDD6A-\\uDD6C\\uDD73-\\uDD7A\\uDD83\\uDD84\\uDD8C-\\uDDA9\\uDDAE-\\uDE41\\uDE45-\\uDFFF]|\\uD835[\\uDC55\\uDC9D\\uDCA0\\uDCA1\\uDCA3\\uDCA4\\uDCA7\\uDCA8\\uDCAD\\uDCBA\\uDCBC\\uDCC4\\uDD06\\uDD0B\\uDD0C\\uDD15\\uDD1D\\uDD3A\\uDD3F\\uDD45\\uDD47-\\uDD49\\uDD51\\uDEA6\\uDEA7\\uDEC1\\uDEDB\\uDEFB\\uDF15\\uDF35\\uDF4F\\uDF6F\\uDF89\\uDFA9\\uDFC3\\uDFCC\\uDFCD]|\\uD836[\\uDC00-\\uDDFF\\uDE37-\\uDE3A\\uDE6D-\\uDE74\\uDE76-\\uDE83\\uDE85-\\uDE9A\\uDEA0\\uDEB0-\\uDFFF]|\\uD838[\\uDC07\\uDC19\\uDC1A\\uDC22\\uDC25\\uDC2B-\\uDCFF\\uDD2D-\\uDD2F\\uDD3E\\uDD3F\\uDD4A-\\uDD4D\\uDD4F-\\uDEBF\\uDEFA-\\uDFFF]|\\uD83A[\\uDCC5-\\uDCCF\\uDCD7-\\uDCFF\\uDD4C-\\uDD4F\\uDD5A-\\uDFFF]|\\uD83B[\\uDC00-\\uDDFF\\uDE04\\uDE20\\uDE23\\uDE25\\uDE26\\uDE28\\uDE33\\uDE38\\uDE3A\\uDE3C-\\uDE41\\uDE43-\\uDE46\\uDE48\\uDE4A\\uDE4C\\uDE50\\uDE53\\uDE55\\uDE56\\uDE58\\uDE5A\\uDE5C\\uDE5E\\uDE60\\uDE63\\uDE65\\uDE66\\uDE6B\\uDE73\\uDE78\\uDE7D\\uDE7F\\uDE8A\\uDE9C-\\uDEA0\\uDEA4\\uDEAA\\uDEBC-\\uDFFF]|\\uD83C[\\uDC00-\\uDD2F\\uDD4A-\\uDD4F\\uDD6A-\\uDD6F\\uDD8A-\\uDFFF]|\\uD83E[\\uDC00-\\uDFEF\\uDFFA-\\uDFFF]|\\uD869[\\uDEDE-\\uDEFF]|\\uD86D[\\uDF35-\\uDF3F]|\\uD86E[\\uDC1E\\uDC1F]|\\uD873[\\uDEA2-\\uDEAF]|\\uD87A[\\uDFE1-\\uDFFF]|\\uD87E[\\uDE1E-\\uDFFF]|\\uD884[\\uDF4B-\\uDFFF]|\\uDB40[\\uDC00-\\uDCFF\\uDDF0-\\uDFFF]/g\n","import { regex } from './regex.js'\n\nconst own = Object.hasOwnProperty\n\n/**\n * Slugger.\n */\nexport default class BananaSlug {\n /**\n * Create a new slug class.\n */\n constructor () {\n /** @type {Record} */\n // eslint-disable-next-line no-unused-expressions\n this.occurrences\n\n this.reset()\n }\n\n /**\n * Generate a unique slug.\n *\n * Tracks previously generated slugs: repeated calls with the same value\n * will result in different slugs.\n * Use the `slug` function to get same slugs.\n *\n * @param {string} value\n * String of text to slugify\n * @param {boolean} [maintainCase=false]\n * Keep the current case, otherwise make all lowercase\n * @return {string}\n * A unique slug string\n */\n slug (value, maintainCase) {\n const self = this\n let result = slug(value, maintainCase === true)\n const originalSlug = result\n\n while (own.call(self.occurrences, result)) {\n self.occurrences[originalSlug]++\n result = originalSlug + '-' + self.occurrences[originalSlug]\n }\n\n self.occurrences[result] = 0\n\n return result\n }\n\n /**\n * Reset - Forget all previous slugs\n *\n * @return void\n */\n reset () {\n this.occurrences = Object.create(null)\n }\n}\n\n/**\n * Generate a slug.\n *\n * Does not track previously generated slugs: repeated calls with the same value\n * will result in the exact same slug.\n * Use the `GithubSlugger` class to get unique slugs.\n *\n * @param {string} value\n * String of text to slugify\n * @param {boolean} [maintainCase=false]\n * Keep the current case, otherwise make all lowercase\n * @return {string}\n * A unique slug string\n */\nexport function slug (value, maintainCase) {\n if (typeof value !== 'string') return ''\n if (!maintainCase) value = value.toLowerCase()\n return value.replace(regex, '').replace(/ /g, '-')\n}\n","/**\n * @typedef {import('hast').Nodes} Nodes\n */\n\n/**\n * Get the rank (`1` to `6`) of headings (`h1` to `h6`).\n *\n * @param {Nodes} node\n * Node to check.\n * @returns {number | undefined}\n * Rank of the heading or `undefined` if not a heading.\n */\nexport function headingRank(node) {\n const name = node.type === 'element' ? node.tagName.toLowerCase() : ''\n const code =\n name.length === 2 && name.charCodeAt(0) === 104 /* `h` */\n ? name.charCodeAt(1)\n : 0\n return code > 48 /* `0` */ && code < 55 /* `7` */\n ? code - 48 /* `0` */\n : undefined\n}\n","/**\n * @typedef {import('hast').Root} Root\n */\n\n/**\n * @typedef Options\n * Configuration (optional).\n * @property {string} [prefix='']\n * Prefix to add in front of `id`s (default: `''`).\n */\n\nimport GithubSlugger from 'github-slugger'\nimport {headingRank} from 'hast-util-heading-rank'\nimport {toString} from 'hast-util-to-string'\nimport {visit} from 'unist-util-visit'\n\n/** @type {Options} */\nconst emptyOptions = {}\nconst slugs = new GithubSlugger()\n\n/**\n * Add `id`s to headings.\n *\n * @param {Options | null | undefined} [options]\n * Configuration (optional).\n * @returns\n * Transform.\n */\nexport default function rehypeSlug(options) {\n const settings = options || emptyOptions\n const prefix = settings.prefix || ''\n\n /**\n * @param {Root} tree\n * Tree.\n * @returns {undefined}\n * Nothing.\n */\n return function (tree) {\n slugs.reset()\n\n visit(tree, 'element', function (node) {\n if (headingRank(node) && !node.properties.id) {\n node.properties.id = prefix + slugs.slug(toString(node))\n }\n })\n }\n}\n","/**\n * @typedef {import('hast').Element} Element\n * @typedef {import('hast').Parents} Parents\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 an element.\n * @param {unknown} this\n * Context object (`this`) to call `test` with\n * @param {unknown} [element]\n * Anything (typically a node).\n * @param {number | null | undefined} [index]\n * Position of `element` in its parent.\n * @param {Parents | null | undefined} [parent]\n * Parent of `element`.\n * @returns {boolean}\n * Whether this is an element and passes a test.\n *\n * @typedef {Array | TestFunction | string | null | undefined} Test\n * Check for an arbitrary element.\n *\n * * when `string`, checks that the element has that tag name\n * * when `function`, see `TestFunction`\n * * when `Array`, checks if one of the subtests pass\n *\n * @callback TestFunction\n * Check if an element passes a test.\n * @param {unknown} this\n * The given context.\n * @param {Element} element\n * An element.\n * @param {number | undefined} [index]\n * Position of `element` in its parent.\n * @param {Parents | undefined} [parent]\n * Parent of `element`.\n * @returns {boolean | undefined | void}\n * Whether this element passes the test.\n *\n * Note: `void` is included until TS sees no return as `undefined`.\n */\n\n/**\n * Check if `element` is an `Element` and whether it passes the given test.\n *\n * @param element\n * Thing to check, typically `element`.\n * @param test\n * Check for a specific element.\n * @param index\n * Position of `element` in its parent.\n * @param parent\n * Parent of `element`.\n * @param context\n * Context object (`this`) to call `test` with.\n * @returns\n * Whether `element` is an `Element` and passes a test.\n * @throws\n * When an incorrect `test`, `index`, or `parent` is given; there is no error\n * thrown when `element` is not a node or not an element.\n */\nexport const isElement =\n // Note: overloads in JSDoc can’t yet use different `@template`s.\n /**\n * @type {(\n * ((element: unknown, test: Condition, index?: number | null | undefined, parent?: Parents | null | undefined, context?: unknown) => element is Element & Predicate) &\n * ((element: unknown, test: Condition, index?: number | null | undefined, parent?: Parents | null | undefined, context?: unknown) => element is Element & {tagName: Condition}) &\n * ((element?: null | undefined) => false) &\n * ((element: unknown, test?: null | undefined, index?: number | null | undefined, parent?: Parents | null | undefined, context?: unknown) => element is Element) &\n * ((element: unknown, test?: Test, index?: number | null | undefined, parent?: Parents | null | undefined, context?: unknown) => boolean)\n * )}\n */\n (\n /**\n * @param {unknown} [element]\n * @param {Test | undefined} [test]\n * @param {number | null | undefined} [index]\n * @param {Parents | null | undefined} [parent]\n * @param {unknown} [context]\n * @returns {boolean}\n */\n // eslint-disable-next-line max-params\n function (element, test, index, parent, context) {\n const check = convertElement(test)\n\n if (\n index !== null &&\n index !== undefined &&\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 !== null &&\n parent !== undefined &&\n (!parent.type || !parent.children)\n ) {\n throw new Error('Expected valid `parent`')\n }\n\n if (\n (index === null || index === undefined) !==\n (parent === null || parent === undefined)\n ) {\n throw new Error('Expected both `index` and `parent`')\n }\n\n return looksLikeAnElement(element)\n ? check.call(context, element, index, parent)\n : false\n }\n )\n\n/**\n * Generate a check 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 * an `element`, `index`, and `parent`.\n *\n * @param test\n * A test for a specific element.\n * @returns\n * A check.\n */\nexport const convertElement =\n // Note: overloads in JSDoc can’t yet use different `@template`s.\n /**\n * @type {(\n * ((test: Condition) => (element: unknown, index?: number | null | undefined, parent?: Parents | null | undefined, context?: unknown) => element is Element & Predicate) &\n * ((test: Condition) => (element: unknown, index?: number | null | undefined, parent?: Parents | null | undefined, context?: unknown) => element is Element & {tagName: Condition}) &\n * ((test?: null | undefined) => (element?: unknown, index?: number | null | undefined, parent?: Parents | null | undefined, context?: unknown) => element is Element) &\n * ((test?: Test) => Check)\n * )}\n */\n (\n /**\n * @param {Test | null | undefined} [test]\n * @returns {Check}\n */\n function (test) {\n if (test === null || test === undefined) {\n return element\n }\n\n if (typeof test === 'string') {\n return tagNameFactory(test)\n }\n\n // Assume array.\n if (typeof test === 'object') {\n return anyFactory(test)\n }\n\n if (typeof test === 'function') {\n return castFactory(test)\n }\n\n throw new Error('Expected function, string, or array as `test`')\n }\n )\n\n/**\n * Handle multiple tests.\n *\n * @param {Array} tests\n * @returns {Check}\n */\nfunction anyFactory(tests) {\n /** @type {Array} */\n const checks = []\n let index = -1\n\n while (++index < tests.length) {\n checks[index] = convertElement(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 a string into a test for an element with a certain type.\n *\n * @param {string} check\n * @returns {Check}\n */\nfunction tagNameFactory(check) {\n return castFactory(tagName)\n\n /**\n * @param {Element} element\n * @returns {boolean}\n */\n function tagName(element) {\n return element.tagName === check\n }\n}\n\n/**\n * Turn a custom test into a test for an element 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 looksLikeAnElement(value) &&\n testFunction.call(\n this,\n value,\n typeof index === 'number' ? index : undefined,\n parent || undefined\n )\n )\n }\n}\n\n/**\n * Make sure something is an element.\n *\n * @param {unknown} element\n * @returns {element is Element}\n */\nfunction element(element) {\n return Boolean(\n element &&\n typeof element === 'object' &&\n 'type' in element &&\n element.type === 'element' &&\n 'tagName' in element &&\n typeof element.tagName === 'string'\n )\n}\n\n/**\n * @param {unknown} value\n * @returns {value is Element}\n */\nfunction looksLikeAnElement(value) {\n return (\n value !== null &&\n typeof value === 'object' &&\n 'type' in value &&\n 'tagName' in value\n )\n}\n","/**\n * @typedef {import('hast').Element} Element\n * @typedef {import('hast').ElementContent} ElementContent\n * @typedef {import('hast').Properties} Properties\n * @typedef {import('hast').Root} Root\n *\n * @typedef {import('hast-util-is-element').Test} Test\n */\n\n/**\n * @typedef {'after' | 'append' | 'before' | 'prepend' | 'wrap'} Behavior\n * Behavior.\n *\n * @callback Build\n * Generate content.\n * @param {Readonly} element\n * Current heading.\n * @returns {Array | ElementContent}\n * Content.\n *\n * @callback BuildProperties\n * Generate properties.\n * @param {Readonly} element\n * Current heading.\n * @returns {Properties}\n * Properties.\n *\n * @typedef Options\n * Configuration.\n * @property {Behavior | null | undefined} [behavior='prepend']\n * How to create links (default: `'prepend'`).\n * @property {Readonly | ReadonlyArray | Build | null | undefined} [content]\n * Content to insert in the link (default: if `'wrap'` then `undefined`,\n * otherwise ``);\n * if `behavior` is `'wrap'` and `Build` is passed, its result replaces the\n * existing content, otherwise the content is added after existing content.\n * @property {Readonly | ReadonlyArray | Build | null | undefined} [group]\n * Content to wrap the heading and link with, if `behavior` is `'after'` or\n * `'before'` (optional).\n * @property {Readonly | BuildProperties | null | undefined} [headingProperties]\n * Extra properties to set on the heading (optional).\n * @property {Readonly | BuildProperties | null | undefined} [properties]\n * Extra properties to set on the link when injecting (default:\n * `{ariaHidden: true, tabIndex: -1}` if `'append'` or `'prepend'`, otherwise\n * `undefined`).\n * @property {Test | null | undefined} [test]\n * Extra test for which headings are linked (optional).\n */\n\n/**\n * @template T\n * Kind.\n * @typedef {(\n * T extends Record\n * ? {-readonly [k in keyof T]: Cloneable}\n * : T\n * )} Cloneable\n * Deep clone.\n *\n * See: \n */\n\nimport structuredClone from '@ungap/structured-clone'\nimport {headingRank} from 'hast-util-heading-rank'\nimport {convertElement} from 'hast-util-is-element'\nimport {SKIP, visit} from 'unist-util-visit'\n\n/** @type {Element} */\nconst contentDefaults = {\n type: 'element',\n tagName: 'span',\n properties: {className: ['icon', 'icon-link']},\n children: []\n}\n\n/** @type {Options} */\nconst emptyOptions = {}\n\n/**\n * Add links from headings back to themselves.\n *\n * ###### Notes\n *\n * This plugin only applies to headings with `id`s.\n * Use `rehype-slug` to generate `id`s for headings that don’t have them.\n *\n * Several behaviors are supported:\n *\n * * `'prepend'` (default) — inject link before the heading text\n * * `'append'` — inject link after the heading text\n * * `'wrap'` — wrap the whole heading text with the link\n * * `'before'` — insert link before the heading\n * * `'after'` — insert link after the heading\n *\n * @param {Readonly | null | undefined} [options]\n * Configuration (optional).\n * @returns\n * Transform.\n */\nexport default function rehypeAutolinkHeadings(options) {\n const settings = options || emptyOptions\n let properties = settings.properties\n const headingOroperties = settings.headingProperties\n const behavior = settings.behavior || 'prepend'\n const content = settings.content\n const group = settings.group\n const is = convertElement(settings.test)\n\n /** @type {import('unist-util-visit').Visitor} */\n let method\n\n if (behavior === 'after' || behavior === 'before') {\n method = around\n } else if (behavior === 'wrap') {\n method = wrap\n } else {\n method = inject\n\n if (!properties) {\n properties = {ariaHidden: 'true', tabIndex: -1}\n }\n }\n\n /**\n * Transform.\n *\n * @param {Root} tree\n * Tree.\n * @returns {undefined}\n * Nothing.\n */\n return function (tree) {\n visit(tree, 'element', function (node, index, parent) {\n if (headingRank(node) && node.properties.id && is(node, index, parent)) {\n Object.assign(node.properties, toProperties(headingOroperties, node))\n return method(node, index, parent)\n }\n })\n }\n\n /** @type {import('unist-util-visit').Visitor} */\n function inject(node) {\n const children = toChildren(content || contentDefaults, node)\n node.children[behavior === 'prepend' ? 'unshift' : 'push'](\n create(node, toProperties(properties, node), children)\n )\n\n return [SKIP]\n }\n\n /** @type {import('unist-util-visit').Visitor} */\n function around(node, index, parent) {\n /* c8 ignore next -- uncommon */\n if (typeof index !== 'number' || !parent) return\n\n const children = toChildren(content || contentDefaults, node)\n const link = create(node, toProperties(properties, node), children)\n let nodes = behavior === 'before' ? [link, node] : [node, link]\n\n if (group) {\n const grouping = toNode(group, node)\n\n if (grouping && !Array.isArray(grouping) && grouping.type === 'element') {\n grouping.children = nodes\n nodes = [grouping]\n }\n }\n\n parent.children.splice(index, 1, ...nodes)\n\n return [SKIP, index + nodes.length]\n }\n\n /** @type {import('unist-util-visit').Visitor} */\n function wrap(node) {\n /** @type {Array} */\n let before = node.children\n /** @type {Array | ElementContent} */\n let after = []\n\n if (typeof content === 'function') {\n before = []\n after = content(node)\n } else if (content) {\n after = clone(content)\n }\n\n node.children = [\n create(\n node,\n toProperties(properties, node),\n Array.isArray(after) ? [...before, ...after] : [...before, after]\n )\n ]\n\n return [SKIP]\n }\n}\n\n/**\n * Deep clone.\n *\n * @template T\n * Kind.\n * @param {T} thing\n * Thing to clone.\n * @returns {Cloneable}\n * Cloned thing.\n */\nfunction clone(thing) {\n // Cast because it’s mutable now.\n return /** @type {Cloneable} */ (structuredClone(thing))\n}\n\n/**\n * Create an `a`.\n *\n * @param {Readonly} node\n * Related heading.\n * @param {Properties | undefined} properties\n * Properties to set on the link.\n * @param {Array} children\n * Content.\n * @returns {Element}\n * Link.\n */\nfunction create(node, properties, children) {\n return {\n type: 'element',\n tagName: 'a',\n properties: {...properties, href: '#' + node.properties.id},\n children\n }\n}\n\n/**\n * Turn into children.\n *\n * @param {Readonly | ReadonlyArray | Build} value\n * Content.\n * @param {Readonly} node\n * Related heading.\n * @returns {Array}\n * Children.\n */\nfunction toChildren(value, node) {\n const result = toNode(value, node)\n return Array.isArray(result) ? result : [result]\n}\n\n/**\n * Turn into a node.\n *\n * @param {Readonly | ReadonlyArray | Build} value\n * Content.\n * @param {Readonly} node\n * Related heading.\n * @returns {Array | ElementContent}\n * Node.\n */\nfunction toNode(value, node) {\n if (typeof value === 'function') return value(node)\n return clone(value)\n}\n\n/**\n * Turn into properties.\n *\n * @param {Readonly | BuildProperties | null | undefined} value\n * Properties.\n * @param {Readonly} node\n * Related heading.\n * @returns {Properties}\n * Properties.\n */\nfunction toProperties(value, node) {\n if (typeof value === 'function') return value(node)\n return value ? clone(value) : {}\n}\n","import type { Plugin, Pluggable } from 'unified';\nimport type { Root, RootContent, Literal } from 'hast';\nimport { visit } from 'unist-util-visit';\n\n/**\n * Raw string of HTML embedded into HTML AST.\n */\nexport interface Raw extends Literal {\n /**\n * Node type.\n */\n type: 'raw'\n}\n\n// Register nodes in content.\ndeclare module 'hast' {\n interface RootContentMap {\n /**\n * Raw string of HTML embedded into HTML AST.\n */\n raw: Raw\n }\n interface ElementContentMap {\n /**\n * Raw string of HTML embedded into HTML AST.\n */\n raw: Raw\n }\n}\n\n\nexport type RehypeIgnoreOptions = {\n /**\n * Character to use for opening delimiter, by default `rehype:ignore:start`\n */\n openDelimiter?: string;\n /**\n * Character to use for closing delimiter, by default `rehype:ignore:end`\n */\n closeDelimiter?: string;\n}\n\nconst rehypeIgnore: Plugin<[RehypeIgnoreOptions?], Root> = (options = {}) => {\n const { openDelimiter = 'rehype:ignore:start', closeDelimiter = 'rehype:ignore:end' } = options;\n return (tree) => {\n visit(tree, (node: Root | RootContent, index, parent) => {\n if (node.type === 'element' || node.type === 'root') {\n // const start = node.children.findIndex((item) => item.type === 'comment' && item.value === openDelimiter);\n // const end = node.children.findIndex((item) => item.type === 'comment' && item.value === closeDelimiter);\n // if (start > -1 && end > -1) {\n // node.children = node.children.filter((_, idx) => idx < start || idx > end);\n // }\n let start = false;\n node.children = node.children.filter((item) => {\n if (item.type === 'raw' || item.type === 'comment') {\n let str = (item.value || '').trim();\n str = str.replace(/^/, '$1')\n if (str === openDelimiter) {\n start = true;\n return false;\n }\n if (str === closeDelimiter) {\n start = false;\n return false;\n }\n }\n \n return !start;\n })\n }\n });\n }\n}\n\nexport default rehypeIgnore;\n","export var octiconLink = {\n type: 'element',\n tagName: 'svg',\n properties: {\n className: 'octicon octicon-link',\n viewBox: '0 0 16 16',\n version: '1.1',\n width: '16',\n height: '16',\n ariaHidden: 'true'\n },\n children: [{\n type: 'element',\n tagName: 'path',\n children: [],\n properties: {\n fillRule: 'evenodd',\n d: 'M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z'\n }\n }]\n};","import _extends from \"@babel/runtime/helpers/extends\";\nimport slug from 'rehype-slug';\nimport headings from 'rehype-autolink-headings';\nimport rehypeIgnore from 'rehype-ignore';\nimport { getCodeString } from 'rehype-rewrite';\nimport { octiconLink } from './nodes/octiconLink';\nimport { copyElement } from './nodes/copy';\nexport var rehypeRewriteHandle = (disableCopy, rewrite) => (node, index, parent) => {\n if (node.type === 'element' && parent && parent.type === 'root' && /h(1|2|3|4|5|6)/.test(node.tagName)) {\n var child = node.children && node.children[0];\n if (child && child.properties && child.properties.ariaHidden === 'true') {\n child.properties = _extends({\n class: 'anchor'\n }, child.properties);\n child.children = [octiconLink];\n }\n }\n if (node.type === 'element' && node.tagName === 'pre' && !disableCopy) {\n var code = getCodeString(node.children);\n node.children.push(copyElement(code));\n }\n rewrite && rewrite(node, index === null ? undefined : index, parent === null ? undefined : parent);\n};\nexport var defaultRehypePlugins = [slug, headings, rehypeIgnore];","import _extends from \"@babel/runtime/helpers/extends\";\nimport React from 'react';\nimport rehypePrism from 'rehype-prism-plus';\nimport rehypeRewrite from 'rehype-rewrite';\nimport rehypeAttrs from 'rehype-attr';\nimport rehypeRaw from 'rehype-raw';\nimport MarkdownPreview from './preview';\nimport { reservedMeta } from './plugins/reservedMeta';\nimport { retrieveMeta } from './plugins/retrieveMeta';\nimport { rehypeRewriteHandle, defaultRehypePlugins } from './rehypePlugins';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport * from './Props';\nexport default /*#__PURE__*/React.forwardRef((props, ref) => {\n var _props$disableCopy;\n var rehypePlugins = [reservedMeta, rehypeRaw, retrieveMeta, ...defaultRehypePlugins, [rehypeRewrite, {\n rewrite: rehypeRewriteHandle((_props$disableCopy = props.disableCopy) != null ? _props$disableCopy : false, props.rehypeRewrite)\n }], [rehypeAttrs, {\n properties: 'attr'\n }], ...(props.rehypePlugins || []), [rehypePrism, {\n ignoreMissing: true\n }]];\n return /*#__PURE__*/_jsx(MarkdownPreview, _extends({}, props, {\n rehypePlugins: rehypePlugins,\n ref: ref\n }));\n});","export function copyElement(str) {\n if (str === void 0) {\n str = '';\n }\n return {\n type: 'element',\n tagName: 'div',\n properties: {\n class: 'copied',\n 'data-code': str\n },\n children: [{\n type: 'element',\n tagName: 'svg',\n properties: {\n className: 'octicon-copy',\n ariaHidden: 'true',\n viewBox: '0 0 16 16',\n fill: 'currentColor',\n height: 12,\n width: 12\n },\n children: [{\n type: 'element',\n tagName: 'path',\n properties: {\n fillRule: 'evenodd',\n d: 'M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z'\n },\n children: []\n }, {\n type: 'element',\n tagName: 'path',\n properties: {\n fillRule: 'evenodd',\n d: 'M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z'\n },\n children: []\n }]\n }, {\n type: 'element',\n tagName: 'svg',\n properties: {\n className: 'octicon-check',\n ariaHidden: 'true',\n viewBox: '0 0 16 16',\n fill: 'currentColor',\n height: 12,\n width: 12\n },\n children: [{\n type: 'element',\n tagName: 'path',\n properties: {\n fillRule: 'evenodd',\n d: 'M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z'\n },\n children: []\n }]\n }]\n };\n}","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/objectWithoutPropertiesLoose\";\nimport _taggedTemplateLiteralLoose from \"@babel/runtime/helpers/taggedTemplateLiteralLoose\";\nvar _excluded = [\"components\", \"data\", \"node\"],\n _excluded2 = [\"source\", \"components\", \"data\", \"rehypeRewrite\"];\nvar _templateObject;\nimport CodeLayout from 'react-code-preview-layout';\nimport { getMetaId, isMeta, getURLParameters } from 'markdown-react-code-preview-loader';\nimport MarkdownPreview from '@uiw/react-markdown-preview';\nimport styled from 'styled-components';\nimport rehypeIgnore from 'rehype-ignore';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport { jsxs as _jsxs } from \"react/jsx-runtime\";\nvar Preview = CodeLayout.Preview;\nvar Code = CodeLayout.Code;\nvar Toolbar = CodeLayout.Toolbar;\nvar MarkdownStyle = styled(MarkdownPreview)(_templateObject || (_templateObject = _taggedTemplateLiteralLoose([\"\\n margin: 0 auto;\\n box-shadow:\\n rgb(8 15 41 / 8%) 0.5rem 0.5rem 2rem 0px,\\n rgb(8 15 41 / 8%) 0px 0px 1px 0px;\\n border: 1px solid var(--color-border-default, #30363d);\\n text-align: left;\\n max-width: 56rem;\\n overflow: auto;\\n padding: 2rem;\\n border-radius: 0.55rem;\\n\"])));\nvar CodePreview = _ref => {\n var {\n components,\n data,\n node\n } = _ref,\n props = _objectWithoutPropertiesLoose(_ref, _excluded);\n if (node && node.type === 'element' && node.tagName === 'pre') {\n var _child$data, _child$properties, _node$position;\n var child = node.children[0];\n if (!child) return /*#__PURE__*/_jsx(\"pre\", _extends({}, props));\n var meta = ((_child$data = child.data) == null ? void 0 : _child$data.meta) || ((_child$properties = child.properties) == null ? void 0 : _child$properties.dataMeta);\n if (!isMeta(meta)) {\n return /*#__PURE__*/_jsx(\"pre\", _extends({}, props));\n }\n var line = node == null || (_node$position = node.position) == null ? void 0 : _node$position.start.line;\n var metaId = getMetaId(meta) || String(line);\n var Child = components[\"\" + metaId];\n if (metaId && typeof Child === 'function') {\n var code = data[metaId].value || '';\n var {\n title,\n boreder = 1,\n checkered = 1,\n code: codeNum = 1,\n toolbar = 1\n } = getURLParameters(meta || '');\n return /*#__PURE__*/_jsxs(CodeLayout, {\n bordered: !!Number(boreder),\n disableCheckered: !Number(checkered),\n style: {\n marginBottom: 16\n },\n children: [/*#__PURE__*/_jsx(Preview, {\n children: /*#__PURE__*/_jsx(Child, {})\n }), !!Number(toolbar) && /*#__PURE__*/_jsx(Toolbar, {\n text: code,\n visibleButton: !!Number(codeNum),\n children: title || 'Code Example'\n }), !!Number(codeNum) && /*#__PURE__*/_jsx(Code, {\n tagName: \"pre\",\n style: {\n marginBottom: 0\n },\n className: props.className,\n children: props.children\n })]\n });\n }\n }\n return /*#__PURE__*/_jsx(\"code\", _extends({}, props));\n};\nexport default function Markdown(props) {\n var {\n components,\n data\n } = props,\n reset = _objectWithoutPropertiesLoose(props, _excluded2);\n return /*#__PURE__*/_jsx(MarkdownStyle, _extends({\n disableCopy: true,\n rehypePlugins: [rehypeIgnore, ...(reset.rehypePlugins || [])]\n }, reset, {\n source: data.source,\n components: _extends({}, components, {\n pre: rest => /*#__PURE__*/_jsx(CodePreview, _extends({}, rest, {\n components: data.components,\n data: data.data\n }))\n })\n }));\n}","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/objectWithoutPropertiesLoose\";\nimport _taggedTemplateLiteralLoose from \"@babel/runtime/helpers/taggedTemplateLiteralLoose\";\nvar _excluded = [\"version\", \"title\", \"description\", \"source\", \"logo\", \"components\", \"data\", \"markdownProps\", \"exampleProps\", \"className\", \"children\", \"disableCorners\", \"disableDarkMode\", \"disableHeader\", \"disableBackToUp\"];\nvar _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5;\nimport { forwardRef } from 'react';\nimport '@wcj/dark-mode';\nimport { styled } from 'styled-components';\nimport BackToUp from '@uiw/react-back-to-top';\nimport { Github } from './Github';\nimport { Corners } from './Corners';\nimport { Example } from './Example';\nimport { NavMenu, NavMenuView } from './NavMenu';\nimport { useStores } from './store';\nimport Markdown from './Markdown';\nimport { Logo } from './Logo';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport { jsxs as _jsxs } from \"react/jsx-runtime\";\nvar ExampleWrapper = styled.div(_templateObject || (_templateObject = _taggedTemplateLiteralLoose([\"\\n max-width: 56rem;\\n margin: 0 auto;\\n padding: 2.3rem 3rem;\\n display: flex;\\n justify-content: center;\\n\"])));\nvar Wrappper = styled.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteralLoose([\"\\n padding-bottom: 12rem;\\n\"])));\nvar Header = styled.header(_templateObject3 || (_templateObject3 = _taggedTemplateLiteralLoose([\"\\n padding: 9rem 0 2rem 0;\\n text-align: center;\\n h1 {\\n font-weight: 900;\\n font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans', Helvetica, Arial, sans-serif,\\n 'Apple Color Emoji', 'Segoe UI Emoji';\\n }\\n\"])));\nexport var SupVersion = styled.sup(_templateObject4 || (_templateObject4 = _taggedTemplateLiteralLoose([\"\\n font-weight: 200;\\n font-size: 0.78rem;\\n margin-left: 0.5em;\\n margin-top: -0.3em;\\n position: absolute;\\n white-space: nowrap;\\n\"])));\nvar Description = styled.p(_templateObject5 || (_templateObject5 = _taggedTemplateLiteralLoose([\"\\n max-width: 460px;\\n margin: 0 auto;\\n color: var(--color-fg-subtle, #6e7781);\\n\"])));\nvar InternalMarkdownPreviewExample = /*#__PURE__*/forwardRef((props, ref) => {\n var {\n version,\n title,\n description,\n source,\n logo = Logo,\n components,\n data,\n markdownProps,\n exampleProps,\n className = '',\n children,\n disableCorners = false,\n disableDarkMode = false,\n disableHeader = false,\n disableBackToUp = false\n } = props,\n reset = _objectWithoutPropertiesLoose(props, _excluded);\n var store = useStores();\n return /*#__PURE__*/_jsxs(Wrappper, _extends({\n className: \"wmde-markdown-var \" + className\n }, reset, {\n children: [/*#__PURE__*/_jsx(NavMenuView, {\n version: version,\n logo: logo,\n disableDarkMode: disableDarkMode,\n disableCorners: disableCorners\n }), !disableHeader && /*#__PURE__*/_jsxs(Header, {\n children: [logo, title && /*#__PURE__*/_jsxs(\"h1\", {\n children: [title, version && /*#__PURE__*/_jsx(SupVersion, {\n children: version\n })]\n }), description && /*#__PURE__*/_jsx(Description, {\n children: description\n })]\n }), store.example && /*#__PURE__*/_jsx(ExampleWrapper, _extends({}, exampleProps, {\n children: store.example\n })), /*#__PURE__*/_jsx(Markdown, _extends({}, markdownProps, {\n source: source,\n data: {\n data,\n components,\n source\n }\n })), children, !disableBackToUp && /*#__PURE__*/_jsx(BackToUp, {\n children: \"Top\"\n })]\n }));\n});\nvar MarkdownPreviewExample = InternalMarkdownPreviewExample;\nMarkdownPreviewExample.Github = Github;\nMarkdownPreviewExample.Corners = Corners;\nMarkdownPreviewExample.Example = Example;\nMarkdownPreviewExample.NavMenu = NavMenu;\nexport default MarkdownPreviewExample;","import _extends from \"@babel/runtime/helpers/extends\";\nimport { useEffect } from 'react';\nimport { store } from './store';\nexport function Github(props) {\n useEffect(() => store.setCorners(_extends({}, props)), [props]);\n return null;\n}","import _extends from \"@babel/runtime/helpers/extends\";\nimport { useEffect } from 'react';\nimport { store } from './store';\nexport function Corners(props) {\n useEffect(() => store.setDarkMode(_extends({}, props)), [props]);\n return null;\n}","import { useEffect } from 'react';\nimport { store } from './store';\nexport function Example(_ref) {\n var {\n children\n } = _ref;\n useEffect(() => store.setExample(children), [children]);\n return null;\n}","import _extends from \"@babel/runtime/helpers/extends\";\nimport { createContext, useContext, useReducer } from 'react';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nvar initialState = {};\nvar Context = /*#__PURE__*/createContext(initialState);\nvar reducer = (state, action) => _extends({}, state, action);\nexport var useShowToolsStore = () => {\n return useContext(Context);\n};\nvar DispatchShowTools = /*#__PURE__*/createContext(() => {});\nDispatchShowTools.displayName = 'JVR.DispatchShowTools';\nexport function useShowTools() {\n return useReducer(reducer, initialState);\n}\nexport function useShowToolsDispatch() {\n return useContext(DispatchShowTools);\n}\nexport var ShowTools = _ref => {\n var {\n initial,\n dispatch,\n children\n } = _ref;\n return /*#__PURE__*/_jsx(Context.Provider, {\n value: initial,\n children: /*#__PURE__*/_jsx(DispatchShowTools.Provider, {\n value: dispatch,\n children: children\n })\n });\n};\nShowTools.displayName = 'JVR.ShowTools';","import _extends from \"@babel/runtime/helpers/extends\";\nimport { createContext, useContext, useReducer } from 'react';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nvar initialState = {};\nvar Context = /*#__PURE__*/createContext(initialState);\nvar reducer = (state, action) => _extends({}, state, action);\nexport var useExpandsStore = () => {\n return useContext(Context);\n};\nvar DispatchExpands = /*#__PURE__*/createContext(() => {});\nDispatchExpands.displayName = 'JVR.DispatchExpands';\nexport function useExpands() {\n return useReducer(reducer, initialState);\n}\nexport function useExpandsDispatch() {\n return useContext(DispatchExpands);\n}\nexport var Expands = _ref => {\n var {\n initial,\n dispatch,\n children\n } = _ref;\n return /*#__PURE__*/_jsx(Context.Provider, {\n value: initial,\n children: /*#__PURE__*/_jsx(DispatchExpands.Provider, {\n value: dispatch,\n children: children\n })\n });\n};\nExpands.displayName = 'JVR.Expands';","import _extends from \"@babel/runtime/helpers/extends\";\nimport { createContext, useContext, useReducer } from 'react';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nvar initialState = {\n Str: {\n as: 'span',\n 'data-type': 'string',\n style: {\n color: 'var(--w-rjv-type-string-color, #cb4b16)'\n },\n className: 'w-rjv-type',\n children: 'string'\n },\n Url: {\n as: 'a',\n style: {\n color: 'var(--w-rjv-type-url-color, #0969da)'\n },\n 'data-type': 'url',\n className: 'w-rjv-type',\n children: 'url'\n },\n Undefined: {\n style: {\n color: 'var(--w-rjv-type-undefined-color, #586e75)'\n },\n as: 'span',\n 'data-type': 'undefined',\n className: 'w-rjv-type',\n children: 'undefined'\n },\n Null: {\n style: {\n color: 'var(--w-rjv-type-null-color, #d33682)'\n },\n as: 'span',\n 'data-type': 'null',\n className: 'w-rjv-type',\n children: 'null'\n },\n Map: {\n style: {\n color: 'var(--w-rjv-type-map-color, #268bd2)',\n marginRight: 3\n },\n as: 'span',\n 'data-type': 'map',\n className: 'w-rjv-type',\n children: 'Map'\n },\n Nan: {\n style: {\n color: 'var(--w-rjv-type-nan-color, #859900)'\n },\n as: 'span',\n 'data-type': 'nan',\n className: 'w-rjv-type',\n children: 'NaN'\n },\n Bigint: {\n style: {\n color: 'var(--w-rjv-type-bigint-color, #268bd2)'\n },\n as: 'span',\n 'data-type': 'bigint',\n className: 'w-rjv-type',\n children: 'bigint'\n },\n Int: {\n style: {\n color: 'var(--w-rjv-type-int-color, #268bd2)'\n },\n as: 'span',\n 'data-type': 'int',\n className: 'w-rjv-type',\n children: 'int'\n },\n Set: {\n style: {\n color: 'var(--w-rjv-type-set-color, #268bd2)',\n marginRight: 3\n },\n as: 'span',\n 'data-type': 'set',\n className: 'w-rjv-type',\n children: 'Set'\n },\n Float: {\n style: {\n color: 'var(--w-rjv-type-float-color, #859900)'\n },\n as: 'span',\n 'data-type': 'float',\n className: 'w-rjv-type',\n children: 'float'\n },\n True: {\n style: {\n color: 'var(--w-rjv-type-boolean-color, #2aa198)'\n },\n as: 'span',\n 'data-type': 'bool',\n className: 'w-rjv-type',\n children: 'bool'\n },\n False: {\n style: {\n color: 'var(--w-rjv-type-boolean-color, #2aa198)'\n },\n as: 'span',\n 'data-type': 'bool',\n className: 'w-rjv-type',\n children: 'bool'\n },\n Date: {\n style: {\n color: 'var(--w-rjv-type-date-color, #268bd2)'\n },\n as: 'span',\n 'data-type': 'date',\n className: 'w-rjv-type',\n children: 'date'\n }\n};\nvar Context = /*#__PURE__*/createContext(initialState);\nvar reducer = (state, action) => _extends({}, state, action);\nexport var useTypesStore = () => {\n return useContext(Context);\n};\nvar DispatchTypes = /*#__PURE__*/createContext(() => {});\nDispatchTypes.displayName = 'JVR.DispatchTypes';\nexport function useTypes() {\n return useReducer(reducer, initialState);\n}\nexport function useTypesDispatch() {\n return useContext(DispatchTypes);\n}\nexport function Types(_ref) {\n var {\n initial,\n dispatch,\n children\n } = _ref;\n return /*#__PURE__*/_jsx(Context.Provider, {\n value: initial,\n children: /*#__PURE__*/_jsx(DispatchTypes.Provider, {\n value: dispatch,\n children: children\n })\n });\n}\nTypes.displayName = 'JVR.Types';","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/objectWithoutPropertiesLoose\";\nvar _excluded = [\"style\"];\nimport React from 'react';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport function TriangleArrow(props) {\n var {\n style\n } = props,\n reset = _objectWithoutPropertiesLoose(props, _excluded);\n var defaultStyle = _extends({\n cursor: 'pointer',\n height: '1em',\n width: '1em',\n userSelect: 'none',\n display: 'inline-flex'\n }, style);\n return /*#__PURE__*/_jsx(\"svg\", _extends({\n viewBox: \"0 0 24 24\",\n fill: \"var(--w-rjv-arrow-color, currentColor)\",\n style: defaultStyle\n }, reset, {\n children: /*#__PURE__*/_jsx(\"path\", {\n d: \"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z\"\n })\n }));\n}\nTriangleArrow.displayName = 'JVR.TriangleArrow';","import _extends from \"@babel/runtime/helpers/extends\";\nimport { createContext, useContext, useReducer } from 'react';\nimport { TriangleArrow } from '../arrow/TriangleArrow';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nvar initialState = {\n Arrow: {\n as: 'span',\n className: 'w-rjv-arrow',\n style: {\n transform: 'rotate(0deg)',\n transition: 'all 0.3s'\n },\n children: /*#__PURE__*/_jsx(TriangleArrow, {})\n },\n Colon: {\n as: 'span',\n style: {\n color: 'var(--w-rjv-colon-color, var(--w-rjv-color))',\n marginLeft: 0,\n marginRight: 2\n },\n className: 'w-rjv-colon',\n children: ':'\n },\n Quote: {\n as: 'span',\n style: {\n color: 'var(--w-rjv-quotes-color, #236a7c)'\n },\n className: 'w-rjv-quotes',\n children: '\"'\n },\n ValueQuote: {\n as: 'span',\n style: {\n color: 'var(--w-rjv-quotes-string-color, #cb4b16)'\n },\n className: 'w-rjv-quotes',\n children: '\"'\n },\n BracketsLeft: {\n as: 'span',\n style: {\n color: 'var(--w-rjv-brackets-color, #236a7c)'\n },\n className: 'w-rjv-brackets-start',\n children: '['\n },\n BracketsRight: {\n as: 'span',\n style: {\n color: 'var(--w-rjv-brackets-color, #236a7c)'\n },\n className: 'w-rjv-brackets-end',\n children: ']'\n },\n BraceLeft: {\n as: 'span',\n style: {\n color: 'var(--w-rjv-curlybraces-color, #236a7c)'\n },\n className: 'w-rjv-curlybraces-start',\n children: '{'\n },\n BraceRight: {\n as: 'span',\n style: {\n color: 'var(--w-rjv-curlybraces-color, #236a7c)'\n },\n className: 'w-rjv-curlybraces-end',\n children: '}'\n }\n};\nvar Context = /*#__PURE__*/createContext(initialState);\nvar reducer = (state, action) => _extends({}, state, action);\nexport var useSymbolsStore = () => {\n return useContext(Context);\n};\nvar DispatchSymbols = /*#__PURE__*/createContext(() => {});\nDispatchSymbols.displayName = 'JVR.DispatchSymbols';\nexport function useSymbols() {\n return useReducer(reducer, initialState);\n}\nexport function useSymbolsDispatch() {\n return useContext(DispatchSymbols);\n}\nexport var Symbols = _ref => {\n var {\n initial,\n dispatch,\n children\n } = _ref;\n return /*#__PURE__*/_jsx(Context.Provider, {\n value: initial,\n children: /*#__PURE__*/_jsx(DispatchSymbols.Provider, {\n value: dispatch,\n children: children\n })\n });\n};\nSymbols.displayName = 'JVR.Symbols';","import _extends from \"@babel/runtime/helpers/extends\";\nimport React, { createContext, useContext, useReducer } from 'react';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nvar initialState = {\n Copied: {\n className: 'w-rjv-copied',\n style: {\n height: '1em',\n width: '1em',\n cursor: 'pointer',\n verticalAlign: 'middle',\n marginLeft: 5\n }\n },\n CountInfo: {\n as: 'span',\n className: 'w-rjv-object-size',\n style: {\n color: 'var(--w-rjv-info-color, #0000004d)',\n paddingLeft: 8,\n fontStyle: 'italic'\n }\n },\n CountInfoExtra: {\n as: 'span',\n className: 'w-rjv-object-extra',\n style: {\n paddingLeft: 8\n }\n },\n Ellipsis: {\n as: 'span',\n style: {\n cursor: 'pointer',\n color: 'var(--w-rjv-ellipsis-color, #cb4b16)',\n userSelect: 'none'\n },\n className: 'w-rjv-ellipsis',\n children: '...'\n },\n Row: {\n as: 'div',\n className: 'w-rjv-line'\n },\n KeyName: {\n as: 'span',\n className: 'w-rjv-object-key'\n }\n};\nvar Context = /*#__PURE__*/createContext(initialState);\nvar reducer = (state, action) => _extends({}, state, action);\nexport var useSectionStore = () => {\n return useContext(Context);\n};\nvar DispatchSection = /*#__PURE__*/createContext(() => {});\nDispatchSection.displayName = 'JVR.DispatchSection';\nexport function useSection() {\n return useReducer(reducer, initialState);\n}\nexport function useSectionDispatch() {\n return useContext(DispatchSection);\n}\nexport var Section = _ref => {\n var {\n initial,\n dispatch,\n children\n } = _ref;\n return /*#__PURE__*/_jsx(Context.Provider, {\n value: initial,\n children: /*#__PURE__*/_jsx(DispatchSection.Provider, {\n value: dispatch,\n children: children\n })\n });\n};\nSection.displayName = 'JVR.Section';","import _extends from \"@babel/runtime/helpers/extends\";\nimport React, { createContext, useContext, useEffect, useReducer } from 'react';\nimport { useShowTools, ShowTools } from './store/ShowTools';\nimport { useExpands, Expands } from './store/Expands';\nimport { useTypes, Types } from './store/Types';\nimport { useSymbols, Symbols } from './store/Symbols';\nimport { useSection, Section } from './store/Section';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport var initialState = {\n objectSortKeys: false,\n indentWidth: 15\n};\nexport var Context = /*#__PURE__*/createContext(initialState);\nContext.displayName = 'JVR.Context';\nvar DispatchContext = /*#__PURE__*/createContext(() => {});\nDispatchContext.displayName = 'JVR.DispatchContext';\nexport function reducer(state, action) {\n return _extends({}, state, action);\n}\nexport var useStore = () => {\n return useContext(Context);\n};\nexport var useDispatchStore = () => {\n return useContext(DispatchContext);\n};\nexport var Provider = _ref => {\n var {\n children,\n initialState: init,\n initialTypes\n } = _ref;\n var [state, dispatch] = useReducer(reducer, Object.assign({}, initialState, init));\n var [showTools, showToolsDispatch] = useShowTools();\n var [expands, expandsDispatch] = useExpands();\n var [types, typesDispatch] = useTypes();\n var [symbols, symbolsDispatch] = useSymbols();\n var [section, sectionDispatch] = useSection();\n useEffect(() => dispatch(_extends({}, init)), [init]);\n return /*#__PURE__*/_jsx(Context.Provider, {\n value: state,\n children: /*#__PURE__*/_jsx(DispatchContext.Provider, {\n value: dispatch,\n children: /*#__PURE__*/_jsx(ShowTools, {\n initial: showTools,\n dispatch: showToolsDispatch,\n children: /*#__PURE__*/_jsx(Expands, {\n initial: expands,\n dispatch: expandsDispatch,\n children: /*#__PURE__*/_jsx(Types, {\n initial: _extends({}, types, initialTypes),\n dispatch: typesDispatch,\n children: /*#__PURE__*/_jsx(Symbols, {\n initial: symbols,\n dispatch: symbolsDispatch,\n children: /*#__PURE__*/_jsx(Section, {\n initial: section,\n dispatch: sectionDispatch,\n children: children\n })\n })\n })\n })\n })\n })\n });\n};\nexport function useDispatch() {\n return useContext(DispatchContext);\n}\nProvider.displayName = 'JVR.Provider';","import _objectDestructuringEmpty from \"@babel/runtime/helpers/objectDestructuringEmpty\";\nimport _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/objectWithoutPropertiesLoose\";\nvar _excluded = [\"isNumber\"],\n _excluded2 = [\"as\", \"render\"],\n _excluded3 = [\"as\", \"render\"],\n _excluded4 = [\"as\", \"render\"],\n _excluded5 = [\"as\", \"style\", \"render\"],\n _excluded6 = [\"as\", \"render\"],\n _excluded7 = [\"as\", \"render\"],\n _excluded8 = [\"as\", \"render\"],\n _excluded9 = [\"as\", \"render\"];\nimport { useSymbolsStore } from '../store/Symbols';\nimport { useExpandsStore } from '../store/Expands';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport var Quote = props => {\n var {\n Quote: Comp = {}\n } = useSymbolsStore();\n var {\n isNumber\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n if (isNumber) return null;\n var {\n as,\n render\n } = Comp,\n reset = _objectWithoutPropertiesLoose(Comp, _excluded2);\n var Elm = as || 'span';\n var elmProps = _extends({}, other, reset);\n var child = render && typeof render === 'function' && render(elmProps);\n if (child) return child;\n return /*#__PURE__*/_jsx(Elm, _extends({}, elmProps));\n};\nQuote.displayName = 'JVR.Quote';\nexport var ValueQuote = props => {\n var {\n ValueQuote: Comp = {}\n } = useSymbolsStore();\n var other = _extends({}, (_objectDestructuringEmpty(props), props));\n var {\n as,\n render\n } = Comp,\n reset = _objectWithoutPropertiesLoose(Comp, _excluded3);\n var Elm = as || 'span';\n var elmProps = _extends({}, other, reset);\n var child = render && typeof render === 'function' && render(elmProps);\n if (child) return child;\n return /*#__PURE__*/_jsx(Elm, _extends({}, elmProps));\n};\nValueQuote.displayName = 'JVR.ValueQuote';\nexport var Colon = () => {\n var {\n Colon: Comp = {}\n } = useSymbolsStore();\n var {\n as,\n render\n } = Comp,\n reset = _objectWithoutPropertiesLoose(Comp, _excluded4);\n var Elm = as || 'span';\n var child = render && typeof render === 'function' && render(reset);\n if (child) return child;\n return /*#__PURE__*/_jsx(Elm, _extends({}, reset));\n};\nColon.displayName = 'JVR.Colon';\nexport var Arrow = props => {\n var {\n Arrow: Comp = {}\n } = useSymbolsStore();\n var expands = useExpandsStore();\n var {\n expandKey\n } = props;\n var isExpanded = !!expands[expandKey];\n var {\n as,\n style,\n render\n } = Comp,\n reset = _objectWithoutPropertiesLoose(Comp, _excluded5);\n var Elm = as || 'span';\n var isRender = render && typeof render === 'function';\n var child = isRender && render(_extends({}, reset, {\n 'data-expanded': isExpanded,\n style: _extends({}, style, props.style)\n }));\n if (child) return child;\n return /*#__PURE__*/_jsx(Elm, _extends({}, reset, {\n style: _extends({}, style, props.style)\n }));\n};\nArrow.displayName = 'JVR.Arrow';\nexport var BracketsOpen = _ref => {\n var {\n isBrackets\n } = _ref;\n var {\n BracketsLeft = {},\n BraceLeft = {}\n } = useSymbolsStore();\n if (isBrackets) {\n var {\n as,\n render: _render\n } = BracketsLeft,\n reset = _objectWithoutPropertiesLoose(BracketsLeft, _excluded6);\n var BracketsLeftComp = as || 'span';\n var _child = _render && typeof _render === 'function' && _render(reset);\n if (_child) return _child;\n return /*#__PURE__*/_jsx(BracketsLeftComp, _extends({}, reset));\n }\n var {\n as: elm,\n render\n } = BraceLeft,\n props = _objectWithoutPropertiesLoose(BraceLeft, _excluded7);\n var BraceLeftComp = elm || 'span';\n var child = render && typeof render === 'function' && render(props);\n if (child) return child;\n return /*#__PURE__*/_jsx(BraceLeftComp, _extends({}, props));\n};\nBracketsOpen.displayName = 'JVR.BracketsOpen';\nexport var BracketsClose = _ref2 => {\n var {\n isBrackets,\n isVisiable\n } = _ref2;\n if (!isVisiable) return null;\n var {\n BracketsRight = {},\n BraceRight = {}\n } = useSymbolsStore();\n if (isBrackets) {\n var {\n as,\n render: _render2\n } = BracketsRight,\n _reset = _objectWithoutPropertiesLoose(BracketsRight, _excluded8);\n var BracketsRightComp = as || 'span';\n var _child2 = _render2 && typeof _render2 === 'function' && _render2(_reset);\n if (_child2) return _child2;\n return /*#__PURE__*/_jsx(BracketsRightComp, _extends({}, _reset));\n }\n var {\n as: elm,\n render\n } = BraceRight,\n reset = _objectWithoutPropertiesLoose(BraceRight, _excluded9);\n var BraceRightComp = elm || 'span';\n var child = render && typeof render === 'function' && render(reset);\n if (child) return child;\n return /*#__PURE__*/_jsx(BraceRightComp, _extends({}, reset));\n};\nBracketsClose.displayName = 'JVR.BracketsClose';","function _objectDestructuringEmpty(t) {\n if (null == t) throw new TypeError(\"Cannot destructure \" + t);\n}\nexport { _objectDestructuringEmpty as default };","import { useStore } from '../store';\nimport { useExpandsStore } from '../store/Expands';\nimport { BracketsClose } from '../symbol';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport var NestedClose = props => {\n var _expands$expandKey;\n var {\n value,\n expandKey,\n level\n } = props;\n var expands = useExpandsStore();\n var isArray = Array.isArray(value);\n var {\n collapsed\n } = useStore();\n var isMySet = value instanceof Set;\n var isExpanded = (_expands$expandKey = expands[expandKey]) != null ? _expands$expandKey : typeof collapsed === 'boolean' ? collapsed : typeof collapsed === 'number' ? level > collapsed : false;\n var len = Object.keys(value).length;\n if (isExpanded || len === 0) {\n return null;\n }\n var style = {\n paddingLeft: 4\n };\n return /*#__PURE__*/_jsx(\"div\", {\n style: style,\n children: /*#__PURE__*/_jsx(BracketsClose, {\n isBrackets: isArray || isMySet,\n isVisiable: true\n })\n });\n};\nNestedClose.displayName = 'JVR.NestedClose';","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/objectWithoutPropertiesLoose\";\nvar _excluded = [\"as\", \"render\"],\n _excluded2 = [\"as\", \"render\"],\n _excluded3 = [\"as\", \"render\"],\n _excluded4 = [\"as\", \"render\"],\n _excluded5 = [\"as\", \"render\"],\n _excluded6 = [\"as\", \"render\"],\n _excluded7 = [\"as\", \"render\"],\n _excluded8 = [\"as\", \"render\"],\n _excluded9 = [\"as\", \"render\"],\n _excluded10 = [\"as\", \"render\"],\n _excluded11 = [\"as\", \"render\"],\n _excluded12 = [\"as\", \"render\"],\n _excluded13 = [\"as\", \"render\"];\nimport { Fragment, useEffect, useState } from 'react';\nimport { useStore } from '../store';\nimport { useTypesStore } from '../store/Types';\nimport { ValueQuote } from '../symbol';\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nexport var bigIntToString = bi => {\n if (bi === undefined) {\n return '0n';\n } else if (typeof bi === 'string') {\n try {\n bi = BigInt(bi);\n } catch (e) {\n return '0n';\n }\n }\n return bi ? bi.toString() + 'n' : '0n';\n};\nexport var SetComp = _ref => {\n var {\n value,\n keyName\n } = _ref;\n var {\n Set: Comp = {},\n displayDataTypes\n } = useTypesStore();\n var isSet = value instanceof Set;\n if (!isSet || !displayDataTypes) return null;\n var {\n as,\n render\n } = Comp,\n reset = _objectWithoutPropertiesLoose(Comp, _excluded);\n var isRender = render && typeof render === 'function';\n var type = isRender && render(reset, {\n type: 'type',\n value,\n keyName\n });\n if (type) return type;\n var Elm = as || 'span';\n return /*#__PURE__*/_jsx(Elm, _extends({}, reset));\n};\nSetComp.displayName = 'JVR.SetComp';\nexport var MapComp = _ref2 => {\n var {\n value,\n keyName\n } = _ref2;\n var {\n Map: Comp = {},\n displayDataTypes\n } = useTypesStore();\n var isMap = value instanceof Map;\n if (!isMap || !displayDataTypes) return null;\n var {\n as,\n render\n } = Comp,\n reset = _objectWithoutPropertiesLoose(Comp, _excluded2);\n var isRender = render && typeof render === 'function';\n var type = isRender && render(reset, {\n type: 'type',\n value,\n keyName\n });\n if (type) return type;\n var Elm = as || 'span';\n return /*#__PURE__*/_jsx(Elm, _extends({}, reset));\n};\nMapComp.displayName = 'JVR.MapComp';\nvar defalutStyle = {\n opacity: 0.75,\n paddingRight: 4\n};\nexport var TypeString = _ref3 => {\n var {\n children = '',\n keyName\n } = _ref3;\n var {\n Str = {},\n displayDataTypes\n } = useTypesStore();\n var {\n shortenTextAfterLength: length = 30\n } = useStore();\n var {\n as,\n render\n } = Str,\n reset = _objectWithoutPropertiesLoose(Str, _excluded3);\n var childrenStr = children;\n var [shorten, setShorten] = useState(length && childrenStr.length > length);\n useEffect(() => setShorten(length && childrenStr.length > length), [length]);\n var Comp = as || 'span';\n var style = _extends({}, defalutStyle, Str.style || {});\n if (length > 0) {\n reset.style = _extends({}, reset.style, {\n cursor: childrenStr.length <= length ? 'initial' : 'pointer'\n });\n if (childrenStr.length > length) {\n reset.onClick = () => {\n setShorten(!shorten);\n };\n }\n }\n var text = shorten ? childrenStr.slice(0, length) + \"...\" : childrenStr;\n var isRender = render && typeof render === 'function';\n var type = isRender && render(_extends({}, reset, {\n style\n }), {\n type: 'type',\n value: children,\n keyName\n });\n var child = isRender && render(_extends({}, reset, {\n children: text,\n className: 'w-rjv-value'\n }), {\n type: 'value',\n value: children,\n keyName\n });\n return /*#__PURE__*/_jsxs(Fragment, {\n children: [displayDataTypes && (type || /*#__PURE__*/_jsx(Comp, _extends({}, reset, {\n style: style\n }))), child || /*#__PURE__*/_jsxs(Fragment, {\n children: [/*#__PURE__*/_jsx(ValueQuote, {}), /*#__PURE__*/_jsx(Comp, _extends({}, reset, {\n className: \"w-rjv-value\",\n children: text\n })), /*#__PURE__*/_jsx(ValueQuote, {})]\n })]\n });\n};\nTypeString.displayName = 'JVR.TypeString';\nexport var TypeTrue = _ref4 => {\n var {\n children,\n keyName\n } = _ref4;\n var {\n True = {},\n displayDataTypes\n } = useTypesStore();\n var {\n as,\n render\n } = True,\n reset = _objectWithoutPropertiesLoose(True, _excluded4);\n var Comp = as || 'span';\n var style = _extends({}, defalutStyle, True.style || {});\n var isRender = render && typeof render === 'function';\n var type = isRender && render(_extends({}, reset, {\n style\n }), {\n type: 'type',\n value: children,\n keyName\n });\n var child = isRender && render(_extends({}, reset, {\n children,\n className: 'w-rjv-value'\n }), {\n type: 'value',\n value: children,\n keyName\n });\n return /*#__PURE__*/_jsxs(Fragment, {\n children: [displayDataTypes && (type || /*#__PURE__*/_jsx(Comp, _extends({}, reset, {\n style: style\n }))), child || /*#__PURE__*/_jsx(Comp, _extends({}, reset, {\n className: \"w-rjv-value\",\n children: children == null ? void 0 : children.toString()\n }))]\n });\n};\nTypeTrue.displayName = 'JVR.TypeTrue';\nexport var TypeFalse = _ref5 => {\n var {\n children,\n keyName\n } = _ref5;\n var {\n False = {},\n displayDataTypes\n } = useTypesStore();\n var {\n as,\n render\n } = False,\n reset = _objectWithoutPropertiesLoose(False, _excluded5);\n var Comp = as || 'span';\n var style = _extends({}, defalutStyle, False.style || {});\n var isRender = render && typeof render === 'function';\n var type = isRender && render(_extends({}, reset, {\n style\n }), {\n type: 'type',\n value: children,\n keyName\n });\n var child = isRender && render(_extends({}, reset, {\n children,\n className: 'w-rjv-value'\n }), {\n type: 'value',\n value: children,\n keyName\n });\n return /*#__PURE__*/_jsxs(Fragment, {\n children: [displayDataTypes && (type || /*#__PURE__*/_jsx(Comp, _extends({}, reset, {\n style: style\n }))), child || /*#__PURE__*/_jsx(Comp, _extends({}, reset, {\n className: \"w-rjv-value\",\n children: children == null ? void 0 : children.toString()\n }))]\n });\n};\nTypeFalse.displayName = 'JVR.TypeFalse';\nexport var TypeFloat = _ref6 => {\n var {\n children,\n keyName\n } = _ref6;\n var {\n Float = {},\n displayDataTypes\n } = useTypesStore();\n var {\n as,\n render\n } = Float,\n reset = _objectWithoutPropertiesLoose(Float, _excluded6);\n var Comp = as || 'span';\n var style = _extends({}, defalutStyle, Float.style || {});\n var isRender = render && typeof render === 'function';\n var type = isRender && render(_extends({}, reset, {\n style\n }), {\n type: 'type',\n value: children,\n keyName\n });\n var child = isRender && render(_extends({}, reset, {\n children,\n className: 'w-rjv-value'\n }), {\n type: 'value',\n value: children,\n keyName\n });\n return /*#__PURE__*/_jsxs(Fragment, {\n children: [displayDataTypes && (type || /*#__PURE__*/_jsx(Comp, _extends({}, reset, {\n style: style\n }))), child || /*#__PURE__*/_jsx(Comp, _extends({}, reset, {\n className: \"w-rjv-value\",\n children: children == null ? void 0 : children.toString()\n }))]\n });\n};\nTypeFloat.displayName = 'JVR.TypeFloat';\nexport var TypeInt = _ref7 => {\n var {\n children,\n keyName\n } = _ref7;\n var {\n Int = {},\n displayDataTypes\n } = useTypesStore();\n var {\n as,\n render\n } = Int,\n reset = _objectWithoutPropertiesLoose(Int, _excluded7);\n var Comp = as || 'span';\n var style = _extends({}, defalutStyle, Int.style || {});\n var isRender = render && typeof render === 'function';\n var type = isRender && render(_extends({}, reset, {\n style\n }), {\n type: 'type',\n value: children,\n keyName\n });\n var child = isRender && render(_extends({}, reset, {\n children,\n className: 'w-rjv-value'\n }), {\n type: 'value',\n value: children,\n keyName\n });\n return /*#__PURE__*/_jsxs(Fragment, {\n children: [displayDataTypes && (type || /*#__PURE__*/_jsx(Comp, _extends({}, reset, {\n style: style\n }))), child || /*#__PURE__*/_jsx(Comp, _extends({}, reset, {\n className: \"w-rjv-value\",\n children: children == null ? void 0 : children.toString()\n }))]\n });\n};\nTypeInt.displayName = 'JVR.TypeInt';\nexport var TypeBigint = _ref8 => {\n var {\n children,\n keyName\n } = _ref8;\n var {\n Bigint: CompBigint = {},\n displayDataTypes\n } = useTypesStore();\n var {\n as,\n render\n } = CompBigint,\n reset = _objectWithoutPropertiesLoose(CompBigint, _excluded8);\n var Comp = as || 'span';\n var style = _extends({}, defalutStyle, CompBigint.style || {});\n var isRender = render && typeof render === 'function';\n var type = isRender && render(_extends({}, reset, {\n style\n }), {\n type: 'type',\n value: children,\n keyName\n });\n var child = isRender && render(_extends({}, reset, {\n children,\n className: 'w-rjv-value'\n }), {\n type: 'value',\n value: children,\n keyName\n });\n return /*#__PURE__*/_jsxs(Fragment, {\n children: [displayDataTypes && (type || /*#__PURE__*/_jsx(Comp, _extends({}, reset, {\n style: style\n }))), child || /*#__PURE__*/_jsx(Comp, _extends({}, reset, {\n className: \"w-rjv-value\",\n children: bigIntToString(children == null ? void 0 : children.toString())\n }))]\n });\n};\nTypeBigint.displayName = 'JVR.TypeFloat';\nexport var TypeUrl = _ref9 => {\n var {\n children,\n keyName\n } = _ref9;\n var {\n Url = {},\n displayDataTypes\n } = useTypesStore();\n var {\n as,\n render\n } = Url,\n reset = _objectWithoutPropertiesLoose(Url, _excluded9);\n var Comp = as || 'span';\n var style = _extends({}, defalutStyle, Url.style);\n var isRender = render && typeof render === 'function';\n var type = isRender && render(_extends({}, reset, {\n style\n }), {\n type: 'type',\n value: children,\n keyName\n });\n var child = isRender && render(_extends({}, reset, {\n children: children == null ? void 0 : children.href,\n className: 'w-rjv-value'\n }), {\n type: 'value',\n value: children,\n keyName\n });\n return /*#__PURE__*/_jsxs(Fragment, {\n children: [displayDataTypes && (type || /*#__PURE__*/_jsx(Comp, _extends({}, reset, {\n style: style\n }))), child || /*#__PURE__*/_jsxs(\"a\", _extends({\n href: children == null ? void 0 : children.href,\n target: \"_blank\"\n }, reset, {\n className: \"w-rjv-value\",\n children: [/*#__PURE__*/_jsx(ValueQuote, {}), children == null ? void 0 : children.href, /*#__PURE__*/_jsx(ValueQuote, {})]\n }))]\n });\n};\nTypeUrl.displayName = 'JVR.TypeUrl';\nexport var TypeDate = _ref10 => {\n var {\n children,\n keyName\n } = _ref10;\n var {\n Date: CompData = {},\n displayDataTypes\n } = useTypesStore();\n var {\n as,\n render\n } = CompData,\n reset = _objectWithoutPropertiesLoose(CompData, _excluded10);\n var Comp = as || 'span';\n var style = _extends({}, defalutStyle, CompData.style || {});\n var isRender = render && typeof render === 'function';\n var type = isRender && render(_extends({}, reset, {\n style\n }), {\n type: 'type',\n value: children,\n keyName\n });\n var childStr = children instanceof Date ? children.toLocaleString() : children;\n var child = isRender && render(_extends({}, reset, {\n children: childStr,\n className: 'w-rjv-value'\n }), {\n type: 'value',\n value: children,\n keyName\n });\n return /*#__PURE__*/_jsxs(Fragment, {\n children: [displayDataTypes && (type || /*#__PURE__*/_jsx(Comp, _extends({}, reset, {\n style: style\n }))), child || /*#__PURE__*/_jsx(Comp, _extends({}, reset, {\n className: \"w-rjv-value\",\n children: childStr\n }))]\n });\n};\nTypeDate.displayName = 'JVR.TypeDate';\nexport var TypeUndefined = _ref11 => {\n var {\n children,\n keyName\n } = _ref11;\n var {\n Undefined = {},\n displayDataTypes\n } = useTypesStore();\n var {\n as,\n render\n } = Undefined,\n reset = _objectWithoutPropertiesLoose(Undefined, _excluded11);\n var Comp = as || 'span';\n var style = _extends({}, defalutStyle, Undefined.style || {});\n var isRender = render && typeof render === 'function';\n var type = isRender && render(_extends({}, reset, {\n style\n }), {\n type: 'type',\n value: children,\n keyName\n });\n var child = isRender && render(_extends({}, reset, {\n children,\n className: 'w-rjv-value'\n }), {\n type: 'value',\n value: children,\n keyName\n });\n return /*#__PURE__*/_jsxs(Fragment, {\n children: [displayDataTypes && (type || /*#__PURE__*/_jsx(Comp, _extends({}, reset, {\n style: style\n }))), child]\n });\n};\nTypeUndefined.displayName = 'JVR.TypeUndefined';\nexport var TypeNull = _ref12 => {\n var {\n children,\n keyName\n } = _ref12;\n var {\n Null = {},\n displayDataTypes\n } = useTypesStore();\n var {\n as,\n render\n } = Null,\n reset = _objectWithoutPropertiesLoose(Null, _excluded12);\n var Comp = as || 'span';\n var style = _extends({}, defalutStyle, Null.style || {});\n var isRender = render && typeof render === 'function';\n var type = isRender && render(_extends({}, reset, {\n style\n }), {\n type: 'type',\n value: children,\n keyName\n });\n var child = isRender && render(_extends({}, reset, {\n children,\n className: 'w-rjv-value'\n }), {\n type: 'value',\n value: children,\n keyName\n });\n return /*#__PURE__*/_jsxs(Fragment, {\n children: [displayDataTypes && (type || /*#__PURE__*/_jsx(Comp, _extends({}, reset, {\n style: style\n }))), child]\n });\n};\nTypeNull.displayName = 'JVR.TypeNull';\nexport var TypeNan = _ref13 => {\n var {\n children,\n keyName\n } = _ref13;\n var {\n Nan = {},\n displayDataTypes\n } = useTypesStore();\n var {\n as,\n render\n } = Nan,\n reset = _objectWithoutPropertiesLoose(Nan, _excluded13);\n var Comp = as || 'span';\n var style = _extends({}, defalutStyle, Nan.style || {});\n var isRender = render && typeof render === 'function';\n var type = isRender && render(_extends({}, reset, {\n style\n }), {\n type: 'type',\n value: children,\n keyName\n });\n var child = isRender && render(_extends({}, reset, {\n children: children == null ? void 0 : children.toString(),\n className: 'w-rjv-value'\n }), {\n type: 'value',\n value: children,\n keyName\n });\n return /*#__PURE__*/_jsxs(Fragment, {\n children: [displayDataTypes && (type || /*#__PURE__*/_jsx(Comp, _extends({}, reset, {\n style: style\n }))), child]\n });\n};\nTypeNan.displayName = 'JVR.TypeNan';","import _extends from \"@babel/runtime/helpers/extends\";\nimport { TypeString, TypeTrue, TypeNull, TypeFalse, TypeFloat, TypeBigint, TypeInt, TypeDate, TypeUndefined, TypeNan, TypeUrl } from '../types';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport var isFloat = n => Number(n) === n && n % 1 !== 0 || isNaN(n);\nexport var Value = props => {\n var {\n value,\n keyName\n } = props;\n var reset = {\n keyName\n };\n if (value instanceof URL) {\n return /*#__PURE__*/_jsx(TypeUrl, _extends({}, reset, {\n children: value\n }));\n }\n if (typeof value === 'string') {\n return /*#__PURE__*/_jsx(TypeString, _extends({}, reset, {\n children: value\n }));\n }\n if (value === true) {\n return /*#__PURE__*/_jsx(TypeTrue, _extends({}, reset, {\n children: value\n }));\n }\n if (value === false) {\n return /*#__PURE__*/_jsx(TypeFalse, _extends({}, reset, {\n children: value\n }));\n }\n if (value === null) {\n return /*#__PURE__*/_jsx(TypeNull, _extends({}, reset, {\n children: value\n }));\n }\n if (value === undefined) {\n return /*#__PURE__*/_jsx(TypeUndefined, _extends({}, reset, {\n children: value\n }));\n }\n if (value instanceof Date) {\n return /*#__PURE__*/_jsx(TypeDate, _extends({}, reset, {\n children: value\n }));\n }\n if (typeof value === 'number' && isNaN(value)) {\n return /*#__PURE__*/_jsx(TypeNan, _extends({}, reset, {\n children: value\n }));\n } else if (typeof value === 'number' && isFloat(value)) {\n return /*#__PURE__*/_jsx(TypeFloat, _extends({}, reset, {\n children: value\n }));\n } else if (typeof value === 'bigint') {\n return /*#__PURE__*/_jsx(TypeBigint, _extends({}, reset, {\n children: value\n }));\n } else if (typeof value === 'number') {\n return /*#__PURE__*/_jsx(TypeInt, _extends({}, reset, {\n children: value\n }));\n }\n return null;\n};\nValue.displayName = 'JVR.Value';","import _extends from \"@babel/runtime/helpers/extends\";\nimport { useEffect } from 'react';\nimport { useSymbolsDispatch } from '../store/Symbols';\nimport { useTypesDispatch } from '../store/Types';\nimport { useSectionDispatch } from '../store/Section';\nexport function useSymbolsRender(currentProps, props, key) {\n var dispatch = useSymbolsDispatch();\n var cls = [currentProps.className, props.className].filter(Boolean).join(' ');\n var reset = _extends({}, currentProps, props, {\n className: cls,\n style: _extends({}, currentProps.style, props.style),\n children: props.children || currentProps.children\n });\n useEffect(() => dispatch({\n [key]: reset\n }), [props]);\n}\nexport function useTypesRender(currentProps, props, key) {\n var dispatch = useTypesDispatch();\n var cls = [currentProps.className, props.className].filter(Boolean).join(' ');\n var reset = _extends({}, currentProps, props, {\n className: cls,\n style: _extends({}, currentProps.style, props.style),\n children: props.children || currentProps.children\n });\n useEffect(() => dispatch({\n [key]: reset\n }), [props]);\n}\nexport function useSectionRender(currentProps, props, key) {\n var dispatch = useSectionDispatch();\n var cls = [currentProps.className, props.className].filter(Boolean).join(' ');\n var reset = _extends({}, currentProps, props, {\n className: cls,\n style: _extends({}, currentProps.style, props.style),\n children: props.children || currentProps.children\n });\n useEffect(() => dispatch({\n [key]: reset\n }), [props]);\n}","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/objectWithoutPropertiesLoose\";\nvar _excluded = [\"as\", \"render\"];\nimport { useSectionStore } from '../store/Section';\nimport { useSectionRender } from '../utils/useRender';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport var KeyName = props => {\n var {\n KeyName: Comp = {}\n } = useSectionStore();\n useSectionRender(Comp, props, 'KeyName');\n return null;\n};\nKeyName.displayName = 'JVR.KeyName';\nexport var KeyNameComp = props => {\n var {\n children,\n value,\n parentValue,\n keyName,\n keys\n } = props;\n var isNumber = typeof children === 'number';\n var style = {\n color: isNumber ? 'var(--w-rjv-key-number, #268bd2)' : 'var(--w-rjv-key-string, #002b36)'\n };\n var {\n KeyName: Comp = {}\n } = useSectionStore();\n var {\n as,\n render\n } = Comp,\n reset = _objectWithoutPropertiesLoose(Comp, _excluded);\n reset.style = _extends({}, reset.style, style);\n var Elm = as || 'span';\n var child = render && typeof render === 'function' && render(_extends({}, reset, {\n children\n }), {\n value,\n parentValue,\n keyName,\n keys: keys || (keyName ? [keyName] : [])\n });\n if (child) return child;\n return /*#__PURE__*/_jsx(Elm, _extends({}, reset, {\n children: children\n }));\n};\nKeyNameComp.displayName = 'JVR.KeyNameComp';","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/objectWithoutPropertiesLoose\";\nvar _excluded = [\"children\", \"value\", \"parentValue\", \"keyName\", \"keys\"],\n _excluded2 = [\"as\", \"render\", \"children\"];\nimport { useSectionStore } from '../store/Section';\nimport { useSectionRender } from '../utils/useRender';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport var Row = props => {\n var {\n Row: Comp = {}\n } = useSectionStore();\n useSectionRender(Comp, props, 'Row');\n return null;\n};\nRow.displayName = 'JVR.Row';\nexport var RowComp = props => {\n var {\n children,\n value,\n parentValue,\n keyName,\n keys\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n var {\n Row: Comp = {}\n } = useSectionStore();\n var {\n as,\n render\n } = Comp,\n reset = _objectWithoutPropertiesLoose(Comp, _excluded2);\n var Elm = as || 'div';\n var child = render && typeof render === 'function' && render(_extends({}, other, reset, {\n children\n }), {\n value,\n keyName,\n parentValue,\n keys\n });\n if (child) return child;\n return /*#__PURE__*/_jsx(Elm, _extends({}, other, reset, {\n children: children\n }));\n};\nRowComp.displayName = 'JVR.RowComp';","import { useMemo, useRef, useEffect } from 'react';\nexport function usePrevious(value) {\n var ref = useRef();\n useEffect(() => {\n ref.current = value;\n });\n return ref.current;\n}\nexport function useHighlight(_ref) {\n var {\n value,\n highlightUpdates,\n highlightContainer\n } = _ref;\n var prevValue = usePrevious(value);\n var isHighlight = useMemo(() => {\n if (!highlightUpdates || prevValue === undefined) return false;\n // highlight if value type changed\n if (typeof value !== typeof prevValue) {\n return true;\n }\n if (typeof value === 'number') {\n // notice: NaN !== NaN\n if (isNaN(value) && isNaN(prevValue)) return false;\n return value !== prevValue;\n }\n // highlight if isArray changed\n if (Array.isArray(value) !== Array.isArray(prevValue)) {\n return true;\n }\n // not highlight object/function\n // deep compare they will be slow\n if (typeof value === 'object' || typeof value === 'function') {\n return false;\n }\n\n // highlight if not equal\n if (value !== prevValue) {\n return true;\n }\n }, [highlightUpdates, value]);\n useEffect(() => {\n if (highlightContainer && highlightContainer.current && isHighlight && 'animate' in highlightContainer.current) {\n highlightContainer.current.animate([{\n backgroundColor: 'var(--w-rjv-update-color, #ebcb8b)'\n }, {\n backgroundColor: ''\n }], {\n duration: 1000,\n easing: 'ease-in'\n });\n }\n }, [isHighlight, value, highlightContainer]);\n}","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/objectWithoutPropertiesLoose\";\nvar _excluded = [\"keyName\", \"value\", \"parentValue\", \"expandKey\", \"keys\"],\n _excluded2 = [\"as\", \"render\"];\nimport { useState } from 'react';\nimport { useStore } from '../store';\nimport { useSectionStore } from '../store/Section';\nimport { useShowToolsStore } from '../store/ShowTools';\nimport { bigIntToString } from '../types';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport var Copied = props => {\n var {\n keyName,\n value,\n parentValue,\n expandKey,\n keys\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n var {\n onCopied,\n enableClipboard\n } = useStore();\n var showTools = useShowToolsStore();\n var isShowTools = showTools[expandKey];\n var [copied, setCopied] = useState(false);\n var {\n Copied: Comp = {}\n } = useSectionStore();\n if (enableClipboard === false || !isShowTools) return null;\n var click = event => {\n event.stopPropagation();\n var copyText = '';\n if (typeof value === 'number' && value === Infinity) {\n copyText = 'Infinity';\n } else if (typeof value === 'number' && isNaN(value)) {\n copyText = 'NaN';\n } else if (typeof value === 'bigint') {\n copyText = bigIntToString(value);\n } else if (value instanceof Date) {\n copyText = value.toLocaleString();\n } else {\n copyText = JSON.stringify(value, (_, v) => typeof v === 'bigint' ? bigIntToString(v) : v, 2);\n }\n onCopied && onCopied(copyText, value);\n setCopied(true);\n var _clipboard = navigator.clipboard || {\n writeText(text) {\n return new Promise((reslove, reject) => {\n var textarea = document.createElement('textarea');\n textarea.style.position = 'absolute';\n textarea.style.opacity = '0';\n textarea.style.left = '-99999999px';\n textarea.value = text;\n document.body.appendChild(textarea);\n textarea.select();\n if (!document.execCommand('copy')) {\n reject();\n } else {\n reslove();\n }\n textarea.remove();\n });\n }\n };\n _clipboard.writeText(copyText).then(() => {\n var timer = setTimeout(() => {\n setCopied(false);\n clearTimeout(timer);\n }, 3000);\n }).catch(error => {});\n };\n var svgProps = {\n style: {\n display: 'inline-flex'\n },\n fill: copied ? 'var(--w-rjv-copied-success-color, #28a745)' : 'var(--w-rjv-copied-color, currentColor)',\n onClick: click\n };\n var {\n render\n } = Comp,\n reset = _objectWithoutPropertiesLoose(Comp, _excluded2);\n var elmProps = _extends({}, reset, other, svgProps, {\n style: _extends({}, reset.style, other.style, svgProps.style)\n });\n var isRender = render && typeof render === 'function';\n var child = isRender && render(_extends({}, elmProps, {\n 'data-copied': copied\n }), {\n value,\n keyName,\n keys,\n parentValue\n });\n if (child) return child;\n if (copied) {\n return /*#__PURE__*/_jsx(\"svg\", _extends({\n viewBox: \"0 0 32 36\"\n }, elmProps, {\n children: /*#__PURE__*/_jsx(\"path\", {\n d: \"M27.5,33 L2.5,33 L2.5,12.5 L27.5,12.5 L27.5,15.2249049 C29.1403264,13.8627542 29.9736597,13.1778155 30,13.1700887 C30,11.9705278 30,10.0804982 30,7.5 C30,6.1 28.9,5 27.5,5 L20,5 C20,2.2 17.8,0 15,0 C12.2,0 10,2.2 10,5 L2.5,5 C1.1,5 0,6.1 0,7.5 L0,33 C0,34.4 1.1,36 2.5,36 L27.5,36 C28.9,36 30,34.4 30,33 L30,26.1114493 L27.5,28.4926435 L27.5,33 Z M7.5,7.5 L10,7.5 C10,7.5 12.5,6.4 12.5,5 C12.5,3.6 13.6,2.5 15,2.5 C16.4,2.5 17.5,3.6 17.5,5 C17.5,6.4 18.8,7.5 20,7.5 L22.5,7.5 C22.5,7.5 25,8.6 25,10 L5,10 C5,8.5 6.1,7.5 7.5,7.5 Z M5,27.5 L10,27.5 L10,25 L5,25 L5,27.5 Z M28.5589286,16 L32,19.6 L21.0160714,30.5382252 L13.5303571,24.2571429 L17.1303571,20.6571429 L21.0160714,24.5428571 L28.5589286,16 Z M17.5,15 L5,15 L5,17.5 L17.5,17.5 L17.5,15 Z M10,20 L5,20 L5,22.5 L10,22.5 L10,20 Z\"\n })\n }));\n }\n return /*#__PURE__*/_jsx(\"svg\", _extends({\n viewBox: \"0 0 32 36\"\n }, elmProps, {\n children: /*#__PURE__*/_jsx(\"path\", {\n d: \"M27.5,33 L2.5,33 L2.5,12.5 L27.5,12.5 L27.5,20 L30,20 L30,7.5 C30,6.1 28.9,5 27.5,5 L20,5 C20,2.2 17.8,0 15,0 C12.2,0 10,2.2 10,5 L2.5,5 C1.1,5 0,6.1 0,7.5 L0,33 C0,34.4 1.1,36 2.5,36 L27.5,36 C28.9,36 30,34.4 30,33 L30,29 L27.5,29 L27.5,33 Z M7.5,7.5 L10,7.5 C10,7.5 12.5,6.4 12.5,5 C12.5,3.6 13.6,2.5 15,2.5 C16.4,2.5 17.5,3.6 17.5,5 C17.5,6.4 18.8,7.5 20,7.5 L22.5,7.5 C22.5,7.5 25,8.6 25,10 L5,10 C5,8.5 6.1,7.5 7.5,7.5 Z M5,27.5 L10,27.5 L10,25 L5,25 L5,27.5 Z M22.5,21.5 L22.5,16.5 L12.5,24 L22.5,31.5 L22.5,26.5 L32,26.5 L32,21.5 L22.5,21.5 Z M17.5,15 L5,15 L5,17.5 L17.5,17.5 L17.5,15 Z M10,20 L5,20 L5,22.5 L10,22.5 L10,20 Z\"\n })\n }));\n};\nCopied.displayName = 'JVR.Copied';","import { useRef } from 'react';\nexport function useIdCompat() {\n var idRef = useRef(null);\n if (idRef.current === null) {\n idRef.current = 'custom-id-' + Math.random().toString(36).substr(2, 9);\n }\n return idRef.current;\n}","import _extends from \"@babel/runtime/helpers/extends\";\nimport { Fragment, useRef } from 'react';\nimport { useStore } from '../store';\nimport { useExpandsStore } from '../store/Expands';\nimport { useShowToolsDispatch } from '../store/ShowTools';\nimport { Value } from './Value';\nimport { KeyNameComp } from '../section/KeyName';\nimport { RowComp } from '../section/Row';\nimport { Container } from '../Container';\nimport { Quote, Colon } from '../symbol';\nimport { useHighlight } from '../utils/useHighlight';\nimport { Copied } from '../comps/Copied';\nimport { useIdCompat } from '../comps/useIdCompat';\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nexport var KeyValues = props => {\n var _expands$expandKey;\n var {\n value,\n expandKey = '',\n level,\n keys = []\n } = props;\n var expands = useExpandsStore();\n var {\n objectSortKeys,\n indentWidth,\n collapsed\n } = useStore();\n var isMyArray = Array.isArray(value);\n var isExpanded = (_expands$expandKey = expands[expandKey]) != null ? _expands$expandKey : typeof collapsed === 'boolean' ? collapsed : typeof collapsed === 'number' ? level > collapsed : false;\n if (isExpanded) {\n return null;\n }\n // object\n var entries = isMyArray ? Object.entries(value).map(m => [Number(m[0]), m[1]]) : Object.entries(value);\n if (objectSortKeys) {\n entries = objectSortKeys === true ? entries.sort((_ref, _ref2) => {\n var [a] = _ref;\n var [b] = _ref2;\n return typeof a === 'string' && typeof b === 'string' ? a.localeCompare(b) : 0;\n }) : entries.sort((_ref3, _ref4) => {\n var [a, valA] = _ref3;\n var [b, valB] = _ref4;\n return typeof a === 'string' && typeof b === 'string' ? objectSortKeys(a, b, valA, valB) : 0;\n });\n }\n var style = {\n borderLeft: 'var(--w-rjv-border-left-width, 1px) var(--w-rjv-line-style, solid) var(--w-rjv-line-color, #ebebeb)',\n paddingLeft: indentWidth,\n marginLeft: 6\n };\n return /*#__PURE__*/_jsx(\"div\", {\n className: \"w-rjv-wrap\",\n style: style,\n children: entries.map((_ref5, idx) => {\n var [key, val] = _ref5;\n return /*#__PURE__*/_jsx(KeyValuesItem, {\n parentValue: value,\n keyName: key,\n keys: [...keys, key],\n value: val,\n level: level\n }, idx);\n })\n });\n};\nKeyValues.displayName = 'JVR.KeyValues';\nexport var KayName = props => {\n var {\n keyName,\n parentValue,\n keys,\n value\n } = props;\n var {\n highlightUpdates\n } = useStore();\n var isNumber = typeof keyName === 'number';\n var highlightContainer = useRef(null);\n useHighlight({\n value,\n highlightUpdates,\n highlightContainer\n });\n return /*#__PURE__*/_jsxs(Fragment, {\n children: [/*#__PURE__*/_jsxs(\"span\", {\n ref: highlightContainer,\n children: [/*#__PURE__*/_jsx(Quote, {\n isNumber: isNumber,\n \"data-placement\": \"left\"\n }), /*#__PURE__*/_jsx(KeyNameComp, {\n keyName: keyName,\n value: value,\n keys: keys,\n parentValue: parentValue,\n children: keyName\n }), /*#__PURE__*/_jsx(Quote, {\n isNumber: isNumber,\n \"data-placement\": \"right\"\n })]\n }), /*#__PURE__*/_jsx(Colon, {})]\n });\n};\nKayName.displayName = 'JVR.KayName';\nexport var KeyValuesItem = props => {\n var {\n keyName,\n value,\n parentValue,\n level = 0,\n keys = []\n } = props;\n var dispatch = useShowToolsDispatch();\n var subkeyid = useIdCompat();\n var isMyArray = Array.isArray(value);\n var isMySet = value instanceof Set;\n var isMyMap = value instanceof Map;\n var isDate = value instanceof Date;\n var isUrl = value instanceof URL;\n var isMyObject = value && typeof value === 'object' && !isMyArray && !isMySet && !isMyMap && !isDate && !isUrl;\n var isNested = isMyObject || isMyArray || isMySet || isMyMap;\n if (isNested) {\n var myValue = isMySet ? Array.from(value) : isMyMap ? Object.fromEntries(value) : value;\n return /*#__PURE__*/_jsx(Container, {\n keyName: keyName,\n value: myValue,\n parentValue: parentValue,\n initialValue: value,\n keys: keys,\n level: level + 1\n });\n }\n var reset = {\n onMouseEnter: () => dispatch({\n [subkeyid]: true\n }),\n onMouseLeave: () => dispatch({\n [subkeyid]: false\n })\n };\n return /*#__PURE__*/_jsxs(RowComp, _extends({\n className: \"w-rjv-line\",\n value: value,\n keyName: keyName,\n keys: keys,\n parentValue: parentValue\n }, reset, {\n children: [/*#__PURE__*/_jsx(KayName, {\n keyName: keyName,\n value: value,\n keys: keys,\n parentValue: parentValue\n }), /*#__PURE__*/_jsx(Value, {\n keyName: keyName,\n value: value\n }), /*#__PURE__*/_jsx(Copied, {\n keyName: keyName,\n value: value,\n keys: keys,\n parentValue: parentValue,\n expandKey: subkeyid\n })]\n }));\n};\nKeyValuesItem.displayName = 'JVR.KeyValuesItem';","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/objectWithoutPropertiesLoose\";\nvar _excluded = [\"value\", \"keyName\"],\n _excluded2 = [\"as\", \"render\"];\nimport { useSectionStore } from '../store/Section';\nimport { useSectionRender } from '../utils/useRender';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport var CountInfoExtra = props => {\n var {\n CountInfoExtra: Comp = {}\n } = useSectionStore();\n useSectionRender(Comp, props, 'CountInfoExtra');\n return null;\n};\nCountInfoExtra.displayName = 'JVR.CountInfoExtra';\nexport var CountInfoExtraComps = props => {\n var {\n value = {},\n keyName\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n var {\n CountInfoExtra: Comp = {}\n } = useSectionStore();\n var {\n as,\n render\n } = Comp,\n reset = _objectWithoutPropertiesLoose(Comp, _excluded2);\n if (!render && !reset.children) return null;\n var Elm = as || 'span';\n var isRender = render && typeof render === 'function';\n var elmProps = _extends({}, reset, other);\n var child = isRender && render(elmProps, {\n value,\n keyName\n });\n if (child) return child;\n return /*#__PURE__*/_jsx(Elm, _extends({}, elmProps));\n};\nCountInfoExtraComps.displayName = 'JVR.CountInfoExtraComps';","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/objectWithoutPropertiesLoose\";\nvar _excluded = [\"value\", \"keyName\"],\n _excluded2 = [\"as\", \"render\"];\nimport { useSectionStore } from '../store/Section';\nimport { useSectionRender } from '../utils/useRender';\nimport { useStore } from '../store';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport var CountInfo = props => {\n var {\n CountInfo: Comp = {}\n } = useSectionStore();\n useSectionRender(Comp, props, 'CountInfo');\n return null;\n};\nCountInfo.displayName = 'JVR.CountInfo';\nexport var CountInfoComp = props => {\n var {\n value = {},\n keyName\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n var {\n displayObjectSize\n } = useStore();\n var {\n CountInfo: Comp = {}\n } = useSectionStore();\n if (!displayObjectSize) return null;\n var {\n as,\n render\n } = Comp,\n reset = _objectWithoutPropertiesLoose(Comp, _excluded2);\n var Elm = as || 'span';\n reset.style = _extends({}, reset.style, props.style);\n var len = Object.keys(value).length;\n if (!reset.children) {\n reset.children = len + \" item\" + (len === 1 ? '' : 's');\n }\n var elmProps = _extends({}, reset, other);\n var isRender = render && typeof render === 'function';\n var child = isRender && render(_extends({}, elmProps, {\n 'data-length': len\n }), {\n value,\n keyName\n });\n if (child) return child;\n return /*#__PURE__*/_jsx(Elm, _extends({}, elmProps));\n};\nCountInfoComp.displayName = 'JVR.CountInfoComp';","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/objectWithoutPropertiesLoose\";\nvar _excluded = [\"as\", \"render\"];\nimport { useSectionStore } from '../store/Section';\nimport { useSectionRender } from '../utils/useRender';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport var Ellipsis = props => {\n var {\n Ellipsis: Comp = {}\n } = useSectionStore();\n useSectionRender(Comp, props, 'Ellipsis');\n return null;\n};\nEllipsis.displayName = 'JVR.Ellipsis';\nexport var EllipsisComp = _ref => {\n var {\n isExpanded,\n value,\n keyName\n } = _ref;\n var {\n Ellipsis: Comp = {}\n } = useSectionStore();\n var {\n as,\n render\n } = Comp,\n reset = _objectWithoutPropertiesLoose(Comp, _excluded);\n var Elm = as || 'span';\n var child = render && typeof render === 'function' && render(_extends({}, reset, {\n 'data-expanded': isExpanded\n }), {\n value,\n keyName\n });\n if (child) return child;\n if (!isExpanded || typeof value === 'object' && Object.keys(value).length == 0) return null;\n return /*#__PURE__*/_jsx(Elm, _extends({}, reset));\n};\nEllipsisComp.displayName = 'JVR.EllipsisComp';","import _extends from \"@babel/runtime/helpers/extends\";\nimport { KayName } from './KeyValues';\nimport { useExpandsStore, useExpandsDispatch } from '../store/Expands';\nimport { useStore } from '../store';\nimport { Copied } from './Copied';\nimport { CountInfoExtraComps } from '../section/CountInfoExtra';\nimport { CountInfoComp } from '../section/CountInfo';\nimport { Arrow, BracketsOpen, BracketsClose } from '../symbol';\nimport { EllipsisComp } from '../section/Ellipsis';\nimport { SetComp, MapComp } from '../types';\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nexport var NestedOpen = props => {\n var _expands$expandKey;\n var {\n keyName,\n expandKey,\n keys,\n initialValue,\n value,\n parentValue,\n level\n } = props;\n var expands = useExpandsStore();\n var dispatchExpands = useExpandsDispatch();\n var {\n onExpand,\n collapsed\n } = useStore();\n var isArray = Array.isArray(value);\n var isMySet = value instanceof Set;\n var isExpanded = (_expands$expandKey = expands[expandKey]) != null ? _expands$expandKey : typeof collapsed === 'boolean' ? collapsed : typeof collapsed === 'number' ? level > collapsed : false;\n var isObject = typeof value === 'object';\n var click = () => {\n var opt = {\n expand: !isExpanded,\n value,\n keyid: expandKey,\n keyName\n };\n onExpand && onExpand(opt);\n dispatchExpands({\n [expandKey]: opt.expand\n });\n };\n var style = {\n display: 'inline-flex',\n alignItems: 'center'\n };\n var arrowStyle = {\n transform: \"rotate(\" + (!isExpanded ? '0' : '-90') + \"deg)\",\n transition: 'all 0.3s'\n };\n var len = Object.keys(value).length;\n var showArrow = len !== 0 && (isArray || isMySet || isObject);\n var reset = {\n style\n };\n if (showArrow) {\n reset.onClick = click;\n }\n return /*#__PURE__*/_jsxs(\"span\", _extends({}, reset, {\n children: [showArrow && /*#__PURE__*/_jsx(Arrow, {\n style: arrowStyle,\n expandKey: expandKey\n }), (keyName || typeof keyName === 'number') && /*#__PURE__*/_jsx(KayName, {\n keyName: keyName\n }), /*#__PURE__*/_jsx(SetComp, {\n value: initialValue,\n keyName: keyName\n }), /*#__PURE__*/_jsx(MapComp, {\n value: initialValue,\n keyName: keyName\n }), /*#__PURE__*/_jsx(BracketsOpen, {\n isBrackets: isArray || isMySet\n }), /*#__PURE__*/_jsx(EllipsisComp, {\n keyName: keyName,\n value: value,\n isExpanded: isExpanded\n }), /*#__PURE__*/_jsx(BracketsClose, {\n isVisiable: isExpanded || !showArrow,\n isBrackets: isArray || isMySet\n }), /*#__PURE__*/_jsx(CountInfoComp, {\n value: value,\n keyName: keyName\n }), /*#__PURE__*/_jsx(CountInfoExtraComps, {\n value: value,\n keyName: keyName\n }), /*#__PURE__*/_jsx(Copied, {\n keyName: keyName,\n value: value,\n expandKey: expandKey,\n parentValue: parentValue,\n keys: keys\n })]\n }));\n};\nNestedOpen.displayName = 'JVR.NestedOpen';","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/objectWithoutPropertiesLoose\";\nvar _excluded = [\"className\", \"children\", \"parentValue\", \"keyid\", \"level\", \"value\", \"initialValue\", \"keys\", \"keyName\"];\nimport React, { forwardRef } from 'react';\nimport { NestedClose } from './comps/NestedClose';\nimport { NestedOpen } from './comps/NestedOpen';\nimport { KeyValues } from './comps/KeyValues';\nimport { useIdCompat } from './comps/useIdCompat';\nimport { useShowToolsDispatch } from './store/ShowTools';\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nexport var Container = /*#__PURE__*/forwardRef((props, ref) => {\n var {\n className = '',\n parentValue,\n level = 1,\n value,\n initialValue,\n keys,\n keyName\n } = props,\n elmProps = _objectWithoutPropertiesLoose(props, _excluded);\n var dispatch = useShowToolsDispatch();\n var subkeyid = useIdCompat();\n var defaultClassNames = [className, 'w-rjv-inner'].filter(Boolean).join(' ');\n var reset = {\n onMouseEnter: () => dispatch({\n [subkeyid]: true\n }),\n onMouseLeave: () => dispatch({\n [subkeyid]: false\n })\n };\n return /*#__PURE__*/_jsxs(\"div\", _extends({\n className: defaultClassNames,\n ref: ref\n }, elmProps, reset, {\n children: [/*#__PURE__*/_jsx(NestedOpen, {\n expandKey: subkeyid,\n value: value,\n level: level,\n keys: keys,\n parentValue: parentValue,\n keyName: keyName,\n initialValue: initialValue\n }), /*#__PURE__*/_jsx(KeyValues, {\n expandKey: subkeyid,\n value: value,\n level: level,\n keys: keys,\n parentValue: parentValue,\n keyName: keyName\n }), /*#__PURE__*/_jsx(NestedClose, {\n expandKey: subkeyid,\n value: value,\n level: level\n })]\n }));\n});\nContainer.displayName = 'JVR.Container';","import { useSymbolsStore } from '../store/Symbols';\nimport { useSymbolsRender } from '../utils/useRender';\nexport var BraceLeft = props => {\n var {\n BraceLeft: Comp = {}\n } = useSymbolsStore();\n useSymbolsRender(Comp, props, 'BraceLeft');\n return null;\n};\nBraceLeft.displayName = 'JVR.BraceLeft';","import { useSymbolsStore } from '../store/Symbols';\nimport { useSymbolsRender } from '../utils/useRender';\nexport var BraceRight = props => {\n var {\n BraceRight: Comp = {}\n } = useSymbolsStore();\n useSymbolsRender(Comp, props, 'BraceRight');\n return null;\n};\nBraceRight.displayName = 'JVR.BraceRight';","import { useSymbolsStore } from '../store/Symbols';\nimport { useSymbolsRender } from '../utils/useRender';\nexport var BracketsLeft = props => {\n var {\n BracketsLeft: Comp = {}\n } = useSymbolsStore();\n useSymbolsRender(Comp, props, 'BracketsLeft');\n return null;\n};\nBracketsLeft.displayName = 'JVR.BracketsLeft';","import { useSymbolsStore } from '../store/Symbols';\nimport { useSymbolsRender } from '../utils/useRender';\nexport var BracketsRight = props => {\n var {\n BracketsRight: Comp = {}\n } = useSymbolsStore();\n useSymbolsRender(Comp, props, 'BracketsRight');\n return null;\n};\nBracketsRight.displayName = 'JVR.BracketsRight';","import { useSymbolsStore } from '../store/Symbols';\nimport { useSymbolsRender } from '../utils/useRender';\nexport var Arrow = props => {\n var {\n Arrow: Comp = {}\n } = useSymbolsStore();\n useSymbolsRender(Comp, props, 'Arrow');\n return null;\n};\nArrow.displayName = 'JVR.Arrow';","import { useSymbolsStore } from '../store/Symbols';\nimport { useSymbolsRender } from '../utils/useRender';\nexport var Colon = props => {\n var {\n Colon: Comp = {}\n } = useSymbolsStore();\n useSymbolsRender(Comp, props, 'Colon');\n return null;\n};\nColon.displayName = 'JVR.Colon';","import { useSymbolsStore } from '../store/Symbols';\nimport { useSymbolsRender } from '../utils/useRender';\nexport var Quote = props => {\n var {\n Quote: Comp = {}\n } = useSymbolsStore();\n useSymbolsRender(Comp, props, 'Quote');\n return null;\n};\nQuote.displayName = 'JVR.Quote';","import { useSymbolsStore } from '../store/Symbols';\nimport { useSymbolsRender } from '../utils/useRender';\nexport var ValueQuote = props => {\n var {\n ValueQuote: Comp = {}\n } = useSymbolsStore();\n useSymbolsRender(Comp, props, 'ValueQuote');\n return null;\n};\nValueQuote.displayName = 'JVR.ValueQuote';","import { useTypesStore } from '../store/Types';\nimport { useTypesRender } from '../utils/useRender';\nexport var Bigint = props => {\n var {\n Bigint: Comp = {}\n } = useTypesStore();\n useTypesRender(Comp, props, 'Bigint');\n return null;\n};\nBigint.displayName = 'JVR.Bigint';","import { useTypesStore } from '../store/Types';\nimport { useTypesRender } from '../utils/useRender';\nexport var Date = props => {\n var {\n Date: Comp = {}\n } = useTypesStore();\n useTypesRender(Comp, props, 'Date');\n return null;\n};\nDate.displayName = 'JVR.Date';","import { useTypesStore } from '../store/Types';\nimport { useTypesRender } from '../utils/useRender';\nexport var False = props => {\n var {\n False: Comp = {}\n } = useTypesStore();\n useTypesRender(Comp, props, 'False');\n return null;\n};\nFalse.displayName = 'JVR.False';","import { useTypesStore } from '../store/Types';\nimport { useTypesRender } from '../utils/useRender';\nexport var Float = props => {\n var {\n Float: Comp = {}\n } = useTypesStore();\n useTypesRender(Comp, props, 'Float');\n return null;\n};\nFloat.displayName = 'JVR.Float';","import { useTypesStore } from '../store/Types';\nimport { useTypesRender } from '../utils/useRender';\nexport var Int = props => {\n var {\n Int: Comp = {}\n } = useTypesStore();\n useTypesRender(Comp, props, 'Int');\n return null;\n};\nInt.displayName = 'JVR.Int';","import { useTypesStore } from '../store/Types';\nimport { useTypesRender } from '../utils/useRender';\nexport var Map = props => {\n var {\n Map: Comp = {}\n } = useTypesStore();\n useTypesRender(Comp, props, 'Map');\n return null;\n};\nMap.displayName = 'JVR.Map';","import { useTypesStore } from '../store/Types';\nimport { useTypesRender } from '../utils/useRender';\nexport var Nan = props => {\n var {\n Nan: Comp = {}\n } = useTypesStore();\n useTypesRender(Comp, props, 'Nan');\n return null;\n};\nNan.displayName = 'JVR.Nan';","import { useTypesStore } from '../store/Types';\nimport { useTypesRender } from '../utils/useRender';\nexport var Null = props => {\n var {\n Null: Comp = {}\n } = useTypesStore();\n useTypesRender(Comp, props, 'Null');\n return null;\n};\nNull.displayName = 'JVR.Null';","import { useTypesStore } from '../store/Types';\nimport { useTypesRender } from '../utils/useRender';\nexport var Set = props => {\n var {\n Set: Comp = {}\n } = useTypesStore();\n useTypesRender(Comp, props, 'Set');\n return null;\n};\nSet.displayName = 'JVR.Set';","import { useTypesStore } from '../store/Types';\nimport { useTypesRender } from '../utils/useRender';\nexport var StringText = props => {\n var {\n Str: Comp = {}\n } = useTypesStore();\n useTypesRender(Comp, props, 'Str');\n return null;\n};\nStringText.displayName = 'JVR.StringText';","import { useTypesStore } from '../store/Types';\nimport { useTypesRender } from '../utils/useRender';\nexport var True = props => {\n var {\n True: Comp = {}\n } = useTypesStore();\n useTypesRender(Comp, props, 'True');\n return null;\n};\nTrue.displayName = 'JVR.True';","import { useTypesStore } from '../store/Types';\nimport { useTypesRender } from '../utils/useRender';\nexport var Undefined = props => {\n var {\n Undefined: Comp = {}\n } = useTypesStore();\n useTypesRender(Comp, props, 'Undefined');\n return null;\n};\nUndefined.displayName = 'JVR.Undefined';","import { useTypesStore } from '../store/Types';\nimport { useTypesRender } from '../utils/useRender';\nexport var Url = props => {\n var {\n Url: Comp = {}\n } = useTypesStore();\n useTypesRender(Comp, props, 'Url');\n return null;\n};\nUrl.displayName = 'JVR.Url';","import { useSectionStore } from '../store/Section';\nimport { useSectionRender } from '../utils/useRender';\nexport var Copied = props => {\n var {\n Copied: Comp = {}\n } = useSectionStore();\n useSectionRender(Comp, props, 'Copied');\n return null;\n};\nCopied.displayName = 'JVR.Copied';","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/objectWithoutPropertiesLoose\";\nvar _excluded = [\"className\", \"style\", \"value\", \"children\", \"collapsed\", \"indentWidth\", \"displayObjectSize\", \"shortenTextAfterLength\", \"highlightUpdates\", \"enableClipboard\", \"displayDataTypes\", \"objectSortKeys\", \"onExpand\", \"onCopied\"];\nimport { forwardRef } from 'react';\nimport { Provider } from './store';\nimport { Container } from './Container';\nimport { BraceLeft } from './symbol/BraceLeft';\nimport { BraceRight } from './symbol/BraceRight';\nimport { BracketsLeft } from './symbol/BracketsLeft';\nimport { BracketsRight } from './symbol/BracketsRight';\nimport { Arrow } from './symbol/Arrow';\nimport { Colon } from './symbol/Colon';\nimport { Quote } from './symbol/Quote';\nimport { ValueQuote } from './symbol/ValueQuote';\nimport { Bigint } from './types/Bigint';\nimport { Date } from './types/Date';\nimport { False } from './types/False';\nimport { Float } from './types/Float';\nimport { Int } from './types/Int';\nimport { Map } from './types/Map';\nimport { Nan } from './types/Nan';\nimport { Null } from './types/Null';\nimport { Set } from './types/Set';\nimport { StringText } from './types/String';\nimport { True } from './types/True';\nimport { Undefined } from './types/Undefined';\nimport { Url } from './types/Url';\nimport { Copied } from './section/Copied';\nimport { CountInfo } from './section/CountInfo';\nimport { CountInfoExtra } from './section/CountInfoExtra';\nimport { Ellipsis } from './section/Ellipsis';\nimport { KeyName } from './section/KeyName';\nimport { Row } from './section/Row';\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nexport * from './store';\nexport * from './store/Expands';\nexport * from './store/ShowTools';\nexport * from './store/Symbols';\nexport * from './store/Types';\nexport * from './symbol';\nvar JsonView = /*#__PURE__*/forwardRef((props, ref) => {\n var {\n className = '',\n style,\n value,\n children,\n collapsed,\n indentWidth = 15,\n displayObjectSize = true,\n shortenTextAfterLength = 30,\n highlightUpdates = true,\n enableClipboard = true,\n displayDataTypes = true,\n objectSortKeys = false,\n onExpand,\n onCopied\n } = props,\n elmProps = _objectWithoutPropertiesLoose(props, _excluded);\n var defaultStyle = _extends({\n lineHeight: 1.4,\n fontFamily: 'var(--w-rjv-font-family, Menlo, monospace)',\n color: 'var(--w-rjv-color, #002b36)',\n backgroundColor: 'var(--w-rjv-background-color, #00000000)',\n fontSize: 13\n }, style);\n var cls = ['w-json-view-container', 'w-rjv', className].filter(Boolean).join(' ');\n return /*#__PURE__*/_jsxs(Provider, {\n initialState: {\n value,\n objectSortKeys,\n indentWidth,\n displayObjectSize,\n collapsed,\n enableClipboard,\n shortenTextAfterLength,\n highlightUpdates,\n onCopied,\n onExpand\n },\n initialTypes: {\n displayDataTypes\n },\n children: [/*#__PURE__*/_jsx(Container, _extends({\n value: value\n }, elmProps, {\n ref: ref,\n className: cls,\n style: defaultStyle\n })), children]\n });\n});\nJsonView.Bigint = Bigint;\nJsonView.Date = Date;\nJsonView.False = False;\nJsonView.Float = Float;\nJsonView.Int = Int;\nJsonView.Map = Map;\nJsonView.Nan = Nan;\nJsonView.Null = Null;\nJsonView.Set = Set;\nJsonView.String = StringText;\nJsonView.True = True;\nJsonView.Undefined = Undefined;\nJsonView.Url = Url;\nJsonView.ValueQuote = ValueQuote;\nJsonView.Arrow = Arrow;\nJsonView.Colon = Colon;\nJsonView.Quote = Quote;\nJsonView.Ellipsis = Ellipsis;\nJsonView.BraceLeft = BraceLeft;\nJsonView.BraceRight = BraceRight;\nJsonView.BracketsLeft = BracketsLeft;\nJsonView.BracketsRight = BracketsRight;\nJsonView.Copied = Copied;\nJsonView.CountInfo = CountInfo;\nJsonView.CountInfoExtra = CountInfoExtra;\nJsonView.KeyName = KeyName;\nJsonView.Row = Row;\nJsonView.displayName = 'JVR.JsonView';\nexport default JsonView;","import { Fragment, useState, useReducer, useEffect } from 'react';\nimport JsonView, { JsonViewProps } from '@uiw/react-json-view';\nimport { styled } from 'styled-components';\nimport { lightTheme } from '@uiw/react-json-view/light';\nimport { darkTheme } from '@uiw/react-json-view/dark';\nimport { nordTheme } from '@uiw/react-json-view/nord';\nimport { githubLightTheme } from '@uiw/react-json-view/githubLight';\nimport { githubDarkTheme } from '@uiw/react-json-view/githubDark';\nimport { vscodeTheme } from '@uiw/react-json-view/vscode';\nimport { gruvboxTheme } from '@uiw/react-json-view/gruvbox';\nimport { monokaiTheme } from '@uiw/react-json-view/monokai';\nimport { basicTheme } from '@uiw/react-json-view/basic';\n\nexport const themesData = {\n nord: nordTheme,\n light: lightTheme,\n dark: darkTheme,\n basic: basicTheme,\n vscode: vscodeTheme,\n githubLight: githubLightTheme,\n githubDark: githubDarkTheme,\n gruvbox: gruvboxTheme,\n monokai: monokaiTheme,\n};\nconst mySet = new Set();\nmySet.add(1); // Set(1) { 1 }\nmySet.add(5); // Set(2) { 1, 5 }\nmySet.add(5); // Set(2) { 1, 5 }\nmySet.add('some text'); // Set(3) { 1, 5, 'some text' }\n\nconst myMap = new Map();\nmyMap.set('www', 'foo');\nmyMap.set(1, 'bar');\n\nconst avatar = 'https://i.imgur.com/1bX5QH6.jpg';\n// const longArray = new Array(1000).fill(1);\nfunction aPlusB(a: number, b: number) {\n return a + b;\n}\nexport const example = {\n avatar,\n string: 'Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet Lorem ipsum dolor sit amet',\n integer: 42,\n float: 114.514,\n bigint: BigInt(10086),\n nan: NaN,\n null: null,\n undefined,\n boolean: true,\n timer: 0,\n date: new Date('Tue Sep 13 2022 14:07:44 GMT-0500 (Central Daylight Time)'),\n array: [19, 100.86, 'test', NaN, Infinity],\n emptyArray: [],\n nestedArray: [[1, 2], [3, 4], { a: 1 }],\n object3: {},\n object2: {\n 'first-child': true,\n 'second-child': false,\n 'last-child': null,\n },\n url: new URL('https://wangchujiang.com/'),\n fn: aPlusB,\n // // longArray,\n string_number: '1234',\n string_empty: '',\n mySet,\n myMap,\n};\n\nconst Label = styled.label`\n margin-top: 0.83rem;\n display: block;\n span {\n padding-right: 6px;\n }\n`;\n\nconst Options = styled.div`\n display: grid;\n grid-template-columns: 50% 60%;\n`;\n\nconst initialState: Partial<\n JsonViewProps & {\n quote: string;\n theme: keyof typeof themesData;\n }\n> = {\n displayObjectSize: true,\n displayDataTypes: true,\n enableClipboard: true,\n highlightUpdates: true,\n objectSortKeys: false,\n indentWidth: 15,\n collapsed: 2,\n quote: '\"',\n shortenTextAfterLength: 50,\n theme: 'nord',\n};\n\nconst reducer = (state: typeof initialState, action: typeof initialState) => ({ ...state, ...action });\n\nexport function Example() {\n const [state, dispatch] = useReducer(reducer, initialState);\n const [src, setSrc] = useState({ ...example });\n const themeKeys = Object.keys(themesData) as Array;\n\n useEffect(() => {\n const loop = () => {\n setSrc((src) => ({\n ...src,\n timer: src.timer + 1,\n }));\n };\n const id = setInterval(loop, 1000);\n return () => clearInterval(id);\n }, []);\n\n return (\n \n \n {\n if (keyName === 'integer' && typeof value === 'number' && value > 10) {\n return {keyName};\n }\n }}\n />\n {state.quote}\n {\n if (!state.quote?.trim()) return ;\n return {state.quote};\n }}\n />\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n );\n}\n","export var nordTheme = {\n '--w-rjv-font-family': 'monospace',\n '--w-rjv-color': '#88c0d0',\n '--w-rjv-key-string': '#88c0d0',\n '--w-rjv-background-color': '#2e3440',\n '--w-rjv-line-color': '#4c566a',\n '--w-rjv-arrow-color': 'var(--w-rjv-color)',\n '--w-rjv-edit-color': 'var(--w-rjv-color)',\n '--w-rjv-info-color': '#c7c7c74d',\n '--w-rjv-update-color': '#88c0cf75',\n '--w-rjv-copied-color': '#119cc0',\n '--w-rjv-copied-success-color': '#28a745',\n '--w-rjv-curlybraces-color': '#8fbcbb',\n '--w-rjv-colon-color': '#6d9fac',\n '--w-rjv-brackets-color': '#8fbcbb',\n '--w-rjv-quotes-color': 'var(--w-rjv-key-string)',\n '--w-rjv-quotes-string-color': 'var(--w-rjv-type-string-color)',\n '--w-rjv-type-string-color': '#a3be8c',\n '--w-rjv-type-int-color': '#b48ead',\n '--w-rjv-type-float-color': '#859900',\n '--w-rjv-type-bigint-color': '#b48ead',\n '--w-rjv-type-boolean-color': '#d08770',\n '--w-rjv-type-date-color': '#41a2c2',\n '--w-rjv-type-url-color': '#5e81ac',\n '--w-rjv-type-null-color': '#5e81ac',\n '--w-rjv-type-nan-color': '#859900',\n '--w-rjv-type-undefined-color': '#586e75'\n};","export var lightTheme = {\n '--w-rjv-font-family': 'monospace',\n '--w-rjv-color': '#002b36',\n '--w-rjv-key-string': '#002b36',\n '--w-rjv-background-color': '#ffffff',\n '--w-rjv-line-color': '#ebebeb',\n '--w-rjv-arrow-color': 'var(--w-rjv-color)',\n '--w-rjv-edit-color': 'var(--w-rjv-color)',\n '--w-rjv-info-color': '#0000004d',\n '--w-rjv-update-color': '#ebcb8b',\n '--w-rjv-copied-color': '#002b36',\n '--w-rjv-copied-success-color': '#28a745',\n '--w-rjv-curlybraces-color': '#236a7c',\n '--w-rjv-colon-color': '#002b36',\n '--w-rjv-brackets-color': '#236a7c',\n '--w-rjv-quotes-color': 'var(--w-rjv-key-string)',\n '--w-rjv-quotes-string-color': 'var(--w-rjv-type-string-color)',\n '--w-rjv-type-string-color': '#cb4b16',\n '--w-rjv-type-int-color': '#268bd2',\n '--w-rjv-type-float-color': '#859900',\n '--w-rjv-type-bigint-color': '#268bd2',\n '--w-rjv-type-boolean-color': '#2aa198',\n '--w-rjv-type-date-color': '#586e75',\n '--w-rjv-type-url-color': '#0969da',\n '--w-rjv-type-null-color': '#d33682',\n '--w-rjv-type-nan-color': '#859900',\n '--w-rjv-type-undefined-color': '#586e75'\n};","export var darkTheme = {\n '--w-rjv-font-family': 'monospace',\n '--w-rjv-color': '#0184a6',\n '--w-rjv-key-string': '#0184a6',\n '--w-rjv-background-color': '#202020',\n '--w-rjv-line-color': '#323232',\n '--w-rjv-arrow-color': 'var(--w-rjv-color)',\n '--w-rjv-edit-color': 'var(--w-rjv-color)',\n '--w-rjv-info-color': '#656565',\n '--w-rjv-update-color': '#ebcb8b',\n '--w-rjv-copied-color': '#0184a6',\n '--w-rjv-copied-success-color': '#28a745',\n '--w-rjv-curlybraces-color': '#1896b6',\n '--w-rjv-brackets-color': '#1896b6',\n '--w-rjv-quotes-color': 'var(--w-rjv-key-string)',\n '--w-rjv-quotes-string-color': 'var(--w-rjv-type-string-color)',\n '--w-rjv-type-string-color': '#cb4b16',\n '--w-rjv-type-int-color': '#268bd2',\n '--w-rjv-type-float-color': '#859900',\n '--w-rjv-type-bigint-color': '#268bd2',\n '--w-rjv-type-boolean-color': '#2aa198',\n '--w-rjv-type-date-color': '#586e75',\n '--w-rjv-type-url-color': '#649bd8',\n '--w-rjv-type-null-color': '#d33682',\n '--w-rjv-type-nan-color': '#076678',\n '--w-rjv-type-undefined-color': '#586e75'\n};","export var basicTheme = {\n '--w-rjv-font-family': 'monospace',\n '--w-rjv-color': '#b5bd68',\n '--w-rjv-key-number': '#002b36',\n '--w-rjv-key-string': '#b5bd68',\n '--w-rjv-background-color': '#2E3235',\n '--w-rjv-line-color': '#292d30',\n '--w-rjv-arrow-color': 'var(--w-rjv-color)',\n '--w-rjv-edit-color': 'var(--w-rjv-color)',\n '--w-rjv-info-color': '#d8d8d84d',\n '--w-rjv-update-color': '#b5bd68',\n '--w-rjv-copied-color': '#b5bd68',\n '--w-rjv-copied-success-color': '#28a745',\n '--w-rjv-curlybraces-color': '#cc99cc',\n '--w-rjv-colon-color': '#bababa',\n '--w-rjv-brackets-color': '#808080',\n '--w-rjv-ellipsis-color': '#cb4b16',\n '--w-rjv-quotes-color': 'var(--w-rjv-key-string)',\n '--w-rjv-quotes-string-color': 'var(--w-rjv-type-string-color)',\n '--w-rjv-type-string-color': '#b5bd68',\n '--w-rjv-type-int-color': '#fda331',\n '--w-rjv-type-float-color': '#fda331',\n '--w-rjv-type-bigint-color': '#fda331',\n '--w-rjv-type-boolean-color': '#fda331',\n '--w-rjv-type-date-color': '#8abeb7',\n '--w-rjv-type-url-color': '#5a89c0',\n '--w-rjv-type-null-color': '#8abeb7',\n '--w-rjv-type-nan-color': '#8abeb7',\n '--w-rjv-type-undefined-color': '#8abeb7'\n};","export var vscodeTheme = {\n '--w-rjv-font-family': 'monospace',\n '--w-rjv-color': '#9cdcfe',\n '--w-rjv-key-string': '#9cdcfe',\n '--w-rjv-background-color': '#1e1e1e',\n '--w-rjv-line-color': '#36334280',\n '--w-rjv-arrow-color': '#838383',\n '--w-rjv-edit-color': 'var(--w-rjv-color)',\n '--w-rjv-info-color': '#9c9c9c7a',\n '--w-rjv-update-color': '#9cdcfe',\n '--w-rjv-copied-color': '#9cdcfe',\n '--w-rjv-copied-success-color': '#28a745',\n '--w-rjv-curlybraces-color': '#d4d4d4',\n '--w-rjv-colon-color': '#d4d4d4',\n '--w-rjv-brackets-color': '#d4d4d4',\n '--w-rjv-quotes-color': 'var(--w-rjv-key-string)',\n '--w-rjv-quotes-string-color': 'var(--w-rjv-type-string-color)',\n '--w-rjv-type-string-color': '#ce9178',\n '--w-rjv-type-int-color': '#b5cea8',\n '--w-rjv-type-float-color': '#b5cea8',\n '--w-rjv-type-bigint-color': '#b5cea8',\n '--w-rjv-type-boolean-color': '#569cd6',\n '--w-rjv-type-date-color': '#b5cea8',\n '--w-rjv-type-url-color': '#3b89cf',\n '--w-rjv-type-null-color': '#569cd6',\n '--w-rjv-type-nan-color': '#859900',\n '--w-rjv-type-undefined-color': '#569cd6'\n};","export var githubLightTheme = {\n '--w-rjv-font-family': 'monospace',\n '--w-rjv-color': '#6f42c1',\n '--w-rjv-key-string': '#6f42c1',\n '--w-rjv-background-color': '#ffffff',\n '--w-rjv-line-color': '#ddd',\n '--w-rjv-arrow-color': '#6e7781',\n '--w-rjv-edit-color': 'var(--w-rjv-color)',\n '--w-rjv-info-color': '#0000004d',\n '--w-rjv-update-color': '#ebcb8b',\n '--w-rjv-copied-color': '#002b36',\n '--w-rjv-copied-success-color': '#28a745',\n '--w-rjv-curlybraces-color': '#6a737d',\n '--w-rjv-colon-color': '#24292e',\n '--w-rjv-brackets-color': '#6a737d',\n '--w-rjv-quotes-color': 'var(--w-rjv-key-string)',\n '--w-rjv-quotes-string-color': 'var(--w-rjv-type-string-color)',\n '--w-rjv-type-string-color': '#032f62',\n '--w-rjv-type-int-color': '#005cc5',\n '--w-rjv-type-float-color': '#005cc5',\n '--w-rjv-type-bigint-color': '#005cc5',\n '--w-rjv-type-boolean-color': '#d73a49',\n '--w-rjv-type-date-color': '#005cc5',\n '--w-rjv-type-url-color': '#0969da',\n '--w-rjv-type-null-color': '#d73a49',\n '--w-rjv-type-nan-color': '#859900',\n '--w-rjv-type-undefined-color': '#005cc5'\n};","export var githubDarkTheme = {\n '--w-rjv-font-family': 'monospace',\n '--w-rjv-color': '#79c0ff',\n '--w-rjv-key-string': '#79c0ff',\n '--w-rjv-background-color': '#0d1117',\n '--w-rjv-line-color': '#94949480',\n '--w-rjv-arrow-color': '#ccc',\n '--w-rjv-edit-color': 'var(--w-rjv-color)',\n '--w-rjv-info-color': '#7b7b7b',\n '--w-rjv-update-color': '#ebcb8b',\n '--w-rjv-copied-color': '#79c0ff',\n '--w-rjv-copied-success-color': '#28a745',\n '--w-rjv-curlybraces-color': '#8b949e',\n '--w-rjv-colon-color': '#c9d1d9',\n '--w-rjv-brackets-color': '#8b949e',\n '--w-rjv-quotes-color': 'var(--w-rjv-key-string)',\n '--w-rjv-quotes-string-color': 'var(--w-rjv-type-string-color)',\n '--w-rjv-type-string-color': '#a5d6ff',\n '--w-rjv-type-int-color': '#79c0ff',\n '--w-rjv-type-float-color': '#79c0ff',\n '--w-rjv-type-bigint-color': '#79c0ff',\n '--w-rjv-type-boolean-color': '#ffab70',\n '--w-rjv-type-date-color': '#79c0ff',\n '--w-rjv-type-url-color': '#4facff',\n '--w-rjv-type-null-color': '#ff7b72',\n '--w-rjv-type-nan-color': '#859900',\n '--w-rjv-type-undefined-color': '#79c0ff'\n};","export var gruvboxTheme = {\n '--w-rjv-font-family': 'monospace',\n '--w-rjv-color': '#3c3836',\n '--w-rjv-key-string': '#3c3836',\n '--w-rjv-background-color': '#fbf1c7',\n '--w-rjv-line-color': '#ebdbb2',\n '--w-rjv-arrow-color': 'var(--w-rjv-color)',\n '--w-rjv-edit-color': 'var(--w-rjv-color)',\n '--w-rjv-info-color': '#0000004d',\n '--w-rjv-update-color': '#ebcb8b',\n '--w-rjv-copied-color': '#002b36',\n '--w-rjv-copied-success-color': '#28a745',\n '--w-rjv-curlybraces-color': '#236a7c',\n '--w-rjv-colon-color': '#002b36',\n '--w-rjv-brackets-color': '#236a7c',\n '--w-rjv-quotes-color': 'var(--w-rjv-key-string)',\n '--w-rjv-quotes-string-color': 'var(--w-rjv-type-string-color)',\n '--w-rjv-type-string-color': '#3c3836',\n '--w-rjv-type-int-color': '#8f3f71',\n '--w-rjv-type-float-color': '#8f3f71',\n '--w-rjv-type-bigint-color': '#8f3f71',\n '--w-rjv-type-boolean-color': '#8f3f71',\n '--w-rjv-type-date-color': '#076678',\n '--w-rjv-type-url-color': '#0969da',\n '--w-rjv-type-null-color': '#076678',\n '--w-rjv-type-nan-color': '#076678',\n '--w-rjv-type-undefined-color': '#076678'\n};","export var monokaiTheme = {\n '--w-rjv-font-family': 'monospace',\n '--w-rjv-color': '#E6DB74',\n '--w-rjv-key-string': '#E6DB74',\n '--w-rjv-background-color': '#272822',\n '--w-rjv-line-color': '#3e3d32',\n '--w-rjv-arrow-color': '#f8f8f2',\n '--w-rjv-edit-color': 'var(--w-rjv-color)',\n '--w-rjv-info-color': '#cecece4d',\n '--w-rjv-update-color': '#5f5600',\n '--w-rjv-copied-color': '#E6DB74',\n '--w-rjv-copied-success-color': '#28a745',\n '--w-rjv-curlybraces-color': '#f8f8f2',\n '--w-rjv-colon-color': '#f8f8f2',\n '--w-rjv-brackets-color': '#f8f8f2',\n '--w-rjv-quotes-color': 'var(--w-rjv-key-string)',\n '--w-rjv-quotes-string-color': 'var(--w-rjv-type-string-color)',\n '--w-rjv-type-string-color': '#E6DB74',\n '--w-rjv-type-int-color': '#AE81FF',\n '--w-rjv-type-float-color': '#AE81FF',\n '--w-rjv-type-bigint-color': '#AE81FF',\n '--w-rjv-type-boolean-color': '#AE81FF',\n '--w-rjv-type-date-color': '#fd9720c7',\n '--w-rjv-type-url-color': '#55a3ff',\n '--w-rjv-type-null-color': '#FA2672',\n '--w-rjv-type-nan-color': '#FD971F',\n '--w-rjv-type-undefined-color': '#FD971F'\n};","import { useState } from 'react';\nimport styled, { css } from 'styled-components';\nimport { Example } from './example/default';\n// import ExampleEditor from './example/editor';\n\nconst ExampleWrapper = styled.div`\n max-width: 630px;\n margin: 0 auto;\n padding-bottom: 3rem;\n`;\n\nconst TabItem = styled.div`\n padding-bottom: 10px;\n`;\n\nconst Button = styled.button<{ $active: boolean }>`\n background: transparent;\n border: 0;\n cursor: pointer;\n border-radius: 3px;\n ${({ $active }) =>\n $active &&\n css`\n background-color: var(--color-theme-text, #bce0ff);\n color: var(--color-theme-bg);\n `}\n`;\n\nexport default function App() {\n const [tabs, setTabs] = useState<'preview' | 'editor'>('preview');\n return (\n \n \n \n {/* */}\n \n {tabs === 'preview' && }\n {/* {tabs === 'editor' && } */}\n \n );\n}\n","import React from 'react';\nimport { STATIC_EXECUTION_CONTEXT } from '../constants';\nimport GlobalStyle from '../models/GlobalStyle';\nimport { useStyleSheetContext } from '../models/StyleSheetManager';\nimport { DefaultTheme, ThemeContext } from '../models/ThemeProvider';\nimport StyleSheet from '../sheet';\nimport { ExecutionContext, ExecutionProps, Interpolation, Stringifier, Styles } from '../types';\nimport { checkDynamicCreation } from '../utils/checkDynamicCreation';\nimport determineTheme from '../utils/determineTheme';\nimport generateComponentId from '../utils/generateComponentId';\nimport css from './css';\n\nexport default function createGlobalStyle(\n strings: Styles,\n ...interpolations: Array>\n) {\n const rules = css(strings, ...interpolations);\n const styledComponentId = `sc-global-${generateComponentId(JSON.stringify(rules))}`;\n const globalStyle = new GlobalStyle(rules, styledComponentId);\n\n if (process.env.NODE_ENV !== 'production') {\n checkDynamicCreation(styledComponentId);\n }\n\n const GlobalStyleComponent: React.ComponentType = props => {\n const ssc = useStyleSheetContext();\n const theme = React.useContext(ThemeContext);\n const instanceRef = React.useRef(ssc.styleSheet.allocateGSInstance(styledComponentId));\n\n const instance = instanceRef.current;\n\n if (process.env.NODE_ENV !== 'production' && React.Children.count(props.children)) {\n console.warn(\n `The global style component ${styledComponentId} was given child JSX. createGlobalStyle does not render children.`\n );\n }\n\n if (\n process.env.NODE_ENV !== 'production' &&\n rules.some(rule => typeof rule === 'string' && rule.indexOf('@import') !== -1)\n ) {\n console.warn(\n `Please do not use @import CSS syntax in createGlobalStyle at this time, as the CSSOM APIs we use in production do not handle it well. Instead, we recommend using a library such as react-helmet to inject a typical meta tag to the stylesheet, or simply embedding it manually in your index.html section for a simpler app.`\n );\n }\n\n if (ssc.styleSheet.server) {\n renderStyles(instance, props, ssc.styleSheet, theme, ssc.stylis);\n }\n\n if (!__SERVER__) {\n React.useLayoutEffect(() => {\n if (!ssc.styleSheet.server) {\n renderStyles(instance, props, ssc.styleSheet, theme, ssc.stylis);\n return () => globalStyle.removeStyles(instance, ssc.styleSheet);\n }\n }, [instance, props, ssc.styleSheet, theme, ssc.stylis]);\n }\n\n return null;\n };\n\n function renderStyles(\n instance: number,\n props: ExecutionProps,\n styleSheet: StyleSheet,\n theme: DefaultTheme | undefined,\n stylis: Stringifier\n ) {\n if (globalStyle.isStatic) {\n globalStyle.renderStyles(\n instance,\n STATIC_EXECUTION_CONTEXT as unknown as ExecutionContext & Props,\n styleSheet,\n stylis\n );\n } else {\n const context = {\n ...props,\n theme: determineTheme(props, theme, GlobalStyleComponent.defaultProps),\n } as ExecutionContext & Props;\n\n globalStyle.renderStyles(instance, context, styleSheet, stylis);\n }\n }\n\n return React.memo(GlobalStyleComponent);\n}\n","import React from 'react';\nimport { createRoot } from 'react-dom/client';\nimport { createGlobalStyle } from 'styled-components';\nimport data from '@uiw/react-json-view/README.md';\nimport MarkdownPreviewExample from '@uiw/react-markdown-preview-example';\nimport App from './App';\n\nexport const GlobalStyle = createGlobalStyle`\n [data-color-mode*='dark'], [data-color-mode*='dark'] body {\n --tabs-bg: #5f5f5f;\n }\n [data-color-mode*='light'], [data-color-mode*='light'] body {\n background-color: #f2f2f2;\n --tabs-bg: #bce0ff;\n }\n * {\n box-sizing: border-box;\n }\n .w-rjv {\n padding: 0.4rem;\n border-radius: 0.2rem;\n }\n`;\n\nconst Github = MarkdownPreviewExample.Github;\nconst Example = MarkdownPreviewExample.Example;\n\nconst container = document.getElementById('root');\nconst root = createRoot(container!);\nroot.render(\n \n \n Sponsor\n ,\n ]}\n />\n \n \n \n \n ,\n);\n","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\")[\"default\"];\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\")[\"default\"];\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.Container = void 0;\nvar _objectSpread2 = _interopRequireDefault(require(\"@babel/runtime/helpers/objectSpread2\"));\nvar _defineProperty2 = _interopRequireDefault(require(\"@babel/runtime/helpers/defineProperty\"));\nvar _objectWithoutProperties2 = _interopRequireDefault(require(\"@babel/runtime/helpers/objectWithoutProperties\"));\nvar _react = _interopRequireWildcard(require(\"react\"));\nvar _NestedClose = require(\"./comps/NestedClose\");\nvar _NestedOpen = require(\"./comps/NestedOpen\");\nvar _KeyValues = require(\"./comps/KeyValues\");\nvar _useIdCompat = require(\"./comps/useIdCompat\");\nvar _ShowTools = require(\"./store/ShowTools\");\nvar _jsxRuntime = require(\"react/jsx-runtime\");\nvar _excluded = [\"className\", \"children\", \"parentValue\", \"keyid\", \"level\", \"value\", \"initialValue\", \"keys\", \"keyName\"];\nvar Container = exports.Container = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {\n var _props$className = props.className,\n className = _props$className === void 0 ? '' : _props$className,\n children = props.children,\n parentValue = props.parentValue,\n keyid = props.keyid,\n _props$level = props.level,\n level = _props$level === void 0 ? 1 : _props$level,\n value = props.value,\n initialValue = props.initialValue,\n keys = props.keys,\n keyName = props.keyName,\n elmProps = (0, _objectWithoutProperties2[\"default\"])(props, _excluded);\n var dispatch = (0, _ShowTools.useShowToolsDispatch)();\n var subkeyid = (0, _useIdCompat.useIdCompat)();\n var defaultClassNames = [className, 'w-rjv-inner'].filter(Boolean).join(' ');\n var reset = {\n onMouseEnter: function onMouseEnter() {\n return dispatch((0, _defineProperty2[\"default\"])({}, subkeyid, true));\n },\n onMouseLeave: function onMouseLeave() {\n return dispatch((0, _defineProperty2[\"default\"])({}, subkeyid, false));\n }\n };\n return /*#__PURE__*/(0, _jsxRuntime.jsxs)(\"div\", (0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({\n className: defaultClassNames,\n ref: ref\n }, elmProps), reset), {}, {\n children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_NestedOpen.NestedOpen, {\n expandKey: subkeyid,\n value: value,\n level: level,\n keys: keys,\n parentValue: parentValue,\n keyName: keyName,\n initialValue: initialValue\n }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_KeyValues.KeyValues, {\n expandKey: subkeyid,\n value: value,\n level: level,\n keys: keys,\n parentValue: parentValue,\n keyName: keyName\n }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_NestedClose.NestedClose, {\n expandKey: subkeyid,\n value: value,\n level: level\n })]\n }));\n});\nContainer.displayName = 'JVR.Container';","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\")[\"default\"];\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.TriangleArrow = TriangleArrow;\nvar _objectSpread2 = _interopRequireDefault(require(\"@babel/runtime/helpers/objectSpread2\"));\nvar _objectWithoutProperties2 = _interopRequireDefault(require(\"@babel/runtime/helpers/objectWithoutProperties\"));\nvar _react = _interopRequireDefault(require(\"react\"));\nvar _jsxRuntime = require(\"react/jsx-runtime\");\nvar _excluded = [\"style\"];\nfunction TriangleArrow(props) {\n var style = props.style,\n reset = (0, _objectWithoutProperties2[\"default\"])(props, _excluded);\n var defaultStyle = (0, _objectSpread2[\"default\"])({\n cursor: 'pointer',\n height: '1em',\n width: '1em',\n userSelect: 'none',\n display: 'inline-flex'\n }, style);\n return /*#__PURE__*/(0, _jsxRuntime.jsx)(\"svg\", (0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({\n viewBox: \"0 0 24 24\",\n fill: \"var(--w-rjv-arrow-color, currentColor)\",\n style: defaultStyle\n }, reset), {}, {\n children: /*#__PURE__*/(0, _jsxRuntime.jsx)(\"path\", {\n d: \"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z\"\n })\n }));\n}\nTriangleArrow.displayName = 'JVR.TriangleArrow';","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\")[\"default\"];\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.TriangleSolidArrow = TriangleSolidArrow;\nvar _objectSpread2 = _interopRequireDefault(require(\"@babel/runtime/helpers/objectSpread2\"));\nvar _objectWithoutProperties2 = _interopRequireDefault(require(\"@babel/runtime/helpers/objectWithoutProperties\"));\nvar _react = _interopRequireDefault(require(\"react\"));\nvar _jsxRuntime = require(\"react/jsx-runtime\");\nvar _excluded = [\"style\"];\nfunction TriangleSolidArrow(props) {\n var style = props.style,\n reset = (0, _objectWithoutProperties2[\"default\"])(props, _excluded);\n var defaultStyle = (0, _objectSpread2[\"default\"])({\n cursor: 'pointer',\n height: '1em',\n width: '1em',\n userSelect: 'none',\n display: 'flex'\n }, style);\n return /*#__PURE__*/(0, _jsxRuntime.jsx)(\"svg\", (0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({\n viewBox: \"0 0 30 30\",\n fill: \"var(--w-rjv-arrow-color, currentColor)\",\n height: \"1em\",\n width: \"1em\",\n style: defaultStyle\n }, reset), {}, {\n children: /*#__PURE__*/(0, _jsxRuntime.jsx)(\"path\", {\n d: \"M14.1758636,22.5690012 C14.3620957,22.8394807 14.6694712,23.001033 14.9978636,23.001033 C15.326256,23.001033 15.6336315,22.8394807 15.8198636,22.5690012 L24.8198636,9.56900125 C25.0322035,9.2633716 25.0570548,8.86504616 24.8843497,8.5353938 C24.7116447,8.20574144 24.3700159,7.99941506 23.9978636,8 L5.9978636,8 C5.62665,8.00153457 5.28670307,8.20817107 5.11443241,8.53699428 C4.94216175,8.86581748 4.96580065,9.26293681 5.1758636,9.56900125 L14.1758636,22.5690012 Z\"\n })\n }));\n}\nTriangleSolidArrow.displayName = 'JVR.TriangleSolidArrow';","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\")[\"default\"];\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.Copied = void 0;\nvar _objectSpread2 = _interopRequireDefault(require(\"@babel/runtime/helpers/objectSpread2\"));\nvar _slicedToArray2 = _interopRequireDefault(require(\"@babel/runtime/helpers/slicedToArray\"));\nvar _objectWithoutProperties2 = _interopRequireDefault(require(\"@babel/runtime/helpers/objectWithoutProperties\"));\nvar _react = require(\"react\");\nvar _store = require(\"../store\");\nvar _Section = require(\"../store/Section\");\nvar _ShowTools = require(\"../store/ShowTools\");\nvar _types = require(\"../types\");\nvar _jsxRuntime = require(\"react/jsx-runtime\");\nvar _excluded = [\"keyName\", \"value\", \"parentValue\", \"expandKey\", \"keys\"],\n _excluded2 = [\"as\", \"render\"];\nvar Copied = exports.Copied = function Copied(props) {\n var keyName = props.keyName,\n value = props.value,\n parentValue = props.parentValue,\n expandKey = props.expandKey,\n keys = props.keys,\n other = (0, _objectWithoutProperties2[\"default\"])(props, _excluded);\n var _useStore = (0, _store.useStore)(),\n onCopied = _useStore.onCopied,\n enableClipboard = _useStore.enableClipboard;\n var showTools = (0, _ShowTools.useShowToolsStore)();\n var isShowTools = showTools[expandKey];\n var _useState = (0, _react.useState)(false),\n _useState2 = (0, _slicedToArray2[\"default\"])(_useState, 2),\n copied = _useState2[0],\n setCopied = _useState2[1];\n var _useSectionStore = (0, _Section.useSectionStore)(),\n _useSectionStore$Copi = _useSectionStore.Copied,\n Comp = _useSectionStore$Copi === void 0 ? {} : _useSectionStore$Copi;\n if (enableClipboard === false || !isShowTools) return null;\n var click = function click(event) {\n event.stopPropagation();\n var copyText = '';\n if (typeof value === 'number' && value === Infinity) {\n copyText = 'Infinity';\n } else if (typeof value === 'number' && isNaN(value)) {\n copyText = 'NaN';\n } else if (typeof value === 'bigint') {\n copyText = (0, _types.bigIntToString)(value);\n } else if (value instanceof Date) {\n copyText = value.toLocaleString();\n } else {\n copyText = JSON.stringify(value, function (_, v) {\n return typeof v === 'bigint' ? (0, _types.bigIntToString)(v) : v;\n }, 2);\n }\n onCopied && onCopied(copyText, value);\n setCopied(true);\n var _clipboard = navigator.clipboard || {\n writeText: function writeText(text) {\n return new Promise(function (reslove, reject) {\n var textarea = document.createElement('textarea');\n textarea.style.position = 'absolute';\n textarea.style.opacity = '0';\n textarea.style.left = '-99999999px';\n textarea.value = text;\n document.body.appendChild(textarea);\n textarea.select();\n if (!document.execCommand('copy')) {\n reject();\n } else {\n reslove();\n }\n textarea.remove();\n });\n }\n };\n _clipboard.writeText(copyText).then(function () {\n var timer = setTimeout(function () {\n setCopied(false);\n clearTimeout(timer);\n }, 3000);\n })[\"catch\"](function (error) {});\n };\n var svgProps = {\n style: {\n display: 'inline-flex'\n },\n fill: copied ? 'var(--w-rjv-copied-success-color, #28a745)' : 'var(--w-rjv-copied-color, currentColor)',\n onClick: click\n };\n var as = Comp.as,\n render = Comp.render,\n reset = (0, _objectWithoutProperties2[\"default\"])(Comp, _excluded2);\n var elmProps = (0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, reset), other), svgProps), {}, {\n style: (0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, reset.style), other.style), svgProps.style)\n });\n var isRender = render && typeof render === 'function';\n var child = isRender && render((0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, elmProps), {}, {\n 'data-copied': copied\n }), {\n value: value,\n keyName: keyName,\n keys: keys,\n parentValue: parentValue\n });\n if (child) return child;\n if (copied) {\n return /*#__PURE__*/(0, _jsxRuntime.jsx)(\"svg\", (0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({\n viewBox: \"0 0 32 36\"\n }, elmProps), {}, {\n children: /*#__PURE__*/(0, _jsxRuntime.jsx)(\"path\", {\n d: \"M27.5,33 L2.5,33 L2.5,12.5 L27.5,12.5 L27.5,15.2249049 C29.1403264,13.8627542 29.9736597,13.1778155 30,13.1700887 C30,11.9705278 30,10.0804982 30,7.5 C30,6.1 28.9,5 27.5,5 L20,5 C20,2.2 17.8,0 15,0 C12.2,0 10,2.2 10,5 L2.5,5 C1.1,5 0,6.1 0,7.5 L0,33 C0,34.4 1.1,36 2.5,36 L27.5,36 C28.9,36 30,34.4 30,33 L30,26.1114493 L27.5,28.4926435 L27.5,33 Z M7.5,7.5 L10,7.5 C10,7.5 12.5,6.4 12.5,5 C12.5,3.6 13.6,2.5 15,2.5 C16.4,2.5 17.5,3.6 17.5,5 C17.5,6.4 18.8,7.5 20,7.5 L22.5,7.5 C22.5,7.5 25,8.6 25,10 L5,10 C5,8.5 6.1,7.5 7.5,7.5 Z M5,27.5 L10,27.5 L10,25 L5,25 L5,27.5 Z M28.5589286,16 L32,19.6 L21.0160714,30.5382252 L13.5303571,24.2571429 L17.1303571,20.6571429 L21.0160714,24.5428571 L28.5589286,16 Z M17.5,15 L5,15 L5,17.5 L17.5,17.5 L17.5,15 Z M10,20 L5,20 L5,22.5 L10,22.5 L10,20 Z\"\n })\n }));\n }\n return /*#__PURE__*/(0, _jsxRuntime.jsx)(\"svg\", (0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({\n viewBox: \"0 0 32 36\"\n }, elmProps), {}, {\n children: /*#__PURE__*/(0, _jsxRuntime.jsx)(\"path\", {\n d: \"M27.5,33 L2.5,33 L2.5,12.5 L27.5,12.5 L27.5,20 L30,20 L30,7.5 C30,6.1 28.9,5 27.5,5 L20,5 C20,2.2 17.8,0 15,0 C12.2,0 10,2.2 10,5 L2.5,5 C1.1,5 0,6.1 0,7.5 L0,33 C0,34.4 1.1,36 2.5,36 L27.5,36 C28.9,36 30,34.4 30,33 L30,29 L27.5,29 L27.5,33 Z M7.5,7.5 L10,7.5 C10,7.5 12.5,6.4 12.5,5 C12.5,3.6 13.6,2.5 15,2.5 C16.4,2.5 17.5,3.6 17.5,5 C17.5,6.4 18.8,7.5 20,7.5 L22.5,7.5 C22.5,7.5 25,8.6 25,10 L5,10 C5,8.5 6.1,7.5 7.5,7.5 Z M5,27.5 L10,27.5 L10,25 L5,25 L5,27.5 Z M22.5,21.5 L22.5,16.5 L12.5,24 L22.5,31.5 L22.5,26.5 L32,26.5 L32,21.5 L22.5,21.5 Z M17.5,15 L5,15 L5,17.5 L17.5,17.5 L17.5,15 Z M10,20 L5,20 L5,22.5 L10,22.5 L10,20 Z\"\n })\n }));\n};\nCopied.displayName = 'JVR.Copied';","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\")[\"default\"];\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.KeyValuesItem = exports.KeyValues = exports.KayName = void 0;\nvar _objectSpread2 = _interopRequireDefault(require(\"@babel/runtime/helpers/objectSpread2\"));\nvar _defineProperty2 = _interopRequireDefault(require(\"@babel/runtime/helpers/defineProperty\"));\nvar _typeof2 = _interopRequireDefault(require(\"@babel/runtime/helpers/typeof\"));\nvar _toConsumableArray2 = _interopRequireDefault(require(\"@babel/runtime/helpers/toConsumableArray\"));\nvar _slicedToArray2 = _interopRequireDefault(require(\"@babel/runtime/helpers/slicedToArray\"));\nvar _react = require(\"react\");\nvar _store = require(\"../store\");\nvar _Expands = require(\"../store/Expands\");\nvar _ShowTools = require(\"../store/ShowTools\");\nvar _Value = require(\"./Value\");\nvar _KeyName = require(\"../section/KeyName\");\nvar _Row = require(\"../section/Row\");\nvar _Container = require(\"../Container\");\nvar _symbol = require(\"../symbol\");\nvar _useHighlight = require(\"../utils/useHighlight\");\nvar _Copied = require(\"../comps/Copied\");\nvar _useIdCompat = require(\"../comps/useIdCompat\");\nvar _jsxRuntime = require(\"react/jsx-runtime\");\nvar KeyValues = exports.KeyValues = function KeyValues(props) {\n var _expands$expandKey;\n var value = props.value,\n _props$expandKey = props.expandKey,\n expandKey = _props$expandKey === void 0 ? '' : _props$expandKey,\n level = props.level,\n _props$keys = props.keys,\n keys = _props$keys === void 0 ? [] : _props$keys;\n var expands = (0, _Expands.useExpandsStore)();\n var _useStore = (0, _store.useStore)(),\n objectSortKeys = _useStore.objectSortKeys,\n indentWidth = _useStore.indentWidth,\n collapsed = _useStore.collapsed;\n var isMyArray = Array.isArray(value);\n var isExpanded = (_expands$expandKey = expands[expandKey]) !== null && _expands$expandKey !== void 0 ? _expands$expandKey : typeof collapsed === 'boolean' ? collapsed : typeof collapsed === 'number' ? level > collapsed : false;\n if (isExpanded) {\n return null;\n }\n // object\n var entries = isMyArray ? Object.entries(value).map(function (m) {\n return [Number(m[0]), m[1]];\n }) : Object.entries(value);\n if (objectSortKeys) {\n entries = objectSortKeys === true ? entries.sort(function (_ref, _ref2) {\n var _ref3 = (0, _slicedToArray2[\"default\"])(_ref, 1),\n a = _ref3[0];\n var _ref4 = (0, _slicedToArray2[\"default\"])(_ref2, 1),\n b = _ref4[0];\n return typeof a === 'string' && typeof b === 'string' ? a.localeCompare(b) : 0;\n }) : entries.sort(function (_ref5, _ref6) {\n var _ref7 = (0, _slicedToArray2[\"default\"])(_ref5, 2),\n a = _ref7[0],\n valA = _ref7[1];\n var _ref8 = (0, _slicedToArray2[\"default\"])(_ref6, 2),\n b = _ref8[0],\n valB = _ref8[1];\n return typeof a === 'string' && typeof b === 'string' ? objectSortKeys(a, b, valA, valB) : 0;\n });\n }\n var style = {\n borderLeft: 'var(--w-rjv-border-left-width, 1px) var(--w-rjv-line-style, solid) var(--w-rjv-line-color, #ebebeb)',\n paddingLeft: indentWidth,\n marginLeft: 6\n };\n return /*#__PURE__*/(0, _jsxRuntime.jsx)(\"div\", {\n className: \"w-rjv-wrap\",\n style: style,\n children: entries.map(function (_ref9, idx) {\n var _ref10 = (0, _slicedToArray2[\"default\"])(_ref9, 2),\n key = _ref10[0],\n val = _ref10[1];\n return /*#__PURE__*/(0, _jsxRuntime.jsx)(KeyValuesItem, {\n parentValue: value,\n keyName: key,\n keys: [].concat((0, _toConsumableArray2[\"default\"])(keys), [key]),\n value: val,\n level: level\n }, idx);\n })\n });\n};\nKeyValues.displayName = 'JVR.KeyValues';\nvar KayName = exports.KayName = function KayName(props) {\n var keyName = props.keyName,\n parentValue = props.parentValue,\n keys = props.keys,\n value = props.value;\n var _useStore2 = (0, _store.useStore)(),\n highlightUpdates = _useStore2.highlightUpdates;\n var isNumber = typeof keyName === 'number';\n var highlightContainer = (0, _react.useRef)(null);\n (0, _useHighlight.useHighlight)({\n value: value,\n highlightUpdates: highlightUpdates,\n highlightContainer: highlightContainer\n });\n return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_react.Fragment, {\n children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(\"span\", {\n ref: highlightContainer,\n children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_symbol.Quote, {\n isNumber: isNumber,\n \"data-placement\": \"left\"\n }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_KeyName.KeyNameComp, {\n keyName: keyName,\n value: value,\n keys: keys,\n parentValue: parentValue,\n children: keyName\n }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_symbol.Quote, {\n isNumber: isNumber,\n \"data-placement\": \"right\"\n })]\n }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_symbol.Colon, {})]\n });\n};\nKayName.displayName = 'JVR.KayName';\nvar KeyValuesItem = exports.KeyValuesItem = function KeyValuesItem(props) {\n var keyName = props.keyName,\n value = props.value,\n parentValue = props.parentValue,\n _props$level = props.level,\n level = _props$level === void 0 ? 0 : _props$level,\n _props$keys2 = props.keys,\n keys = _props$keys2 === void 0 ? [] : _props$keys2;\n var dispatch = (0, _ShowTools.useShowToolsDispatch)();\n var subkeyid = (0, _useIdCompat.useIdCompat)();\n var isMyArray = Array.isArray(value);\n var isMySet = value instanceof Set;\n var isMyMap = value instanceof Map;\n var isDate = value instanceof Date;\n var isUrl = value instanceof URL;\n var isMyObject = value && (0, _typeof2[\"default\"])(value) === 'object' && !isMyArray && !isMySet && !isMyMap && !isDate && !isUrl;\n var isNested = isMyObject || isMyArray || isMySet || isMyMap;\n if (isNested) {\n var myValue = isMySet ? Array.from(value) : isMyMap ? Object.fromEntries(value) : value;\n return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Container.Container, {\n keyName: keyName,\n value: myValue,\n parentValue: parentValue,\n initialValue: value,\n keys: keys,\n level: level + 1\n });\n }\n var reset = {\n onMouseEnter: function onMouseEnter() {\n return dispatch((0, _defineProperty2[\"default\"])({}, subkeyid, true));\n },\n onMouseLeave: function onMouseLeave() {\n return dispatch((0, _defineProperty2[\"default\"])({}, subkeyid, false));\n }\n };\n return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_Row.RowComp, (0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({\n className: \"w-rjv-line\",\n value: value,\n keyName: keyName,\n keys: keys,\n parentValue: parentValue\n }, reset), {}, {\n children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(KayName, {\n keyName: keyName,\n value: value,\n keys: keys,\n parentValue: parentValue\n }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Value.Value, {\n keyName: keyName,\n value: value\n }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Copied.Copied, {\n keyName: keyName,\n value: value,\n keys: keys,\n parentValue: parentValue,\n expandKey: subkeyid\n })]\n }));\n};\nKeyValuesItem.displayName = 'JVR.KeyValuesItem';","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.NestedClose = void 0;\nvar _store = require(\"../store\");\nvar _Expands = require(\"../store/Expands\");\nvar _symbol = require(\"../symbol\");\nvar _jsxRuntime = require(\"react/jsx-runtime\");\nvar NestedClose = exports.NestedClose = function NestedClose(props) {\n var _expands$expandKey;\n var value = props.value,\n expandKey = props.expandKey,\n level = props.level;\n var expands = (0, _Expands.useExpandsStore)();\n var isArray = Array.isArray(value);\n var _useStore = (0, _store.useStore)(),\n collapsed = _useStore.collapsed;\n var isMySet = value instanceof Set;\n var isExpanded = (_expands$expandKey = expands[expandKey]) !== null && _expands$expandKey !== void 0 ? _expands$expandKey : typeof collapsed === 'boolean' ? collapsed : typeof collapsed === 'number' ? level > collapsed : false;\n var len = Object.keys(value).length;\n if (isExpanded || len === 0) {\n return null;\n }\n var style = {\n paddingLeft: 4\n };\n return /*#__PURE__*/(0, _jsxRuntime.jsx)(\"div\", {\n style: style,\n children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_symbol.BracketsClose, {\n isBrackets: isArray || isMySet,\n isVisiable: true\n })\n });\n};\nNestedClose.displayName = 'JVR.NestedClose';","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\")[\"default\"];\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.NestedOpen = void 0;\nvar _objectSpread2 = _interopRequireDefault(require(\"@babel/runtime/helpers/objectSpread2\"));\nvar _defineProperty2 = _interopRequireDefault(require(\"@babel/runtime/helpers/defineProperty\"));\nvar _typeof2 = _interopRequireDefault(require(\"@babel/runtime/helpers/typeof\"));\nvar _KeyValues = require(\"./KeyValues\");\nvar _Expands = require(\"../store/Expands\");\nvar _store = require(\"../store\");\nvar _Copied = require(\"./Copied\");\nvar _CountInfoExtra = require(\"../section/CountInfoExtra\");\nvar _CountInfo = require(\"../section/CountInfo\");\nvar _symbol = require(\"../symbol\");\nvar _Ellipsis = require(\"../section/Ellipsis\");\nvar _types = require(\"../types\");\nvar _jsxRuntime = require(\"react/jsx-runtime\");\nvar NestedOpen = exports.NestedOpen = function NestedOpen(props) {\n var _expands$expandKey;\n var keyName = props.keyName,\n expandKey = props.expandKey,\n keys = props.keys,\n initialValue = props.initialValue,\n value = props.value,\n parentValue = props.parentValue,\n level = props.level;\n var expands = (0, _Expands.useExpandsStore)();\n var dispatchExpands = (0, _Expands.useExpandsDispatch)();\n var _useStore = (0, _store.useStore)(),\n onExpand = _useStore.onExpand,\n collapsed = _useStore.collapsed;\n var isArray = Array.isArray(value);\n var isMySet = value instanceof Set;\n var isExpanded = (_expands$expandKey = expands[expandKey]) !== null && _expands$expandKey !== void 0 ? _expands$expandKey : typeof collapsed === 'boolean' ? collapsed : typeof collapsed === 'number' ? level > collapsed : false;\n var isObject = (0, _typeof2[\"default\"])(value) === 'object';\n var click = function click() {\n var opt = {\n expand: !isExpanded,\n value: value,\n keyid: expandKey,\n keyName: keyName\n };\n onExpand && onExpand(opt);\n dispatchExpands((0, _defineProperty2[\"default\"])({}, expandKey, opt.expand));\n };\n var style = {\n display: 'inline-flex',\n alignItems: 'center'\n };\n var arrowStyle = {\n transform: \"rotate(\".concat(!isExpanded ? '0' : '-90', \"deg)\"),\n transition: 'all 0.3s'\n };\n var len = Object.keys(value).length;\n var showArrow = len !== 0 && (isArray || isMySet || isObject);\n var reset = {\n style: style\n };\n if (showArrow) {\n reset.onClick = click;\n }\n return /*#__PURE__*/(0, _jsxRuntime.jsxs)(\"span\", (0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, reset), {}, {\n children: [showArrow && /*#__PURE__*/(0, _jsxRuntime.jsx)(_symbol.Arrow, {\n style: arrowStyle,\n expandKey: expandKey\n }), (keyName || typeof keyName === 'number') && /*#__PURE__*/(0, _jsxRuntime.jsx)(_KeyValues.KayName, {\n keyName: keyName\n }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_types.SetComp, {\n value: initialValue,\n keyName: keyName\n }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_types.MapComp, {\n value: initialValue,\n keyName: keyName\n }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_symbol.BracketsOpen, {\n isBrackets: isArray || isMySet\n }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Ellipsis.EllipsisComp, {\n keyName: keyName,\n value: value,\n isExpanded: isExpanded\n }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_symbol.BracketsClose, {\n isVisiable: isExpanded || !showArrow,\n isBrackets: isArray || isMySet\n }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_CountInfo.CountInfoComp, {\n value: value,\n keyName: keyName\n }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_CountInfoExtra.CountInfoExtraComps, {\n value: value,\n keyName: keyName\n }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Copied.Copied, {\n keyName: keyName,\n value: value,\n expandKey: expandKey,\n parentValue: parentValue,\n keys: keys\n })]\n }));\n};\nNestedOpen.displayName = 'JVR.NestedOpen';","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\")[\"default\"];\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.isFloat = exports.Value = void 0;\nvar _objectSpread2 = _interopRequireDefault(require(\"@babel/runtime/helpers/objectSpread2\"));\nvar _types = require(\"../types\");\nvar _jsxRuntime = require(\"react/jsx-runtime\");\nvar isFloat = exports.isFloat = function isFloat(n) {\n return Number(n) === n && n % 1 !== 0 || isNaN(n);\n};\nvar Value = exports.Value = function Value(props) {\n var value = props.value,\n keyName = props.keyName;\n var reset = {\n keyName: keyName\n };\n if (value instanceof URL) {\n return /*#__PURE__*/(0, _jsxRuntime.jsx)(_types.TypeUrl, (0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, reset), {}, {\n children: value\n }));\n }\n if (typeof value === 'string') {\n return /*#__PURE__*/(0, _jsxRuntime.jsx)(_types.TypeString, (0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, reset), {}, {\n children: value\n }));\n }\n if (value === true) {\n return /*#__PURE__*/(0, _jsxRuntime.jsx)(_types.TypeTrue, (0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, reset), {}, {\n children: value\n }));\n }\n if (value === false) {\n return /*#__PURE__*/(0, _jsxRuntime.jsx)(_types.TypeFalse, (0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, reset), {}, {\n children: value\n }));\n }\n if (value === null) {\n return /*#__PURE__*/(0, _jsxRuntime.jsx)(_types.TypeNull, (0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, reset), {}, {\n children: value\n }));\n }\n if (value === undefined) {\n return /*#__PURE__*/(0, _jsxRuntime.jsx)(_types.TypeUndefined, (0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, reset), {}, {\n children: value\n }));\n }\n if (value instanceof Date) {\n return /*#__PURE__*/(0, _jsxRuntime.jsx)(_types.TypeDate, (0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, reset), {}, {\n children: value\n }));\n }\n if (typeof value === 'number' && isNaN(value)) {\n return /*#__PURE__*/(0, _jsxRuntime.jsx)(_types.TypeNan, (0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, reset), {}, {\n children: value\n }));\n } else if (typeof value === 'number' && isFloat(value)) {\n return /*#__PURE__*/(0, _jsxRuntime.jsx)(_types.TypeFloat, (0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, reset), {}, {\n children: value\n }));\n } else if (typeof value === 'bigint') {\n return /*#__PURE__*/(0, _jsxRuntime.jsx)(_types.TypeBigint, (0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, reset), {}, {\n children: value\n }));\n } else if (typeof value === 'number') {\n return /*#__PURE__*/(0, _jsxRuntime.jsx)(_types.TypeInt, (0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, reset), {}, {\n children: value\n }));\n }\n return null;\n};\nValue.displayName = 'JVR.Value';","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.useIdCompat = useIdCompat;\nvar _react = require(\"react\");\nfunction useIdCompat() {\n var idRef = (0, _react.useRef)(null);\n if (idRef.current === null) {\n idRef.current = 'custom-id-' + Math.random().toString(36).substr(2, 9);\n }\n return idRef.current;\n}","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\")[\"default\"];\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nvar _exportNames = {};\nexports[\"default\"] = void 0;\nvar _objectSpread2 = _interopRequireDefault(require(\"@babel/runtime/helpers/objectSpread2\"));\nvar _objectWithoutProperties2 = _interopRequireDefault(require(\"@babel/runtime/helpers/objectWithoutProperties\"));\nvar _react = require(\"react\");\nvar _store = require(\"./store\");\nObject.keys(_store).forEach(function (key) {\n if (key === \"default\" || key === \"__esModule\") return;\n if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;\n if (key in exports && exports[key] === _store[key]) return;\n Object.defineProperty(exports, key, {\n enumerable: true,\n get: function get() {\n return _store[key];\n }\n });\n});\nvar _Container = require(\"./Container\");\nvar _BraceLeft = require(\"./symbol/BraceLeft\");\nvar _BraceRight = require(\"./symbol/BraceRight\");\nvar _BracketsLeft = require(\"./symbol/BracketsLeft\");\nvar _BracketsRight = require(\"./symbol/BracketsRight\");\nvar _Arrow = require(\"./symbol/Arrow\");\nvar _Colon = require(\"./symbol/Colon\");\nvar _Quote = require(\"./symbol/Quote\");\nvar _ValueQuote = require(\"./symbol/ValueQuote\");\nvar _Bigint = require(\"./types/Bigint\");\nvar _Date = require(\"./types/Date\");\nvar _False = require(\"./types/False\");\nvar _Float = require(\"./types/Float\");\nvar _Int = require(\"./types/Int\");\nvar _Map = require(\"./types/Map\");\nvar _Nan = require(\"./types/Nan\");\nvar _Null = require(\"./types/Null\");\nvar _Set = require(\"./types/Set\");\nvar _String = require(\"./types/String\");\nvar _True = require(\"./types/True\");\nvar _Undefined = require(\"./types/Undefined\");\nvar _Url = require(\"./types/Url\");\nvar _Copied = require(\"./section/Copied\");\nvar _CountInfo = require(\"./section/CountInfo\");\nvar _CountInfoExtra = require(\"./section/CountInfoExtra\");\nvar _Ellipsis = require(\"./section/Ellipsis\");\nvar _KeyName = require(\"./section/KeyName\");\nvar _Row = require(\"./section/Row\");\nvar _jsxRuntime = require(\"react/jsx-runtime\");\nvar _Expands = require(\"./store/Expands\");\nObject.keys(_Expands).forEach(function (key) {\n if (key === \"default\" || key === \"__esModule\") return;\n if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;\n if (key in exports && exports[key] === _Expands[key]) return;\n Object.defineProperty(exports, key, {\n enumerable: true,\n get: function get() {\n return _Expands[key];\n }\n });\n});\nvar _ShowTools = require(\"./store/ShowTools\");\nObject.keys(_ShowTools).forEach(function (key) {\n if (key === \"default\" || key === \"__esModule\") return;\n if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;\n if (key in exports && exports[key] === _ShowTools[key]) return;\n Object.defineProperty(exports, key, {\n enumerable: true,\n get: function get() {\n return _ShowTools[key];\n }\n });\n});\nvar _Symbols = require(\"./store/Symbols\");\nObject.keys(_Symbols).forEach(function (key) {\n if (key === \"default\" || key === \"__esModule\") return;\n if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;\n if (key in exports && exports[key] === _Symbols[key]) return;\n Object.defineProperty(exports, key, {\n enumerable: true,\n get: function get() {\n return _Symbols[key];\n }\n });\n});\nvar _Types = require(\"./store/Types\");\nObject.keys(_Types).forEach(function (key) {\n if (key === \"default\" || key === \"__esModule\") return;\n if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;\n if (key in exports && exports[key] === _Types[key]) return;\n Object.defineProperty(exports, key, {\n enumerable: true,\n get: function get() {\n return _Types[key];\n }\n });\n});\nvar _symbol = require(\"./symbol\");\nObject.keys(_symbol).forEach(function (key) {\n if (key === \"default\" || key === \"__esModule\") return;\n if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;\n if (key in exports && exports[key] === _symbol[key]) return;\n Object.defineProperty(exports, key, {\n enumerable: true,\n get: function get() {\n return _symbol[key];\n }\n });\n});\nvar _excluded = [\"className\", \"style\", \"value\", \"children\", \"collapsed\", \"indentWidth\", \"displayObjectSize\", \"shortenTextAfterLength\", \"highlightUpdates\", \"enableClipboard\", \"displayDataTypes\", \"objectSortKeys\", \"onExpand\", \"onCopied\"];\nvar JsonView = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {\n var _props$className = props.className,\n className = _props$className === void 0 ? '' : _props$className,\n style = props.style,\n value = props.value,\n children = props.children,\n collapsed = props.collapsed,\n _props$indentWidth = props.indentWidth,\n indentWidth = _props$indentWidth === void 0 ? 15 : _props$indentWidth,\n _props$displayObjectS = props.displayObjectSize,\n displayObjectSize = _props$displayObjectS === void 0 ? true : _props$displayObjectS,\n _props$shortenTextAft = props.shortenTextAfterLength,\n shortenTextAfterLength = _props$shortenTextAft === void 0 ? 30 : _props$shortenTextAft,\n _props$highlightUpdat = props.highlightUpdates,\n highlightUpdates = _props$highlightUpdat === void 0 ? true : _props$highlightUpdat,\n _props$enableClipboar = props.enableClipboard,\n enableClipboard = _props$enableClipboar === void 0 ? true : _props$enableClipboar,\n _props$displayDataTyp = props.displayDataTypes,\n displayDataTypes = _props$displayDataTyp === void 0 ? true : _props$displayDataTyp,\n _props$objectSortKeys = props.objectSortKeys,\n objectSortKeys = _props$objectSortKeys === void 0 ? false : _props$objectSortKeys,\n onExpand = props.onExpand,\n onCopied = props.onCopied,\n elmProps = (0, _objectWithoutProperties2[\"default\"])(props, _excluded);\n var defaultStyle = (0, _objectSpread2[\"default\"])({\n lineHeight: 1.4,\n fontFamily: 'var(--w-rjv-font-family, Menlo, monospace)',\n color: 'var(--w-rjv-color, #002b36)',\n backgroundColor: 'var(--w-rjv-background-color, #00000000)',\n fontSize: 13\n }, style);\n var cls = ['w-json-view-container', 'w-rjv', className].filter(Boolean).join(' ');\n return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_store.Provider, {\n initialState: {\n value: value,\n objectSortKeys: objectSortKeys,\n indentWidth: indentWidth,\n displayObjectSize: displayObjectSize,\n collapsed: collapsed,\n enableClipboard: enableClipboard,\n shortenTextAfterLength: shortenTextAfterLength,\n highlightUpdates: highlightUpdates,\n onCopied: onCopied,\n onExpand: onExpand\n },\n initialTypes: {\n displayDataTypes: displayDataTypes\n },\n children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_Container.Container, (0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({\n value: value\n }, elmProps), {}, {\n ref: ref,\n className: cls,\n style: defaultStyle\n })), children]\n });\n});\nJsonView.Bigint = _Bigint.Bigint;\nJsonView.Date = _Date.Date;\nJsonView.False = _False.False;\nJsonView.Float = _Float.Float;\nJsonView.Int = _Int.Int;\nJsonView.Map = _Map.Map;\nJsonView.Nan = _Nan.Nan;\nJsonView.Null = _Null.Null;\nJsonView.Set = _Set.Set;\nJsonView.String = _String.StringText;\nJsonView.True = _True.True;\nJsonView.Undefined = _Undefined.Undefined;\nJsonView.Url = _Url.Url;\nJsonView.ValueQuote = _ValueQuote.ValueQuote;\nJsonView.Arrow = _Arrow.Arrow;\nJsonView.Colon = _Colon.Colon;\nJsonView.Quote = _Quote.Quote;\nJsonView.Ellipsis = _Ellipsis.Ellipsis;\nJsonView.BraceLeft = _BraceLeft.BraceLeft;\nJsonView.BraceRight = _BraceRight.BraceRight;\nJsonView.BracketsLeft = _BracketsLeft.BracketsLeft;\nJsonView.BracketsRight = _BracketsRight.BracketsRight;\nJsonView.Copied = _Copied.Copied;\nJsonView.CountInfo = _CountInfo.CountInfo;\nJsonView.CountInfoExtra = _CountInfoExtra.CountInfoExtra;\nJsonView.KeyName = _KeyName.KeyName;\nJsonView.Row = _Row.Row;\nJsonView.displayName = 'JVR.JsonView';\nvar _default = exports[\"default\"] = JsonView;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.Copied = void 0;\nvar _Section = require(\"../store/Section\");\nvar _useRender = require(\"../utils/useRender\");\nvar Copied = exports.Copied = function Copied(props) {\n var _useSectionStore = (0, _Section.useSectionStore)(),\n _useSectionStore$Copi = _useSectionStore.Copied,\n Comp = _useSectionStore$Copi === void 0 ? {} : _useSectionStore$Copi;\n (0, _useRender.useSectionRender)(Comp, props, 'Copied');\n return null;\n};\nCopied.displayName = 'JVR.Copied';","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\")[\"default\"];\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.CountInfoComp = exports.CountInfo = void 0;\nvar _objectSpread2 = _interopRequireDefault(require(\"@babel/runtime/helpers/objectSpread2\"));\nvar _objectWithoutProperties2 = _interopRequireDefault(require(\"@babel/runtime/helpers/objectWithoutProperties\"));\nvar _Section = require(\"../store/Section\");\nvar _useRender = require(\"../utils/useRender\");\nvar _store = require(\"../store\");\nvar _jsxRuntime = require(\"react/jsx-runtime\");\nvar _excluded = [\"value\", \"keyName\"],\n _excluded2 = [\"as\", \"render\"];\nvar CountInfo = exports.CountInfo = function CountInfo(props) {\n var _useSectionStore = (0, _Section.useSectionStore)(),\n _useSectionStore$Coun = _useSectionStore.CountInfo,\n Comp = _useSectionStore$Coun === void 0 ? {} : _useSectionStore$Coun;\n (0, _useRender.useSectionRender)(Comp, props, 'CountInfo');\n return null;\n};\nCountInfo.displayName = 'JVR.CountInfo';\nvar CountInfoComp = exports.CountInfoComp = function CountInfoComp(props) {\n var _props$value = props.value,\n value = _props$value === void 0 ? {} : _props$value,\n keyName = props.keyName,\n other = (0, _objectWithoutProperties2[\"default\"])(props, _excluded);\n var _useStore = (0, _store.useStore)(),\n displayObjectSize = _useStore.displayObjectSize;\n var _useSectionStore2 = (0, _Section.useSectionStore)(),\n _useSectionStore2$Cou = _useSectionStore2.CountInfo,\n Comp = _useSectionStore2$Cou === void 0 ? {} : _useSectionStore2$Cou;\n if (!displayObjectSize) return null;\n var as = Comp.as,\n render = Comp.render,\n reset = (0, _objectWithoutProperties2[\"default\"])(Comp, _excluded2);\n var Elm = as || 'span';\n reset.style = (0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, reset.style), props.style);\n var len = Object.keys(value).length;\n if (!reset.children) {\n reset.children = \"\".concat(len, \" item\").concat(len === 1 ? '' : 's');\n }\n var elmProps = (0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, reset), other);\n var isRender = render && typeof render === 'function';\n var child = isRender && render((0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, elmProps), {}, {\n 'data-length': len\n }), {\n value: value,\n keyName: keyName\n });\n if (child) return child;\n return /*#__PURE__*/(0, _jsxRuntime.jsx)(Elm, (0, _objectSpread2[\"default\"])({}, elmProps));\n};\nCountInfoComp.displayName = 'JVR.CountInfoComp';","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\")[\"default\"];\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.CountInfoExtraComps = exports.CountInfoExtra = void 0;\nvar _objectSpread2 = _interopRequireDefault(require(\"@babel/runtime/helpers/objectSpread2\"));\nvar _objectWithoutProperties2 = _interopRequireDefault(require(\"@babel/runtime/helpers/objectWithoutProperties\"));\nvar _Section = require(\"../store/Section\");\nvar _useRender = require(\"../utils/useRender\");\nvar _jsxRuntime = require(\"react/jsx-runtime\");\nvar _excluded = [\"value\", \"keyName\"],\n _excluded2 = [\"as\", \"render\"];\nvar CountInfoExtra = exports.CountInfoExtra = function CountInfoExtra(props) {\n var _useSectionStore = (0, _Section.useSectionStore)(),\n _useSectionStore$Coun = _useSectionStore.CountInfoExtra,\n Comp = _useSectionStore$Coun === void 0 ? {} : _useSectionStore$Coun;\n (0, _useRender.useSectionRender)(Comp, props, 'CountInfoExtra');\n return null;\n};\nCountInfoExtra.displayName = 'JVR.CountInfoExtra';\nvar CountInfoExtraComps = exports.CountInfoExtraComps = function CountInfoExtraComps(props) {\n var _props$value = props.value,\n value = _props$value === void 0 ? {} : _props$value,\n keyName = props.keyName,\n other = (0, _objectWithoutProperties2[\"default\"])(props, _excluded);\n var _useSectionStore2 = (0, _Section.useSectionStore)(),\n _useSectionStore2$Cou = _useSectionStore2.CountInfoExtra,\n Comp = _useSectionStore2$Cou === void 0 ? {} : _useSectionStore2$Cou;\n var as = Comp.as,\n render = Comp.render,\n reset = (0, _objectWithoutProperties2[\"default\"])(Comp, _excluded2);\n if (!render && !reset.children) return null;\n var Elm = as || 'span';\n var isRender = render && typeof render === 'function';\n var elmProps = (0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, reset), other);\n var child = isRender && render(elmProps, {\n value: value,\n keyName: keyName\n });\n if (child) return child;\n return /*#__PURE__*/(0, _jsxRuntime.jsx)(Elm, (0, _objectSpread2[\"default\"])({}, elmProps));\n};\nCountInfoExtraComps.displayName = 'JVR.CountInfoExtraComps';","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\")[\"default\"];\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.EllipsisComp = exports.Ellipsis = void 0;\nvar _typeof2 = _interopRequireDefault(require(\"@babel/runtime/helpers/typeof\"));\nvar _objectSpread2 = _interopRequireDefault(require(\"@babel/runtime/helpers/objectSpread2\"));\nvar _objectWithoutProperties2 = _interopRequireDefault(require(\"@babel/runtime/helpers/objectWithoutProperties\"));\nvar _Section = require(\"../store/Section\");\nvar _useRender = require(\"../utils/useRender\");\nvar _jsxRuntime = require(\"react/jsx-runtime\");\nvar _excluded = [\"as\", \"render\"];\nvar Ellipsis = exports.Ellipsis = function Ellipsis(props) {\n var _useSectionStore = (0, _Section.useSectionStore)(),\n _useSectionStore$Elli = _useSectionStore.Ellipsis,\n Comp = _useSectionStore$Elli === void 0 ? {} : _useSectionStore$Elli;\n (0, _useRender.useSectionRender)(Comp, props, 'Ellipsis');\n return null;\n};\nEllipsis.displayName = 'JVR.Ellipsis';\nvar EllipsisComp = exports.EllipsisComp = function EllipsisComp(_ref) {\n var isExpanded = _ref.isExpanded,\n value = _ref.value,\n keyName = _ref.keyName;\n var _useSectionStore2 = (0, _Section.useSectionStore)(),\n _useSectionStore2$Ell = _useSectionStore2.Ellipsis,\n Comp = _useSectionStore2$Ell === void 0 ? {} : _useSectionStore2$Ell;\n var as = Comp.as,\n render = Comp.render,\n reset = (0, _objectWithoutProperties2[\"default\"])(Comp, _excluded);\n var Elm = as || 'span';\n var child = render && typeof render === 'function' && render((0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, reset), {}, {\n 'data-expanded': isExpanded\n }), {\n value: value,\n keyName: keyName\n });\n if (child) return child;\n if (!isExpanded || (0, _typeof2[\"default\"])(value) === 'object' && Object.keys(value).length == 0) return null;\n return /*#__PURE__*/(0, _jsxRuntime.jsx)(Elm, (0, _objectSpread2[\"default\"])({}, reset));\n};\nEllipsisComp.displayName = 'JVR.EllipsisComp';","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\")[\"default\"];\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.KeyNameComp = exports.KeyName = void 0;\nvar _objectSpread2 = _interopRequireDefault(require(\"@babel/runtime/helpers/objectSpread2\"));\nvar _objectWithoutProperties2 = _interopRequireDefault(require(\"@babel/runtime/helpers/objectWithoutProperties\"));\nvar _Section = require(\"../store/Section\");\nvar _useRender = require(\"../utils/useRender\");\nvar _jsxRuntime = require(\"react/jsx-runtime\");\nvar _excluded = [\"as\", \"render\"];\nvar KeyName = exports.KeyName = function KeyName(props) {\n var _useSectionStore = (0, _Section.useSectionStore)(),\n _useSectionStore$KeyN = _useSectionStore.KeyName,\n Comp = _useSectionStore$KeyN === void 0 ? {} : _useSectionStore$KeyN;\n (0, _useRender.useSectionRender)(Comp, props, 'KeyName');\n return null;\n};\nKeyName.displayName = 'JVR.KeyName';\nvar KeyNameComp = exports.KeyNameComp = function KeyNameComp(props) {\n var children = props.children,\n value = props.value,\n parentValue = props.parentValue,\n keyName = props.keyName,\n keys = props.keys;\n var isNumber = typeof children === 'number';\n var style = {\n color: isNumber ? 'var(--w-rjv-key-number, #268bd2)' : 'var(--w-rjv-key-string, #002b36)'\n };\n var _useSectionStore2 = (0, _Section.useSectionStore)(),\n _useSectionStore2$Key = _useSectionStore2.KeyName,\n Comp = _useSectionStore2$Key === void 0 ? {} : _useSectionStore2$Key;\n var as = Comp.as,\n render = Comp.render,\n reset = (0, _objectWithoutProperties2[\"default\"])(Comp, _excluded);\n reset.style = (0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, reset.style), style);\n var Elm = as || 'span';\n var child = render && typeof render === 'function' && render((0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, reset), {}, {\n children: children\n }), {\n value: value,\n parentValue: parentValue,\n keyName: keyName,\n keys: keys || (keyName ? [keyName] : [])\n });\n if (child) return child;\n return /*#__PURE__*/(0, _jsxRuntime.jsx)(Elm, (0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, reset), {}, {\n children: children\n }));\n};\nKeyNameComp.displayName = 'JVR.KeyNameComp';","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\")[\"default\"];\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.RowComp = exports.Row = void 0;\nvar _objectSpread2 = _interopRequireDefault(require(\"@babel/runtime/helpers/objectSpread2\"));\nvar _objectWithoutProperties2 = _interopRequireDefault(require(\"@babel/runtime/helpers/objectWithoutProperties\"));\nvar _Section = require(\"../store/Section\");\nvar _useRender = require(\"../utils/useRender\");\nvar _jsxRuntime = require(\"react/jsx-runtime\");\nvar _excluded = [\"children\", \"value\", \"parentValue\", \"keyName\", \"keys\"],\n _excluded2 = [\"as\", \"render\", \"children\"];\nvar Row = exports.Row = function Row(props) {\n var _useSectionStore = (0, _Section.useSectionStore)(),\n _useSectionStore$Row = _useSectionStore.Row,\n Comp = _useSectionStore$Row === void 0 ? {} : _useSectionStore$Row;\n (0, _useRender.useSectionRender)(Comp, props, 'Row');\n return null;\n};\nRow.displayName = 'JVR.Row';\nvar RowComp = exports.RowComp = function RowComp(props) {\n var children = props.children,\n value = props.value,\n parentValue = props.parentValue,\n keyName = props.keyName,\n keys = props.keys,\n other = (0, _objectWithoutProperties2[\"default\"])(props, _excluded);\n var _useSectionStore2 = (0, _Section.useSectionStore)(),\n _useSectionStore2$Row = _useSectionStore2.Row,\n Comp = _useSectionStore2$Row === void 0 ? {} : _useSectionStore2$Row;\n var as = Comp.as,\n render = Comp.render,\n _ = Comp.children,\n reset = (0, _objectWithoutProperties2[\"default\"])(Comp, _excluded2);\n var Elm = as || 'div';\n var child = render && typeof render === 'function' && render((0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, other), reset), {}, {\n children: children\n }), {\n value: value,\n keyName: keyName,\n parentValue: parentValue,\n keys: keys\n });\n if (child) return child;\n return /*#__PURE__*/(0, _jsxRuntime.jsx)(Elm, (0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, other), reset), {}, {\n children: children\n }));\n};\nRowComp.displayName = 'JVR.RowComp';","\"use strict\";\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\")[\"default\"];\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\")[\"default\"];\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.initialState = exports.Provider = exports.Context = void 0;\nexports.reducer = reducer;\nexports.useDispatch = useDispatch;\nexports.useStore = exports.useDispatchStore = void 0;\nvar _slicedToArray2 = _interopRequireDefault(require(\"@babel/runtime/helpers/slicedToArray\"));\nvar _objectSpread2 = _interopRequireDefault(require(\"@babel/runtime/helpers/objectSpread2\"));\nvar _react = _interopRequireWildcard(require(\"react\"));\nvar _ShowTools = require(\"./store/ShowTools\");\nvar _Expands = require(\"./store/Expands\");\nvar _Types = require(\"./store/Types\");\nvar _Symbols = require(\"./store/Symbols\");\nvar _Section = require(\"./store/Section\");\nvar _jsxRuntime = require(\"react/jsx-runtime\");\nvar initialState = exports.initialState = {\n objectSortKeys: false,\n indentWidth: 15\n};\nvar Context = exports.Context = /*#__PURE__*/(0, _react.createContext)(initialState);\nContext.displayName = 'JVR.Context';\nvar DispatchContext = /*#__PURE__*/(0, _react.createContext)(function () {});\nDispatchContext.displayName = 'JVR.DispatchContext';\nfunction reducer(state, action) {\n return (0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, state), action);\n}\nvar useStore = exports.useStore = function useStore() {\n return (0, _react.useContext)(Context);\n};\nvar useDispatchStore = exports.useDispatchStore = function useDispatchStore() {\n return (0, _react.useContext)(DispatchContext);\n};\nvar Provider = exports.Provider = function Provider(_ref) {\n var children = _ref.children,\n init = _ref.initialState,\n initialTypes = _ref.initialTypes;\n var _useReducer = (0, _react.useReducer)(reducer, Object.assign({}, initialState, init)),\n _useReducer2 = (0, _slicedToArray2[\"default\"])(_useReducer, 2),\n state = _useReducer2[0],\n dispatch = _useReducer2[1];\n var _useShowTools = (0, _ShowTools.useShowTools)(),\n _useShowTools2 = (0, _slicedToArray2[\"default\"])(_useShowTools, 2),\n showTools = _useShowTools2[0],\n showToolsDispatch = _useShowTools2[1];\n var _useExpands = (0, _Expands.useExpands)(),\n _useExpands2 = (0, _slicedToArray2[\"default\"])(_useExpands, 2),\n expands = _useExpands2[0],\n expandsDispatch = _useExpands2[1];\n var _useTypes = (0, _Types.useTypes)(),\n _useTypes2 = (0, _slicedToArray2[\"default\"])(_useTypes, 2),\n types = _useTypes2[0],\n typesDispatch = _useTypes2[1];\n var _useSymbols = (0, _Symbols.useSymbols)(),\n _useSymbols2 = (0, _slicedToArray2[\"default\"])(_useSymbols, 2),\n symbols = _useSymbols2[0],\n symbolsDispatch = _useSymbols2[1];\n var _useSection = (0, _Section.useSection)(),\n _useSection2 = (0, _slicedToArray2[\"default\"])(_useSection, 2),\n section = _useSection2[0],\n sectionDispatch = _useSection2[1];\n (0, _react.useEffect)(function () {\n return dispatch((0, _objectSpread2[\"default\"])({}, init));\n }, [init]);\n return /*#__PURE__*/(0, _jsxRuntime.jsx)(Context.Provider, {\n value: state,\n children: /*#__PURE__*/(0, _jsxRuntime.jsx)(DispatchContext.Provider, {\n value: dispatch,\n children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_ShowTools.ShowTools, {\n initial: showTools,\n dispatch: showToolsDispatch,\n children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Expands.Expands, {\n initial: expands,\n dispatch: expandsDispatch,\n children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Types.Types, {\n initial: (0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, types), initialTypes),\n dispatch: typesDispatch,\n children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Symbols.Symbols, {\n initial: symbols,\n dispatch: symbolsDispatch,\n children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Section.Section, {\n initial: section,\n dispatch: sectionDispatch,\n children: children\n })\n })\n })\n })\n })\n })\n });\n};\nfunction useDispatch() {\n return (0, _react.useContext)(DispatchContext);\n}\nProvider.displayName = 'JVR.Provider';","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\")[\"default\"];\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.Expands = void 0;\nexports.useExpands = useExpands;\nexports.useExpandsDispatch = useExpandsDispatch;\nexports.useExpandsStore = void 0;\nvar _objectSpread2 = _interopRequireDefault(require(\"@babel/runtime/helpers/objectSpread2\"));\nvar _react = require(\"react\");\nvar _jsxRuntime = require(\"react/jsx-runtime\");\nvar initialState = {};\nvar Context = /*#__PURE__*/(0, _react.createContext)(initialState);\nvar reducer = function reducer(state, action) {\n return (0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, state), action);\n};\nvar useExpandsStore = exports.useExpandsStore = function useExpandsStore() {\n return (0, _react.useContext)(Context);\n};\nvar DispatchExpands = /*#__PURE__*/(0, _react.createContext)(function () {});\nDispatchExpands.displayName = 'JVR.DispatchExpands';\nfunction useExpands() {\n return (0, _react.useReducer)(reducer, initialState);\n}\nfunction useExpandsDispatch() {\n return (0, _react.useContext)(DispatchExpands);\n}\nvar Expands = exports.Expands = function Expands(_ref) {\n var initial = _ref.initial,\n dispatch = _ref.dispatch,\n children = _ref.children;\n return /*#__PURE__*/(0, _jsxRuntime.jsx)(Context.Provider, {\n value: initial,\n children: /*#__PURE__*/(0, _jsxRuntime.jsx)(DispatchExpands.Provider, {\n value: dispatch,\n children: children\n })\n });\n};\nExpands.displayName = 'JVR.Expands';","\"use strict\";\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\")[\"default\"];\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\")[\"default\"];\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.Section = void 0;\nexports.useSection = useSection;\nexports.useSectionDispatch = useSectionDispatch;\nexports.useSectionStore = void 0;\nvar _objectSpread2 = _interopRequireDefault(require(\"@babel/runtime/helpers/objectSpread2\"));\nvar _react = _interopRequireWildcard(require(\"react\"));\nvar _jsxRuntime = require(\"react/jsx-runtime\");\nvar initialState = {\n Copied: {\n className: 'w-rjv-copied',\n style: {\n height: '1em',\n width: '1em',\n cursor: 'pointer',\n verticalAlign: 'middle',\n marginLeft: 5\n }\n },\n CountInfo: {\n as: 'span',\n className: 'w-rjv-object-size',\n style: {\n color: 'var(--w-rjv-info-color, #0000004d)',\n paddingLeft: 8,\n fontStyle: 'italic'\n }\n },\n CountInfoExtra: {\n as: 'span',\n className: 'w-rjv-object-extra',\n style: {\n paddingLeft: 8\n }\n },\n Ellipsis: {\n as: 'span',\n style: {\n cursor: 'pointer',\n color: 'var(--w-rjv-ellipsis-color, #cb4b16)',\n userSelect: 'none'\n },\n className: 'w-rjv-ellipsis',\n children: '...'\n },\n Row: {\n as: 'div',\n className: 'w-rjv-line'\n },\n KeyName: {\n as: 'span',\n className: 'w-rjv-object-key'\n }\n};\nvar Context = /*#__PURE__*/(0, _react.createContext)(initialState);\nvar reducer = function reducer(state, action) {\n return (0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, state), action);\n};\nvar useSectionStore = exports.useSectionStore = function useSectionStore() {\n return (0, _react.useContext)(Context);\n};\nvar DispatchSection = /*#__PURE__*/(0, _react.createContext)(function () {});\nDispatchSection.displayName = 'JVR.DispatchSection';\nfunction useSection() {\n return (0, _react.useReducer)(reducer, initialState);\n}\nfunction useSectionDispatch() {\n return (0, _react.useContext)(DispatchSection);\n}\nvar Section = exports.Section = function Section(_ref) {\n var initial = _ref.initial,\n dispatch = _ref.dispatch,\n children = _ref.children;\n return /*#__PURE__*/(0, _jsxRuntime.jsx)(Context.Provider, {\n value: initial,\n children: /*#__PURE__*/(0, _jsxRuntime.jsx)(DispatchSection.Provider, {\n value: dispatch,\n children: children\n })\n });\n};\nSection.displayName = 'JVR.Section';","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\")[\"default\"];\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.ShowTools = void 0;\nexports.useShowTools = useShowTools;\nexports.useShowToolsDispatch = useShowToolsDispatch;\nexports.useShowToolsStore = void 0;\nvar _objectSpread2 = _interopRequireDefault(require(\"@babel/runtime/helpers/objectSpread2\"));\nvar _react = require(\"react\");\nvar _jsxRuntime = require(\"react/jsx-runtime\");\nvar initialState = {};\nvar Context = /*#__PURE__*/(0, _react.createContext)(initialState);\nvar reducer = function reducer(state, action) {\n return (0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, state), action);\n};\nvar useShowToolsStore = exports.useShowToolsStore = function useShowToolsStore() {\n return (0, _react.useContext)(Context);\n};\nvar DispatchShowTools = /*#__PURE__*/(0, _react.createContext)(function () {});\nDispatchShowTools.displayName = 'JVR.DispatchShowTools';\nfunction useShowTools() {\n return (0, _react.useReducer)(reducer, initialState);\n}\nfunction useShowToolsDispatch() {\n return (0, _react.useContext)(DispatchShowTools);\n}\nvar ShowTools = exports.ShowTools = function ShowTools(_ref) {\n var initial = _ref.initial,\n dispatch = _ref.dispatch,\n children = _ref.children;\n return /*#__PURE__*/(0, _jsxRuntime.jsx)(Context.Provider, {\n value: initial,\n children: /*#__PURE__*/(0, _jsxRuntime.jsx)(DispatchShowTools.Provider, {\n value: dispatch,\n children: children\n })\n });\n};\nShowTools.displayName = 'JVR.ShowTools';","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\")[\"default\"];\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.Symbols = void 0;\nexports.useSymbols = useSymbols;\nexports.useSymbolsDispatch = useSymbolsDispatch;\nexports.useSymbolsStore = void 0;\nvar _objectSpread2 = _interopRequireDefault(require(\"@babel/runtime/helpers/objectSpread2\"));\nvar _react = require(\"react\");\nvar _TriangleArrow = require(\"../arrow/TriangleArrow\");\nvar _jsxRuntime = require(\"react/jsx-runtime\");\nvar initialState = {\n Arrow: {\n as: 'span',\n className: 'w-rjv-arrow',\n style: {\n transform: 'rotate(0deg)',\n transition: 'all 0.3s'\n },\n children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_TriangleArrow.TriangleArrow, {})\n },\n Colon: {\n as: 'span',\n style: {\n color: 'var(--w-rjv-colon-color, var(--w-rjv-color))',\n marginLeft: 0,\n marginRight: 2\n },\n className: 'w-rjv-colon',\n children: ':'\n },\n Quote: {\n as: 'span',\n style: {\n color: 'var(--w-rjv-quotes-color, #236a7c)'\n },\n className: 'w-rjv-quotes',\n children: '\"'\n },\n ValueQuote: {\n as: 'span',\n style: {\n color: 'var(--w-rjv-quotes-string-color, #cb4b16)'\n },\n className: 'w-rjv-quotes',\n children: '\"'\n },\n BracketsLeft: {\n as: 'span',\n style: {\n color: 'var(--w-rjv-brackets-color, #236a7c)'\n },\n className: 'w-rjv-brackets-start',\n children: '['\n },\n BracketsRight: {\n as: 'span',\n style: {\n color: 'var(--w-rjv-brackets-color, #236a7c)'\n },\n className: 'w-rjv-brackets-end',\n children: ']'\n },\n BraceLeft: {\n as: 'span',\n style: {\n color: 'var(--w-rjv-curlybraces-color, #236a7c)'\n },\n className: 'w-rjv-curlybraces-start',\n children: '{'\n },\n BraceRight: {\n as: 'span',\n style: {\n color: 'var(--w-rjv-curlybraces-color, #236a7c)'\n },\n className: 'w-rjv-curlybraces-end',\n children: '}'\n }\n};\nvar Context = /*#__PURE__*/(0, _react.createContext)(initialState);\nvar reducer = function reducer(state, action) {\n return (0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, state), action);\n};\nvar useSymbolsStore = exports.useSymbolsStore = function useSymbolsStore() {\n return (0, _react.useContext)(Context);\n};\nvar DispatchSymbols = /*#__PURE__*/(0, _react.createContext)(function () {});\nDispatchSymbols.displayName = 'JVR.DispatchSymbols';\nfunction useSymbols() {\n return (0, _react.useReducer)(reducer, initialState);\n}\nfunction useSymbolsDispatch() {\n return (0, _react.useContext)(DispatchSymbols);\n}\nvar Symbols = exports.Symbols = function Symbols(_ref) {\n var initial = _ref.initial,\n dispatch = _ref.dispatch,\n children = _ref.children;\n return /*#__PURE__*/(0, _jsxRuntime.jsx)(Context.Provider, {\n value: initial,\n children: /*#__PURE__*/(0, _jsxRuntime.jsx)(DispatchSymbols.Provider, {\n value: dispatch,\n children: children\n })\n });\n};\nSymbols.displayName = 'JVR.Symbols';","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\")[\"default\"];\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.Types = Types;\nexports.useTypes = useTypes;\nexports.useTypesDispatch = useTypesDispatch;\nexports.useTypesStore = void 0;\nvar _objectSpread2 = _interopRequireDefault(require(\"@babel/runtime/helpers/objectSpread2\"));\nvar _react = require(\"react\");\nvar _jsxRuntime = require(\"react/jsx-runtime\");\nvar initialState = {\n Str: {\n as: 'span',\n 'data-type': 'string',\n style: {\n color: 'var(--w-rjv-type-string-color, #cb4b16)'\n },\n className: 'w-rjv-type',\n children: 'string'\n },\n Url: {\n as: 'a',\n style: {\n color: 'var(--w-rjv-type-url-color, #0969da)'\n },\n 'data-type': 'url',\n className: 'w-rjv-type',\n children: 'url'\n },\n Undefined: {\n style: {\n color: 'var(--w-rjv-type-undefined-color, #586e75)'\n },\n as: 'span',\n 'data-type': 'undefined',\n className: 'w-rjv-type',\n children: 'undefined'\n },\n Null: {\n style: {\n color: 'var(--w-rjv-type-null-color, #d33682)'\n },\n as: 'span',\n 'data-type': 'null',\n className: 'w-rjv-type',\n children: 'null'\n },\n Map: {\n style: {\n color: 'var(--w-rjv-type-map-color, #268bd2)',\n marginRight: 3\n },\n as: 'span',\n 'data-type': 'map',\n className: 'w-rjv-type',\n children: 'Map'\n },\n Nan: {\n style: {\n color: 'var(--w-rjv-type-nan-color, #859900)'\n },\n as: 'span',\n 'data-type': 'nan',\n className: 'w-rjv-type',\n children: 'NaN'\n },\n Bigint: {\n style: {\n color: 'var(--w-rjv-type-bigint-color, #268bd2)'\n },\n as: 'span',\n 'data-type': 'bigint',\n className: 'w-rjv-type',\n children: 'bigint'\n },\n Int: {\n style: {\n color: 'var(--w-rjv-type-int-color, #268bd2)'\n },\n as: 'span',\n 'data-type': 'int',\n className: 'w-rjv-type',\n children: 'int'\n },\n Set: {\n style: {\n color: 'var(--w-rjv-type-set-color, #268bd2)',\n marginRight: 3\n },\n as: 'span',\n 'data-type': 'set',\n className: 'w-rjv-type',\n children: 'Set'\n },\n Float: {\n style: {\n color: 'var(--w-rjv-type-float-color, #859900)'\n },\n as: 'span',\n 'data-type': 'float',\n className: 'w-rjv-type',\n children: 'float'\n },\n True: {\n style: {\n color: 'var(--w-rjv-type-boolean-color, #2aa198)'\n },\n as: 'span',\n 'data-type': 'bool',\n className: 'w-rjv-type',\n children: 'bool'\n },\n False: {\n style: {\n color: 'var(--w-rjv-type-boolean-color, #2aa198)'\n },\n as: 'span',\n 'data-type': 'bool',\n className: 'w-rjv-type',\n children: 'bool'\n },\n Date: {\n style: {\n color: 'var(--w-rjv-type-date-color, #268bd2)'\n },\n as: 'span',\n 'data-type': 'date',\n className: 'w-rjv-type',\n children: 'date'\n }\n};\nvar Context = /*#__PURE__*/(0, _react.createContext)(initialState);\nvar reducer = function reducer(state, action) {\n return (0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, state), action);\n};\nvar useTypesStore = exports.useTypesStore = function useTypesStore() {\n return (0, _react.useContext)(Context);\n};\nvar DispatchTypes = /*#__PURE__*/(0, _react.createContext)(function () {});\nDispatchTypes.displayName = 'JVR.DispatchTypes';\nfunction useTypes() {\n return (0, _react.useReducer)(reducer, initialState);\n}\nfunction useTypesDispatch() {\n return (0, _react.useContext)(DispatchTypes);\n}\nfunction Types(_ref) {\n var initial = _ref.initial,\n dispatch = _ref.dispatch,\n children = _ref.children;\n return /*#__PURE__*/(0, _jsxRuntime.jsx)(Context.Provider, {\n value: initial,\n children: /*#__PURE__*/(0, _jsxRuntime.jsx)(DispatchTypes.Provider, {\n value: dispatch,\n children: children\n })\n });\n}\nTypes.displayName = 'JVR.Types';","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.Arrow = void 0;\nvar _Symbols = require(\"../store/Symbols\");\nvar _useRender = require(\"../utils/useRender\");\nvar Arrow = exports.Arrow = function Arrow(props) {\n var _useSymbolsStore = (0, _Symbols.useSymbolsStore)(),\n _useSymbolsStore$Arro = _useSymbolsStore.Arrow,\n Comp = _useSymbolsStore$Arro === void 0 ? {} : _useSymbolsStore$Arro;\n (0, _useRender.useSymbolsRender)(Comp, props, 'Arrow');\n return null;\n};\nArrow.displayName = 'JVR.Arrow';","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.BraceLeft = void 0;\nvar _Symbols = require(\"../store/Symbols\");\nvar _useRender = require(\"../utils/useRender\");\nvar BraceLeft = exports.BraceLeft = function BraceLeft(props) {\n var _useSymbolsStore = (0, _Symbols.useSymbolsStore)(),\n _useSymbolsStore$Brac = _useSymbolsStore.BraceLeft,\n Comp = _useSymbolsStore$Brac === void 0 ? {} : _useSymbolsStore$Brac;\n (0, _useRender.useSymbolsRender)(Comp, props, 'BraceLeft');\n return null;\n};\nBraceLeft.displayName = 'JVR.BraceLeft';","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.BraceRight = void 0;\nvar _Symbols = require(\"../store/Symbols\");\nvar _useRender = require(\"../utils/useRender\");\nvar BraceRight = exports.BraceRight = function BraceRight(props) {\n var _useSymbolsStore = (0, _Symbols.useSymbolsStore)(),\n _useSymbolsStore$Brac = _useSymbolsStore.BraceRight,\n Comp = _useSymbolsStore$Brac === void 0 ? {} : _useSymbolsStore$Brac;\n (0, _useRender.useSymbolsRender)(Comp, props, 'BraceRight');\n return null;\n};\nBraceRight.displayName = 'JVR.BraceRight';","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.BracketsLeft = void 0;\nvar _Symbols = require(\"../store/Symbols\");\nvar _useRender = require(\"../utils/useRender\");\nvar BracketsLeft = exports.BracketsLeft = function BracketsLeft(props) {\n var _useSymbolsStore = (0, _Symbols.useSymbolsStore)(),\n _useSymbolsStore$Brac = _useSymbolsStore.BracketsLeft,\n Comp = _useSymbolsStore$Brac === void 0 ? {} : _useSymbolsStore$Brac;\n (0, _useRender.useSymbolsRender)(Comp, props, 'BracketsLeft');\n return null;\n};\nBracketsLeft.displayName = 'JVR.BracketsLeft';","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.BracketsRight = void 0;\nvar _Symbols = require(\"../store/Symbols\");\nvar _useRender = require(\"../utils/useRender\");\nvar BracketsRight = exports.BracketsRight = function BracketsRight(props) {\n var _useSymbolsStore = (0, _Symbols.useSymbolsStore)(),\n _useSymbolsStore$Brac = _useSymbolsStore.BracketsRight,\n Comp = _useSymbolsStore$Brac === void 0 ? {} : _useSymbolsStore$Brac;\n (0, _useRender.useSymbolsRender)(Comp, props, 'BracketsRight');\n return null;\n};\nBracketsRight.displayName = 'JVR.BracketsRight';","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.Colon = void 0;\nvar _Symbols = require(\"../store/Symbols\");\nvar _useRender = require(\"../utils/useRender\");\nvar Colon = exports.Colon = function Colon(props) {\n var _useSymbolsStore = (0, _Symbols.useSymbolsStore)(),\n _useSymbolsStore$Colo = _useSymbolsStore.Colon,\n Comp = _useSymbolsStore$Colo === void 0 ? {} : _useSymbolsStore$Colo;\n (0, _useRender.useSymbolsRender)(Comp, props, 'Colon');\n return null;\n};\nColon.displayName = 'JVR.Colon';","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.Quote = void 0;\nvar _Symbols = require(\"../store/Symbols\");\nvar _useRender = require(\"../utils/useRender\");\nvar Quote = exports.Quote = function Quote(props) {\n var _useSymbolsStore = (0, _Symbols.useSymbolsStore)(),\n _useSymbolsStore$Quot = _useSymbolsStore.Quote,\n Comp = _useSymbolsStore$Quot === void 0 ? {} : _useSymbolsStore$Quot;\n (0, _useRender.useSymbolsRender)(Comp, props, 'Quote');\n return null;\n};\nQuote.displayName = 'JVR.Quote';","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.ValueQuote = void 0;\nvar _Symbols = require(\"../store/Symbols\");\nvar _useRender = require(\"../utils/useRender\");\nvar ValueQuote = exports.ValueQuote = function ValueQuote(props) {\n var _useSymbolsStore = (0, _Symbols.useSymbolsStore)(),\n _useSymbolsStore$Valu = _useSymbolsStore.ValueQuote,\n Comp = _useSymbolsStore$Valu === void 0 ? {} : _useSymbolsStore$Valu;\n (0, _useRender.useSymbolsRender)(Comp, props, 'ValueQuote');\n return null;\n};\nValueQuote.displayName = 'JVR.ValueQuote';","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\")[\"default\"];\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.ValueQuote = exports.Quote = exports.Colon = exports.BracketsOpen = exports.BracketsClose = exports.Arrow = void 0;\nvar _objectDestructuringEmpty2 = _interopRequireDefault(require(\"@babel/runtime/helpers/objectDestructuringEmpty\"));\nvar _extends2 = _interopRequireDefault(require(\"@babel/runtime/helpers/extends\"));\nvar _objectSpread2 = _interopRequireDefault(require(\"@babel/runtime/helpers/objectSpread2\"));\nvar _objectWithoutProperties2 = _interopRequireDefault(require(\"@babel/runtime/helpers/objectWithoutProperties\"));\nvar _Symbols = require(\"../store/Symbols\");\nvar _Expands = require(\"../store/Expands\");\nvar _jsxRuntime = require(\"react/jsx-runtime\");\nvar _excluded = [\"isNumber\"],\n _excluded2 = [\"as\", \"render\"],\n _excluded3 = [\"as\", \"render\"],\n _excluded4 = [\"as\", \"render\"],\n _excluded5 = [\"as\", \"style\", \"render\"],\n _excluded6 = [\"as\", \"render\"],\n _excluded7 = [\"as\", \"render\"],\n _excluded8 = [\"as\", \"render\"],\n _excluded9 = [\"as\", \"render\"];\nvar Quote = exports.Quote = function Quote(props) {\n var _useSymbolsStore = (0, _Symbols.useSymbolsStore)(),\n _useSymbolsStore$Quot = _useSymbolsStore.Quote,\n Comp = _useSymbolsStore$Quot === void 0 ? {} : _useSymbolsStore$Quot;\n var isNumber = props.isNumber,\n other = (0, _objectWithoutProperties2[\"default\"])(props, _excluded);\n if (isNumber) return null;\n var as = Comp.as,\n render = Comp.render,\n reset = (0, _objectWithoutProperties2[\"default\"])(Comp, _excluded2);\n var Elm = as || 'span';\n var elmProps = (0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, other), reset);\n var child = render && typeof render === 'function' && render(elmProps);\n if (child) return child;\n return /*#__PURE__*/(0, _jsxRuntime.jsx)(Elm, (0, _objectSpread2[\"default\"])({}, elmProps));\n};\nQuote.displayName = 'JVR.Quote';\nvar ValueQuote = exports.ValueQuote = function ValueQuote(props) {\n var _useSymbolsStore2 = (0, _Symbols.useSymbolsStore)(),\n _useSymbolsStore2$Val = _useSymbolsStore2.ValueQuote,\n Comp = _useSymbolsStore2$Val === void 0 ? {} : _useSymbolsStore2$Val;\n var other = (0, _extends2[\"default\"])({}, ((0, _objectDestructuringEmpty2[\"default\"])(props), props));\n var as = Comp.as,\n render = Comp.render,\n reset = (0, _objectWithoutProperties2[\"default\"])(Comp, _excluded3);\n var Elm = as || 'span';\n var elmProps = (0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, other), reset);\n var child = render && typeof render === 'function' && render(elmProps);\n if (child) return child;\n return /*#__PURE__*/(0, _jsxRuntime.jsx)(Elm, (0, _objectSpread2[\"default\"])({}, elmProps));\n};\nValueQuote.displayName = 'JVR.ValueQuote';\nvar Colon = exports.Colon = function Colon() {\n var _useSymbolsStore3 = (0, _Symbols.useSymbolsStore)(),\n _useSymbolsStore3$Col = _useSymbolsStore3.Colon,\n Comp = _useSymbolsStore3$Col === void 0 ? {} : _useSymbolsStore3$Col;\n var as = Comp.as,\n render = Comp.render,\n reset = (0, _objectWithoutProperties2[\"default\"])(Comp, _excluded4);\n var Elm = as || 'span';\n var child = render && typeof render === 'function' && render(reset);\n if (child) return child;\n return /*#__PURE__*/(0, _jsxRuntime.jsx)(Elm, (0, _objectSpread2[\"default\"])({}, reset));\n};\nColon.displayName = 'JVR.Colon';\nvar Arrow = exports.Arrow = function Arrow(props) {\n var _useSymbolsStore4 = (0, _Symbols.useSymbolsStore)(),\n _useSymbolsStore4$Arr = _useSymbolsStore4.Arrow,\n Comp = _useSymbolsStore4$Arr === void 0 ? {} : _useSymbolsStore4$Arr;\n var expands = (0, _Expands.useExpandsStore)();\n var expandKey = props.expandKey;\n var isExpanded = !!expands[expandKey];\n var as = Comp.as,\n style = Comp.style,\n render = Comp.render,\n reset = (0, _objectWithoutProperties2[\"default\"])(Comp, _excluded5);\n var Elm = as || 'span';\n var isRender = render && typeof render === 'function';\n var child = isRender && render((0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, reset), {}, {\n 'data-expanded': isExpanded,\n style: (0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, style), props.style)\n }));\n if (child) return child;\n return /*#__PURE__*/(0, _jsxRuntime.jsx)(Elm, (0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, reset), {}, {\n style: (0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, style), props.style)\n }));\n};\nArrow.displayName = 'JVR.Arrow';\nvar BracketsOpen = exports.BracketsOpen = function BracketsOpen(_ref) {\n var isBrackets = _ref.isBrackets;\n var _useSymbolsStore5 = (0, _Symbols.useSymbolsStore)(),\n _useSymbolsStore5$Bra = _useSymbolsStore5.BracketsLeft,\n BracketsLeft = _useSymbolsStore5$Bra === void 0 ? {} : _useSymbolsStore5$Bra,\n _useSymbolsStore5$Bra2 = _useSymbolsStore5.BraceLeft,\n BraceLeft = _useSymbolsStore5$Bra2 === void 0 ? {} : _useSymbolsStore5$Bra2;\n if (isBrackets) {\n var as = BracketsLeft.as,\n _render = BracketsLeft.render,\n reset = (0, _objectWithoutProperties2[\"default\"])(BracketsLeft, _excluded6);\n var BracketsLeftComp = as || 'span';\n var _child = _render && typeof _render === 'function' && _render(reset);\n if (_child) return _child;\n return /*#__PURE__*/(0, _jsxRuntime.jsx)(BracketsLeftComp, (0, _objectSpread2[\"default\"])({}, reset));\n }\n var elm = BraceLeft.as,\n render = BraceLeft.render,\n props = (0, _objectWithoutProperties2[\"default\"])(BraceLeft, _excluded7);\n var BraceLeftComp = elm || 'span';\n var child = render && typeof render === 'function' && render(props);\n if (child) return child;\n return /*#__PURE__*/(0, _jsxRuntime.jsx)(BraceLeftComp, (0, _objectSpread2[\"default\"])({}, props));\n};\nBracketsOpen.displayName = 'JVR.BracketsOpen';\nvar BracketsClose = exports.BracketsClose = function BracketsClose(_ref2) {\n var isBrackets = _ref2.isBrackets,\n isVisiable = _ref2.isVisiable;\n if (!isVisiable) return null;\n var _useSymbolsStore6 = (0, _Symbols.useSymbolsStore)(),\n _useSymbolsStore6$Bra = _useSymbolsStore6.BracketsRight,\n BracketsRight = _useSymbolsStore6$Bra === void 0 ? {} : _useSymbolsStore6$Bra,\n _useSymbolsStore6$Bra2 = _useSymbolsStore6.BraceRight,\n BraceRight = _useSymbolsStore6$Bra2 === void 0 ? {} : _useSymbolsStore6$Bra2;\n if (isBrackets) {\n var as = BracketsRight.as,\n _render2 = BracketsRight.render,\n _reset = (0, _objectWithoutProperties2[\"default\"])(BracketsRight, _excluded8);\n var BracketsRightComp = as || 'span';\n var _child2 = _render2 && typeof _render2 === 'function' && _render2(_reset);\n if (_child2) return _child2;\n return /*#__PURE__*/(0, _jsxRuntime.jsx)(BracketsRightComp, (0, _objectSpread2[\"default\"])({}, _reset));\n }\n var elm = BraceRight.as,\n render = BraceRight.render,\n reset = (0, _objectWithoutProperties2[\"default\"])(BraceRight, _excluded9);\n var BraceRightComp = elm || 'span';\n var child = render && typeof render === 'function' && render(reset);\n if (child) return child;\n return /*#__PURE__*/(0, _jsxRuntime.jsx)(BraceRightComp, (0, _objectSpread2[\"default\"])({}, reset));\n};\nBracketsClose.displayName = 'JVR.BracketsClose';","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.basicTheme = void 0;\nvar basicTheme = exports.basicTheme = {\n '--w-rjv-font-family': 'monospace',\n '--w-rjv-color': '#b5bd68',\n '--w-rjv-key-number': '#002b36',\n '--w-rjv-key-string': '#b5bd68',\n '--w-rjv-background-color': '#2E3235',\n '--w-rjv-line-color': '#292d30',\n '--w-rjv-arrow-color': 'var(--w-rjv-color)',\n '--w-rjv-edit-color': 'var(--w-rjv-color)',\n '--w-rjv-info-color': '#d8d8d84d',\n '--w-rjv-update-color': '#b5bd68',\n '--w-rjv-copied-color': '#b5bd68',\n '--w-rjv-copied-success-color': '#28a745',\n '--w-rjv-curlybraces-color': '#cc99cc',\n '--w-rjv-colon-color': '#bababa',\n '--w-rjv-brackets-color': '#808080',\n '--w-rjv-ellipsis-color': '#cb4b16',\n '--w-rjv-quotes-color': 'var(--w-rjv-key-string)',\n '--w-rjv-quotes-string-color': 'var(--w-rjv-type-string-color)',\n '--w-rjv-type-string-color': '#b5bd68',\n '--w-rjv-type-int-color': '#fda331',\n '--w-rjv-type-float-color': '#fda331',\n '--w-rjv-type-bigint-color': '#fda331',\n '--w-rjv-type-boolean-color': '#fda331',\n '--w-rjv-type-date-color': '#8abeb7',\n '--w-rjv-type-url-color': '#5a89c0',\n '--w-rjv-type-null-color': '#8abeb7',\n '--w-rjv-type-nan-color': '#8abeb7',\n '--w-rjv-type-undefined-color': '#8abeb7'\n};","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.darkTheme = void 0;\nvar darkTheme = exports.darkTheme = {\n '--w-rjv-font-family': 'monospace',\n '--w-rjv-color': '#0184a6',\n '--w-rjv-key-string': '#0184a6',\n '--w-rjv-background-color': '#202020',\n '--w-rjv-line-color': '#323232',\n '--w-rjv-arrow-color': 'var(--w-rjv-color)',\n '--w-rjv-edit-color': 'var(--w-rjv-color)',\n '--w-rjv-info-color': '#656565',\n '--w-rjv-update-color': '#ebcb8b',\n '--w-rjv-copied-color': '#0184a6',\n '--w-rjv-copied-success-color': '#28a745',\n '--w-rjv-curlybraces-color': '#1896b6',\n '--w-rjv-brackets-color': '#1896b6',\n '--w-rjv-quotes-color': 'var(--w-rjv-key-string)',\n '--w-rjv-quotes-string-color': 'var(--w-rjv-type-string-color)',\n '--w-rjv-type-string-color': '#cb4b16',\n '--w-rjv-type-int-color': '#268bd2',\n '--w-rjv-type-float-color': '#859900',\n '--w-rjv-type-bigint-color': '#268bd2',\n '--w-rjv-type-boolean-color': '#2aa198',\n '--w-rjv-type-date-color': '#586e75',\n '--w-rjv-type-url-color': '#649bd8',\n '--w-rjv-type-null-color': '#d33682',\n '--w-rjv-type-nan-color': '#076678',\n '--w-rjv-type-undefined-color': '#586e75'\n};","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.githubDarkTheme = void 0;\nvar githubDarkTheme = exports.githubDarkTheme = {\n '--w-rjv-font-family': 'monospace',\n '--w-rjv-color': '#79c0ff',\n '--w-rjv-key-string': '#79c0ff',\n '--w-rjv-background-color': '#0d1117',\n '--w-rjv-line-color': '#94949480',\n '--w-rjv-arrow-color': '#ccc',\n '--w-rjv-edit-color': 'var(--w-rjv-color)',\n '--w-rjv-info-color': '#7b7b7b',\n '--w-rjv-update-color': '#ebcb8b',\n '--w-rjv-copied-color': '#79c0ff',\n '--w-rjv-copied-success-color': '#28a745',\n '--w-rjv-curlybraces-color': '#8b949e',\n '--w-rjv-colon-color': '#c9d1d9',\n '--w-rjv-brackets-color': '#8b949e',\n '--w-rjv-quotes-color': 'var(--w-rjv-key-string)',\n '--w-rjv-quotes-string-color': 'var(--w-rjv-type-string-color)',\n '--w-rjv-type-string-color': '#a5d6ff',\n '--w-rjv-type-int-color': '#79c0ff',\n '--w-rjv-type-float-color': '#79c0ff',\n '--w-rjv-type-bigint-color': '#79c0ff',\n '--w-rjv-type-boolean-color': '#ffab70',\n '--w-rjv-type-date-color': '#79c0ff',\n '--w-rjv-type-url-color': '#4facff',\n '--w-rjv-type-null-color': '#ff7b72',\n '--w-rjv-type-nan-color': '#859900',\n '--w-rjv-type-undefined-color': '#79c0ff'\n};","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.githubLightTheme = void 0;\nvar githubLightTheme = exports.githubLightTheme = {\n '--w-rjv-font-family': 'monospace',\n '--w-rjv-color': '#6f42c1',\n '--w-rjv-key-string': '#6f42c1',\n '--w-rjv-background-color': '#ffffff',\n '--w-rjv-line-color': '#ddd',\n '--w-rjv-arrow-color': '#6e7781',\n '--w-rjv-edit-color': 'var(--w-rjv-color)',\n '--w-rjv-info-color': '#0000004d',\n '--w-rjv-update-color': '#ebcb8b',\n '--w-rjv-copied-color': '#002b36',\n '--w-rjv-copied-success-color': '#28a745',\n '--w-rjv-curlybraces-color': '#6a737d',\n '--w-rjv-colon-color': '#24292e',\n '--w-rjv-brackets-color': '#6a737d',\n '--w-rjv-quotes-color': 'var(--w-rjv-key-string)',\n '--w-rjv-quotes-string-color': 'var(--w-rjv-type-string-color)',\n '--w-rjv-type-string-color': '#032f62',\n '--w-rjv-type-int-color': '#005cc5',\n '--w-rjv-type-float-color': '#005cc5',\n '--w-rjv-type-bigint-color': '#005cc5',\n '--w-rjv-type-boolean-color': '#d73a49',\n '--w-rjv-type-date-color': '#005cc5',\n '--w-rjv-type-url-color': '#0969da',\n '--w-rjv-type-null-color': '#d73a49',\n '--w-rjv-type-nan-color': '#859900',\n '--w-rjv-type-undefined-color': '#005cc5'\n};","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.gruvboxTheme = void 0;\nvar gruvboxTheme = exports.gruvboxTheme = {\n '--w-rjv-font-family': 'monospace',\n '--w-rjv-color': '#3c3836',\n '--w-rjv-key-string': '#3c3836',\n '--w-rjv-background-color': '#fbf1c7',\n '--w-rjv-line-color': '#ebdbb2',\n '--w-rjv-arrow-color': 'var(--w-rjv-color)',\n '--w-rjv-edit-color': 'var(--w-rjv-color)',\n '--w-rjv-info-color': '#0000004d',\n '--w-rjv-update-color': '#ebcb8b',\n '--w-rjv-copied-color': '#002b36',\n '--w-rjv-copied-success-color': '#28a745',\n '--w-rjv-curlybraces-color': '#236a7c',\n '--w-rjv-colon-color': '#002b36',\n '--w-rjv-brackets-color': '#236a7c',\n '--w-rjv-quotes-color': 'var(--w-rjv-key-string)',\n '--w-rjv-quotes-string-color': 'var(--w-rjv-type-string-color)',\n '--w-rjv-type-string-color': '#3c3836',\n '--w-rjv-type-int-color': '#8f3f71',\n '--w-rjv-type-float-color': '#8f3f71',\n '--w-rjv-type-bigint-color': '#8f3f71',\n '--w-rjv-type-boolean-color': '#8f3f71',\n '--w-rjv-type-date-color': '#076678',\n '--w-rjv-type-url-color': '#0969da',\n '--w-rjv-type-null-color': '#076678',\n '--w-rjv-type-nan-color': '#076678',\n '--w-rjv-type-undefined-color': '#076678'\n};","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.lightTheme = void 0;\nvar lightTheme = exports.lightTheme = {\n '--w-rjv-font-family': 'monospace',\n '--w-rjv-color': '#002b36',\n '--w-rjv-key-string': '#002b36',\n '--w-rjv-background-color': '#ffffff',\n '--w-rjv-line-color': '#ebebeb',\n '--w-rjv-arrow-color': 'var(--w-rjv-color)',\n '--w-rjv-edit-color': 'var(--w-rjv-color)',\n '--w-rjv-info-color': '#0000004d',\n '--w-rjv-update-color': '#ebcb8b',\n '--w-rjv-copied-color': '#002b36',\n '--w-rjv-copied-success-color': '#28a745',\n '--w-rjv-curlybraces-color': '#236a7c',\n '--w-rjv-colon-color': '#002b36',\n '--w-rjv-brackets-color': '#236a7c',\n '--w-rjv-quotes-color': 'var(--w-rjv-key-string)',\n '--w-rjv-quotes-string-color': 'var(--w-rjv-type-string-color)',\n '--w-rjv-type-string-color': '#cb4b16',\n '--w-rjv-type-int-color': '#268bd2',\n '--w-rjv-type-float-color': '#859900',\n '--w-rjv-type-bigint-color': '#268bd2',\n '--w-rjv-type-boolean-color': '#2aa198',\n '--w-rjv-type-date-color': '#586e75',\n '--w-rjv-type-url-color': '#0969da',\n '--w-rjv-type-null-color': '#d33682',\n '--w-rjv-type-nan-color': '#859900',\n '--w-rjv-type-undefined-color': '#586e75'\n};","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.monokaiTheme = void 0;\nvar monokaiTheme = exports.monokaiTheme = {\n '--w-rjv-font-family': 'monospace',\n '--w-rjv-color': '#E6DB74',\n '--w-rjv-key-string': '#E6DB74',\n '--w-rjv-background-color': '#272822',\n '--w-rjv-line-color': '#3e3d32',\n '--w-rjv-arrow-color': '#f8f8f2',\n '--w-rjv-edit-color': 'var(--w-rjv-color)',\n '--w-rjv-info-color': '#cecece4d',\n '--w-rjv-update-color': '#5f5600',\n '--w-rjv-copied-color': '#E6DB74',\n '--w-rjv-copied-success-color': '#28a745',\n '--w-rjv-curlybraces-color': '#f8f8f2',\n '--w-rjv-colon-color': '#f8f8f2',\n '--w-rjv-brackets-color': '#f8f8f2',\n '--w-rjv-quotes-color': 'var(--w-rjv-key-string)',\n '--w-rjv-quotes-string-color': 'var(--w-rjv-type-string-color)',\n '--w-rjv-type-string-color': '#E6DB74',\n '--w-rjv-type-int-color': '#AE81FF',\n '--w-rjv-type-float-color': '#AE81FF',\n '--w-rjv-type-bigint-color': '#AE81FF',\n '--w-rjv-type-boolean-color': '#AE81FF',\n '--w-rjv-type-date-color': '#fd9720c7',\n '--w-rjv-type-url-color': '#55a3ff',\n '--w-rjv-type-null-color': '#FA2672',\n '--w-rjv-type-nan-color': '#FD971F',\n '--w-rjv-type-undefined-color': '#FD971F'\n};","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.nordTheme = void 0;\nvar nordTheme = exports.nordTheme = {\n '--w-rjv-font-family': 'monospace',\n '--w-rjv-color': '#88c0d0',\n '--w-rjv-key-string': '#88c0d0',\n '--w-rjv-background-color': '#2e3440',\n '--w-rjv-line-color': '#4c566a',\n '--w-rjv-arrow-color': 'var(--w-rjv-color)',\n '--w-rjv-edit-color': 'var(--w-rjv-color)',\n '--w-rjv-info-color': '#c7c7c74d',\n '--w-rjv-update-color': '#88c0cf75',\n '--w-rjv-copied-color': '#119cc0',\n '--w-rjv-copied-success-color': '#28a745',\n '--w-rjv-curlybraces-color': '#8fbcbb',\n '--w-rjv-colon-color': '#6d9fac',\n '--w-rjv-brackets-color': '#8fbcbb',\n '--w-rjv-quotes-color': 'var(--w-rjv-key-string)',\n '--w-rjv-quotes-string-color': 'var(--w-rjv-type-string-color)',\n '--w-rjv-type-string-color': '#a3be8c',\n '--w-rjv-type-int-color': '#b48ead',\n '--w-rjv-type-float-color': '#859900',\n '--w-rjv-type-bigint-color': '#b48ead',\n '--w-rjv-type-boolean-color': '#d08770',\n '--w-rjv-type-date-color': '#41a2c2',\n '--w-rjv-type-url-color': '#5e81ac',\n '--w-rjv-type-null-color': '#5e81ac',\n '--w-rjv-type-nan-color': '#859900',\n '--w-rjv-type-undefined-color': '#586e75'\n};","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.vscodeTheme = void 0;\nvar vscodeTheme = exports.vscodeTheme = {\n '--w-rjv-font-family': 'monospace',\n '--w-rjv-color': '#9cdcfe',\n '--w-rjv-key-string': '#9cdcfe',\n '--w-rjv-background-color': '#1e1e1e',\n '--w-rjv-line-color': '#36334280',\n '--w-rjv-arrow-color': '#838383',\n '--w-rjv-edit-color': 'var(--w-rjv-color)',\n '--w-rjv-info-color': '#9c9c9c7a',\n '--w-rjv-update-color': '#9cdcfe',\n '--w-rjv-copied-color': '#9cdcfe',\n '--w-rjv-copied-success-color': '#28a745',\n '--w-rjv-curlybraces-color': '#d4d4d4',\n '--w-rjv-colon-color': '#d4d4d4',\n '--w-rjv-brackets-color': '#d4d4d4',\n '--w-rjv-quotes-color': 'var(--w-rjv-key-string)',\n '--w-rjv-quotes-string-color': 'var(--w-rjv-type-string-color)',\n '--w-rjv-type-string-color': '#ce9178',\n '--w-rjv-type-int-color': '#b5cea8',\n '--w-rjv-type-float-color': '#b5cea8',\n '--w-rjv-type-bigint-color': '#b5cea8',\n '--w-rjv-type-boolean-color': '#569cd6',\n '--w-rjv-type-date-color': '#b5cea8',\n '--w-rjv-type-url-color': '#3b89cf',\n '--w-rjv-type-null-color': '#569cd6',\n '--w-rjv-type-nan-color': '#859900',\n '--w-rjv-type-undefined-color': '#569cd6'\n};","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.Bigint = void 0;\nvar _Types = require(\"../store/Types\");\nvar _useRender = require(\"../utils/useRender\");\nvar Bigint = exports.Bigint = function Bigint(props) {\n var _useTypesStore = (0, _Types.useTypesStore)(),\n _useTypesStore$Bigint = _useTypesStore.Bigint,\n Comp = _useTypesStore$Bigint === void 0 ? {} : _useTypesStore$Bigint;\n (0, _useRender.useTypesRender)(Comp, props, 'Bigint');\n return null;\n};\nBigint.displayName = 'JVR.Bigint';","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.Date = void 0;\nvar _Types = require(\"../store/Types\");\nvar _useRender = require(\"../utils/useRender\");\nvar Date = exports.Date = function Date(props) {\n var _useTypesStore = (0, _Types.useTypesStore)(),\n _useTypesStore$Date = _useTypesStore.Date,\n Comp = _useTypesStore$Date === void 0 ? {} : _useTypesStore$Date;\n (0, _useRender.useTypesRender)(Comp, props, 'Date');\n return null;\n};\nDate.displayName = 'JVR.Date';","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.False = void 0;\nvar _Types = require(\"../store/Types\");\nvar _useRender = require(\"../utils/useRender\");\nvar False = exports.False = function False(props) {\n var _useTypesStore = (0, _Types.useTypesStore)(),\n _useTypesStore$False = _useTypesStore.False,\n Comp = _useTypesStore$False === void 0 ? {} : _useTypesStore$False;\n (0, _useRender.useTypesRender)(Comp, props, 'False');\n return null;\n};\nFalse.displayName = 'JVR.False';","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.Float = void 0;\nvar _Types = require(\"../store/Types\");\nvar _useRender = require(\"../utils/useRender\");\nvar Float = exports.Float = function Float(props) {\n var _useTypesStore = (0, _Types.useTypesStore)(),\n _useTypesStore$Float = _useTypesStore.Float,\n Comp = _useTypesStore$Float === void 0 ? {} : _useTypesStore$Float;\n (0, _useRender.useTypesRender)(Comp, props, 'Float');\n return null;\n};\nFloat.displayName = 'JVR.Float';","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.Int = void 0;\nvar _Types = require(\"../store/Types\");\nvar _useRender = require(\"../utils/useRender\");\nvar Int = exports.Int = function Int(props) {\n var _useTypesStore = (0, _Types.useTypesStore)(),\n _useTypesStore$Int = _useTypesStore.Int,\n Comp = _useTypesStore$Int === void 0 ? {} : _useTypesStore$Int;\n (0, _useRender.useTypesRender)(Comp, props, 'Int');\n return null;\n};\nInt.displayName = 'JVR.Int';","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.Map = void 0;\nvar _Types = require(\"../store/Types\");\nvar _useRender = require(\"../utils/useRender\");\nvar Map = exports.Map = function Map(props) {\n var _useTypesStore = (0, _Types.useTypesStore)(),\n _useTypesStore$Map = _useTypesStore.Map,\n Comp = _useTypesStore$Map === void 0 ? {} : _useTypesStore$Map;\n (0, _useRender.useTypesRender)(Comp, props, 'Map');\n return null;\n};\nMap.displayName = 'JVR.Map';","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.Nan = void 0;\nvar _Types = require(\"../store/Types\");\nvar _useRender = require(\"../utils/useRender\");\nvar Nan = exports.Nan = function Nan(props) {\n var _useTypesStore = (0, _Types.useTypesStore)(),\n _useTypesStore$Nan = _useTypesStore.Nan,\n Comp = _useTypesStore$Nan === void 0 ? {} : _useTypesStore$Nan;\n (0, _useRender.useTypesRender)(Comp, props, 'Nan');\n return null;\n};\nNan.displayName = 'JVR.Nan';","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.Null = void 0;\nvar _Types = require(\"../store/Types\");\nvar _useRender = require(\"../utils/useRender\");\nvar Null = exports.Null = function Null(props) {\n var _useTypesStore = (0, _Types.useTypesStore)(),\n _useTypesStore$Null = _useTypesStore.Null,\n Comp = _useTypesStore$Null === void 0 ? {} : _useTypesStore$Null;\n (0, _useRender.useTypesRender)(Comp, props, 'Null');\n return null;\n};\nNull.displayName = 'JVR.Null';","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.Set = void 0;\nvar _Types = require(\"../store/Types\");\nvar _useRender = require(\"../utils/useRender\");\nvar Set = exports.Set = function Set(props) {\n var _useTypesStore = (0, _Types.useTypesStore)(),\n _useTypesStore$Set = _useTypesStore.Set,\n Comp = _useTypesStore$Set === void 0 ? {} : _useTypesStore$Set;\n (0, _useRender.useTypesRender)(Comp, props, 'Set');\n return null;\n};\nSet.displayName = 'JVR.Set';","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.StringText = void 0;\nvar _Types = require(\"../store/Types\");\nvar _useRender = require(\"../utils/useRender\");\nvar StringText = exports.StringText = function StringText(props) {\n var _useTypesStore = (0, _Types.useTypesStore)(),\n _useTypesStore$Str = _useTypesStore.Str,\n Comp = _useTypesStore$Str === void 0 ? {} : _useTypesStore$Str;\n (0, _useRender.useTypesRender)(Comp, props, 'Str');\n return null;\n};\nStringText.displayName = 'JVR.StringText';","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.True = void 0;\nvar _Types = require(\"../store/Types\");\nvar _useRender = require(\"../utils/useRender\");\nvar True = exports.True = function True(props) {\n var _useTypesStore = (0, _Types.useTypesStore)(),\n _useTypesStore$True = _useTypesStore.True,\n Comp = _useTypesStore$True === void 0 ? {} : _useTypesStore$True;\n (0, _useRender.useTypesRender)(Comp, props, 'True');\n return null;\n};\nTrue.displayName = 'JVR.True';","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.Undefined = void 0;\nvar _Types = require(\"../store/Types\");\nvar _useRender = require(\"../utils/useRender\");\nvar Undefined = exports.Undefined = function Undefined(props) {\n var _useTypesStore = (0, _Types.useTypesStore)(),\n _useTypesStore$Undefi = _useTypesStore.Undefined,\n Comp = _useTypesStore$Undefi === void 0 ? {} : _useTypesStore$Undefi;\n (0, _useRender.useTypesRender)(Comp, props, 'Undefined');\n return null;\n};\nUndefined.displayName = 'JVR.Undefined';","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.Url = void 0;\nvar _Types = require(\"../store/Types\");\nvar _useRender = require(\"../utils/useRender\");\nvar Url = exports.Url = function Url(props) {\n var _useTypesStore = (0, _Types.useTypesStore)(),\n _useTypesStore$Url = _useTypesStore.Url,\n Comp = _useTypesStore$Url === void 0 ? {} : _useTypesStore$Url;\n (0, _useRender.useTypesRender)(Comp, props, 'Url');\n return null;\n};\nUrl.displayName = 'JVR.Url';","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\")[\"default\"];\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.bigIntToString = exports.TypeUrl = exports.TypeUndefined = exports.TypeTrue = exports.TypeString = exports.TypeNull = exports.TypeNan = exports.TypeInt = exports.TypeFloat = exports.TypeFalse = exports.TypeDate = exports.TypeBigint = exports.SetComp = exports.MapComp = void 0;\nvar _slicedToArray2 = _interopRequireDefault(require(\"@babel/runtime/helpers/slicedToArray\"));\nvar _objectSpread2 = _interopRequireDefault(require(\"@babel/runtime/helpers/objectSpread2\"));\nvar _objectWithoutProperties2 = _interopRequireDefault(require(\"@babel/runtime/helpers/objectWithoutProperties\"));\nvar _react = require(\"react\");\nvar _store = require(\"../store\");\nvar _Types = require(\"../store/Types\");\nvar _symbol = require(\"../symbol\");\nvar _jsxRuntime = require(\"react/jsx-runtime\");\nvar _excluded = [\"as\", \"render\"],\n _excluded2 = [\"as\", \"render\"],\n _excluded3 = [\"as\", \"render\"],\n _excluded4 = [\"as\", \"render\"],\n _excluded5 = [\"as\", \"render\"],\n _excluded6 = [\"as\", \"render\"],\n _excluded7 = [\"as\", \"render\"],\n _excluded8 = [\"as\", \"render\"],\n _excluded9 = [\"as\", \"render\"],\n _excluded10 = [\"as\", \"render\"],\n _excluded11 = [\"as\", \"render\"],\n _excluded12 = [\"as\", \"render\"],\n _excluded13 = [\"as\", \"render\"];\nvar bigIntToString = exports.bigIntToString = function bigIntToString(bi) {\n if (bi === undefined) {\n return '0n';\n } else if (typeof bi === 'string') {\n try {\n bi = BigInt(bi);\n } catch (e) {\n return '0n';\n }\n }\n return bi ? bi.toString() + 'n' : '0n';\n};\nvar SetComp = exports.SetComp = function SetComp(_ref) {\n var value = _ref.value,\n keyName = _ref.keyName;\n var _useTypesStore = (0, _Types.useTypesStore)(),\n _useTypesStore$Set = _useTypesStore.Set,\n Comp = _useTypesStore$Set === void 0 ? {} : _useTypesStore$Set,\n displayDataTypes = _useTypesStore.displayDataTypes;\n var isSet = value instanceof Set;\n if (!isSet || !displayDataTypes) return null;\n var as = Comp.as,\n render = Comp.render,\n reset = (0, _objectWithoutProperties2[\"default\"])(Comp, _excluded);\n var isRender = render && typeof render === 'function';\n var type = isRender && render(reset, {\n type: 'type',\n value: value,\n keyName: keyName\n });\n if (type) return type;\n var Elm = as || 'span';\n return /*#__PURE__*/(0, _jsxRuntime.jsx)(Elm, (0, _objectSpread2[\"default\"])({}, reset));\n};\nSetComp.displayName = 'JVR.SetComp';\nvar MapComp = exports.MapComp = function MapComp(_ref2) {\n var value = _ref2.value,\n keyName = _ref2.keyName;\n var _useTypesStore2 = (0, _Types.useTypesStore)(),\n _useTypesStore2$Map = _useTypesStore2.Map,\n Comp = _useTypesStore2$Map === void 0 ? {} : _useTypesStore2$Map,\n displayDataTypes = _useTypesStore2.displayDataTypes;\n var isMap = value instanceof Map;\n if (!isMap || !displayDataTypes) return null;\n var as = Comp.as,\n render = Comp.render,\n reset = (0, _objectWithoutProperties2[\"default\"])(Comp, _excluded2);\n var isRender = render && typeof render === 'function';\n var type = isRender && render(reset, {\n type: 'type',\n value: value,\n keyName: keyName\n });\n if (type) return type;\n var Elm = as || 'span';\n return /*#__PURE__*/(0, _jsxRuntime.jsx)(Elm, (0, _objectSpread2[\"default\"])({}, reset));\n};\nMapComp.displayName = 'JVR.MapComp';\nvar defalutStyle = {\n opacity: 0.75,\n paddingRight: 4\n};\nvar TypeString = exports.TypeString = function TypeString(_ref3) {\n var _ref3$children = _ref3.children,\n children = _ref3$children === void 0 ? '' : _ref3$children,\n keyName = _ref3.keyName;\n var _useTypesStore3 = (0, _Types.useTypesStore)(),\n _useTypesStore3$Str = _useTypesStore3.Str,\n Str = _useTypesStore3$Str === void 0 ? {} : _useTypesStore3$Str,\n displayDataTypes = _useTypesStore3.displayDataTypes;\n var _useStore = (0, _store.useStore)(),\n _useStore$shortenText = _useStore.shortenTextAfterLength,\n length = _useStore$shortenText === void 0 ? 30 : _useStore$shortenText;\n var as = Str.as,\n render = Str.render,\n reset = (0, _objectWithoutProperties2[\"default\"])(Str, _excluded3);\n var childrenStr = children;\n var _useState = (0, _react.useState)(length && childrenStr.length > length),\n _useState2 = (0, _slicedToArray2[\"default\"])(_useState, 2),\n shorten = _useState2[0],\n setShorten = _useState2[1];\n (0, _react.useEffect)(function () {\n return setShorten(length && childrenStr.length > length);\n }, [length]);\n var Comp = as || 'span';\n var style = (0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, defalutStyle), Str.style || {});\n if (length > 0) {\n reset.style = (0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, reset.style), {}, {\n cursor: childrenStr.length <= length ? 'initial' : 'pointer'\n });\n if (childrenStr.length > length) {\n reset.onClick = function () {\n setShorten(!shorten);\n };\n }\n }\n var text = shorten ? \"\".concat(childrenStr.slice(0, length), \"...\") : childrenStr;\n var isRender = render && typeof render === 'function';\n var type = isRender && render((0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, reset), {}, {\n style: style\n }), {\n type: 'type',\n value: children,\n keyName: keyName\n });\n var child = isRender && render((0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, reset), {}, {\n children: text,\n className: 'w-rjv-value'\n }), {\n type: 'value',\n value: children,\n keyName: keyName\n });\n return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_react.Fragment, {\n children: [displayDataTypes && (type || /*#__PURE__*/(0, _jsxRuntime.jsx)(Comp, (0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, reset), {}, {\n style: style\n }))), child || /*#__PURE__*/(0, _jsxRuntime.jsxs)(_react.Fragment, {\n children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_symbol.ValueQuote, {}), /*#__PURE__*/(0, _jsxRuntime.jsx)(Comp, (0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, reset), {}, {\n className: \"w-rjv-value\",\n children: text\n })), /*#__PURE__*/(0, _jsxRuntime.jsx)(_symbol.ValueQuote, {})]\n })]\n });\n};\nTypeString.displayName = 'JVR.TypeString';\nvar TypeTrue = exports.TypeTrue = function TypeTrue(_ref4) {\n var children = _ref4.children,\n keyName = _ref4.keyName;\n var _useTypesStore4 = (0, _Types.useTypesStore)(),\n _useTypesStore4$True = _useTypesStore4.True,\n True = _useTypesStore4$True === void 0 ? {} : _useTypesStore4$True,\n displayDataTypes = _useTypesStore4.displayDataTypes;\n var as = True.as,\n render = True.render,\n reset = (0, _objectWithoutProperties2[\"default\"])(True, _excluded4);\n var Comp = as || 'span';\n var style = (0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, defalutStyle), True.style || {});\n var isRender = render && typeof render === 'function';\n var type = isRender && render((0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, reset), {}, {\n style: style\n }), {\n type: 'type',\n value: children,\n keyName: keyName\n });\n var child = isRender && render((0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, reset), {}, {\n children: children,\n className: 'w-rjv-value'\n }), {\n type: 'value',\n value: children,\n keyName: keyName\n });\n return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_react.Fragment, {\n children: [displayDataTypes && (type || /*#__PURE__*/(0, _jsxRuntime.jsx)(Comp, (0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, reset), {}, {\n style: style\n }))), child || /*#__PURE__*/(0, _jsxRuntime.jsx)(Comp, (0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, reset), {}, {\n className: \"w-rjv-value\",\n children: children === null || children === void 0 ? void 0 : children.toString()\n }))]\n });\n};\nTypeTrue.displayName = 'JVR.TypeTrue';\nvar TypeFalse = exports.TypeFalse = function TypeFalse(_ref5) {\n var children = _ref5.children,\n keyName = _ref5.keyName;\n var _useTypesStore5 = (0, _Types.useTypesStore)(),\n _useTypesStore5$False = _useTypesStore5.False,\n False = _useTypesStore5$False === void 0 ? {} : _useTypesStore5$False,\n displayDataTypes = _useTypesStore5.displayDataTypes;\n var as = False.as,\n render = False.render,\n reset = (0, _objectWithoutProperties2[\"default\"])(False, _excluded5);\n var Comp = as || 'span';\n var style = (0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, defalutStyle), False.style || {});\n var isRender = render && typeof render === 'function';\n var type = isRender && render((0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, reset), {}, {\n style: style\n }), {\n type: 'type',\n value: children,\n keyName: keyName\n });\n var child = isRender && render((0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, reset), {}, {\n children: children,\n className: 'w-rjv-value'\n }), {\n type: 'value',\n value: children,\n keyName: keyName\n });\n return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_react.Fragment, {\n children: [displayDataTypes && (type || /*#__PURE__*/(0, _jsxRuntime.jsx)(Comp, (0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, reset), {}, {\n style: style\n }))), child || /*#__PURE__*/(0, _jsxRuntime.jsx)(Comp, (0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, reset), {}, {\n className: \"w-rjv-value\",\n children: children === null || children === void 0 ? void 0 : children.toString()\n }))]\n });\n};\nTypeFalse.displayName = 'JVR.TypeFalse';\nvar TypeFloat = exports.TypeFloat = function TypeFloat(_ref6) {\n var children = _ref6.children,\n keyName = _ref6.keyName;\n var _useTypesStore6 = (0, _Types.useTypesStore)(),\n _useTypesStore6$Float = _useTypesStore6.Float,\n Float = _useTypesStore6$Float === void 0 ? {} : _useTypesStore6$Float,\n displayDataTypes = _useTypesStore6.displayDataTypes;\n var as = Float.as,\n render = Float.render,\n reset = (0, _objectWithoutProperties2[\"default\"])(Float, _excluded6);\n var Comp = as || 'span';\n var style = (0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, defalutStyle), Float.style || {});\n var isRender = render && typeof render === 'function';\n var type = isRender && render((0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, reset), {}, {\n style: style\n }), {\n type: 'type',\n value: children,\n keyName: keyName\n });\n var child = isRender && render((0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, reset), {}, {\n children: children,\n className: 'w-rjv-value'\n }), {\n type: 'value',\n value: children,\n keyName: keyName\n });\n return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_react.Fragment, {\n children: [displayDataTypes && (type || /*#__PURE__*/(0, _jsxRuntime.jsx)(Comp, (0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, reset), {}, {\n style: style\n }))), child || /*#__PURE__*/(0, _jsxRuntime.jsx)(Comp, (0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, reset), {}, {\n className: \"w-rjv-value\",\n children: children === null || children === void 0 ? void 0 : children.toString()\n }))]\n });\n};\nTypeFloat.displayName = 'JVR.TypeFloat';\nvar TypeInt = exports.TypeInt = function TypeInt(_ref7) {\n var children = _ref7.children,\n keyName = _ref7.keyName;\n var _useTypesStore7 = (0, _Types.useTypesStore)(),\n _useTypesStore7$Int = _useTypesStore7.Int,\n Int = _useTypesStore7$Int === void 0 ? {} : _useTypesStore7$Int,\n displayDataTypes = _useTypesStore7.displayDataTypes;\n var as = Int.as,\n render = Int.render,\n reset = (0, _objectWithoutProperties2[\"default\"])(Int, _excluded7);\n var Comp = as || 'span';\n var style = (0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, defalutStyle), Int.style || {});\n var isRender = render && typeof render === 'function';\n var type = isRender && render((0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, reset), {}, {\n style: style\n }), {\n type: 'type',\n value: children,\n keyName: keyName\n });\n var child = isRender && render((0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, reset), {}, {\n children: children,\n className: 'w-rjv-value'\n }), {\n type: 'value',\n value: children,\n keyName: keyName\n });\n return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_react.Fragment, {\n children: [displayDataTypes && (type || /*#__PURE__*/(0, _jsxRuntime.jsx)(Comp, (0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, reset), {}, {\n style: style\n }))), child || /*#__PURE__*/(0, _jsxRuntime.jsx)(Comp, (0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, reset), {}, {\n className: \"w-rjv-value\",\n children: children === null || children === void 0 ? void 0 : children.toString()\n }))]\n });\n};\nTypeInt.displayName = 'JVR.TypeInt';\nvar TypeBigint = exports.TypeBigint = function TypeBigint(_ref8) {\n var children = _ref8.children,\n keyName = _ref8.keyName;\n var _useTypesStore8 = (0, _Types.useTypesStore)(),\n _useTypesStore8$Bigin = _useTypesStore8.Bigint,\n CompBigint = _useTypesStore8$Bigin === void 0 ? {} : _useTypesStore8$Bigin,\n displayDataTypes = _useTypesStore8.displayDataTypes;\n var as = CompBigint.as,\n render = CompBigint.render,\n reset = (0, _objectWithoutProperties2[\"default\"])(CompBigint, _excluded8);\n var Comp = as || 'span';\n var style = (0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, defalutStyle), CompBigint.style || {});\n var isRender = render && typeof render === 'function';\n var type = isRender && render((0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, reset), {}, {\n style: style\n }), {\n type: 'type',\n value: children,\n keyName: keyName\n });\n var child = isRender && render((0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, reset), {}, {\n children: children,\n className: 'w-rjv-value'\n }), {\n type: 'value',\n value: children,\n keyName: keyName\n });\n return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_react.Fragment, {\n children: [displayDataTypes && (type || /*#__PURE__*/(0, _jsxRuntime.jsx)(Comp, (0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, reset), {}, {\n style: style\n }))), child || /*#__PURE__*/(0, _jsxRuntime.jsx)(Comp, (0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, reset), {}, {\n className: \"w-rjv-value\",\n children: bigIntToString(children === null || children === void 0 ? void 0 : children.toString())\n }))]\n });\n};\nTypeBigint.displayName = 'JVR.TypeFloat';\nvar TypeUrl = exports.TypeUrl = function TypeUrl(_ref9) {\n var children = _ref9.children,\n keyName = _ref9.keyName;\n var _useTypesStore9 = (0, _Types.useTypesStore)(),\n _useTypesStore9$Url = _useTypesStore9.Url,\n Url = _useTypesStore9$Url === void 0 ? {} : _useTypesStore9$Url,\n displayDataTypes = _useTypesStore9.displayDataTypes;\n var as = Url.as,\n render = Url.render,\n reset = (0, _objectWithoutProperties2[\"default\"])(Url, _excluded9);\n var Comp = as || 'span';\n var style = (0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, defalutStyle), Url.style);\n var isRender = render && typeof render === 'function';\n var type = isRender && render((0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, reset), {}, {\n style: style\n }), {\n type: 'type',\n value: children,\n keyName: keyName\n });\n var child = isRender && render((0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, reset), {}, {\n children: children === null || children === void 0 ? void 0 : children.href,\n className: 'w-rjv-value'\n }), {\n type: 'value',\n value: children,\n keyName: keyName\n });\n return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_react.Fragment, {\n children: [displayDataTypes && (type || /*#__PURE__*/(0, _jsxRuntime.jsx)(Comp, (0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, reset), {}, {\n style: style\n }))), child || /*#__PURE__*/(0, _jsxRuntime.jsxs)(\"a\", (0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({\n href: children === null || children === void 0 ? void 0 : children.href,\n target: \"_blank\"\n }, reset), {}, {\n className: \"w-rjv-value\",\n children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_symbol.ValueQuote, {}), children === null || children === void 0 ? void 0 : children.href, /*#__PURE__*/(0, _jsxRuntime.jsx)(_symbol.ValueQuote, {})]\n }))]\n });\n};\nTypeUrl.displayName = 'JVR.TypeUrl';\nvar TypeDate = exports.TypeDate = function TypeDate(_ref10) {\n var children = _ref10.children,\n keyName = _ref10.keyName;\n var _useTypesStore10 = (0, _Types.useTypesStore)(),\n _useTypesStore10$Date = _useTypesStore10.Date,\n CompData = _useTypesStore10$Date === void 0 ? {} : _useTypesStore10$Date,\n displayDataTypes = _useTypesStore10.displayDataTypes;\n var as = CompData.as,\n render = CompData.render,\n reset = (0, _objectWithoutProperties2[\"default\"])(CompData, _excluded10);\n var Comp = as || 'span';\n var style = (0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, defalutStyle), CompData.style || {});\n var isRender = render && typeof render === 'function';\n var type = isRender && render((0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, reset), {}, {\n style: style\n }), {\n type: 'type',\n value: children,\n keyName: keyName\n });\n var childStr = children instanceof Date ? children.toLocaleString() : children;\n var child = isRender && render((0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, reset), {}, {\n children: childStr,\n className: 'w-rjv-value'\n }), {\n type: 'value',\n value: children,\n keyName: keyName\n });\n return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_react.Fragment, {\n children: [displayDataTypes && (type || /*#__PURE__*/(0, _jsxRuntime.jsx)(Comp, (0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, reset), {}, {\n style: style\n }))), child || /*#__PURE__*/(0, _jsxRuntime.jsx)(Comp, (0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, reset), {}, {\n className: \"w-rjv-value\",\n children: childStr\n }))]\n });\n};\nTypeDate.displayName = 'JVR.TypeDate';\nvar TypeUndefined = exports.TypeUndefined = function TypeUndefined(_ref11) {\n var children = _ref11.children,\n keyName = _ref11.keyName;\n var _useTypesStore11 = (0, _Types.useTypesStore)(),\n _useTypesStore11$Unde = _useTypesStore11.Undefined,\n Undefined = _useTypesStore11$Unde === void 0 ? {} : _useTypesStore11$Unde,\n displayDataTypes = _useTypesStore11.displayDataTypes;\n var as = Undefined.as,\n render = Undefined.render,\n reset = (0, _objectWithoutProperties2[\"default\"])(Undefined, _excluded11);\n var Comp = as || 'span';\n var style = (0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, defalutStyle), Undefined.style || {});\n var isRender = render && typeof render === 'function';\n var type = isRender && render((0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, reset), {}, {\n style: style\n }), {\n type: 'type',\n value: children,\n keyName: keyName\n });\n var child = isRender && render((0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, reset), {}, {\n children: children,\n className: 'w-rjv-value'\n }), {\n type: 'value',\n value: children,\n keyName: keyName\n });\n return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_react.Fragment, {\n children: [displayDataTypes && (type || /*#__PURE__*/(0, _jsxRuntime.jsx)(Comp, (0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, reset), {}, {\n style: style\n }))), child]\n });\n};\nTypeUndefined.displayName = 'JVR.TypeUndefined';\nvar TypeNull = exports.TypeNull = function TypeNull(_ref12) {\n var children = _ref12.children,\n keyName = _ref12.keyName;\n var _useTypesStore12 = (0, _Types.useTypesStore)(),\n _useTypesStore12$Null = _useTypesStore12.Null,\n Null = _useTypesStore12$Null === void 0 ? {} : _useTypesStore12$Null,\n displayDataTypes = _useTypesStore12.displayDataTypes;\n var as = Null.as,\n render = Null.render,\n reset = (0, _objectWithoutProperties2[\"default\"])(Null, _excluded12);\n var Comp = as || 'span';\n var style = (0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, defalutStyle), Null.style || {});\n var isRender = render && typeof render === 'function';\n var type = isRender && render((0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, reset), {}, {\n style: style\n }), {\n type: 'type',\n value: children,\n keyName: keyName\n });\n var child = isRender && render((0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, reset), {}, {\n children: children,\n className: 'w-rjv-value'\n }), {\n type: 'value',\n value: children,\n keyName: keyName\n });\n return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_react.Fragment, {\n children: [displayDataTypes && (type || /*#__PURE__*/(0, _jsxRuntime.jsx)(Comp, (0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, reset), {}, {\n style: style\n }))), child]\n });\n};\nTypeNull.displayName = 'JVR.TypeNull';\nvar TypeNan = exports.TypeNan = function TypeNan(_ref13) {\n var children = _ref13.children,\n keyName = _ref13.keyName;\n var _useTypesStore13 = (0, _Types.useTypesStore)(),\n _useTypesStore13$Nan = _useTypesStore13.Nan,\n Nan = _useTypesStore13$Nan === void 0 ? {} : _useTypesStore13$Nan,\n displayDataTypes = _useTypesStore13.displayDataTypes;\n var as = Nan.as,\n render = Nan.render,\n reset = (0, _objectWithoutProperties2[\"default\"])(Nan, _excluded13);\n var Comp = as || 'span';\n var style = (0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, defalutStyle), Nan.style || {});\n var isRender = render && typeof render === 'function';\n var type = isRender && render((0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, reset), {}, {\n style: style\n }), {\n type: 'type',\n value: children,\n keyName: keyName\n });\n var child = isRender && render((0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, reset), {}, {\n children: children === null || children === void 0 ? void 0 : children.toString(),\n className: 'w-rjv-value'\n }), {\n type: 'value',\n value: children,\n keyName: keyName\n });\n return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_react.Fragment, {\n children: [displayDataTypes && (type || /*#__PURE__*/(0, _jsxRuntime.jsx)(Comp, (0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, reset), {}, {\n style: style\n }))), child]\n });\n};\nTypeNan.displayName = 'JVR.TypeNan';","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\")[\"default\"];\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.useHighlight = useHighlight;\nexports.usePrevious = usePrevious;\nvar _typeof2 = _interopRequireDefault(require(\"@babel/runtime/helpers/typeof\"));\nvar _react = require(\"react\");\nfunction usePrevious(value) {\n var ref = (0, _react.useRef)();\n (0, _react.useEffect)(function () {\n ref.current = value;\n });\n return ref.current;\n}\nfunction useHighlight(_ref) {\n var value = _ref.value,\n highlightUpdates = _ref.highlightUpdates,\n highlightContainer = _ref.highlightContainer;\n var prevValue = usePrevious(value);\n var isHighlight = (0, _react.useMemo)(function () {\n if (!highlightUpdates || prevValue === undefined) return false;\n // highlight if value type changed\n if ((0, _typeof2[\"default\"])(value) !== (0, _typeof2[\"default\"])(prevValue)) {\n return true;\n }\n if (typeof value === 'number') {\n // notice: NaN !== NaN\n if (isNaN(value) && isNaN(prevValue)) return false;\n return value !== prevValue;\n }\n // highlight if isArray changed\n if (Array.isArray(value) !== Array.isArray(prevValue)) {\n return true;\n }\n // not highlight object/function\n // deep compare they will be slow\n if ((0, _typeof2[\"default\"])(value) === 'object' || typeof value === 'function') {\n return false;\n }\n\n // highlight if not equal\n if (value !== prevValue) {\n return true;\n }\n }, [highlightUpdates, value]);\n (0, _react.useEffect)(function () {\n if (highlightContainer && highlightContainer.current && isHighlight && 'animate' in highlightContainer.current) {\n highlightContainer.current.animate([{\n backgroundColor: 'var(--w-rjv-update-color, #ebcb8b)'\n }, {\n backgroundColor: ''\n }], {\n duration: 1000,\n easing: 'ease-in'\n });\n }\n }, [isHighlight, value, highlightContainer]);\n}","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\")[\"default\"];\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.useSectionRender = useSectionRender;\nexports.useSymbolsRender = useSymbolsRender;\nexports.useTypesRender = useTypesRender;\nvar _defineProperty2 = _interopRequireDefault(require(\"@babel/runtime/helpers/defineProperty\"));\nvar _objectSpread2 = _interopRequireDefault(require(\"@babel/runtime/helpers/objectSpread2\"));\nvar _react = require(\"react\");\nvar _Symbols = require(\"../store/Symbols\");\nvar _Types = require(\"../store/Types\");\nvar _Section = require(\"../store/Section\");\nfunction useSymbolsRender(currentProps, props, key) {\n var dispatch = (0, _Symbols.useSymbolsDispatch)();\n var cls = [currentProps.className, props.className].filter(Boolean).join(' ');\n var reset = (0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, currentProps), props), {}, {\n className: cls,\n style: (0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, currentProps.style), props.style),\n children: props.children || currentProps.children\n });\n (0, _react.useEffect)(function () {\n return dispatch((0, _defineProperty2[\"default\"])({}, key, reset));\n }, [props]);\n}\nfunction useTypesRender(currentProps, props, key) {\n var dispatch = (0, _Types.useTypesDispatch)();\n var cls = [currentProps.className, props.className].filter(Boolean).join(' ');\n var reset = (0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, currentProps), props), {}, {\n className: cls,\n style: (0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, currentProps.style), props.style),\n children: props.children || currentProps.children\n });\n (0, _react.useEffect)(function () {\n return dispatch((0, _defineProperty2[\"default\"])({}, key, reset));\n }, [props]);\n}\nfunction useSectionRender(currentProps, props, key) {\n var dispatch = (0, _Section.useSectionDispatch)();\n var cls = [currentProps.className, props.className].filter(Boolean).join(' ');\n var reset = (0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, currentProps), props), {}, {\n className: cls,\n style: (0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, currentProps.style), props.style),\n children: props.children || currentProps.children\n });\n (0, _react.useEffect)(function () {\n return dispatch((0, _defineProperty2[\"default\"])({}, key, reset));\n }, [props]);\n}","/**\n * *** This styling is an extra step which is likely not required. ***\n * https://github.com/w3c/clipboard-apis/blob/master/explainer.adoc#writing-to-the-clipboard\n * \n * Why is it here? To ensure:\n * \n * 1. the element is able to have focus and selection.\n * 2. if element was to flash render it has minimal visual impact.\n * 3. less flakyness with selection and copying which **might** occur if\n * the textarea element is not visible.\n *\n * The likelihood is the element won't even render, not even a flash,\n * so some of these are just precautions. However in IE the element\n * is visible whilst the popup box asking the user for permission for\n * the web page to copy to the clipboard.\n * \n * Place in top-left corner of screen regardless of scroll position.\n *\n * @typedef CopyTextToClipboard\n * @property {(text: string, method?: (isCopy: boolean) => void) => void} void\n * @returns {void}\n * \n * @param {string} text \n * @param {CopyTextToClipboard} cb \n */\nexport default function copyTextToClipboard(text, cb) {\n if (typeof document === \"undefined\") return;\n const el = document.createElement('textarea');\n el.value = text;\n el.setAttribute('readonly', '');\n el.style = {\n position: 'absolute',\n left: '-9999px',\n }\n document.body.appendChild(el);\n const selected = document.getSelection().rangeCount > 0 ? document.getSelection().getRangeAt(0) : false;\n el.select();\n let isCopy = false;\n try {\n const successful = document.execCommand('copy');\n isCopy = !!successful;\n } catch (err) {\n isCopy = false;\n }\n document.body.removeChild(el);\n if (selected && document.getSelection) {\n document.getSelection().removeAllRanges();\n document.getSelection().addRange(selected);\n }\n cb && cb(isCopy);\n};\n","import _extends from \"@babel/runtime/helpers/extends\";\nvar RGB_MAX = 255;\nvar HUE_MAX = 360;\nvar SV_MAX = 100;\n/**\n * ```js\n * rgbaToHsva({ r: 255, g: 255, b: 255, a: 1 }) //=> { h: 0, s: 0, v: 100, a: 1 }\n * ```\n */\nexport var rgbaToHsva = _ref => {\n var {\n r,\n g,\n b,\n a\n } = _ref;\n var max = Math.max(r, g, b);\n var delta = max - Math.min(r, g, b);\n\n // prettier-ignore\n var hh = delta ? max === r ? (g - b) / delta : max === g ? 2 + (b - r) / delta : 4 + (r - g) / delta : 0;\n return {\n h: 60 * (hh < 0 ? hh + 6 : hh),\n s: max ? delta / max * SV_MAX : 0,\n v: max / RGB_MAX * SV_MAX,\n a\n };\n};\nexport var hsvaToHslString = hsva => {\n var {\n h,\n s,\n l\n } = hsvaToHsla(hsva);\n // return `hsl(${h}, ${s}%, ${l}%)`;\n return \"hsl(\" + h + \", \" + Math.round(s) + \"%, \" + Math.round(l) + \"%)\";\n};\nexport var hsvaToHsvString = _ref2 => {\n var {\n h,\n s,\n v\n } = _ref2;\n return \"hsv(\" + h + \", \" + s + \"%, \" + v + \"%)\";\n};\nexport var hsvaToHsvaString = _ref3 => {\n var {\n h,\n s,\n v,\n a\n } = _ref3;\n return \"hsva(\" + h + \", \" + s + \"%, \" + v + \"%, \" + a + \")\";\n};\nexport var hsvaToHslaString = hsva => {\n var {\n h,\n s,\n l,\n a\n } = hsvaToHsla(hsva);\n return \"hsla(\" + h + \", \" + s + \"%, \" + l + \"%, \" + a + \")\";\n};\nexport var hslStringToHsla = str => {\n var [h, s, l, a] = (str.match(/\\d+/g) || []).map(Number);\n return {\n h,\n s,\n l,\n a\n };\n};\nexport var hslaStringToHsva = hslString => {\n var matcher = /hsla?\\(?\\s*(-?\\d*\\.?\\d+)(deg|rad|grad|turn)?[,\\s]+(-?\\d*\\.?\\d+)%?[,\\s]+(-?\\d*\\.?\\d+)%?,?\\s*[/\\s]*(-?\\d*\\.?\\d+)?(%)?\\s*\\)?/i;\n var match = matcher.exec(hslString);\n if (!match) return {\n h: 0,\n s: 0,\n v: 0,\n a: 1\n };\n return hslaToHsva({\n h: parseHue(match[1], match[2]),\n s: Number(match[3]),\n l: Number(match[4]),\n a: match[5] === undefined ? 1 : Number(match[5]) / (match[6] ? 100 : 1)\n });\n};\nexport var hslStringToHsva = hslaStringToHsva;\nexport var hslaToHsva = _ref4 => {\n var {\n h,\n s,\n l,\n a\n } = _ref4;\n s *= (l < 50 ? l : SV_MAX - l) / SV_MAX;\n return {\n h: h,\n s: s > 0 ? 2 * s / (l + s) * SV_MAX : 0,\n v: l + s,\n a\n };\n};\nexport var hsvaToHsla = _ref5 => {\n var {\n h,\n s,\n v,\n a\n } = _ref5;\n var hh = (200 - s) * v / SV_MAX;\n return {\n h,\n s: hh > 0 && hh < 200 ? s * v / SV_MAX / (hh <= SV_MAX ? hh : 200 - hh) * SV_MAX : 0,\n l: hh / 2,\n a\n };\n};\nexport var hsvaStringToHsva = hsvString => {\n var matcher = /hsva?\\(?\\s*(-?\\d*\\.?\\d+)(deg|rad|grad|turn)?[,\\s]+(-?\\d*\\.?\\d+)%?[,\\s]+(-?\\d*\\.?\\d+)%?,?\\s*[/\\s]*(-?\\d*\\.?\\d+)?(%)?\\s*\\)?/i;\n var match = matcher.exec(hsvString);\n if (!match) return {\n h: 0,\n s: 0,\n v: 0,\n a: 1\n };\n return {\n h: parseHue(match[1], match[2]),\n s: Number(match[3]),\n v: Number(match[4]),\n a: match[5] === undefined ? 1 : Number(match[5]) / (match[6] ? SV_MAX : 1)\n };\n};\n\n/**\n * Valid CSS units.\n * https://developer.mozilla.org/en-US/docs/Web/CSS/angle\n */\nvar angleUnits = {\n grad: HUE_MAX / 400,\n turn: HUE_MAX,\n rad: HUE_MAX / (Math.PI * 2)\n};\nexport var parseHue = function parseHue(value, unit) {\n if (unit === void 0) {\n unit = 'deg';\n }\n return Number(value) * (angleUnits[unit] || 1);\n};\nexport var hsvStringToHsva = hsvaStringToHsva;\nexport var rgbaStringToHsva = rgbaString => {\n var matcher = /rgba?\\(?\\s*(-?\\d*\\.?\\d+)(%)?[,\\s]+(-?\\d*\\.?\\d+)(%)?[,\\s]+(-?\\d*\\.?\\d+)(%)?,?\\s*[/\\s]*(-?\\d*\\.?\\d+)?(%)?\\s*\\)?/i;\n var match = matcher.exec(rgbaString);\n if (!match) return {\n h: 0,\n s: 0,\n v: 0,\n a: 1\n };\n return rgbaToHsva({\n r: Number(match[1]) / (match[2] ? SV_MAX / RGB_MAX : 1),\n g: Number(match[3]) / (match[4] ? SV_MAX / RGB_MAX : 1),\n b: Number(match[5]) / (match[6] ? SV_MAX / RGB_MAX : 1),\n a: match[7] === undefined ? 1 : Number(match[7]) / (match[8] ? SV_MAX : 1)\n });\n};\nexport var rgbStringToHsva = rgbaStringToHsva;\n\n/** Converts an RGBA color plus alpha transparency to hex */\nexport var rgbaToHex = _ref6 => {\n var {\n r,\n g,\n b\n } = _ref6;\n var bin = r << 16 | g << 8 | b;\n return \"#\" + (h => new Array(7 - h.length).join('0') + h)(bin.toString(16));\n};\nexport var rgbaToHexa = _ref7 => {\n var {\n r,\n g,\n b,\n a\n } = _ref7;\n var alpha = typeof a === 'number' && (a * 255 | 1 << 8).toString(16).slice(1);\n return \"\" + rgbaToHex({\n r,\n g,\n b,\n a\n }) + (alpha ? alpha : '');\n};\nexport var hexToHsva = hex => rgbaToHsva(hexToRgba(hex));\nexport var hexToRgba = hex => {\n var htemp = hex.replace('#', '');\n if (/^#?/.test(hex) && htemp.length === 3) {\n hex = \"#\" + htemp.charAt(0) + htemp.charAt(0) + htemp.charAt(1) + htemp.charAt(1) + htemp.charAt(2) + htemp.charAt(2);\n }\n var reg = new RegExp(\"[A-Za-z0-9]{2}\", 'g');\n var [r, g, b = 0, a] = hex.match(reg).map(v => parseInt(v, 16));\n return {\n r,\n g,\n b,\n a: (a != null ? a : 255) / RGB_MAX\n };\n};\n\n/**\n * Converts HSVA to RGBA. Based on formula from https://en.wikipedia.org/wiki/HSL_and_HSV\n * @param color HSVA color as an array [0-360, 0-1, 0-1, 0-1]\n */\nexport var hsvaToRgba = _ref8 => {\n var {\n h,\n s,\n v,\n a\n } = _ref8;\n var _h = h / 60,\n _s = s / SV_MAX,\n _v = v / SV_MAX,\n hi = Math.floor(_h) % 6;\n var f = _h - Math.floor(_h),\n _p = RGB_MAX * _v * (1 - _s),\n _q = RGB_MAX * _v * (1 - _s * f),\n _t = RGB_MAX * _v * (1 - _s * (1 - f));\n _v *= RGB_MAX;\n var rgba = {};\n switch (hi) {\n case 0:\n rgba.r = _v;\n rgba.g = _t;\n rgba.b = _p;\n break;\n case 1:\n rgba.r = _q;\n rgba.g = _v;\n rgba.b = _p;\n break;\n case 2:\n rgba.r = _p;\n rgba.g = _v;\n rgba.b = _t;\n break;\n case 3:\n rgba.r = _p;\n rgba.g = _q;\n rgba.b = _v;\n break;\n case 4:\n rgba.r = _t;\n rgba.g = _p;\n rgba.b = _v;\n break;\n case 5:\n rgba.r = _v;\n rgba.g = _p;\n rgba.b = _q;\n break;\n }\n rgba.r = Math.round(rgba.r);\n rgba.g = Math.round(rgba.g);\n rgba.b = Math.round(rgba.b);\n return _extends({}, rgba, {\n a\n });\n};\nexport var hsvaToRgbString = hsva => {\n var {\n r,\n g,\n b\n } = hsvaToRgba(hsva);\n return \"rgb(\" + r + \", \" + g + \", \" + b + \")\";\n};\nexport var hsvaToRgbaString = hsva => {\n var {\n r,\n g,\n b,\n a\n } = hsvaToRgba(hsva);\n return \"rgba(\" + r + \", \" + g + \", \" + b + \", \" + a + \")\";\n};\nexport var rgbaToRgb = _ref9 => {\n var {\n r,\n g,\n b\n } = _ref9;\n return {\n r,\n g,\n b\n };\n};\nexport var hslaToHsl = _ref10 => {\n var {\n h,\n s,\n l\n } = _ref10;\n return {\n h,\n s,\n l\n };\n};\nexport var hsvaToHex = hsva => rgbaToHex(hsvaToRgba(hsva));\nexport var hsvaToHexa = hsva => rgbaToHexa(hsvaToRgba(hsva));\nexport var hsvaToHsv = _ref11 => {\n var {\n h,\n s,\n v\n } = _ref11;\n return {\n h,\n s,\n v\n };\n};\nexport var color = str => {\n var rgb;\n var hsl;\n var hsv;\n var rgba;\n var hsla;\n var hsva;\n var hex;\n var hexa;\n if (typeof str === 'string' && validHex(str)) {\n hsva = hexToHsva(str);\n hex = str;\n } else if (typeof str !== 'string') {\n hsva = str;\n }\n if (hsva) {\n hsv = hsvaToHsv(hsva);\n hsla = hsvaToHsla(hsva);\n rgba = hsvaToRgba(hsva);\n hexa = rgbaToHexa(rgba);\n hex = hsvaToHex(hsva);\n hsl = hslaToHsl(hsla);\n rgb = rgbaToRgb(rgba);\n }\n return {\n rgb,\n hsl,\n hsv,\n rgba,\n hsla,\n hsva,\n hex,\n hexa\n };\n};\nexport var getContrastingColor = str => {\n if (!str) {\n return '#ffffff';\n }\n var col = color(str);\n var yiq = (col.rgb.r * 299 + col.rgb.g * 587 + col.rgb.b * 114) / 1000;\n return yiq >= 128 ? '#000000' : '#ffffff';\n};\nexport var equalColorObjects = (first, second) => {\n if (first === second) return true;\n for (var prop in first) {\n // The following allows for a type-safe calling of this function (first & second have to be HSL, HSV, or RGB)\n // with type-unsafe iterating over object keys. TS does not allow this without an index (`[key: string]: number`)\n // on an object to define how iteration is normally done. To ensure extra keys are not allowed on our types,\n // we must cast our object to unknown (as RGB demands `r` be a key, while `Record` does not care if\n // there is or not), and then as a type TS can iterate over.\n if (first[prop] !== second[prop]) return false;\n }\n return true;\n};\nexport var equalColorString = (first, second) => {\n return first.replace(/\\s/g, '') === second.replace(/\\s/g, '');\n};\nexport var equalHex = (first, second) => {\n if (first.toLowerCase() === second.toLowerCase()) return true;\n\n // To compare colors like `#FFF` and `ffffff` we convert them into RGB objects\n return equalColorObjects(hexToRgba(first), hexToRgba(second));\n};\nexport var validHex = hex => /^#?([A-Fa-f0-9]{3,4}){1,2}$/.test(hex);","import { useRef, useEffect, useCallback } from 'react';\n\n// Saves incoming handler to the ref in order to avoid \"useCallback hell\"\nexport function useEventCallback(handler) {\n var callbackRef = useRef(handler);\n useEffect(() => {\n callbackRef.current = handler;\n });\n return useCallback((value, event) => callbackRef.current && callbackRef.current(value, event), []);\n}\n\n// Check if an event was triggered by touch\nexport var isTouch = event => 'touches' in event;\n\n// Browsers introduced an intervention, making touch events passive by default.\n// This workaround removes `preventDefault` call from the touch handlers.\n// https://github.com/facebook/react/issues/19651\nexport var preventDefaultMove = event => {\n !isTouch(event) && event.preventDefault && event.preventDefault();\n};\n// Clamps a value between an upper and lower bound.\n// We use ternary operators because it makes the minified code\n// 2 times shorter then `Math.min(Math.max(a,b),c)`\nexport var clamp = function clamp(number, min, max) {\n if (min === void 0) {\n min = 0;\n }\n if (max === void 0) {\n max = 1;\n }\n return number > max ? max : number < min ? min : number;\n};\n// Returns a relative position of the pointer inside the node's bounding box\nexport var getRelativePosition = (node, event) => {\n var rect = node.getBoundingClientRect();\n\n // Get user's pointer position from `touches` array if it's a `TouchEvent`\n var pointer = isTouch(event) ? event.touches[0] : event;\n return {\n left: clamp((pointer.pageX - (rect.left + window.pageXOffset)) / rect.width),\n top: clamp((pointer.pageY - (rect.top + window.pageYOffset)) / rect.height),\n width: rect.width,\n height: rect.height,\n x: pointer.pageX - (rect.left + window.pageXOffset),\n y: pointer.pageY - (rect.top + window.pageYOffset)\n };\n};","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/objectWithoutPropertiesLoose\";\nvar _excluded = [\"prefixCls\", \"className\", \"onMove\", \"onDown\"];\nimport React, { useRef, useState, useCallback, useEffect } from 'react';\nimport { isTouch, preventDefaultMove, getRelativePosition, useEventCallback } from './utils';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport * from './utils';\nvar Interactive = /*#__PURE__*/React.forwardRef((props, ref) => {\n var {\n prefixCls = 'w-color-interactive',\n className,\n onMove,\n onDown\n } = props,\n reset = _objectWithoutPropertiesLoose(props, _excluded);\n var container = useRef(null);\n var hasTouched = useRef(false);\n var [isDragging, setDragging] = useState(false);\n var onMoveCallback = useEventCallback(onMove);\n var onKeyCallback = useEventCallback(onDown);\n\n // Prevent mobile browsers from handling mouse events (conflicting with touch ones).\n // If we detected a touch interaction before, we prefer reacting to touch events only.\n var isValid = event => {\n if (hasTouched.current && !isTouch(event)) return false;\n hasTouched.current = isTouch(event);\n return true;\n };\n var handleMove = useCallback(event => {\n preventDefaultMove(event);\n // If user moves the pointer outside of the window or iframe bounds and release it there,\n // `mouseup`/`touchend` won't be fired. In order to stop the picker from following the cursor\n // after the user has moved the mouse/finger back to the document, we check `event.buttons`\n // and `event.touches`. It allows us to detect that the user is just moving his pointer\n // without pressing it down\n var isDown = isTouch(event) ? event.touches.length > 0 : event.buttons > 0;\n if (isDown && container.current) {\n onMoveCallback && onMoveCallback(getRelativePosition(container.current, event), event);\n } else {\n setDragging(false);\n }\n }, [onMoveCallback]);\n var handleMoveEnd = useCallback(() => setDragging(false), []);\n var toggleDocumentEvents = useCallback(state => {\n var toggleEvent = state ? window.addEventListener : window.removeEventListener;\n toggleEvent(hasTouched.current ? 'touchmove' : 'mousemove', handleMove);\n toggleEvent(hasTouched.current ? 'touchend' : 'mouseup', handleMoveEnd);\n }, []);\n useEffect(() => {\n toggleDocumentEvents(isDragging);\n return () => {\n isDragging && toggleDocumentEvents(false);\n };\n }, [isDragging, toggleDocumentEvents]);\n var handleMoveStart = useCallback(event => {\n preventDefaultMove(event.nativeEvent);\n if (!isValid(event.nativeEvent)) return;\n onKeyCallback && onKeyCallback(getRelativePosition(container.current, event.nativeEvent), event.nativeEvent);\n setDragging(true);\n }, [onKeyCallback]);\n return /*#__PURE__*/_jsx(\"div\", _extends({}, reset, {\n className: [prefixCls, className || ''].filter(Boolean).join(' '),\n style: _extends({}, reset.style, {\n touchAction: 'none'\n }),\n ref: container,\n tabIndex: 0,\n onMouseDown: handleMoveStart,\n onTouchStart: handleMoveStart\n }));\n});\nInteractive.displayName = 'Interactive';\nexport default Interactive;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/objectWithoutPropertiesLoose\";\nvar _excluded = [\"className\", \"prefixCls\", \"left\", \"top\", \"style\", \"fillProps\"];\nimport React from 'react';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport var Pointer = _ref => {\n var {\n className,\n prefixCls,\n left,\n top,\n style,\n fillProps\n } = _ref,\n reset = _objectWithoutPropertiesLoose(_ref, _excluded);\n var styleWrapper = _extends({}, style, {\n position: 'absolute',\n left,\n top\n });\n var stylePointer = _extends({\n width: 18,\n height: 18,\n boxShadow: 'var(--alpha-pointer-box-shadow)',\n borderRadius: '50%',\n backgroundColor: 'var(--alpha-pointer-background-color)'\n }, fillProps == null ? void 0 : fillProps.style, {\n transform: left ? 'translate(-9px, -1px)' : 'translate(-1px, -9px)'\n });\n return /*#__PURE__*/_jsx(\"div\", _extends({\n className: prefixCls + \"-pointer \" + (className || ''),\n style: styleWrapper\n }, reset, {\n children: /*#__PURE__*/_jsx(\"div\", _extends({\n className: prefixCls + \"-fill\"\n }, fillProps, {\n style: stylePointer\n }))\n }));\n};","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/objectWithoutPropertiesLoose\";\nvar _excluded = [\"prefixCls\", \"className\", \"hsva\", \"background\", \"bgProps\", \"innerProps\", \"pointerProps\", \"radius\", \"width\", \"height\", \"direction\", \"style\", \"onChange\", \"pointer\"];\nimport React from 'react';\nimport { hsvaToHslaString } from '@uiw/color-convert';\nimport Interactive from '@uiw/react-drag-event-interactive';\nimport { Pointer } from './Pointer';\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nexport * from './Pointer';\nexport var BACKGROUND_IMG = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAMUlEQVQ4T2NkYGAQYcAP3uCTZhw1gGGYhAGBZIA/nYDCgBDAm9BGDWAAJyRCgLaBCAAgXwixzAS0pgAAAABJRU5ErkJggg==';\nvar Alpha = /*#__PURE__*/React.forwardRef((props, ref) => {\n var {\n prefixCls = 'w-color-alpha',\n className,\n hsva,\n background,\n bgProps = {},\n innerProps = {},\n pointerProps = {},\n radius = 0,\n width,\n height = 16,\n direction = 'horizontal',\n style,\n onChange,\n pointer\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n var handleChange = offset => {\n onChange && onChange(_extends({}, hsva, {\n a: direction === 'horizontal' ? offset.left : offset.top\n }), offset);\n };\n var colorTo = hsvaToHslaString(Object.assign({}, hsva, {\n a: 1\n }));\n var innerBackground = \"linear-gradient(to \" + (direction === 'horizontal' ? 'right' : 'bottom') + \", rgba(244, 67, 54, 0) 0%, \" + colorTo + \" 100%)\";\n var comProps = {};\n if (direction === 'horizontal') {\n comProps.left = hsva.a * 100 + \"%\";\n } else {\n comProps.top = hsva.a * 100 + \"%\";\n }\n var styleWrapper = _extends({\n '--alpha-background-color': '#fff',\n '--alpha-pointer-background-color': 'rgb(248, 248, 248)',\n '--alpha-pointer-box-shadow': 'rgb(0 0 0 / 37%) 0px 1px 4px 0px',\n borderRadius: radius,\n background: \"url(\" + BACKGROUND_IMG + \") left center\",\n backgroundColor: 'var(--alpha-background-color)'\n }, {\n width,\n height\n }, style, {\n position: 'relative'\n });\n var pointerElement = pointer && typeof pointer === 'function' ? pointer(_extends({\n prefixCls\n }, pointerProps, comProps)) : /*#__PURE__*/_jsx(Pointer, _extends({}, pointerProps, {\n prefixCls: prefixCls\n }, comProps));\n return /*#__PURE__*/_jsxs(\"div\", _extends({}, other, {\n className: [prefixCls, prefixCls + \"-\" + direction, className || ''].filter(Boolean).join(' '),\n style: styleWrapper,\n ref: ref,\n children: [/*#__PURE__*/_jsx(\"div\", _extends({}, bgProps, {\n style: _extends({\n inset: 0,\n position: 'absolute',\n background: background || innerBackground,\n borderRadius: radius\n }, bgProps.style)\n })), /*#__PURE__*/_jsx(Interactive, _extends({}, innerProps, {\n style: _extends({}, innerProps.style, {\n inset: 0,\n zIndex: 1,\n position: 'absolute'\n }),\n onMove: handleChange,\n onDown: handleChange,\n children: pointerElement\n }))]\n }));\n});\nAlpha.displayName = 'Alpha';\nexport default Alpha;","import React from 'react';\nimport { useMemo } from 'react';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport var Pointer = _ref => {\n var {\n className,\n color,\n left,\n top,\n prefixCls\n } = _ref;\n var style = {\n position: 'absolute',\n top,\n left\n };\n var stylePointer = {\n '--saturation-pointer-box-shadow': 'rgb(255 255 255) 0px 0px 0px 1.5px, rgb(0 0 0 / 30%) 0px 0px 1px 1px inset, rgb(0 0 0 / 40%) 0px 0px 1px 2px',\n width: 6,\n height: 6,\n transform: 'translate(-3px, -3px)',\n boxShadow: 'var(--saturation-pointer-box-shadow)',\n borderRadius: '50%',\n backgroundColor: color\n };\n return useMemo(() => /*#__PURE__*/_jsx(\"div\", {\n className: prefixCls + \"-pointer \" + (className || ''),\n style: style,\n children: /*#__PURE__*/_jsx(\"div\", {\n className: prefixCls + \"-fill\",\n style: stylePointer\n })\n }), [top, left, color, className, prefixCls]);\n};","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/objectWithoutPropertiesLoose\";\nvar _excluded = [\"prefixCls\", \"radius\", \"pointer\", \"className\", \"hue\", \"style\", \"hsva\", \"onChange\"];\nimport React, { useMemo } from 'react';\nimport { hsvaToHslaString } from '@uiw/color-convert';\nimport Interactive from '@uiw/react-drag-event-interactive';\nimport { Pointer } from './Pointer';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nvar Saturation = /*#__PURE__*/React.forwardRef((props, ref) => {\n var _hsva$h;\n var {\n prefixCls = 'w-color-saturation',\n radius = 0,\n pointer,\n className,\n hue = 0,\n style,\n hsva,\n onChange\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n var containerStyle = _extends({\n width: 200,\n height: 200,\n borderRadius: radius\n }, style, {\n position: 'relative'\n });\n var handleChange = (interaction, event) => {\n onChange && hsva && onChange({\n h: hsva.h,\n s: interaction.left * 100,\n v: (1 - interaction.top) * 100,\n a: hsva.a\n // source: 'hsv',\n });\n };\n var pointerElement = useMemo(() => {\n if (!hsva) return null;\n var comProps = {\n top: 100 - hsva.v + \"%\",\n left: hsva.s + \"%\",\n color: hsvaToHslaString(hsva)\n };\n if (pointer && typeof pointer === 'function') {\n return pointer(_extends({\n prefixCls\n }, comProps));\n }\n return /*#__PURE__*/_jsx(Pointer, _extends({\n prefixCls: prefixCls\n }, comProps));\n }, [hsva, pointer, prefixCls]);\n return /*#__PURE__*/_jsx(Interactive, _extends({\n className: [prefixCls, className || ''].filter(Boolean).join(' ')\n }, other, {\n style: _extends({\n position: 'absolute',\n inset: 0,\n cursor: 'crosshair',\n backgroundImage: \"linear-gradient(0deg, #000, transparent), linear-gradient(90deg, #fff, hsl(\" + ((_hsva$h = hsva == null ? void 0 : hsva.h) != null ? _hsva$h : hue) + \", 100%, 50%))\"\n }, containerStyle),\n ref: ref,\n onMove: handleChange,\n onDown: handleChange,\n children: pointerElement\n }));\n});\nSaturation.displayName = 'Saturation';\nexport default Saturation;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/objectWithoutPropertiesLoose\";\nvar _excluded = [\"prefixCls\", \"className\", \"hue\", \"onChange\", \"direction\"];\nimport React from 'react';\nimport Alpha from '@uiw/react-color-alpha';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nvar Hue = /*#__PURE__*/React.forwardRef((props, ref) => {\n var {\n prefixCls = 'w-color-hue',\n className,\n hue = 0,\n onChange: _onChange,\n direction = 'horizontal'\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n return /*#__PURE__*/_jsx(Alpha, _extends({\n ref: ref,\n className: prefixCls + \" \" + (className || '')\n }, other, {\n direction: direction,\n background: \"linear-gradient(to \" + (direction === 'horizontal' ? 'right' : 'bottom') + \", rgb(255, 0, 0) 0%, rgb(255, 255, 0) 17%, rgb(0, 255, 0) 33%, rgb(0, 255, 255) 50%, rgb(0, 0, 255) 67%, rgb(255, 0, 255) 83%, rgb(255, 0, 0) 100%)\",\n hsva: {\n h: hue,\n s: 100,\n v: 100,\n a: hue / 360\n },\n onChange: (_, interaction) => {\n _onChange && _onChange({\n h: direction === 'horizontal' ? 360 * interaction.left : 360 * interaction.top\n });\n }\n }));\n});\nHue.displayName = 'Hue';\nexport default Hue;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/objectWithoutPropertiesLoose\";\nvar _excluded = [\"style\", \"color\"],\n _excluded2 = [\"prefixCls\", \"className\", \"onChange\", \"color\", \"style\", \"disableAlpha\"];\nimport React from 'react';\nimport { validHex, color as handleColor, hexToHsva, hsvaToHex, hsvaToRgbaString } from '@uiw/color-convert';\nimport Alpha, { BACKGROUND_IMG } from '@uiw/react-color-alpha';\nimport Saturation from '@uiw/react-color-saturation';\nimport Hue from '@uiw/react-color-hue';\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nvar Pointer = _ref => {\n var {\n style,\n color\n } = _ref,\n props = _objectWithoutPropertiesLoose(_ref, _excluded);\n var stylePointer = _extends({\n '--colorful-pointer-background-color': '#fff',\n '--colorful-pointer-border': '2px solid #fff',\n height: 28,\n width: 28,\n position: 'absolute',\n transform: 'translate(-14px, -4px)',\n boxShadow: '0 2px 4px rgb(0 0 0 / 20%)',\n borderRadius: '50%',\n background: \"url(\" + BACKGROUND_IMG + \")\",\n backgroundColor: 'var(--colorful-pointer-background-color)',\n border: 'var(--colorful-pointer-border)',\n zIndex: 1\n }, style);\n return /*#__PURE__*/_jsx(\"div\", _extends({}, props, {\n style: stylePointer,\n children: /*#__PURE__*/_jsx(\"div\", {\n style: {\n backgroundColor: color,\n borderRadius: '50%',\n height: ' 100%',\n width: '100%'\n }\n })\n }));\n};\nvar Colorful = /*#__PURE__*/React.forwardRef((props, ref) => {\n var {\n prefixCls = 'w-color-colorful',\n className,\n onChange,\n color,\n style,\n disableAlpha\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded2);\n var hsva = typeof color === 'string' && validHex(color) ? hexToHsva(color) : color || {};\n var handleChange = value => onChange && onChange(handleColor(value));\n return /*#__PURE__*/_jsxs(\"div\", _extends({\n ref: ref,\n style: _extends({\n width: 200,\n position: 'relative'\n }, style)\n }, other, {\n className: prefixCls + \" \" + (className || ''),\n children: [/*#__PURE__*/_jsx(Saturation, {\n hsva: hsva,\n className: prefixCls,\n radius: \"8px 8px 0 0\",\n style: {\n width: 'auto',\n height: 150,\n minWidth: 120,\n borderBottom: '12px solid #000'\n },\n pointer: _ref2 => {\n var {\n left,\n top,\n color\n } = _ref2;\n return /*#__PURE__*/_jsx(Pointer, {\n style: {\n left,\n top,\n transform: 'translate(-16px, -16px)'\n },\n color: hsvaToHex(hsva)\n });\n },\n onChange: newColor => handleChange(_extends({}, hsva, newColor))\n }), /*#__PURE__*/_jsx(Hue, {\n hue: hsva.h,\n height: 24,\n radius: disableAlpha ? '0 0 8px 8px' : 0,\n className: prefixCls,\n onChange: newHue => handleChange(_extends({}, hsva, newHue)),\n pointer: _ref3 => {\n var {\n left\n } = _ref3;\n return /*#__PURE__*/_jsx(Pointer, {\n style: {\n left\n },\n color: \"hsl(\" + (hsva.h || 0) + \"deg 100% 50%)\"\n });\n }\n }), !disableAlpha && /*#__PURE__*/_jsx(Alpha, {\n hsva: hsva,\n height: 24,\n className: prefixCls,\n radius: \"0 0 8px 8px\",\n pointer: _ref4 => {\n var {\n left\n } = _ref4;\n return /*#__PURE__*/_jsx(Pointer, {\n style: {\n left\n },\n color: hsvaToRgbaString(hsva)\n });\n },\n onChange: newAlpha => handleChange(_extends({}, hsva, newAlpha))\n })]\n }));\n});\nColorful.displayName = 'Colorful';\nexport default Colorful;","/**\n * @package @wcj/dark-mode\n * Web Component that toggles dark mode 🌒\n * Github: https://github.com/jaywcjlove/dark-mode.git\n * Website: https://jaywcjlove.github.io/dark-mode\n * \n * Licensed under the MIT license.\n * @license Copyright © 2022. Licensed under the MIT License\n * @author kenny wong \n */\nconst t=document;const e=\"_dark_mode_theme_\";const s=\"permanent\";const o=\"colorschemechange\";const i=\"permanentcolorscheme\";const h=\"light\";const r=\"dark\";const n=(t,e,s=e)=>{Object.defineProperty(t,s,{enumerable:true,get(){const t=this.getAttribute(e);return t===null?\"\":t},set(t){this.setAttribute(e,t)}})};const c=(t,e,s=e)=>{Object.defineProperty(t,s,{enumerable:true,get(){return this.hasAttribute(e)},set(t){if(t){this.setAttribute(e,\"\")}else{this.removeAttribute(e)}}})};class a extends HTMLElement{static get observedAttributes(){return[\"mode\",h,r,s]}LOCAL_NANE=e;constructor(){super();this.t()}connectedCallback(){n(this,\"mode\");n(this,r);n(this,h);c(this,s);const a=localStorage.getItem(e);if(a&&[h,r].includes(a)){this.mode=a;this.permanent=true}if(this.permanent&&!a){localStorage.setItem(e,this.mode)}const l=[h,r].includes(a);if(this.permanent&&a){this.o()}else{if(window.matchMedia&&window.matchMedia(\"(prefers-color-scheme: dark)\").matches){this.mode=r;this.o()}if(window.matchMedia&&window.matchMedia(\"(prefers-color-scheme: light)\").matches){this.mode=h;this.o()}}if(!this.permanent&&!l){window.matchMedia(\"(prefers-color-scheme: light)\").onchange=t=>{this.mode=t.matches?h:r;this.o()};window.matchMedia(\"(prefers-color-scheme: dark)\").onchange=t=>{this.mode=t.matches?r:h;this.o()}}const d=new MutationObserver(((s,h)=>{this.mode=t.documentElement.dataset.colorMode;if(this.permanent&&l){localStorage.setItem(e,this.mode);this.i(i,{permanent:this.permanent})}this.h();this.i(o,{colorScheme:this.mode})}));d.observe(t.documentElement,{attributes:true});this.i(o,{colorScheme:this.mode});this.h()}attributeChangedCallback(t,s,o){if(t===\"mode\"&&s!==o&&[h,r].includes(o)){const t=localStorage.getItem(e);if(this.mode===t){this.mode=o;this.h();this.o()}else if(this.mode&&this.mode!==t){this.h();this.o()}}else if((t===h||t===r)&&s!==o){this.h()}if(t===\"permanent\"&&typeof this.permanent===\"boolean\"){this.permanent?localStorage.setItem(e,this.mode):localStorage.removeItem(e)}}o(){t.documentElement.setAttribute(\"data-color-mode\",this.mode)}h(){this.icon.textContent=this.mode===h?\"🌒\":\"🌞\";this.text.textContent=this.mode===h?this.getAttribute(r):this.getAttribute(h);if(!this.text.textContent&&this.text.parentElement&&this.text){this.text.parentElement.removeChild(this.text)}}t(){var s=this.attachShadow({mode:\"open\"});this.label=t.createElement(\"span\");this.label.setAttribute(\"class\",\"wrapper\");this.label.onclick=()=>{this.mode=this.mode===h?r:h;if(this.permanent){localStorage.setItem(e,this.mode)}this.o();this.h()};s.appendChild(this.label);this.icon=t.createElement(\"span\");this.label.appendChild(this.icon);this.text=t.createElement(\"span\");this.label.appendChild(this.text);const o=`\\n[data-color-mode*='dark'], [data-color-mode*='dark'] body {\\n color-scheme: dark;\\n --color-theme-bg: #0d1117;\\n --color-theme-text: #c9d1d9;\\n background-color: var(--color-theme-bg);\\n color: var(--color-theme-text);\\n}\\n\\n[data-color-mode*='light'], [data-color-mode*='light'] body {\\n color-scheme: light;\\n --color-theme-bg: #fff;\\n --color-theme-text: #24292f;\\n background-color: var(--color-theme-bg);\\n color: var(--color-theme-text);\\n}`;const i=\"_dark_mode_style_\";const n=t.getElementById(i);if(!n){var c=t.createElement(\"style\");c.id=i;c.textContent=o;t.head.appendChild(c)}var a=t.createElement(\"style\");a.textContent=`\\n .wrapper { cursor: pointer; user-select: none; position: relative; }\\n .wrapper > span + span { margin-left: .4rem; }\\n `;s.appendChild(a)}i(t,e){this.dispatchEvent(new CustomEvent(t,{bubbles:true,composed:true,detail:e}))}}customElements.define(\"dark-mode\",a);","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports[\"default\"] = _default;\nfunction _default() {\n return {\n name: 'transform-remove-imports',\n visitor: {\n // https://babeljs.io/docs/en/babel-types#callexpression\n CallExpression: function CallExpression(path, state) {\n var node = path.node;\n if (node.callee.name !== 'require') {\n return;\n }\n var argument = node.arguments[0];\n var moduleId = argument.value;\n var options = state.opts;\n if (options.test && !testMatches(moduleId, options.test)) {\n return;\n }\n var parentType = path.parentPath.node.type;\n\n // In remove effects mode we should delete only requires that are\n // simple expression statements\n if (options.remove === 'effects' && parentType !== 'ExpressionStatement') {\n return;\n }\n path.remove();\n },\n // https://babeljs.io/docs/en/babel-types#importdeclaration\n ImportDeclaration: function ImportDeclaration(path, state) {\n var node = path.node;\n var source = node.source;\n var opts = state.opts;\n if (opts.removeAll) {\n path.remove();\n return;\n }\n if (!opts.test) {\n console.warn('transform-remove-imports: \"test\" option should be specified');\n return;\n }\n\n /** @var {string} importName */\n var importName = source && source.value ? source.value : undefined;\n var isMatch = testMatches(importName, opts.test);\n\n // https://github.com/uiwjs/babel-plugin-transform-remove-imports/issues/3\n if (opts.remove === 'effects') {\n if (node.specifiers && node.specifiers.length === 0 && importName && isMatch) {\n path.remove();\n }\n return;\n }\n if (importName && isMatch) {\n path.remove();\n }\n }\n }\n };\n}\n\n/**\n * Determines if the import matches the specified tests.\n *\n * @param {string} importName\n * @param {RegExp|RegExp[]|string|string[]} test\n * @returns {Boolean}\n */\nfunction testMatches(importName, test) {\n // Normalizing tests\n var tests = Array.isArray(test) ? test : [test];\n\n // Finding out if at least one test matches\n return tests.some(function (regex) {\n if (typeof regex === 'string') {\n regex = new RegExp(regex);\n }\n return regex.test(importName || '');\n });\n}","module.exports = {\n\ttrueFunc: function trueFunc(){\n\t\treturn true;\n\t},\n\tfalseFunc: function falseFunc(){\n\t\treturn false;\n\t}\n};","'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","// http://www.w3.org/TR/CSS21/grammar.html\n// https://github.com/visionmedia/css-parse/pull/49#issuecomment-30088027\nvar COMMENT_REGEX = /\\/\\*[^*]*\\*+([^/*][^*]*\\*+)*\\//g;\n\nvar NEWLINE_REGEX = /\\n/g;\nvar WHITESPACE_REGEX = /^\\s*/;\n\n// declaration\nvar PROPERTY_REGEX = /^(\\*?[-#/*\\\\\\w]+(\\[[0-9a-z_-]+\\])?)\\s*/;\nvar COLON_REGEX = /^:\\s*/;\nvar VALUE_REGEX = /^((?:'(?:\\\\'|.)*?'|\"(?:\\\\\"|.)*?\"|\\([^)]*?\\)|[^};])+)/;\nvar SEMICOLON_REGEX = /^[;\\s]*/;\n\n// https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String/Trim#Polyfill\nvar TRIM_REGEX = /^\\s+|\\s+$/g;\n\n// strings\nvar NEWLINE = '\\n';\nvar FORWARD_SLASH = '/';\nvar ASTERISK = '*';\nvar EMPTY_STRING = '';\n\n// types\nvar TYPE_COMMENT = 'comment';\nvar TYPE_DECLARATION = 'declaration';\n\n/**\n * @param {String} style\n * @param {Object} [options]\n * @return {Object[]}\n * @throws {TypeError}\n * @throws {Error}\n */\nmodule.exports = function (style, options) {\n if (typeof style !== 'string') {\n throw new TypeError('First argument must be a string');\n }\n\n if (!style) return [];\n\n options = options || {};\n\n /**\n * Positional.\n */\n var lineno = 1;\n var column = 1;\n\n /**\n * Update lineno and column based on `str`.\n *\n * @param {String} str\n */\n function updatePosition(str) {\n var lines = str.match(NEWLINE_REGEX);\n if (lines) lineno += lines.length;\n var i = str.lastIndexOf(NEWLINE);\n column = ~i ? str.length - i : column + str.length;\n }\n\n /**\n * Mark position and patch `node.position`.\n *\n * @return {Function}\n */\n function position() {\n var start = { line: lineno, column: column };\n return function (node) {\n node.position = new Position(start);\n whitespace();\n return node;\n };\n }\n\n /**\n * Store position information for a node.\n *\n * @constructor\n * @property {Object} start\n * @property {Object} end\n * @property {undefined|String} source\n */\n function Position(start) {\n this.start = start;\n this.end = { line: lineno, column: column };\n this.source = options.source;\n }\n\n /**\n * Non-enumerable source string.\n */\n Position.prototype.content = style;\n\n var errorsList = [];\n\n /**\n * Error `msg`.\n *\n * @param {String} msg\n * @throws {Error}\n */\n function error(msg) {\n var err = new Error(\n options.source + ':' + lineno + ':' + column + ': ' + msg\n );\n err.reason = msg;\n err.filename = options.source;\n err.line = lineno;\n err.column = column;\n err.source = style;\n\n if (options.silent) {\n errorsList.push(err);\n } else {\n throw err;\n }\n }\n\n /**\n * Match `re` and return captures.\n *\n * @param {RegExp} re\n * @return {undefined|Array}\n */\n function match(re) {\n var m = re.exec(style);\n if (!m) return;\n var str = m[0];\n updatePosition(str);\n style = style.slice(str.length);\n return m;\n }\n\n /**\n * Parse whitespace.\n */\n function whitespace() {\n match(WHITESPACE_REGEX);\n }\n\n /**\n * Parse comments.\n *\n * @param {Object[]} [rules]\n * @return {Object[]}\n */\n function comments(rules) {\n var c;\n rules = rules || [];\n while ((c = comment())) {\n if (c !== false) {\n rules.push(c);\n }\n }\n return rules;\n }\n\n /**\n * Parse comment.\n *\n * @return {Object}\n * @throws {Error}\n */\n function comment() {\n var pos = position();\n if (FORWARD_SLASH != style.charAt(0) || ASTERISK != style.charAt(1)) return;\n\n var i = 2;\n while (\n EMPTY_STRING != style.charAt(i) &&\n (ASTERISK != style.charAt(i) || FORWARD_SLASH != style.charAt(i + 1))\n ) {\n ++i;\n }\n i += 2;\n\n if (EMPTY_STRING === style.charAt(i - 1)) {\n return error('End of comment missing');\n }\n\n var str = style.slice(2, i - 2);\n column += 2;\n updatePosition(str);\n style = style.slice(i);\n column += 2;\n\n return pos({\n type: TYPE_COMMENT,\n comment: str\n });\n }\n\n /**\n * Parse declaration.\n *\n * @return {Object}\n * @throws {Error}\n */\n function declaration() {\n var pos = position();\n\n // prop\n var prop = match(PROPERTY_REGEX);\n if (!prop) return;\n comment();\n\n // :\n if (!match(COLON_REGEX)) return error(\"property missing ':'\");\n\n // val\n var val = match(VALUE_REGEX);\n\n var ret = pos({\n type: TYPE_DECLARATION,\n property: trim(prop[0].replace(COMMENT_REGEX, EMPTY_STRING)),\n value: val\n ? trim(val[0].replace(COMMENT_REGEX, EMPTY_STRING))\n : EMPTY_STRING\n });\n\n // ;\n match(SEMICOLON_REGEX);\n\n return ret;\n }\n\n /**\n * Parse declarations.\n *\n * @return {Object[]}\n */\n function declarations() {\n var decls = [];\n\n comments(decls);\n\n // declarations\n var decl;\n while ((decl = declaration())) {\n if (decl !== false) {\n decls.push(decl);\n comments(decls);\n }\n }\n\n return decls;\n }\n\n whitespace();\n return declarations();\n};\n\n/**\n * Trim `str`.\n *\n * @param {String} str\n * @return {String}\n */\nfunction trim(str) {\n return str ? str.replace(TRIM_REGEX, EMPTY_STRING) : EMPTY_STRING;\n}\n","/*!\n * Determine if an object is a Buffer\n *\n * @author Feross Aboukhadijeh \n * @license MIT\n */\n\nmodule.exports = function isBuffer (obj) {\n return obj != null && obj.constructor != null &&\n typeof obj.constructor.isBuffer === 'function' && obj.constructor.isBuffer(obj)\n}\n","/**\n * @param {string} string The string to parse\n * @returns {Array} Returns an energetic array.\n */\nfunction parsePart(string) {\n let res = [];\n let m;\n\n for (let str of string.split(\",\").map((str) => str.trim())) {\n // just a number\n if (/^-?\\d+$/.test(str)) {\n res.push(parseInt(str, 10));\n } else if (\n (m = str.match(/^(-?\\d+)(-|\\.\\.\\.?|\\u2025|\\u2026|\\u22EF)(-?\\d+)$/))\n ) {\n // 1-5 or 1..5 (equivalent) or 1...5 (doesn't include 5)\n let [_, lhs, sep, rhs] = m;\n\n if (lhs && rhs) {\n lhs = parseInt(lhs);\n rhs = parseInt(rhs);\n const incr = lhs < rhs ? 1 : -1;\n\n // Make it inclusive by moving the right 'stop-point' away by one.\n if (sep === \"-\" || sep === \"..\" || sep === \"\\u2025\") rhs += incr;\n\n for (let i = lhs; i !== rhs; i += incr) res.push(i);\n }\n }\n }\n\n return res;\n}\n\nexports.default = parsePart;\nmodule.exports = parsePart;\n","// shim for using process in browser\nvar process = module.exports = {};\n\n// cached from whatever global is present so that test runners that stub it\n// don't break things. But we need to wrap it in a try catch in case it is\n// wrapped in strict mode code which doesn't define any globals. It's inside a\n// function because try/catches deoptimize in certain engines.\n\nvar cachedSetTimeout;\nvar cachedClearTimeout;\n\nfunction defaultSetTimout() {\n throw new Error('setTimeout has not been defined');\n}\nfunction defaultClearTimeout () {\n throw new Error('clearTimeout has not been defined');\n}\n(function () {\n try {\n if (typeof setTimeout === 'function') {\n cachedSetTimeout = setTimeout;\n } else {\n cachedSetTimeout = defaultSetTimout;\n }\n } catch (e) {\n cachedSetTimeout = defaultSetTimout;\n }\n try {\n if (typeof clearTimeout === 'function') {\n cachedClearTimeout = clearTimeout;\n } else {\n cachedClearTimeout = defaultClearTimeout;\n }\n } catch (e) {\n cachedClearTimeout = defaultClearTimeout;\n }\n} ())\nfunction runTimeout(fun) {\n if (cachedSetTimeout === setTimeout) {\n //normal enviroments in sane situations\n return setTimeout(fun, 0);\n }\n // if setTimeout wasn't available but was latter defined\n if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {\n cachedSetTimeout = setTimeout;\n return setTimeout(fun, 0);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedSetTimeout(fun, 0);\n } catch(e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedSetTimeout.call(null, fun, 0);\n } catch(e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error\n return cachedSetTimeout.call(this, fun, 0);\n }\n }\n\n\n}\nfunction runClearTimeout(marker) {\n if (cachedClearTimeout === clearTimeout) {\n //normal enviroments in sane situations\n return clearTimeout(marker);\n }\n // if clearTimeout wasn't available but was latter defined\n if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {\n cachedClearTimeout = clearTimeout;\n return clearTimeout(marker);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedClearTimeout(marker);\n } catch (e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedClearTimeout.call(null, marker);\n } catch (e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.\n // Some versions of I.E. have different rules for clearTimeout vs setTimeout\n return cachedClearTimeout.call(this, marker);\n }\n }\n\n\n\n}\nvar queue = [];\nvar draining = false;\nvar currentQueue;\nvar queueIndex = -1;\n\nfunction cleanUpNextTick() {\n if (!draining || !currentQueue) {\n return;\n }\n draining = false;\n if (currentQueue.length) {\n queue = currentQueue.concat(queue);\n } else {\n queueIndex = -1;\n }\n if (queue.length) {\n drainQueue();\n }\n}\n\nfunction drainQueue() {\n if (draining) {\n return;\n }\n var timeout = runTimeout(cleanUpNextTick);\n draining = true;\n\n var len = queue.length;\n while(len) {\n currentQueue = queue;\n queue = [];\n while (++queueIndex < len) {\n if (currentQueue) {\n currentQueue[queueIndex].run();\n }\n }\n queueIndex = -1;\n len = queue.length;\n }\n currentQueue = null;\n draining = false;\n runClearTimeout(timeout);\n}\n\nprocess.nextTick = function (fun) {\n var args = new Array(arguments.length - 1);\n if (arguments.length > 1) {\n for (var i = 1; i < arguments.length; i++) {\n args[i - 1] = arguments[i];\n }\n }\n queue.push(new Item(fun, args));\n if (queue.length === 1 && !draining) {\n runTimeout(drainQueue);\n }\n};\n\n// v8 likes predictible objects\nfunction Item(fun, array) {\n this.fun = fun;\n this.array = array;\n}\nItem.prototype.run = function () {\n this.fun.apply(null, this.array);\n};\nprocess.title = 'browser';\nprocess.browser = true;\nprocess.env = {};\nprocess.argv = [];\nprocess.version = ''; // empty string to avoid regexp issues\nprocess.versions = {};\n\nfunction noop() {}\n\nprocess.on = noop;\nprocess.addListener = noop;\nprocess.once = noop;\nprocess.off = noop;\nprocess.removeListener = noop;\nprocess.removeAllListeners = noop;\nprocess.emit = noop;\nprocess.prependListener = noop;\nprocess.prependOnceListener = noop;\n\nprocess.listeners = function (name) { return [] }\n\nprocess.binding = function (name) {\n throw new Error('process.binding is not supported');\n};\n\nprocess.cwd = function () { return '/' };\nprocess.chdir = function (dir) {\n throw new Error('process.chdir is not supported');\n};\nprocess.umask = function() { return 0; };\n","'use strict'\n\nmodule.exports = stringify\n\nvar toMarkdown = require('mdast-util-to-markdown')\n\nfunction stringify(options) {\n var self = this\n\n this.Compiler = compile\n\n function compile(tree) {\n return toMarkdown(\n tree,\n Object.assign({}, self.data('settings'), options, {\n // Note: this option is not in the readme.\n // The goal is for it to be set by plugins on `data` instead of being\n // passed by users.\n extensions: self.data('toMarkdownExtensions') || []\n })\n )\n }\n}\n","'use strict'\n\nmodule.exports = longestStreak\n\n// Get the count of the longest repeating streak of `character` in `value`.\nfunction longestStreak(value, character) {\n var count = 0\n var maximum = 0\n var expected\n var index\n\n if (typeof character !== 'string' || character.length !== 1) {\n throw new Error('Expected character')\n }\n\n value = String(value)\n index = value.indexOf(character)\n expected = index\n\n while (index !== -1) {\n count++\n\n if (index === expected) {\n if (count > maximum) {\n maximum = count\n }\n } else {\n count = 1\n }\n\n expected = index + 1\n index = value.indexOf(character, expected)\n }\n\n return maximum\n}\n","module.exports = require('./lib')\n","module.exports = configure\n\nfunction configure(base, extension) {\n var index = -1\n var 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 (key === 'extensions') {\n // Empty.\n } else if (key === 'unsafe' || key === 'join') {\n base[key] = base[key].concat(extension[key] || [])\n } else if (key === 'handlers') {\n base[key] = Object.assign(base[key], extension[key] || {})\n } else {\n base.options[key] = extension[key]\n }\n }\n\n return base\n}\n","module.exports = blockquote\n\nvar flow = require('../util/container-flow')\nvar indentLines = require('../util/indent-lines')\n\nfunction blockquote(node, _, context) {\n var exit = context.enter('blockquote')\n var value = indentLines(flow(node, context), map)\n exit()\n return value\n}\n\nfunction map(line, index, blank) {\n return '>' + (blank ? '' : ' ') + line\n}\n","module.exports = hardBreak\n\nvar patternInScope = require('../util/pattern-in-scope')\n\nfunction hardBreak(node, _, context, safe) {\n var index = -1\n\n while (++index < context.unsafe.length) {\n // If we can’t put eols in this construct (setext headings, tables), use a\n // space instead.\n if (\n context.unsafe[index].character === '\\n' &&\n patternInScope(context.stack, context.unsafe[index])\n ) {\n return /[ \\t]/.test(safe.before) ? '' : ' '\n }\n }\n\n return '\\\\\\n'\n}\n","module.exports = code\n\nvar repeat = require('repeat-string')\nvar streak = require('longest-streak')\nvar formatCodeAsIndented = require('../util/format-code-as-indented')\nvar checkFence = require('../util/check-fence')\nvar indentLines = require('../util/indent-lines')\nvar safe = require('../util/safe')\n\nfunction code(node, _, context) {\n var marker = checkFence(context)\n var raw = node.value || ''\n var suffix = marker === '`' ? 'GraveAccent' : 'Tilde'\n var value\n var sequence\n var exit\n var subexit\n\n if (formatCodeAsIndented(node, context)) {\n exit = context.enter('codeIndented')\n value = indentLines(raw, map)\n } else {\n sequence = repeat(marker, Math.max(streak(raw, marker) + 1, 3))\n exit = context.enter('codeFenced')\n value = sequence\n\n if (node.lang) {\n subexit = context.enter('codeFencedLang' + suffix)\n value += safe(context, node.lang, {\n before: '`',\n after: ' ',\n encode: ['`']\n })\n subexit()\n }\n\n if (node.lang && node.meta) {\n subexit = context.enter('codeFencedMeta' + suffix)\n value +=\n ' ' +\n safe(context, node.meta, {\n before: ' ',\n after: '\\n',\n encode: ['`']\n })\n subexit()\n }\n\n value += '\\n'\n\n if (raw) {\n value += raw + '\\n'\n }\n\n value += sequence\n }\n\n exit()\n return value\n}\n\nfunction map(line, _, blank) {\n return (blank ? '' : ' ') + line\n}\n","module.exports = definition\n\nvar association = require('../util/association')\nvar checkQuote = require('../util/check-quote')\nvar safe = require('../util/safe')\n\nfunction definition(node, _, context) {\n var marker = checkQuote(context)\n var suffix = marker === '\"' ? 'Quote' : 'Apostrophe'\n var exit = context.enter('definition')\n var subexit = context.enter('label')\n var value =\n '[' + safe(context, association(node), {before: '[', after: ']'}) + ']: '\n\n subexit()\n\n if (\n // If there’s no url, or…\n !node.url ||\n // If there’s whitespace, enclosed is prettier.\n /[ \\t\\r\\n]/.test(node.url)\n ) {\n subexit = context.enter('destinationLiteral')\n value += '<' + safe(context, node.url, {before: '<', after: '>'}) + '>'\n } else {\n // No whitespace, raw is prettier.\n subexit = context.enter('destinationRaw')\n value += safe(context, node.url, {before: ' ', after: ' '})\n }\n\n subexit()\n\n if (node.title) {\n subexit = context.enter('title' + suffix)\n value +=\n ' ' +\n marker +\n safe(context, node.title, {before: marker, after: marker}) +\n marker\n subexit()\n }\n\n exit()\n\n return value\n}\n","module.exports = emphasis\nemphasis.peek = emphasisPeek\n\nvar checkEmphasis = require('../util/check-emphasis')\nvar phrasing = require('../util/container-phrasing')\n\n// To do: there are cases where emphasis cannot “form” depending on the\n// previous or next character of sequences.\n// There’s no way around that though, except for injecting zero-width stuff.\n// Do we need to safeguard against that?\nfunction emphasis(node, _, context) {\n var marker = checkEmphasis(context)\n var exit = context.enter('emphasis')\n var value = phrasing(node, context, {before: marker, after: marker})\n exit()\n return marker + value + marker\n}\n\nfunction emphasisPeek(node, _, context) {\n return context.options.emphasis || '*'\n}\n","module.exports = heading\n\nvar repeat = require('repeat-string')\nvar formatHeadingAsSetext = require('../util/format-heading-as-setext')\nvar phrasing = require('../util/container-phrasing')\n\nfunction heading(node, _, context) {\n var rank = Math.max(Math.min(6, node.depth || 1), 1)\n var exit\n var subexit\n var value\n var sequence\n\n if (formatHeadingAsSetext(node, context)) {\n exit = context.enter('headingSetext')\n subexit = context.enter('phrasing')\n value = phrasing(node, context, {before: '\\n', after: '\\n'})\n subexit()\n exit()\n\n return (\n value +\n '\\n' +\n repeat(\n rank === 1 ? '=' : '-',\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 sequence = repeat('#', rank)\n exit = context.enter('headingAtx')\n subexit = context.enter('phrasing')\n value = phrasing(node, context, {before: '# ', after: '\\n'})\n value = value ? sequence + ' ' + value : sequence\n if (context.options.closeAtx) {\n value += ' ' + sequence\n }\n\n subexit()\n exit()\n\n return value\n}\n","module.exports = html\nhtml.peek = htmlPeek\n\nfunction html(node) {\n return node.value || ''\n}\n\nfunction htmlPeek() {\n return '<'\n}\n","module.exports = imageReference\nimageReference.peek = imageReferencePeek\n\nvar association = require('../util/association')\nvar safe = require('../util/safe')\n\nfunction imageReference(node, _, context) {\n var type = node.referenceType\n var exit = context.enter('imageReference')\n var subexit = context.enter('label')\n var alt = safe(context, node.alt, {before: '[', after: ']'})\n var value = '![' + alt + ']'\n var reference\n var stack\n\n subexit()\n // Hide the fact that we’re in phrasing, because escapes don’t work.\n stack = context.stack\n context.stack = []\n subexit = context.enter('reference')\n reference = safe(context, association(node), {before: '[', after: ']'})\n subexit()\n context.stack = stack\n exit()\n\n if (type === 'full' || !alt || alt !== reference) {\n value += '[' + reference + ']'\n } else if (type !== 'shortcut') {\n value += '[]'\n }\n\n return value\n}\n\nfunction imageReferencePeek() {\n return '!'\n}\n","module.exports = image\nimage.peek = imagePeek\n\nvar checkQuote = require('../util/check-quote')\nvar safe = require('../util/safe')\n\nfunction image(node, _, context) {\n var quote = checkQuote(context)\n var suffix = quote === '\"' ? 'Quote' : 'Apostrophe'\n var exit = context.enter('image')\n var subexit = context.enter('label')\n var value = '![' + safe(context, node.alt, {before: '[', after: ']'}) + ']('\n\n subexit()\n\n if (\n // If there’s no url but there is a title…\n (!node.url && node.title) ||\n // Or if there’s markdown whitespace or an eol, enclose.\n /[ \\t\\r\\n]/.test(node.url)\n ) {\n subexit = context.enter('destinationLiteral')\n value += '<' + safe(context, node.url, {before: '<', after: '>'}) + '>'\n } else {\n // No whitespace, raw is prettier.\n subexit = context.enter('destinationRaw')\n value += safe(context, node.url, {\n before: '(',\n after: node.title ? ' ' : ')'\n })\n }\n\n subexit()\n\n if (node.title) {\n subexit = context.enter('title' + suffix)\n value +=\n ' ' +\n quote +\n safe(context, node.title, {before: quote, after: quote}) +\n quote\n subexit()\n }\n\n value += ')'\n exit()\n\n return value\n}\n\nfunction imagePeek() {\n return '!'\n}\n","exports.blockquote = require('./blockquote')\nexports.break = require('./break')\nexports.code = require('./code')\nexports.definition = require('./definition')\nexports.emphasis = require('./emphasis')\nexports.hardBreak = require('./break')\nexports.heading = require('./heading')\nexports.html = require('./html')\nexports.image = require('./image')\nexports.imageReference = require('./image-reference')\nexports.inlineCode = require('./inline-code')\nexports.link = require('./link')\nexports.linkReference = require('./link-reference')\nexports.list = require('./list')\nexports.listItem = require('./list-item')\nexports.paragraph = require('./paragraph')\nexports.root = require('./root')\nexports.strong = require('./strong')\nexports.text = require('./text')\nexports.thematicBreak = require('./thematic-break')\n","module.exports = inlineCode\ninlineCode.peek = inlineCodePeek\n\nvar patternCompile = require('../util/pattern-compile')\n\nfunction inlineCode(node, parent, context) {\n var value = node.value || ''\n var sequence = '`'\n var index = -1\n var pattern\n var expression\n var match\n var position\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.charAt(0)) ||\n /[ \\r\\n`]/.test(value.charAt(value.length - 1)))\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 < context.unsafe.length) {\n pattern = context.unsafe[index]\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 expression = patternCompile(pattern)\n\n while ((match = expression.exec(value))) {\n 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\nfunction inlineCodePeek() {\n return '`'\n}\n","module.exports = linkReference\nlinkReference.peek = linkReferencePeek\n\nvar association = require('../util/association')\nvar phrasing = require('../util/container-phrasing')\nvar safe = require('../util/safe')\n\nfunction linkReference(node, _, context) {\n var type = node.referenceType\n var exit = context.enter('linkReference')\n var subexit = context.enter('label')\n var text = phrasing(node, context, {before: '[', after: ']'})\n var value = '[' + text + ']'\n var reference\n var stack\n\n subexit()\n // Hide the fact that we’re in phrasing, because escapes don’t work.\n stack = context.stack\n context.stack = []\n subexit = context.enter('reference')\n reference = safe(context, association(node), {before: '[', after: ']'})\n subexit()\n context.stack = stack\n exit()\n\n if (type === 'full' || !text || text !== reference) {\n value += '[' + reference + ']'\n } else if (type !== 'shortcut') {\n value += '[]'\n }\n\n return value\n}\n\nfunction linkReferencePeek() {\n return '['\n}\n","module.exports = link\nlink.peek = linkPeek\n\nvar checkQuote = require('../util/check-quote')\nvar formatLinkAsAutolink = require('../util/format-link-as-autolink')\nvar phrasing = require('../util/container-phrasing')\nvar safe = require('../util/safe')\n\nfunction link(node, _, context) {\n var quote = checkQuote(context)\n var suffix = quote === '\"' ? 'Quote' : 'Apostrophe'\n var exit\n var subexit\n var value\n var stack\n\n if (formatLinkAsAutolink(node, context)) {\n // Hide the fact that we’re in phrasing, because escapes don’t work.\n stack = context.stack\n context.stack = []\n exit = context.enter('autolink')\n value = '<' + phrasing(node, context, {before: '<', after: '>'}) + '>'\n exit()\n context.stack = stack\n return value\n }\n\n exit = context.enter('link')\n subexit = context.enter('label')\n value = '[' + phrasing(node, context, {before: '[', after: ']'}) + ']('\n subexit()\n\n if (\n // If there’s no url but there is a title…\n (!node.url && node.title) ||\n // Or if there’s markdown whitespace or an eol, enclose.\n /[ \\t\\r\\n]/.test(node.url)\n ) {\n subexit = context.enter('destinationLiteral')\n value += '<' + safe(context, node.url, {before: '<', after: '>'}) + '>'\n } else {\n // No whitespace, raw is prettier.\n subexit = context.enter('destinationRaw')\n value += safe(context, node.url, {\n before: '(',\n after: node.title ? ' ' : ')'\n })\n }\n\n subexit()\n\n if (node.title) {\n subexit = context.enter('title' + suffix)\n value +=\n ' ' +\n quote +\n safe(context, node.title, {before: quote, after: quote}) +\n quote\n subexit()\n }\n\n value += ')'\n\n exit()\n return value\n}\n\nfunction linkPeek(node, _, context) {\n return formatLinkAsAutolink(node, context) ? '<' : '['\n}\n","module.exports = listItem\n\nvar repeat = require('repeat-string')\nvar checkBullet = require('../util/check-bullet')\nvar checkListItemIndent = require('../util/check-list-item-indent')\nvar flow = require('../util/container-flow')\nvar indentLines = require('../util/indent-lines')\n\nfunction listItem(node, parent, context) {\n var bullet = checkBullet(context)\n var listItemIndent = checkListItemIndent(context)\n var size\n var value\n var exit\n\n if (parent && parent.ordered) {\n bullet =\n (parent.start > -1 ? parent.start : 1) +\n (context.options.incrementListMarker === false\n ? 0\n : parent.children.indexOf(node)) +\n '.'\n }\n\n size = bullet.length + 1\n\n if (\n listItemIndent === 'tab' ||\n (listItemIndent === 'mixed' && ((parent && parent.spread) || node.spread))\n ) {\n size = Math.ceil(size / 4) * 4\n }\n\n exit = context.enter('listItem')\n value = indentLines(flow(node, context), map)\n exit()\n\n return value\n\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","module.exports = list\n\nvar flow = require('../util/container-flow')\n\nfunction list(node, _, context) {\n var exit = context.enter('list')\n var value = flow(node, context)\n exit()\n return value\n}\n","module.exports = paragraph\n\nvar phrasing = require('../util/container-phrasing')\n\nfunction paragraph(node, _, context) {\n var exit = context.enter('paragraph')\n var subexit = context.enter('phrasing')\n var value = phrasing(node, context, {before: '\\n', after: '\\n'})\n subexit()\n exit()\n return value\n}\n","module.exports = root\n\nvar flow = require('../util/container-flow')\n\nfunction root(node, _, context) {\n return flow(node, context)\n}\n","module.exports = strong\nstrong.peek = strongPeek\n\nvar checkStrong = require('../util/check-strong')\nvar phrasing = require('../util/container-phrasing')\n\n// To do: there are cases where emphasis cannot “form” depending on the\n// previous or next character of sequences.\n// There’s no way around that though, except for injecting zero-width stuff.\n// Do we need to safeguard against that?\nfunction strong(node, _, context) {\n var marker = checkStrong(context)\n var exit = context.enter('strong')\n var value = phrasing(node, context, {before: marker, after: marker})\n exit()\n return marker + marker + value + marker + marker\n}\n\nfunction strongPeek(node, _, context) {\n return context.options.strong || '*'\n}\n","module.exports = text\n\nvar safe = require('../util/safe')\n\nfunction text(node, parent, context, safeOptions) {\n return safe(context, node.value, safeOptions)\n}\n","module.exports = thematicBreak\n\nvar repeat = require('repeat-string')\nvar checkRepeat = require('../util/check-rule-repeat')\nvar checkRule = require('../util/check-rule')\n\nfunction thematicBreak(node, parent, context) {\n var value = repeat(\n checkRule(context) + (context.options.ruleSpaces ? ' ' : ''),\n checkRepeat(context)\n )\n\n return context.options.ruleSpaces ? value.slice(0, -1) : value\n}\n","module.exports = toMarkdown\n\nvar zwitch = require('zwitch')\nvar configure = require('./configure')\nvar defaultHandlers = require('./handle')\nvar defaultJoin = require('./join')\nvar defaultUnsafe = require('./unsafe')\n\nfunction toMarkdown(tree, options) {\n var settings = options || {}\n var context = {\n enter: enter,\n stack: [],\n unsafe: [],\n join: [],\n handlers: {},\n options: {}\n }\n var result\n\n configure(context, {\n unsafe: defaultUnsafe,\n join: defaultJoin,\n handlers: defaultHandlers\n })\n configure(context, settings)\n\n if (context.options.tightDefinitions) {\n context.join = [joinDefinition].concat(context.join)\n }\n\n context.handle = zwitch('type', {\n invalid: invalid,\n unknown: unknown,\n handlers: context.handlers\n })\n\n result = context.handle(tree, null, context, {before: '\\n', after: '\\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 function enter(name) {\n context.stack.push(name)\n return exit\n\n function exit() {\n context.stack.pop()\n }\n }\n}\n\nfunction invalid(value) {\n throw new Error('Cannot handle value `' + value + '`, expected node')\n}\n\nfunction unknown(node) {\n throw new Error('Cannot handle unknown node `' + node.type + '`')\n}\n\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","module.exports = [joinDefaults]\n\nvar formatCodeAsIndented = require('./util/format-code-as-indented')\nvar formatHeadingAsSetext = require('./util/format-heading-as-setext')\n\nfunction joinDefaults(left, right, parent, context) {\n if (\n // Two lists with the same marker.\n (right.type === 'list' &&\n right.type === left.type &&\n Boolean(left.ordered) === Boolean(right.ordered)) ||\n // Indented code after list or another indented code.\n (right.type === 'code' &&\n formatCodeAsIndented(right, context) &&\n (left.type === 'list' ||\n (left.type === right.type && formatCodeAsIndented(left, context))))\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 (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, context)))\n ) {\n return\n }\n\n return parent.spread ? 1 : 0\n }\n}\n","module.exports = [\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 {\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 {character: '!', after: '\\\\[', inConstruct: 'phrasing'},\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 {before: '\\\\]', character: '(', inConstruct: 'phrasing'},\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: '*'},\n {character: '*', inConstruct: 'phrasing'},\n // A plus sign could start a list item.\n {atBreak: true, character: '+'},\n // A dash can start thematic breaks, list items, and setext heading\n // underlines.\n {atBreak: true, character: '-'},\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 {character: '<', after: '[!/?A-Za-z]', inConstruct: 'phrasing'},\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', '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 {\n character: ']',\n inConstruct: ['label', 'reference']\n },\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 {before: '[^A-Za-z]', character: '_', inConstruct: 'phrasing'},\n {character: '_', after: '[^A-Za-z]', inConstruct: 'phrasing'},\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: [\n 'codeFencedLangGraveAccent',\n 'codeFencedMetaGraveAccent',\n 'phrasing'\n ]\n },\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","module.exports = association\n\nvar decode = require('parse-entities/decode-entity')\n\nvar characterEscape = /\\\\([!-/:-@[-`{-~])/g\nvar characterReference = /&(#(\\d{1,7}|x[\\da-f]{1,6})|[\\da-z]{1,31});/gi\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: controversially,\n// character escapes and references don’t work in this matching: `©` does\n// not match `©`, and `\\+` does not match `+`.\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 escapes\n// and all character references.\nfunction association(node) {\n if (node.label || !node.identifier) {\n return node.label || ''\n }\n\n return node.identifier\n .replace(characterEscape, '$1')\n .replace(characterReference, decodeIfPossible)\n}\n\nfunction decodeIfPossible($0, $1) {\n return decode($1) || $0\n}\n","module.exports = checkBullet\n\nfunction checkBullet(context) {\n var marker = context.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","module.exports = checkEmphasis\n\nfunction checkEmphasis(context) {\n var marker = context.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","module.exports = checkFence\n\nfunction checkFence(context) {\n var marker = context.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","module.exports = checkListItemIndent\n\nfunction checkListItemIndent(context) {\n var style = context.options.listItemIndent || 'tab'\n\n if (style === 1 || style === '1') {\n return 'one'\n }\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","module.exports = checkQuote\n\nfunction checkQuote(context) {\n var marker = context.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","module.exports = checkRule\n\nfunction checkRule(context) {\n var repetition = context.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","module.exports = checkRule\n\nfunction checkRule(context) {\n var marker = context.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","module.exports = checkStrong\n\nfunction checkStrong(context) {\n var marker = context.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","module.exports = flow\n\nvar repeat = require('repeat-string')\n\nfunction flow(parent, context) {\n var children = parent.children || []\n var results = []\n var index = -1\n var child\n\n while (++index < children.length) {\n child = children[index]\n\n results.push(\n context.handle(child, parent, context, {before: '\\n', after: '\\n'})\n )\n\n if (index + 1 < children.length) {\n results.push(between(child, children[index + 1]))\n }\n }\n\n return results.join('')\n\n function between(left, right) {\n var index = -1\n var result\n\n while (++index < context.join.length) {\n result = context.join[index](left, right, parent, context)\n\n if (result === true || result === 1) {\n break\n }\n\n if (typeof result === 'number') {\n return repeat('\\n', 1 + Number(result))\n }\n\n if (result === false) {\n return '\\n\\n\\n\\n'\n }\n }\n\n return '\\n\\n'\n }\n}\n","module.exports = phrasing\n\nfunction phrasing(parent, context, safeOptions) {\n var children = parent.children || []\n var results = []\n var index = -1\n var before = safeOptions.before\n var after\n var handle\n var child\n\n while (++index < children.length) {\n child = children[index]\n\n if (index + 1 < children.length) {\n handle = context.handle.handlers[children[index + 1].type]\n if (handle && handle.peek) handle = handle.peek\n after = handle\n ? handle(children[index + 1], parent, context, {\n before: '',\n after: ''\n }).charAt(0)\n : ''\n } else {\n after = safeOptions.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: \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\n results.push(\n context.handle(child, parent, context, {\n before: before,\n after: after\n })\n )\n\n before = results[results.length - 1].slice(-1)\n }\n\n return results.join('')\n}\n","module.exports = formatCodeAsIndented\n\nfunction formatCodeAsIndented(node, context) {\n return (\n !context.options.fences &&\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","module.exports = formatHeadingAsSetext\n\nvar toString = require('mdast-util-to-string')\n\nfunction formatHeadingAsSetext(node, context) {\n return (\n context.options.setext && (!node.depth || node.depth < 3) && toString(node)\n )\n}\n","module.exports = formatLinkAsAutolink\n\nvar toString = require('mdast-util-to-string')\n\nfunction formatLinkAsAutolink(node, context) {\n var raw = toString(node)\n\n return (\n !context.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) or angle brackets…\n !/[\\0- <>\\u007F]/.test(node.url)\n )\n}\n","module.exports = indentLines\n\nvar eol = /\\r?\\n|\\r/g\n\nfunction indentLines(value, map) {\n var result = []\n var start = 0\n var line = 0\n var 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 function one(value) {\n result.push(map(value, line, !value))\n }\n}\n","module.exports = patternCompile\n\nfunction patternCompile(pattern) {\n var before\n var after\n\n if (!pattern._compiled) {\n before = pattern.before ? '(?:' + pattern.before + ')' : ''\n after = pattern.after ? '(?:' + pattern.after + ')' : ''\n\n if (pattern.atBreak) {\n before = '[\\\\r\\\\n][\\\\t ]*' + before\n }\n\n pattern._compiled = new RegExp(\n (before ? '(' + before + ')' : '') +\n (/[|\\\\{}()[\\]^$+*?.-]/.test(pattern.character) ? '\\\\' : '') +\n pattern.character +\n (after || ''),\n 'g'\n )\n }\n\n return pattern._compiled\n}\n","module.exports = patternInScope\n\nfunction patternInScope(stack, pattern) {\n return (\n listInScope(stack, pattern.inConstruct, true) &&\n !listInScope(stack, pattern.notInConstruct)\n )\n}\n\nfunction listInScope(stack, list, none) {\n var index\n\n if (!list) {\n return none\n }\n\n if (typeof list === 'string') {\n list = [list]\n }\n\n index = -1\n\n while (++index < list.length) {\n if (stack.indexOf(list[index]) !== -1) {\n return true\n }\n }\n\n return false\n}\n","module.exports = safe\n\nvar patternCompile = require('./pattern-compile')\nvar patternInScope = require('./pattern-in-scope')\n\nfunction safe(context, input, config) {\n var value = (config.before || '') + (input || '') + (config.after || '')\n var positions = []\n var result = []\n var infos = {}\n var index = -1\n var before\n var after\n var position\n var pattern\n var expression\n var match\n var start\n var end\n\n while (++index < context.unsafe.length) {\n pattern = context.unsafe[index]\n\n if (!patternInScope(context.stack, pattern)) {\n continue\n }\n\n expression = patternCompile(pattern)\n\n while ((match = expression.exec(value))) {\n before = 'before' in pattern || pattern.atBreak\n after = 'after' in pattern\n\n position = match.index + (before ? match[1].length : 0)\n\n if (positions.indexOf(position) === -1) {\n positions.push(position)\n infos[position] = {before: before, after: after}\n } else {\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 }\n }\n }\n\n positions.sort(numerical)\n\n start = config.before ? config.before.length : 0\n end = value.length - (config.after ? config.after.length : 0)\n index = -1\n\n while (++index < positions.length) {\n position = positions[index]\n\n if (\n // Character before or after matched:\n position < start ||\n position >= end\n ) {\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 ) {\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.indexOf(value.charAt(position)) === -1)\n ) {\n // Character escape.\n result.push('\\\\')\n } else {\n // Character reference.\n result.push(\n '&#x' + value.charCodeAt(position).toString(16).toUpperCase() + ';'\n )\n start++\n }\n }\n\n result.push(escapeBackslashes(value.slice(start, end), config.after))\n\n return result.join('')\n}\n\nfunction numerical(a, b) {\n return a - b\n}\n\nfunction escapeBackslashes(value, after) {\n var expression = /\\\\(?=[!-/:-@[-`{-~])/g\n var positions = []\n var results = []\n var index = -1\n var start = 0\n var whole = value + after\n var 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","'use strict'\n\nmodule.exports = toString\n\n// Get the text content of a node.\n// Prefer the node’s plain-text fields, otherwise serialize its children,\n// and if the given value is an array, serialize the nodes in it.\nfunction toString(node) {\n return (\n (node &&\n (node.value ||\n node.alt ||\n node.title ||\n ('children' in node && all(node.children)) ||\n ('length' in node && all(node)))) ||\n ''\n )\n}\n\nfunction all(values) {\n var result = []\n var index = -1\n\n while (++index < values.length) {\n result[index] = toString(values[index])\n }\n\n return result.join('')\n}\n","'use strict'\n\n/* eslint-env browser */\n\nvar el\n\nvar semicolon = 59 // ';'\n\nmodule.exports = decodeEntity\n\nfunction decodeEntity(characters) {\n var entity = '&' + characters + ';'\n var char\n\n el = el || document.createElement('i')\n el.innerHTML = entity\n char = el.textContent\n\n // Some entities do not require the closing semicolon (`¬` - for instance),\n // which leads to situations where parsing the assumed entity of ¬it; will\n // result in the string `¬it;`. When we encounter a trailing semicolon after\n // parsing and the entity to decode was not a semicolon (`;`), we can\n // assume that the matching was incomplete\n if (char.charCodeAt(char.length - 1) === semicolon && characters !== 'semi') {\n return false\n }\n\n // If the decoded string is equal to the input, the entity was not valid\n return char === entity ? false : char\n}\n","'use strict'\n\nmodule.exports = factory\n\nvar noop = Function.prototype\nvar own = {}.hasOwnProperty\n\n// Handle values based on a property.\nfunction factory(key, options) {\n var settings = options || {}\n\n function one(value) {\n var fn = one.invalid\n var handlers = one.handlers\n\n if (value && own.call(value, key)) {\n fn = own.call(handlers, value[key]) ? handlers[value[key]] : one.unknown\n }\n\n return (fn || noop).apply(this, arguments)\n }\n\n one.handlers = settings.handlers || {}\n one.invalid = settings.invalid\n one.unknown = settings.unknown\n\n return one\n}\n","'use strict'\n\nvar unified = require('unified')\nvar parse = require('remark-parse')\nvar stringify = require('remark-stringify')\n\nmodule.exports = unified().use(parse).use(stringify).freeze()\n","'use strict'\n\nmodule.exports = bail\n\nfunction bail(err) {\n if (err) {\n throw err\n }\n}\n","'use strict';\n\nmodule.exports = value => {\n\tif (Object.prototype.toString.call(value) !== '[object Object]') {\n\t\treturn false;\n\t}\n\n\tconst prototype = Object.getPrototypeOf(value);\n\treturn prototype === null || prototype === Object.prototype;\n};\n","'use strict'\n\nmodule.exports = fromMarkdown\n\n// These three are compiled away in the `dist/`\n\nvar toString = require('mdast-util-to-string')\nvar assign = require('micromark/dist/constant/assign')\nvar own = require('micromark/dist/constant/has-own-property')\nvar normalizeIdentifier = require('micromark/dist/util/normalize-identifier')\nvar safeFromInt = require('micromark/dist/util/safe-from-int')\nvar parser = require('micromark/dist/parse')\nvar preprocessor = require('micromark/dist/preprocess')\nvar postprocess = require('micromark/dist/postprocess')\nvar decode = require('parse-entities/decode-entity')\nvar stringifyPosition = require('unist-util-stringify-position')\n\nfunction fromMarkdown(value, encoding, options) {\n if (typeof encoding !== 'string') {\n options = encoding\n encoding = undefined\n }\n\n return compiler(options)(\n postprocess(\n parser(options).document().write(preprocessor()(value, encoding, true))\n )\n )\n}\n\n// Note this compiler only understand complete buffering, not streaming.\nfunction compiler(options) {\n var settings = options || {}\n var config = configure(\n {\n transforms: [],\n canContainEols: [\n 'emphasis',\n 'fragment',\n 'heading',\n 'paragraph',\n 'strong'\n ],\n\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\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 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\n settings.mdastExtensions || []\n )\n\n var data = {}\n\n return compile\n\n function compile(events) {\n var tree = {type: 'root', children: []}\n var stack = [tree]\n var tokenStack = []\n var listStack = []\n var index = -1\n var handler\n var listStart\n\n var context = {\n stack: stack,\n tokenStack: tokenStack,\n config: config,\n enter: enter,\n exit: exit,\n buffer: buffer,\n resume: resume,\n setData: setData,\n getData: getData\n }\n\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 (\n events[index][1].type === 'listOrdered' ||\n events[index][1].type === 'listUnordered'\n ) {\n if (events[index][0] === 'enter') {\n listStack.push(index)\n } else {\n listStart = listStack.pop(index)\n index = prepareList(events, listStart, index)\n }\n }\n }\n\n index = -1\n\n while (++index < events.length) {\n handler = config[events[index][0]]\n\n if (own.call(handler, events[index][1].type)) {\n handler[events[index][1].type].call(\n assign({sliceSerialize: events[index][2].sliceSerialize}, context),\n events[index][1]\n )\n }\n }\n\n if (tokenStack.length) {\n throw new Error(\n 'Cannot close document, a token (`' +\n tokenStack[tokenStack.length - 1].type +\n '`, ' +\n stringifyPosition({\n start: tokenStack[tokenStack.length - 1].start,\n end: tokenStack[tokenStack.length - 1].end\n }) +\n ') is still open'\n )\n }\n\n // Figure out `root` position.\n tree.position = {\n start: point(\n events.length ? events[0][1].start : {line: 1, column: 1, offset: 0}\n ),\n\n end: point(\n events.length\n ? events[events.length - 2][1].end\n : {line: 1, column: 1, offset: 0}\n )\n }\n\n index = -1\n while (++index < config.transforms.length) {\n tree = config.transforms[index](tree) || tree\n }\n\n return tree\n }\n\n function prepareList(events, start, length) {\n var index = start - 1\n var containerBalance = -1\n var listSpread = false\n var listItem\n var tailIndex\n var lineIndex\n var tailEvent\n var event\n var firstBlankLineIndex\n var atMarker\n\n while (++index <= length) {\n event = events[index]\n\n if (\n event[1].type === 'listUnordered' ||\n event[1].type === 'listOrdered' ||\n event[1].type === 'blockQuote'\n ) {\n if (event[0] === 'enter') {\n containerBalance++\n } else {\n containerBalance--\n }\n\n atMarker = undefined\n } else if (event[1].type === 'lineEndingBlank') {\n if (event[0] === 'enter') {\n if (\n listItem &&\n !atMarker &&\n !containerBalance &&\n !firstBlankLineIndex\n ) {\n firstBlankLineIndex = index\n }\n\n atMarker = undefined\n }\n } else if (\n event[1].type === 'linePrefix' ||\n event[1].type === 'listItemValue' ||\n event[1].type === 'listItemMarker' ||\n event[1].type === 'listItemPrefix' ||\n event[1].type === 'listItemPrefixWhitespace'\n ) {\n // Empty.\n } else {\n atMarker = undefined\n }\n\n if (\n (!containerBalance &&\n event[0] === 'enter' &&\n event[1].type === 'listItemPrefix') ||\n (containerBalance === -1 &&\n event[0] === 'exit' &&\n (event[1].type === 'listUnordered' ||\n event[1].type === 'listOrdered'))\n ) {\n if (listItem) {\n tailIndex = index\n lineIndex = undefined\n\n while (tailIndex--) {\n tailEvent = events[tailIndex]\n\n if (\n tailEvent[1].type === 'lineEnding' ||\n tailEvent[1].type === 'lineEndingBlank'\n ) {\n if (tailEvent[0] === 'exit') continue\n\n if (lineIndex) {\n events[lineIndex][1].type = 'lineEndingBlank'\n listSpread = true\n }\n\n tailEvent[1].type = 'lineEnding'\n lineIndex = tailIndex\n } else if (\n tailEvent[1].type === 'linePrefix' ||\n tailEvent[1].type === 'blockQuotePrefix' ||\n tailEvent[1].type === 'blockQuotePrefixWhitespace' ||\n tailEvent[1].type === 'blockQuoteMarker' ||\n tailEvent[1].type === 'listItemIndent'\n ) {\n // Empty\n } else {\n break\n }\n }\n\n if (\n firstBlankLineIndex &&\n (!lineIndex || firstBlankLineIndex < lineIndex)\n ) {\n listItem._spread = true\n }\n\n // Fix position.\n listItem.end = point(\n lineIndex ? events[lineIndex][1].start : event[1].end\n )\n\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 listItem = {\n type: 'listItem',\n _spread: false,\n start: point(event[1].start)\n }\n\n events.splice(index, 0, ['enter', listItem, event[2]])\n index++\n length++\n firstBlankLineIndex = undefined\n atMarker = true\n }\n }\n }\n\n events[start][1]._spread = listSpread\n return length\n }\n\n function setData(key, value) {\n data[key] = value\n }\n\n function getData(key) {\n return data[key]\n }\n\n function point(d) {\n return {line: d.line, column: d.column, offset: d.offset}\n }\n\n function opener(create, and) {\n return open\n\n function open(token) {\n enter.call(this, create(token), token)\n if (and) and.call(this, token)\n }\n }\n\n function buffer() {\n this.stack.push({type: 'fragment', children: []})\n }\n\n function enter(node, token) {\n this.stack[this.stack.length - 1].children.push(node)\n this.stack.push(node)\n this.tokenStack.push(token)\n node.position = {start: point(token.start)}\n return node\n }\n\n function closer(and) {\n return close\n\n function close(token) {\n if (and) and.call(this, token)\n exit.call(this, token)\n }\n }\n\n function exit(token) {\n var node = this.stack.pop()\n var open = this.tokenStack.pop()\n\n if (!open) {\n throw new Error(\n 'Cannot close `' +\n token.type +\n '` (' +\n stringifyPosition({start: token.start, end: token.end}) +\n '): it’s not open'\n )\n } else if (open.type !== token.type) {\n throw new Error(\n 'Cannot close `' +\n token.type +\n '` (' +\n stringifyPosition({start: token.start, end: token.end}) +\n '): a different token (`' +\n open.type +\n '`, ' +\n stringifyPosition({start: open.start, end: open.end}) +\n ') is open'\n )\n }\n\n node.position.end = point(token.end)\n return node\n }\n\n function resume() {\n return toString(this.stack.pop())\n }\n\n //\n // Handlers.\n //\n\n function onenterlistordered() {\n setData('expectingFirstListItemValue', true)\n }\n\n function onenterlistitemvalue(token) {\n if (getData('expectingFirstListItemValue')) {\n this.stack[this.stack.length - 2].start = parseInt(\n this.sliceSerialize(token),\n 10\n )\n\n setData('expectingFirstListItemValue')\n }\n }\n\n function onexitcodefencedfenceinfo() {\n var data = this.resume()\n this.stack[this.stack.length - 1].lang = data\n }\n\n function onexitcodefencedfencemeta() {\n var data = this.resume()\n this.stack[this.stack.length - 1].meta = data\n }\n\n function onexitcodefencedfence() {\n // Exit if this is the closing fence.\n if (getData('flowCodeInside')) return\n this.buffer()\n setData('flowCodeInside', true)\n }\n\n function onexitcodefenced() {\n var data = this.resume()\n this.stack[this.stack.length - 1].value = data.replace(\n /^(\\r?\\n|\\r)|(\\r?\\n|\\r)$/g,\n ''\n )\n\n setData('flowCodeInside')\n }\n\n function onexitcodeindented() {\n var data = this.resume()\n this.stack[this.stack.length - 1].value = data\n }\n\n function onexitdefinitionlabelstring(token) {\n // Discard label, use the source content instead.\n var label = this.resume()\n this.stack[this.stack.length - 1].label = label\n this.stack[this.stack.length - 1].identifier = normalizeIdentifier(\n this.sliceSerialize(token)\n ).toLowerCase()\n }\n\n function onexitdefinitiontitlestring() {\n var data = this.resume()\n this.stack[this.stack.length - 1].title = data\n }\n\n function onexitdefinitiondestinationstring() {\n var data = this.resume()\n this.stack[this.stack.length - 1].url = data\n }\n\n function onexitatxheadingsequence(token) {\n if (!this.stack[this.stack.length - 1].depth) {\n this.stack[this.stack.length - 1].depth = this.sliceSerialize(\n token\n ).length\n }\n }\n\n function onexitsetextheadingtext() {\n setData('setextHeadingSlurpLineEnding', true)\n }\n\n function onexitsetextheadinglinesequence(token) {\n this.stack[this.stack.length - 1].depth =\n this.sliceSerialize(token).charCodeAt(0) === 61 ? 1 : 2\n }\n\n function onexitsetextheading() {\n setData('setextHeadingSlurpLineEnding')\n }\n\n function onenterdata(token) {\n var siblings = this.stack[this.stack.length - 1].children\n var tail = siblings[siblings.length - 1]\n\n if (!tail || tail.type !== 'text') {\n // Add a new text node.\n tail = text()\n tail.position = {start: point(token.start)}\n this.stack[this.stack.length - 1].children.push(tail)\n }\n\n this.stack.push(tail)\n }\n\n function onexitdata(token) {\n var tail = this.stack.pop()\n tail.value += this.sliceSerialize(token)\n tail.position.end = point(token.end)\n }\n\n function onexitlineending(token) {\n var context = this.stack[this.stack.length - 1]\n\n // If we’re at a hard break, include the line ending in there.\n if (getData('atHardBreak')) {\n context.children[context.children.length - 1].position.end = point(\n token.end\n )\n\n setData('atHardBreak')\n return\n }\n\n if (\n !getData('setextHeadingSlurpLineEnding') &&\n config.canContainEols.indexOf(context.type) > -1\n ) {\n onenterdata.call(this, token)\n onexitdata.call(this, token)\n }\n }\n\n function onexithardbreak() {\n setData('atHardBreak', true)\n }\n\n function onexithtmlflow() {\n var data = this.resume()\n this.stack[this.stack.length - 1].value = data\n }\n\n function onexithtmltext() {\n var data = this.resume()\n this.stack[this.stack.length - 1].value = data\n }\n\n function onexitcodetext() {\n var data = this.resume()\n this.stack[this.stack.length - 1].value = data\n }\n\n function onexitlink() {\n var context = this.stack[this.stack.length - 1]\n\n // To do: clean.\n if (getData('inReference')) {\n context.type += 'Reference'\n context.referenceType = getData('referenceType') || 'shortcut'\n delete context.url\n delete context.title\n } else {\n delete context.identifier\n delete context.label\n delete context.referenceType\n }\n\n setData('referenceType')\n }\n\n function onexitimage() {\n var context = this.stack[this.stack.length - 1]\n\n // To do: clean.\n if (getData('inReference')) {\n context.type += 'Reference'\n context.referenceType = getData('referenceType') || 'shortcut'\n delete context.url\n delete context.title\n } else {\n delete context.identifier\n delete context.label\n delete context.referenceType\n }\n\n setData('referenceType')\n }\n\n function onexitlabeltext(token) {\n this.stack[this.stack.length - 2].identifier = normalizeIdentifier(\n this.sliceSerialize(token)\n ).toLowerCase()\n }\n\n function onexitlabel() {\n var fragment = this.stack[this.stack.length - 1]\n var value = this.resume()\n\n this.stack[this.stack.length - 1].label = value\n\n // Assume a reference.\n setData('inReference', true)\n\n if (this.stack[this.stack.length - 1].type === 'link') {\n this.stack[this.stack.length - 1].children = fragment.children\n } else {\n this.stack[this.stack.length - 1].alt = value\n }\n }\n\n function onexitresourcedestinationstring() {\n var data = this.resume()\n this.stack[this.stack.length - 1].url = data\n }\n\n function onexitresourcetitlestring() {\n var data = this.resume()\n this.stack[this.stack.length - 1].title = data\n }\n\n function onexitresource() {\n setData('inReference')\n }\n\n function onenterreference() {\n setData('referenceType', 'collapsed')\n }\n\n function onexitreferencestring(token) {\n var label = this.resume()\n this.stack[this.stack.length - 1].label = label\n this.stack[this.stack.length - 1].identifier = normalizeIdentifier(\n this.sliceSerialize(token)\n ).toLowerCase()\n setData('referenceType', 'full')\n }\n\n function onexitcharacterreferencemarker(token) {\n setData('characterReferenceType', token.type)\n }\n\n function onexitcharacterreferencevalue(token) {\n var data = this.sliceSerialize(token)\n var type = getData('characterReferenceType')\n var value\n var tail\n\n if (type) {\n value = safeFromInt(\n data,\n type === 'characterReferenceMarkerNumeric' ? 10 : 16\n )\n\n setData('characterReferenceType')\n } else {\n value = decode(data)\n }\n\n tail = this.stack.pop()\n tail.value += value\n tail.position.end = point(token.end)\n }\n\n function onexitautolinkprotocol(token) {\n onexitdata.call(this, token)\n this.stack[this.stack.length - 1].url = this.sliceSerialize(token)\n }\n\n function onexitautolinkemail(token) {\n onexitdata.call(this, token)\n this.stack[this.stack.length - 1].url =\n 'mailto:' + this.sliceSerialize(token)\n }\n\n //\n // Creaters.\n //\n\n function blockQuote() {\n return {type: 'blockquote', children: []}\n }\n\n function codeFlow() {\n return {type: 'code', lang: null, meta: null, value: ''}\n }\n\n function codeText() {\n return {type: 'inlineCode', value: ''}\n }\n\n function definition() {\n return {\n type: 'definition',\n identifier: '',\n label: null,\n title: null,\n url: ''\n }\n }\n\n function emphasis() {\n return {type: 'emphasis', children: []}\n }\n\n function heading() {\n return {type: 'heading', depth: undefined, children: []}\n }\n\n function hardBreak() {\n return {type: 'break'}\n }\n\n function html() {\n return {type: 'html', value: ''}\n }\n\n function image() {\n return {type: 'image', title: null, url: '', alt: null}\n }\n\n function link() {\n return {type: 'link', title: null, url: '', children: []}\n }\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 function listItem(token) {\n return {\n type: 'listItem',\n spread: token._spread,\n checked: null,\n children: []\n }\n }\n\n function paragraph() {\n return {type: 'paragraph', children: []}\n }\n\n function strong() {\n return {type: 'strong', children: []}\n }\n\n function text() {\n return {type: 'text', value: ''}\n }\n\n function thematicBreak() {\n return {type: 'thematicBreak'}\n }\n}\n\nfunction configure(config, extensions) {\n var index = -1\n\n while (++index < extensions.length) {\n extension(config, extensions[index])\n }\n\n return config\n}\n\nfunction extension(config, extension) {\n var key\n var left\n\n for (key in extension) {\n left = own.call(config, key) ? config[key] : (config[key] = {})\n\n if (key === 'canContainEols' || key === 'transforms') {\n config[key] = [].concat(left, extension[key])\n } else {\n Object.assign(left, extension[key])\n }\n }\n}\n","'use strict'\n\nmodule.exports = require('./dist')\n","'use strict'\n\nmodule.exports = toString\n\n// Get the text content of a node.\n// Prefer the node’s plain-text fields, otherwise serialize its children,\n// and if the given value is an array, serialize the nodes in it.\nfunction toString(node) {\n return (\n (node &&\n (node.value ||\n node.alt ||\n node.title ||\n ('children' in node && all(node.children)) ||\n ('length' in node && all(node)))) ||\n ''\n )\n}\n\nfunction all(values) {\n var result = []\n var index = -1\n\n while (++index < values.length) {\n result[index] = toString(values[index])\n }\n\n return result.join('')\n}\n","'use strict'\n\nvar regexCheck = require('../util/regex-check.js')\n\nvar asciiAlpha = regexCheck(/[A-Za-z]/)\n\nmodule.exports = asciiAlpha\n","'use strict'\n\nvar regexCheck = require('../util/regex-check.js')\n\nvar asciiAlphanumeric = regexCheck(/[\\dA-Za-z]/)\n\nmodule.exports = asciiAlphanumeric\n","'use strict'\n\nvar regexCheck = require('../util/regex-check.js')\n\nvar asciiAtext = regexCheck(/[#-'*+\\--9=?A-Z^-~]/)\n\nmodule.exports = asciiAtext\n","'use strict'\n\n// Note: EOF is seen as ASCII control here, because `null < 32 == true`.\nfunction asciiControl(code) {\n return (\n // Special whitespace codes (which have negative values), C0 and Control\n // character DEL\n code < 32 || code === 127\n )\n}\n\nmodule.exports = asciiControl\n","'use strict'\n\nvar regexCheck = require('../util/regex-check.js')\n\nvar asciiDigit = regexCheck(/\\d/)\n\nmodule.exports = asciiDigit\n","'use strict'\n\nvar regexCheck = require('../util/regex-check.js')\n\nvar asciiHexDigit = regexCheck(/[\\dA-Fa-f]/)\n\nmodule.exports = asciiHexDigit\n","'use strict'\n\nvar regexCheck = require('../util/regex-check.js')\n\nvar asciiPunctuation = regexCheck(/[!-/:-@[-`{-~]/)\n\nmodule.exports = asciiPunctuation\n","'use strict'\n\nfunction markdownLineEndingOrSpace(code) {\n return code < 0 || code === 32\n}\n\nmodule.exports = markdownLineEndingOrSpace\n","'use strict'\n\nfunction markdownLineEnding(code) {\n return code < -2\n}\n\nmodule.exports = markdownLineEnding\n","'use strict'\n\nfunction markdownSpace(code) {\n return code === -2 || code === -1 || code === 32\n}\n\nmodule.exports = markdownSpace\n","'use strict'\n\nvar unicodePunctuationRegex = require('../constant/unicode-punctuation-regex.js')\nvar regexCheck = require('../util/regex-check.js')\n\n// In fact adds to the bundle size.\n\nvar unicodePunctuation = regexCheck(unicodePunctuationRegex)\n\nmodule.exports = unicodePunctuation\n","'use strict'\n\nvar regexCheck = require('../util/regex-check.js')\n\nvar unicodeWhitespace = regexCheck(/\\s/)\n\nmodule.exports = unicodeWhitespace\n","'use strict'\n\nvar assign = Object.assign\n\nmodule.exports = assign\n","'use strict'\n\nvar fromCharCode = String.fromCharCode\n\nmodule.exports = fromCharCode\n","'use strict'\n\nvar own = {}.hasOwnProperty\n\nmodule.exports = own\n","'use strict'\n\n// This module is copied from .\nvar basics = [\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 'section',\n 'source',\n 'summary',\n 'table',\n 'tbody',\n 'td',\n 'tfoot',\n 'th',\n 'thead',\n 'title',\n 'tr',\n 'track',\n 'ul'\n]\n\nmodule.exports = basics\n","'use strict'\n\n// This module is copied from .\nvar raws = ['pre', 'script', 'style', 'textarea']\n\nmodule.exports = raws\n","'use strict'\n\nvar splice = [].splice\n\nmodule.exports = splice\n","'use strict'\n\n// This module is generated by `script/`.\n//\n// CommonMark handles attention (emphasis, strong) markers based on what comes\n// before or after them.\n// One such difference is if those characters are Unicode punctuation.\n// This script is generated from the Unicode data.\nvar unicodePunctuation = /[!-\\/:-@\\[-`\\{-~\\xA1\\xA7\\xAB\\xB6\\xB7\\xBB\\xBF\\u037E\\u0387\\u055A-\\u055F\\u0589\\u058A\\u05BE\\u05C0\\u05C3\\u05C6\\u05F3\\u05F4\\u0609\\u060A\\u060C\\u060D\\u061B\\u061E\\u061F\\u066A-\\u066D\\u06D4\\u0700-\\u070D\\u07F7-\\u07F9\\u0830-\\u083E\\u085E\\u0964\\u0965\\u0970\\u09FD\\u0A76\\u0AF0\\u0C77\\u0C84\\u0DF4\\u0E4F\\u0E5A\\u0E5B\\u0F04-\\u0F12\\u0F14\\u0F3A-\\u0F3D\\u0F85\\u0FD0-\\u0FD4\\u0FD9\\u0FDA\\u104A-\\u104F\\u10FB\\u1360-\\u1368\\u1400\\u166E\\u169B\\u169C\\u16EB-\\u16ED\\u1735\\u1736\\u17D4-\\u17D6\\u17D8-\\u17DA\\u1800-\\u180A\\u1944\\u1945\\u1A1E\\u1A1F\\u1AA0-\\u1AA6\\u1AA8-\\u1AAD\\u1B5A-\\u1B60\\u1BFC-\\u1BFF\\u1C3B-\\u1C3F\\u1C7E\\u1C7F\\u1CC0-\\u1CC7\\u1CD3\\u2010-\\u2027\\u2030-\\u2043\\u2045-\\u2051\\u2053-\\u205E\\u207D\\u207E\\u208D\\u208E\\u2308-\\u230B\\u2329\\u232A\\u2768-\\u2775\\u27C5\\u27C6\\u27E6-\\u27EF\\u2983-\\u2998\\u29D8-\\u29DB\\u29FC\\u29FD\\u2CF9-\\u2CFC\\u2CFE\\u2CFF\\u2D70\\u2E00-\\u2E2E\\u2E30-\\u2E4F\\u2E52\\u3001-\\u3003\\u3008-\\u3011\\u3014-\\u301F\\u3030\\u303D\\u30A0\\u30FB\\uA4FE\\uA4FF\\uA60D-\\uA60F\\uA673\\uA67E\\uA6F2-\\uA6F7\\uA874-\\uA877\\uA8CE\\uA8CF\\uA8F8-\\uA8FA\\uA8FC\\uA92E\\uA92F\\uA95F\\uA9C1-\\uA9CD\\uA9DE\\uA9DF\\uAA5C-\\uAA5F\\uAADE\\uAADF\\uAAF0\\uAAF1\\uABEB\\uFD3E\\uFD3F\\uFE10-\\uFE19\\uFE30-\\uFE52\\uFE54-\\uFE61\\uFE63\\uFE68\\uFE6A\\uFE6B\\uFF01-\\uFF03\\uFF05-\\uFF0A\\uFF0C-\\uFF0F\\uFF1A\\uFF1B\\uFF1F\\uFF20\\uFF3B-\\uFF3D\\uFF3F\\uFF5B\\uFF5D\\uFF5F-\\uFF65]/\n\nmodule.exports = unicodePunctuation\n","'use strict'\n\nObject.defineProperty(exports, '__esModule', {value: true})\n\nvar text$1 = require('./initialize/text.js')\nvar attention = require('./tokenize/attention.js')\nvar autolink = require('./tokenize/autolink.js')\nvar blockQuote = require('./tokenize/block-quote.js')\nvar characterEscape = require('./tokenize/character-escape.js')\nvar characterReference = require('./tokenize/character-reference.js')\nvar codeFenced = require('./tokenize/code-fenced.js')\nvar codeIndented = require('./tokenize/code-indented.js')\nvar codeText = require('./tokenize/code-text.js')\nvar definition = require('./tokenize/definition.js')\nvar hardBreakEscape = require('./tokenize/hard-break-escape.js')\nvar headingAtx = require('./tokenize/heading-atx.js')\nvar htmlFlow = require('./tokenize/html-flow.js')\nvar htmlText = require('./tokenize/html-text.js')\nvar labelEnd = require('./tokenize/label-end.js')\nvar labelStartImage = require('./tokenize/label-start-image.js')\nvar labelStartLink = require('./tokenize/label-start-link.js')\nvar lineEnding = require('./tokenize/line-ending.js')\nvar list = require('./tokenize/list.js')\nvar setextUnderline = require('./tokenize/setext-underline.js')\nvar thematicBreak = require('./tokenize/thematic-break.js')\n\nvar document = {\n 42: list,\n // Asterisk\n 43: list,\n // Plus sign\n 45: list,\n // Dash\n 48: list,\n // 0\n 49: list,\n // 1\n 50: list,\n // 2\n 51: list,\n // 3\n 52: list,\n // 4\n 53: list,\n // 5\n 54: list,\n // 6\n 55: list,\n // 7\n 56: list,\n // 8\n 57: list,\n // 9\n 62: blockQuote // Greater than\n}\nvar contentInitial = {\n 91: definition // Left square bracket\n}\nvar flowInitial = {\n '-2': codeIndented,\n // Horizontal tab\n '-1': codeIndented,\n // Virtual space\n 32: codeIndented // Space\n}\nvar flow = {\n 35: headingAtx,\n // Number sign\n 42: thematicBreak,\n // Asterisk\n 45: [setextUnderline, thematicBreak],\n // Dash\n 60: htmlFlow,\n // Less than\n 61: setextUnderline,\n // Equals to\n 95: thematicBreak,\n // Underscore\n 96: codeFenced,\n // Grave accent\n 126: codeFenced // Tilde\n}\nvar string = {\n 38: characterReference,\n // Ampersand\n 92: characterEscape // Backslash\n}\nvar text = {\n '-5': lineEnding,\n // Carriage return\n '-4': lineEnding,\n // Line feed\n '-3': lineEnding,\n // Carriage return + line feed\n 33: labelStartImage,\n // Exclamation mark\n 38: characterReference,\n // Ampersand\n 42: attention,\n // Asterisk\n 60: [autolink, htmlText],\n // Less than\n 91: labelStartLink,\n // Left square bracket\n 92: [hardBreakEscape, characterEscape],\n // Backslash\n 93: labelEnd,\n // Right square bracket\n 95: attention,\n // Underscore\n 96: codeText // Grave accent\n}\nvar insideSpan = {\n null: [attention, text$1.resolver]\n}\nvar disable = {\n null: []\n}\n\nexports.contentInitial = contentInitial\nexports.disable = disable\nexports.document = document\nexports.flow = flow\nexports.flowInitial = flowInitial\nexports.insideSpan = insideSpan\nexports.string = string\nexports.text = text\n","'use strict'\n\nObject.defineProperty(exports, '__esModule', {value: true})\n\nvar markdownLineEnding = require('../character/markdown-line-ending.js')\nvar factorySpace = require('../tokenize/factory-space.js')\n\nvar tokenize = initializeContent\n\nfunction initializeContent(effects) {\n var contentStart = effects.attempt(\n this.parser.constructs.contentInitial,\n afterContentStartConstruct,\n paragraphInitial\n )\n var previous\n return contentStart\n\n function afterContentStartConstruct(code) {\n if (code === null) {\n effects.consume(code)\n return\n }\n\n effects.enter('lineEnding')\n effects.consume(code)\n effects.exit('lineEnding')\n return factorySpace(effects, contentStart, 'linePrefix')\n }\n\n function paragraphInitial(code) {\n effects.enter('paragraph')\n return lineStart(code)\n }\n\n function lineStart(code) {\n var token = effects.enter('chunkText', {\n contentType: 'text',\n previous: previous\n })\n\n if (previous) {\n previous.next = token\n }\n\n previous = token\n return data(code)\n }\n\n function data(code) {\n if (code === null) {\n effects.exit('chunkText')\n effects.exit('paragraph')\n effects.consume(code)\n return\n }\n\n if (markdownLineEnding(code)) {\n effects.consume(code)\n effects.exit('chunkText')\n return lineStart\n } // Data.\n\n effects.consume(code)\n return data\n }\n}\n\nexports.tokenize = tokenize\n","'use strict'\n\nObject.defineProperty(exports, '__esModule', {value: true})\n\nvar markdownLineEnding = require('../character/markdown-line-ending.js')\nvar factorySpace = require('../tokenize/factory-space.js')\nvar partialBlankLine = require('../tokenize/partial-blank-line.js')\n\nvar tokenize = initializeDocument\nvar containerConstruct = {\n tokenize: tokenizeContainer\n}\nvar lazyFlowConstruct = {\n tokenize: tokenizeLazyFlow\n}\n\nfunction initializeDocument(effects) {\n var self = this\n var stack = []\n var continued = 0\n var inspectConstruct = {\n tokenize: tokenizeInspect,\n partial: true\n }\n var inspectResult\n var childFlow\n var childToken\n return start\n\n function start(code) {\n if (continued < stack.length) {\n self.containerState = stack[continued][1]\n return effects.attempt(\n stack[continued][0].continuation,\n documentContinue,\n documentContinued\n )(code)\n }\n\n return documentContinued(code)\n }\n\n function documentContinue(code) {\n continued++\n return start(code)\n }\n\n function documentContinued(code) {\n // If we’re in a concrete construct (such as when expecting another line of\n // HTML, or we resulted in lazy content), we can immediately start flow.\n if (inspectResult && inspectResult.flowContinue) {\n return flowStart(code)\n }\n\n self.interrupt =\n childFlow &&\n childFlow.currentConstruct &&\n childFlow.currentConstruct.interruptible\n self.containerState = {}\n return effects.attempt(\n containerConstruct,\n containerContinue,\n flowStart\n )(code)\n }\n\n function containerContinue(code) {\n stack.push([self.currentConstruct, self.containerState])\n self.containerState = undefined\n return documentContinued(code)\n }\n\n function flowStart(code) {\n if (code === null) {\n exitContainers(0, true)\n effects.consume(code)\n return\n }\n\n childFlow = childFlow || self.parser.flow(self.now())\n effects.enter('chunkFlow', {\n contentType: 'flow',\n previous: childToken,\n _tokenizer: childFlow\n })\n return flowContinue(code)\n }\n\n function flowContinue(code) {\n if (code === null) {\n continueFlow(effects.exit('chunkFlow'))\n return flowStart(code)\n }\n\n if (markdownLineEnding(code)) {\n effects.consume(code)\n continueFlow(effects.exit('chunkFlow'))\n return effects.check(inspectConstruct, documentAfterPeek)\n }\n\n effects.consume(code)\n return flowContinue\n }\n\n function documentAfterPeek(code) {\n exitContainers(\n inspectResult.continued,\n inspectResult && inspectResult.flowEnd\n )\n continued = 0\n return start(code)\n }\n\n function continueFlow(token) {\n if (childToken) childToken.next = token\n childToken = token\n childFlow.lazy = inspectResult && inspectResult.lazy\n childFlow.defineSkip(token.start)\n childFlow.write(self.sliceStream(token))\n }\n\n function exitContainers(size, end) {\n var index = stack.length // Close the flow.\n\n if (childFlow && end) {\n childFlow.write([null])\n childToken = childFlow = undefined\n } // Exit open containers.\n\n while (index-- > size) {\n self.containerState = stack[index][1]\n stack[index][0].exit.call(self, effects)\n }\n\n stack.length = size\n }\n\n function tokenizeInspect(effects, ok) {\n var subcontinued = 0\n inspectResult = {}\n return inspectStart\n\n function inspectStart(code) {\n if (subcontinued < stack.length) {\n self.containerState = stack[subcontinued][1]\n return effects.attempt(\n stack[subcontinued][0].continuation,\n inspectContinue,\n inspectLess\n )(code)\n } // If we’re continued but in a concrete flow, we can’t have more\n // containers.\n\n if (childFlow.currentConstruct && childFlow.currentConstruct.concrete) {\n inspectResult.flowContinue = true\n return inspectDone(code)\n }\n\n self.interrupt =\n childFlow.currentConstruct && childFlow.currentConstruct.interruptible\n self.containerState = {}\n return effects.attempt(\n containerConstruct,\n inspectFlowEnd,\n inspectDone\n )(code)\n }\n\n function inspectContinue(code) {\n subcontinued++\n return self.containerState._closeFlow\n ? inspectFlowEnd(code)\n : inspectStart(code)\n }\n\n function inspectLess(code) {\n if (childFlow.currentConstruct && childFlow.currentConstruct.lazy) {\n // Maybe another container?\n self.containerState = {}\n return effects.attempt(\n containerConstruct,\n inspectFlowEnd, // Maybe flow, or a blank line?\n effects.attempt(\n lazyFlowConstruct,\n inspectFlowEnd,\n effects.check(partialBlankLine, inspectFlowEnd, inspectLazy)\n )\n )(code)\n } // Otherwise we’re interrupting.\n\n return inspectFlowEnd(code)\n }\n\n function inspectLazy(code) {\n // Act as if all containers are continued.\n subcontinued = stack.length\n inspectResult.lazy = true\n inspectResult.flowContinue = true\n return inspectDone(code)\n } // We’re done with flow if we have more containers, or an interruption.\n\n function inspectFlowEnd(code) {\n inspectResult.flowEnd = true\n return inspectDone(code)\n }\n\n function inspectDone(code) {\n inspectResult.continued = subcontinued\n self.interrupt = self.containerState = undefined\n return ok(code)\n }\n }\n}\n\nfunction tokenizeContainer(effects, ok, nok) {\n return factorySpace(\n effects,\n effects.attempt(this.parser.constructs.document, ok, nok),\n 'linePrefix',\n this.parser.constructs.disable.null.indexOf('codeIndented') > -1\n ? undefined\n : 4\n )\n}\n\nfunction tokenizeLazyFlow(effects, ok, nok) {\n return factorySpace(\n effects,\n effects.lazy(this.parser.constructs.flow, ok, nok),\n 'linePrefix',\n this.parser.constructs.disable.null.indexOf('codeIndented') > -1\n ? undefined\n : 4\n )\n}\n\nexports.tokenize = tokenize\n","'use strict'\n\nObject.defineProperty(exports, '__esModule', {value: true})\n\nvar content = require('../tokenize/content.js')\nvar factorySpace = require('../tokenize/factory-space.js')\nvar partialBlankLine = require('../tokenize/partial-blank-line.js')\n\nvar tokenize = initializeFlow\n\nfunction initializeFlow(effects) {\n var self = this\n var initial = effects.attempt(\n // Try to parse a blank line.\n partialBlankLine,\n atBlankEnding, // Try to parse initial flow (essentially, only code).\n effects.attempt(\n this.parser.constructs.flowInitial,\n afterConstruct,\n factorySpace(\n effects,\n effects.attempt(\n this.parser.constructs.flow,\n afterConstruct,\n effects.attempt(content, afterConstruct)\n ),\n 'linePrefix'\n )\n )\n )\n return initial\n\n function atBlankEnding(code) {\n if (code === null) {\n effects.consume(code)\n return\n }\n\n effects.enter('lineEndingBlank')\n effects.consume(code)\n effects.exit('lineEndingBlank')\n self.currentConstruct = undefined\n return initial\n }\n\n function afterConstruct(code) {\n if (code === null) {\n effects.consume(code)\n return\n }\n\n effects.enter('lineEnding')\n effects.consume(code)\n effects.exit('lineEnding')\n self.currentConstruct = undefined\n return initial\n }\n}\n\nexports.tokenize = tokenize\n","'use strict'\n\nObject.defineProperty(exports, '__esModule', {value: true})\n\nvar assign = require('../constant/assign.js')\nvar shallow = require('../util/shallow.js')\n\nvar text = initializeFactory('text')\nvar string = initializeFactory('string')\nvar resolver = {\n resolveAll: createResolver()\n}\n\nfunction initializeFactory(field) {\n return {\n tokenize: initializeText,\n resolveAll: createResolver(\n field === 'text' ? resolveAllLineSuffixes : undefined\n )\n }\n\n function initializeText(effects) {\n var self = this\n var constructs = this.parser.constructs[field]\n var text = effects.attempt(constructs, start, notText)\n return start\n\n function start(code) {\n return atBreak(code) ? text(code) : notText(code)\n }\n\n function notText(code) {\n if (code === null) {\n effects.consume(code)\n return\n }\n\n effects.enter('data')\n effects.consume(code)\n return data\n }\n\n function data(code) {\n if (atBreak(code)) {\n effects.exit('data')\n return text(code)\n } // Data.\n\n effects.consume(code)\n return data\n }\n\n function atBreak(code) {\n var list = constructs[code]\n var index = -1\n\n if (code === null) {\n return true\n }\n\n if (list) {\n while (++index < list.length) {\n if (\n !list[index].previous ||\n list[index].previous.call(self, self.previous)\n ) {\n return true\n }\n }\n }\n }\n }\n}\n\nfunction createResolver(extraResolver) {\n return resolveAllText\n\n function resolveAllText(events, context) {\n var index = -1\n var enter // A rather boring computation (to merge adjacent `data` events) which\n // improves mm performance by 29%.\n\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\n enter = undefined\n }\n }\n\n return extraResolver ? extraResolver(events, context) : events\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\nfunction resolveAllLineSuffixes(events, context) {\n var eventIndex = -1\n var chunks\n var data\n var chunk\n var index\n var bufferIndex\n var size\n var tabs\n var token\n\n while (++eventIndex <= events.length) {\n if (\n (eventIndex === events.length ||\n events[eventIndex][1].type === 'lineEnding') &&\n events[eventIndex - 1][1].type === 'data'\n ) {\n data = events[eventIndex - 1][1]\n chunks = context.sliceStream(data)\n index = chunks.length\n bufferIndex = -1\n size = 0\n tabs = undefined\n\n while (index--) {\n chunk = chunks[index]\n\n if (typeof chunk === 'string') {\n bufferIndex = chunk.length\n\n while (chunk.charCodeAt(bufferIndex - 1) === 32) {\n size++\n bufferIndex--\n }\n\n if (bufferIndex) break\n bufferIndex = -1\n } // Number\n else if (chunk === -2) {\n tabs = true\n size++\n } else if (chunk === -1);\n else {\n // Replacement character, exit.\n index++\n break\n }\n }\n\n if (size) {\n token = {\n type:\n eventIndex === events.length || tabs || size < 2\n ? 'lineSuffix'\n : 'hardBreakTrailing',\n start: {\n line: data.end.line,\n column: data.end.column - size,\n offset: data.end.offset - size,\n _index: data.start._index + index,\n _bufferIndex: index\n ? bufferIndex\n : data.start._bufferIndex + bufferIndex\n },\n end: shallow(data.end)\n }\n data.end = shallow(token.start)\n\n if (data.start.offset === data.end.offset) {\n assign(data, token)\n } else {\n events.splice(\n eventIndex,\n 0,\n ['enter', token, context],\n ['exit', token, context]\n )\n eventIndex += 2\n }\n }\n\n eventIndex++\n }\n }\n\n return events\n}\n\nexports.resolver = resolver\nexports.string = string\nexports.text = text\n","'use strict'\n\nvar content = require('./initialize/content.js')\nvar document = require('./initialize/document.js')\nvar flow = require('./initialize/flow.js')\nvar text = require('./initialize/text.js')\nvar combineExtensions = require('./util/combine-extensions.js')\nvar createTokenizer = require('./util/create-tokenizer.js')\nvar miniflat = require('./util/miniflat.js')\nvar constructs = require('./constructs.js')\n\nfunction parse(options) {\n var settings = options || {}\n var parser = {\n defined: [],\n constructs: combineExtensions(\n [constructs].concat(miniflat(settings.extensions))\n ),\n content: create(content),\n document: create(document),\n flow: create(flow),\n string: create(text.string),\n text: create(text.text)\n }\n return parser\n\n function create(initializer) {\n return creator\n\n function creator(from) {\n return createTokenizer(parser, initializer, from)\n }\n }\n}\n\nmodule.exports = parse\n","'use strict'\n\nvar subtokenize = require('./util/subtokenize.js')\n\nfunction postprocess(events) {\n while (!subtokenize(events)) {\n // Empty\n }\n\n return events\n}\n\nmodule.exports = postprocess\n","'use strict'\n\nvar search = /[\\0\\t\\n\\r]/g\n\nfunction preprocess() {\n var start = true\n var column = 1\n var buffer = ''\n var atCarriageReturn\n return preprocessor\n\n function preprocessor(value, encoding, end) {\n var chunks = []\n var match\n var next\n var startPosition\n var endPosition\n var code\n value = buffer + value.toString(encoding)\n startPosition = 0\n buffer = ''\n\n if (start) {\n if (value.charCodeAt(0) === 65279) {\n startPosition++\n }\n\n start = undefined\n }\n\n while (startPosition < value.length) {\n search.lastIndex = startPosition\n match = search.exec(value)\n endPosition = match ? match.index : value.length\n code = value.charCodeAt(endPosition)\n\n if (!match) {\n buffer = value.slice(startPosition)\n break\n }\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\n if (startPosition < endPosition) {\n chunks.push(value.slice(startPosition, endPosition))\n column += endPosition - startPosition\n }\n\n if (code === 0) {\n chunks.push(65533)\n column++\n } else if (code === 9) {\n next = Math.ceil(column / 4) * 4\n chunks.push(-2)\n\n while (column++ < next) chunks.push(-1)\n } else if (code === 10) {\n chunks.push(-4)\n column = 1\n } // Must be carriage return.\n else {\n atCarriageReturn = true\n column = 1\n }\n }\n\n startPosition = endPosition + 1\n }\n\n if (end) {\n if (atCarriageReturn) chunks.push(-5)\n if (buffer) chunks.push(buffer)\n chunks.push(null)\n }\n\n return chunks\n }\n}\n\nmodule.exports = preprocess\n","'use strict'\n\nvar chunkedPush = require('../util/chunked-push.js')\nvar chunkedSplice = require('../util/chunked-splice.js')\nvar classifyCharacter = require('../util/classify-character.js')\nvar movePoint = require('../util/move-point.js')\nvar resolveAll = require('../util/resolve-all.js')\nvar shallow = require('../util/shallow.js')\n\nvar attention = {\n name: 'attention',\n tokenize: tokenizeAttention,\n resolveAll: resolveAllAttention\n}\n\nfunction resolveAllAttention(events, context) {\n var index = -1\n var open\n var group\n var text\n var openingSequence\n var closingSequence\n var use\n var nextEvents\n var offset // 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\n while (++index < events.length) {\n // Find a token that can close.\n if (\n events[index][0] === 'enter' &&\n events[index][1].type === 'attentionSequence' &&\n events[index][1]._close\n ) {\n open = index // Now walk back to find an opener.\n\n while (open--) {\n // Find a token that can open the closer.\n if (\n events[open][0] === 'exit' &&\n events[open][1].type === 'attentionSequence' &&\n events[open][1]._open && // If the markers are the same:\n context.sliceSerialize(events[open][1]).charCodeAt(0) ===\n context.sliceSerialize(events[index][1]).charCodeAt(0)\n ) {\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 (\n (events[open][1]._close || events[index][1]._open) &&\n (events[index][1].end.offset - events[index][1].start.offset) % 3 &&\n !(\n (events[open][1].end.offset -\n events[open][1].start.offset +\n events[index][1].end.offset -\n events[index][1].start.offset) %\n 3\n )\n ) {\n continue\n } // Number of markers to use from the sequence.\n\n use =\n events[open][1].end.offset - events[open][1].start.offset > 1 &&\n events[index][1].end.offset - events[index][1].start.offset > 1\n ? 2\n : 1\n openingSequence = {\n type: use > 1 ? 'strongSequence' : 'emphasisSequence',\n start: movePoint(shallow(events[open][1].end), -use),\n end: shallow(events[open][1].end)\n }\n closingSequence = {\n type: use > 1 ? 'strongSequence' : 'emphasisSequence',\n start: shallow(events[index][1].start),\n end: movePoint(shallow(events[index][1].start), use)\n }\n text = {\n type: use > 1 ? 'strongText' : 'emphasisText',\n start: shallow(events[open][1].end),\n end: shallow(events[index][1].start)\n }\n group = {\n type: use > 1 ? 'strong' : 'emphasis',\n start: shallow(openingSequence.start),\n end: shallow(closingSequence.end)\n }\n events[open][1].end = shallow(openingSequence.start)\n events[index][1].start = shallow(closingSequence.end)\n nextEvents = [] // If there are more markers in the opening, add them before.\n\n if (events[open][1].end.offset - events[open][1].start.offset) {\n nextEvents = chunkedPush(nextEvents, [\n ['enter', events[open][1], context],\n ['exit', events[open][1], context]\n ])\n } // Opening.\n\n nextEvents = chunkedPush(nextEvents, [\n ['enter', group, context],\n ['enter', openingSequence, context],\n ['exit', openingSequence, context],\n ['enter', text, context]\n ]) // Between.\n\n nextEvents = chunkedPush(\n nextEvents,\n resolveAll(\n context.parser.constructs.insideSpan.null,\n events.slice(open + 1, index),\n context\n )\n ) // Closing.\n\n nextEvents = chunkedPush(nextEvents, [\n ['exit', text, context],\n ['enter', closingSequence, context],\n ['exit', closingSequence, context],\n ['exit', group, context]\n ]) // If there are more markers in the closing, add them after.\n\n if (events[index][1].end.offset - events[index][1].start.offset) {\n offset = 2\n nextEvents = chunkedPush(nextEvents, [\n ['enter', events[index][1], context],\n ['exit', events[index][1], context]\n ])\n } else {\n offset = 0\n }\n\n chunkedSplice(events, open - 1, index - open + 3, nextEvents)\n index = open + nextEvents.length - offset - 2\n break\n }\n }\n }\n } // Remove remaining sequences.\n\n index = -1\n\n while (++index < events.length) {\n if (events[index][1].type === 'attentionSequence') {\n events[index][1].type = 'data'\n }\n }\n\n return events\n}\n\nfunction tokenizeAttention(effects, ok) {\n var before = classifyCharacter(this.previous)\n var marker\n return start\n\n function start(code) {\n effects.enter('attentionSequence')\n marker = code\n return sequence(code)\n }\n\n function sequence(code) {\n var token\n var after\n var open\n var close\n\n if (code === marker) {\n effects.consume(code)\n return sequence\n }\n\n token = effects.exit('attentionSequence')\n after = classifyCharacter(code)\n open = !after || (after === 2 && before)\n close = !before || (before === 2 && after)\n token._open = marker === 42 ? open : open && (before || !close)\n token._close = marker === 42 ? close : close && (after || !open)\n return ok(code)\n }\n}\n\nmodule.exports = attention\n","'use strict'\n\nvar asciiAlpha = require('../character/ascii-alpha.js')\nvar asciiAlphanumeric = require('../character/ascii-alphanumeric.js')\nvar asciiAtext = require('../character/ascii-atext.js')\nvar asciiControl = require('../character/ascii-control.js')\n\nvar autolink = {\n name: 'autolink',\n tokenize: tokenizeAutolink\n}\n\nfunction tokenizeAutolink(effects, ok, nok) {\n var size = 1\n return start\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 function open(code) {\n if (asciiAlpha(code)) {\n effects.consume(code)\n return schemeOrEmailAtext\n }\n\n return asciiAtext(code) ? emailAtext(code) : nok(code)\n }\n\n function schemeOrEmailAtext(code) {\n return code === 43 || code === 45 || code === 46 || asciiAlphanumeric(code)\n ? schemeInsideOrEmailAtext(code)\n : emailAtext(code)\n }\n\n function schemeInsideOrEmailAtext(code) {\n if (code === 58) {\n effects.consume(code)\n return urlInside\n }\n\n if (\n (code === 43 || code === 45 || code === 46 || asciiAlphanumeric(code)) &&\n size++ < 32\n ) {\n effects.consume(code)\n return schemeInsideOrEmailAtext\n }\n\n return emailAtext(code)\n }\n\n function urlInside(code) {\n if (code === 62) {\n effects.exit('autolinkProtocol')\n return end(code)\n }\n\n if (code === 32 || code === 60 || asciiControl(code)) {\n return nok(code)\n }\n\n effects.consume(code)\n return urlInside\n }\n\n function emailAtext(code) {\n if (code === 64) {\n effects.consume(code)\n size = 0\n return emailAtSignOrDot\n }\n\n if (asciiAtext(code)) {\n effects.consume(code)\n return emailAtext\n }\n\n return nok(code)\n }\n\n function emailAtSignOrDot(code) {\n return asciiAlphanumeric(code) ? emailLabel(code) : nok(code)\n }\n\n function emailLabel(code) {\n if (code === 46) {\n effects.consume(code)\n size = 0\n return emailAtSignOrDot\n }\n\n if (code === 62) {\n // Exit, then change the type.\n effects.exit('autolinkProtocol').type = 'autolinkEmail'\n return end(code)\n }\n\n return emailValue(code)\n }\n\n function emailValue(code) {\n if ((code === 45 || asciiAlphanumeric(code)) && size++ < 63) {\n effects.consume(code)\n return code === 45 ? emailValue : emailLabel\n }\n\n return nok(code)\n }\n\n function end(code) {\n effects.enter('autolinkMarker')\n effects.consume(code)\n effects.exit('autolinkMarker')\n effects.exit('autolink')\n return ok\n }\n}\n\nmodule.exports = autolink\n","'use strict'\n\nvar markdownSpace = require('../character/markdown-space.js')\nvar factorySpace = require('./factory-space.js')\n\nvar blockQuote = {\n name: 'blockQuote',\n tokenize: tokenizeBlockQuoteStart,\n continuation: {\n tokenize: tokenizeBlockQuoteContinuation\n },\n exit: exit\n}\n\nfunction tokenizeBlockQuoteStart(effects, ok, nok) {\n var self = this\n return start\n\n function start(code) {\n if (code === 62) {\n if (!self.containerState.open) {\n effects.enter('blockQuote', {\n _container: true\n })\n self.containerState.open = true\n }\n\n effects.enter('blockQuotePrefix')\n effects.enter('blockQuoteMarker')\n effects.consume(code)\n effects.exit('blockQuoteMarker')\n return after\n }\n\n return nok(code)\n }\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\n effects.exit('blockQuotePrefix')\n return ok(code)\n }\n}\n\nfunction tokenizeBlockQuoteContinuation(effects, ok, nok) {\n return factorySpace(\n effects,\n effects.attempt(blockQuote, ok, nok),\n 'linePrefix',\n this.parser.constructs.disable.null.indexOf('codeIndented') > -1\n ? undefined\n : 4\n )\n}\n\nfunction exit(effects) {\n effects.exit('blockQuote')\n}\n\nmodule.exports = blockQuote\n","'use strict'\n\nvar asciiPunctuation = require('../character/ascii-punctuation.js')\n\nvar characterEscape = {\n name: 'characterEscape',\n tokenize: tokenizeCharacterEscape\n}\n\nfunction tokenizeCharacterEscape(effects, ok, nok) {\n return start\n\n function start(code) {\n effects.enter('characterEscape')\n effects.enter('escapeMarker')\n effects.consume(code)\n effects.exit('escapeMarker')\n return open\n }\n\n function open(code) {\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\n return nok(code)\n }\n}\n\nmodule.exports = characterEscape\n","'use strict'\n\nvar decodeEntity = require('parse-entities/decode-entity.js')\nvar asciiAlphanumeric = require('../character/ascii-alphanumeric.js')\nvar asciiDigit = require('../character/ascii-digit.js')\nvar asciiHexDigit = require('../character/ascii-hex-digit.js')\n\nfunction _interopDefaultLegacy(e) {\n return e && typeof e === 'object' && 'default' in e ? e : {default: e}\n}\n\nvar decodeEntity__default = /*#__PURE__*/ _interopDefaultLegacy(decodeEntity)\n\nvar characterReference = {\n name: 'characterReference',\n tokenize: tokenizeCharacterReference\n}\n\nfunction tokenizeCharacterReference(effects, ok, nok) {\n var self = this\n var size = 0\n var max\n var test\n return start\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 function open(code) {\n if (code === 35) {\n effects.enter('characterReferenceMarkerNumeric')\n effects.consume(code)\n effects.exit('characterReferenceMarkerNumeric')\n return numeric\n }\n\n effects.enter('characterReferenceValue')\n max = 31\n test = asciiAlphanumeric\n return value(code)\n }\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\n effects.enter('characterReferenceValue')\n max = 7\n test = asciiDigit\n return value(code)\n }\n\n function value(code) {\n var token\n\n if (code === 59 && size) {\n token = effects.exit('characterReferenceValue')\n\n if (\n test === asciiAlphanumeric &&\n !decodeEntity__default['default'](self.sliceSerialize(token))\n ) {\n return nok(code)\n }\n\n effects.enter('characterReferenceMarker')\n effects.consume(code)\n effects.exit('characterReferenceMarker')\n effects.exit('characterReference')\n return ok\n }\n\n if (test(code) && size++ < max) {\n effects.consume(code)\n return value\n }\n\n return nok(code)\n }\n}\n\nmodule.exports = characterReference\n","'use strict'\n\nvar markdownLineEnding = require('../character/markdown-line-ending.js')\nvar markdownLineEndingOrSpace = require('../character/markdown-line-ending-or-space.js')\nvar prefixSize = require('../util/prefix-size.js')\nvar factorySpace = require('./factory-space.js')\n\nvar codeFenced = {\n name: 'codeFenced',\n tokenize: tokenizeCodeFenced,\n concrete: true\n}\n\nfunction tokenizeCodeFenced(effects, ok, nok) {\n var self = this\n var closingFenceConstruct = {\n tokenize: tokenizeClosingFence,\n partial: true\n }\n var initialPrefix = prefixSize(this.events, 'linePrefix')\n var sizeOpen = 0\n var marker\n return start\n\n function start(code) {\n effects.enter('codeFenced')\n effects.enter('codeFencedFence')\n effects.enter('codeFencedFenceSequence')\n marker = code\n return sequenceOpen(code)\n }\n\n function sequenceOpen(code) {\n if (code === marker) {\n effects.consume(code)\n sizeOpen++\n return sequenceOpen\n }\n\n effects.exit('codeFencedFenceSequence')\n return sizeOpen < 3\n ? nok(code)\n : factorySpace(effects, infoOpen, 'whitespace')(code)\n }\n\n function infoOpen(code) {\n if (code === null || markdownLineEnding(code)) {\n return openAfter(code)\n }\n\n effects.enter('codeFencedFenceInfo')\n effects.enter('chunkString', {\n contentType: 'string'\n })\n return info(code)\n }\n\n function info(code) {\n if (code === null || markdownLineEndingOrSpace(code)) {\n effects.exit('chunkString')\n effects.exit('codeFencedFenceInfo')\n return factorySpace(effects, infoAfter, 'whitespace')(code)\n }\n\n if (code === 96 && code === marker) return nok(code)\n effects.consume(code)\n return info\n }\n\n function infoAfter(code) {\n if (code === null || markdownLineEnding(code)) {\n return openAfter(code)\n }\n\n effects.enter('codeFencedFenceMeta')\n effects.enter('chunkString', {\n contentType: 'string'\n })\n return meta(code)\n }\n\n function meta(code) {\n if (code === null || markdownLineEnding(code)) {\n effects.exit('chunkString')\n effects.exit('codeFencedFenceMeta')\n return openAfter(code)\n }\n\n if (code === 96 && code === marker) return nok(code)\n effects.consume(code)\n return meta\n }\n\n function openAfter(code) {\n effects.exit('codeFencedFence')\n return self.interrupt ? ok(code) : content(code)\n }\n\n function content(code) {\n if (code === null) {\n return after(code)\n }\n\n if (markdownLineEnding(code)) {\n effects.enter('lineEnding')\n effects.consume(code)\n effects.exit('lineEnding')\n return effects.attempt(\n closingFenceConstruct,\n after,\n initialPrefix\n ? factorySpace(effects, content, 'linePrefix', initialPrefix + 1)\n : content\n )\n }\n\n effects.enter('codeFlowValue')\n return contentContinue(code)\n }\n\n function contentContinue(code) {\n if (code === null || markdownLineEnding(code)) {\n effects.exit('codeFlowValue')\n return content(code)\n }\n\n effects.consume(code)\n return contentContinue\n }\n\n function after(code) {\n effects.exit('codeFenced')\n return ok(code)\n }\n\n function tokenizeClosingFence(effects, ok, nok) {\n var size = 0\n return factorySpace(\n effects,\n closingSequenceStart,\n 'linePrefix',\n this.parser.constructs.disable.null.indexOf('codeIndented') > -1\n ? undefined\n : 4\n )\n\n function closingSequenceStart(code) {\n effects.enter('codeFencedFence')\n effects.enter('codeFencedFenceSequence')\n return closingSequence(code)\n }\n\n function closingSequence(code) {\n if (code === marker) {\n effects.consume(code)\n size++\n return closingSequence\n }\n\n if (size < sizeOpen) return nok(code)\n effects.exit('codeFencedFenceSequence')\n return factorySpace(effects, closingSequenceEnd, 'whitespace')(code)\n }\n\n function closingSequenceEnd(code) {\n if (code === null || markdownLineEnding(code)) {\n effects.exit('codeFencedFence')\n return ok(code)\n }\n\n return nok(code)\n }\n }\n}\n\nmodule.exports = codeFenced\n","'use strict'\n\nvar markdownLineEnding = require('../character/markdown-line-ending.js')\nvar chunkedSplice = require('../util/chunked-splice.js')\nvar prefixSize = require('../util/prefix-size.js')\nvar factorySpace = require('./factory-space.js')\n\nvar codeIndented = {\n name: 'codeIndented',\n tokenize: tokenizeCodeIndented,\n resolve: resolveCodeIndented\n}\nvar indentedContentConstruct = {\n tokenize: tokenizeIndentedContent,\n partial: true\n}\n\nfunction resolveCodeIndented(events, context) {\n var code = {\n type: 'codeIndented',\n start: events[0][1].start,\n end: events[events.length - 1][1].end\n }\n chunkedSplice(events, 0, 0, [['enter', code, context]])\n chunkedSplice(events, events.length, 0, [['exit', code, context]])\n return events\n}\n\nfunction tokenizeCodeIndented(effects, ok, nok) {\n return effects.attempt(indentedContentConstruct, afterPrefix, nok)\n\n function afterPrefix(code) {\n if (code === null) {\n return ok(code)\n }\n\n if (markdownLineEnding(code)) {\n return effects.attempt(indentedContentConstruct, afterPrefix, ok)(code)\n }\n\n effects.enter('codeFlowValue')\n return content(code)\n }\n\n function content(code) {\n if (code === null || markdownLineEnding(code)) {\n effects.exit('codeFlowValue')\n return afterPrefix(code)\n }\n\n effects.consume(code)\n return content\n }\n}\n\nfunction tokenizeIndentedContent(effects, ok, nok) {\n var self = this\n return factorySpace(effects, afterPrefix, 'linePrefix', 4 + 1)\n\n function afterPrefix(code) {\n if (markdownLineEnding(code)) {\n effects.enter('lineEnding')\n effects.consume(code)\n effects.exit('lineEnding')\n return factorySpace(effects, afterPrefix, 'linePrefix', 4 + 1)\n }\n\n return prefixSize(self.events, 'linePrefix') < 4 ? nok(code) : ok(code)\n }\n}\n\nmodule.exports = codeIndented\n","'use strict'\n\nvar markdownLineEnding = require('../character/markdown-line-ending.js')\n\nvar codeText = {\n name: 'codeText',\n tokenize: tokenizeCodeText,\n resolve: resolveCodeText,\n previous: previous\n}\n\nfunction resolveCodeText(events) {\n var tailExitIndex = events.length - 4\n var headEnterIndex = 3\n var index\n var enter // If we start and end with an EOL or a space.\n\n if (\n (events[headEnterIndex][1].type === 'lineEnding' ||\n events[headEnterIndex][1].type === 'space') &&\n (events[tailExitIndex][1].type === 'lineEnding' ||\n events[tailExitIndex][1].type === 'space')\n ) {\n index = headEnterIndex // And we have data.\n\n while (++index < tailExitIndex) {\n if (events[index][1].type === 'codeTextData') {\n // Then we have padding.\n events[tailExitIndex][1].type = events[headEnterIndex][1].type =\n 'codeTextPadding'\n headEnterIndex += 2\n tailExitIndex -= 2\n break\n }\n }\n } // Merge adjacent spaces and data.\n\n index = headEnterIndex - 1\n tailExitIndex++\n\n while (++index <= tailExitIndex) {\n if (enter === undefined) {\n if (index !== tailExitIndex && events[index][1].type !== 'lineEnding') {\n enter = index\n }\n } else if (\n index === tailExitIndex ||\n events[index][1].type === 'lineEnding'\n ) {\n events[enter][1].type = 'codeTextData'\n\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\n enter = undefined\n }\n }\n\n return events\n}\n\nfunction previous(code) {\n // If there is a previous code, there will always be a tail.\n return (\n code !== 96 ||\n this.events[this.events.length - 1][1].type === 'characterEscape'\n )\n}\n\nfunction tokenizeCodeText(effects, ok, nok) {\n var sizeOpen = 0\n var size\n var token\n return start\n\n function start(code) {\n effects.enter('codeText')\n effects.enter('codeTextSequence')\n return openingSequence(code)\n }\n\n function openingSequence(code) {\n if (code === 96) {\n effects.consume(code)\n sizeOpen++\n return openingSequence\n }\n\n effects.exit('codeTextSequence')\n return gap(code)\n }\n\n function gap(code) {\n // EOF.\n if (code === null) {\n return nok(code)\n } // Closing fence?\n // Could also be data.\n\n if (code === 96) {\n token = effects.enter('codeTextSequence')\n size = 0\n return closingSequence(code)\n } // Tabs don’t work, and virtual spaces don’t make sense.\n\n if (code === 32) {\n effects.enter('space')\n effects.consume(code)\n effects.exit('space')\n return gap\n }\n\n if (markdownLineEnding(code)) {\n effects.enter('lineEnding')\n effects.consume(code)\n effects.exit('lineEnding')\n return gap\n } // Data.\n\n effects.enter('codeTextData')\n return data(code)\n } // In code.\n\n function data(code) {\n if (\n code === null ||\n code === 32 ||\n code === 96 ||\n markdownLineEnding(code)\n ) {\n effects.exit('codeTextData')\n return gap(code)\n }\n\n effects.consume(code)\n return data\n } // Closing fence.\n\n function closingSequence(code) {\n // More.\n if (code === 96) {\n effects.consume(code)\n size++\n return closingSequence\n } // Done!\n\n if (size === sizeOpen) {\n effects.exit('codeTextSequence')\n effects.exit('codeText')\n return ok(code)\n } // More or less accents: mark as data.\n\n token.type = 'codeTextData'\n return data(code)\n }\n}\n\nmodule.exports = codeText\n","'use strict'\n\nvar markdownLineEnding = require('../character/markdown-line-ending.js')\nvar prefixSize = require('../util/prefix-size.js')\nvar subtokenize = require('../util/subtokenize.js')\nvar factorySpace = require('./factory-space.js')\n\n// No name because it must not be turned off.\nvar content = {\n tokenize: tokenizeContent,\n resolve: resolveContent,\n interruptible: true,\n lazy: true\n}\nvar continuationConstruct = {\n tokenize: tokenizeContinuation,\n partial: true\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\nfunction resolveContent(events) {\n subtokenize(events)\n return events\n}\n\nfunction tokenizeContent(effects, ok) {\n var previous\n return start\n\n function start(code) {\n effects.enter('content')\n previous = effects.enter('chunkContent', {\n contentType: 'content'\n })\n return data(code)\n }\n\n function data(code) {\n if (code === null) {\n return contentEnd(code)\n }\n\n if (markdownLineEnding(code)) {\n return effects.check(\n continuationConstruct,\n contentContinue,\n contentEnd\n )(code)\n } // Data.\n\n effects.consume(code)\n return data\n }\n\n function contentEnd(code) {\n effects.exit('chunkContent')\n effects.exit('content')\n return ok(code)\n }\n\n function contentContinue(code) {\n effects.consume(code)\n effects.exit('chunkContent')\n previous = previous.next = effects.enter('chunkContent', {\n contentType: 'content',\n previous: previous\n })\n return data\n }\n}\n\nfunction tokenizeContinuation(effects, ok, nok) {\n var self = this\n return startLookahead\n\n function startLookahead(code) {\n effects.enter('lineEnding')\n effects.consume(code)\n effects.exit('lineEnding')\n return factorySpace(effects, prefixed, 'linePrefix')\n }\n\n function prefixed(code) {\n if (code === null || markdownLineEnding(code)) {\n return nok(code)\n }\n\n if (\n self.parser.constructs.disable.null.indexOf('codeIndented') > -1 ||\n prefixSize(self.events, 'linePrefix') < 4\n ) {\n return effects.interrupt(self.parser.constructs.flow, nok, ok)(code)\n }\n\n return ok(code)\n }\n}\n\nmodule.exports = content\n","'use strict'\n\nvar markdownLineEnding = require('../character/markdown-line-ending.js')\nvar markdownLineEndingOrSpace = require('../character/markdown-line-ending-or-space.js')\nvar normalizeIdentifier = require('../util/normalize-identifier.js')\nvar factoryDestination = require('./factory-destination.js')\nvar factoryLabel = require('./factory-label.js')\nvar factorySpace = require('./factory-space.js')\nvar factoryWhitespace = require('./factory-whitespace.js')\nvar factoryTitle = require('./factory-title.js')\n\nvar definition = {\n name: 'definition',\n tokenize: tokenizeDefinition\n}\nvar titleConstruct = {\n tokenize: tokenizeTitle,\n partial: true\n}\n\nfunction tokenizeDefinition(effects, ok, nok) {\n var self = this\n var identifier\n return start\n\n function start(code) {\n effects.enter('definition')\n return factoryLabel.call(\n self,\n effects,\n labelAfter,\n nok,\n 'definitionLabel',\n 'definitionLabelMarker',\n 'definitionLabelString'\n )(code)\n }\n\n function labelAfter(code) {\n identifier = normalizeIdentifier(\n self.sliceSerialize(self.events[self.events.length - 1][1]).slice(1, -1)\n )\n\n if (code === 58) {\n effects.enter('definitionMarker')\n effects.consume(code)\n effects.exit('definitionMarker') // Note: blank lines can’t exist in content.\n\n return factoryWhitespace(\n effects,\n factoryDestination(\n effects,\n effects.attempt(\n titleConstruct,\n factorySpace(effects, after, 'whitespace'),\n factorySpace(effects, after, 'whitespace')\n ),\n nok,\n 'definitionDestination',\n 'definitionDestinationLiteral',\n 'definitionDestinationLiteralMarker',\n 'definitionDestinationRaw',\n 'definitionDestinationString'\n )\n )\n }\n\n return nok(code)\n }\n\n function after(code) {\n if (code === null || markdownLineEnding(code)) {\n effects.exit('definition')\n\n if (self.parser.defined.indexOf(identifier) < 0) {\n self.parser.defined.push(identifier)\n }\n\n return ok(code)\n }\n\n return nok(code)\n }\n}\n\nfunction tokenizeTitle(effects, ok, nok) {\n return start\n\n function start(code) {\n return markdownLineEndingOrSpace(code)\n ? factoryWhitespace(effects, before)(code)\n : nok(code)\n }\n\n function before(code) {\n if (code === 34 || code === 39 || code === 40) {\n return factoryTitle(\n effects,\n factorySpace(effects, after, 'whitespace'),\n nok,\n 'definitionTitle',\n 'definitionTitleMarker',\n 'definitionTitleString'\n )(code)\n }\n\n return nok(code)\n }\n\n function after(code) {\n return code === null || markdownLineEnding(code) ? ok(code) : nok(code)\n }\n}\n\nmodule.exports = definition\n","'use strict'\n\nvar asciiControl = require('../character/ascii-control.js')\nvar markdownLineEndingOrSpace = require('../character/markdown-line-ending-or-space.js')\nvar markdownLineEnding = require('../character/markdown-line-ending.js')\n\n// eslint-disable-next-line max-params\nfunction destinationFactory(\n effects,\n ok,\n nok,\n type,\n literalType,\n literalMarkerType,\n rawType,\n stringType,\n max\n) {\n var limit = max || Infinity\n var balance = 0\n return start\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 destinationEnclosedBefore\n }\n\n if (asciiControl(code) || code === 41) {\n return nok(code)\n }\n\n effects.enter(type)\n effects.enter(rawType)\n effects.enter(stringType)\n effects.enter('chunkString', {\n contentType: 'string'\n })\n return destinationRaw(code)\n }\n\n function destinationEnclosedBefore(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\n effects.enter(stringType)\n effects.enter('chunkString', {\n contentType: 'string'\n })\n return destinationEnclosed(code)\n }\n\n function destinationEnclosed(code) {\n if (code === 62) {\n effects.exit('chunkString')\n effects.exit(stringType)\n return destinationEnclosedBefore(code)\n }\n\n if (code === null || code === 60 || markdownLineEnding(code)) {\n return nok(code)\n }\n\n effects.consume(code)\n return code === 92 ? destinationEnclosedEscape : destinationEnclosed\n }\n\n function destinationEnclosedEscape(code) {\n if (code === 60 || code === 62 || code === 92) {\n effects.consume(code)\n return destinationEnclosed\n }\n\n return destinationEnclosed(code)\n }\n\n function destinationRaw(code) {\n if (code === 40) {\n if (++balance > limit) return nok(code)\n effects.consume(code)\n return destinationRaw\n }\n\n if (code === 41) {\n if (!balance--) {\n effects.exit('chunkString')\n effects.exit(stringType)\n effects.exit(rawType)\n effects.exit(type)\n return ok(code)\n }\n\n effects.consume(code)\n return destinationRaw\n }\n\n if (code === null || markdownLineEndingOrSpace(code)) {\n if (balance) return nok(code)\n effects.exit('chunkString')\n effects.exit(stringType)\n effects.exit(rawType)\n effects.exit(type)\n return ok(code)\n }\n\n if (asciiControl(code)) return nok(code)\n effects.consume(code)\n return code === 92 ? destinationRawEscape : destinationRaw\n }\n\n function destinationRawEscape(code) {\n if (code === 40 || code === 41 || code === 92) {\n effects.consume(code)\n return destinationRaw\n }\n\n return destinationRaw(code)\n }\n}\n\nmodule.exports = destinationFactory\n","'use strict'\n\nvar markdownLineEnding = require('../character/markdown-line-ending.js')\nvar markdownSpace = require('../character/markdown-space.js')\n\n// eslint-disable-next-line max-params\nfunction labelFactory(effects, ok, nok, type, markerType, stringType) {\n var self = this\n var size = 0\n var data\n return start\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 function atBreak(code) {\n if (\n code === null ||\n code === 91 ||\n (code === 93 && !data) ||\n /* c8 ignore next */\n (code === 94 &&\n /* c8 ignore next */\n !size &&\n /* c8 ignore next */\n '_hiddenFootnoteSupport' in self.parser.constructs) ||\n size > 999\n ) {\n return nok(code)\n }\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 if (markdownLineEnding(code)) {\n effects.enter('lineEnding')\n effects.consume(code)\n effects.exit('lineEnding')\n return atBreak\n }\n\n effects.enter('chunkString', {\n contentType: 'string'\n })\n return label(code)\n }\n\n function label(code) {\n if (\n code === null ||\n code === 91 ||\n code === 93 ||\n markdownLineEnding(code) ||\n size++ > 999\n ) {\n effects.exit('chunkString')\n return atBreak(code)\n }\n\n effects.consume(code)\n data = data || !markdownSpace(code)\n return code === 92 ? labelEscape : label\n }\n\n function labelEscape(code) {\n if (code === 91 || code === 92 || code === 93) {\n effects.consume(code)\n size++\n return label\n }\n\n return label(code)\n }\n}\n\nmodule.exports = labelFactory\n","'use strict'\n\nvar markdownSpace = require('../character/markdown-space.js')\n\nfunction spaceFactory(effects, ok, type, max) {\n var limit = max ? max - 1 : Infinity\n var size = 0\n return start\n\n function start(code) {\n if (markdownSpace(code)) {\n effects.enter(type)\n return prefix(code)\n }\n\n return ok(code)\n }\n\n function prefix(code) {\n if (markdownSpace(code) && size++ < limit) {\n effects.consume(code)\n return prefix\n }\n\n effects.exit(type)\n return ok(code)\n }\n}\n\nmodule.exports = spaceFactory\n","'use strict'\n\nvar markdownLineEnding = require('../character/markdown-line-ending.js')\nvar factorySpace = require('./factory-space.js')\n\nfunction titleFactory(effects, ok, nok, type, markerType, stringType) {\n var marker\n return start\n\n function start(code) {\n effects.enter(type)\n effects.enter(markerType)\n effects.consume(code)\n effects.exit(markerType)\n marker = code === 40 ? 41 : code\n return atFirstTitleBreak\n }\n\n function atFirstTitleBreak(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\n effects.enter(stringType)\n return atTitleBreak(code)\n }\n\n function atTitleBreak(code) {\n if (code === marker) {\n effects.exit(stringType)\n return atFirstTitleBreak(marker)\n }\n\n if (code === null) {\n return nok(code)\n } // Note: blank lines can’t exist in content.\n\n if (markdownLineEnding(code)) {\n effects.enter('lineEnding')\n effects.consume(code)\n effects.exit('lineEnding')\n return factorySpace(effects, atTitleBreak, 'linePrefix')\n }\n\n effects.enter('chunkString', {\n contentType: 'string'\n })\n return title(code)\n }\n\n function title(code) {\n if (code === marker || code === null || markdownLineEnding(code)) {\n effects.exit('chunkString')\n return atTitleBreak(code)\n }\n\n effects.consume(code)\n return code === 92 ? titleEscape : title\n }\n\n function titleEscape(code) {\n if (code === marker || code === 92) {\n effects.consume(code)\n return title\n }\n\n return title(code)\n }\n}\n\nmodule.exports = titleFactory\n","'use strict'\n\nvar markdownLineEnding = require('../character/markdown-line-ending.js')\nvar markdownSpace = require('../character/markdown-space.js')\nvar factorySpace = require('./factory-space.js')\n\nfunction whitespaceFactory(effects, ok) {\n var seen\n return start\n\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\n if (markdownSpace(code)) {\n return factorySpace(\n effects,\n start,\n seen ? 'linePrefix' : 'lineSuffix'\n )(code)\n }\n\n return ok(code)\n }\n}\n\nmodule.exports = whitespaceFactory\n","'use strict'\n\nvar markdownLineEnding = require('../character/markdown-line-ending.js')\n\nvar hardBreakEscape = {\n name: 'hardBreakEscape',\n tokenize: tokenizeHardBreakEscape\n}\n\nfunction tokenizeHardBreakEscape(effects, ok, nok) {\n return start\n\n function start(code) {\n effects.enter('hardBreakEscape')\n effects.enter('escapeMarker')\n effects.consume(code)\n return open\n }\n\n function open(code) {\n if (markdownLineEnding(code)) {\n effects.exit('escapeMarker')\n effects.exit('hardBreakEscape')\n return ok(code)\n }\n\n return nok(code)\n }\n}\n\nmodule.exports = hardBreakEscape\n","'use strict'\n\nvar markdownLineEnding = require('../character/markdown-line-ending.js')\nvar markdownLineEndingOrSpace = require('../character/markdown-line-ending-or-space.js')\nvar markdownSpace = require('../character/markdown-space.js')\nvar chunkedSplice = require('../util/chunked-splice.js')\nvar factorySpace = require('./factory-space.js')\n\nvar headingAtx = {\n name: 'headingAtx',\n tokenize: tokenizeHeadingAtx,\n resolve: resolveHeadingAtx\n}\n\nfunction resolveHeadingAtx(events, context) {\n var contentEnd = events.length - 2\n var contentStart = 3\n var content\n var text // Prefix whitespace, part of the opening.\n\n if (events[contentStart][1].type === 'whitespace') {\n contentStart += 2\n } // Suffix whitespace, part of the closing.\n\n if (\n contentEnd - 2 > contentStart &&\n events[contentEnd][1].type === 'whitespace'\n ) {\n contentEnd -= 2\n }\n\n if (\n events[contentEnd][1].type === 'atxHeadingSequence' &&\n (contentStart === contentEnd - 1 ||\n (contentEnd - 4 > contentStart &&\n events[contentEnd - 2][1].type === 'whitespace'))\n ) {\n contentEnd -= contentStart + 1 === contentEnd ? 2 : 4\n }\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 chunkedSplice(events, contentStart, contentEnd - contentStart + 1, [\n ['enter', content, context],\n ['enter', text, context],\n ['exit', text, context],\n ['exit', content, context]\n ])\n }\n\n return events\n}\n\nfunction tokenizeHeadingAtx(effects, ok, nok) {\n var self = this\n var size = 0\n return start\n\n function start(code) {\n effects.enter('atxHeading')\n effects.enter('atxHeadingSequence')\n return fenceOpenInside(code)\n }\n\n function fenceOpenInside(code) {\n if (code === 35 && size++ < 6) {\n effects.consume(code)\n return fenceOpenInside\n }\n\n if (code === null || markdownLineEndingOrSpace(code)) {\n effects.exit('atxHeadingSequence')\n return self.interrupt ? ok(code) : headingBreak(code)\n }\n\n return nok(code)\n }\n\n function headingBreak(code) {\n if (code === 35) {\n effects.enter('atxHeadingSequence')\n return sequence(code)\n }\n\n if (code === null || markdownLineEnding(code)) {\n effects.exit('atxHeading')\n return ok(code)\n }\n\n if (markdownSpace(code)) {\n return factorySpace(effects, headingBreak, 'whitespace')(code)\n }\n\n effects.enter('atxHeadingText')\n return data(code)\n }\n\n function sequence(code) {\n if (code === 35) {\n effects.consume(code)\n return sequence\n }\n\n effects.exit('atxHeadingSequence')\n return headingBreak(code)\n }\n\n function data(code) {\n if (code === null || code === 35 || markdownLineEndingOrSpace(code)) {\n effects.exit('atxHeadingText')\n return headingBreak(code)\n }\n\n effects.consume(code)\n return data\n }\n}\n\nmodule.exports = headingAtx\n","'use strict'\n\nvar asciiAlpha = require('../character/ascii-alpha.js')\nvar asciiAlphanumeric = require('../character/ascii-alphanumeric.js')\nvar markdownLineEnding = require('../character/markdown-line-ending.js')\nvar markdownLineEndingOrSpace = require('../character/markdown-line-ending-or-space.js')\nvar markdownSpace = require('../character/markdown-space.js')\nvar fromCharCode = require('../constant/from-char-code.js')\nvar htmlBlockNames = require('../constant/html-block-names.js')\nvar htmlRawNames = require('../constant/html-raw-names.js')\nvar partialBlankLine = require('./partial-blank-line.js')\n\nvar htmlFlow = {\n name: 'htmlFlow',\n tokenize: tokenizeHtmlFlow,\n resolveTo: resolveToHtmlFlow,\n concrete: true\n}\nvar nextBlankConstruct = {\n tokenize: tokenizeNextBlank,\n partial: true\n}\n\nfunction resolveToHtmlFlow(events) {\n var index = events.length\n\n while (index--) {\n if (events[index][0] === 'enter' && events[index][1].type === 'htmlFlow') {\n break\n }\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 // Add the prefix start to the HTML line token.\n\n events[index + 1][1].start = events[index - 2][1].start // Remove the line prefix.\n\n events.splice(index - 2, 2)\n }\n\n return events\n}\n\nfunction tokenizeHtmlFlow(effects, ok, nok) {\n var self = this\n var kind\n var startTag\n var buffer\n var index\n var marker\n return start\n\n function start(code) {\n effects.enter('htmlFlow')\n effects.enter('htmlFlowData')\n effects.consume(code)\n return open\n }\n\n function open(code) {\n if (code === 33) {\n effects.consume(code)\n return declarationStart\n }\n\n if (code === 47) {\n effects.consume(code)\n return tagCloseStart\n }\n\n if (code === 63) {\n effects.consume(code)\n kind = 3 // 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\n return self.interrupt ? ok : continuationDeclarationInside\n }\n\n if (asciiAlpha(code)) {\n effects.consume(code)\n buffer = fromCharCode(code)\n startTag = true\n return tagName\n }\n\n return nok(code)\n }\n\n function declarationStart(code) {\n if (code === 45) {\n effects.consume(code)\n kind = 2\n return commentOpenInside\n }\n\n if (code === 91) {\n effects.consume(code)\n kind = 5\n buffer = 'CDATA['\n index = 0\n return cdataOpenInside\n }\n\n if (asciiAlpha(code)) {\n effects.consume(code)\n kind = 4\n return self.interrupt ? ok : continuationDeclarationInside\n }\n\n return nok(code)\n }\n\n function commentOpenInside(code) {\n if (code === 45) {\n effects.consume(code)\n return self.interrupt ? ok : continuationDeclarationInside\n }\n\n return nok(code)\n }\n\n function cdataOpenInside(code) {\n if (code === buffer.charCodeAt(index++)) {\n effects.consume(code)\n return index === buffer.length\n ? self.interrupt\n ? ok\n : continuation\n : cdataOpenInside\n }\n\n return nok(code)\n }\n\n function tagCloseStart(code) {\n if (asciiAlpha(code)) {\n effects.consume(code)\n buffer = fromCharCode(code)\n return tagName\n }\n\n return nok(code)\n }\n\n function tagName(code) {\n if (\n code === null ||\n code === 47 ||\n code === 62 ||\n markdownLineEndingOrSpace(code)\n ) {\n if (\n code !== 47 &&\n startTag &&\n htmlRawNames.indexOf(buffer.toLowerCase()) > -1\n ) {\n kind = 1\n return self.interrupt ? ok(code) : continuation(code)\n }\n\n if (htmlBlockNames.indexOf(buffer.toLowerCase()) > -1) {\n kind = 6\n\n if (code === 47) {\n effects.consume(code)\n return basicSelfClosing\n }\n\n return self.interrupt ? ok(code) : continuation(code)\n }\n\n kind = 7 // Do not support complete HTML when interrupting.\n\n return self.interrupt\n ? nok(code)\n : startTag\n ? completeAttributeNameBefore(code)\n : completeClosingTagAfter(code)\n }\n\n if (code === 45 || asciiAlphanumeric(code)) {\n effects.consume(code)\n buffer += fromCharCode(code)\n return tagName\n }\n\n return nok(code)\n }\n\n function basicSelfClosing(code) {\n if (code === 62) {\n effects.consume(code)\n return self.interrupt ? ok : continuation\n }\n\n return nok(code)\n }\n\n function completeClosingTagAfter(code) {\n if (markdownSpace(code)) {\n effects.consume(code)\n return completeClosingTagAfter\n }\n\n return completeEnd(code)\n }\n\n function completeAttributeNameBefore(code) {\n if (code === 47) {\n effects.consume(code)\n return completeEnd\n }\n\n if (code === 58 || code === 95 || asciiAlpha(code)) {\n effects.consume(code)\n return completeAttributeName\n }\n\n if (markdownSpace(code)) {\n effects.consume(code)\n return completeAttributeNameBefore\n }\n\n return completeEnd(code)\n }\n\n function completeAttributeName(code) {\n if (\n code === 45 ||\n code === 46 ||\n code === 58 ||\n code === 95 ||\n asciiAlphanumeric(code)\n ) {\n effects.consume(code)\n return completeAttributeName\n }\n\n return completeAttributeNameAfter(code)\n }\n\n function completeAttributeNameAfter(code) {\n if (code === 61) {\n effects.consume(code)\n return completeAttributeValueBefore\n }\n\n if (markdownSpace(code)) {\n effects.consume(code)\n return completeAttributeNameAfter\n }\n\n return completeAttributeNameBefore(code)\n }\n\n function completeAttributeValueBefore(code) {\n if (\n code === null ||\n code === 60 ||\n code === 61 ||\n code === 62 ||\n code === 96\n ) {\n return nok(code)\n }\n\n if (code === 34 || code === 39) {\n effects.consume(code)\n marker = code\n return completeAttributeValueQuoted\n }\n\n if (markdownSpace(code)) {\n effects.consume(code)\n return completeAttributeValueBefore\n }\n\n marker = undefined\n return completeAttributeValueUnquoted(code)\n }\n\n function completeAttributeValueQuoted(code) {\n if (code === marker) {\n effects.consume(code)\n return completeAttributeValueQuotedAfter\n }\n\n if (code === null || markdownLineEnding(code)) {\n return nok(code)\n }\n\n effects.consume(code)\n return completeAttributeValueQuoted\n }\n\n function completeAttributeValueUnquoted(code) {\n if (\n code === null ||\n code === 34 ||\n code === 39 ||\n code === 60 ||\n code === 61 ||\n code === 62 ||\n code === 96 ||\n markdownLineEndingOrSpace(code)\n ) {\n return completeAttributeNameAfter(code)\n }\n\n effects.consume(code)\n return completeAttributeValueUnquoted\n }\n\n function completeAttributeValueQuotedAfter(code) {\n if (code === 47 || code === 62 || markdownSpace(code)) {\n return completeAttributeNameBefore(code)\n }\n\n return nok(code)\n }\n\n function completeEnd(code) {\n if (code === 62) {\n effects.consume(code)\n return completeAfter\n }\n\n return nok(code)\n }\n\n function completeAfter(code) {\n if (markdownSpace(code)) {\n effects.consume(code)\n return completeAfter\n }\n\n return code === null || markdownLineEnding(code)\n ? continuation(code)\n : nok(code)\n }\n\n function continuation(code) {\n if (code === 45 && kind === 2) {\n effects.consume(code)\n return continuationCommentInside\n }\n\n if (code === 60 && kind === 1) {\n effects.consume(code)\n return continuationRawTagOpen\n }\n\n if (code === 62 && kind === 4) {\n effects.consume(code)\n return continuationClose\n }\n\n if (code === 63 && kind === 3) {\n effects.consume(code)\n return continuationDeclarationInside\n }\n\n if (code === 93 && kind === 5) {\n effects.consume(code)\n return continuationCharacterDataInside\n }\n\n if (markdownLineEnding(code) && (kind === 6 || kind === 7)) {\n return effects.check(\n nextBlankConstruct,\n continuationClose,\n continuationAtLineEnding\n )(code)\n }\n\n if (code === null || markdownLineEnding(code)) {\n return continuationAtLineEnding(code)\n }\n\n effects.consume(code)\n return continuation\n }\n\n function continuationAtLineEnding(code) {\n effects.exit('htmlFlowData')\n return htmlContinueStart(code)\n }\n\n function htmlContinueStart(code) {\n if (code === null) {\n return done(code)\n }\n\n if (markdownLineEnding(code)) {\n effects.enter('lineEnding')\n effects.consume(code)\n effects.exit('lineEnding')\n return htmlContinueStart\n }\n\n effects.enter('htmlFlowData')\n return continuation(code)\n }\n\n function continuationCommentInside(code) {\n if (code === 45) {\n effects.consume(code)\n return continuationDeclarationInside\n }\n\n return continuation(code)\n }\n\n function continuationRawTagOpen(code) {\n if (code === 47) {\n effects.consume(code)\n buffer = ''\n return continuationRawEndTag\n }\n\n return continuation(code)\n }\n\n function continuationRawEndTag(code) {\n if (code === 62 && htmlRawNames.indexOf(buffer.toLowerCase()) > -1) {\n effects.consume(code)\n return continuationClose\n }\n\n if (asciiAlpha(code) && buffer.length < 8) {\n effects.consume(code)\n buffer += fromCharCode(code)\n return continuationRawEndTag\n }\n\n return continuation(code)\n }\n\n function continuationCharacterDataInside(code) {\n if (code === 93) {\n effects.consume(code)\n return continuationDeclarationInside\n }\n\n return continuation(code)\n }\n\n function continuationDeclarationInside(code) {\n if (code === 62) {\n effects.consume(code)\n return continuationClose\n }\n\n return continuation(code)\n }\n\n function continuationClose(code) {\n if (code === null || markdownLineEnding(code)) {\n effects.exit('htmlFlowData')\n return done(code)\n }\n\n effects.consume(code)\n return continuationClose\n }\n\n function done(code) {\n effects.exit('htmlFlow')\n return ok(code)\n }\n}\n\nfunction tokenizeNextBlank(effects, ok, nok) {\n return start\n\n function start(code) {\n effects.exit('htmlFlowData')\n effects.enter('lineEndingBlank')\n effects.consume(code)\n effects.exit('lineEndingBlank')\n return effects.attempt(partialBlankLine, ok, nok)\n }\n}\n\nmodule.exports = htmlFlow\n","'use strict'\n\nvar asciiAlpha = require('../character/ascii-alpha.js')\nvar asciiAlphanumeric = require('../character/ascii-alphanumeric.js')\nvar markdownLineEnding = require('../character/markdown-line-ending.js')\nvar markdownLineEndingOrSpace = require('../character/markdown-line-ending-or-space.js')\nvar markdownSpace = require('../character/markdown-space.js')\nvar factorySpace = require('./factory-space.js')\n\nvar htmlText = {\n name: 'htmlText',\n tokenize: tokenizeHtmlText\n}\n\nfunction tokenizeHtmlText(effects, ok, nok) {\n var self = this\n var marker\n var buffer\n var index\n var returnState\n return start\n\n function start(code) {\n effects.enter('htmlText')\n effects.enter('htmlTextData')\n effects.consume(code)\n return open\n }\n\n function open(code) {\n if (code === 33) {\n effects.consume(code)\n return declarationOpen\n }\n\n if (code === 47) {\n effects.consume(code)\n return tagCloseStart\n }\n\n if (code === 63) {\n effects.consume(code)\n return instruction\n }\n\n if (asciiAlpha(code)) {\n effects.consume(code)\n return tagOpen\n }\n\n return nok(code)\n }\n\n function declarationOpen(code) {\n if (code === 45) {\n effects.consume(code)\n return commentOpen\n }\n\n if (code === 91) {\n effects.consume(code)\n buffer = 'CDATA['\n index = 0\n return cdataOpen\n }\n\n if (asciiAlpha(code)) {\n effects.consume(code)\n return declaration\n }\n\n return nok(code)\n }\n\n function commentOpen(code) {\n if (code === 45) {\n effects.consume(code)\n return commentStart\n }\n\n return nok(code)\n }\n\n function commentStart(code) {\n if (code === null || code === 62) {\n return nok(code)\n }\n\n if (code === 45) {\n effects.consume(code)\n return commentStartDash\n }\n\n return comment(code)\n }\n\n function commentStartDash(code) {\n if (code === null || code === 62) {\n return nok(code)\n }\n\n return comment(code)\n }\n\n function comment(code) {\n if (code === null) {\n return nok(code)\n }\n\n if (code === 45) {\n effects.consume(code)\n return commentClose\n }\n\n if (markdownLineEnding(code)) {\n returnState = comment\n return atLineEnding(code)\n }\n\n effects.consume(code)\n return comment\n }\n\n function commentClose(code) {\n if (code === 45) {\n effects.consume(code)\n return end\n }\n\n return comment(code)\n }\n\n function cdataOpen(code) {\n if (code === buffer.charCodeAt(index++)) {\n effects.consume(code)\n return index === buffer.length ? cdata : cdataOpen\n }\n\n return nok(code)\n }\n\n function cdata(code) {\n if (code === null) {\n return nok(code)\n }\n\n if (code === 93) {\n effects.consume(code)\n return cdataClose\n }\n\n if (markdownLineEnding(code)) {\n returnState = cdata\n return atLineEnding(code)\n }\n\n effects.consume(code)\n return cdata\n }\n\n function cdataClose(code) {\n if (code === 93) {\n effects.consume(code)\n return cdataEnd\n }\n\n return cdata(code)\n }\n\n function cdataEnd(code) {\n if (code === 62) {\n return end(code)\n }\n\n if (code === 93) {\n effects.consume(code)\n return cdataEnd\n }\n\n return cdata(code)\n }\n\n function declaration(code) {\n if (code === null || code === 62) {\n return end(code)\n }\n\n if (markdownLineEnding(code)) {\n returnState = declaration\n return atLineEnding(code)\n }\n\n effects.consume(code)\n return declaration\n }\n\n function instruction(code) {\n if (code === null) {\n return nok(code)\n }\n\n if (code === 63) {\n effects.consume(code)\n return instructionClose\n }\n\n if (markdownLineEnding(code)) {\n returnState = instruction\n return atLineEnding(code)\n }\n\n effects.consume(code)\n return instruction\n }\n\n function instructionClose(code) {\n return code === 62 ? end(code) : instruction(code)\n }\n\n function tagCloseStart(code) {\n if (asciiAlpha(code)) {\n effects.consume(code)\n return tagClose\n }\n\n return nok(code)\n }\n\n function tagClose(code) {\n if (code === 45 || asciiAlphanumeric(code)) {\n effects.consume(code)\n return tagClose\n }\n\n return tagCloseBetween(code)\n }\n\n function tagCloseBetween(code) {\n if (markdownLineEnding(code)) {\n returnState = tagCloseBetween\n return atLineEnding(code)\n }\n\n if (markdownSpace(code)) {\n effects.consume(code)\n return tagCloseBetween\n }\n\n return end(code)\n }\n\n function tagOpen(code) {\n if (code === 45 || asciiAlphanumeric(code)) {\n effects.consume(code)\n return tagOpen\n }\n\n if (code === 47 || code === 62 || markdownLineEndingOrSpace(code)) {\n return tagOpenBetween(code)\n }\n\n return nok(code)\n }\n\n function tagOpenBetween(code) {\n if (code === 47) {\n effects.consume(code)\n return end\n }\n\n if (code === 58 || code === 95 || asciiAlpha(code)) {\n effects.consume(code)\n return tagOpenAttributeName\n }\n\n if (markdownLineEnding(code)) {\n returnState = tagOpenBetween\n return atLineEnding(code)\n }\n\n if (markdownSpace(code)) {\n effects.consume(code)\n return tagOpenBetween\n }\n\n return end(code)\n }\n\n function tagOpenAttributeName(code) {\n if (\n code === 45 ||\n code === 46 ||\n code === 58 ||\n code === 95 ||\n asciiAlphanumeric(code)\n ) {\n effects.consume(code)\n return tagOpenAttributeName\n }\n\n return tagOpenAttributeNameAfter(code)\n }\n\n function tagOpenAttributeNameAfter(code) {\n if (code === 61) {\n effects.consume(code)\n return tagOpenAttributeValueBefore\n }\n\n if (markdownLineEnding(code)) {\n returnState = tagOpenAttributeNameAfter\n return atLineEnding(code)\n }\n\n if (markdownSpace(code)) {\n effects.consume(code)\n return tagOpenAttributeNameAfter\n }\n\n return tagOpenBetween(code)\n }\n\n function tagOpenAttributeValueBefore(code) {\n if (\n code === null ||\n code === 60 ||\n code === 61 ||\n code === 62 ||\n code === 96\n ) {\n return nok(code)\n }\n\n if (code === 34 || code === 39) {\n effects.consume(code)\n marker = code\n return tagOpenAttributeValueQuoted\n }\n\n if (markdownLineEnding(code)) {\n returnState = tagOpenAttributeValueBefore\n return atLineEnding(code)\n }\n\n if (markdownSpace(code)) {\n effects.consume(code)\n return tagOpenAttributeValueBefore\n }\n\n effects.consume(code)\n marker = undefined\n return tagOpenAttributeValueUnquoted\n }\n\n function tagOpenAttributeValueQuoted(code) {\n if (code === marker) {\n effects.consume(code)\n return tagOpenAttributeValueQuotedAfter\n }\n\n if (code === null) {\n return nok(code)\n }\n\n if (markdownLineEnding(code)) {\n returnState = tagOpenAttributeValueQuoted\n return atLineEnding(code)\n }\n\n effects.consume(code)\n return tagOpenAttributeValueQuoted\n }\n\n function tagOpenAttributeValueQuotedAfter(code) {\n if (code === 62 || code === 47 || markdownLineEndingOrSpace(code)) {\n return tagOpenBetween(code)\n }\n\n return nok(code)\n }\n\n function tagOpenAttributeValueUnquoted(code) {\n if (\n code === null ||\n code === 34 ||\n code === 39 ||\n code === 60 ||\n code === 61 ||\n code === 96\n ) {\n return nok(code)\n }\n\n if (code === 62 || markdownLineEndingOrSpace(code)) {\n return tagOpenBetween(code)\n }\n\n effects.consume(code)\n return tagOpenAttributeValueUnquoted\n } // We can’t have blank lines in content, so no need to worry about empty\n // tokens.\n\n function atLineEnding(code) {\n effects.exit('htmlTextData')\n effects.enter('lineEnding')\n effects.consume(code)\n effects.exit('lineEnding')\n return factorySpace(\n effects,\n afterPrefix,\n 'linePrefix',\n self.parser.constructs.disable.null.indexOf('codeIndented') > -1\n ? undefined\n : 4\n )\n }\n\n function afterPrefix(code) {\n effects.enter('htmlTextData')\n return returnState(code)\n }\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\n return nok(code)\n }\n}\n\nmodule.exports = htmlText\n","'use strict'\n\nvar markdownLineEndingOrSpace = require('../character/markdown-line-ending-or-space.js')\nvar chunkedPush = require('../util/chunked-push.js')\nvar chunkedSplice = require('../util/chunked-splice.js')\nvar normalizeIdentifier = require('../util/normalize-identifier.js')\nvar resolveAll = require('../util/resolve-all.js')\nvar shallow = require('../util/shallow.js')\nvar factoryDestination = require('./factory-destination.js')\nvar factoryLabel = require('./factory-label.js')\nvar factoryTitle = require('./factory-title.js')\nvar factoryWhitespace = require('./factory-whitespace.js')\n\nvar labelEnd = {\n name: 'labelEnd',\n tokenize: tokenizeLabelEnd,\n resolveTo: resolveToLabelEnd,\n resolveAll: resolveAllLabelEnd\n}\nvar resourceConstruct = {\n tokenize: tokenizeResource\n}\nvar fullReferenceConstruct = {\n tokenize: tokenizeFullReference\n}\nvar collapsedReferenceConstruct = {\n tokenize: tokenizeCollapsedReference\n}\n\nfunction resolveAllLabelEnd(events) {\n var index = -1\n var token\n\n while (++index < events.length) {\n token = events[index][1]\n\n if (\n !token._used &&\n (token.type === 'labelImage' ||\n token.type === 'labelLink' ||\n token.type === 'labelEnd')\n ) {\n // Remove the marker.\n events.splice(index + 1, token.type === 'labelImage' ? 4 : 2)\n token.type = 'data'\n index++\n }\n }\n\n return events\n}\n\nfunction resolveToLabelEnd(events, context) {\n var index = events.length\n var offset = 0\n var group\n var label\n var text\n var token\n var open\n var close\n var media // Find an opening.\n\n while (index--) {\n token = events[index][1]\n\n if (open) {\n // If we see another link, or inactive link label, we’ve been here before.\n if (\n token.type === 'link' ||\n (token.type === 'labelLink' && token._inactive)\n ) {\n break\n } // Mark other link openings as inactive, as we can’t have links in\n // links.\n\n if (events[index][0] === 'enter' && token.type === 'labelLink') {\n token._inactive = true\n }\n } else if (close) {\n if (\n events[index][0] === 'enter' &&\n (token.type === 'labelImage' || token.type === 'labelLink') &&\n !token._balanced\n ) {\n open = index\n\n if (token.type !== 'labelLink') {\n offset = 2\n break\n }\n }\n } else if (token.type === 'labelEnd') {\n close = index\n }\n }\n\n group = {\n type: events[open][1].type === 'labelLink' ? 'link' : 'image',\n start: shallow(events[open][1].start),\n end: shallow(events[events.length - 1][1].end)\n }\n label = {\n type: 'label',\n start: shallow(events[open][1].start),\n end: shallow(events[close][1].end)\n }\n text = {\n type: 'labelText',\n start: shallow(events[open + offset + 2][1].end),\n end: shallow(events[close - 2][1].start)\n }\n media = [\n ['enter', group, context],\n ['enter', label, context]\n ] // Opening marker.\n\n media = chunkedPush(media, events.slice(open + 1, open + offset + 3)) // Text open.\n\n media = chunkedPush(media, [['enter', text, context]]) // Between.\n\n media = chunkedPush(\n media,\n resolveAll(\n context.parser.constructs.insideSpan.null,\n events.slice(open + offset + 4, close - 3),\n context\n )\n ) // Text close, marker close, label close.\n\n media = chunkedPush(media, [\n ['exit', text, context],\n events[close - 2],\n events[close - 1],\n ['exit', label, context]\n ]) // Reference, resource, or so.\n\n media = chunkedPush(media, events.slice(close + 1)) // Media close.\n\n media = chunkedPush(media, [['exit', group, context]])\n chunkedSplice(events, open, events.length, media)\n return events\n}\n\nfunction tokenizeLabelEnd(effects, ok, nok) {\n var self = this\n var index = self.events.length\n var labelStart\n var defined // Find an opening.\n\n while (index--) {\n if (\n (self.events[index][1].type === 'labelImage' ||\n self.events[index][1].type === 'labelLink') &&\n !self.events[index][1]._balanced\n ) {\n labelStart = self.events[index][1]\n break\n }\n }\n\n return start\n\n function start(code) {\n if (!labelStart) {\n return nok(code)\n } // It’s a balanced bracket, but contains a link.\n\n if (labelStart._inactive) return balanced(code)\n defined =\n self.parser.defined.indexOf(\n normalizeIdentifier(\n self.sliceSerialize({\n start: labelStart.end,\n end: self.now()\n })\n )\n ) > -1\n effects.enter('labelEnd')\n effects.enter('labelMarker')\n effects.consume(code)\n effects.exit('labelMarker')\n effects.exit('labelEnd')\n return afterLabelEnd\n }\n\n function afterLabelEnd(code) {\n // Resource: `[asd](fgh)`.\n if (code === 40) {\n return effects.attempt(\n resourceConstruct,\n ok,\n defined ? ok : balanced\n )(code)\n } // Collapsed (`[asd][]`) or full (`[asd][fgh]`) reference?\n\n if (code === 91) {\n return effects.attempt(\n fullReferenceConstruct,\n ok,\n defined\n ? effects.attempt(collapsedReferenceConstruct, ok, balanced)\n : balanced\n )(code)\n } // Shortcut reference: `[asd]`?\n\n return defined ? ok(code) : balanced(code)\n }\n\n function balanced(code) {\n labelStart._balanced = true\n return nok(code)\n }\n}\n\nfunction tokenizeResource(effects, ok, nok) {\n return start\n\n function start(code) {\n effects.enter('resource')\n effects.enter('resourceMarker')\n effects.consume(code)\n effects.exit('resourceMarker')\n return factoryWhitespace(effects, open)\n }\n\n function open(code) {\n if (code === 41) {\n return end(code)\n }\n\n return factoryDestination(\n effects,\n destinationAfter,\n nok,\n 'resourceDestination',\n 'resourceDestinationLiteral',\n 'resourceDestinationLiteralMarker',\n 'resourceDestinationRaw',\n 'resourceDestinationString',\n 3\n )(code)\n }\n\n function destinationAfter(code) {\n return markdownLineEndingOrSpace(code)\n ? factoryWhitespace(effects, between)(code)\n : end(code)\n }\n\n function between(code) {\n if (code === 34 || code === 39 || code === 40) {\n return factoryTitle(\n effects,\n factoryWhitespace(effects, end),\n nok,\n 'resourceTitle',\n 'resourceTitleMarker',\n 'resourceTitleString'\n )(code)\n }\n\n return end(code)\n }\n\n function end(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\n return nok(code)\n }\n}\n\nfunction tokenizeFullReference(effects, ok, nok) {\n var self = this\n return start\n\n function start(code) {\n return factoryLabel.call(\n self,\n effects,\n afterLabel,\n nok,\n 'reference',\n 'referenceMarker',\n 'referenceString'\n )(code)\n }\n\n function afterLabel(code) {\n return self.parser.defined.indexOf(\n normalizeIdentifier(\n self.sliceSerialize(self.events[self.events.length - 1][1]).slice(1, -1)\n )\n ) < 0\n ? nok(code)\n : ok(code)\n }\n}\n\nfunction tokenizeCollapsedReference(effects, ok, nok) {\n return start\n\n function start(code) {\n effects.enter('reference')\n effects.enter('referenceMarker')\n effects.consume(code)\n effects.exit('referenceMarker')\n return open\n }\n\n function open(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\n return nok(code)\n }\n}\n\nmodule.exports = labelEnd\n","'use strict'\n\nvar labelEnd = require('./label-end.js')\n\nvar labelStartImage = {\n name: 'labelStartImage',\n tokenize: tokenizeLabelStartImage,\n resolveAll: labelEnd.resolveAll\n}\n\nfunction tokenizeLabelStartImage(effects, ok, nok) {\n var self = this\n return start\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 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\n return nok(code)\n }\n\n function after(code) {\n /* c8 ignore next */\n return code === 94 &&\n /* c8 ignore next */\n '_hiddenFootnoteSupport' in self.parser.constructs\n ? /* c8 ignore next */\n nok(code)\n : ok(code)\n }\n}\n\nmodule.exports = labelStartImage\n","'use strict'\n\nvar labelEnd = require('./label-end.js')\n\nvar labelStartLink = {\n name: 'labelStartLink',\n tokenize: tokenizeLabelStartLink,\n resolveAll: labelEnd.resolveAll\n}\n\nfunction tokenizeLabelStartLink(effects, ok, nok) {\n var self = this\n return start\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 function after(code) {\n /* c8 ignore next */\n return code === 94 &&\n /* c8 ignore next */\n '_hiddenFootnoteSupport' in self.parser.constructs\n ? /* c8 ignore next */\n nok(code)\n : ok(code)\n }\n}\n\nmodule.exports = labelStartLink\n","'use strict'\n\nvar factorySpace = require('./factory-space.js')\n\nvar lineEnding = {\n name: 'lineEnding',\n tokenize: tokenizeLineEnding\n}\n\nfunction tokenizeLineEnding(effects, ok) {\n return start\n\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\nmodule.exports = lineEnding\n","'use strict'\n\nvar asciiDigit = require('../character/ascii-digit.js')\nvar markdownSpace = require('../character/markdown-space.js')\nvar prefixSize = require('../util/prefix-size.js')\nvar sizeChunks = require('../util/size-chunks.js')\nvar factorySpace = require('./factory-space.js')\nvar partialBlankLine = require('./partial-blank-line.js')\nvar thematicBreak = require('./thematic-break.js')\n\nvar list = {\n name: 'list',\n tokenize: tokenizeListStart,\n continuation: {\n tokenize: tokenizeListContinuation\n },\n exit: tokenizeListEnd\n}\nvar listItemPrefixWhitespaceConstruct = {\n tokenize: tokenizeListItemPrefixWhitespace,\n partial: true\n}\nvar indentConstruct = {\n tokenize: tokenizeIndent,\n partial: true\n}\n\nfunction tokenizeListStart(effects, ok, nok) {\n var self = this\n var initialSize = prefixSize(self.events, 'linePrefix')\n var size = 0\n return start\n\n function start(code) {\n var kind =\n self.containerState.type ||\n (code === 42 || code === 43 || code === 45\n ? 'listUnordered'\n : 'listOrdered')\n\n if (\n kind === 'listUnordered'\n ? !self.containerState.marker || code === self.containerState.marker\n : asciiDigit(code)\n ) {\n if (!self.containerState.type) {\n self.containerState.type = kind\n effects.enter(kind, {\n _container: true\n })\n }\n\n if (kind === 'listUnordered') {\n effects.enter('listItemPrefix')\n return code === 42 || code === 45\n ? effects.check(thematicBreak, nok, atMarker)(code)\n : atMarker(code)\n }\n\n if (!self.interrupt || code === 49) {\n effects.enter('listItemPrefix')\n effects.enter('listItemValue')\n return inside(code)\n }\n }\n\n return nok(code)\n }\n\n function inside(code) {\n if (asciiDigit(code) && ++size < 10) {\n effects.consume(code)\n return inside\n }\n\n if (\n (!self.interrupt || size < 2) &&\n (self.containerState.marker\n ? code === self.containerState.marker\n : code === 41 || code === 46)\n ) {\n effects.exit('listItemValue')\n return atMarker(code)\n }\n\n return nok(code)\n }\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(\n partialBlankLine, // Can’t be empty when interrupting.\n self.interrupt ? nok : onBlank,\n effects.attempt(\n listItemPrefixWhitespaceConstruct,\n endOfPrefix,\n otherPrefix\n )\n )\n }\n\n function onBlank(code) {\n self.containerState.initialBlankLine = true\n initialSize++\n return endOfPrefix(code)\n }\n\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\n return nok(code)\n }\n\n function endOfPrefix(code) {\n self.containerState.size =\n initialSize + sizeChunks(self.sliceStream(effects.exit('listItemPrefix')))\n return ok(code)\n }\n}\n\nfunction tokenizeListContinuation(effects, ok, nok) {\n var self = this\n self.containerState._closeFlow = undefined\n return effects.check(partialBlankLine, onBlank, notBlank)\n\n function onBlank(code) {\n self.containerState.furtherBlankLines =\n self.containerState.furtherBlankLines ||\n self.containerState.initialBlankLine // We have a blank line.\n // Still, try to consume at most the items size.\n\n return factorySpace(\n effects,\n ok,\n 'listItemIndent',\n self.containerState.size + 1\n )(code)\n }\n\n function notBlank(code) {\n if (self.containerState.furtherBlankLines || !markdownSpace(code)) {\n self.containerState.furtherBlankLines = self.containerState.initialBlankLine = undefined\n return notInCurrentItem(code)\n }\n\n self.containerState.furtherBlankLines = self.containerState.initialBlankLine = undefined\n return effects.attempt(indentConstruct, ok, notInCurrentItem)(code)\n }\n\n function notInCurrentItem(code) {\n // While we do continue, we signal that the flow should be closed.\n self.containerState._closeFlow = true // As we’re closing flow, we’re no longer interrupting.\n\n self.interrupt = undefined\n return factorySpace(\n effects,\n effects.attempt(list, ok, nok),\n 'linePrefix',\n self.parser.constructs.disable.null.indexOf('codeIndented') > -1\n ? undefined\n : 4\n )(code)\n }\n}\n\nfunction tokenizeIndent(effects, ok, nok) {\n var self = this\n return factorySpace(\n effects,\n afterPrefix,\n 'listItemIndent',\n self.containerState.size + 1\n )\n\n function afterPrefix(code) {\n return prefixSize(self.events, 'listItemIndent') ===\n self.containerState.size\n ? ok(code)\n : nok(code)\n }\n}\n\nfunction tokenizeListEnd(effects) {\n effects.exit(this.containerState.type)\n}\n\nfunction tokenizeListItemPrefixWhitespace(effects, ok, nok) {\n var self = this\n return factorySpace(\n effects,\n afterPrefix,\n 'listItemPrefixWhitespace',\n self.parser.constructs.disable.null.indexOf('codeIndented') > -1\n ? undefined\n : 4 + 1\n )\n\n function afterPrefix(code) {\n return markdownSpace(code) ||\n !prefixSize(self.events, 'listItemPrefixWhitespace')\n ? nok(code)\n : ok(code)\n }\n}\n\nmodule.exports = list\n","'use strict'\n\nvar markdownLineEnding = require('../character/markdown-line-ending.js')\nvar factorySpace = require('./factory-space.js')\n\nvar partialBlankLine = {\n tokenize: tokenizePartialBlankLine,\n partial: true\n}\n\nfunction tokenizePartialBlankLine(effects, ok, nok) {\n return factorySpace(effects, afterWhitespace, 'linePrefix')\n\n function afterWhitespace(code) {\n return code === null || markdownLineEnding(code) ? ok(code) : nok(code)\n }\n}\n\nmodule.exports = partialBlankLine\n","'use strict'\n\nvar markdownLineEnding = require('../character/markdown-line-ending.js')\nvar shallow = require('../util/shallow.js')\nvar factorySpace = require('./factory-space.js')\n\nvar setextUnderline = {\n name: 'setextUnderline',\n tokenize: tokenizeSetextUnderline,\n resolveTo: resolveToSetextUnderline\n}\n\nfunction resolveToSetextUnderline(events, context) {\n var index = events.length\n var content\n var text\n var definition\n var heading // Find the opening of the content.\n // It’ll always exist: we don’t tokenize if it isn’t there.\n\n while (index--) {\n if (events[index][0] === 'enter') {\n if (events[index][1].type === 'content') {\n content = index\n break\n }\n\n if (events[index][1].type === 'paragraph') {\n text = index\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\n if (!definition && events[index][1].type === 'definition') {\n definition = index\n }\n }\n }\n\n heading = {\n type: 'setextHeading',\n start: shallow(events[text][1].start),\n end: shallow(events[events.length - 1][1].end)\n } // Change the paragraph to setext heading text.\n\n events[text][1].type = 'setextHeadingText' // If we have definitions in the content, we’ll keep on having content,\n // but we need move it.\n\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 = shallow(events[definition][1].end)\n } else {\n events[content][1] = heading\n } // Add the heading exit at the end.\n\n events.push(['exit', heading, context])\n return events\n}\n\nfunction tokenizeSetextUnderline(effects, ok, nok) {\n var self = this\n var index = self.events.length\n var marker\n var paragraph // Find an opening.\n\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 (\n self.events[index][1].type !== 'lineEnding' &&\n self.events[index][1].type !== 'linePrefix' &&\n self.events[index][1].type !== 'content'\n ) {\n paragraph = self.events[index][1].type === 'paragraph'\n break\n }\n }\n\n return start\n\n function start(code) {\n if (!self.lazy && (self.interrupt || paragraph)) {\n effects.enter('setextHeadingLine')\n effects.enter('setextHeadingLineSequence')\n marker = code\n return closingSequence(code)\n }\n\n return nok(code)\n }\n\n function closingSequence(code) {\n if (code === marker) {\n effects.consume(code)\n return closingSequence\n }\n\n effects.exit('setextHeadingLineSequence')\n return factorySpace(effects, closingSequenceEnd, 'lineSuffix')(code)\n }\n\n function closingSequenceEnd(code) {\n if (code === null || markdownLineEnding(code)) {\n effects.exit('setextHeadingLine')\n return ok(code)\n }\n\n return nok(code)\n }\n}\n\nmodule.exports = setextUnderline\n","'use strict'\n\nvar markdownLineEnding = require('../character/markdown-line-ending.js')\nvar markdownSpace = require('../character/markdown-space.js')\nvar factorySpace = require('./factory-space.js')\n\nvar thematicBreak = {\n name: 'thematicBreak',\n tokenize: tokenizeThematicBreak\n}\n\nfunction tokenizeThematicBreak(effects, ok, nok) {\n var size = 0\n var marker\n return start\n\n function start(code) {\n effects.enter('thematicBreak')\n marker = code\n return atBreak(code)\n }\n\n function atBreak(code) {\n if (code === marker) {\n effects.enter('thematicBreakSequence')\n return sequence(code)\n }\n\n if (markdownSpace(code)) {\n return factorySpace(effects, atBreak, 'whitespace')(code)\n }\n\n if (size < 3 || (code !== null && !markdownLineEnding(code))) {\n return nok(code)\n }\n\n effects.exit('thematicBreak')\n return ok(code)\n }\n\n function sequence(code) {\n if (code === marker) {\n effects.consume(code)\n size++\n return sequence\n }\n\n effects.exit('thematicBreakSequence')\n return atBreak(code)\n }\n}\n\nmodule.exports = thematicBreak\n","'use strict'\n\nvar chunkedSplice = require('./chunked-splice.js')\n\nfunction chunkedPush(list, items) {\n if (list.length) {\n chunkedSplice(list, list.length, 0, items)\n return list\n }\n\n return items\n}\n\nmodule.exports = chunkedPush\n","'use strict'\n\nvar splice = require('../constant/splice.js')\n\n// causes a stack overflow in V8 when trying to insert 100k items for instance.\n\nfunction chunkedSplice(list, start, remove, items) {\n var end = list.length\n var chunkStart = 0\n var parameters // Make start between zero and `end` (included).\n\n if (start < 0) {\n start = -start > end ? 0 : end + start\n } else {\n start = start > end ? end : start\n }\n\n remove = remove > 0 ? remove : 0 // No need to chunk the items if there’s only a couple (10k) items.\n\n if (items.length < 10000) {\n parameters = Array.from(items)\n parameters.unshift(start, remove)\n splice.apply(list, parameters)\n } else {\n // Delete `remove` items starting from `start`\n if (remove) splice.apply(list, [start, remove]) // Insert the items in chunks to not cause stack overflows.\n\n while (chunkStart < items.length) {\n parameters = items.slice(chunkStart, chunkStart + 10000)\n parameters.unshift(start, 0)\n splice.apply(list, parameters)\n chunkStart += 10000\n start += 10000\n }\n }\n}\n\nmodule.exports = chunkedSplice\n","'use strict'\n\nvar markdownLineEndingOrSpace = require('../character/markdown-line-ending-or-space.js')\nvar unicodePunctuation = require('../character/unicode-punctuation.js')\nvar unicodeWhitespace = require('../character/unicode-whitespace.js')\n\n// Classify whether a character is unicode whitespace, unicode punctuation, or\n// anything else.\n// Used for attention (emphasis, strong), whose sequences can open or close\n// based on the class of surrounding characters.\nfunction classifyCharacter(code) {\n if (\n code === null ||\n markdownLineEndingOrSpace(code) ||\n unicodeWhitespace(code)\n ) {\n return 1\n }\n\n if (unicodePunctuation(code)) {\n return 2\n }\n}\n\nmodule.exports = classifyCharacter\n","'use strict'\n\nvar hasOwnProperty = require('../constant/has-own-property.js')\nvar chunkedSplice = require('./chunked-splice.js')\nvar miniflat = require('./miniflat.js')\n\nfunction combineExtensions(extensions) {\n var all = {}\n var index = -1\n\n while (++index < extensions.length) {\n extension(all, extensions[index])\n }\n\n return all\n}\n\nfunction extension(all, extension) {\n var hook\n var left\n var right\n var code\n\n for (hook in extension) {\n left = hasOwnProperty.call(all, hook) ? all[hook] : (all[hook] = {})\n right = extension[hook]\n\n for (code in right) {\n left[code] = constructs(\n miniflat(right[code]),\n hasOwnProperty.call(left, code) ? left[code] : []\n )\n }\n }\n}\n\nfunction constructs(list, existing) {\n var index = -1\n var before = []\n\n while (++index < list.length) {\n ;(list[index].add === 'after' ? existing : before).push(list[index])\n }\n\n chunkedSplice(existing, 0, 0, before)\n return existing\n}\n\nmodule.exports = combineExtensions\n","'use strict'\n\nvar assign = require('../constant/assign.js')\nvar markdownLineEnding = require('../character/markdown-line-ending.js')\nvar chunkedPush = require('./chunked-push.js')\nvar chunkedSplice = require('./chunked-splice.js')\nvar miniflat = require('./miniflat.js')\nvar resolveAll = require('./resolve-all.js')\nvar serializeChunks = require('./serialize-chunks.js')\nvar shallow = require('./shallow.js')\nvar sliceChunks = require('./slice-chunks.js')\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`.\nfunction createTokenizer(parser, initialize, from) {\n var point = from\n ? shallow(from)\n : {\n line: 1,\n column: 1,\n offset: 0\n }\n var columnStart = {}\n var resolveAllConstructs = []\n var chunks = []\n var stack = []\n\n var effects = {\n consume: consume,\n enter: enter,\n exit: exit,\n attempt: constructFactory(onsuccessfulconstruct),\n check: constructFactory(onsuccessfulcheck),\n interrupt: constructFactory(onsuccessfulcheck, {\n interrupt: true\n }),\n lazy: constructFactory(onsuccessfulcheck, {\n lazy: true\n })\n } // State and tools for resolving and serializing.\n\n var context = {\n previous: null,\n events: [],\n parser: parser,\n sliceStream: sliceStream,\n sliceSerialize: sliceSerialize,\n now: now,\n defineSkip: skip,\n write: write\n } // The state function.\n\n var state = initialize.tokenize.call(context, effects) // Track which character we expect to be consumed, to catch bugs.\n\n if (initialize.resolveAll) {\n resolveAllConstructs.push(initialize)\n } // Store where we are in the input stream.\n\n point._index = 0\n point._bufferIndex = -1\n return context\n\n function write(slice) {\n chunks = chunkedPush(chunks, slice)\n main() // Exit if we’re not done, resolve might change stuff.\n\n if (chunks[chunks.length - 1] !== null) {\n return []\n }\n\n addResult(initialize, 0) // Otherwise, resolve, and exit.\n\n context.events = resolveAll(resolveAllConstructs, context.events, context)\n return context.events\n } //\n // Tools.\n //\n\n function sliceSerialize(token) {\n return serializeChunks(sliceStream(token))\n }\n\n function sliceStream(token) {\n return sliceChunks(chunks, token)\n }\n\n function now() {\n return shallow(point)\n }\n\n function skip(value) {\n columnStart[value.line] = value.column\n accountForPotentialSkip()\n } //\n // State management.\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 function main() {\n var chunkIndex\n var chunk\n\n while (point._index < chunks.length) {\n chunk = chunks[point._index] // If we’re in a buffer chunk, loop through it.\n\n if (typeof chunk === 'string') {\n chunkIndex = point._index\n\n if (point._bufferIndex < 0) {\n point._bufferIndex = 0\n }\n\n while (\n point._index === chunkIndex &&\n point._bufferIndex < chunk.length\n ) {\n go(chunk.charCodeAt(point._bufferIndex))\n }\n } else {\n go(chunk)\n }\n }\n } // Deal with one code.\n\n function go(code) {\n state = state(code)\n } // Move a character forward.\n\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 } // Not in a string chunk.\n\n if (point._bufferIndex < 0) {\n point._index++\n } else {\n point._bufferIndex++ // At end of string chunk.\n\n if (point._bufferIndex === chunks[point._index].length) {\n point._bufferIndex = -1\n point._index++\n }\n } // Expose the previous character.\n\n context.previous = code // Mark as consumed.\n } // Start a token.\n\n function enter(type, fields) {\n var 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 } // Stop a token.\n\n function exit(type) {\n var token = stack.pop()\n token.end = now()\n context.events.push(['exit', token, context])\n return token\n } // Use results.\n\n function onsuccessfulconstruct(construct, info) {\n addResult(construct, info.from)\n } // Discard results.\n\n function onsuccessfulcheck(construct, info) {\n info.restore()\n } // Factory to attempt/check/interrupt.\n\n function constructFactory(onreturn, fields) {\n return hook // Handle either an object mapping codes to constructs, a list of\n // constructs, or a single construct.\n\n function hook(constructs, returnState, bogusState) {\n var listOfConstructs\n var constructIndex\n var currentConstruct\n var info\n return constructs.tokenize || 'length' in constructs\n ? handleListOfConstructs(miniflat(constructs))\n : handleMapOfConstructs\n\n function handleMapOfConstructs(code) {\n if (code in constructs || null in constructs) {\n return handleListOfConstructs(\n constructs.null\n ? /* c8 ignore next */\n miniflat(constructs[code]).concat(miniflat(constructs.null))\n : constructs[code]\n )(code)\n }\n\n return bogusState(code)\n }\n\n function handleListOfConstructs(list) {\n listOfConstructs = list\n constructIndex = 0\n return handleConstruct(list[constructIndex])\n }\n\n function handleConstruct(construct) {\n return start\n\n function start(code) {\n // To do: not nede 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\n if (!construct.partial) {\n context.currentConstruct = construct\n }\n\n if (\n construct.name &&\n context.parser.constructs.disable.null.indexOf(construct.name) > -1\n ) {\n return nok()\n }\n\n return construct.tokenize.call(\n fields ? assign({}, context, fields) : context,\n effects,\n ok,\n nok\n )(code)\n }\n }\n\n function ok(code) {\n onreturn(currentConstruct, info)\n return returnState\n }\n\n function nok(code) {\n info.restore()\n\n if (++constructIndex < listOfConstructs.length) {\n return handleConstruct(listOfConstructs[constructIndex])\n }\n\n return bogusState\n }\n }\n }\n\n function addResult(construct, from) {\n if (construct.resolveAll && resolveAllConstructs.indexOf(construct) < 0) {\n resolveAllConstructs.push(construct)\n }\n\n if (construct.resolve) {\n chunkedSplice(\n context.events,\n from,\n context.events.length - from,\n construct.resolve(context.events.slice(from), context)\n )\n }\n\n if (construct.resolveTo) {\n context.events = construct.resolveTo(context.events, context)\n }\n }\n\n function store() {\n var startPoint = now()\n var startPrevious = context.previous\n var startCurrentConstruct = context.currentConstruct\n var startEventsIndex = context.events.length\n var startStack = Array.from(stack)\n return {\n restore: restore,\n from: startEventsIndex\n }\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 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\nmodule.exports = createTokenizer\n","'use strict'\n\nfunction miniflat(value) {\n return value === null || value === undefined\n ? []\n : 'length' in value\n ? value\n : [value]\n}\n\nmodule.exports = miniflat\n","'use strict'\n\n// chunks (replacement characters, tabs, or line endings).\n\nfunction movePoint(point, offset) {\n point.column += offset\n point.offset += offset\n point._bufferIndex += offset\n return point\n}\n\nmodule.exports = movePoint\n","'use strict'\n\nfunction normalizeIdentifier(value) {\n return (\n value // Collapse Markdown whitespace.\n .replace(/[\\t\\n\\r ]+/g, ' ') // Trim.\n .replace(/^ | $/g, '') // 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 object method is uppercase.\n .toLowerCase()\n .toUpperCase()\n )\n}\n\nmodule.exports = normalizeIdentifier\n","'use strict'\n\nvar sizeChunks = require('./size-chunks.js')\n\nfunction prefixSize(events, type) {\n var tail = events[events.length - 1]\n if (!tail || tail[1].type !== type) return 0\n return sizeChunks(tail[2].sliceStream(tail[1]))\n}\n\nmodule.exports = prefixSize\n","'use strict'\n\nvar fromCharCode = require('../constant/from-char-code.js')\n\nfunction regexCheck(regex) {\n return check\n\n function check(code) {\n return regex.test(fromCharCode(code))\n }\n}\n\nmodule.exports = regexCheck\n","'use strict'\n\nfunction resolveAll(constructs, events, context) {\n var called = []\n var index = -1\n var resolve\n\n while (++index < constructs.length) {\n resolve = constructs[index].resolveAll\n\n if (resolve && called.indexOf(resolve) < 0) {\n events = resolve(events, context)\n called.push(resolve)\n }\n }\n\n return events\n}\n\nmodule.exports = resolveAll\n","'use strict'\n\nvar fromCharCode = require('../constant/from-char-code.js')\n\nfunction safeFromInt(value, base) {\n var code = parseInt(value, base)\n\n if (\n // C0 except for HT, LF, FF, CR, space\n code < 9 ||\n code === 11 ||\n (code > 13 && code < 32) || // Control character (DEL) of the basic block and C1 controls.\n (code > 126 && code < 160) || // Lone high surrogates and low surrogates.\n (code > 55295 && code < 57344) || // Noncharacters.\n (code > 64975 && code < 65008) ||\n (code & 65535) === 65535 ||\n (code & 65535) === 65534 || // Out of range\n code > 1114111\n ) {\n return '\\uFFFD'\n }\n\n return fromCharCode(code)\n}\n\nmodule.exports = safeFromInt\n","'use strict'\n\nvar fromCharCode = require('../constant/from-char-code.js')\n\nfunction serializeChunks(chunks) {\n var index = -1\n var result = []\n var chunk\n var value\n var atTab\n\n while (++index < chunks.length) {\n chunk = chunks[index]\n\n if (typeof chunk === 'string') {\n value = chunk\n } else if (chunk === -5) {\n value = '\\r'\n } else if (chunk === -4) {\n value = '\\n'\n } else if (chunk === -3) {\n value = '\\r' + '\\n'\n } else if (chunk === -2) {\n value = '\\t'\n } else if (chunk === -1) {\n if (atTab) continue\n value = ' '\n } else {\n // Currently only replacement character.\n value = fromCharCode(chunk)\n }\n\n atTab = chunk === -2\n result.push(value)\n }\n\n return result.join('')\n}\n\nmodule.exports = serializeChunks\n","'use strict'\n\nvar assign = require('../constant/assign.js')\n\nfunction shallow(object) {\n return assign({}, object)\n}\n\nmodule.exports = shallow\n","'use strict'\n\n// Counts tabs based on their expanded size, and CR+LF as one character.\n\nfunction sizeChunks(chunks) {\n var index = -1\n var size = 0\n\n while (++index < chunks.length) {\n size += typeof chunks[index] === 'string' ? chunks[index].length : 1\n }\n\n return size\n}\n\nmodule.exports = sizeChunks\n","'use strict'\n\nfunction sliceChunks(chunks, token) {\n var startIndex = token.start._index\n var startBufferIndex = token.start._bufferIndex\n var endIndex = token.end._index\n var endBufferIndex = token.end._bufferIndex\n var view\n\n if (startIndex === endIndex) {\n view = [chunks[startIndex].slice(startBufferIndex, endBufferIndex)]\n } else {\n view = chunks.slice(startIndex, endIndex)\n\n if (startBufferIndex > -1) {\n view[0] = view[0].slice(startBufferIndex)\n }\n\n if (endBufferIndex > 0) {\n view.push(chunks[endIndex].slice(0, endBufferIndex))\n }\n }\n\n return view\n}\n\nmodule.exports = sliceChunks\n","'use strict'\n\nvar assign = require('../constant/assign.js')\nvar chunkedSplice = require('./chunked-splice.js')\nvar shallow = require('./shallow.js')\n\nfunction subtokenize(events) {\n var jumps = {}\n var index = -1\n var event\n var lineIndex\n var otherIndex\n var otherEvent\n var parameters\n var subevents\n var more\n\n while (++index < events.length) {\n while (index in jumps) {\n index = jumps[index]\n }\n\n event = events[index] // 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\n if (\n index &&\n event[1].type === 'chunkFlow' &&\n events[index - 1][1].type === 'listItemPrefix'\n ) {\n subevents = event[1]._tokenizer.events\n otherIndex = 0\n\n if (\n otherIndex < subevents.length &&\n subevents[otherIndex][1].type === 'lineEndingBlank'\n ) {\n otherIndex += 2\n }\n\n if (\n otherIndex < subevents.length &&\n subevents[otherIndex][1].type === 'content'\n ) {\n while (++otherIndex < subevents.length) {\n if (subevents[otherIndex][1].type === 'content') {\n break\n }\n\n if (subevents[otherIndex][1].type === 'chunkText') {\n subevents[otherIndex][1].isInFirstContentOfListItem = true\n otherIndex++\n }\n }\n }\n } // Enter.\n\n if (event[0] === 'enter') {\n if (event[1].contentType) {\n assign(jumps, subcontent(events, index))\n index = jumps[index]\n more = true\n }\n } // Exit.\n else if (event[1]._container || event[1]._movePreviousLineEndings) {\n otherIndex = index\n lineIndex = undefined\n\n while (otherIndex--) {\n otherEvent = events[otherIndex]\n\n if (\n otherEvent[1].type === 'lineEnding' ||\n otherEvent[1].type === 'lineEndingBlank'\n ) {\n if (otherEvent[0] === 'enter') {\n if (lineIndex) {\n events[lineIndex][1].type = 'lineEndingBlank'\n }\n\n otherEvent[1].type = 'lineEnding'\n lineIndex = otherIndex\n }\n } else {\n break\n }\n }\n\n if (lineIndex) {\n // Fix position.\n event[1].end = shallow(events[lineIndex][1].start) // Switch container exit w/ line endings.\n\n parameters = events.slice(lineIndex, index)\n parameters.unshift(event)\n chunkedSplice(events, lineIndex, index - lineIndex + 1, parameters)\n }\n }\n }\n\n return !more\n}\n\nfunction subcontent(events, eventIndex) {\n var token = events[eventIndex][1]\n var context = events[eventIndex][2]\n var startPosition = eventIndex - 1\n var startPositions = []\n var tokenizer =\n token._tokenizer || context.parser[token.contentType](token.start)\n var childEvents = tokenizer.events\n var jumps = []\n var gaps = {}\n var stream\n var previous\n var index\n var entered\n var end\n var adjust // Loop forward through the linked tokens to pass them in order to the\n // subtokenizer.\n\n while (token) {\n // Find the position of the event for this token.\n while (events[++startPosition][1] !== token) {\n // Empty.\n }\n\n startPositions.push(startPosition)\n\n if (!token._tokenizer) {\n stream = context.sliceStream(token)\n\n if (!token.next) {\n stream.push(null)\n }\n\n if (previous) {\n tokenizer.defineSkip(token.start)\n }\n\n if (token.isInFirstContentOfListItem) {\n tokenizer._gfmTasklistFirstContentOfListItem = true\n }\n\n tokenizer.write(stream)\n\n if (token.isInFirstContentOfListItem) {\n tokenizer._gfmTasklistFirstContentOfListItem = undefined\n }\n } // Unravel the next token.\n\n previous = token\n token = token.next\n } // Now, loop back through all events (and linked tokens), to figure out which\n // parts belong where.\n\n token = previous\n index = childEvents.length\n\n while (index--) {\n // Make sure we’ve at least seen something (final eol is part of the last\n // token).\n if (childEvents[index][0] === 'enter') {\n entered = true\n } else if (\n // Find a void token that includes a break.\n entered &&\n childEvents[index][1].type === childEvents[index - 1][1].type &&\n childEvents[index][1].start.line !== childEvents[index][1].end.line\n ) {\n add(childEvents.slice(index + 1, end))\n // Help GC.\n token._tokenizer = token.next = undefined\n token = token.previous\n end = index + 1\n }\n }\n\n // Help GC.\n tokenizer.events = token._tokenizer = token.next = undefined // Do head:\n\n add(childEvents.slice(0, end))\n index = -1\n adjust = 0\n\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\n return gaps\n\n function add(slice) {\n var start = startPositions.pop()\n jumps.unshift([start, start + slice.length - 1])\n chunkedSplice(events, start, 2, slice)\n }\n}\n\nmodule.exports = subtokenize\n","'use strict'\n\n/* eslint-env browser */\n\nvar el\n\nvar semicolon = 59 // ';'\n\nmodule.exports = decodeEntity\n\nfunction decodeEntity(characters) {\n var entity = '&' + characters + ';'\n var char\n\n el = el || document.createElement('i')\n el.innerHTML = entity\n char = el.textContent\n\n // Some entities do not require the closing semicolon (`¬` - for instance),\n // which leads to situations where parsing the assumed entity of ¬it; will\n // result in the string `¬it;`. When we encounter a trailing semicolon after\n // parsing and the entity to decode was not a semicolon (`;`), we can\n // assume that the matching was incomplete\n if (char.charCodeAt(char.length - 1) === semicolon && characters !== 'semi') {\n return false\n }\n\n // If the decoded string is equal to the input, the entity was not valid\n return char === entity ? false : char\n}\n","'use strict'\n\nmodule.exports = parse\n\nvar fromMarkdown = require('mdast-util-from-markdown')\n\nfunction parse(options) {\n var self = this\n\n this.Parser = parse\n\n function parse(doc) {\n return fromMarkdown(\n doc,\n Object.assign({}, self.data('settings'), 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","'use strict'\n\nvar wrap = require('./wrap.js')\n\nmodule.exports = trough\n\ntrough.wrap = wrap\n\nvar slice = [].slice\n\n// Create new middleware.\nfunction trough() {\n var fns = []\n var middleware = {}\n\n middleware.run = run\n middleware.use = use\n\n return middleware\n\n // Run `fns`. Last argument must be a completion handler.\n function run() {\n var index = -1\n var input = slice.call(arguments, 0, -1)\n var done = arguments[arguments.length - 1]\n\n if (typeof done !== 'function') {\n throw new Error('Expected function as last argument, not ' + done)\n }\n\n next.apply(null, [null].concat(input))\n\n // Run the next `fn`, if any.\n function next(err) {\n var fn = fns[++index]\n var params = slice.call(arguments, 0)\n var values = params.slice(1)\n var length = input.length\n var pos = -1\n\n if (err) {\n done(err)\n return\n }\n\n // Copy non-nully input into values.\n while (++pos < length) {\n if (values[pos] === null || values[pos] === undefined) {\n values[pos] = input[pos]\n }\n }\n\n input = values\n\n // Next or done.\n if (fn) {\n wrap(fn, next).apply(null, input)\n } else {\n done.apply(null, [null].concat(input))\n }\n }\n }\n\n // Add `fn` to the list.\n function use(fn) {\n if (typeof fn !== 'function') {\n throw new Error('Expected `fn` to be a function, not ' + fn)\n }\n\n fns.push(fn)\n\n return middleware\n }\n}\n","'use strict'\n\nvar slice = [].slice\n\nmodule.exports = wrap\n\n// Wrap `fn`.\n// Can be sync or async; return a promise, receive a completion handler, return\n// new values and errors.\nfunction wrap(fn, callback) {\n var invoked\n\n return wrapped\n\n function wrapped() {\n var params = slice.call(arguments, 0)\n var callback = fn.length > params.length\n var result\n\n if (callback) {\n params.push(done)\n }\n\n try {\n result = fn.apply(null, params)\n } catch (error) {\n // Well, this is quite the pickle.\n // `fn` received a callback and invoked it (thus continuing the pipeline),\n // but later also threw an error.\n // We’re not about to restart the pipeline again, so the only thing left\n // to do is to throw the thing instead.\n if (callback && invoked) {\n throw error\n }\n\n return done(error)\n }\n\n if (!callback) {\n if (result && 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 // Invoke `next`, only once.\n function done() {\n if (!invoked) {\n invoked = true\n\n callback.apply(null, arguments)\n }\n }\n\n // Invoke `done` with one value.\n // Tracks if an error is passed, too.\n function then(value) {\n done(null, value)\n }\n}\n","'use strict'\n\nvar bail = require('bail')\nvar buffer = require('is-buffer')\nvar extend = require('extend')\nvar plain = require('is-plain-obj')\nvar trough = require('trough')\nvar vfile = require('vfile')\n\n// Expose a frozen processor.\nmodule.exports = unified().freeze()\n\nvar slice = [].slice\nvar own = {}.hasOwnProperty\n\n// Process pipeline.\nvar pipeline = trough()\n .use(pipelineParse)\n .use(pipelineRun)\n .use(pipelineStringify)\n\nfunction pipelineParse(p, ctx) {\n ctx.tree = p.parse(ctx.file)\n}\n\nfunction pipelineRun(p, ctx, next) {\n p.run(ctx.tree, ctx.file, done)\n\n function done(error, tree, file) {\n if (error) {\n next(error)\n } else {\n ctx.tree = tree\n ctx.file = file\n next()\n }\n }\n}\n\nfunction pipelineStringify(p, ctx) {\n var result = p.stringify(ctx.tree, ctx.file)\n\n if (result === undefined || result === null) {\n // Empty.\n } else if (typeof result === 'string' || buffer(result)) {\n if ('value' in ctx.file) {\n ctx.file.value = result\n }\n\n ctx.file.contents = result\n } else {\n ctx.file.result = result\n }\n}\n\n// Function to create the first processor.\nfunction unified() {\n var attachers = []\n var transformers = trough()\n var namespace = {}\n var freezeIndex = -1\n var frozen\n\n // Data management.\n processor.data = data\n\n // Lock.\n processor.freeze = freeze\n\n // Plugins.\n processor.attachers = attachers\n processor.use = use\n\n // API.\n processor.parse = parse\n processor.stringify = stringify\n processor.run = run\n processor.runSync = runSync\n processor.process = process\n processor.processSync = processSync\n\n // Expose.\n return processor\n\n // Create a new processor based on the processor in the current scope.\n function processor() {\n var destination = unified()\n var index = -1\n\n while (++index < attachers.length) {\n destination.use.apply(null, attachers[index])\n }\n\n destination.data(extend(true, {}, namespace))\n\n return destination\n }\n\n // Freeze: used to signal a processor that has finished configuration.\n //\n // For example, take unified itself: it’s frozen.\n // Plugins should not be added to it.\n // Rather, it should be extended, by invoking it, before modifying it.\n //\n // In essence, always invoke this when exporting a processor.\n function freeze() {\n var values\n var transformer\n\n if (frozen) {\n return processor\n }\n\n while (++freezeIndex < attachers.length) {\n values = attachers[freezeIndex]\n\n if (values[1] === false) {\n continue\n }\n\n if (values[1] === true) {\n values[1] = undefined\n }\n\n transformer = values[0].apply(processor, values.slice(1))\n\n if (typeof transformer === 'function') {\n transformers.use(transformer)\n }\n }\n\n frozen = true\n freezeIndex = Infinity\n\n return processor\n }\n\n // Data management.\n // Getter / setter for processor-specific informtion.\n function data(key, value) {\n if (typeof key === 'string') {\n // Set `key`.\n if (arguments.length === 2) {\n assertUnfrozen('data', frozen)\n namespace[key] = value\n return processor\n }\n\n // Get `key`.\n return (own.call(namespace, key) && namespace[key]) || null\n }\n\n // Set space.\n if (key) {\n assertUnfrozen('data', frozen)\n namespace = key\n return processor\n }\n\n // Get space.\n return namespace\n }\n\n // Plugin management.\n //\n // Pass it:\n // * an attacher and options,\n // * a preset,\n // * a list of presets, attachers, and arguments (list of attachers and\n // options).\n function use(value) {\n var settings\n\n assertUnfrozen('use', frozen)\n\n if (value === null || value === undefined) {\n // Empty.\n } else if (typeof value === 'function') {\n addPlugin.apply(null, arguments)\n } else if (typeof value === 'object') {\n if ('length' in value) {\n addList(value)\n } else {\n addPreset(value)\n }\n } else {\n throw new Error('Expected usable value, not `' + value + '`')\n }\n\n if (settings) {\n namespace.settings = extend(namespace.settings || {}, settings)\n }\n\n return processor\n\n function addPreset(result) {\n addList(result.plugins)\n\n if (result.settings) {\n settings = extend(settings || {}, result.settings)\n }\n }\n\n function add(value) {\n if (typeof value === 'function') {\n addPlugin(value)\n } else if (typeof value === 'object') {\n if ('length' in value) {\n addPlugin.apply(null, value)\n } else {\n addPreset(value)\n }\n } else {\n throw new Error('Expected usable value, not `' + value + '`')\n }\n }\n\n function addList(plugins) {\n var index = -1\n\n if (plugins === null || plugins === undefined) {\n // Empty.\n } else if (typeof plugins === 'object' && 'length' in plugins) {\n while (++index < plugins.length) {\n add(plugins[index])\n }\n } else {\n throw new Error('Expected a list of plugins, not `' + plugins + '`')\n }\n }\n\n function addPlugin(plugin, value) {\n var entry = find(plugin)\n\n if (entry) {\n if (plain(entry[1]) && plain(value)) {\n value = extend(true, entry[1], value)\n }\n\n entry[1] = value\n } else {\n attachers.push(slice.call(arguments))\n }\n }\n }\n\n function find(plugin) {\n var index = -1\n\n while (++index < attachers.length) {\n if (attachers[index][0] === plugin) {\n return attachers[index]\n }\n }\n }\n\n // Parse a file (in string or vfile representation) into a unist node using\n // the `Parser` on the processor.\n function parse(doc) {\n var file = vfile(doc)\n var Parser\n\n freeze()\n Parser = processor.Parser\n assertParser('parse', Parser)\n\n if (newable(Parser, 'parse')) {\n return new Parser(String(file), file).parse()\n }\n\n return Parser(String(file), file) // eslint-disable-line new-cap\n }\n\n // Run transforms on a unist node representation of a file (in string or\n // vfile representation), async.\n function run(node, file, cb) {\n assertNode(node)\n freeze()\n\n if (!cb && typeof file === 'function') {\n cb = file\n file = null\n }\n\n if (!cb) {\n return new Promise(executor)\n }\n\n executor(null, cb)\n\n function executor(resolve, reject) {\n transformers.run(node, vfile(file), done)\n\n function done(error, tree, file) {\n tree = tree || node\n if (error) {\n reject(error)\n } else if (resolve) {\n resolve(tree)\n } else {\n cb(null, tree, file)\n }\n }\n }\n }\n\n // Run transforms on a unist node representation of a file (in string or\n // vfile representation), sync.\n function runSync(node, file) {\n var result\n var complete\n\n run(node, file, done)\n\n assertDone('runSync', 'run', complete)\n\n return result\n\n function done(error, tree) {\n complete = true\n result = tree\n bail(error)\n }\n }\n\n // Stringify a unist node representation of a file (in string or vfile\n // representation) into a string using the `Compiler` on the processor.\n function stringify(node, doc) {\n var file = vfile(doc)\n var Compiler\n\n freeze()\n Compiler = processor.Compiler\n assertCompiler('stringify', Compiler)\n assertNode(node)\n\n if (newable(Compiler, 'compile')) {\n return new Compiler(node, file).compile()\n }\n\n return Compiler(node, file) // eslint-disable-line new-cap\n }\n\n // Parse a file (in string or vfile representation) into a unist node using\n // the `Parser` on the processor, then run transforms on that node, and\n // compile the resulting node using the `Compiler` on the processor, and\n // store that result on the vfile.\n function process(doc, cb) {\n freeze()\n assertParser('process', processor.Parser)\n assertCompiler('process', processor.Compiler)\n\n if (!cb) {\n return new Promise(executor)\n }\n\n executor(null, cb)\n\n function executor(resolve, reject) {\n var file = vfile(doc)\n\n pipeline.run(processor, {file: file}, done)\n\n function done(error) {\n if (error) {\n reject(error)\n } else if (resolve) {\n resolve(file)\n } else {\n cb(null, file)\n }\n }\n }\n }\n\n // Process the given document (in string or vfile representation), sync.\n function processSync(doc) {\n var file\n var complete\n\n freeze()\n assertParser('processSync', processor.Parser)\n assertCompiler('processSync', processor.Compiler)\n file = vfile(doc)\n\n process(file, done)\n\n assertDone('processSync', 'process', complete)\n\n return file\n\n function done(error) {\n complete = true\n bail(error)\n }\n }\n}\n\n// Check if `value` is a constructor.\nfunction newable(value, name) {\n return (\n typeof value === 'function' &&\n value.prototype &&\n // A function with keys in its prototype is probably a constructor.\n // Classes’ prototype methods are not enumerable, so we check if some value\n // exists in the prototype.\n (keys(value.prototype) || name in value.prototype)\n )\n}\n\n// Check if `value` is an object with keys.\nfunction keys(value) {\n var key\n for (key in value) {\n return true\n }\n\n return false\n}\n\n// Assert a parser is available.\nfunction assertParser(name, Parser) {\n if (typeof Parser !== 'function') {\n throw new Error('Cannot `' + name + '` without `Parser`')\n }\n}\n\n// Assert a compiler is available.\nfunction assertCompiler(name, Compiler) {\n if (typeof Compiler !== 'function') {\n throw new Error('Cannot `' + name + '` without `Compiler`')\n }\n}\n\n// Assert the processor is not frozen.\nfunction assertUnfrozen(name, frozen) {\n if (frozen) {\n throw new Error(\n 'Cannot invoke `' +\n name +\n '` on a frozen processor.\\nCreate a new processor first, by invoking it: use `processor()` instead of `processor`.'\n )\n }\n}\n\n// Assert `node` is a unist node.\nfunction assertNode(node) {\n if (!node || typeof node.type !== 'string') {\n throw new Error('Expected node, got `' + node + '`')\n }\n}\n\n// Assert that `complete` is `true`.\nfunction assertDone(name, asyncName, complete) {\n if (!complete) {\n throw new Error(\n '`' + name + '` finished async. Use `' + asyncName + '` instead'\n )\n }\n}\n","'use strict'\n\nvar own = {}.hasOwnProperty\n\nmodule.exports = stringify\n\nfunction stringify(value) {\n // Nothing.\n if (!value || typeof value !== 'object') {\n return ''\n }\n\n // Node.\n if (own.call(value, 'position') || own.call(value, 'type')) {\n return position(value.position)\n }\n\n // Position.\n if (own.call(value, 'start') || own.call(value, 'end')) {\n return position(value)\n }\n\n // Point.\n if (own.call(value, 'line') || own.call(value, 'column')) {\n return point(value)\n }\n\n // ?\n return ''\n}\n\nfunction point(point) {\n if (!point || typeof point !== 'object') {\n point = {}\n }\n\n return index(point.line) + ':' + index(point.column)\n}\n\nfunction position(pos) {\n if (!pos || typeof pos !== 'object') {\n pos = {}\n }\n\n return point(pos.start) + '-' + point(pos.end)\n}\n\nfunction index(value) {\n return value && typeof value === 'number' ? value : 1\n}\n","'use strict'\n\nvar stringify = require('unist-util-stringify-position')\n\nmodule.exports = VMessage\n\n// Inherit from `Error#`.\nfunction VMessagePrototype() {}\nVMessagePrototype.prototype = Error.prototype\nVMessage.prototype = new VMessagePrototype()\n\n// Message properties.\nvar proto = VMessage.prototype\n\nproto.file = ''\nproto.name = ''\nproto.reason = ''\nproto.message = ''\nproto.stack = ''\nproto.fatal = null\nproto.column = null\nproto.line = null\n\n// Construct a new VMessage.\n//\n// Note: We cannot invoke `Error` on the created context, as that adds readonly\n// `line` and `column` attributes on Safari 9, thus throwing and failing the\n// data.\nfunction VMessage(reason, position, origin) {\n var parts\n var range\n var location\n\n if (typeof position === 'string') {\n origin = position\n position = null\n }\n\n parts = parseOrigin(origin)\n range = stringify(position) || '1:1'\n\n location = {\n start: {line: null, column: null},\n end: {line: null, column: null}\n }\n\n // Node.\n if (position && position.position) {\n position = position.position\n }\n\n if (position) {\n // Position.\n if (position.start) {\n location = position\n position = position.start\n } else {\n // Point.\n location.start = position\n }\n }\n\n if (reason.stack) {\n this.stack = reason.stack\n reason = reason.message\n }\n\n this.message = reason\n this.name = range\n this.reason = reason\n this.line = position ? position.line : null\n this.column = position ? position.column : null\n this.location = location\n this.source = parts[0]\n this.ruleId = parts[1]\n}\n\nfunction parseOrigin(origin) {\n var result = [null, null]\n var index\n\n if (typeof origin === 'string') {\n index = origin.indexOf(':')\n\n if (index === -1) {\n result[1] = origin\n } else {\n result[0] = origin.slice(0, index)\n result[1] = origin.slice(index + 1)\n }\n }\n\n return result\n}\n","'use strict'\n\nmodule.exports = require('./lib')\n","'use strict'\n\nvar p = require('./minpath')\nvar proc = require('./minproc')\nvar buffer = require('is-buffer')\n\nmodule.exports = VFile\n\nvar own = {}.hasOwnProperty\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.\nvar order = ['history', 'path', 'basename', 'stem', 'extname', 'dirname']\n\nVFile.prototype.toString = toString\n\n// Access full path (`~/index.min.js`).\nObject.defineProperty(VFile.prototype, 'path', {get: getPath, set: setPath})\n\n// Access parent path (`~`).\nObject.defineProperty(VFile.prototype, 'dirname', {\n get: getDirname,\n set: setDirname\n})\n\n// Access basename (`index.min.js`).\nObject.defineProperty(VFile.prototype, 'basename', {\n get: getBasename,\n set: setBasename\n})\n\n// Access extname (`.js`).\nObject.defineProperty(VFile.prototype, 'extname', {\n get: getExtname,\n set: setExtname\n})\n\n// Access stem (`index.min`).\nObject.defineProperty(VFile.prototype, 'stem', {get: getStem, set: setStem})\n\n// Construct a new file.\nfunction VFile(options) {\n var prop\n var index\n\n if (!options) {\n options = {}\n } else if (typeof options === 'string' || buffer(options)) {\n options = {contents: options}\n } else if ('message' in options && 'messages' in options) {\n return options\n }\n\n if (!(this instanceof VFile)) {\n return new VFile(options)\n }\n\n this.data = {}\n this.messages = []\n this.history = []\n this.cwd = proc.cwd()\n\n // Set path related properties in the correct order.\n index = -1\n\n while (++index < order.length) {\n prop = order[index]\n\n if (own.call(options, prop)) {\n this[prop] = options[prop]\n }\n }\n\n // Set non-path related properties.\n for (prop in options) {\n if (order.indexOf(prop) < 0) {\n this[prop] = options[prop]\n }\n }\n}\n\nfunction getPath() {\n return this.history[this.history.length - 1]\n}\n\nfunction setPath(path) {\n assertNonEmpty(path, 'path')\n\n if (this.path !== path) {\n this.history.push(path)\n }\n}\n\nfunction getDirname() {\n return typeof this.path === 'string' ? p.dirname(this.path) : undefined\n}\n\nfunction setDirname(dirname) {\n assertPath(this.path, 'dirname')\n this.path = p.join(dirname || '', this.basename)\n}\n\nfunction getBasename() {\n return typeof this.path === 'string' ? p.basename(this.path) : undefined\n}\n\nfunction setBasename(basename) {\n assertNonEmpty(basename, 'basename')\n assertPart(basename, 'basename')\n this.path = p.join(this.dirname || '', basename)\n}\n\nfunction getExtname() {\n return typeof this.path === 'string' ? p.extname(this.path) : undefined\n}\n\nfunction setExtname(extname) {\n assertPart(extname, 'extname')\n assertPath(this.path, 'extname')\n\n if (extname) {\n if (extname.charCodeAt(0) !== 46 /* `.` */) {\n throw new Error('`extname` must start with `.`')\n }\n\n if (extname.indexOf('.', 1) > -1) {\n throw new Error('`extname` cannot contain multiple dots')\n }\n }\n\n this.path = p.join(this.dirname, this.stem + (extname || ''))\n}\n\nfunction getStem() {\n return typeof this.path === 'string'\n ? p.basename(this.path, this.extname)\n : undefined\n}\n\nfunction setStem(stem) {\n assertNonEmpty(stem, 'stem')\n assertPart(stem, 'stem')\n this.path = p.join(this.dirname || '', stem + (this.extname || ''))\n}\n\n// Get the value of the file.\nfunction toString(encoding) {\n return (this.contents || '').toString(encoding)\n}\n\n// Assert that `part` is not a path (i.e., does not contain `p.sep`).\nfunction assertPart(part, name) {\n if (part && part.indexOf(p.sep) > -1) {\n throw new Error(\n '`' + name + '` cannot be a path: did not expect `' + p.sep + '`'\n )\n }\n}\n\n// Assert that `part` is not empty.\nfunction assertNonEmpty(part, name) {\n if (!part) {\n throw new Error('`' + name + '` cannot be empty')\n }\n}\n\n// Assert `path` exists.\nfunction assertPath(path, name) {\n if (!path) {\n throw new Error('Setting `' + name + '` requires `path` to be set too')\n }\n}\n","'use strict'\n\nvar VMessage = require('vfile-message')\nvar VFile = require('./core.js')\n\nmodule.exports = VFile\n\nVFile.prototype.message = message\nVFile.prototype.info = info\nVFile.prototype.fail = fail\n\n// Create a message with `reason` at `position`.\n// When an error is passed in as `reason`, copies the stack.\nfunction message(reason, position, origin) {\n var message = new VMessage(reason, position, origin)\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// Fail: creates a vmessage, associates it with the file, and throws it.\nfunction fail() {\n var message = this.message.apply(this, arguments)\n\n message.fatal = true\n\n throw message\n}\n\n// Info: creates a vmessage, associates it with the file, and marks the fatality\n// as null.\nfunction info() {\n var message = this.message.apply(this, arguments)\n\n message.fatal = null\n\n return message\n}\n","'use strict'\n\n// A derivative work based on:\n// .\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// .\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\nexports.basename = basename\nexports.dirname = dirname\nexports.extname = extname\nexports.join = join\nexports.sep = '/'\n\nfunction basename(path, ext) {\n var start = 0\n var end = -1\n var index\n var firstNonSlashEnd\n var seenNonSlash\n var extIndex\n\n if (ext !== undefined && typeof ext !== 'string') {\n throw new TypeError('\"ext\" argument must be a string')\n }\n\n assertPath(path)\n index = path.length\n\n if (ext === undefined || !ext.length || ext.length > path.length) {\n while (index--) {\n if (path.charCodeAt(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 (ext === path) {\n return ''\n }\n\n firstNonSlashEnd = -1\n extIndex = ext.length - 1\n\n while (index--) {\n if (path.charCodeAt(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 (extIndex > -1) {\n // Try to match the explicit extension.\n if (path.charCodeAt(index) === ext.charCodeAt(extIndex--)) {\n if (extIndex < 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 extIndex = -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\nfunction dirname(path) {\n var end\n var unmatchedSlash\n var index\n\n assertPath(path)\n\n if (!path.length) {\n return '.'\n }\n\n end = -1\n index = path.length\n\n // Prefix `--` is important to not run on `0`.\n while (--index) {\n if (path.charCodeAt(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.charCodeAt(0) === 47 /* `/` */\n ? '/'\n : '.'\n : end === 1 && path.charCodeAt(0) === 47 /* `/` */\n ? '//'\n : path.slice(0, end)\n}\n\nfunction extname(path) {\n var startDot = -1\n var startPart = 0\n var end = -1\n // Track the state of characters (if any) we see before our first dot and\n // after any path separator we find.\n var preDotState = 0\n var unmatchedSlash\n var code\n var index\n\n assertPath(path)\n\n index = path.length\n\n while (index--) {\n code = path.charCodeAt(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\nfunction join() {\n var index = -1\n var joined\n\n while (++index < arguments.length) {\n assertPath(arguments[index])\n\n if (arguments[index]) {\n joined =\n joined === undefined\n ? arguments[index]\n : joined + '/' + arguments[index]\n }\n }\n\n return joined === undefined ? '.' : normalize(joined)\n}\n\n// Note: `normalize` is not exposed as `path.normalize`, so some code is\n// manually removed from it.\nfunction normalize(path) {\n var absolute\n var value\n\n assertPath(path)\n\n absolute = path.charCodeAt(0) === 47 /* `/` */\n\n // Normalize the path according to POSIX rules.\n value = normalizeString(path, !absolute)\n\n if (!value.length && !absolute) {\n value = '.'\n }\n\n if (value.length && path.charCodeAt(path.length - 1) === 47 /* / */) {\n value += '/'\n }\n\n return absolute ? '/' + value : value\n}\n\n// Resolve `.` and `..` elements in a path with directory names.\nfunction normalizeString(path, allowAboveRoot) {\n var result = ''\n var lastSegmentLength = 0\n var lastSlash = -1\n var dots = 0\n var index = -1\n var code\n var lastSlashIndex\n\n while (++index <= path.length) {\n if (index < path.length) {\n code = path.charCodeAt(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.charCodeAt(result.length - 1) !== 46 /* `.` */ ||\n result.charCodeAt(result.length - 2) !== 46 /* `.` */\n ) {\n if (result.length > 2) {\n lastSlashIndex = result.lastIndexOf('/')\n\n /* istanbul ignore else - No clue how to cover it. */\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) {\n result = ''\n lastSegmentLength = 0\n lastSlash = index\n dots = 0\n continue\n }\n }\n\n if (allowAboveRoot) {\n result = result.length ? result + '/..' : '..'\n lastSegmentLength = 2\n }\n } else {\n if (result.length) {\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\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","'use strict'\n\n// Somewhat based on:\n// .\n// But I don’t think one tiny line of code can be copyrighted. 😅\nexports.cwd = cwd\n\nfunction cwd() {\n return '/'\n}\n","/*!\n * repeat-string \n *\n * Copyright (c) 2014-2015, Jon Schlinkert.\n * Licensed under the MIT License.\n */\n\n'use strict';\n\n/**\n * Results cache\n */\n\nvar res = '';\nvar cache;\n\n/**\n * Expose `repeat`\n */\n\nmodule.exports = repeat;\n\n/**\n * Repeat the given `string` the specified `number`\n * of times.\n *\n * **Example:**\n *\n * ```js\n * var repeat = require('repeat-string');\n * repeat('A', 5);\n * //=> AAAAA\n * ```\n *\n * @param {String} `string` The string to repeat\n * @param {Number} `number` The number of times to repeat the string\n * @return {String} Repeated string\n * @api public\n */\n\nfunction repeat(str, num) {\n if (typeof str !== 'string') {\n throw new TypeError('expected a string');\n }\n\n // cover common, quick use cases\n if (num === 1) return str;\n if (num === 2) return str + str;\n\n var max = str.length * num;\n if (cache !== str || typeof cache === 'undefined') {\n cache = str;\n res = '';\n } else if (res.length >= max) {\n return res.substr(0, max);\n }\n\n while (max > res.length && num > 1) {\n if (num & 1) {\n res += str;\n }\n\n num >>= 1;\n str += str;\n }\n\n res += str;\n res = res.substr(0, max);\n return res;\n}\n","/**\n * @license React\n * scheduler.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';function f(a,b){var c=a.length;a.push(b);a:for(;0>>1,e=a[d];if(0>>1;dg(C,c))ng(x,C)?(a[d]=x,a[n]=c,d=n):(a[d]=C,a[m]=c,d=m);else if(ng(x,c))a[d]=x,a[n]=c,d=n;else break a}}return b}\nfunction g(a,b){var c=a.sortIndex-b.sortIndex;return 0!==c?c:a.id-b.id}if(\"object\"===typeof performance&&\"function\"===typeof performance.now){var l=performance;exports.unstable_now=function(){return l.now()}}else{var p=Date,q=p.now();exports.unstable_now=function(){return p.now()-q}}var r=[],t=[],u=1,v=null,y=3,z=!1,A=!1,B=!1,D=\"function\"===typeof setTimeout?setTimeout:null,E=\"function\"===typeof clearTimeout?clearTimeout:null,F=\"undefined\"!==typeof setImmediate?setImmediate:null;\n\"undefined\"!==typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function G(a){for(var b=h(t);null!==b;){if(null===b.callback)k(t);else if(b.startTime<=a)k(t),b.sortIndex=b.expirationTime,f(r,b);else break;b=h(t)}}function H(a){B=!1;G(a);if(!A)if(null!==h(r))A=!0,I(J);else{var b=h(t);null!==b&&K(H,b.startTime-a)}}\nfunction J(a,b){A=!1;B&&(B=!1,E(L),L=-1);z=!0;var c=y;try{G(b);for(v=h(r);null!==v&&(!(v.expirationTime>b)||a&&!M());){var d=v.callback;if(\"function\"===typeof d){v.callback=null;y=v.priorityLevel;var e=d(v.expirationTime<=b);b=exports.unstable_now();\"function\"===typeof e?v.callback=e:v===h(r)&&k(r);G(b)}else k(r);v=h(r)}if(null!==v)var w=!0;else{var m=h(t);null!==m&&K(H,m.startTime-b);w=!1}return w}finally{v=null,y=c,z=!1}}var N=!1,O=null,L=-1,P=5,Q=-1;\nfunction M(){return exports.unstable_now()-Qa||125d?(a.sortIndex=c,f(t,a),null===h(r)&&a===h(t)&&(B?(E(L),L=-1):B=!0,K(H,c-d))):(a.sortIndex=e,f(r,a),A||z||(A=!0,I(J)));return a};\nexports.unstable_shouldYield=M;exports.unstable_wrapCallback=function(a){var b=y;return function(){var c=y;y=b;try{return a.apply(this,arguments)}finally{y=c}}};\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/scheduler.production.min.js');\n} else {\n module.exports = require('./cjs/scheduler.development.js');\n}\n","//\n\nmodule.exports = function shallowEqual(objA, objB, compare, compareContext) {\n var ret = compare ? compare.call(compareContext, objA, objB) : void 0;\n\n if (ret !== void 0) {\n return !!ret;\n }\n\n if (objA === objB) {\n return true;\n }\n\n if (typeof objA !== \"object\" || !objA || typeof objB !== \"object\" || !objB) {\n return false;\n }\n\n var keysA = Object.keys(objA);\n var keysB = Object.keys(objB);\n\n if (keysA.length !== keysB.length) {\n return false;\n }\n\n var bHasOwnProperty = Object.prototype.hasOwnProperty.bind(objB);\n\n // Test for A's keys different from B.\n for (var idx = 0; idx < keysA.length; idx++) {\n var key = keysA[idx];\n\n if (!bHasOwnProperty(key)) {\n return false;\n }\n\n var valueA = objA[key];\n var valueB = objB[key];\n\n ret = compare ? compare.call(compareContext, valueA, valueB, key) : void 0;\n\n if (ret === false || (ret === void 0 && valueA !== valueB)) {\n return false;\n }\n }\n\n return true;\n};\n","import type { Declaration } from 'inline-style-parser';\nimport parse from 'inline-style-parser';\n\nexport { Declaration };\n\ninterface StyleObject {\n [name: string]: string;\n}\n\ntype Iterator = (\n property: string,\n value: string,\n declaration: Declaration,\n) => void;\n\n/**\n * Parses inline style to object.\n *\n * @param style - Inline style.\n * @param iterator - Iterator.\n * @returns - Style object or null.\n *\n * @example Parsing inline style to object:\n *\n * ```js\n * import parse from 'style-to-object';\n * parse('line-height: 42;'); // { 'line-height': '42' }\n * ```\n */\nexport default function StyleToObject(\n style: string,\n iterator?: Iterator,\n): StyleObject | null {\n let styleObject: StyleObject | null = null;\n\n if (!style || typeof style !== 'string') {\n return styleObject;\n }\n\n const declarations = parse(style);\n const hasIterator = typeof iterator === 'function';\n\n declarations.forEach((declaration) => {\n if (declaration.type !== 'declaration') {\n return;\n }\n\n const { property, value } = declaration;\n\n if (hasIterator) {\n iterator(property, value, declaration);\n } else if (value) {\n styleObject = styleObject || {};\n styleObject[property] = value;\n }\n });\n\n return styleObject;\n}\n","function _arrayLikeToArray(r, a) {\n (null == a || a > r.length) && (a = r.length);\n for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];\n return n;\n}\nmodule.exports = _arrayLikeToArray, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _arrayWithHoles(r) {\n if (Array.isArray(r)) return r;\n}\nmodule.exports = _arrayWithHoles, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var arrayLikeToArray = require(\"./arrayLikeToArray.js\");\nfunction _arrayWithoutHoles(r) {\n if (Array.isArray(r)) return arrayLikeToArray(r);\n}\nmodule.exports = _arrayWithoutHoles, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var toPropertyKey = require(\"./toPropertyKey.js\");\nfunction _defineProperty(e, r, t) {\n return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {\n value: t,\n enumerable: !0,\n configurable: !0,\n writable: !0\n }) : e[r] = t, e;\n}\nmodule.exports = _defineProperty, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _extends() {\n return module.exports = _extends = Object.assign ? Object.assign.bind() : function (n) {\n for (var e = 1; e < arguments.length; e++) {\n var t = arguments[e];\n for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);\n }\n return n;\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports, _extends.apply(null, arguments);\n}\nmodule.exports = _extends, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _interopRequireDefault(e) {\n return e && e.__esModule ? e : {\n \"default\": e\n };\n}\nmodule.exports = _interopRequireDefault, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var _typeof = require(\"./typeof.js\")[\"default\"];\nfunction _getRequireWildcardCache(e) {\n if (\"function\" != typeof WeakMap) return null;\n var r = new WeakMap(),\n t = new WeakMap();\n return (_getRequireWildcardCache = function _getRequireWildcardCache(e) {\n return e ? t : r;\n })(e);\n}\nfunction _interopRequireWildcard(e, r) {\n if (!r && e && e.__esModule) return e;\n if (null === e || \"object\" != _typeof(e) && \"function\" != typeof e) return {\n \"default\": e\n };\n var t = _getRequireWildcardCache(r);\n if (t && t.has(e)) return t.get(e);\n var n = {\n __proto__: null\n },\n a = Object.defineProperty && Object.getOwnPropertyDescriptor;\n for (var u in e) if (\"default\" !== u && {}.hasOwnProperty.call(e, u)) {\n var i = a ? Object.getOwnPropertyDescriptor(e, u) : null;\n i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u];\n }\n return n[\"default\"] = e, t && t.set(e, n), n;\n}\nmodule.exports = _interopRequireWildcard, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _iterableToArray(r) {\n if (\"undefined\" != typeof Symbol && null != r[Symbol.iterator] || null != r[\"@@iterator\"]) return Array.from(r);\n}\nmodule.exports = _iterableToArray, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _iterableToArrayLimit(r, l) {\n var t = null == r ? null : \"undefined\" != typeof Symbol && r[Symbol.iterator] || r[\"@@iterator\"];\n if (null != t) {\n var e,\n n,\n i,\n u,\n a = [],\n f = !0,\n o = !1;\n try {\n if (i = (t = t.call(r)).next, 0 === l) {\n if (Object(t) !== t) return;\n f = !1;\n } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);\n } catch (r) {\n o = !0, n = r;\n } finally {\n try {\n if (!f && null != t[\"return\"] && (u = t[\"return\"](), Object(u) !== u)) return;\n } finally {\n if (o) throw n;\n }\n }\n return a;\n }\n}\nmodule.exports = _iterableToArrayLimit, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\nmodule.exports = _nonIterableRest, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\nmodule.exports = _nonIterableSpread, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _objectDestructuringEmpty(t) {\n if (null == t) throw new TypeError(\"Cannot destructure \" + t);\n}\nmodule.exports = _objectDestructuringEmpty, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var defineProperty = require(\"./defineProperty.js\");\nfunction ownKeys(e, r) {\n var t = Object.keys(e);\n if (Object.getOwnPropertySymbols) {\n var o = Object.getOwnPropertySymbols(e);\n r && (o = o.filter(function (r) {\n return Object.getOwnPropertyDescriptor(e, r).enumerable;\n })), t.push.apply(t, o);\n }\n return t;\n}\nfunction _objectSpread2(e) {\n for (var r = 1; r < arguments.length; r++) {\n var t = null != arguments[r] ? arguments[r] : {};\n r % 2 ? ownKeys(Object(t), !0).forEach(function (r) {\n defineProperty(e, r, t[r]);\n }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) {\n Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));\n });\n }\n return e;\n}\nmodule.exports = _objectSpread2, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var objectWithoutPropertiesLoose = require(\"./objectWithoutPropertiesLoose.js\");\nfunction _objectWithoutProperties(e, t) {\n if (null == e) return {};\n var o,\n r,\n i = objectWithoutPropertiesLoose(e, t);\n if (Object.getOwnPropertySymbols) {\n var s = Object.getOwnPropertySymbols(e);\n for (r = 0; r < s.length; r++) o = s[r], t.includes(o) || {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]);\n }\n return i;\n}\nmodule.exports = _objectWithoutProperties, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _objectWithoutPropertiesLoose(r, e) {\n if (null == r) return {};\n var t = {};\n for (var n in r) if ({}.hasOwnProperty.call(r, n)) {\n if (e.includes(n)) continue;\n t[n] = r[n];\n }\n return t;\n}\nmodule.exports = _objectWithoutPropertiesLoose, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var arrayWithHoles = require(\"./arrayWithHoles.js\");\nvar iterableToArrayLimit = require(\"./iterableToArrayLimit.js\");\nvar unsupportedIterableToArray = require(\"./unsupportedIterableToArray.js\");\nvar nonIterableRest = require(\"./nonIterableRest.js\");\nfunction _slicedToArray(r, e) {\n return arrayWithHoles(r) || iterableToArrayLimit(r, e) || unsupportedIterableToArray(r, e) || nonIterableRest();\n}\nmodule.exports = _slicedToArray, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var arrayWithoutHoles = require(\"./arrayWithoutHoles.js\");\nvar iterableToArray = require(\"./iterableToArray.js\");\nvar unsupportedIterableToArray = require(\"./unsupportedIterableToArray.js\");\nvar nonIterableSpread = require(\"./nonIterableSpread.js\");\nfunction _toConsumableArray(r) {\n return arrayWithoutHoles(r) || iterableToArray(r) || unsupportedIterableToArray(r) || nonIterableSpread();\n}\nmodule.exports = _toConsumableArray, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var _typeof = require(\"./typeof.js\")[\"default\"];\nfunction toPrimitive(t, r) {\n if (\"object\" != _typeof(t) || !t) return t;\n var e = t[Symbol.toPrimitive];\n if (void 0 !== e) {\n var i = e.call(t, r || \"default\");\n if (\"object\" != _typeof(i)) return i;\n throw new TypeError(\"@@toPrimitive must return a primitive value.\");\n }\n return (\"string\" === r ? String : Number)(t);\n}\nmodule.exports = toPrimitive, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var _typeof = require(\"./typeof.js\")[\"default\"];\nvar toPrimitive = require(\"./toPrimitive.js\");\nfunction toPropertyKey(t) {\n var i = toPrimitive(t, \"string\");\n return \"symbol\" == _typeof(i) ? i : i + \"\";\n}\nmodule.exports = toPropertyKey, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _typeof(o) {\n \"@babel/helpers - typeof\";\n\n return module.exports = _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) {\n return typeof o;\n } : function (o) {\n return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o;\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports, _typeof(o);\n}\nmodule.exports = _typeof, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var arrayLikeToArray = require(\"./arrayLikeToArray.js\");\nfunction _unsupportedIterableToArray(r, a) {\n if (r) {\n if (\"string\" == typeof r) return arrayLikeToArray(r, a);\n var t = {}.toString.call(r).slice(8, -1);\n return \"Object\" === t && r.constructor && (t = r.constructor.name), \"Map\" === t || \"Set\" === t ? Array.from(r) : \"Arguments\" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? arrayLikeToArray(r, a) : void 0;\n }\n}\nmodule.exports = _unsupportedIterableToArray, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","export default function shallowEqual(\n actual: object,\n expected: T,\n): actual is T {\n const keys = Object.keys(expected) as (keyof T)[];\n\n for (const key of keys) {\n if (\n // @ts-expect-error maybe we should check whether key exists first\n actual[key] !== expected[key]\n ) {\n return false;\n }\n }\n\n return true;\n}\n","const warnings = new Set();\n\nexport default function deprecationWarning(\n oldName: string,\n newName: string,\n prefix: string = \"\",\n) {\n if (warnings.has(oldName)) return;\n warnings.add(oldName);\n\n const { internal, trace } = captureShortStackTrace(1, 2);\n if (internal) {\n // If usage comes from an internal package, there is no point in warning because\n // 1. The new version of the package will already use the new API\n // 2. When the deprecation will become an error (in a future major version), users\n // will have to update every package anyway.\n return;\n }\n console.warn(\n `${prefix}\\`${oldName}\\` has been deprecated, please migrate to \\`${newName}\\`\\n${trace}`,\n );\n}\n\nfunction captureShortStackTrace(skip: number, length: number) {\n const { stackTraceLimit, prepareStackTrace } = Error;\n let stackTrace: NodeJS.CallSite[];\n // We add 1 to also take into account this function.\n Error.stackTraceLimit = 1 + skip + length;\n Error.prepareStackTrace = function (err, stack) {\n stackTrace = stack;\n };\n // eslint-disable-next-line @typescript-eslint/no-unused-expressions\n new Error().stack;\n Error.stackTraceLimit = stackTraceLimit;\n Error.prepareStackTrace = prepareStackTrace;\n\n if (!stackTrace) return { internal: false, trace: \"\" };\n\n const shortStackTrace = stackTrace.slice(1 + skip, 1 + skip + length);\n return {\n internal: /[\\\\/]@babel[\\\\/]/.test(shortStackTrace[1].getFileName()),\n trace: shortStackTrace.map(frame => ` at ${frame}`).join(\"\\n\"),\n };\n}\n","/*\n * This file is auto-generated! Do not modify it directly.\n * To re-generate run 'make build'\n */\n\n/* eslint-disable no-fallthrough */\n\nimport shallowEqual from \"../../utils/shallowEqual.ts\";\nimport type * as t from \"../../index.ts\";\nimport deprecationWarning from \"../../utils/deprecationWarning.ts\";\n\ntype Opts = Partial<{\n [Prop in keyof Obj]: Obj[Prop] extends t.Node\n ? t.Node\n : Obj[Prop] extends t.Node[]\n ? t.Node[]\n : Obj[Prop];\n}>;\n\nexport function isArrayExpression(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.ArrayExpression {\n if (!node) return false;\n\n if (node.type !== \"ArrayExpression\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isAssignmentExpression(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.AssignmentExpression {\n if (!node) return false;\n\n if (node.type !== \"AssignmentExpression\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isBinaryExpression(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.BinaryExpression {\n if (!node) return false;\n\n if (node.type !== \"BinaryExpression\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isInterpreterDirective(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.InterpreterDirective {\n if (!node) return false;\n\n if (node.type !== \"InterpreterDirective\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isDirective(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.Directive {\n if (!node) return false;\n\n if (node.type !== \"Directive\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isDirectiveLiteral(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.DirectiveLiteral {\n if (!node) return false;\n\n if (node.type !== \"DirectiveLiteral\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isBlockStatement(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.BlockStatement {\n if (!node) return false;\n\n if (node.type !== \"BlockStatement\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isBreakStatement(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.BreakStatement {\n if (!node) return false;\n\n if (node.type !== \"BreakStatement\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isCallExpression(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.CallExpression {\n if (!node) return false;\n\n if (node.type !== \"CallExpression\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isCatchClause(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.CatchClause {\n if (!node) return false;\n\n if (node.type !== \"CatchClause\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isConditionalExpression(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.ConditionalExpression {\n if (!node) return false;\n\n if (node.type !== \"ConditionalExpression\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isContinueStatement(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.ContinueStatement {\n if (!node) return false;\n\n if (node.type !== \"ContinueStatement\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isDebuggerStatement(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.DebuggerStatement {\n if (!node) return false;\n\n if (node.type !== \"DebuggerStatement\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isDoWhileStatement(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.DoWhileStatement {\n if (!node) return false;\n\n if (node.type !== \"DoWhileStatement\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isEmptyStatement(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.EmptyStatement {\n if (!node) return false;\n\n if (node.type !== \"EmptyStatement\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isExpressionStatement(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.ExpressionStatement {\n if (!node) return false;\n\n if (node.type !== \"ExpressionStatement\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isFile(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.File {\n if (!node) return false;\n\n if (node.type !== \"File\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isForInStatement(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.ForInStatement {\n if (!node) return false;\n\n if (node.type !== \"ForInStatement\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isForStatement(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.ForStatement {\n if (!node) return false;\n\n if (node.type !== \"ForStatement\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isFunctionDeclaration(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.FunctionDeclaration {\n if (!node) return false;\n\n if (node.type !== \"FunctionDeclaration\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isFunctionExpression(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.FunctionExpression {\n if (!node) return false;\n\n if (node.type !== \"FunctionExpression\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isIdentifier(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.Identifier {\n if (!node) return false;\n\n if (node.type !== \"Identifier\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isIfStatement(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.IfStatement {\n if (!node) return false;\n\n if (node.type !== \"IfStatement\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isLabeledStatement(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.LabeledStatement {\n if (!node) return false;\n\n if (node.type !== \"LabeledStatement\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isStringLiteral(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.StringLiteral {\n if (!node) return false;\n\n if (node.type !== \"StringLiteral\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isNumericLiteral(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.NumericLiteral {\n if (!node) return false;\n\n if (node.type !== \"NumericLiteral\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isNullLiteral(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.NullLiteral {\n if (!node) return false;\n\n if (node.type !== \"NullLiteral\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isBooleanLiteral(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.BooleanLiteral {\n if (!node) return false;\n\n if (node.type !== \"BooleanLiteral\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isRegExpLiteral(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.RegExpLiteral {\n if (!node) return false;\n\n if (node.type !== \"RegExpLiteral\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isLogicalExpression(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.LogicalExpression {\n if (!node) return false;\n\n if (node.type !== \"LogicalExpression\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isMemberExpression(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.MemberExpression {\n if (!node) return false;\n\n if (node.type !== \"MemberExpression\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isNewExpression(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.NewExpression {\n if (!node) return false;\n\n if (node.type !== \"NewExpression\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isProgram(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.Program {\n if (!node) return false;\n\n if (node.type !== \"Program\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isObjectExpression(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.ObjectExpression {\n if (!node) return false;\n\n if (node.type !== \"ObjectExpression\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isObjectMethod(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.ObjectMethod {\n if (!node) return false;\n\n if (node.type !== \"ObjectMethod\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isObjectProperty(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.ObjectProperty {\n if (!node) return false;\n\n if (node.type !== \"ObjectProperty\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isRestElement(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.RestElement {\n if (!node) return false;\n\n if (node.type !== \"RestElement\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isReturnStatement(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.ReturnStatement {\n if (!node) return false;\n\n if (node.type !== \"ReturnStatement\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isSequenceExpression(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.SequenceExpression {\n if (!node) return false;\n\n if (node.type !== \"SequenceExpression\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isParenthesizedExpression(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.ParenthesizedExpression {\n if (!node) return false;\n\n if (node.type !== \"ParenthesizedExpression\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isSwitchCase(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.SwitchCase {\n if (!node) return false;\n\n if (node.type !== \"SwitchCase\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isSwitchStatement(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.SwitchStatement {\n if (!node) return false;\n\n if (node.type !== \"SwitchStatement\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isThisExpression(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.ThisExpression {\n if (!node) return false;\n\n if (node.type !== \"ThisExpression\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isThrowStatement(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.ThrowStatement {\n if (!node) return false;\n\n if (node.type !== \"ThrowStatement\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isTryStatement(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.TryStatement {\n if (!node) return false;\n\n if (node.type !== \"TryStatement\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isUnaryExpression(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.UnaryExpression {\n if (!node) return false;\n\n if (node.type !== \"UnaryExpression\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isUpdateExpression(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.UpdateExpression {\n if (!node) return false;\n\n if (node.type !== \"UpdateExpression\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isVariableDeclaration(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.VariableDeclaration {\n if (!node) return false;\n\n if (node.type !== \"VariableDeclaration\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isVariableDeclarator(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.VariableDeclarator {\n if (!node) return false;\n\n if (node.type !== \"VariableDeclarator\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isWhileStatement(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.WhileStatement {\n if (!node) return false;\n\n if (node.type !== \"WhileStatement\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isWithStatement(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.WithStatement {\n if (!node) return false;\n\n if (node.type !== \"WithStatement\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isAssignmentPattern(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.AssignmentPattern {\n if (!node) return false;\n\n if (node.type !== \"AssignmentPattern\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isArrayPattern(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.ArrayPattern {\n if (!node) return false;\n\n if (node.type !== \"ArrayPattern\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isArrowFunctionExpression(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.ArrowFunctionExpression {\n if (!node) return false;\n\n if (node.type !== \"ArrowFunctionExpression\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isClassBody(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.ClassBody {\n if (!node) return false;\n\n if (node.type !== \"ClassBody\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isClassExpression(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.ClassExpression {\n if (!node) return false;\n\n if (node.type !== \"ClassExpression\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isClassDeclaration(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.ClassDeclaration {\n if (!node) return false;\n\n if (node.type !== \"ClassDeclaration\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isExportAllDeclaration(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.ExportAllDeclaration {\n if (!node) return false;\n\n if (node.type !== \"ExportAllDeclaration\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isExportDefaultDeclaration(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.ExportDefaultDeclaration {\n if (!node) return false;\n\n if (node.type !== \"ExportDefaultDeclaration\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isExportNamedDeclaration(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.ExportNamedDeclaration {\n if (!node) return false;\n\n if (node.type !== \"ExportNamedDeclaration\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isExportSpecifier(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.ExportSpecifier {\n if (!node) return false;\n\n if (node.type !== \"ExportSpecifier\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isForOfStatement(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.ForOfStatement {\n if (!node) return false;\n\n if (node.type !== \"ForOfStatement\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isImportDeclaration(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.ImportDeclaration {\n if (!node) return false;\n\n if (node.type !== \"ImportDeclaration\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isImportDefaultSpecifier(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.ImportDefaultSpecifier {\n if (!node) return false;\n\n if (node.type !== \"ImportDefaultSpecifier\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isImportNamespaceSpecifier(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.ImportNamespaceSpecifier {\n if (!node) return false;\n\n if (node.type !== \"ImportNamespaceSpecifier\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isImportSpecifier(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.ImportSpecifier {\n if (!node) return false;\n\n if (node.type !== \"ImportSpecifier\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isImportExpression(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.ImportExpression {\n if (!node) return false;\n\n if (node.type !== \"ImportExpression\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isMetaProperty(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.MetaProperty {\n if (!node) return false;\n\n if (node.type !== \"MetaProperty\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isClassMethod(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.ClassMethod {\n if (!node) return false;\n\n if (node.type !== \"ClassMethod\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isObjectPattern(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.ObjectPattern {\n if (!node) return false;\n\n if (node.type !== \"ObjectPattern\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isSpreadElement(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.SpreadElement {\n if (!node) return false;\n\n if (node.type !== \"SpreadElement\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isSuper(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.Super {\n if (!node) return false;\n\n if (node.type !== \"Super\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isTaggedTemplateExpression(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.TaggedTemplateExpression {\n if (!node) return false;\n\n if (node.type !== \"TaggedTemplateExpression\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isTemplateElement(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.TemplateElement {\n if (!node) return false;\n\n if (node.type !== \"TemplateElement\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isTemplateLiteral(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.TemplateLiteral {\n if (!node) return false;\n\n if (node.type !== \"TemplateLiteral\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isYieldExpression(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.YieldExpression {\n if (!node) return false;\n\n if (node.type !== \"YieldExpression\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isAwaitExpression(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.AwaitExpression {\n if (!node) return false;\n\n if (node.type !== \"AwaitExpression\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isImport(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.Import {\n if (!node) return false;\n\n if (node.type !== \"Import\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isBigIntLiteral(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.BigIntLiteral {\n if (!node) return false;\n\n if (node.type !== \"BigIntLiteral\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isExportNamespaceSpecifier(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.ExportNamespaceSpecifier {\n if (!node) return false;\n\n if (node.type !== \"ExportNamespaceSpecifier\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isOptionalMemberExpression(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.OptionalMemberExpression {\n if (!node) return false;\n\n if (node.type !== \"OptionalMemberExpression\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isOptionalCallExpression(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.OptionalCallExpression {\n if (!node) return false;\n\n if (node.type !== \"OptionalCallExpression\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isClassProperty(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.ClassProperty {\n if (!node) return false;\n\n if (node.type !== \"ClassProperty\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isClassAccessorProperty(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.ClassAccessorProperty {\n if (!node) return false;\n\n if (node.type !== \"ClassAccessorProperty\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isClassPrivateProperty(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.ClassPrivateProperty {\n if (!node) return false;\n\n if (node.type !== \"ClassPrivateProperty\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isClassPrivateMethod(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.ClassPrivateMethod {\n if (!node) return false;\n\n if (node.type !== \"ClassPrivateMethod\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isPrivateName(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.PrivateName {\n if (!node) return false;\n\n if (node.type !== \"PrivateName\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isStaticBlock(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.StaticBlock {\n if (!node) return false;\n\n if (node.type !== \"StaticBlock\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isAnyTypeAnnotation(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.AnyTypeAnnotation {\n if (!node) return false;\n\n if (node.type !== \"AnyTypeAnnotation\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isArrayTypeAnnotation(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.ArrayTypeAnnotation {\n if (!node) return false;\n\n if (node.type !== \"ArrayTypeAnnotation\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isBooleanTypeAnnotation(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.BooleanTypeAnnotation {\n if (!node) return false;\n\n if (node.type !== \"BooleanTypeAnnotation\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isBooleanLiteralTypeAnnotation(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.BooleanLiteralTypeAnnotation {\n if (!node) return false;\n\n if (node.type !== \"BooleanLiteralTypeAnnotation\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isNullLiteralTypeAnnotation(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.NullLiteralTypeAnnotation {\n if (!node) return false;\n\n if (node.type !== \"NullLiteralTypeAnnotation\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isClassImplements(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.ClassImplements {\n if (!node) return false;\n\n if (node.type !== \"ClassImplements\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isDeclareClass(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.DeclareClass {\n if (!node) return false;\n\n if (node.type !== \"DeclareClass\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isDeclareFunction(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.DeclareFunction {\n if (!node) return false;\n\n if (node.type !== \"DeclareFunction\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isDeclareInterface(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.DeclareInterface {\n if (!node) return false;\n\n if (node.type !== \"DeclareInterface\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isDeclareModule(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.DeclareModule {\n if (!node) return false;\n\n if (node.type !== \"DeclareModule\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isDeclareModuleExports(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.DeclareModuleExports {\n if (!node) return false;\n\n if (node.type !== \"DeclareModuleExports\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isDeclareTypeAlias(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.DeclareTypeAlias {\n if (!node) return false;\n\n if (node.type !== \"DeclareTypeAlias\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isDeclareOpaqueType(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.DeclareOpaqueType {\n if (!node) return false;\n\n if (node.type !== \"DeclareOpaqueType\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isDeclareVariable(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.DeclareVariable {\n if (!node) return false;\n\n if (node.type !== \"DeclareVariable\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isDeclareExportDeclaration(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.DeclareExportDeclaration {\n if (!node) return false;\n\n if (node.type !== \"DeclareExportDeclaration\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isDeclareExportAllDeclaration(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.DeclareExportAllDeclaration {\n if (!node) return false;\n\n if (node.type !== \"DeclareExportAllDeclaration\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isDeclaredPredicate(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.DeclaredPredicate {\n if (!node) return false;\n\n if (node.type !== \"DeclaredPredicate\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isExistsTypeAnnotation(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.ExistsTypeAnnotation {\n if (!node) return false;\n\n if (node.type !== \"ExistsTypeAnnotation\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isFunctionTypeAnnotation(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.FunctionTypeAnnotation {\n if (!node) return false;\n\n if (node.type !== \"FunctionTypeAnnotation\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isFunctionTypeParam(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.FunctionTypeParam {\n if (!node) return false;\n\n if (node.type !== \"FunctionTypeParam\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isGenericTypeAnnotation(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.GenericTypeAnnotation {\n if (!node) return false;\n\n if (node.type !== \"GenericTypeAnnotation\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isInferredPredicate(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.InferredPredicate {\n if (!node) return false;\n\n if (node.type !== \"InferredPredicate\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isInterfaceExtends(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.InterfaceExtends {\n if (!node) return false;\n\n if (node.type !== \"InterfaceExtends\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isInterfaceDeclaration(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.InterfaceDeclaration {\n if (!node) return false;\n\n if (node.type !== \"InterfaceDeclaration\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isInterfaceTypeAnnotation(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.InterfaceTypeAnnotation {\n if (!node) return false;\n\n if (node.type !== \"InterfaceTypeAnnotation\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isIntersectionTypeAnnotation(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.IntersectionTypeAnnotation {\n if (!node) return false;\n\n if (node.type !== \"IntersectionTypeAnnotation\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isMixedTypeAnnotation(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.MixedTypeAnnotation {\n if (!node) return false;\n\n if (node.type !== \"MixedTypeAnnotation\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isEmptyTypeAnnotation(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.EmptyTypeAnnotation {\n if (!node) return false;\n\n if (node.type !== \"EmptyTypeAnnotation\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isNullableTypeAnnotation(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.NullableTypeAnnotation {\n if (!node) return false;\n\n if (node.type !== \"NullableTypeAnnotation\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isNumberLiteralTypeAnnotation(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.NumberLiteralTypeAnnotation {\n if (!node) return false;\n\n if (node.type !== \"NumberLiteralTypeAnnotation\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isNumberTypeAnnotation(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.NumberTypeAnnotation {\n if (!node) return false;\n\n if (node.type !== \"NumberTypeAnnotation\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isObjectTypeAnnotation(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.ObjectTypeAnnotation {\n if (!node) return false;\n\n if (node.type !== \"ObjectTypeAnnotation\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isObjectTypeInternalSlot(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.ObjectTypeInternalSlot {\n if (!node) return false;\n\n if (node.type !== \"ObjectTypeInternalSlot\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isObjectTypeCallProperty(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.ObjectTypeCallProperty {\n if (!node) return false;\n\n if (node.type !== \"ObjectTypeCallProperty\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isObjectTypeIndexer(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.ObjectTypeIndexer {\n if (!node) return false;\n\n if (node.type !== \"ObjectTypeIndexer\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isObjectTypeProperty(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.ObjectTypeProperty {\n if (!node) return false;\n\n if (node.type !== \"ObjectTypeProperty\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isObjectTypeSpreadProperty(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.ObjectTypeSpreadProperty {\n if (!node) return false;\n\n if (node.type !== \"ObjectTypeSpreadProperty\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isOpaqueType(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.OpaqueType {\n if (!node) return false;\n\n if (node.type !== \"OpaqueType\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isQualifiedTypeIdentifier(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.QualifiedTypeIdentifier {\n if (!node) return false;\n\n if (node.type !== \"QualifiedTypeIdentifier\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isStringLiteralTypeAnnotation(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.StringLiteralTypeAnnotation {\n if (!node) return false;\n\n if (node.type !== \"StringLiteralTypeAnnotation\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isStringTypeAnnotation(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.StringTypeAnnotation {\n if (!node) return false;\n\n if (node.type !== \"StringTypeAnnotation\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isSymbolTypeAnnotation(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.SymbolTypeAnnotation {\n if (!node) return false;\n\n if (node.type !== \"SymbolTypeAnnotation\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isThisTypeAnnotation(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.ThisTypeAnnotation {\n if (!node) return false;\n\n if (node.type !== \"ThisTypeAnnotation\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isTupleTypeAnnotation(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.TupleTypeAnnotation {\n if (!node) return false;\n\n if (node.type !== \"TupleTypeAnnotation\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isTypeofTypeAnnotation(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.TypeofTypeAnnotation {\n if (!node) return false;\n\n if (node.type !== \"TypeofTypeAnnotation\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isTypeAlias(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.TypeAlias {\n if (!node) return false;\n\n if (node.type !== \"TypeAlias\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isTypeAnnotation(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.TypeAnnotation {\n if (!node) return false;\n\n if (node.type !== \"TypeAnnotation\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isTypeCastExpression(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.TypeCastExpression {\n if (!node) return false;\n\n if (node.type !== \"TypeCastExpression\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isTypeParameter(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.TypeParameter {\n if (!node) return false;\n\n if (node.type !== \"TypeParameter\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isTypeParameterDeclaration(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.TypeParameterDeclaration {\n if (!node) return false;\n\n if (node.type !== \"TypeParameterDeclaration\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isTypeParameterInstantiation(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.TypeParameterInstantiation {\n if (!node) return false;\n\n if (node.type !== \"TypeParameterInstantiation\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isUnionTypeAnnotation(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.UnionTypeAnnotation {\n if (!node) return false;\n\n if (node.type !== \"UnionTypeAnnotation\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isVariance(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.Variance {\n if (!node) return false;\n\n if (node.type !== \"Variance\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isVoidTypeAnnotation(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.VoidTypeAnnotation {\n if (!node) return false;\n\n if (node.type !== \"VoidTypeAnnotation\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isEnumDeclaration(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.EnumDeclaration {\n if (!node) return false;\n\n if (node.type !== \"EnumDeclaration\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isEnumBooleanBody(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.EnumBooleanBody {\n if (!node) return false;\n\n if (node.type !== \"EnumBooleanBody\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isEnumNumberBody(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.EnumNumberBody {\n if (!node) return false;\n\n if (node.type !== \"EnumNumberBody\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isEnumStringBody(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.EnumStringBody {\n if (!node) return false;\n\n if (node.type !== \"EnumStringBody\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isEnumSymbolBody(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.EnumSymbolBody {\n if (!node) return false;\n\n if (node.type !== \"EnumSymbolBody\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isEnumBooleanMember(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.EnumBooleanMember {\n if (!node) return false;\n\n if (node.type !== \"EnumBooleanMember\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isEnumNumberMember(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.EnumNumberMember {\n if (!node) return false;\n\n if (node.type !== \"EnumNumberMember\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isEnumStringMember(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.EnumStringMember {\n if (!node) return false;\n\n if (node.type !== \"EnumStringMember\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isEnumDefaultedMember(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.EnumDefaultedMember {\n if (!node) return false;\n\n if (node.type !== \"EnumDefaultedMember\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isIndexedAccessType(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.IndexedAccessType {\n if (!node) return false;\n\n if (node.type !== \"IndexedAccessType\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isOptionalIndexedAccessType(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.OptionalIndexedAccessType {\n if (!node) return false;\n\n if (node.type !== \"OptionalIndexedAccessType\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isJSXAttribute(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.JSXAttribute {\n if (!node) return false;\n\n if (node.type !== \"JSXAttribute\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isJSXClosingElement(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.JSXClosingElement {\n if (!node) return false;\n\n if (node.type !== \"JSXClosingElement\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isJSXElement(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.JSXElement {\n if (!node) return false;\n\n if (node.type !== \"JSXElement\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isJSXEmptyExpression(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.JSXEmptyExpression {\n if (!node) return false;\n\n if (node.type !== \"JSXEmptyExpression\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isJSXExpressionContainer(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.JSXExpressionContainer {\n if (!node) return false;\n\n if (node.type !== \"JSXExpressionContainer\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isJSXSpreadChild(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.JSXSpreadChild {\n if (!node) return false;\n\n if (node.type !== \"JSXSpreadChild\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isJSXIdentifier(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.JSXIdentifier {\n if (!node) return false;\n\n if (node.type !== \"JSXIdentifier\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isJSXMemberExpression(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.JSXMemberExpression {\n if (!node) return false;\n\n if (node.type !== \"JSXMemberExpression\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isJSXNamespacedName(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.JSXNamespacedName {\n if (!node) return false;\n\n if (node.type !== \"JSXNamespacedName\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isJSXOpeningElement(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.JSXOpeningElement {\n if (!node) return false;\n\n if (node.type !== \"JSXOpeningElement\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isJSXSpreadAttribute(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.JSXSpreadAttribute {\n if (!node) return false;\n\n if (node.type !== \"JSXSpreadAttribute\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isJSXText(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.JSXText {\n if (!node) return false;\n\n if (node.type !== \"JSXText\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isJSXFragment(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.JSXFragment {\n if (!node) return false;\n\n if (node.type !== \"JSXFragment\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isJSXOpeningFragment(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.JSXOpeningFragment {\n if (!node) return false;\n\n if (node.type !== \"JSXOpeningFragment\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isJSXClosingFragment(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.JSXClosingFragment {\n if (!node) return false;\n\n if (node.type !== \"JSXClosingFragment\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isNoop(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.Noop {\n if (!node) return false;\n\n if (node.type !== \"Noop\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isPlaceholder(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.Placeholder {\n if (!node) return false;\n\n if (node.type !== \"Placeholder\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isV8IntrinsicIdentifier(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.V8IntrinsicIdentifier {\n if (!node) return false;\n\n if (node.type !== \"V8IntrinsicIdentifier\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isArgumentPlaceholder(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.ArgumentPlaceholder {\n if (!node) return false;\n\n if (node.type !== \"ArgumentPlaceholder\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isBindExpression(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.BindExpression {\n if (!node) return false;\n\n if (node.type !== \"BindExpression\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isImportAttribute(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.ImportAttribute {\n if (!node) return false;\n\n if (node.type !== \"ImportAttribute\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isDecorator(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.Decorator {\n if (!node) return false;\n\n if (node.type !== \"Decorator\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isDoExpression(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.DoExpression {\n if (!node) return false;\n\n if (node.type !== \"DoExpression\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isExportDefaultSpecifier(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.ExportDefaultSpecifier {\n if (!node) return false;\n\n if (node.type !== \"ExportDefaultSpecifier\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isRecordExpression(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.RecordExpression {\n if (!node) return false;\n\n if (node.type !== \"RecordExpression\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isTupleExpression(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.TupleExpression {\n if (!node) return false;\n\n if (node.type !== \"TupleExpression\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isDecimalLiteral(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.DecimalLiteral {\n if (!node) return false;\n\n if (node.type !== \"DecimalLiteral\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isModuleExpression(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.ModuleExpression {\n if (!node) return false;\n\n if (node.type !== \"ModuleExpression\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isTopicReference(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.TopicReference {\n if (!node) return false;\n\n if (node.type !== \"TopicReference\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isPipelineTopicExpression(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.PipelineTopicExpression {\n if (!node) return false;\n\n if (node.type !== \"PipelineTopicExpression\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isPipelineBareFunction(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.PipelineBareFunction {\n if (!node) return false;\n\n if (node.type !== \"PipelineBareFunction\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isPipelinePrimaryTopicReference(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.PipelinePrimaryTopicReference {\n if (!node) return false;\n\n if (node.type !== \"PipelinePrimaryTopicReference\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isTSParameterProperty(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.TSParameterProperty {\n if (!node) return false;\n\n if (node.type !== \"TSParameterProperty\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isTSDeclareFunction(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.TSDeclareFunction {\n if (!node) return false;\n\n if (node.type !== \"TSDeclareFunction\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isTSDeclareMethod(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.TSDeclareMethod {\n if (!node) return false;\n\n if (node.type !== \"TSDeclareMethod\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isTSQualifiedName(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.TSQualifiedName {\n if (!node) return false;\n\n if (node.type !== \"TSQualifiedName\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isTSCallSignatureDeclaration(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.TSCallSignatureDeclaration {\n if (!node) return false;\n\n if (node.type !== \"TSCallSignatureDeclaration\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isTSConstructSignatureDeclaration(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.TSConstructSignatureDeclaration {\n if (!node) return false;\n\n if (node.type !== \"TSConstructSignatureDeclaration\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isTSPropertySignature(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.TSPropertySignature {\n if (!node) return false;\n\n if (node.type !== \"TSPropertySignature\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isTSMethodSignature(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.TSMethodSignature {\n if (!node) return false;\n\n if (node.type !== \"TSMethodSignature\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isTSIndexSignature(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.TSIndexSignature {\n if (!node) return false;\n\n if (node.type !== \"TSIndexSignature\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isTSAnyKeyword(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.TSAnyKeyword {\n if (!node) return false;\n\n if (node.type !== \"TSAnyKeyword\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isTSBooleanKeyword(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.TSBooleanKeyword {\n if (!node) return false;\n\n if (node.type !== \"TSBooleanKeyword\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isTSBigIntKeyword(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.TSBigIntKeyword {\n if (!node) return false;\n\n if (node.type !== \"TSBigIntKeyword\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isTSIntrinsicKeyword(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.TSIntrinsicKeyword {\n if (!node) return false;\n\n if (node.type !== \"TSIntrinsicKeyword\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isTSNeverKeyword(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.TSNeverKeyword {\n if (!node) return false;\n\n if (node.type !== \"TSNeverKeyword\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isTSNullKeyword(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.TSNullKeyword {\n if (!node) return false;\n\n if (node.type !== \"TSNullKeyword\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isTSNumberKeyword(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.TSNumberKeyword {\n if (!node) return false;\n\n if (node.type !== \"TSNumberKeyword\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isTSObjectKeyword(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.TSObjectKeyword {\n if (!node) return false;\n\n if (node.type !== \"TSObjectKeyword\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isTSStringKeyword(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.TSStringKeyword {\n if (!node) return false;\n\n if (node.type !== \"TSStringKeyword\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isTSSymbolKeyword(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.TSSymbolKeyword {\n if (!node) return false;\n\n if (node.type !== \"TSSymbolKeyword\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isTSUndefinedKeyword(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.TSUndefinedKeyword {\n if (!node) return false;\n\n if (node.type !== \"TSUndefinedKeyword\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isTSUnknownKeyword(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.TSUnknownKeyword {\n if (!node) return false;\n\n if (node.type !== \"TSUnknownKeyword\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isTSVoidKeyword(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.TSVoidKeyword {\n if (!node) return false;\n\n if (node.type !== \"TSVoidKeyword\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isTSThisType(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.TSThisType {\n if (!node) return false;\n\n if (node.type !== \"TSThisType\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isTSFunctionType(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.TSFunctionType {\n if (!node) return false;\n\n if (node.type !== \"TSFunctionType\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isTSConstructorType(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.TSConstructorType {\n if (!node) return false;\n\n if (node.type !== \"TSConstructorType\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isTSTypeReference(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.TSTypeReference {\n if (!node) return false;\n\n if (node.type !== \"TSTypeReference\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isTSTypePredicate(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.TSTypePredicate {\n if (!node) return false;\n\n if (node.type !== \"TSTypePredicate\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isTSTypeQuery(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.TSTypeQuery {\n if (!node) return false;\n\n if (node.type !== \"TSTypeQuery\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isTSTypeLiteral(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.TSTypeLiteral {\n if (!node) return false;\n\n if (node.type !== \"TSTypeLiteral\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isTSArrayType(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.TSArrayType {\n if (!node) return false;\n\n if (node.type !== \"TSArrayType\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isTSTupleType(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.TSTupleType {\n if (!node) return false;\n\n if (node.type !== \"TSTupleType\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isTSOptionalType(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.TSOptionalType {\n if (!node) return false;\n\n if (node.type !== \"TSOptionalType\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isTSRestType(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.TSRestType {\n if (!node) return false;\n\n if (node.type !== \"TSRestType\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isTSNamedTupleMember(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.TSNamedTupleMember {\n if (!node) return false;\n\n if (node.type !== \"TSNamedTupleMember\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isTSUnionType(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.TSUnionType {\n if (!node) return false;\n\n if (node.type !== \"TSUnionType\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isTSIntersectionType(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.TSIntersectionType {\n if (!node) return false;\n\n if (node.type !== \"TSIntersectionType\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isTSConditionalType(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.TSConditionalType {\n if (!node) return false;\n\n if (node.type !== \"TSConditionalType\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isTSInferType(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.TSInferType {\n if (!node) return false;\n\n if (node.type !== \"TSInferType\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isTSParenthesizedType(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.TSParenthesizedType {\n if (!node) return false;\n\n if (node.type !== \"TSParenthesizedType\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isTSTypeOperator(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.TSTypeOperator {\n if (!node) return false;\n\n if (node.type !== \"TSTypeOperator\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isTSIndexedAccessType(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.TSIndexedAccessType {\n if (!node) return false;\n\n if (node.type !== \"TSIndexedAccessType\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isTSMappedType(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.TSMappedType {\n if (!node) return false;\n\n if (node.type !== \"TSMappedType\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isTSLiteralType(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.TSLiteralType {\n if (!node) return false;\n\n if (node.type !== \"TSLiteralType\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isTSExpressionWithTypeArguments(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.TSExpressionWithTypeArguments {\n if (!node) return false;\n\n if (node.type !== \"TSExpressionWithTypeArguments\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isTSInterfaceDeclaration(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.TSInterfaceDeclaration {\n if (!node) return false;\n\n if (node.type !== \"TSInterfaceDeclaration\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isTSInterfaceBody(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.TSInterfaceBody {\n if (!node) return false;\n\n if (node.type !== \"TSInterfaceBody\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isTSTypeAliasDeclaration(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.TSTypeAliasDeclaration {\n if (!node) return false;\n\n if (node.type !== \"TSTypeAliasDeclaration\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isTSInstantiationExpression(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.TSInstantiationExpression {\n if (!node) return false;\n\n if (node.type !== \"TSInstantiationExpression\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isTSAsExpression(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.TSAsExpression {\n if (!node) return false;\n\n if (node.type !== \"TSAsExpression\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isTSSatisfiesExpression(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.TSSatisfiesExpression {\n if (!node) return false;\n\n if (node.type !== \"TSSatisfiesExpression\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isTSTypeAssertion(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.TSTypeAssertion {\n if (!node) return false;\n\n if (node.type !== \"TSTypeAssertion\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isTSEnumDeclaration(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.TSEnumDeclaration {\n if (!node) return false;\n\n if (node.type !== \"TSEnumDeclaration\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isTSEnumMember(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.TSEnumMember {\n if (!node) return false;\n\n if (node.type !== \"TSEnumMember\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isTSModuleDeclaration(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.TSModuleDeclaration {\n if (!node) return false;\n\n if (node.type !== \"TSModuleDeclaration\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isTSModuleBlock(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.TSModuleBlock {\n if (!node) return false;\n\n if (node.type !== \"TSModuleBlock\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isTSImportType(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.TSImportType {\n if (!node) return false;\n\n if (node.type !== \"TSImportType\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isTSImportEqualsDeclaration(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.TSImportEqualsDeclaration {\n if (!node) return false;\n\n if (node.type !== \"TSImportEqualsDeclaration\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isTSExternalModuleReference(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.TSExternalModuleReference {\n if (!node) return false;\n\n if (node.type !== \"TSExternalModuleReference\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isTSNonNullExpression(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.TSNonNullExpression {\n if (!node) return false;\n\n if (node.type !== \"TSNonNullExpression\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isTSExportAssignment(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.TSExportAssignment {\n if (!node) return false;\n\n if (node.type !== \"TSExportAssignment\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isTSNamespaceExportDeclaration(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.TSNamespaceExportDeclaration {\n if (!node) return false;\n\n if (node.type !== \"TSNamespaceExportDeclaration\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isTSTypeAnnotation(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.TSTypeAnnotation {\n if (!node) return false;\n\n if (node.type !== \"TSTypeAnnotation\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isTSTypeParameterInstantiation(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.TSTypeParameterInstantiation {\n if (!node) return false;\n\n if (node.type !== \"TSTypeParameterInstantiation\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isTSTypeParameterDeclaration(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.TSTypeParameterDeclaration {\n if (!node) return false;\n\n if (node.type !== \"TSTypeParameterDeclaration\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isTSTypeParameter(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.TSTypeParameter {\n if (!node) return false;\n\n if (node.type !== \"TSTypeParameter\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isStandardized(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.Standardized {\n if (!node) return false;\n\n switch (node.type) {\n case \"ArrayExpression\":\n case \"AssignmentExpression\":\n case \"BinaryExpression\":\n case \"InterpreterDirective\":\n case \"Directive\":\n case \"DirectiveLiteral\":\n case \"BlockStatement\":\n case \"BreakStatement\":\n case \"CallExpression\":\n case \"CatchClause\":\n case \"ConditionalExpression\":\n case \"ContinueStatement\":\n case \"DebuggerStatement\":\n case \"DoWhileStatement\":\n case \"EmptyStatement\":\n case \"ExpressionStatement\":\n case \"File\":\n case \"ForInStatement\":\n case \"ForStatement\":\n case \"FunctionDeclaration\":\n case \"FunctionExpression\":\n case \"Identifier\":\n case \"IfStatement\":\n case \"LabeledStatement\":\n case \"StringLiteral\":\n case \"NumericLiteral\":\n case \"NullLiteral\":\n case \"BooleanLiteral\":\n case \"RegExpLiteral\":\n case \"LogicalExpression\":\n case \"MemberExpression\":\n case \"NewExpression\":\n case \"Program\":\n case \"ObjectExpression\":\n case \"ObjectMethod\":\n case \"ObjectProperty\":\n case \"RestElement\":\n case \"ReturnStatement\":\n case \"SequenceExpression\":\n case \"ParenthesizedExpression\":\n case \"SwitchCase\":\n case \"SwitchStatement\":\n case \"ThisExpression\":\n case \"ThrowStatement\":\n case \"TryStatement\":\n case \"UnaryExpression\":\n case \"UpdateExpression\":\n case \"VariableDeclaration\":\n case \"VariableDeclarator\":\n case \"WhileStatement\":\n case \"WithStatement\":\n case \"AssignmentPattern\":\n case \"ArrayPattern\":\n case \"ArrowFunctionExpression\":\n case \"ClassBody\":\n case \"ClassExpression\":\n case \"ClassDeclaration\":\n case \"ExportAllDeclaration\":\n case \"ExportDefaultDeclaration\":\n case \"ExportNamedDeclaration\":\n case \"ExportSpecifier\":\n case \"ForOfStatement\":\n case \"ImportDeclaration\":\n case \"ImportDefaultSpecifier\":\n case \"ImportNamespaceSpecifier\":\n case \"ImportSpecifier\":\n case \"ImportExpression\":\n case \"MetaProperty\":\n case \"ClassMethod\":\n case \"ObjectPattern\":\n case \"SpreadElement\":\n case \"Super\":\n case \"TaggedTemplateExpression\":\n case \"TemplateElement\":\n case \"TemplateLiteral\":\n case \"YieldExpression\":\n case \"AwaitExpression\":\n case \"Import\":\n case \"BigIntLiteral\":\n case \"ExportNamespaceSpecifier\":\n case \"OptionalMemberExpression\":\n case \"OptionalCallExpression\":\n case \"ClassProperty\":\n case \"ClassAccessorProperty\":\n case \"ClassPrivateProperty\":\n case \"ClassPrivateMethod\":\n case \"PrivateName\":\n case \"StaticBlock\":\n break;\n case \"Placeholder\":\n switch (node.expectedNode) {\n case \"Identifier\":\n case \"StringLiteral\":\n case \"BlockStatement\":\n case \"ClassBody\":\n break;\n default:\n return false;\n }\n break;\n default:\n return false;\n }\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isExpression(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.Expression {\n if (!node) return false;\n\n switch (node.type) {\n case \"ArrayExpression\":\n case \"AssignmentExpression\":\n case \"BinaryExpression\":\n case \"CallExpression\":\n case \"ConditionalExpression\":\n case \"FunctionExpression\":\n case \"Identifier\":\n case \"StringLiteral\":\n case \"NumericLiteral\":\n case \"NullLiteral\":\n case \"BooleanLiteral\":\n case \"RegExpLiteral\":\n case \"LogicalExpression\":\n case \"MemberExpression\":\n case \"NewExpression\":\n case \"ObjectExpression\":\n case \"SequenceExpression\":\n case \"ParenthesizedExpression\":\n case \"ThisExpression\":\n case \"UnaryExpression\":\n case \"UpdateExpression\":\n case \"ArrowFunctionExpression\":\n case \"ClassExpression\":\n case \"ImportExpression\":\n case \"MetaProperty\":\n case \"Super\":\n case \"TaggedTemplateExpression\":\n case \"TemplateLiteral\":\n case \"YieldExpression\":\n case \"AwaitExpression\":\n case \"Import\":\n case \"BigIntLiteral\":\n case \"OptionalMemberExpression\":\n case \"OptionalCallExpression\":\n case \"TypeCastExpression\":\n case \"JSXElement\":\n case \"JSXFragment\":\n case \"BindExpression\":\n case \"DoExpression\":\n case \"RecordExpression\":\n case \"TupleExpression\":\n case \"DecimalLiteral\":\n case \"ModuleExpression\":\n case \"TopicReference\":\n case \"PipelineTopicExpression\":\n case \"PipelineBareFunction\":\n case \"PipelinePrimaryTopicReference\":\n case \"TSInstantiationExpression\":\n case \"TSAsExpression\":\n case \"TSSatisfiesExpression\":\n case \"TSTypeAssertion\":\n case \"TSNonNullExpression\":\n break;\n case \"Placeholder\":\n switch (node.expectedNode) {\n case \"Expression\":\n case \"Identifier\":\n case \"StringLiteral\":\n break;\n default:\n return false;\n }\n break;\n default:\n return false;\n }\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isBinary(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.Binary {\n if (!node) return false;\n\n switch (node.type) {\n case \"BinaryExpression\":\n case \"LogicalExpression\":\n break;\n default:\n return false;\n }\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isScopable(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.Scopable {\n if (!node) return false;\n\n switch (node.type) {\n case \"BlockStatement\":\n case \"CatchClause\":\n case \"DoWhileStatement\":\n case \"ForInStatement\":\n case \"ForStatement\":\n case \"FunctionDeclaration\":\n case \"FunctionExpression\":\n case \"Program\":\n case \"ObjectMethod\":\n case \"SwitchStatement\":\n case \"WhileStatement\":\n case \"ArrowFunctionExpression\":\n case \"ClassExpression\":\n case \"ClassDeclaration\":\n case \"ForOfStatement\":\n case \"ClassMethod\":\n case \"ClassPrivateMethod\":\n case \"StaticBlock\":\n case \"TSModuleBlock\":\n break;\n case \"Placeholder\":\n if (node.expectedNode === \"BlockStatement\") break;\n default:\n return false;\n }\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isBlockParent(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.BlockParent {\n if (!node) return false;\n\n switch (node.type) {\n case \"BlockStatement\":\n case \"CatchClause\":\n case \"DoWhileStatement\":\n case \"ForInStatement\":\n case \"ForStatement\":\n case \"FunctionDeclaration\":\n case \"FunctionExpression\":\n case \"Program\":\n case \"ObjectMethod\":\n case \"SwitchStatement\":\n case \"WhileStatement\":\n case \"ArrowFunctionExpression\":\n case \"ForOfStatement\":\n case \"ClassMethod\":\n case \"ClassPrivateMethod\":\n case \"StaticBlock\":\n case \"TSModuleBlock\":\n break;\n case \"Placeholder\":\n if (node.expectedNode === \"BlockStatement\") break;\n default:\n return false;\n }\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isBlock(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.Block {\n if (!node) return false;\n\n switch (node.type) {\n case \"BlockStatement\":\n case \"Program\":\n case \"TSModuleBlock\":\n break;\n case \"Placeholder\":\n if (node.expectedNode === \"BlockStatement\") break;\n default:\n return false;\n }\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isStatement(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.Statement {\n if (!node) return false;\n\n switch (node.type) {\n case \"BlockStatement\":\n case \"BreakStatement\":\n case \"ContinueStatement\":\n case \"DebuggerStatement\":\n case \"DoWhileStatement\":\n case \"EmptyStatement\":\n case \"ExpressionStatement\":\n case \"ForInStatement\":\n case \"ForStatement\":\n case \"FunctionDeclaration\":\n case \"IfStatement\":\n case \"LabeledStatement\":\n case \"ReturnStatement\":\n case \"SwitchStatement\":\n case \"ThrowStatement\":\n case \"TryStatement\":\n case \"VariableDeclaration\":\n case \"WhileStatement\":\n case \"WithStatement\":\n case \"ClassDeclaration\":\n case \"ExportAllDeclaration\":\n case \"ExportDefaultDeclaration\":\n case \"ExportNamedDeclaration\":\n case \"ForOfStatement\":\n case \"ImportDeclaration\":\n case \"DeclareClass\":\n case \"DeclareFunction\":\n case \"DeclareInterface\":\n case \"DeclareModule\":\n case \"DeclareModuleExports\":\n case \"DeclareTypeAlias\":\n case \"DeclareOpaqueType\":\n case \"DeclareVariable\":\n case \"DeclareExportDeclaration\":\n case \"DeclareExportAllDeclaration\":\n case \"InterfaceDeclaration\":\n case \"OpaqueType\":\n case \"TypeAlias\":\n case \"EnumDeclaration\":\n case \"TSDeclareFunction\":\n case \"TSInterfaceDeclaration\":\n case \"TSTypeAliasDeclaration\":\n case \"TSEnumDeclaration\":\n case \"TSModuleDeclaration\":\n case \"TSImportEqualsDeclaration\":\n case \"TSExportAssignment\":\n case \"TSNamespaceExportDeclaration\":\n break;\n case \"Placeholder\":\n switch (node.expectedNode) {\n case \"Statement\":\n case \"Declaration\":\n case \"BlockStatement\":\n break;\n default:\n return false;\n }\n break;\n default:\n return false;\n }\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isTerminatorless(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.Terminatorless {\n if (!node) return false;\n\n switch (node.type) {\n case \"BreakStatement\":\n case \"ContinueStatement\":\n case \"ReturnStatement\":\n case \"ThrowStatement\":\n case \"YieldExpression\":\n case \"AwaitExpression\":\n break;\n default:\n return false;\n }\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isCompletionStatement(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.CompletionStatement {\n if (!node) return false;\n\n switch (node.type) {\n case \"BreakStatement\":\n case \"ContinueStatement\":\n case \"ReturnStatement\":\n case \"ThrowStatement\":\n break;\n default:\n return false;\n }\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isConditional(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.Conditional {\n if (!node) return false;\n\n switch (node.type) {\n case \"ConditionalExpression\":\n case \"IfStatement\":\n break;\n default:\n return false;\n }\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isLoop(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.Loop {\n if (!node) return false;\n\n switch (node.type) {\n case \"DoWhileStatement\":\n case \"ForInStatement\":\n case \"ForStatement\":\n case \"WhileStatement\":\n case \"ForOfStatement\":\n break;\n default:\n return false;\n }\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isWhile(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.While {\n if (!node) return false;\n\n switch (node.type) {\n case \"DoWhileStatement\":\n case \"WhileStatement\":\n break;\n default:\n return false;\n }\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isExpressionWrapper(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.ExpressionWrapper {\n if (!node) return false;\n\n switch (node.type) {\n case \"ExpressionStatement\":\n case \"ParenthesizedExpression\":\n case \"TypeCastExpression\":\n break;\n default:\n return false;\n }\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isFor(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.For {\n if (!node) return false;\n\n switch (node.type) {\n case \"ForInStatement\":\n case \"ForStatement\":\n case \"ForOfStatement\":\n break;\n default:\n return false;\n }\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isForXStatement(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.ForXStatement {\n if (!node) return false;\n\n switch (node.type) {\n case \"ForInStatement\":\n case \"ForOfStatement\":\n break;\n default:\n return false;\n }\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isFunction(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.Function {\n if (!node) return false;\n\n switch (node.type) {\n case \"FunctionDeclaration\":\n case \"FunctionExpression\":\n case \"ObjectMethod\":\n case \"ArrowFunctionExpression\":\n case \"ClassMethod\":\n case \"ClassPrivateMethod\":\n break;\n default:\n return false;\n }\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isFunctionParent(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.FunctionParent {\n if (!node) return false;\n\n switch (node.type) {\n case \"FunctionDeclaration\":\n case \"FunctionExpression\":\n case \"ObjectMethod\":\n case \"ArrowFunctionExpression\":\n case \"ClassMethod\":\n case \"ClassPrivateMethod\":\n case \"StaticBlock\":\n case \"TSModuleBlock\":\n break;\n default:\n return false;\n }\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isPureish(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.Pureish {\n if (!node) return false;\n\n switch (node.type) {\n case \"FunctionDeclaration\":\n case \"FunctionExpression\":\n case \"StringLiteral\":\n case \"NumericLiteral\":\n case \"NullLiteral\":\n case \"BooleanLiteral\":\n case \"RegExpLiteral\":\n case \"ArrowFunctionExpression\":\n case \"BigIntLiteral\":\n case \"DecimalLiteral\":\n break;\n case \"Placeholder\":\n if (node.expectedNode === \"StringLiteral\") break;\n default:\n return false;\n }\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isDeclaration(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.Declaration {\n if (!node) return false;\n\n switch (node.type) {\n case \"FunctionDeclaration\":\n case \"VariableDeclaration\":\n case \"ClassDeclaration\":\n case \"ExportAllDeclaration\":\n case \"ExportDefaultDeclaration\":\n case \"ExportNamedDeclaration\":\n case \"ImportDeclaration\":\n case \"DeclareClass\":\n case \"DeclareFunction\":\n case \"DeclareInterface\":\n case \"DeclareModule\":\n case \"DeclareModuleExports\":\n case \"DeclareTypeAlias\":\n case \"DeclareOpaqueType\":\n case \"DeclareVariable\":\n case \"DeclareExportDeclaration\":\n case \"DeclareExportAllDeclaration\":\n case \"InterfaceDeclaration\":\n case \"OpaqueType\":\n case \"TypeAlias\":\n case \"EnumDeclaration\":\n case \"TSDeclareFunction\":\n case \"TSInterfaceDeclaration\":\n case \"TSTypeAliasDeclaration\":\n case \"TSEnumDeclaration\":\n case \"TSModuleDeclaration\":\n break;\n case \"Placeholder\":\n if (node.expectedNode === \"Declaration\") break;\n default:\n return false;\n }\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isPatternLike(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.PatternLike {\n if (!node) return false;\n\n switch (node.type) {\n case \"Identifier\":\n case \"RestElement\":\n case \"AssignmentPattern\":\n case \"ArrayPattern\":\n case \"ObjectPattern\":\n case \"TSAsExpression\":\n case \"TSSatisfiesExpression\":\n case \"TSTypeAssertion\":\n case \"TSNonNullExpression\":\n break;\n case \"Placeholder\":\n switch (node.expectedNode) {\n case \"Pattern\":\n case \"Identifier\":\n break;\n default:\n return false;\n }\n break;\n default:\n return false;\n }\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isLVal(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.LVal {\n if (!node) return false;\n\n switch (node.type) {\n case \"Identifier\":\n case \"MemberExpression\":\n case \"RestElement\":\n case \"AssignmentPattern\":\n case \"ArrayPattern\":\n case \"ObjectPattern\":\n case \"TSParameterProperty\":\n case \"TSAsExpression\":\n case \"TSSatisfiesExpression\":\n case \"TSTypeAssertion\":\n case \"TSNonNullExpression\":\n break;\n case \"Placeholder\":\n switch (node.expectedNode) {\n case \"Pattern\":\n case \"Identifier\":\n break;\n default:\n return false;\n }\n break;\n default:\n return false;\n }\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isTSEntityName(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.TSEntityName {\n if (!node) return false;\n\n switch (node.type) {\n case \"Identifier\":\n case \"TSQualifiedName\":\n break;\n case \"Placeholder\":\n if (node.expectedNode === \"Identifier\") break;\n default:\n return false;\n }\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isLiteral(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.Literal {\n if (!node) return false;\n\n switch (node.type) {\n case \"StringLiteral\":\n case \"NumericLiteral\":\n case \"NullLiteral\":\n case \"BooleanLiteral\":\n case \"RegExpLiteral\":\n case \"TemplateLiteral\":\n case \"BigIntLiteral\":\n case \"DecimalLiteral\":\n break;\n case \"Placeholder\":\n if (node.expectedNode === \"StringLiteral\") break;\n default:\n return false;\n }\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isImmutable(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.Immutable {\n if (!node) return false;\n\n switch (node.type) {\n case \"StringLiteral\":\n case \"NumericLiteral\":\n case \"NullLiteral\":\n case \"BooleanLiteral\":\n case \"BigIntLiteral\":\n case \"JSXAttribute\":\n case \"JSXClosingElement\":\n case \"JSXElement\":\n case \"JSXExpressionContainer\":\n case \"JSXSpreadChild\":\n case \"JSXOpeningElement\":\n case \"JSXText\":\n case \"JSXFragment\":\n case \"JSXOpeningFragment\":\n case \"JSXClosingFragment\":\n case \"DecimalLiteral\":\n break;\n case \"Placeholder\":\n if (node.expectedNode === \"StringLiteral\") break;\n default:\n return false;\n }\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isUserWhitespacable(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.UserWhitespacable {\n if (!node) return false;\n\n switch (node.type) {\n case \"ObjectMethod\":\n case \"ObjectProperty\":\n case \"ObjectTypeInternalSlot\":\n case \"ObjectTypeCallProperty\":\n case \"ObjectTypeIndexer\":\n case \"ObjectTypeProperty\":\n case \"ObjectTypeSpreadProperty\":\n break;\n default:\n return false;\n }\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isMethod(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.Method {\n if (!node) return false;\n\n switch (node.type) {\n case \"ObjectMethod\":\n case \"ClassMethod\":\n case \"ClassPrivateMethod\":\n break;\n default:\n return false;\n }\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isObjectMember(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.ObjectMember {\n if (!node) return false;\n\n switch (node.type) {\n case \"ObjectMethod\":\n case \"ObjectProperty\":\n break;\n default:\n return false;\n }\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isProperty(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.Property {\n if (!node) return false;\n\n switch (node.type) {\n case \"ObjectProperty\":\n case \"ClassProperty\":\n case \"ClassAccessorProperty\":\n case \"ClassPrivateProperty\":\n break;\n default:\n return false;\n }\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isUnaryLike(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.UnaryLike {\n if (!node) return false;\n\n switch (node.type) {\n case \"UnaryExpression\":\n case \"SpreadElement\":\n break;\n default:\n return false;\n }\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isPattern(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.Pattern {\n if (!node) return false;\n\n switch (node.type) {\n case \"AssignmentPattern\":\n case \"ArrayPattern\":\n case \"ObjectPattern\":\n break;\n case \"Placeholder\":\n if (node.expectedNode === \"Pattern\") break;\n default:\n return false;\n }\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isClass(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.Class {\n if (!node) return false;\n\n switch (node.type) {\n case \"ClassExpression\":\n case \"ClassDeclaration\":\n break;\n default:\n return false;\n }\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isImportOrExportDeclaration(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.ImportOrExportDeclaration {\n if (!node) return false;\n\n switch (node.type) {\n case \"ExportAllDeclaration\":\n case \"ExportDefaultDeclaration\":\n case \"ExportNamedDeclaration\":\n case \"ImportDeclaration\":\n break;\n default:\n return false;\n }\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isExportDeclaration(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.ExportDeclaration {\n if (!node) return false;\n\n switch (node.type) {\n case \"ExportAllDeclaration\":\n case \"ExportDefaultDeclaration\":\n case \"ExportNamedDeclaration\":\n break;\n default:\n return false;\n }\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isModuleSpecifier(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.ModuleSpecifier {\n if (!node) return false;\n\n switch (node.type) {\n case \"ExportSpecifier\":\n case \"ImportDefaultSpecifier\":\n case \"ImportNamespaceSpecifier\":\n case \"ImportSpecifier\":\n case \"ExportNamespaceSpecifier\":\n case \"ExportDefaultSpecifier\":\n break;\n default:\n return false;\n }\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isAccessor(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.Accessor {\n if (!node) return false;\n\n switch (node.type) {\n case \"ClassAccessorProperty\":\n break;\n default:\n return false;\n }\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isPrivate(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.Private {\n if (!node) return false;\n\n switch (node.type) {\n case \"ClassPrivateProperty\":\n case \"ClassPrivateMethod\":\n case \"PrivateName\":\n break;\n default:\n return false;\n }\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isFlow(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.Flow {\n if (!node) return false;\n\n switch (node.type) {\n case \"AnyTypeAnnotation\":\n case \"ArrayTypeAnnotation\":\n case \"BooleanTypeAnnotation\":\n case \"BooleanLiteralTypeAnnotation\":\n case \"NullLiteralTypeAnnotation\":\n case \"ClassImplements\":\n case \"DeclareClass\":\n case \"DeclareFunction\":\n case \"DeclareInterface\":\n case \"DeclareModule\":\n case \"DeclareModuleExports\":\n case \"DeclareTypeAlias\":\n case \"DeclareOpaqueType\":\n case \"DeclareVariable\":\n case \"DeclareExportDeclaration\":\n case \"DeclareExportAllDeclaration\":\n case \"DeclaredPredicate\":\n case \"ExistsTypeAnnotation\":\n case \"FunctionTypeAnnotation\":\n case \"FunctionTypeParam\":\n case \"GenericTypeAnnotation\":\n case \"InferredPredicate\":\n case \"InterfaceExtends\":\n case \"InterfaceDeclaration\":\n case \"InterfaceTypeAnnotation\":\n case \"IntersectionTypeAnnotation\":\n case \"MixedTypeAnnotation\":\n case \"EmptyTypeAnnotation\":\n case \"NullableTypeAnnotation\":\n case \"NumberLiteralTypeAnnotation\":\n case \"NumberTypeAnnotation\":\n case \"ObjectTypeAnnotation\":\n case \"ObjectTypeInternalSlot\":\n case \"ObjectTypeCallProperty\":\n case \"ObjectTypeIndexer\":\n case \"ObjectTypeProperty\":\n case \"ObjectTypeSpreadProperty\":\n case \"OpaqueType\":\n case \"QualifiedTypeIdentifier\":\n case \"StringLiteralTypeAnnotation\":\n case \"StringTypeAnnotation\":\n case \"SymbolTypeAnnotation\":\n case \"ThisTypeAnnotation\":\n case \"TupleTypeAnnotation\":\n case \"TypeofTypeAnnotation\":\n case \"TypeAlias\":\n case \"TypeAnnotation\":\n case \"TypeCastExpression\":\n case \"TypeParameter\":\n case \"TypeParameterDeclaration\":\n case \"TypeParameterInstantiation\":\n case \"UnionTypeAnnotation\":\n case \"Variance\":\n case \"VoidTypeAnnotation\":\n case \"EnumDeclaration\":\n case \"EnumBooleanBody\":\n case \"EnumNumberBody\":\n case \"EnumStringBody\":\n case \"EnumSymbolBody\":\n case \"EnumBooleanMember\":\n case \"EnumNumberMember\":\n case \"EnumStringMember\":\n case \"EnumDefaultedMember\":\n case \"IndexedAccessType\":\n case \"OptionalIndexedAccessType\":\n break;\n default:\n return false;\n }\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isFlowType(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.FlowType {\n if (!node) return false;\n\n switch (node.type) {\n case \"AnyTypeAnnotation\":\n case \"ArrayTypeAnnotation\":\n case \"BooleanTypeAnnotation\":\n case \"BooleanLiteralTypeAnnotation\":\n case \"NullLiteralTypeAnnotation\":\n case \"ExistsTypeAnnotation\":\n case \"FunctionTypeAnnotation\":\n case \"GenericTypeAnnotation\":\n case \"InterfaceTypeAnnotation\":\n case \"IntersectionTypeAnnotation\":\n case \"MixedTypeAnnotation\":\n case \"EmptyTypeAnnotation\":\n case \"NullableTypeAnnotation\":\n case \"NumberLiteralTypeAnnotation\":\n case \"NumberTypeAnnotation\":\n case \"ObjectTypeAnnotation\":\n case \"StringLiteralTypeAnnotation\":\n case \"StringTypeAnnotation\":\n case \"SymbolTypeAnnotation\":\n case \"ThisTypeAnnotation\":\n case \"TupleTypeAnnotation\":\n case \"TypeofTypeAnnotation\":\n case \"UnionTypeAnnotation\":\n case \"VoidTypeAnnotation\":\n case \"IndexedAccessType\":\n case \"OptionalIndexedAccessType\":\n break;\n default:\n return false;\n }\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isFlowBaseAnnotation(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.FlowBaseAnnotation {\n if (!node) return false;\n\n switch (node.type) {\n case \"AnyTypeAnnotation\":\n case \"BooleanTypeAnnotation\":\n case \"NullLiteralTypeAnnotation\":\n case \"MixedTypeAnnotation\":\n case \"EmptyTypeAnnotation\":\n case \"NumberTypeAnnotation\":\n case \"StringTypeAnnotation\":\n case \"SymbolTypeAnnotation\":\n case \"ThisTypeAnnotation\":\n case \"VoidTypeAnnotation\":\n break;\n default:\n return false;\n }\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isFlowDeclaration(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.FlowDeclaration {\n if (!node) return false;\n\n switch (node.type) {\n case \"DeclareClass\":\n case \"DeclareFunction\":\n case \"DeclareInterface\":\n case \"DeclareModule\":\n case \"DeclareModuleExports\":\n case \"DeclareTypeAlias\":\n case \"DeclareOpaqueType\":\n case \"DeclareVariable\":\n case \"DeclareExportDeclaration\":\n case \"DeclareExportAllDeclaration\":\n case \"InterfaceDeclaration\":\n case \"OpaqueType\":\n case \"TypeAlias\":\n break;\n default:\n return false;\n }\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isFlowPredicate(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.FlowPredicate {\n if (!node) return false;\n\n switch (node.type) {\n case \"DeclaredPredicate\":\n case \"InferredPredicate\":\n break;\n default:\n return false;\n }\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isEnumBody(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.EnumBody {\n if (!node) return false;\n\n switch (node.type) {\n case \"EnumBooleanBody\":\n case \"EnumNumberBody\":\n case \"EnumStringBody\":\n case \"EnumSymbolBody\":\n break;\n default:\n return false;\n }\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isEnumMember(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.EnumMember {\n if (!node) return false;\n\n switch (node.type) {\n case \"EnumBooleanMember\":\n case \"EnumNumberMember\":\n case \"EnumStringMember\":\n case \"EnumDefaultedMember\":\n break;\n default:\n return false;\n }\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isJSX(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.JSX {\n if (!node) return false;\n\n switch (node.type) {\n case \"JSXAttribute\":\n case \"JSXClosingElement\":\n case \"JSXElement\":\n case \"JSXEmptyExpression\":\n case \"JSXExpressionContainer\":\n case \"JSXSpreadChild\":\n case \"JSXIdentifier\":\n case \"JSXMemberExpression\":\n case \"JSXNamespacedName\":\n case \"JSXOpeningElement\":\n case \"JSXSpreadAttribute\":\n case \"JSXText\":\n case \"JSXFragment\":\n case \"JSXOpeningFragment\":\n case \"JSXClosingFragment\":\n break;\n default:\n return false;\n }\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isMiscellaneous(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.Miscellaneous {\n if (!node) return false;\n\n switch (node.type) {\n case \"Noop\":\n case \"Placeholder\":\n case \"V8IntrinsicIdentifier\":\n break;\n default:\n return false;\n }\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isTypeScript(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.TypeScript {\n if (!node) return false;\n\n switch (node.type) {\n case \"TSParameterProperty\":\n case \"TSDeclareFunction\":\n case \"TSDeclareMethod\":\n case \"TSQualifiedName\":\n case \"TSCallSignatureDeclaration\":\n case \"TSConstructSignatureDeclaration\":\n case \"TSPropertySignature\":\n case \"TSMethodSignature\":\n case \"TSIndexSignature\":\n case \"TSAnyKeyword\":\n case \"TSBooleanKeyword\":\n case \"TSBigIntKeyword\":\n case \"TSIntrinsicKeyword\":\n case \"TSNeverKeyword\":\n case \"TSNullKeyword\":\n case \"TSNumberKeyword\":\n case \"TSObjectKeyword\":\n case \"TSStringKeyword\":\n case \"TSSymbolKeyword\":\n case \"TSUndefinedKeyword\":\n case \"TSUnknownKeyword\":\n case \"TSVoidKeyword\":\n case \"TSThisType\":\n case \"TSFunctionType\":\n case \"TSConstructorType\":\n case \"TSTypeReference\":\n case \"TSTypePredicate\":\n case \"TSTypeQuery\":\n case \"TSTypeLiteral\":\n case \"TSArrayType\":\n case \"TSTupleType\":\n case \"TSOptionalType\":\n case \"TSRestType\":\n case \"TSNamedTupleMember\":\n case \"TSUnionType\":\n case \"TSIntersectionType\":\n case \"TSConditionalType\":\n case \"TSInferType\":\n case \"TSParenthesizedType\":\n case \"TSTypeOperator\":\n case \"TSIndexedAccessType\":\n case \"TSMappedType\":\n case \"TSLiteralType\":\n case \"TSExpressionWithTypeArguments\":\n case \"TSInterfaceDeclaration\":\n case \"TSInterfaceBody\":\n case \"TSTypeAliasDeclaration\":\n case \"TSInstantiationExpression\":\n case \"TSAsExpression\":\n case \"TSSatisfiesExpression\":\n case \"TSTypeAssertion\":\n case \"TSEnumDeclaration\":\n case \"TSEnumMember\":\n case \"TSModuleDeclaration\":\n case \"TSModuleBlock\":\n case \"TSImportType\":\n case \"TSImportEqualsDeclaration\":\n case \"TSExternalModuleReference\":\n case \"TSNonNullExpression\":\n case \"TSExportAssignment\":\n case \"TSNamespaceExportDeclaration\":\n case \"TSTypeAnnotation\":\n case \"TSTypeParameterInstantiation\":\n case \"TSTypeParameterDeclaration\":\n case \"TSTypeParameter\":\n break;\n default:\n return false;\n }\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isTSTypeElement(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.TSTypeElement {\n if (!node) return false;\n\n switch (node.type) {\n case \"TSCallSignatureDeclaration\":\n case \"TSConstructSignatureDeclaration\":\n case \"TSPropertySignature\":\n case \"TSMethodSignature\":\n case \"TSIndexSignature\":\n break;\n default:\n return false;\n }\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isTSType(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.TSType {\n if (!node) return false;\n\n switch (node.type) {\n case \"TSAnyKeyword\":\n case \"TSBooleanKeyword\":\n case \"TSBigIntKeyword\":\n case \"TSIntrinsicKeyword\":\n case \"TSNeverKeyword\":\n case \"TSNullKeyword\":\n case \"TSNumberKeyword\":\n case \"TSObjectKeyword\":\n case \"TSStringKeyword\":\n case \"TSSymbolKeyword\":\n case \"TSUndefinedKeyword\":\n case \"TSUnknownKeyword\":\n case \"TSVoidKeyword\":\n case \"TSThisType\":\n case \"TSFunctionType\":\n case \"TSConstructorType\":\n case \"TSTypeReference\":\n case \"TSTypePredicate\":\n case \"TSTypeQuery\":\n case \"TSTypeLiteral\":\n case \"TSArrayType\":\n case \"TSTupleType\":\n case \"TSOptionalType\":\n case \"TSRestType\":\n case \"TSUnionType\":\n case \"TSIntersectionType\":\n case \"TSConditionalType\":\n case \"TSInferType\":\n case \"TSParenthesizedType\":\n case \"TSTypeOperator\":\n case \"TSIndexedAccessType\":\n case \"TSMappedType\":\n case \"TSLiteralType\":\n case \"TSExpressionWithTypeArguments\":\n case \"TSImportType\":\n break;\n default:\n return false;\n }\n\n return opts == null || shallowEqual(node, opts);\n}\nexport function isTSBaseType(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.TSBaseType {\n if (!node) return false;\n\n switch (node.type) {\n case \"TSAnyKeyword\":\n case \"TSBooleanKeyword\":\n case \"TSBigIntKeyword\":\n case \"TSIntrinsicKeyword\":\n case \"TSNeverKeyword\":\n case \"TSNullKeyword\":\n case \"TSNumberKeyword\":\n case \"TSObjectKeyword\":\n case \"TSStringKeyword\":\n case \"TSSymbolKeyword\":\n case \"TSUndefinedKeyword\":\n case \"TSUnknownKeyword\":\n case \"TSVoidKeyword\":\n case \"TSThisType\":\n case \"TSLiteralType\":\n break;\n default:\n return false;\n }\n\n return opts == null || shallowEqual(node, opts);\n}\n/**\n * @deprecated Use `isNumericLiteral`\n */\nexport function isNumberLiteral(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): boolean {\n deprecationWarning(\"isNumberLiteral\", \"isNumericLiteral\");\n if (!node) return false;\n\n if (node.type !== \"NumberLiteral\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\n/**\n * @deprecated Use `isRegExpLiteral`\n */\nexport function isRegexLiteral(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): boolean {\n deprecationWarning(\"isRegexLiteral\", \"isRegExpLiteral\");\n if (!node) return false;\n\n if (node.type !== \"RegexLiteral\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\n/**\n * @deprecated Use `isRestElement`\n */\nexport function isRestProperty(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): boolean {\n deprecationWarning(\"isRestProperty\", \"isRestElement\");\n if (!node) return false;\n\n if (node.type !== \"RestProperty\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\n/**\n * @deprecated Use `isSpreadElement`\n */\nexport function isSpreadProperty(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): boolean {\n deprecationWarning(\"isSpreadProperty\", \"isSpreadElement\");\n if (!node) return false;\n\n if (node.type !== \"SpreadProperty\") return false;\n\n return opts == null || shallowEqual(node, opts);\n}\n/**\n * @deprecated Use `isImportOrExportDeclaration`\n */\nexport function isModuleDeclaration(\n node: t.Node | null | undefined,\n opts?: Opts | null,\n): node is t.ImportOrExportDeclaration {\n deprecationWarning(\"isModuleDeclaration\", \"isImportOrExportDeclaration\");\n return isImportOrExportDeclaration(node, opts);\n}\n","import {\n isIdentifier,\n isMemberExpression,\n isStringLiteral,\n isThisExpression,\n} from \"./generated/index.ts\";\nimport type * as t from \"../index.ts\";\n\n/**\n * Determines whether or not the input node `member` matches the\n * input `match`.\n *\n * For example, given the match `React.createClass` it would match the\n * parsed nodes of `React.createClass` and `React[\"createClass\"]`.\n */\nexport default function matchesPattern(\n member: t.Node | null | undefined,\n match: string | string[],\n allowPartial?: boolean,\n): boolean {\n // not a member expression\n if (!isMemberExpression(member)) return false;\n\n const parts = Array.isArray(match) ? match : match.split(\".\");\n const nodes = [];\n\n let node;\n for (node = member; isMemberExpression(node); node = node.object) {\n nodes.push(node.property);\n }\n nodes.push(node);\n\n if (nodes.length < parts.length) return false;\n if (!allowPartial && nodes.length > parts.length) return false;\n\n for (let i = 0, j = nodes.length - 1; i < parts.length; i++, j--) {\n const node = nodes[j];\n let value;\n if (isIdentifier(node)) {\n value = node.name;\n } else if (isStringLiteral(node)) {\n value = node.value;\n } else if (isThisExpression(node)) {\n value = \"this\";\n } else {\n return false;\n }\n\n if (parts[i] !== value) return false;\n }\n\n return true;\n}\n","import matchesPattern from \"./matchesPattern.ts\";\nimport type * as t from \"../index.ts\";\n\n/**\n * Build a function that when called will return whether or not the\n * input `node` `MemberExpression` matches the input `match`.\n *\n * For example, given the match `React.createClass` it would match the\n * parsed nodes of `React.createClass` and `React[\"createClass\"]`.\n */\nexport default function buildMatchMemberExpression(\n match: string,\n allowPartial?: boolean,\n) {\n const parts = match.split(\".\");\n\n return (member: t.Node) => matchesPattern(member, parts, allowPartial);\n}\n","import buildMatchMemberExpression from \"../buildMatchMemberExpression.ts\";\n\nconst isReactComponent = buildMatchMemberExpression(\"React.Component\");\n\nexport default isReactComponent;\n","export default function isCompatTag(tagName?: string): boolean {\n // Must start with a lowercase ASCII letter\n return !!tagName && /^[a-z]/.test(tagName);\n}\n","'use strict';\n\nlet fastProto = null;\n\n// Creates an object with permanently fast properties in V8. See Toon Verwaest's\n// post https://medium.com/@tverwaes/setting-up-prototypes-in-v8-ec9c9491dfe2#5f62\n// for more details. Use %HasFastProperties(object) and the Node.js flag\n// --allow-natives-syntax to check whether an object has fast properties.\nfunction FastObject(o) {\n\t// A prototype object will have \"fast properties\" enabled once it is checked\n\t// against the inline property cache of a function, e.g. fastProto.property:\n\t// https://github.com/v8/v8/blob/6.0.122/test/mjsunit/fast-prototype.js#L48-L63\n\tif (fastProto !== null && typeof fastProto.property) {\n\t\tconst result = fastProto;\n\t\tfastProto = FastObject.prototype = null;\n\t\treturn result;\n\t}\n\tfastProto = FastObject.prototype = o == null ? Object.create(null) : o;\n\treturn new FastObject;\n}\n\n// Initialize the inline property cache of FastObject\nFastObject();\n\nmodule.exports = function toFastproperties(o) {\n\treturn FastObject(o);\n};\n","// env vars from the cli are always strings, so !!ENV_VAR returns true for \"false\"\nfunction bool(value) {\n if (value == null) return false;\n return value && value !== \"false\" && value !== \"0\";\n}\n\nmodule.exports = bool(process.env[\"BABEL_8_BREAKING\"])\n ? require(\"to-fast-properties-BABEL_8_BREAKING-true\")\n : require(\"to-fast-properties-BABEL_8_BREAKING-false\");\n","import { FLIPPED_ALIAS_KEYS, ALIAS_KEYS } from \"../definitions/index.ts\";\nimport type * as t from \"../index.ts\";\n\nexport default function isType(\n nodeType: string,\n targetType: T,\n): nodeType is T;\n\nexport default function isType(\n nodeType: string | null | undefined,\n targetType: string,\n): boolean;\n\n/**\n * Test if a `nodeType` is a `targetType` or if `targetType` is an alias of `nodeType`.\n */\nexport default function isType(nodeType: string, targetType: string): boolean {\n if (nodeType === targetType) return true;\n\n // If nodeType is nullish, it can't be an alias of targetType.\n if (nodeType == null) return false;\n\n // This is a fast-path. If the test above failed, but an alias key is found, then the\n // targetType was a primary node type, so there's no need to check the aliases.\n // @ts-expect-error targetType may not index ALIAS_KEYS\n if (ALIAS_KEYS[targetType]) return false;\n\n const aliases: Array | undefined = FLIPPED_ALIAS_KEYS[targetType];\n if (aliases) {\n if (aliases[0] === nodeType) return true;\n\n for (const alias of aliases) {\n if (nodeType === alias) return true;\n }\n }\n\n return false;\n}\n","import { PLACEHOLDERS_ALIAS } from \"../definitions/index.ts\";\n\n/**\n * Test if a `placeholderType` is a `targetType` or if `targetType` is an alias of `placeholderType`.\n */\nexport default function isPlaceholderType(\n placeholderType: string,\n targetType: string,\n): boolean {\n if (placeholderType === targetType) return true;\n\n const aliases: Array | undefined =\n PLACEHOLDERS_ALIAS[placeholderType];\n if (aliases) {\n for (const alias of aliases) {\n if (targetType === alias) return true;\n }\n }\n\n return false;\n}\n","import shallowEqual from \"../utils/shallowEqual.ts\";\nimport isType from \"./isType.ts\";\nimport isPlaceholderType from \"./isPlaceholderType.ts\";\nimport { FLIPPED_ALIAS_KEYS } from \"../definitions/index.ts\";\nimport type * as t from \"../index.ts\";\n\nexport default function is(\n type: T,\n node: t.Node | null | undefined,\n opts?: undefined,\n): node is Extract;\n\nexport default function is<\n T extends t.Node[\"type\"],\n P extends Extract,\n>(type: T, n: t.Node | null | undefined, required: Partial

): n is P;\n\nexport default function is

(\n type: string,\n node: t.Node | null | undefined,\n opts: Partial

,\n): node is P;\n\nexport default function is(\n type: string,\n node: t.Node | null | undefined,\n opts?: Partial,\n): node is t.Node;\n/**\n * Returns whether `node` is of given `type`.\n *\n * For better performance, use this instead of `is[Type]` when `type` is unknown.\n */\nexport default function is(\n type: string,\n node: t.Node | null | undefined,\n opts?: Partial,\n): node is t.Node {\n if (!node) return false;\n\n const matches = isType(node.type, type);\n if (!matches) {\n if (!opts && node.type === \"Placeholder\" && type in FLIPPED_ALIAS_KEYS) {\n // We can only return true if the placeholder doesn't replace a real node,\n // but it replaces a category of nodes (an alias).\n //\n // t.is(\"Identifier\", node) gives some guarantees about node's shape, so we\n // can't say that Placeholder(expectedNode: \"Identifier\") is an identifier\n // because it doesn't have the same properties.\n // On the other hand, t.is(\"Expression\", node) doesn't say anything about\n // the shape of node because Expression can be many different nodes: we can,\n // and should, safely report expression placeholders as Expressions.\n return isPlaceholderType(node.expectedNode, type);\n }\n return false;\n }\n\n if (typeof opts === \"undefined\") {\n return true;\n } else {\n return shallowEqual(node, opts);\n }\n}\n","// We inline this package\n// eslint-disable-next-line import/no-extraneous-dependencies\nimport * as charCodes from \"charcodes\";\n\n// ## Character categories\n\n// Big ugly regular expressions that match characters in the\n// whitespace, identifier, and identifier-start categories. These\n// are only applied when a character is found to actually have a\n// code point between 0x80 and 0xffff.\n// Generated by `scripts/generate-identifier-regex.js`.\n\n/* prettier-ignore */\nlet nonASCIIidentifierStartChars = \"\\xaa\\xb5\\xba\\xc0-\\xd6\\xd8-\\xf6\\xf8-\\u02c1\\u02c6-\\u02d1\\u02e0-\\u02e4\\u02ec\\u02ee\\u0370-\\u0374\\u0376\\u0377\\u037a-\\u037d\\u037f\\u0386\\u0388-\\u038a\\u038c\\u038e-\\u03a1\\u03a3-\\u03f5\\u03f7-\\u0481\\u048a-\\u052f\\u0531-\\u0556\\u0559\\u0560-\\u0588\\u05d0-\\u05ea\\u05ef-\\u05f2\\u0620-\\u064a\\u066e\\u066f\\u0671-\\u06d3\\u06d5\\u06e5\\u06e6\\u06ee\\u06ef\\u06fa-\\u06fc\\u06ff\\u0710\\u0712-\\u072f\\u074d-\\u07a5\\u07b1\\u07ca-\\u07ea\\u07f4\\u07f5\\u07fa\\u0800-\\u0815\\u081a\\u0824\\u0828\\u0840-\\u0858\\u0860-\\u086a\\u0870-\\u0887\\u0889-\\u088e\\u08a0-\\u08c9\\u0904-\\u0939\\u093d\\u0950\\u0958-\\u0961\\u0971-\\u0980\\u0985-\\u098c\\u098f\\u0990\\u0993-\\u09a8\\u09aa-\\u09b0\\u09b2\\u09b6-\\u09b9\\u09bd\\u09ce\\u09dc\\u09dd\\u09df-\\u09e1\\u09f0\\u09f1\\u09fc\\u0a05-\\u0a0a\\u0a0f\\u0a10\\u0a13-\\u0a28\\u0a2a-\\u0a30\\u0a32\\u0a33\\u0a35\\u0a36\\u0a38\\u0a39\\u0a59-\\u0a5c\\u0a5e\\u0a72-\\u0a74\\u0a85-\\u0a8d\\u0a8f-\\u0a91\\u0a93-\\u0aa8\\u0aaa-\\u0ab0\\u0ab2\\u0ab3\\u0ab5-\\u0ab9\\u0abd\\u0ad0\\u0ae0\\u0ae1\\u0af9\\u0b05-\\u0b0c\\u0b0f\\u0b10\\u0b13-\\u0b28\\u0b2a-\\u0b30\\u0b32\\u0b33\\u0b35-\\u0b39\\u0b3d\\u0b5c\\u0b5d\\u0b5f-\\u0b61\\u0b71\\u0b83\\u0b85-\\u0b8a\\u0b8e-\\u0b90\\u0b92-\\u0b95\\u0b99\\u0b9a\\u0b9c\\u0b9e\\u0b9f\\u0ba3\\u0ba4\\u0ba8-\\u0baa\\u0bae-\\u0bb9\\u0bd0\\u0c05-\\u0c0c\\u0c0e-\\u0c10\\u0c12-\\u0c28\\u0c2a-\\u0c39\\u0c3d\\u0c58-\\u0c5a\\u0c5d\\u0c60\\u0c61\\u0c80\\u0c85-\\u0c8c\\u0c8e-\\u0c90\\u0c92-\\u0ca8\\u0caa-\\u0cb3\\u0cb5-\\u0cb9\\u0cbd\\u0cdd\\u0cde\\u0ce0\\u0ce1\\u0cf1\\u0cf2\\u0d04-\\u0d0c\\u0d0e-\\u0d10\\u0d12-\\u0d3a\\u0d3d\\u0d4e\\u0d54-\\u0d56\\u0d5f-\\u0d61\\u0d7a-\\u0d7f\\u0d85-\\u0d96\\u0d9a-\\u0db1\\u0db3-\\u0dbb\\u0dbd\\u0dc0-\\u0dc6\\u0e01-\\u0e30\\u0e32\\u0e33\\u0e40-\\u0e46\\u0e81\\u0e82\\u0e84\\u0e86-\\u0e8a\\u0e8c-\\u0ea3\\u0ea5\\u0ea7-\\u0eb0\\u0eb2\\u0eb3\\u0ebd\\u0ec0-\\u0ec4\\u0ec6\\u0edc-\\u0edf\\u0f00\\u0f40-\\u0f47\\u0f49-\\u0f6c\\u0f88-\\u0f8c\\u1000-\\u102a\\u103f\\u1050-\\u1055\\u105a-\\u105d\\u1061\\u1065\\u1066\\u106e-\\u1070\\u1075-\\u1081\\u108e\\u10a0-\\u10c5\\u10c7\\u10cd\\u10d0-\\u10fa\\u10fc-\\u1248\\u124a-\\u124d\\u1250-\\u1256\\u1258\\u125a-\\u125d\\u1260-\\u1288\\u128a-\\u128d\\u1290-\\u12b0\\u12b2-\\u12b5\\u12b8-\\u12be\\u12c0\\u12c2-\\u12c5\\u12c8-\\u12d6\\u12d8-\\u1310\\u1312-\\u1315\\u1318-\\u135a\\u1380-\\u138f\\u13a0-\\u13f5\\u13f8-\\u13fd\\u1401-\\u166c\\u166f-\\u167f\\u1681-\\u169a\\u16a0-\\u16ea\\u16ee-\\u16f8\\u1700-\\u1711\\u171f-\\u1731\\u1740-\\u1751\\u1760-\\u176c\\u176e-\\u1770\\u1780-\\u17b3\\u17d7\\u17dc\\u1820-\\u1878\\u1880-\\u18a8\\u18aa\\u18b0-\\u18f5\\u1900-\\u191e\\u1950-\\u196d\\u1970-\\u1974\\u1980-\\u19ab\\u19b0-\\u19c9\\u1a00-\\u1a16\\u1a20-\\u1a54\\u1aa7\\u1b05-\\u1b33\\u1b45-\\u1b4c\\u1b83-\\u1ba0\\u1bae\\u1baf\\u1bba-\\u1be5\\u1c00-\\u1c23\\u1c4d-\\u1c4f\\u1c5a-\\u1c7d\\u1c80-\\u1c88\\u1c90-\\u1cba\\u1cbd-\\u1cbf\\u1ce9-\\u1cec\\u1cee-\\u1cf3\\u1cf5\\u1cf6\\u1cfa\\u1d00-\\u1dbf\\u1e00-\\u1f15\\u1f18-\\u1f1d\\u1f20-\\u1f45\\u1f48-\\u1f4d\\u1f50-\\u1f57\\u1f59\\u1f5b\\u1f5d\\u1f5f-\\u1f7d\\u1f80-\\u1fb4\\u1fb6-\\u1fbc\\u1fbe\\u1fc2-\\u1fc4\\u1fc6-\\u1fcc\\u1fd0-\\u1fd3\\u1fd6-\\u1fdb\\u1fe0-\\u1fec\\u1ff2-\\u1ff4\\u1ff6-\\u1ffc\\u2071\\u207f\\u2090-\\u209c\\u2102\\u2107\\u210a-\\u2113\\u2115\\u2118-\\u211d\\u2124\\u2126\\u2128\\u212a-\\u2139\\u213c-\\u213f\\u2145-\\u2149\\u214e\\u2160-\\u2188\\u2c00-\\u2ce4\\u2ceb-\\u2cee\\u2cf2\\u2cf3\\u2d00-\\u2d25\\u2d27\\u2d2d\\u2d30-\\u2d67\\u2d6f\\u2d80-\\u2d96\\u2da0-\\u2da6\\u2da8-\\u2dae\\u2db0-\\u2db6\\u2db8-\\u2dbe\\u2dc0-\\u2dc6\\u2dc8-\\u2dce\\u2dd0-\\u2dd6\\u2dd8-\\u2dde\\u3005-\\u3007\\u3021-\\u3029\\u3031-\\u3035\\u3038-\\u303c\\u3041-\\u3096\\u309b-\\u309f\\u30a1-\\u30fa\\u30fc-\\u30ff\\u3105-\\u312f\\u3131-\\u318e\\u31a0-\\u31bf\\u31f0-\\u31ff\\u3400-\\u4dbf\\u4e00-\\ua48c\\ua4d0-\\ua4fd\\ua500-\\ua60c\\ua610-\\ua61f\\ua62a\\ua62b\\ua640-\\ua66e\\ua67f-\\ua69d\\ua6a0-\\ua6ef\\ua717-\\ua71f\\ua722-\\ua788\\ua78b-\\ua7ca\\ua7d0\\ua7d1\\ua7d3\\ua7d5-\\ua7d9\\ua7f2-\\ua801\\ua803-\\ua805\\ua807-\\ua80a\\ua80c-\\ua822\\ua840-\\ua873\\ua882-\\ua8b3\\ua8f2-\\ua8f7\\ua8fb\\ua8fd\\ua8fe\\ua90a-\\ua925\\ua930-\\ua946\\ua960-\\ua97c\\ua984-\\ua9b2\\ua9cf\\ua9e0-\\ua9e4\\ua9e6-\\ua9ef\\ua9fa-\\ua9fe\\uaa00-\\uaa28\\uaa40-\\uaa42\\uaa44-\\uaa4b\\uaa60-\\uaa76\\uaa7a\\uaa7e-\\uaaaf\\uaab1\\uaab5\\uaab6\\uaab9-\\uaabd\\uaac0\\uaac2\\uaadb-\\uaadd\\uaae0-\\uaaea\\uaaf2-\\uaaf4\\uab01-\\uab06\\uab09-\\uab0e\\uab11-\\uab16\\uab20-\\uab26\\uab28-\\uab2e\\uab30-\\uab5a\\uab5c-\\uab69\\uab70-\\uabe2\\uac00-\\ud7a3\\ud7b0-\\ud7c6\\ud7cb-\\ud7fb\\uf900-\\ufa6d\\ufa70-\\ufad9\\ufb00-\\ufb06\\ufb13-\\ufb17\\ufb1d\\ufb1f-\\ufb28\\ufb2a-\\ufb36\\ufb38-\\ufb3c\\ufb3e\\ufb40\\ufb41\\ufb43\\ufb44\\ufb46-\\ufbb1\\ufbd3-\\ufd3d\\ufd50-\\ufd8f\\ufd92-\\ufdc7\\ufdf0-\\ufdfb\\ufe70-\\ufe74\\ufe76-\\ufefc\\uff21-\\uff3a\\uff41-\\uff5a\\uff66-\\uffbe\\uffc2-\\uffc7\\uffca-\\uffcf\\uffd2-\\uffd7\\uffda-\\uffdc\";\n/* prettier-ignore */\nlet nonASCIIidentifierChars = \"\\u200c\\u200d\\xb7\\u0300-\\u036f\\u0387\\u0483-\\u0487\\u0591-\\u05bd\\u05bf\\u05c1\\u05c2\\u05c4\\u05c5\\u05c7\\u0610-\\u061a\\u064b-\\u0669\\u0670\\u06d6-\\u06dc\\u06df-\\u06e4\\u06e7\\u06e8\\u06ea-\\u06ed\\u06f0-\\u06f9\\u0711\\u0730-\\u074a\\u07a6-\\u07b0\\u07c0-\\u07c9\\u07eb-\\u07f3\\u07fd\\u0816-\\u0819\\u081b-\\u0823\\u0825-\\u0827\\u0829-\\u082d\\u0859-\\u085b\\u0898-\\u089f\\u08ca-\\u08e1\\u08e3-\\u0903\\u093a-\\u093c\\u093e-\\u094f\\u0951-\\u0957\\u0962\\u0963\\u0966-\\u096f\\u0981-\\u0983\\u09bc\\u09be-\\u09c4\\u09c7\\u09c8\\u09cb-\\u09cd\\u09d7\\u09e2\\u09e3\\u09e6-\\u09ef\\u09fe\\u0a01-\\u0a03\\u0a3c\\u0a3e-\\u0a42\\u0a47\\u0a48\\u0a4b-\\u0a4d\\u0a51\\u0a66-\\u0a71\\u0a75\\u0a81-\\u0a83\\u0abc\\u0abe-\\u0ac5\\u0ac7-\\u0ac9\\u0acb-\\u0acd\\u0ae2\\u0ae3\\u0ae6-\\u0aef\\u0afa-\\u0aff\\u0b01-\\u0b03\\u0b3c\\u0b3e-\\u0b44\\u0b47\\u0b48\\u0b4b-\\u0b4d\\u0b55-\\u0b57\\u0b62\\u0b63\\u0b66-\\u0b6f\\u0b82\\u0bbe-\\u0bc2\\u0bc6-\\u0bc8\\u0bca-\\u0bcd\\u0bd7\\u0be6-\\u0bef\\u0c00-\\u0c04\\u0c3c\\u0c3e-\\u0c44\\u0c46-\\u0c48\\u0c4a-\\u0c4d\\u0c55\\u0c56\\u0c62\\u0c63\\u0c66-\\u0c6f\\u0c81-\\u0c83\\u0cbc\\u0cbe-\\u0cc4\\u0cc6-\\u0cc8\\u0cca-\\u0ccd\\u0cd5\\u0cd6\\u0ce2\\u0ce3\\u0ce6-\\u0cef\\u0cf3\\u0d00-\\u0d03\\u0d3b\\u0d3c\\u0d3e-\\u0d44\\u0d46-\\u0d48\\u0d4a-\\u0d4d\\u0d57\\u0d62\\u0d63\\u0d66-\\u0d6f\\u0d81-\\u0d83\\u0dca\\u0dcf-\\u0dd4\\u0dd6\\u0dd8-\\u0ddf\\u0de6-\\u0def\\u0df2\\u0df3\\u0e31\\u0e34-\\u0e3a\\u0e47-\\u0e4e\\u0e50-\\u0e59\\u0eb1\\u0eb4-\\u0ebc\\u0ec8-\\u0ece\\u0ed0-\\u0ed9\\u0f18\\u0f19\\u0f20-\\u0f29\\u0f35\\u0f37\\u0f39\\u0f3e\\u0f3f\\u0f71-\\u0f84\\u0f86\\u0f87\\u0f8d-\\u0f97\\u0f99-\\u0fbc\\u0fc6\\u102b-\\u103e\\u1040-\\u1049\\u1056-\\u1059\\u105e-\\u1060\\u1062-\\u1064\\u1067-\\u106d\\u1071-\\u1074\\u1082-\\u108d\\u108f-\\u109d\\u135d-\\u135f\\u1369-\\u1371\\u1712-\\u1715\\u1732-\\u1734\\u1752\\u1753\\u1772\\u1773\\u17b4-\\u17d3\\u17dd\\u17e0-\\u17e9\\u180b-\\u180d\\u180f-\\u1819\\u18a9\\u1920-\\u192b\\u1930-\\u193b\\u1946-\\u194f\\u19d0-\\u19da\\u1a17-\\u1a1b\\u1a55-\\u1a5e\\u1a60-\\u1a7c\\u1a7f-\\u1a89\\u1a90-\\u1a99\\u1ab0-\\u1abd\\u1abf-\\u1ace\\u1b00-\\u1b04\\u1b34-\\u1b44\\u1b50-\\u1b59\\u1b6b-\\u1b73\\u1b80-\\u1b82\\u1ba1-\\u1bad\\u1bb0-\\u1bb9\\u1be6-\\u1bf3\\u1c24-\\u1c37\\u1c40-\\u1c49\\u1c50-\\u1c59\\u1cd0-\\u1cd2\\u1cd4-\\u1ce8\\u1ced\\u1cf4\\u1cf7-\\u1cf9\\u1dc0-\\u1dff\\u200c\\u200d\\u203f\\u2040\\u2054\\u20d0-\\u20dc\\u20e1\\u20e5-\\u20f0\\u2cef-\\u2cf1\\u2d7f\\u2de0-\\u2dff\\u302a-\\u302f\\u3099\\u309a\\u30fb\\ua620-\\ua629\\ua66f\\ua674-\\ua67d\\ua69e\\ua69f\\ua6f0\\ua6f1\\ua802\\ua806\\ua80b\\ua823-\\ua827\\ua82c\\ua880\\ua881\\ua8b4-\\ua8c5\\ua8d0-\\ua8d9\\ua8e0-\\ua8f1\\ua8ff-\\ua909\\ua926-\\ua92d\\ua947-\\ua953\\ua980-\\ua983\\ua9b3-\\ua9c0\\ua9d0-\\ua9d9\\ua9e5\\ua9f0-\\ua9f9\\uaa29-\\uaa36\\uaa43\\uaa4c\\uaa4d\\uaa50-\\uaa59\\uaa7b-\\uaa7d\\uaab0\\uaab2-\\uaab4\\uaab7\\uaab8\\uaabe\\uaabf\\uaac1\\uaaeb-\\uaaef\\uaaf5\\uaaf6\\uabe3-\\uabea\\uabec\\uabed\\uabf0-\\uabf9\\ufb1e\\ufe00-\\ufe0f\\ufe20-\\ufe2f\\ufe33\\ufe34\\ufe4d-\\ufe4f\\uff10-\\uff19\\uff3f\\uff65\";\n\nconst nonASCIIidentifierStart = new RegExp(\n \"[\" + nonASCIIidentifierStartChars + \"]\",\n);\nconst nonASCIIidentifier = new RegExp(\n \"[\" + nonASCIIidentifierStartChars + nonASCIIidentifierChars + \"]\",\n);\n\nnonASCIIidentifierStartChars = nonASCIIidentifierChars = null;\n\n// These are a run-length and offset-encoded representation of the\n// >0xffff code points that are a valid part of identifiers. The\n// offset starts at 0x10000, and each pair of numbers represents an\n// offset to the next range, and then a size of the range. They were\n// generated by `scripts/generate-identifier-regex.js`.\n/* prettier-ignore */\nconst astralIdentifierStartCodes = [0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,14,29,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,13,10,2,14,2,6,2,1,2,10,2,14,2,6,2,1,68,310,10,21,11,7,25,5,2,41,2,8,70,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,71,55,7,1,65,0,16,3,2,2,2,28,43,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,14,35,349,41,7,1,79,28,11,0,9,21,43,17,47,20,28,22,13,52,58,1,3,0,14,44,33,24,27,35,30,0,3,0,9,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,20,1,64,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,159,52,19,3,21,2,31,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,14,0,72,26,38,6,186,43,117,63,32,7,3,0,3,7,2,1,2,23,16,0,2,0,95,7,3,38,17,0,2,0,29,0,11,39,8,0,22,0,12,45,20,0,19,72,264,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,328,18,16,0,2,12,2,33,125,0,80,921,103,110,18,195,2637,96,16,1071,18,5,4026,582,8634,568,8,30,18,78,18,29,19,47,17,3,32,20,6,18,689,63,129,74,6,0,67,12,65,1,2,0,29,6135,9,1237,43,8,8936,3,2,6,2,1,2,290,16,0,30,2,3,0,15,3,9,395,2309,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,1845,30,7,5,262,61,147,44,11,6,17,0,322,29,19,43,485,27,757,6,2,3,2,1,2,14,2,196,60,67,8,0,1205,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42719,33,4153,7,221,3,5761,15,7472,16,621,2467,541,1507,4938,6,4191];\n/* prettier-ignore */\nconst astralIdentifierCodes = [509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,370,1,81,2,71,10,50,3,123,2,54,14,32,10,3,1,11,3,46,10,8,0,46,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,2,11,83,11,7,0,3,0,158,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,193,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,84,14,5,9,243,14,166,9,71,5,2,1,3,3,2,0,2,1,13,9,120,6,3,6,4,0,29,9,41,6,2,3,9,0,10,10,47,15,406,7,2,7,17,9,57,21,2,13,123,5,4,0,2,1,2,6,2,0,9,9,49,4,2,1,2,4,9,9,330,3,10,1,2,0,49,6,4,4,14,9,5351,0,7,14,13835,9,87,9,39,4,60,6,26,9,1014,0,2,54,8,3,82,0,12,1,19628,1,4706,45,3,22,543,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,101,0,161,6,10,9,357,0,62,13,499,13,983,6,110,6,6,9,4759,9,787719,239];\n\n// This has a complexity linear to the value of the code. The\n// assumption is that looking up astral identifier characters is\n// rare.\nfunction isInAstralSet(code: number, set: readonly number[]): boolean {\n let pos = 0x10000;\n for (let i = 0, length = set.length; i < length; i += 2) {\n pos += set[i];\n if (pos > code) return false;\n\n pos += set[i + 1];\n if (pos >= code) return true;\n }\n return false;\n}\n\n// Test whether a given character code starts an identifier.\n\nexport function isIdentifierStart(code: number): boolean {\n if (code < charCodes.uppercaseA) return code === charCodes.dollarSign;\n if (code <= charCodes.uppercaseZ) return true;\n if (code < charCodes.lowercaseA) return code === charCodes.underscore;\n if (code <= charCodes.lowercaseZ) return true;\n if (code <= 0xffff) {\n return (\n code >= 0xaa && nonASCIIidentifierStart.test(String.fromCharCode(code))\n );\n }\n return isInAstralSet(code, astralIdentifierStartCodes);\n}\n\n// Test whether a given character is part of an identifier.\n\nexport function isIdentifierChar(code: number): boolean {\n if (code < charCodes.digit0) return code === charCodes.dollarSign;\n if (code < charCodes.colon) return true;\n if (code < charCodes.uppercaseA) return false;\n if (code <= charCodes.uppercaseZ) return true;\n if (code < charCodes.lowercaseA) return code === charCodes.underscore;\n if (code <= charCodes.lowercaseZ) return true;\n if (code <= 0xffff) {\n return code >= 0xaa && nonASCIIidentifier.test(String.fromCharCode(code));\n }\n return (\n isInAstralSet(code, astralIdentifierStartCodes) ||\n isInAstralSet(code, astralIdentifierCodes)\n );\n}\n\n// Test whether a given string is a valid identifier name\n\nexport function isIdentifierName(name: string): boolean {\n let isFirst = true;\n for (let i = 0; i < name.length; i++) {\n // The implementation is based on\n // https://source.chromium.org/chromium/chromium/src/+/master:v8/src/builtins/builtins-string-gen.cc;l=1455;drc=221e331b49dfefadbc6fa40b0c68e6f97606d0b3;bpv=0;bpt=1\n // We reimplement `codePointAt` because `codePointAt` is a V8 builtin which is not inlined by TurboFan (as of M91)\n // since `name` is mostly ASCII, an inlined `charCodeAt` wins here\n let cp = name.charCodeAt(i);\n if ((cp & 0xfc00) === 0xd800 && i + 1 < name.length) {\n const trail = name.charCodeAt(++i);\n if ((trail & 0xfc00) === 0xdc00) {\n cp = 0x10000 + ((cp & 0x3ff) << 10) + (trail & 0x3ff);\n }\n }\n if (isFirst) {\n isFirst = false;\n if (!isIdentifierStart(cp)) {\n return false;\n }\n } else if (!isIdentifierChar(cp)) {\n return false;\n }\n }\n return !isFirst;\n}\n","const reservedWords = {\n keyword: [\n \"break\",\n \"case\",\n \"catch\",\n \"continue\",\n \"debugger\",\n \"default\",\n \"do\",\n \"else\",\n \"finally\",\n \"for\",\n \"function\",\n \"if\",\n \"return\",\n \"switch\",\n \"throw\",\n \"try\",\n \"var\",\n \"const\",\n \"while\",\n \"with\",\n \"new\",\n \"this\",\n \"super\",\n \"class\",\n \"extends\",\n \"export\",\n \"import\",\n \"null\",\n \"true\",\n \"false\",\n \"in\",\n \"instanceof\",\n \"typeof\",\n \"void\",\n \"delete\",\n ],\n strict: [\n \"implements\",\n \"interface\",\n \"let\",\n \"package\",\n \"private\",\n \"protected\",\n \"public\",\n \"static\",\n \"yield\",\n ],\n strictBind: [\"eval\", \"arguments\"],\n};\nconst keywords = new Set(reservedWords.keyword);\nconst reservedWordsStrictSet = new Set(reservedWords.strict);\nconst reservedWordsStrictBindSet = new Set(reservedWords.strictBind);\n\n/**\n * Checks if word is a reserved word in non-strict mode\n */\nexport function isReservedWord(word: string, inModule: boolean): boolean {\n return (inModule && word === \"await\") || word === \"enum\";\n}\n\n/**\n * Checks if word is a reserved word in non-binding strict mode\n *\n * Includes non-strict reserved words\n */\nexport function isStrictReservedWord(word: string, inModule: boolean): boolean {\n return isReservedWord(word, inModule) || reservedWordsStrictSet.has(word);\n}\n\n/**\n * Checks if word is a reserved word in binding strict mode, but it is allowed as\n * a normal identifier.\n */\nexport function isStrictBindOnlyReservedWord(word: string): boolean {\n return reservedWordsStrictBindSet.has(word);\n}\n\n/**\n * Checks if word is a reserved word in binding strict mode\n *\n * Includes non-strict reserved words and non-binding strict reserved words\n */\nexport function isStrictBindReservedWord(\n word: string,\n inModule: boolean,\n): boolean {\n return (\n isStrictReservedWord(word, inModule) || isStrictBindOnlyReservedWord(word)\n );\n}\n\nexport function isKeyword(word: string): boolean {\n return keywords.has(word);\n}\n","import {\n isIdentifierName,\n isStrictReservedWord,\n isKeyword,\n} from \"@babel/helper-validator-identifier\";\n\n/**\n * Check if the input `name` is a valid identifier name\n * and isn't a reserved word.\n */\nexport default function isValidIdentifier(\n name: string,\n reserved: boolean = true,\n): boolean {\n if (typeof name !== \"string\") return false;\n\n if (reserved) {\n // \"await\" is invalid in module, valid in script; better be safe (see #4952)\n if (isKeyword(name) || isStrictReservedWord(name, true)) {\n return false;\n }\n }\n\n return isIdentifierName(name);\n}\n","// We inline this package\n// eslint-disable-next-line import/no-extraneous-dependencies\nimport * as charCodes from \"charcodes\";\n\n// The following character codes are forbidden from being\n// an immediate sibling of NumericLiteralSeparator _\nconst forbiddenNumericSeparatorSiblings = {\n decBinOct: new Set([\n charCodes.dot,\n charCodes.uppercaseB,\n charCodes.uppercaseE,\n charCodes.uppercaseO,\n charCodes.underscore, // multiple separators are not allowed\n charCodes.lowercaseB,\n charCodes.lowercaseE,\n charCodes.lowercaseO,\n ]),\n hex: new Set([\n charCodes.dot,\n charCodes.uppercaseX,\n charCodes.underscore, // multiple separators are not allowed\n charCodes.lowercaseX,\n ]),\n};\n\nconst isAllowedNumericSeparatorSibling = {\n // 0 - 1\n bin: (ch: number) => ch === charCodes.digit0 || ch === charCodes.digit1,\n\n // 0 - 7\n oct: (ch: number) => ch >= charCodes.digit0 && ch <= charCodes.digit7,\n\n // 0 - 9\n dec: (ch: number) => ch >= charCodes.digit0 && ch <= charCodes.digit9,\n\n // 0 - 9, A - F, a - f,\n hex: (ch: number) =>\n (ch >= charCodes.digit0 && ch <= charCodes.digit9) ||\n (ch >= charCodes.uppercaseA && ch <= charCodes.uppercaseF) ||\n (ch >= charCodes.lowercaseA && ch <= charCodes.lowercaseF),\n};\n\nexport type StringContentsErrorHandlers = EscapedCharErrorHandlers & {\n unterminated(\n initialPos: number,\n initialLineStart: number,\n initialCurLine: number,\n ): void;\n};\n\nexport function readStringContents(\n type: \"single\" | \"double\" | \"template\",\n input: string,\n pos: number,\n lineStart: number,\n curLine: number,\n errors: StringContentsErrorHandlers,\n) {\n const initialPos = pos;\n const initialLineStart = lineStart;\n const initialCurLine = curLine;\n\n let out = \"\";\n let firstInvalidLoc = null;\n let chunkStart = pos;\n const { length } = input;\n for (;;) {\n if (pos >= length) {\n errors.unterminated(initialPos, initialLineStart, initialCurLine);\n out += input.slice(chunkStart, pos);\n break;\n }\n const ch = input.charCodeAt(pos);\n if (isStringEnd(type, ch, input, pos)) {\n out += input.slice(chunkStart, pos);\n break;\n }\n if (ch === charCodes.backslash) {\n out += input.slice(chunkStart, pos);\n const res = readEscapedChar(\n input,\n pos,\n lineStart,\n curLine,\n type === \"template\",\n errors,\n );\n if (res.ch === null && !firstInvalidLoc) {\n firstInvalidLoc = { pos, lineStart, curLine };\n } else {\n out += res.ch;\n }\n ({ pos, lineStart, curLine } = res);\n chunkStart = pos;\n } else if (\n ch === charCodes.lineSeparator ||\n ch === charCodes.paragraphSeparator\n ) {\n ++pos;\n ++curLine;\n lineStart = pos;\n } else if (ch === charCodes.lineFeed || ch === charCodes.carriageReturn) {\n if (type === \"template\") {\n out += input.slice(chunkStart, pos) + \"\\n\";\n ++pos;\n if (\n ch === charCodes.carriageReturn &&\n input.charCodeAt(pos) === charCodes.lineFeed\n ) {\n ++pos;\n }\n ++curLine;\n chunkStart = lineStart = pos;\n } else {\n errors.unterminated(initialPos, initialLineStart, initialCurLine);\n }\n } else {\n ++pos;\n }\n }\n return process.env.BABEL_8_BREAKING\n ? { pos, str: out, firstInvalidLoc, lineStart, curLine }\n : {\n pos,\n str: out,\n firstInvalidLoc,\n lineStart,\n curLine,\n containsInvalid: !!firstInvalidLoc,\n };\n}\n\nfunction isStringEnd(\n type: \"single\" | \"double\" | \"template\",\n ch: number,\n input: string,\n pos: number,\n) {\n if (type === \"template\") {\n return (\n ch === charCodes.graveAccent ||\n (ch === charCodes.dollarSign &&\n input.charCodeAt(pos + 1) === charCodes.leftCurlyBrace)\n );\n }\n return (\n ch === (type === \"double\" ? charCodes.quotationMark : charCodes.apostrophe)\n );\n}\n\ntype EscapedCharErrorHandlers = HexCharErrorHandlers &\n CodePointErrorHandlers & {\n strictNumericEscape(pos: number, lineStart: number, curLine: number): void;\n };\n\nfunction readEscapedChar(\n input: string,\n pos: number,\n lineStart: number,\n curLine: number,\n inTemplate: boolean,\n errors: EscapedCharErrorHandlers,\n) {\n const throwOnInvalid = !inTemplate;\n pos++; // skip '\\'\n\n const res = (ch: string | null) => ({ pos, ch, lineStart, curLine });\n\n const ch = input.charCodeAt(pos++);\n switch (ch) {\n case charCodes.lowercaseN:\n return res(\"\\n\");\n case charCodes.lowercaseR:\n return res(\"\\r\");\n case charCodes.lowercaseX: {\n let code;\n ({ code, pos } = readHexChar(\n input,\n pos,\n lineStart,\n curLine,\n 2,\n false,\n throwOnInvalid,\n errors,\n ));\n return res(code === null ? null : String.fromCharCode(code));\n }\n case charCodes.lowercaseU: {\n let code;\n ({ code, pos } = readCodePoint(\n input,\n pos,\n lineStart,\n curLine,\n throwOnInvalid,\n errors,\n ));\n return res(code === null ? null : String.fromCodePoint(code));\n }\n case charCodes.lowercaseT:\n return res(\"\\t\");\n case charCodes.lowercaseB:\n return res(\"\\b\");\n case charCodes.lowercaseV:\n return res(\"\\u000b\");\n case charCodes.lowercaseF:\n return res(\"\\f\");\n case charCodes.carriageReturn:\n if (input.charCodeAt(pos) === charCodes.lineFeed) {\n ++pos;\n }\n // fall through\n case charCodes.lineFeed:\n lineStart = pos;\n ++curLine;\n // fall through\n case charCodes.lineSeparator:\n case charCodes.paragraphSeparator:\n return res(\"\");\n case charCodes.digit8:\n case charCodes.digit9:\n if (inTemplate) {\n return res(null);\n } else {\n errors.strictNumericEscape(pos - 1, lineStart, curLine);\n }\n // fall through\n default:\n if (ch >= charCodes.digit0 && ch <= charCodes.digit7) {\n const startPos = pos - 1;\n const match = /^[0-7]+/.exec(input.slice(startPos, pos + 2));\n\n let octalStr = match[0];\n\n let octal = parseInt(octalStr, 8);\n if (octal > 255) {\n octalStr = octalStr.slice(0, -1);\n octal = parseInt(octalStr, 8);\n }\n pos += octalStr.length - 1;\n const next = input.charCodeAt(pos);\n if (\n octalStr !== \"0\" ||\n next === charCodes.digit8 ||\n next === charCodes.digit9\n ) {\n if (inTemplate) {\n return res(null);\n } else {\n errors.strictNumericEscape(startPos, lineStart, curLine);\n }\n }\n\n return res(String.fromCharCode(octal));\n }\n\n return res(String.fromCharCode(ch));\n }\n}\n\ntype HexCharErrorHandlers = IntErrorHandlers & {\n invalidEscapeSequence(pos: number, lineStart: number, curLine: number): void;\n};\n\n// Used to read character escape sequences ('\\x', '\\u').\nfunction readHexChar(\n input: string,\n pos: number,\n lineStart: number,\n curLine: number,\n len: number,\n forceLen: boolean,\n throwOnInvalid: boolean,\n errors: HexCharErrorHandlers,\n) {\n const initialPos = pos;\n let n;\n ({ n, pos } = readInt(\n input,\n pos,\n lineStart,\n curLine,\n 16,\n len,\n forceLen,\n false,\n errors,\n /* bailOnError */ !throwOnInvalid,\n ));\n if (n === null) {\n if (throwOnInvalid) {\n errors.invalidEscapeSequence(initialPos, lineStart, curLine);\n } else {\n pos = initialPos - 1;\n }\n }\n return { code: n, pos };\n}\n\nexport type IntErrorHandlers = {\n numericSeparatorInEscapeSequence(\n pos: number,\n lineStart: number,\n curLine: number,\n ): void;\n unexpectedNumericSeparator(\n pos: number,\n lineStart: number,\n curLine: number,\n ): void;\n // It can return \"true\" to indicate that the error was handled\n // and the int parsing should continue.\n invalidDigit(\n pos: number,\n lineStart: number,\n curLine: number,\n radix: number,\n ): boolean;\n};\n\nexport function readInt(\n input: string,\n pos: number,\n lineStart: number,\n curLine: number,\n radix: number,\n len: number | undefined,\n forceLen: boolean,\n allowNumSeparator: boolean | \"bail\",\n errors: IntErrorHandlers,\n bailOnError: boolean,\n) {\n const start = pos;\n const forbiddenSiblings =\n radix === 16\n ? forbiddenNumericSeparatorSiblings.hex\n : forbiddenNumericSeparatorSiblings.decBinOct;\n const isAllowedSibling =\n radix === 16\n ? isAllowedNumericSeparatorSibling.hex\n : radix === 10\n ? isAllowedNumericSeparatorSibling.dec\n : radix === 8\n ? isAllowedNumericSeparatorSibling.oct\n : isAllowedNumericSeparatorSibling.bin;\n\n let invalid = false;\n let total = 0;\n\n for (let i = 0, e = len == null ? Infinity : len; i < e; ++i) {\n const code = input.charCodeAt(pos);\n let val;\n\n if (code === charCodes.underscore && allowNumSeparator !== \"bail\") {\n const prev = input.charCodeAt(pos - 1);\n const next = input.charCodeAt(pos + 1);\n\n if (!allowNumSeparator) {\n if (bailOnError) return { n: null, pos };\n errors.numericSeparatorInEscapeSequence(pos, lineStart, curLine);\n } else if (\n Number.isNaN(next) ||\n !isAllowedSibling(next) ||\n forbiddenSiblings.has(prev) ||\n forbiddenSiblings.has(next)\n ) {\n if (bailOnError) return { n: null, pos };\n errors.unexpectedNumericSeparator(pos, lineStart, curLine);\n }\n\n // Ignore this _ character\n ++pos;\n continue;\n }\n\n if (code >= charCodes.lowercaseA) {\n val = code - charCodes.lowercaseA + charCodes.lineFeed;\n } else if (code >= charCodes.uppercaseA) {\n val = code - charCodes.uppercaseA + charCodes.lineFeed;\n } else if (charCodes.isDigit(code)) {\n val = code - charCodes.digit0; // 0-9\n } else {\n val = Infinity;\n }\n if (val >= radix) {\n // If we found a digit which is too big, errors.invalidDigit can return true to avoid\n // breaking the loop (this is used for error recovery).\n if (val <= 9 && bailOnError) {\n return { n: null, pos };\n } else if (\n val <= 9 &&\n errors.invalidDigit(pos, lineStart, curLine, radix)\n ) {\n val = 0;\n } else if (forceLen) {\n val = 0;\n invalid = true;\n } else {\n break;\n }\n }\n ++pos;\n total = total * radix + val;\n }\n if (pos === start || (len != null && pos - start !== len) || invalid) {\n return { n: null, pos };\n }\n\n return { n: total, pos };\n}\n\nexport type CodePointErrorHandlers = HexCharErrorHandlers & {\n invalidCodePoint(pos: number, lineStart: number, curLine: number): void;\n};\n\nexport function readCodePoint(\n input: string,\n pos: number,\n lineStart: number,\n curLine: number,\n throwOnInvalid: boolean,\n errors: CodePointErrorHandlers,\n) {\n const ch = input.charCodeAt(pos);\n let code;\n\n if (ch === charCodes.leftCurlyBrace) {\n ++pos;\n ({ code, pos } = readHexChar(\n input,\n pos,\n lineStart,\n curLine,\n input.indexOf(\"}\", pos) - pos,\n true,\n throwOnInvalid,\n errors,\n ));\n ++pos;\n if (code !== null && code > 0x10ffff) {\n if (throwOnInvalid) {\n errors.invalidCodePoint(pos, lineStart, curLine);\n } else {\n return { code: null, pos };\n }\n }\n } else {\n ({ code, pos } = readHexChar(\n input,\n pos,\n lineStart,\n curLine,\n 4,\n false,\n throwOnInvalid,\n errors,\n ));\n }\n return { code, pos };\n}\n","export const STATEMENT_OR_BLOCK_KEYS = [\"consequent\", \"body\", \"alternate\"];\nexport const FLATTENABLE_KEYS = [\"body\", \"expressions\"];\nexport const FOR_INIT_KEYS = [\"left\", \"init\"];\nexport const COMMENT_KEYS = [\n \"leadingComments\",\n \"trailingComments\",\n \"innerComments\",\n] as const;\n\nexport const LOGICAL_OPERATORS = [\"||\", \"&&\", \"??\"];\nexport const UPDATE_OPERATORS = [\"++\", \"--\"];\n\nexport const BOOLEAN_NUMBER_BINARY_OPERATORS = [\">\", \"<\", \">=\", \"<=\"];\nexport const EQUALITY_BINARY_OPERATORS = [\"==\", \"===\", \"!=\", \"!==\"];\nexport const COMPARISON_BINARY_OPERATORS = [\n ...EQUALITY_BINARY_OPERATORS,\n \"in\",\n \"instanceof\",\n];\nexport const BOOLEAN_BINARY_OPERATORS = [\n ...COMPARISON_BINARY_OPERATORS,\n ...BOOLEAN_NUMBER_BINARY_OPERATORS,\n];\nexport const NUMBER_BINARY_OPERATORS = [\n \"-\",\n \"/\",\n \"%\",\n \"*\",\n \"**\",\n \"&\",\n \"|\",\n \">>\",\n \">>>\",\n \"<<\",\n \"^\",\n];\nexport const BINARY_OPERATORS = [\n \"+\",\n ...NUMBER_BINARY_OPERATORS,\n ...BOOLEAN_BINARY_OPERATORS,\n \"|>\",\n];\n\nexport const ASSIGNMENT_OPERATORS = [\n \"=\",\n \"+=\",\n ...NUMBER_BINARY_OPERATORS.map(op => op + \"=\"),\n ...LOGICAL_OPERATORS.map(op => op + \"=\"),\n];\n\nexport const BOOLEAN_UNARY_OPERATORS = [\"delete\", \"!\"];\nexport const NUMBER_UNARY_OPERATORS = [\"+\", \"-\", \"~\"];\nexport const STRING_UNARY_OPERATORS = [\"typeof\"];\nexport const UNARY_OPERATORS = [\n \"void\",\n \"throw\",\n ...BOOLEAN_UNARY_OPERATORS,\n ...NUMBER_UNARY_OPERATORS,\n ...STRING_UNARY_OPERATORS,\n];\n\nexport const INHERIT_KEYS = {\n optional: [\"typeAnnotation\", \"typeParameters\", \"returnType\"],\n force: [\"start\", \"loc\", \"end\"],\n} as const;\n\nexport const BLOCK_SCOPED_SYMBOL = Symbol.for(\"var used to be block scoped\");\nexport const NOT_LOCAL_BINDING = Symbol.for(\n \"should not be considered a local binding\",\n);\n","import is from \"../validators/is.ts\";\nimport { validateField, validateChild } from \"../validators/validate.ts\";\nimport type * as t from \"../index.ts\";\n\nexport const VISITOR_KEYS: Record = {};\nexport const ALIAS_KEYS: Partial> =\n {};\nexport const FLIPPED_ALIAS_KEYS: Record = {};\nexport const NODE_FIELDS: Record = {};\nexport const BUILDER_KEYS: Record = {};\nexport const DEPRECATED_KEYS: Record = {};\nexport const NODE_PARENT_VALIDATIONS: Record = {};\n\nfunction getType(val: any) {\n if (Array.isArray(val)) {\n return \"array\";\n } else if (val === null) {\n return \"null\";\n } else {\n return typeof val;\n }\n}\n\ntype NodeTypesWithoutComment = t.Node[\"type\"] | keyof t.Aliases;\n\ntype NodeTypes = NodeTypesWithoutComment | t.Comment[\"type\"];\n\ntype PrimitiveTypes = ReturnType;\n\ntype FieldDefinitions = {\n [x: string]: FieldOptions;\n};\n\ntype DefineTypeOpts = {\n fields?: FieldDefinitions;\n visitor?: Array;\n aliases?: Array;\n builder?: Array;\n inherits?: NodeTypes;\n deprecatedAlias?: string;\n validate?: Validator;\n};\n\nexport type Validator = (\n | { type: PrimitiveTypes }\n | { each: Validator }\n | { chainOf: Validator[] }\n | { oneOf: any[] }\n | { oneOfNodeTypes: NodeTypes[] }\n | { oneOfNodeOrValueTypes: (NodeTypes | PrimitiveTypes)[] }\n | { shapeOf: { [x: string]: FieldOptions } }\n | object\n) &\n ((node: t.Node, key: string, val: any) => void);\n\nexport type FieldOptions = {\n default?: string | number | boolean | [];\n optional?: boolean;\n deprecated?: boolean;\n validate?: Validator;\n};\n\nexport function validate(validate: Validator): FieldOptions {\n return { validate };\n}\n\nexport function typeIs(typeName: NodeTypes | NodeTypes[]) {\n return typeof typeName === \"string\"\n ? assertNodeType(typeName)\n : assertNodeType(...typeName);\n}\n\nexport function validateType(typeName: NodeTypes | NodeTypes[]) {\n return validate(typeIs(typeName));\n}\n\nexport function validateOptional(validate: Validator): FieldOptions {\n return { validate, optional: true };\n}\n\nexport function validateOptionalType(\n typeName: NodeTypes | NodeTypes[],\n): FieldOptions {\n return { validate: typeIs(typeName), optional: true };\n}\n\nexport function arrayOf(elementType: Validator): Validator {\n return chain(assertValueType(\"array\"), assertEach(elementType));\n}\n\nexport function arrayOfType(typeName: NodeTypes | NodeTypes[]) {\n return arrayOf(typeIs(typeName));\n}\n\nexport function validateArrayOfType(typeName: NodeTypes | NodeTypes[]) {\n return validate(arrayOfType(typeName));\n}\n\nexport function assertEach(callback: Validator): Validator {\n function validator(node: t.Node, key: string, val: any) {\n if (!Array.isArray(val)) return;\n\n for (let i = 0; i < val.length; i++) {\n const subkey = `${key}[${i}]`;\n const v = val[i];\n callback(node, subkey, v);\n if (process.env.BABEL_TYPES_8_BREAKING) validateChild(node, subkey, v);\n }\n }\n validator.each = callback;\n return validator;\n}\n\nexport function assertOneOf(...values: Array): Validator {\n function validate(node: any, key: string, val: any) {\n if (!values.includes(val)) {\n throw new TypeError(\n `Property ${key} expected value to be one of ${JSON.stringify(\n values,\n )} but got ${JSON.stringify(val)}`,\n );\n }\n }\n\n validate.oneOf = values;\n\n return validate;\n}\n\nexport function assertNodeType(...types: NodeTypes[]): Validator {\n function validate(node: t.Node, key: string, val: any) {\n for (const type of types) {\n if (is(type, val)) {\n validateChild(node, key, val);\n return;\n }\n }\n\n throw new TypeError(\n `Property ${key} of ${\n node.type\n } expected node to be of a type ${JSON.stringify(\n types,\n )} but instead got ${JSON.stringify(val?.type)}`,\n );\n }\n\n validate.oneOfNodeTypes = types;\n\n return validate;\n}\n\nexport function assertNodeOrValueType(\n ...types: (NodeTypes | PrimitiveTypes)[]\n): Validator {\n function validate(node: t.Node, key: string, val: any) {\n for (const type of types) {\n if (getType(val) === type || is(type, val)) {\n validateChild(node, key, val);\n return;\n }\n }\n\n throw new TypeError(\n `Property ${key} of ${\n node.type\n } expected node to be of a type ${JSON.stringify(\n types,\n )} but instead got ${JSON.stringify(val?.type)}`,\n );\n }\n\n validate.oneOfNodeOrValueTypes = types;\n\n return validate;\n}\n\nexport function assertValueType(type: PrimitiveTypes): Validator {\n function validate(node: t.Node, key: string, val: any) {\n const valid = getType(val) === type;\n\n if (!valid) {\n throw new TypeError(\n `Property ${key} expected type of ${type} but got ${getType(val)}`,\n );\n }\n }\n\n validate.type = type;\n\n return validate;\n}\n\nexport function assertShape(shape: { [x: string]: FieldOptions }): Validator {\n function validate(node: t.Node, key: string, val: any) {\n const errors = [];\n for (const property of Object.keys(shape)) {\n try {\n validateField(node, property, val[property], shape[property]);\n } catch (error) {\n if (error instanceof TypeError) {\n errors.push(error.message);\n continue;\n }\n throw error;\n }\n }\n if (errors.length) {\n throw new TypeError(\n `Property ${key} of ${\n node.type\n } expected to have the following:\\n${errors.join(\"\\n\")}`,\n );\n }\n }\n\n validate.shapeOf = shape;\n\n return validate;\n}\n\nexport function assertOptionalChainStart(): Validator {\n function validate(node: t.Node) {\n let current = node;\n while (node) {\n const { type } = current;\n if (type === \"OptionalCallExpression\") {\n if (current.optional) return;\n current = current.callee;\n continue;\n }\n\n if (type === \"OptionalMemberExpression\") {\n if (current.optional) return;\n current = current.object;\n continue;\n }\n\n break;\n }\n\n throw new TypeError(\n `Non-optional ${node.type} must chain from an optional OptionalMemberExpression or OptionalCallExpression. Found chain from ${current?.type}`,\n );\n }\n\n return validate;\n}\n\nexport function chain(...fns: Array): Validator {\n function validate(...args: Parameters) {\n for (const fn of fns) {\n fn(...args);\n }\n }\n validate.chainOf = fns;\n\n if (\n fns.length >= 2 &&\n \"type\" in fns[0] &&\n fns[0].type === \"array\" &&\n !(\"each\" in fns[1])\n ) {\n throw new Error(\n `An assertValueType(\"array\") validator can only be followed by an assertEach(...) validator.`,\n );\n }\n\n return validate;\n}\n\nconst validTypeOpts = [\n \"aliases\",\n \"builder\",\n \"deprecatedAlias\",\n \"fields\",\n \"inherits\",\n \"visitor\",\n \"validate\",\n];\nconst validFieldKeys = [\"default\", \"optional\", \"deprecated\", \"validate\"];\n\nconst store = {} as Record;\n\n// Wraps defineType to ensure these aliases are included.\nexport function defineAliasedType(...aliases: string[]) {\n return (type: string, opts: DefineTypeOpts = {}) => {\n let defined = opts.aliases;\n if (!defined) {\n if (opts.inherits) defined = store[opts.inherits].aliases?.slice();\n defined ??= [];\n opts.aliases = defined;\n }\n const additional = aliases.filter(a => !defined.includes(a));\n defined.unshift(...additional);\n defineType(type, opts);\n };\n}\n\nexport default function defineType(type: string, opts: DefineTypeOpts = {}) {\n const inherits = (opts.inherits && store[opts.inherits]) || {};\n\n let fields = opts.fields;\n if (!fields) {\n fields = {};\n if (inherits.fields) {\n const keys = Object.getOwnPropertyNames(inherits.fields);\n for (const key of keys) {\n const field = inherits.fields[key];\n const def = field.default;\n if (\n Array.isArray(def) ? def.length > 0 : def && typeof def === \"object\"\n ) {\n throw new Error(\n \"field defaults can only be primitives or empty arrays currently\",\n );\n }\n fields[key] = {\n default: Array.isArray(def) ? [] : def,\n optional: field.optional,\n deprecated: field.deprecated,\n validate: field.validate,\n };\n }\n }\n }\n\n const visitor: Array = opts.visitor || inherits.visitor || [];\n const aliases: Array = opts.aliases || inherits.aliases || [];\n const builder: Array =\n opts.builder || inherits.builder || opts.visitor || [];\n\n for (const k of Object.keys(opts)) {\n if (!validTypeOpts.includes(k)) {\n throw new Error(`Unknown type option \"${k}\" on ${type}`);\n }\n }\n\n if (opts.deprecatedAlias) {\n DEPRECATED_KEYS[opts.deprecatedAlias] = type as NodeTypesWithoutComment;\n }\n\n // ensure all field keys are represented in `fields`\n for (const key of visitor.concat(builder)) {\n fields[key] = fields[key] || {};\n }\n\n for (const key of Object.keys(fields)) {\n const field = fields[key];\n\n if (field.default !== undefined && !builder.includes(key)) {\n field.optional = true;\n }\n if (field.default === undefined) {\n field.default = null;\n } else if (!field.validate && field.default != null) {\n field.validate = assertValueType(getType(field.default));\n }\n\n for (const k of Object.keys(field)) {\n if (!validFieldKeys.includes(k)) {\n throw new Error(`Unknown field key \"${k}\" on ${type}.${key}`);\n }\n }\n }\n\n VISITOR_KEYS[type] = opts.visitor = visitor;\n BUILDER_KEYS[type] = opts.builder = builder;\n NODE_FIELDS[type] = opts.fields = fields;\n ALIAS_KEYS[type as NodeTypesWithoutComment] = opts.aliases = aliases;\n aliases.forEach(alias => {\n FLIPPED_ALIAS_KEYS[alias] = FLIPPED_ALIAS_KEYS[alias] || [];\n FLIPPED_ALIAS_KEYS[alias].push(type as NodeTypesWithoutComment);\n });\n\n if (opts.validate) {\n NODE_PARENT_VALIDATIONS[type] = opts.validate;\n }\n\n store[type] = opts;\n}\n","import is from \"../validators/is.ts\";\nimport isValidIdentifier from \"../validators/isValidIdentifier.ts\";\nimport { isKeyword, isReservedWord } from \"@babel/helper-validator-identifier\";\nimport type * as t from \"../index.ts\";\nimport { readStringContents } from \"@babel/helper-string-parser\";\n\nimport {\n BINARY_OPERATORS,\n LOGICAL_OPERATORS,\n ASSIGNMENT_OPERATORS,\n UNARY_OPERATORS,\n UPDATE_OPERATORS,\n} from \"../constants/index.ts\";\n\nimport {\n defineAliasedType,\n assertShape,\n assertOptionalChainStart,\n assertValueType,\n assertNodeType,\n assertNodeOrValueType,\n assertEach,\n chain,\n assertOneOf,\n validateOptional,\n type Validator,\n} from \"./utils.ts\";\n\nconst defineType = defineAliasedType(\"Standardized\");\n\ndefineType(\"ArrayExpression\", {\n fields: {\n elements: {\n validate: chain(\n assertValueType(\"array\"),\n assertEach(\n assertNodeOrValueType(\"null\", \"Expression\", \"SpreadElement\"),\n ),\n ),\n default: !process.env.BABEL_TYPES_8_BREAKING ? [] : undefined,\n },\n },\n visitor: [\"elements\"],\n aliases: [\"Expression\"],\n});\n\ndefineType(\"AssignmentExpression\", {\n fields: {\n operator: {\n validate: (function () {\n if (!process.env.BABEL_TYPES_8_BREAKING) {\n return assertValueType(\"string\");\n }\n\n const identifier = assertOneOf(...ASSIGNMENT_OPERATORS);\n const pattern = assertOneOf(\"=\");\n\n return function (node: t.AssignmentExpression, key, val) {\n const validator = is(\"Pattern\", node.left) ? pattern : identifier;\n validator(node, key, val);\n };\n })(),\n },\n left: {\n validate: !process.env.BABEL_TYPES_8_BREAKING\n ? assertNodeType(\"LVal\", \"OptionalMemberExpression\")\n : assertNodeType(\n \"Identifier\",\n \"MemberExpression\",\n \"OptionalMemberExpression\",\n \"ArrayPattern\",\n \"ObjectPattern\",\n \"TSAsExpression\",\n \"TSSatisfiesExpression\",\n \"TSTypeAssertion\",\n \"TSNonNullExpression\",\n ),\n },\n right: {\n validate: assertNodeType(\"Expression\"),\n },\n },\n builder: [\"operator\", \"left\", \"right\"],\n visitor: [\"left\", \"right\"],\n aliases: [\"Expression\"],\n});\n\ndefineType(\"BinaryExpression\", {\n builder: [\"operator\", \"left\", \"right\"],\n fields: {\n operator: {\n validate: assertOneOf(...BINARY_OPERATORS),\n },\n left: {\n validate: (function () {\n const expression = assertNodeType(\"Expression\");\n const inOp = assertNodeType(\"Expression\", \"PrivateName\");\n\n const validator: Validator = Object.assign(\n function (node: t.BinaryExpression, key, val) {\n const validator = node.operator === \"in\" ? inOp : expression;\n validator(node, key, val);\n } as Validator,\n // todo(ts): can be discriminated union by `operator` property\n { oneOfNodeTypes: [\"Expression\", \"PrivateName\"] },\n );\n return validator;\n })(),\n },\n right: {\n validate: assertNodeType(\"Expression\"),\n },\n },\n visitor: [\"left\", \"right\"],\n aliases: [\"Binary\", \"Expression\"],\n});\n\ndefineType(\"InterpreterDirective\", {\n builder: [\"value\"],\n fields: {\n value: {\n validate: assertValueType(\"string\"),\n },\n },\n});\n\ndefineType(\"Directive\", {\n visitor: [\"value\"],\n fields: {\n value: {\n validate: assertNodeType(\"DirectiveLiteral\"),\n },\n },\n});\n\ndefineType(\"DirectiveLiteral\", {\n builder: [\"value\"],\n fields: {\n value: {\n validate: assertValueType(\"string\"),\n },\n },\n});\n\ndefineType(\"BlockStatement\", {\n builder: [\"body\", \"directives\"],\n visitor: [\"directives\", \"body\"],\n fields: {\n directives: {\n validate: chain(\n assertValueType(\"array\"),\n assertEach(assertNodeType(\"Directive\")),\n ),\n default: [],\n },\n body: {\n validate: chain(\n assertValueType(\"array\"),\n assertEach(assertNodeType(\"Statement\")),\n ),\n },\n },\n aliases: [\"Scopable\", \"BlockParent\", \"Block\", \"Statement\"],\n});\n\ndefineType(\"BreakStatement\", {\n visitor: [\"label\"],\n fields: {\n label: {\n validate: assertNodeType(\"Identifier\"),\n optional: true,\n },\n },\n aliases: [\"Statement\", \"Terminatorless\", \"CompletionStatement\"],\n});\n\ndefineType(\"CallExpression\", {\n visitor: [\"callee\", \"arguments\", \"typeParameters\", \"typeArguments\"],\n builder: [\"callee\", \"arguments\"],\n aliases: [\"Expression\"],\n fields: {\n callee: {\n validate: assertNodeType(\"Expression\", \"Super\", \"V8IntrinsicIdentifier\"),\n },\n arguments: {\n validate: chain(\n assertValueType(\"array\"),\n assertEach(\n assertNodeType(\"Expression\", \"SpreadElement\", \"ArgumentPlaceholder\"),\n ),\n ),\n },\n ...(!process.env.BABEL_TYPES_8_BREAKING\n ? {\n optional: {\n validate: assertOneOf(true, false),\n optional: true,\n },\n }\n : {}),\n typeArguments: {\n validate: assertNodeType(\"TypeParameterInstantiation\"),\n optional: true,\n },\n typeParameters: {\n validate: assertNodeType(\"TSTypeParameterInstantiation\"),\n optional: true,\n },\n },\n});\n\ndefineType(\"CatchClause\", {\n visitor: [\"param\", \"body\"],\n fields: {\n param: {\n validate: assertNodeType(\"Identifier\", \"ArrayPattern\", \"ObjectPattern\"),\n optional: true,\n },\n body: {\n validate: assertNodeType(\"BlockStatement\"),\n },\n },\n aliases: [\"Scopable\", \"BlockParent\"],\n});\n\ndefineType(\"ConditionalExpression\", {\n visitor: [\"test\", \"consequent\", \"alternate\"],\n fields: {\n test: {\n validate: assertNodeType(\"Expression\"),\n },\n consequent: {\n validate: assertNodeType(\"Expression\"),\n },\n alternate: {\n validate: assertNodeType(\"Expression\"),\n },\n },\n aliases: [\"Expression\", \"Conditional\"],\n});\n\ndefineType(\"ContinueStatement\", {\n visitor: [\"label\"],\n fields: {\n label: {\n validate: assertNodeType(\"Identifier\"),\n optional: true,\n },\n },\n aliases: [\"Statement\", \"Terminatorless\", \"CompletionStatement\"],\n});\n\ndefineType(\"DebuggerStatement\", {\n aliases: [\"Statement\"],\n});\n\ndefineType(\"DoWhileStatement\", {\n builder: [\"test\", \"body\"],\n visitor: [\"body\", \"test\"],\n fields: {\n test: {\n validate: assertNodeType(\"Expression\"),\n },\n body: {\n validate: assertNodeType(\"Statement\"),\n },\n },\n aliases: [\"Statement\", \"BlockParent\", \"Loop\", \"While\", \"Scopable\"],\n});\n\ndefineType(\"EmptyStatement\", {\n aliases: [\"Statement\"],\n});\n\ndefineType(\"ExpressionStatement\", {\n visitor: [\"expression\"],\n fields: {\n expression: {\n validate: assertNodeType(\"Expression\"),\n },\n },\n aliases: [\"Statement\", \"ExpressionWrapper\"],\n});\n\ndefineType(\"File\", {\n builder: [\"program\", \"comments\", \"tokens\"],\n visitor: [\"program\"],\n fields: {\n program: {\n validate: assertNodeType(\"Program\"),\n },\n comments: {\n validate: !process.env.BABEL_TYPES_8_BREAKING\n ? Object.assign(() => {}, {\n each: { oneOfNodeTypes: [\"CommentBlock\", \"CommentLine\"] },\n })\n : assertEach(assertNodeType(\"CommentBlock\", \"CommentLine\")),\n optional: true,\n },\n tokens: {\n // todo(ts): add Token type\n validate: assertEach(Object.assign(() => {}, { type: \"any\" })),\n optional: true,\n },\n },\n});\n\ndefineType(\"ForInStatement\", {\n visitor: [\"left\", \"right\", \"body\"],\n aliases: [\n \"Scopable\",\n \"Statement\",\n \"For\",\n \"BlockParent\",\n \"Loop\",\n \"ForXStatement\",\n ],\n fields: {\n left: {\n validate: !process.env.BABEL_TYPES_8_BREAKING\n ? assertNodeType(\"VariableDeclaration\", \"LVal\")\n : assertNodeType(\n \"VariableDeclaration\",\n \"Identifier\",\n \"MemberExpression\",\n \"ArrayPattern\",\n \"ObjectPattern\",\n \"TSAsExpression\",\n \"TSSatisfiesExpression\",\n \"TSTypeAssertion\",\n \"TSNonNullExpression\",\n ),\n },\n right: {\n validate: assertNodeType(\"Expression\"),\n },\n body: {\n validate: assertNodeType(\"Statement\"),\n },\n },\n});\n\ndefineType(\"ForStatement\", {\n visitor: [\"init\", \"test\", \"update\", \"body\"],\n aliases: [\"Scopable\", \"Statement\", \"For\", \"BlockParent\", \"Loop\"],\n fields: {\n init: {\n validate: assertNodeType(\"VariableDeclaration\", \"Expression\"),\n optional: true,\n },\n test: {\n validate: assertNodeType(\"Expression\"),\n optional: true,\n },\n update: {\n validate: assertNodeType(\"Expression\"),\n optional: true,\n },\n body: {\n validate: assertNodeType(\"Statement\"),\n },\n },\n});\n\nexport const functionCommon = () => ({\n params: {\n validate: chain(\n assertValueType(\"array\"),\n assertEach(assertNodeType(\"Identifier\", \"Pattern\", \"RestElement\")),\n ),\n },\n generator: {\n default: false,\n },\n async: {\n default: false,\n },\n});\n\nexport const functionTypeAnnotationCommon = () => ({\n returnType: {\n validate: process.env.BABEL_8_BREAKING\n ? assertNodeType(\"TypeAnnotation\", \"TSTypeAnnotation\")\n : assertNodeType(\n \"TypeAnnotation\",\n \"TSTypeAnnotation\",\n // @ts-ignore(Babel 7 vs Babel 8) Babel 7 AST\n \"Noop\",\n ),\n optional: true,\n },\n typeParameters: {\n validate: process.env.BABEL_8_BREAKING\n ? assertNodeType(\"TypeParameterDeclaration\", \"TSTypeParameterDeclaration\")\n : assertNodeType(\n \"TypeParameterDeclaration\",\n \"TSTypeParameterDeclaration\",\n // @ts-ignore(Babel 7 vs Babel 8) Babel 7 AST\n \"Noop\",\n ),\n optional: true,\n },\n});\n\nexport const functionDeclarationCommon = () => ({\n ...functionCommon(),\n declare: {\n validate: assertValueType(\"boolean\"),\n optional: true,\n },\n id: {\n validate: assertNodeType(\"Identifier\"),\n optional: true, // May be null for `export default function`\n },\n});\n\ndefineType(\"FunctionDeclaration\", {\n builder: [\"id\", \"params\", \"body\", \"generator\", \"async\"],\n visitor: [\"id\", \"typeParameters\", \"params\", \"returnType\", \"body\"],\n fields: {\n ...functionDeclarationCommon(),\n ...functionTypeAnnotationCommon(),\n body: {\n validate: assertNodeType(\"BlockStatement\"),\n },\n predicate: {\n validate: assertNodeType(\"DeclaredPredicate\", \"InferredPredicate\"),\n optional: true,\n },\n },\n aliases: [\n \"Scopable\",\n \"Function\",\n \"BlockParent\",\n \"FunctionParent\",\n \"Statement\",\n \"Pureish\",\n \"Declaration\",\n ],\n validate: (function () {\n if (!process.env.BABEL_TYPES_8_BREAKING) return () => {};\n\n const identifier = assertNodeType(\"Identifier\");\n\n return function (parent, key, node) {\n if (!is(\"ExportDefaultDeclaration\", parent)) {\n identifier(node, \"id\", node.id);\n }\n };\n })(),\n});\n\ndefineType(\"FunctionExpression\", {\n inherits: \"FunctionDeclaration\",\n aliases: [\n \"Scopable\",\n \"Function\",\n \"BlockParent\",\n \"FunctionParent\",\n \"Expression\",\n \"Pureish\",\n ],\n fields: {\n ...functionCommon(),\n ...functionTypeAnnotationCommon(),\n id: {\n validate: assertNodeType(\"Identifier\"),\n optional: true,\n },\n body: {\n validate: assertNodeType(\"BlockStatement\"),\n },\n predicate: {\n validate: assertNodeType(\"DeclaredPredicate\", \"InferredPredicate\"),\n optional: true,\n },\n },\n});\n\nexport const patternLikeCommon = () => ({\n typeAnnotation: {\n validate: process.env.BABEL_8_BREAKING\n ? assertNodeType(\"TypeAnnotation\", \"TSTypeAnnotation\")\n : assertNodeType(\n \"TypeAnnotation\",\n \"TSTypeAnnotation\",\n // @ts-ignore(Babel 7 vs Babel 8) Babel 7 AST\n \"Noop\",\n ),\n optional: true,\n },\n optional: {\n validate: assertValueType(\"boolean\"),\n optional: true,\n },\n decorators: {\n validate: chain(\n assertValueType(\"array\"),\n assertEach(assertNodeType(\"Decorator\")),\n ),\n optional: true,\n },\n});\n\ndefineType(\"Identifier\", {\n builder: [\"name\"],\n visitor: [\"typeAnnotation\", \"decorators\" /* for legacy param decorators */],\n aliases: [\"Expression\", \"PatternLike\", \"LVal\", \"TSEntityName\"],\n fields: {\n ...patternLikeCommon(),\n name: {\n validate: chain(\n assertValueType(\"string\"),\n Object.assign(\n function (node, key, val) {\n if (!process.env.BABEL_TYPES_8_BREAKING) return;\n\n if (!isValidIdentifier(val, false)) {\n throw new TypeError(`\"${val}\" is not a valid identifier name`);\n }\n } as Validator,\n { type: \"string\" },\n ),\n ),\n },\n },\n validate(parent, key, node) {\n if (!process.env.BABEL_TYPES_8_BREAKING) return;\n\n const match = /\\.(\\w+)$/.exec(key);\n if (!match) return;\n\n const [, parentKey] = match;\n const nonComp = { computed: false };\n\n // We can't check if `parent.property === node`, because nodes are validated\n // before replacing them in the AST.\n if (parentKey === \"property\") {\n if (is(\"MemberExpression\", parent, nonComp)) return;\n if (is(\"OptionalMemberExpression\", parent, nonComp)) return;\n } else if (parentKey === \"key\") {\n if (is(\"Property\", parent, nonComp)) return;\n if (is(\"Method\", parent, nonComp)) return;\n } else if (parentKey === \"exported\") {\n if (is(\"ExportSpecifier\", parent)) return;\n } else if (parentKey === \"imported\") {\n if (is(\"ImportSpecifier\", parent, { imported: node })) return;\n } else if (parentKey === \"meta\") {\n if (is(\"MetaProperty\", parent, { meta: node })) return;\n }\n\n if (\n // Ideally we should call isStrictReservedWord if this node is a descendant\n // of a block in strict mode. Also, we should pass the inModule option so\n // we can disable \"await\" in module.\n (isKeyword(node.name) || isReservedWord(node.name, false)) &&\n // Even if \"this\" is a keyword, we are using the Identifier\n // node to represent it.\n node.name !== \"this\"\n ) {\n throw new TypeError(`\"${node.name}\" is not a valid identifier`);\n }\n },\n});\n\ndefineType(\"IfStatement\", {\n visitor: [\"test\", \"consequent\", \"alternate\"],\n aliases: [\"Statement\", \"Conditional\"],\n fields: {\n test: {\n validate: assertNodeType(\"Expression\"),\n },\n consequent: {\n validate: assertNodeType(\"Statement\"),\n },\n alternate: {\n optional: true,\n validate: assertNodeType(\"Statement\"),\n },\n },\n});\n\ndefineType(\"LabeledStatement\", {\n visitor: [\"label\", \"body\"],\n aliases: [\"Statement\"],\n fields: {\n label: {\n validate: assertNodeType(\"Identifier\"),\n },\n body: {\n validate: assertNodeType(\"Statement\"),\n },\n },\n});\n\ndefineType(\"StringLiteral\", {\n builder: [\"value\"],\n fields: {\n value: {\n validate: assertValueType(\"string\"),\n },\n },\n aliases: [\"Expression\", \"Pureish\", \"Literal\", \"Immutable\"],\n});\n\ndefineType(\"NumericLiteral\", {\n builder: [\"value\"],\n deprecatedAlias: \"NumberLiteral\",\n fields: {\n value: {\n validate: chain(\n assertValueType(\"number\"),\n Object.assign(\n function (node, key, val) {\n if (1 / val < 0 || !Number.isFinite(val)) {\n const error = new Error(\n \"NumericLiterals must be non-negative finite numbers. \" +\n `You can use t.valueToNode(${val}) instead.`,\n );\n if (process.env.BABEL_8_BREAKING) {\n // TODO(@nicolo-ribaudo) Fix regenerator to not pass negative\n // numbers here.\n if (!IS_STANDALONE) {\n if (!new Error().stack.includes(\"regenerator\")) {\n throw error;\n }\n }\n } else {\n // TODO: Enable this warning once regenerator is fixed.\n // https://github.com/facebook/regenerator/pull/680\n // console.warn(error);\n }\n }\n } satisfies Validator,\n { type: \"number\" },\n ),\n ),\n },\n },\n aliases: [\"Expression\", \"Pureish\", \"Literal\", \"Immutable\"],\n});\n\ndefineType(\"NullLiteral\", {\n aliases: [\"Expression\", \"Pureish\", \"Literal\", \"Immutable\"],\n});\n\ndefineType(\"BooleanLiteral\", {\n builder: [\"value\"],\n fields: {\n value: {\n validate: assertValueType(\"boolean\"),\n },\n },\n aliases: [\"Expression\", \"Pureish\", \"Literal\", \"Immutable\"],\n});\n\ndefineType(\"RegExpLiteral\", {\n builder: [\"pattern\", \"flags\"],\n deprecatedAlias: \"RegexLiteral\",\n aliases: [\"Expression\", \"Pureish\", \"Literal\"],\n fields: {\n pattern: {\n validate: assertValueType(\"string\"),\n },\n flags: {\n validate: chain(\n assertValueType(\"string\"),\n Object.assign(\n function (node, key, val) {\n if (!process.env.BABEL_TYPES_8_BREAKING) return;\n\n const invalid = /[^gimsuy]/.exec(val);\n if (invalid) {\n throw new TypeError(`\"${invalid[0]}\" is not a valid RegExp flag`);\n }\n } as Validator,\n { type: \"string\" },\n ),\n ),\n default: \"\",\n },\n },\n});\n\ndefineType(\"LogicalExpression\", {\n builder: [\"operator\", \"left\", \"right\"],\n visitor: [\"left\", \"right\"],\n aliases: [\"Binary\", \"Expression\"],\n fields: {\n operator: {\n validate: assertOneOf(...LOGICAL_OPERATORS),\n },\n left: {\n validate: assertNodeType(\"Expression\"),\n },\n right: {\n validate: assertNodeType(\"Expression\"),\n },\n },\n});\n\ndefineType(\"MemberExpression\", {\n builder: [\n \"object\",\n \"property\",\n \"computed\",\n ...(!process.env.BABEL_TYPES_8_BREAKING ? [\"optional\"] : []),\n ],\n visitor: [\"object\", \"property\"],\n aliases: [\"Expression\", \"LVal\"],\n fields: {\n object: {\n validate: assertNodeType(\"Expression\", \"Super\"),\n },\n property: {\n validate: (function () {\n const normal = assertNodeType(\"Identifier\", \"PrivateName\");\n const computed = assertNodeType(\"Expression\");\n\n const validator: Validator = function (\n node: t.MemberExpression,\n key,\n val,\n ) {\n const validator: Validator = node.computed ? computed : normal;\n validator(node, key, val);\n };\n // @ts-expect-error todo(ts): can be discriminated union by `computed` property\n validator.oneOfNodeTypes = [\"Expression\", \"Identifier\", \"PrivateName\"];\n return validator;\n })(),\n },\n computed: {\n default: false,\n },\n ...(!process.env.BABEL_TYPES_8_BREAKING\n ? {\n optional: {\n validate: assertOneOf(true, false),\n optional: true,\n },\n }\n : {}),\n },\n});\n\ndefineType(\"NewExpression\", { inherits: \"CallExpression\" });\n\ndefineType(\"Program\", {\n // Note: We explicitly leave 'interpreter' out here because it is\n // conceptually comment-like, and Babel does not traverse comments either.\n visitor: [\"directives\", \"body\"],\n builder: [\"body\", \"directives\", \"sourceType\", \"interpreter\"],\n fields: {\n sourceType: {\n validate: assertOneOf(\"script\", \"module\"),\n default: \"script\",\n },\n interpreter: {\n validate: assertNodeType(\"InterpreterDirective\"),\n default: null,\n optional: true,\n },\n directives: {\n validate: chain(\n assertValueType(\"array\"),\n assertEach(assertNodeType(\"Directive\")),\n ),\n default: [],\n },\n body: {\n validate: chain(\n assertValueType(\"array\"),\n assertEach(assertNodeType(\"Statement\")),\n ),\n },\n },\n aliases: [\"Scopable\", \"BlockParent\", \"Block\"],\n});\n\ndefineType(\"ObjectExpression\", {\n visitor: [\"properties\"],\n aliases: [\"Expression\"],\n fields: {\n properties: {\n validate: chain(\n assertValueType(\"array\"),\n assertEach(\n assertNodeType(\"ObjectMethod\", \"ObjectProperty\", \"SpreadElement\"),\n ),\n ),\n },\n },\n});\n\ndefineType(\"ObjectMethod\", {\n builder: [\"kind\", \"key\", \"params\", \"body\", \"computed\", \"generator\", \"async\"],\n visitor: [\n \"decorators\",\n \"key\",\n \"typeParameters\",\n \"params\",\n \"returnType\",\n \"body\",\n ],\n fields: {\n ...functionCommon(),\n ...functionTypeAnnotationCommon(),\n kind: {\n validate: assertOneOf(\"method\", \"get\", \"set\"),\n ...(!process.env.BABEL_TYPES_8_BREAKING ? { default: \"method\" } : {}),\n },\n computed: {\n default: false,\n },\n key: {\n validate: (function () {\n const normal = assertNodeType(\n \"Identifier\",\n \"StringLiteral\",\n \"NumericLiteral\",\n \"BigIntLiteral\",\n );\n const computed = assertNodeType(\"Expression\");\n\n const validator: Validator = function (node: t.ObjectMethod, key, val) {\n const validator = node.computed ? computed : normal;\n validator(node, key, val);\n };\n // @ts-expect-error todo(ts): can be discriminated union by `computed` property\n validator.oneOfNodeTypes = [\n \"Expression\",\n \"Identifier\",\n \"StringLiteral\",\n \"NumericLiteral\",\n \"BigIntLiteral\",\n ];\n return validator;\n })(),\n },\n decorators: {\n validate: chain(\n assertValueType(\"array\"),\n assertEach(assertNodeType(\"Decorator\")),\n ),\n optional: true,\n },\n body: {\n validate: assertNodeType(\"BlockStatement\"),\n },\n },\n aliases: [\n \"UserWhitespacable\",\n \"Function\",\n \"Scopable\",\n \"BlockParent\",\n \"FunctionParent\",\n \"Method\",\n \"ObjectMember\",\n ],\n});\n\ndefineType(\"ObjectProperty\", {\n builder: [\n \"key\",\n \"value\",\n \"computed\",\n \"shorthand\",\n ...(!process.env.BABEL_TYPES_8_BREAKING ? [\"decorators\"] : []),\n ],\n fields: {\n computed: {\n default: false,\n },\n key: {\n validate: (function () {\n const normal = assertNodeType(\n \"Identifier\",\n \"StringLiteral\",\n \"NumericLiteral\",\n \"BigIntLiteral\",\n \"DecimalLiteral\",\n \"PrivateName\",\n );\n const computed = assertNodeType(\"Expression\");\n\n const validator: Validator = Object.assign(\n function (node: t.ObjectProperty, key, val) {\n const validator = node.computed ? computed : normal;\n validator(node, key, val);\n } as Validator,\n {\n // todo(ts): can be discriminated union by `computed` property\n oneOfNodeTypes: [\n \"Expression\",\n \"Identifier\",\n \"StringLiteral\",\n \"NumericLiteral\",\n \"BigIntLiteral\",\n \"DecimalLiteral\",\n \"PrivateName\",\n ],\n },\n );\n return validator;\n })(),\n },\n value: {\n // Value may be PatternLike if this is an AssignmentProperty\n // https://github.com/babel/babylon/issues/434\n validate: assertNodeType(\"Expression\", \"PatternLike\"),\n },\n shorthand: {\n validate: chain(\n assertValueType(\"boolean\"),\n Object.assign(\n function (node: t.ObjectProperty, key, val) {\n if (!process.env.BABEL_TYPES_8_BREAKING) return;\n\n if (val && node.computed) {\n throw new TypeError(\n \"Property shorthand of ObjectProperty cannot be true if computed is true\",\n );\n }\n } as Validator,\n { type: \"boolean\" },\n ),\n function (node: t.ObjectProperty, key, val) {\n if (!process.env.BABEL_TYPES_8_BREAKING) return;\n\n if (val && !is(\"Identifier\", node.key)) {\n throw new TypeError(\n \"Property shorthand of ObjectProperty cannot be true if key is not an Identifier\",\n );\n }\n } as Validator,\n ),\n default: false,\n },\n decorators: {\n validate: chain(\n assertValueType(\"array\"),\n assertEach(assertNodeType(\"Decorator\")),\n ),\n optional: true,\n },\n },\n visitor: [\"key\", \"value\", \"decorators\"],\n aliases: [\"UserWhitespacable\", \"Property\", \"ObjectMember\"],\n validate: (function () {\n const pattern = assertNodeType(\n \"Identifier\",\n \"Pattern\",\n \"TSAsExpression\",\n \"TSSatisfiesExpression\",\n \"TSNonNullExpression\",\n \"TSTypeAssertion\",\n );\n const expression = assertNodeType(\"Expression\");\n\n return function (parent, key, node) {\n if (!process.env.BABEL_TYPES_8_BREAKING) return;\n\n const validator = is(\"ObjectPattern\", parent) ? pattern : expression;\n validator(node, \"value\", node.value);\n };\n })(),\n});\n\ndefineType(\"RestElement\", {\n visitor: [\"argument\", \"typeAnnotation\"],\n builder: [\"argument\"],\n aliases: [\"LVal\", \"PatternLike\"],\n deprecatedAlias: \"RestProperty\",\n fields: {\n ...patternLikeCommon(),\n argument: {\n validate: !process.env.BABEL_TYPES_8_BREAKING\n ? assertNodeType(\"LVal\")\n : assertNodeType(\n \"Identifier\",\n \"ArrayPattern\",\n \"ObjectPattern\",\n \"MemberExpression\",\n \"TSAsExpression\",\n \"TSSatisfiesExpression\",\n \"TSTypeAssertion\",\n \"TSNonNullExpression\",\n ),\n },\n },\n validate(parent: t.ArrayPattern | t.ObjectPattern, key) {\n if (!process.env.BABEL_TYPES_8_BREAKING) return;\n\n const match = /(\\w+)\\[(\\d+)\\]/.exec(key);\n if (!match) throw new Error(\"Internal Babel error: malformed key.\");\n\n const [, listKey, index] = match as unknown as [\n string,\n keyof typeof parent,\n string,\n ];\n if ((parent[listKey] as t.Node[]).length > +index + 1) {\n throw new TypeError(`RestElement must be last element of ${listKey}`);\n }\n },\n});\n\ndefineType(\"ReturnStatement\", {\n visitor: [\"argument\"],\n aliases: [\"Statement\", \"Terminatorless\", \"CompletionStatement\"],\n fields: {\n argument: {\n validate: assertNodeType(\"Expression\"),\n optional: true,\n },\n },\n});\n\ndefineType(\"SequenceExpression\", {\n visitor: [\"expressions\"],\n fields: {\n expressions: {\n validate: chain(\n assertValueType(\"array\"),\n assertEach(assertNodeType(\"Expression\")),\n ),\n },\n },\n aliases: [\"Expression\"],\n});\n\ndefineType(\"ParenthesizedExpression\", {\n visitor: [\"expression\"],\n aliases: [\"Expression\", \"ExpressionWrapper\"],\n fields: {\n expression: {\n validate: assertNodeType(\"Expression\"),\n },\n },\n});\n\ndefineType(\"SwitchCase\", {\n visitor: [\"test\", \"consequent\"],\n fields: {\n test: {\n validate: assertNodeType(\"Expression\"),\n optional: true,\n },\n consequent: {\n validate: chain(\n assertValueType(\"array\"),\n assertEach(assertNodeType(\"Statement\")),\n ),\n },\n },\n});\n\ndefineType(\"SwitchStatement\", {\n visitor: [\"discriminant\", \"cases\"],\n aliases: [\"Statement\", \"BlockParent\", \"Scopable\"],\n fields: {\n discriminant: {\n validate: assertNodeType(\"Expression\"),\n },\n cases: {\n validate: chain(\n assertValueType(\"array\"),\n assertEach(assertNodeType(\"SwitchCase\")),\n ),\n },\n },\n});\n\ndefineType(\"ThisExpression\", {\n aliases: [\"Expression\"],\n});\n\ndefineType(\"ThrowStatement\", {\n visitor: [\"argument\"],\n aliases: [\"Statement\", \"Terminatorless\", \"CompletionStatement\"],\n fields: {\n argument: {\n validate: assertNodeType(\"Expression\"),\n },\n },\n});\n\ndefineType(\"TryStatement\", {\n visitor: [\"block\", \"handler\", \"finalizer\"],\n aliases: [\"Statement\"],\n fields: {\n block: {\n validate: chain(\n assertNodeType(\"BlockStatement\"),\n Object.assign(\n function (node: t.TryStatement) {\n if (!process.env.BABEL_TYPES_8_BREAKING) return;\n\n // This validator isn't put at the top level because we can run it\n // even if this node doesn't have a parent.\n\n if (!node.handler && !node.finalizer) {\n throw new TypeError(\n \"TryStatement expects either a handler or finalizer, or both\",\n );\n }\n } as Validator,\n {\n oneOfNodeTypes: [\"BlockStatement\"],\n },\n ),\n ),\n },\n handler: {\n optional: true,\n validate: assertNodeType(\"CatchClause\"),\n },\n finalizer: {\n optional: true,\n validate: assertNodeType(\"BlockStatement\"),\n },\n },\n});\n\ndefineType(\"UnaryExpression\", {\n builder: [\"operator\", \"argument\", \"prefix\"],\n fields: {\n prefix: {\n default: true,\n },\n argument: {\n validate: assertNodeType(\"Expression\"),\n },\n operator: {\n validate: assertOneOf(...UNARY_OPERATORS),\n },\n },\n visitor: [\"argument\"],\n aliases: [\"UnaryLike\", \"Expression\"],\n});\n\ndefineType(\"UpdateExpression\", {\n builder: [\"operator\", \"argument\", \"prefix\"],\n fields: {\n prefix: {\n default: false,\n },\n argument: {\n validate: !process.env.BABEL_TYPES_8_BREAKING\n ? assertNodeType(\"Expression\")\n : assertNodeType(\"Identifier\", \"MemberExpression\"),\n },\n operator: {\n validate: assertOneOf(...UPDATE_OPERATORS),\n },\n },\n visitor: [\"argument\"],\n aliases: [\"Expression\"],\n});\n\ndefineType(\"VariableDeclaration\", {\n builder: [\"kind\", \"declarations\"],\n visitor: [\"declarations\"],\n aliases: [\"Statement\", \"Declaration\"],\n fields: {\n declare: {\n validate: assertValueType(\"boolean\"),\n optional: true,\n },\n kind: {\n validate: assertOneOf(\n \"var\",\n \"let\",\n \"const\",\n // https://github.com/tc39/proposal-explicit-resource-management\n \"using\",\n // https://github.com/tc39/proposal-async-explicit-resource-management\n \"await using\",\n ),\n },\n declarations: {\n validate: chain(\n assertValueType(\"array\"),\n assertEach(assertNodeType(\"VariableDeclarator\")),\n ),\n },\n },\n validate(parent, key, node) {\n if (!process.env.BABEL_TYPES_8_BREAKING) return;\n\n if (!is(\"ForXStatement\", parent, { left: node })) return;\n if (node.declarations.length !== 1) {\n throw new TypeError(\n `Exactly one VariableDeclarator is required in the VariableDeclaration of a ${parent.type}`,\n );\n }\n },\n});\n\ndefineType(\"VariableDeclarator\", {\n visitor: [\"id\", \"init\"],\n fields: {\n id: {\n validate: (function () {\n if (!process.env.BABEL_TYPES_8_BREAKING) {\n return assertNodeType(\"LVal\");\n }\n\n const normal = assertNodeType(\n \"Identifier\",\n \"ArrayPattern\",\n \"ObjectPattern\",\n );\n const without = assertNodeType(\"Identifier\");\n\n return function (node: t.VariableDeclarator, key, val) {\n const validator = node.init ? normal : without;\n validator(node, key, val);\n };\n })(),\n },\n definite: {\n optional: true,\n validate: assertValueType(\"boolean\"),\n },\n init: {\n optional: true,\n validate: assertNodeType(\"Expression\"),\n },\n },\n});\n\ndefineType(\"WhileStatement\", {\n visitor: [\"test\", \"body\"],\n aliases: [\"Statement\", \"BlockParent\", \"Loop\", \"While\", \"Scopable\"],\n fields: {\n test: {\n validate: assertNodeType(\"Expression\"),\n },\n body: {\n validate: assertNodeType(\"Statement\"),\n },\n },\n});\n\ndefineType(\"WithStatement\", {\n visitor: [\"object\", \"body\"],\n aliases: [\"Statement\"],\n fields: {\n object: {\n validate: assertNodeType(\"Expression\"),\n },\n body: {\n validate: assertNodeType(\"Statement\"),\n },\n },\n});\n\n// --- ES2015 ---\ndefineType(\"AssignmentPattern\", {\n visitor: [\"left\", \"right\", \"decorators\" /* for legacy param decorators */],\n builder: [\"left\", \"right\"],\n aliases: [\"Pattern\", \"PatternLike\", \"LVal\"],\n fields: {\n ...patternLikeCommon(),\n left: {\n validate: assertNodeType(\n \"Identifier\",\n \"ObjectPattern\",\n \"ArrayPattern\",\n \"MemberExpression\",\n \"TSAsExpression\",\n \"TSSatisfiesExpression\",\n \"TSTypeAssertion\",\n \"TSNonNullExpression\",\n ),\n },\n right: {\n validate: assertNodeType(\"Expression\"),\n },\n // For TypeScript\n decorators: {\n validate: chain(\n assertValueType(\"array\"),\n assertEach(assertNodeType(\"Decorator\")),\n ),\n optional: true,\n },\n },\n});\n\ndefineType(\"ArrayPattern\", {\n visitor: [\"elements\", \"typeAnnotation\"],\n builder: [\"elements\"],\n aliases: [\"Pattern\", \"PatternLike\", \"LVal\"],\n fields: {\n ...patternLikeCommon(),\n elements: {\n validate: chain(\n assertValueType(\"array\"),\n assertEach(assertNodeOrValueType(\"null\", \"PatternLike\", \"LVal\")),\n ),\n },\n },\n});\n\ndefineType(\"ArrowFunctionExpression\", {\n builder: [\"params\", \"body\", \"async\"],\n visitor: [\"typeParameters\", \"params\", \"returnType\", \"body\"],\n aliases: [\n \"Scopable\",\n \"Function\",\n \"BlockParent\",\n \"FunctionParent\",\n \"Expression\",\n \"Pureish\",\n ],\n fields: {\n ...functionCommon(),\n ...functionTypeAnnotationCommon(),\n expression: {\n // https://github.com/babel/babylon/issues/505\n validate: assertValueType(\"boolean\"),\n },\n body: {\n validate: assertNodeType(\"BlockStatement\", \"Expression\"),\n },\n predicate: {\n validate: assertNodeType(\"DeclaredPredicate\", \"InferredPredicate\"),\n optional: true,\n },\n },\n});\n\ndefineType(\"ClassBody\", {\n visitor: [\"body\"],\n fields: {\n body: {\n validate: chain(\n assertValueType(\"array\"),\n assertEach(\n assertNodeType(\n \"ClassMethod\",\n \"ClassPrivateMethod\",\n \"ClassProperty\",\n \"ClassPrivateProperty\",\n \"ClassAccessorProperty\",\n \"TSDeclareMethod\",\n \"TSIndexSignature\",\n \"StaticBlock\",\n ),\n ),\n ),\n },\n },\n});\n\ndefineType(\"ClassExpression\", {\n builder: [\"id\", \"superClass\", \"body\", \"decorators\"],\n visitor: [\n \"decorators\",\n \"id\",\n \"typeParameters\",\n \"superClass\",\n \"superTypeParameters\",\n \"mixins\",\n \"implements\",\n \"body\",\n ],\n aliases: [\"Scopable\", \"Class\", \"Expression\"],\n fields: {\n id: {\n validate: assertNodeType(\"Identifier\"),\n optional: true,\n },\n typeParameters: {\n validate: process.env.BABEL_8_BREAKING\n ? assertNodeType(\n \"TypeParameterDeclaration\",\n \"TSTypeParameterDeclaration\",\n )\n : assertNodeType(\n \"TypeParameterDeclaration\",\n \"TSTypeParameterDeclaration\",\n // @ts-ignore(Babel 7 vs Babel 8) Babel 7 AST\n \"Noop\",\n ),\n optional: true,\n },\n body: {\n validate: assertNodeType(\"ClassBody\"),\n },\n superClass: {\n optional: true,\n validate: assertNodeType(\"Expression\"),\n },\n superTypeParameters: {\n validate: assertNodeType(\n \"TypeParameterInstantiation\",\n \"TSTypeParameterInstantiation\",\n ),\n optional: true,\n },\n implements: {\n validate: chain(\n assertValueType(\"array\"),\n assertEach(\n assertNodeType(\"TSExpressionWithTypeArguments\", \"ClassImplements\"),\n ),\n ),\n optional: true,\n },\n decorators: {\n validate: chain(\n assertValueType(\"array\"),\n assertEach(assertNodeType(\"Decorator\")),\n ),\n optional: true,\n },\n mixins: {\n validate: assertNodeType(\"InterfaceExtends\"),\n optional: true,\n },\n },\n});\n\ndefineType(\"ClassDeclaration\", {\n inherits: \"ClassExpression\",\n aliases: [\"Scopable\", \"Class\", \"Statement\", \"Declaration\"],\n fields: {\n id: {\n validate: assertNodeType(\"Identifier\"),\n // The id may be omitted if this is the child of an\n // ExportDefaultDeclaration.\n optional: true,\n },\n typeParameters: {\n validate: process.env.BABEL_8_BREAKING\n ? assertNodeType(\n \"TypeParameterDeclaration\",\n \"TSTypeParameterDeclaration\",\n )\n : assertNodeType(\n \"TypeParameterDeclaration\",\n \"TSTypeParameterDeclaration\",\n // @ts-ignore(Babel 7 vs Babel 8) Babel 7 AST\n \"Noop\",\n ),\n optional: true,\n },\n body: {\n validate: assertNodeType(\"ClassBody\"),\n },\n superClass: {\n optional: true,\n validate: assertNodeType(\"Expression\"),\n },\n superTypeParameters: {\n validate: assertNodeType(\n \"TypeParameterInstantiation\",\n \"TSTypeParameterInstantiation\",\n ),\n optional: true,\n },\n implements: {\n validate: chain(\n assertValueType(\"array\"),\n assertEach(\n assertNodeType(\"TSExpressionWithTypeArguments\", \"ClassImplements\"),\n ),\n ),\n optional: true,\n },\n decorators: {\n validate: chain(\n assertValueType(\"array\"),\n assertEach(assertNodeType(\"Decorator\")),\n ),\n optional: true,\n },\n mixins: {\n validate: assertNodeType(\"InterfaceExtends\"),\n optional: true,\n },\n declare: {\n validate: assertValueType(\"boolean\"),\n optional: true,\n },\n abstract: {\n validate: assertValueType(\"boolean\"),\n optional: true,\n },\n },\n validate: (function () {\n const identifier = assertNodeType(\"Identifier\");\n\n return function (parent, key, node) {\n if (!process.env.BABEL_TYPES_8_BREAKING) return;\n\n if (!is(\"ExportDefaultDeclaration\", parent)) {\n identifier(node, \"id\", node.id);\n }\n };\n })(),\n});\n\ndefineType(\"ExportAllDeclaration\", {\n builder: [\"source\"],\n visitor: [\"source\", \"attributes\", \"assertions\"],\n aliases: [\n \"Statement\",\n \"Declaration\",\n \"ImportOrExportDeclaration\",\n \"ExportDeclaration\",\n ],\n fields: {\n source: {\n validate: assertNodeType(\"StringLiteral\"),\n },\n exportKind: validateOptional(assertOneOf(\"type\", \"value\")),\n attributes: {\n optional: true,\n validate: chain(\n assertValueType(\"array\"),\n assertEach(assertNodeType(\"ImportAttribute\")),\n ),\n },\n // TODO(Babel 8): Deprecated\n assertions: {\n optional: true,\n validate: chain(\n assertValueType(\"array\"),\n assertEach(assertNodeType(\"ImportAttribute\")),\n ),\n },\n },\n});\n\ndefineType(\"ExportDefaultDeclaration\", {\n visitor: [\"declaration\"],\n aliases: [\n \"Statement\",\n \"Declaration\",\n \"ImportOrExportDeclaration\",\n \"ExportDeclaration\",\n ],\n fields: {\n declaration: {\n validate: assertNodeType(\n \"TSDeclareFunction\",\n \"FunctionDeclaration\",\n \"ClassDeclaration\",\n \"Expression\",\n ),\n },\n exportKind: validateOptional(assertOneOf(\"value\")),\n },\n});\n\ndefineType(\"ExportNamedDeclaration\", {\n builder: [\"declaration\", \"specifiers\", \"source\"],\n visitor: [\"declaration\", \"specifiers\", \"source\", \"attributes\", \"assertions\"],\n aliases: [\n \"Statement\",\n \"Declaration\",\n \"ImportOrExportDeclaration\",\n \"ExportDeclaration\",\n ],\n fields: {\n declaration: {\n optional: true,\n validate: chain(\n assertNodeType(\"Declaration\"),\n Object.assign(\n function (node: t.ExportNamedDeclaration, key, val) {\n if (!process.env.BABEL_TYPES_8_BREAKING) return;\n\n // This validator isn't put at the top level because we can run it\n // even if this node doesn't have a parent.\n\n if (val && node.specifiers.length) {\n throw new TypeError(\n \"Only declaration or specifiers is allowed on ExportNamedDeclaration\",\n );\n }\n } as Validator,\n { oneOfNodeTypes: [\"Declaration\"] },\n ),\n function (node: t.ExportNamedDeclaration, key, val) {\n if (!process.env.BABEL_TYPES_8_BREAKING) return;\n\n // This validator isn't put at the top level because we can run it\n // even if this node doesn't have a parent.\n\n if (val && node.source) {\n throw new TypeError(\"Cannot export a declaration from a source\");\n }\n },\n ),\n },\n attributes: {\n optional: true,\n validate: chain(\n assertValueType(\"array\"),\n assertEach(assertNodeType(\"ImportAttribute\")),\n ),\n },\n // TODO(Babel 8): Deprecated\n assertions: {\n optional: true,\n validate: chain(\n assertValueType(\"array\"),\n assertEach(assertNodeType(\"ImportAttribute\")),\n ),\n },\n specifiers: {\n default: [],\n validate: chain(\n assertValueType(\"array\"),\n assertEach(\n (function () {\n const sourced = assertNodeType(\n \"ExportSpecifier\",\n \"ExportDefaultSpecifier\",\n \"ExportNamespaceSpecifier\",\n );\n const sourceless = assertNodeType(\"ExportSpecifier\");\n\n if (!process.env.BABEL_TYPES_8_BREAKING) return sourced;\n\n return function (node: t.ExportNamedDeclaration, key, val) {\n const validator = node.source ? sourced : sourceless;\n validator(node, key, val);\n } as Validator;\n })(),\n ),\n ),\n },\n source: {\n validate: assertNodeType(\"StringLiteral\"),\n optional: true,\n },\n exportKind: validateOptional(assertOneOf(\"type\", \"value\")),\n },\n});\n\ndefineType(\"ExportSpecifier\", {\n visitor: [\"local\", \"exported\"],\n aliases: [\"ModuleSpecifier\"],\n fields: {\n local: {\n validate: assertNodeType(\"Identifier\"),\n },\n exported: {\n validate: assertNodeType(\"Identifier\", \"StringLiteral\"),\n },\n exportKind: {\n // And TypeScript's \"export { type foo } from\"\n validate: assertOneOf(\"type\", \"value\"),\n optional: true,\n },\n },\n});\n\ndefineType(\"ForOfStatement\", {\n visitor: [\"left\", \"right\", \"body\"],\n builder: [\"left\", \"right\", \"body\", \"await\"],\n aliases: [\n \"Scopable\",\n \"Statement\",\n \"For\",\n \"BlockParent\",\n \"Loop\",\n \"ForXStatement\",\n ],\n fields: {\n left: {\n validate: (function () {\n if (!process.env.BABEL_TYPES_8_BREAKING) {\n return assertNodeType(\"VariableDeclaration\", \"LVal\");\n }\n\n const declaration = assertNodeType(\"VariableDeclaration\");\n const lval = assertNodeType(\n \"Identifier\",\n \"MemberExpression\",\n \"ArrayPattern\",\n \"ObjectPattern\",\n \"TSAsExpression\",\n \"TSSatisfiesExpression\",\n \"TSTypeAssertion\",\n \"TSNonNullExpression\",\n );\n\n return function (node, key, val) {\n if (is(\"VariableDeclaration\", val)) {\n declaration(node, key, val);\n } else {\n lval(node, key, val);\n }\n };\n })(),\n },\n right: {\n validate: assertNodeType(\"Expression\"),\n },\n body: {\n validate: assertNodeType(\"Statement\"),\n },\n await: {\n default: false,\n },\n },\n});\n\ndefineType(\"ImportDeclaration\", {\n builder: [\"specifiers\", \"source\"],\n visitor: [\"specifiers\", \"source\", \"attributes\", \"assertions\"],\n aliases: [\"Statement\", \"Declaration\", \"ImportOrExportDeclaration\"],\n fields: {\n attributes: {\n optional: true,\n validate: chain(\n assertValueType(\"array\"),\n assertEach(assertNodeType(\"ImportAttribute\")),\n ),\n },\n // TODO(Babel 8): Deprecated\n assertions: {\n optional: true,\n validate: chain(\n assertValueType(\"array\"),\n assertEach(assertNodeType(\"ImportAttribute\")),\n ),\n },\n module: {\n optional: true,\n validate: assertValueType(\"boolean\"),\n },\n phase: {\n default: null,\n validate: assertOneOf(\"source\", \"defer\"),\n },\n specifiers: {\n validate: chain(\n assertValueType(\"array\"),\n assertEach(\n assertNodeType(\n \"ImportSpecifier\",\n \"ImportDefaultSpecifier\",\n \"ImportNamespaceSpecifier\",\n ),\n ),\n ),\n },\n source: {\n validate: assertNodeType(\"StringLiteral\"),\n },\n importKind: {\n // Handle TypeScript/Flowtype's extension \"import type foo from\"\n // TypeScript doesn't support typeof\n validate: assertOneOf(\"type\", \"typeof\", \"value\"),\n optional: true,\n },\n },\n});\n\ndefineType(\"ImportDefaultSpecifier\", {\n visitor: [\"local\"],\n aliases: [\"ModuleSpecifier\"],\n fields: {\n local: {\n validate: assertNodeType(\"Identifier\"),\n },\n },\n});\n\ndefineType(\"ImportNamespaceSpecifier\", {\n visitor: [\"local\"],\n aliases: [\"ModuleSpecifier\"],\n fields: {\n local: {\n validate: assertNodeType(\"Identifier\"),\n },\n },\n});\n\ndefineType(\"ImportSpecifier\", {\n visitor: [\"imported\", \"local\"],\n builder: [\"local\", \"imported\"],\n aliases: [\"ModuleSpecifier\"],\n fields: {\n local: {\n validate: assertNodeType(\"Identifier\"),\n },\n imported: {\n validate: assertNodeType(\"Identifier\", \"StringLiteral\"),\n },\n importKind: {\n // Handle Flowtype's extension \"import {typeof foo} from\"\n // And TypeScript's \"import { type foo } from\"\n validate: assertOneOf(\"type\", \"typeof\", \"value\"),\n optional: true,\n },\n },\n});\n\ndefineType(\"ImportExpression\", {\n visitor: [\"source\", \"options\"],\n aliases: [\"Expression\"],\n fields: {\n phase: {\n default: null,\n validate: assertOneOf(\"source\", \"defer\"),\n },\n source: {\n validate: assertNodeType(\"Expression\"),\n },\n options: {\n validate: assertNodeType(\"Expression\"),\n optional: true,\n },\n },\n});\n\ndefineType(\"MetaProperty\", {\n visitor: [\"meta\", \"property\"],\n aliases: [\"Expression\"],\n fields: {\n meta: {\n validate: chain(\n assertNodeType(\"Identifier\"),\n Object.assign(\n function (node: t.MetaProperty, key, val) {\n if (!process.env.BABEL_TYPES_8_BREAKING) return;\n\n let property;\n switch (val.name) {\n case \"function\":\n property = \"sent\";\n break;\n case \"new\":\n property = \"target\";\n break;\n case \"import\":\n property = \"meta\";\n break;\n }\n if (!is(\"Identifier\", node.property, { name: property })) {\n throw new TypeError(\"Unrecognised MetaProperty\");\n }\n } as Validator,\n { oneOfNodeTypes: [\"Identifier\"] },\n ),\n ),\n },\n property: {\n validate: assertNodeType(\"Identifier\"),\n },\n },\n});\n\nexport const classMethodOrPropertyCommon = () => ({\n abstract: {\n validate: assertValueType(\"boolean\"),\n optional: true,\n },\n accessibility: {\n validate: assertOneOf(\"public\", \"private\", \"protected\"),\n optional: true,\n },\n static: {\n default: false,\n },\n override: {\n default: false,\n },\n computed: {\n default: false,\n },\n optional: {\n validate: assertValueType(\"boolean\"),\n optional: true,\n },\n key: {\n validate: chain(\n (function () {\n const normal = assertNodeType(\n \"Identifier\",\n \"StringLiteral\",\n \"NumericLiteral\",\n \"BigIntLiteral\",\n );\n const computed = assertNodeType(\"Expression\");\n\n return function (node: any, key: string, val: any) {\n const validator = node.computed ? computed : normal;\n validator(node, key, val);\n };\n })(),\n assertNodeType(\n \"Identifier\",\n \"StringLiteral\",\n \"NumericLiteral\",\n \"BigIntLiteral\",\n \"Expression\",\n ),\n ),\n },\n});\n\nexport const classMethodOrDeclareMethodCommon = () => ({\n ...functionCommon(),\n ...classMethodOrPropertyCommon(),\n params: {\n validate: chain(\n assertValueType(\"array\"),\n assertEach(\n assertNodeType(\n \"Identifier\",\n \"Pattern\",\n \"RestElement\",\n \"TSParameterProperty\",\n ),\n ),\n ),\n },\n kind: {\n validate: assertOneOf(\"get\", \"set\", \"method\", \"constructor\"),\n default: \"method\",\n },\n access: {\n validate: chain(\n assertValueType(\"string\"),\n assertOneOf(\"public\", \"private\", \"protected\"),\n ),\n optional: true,\n },\n decorators: {\n validate: chain(\n assertValueType(\"array\"),\n assertEach(assertNodeType(\"Decorator\")),\n ),\n optional: true,\n },\n});\n\ndefineType(\"ClassMethod\", {\n aliases: [\"Function\", \"Scopable\", \"BlockParent\", \"FunctionParent\", \"Method\"],\n builder: [\n \"kind\",\n \"key\",\n \"params\",\n \"body\",\n \"computed\",\n \"static\",\n \"generator\",\n \"async\",\n ],\n visitor: [\n \"decorators\",\n \"key\",\n \"typeParameters\",\n \"params\",\n \"returnType\",\n \"body\",\n ],\n fields: {\n ...classMethodOrDeclareMethodCommon(),\n ...functionTypeAnnotationCommon(),\n body: {\n validate: assertNodeType(\"BlockStatement\"),\n },\n },\n});\n\ndefineType(\"ObjectPattern\", {\n visitor: [\n \"properties\",\n \"typeAnnotation\",\n \"decorators\" /* for legacy param decorators */,\n ],\n builder: [\"properties\"],\n aliases: [\"Pattern\", \"PatternLike\", \"LVal\"],\n fields: {\n ...patternLikeCommon(),\n properties: {\n validate: chain(\n assertValueType(\"array\"),\n assertEach(assertNodeType(\"RestElement\", \"ObjectProperty\")),\n ),\n },\n },\n});\n\ndefineType(\"SpreadElement\", {\n visitor: [\"argument\"],\n aliases: [\"UnaryLike\"],\n deprecatedAlias: \"SpreadProperty\",\n fields: {\n argument: {\n validate: assertNodeType(\"Expression\"),\n },\n },\n});\n\ndefineType(\n \"Super\",\n process.env.BABEL_8_BREAKING\n ? undefined\n : {\n aliases: [\"Expression\"],\n },\n);\n\ndefineType(\"TaggedTemplateExpression\", {\n visitor: [\"tag\", \"typeParameters\", \"quasi\"],\n builder: [\"tag\", \"quasi\"],\n aliases: [\"Expression\"],\n fields: {\n tag: {\n validate: assertNodeType(\"Expression\"),\n },\n quasi: {\n validate: assertNodeType(\"TemplateLiteral\"),\n },\n typeParameters: {\n validate: assertNodeType(\n \"TypeParameterInstantiation\",\n \"TSTypeParameterInstantiation\",\n ),\n optional: true,\n },\n },\n});\n\ndefineType(\"TemplateElement\", {\n builder: [\"value\", \"tail\"],\n fields: {\n value: {\n validate: chain(\n assertShape({\n raw: {\n validate: assertValueType(\"string\"),\n },\n cooked: {\n validate: assertValueType(\"string\"),\n optional: true,\n },\n }),\n function templateElementCookedValidator(node: t.TemplateElement) {\n const raw = node.value.raw;\n\n let unterminatedCalled = false;\n\n const error = () => {\n // unreachable\n throw new Error(\"Internal @babel/types error.\");\n };\n const { str, firstInvalidLoc } = readStringContents(\n \"template\",\n raw,\n 0,\n 0,\n 0,\n {\n unterminated() {\n unterminatedCalled = true;\n },\n strictNumericEscape: error,\n invalidEscapeSequence: error,\n numericSeparatorInEscapeSequence: error,\n unexpectedNumericSeparator: error,\n invalidDigit: error,\n invalidCodePoint: error,\n },\n );\n if (!unterminatedCalled) throw new Error(\"Invalid raw\");\n\n node.value.cooked = firstInvalidLoc ? null : str;\n },\n ),\n },\n tail: {\n default: false,\n },\n },\n});\n\ndefineType(\"TemplateLiteral\", {\n visitor: [\"quasis\", \"expressions\"],\n aliases: [\"Expression\", \"Literal\"],\n fields: {\n quasis: {\n validate: chain(\n assertValueType(\"array\"),\n assertEach(assertNodeType(\"TemplateElement\")),\n ),\n },\n expressions: {\n validate: chain(\n assertValueType(\"array\"),\n assertEach(\n assertNodeType(\n \"Expression\",\n // For TypeScript template literal types\n \"TSType\",\n ),\n ),\n function (node: t.TemplateLiteral, key, val) {\n if (node.quasis.length !== val.length + 1) {\n throw new TypeError(\n `Number of ${\n node.type\n } quasis should be exactly one more than the number of expressions.\\nExpected ${\n val.length + 1\n } quasis but got ${node.quasis.length}`,\n );\n }\n } as Validator,\n ),\n },\n },\n});\n\ndefineType(\"YieldExpression\", {\n builder: [\"argument\", \"delegate\"],\n visitor: [\"argument\"],\n aliases: [\"Expression\", \"Terminatorless\"],\n fields: {\n delegate: {\n validate: chain(\n assertValueType(\"boolean\"),\n Object.assign(\n function (node: t.YieldExpression, key, val) {\n if (!process.env.BABEL_TYPES_8_BREAKING) return;\n\n if (val && !node.argument) {\n throw new TypeError(\n \"Property delegate of YieldExpression cannot be true if there is no argument\",\n );\n }\n } as Validator,\n { type: \"boolean\" },\n ),\n ),\n default: false,\n },\n argument: {\n optional: true,\n validate: assertNodeType(\"Expression\"),\n },\n },\n});\n\n// --- ES2017 ---\ndefineType(\"AwaitExpression\", {\n builder: [\"argument\"],\n visitor: [\"argument\"],\n aliases: [\"Expression\", \"Terminatorless\"],\n fields: {\n argument: {\n validate: assertNodeType(\"Expression\"),\n },\n },\n});\n\n// --- ES2019 ---\ndefineType(\"Import\", {\n aliases: [\"Expression\"],\n});\n\n// --- ES2020 ---\ndefineType(\"BigIntLiteral\", {\n builder: [\"value\"],\n fields: {\n value: {\n validate: assertValueType(\"string\"),\n },\n },\n aliases: [\"Expression\", \"Pureish\", \"Literal\", \"Immutable\"],\n});\n\ndefineType(\"ExportNamespaceSpecifier\", {\n visitor: [\"exported\"],\n aliases: [\"ModuleSpecifier\"],\n fields: {\n exported: {\n validate: assertNodeType(\"Identifier\"),\n },\n },\n});\n\ndefineType(\"OptionalMemberExpression\", {\n builder: [\"object\", \"property\", \"computed\", \"optional\"],\n visitor: [\"object\", \"property\"],\n aliases: [\"Expression\"],\n fields: {\n object: {\n validate: assertNodeType(\"Expression\"),\n },\n property: {\n validate: (function () {\n const normal = assertNodeType(\"Identifier\");\n const computed = assertNodeType(\"Expression\");\n\n const validator: Validator = Object.assign(\n function (node: t.OptionalMemberExpression, key, val) {\n const validator = node.computed ? computed : normal;\n validator(node, key, val);\n } as Validator,\n // todo(ts): can be discriminated union by `computed` property\n { oneOfNodeTypes: [\"Expression\", \"Identifier\"] },\n );\n return validator;\n })(),\n },\n computed: {\n default: false,\n },\n optional: {\n validate: !process.env.BABEL_TYPES_8_BREAKING\n ? assertValueType(\"boolean\")\n : chain(assertValueType(\"boolean\"), assertOptionalChainStart()),\n },\n },\n});\n\ndefineType(\"OptionalCallExpression\", {\n visitor: [\"callee\", \"arguments\", \"typeParameters\", \"typeArguments\"],\n builder: [\"callee\", \"arguments\", \"optional\"],\n aliases: [\"Expression\"],\n fields: {\n callee: {\n validate: assertNodeType(\"Expression\"),\n },\n arguments: {\n validate: chain(\n assertValueType(\"array\"),\n assertEach(\n assertNodeType(\"Expression\", \"SpreadElement\", \"ArgumentPlaceholder\"),\n ),\n ),\n },\n optional: {\n validate: !process.env.BABEL_TYPES_8_BREAKING\n ? assertValueType(\"boolean\")\n : chain(assertValueType(\"boolean\"), assertOptionalChainStart()),\n },\n typeArguments: {\n validate: assertNodeType(\"TypeParameterInstantiation\"),\n optional: true,\n },\n typeParameters: {\n validate: assertNodeType(\"TSTypeParameterInstantiation\"),\n optional: true,\n },\n },\n});\n\n// --- ES2022 ---\ndefineType(\"ClassProperty\", {\n visitor: [\"decorators\", \"key\", \"typeAnnotation\", \"value\"],\n builder: [\n \"key\",\n \"value\",\n \"typeAnnotation\",\n \"decorators\",\n \"computed\",\n \"static\",\n ],\n aliases: [\"Property\"],\n fields: {\n ...classMethodOrPropertyCommon(),\n value: {\n validate: assertNodeType(\"Expression\"),\n optional: true,\n },\n definite: {\n validate: assertValueType(\"boolean\"),\n optional: true,\n },\n typeAnnotation: {\n validate: process.env.BABEL_8_BREAKING\n ? assertNodeType(\"TypeAnnotation\", \"TSTypeAnnotation\")\n : assertNodeType(\n \"TypeAnnotation\",\n \"TSTypeAnnotation\",\n // @ts-ignore(Babel 7 vs Babel 8) Babel 7 AST\n \"Noop\",\n ),\n optional: true,\n },\n decorators: {\n validate: chain(\n assertValueType(\"array\"),\n assertEach(assertNodeType(\"Decorator\")),\n ),\n optional: true,\n },\n readonly: {\n validate: assertValueType(\"boolean\"),\n optional: true,\n },\n declare: {\n validate: assertValueType(\"boolean\"),\n optional: true,\n },\n variance: {\n validate: assertNodeType(\"Variance\"),\n optional: true,\n },\n },\n});\n\ndefineType(\"ClassAccessorProperty\", {\n visitor: [\"decorators\", \"key\", \"typeAnnotation\", \"value\"],\n builder: [\n \"key\",\n \"value\",\n \"typeAnnotation\",\n \"decorators\",\n \"computed\",\n \"static\",\n ],\n aliases: [\"Property\", \"Accessor\"],\n fields: {\n ...classMethodOrPropertyCommon(),\n key: {\n validate: chain(\n (function () {\n const normal = assertNodeType(\n \"Identifier\",\n \"StringLiteral\",\n \"NumericLiteral\",\n \"BigIntLiteral\",\n \"PrivateName\",\n );\n const computed = assertNodeType(\"Expression\");\n\n return function (node: any, key: string, val: any) {\n const validator = node.computed ? computed : normal;\n validator(node, key, val);\n };\n })(),\n assertNodeType(\n \"Identifier\",\n \"StringLiteral\",\n \"NumericLiteral\",\n \"BigIntLiteral\",\n \"Expression\",\n \"PrivateName\",\n ),\n ),\n },\n value: {\n validate: assertNodeType(\"Expression\"),\n optional: true,\n },\n definite: {\n validate: assertValueType(\"boolean\"),\n optional: true,\n },\n typeAnnotation: {\n validate: process.env.BABEL_8_BREAKING\n ? assertNodeType(\"TypeAnnotation\", \"TSTypeAnnotation\")\n : assertNodeType(\n \"TypeAnnotation\",\n \"TSTypeAnnotation\",\n // @ts-ignore(Babel 7 vs Babel 8) Babel 7 AST\n \"Noop\",\n ),\n optional: true,\n },\n decorators: {\n validate: chain(\n assertValueType(\"array\"),\n assertEach(assertNodeType(\"Decorator\")),\n ),\n optional: true,\n },\n readonly: {\n validate: assertValueType(\"boolean\"),\n optional: true,\n },\n declare: {\n validate: assertValueType(\"boolean\"),\n optional: true,\n },\n variance: {\n validate: assertNodeType(\"Variance\"),\n optional: true,\n },\n },\n});\n\ndefineType(\"ClassPrivateProperty\", {\n visitor: [\"decorators\", \"key\", \"typeAnnotation\", \"value\"],\n builder: [\"key\", \"value\", \"decorators\", \"static\"],\n aliases: [\"Property\", \"Private\"],\n fields: {\n key: {\n validate: assertNodeType(\"PrivateName\"),\n },\n value: {\n validate: assertNodeType(\"Expression\"),\n optional: true,\n },\n typeAnnotation: {\n validate: process.env.BABEL_8_BREAKING\n ? assertNodeType(\"TypeAnnotation\", \"TSTypeAnnotation\")\n : assertNodeType(\n \"TypeAnnotation\",\n \"TSTypeAnnotation\",\n // @ts-ignore(Babel 7 vs Babel 8) Babel 7 AST\n \"Noop\",\n ),\n optional: true,\n },\n decorators: {\n validate: chain(\n assertValueType(\"array\"),\n assertEach(assertNodeType(\"Decorator\")),\n ),\n optional: true,\n },\n static: {\n validate: assertValueType(\"boolean\"),\n default: false,\n },\n readonly: {\n validate: assertValueType(\"boolean\"),\n optional: true,\n },\n definite: {\n validate: assertValueType(\"boolean\"),\n optional: true,\n },\n variance: {\n validate: assertNodeType(\"Variance\"),\n optional: true,\n },\n },\n});\n\ndefineType(\"ClassPrivateMethod\", {\n builder: [\"kind\", \"key\", \"params\", \"body\", \"static\"],\n visitor: [\n \"decorators\",\n \"key\",\n \"typeParameters\",\n \"params\",\n \"returnType\",\n \"body\",\n ],\n aliases: [\n \"Function\",\n \"Scopable\",\n \"BlockParent\",\n \"FunctionParent\",\n \"Method\",\n \"Private\",\n ],\n fields: {\n ...classMethodOrDeclareMethodCommon(),\n ...functionTypeAnnotationCommon(),\n kind: {\n validate: assertOneOf(\"get\", \"set\", \"method\"),\n default: \"method\",\n },\n key: {\n validate: assertNodeType(\"PrivateName\"),\n },\n body: {\n validate: assertNodeType(\"BlockStatement\"),\n },\n },\n});\n\ndefineType(\"PrivateName\", {\n visitor: [\"id\"],\n aliases: [\"Private\"],\n fields: {\n id: {\n validate: assertNodeType(\"Identifier\"),\n },\n },\n});\n\ndefineType(\"StaticBlock\", {\n visitor: [\"body\"],\n fields: {\n body: {\n validate: chain(\n assertValueType(\"array\"),\n assertEach(assertNodeType(\"Statement\")),\n ),\n },\n },\n aliases: [\"Scopable\", \"BlockParent\", \"FunctionParent\"],\n});\n","import {\n defineAliasedType,\n arrayOfType,\n assertOneOf,\n assertValueType,\n validate,\n validateArrayOfType,\n validateOptional,\n validateOptionalType,\n validateType,\n} from \"./utils.ts\";\n\nconst defineType = defineAliasedType(\"Flow\");\n\nconst defineInterfaceishType = (\n name: \"DeclareClass\" | \"DeclareInterface\" | \"InterfaceDeclaration\",\n) => {\n const isDeclareClass = name === \"DeclareClass\";\n\n defineType(name, {\n builder: [\"id\", \"typeParameters\", \"extends\", \"body\"],\n visitor: [\n \"id\",\n \"typeParameters\",\n \"extends\",\n ...(isDeclareClass ? [\"mixins\", \"implements\"] : []),\n \"body\",\n ],\n aliases: [\"FlowDeclaration\", \"Statement\", \"Declaration\"],\n fields: {\n id: validateType(\"Identifier\"),\n typeParameters: validateOptionalType(\"TypeParameterDeclaration\"),\n extends: validateOptional(arrayOfType(\"InterfaceExtends\")),\n ...(isDeclareClass\n ? {\n mixins: validateOptional(arrayOfType(\"InterfaceExtends\")),\n implements: validateOptional(arrayOfType(\"ClassImplements\")),\n }\n : {}),\n body: validateType(\"ObjectTypeAnnotation\"),\n },\n });\n};\n\ndefineType(\"AnyTypeAnnotation\", {\n aliases: [\"FlowType\", \"FlowBaseAnnotation\"],\n});\n\ndefineType(\"ArrayTypeAnnotation\", {\n visitor: [\"elementType\"],\n aliases: [\"FlowType\"],\n fields: {\n elementType: validateType(\"FlowType\"),\n },\n});\n\ndefineType(\"BooleanTypeAnnotation\", {\n aliases: [\"FlowType\", \"FlowBaseAnnotation\"],\n});\n\ndefineType(\"BooleanLiteralTypeAnnotation\", {\n builder: [\"value\"],\n aliases: [\"FlowType\"],\n fields: {\n value: validate(assertValueType(\"boolean\")),\n },\n});\n\ndefineType(\"NullLiteralTypeAnnotation\", {\n aliases: [\"FlowType\", \"FlowBaseAnnotation\"],\n});\n\ndefineType(\"ClassImplements\", {\n visitor: [\"id\", \"typeParameters\"],\n fields: {\n id: validateType(\"Identifier\"),\n typeParameters: validateOptionalType(\"TypeParameterInstantiation\"),\n },\n});\n\ndefineInterfaceishType(\"DeclareClass\");\n\ndefineType(\"DeclareFunction\", {\n visitor: [\"id\"],\n aliases: [\"FlowDeclaration\", \"Statement\", \"Declaration\"],\n fields: {\n id: validateType(\"Identifier\"),\n predicate: validateOptionalType(\"DeclaredPredicate\"),\n },\n});\n\ndefineInterfaceishType(\"DeclareInterface\");\n\ndefineType(\"DeclareModule\", {\n builder: [\"id\", \"body\", \"kind\"],\n visitor: [\"id\", \"body\"],\n aliases: [\"FlowDeclaration\", \"Statement\", \"Declaration\"],\n fields: {\n id: validateType([\"Identifier\", \"StringLiteral\"]),\n body: validateType(\"BlockStatement\"),\n kind: validateOptional(assertOneOf(\"CommonJS\", \"ES\")),\n },\n});\n\ndefineType(\"DeclareModuleExports\", {\n visitor: [\"typeAnnotation\"],\n aliases: [\"FlowDeclaration\", \"Statement\", \"Declaration\"],\n fields: {\n typeAnnotation: validateType(\"TypeAnnotation\"),\n },\n});\n\ndefineType(\"DeclareTypeAlias\", {\n visitor: [\"id\", \"typeParameters\", \"right\"],\n aliases: [\"FlowDeclaration\", \"Statement\", \"Declaration\"],\n fields: {\n id: validateType(\"Identifier\"),\n typeParameters: validateOptionalType(\"TypeParameterDeclaration\"),\n right: validateType(\"FlowType\"),\n },\n});\n\ndefineType(\"DeclareOpaqueType\", {\n visitor: [\"id\", \"typeParameters\", \"supertype\"],\n aliases: [\"FlowDeclaration\", \"Statement\", \"Declaration\"],\n fields: {\n id: validateType(\"Identifier\"),\n typeParameters: validateOptionalType(\"TypeParameterDeclaration\"),\n supertype: validateOptionalType(\"FlowType\"),\n impltype: validateOptionalType(\"FlowType\"),\n },\n});\n\ndefineType(\"DeclareVariable\", {\n visitor: [\"id\"],\n aliases: [\"FlowDeclaration\", \"Statement\", \"Declaration\"],\n fields: {\n id: validateType(\"Identifier\"),\n },\n});\n\ndefineType(\"DeclareExportDeclaration\", {\n visitor: [\"declaration\", \"specifiers\", \"source\"],\n aliases: [\"FlowDeclaration\", \"Statement\", \"Declaration\"],\n fields: {\n declaration: validateOptionalType(\"Flow\"),\n specifiers: validateOptional(\n arrayOfType([\"ExportSpecifier\", \"ExportNamespaceSpecifier\"]),\n ),\n source: validateOptionalType(\"StringLiteral\"),\n default: validateOptional(assertValueType(\"boolean\")),\n },\n});\n\ndefineType(\"DeclareExportAllDeclaration\", {\n visitor: [\"source\"],\n aliases: [\"FlowDeclaration\", \"Statement\", \"Declaration\"],\n fields: {\n source: validateType(\"StringLiteral\"),\n exportKind: validateOptional(assertOneOf(\"type\", \"value\")),\n },\n});\n\ndefineType(\"DeclaredPredicate\", {\n visitor: [\"value\"],\n aliases: [\"FlowPredicate\"],\n fields: {\n value: validateType(\"Flow\"),\n },\n});\n\ndefineType(\"ExistsTypeAnnotation\", {\n aliases: [\"FlowType\"],\n});\n\ndefineType(\"FunctionTypeAnnotation\", {\n visitor: [\"typeParameters\", \"params\", \"rest\", \"returnType\"],\n aliases: [\"FlowType\"],\n fields: {\n typeParameters: validateOptionalType(\"TypeParameterDeclaration\"),\n params: validate(arrayOfType(\"FunctionTypeParam\")),\n rest: validateOptionalType(\"FunctionTypeParam\"),\n this: validateOptionalType(\"FunctionTypeParam\"),\n returnType: validateType(\"FlowType\"),\n },\n});\n\ndefineType(\"FunctionTypeParam\", {\n visitor: [\"name\", \"typeAnnotation\"],\n fields: {\n name: validateOptionalType(\"Identifier\"),\n typeAnnotation: validateType(\"FlowType\"),\n optional: validateOptional(assertValueType(\"boolean\")),\n },\n});\n\ndefineType(\"GenericTypeAnnotation\", {\n visitor: [\"id\", \"typeParameters\"],\n aliases: [\"FlowType\"],\n fields: {\n id: validateType([\"Identifier\", \"QualifiedTypeIdentifier\"]),\n typeParameters: validateOptionalType(\"TypeParameterInstantiation\"),\n },\n});\n\ndefineType(\"InferredPredicate\", {\n aliases: [\"FlowPredicate\"],\n});\n\ndefineType(\"InterfaceExtends\", {\n visitor: [\"id\", \"typeParameters\"],\n fields: {\n id: validateType([\"Identifier\", \"QualifiedTypeIdentifier\"]),\n typeParameters: validateOptionalType(\"TypeParameterInstantiation\"),\n },\n});\n\ndefineInterfaceishType(\"InterfaceDeclaration\");\n\ndefineType(\"InterfaceTypeAnnotation\", {\n visitor: [\"extends\", \"body\"],\n aliases: [\"FlowType\"],\n fields: {\n extends: validateOptional(arrayOfType(\"InterfaceExtends\")),\n body: validateType(\"ObjectTypeAnnotation\"),\n },\n});\n\ndefineType(\"IntersectionTypeAnnotation\", {\n visitor: [\"types\"],\n aliases: [\"FlowType\"],\n fields: {\n types: validate(arrayOfType(\"FlowType\")),\n },\n});\n\ndefineType(\"MixedTypeAnnotation\", {\n aliases: [\"FlowType\", \"FlowBaseAnnotation\"],\n});\n\ndefineType(\"EmptyTypeAnnotation\", {\n aliases: [\"FlowType\", \"FlowBaseAnnotation\"],\n});\n\ndefineType(\"NullableTypeAnnotation\", {\n visitor: [\"typeAnnotation\"],\n aliases: [\"FlowType\"],\n fields: {\n typeAnnotation: validateType(\"FlowType\"),\n },\n});\n\ndefineType(\"NumberLiteralTypeAnnotation\", {\n builder: [\"value\"],\n aliases: [\"FlowType\"],\n fields: {\n value: validate(assertValueType(\"number\")),\n },\n});\n\ndefineType(\"NumberTypeAnnotation\", {\n aliases: [\"FlowType\", \"FlowBaseAnnotation\"],\n});\n\ndefineType(\"ObjectTypeAnnotation\", {\n visitor: [\"properties\", \"indexers\", \"callProperties\", \"internalSlots\"],\n aliases: [\"FlowType\"],\n builder: [\n \"properties\",\n \"indexers\",\n \"callProperties\",\n \"internalSlots\",\n \"exact\",\n ],\n fields: {\n properties: validate(\n arrayOfType([\"ObjectTypeProperty\", \"ObjectTypeSpreadProperty\"]),\n ),\n indexers: {\n validate: arrayOfType(\"ObjectTypeIndexer\"),\n optional: process.env.BABEL_8_BREAKING ? false : true,\n default: [],\n },\n callProperties: {\n validate: arrayOfType(\"ObjectTypeCallProperty\"),\n optional: process.env.BABEL_8_BREAKING ? false : true,\n default: [],\n },\n internalSlots: {\n validate: arrayOfType(\"ObjectTypeInternalSlot\"),\n optional: process.env.BABEL_8_BREAKING ? false : true,\n default: [],\n },\n exact: {\n validate: assertValueType(\"boolean\"),\n default: false,\n },\n // If the inexact flag is present then this is an object type, and not a\n // declare class, declare interface, or interface. If it is true, the\n // object uses ... to express that it is inexact.\n inexact: validateOptional(assertValueType(\"boolean\")),\n },\n});\n\ndefineType(\"ObjectTypeInternalSlot\", {\n visitor: [\"id\", \"value\"],\n builder: [\"id\", \"value\", \"optional\", \"static\", \"method\"],\n aliases: [\"UserWhitespacable\"],\n fields: {\n id: validateType(\"Identifier\"),\n value: validateType(\"FlowType\"),\n optional: validate(assertValueType(\"boolean\")),\n static: validate(assertValueType(\"boolean\")),\n method: validate(assertValueType(\"boolean\")),\n },\n});\n\ndefineType(\"ObjectTypeCallProperty\", {\n visitor: [\"value\"],\n aliases: [\"UserWhitespacable\"],\n fields: {\n value: validateType(\"FlowType\"),\n static: validate(assertValueType(\"boolean\")),\n },\n});\n\ndefineType(\"ObjectTypeIndexer\", {\n visitor: [\"variance\", \"id\", \"key\", \"value\"],\n builder: [\"id\", \"key\", \"value\", \"variance\"],\n aliases: [\"UserWhitespacable\"],\n fields: {\n id: validateOptionalType(\"Identifier\"),\n key: validateType(\"FlowType\"),\n value: validateType(\"FlowType\"),\n static: validate(assertValueType(\"boolean\")),\n variance: validateOptionalType(\"Variance\"),\n },\n});\n\ndefineType(\"ObjectTypeProperty\", {\n visitor: [\"key\", \"value\", \"variance\"],\n aliases: [\"UserWhitespacable\"],\n fields: {\n key: validateType([\"Identifier\", \"StringLiteral\"]),\n value: validateType(\"FlowType\"),\n kind: validate(assertOneOf(\"init\", \"get\", \"set\")),\n static: validate(assertValueType(\"boolean\")),\n proto: validate(assertValueType(\"boolean\")),\n optional: validate(assertValueType(\"boolean\")),\n variance: validateOptionalType(\"Variance\"),\n method: validate(assertValueType(\"boolean\")),\n },\n});\n\ndefineType(\"ObjectTypeSpreadProperty\", {\n visitor: [\"argument\"],\n aliases: [\"UserWhitespacable\"],\n fields: {\n argument: validateType(\"FlowType\"),\n },\n});\n\ndefineType(\"OpaqueType\", {\n visitor: [\"id\", \"typeParameters\", \"supertype\", \"impltype\"],\n aliases: [\"FlowDeclaration\", \"Statement\", \"Declaration\"],\n fields: {\n id: validateType(\"Identifier\"),\n typeParameters: validateOptionalType(\"TypeParameterDeclaration\"),\n supertype: validateOptionalType(\"FlowType\"),\n impltype: validateType(\"FlowType\"),\n },\n});\n\ndefineType(\"QualifiedTypeIdentifier\", {\n visitor: [\"qualification\", \"id\"],\n builder: [\"id\", \"qualification\"],\n fields: {\n id: validateType(\"Identifier\"),\n qualification: validateType([\"Identifier\", \"QualifiedTypeIdentifier\"]),\n },\n});\n\ndefineType(\"StringLiteralTypeAnnotation\", {\n builder: [\"value\"],\n aliases: [\"FlowType\"],\n fields: {\n value: validate(assertValueType(\"string\")),\n },\n});\n\ndefineType(\"StringTypeAnnotation\", {\n aliases: [\"FlowType\", \"FlowBaseAnnotation\"],\n});\n\ndefineType(\"SymbolTypeAnnotation\", {\n aliases: [\"FlowType\", \"FlowBaseAnnotation\"],\n});\n\ndefineType(\"ThisTypeAnnotation\", {\n aliases: [\"FlowType\", \"FlowBaseAnnotation\"],\n});\n\ndefineType(\"TupleTypeAnnotation\", {\n visitor: [\"types\"],\n aliases: [\"FlowType\"],\n fields: {\n types: validate(arrayOfType(\"FlowType\")),\n },\n});\n\ndefineType(\"TypeofTypeAnnotation\", {\n visitor: [\"argument\"],\n aliases: [\"FlowType\"],\n fields: {\n argument: validateType(\"FlowType\"),\n },\n});\n\ndefineType(\"TypeAlias\", {\n visitor: [\"id\", \"typeParameters\", \"right\"],\n aliases: [\"FlowDeclaration\", \"Statement\", \"Declaration\"],\n fields: {\n id: validateType(\"Identifier\"),\n typeParameters: validateOptionalType(\"TypeParameterDeclaration\"),\n right: validateType(\"FlowType\"),\n },\n});\n\ndefineType(\"TypeAnnotation\", {\n visitor: [\"typeAnnotation\"],\n fields: {\n typeAnnotation: validateType(\"FlowType\"),\n },\n});\n\ndefineType(\"TypeCastExpression\", {\n visitor: [\"expression\", \"typeAnnotation\"],\n aliases: [\"ExpressionWrapper\", \"Expression\"],\n fields: {\n expression: validateType(\"Expression\"),\n typeAnnotation: validateType(\"TypeAnnotation\"),\n },\n});\n\ndefineType(\"TypeParameter\", {\n visitor: [\"bound\", \"default\", \"variance\"],\n fields: {\n name: validate(assertValueType(\"string\")),\n bound: validateOptionalType(\"TypeAnnotation\"),\n default: validateOptionalType(\"FlowType\"),\n variance: validateOptionalType(\"Variance\"),\n },\n});\n\ndefineType(\"TypeParameterDeclaration\", {\n visitor: [\"params\"],\n fields: {\n params: validate(arrayOfType(\"TypeParameter\")),\n },\n});\n\ndefineType(\"TypeParameterInstantiation\", {\n visitor: [\"params\"],\n fields: {\n params: validate(arrayOfType(\"FlowType\")),\n },\n});\n\ndefineType(\"UnionTypeAnnotation\", {\n visitor: [\"types\"],\n aliases: [\"FlowType\"],\n fields: {\n types: validate(arrayOfType(\"FlowType\")),\n },\n});\n\ndefineType(\"Variance\", {\n builder: [\"kind\"],\n fields: {\n kind: validate(assertOneOf(\"minus\", \"plus\")),\n },\n});\n\ndefineType(\"VoidTypeAnnotation\", {\n aliases: [\"FlowType\", \"FlowBaseAnnotation\"],\n});\n\n// Enums\ndefineType(\"EnumDeclaration\", {\n aliases: [\"Statement\", \"Declaration\"],\n visitor: [\"id\", \"body\"],\n fields: {\n id: validateType(\"Identifier\"),\n body: validateType([\n \"EnumBooleanBody\",\n \"EnumNumberBody\",\n \"EnumStringBody\",\n \"EnumSymbolBody\",\n ]),\n },\n});\n\ndefineType(\"EnumBooleanBody\", {\n aliases: [\"EnumBody\"],\n visitor: [\"members\"],\n fields: {\n explicitType: validate(assertValueType(\"boolean\")),\n members: validateArrayOfType(\"EnumBooleanMember\"),\n hasUnknownMembers: validate(assertValueType(\"boolean\")),\n },\n});\n\ndefineType(\"EnumNumberBody\", {\n aliases: [\"EnumBody\"],\n visitor: [\"members\"],\n fields: {\n explicitType: validate(assertValueType(\"boolean\")),\n members: validateArrayOfType(\"EnumNumberMember\"),\n hasUnknownMembers: validate(assertValueType(\"boolean\")),\n },\n});\n\ndefineType(\"EnumStringBody\", {\n aliases: [\"EnumBody\"],\n visitor: [\"members\"],\n fields: {\n explicitType: validate(assertValueType(\"boolean\")),\n members: validateArrayOfType([\"EnumStringMember\", \"EnumDefaultedMember\"]),\n hasUnknownMembers: validate(assertValueType(\"boolean\")),\n },\n});\n\ndefineType(\"EnumSymbolBody\", {\n aliases: [\"EnumBody\"],\n visitor: [\"members\"],\n fields: {\n members: validateArrayOfType(\"EnumDefaultedMember\"),\n hasUnknownMembers: validate(assertValueType(\"boolean\")),\n },\n});\n\ndefineType(\"EnumBooleanMember\", {\n aliases: [\"EnumMember\"],\n visitor: [\"id\"],\n fields: {\n id: validateType(\"Identifier\"),\n init: validateType(\"BooleanLiteral\"),\n },\n});\n\ndefineType(\"EnumNumberMember\", {\n aliases: [\"EnumMember\"],\n visitor: [\"id\", \"init\"],\n fields: {\n id: validateType(\"Identifier\"),\n init: validateType(\"NumericLiteral\"),\n },\n});\n\ndefineType(\"EnumStringMember\", {\n aliases: [\"EnumMember\"],\n visitor: [\"id\", \"init\"],\n fields: {\n id: validateType(\"Identifier\"),\n init: validateType(\"StringLiteral\"),\n },\n});\n\ndefineType(\"EnumDefaultedMember\", {\n aliases: [\"EnumMember\"],\n visitor: [\"id\"],\n fields: {\n id: validateType(\"Identifier\"),\n },\n});\n\ndefineType(\"IndexedAccessType\", {\n visitor: [\"objectType\", \"indexType\"],\n aliases: [\"FlowType\"],\n fields: {\n objectType: validateType(\"FlowType\"),\n indexType: validateType(\"FlowType\"),\n },\n});\n\ndefineType(\"OptionalIndexedAccessType\", {\n visitor: [\"objectType\", \"indexType\"],\n aliases: [\"FlowType\"],\n fields: {\n objectType: validateType(\"FlowType\"),\n indexType: validateType(\"FlowType\"),\n optional: validate(assertValueType(\"boolean\")),\n },\n});\n","import {\n defineAliasedType,\n assertNodeType,\n assertValueType,\n chain,\n assertEach,\n} from \"./utils.ts\";\n\nconst defineType = defineAliasedType(\"JSX\");\n\ndefineType(\"JSXAttribute\", {\n visitor: [\"name\", \"value\"],\n aliases: [\"Immutable\"],\n fields: {\n name: {\n validate: assertNodeType(\"JSXIdentifier\", \"JSXNamespacedName\"),\n },\n value: {\n optional: true,\n validate: assertNodeType(\n \"JSXElement\",\n \"JSXFragment\",\n \"StringLiteral\",\n \"JSXExpressionContainer\",\n ),\n },\n },\n});\n\ndefineType(\"JSXClosingElement\", {\n visitor: [\"name\"],\n aliases: [\"Immutable\"],\n fields: {\n name: {\n validate: assertNodeType(\n \"JSXIdentifier\",\n \"JSXMemberExpression\",\n \"JSXNamespacedName\",\n ),\n },\n },\n});\n\ndefineType(\"JSXElement\", {\n builder: process.env.BABEL_8_BREAKING\n ? [\"openingElement\", \"closingElement\", \"children\"]\n : [\"openingElement\", \"closingElement\", \"children\", \"selfClosing\"],\n visitor: [\"openingElement\", \"children\", \"closingElement\"],\n aliases: [\"Immutable\", \"Expression\"],\n fields: {\n openingElement: {\n validate: assertNodeType(\"JSXOpeningElement\"),\n },\n closingElement: {\n optional: true,\n validate: assertNodeType(\"JSXClosingElement\"),\n },\n children: {\n validate: chain(\n assertValueType(\"array\"),\n assertEach(\n assertNodeType(\n \"JSXText\",\n \"JSXExpressionContainer\",\n \"JSXSpreadChild\",\n \"JSXElement\",\n \"JSXFragment\",\n ),\n ),\n ),\n },\n ...(process.env.BABEL_8_BREAKING\n ? {}\n : {\n selfClosing: {\n validate: assertValueType(\"boolean\"),\n optional: true,\n },\n }),\n },\n});\n\ndefineType(\"JSXEmptyExpression\", {});\n\ndefineType(\"JSXExpressionContainer\", {\n visitor: [\"expression\"],\n aliases: [\"Immutable\"],\n fields: {\n expression: {\n validate: assertNodeType(\"Expression\", \"JSXEmptyExpression\"),\n },\n },\n});\n\ndefineType(\"JSXSpreadChild\", {\n visitor: [\"expression\"],\n aliases: [\"Immutable\"],\n fields: {\n expression: {\n validate: assertNodeType(\"Expression\"),\n },\n },\n});\n\ndefineType(\"JSXIdentifier\", {\n builder: [\"name\"],\n fields: {\n name: {\n validate: assertValueType(\"string\"),\n },\n },\n});\n\ndefineType(\"JSXMemberExpression\", {\n visitor: [\"object\", \"property\"],\n fields: {\n object: {\n validate: assertNodeType(\"JSXMemberExpression\", \"JSXIdentifier\"),\n },\n property: {\n validate: assertNodeType(\"JSXIdentifier\"),\n },\n },\n});\n\ndefineType(\"JSXNamespacedName\", {\n visitor: [\"namespace\", \"name\"],\n fields: {\n namespace: {\n validate: assertNodeType(\"JSXIdentifier\"),\n },\n name: {\n validate: assertNodeType(\"JSXIdentifier\"),\n },\n },\n});\n\ndefineType(\"JSXOpeningElement\", {\n builder: [\"name\", \"attributes\", \"selfClosing\"],\n visitor: [\"name\", \"attributes\"],\n aliases: [\"Immutable\"],\n fields: {\n name: {\n validate: assertNodeType(\n \"JSXIdentifier\",\n \"JSXMemberExpression\",\n \"JSXNamespacedName\",\n ),\n },\n selfClosing: {\n default: false,\n },\n attributes: {\n validate: chain(\n assertValueType(\"array\"),\n assertEach(assertNodeType(\"JSXAttribute\", \"JSXSpreadAttribute\")),\n ),\n },\n typeParameters: {\n validate: assertNodeType(\n \"TypeParameterInstantiation\",\n \"TSTypeParameterInstantiation\",\n ),\n optional: true,\n },\n },\n});\n\ndefineType(\"JSXSpreadAttribute\", {\n visitor: [\"argument\"],\n fields: {\n argument: {\n validate: assertNodeType(\"Expression\"),\n },\n },\n});\n\ndefineType(\"JSXText\", {\n aliases: [\"Immutable\"],\n builder: [\"value\"],\n fields: {\n value: {\n validate: assertValueType(\"string\"),\n },\n },\n});\n\ndefineType(\"JSXFragment\", {\n builder: [\"openingFragment\", \"closingFragment\", \"children\"],\n visitor: [\"openingFragment\", \"children\", \"closingFragment\"],\n aliases: [\"Immutable\", \"Expression\"],\n fields: {\n openingFragment: {\n validate: assertNodeType(\"JSXOpeningFragment\"),\n },\n closingFragment: {\n validate: assertNodeType(\"JSXClosingFragment\"),\n },\n children: {\n validate: chain(\n assertValueType(\"array\"),\n assertEach(\n assertNodeType(\n \"JSXText\",\n \"JSXExpressionContainer\",\n \"JSXSpreadChild\",\n \"JSXElement\",\n \"JSXFragment\",\n ),\n ),\n ),\n },\n },\n});\n\ndefineType(\"JSXOpeningFragment\", {\n aliases: [\"Immutable\"],\n});\n\ndefineType(\"JSXClosingFragment\", {\n aliases: [\"Immutable\"],\n});\n","import { ALIAS_KEYS } from \"./utils.ts\";\n\nexport const PLACEHOLDERS = [\n \"Identifier\",\n \"StringLiteral\",\n \"Expression\",\n \"Statement\",\n \"Declaration\",\n \"BlockStatement\",\n \"ClassBody\",\n \"Pattern\",\n] as const;\n\nexport const PLACEHOLDERS_ALIAS: Record = {\n Declaration: [\"Statement\"],\n Pattern: [\"PatternLike\", \"LVal\"],\n};\n\nfor (const type of PLACEHOLDERS) {\n const alias = ALIAS_KEYS[type];\n if (alias?.length) PLACEHOLDERS_ALIAS[type] = alias;\n}\n\nexport const PLACEHOLDERS_FLIPPED_ALIAS: Record = {};\n\nObject.keys(PLACEHOLDERS_ALIAS).forEach(type => {\n PLACEHOLDERS_ALIAS[type].forEach(alias => {\n if (!Object.hasOwn(PLACEHOLDERS_FLIPPED_ALIAS, alias)) {\n PLACEHOLDERS_FLIPPED_ALIAS[alias] = [];\n }\n PLACEHOLDERS_FLIPPED_ALIAS[alias].push(type);\n });\n});\n","import {\n defineAliasedType,\n assertNodeType,\n assertOneOf,\n assertValueType,\n} from \"./utils.ts\";\nimport { PLACEHOLDERS } from \"./placeholders.ts\";\n\nconst defineType = defineAliasedType(\"Miscellaneous\");\n\nif (!process.env.BABEL_8_BREAKING) {\n defineType(\"Noop\", {\n visitor: [],\n });\n}\n\ndefineType(\"Placeholder\", {\n visitor: [],\n builder: [\"expectedNode\", \"name\"],\n // aliases: [], defined in placeholders.js\n fields: {\n name: {\n validate: assertNodeType(\"Identifier\"),\n },\n expectedNode: {\n validate: assertOneOf(...PLACEHOLDERS),\n },\n },\n});\n\ndefineType(\"V8IntrinsicIdentifier\", {\n builder: [\"name\"],\n fields: {\n name: {\n validate: assertValueType(\"string\"),\n },\n },\n});\n","import defineType, {\n assertEach,\n assertNodeType,\n assertValueType,\n chain,\n} from \"./utils.ts\";\n\ndefineType(\"ArgumentPlaceholder\", {});\n\ndefineType(\"BindExpression\", {\n visitor: [\"object\", \"callee\"],\n aliases: [\"Expression\"],\n fields: !process.env.BABEL_TYPES_8_BREAKING\n ? {\n object: {\n validate: Object.assign(() => {}, {\n oneOfNodeTypes: [\"Expression\"],\n }),\n },\n callee: {\n validate: Object.assign(() => {}, {\n oneOfNodeTypes: [\"Expression\"],\n }),\n },\n }\n : {\n object: {\n validate: assertNodeType(\"Expression\"),\n },\n callee: {\n validate: assertNodeType(\"Expression\"),\n },\n },\n});\n\ndefineType(\"ImportAttribute\", {\n visitor: [\"key\", \"value\"],\n fields: {\n key: {\n validate: assertNodeType(\"Identifier\", \"StringLiteral\"),\n },\n value: {\n validate: assertNodeType(\"StringLiteral\"),\n },\n },\n});\n\ndefineType(\"Decorator\", {\n visitor: [\"expression\"],\n fields: {\n expression: {\n validate: assertNodeType(\"Expression\"),\n },\n },\n});\n\ndefineType(\"DoExpression\", {\n visitor: [\"body\"],\n builder: [\"body\", \"async\"],\n aliases: [\"Expression\"],\n fields: {\n body: {\n validate: assertNodeType(\"BlockStatement\"),\n },\n async: {\n validate: assertValueType(\"boolean\"),\n default: false,\n },\n },\n});\n\ndefineType(\"ExportDefaultSpecifier\", {\n visitor: [\"exported\"],\n aliases: [\"ModuleSpecifier\"],\n fields: {\n exported: {\n validate: assertNodeType(\"Identifier\"),\n },\n },\n});\n\ndefineType(\"RecordExpression\", {\n visitor: [\"properties\"],\n aliases: [\"Expression\"],\n fields: {\n properties: {\n validate: chain(\n assertValueType(\"array\"),\n assertEach(assertNodeType(\"ObjectProperty\", \"SpreadElement\")),\n ),\n },\n },\n});\n\ndefineType(\"TupleExpression\", {\n fields: {\n elements: {\n validate: chain(\n assertValueType(\"array\"),\n assertEach(assertNodeType(\"Expression\", \"SpreadElement\")),\n ),\n default: [],\n },\n },\n visitor: [\"elements\"],\n aliases: [\"Expression\"],\n});\n\ndefineType(\"DecimalLiteral\", {\n builder: [\"value\"],\n fields: {\n value: {\n validate: assertValueType(\"string\"),\n },\n },\n aliases: [\"Expression\", \"Pureish\", \"Literal\", \"Immutable\"],\n});\n\n// https://github.com/tc39/proposal-js-module-blocks\ndefineType(\"ModuleExpression\", {\n visitor: [\"body\"],\n fields: {\n body: {\n validate: assertNodeType(\"Program\"),\n },\n },\n aliases: [\"Expression\"],\n});\n\n// https://github.com/tc39/proposal-pipeline-operator\n// https://github.com/js-choi/proposal-hack-pipes\ndefineType(\"TopicReference\", {\n aliases: [\"Expression\"],\n});\n\n// https://github.com/tc39/proposal-pipeline-operator\n// https://github.com/js-choi/proposal-smart-pipes\ndefineType(\"PipelineTopicExpression\", {\n builder: [\"expression\"],\n visitor: [\"expression\"],\n fields: {\n expression: {\n validate: assertNodeType(\"Expression\"),\n },\n },\n aliases: [\"Expression\"],\n});\n\ndefineType(\"PipelineBareFunction\", {\n builder: [\"callee\"],\n visitor: [\"callee\"],\n fields: {\n callee: {\n validate: assertNodeType(\"Expression\"),\n },\n },\n aliases: [\"Expression\"],\n});\n\ndefineType(\"PipelinePrimaryTopicReference\", {\n aliases: [\"Expression\"],\n});\n","import {\n defineAliasedType,\n arrayOfType,\n assertEach,\n assertNodeType,\n assertOneOf,\n assertValueType,\n chain,\n validate,\n validateArrayOfType,\n validateOptional,\n validateOptionalType,\n validateType,\n} from \"./utils.ts\";\nimport {\n functionDeclarationCommon,\n classMethodOrDeclareMethodCommon,\n} from \"./core.ts\";\nimport is from \"../validators/is.ts\";\n\nconst defineType = defineAliasedType(\"TypeScript\");\n\nconst bool = assertValueType(\"boolean\");\n\nconst tSFunctionTypeAnnotationCommon = () => ({\n returnType: {\n validate: process.env.BABEL_8_BREAKING\n ? assertNodeType(\"TSTypeAnnotation\")\n : // @ts-ignore(Babel 7 vs Babel 8) Babel 7 AST\n assertNodeType(\"TSTypeAnnotation\", \"Noop\"),\n optional: true,\n },\n typeParameters: {\n validate: process.env.BABEL_8_BREAKING\n ? assertNodeType(\"TSTypeParameterDeclaration\")\n : // @ts-ignore(Babel 7 vs Babel 8) Babel 7 AST\n assertNodeType(\"TSTypeParameterDeclaration\", \"Noop\"),\n optional: true,\n },\n});\n\ndefineType(\"TSParameterProperty\", {\n aliases: [\"LVal\"], // TODO: This isn't usable in general as an LVal. Should have a \"Parameter\" alias.\n visitor: [\"parameter\"],\n fields: {\n accessibility: {\n validate: assertOneOf(\"public\", \"private\", \"protected\"),\n optional: true,\n },\n readonly: {\n validate: assertValueType(\"boolean\"),\n optional: true,\n },\n parameter: {\n validate: assertNodeType(\"Identifier\", \"AssignmentPattern\"),\n },\n override: {\n validate: assertValueType(\"boolean\"),\n optional: true,\n },\n decorators: {\n validate: chain(\n assertValueType(\"array\"),\n assertEach(assertNodeType(\"Decorator\")),\n ),\n optional: true,\n },\n },\n});\n\ndefineType(\"TSDeclareFunction\", {\n aliases: [\"Statement\", \"Declaration\"],\n visitor: [\"id\", \"typeParameters\", \"params\", \"returnType\"],\n fields: {\n ...functionDeclarationCommon(),\n ...tSFunctionTypeAnnotationCommon(),\n },\n});\n\ndefineType(\"TSDeclareMethod\", {\n visitor: [\"decorators\", \"key\", \"typeParameters\", \"params\", \"returnType\"],\n fields: {\n ...classMethodOrDeclareMethodCommon(),\n ...tSFunctionTypeAnnotationCommon(),\n },\n});\n\ndefineType(\"TSQualifiedName\", {\n aliases: [\"TSEntityName\"],\n visitor: [\"left\", \"right\"],\n fields: {\n left: validateType(\"TSEntityName\"),\n right: validateType(\"Identifier\"),\n },\n});\n\nconst signatureDeclarationCommon = () => ({\n typeParameters: validateOptionalType(\"TSTypeParameterDeclaration\"),\n [process.env.BABEL_8_BREAKING ? \"params\" : \"parameters\"]: validateArrayOfType(\n [\"ArrayPattern\", \"Identifier\", \"ObjectPattern\", \"RestElement\"],\n ),\n [process.env.BABEL_8_BREAKING ? \"returnType\" : \"typeAnnotation\"]:\n validateOptionalType(\"TSTypeAnnotation\"),\n});\n\nconst callConstructSignatureDeclaration = {\n aliases: [\"TSTypeElement\"],\n visitor: [\n \"typeParameters\",\n process.env.BABEL_8_BREAKING ? \"params\" : \"parameters\",\n process.env.BABEL_8_BREAKING ? \"returnType\" : \"typeAnnotation\",\n ],\n fields: signatureDeclarationCommon(),\n};\n\ndefineType(\"TSCallSignatureDeclaration\", callConstructSignatureDeclaration);\ndefineType(\n \"TSConstructSignatureDeclaration\",\n callConstructSignatureDeclaration,\n);\n\nconst namedTypeElementCommon = () => ({\n key: validateType(\"Expression\"),\n computed: { default: false },\n optional: validateOptional(bool),\n});\n\ndefineType(\"TSPropertySignature\", {\n aliases: [\"TSTypeElement\"],\n visitor: [\"key\", \"typeAnnotation\"],\n fields: {\n ...namedTypeElementCommon(),\n readonly: validateOptional(bool),\n typeAnnotation: validateOptionalType(\"TSTypeAnnotation\"),\n kind: {\n validate: assertOneOf(\"get\", \"set\"),\n },\n },\n});\n\ndefineType(\"TSMethodSignature\", {\n aliases: [\"TSTypeElement\"],\n visitor: [\n \"key\",\n \"typeParameters\",\n process.env.BABEL_8_BREAKING ? \"params\" : \"parameters\",\n process.env.BABEL_8_BREAKING ? \"returnType\" : \"typeAnnotation\",\n ],\n fields: {\n ...signatureDeclarationCommon(),\n ...namedTypeElementCommon(),\n kind: {\n validate: assertOneOf(\"method\", \"get\", \"set\"),\n },\n },\n});\n\ndefineType(\"TSIndexSignature\", {\n aliases: [\"TSTypeElement\"],\n visitor: [\"parameters\", \"typeAnnotation\"],\n fields: {\n readonly: validateOptional(bool),\n static: validateOptional(bool),\n parameters: validateArrayOfType(\"Identifier\"), // Length must be 1\n typeAnnotation: validateOptionalType(\"TSTypeAnnotation\"),\n },\n});\n\nconst tsKeywordTypes = [\n \"TSAnyKeyword\",\n \"TSBooleanKeyword\",\n \"TSBigIntKeyword\",\n \"TSIntrinsicKeyword\",\n \"TSNeverKeyword\",\n \"TSNullKeyword\",\n \"TSNumberKeyword\",\n \"TSObjectKeyword\",\n \"TSStringKeyword\",\n \"TSSymbolKeyword\",\n \"TSUndefinedKeyword\",\n \"TSUnknownKeyword\",\n \"TSVoidKeyword\",\n] as const;\n\nfor (const type of tsKeywordTypes) {\n defineType(type, {\n aliases: [\"TSType\", \"TSBaseType\"],\n visitor: [],\n fields: {},\n });\n}\n\ndefineType(\"TSThisType\", {\n aliases: [\"TSType\", \"TSBaseType\"],\n visitor: [],\n fields: {},\n});\n\nconst fnOrCtrBase = {\n aliases: [\"TSType\"],\n visitor: [\n \"typeParameters\",\n process.env.BABEL_8_BREAKING ? \"params\" : \"parameters\",\n process.env.BABEL_8_BREAKING ? \"returnType\" : \"typeAnnotation\",\n ],\n};\n\ndefineType(\"TSFunctionType\", {\n ...fnOrCtrBase,\n fields: signatureDeclarationCommon(),\n});\ndefineType(\"TSConstructorType\", {\n ...fnOrCtrBase,\n fields: {\n ...signatureDeclarationCommon(),\n abstract: validateOptional(bool),\n },\n});\n\ndefineType(\"TSTypeReference\", {\n aliases: [\"TSType\"],\n visitor: [\"typeName\", \"typeParameters\"],\n fields: {\n typeName: validateType(\"TSEntityName\"),\n typeParameters: validateOptionalType(\"TSTypeParameterInstantiation\"),\n },\n});\n\ndefineType(\"TSTypePredicate\", {\n aliases: [\"TSType\"],\n visitor: [\"parameterName\", \"typeAnnotation\"],\n builder: [\"parameterName\", \"typeAnnotation\", \"asserts\"],\n fields: {\n parameterName: validateType([\"Identifier\", \"TSThisType\"]),\n typeAnnotation: validateOptionalType(\"TSTypeAnnotation\"),\n asserts: validateOptional(bool),\n },\n});\n\ndefineType(\"TSTypeQuery\", {\n aliases: [\"TSType\"],\n visitor: [\"exprName\", \"typeParameters\"],\n fields: {\n exprName: validateType([\"TSEntityName\", \"TSImportType\"]),\n typeParameters: validateOptionalType(\"TSTypeParameterInstantiation\"),\n },\n});\n\ndefineType(\"TSTypeLiteral\", {\n aliases: [\"TSType\"],\n visitor: [\"members\"],\n fields: {\n members: validateArrayOfType(\"TSTypeElement\"),\n },\n});\n\ndefineType(\"TSArrayType\", {\n aliases: [\"TSType\"],\n visitor: [\"elementType\"],\n fields: {\n elementType: validateType(\"TSType\"),\n },\n});\n\ndefineType(\"TSTupleType\", {\n aliases: [\"TSType\"],\n visitor: [\"elementTypes\"],\n fields: {\n elementTypes: validateArrayOfType([\"TSType\", \"TSNamedTupleMember\"]),\n },\n});\n\ndefineType(\"TSOptionalType\", {\n aliases: [\"TSType\"],\n visitor: [\"typeAnnotation\"],\n fields: {\n typeAnnotation: validateType(\"TSType\"),\n },\n});\n\ndefineType(\"TSRestType\", {\n aliases: [\"TSType\"],\n visitor: [\"typeAnnotation\"],\n fields: {\n typeAnnotation: validateType(\"TSType\"),\n },\n});\n\ndefineType(\"TSNamedTupleMember\", {\n visitor: [\"label\", \"elementType\"],\n builder: [\"label\", \"elementType\", \"optional\"],\n fields: {\n label: validateType(\"Identifier\"),\n optional: {\n validate: bool,\n default: false,\n },\n elementType: validateType(\"TSType\"),\n },\n});\n\nconst unionOrIntersection = {\n aliases: [\"TSType\"],\n visitor: [\"types\"],\n fields: {\n types: validateArrayOfType(\"TSType\"),\n },\n};\n\ndefineType(\"TSUnionType\", unionOrIntersection);\ndefineType(\"TSIntersectionType\", unionOrIntersection);\n\ndefineType(\"TSConditionalType\", {\n aliases: [\"TSType\"],\n visitor: [\"checkType\", \"extendsType\", \"trueType\", \"falseType\"],\n fields: {\n checkType: validateType(\"TSType\"),\n extendsType: validateType(\"TSType\"),\n trueType: validateType(\"TSType\"),\n falseType: validateType(\"TSType\"),\n },\n});\n\ndefineType(\"TSInferType\", {\n aliases: [\"TSType\"],\n visitor: [\"typeParameter\"],\n fields: {\n typeParameter: validateType(\"TSTypeParameter\"),\n },\n});\n\ndefineType(\"TSParenthesizedType\", {\n aliases: [\"TSType\"],\n visitor: [\"typeAnnotation\"],\n fields: {\n typeAnnotation: validateType(\"TSType\"),\n },\n});\n\ndefineType(\"TSTypeOperator\", {\n aliases: [\"TSType\"],\n visitor: [\"typeAnnotation\"],\n fields: {\n operator: validate(assertValueType(\"string\")),\n typeAnnotation: validateType(\"TSType\"),\n },\n});\n\ndefineType(\"TSIndexedAccessType\", {\n aliases: [\"TSType\"],\n visitor: [\"objectType\", \"indexType\"],\n fields: {\n objectType: validateType(\"TSType\"),\n indexType: validateType(\"TSType\"),\n },\n});\n\ndefineType(\"TSMappedType\", {\n aliases: [\"TSType\"],\n visitor: process.env.BABEL_8_BREAKING\n ? [\"key\", \"constraint\", \"nameType\", \"typeAnnotation\"]\n : [\"typeParameter\", \"nameType\", \"typeAnnotation\"],\n builder: process.env.BABEL_8_BREAKING\n ? [\"key\", \"constraint\", \"nameType\", \"typeAnnotation\"]\n : [\"typeParameter\", \"typeAnnotation\", \"nameType\"],\n fields: {\n ...(process.env.BABEL_8_BREAKING\n ? {\n key: validateType(\"Identifier\"),\n constraint: validateType(\"TSType\"),\n }\n : {\n typeParameter: validateType(\"TSTypeParameter\"),\n }),\n readonly: validateOptional(assertOneOf(true, false, \"+\", \"-\")),\n optional: validateOptional(assertOneOf(true, false, \"+\", \"-\")),\n typeAnnotation: validateOptionalType(\"TSType\"),\n nameType: validateOptionalType(\"TSType\"),\n },\n});\n\ndefineType(\"TSLiteralType\", {\n aliases: [\"TSType\", \"TSBaseType\"],\n visitor: [\"literal\"],\n fields: {\n literal: {\n validate: (function () {\n const unaryExpression = assertNodeType(\n \"NumericLiteral\",\n \"BigIntLiteral\",\n );\n const unaryOperator = assertOneOf(\"-\");\n\n const literal = assertNodeType(\n \"NumericLiteral\",\n \"StringLiteral\",\n \"BooleanLiteral\",\n \"BigIntLiteral\",\n \"TemplateLiteral\",\n );\n function validator(parent: any, key: string, node: any) {\n // type A = -1 | 1;\n if (is(\"UnaryExpression\", node)) {\n // check operator first\n unaryOperator(node, \"operator\", node.operator);\n unaryExpression(node, \"argument\", node.argument);\n } else {\n // type A = 'foo' | 'bar' | false | 1;\n literal(parent, key, node);\n }\n }\n\n validator.oneOfNodeTypes = [\n \"NumericLiteral\",\n \"StringLiteral\",\n \"BooleanLiteral\",\n \"BigIntLiteral\",\n \"TemplateLiteral\",\n \"UnaryExpression\",\n ];\n\n return validator;\n })(),\n },\n },\n});\n\ndefineType(\"TSExpressionWithTypeArguments\", {\n aliases: [\"TSType\"],\n visitor: [\"expression\", \"typeParameters\"],\n fields: {\n expression: validateType(\"TSEntityName\"),\n typeParameters: validateOptionalType(\"TSTypeParameterInstantiation\"),\n },\n});\n\ndefineType(\"TSInterfaceDeclaration\", {\n // \"Statement\" alias prevents a semicolon from appearing after it in an export declaration.\n aliases: [\"Statement\", \"Declaration\"],\n visitor: [\"id\", \"typeParameters\", \"extends\", \"body\"],\n fields: {\n declare: validateOptional(bool),\n id: validateType(\"Identifier\"),\n typeParameters: validateOptionalType(\"TSTypeParameterDeclaration\"),\n extends: validateOptional(arrayOfType(\"TSExpressionWithTypeArguments\")),\n body: validateType(\"TSInterfaceBody\"),\n },\n});\n\ndefineType(\"TSInterfaceBody\", {\n visitor: [\"body\"],\n fields: {\n body: validateArrayOfType(\"TSTypeElement\"),\n },\n});\n\ndefineType(\"TSTypeAliasDeclaration\", {\n aliases: [\"Statement\", \"Declaration\"],\n visitor: [\"id\", \"typeParameters\", \"typeAnnotation\"],\n fields: {\n declare: validateOptional(bool),\n id: validateType(\"Identifier\"),\n typeParameters: validateOptionalType(\"TSTypeParameterDeclaration\"),\n typeAnnotation: validateType(\"TSType\"),\n },\n});\n\ndefineType(\"TSInstantiationExpression\", {\n aliases: [\"Expression\"],\n visitor: [\"expression\", \"typeParameters\"],\n fields: {\n expression: validateType(\"Expression\"),\n typeParameters: validateOptionalType(\"TSTypeParameterInstantiation\"),\n },\n});\n\nconst TSTypeExpression = {\n aliases: [\"Expression\", \"LVal\", \"PatternLike\"],\n visitor: [\"expression\", \"typeAnnotation\"],\n fields: {\n expression: validateType(\"Expression\"),\n typeAnnotation: validateType(\"TSType\"),\n },\n};\n\ndefineType(\"TSAsExpression\", TSTypeExpression);\ndefineType(\"TSSatisfiesExpression\", TSTypeExpression);\n\ndefineType(\"TSTypeAssertion\", {\n aliases: [\"Expression\", \"LVal\", \"PatternLike\"],\n visitor: [\"typeAnnotation\", \"expression\"],\n fields: {\n typeAnnotation: validateType(\"TSType\"),\n expression: validateType(\"Expression\"),\n },\n});\n\ndefineType(\"TSEnumDeclaration\", {\n // \"Statement\" alias prevents a semicolon from appearing after it in an export declaration.\n aliases: [\"Statement\", \"Declaration\"],\n visitor: [\"id\", \"members\"],\n fields: {\n declare: validateOptional(bool),\n const: validateOptional(bool),\n id: validateType(\"Identifier\"),\n members: validateArrayOfType(\"TSEnumMember\"),\n initializer: validateOptionalType(\"Expression\"),\n },\n});\n\ndefineType(\"TSEnumMember\", {\n visitor: [\"id\", \"initializer\"],\n fields: {\n id: validateType([\"Identifier\", \"StringLiteral\"]),\n initializer: validateOptionalType(\"Expression\"),\n },\n});\n\ndefineType(\"TSModuleDeclaration\", {\n aliases: [\"Statement\", \"Declaration\"],\n visitor: [\"id\", \"body\"],\n fields: {\n declare: validateOptional(bool),\n global: validateOptional(bool),\n id: validateType([\"Identifier\", \"StringLiteral\"]),\n body: validateType([\"TSModuleBlock\", \"TSModuleDeclaration\"]),\n },\n});\n\ndefineType(\"TSModuleBlock\", {\n aliases: [\"Scopable\", \"Block\", \"BlockParent\", \"FunctionParent\"],\n visitor: [\"body\"],\n fields: {\n body: validateArrayOfType(\"Statement\"),\n },\n});\n\ndefineType(\"TSImportType\", {\n aliases: [\"TSType\"],\n visitor: [\"argument\", \"qualifier\", \"typeParameters\"],\n fields: {\n argument: validateType(\"StringLiteral\"),\n qualifier: validateOptionalType(\"TSEntityName\"),\n typeParameters: validateOptionalType(\"TSTypeParameterInstantiation\"),\n options: {\n validate: assertNodeType(\"Expression\"),\n optional: true,\n },\n },\n});\n\ndefineType(\"TSImportEqualsDeclaration\", {\n aliases: [\"Statement\"],\n visitor: [\"id\", \"moduleReference\"],\n fields: {\n isExport: validate(bool),\n id: validateType(\"Identifier\"),\n moduleReference: validateType([\n \"TSEntityName\",\n \"TSExternalModuleReference\",\n ]),\n importKind: {\n validate: assertOneOf(\"type\", \"value\"),\n optional: true,\n },\n },\n});\n\ndefineType(\"TSExternalModuleReference\", {\n visitor: [\"expression\"],\n fields: {\n expression: validateType(\"StringLiteral\"),\n },\n});\n\ndefineType(\"TSNonNullExpression\", {\n aliases: [\"Expression\", \"LVal\", \"PatternLike\"],\n visitor: [\"expression\"],\n fields: {\n expression: validateType(\"Expression\"),\n },\n});\n\ndefineType(\"TSExportAssignment\", {\n aliases: [\"Statement\"],\n visitor: [\"expression\"],\n fields: {\n expression: validateType(\"Expression\"),\n },\n});\n\ndefineType(\"TSNamespaceExportDeclaration\", {\n aliases: [\"Statement\"],\n visitor: [\"id\"],\n fields: {\n id: validateType(\"Identifier\"),\n },\n});\n\ndefineType(\"TSTypeAnnotation\", {\n visitor: [\"typeAnnotation\"],\n fields: {\n typeAnnotation: {\n validate: assertNodeType(\"TSType\"),\n },\n },\n});\n\ndefineType(\"TSTypeParameterInstantiation\", {\n visitor: [\"params\"],\n fields: {\n params: {\n validate: chain(\n assertValueType(\"array\"),\n assertEach(assertNodeType(\"TSType\")),\n ),\n },\n },\n});\n\ndefineType(\"TSTypeParameterDeclaration\", {\n visitor: [\"params\"],\n fields: {\n params: {\n validate: chain(\n assertValueType(\"array\"),\n assertEach(assertNodeType(\"TSTypeParameter\")),\n ),\n },\n },\n});\n\ndefineType(\"TSTypeParameter\", {\n builder: [\"constraint\", \"default\", \"name\"],\n visitor: [\"constraint\", \"default\"],\n fields: {\n name: {\n validate: !process.env.BABEL_8_BREAKING\n ? assertValueType(\"string\")\n : assertNodeType(\"Identifier\"),\n },\n in: {\n validate: assertValueType(\"boolean\"),\n optional: true,\n },\n out: {\n validate: assertValueType(\"boolean\"),\n optional: true,\n },\n const: {\n validate: assertValueType(\"boolean\"),\n optional: true,\n },\n constraint: {\n validate: assertNodeType(\"TSType\"),\n optional: true,\n },\n default: {\n validate: assertNodeType(\"TSType\"),\n optional: true,\n },\n },\n});\n","export const DEPRECATED_ALIASES = {\n ModuleDeclaration: \"ImportOrExportDeclaration\",\n};\n","import toFastProperties from \"to-fast-properties\";\nimport \"./core.ts\";\nimport \"./flow.ts\";\nimport \"./jsx.ts\";\nimport \"./misc.ts\";\nimport \"./experimental.ts\";\nimport \"./typescript.ts\";\nimport {\n VISITOR_KEYS,\n ALIAS_KEYS,\n FLIPPED_ALIAS_KEYS,\n NODE_FIELDS,\n BUILDER_KEYS,\n DEPRECATED_KEYS,\n NODE_PARENT_VALIDATIONS,\n} from \"./utils.ts\";\nimport {\n PLACEHOLDERS,\n PLACEHOLDERS_ALIAS,\n PLACEHOLDERS_FLIPPED_ALIAS,\n} from \"./placeholders.ts\";\nimport { DEPRECATED_ALIASES } from \"./deprecated-aliases.ts\";\n\n(\n Object.keys(DEPRECATED_ALIASES) as (keyof typeof DEPRECATED_ALIASES)[]\n).forEach(deprecatedAlias => {\n FLIPPED_ALIAS_KEYS[deprecatedAlias] =\n FLIPPED_ALIAS_KEYS[DEPRECATED_ALIASES[deprecatedAlias]];\n});\n\n// We do this here, because at this point the visitor keys should be ready and setup\ntoFastProperties(VISITOR_KEYS);\ntoFastProperties(ALIAS_KEYS);\ntoFastProperties(FLIPPED_ALIAS_KEYS);\ntoFastProperties(NODE_FIELDS);\ntoFastProperties(BUILDER_KEYS);\ntoFastProperties(DEPRECATED_KEYS);\n\ntoFastProperties(PLACEHOLDERS_ALIAS);\ntoFastProperties(PLACEHOLDERS_FLIPPED_ALIAS);\n\nconst TYPES: Array = [].concat(\n Object.keys(VISITOR_KEYS),\n Object.keys(FLIPPED_ALIAS_KEYS),\n Object.keys(DEPRECATED_KEYS),\n);\n\nexport {\n VISITOR_KEYS,\n ALIAS_KEYS,\n FLIPPED_ALIAS_KEYS,\n NODE_FIELDS,\n BUILDER_KEYS,\n DEPRECATED_ALIASES,\n DEPRECATED_KEYS,\n NODE_PARENT_VALIDATIONS,\n PLACEHOLDERS,\n PLACEHOLDERS_ALIAS,\n PLACEHOLDERS_FLIPPED_ALIAS,\n TYPES,\n};\n\nexport type { FieldOptions } from \"./utils.ts\";\n","import {\n NODE_FIELDS,\n NODE_PARENT_VALIDATIONS,\n type FieldOptions,\n} from \"../definitions/index.ts\";\nimport type * as t from \"../index.ts\";\n\nexport default function validate(\n node: t.Node | undefined | null,\n key: string,\n val: any,\n): void {\n if (!node) return;\n\n const fields = NODE_FIELDS[node.type];\n if (!fields) return;\n\n const field = fields[key];\n validateField(node, key, val, field);\n validateChild(node, key, val);\n}\n\nexport function validateField(\n node: t.Node | undefined | null,\n key: string,\n val: any,\n field: FieldOptions | undefined | null,\n): void {\n if (!field?.validate) return;\n if (field.optional && val == null) return;\n\n field.validate(node, key, val);\n}\n\nexport function validateChild(\n node: t.Node | undefined | null,\n key: string,\n val?: t.Node | undefined | null,\n) {\n if (val == null) return;\n const validate = NODE_PARENT_VALIDATIONS[val.type];\n if (!validate) return;\n validate(node, key, val);\n}\n","import validate from \"../validators/validate.ts\";\nimport type * as t from \"../index.ts\";\nimport { BUILDER_KEYS } from \"../index.ts\";\n\nexport default function validateNode(node: N) {\n // todo: because keys not in BUILDER_KEYS are not validated - this actually allows invalid nodes in some cases\n const keys = BUILDER_KEYS[node.type] as (keyof N & string)[];\n for (const key of keys) {\n validate(node, key, node[key]);\n }\n return node;\n}\n","/*\n * This file is auto-generated! Do not modify it directly.\n * To re-generate run 'make build'\n */\nimport validateNode from \"../validateNode.ts\";\nimport type * as t from \"../../index.ts\";\nimport deprecationWarning from \"../../utils/deprecationWarning.ts\";\nexport function arrayExpression(\n elements: Array = [],\n): t.ArrayExpression {\n return validateNode({\n type: \"ArrayExpression\",\n elements,\n });\n}\nexport function assignmentExpression(\n operator: string,\n left: t.LVal | t.OptionalMemberExpression,\n right: t.Expression,\n): t.AssignmentExpression {\n return validateNode({\n type: \"AssignmentExpression\",\n operator,\n left,\n right,\n });\n}\nexport function binaryExpression(\n operator:\n | \"+\"\n | \"-\"\n | \"/\"\n | \"%\"\n | \"*\"\n | \"**\"\n | \"&\"\n | \"|\"\n | \">>\"\n | \">>>\"\n | \"<<\"\n | \"^\"\n | \"==\"\n | \"===\"\n | \"!=\"\n | \"!==\"\n | \"in\"\n | \"instanceof\"\n | \">\"\n | \"<\"\n | \">=\"\n | \"<=\"\n | \"|>\",\n left: t.Expression | t.PrivateName,\n right: t.Expression,\n): t.BinaryExpression {\n return validateNode({\n type: \"BinaryExpression\",\n operator,\n left,\n right,\n });\n}\nexport function interpreterDirective(value: string): t.InterpreterDirective {\n return validateNode({\n type: \"InterpreterDirective\",\n value,\n });\n}\nexport function directive(value: t.DirectiveLiteral): t.Directive {\n return validateNode({\n type: \"Directive\",\n value,\n });\n}\nexport function directiveLiteral(value: string): t.DirectiveLiteral {\n return validateNode({\n type: \"DirectiveLiteral\",\n value,\n });\n}\nexport function blockStatement(\n body: Array,\n directives: Array = [],\n): t.BlockStatement {\n return validateNode({\n type: \"BlockStatement\",\n body,\n directives,\n });\n}\nexport function breakStatement(\n label: t.Identifier | null = null,\n): t.BreakStatement {\n return validateNode({\n type: \"BreakStatement\",\n label,\n });\n}\nexport function callExpression(\n callee: t.Expression | t.Super | t.V8IntrinsicIdentifier,\n _arguments: Array,\n): t.CallExpression {\n return validateNode({\n type: \"CallExpression\",\n callee,\n arguments: _arguments,\n });\n}\nexport function catchClause(\n param:\n | t.Identifier\n | t.ArrayPattern\n | t.ObjectPattern\n | null\n | undefined = null,\n body: t.BlockStatement,\n): t.CatchClause {\n return validateNode({\n type: \"CatchClause\",\n param,\n body,\n });\n}\nexport function conditionalExpression(\n test: t.Expression,\n consequent: t.Expression,\n alternate: t.Expression,\n): t.ConditionalExpression {\n return validateNode({\n type: \"ConditionalExpression\",\n test,\n consequent,\n alternate,\n });\n}\nexport function continueStatement(\n label: t.Identifier | null = null,\n): t.ContinueStatement {\n return validateNode({\n type: \"ContinueStatement\",\n label,\n });\n}\nexport function debuggerStatement(): t.DebuggerStatement {\n return {\n type: \"DebuggerStatement\",\n };\n}\nexport function doWhileStatement(\n test: t.Expression,\n body: t.Statement,\n): t.DoWhileStatement {\n return validateNode({\n type: \"DoWhileStatement\",\n test,\n body,\n });\n}\nexport function emptyStatement(): t.EmptyStatement {\n return {\n type: \"EmptyStatement\",\n };\n}\nexport function expressionStatement(\n expression: t.Expression,\n): t.ExpressionStatement {\n return validateNode({\n type: \"ExpressionStatement\",\n expression,\n });\n}\nexport function file(\n program: t.Program,\n comments: Array | null = null,\n tokens: Array | null = null,\n): t.File {\n return validateNode({\n type: \"File\",\n program,\n comments,\n tokens,\n });\n}\nexport function forInStatement(\n left: t.VariableDeclaration | t.LVal,\n right: t.Expression,\n body: t.Statement,\n): t.ForInStatement {\n return validateNode({\n type: \"ForInStatement\",\n left,\n right,\n body,\n });\n}\nexport function forStatement(\n init: t.VariableDeclaration | t.Expression | null | undefined = null,\n test: t.Expression | null | undefined = null,\n update: t.Expression | null | undefined = null,\n body: t.Statement,\n): t.ForStatement {\n return validateNode({\n type: \"ForStatement\",\n init,\n test,\n update,\n body,\n });\n}\nexport function functionDeclaration(\n id: t.Identifier | null | undefined = null,\n params: Array,\n body: t.BlockStatement,\n generator: boolean = false,\n async: boolean = false,\n): t.FunctionDeclaration {\n return validateNode({\n type: \"FunctionDeclaration\",\n id,\n params,\n body,\n generator,\n async,\n });\n}\nexport function functionExpression(\n id: t.Identifier | null | undefined = null,\n params: Array,\n body: t.BlockStatement,\n generator: boolean = false,\n async: boolean = false,\n): t.FunctionExpression {\n return validateNode({\n type: \"FunctionExpression\",\n id,\n params,\n body,\n generator,\n async,\n });\n}\nexport function identifier(name: string): t.Identifier {\n return validateNode({\n type: \"Identifier\",\n name,\n });\n}\nexport function ifStatement(\n test: t.Expression,\n consequent: t.Statement,\n alternate: t.Statement | null = null,\n): t.IfStatement {\n return validateNode({\n type: \"IfStatement\",\n test,\n consequent,\n alternate,\n });\n}\nexport function labeledStatement(\n label: t.Identifier,\n body: t.Statement,\n): t.LabeledStatement {\n return validateNode({\n type: \"LabeledStatement\",\n label,\n body,\n });\n}\nexport function stringLiteral(value: string): t.StringLiteral {\n return validateNode({\n type: \"StringLiteral\",\n value,\n });\n}\nexport function numericLiteral(value: number): t.NumericLiteral {\n return validateNode({\n type: \"NumericLiteral\",\n value,\n });\n}\nexport function nullLiteral(): t.NullLiteral {\n return {\n type: \"NullLiteral\",\n };\n}\nexport function booleanLiteral(value: boolean): t.BooleanLiteral {\n return validateNode({\n type: \"BooleanLiteral\",\n value,\n });\n}\nexport function regExpLiteral(\n pattern: string,\n flags: string = \"\",\n): t.RegExpLiteral {\n return validateNode({\n type: \"RegExpLiteral\",\n pattern,\n flags,\n });\n}\nexport function logicalExpression(\n operator: \"||\" | \"&&\" | \"??\",\n left: t.Expression,\n right: t.Expression,\n): t.LogicalExpression {\n return validateNode({\n type: \"LogicalExpression\",\n operator,\n left,\n right,\n });\n}\nexport function memberExpression(\n object: t.Expression | t.Super,\n property: t.Expression | t.Identifier | t.PrivateName,\n computed: boolean = false,\n optional: true | false | null = null,\n): t.MemberExpression {\n return validateNode({\n type: \"MemberExpression\",\n object,\n property,\n computed,\n optional,\n });\n}\nexport function newExpression(\n callee: t.Expression | t.Super | t.V8IntrinsicIdentifier,\n _arguments: Array,\n): t.NewExpression {\n return validateNode({\n type: \"NewExpression\",\n callee,\n arguments: _arguments,\n });\n}\nexport function program(\n body: Array,\n directives: Array = [],\n sourceType: \"script\" | \"module\" = \"script\",\n interpreter: t.InterpreterDirective | null = null,\n): t.Program {\n return validateNode({\n type: \"Program\",\n body,\n directives,\n sourceType,\n interpreter,\n });\n}\nexport function objectExpression(\n properties: Array,\n): t.ObjectExpression {\n return validateNode({\n type: \"ObjectExpression\",\n properties,\n });\n}\nexport function objectMethod(\n kind: \"method\" | \"get\" | \"set\" | undefined = \"method\",\n key:\n | t.Expression\n | t.Identifier\n | t.StringLiteral\n | t.NumericLiteral\n | t.BigIntLiteral,\n params: Array,\n body: t.BlockStatement,\n computed: boolean = false,\n generator: boolean = false,\n async: boolean = false,\n): t.ObjectMethod {\n return validateNode({\n type: \"ObjectMethod\",\n kind,\n key,\n params,\n body,\n computed,\n generator,\n async,\n });\n}\nexport function objectProperty(\n key:\n | t.Expression\n | t.Identifier\n | t.StringLiteral\n | t.NumericLiteral\n | t.BigIntLiteral\n | t.DecimalLiteral\n | t.PrivateName,\n value: t.Expression | t.PatternLike,\n computed: boolean = false,\n shorthand: boolean = false,\n decorators: Array | null = null,\n): t.ObjectProperty {\n return validateNode({\n type: \"ObjectProperty\",\n key,\n value,\n computed,\n shorthand,\n decorators,\n });\n}\nexport function restElement(argument: t.LVal): t.RestElement {\n return validateNode({\n type: \"RestElement\",\n argument,\n });\n}\nexport function returnStatement(\n argument: t.Expression | null = null,\n): t.ReturnStatement {\n return validateNode({\n type: \"ReturnStatement\",\n argument,\n });\n}\nexport function sequenceExpression(\n expressions: Array,\n): t.SequenceExpression {\n return validateNode({\n type: \"SequenceExpression\",\n expressions,\n });\n}\nexport function parenthesizedExpression(\n expression: t.Expression,\n): t.ParenthesizedExpression {\n return validateNode({\n type: \"ParenthesizedExpression\",\n expression,\n });\n}\nexport function switchCase(\n test: t.Expression | null | undefined = null,\n consequent: Array,\n): t.SwitchCase {\n return validateNode({\n type: \"SwitchCase\",\n test,\n consequent,\n });\n}\nexport function switchStatement(\n discriminant: t.Expression,\n cases: Array,\n): t.SwitchStatement {\n return validateNode({\n type: \"SwitchStatement\",\n discriminant,\n cases,\n });\n}\nexport function thisExpression(): t.ThisExpression {\n return {\n type: \"ThisExpression\",\n };\n}\nexport function throwStatement(argument: t.Expression): t.ThrowStatement {\n return validateNode({\n type: \"ThrowStatement\",\n argument,\n });\n}\nexport function tryStatement(\n block: t.BlockStatement,\n handler: t.CatchClause | null = null,\n finalizer: t.BlockStatement | null = null,\n): t.TryStatement {\n return validateNode({\n type: \"TryStatement\",\n block,\n handler,\n finalizer,\n });\n}\nexport function unaryExpression(\n operator: \"void\" | \"throw\" | \"delete\" | \"!\" | \"+\" | \"-\" | \"~\" | \"typeof\",\n argument: t.Expression,\n prefix: boolean = true,\n): t.UnaryExpression {\n return validateNode({\n type: \"UnaryExpression\",\n operator,\n argument,\n prefix,\n });\n}\nexport function updateExpression(\n operator: \"++\" | \"--\",\n argument: t.Expression,\n prefix: boolean = false,\n): t.UpdateExpression {\n return validateNode({\n type: \"UpdateExpression\",\n operator,\n argument,\n prefix,\n });\n}\nexport function variableDeclaration(\n kind: \"var\" | \"let\" | \"const\" | \"using\" | \"await using\",\n declarations: Array,\n): t.VariableDeclaration {\n return validateNode({\n type: \"VariableDeclaration\",\n kind,\n declarations,\n });\n}\nexport function variableDeclarator(\n id: t.LVal,\n init: t.Expression | null = null,\n): t.VariableDeclarator {\n return validateNode({\n type: \"VariableDeclarator\",\n id,\n init,\n });\n}\nexport function whileStatement(\n test: t.Expression,\n body: t.Statement,\n): t.WhileStatement {\n return validateNode({\n type: \"WhileStatement\",\n test,\n body,\n });\n}\nexport function withStatement(\n object: t.Expression,\n body: t.Statement,\n): t.WithStatement {\n return validateNode({\n type: \"WithStatement\",\n object,\n body,\n });\n}\nexport function assignmentPattern(\n left:\n | t.Identifier\n | t.ObjectPattern\n | t.ArrayPattern\n | t.MemberExpression\n | t.TSAsExpression\n | t.TSSatisfiesExpression\n | t.TSTypeAssertion\n | t.TSNonNullExpression,\n right: t.Expression,\n): t.AssignmentPattern {\n return validateNode({\n type: \"AssignmentPattern\",\n left,\n right,\n });\n}\nexport function arrayPattern(\n elements: Array,\n): t.ArrayPattern {\n return validateNode({\n type: \"ArrayPattern\",\n elements,\n });\n}\nexport function arrowFunctionExpression(\n params: Array,\n body: t.BlockStatement | t.Expression,\n async: boolean = false,\n): t.ArrowFunctionExpression {\n return validateNode({\n type: \"ArrowFunctionExpression\",\n params,\n body,\n async,\n expression: null,\n });\n}\nexport function classBody(\n body: Array<\n | t.ClassMethod\n | t.ClassPrivateMethod\n | t.ClassProperty\n | t.ClassPrivateProperty\n | t.ClassAccessorProperty\n | t.TSDeclareMethod\n | t.TSIndexSignature\n | t.StaticBlock\n >,\n): t.ClassBody {\n return validateNode({\n type: \"ClassBody\",\n body,\n });\n}\nexport function classExpression(\n id: t.Identifier | null | undefined = null,\n superClass: t.Expression | null | undefined = null,\n body: t.ClassBody,\n decorators: Array | null = null,\n): t.ClassExpression {\n return validateNode({\n type: \"ClassExpression\",\n id,\n superClass,\n body,\n decorators,\n });\n}\nexport function classDeclaration(\n id: t.Identifier | null | undefined = null,\n superClass: t.Expression | null | undefined = null,\n body: t.ClassBody,\n decorators: Array | null = null,\n): t.ClassDeclaration {\n return validateNode({\n type: \"ClassDeclaration\",\n id,\n superClass,\n body,\n decorators,\n });\n}\nexport function exportAllDeclaration(\n source: t.StringLiteral,\n): t.ExportAllDeclaration {\n return validateNode({\n type: \"ExportAllDeclaration\",\n source,\n });\n}\nexport function exportDefaultDeclaration(\n declaration:\n | t.TSDeclareFunction\n | t.FunctionDeclaration\n | t.ClassDeclaration\n | t.Expression,\n): t.ExportDefaultDeclaration {\n return validateNode({\n type: \"ExportDefaultDeclaration\",\n declaration,\n });\n}\nexport function exportNamedDeclaration(\n declaration: t.Declaration | null = null,\n specifiers: Array<\n t.ExportSpecifier | t.ExportDefaultSpecifier | t.ExportNamespaceSpecifier\n > = [],\n source: t.StringLiteral | null = null,\n): t.ExportNamedDeclaration {\n return validateNode({\n type: \"ExportNamedDeclaration\",\n declaration,\n specifiers,\n source,\n });\n}\nexport function exportSpecifier(\n local: t.Identifier,\n exported: t.Identifier | t.StringLiteral,\n): t.ExportSpecifier {\n return validateNode({\n type: \"ExportSpecifier\",\n local,\n exported,\n });\n}\nexport function forOfStatement(\n left: t.VariableDeclaration | t.LVal,\n right: t.Expression,\n body: t.Statement,\n _await: boolean = false,\n): t.ForOfStatement {\n return validateNode({\n type: \"ForOfStatement\",\n left,\n right,\n body,\n await: _await,\n });\n}\nexport function importDeclaration(\n specifiers: Array<\n t.ImportSpecifier | t.ImportDefaultSpecifier | t.ImportNamespaceSpecifier\n >,\n source: t.StringLiteral,\n): t.ImportDeclaration {\n return validateNode({\n type: \"ImportDeclaration\",\n specifiers,\n source,\n });\n}\nexport function importDefaultSpecifier(\n local: t.Identifier,\n): t.ImportDefaultSpecifier {\n return validateNode({\n type: \"ImportDefaultSpecifier\",\n local,\n });\n}\nexport function importNamespaceSpecifier(\n local: t.Identifier,\n): t.ImportNamespaceSpecifier {\n return validateNode({\n type: \"ImportNamespaceSpecifier\",\n local,\n });\n}\nexport function importSpecifier(\n local: t.Identifier,\n imported: t.Identifier | t.StringLiteral,\n): t.ImportSpecifier {\n return validateNode({\n type: \"ImportSpecifier\",\n local,\n imported,\n });\n}\nexport function importExpression(\n source: t.Expression,\n options: t.Expression | null = null,\n): t.ImportExpression {\n return validateNode({\n type: \"ImportExpression\",\n source,\n options,\n });\n}\nexport function metaProperty(\n meta: t.Identifier,\n property: t.Identifier,\n): t.MetaProperty {\n return validateNode({\n type: \"MetaProperty\",\n meta,\n property,\n });\n}\nexport function classMethod(\n kind: \"get\" | \"set\" | \"method\" | \"constructor\" | undefined = \"method\",\n key:\n | t.Identifier\n | t.StringLiteral\n | t.NumericLiteral\n | t.BigIntLiteral\n | t.Expression,\n params: Array<\n t.Identifier | t.Pattern | t.RestElement | t.TSParameterProperty\n >,\n body: t.BlockStatement,\n computed: boolean = false,\n _static: boolean = false,\n generator: boolean = false,\n async: boolean = false,\n): t.ClassMethod {\n return validateNode({\n type: \"ClassMethod\",\n kind,\n key,\n params,\n body,\n computed,\n static: _static,\n generator,\n async,\n });\n}\nexport function objectPattern(\n properties: Array,\n): t.ObjectPattern {\n return validateNode({\n type: \"ObjectPattern\",\n properties,\n });\n}\nexport function spreadElement(argument: t.Expression): t.SpreadElement {\n return validateNode({\n type: \"SpreadElement\",\n argument,\n });\n}\nfunction _super(): t.Super {\n return {\n type: \"Super\",\n };\n}\nexport { _super as super };\nexport function taggedTemplateExpression(\n tag: t.Expression,\n quasi: t.TemplateLiteral,\n): t.TaggedTemplateExpression {\n return validateNode({\n type: \"TaggedTemplateExpression\",\n tag,\n quasi,\n });\n}\nexport function templateElement(\n value: { raw: string; cooked?: string },\n tail: boolean = false,\n): t.TemplateElement {\n return validateNode({\n type: \"TemplateElement\",\n value,\n tail,\n });\n}\nexport function templateLiteral(\n quasis: Array,\n expressions: Array,\n): t.TemplateLiteral {\n return validateNode({\n type: \"TemplateLiteral\",\n quasis,\n expressions,\n });\n}\nexport function yieldExpression(\n argument: t.Expression | null = null,\n delegate: boolean = false,\n): t.YieldExpression {\n return validateNode({\n type: \"YieldExpression\",\n argument,\n delegate,\n });\n}\nexport function awaitExpression(argument: t.Expression): t.AwaitExpression {\n return validateNode({\n type: \"AwaitExpression\",\n argument,\n });\n}\nfunction _import(): t.Import {\n return {\n type: \"Import\",\n };\n}\nexport { _import as import };\nexport function bigIntLiteral(value: string): t.BigIntLiteral {\n return validateNode({\n type: \"BigIntLiteral\",\n value,\n });\n}\nexport function exportNamespaceSpecifier(\n exported: t.Identifier,\n): t.ExportNamespaceSpecifier {\n return validateNode({\n type: \"ExportNamespaceSpecifier\",\n exported,\n });\n}\nexport function optionalMemberExpression(\n object: t.Expression,\n property: t.Expression | t.Identifier,\n computed: boolean | undefined = false,\n optional: boolean,\n): t.OptionalMemberExpression {\n return validateNode({\n type: \"OptionalMemberExpression\",\n object,\n property,\n computed,\n optional,\n });\n}\nexport function optionalCallExpression(\n callee: t.Expression,\n _arguments: Array,\n optional: boolean,\n): t.OptionalCallExpression {\n return validateNode({\n type: \"OptionalCallExpression\",\n callee,\n arguments: _arguments,\n optional,\n });\n}\nexport function classProperty(\n key:\n | t.Identifier\n | t.StringLiteral\n | t.NumericLiteral\n | t.BigIntLiteral\n | t.Expression,\n value: t.Expression | null = null,\n typeAnnotation: t.TypeAnnotation | t.TSTypeAnnotation | t.Noop | null = null,\n decorators: Array | null = null,\n computed: boolean = false,\n _static: boolean = false,\n): t.ClassProperty {\n return validateNode({\n type: \"ClassProperty\",\n key,\n value,\n typeAnnotation,\n decorators,\n computed,\n static: _static,\n });\n}\nexport function classAccessorProperty(\n key:\n | t.Identifier\n | t.StringLiteral\n | t.NumericLiteral\n | t.BigIntLiteral\n | t.Expression\n | t.PrivateName,\n value: t.Expression | null = null,\n typeAnnotation: t.TypeAnnotation | t.TSTypeAnnotation | t.Noop | null = null,\n decorators: Array | null = null,\n computed: boolean = false,\n _static: boolean = false,\n): t.ClassAccessorProperty {\n return validateNode({\n type: \"ClassAccessorProperty\",\n key,\n value,\n typeAnnotation,\n decorators,\n computed,\n static: _static,\n });\n}\nexport function classPrivateProperty(\n key: t.PrivateName,\n value: t.Expression | null = null,\n decorators: Array | null = null,\n _static: boolean = false,\n): t.ClassPrivateProperty {\n return validateNode({\n type: \"ClassPrivateProperty\",\n key,\n value,\n decorators,\n static: _static,\n });\n}\nexport function classPrivateMethod(\n kind: \"get\" | \"set\" | \"method\" | undefined = \"method\",\n key: t.PrivateName,\n params: Array<\n t.Identifier | t.Pattern | t.RestElement | t.TSParameterProperty\n >,\n body: t.BlockStatement,\n _static: boolean = false,\n): t.ClassPrivateMethod {\n return validateNode({\n type: \"ClassPrivateMethod\",\n kind,\n key,\n params,\n body,\n static: _static,\n });\n}\nexport function privateName(id: t.Identifier): t.PrivateName {\n return validateNode({\n type: \"PrivateName\",\n id,\n });\n}\nexport function staticBlock(body: Array): t.StaticBlock {\n return validateNode({\n type: \"StaticBlock\",\n body,\n });\n}\nexport function anyTypeAnnotation(): t.AnyTypeAnnotation {\n return {\n type: \"AnyTypeAnnotation\",\n };\n}\nexport function arrayTypeAnnotation(\n elementType: t.FlowType,\n): t.ArrayTypeAnnotation {\n return validateNode({\n type: \"ArrayTypeAnnotation\",\n elementType,\n });\n}\nexport function booleanTypeAnnotation(): t.BooleanTypeAnnotation {\n return {\n type: \"BooleanTypeAnnotation\",\n };\n}\nexport function booleanLiteralTypeAnnotation(\n value: boolean,\n): t.BooleanLiteralTypeAnnotation {\n return validateNode({\n type: \"BooleanLiteralTypeAnnotation\",\n value,\n });\n}\nexport function nullLiteralTypeAnnotation(): t.NullLiteralTypeAnnotation {\n return {\n type: \"NullLiteralTypeAnnotation\",\n };\n}\nexport function classImplements(\n id: t.Identifier,\n typeParameters: t.TypeParameterInstantiation | null = null,\n): t.ClassImplements {\n return validateNode({\n type: \"ClassImplements\",\n id,\n typeParameters,\n });\n}\nexport function declareClass(\n id: t.Identifier,\n typeParameters: t.TypeParameterDeclaration | null | undefined = null,\n _extends: Array | null | undefined = null,\n body: t.ObjectTypeAnnotation,\n): t.DeclareClass {\n return validateNode({\n type: \"DeclareClass\",\n id,\n typeParameters,\n extends: _extends,\n body,\n });\n}\nexport function declareFunction(id: t.Identifier): t.DeclareFunction {\n return validateNode({\n type: \"DeclareFunction\",\n id,\n });\n}\nexport function declareInterface(\n id: t.Identifier,\n typeParameters: t.TypeParameterDeclaration | null | undefined = null,\n _extends: Array | null | undefined = null,\n body: t.ObjectTypeAnnotation,\n): t.DeclareInterface {\n return validateNode({\n type: \"DeclareInterface\",\n id,\n typeParameters,\n extends: _extends,\n body,\n });\n}\nexport function declareModule(\n id: t.Identifier | t.StringLiteral,\n body: t.BlockStatement,\n kind: \"CommonJS\" | \"ES\" | null = null,\n): t.DeclareModule {\n return validateNode({\n type: \"DeclareModule\",\n id,\n body,\n kind,\n });\n}\nexport function declareModuleExports(\n typeAnnotation: t.TypeAnnotation,\n): t.DeclareModuleExports {\n return validateNode({\n type: \"DeclareModuleExports\",\n typeAnnotation,\n });\n}\nexport function declareTypeAlias(\n id: t.Identifier,\n typeParameters: t.TypeParameterDeclaration | null | undefined = null,\n right: t.FlowType,\n): t.DeclareTypeAlias {\n return validateNode({\n type: \"DeclareTypeAlias\",\n id,\n typeParameters,\n right,\n });\n}\nexport function declareOpaqueType(\n id: t.Identifier,\n typeParameters: t.TypeParameterDeclaration | null = null,\n supertype: t.FlowType | null = null,\n): t.DeclareOpaqueType {\n return validateNode({\n type: \"DeclareOpaqueType\",\n id,\n typeParameters,\n supertype,\n });\n}\nexport function declareVariable(id: t.Identifier): t.DeclareVariable {\n return validateNode({\n type: \"DeclareVariable\",\n id,\n });\n}\nexport function declareExportDeclaration(\n declaration: t.Flow | null = null,\n specifiers: Array<\n t.ExportSpecifier | t.ExportNamespaceSpecifier\n > | null = null,\n source: t.StringLiteral | null = null,\n): t.DeclareExportDeclaration {\n return validateNode({\n type: \"DeclareExportDeclaration\",\n declaration,\n specifiers,\n source,\n });\n}\nexport function declareExportAllDeclaration(\n source: t.StringLiteral,\n): t.DeclareExportAllDeclaration {\n return validateNode({\n type: \"DeclareExportAllDeclaration\",\n source,\n });\n}\nexport function declaredPredicate(value: t.Flow): t.DeclaredPredicate {\n return validateNode({\n type: \"DeclaredPredicate\",\n value,\n });\n}\nexport function existsTypeAnnotation(): t.ExistsTypeAnnotation {\n return {\n type: \"ExistsTypeAnnotation\",\n };\n}\nexport function functionTypeAnnotation(\n typeParameters: t.TypeParameterDeclaration | null | undefined = null,\n params: Array,\n rest: t.FunctionTypeParam | null | undefined = null,\n returnType: t.FlowType,\n): t.FunctionTypeAnnotation {\n return validateNode({\n type: \"FunctionTypeAnnotation\",\n typeParameters,\n params,\n rest,\n returnType,\n });\n}\nexport function functionTypeParam(\n name: t.Identifier | null | undefined = null,\n typeAnnotation: t.FlowType,\n): t.FunctionTypeParam {\n return validateNode({\n type: \"FunctionTypeParam\",\n name,\n typeAnnotation,\n });\n}\nexport function genericTypeAnnotation(\n id: t.Identifier | t.QualifiedTypeIdentifier,\n typeParameters: t.TypeParameterInstantiation | null = null,\n): t.GenericTypeAnnotation {\n return validateNode({\n type: \"GenericTypeAnnotation\",\n id,\n typeParameters,\n });\n}\nexport function inferredPredicate(): t.InferredPredicate {\n return {\n type: \"InferredPredicate\",\n };\n}\nexport function interfaceExtends(\n id: t.Identifier | t.QualifiedTypeIdentifier,\n typeParameters: t.TypeParameterInstantiation | null = null,\n): t.InterfaceExtends {\n return validateNode({\n type: \"InterfaceExtends\",\n id,\n typeParameters,\n });\n}\nexport function interfaceDeclaration(\n id: t.Identifier,\n typeParameters: t.TypeParameterDeclaration | null | undefined = null,\n _extends: Array | null | undefined = null,\n body: t.ObjectTypeAnnotation,\n): t.InterfaceDeclaration {\n return validateNode({\n type: \"InterfaceDeclaration\",\n id,\n typeParameters,\n extends: _extends,\n body,\n });\n}\nexport function interfaceTypeAnnotation(\n _extends: Array | null | undefined = null,\n body: t.ObjectTypeAnnotation,\n): t.InterfaceTypeAnnotation {\n return validateNode({\n type: \"InterfaceTypeAnnotation\",\n extends: _extends,\n body,\n });\n}\nexport function intersectionTypeAnnotation(\n types: Array,\n): t.IntersectionTypeAnnotation {\n return validateNode({\n type: \"IntersectionTypeAnnotation\",\n types,\n });\n}\nexport function mixedTypeAnnotation(): t.MixedTypeAnnotation {\n return {\n type: \"MixedTypeAnnotation\",\n };\n}\nexport function emptyTypeAnnotation(): t.EmptyTypeAnnotation {\n return {\n type: \"EmptyTypeAnnotation\",\n };\n}\nexport function nullableTypeAnnotation(\n typeAnnotation: t.FlowType,\n): t.NullableTypeAnnotation {\n return validateNode({\n type: \"NullableTypeAnnotation\",\n typeAnnotation,\n });\n}\nexport function numberLiteralTypeAnnotation(\n value: number,\n): t.NumberLiteralTypeAnnotation {\n return validateNode({\n type: \"NumberLiteralTypeAnnotation\",\n value,\n });\n}\nexport function numberTypeAnnotation(): t.NumberTypeAnnotation {\n return {\n type: \"NumberTypeAnnotation\",\n };\n}\nexport function objectTypeAnnotation(\n properties: Array,\n indexers: Array = [],\n callProperties: Array = [],\n internalSlots: Array = [],\n exact: boolean = false,\n): t.ObjectTypeAnnotation {\n return validateNode({\n type: \"ObjectTypeAnnotation\",\n properties,\n indexers,\n callProperties,\n internalSlots,\n exact,\n });\n}\nexport function objectTypeInternalSlot(\n id: t.Identifier,\n value: t.FlowType,\n optional: boolean,\n _static: boolean,\n method: boolean,\n): t.ObjectTypeInternalSlot {\n return validateNode({\n type: \"ObjectTypeInternalSlot\",\n id,\n value,\n optional,\n static: _static,\n method,\n });\n}\nexport function objectTypeCallProperty(\n value: t.FlowType,\n): t.ObjectTypeCallProperty {\n return validateNode({\n type: \"ObjectTypeCallProperty\",\n value,\n static: null,\n });\n}\nexport function objectTypeIndexer(\n id: t.Identifier | null | undefined = null,\n key: t.FlowType,\n value: t.FlowType,\n variance: t.Variance | null = null,\n): t.ObjectTypeIndexer {\n return validateNode({\n type: \"ObjectTypeIndexer\",\n id,\n key,\n value,\n variance,\n static: null,\n });\n}\nexport function objectTypeProperty(\n key: t.Identifier | t.StringLiteral,\n value: t.FlowType,\n variance: t.Variance | null = null,\n): t.ObjectTypeProperty {\n return validateNode({\n type: \"ObjectTypeProperty\",\n key,\n value,\n variance,\n kind: null,\n method: null,\n optional: null,\n proto: null,\n static: null,\n });\n}\nexport function objectTypeSpreadProperty(\n argument: t.FlowType,\n): t.ObjectTypeSpreadProperty {\n return validateNode({\n type: \"ObjectTypeSpreadProperty\",\n argument,\n });\n}\nexport function opaqueType(\n id: t.Identifier,\n typeParameters: t.TypeParameterDeclaration | null | undefined = null,\n supertype: t.FlowType | null | undefined = null,\n impltype: t.FlowType,\n): t.OpaqueType {\n return validateNode({\n type: \"OpaqueType\",\n id,\n typeParameters,\n supertype,\n impltype,\n });\n}\nexport function qualifiedTypeIdentifier(\n id: t.Identifier,\n qualification: t.Identifier | t.QualifiedTypeIdentifier,\n): t.QualifiedTypeIdentifier {\n return validateNode({\n type: \"QualifiedTypeIdentifier\",\n id,\n qualification,\n });\n}\nexport function stringLiteralTypeAnnotation(\n value: string,\n): t.StringLiteralTypeAnnotation {\n return validateNode({\n type: \"StringLiteralTypeAnnotation\",\n value,\n });\n}\nexport function stringTypeAnnotation(): t.StringTypeAnnotation {\n return {\n type: \"StringTypeAnnotation\",\n };\n}\nexport function symbolTypeAnnotation(): t.SymbolTypeAnnotation {\n return {\n type: \"SymbolTypeAnnotation\",\n };\n}\nexport function thisTypeAnnotation(): t.ThisTypeAnnotation {\n return {\n type: \"ThisTypeAnnotation\",\n };\n}\nexport function tupleTypeAnnotation(\n types: Array,\n): t.TupleTypeAnnotation {\n return validateNode({\n type: \"TupleTypeAnnotation\",\n types,\n });\n}\nexport function typeofTypeAnnotation(\n argument: t.FlowType,\n): t.TypeofTypeAnnotation {\n return validateNode({\n type: \"TypeofTypeAnnotation\",\n argument,\n });\n}\nexport function typeAlias(\n id: t.Identifier,\n typeParameters: t.TypeParameterDeclaration | null | undefined = null,\n right: t.FlowType,\n): t.TypeAlias {\n return validateNode({\n type: \"TypeAlias\",\n id,\n typeParameters,\n right,\n });\n}\nexport function typeAnnotation(typeAnnotation: t.FlowType): t.TypeAnnotation {\n return validateNode({\n type: \"TypeAnnotation\",\n typeAnnotation,\n });\n}\nexport function typeCastExpression(\n expression: t.Expression,\n typeAnnotation: t.TypeAnnotation,\n): t.TypeCastExpression {\n return validateNode({\n type: \"TypeCastExpression\",\n expression,\n typeAnnotation,\n });\n}\nexport function typeParameter(\n bound: t.TypeAnnotation | null = null,\n _default: t.FlowType | null = null,\n variance: t.Variance | null = null,\n): t.TypeParameter {\n return validateNode({\n type: \"TypeParameter\",\n bound,\n default: _default,\n variance,\n name: null,\n });\n}\nexport function typeParameterDeclaration(\n params: Array,\n): t.TypeParameterDeclaration {\n return validateNode({\n type: \"TypeParameterDeclaration\",\n params,\n });\n}\nexport function typeParameterInstantiation(\n params: Array,\n): t.TypeParameterInstantiation {\n return validateNode({\n type: \"TypeParameterInstantiation\",\n params,\n });\n}\nexport function unionTypeAnnotation(\n types: Array,\n): t.UnionTypeAnnotation {\n return validateNode({\n type: \"UnionTypeAnnotation\",\n types,\n });\n}\nexport function variance(kind: \"minus\" | \"plus\"): t.Variance {\n return validateNode({\n type: \"Variance\",\n kind,\n });\n}\nexport function voidTypeAnnotation(): t.VoidTypeAnnotation {\n return {\n type: \"VoidTypeAnnotation\",\n };\n}\nexport function enumDeclaration(\n id: t.Identifier,\n body:\n | t.EnumBooleanBody\n | t.EnumNumberBody\n | t.EnumStringBody\n | t.EnumSymbolBody,\n): t.EnumDeclaration {\n return validateNode({\n type: \"EnumDeclaration\",\n id,\n body,\n });\n}\nexport function enumBooleanBody(\n members: Array,\n): t.EnumBooleanBody {\n return validateNode({\n type: \"EnumBooleanBody\",\n members,\n explicitType: null,\n hasUnknownMembers: null,\n });\n}\nexport function enumNumberBody(\n members: Array,\n): t.EnumNumberBody {\n return validateNode({\n type: \"EnumNumberBody\",\n members,\n explicitType: null,\n hasUnknownMembers: null,\n });\n}\nexport function enumStringBody(\n members: Array,\n): t.EnumStringBody {\n return validateNode({\n type: \"EnumStringBody\",\n members,\n explicitType: null,\n hasUnknownMembers: null,\n });\n}\nexport function enumSymbolBody(\n members: Array,\n): t.EnumSymbolBody {\n return validateNode({\n type: \"EnumSymbolBody\",\n members,\n hasUnknownMembers: null,\n });\n}\nexport function enumBooleanMember(id: t.Identifier): t.EnumBooleanMember {\n return validateNode({\n type: \"EnumBooleanMember\",\n id,\n init: null,\n });\n}\nexport function enumNumberMember(\n id: t.Identifier,\n init: t.NumericLiteral,\n): t.EnumNumberMember {\n return validateNode({\n type: \"EnumNumberMember\",\n id,\n init,\n });\n}\nexport function enumStringMember(\n id: t.Identifier,\n init: t.StringLiteral,\n): t.EnumStringMember {\n return validateNode({\n type: \"EnumStringMember\",\n id,\n init,\n });\n}\nexport function enumDefaultedMember(id: t.Identifier): t.EnumDefaultedMember {\n return validateNode({\n type: \"EnumDefaultedMember\",\n id,\n });\n}\nexport function indexedAccessType(\n objectType: t.FlowType,\n indexType: t.FlowType,\n): t.IndexedAccessType {\n return validateNode({\n type: \"IndexedAccessType\",\n objectType,\n indexType,\n });\n}\nexport function optionalIndexedAccessType(\n objectType: t.FlowType,\n indexType: t.FlowType,\n): t.OptionalIndexedAccessType {\n return validateNode({\n type: \"OptionalIndexedAccessType\",\n objectType,\n indexType,\n optional: null,\n });\n}\nexport function jsxAttribute(\n name: t.JSXIdentifier | t.JSXNamespacedName,\n value:\n | t.JSXElement\n | t.JSXFragment\n | t.StringLiteral\n | t.JSXExpressionContainer\n | null = null,\n): t.JSXAttribute {\n return validateNode({\n type: \"JSXAttribute\",\n name,\n value,\n });\n}\nexport { jsxAttribute as jSXAttribute };\nexport function jsxClosingElement(\n name: t.JSXIdentifier | t.JSXMemberExpression | t.JSXNamespacedName,\n): t.JSXClosingElement {\n return validateNode({\n type: \"JSXClosingElement\",\n name,\n });\n}\nexport { jsxClosingElement as jSXClosingElement };\nexport function jsxElement(\n openingElement: t.JSXOpeningElement,\n closingElement: t.JSXClosingElement | null | undefined = null,\n children: Array<\n | t.JSXText\n | t.JSXExpressionContainer\n | t.JSXSpreadChild\n | t.JSXElement\n | t.JSXFragment\n >,\n selfClosing: boolean | null = null,\n): t.JSXElement {\n return validateNode({\n type: \"JSXElement\",\n openingElement,\n closingElement,\n children,\n selfClosing,\n });\n}\nexport { jsxElement as jSXElement };\nexport function jsxEmptyExpression(): t.JSXEmptyExpression {\n return {\n type: \"JSXEmptyExpression\",\n };\n}\nexport { jsxEmptyExpression as jSXEmptyExpression };\nexport function jsxExpressionContainer(\n expression: t.Expression | t.JSXEmptyExpression,\n): t.JSXExpressionContainer {\n return validateNode({\n type: \"JSXExpressionContainer\",\n expression,\n });\n}\nexport { jsxExpressionContainer as jSXExpressionContainer };\nexport function jsxSpreadChild(expression: t.Expression): t.JSXSpreadChild {\n return validateNode({\n type: \"JSXSpreadChild\",\n expression,\n });\n}\nexport { jsxSpreadChild as jSXSpreadChild };\nexport function jsxIdentifier(name: string): t.JSXIdentifier {\n return validateNode({\n type: \"JSXIdentifier\",\n name,\n });\n}\nexport { jsxIdentifier as jSXIdentifier };\nexport function jsxMemberExpression(\n object: t.JSXMemberExpression | t.JSXIdentifier,\n property: t.JSXIdentifier,\n): t.JSXMemberExpression {\n return validateNode({\n type: \"JSXMemberExpression\",\n object,\n property,\n });\n}\nexport { jsxMemberExpression as jSXMemberExpression };\nexport function jsxNamespacedName(\n namespace: t.JSXIdentifier,\n name: t.JSXIdentifier,\n): t.JSXNamespacedName {\n return validateNode({\n type: \"JSXNamespacedName\",\n namespace,\n name,\n });\n}\nexport { jsxNamespacedName as jSXNamespacedName };\nexport function jsxOpeningElement(\n name: t.JSXIdentifier | t.JSXMemberExpression | t.JSXNamespacedName,\n attributes: Array,\n selfClosing: boolean = false,\n): t.JSXOpeningElement {\n return validateNode({\n type: \"JSXOpeningElement\",\n name,\n attributes,\n selfClosing,\n });\n}\nexport { jsxOpeningElement as jSXOpeningElement };\nexport function jsxSpreadAttribute(\n argument: t.Expression,\n): t.JSXSpreadAttribute {\n return validateNode({\n type: \"JSXSpreadAttribute\",\n argument,\n });\n}\nexport { jsxSpreadAttribute as jSXSpreadAttribute };\nexport function jsxText(value: string): t.JSXText {\n return validateNode({\n type: \"JSXText\",\n value,\n });\n}\nexport { jsxText as jSXText };\nexport function jsxFragment(\n openingFragment: t.JSXOpeningFragment,\n closingFragment: t.JSXClosingFragment,\n children: Array<\n | t.JSXText\n | t.JSXExpressionContainer\n | t.JSXSpreadChild\n | t.JSXElement\n | t.JSXFragment\n >,\n): t.JSXFragment {\n return validateNode({\n type: \"JSXFragment\",\n openingFragment,\n closingFragment,\n children,\n });\n}\nexport { jsxFragment as jSXFragment };\nexport function jsxOpeningFragment(): t.JSXOpeningFragment {\n return {\n type: \"JSXOpeningFragment\",\n };\n}\nexport { jsxOpeningFragment as jSXOpeningFragment };\nexport function jsxClosingFragment(): t.JSXClosingFragment {\n return {\n type: \"JSXClosingFragment\",\n };\n}\nexport { jsxClosingFragment as jSXClosingFragment };\nexport function noop(): t.Noop {\n return {\n type: \"Noop\",\n };\n}\nexport function placeholder(\n expectedNode:\n | \"Identifier\"\n | \"StringLiteral\"\n | \"Expression\"\n | \"Statement\"\n | \"Declaration\"\n | \"BlockStatement\"\n | \"ClassBody\"\n | \"Pattern\",\n name: t.Identifier,\n): t.Placeholder {\n return validateNode({\n type: \"Placeholder\",\n expectedNode,\n name,\n });\n}\nexport function v8IntrinsicIdentifier(name: string): t.V8IntrinsicIdentifier {\n return validateNode({\n type: \"V8IntrinsicIdentifier\",\n name,\n });\n}\nexport function argumentPlaceholder(): t.ArgumentPlaceholder {\n return {\n type: \"ArgumentPlaceholder\",\n };\n}\nexport function bindExpression(\n object: t.Expression,\n callee: t.Expression,\n): t.BindExpression {\n return validateNode({\n type: \"BindExpression\",\n object,\n callee,\n });\n}\nexport function importAttribute(\n key: t.Identifier | t.StringLiteral,\n value: t.StringLiteral,\n): t.ImportAttribute {\n return validateNode({\n type: \"ImportAttribute\",\n key,\n value,\n });\n}\nexport function decorator(expression: t.Expression): t.Decorator {\n return validateNode({\n type: \"Decorator\",\n expression,\n });\n}\nexport function doExpression(\n body: t.BlockStatement,\n async: boolean = false,\n): t.DoExpression {\n return validateNode({\n type: \"DoExpression\",\n body,\n async,\n });\n}\nexport function exportDefaultSpecifier(\n exported: t.Identifier,\n): t.ExportDefaultSpecifier {\n return validateNode({\n type: \"ExportDefaultSpecifier\",\n exported,\n });\n}\nexport function recordExpression(\n properties: Array,\n): t.RecordExpression {\n return validateNode({\n type: \"RecordExpression\",\n properties,\n });\n}\nexport function tupleExpression(\n elements: Array = [],\n): t.TupleExpression {\n return validateNode({\n type: \"TupleExpression\",\n elements,\n });\n}\nexport function decimalLiteral(value: string): t.DecimalLiteral {\n return validateNode({\n type: \"DecimalLiteral\",\n value,\n });\n}\nexport function moduleExpression(body: t.Program): t.ModuleExpression {\n return validateNode({\n type: \"ModuleExpression\",\n body,\n });\n}\nexport function topicReference(): t.TopicReference {\n return {\n type: \"TopicReference\",\n };\n}\nexport function pipelineTopicExpression(\n expression: t.Expression,\n): t.PipelineTopicExpression {\n return validateNode({\n type: \"PipelineTopicExpression\",\n expression,\n });\n}\nexport function pipelineBareFunction(\n callee: t.Expression,\n): t.PipelineBareFunction {\n return validateNode({\n type: \"PipelineBareFunction\",\n callee,\n });\n}\nexport function pipelinePrimaryTopicReference(): t.PipelinePrimaryTopicReference {\n return {\n type: \"PipelinePrimaryTopicReference\",\n };\n}\nexport function tsParameterProperty(\n parameter: t.Identifier | t.AssignmentPattern,\n): t.TSParameterProperty {\n return validateNode({\n type: \"TSParameterProperty\",\n parameter,\n });\n}\nexport { tsParameterProperty as tSParameterProperty };\nexport function tsDeclareFunction(\n id: t.Identifier | null | undefined = null,\n typeParameters:\n | t.TSTypeParameterDeclaration\n | t.Noop\n | null\n | undefined = null,\n params: Array,\n returnType: t.TSTypeAnnotation | t.Noop | null = null,\n): t.TSDeclareFunction {\n return validateNode({\n type: \"TSDeclareFunction\",\n id,\n typeParameters,\n params,\n returnType,\n });\n}\nexport { tsDeclareFunction as tSDeclareFunction };\nexport function tsDeclareMethod(\n decorators: Array | null | undefined = null,\n key:\n | t.Identifier\n | t.StringLiteral\n | t.NumericLiteral\n | t.BigIntLiteral\n | t.Expression,\n typeParameters:\n | t.TSTypeParameterDeclaration\n | t.Noop\n | null\n | undefined = null,\n params: Array<\n t.Identifier | t.Pattern | t.RestElement | t.TSParameterProperty\n >,\n returnType: t.TSTypeAnnotation | t.Noop | null = null,\n): t.TSDeclareMethod {\n return validateNode({\n type: \"TSDeclareMethod\",\n decorators,\n key,\n typeParameters,\n params,\n returnType,\n });\n}\nexport { tsDeclareMethod as tSDeclareMethod };\nexport function tsQualifiedName(\n left: t.TSEntityName,\n right: t.Identifier,\n): t.TSQualifiedName {\n return validateNode({\n type: \"TSQualifiedName\",\n left,\n right,\n });\n}\nexport { tsQualifiedName as tSQualifiedName };\nexport function tsCallSignatureDeclaration(\n typeParameters: t.TSTypeParameterDeclaration | null | undefined = null,\n parameters: Array<\n t.ArrayPattern | t.Identifier | t.ObjectPattern | t.RestElement\n >,\n typeAnnotation: t.TSTypeAnnotation | null = null,\n): t.TSCallSignatureDeclaration {\n return validateNode({\n type: \"TSCallSignatureDeclaration\",\n typeParameters,\n parameters,\n typeAnnotation,\n });\n}\nexport { tsCallSignatureDeclaration as tSCallSignatureDeclaration };\nexport function tsConstructSignatureDeclaration(\n typeParameters: t.TSTypeParameterDeclaration | null | undefined = null,\n parameters: Array<\n t.ArrayPattern | t.Identifier | t.ObjectPattern | t.RestElement\n >,\n typeAnnotation: t.TSTypeAnnotation | null = null,\n): t.TSConstructSignatureDeclaration {\n return validateNode({\n type: \"TSConstructSignatureDeclaration\",\n typeParameters,\n parameters,\n typeAnnotation,\n });\n}\nexport { tsConstructSignatureDeclaration as tSConstructSignatureDeclaration };\nexport function tsPropertySignature(\n key: t.Expression,\n typeAnnotation: t.TSTypeAnnotation | null = null,\n): t.TSPropertySignature {\n return validateNode({\n type: \"TSPropertySignature\",\n key,\n typeAnnotation,\n kind: null,\n });\n}\nexport { tsPropertySignature as tSPropertySignature };\nexport function tsMethodSignature(\n key: t.Expression,\n typeParameters: t.TSTypeParameterDeclaration | null | undefined = null,\n parameters: Array<\n t.ArrayPattern | t.Identifier | t.ObjectPattern | t.RestElement\n >,\n typeAnnotation: t.TSTypeAnnotation | null = null,\n): t.TSMethodSignature {\n return validateNode({\n type: \"TSMethodSignature\",\n key,\n typeParameters,\n parameters,\n typeAnnotation,\n kind: null,\n });\n}\nexport { tsMethodSignature as tSMethodSignature };\nexport function tsIndexSignature(\n parameters: Array,\n typeAnnotation: t.TSTypeAnnotation | null = null,\n): t.TSIndexSignature {\n return validateNode({\n type: \"TSIndexSignature\",\n parameters,\n typeAnnotation,\n });\n}\nexport { tsIndexSignature as tSIndexSignature };\nexport function tsAnyKeyword(): t.TSAnyKeyword {\n return {\n type: \"TSAnyKeyword\",\n };\n}\nexport { tsAnyKeyword as tSAnyKeyword };\nexport function tsBooleanKeyword(): t.TSBooleanKeyword {\n return {\n type: \"TSBooleanKeyword\",\n };\n}\nexport { tsBooleanKeyword as tSBooleanKeyword };\nexport function tsBigIntKeyword(): t.TSBigIntKeyword {\n return {\n type: \"TSBigIntKeyword\",\n };\n}\nexport { tsBigIntKeyword as tSBigIntKeyword };\nexport function tsIntrinsicKeyword(): t.TSIntrinsicKeyword {\n return {\n type: \"TSIntrinsicKeyword\",\n };\n}\nexport { tsIntrinsicKeyword as tSIntrinsicKeyword };\nexport function tsNeverKeyword(): t.TSNeverKeyword {\n return {\n type: \"TSNeverKeyword\",\n };\n}\nexport { tsNeverKeyword as tSNeverKeyword };\nexport function tsNullKeyword(): t.TSNullKeyword {\n return {\n type: \"TSNullKeyword\",\n };\n}\nexport { tsNullKeyword as tSNullKeyword };\nexport function tsNumberKeyword(): t.TSNumberKeyword {\n return {\n type: \"TSNumberKeyword\",\n };\n}\nexport { tsNumberKeyword as tSNumberKeyword };\nexport function tsObjectKeyword(): t.TSObjectKeyword {\n return {\n type: \"TSObjectKeyword\",\n };\n}\nexport { tsObjectKeyword as tSObjectKeyword };\nexport function tsStringKeyword(): t.TSStringKeyword {\n return {\n type: \"TSStringKeyword\",\n };\n}\nexport { tsStringKeyword as tSStringKeyword };\nexport function tsSymbolKeyword(): t.TSSymbolKeyword {\n return {\n type: \"TSSymbolKeyword\",\n };\n}\nexport { tsSymbolKeyword as tSSymbolKeyword };\nexport function tsUndefinedKeyword(): t.TSUndefinedKeyword {\n return {\n type: \"TSUndefinedKeyword\",\n };\n}\nexport { tsUndefinedKeyword as tSUndefinedKeyword };\nexport function tsUnknownKeyword(): t.TSUnknownKeyword {\n return {\n type: \"TSUnknownKeyword\",\n };\n}\nexport { tsUnknownKeyword as tSUnknownKeyword };\nexport function tsVoidKeyword(): t.TSVoidKeyword {\n return {\n type: \"TSVoidKeyword\",\n };\n}\nexport { tsVoidKeyword as tSVoidKeyword };\nexport function tsThisType(): t.TSThisType {\n return {\n type: \"TSThisType\",\n };\n}\nexport { tsThisType as tSThisType };\nexport function tsFunctionType(\n typeParameters: t.TSTypeParameterDeclaration | null | undefined = null,\n parameters: Array<\n t.ArrayPattern | t.Identifier | t.ObjectPattern | t.RestElement\n >,\n typeAnnotation: t.TSTypeAnnotation | null = null,\n): t.TSFunctionType {\n return validateNode({\n type: \"TSFunctionType\",\n typeParameters,\n parameters,\n typeAnnotation,\n });\n}\nexport { tsFunctionType as tSFunctionType };\nexport function tsConstructorType(\n typeParameters: t.TSTypeParameterDeclaration | null | undefined = null,\n parameters: Array<\n t.ArrayPattern | t.Identifier | t.ObjectPattern | t.RestElement\n >,\n typeAnnotation: t.TSTypeAnnotation | null = null,\n): t.TSConstructorType {\n return validateNode({\n type: \"TSConstructorType\",\n typeParameters,\n parameters,\n typeAnnotation,\n });\n}\nexport { tsConstructorType as tSConstructorType };\nexport function tsTypeReference(\n typeName: t.TSEntityName,\n typeParameters: t.TSTypeParameterInstantiation | null = null,\n): t.TSTypeReference {\n return validateNode({\n type: \"TSTypeReference\",\n typeName,\n typeParameters,\n });\n}\nexport { tsTypeReference as tSTypeReference };\nexport function tsTypePredicate(\n parameterName: t.Identifier | t.TSThisType,\n typeAnnotation: t.TSTypeAnnotation | null = null,\n asserts: boolean | null = null,\n): t.TSTypePredicate {\n return validateNode({\n type: \"TSTypePredicate\",\n parameterName,\n typeAnnotation,\n asserts,\n });\n}\nexport { tsTypePredicate as tSTypePredicate };\nexport function tsTypeQuery(\n exprName: t.TSEntityName | t.TSImportType,\n typeParameters: t.TSTypeParameterInstantiation | null = null,\n): t.TSTypeQuery {\n return validateNode({\n type: \"TSTypeQuery\",\n exprName,\n typeParameters,\n });\n}\nexport { tsTypeQuery as tSTypeQuery };\nexport function tsTypeLiteral(\n members: Array,\n): t.TSTypeLiteral {\n return validateNode({\n type: \"TSTypeLiteral\",\n members,\n });\n}\nexport { tsTypeLiteral as tSTypeLiteral };\nexport function tsArrayType(elementType: t.TSType): t.TSArrayType {\n return validateNode({\n type: \"TSArrayType\",\n elementType,\n });\n}\nexport { tsArrayType as tSArrayType };\nexport function tsTupleType(\n elementTypes: Array,\n): t.TSTupleType {\n return validateNode({\n type: \"TSTupleType\",\n elementTypes,\n });\n}\nexport { tsTupleType as tSTupleType };\nexport function tsOptionalType(typeAnnotation: t.TSType): t.TSOptionalType {\n return validateNode({\n type: \"TSOptionalType\",\n typeAnnotation,\n });\n}\nexport { tsOptionalType as tSOptionalType };\nexport function tsRestType(typeAnnotation: t.TSType): t.TSRestType {\n return validateNode({\n type: \"TSRestType\",\n typeAnnotation,\n });\n}\nexport { tsRestType as tSRestType };\nexport function tsNamedTupleMember(\n label: t.Identifier,\n elementType: t.TSType,\n optional: boolean = false,\n): t.TSNamedTupleMember {\n return validateNode({\n type: \"TSNamedTupleMember\",\n label,\n elementType,\n optional,\n });\n}\nexport { tsNamedTupleMember as tSNamedTupleMember };\nexport function tsUnionType(types: Array): t.TSUnionType {\n return validateNode({\n type: \"TSUnionType\",\n types,\n });\n}\nexport { tsUnionType as tSUnionType };\nexport function tsIntersectionType(\n types: Array,\n): t.TSIntersectionType {\n return validateNode({\n type: \"TSIntersectionType\",\n types,\n });\n}\nexport { tsIntersectionType as tSIntersectionType };\nexport function tsConditionalType(\n checkType: t.TSType,\n extendsType: t.TSType,\n trueType: t.TSType,\n falseType: t.TSType,\n): t.TSConditionalType {\n return validateNode({\n type: \"TSConditionalType\",\n checkType,\n extendsType,\n trueType,\n falseType,\n });\n}\nexport { tsConditionalType as tSConditionalType };\nexport function tsInferType(typeParameter: t.TSTypeParameter): t.TSInferType {\n return validateNode({\n type: \"TSInferType\",\n typeParameter,\n });\n}\nexport { tsInferType as tSInferType };\nexport function tsParenthesizedType(\n typeAnnotation: t.TSType,\n): t.TSParenthesizedType {\n return validateNode({\n type: \"TSParenthesizedType\",\n typeAnnotation,\n });\n}\nexport { tsParenthesizedType as tSParenthesizedType };\nexport function tsTypeOperator(typeAnnotation: t.TSType): t.TSTypeOperator {\n return validateNode({\n type: \"TSTypeOperator\",\n typeAnnotation,\n operator: null,\n });\n}\nexport { tsTypeOperator as tSTypeOperator };\nexport function tsIndexedAccessType(\n objectType: t.TSType,\n indexType: t.TSType,\n): t.TSIndexedAccessType {\n return validateNode({\n type: \"TSIndexedAccessType\",\n objectType,\n indexType,\n });\n}\nexport { tsIndexedAccessType as tSIndexedAccessType };\nexport function tsMappedType(\n typeParameter: t.TSTypeParameter,\n typeAnnotation: t.TSType | null = null,\n nameType: t.TSType | null = null,\n): t.TSMappedType {\n return validateNode({\n type: \"TSMappedType\",\n typeParameter,\n typeAnnotation,\n nameType,\n });\n}\nexport { tsMappedType as tSMappedType };\nexport function tsLiteralType(\n literal:\n | t.NumericLiteral\n | t.StringLiteral\n | t.BooleanLiteral\n | t.BigIntLiteral\n | t.TemplateLiteral\n | t.UnaryExpression,\n): t.TSLiteralType {\n return validateNode({\n type: \"TSLiteralType\",\n literal,\n });\n}\nexport { tsLiteralType as tSLiteralType };\nexport function tsExpressionWithTypeArguments(\n expression: t.TSEntityName,\n typeParameters: t.TSTypeParameterInstantiation | null = null,\n): t.TSExpressionWithTypeArguments {\n return validateNode({\n type: \"TSExpressionWithTypeArguments\",\n expression,\n typeParameters,\n });\n}\nexport { tsExpressionWithTypeArguments as tSExpressionWithTypeArguments };\nexport function tsInterfaceDeclaration(\n id: t.Identifier,\n typeParameters: t.TSTypeParameterDeclaration | null | undefined = null,\n _extends: Array | null | undefined = null,\n body: t.TSInterfaceBody,\n): t.TSInterfaceDeclaration {\n return validateNode({\n type: \"TSInterfaceDeclaration\",\n id,\n typeParameters,\n extends: _extends,\n body,\n });\n}\nexport { tsInterfaceDeclaration as tSInterfaceDeclaration };\nexport function tsInterfaceBody(\n body: Array,\n): t.TSInterfaceBody {\n return validateNode({\n type: \"TSInterfaceBody\",\n body,\n });\n}\nexport { tsInterfaceBody as tSInterfaceBody };\nexport function tsTypeAliasDeclaration(\n id: t.Identifier,\n typeParameters: t.TSTypeParameterDeclaration | null | undefined = null,\n typeAnnotation: t.TSType,\n): t.TSTypeAliasDeclaration {\n return validateNode({\n type: \"TSTypeAliasDeclaration\",\n id,\n typeParameters,\n typeAnnotation,\n });\n}\nexport { tsTypeAliasDeclaration as tSTypeAliasDeclaration };\nexport function tsInstantiationExpression(\n expression: t.Expression,\n typeParameters: t.TSTypeParameterInstantiation | null = null,\n): t.TSInstantiationExpression {\n return validateNode({\n type: \"TSInstantiationExpression\",\n expression,\n typeParameters,\n });\n}\nexport { tsInstantiationExpression as tSInstantiationExpression };\nexport function tsAsExpression(\n expression: t.Expression,\n typeAnnotation: t.TSType,\n): t.TSAsExpression {\n return validateNode({\n type: \"TSAsExpression\",\n expression,\n typeAnnotation,\n });\n}\nexport { tsAsExpression as tSAsExpression };\nexport function tsSatisfiesExpression(\n expression: t.Expression,\n typeAnnotation: t.TSType,\n): t.TSSatisfiesExpression {\n return validateNode({\n type: \"TSSatisfiesExpression\",\n expression,\n typeAnnotation,\n });\n}\nexport { tsSatisfiesExpression as tSSatisfiesExpression };\nexport function tsTypeAssertion(\n typeAnnotation: t.TSType,\n expression: t.Expression,\n): t.TSTypeAssertion {\n return validateNode({\n type: \"TSTypeAssertion\",\n typeAnnotation,\n expression,\n });\n}\nexport { tsTypeAssertion as tSTypeAssertion };\nexport function tsEnumDeclaration(\n id: t.Identifier,\n members: Array,\n): t.TSEnumDeclaration {\n return validateNode({\n type: \"TSEnumDeclaration\",\n id,\n members,\n });\n}\nexport { tsEnumDeclaration as tSEnumDeclaration };\nexport function tsEnumMember(\n id: t.Identifier | t.StringLiteral,\n initializer: t.Expression | null = null,\n): t.TSEnumMember {\n return validateNode({\n type: \"TSEnumMember\",\n id,\n initializer,\n });\n}\nexport { tsEnumMember as tSEnumMember };\nexport function tsModuleDeclaration(\n id: t.Identifier | t.StringLiteral,\n body: t.TSModuleBlock | t.TSModuleDeclaration,\n): t.TSModuleDeclaration {\n return validateNode({\n type: \"TSModuleDeclaration\",\n id,\n body,\n });\n}\nexport { tsModuleDeclaration as tSModuleDeclaration };\nexport function tsModuleBlock(body: Array): t.TSModuleBlock {\n return validateNode({\n type: \"TSModuleBlock\",\n body,\n });\n}\nexport { tsModuleBlock as tSModuleBlock };\nexport function tsImportType(\n argument: t.StringLiteral,\n qualifier: t.TSEntityName | null = null,\n typeParameters: t.TSTypeParameterInstantiation | null = null,\n): t.TSImportType {\n return validateNode({\n type: \"TSImportType\",\n argument,\n qualifier,\n typeParameters,\n });\n}\nexport { tsImportType as tSImportType };\nexport function tsImportEqualsDeclaration(\n id: t.Identifier,\n moduleReference: t.TSEntityName | t.TSExternalModuleReference,\n): t.TSImportEqualsDeclaration {\n return validateNode({\n type: \"TSImportEqualsDeclaration\",\n id,\n moduleReference,\n isExport: null,\n });\n}\nexport { tsImportEqualsDeclaration as tSImportEqualsDeclaration };\nexport function tsExternalModuleReference(\n expression: t.StringLiteral,\n): t.TSExternalModuleReference {\n return validateNode({\n type: \"TSExternalModuleReference\",\n expression,\n });\n}\nexport { tsExternalModuleReference as tSExternalModuleReference };\nexport function tsNonNullExpression(\n expression: t.Expression,\n): t.TSNonNullExpression {\n return validateNode({\n type: \"TSNonNullExpression\",\n expression,\n });\n}\nexport { tsNonNullExpression as tSNonNullExpression };\nexport function tsExportAssignment(\n expression: t.Expression,\n): t.TSExportAssignment {\n return validateNode({\n type: \"TSExportAssignment\",\n expression,\n });\n}\nexport { tsExportAssignment as tSExportAssignment };\nexport function tsNamespaceExportDeclaration(\n id: t.Identifier,\n): t.TSNamespaceExportDeclaration {\n return validateNode({\n type: \"TSNamespaceExportDeclaration\",\n id,\n });\n}\nexport { tsNamespaceExportDeclaration as tSNamespaceExportDeclaration };\nexport function tsTypeAnnotation(typeAnnotation: t.TSType): t.TSTypeAnnotation {\n return validateNode({\n type: \"TSTypeAnnotation\",\n typeAnnotation,\n });\n}\nexport { tsTypeAnnotation as tSTypeAnnotation };\nexport function tsTypeParameterInstantiation(\n params: Array,\n): t.TSTypeParameterInstantiation {\n return validateNode({\n type: \"TSTypeParameterInstantiation\",\n params,\n });\n}\nexport { tsTypeParameterInstantiation as tSTypeParameterInstantiation };\nexport function tsTypeParameterDeclaration(\n params: Array,\n): t.TSTypeParameterDeclaration {\n return validateNode({\n type: \"TSTypeParameterDeclaration\",\n params,\n });\n}\nexport { tsTypeParameterDeclaration as tSTypeParameterDeclaration };\nexport function tsTypeParameter(\n constraint: t.TSType | null | undefined = null,\n _default: t.TSType | null | undefined = null,\n name: string,\n): t.TSTypeParameter {\n return validateNode({\n type: \"TSTypeParameter\",\n constraint,\n default: _default,\n name,\n });\n}\nexport { tsTypeParameter as tSTypeParameter };\n/** @deprecated */\nfunction NumberLiteral(value: number) {\n deprecationWarning(\"NumberLiteral\", \"NumericLiteral\", \"The node type \");\n return numericLiteral(value);\n}\nexport { NumberLiteral as numberLiteral };\n/** @deprecated */\nfunction RegexLiteral(pattern: string, flags: string = \"\") {\n deprecationWarning(\"RegexLiteral\", \"RegExpLiteral\", \"The node type \");\n return regExpLiteral(pattern, flags);\n}\nexport { RegexLiteral as regexLiteral };\n/** @deprecated */\nfunction RestProperty(argument: t.LVal) {\n deprecationWarning(\"RestProperty\", \"RestElement\", \"The node type \");\n return restElement(argument);\n}\nexport { RestProperty as restProperty };\n/** @deprecated */\nfunction SpreadProperty(argument: t.Expression) {\n deprecationWarning(\"SpreadProperty\", \"SpreadElement\", \"The node type \");\n return spreadElement(argument);\n}\nexport { SpreadProperty as spreadProperty };\n","import { stringLiteral } from \"../../builders/generated/index.ts\";\nimport type * as t from \"../../index.ts\";\nimport { inherits } from \"../../index.ts\";\n\nexport default function cleanJSXElementLiteralChild(\n child: t.JSXText,\n args: Array,\n) {\n const lines = child.value.split(/\\r\\n|\\n|\\r/);\n\n let lastNonEmptyLine = 0;\n\n for (let i = 0; i < lines.length; i++) {\n if (/[^ \\t]/.exec(lines[i])) {\n lastNonEmptyLine = i;\n }\n }\n\n let str = \"\";\n\n for (let i = 0; i < lines.length; i++) {\n const line = lines[i];\n\n const isFirstLine = i === 0;\n const isLastLine = i === lines.length - 1;\n const isLastNonEmptyLine = i === lastNonEmptyLine;\n\n // replace rendered whitespace tabs with spaces\n let trimmedLine = line.replace(/\\t/g, \" \");\n\n // trim whitespace touching a newline\n if (!isFirstLine) {\n trimmedLine = trimmedLine.replace(/^ +/, \"\");\n }\n\n // trim whitespace touching an endline\n if (!isLastLine) {\n trimmedLine = trimmedLine.replace(/ +$/, \"\");\n }\n\n if (trimmedLine) {\n if (!isLastNonEmptyLine) {\n trimmedLine += \" \";\n }\n\n str += trimmedLine;\n }\n }\n\n if (str) args.push(inherits(stringLiteral(str), child));\n}\n","import {\n isJSXText,\n isJSXExpressionContainer,\n isJSXEmptyExpression,\n} from \"../../validators/generated/index.ts\";\nimport cleanJSXElementLiteralChild from \"../../utils/react/cleanJSXElementLiteralChild.ts\";\nimport type * as t from \"../../index.ts\";\n\ntype ReturnedChild =\n | t.JSXSpreadChild\n | t.JSXElement\n | t.JSXFragment\n | t.Expression;\n\nexport default function buildChildren(\n node: t.JSXElement | t.JSXFragment,\n): ReturnedChild[] {\n const elements = [];\n\n for (let i = 0; i < node.children.length; i++) {\n let child: any = node.children[i];\n\n if (isJSXText(child)) {\n cleanJSXElementLiteralChild(child, elements);\n continue;\n }\n\n if (isJSXExpressionContainer(child)) child = child.expression;\n if (isJSXEmptyExpression(child)) continue;\n\n elements.push(child);\n }\n\n return elements;\n}\n","import { VISITOR_KEYS } from \"../definitions/index.ts\";\nimport type * as t from \"../index.ts\";\n\nexport default function isNode(node: any): node is t.Node {\n return !!(node && VISITOR_KEYS[node.type]);\n}\n","import isNode from \"../validators/isNode.ts\";\nimport type * as t from \"../index.ts\";\n\nexport default function assertNode(node?: any): asserts node is t.Node {\n if (!isNode(node)) {\n const type = node?.type ?? JSON.stringify(node);\n throw new TypeError(`Not a valid node of type \"${type}\"`);\n }\n}\n","/*\n * This file is auto-generated! Do not modify it directly.\n * To re-generate run 'make build'\n */\nimport is from \"../../validators/is.ts\";\nimport type * as t from \"../../index.ts\";\nimport deprecationWarning from \"../../utils/deprecationWarning.ts\";\n\nfunction assert(type: string, node: any, opts?: any): void {\n if (!is(type, node, opts)) {\n throw new Error(\n `Expected type \"${type}\" with option ${JSON.stringify(opts)}, ` +\n `but instead got \"${node.type}\".`,\n );\n }\n}\n\nexport function assertArrayExpression(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.ArrayExpression {\n assert(\"ArrayExpression\", node, opts);\n}\nexport function assertAssignmentExpression(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.AssignmentExpression {\n assert(\"AssignmentExpression\", node, opts);\n}\nexport function assertBinaryExpression(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.BinaryExpression {\n assert(\"BinaryExpression\", node, opts);\n}\nexport function assertInterpreterDirective(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.InterpreterDirective {\n assert(\"InterpreterDirective\", node, opts);\n}\nexport function assertDirective(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.Directive {\n assert(\"Directive\", node, opts);\n}\nexport function assertDirectiveLiteral(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.DirectiveLiteral {\n assert(\"DirectiveLiteral\", node, opts);\n}\nexport function assertBlockStatement(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.BlockStatement {\n assert(\"BlockStatement\", node, opts);\n}\nexport function assertBreakStatement(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.BreakStatement {\n assert(\"BreakStatement\", node, opts);\n}\nexport function assertCallExpression(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.CallExpression {\n assert(\"CallExpression\", node, opts);\n}\nexport function assertCatchClause(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.CatchClause {\n assert(\"CatchClause\", node, opts);\n}\nexport function assertConditionalExpression(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.ConditionalExpression {\n assert(\"ConditionalExpression\", node, opts);\n}\nexport function assertContinueStatement(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.ContinueStatement {\n assert(\"ContinueStatement\", node, opts);\n}\nexport function assertDebuggerStatement(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.DebuggerStatement {\n assert(\"DebuggerStatement\", node, opts);\n}\nexport function assertDoWhileStatement(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.DoWhileStatement {\n assert(\"DoWhileStatement\", node, opts);\n}\nexport function assertEmptyStatement(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.EmptyStatement {\n assert(\"EmptyStatement\", node, opts);\n}\nexport function assertExpressionStatement(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.ExpressionStatement {\n assert(\"ExpressionStatement\", node, opts);\n}\nexport function assertFile(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.File {\n assert(\"File\", node, opts);\n}\nexport function assertForInStatement(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.ForInStatement {\n assert(\"ForInStatement\", node, opts);\n}\nexport function assertForStatement(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.ForStatement {\n assert(\"ForStatement\", node, opts);\n}\nexport function assertFunctionDeclaration(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.FunctionDeclaration {\n assert(\"FunctionDeclaration\", node, opts);\n}\nexport function assertFunctionExpression(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.FunctionExpression {\n assert(\"FunctionExpression\", node, opts);\n}\nexport function assertIdentifier(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.Identifier {\n assert(\"Identifier\", node, opts);\n}\nexport function assertIfStatement(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.IfStatement {\n assert(\"IfStatement\", node, opts);\n}\nexport function assertLabeledStatement(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.LabeledStatement {\n assert(\"LabeledStatement\", node, opts);\n}\nexport function assertStringLiteral(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.StringLiteral {\n assert(\"StringLiteral\", node, opts);\n}\nexport function assertNumericLiteral(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.NumericLiteral {\n assert(\"NumericLiteral\", node, opts);\n}\nexport function assertNullLiteral(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.NullLiteral {\n assert(\"NullLiteral\", node, opts);\n}\nexport function assertBooleanLiteral(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.BooleanLiteral {\n assert(\"BooleanLiteral\", node, opts);\n}\nexport function assertRegExpLiteral(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.RegExpLiteral {\n assert(\"RegExpLiteral\", node, opts);\n}\nexport function assertLogicalExpression(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.LogicalExpression {\n assert(\"LogicalExpression\", node, opts);\n}\nexport function assertMemberExpression(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.MemberExpression {\n assert(\"MemberExpression\", node, opts);\n}\nexport function assertNewExpression(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.NewExpression {\n assert(\"NewExpression\", node, opts);\n}\nexport function assertProgram(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.Program {\n assert(\"Program\", node, opts);\n}\nexport function assertObjectExpression(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.ObjectExpression {\n assert(\"ObjectExpression\", node, opts);\n}\nexport function assertObjectMethod(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.ObjectMethod {\n assert(\"ObjectMethod\", node, opts);\n}\nexport function assertObjectProperty(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.ObjectProperty {\n assert(\"ObjectProperty\", node, opts);\n}\nexport function assertRestElement(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.RestElement {\n assert(\"RestElement\", node, opts);\n}\nexport function assertReturnStatement(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.ReturnStatement {\n assert(\"ReturnStatement\", node, opts);\n}\nexport function assertSequenceExpression(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.SequenceExpression {\n assert(\"SequenceExpression\", node, opts);\n}\nexport function assertParenthesizedExpression(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.ParenthesizedExpression {\n assert(\"ParenthesizedExpression\", node, opts);\n}\nexport function assertSwitchCase(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.SwitchCase {\n assert(\"SwitchCase\", node, opts);\n}\nexport function assertSwitchStatement(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.SwitchStatement {\n assert(\"SwitchStatement\", node, opts);\n}\nexport function assertThisExpression(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.ThisExpression {\n assert(\"ThisExpression\", node, opts);\n}\nexport function assertThrowStatement(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.ThrowStatement {\n assert(\"ThrowStatement\", node, opts);\n}\nexport function assertTryStatement(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.TryStatement {\n assert(\"TryStatement\", node, opts);\n}\nexport function assertUnaryExpression(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.UnaryExpression {\n assert(\"UnaryExpression\", node, opts);\n}\nexport function assertUpdateExpression(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.UpdateExpression {\n assert(\"UpdateExpression\", node, opts);\n}\nexport function assertVariableDeclaration(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.VariableDeclaration {\n assert(\"VariableDeclaration\", node, opts);\n}\nexport function assertVariableDeclarator(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.VariableDeclarator {\n assert(\"VariableDeclarator\", node, opts);\n}\nexport function assertWhileStatement(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.WhileStatement {\n assert(\"WhileStatement\", node, opts);\n}\nexport function assertWithStatement(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.WithStatement {\n assert(\"WithStatement\", node, opts);\n}\nexport function assertAssignmentPattern(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.AssignmentPattern {\n assert(\"AssignmentPattern\", node, opts);\n}\nexport function assertArrayPattern(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.ArrayPattern {\n assert(\"ArrayPattern\", node, opts);\n}\nexport function assertArrowFunctionExpression(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.ArrowFunctionExpression {\n assert(\"ArrowFunctionExpression\", node, opts);\n}\nexport function assertClassBody(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.ClassBody {\n assert(\"ClassBody\", node, opts);\n}\nexport function assertClassExpression(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.ClassExpression {\n assert(\"ClassExpression\", node, opts);\n}\nexport function assertClassDeclaration(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.ClassDeclaration {\n assert(\"ClassDeclaration\", node, opts);\n}\nexport function assertExportAllDeclaration(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.ExportAllDeclaration {\n assert(\"ExportAllDeclaration\", node, opts);\n}\nexport function assertExportDefaultDeclaration(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.ExportDefaultDeclaration {\n assert(\"ExportDefaultDeclaration\", node, opts);\n}\nexport function assertExportNamedDeclaration(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.ExportNamedDeclaration {\n assert(\"ExportNamedDeclaration\", node, opts);\n}\nexport function assertExportSpecifier(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.ExportSpecifier {\n assert(\"ExportSpecifier\", node, opts);\n}\nexport function assertForOfStatement(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.ForOfStatement {\n assert(\"ForOfStatement\", node, opts);\n}\nexport function assertImportDeclaration(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.ImportDeclaration {\n assert(\"ImportDeclaration\", node, opts);\n}\nexport function assertImportDefaultSpecifier(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.ImportDefaultSpecifier {\n assert(\"ImportDefaultSpecifier\", node, opts);\n}\nexport function assertImportNamespaceSpecifier(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.ImportNamespaceSpecifier {\n assert(\"ImportNamespaceSpecifier\", node, opts);\n}\nexport function assertImportSpecifier(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.ImportSpecifier {\n assert(\"ImportSpecifier\", node, opts);\n}\nexport function assertImportExpression(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.ImportExpression {\n assert(\"ImportExpression\", node, opts);\n}\nexport function assertMetaProperty(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.MetaProperty {\n assert(\"MetaProperty\", node, opts);\n}\nexport function assertClassMethod(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.ClassMethod {\n assert(\"ClassMethod\", node, opts);\n}\nexport function assertObjectPattern(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.ObjectPattern {\n assert(\"ObjectPattern\", node, opts);\n}\nexport function assertSpreadElement(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.SpreadElement {\n assert(\"SpreadElement\", node, opts);\n}\nexport function assertSuper(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.Super {\n assert(\"Super\", node, opts);\n}\nexport function assertTaggedTemplateExpression(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.TaggedTemplateExpression {\n assert(\"TaggedTemplateExpression\", node, opts);\n}\nexport function assertTemplateElement(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.TemplateElement {\n assert(\"TemplateElement\", node, opts);\n}\nexport function assertTemplateLiteral(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.TemplateLiteral {\n assert(\"TemplateLiteral\", node, opts);\n}\nexport function assertYieldExpression(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.YieldExpression {\n assert(\"YieldExpression\", node, opts);\n}\nexport function assertAwaitExpression(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.AwaitExpression {\n assert(\"AwaitExpression\", node, opts);\n}\nexport function assertImport(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.Import {\n assert(\"Import\", node, opts);\n}\nexport function assertBigIntLiteral(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.BigIntLiteral {\n assert(\"BigIntLiteral\", node, opts);\n}\nexport function assertExportNamespaceSpecifier(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.ExportNamespaceSpecifier {\n assert(\"ExportNamespaceSpecifier\", node, opts);\n}\nexport function assertOptionalMemberExpression(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.OptionalMemberExpression {\n assert(\"OptionalMemberExpression\", node, opts);\n}\nexport function assertOptionalCallExpression(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.OptionalCallExpression {\n assert(\"OptionalCallExpression\", node, opts);\n}\nexport function assertClassProperty(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.ClassProperty {\n assert(\"ClassProperty\", node, opts);\n}\nexport function assertClassAccessorProperty(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.ClassAccessorProperty {\n assert(\"ClassAccessorProperty\", node, opts);\n}\nexport function assertClassPrivateProperty(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.ClassPrivateProperty {\n assert(\"ClassPrivateProperty\", node, opts);\n}\nexport function assertClassPrivateMethod(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.ClassPrivateMethod {\n assert(\"ClassPrivateMethod\", node, opts);\n}\nexport function assertPrivateName(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.PrivateName {\n assert(\"PrivateName\", node, opts);\n}\nexport function assertStaticBlock(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.StaticBlock {\n assert(\"StaticBlock\", node, opts);\n}\nexport function assertAnyTypeAnnotation(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.AnyTypeAnnotation {\n assert(\"AnyTypeAnnotation\", node, opts);\n}\nexport function assertArrayTypeAnnotation(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.ArrayTypeAnnotation {\n assert(\"ArrayTypeAnnotation\", node, opts);\n}\nexport function assertBooleanTypeAnnotation(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.BooleanTypeAnnotation {\n assert(\"BooleanTypeAnnotation\", node, opts);\n}\nexport function assertBooleanLiteralTypeAnnotation(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.BooleanLiteralTypeAnnotation {\n assert(\"BooleanLiteralTypeAnnotation\", node, opts);\n}\nexport function assertNullLiteralTypeAnnotation(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.NullLiteralTypeAnnotation {\n assert(\"NullLiteralTypeAnnotation\", node, opts);\n}\nexport function assertClassImplements(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.ClassImplements {\n assert(\"ClassImplements\", node, opts);\n}\nexport function assertDeclareClass(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.DeclareClass {\n assert(\"DeclareClass\", node, opts);\n}\nexport function assertDeclareFunction(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.DeclareFunction {\n assert(\"DeclareFunction\", node, opts);\n}\nexport function assertDeclareInterface(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.DeclareInterface {\n assert(\"DeclareInterface\", node, opts);\n}\nexport function assertDeclareModule(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.DeclareModule {\n assert(\"DeclareModule\", node, opts);\n}\nexport function assertDeclareModuleExports(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.DeclareModuleExports {\n assert(\"DeclareModuleExports\", node, opts);\n}\nexport function assertDeclareTypeAlias(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.DeclareTypeAlias {\n assert(\"DeclareTypeAlias\", node, opts);\n}\nexport function assertDeclareOpaqueType(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.DeclareOpaqueType {\n assert(\"DeclareOpaqueType\", node, opts);\n}\nexport function assertDeclareVariable(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.DeclareVariable {\n assert(\"DeclareVariable\", node, opts);\n}\nexport function assertDeclareExportDeclaration(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.DeclareExportDeclaration {\n assert(\"DeclareExportDeclaration\", node, opts);\n}\nexport function assertDeclareExportAllDeclaration(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.DeclareExportAllDeclaration {\n assert(\"DeclareExportAllDeclaration\", node, opts);\n}\nexport function assertDeclaredPredicate(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.DeclaredPredicate {\n assert(\"DeclaredPredicate\", node, opts);\n}\nexport function assertExistsTypeAnnotation(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.ExistsTypeAnnotation {\n assert(\"ExistsTypeAnnotation\", node, opts);\n}\nexport function assertFunctionTypeAnnotation(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.FunctionTypeAnnotation {\n assert(\"FunctionTypeAnnotation\", node, opts);\n}\nexport function assertFunctionTypeParam(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.FunctionTypeParam {\n assert(\"FunctionTypeParam\", node, opts);\n}\nexport function assertGenericTypeAnnotation(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.GenericTypeAnnotation {\n assert(\"GenericTypeAnnotation\", node, opts);\n}\nexport function assertInferredPredicate(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.InferredPredicate {\n assert(\"InferredPredicate\", node, opts);\n}\nexport function assertInterfaceExtends(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.InterfaceExtends {\n assert(\"InterfaceExtends\", node, opts);\n}\nexport function assertInterfaceDeclaration(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.InterfaceDeclaration {\n assert(\"InterfaceDeclaration\", node, opts);\n}\nexport function assertInterfaceTypeAnnotation(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.InterfaceTypeAnnotation {\n assert(\"InterfaceTypeAnnotation\", node, opts);\n}\nexport function assertIntersectionTypeAnnotation(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.IntersectionTypeAnnotation {\n assert(\"IntersectionTypeAnnotation\", node, opts);\n}\nexport function assertMixedTypeAnnotation(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.MixedTypeAnnotation {\n assert(\"MixedTypeAnnotation\", node, opts);\n}\nexport function assertEmptyTypeAnnotation(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.EmptyTypeAnnotation {\n assert(\"EmptyTypeAnnotation\", node, opts);\n}\nexport function assertNullableTypeAnnotation(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.NullableTypeAnnotation {\n assert(\"NullableTypeAnnotation\", node, opts);\n}\nexport function assertNumberLiteralTypeAnnotation(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.NumberLiteralTypeAnnotation {\n assert(\"NumberLiteralTypeAnnotation\", node, opts);\n}\nexport function assertNumberTypeAnnotation(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.NumberTypeAnnotation {\n assert(\"NumberTypeAnnotation\", node, opts);\n}\nexport function assertObjectTypeAnnotation(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.ObjectTypeAnnotation {\n assert(\"ObjectTypeAnnotation\", node, opts);\n}\nexport function assertObjectTypeInternalSlot(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.ObjectTypeInternalSlot {\n assert(\"ObjectTypeInternalSlot\", node, opts);\n}\nexport function assertObjectTypeCallProperty(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.ObjectTypeCallProperty {\n assert(\"ObjectTypeCallProperty\", node, opts);\n}\nexport function assertObjectTypeIndexer(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.ObjectTypeIndexer {\n assert(\"ObjectTypeIndexer\", node, opts);\n}\nexport function assertObjectTypeProperty(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.ObjectTypeProperty {\n assert(\"ObjectTypeProperty\", node, opts);\n}\nexport function assertObjectTypeSpreadProperty(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.ObjectTypeSpreadProperty {\n assert(\"ObjectTypeSpreadProperty\", node, opts);\n}\nexport function assertOpaqueType(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.OpaqueType {\n assert(\"OpaqueType\", node, opts);\n}\nexport function assertQualifiedTypeIdentifier(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.QualifiedTypeIdentifier {\n assert(\"QualifiedTypeIdentifier\", node, opts);\n}\nexport function assertStringLiteralTypeAnnotation(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.StringLiteralTypeAnnotation {\n assert(\"StringLiteralTypeAnnotation\", node, opts);\n}\nexport function assertStringTypeAnnotation(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.StringTypeAnnotation {\n assert(\"StringTypeAnnotation\", node, opts);\n}\nexport function assertSymbolTypeAnnotation(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.SymbolTypeAnnotation {\n assert(\"SymbolTypeAnnotation\", node, opts);\n}\nexport function assertThisTypeAnnotation(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.ThisTypeAnnotation {\n assert(\"ThisTypeAnnotation\", node, opts);\n}\nexport function assertTupleTypeAnnotation(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.TupleTypeAnnotation {\n assert(\"TupleTypeAnnotation\", node, opts);\n}\nexport function assertTypeofTypeAnnotation(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.TypeofTypeAnnotation {\n assert(\"TypeofTypeAnnotation\", node, opts);\n}\nexport function assertTypeAlias(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.TypeAlias {\n assert(\"TypeAlias\", node, opts);\n}\nexport function assertTypeAnnotation(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.TypeAnnotation {\n assert(\"TypeAnnotation\", node, opts);\n}\nexport function assertTypeCastExpression(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.TypeCastExpression {\n assert(\"TypeCastExpression\", node, opts);\n}\nexport function assertTypeParameter(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.TypeParameter {\n assert(\"TypeParameter\", node, opts);\n}\nexport function assertTypeParameterDeclaration(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.TypeParameterDeclaration {\n assert(\"TypeParameterDeclaration\", node, opts);\n}\nexport function assertTypeParameterInstantiation(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.TypeParameterInstantiation {\n assert(\"TypeParameterInstantiation\", node, opts);\n}\nexport function assertUnionTypeAnnotation(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.UnionTypeAnnotation {\n assert(\"UnionTypeAnnotation\", node, opts);\n}\nexport function assertVariance(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.Variance {\n assert(\"Variance\", node, opts);\n}\nexport function assertVoidTypeAnnotation(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.VoidTypeAnnotation {\n assert(\"VoidTypeAnnotation\", node, opts);\n}\nexport function assertEnumDeclaration(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.EnumDeclaration {\n assert(\"EnumDeclaration\", node, opts);\n}\nexport function assertEnumBooleanBody(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.EnumBooleanBody {\n assert(\"EnumBooleanBody\", node, opts);\n}\nexport function assertEnumNumberBody(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.EnumNumberBody {\n assert(\"EnumNumberBody\", node, opts);\n}\nexport function assertEnumStringBody(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.EnumStringBody {\n assert(\"EnumStringBody\", node, opts);\n}\nexport function assertEnumSymbolBody(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.EnumSymbolBody {\n assert(\"EnumSymbolBody\", node, opts);\n}\nexport function assertEnumBooleanMember(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.EnumBooleanMember {\n assert(\"EnumBooleanMember\", node, opts);\n}\nexport function assertEnumNumberMember(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.EnumNumberMember {\n assert(\"EnumNumberMember\", node, opts);\n}\nexport function assertEnumStringMember(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.EnumStringMember {\n assert(\"EnumStringMember\", node, opts);\n}\nexport function assertEnumDefaultedMember(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.EnumDefaultedMember {\n assert(\"EnumDefaultedMember\", node, opts);\n}\nexport function assertIndexedAccessType(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.IndexedAccessType {\n assert(\"IndexedAccessType\", node, opts);\n}\nexport function assertOptionalIndexedAccessType(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.OptionalIndexedAccessType {\n assert(\"OptionalIndexedAccessType\", node, opts);\n}\nexport function assertJSXAttribute(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.JSXAttribute {\n assert(\"JSXAttribute\", node, opts);\n}\nexport function assertJSXClosingElement(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.JSXClosingElement {\n assert(\"JSXClosingElement\", node, opts);\n}\nexport function assertJSXElement(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.JSXElement {\n assert(\"JSXElement\", node, opts);\n}\nexport function assertJSXEmptyExpression(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.JSXEmptyExpression {\n assert(\"JSXEmptyExpression\", node, opts);\n}\nexport function assertJSXExpressionContainer(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.JSXExpressionContainer {\n assert(\"JSXExpressionContainer\", node, opts);\n}\nexport function assertJSXSpreadChild(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.JSXSpreadChild {\n assert(\"JSXSpreadChild\", node, opts);\n}\nexport function assertJSXIdentifier(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.JSXIdentifier {\n assert(\"JSXIdentifier\", node, opts);\n}\nexport function assertJSXMemberExpression(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.JSXMemberExpression {\n assert(\"JSXMemberExpression\", node, opts);\n}\nexport function assertJSXNamespacedName(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.JSXNamespacedName {\n assert(\"JSXNamespacedName\", node, opts);\n}\nexport function assertJSXOpeningElement(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.JSXOpeningElement {\n assert(\"JSXOpeningElement\", node, opts);\n}\nexport function assertJSXSpreadAttribute(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.JSXSpreadAttribute {\n assert(\"JSXSpreadAttribute\", node, opts);\n}\nexport function assertJSXText(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.JSXText {\n assert(\"JSXText\", node, opts);\n}\nexport function assertJSXFragment(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.JSXFragment {\n assert(\"JSXFragment\", node, opts);\n}\nexport function assertJSXOpeningFragment(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.JSXOpeningFragment {\n assert(\"JSXOpeningFragment\", node, opts);\n}\nexport function assertJSXClosingFragment(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.JSXClosingFragment {\n assert(\"JSXClosingFragment\", node, opts);\n}\nexport function assertNoop(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.Noop {\n assert(\"Noop\", node, opts);\n}\nexport function assertPlaceholder(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.Placeholder {\n assert(\"Placeholder\", node, opts);\n}\nexport function assertV8IntrinsicIdentifier(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.V8IntrinsicIdentifier {\n assert(\"V8IntrinsicIdentifier\", node, opts);\n}\nexport function assertArgumentPlaceholder(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.ArgumentPlaceholder {\n assert(\"ArgumentPlaceholder\", node, opts);\n}\nexport function assertBindExpression(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.BindExpression {\n assert(\"BindExpression\", node, opts);\n}\nexport function assertImportAttribute(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.ImportAttribute {\n assert(\"ImportAttribute\", node, opts);\n}\nexport function assertDecorator(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.Decorator {\n assert(\"Decorator\", node, opts);\n}\nexport function assertDoExpression(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.DoExpression {\n assert(\"DoExpression\", node, opts);\n}\nexport function assertExportDefaultSpecifier(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.ExportDefaultSpecifier {\n assert(\"ExportDefaultSpecifier\", node, opts);\n}\nexport function assertRecordExpression(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.RecordExpression {\n assert(\"RecordExpression\", node, opts);\n}\nexport function assertTupleExpression(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.TupleExpression {\n assert(\"TupleExpression\", node, opts);\n}\nexport function assertDecimalLiteral(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.DecimalLiteral {\n assert(\"DecimalLiteral\", node, opts);\n}\nexport function assertModuleExpression(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.ModuleExpression {\n assert(\"ModuleExpression\", node, opts);\n}\nexport function assertTopicReference(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.TopicReference {\n assert(\"TopicReference\", node, opts);\n}\nexport function assertPipelineTopicExpression(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.PipelineTopicExpression {\n assert(\"PipelineTopicExpression\", node, opts);\n}\nexport function assertPipelineBareFunction(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.PipelineBareFunction {\n assert(\"PipelineBareFunction\", node, opts);\n}\nexport function assertPipelinePrimaryTopicReference(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.PipelinePrimaryTopicReference {\n assert(\"PipelinePrimaryTopicReference\", node, opts);\n}\nexport function assertTSParameterProperty(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.TSParameterProperty {\n assert(\"TSParameterProperty\", node, opts);\n}\nexport function assertTSDeclareFunction(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.TSDeclareFunction {\n assert(\"TSDeclareFunction\", node, opts);\n}\nexport function assertTSDeclareMethod(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.TSDeclareMethod {\n assert(\"TSDeclareMethod\", node, opts);\n}\nexport function assertTSQualifiedName(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.TSQualifiedName {\n assert(\"TSQualifiedName\", node, opts);\n}\nexport function assertTSCallSignatureDeclaration(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.TSCallSignatureDeclaration {\n assert(\"TSCallSignatureDeclaration\", node, opts);\n}\nexport function assertTSConstructSignatureDeclaration(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.TSConstructSignatureDeclaration {\n assert(\"TSConstructSignatureDeclaration\", node, opts);\n}\nexport function assertTSPropertySignature(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.TSPropertySignature {\n assert(\"TSPropertySignature\", node, opts);\n}\nexport function assertTSMethodSignature(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.TSMethodSignature {\n assert(\"TSMethodSignature\", node, opts);\n}\nexport function assertTSIndexSignature(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.TSIndexSignature {\n assert(\"TSIndexSignature\", node, opts);\n}\nexport function assertTSAnyKeyword(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.TSAnyKeyword {\n assert(\"TSAnyKeyword\", node, opts);\n}\nexport function assertTSBooleanKeyword(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.TSBooleanKeyword {\n assert(\"TSBooleanKeyword\", node, opts);\n}\nexport function assertTSBigIntKeyword(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.TSBigIntKeyword {\n assert(\"TSBigIntKeyword\", node, opts);\n}\nexport function assertTSIntrinsicKeyword(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.TSIntrinsicKeyword {\n assert(\"TSIntrinsicKeyword\", node, opts);\n}\nexport function assertTSNeverKeyword(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.TSNeverKeyword {\n assert(\"TSNeverKeyword\", node, opts);\n}\nexport function assertTSNullKeyword(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.TSNullKeyword {\n assert(\"TSNullKeyword\", node, opts);\n}\nexport function assertTSNumberKeyword(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.TSNumberKeyword {\n assert(\"TSNumberKeyword\", node, opts);\n}\nexport function assertTSObjectKeyword(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.TSObjectKeyword {\n assert(\"TSObjectKeyword\", node, opts);\n}\nexport function assertTSStringKeyword(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.TSStringKeyword {\n assert(\"TSStringKeyword\", node, opts);\n}\nexport function assertTSSymbolKeyword(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.TSSymbolKeyword {\n assert(\"TSSymbolKeyword\", node, opts);\n}\nexport function assertTSUndefinedKeyword(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.TSUndefinedKeyword {\n assert(\"TSUndefinedKeyword\", node, opts);\n}\nexport function assertTSUnknownKeyword(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.TSUnknownKeyword {\n assert(\"TSUnknownKeyword\", node, opts);\n}\nexport function assertTSVoidKeyword(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.TSVoidKeyword {\n assert(\"TSVoidKeyword\", node, opts);\n}\nexport function assertTSThisType(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.TSThisType {\n assert(\"TSThisType\", node, opts);\n}\nexport function assertTSFunctionType(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.TSFunctionType {\n assert(\"TSFunctionType\", node, opts);\n}\nexport function assertTSConstructorType(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.TSConstructorType {\n assert(\"TSConstructorType\", node, opts);\n}\nexport function assertTSTypeReference(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.TSTypeReference {\n assert(\"TSTypeReference\", node, opts);\n}\nexport function assertTSTypePredicate(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.TSTypePredicate {\n assert(\"TSTypePredicate\", node, opts);\n}\nexport function assertTSTypeQuery(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.TSTypeQuery {\n assert(\"TSTypeQuery\", node, opts);\n}\nexport function assertTSTypeLiteral(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.TSTypeLiteral {\n assert(\"TSTypeLiteral\", node, opts);\n}\nexport function assertTSArrayType(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.TSArrayType {\n assert(\"TSArrayType\", node, opts);\n}\nexport function assertTSTupleType(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.TSTupleType {\n assert(\"TSTupleType\", node, opts);\n}\nexport function assertTSOptionalType(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.TSOptionalType {\n assert(\"TSOptionalType\", node, opts);\n}\nexport function assertTSRestType(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.TSRestType {\n assert(\"TSRestType\", node, opts);\n}\nexport function assertTSNamedTupleMember(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.TSNamedTupleMember {\n assert(\"TSNamedTupleMember\", node, opts);\n}\nexport function assertTSUnionType(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.TSUnionType {\n assert(\"TSUnionType\", node, opts);\n}\nexport function assertTSIntersectionType(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.TSIntersectionType {\n assert(\"TSIntersectionType\", node, opts);\n}\nexport function assertTSConditionalType(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.TSConditionalType {\n assert(\"TSConditionalType\", node, opts);\n}\nexport function assertTSInferType(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.TSInferType {\n assert(\"TSInferType\", node, opts);\n}\nexport function assertTSParenthesizedType(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.TSParenthesizedType {\n assert(\"TSParenthesizedType\", node, opts);\n}\nexport function assertTSTypeOperator(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.TSTypeOperator {\n assert(\"TSTypeOperator\", node, opts);\n}\nexport function assertTSIndexedAccessType(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.TSIndexedAccessType {\n assert(\"TSIndexedAccessType\", node, opts);\n}\nexport function assertTSMappedType(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.TSMappedType {\n assert(\"TSMappedType\", node, opts);\n}\nexport function assertTSLiteralType(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.TSLiteralType {\n assert(\"TSLiteralType\", node, opts);\n}\nexport function assertTSExpressionWithTypeArguments(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.TSExpressionWithTypeArguments {\n assert(\"TSExpressionWithTypeArguments\", node, opts);\n}\nexport function assertTSInterfaceDeclaration(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.TSInterfaceDeclaration {\n assert(\"TSInterfaceDeclaration\", node, opts);\n}\nexport function assertTSInterfaceBody(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.TSInterfaceBody {\n assert(\"TSInterfaceBody\", node, opts);\n}\nexport function assertTSTypeAliasDeclaration(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.TSTypeAliasDeclaration {\n assert(\"TSTypeAliasDeclaration\", node, opts);\n}\nexport function assertTSInstantiationExpression(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.TSInstantiationExpression {\n assert(\"TSInstantiationExpression\", node, opts);\n}\nexport function assertTSAsExpression(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.TSAsExpression {\n assert(\"TSAsExpression\", node, opts);\n}\nexport function assertTSSatisfiesExpression(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.TSSatisfiesExpression {\n assert(\"TSSatisfiesExpression\", node, opts);\n}\nexport function assertTSTypeAssertion(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.TSTypeAssertion {\n assert(\"TSTypeAssertion\", node, opts);\n}\nexport function assertTSEnumDeclaration(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.TSEnumDeclaration {\n assert(\"TSEnumDeclaration\", node, opts);\n}\nexport function assertTSEnumMember(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.TSEnumMember {\n assert(\"TSEnumMember\", node, opts);\n}\nexport function assertTSModuleDeclaration(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.TSModuleDeclaration {\n assert(\"TSModuleDeclaration\", node, opts);\n}\nexport function assertTSModuleBlock(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.TSModuleBlock {\n assert(\"TSModuleBlock\", node, opts);\n}\nexport function assertTSImportType(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.TSImportType {\n assert(\"TSImportType\", node, opts);\n}\nexport function assertTSImportEqualsDeclaration(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.TSImportEqualsDeclaration {\n assert(\"TSImportEqualsDeclaration\", node, opts);\n}\nexport function assertTSExternalModuleReference(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.TSExternalModuleReference {\n assert(\"TSExternalModuleReference\", node, opts);\n}\nexport function assertTSNonNullExpression(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.TSNonNullExpression {\n assert(\"TSNonNullExpression\", node, opts);\n}\nexport function assertTSExportAssignment(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.TSExportAssignment {\n assert(\"TSExportAssignment\", node, opts);\n}\nexport function assertTSNamespaceExportDeclaration(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.TSNamespaceExportDeclaration {\n assert(\"TSNamespaceExportDeclaration\", node, opts);\n}\nexport function assertTSTypeAnnotation(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.TSTypeAnnotation {\n assert(\"TSTypeAnnotation\", node, opts);\n}\nexport function assertTSTypeParameterInstantiation(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.TSTypeParameterInstantiation {\n assert(\"TSTypeParameterInstantiation\", node, opts);\n}\nexport function assertTSTypeParameterDeclaration(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.TSTypeParameterDeclaration {\n assert(\"TSTypeParameterDeclaration\", node, opts);\n}\nexport function assertTSTypeParameter(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.TSTypeParameter {\n assert(\"TSTypeParameter\", node, opts);\n}\nexport function assertStandardized(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.Standardized {\n assert(\"Standardized\", node, opts);\n}\nexport function assertExpression(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.Expression {\n assert(\"Expression\", node, opts);\n}\nexport function assertBinary(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.Binary {\n assert(\"Binary\", node, opts);\n}\nexport function assertScopable(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.Scopable {\n assert(\"Scopable\", node, opts);\n}\nexport function assertBlockParent(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.BlockParent {\n assert(\"BlockParent\", node, opts);\n}\nexport function assertBlock(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.Block {\n assert(\"Block\", node, opts);\n}\nexport function assertStatement(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.Statement {\n assert(\"Statement\", node, opts);\n}\nexport function assertTerminatorless(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.Terminatorless {\n assert(\"Terminatorless\", node, opts);\n}\nexport function assertCompletionStatement(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.CompletionStatement {\n assert(\"CompletionStatement\", node, opts);\n}\nexport function assertConditional(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.Conditional {\n assert(\"Conditional\", node, opts);\n}\nexport function assertLoop(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.Loop {\n assert(\"Loop\", node, opts);\n}\nexport function assertWhile(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.While {\n assert(\"While\", node, opts);\n}\nexport function assertExpressionWrapper(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.ExpressionWrapper {\n assert(\"ExpressionWrapper\", node, opts);\n}\nexport function assertFor(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.For {\n assert(\"For\", node, opts);\n}\nexport function assertForXStatement(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.ForXStatement {\n assert(\"ForXStatement\", node, opts);\n}\nexport function assertFunction(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.Function {\n assert(\"Function\", node, opts);\n}\nexport function assertFunctionParent(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.FunctionParent {\n assert(\"FunctionParent\", node, opts);\n}\nexport function assertPureish(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.Pureish {\n assert(\"Pureish\", node, opts);\n}\nexport function assertDeclaration(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.Declaration {\n assert(\"Declaration\", node, opts);\n}\nexport function assertPatternLike(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.PatternLike {\n assert(\"PatternLike\", node, opts);\n}\nexport function assertLVal(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.LVal {\n assert(\"LVal\", node, opts);\n}\nexport function assertTSEntityName(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.TSEntityName {\n assert(\"TSEntityName\", node, opts);\n}\nexport function assertLiteral(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.Literal {\n assert(\"Literal\", node, opts);\n}\nexport function assertImmutable(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.Immutable {\n assert(\"Immutable\", node, opts);\n}\nexport function assertUserWhitespacable(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.UserWhitespacable {\n assert(\"UserWhitespacable\", node, opts);\n}\nexport function assertMethod(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.Method {\n assert(\"Method\", node, opts);\n}\nexport function assertObjectMember(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.ObjectMember {\n assert(\"ObjectMember\", node, opts);\n}\nexport function assertProperty(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.Property {\n assert(\"Property\", node, opts);\n}\nexport function assertUnaryLike(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.UnaryLike {\n assert(\"UnaryLike\", node, opts);\n}\nexport function assertPattern(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.Pattern {\n assert(\"Pattern\", node, opts);\n}\nexport function assertClass(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.Class {\n assert(\"Class\", node, opts);\n}\nexport function assertImportOrExportDeclaration(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.ImportOrExportDeclaration {\n assert(\"ImportOrExportDeclaration\", node, opts);\n}\nexport function assertExportDeclaration(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.ExportDeclaration {\n assert(\"ExportDeclaration\", node, opts);\n}\nexport function assertModuleSpecifier(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.ModuleSpecifier {\n assert(\"ModuleSpecifier\", node, opts);\n}\nexport function assertAccessor(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.Accessor {\n assert(\"Accessor\", node, opts);\n}\nexport function assertPrivate(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.Private {\n assert(\"Private\", node, opts);\n}\nexport function assertFlow(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.Flow {\n assert(\"Flow\", node, opts);\n}\nexport function assertFlowType(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.FlowType {\n assert(\"FlowType\", node, opts);\n}\nexport function assertFlowBaseAnnotation(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.FlowBaseAnnotation {\n assert(\"FlowBaseAnnotation\", node, opts);\n}\nexport function assertFlowDeclaration(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.FlowDeclaration {\n assert(\"FlowDeclaration\", node, opts);\n}\nexport function assertFlowPredicate(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.FlowPredicate {\n assert(\"FlowPredicate\", node, opts);\n}\nexport function assertEnumBody(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.EnumBody {\n assert(\"EnumBody\", node, opts);\n}\nexport function assertEnumMember(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.EnumMember {\n assert(\"EnumMember\", node, opts);\n}\nexport function assertJSX(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.JSX {\n assert(\"JSX\", node, opts);\n}\nexport function assertMiscellaneous(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.Miscellaneous {\n assert(\"Miscellaneous\", node, opts);\n}\nexport function assertTypeScript(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.TypeScript {\n assert(\"TypeScript\", node, opts);\n}\nexport function assertTSTypeElement(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.TSTypeElement {\n assert(\"TSTypeElement\", node, opts);\n}\nexport function assertTSType(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.TSType {\n assert(\"TSType\", node, opts);\n}\nexport function assertTSBaseType(\n node: object | null | undefined,\n opts?: object | null,\n): asserts node is t.TSBaseType {\n assert(\"TSBaseType\", node, opts);\n}\nexport function assertNumberLiteral(node: any, opts: any): void {\n deprecationWarning(\"assertNumberLiteral\", \"assertNumericLiteral\");\n assert(\"NumberLiteral\", node, opts);\n}\nexport function assertRegexLiteral(node: any, opts: any): void {\n deprecationWarning(\"assertRegexLiteral\", \"assertRegExpLiteral\");\n assert(\"RegexLiteral\", node, opts);\n}\nexport function assertRestProperty(node: any, opts: any): void {\n deprecationWarning(\"assertRestProperty\", \"assertRestElement\");\n assert(\"RestProperty\", node, opts);\n}\nexport function assertSpreadProperty(node: any, opts: any): void {\n deprecationWarning(\"assertSpreadProperty\", \"assertSpreadElement\");\n assert(\"SpreadProperty\", node, opts);\n}\nexport function assertModuleDeclaration(node: any, opts: any): void {\n deprecationWarning(\n \"assertModuleDeclaration\",\n \"assertImportOrExportDeclaration\",\n );\n assert(\"ModuleDeclaration\", node, opts);\n}\n","import {\n anyTypeAnnotation,\n stringTypeAnnotation,\n numberTypeAnnotation,\n voidTypeAnnotation,\n booleanTypeAnnotation,\n genericTypeAnnotation,\n identifier,\n} from \"../generated/index.ts\";\nimport type * as t from \"../../index.ts\";\n\nexport default createTypeAnnotationBasedOnTypeof as {\n (type: \"string\"): t.StringTypeAnnotation;\n (type: \"number\"): t.NumberTypeAnnotation;\n (type: \"undefined\"): t.VoidTypeAnnotation;\n (type: \"boolean\"): t.BooleanTypeAnnotation;\n (type: \"function\"): t.GenericTypeAnnotation;\n (type: \"object\"): t.GenericTypeAnnotation;\n (type: \"symbol\"): t.GenericTypeAnnotation;\n (type: \"bigint\"): t.AnyTypeAnnotation;\n};\n\n/**\n * Create a type annotation based on typeof expression.\n */\nfunction createTypeAnnotationBasedOnTypeof(type: string): t.FlowType {\n switch (type) {\n case \"string\":\n return stringTypeAnnotation();\n case \"number\":\n return numberTypeAnnotation();\n case \"undefined\":\n return voidTypeAnnotation();\n case \"boolean\":\n return booleanTypeAnnotation();\n case \"function\":\n return genericTypeAnnotation(identifier(\"Function\"));\n case \"object\":\n return genericTypeAnnotation(identifier(\"Object\"));\n case \"symbol\":\n return genericTypeAnnotation(identifier(\"Symbol\"));\n case \"bigint\":\n // todo: use BigInt annotation when Flow supports BigInt\n // https://github.com/facebook/flow/issues/6639\n return anyTypeAnnotation();\n }\n throw new Error(\"Invalid typeof value: \" + type);\n}\n","import {\n isAnyTypeAnnotation,\n isGenericTypeAnnotation,\n isUnionTypeAnnotation,\n isFlowBaseAnnotation,\n isIdentifier,\n} from \"../../validators/generated/index.ts\";\nimport type * as t from \"../../index.ts\";\n\nfunction getQualifiedName(node: t.GenericTypeAnnotation[\"id\"]): string {\n return isIdentifier(node)\n ? node.name\n : `${node.id.name}.${getQualifiedName(node.qualification)}`;\n}\n\n/**\n * Dedupe type annotations.\n */\nexport default function removeTypeDuplicates(\n nodesIn: ReadonlyArray,\n): t.FlowType[] {\n const nodes = Array.from(nodesIn);\n\n const generics = new Map();\n const bases = new Map();\n\n // store union type groups to circular references\n const typeGroups = new Set();\n\n const types: t.FlowType[] = [];\n\n for (let i = 0; i < nodes.length; i++) {\n const node = nodes[i];\n if (!node) continue;\n\n // detect duplicates\n if (types.includes(node)) {\n continue;\n }\n\n // this type matches anything\n if (isAnyTypeAnnotation(node)) {\n return [node];\n }\n\n if (isFlowBaseAnnotation(node)) {\n bases.set(node.type, node);\n continue;\n }\n\n if (isUnionTypeAnnotation(node)) {\n if (!typeGroups.has(node.types)) {\n nodes.push(...node.types);\n typeGroups.add(node.types);\n }\n continue;\n }\n\n // find a matching generic type and merge and deduplicate the type parameters\n if (isGenericTypeAnnotation(node)) {\n const name = getQualifiedName(node.id);\n\n if (generics.has(name)) {\n let existing: t.Flow = generics.get(name);\n if (existing.typeParameters) {\n if (node.typeParameters) {\n existing.typeParameters.params.push(...node.typeParameters.params);\n existing.typeParameters.params = removeTypeDuplicates(\n existing.typeParameters.params,\n );\n }\n } else {\n existing = node.typeParameters;\n }\n } else {\n generics.set(name, node);\n }\n\n continue;\n }\n\n types.push(node);\n }\n\n // add back in bases\n for (const [, baseType] of bases) {\n types.push(baseType);\n }\n\n // add back in generics\n for (const [, genericName] of generics) {\n types.push(genericName);\n }\n\n return types;\n}\n","import { unionTypeAnnotation } from \"../generated/index.ts\";\nimport removeTypeDuplicates from \"../../modifications/flow/removeTypeDuplicates.ts\";\nimport type * as t from \"../../index.ts\";\n\n/**\n * Takes an array of `types` and flattens them, removing duplicates and\n * returns a `UnionTypeAnnotation` node containing them.\n */\nexport default function createFlowUnionType(\n types: [T] | Array,\n): T | t.UnionTypeAnnotation {\n const flattened = removeTypeDuplicates(types);\n\n if (flattened.length === 1) {\n return flattened[0] as T;\n } else {\n return unionTypeAnnotation(flattened);\n }\n}\n","import {\n isIdentifier,\n isTSAnyKeyword,\n isTSTypeReference,\n isTSUnionType,\n isTSBaseType,\n} from \"../../validators/generated/index.ts\";\nimport type * as t from \"../../index.ts\";\n\nfunction getQualifiedName(node: t.TSTypeReference[\"typeName\"]): string {\n return isIdentifier(node)\n ? node.name\n : `${node.right.name}.${getQualifiedName(node.left)}`;\n}\n\n/**\n * Dedupe type annotations.\n */\nexport default function removeTypeDuplicates(\n nodesIn: ReadonlyArray,\n): Array {\n const nodes = Array.from(nodesIn);\n\n const generics = new Map();\n const bases = new Map();\n\n // store union type groups to circular references\n const typeGroups = new Set();\n\n const types: t.TSType[] = [];\n\n for (let i = 0; i < nodes.length; i++) {\n const node = nodes[i];\n if (!node) continue;\n\n // detect duplicates\n if (types.includes(node)) {\n continue;\n }\n\n // this type matches anything\n if (isTSAnyKeyword(node)) {\n return [node];\n }\n\n // Analogue of FlowBaseAnnotation\n if (isTSBaseType(node)) {\n bases.set(node.type, node);\n continue;\n }\n\n if (isTSUnionType(node)) {\n if (!typeGroups.has(node.types)) {\n nodes.push(...node.types);\n typeGroups.add(node.types);\n }\n continue;\n }\n\n // todo: support merging tuples: number[]\n if (isTSTypeReference(node) && node.typeParameters) {\n const name = getQualifiedName(node.typeName);\n\n if (generics.has(name)) {\n let existing: t.TypeScript = generics.get(name);\n if (existing.typeParameters) {\n if (node.typeParameters) {\n existing.typeParameters.params.push(...node.typeParameters.params);\n existing.typeParameters.params = removeTypeDuplicates(\n existing.typeParameters.params,\n );\n }\n } else {\n existing = node.typeParameters;\n }\n } else {\n generics.set(name, node);\n }\n\n continue;\n }\n\n types.push(node);\n }\n\n // add back in bases\n for (const [, baseType] of bases) {\n types.push(baseType);\n }\n\n // add back in generics\n for (const [, genericName] of generics) {\n types.push(genericName);\n }\n\n return types;\n}\n","import { tsUnionType } from \"../generated/index.ts\";\nimport removeTypeDuplicates from \"../../modifications/typescript/removeTypeDuplicates.ts\";\nimport { isTSTypeAnnotation } from \"../../validators/generated/index.ts\";\nimport type * as t from \"../../index.ts\";\n\n/**\n * Takes an array of `types` and flattens them, removing duplicates and\n * returns a `UnionTypeAnnotation` node containing them.\n */\nexport default function createTSUnionType(\n typeAnnotations: Array,\n): t.TSType {\n const types = typeAnnotations.map(type => {\n return isTSTypeAnnotation(type) ? type.typeAnnotation : type;\n });\n const flattened = removeTypeDuplicates(types);\n\n if (flattened.length === 1) {\n return flattened[0];\n } else {\n return tsUnionType(flattened);\n }\n}\n","import { numericLiteral, unaryExpression } from \"./generated/index.ts\";\n\nexport function buildUndefinedNode() {\n return unaryExpression(\"void\", numericLiteral(0), true);\n}\n","import { NODE_FIELDS } from \"../definitions/index.ts\";\nimport type * as t from \"../index.ts\";\nimport { isFile, isIdentifier } from \"../validators/generated/index.ts\";\n\nconst { hasOwn } = process.env.BABEL_8_BREAKING\n ? Object\n : { hasOwn: Function.call.bind(Object.prototype.hasOwnProperty) };\n\ntype CommentCache = Map;\n\n// This function will never be called for comments, only for real nodes.\nfunction cloneIfNode(\n obj: t.Node | undefined | null,\n deep: boolean,\n withoutLoc: boolean,\n commentsCache: CommentCache,\n) {\n if (obj && typeof obj.type === \"string\") {\n return cloneNodeInternal(obj, deep, withoutLoc, commentsCache);\n }\n\n return obj;\n}\n\nfunction cloneIfNodeOrArray(\n obj: t.Node | undefined | null | (t.Node | undefined | null)[],\n deep: boolean,\n withoutLoc: boolean,\n commentsCache: CommentCache,\n) {\n if (Array.isArray(obj)) {\n return obj.map(node => cloneIfNode(node, deep, withoutLoc, commentsCache));\n }\n return cloneIfNode(obj, deep, withoutLoc, commentsCache);\n}\n\n/**\n * Create a clone of a `node` including only properties belonging to the node.\n * If the second parameter is `false`, cloneNode performs a shallow clone.\n * If the third parameter is true, the cloned nodes exclude location properties.\n */\nexport default function cloneNode(\n node: T,\n deep: boolean = true,\n withoutLoc: boolean = false,\n): T {\n return cloneNodeInternal(node, deep, withoutLoc, new Map());\n}\n\nfunction cloneNodeInternal(\n node: T,\n deep: boolean = true,\n withoutLoc: boolean = false,\n commentsCache: CommentCache,\n): T {\n if (!node) return node;\n\n const { type } = node;\n const newNode: any = { type: node.type };\n\n // Special-case identifiers since they are the most cloned nodes.\n if (isIdentifier(node)) {\n newNode.name = node.name;\n\n if (hasOwn(node, \"optional\") && typeof node.optional === \"boolean\") {\n newNode.optional = node.optional;\n }\n\n if (hasOwn(node, \"typeAnnotation\")) {\n newNode.typeAnnotation = deep\n ? cloneIfNodeOrArray(\n node.typeAnnotation,\n true,\n withoutLoc,\n commentsCache,\n )\n : node.typeAnnotation;\n }\n\n if (hasOwn(node, \"decorators\")) {\n newNode.decorators = deep\n ? cloneIfNodeOrArray(node.decorators, true, withoutLoc, commentsCache)\n : node.decorators;\n }\n } else if (!hasOwn(NODE_FIELDS, type)) {\n throw new Error(`Unknown node type: \"${type}\"`);\n } else {\n for (const field of Object.keys(NODE_FIELDS[type])) {\n if (hasOwn(node, field)) {\n if (deep) {\n newNode[field] =\n isFile(node) && field === \"comments\"\n ? maybeCloneComments(\n node.comments,\n deep,\n withoutLoc,\n commentsCache,\n )\n : cloneIfNodeOrArray(\n // @ts-expect-error node[field] has been guarded by has check\n node[field],\n true,\n withoutLoc,\n commentsCache,\n );\n } else {\n newNode[field] =\n // @ts-expect-error node[field] has been guarded by has check\n node[field];\n }\n }\n }\n }\n\n if (hasOwn(node, \"loc\")) {\n if (withoutLoc) {\n newNode.loc = null;\n } else {\n newNode.loc = node.loc;\n }\n }\n if (hasOwn(node, \"leadingComments\")) {\n newNode.leadingComments = maybeCloneComments(\n node.leadingComments,\n deep,\n withoutLoc,\n commentsCache,\n );\n }\n if (hasOwn(node, \"innerComments\")) {\n newNode.innerComments = maybeCloneComments(\n node.innerComments,\n deep,\n withoutLoc,\n commentsCache,\n );\n }\n if (hasOwn(node, \"trailingComments\")) {\n newNode.trailingComments = maybeCloneComments(\n node.trailingComments,\n deep,\n withoutLoc,\n commentsCache,\n );\n }\n if (hasOwn(node, \"extra\")) {\n newNode.extra = {\n ...node.extra,\n };\n }\n\n return newNode;\n}\n\nfunction maybeCloneComments(\n comments: ReadonlyArray | null,\n deep: boolean,\n withoutLoc: boolean,\n commentsCache: Map,\n): ReadonlyArray | null {\n if (!comments || !deep) {\n return comments;\n }\n return comments.map(comment => {\n const cache = commentsCache.get(comment);\n if (cache) return cache;\n\n const { type, value, loc } = comment;\n\n const ret = { type, value, loc } as T;\n if (withoutLoc) {\n ret.loc = null;\n }\n\n commentsCache.set(comment, ret);\n\n return ret;\n });\n}\n","import cloneNode from \"./cloneNode.ts\";\nimport type * as t from \"../index.ts\";\n\n/**\n * Create a shallow clone of a `node`, including only\n * properties belonging to the node.\n * @deprecated Use t.cloneNode instead.\n */\nexport default function clone(node: T): T {\n return cloneNode(node, /* deep */ false);\n}\n","import cloneNode from \"./cloneNode.ts\";\nimport type * as t from \"../index.ts\";\n\n/**\n * Create a deep clone of a `node` and all of it's child nodes\n * including only properties belonging to the node.\n * @deprecated Use t.cloneNode instead.\n */\nexport default function cloneDeep(node: T): T {\n return cloneNode(node);\n}\n","import cloneNode from \"./cloneNode.ts\";\nimport type * as t from \"../index.ts\";\n/**\n * Create a deep clone of a `node` and all of it's child nodes\n * including only properties belonging to the node.\n * excluding `_private` and location properties.\n */\nexport default function cloneDeepWithoutLoc(node: T): T {\n return cloneNode(node, /* deep */ true, /* withoutLoc */ true);\n}\n","import cloneNode from \"./cloneNode.ts\";\nimport type * as t from \"../index.ts\";\n\n/**\n * Create a shallow clone of a `node` excluding `_private` and location properties.\n */\nexport default function cloneWithoutLoc(node: T): T {\n return cloneNode(node, /* deep */ false, /* withoutLoc */ true);\n}\n","import type * as t from \"../index.ts\";\n\n/**\n * Add comments of certain type to a node.\n */\nexport default function addComments(\n node: T,\n type: t.CommentTypeShorthand,\n comments: Array,\n): T {\n if (!comments || !node) return node;\n\n const key = `${type}Comments` as const;\n\n if (node[key]) {\n if (type === \"leading\") {\n node[key] = comments.concat(node[key]);\n } else {\n node[key].push(...comments);\n }\n } else {\n node[key] = comments;\n }\n\n return node;\n}\n","import addComments from \"./addComments.ts\";\nimport type * as t from \"../index.ts\";\n\n/**\n * Add comment of certain type to a node.\n */\nexport default function addComment(\n node: T,\n type: t.CommentTypeShorthand,\n content: string,\n line?: boolean,\n): T {\n return addComments(node, type, [\n {\n type: line ? \"CommentLine\" : \"CommentBlock\",\n value: content,\n } as t.Comment,\n ]);\n}\n","import type * as t from \"../index.ts\";\n\nexport default function inherit<\n C extends t.Node | undefined,\n P extends t.Node | undefined,\n>(key: keyof C & keyof P, child: C, parent: P): void {\n if (child && parent) {\n // @ts-expect-error Could further refine key definitions\n child[key] = Array.from(\n new Set([].concat(child[key], parent[key]).filter(Boolean)),\n );\n }\n}\n","import inherit from \"../utils/inherit.ts\";\nimport type * as t from \"../index.ts\";\n\nexport default function inheritInnerComments(\n child: t.Node,\n parent: t.Node,\n): void {\n inherit(\"innerComments\", child, parent);\n}\n","import inherit from \"../utils/inherit.ts\";\nimport type * as t from \"../index.ts\";\n\nexport default function inheritLeadingComments(\n child: t.Node,\n parent: t.Node,\n): void {\n inherit(\"leadingComments\", child, parent);\n}\n","import inherit from \"../utils/inherit.ts\";\nimport type * as t from \"../index.ts\";\n\nexport default function inheritTrailingComments(\n child: t.Node,\n parent: t.Node,\n): void {\n inherit(\"trailingComments\", child, parent);\n}\n","import inheritTrailingComments from \"./inheritTrailingComments.ts\";\nimport inheritLeadingComments from \"./inheritLeadingComments.ts\";\nimport inheritInnerComments from \"./inheritInnerComments.ts\";\nimport type * as t from \"../index.ts\";\n\n/**\n * Inherit all unique comments from `parent` node to `child` node.\n */\nexport default function inheritsComments(\n child: T,\n parent: t.Node,\n): T {\n inheritTrailingComments(child, parent);\n inheritLeadingComments(child, parent);\n inheritInnerComments(child, parent);\n\n return child;\n}\n","import { COMMENT_KEYS } from \"../constants/index.ts\";\nimport type * as t from \"../index.ts\";\n\n/**\n * Remove comment properties from a node.\n */\nexport default function removeComments(node: T): T {\n COMMENT_KEYS.forEach(key => {\n node[key] = null;\n });\n\n return node;\n}\n","/*\n * This file is auto-generated! Do not modify it directly.\n * To re-generate run 'make build'\n */\nimport { FLIPPED_ALIAS_KEYS } from \"../../definitions/index.ts\";\n\nexport const STANDARDIZED_TYPES = FLIPPED_ALIAS_KEYS[\"Standardized\"];\nexport const EXPRESSION_TYPES = FLIPPED_ALIAS_KEYS[\"Expression\"];\nexport const BINARY_TYPES = FLIPPED_ALIAS_KEYS[\"Binary\"];\nexport const SCOPABLE_TYPES = FLIPPED_ALIAS_KEYS[\"Scopable\"];\nexport const BLOCKPARENT_TYPES = FLIPPED_ALIAS_KEYS[\"BlockParent\"];\nexport const BLOCK_TYPES = FLIPPED_ALIAS_KEYS[\"Block\"];\nexport const STATEMENT_TYPES = FLIPPED_ALIAS_KEYS[\"Statement\"];\nexport const TERMINATORLESS_TYPES = FLIPPED_ALIAS_KEYS[\"Terminatorless\"];\nexport const COMPLETIONSTATEMENT_TYPES =\n FLIPPED_ALIAS_KEYS[\"CompletionStatement\"];\nexport const CONDITIONAL_TYPES = FLIPPED_ALIAS_KEYS[\"Conditional\"];\nexport const LOOP_TYPES = FLIPPED_ALIAS_KEYS[\"Loop\"];\nexport const WHILE_TYPES = FLIPPED_ALIAS_KEYS[\"While\"];\nexport const EXPRESSIONWRAPPER_TYPES = FLIPPED_ALIAS_KEYS[\"ExpressionWrapper\"];\nexport const FOR_TYPES = FLIPPED_ALIAS_KEYS[\"For\"];\nexport const FORXSTATEMENT_TYPES = FLIPPED_ALIAS_KEYS[\"ForXStatement\"];\nexport const FUNCTION_TYPES = FLIPPED_ALIAS_KEYS[\"Function\"];\nexport const FUNCTIONPARENT_TYPES = FLIPPED_ALIAS_KEYS[\"FunctionParent\"];\nexport const PUREISH_TYPES = FLIPPED_ALIAS_KEYS[\"Pureish\"];\nexport const DECLARATION_TYPES = FLIPPED_ALIAS_KEYS[\"Declaration\"];\nexport const PATTERNLIKE_TYPES = FLIPPED_ALIAS_KEYS[\"PatternLike\"];\nexport const LVAL_TYPES = FLIPPED_ALIAS_KEYS[\"LVal\"];\nexport const TSENTITYNAME_TYPES = FLIPPED_ALIAS_KEYS[\"TSEntityName\"];\nexport const LITERAL_TYPES = FLIPPED_ALIAS_KEYS[\"Literal\"];\nexport const IMMUTABLE_TYPES = FLIPPED_ALIAS_KEYS[\"Immutable\"];\nexport const USERWHITESPACABLE_TYPES = FLIPPED_ALIAS_KEYS[\"UserWhitespacable\"];\nexport const METHOD_TYPES = FLIPPED_ALIAS_KEYS[\"Method\"];\nexport const OBJECTMEMBER_TYPES = FLIPPED_ALIAS_KEYS[\"ObjectMember\"];\nexport const PROPERTY_TYPES = FLIPPED_ALIAS_KEYS[\"Property\"];\nexport const UNARYLIKE_TYPES = FLIPPED_ALIAS_KEYS[\"UnaryLike\"];\nexport const PATTERN_TYPES = FLIPPED_ALIAS_KEYS[\"Pattern\"];\nexport const CLASS_TYPES = FLIPPED_ALIAS_KEYS[\"Class\"];\nexport const IMPORTOREXPORTDECLARATION_TYPES =\n FLIPPED_ALIAS_KEYS[\"ImportOrExportDeclaration\"];\nexport const EXPORTDECLARATION_TYPES = FLIPPED_ALIAS_KEYS[\"ExportDeclaration\"];\nexport const MODULESPECIFIER_TYPES = FLIPPED_ALIAS_KEYS[\"ModuleSpecifier\"];\nexport const ACCESSOR_TYPES = FLIPPED_ALIAS_KEYS[\"Accessor\"];\nexport const PRIVATE_TYPES = FLIPPED_ALIAS_KEYS[\"Private\"];\nexport const FLOW_TYPES = FLIPPED_ALIAS_KEYS[\"Flow\"];\nexport const FLOWTYPE_TYPES = FLIPPED_ALIAS_KEYS[\"FlowType\"];\nexport const FLOWBASEANNOTATION_TYPES =\n FLIPPED_ALIAS_KEYS[\"FlowBaseAnnotation\"];\nexport const FLOWDECLARATION_TYPES = FLIPPED_ALIAS_KEYS[\"FlowDeclaration\"];\nexport const FLOWPREDICATE_TYPES = FLIPPED_ALIAS_KEYS[\"FlowPredicate\"];\nexport const ENUMBODY_TYPES = FLIPPED_ALIAS_KEYS[\"EnumBody\"];\nexport const ENUMMEMBER_TYPES = FLIPPED_ALIAS_KEYS[\"EnumMember\"];\nexport const JSX_TYPES = FLIPPED_ALIAS_KEYS[\"JSX\"];\nexport const MISCELLANEOUS_TYPES = FLIPPED_ALIAS_KEYS[\"Miscellaneous\"];\nexport const TYPESCRIPT_TYPES = FLIPPED_ALIAS_KEYS[\"TypeScript\"];\nexport const TSTYPEELEMENT_TYPES = FLIPPED_ALIAS_KEYS[\"TSTypeElement\"];\nexport const TSTYPE_TYPES = FLIPPED_ALIAS_KEYS[\"TSType\"];\nexport const TSBASETYPE_TYPES = FLIPPED_ALIAS_KEYS[\"TSBaseType\"];\n/**\n * @deprecated migrate to IMPORTOREXPORTDECLARATION_TYPES.\n */\nexport const MODULEDECLARATION_TYPES = IMPORTOREXPORTDECLARATION_TYPES;\n","import {\n isBlockStatement,\n isFunction,\n isEmptyStatement,\n isStatement,\n} from \"../validators/generated/index.ts\";\nimport {\n returnStatement,\n expressionStatement,\n blockStatement,\n} from \"../builders/generated/index.ts\";\nimport type * as t from \"../index.ts\";\n\nexport default function toBlock(\n node: t.Statement | t.Expression,\n parent?: t.Node,\n): t.BlockStatement {\n if (isBlockStatement(node)) {\n return node;\n }\n\n let blockNodes: t.Statement[] = [];\n\n if (isEmptyStatement(node)) {\n blockNodes = [];\n } else {\n if (!isStatement(node)) {\n if (isFunction(parent)) {\n node = returnStatement(node);\n } else {\n node = expressionStatement(node);\n }\n }\n\n blockNodes = [node];\n }\n\n return blockStatement(blockNodes);\n}\n","import toBlock from \"./toBlock.ts\";\nimport type * as t from \"../index.ts\";\n\n/**\n * Ensure the `key` (defaults to \"body\") of a `node` is a block.\n * Casting it to a block if it is not.\n *\n * Returns the BlockStatement\n */\nexport default function ensureBlock(\n node: t.Node,\n key: string = \"body\",\n): t.BlockStatement {\n // @ts-expect-error Fixme: key may not exist in node, consider remove key = \"body\"\n const result = toBlock(node[key], node);\n // @ts-expect-error Fixme: key may not exist in node, consider remove key = \"body\"\n node[key] = result;\n return result;\n}\n","import isValidIdentifier from \"../validators/isValidIdentifier.ts\";\nimport { isIdentifierChar } from \"@babel/helper-validator-identifier\";\n\nexport default function toIdentifier(input: string): string {\n input = input + \"\";\n\n // replace all non-valid identifiers with dashes\n let name = \"\";\n for (const c of input) {\n name += isIdentifierChar(c.codePointAt(0)) ? c : \"-\";\n }\n\n // remove all dashes and numbers from start of name\n name = name.replace(/^[-0-9]+/, \"\");\n\n // camel case\n name = name.replace(/[-\\s]+(.)?/g, function (match, c) {\n return c ? c.toUpperCase() : \"\";\n });\n\n if (!isValidIdentifier(name)) {\n name = `_${name}`;\n }\n\n return name || \"_\";\n}\n","import toIdentifier from \"./toIdentifier.ts\";\n\nexport default function toBindingIdentifierName(name: string): string {\n name = toIdentifier(name);\n if (name === \"eval\" || name === \"arguments\") name = \"_\" + name;\n\n return name;\n}\n","import { isIdentifier } from \"../validators/generated/index.ts\";\nimport { stringLiteral } from \"../builders/generated/index.ts\";\nimport type * as t from \"../index.ts\";\n\nexport default function toComputedKey(\n node:\n | t.ObjectMember\n | t.ObjectProperty\n | t.ClassMethod\n | t.ClassProperty\n | t.ClassAccessorProperty\n | t.MemberExpression\n | t.OptionalMemberExpression,\n // @ts-expect-error todo(flow->ts): maybe check the type of node before accessing .key and .property\n key: t.Expression | t.PrivateName = node.key || node.property,\n) {\n if (!node.computed && isIdentifier(key)) key = stringLiteral(key.name);\n\n return key;\n}\n","import {\n isExpression,\n isFunction,\n isClass,\n isExpressionStatement,\n} from \"../validators/generated/index.ts\";\nimport type * as t from \"../index.ts\";\n\nexport default toExpression as {\n (node: t.Function): t.FunctionExpression;\n (node: t.Class): t.ClassExpression;\n (\n node: t.ExpressionStatement | t.Expression | t.Class | t.Function,\n ): t.Expression;\n};\n\nfunction toExpression(\n node: t.ExpressionStatement | t.Expression | t.Class | t.Function,\n): t.Expression {\n if (isExpressionStatement(node)) {\n node = node.expression;\n }\n\n // return unmodified node\n // important for things like ArrowFunctions where\n // type change from ArrowFunction to FunctionExpression\n // produces bugs like -> `()=>a` to `function () a`\n // without generating a BlockStatement for it\n // ref: https://github.com/babel/babili/issues/130\n if (isExpression(node)) {\n return node;\n }\n\n // convert all classes and functions\n // ClassDeclaration -> ClassExpression\n // FunctionDeclaration, ObjectMethod, ClassMethod -> FunctionExpression\n if (isClass(node)) {\n // @ts-expect-error todo(flow->ts): avoid type unsafe mutations\n node.type = \"ClassExpression\";\n } else if (isFunction(node)) {\n // @ts-expect-error todo(flow->ts): avoid type unsafe mutations\n node.type = \"FunctionExpression\";\n }\n\n // if it's still not an expression\n if (!isExpression(node)) {\n throw new Error(`cannot turn ${node.type} to an expression`);\n }\n\n return node;\n}\n","import { VISITOR_KEYS } from \"../definitions/index.ts\";\nimport type * as t from \"../index.ts\";\n\n/**\n * A prefix AST traversal implementation meant for simple searching\n * and processing.\n */\nexport default function traverseFast(\n node: t.Node | null | undefined,\n enter: (node: t.Node, opts?: Options) => void,\n opts?: Options,\n): void {\n if (!node) return;\n\n const keys = VISITOR_KEYS[node.type];\n if (!keys) return;\n\n opts = opts || ({} as Options);\n enter(node, opts);\n\n for (const key of keys) {\n const subNode: t.Node | undefined | null =\n // @ts-expect-error key must present in node\n node[key];\n\n if (Array.isArray(subNode)) {\n for (const node of subNode) {\n traverseFast(node, enter, opts);\n }\n } else {\n traverseFast(subNode, enter, opts);\n }\n }\n}\n","import { COMMENT_KEYS } from \"../constants/index.ts\";\nimport type * as t from \"../index.ts\";\n\nconst CLEAR_KEYS = [\n \"tokens\", // only exist in t.File\n \"start\",\n \"end\",\n \"loc\",\n // Fixme: should be extra.raw / extra.rawValue?\n \"raw\",\n \"rawValue\",\n] as const;\n\nconst CLEAR_KEYS_PLUS_COMMENTS = [\n ...COMMENT_KEYS,\n \"comments\",\n ...CLEAR_KEYS,\n] as const;\n\nexport type Options = { preserveComments?: boolean };\n/**\n * Remove all of the _* properties from a node along with the additional metadata\n * properties like location data and raw token data.\n */\nexport default function removeProperties(\n node: t.Node,\n opts: Options = {},\n): void {\n const map = opts.preserveComments ? CLEAR_KEYS : CLEAR_KEYS_PLUS_COMMENTS;\n for (const key of map) {\n // @ts-expect-error tokens only exist in t.File\n if (node[key] != null) node[key] = undefined;\n }\n\n for (const key of Object.keys(node)) {\n // @ts-expect-error string can not index node\n if (key[0] === \"_\" && node[key] != null) node[key] = undefined;\n }\n\n const symbols: Array = Object.getOwnPropertySymbols(node);\n for (const sym of symbols) {\n // @ts-expect-error Fixme: document symbol properties\n node[sym] = null;\n }\n}\n","import traverseFast from \"../traverse/traverseFast.ts\";\nimport removeProperties from \"./removeProperties.ts\";\nimport type * as t from \"../index.ts\";\n\nexport default function removePropertiesDeep(\n tree: T,\n opts?: { preserveComments: boolean } | null,\n): T {\n traverseFast(tree, removeProperties, opts);\n\n return tree;\n}\n","import {\n isIdentifier,\n isStringLiteral,\n} from \"../validators/generated/index.ts\";\nimport cloneNode from \"../clone/cloneNode.ts\";\nimport removePropertiesDeep from \"../modifications/removePropertiesDeep.ts\";\nimport type * as t from \"../index.ts\";\n\nexport default function toKeyAlias(\n node: t.Method | t.Property,\n key: t.Node = node.key,\n): string {\n let alias;\n\n // @ts-expect-error todo(flow->ts): maybe add node type check before checking `.kind`\n if (node.kind === \"method\") {\n return toKeyAlias.increment() + \"\";\n } else if (isIdentifier(key)) {\n alias = key.name;\n } else if (isStringLiteral(key)) {\n alias = JSON.stringify(key.value);\n } else {\n alias = JSON.stringify(removePropertiesDeep(cloneNode(key)));\n }\n\n // @ts-expect-error todo(flow->ts): maybe add node type check before checking `.computed`\n if (node.computed) {\n alias = `[${alias}]`;\n }\n\n // @ts-expect-error todo(flow->ts): maybe add node type check before checking `.static`\n if (node.static) {\n alias = `static:${alias}`;\n }\n\n return alias;\n}\n\ntoKeyAlias.uid = 0;\n\ntoKeyAlias.increment = function () {\n if (toKeyAlias.uid >= Number.MAX_SAFE_INTEGER) {\n return (toKeyAlias.uid = 0);\n } else {\n return toKeyAlias.uid++;\n }\n};\n","import {\n isStatement,\n isFunction,\n isClass,\n isAssignmentExpression,\n} from \"../validators/generated/index.ts\";\nimport { expressionStatement } from \"../builders/generated/index.ts\";\nimport type * as t from \"../index.ts\";\n\nexport default toStatement as {\n (node: t.AssignmentExpression, ignore?: boolean): t.ExpressionStatement;\n\n (node: T, ignore: false): T;\n (node: T, ignore?: boolean): T | false;\n\n (node: t.Class, ignore: false): t.ClassDeclaration;\n (node: t.Class, ignore?: boolean): t.ClassDeclaration | false;\n\n (node: t.Function, ignore: false): t.FunctionDeclaration;\n (node: t.Function, ignore?: boolean): t.FunctionDeclaration | false;\n\n (node: t.Node, ignore: false): t.Statement;\n (node: t.Node, ignore?: boolean): t.Statement | false;\n};\n\nfunction toStatement(node: t.Node, ignore?: boolean): t.Statement | false {\n if (isStatement(node)) {\n return node;\n }\n\n let mustHaveId = false;\n let newType;\n\n if (isClass(node)) {\n mustHaveId = true;\n newType = \"ClassDeclaration\" as const;\n } else if (isFunction(node)) {\n mustHaveId = true;\n newType = \"FunctionDeclaration\" as const;\n } else if (isAssignmentExpression(node)) {\n return expressionStatement(node);\n }\n\n // @ts-expect-error todo(flow->ts): node.id might be missing\n if (mustHaveId && !node.id) {\n newType = false;\n }\n\n if (!newType) {\n if (ignore) {\n return false;\n } else {\n throw new Error(`cannot turn ${node.type} to a statement`);\n }\n }\n\n // @ts-expect-error manipulating node.type\n node.type = newType;\n\n // @ts-expect-error todo(flow->ts) refactor to avoid type unsafe mutations like reassigning node type above\n return node;\n}\n","import isValidIdentifier from \"../validators/isValidIdentifier.ts\";\nimport {\n identifier,\n booleanLiteral,\n nullLiteral,\n stringLiteral,\n numericLiteral,\n regExpLiteral,\n arrayExpression,\n objectProperty,\n objectExpression,\n unaryExpression,\n binaryExpression,\n} from \"../builders/generated/index.ts\";\nimport type * as t from \"../index.ts\";\n\nexport default valueToNode as {\n (value: undefined): t.Identifier; // TODO: This should return \"void 0\"\n (value: boolean): t.BooleanLiteral;\n (value: null): t.NullLiteral;\n (value: string): t.StringLiteral;\n // Infinities and NaN need to use a BinaryExpression; negative values must be wrapped in UnaryExpression\n (value: number): t.NumericLiteral | t.BinaryExpression | t.UnaryExpression;\n (value: RegExp): t.RegExpLiteral;\n (value: ReadonlyArray): t.ArrayExpression;\n\n // this throws with objects that are not plain objects,\n // or if there are non-valueToNode-able values\n (value: object): t.ObjectExpression;\n\n (value: unknown): t.Expression;\n};\n\n// @ts-expect-error: Object.prototype.toString must return a string\nconst objectToString: (value: unknown) => string = Function.call.bind(\n Object.prototype.toString,\n);\n\nfunction isRegExp(value: unknown): value is RegExp {\n return objectToString(value) === \"[object RegExp]\";\n}\n\nfunction isPlainObject(value: unknown): value is object {\n if (\n typeof value !== \"object\" ||\n value === null ||\n Object.prototype.toString.call(value) !== \"[object Object]\"\n ) {\n return false;\n }\n const proto = Object.getPrototypeOf(value);\n // Object.prototype's __proto__ is null. Every other class's __proto__.__proto__ is\n // not null by default. We cannot check if proto === Object.prototype because it\n // could come from another realm.\n return proto === null || Object.getPrototypeOf(proto) === null;\n}\n\nfunction valueToNode(value: unknown): t.Expression {\n // undefined\n if (value === undefined) {\n return identifier(\"undefined\");\n }\n\n // boolean\n if (value === true || value === false) {\n return booleanLiteral(value);\n }\n\n // null\n if (value === null) {\n return nullLiteral();\n }\n\n // strings\n if (typeof value === \"string\") {\n return stringLiteral(value);\n }\n\n // numbers\n if (typeof value === \"number\") {\n let result;\n if (Number.isFinite(value)) {\n result = numericLiteral(Math.abs(value));\n } else {\n let numerator;\n if (Number.isNaN(value)) {\n // NaN\n numerator = numericLiteral(0);\n } else {\n // Infinity / -Infinity\n numerator = numericLiteral(1);\n }\n\n result = binaryExpression(\"/\", numerator, numericLiteral(0));\n }\n\n if (value < 0 || Object.is(value, -0)) {\n result = unaryExpression(\"-\", result);\n }\n\n return result;\n }\n\n // regexes\n if (isRegExp(value)) {\n const pattern = value.source;\n const flags = /\\/([a-z]*)$/.exec(value.toString())[1];\n return regExpLiteral(pattern, flags);\n }\n\n // array\n if (Array.isArray(value)) {\n return arrayExpression(value.map(valueToNode));\n }\n\n // object\n if (isPlainObject(value)) {\n const props = [];\n for (const key of Object.keys(value)) {\n let nodeKey;\n if (isValidIdentifier(key)) {\n nodeKey = identifier(key);\n } else {\n nodeKey = stringLiteral(key);\n }\n props.push(\n objectProperty(\n nodeKey,\n valueToNode(\n // @ts-expect-error key must present in value\n value[key],\n ),\n ),\n );\n }\n return objectExpression(props);\n }\n\n throw new Error(\"don't know how to turn this value into a node\");\n}\n","import { memberExpression } from \"../builders/generated/index.ts\";\nimport type * as t from \"../index.ts\";\n\n/**\n * Append a node to a member expression.\n */\nexport default function appendToMemberExpression(\n member: t.MemberExpression,\n append: t.MemberExpression[\"property\"],\n computed: boolean = false,\n): t.MemberExpression {\n member.object = memberExpression(\n member.object,\n member.property,\n member.computed,\n );\n member.property = append;\n member.computed = !!computed;\n\n return member;\n}\n","import { INHERIT_KEYS } from \"../constants/index.ts\";\nimport inheritsComments from \"../comments/inheritsComments.ts\";\nimport type * as t from \"../index.ts\";\n\n/**\n * Inherit all contextual properties from `parent` node to `child` node.\n */\nexport default function inherits(\n child: T,\n parent: t.Node | null | undefined,\n): T {\n if (!child || !parent) return child;\n\n // optionally inherit specific properties if not null\n for (const key of INHERIT_KEYS.optional) {\n // @ts-expect-error Fixme: refine parent types\n if (child[key] == null) {\n // @ts-expect-error Fixme: refine parent types\n child[key] = parent[key];\n }\n }\n\n // force inherit \"private\" properties\n for (const key of Object.keys(parent)) {\n if (key[0] === \"_\" && key !== \"__clone\") {\n // @ts-expect-error Fixme: refine parent types\n child[key] = parent[key];\n }\n }\n\n // force inherit select properties\n for (const key of INHERIT_KEYS.force) {\n // @ts-expect-error Fixme: refine parent types\n child[key] = parent[key];\n }\n\n inheritsComments(child, parent);\n\n return child;\n}\n","import { memberExpression } from \"../builders/generated/index.ts\";\nimport { isSuper } from \"../index.ts\";\nimport type * as t from \"../index.ts\";\n\n/**\n * Prepend a node to a member expression.\n */\nexport default function prependToMemberExpression<\n T extends Pick,\n>(member: T, prepend: t.MemberExpression[\"object\"]): T {\n if (isSuper(member.object)) {\n throw new Error(\n \"Cannot prepend node to super property access (`super.foo`).\",\n );\n }\n member.object = memberExpression(prepend, member.object);\n\n return member;\n}\n","import type * as t from \"../index.ts\";\n\n/**\n * For the given node, generate a map from assignment id names to the identifier node.\n * Unlike getBindingIdentifiers, this function does not handle declarations and imports.\n * @param node the assignment expression or forXstatement\n * @returns an object map\n * @see getBindingIdentifiers\n */\nexport default function getAssignmentIdentifiers(\n node: t.Node | t.Node[],\n): Record {\n // null represents holes in an array pattern\n const search: (t.Node | null)[] = [].concat(node);\n const ids = Object.create(null);\n\n while (search.length) {\n const id = search.pop();\n if (!id) continue;\n\n switch (id.type) {\n case \"ArrayPattern\":\n search.push(...id.elements);\n break;\n\n case \"AssignmentExpression\":\n case \"AssignmentPattern\":\n case \"ForInStatement\":\n case \"ForOfStatement\":\n search.push(id.left);\n break;\n\n case \"ObjectPattern\":\n search.push(...id.properties);\n break;\n\n case \"ObjectProperty\":\n search.push(id.value);\n break;\n\n case \"RestElement\":\n case \"UpdateExpression\":\n search.push(id.argument);\n break;\n\n case \"UnaryExpression\":\n if (id.operator === \"delete\") {\n search.push(id.argument);\n }\n break;\n\n case \"Identifier\":\n ids[id.name] = id;\n break;\n\n default:\n break;\n }\n }\n\n return ids;\n}\n","import {\n isExportDeclaration,\n isIdentifier,\n isClassExpression,\n isDeclaration,\n isFunctionDeclaration,\n isFunctionExpression,\n isExportAllDeclaration,\n isAssignmentExpression,\n isUnaryExpression,\n isUpdateExpression,\n} from \"../validators/generated/index.ts\";\nimport type * as t from \"../index.ts\";\n\nexport { getBindingIdentifiers as default };\n\nfunction getBindingIdentifiers(\n node: t.Node,\n duplicates: true,\n outerOnly?: boolean,\n newBindingsOnly?: boolean,\n): Record>;\n\nfunction getBindingIdentifiers(\n node: t.Node,\n duplicates?: false,\n outerOnly?: boolean,\n newBindingsOnly?: boolean,\n): Record;\n\nfunction getBindingIdentifiers(\n node: t.Node,\n duplicates?: boolean,\n outerOnly?: boolean,\n newBindingsOnly?: boolean,\n): Record | Record>;\n\n/**\n * Return a list of binding identifiers associated with the input `node`.\n */\nfunction getBindingIdentifiers(\n node: t.Node,\n duplicates?: boolean,\n outerOnly?: boolean,\n newBindingsOnly?: boolean,\n): Record | Record> {\n const search: t.Node[] = [].concat(node);\n const ids = Object.create(null);\n\n while (search.length) {\n const id = search.shift();\n if (!id) continue;\n\n if (\n newBindingsOnly &&\n // These nodes do not introduce _new_ bindings, but they are included\n // in getBindingIdentifiers.keys for backwards compatibility.\n // TODO(@nicolo-ribaudo): Check if we can remove them from .keys in a\n // backward-compatible way, and if not what we need to do to remove them\n // in Babel 8.\n (isAssignmentExpression(id) ||\n isUnaryExpression(id) ||\n isUpdateExpression(id))\n ) {\n continue;\n }\n\n if (isIdentifier(id)) {\n if (duplicates) {\n const _ids = (ids[id.name] = ids[id.name] || []);\n _ids.push(id);\n } else {\n ids[id.name] = id;\n }\n continue;\n }\n\n if (isExportDeclaration(id) && !isExportAllDeclaration(id)) {\n if (isDeclaration(id.declaration)) {\n search.push(id.declaration);\n }\n continue;\n }\n\n if (outerOnly) {\n if (isFunctionDeclaration(id)) {\n search.push(id.id);\n continue;\n }\n\n if (\n isFunctionExpression(id) ||\n (process.env.BABEL_8_BREAKING && isClassExpression(id))\n ) {\n continue;\n }\n }\n\n const keys = getBindingIdentifiers.keys[id.type];\n\n if (keys) {\n for (let i = 0; i < keys.length; i++) {\n const key = keys[i];\n const nodes =\n // @ts-expect-error key must present in id\n id[key] as t.Node[] | t.Node | undefined | null;\n if (nodes) {\n if (Array.isArray(nodes)) {\n search.push(...nodes);\n } else {\n search.push(nodes);\n }\n }\n }\n }\n }\n return ids;\n}\n\n/**\n * Mapping of types to their identifier keys.\n */\ntype KeysMap = {\n [N in t.Node as N[\"type\"]]?: (keyof N)[];\n};\n\nconst keys: KeysMap = {\n DeclareClass: [\"id\"],\n DeclareFunction: [\"id\"],\n DeclareModule: [\"id\"],\n DeclareVariable: [\"id\"],\n DeclareInterface: [\"id\"],\n DeclareTypeAlias: [\"id\"],\n DeclareOpaqueType: [\"id\"],\n InterfaceDeclaration: [\"id\"],\n TypeAlias: [\"id\"],\n OpaqueType: [\"id\"],\n\n CatchClause: [\"param\"],\n LabeledStatement: [\"label\"],\n UnaryExpression: [\"argument\"],\n AssignmentExpression: [\"left\"],\n\n ImportSpecifier: [\"local\"],\n ImportNamespaceSpecifier: [\"local\"],\n ImportDefaultSpecifier: [\"local\"],\n ImportDeclaration: [\"specifiers\"],\n\n ExportSpecifier: [\"exported\"],\n ExportNamespaceSpecifier: [\"exported\"],\n ExportDefaultSpecifier: [\"exported\"],\n\n FunctionDeclaration: [\"id\", \"params\"],\n FunctionExpression: [\"id\", \"params\"],\n ArrowFunctionExpression: [\"params\"],\n ObjectMethod: [\"params\"],\n ClassMethod: [\"params\"],\n ClassPrivateMethod: [\"params\"],\n\n ForInStatement: [\"left\"],\n ForOfStatement: [\"left\"],\n\n ClassDeclaration: [\"id\"],\n ClassExpression: [\"id\"],\n\n RestElement: [\"argument\"],\n UpdateExpression: [\"argument\"],\n\n ObjectProperty: [\"value\"],\n\n AssignmentPattern: [\"left\"],\n ArrayPattern: [\"elements\"],\n ObjectPattern: [\"properties\"],\n\n VariableDeclaration: [\"declarations\"],\n VariableDeclarator: [\"id\"],\n};\n\ngetBindingIdentifiers.keys = keys;\n","import getBindingIdentifiers from \"./getBindingIdentifiers.ts\";\nimport type * as t from \"../index.ts\";\n\nexport default getOuterBindingIdentifiers as {\n (node: t.Node, duplicates: true): Record>;\n (node: t.Node, duplicates?: false): Record;\n (\n node: t.Node,\n duplicates?: boolean,\n ): Record | Record>;\n};\n\nfunction getOuterBindingIdentifiers(\n node: t.Node,\n duplicates: boolean,\n): Record | Record> {\n return getBindingIdentifiers(node, duplicates, true);\n}\n","import type * as t from \"../index.ts\";\n\nimport {\n isAssignmentExpression,\n isClassMethod,\n isIdentifier,\n isLiteral,\n isNullLiteral,\n isObjectMethod,\n isObjectProperty,\n isPrivateName,\n isRegExpLiteral,\n isTemplateLiteral,\n isVariableDeclarator,\n} from \"../validators/generated/index.ts\";\n\nfunction getNameFromLiteralId(id: t.Literal): string {\n if (isNullLiteral(id)) {\n return \"null\";\n }\n\n if (isRegExpLiteral(id)) {\n return `/${id.pattern}/${id.flags}`;\n }\n\n if (isTemplateLiteral(id)) {\n return id.quasis.map(quasi => quasi.value.raw).join(\"\");\n }\n\n if (id.value !== undefined) {\n return String(id.value);\n }\n\n return null;\n}\n\nfunction getObjectMemberKey(\n node: t.ObjectProperty | t.ObjectMethod | t.ClassProperty | t.ClassMethod,\n): t.Expression | t.PrivateName {\n if (!node.computed || isLiteral(node.key)) {\n return node.key;\n }\n}\n\ntype GetFunctionNameResult = {\n name: string;\n originalNode: t.Node;\n} | null;\n\nexport default function getFunctionName(\n node: t.ObjectMethod | t.ClassMethod,\n): GetFunctionNameResult;\nexport default function getFunctionName(\n node: t.Function | t.Class,\n parent: t.Node,\n): GetFunctionNameResult;\nexport default function getFunctionName(\n node: t.Function | t.Class,\n parent?: t.Node,\n): GetFunctionNameResult {\n if (\"id\" in node && node.id) {\n return {\n name: node.id.name,\n originalNode: node.id,\n };\n }\n\n let prefix = \"\";\n\n let id;\n if (isObjectProperty(parent, { value: node })) {\n // { foo: () => {} };\n id = getObjectMemberKey(parent);\n } else if (isObjectMethod(node) || isClassMethod(node)) {\n // { foo() {} };\n id = getObjectMemberKey(node);\n if (node.kind === \"get\") prefix = \"get \";\n else if (node.kind === \"set\") prefix = \"set \";\n } else if (isVariableDeclarator(parent, { init: node })) {\n // let foo = function () {};\n id = parent.id;\n } else if (isAssignmentExpression(parent, { operator: \"=\", right: node })) {\n // foo = function () {};\n id = parent.left;\n }\n\n if (!id) return null;\n\n const name = isLiteral(id)\n ? getNameFromLiteralId(id)\n : isIdentifier(id)\n ? id.name\n : isPrivateName(id)\n ? id.id.name\n : null;\n if (name == null) return null;\n\n return { name: prefix + name, originalNode: id };\n}\n","import { VISITOR_KEYS } from \"../definitions/index.ts\";\nimport type * as t from \"../index.ts\";\n\nexport type TraversalAncestors = Array<{\n node: t.Node;\n key: string;\n index?: number;\n}>;\n\nexport type TraversalHandler = (\n this: undefined,\n node: t.Node,\n parent: TraversalAncestors,\n state: T,\n) => void;\n\nexport type TraversalHandlers = {\n enter?: TraversalHandler;\n exit?: TraversalHandler;\n};\n\n/**\n * A general AST traversal with both prefix and postfix handlers, and a\n * state object. Exposes ancestry data to each handler so that more complex\n * AST data can be taken into account.\n */\nexport default function traverse(\n node: t.Node,\n handlers: TraversalHandler | TraversalHandlers,\n state?: T,\n): void {\n if (typeof handlers === \"function\") {\n handlers = { enter: handlers };\n }\n\n const { enter, exit } = handlers;\n\n traverseSimpleImpl(node, enter, exit, state, []);\n}\n\nfunction traverseSimpleImpl(\n node: any,\n enter: Function | undefined,\n exit: Function | undefined,\n state: T | undefined,\n ancestors: TraversalAncestors,\n) {\n const keys = VISITOR_KEYS[node.type];\n if (!keys) return;\n\n if (enter) enter(node, ancestors, state);\n\n for (const key of keys) {\n const subNode = node[key];\n\n if (Array.isArray(subNode)) {\n for (let i = 0; i < subNode.length; i++) {\n const child = subNode[i];\n if (!child) continue;\n\n ancestors.push({\n node,\n key,\n index: i,\n });\n\n traverseSimpleImpl(child, enter, exit, state, ancestors);\n\n ancestors.pop();\n }\n } else if (subNode) {\n ancestors.push({\n node,\n key,\n });\n\n traverseSimpleImpl(subNode, enter, exit, state, ancestors);\n\n ancestors.pop();\n }\n }\n\n if (exit) exit(node, ancestors, state);\n}\n","import getBindingIdentifiers from \"../retrievers/getBindingIdentifiers.ts\";\nimport type * as t from \"../index.ts\";\n/**\n * Check if the input `node` is a binding identifier.\n */\nexport default function isBinding(\n node: t.Node,\n parent: t.Node,\n grandparent?: t.Node,\n): boolean {\n if (\n grandparent &&\n node.type === \"Identifier\" &&\n parent.type === \"ObjectProperty\" &&\n grandparent.type === \"ObjectExpression\"\n ) {\n // We need to special-case this, because getBindingIdentifiers\n // has an ObjectProperty->value entry for destructuring patterns.\n return false;\n }\n\n const keys = getBindingIdentifiers.keys[parent.type];\n if (keys) {\n for (let i = 0; i < keys.length; i++) {\n const key = keys[i];\n const val =\n // @ts-expect-error key must present in parent\n parent[key];\n if (Array.isArray(val)) {\n if (val.includes(node)) return true;\n } else {\n if (val === node) return true;\n }\n }\n }\n\n return false;\n}\n","import { isVariableDeclaration } from \"./generated/index.ts\";\nimport { BLOCK_SCOPED_SYMBOL } from \"../constants/index.ts\";\nimport type * as t from \"../index.ts\";\n\n/**\n * Check if the input `node` is a `let` variable declaration.\n */\nexport default function isLet(node: t.Node): boolean {\n return (\n isVariableDeclaration(node) &&\n (node.kind !== \"var\" ||\n // @ts-expect-error Fixme: document private properties\n node[BLOCK_SCOPED_SYMBOL])\n );\n}\n","import {\n isClassDeclaration,\n isFunctionDeclaration,\n} from \"./generated/index.ts\";\nimport isLet from \"./isLet.ts\";\nimport type * as t from \"../index.ts\";\n\n/**\n * Check if the input `node` is block scoped.\n */\nexport default function isBlockScoped(node: t.Node): boolean {\n return isFunctionDeclaration(node) || isClassDeclaration(node) || isLet(node);\n}\n","import isType from \"./isType.ts\";\nimport { isIdentifier } from \"./generated/index.ts\";\nimport type * as t from \"../index.ts\";\n\n/**\n * Check if the input `node` is definitely immutable.\n */\nexport default function isImmutable(node: t.Node): boolean {\n if (isType(node.type, \"Immutable\")) return true;\n\n if (isIdentifier(node)) {\n if (node.name === \"undefined\") {\n // immutable!\n return true;\n } else {\n // no idea...\n return false;\n }\n }\n\n return false;\n}\n","import { NODE_FIELDS, VISITOR_KEYS } from \"../definitions/index.ts\";\nimport type * as t from \"../index.ts\";\n\n/**\n * Check if two nodes are equivalent\n */\nexport default function isNodesEquivalent>(\n a: T,\n b: any,\n): b is T {\n if (\n typeof a !== \"object\" ||\n typeof b !== \"object\" ||\n a == null ||\n b == null\n ) {\n return a === b;\n }\n\n if (a.type !== b.type) {\n return false;\n }\n\n const fields = Object.keys(NODE_FIELDS[a.type] || a.type);\n const visitorKeys = VISITOR_KEYS[a.type];\n\n for (const field of fields) {\n const val_a =\n // @ts-expect-error field must present in a\n a[field];\n const val_b = b[field];\n if (typeof val_a !== typeof val_b) {\n return false;\n }\n if (val_a == null && val_b == null) {\n continue;\n } else if (val_a == null || val_b == null) {\n return false;\n }\n\n if (Array.isArray(val_a)) {\n if (!Array.isArray(val_b)) {\n return false;\n }\n if (val_a.length !== val_b.length) {\n return false;\n }\n\n for (let i = 0; i < val_a.length; i++) {\n if (!isNodesEquivalent(val_a[i], val_b[i])) {\n return false;\n }\n }\n continue;\n }\n\n if (typeof val_a === \"object\" && !visitorKeys?.includes(field)) {\n for (const key of Object.keys(val_a)) {\n if (val_a[key] !== val_b[key]) {\n return false;\n }\n }\n continue;\n }\n\n if (!isNodesEquivalent(val_a, val_b)) {\n return false;\n }\n }\n\n return true;\n}\n","import type * as t from \"../index.ts\";\n\n/**\n * Check if the input `node` is a reference to a bound variable.\n */\nexport default function isReferenced(\n node: t.Node,\n parent: t.Node,\n grandparent?: t.Node,\n): boolean {\n switch (parent.type) {\n // yes: PARENT[NODE]\n // yes: NODE.child\n // no: parent.NODE\n case \"MemberExpression\":\n case \"OptionalMemberExpression\":\n if (parent.property === node) {\n return !!parent.computed;\n }\n return parent.object === node;\n\n case \"JSXMemberExpression\":\n return parent.object === node;\n // no: let NODE = init;\n // yes: let id = NODE;\n case \"VariableDeclarator\":\n return parent.init === node;\n\n // yes: () => NODE\n // no: (NODE) => {}\n case \"ArrowFunctionExpression\":\n return parent.body === node;\n\n // no: class { #NODE; }\n // no: class { get #NODE() {} }\n // no: class { #NODE() {} }\n // no: class { fn() { return this.#NODE; } }\n case \"PrivateName\":\n return false;\n\n // no: class { NODE() {} }\n // yes: class { [NODE]() {} }\n // no: class { foo(NODE) {} }\n case \"ClassMethod\":\n case \"ClassPrivateMethod\":\n case \"ObjectMethod\":\n if (parent.key === node) {\n return !!parent.computed;\n }\n return false;\n\n // yes: { [NODE]: \"\" }\n // no: { NODE: \"\" }\n // depends: { NODE }\n // depends: { key: NODE }\n case \"ObjectProperty\":\n if (parent.key === node) {\n return !!parent.computed;\n }\n // parent.value === node\n return !grandparent || grandparent.type !== \"ObjectPattern\";\n // no: class { NODE = value; }\n // yes: class { [NODE] = value; }\n // yes: class { key = NODE; }\n case \"ClassProperty\":\n case \"ClassAccessorProperty\":\n if (parent.key === node) {\n return !!parent.computed;\n }\n return true;\n case \"ClassPrivateProperty\":\n return parent.key !== node;\n\n // no: class NODE {}\n // yes: class Foo extends NODE {}\n case \"ClassDeclaration\":\n case \"ClassExpression\":\n return parent.superClass === node;\n\n // yes: left = NODE;\n // no: NODE = right;\n case \"AssignmentExpression\":\n return parent.right === node;\n\n // no: [NODE = foo] = [];\n // yes: [foo = NODE] = [];\n case \"AssignmentPattern\":\n return parent.right === node;\n\n // no: NODE: for (;;) {}\n case \"LabeledStatement\":\n return false;\n\n // no: try {} catch (NODE) {}\n case \"CatchClause\":\n return false;\n\n // no: function foo(...NODE) {}\n case \"RestElement\":\n return false;\n\n case \"BreakStatement\":\n case \"ContinueStatement\":\n return false;\n\n // no: function NODE() {}\n // no: function foo(NODE) {}\n case \"FunctionDeclaration\":\n case \"FunctionExpression\":\n return false;\n\n // no: export NODE from \"foo\";\n // no: export * as NODE from \"foo\";\n case \"ExportNamespaceSpecifier\":\n case \"ExportDefaultSpecifier\":\n return false;\n\n // no: export { foo as NODE };\n // yes: export { NODE as foo };\n // no: export { NODE as foo } from \"foo\";\n case \"ExportSpecifier\":\n // @ts-expect-error todo(flow->ts): Property 'source' does not exist on type 'AnyTypeAnnotation'.\n if (grandparent?.source) {\n return false;\n }\n return parent.local === node;\n\n // no: import NODE from \"foo\";\n // no: import * as NODE from \"foo\";\n // no: import { NODE as foo } from \"foo\";\n // no: import { foo as NODE } from \"foo\";\n // no: import NODE from \"bar\";\n case \"ImportDefaultSpecifier\":\n case \"ImportNamespaceSpecifier\":\n case \"ImportSpecifier\":\n return false;\n\n // no: import \"foo\" assert { NODE: \"json\" }\n case \"ImportAttribute\":\n return false;\n\n // no:

\n case \"JSXAttribute\":\n return false;\n\n // no: [NODE] = [];\n // no: ({ NODE }) = [];\n case \"ObjectPattern\":\n case \"ArrayPattern\":\n return false;\n\n // no: new.NODE\n // no: NODE.target\n case \"MetaProperty\":\n return false;\n\n // yes: type X = { someProperty: NODE }\n // no: type X = { NODE: OtherType }\n case \"ObjectTypeProperty\":\n return parent.key !== node;\n\n // yes: enum X { Foo = NODE }\n // no: enum X { NODE }\n case \"TSEnumMember\":\n return parent.id !== node;\n\n // yes: { [NODE]: value }\n // no: { NODE: value }\n case \"TSPropertySignature\":\n if (parent.key === node) {\n return !!parent.computed;\n }\n\n return true;\n }\n\n return true;\n}\n","import {\n isFunction,\n isCatchClause,\n isBlockStatement,\n isScopable,\n isPattern,\n} from \"./generated/index.ts\";\nimport type * as t from \"../index.ts\";\n\n/**\n * Check if the input `node` is a scope.\n */\nexport default function isScope(node: t.Node, parent: t.Node): boolean {\n // If a BlockStatement is an immediate descendent of a Function/CatchClause, it must be in the body.\n // Hence we skipped the parentKey === \"params\" check\n if (isBlockStatement(node) && (isFunction(parent) || isCatchClause(parent))) {\n return false;\n }\n\n // If a Pattern is an immediate descendent of a Function/CatchClause, it must be in the params.\n // Hence we skipped the parentKey === \"params\" check\n if (isPattern(node) && (isFunction(parent) || isCatchClause(parent))) {\n return true;\n }\n\n return isScopable(node);\n}\n","import { isIdentifier, isImportDefaultSpecifier } from \"./generated/index.ts\";\nimport type * as t from \"../index.ts\";\n\n/**\n * Check if the input `specifier` is a `default` import or export.\n */\nexport default function isSpecifierDefault(\n specifier: t.ModuleSpecifier,\n): boolean {\n return (\n isImportDefaultSpecifier(specifier) ||\n // @ts-expect-error todo(flow->ts): stricter type for specifier\n isIdentifier(specifier.imported || specifier.exported, {\n name: \"default\",\n })\n );\n}\n","import isValidIdentifier from \"./isValidIdentifier.ts\";\n\nconst RESERVED_WORDS_ES3_ONLY: Set = new Set([\n \"abstract\",\n \"boolean\",\n \"byte\",\n \"char\",\n \"double\",\n \"enum\",\n \"final\",\n \"float\",\n \"goto\",\n \"implements\",\n \"int\",\n \"interface\",\n \"long\",\n \"native\",\n \"package\",\n \"private\",\n \"protected\",\n \"public\",\n \"short\",\n \"static\",\n \"synchronized\",\n \"throws\",\n \"transient\",\n \"volatile\",\n]);\n\n/**\n * Check if the input `name` is a valid identifier name according to the ES3 specification.\n *\n * Additional ES3 reserved words are\n */\nexport default function isValidES3Identifier(name: string): boolean {\n return isValidIdentifier(name) && !RESERVED_WORDS_ES3_ONLY.has(name);\n}\n","import { isVariableDeclaration } from \"./generated/index.ts\";\nimport { BLOCK_SCOPED_SYMBOL } from \"../constants/index.ts\";\nimport type * as t from \"../index.ts\";\n\n/**\n * Check if the input `node` is a variable declaration.\n */\nexport default function isVar(node: t.Node): boolean {\n return (\n isVariableDeclaration(node, { kind: \"var\" }) &&\n !(\n // @ts-expect-error document private properties\n node[BLOCK_SCOPED_SYMBOL]\n )\n );\n}\n","import isReactComponent from \"./validators/react/isReactComponent.ts\";\nimport isCompatTag from \"./validators/react/isCompatTag.ts\";\nimport buildChildren from \"./builders/react/buildChildren.ts\";\n\n// asserts\nexport { default as assertNode } from \"./asserts/assertNode.ts\";\nexport * from \"./asserts/generated/index.ts\";\n\n// builders\nexport { default as createTypeAnnotationBasedOnTypeof } from \"./builders/flow/createTypeAnnotationBasedOnTypeof.ts\";\n/** @deprecated use createFlowUnionType instead */\nexport { default as createUnionTypeAnnotation } from \"./builders/flow/createFlowUnionType.ts\";\nexport { default as createFlowUnionType } from \"./builders/flow/createFlowUnionType.ts\";\nexport { default as createTSUnionType } from \"./builders/typescript/createTSUnionType.ts\";\nexport * from \"./builders/generated/index.ts\";\nexport * from \"./builders/generated/uppercase.js\";\nexport * from \"./builders/productions.ts\";\n\n// clone\nexport { default as cloneNode } from \"./clone/cloneNode.ts\";\nexport { default as clone } from \"./clone/clone.ts\";\nexport { default as cloneDeep } from \"./clone/cloneDeep.ts\";\nexport { default as cloneDeepWithoutLoc } from \"./clone/cloneDeepWithoutLoc.ts\";\nexport { default as cloneWithoutLoc } from \"./clone/cloneWithoutLoc.ts\";\n\n// comments\nexport { default as addComment } from \"./comments/addComment.ts\";\nexport { default as addComments } from \"./comments/addComments.ts\";\nexport { default as inheritInnerComments } from \"./comments/inheritInnerComments.ts\";\nexport { default as inheritLeadingComments } from \"./comments/inheritLeadingComments.ts\";\nexport { default as inheritsComments } from \"./comments/inheritsComments.ts\";\nexport { default as inheritTrailingComments } from \"./comments/inheritTrailingComments.ts\";\nexport { default as removeComments } from \"./comments/removeComments.ts\";\n\n// constants\nexport * from \"./constants/generated/index.ts\";\nexport * from \"./constants/index.ts\";\n\n// converters\nexport { default as ensureBlock } from \"./converters/ensureBlock.ts\";\nexport { default as toBindingIdentifierName } from \"./converters/toBindingIdentifierName.ts\";\nexport { default as toBlock } from \"./converters/toBlock.ts\";\nexport { default as toComputedKey } from \"./converters/toComputedKey.ts\";\nexport { default as toExpression } from \"./converters/toExpression.ts\";\nexport { default as toIdentifier } from \"./converters/toIdentifier.ts\";\nexport { default as toKeyAlias } from \"./converters/toKeyAlias.ts\";\nexport { default as toStatement } from \"./converters/toStatement.ts\";\nexport { default as valueToNode } from \"./converters/valueToNode.ts\";\n\n// definitions\nexport * from \"./definitions/index.ts\";\n\n// modifications\nexport { default as appendToMemberExpression } from \"./modifications/appendToMemberExpression.ts\";\nexport { default as inherits } from \"./modifications/inherits.ts\";\nexport { default as prependToMemberExpression } from \"./modifications/prependToMemberExpression.ts\";\nexport {\n default as removeProperties,\n type Options as RemovePropertiesOptions,\n} from \"./modifications/removeProperties.ts\";\nexport { default as removePropertiesDeep } from \"./modifications/removePropertiesDeep.ts\";\nexport { default as removeTypeDuplicates } from \"./modifications/flow/removeTypeDuplicates.ts\";\n\n// retrievers\nexport { default as getAssignmentIdentifiers } from \"./retrievers/getAssignmentIdentifiers.ts\";\nexport { default as getBindingIdentifiers } from \"./retrievers/getBindingIdentifiers.ts\";\nexport { default as getOuterBindingIdentifiers } from \"./retrievers/getOuterBindingIdentifiers.ts\";\nexport { default as getFunctionName } from \"./retrievers/getFunctionName.ts\";\n\n// traverse\nexport { default as traverse } from \"./traverse/traverse.ts\";\nexport * from \"./traverse/traverse.ts\";\nexport { default as traverseFast } from \"./traverse/traverseFast.ts\";\n\n// utils\nexport { default as shallowEqual } from \"./utils/shallowEqual.ts\";\n\n// validators\nexport { default as is } from \"./validators/is.ts\";\nexport { default as isBinding } from \"./validators/isBinding.ts\";\nexport { default as isBlockScoped } from \"./validators/isBlockScoped.ts\";\nexport { default as isImmutable } from \"./validators/isImmutable.ts\";\nexport { default as isLet } from \"./validators/isLet.ts\";\nexport { default as isNode } from \"./validators/isNode.ts\";\nexport { default as isNodesEquivalent } from \"./validators/isNodesEquivalent.ts\";\nexport { default as isPlaceholderType } from \"./validators/isPlaceholderType.ts\";\nexport { default as isReferenced } from \"./validators/isReferenced.ts\";\nexport { default as isScope } from \"./validators/isScope.ts\";\nexport { default as isSpecifierDefault } from \"./validators/isSpecifierDefault.ts\";\nexport { default as isType } from \"./validators/isType.ts\";\nexport { default as isValidES3Identifier } from \"./validators/isValidES3Identifier.ts\";\nexport { default as isValidIdentifier } from \"./validators/isValidIdentifier.ts\";\nexport { default as isVar } from \"./validators/isVar.ts\";\nexport { default as matchesPattern } from \"./validators/matchesPattern.ts\";\nexport { default as validate } from \"./validators/validate.ts\";\nexport { default as buildMatchMemberExpression } from \"./validators/buildMatchMemberExpression.ts\";\nexport * from \"./validators/generated/index.ts\";\n\n// react\nexport const react = {\n isReactComponent,\n isCompatTag,\n buildChildren,\n};\n\nexport type * from \"./ast-types/generated/index.ts\";\n\n// this is used by @babel/traverse to warn about deprecated visitors\nexport { default as __internal__deprecationWarning } from \"./utils/deprecationWarning.ts\";\n\nif (!process.env.BABEL_8_BREAKING && !USE_ESM && !IS_STANDALONE) {\n // eslint-disable-next-line no-restricted-globals\n exports.toSequenceExpression =\n // eslint-disable-next-line no-restricted-globals\n require(\"./converters/toSequenceExpression.js\").default;\n}\n","import { assertExpressionStatement } from \"@babel/types\";\nimport type * as t from \"@babel/types\";\n\nexport type Formatter = {\n code: (source: string) => string;\n validate: (ast: t.File) => void;\n unwrap: (ast: t.File) => T;\n};\n\nfunction makeStatementFormatter(\n fn: (statements: Array) => T,\n): Formatter {\n return {\n // We need to prepend a \";\" to force statement parsing so that\n // ExpressionStatement strings won't be parsed as directives.\n // Alongside that, we also prepend a comment so that when a syntax error\n // is encountered, the user will be less likely to get confused about\n // where the random semicolon came from.\n code: str => `/* @babel/template */;\\n${str}`,\n validate: () => {},\n unwrap: (ast: t.File): T => {\n return fn(ast.program.body.slice(1));\n },\n };\n}\n\nexport const smart = makeStatementFormatter(body => {\n if (body.length > 1) {\n return body;\n } else {\n return body[0];\n }\n});\n\nexport const statements = makeStatementFormatter(body => body);\n\nexport const statement = makeStatementFormatter(body => {\n // We do this validation when unwrapping since the replacement process\n // could have added or removed statements.\n if (body.length === 0) {\n throw new Error(\"Found nothing to return.\");\n }\n if (body.length > 1) {\n throw new Error(\"Found multiple statements but wanted one\");\n }\n\n return body[0];\n});\n\nexport const expression: Formatter = {\n code: str => `(\\n${str}\\n)`,\n validate: ast => {\n if (ast.program.body.length > 1) {\n throw new Error(\"Found multiple statements but wanted one\");\n }\n if (expression.unwrap(ast).start === 0) {\n throw new Error(\"Parse result included parens.\");\n }\n },\n unwrap: ({ program }) => {\n const [stmt] = program.body;\n assertExpressionStatement(stmt);\n return stmt.expression;\n },\n};\n\nexport const program: Formatter = {\n code: str => str,\n validate: () => {},\n unwrap: ast => ast.program,\n};\n","import type { ParserOptions as ParserOpts } from \"@babel/parser\";\n\nexport type { ParserOpts };\n\n/**\n * These are the options that 'babel-template' actually accepts and typechecks\n * when called. All other options are passed through to the parser.\n */\nexport type PublicOpts = {\n /**\n * A set of placeholder names to automatically accept, ignoring the given\n * pattern entirely.\n *\n * This option can be used when using %%foo%% style placeholders.\n */\n placeholderWhitelist?: Set;\n /**\n * A pattern to search for when looking for Identifier and StringLiteral\n * nodes that can be replaced.\n *\n * 'false' will disable placeholder searching entirely, leaving only the\n * 'placeholderWhitelist' value to find replacements.\n *\n * Defaults to /^[_$A-Z0-9]+$/.\n *\n * This option can be used when using %%foo%% style placeholders.\n */\n placeholderPattern?: RegExp | false;\n /**\n * 'true' to pass through comments from the template into the resulting AST,\n * or 'false' to automatically discard comments. Defaults to 'false'.\n */\n preserveComments?: boolean;\n /**\n * 'true' to use %%foo%% style placeholders, 'false' to use legacy placeholders\n * described by placeholderPattern or placeholderWhitelist.\n * When it is not set, it behaves as 'true' if there are syntactic placeholders,\n * otherwise as 'false'.\n */\n syntacticPlaceholders?: boolean | null;\n};\n\nexport type TemplateOpts = {\n parser: ParserOpts;\n placeholderWhitelist?: Set;\n placeholderPattern?: RegExp | false;\n preserveComments?: boolean;\n syntacticPlaceholders?: boolean;\n};\n\nexport function merge(a: TemplateOpts, b: TemplateOpts): TemplateOpts {\n const {\n placeholderWhitelist = a.placeholderWhitelist,\n placeholderPattern = a.placeholderPattern,\n preserveComments = a.preserveComments,\n syntacticPlaceholders = a.syntacticPlaceholders,\n } = b;\n\n return {\n parser: {\n ...a.parser,\n ...b.parser,\n },\n placeholderWhitelist,\n placeholderPattern,\n preserveComments,\n syntacticPlaceholders,\n };\n}\n\nexport function validate(opts: unknown): TemplateOpts {\n if (opts != null && typeof opts !== \"object\") {\n throw new Error(\"Unknown template options.\");\n }\n\n const {\n placeholderWhitelist,\n placeholderPattern,\n preserveComments,\n syntacticPlaceholders,\n ...parser\n } = opts || ({} as any);\n\n if (placeholderWhitelist != null && !(placeholderWhitelist instanceof Set)) {\n throw new Error(\n \"'.placeholderWhitelist' must be a Set, null, or undefined\",\n );\n }\n\n if (\n placeholderPattern != null &&\n !(placeholderPattern instanceof RegExp) &&\n placeholderPattern !== false\n ) {\n throw new Error(\n \"'.placeholderPattern' must be a RegExp, false, null, or undefined\",\n );\n }\n\n if (preserveComments != null && typeof preserveComments !== \"boolean\") {\n throw new Error(\n \"'.preserveComments' must be a boolean, null, or undefined\",\n );\n }\n\n if (\n syntacticPlaceholders != null &&\n typeof syntacticPlaceholders !== \"boolean\"\n ) {\n throw new Error(\n \"'.syntacticPlaceholders' must be a boolean, null, or undefined\",\n );\n }\n if (\n syntacticPlaceholders === true &&\n (placeholderWhitelist != null || placeholderPattern != null)\n ) {\n throw new Error(\n \"'.placeholderWhitelist' and '.placeholderPattern' aren't compatible\" +\n \" with '.syntacticPlaceholders: true'\",\n );\n }\n\n return {\n parser,\n placeholderWhitelist: placeholderWhitelist || undefined,\n placeholderPattern:\n placeholderPattern == null ? undefined : placeholderPattern,\n preserveComments: preserveComments == null ? undefined : preserveComments,\n syntacticPlaceholders:\n syntacticPlaceholders == null ? undefined : syntacticPlaceholders,\n };\n}\n\nexport type PublicReplacements = { [x: string]: unknown } | Array;\nexport type TemplateReplacements = { [x: string]: unknown } | void;\n\nexport function normalizeReplacements(\n replacements: unknown,\n): TemplateReplacements {\n if (Array.isArray(replacements)) {\n return replacements.reduce((acc, replacement, i) => {\n acc[\"$\" + i] = replacement;\n return acc;\n }, {});\n } else if (typeof replacements === \"object\" || replacements == null) {\n return (replacements as any) || undefined;\n }\n\n throw new Error(\n \"Template replacements must be an array, object, null, or undefined\",\n );\n}\n","export type Pos = {\n start: number;\n};\n\n// These are used when `options.locations` is on, for the\n// `startLoc` and `endLoc` properties.\n\nexport class Position {\n line: number;\n column: number;\n index: number;\n\n constructor(line: number, col: number, index: number) {\n this.line = line;\n this.column = col;\n this.index = index;\n }\n}\n\nexport class SourceLocation {\n start: Position;\n end: Position;\n filename: string;\n identifierName: string | undefined | null;\n\n constructor(start: Position, end?: Position) {\n this.start = start;\n // (may start as null, but initialized later)\n this.end = end;\n }\n}\n\n/**\n * creates a new position with a non-zero column offset from the given position.\n * This function should be only be used when we create AST node out of the token\n * boundaries, such as TemplateElement ends before tt.templateNonTail. This\n * function does not skip whitespaces.\n */\nexport function createPositionWithColumnOffset(\n position: Position,\n columnOffset: number,\n) {\n const { line, column, index } = position;\n return new Position(line, column + columnOffset, index + columnOffset);\n}\n","import type { ParseErrorTemplates } from \"../parse-error.ts\";\n\nconst code = \"BABEL_PARSER_SOURCETYPE_MODULE_REQUIRED\";\n\nexport default {\n ImportMetaOutsideModule: {\n message: `import.meta may appear only with 'sourceType: \"module\"'`,\n code,\n },\n ImportOutsideModule: {\n message: `'import' and 'export' may appear only with 'sourceType: \"module\"'`,\n code,\n },\n} satisfies ParseErrorTemplates;\n","const NodeDescriptions = {\n ArrayPattern: \"array destructuring pattern\",\n AssignmentExpression: \"assignment expression\",\n AssignmentPattern: \"assignment expression\",\n ArrowFunctionExpression: \"arrow function expression\",\n ConditionalExpression: \"conditional expression\",\n CatchClause: \"catch clause\",\n ForOfStatement: \"for-of statement\",\n ForInStatement: \"for-in statement\",\n ForStatement: \"for-loop\",\n FormalParameters: \"function parameter list\",\n Identifier: \"identifier\",\n ImportSpecifier: \"import specifier\",\n ImportDefaultSpecifier: \"import default specifier\",\n ImportNamespaceSpecifier: \"import namespace specifier\",\n ObjectPattern: \"object destructuring pattern\",\n ParenthesizedExpression: \"parenthesized expression\",\n RestElement: \"rest element\",\n UpdateExpression: {\n true: \"prefix operation\",\n false: \"postfix operation\",\n },\n VariableDeclarator: \"variable declaration\",\n YieldExpression: \"yield expression\",\n};\n\ntype NodeTypesWithDescriptions = keyof Omit<\n typeof NodeDescriptions,\n \"UpdateExpression\"\n>;\n\ntype NodeWithDescription =\n | {\n type: \"UpdateExpression\";\n prefix: boolean;\n }\n | {\n type: NodeTypesWithDescriptions;\n };\n\n// eslint-disable-next-line no-confusing-arrow\nconst toNodeDescription = (node: NodeWithDescription) =>\n node.type === \"UpdateExpression\"\n ? NodeDescriptions.UpdateExpression[`${node.prefix}`]\n : NodeDescriptions[node.type];\n\nexport default toNodeDescription;\n","import type { ParseErrorTemplates } from \"../parse-error.ts\";\nimport toNodeDescription from \"./to-node-description.ts\";\n\nexport type LValAncestor =\n | { type: \"UpdateExpression\"; prefix: boolean }\n | {\n type:\n | \"ArrayPattern\"\n | \"AssignmentExpression\"\n | \"CatchClause\"\n | \"ForOfStatement\"\n | \"FormalParameters\"\n | \"ForInStatement\"\n | \"ForStatement\"\n | \"ImportSpecifier\"\n | \"ImportNamespaceSpecifier\"\n | \"ImportDefaultSpecifier\"\n | \"ParenthesizedExpression\"\n | \"ObjectPattern\"\n | \"RestElement\"\n | \"VariableDeclarator\";\n };\n\nexport default {\n AccessorIsGenerator: ({ kind }: { kind: \"get\" | \"set\" }) =>\n `A ${kind}ter cannot be a generator.`,\n ArgumentsInClass:\n \"'arguments' is only allowed in functions and class methods.\",\n AsyncFunctionInSingleStatementContext:\n \"Async functions can only be declared at the top level or inside a block.\",\n AwaitBindingIdentifier:\n \"Can not use 'await' as identifier inside an async function.\",\n AwaitBindingIdentifierInStaticBlock:\n \"Can not use 'await' as identifier inside a static block.\",\n AwaitExpressionFormalParameter:\n \"'await' is not allowed in async function parameters.\",\n AwaitUsingNotInAsyncContext:\n \"'await using' is only allowed within async functions and at the top levels of modules.\",\n AwaitNotInAsyncContext:\n \"'await' is only allowed within async functions and at the top levels of modules.\",\n AwaitNotInAsyncFunction: \"'await' is only allowed within async functions.\",\n BadGetterArity: \"A 'get' accessor must not have any formal parameters.\",\n BadSetterArity: \"A 'set' accessor must have exactly one formal parameter.\",\n BadSetterRestParameter:\n \"A 'set' accessor function argument must not be a rest parameter.\",\n ConstructorClassField: \"Classes may not have a field named 'constructor'.\",\n ConstructorClassPrivateField:\n \"Classes may not have a private field named '#constructor'.\",\n ConstructorIsAccessor: \"Class constructor may not be an accessor.\",\n ConstructorIsAsync: \"Constructor can't be an async function.\",\n ConstructorIsGenerator: \"Constructor can't be a generator.\",\n DeclarationMissingInitializer: ({\n kind,\n }: {\n kind: \"await using\" | \"const\" | \"destructuring\" | \"using\";\n }) => `Missing initializer in ${kind} declaration.`,\n DecoratorArgumentsOutsideParentheses:\n \"Decorator arguments must be moved inside parentheses: use '@(decorator(args))' instead of '@(decorator)(args)'.\",\n DecoratorBeforeExport:\n \"Decorators must be placed *before* the 'export' keyword. Remove the 'decoratorsBeforeExport: true' option to use the 'export @decorator class {}' syntax.\",\n DecoratorsBeforeAfterExport:\n \"Decorators can be placed *either* before or after the 'export' keyword, but not in both locations at the same time.\",\n DecoratorConstructor:\n \"Decorators can't be used with a constructor. Did you mean '@dec class { ... }'?\",\n DecoratorExportClass:\n \"Decorators must be placed *after* the 'export' keyword. Remove the 'decoratorsBeforeExport: false' option to use the '@decorator export class {}' syntax.\",\n DecoratorSemicolon: \"Decorators must not be followed by a semicolon.\",\n DecoratorStaticBlock: \"Decorators can't be used with a static block.\",\n DeferImportRequiresNamespace:\n 'Only `import defer * as x from \"./module\"` is valid.',\n DeletePrivateField: \"Deleting a private field is not allowed.\",\n DestructureNamedImport:\n \"ES2015 named imports do not destructure. Use another statement for destructuring after the import.\",\n DuplicateConstructor: \"Duplicate constructor in the same class.\",\n DuplicateDefaultExport: \"Only one default export allowed per module.\",\n DuplicateExport: ({ exportName }: { exportName: string }) =>\n `\\`${exportName}\\` has already been exported. Exported identifiers must be unique.`,\n DuplicateProto: \"Redefinition of __proto__ property.\",\n DuplicateRegExpFlags: \"Duplicate regular expression flag.\",\n DynamicImportPhaseRequiresImportExpressions: ({ phase }: { phase: string }) =>\n `'import.${phase}(...)' can only be parsed when using the 'createImportExpressions' option.`,\n ElementAfterRest: \"Rest element must be last element.\",\n EscapedCharNotAnIdentifier: \"Invalid Unicode escape.\",\n ExportBindingIsString: ({\n localName,\n exportName,\n }: {\n localName: string;\n exportName: string;\n }) =>\n `A string literal cannot be used as an exported binding without \\`from\\`.\\n- Did you mean \\`export { '${localName}' as '${exportName}' } from 'some-module'\\`?`,\n ExportDefaultFromAsIdentifier:\n \"'from' is not allowed as an identifier after 'export default'.\",\n\n ForInOfLoopInitializer: ({\n type,\n }: {\n type: \"ForInStatement\" | \"ForOfStatement\";\n }) =>\n `'${\n type === \"ForInStatement\" ? \"for-in\" : \"for-of\"\n }' loop variable declaration may not have an initializer.`,\n ForInUsing: \"For-in loop may not start with 'using' declaration.\",\n\n ForOfAsync: \"The left-hand side of a for-of loop may not be 'async'.\",\n ForOfLet: \"The left-hand side of a for-of loop may not start with 'let'.\",\n GeneratorInSingleStatementContext:\n \"Generators can only be declared at the top level or inside a block.\",\n\n IllegalBreakContinue: ({\n type,\n }: {\n type: \"BreakStatement\" | \"ContinueStatement\";\n }) => `Unsyntactic ${type === \"BreakStatement\" ? \"break\" : \"continue\"}.`,\n\n IllegalLanguageModeDirective:\n \"Illegal 'use strict' directive in function with non-simple parameter list.\",\n IllegalReturn: \"'return' outside of function.\",\n ImportAttributesUseAssert:\n \"The `assert` keyword in import attributes is deprecated and it has been replaced by the `with` keyword. You can enable the `deprecatedAssertSyntax: true` option in the import attributes plugin to suppress this error.\",\n ImportBindingIsString: ({ importName }: { importName: string }) =>\n `A string literal cannot be used as an imported binding.\\n- Did you mean \\`import { \"${importName}\" as foo }\\`?`,\n ImportCallArgumentTrailingComma:\n \"Trailing comma is disallowed inside import(...) arguments.\",\n ImportCallArity: ({ maxArgumentCount }: { maxArgumentCount: 1 | 2 }) =>\n `\\`import()\\` requires exactly ${\n maxArgumentCount === 1 ? \"one argument\" : \"one or two arguments\"\n }.`,\n ImportCallNotNewExpression: \"Cannot use new with import(...).\",\n ImportCallSpreadArgument: \"`...` is not allowed in `import()`.\",\n ImportJSONBindingNotDefault:\n \"A JSON module can only be imported with `default`.\",\n ImportReflectionHasAssertion: \"`import module x` cannot have assertions.\",\n ImportReflectionNotBinding:\n 'Only `import module x from \"./module\"` is valid.',\n IncompatibleRegExpUVFlags:\n \"The 'u' and 'v' regular expression flags cannot be enabled at the same time.\",\n InvalidBigIntLiteral: \"Invalid BigIntLiteral.\",\n InvalidCodePoint: \"Code point out of bounds.\",\n InvalidCoverInitializedName: \"Invalid shorthand property initializer.\",\n InvalidDecimal: \"Invalid decimal.\",\n InvalidDigit: ({ radix }: { radix: number }) =>\n `Expected number in radix ${radix}.`,\n InvalidEscapeSequence: \"Bad character escape sequence.\",\n InvalidEscapeSequenceTemplate: \"Invalid escape sequence in template.\",\n InvalidEscapedReservedWord: ({ reservedWord }: { reservedWord: string }) =>\n `Escape sequence in keyword ${reservedWord}.`,\n InvalidIdentifier: ({ identifierName }: { identifierName: string }) =>\n `Invalid identifier ${identifierName}.`,\n InvalidLhs: ({ ancestor }: { ancestor: LValAncestor }) =>\n `Invalid left-hand side in ${toNodeDescription(ancestor)}.`,\n InvalidLhsBinding: ({ ancestor }: { ancestor: LValAncestor }) =>\n `Binding invalid left-hand side in ${toNodeDescription(ancestor)}.`,\n InvalidLhsOptionalChaining: ({ ancestor }: { ancestor: LValAncestor }) =>\n `Invalid optional chaining in the left-hand side of ${toNodeDescription(\n ancestor,\n )}.`,\n InvalidNumber: \"Invalid number.\",\n InvalidOrMissingExponent:\n \"Floating-point numbers require a valid exponent after the 'e'.\",\n InvalidOrUnexpectedToken: ({ unexpected }: { unexpected: string }) =>\n `Unexpected character '${unexpected}'.`,\n InvalidParenthesizedAssignment: \"Invalid parenthesized assignment pattern.\",\n InvalidPrivateFieldResolution: ({\n identifierName,\n }: {\n identifierName: string;\n }) => `Private name #${identifierName} is not defined.`,\n InvalidPropertyBindingPattern: \"Binding member expression.\",\n InvalidRecordProperty:\n \"Only properties and spread elements are allowed in record definitions.\",\n InvalidRestAssignmentPattern: \"Invalid rest operator's argument.\",\n LabelRedeclaration: ({ labelName }: { labelName: string }) =>\n `Label '${labelName}' is already declared.`,\n LetInLexicalBinding: \"'let' is disallowed as a lexically bound name.\",\n LineTerminatorBeforeArrow: \"No line break is allowed before '=>'.\",\n MalformedRegExpFlags: \"Invalid regular expression flag.\",\n MissingClassName: \"A class name is required.\",\n MissingEqInAssignment:\n \"Only '=' operator can be used for specifying default value.\",\n MissingSemicolon: \"Missing semicolon.\",\n MissingPlugin: ({ missingPlugin }: { missingPlugin: [string] }) =>\n `This experimental syntax requires enabling the parser plugin: ${missingPlugin\n .map(name => JSON.stringify(name))\n .join(\", \")}.`,\n // FIXME: Would be nice to make this \"missingPlugins\" instead.\n // Also, seems like we can drop the \"(s)\" from the message and just make it \"s\".\n MissingOneOfPlugins: ({ missingPlugin }: { missingPlugin: string[] }) =>\n `This experimental syntax requires enabling one of the following parser plugin(s): ${missingPlugin\n .map(name => JSON.stringify(name))\n .join(\", \")}.`,\n MissingUnicodeEscape: \"Expecting Unicode escape sequence \\\\uXXXX.\",\n MixingCoalesceWithLogical:\n \"Nullish coalescing operator(??) requires parens when mixing with logical operators.\",\n ModuleAttributeDifferentFromType:\n \"The only accepted module attribute is `type`.\",\n ModuleAttributeInvalidValue:\n \"Only string literals are allowed as module attribute values.\",\n ModuleAttributesWithDuplicateKeys: ({ key }: { key: string }) =>\n `Duplicate key \"${key}\" is not allowed in module attributes.`,\n ModuleExportNameHasLoneSurrogate: ({\n surrogateCharCode,\n }: {\n surrogateCharCode: number;\n }) =>\n `An export name cannot include a lone surrogate, found '\\\\u${surrogateCharCode.toString(\n 16,\n )}'.`,\n ModuleExportUndefined: ({ localName }: { localName: string }) =>\n `Export '${localName}' is not defined.`,\n MultipleDefaultsInSwitch: \"Multiple default clauses.\",\n NewlineAfterThrow: \"Illegal newline after throw.\",\n NoCatchOrFinally: \"Missing catch or finally clause.\",\n NumberIdentifier: \"Identifier directly after number.\",\n NumericSeparatorInEscapeSequence:\n \"Numeric separators are not allowed inside unicode escape sequences or hex escape sequences.\",\n ObsoleteAwaitStar:\n \"'await*' has been removed from the async functions proposal. Use Promise.all() instead.\",\n OptionalChainingNoNew:\n \"Constructors in/after an Optional Chain are not allowed.\",\n OptionalChainingNoTemplate:\n \"Tagged Template Literals are not allowed in optionalChain.\",\n OverrideOnConstructor:\n \"'override' modifier cannot appear on a constructor declaration.\",\n ParamDupe: \"Argument name clash.\",\n PatternHasAccessor: \"Object pattern can't contain getter or setter.\",\n PatternHasMethod: \"Object pattern can't contain methods.\",\n PrivateInExpectedIn: ({ identifierName }: { identifierName: string }) =>\n `Private names are only allowed in property accesses (\\`obj.#${identifierName}\\`) or in \\`in\\` expressions (\\`#${identifierName} in obj\\`).`,\n PrivateNameRedeclaration: ({ identifierName }: { identifierName: string }) =>\n `Duplicate private name #${identifierName}.`,\n RecordExpressionBarIncorrectEndSyntaxType:\n \"Record expressions ending with '|}' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.\",\n RecordExpressionBarIncorrectStartSyntaxType:\n \"Record expressions starting with '{|' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.\",\n RecordExpressionHashIncorrectStartSyntaxType:\n \"Record expressions starting with '#{' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'hash'.\",\n RecordNoProto: \"'__proto__' is not allowed in Record expressions.\",\n RestTrailingComma: \"Unexpected trailing comma after rest element.\",\n SloppyFunction:\n \"In non-strict mode code, functions can only be declared at top level or inside a block.\",\n SloppyFunctionAnnexB:\n \"In non-strict mode code, functions can only be declared at top level, inside a block, or as the body of an if statement.\",\n SourcePhaseImportRequiresDefault:\n 'Only `import source x from \"./module\"` is valid.',\n StaticPrototype: \"Classes may not have static property named prototype.\",\n SuperNotAllowed:\n \"`super()` is only valid inside a class constructor of a subclass. Maybe a typo in the method name ('constructor') or not extending another class?\",\n SuperPrivateField: \"Private fields can't be accessed on super.\",\n TrailingDecorator: \"Decorators must be attached to a class element.\",\n TupleExpressionBarIncorrectEndSyntaxType:\n \"Tuple expressions ending with '|]' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.\",\n TupleExpressionBarIncorrectStartSyntaxType:\n \"Tuple expressions starting with '[|' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.\",\n TupleExpressionHashIncorrectStartSyntaxType:\n \"Tuple expressions starting with '#[' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'hash'.\",\n UnexpectedArgumentPlaceholder: \"Unexpected argument placeholder.\",\n UnexpectedAwaitAfterPipelineBody:\n 'Unexpected \"await\" after pipeline body; await must have parentheses in minimal proposal.',\n UnexpectedDigitAfterHash: \"Unexpected digit after hash token.\",\n UnexpectedImportExport:\n \"'import' and 'export' may only appear at the top level.\",\n UnexpectedKeyword: ({ keyword }: { keyword: string }) =>\n `Unexpected keyword '${keyword}'.`,\n UnexpectedLeadingDecorator:\n \"Leading decorators must be attached to a class declaration.\",\n UnexpectedLexicalDeclaration:\n \"Lexical declaration cannot appear in a single-statement context.\",\n UnexpectedNewTarget:\n \"`new.target` can only be used in functions or class properties.\",\n UnexpectedNumericSeparator:\n \"A numeric separator is only allowed between two digits.\",\n UnexpectedPrivateField: \"Unexpected private name.\",\n UnexpectedReservedWord: ({ reservedWord }: { reservedWord: string }) =>\n `Unexpected reserved word '${reservedWord}'.`,\n UnexpectedSuper: \"'super' is only allowed in object methods and classes.\",\n UnexpectedToken: ({\n expected,\n unexpected,\n }: {\n expected?: string | null;\n unexpected?: string | null;\n }) =>\n `Unexpected token${unexpected ? ` '${unexpected}'.` : \"\"}${\n expected ? `, expected \"${expected}\"` : \"\"\n }`,\n UnexpectedTokenUnaryExponentiation:\n \"Illegal expression. Wrap left hand side or entire exponentiation in parentheses.\",\n UnexpectedUsingDeclaration:\n \"Using declaration cannot appear in the top level when source type is `script`.\",\n UnsupportedBind: \"Binding should be performed on object property.\",\n UnsupportedDecoratorExport:\n \"A decorated export must export a class declaration.\",\n UnsupportedDefaultExport:\n \"Only expressions, functions or classes are allowed as the `default` export.\",\n UnsupportedImport:\n \"`import` can only be used in `import()` or `import.meta`.\",\n UnsupportedMetaProperty: ({\n target,\n onlyValidPropertyName,\n }: {\n target: string;\n onlyValidPropertyName: string;\n }) =>\n `The only valid meta property for ${target} is ${target}.${onlyValidPropertyName}.`,\n UnsupportedParameterDecorator:\n \"Decorators cannot be used to decorate parameters.\",\n UnsupportedPropertyDecorator:\n \"Decorators cannot be used to decorate object literal properties.\",\n UnsupportedSuper:\n \"'super' can only be used with function calls (i.e. super()) or in property accesses (i.e. super.prop or super[prop]).\",\n UnterminatedComment: \"Unterminated comment.\",\n UnterminatedRegExp: \"Unterminated regular expression.\",\n UnterminatedString: \"Unterminated string constant.\",\n UnterminatedTemplate: \"Unterminated template.\",\n UsingDeclarationExport: \"Using declaration cannot be exported.\",\n UsingDeclarationHasBindingPattern:\n \"Using declaration cannot have destructuring patterns.\",\n VarRedeclaration: ({ identifierName }: { identifierName: string }) =>\n `Identifier '${identifierName}' has already been declared.`,\n YieldBindingIdentifier:\n \"Can not use 'yield' as identifier inside a generator.\",\n YieldInParameter: \"Yield expression is not allowed in formal parameters.\",\n ZeroDigitNumericSeparator:\n \"Numeric separator can not be used after leading 0.\",\n} satisfies ParseErrorTemplates;\n","import type { ParseErrorTemplates } from \"../parse-error\";\n\nexport default {\n StrictDelete: \"Deleting local variable in strict mode.\",\n\n // `referenceName` is the StringValue[1] of an IdentifierReference[2], which\n // is represented as just an `Identifier`[3] in the Babel AST.\n // 1. https://tc39.es/ecma262/#sec-static-semantics-stringvalue\n // 2. https://tc39.es/ecma262/#prod-IdentifierReference\n // 3. https://github.com/babel/babel/blob/main/packages/babel-parser/ast/spec.md#identifier\n StrictEvalArguments: ({ referenceName }: { referenceName: string }) =>\n `Assigning to '${referenceName}' in strict mode.`,\n\n // `bindingName` is the StringValue[1] of a BindingIdentifier[2], which is\n // represented as just an `Identifier`[3] in the Babel AST.\n // 1. https://tc39.es/ecma262/#sec-static-semantics-stringvalue\n // 2. https://tc39.es/ecma262/#prod-BindingIdentifier\n // 3. https://github.com/babel/babel/blob/main/packages/babel-parser/ast/spec.md#identifier\n StrictEvalArgumentsBinding: ({ bindingName }: { bindingName: string }) =>\n `Binding '${bindingName}' in strict mode.`,\n\n StrictFunction:\n \"In strict mode code, functions can only be declared at top level or inside a block.\",\n\n StrictNumericEscape: \"The only valid numeric escape in strict mode is '\\\\0'.\",\n\n StrictOctalLiteral: \"Legacy octal literals are not allowed in strict mode.\",\n\n StrictWith: \"'with' in strict mode.\",\n} satisfies ParseErrorTemplates;\n","import type { ParseErrorTemplates } from \"../parse-error.ts\";\nimport toNodeDescription from \"./to-node-description.ts\";\n\nexport const UnparenthesizedPipeBodyDescriptions = new Set([\n \"ArrowFunctionExpression\",\n \"AssignmentExpression\",\n \"ConditionalExpression\",\n \"YieldExpression\",\n] as const);\n\ntype GetSetMemberType> =\n T extends Set ? M : unknown;\n\nexport type UnparenthesizedPipeBodyTypes = GetSetMemberType<\n typeof UnparenthesizedPipeBodyDescriptions\n>;\n\nexport default {\n // This error is only used by the smart-mix proposal\n PipeBodyIsTighter:\n \"Unexpected yield after pipeline body; any yield expression acting as Hack-style pipe body must be parenthesized due to its loose operator precedence.\",\n PipeTopicRequiresHackPipes:\n 'Topic reference is used, but the pipelineOperator plugin was not passed a \"proposal\": \"hack\" or \"smart\" option.',\n PipeTopicUnbound:\n \"Topic reference is unbound; it must be inside a pipe body.\",\n PipeTopicUnconfiguredToken: ({ token }: { token: string }) =>\n `Invalid topic token ${token}. In order to use ${token} as a topic reference, the pipelineOperator plugin must be configured with { \"proposal\": \"hack\", \"topicToken\": \"${token}\" }.`,\n PipeTopicUnused:\n \"Hack-style pipe body does not contain a topic reference; Hack-style pipes must use topic at least once.\",\n PipeUnparenthesizedBody: ({ type }: { type: UnparenthesizedPipeBodyTypes }) =>\n `Hack-style pipe body cannot be an unparenthesized ${toNodeDescription({\n type,\n })}; please wrap it in parentheses.`,\n\n // Messages whose codes start with “Pipeline” or “PrimaryTopic”\n // are retained for backwards compatibility\n // with the deprecated smart-mix pipe operator proposal plugin.\n // They are subject to removal in a future major version.\n PipelineBodyNoArrow:\n 'Unexpected arrow \"=>\" after pipeline body; arrow function in pipeline body must be parenthesized.',\n PipelineBodySequenceExpression:\n \"Pipeline body may not be a comma-separated sequence expression.\",\n PipelineHeadSequenceExpression:\n \"Pipeline head should not be a comma-separated sequence expression.\",\n PipelineTopicUnused:\n \"Pipeline is in topic style but does not use topic reference.\",\n PrimaryTopicNotAllowed:\n \"Topic reference was used in a lexical context without topic binding.\",\n PrimaryTopicRequiresSmartPipeline:\n 'Topic reference is used, but the pipelineOperator plugin was not passed a \"proposal\": \"hack\" or \"smart\" option.',\n} satisfies ParseErrorTemplates;\n","import { Position } from \"./util/location.ts\";\n\ntype SyntaxPlugin =\n | \"flow\"\n | \"typescript\"\n | \"jsx\"\n | \"pipelineOperator\"\n | \"placeholders\";\n\ntype ParseErrorCode =\n | \"BABEL_PARSER_SYNTAX_ERROR\"\n | \"BABEL_PARSER_SOURCETYPE_MODULE_REQUIRED\";\n\n// Babel uses \"normal\" SyntaxErrors for it's errors, but adds some extra\n// functionality. This functionality is defined in the\n// `ParseErrorSpecification` interface below. We may choose to change to someday\n// give our errors their own full-blown class, but until then this allow us to\n// keep all the desirable properties of SyntaxErrors (like their name in stack\n// traces, etc.), and also allows us to punt on any publicly facing\n// class-hierarchy decisions until Babel 8.\ninterface ParseErrorSpecification {\n // Look, these *could* be readonly, but then Flow complains when we initially\n // set them. We could do a whole dance and make a special interface that's not\n // readonly for when we create the error, then cast it to the readonly\n // interface for public use, but the previous implementation didn't have them\n // as readonly, so let's just not worry about it for now.\n code: ParseErrorCode;\n reasonCode: string;\n syntaxPlugin?: SyntaxPlugin;\n missingPlugin?: string | string[];\n loc: Position;\n details: ErrorDetails;\n\n // We should consider removing this as it now just contains the same\n // information as `loc.index`.\n pos: number;\n}\n\nexport type ParseError = SyntaxError &\n ParseErrorSpecification;\n\n// By `ParseErrorConstructor`, we mean something like the new-less style\n// `ErrorConstructor`[1], since `ParseError`'s are not themselves actually\n// separate classes from `SyntaxError`'s.\n//\n// 1. https://github.com/microsoft/TypeScript/blob/v4.5.5/lib/lib.es5.d.ts#L1027\nexport type ParseErrorConstructor = (\n loc: Position,\n details: ErrorDetails,\n) => ParseError;\n\ntype ToMessage = (self: ErrorDetails) => string;\n\ntype ParseErrorCredentials = {\n code: string;\n reasonCode: string;\n syntaxPlugin?: SyntaxPlugin;\n toMessage: ToMessage;\n};\n\nfunction defineHidden(obj: object, key: string, value: unknown) {\n Object.defineProperty(obj, key, {\n enumerable: false,\n configurable: true,\n value,\n });\n}\n\nfunction toParseErrorConstructor({\n toMessage,\n code,\n reasonCode,\n syntaxPlugin,\n}: ParseErrorCredentials): ParseErrorConstructor {\n const hasMissingPlugin =\n reasonCode === \"MissingPlugin\" || reasonCode === \"MissingOneOfPlugins\";\n\n if (!process.env.BABEL_8_BREAKING) {\n const oldReasonCodes: Record = {\n AccessorCannotDeclareThisParameter: \"AccesorCannotDeclareThisParameter\",\n AccessorCannotHaveTypeParameters: \"AccesorCannotHaveTypeParameters\",\n ConstInitializerMustBeStringOrNumericLiteralOrLiteralEnumReference:\n \"ConstInitiailizerMustBeStringOrNumericLiteralOrLiteralEnumReference\",\n SetAccessorCannotHaveOptionalParameter:\n \"SetAccesorCannotHaveOptionalParameter\",\n SetAccessorCannotHaveRestParameter: \"SetAccesorCannotHaveRestParameter\",\n SetAccessorCannotHaveReturnType: \"SetAccesorCannotHaveReturnType\",\n };\n if (oldReasonCodes[reasonCode]) {\n reasonCode = oldReasonCodes[reasonCode];\n }\n }\n\n return function constructor(loc: Position, details: ErrorDetails) {\n const error: ParseError = new SyntaxError() as any;\n\n error.code = code as ParseErrorCode;\n error.reasonCode = reasonCode;\n error.loc = loc;\n error.pos = loc.index;\n\n error.syntaxPlugin = syntaxPlugin;\n if (hasMissingPlugin) {\n error.missingPlugin = (details as any).missingPlugin;\n }\n\n type Overrides = {\n loc?: Position;\n details?: ErrorDetails;\n };\n defineHidden(error, \"clone\", function clone(overrides: Overrides = {}) {\n const { line, column, index } = overrides.loc ?? loc;\n return constructor(new Position(line, column, index), {\n ...details,\n ...overrides.details,\n });\n });\n\n defineHidden(error, \"details\", details);\n\n Object.defineProperty(error, \"message\", {\n configurable: true,\n get(this: ParseError): string {\n const message = `${toMessage(details)} (${loc.line}:${loc.column})`;\n this.message = message;\n return message;\n },\n set(value: string) {\n Object.defineProperty(this, \"message\", { value, writable: true });\n },\n });\n\n return error;\n };\n}\n\ntype ParseErrorTemplate =\n | string\n | ToMessage\n | { message: string | ToMessage; code?: ParseErrorCode };\n\nexport type ParseErrorTemplates = { [reasonCode: string]: ParseErrorTemplate };\n\n// This is the templated form of `ParseErrorEnum`.\n//\n// Note: We could factor out the return type calculation into something like\n// `ParseErrorConstructor`, and then we could\n// reuse it in the non-templated form of `ParseErrorEnum`, but TypeScript\n// doesn't seem to drill down that far when showing you the computed type of\n// an object in an editor, so we'll leave it inlined for now.\nexport function ParseErrorEnum(a: TemplateStringsArray): <\n T extends ParseErrorTemplates,\n>(\n parseErrorTemplates: T,\n) => {\n [K in keyof T]: ParseErrorConstructor<\n T[K] extends { message: string | ToMessage }\n ? T[K][\"message\"] extends ToMessage\n ? Parameters[0]\n : object\n : T[K] extends ToMessage\n ? Parameters[0]\n : object\n >;\n};\n\nexport function ParseErrorEnum(\n parseErrorTemplates: T,\n syntaxPlugin?: SyntaxPlugin,\n): {\n [K in keyof T]: ParseErrorConstructor<\n T[K] extends { message: string | ToMessage }\n ? T[K][\"message\"] extends ToMessage\n ? Parameters[0]\n : object\n : T[K] extends ToMessage\n ? Parameters[0]\n : object\n >;\n};\n\n// You call `ParseErrorEnum` with a mapping from `ReasonCode`'s to either:\n//\n// 1. a static error message,\n// 2. `toMessage` functions that define additional necessary `details` needed by\n// the `ParseError`, or\n// 3. Objects that contain a `message` of one of the above and overridden `code`\n// and/or `reasonCode`:\n//\n// ParseErrorEnum `optionalSyntaxPlugin` ({\n// ErrorWithStaticMessage: \"message\",\n// ErrorWithDynamicMessage: ({ type } : { type: string }) => `${type}`),\n// ErrorWithOverriddenCodeAndOrReasonCode: {\n// message: ({ type }: { type: string }) => `${type}`),\n// code: \"AN_ERROR_CODE\",\n// ...(BABEL_8_BREAKING ? { } : { reasonCode: \"CustomErrorReasonCode\" })\n// }\n// });\n//\nexport function ParseErrorEnum(\n argument: TemplateStringsArray | ParseErrorTemplates,\n syntaxPlugin?: SyntaxPlugin,\n) {\n // If the first parameter is an array, that means we were called with a tagged\n // template literal. Extract the syntaxPlugin from this, and call again in\n // the \"normalized\" form.\n if (Array.isArray(argument)) {\n return (parseErrorTemplates: ParseErrorTemplates) =>\n ParseErrorEnum(parseErrorTemplates, argument[0]);\n }\n\n const ParseErrorConstructors = {} as Record<\n string,\n ParseErrorConstructor\n >;\n\n for (const reasonCode of Object.keys(argument)) {\n const template = (argument as ParseErrorTemplates)[reasonCode];\n const { message, ...rest } =\n typeof template === \"string\"\n ? { message: () => template }\n : typeof template === \"function\"\n ? { message: template }\n : template;\n const toMessage = typeof message === \"string\" ? () => message : message;\n\n ParseErrorConstructors[reasonCode] = toParseErrorConstructor({\n code: \"BABEL_PARSER_SYNTAX_ERROR\",\n reasonCode,\n toMessage,\n ...(syntaxPlugin ? { syntaxPlugin } : {}),\n ...rest,\n });\n }\n\n return ParseErrorConstructors;\n}\n\nimport ModuleErrors from \"./parse-error/module-errors.ts\";\nimport StandardErrors from \"./parse-error/standard-errors.ts\";\nimport StrictModeErrors from \"./parse-error/strict-mode-errors.ts\";\nimport PipelineOperatorErrors from \"./parse-error/pipeline-operator-errors.ts\";\n\nexport const Errors = {\n ...ParseErrorEnum(ModuleErrors),\n ...ParseErrorEnum(StandardErrors),\n ...ParseErrorEnum(StrictModeErrors),\n ...ParseErrorEnum`pipelineOperator`(PipelineOperatorErrors),\n};\n\nexport type { LValAncestor } from \"./parse-error/standard-errors.ts\";\n","import type { TokenType } from \"../tokenizer/types.ts\";\nimport type Parser from \"../parser/index.ts\";\nimport type { ExpressionErrors } from \"../parser/util.ts\";\nimport type * as N from \"../types.ts\";\nimport type { Node as NodeType, NodeBase, File } from \"../types.ts\";\nimport type { Position } from \"../util/location.ts\";\nimport { Errors } from \"../parse-error.ts\";\nimport type { Undone } from \"../parser/node.ts\";\nimport type { BindingFlag } from \"../util/scopeflags.ts\";\n\nconst { defineProperty } = Object;\nconst toUnenumerable = (object: any, key: string) => {\n if (object) {\n defineProperty(object, key, { enumerable: false, value: object[key] });\n }\n};\n\nfunction toESTreeLocation(node: any) {\n toUnenumerable(node.loc.start, \"index\");\n toUnenumerable(node.loc.end, \"index\");\n\n return node;\n}\n\nexport default (superClass: typeof Parser) =>\n class ESTreeParserMixin extends superClass implements Parser {\n parse(): File {\n const file = toESTreeLocation(super.parse());\n\n if (this.options.tokens) {\n file.tokens = file.tokens.map(toESTreeLocation);\n }\n\n return file;\n }\n\n // @ts-expect-error ESTree plugin changes node types\n parseRegExpLiteral({ pattern, flags }): N.EstreeRegExpLiteral {\n let regex: RegExp | null = null;\n try {\n regex = new RegExp(pattern, flags);\n } catch (_) {\n // In environments that don't support these flags value will\n // be null as the regex can't be represented natively.\n }\n const node = this.estreeParseLiteral(regex);\n node.regex = { pattern, flags };\n\n return node;\n }\n\n // @ts-expect-error ESTree plugin changes node types\n parseBigIntLiteral(value: any): N.Node {\n // https://github.com/estree/estree/blob/master/es2020.md#bigintliteral\n let bigInt: bigint | null;\n try {\n bigInt = BigInt(value);\n } catch {\n bigInt = null;\n }\n const node = this.estreeParseLiteral(bigInt);\n node.bigint = String(node.value || value);\n\n return node;\n }\n\n // @ts-expect-error ESTree plugin changes node types\n parseDecimalLiteral(value: any): N.Node {\n // https://github.com/estree/estree/blob/master/experimental/decimal.md\n // todo: use BigDecimal when node supports it.\n const decimal: null = null;\n const node = this.estreeParseLiteral(decimal);\n node.decimal = String(node.value || value);\n\n return node;\n }\n\n estreeParseLiteral(value: any) {\n // @ts-expect-error ESTree plugin changes node types\n return this.parseLiteral(value, \"Literal\");\n }\n\n // @ts-expect-error ESTree plugin changes node types\n parseStringLiteral(value: any): N.Node {\n return this.estreeParseLiteral(value);\n }\n\n parseNumericLiteral(value: any): any {\n return this.estreeParseLiteral(value);\n }\n\n // @ts-expect-error ESTree plugin changes node types\n parseNullLiteral(): N.Node {\n return this.estreeParseLiteral(null);\n }\n\n parseBooleanLiteral(value: boolean): N.BooleanLiteral {\n // @ts-expect-error ESTree plugin changes node types\n return this.estreeParseLiteral(value);\n }\n\n // Cast a Directive to an ExpressionStatement. Mutates the input Directive.\n directiveToStmt(directive: N.Directive): N.ExpressionStatement {\n const expression = directive.value as any as N.EstreeLiteral;\n delete directive.value;\n\n expression.type = \"Literal\";\n // @ts-expect-error N.EstreeLiteral.raw is not defined.\n expression.raw = expression.extra.raw;\n expression.value = expression.extra.expressionValue;\n\n const stmt = directive as any as N.ExpressionStatement;\n stmt.type = \"ExpressionStatement\";\n stmt.expression = expression;\n // @ts-expect-error N.ExpressionStatement.directive is not defined\n stmt.directive = expression.extra.rawValue;\n\n delete expression.extra;\n\n return stmt;\n }\n\n // ==================================\n // Overrides\n // ==================================\n\n initFunction(node: N.BodilessFunctionOrMethodBase, isAsync: boolean): void {\n super.initFunction(node, isAsync);\n node.expression = false;\n }\n\n checkDeclaration(node: N.Pattern | N.ObjectProperty): void {\n if (node != null && this.isObjectProperty(node)) {\n // @ts-expect-error plugin typings\n this.checkDeclaration((node as unknown as N.EstreeProperty).value);\n } else {\n super.checkDeclaration(node);\n }\n }\n\n getObjectOrClassMethodParams(method: N.ObjectMethod | N.ClassMethod) {\n return (method as unknown as N.EstreeMethodDefinition).value.params;\n }\n\n isValidDirective(stmt: N.Statement): boolean {\n return (\n stmt.type === \"ExpressionStatement\" &&\n stmt.expression.type === \"Literal\" &&\n typeof stmt.expression.value === \"string\" &&\n !stmt.expression.extra?.parenthesized\n );\n }\n\n parseBlockBody(\n node: N.BlockStatementLike,\n allowDirectives: boolean | undefined | null,\n topLevel: boolean,\n end: TokenType,\n afterBlockParse?: (hasStrictModeDirective: boolean) => void,\n ): void {\n super.parseBlockBody(\n node,\n allowDirectives,\n topLevel,\n end,\n afterBlockParse,\n );\n\n const directiveStatements = node.directives.map(d =>\n this.directiveToStmt(d),\n );\n // @ts-expect-error estree plugin typings\n node.body = directiveStatements.concat(node.body);\n delete node.directives;\n }\n\n pushClassMethod(\n classBody: N.ClassBody,\n method: N.ClassMethod,\n isGenerator: boolean,\n isAsync: boolean,\n isConstructor: boolean,\n allowsDirectSuper: boolean,\n ): void {\n this.parseMethod(\n method,\n isGenerator,\n isAsync,\n isConstructor,\n allowsDirectSuper,\n \"ClassMethod\",\n true,\n );\n if (method.typeParameters) {\n // @ts-expect-error mutate AST types\n method.value.typeParameters = method.typeParameters;\n delete method.typeParameters;\n }\n classBody.body.push(method);\n }\n\n parsePrivateName(): any {\n const node = super.parsePrivateName();\n if (!process.env.BABEL_8_BREAKING) {\n if (!this.getPluginOption(\"estree\", \"classFeatures\")) {\n return node;\n }\n }\n return this.convertPrivateNameToPrivateIdentifier(node);\n }\n\n convertPrivateNameToPrivateIdentifier(\n node: N.PrivateName,\n ): N.EstreePrivateIdentifier {\n const name = super.getPrivateNameSV(node);\n node = node as any;\n delete node.id;\n // @ts-expect-error mutate AST types\n node.name = name;\n // @ts-expect-error mutate AST types\n node.type = \"PrivateIdentifier\";\n return node as unknown as N.EstreePrivateIdentifier;\n }\n\n // @ts-expect-error ESTree plugin changes node types\n isPrivateName(node: N.Node): node is N.EstreePrivateIdentifier {\n if (!process.env.BABEL_8_BREAKING) {\n if (!this.getPluginOption(\"estree\", \"classFeatures\")) {\n return super.isPrivateName(node);\n }\n }\n return node.type === \"PrivateIdentifier\";\n }\n\n // @ts-expect-error ESTree plugin changes node types\n getPrivateNameSV(node: N.EstreePrivateIdentifier): string {\n if (!process.env.BABEL_8_BREAKING) {\n if (!this.getPluginOption(\"estree\", \"classFeatures\")) {\n return super.getPrivateNameSV(node as unknown as N.PrivateName);\n }\n }\n return node.name;\n }\n\n // @ts-expect-error plugin may override interfaces\n parseLiteral(value: any, type: T[\"type\"]): T {\n const node = super.parseLiteral(value, type);\n // @ts-expect-error mutating AST types\n node.raw = node.extra.raw;\n delete node.extra;\n\n return node;\n }\n\n parseFunctionBody(\n node: N.Function,\n allowExpression?: boolean | null,\n isMethod: boolean = false,\n ): void {\n super.parseFunctionBody(node, allowExpression, isMethod);\n node.expression = node.body.type !== \"BlockStatement\";\n }\n\n // @ts-expect-error plugin may override interfaces\n parseMethod<\n T extends N.ClassPrivateMethod | N.ObjectMethod | N.ClassMethod,\n >(\n node: Undone,\n isGenerator: boolean,\n isAsync: boolean,\n isConstructor: boolean,\n allowDirectSuper: boolean,\n type: T[\"type\"],\n inClassScope: boolean = false,\n ): N.EstreeMethodDefinition {\n let funcNode = this.startNode();\n funcNode.kind = node.kind; // provide kind, so super method correctly sets state\n funcNode = super.parseMethod(\n // @ts-expect-error todo(flow->ts)\n funcNode,\n isGenerator,\n isAsync,\n isConstructor,\n allowDirectSuper,\n type,\n inClassScope,\n );\n // @ts-expect-error mutate AST types\n funcNode.type = \"FunctionExpression\";\n delete funcNode.kind;\n // @ts-expect-error mutate AST types\n node.value = funcNode;\n if (type === \"ClassPrivateMethod\") {\n node.computed = false;\n }\n return this.finishNode(\n // @ts-expect-error cast methods to estree types\n node as Undone,\n \"MethodDefinition\",\n );\n }\n\n nameIsConstructor(key: N.Expression | N.PrivateName): boolean {\n if (key.type === \"Literal\") return key.value === \"constructor\";\n return super.nameIsConstructor(key);\n }\n\n parseClassProperty(...args: [N.ClassProperty]): any {\n const propertyNode = super.parseClassProperty(...args) as any;\n if (!process.env.BABEL_8_BREAKING) {\n if (!this.getPluginOption(\"estree\", \"classFeatures\")) {\n return propertyNode as N.EstreePropertyDefinition;\n }\n }\n propertyNode.type = \"PropertyDefinition\";\n return propertyNode as N.EstreePropertyDefinition;\n }\n\n parseClassPrivateProperty(...args: [N.ClassPrivateProperty]): any {\n const propertyNode = super.parseClassPrivateProperty(...args) as any;\n if (!process.env.BABEL_8_BREAKING) {\n if (!this.getPluginOption(\"estree\", \"classFeatures\")) {\n return propertyNode as N.EstreePropertyDefinition;\n }\n }\n propertyNode.type = \"PropertyDefinition\";\n propertyNode.computed = false;\n return propertyNode as N.EstreePropertyDefinition;\n }\n\n parseObjectMethod(\n prop: N.ObjectMethod,\n isGenerator: boolean,\n isAsync: boolean,\n isPattern: boolean,\n isAccessor: boolean,\n ): N.ObjectMethod | undefined | null {\n const node: N.EstreeProperty = super.parseObjectMethod(\n prop,\n isGenerator,\n isAsync,\n isPattern,\n isAccessor,\n ) as any;\n\n if (node) {\n node.type = \"Property\";\n if ((node as any as N.ClassMethod).kind === \"method\") {\n node.kind = \"init\";\n }\n node.shorthand = false;\n }\n\n return node as any;\n }\n\n parseObjectProperty(\n prop: N.ObjectProperty,\n startLoc: Position | undefined | null,\n isPattern: boolean,\n refExpressionErrors?: ExpressionErrors | null,\n ): N.ObjectProperty | undefined | null {\n const node: N.EstreeProperty = super.parseObjectProperty(\n prop,\n startLoc,\n isPattern,\n refExpressionErrors,\n ) as any;\n\n if (node) {\n node.kind = \"init\";\n node.type = \"Property\";\n }\n\n return node as any;\n }\n\n isValidLVal(\n type: string,\n isUnparenthesizedInAssign: boolean,\n binding: BindingFlag,\n ) {\n return type === \"Property\"\n ? \"value\"\n : super.isValidLVal(type, isUnparenthesizedInAssign, binding);\n }\n\n isAssignable(node: N.Node, isBinding?: boolean): boolean {\n if (node != null && this.isObjectProperty(node)) {\n return this.isAssignable(node.value, isBinding);\n }\n return super.isAssignable(node, isBinding);\n }\n\n toAssignable(node: N.Node, isLHS: boolean = false): void {\n if (node != null && this.isObjectProperty(node)) {\n const { key, value } = node;\n if (this.isPrivateName(key)) {\n this.classScope.usePrivateName(\n this.getPrivateNameSV(key),\n key.loc.start,\n );\n }\n this.toAssignable(value, isLHS);\n } else {\n super.toAssignable(node, isLHS);\n }\n }\n\n toAssignableObjectExpressionProp(\n prop: N.Node,\n isLast: boolean,\n isLHS: boolean,\n ) {\n if (\n prop.type === \"Property\" &&\n (prop.kind === \"get\" || prop.kind === \"set\")\n ) {\n this.raise(Errors.PatternHasAccessor, prop.key);\n } else if (prop.type === \"Property\" && prop.method) {\n this.raise(Errors.PatternHasMethod, prop.key);\n } else {\n super.toAssignableObjectExpressionProp(prop, isLast, isLHS);\n }\n }\n\n finishCallExpression(\n unfinished: Undone,\n optional: boolean,\n ): T {\n const node = super.finishCallExpression(unfinished, optional);\n\n if (node.callee.type === \"Import\") {\n (node as N.Node as N.EstreeImportExpression).type = \"ImportExpression\";\n (node as N.Node as N.EstreeImportExpression).source = node\n .arguments[0] as N.Expression;\n if (\n this.hasPlugin(\"importAttributes\") ||\n this.hasPlugin(\"importAssertions\")\n ) {\n (node as N.Node as N.EstreeImportExpression).options =\n (node.arguments[1] as N.Expression) ?? null;\n // compatibility with previous ESTree AST\n (node as N.Node as N.EstreeImportExpression).attributes =\n (node.arguments[1] as N.Expression) ?? null;\n }\n // arguments isn't optional in the type definition\n delete node.arguments;\n // callee isn't optional in the type definition\n delete node.callee;\n }\n\n return node;\n }\n\n toReferencedArguments(\n node:\n | N.CallExpression\n | N.OptionalCallExpression\n | N.EstreeImportExpression,\n /* isParenthesizedExpr?: boolean, */\n ) {\n // ImportExpressions do not have an arguments array.\n if (node.type === \"ImportExpression\") {\n return;\n }\n\n super.toReferencedArguments(node);\n }\n\n parseExport(\n unfinished: Undone,\n decorators: N.Decorator[] | null,\n ) {\n const exportStartLoc = this.state.lastTokStartLoc;\n const node = super.parseExport(unfinished, decorators);\n\n switch (node.type) {\n case \"ExportAllDeclaration\":\n // @ts-expect-error mutating AST types\n node.exported = null;\n break;\n\n case \"ExportNamedDeclaration\":\n if (\n node.specifiers.length === 1 &&\n node.specifiers[0].type === \"ExportNamespaceSpecifier\"\n ) {\n // @ts-expect-error mutating AST types\n node.type = \"ExportAllDeclaration\";\n // @ts-expect-error mutating AST types\n node.exported = node.specifiers[0].exported;\n delete node.specifiers;\n }\n\n // fallthrough\n case \"ExportDefaultDeclaration\":\n {\n const { declaration } = node;\n if (\n declaration?.type === \"ClassDeclaration\" &&\n declaration.decorators?.length > 0 &&\n // decorator comes before export\n declaration.start === node.start\n ) {\n this.resetStartLocation(\n node,\n // For compatibility with ESLint's keyword-spacing rule, which assumes that an\n // export declaration must start with export.\n // https://github.com/babel/babel/issues/15085\n // Here we reset export declaration's start to be the start of the export token\n exportStartLoc,\n );\n }\n }\n\n break;\n }\n\n return node;\n }\n\n parseSubscript(\n base: N.Expression,\n startLoc: Position,\n noCalls: boolean | undefined | null,\n state: N.ParseSubscriptState,\n ): N.Expression {\n const node = super.parseSubscript(base, startLoc, noCalls, state);\n\n if (state.optionalChainMember) {\n // https://github.com/estree/estree/blob/master/es2020.md#chainexpression\n if (\n node.type === \"OptionalMemberExpression\" ||\n node.type === \"OptionalCallExpression\"\n ) {\n // strip Optional prefix\n (node as unknown as N.CallExpression | N.MemberExpression).type =\n node.type.substring(8) as \"CallExpression\" | \"MemberExpression\";\n }\n if (state.stop) {\n const chain = this.startNodeAtNode(node);\n chain.expression = node;\n return this.finishNode(chain, \"ChainExpression\");\n }\n } else if (\n node.type === \"MemberExpression\" ||\n node.type === \"CallExpression\"\n ) {\n // @ts-expect-error not in the type definitions\n node.optional = false;\n }\n\n return node;\n }\n\n isOptionalMemberExpression(node: N.Node) {\n if (node.type === \"ChainExpression\") {\n return node.expression.type === \"MemberExpression\";\n }\n return super.isOptionalMemberExpression(node);\n }\n\n hasPropertyAsPrivateName(node: N.Node): boolean {\n if (node.type === \"ChainExpression\") {\n node = node.expression;\n }\n return super.hasPropertyAsPrivateName(node);\n }\n\n // @ts-expect-error ESTree plugin changes node types\n isObjectProperty(node: N.Node): node is N.EstreeProperty {\n return node.type === \"Property\" && node.kind === \"init\" && !node.method;\n }\n\n // @ts-expect-error ESTree plugin changes node types\n isObjectMethod(node: N.Node): node is N.EstreeProperty {\n return (\n node.type === \"Property\" &&\n (node.method || node.kind === \"get\" || node.kind === \"set\")\n );\n }\n\n finishNodeAt(\n node: Undone,\n type: T[\"type\"],\n endLoc: Position,\n ): T {\n return toESTreeLocation(super.finishNodeAt(node, type, endLoc));\n }\n\n resetStartLocation(node: N.Node, startLoc: Position) {\n super.resetStartLocation(node, startLoc);\n toESTreeLocation(node);\n }\n\n resetEndLocation(\n node: NodeBase,\n endLoc: Position = this.state.lastTokEndLoc,\n ): void {\n super.resetEndLocation(node, endLoc);\n toESTreeLocation(node);\n }\n };\n","// The token context is used in JSX plugin to track\n// jsx tag / jsx text / normal JavaScript expression\n\nexport class TokContext {\n constructor(token: string, preserveSpace?: boolean) {\n this.token = token;\n this.preserveSpace = !!preserveSpace;\n }\n\n token: string;\n preserveSpace: boolean;\n}\n\nconst types: {\n [key: string]: TokContext;\n} = {\n brace: new TokContext(\"{\"), // normal JavaScript expression\n j_oTag: new TokContext(\"...\", true), // JSX expressions\n};\n\nif (!process.env.BABEL_8_BREAKING) {\n types.template = new TokContext(\"`\", true);\n}\n\nexport { types };\n","import { types as tc, type TokContext } from \"./context.ts\";\n// ## Token types\n\n// The assignment of fine-grained, information-carrying type objects\n// allows the tokenizer to store the information it has about a\n// token in a way that is very cheap for the parser to look up.\n\n// All token type variables start with an underscore, to make them\n// easy to recognize.\n\n// The `beforeExpr` property is used to disambiguate between 1) binary\n// expression (<) and JSX Tag start (); 2) object literal and JSX\n// texts. It is set on the `updateContext` function in the JSX plugin.\n\n// The `startsExpr` property is used to determine whether an expression\n// may be the “argument” subexpression of a `yield` expression or\n// `yield` statement. It is set on all token types that may be at the\n// start of a subexpression.\n\n// `isLoop` marks a keyword as starting a loop, which is important\n// to know when parsing a label, in order to allow or disallow\n// continue jumps to that label.\n\nconst beforeExpr = true;\nconst startsExpr = true;\nconst isLoop = true;\nconst isAssign = true;\nconst prefix = true;\nconst postfix = true;\n\ntype TokenOptions = {\n keyword?: string;\n beforeExpr?: boolean;\n startsExpr?: boolean;\n rightAssociative?: boolean;\n isLoop?: boolean;\n isAssign?: boolean;\n prefix?: boolean;\n postfix?: boolean;\n binop?: number | null;\n};\n\n// Internally the tokenizer stores token as a number\nexport type TokenType = number;\n\n// The `ExportedTokenType` is exported via `tokTypes` and accessible\n// when `tokens: true` is enabled. Unlike internal token type, it provides\n// metadata of the tokens.\nexport class ExportedTokenType {\n label: string;\n keyword: string | undefined | null;\n beforeExpr: boolean;\n startsExpr: boolean;\n rightAssociative: boolean;\n isLoop: boolean;\n isAssign: boolean;\n prefix: boolean;\n postfix: boolean;\n binop: number | undefined | null;\n // todo(Babel 8): remove updateContext from exposed token layout\n declare updateContext:\n | ((context: Array) => void)\n | undefined\n | null;\n\n constructor(label: string, conf: TokenOptions = {}) {\n this.label = label;\n this.keyword = conf.keyword;\n this.beforeExpr = !!conf.beforeExpr;\n this.startsExpr = !!conf.startsExpr;\n this.rightAssociative = !!conf.rightAssociative;\n this.isLoop = !!conf.isLoop;\n this.isAssign = !!conf.isAssign;\n this.prefix = !!conf.prefix;\n this.postfix = !!conf.postfix;\n this.binop = conf.binop != null ? conf.binop : null;\n if (!process.env.BABEL_8_BREAKING) {\n this.updateContext = null;\n }\n }\n}\n\n// A map from keyword/keyword-like string value to the token type\nexport const keywords = new Map();\n\nfunction createKeyword(name: string, options: TokenOptions = {}): TokenType {\n options.keyword = name;\n const token = createToken(name, options);\n keywords.set(name, token);\n return token;\n}\n\nfunction createBinop(name: string, binop: number) {\n return createToken(name, { beforeExpr, binop });\n}\n\nlet tokenTypeCounter = -1;\nexport const tokenTypes: ExportedTokenType[] = [];\nconst tokenLabels: string[] = [];\nconst tokenBinops: number[] = [];\nconst tokenBeforeExprs: boolean[] = [];\nconst tokenStartsExprs: boolean[] = [];\nconst tokenPrefixes: boolean[] = [];\n\nfunction createToken(name: string, options: TokenOptions = {}): TokenType {\n ++tokenTypeCounter;\n tokenLabels.push(name);\n tokenBinops.push(options.binop ?? -1);\n tokenBeforeExprs.push(options.beforeExpr ?? false);\n tokenStartsExprs.push(options.startsExpr ?? false);\n tokenPrefixes.push(options.prefix ?? false);\n tokenTypes.push(new ExportedTokenType(name, options));\n\n return tokenTypeCounter;\n}\n\nfunction createKeywordLike(\n name: string,\n options: TokenOptions = {},\n): TokenType {\n ++tokenTypeCounter;\n keywords.set(name, tokenTypeCounter);\n tokenLabels.push(name);\n tokenBinops.push(options.binop ?? -1);\n tokenBeforeExprs.push(options.beforeExpr ?? false);\n tokenStartsExprs.push(options.startsExpr ?? false);\n tokenPrefixes.push(options.prefix ?? false);\n // In the exported token type, we set the label as \"name\" for backward compatibility with Babel 7\n tokenTypes.push(new ExportedTokenType(\"name\", options));\n\n return tokenTypeCounter;\n}\n\n// For performance the token type helpers depend on the following declarations order.\n// When adding new token types, please also check if the token helpers need update.\n\nexport type InternalTokenTypes = typeof tt;\n\nexport const tt = {\n // Punctuation token types.\n bracketL: createToken(\"[\", { beforeExpr, startsExpr }),\n bracketHashL: createToken(\"#[\", { beforeExpr, startsExpr }),\n bracketBarL: createToken(\"[|\", { beforeExpr, startsExpr }),\n bracketR: createToken(\"]\"),\n bracketBarR: createToken(\"|]\"),\n braceL: createToken(\"{\", { beforeExpr, startsExpr }),\n braceBarL: createToken(\"{|\", { beforeExpr, startsExpr }),\n braceHashL: createToken(\"#{\", { beforeExpr, startsExpr }),\n braceR: createToken(\"}\"),\n braceBarR: createToken(\"|}\"),\n parenL: createToken(\"(\", { beforeExpr, startsExpr }),\n parenR: createToken(\")\"),\n comma: createToken(\",\", { beforeExpr }),\n semi: createToken(\";\", { beforeExpr }),\n colon: createToken(\":\", { beforeExpr }),\n doubleColon: createToken(\"::\", { beforeExpr }),\n dot: createToken(\".\"),\n question: createToken(\"?\", { beforeExpr }),\n questionDot: createToken(\"?.\"),\n arrow: createToken(\"=>\", { beforeExpr }),\n template: createToken(\"template\"),\n ellipsis: createToken(\"...\", { beforeExpr }),\n backQuote: createToken(\"`\", { startsExpr }),\n dollarBraceL: createToken(\"${\", { beforeExpr, startsExpr }),\n // start: isTemplate\n templateTail: createToken(\"...`\", { startsExpr }),\n templateNonTail: createToken(\"...${\", { beforeExpr, startsExpr }),\n // end: isTemplate\n at: createToken(\"@\"),\n hash: createToken(\"#\", { startsExpr }),\n\n // Special hashbang token.\n interpreterDirective: createToken(\"#!...\"),\n\n // Operators. These carry several kinds of properties to help the\n // parser use them properly (the presence of these properties is\n // what categorizes them as operators).\n //\n // `binop`, when present, specifies that this operator is a binary\n // operator, and will refer to its precedence.\n //\n // `prefix` and `postfix` mark the operator as a prefix or postfix\n // unary operator.\n //\n // `isAssign` marks all of `=`, `+=`, `-=` etcetera, which act as\n // binary operators with a very low precedence, that should result\n // in AssignmentExpression nodes.\n\n // start: isAssign\n eq: createToken(\"=\", { beforeExpr, isAssign }),\n assign: createToken(\"_=\", { beforeExpr, isAssign }),\n slashAssign: createToken(\"_=\", { beforeExpr, isAssign }),\n // These are only needed to support % and ^ as a Hack-pipe topic token.\n // When the proposal settles on a token, the others can be merged with\n // tt.assign.\n xorAssign: createToken(\"_=\", { beforeExpr, isAssign }),\n moduloAssign: createToken(\"_=\", { beforeExpr, isAssign }),\n // end: isAssign\n\n incDec: createToken(\"++/--\", { prefix, postfix, startsExpr }),\n bang: createToken(\"!\", { beforeExpr, prefix, startsExpr }),\n tilde: createToken(\"~\", { beforeExpr, prefix, startsExpr }),\n\n // More possible topic tokens.\n // When the proposal settles on a token, at least one of these may be removed.\n doubleCaret: createToken(\"^^\", { startsExpr }),\n doubleAt: createToken(\"@@\", { startsExpr }),\n\n // start: isBinop\n pipeline: createBinop(\"|>\", 0),\n nullishCoalescing: createBinop(\"??\", 1),\n logicalOR: createBinop(\"||\", 1),\n logicalAND: createBinop(\"&&\", 2),\n bitwiseOR: createBinop(\"|\", 3),\n bitwiseXOR: createBinop(\"^\", 4),\n bitwiseAND: createBinop(\"&\", 5),\n equality: createBinop(\"==/!=/===/!==\", 6),\n lt: createBinop(\"/<=/>=\", 7),\n gt: createBinop(\"/<=/>=\", 7),\n relational: createBinop(\"/<=/>=\", 7),\n bitShift: createBinop(\"<>/>>>\", 8),\n bitShiftL: createBinop(\"<>/>>>\", 8),\n bitShiftR: createBinop(\"<>/>>>\", 8),\n plusMin: createToken(\"+/-\", { beforeExpr, binop: 9, prefix, startsExpr }),\n // startsExpr: required by v8intrinsic plugin\n modulo: createToken(\"%\", { binop: 10, startsExpr }),\n // unset `beforeExpr` as it can be `function *`\n star: createToken(\"*\", { binop: 10 }),\n slash: createBinop(\"/\", 10),\n exponent: createToken(\"**\", {\n beforeExpr,\n binop: 11,\n rightAssociative: true,\n }),\n\n // Keywords\n // Don't forget to update packages/babel-helper-validator-identifier/src/keyword.js\n // when new keywords are added\n // start: isLiteralPropertyName\n // start: isKeyword\n _in: createKeyword(\"in\", { beforeExpr, binop: 7 }),\n _instanceof: createKeyword(\"instanceof\", { beforeExpr, binop: 7 }),\n // end: isBinop\n _break: createKeyword(\"break\"),\n _case: createKeyword(\"case\", { beforeExpr }),\n _catch: createKeyword(\"catch\"),\n _continue: createKeyword(\"continue\"),\n _debugger: createKeyword(\"debugger\"),\n _default: createKeyword(\"default\", { beforeExpr }),\n _else: createKeyword(\"else\", { beforeExpr }),\n _finally: createKeyword(\"finally\"),\n _function: createKeyword(\"function\", { startsExpr }),\n _if: createKeyword(\"if\"),\n _return: createKeyword(\"return\", { beforeExpr }),\n _switch: createKeyword(\"switch\"),\n _throw: createKeyword(\"throw\", { beforeExpr, prefix, startsExpr }),\n _try: createKeyword(\"try\"),\n _var: createKeyword(\"var\"),\n _const: createKeyword(\"const\"),\n _with: createKeyword(\"with\"),\n _new: createKeyword(\"new\", { beforeExpr, startsExpr }),\n _this: createKeyword(\"this\", { startsExpr }),\n _super: createKeyword(\"super\", { startsExpr }),\n _class: createKeyword(\"class\", { startsExpr }),\n _extends: createKeyword(\"extends\", { beforeExpr }),\n _export: createKeyword(\"export\"),\n _import: createKeyword(\"import\", { startsExpr }),\n _null: createKeyword(\"null\", { startsExpr }),\n _true: createKeyword(\"true\", { startsExpr }),\n _false: createKeyword(\"false\", { startsExpr }),\n _typeof: createKeyword(\"typeof\", { beforeExpr, prefix, startsExpr }),\n _void: createKeyword(\"void\", { beforeExpr, prefix, startsExpr }),\n _delete: createKeyword(\"delete\", { beforeExpr, prefix, startsExpr }),\n // start: isLoop\n _do: createKeyword(\"do\", { isLoop, beforeExpr }),\n _for: createKeyword(\"for\", { isLoop }),\n _while: createKeyword(\"while\", { isLoop }),\n // end: isLoop\n // end: isKeyword\n\n // Primary literals\n // start: isIdentifier\n _as: createKeywordLike(\"as\", { startsExpr }),\n _assert: createKeywordLike(\"assert\", { startsExpr }),\n _async: createKeywordLike(\"async\", { startsExpr }),\n _await: createKeywordLike(\"await\", { startsExpr }),\n _defer: createKeywordLike(\"defer\", { startsExpr }),\n _from: createKeywordLike(\"from\", { startsExpr }),\n _get: createKeywordLike(\"get\", { startsExpr }),\n _let: createKeywordLike(\"let\", { startsExpr }),\n _meta: createKeywordLike(\"meta\", { startsExpr }),\n _of: createKeywordLike(\"of\", { startsExpr }),\n _sent: createKeywordLike(\"sent\", { startsExpr }),\n _set: createKeywordLike(\"set\", { startsExpr }),\n _source: createKeywordLike(\"source\", { startsExpr }),\n _static: createKeywordLike(\"static\", { startsExpr }),\n _using: createKeywordLike(\"using\", { startsExpr }),\n _yield: createKeywordLike(\"yield\", { startsExpr }),\n\n // Flow and TypeScript Keywordlike\n _asserts: createKeywordLike(\"asserts\", { startsExpr }),\n _checks: createKeywordLike(\"checks\", { startsExpr }),\n _exports: createKeywordLike(\"exports\", { startsExpr }),\n _global: createKeywordLike(\"global\", { startsExpr }),\n _implements: createKeywordLike(\"implements\", { startsExpr }),\n _intrinsic: createKeywordLike(\"intrinsic\", { startsExpr }),\n _infer: createKeywordLike(\"infer\", { startsExpr }),\n _is: createKeywordLike(\"is\", { startsExpr }),\n _mixins: createKeywordLike(\"mixins\", { startsExpr }),\n _proto: createKeywordLike(\"proto\", { startsExpr }),\n _require: createKeywordLike(\"require\", { startsExpr }),\n _satisfies: createKeywordLike(\"satisfies\", { startsExpr }),\n // start: isTSTypeOperator\n _keyof: createKeywordLike(\"keyof\", { startsExpr }),\n _readonly: createKeywordLike(\"readonly\", { startsExpr }),\n _unique: createKeywordLike(\"unique\", { startsExpr }),\n // end: isTSTypeOperator\n // start: isTSDeclarationStart\n _abstract: createKeywordLike(\"abstract\", { startsExpr }),\n _declare: createKeywordLike(\"declare\", { startsExpr }),\n _enum: createKeywordLike(\"enum\", { startsExpr }),\n _module: createKeywordLike(\"module\", { startsExpr }),\n _namespace: createKeywordLike(\"namespace\", { startsExpr }),\n // start: isFlowInterfaceOrTypeOrOpaque\n _interface: createKeywordLike(\"interface\", { startsExpr }),\n _type: createKeywordLike(\"type\", { startsExpr }),\n // end: isTSDeclarationStart\n _opaque: createKeywordLike(\"opaque\", { startsExpr }),\n // end: isFlowInterfaceOrTypeOrOpaque\n name: createToken(\"name\", { startsExpr }),\n // end: isIdentifier\n\n string: createToken(\"string\", { startsExpr }),\n num: createToken(\"num\", { startsExpr }),\n bigint: createToken(\"bigint\", { startsExpr }),\n decimal: createToken(\"decimal\", { startsExpr }),\n // end: isLiteralPropertyName\n regexp: createToken(\"regexp\", { startsExpr }),\n privateName: createToken(\"#name\", { startsExpr }),\n eof: createToken(\"eof\"),\n\n // jsx plugin\n jsxName: createToken(\"jsxName\"),\n jsxText: createToken(\"jsxText\", { beforeExpr: true }),\n jsxTagStart: createToken(\"jsxTagStart\", { startsExpr: true }),\n jsxTagEnd: createToken(\"jsxTagEnd\"),\n\n // placeholder plugin\n placeholder: createToken(\"%%\", { startsExpr: true }),\n} as const;\n\nexport function tokenIsIdentifier(token: TokenType): boolean {\n return token >= tt._as && token <= tt.name;\n}\n\nexport function tokenKeywordOrIdentifierIsKeyword(token: TokenType): boolean {\n // we can remove the token >= tt._in check when we\n // know a token is either keyword or identifier\n return token <= tt._while;\n}\n\nexport function tokenIsKeywordOrIdentifier(token: TokenType): boolean {\n return token >= tt._in && token <= tt.name;\n}\n\nexport function tokenIsLiteralPropertyName(token: TokenType): boolean {\n return token >= tt._in && token <= tt.decimal;\n}\n\nexport function tokenComesBeforeExpression(token: TokenType): boolean {\n return tokenBeforeExprs[token];\n}\n\nexport function tokenCanStartExpression(token: TokenType): boolean {\n return tokenStartsExprs[token];\n}\n\nexport function tokenIsAssignment(token: TokenType): boolean {\n return token >= tt.eq && token <= tt.moduloAssign;\n}\n\nexport function tokenIsFlowInterfaceOrTypeOrOpaque(token: TokenType): boolean {\n return token >= tt._interface && token <= tt._opaque;\n}\n\nexport function tokenIsLoop(token: TokenType): boolean {\n return token >= tt._do && token <= tt._while;\n}\n\nexport function tokenIsKeyword(token: TokenType): boolean {\n return token >= tt._in && token <= tt._while;\n}\n\nexport function tokenIsOperator(token: TokenType): boolean {\n return token >= tt.pipeline && token <= tt._instanceof;\n}\n\nexport function tokenIsPostfix(token: TokenType): boolean {\n return token === tt.incDec;\n}\n\nexport function tokenIsPrefix(token: TokenType): boolean {\n return tokenPrefixes[token];\n}\n\nexport function tokenIsTSTypeOperator(token: TokenType): boolean {\n return token >= tt._keyof && token <= tt._unique;\n}\n\nexport function tokenIsTSDeclarationStart(token: TokenType): boolean {\n return token >= tt._abstract && token <= tt._type;\n}\n\nexport function tokenLabelName(token: TokenType): string {\n return tokenLabels[token];\n}\n\nexport function tokenOperatorPrecedence(token: TokenType): number {\n return tokenBinops[token];\n}\n\nexport function tokenIsBinaryOperator(token: TokenType): boolean {\n return tokenBinops[token] !== -1;\n}\n\nexport function tokenIsRightAssociative(token: TokenType): boolean {\n return token === tt.exponent;\n}\n\nexport function tokenIsTemplate(token: TokenType): boolean {\n return token >= tt.templateTail && token <= tt.templateNonTail;\n}\n\nexport function getExportedToken(token: TokenType): ExportedTokenType {\n return tokenTypes[token];\n}\n\nexport function isTokenType(obj: any): boolean {\n return typeof obj === \"number\";\n}\n\nif (!process.env.BABEL_8_BREAKING) {\n tokenTypes[tt.braceR].updateContext = context => {\n context.pop();\n };\n\n tokenTypes[tt.braceL].updateContext =\n tokenTypes[tt.braceHashL].updateContext =\n tokenTypes[tt.dollarBraceL].updateContext =\n context => {\n context.push(tc.brace);\n };\n\n tokenTypes[tt.backQuote].updateContext = context => {\n if (context[context.length - 1] === tc.template) {\n context.pop();\n } else {\n context.push(tc.template);\n }\n };\n\n tokenTypes[tt.jsxTagStart].updateContext = context => {\n context.push(tc.j_expr, tc.j_oTag);\n };\n}\n","import * as charCodes from \"charcodes\";\nimport { isIdentifierStart } from \"@babel/helper-validator-identifier\";\n\nexport {\n isIdentifierStart,\n isIdentifierChar,\n isReservedWord,\n isStrictBindOnlyReservedWord,\n isStrictBindReservedWord,\n isStrictReservedWord,\n isKeyword,\n} from \"@babel/helper-validator-identifier\";\n\nexport const keywordRelationalOperator = /^in(stanceof)?$/;\n\n// Test whether a current state character code and next character code is @\n\nexport function isIteratorStart(\n current: number,\n next: number,\n next2: number,\n): boolean {\n return (\n current === charCodes.atSign &&\n next === charCodes.atSign &&\n isIdentifierStart(next2)\n );\n}\n\n// This is the comprehensive set of JavaScript reserved words\n// If a word is in this set, it could be a reserved word,\n// depending on sourceType/strictMode/binding info. In other words\n// if a word is not in this set, it is not a reserved word under\n// any circumstance.\nconst reservedWordLikeSet = new Set([\n \"break\",\n \"case\",\n \"catch\",\n \"continue\",\n \"debugger\",\n \"default\",\n \"do\",\n \"else\",\n \"finally\",\n \"for\",\n \"function\",\n \"if\",\n \"return\",\n \"switch\",\n \"throw\",\n \"try\",\n \"var\",\n \"const\",\n \"while\",\n \"with\",\n \"new\",\n \"this\",\n \"super\",\n \"class\",\n \"extends\",\n \"export\",\n \"import\",\n \"null\",\n \"true\",\n \"false\",\n \"in\",\n \"instanceof\",\n \"typeof\",\n \"void\",\n \"delete\",\n // strict\n \"implements\",\n \"interface\",\n \"let\",\n \"package\",\n \"private\",\n \"protected\",\n \"public\",\n \"static\",\n \"yield\",\n // strictBind\n \"eval\",\n \"arguments\",\n // reservedWorkLike\n \"enum\",\n \"await\",\n]);\n\nexport function canBeReservedWord(word: string): boolean {\n return reservedWordLikeSet.has(word);\n}\n","// Each scope gets a bitset that may contain these flags\n/* prettier-ignore */\nexport const enum ScopeFlag {\n OTHER = 0b000000000,\n PROGRAM = 0b000000001,\n FUNCTION = 0b000000010,\n ARROW = 0b000000100,\n SIMPLE_CATCH = 0b000001000,\n SUPER = 0b000010000,\n DIRECT_SUPER = 0b000100000,\n CLASS = 0b001000000,\n STATIC_BLOCK = 0b010000000,\n TS_MODULE = 0b100000000,\n VAR = PROGRAM | FUNCTION | STATIC_BLOCK | TS_MODULE,\n}\n\n/* prettier-ignore */\nexport const enum BindingFlag {\n // These flags are meant to be _only_ used inside the Scope class (or subclasses).\n KIND_VALUE = 0b0000000_0000_01,\n KIND_TYPE = 0b0000000_0000_10,\n // Used in checkLVal and declareName to determine the type of a binding\n SCOPE_VAR = 0b0000000_0001_00, // Var-style binding\n SCOPE_LEXICAL = 0b0000000_0010_00, // Let- or const-style binding\n SCOPE_FUNCTION = 0b0000000_0100_00, // Function declaration\n SCOPE_OUTSIDE = 0b0000000_1000_00, // Special case for function names as\n // bound inside the function\n // Misc flags\n FLAG_NONE = 0b00000001_0000_00,\n FLAG_CLASS = 0b00000010_0000_00,\n FLAG_TS_ENUM = 0b00000100_0000_00,\n FLAG_TS_CONST_ENUM = 0b00001000_0000_00,\n FLAG_TS_EXPORT_ONLY = 0b00010000_0000_00,\n FLAG_FLOW_DECLARE_FN = 0b00100000_0000_00,\n FLAG_TS_IMPORT = 0b01000000_0000_00,\n // Whether \"let\" should be allowed in bound names in sloppy mode\n FLAG_NO_LET_IN_LEXICAL = 0b10000000_0000_00,\n\n // These flags are meant to be _only_ used by Scope consumers\n/* prettier-ignore */\n /* = is value? | is type? | scope | misc flags */\n TYPE_CLASS = KIND_VALUE | KIND_TYPE | SCOPE_LEXICAL | FLAG_CLASS|FLAG_NO_LET_IN_LEXICAL,\n TYPE_LEXICAL = KIND_VALUE | 0 | SCOPE_LEXICAL | FLAG_NO_LET_IN_LEXICAL,\n TYPE_CATCH_PARAM = KIND_VALUE | 0 | SCOPE_LEXICAL | 0,\n TYPE_VAR = KIND_VALUE | 0 | SCOPE_VAR | 0,\n TYPE_FUNCTION = KIND_VALUE | 0 | SCOPE_FUNCTION | 0,\n TYPE_TS_INTERFACE = 0 | KIND_TYPE | 0 | FLAG_CLASS,\n TYPE_TS_TYPE = 0 | KIND_TYPE | 0 | 0,\n TYPE_TS_ENUM = KIND_VALUE | KIND_TYPE | SCOPE_LEXICAL | FLAG_TS_ENUM|FLAG_NO_LET_IN_LEXICAL,\n TYPE_TS_AMBIENT = 0 | 0 | 0 | FLAG_TS_EXPORT_ONLY,\n // These bindings don't introduce anything in the scope. They are used for assignments and\n // function expressions IDs.\n TYPE_NONE = 0 | 0 | 0 | FLAG_NONE,\n TYPE_OUTSIDE = KIND_VALUE | 0 | 0 | FLAG_NONE,\n TYPE_TS_CONST_ENUM = TYPE_TS_ENUM | FLAG_TS_CONST_ENUM,\n TYPE_TS_NAMESPACE = 0 | 0 | 0 | FLAG_TS_EXPORT_ONLY,\n TYPE_TS_TYPE_IMPORT = 0 | KIND_TYPE | 0 | FLAG_TS_IMPORT,\n TYPE_TS_VALUE_IMPORT = 0 | 0 | 0 | FLAG_TS_IMPORT,\n TYPE_FLOW_DECLARE_FN = 0 | 0 | 0 | FLAG_FLOW_DECLARE_FN,\n}\n\n/* prettier-ignore */\nexport const enum ClassElementType {\n OTHER = 0,\n FLAG_STATIC = 0b1_00,\n KIND_GETTER = 0b0_10,\n KIND_SETTER = 0b0_01,\n KIND_ACCESSOR = KIND_GETTER | KIND_SETTER,\n\n STATIC_GETTER = FLAG_STATIC | KIND_GETTER,\n STATIC_SETTER = FLAG_STATIC | KIND_SETTER,\n INSTANCE_GETTER = KIND_GETTER,\n INSTANCE_SETTER = KIND_SETTER,\n}\n","import { ScopeFlag, BindingFlag } from \"./scopeflags.ts\";\nimport type { Position } from \"./location.ts\";\nimport type * as N from \"../types.ts\";\nimport { Errors } from \"../parse-error.ts\";\nimport type Tokenizer from \"../tokenizer/index.ts\";\n\nexport const enum NameType {\n // var-declared names in the current lexical scope\n Var = 1 << 0,\n // lexically-declared names in the current lexical scope\n Lexical = 1 << 1,\n // lexically-declared FunctionDeclaration names in the current lexical scope\n Function = 1 << 2,\n}\n\n// Start an AST node, attaching a start offset.\nexport class Scope {\n flags: ScopeFlag = 0;\n names: Map = new Map();\n firstLexicalName = \"\";\n\n constructor(flags: ScopeFlag) {\n this.flags = flags;\n }\n}\n\n// The functions in this module keep track of declared variables in the\n// current scope in order to detect duplicate variable names.\nexport default class ScopeHandler {\n parser: Tokenizer;\n scopeStack: Array = [];\n inModule: boolean;\n undefinedExports: Map = new Map();\n\n constructor(parser: Tokenizer, inModule: boolean) {\n this.parser = parser;\n this.inModule = inModule;\n }\n\n get inTopLevel() {\n return (this.currentScope().flags & ScopeFlag.PROGRAM) > 0;\n }\n get inFunction() {\n return (this.currentVarScopeFlags() & ScopeFlag.FUNCTION) > 0;\n }\n get allowSuper() {\n return (this.currentThisScopeFlags() & ScopeFlag.SUPER) > 0;\n }\n get allowDirectSuper() {\n return (this.currentThisScopeFlags() & ScopeFlag.DIRECT_SUPER) > 0;\n }\n get inClass() {\n return (this.currentThisScopeFlags() & ScopeFlag.CLASS) > 0;\n }\n get inClassAndNotInNonArrowFunction() {\n const flags = this.currentThisScopeFlags();\n return (flags & ScopeFlag.CLASS) > 0 && (flags & ScopeFlag.FUNCTION) === 0;\n }\n get inStaticBlock() {\n for (let i = this.scopeStack.length - 1; ; i--) {\n const { flags } = this.scopeStack[i];\n if (flags & ScopeFlag.STATIC_BLOCK) {\n return true;\n }\n if (flags & (ScopeFlag.VAR | ScopeFlag.CLASS)) {\n // function body, module body, class property initializers\n return false;\n }\n }\n }\n get inNonArrowFunction() {\n return (this.currentThisScopeFlags() & ScopeFlag.FUNCTION) > 0;\n }\n get treatFunctionsAsVar() {\n return this.treatFunctionsAsVarInScope(this.currentScope());\n }\n\n createScope(flags: ScopeFlag): Scope {\n return new Scope(flags);\n }\n\n enter(flags: ScopeFlag) {\n /*:: +createScope: (flags:ScopeFlag) => IScope; */\n // @ts-expect-error This method will be overwritten by subclasses\n this.scopeStack.push(this.createScope(flags));\n }\n\n exit(): ScopeFlag {\n const scope = this.scopeStack.pop();\n return scope.flags;\n }\n\n // The spec says:\n // > At the top level of a function, or script, function declarations are\n // > treated like var declarations rather than like lexical declarations.\n treatFunctionsAsVarInScope(scope: IScope): boolean {\n return !!(\n scope.flags & (ScopeFlag.FUNCTION | ScopeFlag.STATIC_BLOCK) ||\n (!this.parser.inModule && scope.flags & ScopeFlag.PROGRAM)\n );\n }\n\n declareName(name: string, bindingType: BindingFlag, loc: Position) {\n let scope = this.currentScope();\n if (\n bindingType & BindingFlag.SCOPE_LEXICAL ||\n bindingType & BindingFlag.SCOPE_FUNCTION\n ) {\n this.checkRedeclarationInScope(scope, name, bindingType, loc);\n\n let type = scope.names.get(name) || 0;\n\n if (bindingType & BindingFlag.SCOPE_FUNCTION) {\n type = type | NameType.Function;\n } else {\n if (!scope.firstLexicalName) {\n scope.firstLexicalName = name;\n }\n type = type | NameType.Lexical;\n }\n\n scope.names.set(name, type);\n\n if (bindingType & BindingFlag.SCOPE_LEXICAL) {\n this.maybeExportDefined(scope, name);\n }\n } else if (bindingType & BindingFlag.SCOPE_VAR) {\n for (let i = this.scopeStack.length - 1; i >= 0; --i) {\n scope = this.scopeStack[i];\n this.checkRedeclarationInScope(scope, name, bindingType, loc);\n scope.names.set(name, (scope.names.get(name) || 0) | NameType.Var);\n this.maybeExportDefined(scope, name);\n\n if (scope.flags & ScopeFlag.VAR) break;\n }\n }\n if (this.parser.inModule && scope.flags & ScopeFlag.PROGRAM) {\n this.undefinedExports.delete(name);\n }\n }\n\n maybeExportDefined(scope: IScope, name: string) {\n if (this.parser.inModule && scope.flags & ScopeFlag.PROGRAM) {\n this.undefinedExports.delete(name);\n }\n }\n\n checkRedeclarationInScope(\n scope: IScope,\n name: string,\n bindingType: BindingFlag,\n loc: Position,\n ) {\n if (this.isRedeclaredInScope(scope, name, bindingType)) {\n this.parser.raise(Errors.VarRedeclaration, loc, {\n identifierName: name,\n });\n }\n }\n\n isRedeclaredInScope(\n scope: IScope,\n name: string,\n bindingType: BindingFlag,\n ): boolean {\n if (!(bindingType & BindingFlag.KIND_VALUE)) return false;\n\n if (bindingType & BindingFlag.SCOPE_LEXICAL) {\n return scope.names.has(name);\n }\n\n const type = scope.names.get(name);\n\n if (bindingType & BindingFlag.SCOPE_FUNCTION) {\n return (\n (type & NameType.Lexical) > 0 ||\n (!this.treatFunctionsAsVarInScope(scope) && (type & NameType.Var) > 0)\n );\n }\n\n return (\n ((type & NameType.Lexical) > 0 &&\n // Annex B.3.4\n // https://tc39.es/ecma262/#sec-variablestatements-in-catch-blocks\n !(\n scope.flags & ScopeFlag.SIMPLE_CATCH &&\n scope.firstLexicalName === name\n )) ||\n (!this.treatFunctionsAsVarInScope(scope) &&\n (type & NameType.Function) > 0)\n );\n }\n\n checkLocalExport(id: N.Identifier) {\n const { name } = id;\n const topLevelScope = this.scopeStack[0];\n if (!topLevelScope.names.has(name)) {\n this.undefinedExports.set(name, id.loc.start);\n }\n }\n\n currentScope(): IScope {\n return this.scopeStack[this.scopeStack.length - 1];\n }\n\n currentVarScopeFlags(): ScopeFlag {\n for (let i = this.scopeStack.length - 1; ; i--) {\n const { flags } = this.scopeStack[i];\n if (flags & ScopeFlag.VAR) {\n return flags;\n }\n }\n }\n\n // Could be useful for `arguments`, `this`, `new.target`, `super()`, `super.property`, and `super[property]`.\n currentThisScopeFlags(): ScopeFlag {\n for (let i = this.scopeStack.length - 1; ; i--) {\n const { flags } = this.scopeStack[i];\n if (\n flags & (ScopeFlag.VAR | ScopeFlag.CLASS) &&\n !(flags & ScopeFlag.ARROW)\n ) {\n return flags;\n }\n }\n }\n}\n","import type { Position } from \"../../util/location.ts\";\nimport ScopeHandler, { NameType, Scope } from \"../../util/scope.ts\";\nimport { BindingFlag, type ScopeFlag } from \"../../util/scopeflags.ts\";\nimport type * as N from \"../../types.ts\";\n\n// Reference implementation: https://github.com/facebook/flow/blob/23aeb2a2ef6eb4241ce178fde5d8f17c5f747fb5/src/typing/env.ml#L536-L584\nclass FlowScope extends Scope {\n // declare function foo(): type;\n declareFunctions: Set = new Set();\n}\n\nexport default class FlowScopeHandler extends ScopeHandler {\n createScope(flags: ScopeFlag): FlowScope {\n return new FlowScope(flags);\n }\n\n declareName(name: string, bindingType: BindingFlag, loc: Position) {\n const scope = this.currentScope();\n if (bindingType & BindingFlag.FLAG_FLOW_DECLARE_FN) {\n this.checkRedeclarationInScope(scope, name, bindingType, loc);\n this.maybeExportDefined(scope, name);\n scope.declareFunctions.add(name);\n return;\n }\n\n super.declareName(name, bindingType, loc);\n }\n\n isRedeclaredInScope(\n scope: FlowScope,\n name: string,\n bindingType: BindingFlag,\n ): boolean {\n if (super.isRedeclaredInScope(scope, name, bindingType)) return true;\n\n if (\n bindingType & BindingFlag.FLAG_FLOW_DECLARE_FN &&\n !scope.declareFunctions.has(name)\n ) {\n const type = scope.names.get(name);\n return (type & NameType.Function) > 0 || (type & NameType.Lexical) > 0;\n }\n\n return false;\n }\n\n checkLocalExport(id: N.Identifier) {\n if (!this.scopeStack[0].declareFunctions.has(id.name)) {\n super.checkLocalExport(id);\n }\n }\n}\n","/*:: declare var invariant; */\n\nimport BaseParser from \"./base.ts\";\nimport type { Comment, Node, Identifier } from \"../types.ts\";\nimport * as charCodes from \"charcodes\";\nimport type { Undone } from \"./node.ts\";\n\n/**\n * A whitespace token containing comments\n */\nexport type CommentWhitespace = {\n /**\n * the start of the whitespace token.\n */\n start: number;\n /**\n * the end of the whitespace token.\n */\n end: number;\n /**\n * the containing comments\n */\n comments: Array;\n /**\n * the immediately preceding AST node of the whitespace token\n */\n leadingNode: Node | null;\n /**\n * the immediately following AST node of the whitespace token\n */\n trailingNode: Node | null;\n /**\n * the innermost AST node containing the whitespace with minimal size (|end - start|)\n */\n containingNode: Node | null;\n};\n\n/**\n * Merge comments with node's trailingComments or assign comments to be\n * trailingComments. New comments will be placed before old comments\n * because the commentStack is enumerated reversely.\n */\nfunction setTrailingComments(node: Undone, comments: Array) {\n if (node.trailingComments === undefined) {\n node.trailingComments = comments;\n } else {\n node.trailingComments.unshift(...comments);\n }\n}\n\n/**\n * Merge comments with node's leadingComments or assign comments to be\n * leadingComments. New comments will be placed before old comments\n * because the commentStack is enumerated reversely.\n */\nfunction setLeadingComments(node: Undone, comments: Array) {\n if (node.leadingComments === undefined) {\n node.leadingComments = comments;\n } else {\n node.leadingComments.unshift(...comments);\n }\n}\n\n/**\n * Merge comments with node's innerComments or assign comments to be\n * innerComments. New comments will be placed before old comments\n * because the commentStack is enumerated reversely.\n */\nexport function setInnerComments(\n node: Undone,\n comments?: Array,\n) {\n if (node.innerComments === undefined) {\n node.innerComments = comments;\n } else {\n node.innerComments.unshift(...comments);\n }\n}\n\n/**\n * Given node and elements array, if elements has non-null element,\n * merge comments to its trailingComments, otherwise merge comments\n * to node's innerComments\n */\nfunction adjustInnerComments(\n node: Undone,\n elements: Array,\n commentWS: CommentWhitespace,\n) {\n let lastElement = null;\n let i = elements.length;\n while (lastElement === null && i > 0) {\n lastElement = elements[--i];\n }\n if (lastElement === null || lastElement.start > commentWS.start) {\n setInnerComments(node, commentWS.comments);\n } else {\n setTrailingComments(lastElement, commentWS.comments);\n }\n}\n\nexport default class CommentsParser extends BaseParser {\n addComment(comment: Comment): void {\n if (this.filename) comment.loc.filename = this.filename;\n const { commentsLen } = this.state;\n if (this.comments.length !== commentsLen) {\n this.comments.length = commentsLen;\n }\n this.comments.push(comment);\n this.state.commentsLen++;\n }\n\n /**\n * Given a newly created AST node _n_, attach _n_ to a comment whitespace _w_ if applicable\n * {@see {@link CommentWhitespace}}\n */\n processComment(node: Node): void {\n const { commentStack } = this.state;\n const commentStackLength = commentStack.length;\n if (commentStackLength === 0) return;\n let i = commentStackLength - 1;\n const lastCommentWS = commentStack[i];\n\n if (lastCommentWS.start === node.end) {\n lastCommentWS.leadingNode = node;\n i--;\n }\n\n const { start: nodeStart } = node;\n // invariant: for all 0 <= j <= i, let c = commentStack[j], c must satisfy c.end < node.end\n for (; i >= 0; i--) {\n const commentWS = commentStack[i];\n const commentEnd = commentWS.end;\n if (commentEnd > nodeStart) {\n // by definition of commentWhiteSpace, this implies commentWS.start > nodeStart\n // so node can be a containingNode candidate. At this time we can finalize the comment\n // whitespace, because\n // 1) its leadingNode or trailingNode, if exists, will not change\n // 2) its containingNode have been assigned and will not change because it is the\n // innermost minimal-sized AST node\n commentWS.containingNode = node;\n this.finalizeComment(commentWS);\n commentStack.splice(i, 1);\n } else {\n if (commentEnd === nodeStart) {\n commentWS.trailingNode = node;\n }\n // stop the loop when commentEnd <= nodeStart\n break;\n }\n }\n }\n\n /**\n * Assign the comments of comment whitespaces to related AST nodes.\n * Also adjust innerComments following trailing comma.\n */\n finalizeComment(commentWS: CommentWhitespace) {\n const { comments } = commentWS;\n if (commentWS.leadingNode !== null || commentWS.trailingNode !== null) {\n if (commentWS.leadingNode !== null) {\n setTrailingComments(commentWS.leadingNode, comments);\n }\n if (commentWS.trailingNode !== null) {\n setLeadingComments(commentWS.trailingNode, comments);\n }\n } else {\n /*:: invariant(commentWS.containingNode !== null) */\n const { containingNode: node, start: commentStart } = commentWS;\n if (this.input.charCodeAt(commentStart - 1) === charCodes.comma) {\n // If a commentWhitespace follows a comma and the containingNode allows\n // list structures with trailing comma, merge it to the trailingComment\n // of the last non-null list element\n switch (node.type) {\n case \"ObjectExpression\":\n case \"ObjectPattern\":\n case \"RecordExpression\":\n adjustInnerComments(node, node.properties, commentWS);\n break;\n case \"CallExpression\":\n case \"OptionalCallExpression\":\n adjustInnerComments(node, node.arguments, commentWS);\n break;\n case \"FunctionDeclaration\":\n case \"FunctionExpression\":\n case \"ArrowFunctionExpression\":\n case \"ObjectMethod\":\n case \"ClassMethod\":\n case \"ClassPrivateMethod\":\n adjustInnerComments(node, node.params, commentWS);\n break;\n case \"ArrayExpression\":\n case \"ArrayPattern\":\n case \"TupleExpression\":\n adjustInnerComments(node, node.elements, commentWS);\n break;\n case \"ExportNamedDeclaration\":\n case \"ImportDeclaration\":\n adjustInnerComments(node, node.specifiers, commentWS);\n break;\n default: {\n setInnerComments(node, comments);\n }\n }\n } else {\n setInnerComments(node, comments);\n }\n }\n }\n\n /**\n * Drains remaining commentStack and applies finalizeComment\n * to each comment whitespace. Used only in parseExpression\n * where the top level AST node is _not_ Program\n * {@see {@link CommentsParser#finalizeComment}}\n */\n finalizeRemainingComments() {\n const { commentStack } = this.state;\n for (let i = commentStack.length - 1; i >= 0; i--) {\n this.finalizeComment(commentStack[i]);\n }\n this.state.commentStack = [];\n }\n\n /* eslint-disable no-irregular-whitespace */\n /**\n * Reset previous node trailing comments. Used in object / class\n * property parsing. We parse `async`, `static`, `set` and `get`\n * as an identifier but may reinterpret it into an async/static/accessor\n * method later. In this case the identifier is not part of the AST and we\n * should sync the knowledge to commentStacks\n *\n * For example, when parsing\n * ```\n * async /* 1 *​/ function f() {}\n * ```\n * the comment whitespace `/* 1 *​/` has leading node Identifier(async). When\n * we see the function token, we create a Function node and mark `/* 1 *​/` as\n * inner comments. So `/* 1 *​/` should be detached from the Identifier node.\n *\n * @param node the last finished AST node _before_ current token\n */\n /* eslint-enable no-irregular-whitespace */\n resetPreviousNodeTrailingComments(node: Node) {\n const { commentStack } = this.state;\n const { length } = commentStack;\n if (length === 0) return;\n const commentWS = commentStack[length - 1];\n if (commentWS.leadingNode === node) {\n commentWS.leadingNode = null;\n }\n }\n\n /* eslint-disable no-irregular-whitespace */\n /**\n * Reset previous node leading comments, assuming that `node` is a\n * single-token node. Used in import phase modifiers parsing. We parse\n * `module` in `import module foo from ...` as an identifier but may\n * reinterpret it into a phase modifier later. In this case the identifier is\n * not part of the AST and we should sync the knowledge to commentStacks\n *\n * For example, when parsing\n * ```\n * import /* 1 *​/ module a from \"a\";\n * ```\n * the comment whitespace `/* 1 *​/` has trailing node Identifier(module). When\n * we see that `module` is not a default import binding, we mark `/* 1 *​/` as\n * inner comments of the ImportDeclaration. So `/* 1 *​/` should be detached from\n * the Identifier node.\n *\n * @param node the last finished AST node _before_ current token\n */\n /* eslint-enable no-irregular-whitespace */\n resetPreviousIdentifierLeadingComments(node: Identifier) {\n const { commentStack } = this.state;\n const { length } = commentStack;\n if (length === 0) return;\n\n if (commentStack[length - 1].trailingNode === node) {\n commentStack[length - 1].trailingNode = null;\n } else if (length >= 2 && commentStack[length - 2].trailingNode === node) {\n commentStack[length - 2].trailingNode = null;\n }\n }\n\n /**\n * Attach a node to the comment whitespaces right before/after\n * the given range.\n *\n * This is used to properly attach comments around parenthesized\n * expressions as leading/trailing comments of the inner expression.\n */\n takeSurroundingComments(node: Node, start: number, end: number) {\n const { commentStack } = this.state;\n const commentStackLength = commentStack.length;\n if (commentStackLength === 0) return;\n let i = commentStackLength - 1;\n\n for (; i >= 0; i--) {\n const commentWS = commentStack[i];\n const commentEnd = commentWS.end;\n const commentStart = commentWS.start;\n\n if (commentStart === end) {\n commentWS.leadingNode = node;\n } else if (commentEnd === start) {\n commentWS.trailingNode = node;\n } else if (commentEnd < start) {\n break;\n }\n }\n }\n}\n","import type { Options } from \"../options.ts\";\nimport type State from \"../tokenizer/state.ts\";\nimport type { PluginsMap } from \"./index.ts\";\nimport type ScopeHandler from \"../util/scope.ts\";\nimport type ExpressionScopeHandler from \"../util/expression-scope.ts\";\nimport type ClassScopeHandler from \"../util/class-scope.ts\";\nimport type ProductionParameterHandler from \"../util/production-parameter.ts\";\nimport type {\n ParserPluginWithOptions,\n PluginConfig,\n PluginOptions,\n} from \"../typings.ts\";\nimport type * as N from \"../types.ts\";\n\nexport default class BaseParser {\n // Properties set by constructor in index.js\n declare options: Options;\n declare inModule: boolean;\n declare scope: ScopeHandler;\n declare classScope: ClassScopeHandler;\n declare prodParam: ProductionParameterHandler;\n declare expressionScope: ExpressionScopeHandler;\n declare plugins: PluginsMap;\n declare filename: string | undefined | null;\n // Names of exports store. `default` is stored as a name for both\n // `export default foo;` and `export { foo as default };`.\n declare exportedIdentifiers: Set;\n sawUnambiguousESM: boolean = false;\n ambiguousScriptDifferentAst: boolean = false;\n\n // Initialized by Tokenizer\n declare state: State;\n // input and length are not in state as they are constant and we do\n // not want to ever copy them, which happens if state gets cloned\n declare input: string;\n declare length: number;\n // Comment store for Program.comments\n declare comments: Array;\n\n // This method accepts either a string (plugin name) or an array pair\n // (plugin name and options object). If an options object is given,\n // then each value is non-recursively checked for identity with that\n // plugin’s actual option value.\n hasPlugin(pluginConfig: PluginConfig): boolean {\n if (typeof pluginConfig === \"string\") {\n return this.plugins.has(pluginConfig);\n } else {\n const [pluginName, pluginOptions] = pluginConfig;\n if (!this.hasPlugin(pluginName)) {\n return false;\n }\n const actualOptions = this.plugins.get(pluginName);\n for (const key of Object.keys(\n pluginOptions,\n ) as (keyof typeof pluginOptions)[]) {\n if (actualOptions?.[key] !== pluginOptions[key]) {\n return false;\n }\n }\n return true;\n }\n }\n\n getPluginOption<\n PluginName extends ParserPluginWithOptions[0],\n OptionName extends keyof PluginOptions,\n >(plugin: PluginName, name: OptionName) {\n return (this.plugins.get(plugin) as null | PluginOptions)?.[\n name\n ];\n }\n}\n","import * as charCodes from \"charcodes\";\n\n// Matches a whole line break (where CRLF is considered a single\n// line break). Used to count lines.\nexport const lineBreak = /\\r\\n|[\\r\\n\\u2028\\u2029]/;\nexport const lineBreakG = new RegExp(lineBreak.source, \"g\");\n\n// https://tc39.github.io/ecma262/#sec-line-terminators\nexport function isNewLine(code: number): boolean {\n switch (code) {\n case charCodes.lineFeed:\n case charCodes.carriageReturn:\n case charCodes.lineSeparator:\n case charCodes.paragraphSeparator:\n return true;\n\n default:\n return false;\n }\n}\n\nexport function hasNewLine(input: string, start: number, end: number): boolean {\n for (let i = start; i < end; i++) {\n if (isNewLine(input.charCodeAt(i))) {\n return true;\n }\n }\n return false;\n}\n\nexport const skipWhiteSpace = /(?:\\s|\\/\\/.*|\\/\\*[^]*?\\*\\/)*/g;\n\nexport const skipWhiteSpaceInLine =\n /(?:[^\\S\\n\\r\\u2028\\u2029]|\\/\\/.*|\\/\\*.*?\\*\\/)*/g;\n\n// https://tc39.github.io/ecma262/#sec-white-space\nexport function isWhitespace(code: number): boolean {\n switch (code) {\n case 0x0009: // CHARACTER TABULATION\n case 0x000b: // LINE TABULATION\n case 0x000c: // FORM FEED\n case charCodes.space:\n case charCodes.nonBreakingSpace:\n case charCodes.oghamSpaceMark:\n case 0x2000: // EN QUAD\n case 0x2001: // EM QUAD\n case 0x2002: // EN SPACE\n case 0x2003: // EM SPACE\n case 0x2004: // THREE-PER-EM SPACE\n case 0x2005: // FOUR-PER-EM SPACE\n case 0x2006: // SIX-PER-EM SPACE\n case 0x2007: // FIGURE SPACE\n case 0x2008: // PUNCTUATION SPACE\n case 0x2009: // THIN SPACE\n case 0x200a: // HAIR SPACE\n case 0x202f: // NARROW NO-BREAK SPACE\n case 0x205f: // MEDIUM MATHEMATICAL SPACE\n case 0x3000: // IDEOGRAPHIC SPACE\n case 0xfeff: // ZERO WIDTH NO-BREAK SPACE\n return true;\n\n default:\n return false;\n }\n}\n","import type { Options } from \"../options.ts\";\nimport type { CommentWhitespace } from \"../parser/comments\";\nimport { Position } from \"../util/location.ts\";\n\nimport { types as ct, type TokContext } from \"./context.ts\";\nimport { tt, type TokenType } from \"./types.ts\";\nimport type { Errors } from \"../parse-error.ts\";\nimport type { ParseError } from \"../parse-error.ts\";\n\nexport type DeferredStrictError =\n | typeof Errors.StrictNumericEscape\n | typeof Errors.StrictOctalLiteral;\n\ntype TopicContextState = {\n // When a topic binding has been currently established,\n // then this is 1. Otherwise, it is 0. This is forwards compatible\n // with a future plugin for multiple lexical topics.\n maxNumOfResolvableTopics: number;\n // When a topic binding has been currently established, and if that binding\n // has been used as a topic reference `#`, then this is 0. Otherwise, it is\n // `null`. This is forwards compatible with a future plugin for multiple\n // lexical topics.\n maxTopicIndex: null | 0;\n};\n\nexport const enum LoopLabelKind {\n Loop = 1,\n Switch = 2,\n}\n\ndeclare const bit: import(\"../../../../scripts/babel-plugin-bit-decorator/types.d.ts\").BitDecorator;\n\nexport default class State {\n @bit.storage flags: number;\n\n @bit accessor strict = false;\n\n curLine: number;\n lineStart: number;\n\n // And, if locations are used, the {line, column} object\n // corresponding to those offsets\n startLoc: Position;\n endLoc: Position;\n\n init({ strictMode, sourceType, startLine, startColumn }: Options): void {\n this.strict =\n strictMode === false\n ? false\n : strictMode === true\n ? true\n : sourceType === \"module\";\n\n this.curLine = startLine;\n this.lineStart = -startColumn;\n this.startLoc = this.endLoc = new Position(startLine, startColumn, 0);\n }\n\n errors: ParseError[] = [];\n\n // Used to signify the start of a potential arrow function\n potentialArrowAt: number = -1;\n\n // Used to signify the start of an expression which looks like a\n // typed arrow function, but it isn't\n // e.g. a ? (b) : c => d\n // ^\n noArrowAt: number[] = [];\n\n // Used to signify the start of an expression whose params, if it looks like\n // an arrow function, shouldn't be converted to assignable nodes.\n // This is used to defer the validation of typed arrow functions inside\n // conditional expressions.\n // e.g. a ? (b) : c => d\n // ^\n noArrowParamsConversionAt: number[] = [];\n\n // Flags to track\n @bit accessor maybeInArrowParameters = false;\n @bit accessor inType = false;\n @bit accessor noAnonFunctionType = false;\n @bit accessor hasFlowComment = false;\n @bit accessor isAmbientContext = false;\n @bit accessor inAbstractClass = false;\n @bit accessor inDisallowConditionalTypesContext = false;\n\n // For the Hack-style pipelines plugin\n topicContext: TopicContextState = {\n maxNumOfResolvableTopics: 0,\n maxTopicIndex: null,\n };\n\n // For the F#-style pipelines plugin\n @bit accessor soloAwait = false;\n @bit accessor inFSharpPipelineDirectBody = false;\n\n // Labels in scope.\n labels: Array<{\n kind: LoopLabelKind;\n name?: string | null;\n statementStart?: number;\n }> = [];\n\n commentsLen = 0;\n // Comment attachment store\n commentStack: Array = [];\n\n // The current position of the tokenizer in the input.\n pos: number = 0;\n\n // Properties of the current token:\n // Its type\n type: TokenType = tt.eof;\n\n // For tokens that include more information than their type, the value\n value: any = null;\n\n // Its start and end offset\n start: number = 0;\n end: number = 0;\n\n // Position information for the previous token\n // this is initialized when generating the second token.\n lastTokEndLoc: Position = null;\n // this is initialized when generating the second token.\n lastTokStartLoc: Position = null;\n\n // The context stack is used to track whether the apostrophe \"`\" starts\n // or ends a string template\n context: Array = [ct.brace];\n\n // Used to track whether a JSX element is allowed to form\n @bit accessor canStartJSXElement = true;\n\n // Used to signal to callers of `readWord1` whether the word\n // contained any escape sequences. This is needed because words with\n // escape sequences must not be interpreted as keywords.\n @bit accessor containsEsc = false;\n\n // Used to track invalid escape sequences in template literals,\n // that must be reported if the template is not tagged.\n firstInvalidTemplateEscapePos: null | Position = null;\n\n @bit accessor hasTopLevelAwait = false;\n\n // This property is used to track the following errors\n // - StrictNumericEscape\n // - StrictOctalLiteral\n //\n // in a literal that occurs prior to/immediately after a \"use strict\" directive.\n\n // todo(JLHwung): set strictErrors to null and avoid recording string errors\n // after a non-directive is parsed\n strictErrors: Map = new Map();\n\n // Tokens length in token store\n tokensLength: number = 0;\n\n /**\n * When we add a new property, we must manually update the `clone` method\n * @see State#clone\n */\n\n curPosition(): Position {\n return new Position(this.curLine, this.pos - this.lineStart, this.pos);\n }\n\n clone(): State {\n const state = new State();\n state.flags = this.flags;\n state.curLine = this.curLine;\n state.lineStart = this.lineStart;\n state.startLoc = this.startLoc;\n state.endLoc = this.endLoc;\n state.errors = this.errors.slice();\n state.potentialArrowAt = this.potentialArrowAt;\n state.noArrowAt = this.noArrowAt.slice();\n state.noArrowParamsConversionAt = this.noArrowParamsConversionAt.slice();\n state.topicContext = this.topicContext;\n state.labels = this.labels.slice();\n state.commentsLen = this.commentsLen;\n state.commentStack = this.commentStack.slice();\n state.pos = this.pos;\n state.type = this.type;\n state.value = this.value;\n state.start = this.start;\n state.end = this.end;\n state.lastTokEndLoc = this.lastTokEndLoc;\n state.lastTokStartLoc = this.lastTokStartLoc;\n state.context = this.context.slice();\n state.firstInvalidTemplateEscapePos = this.firstInvalidTemplateEscapePos;\n state.strictErrors = this.strictErrors;\n state.tokensLength = this.tokensLength;\n\n return state;\n }\n}\n\nexport type LookaheadState = {\n pos: number;\n value: any;\n type: TokenType;\n start: number;\n end: number;\n context: TokContext[];\n startLoc: Position;\n lastTokEndLoc: Position;\n curLine: number;\n lineStart: number;\n curPosition: () => Position;\n /* Used only in readToken_mult_modulo */\n inType: boolean;\n // These boolean properties are not initialized in createLookaheadState()\n // instead they will only be set by the tokenizer\n containsEsc?: boolean;\n};\n","/*:: declare var invariant; */\n\nimport type { Options } from \"../options.ts\";\nimport {\n Position,\n SourceLocation,\n createPositionWithColumnOffset,\n} from \"../util/location.ts\";\nimport CommentsParser, { type CommentWhitespace } from \"../parser/comments.ts\";\nimport type * as N from \"../types.ts\";\nimport * as charCodes from \"charcodes\";\nimport { isIdentifierStart, isIdentifierChar } from \"../util/identifier.ts\";\nimport {\n tokenIsKeyword,\n tokenLabelName,\n tt,\n keywords as keywordTypes,\n type TokenType,\n} from \"./types.ts\";\nimport type { TokContext } from \"./context.ts\";\nimport {\n Errors,\n type ParseError,\n type ParseErrorConstructor,\n} from \"../parse-error.ts\";\nimport {\n lineBreakG,\n isNewLine,\n isWhitespace,\n skipWhiteSpace,\n skipWhiteSpaceInLine,\n} from \"../util/whitespace.ts\";\nimport State from \"./state.ts\";\nimport type { LookaheadState, DeferredStrictError } from \"./state.ts\";\nimport type { Undone } from \"../parser/node.ts\";\nimport type { Node } from \"../types.ts\";\n\nimport {\n readInt,\n readCodePoint,\n readStringContents,\n type IntErrorHandlers,\n type CodePointErrorHandlers,\n type StringContentsErrorHandlers,\n} from \"@babel/helper-string-parser\";\n\nimport type { Plugin } from \"../typings.ts\";\n\nfunction buildPosition(pos: number, lineStart: number, curLine: number) {\n return new Position(curLine, pos - lineStart, pos);\n}\n\nconst VALID_REGEX_FLAGS = new Set([\n charCodes.lowercaseG,\n charCodes.lowercaseM,\n charCodes.lowercaseS,\n charCodes.lowercaseI,\n charCodes.lowercaseY,\n charCodes.lowercaseU,\n charCodes.lowercaseD,\n charCodes.lowercaseV,\n]);\n\n// Object type used to represent tokens. Note that normally, tokens\n// simply exist as properties on the parser object. This is only\n// used for the onToken callback and the external tokenizer.\n\nexport class Token {\n constructor(state: State) {\n this.type = state.type;\n this.value = state.value;\n this.start = state.start;\n this.end = state.end;\n this.loc = new SourceLocation(state.startLoc, state.endLoc);\n }\n\n declare type: TokenType;\n declare value: any;\n declare start: number;\n declare end: number;\n declare loc: SourceLocation;\n}\n\n// ## Tokenizer\n\nexport default abstract class Tokenizer extends CommentsParser {\n isLookahead: boolean;\n\n // Token store.\n tokens: Array = [];\n\n constructor(options: Options, input: string) {\n super();\n this.state = new State();\n this.state.init(options);\n this.input = input;\n this.length = input.length;\n this.comments = [];\n this.isLookahead = false;\n }\n\n pushToken(token: Token | N.Comment) {\n // Pop out invalid tokens trapped by try-catch parsing.\n // Those parsing branches are mainly created by typescript and flow plugins.\n this.tokens.length = this.state.tokensLength;\n this.tokens.push(token);\n ++this.state.tokensLength;\n }\n\n // Move to the next token\n\n next(): void {\n this.checkKeywordEscapes();\n if (this.options.tokens) {\n this.pushToken(new Token(this.state));\n }\n\n this.state.lastTokEndLoc = this.state.endLoc;\n this.state.lastTokStartLoc = this.state.startLoc;\n this.nextToken();\n }\n\n eat(type: TokenType): boolean {\n if (this.match(type)) {\n this.next();\n return true;\n } else {\n return false;\n }\n }\n\n /**\n * Whether current token matches given type\n */\n match(type: TokenType): boolean {\n return this.state.type === type;\n }\n\n /**\n * Create a LookaheadState from current parser state\n */\n createLookaheadState(state: State): LookaheadState {\n return {\n pos: state.pos,\n value: null,\n type: state.type,\n start: state.start,\n end: state.end,\n context: [this.curContext()],\n inType: state.inType,\n startLoc: state.startLoc,\n lastTokEndLoc: state.lastTokEndLoc,\n curLine: state.curLine,\n lineStart: state.lineStart,\n curPosition: state.curPosition,\n };\n }\n\n /**\n * lookahead peeks the next token, skipping changes to token context and\n * comment stack. For performance it returns a limited LookaheadState\n * instead of full parser state.\n *\n * The { column, line } Loc info is not included in lookahead since such usage\n * is rare. Although it may return other location properties e.g. `curLine` and\n * `lineStart`, these properties are not listed in the LookaheadState interface\n * and thus the returned value is _NOT_ reliable.\n *\n * The tokenizer should make best efforts to avoid using any parser state\n * other than those defined in LookaheadState\n */\n lookahead(): LookaheadState {\n const old = this.state;\n // @ts-expect-error For performance we use a simplified tokenizer state structure\n this.state = this.createLookaheadState(old);\n\n this.isLookahead = true;\n this.nextToken();\n this.isLookahead = false;\n\n const curr = this.state;\n this.state = old;\n return curr;\n }\n\n nextTokenStart(): number {\n return this.nextTokenStartSince(this.state.pos);\n }\n\n nextTokenStartSince(pos: number): number {\n skipWhiteSpace.lastIndex = pos;\n return skipWhiteSpace.test(this.input) ? skipWhiteSpace.lastIndex : pos;\n }\n\n lookaheadCharCode(): number {\n return this.input.charCodeAt(this.nextTokenStart());\n }\n\n /**\n * Similar to nextToken, but it will stop at line break when it is seen before the next token\n *\n * @returns {number} position of the next token start or line break, whichever is seen first.\n * @memberof Tokenizer\n */\n nextTokenInLineStart(): number {\n return this.nextTokenInLineStartSince(this.state.pos);\n }\n\n nextTokenInLineStartSince(pos: number): number {\n skipWhiteSpaceInLine.lastIndex = pos;\n return skipWhiteSpaceInLine.test(this.input)\n ? skipWhiteSpaceInLine.lastIndex\n : pos;\n }\n\n /**\n * Similar to lookaheadCharCode, but it will return the char code of line break if it is\n * seen before the next token\n *\n * @returns {number} char code of the next token start or line break, whichever is seen first.\n * @memberof Tokenizer\n */\n lookaheadInLineCharCode(): number {\n return this.input.charCodeAt(this.nextTokenInLineStart());\n }\n\n codePointAtPos(pos: number): number {\n // The implementation is based on\n // https://source.chromium.org/chromium/chromium/src/+/master:v8/src/builtins/builtins-string-gen.cc;l=1455;drc=221e331b49dfefadbc6fa40b0c68e6f97606d0b3;bpv=0;bpt=1\n // We reimplement `codePointAt` because `codePointAt` is a V8 builtin which is not inlined by TurboFan (as of M91)\n // since `input` is mostly ASCII, an inlined `charCodeAt` wins here\n let cp = this.input.charCodeAt(pos);\n if ((cp & 0xfc00) === 0xd800 && ++pos < this.input.length) {\n const trail = this.input.charCodeAt(pos);\n if ((trail & 0xfc00) === 0xdc00) {\n cp = 0x10000 + ((cp & 0x3ff) << 10) + (trail & 0x3ff);\n }\n }\n return cp;\n }\n\n // Toggle strict mode. Re-reads the next number or string to please\n // pedantic tests (`\"use strict\"; 010;` should fail).\n\n setStrict(strict: boolean): void {\n this.state.strict = strict;\n if (strict) {\n // Throw an error for any string decimal escape found before/immediately\n // after a \"use strict\" directive. Strict mode will be set at parse\n // time for any literals that occur after the next node of the strict\n // directive.\n this.state.strictErrors.forEach(([toParseError, at]) =>\n this.raise(toParseError, at),\n );\n this.state.strictErrors.clear();\n }\n }\n\n curContext(): TokContext {\n return this.state.context[this.state.context.length - 1];\n }\n\n // Read a single token, updating the parser object's token-related properties.\n nextToken(): void {\n this.skipSpace();\n this.state.start = this.state.pos;\n if (!this.isLookahead) this.state.startLoc = this.state.curPosition();\n if (this.state.pos >= this.length) {\n this.finishToken(tt.eof);\n return;\n }\n\n this.getTokenFromCode(this.codePointAtPos(this.state.pos));\n }\n\n // Skips a block comment, whose end is marked by commentEnd.\n // *-/ is used by the Flow plugin, when parsing block comments nested\n // inside Flow comments.\n skipBlockComment(commentEnd: \"*/\" | \"*-/\"): N.CommentBlock | undefined {\n let startLoc;\n if (!this.isLookahead) startLoc = this.state.curPosition();\n const start = this.state.pos;\n const end = this.input.indexOf(commentEnd, start + 2);\n if (end === -1) {\n // We have to call this again here because startLoc may not be set...\n // This seems to be for performance reasons:\n // https://github.com/babel/babel/commit/acf2a10899f696a8aaf34df78bf9725b5ea7f2da\n throw this.raise(Errors.UnterminatedComment, this.state.curPosition());\n }\n\n this.state.pos = end + commentEnd.length;\n lineBreakG.lastIndex = start + 2;\n while (lineBreakG.test(this.input) && lineBreakG.lastIndex <= end) {\n ++this.state.curLine;\n this.state.lineStart = lineBreakG.lastIndex;\n }\n\n // If we are doing a lookahead right now we need to advance the position (above code)\n // but we do not want to push the comment to the state.\n if (this.isLookahead) return;\n /*:: invariant(startLoc) */\n\n const comment: N.CommentBlock = {\n type: \"CommentBlock\",\n value: this.input.slice(start + 2, end),\n start,\n end: end + commentEnd.length,\n loc: new SourceLocation(startLoc, this.state.curPosition()),\n };\n if (this.options.tokens) this.pushToken(comment);\n return comment;\n }\n\n skipLineComment(startSkip: number): N.CommentLine | undefined {\n const start = this.state.pos;\n let startLoc;\n if (!this.isLookahead) startLoc = this.state.curPosition();\n let ch = this.input.charCodeAt((this.state.pos += startSkip));\n if (this.state.pos < this.length) {\n while (!isNewLine(ch) && ++this.state.pos < this.length) {\n ch = this.input.charCodeAt(this.state.pos);\n }\n }\n\n // If we are doing a lookahead right now we need to advance the position (above code)\n // but we do not want to push the comment to the state.\n if (this.isLookahead) return;\n\n const end = this.state.pos;\n const value = this.input.slice(start + startSkip, end);\n\n const comment: N.CommentLine = {\n type: \"CommentLine\",\n value,\n start,\n end,\n loc: new SourceLocation(startLoc, this.state.curPosition()),\n };\n if (this.options.tokens) this.pushToken(comment);\n return comment;\n }\n\n // Called at the start of the parse and after every token. Skips\n // whitespace and comments, and.\n\n skipSpace(): void {\n const spaceStart = this.state.pos;\n const comments = [];\n loop: while (this.state.pos < this.length) {\n const ch = this.input.charCodeAt(this.state.pos);\n switch (ch) {\n case charCodes.space:\n case charCodes.nonBreakingSpace:\n case charCodes.tab:\n ++this.state.pos;\n break;\n case charCodes.carriageReturn:\n if (\n this.input.charCodeAt(this.state.pos + 1) === charCodes.lineFeed\n ) {\n ++this.state.pos;\n }\n // fall through\n case charCodes.lineFeed:\n case charCodes.lineSeparator:\n case charCodes.paragraphSeparator:\n ++this.state.pos;\n ++this.state.curLine;\n this.state.lineStart = this.state.pos;\n break;\n\n case charCodes.slash:\n switch (this.input.charCodeAt(this.state.pos + 1)) {\n case charCodes.asterisk: {\n const comment = this.skipBlockComment(\"*/\");\n if (comment !== undefined) {\n this.addComment(comment);\n if (this.options.attachComment) comments.push(comment);\n }\n break;\n }\n\n case charCodes.slash: {\n const comment = this.skipLineComment(2);\n if (comment !== undefined) {\n this.addComment(comment);\n if (this.options.attachComment) comments.push(comment);\n }\n break;\n }\n\n default:\n break loop;\n }\n break;\n\n default:\n if (isWhitespace(ch)) {\n ++this.state.pos;\n } else if (\n ch === charCodes.dash &&\n !this.inModule &&\n this.options.annexB\n ) {\n const pos = this.state.pos;\n if (\n this.input.charCodeAt(pos + 1) === charCodes.dash &&\n this.input.charCodeAt(pos + 2) === charCodes.greaterThan &&\n (spaceStart === 0 || this.state.lineStart > spaceStart)\n ) {\n // A `-->` line comment\n const comment = this.skipLineComment(3);\n if (comment !== undefined) {\n this.addComment(comment);\n if (this.options.attachComment) comments.push(comment);\n }\n } else {\n break loop;\n }\n } else if (\n ch === charCodes.lessThan &&\n !this.inModule &&\n this.options.annexB\n ) {\n const pos = this.state.pos;\n if (\n this.input.charCodeAt(pos + 1) === charCodes.exclamationMark &&\n this.input.charCodeAt(pos + 2) === charCodes.dash &&\n this.input.charCodeAt(pos + 3) === charCodes.dash\n ) {\n // ` * (any, kinda silly)\n// ~2, ~2.x, ~2.x.x, ~>2, ~>2.x ~>2.x.x --> >=2.0.0 <3.0.0\n// ~2.0, ~2.0.x, ~>2.0, ~>2.0.x --> >=2.0.0 <2.1.0\n// ~1.2, ~1.2.x, ~>1.2, ~>1.2.x --> >=1.2.0 <1.3.0\n// ~1.2.3, ~>1.2.3 --> >=1.2.3 <1.3.0\n// ~1.2.0, ~>1.2.0 --> >=1.2.0 <1.3.0\nfunction replaceTildes (comp, options) {\n return comp.trim().split(/\\s+/).map(function (comp) {\n return replaceTilde(comp, options)\n }).join(' ')\n}\n\nfunction replaceTilde (comp, options) {\n var r = options.loose ? safeRe[t.TILDELOOSE] : safeRe[t.TILDE]\n return comp.replace(r, function (_, M, m, p, pr) {\n debug('tilde', comp, _, M, m, p, pr)\n var ret\n\n if (isX(M)) {\n ret = ''\n } else if (isX(m)) {\n ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0'\n } else if (isX(p)) {\n // ~1.2 == >=1.2.0 <1.3.0\n ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0'\n } else if (pr) {\n debug('replaceTilde pr', pr)\n ret = '>=' + M + '.' + m + '.' + p + '-' + pr +\n ' <' + M + '.' + (+m + 1) + '.0'\n } else {\n // ~1.2.3 == >=1.2.3 <1.3.0\n ret = '>=' + M + '.' + m + '.' + p +\n ' <' + M + '.' + (+m + 1) + '.0'\n }\n\n debug('tilde return', ret)\n return ret\n })\n}\n\n// ^ --> * (any, kinda silly)\n// ^2, ^2.x, ^2.x.x --> >=2.0.0 <3.0.0\n// ^2.0, ^2.0.x --> >=2.0.0 <3.0.0\n// ^1.2, ^1.2.x --> >=1.2.0 <2.0.0\n// ^1.2.3 --> >=1.2.3 <2.0.0\n// ^1.2.0 --> >=1.2.0 <2.0.0\nfunction replaceCarets (comp, options) {\n return comp.trim().split(/\\s+/).map(function (comp) {\n return replaceCaret(comp, options)\n }).join(' ')\n}\n\nfunction replaceCaret (comp, options) {\n debug('caret', comp, options)\n var r = options.loose ? safeRe[t.CARETLOOSE] : safeRe[t.CARET]\n return comp.replace(r, function (_, M, m, p, pr) {\n debug('caret', comp, _, M, m, p, pr)\n var ret\n\n if (isX(M)) {\n ret = ''\n } else if (isX(m)) {\n ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0'\n } else if (isX(p)) {\n if (M === '0') {\n ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0'\n } else {\n ret = '>=' + M + '.' + m + '.0 <' + (+M + 1) + '.0.0'\n }\n } else if (pr) {\n debug('replaceCaret pr', pr)\n if (M === '0') {\n if (m === '0') {\n ret = '>=' + M + '.' + m + '.' + p + '-' + pr +\n ' <' + M + '.' + m + '.' + (+p + 1)\n } else {\n ret = '>=' + M + '.' + m + '.' + p + '-' + pr +\n ' <' + M + '.' + (+m + 1) + '.0'\n }\n } else {\n ret = '>=' + M + '.' + m + '.' + p + '-' + pr +\n ' <' + (+M + 1) + '.0.0'\n }\n } else {\n debug('no pr')\n if (M === '0') {\n if (m === '0') {\n ret = '>=' + M + '.' + m + '.' + p +\n ' <' + M + '.' + m + '.' + (+p + 1)\n } else {\n ret = '>=' + M + '.' + m + '.' + p +\n ' <' + M + '.' + (+m + 1) + '.0'\n }\n } else {\n ret = '>=' + M + '.' + m + '.' + p +\n ' <' + (+M + 1) + '.0.0'\n }\n }\n\n debug('caret return', ret)\n return ret\n })\n}\n\nfunction replaceXRanges (comp, options) {\n debug('replaceXRanges', comp, options)\n return comp.split(/\\s+/).map(function (comp) {\n return replaceXRange(comp, options)\n }).join(' ')\n}\n\nfunction replaceXRange (comp, options) {\n comp = comp.trim()\n var r = options.loose ? safeRe[t.XRANGELOOSE] : safeRe[t.XRANGE]\n return comp.replace(r, function (ret, gtlt, M, m, p, pr) {\n debug('xRange', comp, ret, gtlt, M, m, p, pr)\n var xM = isX(M)\n var xm = xM || isX(m)\n var xp = xm || isX(p)\n var anyX = xp\n\n if (gtlt === '=' && anyX) {\n gtlt = ''\n }\n\n // if we're including prereleases in the match, then we need\n // to fix this to -0, the lowest possible prerelease value\n pr = options.includePrerelease ? '-0' : ''\n\n if (xM) {\n if (gtlt === '>' || gtlt === '<') {\n // nothing is allowed\n ret = '<0.0.0-0'\n } else {\n // nothing is forbidden\n ret = '*'\n }\n } else if (gtlt && anyX) {\n // we know patch is an x, because we have any x at all.\n // replace X with 0\n if (xm) {\n m = 0\n }\n p = 0\n\n if (gtlt === '>') {\n // >1 => >=2.0.0\n // >1.2 => >=1.3.0\n // >1.2.3 => >= 1.2.4\n gtlt = '>='\n if (xm) {\n M = +M + 1\n m = 0\n p = 0\n } else {\n m = +m + 1\n p = 0\n }\n } else if (gtlt === '<=') {\n // <=0.7.x is actually <0.8.0, since any 0.7.x should\n // pass. Similarly, <=7.x is actually <8.0.0, etc.\n gtlt = '<'\n if (xm) {\n M = +M + 1\n } else {\n m = +m + 1\n }\n }\n\n ret = gtlt + M + '.' + m + '.' + p + pr\n } else if (xm) {\n ret = '>=' + M + '.0.0' + pr + ' <' + (+M + 1) + '.0.0' + pr\n } else if (xp) {\n ret = '>=' + M + '.' + m + '.0' + pr +\n ' <' + M + '.' + (+m + 1) + '.0' + pr\n }\n\n debug('xRange return', ret)\n\n return ret\n })\n}\n\n// Because * is AND-ed with everything else in the comparator,\n// and '' means \"any version\", just remove the *s entirely.\nfunction replaceStars (comp, options) {\n debug('replaceStars', comp, options)\n // Looseness is ignored here. star is always as loose as it gets!\n return comp.trim().replace(safeRe[t.STAR], '')\n}\n\n// This function is passed to string.replace(re[t.HYPHENRANGE])\n// M, m, patch, prerelease, build\n// 1.2 - 3.4.5 => >=1.2.0 <=3.4.5\n// 1.2.3 - 3.4 => >=1.2.0 <3.5.0 Any 3.4.x will do\n// 1.2 - 3.4 => >=1.2.0 <3.5.0\nfunction hyphenReplace ($0,\n from, fM, fm, fp, fpr, fb,\n to, tM, tm, tp, tpr, tb) {\n if (isX(fM)) {\n from = ''\n } else if (isX(fm)) {\n from = '>=' + fM + '.0.0'\n } else if (isX(fp)) {\n from = '>=' + fM + '.' + fm + '.0'\n } else {\n from = '>=' + from\n }\n\n if (isX(tM)) {\n to = ''\n } else if (isX(tm)) {\n to = '<' + (+tM + 1) + '.0.0'\n } else if (isX(tp)) {\n to = '<' + tM + '.' + (+tm + 1) + '.0'\n } else if (tpr) {\n to = '<=' + tM + '.' + tm + '.' + tp + '-' + tpr\n } else {\n to = '<=' + to\n }\n\n return (from + ' ' + to).trim()\n}\n\n// if ANY of the sets match ALL of its comparators, then pass\nRange.prototype.test = function (version) {\n if (!version) {\n return false\n }\n\n if (typeof version === 'string') {\n try {\n version = new SemVer(version, this.options)\n } catch (er) {\n return false\n }\n }\n\n for (var i = 0; i < this.set.length; i++) {\n if (testSet(this.set[i], version, this.options)) {\n return true\n }\n }\n return false\n}\n\nfunction testSet (set, version, options) {\n for (var i = 0; i < set.length; i++) {\n if (!set[i].test(version)) {\n return false\n }\n }\n\n if (version.prerelease.length && !options.includePrerelease) {\n // Find the set of versions that are allowed to have prereleases\n // For example, ^1.2.3-pr.1 desugars to >=1.2.3-pr.1 <2.0.0\n // That should allow `1.2.3-pr.2` to pass.\n // However, `1.2.4-alpha.notready` should NOT be allowed,\n // even though it's within the range set by the comparators.\n for (i = 0; i < set.length; i++) {\n debug(set[i].semver)\n if (set[i].semver === ANY) {\n continue\n }\n\n if (set[i].semver.prerelease.length > 0) {\n var allowed = set[i].semver\n if (allowed.major === version.major &&\n allowed.minor === version.minor &&\n allowed.patch === version.patch) {\n return true\n }\n }\n }\n\n // Version has a -pre, but it's not one of the ones we like.\n return false\n }\n\n return true\n}\n\nexports.satisfies = satisfies\nfunction satisfies (version, range, options) {\n try {\n range = new Range(range, options)\n } catch (er) {\n return false\n }\n return range.test(version)\n}\n\nexports.maxSatisfying = maxSatisfying\nfunction maxSatisfying (versions, range, options) {\n var max = null\n var maxSV = null\n try {\n var rangeObj = new Range(range, options)\n } catch (er) {\n return null\n }\n versions.forEach(function (v) {\n if (rangeObj.test(v)) {\n // satisfies(v, range, options)\n if (!max || maxSV.compare(v) === -1) {\n // compare(max, v, true)\n max = v\n maxSV = new SemVer(max, options)\n }\n }\n })\n return max\n}\n\nexports.minSatisfying = minSatisfying\nfunction minSatisfying (versions, range, options) {\n var min = null\n var minSV = null\n try {\n var rangeObj = new Range(range, options)\n } catch (er) {\n return null\n }\n versions.forEach(function (v) {\n if (rangeObj.test(v)) {\n // satisfies(v, range, options)\n if (!min || minSV.compare(v) === 1) {\n // compare(min, v, true)\n min = v\n minSV = new SemVer(min, options)\n }\n }\n })\n return min\n}\n\nexports.minVersion = minVersion\nfunction minVersion (range, loose) {\n range = new Range(range, loose)\n\n var minver = new SemVer('0.0.0')\n if (range.test(minver)) {\n return minver\n }\n\n minver = new SemVer('0.0.0-0')\n if (range.test(minver)) {\n return minver\n }\n\n minver = null\n for (var i = 0; i < range.set.length; ++i) {\n var comparators = range.set[i]\n\n comparators.forEach(function (comparator) {\n // Clone to avoid manipulating the comparator's semver object.\n var compver = new SemVer(comparator.semver.version)\n switch (comparator.operator) {\n case '>':\n if (compver.prerelease.length === 0) {\n compver.patch++\n } else {\n compver.prerelease.push(0)\n }\n compver.raw = compver.format()\n /* fallthrough */\n case '':\n case '>=':\n if (!minver || gt(minver, compver)) {\n minver = compver\n }\n break\n case '<':\n case '<=':\n /* Ignore maximum versions */\n break\n /* istanbul ignore next */\n default:\n throw new Error('Unexpected operation: ' + comparator.operator)\n }\n })\n }\n\n if (minver && range.test(minver)) {\n return minver\n }\n\n return null\n}\n\nexports.validRange = validRange\nfunction validRange (range, options) {\n try {\n // Return '*' instead of '' so that truthiness works.\n // This will throw if it's invalid anyway\n return new Range(range, options).range || '*'\n } catch (er) {\n return null\n }\n}\n\n// Determine if version is less than all the versions possible in the range\nexports.ltr = ltr\nfunction ltr (version, range, options) {\n return outside(version, range, '<', options)\n}\n\n// Determine if version is greater than all the versions possible in the range.\nexports.gtr = gtr\nfunction gtr (version, range, options) {\n return outside(version, range, '>', options)\n}\n\nexports.outside = outside\nfunction outside (version, range, hilo, options) {\n version = new SemVer(version, options)\n range = new Range(range, options)\n\n var gtfn, ltefn, ltfn, comp, ecomp\n switch (hilo) {\n case '>':\n gtfn = gt\n ltefn = lte\n ltfn = lt\n comp = '>'\n ecomp = '>='\n break\n case '<':\n gtfn = lt\n ltefn = gte\n ltfn = gt\n comp = '<'\n ecomp = '<='\n break\n default:\n throw new TypeError('Must provide a hilo val of \"<\" or \">\"')\n }\n\n // If it satisifes the range it is not outside\n if (satisfies(version, range, options)) {\n return false\n }\n\n // From now on, variable terms are as if we're in \"gtr\" mode.\n // but note that everything is flipped for the \"ltr\" function.\n\n for (var i = 0; i < range.set.length; ++i) {\n var comparators = range.set[i]\n\n var high = null\n var low = null\n\n comparators.forEach(function (comparator) {\n if (comparator.semver === ANY) {\n comparator = new Comparator('>=0.0.0')\n }\n high = high || comparator\n low = low || comparator\n if (gtfn(comparator.semver, high.semver, options)) {\n high = comparator\n } else if (ltfn(comparator.semver, low.semver, options)) {\n low = comparator\n }\n })\n\n // If the edge version comparator has a operator then our version\n // isn't outside it\n if (high.operator === comp || high.operator === ecomp) {\n return false\n }\n\n // If the lowest version comparator has an operator and our version\n // is less than it then it isn't higher than the range\n if ((!low.operator || low.operator === comp) &&\n ltefn(version, low.semver)) {\n return false\n } else if (low.operator === ecomp && ltfn(version, low.semver)) {\n return false\n }\n }\n return true\n}\n\nexports.prerelease = prerelease\nfunction prerelease (version, options) {\n var parsed = parse(version, options)\n return (parsed && parsed.prerelease.length) ? parsed.prerelease : null\n}\n\nexports.intersects = intersects\nfunction intersects (r1, r2, options) {\n r1 = new Range(r1, options)\n r2 = new Range(r2, options)\n return r1.intersects(r2)\n}\n\nexports.coerce = coerce\nfunction coerce (version, options) {\n if (version instanceof SemVer) {\n return version\n }\n\n if (typeof version === 'number') {\n version = String(version)\n }\n\n if (typeof version !== 'string') {\n return null\n }\n\n options = options || {}\n\n var match = null\n if (!options.rtl) {\n match = version.match(safeRe[t.COERCE])\n } else {\n // Find the right-most coercible string that does not share\n // a terminus with a more left-ward coercible string.\n // Eg, '1.2.3.4' wants to coerce '2.3.4', not '3.4' or '4'\n //\n // Walk through the string checking with a /g regexp\n // Manually set the index so as to pick up overlapping matches.\n // Stop when we get a match that ends at the string end, since no\n // coercible string can be more right-ward without the same terminus.\n var next\n while ((next = safeRe[t.COERCERTL].exec(version)) &&\n (!match || match.index + match[0].length !== version.length)\n ) {\n if (!match ||\n next.index + next[0].length !== match.index + match[0].length) {\n match = next\n }\n safeRe[t.COERCERTL].lastIndex = next.index + next[1].length + next[2].length\n }\n // leave it in a clean state\n safeRe[t.COERCERTL].lastIndex = -1\n }\n\n if (match === null) {\n return null\n }\n\n return parse(match[2] +\n '.' + (match[3] || '0') +\n '.' + (match[4] || '0'), options)\n}\n","// env vars from the cli are always strings, so !!ENV_VAR returns true for \"false\"\nfunction bool(value) {\n if (value == null) return false;\n return value && value !== \"false\" && value !== \"0\";\n}\n\nmodule.exports = bool(process.env[\"BABEL_8_BREAKING\"])\n ? require(\"semver-BABEL_8_BREAKING-true\")\n : require(\"semver-BABEL_8_BREAKING-false\");\n","import assert from \"assert\";\nimport {\n callExpression,\n cloneNode,\n expressionStatement,\n identifier,\n importDeclaration,\n importDefaultSpecifier,\n importNamespaceSpecifier,\n importSpecifier,\n memberExpression,\n stringLiteral,\n variableDeclaration,\n variableDeclarator,\n} from \"@babel/types\";\nimport type * as t from \"@babel/types\";\nimport type { Scope, HubInterface } from \"@babel/traverse\";\n\n/**\n * A class to track and accumulate mutations to the AST that will eventually\n * output a new require/import statement list.\n */\nexport default class ImportBuilder {\n private _statements: t.Statement[] = [];\n private _resultName: t.Identifier | t.MemberExpression = null;\n\n declare _scope: Scope;\n declare _hub: HubInterface;\n private _importedSource: string;\n\n constructor(importedSource: string, scope: Scope, hub: HubInterface) {\n this._scope = scope;\n this._hub = hub;\n this._importedSource = importedSource;\n }\n\n done() {\n return {\n statements: this._statements,\n resultName: this._resultName,\n };\n }\n\n import() {\n this._statements.push(\n importDeclaration([], stringLiteral(this._importedSource)),\n );\n return this;\n }\n\n require() {\n this._statements.push(\n expressionStatement(\n callExpression(identifier(\"require\"), [\n stringLiteral(this._importedSource),\n ]),\n ),\n );\n return this;\n }\n\n namespace(name = \"namespace\") {\n const local = this._scope.generateUidIdentifier(name);\n\n const statement = this._statements[this._statements.length - 1];\n assert(statement.type === \"ImportDeclaration\");\n assert(statement.specifiers.length === 0);\n statement.specifiers = [importNamespaceSpecifier(local)];\n this._resultName = cloneNode(local);\n return this;\n }\n default(name: string) {\n const id = this._scope.generateUidIdentifier(name);\n const statement = this._statements[this._statements.length - 1];\n assert(statement.type === \"ImportDeclaration\");\n assert(statement.specifiers.length === 0);\n statement.specifiers = [importDefaultSpecifier(id)];\n this._resultName = cloneNode(id);\n return this;\n }\n named(name: string, importName: string) {\n if (importName === \"default\") return this.default(name);\n\n const id = this._scope.generateUidIdentifier(name);\n const statement = this._statements[this._statements.length - 1];\n assert(statement.type === \"ImportDeclaration\");\n assert(statement.specifiers.length === 0);\n statement.specifiers = [importSpecifier(id, identifier(importName))];\n this._resultName = cloneNode(id);\n return this;\n }\n\n var(name: string) {\n const id = this._scope.generateUidIdentifier(name);\n let statement = this._statements[this._statements.length - 1];\n if (statement.type !== \"ExpressionStatement\") {\n assert(this._resultName);\n statement = expressionStatement(this._resultName);\n this._statements.push(statement);\n }\n this._statements[this._statements.length - 1] = variableDeclaration(\"var\", [\n variableDeclarator(id, statement.expression),\n ]);\n this._resultName = cloneNode(id);\n return this;\n }\n\n defaultInterop() {\n return this._interop(this._hub.addHelper(\"interopRequireDefault\"));\n }\n wildcardInterop() {\n return this._interop(this._hub.addHelper(\"interopRequireWildcard\"));\n }\n\n _interop(callee: t.Expression) {\n const statement = this._statements[this._statements.length - 1];\n if (statement.type === \"ExpressionStatement\") {\n statement.expression = callExpression(callee, [statement.expression]);\n } else if (statement.type === \"VariableDeclaration\") {\n assert(statement.declarations.length === 1);\n statement.declarations[0].init = callExpression(callee, [\n statement.declarations[0].init,\n ]);\n } else {\n assert.fail(\"Unexpected type.\");\n }\n return this;\n }\n\n prop(name: string) {\n const statement = this._statements[this._statements.length - 1];\n if (statement.type === \"ExpressionStatement\") {\n statement.expression = memberExpression(\n statement.expression,\n identifier(name),\n );\n } else if (statement.type === \"VariableDeclaration\") {\n assert(statement.declarations.length === 1);\n statement.declarations[0].init = memberExpression(\n statement.declarations[0].init,\n identifier(name),\n );\n } else {\n assert.fail(\"Unexpected type:\" + statement.type);\n }\n return this;\n }\n\n read(name: string) {\n this._resultName = memberExpression(this._resultName, identifier(name));\n }\n}\n","import type { NodePath } from \"@babel/traverse\";\nimport type * as t from \"@babel/types\";\n\n/**\n * A small utility to check if a file qualifies as a module.\n */\nexport default function isModule(path: NodePath) {\n return path.node.sourceType === \"module\";\n}\n","import assert from \"assert\";\nimport {\n identifier,\n importSpecifier,\n numericLiteral,\n sequenceExpression,\n isImportDeclaration,\n} from \"@babel/types\";\nimport type * as t from \"@babel/types\";\nimport type { NodePath, Scope, HubInterface } from \"@babel/traverse\";\n\nimport ImportBuilder from \"./import-builder.ts\";\nimport isModule from \"./is-module.ts\";\n\nexport type ImportOptions = {\n /**\n * The module being referenced.\n */\n importedSource: string | null;\n /**\n * The type of module being imported:\n *\n * * 'es6' - An ES6 module.\n * * 'commonjs' - A CommonJS module. (Default)\n */\n importedType: \"es6\" | \"commonjs\";\n /**\n * The type of interop behavior for namespace/default/named when loading\n * CommonJS modules.\n *\n * ## 'babel' (Default)\n *\n * Load using Babel's interop.\n *\n * If '.__esModule' is true, treat as 'compiled', else:\n *\n * * Namespace: A copy of the module.exports with .default\n * populated by the module.exports object.\n * * Default: The module.exports value.\n * * Named: The .named property of module.exports.\n *\n * The 'ensureLiveReference' has no effect on the liveness of these.\n *\n * ## 'compiled'\n *\n * Assume the module is ES6 compiled to CommonJS. Useful to avoid injecting\n * interop logic if you are confident that the module is a certain format.\n *\n * * Namespace: The root module.exports object.\n * * Default: The .default property of the namespace.\n * * Named: The .named property of the namespace.\n *\n * Will return erroneous results if the imported module is _not_ compiled\n * from ES6 with Babel.\n *\n * ## 'uncompiled'\n *\n * Assume the module is _not_ ES6 compiled to CommonJS. Used a simplified\n * access pattern that doesn't require additional function calls.\n *\n * Will return erroneous results if the imported module _is_ compiled\n * from ES6 with Babel.\n *\n * * Namespace: The module.exports object.\n * * Default: The module.exports object.\n * * Named: The .named property of module.exports.\n */\n importedInterop: \"babel\" | \"node\" | \"compiled\" | \"uncompiled\";\n /**\n * The type of CommonJS interop included in the environment that will be\n * loading the output code.\n *\n * * 'babel' - CommonJS modules load with Babel's interop. (Default)\n * * 'node' - CommonJS modules load with Node's interop.\n *\n * See descriptions in 'importedInterop' for more details.\n */\n importingInterop: \"babel\" | \"node\";\n /**\n * Define whether we explicitly care that the import be a live reference.\n * Only applies when importing default and named imports, not the namespace.\n *\n * * true - Force imported values to be live references.\n * * false - No particular requirements. Keeps the code simplest. (Default)\n */\n ensureLiveReference: boolean;\n /**\n * Define if we explicitly care that the result not be a property reference.\n *\n * * true - Force calls to exclude context. Useful if the value is going to\n * be used as function callee.\n * * false - No particular requirements for context of the access. (Default)\n */\n ensureNoContext: boolean;\n /**\n * Define whether the import should be loaded before or after the existing imports.\n * \"after\" is only allowed inside ECMAScript modules, since it's not possible to\n * reliably pick the location _after_ require() calls but _before_ other code in CJS.\n */\n importPosition: \"before\" | \"after\";\n\n nameHint?: string;\n blockHoist?: number;\n};\n\n/**\n * A general helper classes add imports via transforms. See README for usage.\n */\nexport default class ImportInjector {\n /**\n * The path used for manipulation.\n */\n declare _programPath: NodePath;\n\n /**\n * The scope used to generate unique variable names.\n */\n declare _programScope: Scope;\n\n /**\n * The file used to inject helpers and resolve paths.\n */\n declare _hub: HubInterface;\n\n /**\n * The default options to use with this instance when imports are added.\n */\n _defaultOpts: ImportOptions = {\n importedSource: null,\n importedType: \"commonjs\",\n importedInterop: \"babel\",\n importingInterop: \"babel\",\n ensureLiveReference: false,\n ensureNoContext: false,\n importPosition: \"before\",\n };\n\n constructor(\n path: NodePath,\n importedSource?: string,\n opts?: Partial,\n ) {\n const programPath = path.find(p => p.isProgram()) as NodePath;\n\n this._programPath = programPath;\n this._programScope = programPath.scope;\n this._hub = programPath.hub;\n\n this._defaultOpts = this._applyDefaults(importedSource, opts, true);\n }\n\n addDefault(importedSourceIn: string, opts: Partial) {\n return this.addNamed(\"default\", importedSourceIn, opts);\n }\n\n addNamed(\n importName: string,\n importedSourceIn: string,\n opts: Partial,\n ) {\n assert(typeof importName === \"string\");\n\n return this._generateImport(\n this._applyDefaults(importedSourceIn, opts),\n importName,\n );\n }\n\n addNamespace(importedSourceIn: string, opts: Partial) {\n return this._generateImport(\n this._applyDefaults(importedSourceIn, opts),\n null,\n );\n }\n\n addSideEffect(importedSourceIn: string, opts: Partial) {\n return this._generateImport(\n this._applyDefaults(importedSourceIn, opts),\n void 0,\n );\n }\n\n _applyDefaults(\n importedSource: string | Partial,\n opts: Partial | undefined,\n isInit = false,\n ) {\n let newOpts: ImportOptions;\n if (typeof importedSource === \"string\") {\n newOpts = { ...this._defaultOpts, importedSource, ...opts };\n } else {\n assert(!opts, \"Unexpected secondary arguments.\");\n newOpts = { ...this._defaultOpts, ...importedSource };\n }\n\n if (!isInit && opts) {\n if (opts.nameHint !== undefined) newOpts.nameHint = opts.nameHint;\n if (opts.blockHoist !== undefined) newOpts.blockHoist = opts.blockHoist;\n }\n return newOpts;\n }\n\n _generateImport(\n opts: Partial,\n importName: string | null | undefined,\n ) {\n const isDefault = importName === \"default\";\n const isNamed = !!importName && !isDefault;\n const isNamespace = importName === null;\n\n const {\n importedSource,\n importedType,\n importedInterop,\n importingInterop,\n ensureLiveReference,\n ensureNoContext,\n nameHint,\n importPosition,\n\n // Not meant for public usage. Allows code that absolutely must control\n // ordering to set a specific hoist value on the import nodes.\n // This is ignored when \"importPosition\" is \"after\".\n blockHoist,\n } = opts;\n\n // Provide a hint for generateUidIdentifier for the local variable name\n // to use for the import, if the code will generate a simple assignment\n // to a variable.\n let name = nameHint || importName;\n\n const isMod = isModule(this._programPath);\n const isModuleForNode = isMod && importingInterop === \"node\";\n const isModuleForBabel = isMod && importingInterop === \"babel\";\n\n if (importPosition === \"after\" && !isMod) {\n throw new Error(`\"importPosition\": \"after\" is only supported in modules`);\n }\n\n const builder = new ImportBuilder(\n importedSource,\n this._programScope,\n this._hub,\n );\n\n if (importedType === \"es6\") {\n if (!isModuleForNode && !isModuleForBabel) {\n throw new Error(\"Cannot import an ES6 module from CommonJS\");\n }\n\n // import * as namespace from ''; namespace\n // import def from ''; def\n // import { named } from ''; named\n builder.import();\n if (isNamespace) {\n builder.namespace(nameHint || importedSource);\n } else if (isDefault || isNamed) {\n builder.named(name, importName);\n }\n } else if (importedType !== \"commonjs\") {\n throw new Error(`Unexpected interopType \"${importedType}\"`);\n } else if (importedInterop === \"babel\") {\n if (isModuleForNode) {\n // import _tmp from ''; var namespace = interopRequireWildcard(_tmp); namespace\n // import _tmp from ''; var def = interopRequireDefault(_tmp).default; def\n // import _tmp from ''; _tmp.named\n name = name !== \"default\" ? name : importedSource;\n const es6Default = `${importedSource}$es6Default`;\n\n builder.import();\n if (isNamespace) {\n builder\n .default(es6Default)\n .var(name || importedSource)\n .wildcardInterop();\n } else if (isDefault) {\n if (ensureLiveReference) {\n builder\n .default(es6Default)\n .var(name || importedSource)\n .defaultInterop()\n .read(\"default\");\n } else {\n builder\n .default(es6Default)\n .var(name)\n .defaultInterop()\n .prop(importName);\n }\n } else if (isNamed) {\n builder.default(es6Default).read(importName);\n }\n } else if (isModuleForBabel) {\n // import * as namespace from ''; namespace\n // import def from ''; def\n // import { named } from ''; named\n builder.import();\n if (isNamespace) {\n builder.namespace(name || importedSource);\n } else if (isDefault || isNamed) {\n builder.named(name, importName);\n }\n } else {\n // var namespace = interopRequireWildcard(require(''));\n // var def = interopRequireDefault(require('')).default; def\n // var named = require('').named; named\n builder.require();\n if (isNamespace) {\n builder.var(name || importedSource).wildcardInterop();\n } else if ((isDefault || isNamed) && ensureLiveReference) {\n if (isDefault) {\n name = name !== \"default\" ? name : importedSource;\n builder.var(name).read(importName);\n builder.defaultInterop();\n } else {\n builder.var(importedSource).read(importName);\n }\n } else if (isDefault) {\n builder.var(name).defaultInterop().prop(importName);\n } else if (isNamed) {\n builder.var(name).prop(importName);\n }\n }\n } else if (importedInterop === \"compiled\") {\n if (isModuleForNode) {\n // import namespace from ''; namespace\n // import namespace from ''; namespace.default\n // import namespace from ''; namespace.named\n\n builder.import();\n if (isNamespace) {\n builder.default(name || importedSource);\n } else if (isDefault || isNamed) {\n builder.default(importedSource).read(name);\n }\n } else if (isModuleForBabel) {\n // import * as namespace from ''; namespace\n // import def from ''; def\n // import { named } from ''; named\n // Note: These lookups will break if the module has no __esModule set,\n // hence the warning that 'compiled' will not work on standard CommonJS.\n\n builder.import();\n if (isNamespace) {\n builder.namespace(name || importedSource);\n } else if (isDefault || isNamed) {\n builder.named(name, importName);\n }\n } else {\n // var namespace = require(''); namespace\n // var namespace = require(''); namespace.default\n // var namespace = require(''); namespace.named\n // var named = require('').named;\n builder.require();\n if (isNamespace) {\n builder.var(name || importedSource);\n } else if (isDefault || isNamed) {\n if (ensureLiveReference) {\n builder.var(importedSource).read(name);\n } else {\n builder.prop(importName).var(name);\n }\n }\n }\n } else if (importedInterop === \"uncompiled\") {\n if (isDefault && ensureLiveReference) {\n throw new Error(\"No live reference for commonjs default\");\n }\n\n if (isModuleForNode) {\n // import namespace from ''; namespace\n // import def from ''; def;\n // import namespace from ''; namespace.named\n builder.import();\n if (isNamespace) {\n builder.default(name || importedSource);\n } else if (isDefault) {\n builder.default(name);\n } else if (isNamed) {\n builder.default(importedSource).read(name);\n }\n } else if (isModuleForBabel) {\n // import namespace from '';\n // import def from '';\n // import { named } from ''; named;\n // Note: These lookups will break if the module has __esModule set,\n // hence the warning that 'uncompiled' will not work on ES6 transpiled\n // to CommonJS.\n\n builder.import();\n if (isNamespace) {\n builder.default(name || importedSource);\n } else if (isDefault) {\n builder.default(name);\n } else if (isNamed) {\n builder.named(name, importName);\n }\n } else {\n // var namespace = require(''); namespace\n // var def = require(''); def\n // var namespace = require(''); namespace.named\n // var named = require('').named;\n builder.require();\n if (isNamespace) {\n builder.var(name || importedSource);\n } else if (isDefault) {\n builder.var(name);\n } else if (isNamed) {\n if (ensureLiveReference) {\n builder.var(importedSource).read(name);\n } else {\n builder.var(name).prop(importName);\n }\n }\n }\n } else {\n throw new Error(`Unknown importedInterop \"${importedInterop}\".`);\n }\n\n const { statements, resultName } = builder.done();\n\n this._insertStatements(statements, importPosition, blockHoist);\n\n if (\n (isDefault || isNamed) &&\n ensureNoContext &&\n resultName.type !== \"Identifier\"\n ) {\n return sequenceExpression([numericLiteral(0), resultName]);\n }\n return resultName;\n }\n\n _insertStatements(\n statements: t.Statement[],\n importPosition = \"before\",\n blockHoist = 3,\n ) {\n if (importPosition === \"after\") {\n if (this._insertStatementsAfter(statements)) return;\n } else {\n if (this._insertStatementsBefore(statements, blockHoist)) return;\n }\n\n this._programPath.unshiftContainer(\"body\", statements);\n }\n\n _insertStatementsBefore(statements: t.Statement[], blockHoist: number) {\n if (\n statements.length === 1 &&\n isImportDeclaration(statements[0]) &&\n isValueImport(statements[0])\n ) {\n const firstImportDecl = this._programPath\n .get(\"body\")\n .find((p): p is NodePath => {\n return p.isImportDeclaration() && isValueImport(p.node);\n });\n\n if (\n firstImportDecl?.node.source.value === statements[0].source.value &&\n maybeAppendImportSpecifiers(firstImportDecl.node, statements[0])\n ) {\n return true;\n }\n }\n\n statements.forEach(node => {\n // @ts-expect-error handle _blockHoist\n node._blockHoist = blockHoist;\n });\n\n const targetPath = this._programPath.get(\"body\").find(p => {\n // @ts-expect-error todo(flow->ts): avoid mutations\n const val = p.node._blockHoist;\n return Number.isFinite(val) && val < 4;\n });\n\n if (targetPath) {\n targetPath.insertBefore(statements);\n return true;\n }\n\n return false;\n }\n\n _insertStatementsAfter(statements: t.Statement[]): boolean {\n const statementsSet = new Set(statements);\n const importDeclarations: Map = new Map();\n\n for (const statement of statements) {\n if (isImportDeclaration(statement) && isValueImport(statement)) {\n const source = statement.source.value;\n if (!importDeclarations.has(source)) importDeclarations.set(source, []);\n importDeclarations.get(source).push(statement);\n }\n }\n\n let lastImportPath = null;\n for (const bodyStmt of this._programPath.get(\"body\")) {\n if (bodyStmt.isImportDeclaration() && isValueImport(bodyStmt.node)) {\n lastImportPath = bodyStmt;\n\n const source = bodyStmt.node.source.value;\n const newImports = importDeclarations.get(source);\n if (!newImports) continue;\n\n for (const decl of newImports) {\n if (!statementsSet.has(decl)) continue;\n if (maybeAppendImportSpecifiers(bodyStmt.node, decl)) {\n statementsSet.delete(decl);\n }\n }\n }\n }\n\n if (statementsSet.size === 0) return true;\n\n if (lastImportPath) lastImportPath.insertAfter(Array.from(statementsSet));\n\n return !!lastImportPath;\n }\n}\n\nfunction isValueImport(node: t.ImportDeclaration) {\n return node.importKind !== \"type\" && node.importKind !== \"typeof\";\n}\n\nfunction hasNamespaceImport(node: t.ImportDeclaration) {\n return (\n (node.specifiers.length === 1 &&\n node.specifiers[0].type === \"ImportNamespaceSpecifier\") ||\n (node.specifiers.length === 2 &&\n node.specifiers[1].type === \"ImportNamespaceSpecifier\")\n );\n}\n\nfunction hasDefaultImport(node: t.ImportDeclaration) {\n return (\n node.specifiers.length > 0 &&\n node.specifiers[0].type === \"ImportDefaultSpecifier\"\n );\n}\n\nfunction maybeAppendImportSpecifiers(\n target: t.ImportDeclaration,\n source: t.ImportDeclaration,\n): boolean {\n if (!target.specifiers.length) {\n target.specifiers = source.specifiers;\n return true;\n }\n if (!source.specifiers.length) return true;\n\n if (hasNamespaceImport(target) || hasNamespaceImport(source)) return false;\n\n if (hasDefaultImport(source)) {\n if (hasDefaultImport(target)) {\n source.specifiers[0] = importSpecifier(\n source.specifiers[0].local,\n identifier(\"default\"),\n );\n } else {\n target.specifiers.unshift(source.specifiers.shift());\n }\n }\n\n target.specifiers.push(...source.specifiers);\n\n return true;\n}\n","import { types as t } from \"@babel/core\";\nimport traverse, { visitors, type NodePath } from \"@babel/traverse\";\n\n/**\n * A lazily constructed visitor to walk the tree, rewriting all `this` references in the\n * top-level scope to be `void 0` (undefined).\n *\n */\nlet rewriteThisVisitor: Parameters[1];\n\nexport default function rewriteThis(programPath: NodePath) {\n if (!rewriteThisVisitor) {\n rewriteThisVisitor = visitors.environmentVisitor({\n ThisExpression(path) {\n path.replaceWith(t.unaryExpression(\"void\", t.numericLiteral(0), true));\n },\n });\n rewriteThisVisitor.noScope = true;\n }\n // Rewrite \"this\" to be \"undefined\".\n traverse(programPath.node, rewriteThisVisitor);\n}\n","import ImportInjector, { type ImportOptions } from \"./import-injector.ts\";\nimport type { NodePath } from \"@babel/traverse\";\nimport type * as t from \"@babel/types\";\n\nexport { ImportInjector };\n\nexport { default as isModule } from \"./is-module.ts\";\n\nexport function addDefault(\n path: NodePath,\n importedSource: string,\n opts?: Partial,\n) {\n return new ImportInjector(path).addDefault(importedSource, opts);\n}\n\nfunction addNamed(\n path: NodePath,\n name: string,\n importedSource: string,\n opts?: Omit<\n Partial,\n \"ensureLiveReference\" | \"ensureNoContext\"\n >,\n): t.Identifier;\nfunction addNamed(\n path: NodePath,\n name: string,\n importedSource: string,\n opts?: Omit, \"ensureLiveReference\"> & {\n ensureLiveReference: true;\n },\n): t.MemberExpression;\nfunction addNamed(\n path: NodePath,\n name: string,\n importedSource: string,\n opts?: Omit, \"ensureNoContext\"> & {\n ensureNoContext: true;\n },\n): t.SequenceExpression;\n/**\n * add a named import to the program path of given path\n *\n * @export\n * @param {NodePath} path The starting path to find a program path\n * @param {string} name The name of the generated binding. Babel will prefix it with `_`\n * @param {string} importedSource The source of the import\n * @param {Partial} [opts]\n * @returns {t.Identifier | t.MemberExpression | t.SequenceExpression} If opts.ensureNoContext is true, returns a SequenceExpression,\n * else if opts.ensureLiveReference is true, returns a MemberExpression, else returns an Identifier\n */\nfunction addNamed(\n path: NodePath,\n name: string,\n importedSource: string,\n opts?: Partial,\n) {\n return new ImportInjector(path).addNamed(name, importedSource, opts);\n}\nexport { addNamed };\n\nexport function addNamespace(\n path: NodePath,\n importedSource: string,\n opts?: Partial,\n) {\n return new ImportInjector(path).addNamespace(importedSource, opts);\n}\n\nexport function addSideEffect(\n path: NodePath,\n importedSource: string,\n opts?: Partial,\n) {\n return new ImportInjector(path).addSideEffect(importedSource, opts);\n}\n","import {\n LOGICAL_OPERATORS,\n assignmentExpression,\n binaryExpression,\n cloneNode,\n identifier,\n logicalExpression,\n numericLiteral,\n sequenceExpression,\n unaryExpression,\n} from \"@babel/types\";\nimport type * as t from \"@babel/types\";\nimport type { NodePath, Scope, Visitor } from \"@babel/traverse\";\n\ntype State = {\n scope: Scope;\n bindingNames: Set;\n seen: WeakSet;\n};\n\nconst simpleAssignmentVisitor: Visitor = {\n AssignmentExpression: {\n exit(path) {\n const { scope, seen, bindingNames } = this;\n\n if (path.node.operator === \"=\") return;\n\n if (seen.has(path.node)) return;\n seen.add(path.node);\n\n const left = path.get(\"left\");\n if (!left.isIdentifier()) return;\n\n // Simple update-assign foo += 1;\n // => exports.foo = (foo += 1);\n const localName = left.node.name;\n\n if (!bindingNames.has(localName)) return;\n\n // redeclared in this scope\n if (scope.getBinding(localName) !== path.scope.getBinding(localName)) {\n return;\n }\n\n const operator = path.node.operator.slice(0, -1);\n if (LOGICAL_OPERATORS.includes(operator)) {\n // &&, ||, ??\n // (foo &&= bar) => (foo && foo = bar)\n path.replaceWith(\n logicalExpression(\n // @ts-expect-error Guarded by LOGICAL_OPERATORS.includes\n operator,\n path.node.left,\n assignmentExpression(\n \"=\",\n cloneNode(path.node.left),\n path.node.right,\n ),\n ),\n );\n } else {\n // (foo += bar) => (foo = foo + bar)\n path.node.right = binaryExpression(\n // @ts-expect-error An assignment expression operator removing \"=\" must\n // be a valid binary operator\n operator,\n cloneNode(path.node.left),\n path.node.right,\n );\n path.node.operator = \"=\";\n }\n },\n },\n};\n\nif (!process.env.BABEL_8_BREAKING) {\n simpleAssignmentVisitor.UpdateExpression = {\n exit(path) {\n // @ts-expect-error This is Babel7-only\n if (!this.includeUpdateExpression) return;\n\n const { scope, bindingNames } = this;\n\n const arg = path.get(\"argument\");\n if (!arg.isIdentifier()) return;\n const localName = arg.node.name;\n\n if (!bindingNames.has(localName)) return;\n\n // redeclared in this scope\n if (scope.getBinding(localName) !== path.scope.getBinding(localName)) {\n return;\n }\n\n if (\n path.parentPath.isExpressionStatement() &&\n !path.isCompletionRecord()\n ) {\n // ++i => (i += 1);\n const operator = path.node.operator === \"++\" ? \"+=\" : \"-=\";\n path.replaceWith(\n assignmentExpression(operator, arg.node, numericLiteral(1)),\n );\n } else if (path.node.prefix) {\n // ++i => (i = (+i) + 1);\n path.replaceWith(\n assignmentExpression(\n \"=\",\n identifier(localName),\n binaryExpression(\n path.node.operator[0] as \"+\" | \"-\",\n unaryExpression(\"+\", arg.node),\n numericLiteral(1),\n ),\n ),\n );\n } else {\n const old = path.scope.generateUidIdentifierBasedOnNode(\n arg.node,\n \"old\",\n );\n const varName = old.name;\n path.scope.push({ id: old });\n\n const binary = binaryExpression(\n path.node.operator[0] as \"+\" | \"-\",\n identifier(varName),\n // todo: support bigint\n numericLiteral(1),\n );\n\n // i++ => (_old = (+i), i = _old + 1, _old)\n path.replaceWith(\n sequenceExpression([\n assignmentExpression(\n \"=\",\n identifier(varName),\n unaryExpression(\"+\", arg.node),\n ),\n assignmentExpression(\"=\", cloneNode(arg.node), binary),\n identifier(varName),\n ]),\n );\n }\n },\n };\n}\n\nexport default function simplifyAccess(\n path: NodePath,\n bindingNames: Set,\n) {\n if (process.env.BABEL_8_BREAKING) {\n path.traverse(simpleAssignmentVisitor, {\n scope: path.scope,\n bindingNames,\n seen: new WeakSet(),\n });\n } else {\n path.traverse(simpleAssignmentVisitor, {\n scope: path.scope,\n bindingNames,\n seen: new WeakSet(),\n // @ts-expect-error This is Babel7-only\n includeUpdateExpression: arguments[2] ?? true,\n });\n }\n}\n","import assert from \"assert\";\nimport { template, types as t } from \"@babel/core\";\nimport type { NodePath, Visitor, Scope } from \"@babel/core\";\nimport simplifyAccess from \"@babel/helper-simple-access\";\n\nimport type { ModuleMetadata } from \"./normalize-and-load-metadata.ts\";\n\ninterface RewriteReferencesVisitorState {\n exported: Map;\n metadata: ModuleMetadata;\n requeueInParent: (path: NodePath) => void;\n scope: Scope;\n imported: Map;\n buildImportReference: (\n [source, importName, localName]: readonly [string, string, string],\n identNode: t.Identifier | t.CallExpression | t.JSXIdentifier,\n ) => any;\n seen: WeakSet;\n}\n\ninterface RewriteBindingInitVisitorState {\n exported: Map;\n metadata: ModuleMetadata;\n requeueInParent: (path: NodePath) => void;\n scope: Scope;\n}\n\nfunction isInType(path: NodePath) {\n do {\n switch (path.parent.type) {\n case \"TSTypeAnnotation\":\n case \"TSTypeAliasDeclaration\":\n case \"TSTypeReference\":\n case \"TypeAnnotation\":\n case \"TypeAlias\":\n return true;\n case \"ExportSpecifier\":\n return (\n (\n path.parentPath.parent as\n | t.ExportDefaultDeclaration\n | t.ExportNamedDeclaration\n ).exportKind === \"type\"\n );\n default:\n if (path.parentPath.isStatement() || path.parentPath.isExpression()) {\n return false;\n }\n }\n } while ((path = path.parentPath));\n}\n\nexport default function rewriteLiveReferences(\n programPath: NodePath,\n metadata: ModuleMetadata,\n wrapReference: (ref: t.Expression, payload: unknown) => null | t.Expression,\n) {\n const imported = new Map();\n const exported = new Map();\n const requeueInParent = (path: NodePath) => {\n // Manually re-queue `exports.default =` expressions so that the ES3\n // transform has an opportunity to convert them. Ideally this would\n // happen automatically from the replaceWith above. See #4140 for\n // more info.\n programPath.requeue(path);\n };\n\n for (const [source, data] of metadata.source) {\n for (const [localName, importName] of data.imports) {\n imported.set(localName, [source, importName, null]);\n }\n for (const localName of data.importsNamespace) {\n imported.set(localName, [source, null, localName]);\n }\n }\n\n for (const [local, data] of metadata.local) {\n let exportMeta = exported.get(local);\n if (!exportMeta) {\n exportMeta = [];\n exported.set(local, exportMeta);\n }\n\n exportMeta.push(...data.names);\n }\n\n // Rewrite initialization of bindings to update exports.\n const rewriteBindingInitVisitorState: RewriteBindingInitVisitorState = {\n metadata,\n requeueInParent,\n scope: programPath.scope,\n exported, // local name => exported name list\n };\n programPath.traverse(\n // eslint-disable-next-line @typescript-eslint/no-use-before-define\n rewriteBindingInitVisitor,\n rewriteBindingInitVisitorState,\n );\n\n // NOTE(logan): The 'Array.from' calls are to make this code with in loose mode.\n const bindingNames = new Set([\n ...Array.from(imported.keys()),\n ...Array.from(exported.keys()),\n ]);\n if (process.env.BABEL_8_BREAKING) {\n simplifyAccess(programPath, bindingNames);\n } else {\n // @ts-ignore(Babel 7 vs Babel 8) The third param has been removed in Babel 8.\n simplifyAccess(programPath, bindingNames, false);\n }\n\n // Rewrite reads/writes from imports and exports to have the correct behavior.\n const rewriteReferencesVisitorState: RewriteReferencesVisitorState = {\n seen: new WeakSet(),\n metadata,\n requeueInParent,\n scope: programPath.scope,\n imported, // local / import\n exported, // local name => exported name list\n buildImportReference([source, importName, localName], identNode) {\n const meta = metadata.source.get(source);\n meta.referenced = true;\n\n if (localName) {\n if (meta.wrap) {\n // @ts-expect-error Fixme: we should handle the case when identNode is a JSXIdentifier\n identNode = wrapReference(identNode, meta.wrap) ?? identNode;\n }\n return identNode;\n }\n\n let namespace: t.Expression = t.identifier(meta.name);\n if (meta.wrap) {\n namespace = wrapReference(namespace, meta.wrap) ?? namespace;\n }\n\n if (importName === \"default\" && meta.interop === \"node-default\") {\n return namespace;\n }\n\n const computed = metadata.stringSpecifiers.has(importName);\n\n return t.memberExpression(\n namespace,\n computed ? t.stringLiteral(importName) : t.identifier(importName),\n computed,\n );\n },\n };\n // eslint-disable-next-line @typescript-eslint/no-use-before-define\n programPath.traverse(rewriteReferencesVisitor, rewriteReferencesVisitorState);\n}\n\n/**\n * A visitor to inject export update statements during binding initialization.\n */\nconst rewriteBindingInitVisitor: Visitor = {\n Scope(path) {\n path.skip();\n },\n ClassDeclaration(path) {\n const { requeueInParent, exported, metadata } = this;\n\n const { id } = path.node;\n if (!id) throw new Error(\"Expected class to have a name\");\n const localName = id.name;\n\n const exportNames = exported.get(localName) || [];\n if (exportNames.length > 0) {\n const statement = t.expressionStatement(\n // eslint-disable-next-line @typescript-eslint/no-use-before-define\n buildBindingExportAssignmentExpression(\n metadata,\n exportNames,\n t.identifier(localName),\n path.scope,\n ),\n );\n // @ts-expect-error todo(flow->ts): avoid mutations\n statement._blockHoist = path.node._blockHoist;\n\n requeueInParent(path.insertAfter(statement)[0]);\n }\n },\n VariableDeclaration(path) {\n const { requeueInParent, exported, metadata } = this;\n\n const isVar = path.node.kind === \"var\";\n\n for (const decl of path.get(\"declarations\")) {\n const { id } = decl.node;\n let { init } = decl.node;\n if (\n t.isIdentifier(id) &&\n exported.has(id.name) &&\n !t.isArrowFunctionExpression(init) &&\n (!t.isFunctionExpression(init) || init.id) &&\n (!t.isClassExpression(init) || init.id)\n ) {\n if (!init) {\n if (isVar) {\n // This variable might have already been assigned to, and the\n // uninitalized declaration doesn't set it to `undefined` and does\n // not updated the exported value.\n continue;\n } else {\n init = path.scope.buildUndefinedNode();\n }\n }\n // eslint-disable-next-line @typescript-eslint/no-use-before-define\n decl.node.init = buildBindingExportAssignmentExpression(\n metadata,\n exported.get(id.name),\n init,\n path.scope,\n );\n requeueInParent(decl.get(\"init\"));\n } else {\n for (const localName of Object.keys(\n decl.getOuterBindingIdentifiers(),\n )) {\n if (exported.has(localName)) {\n const statement = t.expressionStatement(\n // eslint-disable-next-line @typescript-eslint/no-use-before-define\n buildBindingExportAssignmentExpression(\n metadata,\n exported.get(localName),\n t.identifier(localName),\n path.scope,\n ),\n );\n // @ts-expect-error todo(flow->ts): avoid mutations\n statement._blockHoist = path.node._blockHoist;\n\n requeueInParent(path.insertAfter(statement)[0]);\n }\n }\n }\n }\n },\n};\n\nconst buildBindingExportAssignmentExpression = (\n metadata: ModuleMetadata,\n exportNames: string[],\n localExpr: t.Expression,\n scope: Scope,\n) => {\n const exportsObjectName = metadata.exportName;\n for (\n let currentScope = scope;\n currentScope != null;\n currentScope = currentScope.parent\n ) {\n if (currentScope.hasOwnBinding(exportsObjectName)) {\n currentScope.rename(exportsObjectName);\n }\n }\n return (exportNames || []).reduce((expr, exportName) => {\n // class Foo {} export { Foo, Foo as Bar };\n // as\n // class Foo {} exports.Foo = exports.Bar = Foo;\n const { stringSpecifiers } = metadata;\n const computed = stringSpecifiers.has(exportName);\n return t.assignmentExpression(\n \"=\",\n t.memberExpression(\n t.identifier(exportsObjectName),\n computed ? t.stringLiteral(exportName) : t.identifier(exportName),\n /* computed */ computed,\n ),\n expr,\n );\n }, localExpr);\n};\n\nconst buildImportThrow = (localName: string) => {\n return template.expression.ast`\n (function() {\n throw new Error('\"' + '${localName}' + '\" is read-only.');\n })()\n `;\n};\n\nconst rewriteReferencesVisitor: Visitor = {\n ReferencedIdentifier(path) {\n const { seen, buildImportReference, scope, imported, requeueInParent } =\n this;\n if (seen.has(path.node)) return;\n seen.add(path.node);\n\n const localName = path.node.name;\n\n const importData = imported.get(localName);\n if (importData) {\n if (isInType(path)) {\n throw path.buildCodeFrameError(\n `Cannot transform the imported binding \"${localName}\" since it's also used in a type annotation. ` +\n `Please strip type annotations using @babel/preset-typescript or @babel/preset-flow.`,\n );\n }\n\n const localBinding = path.scope.getBinding(localName);\n const rootBinding = scope.getBinding(localName);\n\n // redeclared in this scope\n if (rootBinding !== localBinding) return;\n\n const ref = buildImportReference(importData, path.node);\n\n // Preserve the binding location so that sourcemaps are nicer.\n ref.loc = path.node.loc;\n\n if (\n (path.parentPath.isCallExpression({ callee: path.node }) ||\n path.parentPath.isOptionalCallExpression({ callee: path.node }) ||\n path.parentPath.isTaggedTemplateExpression({ tag: path.node })) &&\n t.isMemberExpression(ref)\n ) {\n path.replaceWith(t.sequenceExpression([t.numericLiteral(0), ref]));\n } else if (path.isJSXIdentifier() && t.isMemberExpression(ref)) {\n const { object, property } = ref;\n path.replaceWith(\n t.jsxMemberExpression(\n // @ts-expect-error todo(flow->ts): possible bug `object` might not have a name\n t.jsxIdentifier(object.name),\n // @ts-expect-error todo(flow->ts): possible bug `property` might not have a name\n t.jsxIdentifier(property.name),\n ),\n );\n } else {\n path.replaceWith(ref);\n }\n\n requeueInParent(path);\n\n // The path could have been replaced with an identifier that would\n // otherwise be re-visited, so we skip processing its children.\n path.skip();\n }\n },\n\n UpdateExpression(path) {\n const {\n scope,\n seen,\n imported,\n exported,\n requeueInParent,\n buildImportReference,\n } = this;\n\n if (seen.has(path.node)) return;\n\n seen.add(path.node);\n\n const arg = path.get(\"argument\");\n\n // No change needed\n if (arg.isMemberExpression()) return;\n\n const update = path.node;\n\n if (arg.isIdentifier()) {\n const localName = arg.node.name;\n\n // redeclared in this scope\n if (scope.getBinding(localName) !== path.scope.getBinding(localName)) {\n return;\n }\n\n const exportedNames = exported.get(localName);\n const importData = imported.get(localName);\n\n if (exportedNames?.length > 0 || importData) {\n if (importData) {\n path.replaceWith(\n t.assignmentExpression(\n update.operator[0] + \"=\",\n buildImportReference(importData, arg.node),\n buildImportThrow(localName),\n ),\n );\n } else if (update.prefix) {\n // ++foo\n // => exports.foo = ++foo\n path.replaceWith(\n buildBindingExportAssignmentExpression(\n this.metadata,\n exportedNames,\n t.cloneNode(update),\n path.scope,\n ),\n );\n } else {\n // foo++\n // => (ref = i++, exports.i = i, ref)\n const ref = scope.generateDeclaredUidIdentifier(localName);\n\n path.replaceWith(\n t.sequenceExpression([\n t.assignmentExpression(\n \"=\",\n t.cloneNode(ref),\n t.cloneNode(update),\n ),\n buildBindingExportAssignmentExpression(\n this.metadata,\n exportedNames,\n t.identifier(localName),\n path.scope,\n ),\n t.cloneNode(ref),\n ]),\n );\n }\n }\n }\n\n requeueInParent(path);\n path.skip();\n },\n\n AssignmentExpression: {\n exit(path) {\n const {\n scope,\n seen,\n imported,\n exported,\n requeueInParent,\n buildImportReference,\n } = this;\n\n if (seen.has(path.node)) return;\n seen.add(path.node);\n\n const left = path.get(\"left\");\n\n // No change needed\n if (left.isMemberExpression()) return;\n\n if (left.isIdentifier()) {\n // Simple update-assign foo += 1; export { foo };\n // => exports.foo = (foo += 1);\n const localName = left.node.name;\n\n // redeclared in this scope\n if (scope.getBinding(localName) !== path.scope.getBinding(localName)) {\n return;\n }\n\n const exportedNames = exported.get(localName);\n const importData = imported.get(localName);\n if (exportedNames?.length > 0 || importData) {\n assert(path.node.operator === \"=\", \"Path was not simplified\");\n\n const assignment = path.node;\n\n if (importData) {\n assignment.left = buildImportReference(importData, left.node);\n\n assignment.right = t.sequenceExpression([\n assignment.right,\n buildImportThrow(localName),\n ]);\n }\n\n path.replaceWith(\n buildBindingExportAssignmentExpression(\n this.metadata,\n exportedNames,\n assignment,\n path.scope,\n ),\n );\n requeueInParent(path);\n }\n } else {\n const ids = left.getOuterBindingIdentifiers();\n const programScopeIds = Object.keys(ids).filter(\n localName =>\n scope.getBinding(localName) === path.scope.getBinding(localName),\n );\n const id = programScopeIds.find(localName => imported.has(localName));\n\n if (id) {\n path.node.right = t.sequenceExpression([\n path.node.right,\n buildImportThrow(id),\n ]);\n }\n\n // Complex ({a, b, c} = {}); export { a, c };\n // => ({a, b, c} = {}), (exports.a = a, exports.c = c);\n const items: t.Expression[] = [];\n programScopeIds.forEach(localName => {\n const exportedNames = exported.get(localName) || [];\n if (exportedNames.length > 0) {\n items.push(\n buildBindingExportAssignmentExpression(\n this.metadata,\n exportedNames,\n t.identifier(localName),\n path.scope,\n ),\n );\n }\n });\n\n if (items.length > 0) {\n let node: t.Node = t.sequenceExpression(items);\n if (path.parentPath.isExpressionStatement()) {\n node = t.expressionStatement(node);\n // @ts-expect-error todo(flow->ts): avoid mutations\n node._blockHoist = path.parentPath.node._blockHoist;\n }\n\n const statement = path.insertAfter(node)[0];\n requeueInParent(statement);\n }\n }\n },\n },\n \"ForOfStatement|ForInStatement\"(\n path: NodePath,\n ) {\n const { scope, node } = path;\n const { left } = node;\n const { exported, imported, scope: programScope } = this;\n\n if (!t.isVariableDeclaration(left)) {\n let didTransformExport = false,\n importConstViolationName;\n const loopBodyScope = path.get(\"body\").scope;\n for (const name of Object.keys(t.getOuterBindingIdentifiers(left))) {\n if (programScope.getBinding(name) === scope.getBinding(name)) {\n if (exported.has(name)) {\n didTransformExport = true;\n if (loopBodyScope.hasOwnBinding(name)) {\n loopBodyScope.rename(name);\n }\n }\n if (imported.has(name) && !importConstViolationName) {\n importConstViolationName = name;\n }\n }\n }\n if (!didTransformExport && !importConstViolationName) {\n return;\n }\n\n path.ensureBlock();\n const bodyPath = path.get(\"body\") as NodePath;\n\n const newLoopId = scope.generateUidIdentifierBasedOnNode(left);\n path\n .get(\"left\")\n .replaceWith(\n t.variableDeclaration(\"let\", [\n t.variableDeclarator(t.cloneNode(newLoopId)),\n ]),\n );\n scope.registerDeclaration(path.get(\"left\"));\n\n if (didTransformExport) {\n bodyPath.unshiftContainer(\n \"body\",\n t.expressionStatement(t.assignmentExpression(\"=\", left, newLoopId)),\n );\n }\n if (importConstViolationName) {\n bodyPath.unshiftContainer(\n \"body\",\n t.expressionStatement(buildImportThrow(importConstViolationName)),\n );\n }\n }\n },\n};\n","import { basename, extname } from \"path\";\nimport type { types as t, NodePath } from \"@babel/core\";\n\nimport { isIdentifierName } from \"@babel/helper-validator-identifier\";\n\nexport interface ModuleMetadata {\n exportName: string;\n // The name of the variable that will reference an object containing export names.\n exportNameListName: null | string;\n hasExports: boolean;\n // Lookup from local binding to export information.\n local: Map;\n // Lookup of source file to source file metadata.\n source: Map;\n // List of names that should only be printed as string literals.\n // i.e. `import { \"any unicode\" as foo } from \"some-module\"`\n // `stringSpecifiers` is Set(1) [\"any unicode\"]\n // In most cases `stringSpecifiers` is an empty Set\n stringSpecifiers: Set;\n}\n\nexport type InteropType =\n | \"default\" // Babel interop for default-only imports\n | \"namespace\" // Babel interop for namespace or default+named imports\n | \"node-default\" // Node.js interop for default-only imports\n | \"node-namespace\" // Node.js interop for namespace or default+named imports\n | \"none\"; // No interop, or named-only imports\n\nexport type ImportInterop =\n | \"none\"\n | \"babel\"\n | \"node\"\n | ((source: string, filename?: string) => \"none\" | \"babel\" | \"node\");\n\nexport interface SourceModuleMetadata {\n // A unique variable name to use for this namespace object. Centralized for simplicity.\n name: string;\n loc: t.SourceLocation | undefined | null;\n interop: InteropType;\n // Local binding to reference from this source namespace. Key: Local name, value: Import name\n imports: Map;\n // Local names that reference namespace object.\n importsNamespace: Set;\n // Reexports to create for namespace. Key: Export name, value: Import name\n reexports: Map;\n // List of names to re-export namespace as.\n reexportNamespace: Set;\n // Tracks if the source should be re-exported.\n reexportAll: null | {\n loc: t.SourceLocation | undefined | null;\n };\n wrap?: unknown;\n referenced: boolean;\n}\n\nexport interface LocalExportMetadata {\n names: Array; // names of exports,\n kind: \"import\" | \"hoisted\" | \"block\" | \"var\";\n}\n\n/**\n * Check if the module has any exports that need handling.\n */\nexport function hasExports(metadata: ModuleMetadata) {\n return metadata.hasExports;\n}\n\n/**\n * Check if a given source is an anonymous import, e.g. \"import 'foo';\"\n */\nexport function isSideEffectImport(source: SourceModuleMetadata) {\n return (\n source.imports.size === 0 &&\n source.importsNamespace.size === 0 &&\n source.reexports.size === 0 &&\n source.reexportNamespace.size === 0 &&\n !source.reexportAll\n );\n}\n\nexport function validateImportInteropOption(\n importInterop: any,\n): importInterop is ImportInterop {\n if (\n typeof importInterop !== \"function\" &&\n importInterop !== \"none\" &&\n importInterop !== \"babel\" &&\n importInterop !== \"node\"\n ) {\n throw new Error(\n `.importInterop must be one of \"none\", \"babel\", \"node\", or a function returning one of those values (received ${importInterop}).`,\n );\n }\n return importInterop;\n}\n\nfunction resolveImportInterop(\n importInterop: ImportInterop,\n source: string,\n filename: string | undefined,\n) {\n if (typeof importInterop === \"function\") {\n return validateImportInteropOption(importInterop(source, filename));\n }\n return importInterop;\n}\n\n/**\n * Remove all imports and exports from the file, and return all metadata\n * needed to reconstruct the module's behavior.\n */\nexport default function normalizeModuleAndLoadMetadata(\n programPath: NodePath,\n exportName: string,\n {\n importInterop,\n initializeReexports = false,\n getWrapperPayload,\n esNamespaceOnly = false,\n filename,\n }: {\n importInterop: ImportInterop;\n initializeReexports: boolean | void;\n getWrapperPayload?: (\n source: string,\n metadata: SourceModuleMetadata,\n importNodes: t.Node[],\n ) => unknown;\n esNamespaceOnly: boolean;\n filename: string;\n },\n): ModuleMetadata {\n if (!exportName) {\n exportName = programPath.scope.generateUidIdentifier(\"exports\").name;\n }\n const stringSpecifiers = new Set();\n\n nameAnonymousExports(programPath);\n\n const { local, sources, hasExports } = getModuleMetadata(\n programPath,\n { initializeReexports, getWrapperPayload },\n stringSpecifiers,\n );\n\n removeImportExportDeclarations(programPath);\n\n // Reuse the imported namespace name if there is one.\n for (const [source, metadata] of sources) {\n const { importsNamespace, imports } = metadata;\n // If there is at least one namespace import and other imports, it may collipse with local ident, can be seen in issue 15879.\n if (importsNamespace.size > 0 && imports.size === 0) {\n const [nameOfnamespace] = importsNamespace;\n metadata.name = nameOfnamespace;\n }\n\n const resolvedInterop = resolveImportInterop(\n importInterop,\n source,\n filename,\n );\n\n if (resolvedInterop === \"none\") {\n metadata.interop = \"none\";\n } else if (resolvedInterop === \"node\" && metadata.interop === \"namespace\") {\n metadata.interop = \"node-namespace\";\n } else if (resolvedInterop === \"node\" && metadata.interop === \"default\") {\n metadata.interop = \"node-default\";\n } else if (esNamespaceOnly && metadata.interop === \"namespace\") {\n // Both the default and namespace interops pass through __esModule\n // objects, but the namespace interop is used to enable Babel's\n // destructuring-like interop behavior for normal CommonJS.\n // Since some tooling has started to remove that behavior, we expose\n // it as the `esNamespace` option.\n metadata.interop = \"default\";\n }\n }\n\n return {\n exportName,\n exportNameListName: null,\n hasExports,\n local,\n source: sources,\n stringSpecifiers,\n };\n}\n\nfunction getExportSpecifierName(\n path: NodePath,\n stringSpecifiers: Set,\n): string {\n if (path.isIdentifier()) {\n return path.node.name;\n } else if (path.isStringLiteral()) {\n const stringValue = path.node.value;\n // add specifier value to `stringSpecifiers` only when it can not be converted to an identifier name\n // i.e In `import { \"foo\" as bar }`\n // we do not consider `\"foo\"` to be a `stringSpecifier` because we can treat it as\n // `import { foo as bar }`\n // This helps minimize the size of `stringSpecifiers` and reduce overhead of checking valid identifier names\n // when building transpiled code from metadata\n if (!isIdentifierName(stringValue)) {\n stringSpecifiers.add(stringValue);\n }\n return stringValue;\n } else {\n throw new Error(\n `Expected export specifier to be either Identifier or StringLiteral, got ${path.node.type}`,\n );\n }\n}\n\nfunction assertExportSpecifier(\n path: NodePath,\n): asserts path is NodePath {\n if (path.isExportSpecifier()) {\n return;\n } else if (path.isExportNamespaceSpecifier()) {\n throw path.buildCodeFrameError(\n \"Export namespace should be first transformed by `@babel/plugin-transform-export-namespace-from`.\",\n );\n } else {\n throw path.buildCodeFrameError(\"Unexpected export specifier type\");\n }\n}\n\n/**\n * Get metadata about the imports and exports present in this module.\n */\nfunction getModuleMetadata(\n programPath: NodePath,\n {\n getWrapperPayload,\n initializeReexports,\n }: {\n getWrapperPayload?: (\n source: string,\n metadata: SourceModuleMetadata,\n importNodes: t.Node[],\n ) => unknown;\n initializeReexports: boolean | void;\n },\n stringSpecifiers: Set,\n) {\n const localData = getLocalExportMetadata(\n programPath,\n initializeReexports,\n stringSpecifiers,\n );\n\n const importNodes = new Map();\n const sourceData = new Map();\n const getData = (sourceNode: t.StringLiteral, node: t.Node) => {\n const source = sourceNode.value;\n\n let data = sourceData.get(source);\n if (!data) {\n data = {\n name: programPath.scope.generateUidIdentifier(\n basename(source, extname(source)),\n ).name,\n\n interop: \"none\",\n\n loc: null,\n\n // Data about the requested sources and names.\n imports: new Map(),\n importsNamespace: new Set(),\n\n // Metadata about data that is passed directly from source to export.\n reexports: new Map(),\n reexportNamespace: new Set(),\n reexportAll: null,\n\n wrap: null,\n\n // @ts-expect-error lazy is not listed in the type.\n // This is needed for compatibility with older version of the commonjs\n // plusing.\n // TODO(Babel 8): Remove this\n get lazy() {\n return this.wrap === \"lazy\";\n },\n\n referenced: false,\n };\n sourceData.set(source, data);\n importNodes.set(source, [node]);\n } else {\n importNodes.get(source).push(node);\n }\n return data;\n };\n let hasExports = false;\n programPath.get(\"body\").forEach(child => {\n if (child.isImportDeclaration()) {\n const data = getData(child.node.source, child.node);\n if (!data.loc) data.loc = child.node.loc;\n\n child.get(\"specifiers\").forEach(spec => {\n if (spec.isImportDefaultSpecifier()) {\n const localName = spec.get(\"local\").node.name;\n\n data.imports.set(localName, \"default\");\n\n const reexport = localData.get(localName);\n if (reexport) {\n localData.delete(localName);\n\n reexport.names.forEach(name => {\n data.reexports.set(name, \"default\");\n });\n data.referenced = true;\n }\n } else if (spec.isImportNamespaceSpecifier()) {\n const localName = spec.get(\"local\").node.name;\n\n data.importsNamespace.add(localName);\n const reexport = localData.get(localName);\n if (reexport) {\n localData.delete(localName);\n\n reexport.names.forEach(name => {\n data.reexportNamespace.add(name);\n });\n data.referenced = true;\n }\n } else if (spec.isImportSpecifier()) {\n const importName = getExportSpecifierName(\n spec.get(\"imported\"),\n stringSpecifiers,\n );\n const localName = spec.get(\"local\").node.name;\n\n data.imports.set(localName, importName);\n\n const reexport = localData.get(localName);\n if (reexport) {\n localData.delete(localName);\n\n reexport.names.forEach(name => {\n data.reexports.set(name, importName);\n });\n data.referenced = true;\n }\n }\n });\n } else if (child.isExportAllDeclaration()) {\n hasExports = true;\n const data = getData(child.node.source, child.node);\n if (!data.loc) data.loc = child.node.loc;\n\n data.reexportAll = {\n loc: child.node.loc,\n };\n data.referenced = true;\n } else if (child.isExportNamedDeclaration() && child.node.source) {\n hasExports = true;\n const data = getData(child.node.source, child.node);\n if (!data.loc) data.loc = child.node.loc;\n\n child.get(\"specifiers\").forEach(spec => {\n assertExportSpecifier(spec);\n const importName = getExportSpecifierName(\n spec.get(\"local\"),\n stringSpecifiers,\n );\n const exportName = getExportSpecifierName(\n spec.get(\"exported\"),\n stringSpecifiers,\n );\n\n data.reexports.set(exportName, importName);\n data.referenced = true;\n\n if (exportName === \"__esModule\") {\n throw spec\n .get(\"exported\")\n .buildCodeFrameError('Illegal export \"__esModule\".');\n }\n });\n } else if (\n child.isExportNamedDeclaration() ||\n child.isExportDefaultDeclaration()\n ) {\n hasExports = true;\n }\n });\n\n for (const metadata of sourceData.values()) {\n let needsDefault = false;\n let needsNamed = false;\n\n if (metadata.importsNamespace.size > 0) {\n needsDefault = true;\n needsNamed = true;\n }\n\n if (metadata.reexportAll) {\n needsNamed = true;\n }\n\n for (const importName of metadata.imports.values()) {\n if (importName === \"default\") needsDefault = true;\n else needsNamed = true;\n }\n for (const importName of metadata.reexports.values()) {\n if (importName === \"default\") needsDefault = true;\n else needsNamed = true;\n }\n\n if (needsDefault && needsNamed) {\n // TODO(logan): Using the namespace interop here is unfortunate. Revisit.\n metadata.interop = \"namespace\";\n } else if (needsDefault) {\n metadata.interop = \"default\";\n }\n }\n\n if (getWrapperPayload) {\n for (const [source, metadata] of sourceData) {\n metadata.wrap = getWrapperPayload(\n source,\n metadata,\n importNodes.get(source),\n );\n }\n }\n\n return {\n hasExports,\n local: localData,\n sources: sourceData,\n };\n}\n\ntype ModuleBindingKind = \"import\" | \"hoisted\" | \"block\" | \"var\";\n/**\n * Get metadata about local variables that are exported.\n */\nfunction getLocalExportMetadata(\n programPath: NodePath,\n initializeReexports: boolean | void,\n stringSpecifiers: Set,\n): Map {\n const bindingKindLookup = new Map();\n\n programPath.get(\"body\").forEach((child: NodePath) => {\n let kind: ModuleBindingKind;\n if (child.isImportDeclaration()) {\n kind = \"import\";\n } else {\n if (child.isExportDefaultDeclaration()) {\n child = child.get(\"declaration\");\n }\n if (child.isExportNamedDeclaration()) {\n if (child.node.declaration) {\n child = child.get(\"declaration\");\n } else if (\n initializeReexports &&\n child.node.source &&\n child.get(\"source\").isStringLiteral()\n ) {\n child.get(\"specifiers\").forEach(spec => {\n assertExportSpecifier(spec);\n bindingKindLookup.set(spec.get(\"local\").node.name, \"block\");\n });\n return;\n }\n }\n\n if (child.isFunctionDeclaration()) {\n kind = \"hoisted\";\n } else if (child.isClassDeclaration()) {\n kind = \"block\";\n } else if (child.isVariableDeclaration({ kind: \"var\" })) {\n kind = \"var\";\n } else if (child.isVariableDeclaration()) {\n kind = \"block\";\n } else {\n return;\n }\n }\n\n Object.keys(child.getOuterBindingIdentifiers()).forEach(name => {\n bindingKindLookup.set(name, kind);\n });\n });\n\n const localMetadata = new Map();\n const getLocalMetadata = (idPath: NodePath) => {\n const localName = idPath.node.name;\n let metadata = localMetadata.get(localName);\n\n if (!metadata) {\n const kind = bindingKindLookup.get(localName);\n\n if (kind === undefined) {\n throw idPath.buildCodeFrameError(\n `Exporting local \"${localName}\", which is not declared.`,\n );\n }\n\n metadata = {\n names: [],\n kind,\n };\n localMetadata.set(localName, metadata);\n }\n return metadata;\n };\n\n programPath.get(\"body\").forEach(child => {\n if (\n child.isExportNamedDeclaration() &&\n (initializeReexports || !child.node.source)\n ) {\n if (child.node.declaration) {\n const declaration = child.get(\"declaration\");\n const ids = declaration.getOuterBindingIdentifierPaths();\n Object.keys(ids).forEach(name => {\n if (name === \"__esModule\") {\n throw declaration.buildCodeFrameError(\n 'Illegal export \"__esModule\".',\n );\n }\n getLocalMetadata(ids[name]).names.push(name);\n });\n } else {\n child.get(\"specifiers\").forEach(spec => {\n const local = spec.get(\"local\");\n const exported = spec.get(\"exported\");\n const localMetadata = getLocalMetadata(local);\n const exportName = getExportSpecifierName(exported, stringSpecifiers);\n\n if (exportName === \"__esModule\") {\n throw exported.buildCodeFrameError('Illegal export \"__esModule\".');\n }\n localMetadata.names.push(exportName);\n });\n }\n } else if (child.isExportDefaultDeclaration()) {\n const declaration = child.get(\"declaration\");\n if (\n declaration.isFunctionDeclaration() ||\n declaration.isClassDeclaration()\n ) {\n getLocalMetadata(declaration.get(\"id\")).names.push(\"default\");\n } else {\n // These should have been removed by the nameAnonymousExports() call.\n throw declaration.buildCodeFrameError(\n \"Unexpected default expression export.\",\n );\n }\n }\n });\n return localMetadata;\n}\n\n/**\n * Ensure that all exported values have local binding names.\n */\nfunction nameAnonymousExports(programPath: NodePath) {\n // Name anonymous exported locals.\n programPath.get(\"body\").forEach(child => {\n if (!child.isExportDefaultDeclaration()) return;\n if (!process.env.BABEL_8_BREAKING && !USE_ESM && !IS_STANDALONE) {\n // polyfill when being run by an older Babel version\n child.splitExportDeclaration ??=\n // eslint-disable-next-line no-restricted-globals\n require(\"@babel/traverse\").NodePath.prototype.splitExportDeclaration;\n }\n child.splitExportDeclaration();\n });\n}\n\nfunction removeImportExportDeclarations(programPath: NodePath) {\n programPath.get(\"body\").forEach(child => {\n if (child.isImportDeclaration()) {\n child.remove();\n } else if (child.isExportNamedDeclaration()) {\n if (child.node.declaration) {\n // @ts-expect-error todo(flow->ts): avoid mutations\n child.node.declaration._blockHoist = child.node._blockHoist;\n child.replaceWith(child.node.declaration);\n } else {\n child.remove();\n }\n } else if (child.isExportDefaultDeclaration()) {\n // export default foo;\n const declaration = child.get(\"declaration\");\n if (\n declaration.isFunctionDeclaration() ||\n declaration.isClassDeclaration()\n ) {\n // @ts-expect-error todo(flow->ts): avoid mutations\n declaration._blockHoist = child.node._blockHoist;\n child.replaceWith(declaration);\n } else {\n // These should have been removed by the nameAnonymousExports() call.\n throw declaration.buildCodeFrameError(\n \"Unexpected default expression export.\",\n );\n }\n } else if (child.isExportAllDeclaration()) {\n child.remove();\n }\n });\n}\n","// TODO: Move `lazy` implementation logic into the CommonJS plugin, since other\n// modules systems do not support `lazy`.\n\nimport { types as t } from \"@babel/core\";\nimport {\n type SourceModuleMetadata,\n isSideEffectImport,\n} from \"./normalize-and-load-metadata.ts\";\n\nexport type Lazy = boolean | string[] | ((source: string) => boolean);\n\nexport function toGetWrapperPayload(lazy: Lazy) {\n return (source: string, metadata: SourceModuleMetadata): null | \"lazy\" => {\n if (lazy === false) return null;\n if (isSideEffectImport(metadata) || metadata.reexportAll) return null;\n if (lazy === true) {\n // 'true' means that local relative files are eagerly loaded and\n // dependency modules are loaded lazily.\n return source.includes(\".\") ? null : \"lazy\";\n }\n if (Array.isArray(lazy)) {\n return !lazy.includes(source) ? null : \"lazy\";\n }\n if (typeof lazy === \"function\") {\n return lazy(source) ? \"lazy\" : null;\n }\n throw new Error(`.lazy must be a boolean, string array, or function`);\n };\n}\n\nexport function wrapReference(\n ref: t.Identifier,\n payload: unknown,\n): t.Expression | null {\n if (payload === \"lazy\") return t.callExpression(ref, []);\n return null;\n}\n","// Heavily inspired by\n// https://github.com/airbnb/babel-plugin-dynamic-import-node/blob/master/src/utils.js\n\nimport { types as t, template } from \"@babel/core\";\n\nif (!process.env.BABEL_8_BREAKING && !USE_ESM && !IS_STANDALONE) {\n // eslint-disable-next-line no-restricted-globals\n exports.getDynamicImportSource = function getDynamicImportSource(\n node: t.CallExpression,\n ): t.StringLiteral | t.TemplateLiteral {\n const [source] = node.arguments;\n\n return t.isStringLiteral(source) || t.isTemplateLiteral(source)\n ? source\n : (template.expression.ast`\\`\\${${source}}\\`` as t.TemplateLiteral);\n };\n}\n\nexport function buildDynamicImport(\n node: t.CallExpression | t.ImportExpression,\n deferToThen: boolean,\n wrapWithPromise: boolean,\n builder: (specifier: t.Expression) => t.Expression,\n): t.Expression {\n const specifier = t.isCallExpression(node) ? node.arguments[0] : node.source;\n\n if (\n t.isStringLiteral(specifier) ||\n (t.isTemplateLiteral(specifier) && specifier.quasis.length === 0)\n ) {\n if (deferToThen) {\n return template.expression.ast`\n Promise.resolve().then(() => ${builder(specifier)})\n `;\n } else return builder(specifier);\n }\n\n const specifierToString = t.isTemplateLiteral(specifier)\n ? t.identifier(\"specifier\")\n : t.templateLiteral(\n [t.templateElement({ raw: \"\" }), t.templateElement({ raw: \"\" })],\n [t.identifier(\"specifier\")],\n );\n\n if (deferToThen) {\n return template.expression.ast`\n (specifier =>\n new Promise(r => r(${specifierToString}))\n .then(s => ${builder(t.identifier(\"s\"))})\n )(${specifier})\n `;\n } else if (wrapWithPromise) {\n return template.expression.ast`\n (specifier =>\n new Promise(r => r(${builder(specifierToString)}))\n )(${specifier})\n `;\n } else {\n return template.expression.ast`\n (specifier => ${builder(specifierToString)})(${specifier})\n `;\n }\n}\n","type RootOptions = {\n filename?: string;\n filenameRelative?: string;\n sourceRoot?: string;\n};\n\nexport type PluginOptions = {\n moduleId?: string;\n moduleIds?: boolean;\n getModuleId?: (moduleName: string) => string | null | undefined;\n moduleRoot?: string;\n};\n\nif (!process.env.BABEL_8_BREAKING) {\n const originalGetModuleName = getModuleName;\n\n // @ts-expect-error TS doesn't like reassigning a function.\n getModuleName = function getModuleName(\n rootOpts: RootOptions & PluginOptions,\n pluginOpts: PluginOptions,\n ): string | null {\n return originalGetModuleName(rootOpts, {\n moduleId: pluginOpts.moduleId ?? rootOpts.moduleId,\n moduleIds: pluginOpts.moduleIds ?? rootOpts.moduleIds,\n getModuleId: pluginOpts.getModuleId ?? rootOpts.getModuleId,\n moduleRoot: pluginOpts.moduleRoot ?? rootOpts.moduleRoot,\n });\n };\n}\n\nexport default function getModuleName(\n rootOpts: RootOptions,\n pluginOpts: PluginOptions,\n): string | null {\n const {\n filename,\n filenameRelative = filename,\n sourceRoot = pluginOpts.moduleRoot,\n } = rootOpts;\n\n const {\n moduleId,\n moduleIds = !!moduleId,\n\n getModuleId,\n\n moduleRoot = sourceRoot,\n } = pluginOpts;\n\n if (!moduleIds) return null;\n\n // moduleId is n/a if a `getModuleId()` is provided\n if (moduleId != null && !getModuleId) {\n return moduleId;\n }\n\n let moduleName = moduleRoot != null ? moduleRoot + \"/\" : \"\";\n\n if (filenameRelative) {\n const sourceRootReplacer =\n sourceRoot != null ? new RegExp(\"^\" + sourceRoot + \"/?\") : \"\";\n\n moduleName += filenameRelative\n // remove sourceRoot from filename\n .replace(sourceRootReplacer, \"\")\n // remove extension\n .replace(/\\.\\w*$/, \"\");\n }\n\n // normalize path separators\n moduleName = moduleName.replace(/\\\\/g, \"/\");\n\n if (getModuleId) {\n // If return is falsy, assume they want us to use our generated default name\n return getModuleId(moduleName) || moduleName;\n } else {\n return moduleName;\n }\n}\n","import assert from \"assert\";\nimport { template, types as t } from \"@babel/core\";\n\nimport { isModule } from \"@babel/helper-module-imports\";\n\nimport rewriteThis from \"./rewrite-this.ts\";\nimport rewriteLiveReferences from \"./rewrite-live-references.ts\";\nimport normalizeModuleAndLoadMetadata, {\n hasExports,\n isSideEffectImport,\n validateImportInteropOption,\n} from \"./normalize-and-load-metadata.ts\";\nimport type {\n ImportInterop,\n InteropType,\n ModuleMetadata,\n SourceModuleMetadata,\n} from \"./normalize-and-load-metadata.ts\";\nimport * as Lazy from \"./lazy-modules.ts\";\nimport type { NodePath } from \"@babel/core\";\n\nexport { buildDynamicImport } from \"./dynamic-import.ts\";\n\nif (!process.env.BABEL_8_BREAKING && !USE_ESM && !IS_STANDALONE) {\n // eslint-disable-next-line no-restricted-globals\n exports.getDynamicImportSource =\n // eslint-disable-next-line no-restricted-globals, import/extensions\n require(\"./dynamic-import\").getDynamicImportSource;\n}\n\nexport { default as getModuleName } from \"./get-module-name.ts\";\nexport type { PluginOptions } from \"./get-module-name.ts\";\n\nexport { hasExports, isSideEffectImport, isModule, rewriteThis };\n\nexport interface RewriteModuleStatementsAndPrepareHeaderOptions {\n exportName?: string;\n strict: boolean;\n allowTopLevelThis?: boolean;\n strictMode: boolean;\n loose?: boolean;\n importInterop?: ImportInterop;\n noInterop?: boolean;\n lazy?: Lazy.Lazy;\n getWrapperPayload?: (\n source: string,\n metadata: SourceModuleMetadata,\n importNodes: t.Node[],\n ) => unknown;\n wrapReference?: (ref: t.Expression, payload: unknown) => t.Expression | null;\n esNamespaceOnly?: boolean;\n filename: string | undefined;\n constantReexports?: boolean | void;\n enumerableModuleMeta?: boolean | void;\n noIncompleteNsImportDetection?: boolean | void;\n}\n\n/**\n * Perform all of the generic ES6 module rewriting needed to handle initial\n * module processing. This function will rewrite the majority of the given\n * program to reference the modules described by the returned metadata,\n * and returns a list of statements for use when initializing the module.\n */\nexport function rewriteModuleStatementsAndPrepareHeader(\n path: NodePath,\n {\n exportName,\n strict,\n allowTopLevelThis,\n strictMode,\n noInterop,\n importInterop = noInterop ? \"none\" : \"babel\",\n // TODO(Babel 8): After that `lazy` implementation is moved to the CJS\n // transform, remove this parameter.\n lazy,\n getWrapperPayload = Lazy.toGetWrapperPayload(lazy ?? false),\n wrapReference = Lazy.wrapReference,\n esNamespaceOnly,\n filename,\n\n constantReexports = process.env.BABEL_8_BREAKING\n ? undefined\n : arguments[1].loose,\n enumerableModuleMeta = process.env.BABEL_8_BREAKING\n ? undefined\n : arguments[1].loose,\n noIncompleteNsImportDetection,\n }: RewriteModuleStatementsAndPrepareHeaderOptions,\n) {\n validateImportInteropOption(importInterop);\n assert(isModule(path), \"Cannot process module statements in a script\");\n path.node.sourceType = \"script\";\n\n const meta = normalizeModuleAndLoadMetadata(path, exportName, {\n importInterop,\n initializeReexports: constantReexports,\n getWrapperPayload,\n esNamespaceOnly,\n filename,\n });\n\n if (!allowTopLevelThis) {\n rewriteThis(path);\n }\n\n rewriteLiveReferences(path, meta, wrapReference);\n\n if (strictMode !== false) {\n const hasStrict = path.node.directives.some(directive => {\n return directive.value.value === \"use strict\";\n });\n if (!hasStrict) {\n path.unshiftContainer(\n \"directives\",\n t.directive(t.directiveLiteral(\"use strict\")),\n );\n }\n }\n\n const headers = [];\n if (hasExports(meta) && !strict) {\n headers.push(buildESModuleHeader(meta, enumerableModuleMeta));\n }\n\n const nameList = buildExportNameListDeclaration(path, meta);\n\n if (nameList) {\n meta.exportNameListName = nameList.name;\n headers.push(nameList.statement);\n }\n\n // Create all of the statically known named exports.\n headers.push(\n ...buildExportInitializationStatements(\n path,\n meta,\n wrapReference,\n constantReexports,\n noIncompleteNsImportDetection,\n ),\n );\n\n return { meta, headers };\n}\n\n/**\n * Flag a set of statements as hoisted above all else so that module init\n * statements all run before user code.\n */\nexport function ensureStatementsHoisted(statements: t.Statement[]) {\n // Force all of the header fields to be at the top of the file.\n statements.forEach(header => {\n // @ts-expect-error Fixme: handle _blockHoist property\n header._blockHoist = 3;\n });\n}\n\n/**\n * Given an expression for a standard import object, like \"require('foo')\",\n * wrap it in a call to the interop helpers based on the type.\n */\nexport function wrapInterop(\n programPath: NodePath,\n expr: t.Expression,\n type: InteropType,\n): t.CallExpression {\n if (type === \"none\") {\n return null;\n }\n\n if (type === \"node-namespace\") {\n return t.callExpression(\n programPath.hub.addHelper(\"interopRequireWildcard\"),\n [expr, t.booleanLiteral(true)],\n );\n } else if (type === \"node-default\") {\n return null;\n }\n\n let helper;\n if (type === \"default\") {\n helper = \"interopRequireDefault\";\n } else if (type === \"namespace\") {\n helper = \"interopRequireWildcard\";\n } else {\n throw new Error(`Unknown interop: ${type}`);\n }\n\n return t.callExpression(programPath.hub.addHelper(helper), [expr]);\n}\n\n/**\n * Create the runtime initialization statements for a given requested source.\n * These will initialize all of the runtime import/export logic that\n * can't be handled statically by the statements created by\n * buildExportInitializationStatements().\n */\nexport function buildNamespaceInitStatements(\n metadata: ModuleMetadata,\n sourceMetadata: SourceModuleMetadata,\n constantReexports: boolean | void = false,\n wrapReference: (\n ref: t.Identifier,\n payload: unknown,\n ) => t.Expression | null = Lazy.wrapReference,\n) {\n const statements = [];\n\n const srcNamespaceId = t.identifier(sourceMetadata.name);\n\n for (const localName of sourceMetadata.importsNamespace) {\n if (localName === sourceMetadata.name) continue;\n\n // Create and assign binding to namespace object\n statements.push(\n template.statement`var NAME = SOURCE;`({\n NAME: localName,\n SOURCE: t.cloneNode(srcNamespaceId),\n }),\n );\n }\n\n const srcNamespace =\n wrapReference(srcNamespaceId, sourceMetadata.wrap) ?? srcNamespaceId;\n\n if (constantReexports) {\n statements.push(\n ...buildReexportsFromMeta(metadata, sourceMetadata, true, wrapReference),\n );\n }\n for (const exportName of sourceMetadata.reexportNamespace) {\n // Assign export to namespace object.\n statements.push(\n (!t.isIdentifier(srcNamespace)\n ? template.statement`\n Object.defineProperty(EXPORTS, \"NAME\", {\n enumerable: true,\n get: function() {\n return NAMESPACE;\n }\n });\n `\n : template.statement`EXPORTS.NAME = NAMESPACE;`)({\n EXPORTS: metadata.exportName,\n NAME: exportName,\n NAMESPACE: t.cloneNode(srcNamespace),\n }),\n );\n }\n if (sourceMetadata.reexportAll) {\n const statement = buildNamespaceReexport(\n metadata,\n t.cloneNode(srcNamespace),\n constantReexports,\n );\n statement.loc = sourceMetadata.reexportAll.loc;\n\n // Iterate props creating getter for each prop.\n statements.push(statement);\n }\n return statements;\n}\n\ninterface ReexportParts {\n exports: string;\n exportName: string;\n namespaceImport: t.Expression;\n}\n\nconst ReexportTemplate = {\n constant: ({ exports, exportName, namespaceImport }: ReexportParts) =>\n template.statement.ast`\n ${exports}.${exportName} = ${namespaceImport};\n `,\n constantComputed: ({ exports, exportName, namespaceImport }: ReexportParts) =>\n template.statement.ast`\n ${exports}[\"${exportName}\"] = ${namespaceImport};\n `,\n spec: ({ exports, exportName, namespaceImport }: ReexportParts) =>\n template.statement.ast`\n Object.defineProperty(${exports}, \"${exportName}\", {\n enumerable: true,\n get: function() {\n return ${namespaceImport};\n },\n });\n `,\n};\n\nfunction buildReexportsFromMeta(\n meta: ModuleMetadata,\n metadata: SourceModuleMetadata,\n constantReexports: boolean,\n wrapReference: (ref: t.Expression, payload: unknown) => t.Expression | null,\n): t.Statement[] {\n let namespace: t.Expression = t.identifier(metadata.name);\n namespace = wrapReference(namespace, metadata.wrap) ?? namespace;\n\n const { stringSpecifiers } = meta;\n return Array.from(metadata.reexports, ([exportName, importName]) => {\n let namespaceImport: t.Expression = t.cloneNode(namespace);\n if (importName === \"default\" && metadata.interop === \"node-default\") {\n // Nothing, it's ok as-is\n } else if (stringSpecifiers.has(importName)) {\n namespaceImport = t.memberExpression(\n namespaceImport,\n t.stringLiteral(importName),\n true,\n );\n } else {\n namespaceImport = t.memberExpression(\n namespaceImport,\n t.identifier(importName),\n );\n }\n const astNodes: ReexportParts = {\n exports: meta.exportName,\n exportName,\n namespaceImport,\n };\n if (constantReexports || t.isIdentifier(namespaceImport)) {\n if (stringSpecifiers.has(exportName)) {\n return ReexportTemplate.constantComputed(astNodes);\n } else {\n return ReexportTemplate.constant(astNodes);\n }\n } else {\n return ReexportTemplate.spec(astNodes);\n }\n });\n}\n\n/**\n * Build an \"__esModule\" header statement setting the property on a given object.\n */\nfunction buildESModuleHeader(\n metadata: ModuleMetadata,\n enumerableModuleMeta: boolean | void = false,\n) {\n return (\n enumerableModuleMeta\n ? template.statement`\n EXPORTS.__esModule = true;\n `\n : template.statement`\n Object.defineProperty(EXPORTS, \"__esModule\", {\n value: true,\n });\n `\n )({ EXPORTS: metadata.exportName });\n}\n\n/**\n * Create a re-export initialization loop for a specific imported namespace.\n */\nfunction buildNamespaceReexport(\n metadata: ModuleMetadata,\n namespace: t.Expression,\n constantReexports: boolean | void,\n) {\n return (\n constantReexports\n ? template.statement`\n Object.keys(NAMESPACE).forEach(function(key) {\n if (key === \"default\" || key === \"__esModule\") return;\n VERIFY_NAME_LIST;\n if (key in EXPORTS && EXPORTS[key] === NAMESPACE[key]) return;\n\n EXPORTS[key] = NAMESPACE[key];\n });\n `\n : // Also skip already assigned bindings if they are strictly equal\n // to be somewhat more spec-compliant when a file has multiple\n // namespace re-exports that would cause a binding to be exported\n // multiple times. However, multiple bindings of the same name that\n // export the same primitive value are silently skipped\n // (the spec requires an \"ambiguous bindings\" early error here).\n template.statement`\n Object.keys(NAMESPACE).forEach(function(key) {\n if (key === \"default\" || key === \"__esModule\") return;\n VERIFY_NAME_LIST;\n if (key in EXPORTS && EXPORTS[key] === NAMESPACE[key]) return;\n\n Object.defineProperty(EXPORTS, key, {\n enumerable: true,\n get: function() {\n return NAMESPACE[key];\n },\n });\n });\n `\n )({\n NAMESPACE: namespace,\n EXPORTS: metadata.exportName,\n VERIFY_NAME_LIST: metadata.exportNameListName\n ? template`\n if (Object.prototype.hasOwnProperty.call(EXPORTS_LIST, key)) return;\n `({ EXPORTS_LIST: metadata.exportNameListName })\n : null,\n });\n}\n\n/**\n * Build a statement declaring a variable that contains all of the exported\n * variable names in an object so they can easily be referenced from an\n * export * from statement to check for conflicts.\n */\nfunction buildExportNameListDeclaration(\n programPath: NodePath,\n metadata: ModuleMetadata,\n) {\n const exportedVars = Object.create(null);\n for (const data of metadata.local.values()) {\n for (const name of data.names) {\n exportedVars[name] = true;\n }\n }\n\n let hasReexport = false;\n for (const data of metadata.source.values()) {\n for (const exportName of data.reexports.keys()) {\n exportedVars[exportName] = true;\n }\n for (const exportName of data.reexportNamespace) {\n exportedVars[exportName] = true;\n }\n\n hasReexport = hasReexport || !!data.reexportAll;\n }\n\n if (!hasReexport || Object.keys(exportedVars).length === 0) return null;\n\n const name = programPath.scope.generateUidIdentifier(\"exportNames\");\n\n delete exportedVars.default;\n\n return {\n name: name.name,\n statement: t.variableDeclaration(\"var\", [\n t.variableDeclarator(name, t.valueToNode(exportedVars)),\n ]),\n };\n}\n\n/**\n * Create a set of statements that will initialize all of the statically-known\n * export names with their expected values.\n */\nfunction buildExportInitializationStatements(\n programPath: NodePath,\n metadata: ModuleMetadata,\n wrapReference: (ref: t.Expression, payload: unknown) => t.Expression | null,\n constantReexports: boolean | void = false,\n noIncompleteNsImportDetection: boolean | void = false,\n) {\n const initStatements: Array<[string, t.Statement | null]> = [];\n\n for (const [localName, data] of metadata.local) {\n if (data.kind === \"import\") {\n // No-open since these are explicitly set with the \"reexports\" block.\n } else if (data.kind === \"hoisted\") {\n initStatements.push([\n // data.names is always of length 1 because a hoisted export\n // name must be id of a function declaration\n data.names[0],\n buildInitStatement(metadata, data.names, t.identifier(localName)),\n ]);\n } else if (!noIncompleteNsImportDetection) {\n for (const exportName of data.names) {\n initStatements.push([exportName, null]);\n }\n }\n }\n\n for (const data of metadata.source.values()) {\n if (!constantReexports) {\n const reexportsStatements = buildReexportsFromMeta(\n metadata,\n data,\n false,\n wrapReference,\n );\n const reexports = [...data.reexports.keys()];\n for (let i = 0; i < reexportsStatements.length; i++) {\n initStatements.push([reexports[i], reexportsStatements[i]]);\n }\n }\n if (!noIncompleteNsImportDetection) {\n for (const exportName of data.reexportNamespace) {\n initStatements.push([exportName, null]);\n }\n }\n }\n\n // https://tc39.es/ecma262/#sec-module-namespace-exotic-objects\n // The [Exports] list is ordered as if an Array of those String values\n // had been sorted using %Array.prototype.sort% using undefined as comparefn\n initStatements.sort(([a], [b]) => {\n if (a < b) return -1;\n if (b < a) return 1;\n return 0;\n });\n\n const results = [];\n if (noIncompleteNsImportDetection) {\n for (const [, initStatement] of initStatements) {\n results.push(initStatement);\n }\n } else {\n // We generate init statements (`exports.a = exports.b = ... = void 0`)\n // for every 100 exported names to avoid deeply-nested AST structures.\n const chunkSize = 100;\n for (let i = 0; i < initStatements.length; i += chunkSize) {\n let uninitializedExportNames = [];\n for (let j = 0; j < chunkSize && i + j < initStatements.length; j++) {\n const [exportName, initStatement] = initStatements[i + j];\n if (initStatement !== null) {\n if (uninitializedExportNames.length > 0) {\n results.push(\n buildInitStatement(\n metadata,\n uninitializedExportNames,\n programPath.scope.buildUndefinedNode(),\n ),\n );\n // reset after uninitializedExportNames has been transformed\n // to init statements\n uninitializedExportNames = [];\n }\n results.push(initStatement);\n } else {\n uninitializedExportNames.push(exportName);\n }\n }\n if (uninitializedExportNames.length > 0) {\n results.push(\n buildInitStatement(\n metadata,\n uninitializedExportNames,\n programPath.scope.buildUndefinedNode(),\n ),\n );\n }\n }\n }\n\n return results;\n}\n\ninterface InitParts {\n exports: string;\n name: string;\n value: t.Expression;\n}\n\n/**\n * Given a set of export names, create a set of nested assignments to\n * initialize them all to a given expression.\n */\nconst InitTemplate = {\n computed: ({ exports, name, value }: InitParts) =>\n template.expression.ast`${exports}[\"${name}\"] = ${value}`,\n default: ({ exports, name, value }: InitParts) =>\n template.expression.ast`${exports}.${name} = ${value}`,\n define: ({ exports, name, value }: InitParts) =>\n template.expression.ast`\n Object.defineProperty(${exports}, \"${name}\", {\n enumerable: true,\n value: void 0,\n writable: true\n })[\"${name}\"] = ${value}`,\n};\n\nfunction buildInitStatement(\n metadata: ModuleMetadata,\n exportNames: string[],\n initExpr: t.Expression,\n) {\n const { stringSpecifiers, exportName: exports } = metadata;\n return t.expressionStatement(\n exportNames.reduce((value, name) => {\n const params = {\n exports,\n name,\n value,\n };\n\n if (name === \"__proto__\") {\n return InitTemplate.define(params);\n }\n\n if (stringSpecifiers.has(name)) {\n return InitTemplate.computed(params);\n }\n\n return InitTemplate.default(params);\n }, initExpr),\n );\n}\n","// TODO(Babel 8): Remove this file\n\nexports.getModuleName = () =>\n require(\"@babel/helper-module-transforms\").getModuleName;\n","import * as helpers from \"@babel/helpers\";\nimport { NodePath } from \"@babel/traverse\";\nimport type { HubInterface, Visitor, Scope } from \"@babel/traverse\";\nimport { codeFrameColumns } from \"@babel/code-frame\";\nimport traverse from \"@babel/traverse\";\nimport { cloneNode, interpreterDirective } from \"@babel/types\";\nimport type * as t from \"@babel/types\";\nimport semver from \"semver\";\n\nimport type { NormalizedFile } from \"../normalize-file.ts\";\n\n// @ts-expect-error This file is `any`\nimport * as babel7 from \"./babel-7-helpers.cjs\";\n\nconst errorVisitor: Visitor<{ loc: t.SourceLocation | null }> = {\n enter(path, state) {\n const loc = path.node.loc;\n if (loc) {\n state.loc = loc;\n path.stop();\n }\n },\n};\n\nexport default class File {\n _map: Map = new Map();\n opts: { [key: string]: any };\n declarations: { [key: string]: t.Identifier } = {};\n path: NodePath;\n ast: t.File;\n scope: Scope;\n metadata: { [key: string]: any } = {};\n code: string = \"\";\n inputMap: any;\n\n hub: HubInterface & { file: File } = {\n // keep it for the usage in babel-core, ex: path.hub.file.opts.filename\n file: this,\n getCode: () => this.code,\n getScope: () => this.scope,\n addHelper: this.addHelper.bind(this),\n buildError: this.buildCodeFrameError.bind(this),\n };\n\n constructor(options: any, { code, ast, inputMap }: NormalizedFile) {\n this.opts = options;\n this.code = code;\n this.ast = ast;\n this.inputMap = inputMap;\n\n this.path = NodePath.get({\n hub: this.hub,\n parentPath: null,\n parent: this.ast,\n container: this.ast,\n key: \"program\",\n }).setContext() as NodePath;\n this.scope = this.path.scope;\n }\n\n /**\n * Provide backward-compatible access to the interpreter directive handling\n * in Babel 6.x. If you are writing a plugin for Babel 7.x, it would be\n * best to use 'program.interpreter' directly.\n */\n get shebang(): string {\n const { interpreter } = this.path.node;\n return interpreter ? interpreter.value : \"\";\n }\n set shebang(value: string) {\n if (value) {\n this.path.get(\"interpreter\").replaceWith(interpreterDirective(value));\n } else {\n this.path.get(\"interpreter\").remove();\n }\n }\n\n set(key: unknown, val: unknown) {\n if (!process.env.BABEL_8_BREAKING) {\n if (key === \"helpersNamespace\") {\n throw new Error(\n \"Babel 7.0.0-beta.56 has dropped support for the 'helpersNamespace' utility.\" +\n \"If you are using @babel/plugin-external-helpers you will need to use a newer \" +\n \"version than the one you currently have installed. \" +\n \"If you have your own implementation, you'll want to explore using 'helperGenerator' \" +\n \"alongside 'file.availableHelper()'.\",\n );\n }\n }\n\n this._map.set(key, val);\n }\n\n get(key: unknown): any {\n return this._map.get(key);\n }\n\n has(key: unknown): boolean {\n return this._map.has(key);\n }\n\n /**\n * Check if a given helper is available in @babel/core's helper list.\n *\n * This _also_ allows you to pass a Babel version specifically. If the\n * helper exists, but was not available for the full given range, it will be\n * considered unavailable.\n */\n availableHelper(name: string, versionRange?: string | null): boolean {\n let minVersion;\n try {\n minVersion = helpers.minVersion(name);\n } catch (err) {\n if (err.code !== \"BABEL_HELPER_UNKNOWN\") throw err;\n\n return false;\n }\n\n if (typeof versionRange !== \"string\") return true;\n\n // semver.intersects() has some surprising behavior with comparing ranges\n // with pre-release versions. We add '^' to ensure that we are always\n // comparing ranges with ranges, which sidesteps this logic.\n // For example:\n //\n // semver.intersects(`<7.0.1`, \"7.0.0-beta.0\") // false - surprising\n // semver.intersects(`<7.0.1`, \"^7.0.0-beta.0\") // true - expected\n //\n // This is because the first falls back to\n //\n // semver.satisfies(\"7.0.0-beta.0\", `<7.0.1`) // false - surprising\n //\n // and this fails because a prerelease version can only satisfy a range\n // if it is a prerelease within the same major/minor/patch range.\n //\n // Note: If this is found to have issues, please also revisit the logic in\n // transform-runtime's definitions.js file.\n if (semver.valid(versionRange)) versionRange = `^${versionRange}`;\n\n if (process.env.BABEL_8_BREAKING) {\n return (\n !semver.intersects(`<${minVersion}`, versionRange) &&\n !semver.intersects(`>=9.0.0`, versionRange)\n );\n } else {\n return (\n !semver.intersects(`<${minVersion}`, versionRange) &&\n !semver.intersects(`>=8.0.0`, versionRange)\n );\n }\n }\n\n addHelper(name: string): t.Identifier {\n const declar = this.declarations[name];\n if (declar) return cloneNode(declar);\n\n const generator = this.get(\"helperGenerator\");\n if (generator) {\n const res = generator(name);\n if (res) return res;\n }\n\n // make sure that the helper exists\n helpers.minVersion(name);\n\n const uid = (this.declarations[name] =\n this.scope.generateUidIdentifier(name));\n\n const dependencies: { [key: string]: t.Identifier } = {};\n for (const dep of helpers.getDependencies(name)) {\n dependencies[dep] = this.addHelper(dep);\n }\n\n const { nodes, globals } = helpers.get(\n name,\n dep => dependencies[dep],\n uid.name,\n Object.keys(this.scope.getAllBindings()),\n );\n\n globals.forEach(name => {\n if (this.path.scope.hasBinding(name, true /* noGlobals */)) {\n this.path.scope.rename(name);\n }\n });\n\n nodes.forEach(node => {\n // @ts-expect-error Fixme: document _compact node property\n node._compact = true;\n });\n\n const added = this.path.unshiftContainer(\"body\", nodes);\n // TODO: NodePath#unshiftContainer should automatically register new\n // bindings.\n for (const path of added) {\n if (path.isVariableDeclaration()) this.scope.registerDeclaration(path);\n }\n\n return uid;\n }\n\n buildCodeFrameError(\n node: t.Node | undefined | null,\n msg: string,\n _Error: typeof Error = SyntaxError,\n ): Error {\n let loc = node?.loc;\n\n if (!loc && node) {\n const state: { loc?: t.SourceLocation | null } = {\n loc: null,\n };\n traverse(node, errorVisitor, this.scope, state);\n loc = state.loc;\n\n let txt =\n \"This is an error on an internal node. Probably an internal error.\";\n if (loc) txt += \" Location has been estimated.\";\n\n msg += ` (${txt})`;\n }\n\n if (loc) {\n const { highlightCode = true } = this.opts;\n\n msg +=\n \"\\n\" +\n codeFrameColumns(\n this.code,\n {\n start: {\n line: loc.start.line,\n column: loc.start.column + 1,\n },\n end:\n loc.end && loc.start.line === loc.end.line\n ? {\n line: loc.end.line,\n column: loc.end.column + 1,\n }\n : undefined,\n },\n { highlightCode },\n );\n }\n\n return new _Error(msg);\n }\n}\n\nif (!process.env.BABEL_8_BREAKING) {\n // @ts-expect-error Babel 7\n File.prototype.addImport = function addImport() {\n throw new Error(\n \"This API has been removed. If you're looking for this \" +\n \"functionality in Babel 7, you should import the \" +\n \"'@babel/helper-module-imports' module and use the functions exposed \" +\n \" from that module, such as 'addNamed' or 'addDefault'.\",\n );\n };\n // @ts-expect-error Babel 7\n File.prototype.addTemplateObject = function addTemplateObject() {\n throw new Error(\n \"This function has been moved into the template literal transform itself.\",\n );\n };\n\n if (!USE_ESM || IS_STANDALONE) {\n // @ts-expect-error Babel 7\n File.prototype.getModuleName = function getModuleName() {\n return babel7.getModuleName()(this.opts, this.opts);\n };\n }\n}\n","import * as helpers from \"@babel/helpers\";\nimport generator from \"@babel/generator\";\nimport template from \"@babel/template\";\nimport {\n arrayExpression,\n assignmentExpression,\n binaryExpression,\n blockStatement,\n callExpression,\n cloneNode,\n conditionalExpression,\n exportNamedDeclaration,\n exportSpecifier,\n expressionStatement,\n functionExpression,\n identifier,\n memberExpression,\n objectExpression,\n program,\n stringLiteral,\n unaryExpression,\n variableDeclaration,\n variableDeclarator,\n} from \"@babel/types\";\nimport type * as t from \"@babel/types\";\nimport type { Replacements } from \"@babel/template\";\n\n// Wrapped to avoid wasting time parsing this when almost no-one uses\n// build-external-helpers.\nconst buildUmdWrapper = (replacements: Replacements) =>\n template.statement`\n (function (root, factory) {\n if (typeof define === \"function\" && define.amd) {\n define(AMD_ARGUMENTS, factory);\n } else if (typeof exports === \"object\") {\n factory(COMMON_ARGUMENTS);\n } else {\n factory(BROWSER_ARGUMENTS);\n }\n })(UMD_ROOT, function (FACTORY_PARAMETERS) {\n FACTORY_BODY\n });\n `(replacements);\n\nfunction buildGlobal(allowlist?: Array) {\n const namespace = identifier(\"babelHelpers\");\n\n const body: t.Statement[] = [];\n const container = functionExpression(\n null,\n [identifier(\"global\")],\n blockStatement(body),\n );\n const tree = program([\n expressionStatement(\n callExpression(container, [\n // typeof global === \"undefined\" ? self : global\n conditionalExpression(\n binaryExpression(\n \"===\",\n unaryExpression(\"typeof\", identifier(\"global\")),\n stringLiteral(\"undefined\"),\n ),\n identifier(\"self\"),\n identifier(\"global\"),\n ),\n ]),\n ),\n ]);\n\n body.push(\n variableDeclaration(\"var\", [\n variableDeclarator(\n namespace,\n assignmentExpression(\n \"=\",\n memberExpression(identifier(\"global\"), namespace),\n objectExpression([]),\n ),\n ),\n ]),\n );\n\n buildHelpers(body, namespace, allowlist);\n\n return tree;\n}\n\nfunction buildModule(allowlist?: Array) {\n const body: t.Statement[] = [];\n const refs = buildHelpers(body, null, allowlist);\n\n body.unshift(\n exportNamedDeclaration(\n null,\n Object.keys(refs).map(name => {\n return exportSpecifier(cloneNode(refs[name]), identifier(name));\n }),\n ),\n );\n\n return program(body, [], \"module\");\n}\n\nfunction buildUmd(allowlist?: Array) {\n const namespace = identifier(\"babelHelpers\");\n\n const body: t.Statement[] = [];\n body.push(\n variableDeclaration(\"var\", [\n variableDeclarator(namespace, identifier(\"global\")),\n ]),\n );\n\n buildHelpers(body, namespace, allowlist);\n\n return program([\n buildUmdWrapper({\n FACTORY_PARAMETERS: identifier(\"global\"),\n BROWSER_ARGUMENTS: assignmentExpression(\n \"=\",\n memberExpression(identifier(\"root\"), namespace),\n objectExpression([]),\n ),\n COMMON_ARGUMENTS: identifier(\"exports\"),\n AMD_ARGUMENTS: arrayExpression([stringLiteral(\"exports\")]),\n FACTORY_BODY: body,\n UMD_ROOT: identifier(\"this\"),\n }),\n ]);\n}\n\nfunction buildVar(allowlist?: Array) {\n const namespace = identifier(\"babelHelpers\");\n\n const body: t.Statement[] = [];\n body.push(\n variableDeclaration(\"var\", [\n variableDeclarator(namespace, objectExpression([])),\n ]),\n );\n const tree = program(body);\n buildHelpers(body, namespace, allowlist);\n body.push(expressionStatement(namespace));\n return tree;\n}\n\nfunction buildHelpers(\n body: t.Statement[],\n namespace: t.Expression,\n allowlist?: Array,\n): Record;\nfunction buildHelpers(\n body: t.Statement[],\n namespace: null,\n allowlist?: Array,\n): Record;\n\nfunction buildHelpers(\n body: t.Statement[],\n namespace: t.Expression | null,\n allowlist?: Array,\n) {\n const getHelperReference = (name: string) => {\n return namespace\n ? memberExpression(namespace, identifier(name))\n : identifier(`_${name}`);\n };\n\n const refs: { [key: string]: t.Identifier | t.MemberExpression } = {};\n helpers.list.forEach(function (name) {\n if (allowlist && !allowlist.includes(name)) return;\n\n const ref = (refs[name] = getHelperReference(name));\n\n const { nodes } = helpers.get(\n name,\n getHelperReference,\n namespace ? null : `_${name}`,\n [],\n namespace\n ? (ast, exportName, mapExportBindingAssignments) => {\n mapExportBindingAssignments(node =>\n assignmentExpression(\"=\", ref, node),\n );\n ast.body.push(\n expressionStatement(\n assignmentExpression(\"=\", ref, identifier(exportName)),\n ),\n );\n }\n : null,\n );\n\n body.push(...nodes);\n });\n return refs;\n}\nexport default function (\n allowlist?: Array,\n outputType: \"global\" | \"module\" | \"umd\" | \"var\" = \"global\",\n) {\n let tree: t.Program;\n\n const build = {\n global: buildGlobal,\n module: buildModule,\n umd: buildUmd,\n var: buildVar,\n }[outputType];\n\n if (build) {\n tree = build(allowlist);\n } else {\n throw new Error(`Unsupported output type ${outputType}`);\n }\n\n return generator(tree).code;\n}\n","import type { Handler } from \"gensync\";\n\nimport type {\n ConfigFile,\n IgnoreFile,\n RelativeConfig,\n FilePackageData,\n} from \"./types.ts\";\n\nimport type { CallerMetadata } from \"../validation/options.ts\";\n\nexport type { ConfigFile, IgnoreFile, RelativeConfig, FilePackageData };\n\nexport function findConfigUpwards(\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n rootDir: string,\n): string | null {\n return null;\n}\n\n// eslint-disable-next-line require-yield\nexport function* findPackageData(filepath: string): Handler {\n return {\n filepath,\n directories: [],\n pkg: null,\n isPackage: false,\n };\n}\n\n// eslint-disable-next-line require-yield\nexport function* findRelativeConfig(\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n pkgData: FilePackageData,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n envName: string,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n caller: CallerMetadata | undefined,\n): Handler {\n return { config: null, ignore: null };\n}\n\n// eslint-disable-next-line require-yield\nexport function* findRootConfig(\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n dirname: string,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n envName: string,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n caller: CallerMetadata | undefined,\n): Handler {\n return null;\n}\n\n// eslint-disable-next-line require-yield\nexport function* loadConfig(\n name: string,\n dirname: string,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n envName: string,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n caller: CallerMetadata | undefined,\n): Handler {\n throw new Error(`Cannot load ${name} relative to ${dirname} in a browser`);\n}\n\n// eslint-disable-next-line require-yield\nexport function* resolveShowConfigPath(\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n dirname: string,\n): Handler {\n return null;\n}\n\nexport const ROOT_CONFIG_FILENAMES: string[] = [];\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport function resolvePlugin(name: string, dirname: string): string | null {\n return null;\n}\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport function resolvePreset(name: string, dirname: string): string | null {\n return null;\n}\n\nexport function loadPlugin(\n name: string,\n dirname: string,\n): Handler<{\n filepath: string;\n value: unknown;\n}> {\n throw new Error(\n `Cannot load plugin ${name} relative to ${dirname} in a browser`,\n );\n}\n\nexport function loadPreset(\n name: string,\n dirname: string,\n): Handler<{\n filepath: string;\n value: unknown;\n}> {\n throw new Error(\n `Cannot load preset ${name} relative to ${dirname} in a browser`,\n );\n}\n","export function getEnv(defaultValue: string = \"development\"): string {\n return process.env.BABEL_ENV || process.env.NODE_ENV || defaultValue;\n}\n","\"use strict\";\n\n// These use the global symbol registry so that multiple copies of this\n// library can work together in case they are not deduped.\nconst GENSYNC_START = Symbol.for(\"gensync:v1:start\");\nconst GENSYNC_SUSPEND = Symbol.for(\"gensync:v1:suspend\");\n\nconst GENSYNC_EXPECTED_START = \"GENSYNC_EXPECTED_START\";\nconst GENSYNC_EXPECTED_SUSPEND = \"GENSYNC_EXPECTED_SUSPEND\";\nconst GENSYNC_OPTIONS_ERROR = \"GENSYNC_OPTIONS_ERROR\";\nconst GENSYNC_RACE_NONEMPTY = \"GENSYNC_RACE_NONEMPTY\";\nconst GENSYNC_ERRBACK_NO_CALLBACK = \"GENSYNC_ERRBACK_NO_CALLBACK\";\n\nmodule.exports = Object.assign(\n function gensync(optsOrFn) {\n let genFn = optsOrFn;\n if (typeof optsOrFn !== \"function\") {\n genFn = newGenerator(optsOrFn);\n } else {\n genFn = wrapGenerator(optsOrFn);\n }\n\n return Object.assign(genFn, makeFunctionAPI(genFn));\n },\n {\n all: buildOperation({\n name: \"all\",\n arity: 1,\n sync: function(args) {\n const items = Array.from(args[0]);\n return items.map(item => evaluateSync(item));\n },\n async: function(args, resolve, reject) {\n const items = Array.from(args[0]);\n\n if (items.length === 0) {\n Promise.resolve().then(() => resolve([]));\n return;\n }\n\n let count = 0;\n const results = items.map(() => undefined);\n items.forEach((item, i) => {\n evaluateAsync(\n item,\n val => {\n results[i] = val;\n count += 1;\n\n if (count === results.length) resolve(results);\n },\n reject\n );\n });\n },\n }),\n race: buildOperation({\n name: \"race\",\n arity: 1,\n sync: function(args) {\n const items = Array.from(args[0]);\n if (items.length === 0) {\n throw makeError(\"Must race at least 1 item\", GENSYNC_RACE_NONEMPTY);\n }\n\n return evaluateSync(items[0]);\n },\n async: function(args, resolve, reject) {\n const items = Array.from(args[0]);\n if (items.length === 0) {\n throw makeError(\"Must race at least 1 item\", GENSYNC_RACE_NONEMPTY);\n }\n\n for (const item of items) {\n evaluateAsync(item, resolve, reject);\n }\n },\n }),\n }\n);\n\n/**\n * Given a generator function, return the standard API object that executes\n * the generator and calls the callbacks.\n */\nfunction makeFunctionAPI(genFn) {\n const fns = {\n sync: function(...args) {\n return evaluateSync(genFn.apply(this, args));\n },\n async: function(...args) {\n return new Promise((resolve, reject) => {\n evaluateAsync(genFn.apply(this, args), resolve, reject);\n });\n },\n errback: function(...args) {\n const cb = args.pop();\n if (typeof cb !== \"function\") {\n throw makeError(\n \"Asynchronous function called without callback\",\n GENSYNC_ERRBACK_NO_CALLBACK\n );\n }\n\n let gen;\n try {\n gen = genFn.apply(this, args);\n } catch (err) {\n cb(err);\n return;\n }\n\n evaluateAsync(gen, val => cb(undefined, val), err => cb(err));\n },\n };\n return fns;\n}\n\nfunction assertTypeof(type, name, value, allowUndefined) {\n if (\n typeof value === type ||\n (allowUndefined && typeof value === \"undefined\")\n ) {\n return;\n }\n\n let msg;\n if (allowUndefined) {\n msg = `Expected opts.${name} to be either a ${type}, or undefined.`;\n } else {\n msg = `Expected opts.${name} to be a ${type}.`;\n }\n\n throw makeError(msg, GENSYNC_OPTIONS_ERROR);\n}\nfunction makeError(msg, code) {\n return Object.assign(new Error(msg), { code });\n}\n\n/**\n * Given an options object, return a new generator that dispatches the\n * correct handler based on sync or async execution.\n */\nfunction newGenerator({ name, arity, sync, async, errback }) {\n assertTypeof(\"string\", \"name\", name, true /* allowUndefined */);\n assertTypeof(\"number\", \"arity\", arity, true /* allowUndefined */);\n assertTypeof(\"function\", \"sync\", sync);\n assertTypeof(\"function\", \"async\", async, true /* allowUndefined */);\n assertTypeof(\"function\", \"errback\", errback, true /* allowUndefined */);\n if (async && errback) {\n throw makeError(\n \"Expected one of either opts.async or opts.errback, but got _both_.\",\n GENSYNC_OPTIONS_ERROR\n );\n }\n\n if (typeof name !== \"string\") {\n let fnName;\n if (errback && errback.name && errback.name !== \"errback\") {\n fnName = errback.name;\n }\n if (async && async.name && async.name !== \"async\") {\n fnName = async.name.replace(/Async$/, \"\");\n }\n if (sync && sync.name && sync.name !== \"sync\") {\n fnName = sync.name.replace(/Sync$/, \"\");\n }\n\n if (typeof fnName === \"string\") {\n name = fnName;\n }\n }\n\n if (typeof arity !== \"number\") {\n arity = sync.length;\n }\n\n return buildOperation({\n name,\n arity,\n sync: function(args) {\n return sync.apply(this, args);\n },\n async: function(args, resolve, reject) {\n if (async) {\n async.apply(this, args).then(resolve, reject);\n } else if (errback) {\n errback.call(this, ...args, (err, value) => {\n if (err == null) resolve(value);\n else reject(err);\n });\n } else {\n resolve(sync.apply(this, args));\n }\n },\n });\n}\n\nfunction wrapGenerator(genFn) {\n return setFunctionMetadata(genFn.name, genFn.length, function(...args) {\n return genFn.apply(this, args);\n });\n}\n\nfunction buildOperation({ name, arity, sync, async }) {\n return setFunctionMetadata(name, arity, function*(...args) {\n const resume = yield GENSYNC_START;\n if (!resume) {\n // Break the tail call to avoid a bug in V8 v6.X with --harmony enabled.\n const res = sync.call(this, args);\n return res;\n }\n\n let result;\n try {\n async.call(\n this,\n args,\n value => {\n if (result) return;\n\n result = { value };\n resume();\n },\n err => {\n if (result) return;\n\n result = { err };\n resume();\n }\n );\n } catch (err) {\n result = { err };\n resume();\n }\n\n // Suspend until the callbacks run. Will resume synchronously if the\n // callback was already called.\n yield GENSYNC_SUSPEND;\n\n if (result.hasOwnProperty(\"err\")) {\n throw result.err;\n }\n\n return result.value;\n });\n}\n\nfunction evaluateSync(gen) {\n let value;\n while (!({ value } = gen.next()).done) {\n assertStart(value, gen);\n }\n return value;\n}\n\nfunction evaluateAsync(gen, resolve, reject) {\n (function step() {\n try {\n let value;\n while (!({ value } = gen.next()).done) {\n assertStart(value, gen);\n\n // If this throws, it is considered to have broken the contract\n // established for async handlers. If these handlers are called\n // synchronously, it is also considered bad behavior.\n let sync = true;\n let didSyncResume = false;\n const out = gen.next(() => {\n if (sync) {\n didSyncResume = true;\n } else {\n step();\n }\n });\n sync = false;\n\n assertSuspend(out, gen);\n\n if (!didSyncResume) {\n // Callback wasn't called synchronously, so break out of the loop\n // and let it call 'step' later.\n return;\n }\n }\n\n return resolve(value);\n } catch (err) {\n return reject(err);\n }\n })();\n}\n\nfunction assertStart(value, gen) {\n if (value === GENSYNC_START) return;\n\n throwError(\n gen,\n makeError(\n `Got unexpected yielded value in gensync generator: ${JSON.stringify(\n value\n )}. Did you perhaps mean to use 'yield*' instead of 'yield'?`,\n GENSYNC_EXPECTED_START\n )\n );\n}\nfunction assertSuspend({ value, done }, gen) {\n if (!done && value === GENSYNC_SUSPEND) return;\n\n throwError(\n gen,\n makeError(\n done\n ? \"Unexpected generator completion. If you get this, it is probably a gensync bug.\"\n : `Expected GENSYNC_SUSPEND, got ${JSON.stringify(\n value\n )}. If you get this, it is probably a gensync bug.`,\n GENSYNC_EXPECTED_SUSPEND\n )\n );\n}\n\nfunction throwError(gen, err) {\n // Call `.throw` so that users can step in a debugger to easily see which\n // 'yield' passed an unexpected value. If the `.throw` call didn't throw\n // back to the generator, we explicitly do it to stop the error\n // from being swallowed by user code try/catches.\n if (gen.throw) gen.throw(err);\n throw err;\n}\n\nfunction isIterable(value) {\n return (\n !!value &&\n (typeof value === \"object\" || typeof value === \"function\") &&\n !value[Symbol.iterator]\n );\n}\n\nfunction setFunctionMetadata(name, arity, fn) {\n if (typeof name === \"string\") {\n // This should always work on the supported Node versions, but for the\n // sake of users that are compiling to older versions, we check for\n // configurability so we don't throw.\n const nameDesc = Object.getOwnPropertyDescriptor(fn, \"name\");\n if (!nameDesc || nameDesc.configurable) {\n Object.defineProperty(\n fn,\n \"name\",\n Object.assign(nameDesc || {}, {\n configurable: true,\n value: name,\n })\n );\n }\n }\n\n if (typeof arity === \"number\") {\n const lengthDesc = Object.getOwnPropertyDescriptor(fn, \"length\");\n if (!lengthDesc || lengthDesc.configurable) {\n Object.defineProperty(\n fn,\n \"length\",\n Object.assign(lengthDesc || {}, {\n configurable: true,\n value: arity,\n })\n );\n }\n }\n\n return fn;\n}\n","import gensync, { type Gensync, type Handler, type Callback } from \"gensync\";\n\ntype MaybePromise = T | Promise;\n\nconst runGenerator: {\n sync(gen: Handler): Return;\n async(gen: Handler): Promise;\n errback(gen: Handler, cb: Callback): void;\n} = gensync(function* (item: Handler): Handler {\n return yield* item;\n});\n\n// This Gensync returns true if the current execution context is\n// asynchronous, otherwise it returns false.\nexport const isAsync = gensync({\n sync: () => false,\n errback: cb => cb(null, true),\n});\n\n// This function wraps any functions (which could be either synchronous or\n// asynchronous) with a Gensync. If the wrapped function returns a promise\n// but the current execution context is synchronous, it will throw the\n// provided error.\n// This is used to handle user-provided functions which could be asynchronous.\nexport function maybeAsync(\n fn: (...args: Args) => Return,\n message: string,\n): Gensync {\n return gensync({\n sync(...args) {\n const result = fn.apply(this, args);\n if (isThenable(result)) throw new Error(message);\n return result;\n },\n async(...args) {\n return Promise.resolve(fn.apply(this, args));\n },\n });\n}\n\nconst withKind = gensync({\n sync: cb => cb(\"sync\"),\n async: async cb => cb(\"async\"),\n}) as (cb: (kind: \"sync\" | \"async\") => MaybePromise) => Handler;\n\n// This function wraps a generator (or a Gensync) into another function which,\n// when called, will run the provided generator in a sync or async way, depending\n// on the execution context where this forwardAsync function is called.\n// This is useful, for example, when passing a callback to a function which isn't\n// aware of gensync, but it only knows about synchronous and asynchronous functions.\n// An example is cache.using, which being exposed to the user must be as simple as\n// possible:\n// yield* forwardAsync(gensyncFn, wrappedFn =>\n// cache.using(x => {\n// // Here we don't know about gensync. wrappedFn is a\n// // normal sync or async function\n// return wrappedFn(x);\n// })\n// )\nexport function forwardAsync(\n action: (...args: Args) => Handler,\n cb: (\n adapted: (...args: Args) => MaybePromise,\n ) => MaybePromise,\n): Handler {\n const g = gensync(action);\n return withKind(kind => {\n const adapted = g[kind];\n return cb(adapted);\n });\n}\n\n// If the given generator is executed asynchronously, the first time that it\n// is paused (i.e. When it yields a gensync generator which can't be run\n// synchronously), call the \"firstPause\" callback.\nexport const onFirstPause = gensync<\n [gen: Handler, firstPause: () => void],\n unknown\n>({\n name: \"onFirstPause\",\n arity: 2,\n sync: function (item) {\n return runGenerator.sync(item);\n },\n errback: function (item, firstPause, cb) {\n let completed = false;\n\n runGenerator.errback(item, (err, value) => {\n completed = true;\n cb(err, value);\n });\n\n if (!completed) {\n firstPause();\n }\n },\n}) as (gen: Handler, firstPause: () => void) => Handler;\n\n// Wait for the given promise to be resolved\nexport const waitFor = gensync({\n sync: x => x,\n async: async x => x,\n}) as (p: T | Promise) => Handler;\n\nexport function isThenable(val: any): val is PromiseLike {\n return (\n !!val &&\n (typeof val === \"object\" || typeof val === \"function\") &&\n !!val.then &&\n typeof val.then === \"function\"\n );\n}\n","import type {\n ValidatedOptions,\n NormalizedOptions,\n} from \"./validation/options.ts\";\n\nexport function mergeOptions(\n target: ValidatedOptions,\n source: ValidatedOptions | NormalizedOptions,\n): void {\n for (const k of Object.keys(source)) {\n if (\n (k === \"parserOpts\" || k === \"generatorOpts\" || k === \"assumptions\") &&\n source[k]\n ) {\n const parserOpts = source[k];\n const targetObj = target[k] || (target[k] = {});\n mergeDefaultFields(targetObj, parserOpts);\n } else {\n //@ts-expect-error k must index source\n const val = source[k];\n //@ts-expect-error assigning source to target\n if (val !== undefined) target[k] = val as any;\n }\n }\n}\n\nfunction mergeDefaultFields(target: T, source: T) {\n for (const k of Object.keys(source) as (keyof T)[]) {\n const val = source[k];\n if (val !== undefined) target[k] = val;\n }\n}\n\nexport function isIterableIterator(value: any): value is IterableIterator {\n return (\n !!value &&\n typeof value.next === \"function\" &&\n typeof value[Symbol.iterator] === \"function\"\n );\n}\n","export type DeepArray = Array>;\n\n// Just to make sure that DeepArray is not assignable to ReadonlyDeepArray\ndeclare const __marker: unique symbol;\nexport type ReadonlyDeepArray = ReadonlyArray> & {\n [__marker]: true;\n};\n\nexport function finalize(deepArr: DeepArray): ReadonlyDeepArray {\n return Object.freeze(deepArr) as ReadonlyDeepArray;\n}\n\nexport function flattenToSet(\n arr: ReadonlyDeepArray,\n): Set {\n const result = new Set();\n const stack = [arr];\n while (stack.length > 0) {\n for (const el of stack.pop()) {\n if (Array.isArray(el)) stack.push(el as ReadonlyDeepArray);\n else result.add(el as T);\n }\n }\n return result;\n}\n","import { finalize } from \"./helpers/deep-array.ts\";\nimport type { ReadonlyDeepArray } from \"./helpers/deep-array.ts\";\nimport type { PluginObject } from \"./validation/plugins.ts\";\n\nexport default class Plugin {\n key: string | undefined | null;\n manipulateOptions?: (options: unknown, parserOpts: unknown) => void;\n post?: PluginObject[\"post\"];\n pre?: PluginObject[\"pre\"];\n visitor: PluginObject[\"visitor\"];\n\n parserOverride?: Function;\n generatorOverride?: Function;\n\n options: object;\n\n externalDependencies: ReadonlyDeepArray;\n\n constructor(\n plugin: PluginObject,\n options: object,\n key?: string,\n externalDependencies: ReadonlyDeepArray = finalize([]),\n ) {\n this.key = plugin.name || key;\n\n this.manipulateOptions = plugin.manipulateOptions;\n this.post = plugin.post;\n this.pre = plugin.pre;\n this.visitor = plugin.visitor || {};\n this.parserOverride = plugin.parserOverride;\n this.generatorOverride = plugin.generatorOverride;\n\n this.options = options;\n this.externalDependencies = externalDependencies;\n }\n}\n","import type { Handler } from \"gensync\";\n\nimport { isAsync, waitFor } from \"./async.ts\";\n\nexport function once(fn: () => Handler): () => Handler {\n let result: { ok: true; value: R } | { ok: false; value: unknown };\n let resultP: Promise;\n let promiseReferenced = false;\n return function* () {\n if (!result) {\n if (resultP) {\n promiseReferenced = true;\n return yield* waitFor(resultP);\n }\n\n if (!(yield* isAsync())) {\n try {\n result = { ok: true, value: yield* fn() };\n } catch (error) {\n result = { ok: false, value: error };\n }\n } else {\n let resolve: (result: R) => void, reject: (error: unknown) => void;\n resultP = new Promise((res, rej) => {\n resolve = res;\n reject = rej;\n });\n\n try {\n result = { ok: true, value: yield* fn() };\n // Avoid keeping the promise around\n // now that we have the result.\n resultP = null;\n // We only resolve/reject the promise if it has been actually\n // referenced. If there are no listeners we can forget about it.\n // In the reject case, this avoid uncatchable unhandledRejection\n // events.\n if (promiseReferenced) resolve(result.value);\n } catch (error) {\n result = { ok: false, value: error };\n resultP = null;\n if (promiseReferenced) reject(error);\n }\n }\n }\n\n if (result.ok) return result.value;\n else throw result.value;\n };\n}\n","import gensync from \"gensync\";\nimport type { Handler } from \"gensync\";\nimport {\n maybeAsync,\n isAsync,\n onFirstPause,\n waitFor,\n isThenable,\n} from \"../gensync-utils/async.ts\";\nimport { isIterableIterator } from \"./util.ts\";\n\nexport type { CacheConfigurator };\n\nexport type SimpleCacheConfigurator = {\n (forever: boolean): void;\n (handler: () => T): T;\n\n forever: () => void;\n never: () => void;\n using: (handler: () => T) => T;\n invalidate: (handler: () => T) => T;\n};\n\nexport type CacheEntry = Array<{\n value: ResultT;\n valid: (channel: SideChannel) => Handler;\n}>;\n\nconst synchronize = (\n gen: (...args: ArgsT) => Handler,\n): ((...args: ArgsT) => ResultT) => {\n return gensync(gen).sync;\n};\n\n// eslint-disable-next-line require-yield\nfunction* genTrue() {\n return true;\n}\n\nexport function makeWeakCache(\n handler: (\n arg: ArgT,\n cache: CacheConfigurator,\n ) => Handler | ResultT,\n): (arg: ArgT, data: SideChannel) => Handler {\n return makeCachedFunction(WeakMap, handler);\n}\n\nexport function makeWeakCacheSync(\n handler: (arg: ArgT, cache?: CacheConfigurator) => ResultT,\n): (arg: ArgT, data?: SideChannel) => ResultT {\n return synchronize<[ArgT, SideChannel], ResultT>(\n makeWeakCache(handler),\n );\n}\n\nexport function makeStrongCache(\n handler: (\n arg: ArgT,\n cache: CacheConfigurator,\n ) => Handler | ResultT,\n): (arg: ArgT, data: SideChannel) => Handler {\n return makeCachedFunction(Map, handler);\n}\n\nexport function makeStrongCacheSync(\n handler: (arg: ArgT, cache?: CacheConfigurator) => ResultT,\n): (arg: ArgT, data?: SideChannel) => ResultT {\n return synchronize<[ArgT, SideChannel], ResultT>(\n makeStrongCache(handler),\n );\n}\n\n/* NOTE: Part of the logic explained in this comment is explained in the\n * getCachedValueOrWait and setupAsyncLocks functions.\n *\n * > There are only two hard things in Computer Science: cache invalidation and naming things.\n * > -- Phil Karlton\n *\n * I don't know if Phil was also thinking about handling a cache whose invalidation function is\n * defined asynchronously is considered, but it is REALLY hard to do correctly.\n *\n * The implemented logic (only when gensync is run asynchronously) is the following:\n * 1. If there is a valid cache associated to the current \"arg\" parameter,\n * a. RETURN the cached value\n * 3. If there is a FinishLock associated to the current \"arg\" parameter representing a valid cache,\n * a. Wait for that lock to be released\n * b. RETURN the value associated with that lock\n * 5. Start executing the function to be cached\n * a. If it pauses on a promise, then\n * i. Let FinishLock be a new lock\n * ii. Store FinishLock as associated to the current \"arg\" parameter\n * iii. Wait for the function to finish executing\n * iv. Release FinishLock\n * v. Send the function result to anyone waiting on FinishLock\n * 6. Store the result in the cache\n * 7. RETURN the result\n */\nfunction makeCachedFunction(\n CallCache: new () => CacheMap,\n handler: (\n arg: ArgT,\n cache: CacheConfigurator,\n ) => Handler | ResultT,\n): (arg: ArgT, data: SideChannel) => Handler {\n const callCacheSync = new CallCache();\n const callCacheAsync = new CallCache();\n const futureCache = new CallCache>();\n\n return function* cachedFunction(arg: ArgT, data: SideChannel) {\n const asyncContext = yield* isAsync();\n const callCache = asyncContext ? callCacheAsync : callCacheSync;\n\n const cached = yield* getCachedValueOrWait(\n asyncContext,\n callCache,\n futureCache,\n arg,\n data,\n );\n if (cached.valid) return cached.value;\n\n const cache = new CacheConfigurator(data);\n\n const handlerResult: Handler | ResultT = handler(arg, cache);\n\n let finishLock: Lock;\n let value: ResultT;\n\n if (isIterableIterator(handlerResult)) {\n value = yield* onFirstPause(handlerResult, () => {\n finishLock = setupAsyncLocks(cache, futureCache, arg);\n });\n } else {\n value = handlerResult;\n }\n\n updateFunctionCache(callCache, cache, arg, value);\n\n if (finishLock) {\n futureCache.delete(arg);\n finishLock.release(value);\n }\n\n return value;\n };\n}\n\ntype CacheMap =\n | Map>\n // @ts-expect-error todo(flow->ts): add `extends object` constraint to ArgT\n | WeakMap>;\n\nfunction* getCachedValue(\n cache: CacheMap,\n arg: ArgT,\n data: SideChannel,\n): Handler<{ valid: true; value: ResultT } | { valid: false; value: null }> {\n const cachedValue: CacheEntry | void = cache.get(arg);\n\n if (cachedValue) {\n for (const { value, valid } of cachedValue) {\n if (yield* valid(data)) return { valid: true, value };\n }\n }\n\n return { valid: false, value: null };\n}\n\nfunction* getCachedValueOrWait(\n asyncContext: boolean,\n callCache: CacheMap,\n futureCache: CacheMap, SideChannel>,\n arg: ArgT,\n data: SideChannel,\n): Handler<{ valid: true; value: ResultT } | { valid: false; value: null }> {\n const cached = yield* getCachedValue(callCache, arg, data);\n if (cached.valid) {\n return cached;\n }\n\n if (asyncContext) {\n const cached = yield* getCachedValue(futureCache, arg, data);\n if (cached.valid) {\n const value = yield* waitFor(cached.value.promise);\n return { valid: true, value };\n }\n }\n\n return { valid: false, value: null };\n}\n\nfunction setupAsyncLocks(\n config: CacheConfigurator,\n futureCache: CacheMap, SideChannel>,\n arg: ArgT,\n): Lock {\n const finishLock = new Lock();\n\n updateFunctionCache(futureCache, config, arg, finishLock);\n\n return finishLock;\n}\n\nfunction updateFunctionCache<\n ArgT,\n ResultT,\n SideChannel,\n Cache extends CacheMap,\n>(\n cache: Cache,\n config: CacheConfigurator,\n arg: ArgT,\n value: ResultT,\n) {\n if (!config.configured()) config.forever();\n\n let cachedValue: CacheEntry | void = cache.get(arg);\n\n config.deactivate();\n\n switch (config.mode()) {\n case \"forever\":\n cachedValue = [{ value, valid: genTrue }];\n cache.set(arg, cachedValue);\n break;\n case \"invalidate\":\n cachedValue = [{ value, valid: config.validator() }];\n cache.set(arg, cachedValue);\n break;\n case \"valid\":\n if (cachedValue) {\n cachedValue.push({ value, valid: config.validator() });\n } else {\n cachedValue = [{ value, valid: config.validator() }];\n cache.set(arg, cachedValue);\n }\n }\n}\n\nclass CacheConfigurator {\n _active: boolean = true;\n _never: boolean = false;\n _forever: boolean = false;\n _invalidate: boolean = false;\n\n _configured: boolean = false;\n\n _pairs: Array<\n [cachedValue: unknown, handler: (data: SideChannel) => Handler]\n > = [];\n\n _data: SideChannel;\n\n constructor(data: SideChannel) {\n this._data = data;\n }\n\n simple() {\n return makeSimpleConfigurator(this);\n }\n\n mode() {\n if (this._never) return \"never\";\n if (this._forever) return \"forever\";\n if (this._invalidate) return \"invalidate\";\n return \"valid\";\n }\n\n forever() {\n if (!this._active) {\n throw new Error(\"Cannot change caching after evaluation has completed.\");\n }\n if (this._never) {\n throw new Error(\"Caching has already been configured with .never()\");\n }\n this._forever = true;\n this._configured = true;\n }\n\n never() {\n if (!this._active) {\n throw new Error(\"Cannot change caching after evaluation has completed.\");\n }\n if (this._forever) {\n throw new Error(\"Caching has already been configured with .forever()\");\n }\n this._never = true;\n this._configured = true;\n }\n\n using(handler: (data: SideChannel) => T): T {\n if (!this._active) {\n throw new Error(\"Cannot change caching after evaluation has completed.\");\n }\n if (this._never || this._forever) {\n throw new Error(\n \"Caching has already been configured with .never or .forever()\",\n );\n }\n this._configured = true;\n\n const key = handler(this._data);\n\n const fn = maybeAsync(\n handler,\n `You appear to be using an async cache handler, but Babel has been called synchronously`,\n );\n\n if (isThenable(key)) {\n // @ts-expect-error todo(flow->ts): improve function return type annotation\n return key.then((key: unknown) => {\n this._pairs.push([key, fn]);\n return key;\n });\n }\n\n this._pairs.push([key, fn]);\n return key;\n }\n\n invalidate(handler: (data: SideChannel) => T): T {\n this._invalidate = true;\n return this.using(handler);\n }\n\n validator(): (data: SideChannel) => Handler {\n const pairs = this._pairs;\n return function* (data: SideChannel) {\n for (const [key, fn] of pairs) {\n if (key !== (yield* fn(data))) return false;\n }\n return true;\n };\n }\n\n deactivate() {\n this._active = false;\n }\n\n configured() {\n return this._configured;\n }\n}\n\nfunction makeSimpleConfigurator(\n cache: CacheConfigurator,\n): SimpleCacheConfigurator {\n function cacheFn(val: any) {\n if (typeof val === \"boolean\") {\n if (val) cache.forever();\n else cache.never();\n return;\n }\n\n return cache.using(() => assertSimpleType(val()));\n }\n cacheFn.forever = () => cache.forever();\n cacheFn.never = () => cache.never();\n cacheFn.using = (cb: () => SimpleType) =>\n cache.using(() => assertSimpleType(cb()));\n cacheFn.invalidate = (cb: () => SimpleType) =>\n cache.invalidate(() => assertSimpleType(cb()));\n\n return cacheFn as any;\n}\n\n// Types are limited here so that in the future these values can be used\n// as part of Babel's caching logic.\nexport type SimpleType =\n | string\n | boolean\n | number\n | null\n | void\n | Promise;\nexport function assertSimpleType(value: unknown): SimpleType {\n if (isThenable(value)) {\n throw new Error(\n `You appear to be using an async cache handler, ` +\n `which your current version of Babel does not support. ` +\n `We may add support for this in the future, ` +\n `but if you're on the most recent version of @babel/core and still ` +\n `seeing this error, then you'll need to synchronously handle your caching logic.`,\n );\n }\n\n if (\n value != null &&\n typeof value !== \"string\" &&\n typeof value !== \"boolean\" &&\n typeof value !== \"number\"\n ) {\n throw new Error(\n \"Cache keys must be either string, boolean, number, null, or undefined.\",\n );\n }\n // @ts-expect-error Type 'unknown' is not assignable to type 'SimpleType'. This can be removed\n // when strictNullCheck is enabled\n return value;\n}\n\nclass Lock {\n released: boolean = false;\n promise: Promise;\n _resolve: (value: T) => void;\n\n constructor() {\n this.promise = new Promise(resolve => {\n this._resolve = resolve;\n });\n }\n\n release(value: T) {\n this.released = true;\n this._resolve(value);\n }\n}\n","module.exports={A:\"ie\",B:\"edge\",C:\"firefox\",D:\"chrome\",E:\"safari\",F:\"opera\",G:\"ios_saf\",H:\"op_mini\",I:\"android\",J:\"bb\",K:\"op_mob\",L:\"and_chr\",M:\"and_ff\",N:\"ie_mob\",O:\"and_uc\",P:\"samsung\",Q:\"and_qq\",R:\"baidu\",S:\"kaios\"};\n","module.exports.browsers = require('../../data/browsers')\n","module.exports={\"0\":\"25\",\"1\":\"112\",\"2\":\"113\",\"3\":\"114\",\"4\":\"115\",\"5\":\"116\",\"6\":\"117\",\"7\":\"118\",\"8\":\"119\",\"9\":\"120\",A:\"10\",B:\"11\",C:\"12\",D:\"7\",E:\"8\",F:\"9\",G:\"15\",H:\"80\",I:\"126\",J:\"4\",K:\"6\",L:\"13\",M:\"14\",N:\"16\",O:\"17\",P:\"18\",Q:\"79\",R:\"81\",S:\"83\",T:\"84\",U:\"85\",V:\"86\",W:\"87\",X:\"88\",Y:\"89\",Z:\"90\",a:\"91\",b:\"92\",c:\"93\",d:\"94\",e:\"95\",f:\"96\",g:\"97\",h:\"98\",i:\"99\",j:\"100\",k:\"101\",l:\"102\",m:\"103\",n:\"104\",o:\"105\",p:\"106\",q:\"107\",r:\"108\",s:\"109\",t:\"110\",u:\"111\",v:\"20\",w:\"21\",x:\"22\",y:\"23\",z:\"24\",AB:\"121\",BB:\"122\",CB:\"123\",DB:\"124\",EB:\"125\",FB:\"5\",GB:\"19\",HB:\"26\",IB:\"27\",JB:\"28\",KB:\"29\",LB:\"30\",MB:\"31\",NB:\"32\",OB:\"33\",PB:\"34\",QB:\"35\",RB:\"36\",SB:\"37\",TB:\"38\",UB:\"39\",VB:\"40\",WB:\"41\",XB:\"42\",YB:\"43\",ZB:\"44\",aB:\"45\",bB:\"46\",cB:\"47\",dB:\"48\",eB:\"49\",fB:\"50\",gB:\"51\",hB:\"52\",iB:\"53\",jB:\"54\",kB:\"55\",lB:\"56\",mB:\"57\",nB:\"58\",oB:\"60\",pB:\"62\",qB:\"63\",rB:\"64\",sB:\"65\",tB:\"66\",uB:\"67\",vB:\"68\",wB:\"69\",xB:\"70\",yB:\"71\",zB:\"72\",\"0B\":\"73\",\"1B\":\"74\",\"2B\":\"75\",\"3B\":\"76\",\"4B\":\"77\",\"5B\":\"78\",\"6B\":\"127\",\"7B\":\"11.1\",\"8B\":\"12.1\",\"9B\":\"15.5\",AC:\"16.0\",BC:\"17.0\",CC:\"18.0\",DC:\"3\",EC:\"59\",FC:\"61\",GC:\"82\",HC:\"128\",IC:\"129\",JC:\"3.2\",KC:\"10.1\",LC:\"15.2-15.3\",MC:\"15.4\",NC:\"16.1\",OC:\"16.2\",PC:\"16.3\",QC:\"16.4\",RC:\"16.5\",SC:\"17.1\",TC:\"17.2\",UC:\"17.3\",VC:\"17.4\",WC:\"17.5\",XC:\"17.6\",YC:\"11.5\",ZC:\"4.2-4.3\",aC:\"5.5\",bC:\"2\",cC:\"130\",dC:\"3.5\",eC:\"3.6\",fC:\"3.1\",gC:\"5.1\",hC:\"6.1\",iC:\"7.1\",jC:\"9.1\",kC:\"13.1\",lC:\"14.1\",mC:\"15.1\",nC:\"15.6\",oC:\"16.6\",pC:\"TP\",qC:\"9.5-9.6\",rC:\"10.0-10.1\",sC:\"10.5\",tC:\"10.6\",uC:\"11.6\",vC:\"4.0-4.1\",wC:\"5.0-5.1\",xC:\"6.0-6.1\",yC:\"7.0-7.1\",zC:\"8.1-8.4\",\"0C\":\"9.0-9.2\",\"1C\":\"9.3\",\"2C\":\"10.0-10.2\",\"3C\":\"10.3\",\"4C\":\"11.0-11.2\",\"5C\":\"11.3-11.4\",\"6C\":\"12.0-12.1\",\"7C\":\"12.2-12.5\",\"8C\":\"13.0-13.1\",\"9C\":\"13.2\",AD:\"13.3\",BD:\"13.4-13.7\",CD:\"14.0-14.4\",DD:\"14.5-14.8\",ED:\"15.0-15.1\",FD:\"15.6-15.8\",GD:\"16.6-16.7\",HD:\"all\",ID:\"2.1\",JD:\"2.2\",KD:\"2.3\",LD:\"4.1\",MD:\"4.4\",ND:\"4.4.3-4.4.4\",OD:\"5.0-5.4\",PD:\"6.2-6.4\",QD:\"7.2-7.4\",RD:\"8.2\",SD:\"9.2\",TD:\"11.1-11.2\",UD:\"12.0\",VD:\"13.0\",WD:\"14.0\",XD:\"15.0\",YD:\"19.0\",ZD:\"14.9\",aD:\"13.52\",bD:\"2.5\",cD:\"3.0-3.1\"};\n","module.exports.browserVersions = require('../../data/browserVersions')\n","module.exports={A:{A:{K:0,D:0,E:0.0271533,F:0.0678831,A:0,B:0.529489,aC:0},B:\"ms\",C:[\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"aC\",\"K\",\"D\",\"E\",\"F\",\"A\",\"B\",\"\",\"\",\"\"],E:\"IE\",F:{aC:962323200,K:998870400,D:1161129600,E:1237420800,F:1300060800,A:1346716800,B:1381968000}},B:{A:{\"1\":0.00757,\"2\":0.011355,\"3\":0.01514,\"4\":0.00757,\"5\":0.00757,\"6\":0.011355,\"7\":0.00757,\"8\":0.01514,\"9\":0.034065,C:0,L:0,M:0,G:0,N:0,O:0.003785,P:0.041635,Q:0,H:0,R:0,S:0,T:0,U:0,V:0,W:0,X:0,Y:0,Z:0,a:0,b:0.011355,c:0,d:0,e:0,f:0,g:0,h:0,i:0,j:0,k:0,l:0,m:0,n:0,o:0,p:0,q:0.003785,r:0.00757,s:0.064345,t:0.003785,u:0.00757,AB:0.026495,BB:0.064345,CB:0.16654,DB:2.88417,EB:1.57834,I:0.00757},B:\"webkit\",C:[\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"C\",\"L\",\"M\",\"G\",\"N\",\"O\",\"P\",\"Q\",\"H\",\"R\",\"S\",\"T\",\"U\",\"V\",\"W\",\"X\",\"Y\",\"Z\",\"a\",\"b\",\"c\",\"d\",\"e\",\"f\",\"g\",\"h\",\"i\",\"j\",\"k\",\"l\",\"m\",\"n\",\"o\",\"p\",\"q\",\"r\",\"s\",\"t\",\"u\",\"1\",\"2\",\"3\",\"4\",\"5\",\"6\",\"7\",\"8\",\"9\",\"AB\",\"BB\",\"CB\",\"DB\",\"EB\",\"I\",\"\",\"\",\"\"],E:\"Edge\",F:{\"1\":1680825600,\"2\":1683158400,\"3\":1685664000,\"4\":1689897600,\"5\":1692576000,\"6\":1694649600,\"7\":1697155200,\"8\":1698969600,\"9\":1701993600,C:1438128000,L:1447286400,M:1470096000,G:1491868800,N:1508198400,O:1525046400,P:1542067200,Q:1579046400,H:1581033600,R:1586736000,S:1590019200,T:1594857600,U:1598486400,V:1602201600,W:1605830400,X:1611360000,Y:1614816000,Z:1618358400,a:1622073600,b:1626912000,c:1630627200,d:1632441600,e:1634774400,f:1637539200,g:1641427200,h:1643932800,i:1646265600,j:1649635200,k:1651190400,l:1653955200,m:1655942400,n:1659657600,o:1661990400,p:1664755200,q:1666915200,r:1670198400,s:1673481600,t:1675900800,u:1678665600,AB:1706227200,BB:1708732800,CB:1711152000,DB:1713398400,EB:1715990400,I:1718841600},D:{C:\"ms\",L:\"ms\",M:\"ms\",G:\"ms\",N:\"ms\",O:\"ms\",P:\"ms\"}},C:{A:{\"0\":0,\"1\":0,\"2\":0.011355,\"3\":0,\"4\":0.397425,\"5\":0,\"6\":0.00757,\"7\":0.079485,\"8\":0,\"9\":0.00757,bC:0,DC:0,J:0.003785,FB:0,K:0,D:0,E:0,F:0,A:0,B:0.018925,C:0,L:0,M:0,G:0,N:0,O:0,P:0,GB:0,v:0,w:0,x:0,y:0,z:0,HB:0,IB:0,JB:0,KB:0,LB:0,MB:0,NB:0,OB:0,PB:0,QB:0,RB:0,SB:0,TB:0,UB:0,VB:0,WB:0,XB:0,YB:0.00757,ZB:0.00757,aB:0.00757,bB:0,cB:0,dB:0,eB:0,fB:0.00757,gB:0,hB:0.05299,iB:0.003785,jB:0.003785,kB:0,lB:0.02271,mB:0,nB:0,EC:0.003785,oB:0,FC:0,pB:0,qB:0,rB:0,sB:0,tB:0,uB:0,vB:0,wB:0,xB:0,yB:0,zB:0,\"0B\":0,\"1B\":0,\"2B\":0,\"3B\":0,\"4B\":0,\"5B\":0.01514,Q:0,H:0,R:0,GC:0,S:0,T:0,U:0,V:0,W:0,X:0.011355,Y:0,Z:0,a:0,b:0,c:0,d:0.003785,e:0,f:0,g:0,h:0,i:0,j:0,k:0,l:0.011355,m:0.011355,n:0,o:0,p:0,q:0,r:0.003785,s:0.00757,t:0,u:0,AB:0.00757,BB:0.011355,CB:0.01514,DB:0.06813,EB:0.844055,I:0.738075,\"6B\":0.003785,HC:0,IC:0,cC:0,dC:0,eC:0},B:\"moz\",C:[\"bC\",\"DC\",\"dC\",\"eC\",\"J\",\"FB\",\"K\",\"D\",\"E\",\"F\",\"A\",\"B\",\"C\",\"L\",\"M\",\"G\",\"N\",\"O\",\"P\",\"GB\",\"v\",\"w\",\"x\",\"y\",\"z\",\"0\",\"HB\",\"IB\",\"JB\",\"KB\",\"LB\",\"MB\",\"NB\",\"OB\",\"PB\",\"QB\",\"RB\",\"SB\",\"TB\",\"UB\",\"VB\",\"WB\",\"XB\",\"YB\",\"ZB\",\"aB\",\"bB\",\"cB\",\"dB\",\"eB\",\"fB\",\"gB\",\"hB\",\"iB\",\"jB\",\"kB\",\"lB\",\"mB\",\"nB\",\"EC\",\"oB\",\"FC\",\"pB\",\"qB\",\"rB\",\"sB\",\"tB\",\"uB\",\"vB\",\"wB\",\"xB\",\"yB\",\"zB\",\"0B\",\"1B\",\"2B\",\"3B\",\"4B\",\"5B\",\"Q\",\"H\",\"R\",\"GC\",\"S\",\"T\",\"U\",\"V\",\"W\",\"X\",\"Y\",\"Z\",\"a\",\"b\",\"c\",\"d\",\"e\",\"f\",\"g\",\"h\",\"i\",\"j\",\"k\",\"l\",\"m\",\"n\",\"o\",\"p\",\"q\",\"r\",\"s\",\"t\",\"u\",\"1\",\"2\",\"3\",\"4\",\"5\",\"6\",\"7\",\"8\",\"9\",\"AB\",\"BB\",\"CB\",\"DB\",\"EB\",\"I\",\"6B\",\"HC\",\"IC\",\"cC\"],E:\"Firefox\",F:{\"0\":1379376000,\"1\":1681171200,\"2\":1683590400,\"3\":1686009600,\"4\":1688428800,\"5\":1690848000,\"6\":1693267200,\"7\":1695686400,\"8\":1698105600,\"9\":1700524800,bC:1161648000,DC:1213660800,dC:1246320000,eC:1264032000,J:1300752000,FB:1308614400,K:1313452800,D:1317081600,E:1317081600,F:1320710400,A:1324339200,B:1327968000,C:1331596800,L:1335225600,M:1338854400,G:1342483200,N:1346112000,O:1349740800,P:1353628800,GB:1357603200,v:1361232000,w:1364860800,x:1368489600,y:1372118400,z:1375747200,HB:1386633600,IB:1391472000,JB:1395100800,KB:1398729600,LB:1402358400,MB:1405987200,NB:1409616000,OB:1413244800,PB:1417392000,QB:1421107200,RB:1424736000,SB:1428278400,TB:1431475200,UB:1435881600,VB:1439251200,WB:1442880000,XB:1446508800,YB:1450137600,ZB:1453852800,aB:1457395200,bB:1461628800,cB:1465257600,dB:1470096000,eB:1474329600,fB:1479168000,gB:1485216000,hB:1488844800,iB:1492560000,jB:1497312000,kB:1502150400,lB:1506556800,mB:1510617600,nB:1516665600,EC:1520985600,oB:1525824000,FC:1529971200,pB:1536105600,qB:1540252800,rB:1544486400,sB:1548720000,tB:1552953600,uB:1558396800,vB:1562630400,wB:1567468800,xB:1571788800,yB:1575331200,zB:1578355200,\"0B\":1581379200,\"1B\":1583798400,\"2B\":1586304000,\"3B\":1588636800,\"4B\":1591056000,\"5B\":1593475200,Q:1595894400,H:1598313600,R:1600732800,GC:1603152000,S:1605571200,T:1607990400,U:1611619200,V:1614038400,W:1616457600,X:1618790400,Y:1622505600,Z:1626134400,a:1628553600,b:1630972800,c:1633392000,d:1635811200,e:1638835200,f:1641859200,g:1644364800,h:1646697600,i:1649116800,j:1651536000,k:1653955200,l:1656374400,m:1658793600,n:1661212800,o:1663632000,p:1666051200,q:1668470400,r:1670889600,s:1673913600,t:1676332800,u:1678752000,AB:1702944000,BB:1705968000,CB:1708387200,DB:1710806400,EB:1713225600,I:1715644800,\"6B\":1718064000,HC:null,IC:null,cC:null}},D:{A:{\"0\":0,\"1\":0.041635,\"2\":0.09841,\"3\":0.109765,\"4\":0.04542,\"5\":0.230885,\"6\":0.102195,\"7\":0.08327,\"8\":0.09084,\"9\":0.185465,J:0,FB:0,K:0,D:0,E:0,F:0,A:0,B:0,C:0,L:0,M:0,G:0,N:0,O:0,P:0,GB:0,v:0,w:0,x:0,y:0,z:0,HB:0,IB:0,JB:0,KB:0,LB:0,MB:0,NB:0,OB:0,PB:0.00757,QB:0,RB:0,SB:0,TB:0.01514,UB:0,VB:0,WB:0,XB:0,YB:0,ZB:0,aB:0.003785,bB:0,cB:0.003785,dB:0.02271,eB:0.026495,fB:0.011355,gB:0,hB:0.003785,iB:0.003785,jB:0,kB:0,lB:0.011355,mB:0,nB:0.003785,EC:0,oB:0,FC:0.003785,pB:0,qB:0.003785,rB:0,sB:0,tB:0.02271,uB:0.00757,vB:0,wB:0.03028,xB:0.064345,yB:0.003785,zB:0.003785,\"0B\":0.011355,\"1B\":0.00757,\"2B\":0.00757,\"3B\":0.00757,\"4B\":0.00757,\"5B\":0.01514,Q:0.12112,H:0.011355,R:0.02271,S:0.041635,T:0.00757,U:0.011355,V:0.049205,W:0.06813,X:0.01514,Y:0.011355,Z:0.011355,a:0.03785,b:0.018925,c:0.03028,d:0.041635,e:0.011355,f:0.011355,g:0.01514,h:0.071915,i:0.034065,j:0.04542,k:0.06813,l:0.049205,m:0.170325,n:0.094625,o:0.03028,p:0.03785,q:0.03028,r:0.04542,s:1.49507,t:0.026495,u:0.03785,AB:0.389855,BB:0.29523,CB:1.11279,DB:12.6116,EB:4.62527,I:0.018925,\"6B\":0.00757,HC:0,IC:0},B:\"webkit\",C:[\"\",\"\",\"\",\"\",\"\",\"\",\"J\",\"FB\",\"K\",\"D\",\"E\",\"F\",\"A\",\"B\",\"C\",\"L\",\"M\",\"G\",\"N\",\"O\",\"P\",\"GB\",\"v\",\"w\",\"x\",\"y\",\"z\",\"0\",\"HB\",\"IB\",\"JB\",\"KB\",\"LB\",\"MB\",\"NB\",\"OB\",\"PB\",\"QB\",\"RB\",\"SB\",\"TB\",\"UB\",\"VB\",\"WB\",\"XB\",\"YB\",\"ZB\",\"aB\",\"bB\",\"cB\",\"dB\",\"eB\",\"fB\",\"gB\",\"hB\",\"iB\",\"jB\",\"kB\",\"lB\",\"mB\",\"nB\",\"EC\",\"oB\",\"FC\",\"pB\",\"qB\",\"rB\",\"sB\",\"tB\",\"uB\",\"vB\",\"wB\",\"xB\",\"yB\",\"zB\",\"0B\",\"1B\",\"2B\",\"3B\",\"4B\",\"5B\",\"Q\",\"H\",\"R\",\"S\",\"T\",\"U\",\"V\",\"W\",\"X\",\"Y\",\"Z\",\"a\",\"b\",\"c\",\"d\",\"e\",\"f\",\"g\",\"h\",\"i\",\"j\",\"k\",\"l\",\"m\",\"n\",\"o\",\"p\",\"q\",\"r\",\"s\",\"t\",\"u\",\"1\",\"2\",\"3\",\"4\",\"5\",\"6\",\"7\",\"8\",\"9\",\"AB\",\"BB\",\"CB\",\"DB\",\"EB\",\"I\",\"6B\",\"HC\",\"IC\"],E:\"Chrome\",F:{\"0\":1357862400,\"1\":1680566400,\"2\":1682985600,\"3\":1685404800,\"4\":1689724800,\"5\":1692057600,\"6\":1694476800,\"7\":1696896000,\"8\":1698710400,\"9\":1701993600,J:1264377600,FB:1274745600,K:1283385600,D:1287619200,E:1291248000,F:1296777600,A:1299542400,B:1303862400,C:1307404800,L:1312243200,M:1316131200,G:1316131200,N:1319500800,O:1323734400,P:1328659200,GB:1332892800,v:1337040000,w:1340668800,x:1343692800,y:1348531200,z:1352246400,HB:1361404800,IB:1364428800,JB:1369094400,KB:1374105600,LB:1376956800,MB:1384214400,NB:1389657600,OB:1392940800,PB:1397001600,QB:1400544000,RB:1405468800,SB:1409011200,TB:1412640000,UB:1416268800,VB:1421798400,WB:1425513600,XB:1429401600,YB:1432080000,ZB:1437523200,aB:1441152000,bB:1444780800,cB:1449014400,dB:1453248000,eB:1456963200,fB:1460592000,gB:1464134400,hB:1469059200,iB:1472601600,jB:1476230400,kB:1480550400,lB:1485302400,mB:1489017600,nB:1492560000,EC:1496707200,oB:1500940800,FC:1504569600,pB:1508198400,qB:1512518400,rB:1516752000,sB:1520294400,tB:1523923200,uB:1527552000,vB:1532390400,wB:1536019200,xB:1539648000,yB:1543968000,zB:1548720000,\"0B\":1552348800,\"1B\":1555977600,\"2B\":1559606400,\"3B\":1564444800,\"4B\":1568073600,\"5B\":1571702400,Q:1575936000,H:1580860800,R:1586304000,S:1589846400,T:1594684800,U:1598313600,V:1601942400,W:1605571200,X:1611014400,Y:1614556800,Z:1618272000,a:1621987200,b:1626739200,c:1630368000,d:1632268800,e:1634601600,f:1637020800,g:1641340800,h:1643673600,i:1646092800,j:1648512000,k:1650931200,l:1653350400,m:1655769600,n:1659398400,o:1661817600,p:1664236800,q:1666656000,r:1669680000,s:1673308800,t:1675728000,u:1678147200,AB:1705968000,BB:1708387200,CB:1710806400,DB:1713225600,EB:1715644800,I:1718064000,\"6B\":null,HC:null,IC:null}},E:{A:{J:0,FB:0,K:0,D:0,E:0.01514,F:0.003785,A:0,B:0,C:0,L:0.00757,M:0.034065,G:0.00757,fC:0,JC:0,gC:0,hC:0,iC:0,jC:0,KC:0,\"7B\":0.00757,\"8B\":0.01514,kC:0.064345,lC:0.09084,mC:0.034065,LC:0.011355,MC:0.026495,\"9B\":0.034065,nC:0.246025,AC:0.03028,NC:0.049205,OC:0.03785,PC:0.09841,QC:0.03028,RC:0.06056,oC:0.34065,BC:0.03785,SC:0.06813,TC:0.08327,UC:0.09841,VC:1.5405,WC:0.185465,XC:0,CC:0,pC:0},B:\"webkit\",C:[\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"fC\",\"JC\",\"J\",\"FB\",\"gC\",\"K\",\"hC\",\"D\",\"iC\",\"E\",\"F\",\"jC\",\"A\",\"KC\",\"B\",\"7B\",\"C\",\"8B\",\"L\",\"kC\",\"M\",\"lC\",\"G\",\"mC\",\"LC\",\"MC\",\"9B\",\"nC\",\"AC\",\"NC\",\"OC\",\"PC\",\"QC\",\"RC\",\"oC\",\"BC\",\"SC\",\"TC\",\"UC\",\"VC\",\"WC\",\"XC\",\"CC\",\"pC\"],E:\"Safari\",F:{fC:1205798400,JC:1226534400,J:1244419200,FB:1275868800,gC:1311120000,K:1343174400,hC:1382400000,D:1382400000,iC:1410998400,E:1413417600,F:1443657600,jC:1458518400,A:1474329600,KC:1490572800,B:1505779200,\"7B\":1522281600,C:1537142400,\"8B\":1553472000,L:1568851200,kC:1585008000,M:1600214400,lC:1619395200,G:1632096000,mC:1635292800,LC:1639353600,MC:1647216000,\"9B\":1652745600,nC:1658275200,AC:1662940800,NC:1666569600,OC:1670889600,PC:1674432000,QC:1679875200,RC:1684368000,oC:1690156800,BC:1695686400,SC:1698192000,TC:1702252800,UC:1705881600,VC:1709596800,WC:1715558400,XC:null,CC:null,pC:null}},F:{A:{\"0\":0,F:0,B:0,C:0,G:0,N:0,O:0,P:0,GB:0,v:0,w:0,x:0,y:0,z:0,HB:0,IB:0,JB:0,KB:0,LB:0,MB:0,NB:0,OB:0,PB:0,QB:0,RB:0,SB:0,TB:0,UB:0,VB:0,WB:0,XB:0,YB:0,ZB:0,aB:0,bB:0.01514,cB:0,dB:0,eB:0,fB:0,gB:0,hB:0,iB:0,jB:0,kB:0,lB:0,mB:0,nB:0,oB:0,pB:0,qB:0,rB:0,sB:0,tB:0,uB:0,vB:0,wB:0,xB:0,yB:0,zB:0,\"0B\":0,\"1B\":0,\"2B\":0,\"3B\":0,\"4B\":0,\"5B\":0,Q:0,H:0,R:0,GC:0,S:0,T:0,U:0,V:0,W:0,X:0,Y:0,Z:0,a:0,b:0,c:0,d:0,e:0.041635,f:0,g:0,h:0,i:0,j:0,k:0,l:0.071915,m:0,n:0,o:0,p:0.00757,q:0.185465,r:0.01514,s:0.738075,t:0.04542,u:0,qC:0,rC:0,sC:0,tC:0,\"7B\":0,YC:0,uC:0,\"8B\":0},B:\"webkit\",C:[\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"F\",\"qC\",\"rC\",\"sC\",\"tC\",\"B\",\"7B\",\"YC\",\"uC\",\"C\",\"8B\",\"G\",\"N\",\"O\",\"P\",\"GB\",\"v\",\"w\",\"x\",\"y\",\"z\",\"0\",\"HB\",\"IB\",\"JB\",\"KB\",\"LB\",\"MB\",\"NB\",\"OB\",\"PB\",\"QB\",\"RB\",\"SB\",\"TB\",\"UB\",\"VB\",\"WB\",\"XB\",\"YB\",\"ZB\",\"aB\",\"bB\",\"cB\",\"dB\",\"eB\",\"fB\",\"gB\",\"hB\",\"iB\",\"jB\",\"kB\",\"lB\",\"mB\",\"nB\",\"oB\",\"pB\",\"qB\",\"rB\",\"sB\",\"tB\",\"uB\",\"vB\",\"wB\",\"xB\",\"yB\",\"zB\",\"0B\",\"1B\",\"2B\",\"3B\",\"4B\",\"5B\",\"Q\",\"H\",\"R\",\"GC\",\"S\",\"T\",\"U\",\"V\",\"W\",\"X\",\"Y\",\"Z\",\"a\",\"b\",\"c\",\"d\",\"e\",\"f\",\"g\",\"h\",\"i\",\"j\",\"k\",\"l\",\"m\",\"n\",\"o\",\"p\",\"q\",\"r\",\"s\",\"t\",\"u\",\"\",\"\",\"\"],E:\"Opera\",F:{\"0\":1413331200,F:1150761600,qC:1223424000,rC:1251763200,sC:1267488000,tC:1277942400,B:1292457600,\"7B\":1302566400,YC:1309219200,uC:1323129600,C:1323129600,\"8B\":1352073600,G:1372723200,N:1377561600,O:1381104000,P:1386288000,GB:1390867200,v:1393891200,w:1399334400,x:1401753600,y:1405987200,z:1409616000,HB:1417132800,IB:1422316800,JB:1425945600,KB:1430179200,LB:1433808000,MB:1438646400,NB:1442448000,OB:1445904000,PB:1449100800,QB:1454371200,RB:1457308800,SB:1462320000,TB:1465344000,UB:1470096000,VB:1474329600,WB:1477267200,XB:1481587200,YB:1486425600,ZB:1490054400,aB:1494374400,bB:1498003200,cB:1502236800,dB:1506470400,eB:1510099200,fB:1515024000,gB:1517961600,hB:1521676800,iB:1525910400,jB:1530144000,kB:1534982400,lB:1537833600,mB:1543363200,nB:1548201600,oB:1554768000,pB:1561593600,qB:1566259200,rB:1570406400,sB:1573689600,tB:1578441600,uB:1583971200,vB:1587513600,wB:1592956800,xB:1595894400,yB:1600128000,zB:1603238400,\"0B\":1613520000,\"1B\":1612224000,\"2B\":1616544000,\"3B\":1619568000,\"4B\":1623715200,\"5B\":1627948800,Q:1631577600,H:1633392000,R:1635984000,GC:1638403200,S:1642550400,T:1644969600,U:1647993600,V:1650412800,W:1652745600,X:1654646400,Y:1657152000,Z:1660780800,a:1663113600,b:1668816000,c:1668643200,d:1671062400,e:1675209600,f:1677024000,g:1679529600,h:1681948800,i:1684195200,j:1687219200,k:1690329600,l:1692748800,m:1696204800,n:1699920000,o:1699920000,p:1702944000,q:1707264000,r:1710115200,s:1711497600,t:1716336000,u:1719273600},D:{F:\"o\",B:\"o\",C:\"o\",qC:\"o\",rC:\"o\",sC:\"o\",tC:\"o\",\"7B\":\"o\",YC:\"o\",uC:\"o\",\"8B\":\"o\"}},G:{A:{E:0,JC:0,vC:0,ZC:0.00289868,wC:0.00289868,xC:0.00724669,yC:0.0115947,zC:0.00289868,\"0C\":0.00724669,\"1C\":0.0333348,\"2C\":0.00579735,\"3C\":0.0521762,\"4C\":0.0768149,\"5C\":0.0144934,\"6C\":0.00869603,\"7C\":0.210154,\"8C\":0.00434801,\"9C\":0.0217401,AD:0.0101454,BD:0.0463788,CD:0.100004,DD:0.123194,ED:0.0594229,LC:0.0652202,MC:0.0739162,\"9B\":0.0927576,FD:0.83192,AC:0.189863,NC:0.389872,OC:0.189863,PC:0.329,QC:0.0695682,RC:0.140586,GD:1.11744,BC:0.121744,SC:0.198559,TC:0.207255,UC:0.382625,VC:8.67429,WC:0.61307,XC:0,CC:0},B:\"webkit\",C:[\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"JC\",\"vC\",\"ZC\",\"wC\",\"xC\",\"yC\",\"E\",\"zC\",\"0C\",\"1C\",\"2C\",\"3C\",\"4C\",\"5C\",\"6C\",\"7C\",\"8C\",\"9C\",\"AD\",\"BD\",\"CD\",\"DD\",\"ED\",\"LC\",\"MC\",\"9B\",\"FD\",\"AC\",\"NC\",\"OC\",\"PC\",\"QC\",\"RC\",\"GD\",\"BC\",\"SC\",\"TC\",\"UC\",\"VC\",\"WC\",\"XC\",\"CC\",\"\"],E:\"Safari on iOS\",F:{JC:1270252800,vC:1283904000,ZC:1299628800,wC:1331078400,xC:1359331200,yC:1394409600,E:1410912000,zC:1413763200,\"0C\":1442361600,\"1C\":1458518400,\"2C\":1473724800,\"3C\":1490572800,\"4C\":1505779200,\"5C\":1522281600,\"6C\":1537142400,\"7C\":1553472000,\"8C\":1568851200,\"9C\":1572220800,AD:1580169600,BD:1585008000,CD:1600214400,DD:1619395200,ED:1632096000,LC:1639353600,MC:1647216000,\"9B\":1652659200,FD:1658275200,AC:1662940800,NC:1666569600,OC:1670889600,PC:1674432000,QC:1679875200,RC:1684368000,GD:1690156800,BC:1694995200,SC:1698192000,TC:1702252800,UC:1705881600,VC:1709596800,WC:1715558400,XC:null,CC:null}},H:{A:{HD:0.1},B:\"o\",C:[\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"HD\",\"\",\"\",\"\"],E:\"Opera Mini\",F:{HD:1426464000}},I:{A:{DC:0,J:0.000065879,I:0.656352,ID:0,JD:0,KD:0,LD:0.000131758,ZC:0.000395274,MD:0,ND:0.00144934},B:\"webkit\",C:[\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"ID\",\"JD\",\"KD\",\"DC\",\"J\",\"LD\",\"ZC\",\"MD\",\"ND\",\"I\",\"\",\"\",\"\"],E:\"Android Browser\",F:{ID:1256515200,JD:1274313600,KD:1291593600,DC:1298332800,J:1318896000,LD:1341792000,ZC:1374624000,MD:1386547200,ND:1401667200,I:1718064000}},J:{A:{D:0,A:0},B:\"webkit\",C:[\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"D\",\"A\",\"\",\"\",\"\"],E:\"Blackberry Browser\",F:{D:1325376000,A:1359504000}},K:{A:{A:0,B:0,C:0,H:1.2238,\"7B\":0,YC:0,\"8B\":0},B:\"o\",C:[\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"A\",\"B\",\"7B\",\"YC\",\"C\",\"8B\",\"H\",\"\",\"\",\"\"],E:\"Opera Mobile\",F:{A:1287100800,B:1300752000,\"7B\":1314835200,YC:1318291200,C:1330300800,\"8B\":1349740800,H:1709769600},D:{H:\"webkit\"}},L:{A:{I:42.0636},B:\"webkit\",C:[\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"I\",\"\",\"\",\"\"],E:\"Chrome for Android\",F:{I:1718064000}},M:{A:{\"6B\":0.31075},B:\"moz\",C:[\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"6B\",\"\",\"\",\"\"],E:\"Firefox for Android\",F:{\"6B\":1718064000}},N:{A:{A:0,B:0},B:\"ms\",C:[\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"A\",\"B\",\"\",\"\",\"\"],E:\"IE Mobile\",F:{A:1340150400,B:1353456000}},O:{A:{\"9B\":0.913605},B:\"webkit\",C:[\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"9B\",\"\",\"\",\"\"],E:\"UC Browser for Android\",F:{\"9B\":1710115200},D:{\"9B\":\"webkit\"}},P:{A:{\"0\":1.98584,J:0.141071,v:0.0217032,w:0.0542579,x:0.0651095,y:0.119367,z:0.227883,OD:0.0108516,PD:0,QD:0.0325548,RD:0,SD:0,KC:0,TD:0.0108516,UD:0,VD:0.0108516,WD:0,XD:0,AC:0,BC:0.0217032,CC:0.0108516,YD:0.0217032},B:\"webkit\",C:[\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"J\",\"OD\",\"PD\",\"QD\",\"RD\",\"SD\",\"KC\",\"TD\",\"UD\",\"VD\",\"WD\",\"XD\",\"AC\",\"BC\",\"CC\",\"YD\",\"v\",\"w\",\"x\",\"y\",\"z\",\"0\",\"\",\"\",\"\"],E:\"Samsung Internet\",F:{\"0\":1715126400,J:1461024000,OD:1481846400,PD:1509408000,QD:1528329600,RD:1546128000,SD:1554163200,KC:1567900800,TD:1582588800,UD:1593475200,VD:1605657600,WD:1618531200,XD:1629072000,AC:1640736000,BC:1651708800,CC:1659657600,YD:1667260800,v:1677369600,w:1684454400,x:1689292800,y:1697587200,z:1711497600}},Q:{A:{ZD:0.292105},B:\"webkit\",C:[\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"ZD\",\"\",\"\",\"\"],E:\"QQ Browser\",F:{ZD:1710288000}},R:{A:{aD:0},B:\"webkit\",C:[\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"aD\",\"\",\"\",\"\"],E:\"Baidu Browser\",F:{aD:1710201600}},S:{A:{bD:0.08701,cD:0},B:\"moz\",C:[\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"bD\",\"cD\",\"\",\"\",\"\"],E:\"KaiOS Browser\",F:{bD:1527811200,cD:1631664000}}};\n","'use strict'\n\nconst browsers = require('./browsers').browsers\nconst versions = require('./browserVersions').browserVersions\nconst agentsData = require('../../data/agents')\n\nfunction unpackBrowserVersions(versionsData) {\n return Object.keys(versionsData).reduce((usage, version) => {\n usage[versions[version]] = versionsData[version]\n return usage\n }, {})\n}\n\nmodule.exports.agents = Object.keys(agentsData).reduce((map, key) => {\n let versionsData = agentsData[key]\n map[browsers[key]] = Object.keys(versionsData).reduce((data, entry) => {\n if (entry === 'A') {\n data.usage_global = unpackBrowserVersions(versionsData[entry])\n } else if (entry === 'C') {\n data.versions = versionsData[entry].reduce((list, version) => {\n if (version === '') {\n list.push(null)\n } else {\n list.push(versions[version])\n }\n return list\n }, [])\n } else if (entry === 'D') {\n data.prefix_exceptions = unpackBrowserVersions(versionsData[entry])\n } else if (entry === 'E') {\n data.browser = versionsData[entry]\n } else if (entry === 'F') {\n data.release_date = Object.keys(versionsData[entry]).reduce(\n (map2, key2) => {\n map2[versions[key2]] = versionsData[entry][key2]\n return map2\n },\n {}\n )\n } else {\n // entry is B\n data.prefix = versionsData[entry]\n }\n return data\n }, {})\n return map\n}, {})\n","module.exports = {\n\t\"0.20\": \"39\",\n\t\"0.21\": \"41\",\n\t\"0.22\": \"41\",\n\t\"0.23\": \"41\",\n\t\"0.24\": \"41\",\n\t\"0.25\": \"42\",\n\t\"0.26\": \"42\",\n\t\"0.27\": \"43\",\n\t\"0.28\": \"43\",\n\t\"0.29\": \"43\",\n\t\"0.30\": \"44\",\n\t\"0.31\": \"45\",\n\t\"0.32\": \"45\",\n\t\"0.33\": \"45\",\n\t\"0.34\": \"45\",\n\t\"0.35\": \"45\",\n\t\"0.36\": \"47\",\n\t\"0.37\": \"49\",\n\t\"1.0\": \"49\",\n\t\"1.1\": \"50\",\n\t\"1.2\": \"51\",\n\t\"1.3\": \"52\",\n\t\"1.4\": \"53\",\n\t\"1.5\": \"54\",\n\t\"1.6\": \"56\",\n\t\"1.7\": \"58\",\n\t\"1.8\": \"59\",\n\t\"2.0\": \"61\",\n\t\"2.1\": \"61\",\n\t\"3.0\": \"66\",\n\t\"3.1\": \"66\",\n\t\"4.0\": \"69\",\n\t\"4.1\": \"69\",\n\t\"4.2\": \"69\",\n\t\"5.0\": \"73\",\n\t\"6.0\": \"76\",\n\t\"6.1\": \"76\",\n\t\"7.0\": \"78\",\n\t\"7.1\": \"78\",\n\t\"7.2\": \"78\",\n\t\"7.3\": \"78\",\n\t\"8.0\": \"80\",\n\t\"8.1\": \"80\",\n\t\"8.2\": \"80\",\n\t\"8.3\": \"80\",\n\t\"8.4\": \"80\",\n\t\"8.5\": \"80\",\n\t\"9.0\": \"83\",\n\t\"9.1\": \"83\",\n\t\"9.2\": \"83\",\n\t\"9.3\": \"83\",\n\t\"9.4\": \"83\",\n\t\"10.0\": \"85\",\n\t\"10.1\": \"85\",\n\t\"10.2\": \"85\",\n\t\"10.3\": \"85\",\n\t\"10.4\": \"85\",\n\t\"11.0\": \"87\",\n\t\"11.1\": \"87\",\n\t\"11.2\": \"87\",\n\t\"11.3\": \"87\",\n\t\"11.4\": \"87\",\n\t\"11.5\": \"87\",\n\t\"12.0\": \"89\",\n\t\"12.1\": \"89\",\n\t\"12.2\": \"89\",\n\t\"13.0\": \"91\",\n\t\"13.1\": \"91\",\n\t\"13.2\": \"91\",\n\t\"13.3\": \"91\",\n\t\"13.4\": \"91\",\n\t\"13.5\": \"91\",\n\t\"13.6\": \"91\",\n\t\"14.0\": \"93\",\n\t\"14.1\": \"93\",\n\t\"14.2\": \"93\",\n\t\"15.0\": \"94\",\n\t\"15.1\": \"94\",\n\t\"15.2\": \"94\",\n\t\"15.3\": \"94\",\n\t\"15.4\": \"94\",\n\t\"15.5\": \"94\",\n\t\"16.0\": \"96\",\n\t\"16.1\": \"96\",\n\t\"16.2\": \"96\",\n\t\"17.0\": \"98\",\n\t\"17.1\": \"98\",\n\t\"17.2\": \"98\",\n\t\"17.3\": \"98\",\n\t\"17.4\": \"98\",\n\t\"18.0\": \"100\",\n\t\"18.1\": \"100\",\n\t\"18.2\": \"100\",\n\t\"18.3\": \"100\",\n\t\"19.0\": \"102\",\n\t\"19.1\": \"102\",\n\t\"20.0\": \"104\",\n\t\"20.1\": \"104\",\n\t\"20.2\": \"104\",\n\t\"20.3\": \"104\",\n\t\"21.0\": \"106\",\n\t\"21.1\": \"106\",\n\t\"21.2\": \"106\",\n\t\"21.3\": \"106\",\n\t\"21.4\": \"106\",\n\t\"22.0\": \"108\",\n\t\"22.1\": \"108\",\n\t\"22.2\": \"108\",\n\t\"22.3\": \"108\",\n\t\"23.0\": \"110\",\n\t\"23.1\": \"110\",\n\t\"23.2\": \"110\",\n\t\"23.3\": \"110\",\n\t\"24.0\": \"112\",\n\t\"24.1\": \"112\",\n\t\"24.2\": \"112\",\n\t\"24.3\": \"112\",\n\t\"24.4\": \"112\",\n\t\"24.5\": \"112\",\n\t\"24.6\": \"112\",\n\t\"24.7\": \"112\",\n\t\"24.8\": \"112\",\n\t\"25.0\": \"114\",\n\t\"25.1\": \"114\",\n\t\"25.2\": \"114\",\n\t\"25.3\": \"114\",\n\t\"25.4\": \"114\",\n\t\"25.5\": \"114\",\n\t\"25.6\": \"114\",\n\t\"25.7\": \"114\",\n\t\"25.8\": \"114\",\n\t\"25.9\": \"114\",\n\t\"26.0\": \"116\",\n\t\"26.1\": \"116\",\n\t\"26.2\": \"116\",\n\t\"26.3\": \"116\",\n\t\"26.4\": \"116\",\n\t\"26.5\": \"116\",\n\t\"26.6\": \"116\",\n\t\"27.0\": \"118\",\n\t\"27.1\": \"118\",\n\t\"27.2\": \"118\",\n\t\"27.3\": \"118\",\n\t\"28.0\": \"120\",\n\t\"28.1\": \"120\",\n\t\"28.2\": \"120\",\n\t\"28.3\": \"120\",\n\t\"29.0\": \"122\",\n\t\"29.1\": \"122\",\n\t\"29.2\": \"122\",\n\t\"29.3\": \"122\",\n\t\"29.4\": \"122\",\n\t\"30.0\": \"124\",\n\t\"30.1\": \"124\",\n\t\"31.0\": \"126\",\n\t\"31.1\": \"126\",\n\t\"32.0\": \"127\"\n};","function BrowserslistError(message) {\n this.name = 'BrowserslistError'\n this.message = message\n this.browserslist = true\n if (Error.captureStackTrace) {\n Error.captureStackTrace(this, BrowserslistError)\n }\n}\n\nBrowserslistError.prototype = Error.prototype\n\nmodule.exports = BrowserslistError\n","var AND_REGEXP = /^\\s+and\\s+(.*)/i\nvar OR_REGEXP = /^(?:,\\s*|\\s+or\\s+)(.*)/i\n\nfunction flatten(array) {\n if (!Array.isArray(array)) return [array]\n return array.reduce(function (a, b) {\n return a.concat(flatten(b))\n }, [])\n}\n\nfunction find(string, predicate) {\n for (var n = 1, max = string.length; n <= max; n++) {\n var parsed = string.substr(-n, n)\n if (predicate(parsed, n, max)) {\n return string.slice(0, -n)\n }\n }\n return ''\n}\n\nfunction matchQuery(all, query) {\n var node = { query: query }\n if (query.indexOf('not ') === 0) {\n node.not = true\n query = query.slice(4)\n }\n\n for (var name in all) {\n var type = all[name]\n var match = query.match(type.regexp)\n if (match) {\n node.type = name\n for (var i = 0; i < type.matches.length; i++) {\n node[type.matches[i]] = match[i + 1]\n }\n return node\n }\n }\n\n node.type = 'unknown'\n return node\n}\n\nfunction matchBlock(all, string, qs) {\n var node\n return find(string, function (parsed, n, max) {\n if (AND_REGEXP.test(parsed)) {\n node = matchQuery(all, parsed.match(AND_REGEXP)[1])\n node.compose = 'and'\n qs.unshift(node)\n return true\n } else if (OR_REGEXP.test(parsed)) {\n node = matchQuery(all, parsed.match(OR_REGEXP)[1])\n node.compose = 'or'\n qs.unshift(node)\n return true\n } else if (n === max) {\n node = matchQuery(all, parsed.trim())\n node.compose = 'or'\n qs.unshift(node)\n return true\n }\n return false\n })\n}\n\nmodule.exports = function parse(all, queries) {\n if (!Array.isArray(queries)) queries = [queries]\n return flatten(\n queries.map(function (block) {\n var qs = []\n do {\n block = matchBlock(all, block, qs)\n } while (block)\n return qs\n })\n )\n}\n","var BrowserslistError = require('./error')\n\nfunction noop() {}\n\nmodule.exports = {\n loadQueries: function loadQueries() {\n throw new BrowserslistError(\n 'Sharable configs are not supported in client-side build of Browserslist'\n )\n },\n\n getStat: function getStat(opts) {\n return opts.stats\n },\n\n loadConfig: function loadConfig(opts) {\n if (opts.config) {\n throw new BrowserslistError(\n 'Browserslist config are not supported in client-side build'\n )\n }\n },\n\n loadCountry: function loadCountry() {\n throw new BrowserslistError(\n 'Country statistics are not supported ' +\n 'in client-side build of Browserslist'\n )\n },\n\n loadFeature: function loadFeature() {\n throw new BrowserslistError(\n 'Supports queries are not available in client-side build of Browserslist'\n )\n },\n\n currentNode: function currentNode(resolve, context) {\n return resolve(['maintained node versions'], context)[0]\n },\n\n parseConfig: noop,\n\n readConfig: noop,\n\n findConfig: noop,\n\n clearCaches: noop,\n\n oldDataWarning: noop,\n\n env: {}\n}\n","var jsReleases = require('node-releases/data/processed/envs.json')\nvar agents = require('caniuse-lite/dist/unpacker/agents').agents\nvar jsEOL = require('node-releases/data/release-schedule/release-schedule.json')\nvar path = require('path')\nvar e2c = require('electron-to-chromium/versions')\n\nvar BrowserslistError = require('./error')\nvar parse = require('./parse')\nvar env = require('./node') // Will load browser.js in webpack\n\nvar YEAR = 365.259641 * 24 * 60 * 60 * 1000\nvar ANDROID_EVERGREEN_FIRST = '37'\nvar OP_MOB_BLINK_FIRST = 14\n\n// Helpers\n\nfunction isVersionsMatch(versionA, versionB) {\n return (versionA + '.').indexOf(versionB + '.') === 0\n}\n\nfunction isEolReleased(name) {\n var version = name.slice(1)\n return browserslist.nodeVersions.some(function (i) {\n return isVersionsMatch(i, version)\n })\n}\n\nfunction normalize(versions) {\n return versions.filter(function (version) {\n return typeof version === 'string'\n })\n}\n\nfunction normalizeElectron(version) {\n var versionToUse = version\n if (version.split('.').length === 3) {\n versionToUse = version.split('.').slice(0, -1).join('.')\n }\n return versionToUse\n}\n\nfunction nameMapper(name) {\n return function mapName(version) {\n return name + ' ' + version\n }\n}\n\nfunction getMajor(version) {\n return parseInt(version.split('.')[0])\n}\n\nfunction getMajorVersions(released, number) {\n if (released.length === 0) return []\n var majorVersions = uniq(released.map(getMajor))\n var minimum = majorVersions[majorVersions.length - number]\n if (!minimum) {\n return released\n }\n var selected = []\n for (var i = released.length - 1; i >= 0; i--) {\n if (minimum > getMajor(released[i])) break\n selected.unshift(released[i])\n }\n return selected\n}\n\nfunction uniq(array) {\n var filtered = []\n for (var i = 0; i < array.length; i++) {\n if (filtered.indexOf(array[i]) === -1) filtered.push(array[i])\n }\n return filtered\n}\n\nfunction fillUsage(result, name, data) {\n for (var i in data) {\n result[name + ' ' + i] = data[i]\n }\n}\n\nfunction generateFilter(sign, version) {\n version = parseFloat(version)\n if (sign === '>') {\n return function (v) {\n return parseFloat(v) > version\n }\n } else if (sign === '>=') {\n return function (v) {\n return parseFloat(v) >= version\n }\n } else if (sign === '<') {\n return function (v) {\n return parseFloat(v) < version\n }\n } else {\n return function (v) {\n return parseFloat(v) <= version\n }\n }\n}\n\nfunction generateSemverFilter(sign, version) {\n version = version.split('.').map(parseSimpleInt)\n version[1] = version[1] || 0\n version[2] = version[2] || 0\n if (sign === '>') {\n return function (v) {\n v = v.split('.').map(parseSimpleInt)\n return compareSemver(v, version) > 0\n }\n } else if (sign === '>=') {\n return function (v) {\n v = v.split('.').map(parseSimpleInt)\n return compareSemver(v, version) >= 0\n }\n } else if (sign === '<') {\n return function (v) {\n v = v.split('.').map(parseSimpleInt)\n return compareSemver(version, v) > 0\n }\n } else {\n return function (v) {\n v = v.split('.').map(parseSimpleInt)\n return compareSemver(version, v) >= 0\n }\n }\n}\n\nfunction parseSimpleInt(x) {\n return parseInt(x)\n}\n\nfunction compare(a, b) {\n if (a < b) return -1\n if (a > b) return +1\n return 0\n}\n\nfunction compareSemver(a, b) {\n return (\n compare(parseInt(a[0]), parseInt(b[0])) ||\n compare(parseInt(a[1] || '0'), parseInt(b[1] || '0')) ||\n compare(parseInt(a[2] || '0'), parseInt(b[2] || '0'))\n )\n}\n\n// this follows the npm-like semver behavior\nfunction semverFilterLoose(operator, range) {\n range = range.split('.').map(parseSimpleInt)\n if (typeof range[1] === 'undefined') {\n range[1] = 'x'\n }\n // ignore any patch version because we only return minor versions\n // range[2] = 'x'\n switch (operator) {\n case '<=':\n return function (version) {\n version = version.split('.').map(parseSimpleInt)\n return compareSemverLoose(version, range) <= 0\n }\n case '>=':\n default:\n return function (version) {\n version = version.split('.').map(parseSimpleInt)\n return compareSemverLoose(version, range) >= 0\n }\n }\n}\n\n// this follows the npm-like semver behavior\nfunction compareSemverLoose(version, range) {\n if (version[0] !== range[0]) {\n return version[0] < range[0] ? -1 : +1\n }\n if (range[1] === 'x') {\n return 0\n }\n if (version[1] !== range[1]) {\n return version[1] < range[1] ? -1 : +1\n }\n return 0\n}\n\nfunction resolveVersion(data, version) {\n if (data.versions.indexOf(version) !== -1) {\n return version\n } else if (browserslist.versionAliases[data.name][version]) {\n return browserslist.versionAliases[data.name][version]\n } else {\n return false\n }\n}\n\nfunction normalizeVersion(data, version) {\n var resolved = resolveVersion(data, version)\n if (resolved) {\n return resolved\n } else if (data.versions.length === 1) {\n return data.versions[0]\n } else {\n return false\n }\n}\n\nfunction filterByYear(since, context) {\n since = since / 1000\n return Object.keys(agents).reduce(function (selected, name) {\n var data = byName(name, context)\n if (!data) return selected\n var versions = Object.keys(data.releaseDate).filter(function (v) {\n var date = data.releaseDate[v]\n return date !== null && date >= since\n })\n return selected.concat(versions.map(nameMapper(data.name)))\n }, [])\n}\n\nfunction cloneData(data) {\n return {\n name: data.name,\n versions: data.versions,\n released: data.released,\n releaseDate: data.releaseDate\n }\n}\n\nfunction byName(name, context) {\n name = name.toLowerCase()\n name = browserslist.aliases[name] || name\n if (context.mobileToDesktop && browserslist.desktopNames[name]) {\n var desktop = browserslist.data[browserslist.desktopNames[name]]\n if (name === 'android') {\n return normalizeAndroidData(cloneData(browserslist.data[name]), desktop)\n } else {\n var cloned = cloneData(desktop)\n cloned.name = name\n return cloned\n }\n }\n return browserslist.data[name]\n}\n\nfunction normalizeAndroidVersions(androidVersions, chromeVersions) {\n var iFirstEvergreen = chromeVersions.indexOf(ANDROID_EVERGREEN_FIRST)\n return androidVersions\n .filter(function (version) {\n return /^(?:[2-4]\\.|[34]$)/.test(version)\n })\n .concat(chromeVersions.slice(iFirstEvergreen))\n}\n\nfunction copyObject(obj) {\n var copy = {}\n for (var key in obj) {\n copy[key] = obj[key]\n }\n return copy\n}\n\nfunction normalizeAndroidData(android, chrome) {\n android.released = normalizeAndroidVersions(android.released, chrome.released)\n android.versions = normalizeAndroidVersions(android.versions, chrome.versions)\n android.releaseDate = copyObject(android.releaseDate)\n android.released.forEach(function (v) {\n if (android.releaseDate[v] === undefined) {\n android.releaseDate[v] = chrome.releaseDate[v]\n }\n })\n return android\n}\n\nfunction checkName(name, context) {\n var data = byName(name, context)\n if (!data) throw new BrowserslistError('Unknown browser ' + name)\n return data\n}\n\nfunction unknownQuery(query) {\n return new BrowserslistError(\n 'Unknown browser query `' +\n query +\n '`. ' +\n 'Maybe you are using old Browserslist or made typo in query.'\n )\n}\n\n// Adjusts last X versions queries for some mobile browsers,\n// where caniuse data jumps from a legacy version to the latest\nfunction filterJumps(list, name, nVersions, context) {\n var jump = 1\n switch (name) {\n case 'android':\n if (context.mobileToDesktop) return list\n var released = browserslist.data.chrome.released\n jump = released.length - released.indexOf(ANDROID_EVERGREEN_FIRST)\n break\n case 'op_mob':\n var latest = browserslist.data.op_mob.released.slice(-1)[0]\n jump = getMajor(latest) - OP_MOB_BLINK_FIRST + 1\n break\n default:\n return list\n }\n if (nVersions <= jump) {\n return list.slice(-1)\n }\n return list.slice(jump - 1 - nVersions)\n}\n\nfunction isSupported(flags, withPartial) {\n return (\n typeof flags === 'string' &&\n (flags.indexOf('y') >= 0 || (withPartial && flags.indexOf('a') >= 0))\n )\n}\n\nfunction resolve(queries, context) {\n return parse(QUERIES, queries).reduce(function (result, node, index) {\n if (node.not && index === 0) {\n throw new BrowserslistError(\n 'Write any browsers query (for instance, `defaults`) ' +\n 'before `' +\n node.query +\n '`'\n )\n }\n var type = QUERIES[node.type]\n var array = type.select.call(browserslist, context, node).map(function (j) {\n var parts = j.split(' ')\n if (parts[1] === '0') {\n return parts[0] + ' ' + byName(parts[0], context).versions[0]\n } else {\n return j\n }\n })\n\n if (node.compose === 'and') {\n if (node.not) {\n return result.filter(function (j) {\n return array.indexOf(j) === -1\n })\n } else {\n return result.filter(function (j) {\n return array.indexOf(j) !== -1\n })\n }\n } else {\n if (node.not) {\n var filter = {}\n array.forEach(function (j) {\n filter[j] = true\n })\n return result.filter(function (j) {\n return !filter[j]\n })\n }\n return result.concat(array)\n }\n }, [])\n}\n\nfunction prepareOpts(opts) {\n if (typeof opts === 'undefined') opts = {}\n\n if (typeof opts.path === 'undefined') {\n opts.path = path.resolve ? path.resolve('.') : '.'\n }\n\n return opts\n}\n\nfunction prepareQueries(queries, opts) {\n if (typeof queries === 'undefined' || queries === null) {\n var config = browserslist.loadConfig(opts)\n if (config) {\n queries = config\n } else {\n queries = browserslist.defaults\n }\n }\n\n return queries\n}\n\nfunction checkQueries(queries) {\n if (!(typeof queries === 'string' || Array.isArray(queries))) {\n throw new BrowserslistError(\n 'Browser queries must be an array or string. Got ' + typeof queries + '.'\n )\n }\n}\n\nvar cache = {}\n\nfunction browserslist(queries, opts) {\n opts = prepareOpts(opts)\n queries = prepareQueries(queries, opts)\n checkQueries(queries)\n\n var context = {\n ignoreUnknownVersions: opts.ignoreUnknownVersions,\n dangerousExtend: opts.dangerousExtend,\n mobileToDesktop: opts.mobileToDesktop,\n path: opts.path,\n env: opts.env\n }\n\n env.oldDataWarning(browserslist.data)\n var stats = env.getStat(opts, browserslist.data)\n if (stats) {\n context.customUsage = {}\n for (var browser in stats) {\n fillUsage(context.customUsage, browser, stats[browser])\n }\n }\n\n var cacheKey = JSON.stringify([queries, context])\n if (cache[cacheKey]) return cache[cacheKey]\n\n var result = uniq(resolve(queries, context)).sort(function (name1, name2) {\n name1 = name1.split(' ')\n name2 = name2.split(' ')\n if (name1[0] === name2[0]) {\n // assumptions on caniuse data\n // 1) version ranges never overlaps\n // 2) if version is not a range, it never contains `-`\n var version1 = name1[1].split('-')[0]\n var version2 = name2[1].split('-')[0]\n return compareSemver(version2.split('.'), version1.split('.'))\n } else {\n return compare(name1[0], name2[0])\n }\n })\n if (!env.env.BROWSERSLIST_DISABLE_CACHE) {\n cache[cacheKey] = result\n }\n return result\n}\n\nbrowserslist.parse = function (queries, opts) {\n opts = prepareOpts(opts)\n queries = prepareQueries(queries, opts)\n checkQueries(queries)\n return parse(QUERIES, queries)\n}\n\n// Will be filled by Can I Use data below\nbrowserslist.cache = {}\nbrowserslist.data = {}\nbrowserslist.usage = {\n global: {},\n custom: null\n}\n\n// Default browsers query\nbrowserslist.defaults = ['> 0.5%', 'last 2 versions', 'Firefox ESR', 'not dead']\n\n// Browser names aliases\nbrowserslist.aliases = {\n fx: 'firefox',\n ff: 'firefox',\n ios: 'ios_saf',\n explorer: 'ie',\n blackberry: 'bb',\n explorermobile: 'ie_mob',\n operamini: 'op_mini',\n operamobile: 'op_mob',\n chromeandroid: 'and_chr',\n firefoxandroid: 'and_ff',\n ucandroid: 'and_uc',\n qqandroid: 'and_qq'\n}\n\n// Can I Use only provides a few versions for some browsers (e.g. and_chr).\n// Fallback to a similar browser for unknown versions\n// Note op_mob is not included as its chromium versions are not in sync with Opera desktop\nbrowserslist.desktopNames = {\n and_chr: 'chrome',\n and_ff: 'firefox',\n ie_mob: 'ie',\n android: 'chrome' // has extra processing logic\n}\n\n// Aliases to work with joined versions like `ios_saf 7.0-7.1`\nbrowserslist.versionAliases = {}\n\nbrowserslist.clearCaches = env.clearCaches\nbrowserslist.parseConfig = env.parseConfig\nbrowserslist.readConfig = env.readConfig\nbrowserslist.findConfig = env.findConfig\nbrowserslist.loadConfig = env.loadConfig\n\nbrowserslist.coverage = function (browsers, stats) {\n var data\n if (typeof stats === 'undefined') {\n data = browserslist.usage.global\n } else if (stats === 'my stats') {\n var opts = {}\n opts.path = path.resolve ? path.resolve('.') : '.'\n var customStats = env.getStat(opts)\n if (!customStats) {\n throw new BrowserslistError('Custom usage statistics was not provided')\n }\n data = {}\n for (var browser in customStats) {\n fillUsage(data, browser, customStats[browser])\n }\n } else if (typeof stats === 'string') {\n if (stats.length > 2) {\n stats = stats.toLowerCase()\n } else {\n stats = stats.toUpperCase()\n }\n env.loadCountry(browserslist.usage, stats, browserslist.data)\n data = browserslist.usage[stats]\n } else {\n if ('dataByBrowser' in stats) {\n stats = stats.dataByBrowser\n }\n data = {}\n for (var name in stats) {\n for (var version in stats[name]) {\n data[name + ' ' + version] = stats[name][version]\n }\n }\n }\n\n return browsers.reduce(function (all, i) {\n var usage = data[i]\n if (usage === undefined) {\n usage = data[i.replace(/ \\S+$/, ' 0')]\n }\n return all + (usage || 0)\n }, 0)\n}\n\nfunction nodeQuery(context, node) {\n var matched = browserslist.nodeVersions.filter(function (i) {\n return isVersionsMatch(i, node.version)\n })\n if (matched.length === 0) {\n if (context.ignoreUnknownVersions) {\n return []\n } else {\n throw new BrowserslistError(\n 'Unknown version ' + node.version + ' of Node.js'\n )\n }\n }\n return ['node ' + matched[matched.length - 1]]\n}\n\nfunction sinceQuery(context, node) {\n var year = parseInt(node.year)\n var month = parseInt(node.month || '01') - 1\n var day = parseInt(node.day || '01')\n return filterByYear(Date.UTC(year, month, day, 0, 0, 0), context)\n}\n\nfunction coverQuery(context, node) {\n var coverage = parseFloat(node.coverage)\n var usage = browserslist.usage.global\n if (node.place) {\n if (node.place.match(/^my\\s+stats$/i)) {\n if (!context.customUsage) {\n throw new BrowserslistError('Custom usage statistics was not provided')\n }\n usage = context.customUsage\n } else {\n var place\n if (node.place.length === 2) {\n place = node.place.toUpperCase()\n } else {\n place = node.place.toLowerCase()\n }\n env.loadCountry(browserslist.usage, place, browserslist.data)\n usage = browserslist.usage[place]\n }\n }\n var versions = Object.keys(usage).sort(function (a, b) {\n return usage[b] - usage[a]\n })\n var coveraged = 0\n var result = []\n var version\n for (var i = 0; i < versions.length; i++) {\n version = versions[i]\n if (usage[version] === 0) break\n coveraged += usage[version]\n result.push(version)\n if (coveraged >= coverage) break\n }\n return result\n}\n\nvar QUERIES = {\n last_major_versions: {\n matches: ['versions'],\n regexp: /^last\\s+(\\d+)\\s+major\\s+versions?$/i,\n select: function (context, node) {\n return Object.keys(agents).reduce(function (selected, name) {\n var data = byName(name, context)\n if (!data) return selected\n var list = getMajorVersions(data.released, node.versions)\n list = list.map(nameMapper(data.name))\n list = filterJumps(list, data.name, node.versions, context)\n return selected.concat(list)\n }, [])\n }\n },\n last_versions: {\n matches: ['versions'],\n regexp: /^last\\s+(\\d+)\\s+versions?$/i,\n select: function (context, node) {\n return Object.keys(agents).reduce(function (selected, name) {\n var data = byName(name, context)\n if (!data) return selected\n var list = data.released.slice(-node.versions)\n list = list.map(nameMapper(data.name))\n list = filterJumps(list, data.name, node.versions, context)\n return selected.concat(list)\n }, [])\n }\n },\n last_electron_major_versions: {\n matches: ['versions'],\n regexp: /^last\\s+(\\d+)\\s+electron\\s+major\\s+versions?$/i,\n select: function (context, node) {\n var validVersions = getMajorVersions(Object.keys(e2c), node.versions)\n return validVersions.map(function (i) {\n return 'chrome ' + e2c[i]\n })\n }\n },\n last_node_major_versions: {\n matches: ['versions'],\n regexp: /^last\\s+(\\d+)\\s+node\\s+major\\s+versions?$/i,\n select: function (context, node) {\n return getMajorVersions(browserslist.nodeVersions, node.versions).map(\n function (version) {\n return 'node ' + version\n }\n )\n }\n },\n last_browser_major_versions: {\n matches: ['versions', 'browser'],\n regexp: /^last\\s+(\\d+)\\s+(\\w+)\\s+major\\s+versions?$/i,\n select: function (context, node) {\n var data = checkName(node.browser, context)\n var validVersions = getMajorVersions(data.released, node.versions)\n var list = validVersions.map(nameMapper(data.name))\n list = filterJumps(list, data.name, node.versions, context)\n return list\n }\n },\n last_electron_versions: {\n matches: ['versions'],\n regexp: /^last\\s+(\\d+)\\s+electron\\s+versions?$/i,\n select: function (context, node) {\n return Object.keys(e2c)\n .slice(-node.versions)\n .map(function (i) {\n return 'chrome ' + e2c[i]\n })\n }\n },\n last_node_versions: {\n matches: ['versions'],\n regexp: /^last\\s+(\\d+)\\s+node\\s+versions?$/i,\n select: function (context, node) {\n return browserslist.nodeVersions\n .slice(-node.versions)\n .map(function (version) {\n return 'node ' + version\n })\n }\n },\n last_browser_versions: {\n matches: ['versions', 'browser'],\n regexp: /^last\\s+(\\d+)\\s+(\\w+)\\s+versions?$/i,\n select: function (context, node) {\n var data = checkName(node.browser, context)\n var list = data.released.slice(-node.versions).map(nameMapper(data.name))\n list = filterJumps(list, data.name, node.versions, context)\n return list\n }\n },\n unreleased_versions: {\n matches: [],\n regexp: /^unreleased\\s+versions$/i,\n select: function (context) {\n return Object.keys(agents).reduce(function (selected, name) {\n var data = byName(name, context)\n if (!data) return selected\n var list = data.versions.filter(function (v) {\n return data.released.indexOf(v) === -1\n })\n list = list.map(nameMapper(data.name))\n return selected.concat(list)\n }, [])\n }\n },\n unreleased_electron_versions: {\n matches: [],\n regexp: /^unreleased\\s+electron\\s+versions?$/i,\n select: function () {\n return []\n }\n },\n unreleased_browser_versions: {\n matches: ['browser'],\n regexp: /^unreleased\\s+(\\w+)\\s+versions?$/i,\n select: function (context, node) {\n var data = checkName(node.browser, context)\n return data.versions\n .filter(function (v) {\n return data.released.indexOf(v) === -1\n })\n .map(nameMapper(data.name))\n }\n },\n last_years: {\n matches: ['years'],\n regexp: /^last\\s+(\\d*.?\\d+)\\s+years?$/i,\n select: function (context, node) {\n return filterByYear(Date.now() - YEAR * node.years, context)\n }\n },\n since_y: {\n matches: ['year'],\n regexp: /^since (\\d+)$/i,\n select: sinceQuery\n },\n since_y_m: {\n matches: ['year', 'month'],\n regexp: /^since (\\d+)-(\\d+)$/i,\n select: sinceQuery\n },\n since_y_m_d: {\n matches: ['year', 'month', 'day'],\n regexp: /^since (\\d+)-(\\d+)-(\\d+)$/i,\n select: sinceQuery\n },\n popularity: {\n matches: ['sign', 'popularity'],\n regexp: /^(>=?|<=?)\\s*(\\d+|\\d+\\.\\d+|\\.\\d+)%$/,\n select: function (context, node) {\n var popularity = parseFloat(node.popularity)\n var usage = browserslist.usage.global\n return Object.keys(usage).reduce(function (result, version) {\n if (node.sign === '>') {\n if (usage[version] > popularity) {\n result.push(version)\n }\n } else if (node.sign === '<') {\n if (usage[version] < popularity) {\n result.push(version)\n }\n } else if (node.sign === '<=') {\n if (usage[version] <= popularity) {\n result.push(version)\n }\n } else if (usage[version] >= popularity) {\n result.push(version)\n }\n return result\n }, [])\n }\n },\n popularity_in_my_stats: {\n matches: ['sign', 'popularity'],\n regexp: /^(>=?|<=?)\\s*(\\d+|\\d+\\.\\d+|\\.\\d+)%\\s+in\\s+my\\s+stats$/,\n select: function (context, node) {\n var popularity = parseFloat(node.popularity)\n if (!context.customUsage) {\n throw new BrowserslistError('Custom usage statistics was not provided')\n }\n var usage = context.customUsage\n return Object.keys(usage).reduce(function (result, version) {\n var percentage = usage[version]\n if (percentage == null) {\n return result\n }\n\n if (node.sign === '>') {\n if (percentage > popularity) {\n result.push(version)\n }\n } else if (node.sign === '<') {\n if (percentage < popularity) {\n result.push(version)\n }\n } else if (node.sign === '<=') {\n if (percentage <= popularity) {\n result.push(version)\n }\n } else if (percentage >= popularity) {\n result.push(version)\n }\n return result\n }, [])\n }\n },\n popularity_in_config_stats: {\n matches: ['sign', 'popularity', 'config'],\n regexp: /^(>=?|<=?)\\s*(\\d+|\\d+\\.\\d+|\\.\\d+)%\\s+in\\s+(\\S+)\\s+stats$/,\n select: function (context, node) {\n var popularity = parseFloat(node.popularity)\n var stats = env.loadStat(context, node.config, browserslist.data)\n if (stats) {\n context.customUsage = {}\n for (var browser in stats) {\n fillUsage(context.customUsage, browser, stats[browser])\n }\n }\n if (!context.customUsage) {\n throw new BrowserslistError('Custom usage statistics was not provided')\n }\n var usage = context.customUsage\n return Object.keys(usage).reduce(function (result, version) {\n var percentage = usage[version]\n if (percentage == null) {\n return result\n }\n\n if (node.sign === '>') {\n if (percentage > popularity) {\n result.push(version)\n }\n } else if (node.sign === '<') {\n if (percentage < popularity) {\n result.push(version)\n }\n } else if (node.sign === '<=') {\n if (percentage <= popularity) {\n result.push(version)\n }\n } else if (percentage >= popularity) {\n result.push(version)\n }\n return result\n }, [])\n }\n },\n popularity_in_place: {\n matches: ['sign', 'popularity', 'place'],\n regexp: /^(>=?|<=?)\\s*(\\d+|\\d+\\.\\d+|\\.\\d+)%\\s+in\\s+((alt-)?\\w\\w)$/,\n select: function (context, node) {\n var popularity = parseFloat(node.popularity)\n var place = node.place\n if (place.length === 2) {\n place = place.toUpperCase()\n } else {\n place = place.toLowerCase()\n }\n env.loadCountry(browserslist.usage, place, browserslist.data)\n var usage = browserslist.usage[place]\n return Object.keys(usage).reduce(function (result, version) {\n var percentage = usage[version]\n if (percentage == null) {\n return result\n }\n\n if (node.sign === '>') {\n if (percentage > popularity) {\n result.push(version)\n }\n } else if (node.sign === '<') {\n if (percentage < popularity) {\n result.push(version)\n }\n } else if (node.sign === '<=') {\n if (percentage <= popularity) {\n result.push(version)\n }\n } else if (percentage >= popularity) {\n result.push(version)\n }\n return result\n }, [])\n }\n },\n cover: {\n matches: ['coverage'],\n regexp: /^cover\\s+(\\d+|\\d+\\.\\d+|\\.\\d+)%$/i,\n select: coverQuery\n },\n cover_in: {\n matches: ['coverage', 'place'],\n regexp: /^cover\\s+(\\d+|\\d+\\.\\d+|\\.\\d+)%\\s+in\\s+(my\\s+stats|(alt-)?\\w\\w)$/i,\n select: coverQuery\n },\n supports: {\n matches: ['supportType', 'feature'],\n regexp: /^(?:(fully|partially)\\s+)?supports\\s+([\\w-]+)$/,\n select: function (context, node) {\n env.loadFeature(browserslist.cache, node.feature)\n var withPartial = node.supportType !== 'fully'\n var features = browserslist.cache[node.feature]\n var result = []\n for (var name in features) {\n var data = byName(name, context)\n // Only check desktop when latest released mobile has support\n var iMax = data.released.length - 1\n while (iMax >= 0) {\n if (data.released[iMax] in features[name]) break\n iMax--\n }\n var checkDesktop =\n context.mobileToDesktop &&\n name in browserslist.desktopNames &&\n isSupported(features[name][data.released[iMax]], withPartial)\n data.versions.forEach(function (version) {\n var flags = features[name][version]\n if (flags === undefined && checkDesktop) {\n flags = features[browserslist.desktopNames[name]][version]\n }\n if (isSupported(flags, withPartial)) {\n result.push(name + ' ' + version)\n }\n })\n }\n return result\n }\n },\n electron_range: {\n matches: ['from', 'to'],\n regexp: /^electron\\s+([\\d.]+)\\s*-\\s*([\\d.]+)$/i,\n select: function (context, node) {\n var fromToUse = normalizeElectron(node.from)\n var toToUse = normalizeElectron(node.to)\n var from = parseFloat(node.from)\n var to = parseFloat(node.to)\n if (!e2c[fromToUse]) {\n throw new BrowserslistError('Unknown version ' + from + ' of electron')\n }\n if (!e2c[toToUse]) {\n throw new BrowserslistError('Unknown version ' + to + ' of electron')\n }\n return Object.keys(e2c)\n .filter(function (i) {\n var parsed = parseFloat(i)\n return parsed >= from && parsed <= to\n })\n .map(function (i) {\n return 'chrome ' + e2c[i]\n })\n }\n },\n node_range: {\n matches: ['from', 'to'],\n regexp: /^node\\s+([\\d.]+)\\s*-\\s*([\\d.]+)$/i,\n select: function (context, node) {\n return browserslist.nodeVersions\n .filter(semverFilterLoose('>=', node.from))\n .filter(semverFilterLoose('<=', node.to))\n .map(function (v) {\n return 'node ' + v\n })\n }\n },\n browser_range: {\n matches: ['browser', 'from', 'to'],\n regexp: /^(\\w+)\\s+([\\d.]+)\\s*-\\s*([\\d.]+)$/i,\n select: function (context, node) {\n var data = checkName(node.browser, context)\n var from = parseFloat(normalizeVersion(data, node.from) || node.from)\n var to = parseFloat(normalizeVersion(data, node.to) || node.to)\n function filter(v) {\n var parsed = parseFloat(v)\n return parsed >= from && parsed <= to\n }\n return data.released.filter(filter).map(nameMapper(data.name))\n }\n },\n electron_ray: {\n matches: ['sign', 'version'],\n regexp: /^electron\\s*(>=?|<=?)\\s*([\\d.]+)$/i,\n select: function (context, node) {\n var versionToUse = normalizeElectron(node.version)\n return Object.keys(e2c)\n .filter(generateFilter(node.sign, versionToUse))\n .map(function (i) {\n return 'chrome ' + e2c[i]\n })\n }\n },\n node_ray: {\n matches: ['sign', 'version'],\n regexp: /^node\\s*(>=?|<=?)\\s*([\\d.]+)$/i,\n select: function (context, node) {\n return browserslist.nodeVersions\n .filter(generateSemverFilter(node.sign, node.version))\n .map(function (v) {\n return 'node ' + v\n })\n }\n },\n browser_ray: {\n matches: ['browser', 'sign', 'version'],\n regexp: /^(\\w+)\\s*(>=?|<=?)\\s*([\\d.]+)$/,\n select: function (context, node) {\n var version = node.version\n var data = checkName(node.browser, context)\n var alias = browserslist.versionAliases[data.name][version]\n if (alias) version = alias\n return data.released\n .filter(generateFilter(node.sign, version))\n .map(function (v) {\n return data.name + ' ' + v\n })\n }\n },\n firefox_esr: {\n matches: [],\n regexp: /^(firefox|ff|fx)\\s+esr$/i,\n select: function () {\n return ['firefox 115']\n }\n },\n opera_mini_all: {\n matches: [],\n regexp: /(operamini|op_mini)\\s+all/i,\n select: function () {\n return ['op_mini all']\n }\n },\n electron_version: {\n matches: ['version'],\n regexp: /^electron\\s+([\\d.]+)$/i,\n select: function (context, node) {\n var versionToUse = normalizeElectron(node.version)\n var chrome = e2c[versionToUse]\n if (!chrome) {\n throw new BrowserslistError(\n 'Unknown version ' + node.version + ' of electron'\n )\n }\n return ['chrome ' + chrome]\n }\n },\n node_major_version: {\n matches: ['version'],\n regexp: /^node\\s+(\\d+)$/i,\n select: nodeQuery\n },\n node_minor_version: {\n matches: ['version'],\n regexp: /^node\\s+(\\d+\\.\\d+)$/i,\n select: nodeQuery\n },\n node_patch_version: {\n matches: ['version'],\n regexp: /^node\\s+(\\d+\\.\\d+\\.\\d+)$/i,\n select: nodeQuery\n },\n current_node: {\n matches: [],\n regexp: /^current\\s+node$/i,\n select: function (context) {\n return [env.currentNode(resolve, context)]\n }\n },\n maintained_node: {\n matches: [],\n regexp: /^maintained\\s+node\\s+versions$/i,\n select: function (context) {\n var now = Date.now()\n var queries = Object.keys(jsEOL)\n .filter(function (key) {\n return (\n now < Date.parse(jsEOL[key].end) &&\n now > Date.parse(jsEOL[key].start) &&\n isEolReleased(key)\n )\n })\n .map(function (key) {\n return 'node ' + key.slice(1)\n })\n return resolve(queries, context)\n }\n },\n phantomjs_1_9: {\n matches: [],\n regexp: /^phantomjs\\s+1.9$/i,\n select: function () {\n return ['safari 5']\n }\n },\n phantomjs_2_1: {\n matches: [],\n regexp: /^phantomjs\\s+2.1$/i,\n select: function () {\n return ['safari 6']\n }\n },\n browser_version: {\n matches: ['browser', 'version'],\n regexp: /^(\\w+)\\s+(tp|[\\d.]+)$/i,\n select: function (context, node) {\n var version = node.version\n if (/^tp$/i.test(version)) version = 'TP'\n var data = checkName(node.browser, context)\n var alias = normalizeVersion(data, version)\n if (alias) {\n version = alias\n } else {\n if (version.indexOf('.') === -1) {\n alias = version + '.0'\n } else {\n alias = version.replace(/\\.0$/, '')\n }\n alias = normalizeVersion(data, alias)\n if (alias) {\n version = alias\n } else if (context.ignoreUnknownVersions) {\n return []\n } else {\n throw new BrowserslistError(\n 'Unknown version ' + version + ' of ' + node.browser\n )\n }\n }\n return [data.name + ' ' + version]\n }\n },\n browserslist_config: {\n matches: [],\n regexp: /^browserslist config$/i,\n select: function (context) {\n return browserslist(undefined, context)\n }\n },\n extends: {\n matches: ['config'],\n regexp: /^extends (.+)$/i,\n select: function (context, node) {\n return resolve(env.loadQueries(context, node.config), context)\n }\n },\n defaults: {\n matches: [],\n regexp: /^defaults$/i,\n select: function (context) {\n return resolve(browserslist.defaults, context)\n }\n },\n dead: {\n matches: [],\n regexp: /^dead$/i,\n select: function (context) {\n var dead = [\n 'Baidu >= 0',\n 'ie <= 11',\n 'ie_mob <= 11',\n 'bb <= 10',\n 'op_mob <= 12.1',\n 'samsung 4'\n ]\n return resolve(dead, context)\n }\n },\n unknown: {\n matches: [],\n regexp: /^(\\w+)$/i,\n select: function (context, node) {\n if (byName(node.query, context)) {\n throw new BrowserslistError(\n 'Specify versions in Browserslist query for browser ' + node.query\n )\n } else {\n throw unknownQuery(node.query)\n }\n }\n }\n}\n\n// Get and convert Can I Use data\n\n;(function () {\n for (var name in agents) {\n var browser = agents[name]\n browserslist.data[name] = {\n name: name,\n versions: normalize(agents[name].versions),\n released: normalize(agents[name].versions.slice(0, -3)),\n releaseDate: agents[name].release_date\n }\n fillUsage(browserslist.usage.global, name, browser.usage_global)\n\n browserslist.versionAliases[name] = {}\n for (var i = 0; i < browser.versions.length; i++) {\n var full = browser.versions[i]\n if (!full) continue\n\n if (full.indexOf('-') !== -1) {\n var interval = full.split('-')\n for (var j = 0; j < interval.length; j++) {\n browserslist.versionAliases[name][interval[j]] = full\n }\n }\n }\n }\n\n browserslist.nodeVersions = jsReleases.map(function (release) {\n return release.version\n })\n})()\n\nmodule.exports = browserslist\n","const { min } = Math;\n\n// a minimal leven distance implementation\n// balanced maintainability with code size\n// It is not blazingly fast but should be okay for Babel user case\n// where it will be run for at most tens of time on strings\n// that have less than 20 ASCII characters\n\n// https://rosettacode.org/wiki/Levenshtein_distance#ES5\nfunction levenshtein(a: string, b: string): number {\n let t = [],\n u: number[] = [],\n i,\n j;\n const m = a.length,\n n = b.length;\n if (!m) {\n return n;\n }\n if (!n) {\n return m;\n }\n for (j = 0; j <= n; j++) {\n t[j] = j;\n }\n for (i = 1; i <= m; i++) {\n for (u = [i], j = 1; j <= n; j++) {\n u[j] =\n a[i - 1] === b[j - 1] ? t[j - 1] : min(t[j - 1], t[j], u[j - 1]) + 1;\n }\n t = u;\n }\n return u[n];\n}\n\n/**\n * Given a string `str` and an array of candidates `arr`,\n * return the first of elements in candidates that has minimal\n * Levenshtein distance with `str`.\n * @export\n * @param {string} str\n * @param {string[]} arr\n * @returns {string}\n */\nexport function findSuggestion(str: string, arr: readonly string[]): string {\n const distances = arr.map(el => levenshtein(el, str));\n return arr[distances.indexOf(min(...distances))];\n}\n","import { findSuggestion } from \"./find-suggestion.ts\";\n\nexport class OptionValidator {\n declare descriptor: string;\n constructor(descriptor: string) {\n this.descriptor = descriptor;\n }\n\n /**\n * Validate if the given `options` follow the name of keys defined in the `TopLevelOptionShape`\n *\n * @param {Object} options\n * @param {Object} TopLevelOptionShape\n * An object with all the valid key names that `options` should be allowed to have\n * The property values of `TopLevelOptionShape` can be arbitrary\n * @memberof OptionValidator\n */\n validateTopLevelOptions(options: object, TopLevelOptionShape: object): void {\n const validOptionNames = Object.keys(TopLevelOptionShape);\n for (const option of Object.keys(options)) {\n if (!validOptionNames.includes(option)) {\n throw new Error(\n this.formatMessage(`'${option}' is not a valid top-level option.\n- Did you mean '${findSuggestion(option, validOptionNames)}'?`),\n );\n }\n }\n }\n\n // note: we do not consider rewrite them to high order functions\n // until we have to support `validateNumberOption`.\n validateBooleanOption(\n name: string,\n value?: boolean,\n defaultValue?: T,\n ): boolean | T {\n if (value === undefined) {\n return defaultValue;\n } else {\n this.invariant(\n typeof value === \"boolean\",\n `'${name}' option must be a boolean.`,\n );\n }\n return value;\n }\n\n validateStringOption(\n name: string,\n value?: string,\n defaultValue?: T,\n ): string | T {\n if (value === undefined) {\n return defaultValue;\n } else {\n this.invariant(\n typeof value === \"string\",\n `'${name}' option must be a string.`,\n );\n }\n return value;\n }\n /**\n * A helper interface copied from the `invariant` npm package.\n * It throws given `message` when `condition` is not met\n *\n * @param {boolean} condition\n * @param {string} message\n * @memberof OptionValidator\n */\n invariant(condition: boolean, message: string): void {\n if (!condition) {\n throw new Error(this.formatMessage(message));\n }\n }\n\n formatMessage(message: string): string {\n return `${this.descriptor}: ${message}`;\n }\n}\n","module.exports = require(\"./data/native-modules.json\");\n","'use strict'\nmodule.exports = function (Yallist) {\n Yallist.prototype[Symbol.iterator] = function* () {\n for (let walker = this.head; walker; walker = walker.next) {\n yield walker.value\n }\n }\n}\n","'use strict'\nmodule.exports = Yallist\n\nYallist.Node = Node\nYallist.create = Yallist\n\nfunction Yallist (list) {\n var self = this\n if (!(self instanceof Yallist)) {\n self = new Yallist()\n }\n\n self.tail = null\n self.head = null\n self.length = 0\n\n if (list && typeof list.forEach === 'function') {\n list.forEach(function (item) {\n self.push(item)\n })\n } else if (arguments.length > 0) {\n for (var i = 0, l = arguments.length; i < l; i++) {\n self.push(arguments[i])\n }\n }\n\n return self\n}\n\nYallist.prototype.removeNode = function (node) {\n if (node.list !== this) {\n throw new Error('removing node which does not belong to this list')\n }\n\n var next = node.next\n var prev = node.prev\n\n if (next) {\n next.prev = prev\n }\n\n if (prev) {\n prev.next = next\n }\n\n if (node === this.head) {\n this.head = next\n }\n if (node === this.tail) {\n this.tail = prev\n }\n\n node.list.length--\n node.next = null\n node.prev = null\n node.list = null\n\n return next\n}\n\nYallist.prototype.unshiftNode = function (node) {\n if (node === this.head) {\n return\n }\n\n if (node.list) {\n node.list.removeNode(node)\n }\n\n var head = this.head\n node.list = this\n node.next = head\n if (head) {\n head.prev = node\n }\n\n this.head = node\n if (!this.tail) {\n this.tail = node\n }\n this.length++\n}\n\nYallist.prototype.pushNode = function (node) {\n if (node === this.tail) {\n return\n }\n\n if (node.list) {\n node.list.removeNode(node)\n }\n\n var tail = this.tail\n node.list = this\n node.prev = tail\n if (tail) {\n tail.next = node\n }\n\n this.tail = node\n if (!this.head) {\n this.head = node\n }\n this.length++\n}\n\nYallist.prototype.push = function () {\n for (var i = 0, l = arguments.length; i < l; i++) {\n push(this, arguments[i])\n }\n return this.length\n}\n\nYallist.prototype.unshift = function () {\n for (var i = 0, l = arguments.length; i < l; i++) {\n unshift(this, arguments[i])\n }\n return this.length\n}\n\nYallist.prototype.pop = function () {\n if (!this.tail) {\n return undefined\n }\n\n var res = this.tail.value\n this.tail = this.tail.prev\n if (this.tail) {\n this.tail.next = null\n } else {\n this.head = null\n }\n this.length--\n return res\n}\n\nYallist.prototype.shift = function () {\n if (!this.head) {\n return undefined\n }\n\n var res = this.head.value\n this.head = this.head.next\n if (this.head) {\n this.head.prev = null\n } else {\n this.tail = null\n }\n this.length--\n return res\n}\n\nYallist.prototype.forEach = function (fn, thisp) {\n thisp = thisp || this\n for (var walker = this.head, i = 0; walker !== null; i++) {\n fn.call(thisp, walker.value, i, this)\n walker = walker.next\n }\n}\n\nYallist.prototype.forEachReverse = function (fn, thisp) {\n thisp = thisp || this\n for (var walker = this.tail, i = this.length - 1; walker !== null; i--) {\n fn.call(thisp, walker.value, i, this)\n walker = walker.prev\n }\n}\n\nYallist.prototype.get = function (n) {\n for (var i = 0, walker = this.head; walker !== null && i < n; i++) {\n // abort out of the list early if we hit a cycle\n walker = walker.next\n }\n if (i === n && walker !== null) {\n return walker.value\n }\n}\n\nYallist.prototype.getReverse = function (n) {\n for (var i = 0, walker = this.tail; walker !== null && i < n; i++) {\n // abort out of the list early if we hit a cycle\n walker = walker.prev\n }\n if (i === n && walker !== null) {\n return walker.value\n }\n}\n\nYallist.prototype.map = function (fn, thisp) {\n thisp = thisp || this\n var res = new Yallist()\n for (var walker = this.head; walker !== null;) {\n res.push(fn.call(thisp, walker.value, this))\n walker = walker.next\n }\n return res\n}\n\nYallist.prototype.mapReverse = function (fn, thisp) {\n thisp = thisp || this\n var res = new Yallist()\n for (var walker = this.tail; walker !== null;) {\n res.push(fn.call(thisp, walker.value, this))\n walker = walker.prev\n }\n return res\n}\n\nYallist.prototype.reduce = function (fn, initial) {\n var acc\n var walker = this.head\n if (arguments.length > 1) {\n acc = initial\n } else if (this.head) {\n walker = this.head.next\n acc = this.head.value\n } else {\n throw new TypeError('Reduce of empty list with no initial value')\n }\n\n for (var i = 0; walker !== null; i++) {\n acc = fn(acc, walker.value, i)\n walker = walker.next\n }\n\n return acc\n}\n\nYallist.prototype.reduceReverse = function (fn, initial) {\n var acc\n var walker = this.tail\n if (arguments.length > 1) {\n acc = initial\n } else if (this.tail) {\n walker = this.tail.prev\n acc = this.tail.value\n } else {\n throw new TypeError('Reduce of empty list with no initial value')\n }\n\n for (var i = this.length - 1; walker !== null; i--) {\n acc = fn(acc, walker.value, i)\n walker = walker.prev\n }\n\n return acc\n}\n\nYallist.prototype.toArray = function () {\n var arr = new Array(this.length)\n for (var i = 0, walker = this.head; walker !== null; i++) {\n arr[i] = walker.value\n walker = walker.next\n }\n return arr\n}\n\nYallist.prototype.toArrayReverse = function () {\n var arr = new Array(this.length)\n for (var i = 0, walker = this.tail; walker !== null; i++) {\n arr[i] = walker.value\n walker = walker.prev\n }\n return arr\n}\n\nYallist.prototype.slice = function (from, to) {\n to = to || this.length\n if (to < 0) {\n to += this.length\n }\n from = from || 0\n if (from < 0) {\n from += this.length\n }\n var ret = new Yallist()\n if (to < from || to < 0) {\n return ret\n }\n if (from < 0) {\n from = 0\n }\n if (to > this.length) {\n to = this.length\n }\n for (var i = 0, walker = this.head; walker !== null && i < from; i++) {\n walker = walker.next\n }\n for (; walker !== null && i < to; i++, walker = walker.next) {\n ret.push(walker.value)\n }\n return ret\n}\n\nYallist.prototype.sliceReverse = function (from, to) {\n to = to || this.length\n if (to < 0) {\n to += this.length\n }\n from = from || 0\n if (from < 0) {\n from += this.length\n }\n var ret = new Yallist()\n if (to < from || to < 0) {\n return ret\n }\n if (from < 0) {\n from = 0\n }\n if (to > this.length) {\n to = this.length\n }\n for (var i = this.length, walker = this.tail; walker !== null && i > to; i--) {\n walker = walker.prev\n }\n for (; walker !== null && i > from; i--, walker = walker.prev) {\n ret.push(walker.value)\n }\n return ret\n}\n\nYallist.prototype.splice = function (start, deleteCount /*, ...nodes */) {\n if (start > this.length) {\n start = this.length - 1\n }\n if (start < 0) {\n start = this.length + start;\n }\n\n for (var i = 0, walker = this.head; walker !== null && i < start; i++) {\n walker = walker.next\n }\n\n var ret = []\n for (var i = 0; walker && i < deleteCount; i++) {\n ret.push(walker.value)\n walker = this.removeNode(walker)\n }\n if (walker === null) {\n walker = this.tail\n }\n\n if (walker !== this.head && walker !== this.tail) {\n walker = walker.prev\n }\n\n for (var i = 2; i < arguments.length; i++) {\n walker = insert(this, walker, arguments[i])\n }\n return ret;\n}\n\nYallist.prototype.reverse = function () {\n var head = this.head\n var tail = this.tail\n for (var walker = head; walker !== null; walker = walker.prev) {\n var p = walker.prev\n walker.prev = walker.next\n walker.next = p\n }\n this.head = tail\n this.tail = head\n return this\n}\n\nfunction insert (self, node, value) {\n var inserted = node === self.head ?\n new Node(value, null, node, self) :\n new Node(value, node, node.next, self)\n\n if (inserted.next === null) {\n self.tail = inserted\n }\n if (inserted.prev === null) {\n self.head = inserted\n }\n\n self.length++\n\n return inserted\n}\n\nfunction push (self, item) {\n self.tail = new Node(item, self.tail, null, self)\n if (!self.head) {\n self.head = self.tail\n }\n self.length++\n}\n\nfunction unshift (self, item) {\n self.head = new Node(item, null, self.head, self)\n if (!self.tail) {\n self.tail = self.head\n }\n self.length++\n}\n\nfunction Node (value, prev, next, list) {\n if (!(this instanceof Node)) {\n return new Node(value, prev, next, list)\n }\n\n this.list = list\n this.value = value\n\n if (prev) {\n prev.next = this\n this.prev = prev\n } else {\n this.prev = null\n }\n\n if (next) {\n next.prev = this\n this.next = next\n } else {\n this.next = null\n }\n}\n\ntry {\n // add if support for Symbol.iterator is present\n require('./iterator.js')(Yallist)\n} catch (er) {}\n","'use strict'\n\n// A linked list to keep track of recently-used-ness\nconst Yallist = require('yallist')\n\nconst MAX = Symbol('max')\nconst LENGTH = Symbol('length')\nconst LENGTH_CALCULATOR = Symbol('lengthCalculator')\nconst ALLOW_STALE = Symbol('allowStale')\nconst MAX_AGE = Symbol('maxAge')\nconst DISPOSE = Symbol('dispose')\nconst NO_DISPOSE_ON_SET = Symbol('noDisposeOnSet')\nconst LRU_LIST = Symbol('lruList')\nconst CACHE = Symbol('cache')\nconst UPDATE_AGE_ON_GET = Symbol('updateAgeOnGet')\n\nconst naiveLength = () => 1\n\n// lruList is a yallist where the head is the youngest\n// item, and the tail is the oldest. the list contains the Hit\n// objects as the entries.\n// Each Hit object has a reference to its Yallist.Node. This\n// never changes.\n//\n// cache is a Map (or PseudoMap) that matches the keys to\n// the Yallist.Node object.\nclass LRUCache {\n constructor (options) {\n if (typeof options === 'number')\n options = { max: options }\n\n if (!options)\n options = {}\n\n if (options.max && (typeof options.max !== 'number' || options.max < 0))\n throw new TypeError('max must be a non-negative number')\n // Kind of weird to have a default max of Infinity, but oh well.\n const max = this[MAX] = options.max || Infinity\n\n const lc = options.length || naiveLength\n this[LENGTH_CALCULATOR] = (typeof lc !== 'function') ? naiveLength : lc\n this[ALLOW_STALE] = options.stale || false\n if (options.maxAge && typeof options.maxAge !== 'number')\n throw new TypeError('maxAge must be a number')\n this[MAX_AGE] = options.maxAge || 0\n this[DISPOSE] = options.dispose\n this[NO_DISPOSE_ON_SET] = options.noDisposeOnSet || false\n this[UPDATE_AGE_ON_GET] = options.updateAgeOnGet || false\n this.reset()\n }\n\n // resize the cache when the max changes.\n set max (mL) {\n if (typeof mL !== 'number' || mL < 0)\n throw new TypeError('max must be a non-negative number')\n\n this[MAX] = mL || Infinity\n trim(this)\n }\n get max () {\n return this[MAX]\n }\n\n set allowStale (allowStale) {\n this[ALLOW_STALE] = !!allowStale\n }\n get allowStale () {\n return this[ALLOW_STALE]\n }\n\n set maxAge (mA) {\n if (typeof mA !== 'number')\n throw new TypeError('maxAge must be a non-negative number')\n\n this[MAX_AGE] = mA\n trim(this)\n }\n get maxAge () {\n return this[MAX_AGE]\n }\n\n // resize the cache when the lengthCalculator changes.\n set lengthCalculator (lC) {\n if (typeof lC !== 'function')\n lC = naiveLength\n\n if (lC !== this[LENGTH_CALCULATOR]) {\n this[LENGTH_CALCULATOR] = lC\n this[LENGTH] = 0\n this[LRU_LIST].forEach(hit => {\n hit.length = this[LENGTH_CALCULATOR](hit.value, hit.key)\n this[LENGTH] += hit.length\n })\n }\n trim(this)\n }\n get lengthCalculator () { return this[LENGTH_CALCULATOR] }\n\n get length () { return this[LENGTH] }\n get itemCount () { return this[LRU_LIST].length }\n\n rforEach (fn, thisp) {\n thisp = thisp || this\n for (let walker = this[LRU_LIST].tail; walker !== null;) {\n const prev = walker.prev\n forEachStep(this, fn, walker, thisp)\n walker = prev\n }\n }\n\n forEach (fn, thisp) {\n thisp = thisp || this\n for (let walker = this[LRU_LIST].head; walker !== null;) {\n const next = walker.next\n forEachStep(this, fn, walker, thisp)\n walker = next\n }\n }\n\n keys () {\n return this[LRU_LIST].toArray().map(k => k.key)\n }\n\n values () {\n return this[LRU_LIST].toArray().map(k => k.value)\n }\n\n reset () {\n if (this[DISPOSE] &&\n this[LRU_LIST] &&\n this[LRU_LIST].length) {\n this[LRU_LIST].forEach(hit => this[DISPOSE](hit.key, hit.value))\n }\n\n this[CACHE] = new Map() // hash of items by key\n this[LRU_LIST] = new Yallist() // list of items in order of use recency\n this[LENGTH] = 0 // length of items in the list\n }\n\n dump () {\n return this[LRU_LIST].map(hit =>\n isStale(this, hit) ? false : {\n k: hit.key,\n v: hit.value,\n e: hit.now + (hit.maxAge || 0)\n }).toArray().filter(h => h)\n }\n\n dumpLru () {\n return this[LRU_LIST]\n }\n\n set (key, value, maxAge) {\n maxAge = maxAge || this[MAX_AGE]\n\n if (maxAge && typeof maxAge !== 'number')\n throw new TypeError('maxAge must be a number')\n\n const now = maxAge ? Date.now() : 0\n const len = this[LENGTH_CALCULATOR](value, key)\n\n if (this[CACHE].has(key)) {\n if (len > this[MAX]) {\n del(this, this[CACHE].get(key))\n return false\n }\n\n const node = this[CACHE].get(key)\n const item = node.value\n\n // dispose of the old one before overwriting\n // split out into 2 ifs for better coverage tracking\n if (this[DISPOSE]) {\n if (!this[NO_DISPOSE_ON_SET])\n this[DISPOSE](key, item.value)\n }\n\n item.now = now\n item.maxAge = maxAge\n item.value = value\n this[LENGTH] += len - item.length\n item.length = len\n this.get(key)\n trim(this)\n return true\n }\n\n const hit = new Entry(key, value, len, now, maxAge)\n\n // oversized objects fall out of cache automatically.\n if (hit.length > this[MAX]) {\n if (this[DISPOSE])\n this[DISPOSE](key, value)\n\n return false\n }\n\n this[LENGTH] += hit.length\n this[LRU_LIST].unshift(hit)\n this[CACHE].set(key, this[LRU_LIST].head)\n trim(this)\n return true\n }\n\n has (key) {\n if (!this[CACHE].has(key)) return false\n const hit = this[CACHE].get(key).value\n return !isStale(this, hit)\n }\n\n get (key) {\n return get(this, key, true)\n }\n\n peek (key) {\n return get(this, key, false)\n }\n\n pop () {\n const node = this[LRU_LIST].tail\n if (!node)\n return null\n\n del(this, node)\n return node.value\n }\n\n del (key) {\n del(this, this[CACHE].get(key))\n }\n\n load (arr) {\n // reset the cache\n this.reset()\n\n const now = Date.now()\n // A previous serialized cache has the most recent items first\n for (let l = arr.length - 1; l >= 0; l--) {\n const hit = arr[l]\n const expiresAt = hit.e || 0\n if (expiresAt === 0)\n // the item was created without expiration in a non aged cache\n this.set(hit.k, hit.v)\n else {\n const maxAge = expiresAt - now\n // dont add already expired items\n if (maxAge > 0) {\n this.set(hit.k, hit.v, maxAge)\n }\n }\n }\n }\n\n prune () {\n this[CACHE].forEach((value, key) => get(this, key, false))\n }\n}\n\nconst get = (self, key, doUse) => {\n const node = self[CACHE].get(key)\n if (node) {\n const hit = node.value\n if (isStale(self, hit)) {\n del(self, node)\n if (!self[ALLOW_STALE])\n return undefined\n } else {\n if (doUse) {\n if (self[UPDATE_AGE_ON_GET])\n node.value.now = Date.now()\n self[LRU_LIST].unshiftNode(node)\n }\n }\n return hit.value\n }\n}\n\nconst isStale = (self, hit) => {\n if (!hit || (!hit.maxAge && !self[MAX_AGE]))\n return false\n\n const diff = Date.now() - hit.now\n return hit.maxAge ? diff > hit.maxAge\n : self[MAX_AGE] && (diff > self[MAX_AGE])\n}\n\nconst trim = self => {\n if (self[LENGTH] > self[MAX]) {\n for (let walker = self[LRU_LIST].tail;\n self[LENGTH] > self[MAX] && walker !== null;) {\n // We know that we're about to delete this one, and also\n // what the next least recently used key will be, so just\n // go ahead and set it now.\n const prev = walker.prev\n del(self, walker)\n walker = prev\n }\n }\n}\n\nconst del = (self, node) => {\n if (node) {\n const hit = node.value\n if (self[DISPOSE])\n self[DISPOSE](hit.key, hit.value)\n\n self[LENGTH] -= hit.length\n self[CACHE].delete(hit.key)\n self[LRU_LIST].removeNode(node)\n }\n}\n\nclass Entry {\n constructor (key, value, length, now, maxAge) {\n this.key = key\n this.value = value\n this.length = length\n this.now = now\n this.maxAge = maxAge || 0\n }\n}\n\nconst forEachStep = (self, fn, node, thisp) => {\n let hit = node.value\n if (isStale(self, hit)) {\n del(self, node)\n if (!self[ALLOW_STALE])\n hit = undefined\n }\n if (hit)\n fn.call(thisp, hit.value, hit.key, self)\n}\n\nmodule.exports = LRUCache\n","// env vars from the cli are always strings, so !!ENV_VAR returns true for \"false\"\nfunction bool(value) {\n if (value == null) return false;\n return value && value !== \"false\" && value !== \"0\";\n}\n\nmodule.exports = bool(process.env[\"BABEL_8_BREAKING\"])\n ? require(\"lru-cache-BABEL_8_BREAKING-true\")\n : require(\"lru-cache-BABEL_8_BREAKING-false\");\n","// env vars from the cli are always strings, so !!ENV_VAR returns true for \"false\"\nfunction bool(value) {\n if (value == null) return false;\n return value && value !== \"false\" && value !== \"0\";\n}\n\nmodule.exports = bool(process.env[\"BABEL_8_BREAKING\"])\n ? require(\"semver-BABEL_8_BREAKING-true\")\n : require(\"semver-BABEL_8_BREAKING-false\");\n","export const unreleasedLabels = {\n safari: \"tp\",\n} as const;\n\n// Map from browserslist|@mdn/browser-compat-data browser names to @kangax/compat-table browser names\nexport const browserNameMap = {\n and_chr: \"chrome\",\n and_ff: \"firefox\",\n android: \"android\",\n chrome: \"chrome\",\n edge: \"edge\",\n firefox: \"firefox\",\n ie: \"ie\",\n ie_mob: \"ie\",\n ios_saf: \"ios\",\n node: \"node\",\n deno: \"deno\",\n op_mob: \"opera_mobile\",\n opera: \"opera\",\n safari: \"safari\",\n samsung: \"samsung\",\n} as const;\n\nexport type BrowserslistBrowserName = keyof typeof browserNameMap;\n","import semver from \"semver\";\nimport { OptionValidator } from \"@babel/helper-validator-option\";\nimport { unreleasedLabels } from \"./targets.ts\";\nimport type { Target, Targets } from \"./types.ts\";\n\nconst versionRegExp =\n /^(?:\\d+|\\d(?:\\d?[^\\d\\n\\r\\u2028\\u2029]\\d+|\\d{2,}(?:[^\\d\\n\\r\\u2028\\u2029]\\d+)?))$/;\n\nconst v = new OptionValidator(PACKAGE_JSON.name);\n\nexport function semverMin(\n first: string | undefined | null,\n second: string,\n): string {\n return first && semver.lt(first, second) ? first : second;\n}\n\n// Convert version to a semver value.\n// 2.5 -> 2.5.0; 1 -> 1.0.0;\nexport function semverify(version: number | string): string {\n if (typeof version === \"string\" && semver.valid(version)) {\n return version;\n }\n\n v.invariant(\n typeof version === \"number\" ||\n (typeof version === \"string\" && versionRegExp.test(version)),\n `'${version}' is not a valid version`,\n );\n\n version = version.toString();\n\n let pos = 0;\n let num = 0;\n while ((pos = version.indexOf(\".\", pos + 1)) > 0) {\n num++;\n }\n return version + \".0\".repeat(2 - num);\n}\n\nexport function isUnreleasedVersion(\n version: string | number,\n env: Target,\n): boolean {\n const unreleasedLabel =\n // @ts-expect-error unreleasedLabel will be guarded later\n unreleasedLabels[env];\n return (\n !!unreleasedLabel && unreleasedLabel === version.toString().toLowerCase()\n );\n}\n\nexport function getLowestUnreleased(a: string, b: string, env: Target): string {\n const unreleasedLabel:\n | (typeof unreleasedLabels)[keyof typeof unreleasedLabels]\n | undefined =\n // @ts-expect-error unreleasedLabel is undefined when env is not safari\n unreleasedLabels[env];\n if (a === unreleasedLabel) {\n return b;\n }\n if (b === unreleasedLabel) {\n return a;\n }\n return semverMin(a, b);\n}\n\nexport function getHighestUnreleased(\n a: string,\n b: string,\n env: Target,\n): string {\n return getLowestUnreleased(a, b, env) === a ? b : a;\n}\n\nexport function getLowestImplementedVersion(\n plugin: Targets,\n environment: Target,\n): string {\n const result = plugin[environment];\n // When Android support data is absent, use Chrome data as fallback\n if (!result && environment === \"android\") {\n return plugin.chrome;\n }\n return result;\n}\n","export const TargetNames = {\n node: \"node\",\n deno: \"deno\",\n chrome: \"chrome\",\n opera: \"opera\",\n edge: \"edge\",\n firefox: \"firefox\",\n safari: \"safari\",\n ie: \"ie\",\n ios: \"ios\",\n android: \"android\",\n electron: \"electron\",\n samsung: \"samsung\",\n rhino: \"rhino\",\n opera_mobile: \"opera_mobile\",\n};\n","import semver from \"semver\";\nimport { unreleasedLabels } from \"./targets.ts\";\nimport type { Targets, Target } from \"./types.ts\";\n\nexport function prettifyVersion(version: string) {\n if (typeof version !== \"string\") {\n return version;\n }\n\n const { major, minor, patch } = semver.parse(version);\n\n const parts = [major];\n\n if (minor || patch) {\n parts.push(minor);\n }\n\n if (patch) {\n parts.push(patch);\n }\n\n return parts.join(\".\");\n}\n\nexport function prettifyTargets(targets: Targets): Targets {\n return Object.keys(targets).reduce((results, target: Target) => {\n let value = targets[target];\n\n const unreleasedLabel =\n // @ts-expect-error undefined is strictly compared with string later\n unreleasedLabels[target];\n if (typeof value === \"string\" && unreleasedLabel !== value) {\n value = prettifyVersion(value);\n }\n\n results[target] = value;\n return results;\n }, {} as Targets);\n}\n","import semver from \"semver\";\nimport { prettifyVersion } from \"./pretty.ts\";\nimport {\n semverify,\n isUnreleasedVersion,\n getLowestImplementedVersion,\n} from \"./utils.ts\";\nimport type { Target, Targets } from \"./types.ts\";\n\nexport function getInclusionReasons(\n item: string,\n targetVersions: Targets,\n list: { [key: string]: Targets },\n) {\n const minVersions = list[item] || {};\n\n return (Object.keys(targetVersions) as Target[]).reduce(\n (result, env) => {\n const minVersion = getLowestImplementedVersion(minVersions, env);\n const targetVersion = targetVersions[env];\n\n if (!minVersion) {\n result[env] = prettifyVersion(targetVersion);\n } else {\n const minIsUnreleased = isUnreleasedVersion(minVersion, env);\n const targetIsUnreleased = isUnreleasedVersion(targetVersion, env);\n\n if (\n !targetIsUnreleased &&\n (minIsUnreleased ||\n semver.lt(targetVersion.toString(), semverify(minVersion)))\n ) {\n result[env] = prettifyVersion(targetVersion);\n }\n }\n\n return result;\n },\n {} as Partial>,\n );\n}\n","module.exports = require(\"./data/plugins.json\");\n","import semver from \"semver\";\n\nimport pluginsCompatData from \"@babel/compat-data/plugins\";\n\nimport type { Targets } from \"./types.ts\";\nimport {\n getLowestImplementedVersion,\n isUnreleasedVersion,\n semverify,\n} from \"./utils.ts\";\n\nexport function targetsSupported(target: Targets, support: Targets) {\n const targetEnvironments = Object.keys(target) as Array;\n\n if (targetEnvironments.length === 0) {\n return false;\n }\n\n const unsupportedEnvironments = targetEnvironments.filter(environment => {\n const lowestImplementedVersion = getLowestImplementedVersion(\n support,\n environment,\n );\n\n // Feature is not implemented in that environment\n if (!lowestImplementedVersion) {\n return true;\n }\n\n const lowestTargetedVersion = target[environment];\n\n // If targets has unreleased value as a lowest version, then don't require a plugin.\n if (isUnreleasedVersion(lowestTargetedVersion, environment)) {\n return false;\n }\n\n // Include plugin if it is supported in the unreleased environment, which wasn't specified in targets\n if (isUnreleasedVersion(lowestImplementedVersion, environment)) {\n return true;\n }\n\n if (!semver.valid(lowestTargetedVersion.toString())) {\n throw new Error(\n `Invalid version passed for target \"${environment}\": \"${lowestTargetedVersion}\". ` +\n \"Versions must be in semver format (major.minor.patch)\",\n );\n }\n\n return semver.gt(\n semverify(lowestImplementedVersion),\n lowestTargetedVersion.toString(),\n );\n });\n\n return unsupportedEnvironments.length === 0;\n}\n\nexport function isRequired(\n name: string,\n targets: Targets,\n {\n compatData = pluginsCompatData,\n includes,\n excludes,\n }: {\n compatData?: { [feature: string]: Targets };\n includes?: Set;\n excludes?: Set;\n } = {},\n) {\n if (excludes?.has(name)) return false;\n if (includes?.has(name)) return true;\n return !targetsSupported(targets, compatData[name]);\n}\n\nexport default function filterItems(\n list: { [feature: string]: Targets },\n includes: Set,\n excludes: Set,\n targets: Targets,\n defaultIncludes: Array | null,\n defaultExcludes?: Array | null,\n pluginSyntaxMap?: Map,\n) {\n const result = new Set();\n const options = { compatData: list, includes, excludes };\n\n for (const item in list) {\n if (isRequired(item, targets, options)) {\n result.add(item);\n } else if (pluginSyntaxMap) {\n const shippedProposalsSyntax = pluginSyntaxMap.get(item);\n\n if (shippedProposalsSyntax) {\n result.add(shippedProposalsSyntax);\n }\n }\n }\n\n defaultIncludes?.forEach(item => !excludes.has(item) && result.add(item));\n defaultExcludes?.forEach(item => !includes.has(item) && result.delete(item));\n\n return result;\n}\n","import browserslist from \"browserslist\";\nimport { findSuggestion } from \"@babel/helper-validator-option\";\nimport browserModulesData from \"@babel/compat-data/native-modules\";\nimport LruCache from \"lru-cache\";\n\nimport {\n semverify,\n semverMin,\n isUnreleasedVersion,\n getLowestUnreleased,\n getHighestUnreleased,\n} from \"./utils.ts\";\nimport { OptionValidator } from \"@babel/helper-validator-option\";\nimport { browserNameMap } from \"./targets.ts\";\nimport { TargetNames } from \"./options.ts\";\nimport type {\n Target,\n Targets,\n InputTargets,\n Browsers,\n BrowserslistBrowserName,\n TargetsTuple,\n} from \"./types.ts\";\n\nexport type { Target, Targets, InputTargets };\n\nexport { prettifyTargets } from \"./pretty.ts\";\nexport { getInclusionReasons } from \"./debug.ts\";\nexport { default as filterItems, isRequired } from \"./filter-items.ts\";\nexport { unreleasedLabels } from \"./targets.ts\";\nexport { TargetNames };\n\nconst ESM_SUPPORT = browserModulesData[\"es6.module\"];\n\nconst v = new OptionValidator(PACKAGE_JSON.name);\n\nfunction validateTargetNames(targets: Targets): TargetsTuple {\n const validTargets = Object.keys(TargetNames);\n for (const target of Object.keys(targets)) {\n if (!(target in TargetNames)) {\n throw new Error(\n v.formatMessage(`'${target}' is not a valid target\n- Did you mean '${findSuggestion(target, validTargets)}'?`),\n );\n }\n }\n\n return targets;\n}\n\nexport function isBrowsersQueryValid(browsers: unknown): boolean {\n return (\n typeof browsers === \"string\" ||\n (Array.isArray(browsers) && browsers.every(b => typeof b === \"string\"))\n );\n}\n\nfunction validateBrowsers(browsers: Browsers | undefined) {\n v.invariant(\n browsers === undefined || isBrowsersQueryValid(browsers),\n `'${String(browsers)}' is not a valid browserslist query`,\n );\n\n return browsers;\n}\n\nfunction getLowestVersions(browsers: Array): Targets {\n return browsers.reduce(\n (all, browser) => {\n const [browserName, browserVersion] = browser.split(\" \") as [\n BrowserslistBrowserName,\n string,\n ];\n const target = browserNameMap[browserName];\n\n if (!target) {\n return all;\n }\n\n try {\n // Browser version can return as \"10.0-10.2\"\n const splitVersion = browserVersion.split(\"-\")[0].toLowerCase();\n const isSplitUnreleased = isUnreleasedVersion(splitVersion, target);\n\n if (!all[target]) {\n all[target] = isSplitUnreleased\n ? splitVersion\n : semverify(splitVersion);\n return all;\n }\n\n const version = all[target];\n const isUnreleased = isUnreleasedVersion(version, target);\n\n if (isUnreleased && isSplitUnreleased) {\n all[target] = getLowestUnreleased(version, splitVersion, target);\n } else if (isUnreleased) {\n all[target] = semverify(splitVersion);\n } else if (!isUnreleased && !isSplitUnreleased) {\n const parsedBrowserVersion = semverify(splitVersion);\n\n all[target] = semverMin(version, parsedBrowserVersion);\n }\n } catch (_) {}\n\n return all;\n },\n {} as Record,\n );\n}\n\nfunction outputDecimalWarning(\n decimalTargets: Array<{ target: string; value: number }>,\n) {\n if (!decimalTargets.length) {\n return;\n }\n\n console.warn(\"Warning, the following targets are using a decimal version:\\n\");\n decimalTargets.forEach(({ target, value }) =>\n console.warn(` ${target}: ${value}`),\n );\n console.warn(`\nWe recommend using a string for minor/patch versions to avoid numbers like 6.10\ngetting parsed as 6.1, which can lead to unexpected behavior.\n`);\n}\n\nfunction semverifyTarget(target: Target, value: string) {\n try {\n return semverify(value);\n } catch (_) {\n throw new Error(\n v.formatMessage(\n `'${value}' is not a valid value for 'targets.${target}'.`,\n ),\n );\n }\n}\n\n// Parse `node: true` and `node: \"current\"` to version\nfunction nodeTargetParser(value: true | string) {\n const parsed =\n value === true || value === \"current\"\n ? process.versions.node\n : semverifyTarget(\"node\", value);\n return [\"node\", parsed] as const;\n}\n\nfunction defaultTargetParser(\n target: Exclude,\n value: string,\n): readonly [Exclude, string] {\n const version = isUnreleasedVersion(value, target)\n ? value.toLowerCase()\n : semverifyTarget(target, value);\n return [target, version] as const;\n}\n\nfunction generateTargets(inputTargets: InputTargets): Targets {\n const input = { ...inputTargets };\n delete input.esmodules;\n delete input.browsers;\n return input;\n}\n\nfunction resolveTargets(queries: Browsers, env?: string): Targets {\n const resolved = browserslist(queries, {\n mobileToDesktop: true,\n env,\n });\n return getLowestVersions(resolved);\n}\n\nconst targetsCache = new LruCache({ max: 64 });\n\nfunction resolveTargetsCached(queries: Browsers, env?: string): Targets {\n const cacheKey = typeof queries === \"string\" ? queries : queries.join() + env;\n let cached = targetsCache.get(cacheKey) as Targets | undefined;\n if (!cached) {\n cached = resolveTargets(queries, env);\n targetsCache.set(cacheKey, cached);\n }\n return { ...cached };\n}\n\ntype GetTargetsOption = {\n // This is not the path of the config file, but the path where start searching it from\n configPath?: string;\n // The path of the config file\n configFile?: string;\n // The env to pass to browserslist\n browserslistEnv?: string;\n // true to disable config loading\n ignoreBrowserslistConfig?: boolean;\n};\n\nexport default function getTargets(\n inputTargets: InputTargets = {},\n options: GetTargetsOption = {},\n): Targets {\n let { browsers, esmodules } = inputTargets;\n const { configPath = \".\" } = options;\n\n validateBrowsers(browsers);\n\n const input = generateTargets(inputTargets);\n let targets = validateTargetNames(input);\n\n const shouldParseBrowsers = !!browsers;\n const hasTargets = shouldParseBrowsers || Object.keys(targets).length > 0;\n const shouldSearchForConfig =\n !options.ignoreBrowserslistConfig && !hasTargets;\n\n if (!browsers && shouldSearchForConfig) {\n browsers = browserslist.loadConfig({\n config: options.configFile,\n path: configPath,\n env: options.browserslistEnv,\n });\n if (browsers == null) {\n if (process.env.BABEL_8_BREAKING) {\n // In Babel 8, if no targets are passed, we use browserslist's defaults.\n browsers = [\"defaults\"];\n } else {\n // If no targets are passed, we need to overwrite browserslist's defaults\n // so that we enable all transforms (acting like the now deprecated\n // preset-latest).\n browsers = [];\n }\n }\n }\n\n // `esmodules` as a target indicates the specific set of browsers supporting ES Modules.\n // These values OVERRIDE the `browsers` field.\n if (esmodules && (esmodules !== \"intersect\" || !browsers?.length)) {\n browsers = Object.keys(ESM_SUPPORT)\n .map(\n (browser: keyof typeof ESM_SUPPORT) =>\n `${browser} >= ${ESM_SUPPORT[browser]}`,\n )\n .join(\", \");\n esmodules = false;\n }\n\n // If current value of `browsers` is undefined (`ignoreBrowserslistConfig` should be `false`)\n // or an empty array (without any user config, use default config),\n // we don't need to call `resolveTargets` to execute the related methods of `browserslist` library.\n if (browsers?.length) {\n const queryBrowsers = resolveTargetsCached(\n browsers,\n options.browserslistEnv,\n );\n\n if (esmodules === \"intersect\") {\n for (const browser of Object.keys(queryBrowsers) as Target[]) {\n if (browser !== \"deno\" && browser !== \"ie\") {\n const esmSupportVersion =\n ESM_SUPPORT[browser === \"opera_mobile\" ? \"op_mob\" : browser];\n\n if (esmSupportVersion) {\n const version = queryBrowsers[browser];\n queryBrowsers[browser] = getHighestUnreleased(\n version,\n semverify(esmSupportVersion),\n browser,\n );\n } else {\n delete queryBrowsers[browser];\n }\n } else {\n delete queryBrowsers[browser];\n }\n }\n }\n\n targets = Object.assign(queryBrowsers, targets);\n }\n\n // Parse remaining targets\n const result: Targets = {};\n const decimalWarnings = [];\n for (const target of Object.keys(targets).sort() as Target[]) {\n const value = targets[target];\n\n // Warn when specifying minor/patch as a decimal\n if (typeof value === \"number\" && value % 1 !== 0) {\n decimalWarnings.push({ target, value });\n }\n\n const [parsedTarget, parsedValue] =\n target === \"node\"\n ? nodeTargetParser(value)\n : defaultTargetParser(target, value as string);\n\n if (parsedValue) {\n // Merge (lowest wins)\n result[parsedTarget] = parsedValue;\n }\n }\n\n outputDecimalWarning(decimalWarnings);\n\n return result;\n}\n","import type { ValidatedOptions } from \"./validation/options.ts\";\nimport getTargets, {\n type InputTargets,\n} from \"@babel/helper-compilation-targets\";\n\nimport type { Targets } from \"@babel/helper-compilation-targets\";\n\nexport function resolveBrowserslistConfigFile(\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n browserslistConfigFile: string,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n configFilePath: string,\n): string | void {\n return undefined;\n}\n\nexport function resolveTargets(\n options: ValidatedOptions,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n root: string,\n): Targets {\n const optTargets = options.targets;\n let targets: InputTargets;\n\n if (typeof optTargets === \"string\" || Array.isArray(optTargets)) {\n targets = { browsers: optTargets };\n } else if (optTargets) {\n if (\"esmodules\" in optTargets) {\n targets = { ...optTargets, esmodules: \"intersect\" };\n } else {\n // https://github.com/microsoft/TypeScript/issues/17002\n targets = optTargets as InputTargets;\n }\n }\n\n return getTargets(targets, {\n ignoreBrowserslistConfig: true,\n browserslistEnv: options.browserslistEnv,\n });\n}\n","import gensync, { type Handler } from \"gensync\";\nimport { once } from \"../gensync-utils/functional.ts\";\n\nimport { loadPlugin, loadPreset } from \"./files/index.ts\";\n\nimport { getItemDescriptor } from \"./item.ts\";\n\nimport {\n makeWeakCacheSync,\n makeStrongCacheSync,\n makeStrongCache,\n} from \"./caching.ts\";\nimport type { CacheConfigurator } from \"./caching.ts\";\n\nimport type {\n ValidatedOptions,\n PluginList,\n PluginItem,\n} from \"./validation/options.ts\";\n\nimport { resolveBrowserslistConfigFile } from \"./resolve-targets.ts\";\nimport type { PluginAPI, PresetAPI } from \"./helpers/config-api.ts\";\n\n// Represents a config object and functions to lazily load the descriptors\n// for the plugins and presets so we don't load the plugins/presets unless\n// the options object actually ends up being applicable.\nexport type OptionsAndDescriptors = {\n options: ValidatedOptions;\n plugins: () => Handler>>;\n presets: () => Handler>>;\n};\n\n// Represents a plugin or presets at a given location in a config object.\n// At this point these have been resolved to a specific object or function,\n// but have not yet been executed to call functions with options.\nexport interface UnloadedDescriptor {\n name: string | undefined;\n value: object | ((api: API, options: Options, dirname: string) => unknown);\n options: Options;\n dirname: string;\n alias: string;\n ownPass?: boolean;\n file?: {\n request: string;\n resolved: string;\n };\n}\n\nfunction isEqualDescriptor(\n a: UnloadedDescriptor,\n b: UnloadedDescriptor,\n): boolean {\n return (\n a.name === b.name &&\n a.value === b.value &&\n a.options === b.options &&\n a.dirname === b.dirname &&\n a.alias === b.alias &&\n a.ownPass === b.ownPass &&\n a.file?.request === b.file?.request &&\n a.file?.resolved === b.file?.resolved\n );\n}\n\nexport type ValidatedFile = {\n filepath: string;\n dirname: string;\n options: ValidatedOptions;\n};\n\n// eslint-disable-next-line require-yield\nfunction* handlerOf(value: T): Handler {\n return value;\n}\n\nfunction optionsWithResolvedBrowserslistConfigFile(\n options: ValidatedOptions,\n dirname: string,\n): ValidatedOptions {\n if (typeof options.browserslistConfigFile === \"string\") {\n options.browserslistConfigFile = resolveBrowserslistConfigFile(\n options.browserslistConfigFile,\n dirname,\n );\n }\n return options;\n}\n\n/**\n * Create a set of descriptors from a given options object, preserving\n * descriptor identity based on the identity of the plugin/preset arrays\n * themselves, and potentially on the identity of the plugins/presets + options.\n */\nexport function createCachedDescriptors(\n dirname: string,\n options: ValidatedOptions,\n alias: string,\n): OptionsAndDescriptors {\n const { plugins, presets, passPerPreset } = options;\n return {\n options: optionsWithResolvedBrowserslistConfigFile(options, dirname),\n plugins: plugins\n ? () =>\n // @ts-expect-error todo(flow->ts) ts complains about incorrect arguments\n // eslint-disable-next-line @typescript-eslint/no-use-before-define\n createCachedPluginDescriptors(plugins, dirname)(alias)\n : () => handlerOf([]),\n presets: presets\n ? () =>\n // @ts-expect-error todo(flow->ts) ts complains about incorrect arguments\n // eslint-disable-next-line @typescript-eslint/no-use-before-define\n createCachedPresetDescriptors(presets, dirname)(alias)(\n !!passPerPreset,\n )\n : () => handlerOf([]),\n };\n}\n\n/**\n * Create a set of descriptors from a given options object, with consistent\n * identity for the descriptors, but not caching based on any specific identity.\n */\nexport function createUncachedDescriptors(\n dirname: string,\n options: ValidatedOptions,\n alias: string,\n): OptionsAndDescriptors {\n return {\n options: optionsWithResolvedBrowserslistConfigFile(options, dirname),\n // The returned result here is cached to represent a config object in\n // memory, so we build and memoize the descriptors to ensure the same\n // values are returned consistently.\n plugins: once(() =>\n createPluginDescriptors(options.plugins || [], dirname, alias),\n ),\n presets: once(() =>\n createPresetDescriptors(\n options.presets || [],\n dirname,\n alias,\n !!options.passPerPreset,\n ),\n ),\n };\n}\n\nconst PRESET_DESCRIPTOR_CACHE = new WeakMap();\nconst createCachedPresetDescriptors = makeWeakCacheSync(\n (items: PluginList, cache: CacheConfigurator) => {\n const dirname = cache.using(dir => dir);\n return makeStrongCacheSync((alias: string) =>\n makeStrongCache(function* (\n passPerPreset: boolean,\n ): Handler>> {\n const descriptors = yield* createPresetDescriptors(\n items,\n dirname,\n alias,\n passPerPreset,\n );\n return descriptors.map(\n // Items are cached using the overall preset array identity when\n // possibly, but individual descriptors are also cached if a match\n // can be found in the previously-used descriptor lists.\n desc => loadCachedDescriptor(PRESET_DESCRIPTOR_CACHE, desc),\n );\n }),\n );\n },\n);\n\nconst PLUGIN_DESCRIPTOR_CACHE = new WeakMap();\nconst createCachedPluginDescriptors = makeWeakCacheSync(\n (items: PluginList, cache: CacheConfigurator) => {\n const dirname = cache.using(dir => dir);\n return makeStrongCache(function* (\n alias: string,\n ): Handler>> {\n const descriptors = yield* createPluginDescriptors(items, dirname, alias);\n return descriptors.map(\n // Items are cached using the overall plugin array identity when\n // possibly, but individual descriptors are also cached if a match\n // can be found in the previously-used descriptor lists.\n desc => loadCachedDescriptor(PLUGIN_DESCRIPTOR_CACHE, desc),\n );\n });\n },\n);\n\n/**\n * When no options object is given in a descriptor, this object is used\n * as a WeakMap key in order to have consistent identity.\n */\nconst DEFAULT_OPTIONS = {};\n\n/**\n * Given the cache and a descriptor, returns a matching descriptor from the\n * cache, or else returns the input descriptor and adds it to the cache for\n * next time.\n */\nfunction loadCachedDescriptor(\n cache: WeakMap<\n object | Function,\n WeakMap>>\n >,\n desc: UnloadedDescriptor,\n) {\n const { value, options = DEFAULT_OPTIONS } = desc;\n if (options === false) return desc;\n\n let cacheByOptions = cache.get(value);\n if (!cacheByOptions) {\n cacheByOptions = new WeakMap();\n cache.set(value, cacheByOptions);\n }\n\n let possibilities = cacheByOptions.get(options);\n if (!possibilities) {\n possibilities = [];\n cacheByOptions.set(options, possibilities);\n }\n\n if (!possibilities.includes(desc)) {\n const matches = possibilities.filter(possibility =>\n isEqualDescriptor(possibility, desc),\n );\n if (matches.length > 0) {\n return matches[0];\n }\n\n possibilities.push(desc);\n }\n\n return desc;\n}\n\nfunction* createPresetDescriptors(\n items: PluginList,\n dirname: string,\n alias: string,\n passPerPreset: boolean,\n): Handler>> {\n return yield* createDescriptors(\n \"preset\",\n items,\n dirname,\n alias,\n passPerPreset,\n );\n}\n\nfunction* createPluginDescriptors(\n items: PluginList,\n dirname: string,\n alias: string,\n): Handler>> {\n return yield* createDescriptors(\"plugin\", items, dirname, alias);\n}\n\nfunction* createDescriptors(\n type: \"plugin\" | \"preset\",\n items: PluginList,\n dirname: string,\n alias: string,\n ownPass?: boolean,\n): Handler>> {\n const descriptors = yield* gensync.all(\n items.map((item, index) =>\n createDescriptor(item, dirname, {\n type,\n alias: `${alias}$${index}`,\n ownPass: !!ownPass,\n }),\n ),\n );\n\n assertNoDuplicates(descriptors);\n\n return descriptors;\n}\n\n/**\n * Given a plugin/preset item, resolve it into a standard format.\n */\nexport function* createDescriptor(\n pair: PluginItem,\n dirname: string,\n {\n type,\n alias,\n ownPass,\n }: {\n type?: \"plugin\" | \"preset\";\n alias: string;\n ownPass?: boolean;\n },\n): Handler> {\n const desc = getItemDescriptor(pair);\n if (desc) {\n return desc;\n }\n\n let name;\n let options;\n // todo(flow->ts) better type annotation\n let value: any = pair;\n if (Array.isArray(value)) {\n if (value.length === 3) {\n [value, options, name] = value;\n } else {\n [value, options] = value;\n }\n }\n\n let file = undefined;\n let filepath = null;\n if (typeof value === \"string\") {\n if (typeof type !== \"string\") {\n throw new Error(\n \"To resolve a string-based item, the type of item must be given\",\n );\n }\n const resolver = type === \"plugin\" ? loadPlugin : loadPreset;\n const request = value;\n\n ({ filepath, value } = yield* resolver(value, dirname));\n\n file = {\n request,\n resolved: filepath,\n };\n }\n\n if (!value) {\n throw new Error(`Unexpected falsy value: ${String(value)}`);\n }\n\n if (typeof value === \"object\" && value.__esModule) {\n if (value.default) {\n value = value.default;\n } else {\n throw new Error(\"Must export a default export when using ES6 modules.\");\n }\n }\n\n if (typeof value !== \"object\" && typeof value !== \"function\") {\n throw new Error(\n `Unsupported format: ${typeof value}. Expected an object or a function.`,\n );\n }\n\n if (filepath !== null && typeof value === \"object\" && value) {\n // We allow object values for plugins/presets nested directly within a\n // config object, because it can be useful to define them in nested\n // configuration contexts.\n throw new Error(\n `Plugin/Preset files are not allowed to export objects, only functions. In ${filepath}`,\n );\n }\n\n return {\n name,\n alias: filepath || alias,\n value,\n options,\n dirname,\n ownPass,\n file,\n };\n}\n\nfunction assertNoDuplicates(items: Array>): void {\n const map = new Map();\n\n for (const item of items) {\n if (typeof item.value !== \"function\") continue;\n\n let nameMap = map.get(item.value);\n if (!nameMap) {\n nameMap = new Set();\n map.set(item.value, nameMap);\n }\n\n if (nameMap.has(item.name)) {\n const conflicts = items.filter(i => i.value === item.value);\n throw new Error(\n [\n `Duplicate plugin/preset detected.`,\n `If you'd like to use two separate instances of a plugin,`,\n `they need separate names, e.g.`,\n ``,\n ` plugins: [`,\n ` ['some-plugin', {}],`,\n ` ['some-plugin', {}, 'some unique name'],`,\n ` ]`,\n ``,\n `Duplicates detected are:`,\n `${JSON.stringify(conflicts, null, 2)}`,\n ].join(\"\\n\"),\n );\n }\n\n nameMap.add(item.name);\n }\n}\n","import type { Handler } from \"gensync\";\nimport type { PluginTarget, PluginOptions } from \"./validation/options.ts\";\n\nimport path from \"path\";\nimport { createDescriptor } from \"./config-descriptors.ts\";\n\nimport type { UnloadedDescriptor } from \"./config-descriptors.ts\";\n\nexport function createItemFromDescriptor(\n desc: UnloadedDescriptor,\n): ConfigItem {\n return new ConfigItem(desc);\n}\n\n/**\n * Create a config item using the same value format used in Babel's config\n * files. Items returned from this function should be cached by the caller\n * ideally, as recreating the config item will mean re-resolving the item\n * and re-evaluating the plugin/preset function.\n */\nexport function* createConfigItem(\n value:\n | PluginTarget\n | [PluginTarget, PluginOptions]\n | [PluginTarget, PluginOptions, string | void],\n {\n dirname = \".\",\n type,\n }: {\n dirname?: string;\n type?: \"preset\" | \"plugin\";\n } = {},\n): Handler> {\n const descriptor = yield* createDescriptor(value, path.resolve(dirname), {\n type,\n alias: \"programmatic item\",\n });\n\n return createItemFromDescriptor(descriptor);\n}\n\nconst CONFIG_ITEM_BRAND = Symbol.for(\"@babel/core@7 - ConfigItem\");\n\nexport function getItemDescriptor(\n item: unknown,\n): UnloadedDescriptor | void {\n if ((item as any)?.[CONFIG_ITEM_BRAND]) {\n return (item as ConfigItem)._descriptor;\n }\n\n return undefined;\n}\n\nexport type { ConfigItem };\n\n/**\n * A public representation of a plugin/preset that will _eventually_ be load.\n * Users can use this to interact with the results of a loaded Babel\n * configuration.\n *\n * Any changes to public properties of this class should be considered a\n * breaking change to Babel's API.\n */\nclass ConfigItem {\n /**\n * The private underlying descriptor that Babel actually cares about.\n * If you access this, you are a bad person.\n */\n _descriptor: UnloadedDescriptor;\n\n // TODO(Babel 9): Check if this symbol needs to be updated\n /**\n * Used to detect ConfigItem instances from other Babel instances.\n */\n [CONFIG_ITEM_BRAND] = true;\n\n /**\n * The resolved value of the item itself.\n */\n value: object | Function;\n\n /**\n * The options, if any, that were passed to the item.\n * Mutating this will lead to undefined behavior.\n *\n * \"false\" means that this item has been disabled.\n */\n options: object | void | false;\n\n /**\n * The directory that the options for this item are relative to.\n */\n dirname: string;\n\n /**\n * Get the name of the plugin, if the user gave it one.\n */\n name: string | void;\n\n /**\n * Data about the file that the item was loaded from, if Babel knows it.\n */\n file: {\n // The requested path, e.g. \"@babel/env\".\n request: string;\n // The resolved absolute path of the file.\n resolved: string;\n } | void;\n\n constructor(descriptor: UnloadedDescriptor) {\n // Make people less likely to stumble onto this if they are exploring\n // programmatically, and also make sure that if people happen to\n // pass the item through JSON.stringify, it doesn't show up.\n this._descriptor = descriptor;\n Object.defineProperty(this, \"_descriptor\", { enumerable: false });\n\n Object.defineProperty(this, CONFIG_ITEM_BRAND, { enumerable: false });\n\n this.value = this._descriptor.value;\n this.options = this._descriptor.options;\n this.dirname = this._descriptor.dirname;\n this.name = this._descriptor.name;\n this.file = this._descriptor.file\n ? {\n request: this._descriptor.file.request,\n resolved: this._descriptor.file.resolved,\n }\n : undefined;\n\n // Freeze the object to make it clear that people shouldn't expect mutating\n // this object to do anything. A new item should be created if they want\n // to change something.\n Object.freeze(this);\n }\n}\n\nObject.freeze(ConfigItem.prototype);\n","export default {\n auxiliaryComment: {\n message: \"Use `auxiliaryCommentBefore` or `auxiliaryCommentAfter`\",\n },\n blacklist: {\n message: \"Put the specific transforms you want in the `plugins` option\",\n },\n breakConfig: {\n message: \"This is not a necessary option in Babel 6\",\n },\n experimental: {\n message: \"Put the specific transforms you want in the `plugins` option\",\n },\n externalHelpers: {\n message:\n \"Use the `external-helpers` plugin instead. \" +\n \"Check out http://babeljs.io/docs/plugins/external-helpers/\",\n },\n extra: {\n message: \"\",\n },\n jsxPragma: {\n message:\n \"use the `pragma` option in the `react-jsx` plugin. \" +\n \"Check out http://babeljs.io/docs/plugins/transform-react-jsx/\",\n },\n loose: {\n message:\n \"Specify the `loose` option for the relevant plugin you are using \" +\n \"or use a preset that sets the option.\",\n },\n metadataUsedHelpers: {\n message: \"Not required anymore as this is enabled by default\",\n },\n modules: {\n message:\n \"Use the corresponding module transform plugin in the `plugins` option. \" +\n \"Check out http://babeljs.io/docs/plugins/#modules\",\n },\n nonStandard: {\n message:\n \"Use the `react-jsx` and `flow-strip-types` plugins to support JSX and Flow. \" +\n \"Also check out the react preset http://babeljs.io/docs/plugins/preset-react/\",\n },\n optional: {\n message: \"Put the specific transforms you want in the `plugins` option\",\n },\n sourceMapName: {\n message:\n \"The `sourceMapName` option has been removed because it makes more sense for the \" +\n \"tooling that calls Babel to assign `map.file` themselves.\",\n },\n stage: {\n message:\n \"Check out the corresponding stage-x presets http://babeljs.io/docs/plugins/#presets\",\n },\n whitelist: {\n message: \"Put the specific transforms you want in the `plugins` option\",\n },\n\n resolveModuleSource: {\n version: 6,\n message: \"Use `babel-plugin-module-resolver@3`'s 'resolvePath' options\",\n },\n metadata: {\n version: 6,\n message:\n \"Generated plugin metadata is always included in the output result\",\n },\n sourceMapTarget: {\n version: 6,\n message:\n \"The `sourceMapTarget` option has been removed because it makes more sense for the tooling \" +\n \"that calls Babel to assign `map.file` themselves.\",\n },\n} as { [name: string]: { version?: number; message: string } };\n","import {\n isBrowsersQueryValid,\n TargetNames,\n} from \"@babel/helper-compilation-targets\";\n\nimport type {\n ConfigFileSearch,\n BabelrcSearch,\n IgnoreList,\n IgnoreItem,\n PluginList,\n PluginItem,\n PluginTarget,\n ConfigApplicableTest,\n SourceMapsOption,\n SourceTypeOption,\n CompactOption,\n RootInputSourceMapOption,\n NestingPath,\n CallerMetadata,\n RootMode,\n TargetsListOrObject,\n AssumptionName,\n} from \"./options.ts\";\n\nimport { assumptionsNames } from \"./options.ts\";\n\nexport type { RootPath } from \"./options.ts\";\n\nexport type ValidatorSet = {\n [name: string]: Validator;\n};\n\nexport type Validator = (loc: OptionPath, value: unknown) => T;\n\nexport function msg(loc: NestingPath | GeneralPath): string {\n switch (loc.type) {\n case \"root\":\n return ``;\n case \"env\":\n return `${msg(loc.parent)}.env[\"${loc.name}\"]`;\n case \"overrides\":\n return `${msg(loc.parent)}.overrides[${loc.index}]`;\n case \"option\":\n return `${msg(loc.parent)}.${loc.name}`;\n case \"access\":\n return `${msg(loc.parent)}[${JSON.stringify(loc.name)}]`;\n default:\n // @ts-expect-error should not happen when code is type checked\n throw new Error(`Assertion failure: Unknown type ${loc.type}`);\n }\n}\n\nexport function access(loc: GeneralPath, name: string | number): AccessPath {\n return {\n type: \"access\",\n name,\n parent: loc,\n };\n}\n\nexport type OptionPath = Readonly<{\n type: \"option\";\n name: string;\n parent: NestingPath;\n}>;\ntype AccessPath = Readonly<{\n type: \"access\";\n name: string | number;\n parent: GeneralPath;\n}>;\ntype GeneralPath = OptionPath | AccessPath;\n\nexport function assertRootMode(\n loc: OptionPath,\n value: unknown,\n): RootMode | void {\n if (\n value !== undefined &&\n value !== \"root\" &&\n value !== \"upward\" &&\n value !== \"upward-optional\"\n ) {\n throw new Error(\n `${msg(loc)} must be a \"root\", \"upward\", \"upward-optional\" or undefined`,\n );\n }\n // @ts-expect-error: TS can only narrow down the type when \"strictNullCheck\" is true\n return value;\n}\n\nexport function assertSourceMaps(\n loc: OptionPath,\n value: unknown,\n): SourceMapsOption | void {\n if (\n value !== undefined &&\n typeof value !== \"boolean\" &&\n value !== \"inline\" &&\n value !== \"both\"\n ) {\n throw new Error(\n `${msg(loc)} must be a boolean, \"inline\", \"both\", or undefined`,\n );\n }\n // @ts-expect-error: TS can only narrow down the type when \"strictNullCheck\" is true\n return value;\n}\n\nexport function assertCompact(\n loc: OptionPath,\n value: unknown,\n): CompactOption | void {\n if (value !== undefined && typeof value !== \"boolean\" && value !== \"auto\") {\n throw new Error(`${msg(loc)} must be a boolean, \"auto\", or undefined`);\n }\n // @ts-expect-error: TS can only narrow down the type when \"strictNullCheck\" is true\n return value;\n}\n\nexport function assertSourceType(\n loc: OptionPath,\n value: unknown,\n): SourceTypeOption | void {\n if (\n value !== undefined &&\n value !== \"module\" &&\n value !== \"script\" &&\n value !== \"unambiguous\"\n ) {\n throw new Error(\n `${msg(loc)} must be \"module\", \"script\", \"unambiguous\", or undefined`,\n );\n }\n // @ts-expect-error: TS can only narrow down the type when \"strictNullCheck\" is true\n return value;\n}\n\nexport function assertCallerMetadata(\n loc: OptionPath,\n value: unknown,\n): CallerMetadata | undefined {\n const obj = assertObject(loc, value);\n if (obj) {\n if (typeof obj.name !== \"string\") {\n throw new Error(\n `${msg(loc)} set but does not contain \"name\" property string`,\n );\n }\n\n for (const prop of Object.keys(obj)) {\n const propLoc = access(loc, prop);\n const value = obj[prop];\n if (\n value != null &&\n typeof value !== \"boolean\" &&\n typeof value !== \"string\" &&\n typeof value !== \"number\"\n ) {\n // NOTE(logan): I'm limiting the type here so that we can guarantee that\n // the \"caller\" value will serialize to JSON nicely. We can always\n // allow more complex structures later though.\n throw new Error(\n `${msg(\n propLoc,\n )} must be null, undefined, a boolean, a string, or a number.`,\n );\n }\n }\n }\n // @ts-expect-error todo(flow->ts)\n return value;\n}\n\nexport function assertInputSourceMap(\n loc: OptionPath,\n value: unknown,\n): RootInputSourceMapOption {\n if (\n value !== undefined &&\n typeof value !== \"boolean\" &&\n (typeof value !== \"object\" || !value)\n ) {\n throw new Error(`${msg(loc)} must be a boolean, object, or undefined`);\n }\n return value as RootInputSourceMapOption;\n}\n\nexport function assertString(loc: GeneralPath, value: unknown): string | void {\n if (value !== undefined && typeof value !== \"string\") {\n throw new Error(`${msg(loc)} must be a string, or undefined`);\n }\n // @ts-expect-error: TS can only narrow down the type when \"strictNullCheck\" is true\n return value;\n}\n\nexport function assertFunction(\n loc: GeneralPath,\n value: unknown,\n): Function | void {\n if (value !== undefined && typeof value !== \"function\") {\n throw new Error(`${msg(loc)} must be a function, or undefined`);\n }\n // @ts-expect-error: TS can only narrow down the type when \"strictNullCheck\" is true\n return value;\n}\n\nexport function assertBoolean(\n loc: GeneralPath,\n value: unknown,\n): boolean | void {\n if (value !== undefined && typeof value !== \"boolean\") {\n throw new Error(`${msg(loc)} must be a boolean, or undefined`);\n }\n // @ts-expect-error: TS can only narrow down the type when \"strictNullCheck\" is true\n return value;\n}\n\nexport function assertObject(\n loc: GeneralPath,\n value: unknown,\n): { readonly [key: string]: unknown } | void {\n if (\n value !== undefined &&\n (typeof value !== \"object\" || Array.isArray(value) || !value)\n ) {\n throw new Error(`${msg(loc)} must be an object, or undefined`);\n }\n // @ts-expect-error todo(flow->ts) value is still typed as unknown, also assert function typically should not return a value\n return value;\n}\n\nexport function assertArray(\n loc: GeneralPath,\n value: Array | undefined | null,\n): ReadonlyArray | undefined | null {\n if (value != null && !Array.isArray(value)) {\n throw new Error(`${msg(loc)} must be an array, or undefined`);\n }\n return value;\n}\n\nexport function assertIgnoreList(\n loc: OptionPath,\n value: unknown[] | undefined,\n): IgnoreList | void {\n const arr = assertArray(loc, value);\n arr?.forEach((item, i) => assertIgnoreItem(access(loc, i), item));\n // @ts-expect-error todo(flow->ts)\n return arr;\n}\nfunction assertIgnoreItem(loc: GeneralPath, value: unknown): IgnoreItem {\n if (\n typeof value !== \"string\" &&\n typeof value !== \"function\" &&\n !(value instanceof RegExp)\n ) {\n throw new Error(\n `${msg(\n loc,\n )} must be an array of string/Function/RegExp values, or undefined`,\n );\n }\n return value as IgnoreItem;\n}\n\nexport function assertConfigApplicableTest(\n loc: OptionPath,\n value: unknown,\n): ConfigApplicableTest | void {\n if (value === undefined) {\n // @ts-expect-error: TS can only narrow down the type when \"strictNullCheck\" is true\n return value;\n }\n\n if (Array.isArray(value)) {\n value.forEach((item, i) => {\n if (!checkValidTest(item)) {\n throw new Error(\n `${msg(access(loc, i))} must be a string/Function/RegExp.`,\n );\n }\n });\n } else if (!checkValidTest(value)) {\n throw new Error(\n `${msg(loc)} must be a string/Function/RegExp, or an array of those`,\n );\n }\n return value as ConfigApplicableTest;\n}\n\nfunction checkValidTest(value: unknown): value is string | Function | RegExp {\n return (\n typeof value === \"string\" ||\n typeof value === \"function\" ||\n value instanceof RegExp\n );\n}\n\nexport function assertConfigFileSearch(\n loc: OptionPath,\n value: unknown,\n): ConfigFileSearch | void {\n if (\n value !== undefined &&\n typeof value !== \"boolean\" &&\n typeof value !== \"string\"\n ) {\n throw new Error(\n `${msg(loc)} must be a undefined, a boolean, a string, ` +\n `got ${JSON.stringify(value)}`,\n );\n }\n // @ts-expect-error: TS can only narrow down the type when \"strictNullCheck\" is true\n return value;\n}\n\nexport function assertBabelrcSearch(\n loc: OptionPath,\n value: unknown,\n): BabelrcSearch | void {\n if (value === undefined || typeof value === \"boolean\") {\n // @ts-expect-error: TS can only narrow down the type when \"strictNullCheck\" is true\n return value;\n }\n\n if (Array.isArray(value)) {\n value.forEach((item, i) => {\n if (!checkValidTest(item)) {\n throw new Error(\n `${msg(access(loc, i))} must be a string/Function/RegExp.`,\n );\n }\n });\n } else if (!checkValidTest(value)) {\n throw new Error(\n `${msg(loc)} must be a undefined, a boolean, a string/Function/RegExp ` +\n `or an array of those, got ${JSON.stringify(value as any)}`,\n );\n }\n return value as BabelrcSearch;\n}\n\nexport function assertPluginList(\n loc: OptionPath,\n value: unknown[] | null | undefined,\n): PluginList | void {\n const arr = assertArray(loc, value);\n if (arr) {\n // Loop instead of using `.map` in order to preserve object identity\n // for plugin array for use during config chain processing.\n arr.forEach((item, i) => assertPluginItem(access(loc, i), item));\n }\n return arr as any;\n}\nfunction assertPluginItem(loc: GeneralPath, value: unknown): PluginItem {\n if (Array.isArray(value)) {\n if (value.length === 0) {\n throw new Error(`${msg(loc)} must include an object`);\n }\n\n if (value.length > 3) {\n throw new Error(`${msg(loc)} may only be a two-tuple or three-tuple`);\n }\n\n assertPluginTarget(access(loc, 0), value[0]);\n\n if (value.length > 1) {\n const opts = value[1];\n if (\n opts !== undefined &&\n opts !== false &&\n (typeof opts !== \"object\" || Array.isArray(opts) || opts === null)\n ) {\n throw new Error(\n `${msg(access(loc, 1))} must be an object, false, or undefined`,\n );\n }\n }\n if (value.length === 3) {\n const name = value[2];\n if (name !== undefined && typeof name !== \"string\") {\n throw new Error(\n `${msg(access(loc, 2))} must be a string, or undefined`,\n );\n }\n }\n } else {\n assertPluginTarget(loc, value);\n }\n\n // @ts-expect-error todo(flow->ts)\n return value;\n}\nfunction assertPluginTarget(loc: GeneralPath, value: unknown): PluginTarget {\n if (\n (typeof value !== \"object\" || !value) &&\n typeof value !== \"string\" &&\n typeof value !== \"function\"\n ) {\n throw new Error(`${msg(loc)} must be a string, object, function`);\n }\n return value;\n}\n\nexport function assertTargets(\n loc: GeneralPath,\n value: any,\n): TargetsListOrObject {\n if (isBrowsersQueryValid(value)) return value;\n\n if (typeof value !== \"object\" || !value || Array.isArray(value)) {\n throw new Error(\n `${msg(loc)} must be a string, an array of strings or an object`,\n );\n }\n\n const browsersLoc = access(loc, \"browsers\");\n const esmodulesLoc = access(loc, \"esmodules\");\n\n assertBrowsersList(browsersLoc, value.browsers);\n assertBoolean(esmodulesLoc, value.esmodules);\n\n for (const key of Object.keys(value)) {\n const val = value[key];\n const subLoc = access(loc, key);\n\n if (key === \"esmodules\") assertBoolean(subLoc, val);\n else if (key === \"browsers\") assertBrowsersList(subLoc, val);\n else if (!Object.hasOwn(TargetNames, key)) {\n const validTargets = Object.keys(TargetNames).join(\", \");\n throw new Error(\n `${msg(\n subLoc,\n )} is not a valid target. Supported targets are ${validTargets}`,\n );\n } else assertBrowserVersion(subLoc, val);\n }\n\n return value;\n}\n\nfunction assertBrowsersList(loc: GeneralPath, value: unknown) {\n if (value !== undefined && !isBrowsersQueryValid(value)) {\n throw new Error(\n `${msg(loc)} must be undefined, a string or an array of strings`,\n );\n }\n}\n\nfunction assertBrowserVersion(loc: GeneralPath, value: unknown) {\n if (typeof value === \"number\" && Math.round(value) === value) return;\n if (typeof value === \"string\") return;\n\n throw new Error(`${msg(loc)} must be a string or an integer number`);\n}\n\nexport function assertAssumptions(\n loc: GeneralPath,\n value: { [key: string]: unknown },\n): { [name: string]: boolean } | void {\n if (value === undefined) return;\n\n if (typeof value !== \"object\" || value === null) {\n throw new Error(`${msg(loc)} must be an object or undefined.`);\n }\n\n // todo(flow->ts): remove any\n let root: any = loc;\n do {\n root = root.parent;\n } while (root.type !== \"root\");\n const inPreset = root.source === \"preset\";\n\n for (const name of Object.keys(value)) {\n const subLoc = access(loc, name);\n if (!assumptionsNames.has(name as AssumptionName)) {\n throw new Error(`${msg(subLoc)} is not a supported assumption.`);\n }\n if (typeof value[name] !== \"boolean\") {\n throw new Error(`${msg(subLoc)} must be a boolean.`);\n }\n if (inPreset && value[name] === false) {\n throw new Error(\n `${msg(subLoc)} cannot be set to 'false' inside presets.`,\n );\n }\n }\n\n // @ts-expect-error todo(flow->ts)\n return value;\n}\n","/**\n * This file uses the internal V8 Stack Trace API (https://v8.dev/docs/stack-trace-api)\n * to provide utilities to rewrite the stack trace.\n * When this API is not present, all the functions in this file become noops.\n *\n * beginHiddenCallStack(fn) and endHiddenCallStack(fn) wrap their parameter to\n * mark an hidden portion of the stack trace. The function passed to\n * beginHiddenCallStack is the first hidden function, while the function passed\n * to endHiddenCallStack is the first shown function.\n *\n * When an error is thrown _outside_ of the hidden zone, everything between\n * beginHiddenCallStack and endHiddenCallStack will not be shown.\n * If an error is thrown _inside_ the hidden zone, then the whole stack trace\n * will be visible: this is to avoid hiding real bugs.\n * However, if an error inside the hidden zone is expected, it can be marked\n * with the expectedError(error) function to keep the hidden frames hidden.\n *\n * Consider this call stack (the outer function is the bottom one):\n *\n * 1. a()\n * 2. endHiddenCallStack(b)()\n * 3. c()\n * 4. beginHiddenCallStack(d)()\n * 5. e()\n * 6. f()\n *\n * - If a() throws an error, then its shown call stack will be \"a, b, e, f\"\n * - If b() throws an error, then its shown call stack will be \"b, e, f\"\n * - If c() throws an expected error, then its shown call stack will be \"e, f\"\n * - If c() throws an unexpected error, then its shown call stack will be \"c, d, e, f\"\n * - If d() throws an expected error, then its shown call stack will be \"e, f\"\n * - If d() throws an unexpected error, then its shown call stack will be \"d, e, f\"\n * - If e() throws an error, then its shown call stack will be \"e, f\"\n *\n * Additionally, an error can inject additional \"virtual\" stack frames using the\n * injectVirtualStackFrame(error, filename) function: those are injected as a\n * replacement of the hidden frames.\n * In the example above, if we called injectVirtualStackFrame(err, \"h\") and\n * injectVirtualStackFrame(err, \"i\") on the expected error thrown by c(), its\n * shown call stack would have been \"h, i, e, f\".\n * This can be useful, for example, to report config validation errors as if they\n * were directly thrown in the config file.\n */\n\nconst ErrorToString = Function.call.bind(Error.prototype.toString);\n\nconst SUPPORTED =\n !!Error.captureStackTrace &&\n Object.getOwnPropertyDescriptor(Error, \"stackTraceLimit\")?.writable === true;\n\nconst START_HIDING = \"startHiding - secret - don't use this - v1\";\nconst STOP_HIDING = \"stopHiding - secret - don't use this - v1\";\n\ntype CallSite = NodeJS.CallSite;\n\nconst expectedErrors = new WeakSet();\nconst virtualFrames = new WeakMap();\n\nfunction CallSite(filename: string): CallSite {\n // We need to use a prototype otherwise it breaks source-map-support's internals\n return Object.create({\n isNative: () => false,\n isConstructor: () => false,\n isToplevel: () => true,\n getFileName: () => filename,\n getLineNumber: () => undefined,\n getColumnNumber: () => undefined,\n getFunctionName: () => undefined,\n getMethodName: () => undefined,\n getTypeName: () => undefined,\n toString: () => filename,\n } as CallSite);\n}\n\nexport function injectVirtualStackFrame(error: Error, filename: string) {\n if (!SUPPORTED) return;\n\n let frames = virtualFrames.get(error);\n if (!frames) virtualFrames.set(error, (frames = []));\n frames.push(CallSite(filename));\n\n return error;\n}\n\nexport function expectedError(error: Error) {\n if (!SUPPORTED) return;\n expectedErrors.add(error);\n return error;\n}\n\nexport function beginHiddenCallStack(\n fn: (...args: A) => R,\n) {\n if (!SUPPORTED) return fn;\n\n return Object.defineProperty(\n function (...args: A) {\n setupPrepareStackTrace();\n return fn(...args);\n },\n \"name\",\n { value: STOP_HIDING },\n );\n}\n\nexport function endHiddenCallStack(\n fn: (...args: A) => R,\n) {\n if (!SUPPORTED) return fn;\n\n return Object.defineProperty(\n function (...args: A) {\n return fn(...args);\n },\n \"name\",\n { value: START_HIDING },\n );\n}\n\nfunction setupPrepareStackTrace() {\n // @ts-expect-error This function is a singleton\n setupPrepareStackTrace = () => {};\n\n const { prepareStackTrace = defaultPrepareStackTrace } = Error;\n\n // We add some extra frames to Error.stackTraceLimit, so that we can\n // always show some useful frames even after deleting ours.\n // STACK_TRACE_LIMIT_DELTA should be around the maximum expected number\n // of internal frames, and not too big because capturing the stack trace\n // is slow (this is why Error.stackTraceLimit does not default to Infinity!).\n // Increase it if needed.\n // However, we only do it if the user did not explicitly set it to 0.\n const MIN_STACK_TRACE_LIMIT = 50;\n Error.stackTraceLimit &&= Math.max(\n Error.stackTraceLimit,\n MIN_STACK_TRACE_LIMIT,\n );\n\n Error.prepareStackTrace = function stackTraceRewriter(err, trace) {\n let newTrace = [];\n\n const isExpected = expectedErrors.has(err);\n let status: \"showing\" | \"hiding\" | \"unknown\" = isExpected\n ? \"hiding\"\n : \"unknown\";\n for (let i = 0; i < trace.length; i++) {\n const name = trace[i].getFunctionName();\n if (name === START_HIDING) {\n status = \"hiding\";\n } else if (name === STOP_HIDING) {\n if (status === \"hiding\") {\n status = \"showing\";\n if (virtualFrames.has(err)) {\n newTrace.unshift(...virtualFrames.get(err));\n }\n } else if (status === \"unknown\") {\n // Unexpected internal error, show the full stack trace\n newTrace = trace;\n break;\n }\n } else if (status !== \"hiding\") {\n newTrace.push(trace[i]);\n }\n }\n\n return prepareStackTrace(err, newTrace);\n };\n}\n\nfunction defaultPrepareStackTrace(err: Error, trace: CallSite[]) {\n if (trace.length === 0) return ErrorToString(err);\n return `${ErrorToString(err)}\\n at ${trace.join(\"\\n at \")}`;\n}\n","import {\n injectVirtualStackFrame,\n expectedError,\n} from \"./rewrite-stack-trace.ts\";\n\nexport default class ConfigError extends Error {\n constructor(message: string, filename?: string) {\n super(message);\n expectedError(this);\n if (filename) injectVirtualStackFrame(this, filename);\n }\n}\n","import type { InputTargets, Targets } from \"@babel/helper-compilation-targets\";\n\nimport type { ConfigItem } from \"../item.ts\";\nimport type Plugin from \"../plugin.ts\";\n\nimport removed from \"./removed.ts\";\nimport {\n msg,\n access,\n assertString,\n assertBoolean,\n assertObject,\n assertArray,\n assertCallerMetadata,\n assertInputSourceMap,\n assertIgnoreList,\n assertPluginList,\n assertConfigApplicableTest,\n assertConfigFileSearch,\n assertBabelrcSearch,\n assertFunction,\n assertRootMode,\n assertSourceMaps,\n assertCompact,\n assertSourceType,\n assertTargets,\n assertAssumptions,\n} from \"./option-assertions.ts\";\nimport type {\n ValidatorSet,\n Validator,\n OptionPath,\n} from \"./option-assertions.ts\";\nimport type { UnloadedDescriptor } from \"../config-descriptors.ts\";\nimport type { PluginAPI } from \"../helpers/config-api.ts\";\nimport type { ParserOptions } from \"@babel/parser\";\nimport type { GeneratorOptions } from \"@babel/generator\";\nimport ConfigError from \"../../errors/config-error.ts\";\n\nconst ROOT_VALIDATORS: ValidatorSet = {\n cwd: assertString as Validator,\n root: assertString as Validator,\n rootMode: assertRootMode as Validator,\n configFile: assertConfigFileSearch as Validator<\n ValidatedOptions[\"configFile\"]\n >,\n\n caller: assertCallerMetadata as Validator,\n filename: assertString as Validator,\n filenameRelative: assertString as Validator<\n ValidatedOptions[\"filenameRelative\"]\n >,\n code: assertBoolean as Validator,\n ast: assertBoolean as Validator,\n\n cloneInputAst: assertBoolean as Validator,\n\n envName: assertString as Validator,\n};\n\nconst BABELRC_VALIDATORS: ValidatorSet = {\n babelrc: assertBoolean as Validator,\n babelrcRoots: assertBabelrcSearch as Validator<\n ValidatedOptions[\"babelrcRoots\"]\n >,\n};\n\nconst NONPRESET_VALIDATORS: ValidatorSet = {\n extends: assertString as Validator,\n ignore: assertIgnoreList as Validator,\n only: assertIgnoreList as Validator,\n\n targets: assertTargets as Validator,\n browserslistConfigFile: assertConfigFileSearch as Validator<\n ValidatedOptions[\"browserslistConfigFile\"]\n >,\n browserslistEnv: assertString as Validator<\n ValidatedOptions[\"browserslistEnv\"]\n >,\n};\n\nconst COMMON_VALIDATORS: ValidatorSet = {\n // TODO: Should 'inputSourceMap' be moved to be a root-only option?\n // We may want a boolean-only version to be a common option, with the\n // object only allowed as a root config argument.\n inputSourceMap: assertInputSourceMap as Validator<\n ValidatedOptions[\"inputSourceMap\"]\n >,\n presets: assertPluginList as Validator,\n plugins: assertPluginList as Validator,\n passPerPreset: assertBoolean as Validator,\n assumptions: assertAssumptions as Validator,\n\n env: assertEnvSet as Validator,\n overrides: assertOverridesList as Validator,\n\n // We could limit these to 'overrides' blocks, but it's not clear why we'd\n // bother, when the ability to limit a config to a specific set of files\n // is a fairly general useful feature.\n test: assertConfigApplicableTest as Validator,\n include: assertConfigApplicableTest as Validator,\n exclude: assertConfigApplicableTest as Validator,\n\n retainLines: assertBoolean as Validator,\n comments: assertBoolean as Validator,\n shouldPrintComment: assertFunction as Validator<\n ValidatedOptions[\"shouldPrintComment\"]\n >,\n compact: assertCompact as Validator,\n minified: assertBoolean as Validator,\n auxiliaryCommentBefore: assertString as Validator<\n ValidatedOptions[\"auxiliaryCommentBefore\"]\n >,\n auxiliaryCommentAfter: assertString as Validator<\n ValidatedOptions[\"auxiliaryCommentAfter\"]\n >,\n sourceType: assertSourceType as Validator,\n wrapPluginVisitorMethod: assertFunction as Validator<\n ValidatedOptions[\"wrapPluginVisitorMethod\"]\n >,\n highlightCode: assertBoolean as Validator,\n sourceMaps: assertSourceMaps as Validator,\n sourceMap: assertSourceMaps as Validator,\n sourceFileName: assertString as Validator,\n sourceRoot: assertString as Validator,\n parserOpts: assertObject as Validator,\n generatorOpts: assertObject as Validator,\n};\nif (!process.env.BABEL_8_BREAKING) {\n Object.assign(COMMON_VALIDATORS, {\n getModuleId: assertFunction,\n moduleRoot: assertString,\n moduleIds: assertBoolean,\n moduleId: assertString,\n });\n}\n\nexport type InputOptions = ValidatedOptions;\n\nexport type ValidatedOptions = {\n cwd?: string;\n filename?: string;\n filenameRelative?: string;\n babelrc?: boolean;\n babelrcRoots?: BabelrcSearch;\n configFile?: ConfigFileSearch;\n root?: string;\n rootMode?: RootMode;\n code?: boolean;\n ast?: boolean;\n cloneInputAst?: boolean;\n inputSourceMap?: RootInputSourceMapOption;\n envName?: string;\n caller?: CallerMetadata;\n extends?: string;\n env?: EnvSet;\n ignore?: IgnoreList;\n only?: IgnoreList;\n overrides?: OverridesList;\n // Generally verify if a given config object should be applied to the given file.\n test?: ConfigApplicableTest;\n include?: ConfigApplicableTest;\n exclude?: ConfigApplicableTest;\n presets?: PluginList;\n plugins?: PluginList;\n passPerPreset?: boolean;\n assumptions?: {\n [name: string]: boolean;\n };\n // browserslists-related options\n targets?: TargetsListOrObject;\n browserslistConfigFile?: ConfigFileSearch;\n browserslistEnv?: string;\n // Options for @babel/generator\n retainLines?: boolean;\n comments?: boolean;\n shouldPrintComment?: Function;\n compact?: CompactOption;\n minified?: boolean;\n auxiliaryCommentBefore?: string;\n auxiliaryCommentAfter?: string;\n // Parser\n sourceType?: SourceTypeOption;\n wrapPluginVisitorMethod?: Function;\n highlightCode?: boolean;\n // Sourcemap generation options.\n sourceMaps?: SourceMapsOption;\n sourceMap?: SourceMapsOption;\n sourceFileName?: string;\n sourceRoot?: string;\n // Deprecate top level parserOpts\n parserOpts?: ParserOptions;\n // Deprecate top level generatorOpts\n generatorOpts?: GeneratorOptions;\n};\n\nexport type NormalizedOptions = {\n readonly targets: Targets;\n} & Omit;\n\nexport type CallerMetadata = {\n // If 'caller' is specified, require that the name is given for debugging\n // messages.\n name: string;\n};\nexport type EnvSet = {\n [x: string]: T;\n};\nexport type IgnoreItem =\n | string\n | RegExp\n | ((\n path: string | undefined,\n context: { dirname: string; caller: CallerMetadata; envName: string },\n ) => unknown);\nexport type IgnoreList = ReadonlyArray;\n\nexport type PluginOptions = object | void | false;\nexport type PluginTarget = string | object | Function;\nexport type PluginItem =\n | ConfigItem\n | Plugin\n | PluginTarget\n | [PluginTarget, PluginOptions]\n | [PluginTarget, PluginOptions, string | void];\nexport type PluginList = ReadonlyArray;\n\nexport type OverridesList = Array;\nexport type ConfigApplicableTest = IgnoreItem | Array;\n\nexport type ConfigFileSearch = string | boolean;\nexport type BabelrcSearch = boolean | IgnoreItem | IgnoreList;\nexport type SourceMapsOption = boolean | \"inline\" | \"both\";\nexport type SourceTypeOption = \"module\" | \"script\" | \"unambiguous\";\nexport type CompactOption = boolean | \"auto\";\nexport type RootInputSourceMapOption = object | boolean;\nexport type RootMode = \"root\" | \"upward\" | \"upward-optional\";\n\nexport type TargetsListOrObject =\n | Targets\n | InputTargets\n | InputTargets[\"browsers\"];\n\nexport type OptionsSource =\n | \"arguments\"\n | \"configfile\"\n | \"babelrcfile\"\n | \"extendsfile\"\n | \"preset\"\n | \"plugin\";\n\nexport type RootPath = Readonly<{\n type: \"root\";\n source: OptionsSource;\n}>;\n\ntype OverridesPath = Readonly<{\n type: \"overrides\";\n index: number;\n parent: RootPath;\n}>;\n\ntype EnvPath = Readonly<{\n type: \"env\";\n name: string;\n parent: RootPath | OverridesPath;\n}>;\n\nexport type NestingPath = RootPath | OverridesPath | EnvPath;\n\nconst knownAssumptions = [\n \"arrayLikeIsIterable\",\n \"constantReexports\",\n \"constantSuper\",\n \"enumerableModuleMeta\",\n \"ignoreFunctionLength\",\n \"ignoreToPrimitiveHint\",\n \"iterableIsArray\",\n \"mutableTemplateObject\",\n \"noClassCalls\",\n \"noDocumentAll\",\n \"noIncompleteNsImportDetection\",\n \"noNewArrows\",\n \"noUninitializedPrivateFieldAccess\",\n \"objectRestNoSymbols\",\n \"privateFieldsAsSymbols\",\n \"privateFieldsAsProperties\",\n \"pureGetters\",\n \"setClassMethods\",\n \"setComputedProperties\",\n \"setPublicClassFields\",\n \"setSpreadProperties\",\n \"skipForOfIteratorClosing\",\n \"superIsCallableConstructor\",\n] as const;\nexport type AssumptionName = (typeof knownAssumptions)[number];\nexport const assumptionsNames = new Set(knownAssumptions);\n\nfunction getSource(loc: NestingPath): OptionsSource {\n return loc.type === \"root\" ? loc.source : getSource(loc.parent);\n}\n\nexport function validate(\n type: OptionsSource,\n opts: any,\n filename?: string,\n): ValidatedOptions {\n try {\n return validateNested(\n {\n type: \"root\",\n source: type,\n },\n opts,\n );\n } catch (error) {\n const configError = new ConfigError(error.message, filename);\n // @ts-expect-error TODO: .code is not defined on ConfigError or Error\n if (error.code) configError.code = error.code;\n throw configError;\n }\n}\n\nfunction validateNested(loc: NestingPath, opts: { [key: string]: unknown }) {\n const type = getSource(loc);\n\n assertNoDuplicateSourcemap(opts);\n\n Object.keys(opts).forEach((key: string) => {\n const optLoc = {\n type: \"option\",\n name: key,\n parent: loc,\n } as const;\n\n if (type === \"preset\" && NONPRESET_VALIDATORS[key]) {\n throw new Error(`${msg(optLoc)} is not allowed in preset options`);\n }\n if (type !== \"arguments\" && ROOT_VALIDATORS[key]) {\n throw new Error(\n `${msg(optLoc)} is only allowed in root programmatic options`,\n );\n }\n if (\n type !== \"arguments\" &&\n type !== \"configfile\" &&\n BABELRC_VALIDATORS[key]\n ) {\n if (type === \"babelrcfile\" || type === \"extendsfile\") {\n throw new Error(\n `${msg(\n optLoc,\n )} is not allowed in .babelrc or \"extends\"ed files, only in root programmatic options, ` +\n `or babel.config.js/config file options`,\n );\n }\n\n throw new Error(\n `${msg(\n optLoc,\n )} is only allowed in root programmatic options, or babel.config.js/config file options`,\n );\n }\n\n const validator =\n COMMON_VALIDATORS[key] ||\n NONPRESET_VALIDATORS[key] ||\n BABELRC_VALIDATORS[key] ||\n ROOT_VALIDATORS[key] ||\n (throwUnknownError as Validator);\n\n validator(optLoc, opts[key]);\n });\n\n return opts;\n}\n\nfunction throwUnknownError(loc: OptionPath) {\n const key = loc.name;\n\n if (removed[key]) {\n const { message, version = 5 } = removed[key];\n\n throw new Error(\n `Using removed Babel ${version} option: ${msg(loc)} - ${message}`,\n );\n } else {\n const unknownOptErr = new Error(\n `Unknown option: ${msg(\n loc,\n )}. Check out https://babeljs.io/docs/en/babel-core/#options for more information about options.`,\n );\n // @ts-expect-error todo(flow->ts): consider creating something like BabelConfigError with code field in it\n unknownOptErr.code = \"BABEL_UNKNOWN_OPTION\";\n\n throw unknownOptErr;\n }\n}\n\nfunction assertNoDuplicateSourcemap(opts: any): void {\n if (Object.hasOwn(opts, \"sourceMap\") && Object.hasOwn(opts, \"sourceMaps\")) {\n throw new Error(\".sourceMap is an alias for .sourceMaps, cannot use both\");\n }\n}\n\nfunction assertEnvSet(\n loc: OptionPath,\n value: unknown,\n): void | EnvSet {\n if (loc.parent.type === \"env\") {\n throw new Error(`${msg(loc)} is not allowed inside of another .env block`);\n }\n const parent: RootPath | OverridesPath = loc.parent;\n\n const obj = assertObject(loc, value);\n if (obj) {\n // Validate but don't copy the .env object in order to preserve\n // object identity for use during config chain processing.\n for (const envName of Object.keys(obj)) {\n const env = assertObject(access(loc, envName), obj[envName]);\n if (!env) continue;\n\n const envLoc = {\n type: \"env\",\n name: envName,\n parent,\n } as const;\n validateNested(envLoc, env);\n }\n }\n return obj;\n}\n\nfunction assertOverridesList(\n loc: OptionPath,\n value: unknown[],\n): undefined | OverridesList {\n if (loc.parent.type === \"env\") {\n throw new Error(`${msg(loc)} is not allowed inside an .env block`);\n }\n if (loc.parent.type === \"overrides\") {\n throw new Error(`${msg(loc)} is not allowed inside an .overrides block`);\n }\n const parent: RootPath = loc.parent;\n\n const arr = assertArray(loc, value);\n if (arr) {\n for (const [index, item] of arr.entries()) {\n const objLoc = access(loc, index);\n const env = assertObject(objLoc, item);\n if (!env) throw new Error(`${msg(objLoc)} must be an object`);\n\n const overridesLoc = {\n type: \"overrides\",\n index,\n parent,\n } as const;\n validateNested(overridesLoc, env);\n }\n }\n return arr as OverridesList;\n}\n\nexport function checkNoUnwrappedItemOptionPairs(\n items: Array>,\n index: number,\n type: \"plugin\" | \"preset\",\n e: Error,\n): void {\n if (index === 0) return;\n\n const lastItem = items[index - 1];\n const thisItem = items[index];\n\n if (\n lastItem.file &&\n lastItem.options === undefined &&\n typeof thisItem.value === \"object\"\n ) {\n e.message +=\n `\\n- Maybe you meant to use\\n` +\n `\"${type}s\": [\\n [\"${lastItem.file.request}\", ${JSON.stringify(\n thisItem.value,\n undefined,\n 2,\n )}]\\n]\\n` +\n `To be a valid ${type}, its name and options should be wrapped in a pair of brackets`;\n }\n}\n","import path from \"path\";\n\nconst sep = `\\\\${path.sep}`;\nconst endSep = `(?:${sep}|$)`;\n\nconst substitution = `[^${sep}]+`;\n\nconst starPat = `(?:${substitution}${sep})`;\nconst starPatLast = `(?:${substitution}${endSep})`;\n\nconst starStarPat = `${starPat}*?`;\nconst starStarPatLast = `${starPat}*?${starPatLast}?`;\n\nfunction escapeRegExp(string: string) {\n return string.replace(/[|\\\\{}()[\\]^$+*?.]/g, \"\\\\$&\");\n}\n\n/**\n * Implement basic pattern matching that will allow users to do the simple\n * tests with * and **. If users want full complex pattern matching, then can\n * always use regex matching, or function validation.\n */\nexport default function pathToPattern(\n pattern: string,\n dirname: string,\n): RegExp {\n const parts = path.resolve(dirname, pattern).split(path.sep);\n\n return new RegExp(\n [\n \"^\",\n ...parts.map((part, i) => {\n const last = i === parts.length - 1;\n\n // ** matches 0 or more path parts.\n if (part === \"**\") return last ? starStarPatLast : starStarPat;\n\n // * matches 1 path part.\n if (part === \"*\") return last ? starPatLast : starPat;\n\n // *.ext matches a wildcard with an extension.\n if (part.indexOf(\"*.\") === 0) {\n return (\n substitution + escapeRegExp(part.slice(1)) + (last ? endSep : sep)\n );\n }\n\n // Otherwise match the pattern text.\n return escapeRegExp(part) + (last ? endSep : sep);\n }),\n ].join(\"\"),\n );\n}\n","import gensync from \"gensync\";\n\nimport type { Handler } from \"gensync\";\n\nimport type {\n OptionsAndDescriptors,\n UnloadedDescriptor,\n} from \"./config-descriptors.ts\";\n\n// todo: Use flow enums when @babel/transform-flow-types supports it\nexport const ChainFormatter = {\n Programmatic: 0,\n Config: 1,\n};\n\ntype PrintableConfig = {\n content: OptionsAndDescriptors;\n type: (typeof ChainFormatter)[keyof typeof ChainFormatter];\n callerName: string | undefined | null;\n filepath: string | undefined | null;\n index: number | undefined | null;\n envName: string | undefined | null;\n};\n\nconst Formatter = {\n title(\n type: (typeof ChainFormatter)[keyof typeof ChainFormatter],\n callerName?: string | null,\n filepath?: string | null,\n ): string {\n let title = \"\";\n if (type === ChainFormatter.Programmatic) {\n title = \"programmatic options\";\n if (callerName) {\n title += \" from \" + callerName;\n }\n } else {\n title = \"config \" + filepath;\n }\n return title;\n },\n loc(index?: number | null, envName?: string | null): string {\n let loc = \"\";\n if (index != null) {\n loc += `.overrides[${index}]`;\n }\n if (envName != null) {\n loc += `.env[\"${envName}\"]`;\n }\n return loc;\n },\n\n *optionsAndDescriptors(opt: OptionsAndDescriptors) {\n const content = { ...opt.options };\n // overrides and env will be printed as separated config items\n delete content.overrides;\n delete content.env;\n // resolve to descriptors\n const pluginDescriptors = [...(yield* opt.plugins())];\n if (pluginDescriptors.length) {\n content.plugins = pluginDescriptors.map(d => descriptorToConfig(d));\n }\n const presetDescriptors = [...(yield* opt.presets())];\n if (presetDescriptors.length) {\n content.presets = [...presetDescriptors].map(d => descriptorToConfig(d));\n }\n return JSON.stringify(content, undefined, 2);\n },\n};\n\nfunction descriptorToConfig(\n d: UnloadedDescriptor,\n): object | string | [string, unknown] | [string, unknown, string] {\n let name: object | string = d.file?.request;\n if (name == null) {\n if (typeof d.value === \"object\") {\n name = d.value;\n } else if (typeof d.value === \"function\") {\n // If the unloaded descriptor is a function, i.e. `plugins: [ require(\"my-plugin\") ]`,\n // we print the first 50 characters of the function source code and hopefully we can see\n // `name: 'my-plugin'` in the source\n name = `[Function: ${d.value.toString().slice(0, 50)} ... ]`;\n }\n }\n if (name == null) {\n name = \"[Unknown]\";\n }\n if (d.options === undefined) {\n return name;\n } else if (d.name == null) {\n return [name, d.options];\n } else {\n return [name, d.options, d.name];\n }\n}\n\nexport class ConfigPrinter {\n _stack: Array = [];\n configure(\n enabled: boolean,\n type: (typeof ChainFormatter)[keyof typeof ChainFormatter],\n {\n callerName,\n filepath,\n }: {\n callerName?: string;\n filepath?: string;\n },\n ) {\n if (!enabled) return () => {};\n return (\n content: OptionsAndDescriptors,\n index?: number | null,\n envName?: string | null,\n ) => {\n this._stack.push({\n type,\n callerName,\n filepath,\n content,\n index,\n envName,\n });\n };\n }\n static *format(config: PrintableConfig): Handler {\n let title = Formatter.title(\n config.type,\n config.callerName,\n config.filepath,\n );\n const loc = Formatter.loc(config.index, config.envName);\n if (loc) title += ` ${loc}`;\n const content = yield* Formatter.optionsAndDescriptors(config.content);\n return `${title}\\n${content}`;\n }\n\n *output(): Handler {\n if (this._stack.length === 0) return \"\";\n const configs = yield* gensync.all(\n this._stack.map(s => ConfigPrinter.format(s)),\n );\n return configs.join(\"\\n\\n\");\n }\n}\n","/* eslint-disable @typescript-eslint/no-use-before-define */\n\nimport path from \"path\";\nimport buildDebug from \"debug\";\nimport type { Handler } from \"gensync\";\nimport { validate } from \"./validation/options.ts\";\nimport type {\n ValidatedOptions,\n IgnoreList,\n ConfigApplicableTest,\n BabelrcSearch,\n CallerMetadata,\n IgnoreItem,\n} from \"./validation/options.ts\";\nimport pathPatternToRegex from \"./pattern-to-regex.ts\";\nimport { ConfigPrinter, ChainFormatter } from \"./printer.ts\";\nimport type { ReadonlyDeepArray } from \"./helpers/deep-array.ts\";\n\nimport { endHiddenCallStack } from \"../errors/rewrite-stack-trace.ts\";\nimport ConfigError from \"../errors/config-error.ts\";\nimport type { PluginAPI, PresetAPI } from \"./helpers/config-api.ts\";\n\nconst debug = buildDebug(\"babel:config:config-chain\");\n\nimport {\n findPackageData,\n findRelativeConfig,\n findRootConfig,\n loadConfig,\n} from \"./files/index.ts\";\nimport type { ConfigFile, IgnoreFile, FilePackageData } from \"./files/index.ts\";\n\nimport { makeWeakCacheSync, makeStrongCacheSync } from \"./caching.ts\";\n\nimport {\n createCachedDescriptors,\n createUncachedDescriptors,\n} from \"./config-descriptors.ts\";\nimport type {\n UnloadedDescriptor,\n OptionsAndDescriptors,\n ValidatedFile,\n} from \"./config-descriptors.ts\";\n\nexport type ConfigChain = {\n plugins: Array>;\n presets: Array>;\n options: Array;\n files: Set;\n};\n\nexport type PresetInstance = {\n options: ValidatedOptions;\n alias: string;\n dirname: string;\n externalDependencies: ReadonlyDeepArray;\n};\n\nexport type ConfigContext = {\n filename: string | undefined;\n cwd: string;\n root: string;\n envName: string;\n caller: CallerMetadata | undefined;\n showConfig: boolean;\n};\n\n/**\n * Build a config chain for a given preset.\n */\nexport function* buildPresetChain(\n arg: PresetInstance,\n context: any,\n): Handler {\n const chain = yield* buildPresetChainWalker(arg, context);\n if (!chain) return null;\n\n return {\n plugins: dedupDescriptors(chain.plugins),\n presets: dedupDescriptors(chain.presets),\n options: chain.options.map(o => normalizeOptions(o)),\n files: new Set(),\n };\n}\n\nexport const buildPresetChainWalker = makeChainWalker({\n root: preset => loadPresetDescriptors(preset),\n env: (preset, envName) => loadPresetEnvDescriptors(preset)(envName),\n overrides: (preset, index) => loadPresetOverridesDescriptors(preset)(index),\n overridesEnv: (preset, index, envName) =>\n loadPresetOverridesEnvDescriptors(preset)(index)(envName),\n createLogger: () => () => {}, // Currently we don't support logging how preset is expanded\n});\nconst loadPresetDescriptors = makeWeakCacheSync((preset: PresetInstance) =>\n buildRootDescriptors(preset, preset.alias, createUncachedDescriptors),\n);\nconst loadPresetEnvDescriptors = makeWeakCacheSync((preset: PresetInstance) =>\n makeStrongCacheSync((envName: string) =>\n buildEnvDescriptors(\n preset,\n preset.alias,\n createUncachedDescriptors,\n envName,\n ),\n ),\n);\nconst loadPresetOverridesDescriptors = makeWeakCacheSync(\n (preset: PresetInstance) =>\n makeStrongCacheSync((index: number) =>\n buildOverrideDescriptors(\n preset,\n preset.alias,\n createUncachedDescriptors,\n index,\n ),\n ),\n);\nconst loadPresetOverridesEnvDescriptors = makeWeakCacheSync(\n (preset: PresetInstance) =>\n makeStrongCacheSync((index: number) =>\n makeStrongCacheSync((envName: string) =>\n buildOverrideEnvDescriptors(\n preset,\n preset.alias,\n createUncachedDescriptors,\n index,\n envName,\n ),\n ),\n ),\n);\n\nexport type FileHandling = \"transpile\" | \"ignored\" | \"unsupported\";\nexport type RootConfigChain = ConfigChain & {\n babelrc: ConfigFile | void;\n config: ConfigFile | void;\n ignore: IgnoreFile | void;\n fileHandling: FileHandling;\n files: Set;\n};\n\n/**\n * Build a config chain for Babel's full root configuration.\n */\nexport function* buildRootChain(\n opts: ValidatedOptions,\n context: ConfigContext,\n): Handler {\n let configReport, babelRcReport;\n const programmaticLogger = new ConfigPrinter();\n const programmaticChain = yield* loadProgrammaticChain(\n {\n options: opts,\n dirname: context.cwd,\n },\n context,\n undefined,\n programmaticLogger,\n );\n if (!programmaticChain) return null;\n const programmaticReport = yield* programmaticLogger.output();\n\n let configFile;\n if (typeof opts.configFile === \"string\") {\n configFile = yield* loadConfig(\n opts.configFile,\n context.cwd,\n context.envName,\n context.caller,\n );\n } else if (opts.configFile !== false) {\n configFile = yield* findRootConfig(\n context.root,\n context.envName,\n context.caller,\n );\n }\n\n let { babelrc, babelrcRoots } = opts;\n let babelrcRootsDirectory = context.cwd;\n\n const configFileChain = emptyChain();\n const configFileLogger = new ConfigPrinter();\n if (configFile) {\n const validatedFile = validateConfigFile(configFile);\n const result = yield* loadFileChain(\n validatedFile,\n context,\n undefined,\n configFileLogger,\n );\n if (!result) return null;\n configReport = yield* configFileLogger.output();\n\n // Allow config files to toggle `.babelrc` resolution on and off and\n // specify where the roots are.\n if (babelrc === undefined) {\n babelrc = validatedFile.options.babelrc;\n }\n if (babelrcRoots === undefined) {\n babelrcRootsDirectory = validatedFile.dirname;\n babelrcRoots = validatedFile.options.babelrcRoots;\n }\n\n mergeChain(configFileChain, result);\n }\n\n let ignoreFile, babelrcFile;\n let isIgnored = false;\n const fileChain = emptyChain();\n // resolve all .babelrc files\n if (\n (babelrc === true || babelrc === undefined) &&\n typeof context.filename === \"string\"\n ) {\n const pkgData = yield* findPackageData(context.filename);\n\n if (\n pkgData &&\n babelrcLoadEnabled(context, pkgData, babelrcRoots, babelrcRootsDirectory)\n ) {\n ({ ignore: ignoreFile, config: babelrcFile } = yield* findRelativeConfig(\n pkgData,\n context.envName,\n context.caller,\n ));\n\n if (ignoreFile) {\n fileChain.files.add(ignoreFile.filepath);\n }\n\n if (\n ignoreFile &&\n shouldIgnore(context, ignoreFile.ignore, null, ignoreFile.dirname)\n ) {\n isIgnored = true;\n }\n\n if (babelrcFile && !isIgnored) {\n const validatedFile = validateBabelrcFile(babelrcFile);\n const babelrcLogger = new ConfigPrinter();\n const result = yield* loadFileChain(\n validatedFile,\n context,\n undefined,\n babelrcLogger,\n );\n if (!result) {\n isIgnored = true;\n } else {\n babelRcReport = yield* babelrcLogger.output();\n mergeChain(fileChain, result);\n }\n }\n\n if (babelrcFile && isIgnored) {\n fileChain.files.add(babelrcFile.filepath);\n }\n }\n }\n\n if (context.showConfig) {\n console.log(\n `Babel configs on \"${context.filename}\" (ascending priority):\\n` +\n // print config by the order of ascending priority\n [configReport, babelRcReport, programmaticReport]\n .filter(x => !!x)\n .join(\"\\n\\n\") +\n \"\\n-----End Babel configs-----\",\n );\n }\n // Insert file chain in front so programmatic options have priority\n // over configuration file chain items.\n const chain = mergeChain(\n mergeChain(mergeChain(emptyChain(), configFileChain), fileChain),\n programmaticChain,\n );\n\n return {\n plugins: isIgnored ? [] : dedupDescriptors(chain.plugins),\n presets: isIgnored ? [] : dedupDescriptors(chain.presets),\n options: isIgnored ? [] : chain.options.map(o => normalizeOptions(o)),\n fileHandling: isIgnored ? \"ignored\" : \"transpile\",\n ignore: ignoreFile || undefined,\n babelrc: babelrcFile || undefined,\n config: configFile || undefined,\n files: chain.files,\n };\n}\n\nfunction babelrcLoadEnabled(\n context: ConfigContext,\n pkgData: FilePackageData,\n babelrcRoots: BabelrcSearch | undefined,\n babelrcRootsDirectory: string,\n): boolean {\n if (typeof babelrcRoots === \"boolean\") return babelrcRoots;\n\n const absoluteRoot = context.root;\n\n // Fast path to avoid having to match patterns if the babelrc is just\n // loading in the standard root directory.\n if (babelrcRoots === undefined) {\n return pkgData.directories.includes(absoluteRoot);\n }\n\n let babelrcPatterns = babelrcRoots;\n if (!Array.isArray(babelrcPatterns)) {\n babelrcPatterns = [babelrcPatterns as IgnoreItem];\n }\n babelrcPatterns = babelrcPatterns.map(pat => {\n return typeof pat === \"string\"\n ? path.resolve(babelrcRootsDirectory, pat)\n : pat;\n });\n\n // Fast path to avoid having to match patterns if the babelrc is just\n // loading in the standard root directory.\n if (babelrcPatterns.length === 1 && babelrcPatterns[0] === absoluteRoot) {\n return pkgData.directories.includes(absoluteRoot);\n }\n\n return babelrcPatterns.some(pat => {\n if (typeof pat === \"string\") {\n pat = pathPatternToRegex(pat, babelrcRootsDirectory);\n }\n\n return pkgData.directories.some(directory => {\n return matchPattern(pat, babelrcRootsDirectory, directory, context);\n });\n });\n}\n\nconst validateConfigFile = makeWeakCacheSync(\n (file: ConfigFile): ValidatedFile => ({\n filepath: file.filepath,\n dirname: file.dirname,\n options: validate(\"configfile\", file.options, file.filepath),\n }),\n);\n\nconst validateBabelrcFile = makeWeakCacheSync(\n (file: ConfigFile): ValidatedFile => ({\n filepath: file.filepath,\n dirname: file.dirname,\n options: validate(\"babelrcfile\", file.options, file.filepath),\n }),\n);\n\nconst validateExtendFile = makeWeakCacheSync(\n (file: ConfigFile): ValidatedFile => ({\n filepath: file.filepath,\n dirname: file.dirname,\n options: validate(\"extendsfile\", file.options, file.filepath),\n }),\n);\n\n/**\n * Build a config chain for just the programmatic options passed into Babel.\n */\nconst loadProgrammaticChain = makeChainWalker({\n root: input => buildRootDescriptors(input, \"base\", createCachedDescriptors),\n env: (input, envName) =>\n buildEnvDescriptors(input, \"base\", createCachedDescriptors, envName),\n overrides: (input, index) =>\n buildOverrideDescriptors(input, \"base\", createCachedDescriptors, index),\n overridesEnv: (input, index, envName) =>\n buildOverrideEnvDescriptors(\n input,\n \"base\",\n createCachedDescriptors,\n index,\n envName,\n ),\n createLogger: (input, context, baseLogger) =>\n buildProgrammaticLogger(input, context, baseLogger),\n});\n\n/**\n * Build a config chain for a given file.\n */\nconst loadFileChainWalker = makeChainWalker({\n root: file => loadFileDescriptors(file),\n env: (file, envName) => loadFileEnvDescriptors(file)(envName),\n overrides: (file, index) => loadFileOverridesDescriptors(file)(index),\n overridesEnv: (file, index, envName) =>\n loadFileOverridesEnvDescriptors(file)(index)(envName),\n createLogger: (file, context, baseLogger) =>\n buildFileLogger(file.filepath, context, baseLogger),\n});\n\nfunction* loadFileChain(\n input: ValidatedFile,\n context: ConfigContext,\n files: Set,\n baseLogger: ConfigPrinter,\n) {\n const chain = yield* loadFileChainWalker(input, context, files, baseLogger);\n chain?.files.add(input.filepath);\n\n return chain;\n}\n\nconst loadFileDescriptors = makeWeakCacheSync((file: ValidatedFile) =>\n buildRootDescriptors(file, file.filepath, createUncachedDescriptors),\n);\nconst loadFileEnvDescriptors = makeWeakCacheSync((file: ValidatedFile) =>\n makeStrongCacheSync((envName: string) =>\n buildEnvDescriptors(\n file,\n file.filepath,\n createUncachedDescriptors,\n envName,\n ),\n ),\n);\nconst loadFileOverridesDescriptors = makeWeakCacheSync((file: ValidatedFile) =>\n makeStrongCacheSync((index: number) =>\n buildOverrideDescriptors(\n file,\n file.filepath,\n createUncachedDescriptors,\n index,\n ),\n ),\n);\nconst loadFileOverridesEnvDescriptors = makeWeakCacheSync(\n (file: ValidatedFile) =>\n makeStrongCacheSync((index: number) =>\n makeStrongCacheSync((envName: string) =>\n buildOverrideEnvDescriptors(\n file,\n file.filepath,\n createUncachedDescriptors,\n index,\n envName,\n ),\n ),\n ),\n);\n\nfunction buildFileLogger(\n filepath: string,\n context: ConfigContext,\n baseLogger: ConfigPrinter | void,\n) {\n if (!baseLogger) {\n return () => {};\n }\n return baseLogger.configure(context.showConfig, ChainFormatter.Config, {\n filepath,\n });\n}\n\nfunction buildRootDescriptors(\n { dirname, options }: Partial,\n alias: string,\n descriptors: (\n dirname: string,\n options: ValidatedOptions,\n alias: string,\n ) => OptionsAndDescriptors,\n) {\n return descriptors(dirname, options, alias);\n}\n\nfunction buildProgrammaticLogger(\n _: unknown,\n context: ConfigContext,\n baseLogger: ConfigPrinter | void,\n) {\n if (!baseLogger) {\n return () => {};\n }\n return baseLogger.configure(context.showConfig, ChainFormatter.Programmatic, {\n callerName: context.caller?.name,\n });\n}\n\nfunction buildEnvDescriptors(\n { dirname, options }: Partial,\n alias: string,\n descriptors: (\n dirname: string,\n options: ValidatedOptions,\n alias: string,\n ) => OptionsAndDescriptors,\n envName: string,\n) {\n const opts = options.env?.[envName];\n return opts ? descriptors(dirname, opts, `${alias}.env[\"${envName}\"]`) : null;\n}\n\nfunction buildOverrideDescriptors(\n { dirname, options }: Partial,\n alias: string,\n descriptors: (\n dirname: string,\n options: ValidatedOptions,\n alias: string,\n ) => OptionsAndDescriptors,\n index: number,\n) {\n const opts = options.overrides?.[index];\n if (!opts) throw new Error(\"Assertion failure - missing override\");\n\n return descriptors(dirname, opts, `${alias}.overrides[${index}]`);\n}\n\nfunction buildOverrideEnvDescriptors(\n { dirname, options }: Partial,\n alias: string,\n descriptors: (\n dirname: string,\n options: ValidatedOptions,\n alias: string,\n ) => OptionsAndDescriptors,\n index: number,\n envName: string,\n) {\n const override = options.overrides?.[index];\n if (!override) throw new Error(\"Assertion failure - missing override\");\n\n const opts = override.env?.[envName];\n return opts\n ? descriptors(\n dirname,\n opts,\n `${alias}.overrides[${index}].env[\"${envName}\"]`,\n )\n : null;\n}\n\nfunction makeChainWalker<\n ArgT extends {\n options: ValidatedOptions;\n dirname: string;\n filepath?: string;\n },\n>({\n root,\n env,\n overrides,\n overridesEnv,\n createLogger,\n}: {\n root: (configEntry: ArgT) => OptionsAndDescriptors;\n env: (configEntry: ArgT, env: string) => OptionsAndDescriptors | null;\n overrides: (configEntry: ArgT, index: number) => OptionsAndDescriptors;\n overridesEnv: (\n configEntry: ArgT,\n index: number,\n env: string,\n ) => OptionsAndDescriptors | null;\n createLogger: (\n configEntry: ArgT,\n context: ConfigContext,\n printer: ConfigPrinter | void,\n ) => (\n opts: OptionsAndDescriptors,\n index?: number | null,\n env?: string | null,\n ) => void;\n}): (\n configEntry: ArgT,\n context: ConfigContext,\n files?: Set,\n baseLogger?: ConfigPrinter,\n) => Handler {\n return function* chainWalker(input, context, files = new Set(), baseLogger) {\n const { dirname } = input;\n\n const flattenedConfigs: Array<{\n config: OptionsAndDescriptors;\n index: number | undefined | null;\n envName: string | undefined | null;\n }> = [];\n\n const rootOpts = root(input);\n if (configIsApplicable(rootOpts, dirname, context, input.filepath)) {\n flattenedConfigs.push({\n config: rootOpts,\n envName: undefined,\n index: undefined,\n });\n\n const envOpts = env(input, context.envName);\n if (\n envOpts &&\n configIsApplicable(envOpts, dirname, context, input.filepath)\n ) {\n flattenedConfigs.push({\n config: envOpts,\n envName: context.envName,\n index: undefined,\n });\n }\n\n (rootOpts.options.overrides || []).forEach((_, index) => {\n const overrideOps = overrides(input, index);\n if (configIsApplicable(overrideOps, dirname, context, input.filepath)) {\n flattenedConfigs.push({\n config: overrideOps,\n index,\n envName: undefined,\n });\n\n const overrideEnvOpts = overridesEnv(input, index, context.envName);\n if (\n overrideEnvOpts &&\n configIsApplicable(\n overrideEnvOpts,\n dirname,\n context,\n input.filepath,\n )\n ) {\n flattenedConfigs.push({\n config: overrideEnvOpts,\n index,\n envName: context.envName,\n });\n }\n }\n });\n }\n\n // Process 'ignore' and 'only' before 'extends' items are processed so\n // that we don't do extra work loading extended configs if a file is\n // ignored.\n if (\n flattenedConfigs.some(\n ({\n config: {\n options: { ignore, only },\n },\n }) => shouldIgnore(context, ignore, only, dirname),\n )\n ) {\n return null;\n }\n\n const chain = emptyChain();\n const logger = createLogger(input, context, baseLogger);\n\n for (const { config, index, envName } of flattenedConfigs) {\n if (\n !(yield* mergeExtendsChain(\n chain,\n config.options,\n dirname,\n context,\n files,\n baseLogger,\n ))\n ) {\n return null;\n }\n\n logger(config, index, envName);\n yield* mergeChainOpts(chain, config);\n }\n return chain;\n };\n}\n\nfunction* mergeExtendsChain(\n chain: ConfigChain,\n opts: ValidatedOptions,\n dirname: string,\n context: ConfigContext,\n files: Set,\n baseLogger?: ConfigPrinter,\n): Handler {\n if (opts.extends === undefined) return true;\n\n const file = yield* loadConfig(\n opts.extends,\n dirname,\n context.envName,\n context.caller,\n );\n\n if (files.has(file)) {\n throw new Error(\n `Configuration cycle detected loading ${file.filepath}.\\n` +\n `File already loaded following the config chain:\\n` +\n Array.from(files, file => ` - ${file.filepath}`).join(\"\\n\"),\n );\n }\n\n files.add(file);\n const fileChain = yield* loadFileChain(\n validateExtendFile(file),\n context,\n files,\n baseLogger,\n );\n files.delete(file);\n\n if (!fileChain) return false;\n\n mergeChain(chain, fileChain);\n\n return true;\n}\n\nfunction mergeChain(target: ConfigChain, source: ConfigChain): ConfigChain {\n target.options.push(...source.options);\n target.plugins.push(...source.plugins);\n target.presets.push(...source.presets);\n for (const file of source.files) {\n target.files.add(file);\n }\n\n return target;\n}\n\nfunction* mergeChainOpts(\n target: ConfigChain,\n { options, plugins, presets }: OptionsAndDescriptors,\n): Handler {\n target.options.push(options);\n target.plugins.push(...(yield* plugins()));\n target.presets.push(...(yield* presets()));\n\n return target;\n}\n\nfunction emptyChain(): ConfigChain {\n return {\n options: [],\n presets: [],\n plugins: [],\n files: new Set(),\n };\n}\n\nfunction normalizeOptions(opts: ValidatedOptions): ValidatedOptions {\n const options = {\n ...opts,\n };\n delete options.extends;\n delete options.env;\n delete options.overrides;\n delete options.plugins;\n delete options.presets;\n delete options.passPerPreset;\n delete options.ignore;\n delete options.only;\n delete options.test;\n delete options.include;\n delete options.exclude;\n\n // \"sourceMap\" is just aliased to sourceMap, so copy it over as\n // we merge the options together.\n if (Object.hasOwn(options, \"sourceMap\")) {\n options.sourceMaps = options.sourceMap;\n delete options.sourceMap;\n }\n return options;\n}\n\nfunction dedupDescriptors(\n items: Array>,\n): Array> {\n const map: Map<\n Function,\n Map }>\n > = new Map();\n\n const descriptors = [];\n\n for (const item of items) {\n if (typeof item.value === \"function\") {\n const fnKey = item.value;\n let nameMap = map.get(fnKey);\n if (!nameMap) {\n nameMap = new Map();\n map.set(fnKey, nameMap);\n }\n let desc = nameMap.get(item.name);\n if (!desc) {\n desc = { value: item };\n descriptors.push(desc);\n\n // Treat passPerPreset presets as unique, skipping them\n // in the merge processing steps.\n if (!item.ownPass) nameMap.set(item.name, desc);\n } else {\n desc.value = item;\n }\n } else {\n descriptors.push({ value: item });\n }\n }\n\n return descriptors.reduce((acc, desc) => {\n acc.push(desc.value);\n return acc;\n }, []);\n}\n\nfunction configIsApplicable(\n { options }: OptionsAndDescriptors,\n dirname: string,\n context: ConfigContext,\n configName: string,\n): boolean {\n return (\n (options.test === undefined ||\n configFieldIsApplicable(context, options.test, dirname, configName)) &&\n (options.include === undefined ||\n configFieldIsApplicable(context, options.include, dirname, configName)) &&\n (options.exclude === undefined ||\n !configFieldIsApplicable(context, options.exclude, dirname, configName))\n );\n}\n\nfunction configFieldIsApplicable(\n context: ConfigContext,\n test: ConfigApplicableTest,\n dirname: string,\n configName: string,\n): boolean {\n const patterns = Array.isArray(test) ? test : [test];\n\n return matchesPatterns(context, patterns, dirname, configName);\n}\n\n/**\n * Print the ignoreList-values in a more helpful way than the default.\n */\nfunction ignoreListReplacer(\n _key: string,\n value: IgnoreList | IgnoreItem,\n): IgnoreList | IgnoreItem | string {\n if (value instanceof RegExp) {\n return String(value);\n }\n\n return value;\n}\n\n/**\n * Tests if a filename should be ignored based on \"ignore\" and \"only\" options.\n */\nfunction shouldIgnore(\n context: ConfigContext,\n ignore: IgnoreList | undefined | null,\n only: IgnoreList | undefined | null,\n dirname: string,\n): boolean {\n if (ignore && matchesPatterns(context, ignore, dirname)) {\n const message = `No config is applied to \"${\n context.filename ?? \"(unknown)\"\n }\" because it matches one of \\`ignore: ${JSON.stringify(\n ignore,\n ignoreListReplacer,\n )}\\` from \"${dirname}\"`;\n debug(message);\n if (context.showConfig) {\n console.log(message);\n }\n return true;\n }\n\n if (only && !matchesPatterns(context, only, dirname)) {\n const message = `No config is applied to \"${\n context.filename ?? \"(unknown)\"\n }\" because it fails to match one of \\`only: ${JSON.stringify(\n only,\n ignoreListReplacer,\n )}\\` from \"${dirname}\"`;\n debug(message);\n if (context.showConfig) {\n console.log(message);\n }\n return true;\n }\n\n return false;\n}\n\n/**\n * Returns result of calling function with filename if pattern is a function.\n * Otherwise returns result of matching pattern Regex with filename.\n */\nfunction matchesPatterns(\n context: ConfigContext,\n patterns: IgnoreList,\n dirname: string,\n configName?: string,\n): boolean {\n return patterns.some(pattern =>\n matchPattern(pattern, dirname, context.filename, context, configName),\n );\n}\n\nfunction matchPattern(\n pattern: IgnoreItem,\n dirname: string,\n pathToTest: string | undefined,\n context: ConfigContext,\n configName?: string,\n): boolean {\n if (typeof pattern === \"function\") {\n return !!endHiddenCallStack(pattern)(pathToTest, {\n dirname,\n envName: context.envName,\n caller: context.caller,\n });\n }\n\n if (typeof pathToTest !== \"string\") {\n throw new ConfigError(\n `Configuration contains string/RegExp pattern, but no filename was passed to Babel`,\n configName,\n );\n }\n\n if (typeof pattern === \"string\") {\n pattern = pathPatternToRegex(pattern, dirname);\n }\n return pattern.test(pathToTest);\n}\n","import {\n assertString,\n assertFunction,\n assertObject,\n msg,\n} from \"./option-assertions.ts\";\n\nimport type {\n ValidatorSet,\n Validator,\n OptionPath,\n RootPath,\n} from \"./option-assertions.ts\";\nimport type { ParserOptions } from \"@babel/parser\";\nimport type { Visitor } from \"@babel/traverse\";\nimport type { ValidatedOptions } from \"./options.ts\";\nimport type { File, PluginAPI, PluginPass } from \"../../index.ts\";\n\n// Note: The casts here are just meant to be static assertions to make sure\n// that the assertion functions actually assert that the value's type matches\n// the declared types.\nconst VALIDATORS: ValidatorSet = {\n name: assertString as Validator,\n manipulateOptions: assertFunction as Validator<\n PluginObject[\"manipulateOptions\"]\n >,\n pre: assertFunction as Validator,\n post: assertFunction as Validator,\n inherits: assertFunction as Validator,\n visitor: assertVisitorMap as Validator,\n\n parserOverride: assertFunction as Validator,\n generatorOverride: assertFunction as Validator<\n PluginObject[\"generatorOverride\"]\n >,\n};\n\nfunction assertVisitorMap(loc: OptionPath, value: unknown): Visitor {\n const obj = assertObject(loc, value);\n if (obj) {\n Object.keys(obj).forEach(prop => {\n if (prop !== \"_exploded\" && prop !== \"_verified\") {\n assertVisitorHandler(prop, obj[prop]);\n }\n });\n\n if (obj.enter || obj.exit) {\n throw new Error(\n `${msg(\n loc,\n )} cannot contain catch-all \"enter\" or \"exit\" handlers. Please target individual nodes.`,\n );\n }\n }\n return obj as Visitor;\n}\n\nfunction assertVisitorHandler(\n key: string,\n value: unknown,\n): asserts value is VisitorHandler {\n if (value && typeof value === \"object\") {\n Object.keys(value).forEach((handler: string) => {\n if (handler !== \"enter\" && handler !== \"exit\") {\n throw new Error(\n `.visitor[\"${key}\"] may only have .enter and/or .exit handlers.`,\n );\n }\n });\n } else if (typeof value !== \"function\") {\n throw new Error(`.visitor[\"${key}\"] must be a function`);\n }\n}\n\ntype VisitorHandler =\n | Function\n | {\n enter?: Function;\n exit?: Function;\n };\n\nexport type PluginObject = {\n name?: string;\n manipulateOptions?: (\n options: ValidatedOptions,\n parserOpts: ParserOptions,\n ) => void;\n pre?: (this: S, file: File) => void;\n post?: (this: S, file: File) => void;\n inherits?: (\n api: PluginAPI,\n options: unknown,\n dirname: string,\n ) => PluginObject;\n visitor?: Visitor;\n parserOverride?: Function;\n generatorOverride?: Function;\n};\n\nexport function validatePluginObject(obj: {\n [key: string]: unknown;\n}): PluginObject {\n const rootPath: RootPath = {\n type: \"root\",\n source: \"plugin\",\n };\n Object.keys(obj).forEach((key: string) => {\n const validator = VALIDATORS[key];\n\n if (validator) {\n const optLoc: OptionPath = {\n type: \"option\",\n name: key,\n parent: rootPath,\n };\n validator(optLoc, obj[key]);\n } else {\n const invalidPluginPropertyError = new Error(\n `.${key} is not a valid Plugin property`,\n );\n // @ts-expect-error todo(flow->ts) consider adding BabelConfigError with code field\n invalidPluginPropertyError.code = \"BABEL_UNKNOWN_PLUGIN_PROPERTY\";\n throw invalidPluginPropertyError;\n }\n });\n\n return obj as any;\n}\n","import semver from \"semver\";\nimport type { Targets } from \"@babel/helper-compilation-targets\";\n\nimport { version as coreVersion } from \"../../index.ts\";\nimport { assertSimpleType } from \"../caching.ts\";\nimport type {\n CacheConfigurator,\n SimpleCacheConfigurator,\n SimpleType,\n} from \"../caching.ts\";\n\nimport type { AssumptionName, CallerMetadata } from \"../validation/options.ts\";\n\nimport type * as Context from \"../cache-contexts\";\n\ntype EnvFunction = {\n (): string;\n (extractor: (babelEnv: string) => T): T;\n (envVar: string): boolean;\n (envVars: Array): boolean;\n};\n\ntype CallerFactory = {\n (\n extractor: (callerMetadata: CallerMetadata | undefined) => T,\n ): T;\n (\n extractor: (callerMetadata: CallerMetadata | undefined) => unknown,\n ): SimpleType;\n};\ntype TargetsFunction = () => Targets;\ntype AssumptionFunction = (name: AssumptionName) => boolean | undefined;\n\nexport type ConfigAPI = {\n version: string;\n cache: SimpleCacheConfigurator;\n env: EnvFunction;\n async: () => boolean;\n assertVersion: typeof assertVersion;\n caller?: CallerFactory;\n};\n\nexport type PresetAPI = {\n targets: TargetsFunction;\n addExternalDependency: (ref: string) => void;\n} & ConfigAPI;\n\nexport type PluginAPI = {\n assumption: AssumptionFunction;\n} & PresetAPI;\n\nexport function makeConfigAPI(\n cache: CacheConfigurator,\n): ConfigAPI {\n // TODO(@nicolo-ribaudo): If we remove the explicit type from `value`\n // and the `as any` type cast, TypeScript crashes in an infinite\n // recursion. After upgrading to TS4.7 and finishing the noImplicitAny\n // PR, we should check if it still crashes and report it to the TS team.\n const env: EnvFunction = ((\n value: string | string[] | ((babelEnv: string) => T),\n ) =>\n cache.using(data => {\n if (typeof value === \"undefined\") return data.envName;\n if (typeof value === \"function\") {\n return assertSimpleType(value(data.envName));\n }\n return (Array.isArray(value) ? value : [value]).some(entry => {\n if (typeof entry !== \"string\") {\n throw new Error(\"Unexpected non-string value\");\n }\n return entry === data.envName;\n });\n })) as any;\n\n const caller = (\n cb: (CallerMetadata: CallerMetadata | undefined) => SimpleType,\n ) => cache.using(data => assertSimpleType(cb(data.caller)));\n\n return {\n version: coreVersion,\n cache: cache.simple(),\n // Expose \".env()\" so people can easily get the same env that we expose using the \"env\" key.\n env,\n async: () => false,\n caller,\n assertVersion,\n };\n}\n\nexport function makePresetAPI(\n cache: CacheConfigurator,\n externalDependencies: Array,\n): PresetAPI {\n const targets = () =>\n // We are using JSON.parse/JSON.stringify because it's only possible to cache\n // primitive values. We can safely stringify the targets object because it\n // only contains strings as its properties.\n // Please make the Record and Tuple proposal happen!\n JSON.parse(cache.using(data => JSON.stringify(data.targets)));\n\n const addExternalDependency = (ref: string) => {\n externalDependencies.push(ref);\n };\n\n return { ...makeConfigAPI(cache), targets, addExternalDependency };\n}\n\nexport function makePluginAPI(\n cache: CacheConfigurator,\n externalDependencies: Array,\n): PluginAPI {\n const assumption = (name: string) =>\n cache.using(data => data.assumptions[name]);\n\n return { ...makePresetAPI(cache, externalDependencies), assumption };\n}\n\nfunction assertVersion(range: string | number): void {\n if (typeof range === \"number\") {\n if (!Number.isInteger(range)) {\n throw new Error(\"Expected string or integer value.\");\n }\n range = `^${range}.0.0-0`;\n }\n if (typeof range !== \"string\") {\n throw new Error(\"Expected string or integer value.\");\n }\n\n // We want \"*\" to also allow any pre-release, but we do not pass\n // the includePrerelease option to semver.satisfies because we\n // do not want ^7.0.0 to match 8.0.0-alpha.1.\n if (range === \"*\" || semver.satisfies(coreVersion, range)) return;\n\n const limit = Error.stackTraceLimit;\n\n if (typeof limit === \"number\" && limit < 25) {\n // Bump up the limit if needed so that users are more likely\n // to be able to see what is calling Babel.\n Error.stackTraceLimit = 25;\n }\n\n const err = new Error(\n `Requires Babel \"${range}\", but was loaded with \"${coreVersion}\". ` +\n `If you are sure you have a compatible version of @babel/core, ` +\n `it is likely that something in your build process is loading the ` +\n `wrong version. Inspect the stack trace of this error to look for ` +\n `the first entry that doesn't mention \"@babel/core\" or \"babel-core\" ` +\n `to see what is calling Babel.`,\n );\n\n if (typeof limit === \"number\") {\n Error.stackTraceLimit = limit;\n }\n\n throw Object.assign(err, {\n code: \"BABEL_VERSION_UNSUPPORTED\",\n version: coreVersion,\n range,\n });\n}\n","import path from \"path\";\nimport type { Handler } from \"gensync\";\nimport Plugin from \"./plugin.ts\";\nimport { mergeOptions } from \"./util.ts\";\nimport { createItemFromDescriptor } from \"./item.ts\";\nimport { buildRootChain } from \"./config-chain.ts\";\nimport type { ConfigContext, FileHandling } from \"./config-chain.ts\";\nimport { getEnv } from \"./helpers/environment.ts\";\nimport { validate } from \"./validation/options.ts\";\n\nimport type {\n ValidatedOptions,\n NormalizedOptions,\n RootMode,\n} from \"./validation/options.ts\";\n\nimport {\n findConfigUpwards,\n resolveShowConfigPath,\n ROOT_CONFIG_FILENAMES,\n} from \"./files/index.ts\";\nimport type { ConfigFile, IgnoreFile } from \"./files/index.ts\";\nimport { resolveTargets } from \"./resolve-targets.ts\";\n\nfunction resolveRootMode(rootDir: string, rootMode: RootMode): string {\n switch (rootMode) {\n case \"root\":\n return rootDir;\n\n case \"upward-optional\": {\n const upwardRootDir = findConfigUpwards(rootDir);\n return upwardRootDir === null ? rootDir : upwardRootDir;\n }\n\n case \"upward\": {\n const upwardRootDir = findConfigUpwards(rootDir);\n if (upwardRootDir !== null) return upwardRootDir;\n\n throw Object.assign(\n new Error(\n `Babel was run with rootMode:\"upward\" but a root could not ` +\n `be found when searching upward from \"${rootDir}\".\\n` +\n `One of the following config files must be in the directory tree: ` +\n `\"${ROOT_CONFIG_FILENAMES.join(\", \")}\".`,\n ) as any,\n {\n code: \"BABEL_ROOT_NOT_FOUND\",\n dirname: rootDir,\n },\n );\n }\n default:\n throw new Error(`Assertion failure - unknown rootMode value.`);\n }\n}\n\ntype PrivPartialConfig = {\n options: NormalizedOptions;\n context: ConfigContext;\n fileHandling: FileHandling;\n ignore: IgnoreFile | void;\n babelrc: ConfigFile | void;\n config: ConfigFile | void;\n files: Set;\n};\n\nexport default function* loadPrivatePartialConfig(\n inputOpts: unknown,\n): Handler {\n if (\n inputOpts != null &&\n (typeof inputOpts !== \"object\" || Array.isArray(inputOpts))\n ) {\n throw new Error(\"Babel options must be an object, null, or undefined\");\n }\n\n const args = inputOpts ? validate(\"arguments\", inputOpts) : {};\n\n const {\n envName = getEnv(),\n cwd = \".\",\n root: rootDir = \".\",\n rootMode = \"root\",\n caller,\n cloneInputAst = true,\n } = args;\n const absoluteCwd = path.resolve(cwd);\n const absoluteRootDir = resolveRootMode(\n path.resolve(absoluteCwd, rootDir),\n rootMode,\n );\n\n const filename =\n typeof args.filename === \"string\"\n ? path.resolve(cwd, args.filename)\n : undefined;\n\n const showConfigPath = yield* resolveShowConfigPath(absoluteCwd);\n\n const context: ConfigContext = {\n filename,\n cwd: absoluteCwd,\n root: absoluteRootDir,\n envName,\n caller,\n showConfig: showConfigPath === filename,\n };\n\n const configChain = yield* buildRootChain(args, context);\n if (!configChain) return null;\n\n const merged: ValidatedOptions = {\n assumptions: {},\n };\n configChain.options.forEach(opts => {\n mergeOptions(merged as any, opts);\n });\n\n const options: NormalizedOptions = {\n ...merged,\n targets: resolveTargets(merged, absoluteRootDir),\n\n // Tack the passes onto the object itself so that, if this object is\n // passed back to Babel a second time, it will be in the right structure\n // to not change behavior.\n cloneInputAst,\n babelrc: false,\n configFile: false,\n browserslistConfigFile: false,\n passPerPreset: false,\n envName: context.envName,\n cwd: context.cwd,\n root: context.root,\n rootMode: \"root\",\n filename:\n typeof context.filename === \"string\" ? context.filename : undefined,\n\n plugins: configChain.plugins.map(descriptor =>\n createItemFromDescriptor(descriptor),\n ),\n presets: configChain.presets.map(descriptor =>\n createItemFromDescriptor(descriptor),\n ),\n };\n\n return {\n options,\n context,\n fileHandling: configChain.fileHandling,\n ignore: configChain.ignore,\n babelrc: configChain.babelrc,\n config: configChain.config,\n files: configChain.files,\n };\n}\n\ntype LoadPartialConfigOpts = {\n showIgnoredFiles?: boolean;\n};\n\nexport function* loadPartialConfig(\n opts?: LoadPartialConfigOpts,\n): Handler {\n let showIgnoredFiles = false;\n // We only extract showIgnoredFiles if opts is an object, so that\n // loadPrivatePartialConfig can throw the appropriate error if it's not.\n if (typeof opts === \"object\" && opts !== null && !Array.isArray(opts)) {\n ({ showIgnoredFiles, ...opts } = opts);\n }\n\n const result: PrivPartialConfig | undefined | null =\n yield* loadPrivatePartialConfig(opts);\n if (!result) return null;\n\n const { options, babelrc, ignore, config, fileHandling, files } = result;\n\n if (fileHandling === \"ignored\" && !showIgnoredFiles) {\n return null;\n }\n\n (options.plugins || []).forEach(item => {\n // @ts-expect-error todo(flow->ts): better type annotation for `item.value`\n if (item.value instanceof Plugin) {\n throw new Error(\n \"Passing cached plugin instances is not supported in \" +\n \"babel.loadPartialConfig()\",\n );\n }\n });\n\n return new PartialConfig(\n options,\n babelrc ? babelrc.filepath : undefined,\n ignore ? ignore.filepath : undefined,\n config ? config.filepath : undefined,\n fileHandling,\n files,\n );\n}\n\nexport type { PartialConfig };\n\nclass PartialConfig {\n /**\n * These properties are public, so any changes to them should be considered\n * a breaking change to Babel's API.\n */\n options: NormalizedOptions;\n babelrc: string | void;\n babelignore: string | void;\n config: string | void;\n fileHandling: FileHandling;\n files: Set;\n\n constructor(\n options: NormalizedOptions,\n babelrc: string | void,\n ignore: string | void,\n config: string | void,\n fileHandling: FileHandling,\n files: Set,\n ) {\n this.options = options;\n this.babelignore = ignore;\n this.babelrc = babelrc;\n this.config = config;\n this.fileHandling = fileHandling;\n this.files = files;\n\n // Freeze since this is a public API and it should be extremely obvious that\n // reassigning properties on here does nothing.\n Object.freeze(this);\n }\n\n /**\n * Returns true if there is a config file in the filesystem for this config.\n */\n hasFilesystemConfig(): boolean {\n return this.babelrc !== undefined || this.config !== undefined;\n }\n}\nObject.freeze(PartialConfig.prototype);\n","import gensync, { type Handler } from \"gensync\";\nimport {\n forwardAsync,\n maybeAsync,\n isThenable,\n} from \"../gensync-utils/async.ts\";\n\nimport { mergeOptions } from \"./util.ts\";\nimport * as context from \"../index.ts\";\nimport Plugin from \"./plugin.ts\";\nimport { getItemDescriptor } from \"./item.ts\";\nimport { buildPresetChain } from \"./config-chain.ts\";\nimport { finalize as freezeDeepArray } from \"./helpers/deep-array.ts\";\nimport type { DeepArray, ReadonlyDeepArray } from \"./helpers/deep-array.ts\";\nimport type {\n ConfigContext,\n ConfigChain,\n PresetInstance,\n} from \"./config-chain.ts\";\nimport type { UnloadedDescriptor } from \"./config-descriptors.ts\";\nimport traverse from \"@babel/traverse\";\nimport { makeWeakCache, makeWeakCacheSync } from \"./caching.ts\";\nimport type { CacheConfigurator } from \"./caching.ts\";\nimport {\n validate,\n checkNoUnwrappedItemOptionPairs,\n} from \"./validation/options.ts\";\nimport type { PluginItem } from \"./validation/options.ts\";\nimport { validatePluginObject } from \"./validation/plugins.ts\";\nimport { makePluginAPI, makePresetAPI } from \"./helpers/config-api.ts\";\nimport type { PluginAPI, PresetAPI } from \"./helpers/config-api.ts\";\n\nimport loadPrivatePartialConfig from \"./partial.ts\";\nimport type { ValidatedOptions } from \"./validation/options.ts\";\n\nimport type * as Context from \"./cache-contexts.ts\";\nimport ConfigError from \"../errors/config-error.ts\";\n\ntype LoadedDescriptor = {\n value: any;\n options: object;\n dirname: string;\n alias: string;\n externalDependencies: ReadonlyDeepArray;\n};\n\nexport type { InputOptions } from \"./validation/options.ts\";\n\nexport type ResolvedConfig = {\n options: any;\n passes: PluginPasses;\n externalDependencies: ReadonlyDeepArray;\n};\n\nexport type { Plugin };\nexport type PluginPassList = Array;\nexport type PluginPasses = Array;\n\nexport default gensync(function* loadFullConfig(\n inputOpts: unknown,\n): Handler {\n const result = yield* loadPrivatePartialConfig(inputOpts);\n if (!result) {\n return null;\n }\n const { options, context, fileHandling } = result;\n\n if (fileHandling === \"ignored\") {\n return null;\n }\n\n const optionDefaults = {};\n\n const { plugins, presets } = options;\n\n if (!plugins || !presets) {\n throw new Error(\"Assertion failure - plugins and presets exist\");\n }\n\n const presetContext: Context.FullPreset = {\n ...context,\n targets: options.targets,\n };\n\n const toDescriptor = (item: PluginItem) => {\n const desc = getItemDescriptor(item);\n if (!desc) {\n throw new Error(\"Assertion failure - must be config item\");\n }\n\n return desc;\n };\n\n const presetsDescriptors = presets.map(toDescriptor);\n const initialPluginsDescriptors = plugins.map(toDescriptor);\n const pluginDescriptorsByPass: Array>> = [\n [],\n ];\n const passes: Array> = [];\n\n const externalDependencies: DeepArray = [];\n\n const ignored = yield* enhanceError(\n context,\n function* recursePresetDescriptors(\n rawPresets: Array>,\n pluginDescriptorsPass: Array>,\n ): Handler {\n const presets: Array<{\n preset: ConfigChain | null;\n pass: Array>;\n }> = [];\n\n for (let i = 0; i < rawPresets.length; i++) {\n const descriptor = rawPresets[i];\n if (descriptor.options !== false) {\n try {\n // eslint-disable-next-line no-var\n var preset = yield* loadPresetDescriptor(descriptor, presetContext);\n } catch (e) {\n if (e.code === \"BABEL_UNKNOWN_OPTION\") {\n checkNoUnwrappedItemOptionPairs(rawPresets, i, \"preset\", e);\n }\n throw e;\n }\n\n externalDependencies.push(preset.externalDependencies);\n\n // Presets normally run in reverse order, but if they\n // have their own pass they run after the presets\n // in the previous pass.\n if (descriptor.ownPass) {\n presets.push({ preset: preset.chain, pass: [] });\n } else {\n presets.unshift({\n preset: preset.chain,\n pass: pluginDescriptorsPass,\n });\n }\n }\n }\n\n // resolve presets\n if (presets.length > 0) {\n // The passes are created in the same order as the preset list, but are inserted before any\n // existing additional passes.\n pluginDescriptorsByPass.splice(\n 1,\n 0,\n ...presets.map(o => o.pass).filter(p => p !== pluginDescriptorsPass),\n );\n\n for (const { preset, pass } of presets) {\n if (!preset) return true;\n\n pass.push(...preset.plugins);\n\n const ignored = yield* recursePresetDescriptors(preset.presets, pass);\n if (ignored) return true;\n\n preset.options.forEach(opts => {\n mergeOptions(optionDefaults, opts);\n });\n }\n }\n },\n )(presetsDescriptors, pluginDescriptorsByPass[0]);\n\n if (ignored) return null;\n\n const opts: any = optionDefaults;\n mergeOptions(opts, options);\n\n const pluginContext: Context.FullPlugin = {\n ...presetContext,\n assumptions: opts.assumptions ?? {},\n };\n\n yield* enhanceError(context, function* loadPluginDescriptors() {\n pluginDescriptorsByPass[0].unshift(...initialPluginsDescriptors);\n\n for (const descs of pluginDescriptorsByPass) {\n const pass: Plugin[] = [];\n passes.push(pass);\n\n for (let i = 0; i < descs.length; i++) {\n const descriptor = descs[i];\n if (descriptor.options !== false) {\n try {\n // eslint-disable-next-line no-var\n var plugin = yield* loadPluginDescriptor(descriptor, pluginContext);\n } catch (e) {\n if (e.code === \"BABEL_UNKNOWN_PLUGIN_PROPERTY\") {\n // print special message for `plugins: [\"@babel/foo\", { foo: \"option\" }]`\n checkNoUnwrappedItemOptionPairs(descs, i, \"plugin\", e);\n }\n throw e;\n }\n pass.push(plugin);\n\n externalDependencies.push(plugin.externalDependencies);\n }\n }\n }\n })();\n\n opts.plugins = passes[0];\n opts.presets = passes\n .slice(1)\n .filter(plugins => plugins.length > 0)\n .map(plugins => ({ plugins }));\n opts.passPerPreset = opts.presets.length > 0;\n\n return {\n options: opts,\n passes: passes,\n externalDependencies: freezeDeepArray(externalDependencies),\n };\n});\n\nfunction enhanceError(context: ConfigContext, fn: T): T {\n return function* (arg1: unknown, arg2: unknown) {\n try {\n return yield* fn(arg1, arg2);\n } catch (e) {\n // There are a few case where thrown errors will try to annotate themselves multiple times, so\n // to keep things simple we just bail out if re-wrapping the message.\n if (!/^\\[BABEL\\]/.test(e.message)) {\n e.message = `[BABEL] ${context.filename ?? \"unknown file\"}: ${\n e.message\n }`;\n }\n\n throw e;\n }\n } as any;\n}\n\n/**\n * Load a generic plugin/preset from the given descriptor loaded from the config object.\n */\nconst makeDescriptorLoader = (\n apiFactory: (\n cache: CacheConfigurator,\n externalDependencies: Array,\n ) => API,\n) =>\n makeWeakCache(function* (\n { value, options, dirname, alias }: UnloadedDescriptor,\n cache: CacheConfigurator,\n ): Handler {\n // Disabled presets should already have been filtered out\n if (options === false) throw new Error(\"Assertion failure\");\n\n options = options || {};\n\n const externalDependencies: Array = [];\n\n let item: unknown = value;\n if (typeof value === \"function\") {\n const factory = maybeAsync(\n value as (api: API, options: object, dirname: string) => unknown,\n `You appear to be using an async plugin/preset, but Babel has been called synchronously`,\n );\n\n const api = {\n ...context,\n ...apiFactory(cache, externalDependencies),\n };\n try {\n item = yield* factory(api, options, dirname);\n } catch (e) {\n if (alias) {\n e.message += ` (While processing: ${JSON.stringify(alias)})`;\n }\n throw e;\n }\n }\n\n if (!item || typeof item !== \"object\") {\n throw new Error(\"Plugin/Preset did not return an object.\");\n }\n\n if (isThenable(item)) {\n // @ts-expect-error - if we want to support async plugins\n yield* [];\n\n throw new Error(\n `You appear to be using a promise as a plugin, ` +\n `which your current version of Babel does not support. ` +\n `If you're using a published plugin, ` +\n `you may need to upgrade your @babel/core version. ` +\n `As an alternative, you can prefix the promise with \"await\". ` +\n `(While processing: ${JSON.stringify(alias)})`,\n );\n }\n\n if (\n externalDependencies.length > 0 &&\n (!cache.configured() || cache.mode() === \"forever\")\n ) {\n let error =\n `A plugin/preset has external untracked dependencies ` +\n `(${externalDependencies[0]}), but the cache `;\n if (!cache.configured()) {\n error += `has not been configured to be invalidated when the external dependencies change. `;\n } else {\n error += ` has been configured to never be invalidated. `;\n }\n error +=\n `Plugins/presets should configure their cache to be invalidated when the external ` +\n `dependencies change, for example using \\`api.cache.invalidate(() => ` +\n `statSync(filepath).mtimeMs)\\` or \\`api.cache.never()\\`\\n` +\n `(While processing: ${JSON.stringify(alias)})`;\n\n throw new Error(error);\n }\n\n return {\n value: item,\n options,\n dirname,\n alias,\n externalDependencies: freezeDeepArray(externalDependencies),\n };\n });\n\nconst pluginDescriptorLoader = makeDescriptorLoader<\n Context.SimplePlugin,\n PluginAPI\n>(makePluginAPI);\nconst presetDescriptorLoader = makeDescriptorLoader<\n Context.SimplePreset,\n PresetAPI\n>(makePresetAPI);\n\nconst instantiatePlugin = makeWeakCache(function* (\n { value, options, dirname, alias, externalDependencies }: LoadedDescriptor,\n cache: CacheConfigurator,\n): Handler {\n const pluginObj = validatePluginObject(value);\n\n const plugin = {\n ...pluginObj,\n };\n if (plugin.visitor) {\n plugin.visitor = traverse.explode({\n ...plugin.visitor,\n });\n }\n\n if (plugin.inherits) {\n const inheritsDescriptor: UnloadedDescriptor = {\n name: undefined,\n alias: `${alias}$inherits`,\n value: plugin.inherits,\n options,\n dirname,\n };\n\n const inherits = yield* forwardAsync(loadPluginDescriptor, run => {\n // If the inherited plugin changes, reinstantiate this plugin.\n return cache.invalidate(data => run(inheritsDescriptor, data));\n });\n\n plugin.pre = chain(inherits.pre, plugin.pre);\n plugin.post = chain(inherits.post, plugin.post);\n plugin.manipulateOptions = chain(\n inherits.manipulateOptions,\n plugin.manipulateOptions,\n );\n plugin.visitor = traverse.visitors.merge([\n inherits.visitor || {},\n plugin.visitor || {},\n ]);\n\n if (inherits.externalDependencies.length > 0) {\n if (externalDependencies.length === 0) {\n externalDependencies = inherits.externalDependencies;\n } else {\n externalDependencies = freezeDeepArray([\n externalDependencies,\n inherits.externalDependencies,\n ]);\n }\n }\n }\n\n return new Plugin(plugin, options, alias, externalDependencies);\n});\n\n/**\n * Instantiate a plugin for the given descriptor, returning the plugin/options pair.\n */\nfunction* loadPluginDescriptor(\n descriptor: UnloadedDescriptor,\n context: Context.SimplePlugin,\n): Handler {\n if (descriptor.value instanceof Plugin) {\n if (descriptor.options) {\n throw new Error(\n \"Passed options to an existing Plugin instance will not work.\",\n );\n }\n\n return descriptor.value;\n }\n\n return yield* instantiatePlugin(\n yield* pluginDescriptorLoader(descriptor, context),\n context,\n );\n}\n\nconst needsFilename = (val: unknown) => val && typeof val !== \"function\";\n\nconst validateIfOptionNeedsFilename = (\n options: ValidatedOptions,\n descriptor: UnloadedDescriptor,\n): void => {\n if (\n needsFilename(options.test) ||\n needsFilename(options.include) ||\n needsFilename(options.exclude)\n ) {\n const formattedPresetName = descriptor.name\n ? `\"${descriptor.name}\"`\n : \"/* your preset */\";\n throw new ConfigError(\n [\n `Preset ${formattedPresetName} requires a filename to be set when babel is called directly,`,\n `\\`\\`\\``,\n `babel.transformSync(code, { filename: 'file.ts', presets: [${formattedPresetName}] });`,\n `\\`\\`\\``,\n `See https://babeljs.io/docs/en/options#filename for more information.`,\n ].join(\"\\n\"),\n );\n }\n};\n\nconst validatePreset = (\n preset: PresetInstance,\n context: ConfigContext,\n descriptor: UnloadedDescriptor,\n): void => {\n if (!context.filename) {\n const { options } = preset;\n validateIfOptionNeedsFilename(options, descriptor);\n options.overrides?.forEach(overrideOptions =>\n validateIfOptionNeedsFilename(overrideOptions, descriptor),\n );\n }\n};\n\nconst instantiatePreset = makeWeakCacheSync(\n ({\n value,\n dirname,\n alias,\n externalDependencies,\n }: LoadedDescriptor): PresetInstance => {\n return {\n options: validate(\"preset\", value),\n alias,\n dirname,\n externalDependencies,\n };\n },\n);\n\n/**\n * Generate a config object that will act as the root of a new nested config.\n */\nfunction* loadPresetDescriptor(\n descriptor: UnloadedDescriptor,\n context: Context.FullPreset,\n): Handler<{\n chain: ConfigChain | null;\n externalDependencies: ReadonlyDeepArray;\n}> {\n const preset = instantiatePreset(\n yield* presetDescriptorLoader(descriptor, context),\n );\n validatePreset(preset, context, descriptor);\n return {\n chain: yield* buildPresetChain(preset, context),\n externalDependencies: preset.externalDependencies,\n };\n}\n\nfunction chain(\n a: undefined | ((...args: Args) => void),\n b: undefined | ((...args: Args) => void),\n) {\n const fns = [a, b].filter(Boolean);\n if (fns.length <= 1) return fns[0];\n\n return function (this: unknown, ...args: unknown[]) {\n for (const fn of fns) {\n fn.apply(this, args);\n }\n };\n}\n","import gensync, { type Handler } from \"gensync\";\n\nexport type {\n ResolvedConfig,\n InputOptions,\n PluginPasses,\n Plugin,\n} from \"./full.ts\";\n\nimport type { PluginTarget } from \"./validation/options.ts\";\n\nimport type {\n PluginAPI as basePluginAPI,\n PresetAPI as basePresetAPI,\n} from \"./helpers/config-api.ts\";\nexport type { PluginObject } from \"./validation/plugins.ts\";\ntype PluginAPI = basePluginAPI & typeof import(\"..\");\ntype PresetAPI = basePresetAPI & typeof import(\"..\");\nexport type { PluginAPI, PresetAPI };\n// todo: may need to refine PresetObject to be a subset of ValidatedOptions\nexport type {\n CallerMetadata,\n ValidatedOptions as PresetObject,\n} from \"./validation/options.ts\";\n\nimport loadFullConfig, { type ResolvedConfig } from \"./full.ts\";\nimport {\n type PartialConfig,\n loadPartialConfig as loadPartialConfigImpl,\n} from \"./partial.ts\";\n\nexport { loadFullConfig as default };\nexport type { PartialConfig } from \"./partial.ts\";\n\nimport { createConfigItem as createConfigItemImpl } from \"./item.ts\";\nimport type { ConfigItem } from \"./item.ts\";\nexport type { ConfigItem };\n\nimport { beginHiddenCallStack } from \"../errors/rewrite-stack-trace.ts\";\n\nconst loadPartialConfigRunner = gensync(loadPartialConfigImpl);\nexport function loadPartialConfigAsync(\n ...args: Parameters\n) {\n return beginHiddenCallStack(loadPartialConfigRunner.async)(...args);\n}\nexport function loadPartialConfigSync(\n ...args: Parameters\n) {\n return beginHiddenCallStack(loadPartialConfigRunner.sync)(...args);\n}\nexport function loadPartialConfig(\n opts: Parameters[0],\n callback?: (err: Error, val: PartialConfig | null) => void,\n) {\n if (callback !== undefined) {\n beginHiddenCallStack(loadPartialConfigRunner.errback)(opts, callback);\n } else if (typeof opts === \"function\") {\n beginHiddenCallStack(loadPartialConfigRunner.errback)(\n undefined,\n opts as (err: Error, val: PartialConfig | null) => void,\n );\n } else {\n if (process.env.BABEL_8_BREAKING) {\n throw new Error(\n \"Starting from Babel 8.0.0, the 'loadPartialConfig' function expects a callback. If you need to call it synchronously, please use 'loadPartialConfigSync'.\",\n );\n } else {\n return loadPartialConfigSync(opts);\n }\n }\n}\n\nfunction* loadOptionsImpl(opts: unknown): Handler {\n const config = yield* loadFullConfig(opts);\n // NOTE: We want to return \"null\" explicitly, while ?. alone returns undefined\n return config?.options ?? null;\n}\nconst loadOptionsRunner = gensync(loadOptionsImpl);\nexport function loadOptionsAsync(\n ...args: Parameters\n) {\n return beginHiddenCallStack(loadOptionsRunner.async)(...args);\n}\nexport function loadOptionsSync(\n ...args: Parameters\n) {\n return beginHiddenCallStack(loadOptionsRunner.sync)(...args);\n}\nexport function loadOptions(\n opts: Parameters[0],\n callback?: (err: Error, val: ResolvedConfig | null) => void,\n) {\n if (callback !== undefined) {\n beginHiddenCallStack(loadOptionsRunner.errback)(opts, callback);\n } else if (typeof opts === \"function\") {\n beginHiddenCallStack(loadOptionsRunner.errback)(\n undefined,\n opts as (err: Error, val: ResolvedConfig | null) => void,\n );\n } else {\n if (process.env.BABEL_8_BREAKING) {\n throw new Error(\n \"Starting from Babel 8.0.0, the 'loadOptions' function expects a callback. If you need to call it synchronously, please use 'loadOptionsSync'.\",\n );\n } else {\n return loadOptionsSync(opts);\n }\n }\n}\n\nconst createConfigItemRunner = gensync(createConfigItemImpl);\nexport function createConfigItemAsync(\n ...args: Parameters\n) {\n return beginHiddenCallStack(createConfigItemRunner.async)(...args);\n}\nexport function createConfigItemSync(\n ...args: Parameters\n) {\n return beginHiddenCallStack(createConfigItemRunner.sync)(...args);\n}\nexport function createConfigItem(\n target: PluginTarget,\n options: Parameters[1],\n callback?: (err: Error, val: ConfigItem | null) => void,\n) {\n if (callback !== undefined) {\n beginHiddenCallStack(createConfigItemRunner.errback)(\n target,\n options,\n callback,\n );\n } else if (typeof options === \"function\") {\n beginHiddenCallStack(createConfigItemRunner.errback)(\n target,\n undefined,\n callback,\n );\n } else {\n if (process.env.BABEL_8_BREAKING) {\n throw new Error(\n \"Starting from Babel 8.0.0, the 'createConfigItem' function expects a callback. If you need to call it synchronously, please use 'createConfigItemSync'.\",\n );\n } else {\n return createConfigItemSync(target, options);\n }\n }\n}\n","import traverse from \"@babel/traverse\";\nimport type { Statement } from \"@babel/types\";\nimport type { PluginObject } from \"../config/index.ts\";\nimport Plugin from \"../config/plugin.ts\";\n\nlet LOADED_PLUGIN: Plugin | void;\n\nconst blockHoistPlugin: PluginObject = {\n /**\n * [Please add a description.]\n *\n * Priority:\n *\n * - 0 We want this to be at the **very** bottom\n * - 1 Default node position\n * - 2 Priority over normal nodes\n * - 3 We want this to be at the **very** top\n * - 4 Reserved for the helpers used to implement module imports.\n */\n\n name: \"internal.blockHoist\",\n\n visitor: {\n Block: {\n exit({ node }) {\n node.body = performHoisting(node.body);\n },\n },\n SwitchCase: {\n exit({ node }) {\n // In case statements, hoisting is difficult to perform correctly due to\n // functions that are declared and referenced in different blocks.\n // Nevertheless, hoisting the statements *inside* of each case should at\n // least mitigate the failure cases.\n node.consequent = performHoisting(node.consequent);\n },\n },\n },\n};\n\nfunction performHoisting(body: Statement[]): Statement[] {\n // Largest SMI\n let max = 2 ** 30 - 1;\n let hasChange = false;\n for (let i = 0; i < body.length; i++) {\n const n = body[i];\n const p = priority(n);\n if (p > max) {\n hasChange = true;\n break;\n }\n max = p;\n }\n if (!hasChange) return body;\n\n // My kingdom for a stable sort!\n return stableSort(body.slice());\n}\n\nexport default function loadBlockHoistPlugin(): Plugin {\n if (!LOADED_PLUGIN) {\n // cache the loaded blockHoist plugin plugin\n LOADED_PLUGIN = new Plugin(\n {\n ...blockHoistPlugin,\n visitor: traverse.explode(blockHoistPlugin.visitor),\n },\n {},\n );\n }\n\n return LOADED_PLUGIN;\n}\n\nfunction priority(bodyNode: Statement & { _blockHoist?: number | true }) {\n const priority = bodyNode?._blockHoist;\n if (priority == null) return 1;\n if (priority === true) return 2;\n return priority;\n}\n\nfunction stableSort(body: Statement[]) {\n // By default, we use priorities of 0-4.\n const buckets = Object.create(null);\n\n // By collecting into buckets, we can guarantee a stable sort.\n for (let i = 0; i < body.length; i++) {\n const n = body[i];\n const p = priority(n);\n\n // In case some plugin is setting an unexpected priority.\n const bucket = buckets[p] || (buckets[p] = []);\n bucket.push(n);\n }\n\n // Sort our keys in descending order. Keys are unique, so we don't have to\n // worry about stability.\n const keys = Object.keys(buckets)\n .map(k => +k)\n .sort((a, b) => b - a);\n\n let index = 0;\n for (const key of keys) {\n const bucket = buckets[key];\n for (const n of bucket) {\n body[index++] = n;\n }\n }\n return body;\n}\n","import type * as t from \"@babel/types\";\nimport type File from \"./file/file.ts\";\n\nexport default class PluginPass {\n _map: Map = new Map();\n key: string | undefined | null;\n file: File;\n opts: Partial;\n\n // The working directory that Babel's programmatic options are loaded\n // relative to.\n cwd: string;\n\n // The absolute path of the file being compiled.\n filename: string | void;\n\n constructor(file: File, key?: string | null, options?: Options) {\n this.key = key;\n this.file = file;\n this.opts = options || {};\n this.cwd = file.opts.cwd;\n this.filename = file.opts.filename;\n }\n\n set(key: unknown, val: unknown) {\n this._map.set(key, val);\n }\n\n get(key: unknown): any {\n return this._map.get(key);\n }\n\n availableHelper(name: string, versionRange?: string | null) {\n return this.file.availableHelper(name, versionRange);\n }\n\n addHelper(name: string) {\n return this.file.addHelper(name);\n }\n\n buildCodeFrameError(\n node: t.Node | undefined | null,\n msg: string,\n _Error?: typeof Error,\n ) {\n return this.file.buildCodeFrameError(node, msg, _Error);\n }\n}\n\nif (!process.env.BABEL_8_BREAKING) {\n (PluginPass as any).prototype.getModuleName = function getModuleName(\n this: PluginPass,\n ): string | undefined {\n // @ts-expect-error only exists in Babel 7\n return this.file.getModuleName();\n };\n (PluginPass as any).prototype.addImport = function addImport(\n this: PluginPass,\n ): void {\n // @ts-expect-error only exists in Babel 7\n this.file.addImport();\n };\n}\n","import path from \"path\";\nimport type { ResolvedConfig } from \"../config/index.ts\";\n\nexport default function normalizeOptions(config: ResolvedConfig) {\n const {\n filename,\n cwd,\n filenameRelative = typeof filename === \"string\"\n ? path.relative(cwd, filename)\n : \"unknown\",\n sourceType = \"module\",\n inputSourceMap,\n sourceMaps = !!inputSourceMap,\n sourceRoot = process.env.BABEL_8_BREAKING\n ? undefined\n : config.options.moduleRoot,\n\n sourceFileName = path.basename(filenameRelative),\n\n comments = true,\n compact = \"auto\",\n } = config.options;\n\n const opts = config.options;\n\n const options = {\n ...opts,\n\n parserOpts: {\n sourceType:\n path.extname(filenameRelative) === \".mjs\" ? \"module\" : sourceType,\n\n sourceFileName: filename,\n plugins: [],\n ...opts.parserOpts,\n },\n\n generatorOpts: {\n // General generator flags.\n filename,\n\n auxiliaryCommentBefore: opts.auxiliaryCommentBefore,\n auxiliaryCommentAfter: opts.auxiliaryCommentAfter,\n retainLines: opts.retainLines,\n comments,\n shouldPrintComment: opts.shouldPrintComment,\n compact,\n minified: opts.minified,\n\n // Source-map generation flags.\n sourceMaps,\n\n sourceRoot,\n sourceFileName,\n ...opts.generatorOpts,\n },\n };\n\n for (const plugins of config.passes) {\n for (const plugin of plugins) {\n if (plugin.manipulateOptions) {\n plugin.manipulateOptions(options, options.parserOpts);\n }\n }\n }\n\n return options;\n}\n","'use strict';\n\nObject.defineProperty(exports, 'commentRegex', {\n get: function getCommentRegex () {\n // Groups: 1: media type, 2: MIME type, 3: charset, 4: encoding, 5: data.\n return /^\\s*?\\/[\\/\\*][@#]\\s+?sourceMappingURL=data:(((?:application|text)\\/json)(?:;charset=([^;,]+?)?)?)?(?:;(base64))?,(.*?)$/mg;\n }\n});\n\n\nObject.defineProperty(exports, 'mapFileCommentRegex', {\n get: function getMapFileCommentRegex () {\n // Matches sourceMappingURL in either // or /* comment styles.\n return /(?:\\/\\/[@#][ \\t]+?sourceMappingURL=([^\\s'\"`]+?)[ \\t]*?$)|(?:\\/\\*[@#][ \\t]+sourceMappingURL=([^*]+?)[ \\t]*?(?:\\*\\/){1}[ \\t]*?$)/mg;\n }\n});\n\nvar decodeBase64;\nif (typeof Buffer !== 'undefined') {\n if (typeof Buffer.from === 'function') {\n decodeBase64 = decodeBase64WithBufferFrom;\n } else {\n decodeBase64 = decodeBase64WithNewBuffer;\n }\n} else {\n decodeBase64 = decodeBase64WithAtob;\n}\n\nfunction decodeBase64WithBufferFrom(base64) {\n return Buffer.from(base64, 'base64').toString();\n}\n\nfunction decodeBase64WithNewBuffer(base64) {\n if (typeof value === 'number') {\n throw new TypeError('The value to decode must not be of type number.');\n }\n return new Buffer(base64, 'base64').toString();\n}\n\nfunction decodeBase64WithAtob(base64) {\n return decodeURIComponent(escape(atob(base64)));\n}\n\nfunction stripComment(sm) {\n return sm.split(',').pop();\n}\n\nfunction readFromFileMap(sm, read) {\n var r = exports.mapFileCommentRegex.exec(sm);\n // for some odd reason //# .. captures in 1 and /* .. */ in 2\n var filename = r[1] || r[2];\n\n try {\n var sm = read(filename);\n if (sm != null && typeof sm.catch === 'function') {\n return sm.catch(throwError);\n } else {\n return sm;\n }\n } catch (e) {\n throwError(e);\n }\n\n function throwError(e) {\n throw new Error('An error occurred while trying to read the map file at ' + filename + '\\n' + e.stack);\n }\n}\n\nfunction Converter (sm, opts) {\n opts = opts || {};\n\n if (opts.hasComment) {\n sm = stripComment(sm);\n }\n\n if (opts.encoding === 'base64') {\n sm = decodeBase64(sm);\n } else if (opts.encoding === 'uri') {\n sm = decodeURIComponent(sm);\n }\n\n if (opts.isJSON || opts.encoding) {\n sm = JSON.parse(sm);\n }\n\n this.sourcemap = sm;\n}\n\nConverter.prototype.toJSON = function (space) {\n return JSON.stringify(this.sourcemap, null, space);\n};\n\nif (typeof Buffer !== 'undefined') {\n if (typeof Buffer.from === 'function') {\n Converter.prototype.toBase64 = encodeBase64WithBufferFrom;\n } else {\n Converter.prototype.toBase64 = encodeBase64WithNewBuffer;\n }\n} else {\n Converter.prototype.toBase64 = encodeBase64WithBtoa;\n}\n\nfunction encodeBase64WithBufferFrom() {\n var json = this.toJSON();\n return Buffer.from(json, 'utf8').toString('base64');\n}\n\nfunction encodeBase64WithNewBuffer() {\n var json = this.toJSON();\n if (typeof json === 'number') {\n throw new TypeError('The json to encode must not be of type number.');\n }\n return new Buffer(json, 'utf8').toString('base64');\n}\n\nfunction encodeBase64WithBtoa() {\n var json = this.toJSON();\n return btoa(unescape(encodeURIComponent(json)));\n}\n\nConverter.prototype.toURI = function () {\n var json = this.toJSON();\n return encodeURIComponent(json);\n};\n\nConverter.prototype.toComment = function (options) {\n var encoding, content, data;\n if (options != null && options.encoding === 'uri') {\n encoding = '';\n content = this.toURI();\n } else {\n encoding = ';base64';\n content = this.toBase64();\n }\n data = 'sourceMappingURL=data:application/json;charset=utf-8' + encoding + ',' + content;\n return options != null && options.multiline ? '/*# ' + data + ' */' : '//# ' + data;\n};\n\n// returns copy instead of original\nConverter.prototype.toObject = function () {\n return JSON.parse(this.toJSON());\n};\n\nConverter.prototype.addProperty = function (key, value) {\n if (this.sourcemap.hasOwnProperty(key)) throw new Error('property \"' + key + '\" already exists on the sourcemap, use set property instead');\n return this.setProperty(key, value);\n};\n\nConverter.prototype.setProperty = function (key, value) {\n this.sourcemap[key] = value;\n return this;\n};\n\nConverter.prototype.getProperty = function (key) {\n return this.sourcemap[key];\n};\n\nexports.fromObject = function (obj) {\n return new Converter(obj);\n};\n\nexports.fromJSON = function (json) {\n return new Converter(json, { isJSON: true });\n};\n\nexports.fromURI = function (uri) {\n return new Converter(uri, { encoding: 'uri' });\n};\n\nexports.fromBase64 = function (base64) {\n return new Converter(base64, { encoding: 'base64' });\n};\n\nexports.fromComment = function (comment) {\n var m, encoding;\n comment = comment\n .replace(/^\\/\\*/g, '//')\n .replace(/\\*\\/$/g, '');\n m = exports.commentRegex.exec(comment);\n encoding = m && m[4] || 'uri';\n return new Converter(comment, { encoding: encoding, hasComment: true });\n};\n\nfunction makeConverter(sm) {\n return new Converter(sm, { isJSON: true });\n}\n\nexports.fromMapFileComment = function (comment, read) {\n if (typeof read === 'string') {\n throw new Error(\n 'String directory paths are no longer supported with `fromMapFileComment`\\n' +\n 'Please review the Upgrading documentation at https://github.com/thlorenz/convert-source-map#upgrading'\n )\n }\n\n var sm = readFromFileMap(comment, read);\n if (sm != null && typeof sm.then === 'function') {\n return sm.then(makeConverter);\n } else {\n return makeConverter(sm);\n }\n};\n\n// Finds last sourcemap comment in file or returns null if none was found\nexports.fromSource = function (content) {\n var m = content.match(exports.commentRegex);\n return m ? exports.fromComment(m.pop()) : null;\n};\n\n// Finds last sourcemap comment in file or returns null if none was found\nexports.fromMapFileSource = function (content, read) {\n if (typeof read === 'string') {\n throw new Error(\n 'String directory paths are no longer supported with `fromMapFileSource`\\n' +\n 'Please review the Upgrading documentation at https://github.com/thlorenz/convert-source-map#upgrading'\n )\n }\n var m = content.match(exports.mapFileCommentRegex);\n return m ? exports.fromMapFileComment(m.pop(), read) : null;\n};\n\nexports.removeComments = function (src) {\n return src.replace(exports.commentRegex, '');\n};\n\nexports.removeMapFileComments = function (src) {\n return src.replace(exports.mapFileCommentRegex, '');\n};\n\nexports.generateMapFileComment = function (file, options) {\n var data = 'sourceMappingURL=' + file;\n return options && options.multiline ? '/*# ' + data + ' */' : '//# ' + data;\n};\n","const pluginNameMap: Record<\n string,\n Partial>>\n> = {\n asyncDoExpressions: {\n syntax: {\n name: \"@babel/plugin-syntax-async-do-expressions\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-async-do-expressions\",\n },\n },\n decimal: {\n syntax: {\n name: \"@babel/plugin-syntax-decimal\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-decimal\",\n },\n },\n decorators: {\n syntax: {\n name: \"@babel/plugin-syntax-decorators\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-decorators\",\n },\n transform: {\n name: \"@babel/plugin-proposal-decorators\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-proposal-decorators\",\n },\n },\n doExpressions: {\n syntax: {\n name: \"@babel/plugin-syntax-do-expressions\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-do-expressions\",\n },\n transform: {\n name: \"@babel/plugin-proposal-do-expressions\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-proposal-do-expressions\",\n },\n },\n exportDefaultFrom: {\n syntax: {\n name: \"@babel/plugin-syntax-export-default-from\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-export-default-from\",\n },\n transform: {\n name: \"@babel/plugin-proposal-export-default-from\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-proposal-export-default-from\",\n },\n },\n flow: {\n syntax: {\n name: \"@babel/plugin-syntax-flow\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-flow\",\n },\n transform: {\n name: \"@babel/preset-flow\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-preset-flow\",\n },\n },\n functionBind: {\n syntax: {\n name: \"@babel/plugin-syntax-function-bind\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-function-bind\",\n },\n transform: {\n name: \"@babel/plugin-proposal-function-bind\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-proposal-function-bind\",\n },\n },\n functionSent: {\n syntax: {\n name: \"@babel/plugin-syntax-function-sent\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-function-sent\",\n },\n transform: {\n name: \"@babel/plugin-proposal-function-sent\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-proposal-function-sent\",\n },\n },\n jsx: {\n syntax: {\n name: \"@babel/plugin-syntax-jsx\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-jsx\",\n },\n transform: {\n name: \"@babel/preset-react\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-preset-react\",\n },\n },\n importAttributes: {\n syntax: {\n name: \"@babel/plugin-syntax-import-attributes\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-import-attributes\",\n },\n },\n pipelineOperator: {\n syntax: {\n name: \"@babel/plugin-syntax-pipeline-operator\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-pipeline-operator\",\n },\n transform: {\n name: \"@babel/plugin-proposal-pipeline-operator\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-proposal-pipeline-operator\",\n },\n },\n recordAndTuple: {\n syntax: {\n name: \"@babel/plugin-syntax-record-and-tuple\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-record-and-tuple\",\n },\n },\n throwExpressions: {\n syntax: {\n name: \"@babel/plugin-syntax-throw-expressions\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-throw-expressions\",\n },\n transform: {\n name: \"@babel/plugin-proposal-throw-expressions\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-proposal-throw-expressions\",\n },\n },\n typescript: {\n syntax: {\n name: \"@babel/plugin-syntax-typescript\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-typescript\",\n },\n transform: {\n name: \"@babel/preset-typescript\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-preset-typescript\",\n },\n },\n};\n\nif (!process.env.BABEL_8_BREAKING) {\n // TODO: This plugins are now supported by default by @babel/parser.\n Object.assign(pluginNameMap, {\n asyncGenerators: {\n syntax: {\n name: \"@babel/plugin-syntax-async-generators\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-async-generators\",\n },\n transform: {\n name: \"@babel/plugin-transform-async-generator-functions\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-transform-async-generator-functions\",\n },\n },\n classProperties: {\n syntax: {\n name: \"@babel/plugin-syntax-class-properties\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-class-properties\",\n },\n transform: {\n name: \"@babel/plugin-transform-class-properties\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-transform-class-properties\",\n },\n },\n classPrivateProperties: {\n syntax: {\n name: \"@babel/plugin-syntax-class-properties\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-class-properties\",\n },\n transform: {\n name: \"@babel/plugin-transform-class-properties\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-transform-class-properties\",\n },\n },\n classPrivateMethods: {\n syntax: {\n name: \"@babel/plugin-syntax-class-properties\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-class-properties\",\n },\n transform: {\n name: \"@babel/plugin-transform-private-methods\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-transform-private-methods\",\n },\n },\n classStaticBlock: {\n syntax: {\n name: \"@babel/plugin-syntax-class-static-block\",\n url: \"https://github.com/babel/babel/tree/HEAD/packages/babel-plugin-syntax-class-static-block\",\n },\n transform: {\n name: \"@babel/plugin-transform-class-static-block\",\n url: \"https://github.com/babel/babel/tree/HEAD/packages/babel-plugin-transform-class-static-block\",\n },\n },\n dynamicImport: {\n syntax: {\n name: \"@babel/plugin-syntax-dynamic-import\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-dynamic-import\",\n },\n },\n exportNamespaceFrom: {\n syntax: {\n name: \"@babel/plugin-syntax-export-namespace-from\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-export-namespace-from\",\n },\n transform: {\n name: \"@babel/plugin-transform-export-namespace-from\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-transform-export-namespace-from\",\n },\n },\n // Will be removed\n importAssertions: {\n syntax: {\n name: \"@babel/plugin-syntax-import-assertions\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-import-assertions\",\n },\n },\n importMeta: {\n syntax: {\n name: \"@babel/plugin-syntax-import-meta\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-import-meta\",\n },\n },\n logicalAssignment: {\n syntax: {\n name: \"@babel/plugin-syntax-logical-assignment-operators\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-logical-assignment-operators\",\n },\n transform: {\n name: \"@babel/plugin-transform-logical-assignment-operators\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-transform-logical-assignment-operators\",\n },\n },\n moduleStringNames: {\n syntax: {\n name: \"@babel/plugin-syntax-module-string-names\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-module-string-names\",\n },\n },\n numericSeparator: {\n syntax: {\n name: \"@babel/plugin-syntax-numeric-separator\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-numeric-separator\",\n },\n transform: {\n name: \"@babel/plugin-transform-numeric-separator\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-transform-numeric-separator\",\n },\n },\n nullishCoalescingOperator: {\n syntax: {\n name: \"@babel/plugin-syntax-nullish-coalescing-operator\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-nullish-coalescing-operator\",\n },\n transform: {\n name: \"@babel/plugin-transform-nullish-coalescing-operator\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-transform-nullish-coalescing-opearator\",\n },\n },\n objectRestSpread: {\n syntax: {\n name: \"@babel/plugin-syntax-object-rest-spread\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-object-rest-spread\",\n },\n transform: {\n name: \"@babel/plugin-transform-object-rest-spread\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-transform-object-rest-spread\",\n },\n },\n optionalCatchBinding: {\n syntax: {\n name: \"@babel/plugin-syntax-optional-catch-binding\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-optional-catch-binding\",\n },\n transform: {\n name: \"@babel/plugin-transform-optional-catch-binding\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-transform-optional-catch-binding\",\n },\n },\n optionalChaining: {\n syntax: {\n name: \"@babel/plugin-syntax-optional-chaining\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-optional-chaining\",\n },\n transform: {\n name: \"@babel/plugin-transform-optional-chaining\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-transform-optional-chaining\",\n },\n },\n privateIn: {\n syntax: {\n name: \"@babel/plugin-syntax-private-property-in-object\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-private-property-in-object\",\n },\n transform: {\n name: \"@babel/plugin-transform-private-property-in-object\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-transform-private-property-in-object\",\n },\n },\n regexpUnicodeSets: {\n syntax: {\n name: \"@babel/plugin-syntax-unicode-sets-regex\",\n url: \"https://github.com/babel/babel/blob/main/packages/babel-plugin-syntax-unicode-sets-regex/README.md\",\n },\n transform: {\n name: \"@babel/plugin-transform-unicode-sets-regex\",\n url: \"https://github.com/babel/babel/blob/main/packages/babel-plugin-proposalunicode-sets-regex/README.md\",\n },\n },\n });\n}\n\nconst getNameURLCombination = ({ name, url }: { name: string; url: string }) =>\n `${name} (${url})`;\n\n/*\nReturns a string of the format:\nSupport for the experimental syntax [@babel/parser plugin name] isn't currently enabled ([loc]):\n\n[code frame]\n\nAdd [npm package name] ([url]) to the 'plugins' section of your Babel config\nto enable [parsing|transformation].\n*/\nexport default function generateMissingPluginMessage(\n missingPluginName: string,\n loc: {\n line: number;\n column: number;\n },\n codeFrame: string,\n filename: string,\n): string {\n let helpMessage =\n `Support for the experimental syntax '${missingPluginName}' isn't currently enabled ` +\n `(${loc.line}:${loc.column + 1}):\\n\\n` +\n codeFrame;\n const pluginInfo = pluginNameMap[missingPluginName];\n if (pluginInfo) {\n const { syntax: syntaxPlugin, transform: transformPlugin } = pluginInfo;\n if (syntaxPlugin) {\n const syntaxPluginInfo = getNameURLCombination(syntaxPlugin);\n if (transformPlugin) {\n const transformPluginInfo = getNameURLCombination(transformPlugin);\n const sectionType = transformPlugin.name.startsWith(\"@babel/plugin\")\n ? \"plugins\"\n : \"presets\";\n helpMessage += `\\n\\nAdd ${transformPluginInfo} to the '${sectionType}' section of your Babel config to enable transformation.\nIf you want to leave it as-is, add ${syntaxPluginInfo} to the 'plugins' section to enable parsing.`;\n } else {\n helpMessage +=\n `\\n\\nAdd ${syntaxPluginInfo} to the 'plugins' section of your Babel config ` +\n `to enable parsing.`;\n }\n }\n }\n\n const msgFilename =\n filename === \"unknown\" ? \"\" : filename;\n helpMessage += `\n\nIf you already added the plugin for this syntax to your config, it's possible that your config \\\nisn't being loaded.\nYou can re-run Babel with the BABEL_SHOW_CONFIG_FOR environment variable to show the loaded \\\nconfiguration:\n\\tnpx cross-env BABEL_SHOW_CONFIG_FOR=${msgFilename} \nSee https://babeljs.io/docs/configuration#print-effective-configs for more info.\n`;\n return helpMessage;\n}\n","import type { Handler } from \"gensync\";\nimport { parse, type File as ParseResult } from \"@babel/parser\";\nimport { codeFrameColumns } from \"@babel/code-frame\";\nimport generateMissingPluginMessage from \"./util/missing-plugin-helper.ts\";\nimport type { PluginPasses } from \"../config/index.ts\";\n\nexport type { ParseResult };\n\nexport default function* parser(\n pluginPasses: PluginPasses,\n { parserOpts, highlightCode = true, filename = \"unknown\" }: any,\n code: string,\n): Handler {\n try {\n const results = [];\n for (const plugins of pluginPasses) {\n for (const plugin of plugins) {\n const { parserOverride } = plugin;\n if (parserOverride) {\n const ast = parserOverride(code, parserOpts, parse);\n\n if (ast !== undefined) results.push(ast);\n }\n }\n }\n\n if (results.length === 0) {\n return parse(code, parserOpts);\n } else if (results.length === 1) {\n // @ts-expect-error - If we want to allow async parsers\n yield* [];\n if (typeof results[0].then === \"function\") {\n throw new Error(\n `You appear to be using an async parser plugin, ` +\n `which your current version of Babel does not support. ` +\n `If you're using a published plugin, you may need to upgrade ` +\n `your @babel/core version.`,\n );\n }\n return results[0];\n }\n // TODO: Add an error code\n throw new Error(\"More than one plugin attempted to override parsing.\");\n } catch (err) {\n if (err.code === \"BABEL_PARSER_SOURCETYPE_MODULE_REQUIRED\") {\n err.message +=\n \"\\nConsider renaming the file to '.mjs', or setting sourceType:module \" +\n \"or sourceType:unambiguous in your Babel config for this file.\";\n // err.code will be changed to BABEL_PARSE_ERROR later.\n }\n\n const { loc, missingPlugin } = err;\n if (loc) {\n const codeFrame = codeFrameColumns(\n code,\n {\n start: {\n line: loc.line,\n column: loc.column + 1,\n },\n },\n {\n highlightCode,\n },\n );\n if (missingPlugin) {\n err.message =\n `${filename}: ` +\n generateMissingPluginMessage(\n missingPlugin[0],\n loc,\n codeFrame,\n filename,\n );\n } else {\n err.message = `${filename}: ${err.message}\\n\\n` + codeFrame;\n }\n err.code = \"BABEL_PARSE_ERROR\";\n }\n throw err;\n }\n}\n","//https://github.com/babel/babel/pull/14583#discussion_r882828856\nfunction deepClone(value: any, cache: Map): any {\n if (value !== null) {\n if (cache.has(value)) return cache.get(value);\n let cloned: any;\n if (Array.isArray(value)) {\n cloned = new Array(value.length);\n cache.set(value, cloned);\n for (let i = 0; i < value.length; i++) {\n cloned[i] =\n typeof value[i] !== \"object\" ? value[i] : deepClone(value[i], cache);\n }\n } else {\n cloned = {};\n cache.set(value, cloned);\n const keys = Object.keys(value);\n for (let i = 0; i < keys.length; i++) {\n const key = keys[i];\n cloned[key] =\n typeof value[key] !== \"object\"\n ? value[key]\n : deepClone(value[key], cache);\n }\n }\n return cloned;\n }\n return value;\n}\n\nexport default function (value: T): T {\n if (typeof value !== \"object\") return value;\n return deepClone(value, new Map());\n}\n","import fs from \"fs\";\nimport path from \"path\";\nimport buildDebug from \"debug\";\nimport type { Handler } from \"gensync\";\nimport { file, traverseFast } from \"@babel/types\";\nimport type * as t from \"@babel/types\";\nimport type { PluginPasses } from \"../config/index.ts\";\nimport convertSourceMap from \"convert-source-map\";\nimport type { SourceMapConverter as Converter } from \"convert-source-map\";\nimport File from \"./file/file.ts\";\nimport parser from \"../parser/index.ts\";\nimport cloneDeep from \"./util/clone-deep.ts\";\n\nconst debug = buildDebug(\"babel:transform:file\");\n\n// These regexps are copied from the convert-source-map package,\n// but without // or /* at the beginning of the comment.\n\nconst INLINE_SOURCEMAP_REGEX =\n /^[@#]\\s+sourceMappingURL=data:(?:application|text)\\/json;(?:charset[:=]\\S+?;)?base64,.*$/;\nconst EXTERNAL_SOURCEMAP_REGEX =\n /^[@#][ \\t]+sourceMappingURL=([^\\s'\"`]+)[ \\t]*$/;\n\nexport type NormalizedFile = {\n code: string;\n ast: t.File;\n inputMap: Converter | null;\n};\n\nexport default function* normalizeFile(\n pluginPasses: PluginPasses,\n options: { [key: string]: any },\n code: string,\n ast?: t.File | t.Program | null,\n): Handler {\n code = `${code || \"\"}`;\n\n if (ast) {\n if (ast.type === \"Program\") {\n ast = file(ast, [], []);\n } else if (ast.type !== \"File\") {\n throw new Error(\"AST root must be a Program or File node\");\n }\n\n if (options.cloneInputAst) {\n ast = cloneDeep(ast);\n }\n } else {\n // @ts-expect-error todo: use babel-types ast typings in Babel parser\n ast = yield* parser(pluginPasses, options, code);\n }\n\n let inputMap = null;\n if (options.inputSourceMap !== false) {\n // If an explicit object is passed in, it overrides the processing of\n // source maps that may be in the file itself.\n if (typeof options.inputSourceMap === \"object\") {\n inputMap = convertSourceMap.fromObject(options.inputSourceMap);\n }\n\n if (!inputMap) {\n const lastComment = extractComments(INLINE_SOURCEMAP_REGEX, ast);\n if (lastComment) {\n try {\n inputMap = convertSourceMap.fromComment(\"//\" + lastComment);\n } catch (err) {\n if (process.env.BABEL_8_BREAKING) {\n console.warn(\n \"discarding unknown inline input sourcemap\",\n options.filename,\n err,\n );\n } else {\n debug(\"discarding unknown inline input sourcemap\");\n }\n }\n }\n }\n\n if (!inputMap) {\n const lastComment = extractComments(EXTERNAL_SOURCEMAP_REGEX, ast);\n if (typeof options.filename === \"string\" && lastComment) {\n try {\n // when `lastComment` is non-null, EXTERNAL_SOURCEMAP_REGEX must have matches\n const match: [string, string] = EXTERNAL_SOURCEMAP_REGEX.exec(\n lastComment,\n ) as any;\n const inputMapContent = fs.readFileSync(\n path.resolve(path.dirname(options.filename), match[1]),\n \"utf8\",\n );\n inputMap = convertSourceMap.fromJSON(inputMapContent);\n } catch (err) {\n debug(\"discarding unknown file input sourcemap\", err);\n }\n } else if (lastComment) {\n debug(\"discarding un-loadable file input sourcemap\");\n }\n }\n }\n\n return new File(options, {\n code,\n ast: ast as t.File,\n inputMap,\n });\n}\n\nfunction extractCommentsFromList(\n regex: RegExp,\n comments: t.Comment[],\n lastComment: string | null,\n): [t.Comment[], string | null] {\n if (comments) {\n comments = comments.filter(({ value }) => {\n if (regex.test(value)) {\n lastComment = value;\n return false;\n }\n return true;\n });\n }\n return [comments, lastComment];\n}\n\nfunction extractComments(regex: RegExp, ast: t.Node) {\n let lastComment: string = null;\n traverseFast(ast, node => {\n [node.leadingComments, lastComment] = extractCommentsFromList(\n regex,\n node.leadingComments,\n lastComment,\n );\n [node.innerComments, lastComment] = extractCommentsFromList(\n regex,\n node.innerComments,\n lastComment,\n );\n [node.trailingComments, lastComment] = extractCommentsFromList(\n regex,\n node.trailingComments,\n lastComment,\n );\n });\n return lastComment;\n}\n","(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@jridgewell/set-array'), require('@jridgewell/sourcemap-codec')) :\n typeof define === 'function' && define.amd ? define(['exports', '@jridgewell/set-array', '@jridgewell/sourcemap-codec'], factory) :\n (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.genMapping = {}, global.setArray, global.sourcemapCodec));\n})(this, (function (exports, setArray, sourcemapCodec) { 'use strict';\n\n /**\n * A low-level API to associate a generated position with an original source position. Line and\n * column here are 0-based, unlike `addMapping`.\n */\n exports.addSegment = void 0;\n /**\n * A high-level API to associate a generated position with an original source position. Line is\n * 1-based, but column is 0-based, due to legacy behavior in `source-map` library.\n */\n exports.addMapping = void 0;\n /**\n * Adds/removes the content of the source file to the source map.\n */\n exports.setSourceContent = void 0;\n /**\n * Returns a sourcemap object (with decoded mappings) suitable for passing to a library that expects\n * a sourcemap, or to JSON.stringify.\n */\n exports.decodedMap = void 0;\n /**\n * Returns a sourcemap object (with encoded mappings) suitable for passing to a library that expects\n * a sourcemap, or to JSON.stringify.\n */\n exports.encodedMap = void 0;\n /**\n * Returns an array of high-level mapping objects for every recorded segment, which could then be\n * passed to the `source-map` library.\n */\n exports.allMappings = void 0;\n /**\n * Provides the state to generate a sourcemap.\n */\n class GenMapping {\n constructor({ file, sourceRoot } = {}) {\n this._names = new setArray.SetArray();\n this._sources = new setArray.SetArray();\n this._sourcesContent = [];\n this._mappings = [];\n this.file = file;\n this.sourceRoot = sourceRoot;\n }\n }\n (() => {\n exports.addSegment = (map, genLine, genColumn, source, sourceLine, sourceColumn, name) => {\n const { _mappings: mappings, _sources: sources, _sourcesContent: sourcesContent, _names: names, } = map;\n const line = getLine(mappings, genLine);\n if (source == null) {\n const seg = [genColumn];\n const index = getColumnIndex(line, genColumn, seg);\n return insert(line, index, seg);\n }\n const sourcesIndex = setArray.put(sources, source);\n const seg = name\n ? [genColumn, sourcesIndex, sourceLine, sourceColumn, setArray.put(names, name)]\n : [genColumn, sourcesIndex, sourceLine, sourceColumn];\n const index = getColumnIndex(line, genColumn, seg);\n if (sourcesIndex === sourcesContent.length)\n sourcesContent[sourcesIndex] = null;\n insert(line, index, seg);\n };\n exports.addMapping = (map, mapping) => {\n const { generated, source, original, name } = mapping;\n return exports.addSegment(map, generated.line - 1, generated.column, source, original == null ? undefined : original.line - 1, original === null || original === void 0 ? void 0 : original.column, name);\n };\n exports.setSourceContent = (map, source, content) => {\n const { _sources: sources, _sourcesContent: sourcesContent } = map;\n sourcesContent[setArray.put(sources, source)] = content;\n };\n exports.decodedMap = (map) => {\n const { file, sourceRoot, _mappings: mappings, _sources: sources, _sourcesContent: sourcesContent, _names: names, } = map;\n return {\n version: 3,\n file,\n names: names.array,\n sourceRoot: sourceRoot || undefined,\n sources: sources.array,\n sourcesContent,\n mappings,\n };\n };\n exports.encodedMap = (map) => {\n const decoded = exports.decodedMap(map);\n return Object.assign(Object.assign({}, decoded), { mappings: sourcemapCodec.encode(decoded.mappings) });\n };\n exports.allMappings = (map) => {\n const out = [];\n const { _mappings: mappings, _sources: sources, _names: names } = map;\n for (let i = 0; i < mappings.length; i++) {\n const line = mappings[i];\n for (let j = 0; j < line.length; j++) {\n const seg = line[j];\n const generated = { line: i + 1, column: seg[0] };\n let source = undefined;\n let original = undefined;\n let name = undefined;\n if (seg.length !== 1) {\n source = sources.array[seg[1]];\n original = { line: seg[2] + 1, column: seg[3] };\n if (seg.length === 5)\n name = names.array[seg[4]];\n }\n out.push({ generated, source, original, name });\n }\n }\n return out;\n };\n })();\n function getLine(mappings, index) {\n for (let i = mappings.length; i <= index; i++) {\n mappings[i] = [];\n }\n return mappings[index];\n }\n function getColumnIndex(line, column, seg) {\n let index = line.length;\n for (let i = index - 1; i >= 0; i--, index--) {\n const current = line[i];\n const col = current[0];\n if (col > column)\n continue;\n if (col < column)\n break;\n const cmp = compare(current, seg);\n if (cmp === 0)\n return index;\n if (cmp < 0)\n break;\n }\n return index;\n }\n function compare(a, b) {\n let cmp = compareNum(a.length, b.length);\n if (cmp !== 0)\n return cmp;\n // We've already checked genColumn\n if (a.length === 1)\n return 0;\n cmp = compareNum(a[1], b[1]);\n if (cmp !== 0)\n return cmp;\n cmp = compareNum(a[2], b[2]);\n if (cmp !== 0)\n return cmp;\n cmp = compareNum(a[3], b[3]);\n if (cmp !== 0)\n return cmp;\n if (a.length === 4)\n return 0;\n return compareNum(a[4], b[4]);\n }\n function compareNum(a, b) {\n return a - b;\n }\n function insert(array, index, value) {\n if (index === -1)\n return;\n for (let i = array.length; i > index; i--) {\n array[i] = array[i - 1];\n }\n array[index] = value;\n }\n\n exports.GenMapping = GenMapping;\n\n Object.defineProperty(exports, '__esModule', { value: true });\n\n}));\n//# sourceMappingURL=gen-mapping.umd.js.map\n","import { decodedMappings, traceSegment, TraceMap } from '@jridgewell/trace-mapping';\nimport { GenMapping, addSegment, setSourceContent, decodedMap, encodedMap } from '@jridgewell/gen-mapping';\n\nconst SOURCELESS_MAPPING = {\n source: null,\n column: null,\n line: null,\n name: null,\n content: null,\n};\nconst EMPTY_SOURCES = [];\nfunction Source(map, sources, source, content) {\n return {\n map,\n sources,\n source,\n content,\n };\n}\n/**\n * MapSource represents a single sourcemap, with the ability to trace mappings into its child nodes\n * (which may themselves be SourceMapTrees).\n */\nfunction MapSource(map, sources) {\n return Source(map, sources, '', null);\n}\n/**\n * A \"leaf\" node in the sourcemap tree, representing an original, unmodified source file. Recursive\n * segment tracing ends at the `OriginalSource`.\n */\nfunction OriginalSource(source, content) {\n return Source(null, EMPTY_SOURCES, source, content);\n}\n/**\n * traceMappings is only called on the root level SourceMapTree, and begins the process of\n * resolving each mapping in terms of the original source files.\n */\nfunction traceMappings(tree) {\n const gen = new GenMapping({ file: tree.map.file });\n const { sources: rootSources, map } = tree;\n const rootNames = map.names;\n const rootMappings = decodedMappings(map);\n for (let i = 0; i < rootMappings.length; i++) {\n const segments = rootMappings[i];\n let lastSource = null;\n let lastSourceLine = null;\n let lastSourceColumn = null;\n for (let j = 0; j < segments.length; j++) {\n const segment = segments[j];\n const genCol = segment[0];\n let traced = SOURCELESS_MAPPING;\n // 1-length segments only move the current generated column, there's no source information\n // to gather from it.\n if (segment.length !== 1) {\n const source = rootSources[segment[1]];\n traced = originalPositionFor(source, segment[2], segment[3], segment.length === 5 ? rootNames[segment[4]] : '');\n // If the trace is invalid, then the trace ran into a sourcemap that doesn't contain a\n // respective segment into an original source.\n if (traced == null)\n continue;\n }\n // So we traced a segment down into its original source file. Now push a\n // new segment pointing to this location.\n const { column, line, name, content, source } = traced;\n if (line === lastSourceLine && column === lastSourceColumn && source === lastSource) {\n continue;\n }\n lastSourceLine = line;\n lastSourceColumn = column;\n lastSource = source;\n // Sigh, TypeScript can't figure out source/line/column are either all null, or all non-null...\n addSegment(gen, i, genCol, source, line, column, name);\n if (content != null)\n setSourceContent(gen, source, content);\n }\n }\n return gen;\n}\n/**\n * originalPositionFor is only called on children SourceMapTrees. It recurses down into its own\n * child SourceMapTrees, until we find the original source map.\n */\nfunction originalPositionFor(source, line, column, name) {\n if (!source.map) {\n return { column, line, name, source: source.source, content: source.content };\n }\n const segment = traceSegment(source.map, line, column);\n // If we couldn't find a segment, then this doesn't exist in the sourcemap.\n if (segment == null)\n return null;\n // 1-length segments only move the current generated column, there's no source information\n // to gather from it.\n if (segment.length === 1)\n return SOURCELESS_MAPPING;\n return originalPositionFor(source.sources[segment[1]], segment[2], segment[3], segment.length === 5 ? source.map.names[segment[4]] : name);\n}\n\nfunction asArray(value) {\n if (Array.isArray(value))\n return value;\n return [value];\n}\n/**\n * Recursively builds a tree structure out of sourcemap files, with each node\n * being either an `OriginalSource` \"leaf\" or a `SourceMapTree` composed of\n * `OriginalSource`s and `SourceMapTree`s.\n *\n * Every sourcemap is composed of a collection of source files and mappings\n * into locations of those source files. When we generate a `SourceMapTree` for\n * the sourcemap, we attempt to load each source file's own sourcemap. If it\n * does not have an associated sourcemap, it is considered an original,\n * unmodified source file.\n */\nfunction buildSourceMapTree(input, loader) {\n const maps = asArray(input).map((m) => new TraceMap(m, ''));\n const map = maps.pop();\n for (let i = 0; i < maps.length; i++) {\n if (maps[i].sources.length > 1) {\n throw new Error(`Transformation map ${i} must have exactly one source file.\\n` +\n 'Did you specify these with the most recent transformation maps first?');\n }\n }\n let tree = build(map, loader, '', 0);\n for (let i = maps.length - 1; i >= 0; i--) {\n tree = MapSource(maps[i], [tree]);\n }\n return tree;\n}\nfunction build(map, loader, importer, importerDepth) {\n const { resolvedSources, sourcesContent } = map;\n const depth = importerDepth + 1;\n const children = resolvedSources.map((sourceFile, i) => {\n // The loading context gives the loader more information about why this file is being loaded\n // (eg, from which importer). It also allows the loader to override the location of the loaded\n // sourcemap/original source, or to override the content in the sourcesContent field if it's\n // an unmodified source file.\n const ctx = {\n importer,\n depth,\n source: sourceFile || '',\n content: undefined,\n };\n // Use the provided loader callback to retrieve the file's sourcemap.\n // TODO: We should eventually support async loading of sourcemap files.\n const sourceMap = loader(ctx.source, ctx);\n const { source, content } = ctx;\n // If there is a sourcemap, then we need to recurse into it to load its source files.\n if (sourceMap)\n return build(new TraceMap(sourceMap, source), loader, source, depth);\n // Else, it's an an unmodified source file.\n // The contents of this unmodified source file can be overridden via the loader context,\n // allowing it to be explicitly null or a string. If it remains undefined, we fall back to\n // the importing sourcemap's `sourcesContent` field.\n const sourceContent = content !== undefined ? content : sourcesContent ? sourcesContent[i] : null;\n return OriginalSource(source, sourceContent);\n });\n return MapSource(map, children);\n}\n\n/**\n * A SourceMap v3 compatible sourcemap, which only includes fields that were\n * provided to it.\n */\nclass SourceMap {\n constructor(map, options) {\n const out = options.decodedMappings ? decodedMap(map) : encodedMap(map);\n this.version = out.version; // SourceMap spec says this should be first.\n this.file = out.file;\n this.mappings = out.mappings;\n this.names = out.names;\n this.sourceRoot = out.sourceRoot;\n this.sources = out.sources;\n if (!options.excludeContent) {\n this.sourcesContent = out.sourcesContent;\n }\n }\n toString() {\n return JSON.stringify(this);\n }\n}\n\n/**\n * Traces through all the mappings in the root sourcemap, through the sources\n * (and their sourcemaps), all the way back to the original source location.\n *\n * `loader` will be called every time we encounter a source file. If it returns\n * a sourcemap, we will recurse into that sourcemap to continue the trace. If\n * it returns a falsey value, that source file is treated as an original,\n * unmodified source file.\n *\n * Pass `excludeContent` to exclude any self-containing source file content\n * from the output sourcemap.\n *\n * Pass `decodedMappings` to receive a SourceMap with decoded (instead of\n * VLQ encoded) mappings.\n */\nfunction remapping(input, loader, options) {\n const opts = typeof options === 'object' ? options : { excludeContent: !!options, decodedMappings: false };\n const tree = buildSourceMapTree(input, loader);\n return new SourceMap(traceMappings(tree), opts);\n}\n\nexport { remapping as default };\n//# sourceMappingURL=remapping.mjs.map\n","type SourceMap = any;\nimport remapping from \"@ampproject/remapping\";\n\nexport default function mergeSourceMap(\n inputMap: SourceMap,\n map: SourceMap,\n sourceFileName: string,\n): SourceMap {\n // On win32 machines, the sourceFileName uses backslash paths like\n // `C:\\foo\\bar.js`. But sourcemaps are always posix paths, so we need to\n // normalize to regular slashes before we can merge (else we won't find the\n // source associated with our input map).\n // This mirrors code done while generating the output map at\n // https://github.com/babel/babel/blob/5c2fcadc9ae34fd20dd72b1111d5cf50476d700d/packages/babel-generator/src/source-map.ts#L102\n const source = sourceFileName.replace(/\\\\/g, \"/\");\n\n // Prevent an infinite recursion if one of the input map's sources has the\n // same resolved path as the input map. In the case, it would keep find the\n // input map, then get it's sources which will include a path like the input\n // map, on and on.\n let found = false;\n const result = remapping(rootless(map), (s, ctx) => {\n if (s === source && !found) {\n found = true;\n // We empty the source location, which will prevent the sourcemap from\n // becoming relative to the input's location. Eg, if we're transforming a\n // file 'foo/bar.js', and it is a transformation of a `baz.js` file in the\n // same directory, the expected output is just `baz.js`. Without this step,\n // it would become `foo/baz.js`.\n ctx.source = \"\";\n\n return rootless(inputMap);\n }\n\n return null;\n });\n\n if (typeof inputMap.sourceRoot === \"string\") {\n result.sourceRoot = inputMap.sourceRoot;\n }\n\n // remapping returns a SourceMap class type, but this breaks code downstream in\n // @babel/traverse and @babel/types that relies on data being plain objects.\n // When it encounters the sourcemap type it outputs a \"don't know how to turn\n // this value into a node\" error. As a result, we are converting the merged\n // sourcemap to a plain js object.\n return { ...result };\n}\n\nfunction rootless(map: SourceMap): SourceMap {\n return {\n ...map,\n\n // This is a bit hack. Remapping will create absolute sources in our\n // sourcemap, but we want to maintain sources relative to the sourceRoot.\n // We'll re-add the sourceRoot after remapping.\n sourceRoot: null,\n };\n}\n","import type { PluginPasses } from \"../../config/index.ts\";\nimport convertSourceMap from \"convert-source-map\";\nimport type { GeneratorResult } from \"@babel/generator\";\nimport generate from \"@babel/generator\";\n\nimport type File from \"./file.ts\";\nimport mergeSourceMap from \"./merge-map.ts\";\n\nexport default function generateCode(\n pluginPasses: PluginPasses,\n file: File,\n): {\n outputCode: string;\n outputMap: GeneratorResult[\"map\"] | null;\n} {\n const { opts, ast, code, inputMap } = file;\n const { generatorOpts } = opts;\n\n generatorOpts.inputSourceMap = inputMap?.toObject();\n\n const results = [];\n for (const plugins of pluginPasses) {\n for (const plugin of plugins) {\n const { generatorOverride } = plugin;\n if (generatorOverride) {\n const result = generatorOverride(ast, generatorOpts, code, generate);\n\n if (result !== undefined) results.push(result);\n }\n }\n }\n\n let result;\n if (results.length === 0) {\n result = generate(ast, generatorOpts, code);\n } else if (results.length === 1) {\n result = results[0];\n\n if (typeof result.then === \"function\") {\n throw new Error(\n `You appear to be using an async codegen plugin, ` +\n `which your current version of Babel does not support. ` +\n `If you're using a published plugin, ` +\n `you may need to upgrade your @babel/core version.`,\n );\n }\n } else {\n throw new Error(\"More than one plugin attempted to override codegen.\");\n }\n\n // Decoded maps are faster to merge, so we attempt to get use the decodedMap\n // first. But to preserve backwards compat with older Generator, we'll fall\n // back to the encoded map.\n let { code: outputCode, decodedMap: outputMap = result.map } = result;\n\n // For backwards compat.\n if (result.__mergedMap) {\n /**\n * @see mergeSourceMap\n */\n outputMap = { ...result.map };\n } else {\n if (outputMap) {\n if (inputMap) {\n // mergeSourceMap returns an encoded map\n outputMap = mergeSourceMap(\n inputMap.toObject(),\n outputMap,\n generatorOpts.sourceFileName,\n );\n } else {\n // We cannot output a decoded map, so retrieve the encoded form. Because\n // the decoded form is free, it's fine to prioritize decoded first.\n outputMap = result.map;\n }\n }\n }\n\n if (opts.sourceMaps === \"inline\" || opts.sourceMaps === \"both\") {\n outputCode += \"\\n\" + convertSourceMap.fromObject(outputMap).toComment();\n }\n\n if (opts.sourceMaps === \"inline\") {\n outputMap = null;\n }\n\n return { outputCode, outputMap };\n}\n","import traverse from \"@babel/traverse\";\nimport type * as t from \"@babel/types\";\nimport type { GeneratorResult } from \"@babel/generator\";\n\nimport type { Handler } from \"gensync\";\n\nimport type { ResolvedConfig, Plugin, PluginPasses } from \"../config/index.ts\";\n\nimport PluginPass from \"./plugin-pass.ts\";\nimport loadBlockHoistPlugin from \"./block-hoist-plugin.ts\";\nimport normalizeOptions from \"./normalize-opts.ts\";\nimport normalizeFile from \"./normalize-file.ts\";\n\nimport generateCode from \"./file/generate.ts\";\nimport type File from \"./file/file.ts\";\n\nimport { flattenToSet } from \"../config/helpers/deep-array.ts\";\n\nexport type FileResultCallback = {\n (err: Error, file: null): void;\n (err: null, file: FileResult | null): void;\n};\n\nexport type FileResult = {\n metadata: { [key: string]: any };\n options: { [key: string]: any };\n ast: t.File | null;\n code: string | null;\n map: GeneratorResult[\"map\"] | null;\n sourceType: \"script\" | \"module\";\n externalDependencies: Set;\n};\n\nexport function* run(\n config: ResolvedConfig,\n code: string,\n ast?: t.File | t.Program | null,\n): Handler {\n const file = yield* normalizeFile(\n config.passes,\n normalizeOptions(config),\n code,\n ast,\n );\n\n const opts = file.opts;\n try {\n yield* transformFile(file, config.passes);\n } catch (e) {\n e.message = `${opts.filename ?? \"unknown file\"}: ${e.message}`;\n if (!e.code) {\n e.code = \"BABEL_TRANSFORM_ERROR\";\n }\n throw e;\n }\n\n let outputCode, outputMap;\n try {\n if (opts.code !== false) {\n ({ outputCode, outputMap } = generateCode(config.passes, file));\n }\n } catch (e) {\n e.message = `${opts.filename ?? \"unknown file\"}: ${e.message}`;\n if (!e.code) {\n e.code = \"BABEL_GENERATE_ERROR\";\n }\n throw e;\n }\n\n return {\n metadata: file.metadata,\n options: opts,\n ast: opts.ast === true ? file.ast : null,\n code: outputCode === undefined ? null : outputCode,\n map: outputMap === undefined ? null : outputMap,\n sourceType: file.ast.program.sourceType,\n externalDependencies: flattenToSet(config.externalDependencies),\n };\n}\n\nfunction* transformFile(file: File, pluginPasses: PluginPasses): Handler {\n for (const pluginPairs of pluginPasses) {\n const passPairs: [Plugin, PluginPass][] = [];\n const passes = [];\n const visitors = [];\n\n for (const plugin of pluginPairs.concat([loadBlockHoistPlugin()])) {\n const pass = new PluginPass(file, plugin.key, plugin.options);\n\n passPairs.push([plugin, pass]);\n passes.push(pass);\n visitors.push(plugin.visitor);\n }\n\n for (const [plugin, pass] of passPairs) {\n const fn = plugin.pre;\n if (fn) {\n // eslint-disable-next-line @typescript-eslint/no-confusing-void-expression\n const result = fn.call(pass, file);\n\n // @ts-expect-error - If we want to support async .pre\n yield* [];\n\n if (isThenable(result)) {\n throw new Error(\n `You appear to be using an plugin with an async .pre, ` +\n `which your current version of Babel does not support. ` +\n `If you're using a published plugin, you may need to upgrade ` +\n `your @babel/core version.`,\n );\n }\n }\n }\n\n // merge all plugin visitors into a single visitor\n const visitor = traverse.visitors.merge(\n visitors,\n passes,\n file.opts.wrapPluginVisitorMethod,\n );\n if (process.env.BABEL_8_BREAKING) {\n traverse(file.ast.program, visitor, file.scope, null, file.path, true);\n } else {\n traverse(file.ast, visitor, file.scope);\n }\n\n for (const [plugin, pass] of passPairs) {\n const fn = plugin.post;\n if (fn) {\n // eslint-disable-next-line @typescript-eslint/no-confusing-void-expression\n const result = fn.call(pass, file);\n\n // @ts-expect-error - If we want to support async .post\n yield* [];\n\n if (isThenable(result)) {\n throw new Error(\n `You appear to be using an plugin with an async .post, ` +\n `which your current version of Babel does not support. ` +\n `If you're using a published plugin, you may need to upgrade ` +\n `your @babel/core version.`,\n );\n }\n }\n }\n }\n}\n\nfunction isThenable>(val: any): val is T {\n return (\n !!val &&\n (typeof val === \"object\" || typeof val === \"function\") &&\n !!val.then &&\n typeof val.then === \"function\"\n );\n}\n","import gensync, { type Handler } from \"gensync\";\n\nimport loadConfig from \"./config/index.ts\";\nimport type { InputOptions, ResolvedConfig } from \"./config/index.ts\";\nimport { run } from \"./transformation/index.ts\";\n\nimport type { FileResult, FileResultCallback } from \"./transformation/index.ts\";\nimport { beginHiddenCallStack } from \"./errors/rewrite-stack-trace.ts\";\n\nexport type { FileResult } from \"./transformation/index.ts\";\n\ntype Transform = {\n (code: string, callback: FileResultCallback): void;\n (\n code: string,\n opts: InputOptions | undefined | null,\n callback: FileResultCallback,\n ): void;\n (code: string, opts?: InputOptions | null): FileResult | null;\n};\n\nconst transformRunner = gensync(function* transform(\n code: string,\n opts?: InputOptions,\n): Handler {\n const config: ResolvedConfig | null = yield* loadConfig(opts);\n if (config === null) return null;\n\n return yield* run(config, code);\n});\n\nexport const transform: Transform = function transform(\n code,\n optsOrCallback?: InputOptions | null | undefined | FileResultCallback,\n maybeCallback?: FileResultCallback,\n) {\n let opts: InputOptions | undefined | null;\n let callback: FileResultCallback | undefined;\n if (typeof optsOrCallback === \"function\") {\n callback = optsOrCallback;\n opts = undefined;\n } else {\n opts = optsOrCallback;\n callback = maybeCallback;\n }\n\n if (callback === undefined) {\n if (process.env.BABEL_8_BREAKING) {\n throw new Error(\n \"Starting from Babel 8.0.0, the 'transform' function expects a callback. If you need to call it synchronously, please use 'transformSync'.\",\n );\n } else {\n // console.warn(\n // \"Starting from Babel 8.0.0, the 'transform' function will expect a callback. If you need to call it synchronously, please use 'transformSync'.\",\n // );\n return beginHiddenCallStack(transformRunner.sync)(code, opts);\n }\n }\n\n beginHiddenCallStack(transformRunner.errback)(code, opts, callback);\n};\n\nexport function transformSync(\n ...args: Parameters\n) {\n return beginHiddenCallStack(transformRunner.sync)(...args);\n}\nexport function transformAsync(\n ...args: Parameters\n) {\n return beginHiddenCallStack(transformRunner.async)(...args);\n}\n","// duplicated from transform-file so we do not have to import anything here\ntype TransformFile = {\n (filename: string, callback: (error: Error, file: null) => void): void;\n (\n filename: string,\n opts: any,\n callback: (error: Error, file: null) => void,\n ): void;\n};\n\nexport const transformFile: TransformFile = function transformFile(\n filename,\n opts,\n callback?: (error: Error, file: null) => void,\n) {\n if (typeof opts === \"function\") {\n callback = opts;\n }\n\n callback(new Error(\"Transforming files is not supported in browsers\"), null);\n};\n\nexport function transformFileSync(): never {\n throw new Error(\"Transforming files is not supported in browsers\");\n}\n\nexport function transformFileAsync() {\n return Promise.reject(\n new Error(\"Transforming files is not supported in browsers\"),\n );\n}\n","import gensync, { type Handler } from \"gensync\";\n\nimport loadConfig from \"./config/index.ts\";\nimport type { InputOptions, ResolvedConfig } from \"./config/index.ts\";\nimport { run } from \"./transformation/index.ts\";\nimport type * as t from \"@babel/types\";\n\nimport { beginHiddenCallStack } from \"./errors/rewrite-stack-trace.ts\";\n\nimport type { FileResult, FileResultCallback } from \"./transformation/index.ts\";\ntype AstRoot = t.File | t.Program;\n\ntype TransformFromAst = {\n (ast: AstRoot, code: string, callback: FileResultCallback): void;\n (\n ast: AstRoot,\n code: string,\n opts: InputOptions | undefined | null,\n callback: FileResultCallback,\n ): void;\n (ast: AstRoot, code: string, opts?: InputOptions | null): FileResult | null;\n};\n\nconst transformFromAstRunner = gensync(function* (\n ast: AstRoot,\n code: string,\n opts: InputOptions | undefined | null,\n): Handler {\n const config: ResolvedConfig | null = yield* loadConfig(opts);\n if (config === null) return null;\n\n if (!ast) throw new Error(\"No AST given\");\n\n return yield* run(config, code, ast);\n});\n\nexport const transformFromAst: TransformFromAst = function transformFromAst(\n ast,\n code,\n optsOrCallback?: InputOptions | null | undefined | FileResultCallback,\n maybeCallback?: FileResultCallback,\n) {\n let opts: InputOptions | undefined | null;\n let callback: FileResultCallback | undefined;\n if (typeof optsOrCallback === \"function\") {\n callback = optsOrCallback;\n opts = undefined;\n } else {\n opts = optsOrCallback;\n callback = maybeCallback;\n }\n\n if (callback === undefined) {\n if (process.env.BABEL_8_BREAKING) {\n throw new Error(\n \"Starting from Babel 8.0.0, the 'transformFromAst' function expects a callback. If you need to call it synchronously, please use 'transformFromAstSync'.\",\n );\n } else {\n // console.warn(\n // \"Starting from Babel 8.0.0, the 'transformFromAst' function will expect a callback. If you need to call it synchronously, please use 'transformFromAstSync'.\",\n // );\n return beginHiddenCallStack(transformFromAstRunner.sync)(ast, code, opts);\n }\n }\n\n beginHiddenCallStack(transformFromAstRunner.errback)(\n ast,\n code,\n opts,\n callback,\n );\n};\n\nexport function transformFromAstSync(\n ...args: Parameters\n) {\n return beginHiddenCallStack(transformFromAstRunner.sync)(...args);\n}\n\nexport function transformFromAstAsync(\n ...args: Parameters\n) {\n return beginHiddenCallStack(transformFromAstRunner.async)(...args);\n}\n","import gensync, { type Handler } from \"gensync\";\n\nimport loadConfig, { type InputOptions } from \"./config/index.ts\";\nimport parser, { type ParseResult } from \"./parser/index.ts\";\nimport normalizeOptions from \"./transformation/normalize-opts.ts\";\nimport type { ValidatedOptions } from \"./config/validation/options.ts\";\n\nimport { beginHiddenCallStack } from \"./errors/rewrite-stack-trace.ts\";\n\ntype FileParseCallback = {\n (err: Error, ast: null): void;\n (err: null, ast: ParseResult | null): void;\n};\n\ntype Parse = {\n (code: string, callback: FileParseCallback): void;\n (\n code: string,\n opts: InputOptions | undefined | null,\n callback: FileParseCallback,\n ): void;\n (code: string, opts?: InputOptions | null): ParseResult | null;\n};\n\nconst parseRunner = gensync(function* parse(\n code: string,\n opts: InputOptions | undefined | null,\n): Handler {\n const config = yield* loadConfig(opts);\n\n if (config === null) {\n return null;\n }\n\n return yield* parser(config.passes, normalizeOptions(config), code);\n});\n\nexport const parse: Parse = function parse(\n code,\n opts?,\n callback?: FileParseCallback,\n) {\n if (typeof opts === \"function\") {\n callback = opts;\n opts = undefined as ValidatedOptions;\n }\n\n if (callback === undefined) {\n if (process.env.BABEL_8_BREAKING) {\n throw new Error(\n \"Starting from Babel 8.0.0, the 'parse' function expects a callback. If you need to call it synchronously, please use 'parseSync'.\",\n );\n } else {\n // console.warn(\n // \"Starting from Babel 8.0.0, the 'parse' function will expect a callback. If you need to call it synchronously, please use 'parseSync'.\",\n // );\n return beginHiddenCallStack(parseRunner.sync)(code, opts);\n }\n }\n\n beginHiddenCallStack(parseRunner.errback)(code, opts, callback);\n};\n\nexport function parseSync(...args: Parameters) {\n return beginHiddenCallStack(parseRunner.sync)(...args);\n}\nexport function parseAsync(...args: Parameters) {\n return beginHiddenCallStack(parseRunner.async)(...args);\n}\n","if (!process.env.IS_PUBLISH && !USE_ESM && process.env.BABEL_8_BREAKING) {\n throw new Error(\n \"BABEL_8_BREAKING is only supported in ESM. Please run `make use-esm`.\",\n );\n}\n\nexport const version = PACKAGE_JSON.version;\n\nexport { default as File } from \"./transformation/file/file.ts\";\nexport type { default as PluginPass } from \"./transformation/plugin-pass.ts\";\nexport { default as buildExternalHelpers } from \"./tools/build-external-helpers.ts\";\nexport { resolvePlugin, resolvePreset } from \"./config/files/index.ts\";\n\nexport { getEnv } from \"./config/helpers/environment.ts\";\n\n// NOTE: Lazy re-exports aren't detected by the Node.js CJS-ESM interop.\n// These are handled by pluginInjectNodeReexportsHints in our babel.config.js\n// so that they can work well.\nexport * as types from \"@babel/types\";\nexport { tokTypes } from \"@babel/parser\";\nexport { default as traverse } from \"@babel/traverse\";\nexport { default as template } from \"@babel/template\";\n\n// rollup-plugin-dts assumes that all re-exported types are also valid values\n// Visitor is only a type, so we need to use this workaround to prevent\n// rollup-plugin-dts from breaking it.\n// TODO: Figure out how to fix this upstream.\nexport type { NodePath, Scope } from \"@babel/traverse\";\nexport type Visitor = import(\"@babel/traverse\").Visitor;\n\nexport {\n createConfigItem,\n createConfigItemSync,\n createConfigItemAsync,\n} from \"./config/index.ts\";\n\nexport {\n loadPartialConfig,\n loadPartialConfigSync,\n loadPartialConfigAsync,\n loadOptions,\n loadOptionsAsync,\n} from \"./config/index.ts\";\nimport { loadOptionsSync } from \"./config/index.ts\";\nexport { loadOptionsSync };\n\nexport type {\n CallerMetadata,\n InputOptions,\n PluginAPI,\n PluginObject,\n PresetAPI,\n PresetObject,\n ConfigItem,\n} from \"./config/index.ts\";\n\nexport {\n transform,\n transformSync,\n transformAsync,\n type FileResult,\n} from \"./transform.ts\";\nexport {\n transformFile,\n transformFileSync,\n transformFileAsync,\n} from \"./transform-file.ts\";\nexport {\n transformFromAst,\n transformFromAstSync,\n transformFromAstAsync,\n} from \"./transform-ast.ts\";\nexport { parse, parseSync, parseAsync } from \"./parse.ts\";\n\n/**\n * Recommended set of compilable extensions. Not used in @babel/core directly, but meant as\n * as an easy source for tooling making use of @babel/core.\n */\nexport const DEFAULT_EXTENSIONS = Object.freeze([\n \".js\",\n \".jsx\",\n \".es6\",\n \".es\",\n \".mjs\",\n \".cjs\",\n] as const);\n\nimport Module from \"module\";\nimport * as thisFile from \"./index.ts\";\nif (USE_ESM && !IS_STANDALONE) {\n // Pass this module to the CJS proxy, so that it can be synchronously accessed.\n const cjsProxy = Module.createRequire(import.meta.url)(\"../cjs-proxy.cjs\");\n cjsProxy[\"__ initialize @babel/core cjs proxy __\"] = thisFile;\n}\n\nif (!process.env.BABEL_8_BREAKING && !USE_ESM) {\n // For easier backward-compatibility, provide an API like the one we exposed in Babel 6.\n // eslint-disable-next-line no-restricted-globals\n exports.OptionManager = class OptionManager {\n init(opts: unknown) {\n return loadOptionsSync(opts);\n }\n };\n\n // eslint-disable-next-line no-restricted-globals\n exports.Plugin = function Plugin(alias: string) {\n throw new Error(\n `The (${alias}) Babel 5 plugin is being run with an unsupported Babel version.`,\n );\n };\n}\n","export default function makeNoopPlugin() {\n let p;\n return ((p = (() => ({})) as any).default = p);\n}\n","/**\n * Since we bundle @babel/core, we don't need @babel/helper-plugin-utils\n * to handle older versions.\n */\n\nexport function declare(x: any) {\n return x;\n}\nexport { declare as declarePreset };\n","import { declare } from \"@babel/helper-plugin-utils\";\nimport { types as t } from \"@babel/core\";\n\nexport interface Options {\n helperVersion?: string;\n whitelist?: false | string[];\n}\n\nexport default declare((api, options: Options) => {\n api.assertVersion(REQUIRED_VERSION(7));\n\n const { helperVersion = \"7.0.0-beta.0\", whitelist = false } = options;\n\n if (\n whitelist !== false &&\n (!Array.isArray(whitelist) || whitelist.some(w => typeof w !== \"string\"))\n ) {\n throw new Error(\n \".whitelist must be undefined, false, or an array of strings\",\n );\n }\n\n const helperWhitelist = whitelist ? new Set(whitelist) : null;\n\n return {\n name: \"external-helpers\",\n pre(file) {\n file.set(\"helperGenerator\", (name: string) => {\n // If the helper didn't exist yet at the version given, we bail\n // out and let Babel either insert it directly, or throw an error\n // so that plugins can handle that case properly.\n if (\n file.availableHelper &&\n !file.availableHelper(name, helperVersion)\n ) {\n return;\n }\n\n // babelCore.buildExternalHelpers() allows a whitelist of helpers that\n // will be inserted into the external helpers list. That same whitelist\n // should be passed into the plugin here in that case, so that we can\n // avoid referencing 'babelHelpers.XX' when the helper does not exist.\n if (helperWhitelist && !helperWhitelist.has(name)) return;\n\n return t.memberExpression(\n t.identifier(\"babelHelpers\"),\n t.identifier(name),\n );\n });\n },\n };\n});\n","import { declare } from \"@babel/helper-plugin-utils\";\n\nexport default declare(api => {\n api.assertVersion(REQUIRED_VERSION(7));\n\n return {\n name: \"syntax-decimal\",\n\n manipulateOptions(opts, parserOpts) {\n parserOpts.plugins.push(\"decimal\");\n },\n };\n});\n","import { declare } from \"@babel/helper-plugin-utils\";\n\nexport interface Options {\n // TODO(Babel 8): Remove\n legacy?: boolean;\n // TODO(Babel 8): Remove \"2018-09\", \"2021-12\", '2022-03', '2023-01' and '2023-05'\n version?:\n | \"legacy\"\n | \"2018-09\"\n | \"2021-12\"\n | \"2022-03\"\n | \"2023-01\"\n | \"2023-05\"\n | \"2023-11\";\n // TODO(Babel 8): Remove\n decoratorsBeforeExport?: boolean;\n}\n\nexport default declare((api, options: Options) => {\n api.assertVersion(REQUIRED_VERSION(7));\n\n let { version } = options;\n\n if (process.env.BABEL_8_BREAKING) {\n if (version === undefined) {\n throw new Error(\n \"The decorators plugin requires a 'version' option, whose value must be one of: \" +\n \"'2023-11', '2023-05', '2023-01', '2022-03', '2021-12', '2018-09', or 'legacy'.\",\n );\n }\n if (\n version !== \"2023-11\" &&\n version !== \"2023-05\" &&\n version !== \"2023-01\" &&\n version !== \"2022-03\" &&\n version !== \"2021-12\" &&\n version !== \"legacy\"\n ) {\n throw new Error(\"Unsupported decorators version: \" + version);\n }\n if (options.legacy !== undefined) {\n throw new Error(\n `The .legacy option has been removed in Babel 8. Use .version: \"legacy\" instead.`,\n );\n }\n if (options.decoratorsBeforeExport !== undefined) {\n throw new Error(\n `The .decoratorsBeforeExport option has been removed in Babel 8.`,\n );\n }\n } else {\n const { legacy } = options;\n\n if (legacy !== undefined) {\n if (typeof legacy !== \"boolean\") {\n throw new Error(\".legacy must be a boolean.\");\n }\n if (version !== undefined) {\n throw new Error(\n \"You can either use the .legacy or the .version option, not both.\",\n );\n }\n }\n\n if (version === undefined) {\n version = legacy ? \"legacy\" : \"2018-09\";\n } else if (\n version !== \"2023-11\" &&\n version !== \"2023-05\" &&\n version !== \"2023-01\" &&\n version !== \"2022-03\" &&\n version !== \"2021-12\" &&\n version !== \"2018-09\" &&\n version !== \"legacy\"\n ) {\n // Fallback to print the invalid version option regardless of the type\n // eslint-disable-next-line @typescript-eslint/restrict-plus-operands\n throw new Error(\"Unsupported decorators version: \" + version);\n }\n\n // eslint-disable-next-line no-var\n var { decoratorsBeforeExport } = options;\n if (decoratorsBeforeExport === undefined) {\n if (version === \"2021-12\" || version === \"2022-03\") {\n decoratorsBeforeExport = false;\n } else if (version === \"2018-09\") {\n throw new Error(\n \"The decorators plugin, when .version is '2018-09' or not specified,\" +\n \" requires a 'decoratorsBeforeExport' option, whose value must be a boolean.\",\n );\n }\n } else {\n if (\n version === \"legacy\" ||\n version === \"2022-03\" ||\n version === \"2023-01\"\n ) {\n throw new Error(\n `'decoratorsBeforeExport' can't be used with ${version} decorators.`,\n );\n }\n if (typeof decoratorsBeforeExport !== \"boolean\") {\n throw new Error(\"'decoratorsBeforeExport' must be a boolean.\");\n }\n }\n }\n\n return {\n name: \"syntax-decorators\",\n\n manipulateOptions({ generatorOpts }, parserOpts) {\n if (version === \"legacy\") {\n parserOpts.plugins.push(\"decorators-legacy\");\n } else if (process.env.BABEL_8_BREAKING) {\n parserOpts.plugins.push(\n [\"decorators\", { allowCallParenthesized: false }],\n \"decoratorAutoAccessors\",\n );\n } else {\n if (\n version === \"2023-01\" ||\n version === \"2023-05\" ||\n version === \"2023-11\"\n ) {\n parserOpts.plugins.push(\n [\"decorators\", { allowCallParenthesized: false }],\n \"decoratorAutoAccessors\",\n );\n } else if (version === \"2022-03\") {\n parserOpts.plugins.push(\n [\n \"decorators\",\n { decoratorsBeforeExport: false, allowCallParenthesized: false },\n ],\n \"decoratorAutoAccessors\",\n );\n } else if (version === \"2021-12\") {\n parserOpts.plugins.push(\n [\"decorators\", { decoratorsBeforeExport }],\n \"decoratorAutoAccessors\",\n );\n generatorOpts.decoratorsBeforeExport = decoratorsBeforeExport;\n } else if (version === \"2018-09\") {\n parserOpts.plugins.push([\"decorators\", { decoratorsBeforeExport }]);\n generatorOpts.decoratorsBeforeExport = decoratorsBeforeExport;\n }\n }\n },\n };\n});\n","import { declare } from \"@babel/helper-plugin-utils\";\n\nexport default declare(api => {\n api.assertVersion(REQUIRED_VERSION(7));\n\n return {\n name: \"syntax-destructuring-private\",\n\n manipulateOptions(_, parserOpts) {\n parserOpts.plugins.push(\"destructuringPrivate\");\n },\n };\n});\n","import { declare } from \"@babel/helper-plugin-utils\";\n\nexport default declare(api => {\n api.assertVersion(REQUIRED_VERSION(7));\n\n return {\n name: \"syntax-do-expressions\",\n\n manipulateOptions(opts, parserOpts) {\n parserOpts.plugins.push(\"doExpressions\");\n },\n };\n});\n","import { declare } from \"@babel/helper-plugin-utils\";\n\nexport default declare(api => {\n api.assertVersion(REQUIRED_VERSION(7));\n\n return {\n name: \"syntax-explicit-resource-management\",\n\n manipulateOptions(opts, parserOpts) {\n parserOpts.plugins.push(\"explicitResourceManagement\");\n },\n };\n});\n","import { declare } from \"@babel/helper-plugin-utils\";\n\nexport default declare(api => {\n api.assertVersion(REQUIRED_VERSION(7));\n\n return {\n name: \"syntax-export-default-from\",\n\n manipulateOptions(opts, parserOpts) {\n parserOpts.plugins.push(\"exportDefaultFrom\");\n },\n };\n});\n","import { declare } from \"@babel/helper-plugin-utils\";\n\nexport interface Options {\n all?: boolean;\n enums?: boolean;\n}\n\nexport default declare((api, options: Options) => {\n api.assertVersion(REQUIRED_VERSION(7));\n\n // When enabled and plugins includes flow, all files should be parsed as if\n // the @flow pragma was provided.\n const { all, enums } = options;\n\n if (typeof all !== \"boolean\" && typeof all !== \"undefined\") {\n throw new Error(\".all must be a boolean, or undefined\");\n }\n\n if (typeof enums !== \"boolean\" && typeof enums !== \"undefined\") {\n throw new Error(\".enums must be a boolean, or undefined\");\n }\n\n return {\n name: \"syntax-flow\",\n\n manipulateOptions(opts, parserOpts) {\n if (!process.env.BABEL_8_BREAKING) {\n // If the file has already enabled TS, assume that this is not a\n // valid Flowtype file.\n if (\n parserOpts.plugins.some(\n p => (Array.isArray(p) ? p[0] : p) === \"typescript\",\n )\n ) {\n return;\n }\n }\n\n parserOpts.plugins.push([\"flow\", { all, enums }]);\n },\n };\n});\n","import { declare } from \"@babel/helper-plugin-utils\";\n\nexport default declare(api => {\n api.assertVersion(REQUIRED_VERSION(7));\n\n return {\n name: \"syntax-function-bind\",\n\n manipulateOptions(opts, parserOpts) {\n parserOpts.plugins.push(\"functionBind\");\n },\n };\n});\n","import { declare } from \"@babel/helper-plugin-utils\";\n\nexport default declare(api => {\n api.assertVersion(REQUIRED_VERSION(7));\n\n return {\n name: \"syntax-function-sent\",\n\n manipulateOptions(opts, parserOpts) {\n parserOpts.plugins.push(\"functionSent\");\n },\n };\n});\n","import { declare } from \"@babel/helper-plugin-utils\";\n\nexport default declare(api => {\n api.assertVersion(REQUIRED_VERSION(7));\n\n return {\n name: \"syntax-import-assertions\",\n\n manipulateOptions(opts, { plugins }) {\n for (let i = 0; i < plugins.length; i++) {\n const plugin = plugins[i];\n if (plugin === \"importAttributes\") {\n plugins[i] = [\"importAttributes\", { deprecatedAssertSyntax: true }];\n return;\n }\n if (Array.isArray(plugin) && plugin[0] === \"importAttributes\") {\n if (plugin.length < 2) (plugins[i] as any[]).push({});\n plugin[1].deprecatedAssertSyntax = true;\n return;\n }\n }\n plugins.push(\"importAssertions\");\n },\n };\n});\n","import { declare } from \"@babel/helper-plugin-utils\";\n\nexport interface Options {\n deprecatedAssertSyntax?: boolean;\n}\n\nexport default declare((api, { deprecatedAssertSyntax }: Options) => {\n api.assertVersion(REQUIRED_VERSION(\"^7.22.0\"));\n\n if (\n deprecatedAssertSyntax != null &&\n typeof deprecatedAssertSyntax !== \"boolean\"\n ) {\n throw new Error(\n \"'deprecatedAssertSyntax' must be a boolean, if specified.\",\n );\n }\n\n return {\n name: \"syntax-import-attributes\",\n\n manipulateOptions({ parserOpts, generatorOpts }) {\n generatorOpts.importAttributesKeyword ??= \"with\";\n\n const importAssertionsPluginIndex =\n parserOpts.plugins.indexOf(\"importAssertions\");\n if (importAssertionsPluginIndex !== -1) {\n parserOpts.plugins.splice(importAssertionsPluginIndex, 1);\n deprecatedAssertSyntax = true;\n }\n\n parserOpts.plugins.push([\n \"importAttributes\",\n { deprecatedAssertSyntax: Boolean(deprecatedAssertSyntax) },\n ]);\n },\n };\n});\n","import { declare } from \"@babel/helper-plugin-utils\";\n\nexport default declare(api => {\n api.assertVersion(REQUIRED_VERSION(7));\n\n return {\n name: \"syntax-import-reflection\",\n\n manipulateOptions(_, parserOpts) {\n parserOpts.plugins.push(\"importReflection\");\n },\n };\n});\n","import { declare } from \"@babel/helper-plugin-utils\";\n\nexport default declare(api => {\n api.assertVersion(REQUIRED_VERSION(7));\n\n return {\n name: \"syntax-jsx\",\n\n manipulateOptions(opts, parserOpts) {\n if (!process.env.BABEL_8_BREAKING) {\n // If the Typescript plugin already ran, it will have decided whether\n // or not this is a TSX file.\n if (\n parserOpts.plugins.some(\n p => (Array.isArray(p) ? p[0] : p) === \"typescript\",\n )\n ) {\n return;\n }\n }\n\n parserOpts.plugins.push(\"jsx\");\n },\n };\n});\n","import { declare } from \"@babel/helper-plugin-utils\";\n\nexport default declare(api => {\n api.assertVersion(REQUIRED_VERSION(7));\n\n return {\n name: \"syntax-module-blocks\",\n\n manipulateOptions(opts, parserOpts) {\n parserOpts.plugins.push(\"moduleBlocks\");\n },\n };\n});\n","import { declare } from \"@babel/helper-plugin-utils\";\nimport { OptionValidator } from \"@babel/helper-validator-option\";\n\nconst v = new OptionValidator(PACKAGE_JSON.name);\n\nexport interface Options {\n version: \"2023-07\";\n}\n\nexport default declare((api, options: Options) => {\n api.assertVersion(REQUIRED_VERSION(\"^7.23.0\"));\n\n v.validateTopLevelOptions(options, { version: \"version\" });\n const { version } = options;\n v.invariant(\n version === \"2023-07\",\n \"'.version' option required, representing the last proposal update. \" +\n \"Currently, the only supported value is '2023-07'.\",\n );\n\n return {\n name: \"syntax-optional-chaining-assign\",\n\n manipulateOptions(opts, parserOpts) {\n parserOpts.plugins.push([\"optionalChainingAssign\", { version }]);\n },\n };\n});\n","import { declare } from \"@babel/helper-plugin-utils\";\n\nconst PIPELINE_PROPOSALS = [\"minimal\", \"fsharp\", \"hack\", \"smart\"] as const;\nconst TOPIC_TOKENS = [\"^^\", \"@@\", \"^\", \"%\", \"#\"] as const;\nconst documentationURL =\n \"https://babeljs.io/docs/en/babel-plugin-proposal-pipeline-operator\";\n\nexport interface Options {\n proposal: (typeof PIPELINE_PROPOSALS)[number];\n topicToken?: (typeof TOPIC_TOKENS)[number];\n}\n\nexport default declare((api, { proposal, topicToken }: Options) => {\n api.assertVersion(REQUIRED_VERSION(7));\n\n if (typeof proposal !== \"string\" || !PIPELINE_PROPOSALS.includes(proposal)) {\n const proposalList = PIPELINE_PROPOSALS.map(p => `\"${p}\"`).join(\", \");\n throw new Error(\n `The pipeline plugin requires a \"proposal\" option. \"proposal\" must be one of: ${proposalList}. See <${documentationURL}>.`,\n );\n }\n\n if (proposal === \"hack\" && !TOPIC_TOKENS.includes(topicToken)) {\n const topicTokenList = TOPIC_TOKENS.map(t => `\"${t}\"`).join(\", \");\n throw new Error(\n `The pipeline plugin in \"proposal\": \"hack\" mode also requires a \"topicToken\" option. \"topicToken\" must be one of: ${topicTokenList}. See <${documentationURL}>.`,\n );\n }\n\n return {\n name: \"syntax-pipeline-operator\",\n\n manipulateOptions(opts, parserOpts) {\n // Add parser options.\n parserOpts.plugins.push([\"pipelineOperator\", { proposal, topicToken }]);\n\n // Add generator options.\n opts.generatorOpts.topicToken = topicToken;\n },\n };\n});\n","import { declare } from \"@babel/helper-plugin-utils\";\n\nexport interface Options {\n syntaxType: \"hash\" | \"bar\";\n}\n\nexport default declare((api, options: Options) => {\n api.assertVersion(REQUIRED_VERSION(7));\n if (process.env.BABEL_8_BREAKING) {\n if (options.syntaxType === \"bar\") {\n throw new Error(\n '@babel/plugin-proposal-record-and-tuple: The syntaxType option is no longer supported. Please remove { syntaxType: \"bar\" } from your Babel config and migrate to the hash syntax #{} and #[].',\n );\n } else if (options.syntaxType === \"hash\") {\n throw new Error(\n '@babel/plugin-proposal-record-and-tuple: The syntaxType option is no longer supported. You can safely remove { syntaxType: \"hash\" } from your Babel config.',\n );\n }\n }\n\n return {\n name: \"syntax-record-and-tuple\",\n\n manipulateOptions(opts, parserOpts) {\n if (process.env.BABEL_8_BREAKING) {\n parserOpts.plugins.push(\"recordAndTuple\");\n } else {\n opts.generatorOpts.recordAndTupleSyntaxType = options.syntaxType;\n\n parserOpts.plugins.push([\n \"recordAndTuple\",\n { syntaxType: options.syntaxType },\n ]);\n }\n },\n };\n});\n","import { declare } from \"@babel/helper-plugin-utils\";\n\nif (!process.env.BABEL_8_BREAKING) {\n // eslint-disable-next-line no-var\n var removePlugin = function (plugins: any[], name: string) {\n const indices: number[] = [];\n plugins.forEach((plugin, i) => {\n const n = Array.isArray(plugin) ? plugin[0] : plugin;\n\n if (n === name) {\n indices.unshift(i);\n }\n });\n\n for (const i of indices) {\n plugins.splice(i, 1);\n }\n };\n}\n\nexport interface Options {\n disallowAmbiguousJSXLike?: boolean;\n dts?: boolean;\n isTSX?: boolean;\n}\n\nexport default declare((api, opts: Options) => {\n api.assertVersion(REQUIRED_VERSION(7));\n\n const { disallowAmbiguousJSXLike, dts } = opts;\n\n if (!process.env.BABEL_8_BREAKING) {\n // eslint-disable-next-line no-var\n var { isTSX } = opts;\n }\n\n return {\n name: \"syntax-typescript\",\n\n manipulateOptions(opts, parserOpts) {\n if (!process.env.BABEL_8_BREAKING) {\n const { plugins } = parserOpts;\n // If the Flow syntax plugin already ran, remove it since Typescript\n // takes priority.\n removePlugin(plugins, \"flow\");\n\n // If the JSX syntax plugin already ran, remove it because JSX handling\n // in TS depends on the extensions, and is purely dependent on 'isTSX'.\n removePlugin(plugins, \"jsx\");\n\n if (!process.env.BABEL_8_BREAKING) {\n // These are now enabled by default in @babel/parser, but we push\n // them for compat with older versions.\n // @ts-ignore(Babel 7 vs Babel 8) These plugins have been removed\n plugins.push(\"objectRestSpread\", \"classProperties\");\n }\n\n if (isTSX) {\n plugins.push(\"jsx\");\n }\n }\n\n parserOpts.plugins.push([\n \"typescript\",\n { disallowAmbiguousJSXLike, dts },\n ]);\n },\n };\n});\n","import type { NodePath } from \"@babel/traverse\";\nimport template from \"@babel/template\";\nimport {\n blockStatement,\n callExpression,\n functionExpression,\n isAssignmentPattern,\n isFunctionDeclaration,\n isRestElement,\n returnStatement,\n isCallExpression,\n} from \"@babel/types\";\nimport type * as t from \"@babel/types\";\n\ntype ExpressionWrapperBuilder = (\n replacements?: Parameters>[0],\n) => t.CallExpression & {\n callee: t.FunctionExpression & {\n body: {\n body: [\n t.VariableDeclaration & {\n declarations: [\n { init: t.FunctionExpression | t.ArrowFunctionExpression },\n ];\n },\n ...ExtraBody,\n ];\n };\n };\n};\n\nconst buildAnonymousExpressionWrapper = template.expression(`\n (function () {\n var REF = FUNCTION;\n return function NAME(PARAMS) {\n return REF.apply(this, arguments);\n };\n })()\n`) as ExpressionWrapperBuilder<\n [t.ReturnStatement & { argument: t.FunctionExpression }]\n>;\n\nconst buildNamedExpressionWrapper = template.expression(`\n (function () {\n var REF = FUNCTION;\n function NAME(PARAMS) {\n return REF.apply(this, arguments);\n }\n return NAME;\n })()\n`) as ExpressionWrapperBuilder<\n [t.FunctionDeclaration, t.ReturnStatement & { argument: t.Identifier }]\n>;\n\nconst buildDeclarationWrapper = template.statements(`\n function NAME(PARAMS) { return REF.apply(this, arguments); }\n function REF() {\n REF = FUNCTION;\n return REF.apply(this, arguments);\n }\n`);\n\nfunction classOrObjectMethod(\n path: NodePath,\n callId: t.Expression,\n) {\n const node = path.node;\n const body = node.body;\n\n const container = functionExpression(\n null,\n [],\n blockStatement(body.body),\n true,\n );\n body.body = [\n returnStatement(callExpression(callExpression(callId, [container]), [])),\n ];\n\n // Regardless of whether or not the wrapped function is a an async method\n // or generator the outer function should not be\n node.async = false;\n node.generator = false;\n\n // Unwrap the wrapper IIFE's environment so super and this and such still work.\n (\n path.get(\"body.body.0.argument.callee.arguments.0\") as NodePath\n ).unwrapFunctionEnvironment();\n}\n\nfunction plainFunction(\n inPath: NodePath>,\n callId: t.Expression,\n noNewArrows: boolean,\n ignoreFunctionLength: boolean,\n hadName: boolean,\n) {\n let path: NodePath<\n | t.FunctionDeclaration\n | t.FunctionExpression\n | t.CallExpression\n | t.ArrowFunctionExpression\n > = inPath;\n let node;\n let functionId = null;\n const nodeParams = inPath.node.params;\n\n if (path.isArrowFunctionExpression()) {\n if (process.env.BABEL_8_BREAKING) {\n path = path.arrowFunctionToExpression({ noNewArrows });\n } else {\n // arrowFunctionToExpression returns undefined in @babel/traverse < 7.18.10\n path = path.arrowFunctionToExpression({ noNewArrows }) ?? path;\n }\n node = path.node as\n | t.FunctionDeclaration\n | t.FunctionExpression\n | t.CallExpression;\n } else {\n node = path.node;\n }\n\n const isDeclaration = isFunctionDeclaration(node);\n\n let built = node;\n if (!isCallExpression(node)) {\n functionId = node.id;\n node.id = null;\n node.type = \"FunctionExpression\";\n built = callExpression(callId, [\n node as Exclude,\n ]);\n }\n\n const params: t.Identifier[] = [];\n for (const param of nodeParams) {\n if (isAssignmentPattern(param) || isRestElement(param)) {\n break;\n }\n params.push(path.scope.generateUidIdentifier(\"x\"));\n }\n\n const wrapperArgs = {\n NAME: functionId || null,\n // TODO: Use `functionId` rather than `hadName` for the condition\n REF: path.scope.generateUidIdentifier(hadName ? functionId.name : \"ref\"),\n FUNCTION: built,\n PARAMS: params,\n };\n\n if (isDeclaration) {\n const container = buildDeclarationWrapper(wrapperArgs);\n path.replaceWith(container[0]);\n path.insertAfter(container[1]);\n } else {\n let container;\n\n if (hadName) {\n container = buildNamedExpressionWrapper(wrapperArgs);\n } else {\n container = buildAnonymousExpressionWrapper(wrapperArgs);\n }\n\n if (functionId || (!ignoreFunctionLength && params.length)) {\n path.replaceWith(container);\n } else {\n // we can omit this wrapper as the conditions it protects for do not apply\n path.replaceWith(built);\n }\n }\n}\n\nexport default function wrapFunction(\n path: NodePath,\n callId: t.Expression,\n // TODO(Babel 8): Consider defaulting to false for spec compliance\n noNewArrows: boolean = true,\n ignoreFunctionLength: boolean = false,\n) {\n if (path.isMethod()) {\n classOrObjectMethod(path, callId);\n } else {\n const hadName = \"id\" in path.node && !!path.node.id;\n if (!process.env.BABEL_8_BREAKING && !USE_ESM && !IS_STANDALONE) {\n // polyfill when being run by an older Babel version\n path.ensureFunctionName ??=\n // eslint-disable-next-line no-restricted-globals\n require(\"@babel/traverse\").NodePath.prototype.ensureFunctionName;\n }\n // @ts-expect-error It is invalid to call this on an arrow expression,\n // but we'll convert it to a function expression anyway.\n path = path.ensureFunctionName(false);\n plainFunction(\n path as NodePath>,\n callId,\n noNewArrows,\n ignoreFunctionLength,\n hadName,\n );\n }\n}\n","import { addComment, type Node } from \"@babel/types\";\n\nconst PURE_ANNOTATION = \"#__PURE__\";\n\nconst isPureAnnotated = ({ leadingComments }: Node): boolean =>\n !!leadingComments &&\n leadingComments.some(comment => /[@#]__PURE__/.test(comment.value));\n\nexport default function annotateAsPure(\n pathOrNode: Node | { node: Node },\n): void {\n const node =\n // @ts-expect-error Node will not have `node` property\n (pathOrNode[\"node\"] || pathOrNode) as Node;\n if (isPureAnnotated(node)) {\n return;\n }\n addComment(node, \"leading\", PURE_ANNOTATION);\n}\n","/* @noflow */\n\nimport type { NodePath } from \"@babel/core\";\nimport wrapFunction from \"@babel/helper-wrap-function\";\nimport annotateAsPure from \"@babel/helper-annotate-as-pure\";\nimport { types as t } from \"@babel/core\";\nimport { visitors } from \"@babel/traverse\";\nconst {\n callExpression,\n cloneNode,\n isIdentifier,\n isThisExpression,\n yieldExpression,\n} = t;\n\nconst awaitVisitor = visitors.environmentVisitor<{ wrapAwait: t.Expression }>({\n ArrowFunctionExpression(path) {\n path.skip();\n },\n\n AwaitExpression(path, { wrapAwait }) {\n const argument = path.get(\"argument\");\n\n path.replaceWith(\n yieldExpression(\n wrapAwait\n ? callExpression(cloneNode(wrapAwait), [argument.node])\n : argument.node,\n ),\n );\n },\n});\n\nexport default function (\n path: NodePath,\n helpers: {\n wrapAsync: t.Expression;\n wrapAwait?: t.Expression;\n },\n noNewArrows?: boolean,\n ignoreFunctionLength?: boolean,\n) {\n path.traverse(awaitVisitor, {\n wrapAwait: helpers.wrapAwait,\n });\n\n const isIIFE = checkIsIIFE(path);\n\n path.node.async = false;\n path.node.generator = true;\n\n wrapFunction(\n path,\n cloneNode(helpers.wrapAsync),\n noNewArrows,\n ignoreFunctionLength,\n );\n\n const isProperty =\n path.isObjectMethod() ||\n path.isClassMethod() ||\n path.parentPath.isObjectProperty() ||\n path.parentPath.isClassProperty();\n\n if (!isProperty && !isIIFE && path.isExpression()) {\n annotateAsPure(path);\n }\n\n function checkIsIIFE(path: NodePath) {\n if (path.parentPath.isCallExpression({ callee: path.node })) {\n return true;\n }\n\n // try to catch calls to Function#bind, as emitted by arrowFunctionToExpression in spec mode\n // this may also catch .bind(this) written by users, but does it matter? 🤔\n const { parentPath } = path;\n if (\n parentPath.isMemberExpression() &&\n isIdentifier(parentPath.node.property, { name: \"bind\" })\n ) {\n const { parentPath: bindCall } = parentPath;\n\n // (function () { ... }).bind(this)()\n\n return (\n // first, check if the .bind is actually being called\n bindCall.isCallExpression() &&\n // and whether its sole argument is 'this'\n bindCall.node.arguments.length === 1 &&\n isThisExpression(bindCall.node.arguments[0]) &&\n // and whether the result of the .bind(this) is being called\n bindCall.parentPath.isCallExpression({ callee: bindCall.node })\n );\n }\n\n return false;\n }\n}\n","import { types as t, template, type NodePath } from \"@babel/core\";\n\nconst buildForAwait = template(`\n async function wrapper() {\n var ITERATOR_ABRUPT_COMPLETION = false;\n var ITERATOR_HAD_ERROR_KEY = false;\n var ITERATOR_ERROR_KEY;\n try {\n for (\n var ITERATOR_KEY = GET_ITERATOR(OBJECT), STEP_KEY;\n ITERATOR_ABRUPT_COMPLETION = !(STEP_KEY = await ITERATOR_KEY.next()).done;\n ITERATOR_ABRUPT_COMPLETION = false\n ) {\n }\n } catch (err) {\n ITERATOR_HAD_ERROR_KEY = true;\n ITERATOR_ERROR_KEY = err;\n } finally {\n try {\n if (ITERATOR_ABRUPT_COMPLETION && ITERATOR_KEY.return != null) {\n await ITERATOR_KEY.return();\n }\n } finally {\n if (ITERATOR_HAD_ERROR_KEY) {\n throw ITERATOR_ERROR_KEY;\n }\n }\n }\n }\n`);\n\nexport default function (\n path: NodePath,\n { getAsyncIterator }: { getAsyncIterator: t.Identifier },\n) {\n const { node, scope, parent } = path;\n\n const stepKey = scope.generateUidIdentifier(\"step\");\n const stepValue = t.memberExpression(stepKey, t.identifier(\"value\"));\n const left = node.left;\n let declar;\n\n if (t.isIdentifier(left) || t.isPattern(left) || t.isMemberExpression(left)) {\n // for await (i of test), for await ({ i } of test)\n declar = t.expressionStatement(\n t.assignmentExpression(\"=\", left, stepValue),\n );\n } else if (t.isVariableDeclaration(left)) {\n // for await (let i of test)\n declar = t.variableDeclaration(left.kind, [\n t.variableDeclarator(left.declarations[0].id, stepValue),\n ]);\n }\n let template = buildForAwait({\n ITERATOR_HAD_ERROR_KEY: scope.generateUidIdentifier(\"didIteratorError\"),\n ITERATOR_ABRUPT_COMPLETION: scope.generateUidIdentifier(\n \"iteratorAbruptCompletion\",\n ),\n ITERATOR_ERROR_KEY: scope.generateUidIdentifier(\"iteratorError\"),\n ITERATOR_KEY: scope.generateUidIdentifier(\"iterator\"),\n GET_ITERATOR: getAsyncIterator,\n OBJECT: node.right,\n STEP_KEY: t.cloneNode(stepKey),\n });\n\n // remove async function wrapper\n // @ts-expect-error todo(flow->ts) improve type annotation for buildForAwait\n template = template.body.body as t.Statement[];\n\n const isLabeledParent = t.isLabeledStatement(parent);\n const tryBody = (template[3] as t.TryStatement).block.body;\n const loop = tryBody[0] as t.ForStatement;\n\n if (isLabeledParent) {\n tryBody[0] = t.labeledStatement(parent.label, loop);\n }\n\n return {\n replaceParent: isLabeledParent,\n node: template,\n declar,\n loop,\n };\n}\n","import { declare } from \"@babel/helper-plugin-utils\";\nimport remapAsyncToGenerator from \"@babel/helper-remap-async-to-generator\";\nimport type { NodePath, Visitor, PluginPass } from \"@babel/core\";\nimport { types as t } from \"@babel/core\";\nimport { visitors } from \"@babel/traverse\";\nimport rewriteForAwait from \"./for-await.ts\";\n\nexport default declare(api => {\n api.assertVersion(REQUIRED_VERSION(7));\n\n const yieldStarVisitor = visitors.environmentVisitor({\n ArrowFunctionExpression(path) {\n path.skip();\n },\n\n YieldExpression({ node }, state) {\n if (!node.delegate) return;\n const asyncIter = t.callExpression(state.addHelper(\"asyncIterator\"), [\n node.argument,\n ]);\n node.argument = t.callExpression(\n state.addHelper(\"asyncGeneratorDelegate\"),\n process.env.BABEL_8_BREAKING\n ? [asyncIter]\n : [asyncIter, state.addHelper(\"awaitAsyncGenerator\")],\n );\n },\n });\n\n const forAwaitVisitor = visitors.environmentVisitor({\n ArrowFunctionExpression(path) {\n path.skip();\n },\n\n ForOfStatement(path: NodePath, { file }) {\n const { node } = path;\n if (!node.await) return;\n\n const build = rewriteForAwait(path, {\n getAsyncIterator: file.addHelper(\"asyncIterator\"),\n });\n\n const { declar, loop } = build;\n const block = loop.body as t.BlockStatement;\n\n // ensure that it's a block so we can take all its statements\n path.ensureBlock();\n\n // add the value declaration to the new loop body\n if (declar) {\n block.body.push(declar);\n if (path.node.body.body.length) {\n block.body.push(t.blockStatement(path.node.body.body));\n }\n } else {\n block.body.push(...path.node.body.body);\n }\n\n t.inherits(loop, node);\n t.inherits(loop.body, node.body);\n\n const p = build.replaceParent ? path.parentPath : path;\n p.replaceWithMultiple(build.node);\n\n // TODO: Avoid crawl\n p.scope.parent.crawl();\n },\n });\n\n const visitor: Visitor = {\n Function(path, state) {\n if (!path.node.async) return;\n\n path.traverse(forAwaitVisitor, state);\n\n if (!path.node.generator) return;\n\n path.traverse(yieldStarVisitor, state);\n\n // We don't need to pass the noNewArrows assumption, since\n // async generators are never arrow functions.\n remapAsyncToGenerator(path, {\n wrapAsync: state.addHelper(\"wrapAsyncGenerator\"),\n wrapAwait: state.addHelper(\"awaitAsyncGenerator\"),\n });\n },\n };\n\n return {\n name: \"transform-async-generator-functions\",\n inherits:\n USE_ESM || IS_STANDALONE || api.version[0] === \"8\"\n ? undefined\n : // eslint-disable-next-line no-restricted-globals\n require(\"@babel/plugin-syntax-async-generators\").default,\n\n visitor: {\n Program(path, state) {\n // We need to traverse the ast here (instead of just vising Function\n // in the top level visitor) because for-await needs to run before the\n // async-to-generator plugin. This is because for-await is transpiled\n // using \"await\" expressions, which are then converted to \"yield\".\n //\n // This is bad for performance, but plugin ordering will allow as to\n // directly visit Function in the top level visitor.\n path.traverse(visitor, state);\n },\n },\n };\n});\n","import type { NodePath } from \"@babel/traverse\";\n\n/**\n * Test if a NodePath will be cast to boolean when evaluated.\n *\n * @example\n * // returns true\n * const nodePathAQDotB = NodePath(\"if (a?.#b) {}\").get(\"test\"); // a?.#b\n * willPathCastToBoolean(nodePathAQDotB)\n * @example\n * // returns false\n * willPathCastToBoolean(NodePath(\"a?.#b\"))\n * @todo Respect transparent expression wrappers\n * @see {@link packages/babel-plugin-transform-optional-chaining/src/util.js}\n * @param {NodePath} path\n * @returns {boolean}\n */\nexport function willPathCastToBoolean(path: NodePath): boolean {\n const maybeWrapped = path;\n const { node, parentPath } = maybeWrapped;\n if (parentPath.isLogicalExpression()) {\n const { operator, right } = parentPath.node;\n if (\n operator === \"&&\" ||\n operator === \"||\" ||\n (operator === \"??\" && node === right)\n ) {\n return willPathCastToBoolean(parentPath);\n }\n }\n if (parentPath.isSequenceExpression()) {\n const { expressions } = parentPath.node;\n if (expressions[expressions.length - 1] === node) {\n return willPathCastToBoolean(parentPath);\n } else {\n // if it is in the middle of a sequence expression, we don't\n // care the return value so just cast to boolean for smaller\n // output\n return true;\n }\n }\n return (\n parentPath.isConditional({ test: node }) ||\n parentPath.isUnaryExpression({ operator: \"!\" }) ||\n parentPath.isLoop({ test: node })\n );\n}\n","import type { NodePath, Visitor } from \"@babel/traverse\";\nimport {\n LOGICAL_OPERATORS,\n arrowFunctionExpression,\n assignmentExpression,\n binaryExpression,\n booleanLiteral,\n callExpression,\n cloneNode,\n conditionalExpression,\n identifier,\n isMemberExpression,\n isOptionalCallExpression,\n isOptionalMemberExpression,\n isUpdateExpression,\n logicalExpression,\n memberExpression,\n nullLiteral,\n optionalCallExpression,\n optionalMemberExpression,\n sequenceExpression,\n updateExpression,\n} from \"@babel/types\";\nimport type * as t from \"@babel/types\";\nimport { willPathCastToBoolean } from \"./util.ts\";\n\nclass AssignmentMemoiser {\n private _map: WeakMap;\n constructor() {\n this._map = new WeakMap();\n }\n\n has(key: t.Expression) {\n return this._map.has(key);\n }\n\n get(key: t.Expression) {\n if (!this.has(key)) return;\n\n const record = this._map.get(key);\n const { value } = record;\n\n record.count--;\n if (record.count === 0) {\n // The `count` access is the outermost function call (hopefully), so it\n // does the assignment.\n return assignmentExpression(\"=\", value, key);\n }\n return value;\n }\n\n set(key: t.Expression, value: t.Identifier, count: number) {\n return this._map.set(key, { count, value });\n }\n}\n\nfunction toNonOptional(\n path: NodePath,\n base: t.Expression,\n): t.Expression {\n const { node } = path;\n if (isOptionalMemberExpression(node)) {\n return memberExpression(base, node.property, node.computed);\n }\n\n if (path.isOptionalCallExpression()) {\n const callee = path.get(\"callee\");\n if (path.node.optional && callee.isOptionalMemberExpression()) {\n // object must be a conditional expression because the optional private access in object has been transformed\n const object = callee.node.object as t.ConditionalExpression;\n const context = path.scope.maybeGenerateMemoised(object);\n callee\n .get(\"object\")\n .replaceWith(assignmentExpression(\"=\", context, object));\n\n return callExpression(memberExpression(base, identifier(\"call\")), [\n context,\n ...path.node.arguments,\n ]);\n }\n\n return callExpression(base, path.node.arguments);\n }\n\n return path.node;\n}\n\n// Determines if the current path is in a detached tree. This can happen when\n// we are iterating on a path, and replace an ancestor with a new node. Babel\n// doesn't always stop traversing the old node tree, and that can cause\n// inconsistencies.\nfunction isInDetachedTree(path: NodePath) {\n while (path) {\n if (path.isProgram()) break;\n\n const { parentPath, container, listKey } = path;\n const parentNode = parentPath.node;\n if (listKey) {\n if (\n container !==\n // @ts-expect-error listKey must be a valid parent node key\n parentNode[listKey]\n ) {\n return true;\n }\n } else {\n if (container !== parentNode) return true;\n }\n\n path = parentPath;\n }\n\n return false;\n}\n\ntype Member = NodePath;\n\nconst handle = {\n memoise() {\n // noop.\n },\n\n handle(this: HandlerState, member: Member, noDocumentAll: boolean) {\n const { node, parent, parentPath, scope } = member;\n\n if (member.isOptionalMemberExpression()) {\n // Transforming optional chaining requires we replace ancestors.\n if (isInDetachedTree(member)) return;\n\n // We're looking for the end of _this_ optional chain, which is actually\n // the \"rightmost\" property access of the chain. This is because\n // everything up to that property access is \"optional\".\n //\n // Let's take the case of `FOO?.BAR.baz?.qux`, with `FOO?.BAR` being our\n // member. The \"end\" to most users would be `qux` property access.\n // Everything up to it could be skipped if it `FOO` were nullish. But\n // actually, we can consider the `baz` access to be the end. So we're\n // looking for the nearest optional chain that is `optional: true`.\n const endPath = member.find(({ node, parent }) => {\n if (isOptionalMemberExpression(parent)) {\n // We need to check `parent.object` since we could be inside the\n // computed expression of a `bad?.[FOO?.BAR]`. In this case, the\n // endPath is the `FOO?.BAR` member itself.\n return parent.optional || parent.object !== node;\n }\n if (isOptionalCallExpression(parent)) {\n // Checking `parent.callee` since we could be in the arguments, eg\n // `bad?.(FOO?.BAR)`.\n // Also skip `FOO?.BAR` in `FOO?.BAR?.()` since we need to transform the optional call to ensure proper this\n return (\n // In FOO?.#BAR?.(), endPath points the optional call expression so we skip FOO?.#BAR\n (node !== member.node && parent.optional) || parent.callee !== node\n );\n }\n return true;\n }) as NodePath;\n\n // Replace `function (a, x = a.b?.#c) {}` to `function (a, x = (() => a.b?.#c)() ){}`\n // so the temporary variable can be injected in correct scope\n // This can be further optimized to avoid unnecessary IIFE\n if (scope.path.isPattern()) {\n endPath.replaceWith(\n // The injected member will be queued and eventually transformed when visited\n callExpression(arrowFunctionExpression([], endPath.node), []),\n );\n return;\n }\n\n const willEndPathCastToBoolean = willPathCastToBoolean(endPath);\n\n const rootParentPath = endPath.parentPath;\n if (rootParentPath.isUpdateExpression({ argument: node })) {\n throw member.buildCodeFrameError(`can't handle update expression`);\n }\n const isAssignment = rootParentPath.isAssignmentExpression({\n left: endPath.node,\n });\n const isDeleteOperation = rootParentPath.isUnaryExpression({\n operator: \"delete\",\n });\n if (\n isDeleteOperation &&\n endPath.isOptionalMemberExpression() &&\n endPath.get(\"property\").isPrivateName()\n ) {\n // @babel/parser will throw error on `delete obj?.#x`.\n // This error serves as fallback when `delete obj?.#x` is constructed from babel types\n throw member.buildCodeFrameError(\n `can't delete a private class element`,\n );\n }\n\n // Now, we're looking for the start of this optional chain, which is\n // optional to the left of this member.\n //\n // Let's take the case of `foo?.bar?.baz.QUX?.BAM`, with `QUX?.BAM` being\n // our member. The \"start\" to most users would be `foo` object access.\n // But actually, we can consider the `bar` access to be the start. So\n // we're looking for the nearest optional chain that is `optional: true`,\n // which is guaranteed to be somewhere in the object/callee tree.\n let startingOptional: NodePath = member;\n for (;;) {\n if (startingOptional.isOptionalMemberExpression()) {\n if (startingOptional.node.optional) break;\n startingOptional = startingOptional.get(\"object\");\n continue;\n } else if (startingOptional.isOptionalCallExpression()) {\n if (startingOptional.node.optional) break;\n startingOptional = startingOptional.get(\"callee\");\n continue;\n }\n // prevent infinite loop: unreachable if the AST is well-formed\n throw new Error(\n `Internal error: unexpected ${startingOptional.node.type}`,\n );\n }\n\n const startingNode = startingOptional.isOptionalMemberExpression()\n ? startingOptional.node.object\n : startingOptional.node.callee;\n const baseNeedsMemoised = scope.maybeGenerateMemoised(startingNode);\n const baseRef = baseNeedsMemoised ?? startingNode;\n\n // Compute parentIsOptionalCall before `startingOptional` is replaced\n // as `node` may refer to `startingOptional.node` before replaced.\n const parentIsOptionalCall = parentPath.isOptionalCallExpression({\n callee: node,\n });\n // here we use a function to wrap `parentIsOptionalCall` to get type\n // for parent, do not use it anywhere else\n // See https://github.com/microsoft/TypeScript/issues/10421\n const isOptionalCall = (\n parent: t.Node,\n ): parent is t.OptionalCallExpression => parentIsOptionalCall;\n // if parentIsCall is true, it implies that node.extra.parenthesized is always true\n const parentIsCall = parentPath.isCallExpression({ callee: node });\n startingOptional.replaceWith(toNonOptional(startingOptional, baseRef));\n if (isOptionalCall(parent)) {\n if (parent.optional) {\n parentPath.replaceWith(this.optionalCall(member, parent.arguments));\n } else {\n parentPath.replaceWith(this.call(member, parent.arguments));\n }\n } else if (parentIsCall) {\n // `(a?.#b)()` to `(a == null ? void 0 : a.#b.bind(a))()`\n member.replaceWith(this.boundGet(member));\n } else if (\n (process.env.BABEL_8_BREAKING || this.delete) &&\n parentPath.isUnaryExpression({ operator: \"delete\" })\n ) {\n parentPath.replaceWith(this.delete(member));\n } else if (parentPath.isAssignmentExpression()) {\n // `a?.#b = c` to `(a == null ? void 0 : a.#b = c)`\n handleAssignment(this, member, parentPath);\n } else {\n member.replaceWith(this.get(member));\n }\n\n let regular: t.Expression = member.node;\n for (let current: NodePath = member; current !== endPath; ) {\n const parentPath = current.parentPath as NodePath;\n // skip transforming `Foo.#BAR?.call(FOO)`\n if (\n parentPath === endPath &&\n isOptionalCall(parent) &&\n parent.optional\n ) {\n regular = parentPath.node;\n break;\n }\n regular = toNonOptional(parentPath, regular);\n current = parentPath;\n }\n\n let context: t.Identifier;\n const endParentPath = endPath.parentPath as NodePath;\n if (\n isMemberExpression(regular) &&\n endParentPath.isOptionalCallExpression({\n callee: endPath.node,\n optional: true,\n })\n ) {\n const { object } = regular;\n context = member.scope.maybeGenerateMemoised(object);\n if (context) {\n regular.object = assignmentExpression(\n \"=\",\n context,\n // object must not be Super when `context` is an identifier\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion\n object as t.Expression,\n );\n }\n }\n\n let replacementPath: NodePath = endPath;\n if (isDeleteOperation || isAssignment) {\n replacementPath = endParentPath;\n regular = endParentPath.node;\n }\n\n const baseMemoised = baseNeedsMemoised\n ? assignmentExpression(\n \"=\",\n // When base needs memoised, the baseRef must be an identifier\n cloneNode(baseRef as t.Identifier),\n cloneNode(startingNode),\n )\n : cloneNode(baseRef);\n\n if (willEndPathCastToBoolean) {\n let nonNullishCheck;\n if (noDocumentAll) {\n nonNullishCheck = binaryExpression(\"!=\", baseMemoised, nullLiteral());\n } else {\n nonNullishCheck = logicalExpression(\n \"&&\",\n binaryExpression(\"!==\", baseMemoised, nullLiteral()),\n binaryExpression(\n \"!==\",\n cloneNode(baseRef),\n scope.buildUndefinedNode(),\n ),\n );\n }\n replacementPath.replaceWith(\n logicalExpression(\"&&\", nonNullishCheck, regular),\n );\n } else {\n let nullishCheck;\n if (noDocumentAll) {\n nullishCheck = binaryExpression(\"==\", baseMemoised, nullLiteral());\n } else {\n nullishCheck = logicalExpression(\n \"||\",\n binaryExpression(\"===\", baseMemoised, nullLiteral()),\n binaryExpression(\n \"===\",\n cloneNode(baseRef),\n scope.buildUndefinedNode(),\n ),\n );\n }\n\n replacementPath.replaceWith(\n conditionalExpression(\n nullishCheck,\n isDeleteOperation\n ? booleanLiteral(true)\n : scope.buildUndefinedNode(),\n regular,\n ),\n );\n }\n\n // context and isDeleteOperation can not be both truthy\n if (context) {\n const endParent = endParentPath.node as t.OptionalCallExpression;\n endParentPath.replaceWith(\n optionalCallExpression(\n optionalMemberExpression(\n endParent.callee,\n identifier(\"call\"),\n false,\n true,\n ),\n [cloneNode(context), ...endParent.arguments],\n false,\n ),\n );\n }\n\n return;\n }\n\n // MEMBER++ -> _set(MEMBER, (ref = _get(MEMBER), ref2 = ref++, ref)), ref2\n // ++MEMBER -> _set(MEMBER, (ref = _get(MEMBER), ++ref))\n if (isUpdateExpression(parent, { argument: node })) {\n if (this.simpleSet) {\n member.replaceWith(this.simpleSet(member));\n return;\n }\n\n const { operator, prefix } = parent;\n\n // Give the state handler a chance to memoise the member, since we'll\n // reference it twice. The second access (the set) should do the memo\n // assignment.\n this.memoise(member, 2);\n\n const ref = scope.generateUidIdentifierBasedOnNode(node);\n scope.push({ id: ref });\n\n const seq: t.Expression[] = [\n // ref = _get(MEMBER)\n assignmentExpression(\"=\", cloneNode(ref), this.get(member)),\n ];\n\n if (prefix) {\n seq.push(updateExpression(operator, cloneNode(ref), prefix));\n\n // (ref = _get(MEMBER), ++ref)\n const value = sequenceExpression(seq);\n parentPath.replaceWith(this.set(member, value));\n\n return;\n } else {\n const ref2 = scope.generateUidIdentifierBasedOnNode(node);\n scope.push({ id: ref2 });\n\n seq.push(\n assignmentExpression(\n \"=\",\n cloneNode(ref2),\n updateExpression(operator, cloneNode(ref), prefix),\n ),\n cloneNode(ref),\n );\n\n // (ref = _get(MEMBER), ref2 = ref++, ref)\n const value = sequenceExpression(seq);\n parentPath.replaceWith(\n sequenceExpression([this.set(member, value), cloneNode(ref2)]),\n );\n\n return;\n }\n }\n\n // MEMBER = VALUE -> _set(MEMBER, VALUE)\n // MEMBER += VALUE -> _set(MEMBER, _get(MEMBER) + VALUE)\n // MEMBER ??= VALUE -> _get(MEMBER) ?? _set(MEMBER, VALUE)\n if (parentPath.isAssignmentExpression({ left: node })) {\n handleAssignment(this, member, parentPath);\n return;\n }\n\n // MEMBER(ARGS) -> _call(MEMBER, ARGS)\n if (parentPath.isCallExpression({ callee: node })) {\n parentPath.replaceWith(this.call(member, parentPath.node.arguments));\n return;\n }\n\n // MEMBER?.(ARGS) -> _optionalCall(MEMBER, ARGS)\n if (parentPath.isOptionalCallExpression({ callee: node })) {\n // Replace `function (a, x = a.b.#c?.()) {}` to `function (a, x = (() => a.b.#c?.())() ){}`\n // so the temporary variable can be injected in correct scope\n // This can be further optimized to avoid unnecessary IIFE\n if (scope.path.isPattern()) {\n parentPath.replaceWith(\n // The injected member will be queued and eventually transformed when visited\n callExpression(arrowFunctionExpression([], parentPath.node), []),\n );\n return;\n }\n parentPath.replaceWith(\n this.optionalCall(member, parentPath.node.arguments),\n );\n return;\n }\n\n // delete MEMBER -> _delete(MEMBER)\n if (\n (process.env.BABEL_8_BREAKING || this.delete) &&\n parentPath.isUnaryExpression({ operator: \"delete\" })\n ) {\n parentPath.replaceWith(this.delete(member));\n return;\n }\n\n // for (MEMBER of ARR)\n // for (MEMBER in ARR)\n // { KEY: MEMBER } = OBJ -> { KEY: _destructureSet(MEMBER) } = OBJ\n // { KEY: MEMBER = _VALUE } = OBJ -> { KEY: _destructureSet(MEMBER) = _VALUE } = OBJ\n // {...MEMBER} -> {..._destructureSet(MEMBER)}\n //\n // [MEMBER] = ARR -> [_destructureSet(MEMBER)] = ARR\n // [MEMBER = _VALUE] = ARR -> [_destructureSet(MEMBER) = _VALUE] = ARR\n // [...MEMBER] -> [..._destructureSet(MEMBER)]\n if (\n // for (MEMBER of ARR)\n // for (MEMBER in ARR)\n parentPath.isForXStatement({ left: node }) ||\n // { KEY: MEMBER } = OBJ\n (parentPath.isObjectProperty({ value: node }) &&\n parentPath.parentPath.isObjectPattern()) ||\n // { KEY: MEMBER = _VALUE } = OBJ\n (parentPath.isAssignmentPattern({ left: node }) &&\n parentPath.parentPath.isObjectProperty({ value: parent }) &&\n parentPath.parentPath.parentPath.isObjectPattern()) ||\n // [MEMBER] = ARR\n parentPath.isArrayPattern() ||\n // [MEMBER = _VALUE] = ARR\n (parentPath.isAssignmentPattern({ left: node }) &&\n parentPath.parentPath.isArrayPattern()) ||\n // {...MEMBER}\n // [...MEMBER]\n parentPath.isRestElement()\n ) {\n member.replaceWith(this.destructureSet(member));\n return;\n }\n\n if (parentPath.isTaggedTemplateExpression()) {\n // MEMBER -> _get(MEMBER).bind(this)\n member.replaceWith(this.boundGet(member));\n } else {\n // MEMBER -> _get(MEMBER)\n member.replaceWith(this.get(member));\n }\n },\n};\n\nfunction handleAssignment(\n state: HandlerState,\n member: NodePath,\n parentPath: NodePath,\n) {\n if (state.simpleSet) {\n member.replaceWith(state.simpleSet(member));\n return;\n }\n\n const { operator, right: value } = parentPath.node;\n\n if (operator === \"=\") {\n parentPath.replaceWith(state.set(member, value));\n } else {\n const operatorTrunc = operator.slice(0, -1);\n if (LOGICAL_OPERATORS.includes(operatorTrunc)) {\n // Give the state handler a chance to memoise the member, since we'll\n // reference it twice. The first access (the get) should do the memo\n // assignment.\n state.memoise(member, 1);\n parentPath.replaceWith(\n logicalExpression(\n operatorTrunc as t.LogicalExpression[\"operator\"],\n state.get(member),\n state.set(member, value),\n ),\n );\n } else {\n // Here, the second access (the set) is evaluated first.\n state.memoise(member, 2);\n parentPath.replaceWith(\n state.set(\n member,\n binaryExpression(\n operatorTrunc as t.BinaryExpression[\"operator\"],\n state.get(member),\n value,\n ),\n ),\n );\n }\n }\n}\n\nexport interface Handler {\n memoise?(\n this: HandlerState & State,\n member: Member,\n count: number,\n ): void;\n destructureSet(\n this: HandlerState & State,\n member: Member,\n ): t.Expression;\n boundGet(this: HandlerState & State, member: Member): t.Expression;\n simpleSet?(this: HandlerState & State, member: Member): t.Expression;\n get(this: HandlerState & State, member: Member): t.Expression;\n set(\n this: HandlerState & State,\n member: Member,\n value: t.Expression,\n ): t.Expression;\n call(\n this: HandlerState & State,\n member: Member,\n args: t.CallExpression[\"arguments\"],\n ): t.Expression;\n optionalCall(\n this: HandlerState & State,\n member: Member,\n args: t.OptionalCallExpression[\"arguments\"],\n ): t.Expression;\n delete(this: HandlerState & State, member: Member): t.Expression;\n}\n\nexport interface HandlerState extends Handler {\n handle(\n this: HandlerState & State,\n member: Member,\n noDocumentAll?: boolean,\n ): void;\n memoiser: AssignmentMemoiser;\n}\n\n// We do not provide a default traversal visitor\n// Instead, caller passes one, and must call `state.handle` on the members\n// it wishes to be transformed.\n// Additionally, the caller must pass in a state object with at least\n// get, set, and call methods.\n// Optionally, a memoise method may be defined on the state, which will be\n// called when the member is a self-referential update.\nexport default function memberExpressionToFunctions(\n path: NodePath,\n visitor: Visitor>,\n state: Handler & CustomState,\n) {\n path.traverse(visitor, {\n ...handle,\n ...state,\n memoiser: new AssignmentMemoiser(),\n });\n}\n","import {\n callExpression,\n identifier,\n isIdentifier,\n isSpreadElement,\n memberExpression,\n optionalCallExpression,\n optionalMemberExpression,\n} from \"@babel/types\";\nimport type {\n CallExpression,\n Expression,\n OptionalCallExpression,\n} from \"@babel/types\";\n\n/**\n * A helper function that generates a new call expression with given thisNode.\n It will also optimize `(...arguments)` to `.apply(arguments)`\n *\n * @export\n * @param {Expression} callee The callee of call expression\n * @param {Expression} thisNode The desired this of call expression\n * @param {Readonly} args The arguments of call expression\n * @param {boolean} optional Whether the call expression is optional\n * @returns {CallExpression | OptionalCallExpression} The generated new call expression\n */\nexport default function optimiseCallExpression(\n callee: Expression,\n thisNode: Expression,\n args: Readonly,\n optional: boolean,\n): CallExpression | OptionalCallExpression {\n if (\n args.length === 1 &&\n isSpreadElement(args[0]) &&\n isIdentifier(args[0].argument, { name: \"arguments\" })\n ) {\n // a.b?.(...arguments);\n if (optional) {\n return optionalCallExpression(\n optionalMemberExpression(callee, identifier(\"apply\"), false, true),\n [thisNode, args[0].argument],\n false,\n );\n }\n // a.b(...arguments);\n return callExpression(memberExpression(callee, identifier(\"apply\")), [\n thisNode,\n args[0].argument,\n ]);\n } else {\n // a.b?.(arg1, arg2)\n if (optional) {\n return optionalCallExpression(\n optionalMemberExpression(callee, identifier(\"call\"), false, true),\n [thisNode, ...args],\n false,\n );\n }\n // a.b(arg1, arg2)\n return callExpression(memberExpression(callee, identifier(\"call\")), [\n thisNode,\n ...args,\n ]);\n }\n}\n","import type { File, NodePath, Scope } from \"@babel/core\";\nimport memberExpressionToFunctions from \"@babel/helper-member-expression-to-functions\";\nimport type { HandlerState } from \"@babel/helper-member-expression-to-functions\";\nimport optimiseCall from \"@babel/helper-optimise-call-expression\";\nimport { template, types as t } from \"@babel/core\";\nimport { visitors } from \"@babel/traverse\";\nconst {\n assignmentExpression,\n callExpression,\n cloneNode,\n identifier,\n memberExpression,\n sequenceExpression,\n stringLiteral,\n thisExpression,\n} = t;\n\nif (!process.env.BABEL_8_BREAKING && !USE_ESM && !IS_STANDALONE) {\n // eslint-disable-next-line no-restricted-globals\n exports.environmentVisitor = visitors.environmentVisitor({});\n // eslint-disable-next-line no-restricted-globals\n exports.skipAllButComputedKey = function skipAllButComputedKey(\n path: NodePath,\n ) {\n path.skip();\n if (path.node.computed) {\n path.context.maybeQueue(path.get(\"key\"));\n }\n };\n}\n\nconst visitor = visitors.environmentVisitor<\n HandlerState & ReplaceState\n>({\n Super(path, state) {\n const { node, parentPath } = path;\n if (!parentPath.isMemberExpression({ object: node })) return;\n state.handle(parentPath);\n },\n});\n\nconst unshadowSuperBindingVisitor = visitors.environmentVisitor<{\n refName: string;\n}>({\n Scopable(path, { refName }) {\n // https://github.com/Zzzen/babel/pull/1#pullrequestreview-564833183\n const binding = path.scope.getOwnBinding(refName);\n if (binding && binding.identifier.name === refName) {\n path.scope.rename(refName);\n }\n },\n});\n\ntype SharedState = {\n file: File;\n scope: Scope;\n isDerivedConstructor: boolean;\n isStatic: boolean;\n isPrivateMethod: boolean;\n getObjectRef: () => t.Identifier;\n getSuperRef: () => t.Identifier;\n // we dont need boundGet here, but memberExpressionToFunctions handler needs it.\n boundGet: HandlerState[\"get\"];\n};\n\ntype Handler = HandlerState & SharedState;\ntype SuperMember = NodePath<\n t.MemberExpression & {\n object: t.Super;\n property: Exclude;\n }\n>;\n\nconst enum Flags {\n Prototype = 0b1,\n Call = 0b10,\n}\n\ninterface SpecHandler\n extends Pick<\n Handler,\n | \"memoise\"\n | \"get\"\n | \"set\"\n | \"destructureSet\"\n | \"call\"\n | \"optionalCall\"\n | \"delete\"\n > {\n _get?(\n this: Handler & SpecHandler,\n superMember: SuperMember,\n ): t.CallExpression;\n _call?(\n this: Handler & SpecHandler,\n superMember: SuperMember,\n args: t.CallExpression[\"arguments\"],\n optional: boolean,\n ): t.CallExpression | t.OptionalCallExpression;\n _getPrototypeOfExpression(this: Handler & SpecHandler): t.CallExpression;\n prop(this: Handler & SpecHandler, superMember: SuperMember): t.Expression;\n}\n\nconst specHandlers: SpecHandler = {\n memoise(\n this: Handler & SpecHandler,\n superMember: SuperMember,\n count: number,\n ) {\n const { scope, node } = superMember;\n const { computed, property } = node;\n if (!computed) {\n return;\n }\n\n const memo = scope.maybeGenerateMemoised(property);\n if (!memo) {\n return;\n }\n\n this.memoiser.set(property, memo, count);\n },\n\n prop(this: Handler & SpecHandler, superMember: SuperMember) {\n const { computed, property } = superMember.node;\n if (this.memoiser.has(property)) {\n return cloneNode(this.memoiser.get(property));\n }\n\n if (computed) {\n return cloneNode(property);\n }\n\n return stringLiteral((property as t.Identifier).name);\n },\n\n /**\n * Creates an expression which result is the proto of objectRef.\n *\n * @example isStatic === true\n *\n * helpers.getPrototypeOf(CLASS)\n *\n * @example isStatic === false\n *\n * helpers.getPrototypeOf(CLASS.prototype)\n */\n _getPrototypeOfExpression(this: Handler & SpecHandler) {\n const objectRef = cloneNode(this.getObjectRef());\n const targetRef =\n this.isStatic || this.isPrivateMethod\n ? objectRef\n : memberExpression(objectRef, identifier(\"prototype\"));\n\n return callExpression(this.file.addHelper(\"getPrototypeOf\"), [targetRef]);\n },\n\n get(this: Handler & SpecHandler, superMember: SuperMember) {\n const objectRef = cloneNode(this.getObjectRef());\n return callExpression(this.file.addHelper(\"superPropGet\"), [\n this.isDerivedConstructor\n ? sequenceExpression([thisExpression(), objectRef])\n : objectRef,\n this.prop(superMember),\n thisExpression(),\n ...(this.isStatic || this.isPrivateMethod\n ? []\n : [t.numericLiteral(Flags.Prototype)]),\n ]);\n },\n\n _call(\n this: Handler & SpecHandler,\n superMember: SuperMember,\n args: t.CallExpression[\"arguments\"],\n optional: boolean,\n ): t.CallExpression | t.OptionalCallExpression {\n const objectRef = cloneNode(this.getObjectRef());\n let argsNode: t.ArrayExpression | t.Identifier;\n if (\n args.length === 1 &&\n t.isSpreadElement(args[0]) &&\n (t.isIdentifier(args[0].argument) ||\n t.isArrayExpression(args[0].argument))\n ) {\n argsNode = args[0].argument;\n } else {\n argsNode = t.arrayExpression(args as t.Expression[]);\n }\n\n const call = t.callExpression(this.file.addHelper(\"superPropGet\"), [\n this.isDerivedConstructor\n ? sequenceExpression([thisExpression(), objectRef])\n : objectRef,\n this.prop(superMember),\n thisExpression(),\n t.numericLiteral(\n Flags.Call |\n (this.isStatic || this.isPrivateMethod ? 0 : Flags.Prototype),\n ),\n ]);\n if (optional) {\n return t.optionalCallExpression(call, [argsNode], true);\n }\n return callExpression(call, [argsNode]);\n },\n\n set(\n this: Handler & SpecHandler,\n superMember: SuperMember,\n value: t.Expression,\n ) {\n const objectRef = cloneNode(this.getObjectRef());\n\n return callExpression(this.file.addHelper(\"superPropSet\"), [\n this.isDerivedConstructor\n ? sequenceExpression([thisExpression(), objectRef])\n : objectRef,\n this.prop(superMember),\n value,\n thisExpression(),\n t.numericLiteral(superMember.isInStrictMode() ? 1 : 0),\n ...(this.isStatic || this.isPrivateMethod ? [] : [t.numericLiteral(1)]),\n ]);\n },\n\n destructureSet(this: Handler & SpecHandler, superMember: SuperMember) {\n throw superMember.buildCodeFrameError(\n `Destructuring to a super field is not supported yet.`,\n );\n },\n\n call(\n this: Handler & SpecHandler,\n superMember: SuperMember,\n args: t.CallExpression[\"arguments\"],\n ) {\n return this._call(superMember, args, false);\n },\n\n optionalCall(\n this: Handler & SpecHandler,\n superMember: SuperMember,\n args: t.CallExpression[\"arguments\"],\n ) {\n return this._call(superMember, args, true);\n },\n\n delete(this: Handler & SpecHandler, superMember: SuperMember) {\n if (superMember.node.computed) {\n return sequenceExpression([\n callExpression(this.file.addHelper(\"toPropertyKey\"), [\n cloneNode(superMember.node.property),\n ]),\n template.expression.ast`\n function () { throw new ReferenceError(\"'delete super[expr]' is invalid\"); }()\n `,\n ]);\n } else {\n return template.expression.ast`\n function () { throw new ReferenceError(\"'delete super.prop' is invalid\"); }()\n `;\n }\n },\n};\n\nconst specHandlers_old: SpecHandler = {\n memoise(\n this: Handler & SpecHandler,\n superMember: SuperMember,\n count: number,\n ) {\n const { scope, node } = superMember;\n const { computed, property } = node;\n if (!computed) {\n return;\n }\n\n const memo = scope.maybeGenerateMemoised(property);\n if (!memo) {\n return;\n }\n\n this.memoiser.set(property, memo, count);\n },\n\n prop(this: Handler & SpecHandler, superMember: SuperMember) {\n const { computed, property } = superMember.node;\n if (this.memoiser.has(property)) {\n return cloneNode(this.memoiser.get(property));\n }\n\n if (computed) {\n return cloneNode(property);\n }\n\n return stringLiteral((property as t.Identifier).name);\n },\n\n /**\n * Creates an expression which result is the proto of objectRef.\n *\n * @example isStatic === true\n *\n * helpers.getPrototypeOf(CLASS)\n *\n * @example isStatic === false\n *\n * helpers.getPrototypeOf(CLASS.prototype)\n */\n _getPrototypeOfExpression(this: Handler & SpecHandler) {\n const objectRef = cloneNode(this.getObjectRef());\n const targetRef =\n this.isStatic || this.isPrivateMethod\n ? objectRef\n : memberExpression(objectRef, identifier(\"prototype\"));\n\n return callExpression(this.file.addHelper(\"getPrototypeOf\"), [targetRef]);\n },\n\n get(this: Handler & SpecHandler, superMember: SuperMember) {\n return this._get(superMember);\n },\n\n _get(this: Handler & SpecHandler, superMember: SuperMember) {\n const proto = this._getPrototypeOfExpression();\n return callExpression(this.file.addHelper(\"get\"), [\n this.isDerivedConstructor\n ? sequenceExpression([thisExpression(), proto])\n : proto,\n this.prop(superMember),\n thisExpression(),\n ]);\n },\n\n set(\n this: Handler & SpecHandler,\n superMember: SuperMember,\n value: t.Expression,\n ) {\n const proto = this._getPrototypeOfExpression();\n\n return callExpression(this.file.addHelper(\"set\"), [\n this.isDerivedConstructor\n ? sequenceExpression([thisExpression(), proto])\n : proto,\n this.prop(superMember),\n value,\n thisExpression(),\n t.booleanLiteral(superMember.isInStrictMode()),\n ]);\n },\n\n destructureSet(this: Handler & SpecHandler, superMember: SuperMember) {\n throw superMember.buildCodeFrameError(\n `Destructuring to a super field is not supported yet.`,\n );\n },\n\n call(\n this: Handler & SpecHandler,\n superMember: SuperMember,\n args: t.CallExpression[\"arguments\"],\n ) {\n return optimiseCall(this._get(superMember), thisExpression(), args, false);\n },\n\n optionalCall(\n this: Handler & SpecHandler,\n superMember: SuperMember,\n args: t.CallExpression[\"arguments\"],\n ) {\n return optimiseCall(\n this._get(superMember),\n cloneNode(thisExpression()),\n args,\n true,\n );\n },\n\n delete(this: Handler & SpecHandler, superMember: SuperMember) {\n if (superMember.node.computed) {\n return sequenceExpression([\n callExpression(this.file.addHelper(\"toPropertyKey\"), [\n cloneNode(superMember.node.property),\n ]),\n template.expression.ast`\n function () { throw new ReferenceError(\"'delete super[expr]' is invalid\"); }()\n `,\n ]);\n } else {\n return template.expression.ast`\n function () { throw new ReferenceError(\"'delete super.prop' is invalid\"); }()\n `;\n }\n },\n};\n\nconst looseHandlers = {\n ...specHandlers,\n\n prop(this: Handler & typeof specHandlers, superMember: SuperMember) {\n const { property } = superMember.node;\n if (this.memoiser.has(property)) {\n return cloneNode(this.memoiser.get(property));\n }\n\n return cloneNode(property);\n },\n\n get(this: Handler & typeof specHandlers, superMember: SuperMember) {\n const { isStatic, getSuperRef } = this;\n const { computed } = superMember.node;\n const prop = this.prop(superMember);\n\n let object;\n if (isStatic) {\n object =\n getSuperRef() ??\n memberExpression(identifier(\"Function\"), identifier(\"prototype\"));\n } else {\n object = memberExpression(\n getSuperRef() ?? identifier(\"Object\"),\n identifier(\"prototype\"),\n );\n }\n\n return memberExpression(object, prop, computed);\n },\n\n set(\n this: Handler & typeof specHandlers,\n superMember: SuperMember,\n value: t.Expression,\n ) {\n const { computed } = superMember.node;\n const prop = this.prop(superMember);\n\n return assignmentExpression(\n \"=\",\n memberExpression(thisExpression(), prop, computed),\n value,\n );\n },\n\n destructureSet(\n this: Handler & typeof specHandlers,\n superMember: SuperMember,\n ) {\n const { computed } = superMember.node;\n const prop = this.prop(superMember);\n\n return memberExpression(thisExpression(), prop, computed);\n },\n\n call(\n this: Handler & typeof specHandlers,\n superMember: SuperMember,\n args: t.CallExpression[\"arguments\"],\n ) {\n return optimiseCall(this.get(superMember), thisExpression(), args, false);\n },\n\n optionalCall(\n this: Handler & typeof specHandlers,\n superMember: SuperMember,\n args: t.CallExpression[\"arguments\"],\n ) {\n return optimiseCall(this.get(superMember), thisExpression(), args, true);\n },\n};\n\ntype ReplaceSupersOptionsBase = {\n methodPath: NodePath<\n | t.ClassMethod\n | t.ClassProperty\n | t.ObjectMethod\n | t.ClassPrivateMethod\n | t.ClassPrivateProperty\n | t.StaticBlock\n >;\n constantSuper?: boolean;\n file: File;\n // objectRef might have been shadowed in child scopes,\n // in that case, we need to rename related variables.\n refToPreserve?: t.Identifier;\n};\n\ntype ReplaceSupersOptions = ReplaceSupersOptionsBase &\n (\n | { objectRef?: undefined; getObjectRef: () => t.Node }\n | { objectRef: t.Node; getObjectRef?: undefined }\n ) &\n (\n | { superRef?: undefined; getSuperRef: () => t.Node }\n | { superRef: t.Node; getSuperRef?: undefined }\n );\n\ninterface ReplaceState {\n file: File;\n scope: Scope;\n isDerivedConstructor: boolean;\n isStatic: boolean;\n isPrivateMethod: boolean;\n getObjectRef: ReplaceSupers[\"getObjectRef\"];\n getSuperRef: ReplaceSupers[\"getSuperRef\"];\n}\n\nexport default class ReplaceSupers {\n constructor(opts: ReplaceSupersOptions) {\n const path = opts.methodPath;\n\n this.methodPath = path;\n this.isDerivedConstructor =\n path.isClassMethod({ kind: \"constructor\" }) && !!opts.superRef;\n this.isStatic =\n path.isObjectMethod() ||\n // @ts-expect-error static is not in ClassPrivateMethod\n path.node.static ||\n path.isStaticBlock?.();\n this.isPrivateMethod = path.isPrivate() && path.isMethod();\n\n this.file = opts.file;\n this.constantSuper = process.env.BABEL_8_BREAKING\n ? opts.constantSuper\n : // Fallback to isLoose for backward compatibility\n opts.constantSuper ?? (opts as any).isLoose;\n this.opts = opts;\n }\n\n declare file: File;\n declare isDerivedConstructor: boolean;\n declare constantSuper: boolean;\n declare isPrivateMethod: boolean;\n declare isStatic: boolean;\n declare methodPath: NodePath;\n declare opts: ReplaceSupersOptions;\n\n getObjectRef() {\n return cloneNode(this.opts.objectRef || this.opts.getObjectRef());\n }\n\n getSuperRef() {\n if (this.opts.superRef) return cloneNode(this.opts.superRef);\n if (this.opts.getSuperRef) {\n return cloneNode(this.opts.getSuperRef());\n }\n }\n\n replace() {\n const { methodPath } = this;\n // https://github.com/babel/babel/issues/11994\n if (this.opts.refToPreserve) {\n methodPath.traverse(unshadowSuperBindingVisitor, {\n refName: this.opts.refToPreserve.name,\n });\n }\n\n const handler = this.constantSuper\n ? looseHandlers\n : process.env.BABEL_8_BREAKING ||\n this.file.availableHelper(\"superPropSet\")\n ? specHandlers\n : specHandlers_old;\n\n // todo: this should have been handled by the environmentVisitor,\n // consider add visitSelf support for the path.traverse\n // @ts-expect-error: Refine typings in packages/babel-traverse/src/types.ts\n // shouldSkip is accepted in traverseNode\n visitor.shouldSkip = (path: NodePath) => {\n if (path.parentPath === methodPath) {\n if (path.parentKey === \"decorators\" || path.parentKey === \"key\") {\n return true;\n }\n }\n };\n\n memberExpressionToFunctions(methodPath, visitor, {\n file: this.file,\n scope: this.methodPath.scope,\n isDerivedConstructor: this.isDerivedConstructor,\n isStatic: this.isStatic,\n isPrivateMethod: this.isPrivateMethod,\n getObjectRef: this.getObjectRef.bind(this),\n getSuperRef: this.getSuperRef.bind(this),\n // we dont need boundGet here, but memberExpressionToFunctions handler needs it.\n boundGet: handler.get,\n ...handler,\n });\n }\n}\n","import {\n isParenthesizedExpression,\n isTSAsExpression,\n isTSNonNullExpression,\n isTSSatisfiesExpression,\n isTSTypeAssertion,\n isTypeCastExpression,\n} from \"@babel/types\";\n\nimport type * as t from \"@babel/types\";\nimport type { NodePath } from \"@babel/traverse\";\n\nexport type TransparentExprWrapper =\n | t.TSAsExpression\n | t.TSSatisfiesExpression\n | t.TSTypeAssertion\n | t.TSNonNullExpression\n | t.TypeCastExpression\n | t.ParenthesizedExpression;\n\n// A transparent expression wrapper is an AST node that most plugins will wish\n// to skip, as its presence does not affect the behaviour of the code. This\n// includes expressions used for types, and extra parenthesis. For example, in\n// (a as any)(), this helper can be used to skip the TSAsExpression when\n// determining the callee.\nexport function isTransparentExprWrapper(\n node: t.Node,\n): node is TransparentExprWrapper {\n return (\n isTSAsExpression(node) ||\n isTSSatisfiesExpression(node) ||\n isTSTypeAssertion(node) ||\n isTSNonNullExpression(node) ||\n isTypeCastExpression(node) ||\n isParenthesizedExpression(node)\n );\n}\n\nexport function skipTransparentExprWrappers(\n path: NodePath,\n): NodePath {\n while (isTransparentExprWrapper(path.node)) {\n path = path.get(\"expression\");\n }\n return path;\n}\n\nexport function skipTransparentExprWrapperNodes(\n node: t.Expression | t.Super,\n): t.Expression | t.Super {\n while (isTransparentExprWrapper(node)) {\n node = node.expression;\n }\n return node;\n}\n","import type { NodePath, types as t } from \"@babel/core\";\n\nexport function assertFieldTransformed(\n path: NodePath,\n) {\n if (\n path.node.declare ||\n (process.env.BABEL_8_BREAKING\n ? path.isClassProperty({ definite: true })\n : false)\n ) {\n throw path.buildCodeFrameError(\n `TypeScript 'declare' fields must first be transformed by ` +\n `@babel/plugin-transform-typescript.\\n` +\n `If you have already enabled that plugin (or '@babel/preset-typescript'), make sure ` +\n `that it runs before any plugin related to additional class features:\\n` +\n ` - @babel/plugin-transform-class-properties\\n` +\n ` - @babel/plugin-transform-private-methods\\n` +\n ` - @babel/plugin-proposal-decorators`,\n );\n }\n}\n","import { template, types as t } from \"@babel/core\";\nimport type { File, NodePath, Visitor, Scope } from \"@babel/core\";\nimport { visitors } from \"@babel/traverse\";\nimport ReplaceSupers from \"@babel/helper-replace-supers\";\nimport memberExpressionToFunctions from \"@babel/helper-member-expression-to-functions\";\nimport type {\n Handler,\n HandlerState,\n} from \"@babel/helper-member-expression-to-functions\";\nimport optimiseCall from \"@babel/helper-optimise-call-expression\";\nimport annotateAsPure from \"@babel/helper-annotate-as-pure\";\nimport { skipTransparentExprWrapperNodes } from \"@babel/helper-skip-transparent-expression-wrappers\";\n\nimport * as ts from \"./typescript.ts\";\n\ninterface PrivateNameMetadata {\n id: t.Identifier;\n static: boolean;\n method: boolean;\n getId?: t.Identifier;\n setId?: t.Identifier;\n methodId?: t.Identifier;\n initAdded?: boolean;\n getterDeclared?: boolean;\n setterDeclared?: boolean;\n}\n\ntype PrivateNamesMapGeneric = Map;\n\ntype PrivateNamesMap = PrivateNamesMapGeneric;\n\nif (!process.env.BABEL_8_BREAKING) {\n // eslint-disable-next-line no-var\n var newHelpers = (file: File) => {\n if (!process.env.IS_PUBLISH) {\n const { comments } = file.ast;\n // This is needed for the test in\n // babel-plugin-transform-class-properties/test/fixtures/regression/old-helpers\n if (comments?.some(c => c.value.includes(\"@force-old-private-helpers\"))) {\n return false;\n }\n }\n return file.availableHelper(\"classPrivateFieldGet2\");\n };\n}\n\nexport function buildPrivateNamesMap(\n className: string,\n privateFieldsAsSymbolsOrProperties: boolean,\n props: PropPath[],\n file: File,\n) {\n const privateNamesMap: PrivateNamesMap = new Map();\n let classBrandId: t.Identifier;\n for (const prop of props) {\n if (prop.isPrivate()) {\n const { name } = prop.node.key.id;\n let update: PrivateNameMetadata = privateNamesMap.get(name);\n if (!update) {\n const isMethod = !prop.isProperty();\n const isStatic = prop.node.static;\n let initAdded = false;\n let id: t.Identifier;\n if (\n !privateFieldsAsSymbolsOrProperties &&\n (process.env.BABEL_8_BREAKING || newHelpers(file)) &&\n isMethod &&\n !isStatic\n ) {\n initAdded = !!classBrandId;\n classBrandId ??= prop.scope.generateUidIdentifier(\n `${className}_brand`,\n );\n id = classBrandId;\n } else {\n id = prop.scope.generateUidIdentifier(name);\n }\n update = { id, static: isStatic, method: isMethod, initAdded };\n privateNamesMap.set(name, update);\n }\n if (prop.isClassPrivateMethod()) {\n if (prop.node.kind === \"get\") {\n const { body } = prop.node.body;\n let $: t.Node;\n if (\n // If we have\n // get #foo() { return _some_fn(this); }\n // we can use _some_fn directly.\n body.length === 1 &&\n t.isReturnStatement(($ = body[0])) &&\n t.isCallExpression(($ = $.argument)) &&\n $.arguments.length === 1 &&\n t.isThisExpression($.arguments[0]) &&\n t.isIdentifier(($ = $.callee))\n ) {\n update.getId = t.cloneNode($);\n update.getterDeclared = true;\n } else {\n update.getId = prop.scope.generateUidIdentifier(`get_${name}`);\n }\n } else if (prop.node.kind === \"set\") {\n const { params } = prop.node;\n const { body } = prop.node.body;\n let $: t.Node;\n if (\n // If we have\n // set #foo(val) { _some_fn(this, val); }\n // we can use _some_fn directly.\n body.length === 1 &&\n t.isExpressionStatement(($ = body[0])) &&\n t.isCallExpression(($ = $.expression)) &&\n $.arguments.length === 2 &&\n t.isThisExpression($.arguments[0]) &&\n t.isIdentifier($.arguments[1], {\n name: (params[0] as t.Identifier).name,\n }) &&\n t.isIdentifier(($ = $.callee))\n ) {\n update.setId = t.cloneNode($);\n update.setterDeclared = true;\n } else {\n update.setId = prop.scope.generateUidIdentifier(`set_${name}`);\n }\n } else if (prop.node.kind === \"method\") {\n update.methodId = prop.scope.generateUidIdentifier(name);\n }\n }\n privateNamesMap.set(name, update);\n }\n }\n return privateNamesMap;\n}\n\nexport function buildPrivateNamesNodes(\n privateNamesMap: PrivateNamesMap,\n privateFieldsAsProperties: boolean,\n privateFieldsAsSymbols: boolean,\n state: File,\n) {\n const initNodes: t.Statement[] = [];\n\n const injectedIds = new Set();\n\n for (const [name, value] of privateNamesMap) {\n // - When the privateFieldsAsProperties assumption is enabled,\n // both static and instance fields are transpiled using a\n // secret non-enumerable property. Hence, we also need to generate that\n // key (using the classPrivateFieldLooseKey helper).\n // - When the privateFieldsAsSymbols assumption is enabled,\n // both static and instance fields are transpiled using a\n // unique Symbol to define a non-enumerable property.\n // - In spec mode, only instance fields need a \"private name\" initializer\n // because static fields are directly assigned to a variable in the\n // buildPrivateStaticFieldInitSpec function.\n const { static: isStatic, method: isMethod, getId, setId } = value;\n const isGetterOrSetter = getId || setId;\n const id = t.cloneNode(value.id);\n\n let init: t.Expression;\n\n if (privateFieldsAsProperties) {\n init = t.callExpression(state.addHelper(\"classPrivateFieldLooseKey\"), [\n t.stringLiteral(name),\n ]);\n } else if (privateFieldsAsSymbols) {\n init = t.callExpression(t.identifier(\"Symbol\"), [t.stringLiteral(name)]);\n } else if (!isStatic) {\n if (injectedIds.has(id.name)) continue;\n injectedIds.add(id.name);\n\n init = t.newExpression(\n t.identifier(\n isMethod &&\n (process.env.BABEL_8_BREAKING ||\n !isGetterOrSetter ||\n newHelpers(state))\n ? \"WeakSet\"\n : \"WeakMap\",\n ),\n [],\n );\n }\n\n if (init) {\n if (!privateFieldsAsSymbols) {\n annotateAsPure(init);\n }\n initNodes.push(template.statement.ast`var ${id} = ${init}`);\n }\n }\n\n return initNodes;\n}\n\nexport interface PrivateNameVisitorState {\n privateNamesMap: PrivateNamesMapGeneric;\n redeclared?: string[];\n}\n\n// Traverses the class scope, handling private name references. If an inner\n// class redeclares the same private name, it will hand off traversal to the\n// restricted visitor (which doesn't traverse the inner class's inner scope).\nexport function privateNameVisitorFactory(\n visitor: Visitor & S>,\n) {\n // Traverses the outer portion of a class, without touching the class's inner\n // scope, for private names.\n const nestedVisitor = visitors.environmentVisitor({ ...visitor });\n\n const privateNameVisitor: Visitor<\n PrivateNameVisitorState & S\n > = {\n ...visitor,\n\n Class(path) {\n const { privateNamesMap } = this;\n const body = path.get(\"body.body\");\n\n const visiblePrivateNames = new Map(privateNamesMap);\n const redeclared = [];\n for (const prop of body) {\n if (!prop.isPrivate()) continue;\n const { name } = prop.node.key.id;\n visiblePrivateNames.delete(name);\n redeclared.push(name);\n }\n\n // If the class doesn't redeclare any private fields, we can continue with\n // our overall traversal.\n if (!redeclared.length) {\n return;\n }\n\n // This class redeclares some private field. We need to process the outer\n // environment with access to all the outer privates, then we can process\n // the inner environment with only the still-visible outer privates.\n path.get(\"body\").traverse(nestedVisitor, {\n ...this,\n redeclared,\n });\n path.traverse(privateNameVisitor, {\n ...this,\n privateNamesMap: visiblePrivateNames,\n });\n\n // We'll eventually hit this class node again with the overall Class\n // Features visitor, which'll process the redeclared privates.\n path.skipKey(\"body\");\n },\n };\n\n return privateNameVisitor;\n}\n\ninterface PrivateNameState {\n privateNamesMap: PrivateNamesMap;\n classRef: t.Identifier;\n file: File;\n noDocumentAll: boolean;\n noUninitializedPrivateFieldAccess: boolean;\n innerBinding?: t.Identifier;\n}\n\nconst privateNameVisitor = privateNameVisitorFactory<\n HandlerState & PrivateNameState,\n PrivateNameMetadata\n>({\n PrivateName(path, { noDocumentAll }) {\n const { privateNamesMap, redeclared } = this;\n const { node, parentPath } = path;\n\n if (\n !parentPath.isMemberExpression({ property: node }) &&\n !parentPath.isOptionalMemberExpression({ property: node })\n ) {\n return;\n }\n const { name } = node.id;\n if (!privateNamesMap.has(name)) return;\n if (redeclared?.includes(name)) return;\n\n this.handle(parentPath, noDocumentAll);\n },\n});\n\n// rename all bindings that shadows innerBinding\nfunction unshadow(\n name: string,\n scope: Scope,\n innerBinding: t.Identifier | undefined,\n) {\n // in some cases, scope.getBinding(name) === undefined\n // so we check hasBinding to avoid keeping looping\n // see: https://github.com/babel/babel/pull/13656#discussion_r686030715\n while (\n scope?.hasBinding(name) &&\n !scope.bindingIdentifierEquals(name, innerBinding)\n ) {\n scope.rename(name);\n scope = scope.parent;\n }\n}\n\nexport function buildCheckInRHS(\n rhs: t.Expression,\n file: File,\n inRHSIsObject?: boolean,\n) {\n if (inRHSIsObject || !file.availableHelper?.(\"checkInRHS\")) return rhs;\n return t.callExpression(file.addHelper(\"checkInRHS\"), [rhs]);\n}\n\nconst privateInVisitor = privateNameVisitorFactory<\n {\n classRef: t.Identifier;\n file: File;\n innerBinding?: t.Identifier;\n privateFieldsAsProperties: boolean;\n },\n PrivateNameMetadata\n>({\n BinaryExpression(path, { file }) {\n const { operator, left, right } = path.node;\n if (operator !== \"in\") return;\n if (!t.isPrivateName(left)) return;\n\n const { privateFieldsAsProperties, privateNamesMap, redeclared } = this;\n\n const { name } = left.id;\n\n if (!privateNamesMap.has(name)) return;\n if (redeclared?.includes(name)) return;\n\n // if there are any local variable shadowing classRef, unshadow it\n // see #12960\n unshadow(this.classRef.name, path.scope, this.innerBinding);\n\n if (privateFieldsAsProperties) {\n const { id } = privateNamesMap.get(name);\n path.replaceWith(template.expression.ast`\n Object.prototype.hasOwnProperty.call(${buildCheckInRHS(\n right,\n file,\n )}, ${t.cloneNode(id)})\n `);\n return;\n }\n\n const { id, static: isStatic } = privateNamesMap.get(name);\n\n if (isStatic) {\n path.replaceWith(\n template.expression.ast`${buildCheckInRHS(\n right,\n file,\n )} === ${t.cloneNode(this.classRef)}`,\n );\n return;\n }\n\n path.replaceWith(\n template.expression.ast`${t.cloneNode(id)}.has(${buildCheckInRHS(\n right,\n file,\n )})`,\n );\n },\n});\n\ninterface Receiver {\n receiver(\n this: HandlerState & PrivateNameState,\n member: NodePath,\n ): t.Expression;\n}\n\nfunction readOnlyError(file: File, name: string) {\n return t.callExpression(file.addHelper(\"readOnlyError\"), [\n t.stringLiteral(`#${name}`),\n ]);\n}\n\nfunction writeOnlyError(file: File, name: string) {\n if (\n !process.env.BABEL_8_BREAKING &&\n !file.availableHelper(\"writeOnlyError\")\n ) {\n console.warn(\n `@babel/helpers is outdated, update it to silence this warning.`,\n );\n return t.buildUndefinedNode();\n }\n return t.callExpression(file.addHelper(\"writeOnlyError\"), [\n t.stringLiteral(`#${name}`),\n ]);\n}\n\nfunction buildStaticPrivateFieldAccess(\n expr: N,\n noUninitializedPrivateFieldAccess: boolean,\n) {\n if (noUninitializedPrivateFieldAccess) return expr;\n return t.memberExpression(expr, t.identifier(\"_\"));\n}\n\nfunction autoInherits<\n Member extends { node: t.Node },\n Result extends t.Node,\n Fn extends (member: Member, ...args: unknown[]) => Result,\n>(fn: Fn): Fn {\n return function (this: ThisParameterType, member) {\n return t.inherits(fn.apply(this, arguments as any), member.node);\n } as Fn;\n}\n\nconst privateNameHandlerSpec: Handler & Receiver =\n {\n memoise(member, count) {\n const { scope } = member;\n const { object } = member.node as { object: t.Expression };\n\n const memo = scope.maybeGenerateMemoised(object);\n if (!memo) {\n return;\n }\n\n this.memoiser.set(object, memo, count);\n },\n\n receiver(member) {\n const { object } = member.node as { object: t.Expression };\n\n if (this.memoiser.has(object)) {\n return t.cloneNode(this.memoiser.get(object));\n }\n\n return t.cloneNode(object);\n },\n\n get: autoInherits(function (member) {\n const {\n classRef,\n privateNamesMap,\n file,\n innerBinding,\n noUninitializedPrivateFieldAccess,\n } = this;\n const privateName = member.node.property as t.PrivateName;\n const { name } = privateName.id;\n const {\n id,\n static: isStatic,\n method: isMethod,\n methodId,\n getId,\n setId,\n } = privateNamesMap.get(name);\n const isGetterOrSetter = getId || setId;\n\n const cloneId = (id: t.Identifier) =>\n t.inherits(t.cloneNode(id), privateName);\n\n if (isStatic) {\n // if there are any local variable shadowing classRef, unshadow it\n // see #12960\n unshadow(classRef.name, member.scope, innerBinding);\n\n if (!process.env.BABEL_8_BREAKING && !newHelpers(file)) {\n // NOTE: This package has a peerDependency on @babel/core@^7.0.0, but these\n // helpers have been introduced in @babel/helpers@7.1.0.\n const helperName =\n isMethod && !isGetterOrSetter\n ? \"classStaticPrivateMethodGet\"\n : \"classStaticPrivateFieldSpecGet\";\n\n return t.callExpression(file.addHelper(helperName), [\n this.receiver(member),\n t.cloneNode(classRef),\n cloneId(id),\n ]);\n }\n\n const receiver = this.receiver(member);\n const skipCheck =\n t.isIdentifier(receiver) && receiver.name === classRef.name;\n\n if (!isMethod) {\n if (skipCheck) {\n return buildStaticPrivateFieldAccess(\n cloneId(id),\n noUninitializedPrivateFieldAccess,\n );\n }\n\n return buildStaticPrivateFieldAccess(\n t.callExpression(file.addHelper(\"assertClassBrand\"), [\n t.cloneNode(classRef),\n receiver,\n cloneId(id),\n ]),\n noUninitializedPrivateFieldAccess,\n );\n }\n\n if (getId) {\n if (skipCheck) {\n return t.callExpression(cloneId(getId), [receiver]);\n }\n return t.callExpression(file.addHelper(\"classPrivateGetter\"), [\n t.cloneNode(classRef),\n receiver,\n cloneId(getId),\n ]);\n }\n\n if (setId) {\n const err = t.buildUndefinedNode(); // TODO: writeOnlyError(file, name)\n if (skipCheck) return err;\n return t.sequenceExpression([\n t.callExpression(file.addHelper(\"assertClassBrand\"), [\n t.cloneNode(classRef),\n receiver,\n ]),\n err,\n ]);\n }\n\n if (skipCheck) return cloneId(id);\n return t.callExpression(file.addHelper(\"assertClassBrand\"), [\n t.cloneNode(classRef),\n receiver,\n cloneId(id),\n ]);\n }\n\n if (isMethod) {\n if (isGetterOrSetter) {\n if (!getId) {\n return t.sequenceExpression([\n this.receiver(member),\n writeOnlyError(file, name),\n ]);\n }\n if (!process.env.BABEL_8_BREAKING && !newHelpers(file)) {\n return t.callExpression(file.addHelper(\"classPrivateFieldGet\"), [\n this.receiver(member),\n cloneId(id),\n ]);\n }\n return t.callExpression(file.addHelper(\"classPrivateGetter\"), [\n t.cloneNode(id),\n this.receiver(member),\n cloneId(getId),\n ]);\n }\n if (!process.env.BABEL_8_BREAKING && !newHelpers(file)) {\n return t.callExpression(file.addHelper(\"classPrivateMethodGet\"), [\n this.receiver(member),\n t.cloneNode(id),\n cloneId(methodId),\n ]);\n }\n return t.callExpression(file.addHelper(\"assertClassBrand\"), [\n t.cloneNode(id),\n this.receiver(member),\n cloneId(methodId),\n ]);\n }\n if (process.env.BABEL_8_BREAKING || newHelpers(file)) {\n return t.callExpression(file.addHelper(\"classPrivateFieldGet2\"), [\n cloneId(id),\n this.receiver(member),\n ]);\n }\n\n return t.callExpression(file.addHelper(\"classPrivateFieldGet\"), [\n this.receiver(member),\n cloneId(id),\n ]);\n }),\n\n boundGet(member) {\n this.memoise(member, 1);\n\n return t.callExpression(\n t.memberExpression(this.get(member), t.identifier(\"bind\")),\n [this.receiver(member)],\n );\n },\n\n set: autoInherits(function (member, value) {\n const {\n classRef,\n privateNamesMap,\n file,\n noUninitializedPrivateFieldAccess,\n } = this;\n const privateName = member.node.property as t.PrivateName;\n const { name } = privateName.id;\n const {\n id,\n static: isStatic,\n method: isMethod,\n setId,\n getId,\n } = privateNamesMap.get(name);\n const isGetterOrSetter = getId || setId;\n\n const cloneId = (id: t.Identifier) =>\n t.inherits(t.cloneNode(id), privateName);\n\n if (isStatic) {\n if (!process.env.BABEL_8_BREAKING && !newHelpers(file)) {\n const helperName =\n isMethod && !isGetterOrSetter\n ? \"classStaticPrivateMethodSet\"\n : \"classStaticPrivateFieldSpecSet\";\n\n return t.callExpression(file.addHelper(helperName), [\n this.receiver(member),\n t.cloneNode(classRef),\n cloneId(id),\n value,\n ]);\n }\n\n const receiver = this.receiver(member);\n const skipCheck =\n t.isIdentifier(receiver) && receiver.name === classRef.name;\n\n if (isMethod && !setId) {\n const err = readOnlyError(file, name);\n if (skipCheck) return t.sequenceExpression([value, err]);\n return t.sequenceExpression([\n value,\n t.callExpression(file.addHelper(\"assertClassBrand\"), [\n t.cloneNode(classRef),\n receiver,\n ]),\n readOnlyError(file, name),\n ]);\n }\n\n if (setId) {\n if (skipCheck) {\n return t.callExpression(t.cloneNode(setId), [receiver, value]);\n }\n return t.callExpression(file.addHelper(\"classPrivateSetter\"), [\n t.cloneNode(classRef),\n cloneId(setId),\n receiver,\n value,\n ]);\n }\n return t.assignmentExpression(\n \"=\",\n buildStaticPrivateFieldAccess(\n cloneId(id),\n noUninitializedPrivateFieldAccess,\n ),\n skipCheck\n ? value\n : t.callExpression(file.addHelper(\"assertClassBrand\"), [\n t.cloneNode(classRef),\n receiver,\n value,\n ]),\n );\n }\n if (isMethod) {\n if (setId) {\n if (!process.env.BABEL_8_BREAKING && !newHelpers(file)) {\n return t.callExpression(file.addHelper(\"classPrivateFieldSet\"), [\n this.receiver(member),\n cloneId(id),\n value,\n ]);\n }\n return t.callExpression(file.addHelper(\"classPrivateSetter\"), [\n t.cloneNode(id),\n cloneId(setId),\n this.receiver(member),\n value,\n ]);\n }\n return t.sequenceExpression([\n this.receiver(member),\n value,\n readOnlyError(file, name),\n ]);\n }\n\n if (process.env.BABEL_8_BREAKING || newHelpers(file)) {\n return t.callExpression(file.addHelper(\"classPrivateFieldSet2\"), [\n cloneId(id),\n this.receiver(member),\n value,\n ]);\n }\n\n return t.callExpression(file.addHelper(\"classPrivateFieldSet\"), [\n this.receiver(member),\n cloneId(id),\n value,\n ]);\n }),\n\n destructureSet(member) {\n const {\n classRef,\n privateNamesMap,\n file,\n noUninitializedPrivateFieldAccess,\n } = this;\n const privateName = member.node.property as t.PrivateName;\n const { name } = privateName.id;\n const {\n id,\n static: isStatic,\n method: isMethod,\n setId,\n } = privateNamesMap.get(name);\n\n const cloneId = (id: t.Identifier) =>\n t.inherits(t.cloneNode(id), privateName);\n\n if (!process.env.BABEL_8_BREAKING && !newHelpers(file)) {\n if (isStatic) {\n try {\n // classStaticPrivateFieldDestructureSet was introduced in 7.13.10\n // eslint-disable-next-line no-var\n var helper = file.addHelper(\n \"classStaticPrivateFieldDestructureSet\",\n );\n } catch {\n throw new Error(\n \"Babel can not transpile `[C.#p] = [0]` with @babel/helpers < 7.13.10, \\n\" +\n \"please update @babel/helpers to the latest version.\",\n );\n }\n return t.memberExpression(\n t.callExpression(helper, [\n this.receiver(member),\n t.cloneNode(classRef),\n cloneId(id),\n ]),\n t.identifier(\"value\"),\n );\n }\n\n return t.memberExpression(\n t.callExpression(file.addHelper(\"classPrivateFieldDestructureSet\"), [\n this.receiver(member),\n cloneId(id),\n ]),\n t.identifier(\"value\"),\n );\n }\n\n if (isMethod && !setId) {\n return t.memberExpression(\n t.sequenceExpression([\n // @ts-ignore(Babel 7 vs Babel 8) member.node.object is not t.Super\n member.node.object,\n readOnlyError(file, name),\n ]),\n t.identifier(\"_\"),\n );\n }\n\n if (isStatic && !isMethod) {\n const getCall = this.get(member);\n if (\n !noUninitializedPrivateFieldAccess ||\n !t.isCallExpression(getCall)\n ) {\n return getCall;\n }\n const ref = getCall.arguments.pop();\n getCall.arguments.push(template.expression.ast`(_) => ${ref} = _`);\n return t.memberExpression(\n t.callExpression(file.addHelper(\"toSetter\"), [getCall]),\n t.identifier(\"_\"),\n );\n }\n\n const setCall = this.set(member, t.identifier(\"_\"));\n if (\n !t.isCallExpression(setCall) ||\n !t.isIdentifier(setCall.arguments[setCall.arguments.length - 1], {\n name: \"_\",\n })\n ) {\n throw member.buildCodeFrameError(\n \"Internal Babel error while compiling this code. This is a Babel bug. \" +\n \"Please report it at https://github.com/babel/babel/issues.\",\n );\n }\n\n // someHelper(foo, bar, _) -> someHelper, [foo, bar]\n // aFn.call(foo, bar, _) -> aFn, [bar], foo\n let args: t.Expression[];\n if (\n t.isMemberExpression(setCall.callee, { computed: false }) &&\n t.isIdentifier(setCall.callee.property) &&\n setCall.callee.property.name === \"call\"\n ) {\n args = [\n // @ts-ignore(Babel 7 vs Babel 8) member.node.object is not t.Super\n setCall.callee.object,\n t.arrayExpression(\n // Remove '_'\n (setCall.arguments as t.Expression[]).slice(1, -1),\n ),\n setCall.arguments[0] as t.Expression,\n ];\n } else {\n args = [\n setCall.callee as t.Expression,\n t.arrayExpression(\n // Remove '_'\n (setCall.arguments as t.Expression[]).slice(0, -1),\n ),\n ];\n }\n\n return t.memberExpression(\n t.callExpression(file.addHelper(\"toSetter\"), args),\n t.identifier(\"_\"),\n );\n },\n\n call(member, args: (t.Expression | t.SpreadElement)[]) {\n // The first access (the get) should do the memo assignment.\n this.memoise(member, 1);\n\n return optimiseCall(this.get(member), this.receiver(member), args, false);\n },\n\n optionalCall(member, args: (t.Expression | t.SpreadElement)[]) {\n this.memoise(member, 1);\n\n return optimiseCall(this.get(member), this.receiver(member), args, true);\n },\n\n delete() {\n throw new Error(\n \"Internal Babel error: deleting private elements is a parsing error.\",\n );\n },\n };\n\nconst privateNameHandlerLoose: Handler = {\n get(member) {\n const { privateNamesMap, file } = this;\n const { object } = member.node;\n const { name } = (member.node.property as t.PrivateName).id;\n\n return template.expression`BASE(REF, PROP)[PROP]`({\n BASE: file.addHelper(\"classPrivateFieldLooseBase\"),\n REF: t.cloneNode(object),\n PROP: t.cloneNode(privateNamesMap.get(name).id),\n });\n },\n\n set() {\n // noop\n throw new Error(\"private name handler with loose = true don't need set()\");\n },\n\n boundGet(member) {\n return t.callExpression(\n t.memberExpression(this.get(member), t.identifier(\"bind\")),\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion\n [t.cloneNode(member.node.object as t.Expression)],\n );\n },\n\n simpleSet(member) {\n return this.get(member);\n },\n\n destructureSet(member) {\n return this.get(member);\n },\n\n call(member, args) {\n return t.callExpression(this.get(member), args);\n },\n\n optionalCall(member, args) {\n return t.optionalCallExpression(this.get(member), args, true);\n },\n\n delete() {\n throw new Error(\n \"Internal Babel error: deleting private elements is a parsing error.\",\n );\n },\n};\n\nexport function transformPrivateNamesUsage(\n ref: t.Identifier,\n path: NodePath,\n privateNamesMap: PrivateNamesMap,\n {\n privateFieldsAsProperties,\n noUninitializedPrivateFieldAccess,\n noDocumentAll,\n innerBinding,\n }: {\n privateFieldsAsProperties: boolean;\n noUninitializedPrivateFieldAccess: boolean;\n noDocumentAll: boolean;\n innerBinding: t.Identifier;\n },\n state: File,\n) {\n if (!privateNamesMap.size) return;\n\n const body = path.get(\"body\");\n const handler = privateFieldsAsProperties\n ? privateNameHandlerLoose\n : privateNameHandlerSpec;\n\n memberExpressionToFunctions(body, privateNameVisitor, {\n privateNamesMap,\n classRef: ref,\n file: state,\n ...handler,\n noDocumentAll,\n noUninitializedPrivateFieldAccess,\n innerBinding,\n });\n body.traverse(privateInVisitor, {\n privateNamesMap,\n classRef: ref,\n file: state,\n privateFieldsAsProperties,\n innerBinding,\n });\n}\n\nfunction buildPrivateFieldInitLoose(\n ref: t.Expression,\n prop: NodePath,\n privateNamesMap: PrivateNamesMap,\n) {\n const { id } = privateNamesMap.get(prop.node.key.id.name);\n const value = prop.node.value || prop.scope.buildUndefinedNode();\n\n return inheritPropComments(\n template.statement.ast`\n Object.defineProperty(${ref}, ${t.cloneNode(id)}, {\n // configurable is false by default\n // enumerable is false by default\n writable: true,\n value: ${value}\n });\n ` as t.ExpressionStatement,\n prop,\n );\n}\n\nfunction buildPrivateInstanceFieldInitSpec(\n ref: t.Expression,\n prop: NodePath,\n privateNamesMap: PrivateNamesMap,\n state: File,\n) {\n const { id } = privateNamesMap.get(prop.node.key.id.name);\n const value = prop.node.value || prop.scope.buildUndefinedNode();\n\n if (!process.env.BABEL_8_BREAKING) {\n if (!state.availableHelper(\"classPrivateFieldInitSpec\")) {\n return inheritPropComments(\n template.statement.ast`${t.cloneNode(id)}.set(${ref}, {\n // configurable is always false for private elements\n // enumerable is always false for private elements\n writable: true,\n value: ${value},\n })` as t.ExpressionStatement,\n prop,\n );\n }\n }\n\n const helper = state.addHelper(\"classPrivateFieldInitSpec\");\n return inheritLoc(\n inheritPropComments(\n t.expressionStatement(\n t.callExpression(helper, [\n t.thisExpression(),\n inheritLoc(t.cloneNode(id), prop.node.key),\n process.env.BABEL_8_BREAKING || newHelpers(state)\n ? value\n : template.expression.ast`{ writable: true, value: ${value} }`,\n ]),\n ),\n prop,\n ),\n prop.node,\n );\n}\n\nfunction buildPrivateStaticFieldInitSpec(\n prop: NodePath,\n privateNamesMap: PrivateNamesMap,\n noUninitializedPrivateFieldAccess: boolean,\n) {\n const privateName = privateNamesMap.get(prop.node.key.id.name);\n\n const value = noUninitializedPrivateFieldAccess\n ? prop.node.value\n : template.expression.ast`{\n _: ${prop.node.value || t.buildUndefinedNode()}\n }`;\n\n return inheritPropComments(\n t.variableDeclaration(\"var\", [\n t.variableDeclarator(t.cloneNode(privateName.id), value),\n ]),\n prop,\n );\n}\n\nif (!process.env.BABEL_8_BREAKING) {\n // eslint-disable-next-line no-var\n var buildPrivateStaticFieldInitSpecOld = function (\n prop: NodePath,\n privateNamesMap: PrivateNamesMap,\n ) {\n const privateName = privateNamesMap.get(prop.node.key.id.name);\n const { id, getId, setId, initAdded } = privateName;\n const isGetterOrSetter = getId || setId;\n\n if (!prop.isProperty() && (initAdded || !isGetterOrSetter)) return;\n\n if (isGetterOrSetter) {\n privateNamesMap.set(prop.node.key.id.name, {\n ...privateName,\n initAdded: true,\n });\n\n return inheritPropComments(\n template.statement.ast`\n var ${t.cloneNode(id)} = {\n // configurable is false by default\n // enumerable is false by default\n // writable is false by default\n get: ${getId ? getId.name : prop.scope.buildUndefinedNode()},\n set: ${setId ? setId.name : prop.scope.buildUndefinedNode()}\n }\n `,\n prop,\n );\n }\n\n const value = prop.node.value || prop.scope.buildUndefinedNode();\n return inheritPropComments(\n template.statement.ast`\n var ${t.cloneNode(id)} = {\n // configurable is false by default\n // enumerable is false by default\n writable: true,\n value: ${value}\n };\n `,\n prop,\n );\n };\n}\n\nfunction buildPrivateMethodInitLoose(\n ref: t.Expression,\n prop: NodePath,\n privateNamesMap: PrivateNamesMap,\n) {\n const privateName = privateNamesMap.get(prop.node.key.id.name);\n const { methodId, id, getId, setId, initAdded } = privateName;\n if (initAdded) return;\n\n if (methodId) {\n return inheritPropComments(\n template.statement.ast`\n Object.defineProperty(${ref}, ${id}, {\n // configurable is false by default\n // enumerable is false by default\n // writable is false by default\n value: ${methodId.name}\n });\n ` as t.ExpressionStatement,\n prop,\n );\n }\n const isGetterOrSetter = getId || setId;\n if (isGetterOrSetter) {\n privateNamesMap.set(prop.node.key.id.name, {\n ...privateName,\n initAdded: true,\n });\n\n return inheritPropComments(\n template.statement.ast`\n Object.defineProperty(${ref}, ${id}, {\n // configurable is false by default\n // enumerable is false by default\n // writable is false by default\n get: ${getId ? getId.name : prop.scope.buildUndefinedNode()},\n set: ${setId ? setId.name : prop.scope.buildUndefinedNode()}\n });\n ` as t.ExpressionStatement,\n prop,\n );\n }\n}\n\nfunction buildPrivateInstanceMethodInitSpec(\n ref: t.Expression,\n prop: NodePath,\n privateNamesMap: PrivateNamesMap,\n state: File,\n) {\n const privateName = privateNamesMap.get(prop.node.key.id.name);\n\n if (privateName.initAdded) return;\n\n if (!process.env.BABEL_8_BREAKING && !newHelpers(state)) {\n const isGetterOrSetter = privateName.getId || privateName.setId;\n if (isGetterOrSetter) {\n return buildPrivateAccessorInitialization(\n ref,\n prop,\n privateNamesMap,\n state,\n );\n }\n }\n\n return buildPrivateInstanceMethodInitialization(\n ref,\n prop,\n privateNamesMap,\n state,\n );\n}\n\nfunction buildPrivateAccessorInitialization(\n ref: t.Expression,\n prop: NodePath,\n privateNamesMap: PrivateNamesMap,\n state: File,\n) {\n const privateName = privateNamesMap.get(prop.node.key.id.name);\n const { id, getId, setId } = privateName;\n\n privateNamesMap.set(prop.node.key.id.name, {\n ...privateName,\n initAdded: true,\n });\n\n if (!process.env.BABEL_8_BREAKING) {\n if (!state.availableHelper(\"classPrivateFieldInitSpec\")) {\n return inheritPropComments(\n template.statement.ast`\n ${id}.set(${ref}, {\n get: ${getId ? getId.name : prop.scope.buildUndefinedNode()},\n set: ${setId ? setId.name : prop.scope.buildUndefinedNode()}\n });\n ` as t.ExpressionStatement,\n prop,\n );\n }\n }\n\n const helper = state.addHelper(\"classPrivateFieldInitSpec\");\n return inheritLoc(\n inheritPropComments(\n template.statement.ast`${helper}(\n ${t.thisExpression()},\n ${t.cloneNode(id)},\n {\n get: ${getId ? getId.name : prop.scope.buildUndefinedNode()},\n set: ${setId ? setId.name : prop.scope.buildUndefinedNode()}\n },\n )` as t.ExpressionStatement,\n prop,\n ),\n prop.node,\n );\n}\n\nfunction buildPrivateInstanceMethodInitialization(\n ref: t.Expression,\n prop: NodePath,\n privateNamesMap: PrivateNamesMap,\n state: File,\n) {\n const privateName = privateNamesMap.get(prop.node.key.id.name);\n const { id } = privateName;\n\n if (!process.env.BABEL_8_BREAKING) {\n if (!state.availableHelper(\"classPrivateMethodInitSpec\")) {\n return inheritPropComments(\n template.statement.ast`${id}.add(${ref})` as t.ExpressionStatement,\n prop,\n );\n }\n }\n\n const helper = state.addHelper(\"classPrivateMethodInitSpec\");\n return inheritPropComments(\n template.statement.ast`${helper}(\n ${t.thisExpression()},\n ${t.cloneNode(id)}\n )` as t.ExpressionStatement,\n prop,\n );\n}\n\nfunction buildPublicFieldInitLoose(\n ref: t.Expression,\n prop: NodePath,\n) {\n const { key, computed } = prop.node;\n const value = prop.node.value || prop.scope.buildUndefinedNode();\n\n return inheritPropComments(\n t.expressionStatement(\n t.assignmentExpression(\n \"=\",\n t.memberExpression(ref, key, computed || t.isLiteral(key)),\n value,\n ),\n ),\n prop,\n );\n}\n\nfunction buildPublicFieldInitSpec(\n ref: t.Expression,\n prop: NodePath,\n state: File,\n) {\n const { key, computed } = prop.node;\n const value = prop.node.value || prop.scope.buildUndefinedNode();\n\n return inheritPropComments(\n t.expressionStatement(\n t.callExpression(state.addHelper(\"defineProperty\"), [\n ref,\n computed || t.isLiteral(key)\n ? key\n : t.stringLiteral((key as t.Identifier).name),\n value,\n ]),\n ),\n prop,\n );\n}\n\nfunction buildPrivateStaticMethodInitLoose(\n ref: t.Expression,\n prop: NodePath,\n state: File,\n privateNamesMap: PrivateNamesMap,\n) {\n const privateName = privateNamesMap.get(prop.node.key.id.name);\n const { id, methodId, getId, setId, initAdded } = privateName;\n\n if (initAdded) return;\n\n const isGetterOrSetter = getId || setId;\n if (isGetterOrSetter) {\n privateNamesMap.set(prop.node.key.id.name, {\n ...privateName,\n initAdded: true,\n });\n\n return inheritPropComments(\n template.statement.ast`\n Object.defineProperty(${ref}, ${id}, {\n // configurable is false by default\n // enumerable is false by default\n // writable is false by default\n get: ${getId ? getId.name : prop.scope.buildUndefinedNode()},\n set: ${setId ? setId.name : prop.scope.buildUndefinedNode()}\n })\n `,\n prop,\n );\n }\n\n return inheritPropComments(\n template.statement.ast`\n Object.defineProperty(${ref}, ${id}, {\n // configurable is false by default\n // enumerable is false by default\n // writable is false by default\n value: ${methodId.name}\n });\n `,\n prop,\n );\n}\n\nfunction buildPrivateMethodDeclaration(\n file: File,\n prop: NodePath,\n privateNamesMap: PrivateNamesMap,\n privateFieldsAsSymbolsOrProperties = false,\n) {\n const privateName = privateNamesMap.get(prop.node.key.id.name);\n const {\n id,\n methodId,\n getId,\n setId,\n getterDeclared,\n setterDeclared,\n static: isStatic,\n } = privateName;\n const { params, body, generator, async } = prop.node;\n const isGetter = getId && params.length === 0;\n const isSetter = setId && params.length > 0;\n\n if ((isGetter && getterDeclared) || (isSetter && setterDeclared)) {\n privateNamesMap.set(prop.node.key.id.name, {\n ...privateName,\n initAdded: true,\n });\n return null;\n }\n\n if (\n (process.env.BABEL_8_BREAKING || newHelpers(file)) &&\n (isGetter || isSetter) &&\n !privateFieldsAsSymbolsOrProperties\n ) {\n const scope = prop.get(\"body\").scope;\n const thisArg = scope.generateUidIdentifier(\"this\");\n const state: ReplaceThisState = {\n thisRef: thisArg,\n argumentsPath: [],\n };\n // eslint-disable-next-line @typescript-eslint/no-use-before-define\n prop.traverse(thisContextVisitor, state);\n if (state.argumentsPath.length) {\n const argumentsId = scope.generateUidIdentifier(\"arguments\");\n scope.push({\n id: argumentsId,\n init: template.expression.ast`[].slice.call(arguments, 1)`,\n });\n for (const path of state.argumentsPath) {\n path.replaceWith(t.cloneNode(argumentsId));\n }\n }\n\n params.unshift(t.cloneNode(thisArg));\n }\n\n let declId = methodId;\n\n if (isGetter) {\n privateNamesMap.set(prop.node.key.id.name, {\n ...privateName,\n getterDeclared: true,\n initAdded: true,\n });\n declId = getId;\n } else if (isSetter) {\n privateNamesMap.set(prop.node.key.id.name, {\n ...privateName,\n setterDeclared: true,\n initAdded: true,\n });\n declId = setId;\n } else if (isStatic && !privateFieldsAsSymbolsOrProperties) {\n declId = id;\n }\n\n return inheritPropComments(\n t.functionDeclaration(\n t.cloneNode(declId),\n // @ts-expect-error params for ClassMethod has TSParameterProperty\n params,\n body,\n generator,\n async,\n ),\n prop,\n );\n}\n\ntype ReplaceThisState = {\n thisRef: t.Identifier;\n needsClassRef?: boolean;\n innerBinding?: t.Identifier | null;\n argumentsPath?: NodePath[];\n};\n\ntype ReplaceInnerBindingReferenceState = ReplaceThisState;\n\nconst thisContextVisitor = visitors.environmentVisitor({\n Identifier(path, state) {\n if (state.argumentsPath && path.node.name === \"arguments\") {\n state.argumentsPath.push(path);\n }\n },\n UnaryExpression(path) {\n // Replace `delete this` with `true`\n const { node } = path;\n if (node.operator === \"delete\") {\n const argument = skipTransparentExprWrapperNodes(node.argument);\n if (t.isThisExpression(argument)) {\n path.replaceWith(t.booleanLiteral(true));\n }\n }\n },\n ThisExpression(path, state) {\n state.needsClassRef = true;\n path.replaceWith(t.cloneNode(state.thisRef));\n },\n MetaProperty(path) {\n const { node, scope } = path;\n // if there are `new.target` in static field\n // we should replace it with `undefined`\n if (node.meta.name === \"new\" && node.property.name === \"target\") {\n path.replaceWith(scope.buildUndefinedNode());\n }\n },\n});\n\nconst innerReferencesVisitor: Visitor = {\n ReferencedIdentifier(path, state) {\n if (\n path.scope.bindingIdentifierEquals(path.node.name, state.innerBinding)\n ) {\n state.needsClassRef = true;\n path.node.name = state.thisRef.name;\n }\n },\n};\n\nfunction replaceThisContext(\n path: PropPath,\n ref: t.Identifier,\n innerBindingRef: t.Identifier | null,\n) {\n const state: ReplaceThisState = {\n thisRef: ref,\n needsClassRef: false,\n innerBinding: innerBindingRef,\n };\n if (!path.isMethod()) {\n // replace `this` in property initializers and static blocks\n path.traverse(thisContextVisitor, state);\n }\n\n // todo: use innerBinding.referencePaths to avoid full traversal\n if (\n innerBindingRef != null &&\n state.thisRef?.name &&\n state.thisRef.name !== innerBindingRef.name\n ) {\n path.traverse(innerReferencesVisitor, state);\n }\n\n return state.needsClassRef;\n}\n\nexport type PropNode =\n | t.ClassProperty\n | t.ClassPrivateMethod\n | t.ClassPrivateProperty\n | t.StaticBlock;\nexport type PropPath = NodePath;\n\nfunction isNameOrLength({ key, computed }: t.ClassProperty) {\n if (key.type === \"Identifier\") {\n return !computed && (key.name === \"name\" || key.name === \"length\");\n }\n if (key.type === \"StringLiteral\") {\n return key.value === \"name\" || key.value === \"length\";\n }\n return false;\n}\n\n/**\n * Inherit comments from class members. This is a reduced version of\n * t.inheritsComments: the trailing comments are not inherited because\n * for most class members except the last one, their trailing comments are\n * the next sibling's leading comments.\n *\n * @template T transformed class member type\n * @param {T} node transformed class member\n * @param {PropPath} prop class member\n * @returns transformed class member type with comments inherited\n */\nfunction inheritPropComments(node: T, prop: PropPath) {\n t.inheritLeadingComments(node, prop.node);\n t.inheritInnerComments(node, prop.node);\n return node;\n}\n\nfunction inheritLoc(node: T, original: t.Node) {\n node.start = original.start;\n node.end = original.end;\n node.loc = original.loc;\n return node;\n}\n\n/**\n * ClassRefFlag records the requirement of the class binding reference.\n *\n * @enum {number}\n */\nconst enum ClassRefFlag {\n None,\n /**\n * When this flag is enabled, the binding reference can be the class id,\n * if exists, or the uid identifier generated for class expression. The\n * reference is safe to be consumed by [[Define]].\n */\n ForDefine = 1 << 0,\n /**\n * When this flag is enabled, the reference must be a uid, because the outer\n * class binding can be mutated by user codes.\n * E.g.\n * class C { static p = C }; const oldC = C; C = null; oldC.p;\n * we must memoize class `C` before defining the property `p`.\n */\n ForInnerBinding = 1 << 1,\n}\n\nexport function buildFieldsInitNodes(\n ref: t.Identifier | null,\n superRef: t.Expression | undefined,\n props: PropPath[],\n privateNamesMap: PrivateNamesMap,\n file: File,\n setPublicClassFields: boolean,\n privateFieldsAsSymbolsOrProperties: boolean,\n noUninitializedPrivateFieldAccess: boolean,\n constantSuper: boolean,\n innerBindingRef: t.Identifier | null,\n) {\n let classRefFlags = ClassRefFlag.None;\n let injectSuperRef: t.Identifier;\n const staticNodes: t.Statement[] = [];\n const instanceNodes: t.ExpressionStatement[] = [];\n let lastInstanceNodeReturnsThis = false;\n // These nodes are pure and can be moved to the closest statement position\n const pureStaticNodes: t.FunctionDeclaration[] = [];\n let classBindingNode: t.ExpressionStatement | null = null;\n\n const getSuperRef = t.isIdentifier(superRef)\n ? () => superRef\n : () => {\n injectSuperRef ??=\n props[0].scope.generateUidIdentifierBasedOnNode(superRef);\n return injectSuperRef;\n };\n\n const classRefForInnerBinding =\n ref ??\n props[0].scope.generateUidIdentifier(innerBindingRef?.name || \"Class\");\n ref ??= t.cloneNode(innerBindingRef);\n\n for (const prop of props) {\n if (prop.isClassProperty()) {\n ts.assertFieldTransformed(prop);\n }\n\n // @ts-expect-error: TS doesn't infer that prop.node is not a StaticBlock\n const isStatic = !t.isStaticBlock?.(prop.node) && prop.node.static;\n const isInstance = !isStatic;\n const isPrivate = prop.isPrivate();\n const isPublic = !isPrivate;\n const isField = prop.isProperty();\n const isMethod = !isField;\n const isStaticBlock = prop.isStaticBlock?.();\n\n if (isStatic) classRefFlags |= ClassRefFlag.ForDefine;\n\n if (isStatic || (isMethod && isPrivate) || isStaticBlock) {\n new ReplaceSupers({\n methodPath: prop,\n constantSuper,\n file: file,\n refToPreserve: innerBindingRef,\n getSuperRef,\n getObjectRef() {\n classRefFlags |= ClassRefFlag.ForInnerBinding;\n if (isStatic || isStaticBlock) {\n return classRefForInnerBinding;\n } else {\n return t.memberExpression(\n classRefForInnerBinding,\n t.identifier(\"prototype\"),\n );\n }\n },\n }).replace();\n\n const replaced = replaceThisContext(\n prop,\n classRefForInnerBinding,\n innerBindingRef,\n );\n if (replaced) {\n classRefFlags |= ClassRefFlag.ForInnerBinding;\n }\n }\n\n lastInstanceNodeReturnsThis = false;\n\n // TODO(ts): there are so many `ts-expect-error` inside cases since\n // ts can not infer type from pre-computed values (or a case test)\n // even change `isStaticBlock` to `t.isStaticBlock(prop)` will not make prop\n // a `NodePath`\n // this maybe a bug for ts\n switch (true) {\n case isStaticBlock: {\n const blockBody = prop.node.body;\n // We special-case the single expression case to avoid the iife, since\n // it's common.\n if (blockBody.length === 1 && t.isExpressionStatement(blockBody[0])) {\n staticNodes.push(inheritPropComments(blockBody[0], prop));\n } else {\n staticNodes.push(\n t.inheritsComments(\n template.statement.ast`(() => { ${blockBody} })()`,\n prop.node,\n ),\n );\n }\n break;\n }\n case isStatic &&\n isPrivate &&\n isField &&\n privateFieldsAsSymbolsOrProperties:\n staticNodes.push(\n buildPrivateFieldInitLoose(t.cloneNode(ref), prop, privateNamesMap),\n );\n break;\n case isStatic &&\n isPrivate &&\n isField &&\n !privateFieldsAsSymbolsOrProperties:\n if (!process.env.BABEL_8_BREAKING && !newHelpers(file)) {\n staticNodes.push(\n buildPrivateStaticFieldInitSpecOld(prop, privateNamesMap),\n );\n } else {\n staticNodes.push(\n buildPrivateStaticFieldInitSpec(\n prop,\n privateNamesMap,\n noUninitializedPrivateFieldAccess,\n ),\n );\n }\n break;\n case isStatic && isPublic && isField && setPublicClassFields:\n // Functions always have non-writable .name and .length properties,\n // so we must always use [[Define]] for them.\n // It might still be possible to a computed static fields whose resulting\n // key is \"name\" or \"length\", but the assumption is telling us that it's\n // not going to happen.\n if (!isNameOrLength(prop.node)) {\n staticNodes.push(buildPublicFieldInitLoose(t.cloneNode(ref), prop));\n break;\n }\n // falls through\n case isStatic && isPublic && isField && !setPublicClassFields:\n staticNodes.push(\n buildPublicFieldInitSpec(t.cloneNode(ref), prop, file),\n );\n break;\n case isInstance &&\n isPrivate &&\n isField &&\n privateFieldsAsSymbolsOrProperties:\n instanceNodes.push(\n buildPrivateFieldInitLoose(t.thisExpression(), prop, privateNamesMap),\n );\n break;\n case isInstance &&\n isPrivate &&\n isField &&\n !privateFieldsAsSymbolsOrProperties:\n instanceNodes.push(\n buildPrivateInstanceFieldInitSpec(\n t.thisExpression(),\n prop,\n privateNamesMap,\n file,\n ),\n );\n break;\n case isInstance &&\n isPrivate &&\n isMethod &&\n privateFieldsAsSymbolsOrProperties:\n instanceNodes.unshift(\n buildPrivateMethodInitLoose(\n t.thisExpression(),\n prop,\n privateNamesMap,\n ),\n );\n pureStaticNodes.push(\n buildPrivateMethodDeclaration(\n file,\n prop,\n privateNamesMap,\n privateFieldsAsSymbolsOrProperties,\n ),\n );\n break;\n case isInstance &&\n isPrivate &&\n isMethod &&\n !privateFieldsAsSymbolsOrProperties:\n instanceNodes.unshift(\n buildPrivateInstanceMethodInitSpec(\n t.thisExpression(),\n prop,\n privateNamesMap,\n file,\n ),\n );\n pureStaticNodes.push(\n buildPrivateMethodDeclaration(\n file,\n prop,\n privateNamesMap,\n privateFieldsAsSymbolsOrProperties,\n ),\n );\n break;\n case isStatic &&\n isPrivate &&\n isMethod &&\n !privateFieldsAsSymbolsOrProperties:\n if (!process.env.BABEL_8_BREAKING && !newHelpers(file)) {\n staticNodes.unshift(\n // @ts-expect-error checked in switch\n buildPrivateStaticFieldInitSpecOld(prop, privateNamesMap),\n );\n }\n pureStaticNodes.push(\n buildPrivateMethodDeclaration(\n file,\n prop,\n privateNamesMap,\n privateFieldsAsSymbolsOrProperties,\n ),\n );\n break;\n case isStatic &&\n isPrivate &&\n isMethod &&\n privateFieldsAsSymbolsOrProperties:\n staticNodes.unshift(\n buildPrivateStaticMethodInitLoose(\n t.cloneNode(ref),\n prop,\n file,\n privateNamesMap,\n ),\n );\n pureStaticNodes.push(\n buildPrivateMethodDeclaration(\n file,\n prop,\n privateNamesMap,\n privateFieldsAsSymbolsOrProperties,\n ),\n );\n break;\n case isInstance && isPublic && isField && setPublicClassFields:\n instanceNodes.push(buildPublicFieldInitLoose(t.thisExpression(), prop));\n break;\n case isInstance && isPublic && isField && !setPublicClassFields:\n lastInstanceNodeReturnsThis = true;\n instanceNodes.push(\n buildPublicFieldInitSpec(t.thisExpression(), prop, file),\n );\n break;\n default:\n throw new Error(\"Unreachable.\");\n }\n }\n\n if (classRefFlags & ClassRefFlag.ForInnerBinding && innerBindingRef != null) {\n classBindingNode = t.expressionStatement(\n t.assignmentExpression(\n \"=\",\n t.cloneNode(classRefForInnerBinding),\n t.cloneNode(innerBindingRef),\n ),\n );\n }\n\n return {\n staticNodes: staticNodes.filter(Boolean),\n instanceNodes: instanceNodes.filter(Boolean),\n lastInstanceNodeReturnsThis,\n pureStaticNodes: pureStaticNodes.filter(Boolean),\n classBindingNode,\n wrapClass(path: NodePath) {\n for (const prop of props) {\n // Delete leading comments so that they don't get attached as\n // trailing comments of the previous sibling.\n // When transforming props, we explicitly attach their leading\n // comments to the transformed node with `inheritPropComments`\n // above.\n prop.node.leadingComments = null;\n prop.remove();\n }\n\n if (injectSuperRef) {\n path.scope.push({ id: t.cloneNode(injectSuperRef) });\n path.set(\n \"superClass\",\n t.assignmentExpression(\"=\", injectSuperRef, path.node.superClass),\n );\n }\n\n if (classRefFlags !== ClassRefFlag.None) {\n if (path.isClassExpression()) {\n path.scope.push({ id: ref });\n path.replaceWith(\n t.assignmentExpression(\"=\", t.cloneNode(ref), path.node),\n );\n } else {\n if (innerBindingRef == null) {\n // export anonymous class declaration\n path.node.id = ref;\n }\n if (classBindingNode != null) {\n path.scope.push({ id: classRefForInnerBinding });\n }\n }\n }\n\n return path;\n },\n };\n}\n","import { template, types as t } from \"@babel/core\";\nimport type { File, NodePath, Scope, Visitor } from \"@babel/core\";\nimport { visitors } from \"@babel/traverse\";\n\nconst findBareSupers = visitors.environmentVisitor<\n NodePath[]\n>({\n Super(path) {\n const { node, parentPath } = path;\n if (parentPath.isCallExpression({ callee: node })) {\n this.push(parentPath);\n }\n },\n});\n\nconst referenceVisitor: Visitor<{ scope: Scope }> = {\n \"TSTypeAnnotation|TypeAnnotation\"(\n path: NodePath,\n ) {\n path.skip();\n },\n\n ReferencedIdentifier(path: NodePath, { scope }) {\n if (scope.hasOwnBinding(path.node.name)) {\n scope.rename(path.node.name);\n path.skip();\n }\n },\n};\n\ntype HandleClassTDZState = {\n classBinding: Scope.Binding;\n file: File;\n};\n\nfunction handleClassTDZ(\n path: NodePath,\n state: HandleClassTDZState,\n) {\n if (\n state.classBinding &&\n state.classBinding === path.scope.getBinding(path.node.name)\n ) {\n const classNameTDZError = state.file.addHelper(\"classNameTDZError\");\n const throwNode = t.callExpression(classNameTDZError, [\n t.stringLiteral(path.node.name),\n ]);\n\n path.replaceWith(t.sequenceExpression([throwNode, path.node]));\n path.skip();\n }\n}\n\nconst classFieldDefinitionEvaluationTDZVisitor: Visitor = {\n ReferencedIdentifier: handleClassTDZ,\n};\n\ninterface RenamerState {\n scope: Scope;\n}\n\nexport function injectInitialization(\n path: NodePath,\n constructor: NodePath | undefined,\n nodes: t.ExpressionStatement[],\n renamer?: (visitor: Visitor, state: RenamerState) => void,\n lastReturnsThis?: boolean,\n) {\n if (!nodes.length) return;\n\n const isDerived = !!path.node.superClass;\n\n if (!constructor) {\n const newConstructor = t.classMethod(\n \"constructor\",\n t.identifier(\"constructor\"),\n [],\n t.blockStatement([]),\n );\n\n if (isDerived) {\n newConstructor.params = [t.restElement(t.identifier(\"args\"))];\n newConstructor.body.body.push(template.statement.ast`super(...args)`);\n }\n\n [constructor] = path\n .get(\"body\")\n .unshiftContainer(\"body\", newConstructor) as NodePath[];\n }\n\n if (renamer) {\n renamer(referenceVisitor, { scope: constructor.scope });\n }\n\n if (isDerived) {\n const bareSupers: NodePath[] = [];\n constructor.traverse(findBareSupers, bareSupers);\n let isFirst = true;\n for (const bareSuper of bareSupers) {\n if (isFirst) {\n isFirst = false;\n } else {\n nodes = nodes.map(n => t.cloneNode(n));\n }\n if (!bareSuper.parentPath.isExpressionStatement()) {\n const allNodes: t.Expression[] = [\n bareSuper.node,\n ...nodes.map(n => t.toExpression(n)),\n ];\n if (!lastReturnsThis) allNodes.push(t.thisExpression());\n bareSuper.replaceWith(t.sequenceExpression(allNodes));\n } else {\n bareSuper.insertAfter(nodes);\n }\n }\n } else {\n constructor.get(\"body\").unshiftContainer(\"body\", nodes);\n }\n}\n\ntype ComputedKeyAssignmentExpression = t.AssignmentExpression & {\n left: t.Identifier;\n};\n\n/**\n * Try to memoise a computed key.\n * It returns undefined when the computed key is an uid reference, otherwise\n * an assignment expression `memoiserId = computed key`\n * @export\n * @param {t.Expression} keyNode Computed key\n * @param {Scope} scope The scope where memoiser id should be registered\n * @param {string} hint The memoiser id hint\n * @returns {(ComputedKeyAssignmentExpression | undefined)}\n */\nexport function memoiseComputedKey(\n keyNode: t.Expression,\n scope: Scope,\n hint: string,\n): ComputedKeyAssignmentExpression | undefined {\n const isUidReference = t.isIdentifier(keyNode) && scope.hasUid(keyNode.name);\n if (isUidReference) {\n return;\n }\n const isMemoiseAssignment =\n t.isAssignmentExpression(keyNode, { operator: \"=\" }) &&\n t.isIdentifier(keyNode.left) &&\n scope.hasUid(keyNode.left.name);\n if (isMemoiseAssignment) {\n return t.cloneNode(keyNode as ComputedKeyAssignmentExpression);\n } else {\n const ident = t.identifier(hint);\n // Declaring in the same block scope\n // Ref: https://github.com/babel/babel/pull/10029/files#diff-fbbdd83e7a9c998721c1484529c2ce92\n scope.push({\n id: ident,\n kind: \"let\",\n });\n return t.assignmentExpression(\n \"=\",\n t.cloneNode(ident),\n keyNode,\n ) as ComputedKeyAssignmentExpression;\n }\n}\n\nexport function extractComputedKeys(\n path: NodePath,\n computedPaths: NodePath[],\n file: File,\n) {\n const { scope } = path;\n const declarations: t.ExpressionStatement[] = [];\n const state = {\n classBinding: path.node.id && scope.getBinding(path.node.id.name),\n file,\n };\n for (const computedPath of computedPaths) {\n const computedKey = computedPath.get(\"key\");\n if (computedKey.isReferencedIdentifier()) {\n handleClassTDZ(computedKey, state);\n } else {\n computedKey.traverse(classFieldDefinitionEvaluationTDZVisitor, state);\n }\n\n const computedNode = computedPath.node;\n // Make sure computed property names are only evaluated once (upon class definition)\n // and in the right order in combination with static properties\n if (!computedKey.isConstantExpression()) {\n const assignment = memoiseComputedKey(\n computedKey.node,\n scope,\n scope.generateUidBasedOnNode(computedKey.node),\n );\n if (assignment) {\n declarations.push(t.expressionStatement(assignment));\n computedNode.key = t.cloneNode(assignment.left);\n }\n }\n }\n\n return declarations;\n}\n","import type { NodePath, Scope, Visitor } from \"@babel/core\";\nimport { types as t, template } from \"@babel/core\";\nimport ReplaceSupers from \"@babel/helper-replace-supers\";\nimport type { PluginAPI, PluginObject, PluginPass } from \"@babel/core\";\nimport { skipTransparentExprWrappers } from \"@babel/helper-skip-transparent-expression-wrappers\";\nimport {\n privateNameVisitorFactory,\n type PrivateNameVisitorState,\n} from \"./fields.ts\";\nimport { memoiseComputedKey } from \"./misc.ts\";\n\n// We inline this package\n// eslint-disable-next-line import/no-extraneous-dependencies\nimport * as charCodes from \"charcodes\";\ninterface Options {\n /** @deprecated use `constantSuper` assumption instead. Only supported in 2021-12 version. */\n loose?: boolean;\n}\n\ntype ClassDecoratableElement =\n | t.ClassMethod\n | t.ClassPrivateMethod\n | t.ClassProperty\n | t.ClassPrivateProperty\n | t.ClassAccessorProperty;\n\ntype ClassElement =\n | ClassDecoratableElement\n | t.TSDeclareMethod\n | t.TSIndexSignature\n | t.StaticBlock;\n\ntype ClassElementCanHaveComputedKeys =\n | t.ClassMethod\n | t.ClassProperty\n | t.ClassAccessorProperty;\n\n// TODO(Babel 8): Only keep 2023-11\nexport type DecoratorVersionKind =\n | \"2023-11\"\n | \"2023-05\"\n | \"2023-01\"\n | \"2022-03\"\n | \"2021-12\";\n\nfunction incrementId(id: number[], idx = id.length - 1): void {\n // If index is -1, id needs an additional character, unshift A\n if (idx === -1) {\n id.unshift(charCodes.uppercaseA);\n return;\n }\n\n const current = id[idx];\n\n if (current === charCodes.uppercaseZ) {\n // if current is Z, skip to a\n id[idx] = charCodes.lowercaseA;\n } else if (current === charCodes.lowercaseZ) {\n // if current is z, reset to A and carry the 1\n id[idx] = charCodes.uppercaseA;\n incrementId(id, idx - 1);\n } else {\n // else, increment by one\n id[idx] = current + 1;\n }\n}\n\n/**\n * Generates a new private name that is unique to the given class. This can be\n * used to create extra class fields and methods for the implementation, while\n * keeping the length of those names as small as possible. This is important for\n * minification purposes (though private names can generally be minified,\n * transpilations and polyfills cannot yet).\n */\nfunction createPrivateUidGeneratorForClass(\n classPath: NodePath,\n): () => t.PrivateName {\n const currentPrivateId: number[] = [];\n const privateNames = new Set();\n\n classPath.traverse({\n PrivateName(path) {\n privateNames.add(path.node.id.name);\n },\n });\n\n return (): t.PrivateName => {\n let reifiedId;\n do {\n incrementId(currentPrivateId);\n reifiedId = String.fromCharCode(...currentPrivateId);\n } while (privateNames.has(reifiedId));\n\n return t.privateName(t.identifier(reifiedId));\n };\n}\n\n/**\n * Wraps the above generator function so that it's run lazily the first time\n * it's actually required. Several types of decoration do not require this, so it\n * saves iterating the class elements an additional time and allocating the space\n * for the Sets of element names.\n */\nfunction createLazyPrivateUidGeneratorForClass(\n classPath: NodePath,\n): () => t.PrivateName {\n let generator: () => t.PrivateName;\n\n return (): t.PrivateName => {\n if (!generator) {\n generator = createPrivateUidGeneratorForClass(classPath);\n }\n\n return generator();\n };\n}\n\n/**\n * Takes a class definition and the desired class name if anonymous and\n * replaces it with an equivalent class declaration (path) which is then\n * assigned to a local variable (id). This allows us to reassign the local variable with the\n * decorated version of the class. The class definition retains its original\n * name so that `toString` is not affected, other references to the class\n * are renamed instead.\n */\nfunction replaceClassWithVar(\n path: NodePath,\n className: string | t.Identifier | t.StringLiteral | undefined,\n): {\n id: t.Identifier;\n path: NodePath;\n} {\n const id = path.node.id;\n const scope = path.scope;\n if (path.type === \"ClassDeclaration\") {\n const className = id.name;\n const varId = scope.generateUidIdentifierBasedOnNode(id);\n const classId = t.identifier(className);\n\n scope.rename(className, varId.name);\n\n path.get(\"id\").replaceWith(classId);\n\n return { id: t.cloneNode(varId), path };\n } else {\n let varId: t.Identifier;\n\n if (id) {\n className = id.name;\n varId = generateLetUidIdentifier(scope.parent, className);\n scope.rename(className, varId.name);\n } else {\n varId = generateLetUidIdentifier(\n scope.parent,\n typeof className === \"string\" ? className : \"decorated_class\",\n );\n }\n\n const newClassExpr = t.classExpression(\n typeof className === \"string\" ? t.identifier(className) : null,\n path.node.superClass,\n path.node.body,\n );\n\n const [newPath] = path.replaceWith(\n t.sequenceExpression([newClassExpr, varId]),\n );\n\n return {\n id: t.cloneNode(varId),\n path: newPath.get(\"expressions.0\") as NodePath,\n };\n }\n}\n\nfunction generateClassProperty(\n key: t.PrivateName | t.Identifier,\n value: t.Expression | undefined,\n isStatic: boolean,\n): t.ClassPrivateProperty | t.ClassProperty {\n if (key.type === \"PrivateName\") {\n return t.classPrivateProperty(key, value, undefined, isStatic);\n } else {\n return t.classProperty(key, value, undefined, undefined, isStatic);\n }\n}\n\nfunction assignIdForAnonymousClass(\n path: NodePath,\n className: string | t.Identifier | t.StringLiteral | undefined,\n) {\n if (!path.node.id) {\n path.node.id =\n typeof className === \"string\"\n ? t.identifier(className)\n : path.scope.generateUidIdentifier(\"Class\");\n }\n}\n\nfunction addProxyAccessorsFor(\n className: t.Identifier,\n element: NodePath,\n getterKey: t.PrivateName | t.Expression,\n setterKey: t.PrivateName | t.Expression,\n targetKey: t.PrivateName,\n isComputed: boolean,\n isStatic: boolean,\n version: DecoratorVersionKind,\n): void {\n const thisArg =\n (version === \"2023-11\" ||\n (!process.env.BABEL_8_BREAKING && version === \"2023-05\")) &&\n isStatic\n ? className\n : t.thisExpression();\n\n const getterBody = t.blockStatement([\n t.returnStatement(\n t.memberExpression(t.cloneNode(thisArg), t.cloneNode(targetKey)),\n ),\n ]);\n\n const setterBody = t.blockStatement([\n t.expressionStatement(\n t.assignmentExpression(\n \"=\",\n t.memberExpression(t.cloneNode(thisArg), t.cloneNode(targetKey)),\n t.identifier(\"v\"),\n ),\n ),\n ]);\n\n let getter: t.ClassMethod | t.ClassPrivateMethod,\n setter: t.ClassMethod | t.ClassPrivateMethod;\n\n if (getterKey.type === \"PrivateName\") {\n getter = t.classPrivateMethod(\"get\", getterKey, [], getterBody, isStatic);\n setter = t.classPrivateMethod(\n \"set\",\n setterKey as t.PrivateName,\n [t.identifier(\"v\")],\n setterBody,\n isStatic,\n );\n } else {\n getter = t.classMethod(\n \"get\",\n getterKey,\n [],\n getterBody,\n isComputed,\n isStatic,\n );\n setter = t.classMethod(\n \"set\",\n setterKey as t.Expression,\n [t.identifier(\"v\")],\n setterBody,\n isComputed,\n isStatic,\n );\n }\n\n element.insertAfter(setter);\n element.insertAfter(getter);\n}\n\nfunction extractProxyAccessorsFor(\n targetKey: t.PrivateName,\n version: DecoratorVersionKind,\n): (t.FunctionExpression | t.ArrowFunctionExpression)[] {\n if (version !== \"2023-11\" && version !== \"2023-05\" && version !== \"2023-01\") {\n return [\n template.expression.ast`\n function () {\n return this.${t.cloneNode(targetKey)};\n }\n ` as t.FunctionExpression,\n template.expression.ast`\n function (value) {\n this.${t.cloneNode(targetKey)} = value;\n }\n ` as t.FunctionExpression,\n ];\n }\n return [\n template.expression.ast`\n o => o.${t.cloneNode(targetKey)}\n ` as t.ArrowFunctionExpression,\n template.expression.ast`\n (o, v) => o.${t.cloneNode(targetKey)} = v\n ` as t.ArrowFunctionExpression,\n ];\n}\n\n/**\n * Get the last element for the given computed key path.\n *\n * This function unwraps transparent wrappers and gets the last item when\n * the key is a SequenceExpression.\n *\n * @param {NodePath} path The key of a computed class element\n * @returns {NodePath} The simple completion result\n */\nfunction getComputedKeyLastElement(\n path: NodePath,\n): NodePath {\n path = skipTransparentExprWrappers(path);\n if (path.isSequenceExpression()) {\n const expressions = path.get(\"expressions\");\n return getComputedKeyLastElement(expressions[expressions.length - 1]);\n }\n return path;\n}\n\n/**\n * Get a memoiser of the computed key path.\n *\n * This function does not mutate AST. If the computed key is not a constant\n * expression, this function must be called after the key has been memoised.\n *\n * @param {NodePath} path The key of a computed class element.\n * @returns {t.Expression} A clone of key if key is a constant expression,\n * otherwise a memoiser identifier.\n */\nfunction getComputedKeyMemoiser(path: NodePath): t.Expression {\n const element = getComputedKeyLastElement(path);\n if (element.isConstantExpression()) {\n return t.cloneNode(path.node);\n } else if (element.isIdentifier() && path.scope.hasUid(element.node.name)) {\n return t.cloneNode(path.node);\n } else if (\n element.isAssignmentExpression() &&\n element.get(\"left\").isIdentifier()\n ) {\n return t.cloneNode(element.node.left as t.Identifier);\n } else {\n throw new Error(\n `Internal Error: the computed key ${path.toString()} has not yet been memoised.`,\n );\n }\n}\n\n/**\n * Prepend expressions to the computed key of the given field path.\n *\n * If the computed key is a sequence expression, this function will unwrap\n * the sequence expression for optimal output size.\n *\n * @param {t.Expression[]} expressions\n * @param {(NodePath<\n * t.ClassMethod | t.ClassProperty | t.ClassAccessorProperty\n * >)} fieldPath\n */\nfunction prependExpressionsToComputedKey(\n expressions: t.Expression[],\n fieldPath: NodePath<\n t.ClassMethod | t.ClassProperty | t.ClassAccessorProperty\n >,\n) {\n const key = fieldPath.get(\"key\") as NodePath;\n if (key.isSequenceExpression()) {\n expressions.push(...key.node.expressions);\n } else {\n expressions.push(key.node);\n }\n key.replaceWith(maybeSequenceExpression(expressions));\n}\n\n/**\n * Append expressions to the computed key of the given field path.\n *\n * If the computed key is a constant expression or uid reference, it\n * will prepend expressions before the comptued key. Otherwise it will\n * memoise the computed key to preserve its completion result.\n *\n * @param {t.Expression[]} expressions\n * @param {(NodePath<\n * t.ClassMethod | t.ClassProperty | t.ClassAccessorProperty\n * >)} fieldPath\n */\nfunction appendExpressionsToComputedKey(\n expressions: t.Expression[],\n fieldPath: NodePath<\n t.ClassMethod | t.ClassProperty | t.ClassAccessorProperty\n >,\n) {\n const key = fieldPath.get(\"key\") as NodePath;\n const completion = getComputedKeyLastElement(key);\n if (completion.isConstantExpression()) {\n prependExpressionsToComputedKey(expressions, fieldPath);\n } else {\n const scopeParent = key.scope.parent;\n const maybeAssignment = memoiseComputedKey(\n completion.node,\n scopeParent,\n scopeParent.generateUid(\"computedKey\"),\n );\n if (!maybeAssignment) {\n // If the memoiseComputedKey returns undefined, the key is already a uid reference,\n // treat it as a constant expression and prepend expressions before it\n prependExpressionsToComputedKey(expressions, fieldPath);\n } else {\n const expressionSequence = [\n ...expressions,\n // preserve the completion result\n t.cloneNode(maybeAssignment.left),\n ];\n const completionParent = completion.parentPath;\n if (completionParent.isSequenceExpression()) {\n completionParent.pushContainer(\"expressions\", expressionSequence);\n } else {\n completion.replaceWith(\n maybeSequenceExpression([\n t.cloneNode(maybeAssignment),\n ...expressionSequence,\n ]),\n );\n }\n }\n }\n}\n\n/**\n * Prepend expressions to the field initializer. If the initializer is not defined,\n * this function will wrap the last expression within a `void` unary expression.\n *\n * @param {t.Expression[]} expressions\n * @param {(NodePath<\n * t.ClassProperty | t.ClassPrivateProperty | t.ClassAccessorProperty\n * >)} fieldPath\n */\nfunction prependExpressionsToFieldInitializer(\n expressions: t.Expression[],\n fieldPath: NodePath<\n t.ClassProperty | t.ClassPrivateProperty | t.ClassAccessorProperty\n >,\n) {\n const initializer = fieldPath.get(\"value\");\n if (initializer.node) {\n expressions.push(initializer.node);\n } else if (expressions.length > 0) {\n expressions[expressions.length - 1] = t.unaryExpression(\n \"void\",\n expressions[expressions.length - 1],\n );\n }\n initializer.replaceWith(maybeSequenceExpression(expressions));\n}\n\nfunction prependExpressionsToStaticBlock(\n expressions: t.Expression[],\n blockPath: NodePath,\n) {\n blockPath.unshiftContainer(\n \"body\",\n t.expressionStatement(maybeSequenceExpression(expressions)),\n );\n}\n\nfunction prependExpressionsToConstructor(\n expressions: t.Expression[],\n constructorPath: NodePath,\n) {\n constructorPath.node.body.body.unshift(\n t.expressionStatement(maybeSequenceExpression(expressions)),\n );\n}\n\nfunction isProtoInitCallExpression(\n expression: t.Expression,\n protoInitCall: t.Identifier,\n) {\n return (\n t.isCallExpression(expression) &&\n t.isIdentifier(expression.callee, { name: protoInitCall.name })\n );\n}\n\n/**\n * Optimize super call and its following expressions\n *\n * @param {t.Expression[]} expressions Mutated by this function. The first element must by a super call\n * @param {t.Identifier} protoInitLocal The generated protoInit id\n * @returns optimized expression\n */\nfunction optimizeSuperCallAndExpressions(\n expressions: t.Expression[],\n protoInitLocal: t.Identifier,\n) {\n if (protoInitLocal) {\n if (\n expressions.length >= 2 &&\n isProtoInitCallExpression(expressions[1], protoInitLocal)\n ) {\n // Merge `super(), protoInit(this)` into `protoInit(super())`\n const mergedSuperCall = t.callExpression(t.cloneNode(protoInitLocal), [\n expressions[0],\n ]);\n expressions.splice(0, 2, mergedSuperCall);\n }\n // Merge `protoInit(super()), this` into `protoInit(super())`\n if (\n expressions.length >= 2 &&\n t.isThisExpression(expressions[expressions.length - 1]) &&\n isProtoInitCallExpression(\n expressions[expressions.length - 2],\n protoInitLocal,\n )\n ) {\n expressions.splice(expressions.length - 1, 1);\n }\n }\n return maybeSequenceExpression(expressions);\n}\n\n/**\n * Insert expressions immediately after super() and optimize the output if possible.\n * This function will preserve the completion result using the trailing this expression.\n *\n * @param {t.Expression[]} expressions\n * @param {NodePath} constructorPath\n * @param {t.Identifier} protoInitLocal The generated protoInit id\n * @returns\n */\nfunction insertExpressionsAfterSuperCallAndOptimize(\n expressions: t.Expression[],\n constructorPath: NodePath,\n protoInitLocal: t.Identifier,\n) {\n constructorPath.traverse({\n CallExpression: {\n exit(path) {\n if (!path.get(\"callee\").isSuper()) return;\n const newNodes = [\n path.node,\n ...expressions.map(expr => t.cloneNode(expr)),\n ];\n // preserve completion result if super() is in an RHS or a return statement\n if (path.isCompletionRecord()) {\n newNodes.push(t.thisExpression());\n }\n path.replaceWith(\n optimizeSuperCallAndExpressions(newNodes, protoInitLocal),\n );\n\n path.skip();\n },\n },\n ClassMethod(path) {\n if (path.node.kind === \"constructor\") {\n path.skip();\n }\n },\n });\n}\n\n/**\n * Build a class constructor node from the given expressions. If the class is\n * derived, the constructor will call super() first to ensure that `this`\n * in the expressions work as expected.\n *\n * @param {t.Expression[]} expressions\n * @param {boolean} isDerivedClass\n * @returns The class constructor node\n */\nfunction createConstructorFromExpressions(\n expressions: t.Expression[],\n isDerivedClass: boolean,\n) {\n const body: t.Statement[] = [\n t.expressionStatement(maybeSequenceExpression(expressions)),\n ];\n if (isDerivedClass) {\n body.unshift(\n t.expressionStatement(\n t.callExpression(t.super(), [t.spreadElement(t.identifier(\"args\"))]),\n ),\n );\n }\n return t.classMethod(\n \"constructor\",\n t.identifier(\"constructor\"),\n isDerivedClass ? [t.restElement(t.identifier(\"args\"))] : [],\n t.blockStatement(body),\n );\n}\n\nfunction createStaticBlockFromExpressions(expressions: t.Expression[]) {\n return t.staticBlock([\n t.expressionStatement(maybeSequenceExpression(expressions)),\n ]);\n}\n\n// 3 bits reserved to this (0-7)\nconst FIELD = 0;\nconst ACCESSOR = 1;\nconst METHOD = 2;\nconst GETTER = 3;\nconst SETTER = 4;\n\nconst STATIC_OLD_VERSION = 5; // Before 2023-05\nconst STATIC = 8; // 1 << 3\nconst DECORATORS_HAVE_THIS = 16; // 1 << 4\n\nfunction getElementKind(element: NodePath): number {\n switch (element.node.type) {\n case \"ClassProperty\":\n case \"ClassPrivateProperty\":\n return FIELD;\n case \"ClassAccessorProperty\":\n return ACCESSOR;\n case \"ClassMethod\":\n case \"ClassPrivateMethod\":\n if (element.node.kind === \"get\") {\n return GETTER;\n } else if (element.node.kind === \"set\") {\n return SETTER;\n } else {\n return METHOD;\n }\n }\n}\n\n// Information about the decorators applied to an element\ninterface DecoratorInfo {\n // An array of applied decorators or a memoised identifier\n decoratorsArray: t.Identifier | t.ArrayExpression | t.Expression;\n decoratorsHaveThis: boolean;\n\n // The kind of the decorated value, matches the kind value passed to applyDecs\n kind: number;\n\n // whether or not the field is static\n isStatic: boolean;\n\n // The name of the decorator\n name: t.StringLiteral | t.Expression;\n\n privateMethods:\n | (t.FunctionExpression | t.ArrowFunctionExpression)[]\n | undefined;\n\n // The names of local variables that will be used/returned from the decoration\n locals: t.Identifier | t.Identifier[] | undefined;\n}\n\n/**\n * Sort decoration info in the application order:\n * - static non-fields\n * - instance non-fields\n * - static fields\n * - instance fields\n *\n * @param {DecoratorInfo[]} info\n * @returns {DecoratorInfo[]} Sorted decoration info\n */\nfunction toSortedDecoratorInfo(info: DecoratorInfo[]): DecoratorInfo[] {\n return [\n ...info.filter(\n el => el.isStatic && el.kind >= ACCESSOR && el.kind <= SETTER,\n ),\n ...info.filter(\n el => !el.isStatic && el.kind >= ACCESSOR && el.kind <= SETTER,\n ),\n ...info.filter(el => el.isStatic && el.kind === FIELD),\n ...info.filter(el => !el.isStatic && el.kind === FIELD),\n ];\n}\n\ntype GenerateDecorationListResult = {\n // The zipped decorators array that will be passed to generateDecorationExprs\n decs: t.Expression[];\n // Whether there are non-empty decorator this values\n haveThis: boolean;\n};\n/**\n * Zip decorators and decorator this values into an array\n *\n * @param {t.Decorator[]} decorators\n * @param {((t.Expression | undefined)[])} decoratorsThis decorator this values\n * @param {DecoratorVersionKind} version\n * @returns {GenerateDecorationListResult}\n */\nfunction generateDecorationList(\n decorators: t.Decorator[],\n decoratorsThis: (t.Expression | undefined)[],\n version: DecoratorVersionKind,\n): GenerateDecorationListResult {\n const decsCount = decorators.length;\n const haveOneThis = decoratorsThis.some(Boolean);\n const decs: t.Expression[] = [];\n for (let i = 0; i < decsCount; i++) {\n if (\n (version === \"2023-11\" ||\n (!process.env.BABEL_8_BREAKING && version === \"2023-05\")) &&\n haveOneThis\n ) {\n decs.push(\n decoratorsThis[i] || t.unaryExpression(\"void\", t.numericLiteral(0)),\n );\n }\n decs.push(decorators[i].expression);\n }\n\n return { haveThis: haveOneThis, decs };\n}\n\nfunction generateDecorationExprs(\n decorationInfo: DecoratorInfo[],\n version: DecoratorVersionKind,\n): t.ArrayExpression {\n return t.arrayExpression(\n decorationInfo.map(el => {\n let flag = el.kind;\n if (el.isStatic) {\n flag +=\n version === \"2023-11\" ||\n (!process.env.BABEL_8_BREAKING && version === \"2023-05\")\n ? STATIC\n : STATIC_OLD_VERSION;\n }\n if (el.decoratorsHaveThis) flag += DECORATORS_HAVE_THIS;\n\n return t.arrayExpression([\n el.decoratorsArray,\n t.numericLiteral(flag),\n el.name,\n ...(el.privateMethods || []),\n ]);\n }),\n );\n}\n\nfunction extractElementLocalAssignments(decorationInfo: DecoratorInfo[]) {\n const localIds: t.Identifier[] = [];\n\n for (const el of decorationInfo) {\n const { locals } = el;\n\n if (Array.isArray(locals)) {\n localIds.push(...locals);\n } else if (locals !== undefined) {\n localIds.push(locals);\n }\n }\n\n return localIds;\n}\n\nfunction addCallAccessorsFor(\n version: DecoratorVersionKind,\n element: NodePath,\n key: t.PrivateName,\n getId: t.Identifier,\n setId: t.Identifier,\n isStatic: boolean,\n) {\n element.insertAfter(\n t.classPrivateMethod(\n \"get\",\n t.cloneNode(key),\n [],\n t.blockStatement([\n t.returnStatement(\n t.callExpression(\n t.cloneNode(getId),\n (process.env.BABEL_8_BREAKING || version === \"2023-11\") && isStatic\n ? []\n : [t.thisExpression()],\n ),\n ),\n ]),\n isStatic,\n ),\n );\n\n element.insertAfter(\n t.classPrivateMethod(\n \"set\",\n t.cloneNode(key),\n [t.identifier(\"v\")],\n t.blockStatement([\n t.expressionStatement(\n t.callExpression(\n t.cloneNode(setId),\n (process.env.BABEL_8_BREAKING || version === \"2023-11\") && isStatic\n ? [t.identifier(\"v\")]\n : [t.thisExpression(), t.identifier(\"v\")],\n ),\n ),\n ]),\n isStatic,\n ),\n );\n}\n\nfunction movePrivateAccessor(\n element: NodePath,\n key: t.PrivateName,\n methodLocalVar: t.Identifier,\n isStatic: boolean,\n) {\n let params: (t.Identifier | t.RestElement)[];\n let block: t.Statement[];\n\n if (element.node.kind === \"set\") {\n params = [t.identifier(\"v\")];\n block = [\n t.expressionStatement(\n t.callExpression(methodLocalVar, [\n t.thisExpression(),\n t.identifier(\"v\"),\n ]),\n ),\n ];\n } else {\n params = [];\n block = [\n t.returnStatement(t.callExpression(methodLocalVar, [t.thisExpression()])),\n ];\n }\n\n element.replaceWith(\n t.classPrivateMethod(\n element.node.kind,\n t.cloneNode(key),\n params,\n t.blockStatement(block),\n isStatic,\n ),\n );\n}\n\nfunction isClassDecoratableElementPath(\n path: NodePath,\n): path is NodePath {\n const { type } = path;\n\n return (\n type !== \"TSDeclareMethod\" &&\n type !== \"TSIndexSignature\" &&\n type !== \"StaticBlock\"\n );\n}\n\nfunction staticBlockToIIFE(block: t.StaticBlock) {\n return t.callExpression(\n t.arrowFunctionExpression([], t.blockStatement(block.body)),\n [],\n );\n}\n\nfunction staticBlockToFunctionClosure(block: t.StaticBlock) {\n return t.functionExpression(null, [], t.blockStatement(block.body));\n}\n\nfunction fieldInitializerToClosure(value: t.Expression) {\n return t.functionExpression(\n null,\n [],\n t.blockStatement([t.returnStatement(value)]),\n );\n}\n\nfunction maybeSequenceExpression(exprs: t.Expression[]) {\n if (exprs.length === 0) return t.unaryExpression(\"void\", t.numericLiteral(0));\n if (exprs.length === 1) return exprs[0];\n return t.sequenceExpression(exprs);\n}\n\n/**\n * Create FunctionExpression from a ClassPrivateMethod.\n * The returned FunctionExpression node takes ownership of the private method's body and params.\n *\n * @param {t.ClassPrivateMethod} node\n * @returns\n */\nfunction createFunctionExpressionFromPrivateMethod(node: t.ClassPrivateMethod) {\n const { params, body, generator: isGenerator, async: isAsync } = node;\n return t.functionExpression(\n undefined,\n // @ts-expect-error todo: Improve typings: TSParameterProperty is only allowed in constructor\n params,\n body,\n isGenerator,\n isAsync,\n );\n}\n\nfunction createSetFunctionNameCall(\n state: PluginPass,\n className: t.Identifier | t.StringLiteral,\n) {\n return t.callExpression(state.addHelper(\"setFunctionName\"), [\n t.thisExpression(),\n className,\n ]);\n}\n\nfunction createToPropertyKeyCall(state: PluginPass, propertyKey: t.Expression) {\n return t.callExpression(state.addHelper(\"toPropertyKey\"), [propertyKey]);\n}\n\nfunction createPrivateBrandCheckClosure(brandName: t.PrivateName) {\n return t.arrowFunctionExpression(\n [t.identifier(\"_\")],\n t.binaryExpression(\"in\", t.cloneNode(brandName), t.identifier(\"_\")),\n );\n}\n\nfunction usesPrivateField(expression: t.Node) {\n try {\n t.traverseFast(expression, node => {\n if (t.isPrivateName(node)) {\n // TODO: Add early return support to t.traverseFast\n // eslint-disable-next-line @typescript-eslint/only-throw-error\n throw null;\n }\n });\n return false;\n } catch {\n return true;\n }\n}\n\n/**\n * Convert a non-computed class element to its equivalent computed form.\n *\n * This function is to provide a decorator evaluation storage from non-computed\n * class elements.\n *\n * @param {(NodePath)} path A non-computed class property or method\n */\nfunction convertToComputedKey(path: NodePath) {\n const { node } = path;\n node.computed = true;\n if (t.isIdentifier(node.key)) {\n node.key = t.stringLiteral(node.key.name);\n }\n}\n\nfunction hasInstancePrivateAccess(path: NodePath, privateNames: string[]) {\n let containsInstancePrivateAccess = false;\n if (privateNames.length > 0) {\n const privateNameVisitor = privateNameVisitorFactory<\n PrivateNameVisitorState,\n null\n >({\n PrivateName(path, state) {\n if (state.privateNamesMap.has(path.node.id.name)) {\n containsInstancePrivateAccess = true;\n path.stop();\n }\n },\n });\n const privateNamesMap = new Map();\n for (const name of privateNames) {\n privateNamesMap.set(name, null);\n }\n path.traverse(privateNameVisitor, {\n privateNamesMap: privateNamesMap,\n });\n }\n return containsInstancePrivateAccess;\n}\n\nfunction checkPrivateMethodUpdateError(\n path: NodePath,\n decoratedPrivateMethods: Set,\n) {\n const privateNameVisitor = privateNameVisitorFactory<\n PrivateNameVisitorState,\n null\n >({\n PrivateName(path, state) {\n if (!state.privateNamesMap.has(path.node.id.name)) return;\n\n const parentPath = path.parentPath;\n const parentParentPath = parentPath.parentPath;\n\n if (\n // this.bar().#x = 123;\n (parentParentPath.node.type === \"AssignmentExpression\" &&\n parentParentPath.node.left === parentPath.node) ||\n // this.#x++;\n parentParentPath.node.type === \"UpdateExpression\" ||\n // ([...this.#x] = foo);\n parentParentPath.node.type === \"RestElement\" ||\n // ([this.#x] = foo);\n parentParentPath.node.type === \"ArrayPattern\" ||\n // ({ a: this.#x } = bar);\n (parentParentPath.node.type === \"ObjectProperty\" &&\n parentParentPath.node.value === parentPath.node &&\n parentParentPath.parentPath.type === \"ObjectPattern\") ||\n // for (this.#x of []);\n (parentParentPath.node.type === \"ForOfStatement\" &&\n parentParentPath.node.left === parentPath.node)\n ) {\n throw path.buildCodeFrameError(\n `Decorated private methods are read-only, but \"#${path.node.id.name}\" is updated via this expression.`,\n );\n }\n },\n });\n const privateNamesMap = new Map();\n for (const name of decoratedPrivateMethods) {\n privateNamesMap.set(name, null);\n }\n path.traverse(privateNameVisitor, {\n privateNamesMap: privateNamesMap,\n });\n}\n\n/**\n * Apply decorator and accessor transform\n * @param path The class path.\n * @param state The plugin pass.\n * @param constantSuper The constantSuper compiler assumption.\n * @param ignoreFunctionLength The ignoreFunctionLength compiler assumption.\n * @param className The class name.\n * - If className is a `string`, it will be a valid identifier name that can safely serve as a class id\n * - If className is an Identifier, it is the reference to the name derived from NamedEvaluation\n * - If className is a StringLiteral, it is derived from NamedEvaluation on literal computed keys\n * @param propertyVisitor The visitor that should be applied on property prior to the transform.\n * @param version The decorator version.\n * @returns The transformed class path or undefined if there are no decorators.\n */\nfunction transformClass(\n path: NodePath,\n state: PluginPass,\n constantSuper: boolean,\n ignoreFunctionLength: boolean,\n className: string | t.Identifier | t.StringLiteral | undefined,\n propertyVisitor: Visitor,\n version: DecoratorVersionKind,\n): NodePath | undefined {\n const body = path.get(\"body.body\");\n\n const classDecorators = path.node.decorators;\n let hasElementDecorators = false;\n let hasComputedKeysSideEffects = false;\n let elemDecsUseFnContext = false;\n\n const generateClassPrivateUid = createLazyPrivateUidGeneratorForClass(path);\n\n const classAssignments: t.AssignmentExpression[] = [];\n const scopeParent: Scope = path.scope.parent;\n const memoiseExpression = (\n expression: t.Expression,\n hint: string,\n assignments: t.AssignmentExpression[],\n ) => {\n const localEvaluatedId = generateLetUidIdentifier(scopeParent, hint);\n assignments.push(t.assignmentExpression(\"=\", localEvaluatedId, expression));\n return t.cloneNode(localEvaluatedId);\n };\n\n let protoInitLocal: t.Identifier;\n let staticInitLocal: t.Identifier;\n const classIdName = path.node.id?.name;\n // Whether to generate a setFunctionName call to preserve the class name\n const setClassName = typeof className === \"object\" ? className : undefined;\n // Check if the decorator does not reference function-specific\n // context or the given identifier name or contains yield or await expression.\n // `true` means \"maybe\" and `false` means \"no\".\n const usesFunctionContextOrYieldAwait = (decorator: t.Decorator) => {\n try {\n t.traverseFast(decorator, node => {\n if (\n t.isThisExpression(node) ||\n t.isSuper(node) ||\n t.isYieldExpression(node) ||\n t.isAwaitExpression(node) ||\n t.isIdentifier(node, { name: \"arguments\" }) ||\n (classIdName && t.isIdentifier(node, { name: classIdName })) ||\n (t.isMetaProperty(node) && node.meta.name !== \"import\")\n ) {\n // TODO: Add early return support to t.traverseFast\n // eslint-disable-next-line @typescript-eslint/only-throw-error\n throw null;\n }\n });\n return false;\n } catch {\n return true;\n }\n };\n\n const instancePrivateNames: string[] = [];\n // Iterate over the class to see if we need to decorate it, and also to\n // transform simple auto accessors which are not decorated, and handle inferred\n // class name when the initializer of the class field is a class expression\n for (const element of body) {\n if (!isClassDecoratableElementPath(element)) {\n continue;\n }\n\n const elementNode = element.node;\n\n if (!elementNode.static && t.isPrivateName(elementNode.key)) {\n instancePrivateNames.push(elementNode.key.id.name);\n }\n\n if (isDecorated(elementNode)) {\n switch (elementNode.type) {\n case \"ClassProperty\":\n // @ts-expect-error todo: propertyVisitor.ClassProperty should be callable. Improve typings.\n propertyVisitor.ClassProperty(\n element as NodePath,\n state,\n );\n break;\n case \"ClassPrivateProperty\":\n // @ts-expect-error todo: propertyVisitor.ClassPrivateProperty should be callable. Improve typings.\n propertyVisitor.ClassPrivateProperty(\n element as NodePath,\n state,\n );\n break;\n case \"ClassAccessorProperty\":\n // @ts-expect-error todo: propertyVisitor.ClassAccessorProperty should be callable. Improve typings.\n propertyVisitor.ClassAccessorProperty(\n element as NodePath,\n state,\n );\n if (version === \"2023-11\") {\n break;\n }\n /* fallthrough */\n default:\n if (elementNode.static) {\n staticInitLocal ??= generateLetUidIdentifier(\n scopeParent,\n \"initStatic\",\n );\n } else {\n protoInitLocal ??= generateLetUidIdentifier(\n scopeParent,\n \"initProto\",\n );\n }\n break;\n }\n hasElementDecorators = true;\n elemDecsUseFnContext ||= elementNode.decorators.some(\n usesFunctionContextOrYieldAwait,\n );\n } else if (elementNode.type === \"ClassAccessorProperty\") {\n // @ts-expect-error todo: propertyVisitor.ClassAccessorProperty should be callable. Improve typings.\n propertyVisitor.ClassAccessorProperty(\n element as NodePath,\n state,\n );\n const { key, value, static: isStatic, computed } = elementNode;\n\n const newId = generateClassPrivateUid();\n const newField = generateClassProperty(newId, value, isStatic);\n const keyPath = element.get(\"key\");\n const [newPath] = element.replaceWith(newField);\n\n let getterKey, setterKey;\n if (computed && !keyPath.isConstantExpression()) {\n getterKey = memoiseComputedKey(\n createToPropertyKeyCall(state, key as t.Expression),\n scopeParent,\n scopeParent.generateUid(\"computedKey\"),\n )!;\n setterKey = t.cloneNode(getterKey.left as t.Identifier);\n } else {\n getterKey = t.cloneNode(key);\n setterKey = t.cloneNode(key);\n }\n\n assignIdForAnonymousClass(path, className);\n\n addProxyAccessorsFor(\n path.node.id,\n newPath,\n getterKey,\n setterKey,\n newId,\n computed,\n isStatic,\n version,\n );\n }\n\n if (\"computed\" in element.node && element.node.computed) {\n hasComputedKeysSideEffects ||= !scopeParent.isStatic(element.node.key);\n }\n }\n\n if (!classDecorators && !hasElementDecorators) {\n if (!path.node.id && typeof className === \"string\") {\n path.node.id = t.identifier(className);\n }\n if (setClassName) {\n path.node.body.body.unshift(\n createStaticBlockFromExpressions([\n createSetFunctionNameCall(state, setClassName),\n ]),\n );\n }\n // If nothing is decorated and no assignments inserted, return\n return;\n }\n\n const elementDecoratorInfo: DecoratorInfo[] = [];\n\n let constructorPath: NodePath | undefined;\n const decoratedPrivateMethods = new Set();\n\n let classInitLocal: t.Identifier, classIdLocal: t.Identifier;\n let decoratorReceiverId: t.Identifier | null = null;\n\n // Memoise the this value `a.b` of decorator member expressions `@a.b.dec`,\n type HandleDecoratorsResult = {\n // whether the whole decorator list requires memoisation\n hasSideEffects: boolean;\n usesFnContext: boolean;\n // the this value of each decorator if applicable\n decoratorsThis: (t.Expression | undefined)[];\n };\n function handleDecorators(decorators: t.Decorator[]): HandleDecoratorsResult {\n let hasSideEffects = false;\n let usesFnContext = false;\n const decoratorsThis: (t.Expression | null)[] = [];\n for (const decorator of decorators) {\n const { expression } = decorator;\n let object;\n if (\n (version === \"2023-11\" ||\n (!process.env.BABEL_8_BREAKING && version === \"2023-05\")) &&\n t.isMemberExpression(expression)\n ) {\n if (t.isSuper(expression.object)) {\n object = t.thisExpression();\n } else if (scopeParent.isStatic(expression.object)) {\n object = t.cloneNode(expression.object);\n } else {\n decoratorReceiverId ??= generateLetUidIdentifier(scopeParent, \"obj\");\n object = t.assignmentExpression(\n \"=\",\n t.cloneNode(decoratorReceiverId),\n expression.object,\n );\n expression.object = t.cloneNode(decoratorReceiverId);\n }\n }\n decoratorsThis.push(object);\n hasSideEffects ||= !scopeParent.isStatic(expression);\n usesFnContext ||= usesFunctionContextOrYieldAwait(decorator);\n }\n return { hasSideEffects, usesFnContext, decoratorsThis };\n }\n\n const willExtractSomeElemDecs =\n hasComputedKeysSideEffects ||\n (process.env.BABEL_8_BREAKING\n ? elemDecsUseFnContext\n : elemDecsUseFnContext || version !== \"2023-11\");\n\n let needsDeclaraionForClassBinding = false;\n let classDecorationsFlag = 0;\n let classDecorations: t.Expression[] = [];\n let classDecorationsId: t.Identifier;\n let computedKeyAssignments: t.AssignmentExpression[] = [];\n if (classDecorators) {\n classInitLocal = generateLetUidIdentifier(scopeParent, \"initClass\");\n needsDeclaraionForClassBinding = path.isClassDeclaration();\n ({ id: classIdLocal, path } = replaceClassWithVar(path, className));\n\n path.node.decorators = null;\n\n const classDecsUsePrivateName = classDecorators.some(usesPrivateField);\n const { hasSideEffects, usesFnContext, decoratorsThis } =\n handleDecorators(classDecorators);\n\n const { haveThis, decs } = generateDecorationList(\n classDecorators,\n decoratorsThis,\n version,\n );\n classDecorationsFlag = haveThis ? 1 : 0;\n classDecorations = decs;\n\n if (\n usesFnContext ||\n (hasSideEffects && willExtractSomeElemDecs) ||\n classDecsUsePrivateName\n ) {\n classDecorationsId = memoiseExpression(\n t.arrayExpression(classDecorations),\n \"classDecs\",\n classAssignments,\n );\n }\n\n if (!hasElementDecorators) {\n // Sync body paths as non-decorated computed accessors have been transpiled\n // to getter-setter pairs.\n for (const element of path.get(\"body.body\")) {\n const { node } = element;\n const isComputed = \"computed\" in node && node.computed;\n if (isComputed) {\n if (element.isClassProperty({ static: true })) {\n if (!element.get(\"key\").isConstantExpression()) {\n const key = (node as t.ClassProperty).key;\n const maybeAssignment = memoiseComputedKey(\n key,\n scopeParent,\n scopeParent.generateUid(\"computedKey\"),\n );\n if (maybeAssignment != null) {\n // If it is a static computed field within a decorated class, we move the computed key\n // into `computedKeyAssignments` which will be then moved into the non-static class,\n // to ensure that the evaluation order and private environment are correct\n node.key = t.cloneNode(maybeAssignment.left);\n computedKeyAssignments.push(maybeAssignment);\n }\n }\n } else if (computedKeyAssignments.length > 0) {\n prependExpressionsToComputedKey(\n computedKeyAssignments,\n element as NodePath,\n );\n computedKeyAssignments = [];\n }\n }\n }\n }\n } else {\n assignIdForAnonymousClass(path, className);\n classIdLocal = t.cloneNode(path.node.id);\n }\n\n let lastInstancePrivateName: t.PrivateName;\n let needsInstancePrivateBrandCheck = false;\n\n let fieldInitializerExpressions = [];\n let staticFieldInitializerExpressions: t.Expression[] = [];\n\n if (hasElementDecorators) {\n if (protoInitLocal) {\n const protoInitCall = t.callExpression(t.cloneNode(protoInitLocal), [\n t.thisExpression(),\n ]);\n fieldInitializerExpressions.push(protoInitCall);\n }\n for (const element of body) {\n if (!isClassDecoratableElementPath(element)) {\n if (\n staticFieldInitializerExpressions.length > 0 &&\n element.isStaticBlock()\n ) {\n prependExpressionsToStaticBlock(\n staticFieldInitializerExpressions,\n element,\n );\n staticFieldInitializerExpressions = [];\n }\n continue;\n }\n\n const { node } = element;\n const decorators = node.decorators;\n\n const hasDecorators = !!decorators?.length;\n\n const isComputed = \"computed\" in node && node.computed;\n\n let name = \"computedKey\";\n\n if (node.key.type === \"PrivateName\") {\n name = node.key.id.name;\n } else if (!isComputed && node.key.type === \"Identifier\") {\n name = node.key.name;\n }\n let decoratorsArray: t.Identifier | t.ArrayExpression | t.Expression;\n let decoratorsHaveThis;\n\n if (hasDecorators) {\n const { hasSideEffects, usesFnContext, decoratorsThis } =\n handleDecorators(decorators);\n const { decs, haveThis } = generateDecorationList(\n decorators,\n decoratorsThis,\n version,\n );\n decoratorsHaveThis = haveThis;\n decoratorsArray = decs.length === 1 ? decs[0] : t.arrayExpression(decs);\n if (usesFnContext || (hasSideEffects && willExtractSomeElemDecs)) {\n decoratorsArray = memoiseExpression(\n decoratorsArray,\n name + \"Decs\",\n computedKeyAssignments,\n );\n }\n }\n\n if (isComputed) {\n if (!element.get(\"key\").isConstantExpression()) {\n const key = node.key as t.Expression;\n const maybeAssignment = memoiseComputedKey(\n hasDecorators ? createToPropertyKeyCall(state, key) : key,\n scopeParent,\n scopeParent.generateUid(\"computedKey\"),\n );\n if (maybeAssignment != null) {\n // If it is a static computed field within a decorated class, we move the computed key\n // into `computedKeyAssignments` which will be then moved into the non-static class,\n // to ensure that the evaluation order and private environment are correct\n if (classDecorators && element.isClassProperty({ static: true })) {\n node.key = t.cloneNode(maybeAssignment.left);\n computedKeyAssignments.push(maybeAssignment);\n } else {\n node.key = maybeAssignment;\n }\n }\n }\n }\n\n const { key, static: isStatic } = node;\n\n const isPrivate = key.type === \"PrivateName\";\n\n const kind = getElementKind(element);\n\n if (isPrivate && !isStatic) {\n if (hasDecorators) {\n needsInstancePrivateBrandCheck = true;\n }\n if (t.isClassPrivateProperty(node) || !lastInstancePrivateName) {\n lastInstancePrivateName = key;\n }\n }\n\n if (element.isClassMethod({ kind: \"constructor\" })) {\n constructorPath = element;\n }\n\n let locals: t.Identifier[];\n if (hasDecorators) {\n let privateMethods: Array<\n t.FunctionExpression | t.ArrowFunctionExpression\n >;\n\n let nameExpr: t.Expression;\n\n if (isComputed) {\n nameExpr = getComputedKeyMemoiser(\n element.get(\"key\") as NodePath,\n );\n } else if (key.type === \"PrivateName\") {\n nameExpr = t.stringLiteral(key.id.name);\n } else if (key.type === \"Identifier\") {\n nameExpr = t.stringLiteral(key.name);\n } else {\n nameExpr = t.cloneNode(key as t.Expression);\n }\n\n if (kind === ACCESSOR) {\n const { value } = element.node as t.ClassAccessorProperty;\n\n const params: t.Expression[] =\n (process.env.BABEL_8_BREAKING || version === \"2023-11\") && isStatic\n ? []\n : [t.thisExpression()];\n\n if (value) {\n params.push(t.cloneNode(value));\n }\n\n const newId = generateClassPrivateUid();\n const newFieldInitId = generateLetUidIdentifier(\n scopeParent,\n `init_${name}`,\n );\n const newValue = t.callExpression(\n t.cloneNode(newFieldInitId),\n params,\n );\n\n const newField = generateClassProperty(newId, newValue, isStatic);\n const [newPath] = element.replaceWith(newField);\n\n if (isPrivate) {\n privateMethods = extractProxyAccessorsFor(newId, version);\n\n const getId = generateLetUidIdentifier(scopeParent, `get_${name}`);\n const setId = generateLetUidIdentifier(scopeParent, `set_${name}`);\n\n addCallAccessorsFor(version, newPath, key, getId, setId, isStatic);\n\n locals = [newFieldInitId, getId, setId];\n } else {\n assignIdForAnonymousClass(path, className);\n addProxyAccessorsFor(\n path.node.id,\n newPath,\n t.cloneNode(key),\n t.isAssignmentExpression(key)\n ? t.cloneNode(key.left as t.Identifier)\n : t.cloneNode(key),\n newId,\n isComputed,\n isStatic,\n version,\n );\n locals = [newFieldInitId];\n }\n } else if (kind === FIELD) {\n const initId = generateLetUidIdentifier(scopeParent, `init_${name}`);\n const valuePath = (\n element as NodePath\n ).get(\"value\");\n\n const args: t.Expression[] =\n (process.env.BABEL_8_BREAKING || version === \"2023-11\") && isStatic\n ? []\n : [t.thisExpression()];\n if (valuePath.node) args.push(valuePath.node);\n\n valuePath.replaceWith(t.callExpression(t.cloneNode(initId), args));\n\n locals = [initId];\n\n if (isPrivate) {\n privateMethods = extractProxyAccessorsFor(key, version);\n }\n } else if (isPrivate) {\n const callId = generateLetUidIdentifier(scopeParent, `call_${name}`);\n locals = [callId];\n\n const replaceSupers = new ReplaceSupers({\n constantSuper,\n methodPath: element as NodePath,\n objectRef: classIdLocal,\n superRef: path.node.superClass,\n file: state.file,\n refToPreserve: classIdLocal,\n });\n\n replaceSupers.replace();\n\n privateMethods = [\n createFunctionExpressionFromPrivateMethod(\n element.node as t.ClassPrivateMethod,\n ),\n ];\n\n if (kind === GETTER || kind === SETTER) {\n movePrivateAccessor(\n element as NodePath,\n t.cloneNode(key),\n t.cloneNode(callId),\n isStatic,\n );\n } else {\n const node = element.node as t.ClassPrivateMethod;\n\n // Unshift\n path.node.body.body.unshift(\n t.classPrivateProperty(key, t.cloneNode(callId), [], node.static),\n );\n\n decoratedPrivateMethods.add(key.id.name);\n\n element.remove();\n }\n }\n\n elementDecoratorInfo.push({\n kind,\n decoratorsArray,\n decoratorsHaveThis,\n name: nameExpr,\n isStatic,\n privateMethods,\n locals,\n });\n\n if (element.node) {\n element.node.decorators = null;\n }\n }\n\n if (isComputed && computedKeyAssignments.length > 0) {\n if (classDecorators && element.isClassProperty({ static: true })) {\n // If the class is decorated, we don't insert computedKeyAssignments here\n // because any non-static computed elements defined after it will be moved\n // into the non-static class, so they will be evaluated before the key of\n // this field. At this momemnt, its key must be either a constant expression\n // or a uid reference which has been assigned _within_ the non-static class.\n } else {\n prependExpressionsToComputedKey(\n computedKeyAssignments,\n (kind === ACCESSOR\n ? element.getNextSibling() // the transpiled getter of the accessor property\n : element) as NodePath,\n );\n computedKeyAssignments = [];\n }\n }\n\n if (\n fieldInitializerExpressions.length > 0 &&\n !isStatic &&\n (kind === FIELD || kind === ACCESSOR)\n ) {\n prependExpressionsToFieldInitializer(\n fieldInitializerExpressions,\n element as NodePath,\n );\n fieldInitializerExpressions = [];\n }\n\n if (\n staticFieldInitializerExpressions.length > 0 &&\n isStatic &&\n (kind === FIELD || kind === ACCESSOR)\n ) {\n prependExpressionsToFieldInitializer(\n staticFieldInitializerExpressions,\n element as NodePath,\n );\n staticFieldInitializerExpressions = [];\n }\n\n if (hasDecorators && version === \"2023-11\") {\n if (kind === FIELD || kind === ACCESSOR) {\n const initExtraId = generateLetUidIdentifier(\n scopeParent,\n `init_extra_${name}`,\n );\n locals.push(initExtraId);\n const initExtraCall = t.callExpression(\n t.cloneNode(initExtraId),\n isStatic ? [] : [t.thisExpression()],\n );\n if (!isStatic) {\n fieldInitializerExpressions.push(initExtraCall);\n } else {\n staticFieldInitializerExpressions.push(initExtraCall);\n }\n }\n }\n }\n }\n\n if (computedKeyAssignments.length > 0) {\n const elements = path.get(\"body.body\");\n let lastComputedElement: NodePath;\n for (let i = elements.length - 1; i >= 0; i--) {\n const path = elements[i];\n const node = path.node as ClassElementCanHaveComputedKeys;\n if (node.computed) {\n if (classDecorators && t.isClassProperty(node, { static: true })) {\n continue;\n }\n lastComputedElement = path as NodePath;\n break;\n }\n }\n if (lastComputedElement != null) {\n appendExpressionsToComputedKey(\n computedKeyAssignments,\n lastComputedElement,\n );\n computedKeyAssignments = [];\n } else {\n // If there is no computed key, we will try to convert the first non-computed\n // class element into a computed key and insert assignments there. This will\n // be done after we handle the class elements split when the class is decorated.\n }\n }\n\n if (fieldInitializerExpressions.length > 0) {\n const isDerivedClass = !!path.node.superClass;\n if (constructorPath) {\n if (isDerivedClass) {\n insertExpressionsAfterSuperCallAndOptimize(\n fieldInitializerExpressions,\n constructorPath,\n protoInitLocal,\n );\n } else {\n prependExpressionsToConstructor(\n fieldInitializerExpressions,\n constructorPath,\n );\n }\n } else {\n path.node.body.body.unshift(\n createConstructorFromExpressions(\n fieldInitializerExpressions,\n isDerivedClass,\n ),\n );\n }\n fieldInitializerExpressions = [];\n }\n\n if (staticFieldInitializerExpressions.length > 0) {\n path.node.body.body.push(\n createStaticBlockFromExpressions(staticFieldInitializerExpressions),\n );\n staticFieldInitializerExpressions = [];\n }\n\n const sortedElementDecoratorInfo =\n toSortedDecoratorInfo(elementDecoratorInfo);\n\n const elementDecorations = generateDecorationExprs(\n process.env.BABEL_8_BREAKING || version === \"2023-11\"\n ? elementDecoratorInfo\n : sortedElementDecoratorInfo,\n version,\n );\n\n const elementLocals: t.Identifier[] = extractElementLocalAssignments(\n sortedElementDecoratorInfo,\n );\n\n if (protoInitLocal) {\n elementLocals.push(protoInitLocal);\n }\n\n if (staticInitLocal) {\n elementLocals.push(staticInitLocal);\n }\n\n const classLocals: t.Identifier[] = [];\n let classInitInjected = false;\n const classInitCall =\n classInitLocal && t.callExpression(t.cloneNode(classInitLocal), []);\n\n let originalClassPath = path;\n const originalClass = path.node;\n\n const staticClosures: t.AssignmentExpression[] = [];\n if (classDecorators) {\n classLocals.push(classIdLocal, classInitLocal);\n const statics: (\n | t.ClassProperty\n | t.ClassPrivateProperty\n | t.ClassPrivateMethod\n )[] = [];\n path.get(\"body.body\").forEach(element => {\n // Static blocks cannot be compiled to \"instance blocks\", but we can inline\n // them as IIFEs in the next property.\n if (element.isStaticBlock()) {\n if (hasInstancePrivateAccess(element, instancePrivateNames)) {\n const staticBlockClosureId = memoiseExpression(\n staticBlockToFunctionClosure(element.node),\n \"staticBlock\",\n staticClosures,\n );\n staticFieldInitializerExpressions.push(\n t.callExpression(\n t.memberExpression(staticBlockClosureId, t.identifier(\"call\")),\n [t.thisExpression()],\n ),\n );\n } else {\n staticFieldInitializerExpressions.push(\n staticBlockToIIFE(element.node),\n );\n }\n element.remove();\n return;\n }\n\n if (\n (element.isClassProperty() || element.isClassPrivateProperty()) &&\n element.node.static\n ) {\n const valuePath = (\n element as NodePath\n ).get(\"value\");\n if (hasInstancePrivateAccess(valuePath, instancePrivateNames)) {\n const fieldValueClosureId = memoiseExpression(\n fieldInitializerToClosure(valuePath.node),\n \"fieldValue\",\n staticClosures,\n );\n valuePath.replaceWith(\n t.callExpression(\n t.memberExpression(fieldValueClosureId, t.identifier(\"call\")),\n [t.thisExpression()],\n ),\n );\n }\n if (staticFieldInitializerExpressions.length > 0) {\n prependExpressionsToFieldInitializer(\n staticFieldInitializerExpressions,\n element,\n );\n staticFieldInitializerExpressions = [];\n }\n element.node.static = false;\n statics.push(element.node);\n element.remove();\n } else if (element.isClassPrivateMethod({ static: true })) {\n // At this moment the element must not have decorators, so any private name\n // within the element must come from either params or body\n if (hasInstancePrivateAccess(element, instancePrivateNames)) {\n const replaceSupers = new ReplaceSupers({\n constantSuper,\n methodPath: element,\n objectRef: classIdLocal,\n superRef: path.node.superClass,\n file: state.file,\n refToPreserve: classIdLocal,\n });\n\n replaceSupers.replace();\n\n const privateMethodDelegateId = memoiseExpression(\n createFunctionExpressionFromPrivateMethod(element.node),\n element.get(\"key.id\").node.name,\n staticClosures,\n );\n\n if (ignoreFunctionLength) {\n element.node.params = [t.restElement(t.identifier(\"arg\"))];\n element.node.body = t.blockStatement([\n t.returnStatement(\n t.callExpression(\n t.memberExpression(\n privateMethodDelegateId,\n t.identifier(\"apply\"),\n ),\n [t.thisExpression(), t.identifier(\"arg\")],\n ),\n ),\n ]);\n } else {\n element.node.params = element.node.params.map((p, i) => {\n if (t.isRestElement(p)) {\n return t.restElement(t.identifier(\"arg\"));\n } else {\n return t.identifier(\"_\" + i);\n }\n });\n element.node.body = t.blockStatement([\n t.returnStatement(\n t.callExpression(\n t.memberExpression(\n privateMethodDelegateId,\n t.identifier(\"apply\"),\n ),\n [t.thisExpression(), t.identifier(\"arguments\")],\n ),\n ),\n ]);\n }\n }\n element.node.static = false;\n statics.push(element.node);\n element.remove();\n }\n });\n\n if (statics.length > 0 || staticFieldInitializerExpressions.length > 0) {\n const staticsClass = template.expression.ast`\n class extends ${state.addHelper(\"identity\")} {}\n ` as t.ClassExpression;\n staticsClass.body.body = [\n // Insert the original class to a computed key of the wrapper so that\n // 1) they share the same function context with the wrapper class\n // 2) the memoisation of static computed field is evaluated before they\n // are referenced in the wrapper class keys\n // Note that any static elements of the wrapper class can not be accessed\n // in the user land, so we don't have to remove the temporary class field.\n t.classProperty(\n t.toExpression(originalClass),\n undefined,\n undefined,\n undefined,\n /* computed */ true,\n /* static */ true,\n ),\n ...statics,\n ];\n\n const constructorBody: t.Expression[] = [];\n\n const newExpr = t.newExpression(staticsClass, []);\n\n if (staticFieldInitializerExpressions.length > 0) {\n constructorBody.push(...staticFieldInitializerExpressions);\n }\n if (classInitCall) {\n classInitInjected = true;\n constructorBody.push(classInitCall);\n }\n if (constructorBody.length > 0) {\n constructorBody.unshift(\n t.callExpression(t.super(), [t.cloneNode(classIdLocal)]),\n );\n\n // set isDerivedClass to false as we have already prepended super call\n staticsClass.body.body.push(\n createConstructorFromExpressions(\n constructorBody,\n /* isDerivedClass */ false,\n ),\n );\n } else {\n newExpr.arguments.push(t.cloneNode(classIdLocal));\n }\n\n const [newPath] = path.replaceWith(newExpr);\n\n // update originalClassPath according to the new AST\n originalClassPath = (\n newPath.get(\"callee\").get(\"body\") as NodePath\n ).get(\"body.0.key\");\n }\n }\n if (!classInitInjected && classInitCall) {\n path.node.body.body.push(\n t.staticBlock([t.expressionStatement(classInitCall)]),\n );\n }\n\n let { superClass } = originalClass;\n if (\n superClass &&\n (process.env.BABEL_8_BREAKING ||\n version === \"2023-11\" ||\n version === \"2023-05\")\n ) {\n const id = path.scope.maybeGenerateMemoised(superClass);\n if (id) {\n originalClass.superClass = t.assignmentExpression(\"=\", id, superClass);\n superClass = id;\n }\n }\n\n const applyDecoratorWrapper = t.staticBlock([]);\n originalClass.body.body.unshift(applyDecoratorWrapper);\n const applyDecsBody = applyDecoratorWrapper.body;\n if (computedKeyAssignments.length > 0) {\n const elements = originalClassPath.get(\"body.body\");\n let firstPublicElement: NodePath;\n for (const path of elements) {\n if (\n (path.isClassProperty() || path.isClassMethod()) &&\n (path.node as t.ClassMethod).kind !== \"constructor\"\n ) {\n firstPublicElement = path;\n break;\n }\n }\n if (firstPublicElement != null) {\n // Convert its key to a computed one to host the decorator evaluations.\n convertToComputedKey(firstPublicElement);\n prependExpressionsToComputedKey(\n computedKeyAssignments,\n firstPublicElement,\n );\n } else {\n // When there is no public class elements, we inject a temporary computed\n // field whose key will host the decorator evaluations. The field will be\n // deleted immediately after it is defiend.\n originalClass.body.body.unshift(\n t.classProperty(\n t.sequenceExpression([\n ...computedKeyAssignments,\n t.stringLiteral(\"_\"),\n ]),\n undefined,\n undefined,\n undefined,\n /* computed */ true,\n /* static */ true,\n ),\n );\n applyDecsBody.push(\n t.expressionStatement(\n t.unaryExpression(\n \"delete\",\n t.memberExpression(t.thisExpression(), t.identifier(\"_\")),\n ),\n ),\n );\n }\n computedKeyAssignments = [];\n }\n\n applyDecsBody.push(\n t.expressionStatement(\n createLocalsAssignment(\n elementLocals,\n classLocals,\n elementDecorations,\n classDecorationsId ?? t.arrayExpression(classDecorations),\n t.numericLiteral(classDecorationsFlag),\n needsInstancePrivateBrandCheck ? lastInstancePrivateName : null,\n setClassName,\n t.cloneNode(superClass),\n state,\n version,\n ),\n ),\n );\n if (staticInitLocal) {\n applyDecsBody.push(\n t.expressionStatement(\n t.callExpression(t.cloneNode(staticInitLocal), [t.thisExpression()]),\n ),\n );\n }\n if (staticClosures.length > 0) {\n applyDecsBody.push(\n ...staticClosures.map(expr => t.expressionStatement(expr)),\n );\n }\n\n // When path is a ClassExpression, path.insertBefore will convert `path`\n // into a SequenceExpression\n path.insertBefore(classAssignments.map(expr => t.expressionStatement(expr)));\n\n if (needsDeclaraionForClassBinding) {\n const classBindingInfo = scopeParent.getBinding(classIdLocal.name);\n if (!classBindingInfo.constantViolations.length) {\n // optimization: reuse the inner class binding if the outer class binding is not mutated\n path.insertBefore(\n t.variableDeclaration(\"let\", [\n t.variableDeclarator(t.cloneNode(classIdLocal)),\n ]),\n );\n } else {\n const classOuterBindingDelegateLocal = scopeParent.generateUidIdentifier(\n \"t\" + classIdLocal.name,\n );\n const classOuterBindingLocal = classIdLocal;\n path.replaceWithMultiple([\n t.variableDeclaration(\"let\", [\n t.variableDeclarator(t.cloneNode(classOuterBindingLocal)),\n t.variableDeclarator(classOuterBindingDelegateLocal),\n ]),\n t.blockStatement([\n t.variableDeclaration(\"let\", [\n t.variableDeclarator(t.cloneNode(classIdLocal)),\n ]),\n // needsDeclaraionForClassBinding is true ↔ node is a class declaration\n path.node as t.ClassDeclaration,\n t.expressionStatement(\n t.assignmentExpression(\n \"=\",\n t.cloneNode(classOuterBindingDelegateLocal),\n t.cloneNode(classIdLocal),\n ),\n ),\n ]),\n t.expressionStatement(\n t.assignmentExpression(\n \"=\",\n t.cloneNode(classOuterBindingLocal),\n t.cloneNode(classOuterBindingDelegateLocal),\n ),\n ),\n ]);\n }\n }\n\n if (decoratedPrivateMethods.size > 0) {\n checkPrivateMethodUpdateError(path, decoratedPrivateMethods);\n }\n\n // Recrawl the scope to make sure new identifiers are properly synced\n path.scope.crawl();\n\n return path;\n}\n\nfunction createLocalsAssignment(\n elementLocals: t.Identifier[],\n classLocals: t.Identifier[],\n elementDecorations: t.ArrayExpression | t.Identifier,\n classDecorations: t.ArrayExpression | t.Identifier,\n classDecorationsFlag: t.NumericLiteral,\n maybePrivateBrandName: t.PrivateName | null,\n setClassName: t.Identifier | t.StringLiteral | undefined,\n superClass: null | t.Expression,\n state: PluginPass,\n version: DecoratorVersionKind,\n) {\n let lhs, rhs;\n const args: t.Expression[] = [\n setClassName\n ? createSetFunctionNameCall(state, setClassName)\n : t.thisExpression(),\n classDecorations,\n elementDecorations,\n ];\n\n if (!process.env.BABEL_8_BREAKING) {\n if (version !== \"2023-11\") {\n args.splice(1, 2, elementDecorations, classDecorations);\n }\n if (\n version === \"2021-12\" ||\n (version === \"2022-03\" && !state.availableHelper(\"applyDecs2203R\"))\n ) {\n lhs = t.arrayPattern([...elementLocals, ...classLocals]);\n rhs = t.callExpression(\n state.addHelper(version === \"2021-12\" ? \"applyDecs\" : \"applyDecs2203\"),\n args,\n );\n return t.assignmentExpression(\"=\", lhs, rhs);\n } else if (version === \"2022-03\") {\n rhs = t.callExpression(state.addHelper(\"applyDecs2203R\"), args);\n } else if (version === \"2023-01\") {\n if (maybePrivateBrandName) {\n args.push(createPrivateBrandCheckClosure(maybePrivateBrandName));\n }\n rhs = t.callExpression(state.addHelper(\"applyDecs2301\"), args);\n } else if (version === \"2023-05\") {\n if (\n maybePrivateBrandName ||\n superClass ||\n classDecorationsFlag.value !== 0\n ) {\n args.push(classDecorationsFlag);\n }\n if (maybePrivateBrandName) {\n args.push(createPrivateBrandCheckClosure(maybePrivateBrandName));\n } else if (superClass) {\n args.push(t.unaryExpression(\"void\", t.numericLiteral(0)));\n }\n if (superClass) args.push(superClass);\n rhs = t.callExpression(state.addHelper(\"applyDecs2305\"), args);\n }\n }\n if (process.env.BABEL_8_BREAKING || version === \"2023-11\") {\n if (\n maybePrivateBrandName ||\n superClass ||\n classDecorationsFlag.value !== 0\n ) {\n args.push(classDecorationsFlag);\n }\n if (maybePrivateBrandName) {\n args.push(createPrivateBrandCheckClosure(maybePrivateBrandName));\n } else if (superClass) {\n args.push(t.unaryExpression(\"void\", t.numericLiteral(0)));\n }\n if (superClass) args.push(superClass);\n rhs = t.callExpression(state.addHelper(\"applyDecs2311\"), args);\n }\n\n // optimize `{ c: [classLocals] } = applyDecsHelper(...)` to\n // `[classLocals] = applyDecsHelper(...).c`\n if (elementLocals.length > 0) {\n if (classLocals.length > 0) {\n lhs = t.objectPattern([\n t.objectProperty(t.identifier(\"e\"), t.arrayPattern(elementLocals)),\n t.objectProperty(t.identifier(\"c\"), t.arrayPattern(classLocals)),\n ]);\n } else {\n lhs = t.arrayPattern(elementLocals);\n rhs = t.memberExpression(rhs, t.identifier(\"e\"), false, false);\n }\n } else {\n // invariant: classLocals.length > 0\n lhs = t.arrayPattern(classLocals);\n rhs = t.memberExpression(rhs, t.identifier(\"c\"), false, false);\n }\n\n return t.assignmentExpression(\"=\", lhs, rhs);\n}\n\nfunction isProtoKey(\n node: t.Identifier | t.StringLiteral | t.BigIntLiteral | t.NumericLiteral,\n) {\n return node.type === \"Identifier\"\n ? node.name === \"__proto__\"\n : node.value === \"__proto__\";\n}\n\nfunction isDecorated(node: t.Class | ClassDecoratableElement) {\n return node.decorators && node.decorators.length > 0;\n}\n\nfunction shouldTransformElement(node: ClassElement) {\n switch (node.type) {\n case \"ClassAccessorProperty\":\n return true;\n case \"ClassMethod\":\n case \"ClassProperty\":\n case \"ClassPrivateMethod\":\n case \"ClassPrivateProperty\":\n return isDecorated(node);\n default:\n return false;\n }\n}\n\nfunction shouldTransformClass(node: t.Class) {\n return isDecorated(node) || node.body.body.some(shouldTransformElement);\n}\n\n// Todo: unify name references logic with helper-function-name\nfunction NamedEvaluationVisitoryFactory(\n isAnonymous: (path: NodePath) => boolean,\n visitor: (\n path: NodePath,\n state: PluginPass,\n name:\n | string\n | t.Identifier\n | t.StringLiteral\n | t.NumericLiteral\n | t.BigIntLiteral,\n ) => void,\n) {\n function handleComputedProperty(\n propertyPath: NodePath<\n t.ObjectProperty | t.ClassProperty | t.ClassAccessorProperty\n >,\n key: t.Expression,\n state: PluginPass,\n ): t.StringLiteral | t.Identifier {\n switch (key.type) {\n case \"StringLiteral\":\n return t.stringLiteral(key.value);\n case \"NumericLiteral\":\n case \"BigIntLiteral\": {\n const keyValue = key.value + \"\";\n propertyPath.get(\"key\").replaceWith(t.stringLiteral(keyValue));\n return t.stringLiteral(keyValue);\n }\n default: {\n const ref = propertyPath.scope.maybeGenerateMemoised(key);\n propertyPath\n .get(\"key\")\n .replaceWith(\n t.assignmentExpression(\n \"=\",\n ref,\n createToPropertyKeyCall(state, key),\n ),\n );\n return t.cloneNode(ref);\n }\n }\n }\n return {\n VariableDeclarator(path, state) {\n const id = path.node.id;\n if (id.type === \"Identifier\") {\n const initializer = skipTransparentExprWrappers(path.get(\"init\"));\n if (isAnonymous(initializer)) {\n const name = id.name;\n visitor(initializer, state, name);\n }\n }\n },\n AssignmentExpression(path, state) {\n const id = path.node.left;\n if (id.type === \"Identifier\") {\n const initializer = skipTransparentExprWrappers(path.get(\"right\"));\n if (isAnonymous(initializer)) {\n switch (path.node.operator) {\n case \"=\":\n case \"&&=\":\n case \"||=\":\n case \"??=\":\n visitor(initializer, state, id.name);\n }\n }\n }\n },\n AssignmentPattern(path, state) {\n const id = path.node.left;\n if (id.type === \"Identifier\") {\n const initializer = skipTransparentExprWrappers(path.get(\"right\"));\n if (isAnonymous(initializer)) {\n const name = id.name;\n visitor(initializer, state, name);\n }\n }\n },\n // We listen on ObjectExpression so that we don't have to visit\n // the object properties under object patterns\n ObjectExpression(path, state) {\n for (const propertyPath of path.get(\"properties\")) {\n if (!propertyPath.isObjectProperty()) continue;\n const { node } = propertyPath;\n const id = node.key;\n const initializer = skipTransparentExprWrappers(\n propertyPath.get(\"value\") as NodePath,\n );\n if (isAnonymous(initializer)) {\n if (!node.computed) {\n // 13.2.5.5 RS: PropertyDefinitionEvaluation\n if (!isProtoKey(id as t.StringLiteral | t.Identifier)) {\n if (id.type === \"Identifier\") {\n visitor(initializer, state, id.name);\n } else {\n const className = t.stringLiteral(\n (id as t.StringLiteral | t.NumericLiteral | t.BigIntLiteral)\n .value + \"\",\n );\n visitor(initializer, state, className);\n }\n }\n } else {\n const ref = handleComputedProperty(\n propertyPath,\n // The key of a computed object property must not be a private name\n id as t.Expression,\n state,\n );\n visitor(initializer, state, ref);\n }\n }\n }\n },\n ClassPrivateProperty(path, state) {\n const { node } = path;\n const initializer = skipTransparentExprWrappers(path.get(\"value\"));\n if (isAnonymous(initializer)) {\n const className = t.stringLiteral(\"#\" + node.key.id.name);\n visitor(initializer, state, className);\n }\n },\n ClassAccessorProperty(path, state) {\n const { node } = path;\n const id = node.key;\n const initializer = skipTransparentExprWrappers(path.get(\"value\"));\n if (isAnonymous(initializer)) {\n if (!node.computed) {\n if (id.type === \"Identifier\") {\n visitor(initializer, state, id.name);\n } else if (id.type === \"PrivateName\") {\n const className = t.stringLiteral(\"#\" + id.id.name);\n visitor(initializer, state, className);\n } else {\n const className = t.stringLiteral(\n (id as t.StringLiteral | t.NumericLiteral | t.BigIntLiteral)\n .value + \"\",\n );\n visitor(initializer, state, className);\n }\n } else {\n const ref = handleComputedProperty(\n path,\n // The key of a computed accessor property must not be a private name\n id as t.Expression,\n state,\n );\n visitor(initializer, state, ref);\n }\n }\n },\n ClassProperty(path, state) {\n const { node } = path;\n const id = node.key;\n const initializer = skipTransparentExprWrappers(path.get(\"value\"));\n if (isAnonymous(initializer)) {\n if (!node.computed) {\n if (id.type === \"Identifier\") {\n visitor(initializer, state, id.name);\n } else {\n const className = t.stringLiteral(\n (id as t.StringLiteral | t.NumericLiteral | t.BigIntLiteral)\n .value + \"\",\n );\n visitor(initializer, state, className);\n }\n } else {\n const ref = handleComputedProperty(path, id, state);\n visitor(initializer, state, ref);\n }\n }\n },\n } satisfies Visitor;\n}\n\nfunction isDecoratedAnonymousClassExpression(path: NodePath) {\n return (\n path.isClassExpression({ id: null }) && shouldTransformClass(path.node)\n );\n}\n\nfunction generateLetUidIdentifier(scope: Scope, name: string) {\n const id = scope.generateUidIdentifier(name);\n scope.push({ id, kind: \"let\" });\n return t.cloneNode(id);\n}\n\nexport default function (\n { assertVersion, assumption }: PluginAPI,\n { loose }: Options,\n version: DecoratorVersionKind,\n inherits: PluginObject[\"inherits\"],\n): PluginObject {\n if (process.env.BABEL_8_BREAKING) {\n assertVersion(REQUIRED_VERSION(\"^7.21.0\"));\n } else {\n if (\n version === \"2023-11\" ||\n version === \"2023-05\" ||\n version === \"2023-01\"\n ) {\n assertVersion(REQUIRED_VERSION(\"^7.21.0\"));\n } else if (version === \"2021-12\") {\n assertVersion(REQUIRED_VERSION(\"^7.16.0\"));\n } else {\n assertVersion(REQUIRED_VERSION(\"^7.19.0\"));\n }\n }\n\n const VISITED = new WeakSet();\n const constantSuper = assumption(\"constantSuper\") ?? loose;\n const ignoreFunctionLength = assumption(\"ignoreFunctionLength\") ?? loose;\n\n const namedEvaluationVisitor: Visitor =\n NamedEvaluationVisitoryFactory(\n isDecoratedAnonymousClassExpression,\n visitClass,\n );\n\n function visitClass(\n path: NodePath,\n state: PluginPass,\n className: string | t.Identifier | t.StringLiteral | undefined,\n ) {\n if (VISITED.has(path)) return;\n const { node } = path;\n className ??= node.id?.name;\n const newPath = transformClass(\n path,\n state,\n constantSuper,\n ignoreFunctionLength,\n className,\n namedEvaluationVisitor,\n version,\n );\n if (newPath) {\n VISITED.add(newPath);\n return;\n }\n VISITED.add(path);\n }\n\n return {\n name: \"proposal-decorators\",\n inherits: inherits,\n\n visitor: {\n ExportDefaultDeclaration(path, state) {\n const { declaration } = path.node;\n if (\n declaration?.type === \"ClassDeclaration\" &&\n // When compiling class decorators we need to replace the class\n // binding, so we must split it in two separate declarations.\n isDecorated(declaration)\n ) {\n const isAnonymous = !declaration.id;\n if (!process.env.BABEL_8_BREAKING && !USE_ESM && !IS_STANDALONE) {\n // polyfill when being run by an older Babel version\n path.splitExportDeclaration ??=\n // eslint-disable-next-line no-restricted-globals\n require(\"@babel/traverse\").NodePath.prototype.splitExportDeclaration;\n }\n const updatedVarDeclarationPath =\n path.splitExportDeclaration() as NodePath;\n if (isAnonymous) {\n visitClass(\n updatedVarDeclarationPath,\n state,\n t.stringLiteral(\"default\"),\n );\n }\n }\n },\n ExportNamedDeclaration(path) {\n const { declaration } = path.node;\n if (\n declaration?.type === \"ClassDeclaration\" &&\n // When compiling class decorators we need to replace the class\n // binding, so we must split it in two separate declarations.\n isDecorated(declaration)\n ) {\n if (!process.env.BABEL_8_BREAKING && !USE_ESM && !IS_STANDALONE) {\n // polyfill when being run by an older Babel version\n path.splitExportDeclaration ??=\n // eslint-disable-next-line no-restricted-globals\n require(\"@babel/traverse\").NodePath.prototype.splitExportDeclaration;\n }\n path.splitExportDeclaration();\n }\n },\n\n Class(path, state) {\n visitClass(path, state, undefined);\n },\n\n ...namedEvaluationVisitor,\n },\n };\n}\n","// env vars from the cli are always strings, so !!ENV_VAR returns true for \"false\"\nfunction bool(value) {\n if (value == null) return false;\n return value && value !== \"false\" && value !== \"0\";\n}\n\nmodule.exports = bool(process.env[\"BABEL_8_BREAKING\"])\n ? require(\"semver-BABEL_8_BREAKING-true\")\n : require(\"semver-BABEL_8_BREAKING-false\");\n","// TODO(Babel 8): Remove this file\n\nimport { types as t, template } from \"@babel/core\";\nimport type { File, NodePath } from \"@babel/core\";\nimport ReplaceSupers from \"@babel/helper-replace-supers\";\n\ntype Decoratable = Extract;\n\nexport function hasOwnDecorators(node: t.Class | t.ClassBody[\"body\"][number]) {\n // @ts-expect-error: 'decorators' not in TSIndexSignature\n return !!node.decorators?.length;\n}\n\nexport function hasDecorators(node: t.Class) {\n return hasOwnDecorators(node) || node.body.body.some(hasOwnDecorators);\n}\n\nfunction prop(key: string, value?: t.Expression) {\n if (!value) return null;\n return t.objectProperty(t.identifier(key), value);\n}\n\nfunction method(key: string, body: t.Statement[]) {\n return t.objectMethod(\n \"method\",\n t.identifier(key),\n [],\n t.blockStatement(body),\n );\n}\n\nfunction takeDecorators(node: Decoratable) {\n let result: t.ArrayExpression | undefined;\n if (node.decorators && node.decorators.length > 0) {\n result = t.arrayExpression(\n node.decorators.map(decorator => decorator.expression),\n );\n }\n node.decorators = undefined;\n return result;\n}\n\ntype AcceptedElement = Exclude;\ntype SupportedElement = Exclude<\n AcceptedElement,\n | t.ClassPrivateMethod\n | t.ClassPrivateProperty\n | t.ClassAccessorProperty\n | t.StaticBlock\n>;\n\nfunction getKey(node: SupportedElement) {\n if (node.computed) {\n return node.key;\n } else if (t.isIdentifier(node.key)) {\n return t.stringLiteral(node.key.name);\n } else {\n return t.stringLiteral(\n String(\n // A non-identifier non-computed key\n (node.key as t.StringLiteral | t.NumericLiteral | t.BigIntLiteral)\n .value,\n ),\n );\n }\n}\n\nfunction extractElementDescriptor(\n file: File,\n classRef: t.Identifier,\n superRef: t.Identifier,\n path: NodePath,\n) {\n const isMethod = path.isClassMethod();\n if (path.isPrivate()) {\n throw path.buildCodeFrameError(\n `Private ${\n isMethod ? \"methods\" : \"fields\"\n } in decorated classes are not supported yet.`,\n );\n }\n if (path.node.type === \"ClassAccessorProperty\") {\n throw path.buildCodeFrameError(\n `Accessor properties are not supported in 2018-09 decorator transform, please specify { \"version\": \"2021-12\" } instead.`,\n );\n }\n if (path.node.type === \"StaticBlock\") {\n throw path.buildCodeFrameError(\n `Static blocks are not supported in 2018-09 decorator transform, please specify { \"version\": \"2021-12\" } instead.`,\n );\n }\n\n const { node, scope } = path as NodePath;\n\n if (!path.isTSDeclareMethod()) {\n new ReplaceSupers({\n methodPath: path as NodePath<\n Exclude\n >,\n objectRef: classRef,\n superRef,\n file,\n refToPreserve: classRef,\n }).replace();\n }\n\n const properties: t.ObjectExpression[\"properties\"] = [\n prop(\"kind\", t.stringLiteral(t.isClassMethod(node) ? node.kind : \"field\")),\n prop(\"decorators\", takeDecorators(node as Decoratable)),\n prop(\"static\", node.static && t.booleanLiteral(true)),\n prop(\"key\", getKey(node)),\n ].filter(Boolean);\n\n if (isMethod) {\n if (!process.env.BABEL_8_BREAKING && !USE_ESM && !IS_STANDALONE) {\n // polyfill when being run by an older Babel version\n path.ensureFunctionName ??=\n // eslint-disable-next-line no-restricted-globals\n require(\"@babel/traverse\").NodePath.prototype.ensureFunctionName;\n }\n // @ts-expect-error path is a ClassMethod, that technically\n // is not supported as it does not have an .id property\n // This plugin will however then transform the ClassMethod\n // to a function expression, so it's fine.\n path.ensureFunctionName(false);\n\n properties.push(prop(\"value\", t.toExpression(path.node)));\n } else if (t.isClassProperty(node) && node.value) {\n properties.push(\n method(\"value\", template.statements.ast`return ${node.value}`),\n );\n } else {\n properties.push(prop(\"value\", scope.buildUndefinedNode()));\n }\n\n path.remove();\n\n return t.objectExpression(properties);\n}\n\nfunction addDecorateHelper(file: File) {\n return file.addHelper(\"decorate\");\n}\n\ntype ClassElement = t.Class[\"body\"][\"body\"][number];\ntype ClassElementPath = NodePath;\n\nexport function buildDecoratedClass(\n ref: t.Identifier,\n path: NodePath,\n elements: ClassElementPath[],\n file: File,\n) {\n const { node, scope } = path;\n const initializeId = scope.generateUidIdentifier(\"initialize\");\n const isDeclaration = node.id && path.isDeclaration();\n const isStrict = path.isInStrictMode();\n const { superClass } = node;\n\n node.type = \"ClassDeclaration\";\n if (!node.id) node.id = t.cloneNode(ref);\n\n let superId: t.Identifier;\n if (superClass) {\n superId = scope.generateUidIdentifierBasedOnNode(node.superClass, \"super\");\n node.superClass = superId;\n }\n\n const classDecorators = takeDecorators(node);\n const definitions = t.arrayExpression(\n elements\n .filter(\n element =>\n // @ts-expect-error Ignore TypeScript's abstract methods (see #10514)\n !element.node.abstract && element.node.type !== \"TSIndexSignature\",\n )\n .map(path =>\n extractElementDescriptor(\n file,\n node.id,\n superId,\n // @ts-expect-error TS can not exclude TSIndexSignature\n path,\n ),\n ),\n );\n\n const wrapperCall = template.expression.ast`\n ${addDecorateHelper(file)}(\n ${classDecorators || t.nullLiteral()},\n function (${initializeId}, ${superClass ? t.cloneNode(superId) : null}) {\n ${node}\n return { F: ${t.cloneNode(node.id)}, d: ${definitions} };\n },\n ${superClass}\n )\n ` as t.CallExpression & { arguments: [unknown, t.FunctionExpression] };\n\n if (!isStrict) {\n wrapperCall.arguments[1].body.directives.push(\n t.directive(t.directiveLiteral(\"use strict\")),\n );\n }\n\n let replacement: t.Node = wrapperCall;\n let classPathDesc = \"arguments.1.body.body.0\";\n if (isDeclaration) {\n replacement = template.statement.ast`let ${ref} = ${wrapperCall}`;\n classPathDesc = \"declarations.0.init.\" + classPathDesc;\n }\n\n return {\n instanceNodes: [\n template.statement.ast`\n ${t.cloneNode(initializeId)}(this)\n ` as t.ExpressionStatement,\n ],\n wrapClass(path: NodePath) {\n path.replaceWith(replacement);\n return path.get(classPathDesc) as NodePath;\n },\n };\n}\n","import type { File, types as t } from \"@babel/core\";\nimport type { NodePath } from \"@babel/core\";\nimport { hasOwnDecorators } from \"./decorators-2018-09.ts\";\n\nexport const FEATURES = Object.freeze({\n //classes: 1 << 0,\n fields: 1 << 1,\n privateMethods: 1 << 2,\n decorators: 1 << 3,\n privateIn: 1 << 4,\n staticBlocks: 1 << 5,\n});\n\nconst featuresSameLoose = new Map([\n [FEATURES.fields, \"@babel/plugin-transform-class-properties\"],\n [FEATURES.privateMethods, \"@babel/plugin-transform-private-methods\"],\n [FEATURES.privateIn, \"@babel/plugin-transform-private-property-in-object\"],\n]);\n\n// We can't use a symbol because this needs to always be the same, even if\n// this package isn't deduped by npm. e.g.\n// - node_modules/\n// - @babel/plugin-class-features\n// - @babel/plugin-proposal-decorators\n// - node_modules\n// - @babel-plugin-class-features\nconst featuresKey = \"@babel/plugin-class-features/featuresKey\";\nconst looseKey = \"@babel/plugin-class-features/looseKey\";\n\nif (!process.env.BABEL_8_BREAKING) {\n // See https://github.com/babel/babel/issues/11622.\n // Since preset-env sets loose for the fields and private methods plugins, it can\n // cause conflicts with the loose mode set by an explicit plugin in the config.\n // To solve this problem, we ignore preset-env's loose mode if another plugin\n // explicitly sets it\n // The code to handle this logic doesn't check that \"low priority loose\" is always\n // the same. However, it is only set by the preset and not directly by users:\n // unless someone _wants_ to break it, it shouldn't be a problem.\n // eslint-disable-next-line no-var\n var looseLowPriorityKey =\n \"@babel/plugin-class-features/looseLowPriorityKey/#__internal__@babel/preset-env__please-overwrite-loose-instead-of-throwing\";\n}\n\nif (!process.env.BABEL_8_BREAKING) {\n // eslint-disable-next-line no-var\n var canIgnoreLoose = function (file: File, feature: number) {\n return !!(file.get(looseLowPriorityKey) & feature);\n };\n}\n\nexport function enableFeature(file: File, feature: number, loose: boolean) {\n // We can't blindly enable the feature because, if it was already set,\n // \"loose\" can't be changed, so that\n // @babel/plugin-class-properties { loose: true }\n // @babel/plugin-class-properties { loose: false }\n // is transformed in loose mode.\n // We only enabled the feature if it was previously disabled.\n if (process.env.BABEL_8_BREAKING) {\n if (!hasFeature(file, feature)) {\n file.set(featuresKey, file.get(featuresKey) | feature);\n setLoose(file, feature, loose);\n }\n } else if (!hasFeature(file, feature) || canIgnoreLoose(file, feature)) {\n file.set(featuresKey, file.get(featuresKey) | feature);\n if (\n // @ts-expect-error comparing loose with internal private magic string\n loose ===\n \"#__internal__@babel/preset-env__prefer-true-but-false-is-ok-if-it-prevents-an-error\"\n ) {\n setLoose(file, feature, true);\n file.set(looseLowPriorityKey, file.get(looseLowPriorityKey) | feature);\n } else if (\n // @ts-expect-error comparing loose with internal private magic string\n loose ===\n \"#__internal__@babel/preset-env__prefer-false-but-true-is-ok-if-it-prevents-an-error\"\n ) {\n setLoose(file, feature, false);\n file.set(looseLowPriorityKey, file.get(looseLowPriorityKey) | feature);\n } else {\n setLoose(file, feature, loose);\n }\n }\n\n let resolvedLoose: boolean | undefined;\n for (const [mask, name] of featuresSameLoose) {\n if (!hasFeature(file, mask)) continue;\n if (!process.env.BABEL_8_BREAKING) {\n if (canIgnoreLoose(file, mask)) continue;\n }\n\n const loose = isLoose(file, mask);\n\n if (resolvedLoose === !loose) {\n throw new Error(\n \"'loose' mode configuration must be the same for @babel/plugin-transform-class-properties, \" +\n \"@babel/plugin-transform-private-methods and \" +\n \"@babel/plugin-transform-private-property-in-object (when they are enabled).\" +\n \"\\n\\n\" +\n getBabelShowConfigForHint(file),\n );\n } else {\n resolvedLoose = loose;\n\n if (!process.env.BABEL_8_BREAKING) {\n // eslint-disable-next-line no-var\n var higherPriorityPluginName = name;\n }\n }\n }\n\n if (!process.env.BABEL_8_BREAKING && resolvedLoose !== undefined) {\n for (const [mask, name] of featuresSameLoose) {\n if (hasFeature(file, mask) && isLoose(file, mask) !== resolvedLoose) {\n setLoose(file, mask, resolvedLoose);\n console.warn(\n `Though the \"loose\" option was set to \"${!resolvedLoose}\" in your @babel/preset-env ` +\n `config, it will not be used for ${name} since the \"loose\" mode option was set to ` +\n `\"${resolvedLoose}\" for ${higherPriorityPluginName}.\\nThe \"loose\" option must be the ` +\n `same for @babel/plugin-transform-class-properties, @babel/plugin-transform-private-methods ` +\n `and @babel/plugin-transform-private-property-in-object (when they are enabled): you can ` +\n `silence this warning by explicitly adding\\n` +\n `\\t[\"${name}\", { \"loose\": ${resolvedLoose} }]\\n` +\n `to the \"plugins\" section of your Babel config.` +\n \"\\n\\n\" +\n getBabelShowConfigForHint(file),\n );\n }\n }\n }\n}\n\nfunction getBabelShowConfigForHint(file: File) {\n let { filename } = file.opts;\n if (!filename || filename === \"unknown\") {\n filename = \"[name of the input file]\";\n }\n return `\\\nIf you already set the same 'loose' mode for these plugins in your config, it's possible that they \\\nare enabled multiple times with different options.\nYou can re-run Babel with the BABEL_SHOW_CONFIG_FOR environment variable to show the loaded \\\nconfiguration:\n\\tnpx cross-env BABEL_SHOW_CONFIG_FOR=${filename} \nSee https://babeljs.io/docs/configuration#print-effective-configs for more info.`;\n}\n\nfunction hasFeature(file: File, feature: number) {\n return !!(file.get(featuresKey) & feature);\n}\n\nexport function isLoose(file: File, feature: number) {\n return !!(file.get(looseKey) & feature);\n}\n\nfunction setLoose(file: File, feature: number, loose: boolean) {\n if (loose) file.set(looseKey, file.get(looseKey) | feature);\n else file.set(looseKey, file.get(looseKey) & ~feature);\n\n if (!process.env.BABEL_8_BREAKING) {\n file.set(looseLowPriorityKey, file.get(looseLowPriorityKey) & ~feature);\n }\n}\n\nexport function shouldTransform(path: NodePath, file: File): boolean {\n let decoratorPath: NodePath | null = null;\n let publicFieldPath: NodePath | null = null;\n let privateFieldPath: NodePath | null = null;\n let privateMethodPath: NodePath | null = null;\n let staticBlockPath: NodePath | null = null;\n\n if (hasOwnDecorators(path.node)) {\n decoratorPath = path.get(\"decorators.0\");\n }\n for (const el of path.get(\"body.body\")) {\n if (!decoratorPath && hasOwnDecorators(el.node)) {\n decoratorPath = el.get(\"decorators.0\");\n }\n if (!publicFieldPath && el.isClassProperty()) {\n publicFieldPath = el;\n }\n if (!privateFieldPath && el.isClassPrivateProperty()) {\n privateFieldPath = el;\n }\n // NOTE: path.isClassPrivateMethod() it isn't supported in <7.2.0\n if (!privateMethodPath && el.isClassPrivateMethod?.()) {\n privateMethodPath = el;\n }\n if (!staticBlockPath && el.isStaticBlock?.()) {\n staticBlockPath = el;\n }\n }\n\n if (decoratorPath && privateFieldPath) {\n throw privateFieldPath.buildCodeFrameError(\n \"Private fields in decorated classes are not supported yet.\",\n );\n }\n if (decoratorPath && privateMethodPath) {\n throw privateMethodPath.buildCodeFrameError(\n \"Private methods in decorated classes are not supported yet.\",\n );\n }\n\n if (decoratorPath && !hasFeature(file, FEATURES.decorators)) {\n throw path.buildCodeFrameError(\n \"Decorators are not enabled.\" +\n \"\\nIf you are using \" +\n '[\"@babel/plugin-proposal-decorators\", { \"version\": \"legacy\" }], ' +\n 'make sure it comes *before* \"@babel/plugin-transform-class-properties\" ' +\n \"and enable loose mode, like so:\\n\" +\n '\\t[\"@babel/plugin-proposal-decorators\", { \"version\": \"legacy\" }]\\n' +\n '\\t[\"@babel/plugin-transform-class-properties\", { \"loose\": true }]',\n );\n }\n\n if (privateMethodPath && !hasFeature(file, FEATURES.privateMethods)) {\n throw privateMethodPath.buildCodeFrameError(\n \"Class private methods are not enabled. \" +\n \"Please add `@babel/plugin-transform-private-methods` to your configuration.\",\n );\n }\n\n if (\n (publicFieldPath || privateFieldPath) &&\n !hasFeature(file, FEATURES.fields) &&\n // We want to allow enabling the private-methods plugin even without enabling\n // the class-properties plugin. Class fields will still be compiled in classes\n // that contain private methods.\n // This is already allowed with the other various class features plugins, but\n // it's because they can fallback to a transform separated from this helper.\n !hasFeature(file, FEATURES.privateMethods)\n ) {\n throw path.buildCodeFrameError(\n \"Class fields are not enabled. \" +\n \"Please add `@babel/plugin-transform-class-properties` to your configuration.\",\n );\n }\n\n if (staticBlockPath && !hasFeature(file, FEATURES.staticBlocks)) {\n throw path.buildCodeFrameError(\n \"Static class blocks are not enabled. \" +\n \"Please add `@babel/plugin-transform-class-static-block` to your configuration.\",\n );\n }\n\n if (decoratorPath || privateMethodPath || staticBlockPath) {\n // If one of those feature is used we know that its transform is\n // enabled, otherwise the previous checks throw.\n return true;\n }\n if (\n (publicFieldPath || privateFieldPath) &&\n hasFeature(file, FEATURES.fields)\n ) {\n return true;\n }\n\n return false;\n}\n","import { types as t } from \"@babel/core\";\nimport type { PluginAPI, PluginObject, NodePath } from \"@babel/core\";\nimport createDecoratorTransform from \"./decorators.ts\";\nimport type { DecoratorVersionKind } from \"./decorators.ts\";\n\nimport semver from \"semver\";\n\nimport {\n buildPrivateNamesNodes,\n buildPrivateNamesMap,\n transformPrivateNamesUsage,\n buildFieldsInitNodes,\n buildCheckInRHS,\n} from \"./fields.ts\";\nimport type { PropPath } from \"./fields.ts\";\nimport { buildDecoratedClass, hasDecorators } from \"./decorators-2018-09.ts\";\nimport { injectInitialization, extractComputedKeys } from \"./misc.ts\";\nimport {\n enableFeature,\n FEATURES,\n isLoose,\n shouldTransform,\n} from \"./features.ts\";\nimport { assertFieldTransformed } from \"./typescript.ts\";\n\nexport { FEATURES, enableFeature, injectInitialization, buildCheckInRHS };\n\nconst versionKey = \"@babel/plugin-class-features/version\";\n\ninterface Options {\n name: string;\n feature: number;\n loose?: boolean;\n inherits?: PluginObject[\"inherits\"];\n manipulateOptions?: PluginObject[\"manipulateOptions\"];\n api?: PluginAPI;\n decoratorVersion?: DecoratorVersionKind | \"2018-09\";\n}\n\nexport function createClassFeaturePlugin({\n name,\n feature,\n loose,\n manipulateOptions,\n api,\n inherits,\n decoratorVersion,\n}: Options): PluginObject {\n if (feature & FEATURES.decorators) {\n if (process.env.BABEL_8_BREAKING) {\n return createDecoratorTransform(api, { loose }, \"2023-11\", inherits);\n } else {\n if (\n decoratorVersion === \"2023-11\" ||\n decoratorVersion === \"2023-05\" ||\n decoratorVersion === \"2023-01\" ||\n decoratorVersion === \"2022-03\" ||\n decoratorVersion === \"2021-12\"\n ) {\n return createDecoratorTransform(\n api,\n { loose },\n decoratorVersion,\n inherits,\n );\n }\n }\n }\n if (!process.env.BABEL_8_BREAKING) {\n api ??= { assumption: () => void 0 as any } as any;\n }\n const setPublicClassFields = api.assumption(\"setPublicClassFields\");\n const privateFieldsAsSymbols = api.assumption(\"privateFieldsAsSymbols\");\n const privateFieldsAsProperties = api.assumption(\"privateFieldsAsProperties\");\n const noUninitializedPrivateFieldAccess =\n api.assumption(\"noUninitializedPrivateFieldAccess\") ?? false;\n const constantSuper = api.assumption(\"constantSuper\");\n const noDocumentAll = api.assumption(\"noDocumentAll\");\n\n if (privateFieldsAsProperties && privateFieldsAsSymbols) {\n throw new Error(\n `Cannot enable both the \"privateFieldsAsProperties\" and ` +\n `\"privateFieldsAsSymbols\" assumptions as the same time.`,\n );\n }\n const privateFieldsAsSymbolsOrProperties =\n privateFieldsAsProperties || privateFieldsAsSymbols;\n\n if (loose === true) {\n type AssumptionName = Parameters[0];\n const explicit: `\"${AssumptionName}\"`[] = [];\n\n if (setPublicClassFields !== undefined) {\n explicit.push(`\"setPublicClassFields\"`);\n }\n if (privateFieldsAsProperties !== undefined) {\n explicit.push(`\"privateFieldsAsProperties\"`);\n }\n if (privateFieldsAsSymbols !== undefined) {\n explicit.push(`\"privateFieldsAsSymbols\"`);\n }\n if (explicit.length !== 0) {\n console.warn(\n `[${name}]: You are using the \"loose: true\" option and you are` +\n ` explicitly setting a value for the ${explicit.join(\" and \")}` +\n ` assumption${explicit.length > 1 ? \"s\" : \"\"}. The \"loose\" option` +\n ` can cause incompatibilities with the other class features` +\n ` plugins, so it's recommended that you replace it with the` +\n ` following top-level option:\\n` +\n `\\t\"assumptions\": {\\n` +\n `\\t\\t\"setPublicClassFields\": true,\\n` +\n `\\t\\t\"privateFieldsAsSymbols\": true\\n` +\n `\\t}`,\n );\n }\n }\n\n return {\n name,\n manipulateOptions,\n inherits,\n\n pre(file) {\n enableFeature(file, feature, loose);\n\n if (!process.env.BABEL_8_BREAKING) {\n // Until 7.21.4, we used to encode the version as a number.\n // If file.get(versionKey) is a number, it has thus been\n // set by an older version of this plugin.\n if (typeof file.get(versionKey) === \"number\") {\n file.set(versionKey, PACKAGE_JSON.version);\n return;\n }\n }\n if (\n !file.get(versionKey) ||\n semver.lt(file.get(versionKey), PACKAGE_JSON.version)\n ) {\n file.set(versionKey, PACKAGE_JSON.version);\n }\n },\n\n visitor: {\n Class(path, { file }) {\n if (file.get(versionKey) !== PACKAGE_JSON.version) return;\n\n if (!shouldTransform(path, file)) return;\n\n const pathIsClassDeclaration = path.isClassDeclaration();\n\n if (pathIsClassDeclaration) assertFieldTransformed(path);\n\n const loose = isLoose(file, feature);\n\n let constructor: NodePath;\n const isDecorated = hasDecorators(path.node);\n const props: PropPath[] = [];\n const elements = [];\n const computedPaths: NodePath[] = [];\n const privateNames = new Set();\n const body = path.get(\"body\");\n\n for (const path of body.get(\"body\")) {\n if (\n // check path.node.computed is enough, but ts will complain\n (path.isClassProperty() || path.isClassMethod()) &&\n path.node.computed\n ) {\n computedPaths.push(path);\n }\n\n if (path.isPrivate()) {\n const { name } = path.node.key.id;\n const getName = `get ${name}`;\n const setName = `set ${name}`;\n\n if (path.isClassPrivateMethod()) {\n if (path.node.kind === \"get\") {\n if (\n privateNames.has(getName) ||\n (privateNames.has(name) && !privateNames.has(setName))\n ) {\n throw path.buildCodeFrameError(\"Duplicate private field\");\n }\n privateNames.add(getName).add(name);\n } else if (path.node.kind === \"set\") {\n if (\n privateNames.has(setName) ||\n (privateNames.has(name) && !privateNames.has(getName))\n ) {\n throw path.buildCodeFrameError(\"Duplicate private field\");\n }\n privateNames.add(setName).add(name);\n }\n } else {\n if (\n (privateNames.has(name) &&\n !privateNames.has(getName) &&\n !privateNames.has(setName)) ||\n (privateNames.has(name) &&\n (privateNames.has(getName) || privateNames.has(setName)))\n ) {\n throw path.buildCodeFrameError(\"Duplicate private field\");\n }\n\n privateNames.add(name);\n }\n }\n\n if (path.isClassMethod({ kind: \"constructor\" })) {\n constructor = path;\n } else {\n elements.push(path);\n if (\n path.isProperty() ||\n path.isPrivate() ||\n path.isStaticBlock?.()\n ) {\n props.push(path as PropPath);\n }\n }\n }\n\n if (process.env.BABEL_8_BREAKING) {\n if (!props.length) return;\n } else {\n if (!props.length && !isDecorated) return;\n }\n\n const innerBinding = path.node.id;\n let ref: t.Identifier | null;\n if (!innerBinding || !pathIsClassDeclaration) {\n if (!process.env.BABEL_8_BREAKING && !USE_ESM && !IS_STANDALONE) {\n // polyfill when being run by an older Babel version\n path.ensureFunctionName ??=\n // eslint-disable-next-line no-restricted-globals\n require(\"@babel/traverse\").NodePath.prototype.ensureFunctionName;\n }\n (path as NodePath).ensureFunctionName(false);\n ref = path.scope.generateUidIdentifier(innerBinding?.name || \"Class\");\n }\n const classRefForDefine = ref ?? t.cloneNode(innerBinding);\n\n const privateNamesMap = buildPrivateNamesMap(\n classRefForDefine.name,\n privateFieldsAsSymbolsOrProperties ?? loose,\n props,\n file,\n );\n const privateNamesNodes = buildPrivateNamesNodes(\n privateNamesMap,\n privateFieldsAsProperties ?? loose,\n privateFieldsAsSymbols ?? false,\n file,\n );\n\n transformPrivateNamesUsage(\n classRefForDefine,\n path,\n privateNamesMap,\n {\n privateFieldsAsProperties:\n privateFieldsAsSymbolsOrProperties ?? loose,\n noUninitializedPrivateFieldAccess,\n noDocumentAll,\n innerBinding,\n },\n file,\n );\n\n let keysNodes: t.Statement[],\n staticNodes: t.Statement[],\n instanceNodes: t.ExpressionStatement[],\n lastInstanceNodeReturnsThis: boolean,\n pureStaticNodes: t.FunctionDeclaration[],\n classBindingNode: t.Statement | null,\n wrapClass: (path: NodePath) => NodePath;\n\n if (!process.env.BABEL_8_BREAKING) {\n if (isDecorated) {\n staticNodes = pureStaticNodes = keysNodes = [];\n ({ instanceNodes, wrapClass } = buildDecoratedClass(\n classRefForDefine,\n path,\n elements,\n file,\n ));\n } else {\n keysNodes = extractComputedKeys(path, computedPaths, file);\n ({\n staticNodes,\n pureStaticNodes,\n instanceNodes,\n lastInstanceNodeReturnsThis,\n classBindingNode,\n wrapClass,\n } = buildFieldsInitNodes(\n ref,\n path.node.superClass,\n props,\n privateNamesMap,\n file,\n setPublicClassFields ?? loose,\n privateFieldsAsSymbolsOrProperties ?? loose,\n noUninitializedPrivateFieldAccess,\n constantSuper ?? loose,\n innerBinding,\n ));\n }\n } else {\n keysNodes = extractComputedKeys(path, computedPaths, file);\n ({\n staticNodes,\n pureStaticNodes,\n instanceNodes,\n lastInstanceNodeReturnsThis,\n classBindingNode,\n wrapClass,\n } = buildFieldsInitNodes(\n ref,\n path.node.superClass,\n props,\n privateNamesMap,\n file,\n setPublicClassFields ?? loose,\n privateFieldsAsSymbolsOrProperties ?? loose,\n noUninitializedPrivateFieldAccess,\n constantSuper ?? loose,\n innerBinding,\n ));\n }\n\n if (instanceNodes.length > 0) {\n injectInitialization(\n path,\n constructor,\n instanceNodes,\n (referenceVisitor, state) => {\n if (!process.env.BABEL_8_BREAKING) {\n if (isDecorated) return;\n }\n for (const prop of props) {\n // @ts-expect-error: TS doesn't infer that prop.node is not a StaticBlock\n if (t.isStaticBlock?.(prop.node) || prop.node.static) continue;\n prop.traverse(referenceVisitor, state);\n }\n },\n lastInstanceNodeReturnsThis,\n );\n }\n\n // rename to make ts happy\n const wrappedPath = wrapClass(path);\n wrappedPath.insertBefore([...privateNamesNodes, ...keysNodes]);\n if (staticNodes.length > 0) {\n wrappedPath.insertAfter(staticNodes);\n }\n if (pureStaticNodes.length > 0) {\n wrappedPath\n .find(parent => parent.isStatement() || parent.isDeclaration())\n .insertAfter(pureStaticNodes);\n }\n if (classBindingNode != null && pathIsClassDeclaration) {\n wrappedPath.insertAfter(classBindingNode);\n }\n },\n\n ExportDefaultDeclaration(path, { file }) {\n if (!process.env.BABEL_8_BREAKING) {\n if (file.get(versionKey) !== PACKAGE_JSON.version) return;\n\n const decl = path.get(\"declaration\");\n\n if (decl.isClassDeclaration() && hasDecorators(decl.node)) {\n if (decl.node.id) {\n // export default class Foo {}\n // -->\n // class Foo {} export { Foo as default }\n if (!process.env.BABEL_8_BREAKING && !USE_ESM && !IS_STANDALONE) {\n // polyfill when being run by an older Babel version\n path.splitExportDeclaration ??=\n // eslint-disable-next-line no-restricted-globals\n require(\"@babel/traverse\").NodePath.prototype.splitExportDeclaration;\n }\n path.splitExportDeclaration();\n } else {\n // @ts-expect-error Anonymous class declarations can be\n // transformed as if they were expressions\n decl.node.type = \"ClassExpression\";\n }\n }\n }\n },\n },\n };\n}\n","/* eslint-disable @babel/development/plugin-name */\n\nimport { declare } from \"@babel/helper-plugin-utils\";\nimport {\n createClassFeaturePlugin,\n FEATURES,\n} from \"@babel/helper-create-class-features-plugin\";\n\nexport interface Options {\n loose?: boolean;\n}\n\nexport default declare((api, options: Options) => {\n api.assertVersion(REQUIRED_VERSION(7));\n\n return createClassFeaturePlugin({\n name: \"transform-class-properties\",\n\n api,\n feature: FEATURES.fields,\n loose: options.loose,\n\n manipulateOptions(opts, parserOpts) {\n if (!process.env.BABEL_8_BREAKING) {\n // @ts-ignore(Babel 7 vs Babel 8) These plugins have been removed\n parserOpts.plugins.push(\"classProperties\", \"classPrivateProperties\");\n }\n },\n });\n});\n","import { declare } from \"@babel/helper-plugin-utils\";\nimport type { Scope } from \"@babel/core\";\n\nimport {\n enableFeature,\n FEATURES,\n} from \"@babel/helper-create-class-features-plugin\";\n\n/**\n * Generate a uid that is not in `denyList`\n *\n * @param {Scope} scope\n * @param {Set} denyList a deny list that the generated uid should avoid\n * @returns\n */\nfunction generateUid(scope: Scope, denyList: Set) {\n const name = \"\";\n let uid;\n let i = 1;\n do {\n uid = scope._generateUid(name, i);\n i++;\n } while (denyList.has(uid));\n return uid;\n}\n\nexport default declare(({ types: t, template, assertVersion, version }) => {\n assertVersion(REQUIRED_VERSION(\"^7.12.0\"));\n\n return {\n name: \"transform-class-static-block\",\n inherits:\n USE_ESM || IS_STANDALONE || version[0] === \"8\"\n ? undefined\n : // eslint-disable-next-line no-restricted-globals\n require(\"@babel/plugin-syntax-class-static-block\").default,\n\n pre() {\n // Enable this in @babel/helper-create-class-features-plugin, so that it\n // can be handled by the private fields and methods transform.\n enableFeature(this.file, FEATURES.staticBlocks, /* loose */ false);\n },\n\n visitor: {\n // Run on ClassBody and not on class so that if @babel/helper-create-class-features-plugin\n // is enabled it can generate optimized output without passing from the intermediate\n // private fields representation.\n ClassBody(classBody) {\n const { scope } = classBody;\n const privateNames = new Set();\n const body = classBody.get(\"body\");\n for (const path of body) {\n if (path.isPrivate()) {\n privateNames.add(path.get(\"key.id\").node.name);\n }\n }\n for (const path of body) {\n if (!path.isStaticBlock()) continue;\n const staticBlockPrivateId = generateUid(scope, privateNames);\n privateNames.add(staticBlockPrivateId);\n const staticBlockRef = t.privateName(\n t.identifier(staticBlockPrivateId),\n );\n\n let replacement;\n const blockBody = path.node.body;\n // We special-case the single expression case to avoid the iife, since\n // it's common.\n if (blockBody.length === 1 && t.isExpressionStatement(blockBody[0])) {\n replacement = t.inheritsComments(\n blockBody[0].expression,\n blockBody[0],\n );\n } else {\n replacement = template.expression.ast`(() => { ${blockBody} })()`;\n }\n\n path.replaceWith(\n t.classPrivateProperty(\n staticBlockRef,\n replacement,\n [],\n /* static */ true,\n ),\n );\n }\n },\n },\n };\n});\n","// Fork of https://github.com/loganfsmyth/babel-plugin-proposal-decorators-legacy\n\nimport { template, types as t } from \"@babel/core\";\nimport type { NodePath, Visitor, PluginPass } from \"@babel/core\";\n\nconst buildClassDecorator = template.statement(`\n DECORATOR(CLASS_REF = INNER) || CLASS_REF;\n`) as (replacements: {\n DECORATOR: t.Expression;\n CLASS_REF: t.Identifier;\n INNER: t.Expression;\n}) => t.ExpressionStatement;\n\nconst buildClassPrototype = template(`\n CLASS_REF.prototype;\n`) as (replacements: { CLASS_REF: t.Identifier }) => t.ExpressionStatement;\n\nconst buildGetDescriptor = template(`\n Object.getOwnPropertyDescriptor(TARGET, PROPERTY);\n`) as (replacements: {\n TARGET: t.Expression;\n PROPERTY: t.Literal;\n}) => t.ExpressionStatement;\n\nconst buildGetObjectInitializer = template(`\n (TEMP = Object.getOwnPropertyDescriptor(TARGET, PROPERTY), (TEMP = TEMP ? TEMP.value : undefined), {\n enumerable: true,\n configurable: true,\n writable: true,\n initializer: function(){\n return TEMP;\n }\n })\n`) as (replacements: {\n TEMP: t.Identifier;\n TARGET: t.Expression;\n PROPERTY: t.Literal;\n}) => t.ExpressionStatement;\n\nconst WARNING_CALLS = new WeakSet();\n\n// legacy decorator does not support ClassAccessorProperty\ntype ClassDecoratableElement =\n | t.ClassMethod\n | t.ClassPrivateMethod\n | t.ClassProperty\n | t.ClassPrivateProperty;\n\n/**\n * If the decorator expressions are non-identifiers, hoist them to before the class so we can be sure\n * that they are evaluated in order.\n */\nfunction applyEnsureOrdering(\n path: NodePath,\n) {\n // TODO: This should probably also hoist computed properties.\n const decorators: t.Decorator[] = (\n path.isClass()\n ? [\n path,\n ...(path.get(\"body.body\") as NodePath[]),\n ]\n : path.get(\"properties\")\n ).reduce(\n (\n acc: t.Decorator[],\n prop: NodePath<\n t.ObjectMember | t.ClassExpression | ClassDecoratableElement\n >,\n ) => acc.concat(prop.node.decorators || []),\n [],\n );\n\n const identDecorators = decorators.filter(\n decorator => !t.isIdentifier(decorator.expression),\n );\n if (identDecorators.length === 0) return;\n\n return t.sequenceExpression(\n identDecorators\n .map((decorator): t.Expression => {\n const expression = decorator.expression;\n const id = (decorator.expression =\n path.scope.generateDeclaredUidIdentifier(\"dec\"));\n return t.assignmentExpression(\"=\", id, expression);\n })\n .concat([path.node]),\n );\n}\n\n/**\n * Given a class expression with class-level decorators, create a new expression\n * with the proper decorated behavior.\n */\nfunction applyClassDecorators(classPath: NodePath) {\n if (!hasClassDecorators(classPath.node)) return;\n\n const decorators = classPath.node.decorators || [];\n classPath.node.decorators = null;\n\n const name = classPath.scope.generateDeclaredUidIdentifier(\"class\");\n\n return decorators\n .map(dec => dec.expression)\n .reverse()\n .reduce(function (acc, decorator) {\n return buildClassDecorator({\n CLASS_REF: t.cloneNode(name),\n DECORATOR: t.cloneNode(decorator),\n INNER: acc,\n }).expression;\n }, classPath.node);\n}\n\nfunction hasClassDecorators(classNode: t.Class) {\n return !!classNode.decorators?.length;\n}\n\n/**\n * Given a class expression with method-level decorators, create a new expression\n * with the proper decorated behavior.\n */\nfunction applyMethodDecorators(\n path: NodePath,\n state: PluginPass,\n) {\n if (!hasMethodDecorators(path.node.body.body)) return;\n\n return applyTargetDecorators(\n path,\n state,\n // @ts-expect-error ClassAccessorProperty is not supported in legacy decorator\n path.node.body.body,\n );\n}\n\nfunction hasMethodDecorators(\n body: t.ClassBody[\"body\"] | t.ObjectExpression[\"properties\"],\n) {\n return body.some(\n node =>\n // @ts-expect-error decorators not in SpreadElement/StaticBlock\n node.decorators?.length,\n );\n}\n\n/**\n * Given an object expression with property decorators, create a new expression\n * with the proper decorated behavior.\n */\nfunction applyObjectDecorators(\n path: NodePath,\n state: PluginPass,\n) {\n if (!hasMethodDecorators(path.node.properties)) return;\n\n return applyTargetDecorators(\n path,\n state,\n path.node.properties.filter(\n (prop): prop is t.ObjectMember => prop.type !== \"SpreadElement\",\n ),\n );\n}\n\n/**\n * A helper to pull out property decorators into a sequence expression.\n */\nfunction applyTargetDecorators(\n path: NodePath,\n state: PluginPass,\n decoratedProps: (t.ObjectMember | ClassDecoratableElement)[],\n) {\n const name = path.scope.generateDeclaredUidIdentifier(\n path.isClass() ? \"class\" : \"obj\",\n );\n\n const exprs = decoratedProps.reduce(function (acc, node) {\n let decorators: t.Decorator[] = [];\n if (node.decorators != null) {\n decorators = node.decorators;\n node.decorators = null;\n }\n\n if (decorators.length === 0) return acc;\n\n if (\n // @ts-expect-error computed is not in ClassPrivateProperty\n node.computed\n ) {\n throw path.buildCodeFrameError(\n \"Computed method/property decorators are not yet supported.\",\n );\n }\n\n const property: t.Literal = t.isLiteral(node.key)\n ? node.key\n : t.stringLiteral(\n // @ts-expect-error: should we handle ClassPrivateProperty?\n node.key.name,\n );\n\n const target =\n path.isClass() && !(node as ClassDecoratableElement).static\n ? buildClassPrototype({\n CLASS_REF: name,\n }).expression\n : name;\n\n if (t.isClassProperty(node, { static: false })) {\n const descriptor = path.scope.generateDeclaredUidIdentifier(\"descriptor\");\n\n const initializer = node.value\n ? t.functionExpression(\n null,\n [],\n t.blockStatement([t.returnStatement(node.value)]),\n )\n : t.nullLiteral();\n\n node.value = t.callExpression(\n state.addHelper(\"initializerWarningHelper\"),\n [descriptor, t.thisExpression()],\n );\n\n WARNING_CALLS.add(node.value);\n\n acc.push(\n t.assignmentExpression(\n \"=\",\n t.cloneNode(descriptor),\n t.callExpression(state.addHelper(\"applyDecoratedDescriptor\"), [\n t.cloneNode(target),\n t.cloneNode(property),\n t.arrayExpression(\n decorators.map(dec => t.cloneNode(dec.expression)),\n ),\n t.objectExpression([\n t.objectProperty(\n t.identifier(\"configurable\"),\n t.booleanLiteral(true),\n ),\n t.objectProperty(\n t.identifier(\"enumerable\"),\n t.booleanLiteral(true),\n ),\n t.objectProperty(\n t.identifier(\"writable\"),\n t.booleanLiteral(true),\n ),\n t.objectProperty(t.identifier(\"initializer\"), initializer),\n ]),\n ]),\n ),\n );\n } else {\n acc.push(\n t.callExpression(state.addHelper(\"applyDecoratedDescriptor\"), [\n t.cloneNode(target),\n t.cloneNode(property),\n t.arrayExpression(decorators.map(dec => t.cloneNode(dec.expression))),\n t.isObjectProperty(node) || t.isClassProperty(node, { static: true })\n ? buildGetObjectInitializer({\n TEMP: path.scope.generateDeclaredUidIdentifier(\"init\"),\n TARGET: t.cloneNode(target),\n PROPERTY: t.cloneNode(property),\n }).expression\n : buildGetDescriptor({\n TARGET: t.cloneNode(target),\n PROPERTY: t.cloneNode(property),\n }).expression,\n t.cloneNode(target),\n ]),\n );\n }\n\n return acc;\n }, []);\n\n return t.sequenceExpression([\n t.assignmentExpression(\"=\", t.cloneNode(name), path.node),\n t.sequenceExpression(exprs),\n t.cloneNode(name),\n ]);\n}\n\nfunction decoratedClassToExpression({ node, scope }: NodePath) {\n if (!hasClassDecorators(node) && !hasMethodDecorators(node.body.body)) {\n return;\n }\n\n const ref = node.id\n ? t.cloneNode(node.id)\n : scope.generateUidIdentifier(\"class\");\n\n return t.variableDeclaration(\"let\", [\n t.variableDeclarator(ref, t.toExpression(node)),\n ]);\n}\n\nconst visitor: Visitor = {\n ExportDefaultDeclaration(path) {\n const decl = path.get(\"declaration\");\n if (!decl.isClassDeclaration()) return;\n\n const replacement = decoratedClassToExpression(decl);\n if (replacement) {\n const [varDeclPath] = path.replaceWithMultiple([\n replacement,\n t.exportNamedDeclaration(null, [\n t.exportSpecifier(\n // @ts-expect-error todo(flow->ts) might be add more specific return type for decoratedClassToExpression\n t.cloneNode(replacement.declarations[0].id),\n t.identifier(\"default\"),\n ),\n ]),\n ]);\n\n if (!decl.node.id) {\n path.scope.registerDeclaration(varDeclPath);\n }\n }\n },\n ClassDeclaration(path) {\n const replacement = decoratedClassToExpression(path);\n if (replacement) {\n const [newPath] = path.replaceWith(replacement);\n\n const decl = newPath.get(\"declarations.0\");\n const id = decl.node.id as t.Identifier;\n\n // TODO: Maybe add this logic to @babel/traverse\n const binding = path.scope.getOwnBinding(id.name);\n binding.identifier = id;\n binding.path = decl;\n }\n },\n ClassExpression(path, state) {\n // Create a replacement for the class node if there is one. We do one pass to replace classes with\n // class decorators, and a second pass to process method decorators.\n const decoratedClass =\n applyEnsureOrdering(path) ||\n applyClassDecorators(path) ||\n applyMethodDecorators(path, state);\n\n if (decoratedClass) path.replaceWith(decoratedClass);\n },\n ObjectExpression(path, state) {\n const decoratedObject =\n applyEnsureOrdering(path) || applyObjectDecorators(path, state);\n\n if (decoratedObject) path.replaceWith(decoratedObject);\n },\n\n AssignmentExpression(path, state) {\n if (!WARNING_CALLS.has(path.node.right)) return;\n\n path.replaceWith(\n t.callExpression(state.addHelper(\"initializerDefineProperty\"), [\n // @ts-expect-error todo(flow->ts) typesafe NodePath.get\n t.cloneNode(path.get(\"left.object\").node),\n t.stringLiteral(\n // @ts-expect-error todo(flow->ts) typesafe NodePath.get\n path.get(\"left.property\").node.name ||\n // @ts-expect-error todo(flow->ts) typesafe NodePath.get\n path.get(\"left.property\").node.value,\n ),\n // @ts-expect-error todo(flow->ts)\n t.cloneNode(path.get(\"right.arguments\")[0].node),\n // @ts-expect-error todo(flow->ts)\n t.cloneNode(path.get(\"right.arguments\")[1].node),\n ]),\n );\n },\n\n CallExpression(path, state) {\n if (path.node.arguments.length !== 3) return;\n if (!WARNING_CALLS.has(path.node.arguments[2])) return;\n\n // If the class properties plugin isn't enabled, this line will add an unused helper\n // to the code. It's not ideal, but it's ok since the configuration is not valid anyway.\n // @ts-expect-error todo(flow->ts) check that `callee` is Identifier\n if (path.node.callee.name !== state.addHelper(\"defineProperty\").name) {\n return;\n }\n\n path.replaceWith(\n t.callExpression(state.addHelper(\"initializerDefineProperty\"), [\n t.cloneNode(path.get(\"arguments\")[0].node),\n t.cloneNode(path.get(\"arguments\")[1].node),\n // @ts-expect-error todo(flow->ts)\n t.cloneNode(path.get(\"arguments.2.arguments\")[0].node),\n // @ts-expect-error todo(flow->ts)\n t.cloneNode(path.get(\"arguments.2.arguments\")[1].node),\n ]),\n );\n },\n};\n\nexport default visitor;\n","/* eslint-disable @babel/development/plugin-name */\n\nimport { declare } from \"@babel/helper-plugin-utils\";\nimport syntaxDecorators from \"@babel/plugin-syntax-decorators\";\nimport {\n createClassFeaturePlugin,\n FEATURES,\n} from \"@babel/helper-create-class-features-plugin\";\nimport legacyVisitor from \"./transformer-legacy.ts\";\nimport type { Options as SyntaxOptions } from \"@babel/plugin-syntax-decorators\";\n\ninterface Options extends SyntaxOptions {\n /** @deprecated use `constantSuper` assumption instead. Only supported in 2021-12 version. */\n loose?: boolean;\n}\n\nexport type { Options };\n\nexport default declare((api, options: Options) => {\n api.assertVersion(REQUIRED_VERSION(7));\n\n // Options are validated in @babel/plugin-syntax-decorators\n if (!process.env.BABEL_8_BREAKING) {\n // eslint-disable-next-line no-var\n var { legacy } = options;\n }\n const { version } = options;\n\n if (\n process.env.BABEL_8_BREAKING\n ? version === \"legacy\"\n : legacy || version === \"legacy\"\n ) {\n return {\n name: \"proposal-decorators\",\n inherits: syntaxDecorators,\n visitor: legacyVisitor,\n };\n } else if (\n !version ||\n version === \"2018-09\" ||\n version === \"2021-12\" ||\n version === \"2022-03\" ||\n version === \"2023-01\" ||\n version === \"2023-05\" ||\n version === \"2023-11\"\n ) {\n api.assertVersion(REQUIRED_VERSION(\"^7.0.2\"));\n return createClassFeaturePlugin({\n name: \"proposal-decorators\",\n\n api,\n feature: FEATURES.decorators,\n inherits: syntaxDecorators,\n // @ts-expect-error version must not be \"legacy\" here\n decoratorVersion: version,\n // loose: options.loose, Not supported\n });\n } else {\n throw new Error(\n \"The '.version' option must be one of 'legacy', '2023-11', '2023-05', '2023-01', '2022-03', or '2021-12'.\",\n );\n }\n});\n","import { types as t } from \"@babel/core\";\nimport type { File, Scope, NodePath } from \"@babel/core\";\n\nfunction isPureVoid(node: t.Node) {\n return (\n t.isUnaryExpression(node) &&\n node.operator === \"void\" &&\n t.isPureish(node.argument)\n );\n}\n\nexport function unshiftForXStatementBody(\n statementPath: NodePath,\n newStatements: t.Statement[],\n) {\n statementPath.ensureBlock();\n const { scope, node } = statementPath;\n const bodyScopeBindings = statementPath.get(\"body\").scope.bindings;\n const hasShadowedBlockScopedBindings = Object.keys(bodyScopeBindings).some(\n name => scope.hasBinding(name),\n );\n\n if (hasShadowedBlockScopedBindings) {\n // handle shadowed variables referenced in computed keys:\n // var a = 0;for (const { #x: x, [a++]: y } of z) { const a = 1; }\n node.body = t.blockStatement([...newStatements, node.body]);\n } else {\n (node.body as t.BlockStatement).body.unshift(...newStatements);\n }\n}\n\n/**\n * Test if an ArrayPattern's elements contain any RestElements.\n */\n\nfunction hasArrayRest(pattern: t.ArrayPattern) {\n return pattern.elements.some(elem => t.isRestElement(elem));\n}\n\n/**\n * Test if an ObjectPattern's properties contain any RestElements.\n */\n\nfunction hasObjectRest(pattern: t.ObjectPattern) {\n return pattern.properties.some(prop => t.isRestElement(prop));\n}\n\ninterface UnpackableArrayExpression extends t.ArrayExpression {\n elements: (null | t.Expression)[];\n}\n\nconst STOP_TRAVERSAL = {};\n\ninterface ArrayUnpackVisitorState {\n deopt: boolean;\n bindings: Record;\n}\n\n// NOTE: This visitor is meant to be used via t.traverse\nconst arrayUnpackVisitor = (\n node: t.Node,\n ancestors: t.TraversalAncestors,\n state: ArrayUnpackVisitorState,\n) => {\n if (!ancestors.length) {\n // Top-level node: this is the array literal.\n return;\n }\n\n if (\n t.isIdentifier(node) &&\n t.isReferenced(node, ancestors[ancestors.length - 1].node) &&\n state.bindings[node.name]\n ) {\n state.deopt = true;\n // eslint-disable-next-line @typescript-eslint/only-throw-error\n throw STOP_TRAVERSAL;\n }\n};\n\nexport type DestructuringTransformerNode =\n | t.VariableDeclaration\n | t.ExpressionStatement\n | t.ReturnStatement;\n\ninterface DestructuringTransformerOption {\n blockHoist?: number;\n operator?: t.AssignmentExpression[\"operator\"];\n nodes?: DestructuringTransformerNode[];\n kind?: t.VariableDeclaration[\"kind\"];\n scope: Scope;\n arrayLikeIsIterable: boolean;\n iterableIsArray: boolean;\n objectRestNoSymbols: boolean;\n useBuiltIns: boolean;\n addHelper: File[\"addHelper\"];\n}\nexport class DestructuringTransformer {\n private blockHoist: number;\n private operator: t.AssignmentExpression[\"operator\"];\n arrayRefSet: Set;\n private nodes: DestructuringTransformerNode[];\n private scope: Scope;\n private kind: t.VariableDeclaration[\"kind\"];\n private iterableIsArray: boolean;\n private arrayLikeIsIterable: boolean;\n private objectRestNoSymbols: boolean;\n private useBuiltIns: boolean;\n private addHelper: File[\"addHelper\"];\n constructor(opts: DestructuringTransformerOption) {\n this.blockHoist = opts.blockHoist;\n this.operator = opts.operator;\n this.arrayRefSet = new Set();\n this.nodes = opts.nodes || [];\n this.scope = opts.scope;\n this.kind = opts.kind;\n this.iterableIsArray = opts.iterableIsArray;\n this.arrayLikeIsIterable = opts.arrayLikeIsIterable;\n this.objectRestNoSymbols = opts.objectRestNoSymbols;\n this.useBuiltIns = opts.useBuiltIns;\n this.addHelper = opts.addHelper;\n }\n\n getExtendsHelper() {\n return this.useBuiltIns\n ? t.memberExpression(t.identifier(\"Object\"), t.identifier(\"assign\"))\n : this.addHelper(\"extends\");\n }\n\n buildVariableAssignment(\n id: t.AssignmentExpression[\"left\"],\n init: t.Expression,\n ) {\n let op = this.operator;\n if (t.isMemberExpression(id) || t.isOptionalMemberExpression(id)) op = \"=\";\n\n let node: t.ExpressionStatement | t.VariableDeclaration;\n\n if (op) {\n node = t.expressionStatement(\n t.assignmentExpression(\n op,\n id,\n t.cloneNode(init) || this.scope.buildUndefinedNode(),\n ),\n );\n } else {\n let nodeInit: t.Expression;\n\n if ((this.kind === \"const\" || this.kind === \"using\") && init === null) {\n nodeInit = this.scope.buildUndefinedNode();\n } else {\n nodeInit = t.cloneNode(init);\n }\n\n node = t.variableDeclaration(this.kind, [\n t.variableDeclarator(id as t.LVal, nodeInit),\n ]);\n }\n\n //@ts-expect-error(todo): document block hoist property\n node._blockHoist = this.blockHoist;\n\n return node;\n }\n\n buildVariableDeclaration(id: t.Identifier, init: t.Expression) {\n const declar = t.variableDeclaration(\"var\", [\n t.variableDeclarator(t.cloneNode(id), t.cloneNode(init)),\n ]);\n // @ts-expect-error todo(flow->ts): avoid mutations\n declar._blockHoist = this.blockHoist;\n return declar;\n }\n\n push(id: t.LVal, _init: t.Expression | null) {\n const init = t.cloneNode(_init);\n if (t.isObjectPattern(id)) {\n this.pushObjectPattern(id, init);\n } else if (t.isArrayPattern(id)) {\n this.pushArrayPattern(id, init);\n } else if (t.isAssignmentPattern(id)) {\n this.pushAssignmentPattern(id, init);\n } else {\n this.nodes.push(this.buildVariableAssignment(id, init));\n }\n }\n\n toArray(node: t.Expression, count?: boolean | number) {\n if (\n this.iterableIsArray ||\n (t.isIdentifier(node) && this.arrayRefSet.has(node.name))\n ) {\n return node;\n } else {\n return this.scope.toArray(node, count, this.arrayLikeIsIterable);\n }\n }\n\n pushAssignmentPattern(\n { left, right }: t.AssignmentPattern,\n valueRef: t.Expression | null,\n ) {\n // handle array init with void 0. This also happens when\n // the value was originally a hole.\n // const [x = 42] = [void 0,];\n // -> const x = 42;\n if (isPureVoid(valueRef)) {\n this.push(left, right);\n return;\n }\n\n // we need to assign the current value of the assignment to avoid evaluating\n // it more than once\n const tempId = this.scope.generateUidIdentifierBasedOnNode(valueRef);\n\n this.nodes.push(this.buildVariableDeclaration(tempId, valueRef));\n\n const tempConditional = t.conditionalExpression(\n t.binaryExpression(\n \"===\",\n t.cloneNode(tempId),\n this.scope.buildUndefinedNode(),\n ),\n right,\n t.cloneNode(tempId),\n );\n\n if (t.isPattern(left)) {\n let patternId;\n let node;\n\n if (\n this.kind === \"const\" ||\n this.kind === \"let\" ||\n this.kind === \"using\"\n ) {\n patternId = this.scope.generateUidIdentifier(tempId.name);\n node = this.buildVariableDeclaration(patternId, tempConditional);\n } else {\n patternId = tempId;\n\n node = t.expressionStatement(\n t.assignmentExpression(\"=\", t.cloneNode(tempId), tempConditional),\n );\n }\n\n this.nodes.push(node);\n this.push(left, patternId);\n } else {\n this.nodes.push(this.buildVariableAssignment(left, tempConditional));\n }\n }\n\n pushObjectRest(\n pattern: t.ObjectPattern,\n objRef: t.Expression,\n spreadProp: t.RestElement,\n spreadPropIndex: number,\n ) {\n const value = buildObjectExcludingKeys(\n pattern.properties.slice(0, spreadPropIndex) as t.ObjectProperty[],\n objRef,\n this.scope,\n name => this.addHelper(name),\n this.objectRestNoSymbols,\n this.useBuiltIns,\n );\n this.nodes.push(this.buildVariableAssignment(spreadProp.argument, value));\n }\n\n pushObjectProperty(prop: t.ObjectProperty, propRef: t.Expression) {\n if (t.isLiteral(prop.key)) prop.computed = true;\n\n const pattern = prop.value as t.LVal;\n const objRef = t.memberExpression(\n t.cloneNode(propRef),\n prop.key,\n prop.computed,\n );\n\n if (t.isPattern(pattern)) {\n this.push(pattern, objRef);\n } else {\n this.nodes.push(this.buildVariableAssignment(pattern, objRef));\n }\n }\n\n pushObjectPattern(pattern: t.ObjectPattern, objRef: t.Expression) {\n // https://github.com/babel/babel/issues/681\n\n if (!pattern.properties.length) {\n this.nodes.push(\n t.expressionStatement(\n t.callExpression(\n this.addHelper(\"objectDestructuringEmpty\"),\n isPureVoid(objRef) ? [] : [objRef],\n ),\n ),\n );\n return;\n }\n\n // if we have more than one properties in this pattern and the objectRef is a\n // member expression then we need to assign it to a temporary variable so it's\n // only evaluated once\n\n if (pattern.properties.length > 1 && !this.scope.isStatic(objRef)) {\n const temp = this.scope.generateUidIdentifierBasedOnNode(objRef);\n this.nodes.push(this.buildVariableDeclaration(temp, objRef));\n objRef = temp;\n }\n\n // Replace impure computed key expressions if we have a rest parameter\n if (hasObjectRest(pattern)) {\n let copiedPattern: t.ObjectPattern;\n for (let i = 0; i < pattern.properties.length; i++) {\n const prop = pattern.properties[i];\n if (t.isRestElement(prop)) {\n break;\n }\n const key = prop.key;\n if (prop.computed && !this.scope.isPure(key)) {\n const name = this.scope.generateUidIdentifierBasedOnNode(key);\n this.nodes.push(\n //@ts-expect-error PrivateName has been handled by destructuring-private\n this.buildVariableDeclaration(name, key),\n );\n if (!copiedPattern) {\n copiedPattern = pattern = {\n ...pattern,\n properties: pattern.properties.slice(),\n };\n }\n copiedPattern.properties[i] = {\n ...prop,\n key: name,\n };\n }\n }\n }\n\n for (let i = 0; i < pattern.properties.length; i++) {\n const prop = pattern.properties[i];\n if (t.isRestElement(prop)) {\n this.pushObjectRest(pattern, objRef, prop, i);\n } else {\n this.pushObjectProperty(prop, objRef);\n }\n }\n }\n\n canUnpackArrayPattern(\n pattern: t.ArrayPattern,\n arr: t.Expression,\n ): arr is UnpackableArrayExpression {\n // not an array so there's no way we can deal with this\n if (!t.isArrayExpression(arr)) return false;\n\n // pattern has less elements than the array and doesn't have a rest so some\n // elements won't be evaluated\n if (pattern.elements.length > arr.elements.length) return;\n if (\n pattern.elements.length < arr.elements.length &&\n !hasArrayRest(pattern)\n ) {\n return false;\n }\n\n for (const elem of pattern.elements) {\n // deopt on holes\n if (!elem) return false;\n\n // deopt on member expressions as they may be included in the RHS\n if (t.isMemberExpression(elem)) return false;\n }\n\n for (const elem of arr.elements) {\n // deopt on spread elements\n if (t.isSpreadElement(elem)) return false;\n\n // deopt call expressions as they might change values of LHS variables\n if (t.isCallExpression(elem)) return false;\n\n // deopt on member expressions as they may be getter/setters and have side-effects\n if (t.isMemberExpression(elem)) return false;\n }\n\n // deopt on reference to left side identifiers\n const bindings = t.getBindingIdentifiers(pattern);\n const state: ArrayUnpackVisitorState = { deopt: false, bindings };\n\n try {\n t.traverse(arr, arrayUnpackVisitor, state);\n } catch (e) {\n if (e !== STOP_TRAVERSAL) throw e;\n }\n\n return !state.deopt;\n }\n\n pushUnpackedArrayPattern(\n pattern: t.ArrayPattern,\n arr: UnpackableArrayExpression,\n ) {\n const holeToUndefined = (el: t.Expression) =>\n el ?? this.scope.buildUndefinedNode();\n\n for (let i = 0; i < pattern.elements.length; i++) {\n const elem = pattern.elements[i];\n if (t.isRestElement(elem)) {\n this.push(\n elem.argument,\n t.arrayExpression(arr.elements.slice(i).map(holeToUndefined)),\n );\n } else {\n this.push(elem, holeToUndefined(arr.elements[i]));\n }\n }\n }\n\n pushArrayPattern(pattern: t.ArrayPattern, arrayRef: t.Expression | null) {\n if (arrayRef === null) {\n this.nodes.push(\n t.expressionStatement(\n t.callExpression(this.addHelper(\"objectDestructuringEmpty\"), []),\n ),\n );\n return;\n }\n if (!pattern.elements) return;\n\n // optimise basic array destructuring of an array expression\n //\n // we can't do this to a pattern of unequal size to it's right hand\n // array expression as then there will be values that won't be evaluated\n //\n // eg: let [a, b] = [1, 2];\n\n if (this.canUnpackArrayPattern(pattern, arrayRef)) {\n this.pushUnpackedArrayPattern(pattern, arrayRef);\n return;\n }\n\n // if we have a rest then we need all the elements so don't tell\n // `scope.toArray` to only get a certain amount\n\n const count = !hasArrayRest(pattern) && pattern.elements.length;\n\n // so we need to ensure that the `arrayRef` is an array, `scope.toArray` will\n // return a locally bound identifier if it's been inferred to be an array,\n // otherwise it'll be a call to a helper that will ensure it's one\n\n const toArray = this.toArray(arrayRef, count);\n\n if (t.isIdentifier(toArray)) {\n // we've been given an identifier so it must have been inferred to be an\n // array\n arrayRef = toArray;\n } else {\n arrayRef = this.scope.generateUidIdentifierBasedOnNode(arrayRef);\n this.arrayRefSet.add(arrayRef.name);\n this.nodes.push(this.buildVariableDeclaration(arrayRef, toArray));\n }\n\n for (let i = 0; i < pattern.elements.length; i++) {\n const elem = pattern.elements[i];\n\n // hole\n if (!elem) continue;\n\n let elemRef;\n\n if (t.isRestElement(elem)) {\n elemRef = this.toArray(arrayRef);\n elemRef = t.callExpression(\n t.memberExpression(elemRef, t.identifier(\"slice\")),\n [t.numericLiteral(i)],\n );\n\n // set the element to the rest element argument since we've dealt with it\n // being a rest already\n this.push(elem.argument, elemRef);\n } else {\n elemRef = t.memberExpression(arrayRef, t.numericLiteral(i), true);\n this.push(elem, elemRef);\n }\n }\n }\n\n init(pattern: t.LVal, ref: t.Expression) {\n // trying to destructure a value that we can't evaluate more than once so we\n // need to save it to a variable\n\n if (!t.isArrayExpression(ref) && !t.isMemberExpression(ref)) {\n const memo = this.scope.maybeGenerateMemoised(ref, true);\n if (memo) {\n this.nodes.push(this.buildVariableDeclaration(memo, t.cloneNode(ref)));\n ref = memo;\n }\n }\n\n this.push(pattern, ref);\n\n return this.nodes;\n }\n}\n\ninterface ExcludingKey {\n key: t.Expression | t.PrivateName;\n computed: boolean;\n}\n\nexport function buildObjectExcludingKeys(\n excludedKeys: T[],\n objRef: t.Expression,\n scope: Scope,\n addHelper: File[\"addHelper\"],\n objectRestNoSymbols: boolean,\n useBuiltIns: boolean,\n): t.CallExpression {\n // get all the keys that appear in this object before the current spread\n\n const keys = [];\n let allLiteral = true;\n let hasTemplateLiteral = false;\n for (let i = 0; i < excludedKeys.length; i++) {\n const prop = excludedKeys[i];\n const key = prop.key;\n if (t.isIdentifier(key) && !prop.computed) {\n keys.push(t.stringLiteral(key.name));\n } else if (t.isTemplateLiteral(key)) {\n keys.push(t.cloneNode(key));\n hasTemplateLiteral = true;\n } else if (t.isLiteral(key)) {\n // @ts-expect-error todo(flow->ts) NullLiteral\n keys.push(t.stringLiteral(String(key.value)));\n } else if (t.isPrivateName(key)) {\n // private key is not enumerable\n } else {\n keys.push(t.cloneNode(key));\n allLiteral = false;\n }\n }\n\n let value;\n if (keys.length === 0) {\n const extendsHelper = useBuiltIns\n ? t.memberExpression(t.identifier(\"Object\"), t.identifier(\"assign\"))\n : addHelper(\"extends\");\n value = t.callExpression(extendsHelper, [\n t.objectExpression([]),\n t.sequenceExpression([\n t.callExpression(addHelper(\"objectDestructuringEmpty\"), [\n t.cloneNode(objRef),\n ]),\n t.cloneNode(objRef),\n ]),\n ]);\n } else {\n let keyExpression: t.Expression = t.arrayExpression(keys);\n\n if (!allLiteral) {\n keyExpression = t.callExpression(\n t.memberExpression(keyExpression, t.identifier(\"map\")),\n [addHelper(\"toPropertyKey\")],\n );\n } else if (!hasTemplateLiteral && !t.isProgram(scope.block)) {\n // Hoist definition of excluded keys, so that it's not created each time.\n const programScope = scope.getProgramParent();\n const id = programScope.generateUidIdentifier(\"excluded\");\n\n programScope.push({\n id,\n init: keyExpression,\n kind: \"const\",\n });\n\n keyExpression = t.cloneNode(id);\n }\n\n value = t.callExpression(\n addHelper(`objectWithoutProperties${objectRestNoSymbols ? \"Loose\" : \"\"}`),\n [t.cloneNode(objRef), keyExpression],\n );\n }\n return value;\n}\n\nexport function convertVariableDeclaration(\n path: NodePath,\n addHelper: File[\"addHelper\"],\n arrayLikeIsIterable: boolean,\n iterableIsArray: boolean,\n objectRestNoSymbols: boolean,\n useBuiltIns: boolean,\n) {\n const { node, scope } = path;\n\n const nodeKind = node.kind;\n const nodeLoc = node.loc;\n const nodes = [];\n\n for (let i = 0; i < node.declarations.length; i++) {\n const declar = node.declarations[i];\n\n const patternId = declar.init;\n const pattern = declar.id;\n\n const destructuring: DestructuringTransformer =\n new DestructuringTransformer({\n // @ts-expect-error(todo): avoid internal properties access\n blockHoist: node._blockHoist,\n nodes: nodes,\n scope: scope,\n kind: node.kind,\n iterableIsArray,\n arrayLikeIsIterable,\n useBuiltIns,\n objectRestNoSymbols,\n addHelper,\n });\n\n if (t.isPattern(pattern)) {\n destructuring.init(pattern, patternId);\n\n if (+i !== node.declarations.length - 1) {\n // we aren't the last declarator so let's just make the\n // last transformed node inherit from us\n t.inherits(nodes[nodes.length - 1], declar);\n }\n } else {\n nodes.push(\n t.inherits(\n destructuring.buildVariableAssignment(pattern, patternId),\n declar,\n ),\n );\n }\n }\n\n let tail: t.VariableDeclaration | null = null;\n let nodesOut = [];\n for (const node of nodes) {\n if (t.isVariableDeclaration(node)) {\n if (tail !== null) {\n // Create a single compound declarations\n tail.declarations.push(...node.declarations);\n continue;\n } else {\n // Make sure the original node kind is used for each compound declaration\n node.kind = nodeKind;\n tail = node;\n }\n } else {\n tail = null;\n }\n // Propagate the original declaration node's location\n if (!node.loc) {\n node.loc = nodeLoc;\n }\n nodesOut.push(node);\n }\n\n if (\n nodesOut.length === 2 &&\n t.isVariableDeclaration(nodesOut[0]) &&\n t.isExpressionStatement(nodesOut[1]) &&\n t.isCallExpression(nodesOut[1].expression) &&\n nodesOut[0].declarations.length === 1\n ) {\n // This can only happen when we generate this code:\n // var _ref = DESTRUCTURED_VALUE;\n // babelHelpers.objectDestructuringEmpty(_ref);\n // Since pushing those two statements to the for loop .init will require an IIFE,\n // we can optimize them to\n // babelHelpers.objectDestructuringEmpty(DESTRUCTURED_VALUE);\n const expr = nodesOut[1].expression;\n expr.arguments = [nodesOut[0].declarations[0].init];\n nodesOut = [expr];\n } else {\n // We must keep nodes all are expressions or statements, so `replaceWithMultiple` can work.\n if (\n t.isForStatement(path.parent, { init: node }) &&\n !nodesOut.some(v => t.isVariableDeclaration(v))\n ) {\n for (let i = 0; i < nodesOut.length; i++) {\n const node: t.Node = nodesOut[i];\n if (t.isExpressionStatement(node)) {\n nodesOut[i] = node.expression;\n }\n }\n }\n }\n\n if (nodesOut.length === 1) {\n path.replaceWith(nodesOut[0]);\n } else {\n path.replaceWithMultiple(nodesOut);\n }\n scope.crawl();\n}\n\nexport function convertAssignmentExpression(\n path: NodePath,\n addHelper: File[\"addHelper\"],\n arrayLikeIsIterable: boolean,\n iterableIsArray: boolean,\n objectRestNoSymbols: boolean,\n useBuiltIns: boolean,\n) {\n const { node, scope, parentPath } = path;\n\n const nodes: DestructuringTransformerNode[] = [];\n\n const destructuring = new DestructuringTransformer({\n operator: node.operator,\n scope: scope,\n nodes: nodes,\n arrayLikeIsIterable,\n iterableIsArray,\n objectRestNoSymbols,\n useBuiltIns,\n addHelper,\n });\n\n let ref: t.Identifier | void;\n if (\n (!parentPath.isExpressionStatement() &&\n !parentPath.isSequenceExpression()) ||\n path.isCompletionRecord()\n ) {\n ref = scope.generateUidIdentifierBasedOnNode(node.right, \"ref\");\n\n nodes.push(\n t.variableDeclaration(\"var\", [t.variableDeclarator(ref, node.right)]),\n );\n\n if (t.isArrayExpression(node.right)) {\n destructuring.arrayRefSet.add(ref.name);\n }\n }\n\n destructuring.init(node.left, ref || node.right);\n\n if (ref) {\n if (parentPath.isArrowFunctionExpression()) {\n path.replaceWith(t.blockStatement([]));\n nodes.push(t.returnStatement(t.cloneNode(ref)));\n } else {\n nodes.push(t.expressionStatement(t.cloneNode(ref)));\n }\n }\n\n path.replaceWithMultiple(nodes);\n scope.crawl();\n}\n","import { declare } from \"@babel/helper-plugin-utils\";\nimport { types as t, type NodePath } from \"@babel/core\";\nimport {\n DestructuringTransformer,\n convertVariableDeclaration,\n convertAssignmentExpression,\n unshiftForXStatementBody,\n type DestructuringTransformerNode,\n} from \"./util.ts\";\nexport { buildObjectExcludingKeys, unshiftForXStatementBody } from \"./util.ts\";\n\n/**\n * Test if a VariableDeclaration's declarations contains any Patterns.\n */\n\nfunction variableDeclarationHasPattern(node: t.VariableDeclaration) {\n for (const declar of node.declarations) {\n if (t.isPattern(declar.id)) {\n return true;\n }\n }\n return false;\n}\n\nexport interface Options {\n allowArrayLike?: boolean;\n loose?: boolean;\n useBuiltIns?: boolean;\n}\n\nexport default declare((api, options: Options) => {\n api.assertVersion(REQUIRED_VERSION(7));\n\n const { useBuiltIns = false } = options;\n\n const iterableIsArray =\n api.assumption(\"iterableIsArray\") ?? options.loose ?? false;\n const arrayLikeIsIterable =\n options.allowArrayLike ?? api.assumption(\"arrayLikeIsIterable\") ?? false;\n const objectRestNoSymbols =\n api.assumption(\"objectRestNoSymbols\") ?? options.loose ?? false;\n\n return {\n name: \"transform-destructuring\",\n\n visitor: {\n ExportNamedDeclaration(path) {\n const declaration = path.get(\"declaration\");\n if (!declaration.isVariableDeclaration()) return;\n if (!variableDeclarationHasPattern(declaration.node)) return;\n\n const specifiers = [];\n\n for (const name of Object.keys(path.getOuterBindingIdentifiers())) {\n specifiers.push(\n t.exportSpecifier(t.identifier(name), t.identifier(name)),\n );\n }\n\n // Split the declaration and export list into two declarations so that the variable\n // declaration can be split up later without needing to worry about not being a\n // top-level statement.\n path.replaceWith(declaration.node);\n path.insertAfter(t.exportNamedDeclaration(null, specifiers));\n path.scope.crawl();\n },\n\n ForXStatement(path: NodePath) {\n const { node, scope } = path;\n const left = node.left;\n\n if (t.isPattern(left)) {\n // for ({ length: k } in { abc: 3 });\n\n const temp = scope.generateUidIdentifier(\"ref\");\n\n node.left = t.variableDeclaration(\"var\", [\n t.variableDeclarator(temp),\n ]);\n\n path.ensureBlock();\n const statementBody = (path.node.body as t.BlockStatement).body;\n const nodes = [];\n // todo: the completion of a for statement can only be observed from\n // a do block (or eval that we don't support),\n // but the new do-expression proposal plans to ban iteration ends in the\n // do block, maybe we can get rid of this\n if (statementBody.length === 0 && path.isCompletionRecord()) {\n nodes.unshift(t.expressionStatement(scope.buildUndefinedNode()));\n }\n\n nodes.unshift(\n t.expressionStatement(\n t.assignmentExpression(\"=\", left, t.cloneNode(temp)),\n ),\n );\n\n unshiftForXStatementBody(path, nodes);\n scope.crawl();\n return;\n }\n\n if (!t.isVariableDeclaration(left)) return;\n\n const pattern = left.declarations[0].id;\n if (!t.isPattern(pattern)) return;\n\n const key = scope.generateUidIdentifier(\"ref\");\n node.left = t.variableDeclaration(left.kind, [\n t.variableDeclarator(key, null),\n ]);\n\n const nodes: DestructuringTransformerNode[] = [];\n\n const destructuring = new DestructuringTransformer({\n kind: left.kind,\n scope: scope,\n nodes: nodes,\n arrayLikeIsIterable,\n iterableIsArray,\n objectRestNoSymbols,\n useBuiltIns,\n addHelper: name => this.addHelper(name),\n });\n\n destructuring.init(pattern, key);\n\n unshiftForXStatementBody(path, nodes);\n scope.crawl();\n },\n\n CatchClause({ node, scope }) {\n const pattern = node.param;\n if (!t.isPattern(pattern)) return;\n\n const ref = scope.generateUidIdentifier(\"ref\");\n node.param = ref;\n\n const nodes: DestructuringTransformerNode[] = [];\n\n const destructuring = new DestructuringTransformer({\n kind: \"let\",\n scope: scope,\n nodes: nodes,\n arrayLikeIsIterable,\n iterableIsArray,\n objectRestNoSymbols,\n useBuiltIns,\n addHelper: name => this.addHelper(name),\n });\n destructuring.init(pattern, ref);\n\n node.body.body = [...nodes, ...node.body.body];\n scope.crawl();\n },\n\n AssignmentExpression(path, state) {\n if (!t.isPattern(path.node.left)) return;\n convertAssignmentExpression(\n path as NodePath,\n name => state.addHelper(name),\n arrayLikeIsIterable,\n iterableIsArray,\n objectRestNoSymbols,\n useBuiltIns,\n );\n },\n\n VariableDeclaration(path, state) {\n const { node, parent } = path;\n if (t.isForXStatement(parent)) return;\n if (!parent || !path.container) return; // i don't know why this is necessary - TODO\n if (!variableDeclarationHasPattern(node)) return;\n convertVariableDeclaration(\n path,\n name => state.addHelper(name),\n arrayLikeIsIterable,\n iterableIsArray,\n objectRestNoSymbols,\n useBuiltIns,\n );\n },\n },\n };\n});\n","import { types as t } from \"@babel/core\";\nimport type { File, Scope } from \"@babel/core\";\nimport { buildObjectExcludingKeys } from \"@babel/plugin-transform-destructuring\";\nconst {\n assignmentExpression,\n binaryExpression,\n conditionalExpression,\n cloneNode,\n isObjectProperty,\n isPrivateName,\n memberExpression,\n numericLiteral,\n objectPattern,\n restElement,\n variableDeclarator,\n variableDeclaration,\n unaryExpression,\n} = t;\n\nfunction buildUndefinedNode() {\n return unaryExpression(\"void\", numericLiteral(0));\n}\n\nfunction transformAssignmentPattern(\n initializer: t.Expression,\n tempId: t.Identifier,\n) {\n return conditionalExpression(\n binaryExpression(\"===\", cloneNode(tempId), buildUndefinedNode()),\n initializer,\n cloneNode(tempId),\n );\n}\n\nfunction initRestExcludingKeys(pattern: t.LVal): ExcludingKey[] | null {\n if (pattern.type === \"ObjectPattern\") {\n const { properties } = pattern;\n if (properties[properties.length - 1].type === \"RestElement\") {\n return [];\n }\n }\n return null;\n}\n\n/**\n * grow `excludingKeys` from given properties. This routine mutates properties by\n * memoising the computed non-static keys.\n *\n * @param {ExcludingKey[]} excludingKeys\n * @param {t.ObjectProperty[]} properties An array of object properties that should be excluded by rest element transform\n * @param {Scope} scope Where should we register the memoised id\n */\nfunction growRestExcludingKeys(\n excludingKeys: ExcludingKey[],\n properties: t.ObjectProperty[],\n scope: Scope,\n) {\n if (excludingKeys === null) return;\n for (const property of properties) {\n const propertyKey = property.key;\n if (property.computed && !scope.isStatic(propertyKey)) {\n const tempId = scope.generateDeclaredUidIdentifier(\"m\");\n // @ts-expect-error A computed property key must not be a private name\n property.key = assignmentExpression(\"=\", tempId, propertyKey);\n excludingKeys.push({ key: tempId, computed: true });\n } else if (propertyKey.type !== \"PrivateName\") {\n excludingKeys.push(property);\n }\n }\n}\n\n/**\n * Prepare var declarations for params. Only param initializers\n * will be transformed to undefined coalescing, other features are preserved.\n * This function does NOT mutate given AST structures.\n *\n * @export\n * @param {Function[\"params\"]} params An array of function params\n * @param {Scope} scope A scope used to generate uid for function params\n * @returns {{ params: Identifier[]; variableDeclaration: VariableDeclaration }} An array of new id for params\n * and variable declaration to be prepended to the function body\n */\nexport function buildVariableDeclarationFromParams(\n params: t.Function[\"params\"],\n scope: Scope,\n): {\n params: (t.Identifier | t.RestElement)[];\n variableDeclaration: t.VariableDeclaration;\n} {\n const { elements, transformed } = buildAssignmentsFromPatternList(\n params,\n scope,\n /* isAssignment */ false,\n );\n return {\n params: elements,\n variableDeclaration: variableDeclaration(\n \"var\",\n transformed.map(({ left, right }) => variableDeclarator(left, right)),\n ),\n };\n}\n\ninterface Transformed {\n left: Exclude;\n right: t.Expression;\n}\n\nfunction buildAssignmentsFromPatternList(\n elements: (t.LVal | null)[],\n scope: Scope,\n isAssignment: boolean,\n): {\n elements: (t.Identifier | t.RestElement | null)[];\n transformed: Transformed[];\n} {\n const newElements: (t.Identifier | t.RestElement)[] = [],\n transformed: Transformed[] = [];\n for (let element of elements) {\n if (element === null) {\n newElements.push(null);\n transformed.push(null);\n continue;\n }\n const tempId = scope.generateUidIdentifier(\"p\");\n if (isAssignment) {\n scope.push({ id: cloneNode(tempId) });\n }\n if (element.type === \"RestElement\") {\n newElements.push(restElement(tempId));\n // The argument of a RestElement within a BindingPattern must be either Identifier or BindingPattern\n element = element.argument as t.Identifier | t.Pattern;\n } else {\n newElements.push(tempId);\n }\n if (element.type === \"AssignmentPattern\") {\n transformed.push({\n left: element.left,\n right: transformAssignmentPattern(element.right, tempId),\n });\n } else {\n transformed.push({\n left: element as Transformed[\"left\"],\n right: cloneNode(tempId),\n });\n }\n }\n return { elements: newElements, transformed };\n}\n\ntype StackItem = {\n node: t.AssignmentExpression[\"left\"] | t.ObjectProperty | null;\n index: number;\n depth: number;\n};\n\n/**\n * A DFS simplified pattern traverser. It skips computed property keys and assignment pattern\n * initializers. The following nodes will be delegated to the visitor:\n * - ArrayPattern\n * - ArrayPattern elements\n * - AssignmentPattern\n * - ObjectPattern\n * - ObjectProperty\n * - RestElement\n * @param root\n * @param visitor\n */\nexport function* traversePattern(\n root: t.AssignmentExpression[\"left\"],\n visitor: (\n node: t.AssignmentExpression[\"left\"] | t.ObjectProperty,\n index: number,\n depth: number,\n ) => Generator,\n) {\n const stack: StackItem[] = [];\n stack.push({ node: root, index: 0, depth: 0 });\n let item: StackItem;\n while ((item = stack.pop()) !== undefined) {\n const { node, index } = item;\n if (node === null) continue;\n yield* visitor(node, index, item.depth);\n const depth = item.depth + 1;\n switch (node.type) {\n case \"AssignmentPattern\":\n stack.push({ node: node.left, index: 0, depth });\n break;\n case \"ObjectProperty\":\n // inherit the depth and index as an object property can not be an LHS without object pattern\n stack.push({ node: node.value as t.LVal, index, depth: item.depth });\n break;\n case \"RestElement\":\n stack.push({ node: node.argument, index: 0, depth });\n break;\n case \"ObjectPattern\":\n for (let list = node.properties, i = list.length - 1; i >= 0; i--) {\n stack.push({ node: list[i], index: i, depth });\n }\n break;\n case \"ArrayPattern\":\n for (let list = node.elements, i = list.length - 1; i >= 0; i--) {\n stack.push({ node: list[i], index: i, depth });\n }\n break;\n case \"TSParameterProperty\":\n case \"TSAsExpression\":\n case \"TSTypeAssertion\":\n case \"TSNonNullExpression\":\n throw new Error(\n `TypeScript features must first be transformed by ` +\n `@babel/plugin-transform-typescript.\\n` +\n `If you have already enabled that plugin (or '@babel/preset-typescript'), make sure ` +\n `that it runs before @babel/plugin-proposal-destructuring-private.`,\n );\n default:\n break;\n }\n }\n}\n\nexport function hasPrivateKeys(pattern: t.AssignmentExpression[\"left\"]) {\n let result = false;\n traversePattern(pattern, function* (node) {\n if (isObjectProperty(node) && isPrivateName(node.key)) {\n result = true;\n // stop the traversal\n yield;\n }\n }).next();\n return result;\n}\n\nexport function hasPrivateClassElement(node: t.ClassBody): boolean {\n return node.body.some(element =>\n isPrivateName(\n // @ts-expect-error: for those class element without `key`, they must\n // not be a private element\n element.key,\n ),\n );\n}\n\n/**\n * Traverse the given pattern and report the private key path.\n * A private key path is analogous to an array of `key` from the pattern NodePath\n * to the private key NodePath. See also test/util.skip-bundled.js for an example output\n *\n * @export\n * @param {t.LVal} pattern\n */\nexport function* privateKeyPathIterator(pattern: t.LVal) {\n const indexPath: number[] = [];\n yield* traversePattern(pattern, function* (node, index, depth) {\n indexPath[depth] = index;\n if (isObjectProperty(node) && isPrivateName(node.key)) {\n // The indexPath[0, depth] contains the path from root pattern to the object property\n // with private key. The indexPath may have more than depth + 1 elements because we\n // don't shrink the indexPath when the traverser returns to parent nodes.\n yield indexPath.slice(1, depth + 1);\n }\n });\n}\n\ntype LHS = Exclude;\n\ntype ExcludingKey = {\n key: t.ObjectProperty[\"key\"];\n computed: t.ObjectProperty[\"computed\"];\n};\ntype Item = {\n left: LHS;\n right: t.Expression;\n restExcludingKeys?: ExcludingKey[] | null;\n};\n\nfunction rightWillBeReferencedOnce(left: LHS) {\n switch (left.type) {\n // Skip memoising the right when left is an identifier or\n // an array pattern\n case \"Identifier\":\n case \"ArrayPattern\":\n return true;\n case \"ObjectPattern\":\n return left.properties.length === 1;\n default:\n return false;\n }\n}\n/**\n * Transform private destructuring. It returns a generator\n * which yields a pair of transformed LHS and RHS, which can form VariableDeclaration or\n * AssignmentExpression later.\n *\n * @export\n * @param {LHS} left The root pattern\n * @param {t.Expression} right The initializer or the RHS of pattern\n * @param {Scope} scope The scope where memoized id should be registered\n * @param {boolean} isAssignment Whether we are transforming from an AssignmentExpression of VariableDeclaration\n * @returns {Generator}\n */\nexport function* transformPrivateKeyDestructuring(\n left: LHS,\n right: t.Expression,\n scope: Scope,\n isAssignment: boolean,\n shouldPreserveCompletion: boolean,\n addHelper: File[\"addHelper\"],\n objectRestNoSymbols: boolean,\n useBuiltIns: boolean,\n): Generator {\n const stack: Item[] = [];\n const rootRight = right;\n // The stack holds patterns that we don't known whether they contain private key\n stack.push({\n left,\n right,\n restExcludingKeys: initRestExcludingKeys(left),\n });\n let item: Item;\n while ((item = stack.pop()) !== undefined) {\n const { restExcludingKeys } = item;\n let { left, right } = item;\n const searchPrivateKey = privateKeyPathIterator(left).next();\n if (searchPrivateKey.done) {\n if (restExcludingKeys?.length > 0) {\n // optimize out the rest element because `objectWithoutProperties`\n // returns a new object\n // `{ ...z } = babelHelpers.objectWithoutProperties(m, [\"x\"])`\n // to\n // `z = babelHelpers.objectWithoutProperties(m, [\"x\"])`\n const { properties } = left as t.ObjectPattern;\n if (properties.length === 1) {\n // The argument of an object rest element must be an Identifier\n left = (properties[0] as t.RestElement).argument as t.Identifier;\n }\n yield {\n left: left as t.ObjectPattern,\n right: buildObjectExcludingKeys(\n restExcludingKeys,\n right,\n scope,\n addHelper,\n objectRestNoSymbols,\n useBuiltIns,\n ),\n };\n } else {\n yield {\n left:\n // An assignment pattern will not be pushed to the stack\n left as Transformed[\"left\"],\n right,\n };\n }\n } else {\n // now we need to split according to the indexPath;\n const indexPath = searchPrivateKey.value;\n for (\n let indexPathIndex = 0, index;\n (indexPathIndex < indexPath.length &&\n (index = indexPath[indexPathIndex]) !== undefined) ||\n left.type === \"AssignmentPattern\";\n indexPathIndex++\n ) {\n const isRightSafeToReuse =\n // If we should preserve completion and the right is the rootRight, then the\n // right is NOT safe to reuse because we will insert a new memoising statement\n // in the AssignmentExpression visitor, which causes right to be referenced more\n // than once\n !(shouldPreserveCompletion && right === rootRight) &&\n (rightWillBeReferencedOnce(left) || scope.isStatic(right));\n if (!isRightSafeToReuse) {\n const tempId = scope.generateUidIdentifier(\"m\");\n if (isAssignment) {\n scope.push({ id: cloneNode(tempId) });\n }\n yield { left: tempId, right };\n right = cloneNode(tempId);\n }\n // invariant: at this point right must be a static identifier;\n switch (left.type) {\n case \"ObjectPattern\": {\n const { properties } = left;\n if (index > 0) {\n // properties[0, index) must not contain private keys\n const propertiesSlice = properties.slice(0, index);\n yield {\n left: objectPattern(propertiesSlice),\n right: cloneNode(right),\n };\n }\n if (index < properties.length - 1) {\n // for properties after `index`, push them to stack so we can process them later\n // inherit the restExcludingKeys on the stack if we are at\n // the first level, otherwise initialize a new restExcludingKeys\n const nextRestExcludingKeys =\n indexPathIndex === 0\n ? restExcludingKeys\n : initRestExcludingKeys(left);\n growRestExcludingKeys(\n nextRestExcludingKeys,\n // @ts-expect-error properties[0, index] must not contain rest element\n // because properties[index] contains a private key\n properties.slice(0, index + 1),\n scope,\n );\n stack.push({\n left: objectPattern(properties.slice(index + 1)),\n right: cloneNode(right),\n restExcludingKeys: nextRestExcludingKeys,\n });\n }\n // An object rest element must not contain a private key\n const property = properties[index] as t.ObjectProperty;\n // The value of ObjectProperty under ObjectPattern must be an LHS\n left = property.value as LHS;\n const { key } = property;\n const computed =\n property.computed ||\n // `{ 0: x } = RHS` is transformed to a computed member expression `x = RHS[0]`\n (key.type !== \"Identifier\" && key.type !== \"PrivateName\");\n right = memberExpression(right, key, computed);\n break;\n }\n case \"AssignmentPattern\": {\n right = transformAssignmentPattern(\n left.right,\n right as t.Identifier,\n );\n left = left.left;\n break;\n }\n case \"ArrayPattern\": {\n // todo: the transform here assumes that any expression within\n // the array pattern, when evaluated, do not interfere with the iterable\n // in RHS. Otherwise we have to pause the iterable and interleave\n // the expressions.\n // See also https://gist.github.com/nicolo-ribaudo/f8ac7916f89450f2ead77d99855b2098\n // and ordering/array-pattern-side-effect-iterable test\n const leftElements = left.elements;\n const leftElementsAfterIndex = leftElements.splice(index);\n const { elements, transformed } = buildAssignmentsFromPatternList(\n leftElementsAfterIndex,\n scope,\n isAssignment,\n );\n leftElements.push(...elements);\n yield { left, right: cloneNode(right) };\n // for elements after `index`, push them to stack so we can process them later\n for (let i = transformed.length - 1; i > 0; i--) {\n // skipping array holes\n if (transformed[i] !== null) {\n stack.push(transformed[i]);\n }\n }\n ({ left, right } = transformed[0]);\n break;\n }\n default:\n break;\n }\n }\n stack.push({\n left,\n right,\n restExcludingKeys: initRestExcludingKeys(left),\n });\n }\n }\n}\n","import { types as t } from \"@babel/core\";\nimport type { NodePath, Scope, Visitor } from \"@babel/core\";\n\ntype State = {\n needsOuterBinding: boolean;\n scope: Scope;\n};\n\nexport const iifeVisitor: Visitor = {\n \"ReferencedIdentifier|BindingIdentifier\"(\n path: NodePath,\n state,\n ) {\n const { scope, node } = path;\n const { name } = node;\n\n if (\n name === \"eval\" ||\n (scope.getBinding(name) === state.scope.parent.getBinding(name) &&\n state.scope.hasOwnBinding(name))\n ) {\n state.needsOuterBinding = true;\n path.stop();\n }\n },\n // type annotations don't use or introduce \"real\" bindings\n \"TypeAnnotation|TSTypeAnnotation|TypeParameterDeclaration|TSTypeParameterDeclaration\":\n (path: NodePath) => path.skip(),\n};\n\nexport function collectShadowedParamsNames(\n param: NodePath,\n functionScope: Scope,\n shadowedParams: Set,\n) {\n for (const name of Object.keys(param.getBindingIdentifiers())) {\n const constantViolations = functionScope.bindings[name]?.constantViolations;\n if (constantViolations) {\n for (const redeclarator of constantViolations) {\n const node = redeclarator.node;\n // If a constant violation is a var or a function declaration,\n // we first check to see if it's a var without an init.\n // If so, we remove that declarator.\n // Otherwise, we have to wrap it in an IIFE.\n switch (node.type) {\n case \"VariableDeclarator\": {\n if (node.init === null) {\n const declaration = redeclarator.parentPath;\n // The following uninitialized var declarators should not be removed\n // for (var x in {})\n // for (var x;;)\n if (\n !declaration.parentPath.isFor() ||\n declaration.parentPath.get(\"body\") === declaration\n ) {\n redeclarator.remove();\n break;\n }\n }\n\n shadowedParams.add(name);\n break;\n }\n case \"FunctionDeclaration\":\n shadowedParams.add(name);\n break;\n }\n }\n }\n }\n}\n\nexport function buildScopeIIFE(\n shadowedParams: Set,\n body: t.BlockStatement,\n) {\n const args = [];\n const params = [];\n\n for (const name of shadowedParams) {\n // We create them twice; the other option is to use t.cloneNode\n args.push(t.identifier(name));\n params.push(t.identifier(name));\n }\n\n return t.returnStatement(\n t.callExpression(t.arrowFunctionExpression(params, body), args),\n );\n}\n","import { template, types as t, type NodePath } from \"@babel/core\";\n\nimport {\n iifeVisitor,\n collectShadowedParamsNames,\n buildScopeIIFE,\n} from \"./shadow-utils.ts\";\n\nconst buildDefaultParam = template.statement(`\n let VARIABLE_NAME =\n arguments.length > ARGUMENT_KEY && arguments[ARGUMENT_KEY] !== undefined ?\n arguments[ARGUMENT_KEY]\n :\n DEFAULT_VALUE;\n`);\n\nconst buildLooseDefaultParam = template.statement(`\n if (ASSIGNMENT_IDENTIFIER === UNDEFINED) {\n ASSIGNMENT_IDENTIFIER = DEFAULT_VALUE;\n }\n`);\n\nconst buildLooseDestructuredDefaultParam = template.statement(`\n let ASSIGNMENT_IDENTIFIER = PARAMETER_NAME === UNDEFINED ? DEFAULT_VALUE : PARAMETER_NAME ;\n`);\n\nconst buildSafeArgumentsAccess = template.statement(`\n let $0 = arguments.length > $1 ? arguments[$1] : undefined;\n`);\n\n// last 2 parameters are optional -- they are used by transform-object-rest-spread/src/index.js\nexport default function convertFunctionParams(\n path: NodePath,\n ignoreFunctionLength: boolean | void,\n shouldTransformParam?: (index: number) => boolean,\n replaceRestElement?: (\n path: NodePath,\n paramPath: NodePath,\n transformedRestNodes: t.Statement[],\n ) => void,\n) {\n const params = path.get(\"params\");\n\n const isSimpleParameterList = params.every(param => param.isIdentifier());\n if (isSimpleParameterList) return false;\n\n const { node, scope } = path;\n\n const body = [];\n const shadowedParams = new Set();\n\n for (const param of params) {\n collectShadowedParamsNames(param, scope, shadowedParams);\n }\n\n const state = {\n needsOuterBinding: false,\n scope,\n };\n if (shadowedParams.size === 0) {\n for (const param of params) {\n if (!param.isIdentifier()) param.traverse(iifeVisitor, state);\n if (state.needsOuterBinding) break;\n }\n }\n\n let firstOptionalIndex = null;\n\n for (let i = 0; i < params.length; i++) {\n const param = params[i];\n\n if (shouldTransformParam && !shouldTransformParam(i)) {\n continue;\n }\n const transformedRestNodes: t.Statement[] = [];\n if (replaceRestElement) {\n replaceRestElement(path, param, transformedRestNodes);\n }\n\n const paramIsAssignmentPattern = param.isAssignmentPattern();\n if (\n paramIsAssignmentPattern &&\n (ignoreFunctionLength || t.isMethod(node, { kind: \"set\" }))\n ) {\n const left = param.get(\"left\");\n const right = param.get(\"right\");\n\n const undefinedNode = scope.buildUndefinedNode();\n\n if (left.isIdentifier()) {\n body.push(\n buildLooseDefaultParam({\n ASSIGNMENT_IDENTIFIER: t.cloneNode(left.node),\n DEFAULT_VALUE: right.node,\n UNDEFINED: undefinedNode,\n }),\n );\n param.replaceWith(left.node);\n } else if (left.isObjectPattern() || left.isArrayPattern()) {\n const paramName = scope.generateUidIdentifier();\n body.push(\n buildLooseDestructuredDefaultParam({\n ASSIGNMENT_IDENTIFIER: left.node,\n DEFAULT_VALUE: right.node,\n PARAMETER_NAME: t.cloneNode(paramName),\n UNDEFINED: undefinedNode,\n }),\n );\n param.replaceWith(paramName);\n }\n } else if (paramIsAssignmentPattern) {\n if (firstOptionalIndex === null) firstOptionalIndex = i;\n\n const left = param.get(\"left\");\n const right = param.get(\"right\");\n\n const defNode = buildDefaultParam({\n VARIABLE_NAME: left.node,\n DEFAULT_VALUE: right.node,\n ARGUMENT_KEY: t.numericLiteral(i),\n });\n body.push(defNode);\n } else if (firstOptionalIndex !== null) {\n const defNode = buildSafeArgumentsAccess([\n param.node,\n t.numericLiteral(i),\n ]);\n body.push(defNode);\n } else if (param.isObjectPattern() || param.isArrayPattern()) {\n const uid = path.scope.generateUidIdentifier(\"ref\");\n uid.typeAnnotation = param.node.typeAnnotation;\n\n const defNode = t.variableDeclaration(\"let\", [\n t.variableDeclarator(param.node, uid),\n ]);\n body.push(defNode);\n\n param.replaceWith(t.cloneNode(uid));\n }\n\n if (transformedRestNodes) {\n for (const transformedNode of transformedRestNodes) {\n body.push(transformedNode);\n }\n }\n }\n\n // we need to cut off all trailing parameters\n if (firstOptionalIndex !== null) {\n node.params = node.params.slice(0, firstOptionalIndex);\n }\n\n // ensure it's a block, useful for arrow functions\n path.ensureBlock();\n const path2 = path as NodePath;\n\n const { async, generator } = node;\n if (generator || state.needsOuterBinding || shadowedParams.size > 0) {\n body.push(buildScopeIIFE(shadowedParams, path2.node.body));\n\n path.set(\"body\", t.blockStatement(body as t.Statement[]));\n\n // We inject an arrow and then transform it to a normal function, to be\n // sure that we correctly handle this and arguments.\n const bodyPath = path2.get(\"body.body\");\n const arrowPath = bodyPath[bodyPath.length - 1].get(\n \"argument.callee\",\n ) as NodePath;\n\n // This is an IIFE, so we don't need to worry about the noNewArrows assumption\n arrowPath.arrowFunctionToExpression();\n\n arrowPath.node.generator = generator;\n arrowPath.node.async = async;\n\n node.generator = false;\n node.async = false;\n if (async) {\n // If the default value of a parameter throws, it must reject asynchronously.\n path2.node.body = template.statement.ast`{\n try {\n ${path2.node.body.body}\n } catch (e) {\n return Promise.reject(e);\n }\n }` as t.BlockStatement;\n }\n } else {\n path2.get(\"body\").unshiftContainer(\"body\", body);\n }\n\n return true;\n}\n","import { template, types as t } from \"@babel/core\";\nimport type { NodePath, Visitor } from \"@babel/core\";\n\nimport {\n iifeVisitor,\n collectShadowedParamsNames,\n buildScopeIIFE,\n} from \"./shadow-utils.ts\";\n\nconst buildRest = template.statement(`\n for (var LEN = ARGUMENTS.length,\n ARRAY = new Array(ARRAY_LEN),\n KEY = START;\n KEY < LEN;\n KEY++) {\n ARRAY[ARRAY_KEY] = ARGUMENTS[KEY];\n }\n`);\n\nconst restIndex = template.expression(`\n (INDEX < OFFSET || ARGUMENTS.length <= INDEX) ? undefined : ARGUMENTS[INDEX]\n`);\n\nconst restIndexImpure = template.expression(`\n REF = INDEX, (REF < OFFSET || ARGUMENTS.length <= REF) ? undefined : ARGUMENTS[REF]\n`);\n\nconst restLength = template.expression(`\n ARGUMENTS.length <= OFFSET ? 0 : ARGUMENTS.length - OFFSET\n`);\n\nfunction referencesRest(\n path: NodePath,\n state: State,\n) {\n if (path.node.name === state.name) {\n // Check rest parameter is not shadowed by a binding in another scope.\n return path.scope.bindingIdentifierEquals(state.name, state.outerBinding);\n }\n\n return false;\n}\n\ntype Candidate = {\n cause: \"argSpread\" | \"indexGetter\" | \"lengthGetter\";\n path: NodePath;\n};\n\ntype State = {\n references: NodePath[];\n offset: number;\n\n argumentsNode: t.Identifier;\n outerBinding: t.Identifier;\n\n // candidate member expressions we could optimise if there are no other references\n candidates: Candidate[];\n\n // local rest binding name\n name: string;\n\n /*\n It may be possible to optimize the output code in certain ways, such as\n not generating code to initialize an array (perhaps substituting direct\n references to arguments[i] or arguments.length for reads of the\n corresponding rest parameter property) or positioning the initialization\n code so that it may not have to execute depending on runtime conditions.\n\n This property tracks eligibility for optimization. \"deopted\" means give up\n and don't perform optimization. For example, when any of rest's elements /\n properties is assigned to at the top level, or referenced at all in a\n nested function.\n */\n deopted: boolean;\n noOptimise?: boolean;\n};\n\nconst memberExpressionOptimisationVisitor: Visitor = {\n Scope(path, state) {\n // check if this scope has a local binding that will shadow the rest parameter\n if (!path.scope.bindingIdentifierEquals(state.name, state.outerBinding)) {\n path.skip();\n }\n },\n\n Flow(path: NodePath) {\n // Do not skip TypeCastExpressions as the contain valid non flow code\n if (path.isTypeCastExpression()) return;\n // don't touch reference in type annotations\n path.skip();\n },\n\n Function(path, state) {\n // Detect whether any reference to rest is contained in nested functions to\n // determine if deopt is necessary.\n const oldNoOptimise = state.noOptimise;\n state.noOptimise = true;\n path.traverse(memberExpressionOptimisationVisitor, state);\n state.noOptimise = oldNoOptimise;\n\n // Skip because optimizing references to rest would refer to the `arguments`\n // of the nested function.\n path.skip();\n },\n\n ReferencedIdentifier(path, state) {\n const { node } = path;\n\n // we can't guarantee the purity of arguments\n if (node.name === \"arguments\") {\n state.deopted = true;\n }\n\n // is this a referenced identifier and is it referencing the rest parameter?\n if (!referencesRest(path, state)) return;\n\n if (state.noOptimise) {\n state.deopted = true;\n } else {\n const { parentPath } = path;\n\n // Is this identifier the right hand side of a default parameter?\n if (\n parentPath.listKey === \"params\" &&\n (parentPath.key as number) < state.offset\n ) {\n return;\n }\n\n // ex: `args[0]`\n // ex: `args.whatever`\n if (parentPath.isMemberExpression({ object: node })) {\n const grandparentPath = parentPath.parentPath;\n\n const argsOptEligible =\n !state.deopted &&\n !(\n // ex: `args[0] = \"whatever\"`\n (\n (grandparentPath.isAssignmentExpression() &&\n parentPath.node === grandparentPath.node.left) ||\n // ex: `[args[0]] = [\"whatever\"]`\n grandparentPath.isLVal() ||\n // ex: `for (rest[0] in this)`\n // ex: `for (rest[0] of this)`\n grandparentPath.isForXStatement() ||\n // ex: `++args[0]`\n // ex: `args[0]--`\n grandparentPath.isUpdateExpression() ||\n // ex: `delete args[0]`\n grandparentPath.isUnaryExpression({ operator: \"delete\" }) ||\n // ex: `args[0]()`\n // ex: `new args[0]()`\n // ex: `new args[0]`\n ((grandparentPath.isCallExpression() ||\n grandparentPath.isNewExpression()) &&\n parentPath.node === grandparentPath.node.callee)\n )\n );\n\n if (argsOptEligible) {\n if (parentPath.node.computed) {\n // if we know that this member expression is referencing a number then\n // we can safely optimise it\n if (parentPath.get(\"property\").isBaseType(\"number\")) {\n state.candidates.push({ cause: \"indexGetter\", path });\n return;\n }\n } else if (\n // @ts-expect-error .length must not be a private name\n parentPath.node.property.name === \"length\"\n ) {\n // args.length\n state.candidates.push({ cause: \"lengthGetter\", path });\n return;\n }\n }\n }\n\n // we can only do these optimizations if the rest variable would match\n // the arguments exactly\n // optimise single spread args in calls\n // ex: fn(...args)\n if (state.offset === 0 && parentPath.isSpreadElement()) {\n const call = parentPath.parentPath;\n if (call.isCallExpression() && call.node.arguments.length === 1) {\n state.candidates.push({ cause: \"argSpread\", path });\n return;\n }\n }\n\n state.references.push(path);\n }\n },\n\n /**\n * Deopt on use of a binding identifier with the same name as our rest param.\n *\n * See https://github.com/babel/babel/issues/2091\n */\n\n BindingIdentifier(path, state) {\n if (referencesRest(path, state)) {\n state.deopted = true;\n }\n },\n};\n\nfunction getParamsCount(node: t.Function) {\n let count = node.params.length;\n // skip the first parameter if it is a TypeScript 'this parameter'\n if (count > 0 && t.isIdentifier(node.params[0], { name: \"this\" })) {\n count -= 1;\n }\n return count;\n}\n\nfunction hasRest(node: t.Function) {\n const length = node.params.length;\n return length > 0 && t.isRestElement(node.params[length - 1]);\n}\n\nfunction optimiseIndexGetter(\n path: NodePath,\n argsId: t.Identifier,\n offset: number,\n) {\n const offsetLiteral = t.numericLiteral(offset);\n let index;\n const parent = path.parent as t.MemberExpression;\n\n if (t.isNumericLiteral(parent.property)) {\n index = t.numericLiteral(parent.property.value + offset);\n } else if (offset === 0) {\n // Avoid unnecessary '+ 0'\n index = parent.property;\n } else {\n index = t.binaryExpression(\n \"+\",\n parent.property,\n t.cloneNode(offsetLiteral),\n );\n }\n\n const { scope, parentPath } = path;\n if (!scope.isPure(index)) {\n const temp = scope.generateUidIdentifierBasedOnNode(index);\n scope.push({ id: temp, kind: \"var\" });\n parentPath.replaceWith(\n restIndexImpure({\n ARGUMENTS: argsId,\n OFFSET: offsetLiteral,\n INDEX: index,\n REF: t.cloneNode(temp),\n }),\n );\n } else {\n parentPath.replaceWith(\n restIndex({\n ARGUMENTS: argsId,\n OFFSET: offsetLiteral,\n INDEX: index,\n }),\n );\n const replacedParentPath = parentPath as NodePath;\n\n // See if we can statically evaluate the first test (i.e. index < offset)\n // and optimize the AST accordingly.\n const offsetTestPath = replacedParentPath.get(\n \"test\",\n ) as NodePath;\n const valRes = offsetTestPath.get(\"left\").evaluate();\n if (valRes.confident) {\n if (valRes.value === true) {\n replacedParentPath.replaceWith(scope.buildUndefinedNode());\n } else {\n offsetTestPath.replaceWith(offsetTestPath.get(\"right\"));\n }\n }\n }\n}\n\nfunction optimiseLengthGetter(\n path: NodePath,\n argsId: t.Identifier,\n offset: number,\n) {\n if (offset) {\n path.parentPath.replaceWith(\n restLength({\n ARGUMENTS: argsId,\n OFFSET: t.numericLiteral(offset),\n }),\n );\n } else {\n path.replaceWith(argsId);\n }\n}\n\nexport default function convertFunctionRest(path: NodePath) {\n const { node, scope } = path;\n if (!hasRest(node)) return false;\n\n const restPath = path.get(\n `params.${node.params.length - 1}.argument`,\n ) as NodePath;\n\n if (!restPath.isIdentifier()) {\n const shadowedParams = new Set();\n collectShadowedParamsNames(restPath, path.scope, shadowedParams);\n\n let needsIIFE = shadowedParams.size > 0;\n if (!needsIIFE) {\n const state = {\n needsOuterBinding: false,\n scope,\n };\n restPath.traverse(iifeVisitor, state);\n needsIIFE = state.needsOuterBinding;\n }\n\n if (needsIIFE) {\n path.ensureBlock();\n path.set(\n \"body\",\n t.blockStatement([\n buildScopeIIFE(shadowedParams, path.node.body as t.BlockStatement),\n ]),\n );\n }\n }\n\n let rest = restPath.node;\n node.params.pop(); // This returns 'rest'\n\n if (t.isPattern(rest)) {\n const pattern = rest;\n rest = scope.generateUidIdentifier(\"ref\");\n\n const declar = t.variableDeclaration(\"let\", [\n t.variableDeclarator(pattern, rest),\n ]);\n path.ensureBlock();\n (node.body as t.BlockStatement).body.unshift(declar);\n } else if (rest.name === \"arguments\") {\n scope.rename(rest.name);\n }\n\n const argsId = t.identifier(\"arguments\");\n const paramsCount = getParamsCount(node);\n\n // check and optimise for extremely common cases\n const state: State = {\n references: [],\n offset: paramsCount,\n argumentsNode: argsId,\n outerBinding: scope.getBindingIdentifier(rest.name),\n candidates: [],\n name: rest.name,\n deopted: false,\n };\n\n path.traverse(memberExpressionOptimisationVisitor, state);\n\n // There are only \"shorthand\" references\n if (!state.deopted && !state.references.length) {\n for (const { path, cause } of state.candidates) {\n const clonedArgsId = t.cloneNode(argsId);\n switch (cause) {\n case \"indexGetter\":\n optimiseIndexGetter(path, clonedArgsId, state.offset);\n break;\n case \"lengthGetter\":\n optimiseLengthGetter(path, clonedArgsId, state.offset);\n break;\n default:\n path.replaceWith(clonedArgsId);\n }\n }\n return true;\n }\n\n state.references.push(...state.candidates.map(({ path }) => path));\n\n const start = t.numericLiteral(paramsCount);\n const key = scope.generateUidIdentifier(\"key\");\n const len = scope.generateUidIdentifier(\"len\");\n\n let arrKey, arrLen;\n if (paramsCount) {\n // this method has additional params, so we need to subtract\n // the index of the current argument position from the\n // position in the array that we want to populate\n arrKey = t.binaryExpression(\"-\", t.cloneNode(key), t.cloneNode(start));\n\n // we need to work out the size of the array that we're\n // going to store all the rest parameters\n //\n // we need to add a check to avoid constructing the array\n // with <0 if there are less arguments than params as it'll\n // cause an error\n arrLen = t.conditionalExpression(\n t.binaryExpression(\">\", t.cloneNode(len), t.cloneNode(start)),\n t.binaryExpression(\"-\", t.cloneNode(len), t.cloneNode(start)),\n t.numericLiteral(0),\n );\n } else {\n arrKey = t.identifier(key.name);\n arrLen = t.identifier(len.name);\n }\n\n const loop = buildRest({\n ARGUMENTS: argsId,\n ARRAY_KEY: arrKey,\n ARRAY_LEN: arrLen,\n START: start,\n ARRAY: rest,\n KEY: key,\n LEN: len,\n });\n\n if (state.deopted) {\n (node.body as t.BlockStatement).body.unshift(loop);\n } else {\n let target = path\n .getEarliestCommonAncestorFrom(state.references)\n .getStatementParent();\n\n // don't perform the allocation inside a loop\n target.findParent(path => {\n if (path.isLoop()) {\n target = path;\n } else {\n // Stop crawling up if this is a function.\n return path.isFunction();\n }\n });\n\n target.insertBefore(loop);\n }\n\n return true;\n}\n","import { declare } from \"@babel/helper-plugin-utils\";\nimport convertFunctionParams from \"./params.ts\";\nimport convertFunctionRest from \"./rest.ts\";\nexport { convertFunctionParams };\n\nexport interface Options {\n loose?: boolean;\n}\n\nexport default declare((api, options: Options) => {\n api.assertVersion(REQUIRED_VERSION(7));\n\n const ignoreFunctionLength =\n api.assumption(\"ignoreFunctionLength\") ?? options.loose;\n // Todo(BABEL 8): Consider default it to false\n const noNewArrows = api.assumption(\"noNewArrows\") ?? true;\n\n return {\n name: \"transform-parameters\",\n\n visitor: {\n Function(path) {\n if (\n path.isArrowFunctionExpression() &&\n path\n .get(\"params\")\n .some(param => param.isRestElement() || param.isAssignmentPattern())\n ) {\n // default/rest visitors require access to `arguments`, so it cannot be an arrow\n path.arrowFunctionToExpression({\n allowInsertArrowWithRest: false,\n noNewArrows,\n });\n\n // In some cases arrowFunctionToExpression replaces the function with a wrapper.\n // Return early; the wrapped function will be visited later in the AST traversal.\n if (!path.isFunctionExpression()) return;\n }\n\n const convertedRest = convertFunctionRest(path);\n const convertedParams = convertFunctionParams(\n path,\n ignoreFunctionLength,\n );\n\n if (convertedRest || convertedParams) {\n // Manually reprocess this scope to ensure that the moved params are updated.\n path.scope.crawl();\n }\n },\n },\n };\n});\n","import { declare } from \"@babel/helper-plugin-utils\";\nimport syntaxDestructuringPrivate from \"@babel/plugin-syntax-destructuring-private\";\nimport {\n hasPrivateKeys,\n hasPrivateClassElement,\n transformPrivateKeyDestructuring,\n buildVariableDeclarationFromParams,\n} from \"./util.ts\";\nimport { convertFunctionParams } from \"@babel/plugin-transform-parameters\";\nimport { unshiftForXStatementBody } from \"@babel/plugin-transform-destructuring\";\n\nimport type { PluginPass, NodePath, Visitor, types as t } from \"@babel/core\";\n\nexport default declare(function ({ assertVersion, assumption, types: t }) {\n assertVersion(REQUIRED_VERSION(\"^7.17.0\"));\n const {\n assignmentExpression,\n assignmentPattern,\n cloneNode,\n expressionStatement,\n isExpressionStatement,\n isIdentifier,\n isSequenceExpression,\n sequenceExpression,\n variableDeclaration,\n variableDeclarator,\n } = t;\n\n const ignoreFunctionLength = assumption(\"ignoreFunctionLength\");\n const objectRestNoSymbols = assumption(\"objectRestNoSymbols\");\n\n const privateKeyDestructuringVisitor: Visitor = {\n Function(path) {\n // (b, { #x: x } = I) => body\n // transforms to:\n // (b, p1) => { var { #x: x } = p1 === undefined ? I : p1; body; }\n const firstPrivateIndex = path.node.params.findIndex(param =>\n hasPrivateKeys(param),\n );\n if (firstPrivateIndex === -1) return;\n // wrap function body within IIFE if any param is shadowed\n convertFunctionParams(path, ignoreFunctionLength, () => false);\n // invariant: path.body is always a BlockStatement after `convertFunctionParams`\n const { node, scope } = path;\n const { params } = node;\n const firstAssignmentPatternIndex = ignoreFunctionLength\n ? -1\n : params.findIndex(param => param.type === \"AssignmentPattern\");\n const paramsAfterIndex = params.splice(firstPrivateIndex);\n const { params: transformedParams, variableDeclaration } =\n buildVariableDeclarationFromParams(paramsAfterIndex, scope);\n\n (path.get(\"body\") as NodePath).unshiftContainer(\n \"body\",\n variableDeclaration,\n );\n params.push(...transformedParams);\n // preserve function.length\n // (b, p1) => {}\n // transforms to\n // (b, p1 = void 0) => {}\n if (firstAssignmentPatternIndex >= firstPrivateIndex) {\n params[firstAssignmentPatternIndex] = assignmentPattern(\n // @ts-expect-error The transformed assignment pattern must not be a RestElement\n params[firstAssignmentPatternIndex],\n scope.buildUndefinedNode(),\n );\n }\n scope.crawl();\n // the pattern will be handled by VariableDeclaration visitor.\n },\n CatchClause(path) {\n // catch({ #x: x }) { body }\n // transforms to:\n // catch(_e) { var {#x: x } = _e; body }\n const { node, scope } = path;\n if (!hasPrivateKeys(node.param)) return;\n // todo: handle shadowed param as we did in convertFunctionParams\n const ref = scope.generateUidIdentifier(\"e\");\n path\n .get(\"body\")\n .unshiftContainer(\n \"body\",\n variableDeclaration(\"let\", [variableDeclarator(node.param, ref)]),\n );\n node.param = cloneNode(ref);\n scope.crawl();\n // the pattern will be handled by VariableDeclaration visitor.\n },\n ForXStatement(path) {\n const { node, scope } = path;\n const leftPath = path.get(\"left\");\n if (leftPath.isVariableDeclaration()) {\n const left = leftPath.node;\n if (!hasPrivateKeys(left.declarations[0].id)) return;\n // for (const { #x: x } of cls) body;\n // transforms to:\n // for (const ref of cls) { const { #x: x } = ref; body; }\n // todo: the transform here assumes that any expression within\n // the destructuring pattern (`{ #x: x }`), when evaluated, do not interfere\n // with the iterator of cls. Otherwise we have to pause the iterator and\n // interleave the expressions.\n // See also https://gist.github.com/nicolo-ribaudo/f8ac7916f89450f2ead77d99855b2098\n const temp = scope.generateUidIdentifier(\"ref\");\n node.left = variableDeclaration(left.kind, [\n variableDeclarator(temp, null),\n ]);\n left.declarations[0].init = cloneNode(temp);\n unshiftForXStatementBody(path, [left]);\n scope.crawl();\n // the pattern will be handled by VariableDeclaration visitor.\n } else if (leftPath.isPattern()) {\n if (!hasPrivateKeys(leftPath.node)) return;\n // for ({ #x: x } of cls);\n // transforms to:\n // for (const ref of cls) { ({ #x: x } = ref); body; }\n // This transform assumes that any expression within the pattern\n // does not interfere with the iterable `cls`.\n const temp = scope.generateUidIdentifier(\"ref\");\n node.left = variableDeclaration(\"const\", [\n variableDeclarator(temp, null),\n ]);\n const assignExpr = expressionStatement(\n assignmentExpression(\"=\", leftPath.node, cloneNode(temp)),\n );\n unshiftForXStatementBody(path, [assignExpr]);\n scope.crawl();\n }\n },\n VariableDeclaration(path, state) {\n const { scope, node } = path;\n const { declarations } = node;\n if (!declarations.some(declarator => hasPrivateKeys(declarator.id))) {\n return;\n }\n const newDeclarations = [];\n for (const declarator of declarations) {\n for (const { left, right } of transformPrivateKeyDestructuring(\n // @ts-expect-error The id of a variable declarator must not be a RestElement\n declarator.id,\n declarator.init,\n scope,\n /* isAssignment */ false,\n /* shouldPreserveCompletion */ false,\n name => state.addHelper(name),\n objectRestNoSymbols,\n /* useBuiltIns */ true,\n )) {\n newDeclarations.push(variableDeclarator(left, right));\n }\n }\n node.declarations = newDeclarations;\n scope.crawl();\n },\n\n AssignmentExpression(path, state) {\n const { node, scope, parent } = path;\n if (!hasPrivateKeys(node.left)) return;\n const assignments = [];\n const shouldPreserveCompletion =\n (!isExpressionStatement(parent) && !isSequenceExpression(parent)) ||\n path.isCompletionRecord();\n for (const { left, right } of transformPrivateKeyDestructuring(\n // @ts-expect-error The left of an assignment expression must not be a RestElement\n node.left,\n node.right,\n scope,\n /* isAssignment */ true,\n shouldPreserveCompletion,\n name => state.addHelper(name),\n objectRestNoSymbols,\n /* useBuiltIns */ true,\n )) {\n assignments.push(assignmentExpression(\"=\", left, right));\n }\n // preserve completion record\n if (shouldPreserveCompletion) {\n const { left, right } = assignments[0];\n // If node.right is right and left is an identifier, then the left is an effectively-constant memoised id\n if (isIdentifier(left) && right === node.right) {\n if (\n !isIdentifier(assignments[assignments.length - 1].right, {\n name: left.name,\n })\n ) {\n // If the last assignment does not end with left, then we push `left` as the completion value\n assignments.push(cloneNode(left));\n }\n // do nothing as `left` is already at the end of assignments\n } else {\n const tempId = scope.generateDeclaredUidIdentifier(\"m\");\n assignments.unshift(\n assignmentExpression(\"=\", tempId, cloneNode(node.right)),\n );\n assignments.push(cloneNode(tempId));\n }\n }\n\n path.replaceWith(sequenceExpression(assignments));\n scope.crawl();\n },\n };\n\n const visitor: Visitor = {\n Class(path, state) {\n if (!hasPrivateClassElement(path.node.body)) return;\n path.traverse(privateKeyDestructuringVisitor, state);\n },\n };\n\n return {\n name: \"proposal-destructuring-private\",\n inherits: syntaxDestructuringPrivate,\n visitor: visitor,\n };\n});\n","import { declare } from \"@babel/helper-plugin-utils\";\nimport syntaxDoExpressions from \"@babel/plugin-syntax-do-expressions\";\n\nexport default declare(api => {\n api.assertVersion(REQUIRED_VERSION(7));\n\n return {\n name: \"proposal-do-expressions\",\n inherits: syntaxDoExpressions,\n\n visitor: {\n DoExpression: {\n exit(path) {\n const { node } = path;\n if (node.async) {\n // Async do expressions are not yet supported\n return;\n }\n const body = node.body.body;\n if (body.length) {\n path.replaceExpressionWithStatements(body);\n } else {\n path.replaceWith(path.scope.buildUndefinedNode());\n }\n },\n },\n },\n };\n});\n","/*! https://mths.be/regenerate v1.4.2 by @mathias | MIT license */\n;(function(root) {\n\n\t// Detect free variables `exports`.\n\tvar freeExports = typeof exports == 'object' && exports;\n\n\t// Detect free variable `module`.\n\tvar freeModule = typeof module == 'object' && module &&\n\t\tmodule.exports == freeExports && module;\n\n\t// Detect free variable `global`, from Node.js/io.js or Browserified code,\n\t// and use it as `root`.\n\tvar freeGlobal = typeof global == 'object' && global;\n\tif (freeGlobal.global === freeGlobal || freeGlobal.window === freeGlobal) {\n\t\troot = freeGlobal;\n\t}\n\n\t/*--------------------------------------------------------------------------*/\n\n\tvar ERRORS = {\n\t\t'rangeOrder': 'A range\\u2019s `stop` value must be greater than or equal ' +\n\t\t\t'to the `start` value.',\n\t\t'codePointRange': 'Invalid code point value. Code points range from ' +\n\t\t\t'U+000000 to U+10FFFF.'\n\t};\n\n\t// https://mathiasbynens.be/notes/javascript-encoding#surrogate-pairs\n\tvar HIGH_SURROGATE_MIN = 0xD800;\n\tvar HIGH_SURROGATE_MAX = 0xDBFF;\n\tvar LOW_SURROGATE_MIN = 0xDC00;\n\tvar LOW_SURROGATE_MAX = 0xDFFF;\n\n\t// In Regenerate output, `\\0` is never preceded by `\\` because we sort by\n\t// code point value, so let’s keep this regular expression simple.\n\tvar regexNull = /\\\\x00([^0123456789]|$)/g;\n\n\tvar object = {};\n\tvar hasOwnProperty = object.hasOwnProperty;\n\tvar extend = function(destination, source) {\n\t\tvar key;\n\t\tfor (key in source) {\n\t\t\tif (hasOwnProperty.call(source, key)) {\n\t\t\t\tdestination[key] = source[key];\n\t\t\t}\n\t\t}\n\t\treturn destination;\n\t};\n\n\tvar forEach = function(array, callback) {\n\t\tvar index = -1;\n\t\tvar length = array.length;\n\t\twhile (++index < length) {\n\t\t\tcallback(array[index], index);\n\t\t}\n\t};\n\n\tvar toString = object.toString;\n\tvar isArray = function(value) {\n\t\treturn toString.call(value) == '[object Array]';\n\t};\n\tvar isNumber = function(value) {\n\t\treturn typeof value == 'number' ||\n\t\t\ttoString.call(value) == '[object Number]';\n\t};\n\n\t// This assumes that `number` is a positive integer that `toString()`s nicely\n\t// (which is the case for all code point values).\n\tvar zeroes = '0000';\n\tvar pad = function(number, totalCharacters) {\n\t\tvar string = String(number);\n\t\treturn string.length < totalCharacters\n\t\t\t? (zeroes + string).slice(-totalCharacters)\n\t\t\t: string;\n\t};\n\n\tvar hex = function(number) {\n\t\treturn Number(number).toString(16).toUpperCase();\n\t};\n\n\tvar slice = [].slice;\n\n\t/*--------------------------------------------------------------------------*/\n\n\tvar dataFromCodePoints = function(codePoints) {\n\t\tvar index = -1;\n\t\tvar length = codePoints.length;\n\t\tvar max = length - 1;\n\t\tvar result = [];\n\t\tvar isStart = true;\n\t\tvar tmp;\n\t\tvar previous = 0;\n\t\twhile (++index < length) {\n\t\t\ttmp = codePoints[index];\n\t\t\tif (isStart) {\n\t\t\t\tresult.push(tmp);\n\t\t\t\tprevious = tmp;\n\t\t\t\tisStart = false;\n\t\t\t} else {\n\t\t\t\tif (tmp == previous + 1) {\n\t\t\t\t\tif (index != max) {\n\t\t\t\t\t\tprevious = tmp;\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tisStart = true;\n\t\t\t\t\t\tresult.push(tmp + 1);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t// End the previous range and start a new one.\n\t\t\t\t\tresult.push(previous + 1, tmp);\n\t\t\t\t\tprevious = tmp;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (!isStart) {\n\t\t\tresult.push(tmp + 1);\n\t\t}\n\t\treturn result;\n\t};\n\n\tvar dataRemove = function(data, codePoint) {\n\t\t// Iterate over the data per `(start, end)` pair.\n\t\tvar index = 0;\n\t\tvar start;\n\t\tvar end;\n\t\tvar length = data.length;\n\t\twhile (index < length) {\n\t\t\tstart = data[index];\n\t\t\tend = data[index + 1];\n\t\t\tif (codePoint >= start && codePoint < end) {\n\t\t\t\t// Modify this pair.\n\t\t\t\tif (codePoint == start) {\n\t\t\t\t\tif (end == start + 1) {\n\t\t\t\t\t\t// Just remove `start` and `end`.\n\t\t\t\t\t\tdata.splice(index, 2);\n\t\t\t\t\t\treturn data;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// Just replace `start` with a new value.\n\t\t\t\t\t\tdata[index] = codePoint + 1;\n\t\t\t\t\t\treturn data;\n\t\t\t\t\t}\n\t\t\t\t} else if (codePoint == end - 1) {\n\t\t\t\t\t// Just replace `end` with a new value.\n\t\t\t\t\tdata[index + 1] = codePoint;\n\t\t\t\t\treturn data;\n\t\t\t\t} else {\n\t\t\t\t\t// Replace `[start, end]` with `[startA, endA, startB, endB]`.\n\t\t\t\t\tdata.splice(index, 2, start, codePoint, codePoint + 1, end);\n\t\t\t\t\treturn data;\n\t\t\t\t}\n\t\t\t}\n\t\t\tindex += 2;\n\t\t}\n\t\treturn data;\n\t};\n\n\tvar dataRemoveRange = function(data, rangeStart, rangeEnd) {\n\t\tif (rangeEnd < rangeStart) {\n\t\t\tthrow Error(ERRORS.rangeOrder);\n\t\t}\n\t\t// Iterate over the data per `(start, end)` pair.\n\t\tvar index = 0;\n\t\tvar start;\n\t\tvar end;\n\t\twhile (index < data.length) {\n\t\t\tstart = data[index];\n\t\t\tend = data[index + 1] - 1; // Note: the `- 1` makes `end` inclusive.\n\n\t\t\t// Exit as soon as no more matching pairs can be found.\n\t\t\tif (start > rangeEnd) {\n\t\t\t\treturn data;\n\t\t\t}\n\n\t\t\t// Check if this range pair is equal to, or forms a subset of, the range\n\t\t\t// to be removed.\n\t\t\t// E.g. we have `[0, 11, 40, 51]` and want to remove 0-10 → `[40, 51]`.\n\t\t\t// E.g. we have `[40, 51]` and want to remove 0-100 → `[]`.\n\t\t\tif (rangeStart <= start && rangeEnd >= end) {\n\t\t\t\t// Remove this pair.\n\t\t\t\tdata.splice(index, 2);\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// Check if both `rangeStart` and `rangeEnd` are within the bounds of\n\t\t\t// this pair.\n\t\t\t// E.g. we have `[0, 11]` and want to remove 4-6 → `[0, 4, 7, 11]`.\n\t\t\tif (rangeStart >= start && rangeEnd < end) {\n\t\t\t\tif (rangeStart == start) {\n\t\t\t\t\t// Replace `[start, end]` with `[startB, endB]`.\n\t\t\t\t\tdata[index] = rangeEnd + 1;\n\t\t\t\t\tdata[index + 1] = end + 1;\n\t\t\t\t\treturn data;\n\t\t\t\t}\n\t\t\t\t// Replace `[start, end]` with `[startA, endA, startB, endB]`.\n\t\t\t\tdata.splice(index, 2, start, rangeStart, rangeEnd + 1, end + 1);\n\t\t\t\treturn data;\n\t\t\t}\n\n\t\t\t// Check if only `rangeStart` is within the bounds of this pair.\n\t\t\t// E.g. we have `[0, 11]` and want to remove 4-20 → `[0, 4]`.\n\t\t\tif (rangeStart >= start && rangeStart <= end) {\n\t\t\t\t// Replace `end` with `rangeStart`.\n\t\t\t\tdata[index + 1] = rangeStart;\n\t\t\t\t// Note: we cannot `return` just yet, in case any following pairs still\n\t\t\t\t// contain matching code points.\n\t\t\t\t// E.g. we have `[0, 11, 14, 31]` and want to remove 4-20\n\t\t\t\t// → `[0, 4, 21, 31]`.\n\t\t\t}\n\n\t\t\t// Check if only `rangeEnd` is within the bounds of this pair.\n\t\t\t// E.g. we have `[14, 31]` and want to remove 4-20 → `[21, 31]`.\n\t\t\telse if (rangeEnd >= start && rangeEnd <= end) {\n\t\t\t\t// Just replace `start`.\n\t\t\t\tdata[index] = rangeEnd + 1;\n\t\t\t\treturn data;\n\t\t\t}\n\n\t\t\tindex += 2;\n\t\t}\n\t\treturn data;\n\t};\n\n\t var dataAdd = function(data, codePoint) {\n\t\t// Iterate over the data per `(start, end)` pair.\n\t\tvar index = 0;\n\t\tvar start;\n\t\tvar end;\n\t\tvar lastIndex = null;\n\t\tvar length = data.length;\n\t\tif (codePoint < 0x0 || codePoint > 0x10FFFF) {\n\t\t\tthrow RangeError(ERRORS.codePointRange);\n\t\t}\n\t\twhile (index < length) {\n\t\t\tstart = data[index];\n\t\t\tend = data[index + 1];\n\n\t\t\t// Check if the code point is already in the set.\n\t\t\tif (codePoint >= start && codePoint < end) {\n\t\t\t\treturn data;\n\t\t\t}\n\n\t\t\tif (codePoint == start - 1) {\n\t\t\t\t// Just replace `start` with a new value.\n\t\t\t\tdata[index] = codePoint;\n\t\t\t\treturn data;\n\t\t\t}\n\n\t\t\t// At this point, if `start` is `greater` than `codePoint`, insert a new\n\t\t\t// `[start, end]` pair before the current pair, or after the current pair\n\t\t\t// if there is a known `lastIndex`.\n\t\t\tif (start > codePoint) {\n\t\t\t\tdata.splice(\n\t\t\t\t\tlastIndex != null ? lastIndex + 2 : 0,\n\t\t\t\t\t0,\n\t\t\t\t\tcodePoint,\n\t\t\t\t\tcodePoint + 1\n\t\t\t\t);\n\t\t\t\treturn data;\n\t\t\t}\n\n\t\t\tif (codePoint == end) {\n\t\t\t\t// Check if adding this code point causes two separate ranges to become\n\t\t\t\t// a single range, e.g. `dataAdd([0, 4, 5, 10], 4)` → `[0, 10]`.\n\t\t\t\tif (codePoint + 1 == data[index + 2]) {\n\t\t\t\t\tdata.splice(index, 4, start, data[index + 3]);\n\t\t\t\t\treturn data;\n\t\t\t\t}\n\t\t\t\t// Else, just replace `end` with a new value.\n\t\t\t\tdata[index + 1] = codePoint + 1;\n\t\t\t\treturn data;\n\t\t\t}\n\t\t\tlastIndex = index;\n\t\t\tindex += 2;\n\t\t}\n\t\t// The loop has finished; add the new pair to the end of the data set.\n\t\tdata.push(codePoint, codePoint + 1);\n\t\treturn data;\n\t};\n\n\tvar dataAddData = function(dataA, dataB) {\n\t\t// Iterate over the data per `(start, end)` pair.\n\t\tvar index = 0;\n\t\tvar start;\n\t\tvar end;\n\t\tvar data = dataA.slice();\n\t\tvar length = dataB.length;\n\t\twhile (index < length) {\n\t\t\tstart = dataB[index];\n\t\t\tend = dataB[index + 1] - 1;\n\t\t\tif (start == end) {\n\t\t\t\tdata = dataAdd(data, start);\n\t\t\t} else {\n\t\t\t\tdata = dataAddRange(data, start, end);\n\t\t\t}\n\t\t\tindex += 2;\n\t\t}\n\t\treturn data;\n\t};\n\n\tvar dataRemoveData = function(dataA, dataB) {\n\t\t// Iterate over the data per `(start, end)` pair.\n\t\tvar index = 0;\n\t\tvar start;\n\t\tvar end;\n\t\tvar data = dataA.slice();\n\t\tvar length = dataB.length;\n\t\twhile (index < length) {\n\t\t\tstart = dataB[index];\n\t\t\tend = dataB[index + 1] - 1;\n\t\t\tif (start == end) {\n\t\t\t\tdata = dataRemove(data, start);\n\t\t\t} else {\n\t\t\t\tdata = dataRemoveRange(data, start, end);\n\t\t\t}\n\t\t\tindex += 2;\n\t\t}\n\t\treturn data;\n\t};\n\n\tvar dataAddRange = function(data, rangeStart, rangeEnd) {\n\t\tif (rangeEnd < rangeStart) {\n\t\t\tthrow Error(ERRORS.rangeOrder);\n\t\t}\n\t\tif (\n\t\t\trangeStart < 0x0 || rangeStart > 0x10FFFF ||\n\t\t\trangeEnd < 0x0 || rangeEnd > 0x10FFFF\n\t\t) {\n\t\t\tthrow RangeError(ERRORS.codePointRange);\n\t\t}\n\t\t// Iterate over the data per `(start, end)` pair.\n\t\tvar index = 0;\n\t\tvar start;\n\t\tvar end;\n\t\tvar added = false;\n\t\tvar length = data.length;\n\t\twhile (index < length) {\n\t\t\tstart = data[index];\n\t\t\tend = data[index + 1];\n\n\t\t\tif (added) {\n\t\t\t\t// The range has already been added to the set; at this point, we just\n\t\t\t\t// need to get rid of the following ranges in case they overlap.\n\n\t\t\t\t// Check if this range can be combined with the previous range.\n\t\t\t\tif (start == rangeEnd + 1) {\n\t\t\t\t\tdata.splice(index - 1, 2);\n\t\t\t\t\treturn data;\n\t\t\t\t}\n\n\t\t\t\t// Exit as soon as no more possibly overlapping pairs can be found.\n\t\t\t\tif (start > rangeEnd) {\n\t\t\t\t\treturn data;\n\t\t\t\t}\n\n\t\t\t\t// E.g. `[0, 11, 12, 16]` and we’ve added 5-15, so we now have\n\t\t\t\t// `[0, 16, 12, 16]`. Remove the `12,16` part, as it lies within the\n\t\t\t\t// `0,16` range that was previously added.\n\t\t\t\tif (start >= rangeStart && start <= rangeEnd) {\n\t\t\t\t\t// `start` lies within the range that was previously added.\n\n\t\t\t\t\tif (end > rangeStart && end - 1 <= rangeEnd) {\n\t\t\t\t\t\t// `end` lies within the range that was previously added as well,\n\t\t\t\t\t\t// so remove this pair.\n\t\t\t\t\t\tdata.splice(index, 2);\n\t\t\t\t\t\tindex -= 2;\n\t\t\t\t\t\t// Note: we cannot `return` just yet, as there may still be other\n\t\t\t\t\t\t// overlapping pairs.\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// `start` lies within the range that was previously added, but\n\t\t\t\t\t\t// `end` doesn’t. E.g. `[0, 11, 12, 31]` and we’ve added 5-15, so\n\t\t\t\t\t\t// now we have `[0, 16, 12, 31]`. This must be written as `[0, 31]`.\n\t\t\t\t\t\t// Remove the previously added `end` and the current `start`.\n\t\t\t\t\t\tdata.splice(index - 1, 2);\n\t\t\t\t\t\tindex -= 2;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Note: we cannot return yet.\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\telse if (start == rangeEnd + 1 || start == rangeEnd) {\n\t\t\t\tdata[index] = rangeStart;\n\t\t\t\treturn data;\n\t\t\t}\n\n\t\t\t// Check if a new pair must be inserted *before* the current one.\n\t\t\telse if (start > rangeEnd) {\n\t\t\t\tdata.splice(index, 0, rangeStart, rangeEnd + 1);\n\t\t\t\treturn data;\n\t\t\t}\n\n\t\t\telse if (rangeStart >= start && rangeStart < end && rangeEnd + 1 <= end) {\n\t\t\t\t// The new range lies entirely within an existing range pair. No action\n\t\t\t\t// needed.\n\t\t\t\treturn data;\n\t\t\t}\n\n\t\t\telse if (\n\t\t\t\t// E.g. `[0, 11]` and you add 5-15 → `[0, 16]`.\n\t\t\t\t(rangeStart >= start && rangeStart < end) ||\n\t\t\t\t// E.g. `[0, 3]` and you add 3-6 → `[0, 7]`.\n\t\t\t\tend == rangeStart\n\t\t\t) {\n\t\t\t\t// Replace `end` with the new value.\n\t\t\t\tdata[index + 1] = rangeEnd + 1;\n\t\t\t\t// Make sure the next range pair doesn’t overlap, e.g. `[0, 11, 12, 14]`\n\t\t\t\t// and you add 5-15 → `[0, 16]`, i.e. remove the `12,14` part.\n\t\t\t\tadded = true;\n\t\t\t\t// Note: we cannot `return` just yet.\n\t\t\t}\n\n\t\t\telse if (rangeStart <= start && rangeEnd + 1 >= end) {\n\t\t\t\t// The new range is a superset of the old range.\n\t\t\t\tdata[index] = rangeStart;\n\t\t\t\tdata[index + 1] = rangeEnd + 1;\n\t\t\t\tadded = true;\n\t\t\t}\n\n\t\t\tindex += 2;\n\t\t}\n\t\t// The loop has finished without doing anything; add the new pair to the end\n\t\t// of the data set.\n\t\tif (!added) {\n\t\t\tdata.push(rangeStart, rangeEnd + 1);\n\t\t}\n\t\treturn data;\n\t};\n\n\tvar dataContains = function(data, codePoint) {\n\t\tvar index = 0;\n\t\tvar length = data.length;\n\t\t// Exit early if `codePoint` is not within `data`’s overall range.\n\t\tvar start = data[index];\n\t\tvar end = data[length - 1];\n\t\tif (length >= 2) {\n\t\t\tif (codePoint < start || codePoint > end) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\t// Iterate over the data per `(start, end)` pair.\n\t\twhile (index < length) {\n\t\t\tstart = data[index];\n\t\t\tend = data[index + 1];\n\t\t\tif (codePoint >= start && codePoint < end) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\tindex += 2;\n\t\t}\n\t\treturn false;\n\t};\n\n\tvar dataIntersection = function(data, codePoints) {\n\t\tvar index = 0;\n\t\tvar length = codePoints.length;\n\t\tvar codePoint;\n\t\tvar result = [];\n\t\twhile (index < length) {\n\t\t\tcodePoint = codePoints[index];\n\t\t\tif (dataContains(data, codePoint)) {\n\t\t\t\tresult.push(codePoint);\n\t\t\t}\n\t\t\t++index;\n\t\t}\n\t\treturn dataFromCodePoints(result);\n\t};\n\n\tvar dataIsEmpty = function(data) {\n\t\treturn !data.length;\n\t};\n\n\tvar dataIsSingleton = function(data) {\n\t\t// Check if the set only represents a single code point.\n\t\treturn data.length == 2 && data[0] + 1 == data[1];\n\t};\n\n\tvar dataToArray = function(data) {\n\t\t// Iterate over the data per `(start, end)` pair.\n\t\tvar index = 0;\n\t\tvar start;\n\t\tvar end;\n\t\tvar result = [];\n\t\tvar length = data.length;\n\t\twhile (index < length) {\n\t\t\tstart = data[index];\n\t\t\tend = data[index + 1];\n\t\t\twhile (start < end) {\n\t\t\t\tresult.push(start);\n\t\t\t\t++start;\n\t\t\t}\n\t\t\tindex += 2;\n\t\t}\n\t\treturn result;\n\t};\n\n\t/*--------------------------------------------------------------------------*/\n\n\t// https://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae\n\tvar floor = Math.floor;\n\tvar highSurrogate = function(codePoint) {\n\t\treturn parseInt(\n\t\t\tfloor((codePoint - 0x10000) / 0x400) + HIGH_SURROGATE_MIN,\n\t\t\t10\n\t\t);\n\t};\n\n\tvar lowSurrogate = function(codePoint) {\n\t\treturn parseInt(\n\t\t\t(codePoint - 0x10000) % 0x400 + LOW_SURROGATE_MIN,\n\t\t\t10\n\t\t);\n\t};\n\n\tvar stringFromCharCode = String.fromCharCode;\n\tvar codePointToString = function(codePoint) {\n\t\tvar string;\n\t\t// https://mathiasbynens.be/notes/javascript-escapes#single\n\t\t// Note: the `\\b` escape sequence for U+0008 BACKSPACE in strings has a\n\t\t// different meaning in regular expressions (word boundary), so it cannot\n\t\t// be used here.\n\t\tif (codePoint == 0x09) {\n\t\t\tstring = '\\\\t';\n\t\t}\n\t\t// Note: IE < 9 treats `'\\v'` as `'v'`, so avoid using it.\n\t\t// else if (codePoint == 0x0B) {\n\t\t// \tstring = '\\\\v';\n\t\t// }\n\t\telse if (codePoint == 0x0A) {\n\t\t\tstring = '\\\\n';\n\t\t}\n\t\telse if (codePoint == 0x0C) {\n\t\t\tstring = '\\\\f';\n\t\t}\n\t\telse if (codePoint == 0x0D) {\n\t\t\tstring = '\\\\r';\n\t\t}\n\t\telse if (codePoint == 0x2D) {\n\t\t\t// https://mathiasbynens.be/notes/javascript-escapes#hexadecimal\n\t\t\t// Note: `-` (U+002D HYPHEN-MINUS) is escaped in this way rather\n\t\t\t// than by backslash-escaping, in case the output is used outside\n\t\t\t// of a character class in a `u` RegExp. /\\-/u throws, but\n\t\t\t// /\\x2D/u is fine.\n\t\t\tstring = '\\\\x2D';\n\t\t}\n\t\telse if (codePoint == 0x5C) {\n\t\t\tstring = '\\\\\\\\';\n\t\t}\n\t\telse if (\n\t\t\tcodePoint == 0x24 ||\n\t\t\t(codePoint >= 0x28 && codePoint <= 0x2B) ||\n\t\t\tcodePoint == 0x2E || codePoint == 0x2F ||\n\t\t\tcodePoint == 0x3F ||\n\t\t\t(codePoint >= 0x5B && codePoint <= 0x5E) ||\n\t\t\t(codePoint >= 0x7B && codePoint <= 0x7D)\n\t\t) {\n\t\t\t// The code point maps to an unsafe printable ASCII character;\n\t\t\t// backslash-escape it. Here’s the list of those symbols:\n\t\t\t//\n\t\t\t// $()*+./?[\\]^{|}\n\t\t\t//\n\t\t\t// This matches SyntaxCharacters as well as `/` (U+002F SOLIDUS).\n\t\t\t// https://tc39.github.io/ecma262/#prod-SyntaxCharacter\n\t\t\tstring = '\\\\' + stringFromCharCode(codePoint);\n\t\t}\n\t\telse if (codePoint >= 0x20 && codePoint <= 0x7E) {\n\t\t\t// The code point maps to one of these printable ASCII symbols\n\t\t\t// (including the space character):\n\t\t\t//\n\t\t\t// !\"#%&',/0123456789:;<=>@ABCDEFGHIJKLMNO\n\t\t\t// PQRSTUVWXYZ_`abcdefghijklmnopqrstuvwxyz~\n\t\t\t//\n\t\t\t// These can safely be used directly.\n\t\t\tstring = stringFromCharCode(codePoint);\n\t\t}\n\t\telse if (codePoint <= 0xFF) {\n\t\t\tstring = '\\\\x' + pad(hex(codePoint), 2);\n\t\t}\n\t\telse { // `codePoint <= 0xFFFF` holds true.\n\t\t\t// https://mathiasbynens.be/notes/javascript-escapes#unicode\n\t\t\tstring = '\\\\u' + pad(hex(codePoint), 4);\n\t\t}\n\n\t\t// There’s no need to account for astral symbols / surrogate pairs here,\n\t\t// since `codePointToString` is private and only used for BMP code points.\n\t\t// But if that’s what you need, just add an `else` block with this code:\n\t\t//\n\t\t// string = '\\\\u' + pad(hex(highSurrogate(codePoint)), 4)\n\t\t// \t+ '\\\\u' + pad(hex(lowSurrogate(codePoint)), 4);\n\n\t\treturn string;\n\t};\n\n\tvar codePointToStringUnicode = function(codePoint) {\n\t\tif (codePoint <= 0xFFFF) {\n\t\t\treturn codePointToString(codePoint);\n\t\t}\n\t\treturn '\\\\u{' + codePoint.toString(16).toUpperCase() + '}';\n\t};\n\n\tvar symbolToCodePoint = function(symbol) {\n\t\tvar length = symbol.length;\n\t\tvar first = symbol.charCodeAt(0);\n\t\tvar second;\n\t\tif (\n\t\t\tfirst >= HIGH_SURROGATE_MIN && first <= HIGH_SURROGATE_MAX &&\n\t\t\tlength > 1 // There is a next code unit.\n\t\t) {\n\t\t\t// `first` is a high surrogate, and there is a next character. Assume\n\t\t\t// it’s a low surrogate (else it’s invalid usage of Regenerate anyway).\n\t\t\tsecond = symbol.charCodeAt(1);\n\t\t\t// https://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae\n\t\t\treturn (first - HIGH_SURROGATE_MIN) * 0x400 +\n\t\t\t\tsecond - LOW_SURROGATE_MIN + 0x10000;\n\t\t}\n\t\treturn first;\n\t};\n\n\tvar createBMPCharacterClasses = function(data) {\n\t\t// Iterate over the data per `(start, end)` pair.\n\t\tvar result = '';\n\t\tvar index = 0;\n\t\tvar start;\n\t\tvar end;\n\t\tvar length = data.length;\n\t\tif (dataIsSingleton(data)) {\n\t\t\treturn codePointToString(data[0]);\n\t\t}\n\t\twhile (index < length) {\n\t\t\tstart = data[index];\n\t\t\tend = data[index + 1] - 1; // Note: the `- 1` makes `end` inclusive.\n\t\t\tif (start == end) {\n\t\t\t\tresult += codePointToString(start);\n\t\t\t} else if (start + 1 == end) {\n\t\t\t\tresult += codePointToString(start) + codePointToString(end);\n\t\t\t} else {\n\t\t\t\tresult += codePointToString(start) + '-' + codePointToString(end);\n\t\t\t}\n\t\t\tindex += 2;\n\t\t}\n\t\treturn '[' + result + ']';\n\t};\n\n\tvar createUnicodeCharacterClasses = function(data) {\n\t\t// Iterate over the data per `(start, end)` pair.\n\t\tvar result = '';\n\t\tvar index = 0;\n\t\tvar start;\n\t\tvar end;\n\t\tvar length = data.length;\n\t\tif (dataIsSingleton(data)) {\n\t\t\treturn codePointToStringUnicode(data[0]);\n\t\t}\n\t\twhile (index < length) {\n\t\t\tstart = data[index];\n\t\t\tend = data[index + 1] - 1; // Note: the `- 1` makes `end` inclusive.\n\t\t\tif (start == end) {\n\t\t\t\tresult += codePointToStringUnicode(start);\n\t\t\t} else if (start + 1 == end) {\n\t\t\t\tresult += codePointToStringUnicode(start) + codePointToStringUnicode(end);\n\t\t\t} else {\n\t\t\t\tresult += codePointToStringUnicode(start) + '-' + codePointToStringUnicode(end);\n\t\t\t}\n\t\t\tindex += 2;\n\t\t}\n\t\treturn '[' + result + ']';\n\t};\n\n\tvar splitAtBMP = function(data) {\n\t\t// Iterate over the data per `(start, end)` pair.\n\t\tvar loneHighSurrogates = [];\n\t\tvar loneLowSurrogates = [];\n\t\tvar bmp = [];\n\t\tvar astral = [];\n\t\tvar index = 0;\n\t\tvar start;\n\t\tvar end;\n\t\tvar length = data.length;\n\t\twhile (index < length) {\n\t\t\tstart = data[index];\n\t\t\tend = data[index + 1] - 1; // Note: the `- 1` makes `end` inclusive.\n\n\t\t\tif (start < HIGH_SURROGATE_MIN) {\n\n\t\t\t\t// The range starts and ends before the high surrogate range.\n\t\t\t\t// E.g. (0, 0x10).\n\t\t\t\tif (end < HIGH_SURROGATE_MIN) {\n\t\t\t\t\tbmp.push(start, end + 1);\n\t\t\t\t}\n\n\t\t\t\t// The range starts before the high surrogate range and ends within it.\n\t\t\t\t// E.g. (0, 0xD855).\n\t\t\t\tif (end >= HIGH_SURROGATE_MIN && end <= HIGH_SURROGATE_MAX) {\n\t\t\t\t\tbmp.push(start, HIGH_SURROGATE_MIN);\n\t\t\t\t\tloneHighSurrogates.push(HIGH_SURROGATE_MIN, end + 1);\n\t\t\t\t}\n\n\t\t\t\t// The range starts before the high surrogate range and ends in the low\n\t\t\t\t// surrogate range. E.g. (0, 0xDCFF).\n\t\t\t\tif (end >= LOW_SURROGATE_MIN && end <= LOW_SURROGATE_MAX) {\n\t\t\t\t\tbmp.push(start, HIGH_SURROGATE_MIN);\n\t\t\t\t\tloneHighSurrogates.push(HIGH_SURROGATE_MIN, HIGH_SURROGATE_MAX + 1);\n\t\t\t\t\tloneLowSurrogates.push(LOW_SURROGATE_MIN, end + 1);\n\t\t\t\t}\n\n\t\t\t\t// The range starts before the high surrogate range and ends after the\n\t\t\t\t// low surrogate range. E.g. (0, 0x10FFFF).\n\t\t\t\tif (end > LOW_SURROGATE_MAX) {\n\t\t\t\t\tbmp.push(start, HIGH_SURROGATE_MIN);\n\t\t\t\t\tloneHighSurrogates.push(HIGH_SURROGATE_MIN, HIGH_SURROGATE_MAX + 1);\n\t\t\t\t\tloneLowSurrogates.push(LOW_SURROGATE_MIN, LOW_SURROGATE_MAX + 1);\n\t\t\t\t\tif (end <= 0xFFFF) {\n\t\t\t\t\t\tbmp.push(LOW_SURROGATE_MAX + 1, end + 1);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tbmp.push(LOW_SURROGATE_MAX + 1, 0xFFFF + 1);\n\t\t\t\t\t\tastral.push(0xFFFF + 1, end + 1);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t} else if (start >= HIGH_SURROGATE_MIN && start <= HIGH_SURROGATE_MAX) {\n\n\t\t\t\t// The range starts and ends in the high surrogate range.\n\t\t\t\t// E.g. (0xD855, 0xD866).\n\t\t\t\tif (end >= HIGH_SURROGATE_MIN && end <= HIGH_SURROGATE_MAX) {\n\t\t\t\t\tloneHighSurrogates.push(start, end + 1);\n\t\t\t\t}\n\n\t\t\t\t// The range starts in the high surrogate range and ends in the low\n\t\t\t\t// surrogate range. E.g. (0xD855, 0xDCFF).\n\t\t\t\tif (end >= LOW_SURROGATE_MIN && end <= LOW_SURROGATE_MAX) {\n\t\t\t\t\tloneHighSurrogates.push(start, HIGH_SURROGATE_MAX + 1);\n\t\t\t\t\tloneLowSurrogates.push(LOW_SURROGATE_MIN, end + 1);\n\t\t\t\t}\n\n\t\t\t\t// The range starts in the high surrogate range and ends after the low\n\t\t\t\t// surrogate range. E.g. (0xD855, 0x10FFFF).\n\t\t\t\tif (end > LOW_SURROGATE_MAX) {\n\t\t\t\t\tloneHighSurrogates.push(start, HIGH_SURROGATE_MAX + 1);\n\t\t\t\t\tloneLowSurrogates.push(LOW_SURROGATE_MIN, LOW_SURROGATE_MAX + 1);\n\t\t\t\t\tif (end <= 0xFFFF) {\n\t\t\t\t\t\tbmp.push(LOW_SURROGATE_MAX + 1, end + 1);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tbmp.push(LOW_SURROGATE_MAX + 1, 0xFFFF + 1);\n\t\t\t\t\t\tastral.push(0xFFFF + 1, end + 1);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t} else if (start >= LOW_SURROGATE_MIN && start <= LOW_SURROGATE_MAX) {\n\n\t\t\t\t// The range starts and ends in the low surrogate range.\n\t\t\t\t// E.g. (0xDCFF, 0xDDFF).\n\t\t\t\tif (end >= LOW_SURROGATE_MIN && end <= LOW_SURROGATE_MAX) {\n\t\t\t\t\tloneLowSurrogates.push(start, end + 1);\n\t\t\t\t}\n\n\t\t\t\t// The range starts in the low surrogate range and ends after the low\n\t\t\t\t// surrogate range. E.g. (0xDCFF, 0x10FFFF).\n\t\t\t\tif (end > LOW_SURROGATE_MAX) {\n\t\t\t\t\tloneLowSurrogates.push(start, LOW_SURROGATE_MAX + 1);\n\t\t\t\t\tif (end <= 0xFFFF) {\n\t\t\t\t\t\tbmp.push(LOW_SURROGATE_MAX + 1, end + 1);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tbmp.push(LOW_SURROGATE_MAX + 1, 0xFFFF + 1);\n\t\t\t\t\t\tastral.push(0xFFFF + 1, end + 1);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t} else if (start > LOW_SURROGATE_MAX && start <= 0xFFFF) {\n\n\t\t\t\t// The range starts and ends after the low surrogate range.\n\t\t\t\t// E.g. (0xFFAA, 0x10FFFF).\n\t\t\t\tif (end <= 0xFFFF) {\n\t\t\t\t\tbmp.push(start, end + 1);\n\t\t\t\t} else {\n\t\t\t\t\tbmp.push(start, 0xFFFF + 1);\n\t\t\t\t\tastral.push(0xFFFF + 1, end + 1);\n\t\t\t\t}\n\n\t\t\t} else {\n\n\t\t\t\t// The range starts and ends in the astral range.\n\t\t\t\tastral.push(start, end + 1);\n\n\t\t\t}\n\n\t\t\tindex += 2;\n\t\t}\n\t\treturn {\n\t\t\t'loneHighSurrogates': loneHighSurrogates,\n\t\t\t'loneLowSurrogates': loneLowSurrogates,\n\t\t\t'bmp': bmp,\n\t\t\t'astral': astral\n\t\t};\n\t};\n\n\tvar optimizeSurrogateMappings = function(surrogateMappings) {\n\t\tvar result = [];\n\t\tvar tmpLow = [];\n\t\tvar addLow = false;\n\t\tvar mapping;\n\t\tvar nextMapping;\n\t\tvar highSurrogates;\n\t\tvar lowSurrogates;\n\t\tvar nextHighSurrogates;\n\t\tvar nextLowSurrogates;\n\t\tvar index = -1;\n\t\tvar length = surrogateMappings.length;\n\t\twhile (++index < length) {\n\t\t\tmapping = surrogateMappings[index];\n\t\t\tnextMapping = surrogateMappings[index + 1];\n\t\t\tif (!nextMapping) {\n\t\t\t\tresult.push(mapping);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\thighSurrogates = mapping[0];\n\t\t\tlowSurrogates = mapping[1];\n\t\t\tnextHighSurrogates = nextMapping[0];\n\t\t\tnextLowSurrogates = nextMapping[1];\n\n\t\t\t// Check for identical high surrogate ranges.\n\t\t\ttmpLow = lowSurrogates;\n\t\t\twhile (\n\t\t\t\tnextHighSurrogates &&\n\t\t\t\thighSurrogates[0] == nextHighSurrogates[0] &&\n\t\t\t\thighSurrogates[1] == nextHighSurrogates[1]\n\t\t\t) {\n\t\t\t\t// Merge with the next item.\n\t\t\t\tif (dataIsSingleton(nextLowSurrogates)) {\n\t\t\t\t\ttmpLow = dataAdd(tmpLow, nextLowSurrogates[0]);\n\t\t\t\t} else {\n\t\t\t\t\ttmpLow = dataAddRange(\n\t\t\t\t\t\ttmpLow,\n\t\t\t\t\t\tnextLowSurrogates[0],\n\t\t\t\t\t\tnextLowSurrogates[1] - 1\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\t++index;\n\t\t\t\tmapping = surrogateMappings[index];\n\t\t\t\thighSurrogates = mapping[0];\n\t\t\t\tlowSurrogates = mapping[1];\n\t\t\t\tnextMapping = surrogateMappings[index + 1];\n\t\t\t\tnextHighSurrogates = nextMapping && nextMapping[0];\n\t\t\t\tnextLowSurrogates = nextMapping && nextMapping[1];\n\t\t\t\taddLow = true;\n\t\t\t}\n\t\t\tresult.push([\n\t\t\t\thighSurrogates,\n\t\t\t\taddLow ? tmpLow : lowSurrogates\n\t\t\t]);\n\t\t\taddLow = false;\n\t\t}\n\t\treturn optimizeByLowSurrogates(result);\n\t};\n\n\tvar optimizeByLowSurrogates = function(surrogateMappings) {\n\t\tif (surrogateMappings.length == 1) {\n\t\t\treturn surrogateMappings;\n\t\t}\n\t\tvar index = -1;\n\t\tvar innerIndex = -1;\n\t\twhile (++index < surrogateMappings.length) {\n\t\t\tvar mapping = surrogateMappings[index];\n\t\t\tvar lowSurrogates = mapping[1];\n\t\t\tvar lowSurrogateStart = lowSurrogates[0];\n\t\t\tvar lowSurrogateEnd = lowSurrogates[1];\n\t\t\tinnerIndex = index; // Note: the loop starts at the next index.\n\t\t\twhile (++innerIndex < surrogateMappings.length) {\n\t\t\t\tvar otherMapping = surrogateMappings[innerIndex];\n\t\t\t\tvar otherLowSurrogates = otherMapping[1];\n\t\t\t\tvar otherLowSurrogateStart = otherLowSurrogates[0];\n\t\t\t\tvar otherLowSurrogateEnd = otherLowSurrogates[1];\n\t\t\t\tif (\n\t\t\t\t\tlowSurrogateStart == otherLowSurrogateStart &&\n\t\t\t\t\tlowSurrogateEnd == otherLowSurrogateEnd &&\n\t\t\t\t\totherLowSurrogates.length === 2\n\t\t\t\t) {\n\t\t\t\t\t// Add the code points in the other item to this one.\n\t\t\t\t\tif (dataIsSingleton(otherMapping[0])) {\n\t\t\t\t\t\tmapping[0] = dataAdd(mapping[0], otherMapping[0][0]);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tmapping[0] = dataAddRange(\n\t\t\t\t\t\t\tmapping[0],\n\t\t\t\t\t\t\totherMapping[0][0],\n\t\t\t\t\t\t\totherMapping[0][1] - 1\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t\t// Remove the other, now redundant, item.\n\t\t\t\t\tsurrogateMappings.splice(innerIndex, 1);\n\t\t\t\t\t--innerIndex;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn surrogateMappings;\n\t};\n\n\tvar surrogateSet = function(data) {\n\t\t// Exit early if `data` is an empty set.\n\t\tif (!data.length) {\n\t\t\treturn [];\n\t\t}\n\n\t\t// Iterate over the data per `(start, end)` pair.\n\t\tvar index = 0;\n\t\tvar start;\n\t\tvar end;\n\t\tvar startHigh;\n\t\tvar startLow;\n\t\tvar endHigh;\n\t\tvar endLow;\n\t\tvar surrogateMappings = [];\n\t\tvar length = data.length;\n\t\twhile (index < length) {\n\t\t\tstart = data[index];\n\t\t\tend = data[index + 1] - 1;\n\n\t\t\tstartHigh = highSurrogate(start);\n\t\t\tstartLow = lowSurrogate(start);\n\t\t\tendHigh = highSurrogate(end);\n\t\t\tendLow = lowSurrogate(end);\n\n\t\t\tvar startsWithLowestLowSurrogate = startLow == LOW_SURROGATE_MIN;\n\t\t\tvar endsWithHighestLowSurrogate = endLow == LOW_SURROGATE_MAX;\n\t\t\tvar complete = false;\n\n\t\t\t// Append the previous high-surrogate-to-low-surrogate mappings.\n\t\t\t// Step 1: `(startHigh, startLow)` to `(startHigh, LOW_SURROGATE_MAX)`.\n\t\t\tif (\n\t\t\t\tstartHigh == endHigh ||\n\t\t\t\tstartsWithLowestLowSurrogate && endsWithHighestLowSurrogate\n\t\t\t) {\n\t\t\t\tsurrogateMappings.push([\n\t\t\t\t\t[startHigh, endHigh + 1],\n\t\t\t\t\t[startLow, endLow + 1]\n\t\t\t\t]);\n\t\t\t\tcomplete = true;\n\t\t\t} else {\n\t\t\t\tsurrogateMappings.push([\n\t\t\t\t\t[startHigh, startHigh + 1],\n\t\t\t\t\t[startLow, LOW_SURROGATE_MAX + 1]\n\t\t\t\t]);\n\t\t\t}\n\n\t\t\t// Step 2: `(startHigh + 1, LOW_SURROGATE_MIN)` to\n\t\t\t// `(endHigh - 1, LOW_SURROGATE_MAX)`.\n\t\t\tif (!complete && startHigh + 1 < endHigh) {\n\t\t\t\tif (endsWithHighestLowSurrogate) {\n\t\t\t\t\t// Combine step 2 and step 3.\n\t\t\t\t\tsurrogateMappings.push([\n\t\t\t\t\t\t[startHigh + 1, endHigh + 1],\n\t\t\t\t\t\t[LOW_SURROGATE_MIN, endLow + 1]\n\t\t\t\t\t]);\n\t\t\t\t\tcomplete = true;\n\t\t\t\t} else {\n\t\t\t\t\tsurrogateMappings.push([\n\t\t\t\t\t\t[startHigh + 1, endHigh],\n\t\t\t\t\t\t[LOW_SURROGATE_MIN, LOW_SURROGATE_MAX + 1]\n\t\t\t\t\t]);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Step 3. `(endHigh, LOW_SURROGATE_MIN)` to `(endHigh, endLow)`.\n\t\t\tif (!complete) {\n\t\t\t\tsurrogateMappings.push([\n\t\t\t\t\t[endHigh, endHigh + 1],\n\t\t\t\t\t[LOW_SURROGATE_MIN, endLow + 1]\n\t\t\t\t]);\n\t\t\t}\n\n\t\t\tindex += 2;\n\t\t}\n\n\t\t// The format of `surrogateMappings` is as follows:\n\t\t//\n\t\t// [ surrogateMapping1, surrogateMapping2 ]\n\t\t//\n\t\t// i.e.:\n\t\t//\n\t\t// [\n\t\t// [ highSurrogates1, lowSurrogates1 ],\n\t\t// [ highSurrogates2, lowSurrogates2 ]\n\t\t// ]\n\t\treturn optimizeSurrogateMappings(surrogateMappings);\n\t};\n\n\tvar createSurrogateCharacterClasses = function(surrogateMappings) {\n\t\tvar result = [];\n\t\tforEach(surrogateMappings, function(surrogateMapping) {\n\t\t\tvar highSurrogates = surrogateMapping[0];\n\t\t\tvar lowSurrogates = surrogateMapping[1];\n\t\t\tresult.push(\n\t\t\t\tcreateBMPCharacterClasses(highSurrogates) +\n\t\t\t\tcreateBMPCharacterClasses(lowSurrogates)\n\t\t\t);\n\t\t});\n\t\treturn result.join('|');\n\t};\n\n\tvar createCharacterClassesFromData = function(data, bmpOnly, hasUnicodeFlag) {\n\t\tif (hasUnicodeFlag) {\n\t\t\treturn createUnicodeCharacterClasses(data);\n\t\t}\n\t\tvar result = [];\n\n\t\tvar parts = splitAtBMP(data);\n\t\tvar loneHighSurrogates = parts.loneHighSurrogates;\n\t\tvar loneLowSurrogates = parts.loneLowSurrogates;\n\t\tvar bmp = parts.bmp;\n\t\tvar astral = parts.astral;\n\t\tvar hasLoneHighSurrogates = !dataIsEmpty(loneHighSurrogates);\n\t\tvar hasLoneLowSurrogates = !dataIsEmpty(loneLowSurrogates);\n\n\t\tvar surrogateMappings = surrogateSet(astral);\n\n\t\tif (bmpOnly) {\n\t\t\tbmp = dataAddData(bmp, loneHighSurrogates);\n\t\t\thasLoneHighSurrogates = false;\n\t\t\tbmp = dataAddData(bmp, loneLowSurrogates);\n\t\t\thasLoneLowSurrogates = false;\n\t\t}\n\n\t\tif (!dataIsEmpty(bmp)) {\n\t\t\t// The data set contains BMP code points that are not high surrogates\n\t\t\t// needed for astral code points in the set.\n\t\t\tresult.push(createBMPCharacterClasses(bmp));\n\t\t}\n\t\tif (surrogateMappings.length) {\n\t\t\t// The data set contains astral code points; append character classes\n\t\t\t// based on their surrogate pairs.\n\t\t\tresult.push(createSurrogateCharacterClasses(surrogateMappings));\n\t\t}\n\t\t// https://gist.github.com/mathiasbynens/bbe7f870208abcfec860\n\t\tif (hasLoneHighSurrogates) {\n\t\t\tresult.push(\n\t\t\t\tcreateBMPCharacterClasses(loneHighSurrogates) +\n\t\t\t\t// Make sure the high surrogates aren’t part of a surrogate pair.\n\t\t\t\t'(?![\\\\uDC00-\\\\uDFFF])'\n\t\t\t);\n\t\t}\n\t\tif (hasLoneLowSurrogates) {\n\t\t\tresult.push(\n\t\t\t\t// It is not possible to accurately assert the low surrogates aren’t\n\t\t\t\t// part of a surrogate pair, since JavaScript regular expressions do\n\t\t\t\t// not support lookbehind.\n\t\t\t\t'(?:[^\\\\uD800-\\\\uDBFF]|^)' +\n\t\t\t\tcreateBMPCharacterClasses(loneLowSurrogates)\n\t\t\t);\n\t\t}\n\t\treturn result.join('|');\n\t};\n\n\t/*--------------------------------------------------------------------------*/\n\n\t// `regenerate` can be used as a constructor (and new methods can be added to\n\t// its prototype) but also as a regular function, the latter of which is the\n\t// documented and most common usage. For that reason, it’s not capitalized.\n\tvar regenerate = function(value) {\n\t\tif (arguments.length > 1) {\n\t\t\tvalue = slice.call(arguments);\n\t\t}\n\t\tif (this instanceof regenerate) {\n\t\t\tthis.data = [];\n\t\t\treturn value ? this.add(value) : this;\n\t\t}\n\t\treturn (new regenerate).add(value);\n\t};\n\n\tregenerate.version = '1.4.2';\n\n\tvar proto = regenerate.prototype;\n\textend(proto, {\n\t\t'add': function(value) {\n\t\t\tvar $this = this;\n\t\t\tif (value == null) {\n\t\t\t\treturn $this;\n\t\t\t}\n\t\t\tif (value instanceof regenerate) {\n\t\t\t\t// Allow passing other Regenerate instances.\n\t\t\t\t$this.data = dataAddData($this.data, value.data);\n\t\t\t\treturn $this;\n\t\t\t}\n\t\t\tif (arguments.length > 1) {\n\t\t\t\tvalue = slice.call(arguments);\n\t\t\t}\n\t\t\tif (isArray(value)) {\n\t\t\t\tforEach(value, function(item) {\n\t\t\t\t\t$this.add(item);\n\t\t\t\t});\n\t\t\t\treturn $this;\n\t\t\t}\n\t\t\t$this.data = dataAdd(\n\t\t\t\t$this.data,\n\t\t\t\tisNumber(value) ? value : symbolToCodePoint(value)\n\t\t\t);\n\t\t\treturn $this;\n\t\t},\n\t\t'remove': function(value) {\n\t\t\tvar $this = this;\n\t\t\tif (value == null) {\n\t\t\t\treturn $this;\n\t\t\t}\n\t\t\tif (value instanceof regenerate) {\n\t\t\t\t// Allow passing other Regenerate instances.\n\t\t\t\t$this.data = dataRemoveData($this.data, value.data);\n\t\t\t\treturn $this;\n\t\t\t}\n\t\t\tif (arguments.length > 1) {\n\t\t\t\tvalue = slice.call(arguments);\n\t\t\t}\n\t\t\tif (isArray(value)) {\n\t\t\t\tforEach(value, function(item) {\n\t\t\t\t\t$this.remove(item);\n\t\t\t\t});\n\t\t\t\treturn $this;\n\t\t\t}\n\t\t\t$this.data = dataRemove(\n\t\t\t\t$this.data,\n\t\t\t\tisNumber(value) ? value : symbolToCodePoint(value)\n\t\t\t);\n\t\t\treturn $this;\n\t\t},\n\t\t'addRange': function(start, end) {\n\t\t\tvar $this = this;\n\t\t\t$this.data = dataAddRange($this.data,\n\t\t\t\tisNumber(start) ? start : symbolToCodePoint(start),\n\t\t\t\tisNumber(end) ? end : symbolToCodePoint(end)\n\t\t\t);\n\t\t\treturn $this;\n\t\t},\n\t\t'removeRange': function(start, end) {\n\t\t\tvar $this = this;\n\t\t\tvar startCodePoint = isNumber(start) ? start : symbolToCodePoint(start);\n\t\t\tvar endCodePoint = isNumber(end) ? end : symbolToCodePoint(end);\n\t\t\t$this.data = dataRemoveRange(\n\t\t\t\t$this.data,\n\t\t\t\tstartCodePoint,\n\t\t\t\tendCodePoint\n\t\t\t);\n\t\t\treturn $this;\n\t\t},\n\t\t'intersection': function(argument) {\n\t\t\tvar $this = this;\n\t\t\t// Allow passing other Regenerate instances.\n\t\t\t// TODO: Optimize this by writing and using `dataIntersectionData()`.\n\t\t\tvar array = argument instanceof regenerate ?\n\t\t\t\tdataToArray(argument.data) :\n\t\t\t\targument;\n\t\t\t$this.data = dataIntersection($this.data, array);\n\t\t\treturn $this;\n\t\t},\n\t\t'contains': function(codePoint) {\n\t\t\treturn dataContains(\n\t\t\t\tthis.data,\n\t\t\t\tisNumber(codePoint) ? codePoint : symbolToCodePoint(codePoint)\n\t\t\t);\n\t\t},\n\t\t'clone': function() {\n\t\t\tvar set = new regenerate;\n\t\t\tset.data = this.data.slice(0);\n\t\t\treturn set;\n\t\t},\n\t\t'toString': function(options) {\n\t\t\tvar result = createCharacterClassesFromData(\n\t\t\t\tthis.data,\n\t\t\t\toptions ? options.bmpOnly : false,\n\t\t\t\toptions ? options.hasUnicodeFlag : false\n\t\t\t);\n\t\t\tif (!result) {\n\t\t\t\t// For an empty set, return something that can be inserted `/here/` to\n\t\t\t\t// form a valid regular expression. Avoid `(?:)` since that matches the\n\t\t\t\t// empty string.\n\t\t\t\treturn '[]';\n\t\t\t}\n\t\t\t// Use `\\0` instead of `\\x00` where possible.\n\t\t\treturn result.replace(regexNull, '\\\\0$1');\n\t\t},\n\t\t'toRegExp': function(flags) {\n\t\t\tvar pattern = this.toString(\n\t\t\t\tflags && flags.indexOf('u') != -1 ?\n\t\t\t\t\t{ 'hasUnicodeFlag': true } :\n\t\t\t\t\tnull\n\t\t\t);\n\t\t\treturn RegExp(pattern, flags || '');\n\t\t},\n\t\t'valueOf': function() { // Note: `valueOf` is aliased as `toArray`.\n\t\t\treturn dataToArray(this.data);\n\t\t}\n\t});\n\n\tproto.toArray = proto.valueOf;\n\n\t// Some AMD build optimizers, like r.js, check for specific condition patterns\n\t// like the following:\n\tif (\n\t\ttypeof define == 'function' &&\n\t\ttypeof define.amd == 'object' &&\n\t\tdefine.amd\n\t) {\n\t\tdefine(function() {\n\t\t\treturn regenerate;\n\t\t});\n\t}\telse if (freeExports && !freeExports.nodeType) {\n\t\tif (freeModule) { // in Node.js, io.js, or RingoJS v0.8.0+\n\t\t\tfreeModule.exports = regenerate;\n\t\t} else { // in Narwhal or RingoJS v0.7.0-\n\t\t\tfreeExports.regenerate = regenerate;\n\t\t}\n\t} else { // in Rhino or a web browser\n\t\troot.regenerate = regenerate;\n\t}\n\n}(this));\n","const set = require('regenerate')(0xAA, 0xB5, 0xBA, 0x2EC, 0x2EE, 0x345, 0x37F, 0x386, 0x38C, 0x559, 0x5BF, 0x5C7, 0x6FF, 0x7FA, 0x9B2, 0x9CE, 0x9D7, 0x9FC, 0xA51, 0xA5E, 0xAD0, 0xB71, 0xB9C, 0xBD0, 0xBD7, 0xC5D, 0xD4E, 0xDBD, 0xDD6, 0xE4D, 0xE84, 0xEA5, 0xEC6, 0xECD, 0xF00, 0x1038, 0x10C7, 0x10CD, 0x1258, 0x12C0, 0x17D7, 0x17DC, 0x1AA7, 0x1CFA, 0x1F59, 0x1F5B, 0x1F5D, 0x1FBE, 0x2071, 0x207F, 0x2102, 0x2107, 0x2115, 0x2124, 0x2126, 0x2128, 0x214E, 0x2D27, 0x2D2D, 0x2D6F, 0x2E2F, 0xA7D3, 0xA8C5, 0xA8FB, 0xA9CF, 0xAAC0, 0xAAC2, 0xFB3E, 0x10808, 0x1083C, 0x10F27, 0x110C2, 0x11176, 0x111DA, 0x111DC, 0x11237, 0x11288, 0x11350, 0x11357, 0x114C7, 0x11640, 0x11644, 0x116B8, 0x11909, 0x119E1, 0x11A9D, 0x11C40, 0x11D3A, 0x11D43, 0x11D98, 0x11FB0, 0x16FE3, 0x1B132, 0x1B155, 0x1BC9E, 0x1D4A2, 0x1D4BB, 0x1D546, 0x1E08F, 0x1E14E, 0x1E947, 0x1E94B, 0x1EE24, 0x1EE27, 0x1EE39, 0x1EE3B, 0x1EE42, 0x1EE47, 0x1EE49, 0x1EE4B, 0x1EE54, 0x1EE57, 0x1EE59, 0x1EE5B, 0x1EE5D, 0x1EE5F, 0x1EE64, 0x1EE7E);\nset.addRange(0x41, 0x5A).addRange(0x61, 0x7A).addRange(0xC0, 0xD6).addRange(0xD8, 0xF6).addRange(0xF8, 0x2C1).addRange(0x2C6, 0x2D1).addRange(0x2E0, 0x2E4).addRange(0x370, 0x374).addRange(0x376, 0x377).addRange(0x37A, 0x37D).addRange(0x388, 0x38A).addRange(0x38E, 0x3A1).addRange(0x3A3, 0x3F5).addRange(0x3F7, 0x481).addRange(0x48A, 0x52F).addRange(0x531, 0x556).addRange(0x560, 0x588).addRange(0x5B0, 0x5BD).addRange(0x5C1, 0x5C2).addRange(0x5C4, 0x5C5).addRange(0x5D0, 0x5EA).addRange(0x5EF, 0x5F2).addRange(0x610, 0x61A).addRange(0x620, 0x657).addRange(0x659, 0x65F).addRange(0x66E, 0x6D3).addRange(0x6D5, 0x6DC).addRange(0x6E1, 0x6E8).addRange(0x6ED, 0x6EF).addRange(0x6FA, 0x6FC).addRange(0x710, 0x73F).addRange(0x74D, 0x7B1).addRange(0x7CA, 0x7EA).addRange(0x7F4, 0x7F5).addRange(0x800, 0x817).addRange(0x81A, 0x82C).addRange(0x840, 0x858).addRange(0x860, 0x86A).addRange(0x870, 0x887).addRange(0x889, 0x88E).addRange(0x8A0, 0x8C9).addRange(0x8D4, 0x8DF).addRange(0x8E3, 0x8E9).addRange(0x8F0, 0x93B).addRange(0x93D, 0x94C).addRange(0x94E, 0x950).addRange(0x955, 0x963).addRange(0x971, 0x983).addRange(0x985, 0x98C).addRange(0x98F, 0x990).addRange(0x993, 0x9A8);\nset.addRange(0x9AA, 0x9B0).addRange(0x9B6, 0x9B9).addRange(0x9BD, 0x9C4).addRange(0x9C7, 0x9C8).addRange(0x9CB, 0x9CC).addRange(0x9DC, 0x9DD).addRange(0x9DF, 0x9E3).addRange(0x9F0, 0x9F1).addRange(0xA01, 0xA03).addRange(0xA05, 0xA0A).addRange(0xA0F, 0xA10).addRange(0xA13, 0xA28).addRange(0xA2A, 0xA30).addRange(0xA32, 0xA33).addRange(0xA35, 0xA36).addRange(0xA38, 0xA39).addRange(0xA3E, 0xA42).addRange(0xA47, 0xA48).addRange(0xA4B, 0xA4C).addRange(0xA59, 0xA5C).addRange(0xA70, 0xA75).addRange(0xA81, 0xA83).addRange(0xA85, 0xA8D).addRange(0xA8F, 0xA91).addRange(0xA93, 0xAA8).addRange(0xAAA, 0xAB0).addRange(0xAB2, 0xAB3).addRange(0xAB5, 0xAB9).addRange(0xABD, 0xAC5).addRange(0xAC7, 0xAC9).addRange(0xACB, 0xACC).addRange(0xAE0, 0xAE3).addRange(0xAF9, 0xAFC).addRange(0xB01, 0xB03).addRange(0xB05, 0xB0C).addRange(0xB0F, 0xB10).addRange(0xB13, 0xB28).addRange(0xB2A, 0xB30).addRange(0xB32, 0xB33).addRange(0xB35, 0xB39).addRange(0xB3D, 0xB44).addRange(0xB47, 0xB48).addRange(0xB4B, 0xB4C).addRange(0xB56, 0xB57).addRange(0xB5C, 0xB5D).addRange(0xB5F, 0xB63).addRange(0xB82, 0xB83).addRange(0xB85, 0xB8A).addRange(0xB8E, 0xB90).addRange(0xB92, 0xB95).addRange(0xB99, 0xB9A);\nset.addRange(0xB9E, 0xB9F).addRange(0xBA3, 0xBA4).addRange(0xBA8, 0xBAA).addRange(0xBAE, 0xBB9).addRange(0xBBE, 0xBC2).addRange(0xBC6, 0xBC8).addRange(0xBCA, 0xBCC).addRange(0xC00, 0xC0C).addRange(0xC0E, 0xC10).addRange(0xC12, 0xC28).addRange(0xC2A, 0xC39).addRange(0xC3D, 0xC44).addRange(0xC46, 0xC48).addRange(0xC4A, 0xC4C).addRange(0xC55, 0xC56).addRange(0xC58, 0xC5A).addRange(0xC60, 0xC63).addRange(0xC80, 0xC83).addRange(0xC85, 0xC8C).addRange(0xC8E, 0xC90).addRange(0xC92, 0xCA8).addRange(0xCAA, 0xCB3).addRange(0xCB5, 0xCB9).addRange(0xCBD, 0xCC4).addRange(0xCC6, 0xCC8).addRange(0xCCA, 0xCCC).addRange(0xCD5, 0xCD6).addRange(0xCDD, 0xCDE).addRange(0xCE0, 0xCE3).addRange(0xCF1, 0xCF3).addRange(0xD00, 0xD0C).addRange(0xD0E, 0xD10).addRange(0xD12, 0xD3A).addRange(0xD3D, 0xD44).addRange(0xD46, 0xD48).addRange(0xD4A, 0xD4C).addRange(0xD54, 0xD57).addRange(0xD5F, 0xD63).addRange(0xD7A, 0xD7F).addRange(0xD81, 0xD83).addRange(0xD85, 0xD96).addRange(0xD9A, 0xDB1).addRange(0xDB3, 0xDBB).addRange(0xDC0, 0xDC6).addRange(0xDCF, 0xDD4).addRange(0xDD8, 0xDDF).addRange(0xDF2, 0xDF3).addRange(0xE01, 0xE3A).addRange(0xE40, 0xE46).addRange(0xE81, 0xE82).addRange(0xE86, 0xE8A);\nset.addRange(0xE8C, 0xEA3).addRange(0xEA7, 0xEB9).addRange(0xEBB, 0xEBD).addRange(0xEC0, 0xEC4).addRange(0xEDC, 0xEDF).addRange(0xF40, 0xF47).addRange(0xF49, 0xF6C).addRange(0xF71, 0xF83).addRange(0xF88, 0xF97).addRange(0xF99, 0xFBC).addRange(0x1000, 0x1036).addRange(0x103B, 0x103F).addRange(0x1050, 0x108F).addRange(0x109A, 0x109D).addRange(0x10A0, 0x10C5).addRange(0x10D0, 0x10FA).addRange(0x10FC, 0x1248).addRange(0x124A, 0x124D).addRange(0x1250, 0x1256).addRange(0x125A, 0x125D).addRange(0x1260, 0x1288).addRange(0x128A, 0x128D).addRange(0x1290, 0x12B0).addRange(0x12B2, 0x12B5).addRange(0x12B8, 0x12BE).addRange(0x12C2, 0x12C5).addRange(0x12C8, 0x12D6).addRange(0x12D8, 0x1310).addRange(0x1312, 0x1315).addRange(0x1318, 0x135A).addRange(0x1380, 0x138F).addRange(0x13A0, 0x13F5).addRange(0x13F8, 0x13FD).addRange(0x1401, 0x166C).addRange(0x166F, 0x167F).addRange(0x1681, 0x169A).addRange(0x16A0, 0x16EA).addRange(0x16EE, 0x16F8).addRange(0x1700, 0x1713).addRange(0x171F, 0x1733).addRange(0x1740, 0x1753).addRange(0x1760, 0x176C).addRange(0x176E, 0x1770).addRange(0x1772, 0x1773).addRange(0x1780, 0x17B3).addRange(0x17B6, 0x17C8).addRange(0x1820, 0x1878).addRange(0x1880, 0x18AA).addRange(0x18B0, 0x18F5).addRange(0x1900, 0x191E).addRange(0x1920, 0x192B);\nset.addRange(0x1930, 0x1938).addRange(0x1950, 0x196D).addRange(0x1970, 0x1974).addRange(0x1980, 0x19AB).addRange(0x19B0, 0x19C9).addRange(0x1A00, 0x1A1B).addRange(0x1A20, 0x1A5E).addRange(0x1A61, 0x1A74).addRange(0x1ABF, 0x1AC0).addRange(0x1ACC, 0x1ACE).addRange(0x1B00, 0x1B33).addRange(0x1B35, 0x1B43).addRange(0x1B45, 0x1B4C).addRange(0x1B80, 0x1BA9).addRange(0x1BAC, 0x1BAF).addRange(0x1BBA, 0x1BE5).addRange(0x1BE7, 0x1BF1).addRange(0x1C00, 0x1C36).addRange(0x1C4D, 0x1C4F).addRange(0x1C5A, 0x1C7D).addRange(0x1C80, 0x1C88).addRange(0x1C90, 0x1CBA).addRange(0x1CBD, 0x1CBF).addRange(0x1CE9, 0x1CEC).addRange(0x1CEE, 0x1CF3).addRange(0x1CF5, 0x1CF6).addRange(0x1D00, 0x1DBF).addRange(0x1DE7, 0x1DF4).addRange(0x1E00, 0x1F15).addRange(0x1F18, 0x1F1D).addRange(0x1F20, 0x1F45).addRange(0x1F48, 0x1F4D).addRange(0x1F50, 0x1F57).addRange(0x1F5F, 0x1F7D).addRange(0x1F80, 0x1FB4).addRange(0x1FB6, 0x1FBC).addRange(0x1FC2, 0x1FC4).addRange(0x1FC6, 0x1FCC).addRange(0x1FD0, 0x1FD3).addRange(0x1FD6, 0x1FDB).addRange(0x1FE0, 0x1FEC).addRange(0x1FF2, 0x1FF4).addRange(0x1FF6, 0x1FFC).addRange(0x2090, 0x209C).addRange(0x210A, 0x2113).addRange(0x2119, 0x211D).addRange(0x212A, 0x212D).addRange(0x212F, 0x2139).addRange(0x213C, 0x213F).addRange(0x2145, 0x2149).addRange(0x2160, 0x2188);\nset.addRange(0x24B6, 0x24E9).addRange(0x2C00, 0x2CE4).addRange(0x2CEB, 0x2CEE).addRange(0x2CF2, 0x2CF3).addRange(0x2D00, 0x2D25).addRange(0x2D30, 0x2D67).addRange(0x2D80, 0x2D96).addRange(0x2DA0, 0x2DA6).addRange(0x2DA8, 0x2DAE).addRange(0x2DB0, 0x2DB6).addRange(0x2DB8, 0x2DBE).addRange(0x2DC0, 0x2DC6).addRange(0x2DC8, 0x2DCE).addRange(0x2DD0, 0x2DD6).addRange(0x2DD8, 0x2DDE).addRange(0x2DE0, 0x2DFF).addRange(0x3005, 0x3007).addRange(0x3021, 0x3029).addRange(0x3031, 0x3035).addRange(0x3038, 0x303C).addRange(0x3041, 0x3096).addRange(0x309D, 0x309F).addRange(0x30A1, 0x30FA).addRange(0x30FC, 0x30FF).addRange(0x3105, 0x312F).addRange(0x3131, 0x318E).addRange(0x31A0, 0x31BF).addRange(0x31F0, 0x31FF).addRange(0x3400, 0x4DBF).addRange(0x4E00, 0xA48C).addRange(0xA4D0, 0xA4FD).addRange(0xA500, 0xA60C).addRange(0xA610, 0xA61F).addRange(0xA62A, 0xA62B).addRange(0xA640, 0xA66E).addRange(0xA674, 0xA67B).addRange(0xA67F, 0xA6EF).addRange(0xA717, 0xA71F).addRange(0xA722, 0xA788).addRange(0xA78B, 0xA7CA).addRange(0xA7D0, 0xA7D1).addRange(0xA7D5, 0xA7D9).addRange(0xA7F2, 0xA805).addRange(0xA807, 0xA827).addRange(0xA840, 0xA873).addRange(0xA880, 0xA8C3).addRange(0xA8F2, 0xA8F7).addRange(0xA8FD, 0xA8FF).addRange(0xA90A, 0xA92A).addRange(0xA930, 0xA952).addRange(0xA960, 0xA97C);\nset.addRange(0xA980, 0xA9B2).addRange(0xA9B4, 0xA9BF).addRange(0xA9E0, 0xA9EF).addRange(0xA9FA, 0xA9FE).addRange(0xAA00, 0xAA36).addRange(0xAA40, 0xAA4D).addRange(0xAA60, 0xAA76).addRange(0xAA7A, 0xAABE).addRange(0xAADB, 0xAADD).addRange(0xAAE0, 0xAAEF).addRange(0xAAF2, 0xAAF5).addRange(0xAB01, 0xAB06).addRange(0xAB09, 0xAB0E).addRange(0xAB11, 0xAB16).addRange(0xAB20, 0xAB26).addRange(0xAB28, 0xAB2E).addRange(0xAB30, 0xAB5A).addRange(0xAB5C, 0xAB69).addRange(0xAB70, 0xABEA).addRange(0xAC00, 0xD7A3).addRange(0xD7B0, 0xD7C6).addRange(0xD7CB, 0xD7FB).addRange(0xF900, 0xFA6D).addRange(0xFA70, 0xFAD9).addRange(0xFB00, 0xFB06).addRange(0xFB13, 0xFB17).addRange(0xFB1D, 0xFB28).addRange(0xFB2A, 0xFB36).addRange(0xFB38, 0xFB3C).addRange(0xFB40, 0xFB41).addRange(0xFB43, 0xFB44).addRange(0xFB46, 0xFBB1).addRange(0xFBD3, 0xFD3D).addRange(0xFD50, 0xFD8F).addRange(0xFD92, 0xFDC7).addRange(0xFDF0, 0xFDFB).addRange(0xFE70, 0xFE74).addRange(0xFE76, 0xFEFC).addRange(0xFF21, 0xFF3A).addRange(0xFF41, 0xFF5A).addRange(0xFF66, 0xFFBE).addRange(0xFFC2, 0xFFC7).addRange(0xFFCA, 0xFFCF).addRange(0xFFD2, 0xFFD7).addRange(0xFFDA, 0xFFDC).addRange(0x10000, 0x1000B).addRange(0x1000D, 0x10026).addRange(0x10028, 0x1003A).addRange(0x1003C, 0x1003D).addRange(0x1003F, 0x1004D).addRange(0x10050, 0x1005D);\nset.addRange(0x10080, 0x100FA).addRange(0x10140, 0x10174).addRange(0x10280, 0x1029C).addRange(0x102A0, 0x102D0).addRange(0x10300, 0x1031F).addRange(0x1032D, 0x1034A).addRange(0x10350, 0x1037A).addRange(0x10380, 0x1039D).addRange(0x103A0, 0x103C3).addRange(0x103C8, 0x103CF).addRange(0x103D1, 0x103D5).addRange(0x10400, 0x1049D).addRange(0x104B0, 0x104D3).addRange(0x104D8, 0x104FB).addRange(0x10500, 0x10527).addRange(0x10530, 0x10563).addRange(0x10570, 0x1057A).addRange(0x1057C, 0x1058A).addRange(0x1058C, 0x10592).addRange(0x10594, 0x10595).addRange(0x10597, 0x105A1).addRange(0x105A3, 0x105B1).addRange(0x105B3, 0x105B9).addRange(0x105BB, 0x105BC).addRange(0x10600, 0x10736).addRange(0x10740, 0x10755).addRange(0x10760, 0x10767).addRange(0x10780, 0x10785).addRange(0x10787, 0x107B0).addRange(0x107B2, 0x107BA).addRange(0x10800, 0x10805).addRange(0x1080A, 0x10835).addRange(0x10837, 0x10838).addRange(0x1083F, 0x10855).addRange(0x10860, 0x10876).addRange(0x10880, 0x1089E).addRange(0x108E0, 0x108F2).addRange(0x108F4, 0x108F5).addRange(0x10900, 0x10915).addRange(0x10920, 0x10939).addRange(0x10980, 0x109B7).addRange(0x109BE, 0x109BF).addRange(0x10A00, 0x10A03).addRange(0x10A05, 0x10A06).addRange(0x10A0C, 0x10A13).addRange(0x10A15, 0x10A17).addRange(0x10A19, 0x10A35).addRange(0x10A60, 0x10A7C).addRange(0x10A80, 0x10A9C).addRange(0x10AC0, 0x10AC7).addRange(0x10AC9, 0x10AE4);\nset.addRange(0x10B00, 0x10B35).addRange(0x10B40, 0x10B55).addRange(0x10B60, 0x10B72).addRange(0x10B80, 0x10B91).addRange(0x10C00, 0x10C48).addRange(0x10C80, 0x10CB2).addRange(0x10CC0, 0x10CF2).addRange(0x10D00, 0x10D27).addRange(0x10E80, 0x10EA9).addRange(0x10EAB, 0x10EAC).addRange(0x10EB0, 0x10EB1).addRange(0x10F00, 0x10F1C).addRange(0x10F30, 0x10F45).addRange(0x10F70, 0x10F81).addRange(0x10FB0, 0x10FC4).addRange(0x10FE0, 0x10FF6).addRange(0x11000, 0x11045).addRange(0x11071, 0x11075).addRange(0x11080, 0x110B8).addRange(0x110D0, 0x110E8).addRange(0x11100, 0x11132).addRange(0x11144, 0x11147).addRange(0x11150, 0x11172).addRange(0x11180, 0x111BF).addRange(0x111C1, 0x111C4).addRange(0x111CE, 0x111CF).addRange(0x11200, 0x11211).addRange(0x11213, 0x11234).addRange(0x1123E, 0x11241).addRange(0x11280, 0x11286).addRange(0x1128A, 0x1128D).addRange(0x1128F, 0x1129D).addRange(0x1129F, 0x112A8).addRange(0x112B0, 0x112E8).addRange(0x11300, 0x11303).addRange(0x11305, 0x1130C).addRange(0x1130F, 0x11310).addRange(0x11313, 0x11328).addRange(0x1132A, 0x11330).addRange(0x11332, 0x11333).addRange(0x11335, 0x11339).addRange(0x1133D, 0x11344).addRange(0x11347, 0x11348).addRange(0x1134B, 0x1134C).addRange(0x1135D, 0x11363).addRange(0x11400, 0x11441).addRange(0x11443, 0x11445).addRange(0x11447, 0x1144A).addRange(0x1145F, 0x11461).addRange(0x11480, 0x114C1).addRange(0x114C4, 0x114C5);\nset.addRange(0x11580, 0x115B5).addRange(0x115B8, 0x115BE).addRange(0x115D8, 0x115DD).addRange(0x11600, 0x1163E).addRange(0x11680, 0x116B5).addRange(0x11700, 0x1171A).addRange(0x1171D, 0x1172A).addRange(0x11740, 0x11746).addRange(0x11800, 0x11838).addRange(0x118A0, 0x118DF).addRange(0x118FF, 0x11906).addRange(0x1190C, 0x11913).addRange(0x11915, 0x11916).addRange(0x11918, 0x11935).addRange(0x11937, 0x11938).addRange(0x1193B, 0x1193C).addRange(0x1193F, 0x11942).addRange(0x119A0, 0x119A7).addRange(0x119AA, 0x119D7).addRange(0x119DA, 0x119DF).addRange(0x119E3, 0x119E4).addRange(0x11A00, 0x11A32).addRange(0x11A35, 0x11A3E).addRange(0x11A50, 0x11A97).addRange(0x11AB0, 0x11AF8).addRange(0x11C00, 0x11C08).addRange(0x11C0A, 0x11C36).addRange(0x11C38, 0x11C3E).addRange(0x11C72, 0x11C8F).addRange(0x11C92, 0x11CA7).addRange(0x11CA9, 0x11CB6).addRange(0x11D00, 0x11D06).addRange(0x11D08, 0x11D09).addRange(0x11D0B, 0x11D36).addRange(0x11D3C, 0x11D3D).addRange(0x11D3F, 0x11D41).addRange(0x11D46, 0x11D47).addRange(0x11D60, 0x11D65).addRange(0x11D67, 0x11D68).addRange(0x11D6A, 0x11D8E).addRange(0x11D90, 0x11D91).addRange(0x11D93, 0x11D96).addRange(0x11EE0, 0x11EF6).addRange(0x11F00, 0x11F10).addRange(0x11F12, 0x11F3A).addRange(0x11F3E, 0x11F40).addRange(0x12000, 0x12399).addRange(0x12400, 0x1246E).addRange(0x12480, 0x12543).addRange(0x12F90, 0x12FF0).addRange(0x13000, 0x1342F);\nset.addRange(0x13441, 0x13446).addRange(0x14400, 0x14646).addRange(0x16800, 0x16A38).addRange(0x16A40, 0x16A5E).addRange(0x16A70, 0x16ABE).addRange(0x16AD0, 0x16AED).addRange(0x16B00, 0x16B2F).addRange(0x16B40, 0x16B43).addRange(0x16B63, 0x16B77).addRange(0x16B7D, 0x16B8F).addRange(0x16E40, 0x16E7F).addRange(0x16F00, 0x16F4A).addRange(0x16F4F, 0x16F87).addRange(0x16F8F, 0x16F9F).addRange(0x16FE0, 0x16FE1).addRange(0x16FF0, 0x16FF1).addRange(0x17000, 0x187F7).addRange(0x18800, 0x18CD5).addRange(0x18D00, 0x18D08).addRange(0x1AFF0, 0x1AFF3).addRange(0x1AFF5, 0x1AFFB).addRange(0x1AFFD, 0x1AFFE).addRange(0x1B000, 0x1B122).addRange(0x1B150, 0x1B152).addRange(0x1B164, 0x1B167).addRange(0x1B170, 0x1B2FB).addRange(0x1BC00, 0x1BC6A).addRange(0x1BC70, 0x1BC7C).addRange(0x1BC80, 0x1BC88).addRange(0x1BC90, 0x1BC99).addRange(0x1D400, 0x1D454).addRange(0x1D456, 0x1D49C).addRange(0x1D49E, 0x1D49F).addRange(0x1D4A5, 0x1D4A6).addRange(0x1D4A9, 0x1D4AC).addRange(0x1D4AE, 0x1D4B9).addRange(0x1D4BD, 0x1D4C3).addRange(0x1D4C5, 0x1D505).addRange(0x1D507, 0x1D50A).addRange(0x1D50D, 0x1D514).addRange(0x1D516, 0x1D51C).addRange(0x1D51E, 0x1D539).addRange(0x1D53B, 0x1D53E).addRange(0x1D540, 0x1D544).addRange(0x1D54A, 0x1D550).addRange(0x1D552, 0x1D6A5).addRange(0x1D6A8, 0x1D6C0).addRange(0x1D6C2, 0x1D6DA).addRange(0x1D6DC, 0x1D6FA).addRange(0x1D6FC, 0x1D714).addRange(0x1D716, 0x1D734);\nset.addRange(0x1D736, 0x1D74E).addRange(0x1D750, 0x1D76E).addRange(0x1D770, 0x1D788).addRange(0x1D78A, 0x1D7A8).addRange(0x1D7AA, 0x1D7C2).addRange(0x1D7C4, 0x1D7CB).addRange(0x1DF00, 0x1DF1E).addRange(0x1DF25, 0x1DF2A).addRange(0x1E000, 0x1E006).addRange(0x1E008, 0x1E018).addRange(0x1E01B, 0x1E021).addRange(0x1E023, 0x1E024).addRange(0x1E026, 0x1E02A).addRange(0x1E030, 0x1E06D).addRange(0x1E100, 0x1E12C).addRange(0x1E137, 0x1E13D).addRange(0x1E290, 0x1E2AD).addRange(0x1E2C0, 0x1E2EB).addRange(0x1E4D0, 0x1E4EB).addRange(0x1E7E0, 0x1E7E6).addRange(0x1E7E8, 0x1E7EB).addRange(0x1E7ED, 0x1E7EE).addRange(0x1E7F0, 0x1E7FE).addRange(0x1E800, 0x1E8C4).addRange(0x1E900, 0x1E943).addRange(0x1EE00, 0x1EE03).addRange(0x1EE05, 0x1EE1F).addRange(0x1EE21, 0x1EE22).addRange(0x1EE29, 0x1EE32).addRange(0x1EE34, 0x1EE37).addRange(0x1EE4D, 0x1EE4F).addRange(0x1EE51, 0x1EE52).addRange(0x1EE61, 0x1EE62).addRange(0x1EE67, 0x1EE6A).addRange(0x1EE6C, 0x1EE72).addRange(0x1EE74, 0x1EE77).addRange(0x1EE79, 0x1EE7C).addRange(0x1EE80, 0x1EE89).addRange(0x1EE8B, 0x1EE9B).addRange(0x1EEA1, 0x1EEA3).addRange(0x1EEA5, 0x1EEA9).addRange(0x1EEAB, 0x1EEBB).addRange(0x1F130, 0x1F149).addRange(0x1F150, 0x1F169).addRange(0x1F170, 0x1F189).addRange(0x20000, 0x2A6DF).addRange(0x2A700, 0x2B739).addRange(0x2B740, 0x2B81D).addRange(0x2B820, 0x2CEA1).addRange(0x2CEB0, 0x2EBE0).addRange(0x2EBF0, 0x2EE5D);\nset.addRange(0x2F800, 0x2FA1D).addRange(0x30000, 0x3134A).addRange(0x31350, 0x323AF);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x0, 0x10FFFF);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x30, 0x39).addRange(0x41, 0x46).addRange(0x61, 0x66);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x0, 0x7F);\nexports.characters = set;\n","const set = require('regenerate')(0x38C, 0x85E, 0x9B2, 0x9D7, 0xA3C, 0xA51, 0xA5E, 0xAD0, 0xB9C, 0xBD0, 0xBD7, 0xC5D, 0xDBD, 0xDCA, 0xDD6, 0xE84, 0xEA5, 0xEC6, 0x10C7, 0x10CD, 0x1258, 0x12C0, 0x1940, 0x1F59, 0x1F5B, 0x1F5D, 0x2D27, 0x2D2D, 0xA7D3, 0xFB3E, 0xFDCF, 0xFEFF, 0x101A0, 0x10808, 0x1083C, 0x1093F, 0x110CD, 0x11288, 0x11350, 0x11357, 0x11909, 0x11D3A, 0x11FB0, 0x1B132, 0x1B155, 0x1D4A2, 0x1D4BB, 0x1D546, 0x1E08F, 0x1E2FF, 0x1EE24, 0x1EE27, 0x1EE39, 0x1EE3B, 0x1EE42, 0x1EE47, 0x1EE49, 0x1EE4B, 0x1EE54, 0x1EE57, 0x1EE59, 0x1EE5B, 0x1EE5D, 0x1EE5F, 0x1EE64, 0x1EE7E, 0x1F7F0, 0xE0001);\nset.addRange(0x0, 0x377).addRange(0x37A, 0x37F).addRange(0x384, 0x38A).addRange(0x38E, 0x3A1).addRange(0x3A3, 0x52F).addRange(0x531, 0x556).addRange(0x559, 0x58A).addRange(0x58D, 0x58F).addRange(0x591, 0x5C7).addRange(0x5D0, 0x5EA).addRange(0x5EF, 0x5F4).addRange(0x600, 0x70D).addRange(0x70F, 0x74A).addRange(0x74D, 0x7B1).addRange(0x7C0, 0x7FA).addRange(0x7FD, 0x82D).addRange(0x830, 0x83E).addRange(0x840, 0x85B).addRange(0x860, 0x86A).addRange(0x870, 0x88E).addRange(0x890, 0x891).addRange(0x898, 0x983).addRange(0x985, 0x98C).addRange(0x98F, 0x990).addRange(0x993, 0x9A8).addRange(0x9AA, 0x9B0).addRange(0x9B6, 0x9B9).addRange(0x9BC, 0x9C4).addRange(0x9C7, 0x9C8).addRange(0x9CB, 0x9CE).addRange(0x9DC, 0x9DD).addRange(0x9DF, 0x9E3).addRange(0x9E6, 0x9FE).addRange(0xA01, 0xA03).addRange(0xA05, 0xA0A).addRange(0xA0F, 0xA10).addRange(0xA13, 0xA28).addRange(0xA2A, 0xA30).addRange(0xA32, 0xA33).addRange(0xA35, 0xA36).addRange(0xA38, 0xA39).addRange(0xA3E, 0xA42).addRange(0xA47, 0xA48).addRange(0xA4B, 0xA4D).addRange(0xA59, 0xA5C).addRange(0xA66, 0xA76).addRange(0xA81, 0xA83).addRange(0xA85, 0xA8D).addRange(0xA8F, 0xA91).addRange(0xA93, 0xAA8).addRange(0xAAA, 0xAB0);\nset.addRange(0xAB2, 0xAB3).addRange(0xAB5, 0xAB9).addRange(0xABC, 0xAC5).addRange(0xAC7, 0xAC9).addRange(0xACB, 0xACD).addRange(0xAE0, 0xAE3).addRange(0xAE6, 0xAF1).addRange(0xAF9, 0xAFF).addRange(0xB01, 0xB03).addRange(0xB05, 0xB0C).addRange(0xB0F, 0xB10).addRange(0xB13, 0xB28).addRange(0xB2A, 0xB30).addRange(0xB32, 0xB33).addRange(0xB35, 0xB39).addRange(0xB3C, 0xB44).addRange(0xB47, 0xB48).addRange(0xB4B, 0xB4D).addRange(0xB55, 0xB57).addRange(0xB5C, 0xB5D).addRange(0xB5F, 0xB63).addRange(0xB66, 0xB77).addRange(0xB82, 0xB83).addRange(0xB85, 0xB8A).addRange(0xB8E, 0xB90).addRange(0xB92, 0xB95).addRange(0xB99, 0xB9A).addRange(0xB9E, 0xB9F).addRange(0xBA3, 0xBA4).addRange(0xBA8, 0xBAA).addRange(0xBAE, 0xBB9).addRange(0xBBE, 0xBC2).addRange(0xBC6, 0xBC8).addRange(0xBCA, 0xBCD).addRange(0xBE6, 0xBFA).addRange(0xC00, 0xC0C).addRange(0xC0E, 0xC10).addRange(0xC12, 0xC28).addRange(0xC2A, 0xC39).addRange(0xC3C, 0xC44).addRange(0xC46, 0xC48).addRange(0xC4A, 0xC4D).addRange(0xC55, 0xC56).addRange(0xC58, 0xC5A).addRange(0xC60, 0xC63).addRange(0xC66, 0xC6F).addRange(0xC77, 0xC8C).addRange(0xC8E, 0xC90).addRange(0xC92, 0xCA8).addRange(0xCAA, 0xCB3).addRange(0xCB5, 0xCB9);\nset.addRange(0xCBC, 0xCC4).addRange(0xCC6, 0xCC8).addRange(0xCCA, 0xCCD).addRange(0xCD5, 0xCD6).addRange(0xCDD, 0xCDE).addRange(0xCE0, 0xCE3).addRange(0xCE6, 0xCEF).addRange(0xCF1, 0xCF3).addRange(0xD00, 0xD0C).addRange(0xD0E, 0xD10).addRange(0xD12, 0xD44).addRange(0xD46, 0xD48).addRange(0xD4A, 0xD4F).addRange(0xD54, 0xD63).addRange(0xD66, 0xD7F).addRange(0xD81, 0xD83).addRange(0xD85, 0xD96).addRange(0xD9A, 0xDB1).addRange(0xDB3, 0xDBB).addRange(0xDC0, 0xDC6).addRange(0xDCF, 0xDD4).addRange(0xDD8, 0xDDF).addRange(0xDE6, 0xDEF).addRange(0xDF2, 0xDF4).addRange(0xE01, 0xE3A).addRange(0xE3F, 0xE5B).addRange(0xE81, 0xE82).addRange(0xE86, 0xE8A).addRange(0xE8C, 0xEA3).addRange(0xEA7, 0xEBD).addRange(0xEC0, 0xEC4).addRange(0xEC8, 0xECE).addRange(0xED0, 0xED9).addRange(0xEDC, 0xEDF).addRange(0xF00, 0xF47).addRange(0xF49, 0xF6C).addRange(0xF71, 0xF97).addRange(0xF99, 0xFBC).addRange(0xFBE, 0xFCC).addRange(0xFCE, 0xFDA).addRange(0x1000, 0x10C5).addRange(0x10D0, 0x1248).addRange(0x124A, 0x124D).addRange(0x1250, 0x1256).addRange(0x125A, 0x125D).addRange(0x1260, 0x1288).addRange(0x128A, 0x128D).addRange(0x1290, 0x12B0).addRange(0x12B2, 0x12B5).addRange(0x12B8, 0x12BE).addRange(0x12C2, 0x12C5);\nset.addRange(0x12C8, 0x12D6).addRange(0x12D8, 0x1310).addRange(0x1312, 0x1315).addRange(0x1318, 0x135A).addRange(0x135D, 0x137C).addRange(0x1380, 0x1399).addRange(0x13A0, 0x13F5).addRange(0x13F8, 0x13FD).addRange(0x1400, 0x169C).addRange(0x16A0, 0x16F8).addRange(0x1700, 0x1715).addRange(0x171F, 0x1736).addRange(0x1740, 0x1753).addRange(0x1760, 0x176C).addRange(0x176E, 0x1770).addRange(0x1772, 0x1773).addRange(0x1780, 0x17DD).addRange(0x17E0, 0x17E9).addRange(0x17F0, 0x17F9).addRange(0x1800, 0x1819).addRange(0x1820, 0x1878).addRange(0x1880, 0x18AA).addRange(0x18B0, 0x18F5).addRange(0x1900, 0x191E).addRange(0x1920, 0x192B).addRange(0x1930, 0x193B).addRange(0x1944, 0x196D).addRange(0x1970, 0x1974).addRange(0x1980, 0x19AB).addRange(0x19B0, 0x19C9).addRange(0x19D0, 0x19DA).addRange(0x19DE, 0x1A1B).addRange(0x1A1E, 0x1A5E).addRange(0x1A60, 0x1A7C).addRange(0x1A7F, 0x1A89).addRange(0x1A90, 0x1A99).addRange(0x1AA0, 0x1AAD).addRange(0x1AB0, 0x1ACE).addRange(0x1B00, 0x1B4C).addRange(0x1B50, 0x1B7E).addRange(0x1B80, 0x1BF3).addRange(0x1BFC, 0x1C37).addRange(0x1C3B, 0x1C49).addRange(0x1C4D, 0x1C88).addRange(0x1C90, 0x1CBA).addRange(0x1CBD, 0x1CC7).addRange(0x1CD0, 0x1CFA).addRange(0x1D00, 0x1F15).addRange(0x1F18, 0x1F1D).addRange(0x1F20, 0x1F45).addRange(0x1F48, 0x1F4D);\nset.addRange(0x1F50, 0x1F57).addRange(0x1F5F, 0x1F7D).addRange(0x1F80, 0x1FB4).addRange(0x1FB6, 0x1FC4).addRange(0x1FC6, 0x1FD3).addRange(0x1FD6, 0x1FDB).addRange(0x1FDD, 0x1FEF).addRange(0x1FF2, 0x1FF4).addRange(0x1FF6, 0x1FFE).addRange(0x2000, 0x2064).addRange(0x2066, 0x2071).addRange(0x2074, 0x208E).addRange(0x2090, 0x209C).addRange(0x20A0, 0x20C0).addRange(0x20D0, 0x20F0).addRange(0x2100, 0x218B).addRange(0x2190, 0x2426).addRange(0x2440, 0x244A).addRange(0x2460, 0x2B73).addRange(0x2B76, 0x2B95).addRange(0x2B97, 0x2CF3).addRange(0x2CF9, 0x2D25).addRange(0x2D30, 0x2D67).addRange(0x2D6F, 0x2D70).addRange(0x2D7F, 0x2D96).addRange(0x2DA0, 0x2DA6).addRange(0x2DA8, 0x2DAE).addRange(0x2DB0, 0x2DB6).addRange(0x2DB8, 0x2DBE).addRange(0x2DC0, 0x2DC6).addRange(0x2DC8, 0x2DCE).addRange(0x2DD0, 0x2DD6).addRange(0x2DD8, 0x2DDE).addRange(0x2DE0, 0x2E5D).addRange(0x2E80, 0x2E99).addRange(0x2E9B, 0x2EF3).addRange(0x2F00, 0x2FD5).addRange(0x2FF0, 0x303F).addRange(0x3041, 0x3096).addRange(0x3099, 0x30FF).addRange(0x3105, 0x312F).addRange(0x3131, 0x318E).addRange(0x3190, 0x31E3).addRange(0x31EF, 0x321E).addRange(0x3220, 0xA48C).addRange(0xA490, 0xA4C6).addRange(0xA4D0, 0xA62B).addRange(0xA640, 0xA6F7).addRange(0xA700, 0xA7CA).addRange(0xA7D0, 0xA7D1).addRange(0xA7D5, 0xA7D9);\nset.addRange(0xA7F2, 0xA82C).addRange(0xA830, 0xA839).addRange(0xA840, 0xA877).addRange(0xA880, 0xA8C5).addRange(0xA8CE, 0xA8D9).addRange(0xA8E0, 0xA953).addRange(0xA95F, 0xA97C).addRange(0xA980, 0xA9CD).addRange(0xA9CF, 0xA9D9).addRange(0xA9DE, 0xA9FE).addRange(0xAA00, 0xAA36).addRange(0xAA40, 0xAA4D).addRange(0xAA50, 0xAA59).addRange(0xAA5C, 0xAAC2).addRange(0xAADB, 0xAAF6).addRange(0xAB01, 0xAB06).addRange(0xAB09, 0xAB0E).addRange(0xAB11, 0xAB16).addRange(0xAB20, 0xAB26).addRange(0xAB28, 0xAB2E).addRange(0xAB30, 0xAB6B).addRange(0xAB70, 0xABED).addRange(0xABF0, 0xABF9).addRange(0xAC00, 0xD7A3).addRange(0xD7B0, 0xD7C6).addRange(0xD7CB, 0xD7FB).addRange(0xD800, 0xFA6D).addRange(0xFA70, 0xFAD9).addRange(0xFB00, 0xFB06).addRange(0xFB13, 0xFB17).addRange(0xFB1D, 0xFB36).addRange(0xFB38, 0xFB3C).addRange(0xFB40, 0xFB41).addRange(0xFB43, 0xFB44).addRange(0xFB46, 0xFBC2).addRange(0xFBD3, 0xFD8F).addRange(0xFD92, 0xFDC7).addRange(0xFDF0, 0xFE19).addRange(0xFE20, 0xFE52).addRange(0xFE54, 0xFE66).addRange(0xFE68, 0xFE6B).addRange(0xFE70, 0xFE74).addRange(0xFE76, 0xFEFC).addRange(0xFF01, 0xFFBE).addRange(0xFFC2, 0xFFC7).addRange(0xFFCA, 0xFFCF).addRange(0xFFD2, 0xFFD7).addRange(0xFFDA, 0xFFDC).addRange(0xFFE0, 0xFFE6).addRange(0xFFE8, 0xFFEE).addRange(0xFFF9, 0xFFFD);\nset.addRange(0x10000, 0x1000B).addRange(0x1000D, 0x10026).addRange(0x10028, 0x1003A).addRange(0x1003C, 0x1003D).addRange(0x1003F, 0x1004D).addRange(0x10050, 0x1005D).addRange(0x10080, 0x100FA).addRange(0x10100, 0x10102).addRange(0x10107, 0x10133).addRange(0x10137, 0x1018E).addRange(0x10190, 0x1019C).addRange(0x101D0, 0x101FD).addRange(0x10280, 0x1029C).addRange(0x102A0, 0x102D0).addRange(0x102E0, 0x102FB).addRange(0x10300, 0x10323).addRange(0x1032D, 0x1034A).addRange(0x10350, 0x1037A).addRange(0x10380, 0x1039D).addRange(0x1039F, 0x103C3).addRange(0x103C8, 0x103D5).addRange(0x10400, 0x1049D).addRange(0x104A0, 0x104A9).addRange(0x104B0, 0x104D3).addRange(0x104D8, 0x104FB).addRange(0x10500, 0x10527).addRange(0x10530, 0x10563).addRange(0x1056F, 0x1057A).addRange(0x1057C, 0x1058A).addRange(0x1058C, 0x10592).addRange(0x10594, 0x10595).addRange(0x10597, 0x105A1).addRange(0x105A3, 0x105B1).addRange(0x105B3, 0x105B9).addRange(0x105BB, 0x105BC).addRange(0x10600, 0x10736).addRange(0x10740, 0x10755).addRange(0x10760, 0x10767).addRange(0x10780, 0x10785).addRange(0x10787, 0x107B0).addRange(0x107B2, 0x107BA).addRange(0x10800, 0x10805).addRange(0x1080A, 0x10835).addRange(0x10837, 0x10838).addRange(0x1083F, 0x10855).addRange(0x10857, 0x1089E).addRange(0x108A7, 0x108AF).addRange(0x108E0, 0x108F2).addRange(0x108F4, 0x108F5).addRange(0x108FB, 0x1091B).addRange(0x1091F, 0x10939);\nset.addRange(0x10980, 0x109B7).addRange(0x109BC, 0x109CF).addRange(0x109D2, 0x10A03).addRange(0x10A05, 0x10A06).addRange(0x10A0C, 0x10A13).addRange(0x10A15, 0x10A17).addRange(0x10A19, 0x10A35).addRange(0x10A38, 0x10A3A).addRange(0x10A3F, 0x10A48).addRange(0x10A50, 0x10A58).addRange(0x10A60, 0x10A9F).addRange(0x10AC0, 0x10AE6).addRange(0x10AEB, 0x10AF6).addRange(0x10B00, 0x10B35).addRange(0x10B39, 0x10B55).addRange(0x10B58, 0x10B72).addRange(0x10B78, 0x10B91).addRange(0x10B99, 0x10B9C).addRange(0x10BA9, 0x10BAF).addRange(0x10C00, 0x10C48).addRange(0x10C80, 0x10CB2).addRange(0x10CC0, 0x10CF2).addRange(0x10CFA, 0x10D27).addRange(0x10D30, 0x10D39).addRange(0x10E60, 0x10E7E).addRange(0x10E80, 0x10EA9).addRange(0x10EAB, 0x10EAD).addRange(0x10EB0, 0x10EB1).addRange(0x10EFD, 0x10F27).addRange(0x10F30, 0x10F59).addRange(0x10F70, 0x10F89).addRange(0x10FB0, 0x10FCB).addRange(0x10FE0, 0x10FF6).addRange(0x11000, 0x1104D).addRange(0x11052, 0x11075).addRange(0x1107F, 0x110C2).addRange(0x110D0, 0x110E8).addRange(0x110F0, 0x110F9).addRange(0x11100, 0x11134).addRange(0x11136, 0x11147).addRange(0x11150, 0x11176).addRange(0x11180, 0x111DF).addRange(0x111E1, 0x111F4).addRange(0x11200, 0x11211).addRange(0x11213, 0x11241).addRange(0x11280, 0x11286).addRange(0x1128A, 0x1128D).addRange(0x1128F, 0x1129D).addRange(0x1129F, 0x112A9).addRange(0x112B0, 0x112EA).addRange(0x112F0, 0x112F9);\nset.addRange(0x11300, 0x11303).addRange(0x11305, 0x1130C).addRange(0x1130F, 0x11310).addRange(0x11313, 0x11328).addRange(0x1132A, 0x11330).addRange(0x11332, 0x11333).addRange(0x11335, 0x11339).addRange(0x1133B, 0x11344).addRange(0x11347, 0x11348).addRange(0x1134B, 0x1134D).addRange(0x1135D, 0x11363).addRange(0x11366, 0x1136C).addRange(0x11370, 0x11374).addRange(0x11400, 0x1145B).addRange(0x1145D, 0x11461).addRange(0x11480, 0x114C7).addRange(0x114D0, 0x114D9).addRange(0x11580, 0x115B5).addRange(0x115B8, 0x115DD).addRange(0x11600, 0x11644).addRange(0x11650, 0x11659).addRange(0x11660, 0x1166C).addRange(0x11680, 0x116B9).addRange(0x116C0, 0x116C9).addRange(0x11700, 0x1171A).addRange(0x1171D, 0x1172B).addRange(0x11730, 0x11746).addRange(0x11800, 0x1183B).addRange(0x118A0, 0x118F2).addRange(0x118FF, 0x11906).addRange(0x1190C, 0x11913).addRange(0x11915, 0x11916).addRange(0x11918, 0x11935).addRange(0x11937, 0x11938).addRange(0x1193B, 0x11946).addRange(0x11950, 0x11959).addRange(0x119A0, 0x119A7).addRange(0x119AA, 0x119D7).addRange(0x119DA, 0x119E4).addRange(0x11A00, 0x11A47).addRange(0x11A50, 0x11AA2).addRange(0x11AB0, 0x11AF8).addRange(0x11B00, 0x11B09).addRange(0x11C00, 0x11C08).addRange(0x11C0A, 0x11C36).addRange(0x11C38, 0x11C45).addRange(0x11C50, 0x11C6C).addRange(0x11C70, 0x11C8F).addRange(0x11C92, 0x11CA7).addRange(0x11CA9, 0x11CB6).addRange(0x11D00, 0x11D06);\nset.addRange(0x11D08, 0x11D09).addRange(0x11D0B, 0x11D36).addRange(0x11D3C, 0x11D3D).addRange(0x11D3F, 0x11D47).addRange(0x11D50, 0x11D59).addRange(0x11D60, 0x11D65).addRange(0x11D67, 0x11D68).addRange(0x11D6A, 0x11D8E).addRange(0x11D90, 0x11D91).addRange(0x11D93, 0x11D98).addRange(0x11DA0, 0x11DA9).addRange(0x11EE0, 0x11EF8).addRange(0x11F00, 0x11F10).addRange(0x11F12, 0x11F3A).addRange(0x11F3E, 0x11F59).addRange(0x11FC0, 0x11FF1).addRange(0x11FFF, 0x12399).addRange(0x12400, 0x1246E).addRange(0x12470, 0x12474).addRange(0x12480, 0x12543).addRange(0x12F90, 0x12FF2).addRange(0x13000, 0x13455).addRange(0x14400, 0x14646).addRange(0x16800, 0x16A38).addRange(0x16A40, 0x16A5E).addRange(0x16A60, 0x16A69).addRange(0x16A6E, 0x16ABE).addRange(0x16AC0, 0x16AC9).addRange(0x16AD0, 0x16AED).addRange(0x16AF0, 0x16AF5).addRange(0x16B00, 0x16B45).addRange(0x16B50, 0x16B59).addRange(0x16B5B, 0x16B61).addRange(0x16B63, 0x16B77).addRange(0x16B7D, 0x16B8F).addRange(0x16E40, 0x16E9A).addRange(0x16F00, 0x16F4A).addRange(0x16F4F, 0x16F87).addRange(0x16F8F, 0x16F9F).addRange(0x16FE0, 0x16FE4).addRange(0x16FF0, 0x16FF1).addRange(0x17000, 0x187F7).addRange(0x18800, 0x18CD5).addRange(0x18D00, 0x18D08).addRange(0x1AFF0, 0x1AFF3).addRange(0x1AFF5, 0x1AFFB).addRange(0x1AFFD, 0x1AFFE).addRange(0x1B000, 0x1B122).addRange(0x1B150, 0x1B152).addRange(0x1B164, 0x1B167).addRange(0x1B170, 0x1B2FB);\nset.addRange(0x1BC00, 0x1BC6A).addRange(0x1BC70, 0x1BC7C).addRange(0x1BC80, 0x1BC88).addRange(0x1BC90, 0x1BC99).addRange(0x1BC9C, 0x1BCA3).addRange(0x1CF00, 0x1CF2D).addRange(0x1CF30, 0x1CF46).addRange(0x1CF50, 0x1CFC3).addRange(0x1D000, 0x1D0F5).addRange(0x1D100, 0x1D126).addRange(0x1D129, 0x1D1EA).addRange(0x1D200, 0x1D245).addRange(0x1D2C0, 0x1D2D3).addRange(0x1D2E0, 0x1D2F3).addRange(0x1D300, 0x1D356).addRange(0x1D360, 0x1D378).addRange(0x1D400, 0x1D454).addRange(0x1D456, 0x1D49C).addRange(0x1D49E, 0x1D49F).addRange(0x1D4A5, 0x1D4A6).addRange(0x1D4A9, 0x1D4AC).addRange(0x1D4AE, 0x1D4B9).addRange(0x1D4BD, 0x1D4C3).addRange(0x1D4C5, 0x1D505).addRange(0x1D507, 0x1D50A).addRange(0x1D50D, 0x1D514).addRange(0x1D516, 0x1D51C).addRange(0x1D51E, 0x1D539).addRange(0x1D53B, 0x1D53E).addRange(0x1D540, 0x1D544).addRange(0x1D54A, 0x1D550).addRange(0x1D552, 0x1D6A5).addRange(0x1D6A8, 0x1D7CB).addRange(0x1D7CE, 0x1DA8B).addRange(0x1DA9B, 0x1DA9F).addRange(0x1DAA1, 0x1DAAF).addRange(0x1DF00, 0x1DF1E).addRange(0x1DF25, 0x1DF2A).addRange(0x1E000, 0x1E006).addRange(0x1E008, 0x1E018).addRange(0x1E01B, 0x1E021).addRange(0x1E023, 0x1E024).addRange(0x1E026, 0x1E02A).addRange(0x1E030, 0x1E06D).addRange(0x1E100, 0x1E12C).addRange(0x1E130, 0x1E13D).addRange(0x1E140, 0x1E149).addRange(0x1E14E, 0x1E14F).addRange(0x1E290, 0x1E2AE).addRange(0x1E2C0, 0x1E2F9).addRange(0x1E4D0, 0x1E4F9);\nset.addRange(0x1E7E0, 0x1E7E6).addRange(0x1E7E8, 0x1E7EB).addRange(0x1E7ED, 0x1E7EE).addRange(0x1E7F0, 0x1E7FE).addRange(0x1E800, 0x1E8C4).addRange(0x1E8C7, 0x1E8D6).addRange(0x1E900, 0x1E94B).addRange(0x1E950, 0x1E959).addRange(0x1E95E, 0x1E95F).addRange(0x1EC71, 0x1ECB4).addRange(0x1ED01, 0x1ED3D).addRange(0x1EE00, 0x1EE03).addRange(0x1EE05, 0x1EE1F).addRange(0x1EE21, 0x1EE22).addRange(0x1EE29, 0x1EE32).addRange(0x1EE34, 0x1EE37).addRange(0x1EE4D, 0x1EE4F).addRange(0x1EE51, 0x1EE52).addRange(0x1EE61, 0x1EE62).addRange(0x1EE67, 0x1EE6A).addRange(0x1EE6C, 0x1EE72).addRange(0x1EE74, 0x1EE77).addRange(0x1EE79, 0x1EE7C).addRange(0x1EE80, 0x1EE89).addRange(0x1EE8B, 0x1EE9B).addRange(0x1EEA1, 0x1EEA3).addRange(0x1EEA5, 0x1EEA9).addRange(0x1EEAB, 0x1EEBB).addRange(0x1EEF0, 0x1EEF1).addRange(0x1F000, 0x1F02B).addRange(0x1F030, 0x1F093).addRange(0x1F0A0, 0x1F0AE).addRange(0x1F0B1, 0x1F0BF).addRange(0x1F0C1, 0x1F0CF).addRange(0x1F0D1, 0x1F0F5).addRange(0x1F100, 0x1F1AD).addRange(0x1F1E6, 0x1F202).addRange(0x1F210, 0x1F23B).addRange(0x1F240, 0x1F248).addRange(0x1F250, 0x1F251).addRange(0x1F260, 0x1F265).addRange(0x1F300, 0x1F6D7).addRange(0x1F6DC, 0x1F6EC).addRange(0x1F6F0, 0x1F6FC).addRange(0x1F700, 0x1F776).addRange(0x1F77B, 0x1F7D9).addRange(0x1F7E0, 0x1F7EB).addRange(0x1F800, 0x1F80B).addRange(0x1F810, 0x1F847).addRange(0x1F850, 0x1F859).addRange(0x1F860, 0x1F887);\nset.addRange(0x1F890, 0x1F8AD).addRange(0x1F8B0, 0x1F8B1).addRange(0x1F900, 0x1FA53).addRange(0x1FA60, 0x1FA6D).addRange(0x1FA70, 0x1FA7C).addRange(0x1FA80, 0x1FA88).addRange(0x1FA90, 0x1FABD).addRange(0x1FABF, 0x1FAC5).addRange(0x1FACE, 0x1FADB).addRange(0x1FAE0, 0x1FAE8).addRange(0x1FAF0, 0x1FAF8).addRange(0x1FB00, 0x1FB92).addRange(0x1FB94, 0x1FBCA).addRange(0x1FBF0, 0x1FBF9).addRange(0x20000, 0x2A6DF).addRange(0x2A700, 0x2B739).addRange(0x2B740, 0x2B81D).addRange(0x2B820, 0x2CEA1).addRange(0x2CEB0, 0x2EBE0).addRange(0x2EBF0, 0x2EE5D).addRange(0x2F800, 0x2FA1D).addRange(0x30000, 0x3134A).addRange(0x31350, 0x323AF).addRange(0xE0020, 0xE007F).addRange(0xE0100, 0xE01EF).addRange(0xF0000, 0xFFFFD).addRange(0x100000, 0x10FFFD);\nexports.characters = set;\n","const set = require('regenerate')(0x61C);\nset.addRange(0x200E, 0x200F).addRange(0x202A, 0x202E).addRange(0x2066, 0x2069);\nexports.characters = set;\n","const set = require('regenerate')(0x3C, 0x3E, 0x5B, 0x5D, 0x7B, 0x7D, 0xAB, 0xBB, 0x2140, 0x2211, 0x2224, 0x2226, 0x2239, 0x2262, 0x2298, 0x27C0, 0x29B8, 0x29C9, 0x29E1, 0x2A24, 0x2A26, 0x2A29, 0x2ADC, 0x2ADE, 0x2AF3, 0x2AFD, 0x2BFE, 0xFF1C, 0xFF1E, 0xFF3B, 0xFF3D, 0xFF5B, 0xFF5D, 0x1D6DB, 0x1D715, 0x1D74F, 0x1D789, 0x1D7C3);\nset.addRange(0x28, 0x29).addRange(0xF3A, 0xF3D).addRange(0x169B, 0x169C).addRange(0x2039, 0x203A).addRange(0x2045, 0x2046).addRange(0x207D, 0x207E).addRange(0x208D, 0x208E).addRange(0x2201, 0x2204).addRange(0x2208, 0x220D).addRange(0x2215, 0x2216).addRange(0x221A, 0x221D).addRange(0x221F, 0x2222).addRange(0x222B, 0x2233).addRange(0x223B, 0x224C).addRange(0x2252, 0x2255).addRange(0x225F, 0x2260).addRange(0x2264, 0x226B).addRange(0x226E, 0x228C).addRange(0x228F, 0x2292).addRange(0x22A2, 0x22A3).addRange(0x22A6, 0x22B8).addRange(0x22BE, 0x22BF).addRange(0x22C9, 0x22CD).addRange(0x22D0, 0x22D1).addRange(0x22D6, 0x22ED).addRange(0x22F0, 0x22FF).addRange(0x2308, 0x230B).addRange(0x2320, 0x2321).addRange(0x2329, 0x232A).addRange(0x2768, 0x2775).addRange(0x27C3, 0x27C6).addRange(0x27C8, 0x27C9).addRange(0x27CB, 0x27CD).addRange(0x27D3, 0x27D6).addRange(0x27DC, 0x27DE).addRange(0x27E2, 0x27EF).addRange(0x2983, 0x2998).addRange(0x299B, 0x29A0).addRange(0x29A2, 0x29AF).addRange(0x29C0, 0x29C5).addRange(0x29CE, 0x29D2).addRange(0x29D4, 0x29D5).addRange(0x29D8, 0x29DC).addRange(0x29E3, 0x29E5).addRange(0x29E8, 0x29E9).addRange(0x29F4, 0x29F9).addRange(0x29FC, 0x29FD).addRange(0x2A0A, 0x2A1C).addRange(0x2A1E, 0x2A21).addRange(0x2A2B, 0x2A2E).addRange(0x2A34, 0x2A35);\nset.addRange(0x2A3C, 0x2A3E).addRange(0x2A57, 0x2A58).addRange(0x2A64, 0x2A65).addRange(0x2A6A, 0x2A6D).addRange(0x2A6F, 0x2A70).addRange(0x2A73, 0x2A74).addRange(0x2A79, 0x2AA3).addRange(0x2AA6, 0x2AAD).addRange(0x2AAF, 0x2AD6).addRange(0x2AE2, 0x2AE6).addRange(0x2AEC, 0x2AEE).addRange(0x2AF7, 0x2AFB).addRange(0x2E02, 0x2E05).addRange(0x2E09, 0x2E0A).addRange(0x2E0C, 0x2E0D).addRange(0x2E1C, 0x2E1D).addRange(0x2E20, 0x2E29).addRange(0x2E55, 0x2E5C).addRange(0x3008, 0x3011).addRange(0x3014, 0x301B).addRange(0xFE59, 0xFE5E).addRange(0xFE64, 0xFE65).addRange(0xFF08, 0xFF09).addRange(0xFF5F, 0xFF60).addRange(0xFF62, 0xFF63);\nexports.characters = set;\n","const set = require('regenerate')(0x27, 0x2E, 0x3A, 0x5E, 0x60, 0xA8, 0xAD, 0xAF, 0xB4, 0x37A, 0x387, 0x559, 0x55F, 0x5BF, 0x5C7, 0x5F4, 0x61C, 0x640, 0x670, 0x70F, 0x711, 0x7FA, 0x7FD, 0x888, 0x93A, 0x93C, 0x94D, 0x971, 0x981, 0x9BC, 0x9CD, 0x9FE, 0xA3C, 0xA51, 0xA75, 0xABC, 0xACD, 0xB01, 0xB3C, 0xB3F, 0xB4D, 0xB82, 0xBC0, 0xBCD, 0xC00, 0xC04, 0xC3C, 0xC81, 0xCBC, 0xCBF, 0xCC6, 0xD4D, 0xD81, 0xDCA, 0xDD6, 0xE31, 0xEB1, 0xEC6, 0xF35, 0xF37, 0xF39, 0xFC6, 0x1082, 0x108D, 0x109D, 0x10FC, 0x17C6, 0x17D7, 0x17DD, 0x1843, 0x18A9, 0x1932, 0x1A1B, 0x1A56, 0x1A60, 0x1A62, 0x1A7F, 0x1AA7, 0x1B34, 0x1B3C, 0x1B42, 0x1BE6, 0x1BED, 0x1CED, 0x1CF4, 0x1D78, 0x1FBD, 0x2024, 0x2027, 0x2071, 0x207F, 0x2D6F, 0x2D7F, 0x2E2F, 0x3005, 0x303B, 0xA015, 0xA60C, 0xA67F, 0xA770, 0xA802, 0xA806, 0xA80B, 0xA82C, 0xA8FF, 0xA9B3, 0xA9CF, 0xAA43, 0xAA4C, 0xAA70, 0xAA7C, 0xAAB0, 0xAAC1, 0xAADD, 0xAAF6, 0xABE5, 0xABE8, 0xABED, 0xFB1E, 0xFE13, 0xFE52, 0xFE55, 0xFEFF, 0xFF07, 0xFF0E, 0xFF1A, 0xFF3E, 0xFF40, 0xFF70, 0xFFE3, 0x101FD, 0x102E0, 0x10A3F, 0x11001, 0x11070, 0x110BD, 0x110C2, 0x110CD, 0x11173, 0x111CF, 0x11234, 0x1123E, 0x11241, 0x112DF, 0x11340, 0x11446, 0x1145E, 0x114BA, 0x1163D, 0x116AB, 0x116AD, 0x116B7, 0x1193E, 0x11943, 0x119E0, 0x11A47, 0x11C3F, 0x11D3A, 0x11D47, 0x11D95, 0x11D97, 0x11F40, 0x11F42, 0x16F4F, 0x1DA75, 0x1DA84, 0x1E08F, 0x1E2AE, 0xE0001);\nset.addRange(0xB7, 0xB8).addRange(0x2B0, 0x36F).addRange(0x374, 0x375).addRange(0x384, 0x385).addRange(0x483, 0x489).addRange(0x591, 0x5BD).addRange(0x5C1, 0x5C2).addRange(0x5C4, 0x5C5).addRange(0x600, 0x605).addRange(0x610, 0x61A).addRange(0x64B, 0x65F).addRange(0x6D6, 0x6DD).addRange(0x6DF, 0x6E8).addRange(0x6EA, 0x6ED).addRange(0x730, 0x74A).addRange(0x7A6, 0x7B0).addRange(0x7EB, 0x7F5).addRange(0x816, 0x82D).addRange(0x859, 0x85B).addRange(0x890, 0x891).addRange(0x898, 0x89F).addRange(0x8C9, 0x902).addRange(0x941, 0x948).addRange(0x951, 0x957).addRange(0x962, 0x963).addRange(0x9C1, 0x9C4).addRange(0x9E2, 0x9E3).addRange(0xA01, 0xA02).addRange(0xA41, 0xA42).addRange(0xA47, 0xA48).addRange(0xA4B, 0xA4D).addRange(0xA70, 0xA71).addRange(0xA81, 0xA82).addRange(0xAC1, 0xAC5).addRange(0xAC7, 0xAC8).addRange(0xAE2, 0xAE3).addRange(0xAFA, 0xAFF).addRange(0xB41, 0xB44).addRange(0xB55, 0xB56).addRange(0xB62, 0xB63).addRange(0xC3E, 0xC40).addRange(0xC46, 0xC48).addRange(0xC4A, 0xC4D).addRange(0xC55, 0xC56).addRange(0xC62, 0xC63).addRange(0xCCC, 0xCCD).addRange(0xCE2, 0xCE3).addRange(0xD00, 0xD01).addRange(0xD3B, 0xD3C).addRange(0xD41, 0xD44).addRange(0xD62, 0xD63);\nset.addRange(0xDD2, 0xDD4).addRange(0xE34, 0xE3A).addRange(0xE46, 0xE4E).addRange(0xEB4, 0xEBC).addRange(0xEC8, 0xECE).addRange(0xF18, 0xF19).addRange(0xF71, 0xF7E).addRange(0xF80, 0xF84).addRange(0xF86, 0xF87).addRange(0xF8D, 0xF97).addRange(0xF99, 0xFBC).addRange(0x102D, 0x1030).addRange(0x1032, 0x1037).addRange(0x1039, 0x103A).addRange(0x103D, 0x103E).addRange(0x1058, 0x1059).addRange(0x105E, 0x1060).addRange(0x1071, 0x1074).addRange(0x1085, 0x1086).addRange(0x135D, 0x135F).addRange(0x1712, 0x1714).addRange(0x1732, 0x1733).addRange(0x1752, 0x1753).addRange(0x1772, 0x1773).addRange(0x17B4, 0x17B5).addRange(0x17B7, 0x17BD).addRange(0x17C9, 0x17D3).addRange(0x180B, 0x180F).addRange(0x1885, 0x1886).addRange(0x1920, 0x1922).addRange(0x1927, 0x1928).addRange(0x1939, 0x193B).addRange(0x1A17, 0x1A18).addRange(0x1A58, 0x1A5E).addRange(0x1A65, 0x1A6C).addRange(0x1A73, 0x1A7C).addRange(0x1AB0, 0x1ACE).addRange(0x1B00, 0x1B03).addRange(0x1B36, 0x1B3A).addRange(0x1B6B, 0x1B73).addRange(0x1B80, 0x1B81).addRange(0x1BA2, 0x1BA5).addRange(0x1BA8, 0x1BA9).addRange(0x1BAB, 0x1BAD).addRange(0x1BE8, 0x1BE9).addRange(0x1BEF, 0x1BF1).addRange(0x1C2C, 0x1C33).addRange(0x1C36, 0x1C37).addRange(0x1C78, 0x1C7D).addRange(0x1CD0, 0x1CD2).addRange(0x1CD4, 0x1CE0);\nset.addRange(0x1CE2, 0x1CE8).addRange(0x1CF8, 0x1CF9).addRange(0x1D2C, 0x1D6A).addRange(0x1D9B, 0x1DFF).addRange(0x1FBF, 0x1FC1).addRange(0x1FCD, 0x1FCF).addRange(0x1FDD, 0x1FDF).addRange(0x1FED, 0x1FEF).addRange(0x1FFD, 0x1FFE).addRange(0x200B, 0x200F).addRange(0x2018, 0x2019).addRange(0x202A, 0x202E).addRange(0x2060, 0x2064).addRange(0x2066, 0x206F).addRange(0x2090, 0x209C).addRange(0x20D0, 0x20F0).addRange(0x2C7C, 0x2C7D).addRange(0x2CEF, 0x2CF1).addRange(0x2DE0, 0x2DFF).addRange(0x302A, 0x302D).addRange(0x3031, 0x3035).addRange(0x3099, 0x309E).addRange(0x30FC, 0x30FE).addRange(0xA4F8, 0xA4FD).addRange(0xA66F, 0xA672).addRange(0xA674, 0xA67D).addRange(0xA69C, 0xA69F).addRange(0xA6F0, 0xA6F1).addRange(0xA700, 0xA721).addRange(0xA788, 0xA78A).addRange(0xA7F2, 0xA7F4).addRange(0xA7F8, 0xA7F9).addRange(0xA825, 0xA826).addRange(0xA8C4, 0xA8C5).addRange(0xA8E0, 0xA8F1).addRange(0xA926, 0xA92D).addRange(0xA947, 0xA951).addRange(0xA980, 0xA982).addRange(0xA9B6, 0xA9B9).addRange(0xA9BC, 0xA9BD).addRange(0xA9E5, 0xA9E6).addRange(0xAA29, 0xAA2E).addRange(0xAA31, 0xAA32).addRange(0xAA35, 0xAA36).addRange(0xAAB2, 0xAAB4).addRange(0xAAB7, 0xAAB8).addRange(0xAABE, 0xAABF).addRange(0xAAEC, 0xAAED).addRange(0xAAF3, 0xAAF4).addRange(0xAB5B, 0xAB5F).addRange(0xAB69, 0xAB6B);\nset.addRange(0xFBB2, 0xFBC2).addRange(0xFE00, 0xFE0F).addRange(0xFE20, 0xFE2F).addRange(0xFF9E, 0xFF9F).addRange(0xFFF9, 0xFFFB).addRange(0x10376, 0x1037A).addRange(0x10780, 0x10785).addRange(0x10787, 0x107B0).addRange(0x107B2, 0x107BA).addRange(0x10A01, 0x10A03).addRange(0x10A05, 0x10A06).addRange(0x10A0C, 0x10A0F).addRange(0x10A38, 0x10A3A).addRange(0x10AE5, 0x10AE6).addRange(0x10D24, 0x10D27).addRange(0x10EAB, 0x10EAC).addRange(0x10EFD, 0x10EFF).addRange(0x10F46, 0x10F50).addRange(0x10F82, 0x10F85).addRange(0x11038, 0x11046).addRange(0x11073, 0x11074).addRange(0x1107F, 0x11081).addRange(0x110B3, 0x110B6).addRange(0x110B9, 0x110BA).addRange(0x11100, 0x11102).addRange(0x11127, 0x1112B).addRange(0x1112D, 0x11134).addRange(0x11180, 0x11181).addRange(0x111B6, 0x111BE).addRange(0x111C9, 0x111CC).addRange(0x1122F, 0x11231).addRange(0x11236, 0x11237).addRange(0x112E3, 0x112EA).addRange(0x11300, 0x11301).addRange(0x1133B, 0x1133C).addRange(0x11366, 0x1136C).addRange(0x11370, 0x11374).addRange(0x11438, 0x1143F).addRange(0x11442, 0x11444).addRange(0x114B3, 0x114B8).addRange(0x114BF, 0x114C0).addRange(0x114C2, 0x114C3).addRange(0x115B2, 0x115B5).addRange(0x115BC, 0x115BD).addRange(0x115BF, 0x115C0).addRange(0x115DC, 0x115DD).addRange(0x11633, 0x1163A).addRange(0x1163F, 0x11640).addRange(0x116B0, 0x116B5).addRange(0x1171D, 0x1171F).addRange(0x11722, 0x11725);\nset.addRange(0x11727, 0x1172B).addRange(0x1182F, 0x11837).addRange(0x11839, 0x1183A).addRange(0x1193B, 0x1193C).addRange(0x119D4, 0x119D7).addRange(0x119DA, 0x119DB).addRange(0x11A01, 0x11A0A).addRange(0x11A33, 0x11A38).addRange(0x11A3B, 0x11A3E).addRange(0x11A51, 0x11A56).addRange(0x11A59, 0x11A5B).addRange(0x11A8A, 0x11A96).addRange(0x11A98, 0x11A99).addRange(0x11C30, 0x11C36).addRange(0x11C38, 0x11C3D).addRange(0x11C92, 0x11CA7).addRange(0x11CAA, 0x11CB0).addRange(0x11CB2, 0x11CB3).addRange(0x11CB5, 0x11CB6).addRange(0x11D31, 0x11D36).addRange(0x11D3C, 0x11D3D).addRange(0x11D3F, 0x11D45).addRange(0x11D90, 0x11D91).addRange(0x11EF3, 0x11EF4).addRange(0x11F00, 0x11F01).addRange(0x11F36, 0x11F3A).addRange(0x13430, 0x13440).addRange(0x13447, 0x13455).addRange(0x16AF0, 0x16AF4).addRange(0x16B30, 0x16B36).addRange(0x16B40, 0x16B43).addRange(0x16F8F, 0x16F9F).addRange(0x16FE0, 0x16FE1).addRange(0x16FE3, 0x16FE4).addRange(0x1AFF0, 0x1AFF3).addRange(0x1AFF5, 0x1AFFB).addRange(0x1AFFD, 0x1AFFE).addRange(0x1BC9D, 0x1BC9E).addRange(0x1BCA0, 0x1BCA3).addRange(0x1CF00, 0x1CF2D).addRange(0x1CF30, 0x1CF46).addRange(0x1D167, 0x1D169).addRange(0x1D173, 0x1D182).addRange(0x1D185, 0x1D18B).addRange(0x1D1AA, 0x1D1AD).addRange(0x1D242, 0x1D244).addRange(0x1DA00, 0x1DA36).addRange(0x1DA3B, 0x1DA6C).addRange(0x1DA9B, 0x1DA9F).addRange(0x1DAA1, 0x1DAAF).addRange(0x1E000, 0x1E006);\nset.addRange(0x1E008, 0x1E018).addRange(0x1E01B, 0x1E021).addRange(0x1E023, 0x1E024).addRange(0x1E026, 0x1E02A).addRange(0x1E030, 0x1E06D).addRange(0x1E130, 0x1E13D).addRange(0x1E2EC, 0x1E2EF).addRange(0x1E4EB, 0x1E4EF).addRange(0x1E8D0, 0x1E8D6).addRange(0x1E944, 0x1E94B).addRange(0x1F3FB, 0x1F3FF).addRange(0xE0020, 0xE007F).addRange(0xE0100, 0xE01EF);\nexports.characters = set;\n","const set = require('regenerate')(0xAA, 0xB5, 0xBA, 0x345, 0x37F, 0x386, 0x38C, 0x10C7, 0x10CD, 0x1F59, 0x1F5B, 0x1F5D, 0x1FBE, 0x2071, 0x207F, 0x2102, 0x2107, 0x2115, 0x2124, 0x2126, 0x2128, 0x2139, 0x214E, 0x2D27, 0x2D2D, 0xA7D3, 0x10780, 0x1D4A2, 0x1D4BB, 0x1D546);\nset.addRange(0x41, 0x5A).addRange(0x61, 0x7A).addRange(0xC0, 0xD6).addRange(0xD8, 0xF6).addRange(0xF8, 0x1BA).addRange(0x1BC, 0x1BF).addRange(0x1C4, 0x293).addRange(0x295, 0x2B8).addRange(0x2C0, 0x2C1).addRange(0x2E0, 0x2E4).addRange(0x370, 0x373).addRange(0x376, 0x377).addRange(0x37A, 0x37D).addRange(0x388, 0x38A).addRange(0x38E, 0x3A1).addRange(0x3A3, 0x3F5).addRange(0x3F7, 0x481).addRange(0x48A, 0x52F).addRange(0x531, 0x556).addRange(0x560, 0x588).addRange(0x10A0, 0x10C5).addRange(0x10D0, 0x10FA).addRange(0x10FC, 0x10FF).addRange(0x13A0, 0x13F5).addRange(0x13F8, 0x13FD).addRange(0x1C80, 0x1C88).addRange(0x1C90, 0x1CBA).addRange(0x1CBD, 0x1CBF).addRange(0x1D00, 0x1DBF).addRange(0x1E00, 0x1F15).addRange(0x1F18, 0x1F1D).addRange(0x1F20, 0x1F45).addRange(0x1F48, 0x1F4D).addRange(0x1F50, 0x1F57).addRange(0x1F5F, 0x1F7D).addRange(0x1F80, 0x1FB4).addRange(0x1FB6, 0x1FBC).addRange(0x1FC2, 0x1FC4).addRange(0x1FC6, 0x1FCC).addRange(0x1FD0, 0x1FD3).addRange(0x1FD6, 0x1FDB).addRange(0x1FE0, 0x1FEC).addRange(0x1FF2, 0x1FF4).addRange(0x1FF6, 0x1FFC).addRange(0x2090, 0x209C).addRange(0x210A, 0x2113).addRange(0x2119, 0x211D).addRange(0x212A, 0x212D).addRange(0x212F, 0x2134).addRange(0x213C, 0x213F).addRange(0x2145, 0x2149);\nset.addRange(0x2160, 0x217F).addRange(0x2183, 0x2184).addRange(0x24B6, 0x24E9).addRange(0x2C00, 0x2CE4).addRange(0x2CEB, 0x2CEE).addRange(0x2CF2, 0x2CF3).addRange(0x2D00, 0x2D25).addRange(0xA640, 0xA66D).addRange(0xA680, 0xA69D).addRange(0xA722, 0xA787).addRange(0xA78B, 0xA78E).addRange(0xA790, 0xA7CA).addRange(0xA7D0, 0xA7D1).addRange(0xA7D5, 0xA7D9).addRange(0xA7F2, 0xA7F6).addRange(0xA7F8, 0xA7FA).addRange(0xAB30, 0xAB5A).addRange(0xAB5C, 0xAB69).addRange(0xAB70, 0xABBF).addRange(0xFB00, 0xFB06).addRange(0xFB13, 0xFB17).addRange(0xFF21, 0xFF3A).addRange(0xFF41, 0xFF5A).addRange(0x10400, 0x1044F).addRange(0x104B0, 0x104D3).addRange(0x104D8, 0x104FB).addRange(0x10570, 0x1057A).addRange(0x1057C, 0x1058A).addRange(0x1058C, 0x10592).addRange(0x10594, 0x10595).addRange(0x10597, 0x105A1).addRange(0x105A3, 0x105B1).addRange(0x105B3, 0x105B9).addRange(0x105BB, 0x105BC).addRange(0x10783, 0x10785).addRange(0x10787, 0x107B0).addRange(0x107B2, 0x107BA).addRange(0x10C80, 0x10CB2).addRange(0x10CC0, 0x10CF2).addRange(0x118A0, 0x118DF).addRange(0x16E40, 0x16E7F).addRange(0x1D400, 0x1D454).addRange(0x1D456, 0x1D49C).addRange(0x1D49E, 0x1D49F).addRange(0x1D4A5, 0x1D4A6).addRange(0x1D4A9, 0x1D4AC).addRange(0x1D4AE, 0x1D4B9).addRange(0x1D4BD, 0x1D4C3).addRange(0x1D4C5, 0x1D505).addRange(0x1D507, 0x1D50A).addRange(0x1D50D, 0x1D514);\nset.addRange(0x1D516, 0x1D51C).addRange(0x1D51E, 0x1D539).addRange(0x1D53B, 0x1D53E).addRange(0x1D540, 0x1D544).addRange(0x1D54A, 0x1D550).addRange(0x1D552, 0x1D6A5).addRange(0x1D6A8, 0x1D6C0).addRange(0x1D6C2, 0x1D6DA).addRange(0x1D6DC, 0x1D6FA).addRange(0x1D6FC, 0x1D714).addRange(0x1D716, 0x1D734).addRange(0x1D736, 0x1D74E).addRange(0x1D750, 0x1D76E).addRange(0x1D770, 0x1D788).addRange(0x1D78A, 0x1D7A8).addRange(0x1D7AA, 0x1D7C2).addRange(0x1D7C4, 0x1D7CB).addRange(0x1DF00, 0x1DF09).addRange(0x1DF0B, 0x1DF1E).addRange(0x1DF25, 0x1DF2A).addRange(0x1E030, 0x1E06D).addRange(0x1E900, 0x1E943).addRange(0x1F130, 0x1F149).addRange(0x1F150, 0x1F169).addRange(0x1F170, 0x1F189);\nexports.characters = set;\n","const set = require('regenerate')(0xB5, 0x100, 0x102, 0x104, 0x106, 0x108, 0x10A, 0x10C, 0x10E, 0x110, 0x112, 0x114, 0x116, 0x118, 0x11A, 0x11C, 0x11E, 0x120, 0x122, 0x124, 0x126, 0x128, 0x12A, 0x12C, 0x12E, 0x130, 0x132, 0x134, 0x136, 0x139, 0x13B, 0x13D, 0x13F, 0x141, 0x143, 0x145, 0x147, 0x14C, 0x14E, 0x150, 0x152, 0x154, 0x156, 0x158, 0x15A, 0x15C, 0x15E, 0x160, 0x162, 0x164, 0x166, 0x168, 0x16A, 0x16C, 0x16E, 0x170, 0x172, 0x174, 0x176, 0x17B, 0x17D, 0x17F, 0x184, 0x1A2, 0x1A4, 0x1A9, 0x1AC, 0x1B5, 0x1BC, 0x1CD, 0x1CF, 0x1D1, 0x1D3, 0x1D5, 0x1D7, 0x1D9, 0x1DB, 0x1DE, 0x1E0, 0x1E2, 0x1E4, 0x1E6, 0x1E8, 0x1EA, 0x1EC, 0x1EE, 0x1F4, 0x1FA, 0x1FC, 0x1FE, 0x200, 0x202, 0x204, 0x206, 0x208, 0x20A, 0x20C, 0x20E, 0x210, 0x212, 0x214, 0x216, 0x218, 0x21A, 0x21C, 0x21E, 0x220, 0x222, 0x224, 0x226, 0x228, 0x22A, 0x22C, 0x22E, 0x230, 0x232, 0x241, 0x248, 0x24A, 0x24C, 0x24E, 0x345, 0x370, 0x372, 0x376, 0x37F, 0x386, 0x38C, 0x3C2, 0x3D8, 0x3DA, 0x3DC, 0x3DE, 0x3E0, 0x3E2, 0x3E4, 0x3E6, 0x3E8, 0x3EA, 0x3EC, 0x3EE, 0x3F7, 0x460, 0x462, 0x464, 0x466, 0x468, 0x46A, 0x46C, 0x46E, 0x470, 0x472, 0x474, 0x476, 0x478, 0x47A, 0x47C, 0x47E, 0x480, 0x48A, 0x48C, 0x48E, 0x490, 0x492, 0x494, 0x496, 0x498, 0x49A, 0x49C, 0x49E, 0x4A0, 0x4A2, 0x4A4, 0x4A6, 0x4A8, 0x4AA, 0x4AC, 0x4AE, 0x4B0, 0x4B2, 0x4B4, 0x4B6, 0x4B8, 0x4BA, 0x4BC, 0x4BE, 0x4C3, 0x4C5, 0x4C7, 0x4C9, 0x4CB, 0x4CD, 0x4D0, 0x4D2, 0x4D4, 0x4D6, 0x4D8, 0x4DA, 0x4DC, 0x4DE, 0x4E0, 0x4E2, 0x4E4, 0x4E6, 0x4E8, 0x4EA, 0x4EC, 0x4EE, 0x4F0, 0x4F2, 0x4F4, 0x4F6, 0x4F8, 0x4FA, 0x4FC, 0x4FE, 0x500, 0x502, 0x504, 0x506, 0x508, 0x50A, 0x50C, 0x50E, 0x510, 0x512, 0x514, 0x516, 0x518, 0x51A, 0x51C, 0x51E, 0x520, 0x522, 0x524, 0x526, 0x528, 0x52A, 0x52C, 0x52E, 0x587, 0x10C7, 0x10CD, 0x1E00, 0x1E02, 0x1E04, 0x1E06, 0x1E08, 0x1E0A, 0x1E0C, 0x1E0E, 0x1E10, 0x1E12, 0x1E14, 0x1E16, 0x1E18, 0x1E1A, 0x1E1C, 0x1E1E, 0x1E20, 0x1E22, 0x1E24, 0x1E26, 0x1E28, 0x1E2A, 0x1E2C, 0x1E2E, 0x1E30, 0x1E32, 0x1E34, 0x1E36, 0x1E38, 0x1E3A, 0x1E3C, 0x1E3E, 0x1E40, 0x1E42, 0x1E44, 0x1E46, 0x1E48, 0x1E4A, 0x1E4C, 0x1E4E, 0x1E50, 0x1E52, 0x1E54, 0x1E56, 0x1E58, 0x1E5A, 0x1E5C, 0x1E5E, 0x1E60, 0x1E62, 0x1E64, 0x1E66, 0x1E68, 0x1E6A, 0x1E6C, 0x1E6E, 0x1E70, 0x1E72, 0x1E74, 0x1E76, 0x1E78, 0x1E7A, 0x1E7C, 0x1E7E, 0x1E80, 0x1E82, 0x1E84, 0x1E86, 0x1E88, 0x1E8A, 0x1E8C, 0x1E8E, 0x1E90, 0x1E92, 0x1E94, 0x1E9E, 0x1EA0, 0x1EA2, 0x1EA4, 0x1EA6, 0x1EA8, 0x1EAA, 0x1EAC, 0x1EAE, 0x1EB0, 0x1EB2, 0x1EB4, 0x1EB6, 0x1EB8, 0x1EBA, 0x1EBC, 0x1EBE, 0x1EC0, 0x1EC2, 0x1EC4, 0x1EC6, 0x1EC8, 0x1ECA, 0x1ECC, 0x1ECE, 0x1ED0, 0x1ED2, 0x1ED4, 0x1ED6, 0x1ED8, 0x1EDA, 0x1EDC, 0x1EDE, 0x1EE0, 0x1EE2, 0x1EE4, 0x1EE6, 0x1EE8, 0x1EEA, 0x1EEC, 0x1EEE, 0x1EF0, 0x1EF2, 0x1EF4, 0x1EF6, 0x1EF8, 0x1EFA, 0x1EFC, 0x1EFE, 0x1F59, 0x1F5B, 0x1F5D, 0x1F5F, 0x2126, 0x2132, 0x2183, 0x2C60, 0x2C67, 0x2C69, 0x2C6B, 0x2C72, 0x2C75, 0x2C82, 0x2C84, 0x2C86, 0x2C88, 0x2C8A, 0x2C8C, 0x2C8E, 0x2C90, 0x2C92, 0x2C94, 0x2C96, 0x2C98, 0x2C9A, 0x2C9C, 0x2C9E, 0x2CA0, 0x2CA2, 0x2CA4, 0x2CA6, 0x2CA8, 0x2CAA, 0x2CAC, 0x2CAE, 0x2CB0, 0x2CB2, 0x2CB4, 0x2CB6, 0x2CB8, 0x2CBA, 0x2CBC, 0x2CBE, 0x2CC0, 0x2CC2, 0x2CC4, 0x2CC6, 0x2CC8, 0x2CCA, 0x2CCC, 0x2CCE, 0x2CD0, 0x2CD2, 0x2CD4, 0x2CD6, 0x2CD8, 0x2CDA, 0x2CDC, 0x2CDE, 0x2CE0, 0x2CE2, 0x2CEB, 0x2CED, 0x2CF2, 0xA640, 0xA642, 0xA644, 0xA646, 0xA648, 0xA64A, 0xA64C, 0xA64E, 0xA650, 0xA652, 0xA654, 0xA656, 0xA658, 0xA65A, 0xA65C, 0xA65E, 0xA660, 0xA662, 0xA664, 0xA666, 0xA668, 0xA66A, 0xA66C, 0xA680, 0xA682, 0xA684, 0xA686, 0xA688, 0xA68A, 0xA68C, 0xA68E, 0xA690, 0xA692, 0xA694, 0xA696, 0xA698, 0xA69A, 0xA722, 0xA724, 0xA726, 0xA728, 0xA72A, 0xA72C, 0xA72E, 0xA732, 0xA734, 0xA736, 0xA738, 0xA73A, 0xA73C, 0xA73E, 0xA740, 0xA742, 0xA744, 0xA746, 0xA748, 0xA74A, 0xA74C, 0xA74E, 0xA750, 0xA752, 0xA754, 0xA756, 0xA758, 0xA75A, 0xA75C, 0xA75E, 0xA760, 0xA762, 0xA764, 0xA766, 0xA768, 0xA76A, 0xA76C, 0xA76E, 0xA779, 0xA77B, 0xA780, 0xA782, 0xA784, 0xA786, 0xA78B, 0xA78D, 0xA790, 0xA792, 0xA796, 0xA798, 0xA79A, 0xA79C, 0xA79E, 0xA7A0, 0xA7A2, 0xA7A4, 0xA7A6, 0xA7A8, 0xA7B6, 0xA7B8, 0xA7BA, 0xA7BC, 0xA7BE, 0xA7C0, 0xA7C2, 0xA7C9, 0xA7D0, 0xA7D6, 0xA7D8, 0xA7F5);\nset.addRange(0x41, 0x5A).addRange(0xC0, 0xD6).addRange(0xD8, 0xDF).addRange(0x149, 0x14A).addRange(0x178, 0x179).addRange(0x181, 0x182).addRange(0x186, 0x187).addRange(0x189, 0x18B).addRange(0x18E, 0x191).addRange(0x193, 0x194).addRange(0x196, 0x198).addRange(0x19C, 0x19D).addRange(0x19F, 0x1A0).addRange(0x1A6, 0x1A7).addRange(0x1AE, 0x1AF).addRange(0x1B1, 0x1B3).addRange(0x1B7, 0x1B8).addRange(0x1C4, 0x1C5).addRange(0x1C7, 0x1C8).addRange(0x1CA, 0x1CB).addRange(0x1F1, 0x1F2).addRange(0x1F6, 0x1F8).addRange(0x23A, 0x23B).addRange(0x23D, 0x23E).addRange(0x243, 0x246).addRange(0x388, 0x38A).addRange(0x38E, 0x38F).addRange(0x391, 0x3A1).addRange(0x3A3, 0x3AB).addRange(0x3CF, 0x3D1).addRange(0x3D5, 0x3D6).addRange(0x3F0, 0x3F1).addRange(0x3F4, 0x3F5).addRange(0x3F9, 0x3FA).addRange(0x3FD, 0x42F).addRange(0x4C0, 0x4C1).addRange(0x531, 0x556).addRange(0x10A0, 0x10C5).addRange(0x13F8, 0x13FD).addRange(0x1C80, 0x1C88).addRange(0x1C90, 0x1CBA).addRange(0x1CBD, 0x1CBF).addRange(0x1E9A, 0x1E9B).addRange(0x1F08, 0x1F0F).addRange(0x1F18, 0x1F1D).addRange(0x1F28, 0x1F2F).addRange(0x1F38, 0x1F3F).addRange(0x1F48, 0x1F4D).addRange(0x1F68, 0x1F6F).addRange(0x1F80, 0x1FAF).addRange(0x1FB2, 0x1FB4);\nset.addRange(0x1FB7, 0x1FBC).addRange(0x1FC2, 0x1FC4).addRange(0x1FC7, 0x1FCC).addRange(0x1FD8, 0x1FDB).addRange(0x1FE8, 0x1FEC).addRange(0x1FF2, 0x1FF4).addRange(0x1FF7, 0x1FFC).addRange(0x212A, 0x212B).addRange(0x2160, 0x216F).addRange(0x24B6, 0x24CF).addRange(0x2C00, 0x2C2F).addRange(0x2C62, 0x2C64).addRange(0x2C6D, 0x2C70).addRange(0x2C7E, 0x2C80).addRange(0xA77D, 0xA77E).addRange(0xA7AA, 0xA7AE).addRange(0xA7B0, 0xA7B4).addRange(0xA7C4, 0xA7C7).addRange(0xAB70, 0xABBF).addRange(0xFB00, 0xFB06).addRange(0xFB13, 0xFB17).addRange(0xFF21, 0xFF3A).addRange(0x10400, 0x10427).addRange(0x104B0, 0x104D3).addRange(0x10570, 0x1057A).addRange(0x1057C, 0x1058A).addRange(0x1058C, 0x10592).addRange(0x10594, 0x10595).addRange(0x10C80, 0x10CB2).addRange(0x118A0, 0x118BF).addRange(0x16E40, 0x16E5F).addRange(0x1E900, 0x1E921);\nexports.characters = set;\n","const set = require('regenerate')(0xB5, 0x1BF, 0x259, 0x263, 0x26F, 0x275, 0x27D, 0x280, 0x292, 0x345, 0x37F, 0x386, 0x38C, 0x10C7, 0x10CD, 0x1D79, 0x1D7D, 0x1D8E, 0x1E9E, 0x1F59, 0x1F5B, 0x1F5D, 0x1FBE, 0x2126, 0x2132, 0x214E, 0x2D27, 0x2D2D, 0xAB53);\nset.addRange(0x41, 0x5A).addRange(0x61, 0x7A).addRange(0xC0, 0xD6).addRange(0xD8, 0xF6).addRange(0xF8, 0x137).addRange(0x139, 0x18C).addRange(0x18E, 0x19A).addRange(0x19C, 0x1A9).addRange(0x1AC, 0x1B9).addRange(0x1BC, 0x1BD).addRange(0x1C4, 0x220).addRange(0x222, 0x233).addRange(0x23A, 0x254).addRange(0x256, 0x257).addRange(0x25B, 0x25C).addRange(0x260, 0x261).addRange(0x265, 0x266).addRange(0x268, 0x26C).addRange(0x271, 0x272).addRange(0x282, 0x283).addRange(0x287, 0x28C).addRange(0x29D, 0x29E).addRange(0x370, 0x373).addRange(0x376, 0x377).addRange(0x37B, 0x37D).addRange(0x388, 0x38A).addRange(0x38E, 0x3A1).addRange(0x3A3, 0x3D1).addRange(0x3D5, 0x3F5).addRange(0x3F7, 0x3FB).addRange(0x3FD, 0x481).addRange(0x48A, 0x52F).addRange(0x531, 0x556).addRange(0x561, 0x587).addRange(0x10A0, 0x10C5).addRange(0x10D0, 0x10FA).addRange(0x10FD, 0x10FF).addRange(0x13A0, 0x13F5).addRange(0x13F8, 0x13FD).addRange(0x1C80, 0x1C88).addRange(0x1C90, 0x1CBA).addRange(0x1CBD, 0x1CBF).addRange(0x1E00, 0x1E9B).addRange(0x1EA0, 0x1F15).addRange(0x1F18, 0x1F1D).addRange(0x1F20, 0x1F45).addRange(0x1F48, 0x1F4D).addRange(0x1F50, 0x1F57).addRange(0x1F5F, 0x1F7D).addRange(0x1F80, 0x1FB4).addRange(0x1FB6, 0x1FBC);\nset.addRange(0x1FC2, 0x1FC4).addRange(0x1FC6, 0x1FCC).addRange(0x1FD0, 0x1FD3).addRange(0x1FD6, 0x1FDB).addRange(0x1FE0, 0x1FEC).addRange(0x1FF2, 0x1FF4).addRange(0x1FF6, 0x1FFC).addRange(0x212A, 0x212B).addRange(0x2160, 0x217F).addRange(0x2183, 0x2184).addRange(0x24B6, 0x24E9).addRange(0x2C00, 0x2C70).addRange(0x2C72, 0x2C73).addRange(0x2C75, 0x2C76).addRange(0x2C7E, 0x2CE3).addRange(0x2CEB, 0x2CEE).addRange(0x2CF2, 0x2CF3).addRange(0x2D00, 0x2D25).addRange(0xA640, 0xA66D).addRange(0xA680, 0xA69B).addRange(0xA722, 0xA72F).addRange(0xA732, 0xA76F).addRange(0xA779, 0xA787).addRange(0xA78B, 0xA78D).addRange(0xA790, 0xA794).addRange(0xA796, 0xA7AE).addRange(0xA7B0, 0xA7CA).addRange(0xA7D0, 0xA7D1).addRange(0xA7D6, 0xA7D9).addRange(0xA7F5, 0xA7F6).addRange(0xAB70, 0xABBF).addRange(0xFB00, 0xFB06).addRange(0xFB13, 0xFB17).addRange(0xFF21, 0xFF3A).addRange(0xFF41, 0xFF5A).addRange(0x10400, 0x1044F).addRange(0x104B0, 0x104D3).addRange(0x104D8, 0x104FB).addRange(0x10570, 0x1057A).addRange(0x1057C, 0x1058A).addRange(0x1058C, 0x10592).addRange(0x10594, 0x10595).addRange(0x10597, 0x105A1).addRange(0x105A3, 0x105B1).addRange(0x105B3, 0x105B9).addRange(0x105BB, 0x105BC).addRange(0x10C80, 0x10CB2).addRange(0x10CC0, 0x10CF2).addRange(0x118A0, 0x118DF).addRange(0x16E40, 0x16E7F).addRange(0x1E900, 0x1E943);\nset;\nexports.characters = set;\n","const set = require('regenerate')(0x100, 0x102, 0x104, 0x106, 0x108, 0x10A, 0x10C, 0x10E, 0x110, 0x112, 0x114, 0x116, 0x118, 0x11A, 0x11C, 0x11E, 0x120, 0x122, 0x124, 0x126, 0x128, 0x12A, 0x12C, 0x12E, 0x130, 0x132, 0x134, 0x136, 0x139, 0x13B, 0x13D, 0x13F, 0x141, 0x143, 0x145, 0x147, 0x14A, 0x14C, 0x14E, 0x150, 0x152, 0x154, 0x156, 0x158, 0x15A, 0x15C, 0x15E, 0x160, 0x162, 0x164, 0x166, 0x168, 0x16A, 0x16C, 0x16E, 0x170, 0x172, 0x174, 0x176, 0x17B, 0x17D, 0x184, 0x1A2, 0x1A4, 0x1A9, 0x1AC, 0x1B5, 0x1BC, 0x1CD, 0x1CF, 0x1D1, 0x1D3, 0x1D5, 0x1D7, 0x1D9, 0x1DB, 0x1DE, 0x1E0, 0x1E2, 0x1E4, 0x1E6, 0x1E8, 0x1EA, 0x1EC, 0x1EE, 0x1F4, 0x1FA, 0x1FC, 0x1FE, 0x200, 0x202, 0x204, 0x206, 0x208, 0x20A, 0x20C, 0x20E, 0x210, 0x212, 0x214, 0x216, 0x218, 0x21A, 0x21C, 0x21E, 0x220, 0x222, 0x224, 0x226, 0x228, 0x22A, 0x22C, 0x22E, 0x230, 0x232, 0x241, 0x248, 0x24A, 0x24C, 0x24E, 0x370, 0x372, 0x376, 0x37F, 0x386, 0x38C, 0x3CF, 0x3D8, 0x3DA, 0x3DC, 0x3DE, 0x3E0, 0x3E2, 0x3E4, 0x3E6, 0x3E8, 0x3EA, 0x3EC, 0x3EE, 0x3F4, 0x3F7, 0x460, 0x462, 0x464, 0x466, 0x468, 0x46A, 0x46C, 0x46E, 0x470, 0x472, 0x474, 0x476, 0x478, 0x47A, 0x47C, 0x47E, 0x480, 0x48A, 0x48C, 0x48E, 0x490, 0x492, 0x494, 0x496, 0x498, 0x49A, 0x49C, 0x49E, 0x4A0, 0x4A2, 0x4A4, 0x4A6, 0x4A8, 0x4AA, 0x4AC, 0x4AE, 0x4B0, 0x4B2, 0x4B4, 0x4B6, 0x4B8, 0x4BA, 0x4BC, 0x4BE, 0x4C3, 0x4C5, 0x4C7, 0x4C9, 0x4CB, 0x4CD, 0x4D0, 0x4D2, 0x4D4, 0x4D6, 0x4D8, 0x4DA, 0x4DC, 0x4DE, 0x4E0, 0x4E2, 0x4E4, 0x4E6, 0x4E8, 0x4EA, 0x4EC, 0x4EE, 0x4F0, 0x4F2, 0x4F4, 0x4F6, 0x4F8, 0x4FA, 0x4FC, 0x4FE, 0x500, 0x502, 0x504, 0x506, 0x508, 0x50A, 0x50C, 0x50E, 0x510, 0x512, 0x514, 0x516, 0x518, 0x51A, 0x51C, 0x51E, 0x520, 0x522, 0x524, 0x526, 0x528, 0x52A, 0x52C, 0x52E, 0x10C7, 0x10CD, 0x1E00, 0x1E02, 0x1E04, 0x1E06, 0x1E08, 0x1E0A, 0x1E0C, 0x1E0E, 0x1E10, 0x1E12, 0x1E14, 0x1E16, 0x1E18, 0x1E1A, 0x1E1C, 0x1E1E, 0x1E20, 0x1E22, 0x1E24, 0x1E26, 0x1E28, 0x1E2A, 0x1E2C, 0x1E2E, 0x1E30, 0x1E32, 0x1E34, 0x1E36, 0x1E38, 0x1E3A, 0x1E3C, 0x1E3E, 0x1E40, 0x1E42, 0x1E44, 0x1E46, 0x1E48, 0x1E4A, 0x1E4C, 0x1E4E, 0x1E50, 0x1E52, 0x1E54, 0x1E56, 0x1E58, 0x1E5A, 0x1E5C, 0x1E5E, 0x1E60, 0x1E62, 0x1E64, 0x1E66, 0x1E68, 0x1E6A, 0x1E6C, 0x1E6E, 0x1E70, 0x1E72, 0x1E74, 0x1E76, 0x1E78, 0x1E7A, 0x1E7C, 0x1E7E, 0x1E80, 0x1E82, 0x1E84, 0x1E86, 0x1E88, 0x1E8A, 0x1E8C, 0x1E8E, 0x1E90, 0x1E92, 0x1E94, 0x1E9E, 0x1EA0, 0x1EA2, 0x1EA4, 0x1EA6, 0x1EA8, 0x1EAA, 0x1EAC, 0x1EAE, 0x1EB0, 0x1EB2, 0x1EB4, 0x1EB6, 0x1EB8, 0x1EBA, 0x1EBC, 0x1EBE, 0x1EC0, 0x1EC2, 0x1EC4, 0x1EC6, 0x1EC8, 0x1ECA, 0x1ECC, 0x1ECE, 0x1ED0, 0x1ED2, 0x1ED4, 0x1ED6, 0x1ED8, 0x1EDA, 0x1EDC, 0x1EDE, 0x1EE0, 0x1EE2, 0x1EE4, 0x1EE6, 0x1EE8, 0x1EEA, 0x1EEC, 0x1EEE, 0x1EF0, 0x1EF2, 0x1EF4, 0x1EF6, 0x1EF8, 0x1EFA, 0x1EFC, 0x1EFE, 0x1F59, 0x1F5B, 0x1F5D, 0x1F5F, 0x2126, 0x2132, 0x2183, 0x2C60, 0x2C67, 0x2C69, 0x2C6B, 0x2C72, 0x2C75, 0x2C82, 0x2C84, 0x2C86, 0x2C88, 0x2C8A, 0x2C8C, 0x2C8E, 0x2C90, 0x2C92, 0x2C94, 0x2C96, 0x2C98, 0x2C9A, 0x2C9C, 0x2C9E, 0x2CA0, 0x2CA2, 0x2CA4, 0x2CA6, 0x2CA8, 0x2CAA, 0x2CAC, 0x2CAE, 0x2CB0, 0x2CB2, 0x2CB4, 0x2CB6, 0x2CB8, 0x2CBA, 0x2CBC, 0x2CBE, 0x2CC0, 0x2CC2, 0x2CC4, 0x2CC6, 0x2CC8, 0x2CCA, 0x2CCC, 0x2CCE, 0x2CD0, 0x2CD2, 0x2CD4, 0x2CD6, 0x2CD8, 0x2CDA, 0x2CDC, 0x2CDE, 0x2CE0, 0x2CE2, 0x2CEB, 0x2CED, 0x2CF2, 0xA640, 0xA642, 0xA644, 0xA646, 0xA648, 0xA64A, 0xA64C, 0xA64E, 0xA650, 0xA652, 0xA654, 0xA656, 0xA658, 0xA65A, 0xA65C, 0xA65E, 0xA660, 0xA662, 0xA664, 0xA666, 0xA668, 0xA66A, 0xA66C, 0xA680, 0xA682, 0xA684, 0xA686, 0xA688, 0xA68A, 0xA68C, 0xA68E, 0xA690, 0xA692, 0xA694, 0xA696, 0xA698, 0xA69A, 0xA722, 0xA724, 0xA726, 0xA728, 0xA72A, 0xA72C, 0xA72E, 0xA732, 0xA734, 0xA736, 0xA738, 0xA73A, 0xA73C, 0xA73E, 0xA740, 0xA742, 0xA744, 0xA746, 0xA748, 0xA74A, 0xA74C, 0xA74E, 0xA750, 0xA752, 0xA754, 0xA756, 0xA758, 0xA75A, 0xA75C, 0xA75E, 0xA760, 0xA762, 0xA764, 0xA766, 0xA768, 0xA76A, 0xA76C, 0xA76E, 0xA779, 0xA77B, 0xA780, 0xA782, 0xA784, 0xA786, 0xA78B, 0xA78D, 0xA790, 0xA792, 0xA796, 0xA798, 0xA79A, 0xA79C, 0xA79E, 0xA7A0, 0xA7A2, 0xA7A4, 0xA7A6, 0xA7A8, 0xA7B6, 0xA7B8, 0xA7BA, 0xA7BC, 0xA7BE, 0xA7C0, 0xA7C2, 0xA7C9, 0xA7D0, 0xA7D6, 0xA7D8, 0xA7F5);\nset.addRange(0x41, 0x5A).addRange(0xC0, 0xD6).addRange(0xD8, 0xDE).addRange(0x178, 0x179).addRange(0x181, 0x182).addRange(0x186, 0x187).addRange(0x189, 0x18B).addRange(0x18E, 0x191).addRange(0x193, 0x194).addRange(0x196, 0x198).addRange(0x19C, 0x19D).addRange(0x19F, 0x1A0).addRange(0x1A6, 0x1A7).addRange(0x1AE, 0x1AF).addRange(0x1B1, 0x1B3).addRange(0x1B7, 0x1B8).addRange(0x1C4, 0x1C5).addRange(0x1C7, 0x1C8).addRange(0x1CA, 0x1CB).addRange(0x1F1, 0x1F2).addRange(0x1F6, 0x1F8).addRange(0x23A, 0x23B).addRange(0x23D, 0x23E).addRange(0x243, 0x246).addRange(0x388, 0x38A).addRange(0x38E, 0x38F).addRange(0x391, 0x3A1).addRange(0x3A3, 0x3AB).addRange(0x3F9, 0x3FA).addRange(0x3FD, 0x42F).addRange(0x4C0, 0x4C1).addRange(0x531, 0x556).addRange(0x10A0, 0x10C5).addRange(0x13A0, 0x13F5).addRange(0x1C90, 0x1CBA).addRange(0x1CBD, 0x1CBF).addRange(0x1F08, 0x1F0F).addRange(0x1F18, 0x1F1D).addRange(0x1F28, 0x1F2F).addRange(0x1F38, 0x1F3F).addRange(0x1F48, 0x1F4D).addRange(0x1F68, 0x1F6F).addRange(0x1F88, 0x1F8F).addRange(0x1F98, 0x1F9F).addRange(0x1FA8, 0x1FAF).addRange(0x1FB8, 0x1FBC).addRange(0x1FC8, 0x1FCC).addRange(0x1FD8, 0x1FDB).addRange(0x1FE8, 0x1FEC).addRange(0x1FF8, 0x1FFC).addRange(0x212A, 0x212B);\nset.addRange(0x2160, 0x216F).addRange(0x24B6, 0x24CF).addRange(0x2C00, 0x2C2F).addRange(0x2C62, 0x2C64).addRange(0x2C6D, 0x2C70).addRange(0x2C7E, 0x2C80).addRange(0xA77D, 0xA77E).addRange(0xA7AA, 0xA7AE).addRange(0xA7B0, 0xA7B4).addRange(0xA7C4, 0xA7C7).addRange(0xFF21, 0xFF3A).addRange(0x10400, 0x10427).addRange(0x104B0, 0x104D3).addRange(0x10570, 0x1057A).addRange(0x1057C, 0x1058A).addRange(0x1058C, 0x10592).addRange(0x10594, 0x10595).addRange(0x10C80, 0x10CB2).addRange(0x118A0, 0x118BF).addRange(0x16E40, 0x16E5F).addRange(0x1E900, 0x1E921);\nexports.characters = set;\n","const set = require('regenerate')(0xA0, 0xA8, 0xAA, 0xAD, 0xAF, 0x100, 0x102, 0x104, 0x106, 0x108, 0x10A, 0x10C, 0x10E, 0x110, 0x112, 0x114, 0x116, 0x118, 0x11A, 0x11C, 0x11E, 0x120, 0x122, 0x124, 0x126, 0x128, 0x12A, 0x12C, 0x12E, 0x130, 0x136, 0x139, 0x13B, 0x13D, 0x143, 0x145, 0x147, 0x14C, 0x14E, 0x150, 0x152, 0x154, 0x156, 0x158, 0x15A, 0x15C, 0x15E, 0x160, 0x162, 0x164, 0x166, 0x168, 0x16A, 0x16C, 0x16E, 0x170, 0x172, 0x174, 0x176, 0x17B, 0x17D, 0x17F, 0x184, 0x1A2, 0x1A4, 0x1A9, 0x1AC, 0x1B5, 0x1BC, 0x1CF, 0x1D1, 0x1D3, 0x1D5, 0x1D7, 0x1D9, 0x1DB, 0x1DE, 0x1E0, 0x1E2, 0x1E4, 0x1E6, 0x1E8, 0x1EA, 0x1EC, 0x1EE, 0x1FA, 0x1FC, 0x1FE, 0x200, 0x202, 0x204, 0x206, 0x208, 0x20A, 0x20C, 0x20E, 0x210, 0x212, 0x214, 0x216, 0x218, 0x21A, 0x21C, 0x21E, 0x220, 0x222, 0x224, 0x226, 0x228, 0x22A, 0x22C, 0x22E, 0x230, 0x232, 0x241, 0x248, 0x24A, 0x24C, 0x24E, 0x34F, 0x370, 0x372, 0x374, 0x376, 0x37A, 0x38C, 0x3C2, 0x3D8, 0x3DA, 0x3DC, 0x3DE, 0x3E0, 0x3E2, 0x3E4, 0x3E6, 0x3E8, 0x3EA, 0x3EC, 0x3EE, 0x3F7, 0x460, 0x462, 0x464, 0x466, 0x468, 0x46A, 0x46C, 0x46E, 0x470, 0x472, 0x474, 0x476, 0x478, 0x47A, 0x47C, 0x47E, 0x480, 0x48A, 0x48C, 0x48E, 0x490, 0x492, 0x494, 0x496, 0x498, 0x49A, 0x49C, 0x49E, 0x4A0, 0x4A2, 0x4A4, 0x4A6, 0x4A8, 0x4AA, 0x4AC, 0x4AE, 0x4B0, 0x4B2, 0x4B4, 0x4B6, 0x4B8, 0x4BA, 0x4BC, 0x4BE, 0x4C3, 0x4C5, 0x4C7, 0x4C9, 0x4CB, 0x4CD, 0x4D0, 0x4D2, 0x4D4, 0x4D6, 0x4D8, 0x4DA, 0x4DC, 0x4DE, 0x4E0, 0x4E2, 0x4E4, 0x4E6, 0x4E8, 0x4EA, 0x4EC, 0x4EE, 0x4F0, 0x4F2, 0x4F4, 0x4F6, 0x4F8, 0x4FA, 0x4FC, 0x4FE, 0x500, 0x502, 0x504, 0x506, 0x508, 0x50A, 0x50C, 0x50E, 0x510, 0x512, 0x514, 0x516, 0x518, 0x51A, 0x51C, 0x51E, 0x520, 0x522, 0x524, 0x526, 0x528, 0x52A, 0x52C, 0x52E, 0x587, 0x61C, 0x9DF, 0xA33, 0xA36, 0xA5E, 0xE33, 0xEB3, 0xF0C, 0xF43, 0xF4D, 0xF52, 0xF57, 0xF5C, 0xF69, 0xF73, 0xF81, 0xF93, 0xF9D, 0xFA2, 0xFA7, 0xFAC, 0xFB9, 0x10C7, 0x10CD, 0x10FC, 0x1D78, 0x1E00, 0x1E02, 0x1E04, 0x1E06, 0x1E08, 0x1E0A, 0x1E0C, 0x1E0E, 0x1E10, 0x1E12, 0x1E14, 0x1E16, 0x1E18, 0x1E1A, 0x1E1C, 0x1E1E, 0x1E20, 0x1E22, 0x1E24, 0x1E26, 0x1E28, 0x1E2A, 0x1E2C, 0x1E2E, 0x1E30, 0x1E32, 0x1E34, 0x1E36, 0x1E38, 0x1E3A, 0x1E3C, 0x1E3E, 0x1E40, 0x1E42, 0x1E44, 0x1E46, 0x1E48, 0x1E4A, 0x1E4C, 0x1E4E, 0x1E50, 0x1E52, 0x1E54, 0x1E56, 0x1E58, 0x1E5A, 0x1E5C, 0x1E5E, 0x1E60, 0x1E62, 0x1E64, 0x1E66, 0x1E68, 0x1E6A, 0x1E6C, 0x1E6E, 0x1E70, 0x1E72, 0x1E74, 0x1E76, 0x1E78, 0x1E7A, 0x1E7C, 0x1E7E, 0x1E80, 0x1E82, 0x1E84, 0x1E86, 0x1E88, 0x1E8A, 0x1E8C, 0x1E8E, 0x1E90, 0x1E92, 0x1E94, 0x1E9E, 0x1EA0, 0x1EA2, 0x1EA4, 0x1EA6, 0x1EA8, 0x1EAA, 0x1EAC, 0x1EAE, 0x1EB0, 0x1EB2, 0x1EB4, 0x1EB6, 0x1EB8, 0x1EBA, 0x1EBC, 0x1EBE, 0x1EC0, 0x1EC2, 0x1EC4, 0x1EC6, 0x1EC8, 0x1ECA, 0x1ECC, 0x1ECE, 0x1ED0, 0x1ED2, 0x1ED4, 0x1ED6, 0x1ED8, 0x1EDA, 0x1EDC, 0x1EDE, 0x1EE0, 0x1EE2, 0x1EE4, 0x1EE6, 0x1EE8, 0x1EEA, 0x1EEC, 0x1EEE, 0x1EF0, 0x1EF2, 0x1EF4, 0x1EF6, 0x1EF8, 0x1EFA, 0x1EFC, 0x1EFE, 0x1F59, 0x1F5B, 0x1F5D, 0x1F5F, 0x1F71, 0x1F73, 0x1F75, 0x1F77, 0x1F79, 0x1F7B, 0x1F7D, 0x1FD3, 0x1FE3, 0x2011, 0x2017, 0x203C, 0x203E, 0x2057, 0x20A8, 0x2124, 0x2126, 0x2128, 0x2183, 0x2189, 0x2A0C, 0x2ADC, 0x2C60, 0x2C67, 0x2C69, 0x2C6B, 0x2C72, 0x2C75, 0x2C82, 0x2C84, 0x2C86, 0x2C88, 0x2C8A, 0x2C8C, 0x2C8E, 0x2C90, 0x2C92, 0x2C94, 0x2C96, 0x2C98, 0x2C9A, 0x2C9C, 0x2C9E, 0x2CA0, 0x2CA2, 0x2CA4, 0x2CA6, 0x2CA8, 0x2CAA, 0x2CAC, 0x2CAE, 0x2CB0, 0x2CB2, 0x2CB4, 0x2CB6, 0x2CB8, 0x2CBA, 0x2CBC, 0x2CBE, 0x2CC0, 0x2CC2, 0x2CC4, 0x2CC6, 0x2CC8, 0x2CCA, 0x2CCC, 0x2CCE, 0x2CD0, 0x2CD2, 0x2CD4, 0x2CD6, 0x2CD8, 0x2CDA, 0x2CDC, 0x2CDE, 0x2CE0, 0x2CE2, 0x2CEB, 0x2CED, 0x2CF2, 0x2D6F, 0x2E9F, 0x2EF3, 0x3000, 0x3036, 0x309F, 0x30FF, 0xA640, 0xA642, 0xA644, 0xA646, 0xA648, 0xA64A, 0xA64C, 0xA64E, 0xA650, 0xA652, 0xA654, 0xA656, 0xA658, 0xA65A, 0xA65C, 0xA65E, 0xA660, 0xA662, 0xA664, 0xA666, 0xA668, 0xA66A, 0xA66C, 0xA680, 0xA682, 0xA684, 0xA686, 0xA688, 0xA68A, 0xA68C, 0xA68E, 0xA690, 0xA692, 0xA694, 0xA696, 0xA698, 0xA69A, 0xA722, 0xA724, 0xA726, 0xA728, 0xA72A, 0xA72C, 0xA72E, 0xA732, 0xA734, 0xA736, 0xA738, 0xA73A, 0xA73C, 0xA73E, 0xA740, 0xA742, 0xA744, 0xA746, 0xA748, 0xA74A, 0xA74C, 0xA74E, 0xA750, 0xA752, 0xA754, 0xA756, 0xA758, 0xA75A, 0xA75C, 0xA75E, 0xA760, 0xA762, 0xA764, 0xA766, 0xA768, 0xA76A, 0xA76C, 0xA76E, 0xA770, 0xA779, 0xA77B, 0xA780, 0xA782, 0xA784, 0xA786, 0xA78B, 0xA78D, 0xA790, 0xA792, 0xA796, 0xA798, 0xA79A, 0xA79C, 0xA79E, 0xA7A0, 0xA7A2, 0xA7A4, 0xA7A6, 0xA7A8, 0xA7B6, 0xA7B8, 0xA7BA, 0xA7BC, 0xA7BE, 0xA7C0, 0xA7C2, 0xA7C9, 0xA7D0, 0xA7D6, 0xA7D8, 0xAB69, 0xFA10, 0xFA12, 0xFA20, 0xFA22, 0xFB1D, 0xFB3E, 0xFE74, 0xFEFF, 0x1D4A2, 0x1D4BB, 0x1D546, 0x1EE24, 0x1EE27, 0x1EE39, 0x1EE3B, 0x1EE42, 0x1EE47, 0x1EE49, 0x1EE4B, 0x1EE54, 0x1EE57, 0x1EE59, 0x1EE5B, 0x1EE5D, 0x1EE5F, 0x1EE64, 0x1EE7E, 0x1F190);\nset.addRange(0x41, 0x5A).addRange(0xB2, 0xB5).addRange(0xB8, 0xBA).addRange(0xBC, 0xBE).addRange(0xC0, 0xD6).addRange(0xD8, 0xDF).addRange(0x132, 0x134).addRange(0x13F, 0x141).addRange(0x149, 0x14A).addRange(0x178, 0x179).addRange(0x181, 0x182).addRange(0x186, 0x187).addRange(0x189, 0x18B).addRange(0x18E, 0x191).addRange(0x193, 0x194).addRange(0x196, 0x198).addRange(0x19C, 0x19D).addRange(0x19F, 0x1A0).addRange(0x1A6, 0x1A7).addRange(0x1AE, 0x1AF).addRange(0x1B1, 0x1B3).addRange(0x1B7, 0x1B8).addRange(0x1C4, 0x1CD).addRange(0x1F1, 0x1F4).addRange(0x1F6, 0x1F8).addRange(0x23A, 0x23B).addRange(0x23D, 0x23E).addRange(0x243, 0x246).addRange(0x2B0, 0x2B8).addRange(0x2D8, 0x2DD).addRange(0x2E0, 0x2E4).addRange(0x340, 0x341).addRange(0x343, 0x345).addRange(0x37E, 0x37F).addRange(0x384, 0x38A).addRange(0x38E, 0x38F).addRange(0x391, 0x3A1).addRange(0x3A3, 0x3AB).addRange(0x3CF, 0x3D6).addRange(0x3F0, 0x3F2).addRange(0x3F4, 0x3F5).addRange(0x3F9, 0x3FA).addRange(0x3FD, 0x42F).addRange(0x4C0, 0x4C1).addRange(0x531, 0x556).addRange(0x675, 0x678).addRange(0x958, 0x95F).addRange(0x9DC, 0x9DD).addRange(0xA59, 0xA5B).addRange(0xB5C, 0xB5D).addRange(0xEDC, 0xEDD);\nset.addRange(0xF75, 0xF79).addRange(0x10A0, 0x10C5).addRange(0x115F, 0x1160).addRange(0x13F8, 0x13FD).addRange(0x17B4, 0x17B5).addRange(0x180B, 0x180F).addRange(0x1C80, 0x1C88).addRange(0x1C90, 0x1CBA).addRange(0x1CBD, 0x1CBF).addRange(0x1D2C, 0x1D2E).addRange(0x1D30, 0x1D3A).addRange(0x1D3C, 0x1D4D).addRange(0x1D4F, 0x1D6A).addRange(0x1D9B, 0x1DBF).addRange(0x1E9A, 0x1E9B).addRange(0x1F08, 0x1F0F).addRange(0x1F18, 0x1F1D).addRange(0x1F28, 0x1F2F).addRange(0x1F38, 0x1F3F).addRange(0x1F48, 0x1F4D).addRange(0x1F68, 0x1F6F).addRange(0x1F80, 0x1FAF).addRange(0x1FB2, 0x1FB4).addRange(0x1FB7, 0x1FC4).addRange(0x1FC7, 0x1FCF).addRange(0x1FD8, 0x1FDB).addRange(0x1FDD, 0x1FDF).addRange(0x1FE8, 0x1FEF).addRange(0x1FF2, 0x1FF4).addRange(0x1FF7, 0x1FFE).addRange(0x2000, 0x200F).addRange(0x2024, 0x2026).addRange(0x202A, 0x202F).addRange(0x2033, 0x2034).addRange(0x2036, 0x2037).addRange(0x2047, 0x2049).addRange(0x205F, 0x2071).addRange(0x2074, 0x208E).addRange(0x2090, 0x209C).addRange(0x2100, 0x2103).addRange(0x2105, 0x2107).addRange(0x2109, 0x2113).addRange(0x2115, 0x2116).addRange(0x2119, 0x211D).addRange(0x2120, 0x2122).addRange(0x212A, 0x212D).addRange(0x212F, 0x2139).addRange(0x213B, 0x2140).addRange(0x2145, 0x2149).addRange(0x2150, 0x217F).addRange(0x222C, 0x222D);\nset.addRange(0x222F, 0x2230).addRange(0x2329, 0x232A).addRange(0x2460, 0x24EA).addRange(0x2A74, 0x2A76).addRange(0x2C00, 0x2C2F).addRange(0x2C62, 0x2C64).addRange(0x2C6D, 0x2C70).addRange(0x2C7C, 0x2C80).addRange(0x2F00, 0x2FD5).addRange(0x3038, 0x303A).addRange(0x309B, 0x309C).addRange(0x3131, 0x318E).addRange(0x3192, 0x319F).addRange(0x3200, 0x321E).addRange(0x3220, 0x3247).addRange(0x3250, 0x327E).addRange(0x3280, 0x33FF).addRange(0xA69C, 0xA69D).addRange(0xA77D, 0xA77E).addRange(0xA7AA, 0xA7AE).addRange(0xA7B0, 0xA7B4).addRange(0xA7C4, 0xA7C7).addRange(0xA7F2, 0xA7F5).addRange(0xA7F8, 0xA7F9).addRange(0xAB5C, 0xAB5F).addRange(0xAB70, 0xABBF).addRange(0xF900, 0xFA0D).addRange(0xFA15, 0xFA1E).addRange(0xFA25, 0xFA26).addRange(0xFA2A, 0xFA6D).addRange(0xFA70, 0xFAD9).addRange(0xFB00, 0xFB06).addRange(0xFB13, 0xFB17).addRange(0xFB1F, 0xFB36).addRange(0xFB38, 0xFB3C).addRange(0xFB40, 0xFB41).addRange(0xFB43, 0xFB44).addRange(0xFB46, 0xFBB1).addRange(0xFBD3, 0xFD3D).addRange(0xFD50, 0xFD8F).addRange(0xFD92, 0xFDC7).addRange(0xFDF0, 0xFDFC).addRange(0xFE00, 0xFE19).addRange(0xFE30, 0xFE44).addRange(0xFE47, 0xFE52).addRange(0xFE54, 0xFE66).addRange(0xFE68, 0xFE6B).addRange(0xFE70, 0xFE72).addRange(0xFE76, 0xFEFC).addRange(0xFF01, 0xFFBE).addRange(0xFFC2, 0xFFC7);\nset.addRange(0xFFCA, 0xFFCF).addRange(0xFFD2, 0xFFD7).addRange(0xFFDA, 0xFFDC).addRange(0xFFE0, 0xFFE6).addRange(0xFFE8, 0xFFEE).addRange(0xFFF0, 0xFFF8).addRange(0x10400, 0x10427).addRange(0x104B0, 0x104D3).addRange(0x10570, 0x1057A).addRange(0x1057C, 0x1058A).addRange(0x1058C, 0x10592).addRange(0x10594, 0x10595).addRange(0x10781, 0x10785).addRange(0x10787, 0x107B0).addRange(0x107B2, 0x107BA).addRange(0x10C80, 0x10CB2).addRange(0x118A0, 0x118BF).addRange(0x16E40, 0x16E5F).addRange(0x1BCA0, 0x1BCA3).addRange(0x1D15E, 0x1D164).addRange(0x1D173, 0x1D17A).addRange(0x1D1BB, 0x1D1C0).addRange(0x1D400, 0x1D454).addRange(0x1D456, 0x1D49C).addRange(0x1D49E, 0x1D49F).addRange(0x1D4A5, 0x1D4A6).addRange(0x1D4A9, 0x1D4AC).addRange(0x1D4AE, 0x1D4B9).addRange(0x1D4BD, 0x1D4C3).addRange(0x1D4C5, 0x1D505).addRange(0x1D507, 0x1D50A).addRange(0x1D50D, 0x1D514).addRange(0x1D516, 0x1D51C).addRange(0x1D51E, 0x1D539).addRange(0x1D53B, 0x1D53E).addRange(0x1D540, 0x1D544).addRange(0x1D54A, 0x1D550).addRange(0x1D552, 0x1D6A5).addRange(0x1D6A8, 0x1D7CB).addRange(0x1D7CE, 0x1D7FF).addRange(0x1E030, 0x1E06D).addRange(0x1E900, 0x1E921).addRange(0x1EE00, 0x1EE03).addRange(0x1EE05, 0x1EE1F).addRange(0x1EE21, 0x1EE22).addRange(0x1EE29, 0x1EE32).addRange(0x1EE34, 0x1EE37).addRange(0x1EE4D, 0x1EE4F).addRange(0x1EE51, 0x1EE52).addRange(0x1EE61, 0x1EE62).addRange(0x1EE67, 0x1EE6A);\nset.addRange(0x1EE6C, 0x1EE72).addRange(0x1EE74, 0x1EE77).addRange(0x1EE79, 0x1EE7C).addRange(0x1EE80, 0x1EE89).addRange(0x1EE8B, 0x1EE9B).addRange(0x1EEA1, 0x1EEA3).addRange(0x1EEA5, 0x1EEA9).addRange(0x1EEAB, 0x1EEBB).addRange(0x1F100, 0x1F10A).addRange(0x1F110, 0x1F12E).addRange(0x1F130, 0x1F14F).addRange(0x1F16A, 0x1F16C).addRange(0x1F200, 0x1F202).addRange(0x1F210, 0x1F23B).addRange(0x1F240, 0x1F248).addRange(0x1F250, 0x1F251).addRange(0x1FBF0, 0x1FBF9).addRange(0x2F800, 0x2FA1D).addRange(0xE0000, 0xE0FFF);\nexports.characters = set;\n","const set = require('regenerate')(0xB5, 0x101, 0x103, 0x105, 0x107, 0x109, 0x10B, 0x10D, 0x10F, 0x111, 0x113, 0x115, 0x117, 0x119, 0x11B, 0x11D, 0x11F, 0x121, 0x123, 0x125, 0x127, 0x129, 0x12B, 0x12D, 0x12F, 0x131, 0x133, 0x135, 0x137, 0x13A, 0x13C, 0x13E, 0x140, 0x142, 0x144, 0x146, 0x14B, 0x14D, 0x14F, 0x151, 0x153, 0x155, 0x157, 0x159, 0x15B, 0x15D, 0x15F, 0x161, 0x163, 0x165, 0x167, 0x169, 0x16B, 0x16D, 0x16F, 0x171, 0x173, 0x175, 0x177, 0x17A, 0x17C, 0x183, 0x185, 0x188, 0x18C, 0x192, 0x195, 0x19E, 0x1A1, 0x1A3, 0x1A5, 0x1A8, 0x1AD, 0x1B0, 0x1B4, 0x1B6, 0x1B9, 0x1BD, 0x1BF, 0x1C4, 0x1CC, 0x1CE, 0x1D0, 0x1D2, 0x1D4, 0x1D6, 0x1D8, 0x1DA, 0x1DF, 0x1E1, 0x1E3, 0x1E5, 0x1E7, 0x1E9, 0x1EB, 0x1ED, 0x1F3, 0x1F5, 0x1F9, 0x1FB, 0x1FD, 0x1FF, 0x201, 0x203, 0x205, 0x207, 0x209, 0x20B, 0x20D, 0x20F, 0x211, 0x213, 0x215, 0x217, 0x219, 0x21B, 0x21D, 0x21F, 0x223, 0x225, 0x227, 0x229, 0x22B, 0x22D, 0x22F, 0x231, 0x233, 0x23C, 0x242, 0x247, 0x249, 0x24B, 0x24D, 0x259, 0x263, 0x26F, 0x275, 0x27D, 0x280, 0x292, 0x345, 0x371, 0x373, 0x377, 0x390, 0x3D9, 0x3DB, 0x3DD, 0x3DF, 0x3E1, 0x3E3, 0x3E5, 0x3E7, 0x3E9, 0x3EB, 0x3ED, 0x3F5, 0x3F8, 0x3FB, 0x461, 0x463, 0x465, 0x467, 0x469, 0x46B, 0x46D, 0x46F, 0x471, 0x473, 0x475, 0x477, 0x479, 0x47B, 0x47D, 0x47F, 0x481, 0x48B, 0x48D, 0x48F, 0x491, 0x493, 0x495, 0x497, 0x499, 0x49B, 0x49D, 0x49F, 0x4A1, 0x4A3, 0x4A5, 0x4A7, 0x4A9, 0x4AB, 0x4AD, 0x4AF, 0x4B1, 0x4B3, 0x4B5, 0x4B7, 0x4B9, 0x4BB, 0x4BD, 0x4BF, 0x4C2, 0x4C4, 0x4C6, 0x4C8, 0x4CA, 0x4CC, 0x4D1, 0x4D3, 0x4D5, 0x4D7, 0x4D9, 0x4DB, 0x4DD, 0x4DF, 0x4E1, 0x4E3, 0x4E5, 0x4E7, 0x4E9, 0x4EB, 0x4ED, 0x4EF, 0x4F1, 0x4F3, 0x4F5, 0x4F7, 0x4F9, 0x4FB, 0x4FD, 0x4FF, 0x501, 0x503, 0x505, 0x507, 0x509, 0x50B, 0x50D, 0x50F, 0x511, 0x513, 0x515, 0x517, 0x519, 0x51B, 0x51D, 0x51F, 0x521, 0x523, 0x525, 0x527, 0x529, 0x52B, 0x52D, 0x52F, 0x1D79, 0x1D7D, 0x1D8E, 0x1E01, 0x1E03, 0x1E05, 0x1E07, 0x1E09, 0x1E0B, 0x1E0D, 0x1E0F, 0x1E11, 0x1E13, 0x1E15, 0x1E17, 0x1E19, 0x1E1B, 0x1E1D, 0x1E1F, 0x1E21, 0x1E23, 0x1E25, 0x1E27, 0x1E29, 0x1E2B, 0x1E2D, 0x1E2F, 0x1E31, 0x1E33, 0x1E35, 0x1E37, 0x1E39, 0x1E3B, 0x1E3D, 0x1E3F, 0x1E41, 0x1E43, 0x1E45, 0x1E47, 0x1E49, 0x1E4B, 0x1E4D, 0x1E4F, 0x1E51, 0x1E53, 0x1E55, 0x1E57, 0x1E59, 0x1E5B, 0x1E5D, 0x1E5F, 0x1E61, 0x1E63, 0x1E65, 0x1E67, 0x1E69, 0x1E6B, 0x1E6D, 0x1E6F, 0x1E71, 0x1E73, 0x1E75, 0x1E77, 0x1E79, 0x1E7B, 0x1E7D, 0x1E7F, 0x1E81, 0x1E83, 0x1E85, 0x1E87, 0x1E89, 0x1E8B, 0x1E8D, 0x1E8F, 0x1E91, 0x1E93, 0x1EA1, 0x1EA3, 0x1EA5, 0x1EA7, 0x1EA9, 0x1EAB, 0x1EAD, 0x1EAF, 0x1EB1, 0x1EB3, 0x1EB5, 0x1EB7, 0x1EB9, 0x1EBB, 0x1EBD, 0x1EBF, 0x1EC1, 0x1EC3, 0x1EC5, 0x1EC7, 0x1EC9, 0x1ECB, 0x1ECD, 0x1ECF, 0x1ED1, 0x1ED3, 0x1ED5, 0x1ED7, 0x1ED9, 0x1EDB, 0x1EDD, 0x1EDF, 0x1EE1, 0x1EE3, 0x1EE5, 0x1EE7, 0x1EE9, 0x1EEB, 0x1EED, 0x1EEF, 0x1EF1, 0x1EF3, 0x1EF5, 0x1EF7, 0x1EF9, 0x1EFB, 0x1EFD, 0x1FBE, 0x214E, 0x2184, 0x2C61, 0x2C68, 0x2C6A, 0x2C6C, 0x2C73, 0x2C76, 0x2C81, 0x2C83, 0x2C85, 0x2C87, 0x2C89, 0x2C8B, 0x2C8D, 0x2C8F, 0x2C91, 0x2C93, 0x2C95, 0x2C97, 0x2C99, 0x2C9B, 0x2C9D, 0x2C9F, 0x2CA1, 0x2CA3, 0x2CA5, 0x2CA7, 0x2CA9, 0x2CAB, 0x2CAD, 0x2CAF, 0x2CB1, 0x2CB3, 0x2CB5, 0x2CB7, 0x2CB9, 0x2CBB, 0x2CBD, 0x2CBF, 0x2CC1, 0x2CC3, 0x2CC5, 0x2CC7, 0x2CC9, 0x2CCB, 0x2CCD, 0x2CCF, 0x2CD1, 0x2CD3, 0x2CD5, 0x2CD7, 0x2CD9, 0x2CDB, 0x2CDD, 0x2CDF, 0x2CE1, 0x2CE3, 0x2CEC, 0x2CEE, 0x2CF3, 0x2D27, 0x2D2D, 0xA641, 0xA643, 0xA645, 0xA647, 0xA649, 0xA64B, 0xA64D, 0xA64F, 0xA651, 0xA653, 0xA655, 0xA657, 0xA659, 0xA65B, 0xA65D, 0xA65F, 0xA661, 0xA663, 0xA665, 0xA667, 0xA669, 0xA66B, 0xA66D, 0xA681, 0xA683, 0xA685, 0xA687, 0xA689, 0xA68B, 0xA68D, 0xA68F, 0xA691, 0xA693, 0xA695, 0xA697, 0xA699, 0xA69B, 0xA723, 0xA725, 0xA727, 0xA729, 0xA72B, 0xA72D, 0xA72F, 0xA733, 0xA735, 0xA737, 0xA739, 0xA73B, 0xA73D, 0xA73F, 0xA741, 0xA743, 0xA745, 0xA747, 0xA749, 0xA74B, 0xA74D, 0xA74F, 0xA751, 0xA753, 0xA755, 0xA757, 0xA759, 0xA75B, 0xA75D, 0xA75F, 0xA761, 0xA763, 0xA765, 0xA767, 0xA769, 0xA76B, 0xA76D, 0xA76F, 0xA77A, 0xA77C, 0xA77F, 0xA781, 0xA783, 0xA785, 0xA787, 0xA78C, 0xA791, 0xA797, 0xA799, 0xA79B, 0xA79D, 0xA79F, 0xA7A1, 0xA7A3, 0xA7A5, 0xA7A7, 0xA7A9, 0xA7B5, 0xA7B7, 0xA7B9, 0xA7BB, 0xA7BD, 0xA7BF, 0xA7C1, 0xA7C3, 0xA7C8, 0xA7CA, 0xA7D1, 0xA7D7, 0xA7D9, 0xA7F6, 0xAB53);\nset.addRange(0x61, 0x7A).addRange(0xDF, 0xF6).addRange(0xF8, 0xFF).addRange(0x148, 0x149).addRange(0x17E, 0x180).addRange(0x199, 0x19A).addRange(0x1C6, 0x1C7).addRange(0x1C9, 0x1CA).addRange(0x1DC, 0x1DD).addRange(0x1EF, 0x1F1).addRange(0x23F, 0x240).addRange(0x24F, 0x254).addRange(0x256, 0x257).addRange(0x25B, 0x25C).addRange(0x260, 0x261).addRange(0x265, 0x266).addRange(0x268, 0x26C).addRange(0x271, 0x272).addRange(0x282, 0x283).addRange(0x287, 0x28C).addRange(0x29D, 0x29E).addRange(0x37B, 0x37D).addRange(0x3AC, 0x3CE).addRange(0x3D0, 0x3D1).addRange(0x3D5, 0x3D7).addRange(0x3EF, 0x3F3).addRange(0x430, 0x45F).addRange(0x4CE, 0x4CF).addRange(0x561, 0x587).addRange(0x13F8, 0x13FD).addRange(0x1C80, 0x1C88).addRange(0x1E95, 0x1E9B).addRange(0x1EFF, 0x1F07).addRange(0x1F10, 0x1F15).addRange(0x1F20, 0x1F27).addRange(0x1F30, 0x1F37).addRange(0x1F40, 0x1F45).addRange(0x1F50, 0x1F57).addRange(0x1F60, 0x1F67).addRange(0x1F70, 0x1F7D).addRange(0x1F80, 0x1F87).addRange(0x1F90, 0x1F97).addRange(0x1FA0, 0x1FA7).addRange(0x1FB0, 0x1FB4).addRange(0x1FB6, 0x1FB7).addRange(0x1FC2, 0x1FC4).addRange(0x1FC6, 0x1FC7).addRange(0x1FD0, 0x1FD3).addRange(0x1FD6, 0x1FD7).addRange(0x1FE0, 0x1FE7).addRange(0x1FF2, 0x1FF4);\nset.addRange(0x1FF6, 0x1FF7).addRange(0x2170, 0x217F).addRange(0x24D0, 0x24E9).addRange(0x2C30, 0x2C5F).addRange(0x2C65, 0x2C66).addRange(0x2D00, 0x2D25).addRange(0xA793, 0xA794).addRange(0xAB70, 0xABBF).addRange(0xFB00, 0xFB06).addRange(0xFB13, 0xFB17).addRange(0xFF41, 0xFF5A).addRange(0x10428, 0x1044F).addRange(0x104D8, 0x104FB).addRange(0x10597, 0x105A1).addRange(0x105A3, 0x105B1).addRange(0x105B3, 0x105B9).addRange(0x105BB, 0x105BC).addRange(0x10CC0, 0x10CF2).addRange(0x118C0, 0x118DF).addRange(0x16E60, 0x16E7F).addRange(0x1E922, 0x1E943);\nexports.characters = set;\n","const set = require('regenerate')(0xB5, 0x101, 0x103, 0x105, 0x107, 0x109, 0x10B, 0x10D, 0x10F, 0x111, 0x113, 0x115, 0x117, 0x119, 0x11B, 0x11D, 0x11F, 0x121, 0x123, 0x125, 0x127, 0x129, 0x12B, 0x12D, 0x12F, 0x131, 0x133, 0x135, 0x137, 0x13A, 0x13C, 0x13E, 0x140, 0x142, 0x144, 0x146, 0x14B, 0x14D, 0x14F, 0x151, 0x153, 0x155, 0x157, 0x159, 0x15B, 0x15D, 0x15F, 0x161, 0x163, 0x165, 0x167, 0x169, 0x16B, 0x16D, 0x16F, 0x171, 0x173, 0x175, 0x177, 0x17A, 0x17C, 0x183, 0x185, 0x188, 0x18C, 0x192, 0x195, 0x19E, 0x1A1, 0x1A3, 0x1A5, 0x1A8, 0x1AD, 0x1B0, 0x1B4, 0x1B6, 0x1B9, 0x1BD, 0x1BF, 0x1CE, 0x1D0, 0x1D2, 0x1D4, 0x1D6, 0x1D8, 0x1DA, 0x1DF, 0x1E1, 0x1E3, 0x1E5, 0x1E7, 0x1E9, 0x1EB, 0x1ED, 0x1F5, 0x1F9, 0x1FB, 0x1FD, 0x1FF, 0x201, 0x203, 0x205, 0x207, 0x209, 0x20B, 0x20D, 0x20F, 0x211, 0x213, 0x215, 0x217, 0x219, 0x21B, 0x21D, 0x21F, 0x223, 0x225, 0x227, 0x229, 0x22B, 0x22D, 0x22F, 0x231, 0x233, 0x23C, 0x242, 0x247, 0x249, 0x24B, 0x24D, 0x259, 0x263, 0x26F, 0x275, 0x27D, 0x280, 0x292, 0x345, 0x371, 0x373, 0x377, 0x390, 0x3D9, 0x3DB, 0x3DD, 0x3DF, 0x3E1, 0x3E3, 0x3E5, 0x3E7, 0x3E9, 0x3EB, 0x3ED, 0x3F5, 0x3F8, 0x3FB, 0x461, 0x463, 0x465, 0x467, 0x469, 0x46B, 0x46D, 0x46F, 0x471, 0x473, 0x475, 0x477, 0x479, 0x47B, 0x47D, 0x47F, 0x481, 0x48B, 0x48D, 0x48F, 0x491, 0x493, 0x495, 0x497, 0x499, 0x49B, 0x49D, 0x49F, 0x4A1, 0x4A3, 0x4A5, 0x4A7, 0x4A9, 0x4AB, 0x4AD, 0x4AF, 0x4B1, 0x4B3, 0x4B5, 0x4B7, 0x4B9, 0x4BB, 0x4BD, 0x4BF, 0x4C2, 0x4C4, 0x4C6, 0x4C8, 0x4CA, 0x4CC, 0x4D1, 0x4D3, 0x4D5, 0x4D7, 0x4D9, 0x4DB, 0x4DD, 0x4DF, 0x4E1, 0x4E3, 0x4E5, 0x4E7, 0x4E9, 0x4EB, 0x4ED, 0x4EF, 0x4F1, 0x4F3, 0x4F5, 0x4F7, 0x4F9, 0x4FB, 0x4FD, 0x4FF, 0x501, 0x503, 0x505, 0x507, 0x509, 0x50B, 0x50D, 0x50F, 0x511, 0x513, 0x515, 0x517, 0x519, 0x51B, 0x51D, 0x51F, 0x521, 0x523, 0x525, 0x527, 0x529, 0x52B, 0x52D, 0x52F, 0x1D79, 0x1D7D, 0x1D8E, 0x1E01, 0x1E03, 0x1E05, 0x1E07, 0x1E09, 0x1E0B, 0x1E0D, 0x1E0F, 0x1E11, 0x1E13, 0x1E15, 0x1E17, 0x1E19, 0x1E1B, 0x1E1D, 0x1E1F, 0x1E21, 0x1E23, 0x1E25, 0x1E27, 0x1E29, 0x1E2B, 0x1E2D, 0x1E2F, 0x1E31, 0x1E33, 0x1E35, 0x1E37, 0x1E39, 0x1E3B, 0x1E3D, 0x1E3F, 0x1E41, 0x1E43, 0x1E45, 0x1E47, 0x1E49, 0x1E4B, 0x1E4D, 0x1E4F, 0x1E51, 0x1E53, 0x1E55, 0x1E57, 0x1E59, 0x1E5B, 0x1E5D, 0x1E5F, 0x1E61, 0x1E63, 0x1E65, 0x1E67, 0x1E69, 0x1E6B, 0x1E6D, 0x1E6F, 0x1E71, 0x1E73, 0x1E75, 0x1E77, 0x1E79, 0x1E7B, 0x1E7D, 0x1E7F, 0x1E81, 0x1E83, 0x1E85, 0x1E87, 0x1E89, 0x1E8B, 0x1E8D, 0x1E8F, 0x1E91, 0x1E93, 0x1EA1, 0x1EA3, 0x1EA5, 0x1EA7, 0x1EA9, 0x1EAB, 0x1EAD, 0x1EAF, 0x1EB1, 0x1EB3, 0x1EB5, 0x1EB7, 0x1EB9, 0x1EBB, 0x1EBD, 0x1EBF, 0x1EC1, 0x1EC3, 0x1EC5, 0x1EC7, 0x1EC9, 0x1ECB, 0x1ECD, 0x1ECF, 0x1ED1, 0x1ED3, 0x1ED5, 0x1ED7, 0x1ED9, 0x1EDB, 0x1EDD, 0x1EDF, 0x1EE1, 0x1EE3, 0x1EE5, 0x1EE7, 0x1EE9, 0x1EEB, 0x1EED, 0x1EEF, 0x1EF1, 0x1EF3, 0x1EF5, 0x1EF7, 0x1EF9, 0x1EFB, 0x1EFD, 0x1FBC, 0x1FBE, 0x1FCC, 0x1FFC, 0x214E, 0x2184, 0x2C61, 0x2C68, 0x2C6A, 0x2C6C, 0x2C73, 0x2C76, 0x2C81, 0x2C83, 0x2C85, 0x2C87, 0x2C89, 0x2C8B, 0x2C8D, 0x2C8F, 0x2C91, 0x2C93, 0x2C95, 0x2C97, 0x2C99, 0x2C9B, 0x2C9D, 0x2C9F, 0x2CA1, 0x2CA3, 0x2CA5, 0x2CA7, 0x2CA9, 0x2CAB, 0x2CAD, 0x2CAF, 0x2CB1, 0x2CB3, 0x2CB5, 0x2CB7, 0x2CB9, 0x2CBB, 0x2CBD, 0x2CBF, 0x2CC1, 0x2CC3, 0x2CC5, 0x2CC7, 0x2CC9, 0x2CCB, 0x2CCD, 0x2CCF, 0x2CD1, 0x2CD3, 0x2CD5, 0x2CD7, 0x2CD9, 0x2CDB, 0x2CDD, 0x2CDF, 0x2CE1, 0x2CE3, 0x2CEC, 0x2CEE, 0x2CF3, 0x2D27, 0x2D2D, 0xA641, 0xA643, 0xA645, 0xA647, 0xA649, 0xA64B, 0xA64D, 0xA64F, 0xA651, 0xA653, 0xA655, 0xA657, 0xA659, 0xA65B, 0xA65D, 0xA65F, 0xA661, 0xA663, 0xA665, 0xA667, 0xA669, 0xA66B, 0xA66D, 0xA681, 0xA683, 0xA685, 0xA687, 0xA689, 0xA68B, 0xA68D, 0xA68F, 0xA691, 0xA693, 0xA695, 0xA697, 0xA699, 0xA69B, 0xA723, 0xA725, 0xA727, 0xA729, 0xA72B, 0xA72D, 0xA72F, 0xA733, 0xA735, 0xA737, 0xA739, 0xA73B, 0xA73D, 0xA73F, 0xA741, 0xA743, 0xA745, 0xA747, 0xA749, 0xA74B, 0xA74D, 0xA74F, 0xA751, 0xA753, 0xA755, 0xA757, 0xA759, 0xA75B, 0xA75D, 0xA75F, 0xA761, 0xA763, 0xA765, 0xA767, 0xA769, 0xA76B, 0xA76D, 0xA76F, 0xA77A, 0xA77C, 0xA77F, 0xA781, 0xA783, 0xA785, 0xA787, 0xA78C, 0xA791, 0xA797, 0xA799, 0xA79B, 0xA79D, 0xA79F, 0xA7A1, 0xA7A3, 0xA7A5, 0xA7A7, 0xA7A9, 0xA7B5, 0xA7B7, 0xA7B9, 0xA7BB, 0xA7BD, 0xA7BF, 0xA7C1, 0xA7C3, 0xA7C8, 0xA7CA, 0xA7D1, 0xA7D7, 0xA7D9, 0xA7F6, 0xAB53);\nset.addRange(0x61, 0x7A).addRange(0xDF, 0xF6).addRange(0xF8, 0xFF).addRange(0x148, 0x149).addRange(0x17E, 0x180).addRange(0x199, 0x19A).addRange(0x1C5, 0x1C6).addRange(0x1C8, 0x1C9).addRange(0x1CB, 0x1CC).addRange(0x1DC, 0x1DD).addRange(0x1EF, 0x1F0).addRange(0x1F2, 0x1F3).addRange(0x23F, 0x240).addRange(0x24F, 0x254).addRange(0x256, 0x257).addRange(0x25B, 0x25C).addRange(0x260, 0x261).addRange(0x265, 0x266).addRange(0x268, 0x26C).addRange(0x271, 0x272).addRange(0x282, 0x283).addRange(0x287, 0x28C).addRange(0x29D, 0x29E).addRange(0x37B, 0x37D).addRange(0x3AC, 0x3CE).addRange(0x3D0, 0x3D1).addRange(0x3D5, 0x3D7).addRange(0x3EF, 0x3F3).addRange(0x430, 0x45F).addRange(0x4CE, 0x4CF).addRange(0x561, 0x587).addRange(0x10D0, 0x10FA).addRange(0x10FD, 0x10FF).addRange(0x13F8, 0x13FD).addRange(0x1C80, 0x1C88).addRange(0x1E95, 0x1E9B).addRange(0x1EFF, 0x1F07).addRange(0x1F10, 0x1F15).addRange(0x1F20, 0x1F27).addRange(0x1F30, 0x1F37).addRange(0x1F40, 0x1F45).addRange(0x1F50, 0x1F57).addRange(0x1F60, 0x1F67).addRange(0x1F70, 0x1F7D).addRange(0x1F80, 0x1FB4).addRange(0x1FB6, 0x1FB7).addRange(0x1FC2, 0x1FC4).addRange(0x1FC6, 0x1FC7).addRange(0x1FD0, 0x1FD3).addRange(0x1FD6, 0x1FD7).addRange(0x1FE0, 0x1FE7);\nset.addRange(0x1FF2, 0x1FF4).addRange(0x1FF6, 0x1FF7).addRange(0x2170, 0x217F).addRange(0x24D0, 0x24E9).addRange(0x2C30, 0x2C5F).addRange(0x2C65, 0x2C66).addRange(0x2D00, 0x2D25).addRange(0xA793, 0xA794).addRange(0xAB70, 0xABBF).addRange(0xFB00, 0xFB06).addRange(0xFB13, 0xFB17).addRange(0xFF41, 0xFF5A).addRange(0x10428, 0x1044F).addRange(0x104D8, 0x104FB).addRange(0x10597, 0x105A1).addRange(0x105A3, 0x105B1).addRange(0x105B3, 0x105B9).addRange(0x105BB, 0x105BC).addRange(0x10CC0, 0x10CF2).addRange(0x118C0, 0x118DF).addRange(0x16E60, 0x16E7F).addRange(0x1E922, 0x1E943);\nexports.characters = set;\n","const set = require('regenerate')(0x2D, 0x58A, 0x5BE, 0x1400, 0x1806, 0x2053, 0x207B, 0x208B, 0x2212, 0x2E17, 0x2E1A, 0x2E40, 0x2E5D, 0x301C, 0x3030, 0x30A0, 0xFE58, 0xFE63, 0xFF0D, 0x10EAD);\nset.addRange(0x2010, 0x2015).addRange(0x2E3A, 0x2E3B).addRange(0xFE31, 0xFE32);\nexports.characters = set;\n","const set = require('regenerate')(0xAD, 0x34F, 0x61C, 0x3164, 0xFEFF, 0xFFA0);\nset.addRange(0x115F, 0x1160).addRange(0x17B4, 0x17B5).addRange(0x180B, 0x180F).addRange(0x200B, 0x200F).addRange(0x202A, 0x202E).addRange(0x2060, 0x206F).addRange(0xFE00, 0xFE0F).addRange(0xFFF0, 0xFFF8).addRange(0x1BCA0, 0x1BCA3).addRange(0x1D173, 0x1D17A).addRange(0xE0000, 0xE0FFF);\nexports.characters = set;\n","const set = require('regenerate')(0x149, 0x673, 0xF77, 0xF79, 0xE0001);\nset.addRange(0x17A3, 0x17A4).addRange(0x206A, 0x206F).addRange(0x2329, 0x232A);\nexports.characters = set;\n","const set = require('regenerate')(0x5E, 0x60, 0xA8, 0xAF, 0xB4, 0x37A, 0x559, 0x5BF, 0x5C4, 0x93C, 0x94D, 0x971, 0x9BC, 0x9CD, 0xA3C, 0xA4D, 0xABC, 0xACD, 0xB3C, 0xB4D, 0xB55, 0xBCD, 0xC3C, 0xC4D, 0xCBC, 0xCCD, 0xD4D, 0xDCA, 0xE4E, 0xEBA, 0xF35, 0xF37, 0xF39, 0xFC6, 0x1037, 0x108F, 0x17DD, 0x1A7F, 0x1B34, 0x1B44, 0x1CED, 0x1CF4, 0x1FBD, 0x2E2F, 0x30FC, 0xA66F, 0xA67F, 0xA8C4, 0xA953, 0xA9B3, 0xA9C0, 0xA9E5, 0xAAF6, 0xFB1E, 0xFF3E, 0xFF40, 0xFF70, 0xFFE3, 0x102E0, 0x11046, 0x11070, 0x11173, 0x111C0, 0x1133C, 0x1134D, 0x11442, 0x11446, 0x1163F, 0x1172B, 0x11943, 0x119E0, 0x11A34, 0x11A47, 0x11A99, 0x11C3F, 0x11D42, 0x11D97, 0x1E2AE);\nset.addRange(0xB7, 0xB8).addRange(0x2B0, 0x34E).addRange(0x350, 0x357).addRange(0x35D, 0x362).addRange(0x374, 0x375).addRange(0x384, 0x385).addRange(0x483, 0x487).addRange(0x591, 0x5A1).addRange(0x5A3, 0x5BD).addRange(0x5C1, 0x5C2).addRange(0x64B, 0x652).addRange(0x657, 0x658).addRange(0x6DF, 0x6E0).addRange(0x6E5, 0x6E6).addRange(0x6EA, 0x6EC).addRange(0x730, 0x74A).addRange(0x7A6, 0x7B0).addRange(0x7EB, 0x7F5).addRange(0x818, 0x819).addRange(0x898, 0x89F).addRange(0x8C9, 0x8D2).addRange(0x8E3, 0x8FE).addRange(0x951, 0x954).addRange(0xAFD, 0xAFF).addRange(0xD3B, 0xD3C).addRange(0xE47, 0xE4C).addRange(0xEC8, 0xECC).addRange(0xF18, 0xF19).addRange(0xF3E, 0xF3F).addRange(0xF82, 0xF84).addRange(0xF86, 0xF87).addRange(0x1039, 0x103A).addRange(0x1063, 0x1064).addRange(0x1069, 0x106D).addRange(0x1087, 0x108D).addRange(0x109A, 0x109B).addRange(0x135D, 0x135F).addRange(0x1714, 0x1715).addRange(0x17C9, 0x17D3).addRange(0x1939, 0x193B).addRange(0x1A75, 0x1A7C).addRange(0x1AB0, 0x1ABE).addRange(0x1AC1, 0x1ACB).addRange(0x1B6B, 0x1B73).addRange(0x1BAA, 0x1BAB).addRange(0x1C36, 0x1C37).addRange(0x1C78, 0x1C7D).addRange(0x1CD0, 0x1CE8).addRange(0x1CF7, 0x1CF9).addRange(0x1D2C, 0x1D6A).addRange(0x1DC4, 0x1DCF);\nset.addRange(0x1DF5, 0x1DFF).addRange(0x1FBF, 0x1FC1).addRange(0x1FCD, 0x1FCF).addRange(0x1FDD, 0x1FDF).addRange(0x1FED, 0x1FEF).addRange(0x1FFD, 0x1FFE).addRange(0x2CEF, 0x2CF1).addRange(0x302A, 0x302F).addRange(0x3099, 0x309C).addRange(0xA67C, 0xA67D).addRange(0xA69C, 0xA69D).addRange(0xA6F0, 0xA6F1).addRange(0xA700, 0xA721).addRange(0xA788, 0xA78A).addRange(0xA7F8, 0xA7F9).addRange(0xA8E0, 0xA8F1).addRange(0xA92B, 0xA92E).addRange(0xAA7B, 0xAA7D).addRange(0xAABF, 0xAAC2).addRange(0xAB5B, 0xAB5F).addRange(0xAB69, 0xAB6B).addRange(0xABEC, 0xABED).addRange(0xFE20, 0xFE2F).addRange(0xFF9E, 0xFF9F).addRange(0x10780, 0x10785).addRange(0x10787, 0x107B0).addRange(0x107B2, 0x107BA).addRange(0x10AE5, 0x10AE6).addRange(0x10D22, 0x10D27).addRange(0x10EFD, 0x10EFF).addRange(0x10F46, 0x10F50).addRange(0x10F82, 0x10F85).addRange(0x110B9, 0x110BA).addRange(0x11133, 0x11134).addRange(0x111CA, 0x111CC).addRange(0x11235, 0x11236).addRange(0x112E9, 0x112EA).addRange(0x11366, 0x1136C).addRange(0x11370, 0x11374).addRange(0x114C2, 0x114C3).addRange(0x115BF, 0x115C0).addRange(0x116B6, 0x116B7).addRange(0x11839, 0x1183A).addRange(0x1193D, 0x1193E).addRange(0x11D44, 0x11D45).addRange(0x13447, 0x13455).addRange(0x16AF0, 0x16AF4).addRange(0x16B30, 0x16B36).addRange(0x16F8F, 0x16F9F).addRange(0x16FF0, 0x16FF1).addRange(0x1AFF0, 0x1AFF3);\nset.addRange(0x1AFF5, 0x1AFFB).addRange(0x1AFFD, 0x1AFFE).addRange(0x1CF00, 0x1CF2D).addRange(0x1CF30, 0x1CF46).addRange(0x1D167, 0x1D169).addRange(0x1D16D, 0x1D172).addRange(0x1D17B, 0x1D182).addRange(0x1D185, 0x1D18B).addRange(0x1D1AA, 0x1D1AD).addRange(0x1E030, 0x1E06D).addRange(0x1E130, 0x1E136).addRange(0x1E2EC, 0x1E2EF).addRange(0x1E8D0, 0x1E8D6).addRange(0x1E944, 0x1E946).addRange(0x1E948, 0x1E94A);\nexports.characters = set;\n","const set = require('regenerate')(0x23, 0x2A, 0x200D, 0x20E3, 0xFE0F);\nset.addRange(0x30, 0x39).addRange(0x1F1E6, 0x1F1FF).addRange(0x1F3FB, 0x1F3FF).addRange(0x1F9B0, 0x1F9B3).addRange(0xE0020, 0xE007F);\nexports.characters = set;\n","const set = require('regenerate')(0x261D, 0x26F9, 0x1F385, 0x1F3C7, 0x1F47C, 0x1F48F, 0x1F491, 0x1F4AA, 0x1F57A, 0x1F590, 0x1F6A3, 0x1F6C0, 0x1F6CC, 0x1F90C, 0x1F90F, 0x1F926, 0x1F977, 0x1F9BB);\nset.addRange(0x270A, 0x270D).addRange(0x1F3C2, 0x1F3C4).addRange(0x1F3CA, 0x1F3CC).addRange(0x1F442, 0x1F443).addRange(0x1F446, 0x1F450).addRange(0x1F466, 0x1F478).addRange(0x1F481, 0x1F483).addRange(0x1F485, 0x1F487).addRange(0x1F574, 0x1F575).addRange(0x1F595, 0x1F596).addRange(0x1F645, 0x1F647).addRange(0x1F64B, 0x1F64F).addRange(0x1F6B4, 0x1F6B6).addRange(0x1F918, 0x1F91F).addRange(0x1F930, 0x1F939).addRange(0x1F93C, 0x1F93E).addRange(0x1F9B5, 0x1F9B6).addRange(0x1F9B8, 0x1F9B9).addRange(0x1F9CD, 0x1F9CF).addRange(0x1F9D1, 0x1F9DD).addRange(0x1FAC3, 0x1FAC5).addRange(0x1FAF0, 0x1FAF8);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x1F3FB, 0x1F3FF);\nexports.characters = set;\n","const set = require('regenerate')(0x23F0, 0x23F3, 0x267F, 0x2693, 0x26A1, 0x26CE, 0x26D4, 0x26EA, 0x26F5, 0x26FA, 0x26FD, 0x2705, 0x2728, 0x274C, 0x274E, 0x2757, 0x27B0, 0x27BF, 0x2B50, 0x2B55, 0x1F004, 0x1F0CF, 0x1F18E, 0x1F201, 0x1F21A, 0x1F22F, 0x1F3F4, 0x1F440, 0x1F57A, 0x1F5A4, 0x1F6CC, 0x1F7F0);\nset.addRange(0x231A, 0x231B).addRange(0x23E9, 0x23EC).addRange(0x25FD, 0x25FE).addRange(0x2614, 0x2615).addRange(0x2648, 0x2653).addRange(0x26AA, 0x26AB).addRange(0x26BD, 0x26BE).addRange(0x26C4, 0x26C5).addRange(0x26F2, 0x26F3).addRange(0x270A, 0x270B).addRange(0x2753, 0x2755).addRange(0x2795, 0x2797).addRange(0x2B1B, 0x2B1C).addRange(0x1F191, 0x1F19A).addRange(0x1F1E6, 0x1F1FF).addRange(0x1F232, 0x1F236).addRange(0x1F238, 0x1F23A).addRange(0x1F250, 0x1F251).addRange(0x1F300, 0x1F320).addRange(0x1F32D, 0x1F335).addRange(0x1F337, 0x1F37C).addRange(0x1F37E, 0x1F393).addRange(0x1F3A0, 0x1F3CA).addRange(0x1F3CF, 0x1F3D3).addRange(0x1F3E0, 0x1F3F0).addRange(0x1F3F8, 0x1F43E).addRange(0x1F442, 0x1F4FC).addRange(0x1F4FF, 0x1F53D).addRange(0x1F54B, 0x1F54E).addRange(0x1F550, 0x1F567).addRange(0x1F595, 0x1F596).addRange(0x1F5FB, 0x1F64F).addRange(0x1F680, 0x1F6C5).addRange(0x1F6D0, 0x1F6D2).addRange(0x1F6D5, 0x1F6D7).addRange(0x1F6DC, 0x1F6DF).addRange(0x1F6EB, 0x1F6EC).addRange(0x1F6F4, 0x1F6FC).addRange(0x1F7E0, 0x1F7EB).addRange(0x1F90C, 0x1F93A).addRange(0x1F93C, 0x1F945).addRange(0x1F947, 0x1F9FF).addRange(0x1FA70, 0x1FA7C).addRange(0x1FA80, 0x1FA88).addRange(0x1FA90, 0x1FABD).addRange(0x1FABF, 0x1FAC5).addRange(0x1FACE, 0x1FADB).addRange(0x1FAE0, 0x1FAE8).addRange(0x1FAF0, 0x1FAF8);\nexports.characters = set;\n","const set = require('regenerate')(0x23, 0x2A, 0xA9, 0xAE, 0x203C, 0x2049, 0x2122, 0x2139, 0x2328, 0x23CF, 0x24C2, 0x25B6, 0x25C0, 0x260E, 0x2611, 0x2618, 0x261D, 0x2620, 0x2626, 0x262A, 0x2640, 0x2642, 0x2663, 0x2668, 0x267B, 0x2699, 0x26A7, 0x26C8, 0x26D1, 0x26FD, 0x2702, 0x2705, 0x270F, 0x2712, 0x2714, 0x2716, 0x271D, 0x2721, 0x2728, 0x2744, 0x2747, 0x274C, 0x274E, 0x2757, 0x27A1, 0x27B0, 0x27BF, 0x2B50, 0x2B55, 0x3030, 0x303D, 0x3297, 0x3299, 0x1F004, 0x1F0CF, 0x1F18E, 0x1F21A, 0x1F22F, 0x1F587, 0x1F590, 0x1F5A8, 0x1F5BC, 0x1F5E1, 0x1F5E3, 0x1F5E8, 0x1F5EF, 0x1F5F3, 0x1F6E9, 0x1F6F0, 0x1F7F0);\nset.addRange(0x30, 0x39).addRange(0x2194, 0x2199).addRange(0x21A9, 0x21AA).addRange(0x231A, 0x231B).addRange(0x23E9, 0x23F3).addRange(0x23F8, 0x23FA).addRange(0x25AA, 0x25AB).addRange(0x25FB, 0x25FE).addRange(0x2600, 0x2604).addRange(0x2614, 0x2615).addRange(0x2622, 0x2623).addRange(0x262E, 0x262F).addRange(0x2638, 0x263A).addRange(0x2648, 0x2653).addRange(0x265F, 0x2660).addRange(0x2665, 0x2666).addRange(0x267E, 0x267F).addRange(0x2692, 0x2697).addRange(0x269B, 0x269C).addRange(0x26A0, 0x26A1).addRange(0x26AA, 0x26AB).addRange(0x26B0, 0x26B1).addRange(0x26BD, 0x26BE).addRange(0x26C4, 0x26C5).addRange(0x26CE, 0x26CF).addRange(0x26D3, 0x26D4).addRange(0x26E9, 0x26EA).addRange(0x26F0, 0x26F5).addRange(0x26F7, 0x26FA).addRange(0x2708, 0x270D).addRange(0x2733, 0x2734).addRange(0x2753, 0x2755).addRange(0x2763, 0x2764).addRange(0x2795, 0x2797).addRange(0x2934, 0x2935).addRange(0x2B05, 0x2B07).addRange(0x2B1B, 0x2B1C).addRange(0x1F170, 0x1F171).addRange(0x1F17E, 0x1F17F).addRange(0x1F191, 0x1F19A).addRange(0x1F1E6, 0x1F1FF).addRange(0x1F201, 0x1F202).addRange(0x1F232, 0x1F23A).addRange(0x1F250, 0x1F251).addRange(0x1F300, 0x1F321).addRange(0x1F324, 0x1F393).addRange(0x1F396, 0x1F397).addRange(0x1F399, 0x1F39B).addRange(0x1F39E, 0x1F3F0).addRange(0x1F3F3, 0x1F3F5).addRange(0x1F3F7, 0x1F4FD);\nset.addRange(0x1F4FF, 0x1F53D).addRange(0x1F549, 0x1F54E).addRange(0x1F550, 0x1F567).addRange(0x1F56F, 0x1F570).addRange(0x1F573, 0x1F57A).addRange(0x1F58A, 0x1F58D).addRange(0x1F595, 0x1F596).addRange(0x1F5A4, 0x1F5A5).addRange(0x1F5B1, 0x1F5B2).addRange(0x1F5C2, 0x1F5C4).addRange(0x1F5D1, 0x1F5D3).addRange(0x1F5DC, 0x1F5DE).addRange(0x1F5FA, 0x1F64F).addRange(0x1F680, 0x1F6C5).addRange(0x1F6CB, 0x1F6D2).addRange(0x1F6D5, 0x1F6D7).addRange(0x1F6DC, 0x1F6E5).addRange(0x1F6EB, 0x1F6EC).addRange(0x1F6F3, 0x1F6FC).addRange(0x1F7E0, 0x1F7EB).addRange(0x1F90C, 0x1F93A).addRange(0x1F93C, 0x1F945).addRange(0x1F947, 0x1F9FF).addRange(0x1FA70, 0x1FA7C).addRange(0x1FA80, 0x1FA88).addRange(0x1FA90, 0x1FABD).addRange(0x1FABF, 0x1FAC5).addRange(0x1FACE, 0x1FADB).addRange(0x1FAE0, 0x1FAE8).addRange(0x1FAF0, 0x1FAF8);\nexports.characters = set;\n","const set = require('regenerate')(0xA9, 0xAE, 0x203C, 0x2049, 0x2122, 0x2139, 0x2328, 0x2388, 0x23CF, 0x24C2, 0x25B6, 0x25C0, 0x2714, 0x2716, 0x271D, 0x2721, 0x2728, 0x2744, 0x2747, 0x274C, 0x274E, 0x2757, 0x27A1, 0x27B0, 0x27BF, 0x2B50, 0x2B55, 0x3030, 0x303D, 0x3297, 0x3299, 0x1F12F, 0x1F18E, 0x1F21A, 0x1F22F);\nset.addRange(0x2194, 0x2199).addRange(0x21A9, 0x21AA).addRange(0x231A, 0x231B).addRange(0x23E9, 0x23F3).addRange(0x23F8, 0x23FA).addRange(0x25AA, 0x25AB).addRange(0x25FB, 0x25FE).addRange(0x2600, 0x2605).addRange(0x2607, 0x2612).addRange(0x2614, 0x2685).addRange(0x2690, 0x2705).addRange(0x2708, 0x2712).addRange(0x2733, 0x2734).addRange(0x2753, 0x2755).addRange(0x2763, 0x2767).addRange(0x2795, 0x2797).addRange(0x2934, 0x2935).addRange(0x2B05, 0x2B07).addRange(0x2B1B, 0x2B1C).addRange(0x1F000, 0x1F0FF).addRange(0x1F10D, 0x1F10F).addRange(0x1F16C, 0x1F171).addRange(0x1F17E, 0x1F17F).addRange(0x1F191, 0x1F19A).addRange(0x1F1AD, 0x1F1E5).addRange(0x1F201, 0x1F20F).addRange(0x1F232, 0x1F23A).addRange(0x1F23C, 0x1F23F).addRange(0x1F249, 0x1F3FA).addRange(0x1F400, 0x1F53D).addRange(0x1F546, 0x1F64F).addRange(0x1F680, 0x1F6FF).addRange(0x1F774, 0x1F77F).addRange(0x1F7D5, 0x1F7FF).addRange(0x1F80C, 0x1F80F).addRange(0x1F848, 0x1F84F).addRange(0x1F85A, 0x1F85F).addRange(0x1F888, 0x1F88F).addRange(0x1F8AE, 0x1F8FF).addRange(0x1F90C, 0x1F93A).addRange(0x1F93C, 0x1F945).addRange(0x1F947, 0x1FAFF).addRange(0x1FC00, 0x1FFFD);\nexports.characters = set;\n","const set = require('regenerate')(0xB7, 0x640, 0x7FA, 0xB55, 0xE46, 0xEC6, 0x180A, 0x1843, 0x1AA7, 0x1C36, 0x1C7B, 0x3005, 0xA015, 0xA60C, 0xA9CF, 0xA9E6, 0xAA70, 0xAADD, 0xFF70, 0x1135D, 0x11A98, 0x16FE3);\nset.addRange(0x2D0, 0x2D1).addRange(0x3031, 0x3035).addRange(0x309D, 0x309E).addRange(0x30FC, 0x30FE).addRange(0xAAF3, 0xAAF4).addRange(0x10781, 0x10782).addRange(0x115C6, 0x115C8).addRange(0x16B42, 0x16B43).addRange(0x16FE0, 0x16FE1).addRange(0x1E13C, 0x1E13D).addRange(0x1E944, 0x1E946);\nexports.characters = set;\n","const set = require('regenerate')(0x38C, 0x5BE, 0x5C0, 0x5C3, 0x5C6, 0x61B, 0x6DE, 0x6E9, 0x710, 0x7B1, 0x81A, 0x824, 0x828, 0x85E, 0x93B, 0x9B2, 0x9BD, 0x9CE, 0xA03, 0xA5E, 0xA76, 0xA83, 0xAC9, 0xAD0, 0xAF9, 0xB3D, 0xB40, 0xB83, 0xB9C, 0xBBF, 0xBD0, 0xC3D, 0xC5D, 0xD3D, 0xDBD, 0xE84, 0xEA5, 0xEBD, 0xEC6, 0xF36, 0xF38, 0xF7F, 0xF85, 0x1031, 0x1038, 0x10C7, 0x10CD, 0x1258, 0x12C0, 0x1715, 0x17B6, 0x18AA, 0x1940, 0x1A57, 0x1A61, 0x1B3B, 0x1BAA, 0x1BE7, 0x1BEE, 0x1CD3, 0x1CE1, 0x1CFA, 0x1F59, 0x1F5B, 0x1F5D, 0x2D27, 0x2D2D, 0xA673, 0xA7D3, 0xAA4D, 0xAAB1, 0xAAC0, 0xAAC2, 0xFB1D, 0xFB3E, 0xFDCF, 0x101A0, 0x10808, 0x1083C, 0x1093F, 0x10EAD, 0x11000, 0x11075, 0x1112C, 0x11235, 0x11288, 0x1133D, 0x1133F, 0x11350, 0x11445, 0x1145D, 0x114B9, 0x114BE, 0x114C1, 0x115BE, 0x1163E, 0x116AC, 0x116B6, 0x11726, 0x11838, 0x1183B, 0x11909, 0x1193D, 0x11A00, 0x11A50, 0x11A97, 0x11C3E, 0x11CA9, 0x11CB1, 0x11CB4, 0x11D46, 0x11D96, 0x11D98, 0x11F41, 0x11FB0, 0x16AF5, 0x1B132, 0x1B155, 0x1BC9C, 0x1BC9F, 0x1D166, 0x1D245, 0x1D4A2, 0x1D4BB, 0x1D546, 0x1E2FF, 0x1E94B, 0x1EE24, 0x1EE27, 0x1EE39, 0x1EE3B, 0x1EE42, 0x1EE47, 0x1EE49, 0x1EE4B, 0x1EE54, 0x1EE57, 0x1EE59, 0x1EE5B, 0x1EE5D, 0x1EE5F, 0x1EE64, 0x1EE7E, 0x1F7F0);\nset.addRange(0x20, 0x7E).addRange(0xA0, 0xAC).addRange(0xAE, 0x2FF).addRange(0x370, 0x377).addRange(0x37A, 0x37F).addRange(0x384, 0x38A).addRange(0x38E, 0x3A1).addRange(0x3A3, 0x482).addRange(0x48A, 0x52F).addRange(0x531, 0x556).addRange(0x559, 0x58A).addRange(0x58D, 0x58F).addRange(0x5D0, 0x5EA).addRange(0x5EF, 0x5F4).addRange(0x606, 0x60F).addRange(0x61D, 0x64A).addRange(0x660, 0x66F).addRange(0x671, 0x6D5).addRange(0x6E5, 0x6E6).addRange(0x6EE, 0x70D).addRange(0x712, 0x72F).addRange(0x74D, 0x7A5).addRange(0x7C0, 0x7EA).addRange(0x7F4, 0x7FA).addRange(0x7FE, 0x815).addRange(0x830, 0x83E).addRange(0x840, 0x858).addRange(0x860, 0x86A).addRange(0x870, 0x88E).addRange(0x8A0, 0x8C9).addRange(0x903, 0x939).addRange(0x93D, 0x940).addRange(0x949, 0x94C).addRange(0x94E, 0x950).addRange(0x958, 0x961).addRange(0x964, 0x980).addRange(0x982, 0x983).addRange(0x985, 0x98C).addRange(0x98F, 0x990).addRange(0x993, 0x9A8).addRange(0x9AA, 0x9B0).addRange(0x9B6, 0x9B9).addRange(0x9BF, 0x9C0).addRange(0x9C7, 0x9C8).addRange(0x9CB, 0x9CC).addRange(0x9DC, 0x9DD).addRange(0x9DF, 0x9E1).addRange(0x9E6, 0x9FD).addRange(0xA05, 0xA0A).addRange(0xA0F, 0xA10).addRange(0xA13, 0xA28);\nset.addRange(0xA2A, 0xA30).addRange(0xA32, 0xA33).addRange(0xA35, 0xA36).addRange(0xA38, 0xA39).addRange(0xA3E, 0xA40).addRange(0xA59, 0xA5C).addRange(0xA66, 0xA6F).addRange(0xA72, 0xA74).addRange(0xA85, 0xA8D).addRange(0xA8F, 0xA91).addRange(0xA93, 0xAA8).addRange(0xAAA, 0xAB0).addRange(0xAB2, 0xAB3).addRange(0xAB5, 0xAB9).addRange(0xABD, 0xAC0).addRange(0xACB, 0xACC).addRange(0xAE0, 0xAE1).addRange(0xAE6, 0xAF1).addRange(0xB02, 0xB03).addRange(0xB05, 0xB0C).addRange(0xB0F, 0xB10).addRange(0xB13, 0xB28).addRange(0xB2A, 0xB30).addRange(0xB32, 0xB33).addRange(0xB35, 0xB39).addRange(0xB47, 0xB48).addRange(0xB4B, 0xB4C).addRange(0xB5C, 0xB5D).addRange(0xB5F, 0xB61).addRange(0xB66, 0xB77).addRange(0xB85, 0xB8A).addRange(0xB8E, 0xB90).addRange(0xB92, 0xB95).addRange(0xB99, 0xB9A).addRange(0xB9E, 0xB9F).addRange(0xBA3, 0xBA4).addRange(0xBA8, 0xBAA).addRange(0xBAE, 0xBB9).addRange(0xBC1, 0xBC2).addRange(0xBC6, 0xBC8).addRange(0xBCA, 0xBCC).addRange(0xBE6, 0xBFA).addRange(0xC01, 0xC03).addRange(0xC05, 0xC0C).addRange(0xC0E, 0xC10).addRange(0xC12, 0xC28).addRange(0xC2A, 0xC39).addRange(0xC41, 0xC44).addRange(0xC58, 0xC5A).addRange(0xC60, 0xC61).addRange(0xC66, 0xC6F);\nset.addRange(0xC77, 0xC80).addRange(0xC82, 0xC8C).addRange(0xC8E, 0xC90).addRange(0xC92, 0xCA8).addRange(0xCAA, 0xCB3).addRange(0xCB5, 0xCB9).addRange(0xCBD, 0xCBE).addRange(0xCC0, 0xCC1).addRange(0xCC3, 0xCC4).addRange(0xCC7, 0xCC8).addRange(0xCCA, 0xCCB).addRange(0xCDD, 0xCDE).addRange(0xCE0, 0xCE1).addRange(0xCE6, 0xCEF).addRange(0xCF1, 0xCF3).addRange(0xD02, 0xD0C).addRange(0xD0E, 0xD10).addRange(0xD12, 0xD3A).addRange(0xD3F, 0xD40).addRange(0xD46, 0xD48).addRange(0xD4A, 0xD4C).addRange(0xD4E, 0xD4F).addRange(0xD54, 0xD56).addRange(0xD58, 0xD61).addRange(0xD66, 0xD7F).addRange(0xD82, 0xD83).addRange(0xD85, 0xD96).addRange(0xD9A, 0xDB1).addRange(0xDB3, 0xDBB).addRange(0xDC0, 0xDC6).addRange(0xDD0, 0xDD1).addRange(0xDD8, 0xDDE).addRange(0xDE6, 0xDEF).addRange(0xDF2, 0xDF4).addRange(0xE01, 0xE30).addRange(0xE32, 0xE33).addRange(0xE3F, 0xE46).addRange(0xE4F, 0xE5B).addRange(0xE81, 0xE82).addRange(0xE86, 0xE8A).addRange(0xE8C, 0xEA3).addRange(0xEA7, 0xEB0).addRange(0xEB2, 0xEB3).addRange(0xEC0, 0xEC4).addRange(0xED0, 0xED9).addRange(0xEDC, 0xEDF).addRange(0xF00, 0xF17).addRange(0xF1A, 0xF34).addRange(0xF3A, 0xF47).addRange(0xF49, 0xF6C).addRange(0xF88, 0xF8C);\nset.addRange(0xFBE, 0xFC5).addRange(0xFC7, 0xFCC).addRange(0xFCE, 0xFDA).addRange(0x1000, 0x102C).addRange(0x103B, 0x103C).addRange(0x103F, 0x1057).addRange(0x105A, 0x105D).addRange(0x1061, 0x1070).addRange(0x1075, 0x1081).addRange(0x1083, 0x1084).addRange(0x1087, 0x108C).addRange(0x108E, 0x109C).addRange(0x109E, 0x10C5).addRange(0x10D0, 0x1248).addRange(0x124A, 0x124D).addRange(0x1250, 0x1256).addRange(0x125A, 0x125D).addRange(0x1260, 0x1288).addRange(0x128A, 0x128D).addRange(0x1290, 0x12B0).addRange(0x12B2, 0x12B5).addRange(0x12B8, 0x12BE).addRange(0x12C2, 0x12C5).addRange(0x12C8, 0x12D6).addRange(0x12D8, 0x1310).addRange(0x1312, 0x1315).addRange(0x1318, 0x135A).addRange(0x1360, 0x137C).addRange(0x1380, 0x1399).addRange(0x13A0, 0x13F5).addRange(0x13F8, 0x13FD).addRange(0x1400, 0x169C).addRange(0x16A0, 0x16F8).addRange(0x1700, 0x1711).addRange(0x171F, 0x1731).addRange(0x1734, 0x1736).addRange(0x1740, 0x1751).addRange(0x1760, 0x176C).addRange(0x176E, 0x1770).addRange(0x1780, 0x17B3).addRange(0x17BE, 0x17C5).addRange(0x17C7, 0x17C8).addRange(0x17D4, 0x17DC).addRange(0x17E0, 0x17E9).addRange(0x17F0, 0x17F9).addRange(0x1800, 0x180A).addRange(0x1810, 0x1819).addRange(0x1820, 0x1878).addRange(0x1880, 0x1884).addRange(0x1887, 0x18A8).addRange(0x18B0, 0x18F5);\nset.addRange(0x1900, 0x191E).addRange(0x1923, 0x1926).addRange(0x1929, 0x192B).addRange(0x1930, 0x1931).addRange(0x1933, 0x1938).addRange(0x1944, 0x196D).addRange(0x1970, 0x1974).addRange(0x1980, 0x19AB).addRange(0x19B0, 0x19C9).addRange(0x19D0, 0x19DA).addRange(0x19DE, 0x1A16).addRange(0x1A19, 0x1A1A).addRange(0x1A1E, 0x1A55).addRange(0x1A63, 0x1A64).addRange(0x1A6D, 0x1A72).addRange(0x1A80, 0x1A89).addRange(0x1A90, 0x1A99).addRange(0x1AA0, 0x1AAD).addRange(0x1B04, 0x1B33).addRange(0x1B3D, 0x1B41).addRange(0x1B43, 0x1B4C).addRange(0x1B50, 0x1B6A).addRange(0x1B74, 0x1B7E).addRange(0x1B82, 0x1BA1).addRange(0x1BA6, 0x1BA7).addRange(0x1BAE, 0x1BE5).addRange(0x1BEA, 0x1BEC).addRange(0x1BF2, 0x1BF3).addRange(0x1BFC, 0x1C2B).addRange(0x1C34, 0x1C35).addRange(0x1C3B, 0x1C49).addRange(0x1C4D, 0x1C88).addRange(0x1C90, 0x1CBA).addRange(0x1CBD, 0x1CC7).addRange(0x1CE9, 0x1CEC).addRange(0x1CEE, 0x1CF3).addRange(0x1CF5, 0x1CF7).addRange(0x1D00, 0x1DBF).addRange(0x1E00, 0x1F15).addRange(0x1F18, 0x1F1D).addRange(0x1F20, 0x1F45).addRange(0x1F48, 0x1F4D).addRange(0x1F50, 0x1F57).addRange(0x1F5F, 0x1F7D).addRange(0x1F80, 0x1FB4).addRange(0x1FB6, 0x1FC4).addRange(0x1FC6, 0x1FD3).addRange(0x1FD6, 0x1FDB).addRange(0x1FDD, 0x1FEF).addRange(0x1FF2, 0x1FF4).addRange(0x1FF6, 0x1FFE);\nset.addRange(0x2000, 0x200A).addRange(0x2010, 0x2027).addRange(0x202F, 0x205F).addRange(0x2070, 0x2071).addRange(0x2074, 0x208E).addRange(0x2090, 0x209C).addRange(0x20A0, 0x20C0).addRange(0x2100, 0x218B).addRange(0x2190, 0x2426).addRange(0x2440, 0x244A).addRange(0x2460, 0x2B73).addRange(0x2B76, 0x2B95).addRange(0x2B97, 0x2CEE).addRange(0x2CF2, 0x2CF3).addRange(0x2CF9, 0x2D25).addRange(0x2D30, 0x2D67).addRange(0x2D6F, 0x2D70).addRange(0x2D80, 0x2D96).addRange(0x2DA0, 0x2DA6).addRange(0x2DA8, 0x2DAE).addRange(0x2DB0, 0x2DB6).addRange(0x2DB8, 0x2DBE).addRange(0x2DC0, 0x2DC6).addRange(0x2DC8, 0x2DCE).addRange(0x2DD0, 0x2DD6).addRange(0x2DD8, 0x2DDE).addRange(0x2E00, 0x2E5D).addRange(0x2E80, 0x2E99).addRange(0x2E9B, 0x2EF3).addRange(0x2F00, 0x2FD5).addRange(0x2FF0, 0x3029).addRange(0x3030, 0x303F).addRange(0x3041, 0x3096).addRange(0x309B, 0x30FF).addRange(0x3105, 0x312F).addRange(0x3131, 0x318E).addRange(0x3190, 0x31E3).addRange(0x31EF, 0x321E).addRange(0x3220, 0xA48C).addRange(0xA490, 0xA4C6).addRange(0xA4D0, 0xA62B).addRange(0xA640, 0xA66E).addRange(0xA67E, 0xA69D).addRange(0xA6A0, 0xA6EF).addRange(0xA6F2, 0xA6F7).addRange(0xA700, 0xA7CA).addRange(0xA7D0, 0xA7D1).addRange(0xA7D5, 0xA7D9).addRange(0xA7F2, 0xA801).addRange(0xA803, 0xA805).addRange(0xA807, 0xA80A);\nset.addRange(0xA80C, 0xA824).addRange(0xA827, 0xA82B).addRange(0xA830, 0xA839).addRange(0xA840, 0xA877).addRange(0xA880, 0xA8C3).addRange(0xA8CE, 0xA8D9).addRange(0xA8F2, 0xA8FE).addRange(0xA900, 0xA925).addRange(0xA92E, 0xA946).addRange(0xA952, 0xA953).addRange(0xA95F, 0xA97C).addRange(0xA983, 0xA9B2).addRange(0xA9B4, 0xA9B5).addRange(0xA9BA, 0xA9BB).addRange(0xA9BE, 0xA9CD).addRange(0xA9CF, 0xA9D9).addRange(0xA9DE, 0xA9E4).addRange(0xA9E6, 0xA9FE).addRange(0xAA00, 0xAA28).addRange(0xAA2F, 0xAA30).addRange(0xAA33, 0xAA34).addRange(0xAA40, 0xAA42).addRange(0xAA44, 0xAA4B).addRange(0xAA50, 0xAA59).addRange(0xAA5C, 0xAA7B).addRange(0xAA7D, 0xAAAF).addRange(0xAAB5, 0xAAB6).addRange(0xAAB9, 0xAABD).addRange(0xAADB, 0xAAEB).addRange(0xAAEE, 0xAAF5).addRange(0xAB01, 0xAB06).addRange(0xAB09, 0xAB0E).addRange(0xAB11, 0xAB16).addRange(0xAB20, 0xAB26).addRange(0xAB28, 0xAB2E).addRange(0xAB30, 0xAB6B).addRange(0xAB70, 0xABE4).addRange(0xABE6, 0xABE7).addRange(0xABE9, 0xABEC).addRange(0xABF0, 0xABF9).addRange(0xAC00, 0xD7A3).addRange(0xD7B0, 0xD7C6).addRange(0xD7CB, 0xD7FB).addRange(0xF900, 0xFA6D).addRange(0xFA70, 0xFAD9).addRange(0xFB00, 0xFB06).addRange(0xFB13, 0xFB17).addRange(0xFB1F, 0xFB36).addRange(0xFB38, 0xFB3C).addRange(0xFB40, 0xFB41).addRange(0xFB43, 0xFB44);\nset.addRange(0xFB46, 0xFBC2).addRange(0xFBD3, 0xFD8F).addRange(0xFD92, 0xFDC7).addRange(0xFDF0, 0xFDFF).addRange(0xFE10, 0xFE19).addRange(0xFE30, 0xFE52).addRange(0xFE54, 0xFE66).addRange(0xFE68, 0xFE6B).addRange(0xFE70, 0xFE74).addRange(0xFE76, 0xFEFC).addRange(0xFF01, 0xFF9D).addRange(0xFFA0, 0xFFBE).addRange(0xFFC2, 0xFFC7).addRange(0xFFCA, 0xFFCF).addRange(0xFFD2, 0xFFD7).addRange(0xFFDA, 0xFFDC).addRange(0xFFE0, 0xFFE6).addRange(0xFFE8, 0xFFEE).addRange(0xFFFC, 0xFFFD).addRange(0x10000, 0x1000B).addRange(0x1000D, 0x10026).addRange(0x10028, 0x1003A).addRange(0x1003C, 0x1003D).addRange(0x1003F, 0x1004D).addRange(0x10050, 0x1005D).addRange(0x10080, 0x100FA).addRange(0x10100, 0x10102).addRange(0x10107, 0x10133).addRange(0x10137, 0x1018E).addRange(0x10190, 0x1019C).addRange(0x101D0, 0x101FC).addRange(0x10280, 0x1029C).addRange(0x102A0, 0x102D0).addRange(0x102E1, 0x102FB).addRange(0x10300, 0x10323).addRange(0x1032D, 0x1034A).addRange(0x10350, 0x10375).addRange(0x10380, 0x1039D).addRange(0x1039F, 0x103C3).addRange(0x103C8, 0x103D5).addRange(0x10400, 0x1049D).addRange(0x104A0, 0x104A9).addRange(0x104B0, 0x104D3).addRange(0x104D8, 0x104FB).addRange(0x10500, 0x10527).addRange(0x10530, 0x10563).addRange(0x1056F, 0x1057A).addRange(0x1057C, 0x1058A).addRange(0x1058C, 0x10592).addRange(0x10594, 0x10595).addRange(0x10597, 0x105A1);\nset.addRange(0x105A3, 0x105B1).addRange(0x105B3, 0x105B9).addRange(0x105BB, 0x105BC).addRange(0x10600, 0x10736).addRange(0x10740, 0x10755).addRange(0x10760, 0x10767).addRange(0x10780, 0x10785).addRange(0x10787, 0x107B0).addRange(0x107B2, 0x107BA).addRange(0x10800, 0x10805).addRange(0x1080A, 0x10835).addRange(0x10837, 0x10838).addRange(0x1083F, 0x10855).addRange(0x10857, 0x1089E).addRange(0x108A7, 0x108AF).addRange(0x108E0, 0x108F2).addRange(0x108F4, 0x108F5).addRange(0x108FB, 0x1091B).addRange(0x1091F, 0x10939).addRange(0x10980, 0x109B7).addRange(0x109BC, 0x109CF).addRange(0x109D2, 0x10A00).addRange(0x10A10, 0x10A13).addRange(0x10A15, 0x10A17).addRange(0x10A19, 0x10A35).addRange(0x10A40, 0x10A48).addRange(0x10A50, 0x10A58).addRange(0x10A60, 0x10A9F).addRange(0x10AC0, 0x10AE4).addRange(0x10AEB, 0x10AF6).addRange(0x10B00, 0x10B35).addRange(0x10B39, 0x10B55).addRange(0x10B58, 0x10B72).addRange(0x10B78, 0x10B91).addRange(0x10B99, 0x10B9C).addRange(0x10BA9, 0x10BAF).addRange(0x10C00, 0x10C48).addRange(0x10C80, 0x10CB2).addRange(0x10CC0, 0x10CF2).addRange(0x10CFA, 0x10D23).addRange(0x10D30, 0x10D39).addRange(0x10E60, 0x10E7E).addRange(0x10E80, 0x10EA9).addRange(0x10EB0, 0x10EB1).addRange(0x10F00, 0x10F27).addRange(0x10F30, 0x10F45).addRange(0x10F51, 0x10F59).addRange(0x10F70, 0x10F81).addRange(0x10F86, 0x10F89).addRange(0x10FB0, 0x10FCB).addRange(0x10FE0, 0x10FF6);\nset.addRange(0x11002, 0x11037).addRange(0x11047, 0x1104D).addRange(0x11052, 0x1106F).addRange(0x11071, 0x11072).addRange(0x11082, 0x110B2).addRange(0x110B7, 0x110B8).addRange(0x110BB, 0x110BC).addRange(0x110BE, 0x110C1).addRange(0x110D0, 0x110E8).addRange(0x110F0, 0x110F9).addRange(0x11103, 0x11126).addRange(0x11136, 0x11147).addRange(0x11150, 0x11172).addRange(0x11174, 0x11176).addRange(0x11182, 0x111B5).addRange(0x111BF, 0x111C8).addRange(0x111CD, 0x111CE).addRange(0x111D0, 0x111DF).addRange(0x111E1, 0x111F4).addRange(0x11200, 0x11211).addRange(0x11213, 0x1122E).addRange(0x11232, 0x11233).addRange(0x11238, 0x1123D).addRange(0x1123F, 0x11240).addRange(0x11280, 0x11286).addRange(0x1128A, 0x1128D).addRange(0x1128F, 0x1129D).addRange(0x1129F, 0x112A9).addRange(0x112B0, 0x112DE).addRange(0x112E0, 0x112E2).addRange(0x112F0, 0x112F9).addRange(0x11302, 0x11303).addRange(0x11305, 0x1130C).addRange(0x1130F, 0x11310).addRange(0x11313, 0x11328).addRange(0x1132A, 0x11330).addRange(0x11332, 0x11333).addRange(0x11335, 0x11339).addRange(0x11341, 0x11344).addRange(0x11347, 0x11348).addRange(0x1134B, 0x1134D).addRange(0x1135D, 0x11363).addRange(0x11400, 0x11437).addRange(0x11440, 0x11441).addRange(0x11447, 0x1145B).addRange(0x1145F, 0x11461).addRange(0x11480, 0x114AF).addRange(0x114B1, 0x114B2).addRange(0x114BB, 0x114BC).addRange(0x114C4, 0x114C7).addRange(0x114D0, 0x114D9);\nset.addRange(0x11580, 0x115AE).addRange(0x115B0, 0x115B1).addRange(0x115B8, 0x115BB).addRange(0x115C1, 0x115DB).addRange(0x11600, 0x11632).addRange(0x1163B, 0x1163C).addRange(0x11641, 0x11644).addRange(0x11650, 0x11659).addRange(0x11660, 0x1166C).addRange(0x11680, 0x116AA).addRange(0x116AE, 0x116AF).addRange(0x116B8, 0x116B9).addRange(0x116C0, 0x116C9).addRange(0x11700, 0x1171A).addRange(0x11720, 0x11721).addRange(0x11730, 0x11746).addRange(0x11800, 0x1182E).addRange(0x118A0, 0x118F2).addRange(0x118FF, 0x11906).addRange(0x1190C, 0x11913).addRange(0x11915, 0x11916).addRange(0x11918, 0x1192F).addRange(0x11931, 0x11935).addRange(0x11937, 0x11938).addRange(0x1193F, 0x11942).addRange(0x11944, 0x11946).addRange(0x11950, 0x11959).addRange(0x119A0, 0x119A7).addRange(0x119AA, 0x119D3).addRange(0x119DC, 0x119DF).addRange(0x119E1, 0x119E4).addRange(0x11A0B, 0x11A32).addRange(0x11A39, 0x11A3A).addRange(0x11A3F, 0x11A46).addRange(0x11A57, 0x11A58).addRange(0x11A5C, 0x11A89).addRange(0x11A9A, 0x11AA2).addRange(0x11AB0, 0x11AF8).addRange(0x11B00, 0x11B09).addRange(0x11C00, 0x11C08).addRange(0x11C0A, 0x11C2F).addRange(0x11C40, 0x11C45).addRange(0x11C50, 0x11C6C).addRange(0x11C70, 0x11C8F).addRange(0x11D00, 0x11D06).addRange(0x11D08, 0x11D09).addRange(0x11D0B, 0x11D30).addRange(0x11D50, 0x11D59).addRange(0x11D60, 0x11D65).addRange(0x11D67, 0x11D68).addRange(0x11D6A, 0x11D8E);\nset.addRange(0x11D93, 0x11D94).addRange(0x11DA0, 0x11DA9).addRange(0x11EE0, 0x11EF2).addRange(0x11EF5, 0x11EF8).addRange(0x11F02, 0x11F10).addRange(0x11F12, 0x11F35).addRange(0x11F3E, 0x11F3F).addRange(0x11F43, 0x11F59).addRange(0x11FC0, 0x11FF1).addRange(0x11FFF, 0x12399).addRange(0x12400, 0x1246E).addRange(0x12470, 0x12474).addRange(0x12480, 0x12543).addRange(0x12F90, 0x12FF2).addRange(0x13000, 0x1342F).addRange(0x13441, 0x13446).addRange(0x14400, 0x14646).addRange(0x16800, 0x16A38).addRange(0x16A40, 0x16A5E).addRange(0x16A60, 0x16A69).addRange(0x16A6E, 0x16ABE).addRange(0x16AC0, 0x16AC9).addRange(0x16AD0, 0x16AED).addRange(0x16B00, 0x16B2F).addRange(0x16B37, 0x16B45).addRange(0x16B50, 0x16B59).addRange(0x16B5B, 0x16B61).addRange(0x16B63, 0x16B77).addRange(0x16B7D, 0x16B8F).addRange(0x16E40, 0x16E9A).addRange(0x16F00, 0x16F4A).addRange(0x16F50, 0x16F87).addRange(0x16F93, 0x16F9F).addRange(0x16FE0, 0x16FE3).addRange(0x16FF0, 0x16FF1).addRange(0x17000, 0x187F7).addRange(0x18800, 0x18CD5).addRange(0x18D00, 0x18D08).addRange(0x1AFF0, 0x1AFF3).addRange(0x1AFF5, 0x1AFFB).addRange(0x1AFFD, 0x1AFFE).addRange(0x1B000, 0x1B122).addRange(0x1B150, 0x1B152).addRange(0x1B164, 0x1B167).addRange(0x1B170, 0x1B2FB).addRange(0x1BC00, 0x1BC6A).addRange(0x1BC70, 0x1BC7C).addRange(0x1BC80, 0x1BC88).addRange(0x1BC90, 0x1BC99).addRange(0x1CF50, 0x1CFC3).addRange(0x1D000, 0x1D0F5);\nset.addRange(0x1D100, 0x1D126).addRange(0x1D129, 0x1D164).addRange(0x1D16A, 0x1D16D).addRange(0x1D183, 0x1D184).addRange(0x1D18C, 0x1D1A9).addRange(0x1D1AE, 0x1D1EA).addRange(0x1D200, 0x1D241).addRange(0x1D2C0, 0x1D2D3).addRange(0x1D2E0, 0x1D2F3).addRange(0x1D300, 0x1D356).addRange(0x1D360, 0x1D378).addRange(0x1D400, 0x1D454).addRange(0x1D456, 0x1D49C).addRange(0x1D49E, 0x1D49F).addRange(0x1D4A5, 0x1D4A6).addRange(0x1D4A9, 0x1D4AC).addRange(0x1D4AE, 0x1D4B9).addRange(0x1D4BD, 0x1D4C3).addRange(0x1D4C5, 0x1D505).addRange(0x1D507, 0x1D50A).addRange(0x1D50D, 0x1D514).addRange(0x1D516, 0x1D51C).addRange(0x1D51E, 0x1D539).addRange(0x1D53B, 0x1D53E).addRange(0x1D540, 0x1D544).addRange(0x1D54A, 0x1D550).addRange(0x1D552, 0x1D6A5).addRange(0x1D6A8, 0x1D7CB).addRange(0x1D7CE, 0x1D9FF).addRange(0x1DA37, 0x1DA3A).addRange(0x1DA6D, 0x1DA74).addRange(0x1DA76, 0x1DA83).addRange(0x1DA85, 0x1DA8B).addRange(0x1DF00, 0x1DF1E).addRange(0x1DF25, 0x1DF2A).addRange(0x1E030, 0x1E06D).addRange(0x1E100, 0x1E12C).addRange(0x1E137, 0x1E13D).addRange(0x1E140, 0x1E149).addRange(0x1E14E, 0x1E14F).addRange(0x1E290, 0x1E2AD).addRange(0x1E2C0, 0x1E2EB).addRange(0x1E2F0, 0x1E2F9).addRange(0x1E4D0, 0x1E4EB).addRange(0x1E4F0, 0x1E4F9).addRange(0x1E7E0, 0x1E7E6).addRange(0x1E7E8, 0x1E7EB).addRange(0x1E7ED, 0x1E7EE).addRange(0x1E7F0, 0x1E7FE).addRange(0x1E800, 0x1E8C4).addRange(0x1E8C7, 0x1E8CF);\nset.addRange(0x1E900, 0x1E943).addRange(0x1E950, 0x1E959).addRange(0x1E95E, 0x1E95F).addRange(0x1EC71, 0x1ECB4).addRange(0x1ED01, 0x1ED3D).addRange(0x1EE00, 0x1EE03).addRange(0x1EE05, 0x1EE1F).addRange(0x1EE21, 0x1EE22).addRange(0x1EE29, 0x1EE32).addRange(0x1EE34, 0x1EE37).addRange(0x1EE4D, 0x1EE4F).addRange(0x1EE51, 0x1EE52).addRange(0x1EE61, 0x1EE62).addRange(0x1EE67, 0x1EE6A).addRange(0x1EE6C, 0x1EE72).addRange(0x1EE74, 0x1EE77).addRange(0x1EE79, 0x1EE7C).addRange(0x1EE80, 0x1EE89).addRange(0x1EE8B, 0x1EE9B).addRange(0x1EEA1, 0x1EEA3).addRange(0x1EEA5, 0x1EEA9).addRange(0x1EEAB, 0x1EEBB).addRange(0x1EEF0, 0x1EEF1).addRange(0x1F000, 0x1F02B).addRange(0x1F030, 0x1F093).addRange(0x1F0A0, 0x1F0AE).addRange(0x1F0B1, 0x1F0BF).addRange(0x1F0C1, 0x1F0CF).addRange(0x1F0D1, 0x1F0F5).addRange(0x1F100, 0x1F1AD).addRange(0x1F1E6, 0x1F202).addRange(0x1F210, 0x1F23B).addRange(0x1F240, 0x1F248).addRange(0x1F250, 0x1F251).addRange(0x1F260, 0x1F265).addRange(0x1F300, 0x1F6D7).addRange(0x1F6DC, 0x1F6EC).addRange(0x1F6F0, 0x1F6FC).addRange(0x1F700, 0x1F776).addRange(0x1F77B, 0x1F7D9).addRange(0x1F7E0, 0x1F7EB).addRange(0x1F800, 0x1F80B).addRange(0x1F810, 0x1F847).addRange(0x1F850, 0x1F859).addRange(0x1F860, 0x1F887).addRange(0x1F890, 0x1F8AD).addRange(0x1F8B0, 0x1F8B1).addRange(0x1F900, 0x1FA53).addRange(0x1FA60, 0x1FA6D).addRange(0x1FA70, 0x1FA7C).addRange(0x1FA80, 0x1FA88);\nset.addRange(0x1FA90, 0x1FABD).addRange(0x1FABF, 0x1FAC5).addRange(0x1FACE, 0x1FADB).addRange(0x1FAE0, 0x1FAE8).addRange(0x1FAF0, 0x1FAF8).addRange(0x1FB00, 0x1FB92).addRange(0x1FB94, 0x1FBCA).addRange(0x1FBF0, 0x1FBF9).addRange(0x20000, 0x2A6DF).addRange(0x2A700, 0x2B739).addRange(0x2B740, 0x2B81D).addRange(0x2B820, 0x2CEA1).addRange(0x2CEB0, 0x2EBE0).addRange(0x2EBF0, 0x2EE5D).addRange(0x2F800, 0x2FA1D).addRange(0x30000, 0x3134A).addRange(0x31350, 0x323AF);\nexports.characters = set;\n","const set = require('regenerate')(0x5BF, 0x5C7, 0x670, 0x711, 0x7FD, 0x93A, 0x93C, 0x94D, 0x981, 0x9BC, 0x9BE, 0x9CD, 0x9D7, 0x9FE, 0xA3C, 0xA51, 0xA75, 0xABC, 0xACD, 0xB01, 0xB3C, 0xB4D, 0xB82, 0xBBE, 0xBC0, 0xBCD, 0xBD7, 0xC00, 0xC04, 0xC3C, 0xC81, 0xCBC, 0xCBF, 0xCC2, 0xCC6, 0xD3E, 0xD4D, 0xD57, 0xD81, 0xDCA, 0xDCF, 0xDD6, 0xDDF, 0xE31, 0xEB1, 0xF35, 0xF37, 0xF39, 0xFC6, 0x1082, 0x108D, 0x109D, 0x17C6, 0x17DD, 0x180F, 0x18A9, 0x1932, 0x1A1B, 0x1A56, 0x1A60, 0x1A62, 0x1A7F, 0x1B3C, 0x1B42, 0x1BE6, 0x1BED, 0x1CED, 0x1CF4, 0x200C, 0x2D7F, 0xA802, 0xA806, 0xA80B, 0xA82C, 0xA8FF, 0xA9B3, 0xA9E5, 0xAA43, 0xAA4C, 0xAA7C, 0xAAB0, 0xAAC1, 0xAAF6, 0xABE5, 0xABE8, 0xABED, 0xFB1E, 0x101FD, 0x102E0, 0x10A3F, 0x11001, 0x11070, 0x110C2, 0x11173, 0x111CF, 0x11234, 0x1123E, 0x11241, 0x112DF, 0x1133E, 0x11340, 0x11357, 0x11446, 0x1145E, 0x114B0, 0x114BA, 0x114BD, 0x115AF, 0x1163D, 0x116AB, 0x116AD, 0x116B7, 0x11930, 0x1193E, 0x11943, 0x119E0, 0x11A47, 0x11C3F, 0x11D3A, 0x11D47, 0x11D95, 0x11D97, 0x11F40, 0x11F42, 0x13440, 0x16F4F, 0x16FE4, 0x1D165, 0x1DA75, 0x1DA84, 0x1E08F, 0x1E2AE);\nset.addRange(0x300, 0x36F).addRange(0x483, 0x489).addRange(0x591, 0x5BD).addRange(0x5C1, 0x5C2).addRange(0x5C4, 0x5C5).addRange(0x610, 0x61A).addRange(0x64B, 0x65F).addRange(0x6D6, 0x6DC).addRange(0x6DF, 0x6E4).addRange(0x6E7, 0x6E8).addRange(0x6EA, 0x6ED).addRange(0x730, 0x74A).addRange(0x7A6, 0x7B0).addRange(0x7EB, 0x7F3).addRange(0x816, 0x819).addRange(0x81B, 0x823).addRange(0x825, 0x827).addRange(0x829, 0x82D).addRange(0x859, 0x85B).addRange(0x898, 0x89F).addRange(0x8CA, 0x8E1).addRange(0x8E3, 0x902).addRange(0x941, 0x948).addRange(0x951, 0x957).addRange(0x962, 0x963).addRange(0x9C1, 0x9C4).addRange(0x9E2, 0x9E3).addRange(0xA01, 0xA02).addRange(0xA41, 0xA42).addRange(0xA47, 0xA48).addRange(0xA4B, 0xA4D).addRange(0xA70, 0xA71).addRange(0xA81, 0xA82).addRange(0xAC1, 0xAC5).addRange(0xAC7, 0xAC8).addRange(0xAE2, 0xAE3).addRange(0xAFA, 0xAFF).addRange(0xB3E, 0xB3F).addRange(0xB41, 0xB44).addRange(0xB55, 0xB57).addRange(0xB62, 0xB63).addRange(0xC3E, 0xC40).addRange(0xC46, 0xC48).addRange(0xC4A, 0xC4D).addRange(0xC55, 0xC56).addRange(0xC62, 0xC63).addRange(0xCCC, 0xCCD).addRange(0xCD5, 0xCD6).addRange(0xCE2, 0xCE3).addRange(0xD00, 0xD01).addRange(0xD3B, 0xD3C);\nset.addRange(0xD41, 0xD44).addRange(0xD62, 0xD63).addRange(0xDD2, 0xDD4).addRange(0xE34, 0xE3A).addRange(0xE47, 0xE4E).addRange(0xEB4, 0xEBC).addRange(0xEC8, 0xECE).addRange(0xF18, 0xF19).addRange(0xF71, 0xF7E).addRange(0xF80, 0xF84).addRange(0xF86, 0xF87).addRange(0xF8D, 0xF97).addRange(0xF99, 0xFBC).addRange(0x102D, 0x1030).addRange(0x1032, 0x1037).addRange(0x1039, 0x103A).addRange(0x103D, 0x103E).addRange(0x1058, 0x1059).addRange(0x105E, 0x1060).addRange(0x1071, 0x1074).addRange(0x1085, 0x1086).addRange(0x135D, 0x135F).addRange(0x1712, 0x1714).addRange(0x1732, 0x1733).addRange(0x1752, 0x1753).addRange(0x1772, 0x1773).addRange(0x17B4, 0x17B5).addRange(0x17B7, 0x17BD).addRange(0x17C9, 0x17D3).addRange(0x180B, 0x180D).addRange(0x1885, 0x1886).addRange(0x1920, 0x1922).addRange(0x1927, 0x1928).addRange(0x1939, 0x193B).addRange(0x1A17, 0x1A18).addRange(0x1A58, 0x1A5E).addRange(0x1A65, 0x1A6C).addRange(0x1A73, 0x1A7C).addRange(0x1AB0, 0x1ACE).addRange(0x1B00, 0x1B03).addRange(0x1B34, 0x1B3A).addRange(0x1B6B, 0x1B73).addRange(0x1B80, 0x1B81).addRange(0x1BA2, 0x1BA5).addRange(0x1BA8, 0x1BA9).addRange(0x1BAB, 0x1BAD).addRange(0x1BE8, 0x1BE9).addRange(0x1BEF, 0x1BF1).addRange(0x1C2C, 0x1C33).addRange(0x1C36, 0x1C37).addRange(0x1CD0, 0x1CD2);\nset.addRange(0x1CD4, 0x1CE0).addRange(0x1CE2, 0x1CE8).addRange(0x1CF8, 0x1CF9).addRange(0x1DC0, 0x1DFF).addRange(0x20D0, 0x20F0).addRange(0x2CEF, 0x2CF1).addRange(0x2DE0, 0x2DFF).addRange(0x302A, 0x302F).addRange(0x3099, 0x309A).addRange(0xA66F, 0xA672).addRange(0xA674, 0xA67D).addRange(0xA69E, 0xA69F).addRange(0xA6F0, 0xA6F1).addRange(0xA825, 0xA826).addRange(0xA8C4, 0xA8C5).addRange(0xA8E0, 0xA8F1).addRange(0xA926, 0xA92D).addRange(0xA947, 0xA951).addRange(0xA980, 0xA982).addRange(0xA9B6, 0xA9B9).addRange(0xA9BC, 0xA9BD).addRange(0xAA29, 0xAA2E).addRange(0xAA31, 0xAA32).addRange(0xAA35, 0xAA36).addRange(0xAAB2, 0xAAB4).addRange(0xAAB7, 0xAAB8).addRange(0xAABE, 0xAABF).addRange(0xAAEC, 0xAAED).addRange(0xFE00, 0xFE0F).addRange(0xFE20, 0xFE2F).addRange(0xFF9E, 0xFF9F).addRange(0x10376, 0x1037A).addRange(0x10A01, 0x10A03).addRange(0x10A05, 0x10A06).addRange(0x10A0C, 0x10A0F).addRange(0x10A38, 0x10A3A).addRange(0x10AE5, 0x10AE6).addRange(0x10D24, 0x10D27).addRange(0x10EAB, 0x10EAC).addRange(0x10EFD, 0x10EFF).addRange(0x10F46, 0x10F50).addRange(0x10F82, 0x10F85).addRange(0x11038, 0x11046).addRange(0x11073, 0x11074).addRange(0x1107F, 0x11081).addRange(0x110B3, 0x110B6).addRange(0x110B9, 0x110BA).addRange(0x11100, 0x11102).addRange(0x11127, 0x1112B).addRange(0x1112D, 0x11134).addRange(0x11180, 0x11181);\nset.addRange(0x111B6, 0x111BE).addRange(0x111C9, 0x111CC).addRange(0x1122F, 0x11231).addRange(0x11236, 0x11237).addRange(0x112E3, 0x112EA).addRange(0x11300, 0x11301).addRange(0x1133B, 0x1133C).addRange(0x11366, 0x1136C).addRange(0x11370, 0x11374).addRange(0x11438, 0x1143F).addRange(0x11442, 0x11444).addRange(0x114B3, 0x114B8).addRange(0x114BF, 0x114C0).addRange(0x114C2, 0x114C3).addRange(0x115B2, 0x115B5).addRange(0x115BC, 0x115BD).addRange(0x115BF, 0x115C0).addRange(0x115DC, 0x115DD).addRange(0x11633, 0x1163A).addRange(0x1163F, 0x11640).addRange(0x116B0, 0x116B5).addRange(0x1171D, 0x1171F).addRange(0x11722, 0x11725).addRange(0x11727, 0x1172B).addRange(0x1182F, 0x11837).addRange(0x11839, 0x1183A).addRange(0x1193B, 0x1193C).addRange(0x119D4, 0x119D7).addRange(0x119DA, 0x119DB).addRange(0x11A01, 0x11A0A).addRange(0x11A33, 0x11A38).addRange(0x11A3B, 0x11A3E).addRange(0x11A51, 0x11A56).addRange(0x11A59, 0x11A5B).addRange(0x11A8A, 0x11A96).addRange(0x11A98, 0x11A99).addRange(0x11C30, 0x11C36).addRange(0x11C38, 0x11C3D).addRange(0x11C92, 0x11CA7).addRange(0x11CAA, 0x11CB0).addRange(0x11CB2, 0x11CB3).addRange(0x11CB5, 0x11CB6).addRange(0x11D31, 0x11D36).addRange(0x11D3C, 0x11D3D).addRange(0x11D3F, 0x11D45).addRange(0x11D90, 0x11D91).addRange(0x11EF3, 0x11EF4).addRange(0x11F00, 0x11F01).addRange(0x11F36, 0x11F3A).addRange(0x13447, 0x13455).addRange(0x16AF0, 0x16AF4);\nset.addRange(0x16B30, 0x16B36).addRange(0x16F8F, 0x16F92).addRange(0x1BC9D, 0x1BC9E).addRange(0x1CF00, 0x1CF2D).addRange(0x1CF30, 0x1CF46).addRange(0x1D167, 0x1D169).addRange(0x1D16E, 0x1D172).addRange(0x1D17B, 0x1D182).addRange(0x1D185, 0x1D18B).addRange(0x1D1AA, 0x1D1AD).addRange(0x1D242, 0x1D244).addRange(0x1DA00, 0x1DA36).addRange(0x1DA3B, 0x1DA6C).addRange(0x1DA9B, 0x1DA9F).addRange(0x1DAA1, 0x1DAAF).addRange(0x1E000, 0x1E006).addRange(0x1E008, 0x1E018).addRange(0x1E01B, 0x1E021).addRange(0x1E023, 0x1E024).addRange(0x1E026, 0x1E02A).addRange(0x1E130, 0x1E136).addRange(0x1E2EC, 0x1E2EF).addRange(0x1E4EC, 0x1E4EF).addRange(0x1E8D0, 0x1E8D6).addRange(0x1E944, 0x1E94A).addRange(0xE0020, 0xE007F).addRange(0xE0100, 0xE01EF);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x30, 0x39).addRange(0x41, 0x46).addRange(0x61, 0x66).addRange(0xFF10, 0xFF19).addRange(0xFF21, 0xFF26).addRange(0xFF41, 0xFF46);\nexports.characters = set;\n","const set = require('regenerate')(0x5F, 0xAA, 0xB5, 0xB7, 0xBA, 0x2EC, 0x2EE, 0x37F, 0x38C, 0x559, 0x5BF, 0x5C7, 0x6FF, 0x7FA, 0x7FD, 0x9B2, 0x9D7, 0x9FC, 0x9FE, 0xA3C, 0xA51, 0xA5E, 0xAD0, 0xB71, 0xB9C, 0xBD0, 0xBD7, 0xC5D, 0xDBD, 0xDCA, 0xDD6, 0xE84, 0xEA5, 0xEC6, 0xF00, 0xF35, 0xF37, 0xF39, 0xFC6, 0x10C7, 0x10CD, 0x1258, 0x12C0, 0x17D7, 0x1AA7, 0x1F59, 0x1F5B, 0x1F5D, 0x1FBE, 0x2054, 0x2071, 0x207F, 0x20E1, 0x2102, 0x2107, 0x2115, 0x2124, 0x2126, 0x2128, 0x214E, 0x2D27, 0x2D2D, 0x2D6F, 0xA7D3, 0xA82C, 0xA8FB, 0xFB3E, 0xFF3F, 0x101FD, 0x102E0, 0x10808, 0x1083C, 0x10A3F, 0x10F27, 0x110C2, 0x11176, 0x111DC, 0x11288, 0x11350, 0x11357, 0x114C7, 0x11644, 0x11909, 0x11A47, 0x11A9D, 0x11D3A, 0x11FB0, 0x1B132, 0x1B155, 0x1D4A2, 0x1D4BB, 0x1D546, 0x1DA75, 0x1DA84, 0x1E08F, 0x1E14E, 0x1EE24, 0x1EE27, 0x1EE39, 0x1EE3B, 0x1EE42, 0x1EE47, 0x1EE49, 0x1EE4B, 0x1EE54, 0x1EE57, 0x1EE59, 0x1EE5B, 0x1EE5D, 0x1EE5F, 0x1EE64, 0x1EE7E);\nset.addRange(0x30, 0x39).addRange(0x41, 0x5A).addRange(0x61, 0x7A).addRange(0xC0, 0xD6).addRange(0xD8, 0xF6).addRange(0xF8, 0x2C1).addRange(0x2C6, 0x2D1).addRange(0x2E0, 0x2E4).addRange(0x300, 0x374).addRange(0x376, 0x377).addRange(0x37A, 0x37D).addRange(0x386, 0x38A).addRange(0x38E, 0x3A1).addRange(0x3A3, 0x3F5).addRange(0x3F7, 0x481).addRange(0x483, 0x487).addRange(0x48A, 0x52F).addRange(0x531, 0x556).addRange(0x560, 0x588).addRange(0x591, 0x5BD).addRange(0x5C1, 0x5C2).addRange(0x5C4, 0x5C5).addRange(0x5D0, 0x5EA).addRange(0x5EF, 0x5F2).addRange(0x610, 0x61A).addRange(0x620, 0x669).addRange(0x66E, 0x6D3).addRange(0x6D5, 0x6DC).addRange(0x6DF, 0x6E8).addRange(0x6EA, 0x6FC).addRange(0x710, 0x74A).addRange(0x74D, 0x7B1).addRange(0x7C0, 0x7F5).addRange(0x800, 0x82D).addRange(0x840, 0x85B).addRange(0x860, 0x86A).addRange(0x870, 0x887).addRange(0x889, 0x88E).addRange(0x898, 0x8E1).addRange(0x8E3, 0x963).addRange(0x966, 0x96F).addRange(0x971, 0x983).addRange(0x985, 0x98C).addRange(0x98F, 0x990).addRange(0x993, 0x9A8).addRange(0x9AA, 0x9B0).addRange(0x9B6, 0x9B9).addRange(0x9BC, 0x9C4).addRange(0x9C7, 0x9C8).addRange(0x9CB, 0x9CE).addRange(0x9DC, 0x9DD);\nset.addRange(0x9DF, 0x9E3).addRange(0x9E6, 0x9F1).addRange(0xA01, 0xA03).addRange(0xA05, 0xA0A).addRange(0xA0F, 0xA10).addRange(0xA13, 0xA28).addRange(0xA2A, 0xA30).addRange(0xA32, 0xA33).addRange(0xA35, 0xA36).addRange(0xA38, 0xA39).addRange(0xA3E, 0xA42).addRange(0xA47, 0xA48).addRange(0xA4B, 0xA4D).addRange(0xA59, 0xA5C).addRange(0xA66, 0xA75).addRange(0xA81, 0xA83).addRange(0xA85, 0xA8D).addRange(0xA8F, 0xA91).addRange(0xA93, 0xAA8).addRange(0xAAA, 0xAB0).addRange(0xAB2, 0xAB3).addRange(0xAB5, 0xAB9).addRange(0xABC, 0xAC5).addRange(0xAC7, 0xAC9).addRange(0xACB, 0xACD).addRange(0xAE0, 0xAE3).addRange(0xAE6, 0xAEF).addRange(0xAF9, 0xAFF).addRange(0xB01, 0xB03).addRange(0xB05, 0xB0C).addRange(0xB0F, 0xB10).addRange(0xB13, 0xB28).addRange(0xB2A, 0xB30).addRange(0xB32, 0xB33).addRange(0xB35, 0xB39).addRange(0xB3C, 0xB44).addRange(0xB47, 0xB48).addRange(0xB4B, 0xB4D).addRange(0xB55, 0xB57).addRange(0xB5C, 0xB5D).addRange(0xB5F, 0xB63).addRange(0xB66, 0xB6F).addRange(0xB82, 0xB83).addRange(0xB85, 0xB8A).addRange(0xB8E, 0xB90).addRange(0xB92, 0xB95).addRange(0xB99, 0xB9A).addRange(0xB9E, 0xB9F).addRange(0xBA3, 0xBA4).addRange(0xBA8, 0xBAA).addRange(0xBAE, 0xBB9);\nset.addRange(0xBBE, 0xBC2).addRange(0xBC6, 0xBC8).addRange(0xBCA, 0xBCD).addRange(0xBE6, 0xBEF).addRange(0xC00, 0xC0C).addRange(0xC0E, 0xC10).addRange(0xC12, 0xC28).addRange(0xC2A, 0xC39).addRange(0xC3C, 0xC44).addRange(0xC46, 0xC48).addRange(0xC4A, 0xC4D).addRange(0xC55, 0xC56).addRange(0xC58, 0xC5A).addRange(0xC60, 0xC63).addRange(0xC66, 0xC6F).addRange(0xC80, 0xC83).addRange(0xC85, 0xC8C).addRange(0xC8E, 0xC90).addRange(0xC92, 0xCA8).addRange(0xCAA, 0xCB3).addRange(0xCB5, 0xCB9).addRange(0xCBC, 0xCC4).addRange(0xCC6, 0xCC8).addRange(0xCCA, 0xCCD).addRange(0xCD5, 0xCD6).addRange(0xCDD, 0xCDE).addRange(0xCE0, 0xCE3).addRange(0xCE6, 0xCEF).addRange(0xCF1, 0xCF3).addRange(0xD00, 0xD0C).addRange(0xD0E, 0xD10).addRange(0xD12, 0xD44).addRange(0xD46, 0xD48).addRange(0xD4A, 0xD4E).addRange(0xD54, 0xD57).addRange(0xD5F, 0xD63).addRange(0xD66, 0xD6F).addRange(0xD7A, 0xD7F).addRange(0xD81, 0xD83).addRange(0xD85, 0xD96).addRange(0xD9A, 0xDB1).addRange(0xDB3, 0xDBB).addRange(0xDC0, 0xDC6).addRange(0xDCF, 0xDD4).addRange(0xDD8, 0xDDF).addRange(0xDE6, 0xDEF).addRange(0xDF2, 0xDF3).addRange(0xE01, 0xE3A).addRange(0xE40, 0xE4E).addRange(0xE50, 0xE59).addRange(0xE81, 0xE82);\nset.addRange(0xE86, 0xE8A).addRange(0xE8C, 0xEA3).addRange(0xEA7, 0xEBD).addRange(0xEC0, 0xEC4).addRange(0xEC8, 0xECE).addRange(0xED0, 0xED9).addRange(0xEDC, 0xEDF).addRange(0xF18, 0xF19).addRange(0xF20, 0xF29).addRange(0xF3E, 0xF47).addRange(0xF49, 0xF6C).addRange(0xF71, 0xF84).addRange(0xF86, 0xF97).addRange(0xF99, 0xFBC).addRange(0x1000, 0x1049).addRange(0x1050, 0x109D).addRange(0x10A0, 0x10C5).addRange(0x10D0, 0x10FA).addRange(0x10FC, 0x1248).addRange(0x124A, 0x124D).addRange(0x1250, 0x1256).addRange(0x125A, 0x125D).addRange(0x1260, 0x1288).addRange(0x128A, 0x128D).addRange(0x1290, 0x12B0).addRange(0x12B2, 0x12B5).addRange(0x12B8, 0x12BE).addRange(0x12C2, 0x12C5).addRange(0x12C8, 0x12D6).addRange(0x12D8, 0x1310).addRange(0x1312, 0x1315).addRange(0x1318, 0x135A).addRange(0x135D, 0x135F).addRange(0x1369, 0x1371).addRange(0x1380, 0x138F).addRange(0x13A0, 0x13F5).addRange(0x13F8, 0x13FD).addRange(0x1401, 0x166C).addRange(0x166F, 0x167F).addRange(0x1681, 0x169A).addRange(0x16A0, 0x16EA).addRange(0x16EE, 0x16F8).addRange(0x1700, 0x1715).addRange(0x171F, 0x1734).addRange(0x1740, 0x1753).addRange(0x1760, 0x176C).addRange(0x176E, 0x1770).addRange(0x1772, 0x1773).addRange(0x1780, 0x17D3).addRange(0x17DC, 0x17DD).addRange(0x17E0, 0x17E9);\nset.addRange(0x180B, 0x180D).addRange(0x180F, 0x1819).addRange(0x1820, 0x1878).addRange(0x1880, 0x18AA).addRange(0x18B0, 0x18F5).addRange(0x1900, 0x191E).addRange(0x1920, 0x192B).addRange(0x1930, 0x193B).addRange(0x1946, 0x196D).addRange(0x1970, 0x1974).addRange(0x1980, 0x19AB).addRange(0x19B0, 0x19C9).addRange(0x19D0, 0x19DA).addRange(0x1A00, 0x1A1B).addRange(0x1A20, 0x1A5E).addRange(0x1A60, 0x1A7C).addRange(0x1A7F, 0x1A89).addRange(0x1A90, 0x1A99).addRange(0x1AB0, 0x1ABD).addRange(0x1ABF, 0x1ACE).addRange(0x1B00, 0x1B4C).addRange(0x1B50, 0x1B59).addRange(0x1B6B, 0x1B73).addRange(0x1B80, 0x1BF3).addRange(0x1C00, 0x1C37).addRange(0x1C40, 0x1C49).addRange(0x1C4D, 0x1C7D).addRange(0x1C80, 0x1C88).addRange(0x1C90, 0x1CBA).addRange(0x1CBD, 0x1CBF).addRange(0x1CD0, 0x1CD2).addRange(0x1CD4, 0x1CFA).addRange(0x1D00, 0x1F15).addRange(0x1F18, 0x1F1D).addRange(0x1F20, 0x1F45).addRange(0x1F48, 0x1F4D).addRange(0x1F50, 0x1F57).addRange(0x1F5F, 0x1F7D).addRange(0x1F80, 0x1FB4).addRange(0x1FB6, 0x1FBC).addRange(0x1FC2, 0x1FC4).addRange(0x1FC6, 0x1FCC).addRange(0x1FD0, 0x1FD3).addRange(0x1FD6, 0x1FDB).addRange(0x1FE0, 0x1FEC).addRange(0x1FF2, 0x1FF4).addRange(0x1FF6, 0x1FFC).addRange(0x200C, 0x200D).addRange(0x203F, 0x2040).addRange(0x2090, 0x209C).addRange(0x20D0, 0x20DC);\nset.addRange(0x20E5, 0x20F0).addRange(0x210A, 0x2113).addRange(0x2118, 0x211D).addRange(0x212A, 0x2139).addRange(0x213C, 0x213F).addRange(0x2145, 0x2149).addRange(0x2160, 0x2188).addRange(0x2C00, 0x2CE4).addRange(0x2CEB, 0x2CF3).addRange(0x2D00, 0x2D25).addRange(0x2D30, 0x2D67).addRange(0x2D7F, 0x2D96).addRange(0x2DA0, 0x2DA6).addRange(0x2DA8, 0x2DAE).addRange(0x2DB0, 0x2DB6).addRange(0x2DB8, 0x2DBE).addRange(0x2DC0, 0x2DC6).addRange(0x2DC8, 0x2DCE).addRange(0x2DD0, 0x2DD6).addRange(0x2DD8, 0x2DDE).addRange(0x2DE0, 0x2DFF).addRange(0x3005, 0x3007).addRange(0x3021, 0x302F).addRange(0x3031, 0x3035).addRange(0x3038, 0x303C).addRange(0x3041, 0x3096).addRange(0x3099, 0x309F).addRange(0x30A1, 0x30FF).addRange(0x3105, 0x312F).addRange(0x3131, 0x318E).addRange(0x31A0, 0x31BF).addRange(0x31F0, 0x31FF).addRange(0x3400, 0x4DBF).addRange(0x4E00, 0xA48C).addRange(0xA4D0, 0xA4FD).addRange(0xA500, 0xA60C).addRange(0xA610, 0xA62B).addRange(0xA640, 0xA66F).addRange(0xA674, 0xA67D).addRange(0xA67F, 0xA6F1).addRange(0xA717, 0xA71F).addRange(0xA722, 0xA788).addRange(0xA78B, 0xA7CA).addRange(0xA7D0, 0xA7D1).addRange(0xA7D5, 0xA7D9).addRange(0xA7F2, 0xA827).addRange(0xA840, 0xA873).addRange(0xA880, 0xA8C5).addRange(0xA8D0, 0xA8D9).addRange(0xA8E0, 0xA8F7).addRange(0xA8FD, 0xA92D);\nset.addRange(0xA930, 0xA953).addRange(0xA960, 0xA97C).addRange(0xA980, 0xA9C0).addRange(0xA9CF, 0xA9D9).addRange(0xA9E0, 0xA9FE).addRange(0xAA00, 0xAA36).addRange(0xAA40, 0xAA4D).addRange(0xAA50, 0xAA59).addRange(0xAA60, 0xAA76).addRange(0xAA7A, 0xAAC2).addRange(0xAADB, 0xAADD).addRange(0xAAE0, 0xAAEF).addRange(0xAAF2, 0xAAF6).addRange(0xAB01, 0xAB06).addRange(0xAB09, 0xAB0E).addRange(0xAB11, 0xAB16).addRange(0xAB20, 0xAB26).addRange(0xAB28, 0xAB2E).addRange(0xAB30, 0xAB5A).addRange(0xAB5C, 0xAB69).addRange(0xAB70, 0xABEA).addRange(0xABEC, 0xABED).addRange(0xABF0, 0xABF9).addRange(0xAC00, 0xD7A3).addRange(0xD7B0, 0xD7C6).addRange(0xD7CB, 0xD7FB).addRange(0xF900, 0xFA6D).addRange(0xFA70, 0xFAD9).addRange(0xFB00, 0xFB06).addRange(0xFB13, 0xFB17).addRange(0xFB1D, 0xFB28).addRange(0xFB2A, 0xFB36).addRange(0xFB38, 0xFB3C).addRange(0xFB40, 0xFB41).addRange(0xFB43, 0xFB44).addRange(0xFB46, 0xFBB1).addRange(0xFBD3, 0xFD3D).addRange(0xFD50, 0xFD8F).addRange(0xFD92, 0xFDC7).addRange(0xFDF0, 0xFDFB).addRange(0xFE00, 0xFE0F).addRange(0xFE20, 0xFE2F).addRange(0xFE33, 0xFE34).addRange(0xFE4D, 0xFE4F).addRange(0xFE70, 0xFE74).addRange(0xFE76, 0xFEFC).addRange(0xFF10, 0xFF19).addRange(0xFF21, 0xFF3A).addRange(0xFF41, 0xFF5A).addRange(0xFF65, 0xFFBE).addRange(0xFFC2, 0xFFC7);\nset.addRange(0xFFCA, 0xFFCF).addRange(0xFFD2, 0xFFD7).addRange(0xFFDA, 0xFFDC).addRange(0x10000, 0x1000B).addRange(0x1000D, 0x10026).addRange(0x10028, 0x1003A).addRange(0x1003C, 0x1003D).addRange(0x1003F, 0x1004D).addRange(0x10050, 0x1005D).addRange(0x10080, 0x100FA).addRange(0x10140, 0x10174).addRange(0x10280, 0x1029C).addRange(0x102A0, 0x102D0).addRange(0x10300, 0x1031F).addRange(0x1032D, 0x1034A).addRange(0x10350, 0x1037A).addRange(0x10380, 0x1039D).addRange(0x103A0, 0x103C3).addRange(0x103C8, 0x103CF).addRange(0x103D1, 0x103D5).addRange(0x10400, 0x1049D).addRange(0x104A0, 0x104A9).addRange(0x104B0, 0x104D3).addRange(0x104D8, 0x104FB).addRange(0x10500, 0x10527).addRange(0x10530, 0x10563).addRange(0x10570, 0x1057A).addRange(0x1057C, 0x1058A).addRange(0x1058C, 0x10592).addRange(0x10594, 0x10595).addRange(0x10597, 0x105A1).addRange(0x105A3, 0x105B1).addRange(0x105B3, 0x105B9).addRange(0x105BB, 0x105BC).addRange(0x10600, 0x10736).addRange(0x10740, 0x10755).addRange(0x10760, 0x10767).addRange(0x10780, 0x10785).addRange(0x10787, 0x107B0).addRange(0x107B2, 0x107BA).addRange(0x10800, 0x10805).addRange(0x1080A, 0x10835).addRange(0x10837, 0x10838).addRange(0x1083F, 0x10855).addRange(0x10860, 0x10876).addRange(0x10880, 0x1089E).addRange(0x108E0, 0x108F2).addRange(0x108F4, 0x108F5).addRange(0x10900, 0x10915).addRange(0x10920, 0x10939).addRange(0x10980, 0x109B7);\nset.addRange(0x109BE, 0x109BF).addRange(0x10A00, 0x10A03).addRange(0x10A05, 0x10A06).addRange(0x10A0C, 0x10A13).addRange(0x10A15, 0x10A17).addRange(0x10A19, 0x10A35).addRange(0x10A38, 0x10A3A).addRange(0x10A60, 0x10A7C).addRange(0x10A80, 0x10A9C).addRange(0x10AC0, 0x10AC7).addRange(0x10AC9, 0x10AE6).addRange(0x10B00, 0x10B35).addRange(0x10B40, 0x10B55).addRange(0x10B60, 0x10B72).addRange(0x10B80, 0x10B91).addRange(0x10C00, 0x10C48).addRange(0x10C80, 0x10CB2).addRange(0x10CC0, 0x10CF2).addRange(0x10D00, 0x10D27).addRange(0x10D30, 0x10D39).addRange(0x10E80, 0x10EA9).addRange(0x10EAB, 0x10EAC).addRange(0x10EB0, 0x10EB1).addRange(0x10EFD, 0x10F1C).addRange(0x10F30, 0x10F50).addRange(0x10F70, 0x10F85).addRange(0x10FB0, 0x10FC4).addRange(0x10FE0, 0x10FF6).addRange(0x11000, 0x11046).addRange(0x11066, 0x11075).addRange(0x1107F, 0x110BA).addRange(0x110D0, 0x110E8).addRange(0x110F0, 0x110F9).addRange(0x11100, 0x11134).addRange(0x11136, 0x1113F).addRange(0x11144, 0x11147).addRange(0x11150, 0x11173).addRange(0x11180, 0x111C4).addRange(0x111C9, 0x111CC).addRange(0x111CE, 0x111DA).addRange(0x11200, 0x11211).addRange(0x11213, 0x11237).addRange(0x1123E, 0x11241).addRange(0x11280, 0x11286).addRange(0x1128A, 0x1128D).addRange(0x1128F, 0x1129D).addRange(0x1129F, 0x112A8).addRange(0x112B0, 0x112EA).addRange(0x112F0, 0x112F9).addRange(0x11300, 0x11303).addRange(0x11305, 0x1130C);\nset.addRange(0x1130F, 0x11310).addRange(0x11313, 0x11328).addRange(0x1132A, 0x11330).addRange(0x11332, 0x11333).addRange(0x11335, 0x11339).addRange(0x1133B, 0x11344).addRange(0x11347, 0x11348).addRange(0x1134B, 0x1134D).addRange(0x1135D, 0x11363).addRange(0x11366, 0x1136C).addRange(0x11370, 0x11374).addRange(0x11400, 0x1144A).addRange(0x11450, 0x11459).addRange(0x1145E, 0x11461).addRange(0x11480, 0x114C5).addRange(0x114D0, 0x114D9).addRange(0x11580, 0x115B5).addRange(0x115B8, 0x115C0).addRange(0x115D8, 0x115DD).addRange(0x11600, 0x11640).addRange(0x11650, 0x11659).addRange(0x11680, 0x116B8).addRange(0x116C0, 0x116C9).addRange(0x11700, 0x1171A).addRange(0x1171D, 0x1172B).addRange(0x11730, 0x11739).addRange(0x11740, 0x11746).addRange(0x11800, 0x1183A).addRange(0x118A0, 0x118E9).addRange(0x118FF, 0x11906).addRange(0x1190C, 0x11913).addRange(0x11915, 0x11916).addRange(0x11918, 0x11935).addRange(0x11937, 0x11938).addRange(0x1193B, 0x11943).addRange(0x11950, 0x11959).addRange(0x119A0, 0x119A7).addRange(0x119AA, 0x119D7).addRange(0x119DA, 0x119E1).addRange(0x119E3, 0x119E4).addRange(0x11A00, 0x11A3E).addRange(0x11A50, 0x11A99).addRange(0x11AB0, 0x11AF8).addRange(0x11C00, 0x11C08).addRange(0x11C0A, 0x11C36).addRange(0x11C38, 0x11C40).addRange(0x11C50, 0x11C59).addRange(0x11C72, 0x11C8F).addRange(0x11C92, 0x11CA7).addRange(0x11CA9, 0x11CB6).addRange(0x11D00, 0x11D06);\nset.addRange(0x11D08, 0x11D09).addRange(0x11D0B, 0x11D36).addRange(0x11D3C, 0x11D3D).addRange(0x11D3F, 0x11D47).addRange(0x11D50, 0x11D59).addRange(0x11D60, 0x11D65).addRange(0x11D67, 0x11D68).addRange(0x11D6A, 0x11D8E).addRange(0x11D90, 0x11D91).addRange(0x11D93, 0x11D98).addRange(0x11DA0, 0x11DA9).addRange(0x11EE0, 0x11EF6).addRange(0x11F00, 0x11F10).addRange(0x11F12, 0x11F3A).addRange(0x11F3E, 0x11F42).addRange(0x11F50, 0x11F59).addRange(0x12000, 0x12399).addRange(0x12400, 0x1246E).addRange(0x12480, 0x12543).addRange(0x12F90, 0x12FF0).addRange(0x13000, 0x1342F).addRange(0x13440, 0x13455).addRange(0x14400, 0x14646).addRange(0x16800, 0x16A38).addRange(0x16A40, 0x16A5E).addRange(0x16A60, 0x16A69).addRange(0x16A70, 0x16ABE).addRange(0x16AC0, 0x16AC9).addRange(0x16AD0, 0x16AED).addRange(0x16AF0, 0x16AF4).addRange(0x16B00, 0x16B36).addRange(0x16B40, 0x16B43).addRange(0x16B50, 0x16B59).addRange(0x16B63, 0x16B77).addRange(0x16B7D, 0x16B8F).addRange(0x16E40, 0x16E7F).addRange(0x16F00, 0x16F4A).addRange(0x16F4F, 0x16F87).addRange(0x16F8F, 0x16F9F).addRange(0x16FE0, 0x16FE1).addRange(0x16FE3, 0x16FE4).addRange(0x16FF0, 0x16FF1).addRange(0x17000, 0x187F7).addRange(0x18800, 0x18CD5).addRange(0x18D00, 0x18D08).addRange(0x1AFF0, 0x1AFF3).addRange(0x1AFF5, 0x1AFFB).addRange(0x1AFFD, 0x1AFFE).addRange(0x1B000, 0x1B122).addRange(0x1B150, 0x1B152).addRange(0x1B164, 0x1B167);\nset.addRange(0x1B170, 0x1B2FB).addRange(0x1BC00, 0x1BC6A).addRange(0x1BC70, 0x1BC7C).addRange(0x1BC80, 0x1BC88).addRange(0x1BC90, 0x1BC99).addRange(0x1BC9D, 0x1BC9E).addRange(0x1CF00, 0x1CF2D).addRange(0x1CF30, 0x1CF46).addRange(0x1D165, 0x1D169).addRange(0x1D16D, 0x1D172).addRange(0x1D17B, 0x1D182).addRange(0x1D185, 0x1D18B).addRange(0x1D1AA, 0x1D1AD).addRange(0x1D242, 0x1D244).addRange(0x1D400, 0x1D454).addRange(0x1D456, 0x1D49C).addRange(0x1D49E, 0x1D49F).addRange(0x1D4A5, 0x1D4A6).addRange(0x1D4A9, 0x1D4AC).addRange(0x1D4AE, 0x1D4B9).addRange(0x1D4BD, 0x1D4C3).addRange(0x1D4C5, 0x1D505).addRange(0x1D507, 0x1D50A).addRange(0x1D50D, 0x1D514).addRange(0x1D516, 0x1D51C).addRange(0x1D51E, 0x1D539).addRange(0x1D53B, 0x1D53E).addRange(0x1D540, 0x1D544).addRange(0x1D54A, 0x1D550).addRange(0x1D552, 0x1D6A5).addRange(0x1D6A8, 0x1D6C0).addRange(0x1D6C2, 0x1D6DA).addRange(0x1D6DC, 0x1D6FA).addRange(0x1D6FC, 0x1D714).addRange(0x1D716, 0x1D734).addRange(0x1D736, 0x1D74E).addRange(0x1D750, 0x1D76E).addRange(0x1D770, 0x1D788).addRange(0x1D78A, 0x1D7A8).addRange(0x1D7AA, 0x1D7C2).addRange(0x1D7C4, 0x1D7CB).addRange(0x1D7CE, 0x1D7FF).addRange(0x1DA00, 0x1DA36).addRange(0x1DA3B, 0x1DA6C).addRange(0x1DA9B, 0x1DA9F).addRange(0x1DAA1, 0x1DAAF).addRange(0x1DF00, 0x1DF1E).addRange(0x1DF25, 0x1DF2A).addRange(0x1E000, 0x1E006).addRange(0x1E008, 0x1E018).addRange(0x1E01B, 0x1E021);\nset.addRange(0x1E023, 0x1E024).addRange(0x1E026, 0x1E02A).addRange(0x1E030, 0x1E06D).addRange(0x1E100, 0x1E12C).addRange(0x1E130, 0x1E13D).addRange(0x1E140, 0x1E149).addRange(0x1E290, 0x1E2AE).addRange(0x1E2C0, 0x1E2F9).addRange(0x1E4D0, 0x1E4F9).addRange(0x1E7E0, 0x1E7E6).addRange(0x1E7E8, 0x1E7EB).addRange(0x1E7ED, 0x1E7EE).addRange(0x1E7F0, 0x1E7FE).addRange(0x1E800, 0x1E8C4).addRange(0x1E8D0, 0x1E8D6).addRange(0x1E900, 0x1E94B).addRange(0x1E950, 0x1E959).addRange(0x1EE00, 0x1EE03).addRange(0x1EE05, 0x1EE1F).addRange(0x1EE21, 0x1EE22).addRange(0x1EE29, 0x1EE32).addRange(0x1EE34, 0x1EE37).addRange(0x1EE4D, 0x1EE4F).addRange(0x1EE51, 0x1EE52).addRange(0x1EE61, 0x1EE62).addRange(0x1EE67, 0x1EE6A).addRange(0x1EE6C, 0x1EE72).addRange(0x1EE74, 0x1EE77).addRange(0x1EE79, 0x1EE7C).addRange(0x1EE80, 0x1EE89).addRange(0x1EE8B, 0x1EE9B).addRange(0x1EEA1, 0x1EEA3).addRange(0x1EEA5, 0x1EEA9).addRange(0x1EEAB, 0x1EEBB).addRange(0x1FBF0, 0x1FBF9).addRange(0x20000, 0x2A6DF).addRange(0x2A700, 0x2B739).addRange(0x2B740, 0x2B81D).addRange(0x2B820, 0x2CEA1).addRange(0x2CEB0, 0x2EBE0).addRange(0x2EBF0, 0x2EE5D).addRange(0x2F800, 0x2FA1D).addRange(0x30000, 0x3134A).addRange(0x31350, 0x323AF).addRange(0xE0100, 0xE01EF);\nexports.characters = set;\n","const set = require('regenerate')(0xAA, 0xB5, 0xBA, 0x2EC, 0x2EE, 0x37F, 0x386, 0x38C, 0x559, 0x6D5, 0x6FF, 0x710, 0x7B1, 0x7FA, 0x81A, 0x824, 0x828, 0x93D, 0x950, 0x9B2, 0x9BD, 0x9CE, 0x9FC, 0xA5E, 0xABD, 0xAD0, 0xAF9, 0xB3D, 0xB71, 0xB83, 0xB9C, 0xBD0, 0xC3D, 0xC5D, 0xC80, 0xCBD, 0xD3D, 0xD4E, 0xDBD, 0xE84, 0xEA5, 0xEBD, 0xEC6, 0xF00, 0x103F, 0x1061, 0x108E, 0x10C7, 0x10CD, 0x1258, 0x12C0, 0x17D7, 0x17DC, 0x18AA, 0x1AA7, 0x1CFA, 0x1F59, 0x1F5B, 0x1F5D, 0x1FBE, 0x2071, 0x207F, 0x2102, 0x2107, 0x2115, 0x2124, 0x2126, 0x2128, 0x214E, 0x2D27, 0x2D2D, 0x2D6F, 0xA7D3, 0xA8FB, 0xA9CF, 0xAA7A, 0xAAB1, 0xAAC0, 0xAAC2, 0xFB1D, 0xFB3E, 0x10808, 0x1083C, 0x10A00, 0x10F27, 0x11075, 0x11144, 0x11147, 0x11176, 0x111DA, 0x111DC, 0x11288, 0x1133D, 0x11350, 0x114C7, 0x11644, 0x116B8, 0x11909, 0x1193F, 0x11941, 0x119E1, 0x119E3, 0x11A00, 0x11A3A, 0x11A50, 0x11A9D, 0x11C40, 0x11D46, 0x11D98, 0x11F02, 0x11FB0, 0x16F50, 0x16FE3, 0x1B132, 0x1B155, 0x1D4A2, 0x1D4BB, 0x1D546, 0x1E14E, 0x1E94B, 0x1EE24, 0x1EE27, 0x1EE39, 0x1EE3B, 0x1EE42, 0x1EE47, 0x1EE49, 0x1EE4B, 0x1EE54, 0x1EE57, 0x1EE59, 0x1EE5B, 0x1EE5D, 0x1EE5F, 0x1EE64, 0x1EE7E);\nset.addRange(0x41, 0x5A).addRange(0x61, 0x7A).addRange(0xC0, 0xD6).addRange(0xD8, 0xF6).addRange(0xF8, 0x2C1).addRange(0x2C6, 0x2D1).addRange(0x2E0, 0x2E4).addRange(0x370, 0x374).addRange(0x376, 0x377).addRange(0x37A, 0x37D).addRange(0x388, 0x38A).addRange(0x38E, 0x3A1).addRange(0x3A3, 0x3F5).addRange(0x3F7, 0x481).addRange(0x48A, 0x52F).addRange(0x531, 0x556).addRange(0x560, 0x588).addRange(0x5D0, 0x5EA).addRange(0x5EF, 0x5F2).addRange(0x620, 0x64A).addRange(0x66E, 0x66F).addRange(0x671, 0x6D3).addRange(0x6E5, 0x6E6).addRange(0x6EE, 0x6EF).addRange(0x6FA, 0x6FC).addRange(0x712, 0x72F).addRange(0x74D, 0x7A5).addRange(0x7CA, 0x7EA).addRange(0x7F4, 0x7F5).addRange(0x800, 0x815).addRange(0x840, 0x858).addRange(0x860, 0x86A).addRange(0x870, 0x887).addRange(0x889, 0x88E).addRange(0x8A0, 0x8C9).addRange(0x904, 0x939).addRange(0x958, 0x961).addRange(0x971, 0x980).addRange(0x985, 0x98C).addRange(0x98F, 0x990).addRange(0x993, 0x9A8).addRange(0x9AA, 0x9B0).addRange(0x9B6, 0x9B9).addRange(0x9DC, 0x9DD).addRange(0x9DF, 0x9E1).addRange(0x9F0, 0x9F1).addRange(0xA05, 0xA0A).addRange(0xA0F, 0xA10).addRange(0xA13, 0xA28).addRange(0xA2A, 0xA30).addRange(0xA32, 0xA33);\nset.addRange(0xA35, 0xA36).addRange(0xA38, 0xA39).addRange(0xA59, 0xA5C).addRange(0xA72, 0xA74).addRange(0xA85, 0xA8D).addRange(0xA8F, 0xA91).addRange(0xA93, 0xAA8).addRange(0xAAA, 0xAB0).addRange(0xAB2, 0xAB3).addRange(0xAB5, 0xAB9).addRange(0xAE0, 0xAE1).addRange(0xB05, 0xB0C).addRange(0xB0F, 0xB10).addRange(0xB13, 0xB28).addRange(0xB2A, 0xB30).addRange(0xB32, 0xB33).addRange(0xB35, 0xB39).addRange(0xB5C, 0xB5D).addRange(0xB5F, 0xB61).addRange(0xB85, 0xB8A).addRange(0xB8E, 0xB90).addRange(0xB92, 0xB95).addRange(0xB99, 0xB9A).addRange(0xB9E, 0xB9F).addRange(0xBA3, 0xBA4).addRange(0xBA8, 0xBAA).addRange(0xBAE, 0xBB9).addRange(0xC05, 0xC0C).addRange(0xC0E, 0xC10).addRange(0xC12, 0xC28).addRange(0xC2A, 0xC39).addRange(0xC58, 0xC5A).addRange(0xC60, 0xC61).addRange(0xC85, 0xC8C).addRange(0xC8E, 0xC90).addRange(0xC92, 0xCA8).addRange(0xCAA, 0xCB3).addRange(0xCB5, 0xCB9).addRange(0xCDD, 0xCDE).addRange(0xCE0, 0xCE1).addRange(0xCF1, 0xCF2).addRange(0xD04, 0xD0C).addRange(0xD0E, 0xD10).addRange(0xD12, 0xD3A).addRange(0xD54, 0xD56).addRange(0xD5F, 0xD61).addRange(0xD7A, 0xD7F).addRange(0xD85, 0xD96).addRange(0xD9A, 0xDB1).addRange(0xDB3, 0xDBB).addRange(0xDC0, 0xDC6);\nset.addRange(0xE01, 0xE30).addRange(0xE32, 0xE33).addRange(0xE40, 0xE46).addRange(0xE81, 0xE82).addRange(0xE86, 0xE8A).addRange(0xE8C, 0xEA3).addRange(0xEA7, 0xEB0).addRange(0xEB2, 0xEB3).addRange(0xEC0, 0xEC4).addRange(0xEDC, 0xEDF).addRange(0xF40, 0xF47).addRange(0xF49, 0xF6C).addRange(0xF88, 0xF8C).addRange(0x1000, 0x102A).addRange(0x1050, 0x1055).addRange(0x105A, 0x105D).addRange(0x1065, 0x1066).addRange(0x106E, 0x1070).addRange(0x1075, 0x1081).addRange(0x10A0, 0x10C5).addRange(0x10D0, 0x10FA).addRange(0x10FC, 0x1248).addRange(0x124A, 0x124D).addRange(0x1250, 0x1256).addRange(0x125A, 0x125D).addRange(0x1260, 0x1288).addRange(0x128A, 0x128D).addRange(0x1290, 0x12B0).addRange(0x12B2, 0x12B5).addRange(0x12B8, 0x12BE).addRange(0x12C2, 0x12C5).addRange(0x12C8, 0x12D6).addRange(0x12D8, 0x1310).addRange(0x1312, 0x1315).addRange(0x1318, 0x135A).addRange(0x1380, 0x138F).addRange(0x13A0, 0x13F5).addRange(0x13F8, 0x13FD).addRange(0x1401, 0x166C).addRange(0x166F, 0x167F).addRange(0x1681, 0x169A).addRange(0x16A0, 0x16EA).addRange(0x16EE, 0x16F8).addRange(0x1700, 0x1711).addRange(0x171F, 0x1731).addRange(0x1740, 0x1751).addRange(0x1760, 0x176C).addRange(0x176E, 0x1770).addRange(0x1780, 0x17B3).addRange(0x1820, 0x1878).addRange(0x1880, 0x18A8);\nset.addRange(0x18B0, 0x18F5).addRange(0x1900, 0x191E).addRange(0x1950, 0x196D).addRange(0x1970, 0x1974).addRange(0x1980, 0x19AB).addRange(0x19B0, 0x19C9).addRange(0x1A00, 0x1A16).addRange(0x1A20, 0x1A54).addRange(0x1B05, 0x1B33).addRange(0x1B45, 0x1B4C).addRange(0x1B83, 0x1BA0).addRange(0x1BAE, 0x1BAF).addRange(0x1BBA, 0x1BE5).addRange(0x1C00, 0x1C23).addRange(0x1C4D, 0x1C4F).addRange(0x1C5A, 0x1C7D).addRange(0x1C80, 0x1C88).addRange(0x1C90, 0x1CBA).addRange(0x1CBD, 0x1CBF).addRange(0x1CE9, 0x1CEC).addRange(0x1CEE, 0x1CF3).addRange(0x1CF5, 0x1CF6).addRange(0x1D00, 0x1DBF).addRange(0x1E00, 0x1F15).addRange(0x1F18, 0x1F1D).addRange(0x1F20, 0x1F45).addRange(0x1F48, 0x1F4D).addRange(0x1F50, 0x1F57).addRange(0x1F5F, 0x1F7D).addRange(0x1F80, 0x1FB4).addRange(0x1FB6, 0x1FBC).addRange(0x1FC2, 0x1FC4).addRange(0x1FC6, 0x1FCC).addRange(0x1FD0, 0x1FD3).addRange(0x1FD6, 0x1FDB).addRange(0x1FE0, 0x1FEC).addRange(0x1FF2, 0x1FF4).addRange(0x1FF6, 0x1FFC).addRange(0x2090, 0x209C).addRange(0x210A, 0x2113).addRange(0x2118, 0x211D).addRange(0x212A, 0x2139).addRange(0x213C, 0x213F).addRange(0x2145, 0x2149).addRange(0x2160, 0x2188).addRange(0x2C00, 0x2CE4).addRange(0x2CEB, 0x2CEE).addRange(0x2CF2, 0x2CF3).addRange(0x2D00, 0x2D25).addRange(0x2D30, 0x2D67).addRange(0x2D80, 0x2D96);\nset.addRange(0x2DA0, 0x2DA6).addRange(0x2DA8, 0x2DAE).addRange(0x2DB0, 0x2DB6).addRange(0x2DB8, 0x2DBE).addRange(0x2DC0, 0x2DC6).addRange(0x2DC8, 0x2DCE).addRange(0x2DD0, 0x2DD6).addRange(0x2DD8, 0x2DDE).addRange(0x3005, 0x3007).addRange(0x3021, 0x3029).addRange(0x3031, 0x3035).addRange(0x3038, 0x303C).addRange(0x3041, 0x3096).addRange(0x309B, 0x309F).addRange(0x30A1, 0x30FA).addRange(0x30FC, 0x30FF).addRange(0x3105, 0x312F).addRange(0x3131, 0x318E).addRange(0x31A0, 0x31BF).addRange(0x31F0, 0x31FF).addRange(0x3400, 0x4DBF).addRange(0x4E00, 0xA48C).addRange(0xA4D0, 0xA4FD).addRange(0xA500, 0xA60C).addRange(0xA610, 0xA61F).addRange(0xA62A, 0xA62B).addRange(0xA640, 0xA66E).addRange(0xA67F, 0xA69D).addRange(0xA6A0, 0xA6EF).addRange(0xA717, 0xA71F).addRange(0xA722, 0xA788).addRange(0xA78B, 0xA7CA).addRange(0xA7D0, 0xA7D1).addRange(0xA7D5, 0xA7D9).addRange(0xA7F2, 0xA801).addRange(0xA803, 0xA805).addRange(0xA807, 0xA80A).addRange(0xA80C, 0xA822).addRange(0xA840, 0xA873).addRange(0xA882, 0xA8B3).addRange(0xA8F2, 0xA8F7).addRange(0xA8FD, 0xA8FE).addRange(0xA90A, 0xA925).addRange(0xA930, 0xA946).addRange(0xA960, 0xA97C).addRange(0xA984, 0xA9B2).addRange(0xA9E0, 0xA9E4).addRange(0xA9E6, 0xA9EF).addRange(0xA9FA, 0xA9FE).addRange(0xAA00, 0xAA28).addRange(0xAA40, 0xAA42);\nset.addRange(0xAA44, 0xAA4B).addRange(0xAA60, 0xAA76).addRange(0xAA7E, 0xAAAF).addRange(0xAAB5, 0xAAB6).addRange(0xAAB9, 0xAABD).addRange(0xAADB, 0xAADD).addRange(0xAAE0, 0xAAEA).addRange(0xAAF2, 0xAAF4).addRange(0xAB01, 0xAB06).addRange(0xAB09, 0xAB0E).addRange(0xAB11, 0xAB16).addRange(0xAB20, 0xAB26).addRange(0xAB28, 0xAB2E).addRange(0xAB30, 0xAB5A).addRange(0xAB5C, 0xAB69).addRange(0xAB70, 0xABE2).addRange(0xAC00, 0xD7A3).addRange(0xD7B0, 0xD7C6).addRange(0xD7CB, 0xD7FB).addRange(0xF900, 0xFA6D).addRange(0xFA70, 0xFAD9).addRange(0xFB00, 0xFB06).addRange(0xFB13, 0xFB17).addRange(0xFB1F, 0xFB28).addRange(0xFB2A, 0xFB36).addRange(0xFB38, 0xFB3C).addRange(0xFB40, 0xFB41).addRange(0xFB43, 0xFB44).addRange(0xFB46, 0xFBB1).addRange(0xFBD3, 0xFD3D).addRange(0xFD50, 0xFD8F).addRange(0xFD92, 0xFDC7).addRange(0xFDF0, 0xFDFB).addRange(0xFE70, 0xFE74).addRange(0xFE76, 0xFEFC).addRange(0xFF21, 0xFF3A).addRange(0xFF41, 0xFF5A).addRange(0xFF66, 0xFFBE).addRange(0xFFC2, 0xFFC7).addRange(0xFFCA, 0xFFCF).addRange(0xFFD2, 0xFFD7).addRange(0xFFDA, 0xFFDC).addRange(0x10000, 0x1000B).addRange(0x1000D, 0x10026).addRange(0x10028, 0x1003A).addRange(0x1003C, 0x1003D).addRange(0x1003F, 0x1004D).addRange(0x10050, 0x1005D).addRange(0x10080, 0x100FA).addRange(0x10140, 0x10174).addRange(0x10280, 0x1029C);\nset.addRange(0x102A0, 0x102D0).addRange(0x10300, 0x1031F).addRange(0x1032D, 0x1034A).addRange(0x10350, 0x10375).addRange(0x10380, 0x1039D).addRange(0x103A0, 0x103C3).addRange(0x103C8, 0x103CF).addRange(0x103D1, 0x103D5).addRange(0x10400, 0x1049D).addRange(0x104B0, 0x104D3).addRange(0x104D8, 0x104FB).addRange(0x10500, 0x10527).addRange(0x10530, 0x10563).addRange(0x10570, 0x1057A).addRange(0x1057C, 0x1058A).addRange(0x1058C, 0x10592).addRange(0x10594, 0x10595).addRange(0x10597, 0x105A1).addRange(0x105A3, 0x105B1).addRange(0x105B3, 0x105B9).addRange(0x105BB, 0x105BC).addRange(0x10600, 0x10736).addRange(0x10740, 0x10755).addRange(0x10760, 0x10767).addRange(0x10780, 0x10785).addRange(0x10787, 0x107B0).addRange(0x107B2, 0x107BA).addRange(0x10800, 0x10805).addRange(0x1080A, 0x10835).addRange(0x10837, 0x10838).addRange(0x1083F, 0x10855).addRange(0x10860, 0x10876).addRange(0x10880, 0x1089E).addRange(0x108E0, 0x108F2).addRange(0x108F4, 0x108F5).addRange(0x10900, 0x10915).addRange(0x10920, 0x10939).addRange(0x10980, 0x109B7).addRange(0x109BE, 0x109BF).addRange(0x10A10, 0x10A13).addRange(0x10A15, 0x10A17).addRange(0x10A19, 0x10A35).addRange(0x10A60, 0x10A7C).addRange(0x10A80, 0x10A9C).addRange(0x10AC0, 0x10AC7).addRange(0x10AC9, 0x10AE4).addRange(0x10B00, 0x10B35).addRange(0x10B40, 0x10B55).addRange(0x10B60, 0x10B72).addRange(0x10B80, 0x10B91).addRange(0x10C00, 0x10C48);\nset.addRange(0x10C80, 0x10CB2).addRange(0x10CC0, 0x10CF2).addRange(0x10D00, 0x10D23).addRange(0x10E80, 0x10EA9).addRange(0x10EB0, 0x10EB1).addRange(0x10F00, 0x10F1C).addRange(0x10F30, 0x10F45).addRange(0x10F70, 0x10F81).addRange(0x10FB0, 0x10FC4).addRange(0x10FE0, 0x10FF6).addRange(0x11003, 0x11037).addRange(0x11071, 0x11072).addRange(0x11083, 0x110AF).addRange(0x110D0, 0x110E8).addRange(0x11103, 0x11126).addRange(0x11150, 0x11172).addRange(0x11183, 0x111B2).addRange(0x111C1, 0x111C4).addRange(0x11200, 0x11211).addRange(0x11213, 0x1122B).addRange(0x1123F, 0x11240).addRange(0x11280, 0x11286).addRange(0x1128A, 0x1128D).addRange(0x1128F, 0x1129D).addRange(0x1129F, 0x112A8).addRange(0x112B0, 0x112DE).addRange(0x11305, 0x1130C).addRange(0x1130F, 0x11310).addRange(0x11313, 0x11328).addRange(0x1132A, 0x11330).addRange(0x11332, 0x11333).addRange(0x11335, 0x11339).addRange(0x1135D, 0x11361).addRange(0x11400, 0x11434).addRange(0x11447, 0x1144A).addRange(0x1145F, 0x11461).addRange(0x11480, 0x114AF).addRange(0x114C4, 0x114C5).addRange(0x11580, 0x115AE).addRange(0x115D8, 0x115DB).addRange(0x11600, 0x1162F).addRange(0x11680, 0x116AA).addRange(0x11700, 0x1171A).addRange(0x11740, 0x11746).addRange(0x11800, 0x1182B).addRange(0x118A0, 0x118DF).addRange(0x118FF, 0x11906).addRange(0x1190C, 0x11913).addRange(0x11915, 0x11916).addRange(0x11918, 0x1192F).addRange(0x119A0, 0x119A7);\nset.addRange(0x119AA, 0x119D0).addRange(0x11A0B, 0x11A32).addRange(0x11A5C, 0x11A89).addRange(0x11AB0, 0x11AF8).addRange(0x11C00, 0x11C08).addRange(0x11C0A, 0x11C2E).addRange(0x11C72, 0x11C8F).addRange(0x11D00, 0x11D06).addRange(0x11D08, 0x11D09).addRange(0x11D0B, 0x11D30).addRange(0x11D60, 0x11D65).addRange(0x11D67, 0x11D68).addRange(0x11D6A, 0x11D89).addRange(0x11EE0, 0x11EF2).addRange(0x11F04, 0x11F10).addRange(0x11F12, 0x11F33).addRange(0x12000, 0x12399).addRange(0x12400, 0x1246E).addRange(0x12480, 0x12543).addRange(0x12F90, 0x12FF0).addRange(0x13000, 0x1342F).addRange(0x13441, 0x13446).addRange(0x14400, 0x14646).addRange(0x16800, 0x16A38).addRange(0x16A40, 0x16A5E).addRange(0x16A70, 0x16ABE).addRange(0x16AD0, 0x16AED).addRange(0x16B00, 0x16B2F).addRange(0x16B40, 0x16B43).addRange(0x16B63, 0x16B77).addRange(0x16B7D, 0x16B8F).addRange(0x16E40, 0x16E7F).addRange(0x16F00, 0x16F4A).addRange(0x16F93, 0x16F9F).addRange(0x16FE0, 0x16FE1).addRange(0x17000, 0x187F7).addRange(0x18800, 0x18CD5).addRange(0x18D00, 0x18D08).addRange(0x1AFF0, 0x1AFF3).addRange(0x1AFF5, 0x1AFFB).addRange(0x1AFFD, 0x1AFFE).addRange(0x1B000, 0x1B122).addRange(0x1B150, 0x1B152).addRange(0x1B164, 0x1B167).addRange(0x1B170, 0x1B2FB).addRange(0x1BC00, 0x1BC6A).addRange(0x1BC70, 0x1BC7C).addRange(0x1BC80, 0x1BC88).addRange(0x1BC90, 0x1BC99).addRange(0x1D400, 0x1D454).addRange(0x1D456, 0x1D49C);\nset.addRange(0x1D49E, 0x1D49F).addRange(0x1D4A5, 0x1D4A6).addRange(0x1D4A9, 0x1D4AC).addRange(0x1D4AE, 0x1D4B9).addRange(0x1D4BD, 0x1D4C3).addRange(0x1D4C5, 0x1D505).addRange(0x1D507, 0x1D50A).addRange(0x1D50D, 0x1D514).addRange(0x1D516, 0x1D51C).addRange(0x1D51E, 0x1D539).addRange(0x1D53B, 0x1D53E).addRange(0x1D540, 0x1D544).addRange(0x1D54A, 0x1D550).addRange(0x1D552, 0x1D6A5).addRange(0x1D6A8, 0x1D6C0).addRange(0x1D6C2, 0x1D6DA).addRange(0x1D6DC, 0x1D6FA).addRange(0x1D6FC, 0x1D714).addRange(0x1D716, 0x1D734).addRange(0x1D736, 0x1D74E).addRange(0x1D750, 0x1D76E).addRange(0x1D770, 0x1D788).addRange(0x1D78A, 0x1D7A8).addRange(0x1D7AA, 0x1D7C2).addRange(0x1D7C4, 0x1D7CB).addRange(0x1DF00, 0x1DF1E).addRange(0x1DF25, 0x1DF2A).addRange(0x1E030, 0x1E06D).addRange(0x1E100, 0x1E12C).addRange(0x1E137, 0x1E13D).addRange(0x1E290, 0x1E2AD).addRange(0x1E2C0, 0x1E2EB).addRange(0x1E4D0, 0x1E4EB).addRange(0x1E7E0, 0x1E7E6).addRange(0x1E7E8, 0x1E7EB).addRange(0x1E7ED, 0x1E7EE).addRange(0x1E7F0, 0x1E7FE).addRange(0x1E800, 0x1E8C4).addRange(0x1E900, 0x1E943).addRange(0x1EE00, 0x1EE03).addRange(0x1EE05, 0x1EE1F).addRange(0x1EE21, 0x1EE22).addRange(0x1EE29, 0x1EE32).addRange(0x1EE34, 0x1EE37).addRange(0x1EE4D, 0x1EE4F).addRange(0x1EE51, 0x1EE52).addRange(0x1EE61, 0x1EE62).addRange(0x1EE67, 0x1EE6A).addRange(0x1EE6C, 0x1EE72).addRange(0x1EE74, 0x1EE77).addRange(0x1EE79, 0x1EE7C);\nset.addRange(0x1EE80, 0x1EE89).addRange(0x1EE8B, 0x1EE9B).addRange(0x1EEA1, 0x1EEA3).addRange(0x1EEA5, 0x1EEA9).addRange(0x1EEAB, 0x1EEBB).addRange(0x20000, 0x2A6DF).addRange(0x2A700, 0x2B739).addRange(0x2B740, 0x2B81D).addRange(0x2B820, 0x2CEA1).addRange(0x2CEB0, 0x2EBE0).addRange(0x2EBF0, 0x2EE5D).addRange(0x2F800, 0x2FA1D).addRange(0x30000, 0x3134A).addRange(0x31350, 0x323AF);\nexports.characters = set;\n","const set = require('regenerate')(0x16FE4);\nset.addRange(0x3006, 0x3007).addRange(0x3021, 0x3029).addRange(0x3038, 0x303A).addRange(0x3400, 0x4DBF).addRange(0x4E00, 0x9FFF).addRange(0xF900, 0xFA6D).addRange(0xFA70, 0xFAD9).addRange(0x17000, 0x187F7).addRange(0x18800, 0x18CD5).addRange(0x18D00, 0x18D08).addRange(0x1B170, 0x1B2FB).addRange(0x20000, 0x2A6DF).addRange(0x2A700, 0x2B739).addRange(0x2B740, 0x2B81D).addRange(0x2B820, 0x2CEA1).addRange(0x2CEB0, 0x2EBE0).addRange(0x2EBF0, 0x2EE5D).addRange(0x2F800, 0x2FA1D).addRange(0x30000, 0x3134A).addRange(0x31350, 0x323AF);\nexports.characters = set;\n","const set = require('regenerate')(0x31EF);\nset.addRange(0x2FF0, 0x2FF1).addRange(0x2FF4, 0x2FFD);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x2FF2, 0x2FF3);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x200C, 0x200D);\nexports.characters = set;\n","const set = require('regenerate')(0x19BA, 0xAAB9);\nset.addRange(0xE40, 0xE44).addRange(0xEC0, 0xEC4).addRange(0x19B5, 0x19B7).addRange(0xAAB5, 0xAAB6).addRange(0xAABB, 0xAABC);\nexports.characters = set;\n","const set = require('regenerate')(0xAA, 0xB5, 0xBA, 0x101, 0x103, 0x105, 0x107, 0x109, 0x10B, 0x10D, 0x10F, 0x111, 0x113, 0x115, 0x117, 0x119, 0x11B, 0x11D, 0x11F, 0x121, 0x123, 0x125, 0x127, 0x129, 0x12B, 0x12D, 0x12F, 0x131, 0x133, 0x135, 0x13A, 0x13C, 0x13E, 0x140, 0x142, 0x144, 0x146, 0x14B, 0x14D, 0x14F, 0x151, 0x153, 0x155, 0x157, 0x159, 0x15B, 0x15D, 0x15F, 0x161, 0x163, 0x165, 0x167, 0x169, 0x16B, 0x16D, 0x16F, 0x171, 0x173, 0x175, 0x177, 0x17A, 0x17C, 0x183, 0x185, 0x188, 0x192, 0x195, 0x19E, 0x1A1, 0x1A3, 0x1A5, 0x1A8, 0x1AD, 0x1B0, 0x1B4, 0x1B6, 0x1C6, 0x1C9, 0x1CC, 0x1CE, 0x1D0, 0x1D2, 0x1D4, 0x1D6, 0x1D8, 0x1DA, 0x1DF, 0x1E1, 0x1E3, 0x1E5, 0x1E7, 0x1E9, 0x1EB, 0x1ED, 0x1F3, 0x1F5, 0x1F9, 0x1FB, 0x1FD, 0x1FF, 0x201, 0x203, 0x205, 0x207, 0x209, 0x20B, 0x20D, 0x20F, 0x211, 0x213, 0x215, 0x217, 0x219, 0x21B, 0x21D, 0x21F, 0x221, 0x223, 0x225, 0x227, 0x229, 0x22B, 0x22D, 0x22F, 0x231, 0x23C, 0x242, 0x247, 0x249, 0x24B, 0x24D, 0x345, 0x371, 0x373, 0x377, 0x390, 0x3D9, 0x3DB, 0x3DD, 0x3DF, 0x3E1, 0x3E3, 0x3E5, 0x3E7, 0x3E9, 0x3EB, 0x3ED, 0x3F5, 0x3F8, 0x461, 0x463, 0x465, 0x467, 0x469, 0x46B, 0x46D, 0x46F, 0x471, 0x473, 0x475, 0x477, 0x479, 0x47B, 0x47D, 0x47F, 0x481, 0x48B, 0x48D, 0x48F, 0x491, 0x493, 0x495, 0x497, 0x499, 0x49B, 0x49D, 0x49F, 0x4A1, 0x4A3, 0x4A5, 0x4A7, 0x4A9, 0x4AB, 0x4AD, 0x4AF, 0x4B1, 0x4B3, 0x4B5, 0x4B7, 0x4B9, 0x4BB, 0x4BD, 0x4BF, 0x4C2, 0x4C4, 0x4C6, 0x4C8, 0x4CA, 0x4CC, 0x4D1, 0x4D3, 0x4D5, 0x4D7, 0x4D9, 0x4DB, 0x4DD, 0x4DF, 0x4E1, 0x4E3, 0x4E5, 0x4E7, 0x4E9, 0x4EB, 0x4ED, 0x4EF, 0x4F1, 0x4F3, 0x4F5, 0x4F7, 0x4F9, 0x4FB, 0x4FD, 0x4FF, 0x501, 0x503, 0x505, 0x507, 0x509, 0x50B, 0x50D, 0x50F, 0x511, 0x513, 0x515, 0x517, 0x519, 0x51B, 0x51D, 0x51F, 0x521, 0x523, 0x525, 0x527, 0x529, 0x52B, 0x52D, 0x52F, 0x1E01, 0x1E03, 0x1E05, 0x1E07, 0x1E09, 0x1E0B, 0x1E0D, 0x1E0F, 0x1E11, 0x1E13, 0x1E15, 0x1E17, 0x1E19, 0x1E1B, 0x1E1D, 0x1E1F, 0x1E21, 0x1E23, 0x1E25, 0x1E27, 0x1E29, 0x1E2B, 0x1E2D, 0x1E2F, 0x1E31, 0x1E33, 0x1E35, 0x1E37, 0x1E39, 0x1E3B, 0x1E3D, 0x1E3F, 0x1E41, 0x1E43, 0x1E45, 0x1E47, 0x1E49, 0x1E4B, 0x1E4D, 0x1E4F, 0x1E51, 0x1E53, 0x1E55, 0x1E57, 0x1E59, 0x1E5B, 0x1E5D, 0x1E5F, 0x1E61, 0x1E63, 0x1E65, 0x1E67, 0x1E69, 0x1E6B, 0x1E6D, 0x1E6F, 0x1E71, 0x1E73, 0x1E75, 0x1E77, 0x1E79, 0x1E7B, 0x1E7D, 0x1E7F, 0x1E81, 0x1E83, 0x1E85, 0x1E87, 0x1E89, 0x1E8B, 0x1E8D, 0x1E8F, 0x1E91, 0x1E93, 0x1E9F, 0x1EA1, 0x1EA3, 0x1EA5, 0x1EA7, 0x1EA9, 0x1EAB, 0x1EAD, 0x1EAF, 0x1EB1, 0x1EB3, 0x1EB5, 0x1EB7, 0x1EB9, 0x1EBB, 0x1EBD, 0x1EBF, 0x1EC1, 0x1EC3, 0x1EC5, 0x1EC7, 0x1EC9, 0x1ECB, 0x1ECD, 0x1ECF, 0x1ED1, 0x1ED3, 0x1ED5, 0x1ED7, 0x1ED9, 0x1EDB, 0x1EDD, 0x1EDF, 0x1EE1, 0x1EE3, 0x1EE5, 0x1EE7, 0x1EE9, 0x1EEB, 0x1EED, 0x1EEF, 0x1EF1, 0x1EF3, 0x1EF5, 0x1EF7, 0x1EF9, 0x1EFB, 0x1EFD, 0x1FBE, 0x2071, 0x207F, 0x210A, 0x2113, 0x212F, 0x2134, 0x2139, 0x214E, 0x2184, 0x2C61, 0x2C68, 0x2C6A, 0x2C6C, 0x2C71, 0x2C81, 0x2C83, 0x2C85, 0x2C87, 0x2C89, 0x2C8B, 0x2C8D, 0x2C8F, 0x2C91, 0x2C93, 0x2C95, 0x2C97, 0x2C99, 0x2C9B, 0x2C9D, 0x2C9F, 0x2CA1, 0x2CA3, 0x2CA5, 0x2CA7, 0x2CA9, 0x2CAB, 0x2CAD, 0x2CAF, 0x2CB1, 0x2CB3, 0x2CB5, 0x2CB7, 0x2CB9, 0x2CBB, 0x2CBD, 0x2CBF, 0x2CC1, 0x2CC3, 0x2CC5, 0x2CC7, 0x2CC9, 0x2CCB, 0x2CCD, 0x2CCF, 0x2CD1, 0x2CD3, 0x2CD5, 0x2CD7, 0x2CD9, 0x2CDB, 0x2CDD, 0x2CDF, 0x2CE1, 0x2CEC, 0x2CEE, 0x2CF3, 0x2D27, 0x2D2D, 0xA641, 0xA643, 0xA645, 0xA647, 0xA649, 0xA64B, 0xA64D, 0xA64F, 0xA651, 0xA653, 0xA655, 0xA657, 0xA659, 0xA65B, 0xA65D, 0xA65F, 0xA661, 0xA663, 0xA665, 0xA667, 0xA669, 0xA66B, 0xA66D, 0xA681, 0xA683, 0xA685, 0xA687, 0xA689, 0xA68B, 0xA68D, 0xA68F, 0xA691, 0xA693, 0xA695, 0xA697, 0xA699, 0xA723, 0xA725, 0xA727, 0xA729, 0xA72B, 0xA72D, 0xA733, 0xA735, 0xA737, 0xA739, 0xA73B, 0xA73D, 0xA73F, 0xA741, 0xA743, 0xA745, 0xA747, 0xA749, 0xA74B, 0xA74D, 0xA74F, 0xA751, 0xA753, 0xA755, 0xA757, 0xA759, 0xA75B, 0xA75D, 0xA75F, 0xA761, 0xA763, 0xA765, 0xA767, 0xA769, 0xA76B, 0xA76D, 0xA77A, 0xA77C, 0xA77F, 0xA781, 0xA783, 0xA785, 0xA787, 0xA78C, 0xA78E, 0xA791, 0xA797, 0xA799, 0xA79B, 0xA79D, 0xA79F, 0xA7A1, 0xA7A3, 0xA7A5, 0xA7A7, 0xA7A9, 0xA7AF, 0xA7B5, 0xA7B7, 0xA7B9, 0xA7BB, 0xA7BD, 0xA7BF, 0xA7C1, 0xA7C3, 0xA7C8, 0xA7CA, 0xA7D1, 0xA7D3, 0xA7D5, 0xA7D7, 0xA7D9, 0xA7F6, 0x10780, 0x1D4BB, 0x1D7CB);\nset.addRange(0x61, 0x7A).addRange(0xDF, 0xF6).addRange(0xF8, 0xFF).addRange(0x137, 0x138).addRange(0x148, 0x149).addRange(0x17E, 0x180).addRange(0x18C, 0x18D).addRange(0x199, 0x19B).addRange(0x1AA, 0x1AB).addRange(0x1B9, 0x1BA).addRange(0x1BD, 0x1BF).addRange(0x1DC, 0x1DD).addRange(0x1EF, 0x1F0).addRange(0x233, 0x239).addRange(0x23F, 0x240).addRange(0x24F, 0x293).addRange(0x295, 0x2B8).addRange(0x2C0, 0x2C1).addRange(0x2E0, 0x2E4).addRange(0x37A, 0x37D).addRange(0x3AC, 0x3CE).addRange(0x3D0, 0x3D1).addRange(0x3D5, 0x3D7).addRange(0x3EF, 0x3F3).addRange(0x3FB, 0x3FC).addRange(0x430, 0x45F).addRange(0x4CE, 0x4CF).addRange(0x560, 0x588).addRange(0x10D0, 0x10FA).addRange(0x10FC, 0x10FF).addRange(0x13F8, 0x13FD).addRange(0x1C80, 0x1C88).addRange(0x1D00, 0x1DBF).addRange(0x1E95, 0x1E9D).addRange(0x1EFF, 0x1F07).addRange(0x1F10, 0x1F15).addRange(0x1F20, 0x1F27).addRange(0x1F30, 0x1F37).addRange(0x1F40, 0x1F45).addRange(0x1F50, 0x1F57).addRange(0x1F60, 0x1F67).addRange(0x1F70, 0x1F7D).addRange(0x1F80, 0x1F87).addRange(0x1F90, 0x1F97).addRange(0x1FA0, 0x1FA7).addRange(0x1FB0, 0x1FB4).addRange(0x1FB6, 0x1FB7).addRange(0x1FC2, 0x1FC4).addRange(0x1FC6, 0x1FC7).addRange(0x1FD0, 0x1FD3).addRange(0x1FD6, 0x1FD7);\nset.addRange(0x1FE0, 0x1FE7).addRange(0x1FF2, 0x1FF4).addRange(0x1FF6, 0x1FF7).addRange(0x2090, 0x209C).addRange(0x210E, 0x210F).addRange(0x213C, 0x213D).addRange(0x2146, 0x2149).addRange(0x2170, 0x217F).addRange(0x24D0, 0x24E9).addRange(0x2C30, 0x2C5F).addRange(0x2C65, 0x2C66).addRange(0x2C73, 0x2C74).addRange(0x2C76, 0x2C7D).addRange(0x2CE3, 0x2CE4).addRange(0x2D00, 0x2D25).addRange(0xA69B, 0xA69D).addRange(0xA72F, 0xA731).addRange(0xA76F, 0xA778).addRange(0xA793, 0xA795).addRange(0xA7F2, 0xA7F4).addRange(0xA7F8, 0xA7FA).addRange(0xAB30, 0xAB5A).addRange(0xAB5C, 0xAB69).addRange(0xAB70, 0xABBF).addRange(0xFB00, 0xFB06).addRange(0xFB13, 0xFB17).addRange(0xFF41, 0xFF5A).addRange(0x10428, 0x1044F).addRange(0x104D8, 0x104FB).addRange(0x10597, 0x105A1).addRange(0x105A3, 0x105B1).addRange(0x105B3, 0x105B9).addRange(0x105BB, 0x105BC).addRange(0x10783, 0x10785).addRange(0x10787, 0x107B0).addRange(0x107B2, 0x107BA).addRange(0x10CC0, 0x10CF2).addRange(0x118C0, 0x118DF).addRange(0x16E60, 0x16E7F).addRange(0x1D41A, 0x1D433).addRange(0x1D44E, 0x1D454).addRange(0x1D456, 0x1D467).addRange(0x1D482, 0x1D49B).addRange(0x1D4B6, 0x1D4B9).addRange(0x1D4BD, 0x1D4C3).addRange(0x1D4C5, 0x1D4CF).addRange(0x1D4EA, 0x1D503).addRange(0x1D51E, 0x1D537).addRange(0x1D552, 0x1D56B).addRange(0x1D586, 0x1D59F).addRange(0x1D5BA, 0x1D5D3);\nset.addRange(0x1D5EE, 0x1D607).addRange(0x1D622, 0x1D63B).addRange(0x1D656, 0x1D66F).addRange(0x1D68A, 0x1D6A5).addRange(0x1D6C2, 0x1D6DA).addRange(0x1D6DC, 0x1D6E1).addRange(0x1D6FC, 0x1D714).addRange(0x1D716, 0x1D71B).addRange(0x1D736, 0x1D74E).addRange(0x1D750, 0x1D755).addRange(0x1D770, 0x1D788).addRange(0x1D78A, 0x1D78F).addRange(0x1D7AA, 0x1D7C2).addRange(0x1D7C4, 0x1D7C9).addRange(0x1DF00, 0x1DF09).addRange(0x1DF0B, 0x1DF1E).addRange(0x1DF25, 0x1DF2A).addRange(0x1E030, 0x1E06D).addRange(0x1E922, 0x1E943);\nexports.characters = set;\n","const set = require('regenerate')(0x2B, 0x5E, 0x7C, 0x7E, 0xAC, 0xB1, 0xD7, 0xF7, 0x3D5, 0x2016, 0x2040, 0x2044, 0x2052, 0x20E1, 0x2102, 0x2107, 0x2115, 0x2124, 0x214B, 0x21DD, 0x237C, 0x23B7, 0x23D0, 0x25E2, 0x25E4, 0x2640, 0x2642, 0xFB29, 0xFE68, 0xFF0B, 0xFF3C, 0xFF3E, 0xFF5C, 0xFF5E, 0xFFE2, 0x1D4A2, 0x1D4BB, 0x1D546, 0x1EE24, 0x1EE27, 0x1EE39, 0x1EE3B, 0x1EE42, 0x1EE47, 0x1EE49, 0x1EE4B, 0x1EE54, 0x1EE57, 0x1EE59, 0x1EE5B, 0x1EE5D, 0x1EE5F, 0x1EE64, 0x1EE7E);\nset.addRange(0x3C, 0x3E).addRange(0x3D0, 0x3D2).addRange(0x3F0, 0x3F1).addRange(0x3F4, 0x3F6).addRange(0x606, 0x608).addRange(0x2032, 0x2034).addRange(0x2061, 0x2064).addRange(0x207A, 0x207E).addRange(0x208A, 0x208E).addRange(0x20D0, 0x20DC).addRange(0x20E5, 0x20E6).addRange(0x20EB, 0x20EF).addRange(0x210A, 0x2113).addRange(0x2118, 0x211D).addRange(0x2128, 0x2129).addRange(0x212C, 0x212D).addRange(0x212F, 0x2131).addRange(0x2133, 0x2138).addRange(0x213C, 0x2149).addRange(0x2190, 0x21A7).addRange(0x21A9, 0x21AE).addRange(0x21B0, 0x21B1).addRange(0x21B6, 0x21B7).addRange(0x21BC, 0x21DB).addRange(0x21E4, 0x21E5).addRange(0x21F4, 0x22FF).addRange(0x2308, 0x230B).addRange(0x2320, 0x2321).addRange(0x239B, 0x23B5).addRange(0x23DC, 0x23E2).addRange(0x25A0, 0x25A1).addRange(0x25AE, 0x25B7).addRange(0x25BC, 0x25C1).addRange(0x25C6, 0x25C7).addRange(0x25CA, 0x25CB).addRange(0x25CF, 0x25D3).addRange(0x25E7, 0x25EC).addRange(0x25F8, 0x25FF).addRange(0x2605, 0x2606).addRange(0x2660, 0x2663).addRange(0x266D, 0x266F).addRange(0x27C0, 0x27FF).addRange(0x2900, 0x2AFF).addRange(0x2B30, 0x2B44).addRange(0x2B47, 0x2B4C).addRange(0xFE61, 0xFE66).addRange(0xFF1C, 0xFF1E).addRange(0xFFE9, 0xFFEC).addRange(0x1D400, 0x1D454).addRange(0x1D456, 0x1D49C).addRange(0x1D49E, 0x1D49F);\nset.addRange(0x1D4A5, 0x1D4A6).addRange(0x1D4A9, 0x1D4AC).addRange(0x1D4AE, 0x1D4B9).addRange(0x1D4BD, 0x1D4C3).addRange(0x1D4C5, 0x1D505).addRange(0x1D507, 0x1D50A).addRange(0x1D50D, 0x1D514).addRange(0x1D516, 0x1D51C).addRange(0x1D51E, 0x1D539).addRange(0x1D53B, 0x1D53E).addRange(0x1D540, 0x1D544).addRange(0x1D54A, 0x1D550).addRange(0x1D552, 0x1D6A5).addRange(0x1D6A8, 0x1D7CB).addRange(0x1D7CE, 0x1D7FF).addRange(0x1EE00, 0x1EE03).addRange(0x1EE05, 0x1EE1F).addRange(0x1EE21, 0x1EE22).addRange(0x1EE29, 0x1EE32).addRange(0x1EE34, 0x1EE37).addRange(0x1EE4D, 0x1EE4F).addRange(0x1EE51, 0x1EE52).addRange(0x1EE61, 0x1EE62).addRange(0x1EE67, 0x1EE6A).addRange(0x1EE6C, 0x1EE72).addRange(0x1EE74, 0x1EE77).addRange(0x1EE79, 0x1EE7C).addRange(0x1EE80, 0x1EE89).addRange(0x1EE8B, 0x1EE9B).addRange(0x1EEA1, 0x1EEA3).addRange(0x1EEA5, 0x1EEA9).addRange(0x1EEAB, 0x1EEBB).addRange(0x1EEF0, 0x1EEF1);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0xFDD0, 0xFDEF).addRange(0xFFFE, 0xFFFF).addRange(0x1FFFE, 0x1FFFF).addRange(0x2FFFE, 0x2FFFF).addRange(0x3FFFE, 0x3FFFF).addRange(0x4FFFE, 0x4FFFF).addRange(0x5FFFE, 0x5FFFF).addRange(0x6FFFE, 0x6FFFF).addRange(0x7FFFE, 0x7FFFF).addRange(0x8FFFE, 0x8FFFF).addRange(0x9FFFE, 0x9FFFF).addRange(0xAFFFE, 0xAFFFF).addRange(0xBFFFE, 0xBFFFF).addRange(0xCFFFE, 0xCFFFF).addRange(0xDFFFE, 0xDFFFF).addRange(0xEFFFE, 0xEFFFF).addRange(0xFFFFE, 0xFFFFF).addRange(0x10FFFE, 0x10FFFF);\nexports.characters = set;\n","const set = require('regenerate')(0x60, 0xA9, 0xAE, 0xB6, 0xBB, 0xBF, 0xD7, 0xF7, 0x3030);\nset.addRange(0x21, 0x2F).addRange(0x3A, 0x40).addRange(0x5B, 0x5E).addRange(0x7B, 0x7E).addRange(0xA1, 0xA7).addRange(0xAB, 0xAC).addRange(0xB0, 0xB1).addRange(0x2010, 0x2027).addRange(0x2030, 0x203E).addRange(0x2041, 0x2053).addRange(0x2055, 0x205E).addRange(0x2190, 0x245F).addRange(0x2500, 0x2775).addRange(0x2794, 0x2BFF).addRange(0x2E00, 0x2E7F).addRange(0x3001, 0x3003).addRange(0x3008, 0x3020).addRange(0xFD3E, 0xFD3F).addRange(0xFE45, 0xFE46);\nexports.characters = set;\n","const set = require('regenerate')(0x20, 0x85);\nset.addRange(0x9, 0xD).addRange(0x200E, 0x200F).addRange(0x2028, 0x2029);\nexports.characters = set;\n","const set = require('regenerate')(0x22, 0x27, 0xAB, 0xBB, 0x2E42, 0xFF02, 0xFF07);\nset.addRange(0x2018, 0x201F).addRange(0x2039, 0x203A).addRange(0x300C, 0x300F).addRange(0x301D, 0x301F).addRange(0xFE41, 0xFE44).addRange(0xFF62, 0xFF63);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x2E80, 0x2E99).addRange(0x2E9B, 0x2EF3).addRange(0x2F00, 0x2FD5);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x1F1E6, 0x1F1FF);\nexports.characters = set;\n","const set = require('regenerate')(0x21, 0x2E, 0x3F, 0x589, 0x6D4, 0x7F9, 0x837, 0x839, 0x1362, 0x166E, 0x1803, 0x1809, 0x2E2E, 0x2E3C, 0x3002, 0xA4FF, 0xA6F3, 0xA6F7, 0xA92F, 0xABEB, 0xFE52, 0xFF01, 0xFF0E, 0xFF1F, 0xFF61, 0x111CD, 0x112A9, 0x11944, 0x11946, 0x16AF5, 0x16B44, 0x16E98, 0x1BC9F, 0x1DA88);\nset.addRange(0x61D, 0x61F).addRange(0x700, 0x702).addRange(0x83D, 0x83E).addRange(0x964, 0x965).addRange(0x104A, 0x104B).addRange(0x1367, 0x1368).addRange(0x1735, 0x1736).addRange(0x17D4, 0x17D5).addRange(0x1944, 0x1945).addRange(0x1AA8, 0x1AAB).addRange(0x1B5A, 0x1B5B).addRange(0x1B5E, 0x1B5F).addRange(0x1B7D, 0x1B7E).addRange(0x1C3B, 0x1C3C).addRange(0x1C7E, 0x1C7F).addRange(0x203C, 0x203D).addRange(0x2047, 0x2049).addRange(0x2E53, 0x2E54).addRange(0xA60E, 0xA60F).addRange(0xA876, 0xA877).addRange(0xA8CE, 0xA8CF).addRange(0xA9C8, 0xA9C9).addRange(0xAA5D, 0xAA5F).addRange(0xAAF0, 0xAAF1).addRange(0xFE56, 0xFE57).addRange(0x10A56, 0x10A57).addRange(0x10F55, 0x10F59).addRange(0x10F86, 0x10F89).addRange(0x11047, 0x11048).addRange(0x110BE, 0x110C1).addRange(0x11141, 0x11143).addRange(0x111C5, 0x111C6).addRange(0x111DE, 0x111DF).addRange(0x11238, 0x11239).addRange(0x1123B, 0x1123C).addRange(0x1144B, 0x1144C).addRange(0x115C2, 0x115C3).addRange(0x115C9, 0x115D7).addRange(0x11641, 0x11642).addRange(0x1173C, 0x1173E).addRange(0x11A42, 0x11A43).addRange(0x11A9B, 0x11A9C).addRange(0x11C41, 0x11C42).addRange(0x11EF7, 0x11EF8).addRange(0x11F43, 0x11F44).addRange(0x16A6E, 0x16A6F).addRange(0x16B37, 0x16B38);\nexports.characters = set;\n","const set = require('regenerate')(0x12F, 0x249, 0x268, 0x29D, 0x2B2, 0x3F3, 0x456, 0x458, 0x1D62, 0x1D96, 0x1DA4, 0x1DA8, 0x1E2D, 0x1ECB, 0x2071, 0x2C7C, 0x1DF1A, 0x1E068);\nset.addRange(0x69, 0x6A).addRange(0x2148, 0x2149).addRange(0x1D422, 0x1D423).addRange(0x1D456, 0x1D457).addRange(0x1D48A, 0x1D48B).addRange(0x1D4BE, 0x1D4BF).addRange(0x1D4F2, 0x1D4F3).addRange(0x1D526, 0x1D527).addRange(0x1D55A, 0x1D55B).addRange(0x1D58E, 0x1D58F).addRange(0x1D5C2, 0x1D5C3).addRange(0x1D5F6, 0x1D5F7).addRange(0x1D62A, 0x1D62B).addRange(0x1D65E, 0x1D65F).addRange(0x1D692, 0x1D693).addRange(0x1E04C, 0x1E04D);\nexports.characters = set;\n","const set = require('regenerate')(0x21, 0x2C, 0x2E, 0x3F, 0x37E, 0x387, 0x589, 0x5C3, 0x60C, 0x61B, 0x6D4, 0x70C, 0x85E, 0xF08, 0x166E, 0x17DA, 0x2E2E, 0x2E3C, 0x2E41, 0x2E4C, 0xA92F, 0xAADF, 0xABEB, 0xFF01, 0xFF0C, 0xFF0E, 0xFF1F, 0xFF61, 0xFF64, 0x1039F, 0x103D0, 0x10857, 0x1091F, 0x111CD, 0x112A9, 0x11944, 0x11946, 0x11C71, 0x16AF5, 0x16B44, 0x1BC9F);\nset.addRange(0x3A, 0x3B).addRange(0x61D, 0x61F).addRange(0x700, 0x70A).addRange(0x7F8, 0x7F9).addRange(0x830, 0x83E).addRange(0x964, 0x965).addRange(0xE5A, 0xE5B).addRange(0xF0D, 0xF12).addRange(0x104A, 0x104B).addRange(0x1361, 0x1368).addRange(0x16EB, 0x16ED).addRange(0x1735, 0x1736).addRange(0x17D4, 0x17D6).addRange(0x1802, 0x1805).addRange(0x1808, 0x1809).addRange(0x1944, 0x1945).addRange(0x1AA8, 0x1AAB).addRange(0x1B5A, 0x1B5B).addRange(0x1B5D, 0x1B5F).addRange(0x1B7D, 0x1B7E).addRange(0x1C3B, 0x1C3F).addRange(0x1C7E, 0x1C7F).addRange(0x203C, 0x203D).addRange(0x2047, 0x2049).addRange(0x2E4E, 0x2E4F).addRange(0x2E53, 0x2E54).addRange(0x3001, 0x3002).addRange(0xA4FE, 0xA4FF).addRange(0xA60D, 0xA60F).addRange(0xA6F3, 0xA6F7).addRange(0xA876, 0xA877).addRange(0xA8CE, 0xA8CF).addRange(0xA9C7, 0xA9C9).addRange(0xAA5D, 0xAA5F).addRange(0xAAF0, 0xAAF1).addRange(0xFE50, 0xFE52).addRange(0xFE54, 0xFE57).addRange(0xFF1A, 0xFF1B).addRange(0x10A56, 0x10A57).addRange(0x10AF0, 0x10AF5).addRange(0x10B3A, 0x10B3F).addRange(0x10B99, 0x10B9C).addRange(0x10F55, 0x10F59).addRange(0x10F86, 0x10F89).addRange(0x11047, 0x1104D).addRange(0x110BE, 0x110C1).addRange(0x11141, 0x11143).addRange(0x111C5, 0x111C6).addRange(0x111DE, 0x111DF).addRange(0x11238, 0x1123C).addRange(0x1144B, 0x1144D);\nset.addRange(0x1145A, 0x1145B).addRange(0x115C2, 0x115C5).addRange(0x115C9, 0x115D7).addRange(0x11641, 0x11642).addRange(0x1173C, 0x1173E).addRange(0x11A42, 0x11A43).addRange(0x11A9B, 0x11A9C).addRange(0x11AA1, 0x11AA2).addRange(0x11C41, 0x11C43).addRange(0x11EF7, 0x11EF8).addRange(0x11F43, 0x11F44).addRange(0x12470, 0x12474).addRange(0x16A6E, 0x16A6F).addRange(0x16B37, 0x16B39).addRange(0x16E97, 0x16E98).addRange(0x1DA87, 0x1DA8A);\nexports.characters = set;\n","const set = require('regenerate')(0xFA11, 0xFA1F, 0xFA21);\nset.addRange(0x3400, 0x4DBF).addRange(0x4E00, 0x9FFF).addRange(0xFA0E, 0xFA0F).addRange(0xFA13, 0xFA14).addRange(0xFA23, 0xFA24).addRange(0xFA27, 0xFA29).addRange(0x20000, 0x2A6DF).addRange(0x2A700, 0x2B739).addRange(0x2B740, 0x2B81D).addRange(0x2B820, 0x2CEA1).addRange(0x2CEB0, 0x2EBE0).addRange(0x2EBF0, 0x2EE5D).addRange(0x30000, 0x3134A).addRange(0x31350, 0x323AF);\nexports.characters = set;\n","const set = require('regenerate')(0x100, 0x102, 0x104, 0x106, 0x108, 0x10A, 0x10C, 0x10E, 0x110, 0x112, 0x114, 0x116, 0x118, 0x11A, 0x11C, 0x11E, 0x120, 0x122, 0x124, 0x126, 0x128, 0x12A, 0x12C, 0x12E, 0x130, 0x132, 0x134, 0x136, 0x139, 0x13B, 0x13D, 0x13F, 0x141, 0x143, 0x145, 0x147, 0x14A, 0x14C, 0x14E, 0x150, 0x152, 0x154, 0x156, 0x158, 0x15A, 0x15C, 0x15E, 0x160, 0x162, 0x164, 0x166, 0x168, 0x16A, 0x16C, 0x16E, 0x170, 0x172, 0x174, 0x176, 0x17B, 0x17D, 0x184, 0x1A2, 0x1A4, 0x1A9, 0x1AC, 0x1B5, 0x1BC, 0x1C4, 0x1C7, 0x1CA, 0x1CD, 0x1CF, 0x1D1, 0x1D3, 0x1D5, 0x1D7, 0x1D9, 0x1DB, 0x1DE, 0x1E0, 0x1E2, 0x1E4, 0x1E6, 0x1E8, 0x1EA, 0x1EC, 0x1EE, 0x1F1, 0x1F4, 0x1FA, 0x1FC, 0x1FE, 0x200, 0x202, 0x204, 0x206, 0x208, 0x20A, 0x20C, 0x20E, 0x210, 0x212, 0x214, 0x216, 0x218, 0x21A, 0x21C, 0x21E, 0x220, 0x222, 0x224, 0x226, 0x228, 0x22A, 0x22C, 0x22E, 0x230, 0x232, 0x241, 0x248, 0x24A, 0x24C, 0x24E, 0x370, 0x372, 0x376, 0x37F, 0x386, 0x38C, 0x3CF, 0x3D8, 0x3DA, 0x3DC, 0x3DE, 0x3E0, 0x3E2, 0x3E4, 0x3E6, 0x3E8, 0x3EA, 0x3EC, 0x3EE, 0x3F4, 0x3F7, 0x460, 0x462, 0x464, 0x466, 0x468, 0x46A, 0x46C, 0x46E, 0x470, 0x472, 0x474, 0x476, 0x478, 0x47A, 0x47C, 0x47E, 0x480, 0x48A, 0x48C, 0x48E, 0x490, 0x492, 0x494, 0x496, 0x498, 0x49A, 0x49C, 0x49E, 0x4A0, 0x4A2, 0x4A4, 0x4A6, 0x4A8, 0x4AA, 0x4AC, 0x4AE, 0x4B0, 0x4B2, 0x4B4, 0x4B6, 0x4B8, 0x4BA, 0x4BC, 0x4BE, 0x4C3, 0x4C5, 0x4C7, 0x4C9, 0x4CB, 0x4CD, 0x4D0, 0x4D2, 0x4D4, 0x4D6, 0x4D8, 0x4DA, 0x4DC, 0x4DE, 0x4E0, 0x4E2, 0x4E4, 0x4E6, 0x4E8, 0x4EA, 0x4EC, 0x4EE, 0x4F0, 0x4F2, 0x4F4, 0x4F6, 0x4F8, 0x4FA, 0x4FC, 0x4FE, 0x500, 0x502, 0x504, 0x506, 0x508, 0x50A, 0x50C, 0x50E, 0x510, 0x512, 0x514, 0x516, 0x518, 0x51A, 0x51C, 0x51E, 0x520, 0x522, 0x524, 0x526, 0x528, 0x52A, 0x52C, 0x52E, 0x10C7, 0x10CD, 0x1E00, 0x1E02, 0x1E04, 0x1E06, 0x1E08, 0x1E0A, 0x1E0C, 0x1E0E, 0x1E10, 0x1E12, 0x1E14, 0x1E16, 0x1E18, 0x1E1A, 0x1E1C, 0x1E1E, 0x1E20, 0x1E22, 0x1E24, 0x1E26, 0x1E28, 0x1E2A, 0x1E2C, 0x1E2E, 0x1E30, 0x1E32, 0x1E34, 0x1E36, 0x1E38, 0x1E3A, 0x1E3C, 0x1E3E, 0x1E40, 0x1E42, 0x1E44, 0x1E46, 0x1E48, 0x1E4A, 0x1E4C, 0x1E4E, 0x1E50, 0x1E52, 0x1E54, 0x1E56, 0x1E58, 0x1E5A, 0x1E5C, 0x1E5E, 0x1E60, 0x1E62, 0x1E64, 0x1E66, 0x1E68, 0x1E6A, 0x1E6C, 0x1E6E, 0x1E70, 0x1E72, 0x1E74, 0x1E76, 0x1E78, 0x1E7A, 0x1E7C, 0x1E7E, 0x1E80, 0x1E82, 0x1E84, 0x1E86, 0x1E88, 0x1E8A, 0x1E8C, 0x1E8E, 0x1E90, 0x1E92, 0x1E94, 0x1E9E, 0x1EA0, 0x1EA2, 0x1EA4, 0x1EA6, 0x1EA8, 0x1EAA, 0x1EAC, 0x1EAE, 0x1EB0, 0x1EB2, 0x1EB4, 0x1EB6, 0x1EB8, 0x1EBA, 0x1EBC, 0x1EBE, 0x1EC0, 0x1EC2, 0x1EC4, 0x1EC6, 0x1EC8, 0x1ECA, 0x1ECC, 0x1ECE, 0x1ED0, 0x1ED2, 0x1ED4, 0x1ED6, 0x1ED8, 0x1EDA, 0x1EDC, 0x1EDE, 0x1EE0, 0x1EE2, 0x1EE4, 0x1EE6, 0x1EE8, 0x1EEA, 0x1EEC, 0x1EEE, 0x1EF0, 0x1EF2, 0x1EF4, 0x1EF6, 0x1EF8, 0x1EFA, 0x1EFC, 0x1EFE, 0x1F59, 0x1F5B, 0x1F5D, 0x1F5F, 0x2102, 0x2107, 0x2115, 0x2124, 0x2126, 0x2128, 0x2145, 0x2183, 0x2C60, 0x2C67, 0x2C69, 0x2C6B, 0x2C72, 0x2C75, 0x2C82, 0x2C84, 0x2C86, 0x2C88, 0x2C8A, 0x2C8C, 0x2C8E, 0x2C90, 0x2C92, 0x2C94, 0x2C96, 0x2C98, 0x2C9A, 0x2C9C, 0x2C9E, 0x2CA0, 0x2CA2, 0x2CA4, 0x2CA6, 0x2CA8, 0x2CAA, 0x2CAC, 0x2CAE, 0x2CB0, 0x2CB2, 0x2CB4, 0x2CB6, 0x2CB8, 0x2CBA, 0x2CBC, 0x2CBE, 0x2CC0, 0x2CC2, 0x2CC4, 0x2CC6, 0x2CC8, 0x2CCA, 0x2CCC, 0x2CCE, 0x2CD0, 0x2CD2, 0x2CD4, 0x2CD6, 0x2CD8, 0x2CDA, 0x2CDC, 0x2CDE, 0x2CE0, 0x2CE2, 0x2CEB, 0x2CED, 0x2CF2, 0xA640, 0xA642, 0xA644, 0xA646, 0xA648, 0xA64A, 0xA64C, 0xA64E, 0xA650, 0xA652, 0xA654, 0xA656, 0xA658, 0xA65A, 0xA65C, 0xA65E, 0xA660, 0xA662, 0xA664, 0xA666, 0xA668, 0xA66A, 0xA66C, 0xA680, 0xA682, 0xA684, 0xA686, 0xA688, 0xA68A, 0xA68C, 0xA68E, 0xA690, 0xA692, 0xA694, 0xA696, 0xA698, 0xA69A, 0xA722, 0xA724, 0xA726, 0xA728, 0xA72A, 0xA72C, 0xA72E, 0xA732, 0xA734, 0xA736, 0xA738, 0xA73A, 0xA73C, 0xA73E, 0xA740, 0xA742, 0xA744, 0xA746, 0xA748, 0xA74A, 0xA74C, 0xA74E, 0xA750, 0xA752, 0xA754, 0xA756, 0xA758, 0xA75A, 0xA75C, 0xA75E, 0xA760, 0xA762, 0xA764, 0xA766, 0xA768, 0xA76A, 0xA76C, 0xA76E, 0xA779, 0xA77B, 0xA780, 0xA782, 0xA784, 0xA786, 0xA78B, 0xA78D, 0xA790, 0xA792, 0xA796, 0xA798, 0xA79A, 0xA79C, 0xA79E, 0xA7A0, 0xA7A2, 0xA7A4, 0xA7A6, 0xA7A8, 0xA7B6, 0xA7B8, 0xA7BA, 0xA7BC, 0xA7BE, 0xA7C0, 0xA7C2, 0xA7C9, 0xA7D0, 0xA7D6, 0xA7D8, 0xA7F5, 0x1D49C, 0x1D4A2, 0x1D546, 0x1D7CA);\nset.addRange(0x41, 0x5A).addRange(0xC0, 0xD6).addRange(0xD8, 0xDE).addRange(0x178, 0x179).addRange(0x181, 0x182).addRange(0x186, 0x187).addRange(0x189, 0x18B).addRange(0x18E, 0x191).addRange(0x193, 0x194).addRange(0x196, 0x198).addRange(0x19C, 0x19D).addRange(0x19F, 0x1A0).addRange(0x1A6, 0x1A7).addRange(0x1AE, 0x1AF).addRange(0x1B1, 0x1B3).addRange(0x1B7, 0x1B8).addRange(0x1F6, 0x1F8).addRange(0x23A, 0x23B).addRange(0x23D, 0x23E).addRange(0x243, 0x246).addRange(0x388, 0x38A).addRange(0x38E, 0x38F).addRange(0x391, 0x3A1).addRange(0x3A3, 0x3AB).addRange(0x3D2, 0x3D4).addRange(0x3F9, 0x3FA).addRange(0x3FD, 0x42F).addRange(0x4C0, 0x4C1).addRange(0x531, 0x556).addRange(0x10A0, 0x10C5).addRange(0x13A0, 0x13F5).addRange(0x1C90, 0x1CBA).addRange(0x1CBD, 0x1CBF).addRange(0x1F08, 0x1F0F).addRange(0x1F18, 0x1F1D).addRange(0x1F28, 0x1F2F).addRange(0x1F38, 0x1F3F).addRange(0x1F48, 0x1F4D).addRange(0x1F68, 0x1F6F).addRange(0x1FB8, 0x1FBB).addRange(0x1FC8, 0x1FCB).addRange(0x1FD8, 0x1FDB).addRange(0x1FE8, 0x1FEC).addRange(0x1FF8, 0x1FFB).addRange(0x210B, 0x210D).addRange(0x2110, 0x2112).addRange(0x2119, 0x211D).addRange(0x212A, 0x212D).addRange(0x2130, 0x2133).addRange(0x213E, 0x213F).addRange(0x2160, 0x216F);\nset.addRange(0x24B6, 0x24CF).addRange(0x2C00, 0x2C2F).addRange(0x2C62, 0x2C64).addRange(0x2C6D, 0x2C70).addRange(0x2C7E, 0x2C80).addRange(0xA77D, 0xA77E).addRange(0xA7AA, 0xA7AE).addRange(0xA7B0, 0xA7B4).addRange(0xA7C4, 0xA7C7).addRange(0xFF21, 0xFF3A).addRange(0x10400, 0x10427).addRange(0x104B0, 0x104D3).addRange(0x10570, 0x1057A).addRange(0x1057C, 0x1058A).addRange(0x1058C, 0x10592).addRange(0x10594, 0x10595).addRange(0x10C80, 0x10CB2).addRange(0x118A0, 0x118BF).addRange(0x16E40, 0x16E5F).addRange(0x1D400, 0x1D419).addRange(0x1D434, 0x1D44D).addRange(0x1D468, 0x1D481).addRange(0x1D49E, 0x1D49F).addRange(0x1D4A5, 0x1D4A6).addRange(0x1D4A9, 0x1D4AC).addRange(0x1D4AE, 0x1D4B5).addRange(0x1D4D0, 0x1D4E9).addRange(0x1D504, 0x1D505).addRange(0x1D507, 0x1D50A).addRange(0x1D50D, 0x1D514).addRange(0x1D516, 0x1D51C).addRange(0x1D538, 0x1D539).addRange(0x1D53B, 0x1D53E).addRange(0x1D540, 0x1D544).addRange(0x1D54A, 0x1D550).addRange(0x1D56C, 0x1D585).addRange(0x1D5A0, 0x1D5B9).addRange(0x1D5D4, 0x1D5ED).addRange(0x1D608, 0x1D621).addRange(0x1D63C, 0x1D655).addRange(0x1D670, 0x1D689).addRange(0x1D6A8, 0x1D6C0).addRange(0x1D6E2, 0x1D6FA).addRange(0x1D71C, 0x1D734).addRange(0x1D756, 0x1D76E).addRange(0x1D790, 0x1D7A8).addRange(0x1E900, 0x1E921).addRange(0x1F130, 0x1F149).addRange(0x1F150, 0x1F169).addRange(0x1F170, 0x1F189);\nexports.characters = set;\n","const set = require('regenerate')(0x180F);\nset.addRange(0x180B, 0x180D).addRange(0xFE00, 0xFE0F).addRange(0xE0100, 0xE01EF);\nexports.characters = set;\n","const set = require('regenerate')(0x20, 0x85, 0xA0, 0x1680, 0x202F, 0x205F, 0x3000);\nset.addRange(0x9, 0xD).addRange(0x2000, 0x200A).addRange(0x2028, 0x2029);\nexports.characters = set;\n","const set = require('regenerate')(0x5F, 0xAA, 0xB5, 0xB7, 0xBA, 0x2EC, 0x2EE, 0x37F, 0x38C, 0x559, 0x5BF, 0x5C7, 0x6FF, 0x7FA, 0x7FD, 0x9B2, 0x9D7, 0x9FC, 0x9FE, 0xA3C, 0xA51, 0xA5E, 0xAD0, 0xB71, 0xB9C, 0xBD0, 0xBD7, 0xC5D, 0xDBD, 0xDCA, 0xDD6, 0xE84, 0xEA5, 0xEC6, 0xF00, 0xF35, 0xF37, 0xF39, 0xFC6, 0x10C7, 0x10CD, 0x1258, 0x12C0, 0x17D7, 0x1AA7, 0x1F59, 0x1F5B, 0x1F5D, 0x1FBE, 0x2054, 0x2071, 0x207F, 0x20E1, 0x2102, 0x2107, 0x2115, 0x2124, 0x2126, 0x2128, 0x214E, 0x2D27, 0x2D2D, 0x2D6F, 0xA7D3, 0xA82C, 0xA8FB, 0xFB3E, 0xFE71, 0xFE73, 0xFE77, 0xFE79, 0xFE7B, 0xFE7D, 0xFF3F, 0x101FD, 0x102E0, 0x10808, 0x1083C, 0x10A3F, 0x10F27, 0x110C2, 0x11176, 0x111DC, 0x11288, 0x11350, 0x11357, 0x114C7, 0x11644, 0x11909, 0x11A47, 0x11A9D, 0x11D3A, 0x11FB0, 0x1B132, 0x1B155, 0x1D4A2, 0x1D4BB, 0x1D546, 0x1DA75, 0x1DA84, 0x1E08F, 0x1E14E, 0x1EE24, 0x1EE27, 0x1EE39, 0x1EE3B, 0x1EE42, 0x1EE47, 0x1EE49, 0x1EE4B, 0x1EE54, 0x1EE57, 0x1EE59, 0x1EE5B, 0x1EE5D, 0x1EE5F, 0x1EE64, 0x1EE7E);\nset.addRange(0x30, 0x39).addRange(0x41, 0x5A).addRange(0x61, 0x7A).addRange(0xC0, 0xD6).addRange(0xD8, 0xF6).addRange(0xF8, 0x2C1).addRange(0x2C6, 0x2D1).addRange(0x2E0, 0x2E4).addRange(0x300, 0x374).addRange(0x376, 0x377).addRange(0x37B, 0x37D).addRange(0x386, 0x38A).addRange(0x38E, 0x3A1).addRange(0x3A3, 0x3F5).addRange(0x3F7, 0x481).addRange(0x483, 0x487).addRange(0x48A, 0x52F).addRange(0x531, 0x556).addRange(0x560, 0x588).addRange(0x591, 0x5BD).addRange(0x5C1, 0x5C2).addRange(0x5C4, 0x5C5).addRange(0x5D0, 0x5EA).addRange(0x5EF, 0x5F2).addRange(0x610, 0x61A).addRange(0x620, 0x669).addRange(0x66E, 0x6D3).addRange(0x6D5, 0x6DC).addRange(0x6DF, 0x6E8).addRange(0x6EA, 0x6FC).addRange(0x710, 0x74A).addRange(0x74D, 0x7B1).addRange(0x7C0, 0x7F5).addRange(0x800, 0x82D).addRange(0x840, 0x85B).addRange(0x860, 0x86A).addRange(0x870, 0x887).addRange(0x889, 0x88E).addRange(0x898, 0x8E1).addRange(0x8E3, 0x963).addRange(0x966, 0x96F).addRange(0x971, 0x983).addRange(0x985, 0x98C).addRange(0x98F, 0x990).addRange(0x993, 0x9A8).addRange(0x9AA, 0x9B0).addRange(0x9B6, 0x9B9).addRange(0x9BC, 0x9C4).addRange(0x9C7, 0x9C8).addRange(0x9CB, 0x9CE).addRange(0x9DC, 0x9DD);\nset.addRange(0x9DF, 0x9E3).addRange(0x9E6, 0x9F1).addRange(0xA01, 0xA03).addRange(0xA05, 0xA0A).addRange(0xA0F, 0xA10).addRange(0xA13, 0xA28).addRange(0xA2A, 0xA30).addRange(0xA32, 0xA33).addRange(0xA35, 0xA36).addRange(0xA38, 0xA39).addRange(0xA3E, 0xA42).addRange(0xA47, 0xA48).addRange(0xA4B, 0xA4D).addRange(0xA59, 0xA5C).addRange(0xA66, 0xA75).addRange(0xA81, 0xA83).addRange(0xA85, 0xA8D).addRange(0xA8F, 0xA91).addRange(0xA93, 0xAA8).addRange(0xAAA, 0xAB0).addRange(0xAB2, 0xAB3).addRange(0xAB5, 0xAB9).addRange(0xABC, 0xAC5).addRange(0xAC7, 0xAC9).addRange(0xACB, 0xACD).addRange(0xAE0, 0xAE3).addRange(0xAE6, 0xAEF).addRange(0xAF9, 0xAFF).addRange(0xB01, 0xB03).addRange(0xB05, 0xB0C).addRange(0xB0F, 0xB10).addRange(0xB13, 0xB28).addRange(0xB2A, 0xB30).addRange(0xB32, 0xB33).addRange(0xB35, 0xB39).addRange(0xB3C, 0xB44).addRange(0xB47, 0xB48).addRange(0xB4B, 0xB4D).addRange(0xB55, 0xB57).addRange(0xB5C, 0xB5D).addRange(0xB5F, 0xB63).addRange(0xB66, 0xB6F).addRange(0xB82, 0xB83).addRange(0xB85, 0xB8A).addRange(0xB8E, 0xB90).addRange(0xB92, 0xB95).addRange(0xB99, 0xB9A).addRange(0xB9E, 0xB9F).addRange(0xBA3, 0xBA4).addRange(0xBA8, 0xBAA).addRange(0xBAE, 0xBB9);\nset.addRange(0xBBE, 0xBC2).addRange(0xBC6, 0xBC8).addRange(0xBCA, 0xBCD).addRange(0xBE6, 0xBEF).addRange(0xC00, 0xC0C).addRange(0xC0E, 0xC10).addRange(0xC12, 0xC28).addRange(0xC2A, 0xC39).addRange(0xC3C, 0xC44).addRange(0xC46, 0xC48).addRange(0xC4A, 0xC4D).addRange(0xC55, 0xC56).addRange(0xC58, 0xC5A).addRange(0xC60, 0xC63).addRange(0xC66, 0xC6F).addRange(0xC80, 0xC83).addRange(0xC85, 0xC8C).addRange(0xC8E, 0xC90).addRange(0xC92, 0xCA8).addRange(0xCAA, 0xCB3).addRange(0xCB5, 0xCB9).addRange(0xCBC, 0xCC4).addRange(0xCC6, 0xCC8).addRange(0xCCA, 0xCCD).addRange(0xCD5, 0xCD6).addRange(0xCDD, 0xCDE).addRange(0xCE0, 0xCE3).addRange(0xCE6, 0xCEF).addRange(0xCF1, 0xCF3).addRange(0xD00, 0xD0C).addRange(0xD0E, 0xD10).addRange(0xD12, 0xD44).addRange(0xD46, 0xD48).addRange(0xD4A, 0xD4E).addRange(0xD54, 0xD57).addRange(0xD5F, 0xD63).addRange(0xD66, 0xD6F).addRange(0xD7A, 0xD7F).addRange(0xD81, 0xD83).addRange(0xD85, 0xD96).addRange(0xD9A, 0xDB1).addRange(0xDB3, 0xDBB).addRange(0xDC0, 0xDC6).addRange(0xDCF, 0xDD4).addRange(0xDD8, 0xDDF).addRange(0xDE6, 0xDEF).addRange(0xDF2, 0xDF3).addRange(0xE01, 0xE3A).addRange(0xE40, 0xE4E).addRange(0xE50, 0xE59).addRange(0xE81, 0xE82);\nset.addRange(0xE86, 0xE8A).addRange(0xE8C, 0xEA3).addRange(0xEA7, 0xEBD).addRange(0xEC0, 0xEC4).addRange(0xEC8, 0xECE).addRange(0xED0, 0xED9).addRange(0xEDC, 0xEDF).addRange(0xF18, 0xF19).addRange(0xF20, 0xF29).addRange(0xF3E, 0xF47).addRange(0xF49, 0xF6C).addRange(0xF71, 0xF84).addRange(0xF86, 0xF97).addRange(0xF99, 0xFBC).addRange(0x1000, 0x1049).addRange(0x1050, 0x109D).addRange(0x10A0, 0x10C5).addRange(0x10D0, 0x10FA).addRange(0x10FC, 0x1248).addRange(0x124A, 0x124D).addRange(0x1250, 0x1256).addRange(0x125A, 0x125D).addRange(0x1260, 0x1288).addRange(0x128A, 0x128D).addRange(0x1290, 0x12B0).addRange(0x12B2, 0x12B5).addRange(0x12B8, 0x12BE).addRange(0x12C2, 0x12C5).addRange(0x12C8, 0x12D6).addRange(0x12D8, 0x1310).addRange(0x1312, 0x1315).addRange(0x1318, 0x135A).addRange(0x135D, 0x135F).addRange(0x1369, 0x1371).addRange(0x1380, 0x138F).addRange(0x13A0, 0x13F5).addRange(0x13F8, 0x13FD).addRange(0x1401, 0x166C).addRange(0x166F, 0x167F).addRange(0x1681, 0x169A).addRange(0x16A0, 0x16EA).addRange(0x16EE, 0x16F8).addRange(0x1700, 0x1715).addRange(0x171F, 0x1734).addRange(0x1740, 0x1753).addRange(0x1760, 0x176C).addRange(0x176E, 0x1770).addRange(0x1772, 0x1773).addRange(0x1780, 0x17D3).addRange(0x17DC, 0x17DD).addRange(0x17E0, 0x17E9);\nset.addRange(0x180B, 0x180D).addRange(0x180F, 0x1819).addRange(0x1820, 0x1878).addRange(0x1880, 0x18AA).addRange(0x18B0, 0x18F5).addRange(0x1900, 0x191E).addRange(0x1920, 0x192B).addRange(0x1930, 0x193B).addRange(0x1946, 0x196D).addRange(0x1970, 0x1974).addRange(0x1980, 0x19AB).addRange(0x19B0, 0x19C9).addRange(0x19D0, 0x19DA).addRange(0x1A00, 0x1A1B).addRange(0x1A20, 0x1A5E).addRange(0x1A60, 0x1A7C).addRange(0x1A7F, 0x1A89).addRange(0x1A90, 0x1A99).addRange(0x1AB0, 0x1ABD).addRange(0x1ABF, 0x1ACE).addRange(0x1B00, 0x1B4C).addRange(0x1B50, 0x1B59).addRange(0x1B6B, 0x1B73).addRange(0x1B80, 0x1BF3).addRange(0x1C00, 0x1C37).addRange(0x1C40, 0x1C49).addRange(0x1C4D, 0x1C7D).addRange(0x1C80, 0x1C88).addRange(0x1C90, 0x1CBA).addRange(0x1CBD, 0x1CBF).addRange(0x1CD0, 0x1CD2).addRange(0x1CD4, 0x1CFA).addRange(0x1D00, 0x1F15).addRange(0x1F18, 0x1F1D).addRange(0x1F20, 0x1F45).addRange(0x1F48, 0x1F4D).addRange(0x1F50, 0x1F57).addRange(0x1F5F, 0x1F7D).addRange(0x1F80, 0x1FB4).addRange(0x1FB6, 0x1FBC).addRange(0x1FC2, 0x1FC4).addRange(0x1FC6, 0x1FCC).addRange(0x1FD0, 0x1FD3).addRange(0x1FD6, 0x1FDB).addRange(0x1FE0, 0x1FEC).addRange(0x1FF2, 0x1FF4).addRange(0x1FF6, 0x1FFC).addRange(0x200C, 0x200D).addRange(0x203F, 0x2040).addRange(0x2090, 0x209C).addRange(0x20D0, 0x20DC);\nset.addRange(0x20E5, 0x20F0).addRange(0x210A, 0x2113).addRange(0x2118, 0x211D).addRange(0x212A, 0x2139).addRange(0x213C, 0x213F).addRange(0x2145, 0x2149).addRange(0x2160, 0x2188).addRange(0x2C00, 0x2CE4).addRange(0x2CEB, 0x2CF3).addRange(0x2D00, 0x2D25).addRange(0x2D30, 0x2D67).addRange(0x2D7F, 0x2D96).addRange(0x2DA0, 0x2DA6).addRange(0x2DA8, 0x2DAE).addRange(0x2DB0, 0x2DB6).addRange(0x2DB8, 0x2DBE).addRange(0x2DC0, 0x2DC6).addRange(0x2DC8, 0x2DCE).addRange(0x2DD0, 0x2DD6).addRange(0x2DD8, 0x2DDE).addRange(0x2DE0, 0x2DFF).addRange(0x3005, 0x3007).addRange(0x3021, 0x302F).addRange(0x3031, 0x3035).addRange(0x3038, 0x303C).addRange(0x3041, 0x3096).addRange(0x3099, 0x309A).addRange(0x309D, 0x309F).addRange(0x30A1, 0x30FF).addRange(0x3105, 0x312F).addRange(0x3131, 0x318E).addRange(0x31A0, 0x31BF).addRange(0x31F0, 0x31FF).addRange(0x3400, 0x4DBF).addRange(0x4E00, 0xA48C).addRange(0xA4D0, 0xA4FD).addRange(0xA500, 0xA60C).addRange(0xA610, 0xA62B).addRange(0xA640, 0xA66F).addRange(0xA674, 0xA67D).addRange(0xA67F, 0xA6F1).addRange(0xA717, 0xA71F).addRange(0xA722, 0xA788).addRange(0xA78B, 0xA7CA).addRange(0xA7D0, 0xA7D1).addRange(0xA7D5, 0xA7D9).addRange(0xA7F2, 0xA827).addRange(0xA840, 0xA873).addRange(0xA880, 0xA8C5).addRange(0xA8D0, 0xA8D9).addRange(0xA8E0, 0xA8F7);\nset.addRange(0xA8FD, 0xA92D).addRange(0xA930, 0xA953).addRange(0xA960, 0xA97C).addRange(0xA980, 0xA9C0).addRange(0xA9CF, 0xA9D9).addRange(0xA9E0, 0xA9FE).addRange(0xAA00, 0xAA36).addRange(0xAA40, 0xAA4D).addRange(0xAA50, 0xAA59).addRange(0xAA60, 0xAA76).addRange(0xAA7A, 0xAAC2).addRange(0xAADB, 0xAADD).addRange(0xAAE0, 0xAAEF).addRange(0xAAF2, 0xAAF6).addRange(0xAB01, 0xAB06).addRange(0xAB09, 0xAB0E).addRange(0xAB11, 0xAB16).addRange(0xAB20, 0xAB26).addRange(0xAB28, 0xAB2E).addRange(0xAB30, 0xAB5A).addRange(0xAB5C, 0xAB69).addRange(0xAB70, 0xABEA).addRange(0xABEC, 0xABED).addRange(0xABF0, 0xABF9).addRange(0xAC00, 0xD7A3).addRange(0xD7B0, 0xD7C6).addRange(0xD7CB, 0xD7FB).addRange(0xF900, 0xFA6D).addRange(0xFA70, 0xFAD9).addRange(0xFB00, 0xFB06).addRange(0xFB13, 0xFB17).addRange(0xFB1D, 0xFB28).addRange(0xFB2A, 0xFB36).addRange(0xFB38, 0xFB3C).addRange(0xFB40, 0xFB41).addRange(0xFB43, 0xFB44).addRange(0xFB46, 0xFBB1).addRange(0xFBD3, 0xFC5D).addRange(0xFC64, 0xFD3D).addRange(0xFD50, 0xFD8F).addRange(0xFD92, 0xFDC7).addRange(0xFDF0, 0xFDF9).addRange(0xFE00, 0xFE0F).addRange(0xFE20, 0xFE2F).addRange(0xFE33, 0xFE34).addRange(0xFE4D, 0xFE4F).addRange(0xFE7F, 0xFEFC).addRange(0xFF10, 0xFF19).addRange(0xFF21, 0xFF3A).addRange(0xFF41, 0xFF5A).addRange(0xFF65, 0xFFBE);\nset.addRange(0xFFC2, 0xFFC7).addRange(0xFFCA, 0xFFCF).addRange(0xFFD2, 0xFFD7).addRange(0xFFDA, 0xFFDC).addRange(0x10000, 0x1000B).addRange(0x1000D, 0x10026).addRange(0x10028, 0x1003A).addRange(0x1003C, 0x1003D).addRange(0x1003F, 0x1004D).addRange(0x10050, 0x1005D).addRange(0x10080, 0x100FA).addRange(0x10140, 0x10174).addRange(0x10280, 0x1029C).addRange(0x102A0, 0x102D0).addRange(0x10300, 0x1031F).addRange(0x1032D, 0x1034A).addRange(0x10350, 0x1037A).addRange(0x10380, 0x1039D).addRange(0x103A0, 0x103C3).addRange(0x103C8, 0x103CF).addRange(0x103D1, 0x103D5).addRange(0x10400, 0x1049D).addRange(0x104A0, 0x104A9).addRange(0x104B0, 0x104D3).addRange(0x104D8, 0x104FB).addRange(0x10500, 0x10527).addRange(0x10530, 0x10563).addRange(0x10570, 0x1057A).addRange(0x1057C, 0x1058A).addRange(0x1058C, 0x10592).addRange(0x10594, 0x10595).addRange(0x10597, 0x105A1).addRange(0x105A3, 0x105B1).addRange(0x105B3, 0x105B9).addRange(0x105BB, 0x105BC).addRange(0x10600, 0x10736).addRange(0x10740, 0x10755).addRange(0x10760, 0x10767).addRange(0x10780, 0x10785).addRange(0x10787, 0x107B0).addRange(0x107B2, 0x107BA).addRange(0x10800, 0x10805).addRange(0x1080A, 0x10835).addRange(0x10837, 0x10838).addRange(0x1083F, 0x10855).addRange(0x10860, 0x10876).addRange(0x10880, 0x1089E).addRange(0x108E0, 0x108F2).addRange(0x108F4, 0x108F5).addRange(0x10900, 0x10915).addRange(0x10920, 0x10939);\nset.addRange(0x10980, 0x109B7).addRange(0x109BE, 0x109BF).addRange(0x10A00, 0x10A03).addRange(0x10A05, 0x10A06).addRange(0x10A0C, 0x10A13).addRange(0x10A15, 0x10A17).addRange(0x10A19, 0x10A35).addRange(0x10A38, 0x10A3A).addRange(0x10A60, 0x10A7C).addRange(0x10A80, 0x10A9C).addRange(0x10AC0, 0x10AC7).addRange(0x10AC9, 0x10AE6).addRange(0x10B00, 0x10B35).addRange(0x10B40, 0x10B55).addRange(0x10B60, 0x10B72).addRange(0x10B80, 0x10B91).addRange(0x10C00, 0x10C48).addRange(0x10C80, 0x10CB2).addRange(0x10CC0, 0x10CF2).addRange(0x10D00, 0x10D27).addRange(0x10D30, 0x10D39).addRange(0x10E80, 0x10EA9).addRange(0x10EAB, 0x10EAC).addRange(0x10EB0, 0x10EB1).addRange(0x10EFD, 0x10F1C).addRange(0x10F30, 0x10F50).addRange(0x10F70, 0x10F85).addRange(0x10FB0, 0x10FC4).addRange(0x10FE0, 0x10FF6).addRange(0x11000, 0x11046).addRange(0x11066, 0x11075).addRange(0x1107F, 0x110BA).addRange(0x110D0, 0x110E8).addRange(0x110F0, 0x110F9).addRange(0x11100, 0x11134).addRange(0x11136, 0x1113F).addRange(0x11144, 0x11147).addRange(0x11150, 0x11173).addRange(0x11180, 0x111C4).addRange(0x111C9, 0x111CC).addRange(0x111CE, 0x111DA).addRange(0x11200, 0x11211).addRange(0x11213, 0x11237).addRange(0x1123E, 0x11241).addRange(0x11280, 0x11286).addRange(0x1128A, 0x1128D).addRange(0x1128F, 0x1129D).addRange(0x1129F, 0x112A8).addRange(0x112B0, 0x112EA).addRange(0x112F0, 0x112F9).addRange(0x11300, 0x11303);\nset.addRange(0x11305, 0x1130C).addRange(0x1130F, 0x11310).addRange(0x11313, 0x11328).addRange(0x1132A, 0x11330).addRange(0x11332, 0x11333).addRange(0x11335, 0x11339).addRange(0x1133B, 0x11344).addRange(0x11347, 0x11348).addRange(0x1134B, 0x1134D).addRange(0x1135D, 0x11363).addRange(0x11366, 0x1136C).addRange(0x11370, 0x11374).addRange(0x11400, 0x1144A).addRange(0x11450, 0x11459).addRange(0x1145E, 0x11461).addRange(0x11480, 0x114C5).addRange(0x114D0, 0x114D9).addRange(0x11580, 0x115B5).addRange(0x115B8, 0x115C0).addRange(0x115D8, 0x115DD).addRange(0x11600, 0x11640).addRange(0x11650, 0x11659).addRange(0x11680, 0x116B8).addRange(0x116C0, 0x116C9).addRange(0x11700, 0x1171A).addRange(0x1171D, 0x1172B).addRange(0x11730, 0x11739).addRange(0x11740, 0x11746).addRange(0x11800, 0x1183A).addRange(0x118A0, 0x118E9).addRange(0x118FF, 0x11906).addRange(0x1190C, 0x11913).addRange(0x11915, 0x11916).addRange(0x11918, 0x11935).addRange(0x11937, 0x11938).addRange(0x1193B, 0x11943).addRange(0x11950, 0x11959).addRange(0x119A0, 0x119A7).addRange(0x119AA, 0x119D7).addRange(0x119DA, 0x119E1).addRange(0x119E3, 0x119E4).addRange(0x11A00, 0x11A3E).addRange(0x11A50, 0x11A99).addRange(0x11AB0, 0x11AF8).addRange(0x11C00, 0x11C08).addRange(0x11C0A, 0x11C36).addRange(0x11C38, 0x11C40).addRange(0x11C50, 0x11C59).addRange(0x11C72, 0x11C8F).addRange(0x11C92, 0x11CA7).addRange(0x11CA9, 0x11CB6);\nset.addRange(0x11D00, 0x11D06).addRange(0x11D08, 0x11D09).addRange(0x11D0B, 0x11D36).addRange(0x11D3C, 0x11D3D).addRange(0x11D3F, 0x11D47).addRange(0x11D50, 0x11D59).addRange(0x11D60, 0x11D65).addRange(0x11D67, 0x11D68).addRange(0x11D6A, 0x11D8E).addRange(0x11D90, 0x11D91).addRange(0x11D93, 0x11D98).addRange(0x11DA0, 0x11DA9).addRange(0x11EE0, 0x11EF6).addRange(0x11F00, 0x11F10).addRange(0x11F12, 0x11F3A).addRange(0x11F3E, 0x11F42).addRange(0x11F50, 0x11F59).addRange(0x12000, 0x12399).addRange(0x12400, 0x1246E).addRange(0x12480, 0x12543).addRange(0x12F90, 0x12FF0).addRange(0x13000, 0x1342F).addRange(0x13440, 0x13455).addRange(0x14400, 0x14646).addRange(0x16800, 0x16A38).addRange(0x16A40, 0x16A5E).addRange(0x16A60, 0x16A69).addRange(0x16A70, 0x16ABE).addRange(0x16AC0, 0x16AC9).addRange(0x16AD0, 0x16AED).addRange(0x16AF0, 0x16AF4).addRange(0x16B00, 0x16B36).addRange(0x16B40, 0x16B43).addRange(0x16B50, 0x16B59).addRange(0x16B63, 0x16B77).addRange(0x16B7D, 0x16B8F).addRange(0x16E40, 0x16E7F).addRange(0x16F00, 0x16F4A).addRange(0x16F4F, 0x16F87).addRange(0x16F8F, 0x16F9F).addRange(0x16FE0, 0x16FE1).addRange(0x16FE3, 0x16FE4).addRange(0x16FF0, 0x16FF1).addRange(0x17000, 0x187F7).addRange(0x18800, 0x18CD5).addRange(0x18D00, 0x18D08).addRange(0x1AFF0, 0x1AFF3).addRange(0x1AFF5, 0x1AFFB).addRange(0x1AFFD, 0x1AFFE).addRange(0x1B000, 0x1B122).addRange(0x1B150, 0x1B152);\nset.addRange(0x1B164, 0x1B167).addRange(0x1B170, 0x1B2FB).addRange(0x1BC00, 0x1BC6A).addRange(0x1BC70, 0x1BC7C).addRange(0x1BC80, 0x1BC88).addRange(0x1BC90, 0x1BC99).addRange(0x1BC9D, 0x1BC9E).addRange(0x1CF00, 0x1CF2D).addRange(0x1CF30, 0x1CF46).addRange(0x1D165, 0x1D169).addRange(0x1D16D, 0x1D172).addRange(0x1D17B, 0x1D182).addRange(0x1D185, 0x1D18B).addRange(0x1D1AA, 0x1D1AD).addRange(0x1D242, 0x1D244).addRange(0x1D400, 0x1D454).addRange(0x1D456, 0x1D49C).addRange(0x1D49E, 0x1D49F).addRange(0x1D4A5, 0x1D4A6).addRange(0x1D4A9, 0x1D4AC).addRange(0x1D4AE, 0x1D4B9).addRange(0x1D4BD, 0x1D4C3).addRange(0x1D4C5, 0x1D505).addRange(0x1D507, 0x1D50A).addRange(0x1D50D, 0x1D514).addRange(0x1D516, 0x1D51C).addRange(0x1D51E, 0x1D539).addRange(0x1D53B, 0x1D53E).addRange(0x1D540, 0x1D544).addRange(0x1D54A, 0x1D550).addRange(0x1D552, 0x1D6A5).addRange(0x1D6A8, 0x1D6C0).addRange(0x1D6C2, 0x1D6DA).addRange(0x1D6DC, 0x1D6FA).addRange(0x1D6FC, 0x1D714).addRange(0x1D716, 0x1D734).addRange(0x1D736, 0x1D74E).addRange(0x1D750, 0x1D76E).addRange(0x1D770, 0x1D788).addRange(0x1D78A, 0x1D7A8).addRange(0x1D7AA, 0x1D7C2).addRange(0x1D7C4, 0x1D7CB).addRange(0x1D7CE, 0x1D7FF).addRange(0x1DA00, 0x1DA36).addRange(0x1DA3B, 0x1DA6C).addRange(0x1DA9B, 0x1DA9F).addRange(0x1DAA1, 0x1DAAF).addRange(0x1DF00, 0x1DF1E).addRange(0x1DF25, 0x1DF2A).addRange(0x1E000, 0x1E006).addRange(0x1E008, 0x1E018);\nset.addRange(0x1E01B, 0x1E021).addRange(0x1E023, 0x1E024).addRange(0x1E026, 0x1E02A).addRange(0x1E030, 0x1E06D).addRange(0x1E100, 0x1E12C).addRange(0x1E130, 0x1E13D).addRange(0x1E140, 0x1E149).addRange(0x1E290, 0x1E2AE).addRange(0x1E2C0, 0x1E2F9).addRange(0x1E4D0, 0x1E4F9).addRange(0x1E7E0, 0x1E7E6).addRange(0x1E7E8, 0x1E7EB).addRange(0x1E7ED, 0x1E7EE).addRange(0x1E7F0, 0x1E7FE).addRange(0x1E800, 0x1E8C4).addRange(0x1E8D0, 0x1E8D6).addRange(0x1E900, 0x1E94B).addRange(0x1E950, 0x1E959).addRange(0x1EE00, 0x1EE03).addRange(0x1EE05, 0x1EE1F).addRange(0x1EE21, 0x1EE22).addRange(0x1EE29, 0x1EE32).addRange(0x1EE34, 0x1EE37).addRange(0x1EE4D, 0x1EE4F).addRange(0x1EE51, 0x1EE52).addRange(0x1EE61, 0x1EE62).addRange(0x1EE67, 0x1EE6A).addRange(0x1EE6C, 0x1EE72).addRange(0x1EE74, 0x1EE77).addRange(0x1EE79, 0x1EE7C).addRange(0x1EE80, 0x1EE89).addRange(0x1EE8B, 0x1EE9B).addRange(0x1EEA1, 0x1EEA3).addRange(0x1EEA5, 0x1EEA9).addRange(0x1EEAB, 0x1EEBB).addRange(0x1FBF0, 0x1FBF9).addRange(0x20000, 0x2A6DF).addRange(0x2A700, 0x2B739).addRange(0x2B740, 0x2B81D).addRange(0x2B820, 0x2CEA1).addRange(0x2CEB0, 0x2EBE0).addRange(0x2EBF0, 0x2EE5D).addRange(0x2F800, 0x2FA1D).addRange(0x30000, 0x3134A).addRange(0x31350, 0x323AF).addRange(0xE0100, 0xE01EF);\nexports.characters = set;\n","const set = require('regenerate')(0xAA, 0xB5, 0xBA, 0x2EC, 0x2EE, 0x37F, 0x386, 0x38C, 0x559, 0x6D5, 0x6FF, 0x710, 0x7B1, 0x7FA, 0x81A, 0x824, 0x828, 0x93D, 0x950, 0x9B2, 0x9BD, 0x9CE, 0x9FC, 0xA5E, 0xABD, 0xAD0, 0xAF9, 0xB3D, 0xB71, 0xB83, 0xB9C, 0xBD0, 0xC3D, 0xC5D, 0xC80, 0xCBD, 0xD3D, 0xD4E, 0xDBD, 0xE32, 0xE84, 0xEA5, 0xEB2, 0xEBD, 0xEC6, 0xF00, 0x103F, 0x1061, 0x108E, 0x10C7, 0x10CD, 0x1258, 0x12C0, 0x17D7, 0x17DC, 0x18AA, 0x1AA7, 0x1CFA, 0x1F59, 0x1F5B, 0x1F5D, 0x1FBE, 0x2071, 0x207F, 0x2102, 0x2107, 0x2115, 0x2124, 0x2126, 0x2128, 0x214E, 0x2D27, 0x2D2D, 0x2D6F, 0xA7D3, 0xA8FB, 0xA9CF, 0xAA7A, 0xAAB1, 0xAAC0, 0xAAC2, 0xFB1D, 0xFB3E, 0xFE71, 0xFE73, 0xFE77, 0xFE79, 0xFE7B, 0xFE7D, 0x10808, 0x1083C, 0x10A00, 0x10F27, 0x11075, 0x11144, 0x11147, 0x11176, 0x111DA, 0x111DC, 0x11288, 0x1133D, 0x11350, 0x114C7, 0x11644, 0x116B8, 0x11909, 0x1193F, 0x11941, 0x119E1, 0x119E3, 0x11A00, 0x11A3A, 0x11A50, 0x11A9D, 0x11C40, 0x11D46, 0x11D98, 0x11F02, 0x11FB0, 0x16F50, 0x16FE3, 0x1B132, 0x1B155, 0x1D4A2, 0x1D4BB, 0x1D546, 0x1E14E, 0x1E94B, 0x1EE24, 0x1EE27, 0x1EE39, 0x1EE3B, 0x1EE42, 0x1EE47, 0x1EE49, 0x1EE4B, 0x1EE54, 0x1EE57, 0x1EE59, 0x1EE5B, 0x1EE5D, 0x1EE5F, 0x1EE64, 0x1EE7E);\nset.addRange(0x41, 0x5A).addRange(0x61, 0x7A).addRange(0xC0, 0xD6).addRange(0xD8, 0xF6).addRange(0xF8, 0x2C1).addRange(0x2C6, 0x2D1).addRange(0x2E0, 0x2E4).addRange(0x370, 0x374).addRange(0x376, 0x377).addRange(0x37B, 0x37D).addRange(0x388, 0x38A).addRange(0x38E, 0x3A1).addRange(0x3A3, 0x3F5).addRange(0x3F7, 0x481).addRange(0x48A, 0x52F).addRange(0x531, 0x556).addRange(0x560, 0x588).addRange(0x5D0, 0x5EA).addRange(0x5EF, 0x5F2).addRange(0x620, 0x64A).addRange(0x66E, 0x66F).addRange(0x671, 0x6D3).addRange(0x6E5, 0x6E6).addRange(0x6EE, 0x6EF).addRange(0x6FA, 0x6FC).addRange(0x712, 0x72F).addRange(0x74D, 0x7A5).addRange(0x7CA, 0x7EA).addRange(0x7F4, 0x7F5).addRange(0x800, 0x815).addRange(0x840, 0x858).addRange(0x860, 0x86A).addRange(0x870, 0x887).addRange(0x889, 0x88E).addRange(0x8A0, 0x8C9).addRange(0x904, 0x939).addRange(0x958, 0x961).addRange(0x971, 0x980).addRange(0x985, 0x98C).addRange(0x98F, 0x990).addRange(0x993, 0x9A8).addRange(0x9AA, 0x9B0).addRange(0x9B6, 0x9B9).addRange(0x9DC, 0x9DD).addRange(0x9DF, 0x9E1).addRange(0x9F0, 0x9F1).addRange(0xA05, 0xA0A).addRange(0xA0F, 0xA10).addRange(0xA13, 0xA28).addRange(0xA2A, 0xA30).addRange(0xA32, 0xA33);\nset.addRange(0xA35, 0xA36).addRange(0xA38, 0xA39).addRange(0xA59, 0xA5C).addRange(0xA72, 0xA74).addRange(0xA85, 0xA8D).addRange(0xA8F, 0xA91).addRange(0xA93, 0xAA8).addRange(0xAAA, 0xAB0).addRange(0xAB2, 0xAB3).addRange(0xAB5, 0xAB9).addRange(0xAE0, 0xAE1).addRange(0xB05, 0xB0C).addRange(0xB0F, 0xB10).addRange(0xB13, 0xB28).addRange(0xB2A, 0xB30).addRange(0xB32, 0xB33).addRange(0xB35, 0xB39).addRange(0xB5C, 0xB5D).addRange(0xB5F, 0xB61).addRange(0xB85, 0xB8A).addRange(0xB8E, 0xB90).addRange(0xB92, 0xB95).addRange(0xB99, 0xB9A).addRange(0xB9E, 0xB9F).addRange(0xBA3, 0xBA4).addRange(0xBA8, 0xBAA).addRange(0xBAE, 0xBB9).addRange(0xC05, 0xC0C).addRange(0xC0E, 0xC10).addRange(0xC12, 0xC28).addRange(0xC2A, 0xC39).addRange(0xC58, 0xC5A).addRange(0xC60, 0xC61).addRange(0xC85, 0xC8C).addRange(0xC8E, 0xC90).addRange(0xC92, 0xCA8).addRange(0xCAA, 0xCB3).addRange(0xCB5, 0xCB9).addRange(0xCDD, 0xCDE).addRange(0xCE0, 0xCE1).addRange(0xCF1, 0xCF2).addRange(0xD04, 0xD0C).addRange(0xD0E, 0xD10).addRange(0xD12, 0xD3A).addRange(0xD54, 0xD56).addRange(0xD5F, 0xD61).addRange(0xD7A, 0xD7F).addRange(0xD85, 0xD96).addRange(0xD9A, 0xDB1).addRange(0xDB3, 0xDBB).addRange(0xDC0, 0xDC6);\nset.addRange(0xE01, 0xE30).addRange(0xE40, 0xE46).addRange(0xE81, 0xE82).addRange(0xE86, 0xE8A).addRange(0xE8C, 0xEA3).addRange(0xEA7, 0xEB0).addRange(0xEC0, 0xEC4).addRange(0xEDC, 0xEDF).addRange(0xF40, 0xF47).addRange(0xF49, 0xF6C).addRange(0xF88, 0xF8C).addRange(0x1000, 0x102A).addRange(0x1050, 0x1055).addRange(0x105A, 0x105D).addRange(0x1065, 0x1066).addRange(0x106E, 0x1070).addRange(0x1075, 0x1081).addRange(0x10A0, 0x10C5).addRange(0x10D0, 0x10FA).addRange(0x10FC, 0x1248).addRange(0x124A, 0x124D).addRange(0x1250, 0x1256).addRange(0x125A, 0x125D).addRange(0x1260, 0x1288).addRange(0x128A, 0x128D).addRange(0x1290, 0x12B0).addRange(0x12B2, 0x12B5).addRange(0x12B8, 0x12BE).addRange(0x12C2, 0x12C5).addRange(0x12C8, 0x12D6).addRange(0x12D8, 0x1310).addRange(0x1312, 0x1315).addRange(0x1318, 0x135A).addRange(0x1380, 0x138F).addRange(0x13A0, 0x13F5).addRange(0x13F8, 0x13FD).addRange(0x1401, 0x166C).addRange(0x166F, 0x167F).addRange(0x1681, 0x169A).addRange(0x16A0, 0x16EA).addRange(0x16EE, 0x16F8).addRange(0x1700, 0x1711).addRange(0x171F, 0x1731).addRange(0x1740, 0x1751).addRange(0x1760, 0x176C).addRange(0x176E, 0x1770).addRange(0x1780, 0x17B3).addRange(0x1820, 0x1878).addRange(0x1880, 0x18A8).addRange(0x18B0, 0x18F5).addRange(0x1900, 0x191E);\nset.addRange(0x1950, 0x196D).addRange(0x1970, 0x1974).addRange(0x1980, 0x19AB).addRange(0x19B0, 0x19C9).addRange(0x1A00, 0x1A16).addRange(0x1A20, 0x1A54).addRange(0x1B05, 0x1B33).addRange(0x1B45, 0x1B4C).addRange(0x1B83, 0x1BA0).addRange(0x1BAE, 0x1BAF).addRange(0x1BBA, 0x1BE5).addRange(0x1C00, 0x1C23).addRange(0x1C4D, 0x1C4F).addRange(0x1C5A, 0x1C7D).addRange(0x1C80, 0x1C88).addRange(0x1C90, 0x1CBA).addRange(0x1CBD, 0x1CBF).addRange(0x1CE9, 0x1CEC).addRange(0x1CEE, 0x1CF3).addRange(0x1CF5, 0x1CF6).addRange(0x1D00, 0x1DBF).addRange(0x1E00, 0x1F15).addRange(0x1F18, 0x1F1D).addRange(0x1F20, 0x1F45).addRange(0x1F48, 0x1F4D).addRange(0x1F50, 0x1F57).addRange(0x1F5F, 0x1F7D).addRange(0x1F80, 0x1FB4).addRange(0x1FB6, 0x1FBC).addRange(0x1FC2, 0x1FC4).addRange(0x1FC6, 0x1FCC).addRange(0x1FD0, 0x1FD3).addRange(0x1FD6, 0x1FDB).addRange(0x1FE0, 0x1FEC).addRange(0x1FF2, 0x1FF4).addRange(0x1FF6, 0x1FFC).addRange(0x2090, 0x209C).addRange(0x210A, 0x2113).addRange(0x2118, 0x211D).addRange(0x212A, 0x2139).addRange(0x213C, 0x213F).addRange(0x2145, 0x2149).addRange(0x2160, 0x2188).addRange(0x2C00, 0x2CE4).addRange(0x2CEB, 0x2CEE).addRange(0x2CF2, 0x2CF3).addRange(0x2D00, 0x2D25).addRange(0x2D30, 0x2D67).addRange(0x2D80, 0x2D96).addRange(0x2DA0, 0x2DA6).addRange(0x2DA8, 0x2DAE);\nset.addRange(0x2DB0, 0x2DB6).addRange(0x2DB8, 0x2DBE).addRange(0x2DC0, 0x2DC6).addRange(0x2DC8, 0x2DCE).addRange(0x2DD0, 0x2DD6).addRange(0x2DD8, 0x2DDE).addRange(0x3005, 0x3007).addRange(0x3021, 0x3029).addRange(0x3031, 0x3035).addRange(0x3038, 0x303C).addRange(0x3041, 0x3096).addRange(0x309D, 0x309F).addRange(0x30A1, 0x30FA).addRange(0x30FC, 0x30FF).addRange(0x3105, 0x312F).addRange(0x3131, 0x318E).addRange(0x31A0, 0x31BF).addRange(0x31F0, 0x31FF).addRange(0x3400, 0x4DBF).addRange(0x4E00, 0xA48C).addRange(0xA4D0, 0xA4FD).addRange(0xA500, 0xA60C).addRange(0xA610, 0xA61F).addRange(0xA62A, 0xA62B).addRange(0xA640, 0xA66E).addRange(0xA67F, 0xA69D).addRange(0xA6A0, 0xA6EF).addRange(0xA717, 0xA71F).addRange(0xA722, 0xA788).addRange(0xA78B, 0xA7CA).addRange(0xA7D0, 0xA7D1).addRange(0xA7D5, 0xA7D9).addRange(0xA7F2, 0xA801).addRange(0xA803, 0xA805).addRange(0xA807, 0xA80A).addRange(0xA80C, 0xA822).addRange(0xA840, 0xA873).addRange(0xA882, 0xA8B3).addRange(0xA8F2, 0xA8F7).addRange(0xA8FD, 0xA8FE).addRange(0xA90A, 0xA925).addRange(0xA930, 0xA946).addRange(0xA960, 0xA97C).addRange(0xA984, 0xA9B2).addRange(0xA9E0, 0xA9E4).addRange(0xA9E6, 0xA9EF).addRange(0xA9FA, 0xA9FE).addRange(0xAA00, 0xAA28).addRange(0xAA40, 0xAA42).addRange(0xAA44, 0xAA4B).addRange(0xAA60, 0xAA76);\nset.addRange(0xAA7E, 0xAAAF).addRange(0xAAB5, 0xAAB6).addRange(0xAAB9, 0xAABD).addRange(0xAADB, 0xAADD).addRange(0xAAE0, 0xAAEA).addRange(0xAAF2, 0xAAF4).addRange(0xAB01, 0xAB06).addRange(0xAB09, 0xAB0E).addRange(0xAB11, 0xAB16).addRange(0xAB20, 0xAB26).addRange(0xAB28, 0xAB2E).addRange(0xAB30, 0xAB5A).addRange(0xAB5C, 0xAB69).addRange(0xAB70, 0xABE2).addRange(0xAC00, 0xD7A3).addRange(0xD7B0, 0xD7C6).addRange(0xD7CB, 0xD7FB).addRange(0xF900, 0xFA6D).addRange(0xFA70, 0xFAD9).addRange(0xFB00, 0xFB06).addRange(0xFB13, 0xFB17).addRange(0xFB1F, 0xFB28).addRange(0xFB2A, 0xFB36).addRange(0xFB38, 0xFB3C).addRange(0xFB40, 0xFB41).addRange(0xFB43, 0xFB44).addRange(0xFB46, 0xFBB1).addRange(0xFBD3, 0xFC5D).addRange(0xFC64, 0xFD3D).addRange(0xFD50, 0xFD8F).addRange(0xFD92, 0xFDC7).addRange(0xFDF0, 0xFDF9).addRange(0xFE7F, 0xFEFC).addRange(0xFF21, 0xFF3A).addRange(0xFF41, 0xFF5A).addRange(0xFF66, 0xFF9D).addRange(0xFFA0, 0xFFBE).addRange(0xFFC2, 0xFFC7).addRange(0xFFCA, 0xFFCF).addRange(0xFFD2, 0xFFD7).addRange(0xFFDA, 0xFFDC).addRange(0x10000, 0x1000B).addRange(0x1000D, 0x10026).addRange(0x10028, 0x1003A).addRange(0x1003C, 0x1003D).addRange(0x1003F, 0x1004D).addRange(0x10050, 0x1005D).addRange(0x10080, 0x100FA).addRange(0x10140, 0x10174).addRange(0x10280, 0x1029C).addRange(0x102A0, 0x102D0);\nset.addRange(0x10300, 0x1031F).addRange(0x1032D, 0x1034A).addRange(0x10350, 0x10375).addRange(0x10380, 0x1039D).addRange(0x103A0, 0x103C3).addRange(0x103C8, 0x103CF).addRange(0x103D1, 0x103D5).addRange(0x10400, 0x1049D).addRange(0x104B0, 0x104D3).addRange(0x104D8, 0x104FB).addRange(0x10500, 0x10527).addRange(0x10530, 0x10563).addRange(0x10570, 0x1057A).addRange(0x1057C, 0x1058A).addRange(0x1058C, 0x10592).addRange(0x10594, 0x10595).addRange(0x10597, 0x105A1).addRange(0x105A3, 0x105B1).addRange(0x105B3, 0x105B9).addRange(0x105BB, 0x105BC).addRange(0x10600, 0x10736).addRange(0x10740, 0x10755).addRange(0x10760, 0x10767).addRange(0x10780, 0x10785).addRange(0x10787, 0x107B0).addRange(0x107B2, 0x107BA).addRange(0x10800, 0x10805).addRange(0x1080A, 0x10835).addRange(0x10837, 0x10838).addRange(0x1083F, 0x10855).addRange(0x10860, 0x10876).addRange(0x10880, 0x1089E).addRange(0x108E0, 0x108F2).addRange(0x108F4, 0x108F5).addRange(0x10900, 0x10915).addRange(0x10920, 0x10939).addRange(0x10980, 0x109B7).addRange(0x109BE, 0x109BF).addRange(0x10A10, 0x10A13).addRange(0x10A15, 0x10A17).addRange(0x10A19, 0x10A35).addRange(0x10A60, 0x10A7C).addRange(0x10A80, 0x10A9C).addRange(0x10AC0, 0x10AC7).addRange(0x10AC9, 0x10AE4).addRange(0x10B00, 0x10B35).addRange(0x10B40, 0x10B55).addRange(0x10B60, 0x10B72).addRange(0x10B80, 0x10B91).addRange(0x10C00, 0x10C48).addRange(0x10C80, 0x10CB2);\nset.addRange(0x10CC0, 0x10CF2).addRange(0x10D00, 0x10D23).addRange(0x10E80, 0x10EA9).addRange(0x10EB0, 0x10EB1).addRange(0x10F00, 0x10F1C).addRange(0x10F30, 0x10F45).addRange(0x10F70, 0x10F81).addRange(0x10FB0, 0x10FC4).addRange(0x10FE0, 0x10FF6).addRange(0x11003, 0x11037).addRange(0x11071, 0x11072).addRange(0x11083, 0x110AF).addRange(0x110D0, 0x110E8).addRange(0x11103, 0x11126).addRange(0x11150, 0x11172).addRange(0x11183, 0x111B2).addRange(0x111C1, 0x111C4).addRange(0x11200, 0x11211).addRange(0x11213, 0x1122B).addRange(0x1123F, 0x11240).addRange(0x11280, 0x11286).addRange(0x1128A, 0x1128D).addRange(0x1128F, 0x1129D).addRange(0x1129F, 0x112A8).addRange(0x112B0, 0x112DE).addRange(0x11305, 0x1130C).addRange(0x1130F, 0x11310).addRange(0x11313, 0x11328).addRange(0x1132A, 0x11330).addRange(0x11332, 0x11333).addRange(0x11335, 0x11339).addRange(0x1135D, 0x11361).addRange(0x11400, 0x11434).addRange(0x11447, 0x1144A).addRange(0x1145F, 0x11461).addRange(0x11480, 0x114AF).addRange(0x114C4, 0x114C5).addRange(0x11580, 0x115AE).addRange(0x115D8, 0x115DB).addRange(0x11600, 0x1162F).addRange(0x11680, 0x116AA).addRange(0x11700, 0x1171A).addRange(0x11740, 0x11746).addRange(0x11800, 0x1182B).addRange(0x118A0, 0x118DF).addRange(0x118FF, 0x11906).addRange(0x1190C, 0x11913).addRange(0x11915, 0x11916).addRange(0x11918, 0x1192F).addRange(0x119A0, 0x119A7).addRange(0x119AA, 0x119D0);\nset.addRange(0x11A0B, 0x11A32).addRange(0x11A5C, 0x11A89).addRange(0x11AB0, 0x11AF8).addRange(0x11C00, 0x11C08).addRange(0x11C0A, 0x11C2E).addRange(0x11C72, 0x11C8F).addRange(0x11D00, 0x11D06).addRange(0x11D08, 0x11D09).addRange(0x11D0B, 0x11D30).addRange(0x11D60, 0x11D65).addRange(0x11D67, 0x11D68).addRange(0x11D6A, 0x11D89).addRange(0x11EE0, 0x11EF2).addRange(0x11F04, 0x11F10).addRange(0x11F12, 0x11F33).addRange(0x12000, 0x12399).addRange(0x12400, 0x1246E).addRange(0x12480, 0x12543).addRange(0x12F90, 0x12FF0).addRange(0x13000, 0x1342F).addRange(0x13441, 0x13446).addRange(0x14400, 0x14646).addRange(0x16800, 0x16A38).addRange(0x16A40, 0x16A5E).addRange(0x16A70, 0x16ABE).addRange(0x16AD0, 0x16AED).addRange(0x16B00, 0x16B2F).addRange(0x16B40, 0x16B43).addRange(0x16B63, 0x16B77).addRange(0x16B7D, 0x16B8F).addRange(0x16E40, 0x16E7F).addRange(0x16F00, 0x16F4A).addRange(0x16F93, 0x16F9F).addRange(0x16FE0, 0x16FE1).addRange(0x17000, 0x187F7).addRange(0x18800, 0x18CD5).addRange(0x18D00, 0x18D08).addRange(0x1AFF0, 0x1AFF3).addRange(0x1AFF5, 0x1AFFB).addRange(0x1AFFD, 0x1AFFE).addRange(0x1B000, 0x1B122).addRange(0x1B150, 0x1B152).addRange(0x1B164, 0x1B167).addRange(0x1B170, 0x1B2FB).addRange(0x1BC00, 0x1BC6A).addRange(0x1BC70, 0x1BC7C).addRange(0x1BC80, 0x1BC88).addRange(0x1BC90, 0x1BC99).addRange(0x1D400, 0x1D454).addRange(0x1D456, 0x1D49C).addRange(0x1D49E, 0x1D49F);\nset.addRange(0x1D4A5, 0x1D4A6).addRange(0x1D4A9, 0x1D4AC).addRange(0x1D4AE, 0x1D4B9).addRange(0x1D4BD, 0x1D4C3).addRange(0x1D4C5, 0x1D505).addRange(0x1D507, 0x1D50A).addRange(0x1D50D, 0x1D514).addRange(0x1D516, 0x1D51C).addRange(0x1D51E, 0x1D539).addRange(0x1D53B, 0x1D53E).addRange(0x1D540, 0x1D544).addRange(0x1D54A, 0x1D550).addRange(0x1D552, 0x1D6A5).addRange(0x1D6A8, 0x1D6C0).addRange(0x1D6C2, 0x1D6DA).addRange(0x1D6DC, 0x1D6FA).addRange(0x1D6FC, 0x1D714).addRange(0x1D716, 0x1D734).addRange(0x1D736, 0x1D74E).addRange(0x1D750, 0x1D76E).addRange(0x1D770, 0x1D788).addRange(0x1D78A, 0x1D7A8).addRange(0x1D7AA, 0x1D7C2).addRange(0x1D7C4, 0x1D7CB).addRange(0x1DF00, 0x1DF1E).addRange(0x1DF25, 0x1DF2A).addRange(0x1E030, 0x1E06D).addRange(0x1E100, 0x1E12C).addRange(0x1E137, 0x1E13D).addRange(0x1E290, 0x1E2AD).addRange(0x1E2C0, 0x1E2EB).addRange(0x1E4D0, 0x1E4EB).addRange(0x1E7E0, 0x1E7E6).addRange(0x1E7E8, 0x1E7EB).addRange(0x1E7ED, 0x1E7EE).addRange(0x1E7F0, 0x1E7FE).addRange(0x1E800, 0x1E8C4).addRange(0x1E900, 0x1E943).addRange(0x1EE00, 0x1EE03).addRange(0x1EE05, 0x1EE1F).addRange(0x1EE21, 0x1EE22).addRange(0x1EE29, 0x1EE32).addRange(0x1EE34, 0x1EE37).addRange(0x1EE4D, 0x1EE4F).addRange(0x1EE51, 0x1EE52).addRange(0x1EE61, 0x1EE62).addRange(0x1EE67, 0x1EE6A).addRange(0x1EE6C, 0x1EE72).addRange(0x1EE74, 0x1EE77).addRange(0x1EE79, 0x1EE7C).addRange(0x1EE80, 0x1EE89);\nset.addRange(0x1EE8B, 0x1EE9B).addRange(0x1EEA1, 0x1EEA3).addRange(0x1EEA5, 0x1EEA9).addRange(0x1EEAB, 0x1EEBB).addRange(0x20000, 0x2A6DF).addRange(0x2A700, 0x2B739).addRange(0x2B740, 0x2B81D).addRange(0x2B820, 0x2CEA1).addRange(0x2CEB0, 0x2EBE0).addRange(0x2EBF0, 0x2EE5D).addRange(0x2F800, 0x2FA1D).addRange(0x30000, 0x3134A).addRange(0x31350, 0x323AF);\nexports.characters = set;\n","const set = require('regenerate')(0xB5, 0x37F, 0x386, 0x38C, 0x10C7, 0x10CD, 0x1F59, 0x1F5B, 0x1F5D, 0x1FBE, 0x2102, 0x2107, 0x2115, 0x2124, 0x2126, 0x2128, 0x2139, 0x214E, 0x2D27, 0x2D2D, 0xA7D3, 0xA7FA, 0x1D4A2, 0x1D4BB, 0x1D546);\nset.addRange(0x41, 0x5A).addRange(0x61, 0x7A).addRange(0xC0, 0xD6).addRange(0xD8, 0xF6).addRange(0xF8, 0x1BA).addRange(0x1BC, 0x1BF).addRange(0x1C4, 0x293).addRange(0x295, 0x2AF).addRange(0x370, 0x373).addRange(0x376, 0x377).addRange(0x37B, 0x37D).addRange(0x388, 0x38A).addRange(0x38E, 0x3A1).addRange(0x3A3, 0x3F5).addRange(0x3F7, 0x481).addRange(0x48A, 0x52F).addRange(0x531, 0x556).addRange(0x560, 0x588).addRange(0x10A0, 0x10C5).addRange(0x10D0, 0x10FA).addRange(0x10FD, 0x10FF).addRange(0x13A0, 0x13F5).addRange(0x13F8, 0x13FD).addRange(0x1C80, 0x1C88).addRange(0x1C90, 0x1CBA).addRange(0x1CBD, 0x1CBF).addRange(0x1D00, 0x1D2B).addRange(0x1D6B, 0x1D77).addRange(0x1D79, 0x1D9A).addRange(0x1E00, 0x1F15).addRange(0x1F18, 0x1F1D).addRange(0x1F20, 0x1F45).addRange(0x1F48, 0x1F4D).addRange(0x1F50, 0x1F57).addRange(0x1F5F, 0x1F7D).addRange(0x1F80, 0x1FB4).addRange(0x1FB6, 0x1FBC).addRange(0x1FC2, 0x1FC4).addRange(0x1FC6, 0x1FCC).addRange(0x1FD0, 0x1FD3).addRange(0x1FD6, 0x1FDB).addRange(0x1FE0, 0x1FEC).addRange(0x1FF2, 0x1FF4).addRange(0x1FF6, 0x1FFC).addRange(0x210A, 0x2113).addRange(0x2119, 0x211D).addRange(0x212A, 0x212D).addRange(0x212F, 0x2134).addRange(0x213C, 0x213F).addRange(0x2145, 0x2149).addRange(0x2183, 0x2184);\nset.addRange(0x2C00, 0x2C7B).addRange(0x2C7E, 0x2CE4).addRange(0x2CEB, 0x2CEE).addRange(0x2CF2, 0x2CF3).addRange(0x2D00, 0x2D25).addRange(0xA640, 0xA66D).addRange(0xA680, 0xA69B).addRange(0xA722, 0xA76F).addRange(0xA771, 0xA787).addRange(0xA78B, 0xA78E).addRange(0xA790, 0xA7CA).addRange(0xA7D0, 0xA7D1).addRange(0xA7D5, 0xA7D9).addRange(0xA7F5, 0xA7F6).addRange(0xAB30, 0xAB5A).addRange(0xAB60, 0xAB68).addRange(0xAB70, 0xABBF).addRange(0xFB00, 0xFB06).addRange(0xFB13, 0xFB17).addRange(0xFF21, 0xFF3A).addRange(0xFF41, 0xFF5A).addRange(0x10400, 0x1044F).addRange(0x104B0, 0x104D3).addRange(0x104D8, 0x104FB).addRange(0x10570, 0x1057A).addRange(0x1057C, 0x1058A).addRange(0x1058C, 0x10592).addRange(0x10594, 0x10595).addRange(0x10597, 0x105A1).addRange(0x105A3, 0x105B1).addRange(0x105B3, 0x105B9).addRange(0x105BB, 0x105BC).addRange(0x10C80, 0x10CB2).addRange(0x10CC0, 0x10CF2).addRange(0x118A0, 0x118DF).addRange(0x16E40, 0x16E7F).addRange(0x1D400, 0x1D454).addRange(0x1D456, 0x1D49C).addRange(0x1D49E, 0x1D49F).addRange(0x1D4A5, 0x1D4A6).addRange(0x1D4A9, 0x1D4AC).addRange(0x1D4AE, 0x1D4B9).addRange(0x1D4BD, 0x1D4C3).addRange(0x1D4C5, 0x1D505).addRange(0x1D507, 0x1D50A).addRange(0x1D50D, 0x1D514).addRange(0x1D516, 0x1D51C).addRange(0x1D51E, 0x1D539).addRange(0x1D53B, 0x1D53E).addRange(0x1D540, 0x1D544).addRange(0x1D54A, 0x1D550);\nset.addRange(0x1D552, 0x1D6A5).addRange(0x1D6A8, 0x1D6C0).addRange(0x1D6C2, 0x1D6DA).addRange(0x1D6DC, 0x1D6FA).addRange(0x1D6FC, 0x1D714).addRange(0x1D716, 0x1D734).addRange(0x1D736, 0x1D74E).addRange(0x1D750, 0x1D76E).addRange(0x1D770, 0x1D788).addRange(0x1D78A, 0x1D7A8).addRange(0x1D7AA, 0x1D7C2).addRange(0x1D7C4, 0x1D7CB).addRange(0x1DF00, 0x1DF09).addRange(0x1DF0B, 0x1DF1E).addRange(0x1DF25, 0x1DF2A).addRange(0x1E900, 0x1E943);\nexports.characters = set;\n","const set = require('regenerate')(0x29, 0x5D, 0x7D, 0xF3B, 0xF3D, 0x169C, 0x2046, 0x207E, 0x208E, 0x2309, 0x230B, 0x232A, 0x2769, 0x276B, 0x276D, 0x276F, 0x2771, 0x2773, 0x2775, 0x27C6, 0x27E7, 0x27E9, 0x27EB, 0x27ED, 0x27EF, 0x2984, 0x2986, 0x2988, 0x298A, 0x298C, 0x298E, 0x2990, 0x2992, 0x2994, 0x2996, 0x2998, 0x29D9, 0x29DB, 0x29FD, 0x2E23, 0x2E25, 0x2E27, 0x2E29, 0x2E56, 0x2E58, 0x2E5A, 0x2E5C, 0x3009, 0x300B, 0x300D, 0x300F, 0x3011, 0x3015, 0x3017, 0x3019, 0x301B, 0xFD3E, 0xFE18, 0xFE36, 0xFE38, 0xFE3A, 0xFE3C, 0xFE3E, 0xFE40, 0xFE42, 0xFE44, 0xFE48, 0xFE5A, 0xFE5C, 0xFE5E, 0xFF09, 0xFF3D, 0xFF5D, 0xFF60, 0xFF63);\nset.addRange(0x301E, 0x301F);\nexports.characters = set;\n","const set = require('regenerate')(0x5F, 0x2054, 0xFF3F);\nset.addRange(0x203F, 0x2040).addRange(0xFE33, 0xFE34).addRange(0xFE4D, 0xFE4F);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x0, 0x1F).addRange(0x7F, 0x9F);\nexports.characters = set;\n","const set = require('regenerate')(0x24, 0x58F, 0x60B, 0x9FB, 0xAF1, 0xBF9, 0xE3F, 0x17DB, 0xA838, 0xFDFC, 0xFE69, 0xFF04, 0x1E2FF, 0x1ECB0);\nset.addRange(0xA2, 0xA5).addRange(0x7FE, 0x7FF).addRange(0x9F2, 0x9F3).addRange(0x20A0, 0x20C0).addRange(0xFFE0, 0xFFE1).addRange(0xFFE5, 0xFFE6).addRange(0x11FDD, 0x11FE0);\nexports.characters = set;\n","const set = require('regenerate')(0x2D, 0x58A, 0x5BE, 0x1400, 0x1806, 0x2E17, 0x2E1A, 0x2E40, 0x2E5D, 0x301C, 0x3030, 0x30A0, 0xFE58, 0xFE63, 0xFF0D, 0x10EAD);\nset.addRange(0x2010, 0x2015).addRange(0x2E3A, 0x2E3B).addRange(0xFE31, 0xFE32);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x30, 0x39).addRange(0x660, 0x669).addRange(0x6F0, 0x6F9).addRange(0x7C0, 0x7C9).addRange(0x966, 0x96F).addRange(0x9E6, 0x9EF).addRange(0xA66, 0xA6F).addRange(0xAE6, 0xAEF).addRange(0xB66, 0xB6F).addRange(0xBE6, 0xBEF).addRange(0xC66, 0xC6F).addRange(0xCE6, 0xCEF).addRange(0xD66, 0xD6F).addRange(0xDE6, 0xDEF).addRange(0xE50, 0xE59).addRange(0xED0, 0xED9).addRange(0xF20, 0xF29).addRange(0x1040, 0x1049).addRange(0x1090, 0x1099).addRange(0x17E0, 0x17E9).addRange(0x1810, 0x1819).addRange(0x1946, 0x194F).addRange(0x19D0, 0x19D9).addRange(0x1A80, 0x1A89).addRange(0x1A90, 0x1A99).addRange(0x1B50, 0x1B59).addRange(0x1BB0, 0x1BB9).addRange(0x1C40, 0x1C49).addRange(0x1C50, 0x1C59).addRange(0xA620, 0xA629).addRange(0xA8D0, 0xA8D9).addRange(0xA900, 0xA909).addRange(0xA9D0, 0xA9D9).addRange(0xA9F0, 0xA9F9).addRange(0xAA50, 0xAA59).addRange(0xABF0, 0xABF9).addRange(0xFF10, 0xFF19).addRange(0x104A0, 0x104A9).addRange(0x10D30, 0x10D39).addRange(0x11066, 0x1106F).addRange(0x110F0, 0x110F9).addRange(0x11136, 0x1113F).addRange(0x111D0, 0x111D9).addRange(0x112F0, 0x112F9).addRange(0x11450, 0x11459).addRange(0x114D0, 0x114D9).addRange(0x11650, 0x11659).addRange(0x116C0, 0x116C9).addRange(0x11730, 0x11739).addRange(0x118E0, 0x118E9).addRange(0x11950, 0x11959);\nset.addRange(0x11C50, 0x11C59).addRange(0x11D50, 0x11D59).addRange(0x11DA0, 0x11DA9).addRange(0x11F50, 0x11F59).addRange(0x16A60, 0x16A69).addRange(0x16AC0, 0x16AC9).addRange(0x16B50, 0x16B59).addRange(0x1D7CE, 0x1D7FF).addRange(0x1E140, 0x1E149).addRange(0x1E2F0, 0x1E2F9).addRange(0x1E4F0, 0x1E4F9).addRange(0x1E950, 0x1E959).addRange(0x1FBF0, 0x1FBF9);\nexports.characters = set;\n","const set = require('regenerate')(0x1ABE);\nset.addRange(0x488, 0x489).addRange(0x20DD, 0x20E0).addRange(0x20E2, 0x20E4).addRange(0xA670, 0xA672);\nexports.characters = set;\n","const set = require('regenerate')(0xBB, 0x2019, 0x201D, 0x203A, 0x2E03, 0x2E05, 0x2E0A, 0x2E0D, 0x2E1D, 0x2E21);\n\nexports.characters = set;\n","const set = require('regenerate')(0xAD, 0x61C, 0x6DD, 0x70F, 0x8E2, 0x180E, 0xFEFF, 0x110BD, 0x110CD, 0xE0001);\nset.addRange(0x600, 0x605).addRange(0x890, 0x891).addRange(0x200B, 0x200F).addRange(0x202A, 0x202E).addRange(0x2060, 0x2064).addRange(0x2066, 0x206F).addRange(0xFFF9, 0xFFFB).addRange(0x13430, 0x1343F).addRange(0x1BCA0, 0x1BCA3).addRange(0x1D173, 0x1D17A).addRange(0xE0020, 0xE007F);\nexports.characters = set;\n","const set = require('regenerate')(0xAB, 0x2018, 0x201F, 0x2039, 0x2E02, 0x2E04, 0x2E09, 0x2E0C, 0x2E1C, 0x2E20);\nset.addRange(0x201B, 0x201C);\nexports.characters = set;\n","const set = require('regenerate')(0x3007, 0x10341, 0x1034A);\nset.addRange(0x16EE, 0x16F0).addRange(0x2160, 0x2182).addRange(0x2185, 0x2188).addRange(0x3021, 0x3029).addRange(0x3038, 0x303A).addRange(0xA6E6, 0xA6EF).addRange(0x10140, 0x10174).addRange(0x103D1, 0x103D5).addRange(0x12400, 0x1246E);\nexports.characters = set;\n","const set = require('regenerate')(0xAA, 0xB5, 0xBA, 0x2EC, 0x2EE, 0x37F, 0x386, 0x38C, 0x559, 0x6D5, 0x6FF, 0x710, 0x7B1, 0x7FA, 0x81A, 0x824, 0x828, 0x93D, 0x950, 0x9B2, 0x9BD, 0x9CE, 0x9FC, 0xA5E, 0xABD, 0xAD0, 0xAF9, 0xB3D, 0xB71, 0xB83, 0xB9C, 0xBD0, 0xC3D, 0xC5D, 0xC80, 0xCBD, 0xD3D, 0xD4E, 0xDBD, 0xE84, 0xEA5, 0xEBD, 0xEC6, 0xF00, 0x103F, 0x1061, 0x108E, 0x10C7, 0x10CD, 0x1258, 0x12C0, 0x17D7, 0x17DC, 0x18AA, 0x1AA7, 0x1CFA, 0x1F59, 0x1F5B, 0x1F5D, 0x1FBE, 0x2071, 0x207F, 0x2102, 0x2107, 0x2115, 0x2124, 0x2126, 0x2128, 0x214E, 0x2D27, 0x2D2D, 0x2D6F, 0x2E2F, 0xA7D3, 0xA8FB, 0xA9CF, 0xAA7A, 0xAAB1, 0xAAC0, 0xAAC2, 0xFB1D, 0xFB3E, 0x10808, 0x1083C, 0x10A00, 0x10F27, 0x11075, 0x11144, 0x11147, 0x11176, 0x111DA, 0x111DC, 0x11288, 0x1133D, 0x11350, 0x114C7, 0x11644, 0x116B8, 0x11909, 0x1193F, 0x11941, 0x119E1, 0x119E3, 0x11A00, 0x11A3A, 0x11A50, 0x11A9D, 0x11C40, 0x11D46, 0x11D98, 0x11F02, 0x11FB0, 0x16F50, 0x16FE3, 0x1B132, 0x1B155, 0x1D4A2, 0x1D4BB, 0x1D546, 0x1E14E, 0x1E94B, 0x1EE24, 0x1EE27, 0x1EE39, 0x1EE3B, 0x1EE42, 0x1EE47, 0x1EE49, 0x1EE4B, 0x1EE54, 0x1EE57, 0x1EE59, 0x1EE5B, 0x1EE5D, 0x1EE5F, 0x1EE64, 0x1EE7E);\nset.addRange(0x41, 0x5A).addRange(0x61, 0x7A).addRange(0xC0, 0xD6).addRange(0xD8, 0xF6).addRange(0xF8, 0x2C1).addRange(0x2C6, 0x2D1).addRange(0x2E0, 0x2E4).addRange(0x370, 0x374).addRange(0x376, 0x377).addRange(0x37A, 0x37D).addRange(0x388, 0x38A).addRange(0x38E, 0x3A1).addRange(0x3A3, 0x3F5).addRange(0x3F7, 0x481).addRange(0x48A, 0x52F).addRange(0x531, 0x556).addRange(0x560, 0x588).addRange(0x5D0, 0x5EA).addRange(0x5EF, 0x5F2).addRange(0x620, 0x64A).addRange(0x66E, 0x66F).addRange(0x671, 0x6D3).addRange(0x6E5, 0x6E6).addRange(0x6EE, 0x6EF).addRange(0x6FA, 0x6FC).addRange(0x712, 0x72F).addRange(0x74D, 0x7A5).addRange(0x7CA, 0x7EA).addRange(0x7F4, 0x7F5).addRange(0x800, 0x815).addRange(0x840, 0x858).addRange(0x860, 0x86A).addRange(0x870, 0x887).addRange(0x889, 0x88E).addRange(0x8A0, 0x8C9).addRange(0x904, 0x939).addRange(0x958, 0x961).addRange(0x971, 0x980).addRange(0x985, 0x98C).addRange(0x98F, 0x990).addRange(0x993, 0x9A8).addRange(0x9AA, 0x9B0).addRange(0x9B6, 0x9B9).addRange(0x9DC, 0x9DD).addRange(0x9DF, 0x9E1).addRange(0x9F0, 0x9F1).addRange(0xA05, 0xA0A).addRange(0xA0F, 0xA10).addRange(0xA13, 0xA28).addRange(0xA2A, 0xA30).addRange(0xA32, 0xA33);\nset.addRange(0xA35, 0xA36).addRange(0xA38, 0xA39).addRange(0xA59, 0xA5C).addRange(0xA72, 0xA74).addRange(0xA85, 0xA8D).addRange(0xA8F, 0xA91).addRange(0xA93, 0xAA8).addRange(0xAAA, 0xAB0).addRange(0xAB2, 0xAB3).addRange(0xAB5, 0xAB9).addRange(0xAE0, 0xAE1).addRange(0xB05, 0xB0C).addRange(0xB0F, 0xB10).addRange(0xB13, 0xB28).addRange(0xB2A, 0xB30).addRange(0xB32, 0xB33).addRange(0xB35, 0xB39).addRange(0xB5C, 0xB5D).addRange(0xB5F, 0xB61).addRange(0xB85, 0xB8A).addRange(0xB8E, 0xB90).addRange(0xB92, 0xB95).addRange(0xB99, 0xB9A).addRange(0xB9E, 0xB9F).addRange(0xBA3, 0xBA4).addRange(0xBA8, 0xBAA).addRange(0xBAE, 0xBB9).addRange(0xC05, 0xC0C).addRange(0xC0E, 0xC10).addRange(0xC12, 0xC28).addRange(0xC2A, 0xC39).addRange(0xC58, 0xC5A).addRange(0xC60, 0xC61).addRange(0xC85, 0xC8C).addRange(0xC8E, 0xC90).addRange(0xC92, 0xCA8).addRange(0xCAA, 0xCB3).addRange(0xCB5, 0xCB9).addRange(0xCDD, 0xCDE).addRange(0xCE0, 0xCE1).addRange(0xCF1, 0xCF2).addRange(0xD04, 0xD0C).addRange(0xD0E, 0xD10).addRange(0xD12, 0xD3A).addRange(0xD54, 0xD56).addRange(0xD5F, 0xD61).addRange(0xD7A, 0xD7F).addRange(0xD85, 0xD96).addRange(0xD9A, 0xDB1).addRange(0xDB3, 0xDBB).addRange(0xDC0, 0xDC6);\nset.addRange(0xE01, 0xE30).addRange(0xE32, 0xE33).addRange(0xE40, 0xE46).addRange(0xE81, 0xE82).addRange(0xE86, 0xE8A).addRange(0xE8C, 0xEA3).addRange(0xEA7, 0xEB0).addRange(0xEB2, 0xEB3).addRange(0xEC0, 0xEC4).addRange(0xEDC, 0xEDF).addRange(0xF40, 0xF47).addRange(0xF49, 0xF6C).addRange(0xF88, 0xF8C).addRange(0x1000, 0x102A).addRange(0x1050, 0x1055).addRange(0x105A, 0x105D).addRange(0x1065, 0x1066).addRange(0x106E, 0x1070).addRange(0x1075, 0x1081).addRange(0x10A0, 0x10C5).addRange(0x10D0, 0x10FA).addRange(0x10FC, 0x1248).addRange(0x124A, 0x124D).addRange(0x1250, 0x1256).addRange(0x125A, 0x125D).addRange(0x1260, 0x1288).addRange(0x128A, 0x128D).addRange(0x1290, 0x12B0).addRange(0x12B2, 0x12B5).addRange(0x12B8, 0x12BE).addRange(0x12C2, 0x12C5).addRange(0x12C8, 0x12D6).addRange(0x12D8, 0x1310).addRange(0x1312, 0x1315).addRange(0x1318, 0x135A).addRange(0x1380, 0x138F).addRange(0x13A0, 0x13F5).addRange(0x13F8, 0x13FD).addRange(0x1401, 0x166C).addRange(0x166F, 0x167F).addRange(0x1681, 0x169A).addRange(0x16A0, 0x16EA).addRange(0x16F1, 0x16F8).addRange(0x1700, 0x1711).addRange(0x171F, 0x1731).addRange(0x1740, 0x1751).addRange(0x1760, 0x176C).addRange(0x176E, 0x1770).addRange(0x1780, 0x17B3).addRange(0x1820, 0x1878).addRange(0x1880, 0x1884);\nset.addRange(0x1887, 0x18A8).addRange(0x18B0, 0x18F5).addRange(0x1900, 0x191E).addRange(0x1950, 0x196D).addRange(0x1970, 0x1974).addRange(0x1980, 0x19AB).addRange(0x19B0, 0x19C9).addRange(0x1A00, 0x1A16).addRange(0x1A20, 0x1A54).addRange(0x1B05, 0x1B33).addRange(0x1B45, 0x1B4C).addRange(0x1B83, 0x1BA0).addRange(0x1BAE, 0x1BAF).addRange(0x1BBA, 0x1BE5).addRange(0x1C00, 0x1C23).addRange(0x1C4D, 0x1C4F).addRange(0x1C5A, 0x1C7D).addRange(0x1C80, 0x1C88).addRange(0x1C90, 0x1CBA).addRange(0x1CBD, 0x1CBF).addRange(0x1CE9, 0x1CEC).addRange(0x1CEE, 0x1CF3).addRange(0x1CF5, 0x1CF6).addRange(0x1D00, 0x1DBF).addRange(0x1E00, 0x1F15).addRange(0x1F18, 0x1F1D).addRange(0x1F20, 0x1F45).addRange(0x1F48, 0x1F4D).addRange(0x1F50, 0x1F57).addRange(0x1F5F, 0x1F7D).addRange(0x1F80, 0x1FB4).addRange(0x1FB6, 0x1FBC).addRange(0x1FC2, 0x1FC4).addRange(0x1FC6, 0x1FCC).addRange(0x1FD0, 0x1FD3).addRange(0x1FD6, 0x1FDB).addRange(0x1FE0, 0x1FEC).addRange(0x1FF2, 0x1FF4).addRange(0x1FF6, 0x1FFC).addRange(0x2090, 0x209C).addRange(0x210A, 0x2113).addRange(0x2119, 0x211D).addRange(0x212A, 0x212D).addRange(0x212F, 0x2139).addRange(0x213C, 0x213F).addRange(0x2145, 0x2149).addRange(0x2183, 0x2184).addRange(0x2C00, 0x2CE4).addRange(0x2CEB, 0x2CEE).addRange(0x2CF2, 0x2CF3).addRange(0x2D00, 0x2D25);\nset.addRange(0x2D30, 0x2D67).addRange(0x2D80, 0x2D96).addRange(0x2DA0, 0x2DA6).addRange(0x2DA8, 0x2DAE).addRange(0x2DB0, 0x2DB6).addRange(0x2DB8, 0x2DBE).addRange(0x2DC0, 0x2DC6).addRange(0x2DC8, 0x2DCE).addRange(0x2DD0, 0x2DD6).addRange(0x2DD8, 0x2DDE).addRange(0x3005, 0x3006).addRange(0x3031, 0x3035).addRange(0x303B, 0x303C).addRange(0x3041, 0x3096).addRange(0x309D, 0x309F).addRange(0x30A1, 0x30FA).addRange(0x30FC, 0x30FF).addRange(0x3105, 0x312F).addRange(0x3131, 0x318E).addRange(0x31A0, 0x31BF).addRange(0x31F0, 0x31FF).addRange(0x3400, 0x4DBF).addRange(0x4E00, 0xA48C).addRange(0xA4D0, 0xA4FD).addRange(0xA500, 0xA60C).addRange(0xA610, 0xA61F).addRange(0xA62A, 0xA62B).addRange(0xA640, 0xA66E).addRange(0xA67F, 0xA69D).addRange(0xA6A0, 0xA6E5).addRange(0xA717, 0xA71F).addRange(0xA722, 0xA788).addRange(0xA78B, 0xA7CA).addRange(0xA7D0, 0xA7D1).addRange(0xA7D5, 0xA7D9).addRange(0xA7F2, 0xA801).addRange(0xA803, 0xA805).addRange(0xA807, 0xA80A).addRange(0xA80C, 0xA822).addRange(0xA840, 0xA873).addRange(0xA882, 0xA8B3).addRange(0xA8F2, 0xA8F7).addRange(0xA8FD, 0xA8FE).addRange(0xA90A, 0xA925).addRange(0xA930, 0xA946).addRange(0xA960, 0xA97C).addRange(0xA984, 0xA9B2).addRange(0xA9E0, 0xA9E4).addRange(0xA9E6, 0xA9EF).addRange(0xA9FA, 0xA9FE).addRange(0xAA00, 0xAA28);\nset.addRange(0xAA40, 0xAA42).addRange(0xAA44, 0xAA4B).addRange(0xAA60, 0xAA76).addRange(0xAA7E, 0xAAAF).addRange(0xAAB5, 0xAAB6).addRange(0xAAB9, 0xAABD).addRange(0xAADB, 0xAADD).addRange(0xAAE0, 0xAAEA).addRange(0xAAF2, 0xAAF4).addRange(0xAB01, 0xAB06).addRange(0xAB09, 0xAB0E).addRange(0xAB11, 0xAB16).addRange(0xAB20, 0xAB26).addRange(0xAB28, 0xAB2E).addRange(0xAB30, 0xAB5A).addRange(0xAB5C, 0xAB69).addRange(0xAB70, 0xABE2).addRange(0xAC00, 0xD7A3).addRange(0xD7B0, 0xD7C6).addRange(0xD7CB, 0xD7FB).addRange(0xF900, 0xFA6D).addRange(0xFA70, 0xFAD9).addRange(0xFB00, 0xFB06).addRange(0xFB13, 0xFB17).addRange(0xFB1F, 0xFB28).addRange(0xFB2A, 0xFB36).addRange(0xFB38, 0xFB3C).addRange(0xFB40, 0xFB41).addRange(0xFB43, 0xFB44).addRange(0xFB46, 0xFBB1).addRange(0xFBD3, 0xFD3D).addRange(0xFD50, 0xFD8F).addRange(0xFD92, 0xFDC7).addRange(0xFDF0, 0xFDFB).addRange(0xFE70, 0xFE74).addRange(0xFE76, 0xFEFC).addRange(0xFF21, 0xFF3A).addRange(0xFF41, 0xFF5A).addRange(0xFF66, 0xFFBE).addRange(0xFFC2, 0xFFC7).addRange(0xFFCA, 0xFFCF).addRange(0xFFD2, 0xFFD7).addRange(0xFFDA, 0xFFDC).addRange(0x10000, 0x1000B).addRange(0x1000D, 0x10026).addRange(0x10028, 0x1003A).addRange(0x1003C, 0x1003D).addRange(0x1003F, 0x1004D).addRange(0x10050, 0x1005D).addRange(0x10080, 0x100FA).addRange(0x10280, 0x1029C);\nset.addRange(0x102A0, 0x102D0).addRange(0x10300, 0x1031F).addRange(0x1032D, 0x10340).addRange(0x10342, 0x10349).addRange(0x10350, 0x10375).addRange(0x10380, 0x1039D).addRange(0x103A0, 0x103C3).addRange(0x103C8, 0x103CF).addRange(0x10400, 0x1049D).addRange(0x104B0, 0x104D3).addRange(0x104D8, 0x104FB).addRange(0x10500, 0x10527).addRange(0x10530, 0x10563).addRange(0x10570, 0x1057A).addRange(0x1057C, 0x1058A).addRange(0x1058C, 0x10592).addRange(0x10594, 0x10595).addRange(0x10597, 0x105A1).addRange(0x105A3, 0x105B1).addRange(0x105B3, 0x105B9).addRange(0x105BB, 0x105BC).addRange(0x10600, 0x10736).addRange(0x10740, 0x10755).addRange(0x10760, 0x10767).addRange(0x10780, 0x10785).addRange(0x10787, 0x107B0).addRange(0x107B2, 0x107BA).addRange(0x10800, 0x10805).addRange(0x1080A, 0x10835).addRange(0x10837, 0x10838).addRange(0x1083F, 0x10855).addRange(0x10860, 0x10876).addRange(0x10880, 0x1089E).addRange(0x108E0, 0x108F2).addRange(0x108F4, 0x108F5).addRange(0x10900, 0x10915).addRange(0x10920, 0x10939).addRange(0x10980, 0x109B7).addRange(0x109BE, 0x109BF).addRange(0x10A10, 0x10A13).addRange(0x10A15, 0x10A17).addRange(0x10A19, 0x10A35).addRange(0x10A60, 0x10A7C).addRange(0x10A80, 0x10A9C).addRange(0x10AC0, 0x10AC7).addRange(0x10AC9, 0x10AE4).addRange(0x10B00, 0x10B35).addRange(0x10B40, 0x10B55).addRange(0x10B60, 0x10B72).addRange(0x10B80, 0x10B91).addRange(0x10C00, 0x10C48);\nset.addRange(0x10C80, 0x10CB2).addRange(0x10CC0, 0x10CF2).addRange(0x10D00, 0x10D23).addRange(0x10E80, 0x10EA9).addRange(0x10EB0, 0x10EB1).addRange(0x10F00, 0x10F1C).addRange(0x10F30, 0x10F45).addRange(0x10F70, 0x10F81).addRange(0x10FB0, 0x10FC4).addRange(0x10FE0, 0x10FF6).addRange(0x11003, 0x11037).addRange(0x11071, 0x11072).addRange(0x11083, 0x110AF).addRange(0x110D0, 0x110E8).addRange(0x11103, 0x11126).addRange(0x11150, 0x11172).addRange(0x11183, 0x111B2).addRange(0x111C1, 0x111C4).addRange(0x11200, 0x11211).addRange(0x11213, 0x1122B).addRange(0x1123F, 0x11240).addRange(0x11280, 0x11286).addRange(0x1128A, 0x1128D).addRange(0x1128F, 0x1129D).addRange(0x1129F, 0x112A8).addRange(0x112B0, 0x112DE).addRange(0x11305, 0x1130C).addRange(0x1130F, 0x11310).addRange(0x11313, 0x11328).addRange(0x1132A, 0x11330).addRange(0x11332, 0x11333).addRange(0x11335, 0x11339).addRange(0x1135D, 0x11361).addRange(0x11400, 0x11434).addRange(0x11447, 0x1144A).addRange(0x1145F, 0x11461).addRange(0x11480, 0x114AF).addRange(0x114C4, 0x114C5).addRange(0x11580, 0x115AE).addRange(0x115D8, 0x115DB).addRange(0x11600, 0x1162F).addRange(0x11680, 0x116AA).addRange(0x11700, 0x1171A).addRange(0x11740, 0x11746).addRange(0x11800, 0x1182B).addRange(0x118A0, 0x118DF).addRange(0x118FF, 0x11906).addRange(0x1190C, 0x11913).addRange(0x11915, 0x11916).addRange(0x11918, 0x1192F).addRange(0x119A0, 0x119A7);\nset.addRange(0x119AA, 0x119D0).addRange(0x11A0B, 0x11A32).addRange(0x11A5C, 0x11A89).addRange(0x11AB0, 0x11AF8).addRange(0x11C00, 0x11C08).addRange(0x11C0A, 0x11C2E).addRange(0x11C72, 0x11C8F).addRange(0x11D00, 0x11D06).addRange(0x11D08, 0x11D09).addRange(0x11D0B, 0x11D30).addRange(0x11D60, 0x11D65).addRange(0x11D67, 0x11D68).addRange(0x11D6A, 0x11D89).addRange(0x11EE0, 0x11EF2).addRange(0x11F04, 0x11F10).addRange(0x11F12, 0x11F33).addRange(0x12000, 0x12399).addRange(0x12480, 0x12543).addRange(0x12F90, 0x12FF0).addRange(0x13000, 0x1342F).addRange(0x13441, 0x13446).addRange(0x14400, 0x14646).addRange(0x16800, 0x16A38).addRange(0x16A40, 0x16A5E).addRange(0x16A70, 0x16ABE).addRange(0x16AD0, 0x16AED).addRange(0x16B00, 0x16B2F).addRange(0x16B40, 0x16B43).addRange(0x16B63, 0x16B77).addRange(0x16B7D, 0x16B8F).addRange(0x16E40, 0x16E7F).addRange(0x16F00, 0x16F4A).addRange(0x16F93, 0x16F9F).addRange(0x16FE0, 0x16FE1).addRange(0x17000, 0x187F7).addRange(0x18800, 0x18CD5).addRange(0x18D00, 0x18D08).addRange(0x1AFF0, 0x1AFF3).addRange(0x1AFF5, 0x1AFFB).addRange(0x1AFFD, 0x1AFFE).addRange(0x1B000, 0x1B122).addRange(0x1B150, 0x1B152).addRange(0x1B164, 0x1B167).addRange(0x1B170, 0x1B2FB).addRange(0x1BC00, 0x1BC6A).addRange(0x1BC70, 0x1BC7C).addRange(0x1BC80, 0x1BC88).addRange(0x1BC90, 0x1BC99).addRange(0x1D400, 0x1D454).addRange(0x1D456, 0x1D49C).addRange(0x1D49E, 0x1D49F);\nset.addRange(0x1D4A5, 0x1D4A6).addRange(0x1D4A9, 0x1D4AC).addRange(0x1D4AE, 0x1D4B9).addRange(0x1D4BD, 0x1D4C3).addRange(0x1D4C5, 0x1D505).addRange(0x1D507, 0x1D50A).addRange(0x1D50D, 0x1D514).addRange(0x1D516, 0x1D51C).addRange(0x1D51E, 0x1D539).addRange(0x1D53B, 0x1D53E).addRange(0x1D540, 0x1D544).addRange(0x1D54A, 0x1D550).addRange(0x1D552, 0x1D6A5).addRange(0x1D6A8, 0x1D6C0).addRange(0x1D6C2, 0x1D6DA).addRange(0x1D6DC, 0x1D6FA).addRange(0x1D6FC, 0x1D714).addRange(0x1D716, 0x1D734).addRange(0x1D736, 0x1D74E).addRange(0x1D750, 0x1D76E).addRange(0x1D770, 0x1D788).addRange(0x1D78A, 0x1D7A8).addRange(0x1D7AA, 0x1D7C2).addRange(0x1D7C4, 0x1D7CB).addRange(0x1DF00, 0x1DF1E).addRange(0x1DF25, 0x1DF2A).addRange(0x1E030, 0x1E06D).addRange(0x1E100, 0x1E12C).addRange(0x1E137, 0x1E13D).addRange(0x1E290, 0x1E2AD).addRange(0x1E2C0, 0x1E2EB).addRange(0x1E4D0, 0x1E4EB).addRange(0x1E7E0, 0x1E7E6).addRange(0x1E7E8, 0x1E7EB).addRange(0x1E7ED, 0x1E7EE).addRange(0x1E7F0, 0x1E7FE).addRange(0x1E800, 0x1E8C4).addRange(0x1E900, 0x1E943).addRange(0x1EE00, 0x1EE03).addRange(0x1EE05, 0x1EE1F).addRange(0x1EE21, 0x1EE22).addRange(0x1EE29, 0x1EE32).addRange(0x1EE34, 0x1EE37).addRange(0x1EE4D, 0x1EE4F).addRange(0x1EE51, 0x1EE52).addRange(0x1EE61, 0x1EE62).addRange(0x1EE67, 0x1EE6A).addRange(0x1EE6C, 0x1EE72).addRange(0x1EE74, 0x1EE77).addRange(0x1EE79, 0x1EE7C).addRange(0x1EE80, 0x1EE89);\nset.addRange(0x1EE8B, 0x1EE9B).addRange(0x1EEA1, 0x1EEA3).addRange(0x1EEA5, 0x1EEA9).addRange(0x1EEAB, 0x1EEBB).addRange(0x20000, 0x2A6DF).addRange(0x2A700, 0x2B739).addRange(0x2B740, 0x2B81D).addRange(0x2B820, 0x2CEA1).addRange(0x2CEB0, 0x2EBE0).addRange(0x2EBF0, 0x2EE5D).addRange(0x2F800, 0x2FA1D).addRange(0x30000, 0x3134A).addRange(0x31350, 0x323AF);\nexports.characters = set;\n","const set = require('regenerate')(0x2028);\n\nexports.characters = set;\n","const set = require('regenerate')(0xB5, 0x101, 0x103, 0x105, 0x107, 0x109, 0x10B, 0x10D, 0x10F, 0x111, 0x113, 0x115, 0x117, 0x119, 0x11B, 0x11D, 0x11F, 0x121, 0x123, 0x125, 0x127, 0x129, 0x12B, 0x12D, 0x12F, 0x131, 0x133, 0x135, 0x13A, 0x13C, 0x13E, 0x140, 0x142, 0x144, 0x146, 0x14B, 0x14D, 0x14F, 0x151, 0x153, 0x155, 0x157, 0x159, 0x15B, 0x15D, 0x15F, 0x161, 0x163, 0x165, 0x167, 0x169, 0x16B, 0x16D, 0x16F, 0x171, 0x173, 0x175, 0x177, 0x17A, 0x17C, 0x183, 0x185, 0x188, 0x192, 0x195, 0x19E, 0x1A1, 0x1A3, 0x1A5, 0x1A8, 0x1AD, 0x1B0, 0x1B4, 0x1B6, 0x1C6, 0x1C9, 0x1CC, 0x1CE, 0x1D0, 0x1D2, 0x1D4, 0x1D6, 0x1D8, 0x1DA, 0x1DF, 0x1E1, 0x1E3, 0x1E5, 0x1E7, 0x1E9, 0x1EB, 0x1ED, 0x1F3, 0x1F5, 0x1F9, 0x1FB, 0x1FD, 0x1FF, 0x201, 0x203, 0x205, 0x207, 0x209, 0x20B, 0x20D, 0x20F, 0x211, 0x213, 0x215, 0x217, 0x219, 0x21B, 0x21D, 0x21F, 0x221, 0x223, 0x225, 0x227, 0x229, 0x22B, 0x22D, 0x22F, 0x231, 0x23C, 0x242, 0x247, 0x249, 0x24B, 0x24D, 0x371, 0x373, 0x377, 0x390, 0x3D9, 0x3DB, 0x3DD, 0x3DF, 0x3E1, 0x3E3, 0x3E5, 0x3E7, 0x3E9, 0x3EB, 0x3ED, 0x3F5, 0x3F8, 0x461, 0x463, 0x465, 0x467, 0x469, 0x46B, 0x46D, 0x46F, 0x471, 0x473, 0x475, 0x477, 0x479, 0x47B, 0x47D, 0x47F, 0x481, 0x48B, 0x48D, 0x48F, 0x491, 0x493, 0x495, 0x497, 0x499, 0x49B, 0x49D, 0x49F, 0x4A1, 0x4A3, 0x4A5, 0x4A7, 0x4A9, 0x4AB, 0x4AD, 0x4AF, 0x4B1, 0x4B3, 0x4B5, 0x4B7, 0x4B9, 0x4BB, 0x4BD, 0x4BF, 0x4C2, 0x4C4, 0x4C6, 0x4C8, 0x4CA, 0x4CC, 0x4D1, 0x4D3, 0x4D5, 0x4D7, 0x4D9, 0x4DB, 0x4DD, 0x4DF, 0x4E1, 0x4E3, 0x4E5, 0x4E7, 0x4E9, 0x4EB, 0x4ED, 0x4EF, 0x4F1, 0x4F3, 0x4F5, 0x4F7, 0x4F9, 0x4FB, 0x4FD, 0x4FF, 0x501, 0x503, 0x505, 0x507, 0x509, 0x50B, 0x50D, 0x50F, 0x511, 0x513, 0x515, 0x517, 0x519, 0x51B, 0x51D, 0x51F, 0x521, 0x523, 0x525, 0x527, 0x529, 0x52B, 0x52D, 0x52F, 0x1E01, 0x1E03, 0x1E05, 0x1E07, 0x1E09, 0x1E0B, 0x1E0D, 0x1E0F, 0x1E11, 0x1E13, 0x1E15, 0x1E17, 0x1E19, 0x1E1B, 0x1E1D, 0x1E1F, 0x1E21, 0x1E23, 0x1E25, 0x1E27, 0x1E29, 0x1E2B, 0x1E2D, 0x1E2F, 0x1E31, 0x1E33, 0x1E35, 0x1E37, 0x1E39, 0x1E3B, 0x1E3D, 0x1E3F, 0x1E41, 0x1E43, 0x1E45, 0x1E47, 0x1E49, 0x1E4B, 0x1E4D, 0x1E4F, 0x1E51, 0x1E53, 0x1E55, 0x1E57, 0x1E59, 0x1E5B, 0x1E5D, 0x1E5F, 0x1E61, 0x1E63, 0x1E65, 0x1E67, 0x1E69, 0x1E6B, 0x1E6D, 0x1E6F, 0x1E71, 0x1E73, 0x1E75, 0x1E77, 0x1E79, 0x1E7B, 0x1E7D, 0x1E7F, 0x1E81, 0x1E83, 0x1E85, 0x1E87, 0x1E89, 0x1E8B, 0x1E8D, 0x1E8F, 0x1E91, 0x1E93, 0x1E9F, 0x1EA1, 0x1EA3, 0x1EA5, 0x1EA7, 0x1EA9, 0x1EAB, 0x1EAD, 0x1EAF, 0x1EB1, 0x1EB3, 0x1EB5, 0x1EB7, 0x1EB9, 0x1EBB, 0x1EBD, 0x1EBF, 0x1EC1, 0x1EC3, 0x1EC5, 0x1EC7, 0x1EC9, 0x1ECB, 0x1ECD, 0x1ECF, 0x1ED1, 0x1ED3, 0x1ED5, 0x1ED7, 0x1ED9, 0x1EDB, 0x1EDD, 0x1EDF, 0x1EE1, 0x1EE3, 0x1EE5, 0x1EE7, 0x1EE9, 0x1EEB, 0x1EED, 0x1EEF, 0x1EF1, 0x1EF3, 0x1EF5, 0x1EF7, 0x1EF9, 0x1EFB, 0x1EFD, 0x1FBE, 0x210A, 0x2113, 0x212F, 0x2134, 0x2139, 0x214E, 0x2184, 0x2C61, 0x2C68, 0x2C6A, 0x2C6C, 0x2C71, 0x2C81, 0x2C83, 0x2C85, 0x2C87, 0x2C89, 0x2C8B, 0x2C8D, 0x2C8F, 0x2C91, 0x2C93, 0x2C95, 0x2C97, 0x2C99, 0x2C9B, 0x2C9D, 0x2C9F, 0x2CA1, 0x2CA3, 0x2CA5, 0x2CA7, 0x2CA9, 0x2CAB, 0x2CAD, 0x2CAF, 0x2CB1, 0x2CB3, 0x2CB5, 0x2CB7, 0x2CB9, 0x2CBB, 0x2CBD, 0x2CBF, 0x2CC1, 0x2CC3, 0x2CC5, 0x2CC7, 0x2CC9, 0x2CCB, 0x2CCD, 0x2CCF, 0x2CD1, 0x2CD3, 0x2CD5, 0x2CD7, 0x2CD9, 0x2CDB, 0x2CDD, 0x2CDF, 0x2CE1, 0x2CEC, 0x2CEE, 0x2CF3, 0x2D27, 0x2D2D, 0xA641, 0xA643, 0xA645, 0xA647, 0xA649, 0xA64B, 0xA64D, 0xA64F, 0xA651, 0xA653, 0xA655, 0xA657, 0xA659, 0xA65B, 0xA65D, 0xA65F, 0xA661, 0xA663, 0xA665, 0xA667, 0xA669, 0xA66B, 0xA66D, 0xA681, 0xA683, 0xA685, 0xA687, 0xA689, 0xA68B, 0xA68D, 0xA68F, 0xA691, 0xA693, 0xA695, 0xA697, 0xA699, 0xA69B, 0xA723, 0xA725, 0xA727, 0xA729, 0xA72B, 0xA72D, 0xA733, 0xA735, 0xA737, 0xA739, 0xA73B, 0xA73D, 0xA73F, 0xA741, 0xA743, 0xA745, 0xA747, 0xA749, 0xA74B, 0xA74D, 0xA74F, 0xA751, 0xA753, 0xA755, 0xA757, 0xA759, 0xA75B, 0xA75D, 0xA75F, 0xA761, 0xA763, 0xA765, 0xA767, 0xA769, 0xA76B, 0xA76D, 0xA76F, 0xA77A, 0xA77C, 0xA77F, 0xA781, 0xA783, 0xA785, 0xA787, 0xA78C, 0xA78E, 0xA791, 0xA797, 0xA799, 0xA79B, 0xA79D, 0xA79F, 0xA7A1, 0xA7A3, 0xA7A5, 0xA7A7, 0xA7A9, 0xA7AF, 0xA7B5, 0xA7B7, 0xA7B9, 0xA7BB, 0xA7BD, 0xA7BF, 0xA7C1, 0xA7C3, 0xA7C8, 0xA7CA, 0xA7D1, 0xA7D3, 0xA7D5, 0xA7D7, 0xA7D9, 0xA7F6, 0xA7FA, 0x1D4BB, 0x1D7CB);\nset.addRange(0x61, 0x7A).addRange(0xDF, 0xF6).addRange(0xF8, 0xFF).addRange(0x137, 0x138).addRange(0x148, 0x149).addRange(0x17E, 0x180).addRange(0x18C, 0x18D).addRange(0x199, 0x19B).addRange(0x1AA, 0x1AB).addRange(0x1B9, 0x1BA).addRange(0x1BD, 0x1BF).addRange(0x1DC, 0x1DD).addRange(0x1EF, 0x1F0).addRange(0x233, 0x239).addRange(0x23F, 0x240).addRange(0x24F, 0x293).addRange(0x295, 0x2AF).addRange(0x37B, 0x37D).addRange(0x3AC, 0x3CE).addRange(0x3D0, 0x3D1).addRange(0x3D5, 0x3D7).addRange(0x3EF, 0x3F3).addRange(0x3FB, 0x3FC).addRange(0x430, 0x45F).addRange(0x4CE, 0x4CF).addRange(0x560, 0x588).addRange(0x10D0, 0x10FA).addRange(0x10FD, 0x10FF).addRange(0x13F8, 0x13FD).addRange(0x1C80, 0x1C88).addRange(0x1D00, 0x1D2B).addRange(0x1D6B, 0x1D77).addRange(0x1D79, 0x1D9A).addRange(0x1E95, 0x1E9D).addRange(0x1EFF, 0x1F07).addRange(0x1F10, 0x1F15).addRange(0x1F20, 0x1F27).addRange(0x1F30, 0x1F37).addRange(0x1F40, 0x1F45).addRange(0x1F50, 0x1F57).addRange(0x1F60, 0x1F67).addRange(0x1F70, 0x1F7D).addRange(0x1F80, 0x1F87).addRange(0x1F90, 0x1F97).addRange(0x1FA0, 0x1FA7).addRange(0x1FB0, 0x1FB4).addRange(0x1FB6, 0x1FB7).addRange(0x1FC2, 0x1FC4).addRange(0x1FC6, 0x1FC7).addRange(0x1FD0, 0x1FD3).addRange(0x1FD6, 0x1FD7);\nset.addRange(0x1FE0, 0x1FE7).addRange(0x1FF2, 0x1FF4).addRange(0x1FF6, 0x1FF7).addRange(0x210E, 0x210F).addRange(0x213C, 0x213D).addRange(0x2146, 0x2149).addRange(0x2C30, 0x2C5F).addRange(0x2C65, 0x2C66).addRange(0x2C73, 0x2C74).addRange(0x2C76, 0x2C7B).addRange(0x2CE3, 0x2CE4).addRange(0x2D00, 0x2D25).addRange(0xA72F, 0xA731).addRange(0xA771, 0xA778).addRange(0xA793, 0xA795).addRange(0xAB30, 0xAB5A).addRange(0xAB60, 0xAB68).addRange(0xAB70, 0xABBF).addRange(0xFB00, 0xFB06).addRange(0xFB13, 0xFB17).addRange(0xFF41, 0xFF5A).addRange(0x10428, 0x1044F).addRange(0x104D8, 0x104FB).addRange(0x10597, 0x105A1).addRange(0x105A3, 0x105B1).addRange(0x105B3, 0x105B9).addRange(0x105BB, 0x105BC).addRange(0x10CC0, 0x10CF2).addRange(0x118C0, 0x118DF).addRange(0x16E60, 0x16E7F).addRange(0x1D41A, 0x1D433).addRange(0x1D44E, 0x1D454).addRange(0x1D456, 0x1D467).addRange(0x1D482, 0x1D49B).addRange(0x1D4B6, 0x1D4B9).addRange(0x1D4BD, 0x1D4C3).addRange(0x1D4C5, 0x1D4CF).addRange(0x1D4EA, 0x1D503).addRange(0x1D51E, 0x1D537).addRange(0x1D552, 0x1D56B).addRange(0x1D586, 0x1D59F).addRange(0x1D5BA, 0x1D5D3).addRange(0x1D5EE, 0x1D607).addRange(0x1D622, 0x1D63B).addRange(0x1D656, 0x1D66F).addRange(0x1D68A, 0x1D6A5).addRange(0x1D6C2, 0x1D6DA).addRange(0x1D6DC, 0x1D6E1).addRange(0x1D6FC, 0x1D714).addRange(0x1D716, 0x1D71B).addRange(0x1D736, 0x1D74E);\nset.addRange(0x1D750, 0x1D755).addRange(0x1D770, 0x1D788).addRange(0x1D78A, 0x1D78F).addRange(0x1D7AA, 0x1D7C2).addRange(0x1D7C4, 0x1D7C9).addRange(0x1DF00, 0x1DF09).addRange(0x1DF0B, 0x1DF1E).addRange(0x1DF25, 0x1DF2A).addRange(0x1E922, 0x1E943);\nexports.characters = set;\n","const set = require('regenerate')(0x5BF, 0x5C7, 0x670, 0x711, 0x7FD, 0x9BC, 0x9D7, 0x9FE, 0xA3C, 0xA51, 0xA75, 0xABC, 0xB3C, 0xB82, 0xBD7, 0xC3C, 0xCBC, 0xCF3, 0xD57, 0xDCA, 0xDD6, 0xE31, 0xEB1, 0xF35, 0xF37, 0xF39, 0xFC6, 0x108F, 0x17DD, 0x180F, 0x18A9, 0x1A7F, 0x1CED, 0x1CF4, 0x2D7F, 0xA802, 0xA806, 0xA80B, 0xA82C, 0xA8FF, 0xA9E5, 0xAA43, 0xAAB0, 0xAAC1, 0xFB1E, 0x101FD, 0x102E0, 0x10A3F, 0x11070, 0x110C2, 0x11173, 0x1123E, 0x11241, 0x11357, 0x1145E, 0x11940, 0x119E4, 0x11A47, 0x11D3A, 0x11D47, 0x11F03, 0x13440, 0x16F4F, 0x16FE4, 0x1DA75, 0x1DA84, 0x1E08F, 0x1E2AE);\nset.addRange(0x300, 0x36F).addRange(0x483, 0x489).addRange(0x591, 0x5BD).addRange(0x5C1, 0x5C2).addRange(0x5C4, 0x5C5).addRange(0x610, 0x61A).addRange(0x64B, 0x65F).addRange(0x6D6, 0x6DC).addRange(0x6DF, 0x6E4).addRange(0x6E7, 0x6E8).addRange(0x6EA, 0x6ED).addRange(0x730, 0x74A).addRange(0x7A6, 0x7B0).addRange(0x7EB, 0x7F3).addRange(0x816, 0x819).addRange(0x81B, 0x823).addRange(0x825, 0x827).addRange(0x829, 0x82D).addRange(0x859, 0x85B).addRange(0x898, 0x89F).addRange(0x8CA, 0x8E1).addRange(0x8E3, 0x903).addRange(0x93A, 0x93C).addRange(0x93E, 0x94F).addRange(0x951, 0x957).addRange(0x962, 0x963).addRange(0x981, 0x983).addRange(0x9BE, 0x9C4).addRange(0x9C7, 0x9C8).addRange(0x9CB, 0x9CD).addRange(0x9E2, 0x9E3).addRange(0xA01, 0xA03).addRange(0xA3E, 0xA42).addRange(0xA47, 0xA48).addRange(0xA4B, 0xA4D).addRange(0xA70, 0xA71).addRange(0xA81, 0xA83).addRange(0xABE, 0xAC5).addRange(0xAC7, 0xAC9).addRange(0xACB, 0xACD).addRange(0xAE2, 0xAE3).addRange(0xAFA, 0xAFF).addRange(0xB01, 0xB03).addRange(0xB3E, 0xB44).addRange(0xB47, 0xB48).addRange(0xB4B, 0xB4D).addRange(0xB55, 0xB57).addRange(0xB62, 0xB63).addRange(0xBBE, 0xBC2).addRange(0xBC6, 0xBC8).addRange(0xBCA, 0xBCD);\nset.addRange(0xC00, 0xC04).addRange(0xC3E, 0xC44).addRange(0xC46, 0xC48).addRange(0xC4A, 0xC4D).addRange(0xC55, 0xC56).addRange(0xC62, 0xC63).addRange(0xC81, 0xC83).addRange(0xCBE, 0xCC4).addRange(0xCC6, 0xCC8).addRange(0xCCA, 0xCCD).addRange(0xCD5, 0xCD6).addRange(0xCE2, 0xCE3).addRange(0xD00, 0xD03).addRange(0xD3B, 0xD3C).addRange(0xD3E, 0xD44).addRange(0xD46, 0xD48).addRange(0xD4A, 0xD4D).addRange(0xD62, 0xD63).addRange(0xD81, 0xD83).addRange(0xDCF, 0xDD4).addRange(0xDD8, 0xDDF).addRange(0xDF2, 0xDF3).addRange(0xE34, 0xE3A).addRange(0xE47, 0xE4E).addRange(0xEB4, 0xEBC).addRange(0xEC8, 0xECE).addRange(0xF18, 0xF19).addRange(0xF3E, 0xF3F).addRange(0xF71, 0xF84).addRange(0xF86, 0xF87).addRange(0xF8D, 0xF97).addRange(0xF99, 0xFBC).addRange(0x102B, 0x103E).addRange(0x1056, 0x1059).addRange(0x105E, 0x1060).addRange(0x1062, 0x1064).addRange(0x1067, 0x106D).addRange(0x1071, 0x1074).addRange(0x1082, 0x108D).addRange(0x109A, 0x109D).addRange(0x135D, 0x135F).addRange(0x1712, 0x1715).addRange(0x1732, 0x1734).addRange(0x1752, 0x1753).addRange(0x1772, 0x1773).addRange(0x17B4, 0x17D3).addRange(0x180B, 0x180D).addRange(0x1885, 0x1886).addRange(0x1920, 0x192B).addRange(0x1930, 0x193B).addRange(0x1A17, 0x1A1B);\nset.addRange(0x1A55, 0x1A5E).addRange(0x1A60, 0x1A7C).addRange(0x1AB0, 0x1ACE).addRange(0x1B00, 0x1B04).addRange(0x1B34, 0x1B44).addRange(0x1B6B, 0x1B73).addRange(0x1B80, 0x1B82).addRange(0x1BA1, 0x1BAD).addRange(0x1BE6, 0x1BF3).addRange(0x1C24, 0x1C37).addRange(0x1CD0, 0x1CD2).addRange(0x1CD4, 0x1CE8).addRange(0x1CF7, 0x1CF9).addRange(0x1DC0, 0x1DFF).addRange(0x20D0, 0x20F0).addRange(0x2CEF, 0x2CF1).addRange(0x2DE0, 0x2DFF).addRange(0x302A, 0x302F).addRange(0x3099, 0x309A).addRange(0xA66F, 0xA672).addRange(0xA674, 0xA67D).addRange(0xA69E, 0xA69F).addRange(0xA6F0, 0xA6F1).addRange(0xA823, 0xA827).addRange(0xA880, 0xA881).addRange(0xA8B4, 0xA8C5).addRange(0xA8E0, 0xA8F1).addRange(0xA926, 0xA92D).addRange(0xA947, 0xA953).addRange(0xA980, 0xA983).addRange(0xA9B3, 0xA9C0).addRange(0xAA29, 0xAA36).addRange(0xAA4C, 0xAA4D).addRange(0xAA7B, 0xAA7D).addRange(0xAAB2, 0xAAB4).addRange(0xAAB7, 0xAAB8).addRange(0xAABE, 0xAABF).addRange(0xAAEB, 0xAAEF).addRange(0xAAF5, 0xAAF6).addRange(0xABE3, 0xABEA).addRange(0xABEC, 0xABED).addRange(0xFE00, 0xFE0F).addRange(0xFE20, 0xFE2F).addRange(0x10376, 0x1037A).addRange(0x10A01, 0x10A03).addRange(0x10A05, 0x10A06).addRange(0x10A0C, 0x10A0F).addRange(0x10A38, 0x10A3A).addRange(0x10AE5, 0x10AE6).addRange(0x10D24, 0x10D27).addRange(0x10EAB, 0x10EAC);\nset.addRange(0x10EFD, 0x10EFF).addRange(0x10F46, 0x10F50).addRange(0x10F82, 0x10F85).addRange(0x11000, 0x11002).addRange(0x11038, 0x11046).addRange(0x11073, 0x11074).addRange(0x1107F, 0x11082).addRange(0x110B0, 0x110BA).addRange(0x11100, 0x11102).addRange(0x11127, 0x11134).addRange(0x11145, 0x11146).addRange(0x11180, 0x11182).addRange(0x111B3, 0x111C0).addRange(0x111C9, 0x111CC).addRange(0x111CE, 0x111CF).addRange(0x1122C, 0x11237).addRange(0x112DF, 0x112EA).addRange(0x11300, 0x11303).addRange(0x1133B, 0x1133C).addRange(0x1133E, 0x11344).addRange(0x11347, 0x11348).addRange(0x1134B, 0x1134D).addRange(0x11362, 0x11363).addRange(0x11366, 0x1136C).addRange(0x11370, 0x11374).addRange(0x11435, 0x11446).addRange(0x114B0, 0x114C3).addRange(0x115AF, 0x115B5).addRange(0x115B8, 0x115C0).addRange(0x115DC, 0x115DD).addRange(0x11630, 0x11640).addRange(0x116AB, 0x116B7).addRange(0x1171D, 0x1172B).addRange(0x1182C, 0x1183A).addRange(0x11930, 0x11935).addRange(0x11937, 0x11938).addRange(0x1193B, 0x1193E).addRange(0x11942, 0x11943).addRange(0x119D1, 0x119D7).addRange(0x119DA, 0x119E0).addRange(0x11A01, 0x11A0A).addRange(0x11A33, 0x11A39).addRange(0x11A3B, 0x11A3E).addRange(0x11A51, 0x11A5B).addRange(0x11A8A, 0x11A99).addRange(0x11C2F, 0x11C36).addRange(0x11C38, 0x11C3F).addRange(0x11C92, 0x11CA7).addRange(0x11CA9, 0x11CB6).addRange(0x11D31, 0x11D36).addRange(0x11D3C, 0x11D3D);\nset.addRange(0x11D3F, 0x11D45).addRange(0x11D8A, 0x11D8E).addRange(0x11D90, 0x11D91).addRange(0x11D93, 0x11D97).addRange(0x11EF3, 0x11EF6).addRange(0x11F00, 0x11F01).addRange(0x11F34, 0x11F3A).addRange(0x11F3E, 0x11F42).addRange(0x13447, 0x13455).addRange(0x16AF0, 0x16AF4).addRange(0x16B30, 0x16B36).addRange(0x16F51, 0x16F87).addRange(0x16F8F, 0x16F92).addRange(0x16FF0, 0x16FF1).addRange(0x1BC9D, 0x1BC9E).addRange(0x1CF00, 0x1CF2D).addRange(0x1CF30, 0x1CF46).addRange(0x1D165, 0x1D169).addRange(0x1D16D, 0x1D172).addRange(0x1D17B, 0x1D182).addRange(0x1D185, 0x1D18B).addRange(0x1D1AA, 0x1D1AD).addRange(0x1D242, 0x1D244).addRange(0x1DA00, 0x1DA36).addRange(0x1DA3B, 0x1DA6C).addRange(0x1DA9B, 0x1DA9F).addRange(0x1DAA1, 0x1DAAF).addRange(0x1E000, 0x1E006).addRange(0x1E008, 0x1E018).addRange(0x1E01B, 0x1E021).addRange(0x1E023, 0x1E024).addRange(0x1E026, 0x1E02A).addRange(0x1E130, 0x1E136).addRange(0x1E2EC, 0x1E2EF).addRange(0x1E4EC, 0x1E4EF).addRange(0x1E8D0, 0x1E8D6).addRange(0x1E944, 0x1E94A).addRange(0xE0100, 0xE01EF);\nexports.characters = set;\n","const set = require('regenerate')(0x2B, 0x7C, 0x7E, 0xAC, 0xB1, 0xD7, 0xF7, 0x3F6, 0x2044, 0x2052, 0x2118, 0x214B, 0x21A0, 0x21A3, 0x21A6, 0x21AE, 0x21D2, 0x21D4, 0x237C, 0x25B7, 0x25C1, 0x266F, 0xFB29, 0xFE62, 0xFF0B, 0xFF5C, 0xFF5E, 0xFFE2, 0x1D6C1, 0x1D6DB, 0x1D6FB, 0x1D715, 0x1D735, 0x1D74F, 0x1D76F, 0x1D789, 0x1D7A9, 0x1D7C3);\nset.addRange(0x3C, 0x3E).addRange(0x606, 0x608).addRange(0x207A, 0x207C).addRange(0x208A, 0x208C).addRange(0x2140, 0x2144).addRange(0x2190, 0x2194).addRange(0x219A, 0x219B).addRange(0x21CE, 0x21CF).addRange(0x21F4, 0x22FF).addRange(0x2320, 0x2321).addRange(0x239B, 0x23B3).addRange(0x23DC, 0x23E1).addRange(0x25F8, 0x25FF).addRange(0x27C0, 0x27C4).addRange(0x27C7, 0x27E5).addRange(0x27F0, 0x27FF).addRange(0x2900, 0x2982).addRange(0x2999, 0x29D7).addRange(0x29DC, 0x29FB).addRange(0x29FE, 0x2AFF).addRange(0x2B30, 0x2B44).addRange(0x2B47, 0x2B4C).addRange(0xFE64, 0xFE66).addRange(0xFF1C, 0xFF1E).addRange(0xFFE9, 0xFFEC).addRange(0x1EEF0, 0x1EEF1);\nexports.characters = set;\n","const set = require('regenerate')(0x2EC, 0x2EE, 0x374, 0x37A, 0x559, 0x640, 0x7FA, 0x81A, 0x824, 0x828, 0x8C9, 0x971, 0xE46, 0xEC6, 0x10FC, 0x17D7, 0x1843, 0x1AA7, 0x1D78, 0x2071, 0x207F, 0x2D6F, 0x2E2F, 0x3005, 0x303B, 0xA015, 0xA60C, 0xA67F, 0xA770, 0xA788, 0xA9CF, 0xA9E6, 0xAA70, 0xAADD, 0xAB69, 0xFF70, 0x16FE3, 0x1E4EB, 0x1E94B);\nset.addRange(0x2B0, 0x2C1).addRange(0x2C6, 0x2D1).addRange(0x2E0, 0x2E4).addRange(0x6E5, 0x6E6).addRange(0x7F4, 0x7F5).addRange(0x1C78, 0x1C7D).addRange(0x1D2C, 0x1D6A).addRange(0x1D9B, 0x1DBF).addRange(0x2090, 0x209C).addRange(0x2C7C, 0x2C7D).addRange(0x3031, 0x3035).addRange(0x309D, 0x309E).addRange(0x30FC, 0x30FE).addRange(0xA4F8, 0xA4FD).addRange(0xA69C, 0xA69D).addRange(0xA717, 0xA71F).addRange(0xA7F2, 0xA7F4).addRange(0xA7F8, 0xA7F9).addRange(0xAAF3, 0xAAF4).addRange(0xAB5C, 0xAB5F).addRange(0xFF9E, 0xFF9F).addRange(0x10780, 0x10785).addRange(0x10787, 0x107B0).addRange(0x107B2, 0x107BA).addRange(0x16B40, 0x16B43).addRange(0x16F93, 0x16F9F).addRange(0x16FE0, 0x16FE1).addRange(0x1AFF0, 0x1AFF3).addRange(0x1AFF5, 0x1AFFB).addRange(0x1AFFD, 0x1AFFE).addRange(0x1E030, 0x1E06D).addRange(0x1E137, 0x1E13D);\nexports.characters = set;\n","const set = require('regenerate')(0x5E, 0x60, 0xA8, 0xAF, 0xB4, 0xB8, 0x2ED, 0x375, 0x888, 0x1FBD, 0xAB5B, 0xFF3E, 0xFF40, 0xFFE3);\nset.addRange(0x2C2, 0x2C5).addRange(0x2D2, 0x2DF).addRange(0x2E5, 0x2EB).addRange(0x2EF, 0x2FF).addRange(0x384, 0x385).addRange(0x1FBF, 0x1FC1).addRange(0x1FCD, 0x1FCF).addRange(0x1FDD, 0x1FDF).addRange(0x1FED, 0x1FEF).addRange(0x1FFD, 0x1FFE).addRange(0x309B, 0x309C).addRange(0xA700, 0xA716).addRange(0xA720, 0xA721).addRange(0xA789, 0xA78A).addRange(0xAB6A, 0xAB6B).addRange(0xFBB2, 0xFBC2).addRange(0x1F3FB, 0x1F3FF);\nexports.characters = set;\n","const set = require('regenerate')(0x5BF, 0x5C7, 0x670, 0x711, 0x7FD, 0x93A, 0x93C, 0x94D, 0x981, 0x9BC, 0x9CD, 0x9FE, 0xA3C, 0xA51, 0xA75, 0xABC, 0xACD, 0xB01, 0xB3C, 0xB3F, 0xB4D, 0xB82, 0xBC0, 0xBCD, 0xC00, 0xC04, 0xC3C, 0xC81, 0xCBC, 0xCBF, 0xCC6, 0xD4D, 0xD81, 0xDCA, 0xDD6, 0xE31, 0xEB1, 0xF35, 0xF37, 0xF39, 0xFC6, 0x1082, 0x108D, 0x109D, 0x17C6, 0x17DD, 0x180F, 0x18A9, 0x1932, 0x1A1B, 0x1A56, 0x1A60, 0x1A62, 0x1A7F, 0x1B34, 0x1B3C, 0x1B42, 0x1BE6, 0x1BED, 0x1CED, 0x1CF4, 0x20E1, 0x2D7F, 0xA66F, 0xA802, 0xA806, 0xA80B, 0xA82C, 0xA8FF, 0xA9B3, 0xA9E5, 0xAA43, 0xAA4C, 0xAA7C, 0xAAB0, 0xAAC1, 0xAAF6, 0xABE5, 0xABE8, 0xABED, 0xFB1E, 0x101FD, 0x102E0, 0x10A3F, 0x11001, 0x11070, 0x110C2, 0x11173, 0x111CF, 0x11234, 0x1123E, 0x11241, 0x112DF, 0x11340, 0x11446, 0x1145E, 0x114BA, 0x1163D, 0x116AB, 0x116AD, 0x116B7, 0x1193E, 0x11943, 0x119E0, 0x11A47, 0x11C3F, 0x11D3A, 0x11D47, 0x11D95, 0x11D97, 0x11F40, 0x11F42, 0x13440, 0x16F4F, 0x16FE4, 0x1DA75, 0x1DA84, 0x1E08F, 0x1E2AE);\nset.addRange(0x300, 0x36F).addRange(0x483, 0x487).addRange(0x591, 0x5BD).addRange(0x5C1, 0x5C2).addRange(0x5C4, 0x5C5).addRange(0x610, 0x61A).addRange(0x64B, 0x65F).addRange(0x6D6, 0x6DC).addRange(0x6DF, 0x6E4).addRange(0x6E7, 0x6E8).addRange(0x6EA, 0x6ED).addRange(0x730, 0x74A).addRange(0x7A6, 0x7B0).addRange(0x7EB, 0x7F3).addRange(0x816, 0x819).addRange(0x81B, 0x823).addRange(0x825, 0x827).addRange(0x829, 0x82D).addRange(0x859, 0x85B).addRange(0x898, 0x89F).addRange(0x8CA, 0x8E1).addRange(0x8E3, 0x902).addRange(0x941, 0x948).addRange(0x951, 0x957).addRange(0x962, 0x963).addRange(0x9C1, 0x9C4).addRange(0x9E2, 0x9E3).addRange(0xA01, 0xA02).addRange(0xA41, 0xA42).addRange(0xA47, 0xA48).addRange(0xA4B, 0xA4D).addRange(0xA70, 0xA71).addRange(0xA81, 0xA82).addRange(0xAC1, 0xAC5).addRange(0xAC7, 0xAC8).addRange(0xAE2, 0xAE3).addRange(0xAFA, 0xAFF).addRange(0xB41, 0xB44).addRange(0xB55, 0xB56).addRange(0xB62, 0xB63).addRange(0xC3E, 0xC40).addRange(0xC46, 0xC48).addRange(0xC4A, 0xC4D).addRange(0xC55, 0xC56).addRange(0xC62, 0xC63).addRange(0xCCC, 0xCCD).addRange(0xCE2, 0xCE3).addRange(0xD00, 0xD01).addRange(0xD3B, 0xD3C).addRange(0xD41, 0xD44).addRange(0xD62, 0xD63);\nset.addRange(0xDD2, 0xDD4).addRange(0xE34, 0xE3A).addRange(0xE47, 0xE4E).addRange(0xEB4, 0xEBC).addRange(0xEC8, 0xECE).addRange(0xF18, 0xF19).addRange(0xF71, 0xF7E).addRange(0xF80, 0xF84).addRange(0xF86, 0xF87).addRange(0xF8D, 0xF97).addRange(0xF99, 0xFBC).addRange(0x102D, 0x1030).addRange(0x1032, 0x1037).addRange(0x1039, 0x103A).addRange(0x103D, 0x103E).addRange(0x1058, 0x1059).addRange(0x105E, 0x1060).addRange(0x1071, 0x1074).addRange(0x1085, 0x1086).addRange(0x135D, 0x135F).addRange(0x1712, 0x1714).addRange(0x1732, 0x1733).addRange(0x1752, 0x1753).addRange(0x1772, 0x1773).addRange(0x17B4, 0x17B5).addRange(0x17B7, 0x17BD).addRange(0x17C9, 0x17D3).addRange(0x180B, 0x180D).addRange(0x1885, 0x1886).addRange(0x1920, 0x1922).addRange(0x1927, 0x1928).addRange(0x1939, 0x193B).addRange(0x1A17, 0x1A18).addRange(0x1A58, 0x1A5E).addRange(0x1A65, 0x1A6C).addRange(0x1A73, 0x1A7C).addRange(0x1AB0, 0x1ABD).addRange(0x1ABF, 0x1ACE).addRange(0x1B00, 0x1B03).addRange(0x1B36, 0x1B3A).addRange(0x1B6B, 0x1B73).addRange(0x1B80, 0x1B81).addRange(0x1BA2, 0x1BA5).addRange(0x1BA8, 0x1BA9).addRange(0x1BAB, 0x1BAD).addRange(0x1BE8, 0x1BE9).addRange(0x1BEF, 0x1BF1).addRange(0x1C2C, 0x1C33).addRange(0x1C36, 0x1C37).addRange(0x1CD0, 0x1CD2).addRange(0x1CD4, 0x1CE0);\nset.addRange(0x1CE2, 0x1CE8).addRange(0x1CF8, 0x1CF9).addRange(0x1DC0, 0x1DFF).addRange(0x20D0, 0x20DC).addRange(0x20E5, 0x20F0).addRange(0x2CEF, 0x2CF1).addRange(0x2DE0, 0x2DFF).addRange(0x302A, 0x302D).addRange(0x3099, 0x309A).addRange(0xA674, 0xA67D).addRange(0xA69E, 0xA69F).addRange(0xA6F0, 0xA6F1).addRange(0xA825, 0xA826).addRange(0xA8C4, 0xA8C5).addRange(0xA8E0, 0xA8F1).addRange(0xA926, 0xA92D).addRange(0xA947, 0xA951).addRange(0xA980, 0xA982).addRange(0xA9B6, 0xA9B9).addRange(0xA9BC, 0xA9BD).addRange(0xAA29, 0xAA2E).addRange(0xAA31, 0xAA32).addRange(0xAA35, 0xAA36).addRange(0xAAB2, 0xAAB4).addRange(0xAAB7, 0xAAB8).addRange(0xAABE, 0xAABF).addRange(0xAAEC, 0xAAED).addRange(0xFE00, 0xFE0F).addRange(0xFE20, 0xFE2F).addRange(0x10376, 0x1037A).addRange(0x10A01, 0x10A03).addRange(0x10A05, 0x10A06).addRange(0x10A0C, 0x10A0F).addRange(0x10A38, 0x10A3A).addRange(0x10AE5, 0x10AE6).addRange(0x10D24, 0x10D27).addRange(0x10EAB, 0x10EAC).addRange(0x10EFD, 0x10EFF).addRange(0x10F46, 0x10F50).addRange(0x10F82, 0x10F85).addRange(0x11038, 0x11046).addRange(0x11073, 0x11074).addRange(0x1107F, 0x11081).addRange(0x110B3, 0x110B6).addRange(0x110B9, 0x110BA).addRange(0x11100, 0x11102).addRange(0x11127, 0x1112B).addRange(0x1112D, 0x11134).addRange(0x11180, 0x11181).addRange(0x111B6, 0x111BE).addRange(0x111C9, 0x111CC);\nset.addRange(0x1122F, 0x11231).addRange(0x11236, 0x11237).addRange(0x112E3, 0x112EA).addRange(0x11300, 0x11301).addRange(0x1133B, 0x1133C).addRange(0x11366, 0x1136C).addRange(0x11370, 0x11374).addRange(0x11438, 0x1143F).addRange(0x11442, 0x11444).addRange(0x114B3, 0x114B8).addRange(0x114BF, 0x114C0).addRange(0x114C2, 0x114C3).addRange(0x115B2, 0x115B5).addRange(0x115BC, 0x115BD).addRange(0x115BF, 0x115C0).addRange(0x115DC, 0x115DD).addRange(0x11633, 0x1163A).addRange(0x1163F, 0x11640).addRange(0x116B0, 0x116B5).addRange(0x1171D, 0x1171F).addRange(0x11722, 0x11725).addRange(0x11727, 0x1172B).addRange(0x1182F, 0x11837).addRange(0x11839, 0x1183A).addRange(0x1193B, 0x1193C).addRange(0x119D4, 0x119D7).addRange(0x119DA, 0x119DB).addRange(0x11A01, 0x11A0A).addRange(0x11A33, 0x11A38).addRange(0x11A3B, 0x11A3E).addRange(0x11A51, 0x11A56).addRange(0x11A59, 0x11A5B).addRange(0x11A8A, 0x11A96).addRange(0x11A98, 0x11A99).addRange(0x11C30, 0x11C36).addRange(0x11C38, 0x11C3D).addRange(0x11C92, 0x11CA7).addRange(0x11CAA, 0x11CB0).addRange(0x11CB2, 0x11CB3).addRange(0x11CB5, 0x11CB6).addRange(0x11D31, 0x11D36).addRange(0x11D3C, 0x11D3D).addRange(0x11D3F, 0x11D45).addRange(0x11D90, 0x11D91).addRange(0x11EF3, 0x11EF4).addRange(0x11F00, 0x11F01).addRange(0x11F36, 0x11F3A).addRange(0x13447, 0x13455).addRange(0x16AF0, 0x16AF4).addRange(0x16B30, 0x16B36).addRange(0x16F8F, 0x16F92);\nset.addRange(0x1BC9D, 0x1BC9E).addRange(0x1CF00, 0x1CF2D).addRange(0x1CF30, 0x1CF46).addRange(0x1D167, 0x1D169).addRange(0x1D17B, 0x1D182).addRange(0x1D185, 0x1D18B).addRange(0x1D1AA, 0x1D1AD).addRange(0x1D242, 0x1D244).addRange(0x1DA00, 0x1DA36).addRange(0x1DA3B, 0x1DA6C).addRange(0x1DA9B, 0x1DA9F).addRange(0x1DAA1, 0x1DAAF).addRange(0x1E000, 0x1E006).addRange(0x1E008, 0x1E018).addRange(0x1E01B, 0x1E021).addRange(0x1E023, 0x1E024).addRange(0x1E026, 0x1E02A).addRange(0x1E130, 0x1E136).addRange(0x1E2EC, 0x1E2EF).addRange(0x1E4EC, 0x1E4EF).addRange(0x1E8D0, 0x1E8D6).addRange(0x1E944, 0x1E94A).addRange(0xE0100, 0xE01EF);\nexports.characters = set;\n","const set = require('regenerate')(0xB9, 0x2070, 0x2CFD, 0x3007, 0x10341, 0x1034A);\nset.addRange(0x30, 0x39).addRange(0xB2, 0xB3).addRange(0xBC, 0xBE).addRange(0x660, 0x669).addRange(0x6F0, 0x6F9).addRange(0x7C0, 0x7C9).addRange(0x966, 0x96F).addRange(0x9E6, 0x9EF).addRange(0x9F4, 0x9F9).addRange(0xA66, 0xA6F).addRange(0xAE6, 0xAEF).addRange(0xB66, 0xB6F).addRange(0xB72, 0xB77).addRange(0xBE6, 0xBF2).addRange(0xC66, 0xC6F).addRange(0xC78, 0xC7E).addRange(0xCE6, 0xCEF).addRange(0xD58, 0xD5E).addRange(0xD66, 0xD78).addRange(0xDE6, 0xDEF).addRange(0xE50, 0xE59).addRange(0xED0, 0xED9).addRange(0xF20, 0xF33).addRange(0x1040, 0x1049).addRange(0x1090, 0x1099).addRange(0x1369, 0x137C).addRange(0x16EE, 0x16F0).addRange(0x17E0, 0x17E9).addRange(0x17F0, 0x17F9).addRange(0x1810, 0x1819).addRange(0x1946, 0x194F).addRange(0x19D0, 0x19DA).addRange(0x1A80, 0x1A89).addRange(0x1A90, 0x1A99).addRange(0x1B50, 0x1B59).addRange(0x1BB0, 0x1BB9).addRange(0x1C40, 0x1C49).addRange(0x1C50, 0x1C59).addRange(0x2074, 0x2079).addRange(0x2080, 0x2089).addRange(0x2150, 0x2182).addRange(0x2185, 0x2189).addRange(0x2460, 0x249B).addRange(0x24EA, 0x24FF).addRange(0x2776, 0x2793).addRange(0x3021, 0x3029).addRange(0x3038, 0x303A).addRange(0x3192, 0x3195).addRange(0x3220, 0x3229).addRange(0x3248, 0x324F).addRange(0x3251, 0x325F);\nset.addRange(0x3280, 0x3289).addRange(0x32B1, 0x32BF).addRange(0xA620, 0xA629).addRange(0xA6E6, 0xA6EF).addRange(0xA830, 0xA835).addRange(0xA8D0, 0xA8D9).addRange(0xA900, 0xA909).addRange(0xA9D0, 0xA9D9).addRange(0xA9F0, 0xA9F9).addRange(0xAA50, 0xAA59).addRange(0xABF0, 0xABF9).addRange(0xFF10, 0xFF19).addRange(0x10107, 0x10133).addRange(0x10140, 0x10178).addRange(0x1018A, 0x1018B).addRange(0x102E1, 0x102FB).addRange(0x10320, 0x10323).addRange(0x103D1, 0x103D5).addRange(0x104A0, 0x104A9).addRange(0x10858, 0x1085F).addRange(0x10879, 0x1087F).addRange(0x108A7, 0x108AF).addRange(0x108FB, 0x108FF).addRange(0x10916, 0x1091B).addRange(0x109BC, 0x109BD).addRange(0x109C0, 0x109CF).addRange(0x109D2, 0x109FF).addRange(0x10A40, 0x10A48).addRange(0x10A7D, 0x10A7E).addRange(0x10A9D, 0x10A9F).addRange(0x10AEB, 0x10AEF).addRange(0x10B58, 0x10B5F).addRange(0x10B78, 0x10B7F).addRange(0x10BA9, 0x10BAF).addRange(0x10CFA, 0x10CFF).addRange(0x10D30, 0x10D39).addRange(0x10E60, 0x10E7E).addRange(0x10F1D, 0x10F26).addRange(0x10F51, 0x10F54).addRange(0x10FC5, 0x10FCB).addRange(0x11052, 0x1106F).addRange(0x110F0, 0x110F9).addRange(0x11136, 0x1113F).addRange(0x111D0, 0x111D9).addRange(0x111E1, 0x111F4).addRange(0x112F0, 0x112F9).addRange(0x11450, 0x11459).addRange(0x114D0, 0x114D9).addRange(0x11650, 0x11659).addRange(0x116C0, 0x116C9).addRange(0x11730, 0x1173B);\nset.addRange(0x118E0, 0x118F2).addRange(0x11950, 0x11959).addRange(0x11C50, 0x11C6C).addRange(0x11D50, 0x11D59).addRange(0x11DA0, 0x11DA9).addRange(0x11F50, 0x11F59).addRange(0x11FC0, 0x11FD4).addRange(0x12400, 0x1246E).addRange(0x16A60, 0x16A69).addRange(0x16AC0, 0x16AC9).addRange(0x16B50, 0x16B59).addRange(0x16B5B, 0x16B61).addRange(0x16E80, 0x16E96).addRange(0x1D2C0, 0x1D2D3).addRange(0x1D2E0, 0x1D2F3).addRange(0x1D360, 0x1D378).addRange(0x1D7CE, 0x1D7FF).addRange(0x1E140, 0x1E149).addRange(0x1E2F0, 0x1E2F9).addRange(0x1E4F0, 0x1E4F9).addRange(0x1E8C7, 0x1E8CF).addRange(0x1E950, 0x1E959).addRange(0x1EC71, 0x1ECAB).addRange(0x1ECAD, 0x1ECAF).addRange(0x1ECB1, 0x1ECB4).addRange(0x1ED01, 0x1ED2D).addRange(0x1ED2F, 0x1ED3D).addRange(0x1F100, 0x1F10C).addRange(0x1FBF0, 0x1FBF9);\nexports.characters = set;\n","const set = require('regenerate')(0x28, 0x5B, 0x7B, 0xF3A, 0xF3C, 0x169B, 0x201A, 0x201E, 0x2045, 0x207D, 0x208D, 0x2308, 0x230A, 0x2329, 0x2768, 0x276A, 0x276C, 0x276E, 0x2770, 0x2772, 0x2774, 0x27C5, 0x27E6, 0x27E8, 0x27EA, 0x27EC, 0x27EE, 0x2983, 0x2985, 0x2987, 0x2989, 0x298B, 0x298D, 0x298F, 0x2991, 0x2993, 0x2995, 0x2997, 0x29D8, 0x29DA, 0x29FC, 0x2E22, 0x2E24, 0x2E26, 0x2E28, 0x2E42, 0x2E55, 0x2E57, 0x2E59, 0x2E5B, 0x3008, 0x300A, 0x300C, 0x300E, 0x3010, 0x3014, 0x3016, 0x3018, 0x301A, 0x301D, 0xFD3F, 0xFE17, 0xFE35, 0xFE37, 0xFE39, 0xFE3B, 0xFE3D, 0xFE3F, 0xFE41, 0xFE43, 0xFE47, 0xFE59, 0xFE5B, 0xFE5D, 0xFF08, 0xFF3B, 0xFF5B, 0xFF5F, 0xFF62);\n\nexports.characters = set;\n","const set = require('regenerate')(0xAA, 0xBA, 0x1BB, 0x294, 0x6D5, 0x6FF, 0x710, 0x7B1, 0x93D, 0x950, 0x9B2, 0x9BD, 0x9CE, 0x9FC, 0xA5E, 0xABD, 0xAD0, 0xAF9, 0xB3D, 0xB71, 0xB83, 0xB9C, 0xBD0, 0xC3D, 0xC5D, 0xC80, 0xCBD, 0xD3D, 0xD4E, 0xDBD, 0xE84, 0xEA5, 0xEBD, 0xF00, 0x103F, 0x1061, 0x108E, 0x1258, 0x12C0, 0x17DC, 0x18AA, 0x1CFA, 0x3006, 0x303C, 0x309F, 0x30FF, 0xA66E, 0xA78F, 0xA7F7, 0xA8FB, 0xAA7A, 0xAAB1, 0xAAC0, 0xAAC2, 0xAAF2, 0xFB1D, 0xFB3E, 0x10808, 0x1083C, 0x10A00, 0x10F27, 0x11075, 0x11144, 0x11147, 0x11176, 0x111DA, 0x111DC, 0x11288, 0x1133D, 0x11350, 0x114C7, 0x11644, 0x116B8, 0x11909, 0x1193F, 0x11941, 0x119E1, 0x119E3, 0x11A00, 0x11A3A, 0x11A50, 0x11A9D, 0x11C40, 0x11D46, 0x11D98, 0x11F02, 0x11FB0, 0x16F50, 0x1B132, 0x1B155, 0x1DF0A, 0x1E14E, 0x1EE24, 0x1EE27, 0x1EE39, 0x1EE3B, 0x1EE42, 0x1EE47, 0x1EE49, 0x1EE4B, 0x1EE54, 0x1EE57, 0x1EE59, 0x1EE5B, 0x1EE5D, 0x1EE5F, 0x1EE64, 0x1EE7E);\nset.addRange(0x1C0, 0x1C3).addRange(0x5D0, 0x5EA).addRange(0x5EF, 0x5F2).addRange(0x620, 0x63F).addRange(0x641, 0x64A).addRange(0x66E, 0x66F).addRange(0x671, 0x6D3).addRange(0x6EE, 0x6EF).addRange(0x6FA, 0x6FC).addRange(0x712, 0x72F).addRange(0x74D, 0x7A5).addRange(0x7CA, 0x7EA).addRange(0x800, 0x815).addRange(0x840, 0x858).addRange(0x860, 0x86A).addRange(0x870, 0x887).addRange(0x889, 0x88E).addRange(0x8A0, 0x8C8).addRange(0x904, 0x939).addRange(0x958, 0x961).addRange(0x972, 0x980).addRange(0x985, 0x98C).addRange(0x98F, 0x990).addRange(0x993, 0x9A8).addRange(0x9AA, 0x9B0).addRange(0x9B6, 0x9B9).addRange(0x9DC, 0x9DD).addRange(0x9DF, 0x9E1).addRange(0x9F0, 0x9F1).addRange(0xA05, 0xA0A).addRange(0xA0F, 0xA10).addRange(0xA13, 0xA28).addRange(0xA2A, 0xA30).addRange(0xA32, 0xA33).addRange(0xA35, 0xA36).addRange(0xA38, 0xA39).addRange(0xA59, 0xA5C).addRange(0xA72, 0xA74).addRange(0xA85, 0xA8D).addRange(0xA8F, 0xA91).addRange(0xA93, 0xAA8).addRange(0xAAA, 0xAB0).addRange(0xAB2, 0xAB3).addRange(0xAB5, 0xAB9).addRange(0xAE0, 0xAE1).addRange(0xB05, 0xB0C).addRange(0xB0F, 0xB10).addRange(0xB13, 0xB28).addRange(0xB2A, 0xB30).addRange(0xB32, 0xB33).addRange(0xB35, 0xB39);\nset.addRange(0xB5C, 0xB5D).addRange(0xB5F, 0xB61).addRange(0xB85, 0xB8A).addRange(0xB8E, 0xB90).addRange(0xB92, 0xB95).addRange(0xB99, 0xB9A).addRange(0xB9E, 0xB9F).addRange(0xBA3, 0xBA4).addRange(0xBA8, 0xBAA).addRange(0xBAE, 0xBB9).addRange(0xC05, 0xC0C).addRange(0xC0E, 0xC10).addRange(0xC12, 0xC28).addRange(0xC2A, 0xC39).addRange(0xC58, 0xC5A).addRange(0xC60, 0xC61).addRange(0xC85, 0xC8C).addRange(0xC8E, 0xC90).addRange(0xC92, 0xCA8).addRange(0xCAA, 0xCB3).addRange(0xCB5, 0xCB9).addRange(0xCDD, 0xCDE).addRange(0xCE0, 0xCE1).addRange(0xCF1, 0xCF2).addRange(0xD04, 0xD0C).addRange(0xD0E, 0xD10).addRange(0xD12, 0xD3A).addRange(0xD54, 0xD56).addRange(0xD5F, 0xD61).addRange(0xD7A, 0xD7F).addRange(0xD85, 0xD96).addRange(0xD9A, 0xDB1).addRange(0xDB3, 0xDBB).addRange(0xDC0, 0xDC6).addRange(0xE01, 0xE30).addRange(0xE32, 0xE33).addRange(0xE40, 0xE45).addRange(0xE81, 0xE82).addRange(0xE86, 0xE8A).addRange(0xE8C, 0xEA3).addRange(0xEA7, 0xEB0).addRange(0xEB2, 0xEB3).addRange(0xEC0, 0xEC4).addRange(0xEDC, 0xEDF).addRange(0xF40, 0xF47).addRange(0xF49, 0xF6C).addRange(0xF88, 0xF8C).addRange(0x1000, 0x102A).addRange(0x1050, 0x1055).addRange(0x105A, 0x105D).addRange(0x1065, 0x1066);\nset.addRange(0x106E, 0x1070).addRange(0x1075, 0x1081).addRange(0x1100, 0x1248).addRange(0x124A, 0x124D).addRange(0x1250, 0x1256).addRange(0x125A, 0x125D).addRange(0x1260, 0x1288).addRange(0x128A, 0x128D).addRange(0x1290, 0x12B0).addRange(0x12B2, 0x12B5).addRange(0x12B8, 0x12BE).addRange(0x12C2, 0x12C5).addRange(0x12C8, 0x12D6).addRange(0x12D8, 0x1310).addRange(0x1312, 0x1315).addRange(0x1318, 0x135A).addRange(0x1380, 0x138F).addRange(0x1401, 0x166C).addRange(0x166F, 0x167F).addRange(0x1681, 0x169A).addRange(0x16A0, 0x16EA).addRange(0x16F1, 0x16F8).addRange(0x1700, 0x1711).addRange(0x171F, 0x1731).addRange(0x1740, 0x1751).addRange(0x1760, 0x176C).addRange(0x176E, 0x1770).addRange(0x1780, 0x17B3).addRange(0x1820, 0x1842).addRange(0x1844, 0x1878).addRange(0x1880, 0x1884).addRange(0x1887, 0x18A8).addRange(0x18B0, 0x18F5).addRange(0x1900, 0x191E).addRange(0x1950, 0x196D).addRange(0x1970, 0x1974).addRange(0x1980, 0x19AB).addRange(0x19B0, 0x19C9).addRange(0x1A00, 0x1A16).addRange(0x1A20, 0x1A54).addRange(0x1B05, 0x1B33).addRange(0x1B45, 0x1B4C).addRange(0x1B83, 0x1BA0).addRange(0x1BAE, 0x1BAF).addRange(0x1BBA, 0x1BE5).addRange(0x1C00, 0x1C23).addRange(0x1C4D, 0x1C4F).addRange(0x1C5A, 0x1C77).addRange(0x1CE9, 0x1CEC).addRange(0x1CEE, 0x1CF3).addRange(0x1CF5, 0x1CF6);\nset.addRange(0x2135, 0x2138).addRange(0x2D30, 0x2D67).addRange(0x2D80, 0x2D96).addRange(0x2DA0, 0x2DA6).addRange(0x2DA8, 0x2DAE).addRange(0x2DB0, 0x2DB6).addRange(0x2DB8, 0x2DBE).addRange(0x2DC0, 0x2DC6).addRange(0x2DC8, 0x2DCE).addRange(0x2DD0, 0x2DD6).addRange(0x2DD8, 0x2DDE).addRange(0x3041, 0x3096).addRange(0x30A1, 0x30FA).addRange(0x3105, 0x312F).addRange(0x3131, 0x318E).addRange(0x31A0, 0x31BF).addRange(0x31F0, 0x31FF).addRange(0x3400, 0x4DBF).addRange(0x4E00, 0xA014).addRange(0xA016, 0xA48C).addRange(0xA4D0, 0xA4F7).addRange(0xA500, 0xA60B).addRange(0xA610, 0xA61F).addRange(0xA62A, 0xA62B).addRange(0xA6A0, 0xA6E5).addRange(0xA7FB, 0xA801).addRange(0xA803, 0xA805).addRange(0xA807, 0xA80A).addRange(0xA80C, 0xA822).addRange(0xA840, 0xA873).addRange(0xA882, 0xA8B3).addRange(0xA8F2, 0xA8F7).addRange(0xA8FD, 0xA8FE).addRange(0xA90A, 0xA925).addRange(0xA930, 0xA946).addRange(0xA960, 0xA97C).addRange(0xA984, 0xA9B2).addRange(0xA9E0, 0xA9E4).addRange(0xA9E7, 0xA9EF).addRange(0xA9FA, 0xA9FE).addRange(0xAA00, 0xAA28).addRange(0xAA40, 0xAA42).addRange(0xAA44, 0xAA4B).addRange(0xAA60, 0xAA6F).addRange(0xAA71, 0xAA76).addRange(0xAA7E, 0xAAAF).addRange(0xAAB5, 0xAAB6).addRange(0xAAB9, 0xAABD).addRange(0xAADB, 0xAADC).addRange(0xAAE0, 0xAAEA).addRange(0xAB01, 0xAB06);\nset.addRange(0xAB09, 0xAB0E).addRange(0xAB11, 0xAB16).addRange(0xAB20, 0xAB26).addRange(0xAB28, 0xAB2E).addRange(0xABC0, 0xABE2).addRange(0xAC00, 0xD7A3).addRange(0xD7B0, 0xD7C6).addRange(0xD7CB, 0xD7FB).addRange(0xF900, 0xFA6D).addRange(0xFA70, 0xFAD9).addRange(0xFB1F, 0xFB28).addRange(0xFB2A, 0xFB36).addRange(0xFB38, 0xFB3C).addRange(0xFB40, 0xFB41).addRange(0xFB43, 0xFB44).addRange(0xFB46, 0xFBB1).addRange(0xFBD3, 0xFD3D).addRange(0xFD50, 0xFD8F).addRange(0xFD92, 0xFDC7).addRange(0xFDF0, 0xFDFB).addRange(0xFE70, 0xFE74).addRange(0xFE76, 0xFEFC).addRange(0xFF66, 0xFF6F).addRange(0xFF71, 0xFF9D).addRange(0xFFA0, 0xFFBE).addRange(0xFFC2, 0xFFC7).addRange(0xFFCA, 0xFFCF).addRange(0xFFD2, 0xFFD7).addRange(0xFFDA, 0xFFDC).addRange(0x10000, 0x1000B).addRange(0x1000D, 0x10026).addRange(0x10028, 0x1003A).addRange(0x1003C, 0x1003D).addRange(0x1003F, 0x1004D).addRange(0x10050, 0x1005D).addRange(0x10080, 0x100FA).addRange(0x10280, 0x1029C).addRange(0x102A0, 0x102D0).addRange(0x10300, 0x1031F).addRange(0x1032D, 0x10340).addRange(0x10342, 0x10349).addRange(0x10350, 0x10375).addRange(0x10380, 0x1039D).addRange(0x103A0, 0x103C3).addRange(0x103C8, 0x103CF).addRange(0x10450, 0x1049D).addRange(0x10500, 0x10527).addRange(0x10530, 0x10563).addRange(0x10600, 0x10736).addRange(0x10740, 0x10755).addRange(0x10760, 0x10767);\nset.addRange(0x10800, 0x10805).addRange(0x1080A, 0x10835).addRange(0x10837, 0x10838).addRange(0x1083F, 0x10855).addRange(0x10860, 0x10876).addRange(0x10880, 0x1089E).addRange(0x108E0, 0x108F2).addRange(0x108F4, 0x108F5).addRange(0x10900, 0x10915).addRange(0x10920, 0x10939).addRange(0x10980, 0x109B7).addRange(0x109BE, 0x109BF).addRange(0x10A10, 0x10A13).addRange(0x10A15, 0x10A17).addRange(0x10A19, 0x10A35).addRange(0x10A60, 0x10A7C).addRange(0x10A80, 0x10A9C).addRange(0x10AC0, 0x10AC7).addRange(0x10AC9, 0x10AE4).addRange(0x10B00, 0x10B35).addRange(0x10B40, 0x10B55).addRange(0x10B60, 0x10B72).addRange(0x10B80, 0x10B91).addRange(0x10C00, 0x10C48).addRange(0x10D00, 0x10D23).addRange(0x10E80, 0x10EA9).addRange(0x10EB0, 0x10EB1).addRange(0x10F00, 0x10F1C).addRange(0x10F30, 0x10F45).addRange(0x10F70, 0x10F81).addRange(0x10FB0, 0x10FC4).addRange(0x10FE0, 0x10FF6).addRange(0x11003, 0x11037).addRange(0x11071, 0x11072).addRange(0x11083, 0x110AF).addRange(0x110D0, 0x110E8).addRange(0x11103, 0x11126).addRange(0x11150, 0x11172).addRange(0x11183, 0x111B2).addRange(0x111C1, 0x111C4).addRange(0x11200, 0x11211).addRange(0x11213, 0x1122B).addRange(0x1123F, 0x11240).addRange(0x11280, 0x11286).addRange(0x1128A, 0x1128D).addRange(0x1128F, 0x1129D).addRange(0x1129F, 0x112A8).addRange(0x112B0, 0x112DE).addRange(0x11305, 0x1130C).addRange(0x1130F, 0x11310).addRange(0x11313, 0x11328);\nset.addRange(0x1132A, 0x11330).addRange(0x11332, 0x11333).addRange(0x11335, 0x11339).addRange(0x1135D, 0x11361).addRange(0x11400, 0x11434).addRange(0x11447, 0x1144A).addRange(0x1145F, 0x11461).addRange(0x11480, 0x114AF).addRange(0x114C4, 0x114C5).addRange(0x11580, 0x115AE).addRange(0x115D8, 0x115DB).addRange(0x11600, 0x1162F).addRange(0x11680, 0x116AA).addRange(0x11700, 0x1171A).addRange(0x11740, 0x11746).addRange(0x11800, 0x1182B).addRange(0x118FF, 0x11906).addRange(0x1190C, 0x11913).addRange(0x11915, 0x11916).addRange(0x11918, 0x1192F).addRange(0x119A0, 0x119A7).addRange(0x119AA, 0x119D0).addRange(0x11A0B, 0x11A32).addRange(0x11A5C, 0x11A89).addRange(0x11AB0, 0x11AF8).addRange(0x11C00, 0x11C08).addRange(0x11C0A, 0x11C2E).addRange(0x11C72, 0x11C8F).addRange(0x11D00, 0x11D06).addRange(0x11D08, 0x11D09).addRange(0x11D0B, 0x11D30).addRange(0x11D60, 0x11D65).addRange(0x11D67, 0x11D68).addRange(0x11D6A, 0x11D89).addRange(0x11EE0, 0x11EF2).addRange(0x11F04, 0x11F10).addRange(0x11F12, 0x11F33).addRange(0x12000, 0x12399).addRange(0x12480, 0x12543).addRange(0x12F90, 0x12FF0).addRange(0x13000, 0x1342F).addRange(0x13441, 0x13446).addRange(0x14400, 0x14646).addRange(0x16800, 0x16A38).addRange(0x16A40, 0x16A5E).addRange(0x16A70, 0x16ABE).addRange(0x16AD0, 0x16AED).addRange(0x16B00, 0x16B2F).addRange(0x16B63, 0x16B77).addRange(0x16B7D, 0x16B8F).addRange(0x16F00, 0x16F4A);\nset.addRange(0x17000, 0x187F7).addRange(0x18800, 0x18CD5).addRange(0x18D00, 0x18D08).addRange(0x1B000, 0x1B122).addRange(0x1B150, 0x1B152).addRange(0x1B164, 0x1B167).addRange(0x1B170, 0x1B2FB).addRange(0x1BC00, 0x1BC6A).addRange(0x1BC70, 0x1BC7C).addRange(0x1BC80, 0x1BC88).addRange(0x1BC90, 0x1BC99).addRange(0x1E100, 0x1E12C).addRange(0x1E290, 0x1E2AD).addRange(0x1E2C0, 0x1E2EB).addRange(0x1E4D0, 0x1E4EA).addRange(0x1E7E0, 0x1E7E6).addRange(0x1E7E8, 0x1E7EB).addRange(0x1E7ED, 0x1E7EE).addRange(0x1E7F0, 0x1E7FE).addRange(0x1E800, 0x1E8C4).addRange(0x1EE00, 0x1EE03).addRange(0x1EE05, 0x1EE1F).addRange(0x1EE21, 0x1EE22).addRange(0x1EE29, 0x1EE32).addRange(0x1EE34, 0x1EE37).addRange(0x1EE4D, 0x1EE4F).addRange(0x1EE51, 0x1EE52).addRange(0x1EE61, 0x1EE62).addRange(0x1EE67, 0x1EE6A).addRange(0x1EE6C, 0x1EE72).addRange(0x1EE74, 0x1EE77).addRange(0x1EE79, 0x1EE7C).addRange(0x1EE80, 0x1EE89).addRange(0x1EE8B, 0x1EE9B).addRange(0x1EEA1, 0x1EEA3).addRange(0x1EEA5, 0x1EEA9).addRange(0x1EEAB, 0x1EEBB).addRange(0x20000, 0x2A6DF).addRange(0x2A700, 0x2B739).addRange(0x2B740, 0x2B81D).addRange(0x2B820, 0x2CEA1).addRange(0x2CEB0, 0x2EBE0).addRange(0x2EBF0, 0x2EE5D).addRange(0x2F800, 0x2FA1D).addRange(0x30000, 0x3134A).addRange(0x31350, 0x323AF);\nexports.characters = set;\n","const set = require('regenerate')(0xB9, 0x19DA, 0x2070, 0x2189, 0x2CFD);\nset.addRange(0xB2, 0xB3).addRange(0xBC, 0xBE).addRange(0x9F4, 0x9F9).addRange(0xB72, 0xB77).addRange(0xBF0, 0xBF2).addRange(0xC78, 0xC7E).addRange(0xD58, 0xD5E).addRange(0xD70, 0xD78).addRange(0xF2A, 0xF33).addRange(0x1369, 0x137C).addRange(0x17F0, 0x17F9).addRange(0x2074, 0x2079).addRange(0x2080, 0x2089).addRange(0x2150, 0x215F).addRange(0x2460, 0x249B).addRange(0x24EA, 0x24FF).addRange(0x2776, 0x2793).addRange(0x3192, 0x3195).addRange(0x3220, 0x3229).addRange(0x3248, 0x324F).addRange(0x3251, 0x325F).addRange(0x3280, 0x3289).addRange(0x32B1, 0x32BF).addRange(0xA830, 0xA835).addRange(0x10107, 0x10133).addRange(0x10175, 0x10178).addRange(0x1018A, 0x1018B).addRange(0x102E1, 0x102FB).addRange(0x10320, 0x10323).addRange(0x10858, 0x1085F).addRange(0x10879, 0x1087F).addRange(0x108A7, 0x108AF).addRange(0x108FB, 0x108FF).addRange(0x10916, 0x1091B).addRange(0x109BC, 0x109BD).addRange(0x109C0, 0x109CF).addRange(0x109D2, 0x109FF).addRange(0x10A40, 0x10A48).addRange(0x10A7D, 0x10A7E).addRange(0x10A9D, 0x10A9F).addRange(0x10AEB, 0x10AEF).addRange(0x10B58, 0x10B5F).addRange(0x10B78, 0x10B7F).addRange(0x10BA9, 0x10BAF).addRange(0x10CFA, 0x10CFF).addRange(0x10E60, 0x10E7E).addRange(0x10F1D, 0x10F26).addRange(0x10F51, 0x10F54).addRange(0x10FC5, 0x10FCB).addRange(0x11052, 0x11065).addRange(0x111E1, 0x111F4);\nset.addRange(0x1173A, 0x1173B).addRange(0x118EA, 0x118F2).addRange(0x11C5A, 0x11C6C).addRange(0x11FC0, 0x11FD4).addRange(0x16B5B, 0x16B61).addRange(0x16E80, 0x16E96).addRange(0x1D2C0, 0x1D2D3).addRange(0x1D2E0, 0x1D2F3).addRange(0x1D360, 0x1D378).addRange(0x1E8C7, 0x1E8CF).addRange(0x1EC71, 0x1ECAB).addRange(0x1ECAD, 0x1ECAF).addRange(0x1ECB1, 0x1ECB4).addRange(0x1ED01, 0x1ED2D).addRange(0x1ED2F, 0x1ED3D).addRange(0x1F100, 0x1F10C);\nexports.characters = set;\n","const set = require('regenerate')(0x2A, 0x2C, 0x5C, 0xA1, 0xA7, 0xBF, 0x37E, 0x387, 0x589, 0x5C0, 0x5C3, 0x5C6, 0x61B, 0x6D4, 0x85E, 0x970, 0x9FD, 0xA76, 0xAF0, 0xC77, 0xC84, 0xDF4, 0xE4F, 0xF14, 0xF85, 0x10FB, 0x166E, 0x1CD3, 0x2053, 0x2D70, 0x2E0B, 0x2E1B, 0x2E41, 0x303D, 0x30FB, 0xA673, 0xA67E, 0xA8FC, 0xA95F, 0xABEB, 0xFE19, 0xFE30, 0xFE68, 0xFF0A, 0xFF0C, 0xFF3C, 0xFF61, 0x1039F, 0x103D0, 0x1056F, 0x10857, 0x1091F, 0x1093F, 0x10A7F, 0x111CD, 0x111DB, 0x112A9, 0x1145D, 0x114C6, 0x116B9, 0x1183B, 0x119E2, 0x11FFF, 0x16AF5, 0x16B44, 0x16FE2, 0x1BC9F);\nset.addRange(0x21, 0x23).addRange(0x25, 0x27).addRange(0x2E, 0x2F).addRange(0x3A, 0x3B).addRange(0x3F, 0x40).addRange(0xB6, 0xB7).addRange(0x55A, 0x55F).addRange(0x5F3, 0x5F4).addRange(0x609, 0x60A).addRange(0x60C, 0x60D).addRange(0x61D, 0x61F).addRange(0x66A, 0x66D).addRange(0x700, 0x70D).addRange(0x7F7, 0x7F9).addRange(0x830, 0x83E).addRange(0x964, 0x965).addRange(0xE5A, 0xE5B).addRange(0xF04, 0xF12).addRange(0xFD0, 0xFD4).addRange(0xFD9, 0xFDA).addRange(0x104A, 0x104F).addRange(0x1360, 0x1368).addRange(0x16EB, 0x16ED).addRange(0x1735, 0x1736).addRange(0x17D4, 0x17D6).addRange(0x17D8, 0x17DA).addRange(0x1800, 0x1805).addRange(0x1807, 0x180A).addRange(0x1944, 0x1945).addRange(0x1A1E, 0x1A1F).addRange(0x1AA0, 0x1AA6).addRange(0x1AA8, 0x1AAD).addRange(0x1B5A, 0x1B60).addRange(0x1B7D, 0x1B7E).addRange(0x1BFC, 0x1BFF).addRange(0x1C3B, 0x1C3F).addRange(0x1C7E, 0x1C7F).addRange(0x1CC0, 0x1CC7).addRange(0x2016, 0x2017).addRange(0x2020, 0x2027).addRange(0x2030, 0x2038).addRange(0x203B, 0x203E).addRange(0x2041, 0x2043).addRange(0x2047, 0x2051).addRange(0x2055, 0x205E).addRange(0x2CF9, 0x2CFC).addRange(0x2CFE, 0x2CFF).addRange(0x2E00, 0x2E01).addRange(0x2E06, 0x2E08).addRange(0x2E0E, 0x2E16).addRange(0x2E18, 0x2E19);\nset.addRange(0x2E1E, 0x2E1F).addRange(0x2E2A, 0x2E2E).addRange(0x2E30, 0x2E39).addRange(0x2E3C, 0x2E3F).addRange(0x2E43, 0x2E4F).addRange(0x2E52, 0x2E54).addRange(0x3001, 0x3003).addRange(0xA4FE, 0xA4FF).addRange(0xA60D, 0xA60F).addRange(0xA6F2, 0xA6F7).addRange(0xA874, 0xA877).addRange(0xA8CE, 0xA8CF).addRange(0xA8F8, 0xA8FA).addRange(0xA92E, 0xA92F).addRange(0xA9C1, 0xA9CD).addRange(0xA9DE, 0xA9DF).addRange(0xAA5C, 0xAA5F).addRange(0xAADE, 0xAADF).addRange(0xAAF0, 0xAAF1).addRange(0xFE10, 0xFE16).addRange(0xFE45, 0xFE46).addRange(0xFE49, 0xFE4C).addRange(0xFE50, 0xFE52).addRange(0xFE54, 0xFE57).addRange(0xFE5F, 0xFE61).addRange(0xFE6A, 0xFE6B).addRange(0xFF01, 0xFF03).addRange(0xFF05, 0xFF07).addRange(0xFF0E, 0xFF0F).addRange(0xFF1A, 0xFF1B).addRange(0xFF1F, 0xFF20).addRange(0xFF64, 0xFF65).addRange(0x10100, 0x10102).addRange(0x10A50, 0x10A58).addRange(0x10AF0, 0x10AF6).addRange(0x10B39, 0x10B3F).addRange(0x10B99, 0x10B9C).addRange(0x10F55, 0x10F59).addRange(0x10F86, 0x10F89).addRange(0x11047, 0x1104D).addRange(0x110BB, 0x110BC).addRange(0x110BE, 0x110C1).addRange(0x11140, 0x11143).addRange(0x11174, 0x11175).addRange(0x111C5, 0x111C8).addRange(0x111DD, 0x111DF).addRange(0x11238, 0x1123D).addRange(0x1144B, 0x1144F).addRange(0x1145A, 0x1145B).addRange(0x115C1, 0x115D7).addRange(0x11641, 0x11643);\nset.addRange(0x11660, 0x1166C).addRange(0x1173C, 0x1173E).addRange(0x11944, 0x11946).addRange(0x11A3F, 0x11A46).addRange(0x11A9A, 0x11A9C).addRange(0x11A9E, 0x11AA2).addRange(0x11B00, 0x11B09).addRange(0x11C41, 0x11C45).addRange(0x11C70, 0x11C71).addRange(0x11EF7, 0x11EF8).addRange(0x11F43, 0x11F4F).addRange(0x12470, 0x12474).addRange(0x12FF1, 0x12FF2).addRange(0x16A6E, 0x16A6F).addRange(0x16B37, 0x16B3B).addRange(0x16E97, 0x16E9A).addRange(0x1DA87, 0x1DA8B).addRange(0x1E95E, 0x1E95F);\nexports.characters = set;\n","const set = require('regenerate')(0xA6, 0xA9, 0xAE, 0xB0, 0x482, 0x6DE, 0x6E9, 0x7F6, 0x9FA, 0xB70, 0xBFA, 0xC7F, 0xD4F, 0xD79, 0xF13, 0xF34, 0xF36, 0xF38, 0x166D, 0x1940, 0x2114, 0x2125, 0x2127, 0x2129, 0x212E, 0x214A, 0x214F, 0x21D3, 0x3004, 0x3020, 0x31EF, 0x3250, 0xA839, 0xFDCF, 0xFFE4, 0xFFE8, 0x101A0, 0x10AC8, 0x1173F, 0x16B45, 0x1BC9C, 0x1D245, 0x1E14F, 0x1ECAC, 0x1ED2E, 0x1F7F0);\nset.addRange(0x58D, 0x58E).addRange(0x60E, 0x60F).addRange(0x6FD, 0x6FE).addRange(0xBF3, 0xBF8).addRange(0xF01, 0xF03).addRange(0xF15, 0xF17).addRange(0xF1A, 0xF1F).addRange(0xFBE, 0xFC5).addRange(0xFC7, 0xFCC).addRange(0xFCE, 0xFCF).addRange(0xFD5, 0xFD8).addRange(0x109E, 0x109F).addRange(0x1390, 0x1399).addRange(0x19DE, 0x19FF).addRange(0x1B61, 0x1B6A).addRange(0x1B74, 0x1B7C).addRange(0x2100, 0x2101).addRange(0x2103, 0x2106).addRange(0x2108, 0x2109).addRange(0x2116, 0x2117).addRange(0x211E, 0x2123).addRange(0x213A, 0x213B).addRange(0x214C, 0x214D).addRange(0x218A, 0x218B).addRange(0x2195, 0x2199).addRange(0x219C, 0x219F).addRange(0x21A1, 0x21A2).addRange(0x21A4, 0x21A5).addRange(0x21A7, 0x21AD).addRange(0x21AF, 0x21CD).addRange(0x21D0, 0x21D1).addRange(0x21D5, 0x21F3).addRange(0x2300, 0x2307).addRange(0x230C, 0x231F).addRange(0x2322, 0x2328).addRange(0x232B, 0x237B).addRange(0x237D, 0x239A).addRange(0x23B4, 0x23DB).addRange(0x23E2, 0x2426).addRange(0x2440, 0x244A).addRange(0x249C, 0x24E9).addRange(0x2500, 0x25B6).addRange(0x25B8, 0x25C0).addRange(0x25C2, 0x25F7).addRange(0x2600, 0x266E).addRange(0x2670, 0x2767).addRange(0x2794, 0x27BF).addRange(0x2800, 0x28FF).addRange(0x2B00, 0x2B2F).addRange(0x2B45, 0x2B46).addRange(0x2B4D, 0x2B73);\nset.addRange(0x2B76, 0x2B95).addRange(0x2B97, 0x2BFF).addRange(0x2CE5, 0x2CEA).addRange(0x2E50, 0x2E51).addRange(0x2E80, 0x2E99).addRange(0x2E9B, 0x2EF3).addRange(0x2F00, 0x2FD5).addRange(0x2FF0, 0x2FFF).addRange(0x3012, 0x3013).addRange(0x3036, 0x3037).addRange(0x303E, 0x303F).addRange(0x3190, 0x3191).addRange(0x3196, 0x319F).addRange(0x31C0, 0x31E3).addRange(0x3200, 0x321E).addRange(0x322A, 0x3247).addRange(0x3260, 0x327F).addRange(0x328A, 0x32B0).addRange(0x32C0, 0x33FF).addRange(0x4DC0, 0x4DFF).addRange(0xA490, 0xA4C6).addRange(0xA828, 0xA82B).addRange(0xA836, 0xA837).addRange(0xAA77, 0xAA79).addRange(0xFD40, 0xFD4F).addRange(0xFDFD, 0xFDFF).addRange(0xFFED, 0xFFEE).addRange(0xFFFC, 0xFFFD).addRange(0x10137, 0x1013F).addRange(0x10179, 0x10189).addRange(0x1018C, 0x1018E).addRange(0x10190, 0x1019C).addRange(0x101D0, 0x101FC).addRange(0x10877, 0x10878).addRange(0x11FD5, 0x11FDC).addRange(0x11FE1, 0x11FF1).addRange(0x16B3C, 0x16B3F).addRange(0x1CF50, 0x1CFC3).addRange(0x1D000, 0x1D0F5).addRange(0x1D100, 0x1D126).addRange(0x1D129, 0x1D164).addRange(0x1D16A, 0x1D16C).addRange(0x1D183, 0x1D184).addRange(0x1D18C, 0x1D1A9).addRange(0x1D1AE, 0x1D1EA).addRange(0x1D200, 0x1D241).addRange(0x1D300, 0x1D356).addRange(0x1D800, 0x1D9FF).addRange(0x1DA37, 0x1DA3A).addRange(0x1DA6D, 0x1DA74).addRange(0x1DA76, 0x1DA83);\nset.addRange(0x1DA85, 0x1DA86).addRange(0x1F000, 0x1F02B).addRange(0x1F030, 0x1F093).addRange(0x1F0A0, 0x1F0AE).addRange(0x1F0B1, 0x1F0BF).addRange(0x1F0C1, 0x1F0CF).addRange(0x1F0D1, 0x1F0F5).addRange(0x1F10D, 0x1F1AD).addRange(0x1F1E6, 0x1F202).addRange(0x1F210, 0x1F23B).addRange(0x1F240, 0x1F248).addRange(0x1F250, 0x1F251).addRange(0x1F260, 0x1F265).addRange(0x1F300, 0x1F3FA).addRange(0x1F400, 0x1F6D7).addRange(0x1F6DC, 0x1F6EC).addRange(0x1F6F0, 0x1F6FC).addRange(0x1F700, 0x1F776).addRange(0x1F77B, 0x1F7D9).addRange(0x1F7E0, 0x1F7EB).addRange(0x1F800, 0x1F80B).addRange(0x1F810, 0x1F847).addRange(0x1F850, 0x1F859).addRange(0x1F860, 0x1F887).addRange(0x1F890, 0x1F8AD).addRange(0x1F8B0, 0x1F8B1).addRange(0x1F900, 0x1FA53).addRange(0x1FA60, 0x1FA6D).addRange(0x1FA70, 0x1FA7C).addRange(0x1FA80, 0x1FA88).addRange(0x1FA90, 0x1FABD).addRange(0x1FABF, 0x1FAC5).addRange(0x1FACE, 0x1FADB).addRange(0x1FAE0, 0x1FAE8).addRange(0x1FAF0, 0x1FAF8).addRange(0x1FB00, 0x1FB92).addRange(0x1FB94, 0x1FBCA);\nexports.characters = set;\n","const set = require('regenerate')(0xAD, 0x38B, 0x38D, 0x3A2, 0x530, 0x590, 0x61C, 0x6DD, 0x83F, 0x85F, 0x8E2, 0x984, 0x9A9, 0x9B1, 0x9DE, 0xA04, 0xA29, 0xA31, 0xA34, 0xA37, 0xA3D, 0xA5D, 0xA84, 0xA8E, 0xA92, 0xAA9, 0xAB1, 0xAB4, 0xAC6, 0xACA, 0xB00, 0xB04, 0xB29, 0xB31, 0xB34, 0xB5E, 0xB84, 0xB91, 0xB9B, 0xB9D, 0xBC9, 0xC0D, 0xC11, 0xC29, 0xC45, 0xC49, 0xC57, 0xC8D, 0xC91, 0xCA9, 0xCB4, 0xCC5, 0xCC9, 0xCDF, 0xCF0, 0xD0D, 0xD11, 0xD45, 0xD49, 0xD80, 0xD84, 0xDB2, 0xDBC, 0xDD5, 0xDD7, 0xE83, 0xE85, 0xE8B, 0xEA4, 0xEA6, 0xEC5, 0xEC7, 0xECF, 0xF48, 0xF98, 0xFBD, 0xFCD, 0x10C6, 0x1249, 0x1257, 0x1259, 0x1289, 0x12B1, 0x12BF, 0x12C1, 0x12D7, 0x1311, 0x176D, 0x1771, 0x180E, 0x191F, 0x1A5F, 0x1B7F, 0x1F58, 0x1F5A, 0x1F5C, 0x1F5E, 0x1FB5, 0x1FC5, 0x1FDC, 0x1FF5, 0x1FFF, 0x208F, 0x2B96, 0x2D26, 0x2DA7, 0x2DAF, 0x2DB7, 0x2DBF, 0x2DC7, 0x2DCF, 0x2DD7, 0x2DDF, 0x2E9A, 0x3040, 0x3130, 0x318F, 0x321F, 0xA7D2, 0xA7D4, 0xA9CE, 0xA9FF, 0xAB27, 0xAB2F, 0xFB37, 0xFB3D, 0xFB3F, 0xFB42, 0xFB45, 0xFE53, 0xFE67, 0xFE75, 0xFFE7, 0x1000C, 0x10027, 0x1003B, 0x1003E, 0x1018F, 0x1039E, 0x1057B, 0x1058B, 0x10593, 0x10596, 0x105A2, 0x105B2, 0x105BA, 0x10786, 0x107B1, 0x10809, 0x10836, 0x10856, 0x108F3, 0x10A04, 0x10A14, 0x10A18, 0x10E7F, 0x10EAA, 0x110BD, 0x11135, 0x111E0, 0x11212, 0x11287, 0x11289, 0x1128E, 0x1129E, 0x11304, 0x11329, 0x11331, 0x11334, 0x1133A, 0x1145C, 0x11914, 0x11917, 0x11936, 0x11C09, 0x11C37, 0x11CA8, 0x11D07, 0x11D0A, 0x11D3B, 0x11D3E, 0x11D66, 0x11D69, 0x11D8F, 0x11D92, 0x11F11, 0x1246F, 0x16A5F, 0x16ABF, 0x16B5A, 0x16B62, 0x1AFF4, 0x1AFFC, 0x1AFFF, 0x1D455, 0x1D49D, 0x1D4AD, 0x1D4BA, 0x1D4BC, 0x1D4C4, 0x1D506, 0x1D515, 0x1D51D, 0x1D53A, 0x1D53F, 0x1D545, 0x1D551, 0x1DAA0, 0x1E007, 0x1E022, 0x1E025, 0x1E7E7, 0x1E7EC, 0x1E7EF, 0x1E7FF, 0x1EE04, 0x1EE20, 0x1EE23, 0x1EE28, 0x1EE33, 0x1EE38, 0x1EE3A, 0x1EE48, 0x1EE4A, 0x1EE4C, 0x1EE50, 0x1EE53, 0x1EE58, 0x1EE5A, 0x1EE5C, 0x1EE5E, 0x1EE60, 0x1EE63, 0x1EE6B, 0x1EE73, 0x1EE78, 0x1EE7D, 0x1EE7F, 0x1EE8A, 0x1EEA4, 0x1EEAA, 0x1F0C0, 0x1F0D0, 0x1FABE, 0x1FB93);\nset.addRange(0x0, 0x1F).addRange(0x7F, 0x9F).addRange(0x378, 0x379).addRange(0x380, 0x383).addRange(0x557, 0x558).addRange(0x58B, 0x58C).addRange(0x5C8, 0x5CF).addRange(0x5EB, 0x5EE).addRange(0x5F5, 0x605).addRange(0x70E, 0x70F).addRange(0x74B, 0x74C).addRange(0x7B2, 0x7BF).addRange(0x7FB, 0x7FC).addRange(0x82E, 0x82F).addRange(0x85C, 0x85D).addRange(0x86B, 0x86F).addRange(0x88F, 0x897).addRange(0x98D, 0x98E).addRange(0x991, 0x992).addRange(0x9B3, 0x9B5).addRange(0x9BA, 0x9BB).addRange(0x9C5, 0x9C6).addRange(0x9C9, 0x9CA).addRange(0x9CF, 0x9D6).addRange(0x9D8, 0x9DB).addRange(0x9E4, 0x9E5).addRange(0x9FF, 0xA00).addRange(0xA0B, 0xA0E).addRange(0xA11, 0xA12).addRange(0xA3A, 0xA3B).addRange(0xA43, 0xA46).addRange(0xA49, 0xA4A).addRange(0xA4E, 0xA50).addRange(0xA52, 0xA58).addRange(0xA5F, 0xA65).addRange(0xA77, 0xA80).addRange(0xABA, 0xABB).addRange(0xACE, 0xACF).addRange(0xAD1, 0xADF).addRange(0xAE4, 0xAE5).addRange(0xAF2, 0xAF8).addRange(0xB0D, 0xB0E).addRange(0xB11, 0xB12).addRange(0xB3A, 0xB3B).addRange(0xB45, 0xB46).addRange(0xB49, 0xB4A).addRange(0xB4E, 0xB54).addRange(0xB58, 0xB5B).addRange(0xB64, 0xB65).addRange(0xB78, 0xB81).addRange(0xB8B, 0xB8D);\nset.addRange(0xB96, 0xB98).addRange(0xBA0, 0xBA2).addRange(0xBA5, 0xBA7).addRange(0xBAB, 0xBAD).addRange(0xBBA, 0xBBD).addRange(0xBC3, 0xBC5).addRange(0xBCE, 0xBCF).addRange(0xBD1, 0xBD6).addRange(0xBD8, 0xBE5).addRange(0xBFB, 0xBFF).addRange(0xC3A, 0xC3B).addRange(0xC4E, 0xC54).addRange(0xC5B, 0xC5C).addRange(0xC5E, 0xC5F).addRange(0xC64, 0xC65).addRange(0xC70, 0xC76).addRange(0xCBA, 0xCBB).addRange(0xCCE, 0xCD4).addRange(0xCD7, 0xCDC).addRange(0xCE4, 0xCE5).addRange(0xCF4, 0xCFF).addRange(0xD50, 0xD53).addRange(0xD64, 0xD65).addRange(0xD97, 0xD99).addRange(0xDBE, 0xDBF).addRange(0xDC7, 0xDC9).addRange(0xDCB, 0xDCE).addRange(0xDE0, 0xDE5).addRange(0xDF0, 0xDF1).addRange(0xDF5, 0xE00).addRange(0xE3B, 0xE3E).addRange(0xE5C, 0xE80).addRange(0xEBE, 0xEBF).addRange(0xEDA, 0xEDB).addRange(0xEE0, 0xEFF).addRange(0xF6D, 0xF70).addRange(0xFDB, 0xFFF).addRange(0x10C8, 0x10CC).addRange(0x10CE, 0x10CF).addRange(0x124E, 0x124F).addRange(0x125E, 0x125F).addRange(0x128E, 0x128F).addRange(0x12B6, 0x12B7).addRange(0x12C6, 0x12C7).addRange(0x1316, 0x1317).addRange(0x135B, 0x135C).addRange(0x137D, 0x137F).addRange(0x139A, 0x139F).addRange(0x13F6, 0x13F7).addRange(0x13FE, 0x13FF).addRange(0x169D, 0x169F);\nset.addRange(0x16F9, 0x16FF).addRange(0x1716, 0x171E).addRange(0x1737, 0x173F).addRange(0x1754, 0x175F).addRange(0x1774, 0x177F).addRange(0x17DE, 0x17DF).addRange(0x17EA, 0x17EF).addRange(0x17FA, 0x17FF).addRange(0x181A, 0x181F).addRange(0x1879, 0x187F).addRange(0x18AB, 0x18AF).addRange(0x18F6, 0x18FF).addRange(0x192C, 0x192F).addRange(0x193C, 0x193F).addRange(0x1941, 0x1943).addRange(0x196E, 0x196F).addRange(0x1975, 0x197F).addRange(0x19AC, 0x19AF).addRange(0x19CA, 0x19CF).addRange(0x19DB, 0x19DD).addRange(0x1A1C, 0x1A1D).addRange(0x1A7D, 0x1A7E).addRange(0x1A8A, 0x1A8F).addRange(0x1A9A, 0x1A9F).addRange(0x1AAE, 0x1AAF).addRange(0x1ACF, 0x1AFF).addRange(0x1B4D, 0x1B4F).addRange(0x1BF4, 0x1BFB).addRange(0x1C38, 0x1C3A).addRange(0x1C4A, 0x1C4C).addRange(0x1C89, 0x1C8F).addRange(0x1CBB, 0x1CBC).addRange(0x1CC8, 0x1CCF).addRange(0x1CFB, 0x1CFF).addRange(0x1F16, 0x1F17).addRange(0x1F1E, 0x1F1F).addRange(0x1F46, 0x1F47).addRange(0x1F4E, 0x1F4F).addRange(0x1F7E, 0x1F7F).addRange(0x1FD4, 0x1FD5).addRange(0x1FF0, 0x1FF1).addRange(0x200B, 0x200F).addRange(0x202A, 0x202E).addRange(0x2060, 0x206F).addRange(0x2072, 0x2073).addRange(0x209D, 0x209F).addRange(0x20C1, 0x20CF).addRange(0x20F1, 0x20FF).addRange(0x218C, 0x218F).addRange(0x2427, 0x243F).addRange(0x244B, 0x245F);\nset.addRange(0x2B74, 0x2B75).addRange(0x2CF4, 0x2CF8).addRange(0x2D28, 0x2D2C).addRange(0x2D2E, 0x2D2F).addRange(0x2D68, 0x2D6E).addRange(0x2D71, 0x2D7E).addRange(0x2D97, 0x2D9F).addRange(0x2E5E, 0x2E7F).addRange(0x2EF4, 0x2EFF).addRange(0x2FD6, 0x2FEF).addRange(0x3097, 0x3098).addRange(0x3100, 0x3104).addRange(0x31E4, 0x31EE).addRange(0xA48D, 0xA48F).addRange(0xA4C7, 0xA4CF).addRange(0xA62C, 0xA63F).addRange(0xA6F8, 0xA6FF).addRange(0xA7CB, 0xA7CF).addRange(0xA7DA, 0xA7F1).addRange(0xA82D, 0xA82F).addRange(0xA83A, 0xA83F).addRange(0xA878, 0xA87F).addRange(0xA8C6, 0xA8CD).addRange(0xA8DA, 0xA8DF).addRange(0xA954, 0xA95E).addRange(0xA97D, 0xA97F).addRange(0xA9DA, 0xA9DD).addRange(0xAA37, 0xAA3F).addRange(0xAA4E, 0xAA4F).addRange(0xAA5A, 0xAA5B).addRange(0xAAC3, 0xAADA).addRange(0xAAF7, 0xAB00).addRange(0xAB07, 0xAB08).addRange(0xAB0F, 0xAB10).addRange(0xAB17, 0xAB1F).addRange(0xAB6C, 0xAB6F).addRange(0xABEE, 0xABEF).addRange(0xABFA, 0xABFF).addRange(0xD7A4, 0xD7AF).addRange(0xD7C7, 0xD7CA).addRange(0xD7FC, 0xF8FF).addRange(0xFA6E, 0xFA6F).addRange(0xFADA, 0xFAFF).addRange(0xFB07, 0xFB12).addRange(0xFB18, 0xFB1C).addRange(0xFBC3, 0xFBD2).addRange(0xFD90, 0xFD91).addRange(0xFDC8, 0xFDCE).addRange(0xFDD0, 0xFDEF).addRange(0xFE1A, 0xFE1F).addRange(0xFE6C, 0xFE6F);\nset.addRange(0xFEFD, 0xFF00).addRange(0xFFBF, 0xFFC1).addRange(0xFFC8, 0xFFC9).addRange(0xFFD0, 0xFFD1).addRange(0xFFD8, 0xFFD9).addRange(0xFFDD, 0xFFDF).addRange(0xFFEF, 0xFFFB).addRange(0xFFFE, 0xFFFF).addRange(0x1004E, 0x1004F).addRange(0x1005E, 0x1007F).addRange(0x100FB, 0x100FF).addRange(0x10103, 0x10106).addRange(0x10134, 0x10136).addRange(0x1019D, 0x1019F).addRange(0x101A1, 0x101CF).addRange(0x101FE, 0x1027F).addRange(0x1029D, 0x1029F).addRange(0x102D1, 0x102DF).addRange(0x102FC, 0x102FF).addRange(0x10324, 0x1032C).addRange(0x1034B, 0x1034F).addRange(0x1037B, 0x1037F).addRange(0x103C4, 0x103C7).addRange(0x103D6, 0x103FF).addRange(0x1049E, 0x1049F).addRange(0x104AA, 0x104AF).addRange(0x104D4, 0x104D7).addRange(0x104FC, 0x104FF).addRange(0x10528, 0x1052F).addRange(0x10564, 0x1056E).addRange(0x105BD, 0x105FF).addRange(0x10737, 0x1073F).addRange(0x10756, 0x1075F).addRange(0x10768, 0x1077F).addRange(0x107BB, 0x107FF).addRange(0x10806, 0x10807).addRange(0x10839, 0x1083B).addRange(0x1083D, 0x1083E).addRange(0x1089F, 0x108A6).addRange(0x108B0, 0x108DF).addRange(0x108F6, 0x108FA).addRange(0x1091C, 0x1091E).addRange(0x1093A, 0x1093E).addRange(0x10940, 0x1097F).addRange(0x109B8, 0x109BB).addRange(0x109D0, 0x109D1).addRange(0x10A07, 0x10A0B).addRange(0x10A36, 0x10A37).addRange(0x10A3B, 0x10A3E).addRange(0x10A49, 0x10A4F).addRange(0x10A59, 0x10A5F);\nset.addRange(0x10AA0, 0x10ABF).addRange(0x10AE7, 0x10AEA).addRange(0x10AF7, 0x10AFF).addRange(0x10B36, 0x10B38).addRange(0x10B56, 0x10B57).addRange(0x10B73, 0x10B77).addRange(0x10B92, 0x10B98).addRange(0x10B9D, 0x10BA8).addRange(0x10BB0, 0x10BFF).addRange(0x10C49, 0x10C7F).addRange(0x10CB3, 0x10CBF).addRange(0x10CF3, 0x10CF9).addRange(0x10D28, 0x10D2F).addRange(0x10D3A, 0x10E5F).addRange(0x10EAE, 0x10EAF).addRange(0x10EB2, 0x10EFC).addRange(0x10F28, 0x10F2F).addRange(0x10F5A, 0x10F6F).addRange(0x10F8A, 0x10FAF).addRange(0x10FCC, 0x10FDF).addRange(0x10FF7, 0x10FFF).addRange(0x1104E, 0x11051).addRange(0x11076, 0x1107E).addRange(0x110C3, 0x110CF).addRange(0x110E9, 0x110EF).addRange(0x110FA, 0x110FF).addRange(0x11148, 0x1114F).addRange(0x11177, 0x1117F).addRange(0x111F5, 0x111FF).addRange(0x11242, 0x1127F).addRange(0x112AA, 0x112AF).addRange(0x112EB, 0x112EF).addRange(0x112FA, 0x112FF).addRange(0x1130D, 0x1130E).addRange(0x11311, 0x11312).addRange(0x11345, 0x11346).addRange(0x11349, 0x1134A).addRange(0x1134E, 0x1134F).addRange(0x11351, 0x11356).addRange(0x11358, 0x1135C).addRange(0x11364, 0x11365).addRange(0x1136D, 0x1136F).addRange(0x11375, 0x113FF).addRange(0x11462, 0x1147F).addRange(0x114C8, 0x114CF).addRange(0x114DA, 0x1157F).addRange(0x115B6, 0x115B7).addRange(0x115DE, 0x115FF).addRange(0x11645, 0x1164F).addRange(0x1165A, 0x1165F).addRange(0x1166D, 0x1167F);\nset.addRange(0x116BA, 0x116BF).addRange(0x116CA, 0x116FF).addRange(0x1171B, 0x1171C).addRange(0x1172C, 0x1172F).addRange(0x11747, 0x117FF).addRange(0x1183C, 0x1189F).addRange(0x118F3, 0x118FE).addRange(0x11907, 0x11908).addRange(0x1190A, 0x1190B).addRange(0x11939, 0x1193A).addRange(0x11947, 0x1194F).addRange(0x1195A, 0x1199F).addRange(0x119A8, 0x119A9).addRange(0x119D8, 0x119D9).addRange(0x119E5, 0x119FF).addRange(0x11A48, 0x11A4F).addRange(0x11AA3, 0x11AAF).addRange(0x11AF9, 0x11AFF).addRange(0x11B0A, 0x11BFF).addRange(0x11C46, 0x11C4F).addRange(0x11C6D, 0x11C6F).addRange(0x11C90, 0x11C91).addRange(0x11CB7, 0x11CFF).addRange(0x11D37, 0x11D39).addRange(0x11D48, 0x11D4F).addRange(0x11D5A, 0x11D5F).addRange(0x11D99, 0x11D9F).addRange(0x11DAA, 0x11EDF).addRange(0x11EF9, 0x11EFF).addRange(0x11F3B, 0x11F3D).addRange(0x11F5A, 0x11FAF).addRange(0x11FB1, 0x11FBF).addRange(0x11FF2, 0x11FFE).addRange(0x1239A, 0x123FF).addRange(0x12475, 0x1247F).addRange(0x12544, 0x12F8F).addRange(0x12FF3, 0x12FFF).addRange(0x13430, 0x1343F).addRange(0x13456, 0x143FF).addRange(0x14647, 0x167FF).addRange(0x16A39, 0x16A3F).addRange(0x16A6A, 0x16A6D).addRange(0x16ACA, 0x16ACF).addRange(0x16AEE, 0x16AEF).addRange(0x16AF6, 0x16AFF).addRange(0x16B46, 0x16B4F).addRange(0x16B78, 0x16B7C).addRange(0x16B90, 0x16E3F).addRange(0x16E9B, 0x16EFF).addRange(0x16F4B, 0x16F4E).addRange(0x16F88, 0x16F8E);\nset.addRange(0x16FA0, 0x16FDF).addRange(0x16FE5, 0x16FEF).addRange(0x16FF2, 0x16FFF).addRange(0x187F8, 0x187FF).addRange(0x18CD6, 0x18CFF).addRange(0x18D09, 0x1AFEF).addRange(0x1B123, 0x1B131).addRange(0x1B133, 0x1B14F).addRange(0x1B153, 0x1B154).addRange(0x1B156, 0x1B163).addRange(0x1B168, 0x1B16F).addRange(0x1B2FC, 0x1BBFF).addRange(0x1BC6B, 0x1BC6F).addRange(0x1BC7D, 0x1BC7F).addRange(0x1BC89, 0x1BC8F).addRange(0x1BC9A, 0x1BC9B).addRange(0x1BCA0, 0x1CEFF).addRange(0x1CF2E, 0x1CF2F).addRange(0x1CF47, 0x1CF4F).addRange(0x1CFC4, 0x1CFFF).addRange(0x1D0F6, 0x1D0FF).addRange(0x1D127, 0x1D128).addRange(0x1D173, 0x1D17A).addRange(0x1D1EB, 0x1D1FF).addRange(0x1D246, 0x1D2BF).addRange(0x1D2D4, 0x1D2DF).addRange(0x1D2F4, 0x1D2FF).addRange(0x1D357, 0x1D35F).addRange(0x1D379, 0x1D3FF).addRange(0x1D4A0, 0x1D4A1).addRange(0x1D4A3, 0x1D4A4).addRange(0x1D4A7, 0x1D4A8).addRange(0x1D50B, 0x1D50C).addRange(0x1D547, 0x1D549).addRange(0x1D6A6, 0x1D6A7).addRange(0x1D7CC, 0x1D7CD).addRange(0x1DA8C, 0x1DA9A).addRange(0x1DAB0, 0x1DEFF).addRange(0x1DF1F, 0x1DF24).addRange(0x1DF2B, 0x1DFFF).addRange(0x1E019, 0x1E01A).addRange(0x1E02B, 0x1E02F).addRange(0x1E06E, 0x1E08E).addRange(0x1E090, 0x1E0FF).addRange(0x1E12D, 0x1E12F).addRange(0x1E13E, 0x1E13F).addRange(0x1E14A, 0x1E14D).addRange(0x1E150, 0x1E28F).addRange(0x1E2AF, 0x1E2BF).addRange(0x1E2FA, 0x1E2FE).addRange(0x1E300, 0x1E4CF);\nset.addRange(0x1E4FA, 0x1E7DF).addRange(0x1E8C5, 0x1E8C6).addRange(0x1E8D7, 0x1E8FF).addRange(0x1E94C, 0x1E94F).addRange(0x1E95A, 0x1E95D).addRange(0x1E960, 0x1EC70).addRange(0x1ECB5, 0x1ED00).addRange(0x1ED3E, 0x1EDFF).addRange(0x1EE25, 0x1EE26).addRange(0x1EE3C, 0x1EE41).addRange(0x1EE43, 0x1EE46).addRange(0x1EE55, 0x1EE56).addRange(0x1EE65, 0x1EE66).addRange(0x1EE9C, 0x1EEA0).addRange(0x1EEBC, 0x1EEEF).addRange(0x1EEF2, 0x1EFFF).addRange(0x1F02C, 0x1F02F).addRange(0x1F094, 0x1F09F).addRange(0x1F0AF, 0x1F0B0).addRange(0x1F0F6, 0x1F0FF).addRange(0x1F1AE, 0x1F1E5).addRange(0x1F203, 0x1F20F).addRange(0x1F23C, 0x1F23F).addRange(0x1F249, 0x1F24F).addRange(0x1F252, 0x1F25F).addRange(0x1F266, 0x1F2FF).addRange(0x1F6D8, 0x1F6DB).addRange(0x1F6ED, 0x1F6EF).addRange(0x1F6FD, 0x1F6FF).addRange(0x1F777, 0x1F77A).addRange(0x1F7DA, 0x1F7DF).addRange(0x1F7EC, 0x1F7EF).addRange(0x1F7F1, 0x1F7FF).addRange(0x1F80C, 0x1F80F).addRange(0x1F848, 0x1F84F).addRange(0x1F85A, 0x1F85F).addRange(0x1F888, 0x1F88F).addRange(0x1F8AE, 0x1F8AF).addRange(0x1F8B2, 0x1F8FF).addRange(0x1FA54, 0x1FA5F).addRange(0x1FA6E, 0x1FA6F).addRange(0x1FA7D, 0x1FA7F).addRange(0x1FA89, 0x1FA8F).addRange(0x1FAC6, 0x1FACD).addRange(0x1FADC, 0x1FADF).addRange(0x1FAE9, 0x1FAEF).addRange(0x1FAF9, 0x1FAFF).addRange(0x1FBCB, 0x1FBEF).addRange(0x1FBFA, 0x1FFFF).addRange(0x2A6E0, 0x2A6FF).addRange(0x2B73A, 0x2B73F);\nset.addRange(0x2B81E, 0x2B81F).addRange(0x2CEA2, 0x2CEAF).addRange(0x2EBE1, 0x2EBEF).addRange(0x2EE5E, 0x2F7FF).addRange(0x2FA1E, 0x2FFFF).addRange(0x3134B, 0x3134F).addRange(0x323B0, 0xE00FF).addRange(0xE01F0, 0x10FFFF);\nexports.characters = set;\n","const set = require('regenerate')(0x2029);\n\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0xE000, 0xF8FF).addRange(0xF0000, 0xFFFFD).addRange(0x100000, 0x10FFFD);\nexports.characters = set;\n","const set = require('regenerate')(0x5F, 0x7B, 0x7D, 0xA1, 0xA7, 0xAB, 0xBB, 0xBF, 0x37E, 0x387, 0x5BE, 0x5C0, 0x5C3, 0x5C6, 0x61B, 0x6D4, 0x85E, 0x970, 0x9FD, 0xA76, 0xAF0, 0xC77, 0xC84, 0xDF4, 0xE4F, 0xF14, 0xF85, 0x10FB, 0x1400, 0x166E, 0x1CD3, 0x2D70, 0x3030, 0x303D, 0x30A0, 0x30FB, 0xA673, 0xA67E, 0xA8FC, 0xA95F, 0xABEB, 0xFE63, 0xFE68, 0xFF3F, 0xFF5B, 0xFF5D, 0x1039F, 0x103D0, 0x1056F, 0x10857, 0x1091F, 0x1093F, 0x10A7F, 0x10EAD, 0x111CD, 0x111DB, 0x112A9, 0x1145D, 0x114C6, 0x116B9, 0x1183B, 0x119E2, 0x11FFF, 0x16AF5, 0x16B44, 0x16FE2, 0x1BC9F);\nset.addRange(0x21, 0x23).addRange(0x25, 0x2A).addRange(0x2C, 0x2F).addRange(0x3A, 0x3B).addRange(0x3F, 0x40).addRange(0x5B, 0x5D).addRange(0xB6, 0xB7).addRange(0x55A, 0x55F).addRange(0x589, 0x58A).addRange(0x5F3, 0x5F4).addRange(0x609, 0x60A).addRange(0x60C, 0x60D).addRange(0x61D, 0x61F).addRange(0x66A, 0x66D).addRange(0x700, 0x70D).addRange(0x7F7, 0x7F9).addRange(0x830, 0x83E).addRange(0x964, 0x965).addRange(0xE5A, 0xE5B).addRange(0xF04, 0xF12).addRange(0xF3A, 0xF3D).addRange(0xFD0, 0xFD4).addRange(0xFD9, 0xFDA).addRange(0x104A, 0x104F).addRange(0x1360, 0x1368).addRange(0x169B, 0x169C).addRange(0x16EB, 0x16ED).addRange(0x1735, 0x1736).addRange(0x17D4, 0x17D6).addRange(0x17D8, 0x17DA).addRange(0x1800, 0x180A).addRange(0x1944, 0x1945).addRange(0x1A1E, 0x1A1F).addRange(0x1AA0, 0x1AA6).addRange(0x1AA8, 0x1AAD).addRange(0x1B5A, 0x1B60).addRange(0x1B7D, 0x1B7E).addRange(0x1BFC, 0x1BFF).addRange(0x1C3B, 0x1C3F).addRange(0x1C7E, 0x1C7F).addRange(0x1CC0, 0x1CC7).addRange(0x2010, 0x2027).addRange(0x2030, 0x2043).addRange(0x2045, 0x2051).addRange(0x2053, 0x205E).addRange(0x207D, 0x207E).addRange(0x208D, 0x208E).addRange(0x2308, 0x230B).addRange(0x2329, 0x232A).addRange(0x2768, 0x2775).addRange(0x27C5, 0x27C6);\nset.addRange(0x27E6, 0x27EF).addRange(0x2983, 0x2998).addRange(0x29D8, 0x29DB).addRange(0x29FC, 0x29FD).addRange(0x2CF9, 0x2CFC).addRange(0x2CFE, 0x2CFF).addRange(0x2E00, 0x2E2E).addRange(0x2E30, 0x2E4F).addRange(0x2E52, 0x2E5D).addRange(0x3001, 0x3003).addRange(0x3008, 0x3011).addRange(0x3014, 0x301F).addRange(0xA4FE, 0xA4FF).addRange(0xA60D, 0xA60F).addRange(0xA6F2, 0xA6F7).addRange(0xA874, 0xA877).addRange(0xA8CE, 0xA8CF).addRange(0xA8F8, 0xA8FA).addRange(0xA92E, 0xA92F).addRange(0xA9C1, 0xA9CD).addRange(0xA9DE, 0xA9DF).addRange(0xAA5C, 0xAA5F).addRange(0xAADE, 0xAADF).addRange(0xAAF0, 0xAAF1).addRange(0xFD3E, 0xFD3F).addRange(0xFE10, 0xFE19).addRange(0xFE30, 0xFE52).addRange(0xFE54, 0xFE61).addRange(0xFE6A, 0xFE6B).addRange(0xFF01, 0xFF03).addRange(0xFF05, 0xFF0A).addRange(0xFF0C, 0xFF0F).addRange(0xFF1A, 0xFF1B).addRange(0xFF1F, 0xFF20).addRange(0xFF3B, 0xFF3D).addRange(0xFF5F, 0xFF65).addRange(0x10100, 0x10102).addRange(0x10A50, 0x10A58).addRange(0x10AF0, 0x10AF6).addRange(0x10B39, 0x10B3F).addRange(0x10B99, 0x10B9C).addRange(0x10F55, 0x10F59).addRange(0x10F86, 0x10F89).addRange(0x11047, 0x1104D).addRange(0x110BB, 0x110BC).addRange(0x110BE, 0x110C1).addRange(0x11140, 0x11143).addRange(0x11174, 0x11175).addRange(0x111C5, 0x111C8).addRange(0x111DD, 0x111DF).addRange(0x11238, 0x1123D);\nset.addRange(0x1144B, 0x1144F).addRange(0x1145A, 0x1145B).addRange(0x115C1, 0x115D7).addRange(0x11641, 0x11643).addRange(0x11660, 0x1166C).addRange(0x1173C, 0x1173E).addRange(0x11944, 0x11946).addRange(0x11A3F, 0x11A46).addRange(0x11A9A, 0x11A9C).addRange(0x11A9E, 0x11AA2).addRange(0x11B00, 0x11B09).addRange(0x11C41, 0x11C45).addRange(0x11C70, 0x11C71).addRange(0x11EF7, 0x11EF8).addRange(0x11F43, 0x11F4F).addRange(0x12470, 0x12474).addRange(0x12FF1, 0x12FF2).addRange(0x16A6E, 0x16A6F).addRange(0x16B37, 0x16B3B).addRange(0x16E97, 0x16E9A).addRange(0x1DA87, 0x1DA8B).addRange(0x1E95E, 0x1E95F);\nexports.characters = set;\n","const set = require('regenerate')(0x20, 0xA0, 0x1680, 0x202F, 0x205F, 0x3000);\nset.addRange(0x2000, 0x200A).addRange(0x2028, 0x2029);\nexports.characters = set;\n","const set = require('regenerate')(0x20, 0xA0, 0x1680, 0x202F, 0x205F, 0x3000);\nset.addRange(0x2000, 0x200A);\nexports.characters = set;\n","const set = require('regenerate')(0x903, 0x93B, 0x9D7, 0xA03, 0xA83, 0xAC9, 0xB3E, 0xB40, 0xB57, 0xBD7, 0xCBE, 0xCF3, 0xD57, 0xF7F, 0x1031, 0x1038, 0x108F, 0x1715, 0x1734, 0x17B6, 0x1A55, 0x1A57, 0x1A61, 0x1B04, 0x1B35, 0x1B3B, 0x1B82, 0x1BA1, 0x1BAA, 0x1BE7, 0x1BEE, 0x1CE1, 0x1CF7, 0xA827, 0xA983, 0xAA4D, 0xAA7B, 0xAA7D, 0xAAEB, 0xAAF5, 0xABEC, 0x11000, 0x11002, 0x11082, 0x1112C, 0x11182, 0x111CE, 0x11235, 0x11357, 0x11445, 0x114B9, 0x114C1, 0x115BE, 0x1163E, 0x116AC, 0x116B6, 0x11726, 0x11838, 0x1193D, 0x11940, 0x11942, 0x119E4, 0x11A39, 0x11A97, 0x11C2F, 0x11C3E, 0x11CA9, 0x11CB1, 0x11CB4, 0x11D96, 0x11F03, 0x11F41);\nset.addRange(0x93E, 0x940).addRange(0x949, 0x94C).addRange(0x94E, 0x94F).addRange(0x982, 0x983).addRange(0x9BE, 0x9C0).addRange(0x9C7, 0x9C8).addRange(0x9CB, 0x9CC).addRange(0xA3E, 0xA40).addRange(0xABE, 0xAC0).addRange(0xACB, 0xACC).addRange(0xB02, 0xB03).addRange(0xB47, 0xB48).addRange(0xB4B, 0xB4C).addRange(0xBBE, 0xBBF).addRange(0xBC1, 0xBC2).addRange(0xBC6, 0xBC8).addRange(0xBCA, 0xBCC).addRange(0xC01, 0xC03).addRange(0xC41, 0xC44).addRange(0xC82, 0xC83).addRange(0xCC0, 0xCC4).addRange(0xCC7, 0xCC8).addRange(0xCCA, 0xCCB).addRange(0xCD5, 0xCD6).addRange(0xD02, 0xD03).addRange(0xD3E, 0xD40).addRange(0xD46, 0xD48).addRange(0xD4A, 0xD4C).addRange(0xD82, 0xD83).addRange(0xDCF, 0xDD1).addRange(0xDD8, 0xDDF).addRange(0xDF2, 0xDF3).addRange(0xF3E, 0xF3F).addRange(0x102B, 0x102C).addRange(0x103B, 0x103C).addRange(0x1056, 0x1057).addRange(0x1062, 0x1064).addRange(0x1067, 0x106D).addRange(0x1083, 0x1084).addRange(0x1087, 0x108C).addRange(0x109A, 0x109C).addRange(0x17BE, 0x17C5).addRange(0x17C7, 0x17C8).addRange(0x1923, 0x1926).addRange(0x1929, 0x192B).addRange(0x1930, 0x1931).addRange(0x1933, 0x1938).addRange(0x1A19, 0x1A1A).addRange(0x1A63, 0x1A64).addRange(0x1A6D, 0x1A72).addRange(0x1B3D, 0x1B41);\nset.addRange(0x1B43, 0x1B44).addRange(0x1BA6, 0x1BA7).addRange(0x1BEA, 0x1BEC).addRange(0x1BF2, 0x1BF3).addRange(0x1C24, 0x1C2B).addRange(0x1C34, 0x1C35).addRange(0x302E, 0x302F).addRange(0xA823, 0xA824).addRange(0xA880, 0xA881).addRange(0xA8B4, 0xA8C3).addRange(0xA952, 0xA953).addRange(0xA9B4, 0xA9B5).addRange(0xA9BA, 0xA9BB).addRange(0xA9BE, 0xA9C0).addRange(0xAA2F, 0xAA30).addRange(0xAA33, 0xAA34).addRange(0xAAEE, 0xAAEF).addRange(0xABE3, 0xABE4).addRange(0xABE6, 0xABE7).addRange(0xABE9, 0xABEA).addRange(0x110B0, 0x110B2).addRange(0x110B7, 0x110B8).addRange(0x11145, 0x11146).addRange(0x111B3, 0x111B5).addRange(0x111BF, 0x111C0).addRange(0x1122C, 0x1122E).addRange(0x11232, 0x11233).addRange(0x112E0, 0x112E2).addRange(0x11302, 0x11303).addRange(0x1133E, 0x1133F).addRange(0x11341, 0x11344).addRange(0x11347, 0x11348).addRange(0x1134B, 0x1134D).addRange(0x11362, 0x11363).addRange(0x11435, 0x11437).addRange(0x11440, 0x11441).addRange(0x114B0, 0x114B2).addRange(0x114BB, 0x114BE).addRange(0x115AF, 0x115B1).addRange(0x115B8, 0x115BB).addRange(0x11630, 0x11632).addRange(0x1163B, 0x1163C).addRange(0x116AE, 0x116AF).addRange(0x11720, 0x11721).addRange(0x1182C, 0x1182E).addRange(0x11930, 0x11935).addRange(0x11937, 0x11938).addRange(0x119D1, 0x119D3).addRange(0x119DC, 0x119DF).addRange(0x11A57, 0x11A58).addRange(0x11D8A, 0x11D8E);\nset.addRange(0x11D93, 0x11D94).addRange(0x11EF5, 0x11EF6).addRange(0x11F34, 0x11F35).addRange(0x11F3E, 0x11F3F).addRange(0x16F51, 0x16F87).addRange(0x16FF0, 0x16FF1).addRange(0x1D165, 0x1D166).addRange(0x1D16D, 0x1D172);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0xD800, 0xDFFF);\nexports.characters = set;\n","const set = require('regenerate')(0x24, 0x2B, 0x5E, 0x60, 0x7C, 0x7E, 0xAC, 0xB4, 0xB8, 0xD7, 0xF7, 0x2ED, 0x375, 0x3F6, 0x482, 0x60B, 0x6DE, 0x6E9, 0x7F6, 0x888, 0xAF1, 0xB70, 0xC7F, 0xD4F, 0xD79, 0xE3F, 0xF13, 0xF34, 0xF36, 0xF38, 0x166D, 0x17DB, 0x1940, 0x1FBD, 0x2044, 0x2052, 0x2114, 0x2125, 0x2127, 0x2129, 0x212E, 0x214F, 0x3004, 0x3020, 0x31EF, 0x3250, 0xAB5B, 0xFB29, 0xFDCF, 0xFE62, 0xFE69, 0xFF04, 0xFF0B, 0xFF3E, 0xFF40, 0xFF5C, 0xFF5E, 0x101A0, 0x10AC8, 0x1173F, 0x16B45, 0x1BC9C, 0x1D245, 0x1D6C1, 0x1D6DB, 0x1D6FB, 0x1D715, 0x1D735, 0x1D74F, 0x1D76F, 0x1D789, 0x1D7A9, 0x1D7C3, 0x1E14F, 0x1E2FF, 0x1ECAC, 0x1ECB0, 0x1ED2E, 0x1F7F0);\nset.addRange(0x3C, 0x3E).addRange(0xA2, 0xA6).addRange(0xA8, 0xA9).addRange(0xAE, 0xB1).addRange(0x2C2, 0x2C5).addRange(0x2D2, 0x2DF).addRange(0x2E5, 0x2EB).addRange(0x2EF, 0x2FF).addRange(0x384, 0x385).addRange(0x58D, 0x58F).addRange(0x606, 0x608).addRange(0x60E, 0x60F).addRange(0x6FD, 0x6FE).addRange(0x7FE, 0x7FF).addRange(0x9F2, 0x9F3).addRange(0x9FA, 0x9FB).addRange(0xBF3, 0xBFA).addRange(0xF01, 0xF03).addRange(0xF15, 0xF17).addRange(0xF1A, 0xF1F).addRange(0xFBE, 0xFC5).addRange(0xFC7, 0xFCC).addRange(0xFCE, 0xFCF).addRange(0xFD5, 0xFD8).addRange(0x109E, 0x109F).addRange(0x1390, 0x1399).addRange(0x19DE, 0x19FF).addRange(0x1B61, 0x1B6A).addRange(0x1B74, 0x1B7C).addRange(0x1FBF, 0x1FC1).addRange(0x1FCD, 0x1FCF).addRange(0x1FDD, 0x1FDF).addRange(0x1FED, 0x1FEF).addRange(0x1FFD, 0x1FFE).addRange(0x207A, 0x207C).addRange(0x208A, 0x208C).addRange(0x20A0, 0x20C0).addRange(0x2100, 0x2101).addRange(0x2103, 0x2106).addRange(0x2108, 0x2109).addRange(0x2116, 0x2118).addRange(0x211E, 0x2123).addRange(0x213A, 0x213B).addRange(0x2140, 0x2144).addRange(0x214A, 0x214D).addRange(0x218A, 0x218B).addRange(0x2190, 0x2307).addRange(0x230C, 0x2328).addRange(0x232B, 0x2426).addRange(0x2440, 0x244A).addRange(0x249C, 0x24E9);\nset.addRange(0x2500, 0x2767).addRange(0x2794, 0x27C4).addRange(0x27C7, 0x27E5).addRange(0x27F0, 0x2982).addRange(0x2999, 0x29D7).addRange(0x29DC, 0x29FB).addRange(0x29FE, 0x2B73).addRange(0x2B76, 0x2B95).addRange(0x2B97, 0x2BFF).addRange(0x2CE5, 0x2CEA).addRange(0x2E50, 0x2E51).addRange(0x2E80, 0x2E99).addRange(0x2E9B, 0x2EF3).addRange(0x2F00, 0x2FD5).addRange(0x2FF0, 0x2FFF).addRange(0x3012, 0x3013).addRange(0x3036, 0x3037).addRange(0x303E, 0x303F).addRange(0x309B, 0x309C).addRange(0x3190, 0x3191).addRange(0x3196, 0x319F).addRange(0x31C0, 0x31E3).addRange(0x3200, 0x321E).addRange(0x322A, 0x3247).addRange(0x3260, 0x327F).addRange(0x328A, 0x32B0).addRange(0x32C0, 0x33FF).addRange(0x4DC0, 0x4DFF).addRange(0xA490, 0xA4C6).addRange(0xA700, 0xA716).addRange(0xA720, 0xA721).addRange(0xA789, 0xA78A).addRange(0xA828, 0xA82B).addRange(0xA836, 0xA839).addRange(0xAA77, 0xAA79).addRange(0xAB6A, 0xAB6B).addRange(0xFBB2, 0xFBC2).addRange(0xFD40, 0xFD4F).addRange(0xFDFC, 0xFDFF).addRange(0xFE64, 0xFE66).addRange(0xFF1C, 0xFF1E).addRange(0xFFE0, 0xFFE6).addRange(0xFFE8, 0xFFEE).addRange(0xFFFC, 0xFFFD).addRange(0x10137, 0x1013F).addRange(0x10179, 0x10189).addRange(0x1018C, 0x1018E).addRange(0x10190, 0x1019C).addRange(0x101D0, 0x101FC).addRange(0x10877, 0x10878).addRange(0x11FD5, 0x11FF1);\nset.addRange(0x16B3C, 0x16B3F).addRange(0x1CF50, 0x1CFC3).addRange(0x1D000, 0x1D0F5).addRange(0x1D100, 0x1D126).addRange(0x1D129, 0x1D164).addRange(0x1D16A, 0x1D16C).addRange(0x1D183, 0x1D184).addRange(0x1D18C, 0x1D1A9).addRange(0x1D1AE, 0x1D1EA).addRange(0x1D200, 0x1D241).addRange(0x1D300, 0x1D356).addRange(0x1D800, 0x1D9FF).addRange(0x1DA37, 0x1DA3A).addRange(0x1DA6D, 0x1DA74).addRange(0x1DA76, 0x1DA83).addRange(0x1DA85, 0x1DA86).addRange(0x1EEF0, 0x1EEF1).addRange(0x1F000, 0x1F02B).addRange(0x1F030, 0x1F093).addRange(0x1F0A0, 0x1F0AE).addRange(0x1F0B1, 0x1F0BF).addRange(0x1F0C1, 0x1F0CF).addRange(0x1F0D1, 0x1F0F5).addRange(0x1F10D, 0x1F1AD).addRange(0x1F1E6, 0x1F202).addRange(0x1F210, 0x1F23B).addRange(0x1F240, 0x1F248).addRange(0x1F250, 0x1F251).addRange(0x1F260, 0x1F265).addRange(0x1F300, 0x1F6D7).addRange(0x1F6DC, 0x1F6EC).addRange(0x1F6F0, 0x1F6FC).addRange(0x1F700, 0x1F776).addRange(0x1F77B, 0x1F7D9).addRange(0x1F7E0, 0x1F7EB).addRange(0x1F800, 0x1F80B).addRange(0x1F810, 0x1F847).addRange(0x1F850, 0x1F859).addRange(0x1F860, 0x1F887).addRange(0x1F890, 0x1F8AD).addRange(0x1F8B0, 0x1F8B1).addRange(0x1F900, 0x1FA53).addRange(0x1FA60, 0x1FA6D).addRange(0x1FA70, 0x1FA7C).addRange(0x1FA80, 0x1FA88).addRange(0x1FA90, 0x1FABD).addRange(0x1FABF, 0x1FAC5).addRange(0x1FACE, 0x1FADB).addRange(0x1FAE0, 0x1FAE8).addRange(0x1FAF0, 0x1FAF8).addRange(0x1FB00, 0x1FB92);\nset.addRange(0x1FB94, 0x1FBCA);\nexports.characters = set;\n","const set = require('regenerate')(0x1C5, 0x1C8, 0x1CB, 0x1F2, 0x1FBC, 0x1FCC, 0x1FFC);\nset.addRange(0x1F88, 0x1F8F).addRange(0x1F98, 0x1F9F).addRange(0x1FA8, 0x1FAF);\nexports.characters = set;\n","const set = require('regenerate')(0x38B, 0x38D, 0x3A2, 0x530, 0x590, 0x70E, 0x83F, 0x85F, 0x88F, 0x984, 0x9A9, 0x9B1, 0x9DE, 0xA04, 0xA29, 0xA31, 0xA34, 0xA37, 0xA3D, 0xA5D, 0xA84, 0xA8E, 0xA92, 0xAA9, 0xAB1, 0xAB4, 0xAC6, 0xACA, 0xB00, 0xB04, 0xB29, 0xB31, 0xB34, 0xB5E, 0xB84, 0xB91, 0xB9B, 0xB9D, 0xBC9, 0xC0D, 0xC11, 0xC29, 0xC45, 0xC49, 0xC57, 0xC8D, 0xC91, 0xCA9, 0xCB4, 0xCC5, 0xCC9, 0xCDF, 0xCF0, 0xD0D, 0xD11, 0xD45, 0xD49, 0xD80, 0xD84, 0xDB2, 0xDBC, 0xDD5, 0xDD7, 0xE83, 0xE85, 0xE8B, 0xEA4, 0xEA6, 0xEC5, 0xEC7, 0xECF, 0xF48, 0xF98, 0xFBD, 0xFCD, 0x10C6, 0x1249, 0x1257, 0x1259, 0x1289, 0x12B1, 0x12BF, 0x12C1, 0x12D7, 0x1311, 0x176D, 0x1771, 0x191F, 0x1A5F, 0x1B7F, 0x1F58, 0x1F5A, 0x1F5C, 0x1F5E, 0x1FB5, 0x1FC5, 0x1FDC, 0x1FF5, 0x1FFF, 0x2065, 0x208F, 0x2B96, 0x2D26, 0x2DA7, 0x2DAF, 0x2DB7, 0x2DBF, 0x2DC7, 0x2DCF, 0x2DD7, 0x2DDF, 0x2E9A, 0x3040, 0x3130, 0x318F, 0x321F, 0xA7D2, 0xA7D4, 0xA9CE, 0xA9FF, 0xAB27, 0xAB2F, 0xFB37, 0xFB3D, 0xFB3F, 0xFB42, 0xFB45, 0xFE53, 0xFE67, 0xFE75, 0xFF00, 0xFFE7, 0x1000C, 0x10027, 0x1003B, 0x1003E, 0x1018F, 0x1039E, 0x1057B, 0x1058B, 0x10593, 0x10596, 0x105A2, 0x105B2, 0x105BA, 0x10786, 0x107B1, 0x10809, 0x10836, 0x10856, 0x108F3, 0x10A04, 0x10A14, 0x10A18, 0x10E7F, 0x10EAA, 0x11135, 0x111E0, 0x11212, 0x11287, 0x11289, 0x1128E, 0x1129E, 0x11304, 0x11329, 0x11331, 0x11334, 0x1133A, 0x1145C, 0x11914, 0x11917, 0x11936, 0x11C09, 0x11C37, 0x11CA8, 0x11D07, 0x11D0A, 0x11D3B, 0x11D3E, 0x11D66, 0x11D69, 0x11D8F, 0x11D92, 0x11F11, 0x1246F, 0x16A5F, 0x16ABF, 0x16B5A, 0x16B62, 0x1AFF4, 0x1AFFC, 0x1AFFF, 0x1D455, 0x1D49D, 0x1D4AD, 0x1D4BA, 0x1D4BC, 0x1D4C4, 0x1D506, 0x1D515, 0x1D51D, 0x1D53A, 0x1D53F, 0x1D545, 0x1D551, 0x1DAA0, 0x1E007, 0x1E022, 0x1E025, 0x1E7E7, 0x1E7EC, 0x1E7EF, 0x1E7FF, 0x1EE04, 0x1EE20, 0x1EE23, 0x1EE28, 0x1EE33, 0x1EE38, 0x1EE3A, 0x1EE48, 0x1EE4A, 0x1EE4C, 0x1EE50, 0x1EE53, 0x1EE58, 0x1EE5A, 0x1EE5C, 0x1EE5E, 0x1EE60, 0x1EE63, 0x1EE6B, 0x1EE73, 0x1EE78, 0x1EE7D, 0x1EE7F, 0x1EE8A, 0x1EEA4, 0x1EEAA, 0x1F0C0, 0x1F0D0, 0x1FABE, 0x1FB93);\nset.addRange(0x378, 0x379).addRange(0x380, 0x383).addRange(0x557, 0x558).addRange(0x58B, 0x58C).addRange(0x5C8, 0x5CF).addRange(0x5EB, 0x5EE).addRange(0x5F5, 0x5FF).addRange(0x74B, 0x74C).addRange(0x7B2, 0x7BF).addRange(0x7FB, 0x7FC).addRange(0x82E, 0x82F).addRange(0x85C, 0x85D).addRange(0x86B, 0x86F).addRange(0x892, 0x897).addRange(0x98D, 0x98E).addRange(0x991, 0x992).addRange(0x9B3, 0x9B5).addRange(0x9BA, 0x9BB).addRange(0x9C5, 0x9C6).addRange(0x9C9, 0x9CA).addRange(0x9CF, 0x9D6).addRange(0x9D8, 0x9DB).addRange(0x9E4, 0x9E5).addRange(0x9FF, 0xA00).addRange(0xA0B, 0xA0E).addRange(0xA11, 0xA12).addRange(0xA3A, 0xA3B).addRange(0xA43, 0xA46).addRange(0xA49, 0xA4A).addRange(0xA4E, 0xA50).addRange(0xA52, 0xA58).addRange(0xA5F, 0xA65).addRange(0xA77, 0xA80).addRange(0xABA, 0xABB).addRange(0xACE, 0xACF).addRange(0xAD1, 0xADF).addRange(0xAE4, 0xAE5).addRange(0xAF2, 0xAF8).addRange(0xB0D, 0xB0E).addRange(0xB11, 0xB12).addRange(0xB3A, 0xB3B).addRange(0xB45, 0xB46).addRange(0xB49, 0xB4A).addRange(0xB4E, 0xB54).addRange(0xB58, 0xB5B).addRange(0xB64, 0xB65).addRange(0xB78, 0xB81).addRange(0xB8B, 0xB8D).addRange(0xB96, 0xB98).addRange(0xBA0, 0xBA2).addRange(0xBA5, 0xBA7);\nset.addRange(0xBAB, 0xBAD).addRange(0xBBA, 0xBBD).addRange(0xBC3, 0xBC5).addRange(0xBCE, 0xBCF).addRange(0xBD1, 0xBD6).addRange(0xBD8, 0xBE5).addRange(0xBFB, 0xBFF).addRange(0xC3A, 0xC3B).addRange(0xC4E, 0xC54).addRange(0xC5B, 0xC5C).addRange(0xC5E, 0xC5F).addRange(0xC64, 0xC65).addRange(0xC70, 0xC76).addRange(0xCBA, 0xCBB).addRange(0xCCE, 0xCD4).addRange(0xCD7, 0xCDC).addRange(0xCE4, 0xCE5).addRange(0xCF4, 0xCFF).addRange(0xD50, 0xD53).addRange(0xD64, 0xD65).addRange(0xD97, 0xD99).addRange(0xDBE, 0xDBF).addRange(0xDC7, 0xDC9).addRange(0xDCB, 0xDCE).addRange(0xDE0, 0xDE5).addRange(0xDF0, 0xDF1).addRange(0xDF5, 0xE00).addRange(0xE3B, 0xE3E).addRange(0xE5C, 0xE80).addRange(0xEBE, 0xEBF).addRange(0xEDA, 0xEDB).addRange(0xEE0, 0xEFF).addRange(0xF6D, 0xF70).addRange(0xFDB, 0xFFF).addRange(0x10C8, 0x10CC).addRange(0x10CE, 0x10CF).addRange(0x124E, 0x124F).addRange(0x125E, 0x125F).addRange(0x128E, 0x128F).addRange(0x12B6, 0x12B7).addRange(0x12C6, 0x12C7).addRange(0x1316, 0x1317).addRange(0x135B, 0x135C).addRange(0x137D, 0x137F).addRange(0x139A, 0x139F).addRange(0x13F6, 0x13F7).addRange(0x13FE, 0x13FF).addRange(0x169D, 0x169F).addRange(0x16F9, 0x16FF).addRange(0x1716, 0x171E).addRange(0x1737, 0x173F);\nset.addRange(0x1754, 0x175F).addRange(0x1774, 0x177F).addRange(0x17DE, 0x17DF).addRange(0x17EA, 0x17EF).addRange(0x17FA, 0x17FF).addRange(0x181A, 0x181F).addRange(0x1879, 0x187F).addRange(0x18AB, 0x18AF).addRange(0x18F6, 0x18FF).addRange(0x192C, 0x192F).addRange(0x193C, 0x193F).addRange(0x1941, 0x1943).addRange(0x196E, 0x196F).addRange(0x1975, 0x197F).addRange(0x19AC, 0x19AF).addRange(0x19CA, 0x19CF).addRange(0x19DB, 0x19DD).addRange(0x1A1C, 0x1A1D).addRange(0x1A7D, 0x1A7E).addRange(0x1A8A, 0x1A8F).addRange(0x1A9A, 0x1A9F).addRange(0x1AAE, 0x1AAF).addRange(0x1ACF, 0x1AFF).addRange(0x1B4D, 0x1B4F).addRange(0x1BF4, 0x1BFB).addRange(0x1C38, 0x1C3A).addRange(0x1C4A, 0x1C4C).addRange(0x1C89, 0x1C8F).addRange(0x1CBB, 0x1CBC).addRange(0x1CC8, 0x1CCF).addRange(0x1CFB, 0x1CFF).addRange(0x1F16, 0x1F17).addRange(0x1F1E, 0x1F1F).addRange(0x1F46, 0x1F47).addRange(0x1F4E, 0x1F4F).addRange(0x1F7E, 0x1F7F).addRange(0x1FD4, 0x1FD5).addRange(0x1FF0, 0x1FF1).addRange(0x2072, 0x2073).addRange(0x209D, 0x209F).addRange(0x20C1, 0x20CF).addRange(0x20F1, 0x20FF).addRange(0x218C, 0x218F).addRange(0x2427, 0x243F).addRange(0x244B, 0x245F).addRange(0x2B74, 0x2B75).addRange(0x2CF4, 0x2CF8).addRange(0x2D28, 0x2D2C).addRange(0x2D2E, 0x2D2F).addRange(0x2D68, 0x2D6E).addRange(0x2D71, 0x2D7E);\nset.addRange(0x2D97, 0x2D9F).addRange(0x2E5E, 0x2E7F).addRange(0x2EF4, 0x2EFF).addRange(0x2FD6, 0x2FEF).addRange(0x3097, 0x3098).addRange(0x3100, 0x3104).addRange(0x31E4, 0x31EE).addRange(0xA48D, 0xA48F).addRange(0xA4C7, 0xA4CF).addRange(0xA62C, 0xA63F).addRange(0xA6F8, 0xA6FF).addRange(0xA7CB, 0xA7CF).addRange(0xA7DA, 0xA7F1).addRange(0xA82D, 0xA82F).addRange(0xA83A, 0xA83F).addRange(0xA878, 0xA87F).addRange(0xA8C6, 0xA8CD).addRange(0xA8DA, 0xA8DF).addRange(0xA954, 0xA95E).addRange(0xA97D, 0xA97F).addRange(0xA9DA, 0xA9DD).addRange(0xAA37, 0xAA3F).addRange(0xAA4E, 0xAA4F).addRange(0xAA5A, 0xAA5B).addRange(0xAAC3, 0xAADA).addRange(0xAAF7, 0xAB00).addRange(0xAB07, 0xAB08).addRange(0xAB0F, 0xAB10).addRange(0xAB17, 0xAB1F).addRange(0xAB6C, 0xAB6F).addRange(0xABEE, 0xABEF).addRange(0xABFA, 0xABFF).addRange(0xD7A4, 0xD7AF).addRange(0xD7C7, 0xD7CA).addRange(0xD7FC, 0xD7FF).addRange(0xFA6E, 0xFA6F).addRange(0xFADA, 0xFAFF).addRange(0xFB07, 0xFB12).addRange(0xFB18, 0xFB1C).addRange(0xFBC3, 0xFBD2).addRange(0xFD90, 0xFD91).addRange(0xFDC8, 0xFDCE).addRange(0xFDD0, 0xFDEF).addRange(0xFE1A, 0xFE1F).addRange(0xFE6C, 0xFE6F).addRange(0xFEFD, 0xFEFE).addRange(0xFFBF, 0xFFC1).addRange(0xFFC8, 0xFFC9).addRange(0xFFD0, 0xFFD1).addRange(0xFFD8, 0xFFD9).addRange(0xFFDD, 0xFFDF);\nset.addRange(0xFFEF, 0xFFF8).addRange(0xFFFE, 0xFFFF).addRange(0x1004E, 0x1004F).addRange(0x1005E, 0x1007F).addRange(0x100FB, 0x100FF).addRange(0x10103, 0x10106).addRange(0x10134, 0x10136).addRange(0x1019D, 0x1019F).addRange(0x101A1, 0x101CF).addRange(0x101FE, 0x1027F).addRange(0x1029D, 0x1029F).addRange(0x102D1, 0x102DF).addRange(0x102FC, 0x102FF).addRange(0x10324, 0x1032C).addRange(0x1034B, 0x1034F).addRange(0x1037B, 0x1037F).addRange(0x103C4, 0x103C7).addRange(0x103D6, 0x103FF).addRange(0x1049E, 0x1049F).addRange(0x104AA, 0x104AF).addRange(0x104D4, 0x104D7).addRange(0x104FC, 0x104FF).addRange(0x10528, 0x1052F).addRange(0x10564, 0x1056E).addRange(0x105BD, 0x105FF).addRange(0x10737, 0x1073F).addRange(0x10756, 0x1075F).addRange(0x10768, 0x1077F).addRange(0x107BB, 0x107FF).addRange(0x10806, 0x10807).addRange(0x10839, 0x1083B).addRange(0x1083D, 0x1083E).addRange(0x1089F, 0x108A6).addRange(0x108B0, 0x108DF).addRange(0x108F6, 0x108FA).addRange(0x1091C, 0x1091E).addRange(0x1093A, 0x1093E).addRange(0x10940, 0x1097F).addRange(0x109B8, 0x109BB).addRange(0x109D0, 0x109D1).addRange(0x10A07, 0x10A0B).addRange(0x10A36, 0x10A37).addRange(0x10A3B, 0x10A3E).addRange(0x10A49, 0x10A4F).addRange(0x10A59, 0x10A5F).addRange(0x10AA0, 0x10ABF).addRange(0x10AE7, 0x10AEA).addRange(0x10AF7, 0x10AFF).addRange(0x10B36, 0x10B38).addRange(0x10B56, 0x10B57).addRange(0x10B73, 0x10B77);\nset.addRange(0x10B92, 0x10B98).addRange(0x10B9D, 0x10BA8).addRange(0x10BB0, 0x10BFF).addRange(0x10C49, 0x10C7F).addRange(0x10CB3, 0x10CBF).addRange(0x10CF3, 0x10CF9).addRange(0x10D28, 0x10D2F).addRange(0x10D3A, 0x10E5F).addRange(0x10EAE, 0x10EAF).addRange(0x10EB2, 0x10EFC).addRange(0x10F28, 0x10F2F).addRange(0x10F5A, 0x10F6F).addRange(0x10F8A, 0x10FAF).addRange(0x10FCC, 0x10FDF).addRange(0x10FF7, 0x10FFF).addRange(0x1104E, 0x11051).addRange(0x11076, 0x1107E).addRange(0x110C3, 0x110CC).addRange(0x110CE, 0x110CF).addRange(0x110E9, 0x110EF).addRange(0x110FA, 0x110FF).addRange(0x11148, 0x1114F).addRange(0x11177, 0x1117F).addRange(0x111F5, 0x111FF).addRange(0x11242, 0x1127F).addRange(0x112AA, 0x112AF).addRange(0x112EB, 0x112EF).addRange(0x112FA, 0x112FF).addRange(0x1130D, 0x1130E).addRange(0x11311, 0x11312).addRange(0x11345, 0x11346).addRange(0x11349, 0x1134A).addRange(0x1134E, 0x1134F).addRange(0x11351, 0x11356).addRange(0x11358, 0x1135C).addRange(0x11364, 0x11365).addRange(0x1136D, 0x1136F).addRange(0x11375, 0x113FF).addRange(0x11462, 0x1147F).addRange(0x114C8, 0x114CF).addRange(0x114DA, 0x1157F).addRange(0x115B6, 0x115B7).addRange(0x115DE, 0x115FF).addRange(0x11645, 0x1164F).addRange(0x1165A, 0x1165F).addRange(0x1166D, 0x1167F).addRange(0x116BA, 0x116BF).addRange(0x116CA, 0x116FF).addRange(0x1171B, 0x1171C).addRange(0x1172C, 0x1172F).addRange(0x11747, 0x117FF);\nset.addRange(0x1183C, 0x1189F).addRange(0x118F3, 0x118FE).addRange(0x11907, 0x11908).addRange(0x1190A, 0x1190B).addRange(0x11939, 0x1193A).addRange(0x11947, 0x1194F).addRange(0x1195A, 0x1199F).addRange(0x119A8, 0x119A9).addRange(0x119D8, 0x119D9).addRange(0x119E5, 0x119FF).addRange(0x11A48, 0x11A4F).addRange(0x11AA3, 0x11AAF).addRange(0x11AF9, 0x11AFF).addRange(0x11B0A, 0x11BFF).addRange(0x11C46, 0x11C4F).addRange(0x11C6D, 0x11C6F).addRange(0x11C90, 0x11C91).addRange(0x11CB7, 0x11CFF).addRange(0x11D37, 0x11D39).addRange(0x11D48, 0x11D4F).addRange(0x11D5A, 0x11D5F).addRange(0x11D99, 0x11D9F).addRange(0x11DAA, 0x11EDF).addRange(0x11EF9, 0x11EFF).addRange(0x11F3B, 0x11F3D).addRange(0x11F5A, 0x11FAF).addRange(0x11FB1, 0x11FBF).addRange(0x11FF2, 0x11FFE).addRange(0x1239A, 0x123FF).addRange(0x12475, 0x1247F).addRange(0x12544, 0x12F8F).addRange(0x12FF3, 0x12FFF).addRange(0x13456, 0x143FF).addRange(0x14647, 0x167FF).addRange(0x16A39, 0x16A3F).addRange(0x16A6A, 0x16A6D).addRange(0x16ACA, 0x16ACF).addRange(0x16AEE, 0x16AEF).addRange(0x16AF6, 0x16AFF).addRange(0x16B46, 0x16B4F).addRange(0x16B78, 0x16B7C).addRange(0x16B90, 0x16E3F).addRange(0x16E9B, 0x16EFF).addRange(0x16F4B, 0x16F4E).addRange(0x16F88, 0x16F8E).addRange(0x16FA0, 0x16FDF).addRange(0x16FE5, 0x16FEF).addRange(0x16FF2, 0x16FFF).addRange(0x187F8, 0x187FF).addRange(0x18CD6, 0x18CFF).addRange(0x18D09, 0x1AFEF);\nset.addRange(0x1B123, 0x1B131).addRange(0x1B133, 0x1B14F).addRange(0x1B153, 0x1B154).addRange(0x1B156, 0x1B163).addRange(0x1B168, 0x1B16F).addRange(0x1B2FC, 0x1BBFF).addRange(0x1BC6B, 0x1BC6F).addRange(0x1BC7D, 0x1BC7F).addRange(0x1BC89, 0x1BC8F).addRange(0x1BC9A, 0x1BC9B).addRange(0x1BCA4, 0x1CEFF).addRange(0x1CF2E, 0x1CF2F).addRange(0x1CF47, 0x1CF4F).addRange(0x1CFC4, 0x1CFFF).addRange(0x1D0F6, 0x1D0FF).addRange(0x1D127, 0x1D128).addRange(0x1D1EB, 0x1D1FF).addRange(0x1D246, 0x1D2BF).addRange(0x1D2D4, 0x1D2DF).addRange(0x1D2F4, 0x1D2FF).addRange(0x1D357, 0x1D35F).addRange(0x1D379, 0x1D3FF).addRange(0x1D4A0, 0x1D4A1).addRange(0x1D4A3, 0x1D4A4).addRange(0x1D4A7, 0x1D4A8).addRange(0x1D50B, 0x1D50C).addRange(0x1D547, 0x1D549).addRange(0x1D6A6, 0x1D6A7).addRange(0x1D7CC, 0x1D7CD).addRange(0x1DA8C, 0x1DA9A).addRange(0x1DAB0, 0x1DEFF).addRange(0x1DF1F, 0x1DF24).addRange(0x1DF2B, 0x1DFFF).addRange(0x1E019, 0x1E01A).addRange(0x1E02B, 0x1E02F).addRange(0x1E06E, 0x1E08E).addRange(0x1E090, 0x1E0FF).addRange(0x1E12D, 0x1E12F).addRange(0x1E13E, 0x1E13F).addRange(0x1E14A, 0x1E14D).addRange(0x1E150, 0x1E28F).addRange(0x1E2AF, 0x1E2BF).addRange(0x1E2FA, 0x1E2FE).addRange(0x1E300, 0x1E4CF).addRange(0x1E4FA, 0x1E7DF).addRange(0x1E8C5, 0x1E8C6).addRange(0x1E8D7, 0x1E8FF).addRange(0x1E94C, 0x1E94F).addRange(0x1E95A, 0x1E95D).addRange(0x1E960, 0x1EC70).addRange(0x1ECB5, 0x1ED00);\nset.addRange(0x1ED3E, 0x1EDFF).addRange(0x1EE25, 0x1EE26).addRange(0x1EE3C, 0x1EE41).addRange(0x1EE43, 0x1EE46).addRange(0x1EE55, 0x1EE56).addRange(0x1EE65, 0x1EE66).addRange(0x1EE9C, 0x1EEA0).addRange(0x1EEBC, 0x1EEEF).addRange(0x1EEF2, 0x1EFFF).addRange(0x1F02C, 0x1F02F).addRange(0x1F094, 0x1F09F).addRange(0x1F0AF, 0x1F0B0).addRange(0x1F0F6, 0x1F0FF).addRange(0x1F1AE, 0x1F1E5).addRange(0x1F203, 0x1F20F).addRange(0x1F23C, 0x1F23F).addRange(0x1F249, 0x1F24F).addRange(0x1F252, 0x1F25F).addRange(0x1F266, 0x1F2FF).addRange(0x1F6D8, 0x1F6DB).addRange(0x1F6ED, 0x1F6EF).addRange(0x1F6FD, 0x1F6FF).addRange(0x1F777, 0x1F77A).addRange(0x1F7DA, 0x1F7DF).addRange(0x1F7EC, 0x1F7EF).addRange(0x1F7F1, 0x1F7FF).addRange(0x1F80C, 0x1F80F).addRange(0x1F848, 0x1F84F).addRange(0x1F85A, 0x1F85F).addRange(0x1F888, 0x1F88F).addRange(0x1F8AE, 0x1F8AF).addRange(0x1F8B2, 0x1F8FF).addRange(0x1FA54, 0x1FA5F).addRange(0x1FA6E, 0x1FA6F).addRange(0x1FA7D, 0x1FA7F).addRange(0x1FA89, 0x1FA8F).addRange(0x1FAC6, 0x1FACD).addRange(0x1FADC, 0x1FADF).addRange(0x1FAE9, 0x1FAEF).addRange(0x1FAF9, 0x1FAFF).addRange(0x1FBCB, 0x1FBEF).addRange(0x1FBFA, 0x1FFFF).addRange(0x2A6E0, 0x2A6FF).addRange(0x2B73A, 0x2B73F).addRange(0x2B81E, 0x2B81F).addRange(0x2CEA2, 0x2CEAF).addRange(0x2EBE1, 0x2EBEF).addRange(0x2EE5E, 0x2F7FF).addRange(0x2FA1E, 0x2FFFF).addRange(0x3134B, 0x3134F).addRange(0x323B0, 0xE0000);\nset.addRange(0xE0002, 0xE001F).addRange(0xE0080, 0xE00FF).addRange(0xE01F0, 0xEFFFF).addRange(0xFFFFE, 0xFFFFF).addRange(0x10FFFE, 0x10FFFF);\nexports.characters = set;\n","const set = require('regenerate')(0x100, 0x102, 0x104, 0x106, 0x108, 0x10A, 0x10C, 0x10E, 0x110, 0x112, 0x114, 0x116, 0x118, 0x11A, 0x11C, 0x11E, 0x120, 0x122, 0x124, 0x126, 0x128, 0x12A, 0x12C, 0x12E, 0x130, 0x132, 0x134, 0x136, 0x139, 0x13B, 0x13D, 0x13F, 0x141, 0x143, 0x145, 0x147, 0x14A, 0x14C, 0x14E, 0x150, 0x152, 0x154, 0x156, 0x158, 0x15A, 0x15C, 0x15E, 0x160, 0x162, 0x164, 0x166, 0x168, 0x16A, 0x16C, 0x16E, 0x170, 0x172, 0x174, 0x176, 0x17B, 0x17D, 0x184, 0x1A2, 0x1A4, 0x1A9, 0x1AC, 0x1B5, 0x1BC, 0x1C4, 0x1C7, 0x1CA, 0x1CD, 0x1CF, 0x1D1, 0x1D3, 0x1D5, 0x1D7, 0x1D9, 0x1DB, 0x1DE, 0x1E0, 0x1E2, 0x1E4, 0x1E6, 0x1E8, 0x1EA, 0x1EC, 0x1EE, 0x1F1, 0x1F4, 0x1FA, 0x1FC, 0x1FE, 0x200, 0x202, 0x204, 0x206, 0x208, 0x20A, 0x20C, 0x20E, 0x210, 0x212, 0x214, 0x216, 0x218, 0x21A, 0x21C, 0x21E, 0x220, 0x222, 0x224, 0x226, 0x228, 0x22A, 0x22C, 0x22E, 0x230, 0x232, 0x241, 0x248, 0x24A, 0x24C, 0x24E, 0x370, 0x372, 0x376, 0x37F, 0x386, 0x38C, 0x3CF, 0x3D8, 0x3DA, 0x3DC, 0x3DE, 0x3E0, 0x3E2, 0x3E4, 0x3E6, 0x3E8, 0x3EA, 0x3EC, 0x3EE, 0x3F4, 0x3F7, 0x460, 0x462, 0x464, 0x466, 0x468, 0x46A, 0x46C, 0x46E, 0x470, 0x472, 0x474, 0x476, 0x478, 0x47A, 0x47C, 0x47E, 0x480, 0x48A, 0x48C, 0x48E, 0x490, 0x492, 0x494, 0x496, 0x498, 0x49A, 0x49C, 0x49E, 0x4A0, 0x4A2, 0x4A4, 0x4A6, 0x4A8, 0x4AA, 0x4AC, 0x4AE, 0x4B0, 0x4B2, 0x4B4, 0x4B6, 0x4B8, 0x4BA, 0x4BC, 0x4BE, 0x4C3, 0x4C5, 0x4C7, 0x4C9, 0x4CB, 0x4CD, 0x4D0, 0x4D2, 0x4D4, 0x4D6, 0x4D8, 0x4DA, 0x4DC, 0x4DE, 0x4E0, 0x4E2, 0x4E4, 0x4E6, 0x4E8, 0x4EA, 0x4EC, 0x4EE, 0x4F0, 0x4F2, 0x4F4, 0x4F6, 0x4F8, 0x4FA, 0x4FC, 0x4FE, 0x500, 0x502, 0x504, 0x506, 0x508, 0x50A, 0x50C, 0x50E, 0x510, 0x512, 0x514, 0x516, 0x518, 0x51A, 0x51C, 0x51E, 0x520, 0x522, 0x524, 0x526, 0x528, 0x52A, 0x52C, 0x52E, 0x10C7, 0x10CD, 0x1E00, 0x1E02, 0x1E04, 0x1E06, 0x1E08, 0x1E0A, 0x1E0C, 0x1E0E, 0x1E10, 0x1E12, 0x1E14, 0x1E16, 0x1E18, 0x1E1A, 0x1E1C, 0x1E1E, 0x1E20, 0x1E22, 0x1E24, 0x1E26, 0x1E28, 0x1E2A, 0x1E2C, 0x1E2E, 0x1E30, 0x1E32, 0x1E34, 0x1E36, 0x1E38, 0x1E3A, 0x1E3C, 0x1E3E, 0x1E40, 0x1E42, 0x1E44, 0x1E46, 0x1E48, 0x1E4A, 0x1E4C, 0x1E4E, 0x1E50, 0x1E52, 0x1E54, 0x1E56, 0x1E58, 0x1E5A, 0x1E5C, 0x1E5E, 0x1E60, 0x1E62, 0x1E64, 0x1E66, 0x1E68, 0x1E6A, 0x1E6C, 0x1E6E, 0x1E70, 0x1E72, 0x1E74, 0x1E76, 0x1E78, 0x1E7A, 0x1E7C, 0x1E7E, 0x1E80, 0x1E82, 0x1E84, 0x1E86, 0x1E88, 0x1E8A, 0x1E8C, 0x1E8E, 0x1E90, 0x1E92, 0x1E94, 0x1E9E, 0x1EA0, 0x1EA2, 0x1EA4, 0x1EA6, 0x1EA8, 0x1EAA, 0x1EAC, 0x1EAE, 0x1EB0, 0x1EB2, 0x1EB4, 0x1EB6, 0x1EB8, 0x1EBA, 0x1EBC, 0x1EBE, 0x1EC0, 0x1EC2, 0x1EC4, 0x1EC6, 0x1EC8, 0x1ECA, 0x1ECC, 0x1ECE, 0x1ED0, 0x1ED2, 0x1ED4, 0x1ED6, 0x1ED8, 0x1EDA, 0x1EDC, 0x1EDE, 0x1EE0, 0x1EE2, 0x1EE4, 0x1EE6, 0x1EE8, 0x1EEA, 0x1EEC, 0x1EEE, 0x1EF0, 0x1EF2, 0x1EF4, 0x1EF6, 0x1EF8, 0x1EFA, 0x1EFC, 0x1EFE, 0x1F59, 0x1F5B, 0x1F5D, 0x1F5F, 0x2102, 0x2107, 0x2115, 0x2124, 0x2126, 0x2128, 0x2145, 0x2183, 0x2C60, 0x2C67, 0x2C69, 0x2C6B, 0x2C72, 0x2C75, 0x2C82, 0x2C84, 0x2C86, 0x2C88, 0x2C8A, 0x2C8C, 0x2C8E, 0x2C90, 0x2C92, 0x2C94, 0x2C96, 0x2C98, 0x2C9A, 0x2C9C, 0x2C9E, 0x2CA0, 0x2CA2, 0x2CA4, 0x2CA6, 0x2CA8, 0x2CAA, 0x2CAC, 0x2CAE, 0x2CB0, 0x2CB2, 0x2CB4, 0x2CB6, 0x2CB8, 0x2CBA, 0x2CBC, 0x2CBE, 0x2CC0, 0x2CC2, 0x2CC4, 0x2CC6, 0x2CC8, 0x2CCA, 0x2CCC, 0x2CCE, 0x2CD0, 0x2CD2, 0x2CD4, 0x2CD6, 0x2CD8, 0x2CDA, 0x2CDC, 0x2CDE, 0x2CE0, 0x2CE2, 0x2CEB, 0x2CED, 0x2CF2, 0xA640, 0xA642, 0xA644, 0xA646, 0xA648, 0xA64A, 0xA64C, 0xA64E, 0xA650, 0xA652, 0xA654, 0xA656, 0xA658, 0xA65A, 0xA65C, 0xA65E, 0xA660, 0xA662, 0xA664, 0xA666, 0xA668, 0xA66A, 0xA66C, 0xA680, 0xA682, 0xA684, 0xA686, 0xA688, 0xA68A, 0xA68C, 0xA68E, 0xA690, 0xA692, 0xA694, 0xA696, 0xA698, 0xA69A, 0xA722, 0xA724, 0xA726, 0xA728, 0xA72A, 0xA72C, 0xA72E, 0xA732, 0xA734, 0xA736, 0xA738, 0xA73A, 0xA73C, 0xA73E, 0xA740, 0xA742, 0xA744, 0xA746, 0xA748, 0xA74A, 0xA74C, 0xA74E, 0xA750, 0xA752, 0xA754, 0xA756, 0xA758, 0xA75A, 0xA75C, 0xA75E, 0xA760, 0xA762, 0xA764, 0xA766, 0xA768, 0xA76A, 0xA76C, 0xA76E, 0xA779, 0xA77B, 0xA780, 0xA782, 0xA784, 0xA786, 0xA78B, 0xA78D, 0xA790, 0xA792, 0xA796, 0xA798, 0xA79A, 0xA79C, 0xA79E, 0xA7A0, 0xA7A2, 0xA7A4, 0xA7A6, 0xA7A8, 0xA7B6, 0xA7B8, 0xA7BA, 0xA7BC, 0xA7BE, 0xA7C0, 0xA7C2, 0xA7C9, 0xA7D0, 0xA7D6, 0xA7D8, 0xA7F5, 0x1D49C, 0x1D4A2, 0x1D546, 0x1D7CA);\nset.addRange(0x41, 0x5A).addRange(0xC0, 0xD6).addRange(0xD8, 0xDE).addRange(0x178, 0x179).addRange(0x181, 0x182).addRange(0x186, 0x187).addRange(0x189, 0x18B).addRange(0x18E, 0x191).addRange(0x193, 0x194).addRange(0x196, 0x198).addRange(0x19C, 0x19D).addRange(0x19F, 0x1A0).addRange(0x1A6, 0x1A7).addRange(0x1AE, 0x1AF).addRange(0x1B1, 0x1B3).addRange(0x1B7, 0x1B8).addRange(0x1F6, 0x1F8).addRange(0x23A, 0x23B).addRange(0x23D, 0x23E).addRange(0x243, 0x246).addRange(0x388, 0x38A).addRange(0x38E, 0x38F).addRange(0x391, 0x3A1).addRange(0x3A3, 0x3AB).addRange(0x3D2, 0x3D4).addRange(0x3F9, 0x3FA).addRange(0x3FD, 0x42F).addRange(0x4C0, 0x4C1).addRange(0x531, 0x556).addRange(0x10A0, 0x10C5).addRange(0x13A0, 0x13F5).addRange(0x1C90, 0x1CBA).addRange(0x1CBD, 0x1CBF).addRange(0x1F08, 0x1F0F).addRange(0x1F18, 0x1F1D).addRange(0x1F28, 0x1F2F).addRange(0x1F38, 0x1F3F).addRange(0x1F48, 0x1F4D).addRange(0x1F68, 0x1F6F).addRange(0x1FB8, 0x1FBB).addRange(0x1FC8, 0x1FCB).addRange(0x1FD8, 0x1FDB).addRange(0x1FE8, 0x1FEC).addRange(0x1FF8, 0x1FFB).addRange(0x210B, 0x210D).addRange(0x2110, 0x2112).addRange(0x2119, 0x211D).addRange(0x212A, 0x212D).addRange(0x2130, 0x2133).addRange(0x213E, 0x213F).addRange(0x2C00, 0x2C2F);\nset.addRange(0x2C62, 0x2C64).addRange(0x2C6D, 0x2C70).addRange(0x2C7E, 0x2C80).addRange(0xA77D, 0xA77E).addRange(0xA7AA, 0xA7AE).addRange(0xA7B0, 0xA7B4).addRange(0xA7C4, 0xA7C7).addRange(0xFF21, 0xFF3A).addRange(0x10400, 0x10427).addRange(0x104B0, 0x104D3).addRange(0x10570, 0x1057A).addRange(0x1057C, 0x1058A).addRange(0x1058C, 0x10592).addRange(0x10594, 0x10595).addRange(0x10C80, 0x10CB2).addRange(0x118A0, 0x118BF).addRange(0x16E40, 0x16E5F).addRange(0x1D400, 0x1D419).addRange(0x1D434, 0x1D44D).addRange(0x1D468, 0x1D481).addRange(0x1D49E, 0x1D49F).addRange(0x1D4A5, 0x1D4A6).addRange(0x1D4A9, 0x1D4AC).addRange(0x1D4AE, 0x1D4B5).addRange(0x1D4D0, 0x1D4E9).addRange(0x1D504, 0x1D505).addRange(0x1D507, 0x1D50A).addRange(0x1D50D, 0x1D514).addRange(0x1D516, 0x1D51C).addRange(0x1D538, 0x1D539).addRange(0x1D53B, 0x1D53E).addRange(0x1D540, 0x1D544).addRange(0x1D54A, 0x1D550).addRange(0x1D56C, 0x1D585).addRange(0x1D5A0, 0x1D5B9).addRange(0x1D5D4, 0x1D5ED).addRange(0x1D608, 0x1D621).addRange(0x1D63C, 0x1D655).addRange(0x1D670, 0x1D689).addRange(0x1D6A8, 0x1D6C0).addRange(0x1D6E2, 0x1D6FA).addRange(0x1D71C, 0x1D734).addRange(0x1D756, 0x1D76E).addRange(0x1D790, 0x1D7A8).addRange(0x1E900, 0x1E921);\nexports.characters = set;\n","module.exports = new Map([\n\t['General_Category', [\n\t\t'Cased_Letter',\n\t\t'Close_Punctuation',\n\t\t'Connector_Punctuation',\n\t\t'Control',\n\t\t'Currency_Symbol',\n\t\t'Dash_Punctuation',\n\t\t'Decimal_Number',\n\t\t'Enclosing_Mark',\n\t\t'Final_Punctuation',\n\t\t'Format',\n\t\t'Initial_Punctuation',\n\t\t'Letter',\n\t\t'Letter_Number',\n\t\t'Line_Separator',\n\t\t'Lowercase_Letter',\n\t\t'Mark',\n\t\t'Math_Symbol',\n\t\t'Modifier_Letter',\n\t\t'Modifier_Symbol',\n\t\t'Nonspacing_Mark',\n\t\t'Number',\n\t\t'Open_Punctuation',\n\t\t'Other',\n\t\t'Other_Letter',\n\t\t'Other_Number',\n\t\t'Other_Punctuation',\n\t\t'Other_Symbol',\n\t\t'Paragraph_Separator',\n\t\t'Private_Use',\n\t\t'Punctuation',\n\t\t'Separator',\n\t\t'Space_Separator',\n\t\t'Spacing_Mark',\n\t\t'Surrogate',\n\t\t'Symbol',\n\t\t'Titlecase_Letter',\n\t\t'Unassigned',\n\t\t'Uppercase_Letter'\n\t]],\n\t['Script', [\n\t\t'Adlam',\n\t\t'Ahom',\n\t\t'Anatolian_Hieroglyphs',\n\t\t'Arabic',\n\t\t'Armenian',\n\t\t'Avestan',\n\t\t'Balinese',\n\t\t'Bamum',\n\t\t'Bassa_Vah',\n\t\t'Batak',\n\t\t'Bengali',\n\t\t'Bhaiksuki',\n\t\t'Bopomofo',\n\t\t'Brahmi',\n\t\t'Braille',\n\t\t'Buginese',\n\t\t'Buhid',\n\t\t'Canadian_Aboriginal',\n\t\t'Carian',\n\t\t'Caucasian_Albanian',\n\t\t'Chakma',\n\t\t'Cham',\n\t\t'Cherokee',\n\t\t'Chorasmian',\n\t\t'Common',\n\t\t'Coptic',\n\t\t'Cuneiform',\n\t\t'Cypriot',\n\t\t'Cypro_Minoan',\n\t\t'Cyrillic',\n\t\t'Deseret',\n\t\t'Devanagari',\n\t\t'Dives_Akuru',\n\t\t'Dogra',\n\t\t'Duployan',\n\t\t'Egyptian_Hieroglyphs',\n\t\t'Elbasan',\n\t\t'Elymaic',\n\t\t'Ethiopic',\n\t\t'Georgian',\n\t\t'Glagolitic',\n\t\t'Gothic',\n\t\t'Grantha',\n\t\t'Greek',\n\t\t'Gujarati',\n\t\t'Gunjala_Gondi',\n\t\t'Gurmukhi',\n\t\t'Han',\n\t\t'Hangul',\n\t\t'Hanifi_Rohingya',\n\t\t'Hanunoo',\n\t\t'Hatran',\n\t\t'Hebrew',\n\t\t'Hiragana',\n\t\t'Imperial_Aramaic',\n\t\t'Inherited',\n\t\t'Inscriptional_Pahlavi',\n\t\t'Inscriptional_Parthian',\n\t\t'Javanese',\n\t\t'Kaithi',\n\t\t'Kannada',\n\t\t'Katakana',\n\t\t'Kawi',\n\t\t'Kayah_Li',\n\t\t'Kharoshthi',\n\t\t'Khitan_Small_Script',\n\t\t'Khmer',\n\t\t'Khojki',\n\t\t'Khudawadi',\n\t\t'Lao',\n\t\t'Latin',\n\t\t'Lepcha',\n\t\t'Limbu',\n\t\t'Linear_A',\n\t\t'Linear_B',\n\t\t'Lisu',\n\t\t'Lycian',\n\t\t'Lydian',\n\t\t'Mahajani',\n\t\t'Makasar',\n\t\t'Malayalam',\n\t\t'Mandaic',\n\t\t'Manichaean',\n\t\t'Marchen',\n\t\t'Masaram_Gondi',\n\t\t'Medefaidrin',\n\t\t'Meetei_Mayek',\n\t\t'Mende_Kikakui',\n\t\t'Meroitic_Cursive',\n\t\t'Meroitic_Hieroglyphs',\n\t\t'Miao',\n\t\t'Modi',\n\t\t'Mongolian',\n\t\t'Mro',\n\t\t'Multani',\n\t\t'Myanmar',\n\t\t'Nabataean',\n\t\t'Nag_Mundari',\n\t\t'Nandinagari',\n\t\t'New_Tai_Lue',\n\t\t'Newa',\n\t\t'Nko',\n\t\t'Nushu',\n\t\t'Nyiakeng_Puachue_Hmong',\n\t\t'Ogham',\n\t\t'Ol_Chiki',\n\t\t'Old_Hungarian',\n\t\t'Old_Italic',\n\t\t'Old_North_Arabian',\n\t\t'Old_Permic',\n\t\t'Old_Persian',\n\t\t'Old_Sogdian',\n\t\t'Old_South_Arabian',\n\t\t'Old_Turkic',\n\t\t'Old_Uyghur',\n\t\t'Oriya',\n\t\t'Osage',\n\t\t'Osmanya',\n\t\t'Pahawh_Hmong',\n\t\t'Palmyrene',\n\t\t'Pau_Cin_Hau',\n\t\t'Phags_Pa',\n\t\t'Phoenician',\n\t\t'Psalter_Pahlavi',\n\t\t'Rejang',\n\t\t'Runic',\n\t\t'Samaritan',\n\t\t'Saurashtra',\n\t\t'Sharada',\n\t\t'Shavian',\n\t\t'Siddham',\n\t\t'SignWriting',\n\t\t'Sinhala',\n\t\t'Sogdian',\n\t\t'Sora_Sompeng',\n\t\t'Soyombo',\n\t\t'Sundanese',\n\t\t'Syloti_Nagri',\n\t\t'Syriac',\n\t\t'Tagalog',\n\t\t'Tagbanwa',\n\t\t'Tai_Le',\n\t\t'Tai_Tham',\n\t\t'Tai_Viet',\n\t\t'Takri',\n\t\t'Tamil',\n\t\t'Tangsa',\n\t\t'Tangut',\n\t\t'Telugu',\n\t\t'Thaana',\n\t\t'Thai',\n\t\t'Tibetan',\n\t\t'Tifinagh',\n\t\t'Tirhuta',\n\t\t'Toto',\n\t\t'Ugaritic',\n\t\t'Vai',\n\t\t'Vithkuqi',\n\t\t'Wancho',\n\t\t'Warang_Citi',\n\t\t'Yezidi',\n\t\t'Yi',\n\t\t'Zanabazar_Square'\n\t]],\n\t['Script_Extensions', [\n\t\t'Adlam',\n\t\t'Ahom',\n\t\t'Anatolian_Hieroglyphs',\n\t\t'Arabic',\n\t\t'Armenian',\n\t\t'Avestan',\n\t\t'Balinese',\n\t\t'Bamum',\n\t\t'Bassa_Vah',\n\t\t'Batak',\n\t\t'Bengali',\n\t\t'Bhaiksuki',\n\t\t'Bopomofo',\n\t\t'Brahmi',\n\t\t'Braille',\n\t\t'Buginese',\n\t\t'Buhid',\n\t\t'Canadian_Aboriginal',\n\t\t'Carian',\n\t\t'Caucasian_Albanian',\n\t\t'Chakma',\n\t\t'Cham',\n\t\t'Cherokee',\n\t\t'Chorasmian',\n\t\t'Common',\n\t\t'Coptic',\n\t\t'Cuneiform',\n\t\t'Cypriot',\n\t\t'Cypro_Minoan',\n\t\t'Cyrillic',\n\t\t'Deseret',\n\t\t'Devanagari',\n\t\t'Dives_Akuru',\n\t\t'Dogra',\n\t\t'Duployan',\n\t\t'Egyptian_Hieroglyphs',\n\t\t'Elbasan',\n\t\t'Elymaic',\n\t\t'Ethiopic',\n\t\t'Georgian',\n\t\t'Glagolitic',\n\t\t'Gothic',\n\t\t'Grantha',\n\t\t'Greek',\n\t\t'Gujarati',\n\t\t'Gunjala_Gondi',\n\t\t'Gurmukhi',\n\t\t'Han',\n\t\t'Hangul',\n\t\t'Hanifi_Rohingya',\n\t\t'Hanunoo',\n\t\t'Hatran',\n\t\t'Hebrew',\n\t\t'Hiragana',\n\t\t'Imperial_Aramaic',\n\t\t'Inherited',\n\t\t'Inscriptional_Pahlavi',\n\t\t'Inscriptional_Parthian',\n\t\t'Javanese',\n\t\t'Kaithi',\n\t\t'Kannada',\n\t\t'Katakana',\n\t\t'Kawi',\n\t\t'Kayah_Li',\n\t\t'Kharoshthi',\n\t\t'Khitan_Small_Script',\n\t\t'Khmer',\n\t\t'Khojki',\n\t\t'Khudawadi',\n\t\t'Lao',\n\t\t'Latin',\n\t\t'Lepcha',\n\t\t'Limbu',\n\t\t'Linear_A',\n\t\t'Linear_B',\n\t\t'Lisu',\n\t\t'Lycian',\n\t\t'Lydian',\n\t\t'Mahajani',\n\t\t'Makasar',\n\t\t'Malayalam',\n\t\t'Mandaic',\n\t\t'Manichaean',\n\t\t'Marchen',\n\t\t'Masaram_Gondi',\n\t\t'Medefaidrin',\n\t\t'Meetei_Mayek',\n\t\t'Mende_Kikakui',\n\t\t'Meroitic_Cursive',\n\t\t'Meroitic_Hieroglyphs',\n\t\t'Miao',\n\t\t'Modi',\n\t\t'Mongolian',\n\t\t'Mro',\n\t\t'Multani',\n\t\t'Myanmar',\n\t\t'Nabataean',\n\t\t'Nag_Mundari',\n\t\t'Nandinagari',\n\t\t'New_Tai_Lue',\n\t\t'Newa',\n\t\t'Nko',\n\t\t'Nushu',\n\t\t'Nyiakeng_Puachue_Hmong',\n\t\t'Ogham',\n\t\t'Ol_Chiki',\n\t\t'Old_Hungarian',\n\t\t'Old_Italic',\n\t\t'Old_North_Arabian',\n\t\t'Old_Permic',\n\t\t'Old_Persian',\n\t\t'Old_Sogdian',\n\t\t'Old_South_Arabian',\n\t\t'Old_Turkic',\n\t\t'Old_Uyghur',\n\t\t'Oriya',\n\t\t'Osage',\n\t\t'Osmanya',\n\t\t'Pahawh_Hmong',\n\t\t'Palmyrene',\n\t\t'Pau_Cin_Hau',\n\t\t'Phags_Pa',\n\t\t'Phoenician',\n\t\t'Psalter_Pahlavi',\n\t\t'Rejang',\n\t\t'Runic',\n\t\t'Samaritan',\n\t\t'Saurashtra',\n\t\t'Sharada',\n\t\t'Shavian',\n\t\t'Siddham',\n\t\t'SignWriting',\n\t\t'Sinhala',\n\t\t'Sogdian',\n\t\t'Sora_Sompeng',\n\t\t'Soyombo',\n\t\t'Sundanese',\n\t\t'Syloti_Nagri',\n\t\t'Syriac',\n\t\t'Tagalog',\n\t\t'Tagbanwa',\n\t\t'Tai_Le',\n\t\t'Tai_Tham',\n\t\t'Tai_Viet',\n\t\t'Takri',\n\t\t'Tamil',\n\t\t'Tangsa',\n\t\t'Tangut',\n\t\t'Telugu',\n\t\t'Thaana',\n\t\t'Thai',\n\t\t'Tibetan',\n\t\t'Tifinagh',\n\t\t'Tirhuta',\n\t\t'Toto',\n\t\t'Ugaritic',\n\t\t'Vai',\n\t\t'Vithkuqi',\n\t\t'Wancho',\n\t\t'Warang_Citi',\n\t\t'Yezidi',\n\t\t'Yi',\n\t\t'Zanabazar_Square'\n\t]],\n\t['Binary_Property', [\n\t\t'ASCII',\n\t\t'ASCII_Hex_Digit',\n\t\t'Alphabetic',\n\t\t'Any',\n\t\t'Assigned',\n\t\t'Bidi_Control',\n\t\t'Bidi_Mirrored',\n\t\t'Case_Ignorable',\n\t\t'Cased',\n\t\t'Changes_When_Casefolded',\n\t\t'Changes_When_Casemapped',\n\t\t'Changes_When_Lowercased',\n\t\t'Changes_When_NFKC_Casefolded',\n\t\t'Changes_When_Titlecased',\n\t\t'Changes_When_Uppercased',\n\t\t'Dash',\n\t\t'Default_Ignorable_Code_Point',\n\t\t'Deprecated',\n\t\t'Diacritic',\n\t\t'Emoji',\n\t\t'Emoji_Component',\n\t\t'Emoji_Modifier',\n\t\t'Emoji_Modifier_Base',\n\t\t'Emoji_Presentation',\n\t\t'Extended_Pictographic',\n\t\t'Extender',\n\t\t'Grapheme_Base',\n\t\t'Grapheme_Extend',\n\t\t'Hex_Digit',\n\t\t'IDS_Binary_Operator',\n\t\t'IDS_Trinary_Operator',\n\t\t'ID_Continue',\n\t\t'ID_Start',\n\t\t'Ideographic',\n\t\t'Join_Control',\n\t\t'Logical_Order_Exception',\n\t\t'Lowercase',\n\t\t'Math',\n\t\t'Noncharacter_Code_Point',\n\t\t'Pattern_Syntax',\n\t\t'Pattern_White_Space',\n\t\t'Quotation_Mark',\n\t\t'Radical',\n\t\t'Regional_Indicator',\n\t\t'Sentence_Terminal',\n\t\t'Soft_Dotted',\n\t\t'Terminal_Punctuation',\n\t\t'Unified_Ideograph',\n\t\t'Uppercase',\n\t\t'Variation_Selector',\n\t\t'White_Space',\n\t\t'XID_Continue',\n\t\t'XID_Start'\n\t]],\n\t['Property_of_Strings', [\n\t\t'Basic_Emoji',\n\t\t'Emoji_Keycap_Sequence',\n\t\t'RGI_Emoji',\n\t\t'RGI_Emoji_Flag_Sequence',\n\t\t'RGI_Emoji_Modifier_Sequence',\n\t\t'RGI_Emoji_Tag_Sequence',\n\t\t'RGI_Emoji_ZWJ_Sequence'\n\t]]\n]);\n","const set = require('regenerate')(0x23F0, 0x23F3, 0x267F, 0x2693, 0x26A1, 0x26CE, 0x26D4, 0x26EA, 0x26F5, 0x26FA, 0x26FD, 0x2705, 0x2728, 0x274C, 0x274E, 0x2757, 0x27B0, 0x27BF, 0x2B50, 0x2B55, 0x1F004, 0x1F0CF, 0x1F18E, 0x1F201, 0x1F21A, 0x1F22F, 0x1F3F4, 0x1F440, 0x1F57A, 0x1F5A4, 0x1F6CC, 0x1F7F0);\nset.addRange(0x231A, 0x231B).addRange(0x23E9, 0x23EC).addRange(0x25FD, 0x25FE).addRange(0x2614, 0x2615).addRange(0x2648, 0x2653).addRange(0x26AA, 0x26AB).addRange(0x26BD, 0x26BE).addRange(0x26C4, 0x26C5).addRange(0x26F2, 0x26F3).addRange(0x270A, 0x270B).addRange(0x2753, 0x2755).addRange(0x2795, 0x2797).addRange(0x2B1B, 0x2B1C).addRange(0x1F191, 0x1F19A).addRange(0x1F232, 0x1F236).addRange(0x1F238, 0x1F23A).addRange(0x1F250, 0x1F251).addRange(0x1F300, 0x1F320).addRange(0x1F32D, 0x1F335).addRange(0x1F337, 0x1F37C).addRange(0x1F37E, 0x1F393).addRange(0x1F3A0, 0x1F3CA).addRange(0x1F3CF, 0x1F3D3).addRange(0x1F3E0, 0x1F3F0).addRange(0x1F3F8, 0x1F43E).addRange(0x1F442, 0x1F4FC).addRange(0x1F4FF, 0x1F53D).addRange(0x1F54B, 0x1F54E).addRange(0x1F550, 0x1F567).addRange(0x1F595, 0x1F596).addRange(0x1F5FB, 0x1F64F).addRange(0x1F680, 0x1F6C5).addRange(0x1F6D0, 0x1F6D2).addRange(0x1F6D5, 0x1F6D7).addRange(0x1F6DC, 0x1F6DF).addRange(0x1F6EB, 0x1F6EC).addRange(0x1F6F4, 0x1F6FC).addRange(0x1F7E0, 0x1F7EB).addRange(0x1F90C, 0x1F93A).addRange(0x1F93C, 0x1F945).addRange(0x1F947, 0x1F9FF).addRange(0x1FA70, 0x1FA7C).addRange(0x1FA80, 0x1FA88).addRange(0x1FA90, 0x1FABD).addRange(0x1FABF, 0x1FAC5).addRange(0x1FACE, 0x1FADB).addRange(0x1FAE0, 0x1FAE8).addRange(0x1FAF0, 0x1FAF8);\nexports.characters = set;\nexports.strings = ['\\xA9\\uFE0F','\\xAE\\uFE0F','\\u203C\\uFE0F','\\u2049\\uFE0F','\\u2122\\uFE0F','\\u2139\\uFE0F','\\u2194\\uFE0F','\\u2195\\uFE0F','\\u2196\\uFE0F','\\u2197\\uFE0F','\\u2198\\uFE0F','\\u2199\\uFE0F','\\u21A9\\uFE0F','\\u21AA\\uFE0F','\\u2328\\uFE0F','\\u23CF\\uFE0F','\\u23ED\\uFE0F','\\u23EE\\uFE0F','\\u23EF\\uFE0F','\\u23F1\\uFE0F','\\u23F2\\uFE0F','\\u23F8\\uFE0F','\\u23F9\\uFE0F','\\u23FA\\uFE0F','\\u24C2\\uFE0F','\\u25AA\\uFE0F','\\u25AB\\uFE0F','\\u25B6\\uFE0F','\\u25C0\\uFE0F','\\u25FB\\uFE0F','\\u25FC\\uFE0F','\\u2600\\uFE0F','\\u2601\\uFE0F','\\u2602\\uFE0F','\\u2603\\uFE0F','\\u2604\\uFE0F','\\u260E\\uFE0F','\\u2611\\uFE0F','\\u2618\\uFE0F','\\u261D\\uFE0F','\\u2620\\uFE0F','\\u2622\\uFE0F','\\u2623\\uFE0F','\\u2626\\uFE0F','\\u262A\\uFE0F','\\u262E\\uFE0F','\\u262F\\uFE0F','\\u2638\\uFE0F','\\u2639\\uFE0F','\\u263A\\uFE0F','\\u2640\\uFE0F','\\u2642\\uFE0F','\\u265F\\uFE0F','\\u2660\\uFE0F','\\u2663\\uFE0F','\\u2665\\uFE0F','\\u2666\\uFE0F','\\u2668\\uFE0F','\\u267B\\uFE0F','\\u267E\\uFE0F','\\u2692\\uFE0F','\\u2694\\uFE0F','\\u2695\\uFE0F','\\u2696\\uFE0F','\\u2697\\uFE0F','\\u2699\\uFE0F','\\u269B\\uFE0F','\\u269C\\uFE0F','\\u26A0\\uFE0F','\\u26A7\\uFE0F','\\u26B0\\uFE0F','\\u26B1\\uFE0F','\\u26C8\\uFE0F','\\u26CF\\uFE0F','\\u26D1\\uFE0F','\\u26D3\\uFE0F','\\u26E9\\uFE0F','\\u26F0\\uFE0F','\\u26F1\\uFE0F','\\u26F4\\uFE0F','\\u26F7\\uFE0F','\\u26F8\\uFE0F','\\u26F9\\uFE0F','\\u2702\\uFE0F','\\u2708\\uFE0F','\\u2709\\uFE0F','\\u270C\\uFE0F','\\u270D\\uFE0F','\\u270F\\uFE0F','\\u2712\\uFE0F','\\u2714\\uFE0F','\\u2716\\uFE0F','\\u271D\\uFE0F','\\u2721\\uFE0F','\\u2733\\uFE0F','\\u2734\\uFE0F','\\u2744\\uFE0F','\\u2747\\uFE0F','\\u2763\\uFE0F','\\u2764\\uFE0F','\\u27A1\\uFE0F','\\u2934\\uFE0F','\\u2935\\uFE0F','\\u2B05\\uFE0F','\\u2B06\\uFE0F','\\u2B07\\uFE0F','\\u3030\\uFE0F','\\u303D\\uFE0F','\\u3297\\uFE0F','\\u3299\\uFE0F','\\u{1F170}\\uFE0F','\\u{1F171}\\uFE0F','\\u{1F17E}\\uFE0F','\\u{1F17F}\\uFE0F','\\u{1F202}\\uFE0F','\\u{1F237}\\uFE0F','\\u{1F321}\\uFE0F','\\u{1F324}\\uFE0F','\\u{1F325}\\uFE0F','\\u{1F326}\\uFE0F','\\u{1F327}\\uFE0F','\\u{1F328}\\uFE0F','\\u{1F329}\\uFE0F','\\u{1F32A}\\uFE0F','\\u{1F32B}\\uFE0F','\\u{1F32C}\\uFE0F','\\u{1F336}\\uFE0F','\\u{1F37D}\\uFE0F','\\u{1F396}\\uFE0F','\\u{1F397}\\uFE0F','\\u{1F399}\\uFE0F','\\u{1F39A}\\uFE0F','\\u{1F39B}\\uFE0F','\\u{1F39E}\\uFE0F','\\u{1F39F}\\uFE0F','\\u{1F3CB}\\uFE0F','\\u{1F3CC}\\uFE0F','\\u{1F3CD}\\uFE0F','\\u{1F3CE}\\uFE0F','\\u{1F3D4}\\uFE0F','\\u{1F3D5}\\uFE0F','\\u{1F3D6}\\uFE0F','\\u{1F3D7}\\uFE0F','\\u{1F3D8}\\uFE0F','\\u{1F3D9}\\uFE0F','\\u{1F3DA}\\uFE0F','\\u{1F3DB}\\uFE0F','\\u{1F3DC}\\uFE0F','\\u{1F3DD}\\uFE0F','\\u{1F3DE}\\uFE0F','\\u{1F3DF}\\uFE0F','\\u{1F3F3}\\uFE0F','\\u{1F3F5}\\uFE0F','\\u{1F3F7}\\uFE0F','\\u{1F43F}\\uFE0F','\\u{1F441}\\uFE0F','\\u{1F4FD}\\uFE0F','\\u{1F549}\\uFE0F','\\u{1F54A}\\uFE0F','\\u{1F56F}\\uFE0F','\\u{1F570}\\uFE0F','\\u{1F573}\\uFE0F','\\u{1F574}\\uFE0F','\\u{1F575}\\uFE0F','\\u{1F576}\\uFE0F','\\u{1F577}\\uFE0F','\\u{1F578}\\uFE0F','\\u{1F579}\\uFE0F','\\u{1F587}\\uFE0F','\\u{1F58A}\\uFE0F','\\u{1F58B}\\uFE0F','\\u{1F58C}\\uFE0F','\\u{1F58D}\\uFE0F','\\u{1F590}\\uFE0F','\\u{1F5A5}\\uFE0F','\\u{1F5A8}\\uFE0F','\\u{1F5B1}\\uFE0F','\\u{1F5B2}\\uFE0F','\\u{1F5BC}\\uFE0F','\\u{1F5C2}\\uFE0F','\\u{1F5C3}\\uFE0F','\\u{1F5C4}\\uFE0F','\\u{1F5D1}\\uFE0F','\\u{1F5D2}\\uFE0F','\\u{1F5D3}\\uFE0F','\\u{1F5DC}\\uFE0F','\\u{1F5DD}\\uFE0F','\\u{1F5DE}\\uFE0F','\\u{1F5E1}\\uFE0F','\\u{1F5E3}\\uFE0F','\\u{1F5E8}\\uFE0F','\\u{1F5EF}\\uFE0F','\\u{1F5F3}\\uFE0F','\\u{1F5FA}\\uFE0F','\\u{1F6CB}\\uFE0F','\\u{1F6CD}\\uFE0F','\\u{1F6CE}\\uFE0F','\\u{1F6CF}\\uFE0F','\\u{1F6E0}\\uFE0F','\\u{1F6E1}\\uFE0F','\\u{1F6E2}\\uFE0F','\\u{1F6E3}\\uFE0F','\\u{1F6E4}\\uFE0F','\\u{1F6E5}\\uFE0F','\\u{1F6E9}\\uFE0F','\\u{1F6F0}\\uFE0F','\\u{1F6F3}\\uFE0F'];\n","const set = require('regenerate')();\n\nexports.characters = set;\nexports.strings = ['#\\uFE0F\\u20E3','*\\uFE0F\\u20E3','0\\uFE0F\\u20E3','1\\uFE0F\\u20E3','2\\uFE0F\\u20E3','3\\uFE0F\\u20E3','4\\uFE0F\\u20E3','5\\uFE0F\\u20E3','6\\uFE0F\\u20E3','7\\uFE0F\\u20E3','8\\uFE0F\\u20E3','9\\uFE0F\\u20E3'];\n","const set = require('regenerate')();\n\nexports.characters = set;\nexports.strings = ['\\u{1F1E6}\\u{1F1E8}','\\u{1F1E6}\\u{1F1E9}','\\u{1F1E6}\\u{1F1EA}','\\u{1F1E6}\\u{1F1EB}','\\u{1F1E6}\\u{1F1EC}','\\u{1F1E6}\\u{1F1EE}','\\u{1F1E6}\\u{1F1F1}','\\u{1F1E6}\\u{1F1F2}','\\u{1F1E6}\\u{1F1F4}','\\u{1F1E6}\\u{1F1F6}','\\u{1F1E6}\\u{1F1F7}','\\u{1F1E6}\\u{1F1F8}','\\u{1F1E6}\\u{1F1F9}','\\u{1F1E6}\\u{1F1FA}','\\u{1F1E6}\\u{1F1FC}','\\u{1F1E6}\\u{1F1FD}','\\u{1F1E6}\\u{1F1FF}','\\u{1F1E7}\\u{1F1E6}','\\u{1F1E7}\\u{1F1E7}','\\u{1F1E7}\\u{1F1E9}','\\u{1F1E7}\\u{1F1EA}','\\u{1F1E7}\\u{1F1EB}','\\u{1F1E7}\\u{1F1EC}','\\u{1F1E7}\\u{1F1ED}','\\u{1F1E7}\\u{1F1EE}','\\u{1F1E7}\\u{1F1EF}','\\u{1F1E7}\\u{1F1F1}','\\u{1F1E7}\\u{1F1F2}','\\u{1F1E7}\\u{1F1F3}','\\u{1F1E7}\\u{1F1F4}','\\u{1F1E7}\\u{1F1F6}','\\u{1F1E7}\\u{1F1F7}','\\u{1F1E7}\\u{1F1F8}','\\u{1F1E7}\\u{1F1F9}','\\u{1F1E7}\\u{1F1FB}','\\u{1F1E7}\\u{1F1FC}','\\u{1F1E7}\\u{1F1FE}','\\u{1F1E7}\\u{1F1FF}','\\u{1F1E8}\\u{1F1E6}','\\u{1F1E8}\\u{1F1E8}','\\u{1F1E8}\\u{1F1E9}','\\u{1F1E8}\\u{1F1EB}','\\u{1F1E8}\\u{1F1EC}','\\u{1F1E8}\\u{1F1ED}','\\u{1F1E8}\\u{1F1EE}','\\u{1F1E8}\\u{1F1F0}','\\u{1F1E8}\\u{1F1F1}','\\u{1F1E8}\\u{1F1F2}','\\u{1F1E8}\\u{1F1F3}','\\u{1F1E8}\\u{1F1F4}','\\u{1F1E8}\\u{1F1F5}','\\u{1F1E8}\\u{1F1F7}','\\u{1F1E8}\\u{1F1FA}','\\u{1F1E8}\\u{1F1FB}','\\u{1F1E8}\\u{1F1FC}','\\u{1F1E8}\\u{1F1FD}','\\u{1F1E8}\\u{1F1FE}','\\u{1F1E8}\\u{1F1FF}','\\u{1F1E9}\\u{1F1EA}','\\u{1F1E9}\\u{1F1EC}','\\u{1F1E9}\\u{1F1EF}','\\u{1F1E9}\\u{1F1F0}','\\u{1F1E9}\\u{1F1F2}','\\u{1F1E9}\\u{1F1F4}','\\u{1F1E9}\\u{1F1FF}','\\u{1F1EA}\\u{1F1E6}','\\u{1F1EA}\\u{1F1E8}','\\u{1F1EA}\\u{1F1EA}','\\u{1F1EA}\\u{1F1EC}','\\u{1F1EA}\\u{1F1ED}','\\u{1F1EA}\\u{1F1F7}','\\u{1F1EA}\\u{1F1F8}','\\u{1F1EA}\\u{1F1F9}','\\u{1F1EA}\\u{1F1FA}','\\u{1F1EB}\\u{1F1EE}','\\u{1F1EB}\\u{1F1EF}','\\u{1F1EB}\\u{1F1F0}','\\u{1F1EB}\\u{1F1F2}','\\u{1F1EB}\\u{1F1F4}','\\u{1F1EB}\\u{1F1F7}','\\u{1F1EC}\\u{1F1E6}','\\u{1F1EC}\\u{1F1E7}','\\u{1F1EC}\\u{1F1E9}','\\u{1F1EC}\\u{1F1EA}','\\u{1F1EC}\\u{1F1EB}','\\u{1F1EC}\\u{1F1EC}','\\u{1F1EC}\\u{1F1ED}','\\u{1F1EC}\\u{1F1EE}','\\u{1F1EC}\\u{1F1F1}','\\u{1F1EC}\\u{1F1F2}','\\u{1F1EC}\\u{1F1F3}','\\u{1F1EC}\\u{1F1F5}','\\u{1F1EC}\\u{1F1F6}','\\u{1F1EC}\\u{1F1F7}','\\u{1F1EC}\\u{1F1F8}','\\u{1F1EC}\\u{1F1F9}','\\u{1F1EC}\\u{1F1FA}','\\u{1F1EC}\\u{1F1FC}','\\u{1F1EC}\\u{1F1FE}','\\u{1F1ED}\\u{1F1F0}','\\u{1F1ED}\\u{1F1F2}','\\u{1F1ED}\\u{1F1F3}','\\u{1F1ED}\\u{1F1F7}','\\u{1F1ED}\\u{1F1F9}','\\u{1F1ED}\\u{1F1FA}','\\u{1F1EE}\\u{1F1E8}','\\u{1F1EE}\\u{1F1E9}','\\u{1F1EE}\\u{1F1EA}','\\u{1F1EE}\\u{1F1F1}','\\u{1F1EE}\\u{1F1F2}','\\u{1F1EE}\\u{1F1F3}','\\u{1F1EE}\\u{1F1F4}','\\u{1F1EE}\\u{1F1F6}','\\u{1F1EE}\\u{1F1F7}','\\u{1F1EE}\\u{1F1F8}','\\u{1F1EE}\\u{1F1F9}','\\u{1F1EF}\\u{1F1EA}','\\u{1F1EF}\\u{1F1F2}','\\u{1F1EF}\\u{1F1F4}','\\u{1F1EF}\\u{1F1F5}','\\u{1F1F0}\\u{1F1EA}','\\u{1F1F0}\\u{1F1EC}','\\u{1F1F0}\\u{1F1ED}','\\u{1F1F0}\\u{1F1EE}','\\u{1F1F0}\\u{1F1F2}','\\u{1F1F0}\\u{1F1F3}','\\u{1F1F0}\\u{1F1F5}','\\u{1F1F0}\\u{1F1F7}','\\u{1F1F0}\\u{1F1FC}','\\u{1F1F0}\\u{1F1FE}','\\u{1F1F0}\\u{1F1FF}','\\u{1F1F1}\\u{1F1E6}','\\u{1F1F1}\\u{1F1E7}','\\u{1F1F1}\\u{1F1E8}','\\u{1F1F1}\\u{1F1EE}','\\u{1F1F1}\\u{1F1F0}','\\u{1F1F1}\\u{1F1F7}','\\u{1F1F1}\\u{1F1F8}','\\u{1F1F1}\\u{1F1F9}','\\u{1F1F1}\\u{1F1FA}','\\u{1F1F1}\\u{1F1FB}','\\u{1F1F1}\\u{1F1FE}','\\u{1F1F2}\\u{1F1E6}','\\u{1F1F2}\\u{1F1E8}','\\u{1F1F2}\\u{1F1E9}','\\u{1F1F2}\\u{1F1EA}','\\u{1F1F2}\\u{1F1EB}','\\u{1F1F2}\\u{1F1EC}','\\u{1F1F2}\\u{1F1ED}','\\u{1F1F2}\\u{1F1F0}','\\u{1F1F2}\\u{1F1F1}','\\u{1F1F2}\\u{1F1F2}','\\u{1F1F2}\\u{1F1F3}','\\u{1F1F2}\\u{1F1F4}','\\u{1F1F2}\\u{1F1F5}','\\u{1F1F2}\\u{1F1F6}','\\u{1F1F2}\\u{1F1F7}','\\u{1F1F2}\\u{1F1F8}','\\u{1F1F2}\\u{1F1F9}','\\u{1F1F2}\\u{1F1FA}','\\u{1F1F2}\\u{1F1FB}','\\u{1F1F2}\\u{1F1FC}','\\u{1F1F2}\\u{1F1FD}','\\u{1F1F2}\\u{1F1FE}','\\u{1F1F2}\\u{1F1FF}','\\u{1F1F3}\\u{1F1E6}','\\u{1F1F3}\\u{1F1E8}','\\u{1F1F3}\\u{1F1EA}','\\u{1F1F3}\\u{1F1EB}','\\u{1F1F3}\\u{1F1EC}','\\u{1F1F3}\\u{1F1EE}','\\u{1F1F3}\\u{1F1F1}','\\u{1F1F3}\\u{1F1F4}','\\u{1F1F3}\\u{1F1F5}','\\u{1F1F3}\\u{1F1F7}','\\u{1F1F3}\\u{1F1FA}','\\u{1F1F3}\\u{1F1FF}','\\u{1F1F4}\\u{1F1F2}','\\u{1F1F5}\\u{1F1E6}','\\u{1F1F5}\\u{1F1EA}','\\u{1F1F5}\\u{1F1EB}','\\u{1F1F5}\\u{1F1EC}','\\u{1F1F5}\\u{1F1ED}','\\u{1F1F5}\\u{1F1F0}','\\u{1F1F5}\\u{1F1F1}','\\u{1F1F5}\\u{1F1F2}','\\u{1F1F5}\\u{1F1F3}','\\u{1F1F5}\\u{1F1F7}','\\u{1F1F5}\\u{1F1F8}','\\u{1F1F5}\\u{1F1F9}','\\u{1F1F5}\\u{1F1FC}','\\u{1F1F5}\\u{1F1FE}','\\u{1F1F6}\\u{1F1E6}','\\u{1F1F7}\\u{1F1EA}','\\u{1F1F7}\\u{1F1F4}','\\u{1F1F7}\\u{1F1F8}','\\u{1F1F7}\\u{1F1FA}','\\u{1F1F7}\\u{1F1FC}','\\u{1F1F8}\\u{1F1E6}','\\u{1F1F8}\\u{1F1E7}','\\u{1F1F8}\\u{1F1E8}','\\u{1F1F8}\\u{1F1E9}','\\u{1F1F8}\\u{1F1EA}','\\u{1F1F8}\\u{1F1EC}','\\u{1F1F8}\\u{1F1ED}','\\u{1F1F8}\\u{1F1EE}','\\u{1F1F8}\\u{1F1EF}','\\u{1F1F8}\\u{1F1F0}','\\u{1F1F8}\\u{1F1F1}','\\u{1F1F8}\\u{1F1F2}','\\u{1F1F8}\\u{1F1F3}','\\u{1F1F8}\\u{1F1F4}','\\u{1F1F8}\\u{1F1F7}','\\u{1F1F8}\\u{1F1F8}','\\u{1F1F8}\\u{1F1F9}','\\u{1F1F8}\\u{1F1FB}','\\u{1F1F8}\\u{1F1FD}','\\u{1F1F8}\\u{1F1FE}','\\u{1F1F8}\\u{1F1FF}','\\u{1F1F9}\\u{1F1E6}','\\u{1F1F9}\\u{1F1E8}','\\u{1F1F9}\\u{1F1E9}','\\u{1F1F9}\\u{1F1EB}','\\u{1F1F9}\\u{1F1EC}','\\u{1F1F9}\\u{1F1ED}','\\u{1F1F9}\\u{1F1EF}','\\u{1F1F9}\\u{1F1F0}','\\u{1F1F9}\\u{1F1F1}','\\u{1F1F9}\\u{1F1F2}','\\u{1F1F9}\\u{1F1F3}','\\u{1F1F9}\\u{1F1F4}','\\u{1F1F9}\\u{1F1F7}','\\u{1F1F9}\\u{1F1F9}','\\u{1F1F9}\\u{1F1FB}','\\u{1F1F9}\\u{1F1FC}','\\u{1F1F9}\\u{1F1FF}','\\u{1F1FA}\\u{1F1E6}','\\u{1F1FA}\\u{1F1EC}','\\u{1F1FA}\\u{1F1F2}','\\u{1F1FA}\\u{1F1F3}','\\u{1F1FA}\\u{1F1F8}','\\u{1F1FA}\\u{1F1FE}','\\u{1F1FA}\\u{1F1FF}','\\u{1F1FB}\\u{1F1E6}','\\u{1F1FB}\\u{1F1E8}','\\u{1F1FB}\\u{1F1EA}','\\u{1F1FB}\\u{1F1EC}','\\u{1F1FB}\\u{1F1EE}','\\u{1F1FB}\\u{1F1F3}','\\u{1F1FB}\\u{1F1FA}','\\u{1F1FC}\\u{1F1EB}','\\u{1F1FC}\\u{1F1F8}','\\u{1F1FD}\\u{1F1F0}','\\u{1F1FE}\\u{1F1EA}','\\u{1F1FE}\\u{1F1F9}','\\u{1F1FF}\\u{1F1E6}','\\u{1F1FF}\\u{1F1F2}','\\u{1F1FF}\\u{1F1FC}'];\n","const set = require('regenerate')();\n\nexports.characters = set;\nexports.strings = ['\\u261D\\u{1F3FB}','\\u261D\\u{1F3FC}','\\u261D\\u{1F3FD}','\\u261D\\u{1F3FE}','\\u261D\\u{1F3FF}','\\u26F9\\u{1F3FB}','\\u26F9\\u{1F3FC}','\\u26F9\\u{1F3FD}','\\u26F9\\u{1F3FE}','\\u26F9\\u{1F3FF}','\\u270A\\u{1F3FB}','\\u270A\\u{1F3FC}','\\u270A\\u{1F3FD}','\\u270A\\u{1F3FE}','\\u270A\\u{1F3FF}','\\u270B\\u{1F3FB}','\\u270B\\u{1F3FC}','\\u270B\\u{1F3FD}','\\u270B\\u{1F3FE}','\\u270B\\u{1F3FF}','\\u270C\\u{1F3FB}','\\u270C\\u{1F3FC}','\\u270C\\u{1F3FD}','\\u270C\\u{1F3FE}','\\u270C\\u{1F3FF}','\\u270D\\u{1F3FB}','\\u270D\\u{1F3FC}','\\u270D\\u{1F3FD}','\\u270D\\u{1F3FE}','\\u270D\\u{1F3FF}','\\u{1F385}\\u{1F3FB}','\\u{1F385}\\u{1F3FC}','\\u{1F385}\\u{1F3FD}','\\u{1F385}\\u{1F3FE}','\\u{1F385}\\u{1F3FF}','\\u{1F3C2}\\u{1F3FB}','\\u{1F3C2}\\u{1F3FC}','\\u{1F3C2}\\u{1F3FD}','\\u{1F3C2}\\u{1F3FE}','\\u{1F3C2}\\u{1F3FF}','\\u{1F3C3}\\u{1F3FB}','\\u{1F3C3}\\u{1F3FC}','\\u{1F3C3}\\u{1F3FD}','\\u{1F3C3}\\u{1F3FE}','\\u{1F3C3}\\u{1F3FF}','\\u{1F3C4}\\u{1F3FB}','\\u{1F3C4}\\u{1F3FC}','\\u{1F3C4}\\u{1F3FD}','\\u{1F3C4}\\u{1F3FE}','\\u{1F3C4}\\u{1F3FF}','\\u{1F3C7}\\u{1F3FB}','\\u{1F3C7}\\u{1F3FC}','\\u{1F3C7}\\u{1F3FD}','\\u{1F3C7}\\u{1F3FE}','\\u{1F3C7}\\u{1F3FF}','\\u{1F3CA}\\u{1F3FB}','\\u{1F3CA}\\u{1F3FC}','\\u{1F3CA}\\u{1F3FD}','\\u{1F3CA}\\u{1F3FE}','\\u{1F3CA}\\u{1F3FF}','\\u{1F3CB}\\u{1F3FB}','\\u{1F3CB}\\u{1F3FC}','\\u{1F3CB}\\u{1F3FD}','\\u{1F3CB}\\u{1F3FE}','\\u{1F3CB}\\u{1F3FF}','\\u{1F3CC}\\u{1F3FB}','\\u{1F3CC}\\u{1F3FC}','\\u{1F3CC}\\u{1F3FD}','\\u{1F3CC}\\u{1F3FE}','\\u{1F3CC}\\u{1F3FF}','\\u{1F442}\\u{1F3FB}','\\u{1F442}\\u{1F3FC}','\\u{1F442}\\u{1F3FD}','\\u{1F442}\\u{1F3FE}','\\u{1F442}\\u{1F3FF}','\\u{1F443}\\u{1F3FB}','\\u{1F443}\\u{1F3FC}','\\u{1F443}\\u{1F3FD}','\\u{1F443}\\u{1F3FE}','\\u{1F443}\\u{1F3FF}','\\u{1F446}\\u{1F3FB}','\\u{1F446}\\u{1F3FC}','\\u{1F446}\\u{1F3FD}','\\u{1F446}\\u{1F3FE}','\\u{1F446}\\u{1F3FF}','\\u{1F447}\\u{1F3FB}','\\u{1F447}\\u{1F3FC}','\\u{1F447}\\u{1F3FD}','\\u{1F447}\\u{1F3FE}','\\u{1F447}\\u{1F3FF}','\\u{1F448}\\u{1F3FB}','\\u{1F448}\\u{1F3FC}','\\u{1F448}\\u{1F3FD}','\\u{1F448}\\u{1F3FE}','\\u{1F448}\\u{1F3FF}','\\u{1F449}\\u{1F3FB}','\\u{1F449}\\u{1F3FC}','\\u{1F449}\\u{1F3FD}','\\u{1F449}\\u{1F3FE}','\\u{1F449}\\u{1F3FF}','\\u{1F44A}\\u{1F3FB}','\\u{1F44A}\\u{1F3FC}','\\u{1F44A}\\u{1F3FD}','\\u{1F44A}\\u{1F3FE}','\\u{1F44A}\\u{1F3FF}','\\u{1F44B}\\u{1F3FB}','\\u{1F44B}\\u{1F3FC}','\\u{1F44B}\\u{1F3FD}','\\u{1F44B}\\u{1F3FE}','\\u{1F44B}\\u{1F3FF}','\\u{1F44C}\\u{1F3FB}','\\u{1F44C}\\u{1F3FC}','\\u{1F44C}\\u{1F3FD}','\\u{1F44C}\\u{1F3FE}','\\u{1F44C}\\u{1F3FF}','\\u{1F44D}\\u{1F3FB}','\\u{1F44D}\\u{1F3FC}','\\u{1F44D}\\u{1F3FD}','\\u{1F44D}\\u{1F3FE}','\\u{1F44D}\\u{1F3FF}','\\u{1F44E}\\u{1F3FB}','\\u{1F44E}\\u{1F3FC}','\\u{1F44E}\\u{1F3FD}','\\u{1F44E}\\u{1F3FE}','\\u{1F44E}\\u{1F3FF}','\\u{1F44F}\\u{1F3FB}','\\u{1F44F}\\u{1F3FC}','\\u{1F44F}\\u{1F3FD}','\\u{1F44F}\\u{1F3FE}','\\u{1F44F}\\u{1F3FF}','\\u{1F450}\\u{1F3FB}','\\u{1F450}\\u{1F3FC}','\\u{1F450}\\u{1F3FD}','\\u{1F450}\\u{1F3FE}','\\u{1F450}\\u{1F3FF}','\\u{1F466}\\u{1F3FB}','\\u{1F466}\\u{1F3FC}','\\u{1F466}\\u{1F3FD}','\\u{1F466}\\u{1F3FE}','\\u{1F466}\\u{1F3FF}','\\u{1F467}\\u{1F3FB}','\\u{1F467}\\u{1F3FC}','\\u{1F467}\\u{1F3FD}','\\u{1F467}\\u{1F3FE}','\\u{1F467}\\u{1F3FF}','\\u{1F468}\\u{1F3FB}','\\u{1F468}\\u{1F3FC}','\\u{1F468}\\u{1F3FD}','\\u{1F468}\\u{1F3FE}','\\u{1F468}\\u{1F3FF}','\\u{1F469}\\u{1F3FB}','\\u{1F469}\\u{1F3FC}','\\u{1F469}\\u{1F3FD}','\\u{1F469}\\u{1F3FE}','\\u{1F469}\\u{1F3FF}','\\u{1F46B}\\u{1F3FB}','\\u{1F46B}\\u{1F3FC}','\\u{1F46B}\\u{1F3FD}','\\u{1F46B}\\u{1F3FE}','\\u{1F46B}\\u{1F3FF}','\\u{1F46C}\\u{1F3FB}','\\u{1F46C}\\u{1F3FC}','\\u{1F46C}\\u{1F3FD}','\\u{1F46C}\\u{1F3FE}','\\u{1F46C}\\u{1F3FF}','\\u{1F46D}\\u{1F3FB}','\\u{1F46D}\\u{1F3FC}','\\u{1F46D}\\u{1F3FD}','\\u{1F46D}\\u{1F3FE}','\\u{1F46D}\\u{1F3FF}','\\u{1F46E}\\u{1F3FB}','\\u{1F46E}\\u{1F3FC}','\\u{1F46E}\\u{1F3FD}','\\u{1F46E}\\u{1F3FE}','\\u{1F46E}\\u{1F3FF}','\\u{1F470}\\u{1F3FB}','\\u{1F470}\\u{1F3FC}','\\u{1F470}\\u{1F3FD}','\\u{1F470}\\u{1F3FE}','\\u{1F470}\\u{1F3FF}','\\u{1F471}\\u{1F3FB}','\\u{1F471}\\u{1F3FC}','\\u{1F471}\\u{1F3FD}','\\u{1F471}\\u{1F3FE}','\\u{1F471}\\u{1F3FF}','\\u{1F472}\\u{1F3FB}','\\u{1F472}\\u{1F3FC}','\\u{1F472}\\u{1F3FD}','\\u{1F472}\\u{1F3FE}','\\u{1F472}\\u{1F3FF}','\\u{1F473}\\u{1F3FB}','\\u{1F473}\\u{1F3FC}','\\u{1F473}\\u{1F3FD}','\\u{1F473}\\u{1F3FE}','\\u{1F473}\\u{1F3FF}','\\u{1F474}\\u{1F3FB}','\\u{1F474}\\u{1F3FC}','\\u{1F474}\\u{1F3FD}','\\u{1F474}\\u{1F3FE}','\\u{1F474}\\u{1F3FF}','\\u{1F475}\\u{1F3FB}','\\u{1F475}\\u{1F3FC}','\\u{1F475}\\u{1F3FD}','\\u{1F475}\\u{1F3FE}','\\u{1F475}\\u{1F3FF}','\\u{1F476}\\u{1F3FB}','\\u{1F476}\\u{1F3FC}','\\u{1F476}\\u{1F3FD}','\\u{1F476}\\u{1F3FE}','\\u{1F476}\\u{1F3FF}','\\u{1F477}\\u{1F3FB}','\\u{1F477}\\u{1F3FC}','\\u{1F477}\\u{1F3FD}','\\u{1F477}\\u{1F3FE}','\\u{1F477}\\u{1F3FF}','\\u{1F478}\\u{1F3FB}','\\u{1F478}\\u{1F3FC}','\\u{1F478}\\u{1F3FD}','\\u{1F478}\\u{1F3FE}','\\u{1F478}\\u{1F3FF}','\\u{1F47C}\\u{1F3FB}','\\u{1F47C}\\u{1F3FC}','\\u{1F47C}\\u{1F3FD}','\\u{1F47C}\\u{1F3FE}','\\u{1F47C}\\u{1F3FF}','\\u{1F481}\\u{1F3FB}','\\u{1F481}\\u{1F3FC}','\\u{1F481}\\u{1F3FD}','\\u{1F481}\\u{1F3FE}','\\u{1F481}\\u{1F3FF}','\\u{1F482}\\u{1F3FB}','\\u{1F482}\\u{1F3FC}','\\u{1F482}\\u{1F3FD}','\\u{1F482}\\u{1F3FE}','\\u{1F482}\\u{1F3FF}','\\u{1F483}\\u{1F3FB}','\\u{1F483}\\u{1F3FC}','\\u{1F483}\\u{1F3FD}','\\u{1F483}\\u{1F3FE}','\\u{1F483}\\u{1F3FF}','\\u{1F485}\\u{1F3FB}','\\u{1F485}\\u{1F3FC}','\\u{1F485}\\u{1F3FD}','\\u{1F485}\\u{1F3FE}','\\u{1F485}\\u{1F3FF}','\\u{1F486}\\u{1F3FB}','\\u{1F486}\\u{1F3FC}','\\u{1F486}\\u{1F3FD}','\\u{1F486}\\u{1F3FE}','\\u{1F486}\\u{1F3FF}','\\u{1F487}\\u{1F3FB}','\\u{1F487}\\u{1F3FC}','\\u{1F487}\\u{1F3FD}','\\u{1F487}\\u{1F3FE}','\\u{1F487}\\u{1F3FF}','\\u{1F48F}\\u{1F3FB}','\\u{1F48F}\\u{1F3FC}','\\u{1F48F}\\u{1F3FD}','\\u{1F48F}\\u{1F3FE}','\\u{1F48F}\\u{1F3FF}','\\u{1F491}\\u{1F3FB}','\\u{1F491}\\u{1F3FC}','\\u{1F491}\\u{1F3FD}','\\u{1F491}\\u{1F3FE}','\\u{1F491}\\u{1F3FF}','\\u{1F4AA}\\u{1F3FB}','\\u{1F4AA}\\u{1F3FC}','\\u{1F4AA}\\u{1F3FD}','\\u{1F4AA}\\u{1F3FE}','\\u{1F4AA}\\u{1F3FF}','\\u{1F574}\\u{1F3FB}','\\u{1F574}\\u{1F3FC}','\\u{1F574}\\u{1F3FD}','\\u{1F574}\\u{1F3FE}','\\u{1F574}\\u{1F3FF}','\\u{1F575}\\u{1F3FB}','\\u{1F575}\\u{1F3FC}','\\u{1F575}\\u{1F3FD}','\\u{1F575}\\u{1F3FE}','\\u{1F575}\\u{1F3FF}','\\u{1F57A}\\u{1F3FB}','\\u{1F57A}\\u{1F3FC}','\\u{1F57A}\\u{1F3FD}','\\u{1F57A}\\u{1F3FE}','\\u{1F57A}\\u{1F3FF}','\\u{1F590}\\u{1F3FB}','\\u{1F590}\\u{1F3FC}','\\u{1F590}\\u{1F3FD}','\\u{1F590}\\u{1F3FE}','\\u{1F590}\\u{1F3FF}','\\u{1F595}\\u{1F3FB}','\\u{1F595}\\u{1F3FC}','\\u{1F595}\\u{1F3FD}','\\u{1F595}\\u{1F3FE}','\\u{1F595}\\u{1F3FF}','\\u{1F596}\\u{1F3FB}','\\u{1F596}\\u{1F3FC}','\\u{1F596}\\u{1F3FD}','\\u{1F596}\\u{1F3FE}','\\u{1F596}\\u{1F3FF}','\\u{1F645}\\u{1F3FB}','\\u{1F645}\\u{1F3FC}','\\u{1F645}\\u{1F3FD}','\\u{1F645}\\u{1F3FE}','\\u{1F645}\\u{1F3FF}','\\u{1F646}\\u{1F3FB}','\\u{1F646}\\u{1F3FC}','\\u{1F646}\\u{1F3FD}','\\u{1F646}\\u{1F3FE}','\\u{1F646}\\u{1F3FF}','\\u{1F647}\\u{1F3FB}','\\u{1F647}\\u{1F3FC}','\\u{1F647}\\u{1F3FD}','\\u{1F647}\\u{1F3FE}','\\u{1F647}\\u{1F3FF}','\\u{1F64B}\\u{1F3FB}','\\u{1F64B}\\u{1F3FC}','\\u{1F64B}\\u{1F3FD}','\\u{1F64B}\\u{1F3FE}','\\u{1F64B}\\u{1F3FF}','\\u{1F64C}\\u{1F3FB}','\\u{1F64C}\\u{1F3FC}','\\u{1F64C}\\u{1F3FD}','\\u{1F64C}\\u{1F3FE}','\\u{1F64C}\\u{1F3FF}','\\u{1F64D}\\u{1F3FB}','\\u{1F64D}\\u{1F3FC}','\\u{1F64D}\\u{1F3FD}','\\u{1F64D}\\u{1F3FE}','\\u{1F64D}\\u{1F3FF}','\\u{1F64E}\\u{1F3FB}','\\u{1F64E}\\u{1F3FC}','\\u{1F64E}\\u{1F3FD}','\\u{1F64E}\\u{1F3FE}','\\u{1F64E}\\u{1F3FF}','\\u{1F64F}\\u{1F3FB}','\\u{1F64F}\\u{1F3FC}','\\u{1F64F}\\u{1F3FD}','\\u{1F64F}\\u{1F3FE}','\\u{1F64F}\\u{1F3FF}','\\u{1F6A3}\\u{1F3FB}','\\u{1F6A3}\\u{1F3FC}','\\u{1F6A3}\\u{1F3FD}','\\u{1F6A3}\\u{1F3FE}','\\u{1F6A3}\\u{1F3FF}','\\u{1F6B4}\\u{1F3FB}','\\u{1F6B4}\\u{1F3FC}','\\u{1F6B4}\\u{1F3FD}','\\u{1F6B4}\\u{1F3FE}','\\u{1F6B4}\\u{1F3FF}','\\u{1F6B5}\\u{1F3FB}','\\u{1F6B5}\\u{1F3FC}','\\u{1F6B5}\\u{1F3FD}','\\u{1F6B5}\\u{1F3FE}','\\u{1F6B5}\\u{1F3FF}','\\u{1F6B6}\\u{1F3FB}','\\u{1F6B6}\\u{1F3FC}','\\u{1F6B6}\\u{1F3FD}','\\u{1F6B6}\\u{1F3FE}','\\u{1F6B6}\\u{1F3FF}','\\u{1F6C0}\\u{1F3FB}','\\u{1F6C0}\\u{1F3FC}','\\u{1F6C0}\\u{1F3FD}','\\u{1F6C0}\\u{1F3FE}','\\u{1F6C0}\\u{1F3FF}','\\u{1F6CC}\\u{1F3FB}','\\u{1F6CC}\\u{1F3FC}','\\u{1F6CC}\\u{1F3FD}','\\u{1F6CC}\\u{1F3FE}','\\u{1F6CC}\\u{1F3FF}','\\u{1F90C}\\u{1F3FB}','\\u{1F90C}\\u{1F3FC}','\\u{1F90C}\\u{1F3FD}','\\u{1F90C}\\u{1F3FE}','\\u{1F90C}\\u{1F3FF}','\\u{1F90F}\\u{1F3FB}','\\u{1F90F}\\u{1F3FC}','\\u{1F90F}\\u{1F3FD}','\\u{1F90F}\\u{1F3FE}','\\u{1F90F}\\u{1F3FF}','\\u{1F918}\\u{1F3FB}','\\u{1F918}\\u{1F3FC}','\\u{1F918}\\u{1F3FD}','\\u{1F918}\\u{1F3FE}','\\u{1F918}\\u{1F3FF}','\\u{1F919}\\u{1F3FB}','\\u{1F919}\\u{1F3FC}','\\u{1F919}\\u{1F3FD}','\\u{1F919}\\u{1F3FE}','\\u{1F919}\\u{1F3FF}','\\u{1F91A}\\u{1F3FB}','\\u{1F91A}\\u{1F3FC}','\\u{1F91A}\\u{1F3FD}','\\u{1F91A}\\u{1F3FE}','\\u{1F91A}\\u{1F3FF}','\\u{1F91B}\\u{1F3FB}','\\u{1F91B}\\u{1F3FC}','\\u{1F91B}\\u{1F3FD}','\\u{1F91B}\\u{1F3FE}','\\u{1F91B}\\u{1F3FF}','\\u{1F91C}\\u{1F3FB}','\\u{1F91C}\\u{1F3FC}','\\u{1F91C}\\u{1F3FD}','\\u{1F91C}\\u{1F3FE}','\\u{1F91C}\\u{1F3FF}','\\u{1F91D}\\u{1F3FB}','\\u{1F91D}\\u{1F3FC}','\\u{1F91D}\\u{1F3FD}','\\u{1F91D}\\u{1F3FE}','\\u{1F91D}\\u{1F3FF}','\\u{1F91E}\\u{1F3FB}','\\u{1F91E}\\u{1F3FC}','\\u{1F91E}\\u{1F3FD}','\\u{1F91E}\\u{1F3FE}','\\u{1F91E}\\u{1F3FF}','\\u{1F91F}\\u{1F3FB}','\\u{1F91F}\\u{1F3FC}','\\u{1F91F}\\u{1F3FD}','\\u{1F91F}\\u{1F3FE}','\\u{1F91F}\\u{1F3FF}','\\u{1F926}\\u{1F3FB}','\\u{1F926}\\u{1F3FC}','\\u{1F926}\\u{1F3FD}','\\u{1F926}\\u{1F3FE}','\\u{1F926}\\u{1F3FF}','\\u{1F930}\\u{1F3FB}','\\u{1F930}\\u{1F3FC}','\\u{1F930}\\u{1F3FD}','\\u{1F930}\\u{1F3FE}','\\u{1F930}\\u{1F3FF}','\\u{1F931}\\u{1F3FB}','\\u{1F931}\\u{1F3FC}','\\u{1F931}\\u{1F3FD}','\\u{1F931}\\u{1F3FE}','\\u{1F931}\\u{1F3FF}','\\u{1F932}\\u{1F3FB}','\\u{1F932}\\u{1F3FC}','\\u{1F932}\\u{1F3FD}','\\u{1F932}\\u{1F3FE}','\\u{1F932}\\u{1F3FF}','\\u{1F933}\\u{1F3FB}','\\u{1F933}\\u{1F3FC}','\\u{1F933}\\u{1F3FD}','\\u{1F933}\\u{1F3FE}','\\u{1F933}\\u{1F3FF}','\\u{1F934}\\u{1F3FB}','\\u{1F934}\\u{1F3FC}','\\u{1F934}\\u{1F3FD}','\\u{1F934}\\u{1F3FE}','\\u{1F934}\\u{1F3FF}','\\u{1F935}\\u{1F3FB}','\\u{1F935}\\u{1F3FC}','\\u{1F935}\\u{1F3FD}','\\u{1F935}\\u{1F3FE}','\\u{1F935}\\u{1F3FF}','\\u{1F936}\\u{1F3FB}','\\u{1F936}\\u{1F3FC}','\\u{1F936}\\u{1F3FD}','\\u{1F936}\\u{1F3FE}','\\u{1F936}\\u{1F3FF}','\\u{1F937}\\u{1F3FB}','\\u{1F937}\\u{1F3FC}','\\u{1F937}\\u{1F3FD}','\\u{1F937}\\u{1F3FE}','\\u{1F937}\\u{1F3FF}','\\u{1F938}\\u{1F3FB}','\\u{1F938}\\u{1F3FC}','\\u{1F938}\\u{1F3FD}','\\u{1F938}\\u{1F3FE}','\\u{1F938}\\u{1F3FF}','\\u{1F939}\\u{1F3FB}','\\u{1F939}\\u{1F3FC}','\\u{1F939}\\u{1F3FD}','\\u{1F939}\\u{1F3FE}','\\u{1F939}\\u{1F3FF}','\\u{1F93D}\\u{1F3FB}','\\u{1F93D}\\u{1F3FC}','\\u{1F93D}\\u{1F3FD}','\\u{1F93D}\\u{1F3FE}','\\u{1F93D}\\u{1F3FF}','\\u{1F93E}\\u{1F3FB}','\\u{1F93E}\\u{1F3FC}','\\u{1F93E}\\u{1F3FD}','\\u{1F93E}\\u{1F3FE}','\\u{1F93E}\\u{1F3FF}','\\u{1F977}\\u{1F3FB}','\\u{1F977}\\u{1F3FC}','\\u{1F977}\\u{1F3FD}','\\u{1F977}\\u{1F3FE}','\\u{1F977}\\u{1F3FF}','\\u{1F9B5}\\u{1F3FB}','\\u{1F9B5}\\u{1F3FC}','\\u{1F9B5}\\u{1F3FD}','\\u{1F9B5}\\u{1F3FE}','\\u{1F9B5}\\u{1F3FF}','\\u{1F9B6}\\u{1F3FB}','\\u{1F9B6}\\u{1F3FC}','\\u{1F9B6}\\u{1F3FD}','\\u{1F9B6}\\u{1F3FE}','\\u{1F9B6}\\u{1F3FF}','\\u{1F9B8}\\u{1F3FB}','\\u{1F9B8}\\u{1F3FC}','\\u{1F9B8}\\u{1F3FD}','\\u{1F9B8}\\u{1F3FE}','\\u{1F9B8}\\u{1F3FF}','\\u{1F9B9}\\u{1F3FB}','\\u{1F9B9}\\u{1F3FC}','\\u{1F9B9}\\u{1F3FD}','\\u{1F9B9}\\u{1F3FE}','\\u{1F9B9}\\u{1F3FF}','\\u{1F9BB}\\u{1F3FB}','\\u{1F9BB}\\u{1F3FC}','\\u{1F9BB}\\u{1F3FD}','\\u{1F9BB}\\u{1F3FE}','\\u{1F9BB}\\u{1F3FF}','\\u{1F9CD}\\u{1F3FB}','\\u{1F9CD}\\u{1F3FC}','\\u{1F9CD}\\u{1F3FD}','\\u{1F9CD}\\u{1F3FE}','\\u{1F9CD}\\u{1F3FF}','\\u{1F9CE}\\u{1F3FB}','\\u{1F9CE}\\u{1F3FC}','\\u{1F9CE}\\u{1F3FD}','\\u{1F9CE}\\u{1F3FE}','\\u{1F9CE}\\u{1F3FF}','\\u{1F9CF}\\u{1F3FB}','\\u{1F9CF}\\u{1F3FC}','\\u{1F9CF}\\u{1F3FD}','\\u{1F9CF}\\u{1F3FE}','\\u{1F9CF}\\u{1F3FF}','\\u{1F9D1}\\u{1F3FB}','\\u{1F9D1}\\u{1F3FC}','\\u{1F9D1}\\u{1F3FD}','\\u{1F9D1}\\u{1F3FE}','\\u{1F9D1}\\u{1F3FF}','\\u{1F9D2}\\u{1F3FB}','\\u{1F9D2}\\u{1F3FC}','\\u{1F9D2}\\u{1F3FD}','\\u{1F9D2}\\u{1F3FE}','\\u{1F9D2}\\u{1F3FF}','\\u{1F9D3}\\u{1F3FB}','\\u{1F9D3}\\u{1F3FC}','\\u{1F9D3}\\u{1F3FD}','\\u{1F9D3}\\u{1F3FE}','\\u{1F9D3}\\u{1F3FF}','\\u{1F9D4}\\u{1F3FB}','\\u{1F9D4}\\u{1F3FC}','\\u{1F9D4}\\u{1F3FD}','\\u{1F9D4}\\u{1F3FE}','\\u{1F9D4}\\u{1F3FF}','\\u{1F9D5}\\u{1F3FB}','\\u{1F9D5}\\u{1F3FC}','\\u{1F9D5}\\u{1F3FD}','\\u{1F9D5}\\u{1F3FE}','\\u{1F9D5}\\u{1F3FF}','\\u{1F9D6}\\u{1F3FB}','\\u{1F9D6}\\u{1F3FC}','\\u{1F9D6}\\u{1F3FD}','\\u{1F9D6}\\u{1F3FE}','\\u{1F9D6}\\u{1F3FF}','\\u{1F9D7}\\u{1F3FB}','\\u{1F9D7}\\u{1F3FC}','\\u{1F9D7}\\u{1F3FD}','\\u{1F9D7}\\u{1F3FE}','\\u{1F9D7}\\u{1F3FF}','\\u{1F9D8}\\u{1F3FB}','\\u{1F9D8}\\u{1F3FC}','\\u{1F9D8}\\u{1F3FD}','\\u{1F9D8}\\u{1F3FE}','\\u{1F9D8}\\u{1F3FF}','\\u{1F9D9}\\u{1F3FB}','\\u{1F9D9}\\u{1F3FC}','\\u{1F9D9}\\u{1F3FD}','\\u{1F9D9}\\u{1F3FE}','\\u{1F9D9}\\u{1F3FF}','\\u{1F9DA}\\u{1F3FB}','\\u{1F9DA}\\u{1F3FC}','\\u{1F9DA}\\u{1F3FD}','\\u{1F9DA}\\u{1F3FE}','\\u{1F9DA}\\u{1F3FF}','\\u{1F9DB}\\u{1F3FB}','\\u{1F9DB}\\u{1F3FC}','\\u{1F9DB}\\u{1F3FD}','\\u{1F9DB}\\u{1F3FE}','\\u{1F9DB}\\u{1F3FF}','\\u{1F9DC}\\u{1F3FB}','\\u{1F9DC}\\u{1F3FC}','\\u{1F9DC}\\u{1F3FD}','\\u{1F9DC}\\u{1F3FE}','\\u{1F9DC}\\u{1F3FF}','\\u{1F9DD}\\u{1F3FB}','\\u{1F9DD}\\u{1F3FC}','\\u{1F9DD}\\u{1F3FD}','\\u{1F9DD}\\u{1F3FE}','\\u{1F9DD}\\u{1F3FF}','\\u{1FAC3}\\u{1F3FB}','\\u{1FAC3}\\u{1F3FC}','\\u{1FAC3}\\u{1F3FD}','\\u{1FAC3}\\u{1F3FE}','\\u{1FAC3}\\u{1F3FF}','\\u{1FAC4}\\u{1F3FB}','\\u{1FAC4}\\u{1F3FC}','\\u{1FAC4}\\u{1F3FD}','\\u{1FAC4}\\u{1F3FE}','\\u{1FAC4}\\u{1F3FF}','\\u{1FAC5}\\u{1F3FB}','\\u{1FAC5}\\u{1F3FC}','\\u{1FAC5}\\u{1F3FD}','\\u{1FAC5}\\u{1F3FE}','\\u{1FAC5}\\u{1F3FF}','\\u{1FAF0}\\u{1F3FB}','\\u{1FAF0}\\u{1F3FC}','\\u{1FAF0}\\u{1F3FD}','\\u{1FAF0}\\u{1F3FE}','\\u{1FAF0}\\u{1F3FF}','\\u{1FAF1}\\u{1F3FB}','\\u{1FAF1}\\u{1F3FC}','\\u{1FAF1}\\u{1F3FD}','\\u{1FAF1}\\u{1F3FE}','\\u{1FAF1}\\u{1F3FF}','\\u{1FAF2}\\u{1F3FB}','\\u{1FAF2}\\u{1F3FC}','\\u{1FAF2}\\u{1F3FD}','\\u{1FAF2}\\u{1F3FE}','\\u{1FAF2}\\u{1F3FF}','\\u{1FAF3}\\u{1F3FB}','\\u{1FAF3}\\u{1F3FC}','\\u{1FAF3}\\u{1F3FD}','\\u{1FAF3}\\u{1F3FE}','\\u{1FAF3}\\u{1F3FF}','\\u{1FAF4}\\u{1F3FB}','\\u{1FAF4}\\u{1F3FC}','\\u{1FAF4}\\u{1F3FD}','\\u{1FAF4}\\u{1F3FE}','\\u{1FAF4}\\u{1F3FF}','\\u{1FAF5}\\u{1F3FB}','\\u{1FAF5}\\u{1F3FC}','\\u{1FAF5}\\u{1F3FD}','\\u{1FAF5}\\u{1F3FE}','\\u{1FAF5}\\u{1F3FF}','\\u{1FAF6}\\u{1F3FB}','\\u{1FAF6}\\u{1F3FC}','\\u{1FAF6}\\u{1F3FD}','\\u{1FAF6}\\u{1F3FE}','\\u{1FAF6}\\u{1F3FF}','\\u{1FAF7}\\u{1F3FB}','\\u{1FAF7}\\u{1F3FC}','\\u{1FAF7}\\u{1F3FD}','\\u{1FAF7}\\u{1F3FE}','\\u{1FAF7}\\u{1F3FF}','\\u{1FAF8}\\u{1F3FB}','\\u{1FAF8}\\u{1F3FC}','\\u{1FAF8}\\u{1F3FD}','\\u{1FAF8}\\u{1F3FE}','\\u{1FAF8}\\u{1F3FF}'];\n","const set = require('regenerate')();\n\nexports.characters = set;\nexports.strings = ['\\u{1F3F4}\\u{E0067}\\u{E0062}\\u{E0065}\\u{E006E}\\u{E0067}\\u{E007F}','\\u{1F3F4}\\u{E0067}\\u{E0062}\\u{E0073}\\u{E0063}\\u{E0074}\\u{E007F}','\\u{1F3F4}\\u{E0067}\\u{E0062}\\u{E0077}\\u{E006C}\\u{E0073}\\u{E007F}'];\n","const set = require('regenerate')();\n\nexports.characters = set;\nexports.strings = ['\\u{1F468}\\u200D\\u2764\\uFE0F\\u200D\\u{1F468}','\\u{1F468}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F468}','\\u{1F468}\\u200D\\u{1F466}','\\u{1F468}\\u200D\\u{1F466}\\u200D\\u{1F466}','\\u{1F468}\\u200D\\u{1F467}','\\u{1F468}\\u200D\\u{1F467}\\u200D\\u{1F466}','\\u{1F468}\\u200D\\u{1F467}\\u200D\\u{1F467}','\\u{1F468}\\u200D\\u{1F468}\\u200D\\u{1F466}','\\u{1F468}\\u200D\\u{1F468}\\u200D\\u{1F466}\\u200D\\u{1F466}','\\u{1F468}\\u200D\\u{1F468}\\u200D\\u{1F467}','\\u{1F468}\\u200D\\u{1F468}\\u200D\\u{1F467}\\u200D\\u{1F466}','\\u{1F468}\\u200D\\u{1F468}\\u200D\\u{1F467}\\u200D\\u{1F467}','\\u{1F468}\\u200D\\u{1F469}\\u200D\\u{1F466}','\\u{1F468}\\u200D\\u{1F469}\\u200D\\u{1F466}\\u200D\\u{1F466}','\\u{1F468}\\u200D\\u{1F469}\\u200D\\u{1F467}','\\u{1F468}\\u200D\\u{1F469}\\u200D\\u{1F467}\\u200D\\u{1F466}','\\u{1F468}\\u200D\\u{1F469}\\u200D\\u{1F467}\\u200D\\u{1F467}','\\u{1F468}\\u{1F3FB}\\u200D\\u2764\\uFE0F\\u200D\\u{1F468}\\u{1F3FB}','\\u{1F468}\\u{1F3FB}\\u200D\\u2764\\uFE0F\\u200D\\u{1F468}\\u{1F3FC}','\\u{1F468}\\u{1F3FB}\\u200D\\u2764\\uFE0F\\u200D\\u{1F468}\\u{1F3FD}','\\u{1F468}\\u{1F3FB}\\u200D\\u2764\\uFE0F\\u200D\\u{1F468}\\u{1F3FE}','\\u{1F468}\\u{1F3FB}\\u200D\\u2764\\uFE0F\\u200D\\u{1F468}\\u{1F3FF}','\\u{1F468}\\u{1F3FB}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F468}\\u{1F3FB}','\\u{1F468}\\u{1F3FB}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F468}\\u{1F3FC}','\\u{1F468}\\u{1F3FB}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F468}\\u{1F3FD}','\\u{1F468}\\u{1F3FB}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F468}\\u{1F3FE}','\\u{1F468}\\u{1F3FB}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F468}\\u{1F3FF}','\\u{1F468}\\u{1F3FB}\\u200D\\u{1F91D}\\u200D\\u{1F468}\\u{1F3FC}','\\u{1F468}\\u{1F3FB}\\u200D\\u{1F91D}\\u200D\\u{1F468}\\u{1F3FD}','\\u{1F468}\\u{1F3FB}\\u200D\\u{1F91D}\\u200D\\u{1F468}\\u{1F3FE}','\\u{1F468}\\u{1F3FB}\\u200D\\u{1F91D}\\u200D\\u{1F468}\\u{1F3FF}','\\u{1F468}\\u{1F3FC}\\u200D\\u2764\\uFE0F\\u200D\\u{1F468}\\u{1F3FB}','\\u{1F468}\\u{1F3FC}\\u200D\\u2764\\uFE0F\\u200D\\u{1F468}\\u{1F3FC}','\\u{1F468}\\u{1F3FC}\\u200D\\u2764\\uFE0F\\u200D\\u{1F468}\\u{1F3FD}','\\u{1F468}\\u{1F3FC}\\u200D\\u2764\\uFE0F\\u200D\\u{1F468}\\u{1F3FE}','\\u{1F468}\\u{1F3FC}\\u200D\\u2764\\uFE0F\\u200D\\u{1F468}\\u{1F3FF}','\\u{1F468}\\u{1F3FC}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F468}\\u{1F3FB}','\\u{1F468}\\u{1F3FC}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F468}\\u{1F3FC}','\\u{1F468}\\u{1F3FC}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F468}\\u{1F3FD}','\\u{1F468}\\u{1F3FC}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F468}\\u{1F3FE}','\\u{1F468}\\u{1F3FC}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F468}\\u{1F3FF}','\\u{1F468}\\u{1F3FC}\\u200D\\u{1F91D}\\u200D\\u{1F468}\\u{1F3FB}','\\u{1F468}\\u{1F3FC}\\u200D\\u{1F91D}\\u200D\\u{1F468}\\u{1F3FD}','\\u{1F468}\\u{1F3FC}\\u200D\\u{1F91D}\\u200D\\u{1F468}\\u{1F3FE}','\\u{1F468}\\u{1F3FC}\\u200D\\u{1F91D}\\u200D\\u{1F468}\\u{1F3FF}','\\u{1F468}\\u{1F3FD}\\u200D\\u2764\\uFE0F\\u200D\\u{1F468}\\u{1F3FB}','\\u{1F468}\\u{1F3FD}\\u200D\\u2764\\uFE0F\\u200D\\u{1F468}\\u{1F3FC}','\\u{1F468}\\u{1F3FD}\\u200D\\u2764\\uFE0F\\u200D\\u{1F468}\\u{1F3FD}','\\u{1F468}\\u{1F3FD}\\u200D\\u2764\\uFE0F\\u200D\\u{1F468}\\u{1F3FE}','\\u{1F468}\\u{1F3FD}\\u200D\\u2764\\uFE0F\\u200D\\u{1F468}\\u{1F3FF}','\\u{1F468}\\u{1F3FD}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F468}\\u{1F3FB}','\\u{1F468}\\u{1F3FD}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F468}\\u{1F3FC}','\\u{1F468}\\u{1F3FD}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F468}\\u{1F3FD}','\\u{1F468}\\u{1F3FD}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F468}\\u{1F3FE}','\\u{1F468}\\u{1F3FD}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F468}\\u{1F3FF}','\\u{1F468}\\u{1F3FD}\\u200D\\u{1F91D}\\u200D\\u{1F468}\\u{1F3FB}','\\u{1F468}\\u{1F3FD}\\u200D\\u{1F91D}\\u200D\\u{1F468}\\u{1F3FC}','\\u{1F468}\\u{1F3FD}\\u200D\\u{1F91D}\\u200D\\u{1F468}\\u{1F3FE}','\\u{1F468}\\u{1F3FD}\\u200D\\u{1F91D}\\u200D\\u{1F468}\\u{1F3FF}','\\u{1F468}\\u{1F3FE}\\u200D\\u2764\\uFE0F\\u200D\\u{1F468}\\u{1F3FB}','\\u{1F468}\\u{1F3FE}\\u200D\\u2764\\uFE0F\\u200D\\u{1F468}\\u{1F3FC}','\\u{1F468}\\u{1F3FE}\\u200D\\u2764\\uFE0F\\u200D\\u{1F468}\\u{1F3FD}','\\u{1F468}\\u{1F3FE}\\u200D\\u2764\\uFE0F\\u200D\\u{1F468}\\u{1F3FE}','\\u{1F468}\\u{1F3FE}\\u200D\\u2764\\uFE0F\\u200D\\u{1F468}\\u{1F3FF}','\\u{1F468}\\u{1F3FE}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F468}\\u{1F3FB}','\\u{1F468}\\u{1F3FE}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F468}\\u{1F3FC}','\\u{1F468}\\u{1F3FE}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F468}\\u{1F3FD}','\\u{1F468}\\u{1F3FE}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F468}\\u{1F3FE}','\\u{1F468}\\u{1F3FE}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F468}\\u{1F3FF}','\\u{1F468}\\u{1F3FE}\\u200D\\u{1F91D}\\u200D\\u{1F468}\\u{1F3FB}','\\u{1F468}\\u{1F3FE}\\u200D\\u{1F91D}\\u200D\\u{1F468}\\u{1F3FC}','\\u{1F468}\\u{1F3FE}\\u200D\\u{1F91D}\\u200D\\u{1F468}\\u{1F3FD}','\\u{1F468}\\u{1F3FE}\\u200D\\u{1F91D}\\u200D\\u{1F468}\\u{1F3FF}','\\u{1F468}\\u{1F3FF}\\u200D\\u2764\\uFE0F\\u200D\\u{1F468}\\u{1F3FB}','\\u{1F468}\\u{1F3FF}\\u200D\\u2764\\uFE0F\\u200D\\u{1F468}\\u{1F3FC}','\\u{1F468}\\u{1F3FF}\\u200D\\u2764\\uFE0F\\u200D\\u{1F468}\\u{1F3FD}','\\u{1F468}\\u{1F3FF}\\u200D\\u2764\\uFE0F\\u200D\\u{1F468}\\u{1F3FE}','\\u{1F468}\\u{1F3FF}\\u200D\\u2764\\uFE0F\\u200D\\u{1F468}\\u{1F3FF}','\\u{1F468}\\u{1F3FF}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F468}\\u{1F3FB}','\\u{1F468}\\u{1F3FF}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F468}\\u{1F3FC}','\\u{1F468}\\u{1F3FF}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F468}\\u{1F3FD}','\\u{1F468}\\u{1F3FF}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F468}\\u{1F3FE}','\\u{1F468}\\u{1F3FF}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F468}\\u{1F3FF}','\\u{1F468}\\u{1F3FF}\\u200D\\u{1F91D}\\u200D\\u{1F468}\\u{1F3FB}','\\u{1F468}\\u{1F3FF}\\u200D\\u{1F91D}\\u200D\\u{1F468}\\u{1F3FC}','\\u{1F468}\\u{1F3FF}\\u200D\\u{1F91D}\\u200D\\u{1F468}\\u{1F3FD}','\\u{1F468}\\u{1F3FF}\\u200D\\u{1F91D}\\u200D\\u{1F468}\\u{1F3FE}','\\u{1F469}\\u200D\\u2764\\uFE0F\\u200D\\u{1F468}','\\u{1F469}\\u200D\\u2764\\uFE0F\\u200D\\u{1F469}','\\u{1F469}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F468}','\\u{1F469}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F469}','\\u{1F469}\\u200D\\u{1F466}','\\u{1F469}\\u200D\\u{1F466}\\u200D\\u{1F466}','\\u{1F469}\\u200D\\u{1F467}','\\u{1F469}\\u200D\\u{1F467}\\u200D\\u{1F466}','\\u{1F469}\\u200D\\u{1F467}\\u200D\\u{1F467}','\\u{1F469}\\u200D\\u{1F469}\\u200D\\u{1F466}','\\u{1F469}\\u200D\\u{1F469}\\u200D\\u{1F466}\\u200D\\u{1F466}','\\u{1F469}\\u200D\\u{1F469}\\u200D\\u{1F467}','\\u{1F469}\\u200D\\u{1F469}\\u200D\\u{1F467}\\u200D\\u{1F466}','\\u{1F469}\\u200D\\u{1F469}\\u200D\\u{1F467}\\u200D\\u{1F467}','\\u{1F469}\\u{1F3FB}\\u200D\\u2764\\uFE0F\\u200D\\u{1F468}\\u{1F3FB}','\\u{1F469}\\u{1F3FB}\\u200D\\u2764\\uFE0F\\u200D\\u{1F468}\\u{1F3FC}','\\u{1F469}\\u{1F3FB}\\u200D\\u2764\\uFE0F\\u200D\\u{1F468}\\u{1F3FD}','\\u{1F469}\\u{1F3FB}\\u200D\\u2764\\uFE0F\\u200D\\u{1F468}\\u{1F3FE}','\\u{1F469}\\u{1F3FB}\\u200D\\u2764\\uFE0F\\u200D\\u{1F468}\\u{1F3FF}','\\u{1F469}\\u{1F3FB}\\u200D\\u2764\\uFE0F\\u200D\\u{1F469}\\u{1F3FB}','\\u{1F469}\\u{1F3FB}\\u200D\\u2764\\uFE0F\\u200D\\u{1F469}\\u{1F3FC}','\\u{1F469}\\u{1F3FB}\\u200D\\u2764\\uFE0F\\u200D\\u{1F469}\\u{1F3FD}','\\u{1F469}\\u{1F3FB}\\u200D\\u2764\\uFE0F\\u200D\\u{1F469}\\u{1F3FE}','\\u{1F469}\\u{1F3FB}\\u200D\\u2764\\uFE0F\\u200D\\u{1F469}\\u{1F3FF}','\\u{1F469}\\u{1F3FB}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F468}\\u{1F3FB}','\\u{1F469}\\u{1F3FB}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F468}\\u{1F3FC}','\\u{1F469}\\u{1F3FB}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F468}\\u{1F3FD}','\\u{1F469}\\u{1F3FB}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F468}\\u{1F3FE}','\\u{1F469}\\u{1F3FB}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F468}\\u{1F3FF}','\\u{1F469}\\u{1F3FB}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F469}\\u{1F3FB}','\\u{1F469}\\u{1F3FB}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F469}\\u{1F3FC}','\\u{1F469}\\u{1F3FB}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F469}\\u{1F3FD}','\\u{1F469}\\u{1F3FB}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F469}\\u{1F3FE}','\\u{1F469}\\u{1F3FB}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F469}\\u{1F3FF}','\\u{1F469}\\u{1F3FB}\\u200D\\u{1F91D}\\u200D\\u{1F468}\\u{1F3FC}','\\u{1F469}\\u{1F3FB}\\u200D\\u{1F91D}\\u200D\\u{1F468}\\u{1F3FD}','\\u{1F469}\\u{1F3FB}\\u200D\\u{1F91D}\\u200D\\u{1F468}\\u{1F3FE}','\\u{1F469}\\u{1F3FB}\\u200D\\u{1F91D}\\u200D\\u{1F468}\\u{1F3FF}','\\u{1F469}\\u{1F3FB}\\u200D\\u{1F91D}\\u200D\\u{1F469}\\u{1F3FC}','\\u{1F469}\\u{1F3FB}\\u200D\\u{1F91D}\\u200D\\u{1F469}\\u{1F3FD}','\\u{1F469}\\u{1F3FB}\\u200D\\u{1F91D}\\u200D\\u{1F469}\\u{1F3FE}','\\u{1F469}\\u{1F3FB}\\u200D\\u{1F91D}\\u200D\\u{1F469}\\u{1F3FF}','\\u{1F469}\\u{1F3FC}\\u200D\\u2764\\uFE0F\\u200D\\u{1F468}\\u{1F3FB}','\\u{1F469}\\u{1F3FC}\\u200D\\u2764\\uFE0F\\u200D\\u{1F468}\\u{1F3FC}','\\u{1F469}\\u{1F3FC}\\u200D\\u2764\\uFE0F\\u200D\\u{1F468}\\u{1F3FD}','\\u{1F469}\\u{1F3FC}\\u200D\\u2764\\uFE0F\\u200D\\u{1F468}\\u{1F3FE}','\\u{1F469}\\u{1F3FC}\\u200D\\u2764\\uFE0F\\u200D\\u{1F468}\\u{1F3FF}','\\u{1F469}\\u{1F3FC}\\u200D\\u2764\\uFE0F\\u200D\\u{1F469}\\u{1F3FB}','\\u{1F469}\\u{1F3FC}\\u200D\\u2764\\uFE0F\\u200D\\u{1F469}\\u{1F3FC}','\\u{1F469}\\u{1F3FC}\\u200D\\u2764\\uFE0F\\u200D\\u{1F469}\\u{1F3FD}','\\u{1F469}\\u{1F3FC}\\u200D\\u2764\\uFE0F\\u200D\\u{1F469}\\u{1F3FE}','\\u{1F469}\\u{1F3FC}\\u200D\\u2764\\uFE0F\\u200D\\u{1F469}\\u{1F3FF}','\\u{1F469}\\u{1F3FC}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F468}\\u{1F3FB}','\\u{1F469}\\u{1F3FC}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F468}\\u{1F3FC}','\\u{1F469}\\u{1F3FC}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F468}\\u{1F3FD}','\\u{1F469}\\u{1F3FC}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F468}\\u{1F3FE}','\\u{1F469}\\u{1F3FC}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F468}\\u{1F3FF}','\\u{1F469}\\u{1F3FC}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F469}\\u{1F3FB}','\\u{1F469}\\u{1F3FC}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F469}\\u{1F3FC}','\\u{1F469}\\u{1F3FC}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F469}\\u{1F3FD}','\\u{1F469}\\u{1F3FC}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F469}\\u{1F3FE}','\\u{1F469}\\u{1F3FC}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F469}\\u{1F3FF}','\\u{1F469}\\u{1F3FC}\\u200D\\u{1F91D}\\u200D\\u{1F468}\\u{1F3FB}','\\u{1F469}\\u{1F3FC}\\u200D\\u{1F91D}\\u200D\\u{1F468}\\u{1F3FD}','\\u{1F469}\\u{1F3FC}\\u200D\\u{1F91D}\\u200D\\u{1F468}\\u{1F3FE}','\\u{1F469}\\u{1F3FC}\\u200D\\u{1F91D}\\u200D\\u{1F468}\\u{1F3FF}','\\u{1F469}\\u{1F3FC}\\u200D\\u{1F91D}\\u200D\\u{1F469}\\u{1F3FB}','\\u{1F469}\\u{1F3FC}\\u200D\\u{1F91D}\\u200D\\u{1F469}\\u{1F3FD}','\\u{1F469}\\u{1F3FC}\\u200D\\u{1F91D}\\u200D\\u{1F469}\\u{1F3FE}','\\u{1F469}\\u{1F3FC}\\u200D\\u{1F91D}\\u200D\\u{1F469}\\u{1F3FF}','\\u{1F469}\\u{1F3FD}\\u200D\\u2764\\uFE0F\\u200D\\u{1F468}\\u{1F3FB}','\\u{1F469}\\u{1F3FD}\\u200D\\u2764\\uFE0F\\u200D\\u{1F468}\\u{1F3FC}','\\u{1F469}\\u{1F3FD}\\u200D\\u2764\\uFE0F\\u200D\\u{1F468}\\u{1F3FD}','\\u{1F469}\\u{1F3FD}\\u200D\\u2764\\uFE0F\\u200D\\u{1F468}\\u{1F3FE}','\\u{1F469}\\u{1F3FD}\\u200D\\u2764\\uFE0F\\u200D\\u{1F468}\\u{1F3FF}','\\u{1F469}\\u{1F3FD}\\u200D\\u2764\\uFE0F\\u200D\\u{1F469}\\u{1F3FB}','\\u{1F469}\\u{1F3FD}\\u200D\\u2764\\uFE0F\\u200D\\u{1F469}\\u{1F3FC}','\\u{1F469}\\u{1F3FD}\\u200D\\u2764\\uFE0F\\u200D\\u{1F469}\\u{1F3FD}','\\u{1F469}\\u{1F3FD}\\u200D\\u2764\\uFE0F\\u200D\\u{1F469}\\u{1F3FE}','\\u{1F469}\\u{1F3FD}\\u200D\\u2764\\uFE0F\\u200D\\u{1F469}\\u{1F3FF}','\\u{1F469}\\u{1F3FD}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F468}\\u{1F3FB}','\\u{1F469}\\u{1F3FD}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F468}\\u{1F3FC}','\\u{1F469}\\u{1F3FD}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F468}\\u{1F3FD}','\\u{1F469}\\u{1F3FD}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F468}\\u{1F3FE}','\\u{1F469}\\u{1F3FD}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F468}\\u{1F3FF}','\\u{1F469}\\u{1F3FD}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F469}\\u{1F3FB}','\\u{1F469}\\u{1F3FD}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F469}\\u{1F3FC}','\\u{1F469}\\u{1F3FD}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F469}\\u{1F3FD}','\\u{1F469}\\u{1F3FD}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F469}\\u{1F3FE}','\\u{1F469}\\u{1F3FD}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F469}\\u{1F3FF}','\\u{1F469}\\u{1F3FD}\\u200D\\u{1F91D}\\u200D\\u{1F468}\\u{1F3FB}','\\u{1F469}\\u{1F3FD}\\u200D\\u{1F91D}\\u200D\\u{1F468}\\u{1F3FC}','\\u{1F469}\\u{1F3FD}\\u200D\\u{1F91D}\\u200D\\u{1F468}\\u{1F3FE}','\\u{1F469}\\u{1F3FD}\\u200D\\u{1F91D}\\u200D\\u{1F468}\\u{1F3FF}','\\u{1F469}\\u{1F3FD}\\u200D\\u{1F91D}\\u200D\\u{1F469}\\u{1F3FB}','\\u{1F469}\\u{1F3FD}\\u200D\\u{1F91D}\\u200D\\u{1F469}\\u{1F3FC}','\\u{1F469}\\u{1F3FD}\\u200D\\u{1F91D}\\u200D\\u{1F469}\\u{1F3FE}','\\u{1F469}\\u{1F3FD}\\u200D\\u{1F91D}\\u200D\\u{1F469}\\u{1F3FF}','\\u{1F469}\\u{1F3FE}\\u200D\\u2764\\uFE0F\\u200D\\u{1F468}\\u{1F3FB}','\\u{1F469}\\u{1F3FE}\\u200D\\u2764\\uFE0F\\u200D\\u{1F468}\\u{1F3FC}','\\u{1F469}\\u{1F3FE}\\u200D\\u2764\\uFE0F\\u200D\\u{1F468}\\u{1F3FD}','\\u{1F469}\\u{1F3FE}\\u200D\\u2764\\uFE0F\\u200D\\u{1F468}\\u{1F3FE}','\\u{1F469}\\u{1F3FE}\\u200D\\u2764\\uFE0F\\u200D\\u{1F468}\\u{1F3FF}','\\u{1F469}\\u{1F3FE}\\u200D\\u2764\\uFE0F\\u200D\\u{1F469}\\u{1F3FB}','\\u{1F469}\\u{1F3FE}\\u200D\\u2764\\uFE0F\\u200D\\u{1F469}\\u{1F3FC}','\\u{1F469}\\u{1F3FE}\\u200D\\u2764\\uFE0F\\u200D\\u{1F469}\\u{1F3FD}','\\u{1F469}\\u{1F3FE}\\u200D\\u2764\\uFE0F\\u200D\\u{1F469}\\u{1F3FE}','\\u{1F469}\\u{1F3FE}\\u200D\\u2764\\uFE0F\\u200D\\u{1F469}\\u{1F3FF}','\\u{1F469}\\u{1F3FE}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F468}\\u{1F3FB}','\\u{1F469}\\u{1F3FE}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F468}\\u{1F3FC}','\\u{1F469}\\u{1F3FE}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F468}\\u{1F3FD}','\\u{1F469}\\u{1F3FE}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F468}\\u{1F3FE}','\\u{1F469}\\u{1F3FE}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F468}\\u{1F3FF}','\\u{1F469}\\u{1F3FE}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F469}\\u{1F3FB}','\\u{1F469}\\u{1F3FE}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F469}\\u{1F3FC}','\\u{1F469}\\u{1F3FE}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F469}\\u{1F3FD}','\\u{1F469}\\u{1F3FE}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F469}\\u{1F3FE}','\\u{1F469}\\u{1F3FE}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F469}\\u{1F3FF}','\\u{1F469}\\u{1F3FE}\\u200D\\u{1F91D}\\u200D\\u{1F468}\\u{1F3FB}','\\u{1F469}\\u{1F3FE}\\u200D\\u{1F91D}\\u200D\\u{1F468}\\u{1F3FC}','\\u{1F469}\\u{1F3FE}\\u200D\\u{1F91D}\\u200D\\u{1F468}\\u{1F3FD}','\\u{1F469}\\u{1F3FE}\\u200D\\u{1F91D}\\u200D\\u{1F468}\\u{1F3FF}','\\u{1F469}\\u{1F3FE}\\u200D\\u{1F91D}\\u200D\\u{1F469}\\u{1F3FB}','\\u{1F469}\\u{1F3FE}\\u200D\\u{1F91D}\\u200D\\u{1F469}\\u{1F3FC}','\\u{1F469}\\u{1F3FE}\\u200D\\u{1F91D}\\u200D\\u{1F469}\\u{1F3FD}','\\u{1F469}\\u{1F3FE}\\u200D\\u{1F91D}\\u200D\\u{1F469}\\u{1F3FF}','\\u{1F469}\\u{1F3FF}\\u200D\\u2764\\uFE0F\\u200D\\u{1F468}\\u{1F3FB}','\\u{1F469}\\u{1F3FF}\\u200D\\u2764\\uFE0F\\u200D\\u{1F468}\\u{1F3FC}','\\u{1F469}\\u{1F3FF}\\u200D\\u2764\\uFE0F\\u200D\\u{1F468}\\u{1F3FD}','\\u{1F469}\\u{1F3FF}\\u200D\\u2764\\uFE0F\\u200D\\u{1F468}\\u{1F3FE}','\\u{1F469}\\u{1F3FF}\\u200D\\u2764\\uFE0F\\u200D\\u{1F468}\\u{1F3FF}','\\u{1F469}\\u{1F3FF}\\u200D\\u2764\\uFE0F\\u200D\\u{1F469}\\u{1F3FB}','\\u{1F469}\\u{1F3FF}\\u200D\\u2764\\uFE0F\\u200D\\u{1F469}\\u{1F3FC}','\\u{1F469}\\u{1F3FF}\\u200D\\u2764\\uFE0F\\u200D\\u{1F469}\\u{1F3FD}','\\u{1F469}\\u{1F3FF}\\u200D\\u2764\\uFE0F\\u200D\\u{1F469}\\u{1F3FE}','\\u{1F469}\\u{1F3FF}\\u200D\\u2764\\uFE0F\\u200D\\u{1F469}\\u{1F3FF}','\\u{1F469}\\u{1F3FF}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F468}\\u{1F3FB}','\\u{1F469}\\u{1F3FF}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F468}\\u{1F3FC}','\\u{1F469}\\u{1F3FF}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F468}\\u{1F3FD}','\\u{1F469}\\u{1F3FF}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F468}\\u{1F3FE}','\\u{1F469}\\u{1F3FF}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F468}\\u{1F3FF}','\\u{1F469}\\u{1F3FF}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F469}\\u{1F3FB}','\\u{1F469}\\u{1F3FF}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F469}\\u{1F3FC}','\\u{1F469}\\u{1F3FF}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F469}\\u{1F3FD}','\\u{1F469}\\u{1F3FF}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F469}\\u{1F3FE}','\\u{1F469}\\u{1F3FF}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F469}\\u{1F3FF}','\\u{1F469}\\u{1F3FF}\\u200D\\u{1F91D}\\u200D\\u{1F468}\\u{1F3FB}','\\u{1F469}\\u{1F3FF}\\u200D\\u{1F91D}\\u200D\\u{1F468}\\u{1F3FC}','\\u{1F469}\\u{1F3FF}\\u200D\\u{1F91D}\\u200D\\u{1F468}\\u{1F3FD}','\\u{1F469}\\u{1F3FF}\\u200D\\u{1F91D}\\u200D\\u{1F468}\\u{1F3FE}','\\u{1F469}\\u{1F3FF}\\u200D\\u{1F91D}\\u200D\\u{1F469}\\u{1F3FB}','\\u{1F469}\\u{1F3FF}\\u200D\\u{1F91D}\\u200D\\u{1F469}\\u{1F3FC}','\\u{1F469}\\u{1F3FF}\\u200D\\u{1F91D}\\u200D\\u{1F469}\\u{1F3FD}','\\u{1F469}\\u{1F3FF}\\u200D\\u{1F91D}\\u200D\\u{1F469}\\u{1F3FE}','\\u{1F9D1}\\u200D\\u{1F91D}\\u200D\\u{1F9D1}','\\u{1F9D1}\\u200D\\u{1F9D1}\\u200D\\u{1F9D2}','\\u{1F9D1}\\u200D\\u{1F9D1}\\u200D\\u{1F9D2}\\u200D\\u{1F9D2}','\\u{1F9D1}\\u200D\\u{1F9D2}','\\u{1F9D1}\\u200D\\u{1F9D2}\\u200D\\u{1F9D2}','\\u{1F9D1}\\u{1F3FB}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F9D1}\\u{1F3FC}','\\u{1F9D1}\\u{1F3FB}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F9D1}\\u{1F3FD}','\\u{1F9D1}\\u{1F3FB}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F9D1}\\u{1F3FE}','\\u{1F9D1}\\u{1F3FB}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F9D1}\\u{1F3FF}','\\u{1F9D1}\\u{1F3FB}\\u200D\\u2764\\uFE0F\\u200D\\u{1F9D1}\\u{1F3FC}','\\u{1F9D1}\\u{1F3FB}\\u200D\\u2764\\uFE0F\\u200D\\u{1F9D1}\\u{1F3FD}','\\u{1F9D1}\\u{1F3FB}\\u200D\\u2764\\uFE0F\\u200D\\u{1F9D1}\\u{1F3FE}','\\u{1F9D1}\\u{1F3FB}\\u200D\\u2764\\uFE0F\\u200D\\u{1F9D1}\\u{1F3FF}','\\u{1F9D1}\\u{1F3FB}\\u200D\\u{1F91D}\\u200D\\u{1F9D1}\\u{1F3FB}','\\u{1F9D1}\\u{1F3FB}\\u200D\\u{1F91D}\\u200D\\u{1F9D1}\\u{1F3FC}','\\u{1F9D1}\\u{1F3FB}\\u200D\\u{1F91D}\\u200D\\u{1F9D1}\\u{1F3FD}','\\u{1F9D1}\\u{1F3FB}\\u200D\\u{1F91D}\\u200D\\u{1F9D1}\\u{1F3FE}','\\u{1F9D1}\\u{1F3FB}\\u200D\\u{1F91D}\\u200D\\u{1F9D1}\\u{1F3FF}','\\u{1F9D1}\\u{1F3FC}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F9D1}\\u{1F3FB}','\\u{1F9D1}\\u{1F3FC}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F9D1}\\u{1F3FD}','\\u{1F9D1}\\u{1F3FC}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F9D1}\\u{1F3FE}','\\u{1F9D1}\\u{1F3FC}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F9D1}\\u{1F3FF}','\\u{1F9D1}\\u{1F3FC}\\u200D\\u2764\\uFE0F\\u200D\\u{1F9D1}\\u{1F3FB}','\\u{1F9D1}\\u{1F3FC}\\u200D\\u2764\\uFE0F\\u200D\\u{1F9D1}\\u{1F3FD}','\\u{1F9D1}\\u{1F3FC}\\u200D\\u2764\\uFE0F\\u200D\\u{1F9D1}\\u{1F3FE}','\\u{1F9D1}\\u{1F3FC}\\u200D\\u2764\\uFE0F\\u200D\\u{1F9D1}\\u{1F3FF}','\\u{1F9D1}\\u{1F3FC}\\u200D\\u{1F91D}\\u200D\\u{1F9D1}\\u{1F3FB}','\\u{1F9D1}\\u{1F3FC}\\u200D\\u{1F91D}\\u200D\\u{1F9D1}\\u{1F3FC}','\\u{1F9D1}\\u{1F3FC}\\u200D\\u{1F91D}\\u200D\\u{1F9D1}\\u{1F3FD}','\\u{1F9D1}\\u{1F3FC}\\u200D\\u{1F91D}\\u200D\\u{1F9D1}\\u{1F3FE}','\\u{1F9D1}\\u{1F3FC}\\u200D\\u{1F91D}\\u200D\\u{1F9D1}\\u{1F3FF}','\\u{1F9D1}\\u{1F3FD}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F9D1}\\u{1F3FB}','\\u{1F9D1}\\u{1F3FD}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F9D1}\\u{1F3FC}','\\u{1F9D1}\\u{1F3FD}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F9D1}\\u{1F3FE}','\\u{1F9D1}\\u{1F3FD}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F9D1}\\u{1F3FF}','\\u{1F9D1}\\u{1F3FD}\\u200D\\u2764\\uFE0F\\u200D\\u{1F9D1}\\u{1F3FB}','\\u{1F9D1}\\u{1F3FD}\\u200D\\u2764\\uFE0F\\u200D\\u{1F9D1}\\u{1F3FC}','\\u{1F9D1}\\u{1F3FD}\\u200D\\u2764\\uFE0F\\u200D\\u{1F9D1}\\u{1F3FE}','\\u{1F9D1}\\u{1F3FD}\\u200D\\u2764\\uFE0F\\u200D\\u{1F9D1}\\u{1F3FF}','\\u{1F9D1}\\u{1F3FD}\\u200D\\u{1F91D}\\u200D\\u{1F9D1}\\u{1F3FB}','\\u{1F9D1}\\u{1F3FD}\\u200D\\u{1F91D}\\u200D\\u{1F9D1}\\u{1F3FC}','\\u{1F9D1}\\u{1F3FD}\\u200D\\u{1F91D}\\u200D\\u{1F9D1}\\u{1F3FD}','\\u{1F9D1}\\u{1F3FD}\\u200D\\u{1F91D}\\u200D\\u{1F9D1}\\u{1F3FE}','\\u{1F9D1}\\u{1F3FD}\\u200D\\u{1F91D}\\u200D\\u{1F9D1}\\u{1F3FF}','\\u{1F9D1}\\u{1F3FE}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F9D1}\\u{1F3FB}','\\u{1F9D1}\\u{1F3FE}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F9D1}\\u{1F3FC}','\\u{1F9D1}\\u{1F3FE}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F9D1}\\u{1F3FD}','\\u{1F9D1}\\u{1F3FE}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F9D1}\\u{1F3FF}','\\u{1F9D1}\\u{1F3FE}\\u200D\\u2764\\uFE0F\\u200D\\u{1F9D1}\\u{1F3FB}','\\u{1F9D1}\\u{1F3FE}\\u200D\\u2764\\uFE0F\\u200D\\u{1F9D1}\\u{1F3FC}','\\u{1F9D1}\\u{1F3FE}\\u200D\\u2764\\uFE0F\\u200D\\u{1F9D1}\\u{1F3FD}','\\u{1F9D1}\\u{1F3FE}\\u200D\\u2764\\uFE0F\\u200D\\u{1F9D1}\\u{1F3FF}','\\u{1F9D1}\\u{1F3FE}\\u200D\\u{1F91D}\\u200D\\u{1F9D1}\\u{1F3FB}','\\u{1F9D1}\\u{1F3FE}\\u200D\\u{1F91D}\\u200D\\u{1F9D1}\\u{1F3FC}','\\u{1F9D1}\\u{1F3FE}\\u200D\\u{1F91D}\\u200D\\u{1F9D1}\\u{1F3FD}','\\u{1F9D1}\\u{1F3FE}\\u200D\\u{1F91D}\\u200D\\u{1F9D1}\\u{1F3FE}','\\u{1F9D1}\\u{1F3FE}\\u200D\\u{1F91D}\\u200D\\u{1F9D1}\\u{1F3FF}','\\u{1F9D1}\\u{1F3FF}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F9D1}\\u{1F3FB}','\\u{1F9D1}\\u{1F3FF}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F9D1}\\u{1F3FC}','\\u{1F9D1}\\u{1F3FF}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F9D1}\\u{1F3FD}','\\u{1F9D1}\\u{1F3FF}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F9D1}\\u{1F3FE}','\\u{1F9D1}\\u{1F3FF}\\u200D\\u2764\\uFE0F\\u200D\\u{1F9D1}\\u{1F3FB}','\\u{1F9D1}\\u{1F3FF}\\u200D\\u2764\\uFE0F\\u200D\\u{1F9D1}\\u{1F3FC}','\\u{1F9D1}\\u{1F3FF}\\u200D\\u2764\\uFE0F\\u200D\\u{1F9D1}\\u{1F3FD}','\\u{1F9D1}\\u{1F3FF}\\u200D\\u2764\\uFE0F\\u200D\\u{1F9D1}\\u{1F3FE}','\\u{1F9D1}\\u{1F3FF}\\u200D\\u{1F91D}\\u200D\\u{1F9D1}\\u{1F3FB}','\\u{1F9D1}\\u{1F3FF}\\u200D\\u{1F91D}\\u200D\\u{1F9D1}\\u{1F3FC}','\\u{1F9D1}\\u{1F3FF}\\u200D\\u{1F91D}\\u200D\\u{1F9D1}\\u{1F3FD}','\\u{1F9D1}\\u{1F3FF}\\u200D\\u{1F91D}\\u200D\\u{1F9D1}\\u{1F3FE}','\\u{1F9D1}\\u{1F3FF}\\u200D\\u{1F91D}\\u200D\\u{1F9D1}\\u{1F3FF}','\\u{1FAF1}\\u{1F3FB}\\u200D\\u{1FAF2}\\u{1F3FC}','\\u{1FAF1}\\u{1F3FB}\\u200D\\u{1FAF2}\\u{1F3FD}','\\u{1FAF1}\\u{1F3FB}\\u200D\\u{1FAF2}\\u{1F3FE}','\\u{1FAF1}\\u{1F3FB}\\u200D\\u{1FAF2}\\u{1F3FF}','\\u{1FAF1}\\u{1F3FC}\\u200D\\u{1FAF2}\\u{1F3FB}','\\u{1FAF1}\\u{1F3FC}\\u200D\\u{1FAF2}\\u{1F3FD}','\\u{1FAF1}\\u{1F3FC}\\u200D\\u{1FAF2}\\u{1F3FE}','\\u{1FAF1}\\u{1F3FC}\\u200D\\u{1FAF2}\\u{1F3FF}','\\u{1FAF1}\\u{1F3FD}\\u200D\\u{1FAF2}\\u{1F3FB}','\\u{1FAF1}\\u{1F3FD}\\u200D\\u{1FAF2}\\u{1F3FC}','\\u{1FAF1}\\u{1F3FD}\\u200D\\u{1FAF2}\\u{1F3FE}','\\u{1FAF1}\\u{1F3FD}\\u200D\\u{1FAF2}\\u{1F3FF}','\\u{1FAF1}\\u{1F3FE}\\u200D\\u{1FAF2}\\u{1F3FB}','\\u{1FAF1}\\u{1F3FE}\\u200D\\u{1FAF2}\\u{1F3FC}','\\u{1FAF1}\\u{1F3FE}\\u200D\\u{1FAF2}\\u{1F3FD}','\\u{1FAF1}\\u{1F3FE}\\u200D\\u{1FAF2}\\u{1F3FF}','\\u{1FAF1}\\u{1F3FF}\\u200D\\u{1FAF2}\\u{1F3FB}','\\u{1FAF1}\\u{1F3FF}\\u200D\\u{1FAF2}\\u{1F3FC}','\\u{1FAF1}\\u{1F3FF}\\u200D\\u{1FAF2}\\u{1F3FD}','\\u{1FAF1}\\u{1F3FF}\\u200D\\u{1FAF2}\\u{1F3FE}','\\u{1F3C3}\\u200D\\u27A1\\uFE0F','\\u{1F3C3}\\u{1F3FB}\\u200D\\u27A1\\uFE0F','\\u{1F3C3}\\u{1F3FC}\\u200D\\u27A1\\uFE0F','\\u{1F3C3}\\u{1F3FD}\\u200D\\u27A1\\uFE0F','\\u{1F3C3}\\u{1F3FE}\\u200D\\u27A1\\uFE0F','\\u{1F3C3}\\u{1F3FF}\\u200D\\u27A1\\uFE0F','\\u{1F468}\\u200D\\u2695\\uFE0F','\\u{1F468}\\u200D\\u2696\\uFE0F','\\u{1F468}\\u200D\\u2708\\uFE0F','\\u{1F468}\\u200D\\u{1F33E}','\\u{1F468}\\u200D\\u{1F373}','\\u{1F468}\\u200D\\u{1F37C}','\\u{1F468}\\u200D\\u{1F393}','\\u{1F468}\\u200D\\u{1F3A4}','\\u{1F468}\\u200D\\u{1F3A8}','\\u{1F468}\\u200D\\u{1F3EB}','\\u{1F468}\\u200D\\u{1F3ED}','\\u{1F468}\\u200D\\u{1F4BB}','\\u{1F468}\\u200D\\u{1F4BC}','\\u{1F468}\\u200D\\u{1F527}','\\u{1F468}\\u200D\\u{1F52C}','\\u{1F468}\\u200D\\u{1F680}','\\u{1F468}\\u200D\\u{1F692}','\\u{1F468}\\u200D\\u{1F9AF}','\\u{1F468}\\u200D\\u{1F9AF}\\u200D\\u27A1\\uFE0F','\\u{1F468}\\u200D\\u{1F9BC}','\\u{1F468}\\u200D\\u{1F9BC}\\u200D\\u27A1\\uFE0F','\\u{1F468}\\u200D\\u{1F9BD}','\\u{1F468}\\u200D\\u{1F9BD}\\u200D\\u27A1\\uFE0F','\\u{1F468}\\u{1F3FB}\\u200D\\u2695\\uFE0F','\\u{1F468}\\u{1F3FB}\\u200D\\u2696\\uFE0F','\\u{1F468}\\u{1F3FB}\\u200D\\u2708\\uFE0F','\\u{1F468}\\u{1F3FB}\\u200D\\u{1F33E}','\\u{1F468}\\u{1F3FB}\\u200D\\u{1F373}','\\u{1F468}\\u{1F3FB}\\u200D\\u{1F37C}','\\u{1F468}\\u{1F3FB}\\u200D\\u{1F393}','\\u{1F468}\\u{1F3FB}\\u200D\\u{1F3A4}','\\u{1F468}\\u{1F3FB}\\u200D\\u{1F3A8}','\\u{1F468}\\u{1F3FB}\\u200D\\u{1F3EB}','\\u{1F468}\\u{1F3FB}\\u200D\\u{1F3ED}','\\u{1F468}\\u{1F3FB}\\u200D\\u{1F4BB}','\\u{1F468}\\u{1F3FB}\\u200D\\u{1F4BC}','\\u{1F468}\\u{1F3FB}\\u200D\\u{1F527}','\\u{1F468}\\u{1F3FB}\\u200D\\u{1F52C}','\\u{1F468}\\u{1F3FB}\\u200D\\u{1F680}','\\u{1F468}\\u{1F3FB}\\u200D\\u{1F692}','\\u{1F468}\\u{1F3FB}\\u200D\\u{1F9AF}','\\u{1F468}\\u{1F3FB}\\u200D\\u{1F9AF}\\u200D\\u27A1\\uFE0F','\\u{1F468}\\u{1F3FB}\\u200D\\u{1F9BC}','\\u{1F468}\\u{1F3FB}\\u200D\\u{1F9BC}\\u200D\\u27A1\\uFE0F','\\u{1F468}\\u{1F3FB}\\u200D\\u{1F9BD}','\\u{1F468}\\u{1F3FB}\\u200D\\u{1F9BD}\\u200D\\u27A1\\uFE0F','\\u{1F468}\\u{1F3FC}\\u200D\\u2695\\uFE0F','\\u{1F468}\\u{1F3FC}\\u200D\\u2696\\uFE0F','\\u{1F468}\\u{1F3FC}\\u200D\\u2708\\uFE0F','\\u{1F468}\\u{1F3FC}\\u200D\\u{1F33E}','\\u{1F468}\\u{1F3FC}\\u200D\\u{1F373}','\\u{1F468}\\u{1F3FC}\\u200D\\u{1F37C}','\\u{1F468}\\u{1F3FC}\\u200D\\u{1F393}','\\u{1F468}\\u{1F3FC}\\u200D\\u{1F3A4}','\\u{1F468}\\u{1F3FC}\\u200D\\u{1F3A8}','\\u{1F468}\\u{1F3FC}\\u200D\\u{1F3EB}','\\u{1F468}\\u{1F3FC}\\u200D\\u{1F3ED}','\\u{1F468}\\u{1F3FC}\\u200D\\u{1F4BB}','\\u{1F468}\\u{1F3FC}\\u200D\\u{1F4BC}','\\u{1F468}\\u{1F3FC}\\u200D\\u{1F527}','\\u{1F468}\\u{1F3FC}\\u200D\\u{1F52C}','\\u{1F468}\\u{1F3FC}\\u200D\\u{1F680}','\\u{1F468}\\u{1F3FC}\\u200D\\u{1F692}','\\u{1F468}\\u{1F3FC}\\u200D\\u{1F9AF}','\\u{1F468}\\u{1F3FC}\\u200D\\u{1F9AF}\\u200D\\u27A1\\uFE0F','\\u{1F468}\\u{1F3FC}\\u200D\\u{1F9BC}','\\u{1F468}\\u{1F3FC}\\u200D\\u{1F9BC}\\u200D\\u27A1\\uFE0F','\\u{1F468}\\u{1F3FC}\\u200D\\u{1F9BD}','\\u{1F468}\\u{1F3FC}\\u200D\\u{1F9BD}\\u200D\\u27A1\\uFE0F','\\u{1F468}\\u{1F3FD}\\u200D\\u2695\\uFE0F','\\u{1F468}\\u{1F3FD}\\u200D\\u2696\\uFE0F','\\u{1F468}\\u{1F3FD}\\u200D\\u2708\\uFE0F','\\u{1F468}\\u{1F3FD}\\u200D\\u{1F33E}','\\u{1F468}\\u{1F3FD}\\u200D\\u{1F373}','\\u{1F468}\\u{1F3FD}\\u200D\\u{1F37C}','\\u{1F468}\\u{1F3FD}\\u200D\\u{1F393}','\\u{1F468}\\u{1F3FD}\\u200D\\u{1F3A4}','\\u{1F468}\\u{1F3FD}\\u200D\\u{1F3A8}','\\u{1F468}\\u{1F3FD}\\u200D\\u{1F3EB}','\\u{1F468}\\u{1F3FD}\\u200D\\u{1F3ED}','\\u{1F468}\\u{1F3FD}\\u200D\\u{1F4BB}','\\u{1F468}\\u{1F3FD}\\u200D\\u{1F4BC}','\\u{1F468}\\u{1F3FD}\\u200D\\u{1F527}','\\u{1F468}\\u{1F3FD}\\u200D\\u{1F52C}','\\u{1F468}\\u{1F3FD}\\u200D\\u{1F680}','\\u{1F468}\\u{1F3FD}\\u200D\\u{1F692}','\\u{1F468}\\u{1F3FD}\\u200D\\u{1F9AF}','\\u{1F468}\\u{1F3FD}\\u200D\\u{1F9AF}\\u200D\\u27A1\\uFE0F','\\u{1F468}\\u{1F3FD}\\u200D\\u{1F9BC}','\\u{1F468}\\u{1F3FD}\\u200D\\u{1F9BC}\\u200D\\u27A1\\uFE0F','\\u{1F468}\\u{1F3FD}\\u200D\\u{1F9BD}','\\u{1F468}\\u{1F3FD}\\u200D\\u{1F9BD}\\u200D\\u27A1\\uFE0F','\\u{1F468}\\u{1F3FE}\\u200D\\u2695\\uFE0F','\\u{1F468}\\u{1F3FE}\\u200D\\u2696\\uFE0F','\\u{1F468}\\u{1F3FE}\\u200D\\u2708\\uFE0F','\\u{1F468}\\u{1F3FE}\\u200D\\u{1F33E}','\\u{1F468}\\u{1F3FE}\\u200D\\u{1F373}','\\u{1F468}\\u{1F3FE}\\u200D\\u{1F37C}','\\u{1F468}\\u{1F3FE}\\u200D\\u{1F393}','\\u{1F468}\\u{1F3FE}\\u200D\\u{1F3A4}','\\u{1F468}\\u{1F3FE}\\u200D\\u{1F3A8}','\\u{1F468}\\u{1F3FE}\\u200D\\u{1F3EB}','\\u{1F468}\\u{1F3FE}\\u200D\\u{1F3ED}','\\u{1F468}\\u{1F3FE}\\u200D\\u{1F4BB}','\\u{1F468}\\u{1F3FE}\\u200D\\u{1F4BC}','\\u{1F468}\\u{1F3FE}\\u200D\\u{1F527}','\\u{1F468}\\u{1F3FE}\\u200D\\u{1F52C}','\\u{1F468}\\u{1F3FE}\\u200D\\u{1F680}','\\u{1F468}\\u{1F3FE}\\u200D\\u{1F692}','\\u{1F468}\\u{1F3FE}\\u200D\\u{1F9AF}','\\u{1F468}\\u{1F3FE}\\u200D\\u{1F9AF}\\u200D\\u27A1\\uFE0F','\\u{1F468}\\u{1F3FE}\\u200D\\u{1F9BC}','\\u{1F468}\\u{1F3FE}\\u200D\\u{1F9BC}\\u200D\\u27A1\\uFE0F','\\u{1F468}\\u{1F3FE}\\u200D\\u{1F9BD}','\\u{1F468}\\u{1F3FE}\\u200D\\u{1F9BD}\\u200D\\u27A1\\uFE0F','\\u{1F468}\\u{1F3FF}\\u200D\\u2695\\uFE0F','\\u{1F468}\\u{1F3FF}\\u200D\\u2696\\uFE0F','\\u{1F468}\\u{1F3FF}\\u200D\\u2708\\uFE0F','\\u{1F468}\\u{1F3FF}\\u200D\\u{1F33E}','\\u{1F468}\\u{1F3FF}\\u200D\\u{1F373}','\\u{1F468}\\u{1F3FF}\\u200D\\u{1F37C}','\\u{1F468}\\u{1F3FF}\\u200D\\u{1F393}','\\u{1F468}\\u{1F3FF}\\u200D\\u{1F3A4}','\\u{1F468}\\u{1F3FF}\\u200D\\u{1F3A8}','\\u{1F468}\\u{1F3FF}\\u200D\\u{1F3EB}','\\u{1F468}\\u{1F3FF}\\u200D\\u{1F3ED}','\\u{1F468}\\u{1F3FF}\\u200D\\u{1F4BB}','\\u{1F468}\\u{1F3FF}\\u200D\\u{1F4BC}','\\u{1F468}\\u{1F3FF}\\u200D\\u{1F527}','\\u{1F468}\\u{1F3FF}\\u200D\\u{1F52C}','\\u{1F468}\\u{1F3FF}\\u200D\\u{1F680}','\\u{1F468}\\u{1F3FF}\\u200D\\u{1F692}','\\u{1F468}\\u{1F3FF}\\u200D\\u{1F9AF}','\\u{1F468}\\u{1F3FF}\\u200D\\u{1F9AF}\\u200D\\u27A1\\uFE0F','\\u{1F468}\\u{1F3FF}\\u200D\\u{1F9BC}','\\u{1F468}\\u{1F3FF}\\u200D\\u{1F9BC}\\u200D\\u27A1\\uFE0F','\\u{1F468}\\u{1F3FF}\\u200D\\u{1F9BD}','\\u{1F468}\\u{1F3FF}\\u200D\\u{1F9BD}\\u200D\\u27A1\\uFE0F','\\u{1F469}\\u200D\\u2695\\uFE0F','\\u{1F469}\\u200D\\u2696\\uFE0F','\\u{1F469}\\u200D\\u2708\\uFE0F','\\u{1F469}\\u200D\\u{1F33E}','\\u{1F469}\\u200D\\u{1F373}','\\u{1F469}\\u200D\\u{1F37C}','\\u{1F469}\\u200D\\u{1F393}','\\u{1F469}\\u200D\\u{1F3A4}','\\u{1F469}\\u200D\\u{1F3A8}','\\u{1F469}\\u200D\\u{1F3EB}','\\u{1F469}\\u200D\\u{1F3ED}','\\u{1F469}\\u200D\\u{1F4BB}','\\u{1F469}\\u200D\\u{1F4BC}','\\u{1F469}\\u200D\\u{1F527}','\\u{1F469}\\u200D\\u{1F52C}','\\u{1F469}\\u200D\\u{1F680}','\\u{1F469}\\u200D\\u{1F692}','\\u{1F469}\\u200D\\u{1F9AF}','\\u{1F469}\\u200D\\u{1F9AF}\\u200D\\u27A1\\uFE0F','\\u{1F469}\\u200D\\u{1F9BC}','\\u{1F469}\\u200D\\u{1F9BC}\\u200D\\u27A1\\uFE0F','\\u{1F469}\\u200D\\u{1F9BD}','\\u{1F469}\\u200D\\u{1F9BD}\\u200D\\u27A1\\uFE0F','\\u{1F469}\\u{1F3FB}\\u200D\\u2695\\uFE0F','\\u{1F469}\\u{1F3FB}\\u200D\\u2696\\uFE0F','\\u{1F469}\\u{1F3FB}\\u200D\\u2708\\uFE0F','\\u{1F469}\\u{1F3FB}\\u200D\\u{1F33E}','\\u{1F469}\\u{1F3FB}\\u200D\\u{1F373}','\\u{1F469}\\u{1F3FB}\\u200D\\u{1F37C}','\\u{1F469}\\u{1F3FB}\\u200D\\u{1F393}','\\u{1F469}\\u{1F3FB}\\u200D\\u{1F3A4}','\\u{1F469}\\u{1F3FB}\\u200D\\u{1F3A8}','\\u{1F469}\\u{1F3FB}\\u200D\\u{1F3EB}','\\u{1F469}\\u{1F3FB}\\u200D\\u{1F3ED}','\\u{1F469}\\u{1F3FB}\\u200D\\u{1F4BB}','\\u{1F469}\\u{1F3FB}\\u200D\\u{1F4BC}','\\u{1F469}\\u{1F3FB}\\u200D\\u{1F527}','\\u{1F469}\\u{1F3FB}\\u200D\\u{1F52C}','\\u{1F469}\\u{1F3FB}\\u200D\\u{1F680}','\\u{1F469}\\u{1F3FB}\\u200D\\u{1F692}','\\u{1F469}\\u{1F3FB}\\u200D\\u{1F9AF}','\\u{1F469}\\u{1F3FB}\\u200D\\u{1F9AF}\\u200D\\u27A1\\uFE0F','\\u{1F469}\\u{1F3FB}\\u200D\\u{1F9BC}','\\u{1F469}\\u{1F3FB}\\u200D\\u{1F9BC}\\u200D\\u27A1\\uFE0F','\\u{1F469}\\u{1F3FB}\\u200D\\u{1F9BD}','\\u{1F469}\\u{1F3FB}\\u200D\\u{1F9BD}\\u200D\\u27A1\\uFE0F','\\u{1F469}\\u{1F3FC}\\u200D\\u2695\\uFE0F','\\u{1F469}\\u{1F3FC}\\u200D\\u2696\\uFE0F','\\u{1F469}\\u{1F3FC}\\u200D\\u2708\\uFE0F','\\u{1F469}\\u{1F3FC}\\u200D\\u{1F33E}','\\u{1F469}\\u{1F3FC}\\u200D\\u{1F373}','\\u{1F469}\\u{1F3FC}\\u200D\\u{1F37C}','\\u{1F469}\\u{1F3FC}\\u200D\\u{1F393}','\\u{1F469}\\u{1F3FC}\\u200D\\u{1F3A4}','\\u{1F469}\\u{1F3FC}\\u200D\\u{1F3A8}','\\u{1F469}\\u{1F3FC}\\u200D\\u{1F3EB}','\\u{1F469}\\u{1F3FC}\\u200D\\u{1F3ED}','\\u{1F469}\\u{1F3FC}\\u200D\\u{1F4BB}','\\u{1F469}\\u{1F3FC}\\u200D\\u{1F4BC}','\\u{1F469}\\u{1F3FC}\\u200D\\u{1F527}','\\u{1F469}\\u{1F3FC}\\u200D\\u{1F52C}','\\u{1F469}\\u{1F3FC}\\u200D\\u{1F680}','\\u{1F469}\\u{1F3FC}\\u200D\\u{1F692}','\\u{1F469}\\u{1F3FC}\\u200D\\u{1F9AF}','\\u{1F469}\\u{1F3FC}\\u200D\\u{1F9AF}\\u200D\\u27A1\\uFE0F','\\u{1F469}\\u{1F3FC}\\u200D\\u{1F9BC}','\\u{1F469}\\u{1F3FC}\\u200D\\u{1F9BC}\\u200D\\u27A1\\uFE0F','\\u{1F469}\\u{1F3FC}\\u200D\\u{1F9BD}','\\u{1F469}\\u{1F3FC}\\u200D\\u{1F9BD}\\u200D\\u27A1\\uFE0F','\\u{1F469}\\u{1F3FD}\\u200D\\u2695\\uFE0F','\\u{1F469}\\u{1F3FD}\\u200D\\u2696\\uFE0F','\\u{1F469}\\u{1F3FD}\\u200D\\u2708\\uFE0F','\\u{1F469}\\u{1F3FD}\\u200D\\u{1F33E}','\\u{1F469}\\u{1F3FD}\\u200D\\u{1F373}','\\u{1F469}\\u{1F3FD}\\u200D\\u{1F37C}','\\u{1F469}\\u{1F3FD}\\u200D\\u{1F393}','\\u{1F469}\\u{1F3FD}\\u200D\\u{1F3A4}','\\u{1F469}\\u{1F3FD}\\u200D\\u{1F3A8}','\\u{1F469}\\u{1F3FD}\\u200D\\u{1F3EB}','\\u{1F469}\\u{1F3FD}\\u200D\\u{1F3ED}','\\u{1F469}\\u{1F3FD}\\u200D\\u{1F4BB}','\\u{1F469}\\u{1F3FD}\\u200D\\u{1F4BC}','\\u{1F469}\\u{1F3FD}\\u200D\\u{1F527}','\\u{1F469}\\u{1F3FD}\\u200D\\u{1F52C}','\\u{1F469}\\u{1F3FD}\\u200D\\u{1F680}','\\u{1F469}\\u{1F3FD}\\u200D\\u{1F692}','\\u{1F469}\\u{1F3FD}\\u200D\\u{1F9AF}','\\u{1F469}\\u{1F3FD}\\u200D\\u{1F9AF}\\u200D\\u27A1\\uFE0F','\\u{1F469}\\u{1F3FD}\\u200D\\u{1F9BC}','\\u{1F469}\\u{1F3FD}\\u200D\\u{1F9BC}\\u200D\\u27A1\\uFE0F','\\u{1F469}\\u{1F3FD}\\u200D\\u{1F9BD}','\\u{1F469}\\u{1F3FD}\\u200D\\u{1F9BD}\\u200D\\u27A1\\uFE0F','\\u{1F469}\\u{1F3FE}\\u200D\\u2695\\uFE0F','\\u{1F469}\\u{1F3FE}\\u200D\\u2696\\uFE0F','\\u{1F469}\\u{1F3FE}\\u200D\\u2708\\uFE0F','\\u{1F469}\\u{1F3FE}\\u200D\\u{1F33E}','\\u{1F469}\\u{1F3FE}\\u200D\\u{1F373}','\\u{1F469}\\u{1F3FE}\\u200D\\u{1F37C}','\\u{1F469}\\u{1F3FE}\\u200D\\u{1F393}','\\u{1F469}\\u{1F3FE}\\u200D\\u{1F3A4}','\\u{1F469}\\u{1F3FE}\\u200D\\u{1F3A8}','\\u{1F469}\\u{1F3FE}\\u200D\\u{1F3EB}','\\u{1F469}\\u{1F3FE}\\u200D\\u{1F3ED}','\\u{1F469}\\u{1F3FE}\\u200D\\u{1F4BB}','\\u{1F469}\\u{1F3FE}\\u200D\\u{1F4BC}','\\u{1F469}\\u{1F3FE}\\u200D\\u{1F527}','\\u{1F469}\\u{1F3FE}\\u200D\\u{1F52C}','\\u{1F469}\\u{1F3FE}\\u200D\\u{1F680}','\\u{1F469}\\u{1F3FE}\\u200D\\u{1F692}','\\u{1F469}\\u{1F3FE}\\u200D\\u{1F9AF}','\\u{1F469}\\u{1F3FE}\\u200D\\u{1F9AF}\\u200D\\u27A1\\uFE0F','\\u{1F469}\\u{1F3FE}\\u200D\\u{1F9BC}','\\u{1F469}\\u{1F3FE}\\u200D\\u{1F9BC}\\u200D\\u27A1\\uFE0F','\\u{1F469}\\u{1F3FE}\\u200D\\u{1F9BD}','\\u{1F469}\\u{1F3FE}\\u200D\\u{1F9BD}\\u200D\\u27A1\\uFE0F','\\u{1F469}\\u{1F3FF}\\u200D\\u2695\\uFE0F','\\u{1F469}\\u{1F3FF}\\u200D\\u2696\\uFE0F','\\u{1F469}\\u{1F3FF}\\u200D\\u2708\\uFE0F','\\u{1F469}\\u{1F3FF}\\u200D\\u{1F33E}','\\u{1F469}\\u{1F3FF}\\u200D\\u{1F373}','\\u{1F469}\\u{1F3FF}\\u200D\\u{1F37C}','\\u{1F469}\\u{1F3FF}\\u200D\\u{1F393}','\\u{1F469}\\u{1F3FF}\\u200D\\u{1F3A4}','\\u{1F469}\\u{1F3FF}\\u200D\\u{1F3A8}','\\u{1F469}\\u{1F3FF}\\u200D\\u{1F3EB}','\\u{1F469}\\u{1F3FF}\\u200D\\u{1F3ED}','\\u{1F469}\\u{1F3FF}\\u200D\\u{1F4BB}','\\u{1F469}\\u{1F3FF}\\u200D\\u{1F4BC}','\\u{1F469}\\u{1F3FF}\\u200D\\u{1F527}','\\u{1F469}\\u{1F3FF}\\u200D\\u{1F52C}','\\u{1F469}\\u{1F3FF}\\u200D\\u{1F680}','\\u{1F469}\\u{1F3FF}\\u200D\\u{1F692}','\\u{1F469}\\u{1F3FF}\\u200D\\u{1F9AF}','\\u{1F469}\\u{1F3FF}\\u200D\\u{1F9AF}\\u200D\\u27A1\\uFE0F','\\u{1F469}\\u{1F3FF}\\u200D\\u{1F9BC}','\\u{1F469}\\u{1F3FF}\\u200D\\u{1F9BC}\\u200D\\u27A1\\uFE0F','\\u{1F469}\\u{1F3FF}\\u200D\\u{1F9BD}','\\u{1F469}\\u{1F3FF}\\u200D\\u{1F9BD}\\u200D\\u27A1\\uFE0F','\\u{1F6B6}\\u200D\\u27A1\\uFE0F','\\u{1F6B6}\\u{1F3FB}\\u200D\\u27A1\\uFE0F','\\u{1F6B6}\\u{1F3FC}\\u200D\\u27A1\\uFE0F','\\u{1F6B6}\\u{1F3FD}\\u200D\\u27A1\\uFE0F','\\u{1F6B6}\\u{1F3FE}\\u200D\\u27A1\\uFE0F','\\u{1F6B6}\\u{1F3FF}\\u200D\\u27A1\\uFE0F','\\u{1F9CE}\\u200D\\u27A1\\uFE0F','\\u{1F9CE}\\u{1F3FB}\\u200D\\u27A1\\uFE0F','\\u{1F9CE}\\u{1F3FC}\\u200D\\u27A1\\uFE0F','\\u{1F9CE}\\u{1F3FD}\\u200D\\u27A1\\uFE0F','\\u{1F9CE}\\u{1F3FE}\\u200D\\u27A1\\uFE0F','\\u{1F9CE}\\u{1F3FF}\\u200D\\u27A1\\uFE0F','\\u{1F9D1}\\u200D\\u2695\\uFE0F','\\u{1F9D1}\\u200D\\u2696\\uFE0F','\\u{1F9D1}\\u200D\\u2708\\uFE0F','\\u{1F9D1}\\u200D\\u{1F33E}','\\u{1F9D1}\\u200D\\u{1F373}','\\u{1F9D1}\\u200D\\u{1F37C}','\\u{1F9D1}\\u200D\\u{1F384}','\\u{1F9D1}\\u200D\\u{1F393}','\\u{1F9D1}\\u200D\\u{1F3A4}','\\u{1F9D1}\\u200D\\u{1F3A8}','\\u{1F9D1}\\u200D\\u{1F3EB}','\\u{1F9D1}\\u200D\\u{1F3ED}','\\u{1F9D1}\\u200D\\u{1F4BB}','\\u{1F9D1}\\u200D\\u{1F4BC}','\\u{1F9D1}\\u200D\\u{1F527}','\\u{1F9D1}\\u200D\\u{1F52C}','\\u{1F9D1}\\u200D\\u{1F680}','\\u{1F9D1}\\u200D\\u{1F692}','\\u{1F9D1}\\u200D\\u{1F9AF}','\\u{1F9D1}\\u200D\\u{1F9AF}\\u200D\\u27A1\\uFE0F','\\u{1F9D1}\\u200D\\u{1F9BC}','\\u{1F9D1}\\u200D\\u{1F9BC}\\u200D\\u27A1\\uFE0F','\\u{1F9D1}\\u200D\\u{1F9BD}','\\u{1F9D1}\\u200D\\u{1F9BD}\\u200D\\u27A1\\uFE0F','\\u{1F9D1}\\u{1F3FB}\\u200D\\u2695\\uFE0F','\\u{1F9D1}\\u{1F3FB}\\u200D\\u2696\\uFE0F','\\u{1F9D1}\\u{1F3FB}\\u200D\\u2708\\uFE0F','\\u{1F9D1}\\u{1F3FB}\\u200D\\u{1F33E}','\\u{1F9D1}\\u{1F3FB}\\u200D\\u{1F373}','\\u{1F9D1}\\u{1F3FB}\\u200D\\u{1F37C}','\\u{1F9D1}\\u{1F3FB}\\u200D\\u{1F384}','\\u{1F9D1}\\u{1F3FB}\\u200D\\u{1F393}','\\u{1F9D1}\\u{1F3FB}\\u200D\\u{1F3A4}','\\u{1F9D1}\\u{1F3FB}\\u200D\\u{1F3A8}','\\u{1F9D1}\\u{1F3FB}\\u200D\\u{1F3EB}','\\u{1F9D1}\\u{1F3FB}\\u200D\\u{1F3ED}','\\u{1F9D1}\\u{1F3FB}\\u200D\\u{1F4BB}','\\u{1F9D1}\\u{1F3FB}\\u200D\\u{1F4BC}','\\u{1F9D1}\\u{1F3FB}\\u200D\\u{1F527}','\\u{1F9D1}\\u{1F3FB}\\u200D\\u{1F52C}','\\u{1F9D1}\\u{1F3FB}\\u200D\\u{1F680}','\\u{1F9D1}\\u{1F3FB}\\u200D\\u{1F692}','\\u{1F9D1}\\u{1F3FB}\\u200D\\u{1F9AF}','\\u{1F9D1}\\u{1F3FB}\\u200D\\u{1F9AF}\\u200D\\u27A1\\uFE0F','\\u{1F9D1}\\u{1F3FB}\\u200D\\u{1F9BC}','\\u{1F9D1}\\u{1F3FB}\\u200D\\u{1F9BC}\\u200D\\u27A1\\uFE0F','\\u{1F9D1}\\u{1F3FB}\\u200D\\u{1F9BD}','\\u{1F9D1}\\u{1F3FB}\\u200D\\u{1F9BD}\\u200D\\u27A1\\uFE0F','\\u{1F9D1}\\u{1F3FC}\\u200D\\u2695\\uFE0F','\\u{1F9D1}\\u{1F3FC}\\u200D\\u2696\\uFE0F','\\u{1F9D1}\\u{1F3FC}\\u200D\\u2708\\uFE0F','\\u{1F9D1}\\u{1F3FC}\\u200D\\u{1F33E}','\\u{1F9D1}\\u{1F3FC}\\u200D\\u{1F373}','\\u{1F9D1}\\u{1F3FC}\\u200D\\u{1F37C}','\\u{1F9D1}\\u{1F3FC}\\u200D\\u{1F384}','\\u{1F9D1}\\u{1F3FC}\\u200D\\u{1F393}','\\u{1F9D1}\\u{1F3FC}\\u200D\\u{1F3A4}','\\u{1F9D1}\\u{1F3FC}\\u200D\\u{1F3A8}','\\u{1F9D1}\\u{1F3FC}\\u200D\\u{1F3EB}','\\u{1F9D1}\\u{1F3FC}\\u200D\\u{1F3ED}','\\u{1F9D1}\\u{1F3FC}\\u200D\\u{1F4BB}','\\u{1F9D1}\\u{1F3FC}\\u200D\\u{1F4BC}','\\u{1F9D1}\\u{1F3FC}\\u200D\\u{1F527}','\\u{1F9D1}\\u{1F3FC}\\u200D\\u{1F52C}','\\u{1F9D1}\\u{1F3FC}\\u200D\\u{1F680}','\\u{1F9D1}\\u{1F3FC}\\u200D\\u{1F692}','\\u{1F9D1}\\u{1F3FC}\\u200D\\u{1F9AF}','\\u{1F9D1}\\u{1F3FC}\\u200D\\u{1F9AF}\\u200D\\u27A1\\uFE0F','\\u{1F9D1}\\u{1F3FC}\\u200D\\u{1F9BC}','\\u{1F9D1}\\u{1F3FC}\\u200D\\u{1F9BC}\\u200D\\u27A1\\uFE0F','\\u{1F9D1}\\u{1F3FC}\\u200D\\u{1F9BD}','\\u{1F9D1}\\u{1F3FC}\\u200D\\u{1F9BD}\\u200D\\u27A1\\uFE0F','\\u{1F9D1}\\u{1F3FD}\\u200D\\u2695\\uFE0F','\\u{1F9D1}\\u{1F3FD}\\u200D\\u2696\\uFE0F','\\u{1F9D1}\\u{1F3FD}\\u200D\\u2708\\uFE0F','\\u{1F9D1}\\u{1F3FD}\\u200D\\u{1F33E}','\\u{1F9D1}\\u{1F3FD}\\u200D\\u{1F373}','\\u{1F9D1}\\u{1F3FD}\\u200D\\u{1F37C}','\\u{1F9D1}\\u{1F3FD}\\u200D\\u{1F384}','\\u{1F9D1}\\u{1F3FD}\\u200D\\u{1F393}','\\u{1F9D1}\\u{1F3FD}\\u200D\\u{1F3A4}','\\u{1F9D1}\\u{1F3FD}\\u200D\\u{1F3A8}','\\u{1F9D1}\\u{1F3FD}\\u200D\\u{1F3EB}','\\u{1F9D1}\\u{1F3FD}\\u200D\\u{1F3ED}','\\u{1F9D1}\\u{1F3FD}\\u200D\\u{1F4BB}','\\u{1F9D1}\\u{1F3FD}\\u200D\\u{1F4BC}','\\u{1F9D1}\\u{1F3FD}\\u200D\\u{1F527}','\\u{1F9D1}\\u{1F3FD}\\u200D\\u{1F52C}','\\u{1F9D1}\\u{1F3FD}\\u200D\\u{1F680}','\\u{1F9D1}\\u{1F3FD}\\u200D\\u{1F692}','\\u{1F9D1}\\u{1F3FD}\\u200D\\u{1F9AF}','\\u{1F9D1}\\u{1F3FD}\\u200D\\u{1F9AF}\\u200D\\u27A1\\uFE0F','\\u{1F9D1}\\u{1F3FD}\\u200D\\u{1F9BC}','\\u{1F9D1}\\u{1F3FD}\\u200D\\u{1F9BC}\\u200D\\u27A1\\uFE0F','\\u{1F9D1}\\u{1F3FD}\\u200D\\u{1F9BD}','\\u{1F9D1}\\u{1F3FD}\\u200D\\u{1F9BD}\\u200D\\u27A1\\uFE0F','\\u{1F9D1}\\u{1F3FE}\\u200D\\u2695\\uFE0F','\\u{1F9D1}\\u{1F3FE}\\u200D\\u2696\\uFE0F','\\u{1F9D1}\\u{1F3FE}\\u200D\\u2708\\uFE0F','\\u{1F9D1}\\u{1F3FE}\\u200D\\u{1F33E}','\\u{1F9D1}\\u{1F3FE}\\u200D\\u{1F373}','\\u{1F9D1}\\u{1F3FE}\\u200D\\u{1F37C}','\\u{1F9D1}\\u{1F3FE}\\u200D\\u{1F384}','\\u{1F9D1}\\u{1F3FE}\\u200D\\u{1F393}','\\u{1F9D1}\\u{1F3FE}\\u200D\\u{1F3A4}','\\u{1F9D1}\\u{1F3FE}\\u200D\\u{1F3A8}','\\u{1F9D1}\\u{1F3FE}\\u200D\\u{1F3EB}','\\u{1F9D1}\\u{1F3FE}\\u200D\\u{1F3ED}','\\u{1F9D1}\\u{1F3FE}\\u200D\\u{1F4BB}','\\u{1F9D1}\\u{1F3FE}\\u200D\\u{1F4BC}','\\u{1F9D1}\\u{1F3FE}\\u200D\\u{1F527}','\\u{1F9D1}\\u{1F3FE}\\u200D\\u{1F52C}','\\u{1F9D1}\\u{1F3FE}\\u200D\\u{1F680}','\\u{1F9D1}\\u{1F3FE}\\u200D\\u{1F692}','\\u{1F9D1}\\u{1F3FE}\\u200D\\u{1F9AF}','\\u{1F9D1}\\u{1F3FE}\\u200D\\u{1F9AF}\\u200D\\u27A1\\uFE0F','\\u{1F9D1}\\u{1F3FE}\\u200D\\u{1F9BC}','\\u{1F9D1}\\u{1F3FE}\\u200D\\u{1F9BC}\\u200D\\u27A1\\uFE0F','\\u{1F9D1}\\u{1F3FE}\\u200D\\u{1F9BD}','\\u{1F9D1}\\u{1F3FE}\\u200D\\u{1F9BD}\\u200D\\u27A1\\uFE0F','\\u{1F9D1}\\u{1F3FF}\\u200D\\u2695\\uFE0F','\\u{1F9D1}\\u{1F3FF}\\u200D\\u2696\\uFE0F','\\u{1F9D1}\\u{1F3FF}\\u200D\\u2708\\uFE0F','\\u{1F9D1}\\u{1F3FF}\\u200D\\u{1F33E}','\\u{1F9D1}\\u{1F3FF}\\u200D\\u{1F373}','\\u{1F9D1}\\u{1F3FF}\\u200D\\u{1F37C}','\\u{1F9D1}\\u{1F3FF}\\u200D\\u{1F384}','\\u{1F9D1}\\u{1F3FF}\\u200D\\u{1F393}','\\u{1F9D1}\\u{1F3FF}\\u200D\\u{1F3A4}','\\u{1F9D1}\\u{1F3FF}\\u200D\\u{1F3A8}','\\u{1F9D1}\\u{1F3FF}\\u200D\\u{1F3EB}','\\u{1F9D1}\\u{1F3FF}\\u200D\\u{1F3ED}','\\u{1F9D1}\\u{1F3FF}\\u200D\\u{1F4BB}','\\u{1F9D1}\\u{1F3FF}\\u200D\\u{1F4BC}','\\u{1F9D1}\\u{1F3FF}\\u200D\\u{1F527}','\\u{1F9D1}\\u{1F3FF}\\u200D\\u{1F52C}','\\u{1F9D1}\\u{1F3FF}\\u200D\\u{1F680}','\\u{1F9D1}\\u{1F3FF}\\u200D\\u{1F692}','\\u{1F9D1}\\u{1F3FF}\\u200D\\u{1F9AF}','\\u{1F9D1}\\u{1F3FF}\\u200D\\u{1F9AF}\\u200D\\u27A1\\uFE0F','\\u{1F9D1}\\u{1F3FF}\\u200D\\u{1F9BC}','\\u{1F9D1}\\u{1F3FF}\\u200D\\u{1F9BC}\\u200D\\u27A1\\uFE0F','\\u{1F9D1}\\u{1F3FF}\\u200D\\u{1F9BD}','\\u{1F9D1}\\u{1F3FF}\\u200D\\u{1F9BD}\\u200D\\u27A1\\uFE0F','\\u26F9\\u{1F3FB}\\u200D\\u2640\\uFE0F','\\u26F9\\u{1F3FB}\\u200D\\u2642\\uFE0F','\\u26F9\\u{1F3FC}\\u200D\\u2640\\uFE0F','\\u26F9\\u{1F3FC}\\u200D\\u2642\\uFE0F','\\u26F9\\u{1F3FD}\\u200D\\u2640\\uFE0F','\\u26F9\\u{1F3FD}\\u200D\\u2642\\uFE0F','\\u26F9\\u{1F3FE}\\u200D\\u2640\\uFE0F','\\u26F9\\u{1F3FE}\\u200D\\u2642\\uFE0F','\\u26F9\\u{1F3FF}\\u200D\\u2640\\uFE0F','\\u26F9\\u{1F3FF}\\u200D\\u2642\\uFE0F','\\u26F9\\uFE0F\\u200D\\u2640\\uFE0F','\\u26F9\\uFE0F\\u200D\\u2642\\uFE0F','\\u{1F3C3}\\u200D\\u2640\\uFE0F','\\u{1F3C3}\\u200D\\u2640\\uFE0F\\u200D\\u27A1\\uFE0F','\\u{1F3C3}\\u200D\\u2642\\uFE0F','\\u{1F3C3}\\u200D\\u2642\\uFE0F\\u200D\\u27A1\\uFE0F','\\u{1F3C3}\\u{1F3FB}\\u200D\\u2640\\uFE0F','\\u{1F3C3}\\u{1F3FB}\\u200D\\u2640\\uFE0F\\u200D\\u27A1\\uFE0F','\\u{1F3C3}\\u{1F3FB}\\u200D\\u2642\\uFE0F','\\u{1F3C3}\\u{1F3FB}\\u200D\\u2642\\uFE0F\\u200D\\u27A1\\uFE0F','\\u{1F3C3}\\u{1F3FC}\\u200D\\u2640\\uFE0F','\\u{1F3C3}\\u{1F3FC}\\u200D\\u2640\\uFE0F\\u200D\\u27A1\\uFE0F','\\u{1F3C3}\\u{1F3FC}\\u200D\\u2642\\uFE0F','\\u{1F3C3}\\u{1F3FC}\\u200D\\u2642\\uFE0F\\u200D\\u27A1\\uFE0F','\\u{1F3C3}\\u{1F3FD}\\u200D\\u2640\\uFE0F','\\u{1F3C3}\\u{1F3FD}\\u200D\\u2640\\uFE0F\\u200D\\u27A1\\uFE0F','\\u{1F3C3}\\u{1F3FD}\\u200D\\u2642\\uFE0F','\\u{1F3C3}\\u{1F3FD}\\u200D\\u2642\\uFE0F\\u200D\\u27A1\\uFE0F','\\u{1F3C3}\\u{1F3FE}\\u200D\\u2640\\uFE0F','\\u{1F3C3}\\u{1F3FE}\\u200D\\u2640\\uFE0F\\u200D\\u27A1\\uFE0F','\\u{1F3C3}\\u{1F3FE}\\u200D\\u2642\\uFE0F','\\u{1F3C3}\\u{1F3FE}\\u200D\\u2642\\uFE0F\\u200D\\u27A1\\uFE0F','\\u{1F3C3}\\u{1F3FF}\\u200D\\u2640\\uFE0F','\\u{1F3C3}\\u{1F3FF}\\u200D\\u2640\\uFE0F\\u200D\\u27A1\\uFE0F','\\u{1F3C3}\\u{1F3FF}\\u200D\\u2642\\uFE0F','\\u{1F3C3}\\u{1F3FF}\\u200D\\u2642\\uFE0F\\u200D\\u27A1\\uFE0F','\\u{1F3C4}\\u200D\\u2640\\uFE0F','\\u{1F3C4}\\u200D\\u2642\\uFE0F','\\u{1F3C4}\\u{1F3FB}\\u200D\\u2640\\uFE0F','\\u{1F3C4}\\u{1F3FB}\\u200D\\u2642\\uFE0F','\\u{1F3C4}\\u{1F3FC}\\u200D\\u2640\\uFE0F','\\u{1F3C4}\\u{1F3FC}\\u200D\\u2642\\uFE0F','\\u{1F3C4}\\u{1F3FD}\\u200D\\u2640\\uFE0F','\\u{1F3C4}\\u{1F3FD}\\u200D\\u2642\\uFE0F','\\u{1F3C4}\\u{1F3FE}\\u200D\\u2640\\uFE0F','\\u{1F3C4}\\u{1F3FE}\\u200D\\u2642\\uFE0F','\\u{1F3C4}\\u{1F3FF}\\u200D\\u2640\\uFE0F','\\u{1F3C4}\\u{1F3FF}\\u200D\\u2642\\uFE0F','\\u{1F3CA}\\u200D\\u2640\\uFE0F','\\u{1F3CA}\\u200D\\u2642\\uFE0F','\\u{1F3CA}\\u{1F3FB}\\u200D\\u2640\\uFE0F','\\u{1F3CA}\\u{1F3FB}\\u200D\\u2642\\uFE0F','\\u{1F3CA}\\u{1F3FC}\\u200D\\u2640\\uFE0F','\\u{1F3CA}\\u{1F3FC}\\u200D\\u2642\\uFE0F','\\u{1F3CA}\\u{1F3FD}\\u200D\\u2640\\uFE0F','\\u{1F3CA}\\u{1F3FD}\\u200D\\u2642\\uFE0F','\\u{1F3CA}\\u{1F3FE}\\u200D\\u2640\\uFE0F','\\u{1F3CA}\\u{1F3FE}\\u200D\\u2642\\uFE0F','\\u{1F3CA}\\u{1F3FF}\\u200D\\u2640\\uFE0F','\\u{1F3CA}\\u{1F3FF}\\u200D\\u2642\\uFE0F','\\u{1F3CB}\\u{1F3FB}\\u200D\\u2640\\uFE0F','\\u{1F3CB}\\u{1F3FB}\\u200D\\u2642\\uFE0F','\\u{1F3CB}\\u{1F3FC}\\u200D\\u2640\\uFE0F','\\u{1F3CB}\\u{1F3FC}\\u200D\\u2642\\uFE0F','\\u{1F3CB}\\u{1F3FD}\\u200D\\u2640\\uFE0F','\\u{1F3CB}\\u{1F3FD}\\u200D\\u2642\\uFE0F','\\u{1F3CB}\\u{1F3FE}\\u200D\\u2640\\uFE0F','\\u{1F3CB}\\u{1F3FE}\\u200D\\u2642\\uFE0F','\\u{1F3CB}\\u{1F3FF}\\u200D\\u2640\\uFE0F','\\u{1F3CB}\\u{1F3FF}\\u200D\\u2642\\uFE0F','\\u{1F3CB}\\uFE0F\\u200D\\u2640\\uFE0F','\\u{1F3CB}\\uFE0F\\u200D\\u2642\\uFE0F','\\u{1F3CC}\\u{1F3FB}\\u200D\\u2640\\uFE0F','\\u{1F3CC}\\u{1F3FB}\\u200D\\u2642\\uFE0F','\\u{1F3CC}\\u{1F3FC}\\u200D\\u2640\\uFE0F','\\u{1F3CC}\\u{1F3FC}\\u200D\\u2642\\uFE0F','\\u{1F3CC}\\u{1F3FD}\\u200D\\u2640\\uFE0F','\\u{1F3CC}\\u{1F3FD}\\u200D\\u2642\\uFE0F','\\u{1F3CC}\\u{1F3FE}\\u200D\\u2640\\uFE0F','\\u{1F3CC}\\u{1F3FE}\\u200D\\u2642\\uFE0F','\\u{1F3CC}\\u{1F3FF}\\u200D\\u2640\\uFE0F','\\u{1F3CC}\\u{1F3FF}\\u200D\\u2642\\uFE0F','\\u{1F3CC}\\uFE0F\\u200D\\u2640\\uFE0F','\\u{1F3CC}\\uFE0F\\u200D\\u2642\\uFE0F','\\u{1F46E}\\u200D\\u2640\\uFE0F','\\u{1F46E}\\u200D\\u2642\\uFE0F','\\u{1F46E}\\u{1F3FB}\\u200D\\u2640\\uFE0F','\\u{1F46E}\\u{1F3FB}\\u200D\\u2642\\uFE0F','\\u{1F46E}\\u{1F3FC}\\u200D\\u2640\\uFE0F','\\u{1F46E}\\u{1F3FC}\\u200D\\u2642\\uFE0F','\\u{1F46E}\\u{1F3FD}\\u200D\\u2640\\uFE0F','\\u{1F46E}\\u{1F3FD}\\u200D\\u2642\\uFE0F','\\u{1F46E}\\u{1F3FE}\\u200D\\u2640\\uFE0F','\\u{1F46E}\\u{1F3FE}\\u200D\\u2642\\uFE0F','\\u{1F46E}\\u{1F3FF}\\u200D\\u2640\\uFE0F','\\u{1F46E}\\u{1F3FF}\\u200D\\u2642\\uFE0F','\\u{1F46F}\\u200D\\u2640\\uFE0F','\\u{1F46F}\\u200D\\u2642\\uFE0F','\\u{1F470}\\u200D\\u2640\\uFE0F','\\u{1F470}\\u200D\\u2642\\uFE0F','\\u{1F470}\\u{1F3FB}\\u200D\\u2640\\uFE0F','\\u{1F470}\\u{1F3FB}\\u200D\\u2642\\uFE0F','\\u{1F470}\\u{1F3FC}\\u200D\\u2640\\uFE0F','\\u{1F470}\\u{1F3FC}\\u200D\\u2642\\uFE0F','\\u{1F470}\\u{1F3FD}\\u200D\\u2640\\uFE0F','\\u{1F470}\\u{1F3FD}\\u200D\\u2642\\uFE0F','\\u{1F470}\\u{1F3FE}\\u200D\\u2640\\uFE0F','\\u{1F470}\\u{1F3FE}\\u200D\\u2642\\uFE0F','\\u{1F470}\\u{1F3FF}\\u200D\\u2640\\uFE0F','\\u{1F470}\\u{1F3FF}\\u200D\\u2642\\uFE0F','\\u{1F471}\\u200D\\u2640\\uFE0F','\\u{1F471}\\u200D\\u2642\\uFE0F','\\u{1F471}\\u{1F3FB}\\u200D\\u2640\\uFE0F','\\u{1F471}\\u{1F3FB}\\u200D\\u2642\\uFE0F','\\u{1F471}\\u{1F3FC}\\u200D\\u2640\\uFE0F','\\u{1F471}\\u{1F3FC}\\u200D\\u2642\\uFE0F','\\u{1F471}\\u{1F3FD}\\u200D\\u2640\\uFE0F','\\u{1F471}\\u{1F3FD}\\u200D\\u2642\\uFE0F','\\u{1F471}\\u{1F3FE}\\u200D\\u2640\\uFE0F','\\u{1F471}\\u{1F3FE}\\u200D\\u2642\\uFE0F','\\u{1F471}\\u{1F3FF}\\u200D\\u2640\\uFE0F','\\u{1F471}\\u{1F3FF}\\u200D\\u2642\\uFE0F','\\u{1F473}\\u200D\\u2640\\uFE0F','\\u{1F473}\\u200D\\u2642\\uFE0F','\\u{1F473}\\u{1F3FB}\\u200D\\u2640\\uFE0F','\\u{1F473}\\u{1F3FB}\\u200D\\u2642\\uFE0F','\\u{1F473}\\u{1F3FC}\\u200D\\u2640\\uFE0F','\\u{1F473}\\u{1F3FC}\\u200D\\u2642\\uFE0F','\\u{1F473}\\u{1F3FD}\\u200D\\u2640\\uFE0F','\\u{1F473}\\u{1F3FD}\\u200D\\u2642\\uFE0F','\\u{1F473}\\u{1F3FE}\\u200D\\u2640\\uFE0F','\\u{1F473}\\u{1F3FE}\\u200D\\u2642\\uFE0F','\\u{1F473}\\u{1F3FF}\\u200D\\u2640\\uFE0F','\\u{1F473}\\u{1F3FF}\\u200D\\u2642\\uFE0F','\\u{1F477}\\u200D\\u2640\\uFE0F','\\u{1F477}\\u200D\\u2642\\uFE0F','\\u{1F477}\\u{1F3FB}\\u200D\\u2640\\uFE0F','\\u{1F477}\\u{1F3FB}\\u200D\\u2642\\uFE0F','\\u{1F477}\\u{1F3FC}\\u200D\\u2640\\uFE0F','\\u{1F477}\\u{1F3FC}\\u200D\\u2642\\uFE0F','\\u{1F477}\\u{1F3FD}\\u200D\\u2640\\uFE0F','\\u{1F477}\\u{1F3FD}\\u200D\\u2642\\uFE0F','\\u{1F477}\\u{1F3FE}\\u200D\\u2640\\uFE0F','\\u{1F477}\\u{1F3FE}\\u200D\\u2642\\uFE0F','\\u{1F477}\\u{1F3FF}\\u200D\\u2640\\uFE0F','\\u{1F477}\\u{1F3FF}\\u200D\\u2642\\uFE0F','\\u{1F481}\\u200D\\u2640\\uFE0F','\\u{1F481}\\u200D\\u2642\\uFE0F','\\u{1F481}\\u{1F3FB}\\u200D\\u2640\\uFE0F','\\u{1F481}\\u{1F3FB}\\u200D\\u2642\\uFE0F','\\u{1F481}\\u{1F3FC}\\u200D\\u2640\\uFE0F','\\u{1F481}\\u{1F3FC}\\u200D\\u2642\\uFE0F','\\u{1F481}\\u{1F3FD}\\u200D\\u2640\\uFE0F','\\u{1F481}\\u{1F3FD}\\u200D\\u2642\\uFE0F','\\u{1F481}\\u{1F3FE}\\u200D\\u2640\\uFE0F','\\u{1F481}\\u{1F3FE}\\u200D\\u2642\\uFE0F','\\u{1F481}\\u{1F3FF}\\u200D\\u2640\\uFE0F','\\u{1F481}\\u{1F3FF}\\u200D\\u2642\\uFE0F','\\u{1F482}\\u200D\\u2640\\uFE0F','\\u{1F482}\\u200D\\u2642\\uFE0F','\\u{1F482}\\u{1F3FB}\\u200D\\u2640\\uFE0F','\\u{1F482}\\u{1F3FB}\\u200D\\u2642\\uFE0F','\\u{1F482}\\u{1F3FC}\\u200D\\u2640\\uFE0F','\\u{1F482}\\u{1F3FC}\\u200D\\u2642\\uFE0F','\\u{1F482}\\u{1F3FD}\\u200D\\u2640\\uFE0F','\\u{1F482}\\u{1F3FD}\\u200D\\u2642\\uFE0F','\\u{1F482}\\u{1F3FE}\\u200D\\u2640\\uFE0F','\\u{1F482}\\u{1F3FE}\\u200D\\u2642\\uFE0F','\\u{1F482}\\u{1F3FF}\\u200D\\u2640\\uFE0F','\\u{1F482}\\u{1F3FF}\\u200D\\u2642\\uFE0F','\\u{1F486}\\u200D\\u2640\\uFE0F','\\u{1F486}\\u200D\\u2642\\uFE0F','\\u{1F486}\\u{1F3FB}\\u200D\\u2640\\uFE0F','\\u{1F486}\\u{1F3FB}\\u200D\\u2642\\uFE0F','\\u{1F486}\\u{1F3FC}\\u200D\\u2640\\uFE0F','\\u{1F486}\\u{1F3FC}\\u200D\\u2642\\uFE0F','\\u{1F486}\\u{1F3FD}\\u200D\\u2640\\uFE0F','\\u{1F486}\\u{1F3FD}\\u200D\\u2642\\uFE0F','\\u{1F486}\\u{1F3FE}\\u200D\\u2640\\uFE0F','\\u{1F486}\\u{1F3FE}\\u200D\\u2642\\uFE0F','\\u{1F486}\\u{1F3FF}\\u200D\\u2640\\uFE0F','\\u{1F486}\\u{1F3FF}\\u200D\\u2642\\uFE0F','\\u{1F487}\\u200D\\u2640\\uFE0F','\\u{1F487}\\u200D\\u2642\\uFE0F','\\u{1F487}\\u{1F3FB}\\u200D\\u2640\\uFE0F','\\u{1F487}\\u{1F3FB}\\u200D\\u2642\\uFE0F','\\u{1F487}\\u{1F3FC}\\u200D\\u2640\\uFE0F','\\u{1F487}\\u{1F3FC}\\u200D\\u2642\\uFE0F','\\u{1F487}\\u{1F3FD}\\u200D\\u2640\\uFE0F','\\u{1F487}\\u{1F3FD}\\u200D\\u2642\\uFE0F','\\u{1F487}\\u{1F3FE}\\u200D\\u2640\\uFE0F','\\u{1F487}\\u{1F3FE}\\u200D\\u2642\\uFE0F','\\u{1F487}\\u{1F3FF}\\u200D\\u2640\\uFE0F','\\u{1F487}\\u{1F3FF}\\u200D\\u2642\\uFE0F','\\u{1F575}\\u{1F3FB}\\u200D\\u2640\\uFE0F','\\u{1F575}\\u{1F3FB}\\u200D\\u2642\\uFE0F','\\u{1F575}\\u{1F3FC}\\u200D\\u2640\\uFE0F','\\u{1F575}\\u{1F3FC}\\u200D\\u2642\\uFE0F','\\u{1F575}\\u{1F3FD}\\u200D\\u2640\\uFE0F','\\u{1F575}\\u{1F3FD}\\u200D\\u2642\\uFE0F','\\u{1F575}\\u{1F3FE}\\u200D\\u2640\\uFE0F','\\u{1F575}\\u{1F3FE}\\u200D\\u2642\\uFE0F','\\u{1F575}\\u{1F3FF}\\u200D\\u2640\\uFE0F','\\u{1F575}\\u{1F3FF}\\u200D\\u2642\\uFE0F','\\u{1F575}\\uFE0F\\u200D\\u2640\\uFE0F','\\u{1F575}\\uFE0F\\u200D\\u2642\\uFE0F','\\u{1F645}\\u200D\\u2640\\uFE0F','\\u{1F645}\\u200D\\u2642\\uFE0F','\\u{1F645}\\u{1F3FB}\\u200D\\u2640\\uFE0F','\\u{1F645}\\u{1F3FB}\\u200D\\u2642\\uFE0F','\\u{1F645}\\u{1F3FC}\\u200D\\u2640\\uFE0F','\\u{1F645}\\u{1F3FC}\\u200D\\u2642\\uFE0F','\\u{1F645}\\u{1F3FD}\\u200D\\u2640\\uFE0F','\\u{1F645}\\u{1F3FD}\\u200D\\u2642\\uFE0F','\\u{1F645}\\u{1F3FE}\\u200D\\u2640\\uFE0F','\\u{1F645}\\u{1F3FE}\\u200D\\u2642\\uFE0F','\\u{1F645}\\u{1F3FF}\\u200D\\u2640\\uFE0F','\\u{1F645}\\u{1F3FF}\\u200D\\u2642\\uFE0F','\\u{1F646}\\u200D\\u2640\\uFE0F','\\u{1F646}\\u200D\\u2642\\uFE0F','\\u{1F646}\\u{1F3FB}\\u200D\\u2640\\uFE0F','\\u{1F646}\\u{1F3FB}\\u200D\\u2642\\uFE0F','\\u{1F646}\\u{1F3FC}\\u200D\\u2640\\uFE0F','\\u{1F646}\\u{1F3FC}\\u200D\\u2642\\uFE0F','\\u{1F646}\\u{1F3FD}\\u200D\\u2640\\uFE0F','\\u{1F646}\\u{1F3FD}\\u200D\\u2642\\uFE0F','\\u{1F646}\\u{1F3FE}\\u200D\\u2640\\uFE0F','\\u{1F646}\\u{1F3FE}\\u200D\\u2642\\uFE0F','\\u{1F646}\\u{1F3FF}\\u200D\\u2640\\uFE0F','\\u{1F646}\\u{1F3FF}\\u200D\\u2642\\uFE0F','\\u{1F647}\\u200D\\u2640\\uFE0F','\\u{1F647}\\u200D\\u2642\\uFE0F','\\u{1F647}\\u{1F3FB}\\u200D\\u2640\\uFE0F','\\u{1F647}\\u{1F3FB}\\u200D\\u2642\\uFE0F','\\u{1F647}\\u{1F3FC}\\u200D\\u2640\\uFE0F','\\u{1F647}\\u{1F3FC}\\u200D\\u2642\\uFE0F','\\u{1F647}\\u{1F3FD}\\u200D\\u2640\\uFE0F','\\u{1F647}\\u{1F3FD}\\u200D\\u2642\\uFE0F','\\u{1F647}\\u{1F3FE}\\u200D\\u2640\\uFE0F','\\u{1F647}\\u{1F3FE}\\u200D\\u2642\\uFE0F','\\u{1F647}\\u{1F3FF}\\u200D\\u2640\\uFE0F','\\u{1F647}\\u{1F3FF}\\u200D\\u2642\\uFE0F','\\u{1F64B}\\u200D\\u2640\\uFE0F','\\u{1F64B}\\u200D\\u2642\\uFE0F','\\u{1F64B}\\u{1F3FB}\\u200D\\u2640\\uFE0F','\\u{1F64B}\\u{1F3FB}\\u200D\\u2642\\uFE0F','\\u{1F64B}\\u{1F3FC}\\u200D\\u2640\\uFE0F','\\u{1F64B}\\u{1F3FC}\\u200D\\u2642\\uFE0F','\\u{1F64B}\\u{1F3FD}\\u200D\\u2640\\uFE0F','\\u{1F64B}\\u{1F3FD}\\u200D\\u2642\\uFE0F','\\u{1F64B}\\u{1F3FE}\\u200D\\u2640\\uFE0F','\\u{1F64B}\\u{1F3FE}\\u200D\\u2642\\uFE0F','\\u{1F64B}\\u{1F3FF}\\u200D\\u2640\\uFE0F','\\u{1F64B}\\u{1F3FF}\\u200D\\u2642\\uFE0F','\\u{1F64D}\\u200D\\u2640\\uFE0F','\\u{1F64D}\\u200D\\u2642\\uFE0F','\\u{1F64D}\\u{1F3FB}\\u200D\\u2640\\uFE0F','\\u{1F64D}\\u{1F3FB}\\u200D\\u2642\\uFE0F','\\u{1F64D}\\u{1F3FC}\\u200D\\u2640\\uFE0F','\\u{1F64D}\\u{1F3FC}\\u200D\\u2642\\uFE0F','\\u{1F64D}\\u{1F3FD}\\u200D\\u2640\\uFE0F','\\u{1F64D}\\u{1F3FD}\\u200D\\u2642\\uFE0F','\\u{1F64D}\\u{1F3FE}\\u200D\\u2640\\uFE0F','\\u{1F64D}\\u{1F3FE}\\u200D\\u2642\\uFE0F','\\u{1F64D}\\u{1F3FF}\\u200D\\u2640\\uFE0F','\\u{1F64D}\\u{1F3FF}\\u200D\\u2642\\uFE0F','\\u{1F64E}\\u200D\\u2640\\uFE0F','\\u{1F64E}\\u200D\\u2642\\uFE0F','\\u{1F64E}\\u{1F3FB}\\u200D\\u2640\\uFE0F','\\u{1F64E}\\u{1F3FB}\\u200D\\u2642\\uFE0F','\\u{1F64E}\\u{1F3FC}\\u200D\\u2640\\uFE0F','\\u{1F64E}\\u{1F3FC}\\u200D\\u2642\\uFE0F','\\u{1F64E}\\u{1F3FD}\\u200D\\u2640\\uFE0F','\\u{1F64E}\\u{1F3FD}\\u200D\\u2642\\uFE0F','\\u{1F64E}\\u{1F3FE}\\u200D\\u2640\\uFE0F','\\u{1F64E}\\u{1F3FE}\\u200D\\u2642\\uFE0F','\\u{1F64E}\\u{1F3FF}\\u200D\\u2640\\uFE0F','\\u{1F64E}\\u{1F3FF}\\u200D\\u2642\\uFE0F','\\u{1F6A3}\\u200D\\u2640\\uFE0F','\\u{1F6A3}\\u200D\\u2642\\uFE0F','\\u{1F6A3}\\u{1F3FB}\\u200D\\u2640\\uFE0F','\\u{1F6A3}\\u{1F3FB}\\u200D\\u2642\\uFE0F','\\u{1F6A3}\\u{1F3FC}\\u200D\\u2640\\uFE0F','\\u{1F6A3}\\u{1F3FC}\\u200D\\u2642\\uFE0F','\\u{1F6A3}\\u{1F3FD}\\u200D\\u2640\\uFE0F','\\u{1F6A3}\\u{1F3FD}\\u200D\\u2642\\uFE0F','\\u{1F6A3}\\u{1F3FE}\\u200D\\u2640\\uFE0F','\\u{1F6A3}\\u{1F3FE}\\u200D\\u2642\\uFE0F','\\u{1F6A3}\\u{1F3FF}\\u200D\\u2640\\uFE0F','\\u{1F6A3}\\u{1F3FF}\\u200D\\u2642\\uFE0F','\\u{1F6B4}\\u200D\\u2640\\uFE0F','\\u{1F6B4}\\u200D\\u2642\\uFE0F','\\u{1F6B4}\\u{1F3FB}\\u200D\\u2640\\uFE0F','\\u{1F6B4}\\u{1F3FB}\\u200D\\u2642\\uFE0F','\\u{1F6B4}\\u{1F3FC}\\u200D\\u2640\\uFE0F','\\u{1F6B4}\\u{1F3FC}\\u200D\\u2642\\uFE0F','\\u{1F6B4}\\u{1F3FD}\\u200D\\u2640\\uFE0F','\\u{1F6B4}\\u{1F3FD}\\u200D\\u2642\\uFE0F','\\u{1F6B4}\\u{1F3FE}\\u200D\\u2640\\uFE0F','\\u{1F6B4}\\u{1F3FE}\\u200D\\u2642\\uFE0F','\\u{1F6B4}\\u{1F3FF}\\u200D\\u2640\\uFE0F','\\u{1F6B4}\\u{1F3FF}\\u200D\\u2642\\uFE0F','\\u{1F6B5}\\u200D\\u2640\\uFE0F','\\u{1F6B5}\\u200D\\u2642\\uFE0F','\\u{1F6B5}\\u{1F3FB}\\u200D\\u2640\\uFE0F','\\u{1F6B5}\\u{1F3FB}\\u200D\\u2642\\uFE0F','\\u{1F6B5}\\u{1F3FC}\\u200D\\u2640\\uFE0F','\\u{1F6B5}\\u{1F3FC}\\u200D\\u2642\\uFE0F','\\u{1F6B5}\\u{1F3FD}\\u200D\\u2640\\uFE0F','\\u{1F6B5}\\u{1F3FD}\\u200D\\u2642\\uFE0F','\\u{1F6B5}\\u{1F3FE}\\u200D\\u2640\\uFE0F','\\u{1F6B5}\\u{1F3FE}\\u200D\\u2642\\uFE0F','\\u{1F6B5}\\u{1F3FF}\\u200D\\u2640\\uFE0F','\\u{1F6B5}\\u{1F3FF}\\u200D\\u2642\\uFE0F','\\u{1F6B6}\\u200D\\u2640\\uFE0F','\\u{1F6B6}\\u200D\\u2640\\uFE0F\\u200D\\u27A1\\uFE0F','\\u{1F6B6}\\u200D\\u2642\\uFE0F','\\u{1F6B6}\\u200D\\u2642\\uFE0F\\u200D\\u27A1\\uFE0F','\\u{1F6B6}\\u{1F3FB}\\u200D\\u2640\\uFE0F','\\u{1F6B6}\\u{1F3FB}\\u200D\\u2640\\uFE0F\\u200D\\u27A1\\uFE0F','\\u{1F6B6}\\u{1F3FB}\\u200D\\u2642\\uFE0F','\\u{1F6B6}\\u{1F3FB}\\u200D\\u2642\\uFE0F\\u200D\\u27A1\\uFE0F','\\u{1F6B6}\\u{1F3FC}\\u200D\\u2640\\uFE0F','\\u{1F6B6}\\u{1F3FC}\\u200D\\u2640\\uFE0F\\u200D\\u27A1\\uFE0F','\\u{1F6B6}\\u{1F3FC}\\u200D\\u2642\\uFE0F','\\u{1F6B6}\\u{1F3FC}\\u200D\\u2642\\uFE0F\\u200D\\u27A1\\uFE0F','\\u{1F6B6}\\u{1F3FD}\\u200D\\u2640\\uFE0F','\\u{1F6B6}\\u{1F3FD}\\u200D\\u2640\\uFE0F\\u200D\\u27A1\\uFE0F','\\u{1F6B6}\\u{1F3FD}\\u200D\\u2642\\uFE0F','\\u{1F6B6}\\u{1F3FD}\\u200D\\u2642\\uFE0F\\u200D\\u27A1\\uFE0F','\\u{1F6B6}\\u{1F3FE}\\u200D\\u2640\\uFE0F','\\u{1F6B6}\\u{1F3FE}\\u200D\\u2640\\uFE0F\\u200D\\u27A1\\uFE0F','\\u{1F6B6}\\u{1F3FE}\\u200D\\u2642\\uFE0F','\\u{1F6B6}\\u{1F3FE}\\u200D\\u2642\\uFE0F\\u200D\\u27A1\\uFE0F','\\u{1F6B6}\\u{1F3FF}\\u200D\\u2640\\uFE0F','\\u{1F6B6}\\u{1F3FF}\\u200D\\u2640\\uFE0F\\u200D\\u27A1\\uFE0F','\\u{1F6B6}\\u{1F3FF}\\u200D\\u2642\\uFE0F','\\u{1F6B6}\\u{1F3FF}\\u200D\\u2642\\uFE0F\\u200D\\u27A1\\uFE0F','\\u{1F926}\\u200D\\u2640\\uFE0F','\\u{1F926}\\u200D\\u2642\\uFE0F','\\u{1F926}\\u{1F3FB}\\u200D\\u2640\\uFE0F','\\u{1F926}\\u{1F3FB}\\u200D\\u2642\\uFE0F','\\u{1F926}\\u{1F3FC}\\u200D\\u2640\\uFE0F','\\u{1F926}\\u{1F3FC}\\u200D\\u2642\\uFE0F','\\u{1F926}\\u{1F3FD}\\u200D\\u2640\\uFE0F','\\u{1F926}\\u{1F3FD}\\u200D\\u2642\\uFE0F','\\u{1F926}\\u{1F3FE}\\u200D\\u2640\\uFE0F','\\u{1F926}\\u{1F3FE}\\u200D\\u2642\\uFE0F','\\u{1F926}\\u{1F3FF}\\u200D\\u2640\\uFE0F','\\u{1F926}\\u{1F3FF}\\u200D\\u2642\\uFE0F','\\u{1F935}\\u200D\\u2640\\uFE0F','\\u{1F935}\\u200D\\u2642\\uFE0F','\\u{1F935}\\u{1F3FB}\\u200D\\u2640\\uFE0F','\\u{1F935}\\u{1F3FB}\\u200D\\u2642\\uFE0F','\\u{1F935}\\u{1F3FC}\\u200D\\u2640\\uFE0F','\\u{1F935}\\u{1F3FC}\\u200D\\u2642\\uFE0F','\\u{1F935}\\u{1F3FD}\\u200D\\u2640\\uFE0F','\\u{1F935}\\u{1F3FD}\\u200D\\u2642\\uFE0F','\\u{1F935}\\u{1F3FE}\\u200D\\u2640\\uFE0F','\\u{1F935}\\u{1F3FE}\\u200D\\u2642\\uFE0F','\\u{1F935}\\u{1F3FF}\\u200D\\u2640\\uFE0F','\\u{1F935}\\u{1F3FF}\\u200D\\u2642\\uFE0F','\\u{1F937}\\u200D\\u2640\\uFE0F','\\u{1F937}\\u200D\\u2642\\uFE0F','\\u{1F937}\\u{1F3FB}\\u200D\\u2640\\uFE0F','\\u{1F937}\\u{1F3FB}\\u200D\\u2642\\uFE0F','\\u{1F937}\\u{1F3FC}\\u200D\\u2640\\uFE0F','\\u{1F937}\\u{1F3FC}\\u200D\\u2642\\uFE0F','\\u{1F937}\\u{1F3FD}\\u200D\\u2640\\uFE0F','\\u{1F937}\\u{1F3FD}\\u200D\\u2642\\uFE0F','\\u{1F937}\\u{1F3FE}\\u200D\\u2640\\uFE0F','\\u{1F937}\\u{1F3FE}\\u200D\\u2642\\uFE0F','\\u{1F937}\\u{1F3FF}\\u200D\\u2640\\uFE0F','\\u{1F937}\\u{1F3FF}\\u200D\\u2642\\uFE0F','\\u{1F938}\\u200D\\u2640\\uFE0F','\\u{1F938}\\u200D\\u2642\\uFE0F','\\u{1F938}\\u{1F3FB}\\u200D\\u2640\\uFE0F','\\u{1F938}\\u{1F3FB}\\u200D\\u2642\\uFE0F','\\u{1F938}\\u{1F3FC}\\u200D\\u2640\\uFE0F','\\u{1F938}\\u{1F3FC}\\u200D\\u2642\\uFE0F','\\u{1F938}\\u{1F3FD}\\u200D\\u2640\\uFE0F','\\u{1F938}\\u{1F3FD}\\u200D\\u2642\\uFE0F','\\u{1F938}\\u{1F3FE}\\u200D\\u2640\\uFE0F','\\u{1F938}\\u{1F3FE}\\u200D\\u2642\\uFE0F','\\u{1F938}\\u{1F3FF}\\u200D\\u2640\\uFE0F','\\u{1F938}\\u{1F3FF}\\u200D\\u2642\\uFE0F','\\u{1F939}\\u200D\\u2640\\uFE0F','\\u{1F939}\\u200D\\u2642\\uFE0F','\\u{1F939}\\u{1F3FB}\\u200D\\u2640\\uFE0F','\\u{1F939}\\u{1F3FB}\\u200D\\u2642\\uFE0F','\\u{1F939}\\u{1F3FC}\\u200D\\u2640\\uFE0F','\\u{1F939}\\u{1F3FC}\\u200D\\u2642\\uFE0F','\\u{1F939}\\u{1F3FD}\\u200D\\u2640\\uFE0F','\\u{1F939}\\u{1F3FD}\\u200D\\u2642\\uFE0F','\\u{1F939}\\u{1F3FE}\\u200D\\u2640\\uFE0F','\\u{1F939}\\u{1F3FE}\\u200D\\u2642\\uFE0F','\\u{1F939}\\u{1F3FF}\\u200D\\u2640\\uFE0F','\\u{1F939}\\u{1F3FF}\\u200D\\u2642\\uFE0F','\\u{1F93C}\\u200D\\u2640\\uFE0F','\\u{1F93C}\\u200D\\u2642\\uFE0F','\\u{1F93D}\\u200D\\u2640\\uFE0F','\\u{1F93D}\\u200D\\u2642\\uFE0F','\\u{1F93D}\\u{1F3FB}\\u200D\\u2640\\uFE0F','\\u{1F93D}\\u{1F3FB}\\u200D\\u2642\\uFE0F','\\u{1F93D}\\u{1F3FC}\\u200D\\u2640\\uFE0F','\\u{1F93D}\\u{1F3FC}\\u200D\\u2642\\uFE0F','\\u{1F93D}\\u{1F3FD}\\u200D\\u2640\\uFE0F','\\u{1F93D}\\u{1F3FD}\\u200D\\u2642\\uFE0F','\\u{1F93D}\\u{1F3FE}\\u200D\\u2640\\uFE0F','\\u{1F93D}\\u{1F3FE}\\u200D\\u2642\\uFE0F','\\u{1F93D}\\u{1F3FF}\\u200D\\u2640\\uFE0F','\\u{1F93D}\\u{1F3FF}\\u200D\\u2642\\uFE0F','\\u{1F93E}\\u200D\\u2640\\uFE0F','\\u{1F93E}\\u200D\\u2642\\uFE0F','\\u{1F93E}\\u{1F3FB}\\u200D\\u2640\\uFE0F','\\u{1F93E}\\u{1F3FB}\\u200D\\u2642\\uFE0F','\\u{1F93E}\\u{1F3FC}\\u200D\\u2640\\uFE0F','\\u{1F93E}\\u{1F3FC}\\u200D\\u2642\\uFE0F','\\u{1F93E}\\u{1F3FD}\\u200D\\u2640\\uFE0F','\\u{1F93E}\\u{1F3FD}\\u200D\\u2642\\uFE0F','\\u{1F93E}\\u{1F3FE}\\u200D\\u2640\\uFE0F','\\u{1F93E}\\u{1F3FE}\\u200D\\u2642\\uFE0F','\\u{1F93E}\\u{1F3FF}\\u200D\\u2640\\uFE0F','\\u{1F93E}\\u{1F3FF}\\u200D\\u2642\\uFE0F','\\u{1F9B8}\\u200D\\u2640\\uFE0F','\\u{1F9B8}\\u200D\\u2642\\uFE0F','\\u{1F9B8}\\u{1F3FB}\\u200D\\u2640\\uFE0F','\\u{1F9B8}\\u{1F3FB}\\u200D\\u2642\\uFE0F','\\u{1F9B8}\\u{1F3FC}\\u200D\\u2640\\uFE0F','\\u{1F9B8}\\u{1F3FC}\\u200D\\u2642\\uFE0F','\\u{1F9B8}\\u{1F3FD}\\u200D\\u2640\\uFE0F','\\u{1F9B8}\\u{1F3FD}\\u200D\\u2642\\uFE0F','\\u{1F9B8}\\u{1F3FE}\\u200D\\u2640\\uFE0F','\\u{1F9B8}\\u{1F3FE}\\u200D\\u2642\\uFE0F','\\u{1F9B8}\\u{1F3FF}\\u200D\\u2640\\uFE0F','\\u{1F9B8}\\u{1F3FF}\\u200D\\u2642\\uFE0F','\\u{1F9B9}\\u200D\\u2640\\uFE0F','\\u{1F9B9}\\u200D\\u2642\\uFE0F','\\u{1F9B9}\\u{1F3FB}\\u200D\\u2640\\uFE0F','\\u{1F9B9}\\u{1F3FB}\\u200D\\u2642\\uFE0F','\\u{1F9B9}\\u{1F3FC}\\u200D\\u2640\\uFE0F','\\u{1F9B9}\\u{1F3FC}\\u200D\\u2642\\uFE0F','\\u{1F9B9}\\u{1F3FD}\\u200D\\u2640\\uFE0F','\\u{1F9B9}\\u{1F3FD}\\u200D\\u2642\\uFE0F','\\u{1F9B9}\\u{1F3FE}\\u200D\\u2640\\uFE0F','\\u{1F9B9}\\u{1F3FE}\\u200D\\u2642\\uFE0F','\\u{1F9B9}\\u{1F3FF}\\u200D\\u2640\\uFE0F','\\u{1F9B9}\\u{1F3FF}\\u200D\\u2642\\uFE0F','\\u{1F9CD}\\u200D\\u2640\\uFE0F','\\u{1F9CD}\\u200D\\u2642\\uFE0F','\\u{1F9CD}\\u{1F3FB}\\u200D\\u2640\\uFE0F','\\u{1F9CD}\\u{1F3FB}\\u200D\\u2642\\uFE0F','\\u{1F9CD}\\u{1F3FC}\\u200D\\u2640\\uFE0F','\\u{1F9CD}\\u{1F3FC}\\u200D\\u2642\\uFE0F','\\u{1F9CD}\\u{1F3FD}\\u200D\\u2640\\uFE0F','\\u{1F9CD}\\u{1F3FD}\\u200D\\u2642\\uFE0F','\\u{1F9CD}\\u{1F3FE}\\u200D\\u2640\\uFE0F','\\u{1F9CD}\\u{1F3FE}\\u200D\\u2642\\uFE0F','\\u{1F9CD}\\u{1F3FF}\\u200D\\u2640\\uFE0F','\\u{1F9CD}\\u{1F3FF}\\u200D\\u2642\\uFE0F','\\u{1F9CE}\\u200D\\u2640\\uFE0F','\\u{1F9CE}\\u200D\\u2640\\uFE0F\\u200D\\u27A1\\uFE0F','\\u{1F9CE}\\u200D\\u2642\\uFE0F','\\u{1F9CE}\\u200D\\u2642\\uFE0F\\u200D\\u27A1\\uFE0F','\\u{1F9CE}\\u{1F3FB}\\u200D\\u2640\\uFE0F','\\u{1F9CE}\\u{1F3FB}\\u200D\\u2640\\uFE0F\\u200D\\u27A1\\uFE0F','\\u{1F9CE}\\u{1F3FB}\\u200D\\u2642\\uFE0F','\\u{1F9CE}\\u{1F3FB}\\u200D\\u2642\\uFE0F\\u200D\\u27A1\\uFE0F','\\u{1F9CE}\\u{1F3FC}\\u200D\\u2640\\uFE0F','\\u{1F9CE}\\u{1F3FC}\\u200D\\u2640\\uFE0F\\u200D\\u27A1\\uFE0F','\\u{1F9CE}\\u{1F3FC}\\u200D\\u2642\\uFE0F','\\u{1F9CE}\\u{1F3FC}\\u200D\\u2642\\uFE0F\\u200D\\u27A1\\uFE0F','\\u{1F9CE}\\u{1F3FD}\\u200D\\u2640\\uFE0F','\\u{1F9CE}\\u{1F3FD}\\u200D\\u2640\\uFE0F\\u200D\\u27A1\\uFE0F','\\u{1F9CE}\\u{1F3FD}\\u200D\\u2642\\uFE0F','\\u{1F9CE}\\u{1F3FD}\\u200D\\u2642\\uFE0F\\u200D\\u27A1\\uFE0F','\\u{1F9CE}\\u{1F3FE}\\u200D\\u2640\\uFE0F','\\u{1F9CE}\\u{1F3FE}\\u200D\\u2640\\uFE0F\\u200D\\u27A1\\uFE0F','\\u{1F9CE}\\u{1F3FE}\\u200D\\u2642\\uFE0F','\\u{1F9CE}\\u{1F3FE}\\u200D\\u2642\\uFE0F\\u200D\\u27A1\\uFE0F','\\u{1F9CE}\\u{1F3FF}\\u200D\\u2640\\uFE0F','\\u{1F9CE}\\u{1F3FF}\\u200D\\u2640\\uFE0F\\u200D\\u27A1\\uFE0F','\\u{1F9CE}\\u{1F3FF}\\u200D\\u2642\\uFE0F','\\u{1F9CE}\\u{1F3FF}\\u200D\\u2642\\uFE0F\\u200D\\u27A1\\uFE0F','\\u{1F9CF}\\u200D\\u2640\\uFE0F','\\u{1F9CF}\\u200D\\u2642\\uFE0F','\\u{1F9CF}\\u{1F3FB}\\u200D\\u2640\\uFE0F','\\u{1F9CF}\\u{1F3FB}\\u200D\\u2642\\uFE0F','\\u{1F9CF}\\u{1F3FC}\\u200D\\u2640\\uFE0F','\\u{1F9CF}\\u{1F3FC}\\u200D\\u2642\\uFE0F','\\u{1F9CF}\\u{1F3FD}\\u200D\\u2640\\uFE0F','\\u{1F9CF}\\u{1F3FD}\\u200D\\u2642\\uFE0F','\\u{1F9CF}\\u{1F3FE}\\u200D\\u2640\\uFE0F','\\u{1F9CF}\\u{1F3FE}\\u200D\\u2642\\uFE0F','\\u{1F9CF}\\u{1F3FF}\\u200D\\u2640\\uFE0F','\\u{1F9CF}\\u{1F3FF}\\u200D\\u2642\\uFE0F','\\u{1F9D4}\\u200D\\u2640\\uFE0F','\\u{1F9D4}\\u200D\\u2642\\uFE0F','\\u{1F9D4}\\u{1F3FB}\\u200D\\u2640\\uFE0F','\\u{1F9D4}\\u{1F3FB}\\u200D\\u2642\\uFE0F','\\u{1F9D4}\\u{1F3FC}\\u200D\\u2640\\uFE0F','\\u{1F9D4}\\u{1F3FC}\\u200D\\u2642\\uFE0F','\\u{1F9D4}\\u{1F3FD}\\u200D\\u2640\\uFE0F','\\u{1F9D4}\\u{1F3FD}\\u200D\\u2642\\uFE0F','\\u{1F9D4}\\u{1F3FE}\\u200D\\u2640\\uFE0F','\\u{1F9D4}\\u{1F3FE}\\u200D\\u2642\\uFE0F','\\u{1F9D4}\\u{1F3FF}\\u200D\\u2640\\uFE0F','\\u{1F9D4}\\u{1F3FF}\\u200D\\u2642\\uFE0F','\\u{1F9D6}\\u200D\\u2640\\uFE0F','\\u{1F9D6}\\u200D\\u2642\\uFE0F','\\u{1F9D6}\\u{1F3FB}\\u200D\\u2640\\uFE0F','\\u{1F9D6}\\u{1F3FB}\\u200D\\u2642\\uFE0F','\\u{1F9D6}\\u{1F3FC}\\u200D\\u2640\\uFE0F','\\u{1F9D6}\\u{1F3FC}\\u200D\\u2642\\uFE0F','\\u{1F9D6}\\u{1F3FD}\\u200D\\u2640\\uFE0F','\\u{1F9D6}\\u{1F3FD}\\u200D\\u2642\\uFE0F','\\u{1F9D6}\\u{1F3FE}\\u200D\\u2640\\uFE0F','\\u{1F9D6}\\u{1F3FE}\\u200D\\u2642\\uFE0F','\\u{1F9D6}\\u{1F3FF}\\u200D\\u2640\\uFE0F','\\u{1F9D6}\\u{1F3FF}\\u200D\\u2642\\uFE0F','\\u{1F9D7}\\u200D\\u2640\\uFE0F','\\u{1F9D7}\\u200D\\u2642\\uFE0F','\\u{1F9D7}\\u{1F3FB}\\u200D\\u2640\\uFE0F','\\u{1F9D7}\\u{1F3FB}\\u200D\\u2642\\uFE0F','\\u{1F9D7}\\u{1F3FC}\\u200D\\u2640\\uFE0F','\\u{1F9D7}\\u{1F3FC}\\u200D\\u2642\\uFE0F','\\u{1F9D7}\\u{1F3FD}\\u200D\\u2640\\uFE0F','\\u{1F9D7}\\u{1F3FD}\\u200D\\u2642\\uFE0F','\\u{1F9D7}\\u{1F3FE}\\u200D\\u2640\\uFE0F','\\u{1F9D7}\\u{1F3FE}\\u200D\\u2642\\uFE0F','\\u{1F9D7}\\u{1F3FF}\\u200D\\u2640\\uFE0F','\\u{1F9D7}\\u{1F3FF}\\u200D\\u2642\\uFE0F','\\u{1F9D8}\\u200D\\u2640\\uFE0F','\\u{1F9D8}\\u200D\\u2642\\uFE0F','\\u{1F9D8}\\u{1F3FB}\\u200D\\u2640\\uFE0F','\\u{1F9D8}\\u{1F3FB}\\u200D\\u2642\\uFE0F','\\u{1F9D8}\\u{1F3FC}\\u200D\\u2640\\uFE0F','\\u{1F9D8}\\u{1F3FC}\\u200D\\u2642\\uFE0F','\\u{1F9D8}\\u{1F3FD}\\u200D\\u2640\\uFE0F','\\u{1F9D8}\\u{1F3FD}\\u200D\\u2642\\uFE0F','\\u{1F9D8}\\u{1F3FE}\\u200D\\u2640\\uFE0F','\\u{1F9D8}\\u{1F3FE}\\u200D\\u2642\\uFE0F','\\u{1F9D8}\\u{1F3FF}\\u200D\\u2640\\uFE0F','\\u{1F9D8}\\u{1F3FF}\\u200D\\u2642\\uFE0F','\\u{1F9D9}\\u200D\\u2640\\uFE0F','\\u{1F9D9}\\u200D\\u2642\\uFE0F','\\u{1F9D9}\\u{1F3FB}\\u200D\\u2640\\uFE0F','\\u{1F9D9}\\u{1F3FB}\\u200D\\u2642\\uFE0F','\\u{1F9D9}\\u{1F3FC}\\u200D\\u2640\\uFE0F','\\u{1F9D9}\\u{1F3FC}\\u200D\\u2642\\uFE0F','\\u{1F9D9}\\u{1F3FD}\\u200D\\u2640\\uFE0F','\\u{1F9D9}\\u{1F3FD}\\u200D\\u2642\\uFE0F','\\u{1F9D9}\\u{1F3FE}\\u200D\\u2640\\uFE0F','\\u{1F9D9}\\u{1F3FE}\\u200D\\u2642\\uFE0F','\\u{1F9D9}\\u{1F3FF}\\u200D\\u2640\\uFE0F','\\u{1F9D9}\\u{1F3FF}\\u200D\\u2642\\uFE0F','\\u{1F9DA}\\u200D\\u2640\\uFE0F','\\u{1F9DA}\\u200D\\u2642\\uFE0F','\\u{1F9DA}\\u{1F3FB}\\u200D\\u2640\\uFE0F','\\u{1F9DA}\\u{1F3FB}\\u200D\\u2642\\uFE0F','\\u{1F9DA}\\u{1F3FC}\\u200D\\u2640\\uFE0F','\\u{1F9DA}\\u{1F3FC}\\u200D\\u2642\\uFE0F','\\u{1F9DA}\\u{1F3FD}\\u200D\\u2640\\uFE0F','\\u{1F9DA}\\u{1F3FD}\\u200D\\u2642\\uFE0F','\\u{1F9DA}\\u{1F3FE}\\u200D\\u2640\\uFE0F','\\u{1F9DA}\\u{1F3FE}\\u200D\\u2642\\uFE0F','\\u{1F9DA}\\u{1F3FF}\\u200D\\u2640\\uFE0F','\\u{1F9DA}\\u{1F3FF}\\u200D\\u2642\\uFE0F','\\u{1F9DB}\\u200D\\u2640\\uFE0F','\\u{1F9DB}\\u200D\\u2642\\uFE0F','\\u{1F9DB}\\u{1F3FB}\\u200D\\u2640\\uFE0F','\\u{1F9DB}\\u{1F3FB}\\u200D\\u2642\\uFE0F','\\u{1F9DB}\\u{1F3FC}\\u200D\\u2640\\uFE0F','\\u{1F9DB}\\u{1F3FC}\\u200D\\u2642\\uFE0F','\\u{1F9DB}\\u{1F3FD}\\u200D\\u2640\\uFE0F','\\u{1F9DB}\\u{1F3FD}\\u200D\\u2642\\uFE0F','\\u{1F9DB}\\u{1F3FE}\\u200D\\u2640\\uFE0F','\\u{1F9DB}\\u{1F3FE}\\u200D\\u2642\\uFE0F','\\u{1F9DB}\\u{1F3FF}\\u200D\\u2640\\uFE0F','\\u{1F9DB}\\u{1F3FF}\\u200D\\u2642\\uFE0F','\\u{1F9DC}\\u200D\\u2640\\uFE0F','\\u{1F9DC}\\u200D\\u2642\\uFE0F','\\u{1F9DC}\\u{1F3FB}\\u200D\\u2640\\uFE0F','\\u{1F9DC}\\u{1F3FB}\\u200D\\u2642\\uFE0F','\\u{1F9DC}\\u{1F3FC}\\u200D\\u2640\\uFE0F','\\u{1F9DC}\\u{1F3FC}\\u200D\\u2642\\uFE0F','\\u{1F9DC}\\u{1F3FD}\\u200D\\u2640\\uFE0F','\\u{1F9DC}\\u{1F3FD}\\u200D\\u2642\\uFE0F','\\u{1F9DC}\\u{1F3FE}\\u200D\\u2640\\uFE0F','\\u{1F9DC}\\u{1F3FE}\\u200D\\u2642\\uFE0F','\\u{1F9DC}\\u{1F3FF}\\u200D\\u2640\\uFE0F','\\u{1F9DC}\\u{1F3FF}\\u200D\\u2642\\uFE0F','\\u{1F9DD}\\u200D\\u2640\\uFE0F','\\u{1F9DD}\\u200D\\u2642\\uFE0F','\\u{1F9DD}\\u{1F3FB}\\u200D\\u2640\\uFE0F','\\u{1F9DD}\\u{1F3FB}\\u200D\\u2642\\uFE0F','\\u{1F9DD}\\u{1F3FC}\\u200D\\u2640\\uFE0F','\\u{1F9DD}\\u{1F3FC}\\u200D\\u2642\\uFE0F','\\u{1F9DD}\\u{1F3FD}\\u200D\\u2640\\uFE0F','\\u{1F9DD}\\u{1F3FD}\\u200D\\u2642\\uFE0F','\\u{1F9DD}\\u{1F3FE}\\u200D\\u2640\\uFE0F','\\u{1F9DD}\\u{1F3FE}\\u200D\\u2642\\uFE0F','\\u{1F9DD}\\u{1F3FF}\\u200D\\u2640\\uFE0F','\\u{1F9DD}\\u{1F3FF}\\u200D\\u2642\\uFE0F','\\u{1F9DE}\\u200D\\u2640\\uFE0F','\\u{1F9DE}\\u200D\\u2642\\uFE0F','\\u{1F9DF}\\u200D\\u2640\\uFE0F','\\u{1F9DF}\\u200D\\u2642\\uFE0F','\\u{1F468}\\u200D\\u{1F9B0}','\\u{1F468}\\u200D\\u{1F9B1}','\\u{1F468}\\u200D\\u{1F9B2}','\\u{1F468}\\u200D\\u{1F9B3}','\\u{1F468}\\u{1F3FB}\\u200D\\u{1F9B0}','\\u{1F468}\\u{1F3FB}\\u200D\\u{1F9B1}','\\u{1F468}\\u{1F3FB}\\u200D\\u{1F9B2}','\\u{1F468}\\u{1F3FB}\\u200D\\u{1F9B3}','\\u{1F468}\\u{1F3FC}\\u200D\\u{1F9B0}','\\u{1F468}\\u{1F3FC}\\u200D\\u{1F9B1}','\\u{1F468}\\u{1F3FC}\\u200D\\u{1F9B2}','\\u{1F468}\\u{1F3FC}\\u200D\\u{1F9B3}','\\u{1F468}\\u{1F3FD}\\u200D\\u{1F9B0}','\\u{1F468}\\u{1F3FD}\\u200D\\u{1F9B1}','\\u{1F468}\\u{1F3FD}\\u200D\\u{1F9B2}','\\u{1F468}\\u{1F3FD}\\u200D\\u{1F9B3}','\\u{1F468}\\u{1F3FE}\\u200D\\u{1F9B0}','\\u{1F468}\\u{1F3FE}\\u200D\\u{1F9B1}','\\u{1F468}\\u{1F3FE}\\u200D\\u{1F9B2}','\\u{1F468}\\u{1F3FE}\\u200D\\u{1F9B3}','\\u{1F468}\\u{1F3FF}\\u200D\\u{1F9B0}','\\u{1F468}\\u{1F3FF}\\u200D\\u{1F9B1}','\\u{1F468}\\u{1F3FF}\\u200D\\u{1F9B2}','\\u{1F468}\\u{1F3FF}\\u200D\\u{1F9B3}','\\u{1F469}\\u200D\\u{1F9B0}','\\u{1F469}\\u200D\\u{1F9B1}','\\u{1F469}\\u200D\\u{1F9B2}','\\u{1F469}\\u200D\\u{1F9B3}','\\u{1F469}\\u{1F3FB}\\u200D\\u{1F9B0}','\\u{1F469}\\u{1F3FB}\\u200D\\u{1F9B1}','\\u{1F469}\\u{1F3FB}\\u200D\\u{1F9B2}','\\u{1F469}\\u{1F3FB}\\u200D\\u{1F9B3}','\\u{1F469}\\u{1F3FC}\\u200D\\u{1F9B0}','\\u{1F469}\\u{1F3FC}\\u200D\\u{1F9B1}','\\u{1F469}\\u{1F3FC}\\u200D\\u{1F9B2}','\\u{1F469}\\u{1F3FC}\\u200D\\u{1F9B3}','\\u{1F469}\\u{1F3FD}\\u200D\\u{1F9B0}','\\u{1F469}\\u{1F3FD}\\u200D\\u{1F9B1}','\\u{1F469}\\u{1F3FD}\\u200D\\u{1F9B2}','\\u{1F469}\\u{1F3FD}\\u200D\\u{1F9B3}','\\u{1F469}\\u{1F3FE}\\u200D\\u{1F9B0}','\\u{1F469}\\u{1F3FE}\\u200D\\u{1F9B1}','\\u{1F469}\\u{1F3FE}\\u200D\\u{1F9B2}','\\u{1F469}\\u{1F3FE}\\u200D\\u{1F9B3}','\\u{1F469}\\u{1F3FF}\\u200D\\u{1F9B0}','\\u{1F469}\\u{1F3FF}\\u200D\\u{1F9B1}','\\u{1F469}\\u{1F3FF}\\u200D\\u{1F9B2}','\\u{1F469}\\u{1F3FF}\\u200D\\u{1F9B3}','\\u{1F9D1}\\u200D\\u{1F9B0}','\\u{1F9D1}\\u200D\\u{1F9B1}','\\u{1F9D1}\\u200D\\u{1F9B2}','\\u{1F9D1}\\u200D\\u{1F9B3}','\\u{1F9D1}\\u{1F3FB}\\u200D\\u{1F9B0}','\\u{1F9D1}\\u{1F3FB}\\u200D\\u{1F9B1}','\\u{1F9D1}\\u{1F3FB}\\u200D\\u{1F9B2}','\\u{1F9D1}\\u{1F3FB}\\u200D\\u{1F9B3}','\\u{1F9D1}\\u{1F3FC}\\u200D\\u{1F9B0}','\\u{1F9D1}\\u{1F3FC}\\u200D\\u{1F9B1}','\\u{1F9D1}\\u{1F3FC}\\u200D\\u{1F9B2}','\\u{1F9D1}\\u{1F3FC}\\u200D\\u{1F9B3}','\\u{1F9D1}\\u{1F3FD}\\u200D\\u{1F9B0}','\\u{1F9D1}\\u{1F3FD}\\u200D\\u{1F9B1}','\\u{1F9D1}\\u{1F3FD}\\u200D\\u{1F9B2}','\\u{1F9D1}\\u{1F3FD}\\u200D\\u{1F9B3}','\\u{1F9D1}\\u{1F3FE}\\u200D\\u{1F9B0}','\\u{1F9D1}\\u{1F3FE}\\u200D\\u{1F9B1}','\\u{1F9D1}\\u{1F3FE}\\u200D\\u{1F9B2}','\\u{1F9D1}\\u{1F3FE}\\u200D\\u{1F9B3}','\\u{1F9D1}\\u{1F3FF}\\u200D\\u{1F9B0}','\\u{1F9D1}\\u{1F3FF}\\u200D\\u{1F9B1}','\\u{1F9D1}\\u{1F3FF}\\u200D\\u{1F9B2}','\\u{1F9D1}\\u{1F3FF}\\u200D\\u{1F9B3}','\\u26D3\\uFE0F\\u200D\\u{1F4A5}','\\u2764\\uFE0F\\u200D\\u{1F525}','\\u2764\\uFE0F\\u200D\\u{1FA79}','\\u{1F344}\\u200D\\u{1F7EB}','\\u{1F34B}\\u200D\\u{1F7E9}','\\u{1F3F3}\\uFE0F\\u200D\\u26A7\\uFE0F','\\u{1F3F3}\\uFE0F\\u200D\\u{1F308}','\\u{1F3F4}\\u200D\\u2620\\uFE0F','\\u{1F408}\\u200D\\u2B1B','\\u{1F415}\\u200D\\u{1F9BA}','\\u{1F426}\\u200D\\u2B1B','\\u{1F426}\\u200D\\u{1F525}','\\u{1F43B}\\u200D\\u2744\\uFE0F','\\u{1F441}\\uFE0F\\u200D\\u{1F5E8}\\uFE0F','\\u{1F62E}\\u200D\\u{1F4A8}','\\u{1F635}\\u200D\\u{1F4AB}','\\u{1F636}\\u200D\\u{1F32B}\\uFE0F','\\u{1F642}\\u200D\\u2194\\uFE0F','\\u{1F642}\\u200D\\u2195\\uFE0F'];\n","const set = require('regenerate')(0x23F0, 0x23F3, 0x267F, 0x2693, 0x26A1, 0x26CE, 0x26D4, 0x26EA, 0x26F5, 0x26FA, 0x26FD, 0x2705, 0x2728, 0x274C, 0x274E, 0x2757, 0x27B0, 0x27BF, 0x2B50, 0x2B55, 0x1F004, 0x1F0CF, 0x1F18E, 0x1F201, 0x1F21A, 0x1F22F, 0x1F3F4, 0x1F440, 0x1F57A, 0x1F5A4, 0x1F6CC, 0x1F7F0);\nset.addRange(0x231A, 0x231B).addRange(0x23E9, 0x23EC).addRange(0x25FD, 0x25FE).addRange(0x2614, 0x2615).addRange(0x2648, 0x2653).addRange(0x26AA, 0x26AB).addRange(0x26BD, 0x26BE).addRange(0x26C4, 0x26C5).addRange(0x26F2, 0x26F3).addRange(0x270A, 0x270B).addRange(0x2753, 0x2755).addRange(0x2795, 0x2797).addRange(0x2B1B, 0x2B1C).addRange(0x1F191, 0x1F19A).addRange(0x1F232, 0x1F236).addRange(0x1F238, 0x1F23A).addRange(0x1F250, 0x1F251).addRange(0x1F300, 0x1F320).addRange(0x1F32D, 0x1F335).addRange(0x1F337, 0x1F37C).addRange(0x1F37E, 0x1F393).addRange(0x1F3A0, 0x1F3CA).addRange(0x1F3CF, 0x1F3D3).addRange(0x1F3E0, 0x1F3F0).addRange(0x1F3F8, 0x1F43E).addRange(0x1F442, 0x1F4FC).addRange(0x1F4FF, 0x1F53D).addRange(0x1F54B, 0x1F54E).addRange(0x1F550, 0x1F567).addRange(0x1F595, 0x1F596).addRange(0x1F5FB, 0x1F64F).addRange(0x1F680, 0x1F6C5).addRange(0x1F6D0, 0x1F6D2).addRange(0x1F6D5, 0x1F6D7).addRange(0x1F6DC, 0x1F6DF).addRange(0x1F6EB, 0x1F6EC).addRange(0x1F6F4, 0x1F6FC).addRange(0x1F7E0, 0x1F7EB).addRange(0x1F90C, 0x1F93A).addRange(0x1F93C, 0x1F945).addRange(0x1F947, 0x1F9FF).addRange(0x1FA70, 0x1FA7C).addRange(0x1FA80, 0x1FA88).addRange(0x1FA90, 0x1FABD).addRange(0x1FABF, 0x1FAC5).addRange(0x1FACE, 0x1FADB).addRange(0x1FAE0, 0x1FAE8).addRange(0x1FAF0, 0x1FAF8);\nexports.characters = set;\nexports.strings = ['#\\uFE0F\\u20E3','*\\uFE0F\\u20E3','0\\uFE0F\\u20E3','1\\uFE0F\\u20E3','2\\uFE0F\\u20E3','3\\uFE0F\\u20E3','4\\uFE0F\\u20E3','5\\uFE0F\\u20E3','6\\uFE0F\\u20E3','7\\uFE0F\\u20E3','8\\uFE0F\\u20E3','9\\uFE0F\\u20E3','\\xA9\\uFE0F','\\xAE\\uFE0F','\\u203C\\uFE0F','\\u2049\\uFE0F','\\u2122\\uFE0F','\\u2139\\uFE0F','\\u2194\\uFE0F','\\u2195\\uFE0F','\\u2196\\uFE0F','\\u2197\\uFE0F','\\u2198\\uFE0F','\\u2199\\uFE0F','\\u21A9\\uFE0F','\\u21AA\\uFE0F','\\u2328\\uFE0F','\\u23CF\\uFE0F','\\u23ED\\uFE0F','\\u23EE\\uFE0F','\\u23EF\\uFE0F','\\u23F1\\uFE0F','\\u23F2\\uFE0F','\\u23F8\\uFE0F','\\u23F9\\uFE0F','\\u23FA\\uFE0F','\\u24C2\\uFE0F','\\u25AA\\uFE0F','\\u25AB\\uFE0F','\\u25B6\\uFE0F','\\u25C0\\uFE0F','\\u25FB\\uFE0F','\\u25FC\\uFE0F','\\u2600\\uFE0F','\\u2601\\uFE0F','\\u2602\\uFE0F','\\u2603\\uFE0F','\\u2604\\uFE0F','\\u260E\\uFE0F','\\u2611\\uFE0F','\\u2618\\uFE0F','\\u261D\\u{1F3FB}','\\u261D\\u{1F3FC}','\\u261D\\u{1F3FD}','\\u261D\\u{1F3FE}','\\u261D\\u{1F3FF}','\\u261D\\uFE0F','\\u2620\\uFE0F','\\u2622\\uFE0F','\\u2623\\uFE0F','\\u2626\\uFE0F','\\u262A\\uFE0F','\\u262E\\uFE0F','\\u262F\\uFE0F','\\u2638\\uFE0F','\\u2639\\uFE0F','\\u263A\\uFE0F','\\u2640\\uFE0F','\\u2642\\uFE0F','\\u265F\\uFE0F','\\u2660\\uFE0F','\\u2663\\uFE0F','\\u2665\\uFE0F','\\u2666\\uFE0F','\\u2668\\uFE0F','\\u267B\\uFE0F','\\u267E\\uFE0F','\\u2692\\uFE0F','\\u2694\\uFE0F','\\u2695\\uFE0F','\\u2696\\uFE0F','\\u2697\\uFE0F','\\u2699\\uFE0F','\\u269B\\uFE0F','\\u269C\\uFE0F','\\u26A0\\uFE0F','\\u26A7\\uFE0F','\\u26B0\\uFE0F','\\u26B1\\uFE0F','\\u26C8\\uFE0F','\\u26CF\\uFE0F','\\u26D1\\uFE0F','\\u26D3\\uFE0F','\\u26D3\\uFE0F\\u200D\\u{1F4A5}','\\u26E9\\uFE0F','\\u26F0\\uFE0F','\\u26F1\\uFE0F','\\u26F4\\uFE0F','\\u26F7\\uFE0F','\\u26F8\\uFE0F','\\u26F9\\u{1F3FB}','\\u26F9\\u{1F3FB}\\u200D\\u2640\\uFE0F','\\u26F9\\u{1F3FB}\\u200D\\u2642\\uFE0F','\\u26F9\\u{1F3FC}','\\u26F9\\u{1F3FC}\\u200D\\u2640\\uFE0F','\\u26F9\\u{1F3FC}\\u200D\\u2642\\uFE0F','\\u26F9\\u{1F3FD}','\\u26F9\\u{1F3FD}\\u200D\\u2640\\uFE0F','\\u26F9\\u{1F3FD}\\u200D\\u2642\\uFE0F','\\u26F9\\u{1F3FE}','\\u26F9\\u{1F3FE}\\u200D\\u2640\\uFE0F','\\u26F9\\u{1F3FE}\\u200D\\u2642\\uFE0F','\\u26F9\\u{1F3FF}','\\u26F9\\u{1F3FF}\\u200D\\u2640\\uFE0F','\\u26F9\\u{1F3FF}\\u200D\\u2642\\uFE0F','\\u26F9\\uFE0F','\\u26F9\\uFE0F\\u200D\\u2640\\uFE0F','\\u26F9\\uFE0F\\u200D\\u2642\\uFE0F','\\u2702\\uFE0F','\\u2708\\uFE0F','\\u2709\\uFE0F','\\u270A\\u{1F3FB}','\\u270A\\u{1F3FC}','\\u270A\\u{1F3FD}','\\u270A\\u{1F3FE}','\\u270A\\u{1F3FF}','\\u270B\\u{1F3FB}','\\u270B\\u{1F3FC}','\\u270B\\u{1F3FD}','\\u270B\\u{1F3FE}','\\u270B\\u{1F3FF}','\\u270C\\u{1F3FB}','\\u270C\\u{1F3FC}','\\u270C\\u{1F3FD}','\\u270C\\u{1F3FE}','\\u270C\\u{1F3FF}','\\u270C\\uFE0F','\\u270D\\u{1F3FB}','\\u270D\\u{1F3FC}','\\u270D\\u{1F3FD}','\\u270D\\u{1F3FE}','\\u270D\\u{1F3FF}','\\u270D\\uFE0F','\\u270F\\uFE0F','\\u2712\\uFE0F','\\u2714\\uFE0F','\\u2716\\uFE0F','\\u271D\\uFE0F','\\u2721\\uFE0F','\\u2733\\uFE0F','\\u2734\\uFE0F','\\u2744\\uFE0F','\\u2747\\uFE0F','\\u2763\\uFE0F','\\u2764\\uFE0F','\\u2764\\uFE0F\\u200D\\u{1F525}','\\u2764\\uFE0F\\u200D\\u{1FA79}','\\u27A1\\uFE0F','\\u2934\\uFE0F','\\u2935\\uFE0F','\\u2B05\\uFE0F','\\u2B06\\uFE0F','\\u2B07\\uFE0F','\\u3030\\uFE0F','\\u303D\\uFE0F','\\u3297\\uFE0F','\\u3299\\uFE0F','\\u{1F170}\\uFE0F','\\u{1F171}\\uFE0F','\\u{1F17E}\\uFE0F','\\u{1F17F}\\uFE0F','\\u{1F1E6}\\u{1F1E8}','\\u{1F1E6}\\u{1F1E9}','\\u{1F1E6}\\u{1F1EA}','\\u{1F1E6}\\u{1F1EB}','\\u{1F1E6}\\u{1F1EC}','\\u{1F1E6}\\u{1F1EE}','\\u{1F1E6}\\u{1F1F1}','\\u{1F1E6}\\u{1F1F2}','\\u{1F1E6}\\u{1F1F4}','\\u{1F1E6}\\u{1F1F6}','\\u{1F1E6}\\u{1F1F7}','\\u{1F1E6}\\u{1F1F8}','\\u{1F1E6}\\u{1F1F9}','\\u{1F1E6}\\u{1F1FA}','\\u{1F1E6}\\u{1F1FC}','\\u{1F1E6}\\u{1F1FD}','\\u{1F1E6}\\u{1F1FF}','\\u{1F1E7}\\u{1F1E6}','\\u{1F1E7}\\u{1F1E7}','\\u{1F1E7}\\u{1F1E9}','\\u{1F1E7}\\u{1F1EA}','\\u{1F1E7}\\u{1F1EB}','\\u{1F1E7}\\u{1F1EC}','\\u{1F1E7}\\u{1F1ED}','\\u{1F1E7}\\u{1F1EE}','\\u{1F1E7}\\u{1F1EF}','\\u{1F1E7}\\u{1F1F1}','\\u{1F1E7}\\u{1F1F2}','\\u{1F1E7}\\u{1F1F3}','\\u{1F1E7}\\u{1F1F4}','\\u{1F1E7}\\u{1F1F6}','\\u{1F1E7}\\u{1F1F7}','\\u{1F1E7}\\u{1F1F8}','\\u{1F1E7}\\u{1F1F9}','\\u{1F1E7}\\u{1F1FB}','\\u{1F1E7}\\u{1F1FC}','\\u{1F1E7}\\u{1F1FE}','\\u{1F1E7}\\u{1F1FF}','\\u{1F1E8}\\u{1F1E6}','\\u{1F1E8}\\u{1F1E8}','\\u{1F1E8}\\u{1F1E9}','\\u{1F1E8}\\u{1F1EB}','\\u{1F1E8}\\u{1F1EC}','\\u{1F1E8}\\u{1F1ED}','\\u{1F1E8}\\u{1F1EE}','\\u{1F1E8}\\u{1F1F0}','\\u{1F1E8}\\u{1F1F1}','\\u{1F1E8}\\u{1F1F2}','\\u{1F1E8}\\u{1F1F3}','\\u{1F1E8}\\u{1F1F4}','\\u{1F1E8}\\u{1F1F5}','\\u{1F1E8}\\u{1F1F7}','\\u{1F1E8}\\u{1F1FA}','\\u{1F1E8}\\u{1F1FB}','\\u{1F1E8}\\u{1F1FC}','\\u{1F1E8}\\u{1F1FD}','\\u{1F1E8}\\u{1F1FE}','\\u{1F1E8}\\u{1F1FF}','\\u{1F1E9}\\u{1F1EA}','\\u{1F1E9}\\u{1F1EC}','\\u{1F1E9}\\u{1F1EF}','\\u{1F1E9}\\u{1F1F0}','\\u{1F1E9}\\u{1F1F2}','\\u{1F1E9}\\u{1F1F4}','\\u{1F1E9}\\u{1F1FF}','\\u{1F1EA}\\u{1F1E6}','\\u{1F1EA}\\u{1F1E8}','\\u{1F1EA}\\u{1F1EA}','\\u{1F1EA}\\u{1F1EC}','\\u{1F1EA}\\u{1F1ED}','\\u{1F1EA}\\u{1F1F7}','\\u{1F1EA}\\u{1F1F8}','\\u{1F1EA}\\u{1F1F9}','\\u{1F1EA}\\u{1F1FA}','\\u{1F1EB}\\u{1F1EE}','\\u{1F1EB}\\u{1F1EF}','\\u{1F1EB}\\u{1F1F0}','\\u{1F1EB}\\u{1F1F2}','\\u{1F1EB}\\u{1F1F4}','\\u{1F1EB}\\u{1F1F7}','\\u{1F1EC}\\u{1F1E6}','\\u{1F1EC}\\u{1F1E7}','\\u{1F1EC}\\u{1F1E9}','\\u{1F1EC}\\u{1F1EA}','\\u{1F1EC}\\u{1F1EB}','\\u{1F1EC}\\u{1F1EC}','\\u{1F1EC}\\u{1F1ED}','\\u{1F1EC}\\u{1F1EE}','\\u{1F1EC}\\u{1F1F1}','\\u{1F1EC}\\u{1F1F2}','\\u{1F1EC}\\u{1F1F3}','\\u{1F1EC}\\u{1F1F5}','\\u{1F1EC}\\u{1F1F6}','\\u{1F1EC}\\u{1F1F7}','\\u{1F1EC}\\u{1F1F8}','\\u{1F1EC}\\u{1F1F9}','\\u{1F1EC}\\u{1F1FA}','\\u{1F1EC}\\u{1F1FC}','\\u{1F1EC}\\u{1F1FE}','\\u{1F1ED}\\u{1F1F0}','\\u{1F1ED}\\u{1F1F2}','\\u{1F1ED}\\u{1F1F3}','\\u{1F1ED}\\u{1F1F7}','\\u{1F1ED}\\u{1F1F9}','\\u{1F1ED}\\u{1F1FA}','\\u{1F1EE}\\u{1F1E8}','\\u{1F1EE}\\u{1F1E9}','\\u{1F1EE}\\u{1F1EA}','\\u{1F1EE}\\u{1F1F1}','\\u{1F1EE}\\u{1F1F2}','\\u{1F1EE}\\u{1F1F3}','\\u{1F1EE}\\u{1F1F4}','\\u{1F1EE}\\u{1F1F6}','\\u{1F1EE}\\u{1F1F7}','\\u{1F1EE}\\u{1F1F8}','\\u{1F1EE}\\u{1F1F9}','\\u{1F1EF}\\u{1F1EA}','\\u{1F1EF}\\u{1F1F2}','\\u{1F1EF}\\u{1F1F4}','\\u{1F1EF}\\u{1F1F5}','\\u{1F1F0}\\u{1F1EA}','\\u{1F1F0}\\u{1F1EC}','\\u{1F1F0}\\u{1F1ED}','\\u{1F1F0}\\u{1F1EE}','\\u{1F1F0}\\u{1F1F2}','\\u{1F1F0}\\u{1F1F3}','\\u{1F1F0}\\u{1F1F5}','\\u{1F1F0}\\u{1F1F7}','\\u{1F1F0}\\u{1F1FC}','\\u{1F1F0}\\u{1F1FE}','\\u{1F1F0}\\u{1F1FF}','\\u{1F1F1}\\u{1F1E6}','\\u{1F1F1}\\u{1F1E7}','\\u{1F1F1}\\u{1F1E8}','\\u{1F1F1}\\u{1F1EE}','\\u{1F1F1}\\u{1F1F0}','\\u{1F1F1}\\u{1F1F7}','\\u{1F1F1}\\u{1F1F8}','\\u{1F1F1}\\u{1F1F9}','\\u{1F1F1}\\u{1F1FA}','\\u{1F1F1}\\u{1F1FB}','\\u{1F1F1}\\u{1F1FE}','\\u{1F1F2}\\u{1F1E6}','\\u{1F1F2}\\u{1F1E8}','\\u{1F1F2}\\u{1F1E9}','\\u{1F1F2}\\u{1F1EA}','\\u{1F1F2}\\u{1F1EB}','\\u{1F1F2}\\u{1F1EC}','\\u{1F1F2}\\u{1F1ED}','\\u{1F1F2}\\u{1F1F0}','\\u{1F1F2}\\u{1F1F1}','\\u{1F1F2}\\u{1F1F2}','\\u{1F1F2}\\u{1F1F3}','\\u{1F1F2}\\u{1F1F4}','\\u{1F1F2}\\u{1F1F5}','\\u{1F1F2}\\u{1F1F6}','\\u{1F1F2}\\u{1F1F7}','\\u{1F1F2}\\u{1F1F8}','\\u{1F1F2}\\u{1F1F9}','\\u{1F1F2}\\u{1F1FA}','\\u{1F1F2}\\u{1F1FB}','\\u{1F1F2}\\u{1F1FC}','\\u{1F1F2}\\u{1F1FD}','\\u{1F1F2}\\u{1F1FE}','\\u{1F1F2}\\u{1F1FF}','\\u{1F1F3}\\u{1F1E6}','\\u{1F1F3}\\u{1F1E8}','\\u{1F1F3}\\u{1F1EA}','\\u{1F1F3}\\u{1F1EB}','\\u{1F1F3}\\u{1F1EC}','\\u{1F1F3}\\u{1F1EE}','\\u{1F1F3}\\u{1F1F1}','\\u{1F1F3}\\u{1F1F4}','\\u{1F1F3}\\u{1F1F5}','\\u{1F1F3}\\u{1F1F7}','\\u{1F1F3}\\u{1F1FA}','\\u{1F1F3}\\u{1F1FF}','\\u{1F1F4}\\u{1F1F2}','\\u{1F1F5}\\u{1F1E6}','\\u{1F1F5}\\u{1F1EA}','\\u{1F1F5}\\u{1F1EB}','\\u{1F1F5}\\u{1F1EC}','\\u{1F1F5}\\u{1F1ED}','\\u{1F1F5}\\u{1F1F0}','\\u{1F1F5}\\u{1F1F1}','\\u{1F1F5}\\u{1F1F2}','\\u{1F1F5}\\u{1F1F3}','\\u{1F1F5}\\u{1F1F7}','\\u{1F1F5}\\u{1F1F8}','\\u{1F1F5}\\u{1F1F9}','\\u{1F1F5}\\u{1F1FC}','\\u{1F1F5}\\u{1F1FE}','\\u{1F1F6}\\u{1F1E6}','\\u{1F1F7}\\u{1F1EA}','\\u{1F1F7}\\u{1F1F4}','\\u{1F1F7}\\u{1F1F8}','\\u{1F1F7}\\u{1F1FA}','\\u{1F1F7}\\u{1F1FC}','\\u{1F1F8}\\u{1F1E6}','\\u{1F1F8}\\u{1F1E7}','\\u{1F1F8}\\u{1F1E8}','\\u{1F1F8}\\u{1F1E9}','\\u{1F1F8}\\u{1F1EA}','\\u{1F1F8}\\u{1F1EC}','\\u{1F1F8}\\u{1F1ED}','\\u{1F1F8}\\u{1F1EE}','\\u{1F1F8}\\u{1F1EF}','\\u{1F1F8}\\u{1F1F0}','\\u{1F1F8}\\u{1F1F1}','\\u{1F1F8}\\u{1F1F2}','\\u{1F1F8}\\u{1F1F3}','\\u{1F1F8}\\u{1F1F4}','\\u{1F1F8}\\u{1F1F7}','\\u{1F1F8}\\u{1F1F8}','\\u{1F1F8}\\u{1F1F9}','\\u{1F1F8}\\u{1F1FB}','\\u{1F1F8}\\u{1F1FD}','\\u{1F1F8}\\u{1F1FE}','\\u{1F1F8}\\u{1F1FF}','\\u{1F1F9}\\u{1F1E6}','\\u{1F1F9}\\u{1F1E8}','\\u{1F1F9}\\u{1F1E9}','\\u{1F1F9}\\u{1F1EB}','\\u{1F1F9}\\u{1F1EC}','\\u{1F1F9}\\u{1F1ED}','\\u{1F1F9}\\u{1F1EF}','\\u{1F1F9}\\u{1F1F0}','\\u{1F1F9}\\u{1F1F1}','\\u{1F1F9}\\u{1F1F2}','\\u{1F1F9}\\u{1F1F3}','\\u{1F1F9}\\u{1F1F4}','\\u{1F1F9}\\u{1F1F7}','\\u{1F1F9}\\u{1F1F9}','\\u{1F1F9}\\u{1F1FB}','\\u{1F1F9}\\u{1F1FC}','\\u{1F1F9}\\u{1F1FF}','\\u{1F1FA}\\u{1F1E6}','\\u{1F1FA}\\u{1F1EC}','\\u{1F1FA}\\u{1F1F2}','\\u{1F1FA}\\u{1F1F3}','\\u{1F1FA}\\u{1F1F8}','\\u{1F1FA}\\u{1F1FE}','\\u{1F1FA}\\u{1F1FF}','\\u{1F1FB}\\u{1F1E6}','\\u{1F1FB}\\u{1F1E8}','\\u{1F1FB}\\u{1F1EA}','\\u{1F1FB}\\u{1F1EC}','\\u{1F1FB}\\u{1F1EE}','\\u{1F1FB}\\u{1F1F3}','\\u{1F1FB}\\u{1F1FA}','\\u{1F1FC}\\u{1F1EB}','\\u{1F1FC}\\u{1F1F8}','\\u{1F1FD}\\u{1F1F0}','\\u{1F1FE}\\u{1F1EA}','\\u{1F1FE}\\u{1F1F9}','\\u{1F1FF}\\u{1F1E6}','\\u{1F1FF}\\u{1F1F2}','\\u{1F1FF}\\u{1F1FC}','\\u{1F202}\\uFE0F','\\u{1F237}\\uFE0F','\\u{1F321}\\uFE0F','\\u{1F324}\\uFE0F','\\u{1F325}\\uFE0F','\\u{1F326}\\uFE0F','\\u{1F327}\\uFE0F','\\u{1F328}\\uFE0F','\\u{1F329}\\uFE0F','\\u{1F32A}\\uFE0F','\\u{1F32B}\\uFE0F','\\u{1F32C}\\uFE0F','\\u{1F336}\\uFE0F','\\u{1F344}\\u200D\\u{1F7EB}','\\u{1F34B}\\u200D\\u{1F7E9}','\\u{1F37D}\\uFE0F','\\u{1F385}\\u{1F3FB}','\\u{1F385}\\u{1F3FC}','\\u{1F385}\\u{1F3FD}','\\u{1F385}\\u{1F3FE}','\\u{1F385}\\u{1F3FF}','\\u{1F396}\\uFE0F','\\u{1F397}\\uFE0F','\\u{1F399}\\uFE0F','\\u{1F39A}\\uFE0F','\\u{1F39B}\\uFE0F','\\u{1F39E}\\uFE0F','\\u{1F39F}\\uFE0F','\\u{1F3C2}\\u{1F3FB}','\\u{1F3C2}\\u{1F3FC}','\\u{1F3C2}\\u{1F3FD}','\\u{1F3C2}\\u{1F3FE}','\\u{1F3C2}\\u{1F3FF}','\\u{1F3C3}\\u200D\\u2640\\uFE0F','\\u{1F3C3}\\u200D\\u2640\\uFE0F\\u200D\\u27A1\\uFE0F','\\u{1F3C3}\\u200D\\u2642\\uFE0F','\\u{1F3C3}\\u200D\\u2642\\uFE0F\\u200D\\u27A1\\uFE0F','\\u{1F3C3}\\u200D\\u27A1\\uFE0F','\\u{1F3C3}\\u{1F3FB}','\\u{1F3C3}\\u{1F3FB}\\u200D\\u2640\\uFE0F','\\u{1F3C3}\\u{1F3FB}\\u200D\\u2640\\uFE0F\\u200D\\u27A1\\uFE0F','\\u{1F3C3}\\u{1F3FB}\\u200D\\u2642\\uFE0F','\\u{1F3C3}\\u{1F3FB}\\u200D\\u2642\\uFE0F\\u200D\\u27A1\\uFE0F','\\u{1F3C3}\\u{1F3FB}\\u200D\\u27A1\\uFE0F','\\u{1F3C3}\\u{1F3FC}','\\u{1F3C3}\\u{1F3FC}\\u200D\\u2640\\uFE0F','\\u{1F3C3}\\u{1F3FC}\\u200D\\u2640\\uFE0F\\u200D\\u27A1\\uFE0F','\\u{1F3C3}\\u{1F3FC}\\u200D\\u2642\\uFE0F','\\u{1F3C3}\\u{1F3FC}\\u200D\\u2642\\uFE0F\\u200D\\u27A1\\uFE0F','\\u{1F3C3}\\u{1F3FC}\\u200D\\u27A1\\uFE0F','\\u{1F3C3}\\u{1F3FD}','\\u{1F3C3}\\u{1F3FD}\\u200D\\u2640\\uFE0F','\\u{1F3C3}\\u{1F3FD}\\u200D\\u2640\\uFE0F\\u200D\\u27A1\\uFE0F','\\u{1F3C3}\\u{1F3FD}\\u200D\\u2642\\uFE0F','\\u{1F3C3}\\u{1F3FD}\\u200D\\u2642\\uFE0F\\u200D\\u27A1\\uFE0F','\\u{1F3C3}\\u{1F3FD}\\u200D\\u27A1\\uFE0F','\\u{1F3C3}\\u{1F3FE}','\\u{1F3C3}\\u{1F3FE}\\u200D\\u2640\\uFE0F','\\u{1F3C3}\\u{1F3FE}\\u200D\\u2640\\uFE0F\\u200D\\u27A1\\uFE0F','\\u{1F3C3}\\u{1F3FE}\\u200D\\u2642\\uFE0F','\\u{1F3C3}\\u{1F3FE}\\u200D\\u2642\\uFE0F\\u200D\\u27A1\\uFE0F','\\u{1F3C3}\\u{1F3FE}\\u200D\\u27A1\\uFE0F','\\u{1F3C3}\\u{1F3FF}','\\u{1F3C3}\\u{1F3FF}\\u200D\\u2640\\uFE0F','\\u{1F3C3}\\u{1F3FF}\\u200D\\u2640\\uFE0F\\u200D\\u27A1\\uFE0F','\\u{1F3C3}\\u{1F3FF}\\u200D\\u2642\\uFE0F','\\u{1F3C3}\\u{1F3FF}\\u200D\\u2642\\uFE0F\\u200D\\u27A1\\uFE0F','\\u{1F3C3}\\u{1F3FF}\\u200D\\u27A1\\uFE0F','\\u{1F3C4}\\u200D\\u2640\\uFE0F','\\u{1F3C4}\\u200D\\u2642\\uFE0F','\\u{1F3C4}\\u{1F3FB}','\\u{1F3C4}\\u{1F3FB}\\u200D\\u2640\\uFE0F','\\u{1F3C4}\\u{1F3FB}\\u200D\\u2642\\uFE0F','\\u{1F3C4}\\u{1F3FC}','\\u{1F3C4}\\u{1F3FC}\\u200D\\u2640\\uFE0F','\\u{1F3C4}\\u{1F3FC}\\u200D\\u2642\\uFE0F','\\u{1F3C4}\\u{1F3FD}','\\u{1F3C4}\\u{1F3FD}\\u200D\\u2640\\uFE0F','\\u{1F3C4}\\u{1F3FD}\\u200D\\u2642\\uFE0F','\\u{1F3C4}\\u{1F3FE}','\\u{1F3C4}\\u{1F3FE}\\u200D\\u2640\\uFE0F','\\u{1F3C4}\\u{1F3FE}\\u200D\\u2642\\uFE0F','\\u{1F3C4}\\u{1F3FF}','\\u{1F3C4}\\u{1F3FF}\\u200D\\u2640\\uFE0F','\\u{1F3C4}\\u{1F3FF}\\u200D\\u2642\\uFE0F','\\u{1F3C7}\\u{1F3FB}','\\u{1F3C7}\\u{1F3FC}','\\u{1F3C7}\\u{1F3FD}','\\u{1F3C7}\\u{1F3FE}','\\u{1F3C7}\\u{1F3FF}','\\u{1F3CA}\\u200D\\u2640\\uFE0F','\\u{1F3CA}\\u200D\\u2642\\uFE0F','\\u{1F3CA}\\u{1F3FB}','\\u{1F3CA}\\u{1F3FB}\\u200D\\u2640\\uFE0F','\\u{1F3CA}\\u{1F3FB}\\u200D\\u2642\\uFE0F','\\u{1F3CA}\\u{1F3FC}','\\u{1F3CA}\\u{1F3FC}\\u200D\\u2640\\uFE0F','\\u{1F3CA}\\u{1F3FC}\\u200D\\u2642\\uFE0F','\\u{1F3CA}\\u{1F3FD}','\\u{1F3CA}\\u{1F3FD}\\u200D\\u2640\\uFE0F','\\u{1F3CA}\\u{1F3FD}\\u200D\\u2642\\uFE0F','\\u{1F3CA}\\u{1F3FE}','\\u{1F3CA}\\u{1F3FE}\\u200D\\u2640\\uFE0F','\\u{1F3CA}\\u{1F3FE}\\u200D\\u2642\\uFE0F','\\u{1F3CA}\\u{1F3FF}','\\u{1F3CA}\\u{1F3FF}\\u200D\\u2640\\uFE0F','\\u{1F3CA}\\u{1F3FF}\\u200D\\u2642\\uFE0F','\\u{1F3CB}\\u{1F3FB}','\\u{1F3CB}\\u{1F3FB}\\u200D\\u2640\\uFE0F','\\u{1F3CB}\\u{1F3FB}\\u200D\\u2642\\uFE0F','\\u{1F3CB}\\u{1F3FC}','\\u{1F3CB}\\u{1F3FC}\\u200D\\u2640\\uFE0F','\\u{1F3CB}\\u{1F3FC}\\u200D\\u2642\\uFE0F','\\u{1F3CB}\\u{1F3FD}','\\u{1F3CB}\\u{1F3FD}\\u200D\\u2640\\uFE0F','\\u{1F3CB}\\u{1F3FD}\\u200D\\u2642\\uFE0F','\\u{1F3CB}\\u{1F3FE}','\\u{1F3CB}\\u{1F3FE}\\u200D\\u2640\\uFE0F','\\u{1F3CB}\\u{1F3FE}\\u200D\\u2642\\uFE0F','\\u{1F3CB}\\u{1F3FF}','\\u{1F3CB}\\u{1F3FF}\\u200D\\u2640\\uFE0F','\\u{1F3CB}\\u{1F3FF}\\u200D\\u2642\\uFE0F','\\u{1F3CB}\\uFE0F','\\u{1F3CB}\\uFE0F\\u200D\\u2640\\uFE0F','\\u{1F3CB}\\uFE0F\\u200D\\u2642\\uFE0F','\\u{1F3CC}\\u{1F3FB}','\\u{1F3CC}\\u{1F3FB}\\u200D\\u2640\\uFE0F','\\u{1F3CC}\\u{1F3FB}\\u200D\\u2642\\uFE0F','\\u{1F3CC}\\u{1F3FC}','\\u{1F3CC}\\u{1F3FC}\\u200D\\u2640\\uFE0F','\\u{1F3CC}\\u{1F3FC}\\u200D\\u2642\\uFE0F','\\u{1F3CC}\\u{1F3FD}','\\u{1F3CC}\\u{1F3FD}\\u200D\\u2640\\uFE0F','\\u{1F3CC}\\u{1F3FD}\\u200D\\u2642\\uFE0F','\\u{1F3CC}\\u{1F3FE}','\\u{1F3CC}\\u{1F3FE}\\u200D\\u2640\\uFE0F','\\u{1F3CC}\\u{1F3FE}\\u200D\\u2642\\uFE0F','\\u{1F3CC}\\u{1F3FF}','\\u{1F3CC}\\u{1F3FF}\\u200D\\u2640\\uFE0F','\\u{1F3CC}\\u{1F3FF}\\u200D\\u2642\\uFE0F','\\u{1F3CC}\\uFE0F','\\u{1F3CC}\\uFE0F\\u200D\\u2640\\uFE0F','\\u{1F3CC}\\uFE0F\\u200D\\u2642\\uFE0F','\\u{1F3CD}\\uFE0F','\\u{1F3CE}\\uFE0F','\\u{1F3D4}\\uFE0F','\\u{1F3D5}\\uFE0F','\\u{1F3D6}\\uFE0F','\\u{1F3D7}\\uFE0F','\\u{1F3D8}\\uFE0F','\\u{1F3D9}\\uFE0F','\\u{1F3DA}\\uFE0F','\\u{1F3DB}\\uFE0F','\\u{1F3DC}\\uFE0F','\\u{1F3DD}\\uFE0F','\\u{1F3DE}\\uFE0F','\\u{1F3DF}\\uFE0F','\\u{1F3F3}\\uFE0F','\\u{1F3F3}\\uFE0F\\u200D\\u26A7\\uFE0F','\\u{1F3F3}\\uFE0F\\u200D\\u{1F308}','\\u{1F3F4}\\u200D\\u2620\\uFE0F','\\u{1F3F4}\\u{E0067}\\u{E0062}\\u{E0065}\\u{E006E}\\u{E0067}\\u{E007F}','\\u{1F3F4}\\u{E0067}\\u{E0062}\\u{E0073}\\u{E0063}\\u{E0074}\\u{E007F}','\\u{1F3F4}\\u{E0067}\\u{E0062}\\u{E0077}\\u{E006C}\\u{E0073}\\u{E007F}','\\u{1F3F5}\\uFE0F','\\u{1F3F7}\\uFE0F','\\u{1F408}\\u200D\\u2B1B','\\u{1F415}\\u200D\\u{1F9BA}','\\u{1F426}\\u200D\\u2B1B','\\u{1F426}\\u200D\\u{1F525}','\\u{1F43B}\\u200D\\u2744\\uFE0F','\\u{1F43F}\\uFE0F','\\u{1F441}\\uFE0F','\\u{1F441}\\uFE0F\\u200D\\u{1F5E8}\\uFE0F','\\u{1F442}\\u{1F3FB}','\\u{1F442}\\u{1F3FC}','\\u{1F442}\\u{1F3FD}','\\u{1F442}\\u{1F3FE}','\\u{1F442}\\u{1F3FF}','\\u{1F443}\\u{1F3FB}','\\u{1F443}\\u{1F3FC}','\\u{1F443}\\u{1F3FD}','\\u{1F443}\\u{1F3FE}','\\u{1F443}\\u{1F3FF}','\\u{1F446}\\u{1F3FB}','\\u{1F446}\\u{1F3FC}','\\u{1F446}\\u{1F3FD}','\\u{1F446}\\u{1F3FE}','\\u{1F446}\\u{1F3FF}','\\u{1F447}\\u{1F3FB}','\\u{1F447}\\u{1F3FC}','\\u{1F447}\\u{1F3FD}','\\u{1F447}\\u{1F3FE}','\\u{1F447}\\u{1F3FF}','\\u{1F448}\\u{1F3FB}','\\u{1F448}\\u{1F3FC}','\\u{1F448}\\u{1F3FD}','\\u{1F448}\\u{1F3FE}','\\u{1F448}\\u{1F3FF}','\\u{1F449}\\u{1F3FB}','\\u{1F449}\\u{1F3FC}','\\u{1F449}\\u{1F3FD}','\\u{1F449}\\u{1F3FE}','\\u{1F449}\\u{1F3FF}','\\u{1F44A}\\u{1F3FB}','\\u{1F44A}\\u{1F3FC}','\\u{1F44A}\\u{1F3FD}','\\u{1F44A}\\u{1F3FE}','\\u{1F44A}\\u{1F3FF}','\\u{1F44B}\\u{1F3FB}','\\u{1F44B}\\u{1F3FC}','\\u{1F44B}\\u{1F3FD}','\\u{1F44B}\\u{1F3FE}','\\u{1F44B}\\u{1F3FF}','\\u{1F44C}\\u{1F3FB}','\\u{1F44C}\\u{1F3FC}','\\u{1F44C}\\u{1F3FD}','\\u{1F44C}\\u{1F3FE}','\\u{1F44C}\\u{1F3FF}','\\u{1F44D}\\u{1F3FB}','\\u{1F44D}\\u{1F3FC}','\\u{1F44D}\\u{1F3FD}','\\u{1F44D}\\u{1F3FE}','\\u{1F44D}\\u{1F3FF}','\\u{1F44E}\\u{1F3FB}','\\u{1F44E}\\u{1F3FC}','\\u{1F44E}\\u{1F3FD}','\\u{1F44E}\\u{1F3FE}','\\u{1F44E}\\u{1F3FF}','\\u{1F44F}\\u{1F3FB}','\\u{1F44F}\\u{1F3FC}','\\u{1F44F}\\u{1F3FD}','\\u{1F44F}\\u{1F3FE}','\\u{1F44F}\\u{1F3FF}','\\u{1F450}\\u{1F3FB}','\\u{1F450}\\u{1F3FC}','\\u{1F450}\\u{1F3FD}','\\u{1F450}\\u{1F3FE}','\\u{1F450}\\u{1F3FF}','\\u{1F466}\\u{1F3FB}','\\u{1F466}\\u{1F3FC}','\\u{1F466}\\u{1F3FD}','\\u{1F466}\\u{1F3FE}','\\u{1F466}\\u{1F3FF}','\\u{1F467}\\u{1F3FB}','\\u{1F467}\\u{1F3FC}','\\u{1F467}\\u{1F3FD}','\\u{1F467}\\u{1F3FE}','\\u{1F467}\\u{1F3FF}','\\u{1F468}\\u200D\\u2695\\uFE0F','\\u{1F468}\\u200D\\u2696\\uFE0F','\\u{1F468}\\u200D\\u2708\\uFE0F','\\u{1F468}\\u200D\\u2764\\uFE0F\\u200D\\u{1F468}','\\u{1F468}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F468}','\\u{1F468}\\u200D\\u{1F33E}','\\u{1F468}\\u200D\\u{1F373}','\\u{1F468}\\u200D\\u{1F37C}','\\u{1F468}\\u200D\\u{1F393}','\\u{1F468}\\u200D\\u{1F3A4}','\\u{1F468}\\u200D\\u{1F3A8}','\\u{1F468}\\u200D\\u{1F3EB}','\\u{1F468}\\u200D\\u{1F3ED}','\\u{1F468}\\u200D\\u{1F466}','\\u{1F468}\\u200D\\u{1F466}\\u200D\\u{1F466}','\\u{1F468}\\u200D\\u{1F467}','\\u{1F468}\\u200D\\u{1F467}\\u200D\\u{1F466}','\\u{1F468}\\u200D\\u{1F467}\\u200D\\u{1F467}','\\u{1F468}\\u200D\\u{1F468}\\u200D\\u{1F466}','\\u{1F468}\\u200D\\u{1F468}\\u200D\\u{1F466}\\u200D\\u{1F466}','\\u{1F468}\\u200D\\u{1F468}\\u200D\\u{1F467}','\\u{1F468}\\u200D\\u{1F468}\\u200D\\u{1F467}\\u200D\\u{1F466}','\\u{1F468}\\u200D\\u{1F468}\\u200D\\u{1F467}\\u200D\\u{1F467}','\\u{1F468}\\u200D\\u{1F469}\\u200D\\u{1F466}','\\u{1F468}\\u200D\\u{1F469}\\u200D\\u{1F466}\\u200D\\u{1F466}','\\u{1F468}\\u200D\\u{1F469}\\u200D\\u{1F467}','\\u{1F468}\\u200D\\u{1F469}\\u200D\\u{1F467}\\u200D\\u{1F466}','\\u{1F468}\\u200D\\u{1F469}\\u200D\\u{1F467}\\u200D\\u{1F467}','\\u{1F468}\\u200D\\u{1F4BB}','\\u{1F468}\\u200D\\u{1F4BC}','\\u{1F468}\\u200D\\u{1F527}','\\u{1F468}\\u200D\\u{1F52C}','\\u{1F468}\\u200D\\u{1F680}','\\u{1F468}\\u200D\\u{1F692}','\\u{1F468}\\u200D\\u{1F9AF}','\\u{1F468}\\u200D\\u{1F9AF}\\u200D\\u27A1\\uFE0F','\\u{1F468}\\u200D\\u{1F9B0}','\\u{1F468}\\u200D\\u{1F9B1}','\\u{1F468}\\u200D\\u{1F9B2}','\\u{1F468}\\u200D\\u{1F9B3}','\\u{1F468}\\u200D\\u{1F9BC}','\\u{1F468}\\u200D\\u{1F9BC}\\u200D\\u27A1\\uFE0F','\\u{1F468}\\u200D\\u{1F9BD}','\\u{1F468}\\u200D\\u{1F9BD}\\u200D\\u27A1\\uFE0F','\\u{1F468}\\u{1F3FB}','\\u{1F468}\\u{1F3FB}\\u200D\\u2695\\uFE0F','\\u{1F468}\\u{1F3FB}\\u200D\\u2696\\uFE0F','\\u{1F468}\\u{1F3FB}\\u200D\\u2708\\uFE0F','\\u{1F468}\\u{1F3FB}\\u200D\\u2764\\uFE0F\\u200D\\u{1F468}\\u{1F3FB}','\\u{1F468}\\u{1F3FB}\\u200D\\u2764\\uFE0F\\u200D\\u{1F468}\\u{1F3FC}','\\u{1F468}\\u{1F3FB}\\u200D\\u2764\\uFE0F\\u200D\\u{1F468}\\u{1F3FD}','\\u{1F468}\\u{1F3FB}\\u200D\\u2764\\uFE0F\\u200D\\u{1F468}\\u{1F3FE}','\\u{1F468}\\u{1F3FB}\\u200D\\u2764\\uFE0F\\u200D\\u{1F468}\\u{1F3FF}','\\u{1F468}\\u{1F3FB}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F468}\\u{1F3FB}','\\u{1F468}\\u{1F3FB}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F468}\\u{1F3FC}','\\u{1F468}\\u{1F3FB}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F468}\\u{1F3FD}','\\u{1F468}\\u{1F3FB}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F468}\\u{1F3FE}','\\u{1F468}\\u{1F3FB}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F468}\\u{1F3FF}','\\u{1F468}\\u{1F3FB}\\u200D\\u{1F33E}','\\u{1F468}\\u{1F3FB}\\u200D\\u{1F373}','\\u{1F468}\\u{1F3FB}\\u200D\\u{1F37C}','\\u{1F468}\\u{1F3FB}\\u200D\\u{1F393}','\\u{1F468}\\u{1F3FB}\\u200D\\u{1F3A4}','\\u{1F468}\\u{1F3FB}\\u200D\\u{1F3A8}','\\u{1F468}\\u{1F3FB}\\u200D\\u{1F3EB}','\\u{1F468}\\u{1F3FB}\\u200D\\u{1F3ED}','\\u{1F468}\\u{1F3FB}\\u200D\\u{1F4BB}','\\u{1F468}\\u{1F3FB}\\u200D\\u{1F4BC}','\\u{1F468}\\u{1F3FB}\\u200D\\u{1F527}','\\u{1F468}\\u{1F3FB}\\u200D\\u{1F52C}','\\u{1F468}\\u{1F3FB}\\u200D\\u{1F680}','\\u{1F468}\\u{1F3FB}\\u200D\\u{1F692}','\\u{1F468}\\u{1F3FB}\\u200D\\u{1F91D}\\u200D\\u{1F468}\\u{1F3FC}','\\u{1F468}\\u{1F3FB}\\u200D\\u{1F91D}\\u200D\\u{1F468}\\u{1F3FD}','\\u{1F468}\\u{1F3FB}\\u200D\\u{1F91D}\\u200D\\u{1F468}\\u{1F3FE}','\\u{1F468}\\u{1F3FB}\\u200D\\u{1F91D}\\u200D\\u{1F468}\\u{1F3FF}','\\u{1F468}\\u{1F3FB}\\u200D\\u{1F9AF}','\\u{1F468}\\u{1F3FB}\\u200D\\u{1F9AF}\\u200D\\u27A1\\uFE0F','\\u{1F468}\\u{1F3FB}\\u200D\\u{1F9B0}','\\u{1F468}\\u{1F3FB}\\u200D\\u{1F9B1}','\\u{1F468}\\u{1F3FB}\\u200D\\u{1F9B2}','\\u{1F468}\\u{1F3FB}\\u200D\\u{1F9B3}','\\u{1F468}\\u{1F3FB}\\u200D\\u{1F9BC}','\\u{1F468}\\u{1F3FB}\\u200D\\u{1F9BC}\\u200D\\u27A1\\uFE0F','\\u{1F468}\\u{1F3FB}\\u200D\\u{1F9BD}','\\u{1F468}\\u{1F3FB}\\u200D\\u{1F9BD}\\u200D\\u27A1\\uFE0F','\\u{1F468}\\u{1F3FC}','\\u{1F468}\\u{1F3FC}\\u200D\\u2695\\uFE0F','\\u{1F468}\\u{1F3FC}\\u200D\\u2696\\uFE0F','\\u{1F468}\\u{1F3FC}\\u200D\\u2708\\uFE0F','\\u{1F468}\\u{1F3FC}\\u200D\\u2764\\uFE0F\\u200D\\u{1F468}\\u{1F3FB}','\\u{1F468}\\u{1F3FC}\\u200D\\u2764\\uFE0F\\u200D\\u{1F468}\\u{1F3FC}','\\u{1F468}\\u{1F3FC}\\u200D\\u2764\\uFE0F\\u200D\\u{1F468}\\u{1F3FD}','\\u{1F468}\\u{1F3FC}\\u200D\\u2764\\uFE0F\\u200D\\u{1F468}\\u{1F3FE}','\\u{1F468}\\u{1F3FC}\\u200D\\u2764\\uFE0F\\u200D\\u{1F468}\\u{1F3FF}','\\u{1F468}\\u{1F3FC}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F468}\\u{1F3FB}','\\u{1F468}\\u{1F3FC}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F468}\\u{1F3FC}','\\u{1F468}\\u{1F3FC}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F468}\\u{1F3FD}','\\u{1F468}\\u{1F3FC}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F468}\\u{1F3FE}','\\u{1F468}\\u{1F3FC}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F468}\\u{1F3FF}','\\u{1F468}\\u{1F3FC}\\u200D\\u{1F33E}','\\u{1F468}\\u{1F3FC}\\u200D\\u{1F373}','\\u{1F468}\\u{1F3FC}\\u200D\\u{1F37C}','\\u{1F468}\\u{1F3FC}\\u200D\\u{1F393}','\\u{1F468}\\u{1F3FC}\\u200D\\u{1F3A4}','\\u{1F468}\\u{1F3FC}\\u200D\\u{1F3A8}','\\u{1F468}\\u{1F3FC}\\u200D\\u{1F3EB}','\\u{1F468}\\u{1F3FC}\\u200D\\u{1F3ED}','\\u{1F468}\\u{1F3FC}\\u200D\\u{1F4BB}','\\u{1F468}\\u{1F3FC}\\u200D\\u{1F4BC}','\\u{1F468}\\u{1F3FC}\\u200D\\u{1F527}','\\u{1F468}\\u{1F3FC}\\u200D\\u{1F52C}','\\u{1F468}\\u{1F3FC}\\u200D\\u{1F680}','\\u{1F468}\\u{1F3FC}\\u200D\\u{1F692}','\\u{1F468}\\u{1F3FC}\\u200D\\u{1F91D}\\u200D\\u{1F468}\\u{1F3FB}','\\u{1F468}\\u{1F3FC}\\u200D\\u{1F91D}\\u200D\\u{1F468}\\u{1F3FD}','\\u{1F468}\\u{1F3FC}\\u200D\\u{1F91D}\\u200D\\u{1F468}\\u{1F3FE}','\\u{1F468}\\u{1F3FC}\\u200D\\u{1F91D}\\u200D\\u{1F468}\\u{1F3FF}','\\u{1F468}\\u{1F3FC}\\u200D\\u{1F9AF}','\\u{1F468}\\u{1F3FC}\\u200D\\u{1F9AF}\\u200D\\u27A1\\uFE0F','\\u{1F468}\\u{1F3FC}\\u200D\\u{1F9B0}','\\u{1F468}\\u{1F3FC}\\u200D\\u{1F9B1}','\\u{1F468}\\u{1F3FC}\\u200D\\u{1F9B2}','\\u{1F468}\\u{1F3FC}\\u200D\\u{1F9B3}','\\u{1F468}\\u{1F3FC}\\u200D\\u{1F9BC}','\\u{1F468}\\u{1F3FC}\\u200D\\u{1F9BC}\\u200D\\u27A1\\uFE0F','\\u{1F468}\\u{1F3FC}\\u200D\\u{1F9BD}','\\u{1F468}\\u{1F3FC}\\u200D\\u{1F9BD}\\u200D\\u27A1\\uFE0F','\\u{1F468}\\u{1F3FD}','\\u{1F468}\\u{1F3FD}\\u200D\\u2695\\uFE0F','\\u{1F468}\\u{1F3FD}\\u200D\\u2696\\uFE0F','\\u{1F468}\\u{1F3FD}\\u200D\\u2708\\uFE0F','\\u{1F468}\\u{1F3FD}\\u200D\\u2764\\uFE0F\\u200D\\u{1F468}\\u{1F3FB}','\\u{1F468}\\u{1F3FD}\\u200D\\u2764\\uFE0F\\u200D\\u{1F468}\\u{1F3FC}','\\u{1F468}\\u{1F3FD}\\u200D\\u2764\\uFE0F\\u200D\\u{1F468}\\u{1F3FD}','\\u{1F468}\\u{1F3FD}\\u200D\\u2764\\uFE0F\\u200D\\u{1F468}\\u{1F3FE}','\\u{1F468}\\u{1F3FD}\\u200D\\u2764\\uFE0F\\u200D\\u{1F468}\\u{1F3FF}','\\u{1F468}\\u{1F3FD}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F468}\\u{1F3FB}','\\u{1F468}\\u{1F3FD}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F468}\\u{1F3FC}','\\u{1F468}\\u{1F3FD}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F468}\\u{1F3FD}','\\u{1F468}\\u{1F3FD}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F468}\\u{1F3FE}','\\u{1F468}\\u{1F3FD}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F468}\\u{1F3FF}','\\u{1F468}\\u{1F3FD}\\u200D\\u{1F33E}','\\u{1F468}\\u{1F3FD}\\u200D\\u{1F373}','\\u{1F468}\\u{1F3FD}\\u200D\\u{1F37C}','\\u{1F468}\\u{1F3FD}\\u200D\\u{1F393}','\\u{1F468}\\u{1F3FD}\\u200D\\u{1F3A4}','\\u{1F468}\\u{1F3FD}\\u200D\\u{1F3A8}','\\u{1F468}\\u{1F3FD}\\u200D\\u{1F3EB}','\\u{1F468}\\u{1F3FD}\\u200D\\u{1F3ED}','\\u{1F468}\\u{1F3FD}\\u200D\\u{1F4BB}','\\u{1F468}\\u{1F3FD}\\u200D\\u{1F4BC}','\\u{1F468}\\u{1F3FD}\\u200D\\u{1F527}','\\u{1F468}\\u{1F3FD}\\u200D\\u{1F52C}','\\u{1F468}\\u{1F3FD}\\u200D\\u{1F680}','\\u{1F468}\\u{1F3FD}\\u200D\\u{1F692}','\\u{1F468}\\u{1F3FD}\\u200D\\u{1F91D}\\u200D\\u{1F468}\\u{1F3FB}','\\u{1F468}\\u{1F3FD}\\u200D\\u{1F91D}\\u200D\\u{1F468}\\u{1F3FC}','\\u{1F468}\\u{1F3FD}\\u200D\\u{1F91D}\\u200D\\u{1F468}\\u{1F3FE}','\\u{1F468}\\u{1F3FD}\\u200D\\u{1F91D}\\u200D\\u{1F468}\\u{1F3FF}','\\u{1F468}\\u{1F3FD}\\u200D\\u{1F9AF}','\\u{1F468}\\u{1F3FD}\\u200D\\u{1F9AF}\\u200D\\u27A1\\uFE0F','\\u{1F468}\\u{1F3FD}\\u200D\\u{1F9B0}','\\u{1F468}\\u{1F3FD}\\u200D\\u{1F9B1}','\\u{1F468}\\u{1F3FD}\\u200D\\u{1F9B2}','\\u{1F468}\\u{1F3FD}\\u200D\\u{1F9B3}','\\u{1F468}\\u{1F3FD}\\u200D\\u{1F9BC}','\\u{1F468}\\u{1F3FD}\\u200D\\u{1F9BC}\\u200D\\u27A1\\uFE0F','\\u{1F468}\\u{1F3FD}\\u200D\\u{1F9BD}','\\u{1F468}\\u{1F3FD}\\u200D\\u{1F9BD}\\u200D\\u27A1\\uFE0F','\\u{1F468}\\u{1F3FE}','\\u{1F468}\\u{1F3FE}\\u200D\\u2695\\uFE0F','\\u{1F468}\\u{1F3FE}\\u200D\\u2696\\uFE0F','\\u{1F468}\\u{1F3FE}\\u200D\\u2708\\uFE0F','\\u{1F468}\\u{1F3FE}\\u200D\\u2764\\uFE0F\\u200D\\u{1F468}\\u{1F3FB}','\\u{1F468}\\u{1F3FE}\\u200D\\u2764\\uFE0F\\u200D\\u{1F468}\\u{1F3FC}','\\u{1F468}\\u{1F3FE}\\u200D\\u2764\\uFE0F\\u200D\\u{1F468}\\u{1F3FD}','\\u{1F468}\\u{1F3FE}\\u200D\\u2764\\uFE0F\\u200D\\u{1F468}\\u{1F3FE}','\\u{1F468}\\u{1F3FE}\\u200D\\u2764\\uFE0F\\u200D\\u{1F468}\\u{1F3FF}','\\u{1F468}\\u{1F3FE}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F468}\\u{1F3FB}','\\u{1F468}\\u{1F3FE}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F468}\\u{1F3FC}','\\u{1F468}\\u{1F3FE}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F468}\\u{1F3FD}','\\u{1F468}\\u{1F3FE}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F468}\\u{1F3FE}','\\u{1F468}\\u{1F3FE}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F468}\\u{1F3FF}','\\u{1F468}\\u{1F3FE}\\u200D\\u{1F33E}','\\u{1F468}\\u{1F3FE}\\u200D\\u{1F373}','\\u{1F468}\\u{1F3FE}\\u200D\\u{1F37C}','\\u{1F468}\\u{1F3FE}\\u200D\\u{1F393}','\\u{1F468}\\u{1F3FE}\\u200D\\u{1F3A4}','\\u{1F468}\\u{1F3FE}\\u200D\\u{1F3A8}','\\u{1F468}\\u{1F3FE}\\u200D\\u{1F3EB}','\\u{1F468}\\u{1F3FE}\\u200D\\u{1F3ED}','\\u{1F468}\\u{1F3FE}\\u200D\\u{1F4BB}','\\u{1F468}\\u{1F3FE}\\u200D\\u{1F4BC}','\\u{1F468}\\u{1F3FE}\\u200D\\u{1F527}','\\u{1F468}\\u{1F3FE}\\u200D\\u{1F52C}','\\u{1F468}\\u{1F3FE}\\u200D\\u{1F680}','\\u{1F468}\\u{1F3FE}\\u200D\\u{1F692}','\\u{1F468}\\u{1F3FE}\\u200D\\u{1F91D}\\u200D\\u{1F468}\\u{1F3FB}','\\u{1F468}\\u{1F3FE}\\u200D\\u{1F91D}\\u200D\\u{1F468}\\u{1F3FC}','\\u{1F468}\\u{1F3FE}\\u200D\\u{1F91D}\\u200D\\u{1F468}\\u{1F3FD}','\\u{1F468}\\u{1F3FE}\\u200D\\u{1F91D}\\u200D\\u{1F468}\\u{1F3FF}','\\u{1F468}\\u{1F3FE}\\u200D\\u{1F9AF}','\\u{1F468}\\u{1F3FE}\\u200D\\u{1F9AF}\\u200D\\u27A1\\uFE0F','\\u{1F468}\\u{1F3FE}\\u200D\\u{1F9B0}','\\u{1F468}\\u{1F3FE}\\u200D\\u{1F9B1}','\\u{1F468}\\u{1F3FE}\\u200D\\u{1F9B2}','\\u{1F468}\\u{1F3FE}\\u200D\\u{1F9B3}','\\u{1F468}\\u{1F3FE}\\u200D\\u{1F9BC}','\\u{1F468}\\u{1F3FE}\\u200D\\u{1F9BC}\\u200D\\u27A1\\uFE0F','\\u{1F468}\\u{1F3FE}\\u200D\\u{1F9BD}','\\u{1F468}\\u{1F3FE}\\u200D\\u{1F9BD}\\u200D\\u27A1\\uFE0F','\\u{1F468}\\u{1F3FF}','\\u{1F468}\\u{1F3FF}\\u200D\\u2695\\uFE0F','\\u{1F468}\\u{1F3FF}\\u200D\\u2696\\uFE0F','\\u{1F468}\\u{1F3FF}\\u200D\\u2708\\uFE0F','\\u{1F468}\\u{1F3FF}\\u200D\\u2764\\uFE0F\\u200D\\u{1F468}\\u{1F3FB}','\\u{1F468}\\u{1F3FF}\\u200D\\u2764\\uFE0F\\u200D\\u{1F468}\\u{1F3FC}','\\u{1F468}\\u{1F3FF}\\u200D\\u2764\\uFE0F\\u200D\\u{1F468}\\u{1F3FD}','\\u{1F468}\\u{1F3FF}\\u200D\\u2764\\uFE0F\\u200D\\u{1F468}\\u{1F3FE}','\\u{1F468}\\u{1F3FF}\\u200D\\u2764\\uFE0F\\u200D\\u{1F468}\\u{1F3FF}','\\u{1F468}\\u{1F3FF}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F468}\\u{1F3FB}','\\u{1F468}\\u{1F3FF}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F468}\\u{1F3FC}','\\u{1F468}\\u{1F3FF}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F468}\\u{1F3FD}','\\u{1F468}\\u{1F3FF}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F468}\\u{1F3FE}','\\u{1F468}\\u{1F3FF}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F468}\\u{1F3FF}','\\u{1F468}\\u{1F3FF}\\u200D\\u{1F33E}','\\u{1F468}\\u{1F3FF}\\u200D\\u{1F373}','\\u{1F468}\\u{1F3FF}\\u200D\\u{1F37C}','\\u{1F468}\\u{1F3FF}\\u200D\\u{1F393}','\\u{1F468}\\u{1F3FF}\\u200D\\u{1F3A4}','\\u{1F468}\\u{1F3FF}\\u200D\\u{1F3A8}','\\u{1F468}\\u{1F3FF}\\u200D\\u{1F3EB}','\\u{1F468}\\u{1F3FF}\\u200D\\u{1F3ED}','\\u{1F468}\\u{1F3FF}\\u200D\\u{1F4BB}','\\u{1F468}\\u{1F3FF}\\u200D\\u{1F4BC}','\\u{1F468}\\u{1F3FF}\\u200D\\u{1F527}','\\u{1F468}\\u{1F3FF}\\u200D\\u{1F52C}','\\u{1F468}\\u{1F3FF}\\u200D\\u{1F680}','\\u{1F468}\\u{1F3FF}\\u200D\\u{1F692}','\\u{1F468}\\u{1F3FF}\\u200D\\u{1F91D}\\u200D\\u{1F468}\\u{1F3FB}','\\u{1F468}\\u{1F3FF}\\u200D\\u{1F91D}\\u200D\\u{1F468}\\u{1F3FC}','\\u{1F468}\\u{1F3FF}\\u200D\\u{1F91D}\\u200D\\u{1F468}\\u{1F3FD}','\\u{1F468}\\u{1F3FF}\\u200D\\u{1F91D}\\u200D\\u{1F468}\\u{1F3FE}','\\u{1F468}\\u{1F3FF}\\u200D\\u{1F9AF}','\\u{1F468}\\u{1F3FF}\\u200D\\u{1F9AF}\\u200D\\u27A1\\uFE0F','\\u{1F468}\\u{1F3FF}\\u200D\\u{1F9B0}','\\u{1F468}\\u{1F3FF}\\u200D\\u{1F9B1}','\\u{1F468}\\u{1F3FF}\\u200D\\u{1F9B2}','\\u{1F468}\\u{1F3FF}\\u200D\\u{1F9B3}','\\u{1F468}\\u{1F3FF}\\u200D\\u{1F9BC}','\\u{1F468}\\u{1F3FF}\\u200D\\u{1F9BC}\\u200D\\u27A1\\uFE0F','\\u{1F468}\\u{1F3FF}\\u200D\\u{1F9BD}','\\u{1F468}\\u{1F3FF}\\u200D\\u{1F9BD}\\u200D\\u27A1\\uFE0F','\\u{1F469}\\u200D\\u2695\\uFE0F','\\u{1F469}\\u200D\\u2696\\uFE0F','\\u{1F469}\\u200D\\u2708\\uFE0F','\\u{1F469}\\u200D\\u2764\\uFE0F\\u200D\\u{1F468}','\\u{1F469}\\u200D\\u2764\\uFE0F\\u200D\\u{1F469}','\\u{1F469}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F468}','\\u{1F469}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F469}','\\u{1F469}\\u200D\\u{1F33E}','\\u{1F469}\\u200D\\u{1F373}','\\u{1F469}\\u200D\\u{1F37C}','\\u{1F469}\\u200D\\u{1F393}','\\u{1F469}\\u200D\\u{1F3A4}','\\u{1F469}\\u200D\\u{1F3A8}','\\u{1F469}\\u200D\\u{1F3EB}','\\u{1F469}\\u200D\\u{1F3ED}','\\u{1F469}\\u200D\\u{1F466}','\\u{1F469}\\u200D\\u{1F466}\\u200D\\u{1F466}','\\u{1F469}\\u200D\\u{1F467}','\\u{1F469}\\u200D\\u{1F467}\\u200D\\u{1F466}','\\u{1F469}\\u200D\\u{1F467}\\u200D\\u{1F467}','\\u{1F469}\\u200D\\u{1F469}\\u200D\\u{1F466}','\\u{1F469}\\u200D\\u{1F469}\\u200D\\u{1F466}\\u200D\\u{1F466}','\\u{1F469}\\u200D\\u{1F469}\\u200D\\u{1F467}','\\u{1F469}\\u200D\\u{1F469}\\u200D\\u{1F467}\\u200D\\u{1F466}','\\u{1F469}\\u200D\\u{1F469}\\u200D\\u{1F467}\\u200D\\u{1F467}','\\u{1F469}\\u200D\\u{1F4BB}','\\u{1F469}\\u200D\\u{1F4BC}','\\u{1F469}\\u200D\\u{1F527}','\\u{1F469}\\u200D\\u{1F52C}','\\u{1F469}\\u200D\\u{1F680}','\\u{1F469}\\u200D\\u{1F692}','\\u{1F469}\\u200D\\u{1F9AF}','\\u{1F469}\\u200D\\u{1F9AF}\\u200D\\u27A1\\uFE0F','\\u{1F469}\\u200D\\u{1F9B0}','\\u{1F469}\\u200D\\u{1F9B1}','\\u{1F469}\\u200D\\u{1F9B2}','\\u{1F469}\\u200D\\u{1F9B3}','\\u{1F469}\\u200D\\u{1F9BC}','\\u{1F469}\\u200D\\u{1F9BC}\\u200D\\u27A1\\uFE0F','\\u{1F469}\\u200D\\u{1F9BD}','\\u{1F469}\\u200D\\u{1F9BD}\\u200D\\u27A1\\uFE0F','\\u{1F469}\\u{1F3FB}','\\u{1F469}\\u{1F3FB}\\u200D\\u2695\\uFE0F','\\u{1F469}\\u{1F3FB}\\u200D\\u2696\\uFE0F','\\u{1F469}\\u{1F3FB}\\u200D\\u2708\\uFE0F','\\u{1F469}\\u{1F3FB}\\u200D\\u2764\\uFE0F\\u200D\\u{1F468}\\u{1F3FB}','\\u{1F469}\\u{1F3FB}\\u200D\\u2764\\uFE0F\\u200D\\u{1F468}\\u{1F3FC}','\\u{1F469}\\u{1F3FB}\\u200D\\u2764\\uFE0F\\u200D\\u{1F468}\\u{1F3FD}','\\u{1F469}\\u{1F3FB}\\u200D\\u2764\\uFE0F\\u200D\\u{1F468}\\u{1F3FE}','\\u{1F469}\\u{1F3FB}\\u200D\\u2764\\uFE0F\\u200D\\u{1F468}\\u{1F3FF}','\\u{1F469}\\u{1F3FB}\\u200D\\u2764\\uFE0F\\u200D\\u{1F469}\\u{1F3FB}','\\u{1F469}\\u{1F3FB}\\u200D\\u2764\\uFE0F\\u200D\\u{1F469}\\u{1F3FC}','\\u{1F469}\\u{1F3FB}\\u200D\\u2764\\uFE0F\\u200D\\u{1F469}\\u{1F3FD}','\\u{1F469}\\u{1F3FB}\\u200D\\u2764\\uFE0F\\u200D\\u{1F469}\\u{1F3FE}','\\u{1F469}\\u{1F3FB}\\u200D\\u2764\\uFE0F\\u200D\\u{1F469}\\u{1F3FF}','\\u{1F469}\\u{1F3FB}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F468}\\u{1F3FB}','\\u{1F469}\\u{1F3FB}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F468}\\u{1F3FC}','\\u{1F469}\\u{1F3FB}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F468}\\u{1F3FD}','\\u{1F469}\\u{1F3FB}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F468}\\u{1F3FE}','\\u{1F469}\\u{1F3FB}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F468}\\u{1F3FF}','\\u{1F469}\\u{1F3FB}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F469}\\u{1F3FB}','\\u{1F469}\\u{1F3FB}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F469}\\u{1F3FC}','\\u{1F469}\\u{1F3FB}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F469}\\u{1F3FD}','\\u{1F469}\\u{1F3FB}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F469}\\u{1F3FE}','\\u{1F469}\\u{1F3FB}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F469}\\u{1F3FF}','\\u{1F469}\\u{1F3FB}\\u200D\\u{1F33E}','\\u{1F469}\\u{1F3FB}\\u200D\\u{1F373}','\\u{1F469}\\u{1F3FB}\\u200D\\u{1F37C}','\\u{1F469}\\u{1F3FB}\\u200D\\u{1F393}','\\u{1F469}\\u{1F3FB}\\u200D\\u{1F3A4}','\\u{1F469}\\u{1F3FB}\\u200D\\u{1F3A8}','\\u{1F469}\\u{1F3FB}\\u200D\\u{1F3EB}','\\u{1F469}\\u{1F3FB}\\u200D\\u{1F3ED}','\\u{1F469}\\u{1F3FB}\\u200D\\u{1F4BB}','\\u{1F469}\\u{1F3FB}\\u200D\\u{1F4BC}','\\u{1F469}\\u{1F3FB}\\u200D\\u{1F527}','\\u{1F469}\\u{1F3FB}\\u200D\\u{1F52C}','\\u{1F469}\\u{1F3FB}\\u200D\\u{1F680}','\\u{1F469}\\u{1F3FB}\\u200D\\u{1F692}','\\u{1F469}\\u{1F3FB}\\u200D\\u{1F91D}\\u200D\\u{1F468}\\u{1F3FC}','\\u{1F469}\\u{1F3FB}\\u200D\\u{1F91D}\\u200D\\u{1F468}\\u{1F3FD}','\\u{1F469}\\u{1F3FB}\\u200D\\u{1F91D}\\u200D\\u{1F468}\\u{1F3FE}','\\u{1F469}\\u{1F3FB}\\u200D\\u{1F91D}\\u200D\\u{1F468}\\u{1F3FF}','\\u{1F469}\\u{1F3FB}\\u200D\\u{1F91D}\\u200D\\u{1F469}\\u{1F3FC}','\\u{1F469}\\u{1F3FB}\\u200D\\u{1F91D}\\u200D\\u{1F469}\\u{1F3FD}','\\u{1F469}\\u{1F3FB}\\u200D\\u{1F91D}\\u200D\\u{1F469}\\u{1F3FE}','\\u{1F469}\\u{1F3FB}\\u200D\\u{1F91D}\\u200D\\u{1F469}\\u{1F3FF}','\\u{1F469}\\u{1F3FB}\\u200D\\u{1F9AF}','\\u{1F469}\\u{1F3FB}\\u200D\\u{1F9AF}\\u200D\\u27A1\\uFE0F','\\u{1F469}\\u{1F3FB}\\u200D\\u{1F9B0}','\\u{1F469}\\u{1F3FB}\\u200D\\u{1F9B1}','\\u{1F469}\\u{1F3FB}\\u200D\\u{1F9B2}','\\u{1F469}\\u{1F3FB}\\u200D\\u{1F9B3}','\\u{1F469}\\u{1F3FB}\\u200D\\u{1F9BC}','\\u{1F469}\\u{1F3FB}\\u200D\\u{1F9BC}\\u200D\\u27A1\\uFE0F','\\u{1F469}\\u{1F3FB}\\u200D\\u{1F9BD}','\\u{1F469}\\u{1F3FB}\\u200D\\u{1F9BD}\\u200D\\u27A1\\uFE0F','\\u{1F469}\\u{1F3FC}','\\u{1F469}\\u{1F3FC}\\u200D\\u2695\\uFE0F','\\u{1F469}\\u{1F3FC}\\u200D\\u2696\\uFE0F','\\u{1F469}\\u{1F3FC}\\u200D\\u2708\\uFE0F','\\u{1F469}\\u{1F3FC}\\u200D\\u2764\\uFE0F\\u200D\\u{1F468}\\u{1F3FB}','\\u{1F469}\\u{1F3FC}\\u200D\\u2764\\uFE0F\\u200D\\u{1F468}\\u{1F3FC}','\\u{1F469}\\u{1F3FC}\\u200D\\u2764\\uFE0F\\u200D\\u{1F468}\\u{1F3FD}','\\u{1F469}\\u{1F3FC}\\u200D\\u2764\\uFE0F\\u200D\\u{1F468}\\u{1F3FE}','\\u{1F469}\\u{1F3FC}\\u200D\\u2764\\uFE0F\\u200D\\u{1F468}\\u{1F3FF}','\\u{1F469}\\u{1F3FC}\\u200D\\u2764\\uFE0F\\u200D\\u{1F469}\\u{1F3FB}','\\u{1F469}\\u{1F3FC}\\u200D\\u2764\\uFE0F\\u200D\\u{1F469}\\u{1F3FC}','\\u{1F469}\\u{1F3FC}\\u200D\\u2764\\uFE0F\\u200D\\u{1F469}\\u{1F3FD}','\\u{1F469}\\u{1F3FC}\\u200D\\u2764\\uFE0F\\u200D\\u{1F469}\\u{1F3FE}','\\u{1F469}\\u{1F3FC}\\u200D\\u2764\\uFE0F\\u200D\\u{1F469}\\u{1F3FF}','\\u{1F469}\\u{1F3FC}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F468}\\u{1F3FB}','\\u{1F469}\\u{1F3FC}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F468}\\u{1F3FC}','\\u{1F469}\\u{1F3FC}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F468}\\u{1F3FD}','\\u{1F469}\\u{1F3FC}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F468}\\u{1F3FE}','\\u{1F469}\\u{1F3FC}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F468}\\u{1F3FF}','\\u{1F469}\\u{1F3FC}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F469}\\u{1F3FB}','\\u{1F469}\\u{1F3FC}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F469}\\u{1F3FC}','\\u{1F469}\\u{1F3FC}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F469}\\u{1F3FD}','\\u{1F469}\\u{1F3FC}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F469}\\u{1F3FE}','\\u{1F469}\\u{1F3FC}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F469}\\u{1F3FF}','\\u{1F469}\\u{1F3FC}\\u200D\\u{1F33E}','\\u{1F469}\\u{1F3FC}\\u200D\\u{1F373}','\\u{1F469}\\u{1F3FC}\\u200D\\u{1F37C}','\\u{1F469}\\u{1F3FC}\\u200D\\u{1F393}','\\u{1F469}\\u{1F3FC}\\u200D\\u{1F3A4}','\\u{1F469}\\u{1F3FC}\\u200D\\u{1F3A8}','\\u{1F469}\\u{1F3FC}\\u200D\\u{1F3EB}','\\u{1F469}\\u{1F3FC}\\u200D\\u{1F3ED}','\\u{1F469}\\u{1F3FC}\\u200D\\u{1F4BB}','\\u{1F469}\\u{1F3FC}\\u200D\\u{1F4BC}','\\u{1F469}\\u{1F3FC}\\u200D\\u{1F527}','\\u{1F469}\\u{1F3FC}\\u200D\\u{1F52C}','\\u{1F469}\\u{1F3FC}\\u200D\\u{1F680}','\\u{1F469}\\u{1F3FC}\\u200D\\u{1F692}','\\u{1F469}\\u{1F3FC}\\u200D\\u{1F91D}\\u200D\\u{1F468}\\u{1F3FB}','\\u{1F469}\\u{1F3FC}\\u200D\\u{1F91D}\\u200D\\u{1F468}\\u{1F3FD}','\\u{1F469}\\u{1F3FC}\\u200D\\u{1F91D}\\u200D\\u{1F468}\\u{1F3FE}','\\u{1F469}\\u{1F3FC}\\u200D\\u{1F91D}\\u200D\\u{1F468}\\u{1F3FF}','\\u{1F469}\\u{1F3FC}\\u200D\\u{1F91D}\\u200D\\u{1F469}\\u{1F3FB}','\\u{1F469}\\u{1F3FC}\\u200D\\u{1F91D}\\u200D\\u{1F469}\\u{1F3FD}','\\u{1F469}\\u{1F3FC}\\u200D\\u{1F91D}\\u200D\\u{1F469}\\u{1F3FE}','\\u{1F469}\\u{1F3FC}\\u200D\\u{1F91D}\\u200D\\u{1F469}\\u{1F3FF}','\\u{1F469}\\u{1F3FC}\\u200D\\u{1F9AF}','\\u{1F469}\\u{1F3FC}\\u200D\\u{1F9AF}\\u200D\\u27A1\\uFE0F','\\u{1F469}\\u{1F3FC}\\u200D\\u{1F9B0}','\\u{1F469}\\u{1F3FC}\\u200D\\u{1F9B1}','\\u{1F469}\\u{1F3FC}\\u200D\\u{1F9B2}','\\u{1F469}\\u{1F3FC}\\u200D\\u{1F9B3}','\\u{1F469}\\u{1F3FC}\\u200D\\u{1F9BC}','\\u{1F469}\\u{1F3FC}\\u200D\\u{1F9BC}\\u200D\\u27A1\\uFE0F','\\u{1F469}\\u{1F3FC}\\u200D\\u{1F9BD}','\\u{1F469}\\u{1F3FC}\\u200D\\u{1F9BD}\\u200D\\u27A1\\uFE0F','\\u{1F469}\\u{1F3FD}','\\u{1F469}\\u{1F3FD}\\u200D\\u2695\\uFE0F','\\u{1F469}\\u{1F3FD}\\u200D\\u2696\\uFE0F','\\u{1F469}\\u{1F3FD}\\u200D\\u2708\\uFE0F','\\u{1F469}\\u{1F3FD}\\u200D\\u2764\\uFE0F\\u200D\\u{1F468}\\u{1F3FB}','\\u{1F469}\\u{1F3FD}\\u200D\\u2764\\uFE0F\\u200D\\u{1F468}\\u{1F3FC}','\\u{1F469}\\u{1F3FD}\\u200D\\u2764\\uFE0F\\u200D\\u{1F468}\\u{1F3FD}','\\u{1F469}\\u{1F3FD}\\u200D\\u2764\\uFE0F\\u200D\\u{1F468}\\u{1F3FE}','\\u{1F469}\\u{1F3FD}\\u200D\\u2764\\uFE0F\\u200D\\u{1F468}\\u{1F3FF}','\\u{1F469}\\u{1F3FD}\\u200D\\u2764\\uFE0F\\u200D\\u{1F469}\\u{1F3FB}','\\u{1F469}\\u{1F3FD}\\u200D\\u2764\\uFE0F\\u200D\\u{1F469}\\u{1F3FC}','\\u{1F469}\\u{1F3FD}\\u200D\\u2764\\uFE0F\\u200D\\u{1F469}\\u{1F3FD}','\\u{1F469}\\u{1F3FD}\\u200D\\u2764\\uFE0F\\u200D\\u{1F469}\\u{1F3FE}','\\u{1F469}\\u{1F3FD}\\u200D\\u2764\\uFE0F\\u200D\\u{1F469}\\u{1F3FF}','\\u{1F469}\\u{1F3FD}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F468}\\u{1F3FB}','\\u{1F469}\\u{1F3FD}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F468}\\u{1F3FC}','\\u{1F469}\\u{1F3FD}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F468}\\u{1F3FD}','\\u{1F469}\\u{1F3FD}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F468}\\u{1F3FE}','\\u{1F469}\\u{1F3FD}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F468}\\u{1F3FF}','\\u{1F469}\\u{1F3FD}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F469}\\u{1F3FB}','\\u{1F469}\\u{1F3FD}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F469}\\u{1F3FC}','\\u{1F469}\\u{1F3FD}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F469}\\u{1F3FD}','\\u{1F469}\\u{1F3FD}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F469}\\u{1F3FE}','\\u{1F469}\\u{1F3FD}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F469}\\u{1F3FF}','\\u{1F469}\\u{1F3FD}\\u200D\\u{1F33E}','\\u{1F469}\\u{1F3FD}\\u200D\\u{1F373}','\\u{1F469}\\u{1F3FD}\\u200D\\u{1F37C}','\\u{1F469}\\u{1F3FD}\\u200D\\u{1F393}','\\u{1F469}\\u{1F3FD}\\u200D\\u{1F3A4}','\\u{1F469}\\u{1F3FD}\\u200D\\u{1F3A8}','\\u{1F469}\\u{1F3FD}\\u200D\\u{1F3EB}','\\u{1F469}\\u{1F3FD}\\u200D\\u{1F3ED}','\\u{1F469}\\u{1F3FD}\\u200D\\u{1F4BB}','\\u{1F469}\\u{1F3FD}\\u200D\\u{1F4BC}','\\u{1F469}\\u{1F3FD}\\u200D\\u{1F527}','\\u{1F469}\\u{1F3FD}\\u200D\\u{1F52C}','\\u{1F469}\\u{1F3FD}\\u200D\\u{1F680}','\\u{1F469}\\u{1F3FD}\\u200D\\u{1F692}','\\u{1F469}\\u{1F3FD}\\u200D\\u{1F91D}\\u200D\\u{1F468}\\u{1F3FB}','\\u{1F469}\\u{1F3FD}\\u200D\\u{1F91D}\\u200D\\u{1F468}\\u{1F3FC}','\\u{1F469}\\u{1F3FD}\\u200D\\u{1F91D}\\u200D\\u{1F468}\\u{1F3FE}','\\u{1F469}\\u{1F3FD}\\u200D\\u{1F91D}\\u200D\\u{1F468}\\u{1F3FF}','\\u{1F469}\\u{1F3FD}\\u200D\\u{1F91D}\\u200D\\u{1F469}\\u{1F3FB}','\\u{1F469}\\u{1F3FD}\\u200D\\u{1F91D}\\u200D\\u{1F469}\\u{1F3FC}','\\u{1F469}\\u{1F3FD}\\u200D\\u{1F91D}\\u200D\\u{1F469}\\u{1F3FE}','\\u{1F469}\\u{1F3FD}\\u200D\\u{1F91D}\\u200D\\u{1F469}\\u{1F3FF}','\\u{1F469}\\u{1F3FD}\\u200D\\u{1F9AF}','\\u{1F469}\\u{1F3FD}\\u200D\\u{1F9AF}\\u200D\\u27A1\\uFE0F','\\u{1F469}\\u{1F3FD}\\u200D\\u{1F9B0}','\\u{1F469}\\u{1F3FD}\\u200D\\u{1F9B1}','\\u{1F469}\\u{1F3FD}\\u200D\\u{1F9B2}','\\u{1F469}\\u{1F3FD}\\u200D\\u{1F9B3}','\\u{1F469}\\u{1F3FD}\\u200D\\u{1F9BC}','\\u{1F469}\\u{1F3FD}\\u200D\\u{1F9BC}\\u200D\\u27A1\\uFE0F','\\u{1F469}\\u{1F3FD}\\u200D\\u{1F9BD}','\\u{1F469}\\u{1F3FD}\\u200D\\u{1F9BD}\\u200D\\u27A1\\uFE0F','\\u{1F469}\\u{1F3FE}','\\u{1F469}\\u{1F3FE}\\u200D\\u2695\\uFE0F','\\u{1F469}\\u{1F3FE}\\u200D\\u2696\\uFE0F','\\u{1F469}\\u{1F3FE}\\u200D\\u2708\\uFE0F','\\u{1F469}\\u{1F3FE}\\u200D\\u2764\\uFE0F\\u200D\\u{1F468}\\u{1F3FB}','\\u{1F469}\\u{1F3FE}\\u200D\\u2764\\uFE0F\\u200D\\u{1F468}\\u{1F3FC}','\\u{1F469}\\u{1F3FE}\\u200D\\u2764\\uFE0F\\u200D\\u{1F468}\\u{1F3FD}','\\u{1F469}\\u{1F3FE}\\u200D\\u2764\\uFE0F\\u200D\\u{1F468}\\u{1F3FE}','\\u{1F469}\\u{1F3FE}\\u200D\\u2764\\uFE0F\\u200D\\u{1F468}\\u{1F3FF}','\\u{1F469}\\u{1F3FE}\\u200D\\u2764\\uFE0F\\u200D\\u{1F469}\\u{1F3FB}','\\u{1F469}\\u{1F3FE}\\u200D\\u2764\\uFE0F\\u200D\\u{1F469}\\u{1F3FC}','\\u{1F469}\\u{1F3FE}\\u200D\\u2764\\uFE0F\\u200D\\u{1F469}\\u{1F3FD}','\\u{1F469}\\u{1F3FE}\\u200D\\u2764\\uFE0F\\u200D\\u{1F469}\\u{1F3FE}','\\u{1F469}\\u{1F3FE}\\u200D\\u2764\\uFE0F\\u200D\\u{1F469}\\u{1F3FF}','\\u{1F469}\\u{1F3FE}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F468}\\u{1F3FB}','\\u{1F469}\\u{1F3FE}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F468}\\u{1F3FC}','\\u{1F469}\\u{1F3FE}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F468}\\u{1F3FD}','\\u{1F469}\\u{1F3FE}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F468}\\u{1F3FE}','\\u{1F469}\\u{1F3FE}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F468}\\u{1F3FF}','\\u{1F469}\\u{1F3FE}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F469}\\u{1F3FB}','\\u{1F469}\\u{1F3FE}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F469}\\u{1F3FC}','\\u{1F469}\\u{1F3FE}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F469}\\u{1F3FD}','\\u{1F469}\\u{1F3FE}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F469}\\u{1F3FE}','\\u{1F469}\\u{1F3FE}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F469}\\u{1F3FF}','\\u{1F469}\\u{1F3FE}\\u200D\\u{1F33E}','\\u{1F469}\\u{1F3FE}\\u200D\\u{1F373}','\\u{1F469}\\u{1F3FE}\\u200D\\u{1F37C}','\\u{1F469}\\u{1F3FE}\\u200D\\u{1F393}','\\u{1F469}\\u{1F3FE}\\u200D\\u{1F3A4}','\\u{1F469}\\u{1F3FE}\\u200D\\u{1F3A8}','\\u{1F469}\\u{1F3FE}\\u200D\\u{1F3EB}','\\u{1F469}\\u{1F3FE}\\u200D\\u{1F3ED}','\\u{1F469}\\u{1F3FE}\\u200D\\u{1F4BB}','\\u{1F469}\\u{1F3FE}\\u200D\\u{1F4BC}','\\u{1F469}\\u{1F3FE}\\u200D\\u{1F527}','\\u{1F469}\\u{1F3FE}\\u200D\\u{1F52C}','\\u{1F469}\\u{1F3FE}\\u200D\\u{1F680}','\\u{1F469}\\u{1F3FE}\\u200D\\u{1F692}','\\u{1F469}\\u{1F3FE}\\u200D\\u{1F91D}\\u200D\\u{1F468}\\u{1F3FB}','\\u{1F469}\\u{1F3FE}\\u200D\\u{1F91D}\\u200D\\u{1F468}\\u{1F3FC}','\\u{1F469}\\u{1F3FE}\\u200D\\u{1F91D}\\u200D\\u{1F468}\\u{1F3FD}','\\u{1F469}\\u{1F3FE}\\u200D\\u{1F91D}\\u200D\\u{1F468}\\u{1F3FF}','\\u{1F469}\\u{1F3FE}\\u200D\\u{1F91D}\\u200D\\u{1F469}\\u{1F3FB}','\\u{1F469}\\u{1F3FE}\\u200D\\u{1F91D}\\u200D\\u{1F469}\\u{1F3FC}','\\u{1F469}\\u{1F3FE}\\u200D\\u{1F91D}\\u200D\\u{1F469}\\u{1F3FD}','\\u{1F469}\\u{1F3FE}\\u200D\\u{1F91D}\\u200D\\u{1F469}\\u{1F3FF}','\\u{1F469}\\u{1F3FE}\\u200D\\u{1F9AF}','\\u{1F469}\\u{1F3FE}\\u200D\\u{1F9AF}\\u200D\\u27A1\\uFE0F','\\u{1F469}\\u{1F3FE}\\u200D\\u{1F9B0}','\\u{1F469}\\u{1F3FE}\\u200D\\u{1F9B1}','\\u{1F469}\\u{1F3FE}\\u200D\\u{1F9B2}','\\u{1F469}\\u{1F3FE}\\u200D\\u{1F9B3}','\\u{1F469}\\u{1F3FE}\\u200D\\u{1F9BC}','\\u{1F469}\\u{1F3FE}\\u200D\\u{1F9BC}\\u200D\\u27A1\\uFE0F','\\u{1F469}\\u{1F3FE}\\u200D\\u{1F9BD}','\\u{1F469}\\u{1F3FE}\\u200D\\u{1F9BD}\\u200D\\u27A1\\uFE0F','\\u{1F469}\\u{1F3FF}','\\u{1F469}\\u{1F3FF}\\u200D\\u2695\\uFE0F','\\u{1F469}\\u{1F3FF}\\u200D\\u2696\\uFE0F','\\u{1F469}\\u{1F3FF}\\u200D\\u2708\\uFE0F','\\u{1F469}\\u{1F3FF}\\u200D\\u2764\\uFE0F\\u200D\\u{1F468}\\u{1F3FB}','\\u{1F469}\\u{1F3FF}\\u200D\\u2764\\uFE0F\\u200D\\u{1F468}\\u{1F3FC}','\\u{1F469}\\u{1F3FF}\\u200D\\u2764\\uFE0F\\u200D\\u{1F468}\\u{1F3FD}','\\u{1F469}\\u{1F3FF}\\u200D\\u2764\\uFE0F\\u200D\\u{1F468}\\u{1F3FE}','\\u{1F469}\\u{1F3FF}\\u200D\\u2764\\uFE0F\\u200D\\u{1F468}\\u{1F3FF}','\\u{1F469}\\u{1F3FF}\\u200D\\u2764\\uFE0F\\u200D\\u{1F469}\\u{1F3FB}','\\u{1F469}\\u{1F3FF}\\u200D\\u2764\\uFE0F\\u200D\\u{1F469}\\u{1F3FC}','\\u{1F469}\\u{1F3FF}\\u200D\\u2764\\uFE0F\\u200D\\u{1F469}\\u{1F3FD}','\\u{1F469}\\u{1F3FF}\\u200D\\u2764\\uFE0F\\u200D\\u{1F469}\\u{1F3FE}','\\u{1F469}\\u{1F3FF}\\u200D\\u2764\\uFE0F\\u200D\\u{1F469}\\u{1F3FF}','\\u{1F469}\\u{1F3FF}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F468}\\u{1F3FB}','\\u{1F469}\\u{1F3FF}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F468}\\u{1F3FC}','\\u{1F469}\\u{1F3FF}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F468}\\u{1F3FD}','\\u{1F469}\\u{1F3FF}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F468}\\u{1F3FE}','\\u{1F469}\\u{1F3FF}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F468}\\u{1F3FF}','\\u{1F469}\\u{1F3FF}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F469}\\u{1F3FB}','\\u{1F469}\\u{1F3FF}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F469}\\u{1F3FC}','\\u{1F469}\\u{1F3FF}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F469}\\u{1F3FD}','\\u{1F469}\\u{1F3FF}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F469}\\u{1F3FE}','\\u{1F469}\\u{1F3FF}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F469}\\u{1F3FF}','\\u{1F469}\\u{1F3FF}\\u200D\\u{1F33E}','\\u{1F469}\\u{1F3FF}\\u200D\\u{1F373}','\\u{1F469}\\u{1F3FF}\\u200D\\u{1F37C}','\\u{1F469}\\u{1F3FF}\\u200D\\u{1F393}','\\u{1F469}\\u{1F3FF}\\u200D\\u{1F3A4}','\\u{1F469}\\u{1F3FF}\\u200D\\u{1F3A8}','\\u{1F469}\\u{1F3FF}\\u200D\\u{1F3EB}','\\u{1F469}\\u{1F3FF}\\u200D\\u{1F3ED}','\\u{1F469}\\u{1F3FF}\\u200D\\u{1F4BB}','\\u{1F469}\\u{1F3FF}\\u200D\\u{1F4BC}','\\u{1F469}\\u{1F3FF}\\u200D\\u{1F527}','\\u{1F469}\\u{1F3FF}\\u200D\\u{1F52C}','\\u{1F469}\\u{1F3FF}\\u200D\\u{1F680}','\\u{1F469}\\u{1F3FF}\\u200D\\u{1F692}','\\u{1F469}\\u{1F3FF}\\u200D\\u{1F91D}\\u200D\\u{1F468}\\u{1F3FB}','\\u{1F469}\\u{1F3FF}\\u200D\\u{1F91D}\\u200D\\u{1F468}\\u{1F3FC}','\\u{1F469}\\u{1F3FF}\\u200D\\u{1F91D}\\u200D\\u{1F468}\\u{1F3FD}','\\u{1F469}\\u{1F3FF}\\u200D\\u{1F91D}\\u200D\\u{1F468}\\u{1F3FE}','\\u{1F469}\\u{1F3FF}\\u200D\\u{1F91D}\\u200D\\u{1F469}\\u{1F3FB}','\\u{1F469}\\u{1F3FF}\\u200D\\u{1F91D}\\u200D\\u{1F469}\\u{1F3FC}','\\u{1F469}\\u{1F3FF}\\u200D\\u{1F91D}\\u200D\\u{1F469}\\u{1F3FD}','\\u{1F469}\\u{1F3FF}\\u200D\\u{1F91D}\\u200D\\u{1F469}\\u{1F3FE}','\\u{1F469}\\u{1F3FF}\\u200D\\u{1F9AF}','\\u{1F469}\\u{1F3FF}\\u200D\\u{1F9AF}\\u200D\\u27A1\\uFE0F','\\u{1F469}\\u{1F3FF}\\u200D\\u{1F9B0}','\\u{1F469}\\u{1F3FF}\\u200D\\u{1F9B1}','\\u{1F469}\\u{1F3FF}\\u200D\\u{1F9B2}','\\u{1F469}\\u{1F3FF}\\u200D\\u{1F9B3}','\\u{1F469}\\u{1F3FF}\\u200D\\u{1F9BC}','\\u{1F469}\\u{1F3FF}\\u200D\\u{1F9BC}\\u200D\\u27A1\\uFE0F','\\u{1F469}\\u{1F3FF}\\u200D\\u{1F9BD}','\\u{1F469}\\u{1F3FF}\\u200D\\u{1F9BD}\\u200D\\u27A1\\uFE0F','\\u{1F46B}\\u{1F3FB}','\\u{1F46B}\\u{1F3FC}','\\u{1F46B}\\u{1F3FD}','\\u{1F46B}\\u{1F3FE}','\\u{1F46B}\\u{1F3FF}','\\u{1F46C}\\u{1F3FB}','\\u{1F46C}\\u{1F3FC}','\\u{1F46C}\\u{1F3FD}','\\u{1F46C}\\u{1F3FE}','\\u{1F46C}\\u{1F3FF}','\\u{1F46D}\\u{1F3FB}','\\u{1F46D}\\u{1F3FC}','\\u{1F46D}\\u{1F3FD}','\\u{1F46D}\\u{1F3FE}','\\u{1F46D}\\u{1F3FF}','\\u{1F46E}\\u200D\\u2640\\uFE0F','\\u{1F46E}\\u200D\\u2642\\uFE0F','\\u{1F46E}\\u{1F3FB}','\\u{1F46E}\\u{1F3FB}\\u200D\\u2640\\uFE0F','\\u{1F46E}\\u{1F3FB}\\u200D\\u2642\\uFE0F','\\u{1F46E}\\u{1F3FC}','\\u{1F46E}\\u{1F3FC}\\u200D\\u2640\\uFE0F','\\u{1F46E}\\u{1F3FC}\\u200D\\u2642\\uFE0F','\\u{1F46E}\\u{1F3FD}','\\u{1F46E}\\u{1F3FD}\\u200D\\u2640\\uFE0F','\\u{1F46E}\\u{1F3FD}\\u200D\\u2642\\uFE0F','\\u{1F46E}\\u{1F3FE}','\\u{1F46E}\\u{1F3FE}\\u200D\\u2640\\uFE0F','\\u{1F46E}\\u{1F3FE}\\u200D\\u2642\\uFE0F','\\u{1F46E}\\u{1F3FF}','\\u{1F46E}\\u{1F3FF}\\u200D\\u2640\\uFE0F','\\u{1F46E}\\u{1F3FF}\\u200D\\u2642\\uFE0F','\\u{1F46F}\\u200D\\u2640\\uFE0F','\\u{1F46F}\\u200D\\u2642\\uFE0F','\\u{1F470}\\u200D\\u2640\\uFE0F','\\u{1F470}\\u200D\\u2642\\uFE0F','\\u{1F470}\\u{1F3FB}','\\u{1F470}\\u{1F3FB}\\u200D\\u2640\\uFE0F','\\u{1F470}\\u{1F3FB}\\u200D\\u2642\\uFE0F','\\u{1F470}\\u{1F3FC}','\\u{1F470}\\u{1F3FC}\\u200D\\u2640\\uFE0F','\\u{1F470}\\u{1F3FC}\\u200D\\u2642\\uFE0F','\\u{1F470}\\u{1F3FD}','\\u{1F470}\\u{1F3FD}\\u200D\\u2640\\uFE0F','\\u{1F470}\\u{1F3FD}\\u200D\\u2642\\uFE0F','\\u{1F470}\\u{1F3FE}','\\u{1F470}\\u{1F3FE}\\u200D\\u2640\\uFE0F','\\u{1F470}\\u{1F3FE}\\u200D\\u2642\\uFE0F','\\u{1F470}\\u{1F3FF}','\\u{1F470}\\u{1F3FF}\\u200D\\u2640\\uFE0F','\\u{1F470}\\u{1F3FF}\\u200D\\u2642\\uFE0F','\\u{1F471}\\u200D\\u2640\\uFE0F','\\u{1F471}\\u200D\\u2642\\uFE0F','\\u{1F471}\\u{1F3FB}','\\u{1F471}\\u{1F3FB}\\u200D\\u2640\\uFE0F','\\u{1F471}\\u{1F3FB}\\u200D\\u2642\\uFE0F','\\u{1F471}\\u{1F3FC}','\\u{1F471}\\u{1F3FC}\\u200D\\u2640\\uFE0F','\\u{1F471}\\u{1F3FC}\\u200D\\u2642\\uFE0F','\\u{1F471}\\u{1F3FD}','\\u{1F471}\\u{1F3FD}\\u200D\\u2640\\uFE0F','\\u{1F471}\\u{1F3FD}\\u200D\\u2642\\uFE0F','\\u{1F471}\\u{1F3FE}','\\u{1F471}\\u{1F3FE}\\u200D\\u2640\\uFE0F','\\u{1F471}\\u{1F3FE}\\u200D\\u2642\\uFE0F','\\u{1F471}\\u{1F3FF}','\\u{1F471}\\u{1F3FF}\\u200D\\u2640\\uFE0F','\\u{1F471}\\u{1F3FF}\\u200D\\u2642\\uFE0F','\\u{1F472}\\u{1F3FB}','\\u{1F472}\\u{1F3FC}','\\u{1F472}\\u{1F3FD}','\\u{1F472}\\u{1F3FE}','\\u{1F472}\\u{1F3FF}','\\u{1F473}\\u200D\\u2640\\uFE0F','\\u{1F473}\\u200D\\u2642\\uFE0F','\\u{1F473}\\u{1F3FB}','\\u{1F473}\\u{1F3FB}\\u200D\\u2640\\uFE0F','\\u{1F473}\\u{1F3FB}\\u200D\\u2642\\uFE0F','\\u{1F473}\\u{1F3FC}','\\u{1F473}\\u{1F3FC}\\u200D\\u2640\\uFE0F','\\u{1F473}\\u{1F3FC}\\u200D\\u2642\\uFE0F','\\u{1F473}\\u{1F3FD}','\\u{1F473}\\u{1F3FD}\\u200D\\u2640\\uFE0F','\\u{1F473}\\u{1F3FD}\\u200D\\u2642\\uFE0F','\\u{1F473}\\u{1F3FE}','\\u{1F473}\\u{1F3FE}\\u200D\\u2640\\uFE0F','\\u{1F473}\\u{1F3FE}\\u200D\\u2642\\uFE0F','\\u{1F473}\\u{1F3FF}','\\u{1F473}\\u{1F3FF}\\u200D\\u2640\\uFE0F','\\u{1F473}\\u{1F3FF}\\u200D\\u2642\\uFE0F','\\u{1F474}\\u{1F3FB}','\\u{1F474}\\u{1F3FC}','\\u{1F474}\\u{1F3FD}','\\u{1F474}\\u{1F3FE}','\\u{1F474}\\u{1F3FF}','\\u{1F475}\\u{1F3FB}','\\u{1F475}\\u{1F3FC}','\\u{1F475}\\u{1F3FD}','\\u{1F475}\\u{1F3FE}','\\u{1F475}\\u{1F3FF}','\\u{1F476}\\u{1F3FB}','\\u{1F476}\\u{1F3FC}','\\u{1F476}\\u{1F3FD}','\\u{1F476}\\u{1F3FE}','\\u{1F476}\\u{1F3FF}','\\u{1F477}\\u200D\\u2640\\uFE0F','\\u{1F477}\\u200D\\u2642\\uFE0F','\\u{1F477}\\u{1F3FB}','\\u{1F477}\\u{1F3FB}\\u200D\\u2640\\uFE0F','\\u{1F477}\\u{1F3FB}\\u200D\\u2642\\uFE0F','\\u{1F477}\\u{1F3FC}','\\u{1F477}\\u{1F3FC}\\u200D\\u2640\\uFE0F','\\u{1F477}\\u{1F3FC}\\u200D\\u2642\\uFE0F','\\u{1F477}\\u{1F3FD}','\\u{1F477}\\u{1F3FD}\\u200D\\u2640\\uFE0F','\\u{1F477}\\u{1F3FD}\\u200D\\u2642\\uFE0F','\\u{1F477}\\u{1F3FE}','\\u{1F477}\\u{1F3FE}\\u200D\\u2640\\uFE0F','\\u{1F477}\\u{1F3FE}\\u200D\\u2642\\uFE0F','\\u{1F477}\\u{1F3FF}','\\u{1F477}\\u{1F3FF}\\u200D\\u2640\\uFE0F','\\u{1F477}\\u{1F3FF}\\u200D\\u2642\\uFE0F','\\u{1F478}\\u{1F3FB}','\\u{1F478}\\u{1F3FC}','\\u{1F478}\\u{1F3FD}','\\u{1F478}\\u{1F3FE}','\\u{1F478}\\u{1F3FF}','\\u{1F47C}\\u{1F3FB}','\\u{1F47C}\\u{1F3FC}','\\u{1F47C}\\u{1F3FD}','\\u{1F47C}\\u{1F3FE}','\\u{1F47C}\\u{1F3FF}','\\u{1F481}\\u200D\\u2640\\uFE0F','\\u{1F481}\\u200D\\u2642\\uFE0F','\\u{1F481}\\u{1F3FB}','\\u{1F481}\\u{1F3FB}\\u200D\\u2640\\uFE0F','\\u{1F481}\\u{1F3FB}\\u200D\\u2642\\uFE0F','\\u{1F481}\\u{1F3FC}','\\u{1F481}\\u{1F3FC}\\u200D\\u2640\\uFE0F','\\u{1F481}\\u{1F3FC}\\u200D\\u2642\\uFE0F','\\u{1F481}\\u{1F3FD}','\\u{1F481}\\u{1F3FD}\\u200D\\u2640\\uFE0F','\\u{1F481}\\u{1F3FD}\\u200D\\u2642\\uFE0F','\\u{1F481}\\u{1F3FE}','\\u{1F481}\\u{1F3FE}\\u200D\\u2640\\uFE0F','\\u{1F481}\\u{1F3FE}\\u200D\\u2642\\uFE0F','\\u{1F481}\\u{1F3FF}','\\u{1F481}\\u{1F3FF}\\u200D\\u2640\\uFE0F','\\u{1F481}\\u{1F3FF}\\u200D\\u2642\\uFE0F','\\u{1F482}\\u200D\\u2640\\uFE0F','\\u{1F482}\\u200D\\u2642\\uFE0F','\\u{1F482}\\u{1F3FB}','\\u{1F482}\\u{1F3FB}\\u200D\\u2640\\uFE0F','\\u{1F482}\\u{1F3FB}\\u200D\\u2642\\uFE0F','\\u{1F482}\\u{1F3FC}','\\u{1F482}\\u{1F3FC}\\u200D\\u2640\\uFE0F','\\u{1F482}\\u{1F3FC}\\u200D\\u2642\\uFE0F','\\u{1F482}\\u{1F3FD}','\\u{1F482}\\u{1F3FD}\\u200D\\u2640\\uFE0F','\\u{1F482}\\u{1F3FD}\\u200D\\u2642\\uFE0F','\\u{1F482}\\u{1F3FE}','\\u{1F482}\\u{1F3FE}\\u200D\\u2640\\uFE0F','\\u{1F482}\\u{1F3FE}\\u200D\\u2642\\uFE0F','\\u{1F482}\\u{1F3FF}','\\u{1F482}\\u{1F3FF}\\u200D\\u2640\\uFE0F','\\u{1F482}\\u{1F3FF}\\u200D\\u2642\\uFE0F','\\u{1F483}\\u{1F3FB}','\\u{1F483}\\u{1F3FC}','\\u{1F483}\\u{1F3FD}','\\u{1F483}\\u{1F3FE}','\\u{1F483}\\u{1F3FF}','\\u{1F485}\\u{1F3FB}','\\u{1F485}\\u{1F3FC}','\\u{1F485}\\u{1F3FD}','\\u{1F485}\\u{1F3FE}','\\u{1F485}\\u{1F3FF}','\\u{1F486}\\u200D\\u2640\\uFE0F','\\u{1F486}\\u200D\\u2642\\uFE0F','\\u{1F486}\\u{1F3FB}','\\u{1F486}\\u{1F3FB}\\u200D\\u2640\\uFE0F','\\u{1F486}\\u{1F3FB}\\u200D\\u2642\\uFE0F','\\u{1F486}\\u{1F3FC}','\\u{1F486}\\u{1F3FC}\\u200D\\u2640\\uFE0F','\\u{1F486}\\u{1F3FC}\\u200D\\u2642\\uFE0F','\\u{1F486}\\u{1F3FD}','\\u{1F486}\\u{1F3FD}\\u200D\\u2640\\uFE0F','\\u{1F486}\\u{1F3FD}\\u200D\\u2642\\uFE0F','\\u{1F486}\\u{1F3FE}','\\u{1F486}\\u{1F3FE}\\u200D\\u2640\\uFE0F','\\u{1F486}\\u{1F3FE}\\u200D\\u2642\\uFE0F','\\u{1F486}\\u{1F3FF}','\\u{1F486}\\u{1F3FF}\\u200D\\u2640\\uFE0F','\\u{1F486}\\u{1F3FF}\\u200D\\u2642\\uFE0F','\\u{1F487}\\u200D\\u2640\\uFE0F','\\u{1F487}\\u200D\\u2642\\uFE0F','\\u{1F487}\\u{1F3FB}','\\u{1F487}\\u{1F3FB}\\u200D\\u2640\\uFE0F','\\u{1F487}\\u{1F3FB}\\u200D\\u2642\\uFE0F','\\u{1F487}\\u{1F3FC}','\\u{1F487}\\u{1F3FC}\\u200D\\u2640\\uFE0F','\\u{1F487}\\u{1F3FC}\\u200D\\u2642\\uFE0F','\\u{1F487}\\u{1F3FD}','\\u{1F487}\\u{1F3FD}\\u200D\\u2640\\uFE0F','\\u{1F487}\\u{1F3FD}\\u200D\\u2642\\uFE0F','\\u{1F487}\\u{1F3FE}','\\u{1F487}\\u{1F3FE}\\u200D\\u2640\\uFE0F','\\u{1F487}\\u{1F3FE}\\u200D\\u2642\\uFE0F','\\u{1F487}\\u{1F3FF}','\\u{1F487}\\u{1F3FF}\\u200D\\u2640\\uFE0F','\\u{1F487}\\u{1F3FF}\\u200D\\u2642\\uFE0F','\\u{1F48F}\\u{1F3FB}','\\u{1F48F}\\u{1F3FC}','\\u{1F48F}\\u{1F3FD}','\\u{1F48F}\\u{1F3FE}','\\u{1F48F}\\u{1F3FF}','\\u{1F491}\\u{1F3FB}','\\u{1F491}\\u{1F3FC}','\\u{1F491}\\u{1F3FD}','\\u{1F491}\\u{1F3FE}','\\u{1F491}\\u{1F3FF}','\\u{1F4AA}\\u{1F3FB}','\\u{1F4AA}\\u{1F3FC}','\\u{1F4AA}\\u{1F3FD}','\\u{1F4AA}\\u{1F3FE}','\\u{1F4AA}\\u{1F3FF}','\\u{1F4FD}\\uFE0F','\\u{1F549}\\uFE0F','\\u{1F54A}\\uFE0F','\\u{1F56F}\\uFE0F','\\u{1F570}\\uFE0F','\\u{1F573}\\uFE0F','\\u{1F574}\\u{1F3FB}','\\u{1F574}\\u{1F3FC}','\\u{1F574}\\u{1F3FD}','\\u{1F574}\\u{1F3FE}','\\u{1F574}\\u{1F3FF}','\\u{1F574}\\uFE0F','\\u{1F575}\\u{1F3FB}','\\u{1F575}\\u{1F3FB}\\u200D\\u2640\\uFE0F','\\u{1F575}\\u{1F3FB}\\u200D\\u2642\\uFE0F','\\u{1F575}\\u{1F3FC}','\\u{1F575}\\u{1F3FC}\\u200D\\u2640\\uFE0F','\\u{1F575}\\u{1F3FC}\\u200D\\u2642\\uFE0F','\\u{1F575}\\u{1F3FD}','\\u{1F575}\\u{1F3FD}\\u200D\\u2640\\uFE0F','\\u{1F575}\\u{1F3FD}\\u200D\\u2642\\uFE0F','\\u{1F575}\\u{1F3FE}','\\u{1F575}\\u{1F3FE}\\u200D\\u2640\\uFE0F','\\u{1F575}\\u{1F3FE}\\u200D\\u2642\\uFE0F','\\u{1F575}\\u{1F3FF}','\\u{1F575}\\u{1F3FF}\\u200D\\u2640\\uFE0F','\\u{1F575}\\u{1F3FF}\\u200D\\u2642\\uFE0F','\\u{1F575}\\uFE0F','\\u{1F575}\\uFE0F\\u200D\\u2640\\uFE0F','\\u{1F575}\\uFE0F\\u200D\\u2642\\uFE0F','\\u{1F576}\\uFE0F','\\u{1F577}\\uFE0F','\\u{1F578}\\uFE0F','\\u{1F579}\\uFE0F','\\u{1F57A}\\u{1F3FB}','\\u{1F57A}\\u{1F3FC}','\\u{1F57A}\\u{1F3FD}','\\u{1F57A}\\u{1F3FE}','\\u{1F57A}\\u{1F3FF}','\\u{1F587}\\uFE0F','\\u{1F58A}\\uFE0F','\\u{1F58B}\\uFE0F','\\u{1F58C}\\uFE0F','\\u{1F58D}\\uFE0F','\\u{1F590}\\u{1F3FB}','\\u{1F590}\\u{1F3FC}','\\u{1F590}\\u{1F3FD}','\\u{1F590}\\u{1F3FE}','\\u{1F590}\\u{1F3FF}','\\u{1F590}\\uFE0F','\\u{1F595}\\u{1F3FB}','\\u{1F595}\\u{1F3FC}','\\u{1F595}\\u{1F3FD}','\\u{1F595}\\u{1F3FE}','\\u{1F595}\\u{1F3FF}','\\u{1F596}\\u{1F3FB}','\\u{1F596}\\u{1F3FC}','\\u{1F596}\\u{1F3FD}','\\u{1F596}\\u{1F3FE}','\\u{1F596}\\u{1F3FF}','\\u{1F5A5}\\uFE0F','\\u{1F5A8}\\uFE0F','\\u{1F5B1}\\uFE0F','\\u{1F5B2}\\uFE0F','\\u{1F5BC}\\uFE0F','\\u{1F5C2}\\uFE0F','\\u{1F5C3}\\uFE0F','\\u{1F5C4}\\uFE0F','\\u{1F5D1}\\uFE0F','\\u{1F5D2}\\uFE0F','\\u{1F5D3}\\uFE0F','\\u{1F5DC}\\uFE0F','\\u{1F5DD}\\uFE0F','\\u{1F5DE}\\uFE0F','\\u{1F5E1}\\uFE0F','\\u{1F5E3}\\uFE0F','\\u{1F5E8}\\uFE0F','\\u{1F5EF}\\uFE0F','\\u{1F5F3}\\uFE0F','\\u{1F5FA}\\uFE0F','\\u{1F62E}\\u200D\\u{1F4A8}','\\u{1F635}\\u200D\\u{1F4AB}','\\u{1F636}\\u200D\\u{1F32B}\\uFE0F','\\u{1F642}\\u200D\\u2194\\uFE0F','\\u{1F642}\\u200D\\u2195\\uFE0F','\\u{1F645}\\u200D\\u2640\\uFE0F','\\u{1F645}\\u200D\\u2642\\uFE0F','\\u{1F645}\\u{1F3FB}','\\u{1F645}\\u{1F3FB}\\u200D\\u2640\\uFE0F','\\u{1F645}\\u{1F3FB}\\u200D\\u2642\\uFE0F','\\u{1F645}\\u{1F3FC}','\\u{1F645}\\u{1F3FC}\\u200D\\u2640\\uFE0F','\\u{1F645}\\u{1F3FC}\\u200D\\u2642\\uFE0F','\\u{1F645}\\u{1F3FD}','\\u{1F645}\\u{1F3FD}\\u200D\\u2640\\uFE0F','\\u{1F645}\\u{1F3FD}\\u200D\\u2642\\uFE0F','\\u{1F645}\\u{1F3FE}','\\u{1F645}\\u{1F3FE}\\u200D\\u2640\\uFE0F','\\u{1F645}\\u{1F3FE}\\u200D\\u2642\\uFE0F','\\u{1F645}\\u{1F3FF}','\\u{1F645}\\u{1F3FF}\\u200D\\u2640\\uFE0F','\\u{1F645}\\u{1F3FF}\\u200D\\u2642\\uFE0F','\\u{1F646}\\u200D\\u2640\\uFE0F','\\u{1F646}\\u200D\\u2642\\uFE0F','\\u{1F646}\\u{1F3FB}','\\u{1F646}\\u{1F3FB}\\u200D\\u2640\\uFE0F','\\u{1F646}\\u{1F3FB}\\u200D\\u2642\\uFE0F','\\u{1F646}\\u{1F3FC}','\\u{1F646}\\u{1F3FC}\\u200D\\u2640\\uFE0F','\\u{1F646}\\u{1F3FC}\\u200D\\u2642\\uFE0F','\\u{1F646}\\u{1F3FD}','\\u{1F646}\\u{1F3FD}\\u200D\\u2640\\uFE0F','\\u{1F646}\\u{1F3FD}\\u200D\\u2642\\uFE0F','\\u{1F646}\\u{1F3FE}','\\u{1F646}\\u{1F3FE}\\u200D\\u2640\\uFE0F','\\u{1F646}\\u{1F3FE}\\u200D\\u2642\\uFE0F','\\u{1F646}\\u{1F3FF}','\\u{1F646}\\u{1F3FF}\\u200D\\u2640\\uFE0F','\\u{1F646}\\u{1F3FF}\\u200D\\u2642\\uFE0F','\\u{1F647}\\u200D\\u2640\\uFE0F','\\u{1F647}\\u200D\\u2642\\uFE0F','\\u{1F647}\\u{1F3FB}','\\u{1F647}\\u{1F3FB}\\u200D\\u2640\\uFE0F','\\u{1F647}\\u{1F3FB}\\u200D\\u2642\\uFE0F','\\u{1F647}\\u{1F3FC}','\\u{1F647}\\u{1F3FC}\\u200D\\u2640\\uFE0F','\\u{1F647}\\u{1F3FC}\\u200D\\u2642\\uFE0F','\\u{1F647}\\u{1F3FD}','\\u{1F647}\\u{1F3FD}\\u200D\\u2640\\uFE0F','\\u{1F647}\\u{1F3FD}\\u200D\\u2642\\uFE0F','\\u{1F647}\\u{1F3FE}','\\u{1F647}\\u{1F3FE}\\u200D\\u2640\\uFE0F','\\u{1F647}\\u{1F3FE}\\u200D\\u2642\\uFE0F','\\u{1F647}\\u{1F3FF}','\\u{1F647}\\u{1F3FF}\\u200D\\u2640\\uFE0F','\\u{1F647}\\u{1F3FF}\\u200D\\u2642\\uFE0F','\\u{1F64B}\\u200D\\u2640\\uFE0F','\\u{1F64B}\\u200D\\u2642\\uFE0F','\\u{1F64B}\\u{1F3FB}','\\u{1F64B}\\u{1F3FB}\\u200D\\u2640\\uFE0F','\\u{1F64B}\\u{1F3FB}\\u200D\\u2642\\uFE0F','\\u{1F64B}\\u{1F3FC}','\\u{1F64B}\\u{1F3FC}\\u200D\\u2640\\uFE0F','\\u{1F64B}\\u{1F3FC}\\u200D\\u2642\\uFE0F','\\u{1F64B}\\u{1F3FD}','\\u{1F64B}\\u{1F3FD}\\u200D\\u2640\\uFE0F','\\u{1F64B}\\u{1F3FD}\\u200D\\u2642\\uFE0F','\\u{1F64B}\\u{1F3FE}','\\u{1F64B}\\u{1F3FE}\\u200D\\u2640\\uFE0F','\\u{1F64B}\\u{1F3FE}\\u200D\\u2642\\uFE0F','\\u{1F64B}\\u{1F3FF}','\\u{1F64B}\\u{1F3FF}\\u200D\\u2640\\uFE0F','\\u{1F64B}\\u{1F3FF}\\u200D\\u2642\\uFE0F','\\u{1F64C}\\u{1F3FB}','\\u{1F64C}\\u{1F3FC}','\\u{1F64C}\\u{1F3FD}','\\u{1F64C}\\u{1F3FE}','\\u{1F64C}\\u{1F3FF}','\\u{1F64D}\\u200D\\u2640\\uFE0F','\\u{1F64D}\\u200D\\u2642\\uFE0F','\\u{1F64D}\\u{1F3FB}','\\u{1F64D}\\u{1F3FB}\\u200D\\u2640\\uFE0F','\\u{1F64D}\\u{1F3FB}\\u200D\\u2642\\uFE0F','\\u{1F64D}\\u{1F3FC}','\\u{1F64D}\\u{1F3FC}\\u200D\\u2640\\uFE0F','\\u{1F64D}\\u{1F3FC}\\u200D\\u2642\\uFE0F','\\u{1F64D}\\u{1F3FD}','\\u{1F64D}\\u{1F3FD}\\u200D\\u2640\\uFE0F','\\u{1F64D}\\u{1F3FD}\\u200D\\u2642\\uFE0F','\\u{1F64D}\\u{1F3FE}','\\u{1F64D}\\u{1F3FE}\\u200D\\u2640\\uFE0F','\\u{1F64D}\\u{1F3FE}\\u200D\\u2642\\uFE0F','\\u{1F64D}\\u{1F3FF}','\\u{1F64D}\\u{1F3FF}\\u200D\\u2640\\uFE0F','\\u{1F64D}\\u{1F3FF}\\u200D\\u2642\\uFE0F','\\u{1F64E}\\u200D\\u2640\\uFE0F','\\u{1F64E}\\u200D\\u2642\\uFE0F','\\u{1F64E}\\u{1F3FB}','\\u{1F64E}\\u{1F3FB}\\u200D\\u2640\\uFE0F','\\u{1F64E}\\u{1F3FB}\\u200D\\u2642\\uFE0F','\\u{1F64E}\\u{1F3FC}','\\u{1F64E}\\u{1F3FC}\\u200D\\u2640\\uFE0F','\\u{1F64E}\\u{1F3FC}\\u200D\\u2642\\uFE0F','\\u{1F64E}\\u{1F3FD}','\\u{1F64E}\\u{1F3FD}\\u200D\\u2640\\uFE0F','\\u{1F64E}\\u{1F3FD}\\u200D\\u2642\\uFE0F','\\u{1F64E}\\u{1F3FE}','\\u{1F64E}\\u{1F3FE}\\u200D\\u2640\\uFE0F','\\u{1F64E}\\u{1F3FE}\\u200D\\u2642\\uFE0F','\\u{1F64E}\\u{1F3FF}','\\u{1F64E}\\u{1F3FF}\\u200D\\u2640\\uFE0F','\\u{1F64E}\\u{1F3FF}\\u200D\\u2642\\uFE0F','\\u{1F64F}\\u{1F3FB}','\\u{1F64F}\\u{1F3FC}','\\u{1F64F}\\u{1F3FD}','\\u{1F64F}\\u{1F3FE}','\\u{1F64F}\\u{1F3FF}','\\u{1F6A3}\\u200D\\u2640\\uFE0F','\\u{1F6A3}\\u200D\\u2642\\uFE0F','\\u{1F6A3}\\u{1F3FB}','\\u{1F6A3}\\u{1F3FB}\\u200D\\u2640\\uFE0F','\\u{1F6A3}\\u{1F3FB}\\u200D\\u2642\\uFE0F','\\u{1F6A3}\\u{1F3FC}','\\u{1F6A3}\\u{1F3FC}\\u200D\\u2640\\uFE0F','\\u{1F6A3}\\u{1F3FC}\\u200D\\u2642\\uFE0F','\\u{1F6A3}\\u{1F3FD}','\\u{1F6A3}\\u{1F3FD}\\u200D\\u2640\\uFE0F','\\u{1F6A3}\\u{1F3FD}\\u200D\\u2642\\uFE0F','\\u{1F6A3}\\u{1F3FE}','\\u{1F6A3}\\u{1F3FE}\\u200D\\u2640\\uFE0F','\\u{1F6A3}\\u{1F3FE}\\u200D\\u2642\\uFE0F','\\u{1F6A3}\\u{1F3FF}','\\u{1F6A3}\\u{1F3FF}\\u200D\\u2640\\uFE0F','\\u{1F6A3}\\u{1F3FF}\\u200D\\u2642\\uFE0F','\\u{1F6B4}\\u200D\\u2640\\uFE0F','\\u{1F6B4}\\u200D\\u2642\\uFE0F','\\u{1F6B4}\\u{1F3FB}','\\u{1F6B4}\\u{1F3FB}\\u200D\\u2640\\uFE0F','\\u{1F6B4}\\u{1F3FB}\\u200D\\u2642\\uFE0F','\\u{1F6B4}\\u{1F3FC}','\\u{1F6B4}\\u{1F3FC}\\u200D\\u2640\\uFE0F','\\u{1F6B4}\\u{1F3FC}\\u200D\\u2642\\uFE0F','\\u{1F6B4}\\u{1F3FD}','\\u{1F6B4}\\u{1F3FD}\\u200D\\u2640\\uFE0F','\\u{1F6B4}\\u{1F3FD}\\u200D\\u2642\\uFE0F','\\u{1F6B4}\\u{1F3FE}','\\u{1F6B4}\\u{1F3FE}\\u200D\\u2640\\uFE0F','\\u{1F6B4}\\u{1F3FE}\\u200D\\u2642\\uFE0F','\\u{1F6B4}\\u{1F3FF}','\\u{1F6B4}\\u{1F3FF}\\u200D\\u2640\\uFE0F','\\u{1F6B4}\\u{1F3FF}\\u200D\\u2642\\uFE0F','\\u{1F6B5}\\u200D\\u2640\\uFE0F','\\u{1F6B5}\\u200D\\u2642\\uFE0F','\\u{1F6B5}\\u{1F3FB}','\\u{1F6B5}\\u{1F3FB}\\u200D\\u2640\\uFE0F','\\u{1F6B5}\\u{1F3FB}\\u200D\\u2642\\uFE0F','\\u{1F6B5}\\u{1F3FC}','\\u{1F6B5}\\u{1F3FC}\\u200D\\u2640\\uFE0F','\\u{1F6B5}\\u{1F3FC}\\u200D\\u2642\\uFE0F','\\u{1F6B5}\\u{1F3FD}','\\u{1F6B5}\\u{1F3FD}\\u200D\\u2640\\uFE0F','\\u{1F6B5}\\u{1F3FD}\\u200D\\u2642\\uFE0F','\\u{1F6B5}\\u{1F3FE}','\\u{1F6B5}\\u{1F3FE}\\u200D\\u2640\\uFE0F','\\u{1F6B5}\\u{1F3FE}\\u200D\\u2642\\uFE0F','\\u{1F6B5}\\u{1F3FF}','\\u{1F6B5}\\u{1F3FF}\\u200D\\u2640\\uFE0F','\\u{1F6B5}\\u{1F3FF}\\u200D\\u2642\\uFE0F','\\u{1F6B6}\\u200D\\u2640\\uFE0F','\\u{1F6B6}\\u200D\\u2640\\uFE0F\\u200D\\u27A1\\uFE0F','\\u{1F6B6}\\u200D\\u2642\\uFE0F','\\u{1F6B6}\\u200D\\u2642\\uFE0F\\u200D\\u27A1\\uFE0F','\\u{1F6B6}\\u200D\\u27A1\\uFE0F','\\u{1F6B6}\\u{1F3FB}','\\u{1F6B6}\\u{1F3FB}\\u200D\\u2640\\uFE0F','\\u{1F6B6}\\u{1F3FB}\\u200D\\u2640\\uFE0F\\u200D\\u27A1\\uFE0F','\\u{1F6B6}\\u{1F3FB}\\u200D\\u2642\\uFE0F','\\u{1F6B6}\\u{1F3FB}\\u200D\\u2642\\uFE0F\\u200D\\u27A1\\uFE0F','\\u{1F6B6}\\u{1F3FB}\\u200D\\u27A1\\uFE0F','\\u{1F6B6}\\u{1F3FC}','\\u{1F6B6}\\u{1F3FC}\\u200D\\u2640\\uFE0F','\\u{1F6B6}\\u{1F3FC}\\u200D\\u2640\\uFE0F\\u200D\\u27A1\\uFE0F','\\u{1F6B6}\\u{1F3FC}\\u200D\\u2642\\uFE0F','\\u{1F6B6}\\u{1F3FC}\\u200D\\u2642\\uFE0F\\u200D\\u27A1\\uFE0F','\\u{1F6B6}\\u{1F3FC}\\u200D\\u27A1\\uFE0F','\\u{1F6B6}\\u{1F3FD}','\\u{1F6B6}\\u{1F3FD}\\u200D\\u2640\\uFE0F','\\u{1F6B6}\\u{1F3FD}\\u200D\\u2640\\uFE0F\\u200D\\u27A1\\uFE0F','\\u{1F6B6}\\u{1F3FD}\\u200D\\u2642\\uFE0F','\\u{1F6B6}\\u{1F3FD}\\u200D\\u2642\\uFE0F\\u200D\\u27A1\\uFE0F','\\u{1F6B6}\\u{1F3FD}\\u200D\\u27A1\\uFE0F','\\u{1F6B6}\\u{1F3FE}','\\u{1F6B6}\\u{1F3FE}\\u200D\\u2640\\uFE0F','\\u{1F6B6}\\u{1F3FE}\\u200D\\u2640\\uFE0F\\u200D\\u27A1\\uFE0F','\\u{1F6B6}\\u{1F3FE}\\u200D\\u2642\\uFE0F','\\u{1F6B6}\\u{1F3FE}\\u200D\\u2642\\uFE0F\\u200D\\u27A1\\uFE0F','\\u{1F6B6}\\u{1F3FE}\\u200D\\u27A1\\uFE0F','\\u{1F6B6}\\u{1F3FF}','\\u{1F6B6}\\u{1F3FF}\\u200D\\u2640\\uFE0F','\\u{1F6B6}\\u{1F3FF}\\u200D\\u2640\\uFE0F\\u200D\\u27A1\\uFE0F','\\u{1F6B6}\\u{1F3FF}\\u200D\\u2642\\uFE0F','\\u{1F6B6}\\u{1F3FF}\\u200D\\u2642\\uFE0F\\u200D\\u27A1\\uFE0F','\\u{1F6B6}\\u{1F3FF}\\u200D\\u27A1\\uFE0F','\\u{1F6C0}\\u{1F3FB}','\\u{1F6C0}\\u{1F3FC}','\\u{1F6C0}\\u{1F3FD}','\\u{1F6C0}\\u{1F3FE}','\\u{1F6C0}\\u{1F3FF}','\\u{1F6CB}\\uFE0F','\\u{1F6CC}\\u{1F3FB}','\\u{1F6CC}\\u{1F3FC}','\\u{1F6CC}\\u{1F3FD}','\\u{1F6CC}\\u{1F3FE}','\\u{1F6CC}\\u{1F3FF}','\\u{1F6CD}\\uFE0F','\\u{1F6CE}\\uFE0F','\\u{1F6CF}\\uFE0F','\\u{1F6E0}\\uFE0F','\\u{1F6E1}\\uFE0F','\\u{1F6E2}\\uFE0F','\\u{1F6E3}\\uFE0F','\\u{1F6E4}\\uFE0F','\\u{1F6E5}\\uFE0F','\\u{1F6E9}\\uFE0F','\\u{1F6F0}\\uFE0F','\\u{1F6F3}\\uFE0F','\\u{1F90C}\\u{1F3FB}','\\u{1F90C}\\u{1F3FC}','\\u{1F90C}\\u{1F3FD}','\\u{1F90C}\\u{1F3FE}','\\u{1F90C}\\u{1F3FF}','\\u{1F90F}\\u{1F3FB}','\\u{1F90F}\\u{1F3FC}','\\u{1F90F}\\u{1F3FD}','\\u{1F90F}\\u{1F3FE}','\\u{1F90F}\\u{1F3FF}','\\u{1F918}\\u{1F3FB}','\\u{1F918}\\u{1F3FC}','\\u{1F918}\\u{1F3FD}','\\u{1F918}\\u{1F3FE}','\\u{1F918}\\u{1F3FF}','\\u{1F919}\\u{1F3FB}','\\u{1F919}\\u{1F3FC}','\\u{1F919}\\u{1F3FD}','\\u{1F919}\\u{1F3FE}','\\u{1F919}\\u{1F3FF}','\\u{1F91A}\\u{1F3FB}','\\u{1F91A}\\u{1F3FC}','\\u{1F91A}\\u{1F3FD}','\\u{1F91A}\\u{1F3FE}','\\u{1F91A}\\u{1F3FF}','\\u{1F91B}\\u{1F3FB}','\\u{1F91B}\\u{1F3FC}','\\u{1F91B}\\u{1F3FD}','\\u{1F91B}\\u{1F3FE}','\\u{1F91B}\\u{1F3FF}','\\u{1F91C}\\u{1F3FB}','\\u{1F91C}\\u{1F3FC}','\\u{1F91C}\\u{1F3FD}','\\u{1F91C}\\u{1F3FE}','\\u{1F91C}\\u{1F3FF}','\\u{1F91D}\\u{1F3FB}','\\u{1F91D}\\u{1F3FC}','\\u{1F91D}\\u{1F3FD}','\\u{1F91D}\\u{1F3FE}','\\u{1F91D}\\u{1F3FF}','\\u{1F91E}\\u{1F3FB}','\\u{1F91E}\\u{1F3FC}','\\u{1F91E}\\u{1F3FD}','\\u{1F91E}\\u{1F3FE}','\\u{1F91E}\\u{1F3FF}','\\u{1F91F}\\u{1F3FB}','\\u{1F91F}\\u{1F3FC}','\\u{1F91F}\\u{1F3FD}','\\u{1F91F}\\u{1F3FE}','\\u{1F91F}\\u{1F3FF}','\\u{1F926}\\u200D\\u2640\\uFE0F','\\u{1F926}\\u200D\\u2642\\uFE0F','\\u{1F926}\\u{1F3FB}','\\u{1F926}\\u{1F3FB}\\u200D\\u2640\\uFE0F','\\u{1F926}\\u{1F3FB}\\u200D\\u2642\\uFE0F','\\u{1F926}\\u{1F3FC}','\\u{1F926}\\u{1F3FC}\\u200D\\u2640\\uFE0F','\\u{1F926}\\u{1F3FC}\\u200D\\u2642\\uFE0F','\\u{1F926}\\u{1F3FD}','\\u{1F926}\\u{1F3FD}\\u200D\\u2640\\uFE0F','\\u{1F926}\\u{1F3FD}\\u200D\\u2642\\uFE0F','\\u{1F926}\\u{1F3FE}','\\u{1F926}\\u{1F3FE}\\u200D\\u2640\\uFE0F','\\u{1F926}\\u{1F3FE}\\u200D\\u2642\\uFE0F','\\u{1F926}\\u{1F3FF}','\\u{1F926}\\u{1F3FF}\\u200D\\u2640\\uFE0F','\\u{1F926}\\u{1F3FF}\\u200D\\u2642\\uFE0F','\\u{1F930}\\u{1F3FB}','\\u{1F930}\\u{1F3FC}','\\u{1F930}\\u{1F3FD}','\\u{1F930}\\u{1F3FE}','\\u{1F930}\\u{1F3FF}','\\u{1F931}\\u{1F3FB}','\\u{1F931}\\u{1F3FC}','\\u{1F931}\\u{1F3FD}','\\u{1F931}\\u{1F3FE}','\\u{1F931}\\u{1F3FF}','\\u{1F932}\\u{1F3FB}','\\u{1F932}\\u{1F3FC}','\\u{1F932}\\u{1F3FD}','\\u{1F932}\\u{1F3FE}','\\u{1F932}\\u{1F3FF}','\\u{1F933}\\u{1F3FB}','\\u{1F933}\\u{1F3FC}','\\u{1F933}\\u{1F3FD}','\\u{1F933}\\u{1F3FE}','\\u{1F933}\\u{1F3FF}','\\u{1F934}\\u{1F3FB}','\\u{1F934}\\u{1F3FC}','\\u{1F934}\\u{1F3FD}','\\u{1F934}\\u{1F3FE}','\\u{1F934}\\u{1F3FF}','\\u{1F935}\\u200D\\u2640\\uFE0F','\\u{1F935}\\u200D\\u2642\\uFE0F','\\u{1F935}\\u{1F3FB}','\\u{1F935}\\u{1F3FB}\\u200D\\u2640\\uFE0F','\\u{1F935}\\u{1F3FB}\\u200D\\u2642\\uFE0F','\\u{1F935}\\u{1F3FC}','\\u{1F935}\\u{1F3FC}\\u200D\\u2640\\uFE0F','\\u{1F935}\\u{1F3FC}\\u200D\\u2642\\uFE0F','\\u{1F935}\\u{1F3FD}','\\u{1F935}\\u{1F3FD}\\u200D\\u2640\\uFE0F','\\u{1F935}\\u{1F3FD}\\u200D\\u2642\\uFE0F','\\u{1F935}\\u{1F3FE}','\\u{1F935}\\u{1F3FE}\\u200D\\u2640\\uFE0F','\\u{1F935}\\u{1F3FE}\\u200D\\u2642\\uFE0F','\\u{1F935}\\u{1F3FF}','\\u{1F935}\\u{1F3FF}\\u200D\\u2640\\uFE0F','\\u{1F935}\\u{1F3FF}\\u200D\\u2642\\uFE0F','\\u{1F936}\\u{1F3FB}','\\u{1F936}\\u{1F3FC}','\\u{1F936}\\u{1F3FD}','\\u{1F936}\\u{1F3FE}','\\u{1F936}\\u{1F3FF}','\\u{1F937}\\u200D\\u2640\\uFE0F','\\u{1F937}\\u200D\\u2642\\uFE0F','\\u{1F937}\\u{1F3FB}','\\u{1F937}\\u{1F3FB}\\u200D\\u2640\\uFE0F','\\u{1F937}\\u{1F3FB}\\u200D\\u2642\\uFE0F','\\u{1F937}\\u{1F3FC}','\\u{1F937}\\u{1F3FC}\\u200D\\u2640\\uFE0F','\\u{1F937}\\u{1F3FC}\\u200D\\u2642\\uFE0F','\\u{1F937}\\u{1F3FD}','\\u{1F937}\\u{1F3FD}\\u200D\\u2640\\uFE0F','\\u{1F937}\\u{1F3FD}\\u200D\\u2642\\uFE0F','\\u{1F937}\\u{1F3FE}','\\u{1F937}\\u{1F3FE}\\u200D\\u2640\\uFE0F','\\u{1F937}\\u{1F3FE}\\u200D\\u2642\\uFE0F','\\u{1F937}\\u{1F3FF}','\\u{1F937}\\u{1F3FF}\\u200D\\u2640\\uFE0F','\\u{1F937}\\u{1F3FF}\\u200D\\u2642\\uFE0F','\\u{1F938}\\u200D\\u2640\\uFE0F','\\u{1F938}\\u200D\\u2642\\uFE0F','\\u{1F938}\\u{1F3FB}','\\u{1F938}\\u{1F3FB}\\u200D\\u2640\\uFE0F','\\u{1F938}\\u{1F3FB}\\u200D\\u2642\\uFE0F','\\u{1F938}\\u{1F3FC}','\\u{1F938}\\u{1F3FC}\\u200D\\u2640\\uFE0F','\\u{1F938}\\u{1F3FC}\\u200D\\u2642\\uFE0F','\\u{1F938}\\u{1F3FD}','\\u{1F938}\\u{1F3FD}\\u200D\\u2640\\uFE0F','\\u{1F938}\\u{1F3FD}\\u200D\\u2642\\uFE0F','\\u{1F938}\\u{1F3FE}','\\u{1F938}\\u{1F3FE}\\u200D\\u2640\\uFE0F','\\u{1F938}\\u{1F3FE}\\u200D\\u2642\\uFE0F','\\u{1F938}\\u{1F3FF}','\\u{1F938}\\u{1F3FF}\\u200D\\u2640\\uFE0F','\\u{1F938}\\u{1F3FF}\\u200D\\u2642\\uFE0F','\\u{1F939}\\u200D\\u2640\\uFE0F','\\u{1F939}\\u200D\\u2642\\uFE0F','\\u{1F939}\\u{1F3FB}','\\u{1F939}\\u{1F3FB}\\u200D\\u2640\\uFE0F','\\u{1F939}\\u{1F3FB}\\u200D\\u2642\\uFE0F','\\u{1F939}\\u{1F3FC}','\\u{1F939}\\u{1F3FC}\\u200D\\u2640\\uFE0F','\\u{1F939}\\u{1F3FC}\\u200D\\u2642\\uFE0F','\\u{1F939}\\u{1F3FD}','\\u{1F939}\\u{1F3FD}\\u200D\\u2640\\uFE0F','\\u{1F939}\\u{1F3FD}\\u200D\\u2642\\uFE0F','\\u{1F939}\\u{1F3FE}','\\u{1F939}\\u{1F3FE}\\u200D\\u2640\\uFE0F','\\u{1F939}\\u{1F3FE}\\u200D\\u2642\\uFE0F','\\u{1F939}\\u{1F3FF}','\\u{1F939}\\u{1F3FF}\\u200D\\u2640\\uFE0F','\\u{1F939}\\u{1F3FF}\\u200D\\u2642\\uFE0F','\\u{1F93C}\\u200D\\u2640\\uFE0F','\\u{1F93C}\\u200D\\u2642\\uFE0F','\\u{1F93D}\\u200D\\u2640\\uFE0F','\\u{1F93D}\\u200D\\u2642\\uFE0F','\\u{1F93D}\\u{1F3FB}','\\u{1F93D}\\u{1F3FB}\\u200D\\u2640\\uFE0F','\\u{1F93D}\\u{1F3FB}\\u200D\\u2642\\uFE0F','\\u{1F93D}\\u{1F3FC}','\\u{1F93D}\\u{1F3FC}\\u200D\\u2640\\uFE0F','\\u{1F93D}\\u{1F3FC}\\u200D\\u2642\\uFE0F','\\u{1F93D}\\u{1F3FD}','\\u{1F93D}\\u{1F3FD}\\u200D\\u2640\\uFE0F','\\u{1F93D}\\u{1F3FD}\\u200D\\u2642\\uFE0F','\\u{1F93D}\\u{1F3FE}','\\u{1F93D}\\u{1F3FE}\\u200D\\u2640\\uFE0F','\\u{1F93D}\\u{1F3FE}\\u200D\\u2642\\uFE0F','\\u{1F93D}\\u{1F3FF}','\\u{1F93D}\\u{1F3FF}\\u200D\\u2640\\uFE0F','\\u{1F93D}\\u{1F3FF}\\u200D\\u2642\\uFE0F','\\u{1F93E}\\u200D\\u2640\\uFE0F','\\u{1F93E}\\u200D\\u2642\\uFE0F','\\u{1F93E}\\u{1F3FB}','\\u{1F93E}\\u{1F3FB}\\u200D\\u2640\\uFE0F','\\u{1F93E}\\u{1F3FB}\\u200D\\u2642\\uFE0F','\\u{1F93E}\\u{1F3FC}','\\u{1F93E}\\u{1F3FC}\\u200D\\u2640\\uFE0F','\\u{1F93E}\\u{1F3FC}\\u200D\\u2642\\uFE0F','\\u{1F93E}\\u{1F3FD}','\\u{1F93E}\\u{1F3FD}\\u200D\\u2640\\uFE0F','\\u{1F93E}\\u{1F3FD}\\u200D\\u2642\\uFE0F','\\u{1F93E}\\u{1F3FE}','\\u{1F93E}\\u{1F3FE}\\u200D\\u2640\\uFE0F','\\u{1F93E}\\u{1F3FE}\\u200D\\u2642\\uFE0F','\\u{1F93E}\\u{1F3FF}','\\u{1F93E}\\u{1F3FF}\\u200D\\u2640\\uFE0F','\\u{1F93E}\\u{1F3FF}\\u200D\\u2642\\uFE0F','\\u{1F977}\\u{1F3FB}','\\u{1F977}\\u{1F3FC}','\\u{1F977}\\u{1F3FD}','\\u{1F977}\\u{1F3FE}','\\u{1F977}\\u{1F3FF}','\\u{1F9B5}\\u{1F3FB}','\\u{1F9B5}\\u{1F3FC}','\\u{1F9B5}\\u{1F3FD}','\\u{1F9B5}\\u{1F3FE}','\\u{1F9B5}\\u{1F3FF}','\\u{1F9B6}\\u{1F3FB}','\\u{1F9B6}\\u{1F3FC}','\\u{1F9B6}\\u{1F3FD}','\\u{1F9B6}\\u{1F3FE}','\\u{1F9B6}\\u{1F3FF}','\\u{1F9B8}\\u200D\\u2640\\uFE0F','\\u{1F9B8}\\u200D\\u2642\\uFE0F','\\u{1F9B8}\\u{1F3FB}','\\u{1F9B8}\\u{1F3FB}\\u200D\\u2640\\uFE0F','\\u{1F9B8}\\u{1F3FB}\\u200D\\u2642\\uFE0F','\\u{1F9B8}\\u{1F3FC}','\\u{1F9B8}\\u{1F3FC}\\u200D\\u2640\\uFE0F','\\u{1F9B8}\\u{1F3FC}\\u200D\\u2642\\uFE0F','\\u{1F9B8}\\u{1F3FD}','\\u{1F9B8}\\u{1F3FD}\\u200D\\u2640\\uFE0F','\\u{1F9B8}\\u{1F3FD}\\u200D\\u2642\\uFE0F','\\u{1F9B8}\\u{1F3FE}','\\u{1F9B8}\\u{1F3FE}\\u200D\\u2640\\uFE0F','\\u{1F9B8}\\u{1F3FE}\\u200D\\u2642\\uFE0F','\\u{1F9B8}\\u{1F3FF}','\\u{1F9B8}\\u{1F3FF}\\u200D\\u2640\\uFE0F','\\u{1F9B8}\\u{1F3FF}\\u200D\\u2642\\uFE0F','\\u{1F9B9}\\u200D\\u2640\\uFE0F','\\u{1F9B9}\\u200D\\u2642\\uFE0F','\\u{1F9B9}\\u{1F3FB}','\\u{1F9B9}\\u{1F3FB}\\u200D\\u2640\\uFE0F','\\u{1F9B9}\\u{1F3FB}\\u200D\\u2642\\uFE0F','\\u{1F9B9}\\u{1F3FC}','\\u{1F9B9}\\u{1F3FC}\\u200D\\u2640\\uFE0F','\\u{1F9B9}\\u{1F3FC}\\u200D\\u2642\\uFE0F','\\u{1F9B9}\\u{1F3FD}','\\u{1F9B9}\\u{1F3FD}\\u200D\\u2640\\uFE0F','\\u{1F9B9}\\u{1F3FD}\\u200D\\u2642\\uFE0F','\\u{1F9B9}\\u{1F3FE}','\\u{1F9B9}\\u{1F3FE}\\u200D\\u2640\\uFE0F','\\u{1F9B9}\\u{1F3FE}\\u200D\\u2642\\uFE0F','\\u{1F9B9}\\u{1F3FF}','\\u{1F9B9}\\u{1F3FF}\\u200D\\u2640\\uFE0F','\\u{1F9B9}\\u{1F3FF}\\u200D\\u2642\\uFE0F','\\u{1F9BB}\\u{1F3FB}','\\u{1F9BB}\\u{1F3FC}','\\u{1F9BB}\\u{1F3FD}','\\u{1F9BB}\\u{1F3FE}','\\u{1F9BB}\\u{1F3FF}','\\u{1F9CD}\\u200D\\u2640\\uFE0F','\\u{1F9CD}\\u200D\\u2642\\uFE0F','\\u{1F9CD}\\u{1F3FB}','\\u{1F9CD}\\u{1F3FB}\\u200D\\u2640\\uFE0F','\\u{1F9CD}\\u{1F3FB}\\u200D\\u2642\\uFE0F','\\u{1F9CD}\\u{1F3FC}','\\u{1F9CD}\\u{1F3FC}\\u200D\\u2640\\uFE0F','\\u{1F9CD}\\u{1F3FC}\\u200D\\u2642\\uFE0F','\\u{1F9CD}\\u{1F3FD}','\\u{1F9CD}\\u{1F3FD}\\u200D\\u2640\\uFE0F','\\u{1F9CD}\\u{1F3FD}\\u200D\\u2642\\uFE0F','\\u{1F9CD}\\u{1F3FE}','\\u{1F9CD}\\u{1F3FE}\\u200D\\u2640\\uFE0F','\\u{1F9CD}\\u{1F3FE}\\u200D\\u2642\\uFE0F','\\u{1F9CD}\\u{1F3FF}','\\u{1F9CD}\\u{1F3FF}\\u200D\\u2640\\uFE0F','\\u{1F9CD}\\u{1F3FF}\\u200D\\u2642\\uFE0F','\\u{1F9CE}\\u200D\\u2640\\uFE0F','\\u{1F9CE}\\u200D\\u2640\\uFE0F\\u200D\\u27A1\\uFE0F','\\u{1F9CE}\\u200D\\u2642\\uFE0F','\\u{1F9CE}\\u200D\\u2642\\uFE0F\\u200D\\u27A1\\uFE0F','\\u{1F9CE}\\u200D\\u27A1\\uFE0F','\\u{1F9CE}\\u{1F3FB}','\\u{1F9CE}\\u{1F3FB}\\u200D\\u2640\\uFE0F','\\u{1F9CE}\\u{1F3FB}\\u200D\\u2640\\uFE0F\\u200D\\u27A1\\uFE0F','\\u{1F9CE}\\u{1F3FB}\\u200D\\u2642\\uFE0F','\\u{1F9CE}\\u{1F3FB}\\u200D\\u2642\\uFE0F\\u200D\\u27A1\\uFE0F','\\u{1F9CE}\\u{1F3FB}\\u200D\\u27A1\\uFE0F','\\u{1F9CE}\\u{1F3FC}','\\u{1F9CE}\\u{1F3FC}\\u200D\\u2640\\uFE0F','\\u{1F9CE}\\u{1F3FC}\\u200D\\u2640\\uFE0F\\u200D\\u27A1\\uFE0F','\\u{1F9CE}\\u{1F3FC}\\u200D\\u2642\\uFE0F','\\u{1F9CE}\\u{1F3FC}\\u200D\\u2642\\uFE0F\\u200D\\u27A1\\uFE0F','\\u{1F9CE}\\u{1F3FC}\\u200D\\u27A1\\uFE0F','\\u{1F9CE}\\u{1F3FD}','\\u{1F9CE}\\u{1F3FD}\\u200D\\u2640\\uFE0F','\\u{1F9CE}\\u{1F3FD}\\u200D\\u2640\\uFE0F\\u200D\\u27A1\\uFE0F','\\u{1F9CE}\\u{1F3FD}\\u200D\\u2642\\uFE0F','\\u{1F9CE}\\u{1F3FD}\\u200D\\u2642\\uFE0F\\u200D\\u27A1\\uFE0F','\\u{1F9CE}\\u{1F3FD}\\u200D\\u27A1\\uFE0F','\\u{1F9CE}\\u{1F3FE}','\\u{1F9CE}\\u{1F3FE}\\u200D\\u2640\\uFE0F','\\u{1F9CE}\\u{1F3FE}\\u200D\\u2640\\uFE0F\\u200D\\u27A1\\uFE0F','\\u{1F9CE}\\u{1F3FE}\\u200D\\u2642\\uFE0F','\\u{1F9CE}\\u{1F3FE}\\u200D\\u2642\\uFE0F\\u200D\\u27A1\\uFE0F','\\u{1F9CE}\\u{1F3FE}\\u200D\\u27A1\\uFE0F','\\u{1F9CE}\\u{1F3FF}','\\u{1F9CE}\\u{1F3FF}\\u200D\\u2640\\uFE0F','\\u{1F9CE}\\u{1F3FF}\\u200D\\u2640\\uFE0F\\u200D\\u27A1\\uFE0F','\\u{1F9CE}\\u{1F3FF}\\u200D\\u2642\\uFE0F','\\u{1F9CE}\\u{1F3FF}\\u200D\\u2642\\uFE0F\\u200D\\u27A1\\uFE0F','\\u{1F9CE}\\u{1F3FF}\\u200D\\u27A1\\uFE0F','\\u{1F9CF}\\u200D\\u2640\\uFE0F','\\u{1F9CF}\\u200D\\u2642\\uFE0F','\\u{1F9CF}\\u{1F3FB}','\\u{1F9CF}\\u{1F3FB}\\u200D\\u2640\\uFE0F','\\u{1F9CF}\\u{1F3FB}\\u200D\\u2642\\uFE0F','\\u{1F9CF}\\u{1F3FC}','\\u{1F9CF}\\u{1F3FC}\\u200D\\u2640\\uFE0F','\\u{1F9CF}\\u{1F3FC}\\u200D\\u2642\\uFE0F','\\u{1F9CF}\\u{1F3FD}','\\u{1F9CF}\\u{1F3FD}\\u200D\\u2640\\uFE0F','\\u{1F9CF}\\u{1F3FD}\\u200D\\u2642\\uFE0F','\\u{1F9CF}\\u{1F3FE}','\\u{1F9CF}\\u{1F3FE}\\u200D\\u2640\\uFE0F','\\u{1F9CF}\\u{1F3FE}\\u200D\\u2642\\uFE0F','\\u{1F9CF}\\u{1F3FF}','\\u{1F9CF}\\u{1F3FF}\\u200D\\u2640\\uFE0F','\\u{1F9CF}\\u{1F3FF}\\u200D\\u2642\\uFE0F','\\u{1F9D1}\\u200D\\u2695\\uFE0F','\\u{1F9D1}\\u200D\\u2696\\uFE0F','\\u{1F9D1}\\u200D\\u2708\\uFE0F','\\u{1F9D1}\\u200D\\u{1F33E}','\\u{1F9D1}\\u200D\\u{1F373}','\\u{1F9D1}\\u200D\\u{1F37C}','\\u{1F9D1}\\u200D\\u{1F384}','\\u{1F9D1}\\u200D\\u{1F393}','\\u{1F9D1}\\u200D\\u{1F3A4}','\\u{1F9D1}\\u200D\\u{1F3A8}','\\u{1F9D1}\\u200D\\u{1F3EB}','\\u{1F9D1}\\u200D\\u{1F3ED}','\\u{1F9D1}\\u200D\\u{1F4BB}','\\u{1F9D1}\\u200D\\u{1F4BC}','\\u{1F9D1}\\u200D\\u{1F527}','\\u{1F9D1}\\u200D\\u{1F52C}','\\u{1F9D1}\\u200D\\u{1F680}','\\u{1F9D1}\\u200D\\u{1F692}','\\u{1F9D1}\\u200D\\u{1F91D}\\u200D\\u{1F9D1}','\\u{1F9D1}\\u200D\\u{1F9AF}','\\u{1F9D1}\\u200D\\u{1F9AF}\\u200D\\u27A1\\uFE0F','\\u{1F9D1}\\u200D\\u{1F9B0}','\\u{1F9D1}\\u200D\\u{1F9B1}','\\u{1F9D1}\\u200D\\u{1F9B2}','\\u{1F9D1}\\u200D\\u{1F9B3}','\\u{1F9D1}\\u200D\\u{1F9BC}','\\u{1F9D1}\\u200D\\u{1F9BC}\\u200D\\u27A1\\uFE0F','\\u{1F9D1}\\u200D\\u{1F9BD}','\\u{1F9D1}\\u200D\\u{1F9BD}\\u200D\\u27A1\\uFE0F','\\u{1F9D1}\\u200D\\u{1F9D1}\\u200D\\u{1F9D2}','\\u{1F9D1}\\u200D\\u{1F9D1}\\u200D\\u{1F9D2}\\u200D\\u{1F9D2}','\\u{1F9D1}\\u200D\\u{1F9D2}','\\u{1F9D1}\\u200D\\u{1F9D2}\\u200D\\u{1F9D2}','\\u{1F9D1}\\u{1F3FB}','\\u{1F9D1}\\u{1F3FB}\\u200D\\u2695\\uFE0F','\\u{1F9D1}\\u{1F3FB}\\u200D\\u2696\\uFE0F','\\u{1F9D1}\\u{1F3FB}\\u200D\\u2708\\uFE0F','\\u{1F9D1}\\u{1F3FB}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F9D1}\\u{1F3FC}','\\u{1F9D1}\\u{1F3FB}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F9D1}\\u{1F3FD}','\\u{1F9D1}\\u{1F3FB}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F9D1}\\u{1F3FE}','\\u{1F9D1}\\u{1F3FB}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F9D1}\\u{1F3FF}','\\u{1F9D1}\\u{1F3FB}\\u200D\\u2764\\uFE0F\\u200D\\u{1F9D1}\\u{1F3FC}','\\u{1F9D1}\\u{1F3FB}\\u200D\\u2764\\uFE0F\\u200D\\u{1F9D1}\\u{1F3FD}','\\u{1F9D1}\\u{1F3FB}\\u200D\\u2764\\uFE0F\\u200D\\u{1F9D1}\\u{1F3FE}','\\u{1F9D1}\\u{1F3FB}\\u200D\\u2764\\uFE0F\\u200D\\u{1F9D1}\\u{1F3FF}','\\u{1F9D1}\\u{1F3FB}\\u200D\\u{1F33E}','\\u{1F9D1}\\u{1F3FB}\\u200D\\u{1F373}','\\u{1F9D1}\\u{1F3FB}\\u200D\\u{1F37C}','\\u{1F9D1}\\u{1F3FB}\\u200D\\u{1F384}','\\u{1F9D1}\\u{1F3FB}\\u200D\\u{1F393}','\\u{1F9D1}\\u{1F3FB}\\u200D\\u{1F3A4}','\\u{1F9D1}\\u{1F3FB}\\u200D\\u{1F3A8}','\\u{1F9D1}\\u{1F3FB}\\u200D\\u{1F3EB}','\\u{1F9D1}\\u{1F3FB}\\u200D\\u{1F3ED}','\\u{1F9D1}\\u{1F3FB}\\u200D\\u{1F4BB}','\\u{1F9D1}\\u{1F3FB}\\u200D\\u{1F4BC}','\\u{1F9D1}\\u{1F3FB}\\u200D\\u{1F527}','\\u{1F9D1}\\u{1F3FB}\\u200D\\u{1F52C}','\\u{1F9D1}\\u{1F3FB}\\u200D\\u{1F680}','\\u{1F9D1}\\u{1F3FB}\\u200D\\u{1F692}','\\u{1F9D1}\\u{1F3FB}\\u200D\\u{1F91D}\\u200D\\u{1F9D1}\\u{1F3FB}','\\u{1F9D1}\\u{1F3FB}\\u200D\\u{1F91D}\\u200D\\u{1F9D1}\\u{1F3FC}','\\u{1F9D1}\\u{1F3FB}\\u200D\\u{1F91D}\\u200D\\u{1F9D1}\\u{1F3FD}','\\u{1F9D1}\\u{1F3FB}\\u200D\\u{1F91D}\\u200D\\u{1F9D1}\\u{1F3FE}','\\u{1F9D1}\\u{1F3FB}\\u200D\\u{1F91D}\\u200D\\u{1F9D1}\\u{1F3FF}','\\u{1F9D1}\\u{1F3FB}\\u200D\\u{1F9AF}','\\u{1F9D1}\\u{1F3FB}\\u200D\\u{1F9AF}\\u200D\\u27A1\\uFE0F','\\u{1F9D1}\\u{1F3FB}\\u200D\\u{1F9B0}','\\u{1F9D1}\\u{1F3FB}\\u200D\\u{1F9B1}','\\u{1F9D1}\\u{1F3FB}\\u200D\\u{1F9B2}','\\u{1F9D1}\\u{1F3FB}\\u200D\\u{1F9B3}','\\u{1F9D1}\\u{1F3FB}\\u200D\\u{1F9BC}','\\u{1F9D1}\\u{1F3FB}\\u200D\\u{1F9BC}\\u200D\\u27A1\\uFE0F','\\u{1F9D1}\\u{1F3FB}\\u200D\\u{1F9BD}','\\u{1F9D1}\\u{1F3FB}\\u200D\\u{1F9BD}\\u200D\\u27A1\\uFE0F','\\u{1F9D1}\\u{1F3FC}','\\u{1F9D1}\\u{1F3FC}\\u200D\\u2695\\uFE0F','\\u{1F9D1}\\u{1F3FC}\\u200D\\u2696\\uFE0F','\\u{1F9D1}\\u{1F3FC}\\u200D\\u2708\\uFE0F','\\u{1F9D1}\\u{1F3FC}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F9D1}\\u{1F3FB}','\\u{1F9D1}\\u{1F3FC}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F9D1}\\u{1F3FD}','\\u{1F9D1}\\u{1F3FC}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F9D1}\\u{1F3FE}','\\u{1F9D1}\\u{1F3FC}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F9D1}\\u{1F3FF}','\\u{1F9D1}\\u{1F3FC}\\u200D\\u2764\\uFE0F\\u200D\\u{1F9D1}\\u{1F3FB}','\\u{1F9D1}\\u{1F3FC}\\u200D\\u2764\\uFE0F\\u200D\\u{1F9D1}\\u{1F3FD}','\\u{1F9D1}\\u{1F3FC}\\u200D\\u2764\\uFE0F\\u200D\\u{1F9D1}\\u{1F3FE}','\\u{1F9D1}\\u{1F3FC}\\u200D\\u2764\\uFE0F\\u200D\\u{1F9D1}\\u{1F3FF}','\\u{1F9D1}\\u{1F3FC}\\u200D\\u{1F33E}','\\u{1F9D1}\\u{1F3FC}\\u200D\\u{1F373}','\\u{1F9D1}\\u{1F3FC}\\u200D\\u{1F37C}','\\u{1F9D1}\\u{1F3FC}\\u200D\\u{1F384}','\\u{1F9D1}\\u{1F3FC}\\u200D\\u{1F393}','\\u{1F9D1}\\u{1F3FC}\\u200D\\u{1F3A4}','\\u{1F9D1}\\u{1F3FC}\\u200D\\u{1F3A8}','\\u{1F9D1}\\u{1F3FC}\\u200D\\u{1F3EB}','\\u{1F9D1}\\u{1F3FC}\\u200D\\u{1F3ED}','\\u{1F9D1}\\u{1F3FC}\\u200D\\u{1F4BB}','\\u{1F9D1}\\u{1F3FC}\\u200D\\u{1F4BC}','\\u{1F9D1}\\u{1F3FC}\\u200D\\u{1F527}','\\u{1F9D1}\\u{1F3FC}\\u200D\\u{1F52C}','\\u{1F9D1}\\u{1F3FC}\\u200D\\u{1F680}','\\u{1F9D1}\\u{1F3FC}\\u200D\\u{1F692}','\\u{1F9D1}\\u{1F3FC}\\u200D\\u{1F91D}\\u200D\\u{1F9D1}\\u{1F3FB}','\\u{1F9D1}\\u{1F3FC}\\u200D\\u{1F91D}\\u200D\\u{1F9D1}\\u{1F3FC}','\\u{1F9D1}\\u{1F3FC}\\u200D\\u{1F91D}\\u200D\\u{1F9D1}\\u{1F3FD}','\\u{1F9D1}\\u{1F3FC}\\u200D\\u{1F91D}\\u200D\\u{1F9D1}\\u{1F3FE}','\\u{1F9D1}\\u{1F3FC}\\u200D\\u{1F91D}\\u200D\\u{1F9D1}\\u{1F3FF}','\\u{1F9D1}\\u{1F3FC}\\u200D\\u{1F9AF}','\\u{1F9D1}\\u{1F3FC}\\u200D\\u{1F9AF}\\u200D\\u27A1\\uFE0F','\\u{1F9D1}\\u{1F3FC}\\u200D\\u{1F9B0}','\\u{1F9D1}\\u{1F3FC}\\u200D\\u{1F9B1}','\\u{1F9D1}\\u{1F3FC}\\u200D\\u{1F9B2}','\\u{1F9D1}\\u{1F3FC}\\u200D\\u{1F9B3}','\\u{1F9D1}\\u{1F3FC}\\u200D\\u{1F9BC}','\\u{1F9D1}\\u{1F3FC}\\u200D\\u{1F9BC}\\u200D\\u27A1\\uFE0F','\\u{1F9D1}\\u{1F3FC}\\u200D\\u{1F9BD}','\\u{1F9D1}\\u{1F3FC}\\u200D\\u{1F9BD}\\u200D\\u27A1\\uFE0F','\\u{1F9D1}\\u{1F3FD}','\\u{1F9D1}\\u{1F3FD}\\u200D\\u2695\\uFE0F','\\u{1F9D1}\\u{1F3FD}\\u200D\\u2696\\uFE0F','\\u{1F9D1}\\u{1F3FD}\\u200D\\u2708\\uFE0F','\\u{1F9D1}\\u{1F3FD}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F9D1}\\u{1F3FB}','\\u{1F9D1}\\u{1F3FD}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F9D1}\\u{1F3FC}','\\u{1F9D1}\\u{1F3FD}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F9D1}\\u{1F3FE}','\\u{1F9D1}\\u{1F3FD}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F9D1}\\u{1F3FF}','\\u{1F9D1}\\u{1F3FD}\\u200D\\u2764\\uFE0F\\u200D\\u{1F9D1}\\u{1F3FB}','\\u{1F9D1}\\u{1F3FD}\\u200D\\u2764\\uFE0F\\u200D\\u{1F9D1}\\u{1F3FC}','\\u{1F9D1}\\u{1F3FD}\\u200D\\u2764\\uFE0F\\u200D\\u{1F9D1}\\u{1F3FE}','\\u{1F9D1}\\u{1F3FD}\\u200D\\u2764\\uFE0F\\u200D\\u{1F9D1}\\u{1F3FF}','\\u{1F9D1}\\u{1F3FD}\\u200D\\u{1F33E}','\\u{1F9D1}\\u{1F3FD}\\u200D\\u{1F373}','\\u{1F9D1}\\u{1F3FD}\\u200D\\u{1F37C}','\\u{1F9D1}\\u{1F3FD}\\u200D\\u{1F384}','\\u{1F9D1}\\u{1F3FD}\\u200D\\u{1F393}','\\u{1F9D1}\\u{1F3FD}\\u200D\\u{1F3A4}','\\u{1F9D1}\\u{1F3FD}\\u200D\\u{1F3A8}','\\u{1F9D1}\\u{1F3FD}\\u200D\\u{1F3EB}','\\u{1F9D1}\\u{1F3FD}\\u200D\\u{1F3ED}','\\u{1F9D1}\\u{1F3FD}\\u200D\\u{1F4BB}','\\u{1F9D1}\\u{1F3FD}\\u200D\\u{1F4BC}','\\u{1F9D1}\\u{1F3FD}\\u200D\\u{1F527}','\\u{1F9D1}\\u{1F3FD}\\u200D\\u{1F52C}','\\u{1F9D1}\\u{1F3FD}\\u200D\\u{1F680}','\\u{1F9D1}\\u{1F3FD}\\u200D\\u{1F692}','\\u{1F9D1}\\u{1F3FD}\\u200D\\u{1F91D}\\u200D\\u{1F9D1}\\u{1F3FB}','\\u{1F9D1}\\u{1F3FD}\\u200D\\u{1F91D}\\u200D\\u{1F9D1}\\u{1F3FC}','\\u{1F9D1}\\u{1F3FD}\\u200D\\u{1F91D}\\u200D\\u{1F9D1}\\u{1F3FD}','\\u{1F9D1}\\u{1F3FD}\\u200D\\u{1F91D}\\u200D\\u{1F9D1}\\u{1F3FE}','\\u{1F9D1}\\u{1F3FD}\\u200D\\u{1F91D}\\u200D\\u{1F9D1}\\u{1F3FF}','\\u{1F9D1}\\u{1F3FD}\\u200D\\u{1F9AF}','\\u{1F9D1}\\u{1F3FD}\\u200D\\u{1F9AF}\\u200D\\u27A1\\uFE0F','\\u{1F9D1}\\u{1F3FD}\\u200D\\u{1F9B0}','\\u{1F9D1}\\u{1F3FD}\\u200D\\u{1F9B1}','\\u{1F9D1}\\u{1F3FD}\\u200D\\u{1F9B2}','\\u{1F9D1}\\u{1F3FD}\\u200D\\u{1F9B3}','\\u{1F9D1}\\u{1F3FD}\\u200D\\u{1F9BC}','\\u{1F9D1}\\u{1F3FD}\\u200D\\u{1F9BC}\\u200D\\u27A1\\uFE0F','\\u{1F9D1}\\u{1F3FD}\\u200D\\u{1F9BD}','\\u{1F9D1}\\u{1F3FD}\\u200D\\u{1F9BD}\\u200D\\u27A1\\uFE0F','\\u{1F9D1}\\u{1F3FE}','\\u{1F9D1}\\u{1F3FE}\\u200D\\u2695\\uFE0F','\\u{1F9D1}\\u{1F3FE}\\u200D\\u2696\\uFE0F','\\u{1F9D1}\\u{1F3FE}\\u200D\\u2708\\uFE0F','\\u{1F9D1}\\u{1F3FE}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F9D1}\\u{1F3FB}','\\u{1F9D1}\\u{1F3FE}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F9D1}\\u{1F3FC}','\\u{1F9D1}\\u{1F3FE}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F9D1}\\u{1F3FD}','\\u{1F9D1}\\u{1F3FE}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F9D1}\\u{1F3FF}','\\u{1F9D1}\\u{1F3FE}\\u200D\\u2764\\uFE0F\\u200D\\u{1F9D1}\\u{1F3FB}','\\u{1F9D1}\\u{1F3FE}\\u200D\\u2764\\uFE0F\\u200D\\u{1F9D1}\\u{1F3FC}','\\u{1F9D1}\\u{1F3FE}\\u200D\\u2764\\uFE0F\\u200D\\u{1F9D1}\\u{1F3FD}','\\u{1F9D1}\\u{1F3FE}\\u200D\\u2764\\uFE0F\\u200D\\u{1F9D1}\\u{1F3FF}','\\u{1F9D1}\\u{1F3FE}\\u200D\\u{1F33E}','\\u{1F9D1}\\u{1F3FE}\\u200D\\u{1F373}','\\u{1F9D1}\\u{1F3FE}\\u200D\\u{1F37C}','\\u{1F9D1}\\u{1F3FE}\\u200D\\u{1F384}','\\u{1F9D1}\\u{1F3FE}\\u200D\\u{1F393}','\\u{1F9D1}\\u{1F3FE}\\u200D\\u{1F3A4}','\\u{1F9D1}\\u{1F3FE}\\u200D\\u{1F3A8}','\\u{1F9D1}\\u{1F3FE}\\u200D\\u{1F3EB}','\\u{1F9D1}\\u{1F3FE}\\u200D\\u{1F3ED}','\\u{1F9D1}\\u{1F3FE}\\u200D\\u{1F4BB}','\\u{1F9D1}\\u{1F3FE}\\u200D\\u{1F4BC}','\\u{1F9D1}\\u{1F3FE}\\u200D\\u{1F527}','\\u{1F9D1}\\u{1F3FE}\\u200D\\u{1F52C}','\\u{1F9D1}\\u{1F3FE}\\u200D\\u{1F680}','\\u{1F9D1}\\u{1F3FE}\\u200D\\u{1F692}','\\u{1F9D1}\\u{1F3FE}\\u200D\\u{1F91D}\\u200D\\u{1F9D1}\\u{1F3FB}','\\u{1F9D1}\\u{1F3FE}\\u200D\\u{1F91D}\\u200D\\u{1F9D1}\\u{1F3FC}','\\u{1F9D1}\\u{1F3FE}\\u200D\\u{1F91D}\\u200D\\u{1F9D1}\\u{1F3FD}','\\u{1F9D1}\\u{1F3FE}\\u200D\\u{1F91D}\\u200D\\u{1F9D1}\\u{1F3FE}','\\u{1F9D1}\\u{1F3FE}\\u200D\\u{1F91D}\\u200D\\u{1F9D1}\\u{1F3FF}','\\u{1F9D1}\\u{1F3FE}\\u200D\\u{1F9AF}','\\u{1F9D1}\\u{1F3FE}\\u200D\\u{1F9AF}\\u200D\\u27A1\\uFE0F','\\u{1F9D1}\\u{1F3FE}\\u200D\\u{1F9B0}','\\u{1F9D1}\\u{1F3FE}\\u200D\\u{1F9B1}','\\u{1F9D1}\\u{1F3FE}\\u200D\\u{1F9B2}','\\u{1F9D1}\\u{1F3FE}\\u200D\\u{1F9B3}','\\u{1F9D1}\\u{1F3FE}\\u200D\\u{1F9BC}','\\u{1F9D1}\\u{1F3FE}\\u200D\\u{1F9BC}\\u200D\\u27A1\\uFE0F','\\u{1F9D1}\\u{1F3FE}\\u200D\\u{1F9BD}','\\u{1F9D1}\\u{1F3FE}\\u200D\\u{1F9BD}\\u200D\\u27A1\\uFE0F','\\u{1F9D1}\\u{1F3FF}','\\u{1F9D1}\\u{1F3FF}\\u200D\\u2695\\uFE0F','\\u{1F9D1}\\u{1F3FF}\\u200D\\u2696\\uFE0F','\\u{1F9D1}\\u{1F3FF}\\u200D\\u2708\\uFE0F','\\u{1F9D1}\\u{1F3FF}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F9D1}\\u{1F3FB}','\\u{1F9D1}\\u{1F3FF}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F9D1}\\u{1F3FC}','\\u{1F9D1}\\u{1F3FF}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F9D1}\\u{1F3FD}','\\u{1F9D1}\\u{1F3FF}\\u200D\\u2764\\uFE0F\\u200D\\u{1F48B}\\u200D\\u{1F9D1}\\u{1F3FE}','\\u{1F9D1}\\u{1F3FF}\\u200D\\u2764\\uFE0F\\u200D\\u{1F9D1}\\u{1F3FB}','\\u{1F9D1}\\u{1F3FF}\\u200D\\u2764\\uFE0F\\u200D\\u{1F9D1}\\u{1F3FC}','\\u{1F9D1}\\u{1F3FF}\\u200D\\u2764\\uFE0F\\u200D\\u{1F9D1}\\u{1F3FD}','\\u{1F9D1}\\u{1F3FF}\\u200D\\u2764\\uFE0F\\u200D\\u{1F9D1}\\u{1F3FE}','\\u{1F9D1}\\u{1F3FF}\\u200D\\u{1F33E}','\\u{1F9D1}\\u{1F3FF}\\u200D\\u{1F373}','\\u{1F9D1}\\u{1F3FF}\\u200D\\u{1F37C}','\\u{1F9D1}\\u{1F3FF}\\u200D\\u{1F384}','\\u{1F9D1}\\u{1F3FF}\\u200D\\u{1F393}','\\u{1F9D1}\\u{1F3FF}\\u200D\\u{1F3A4}','\\u{1F9D1}\\u{1F3FF}\\u200D\\u{1F3A8}','\\u{1F9D1}\\u{1F3FF}\\u200D\\u{1F3EB}','\\u{1F9D1}\\u{1F3FF}\\u200D\\u{1F3ED}','\\u{1F9D1}\\u{1F3FF}\\u200D\\u{1F4BB}','\\u{1F9D1}\\u{1F3FF}\\u200D\\u{1F4BC}','\\u{1F9D1}\\u{1F3FF}\\u200D\\u{1F527}','\\u{1F9D1}\\u{1F3FF}\\u200D\\u{1F52C}','\\u{1F9D1}\\u{1F3FF}\\u200D\\u{1F680}','\\u{1F9D1}\\u{1F3FF}\\u200D\\u{1F692}','\\u{1F9D1}\\u{1F3FF}\\u200D\\u{1F91D}\\u200D\\u{1F9D1}\\u{1F3FB}','\\u{1F9D1}\\u{1F3FF}\\u200D\\u{1F91D}\\u200D\\u{1F9D1}\\u{1F3FC}','\\u{1F9D1}\\u{1F3FF}\\u200D\\u{1F91D}\\u200D\\u{1F9D1}\\u{1F3FD}','\\u{1F9D1}\\u{1F3FF}\\u200D\\u{1F91D}\\u200D\\u{1F9D1}\\u{1F3FE}','\\u{1F9D1}\\u{1F3FF}\\u200D\\u{1F91D}\\u200D\\u{1F9D1}\\u{1F3FF}','\\u{1F9D1}\\u{1F3FF}\\u200D\\u{1F9AF}','\\u{1F9D1}\\u{1F3FF}\\u200D\\u{1F9AF}\\u200D\\u27A1\\uFE0F','\\u{1F9D1}\\u{1F3FF}\\u200D\\u{1F9B0}','\\u{1F9D1}\\u{1F3FF}\\u200D\\u{1F9B1}','\\u{1F9D1}\\u{1F3FF}\\u200D\\u{1F9B2}','\\u{1F9D1}\\u{1F3FF}\\u200D\\u{1F9B3}','\\u{1F9D1}\\u{1F3FF}\\u200D\\u{1F9BC}','\\u{1F9D1}\\u{1F3FF}\\u200D\\u{1F9BC}\\u200D\\u27A1\\uFE0F','\\u{1F9D1}\\u{1F3FF}\\u200D\\u{1F9BD}','\\u{1F9D1}\\u{1F3FF}\\u200D\\u{1F9BD}\\u200D\\u27A1\\uFE0F','\\u{1F9D2}\\u{1F3FB}','\\u{1F9D2}\\u{1F3FC}','\\u{1F9D2}\\u{1F3FD}','\\u{1F9D2}\\u{1F3FE}','\\u{1F9D2}\\u{1F3FF}','\\u{1F9D3}\\u{1F3FB}','\\u{1F9D3}\\u{1F3FC}','\\u{1F9D3}\\u{1F3FD}','\\u{1F9D3}\\u{1F3FE}','\\u{1F9D3}\\u{1F3FF}','\\u{1F9D4}\\u200D\\u2640\\uFE0F','\\u{1F9D4}\\u200D\\u2642\\uFE0F','\\u{1F9D4}\\u{1F3FB}','\\u{1F9D4}\\u{1F3FB}\\u200D\\u2640\\uFE0F','\\u{1F9D4}\\u{1F3FB}\\u200D\\u2642\\uFE0F','\\u{1F9D4}\\u{1F3FC}','\\u{1F9D4}\\u{1F3FC}\\u200D\\u2640\\uFE0F','\\u{1F9D4}\\u{1F3FC}\\u200D\\u2642\\uFE0F','\\u{1F9D4}\\u{1F3FD}','\\u{1F9D4}\\u{1F3FD}\\u200D\\u2640\\uFE0F','\\u{1F9D4}\\u{1F3FD}\\u200D\\u2642\\uFE0F','\\u{1F9D4}\\u{1F3FE}','\\u{1F9D4}\\u{1F3FE}\\u200D\\u2640\\uFE0F','\\u{1F9D4}\\u{1F3FE}\\u200D\\u2642\\uFE0F','\\u{1F9D4}\\u{1F3FF}','\\u{1F9D4}\\u{1F3FF}\\u200D\\u2640\\uFE0F','\\u{1F9D4}\\u{1F3FF}\\u200D\\u2642\\uFE0F','\\u{1F9D5}\\u{1F3FB}','\\u{1F9D5}\\u{1F3FC}','\\u{1F9D5}\\u{1F3FD}','\\u{1F9D5}\\u{1F3FE}','\\u{1F9D5}\\u{1F3FF}','\\u{1F9D6}\\u200D\\u2640\\uFE0F','\\u{1F9D6}\\u200D\\u2642\\uFE0F','\\u{1F9D6}\\u{1F3FB}','\\u{1F9D6}\\u{1F3FB}\\u200D\\u2640\\uFE0F','\\u{1F9D6}\\u{1F3FB}\\u200D\\u2642\\uFE0F','\\u{1F9D6}\\u{1F3FC}','\\u{1F9D6}\\u{1F3FC}\\u200D\\u2640\\uFE0F','\\u{1F9D6}\\u{1F3FC}\\u200D\\u2642\\uFE0F','\\u{1F9D6}\\u{1F3FD}','\\u{1F9D6}\\u{1F3FD}\\u200D\\u2640\\uFE0F','\\u{1F9D6}\\u{1F3FD}\\u200D\\u2642\\uFE0F','\\u{1F9D6}\\u{1F3FE}','\\u{1F9D6}\\u{1F3FE}\\u200D\\u2640\\uFE0F','\\u{1F9D6}\\u{1F3FE}\\u200D\\u2642\\uFE0F','\\u{1F9D6}\\u{1F3FF}','\\u{1F9D6}\\u{1F3FF}\\u200D\\u2640\\uFE0F','\\u{1F9D6}\\u{1F3FF}\\u200D\\u2642\\uFE0F','\\u{1F9D7}\\u200D\\u2640\\uFE0F','\\u{1F9D7}\\u200D\\u2642\\uFE0F','\\u{1F9D7}\\u{1F3FB}','\\u{1F9D7}\\u{1F3FB}\\u200D\\u2640\\uFE0F','\\u{1F9D7}\\u{1F3FB}\\u200D\\u2642\\uFE0F','\\u{1F9D7}\\u{1F3FC}','\\u{1F9D7}\\u{1F3FC}\\u200D\\u2640\\uFE0F','\\u{1F9D7}\\u{1F3FC}\\u200D\\u2642\\uFE0F','\\u{1F9D7}\\u{1F3FD}','\\u{1F9D7}\\u{1F3FD}\\u200D\\u2640\\uFE0F','\\u{1F9D7}\\u{1F3FD}\\u200D\\u2642\\uFE0F','\\u{1F9D7}\\u{1F3FE}','\\u{1F9D7}\\u{1F3FE}\\u200D\\u2640\\uFE0F','\\u{1F9D7}\\u{1F3FE}\\u200D\\u2642\\uFE0F','\\u{1F9D7}\\u{1F3FF}','\\u{1F9D7}\\u{1F3FF}\\u200D\\u2640\\uFE0F','\\u{1F9D7}\\u{1F3FF}\\u200D\\u2642\\uFE0F','\\u{1F9D8}\\u200D\\u2640\\uFE0F','\\u{1F9D8}\\u200D\\u2642\\uFE0F','\\u{1F9D8}\\u{1F3FB}','\\u{1F9D8}\\u{1F3FB}\\u200D\\u2640\\uFE0F','\\u{1F9D8}\\u{1F3FB}\\u200D\\u2642\\uFE0F','\\u{1F9D8}\\u{1F3FC}','\\u{1F9D8}\\u{1F3FC}\\u200D\\u2640\\uFE0F','\\u{1F9D8}\\u{1F3FC}\\u200D\\u2642\\uFE0F','\\u{1F9D8}\\u{1F3FD}','\\u{1F9D8}\\u{1F3FD}\\u200D\\u2640\\uFE0F','\\u{1F9D8}\\u{1F3FD}\\u200D\\u2642\\uFE0F','\\u{1F9D8}\\u{1F3FE}','\\u{1F9D8}\\u{1F3FE}\\u200D\\u2640\\uFE0F','\\u{1F9D8}\\u{1F3FE}\\u200D\\u2642\\uFE0F','\\u{1F9D8}\\u{1F3FF}','\\u{1F9D8}\\u{1F3FF}\\u200D\\u2640\\uFE0F','\\u{1F9D8}\\u{1F3FF}\\u200D\\u2642\\uFE0F','\\u{1F9D9}\\u200D\\u2640\\uFE0F','\\u{1F9D9}\\u200D\\u2642\\uFE0F','\\u{1F9D9}\\u{1F3FB}','\\u{1F9D9}\\u{1F3FB}\\u200D\\u2640\\uFE0F','\\u{1F9D9}\\u{1F3FB}\\u200D\\u2642\\uFE0F','\\u{1F9D9}\\u{1F3FC}','\\u{1F9D9}\\u{1F3FC}\\u200D\\u2640\\uFE0F','\\u{1F9D9}\\u{1F3FC}\\u200D\\u2642\\uFE0F','\\u{1F9D9}\\u{1F3FD}','\\u{1F9D9}\\u{1F3FD}\\u200D\\u2640\\uFE0F','\\u{1F9D9}\\u{1F3FD}\\u200D\\u2642\\uFE0F','\\u{1F9D9}\\u{1F3FE}','\\u{1F9D9}\\u{1F3FE}\\u200D\\u2640\\uFE0F','\\u{1F9D9}\\u{1F3FE}\\u200D\\u2642\\uFE0F','\\u{1F9D9}\\u{1F3FF}','\\u{1F9D9}\\u{1F3FF}\\u200D\\u2640\\uFE0F','\\u{1F9D9}\\u{1F3FF}\\u200D\\u2642\\uFE0F','\\u{1F9DA}\\u200D\\u2640\\uFE0F','\\u{1F9DA}\\u200D\\u2642\\uFE0F','\\u{1F9DA}\\u{1F3FB}','\\u{1F9DA}\\u{1F3FB}\\u200D\\u2640\\uFE0F','\\u{1F9DA}\\u{1F3FB}\\u200D\\u2642\\uFE0F','\\u{1F9DA}\\u{1F3FC}','\\u{1F9DA}\\u{1F3FC}\\u200D\\u2640\\uFE0F','\\u{1F9DA}\\u{1F3FC}\\u200D\\u2642\\uFE0F','\\u{1F9DA}\\u{1F3FD}','\\u{1F9DA}\\u{1F3FD}\\u200D\\u2640\\uFE0F','\\u{1F9DA}\\u{1F3FD}\\u200D\\u2642\\uFE0F','\\u{1F9DA}\\u{1F3FE}','\\u{1F9DA}\\u{1F3FE}\\u200D\\u2640\\uFE0F','\\u{1F9DA}\\u{1F3FE}\\u200D\\u2642\\uFE0F','\\u{1F9DA}\\u{1F3FF}','\\u{1F9DA}\\u{1F3FF}\\u200D\\u2640\\uFE0F','\\u{1F9DA}\\u{1F3FF}\\u200D\\u2642\\uFE0F','\\u{1F9DB}\\u200D\\u2640\\uFE0F','\\u{1F9DB}\\u200D\\u2642\\uFE0F','\\u{1F9DB}\\u{1F3FB}','\\u{1F9DB}\\u{1F3FB}\\u200D\\u2640\\uFE0F','\\u{1F9DB}\\u{1F3FB}\\u200D\\u2642\\uFE0F','\\u{1F9DB}\\u{1F3FC}','\\u{1F9DB}\\u{1F3FC}\\u200D\\u2640\\uFE0F','\\u{1F9DB}\\u{1F3FC}\\u200D\\u2642\\uFE0F','\\u{1F9DB}\\u{1F3FD}','\\u{1F9DB}\\u{1F3FD}\\u200D\\u2640\\uFE0F','\\u{1F9DB}\\u{1F3FD}\\u200D\\u2642\\uFE0F','\\u{1F9DB}\\u{1F3FE}','\\u{1F9DB}\\u{1F3FE}\\u200D\\u2640\\uFE0F','\\u{1F9DB}\\u{1F3FE}\\u200D\\u2642\\uFE0F','\\u{1F9DB}\\u{1F3FF}','\\u{1F9DB}\\u{1F3FF}\\u200D\\u2640\\uFE0F','\\u{1F9DB}\\u{1F3FF}\\u200D\\u2642\\uFE0F','\\u{1F9DC}\\u200D\\u2640\\uFE0F','\\u{1F9DC}\\u200D\\u2642\\uFE0F','\\u{1F9DC}\\u{1F3FB}','\\u{1F9DC}\\u{1F3FB}\\u200D\\u2640\\uFE0F','\\u{1F9DC}\\u{1F3FB}\\u200D\\u2642\\uFE0F','\\u{1F9DC}\\u{1F3FC}','\\u{1F9DC}\\u{1F3FC}\\u200D\\u2640\\uFE0F','\\u{1F9DC}\\u{1F3FC}\\u200D\\u2642\\uFE0F','\\u{1F9DC}\\u{1F3FD}','\\u{1F9DC}\\u{1F3FD}\\u200D\\u2640\\uFE0F','\\u{1F9DC}\\u{1F3FD}\\u200D\\u2642\\uFE0F','\\u{1F9DC}\\u{1F3FE}','\\u{1F9DC}\\u{1F3FE}\\u200D\\u2640\\uFE0F','\\u{1F9DC}\\u{1F3FE}\\u200D\\u2642\\uFE0F','\\u{1F9DC}\\u{1F3FF}','\\u{1F9DC}\\u{1F3FF}\\u200D\\u2640\\uFE0F','\\u{1F9DC}\\u{1F3FF}\\u200D\\u2642\\uFE0F','\\u{1F9DD}\\u200D\\u2640\\uFE0F','\\u{1F9DD}\\u200D\\u2642\\uFE0F','\\u{1F9DD}\\u{1F3FB}','\\u{1F9DD}\\u{1F3FB}\\u200D\\u2640\\uFE0F','\\u{1F9DD}\\u{1F3FB}\\u200D\\u2642\\uFE0F','\\u{1F9DD}\\u{1F3FC}','\\u{1F9DD}\\u{1F3FC}\\u200D\\u2640\\uFE0F','\\u{1F9DD}\\u{1F3FC}\\u200D\\u2642\\uFE0F','\\u{1F9DD}\\u{1F3FD}','\\u{1F9DD}\\u{1F3FD}\\u200D\\u2640\\uFE0F','\\u{1F9DD}\\u{1F3FD}\\u200D\\u2642\\uFE0F','\\u{1F9DD}\\u{1F3FE}','\\u{1F9DD}\\u{1F3FE}\\u200D\\u2640\\uFE0F','\\u{1F9DD}\\u{1F3FE}\\u200D\\u2642\\uFE0F','\\u{1F9DD}\\u{1F3FF}','\\u{1F9DD}\\u{1F3FF}\\u200D\\u2640\\uFE0F','\\u{1F9DD}\\u{1F3FF}\\u200D\\u2642\\uFE0F','\\u{1F9DE}\\u200D\\u2640\\uFE0F','\\u{1F9DE}\\u200D\\u2642\\uFE0F','\\u{1F9DF}\\u200D\\u2640\\uFE0F','\\u{1F9DF}\\u200D\\u2642\\uFE0F','\\u{1FAC3}\\u{1F3FB}','\\u{1FAC3}\\u{1F3FC}','\\u{1FAC3}\\u{1F3FD}','\\u{1FAC3}\\u{1F3FE}','\\u{1FAC3}\\u{1F3FF}','\\u{1FAC4}\\u{1F3FB}','\\u{1FAC4}\\u{1F3FC}','\\u{1FAC4}\\u{1F3FD}','\\u{1FAC4}\\u{1F3FE}','\\u{1FAC4}\\u{1F3FF}','\\u{1FAC5}\\u{1F3FB}','\\u{1FAC5}\\u{1F3FC}','\\u{1FAC5}\\u{1F3FD}','\\u{1FAC5}\\u{1F3FE}','\\u{1FAC5}\\u{1F3FF}','\\u{1FAF0}\\u{1F3FB}','\\u{1FAF0}\\u{1F3FC}','\\u{1FAF0}\\u{1F3FD}','\\u{1FAF0}\\u{1F3FE}','\\u{1FAF0}\\u{1F3FF}','\\u{1FAF1}\\u{1F3FB}','\\u{1FAF1}\\u{1F3FB}\\u200D\\u{1FAF2}\\u{1F3FC}','\\u{1FAF1}\\u{1F3FB}\\u200D\\u{1FAF2}\\u{1F3FD}','\\u{1FAF1}\\u{1F3FB}\\u200D\\u{1FAF2}\\u{1F3FE}','\\u{1FAF1}\\u{1F3FB}\\u200D\\u{1FAF2}\\u{1F3FF}','\\u{1FAF1}\\u{1F3FC}','\\u{1FAF1}\\u{1F3FC}\\u200D\\u{1FAF2}\\u{1F3FB}','\\u{1FAF1}\\u{1F3FC}\\u200D\\u{1FAF2}\\u{1F3FD}','\\u{1FAF1}\\u{1F3FC}\\u200D\\u{1FAF2}\\u{1F3FE}','\\u{1FAF1}\\u{1F3FC}\\u200D\\u{1FAF2}\\u{1F3FF}','\\u{1FAF1}\\u{1F3FD}','\\u{1FAF1}\\u{1F3FD}\\u200D\\u{1FAF2}\\u{1F3FB}','\\u{1FAF1}\\u{1F3FD}\\u200D\\u{1FAF2}\\u{1F3FC}','\\u{1FAF1}\\u{1F3FD}\\u200D\\u{1FAF2}\\u{1F3FE}','\\u{1FAF1}\\u{1F3FD}\\u200D\\u{1FAF2}\\u{1F3FF}','\\u{1FAF1}\\u{1F3FE}','\\u{1FAF1}\\u{1F3FE}\\u200D\\u{1FAF2}\\u{1F3FB}','\\u{1FAF1}\\u{1F3FE}\\u200D\\u{1FAF2}\\u{1F3FC}','\\u{1FAF1}\\u{1F3FE}\\u200D\\u{1FAF2}\\u{1F3FD}','\\u{1FAF1}\\u{1F3FE}\\u200D\\u{1FAF2}\\u{1F3FF}','\\u{1FAF1}\\u{1F3FF}','\\u{1FAF1}\\u{1F3FF}\\u200D\\u{1FAF2}\\u{1F3FB}','\\u{1FAF1}\\u{1F3FF}\\u200D\\u{1FAF2}\\u{1F3FC}','\\u{1FAF1}\\u{1F3FF}\\u200D\\u{1FAF2}\\u{1F3FD}','\\u{1FAF1}\\u{1F3FF}\\u200D\\u{1FAF2}\\u{1F3FE}','\\u{1FAF2}\\u{1F3FB}','\\u{1FAF2}\\u{1F3FC}','\\u{1FAF2}\\u{1F3FD}','\\u{1FAF2}\\u{1F3FE}','\\u{1FAF2}\\u{1F3FF}','\\u{1FAF3}\\u{1F3FB}','\\u{1FAF3}\\u{1F3FC}','\\u{1FAF3}\\u{1F3FD}','\\u{1FAF3}\\u{1F3FE}','\\u{1FAF3}\\u{1F3FF}','\\u{1FAF4}\\u{1F3FB}','\\u{1FAF4}\\u{1F3FC}','\\u{1FAF4}\\u{1F3FD}','\\u{1FAF4}\\u{1F3FE}','\\u{1FAF4}\\u{1F3FF}','\\u{1FAF5}\\u{1F3FB}','\\u{1FAF5}\\u{1F3FC}','\\u{1FAF5}\\u{1F3FD}','\\u{1FAF5}\\u{1F3FE}','\\u{1FAF5}\\u{1F3FF}','\\u{1FAF6}\\u{1F3FB}','\\u{1FAF6}\\u{1F3FC}','\\u{1FAF6}\\u{1F3FD}','\\u{1FAF6}\\u{1F3FE}','\\u{1FAF6}\\u{1F3FF}','\\u{1FAF7}\\u{1F3FB}','\\u{1FAF7}\\u{1F3FC}','\\u{1FAF7}\\u{1F3FD}','\\u{1FAF7}\\u{1F3FE}','\\u{1FAF7}\\u{1F3FF}','\\u{1FAF8}\\u{1F3FB}','\\u{1FAF8}\\u{1F3FC}','\\u{1FAF8}\\u{1F3FD}','\\u{1FAF8}\\u{1F3FE}','\\u{1FAF8}\\u{1F3FF}'];\n","const set = require('regenerate')(0x61F, 0x640);\nset.addRange(0x1E900, 0x1E94B).addRange(0x1E950, 0x1E959).addRange(0x1E95E, 0x1E95F);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x11700, 0x1171A).addRange(0x1171D, 0x1172B).addRange(0x11730, 0x11746);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x14400, 0x14646);\nexports.characters = set;\n","const set = require('regenerate')(0xFDCF, 0x1EE24, 0x1EE27, 0x1EE39, 0x1EE3B, 0x1EE42, 0x1EE47, 0x1EE49, 0x1EE4B, 0x1EE54, 0x1EE57, 0x1EE59, 0x1EE5B, 0x1EE5D, 0x1EE5F, 0x1EE64, 0x1EE7E);\nset.addRange(0x600, 0x604).addRange(0x606, 0x6DC).addRange(0x6DE, 0x6FF).addRange(0x750, 0x77F).addRange(0x870, 0x88E).addRange(0x890, 0x891).addRange(0x898, 0x8E1).addRange(0x8E3, 0x8FF).addRange(0xFB50, 0xFBC2).addRange(0xFBD3, 0xFD8F).addRange(0xFD92, 0xFDC7).addRange(0xFDF0, 0xFDFF).addRange(0xFE70, 0xFE74).addRange(0xFE76, 0xFEFC).addRange(0x102E0, 0x102FB).addRange(0x10E60, 0x10E7E).addRange(0x10EFD, 0x10EFF).addRange(0x1EE00, 0x1EE03).addRange(0x1EE05, 0x1EE1F).addRange(0x1EE21, 0x1EE22).addRange(0x1EE29, 0x1EE32).addRange(0x1EE34, 0x1EE37).addRange(0x1EE4D, 0x1EE4F).addRange(0x1EE51, 0x1EE52).addRange(0x1EE61, 0x1EE62).addRange(0x1EE67, 0x1EE6A).addRange(0x1EE6C, 0x1EE72).addRange(0x1EE74, 0x1EE77).addRange(0x1EE79, 0x1EE7C).addRange(0x1EE80, 0x1EE89).addRange(0x1EE8B, 0x1EE9B).addRange(0x1EEA1, 0x1EEA3).addRange(0x1EEA5, 0x1EEA9).addRange(0x1EEAB, 0x1EEBB).addRange(0x1EEF0, 0x1EEF1);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x531, 0x556).addRange(0x559, 0x58A).addRange(0x58D, 0x58F).addRange(0xFB13, 0xFB17);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x10B00, 0x10B35).addRange(0x10B39, 0x10B3F);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x1B00, 0x1B4C).addRange(0x1B50, 0x1B7E);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0xA6A0, 0xA6F7).addRange(0x16800, 0x16A38);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x16AD0, 0x16AED).addRange(0x16AF0, 0x16AF5);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x1BC0, 0x1BF3).addRange(0x1BFC, 0x1BFF);\nexports.characters = set;\n","const set = require('regenerate')(0x9B2, 0x9D7, 0x1CD0, 0x1CD2, 0x1CD8, 0x1CE1, 0x1CEA, 0x1CED, 0x1CF2, 0xA8F1);\nset.addRange(0x951, 0x952).addRange(0x964, 0x965).addRange(0x980, 0x983).addRange(0x985, 0x98C).addRange(0x98F, 0x990).addRange(0x993, 0x9A8).addRange(0x9AA, 0x9B0).addRange(0x9B6, 0x9B9).addRange(0x9BC, 0x9C4).addRange(0x9C7, 0x9C8).addRange(0x9CB, 0x9CE).addRange(0x9DC, 0x9DD).addRange(0x9DF, 0x9E3).addRange(0x9E6, 0x9FE).addRange(0x1CD5, 0x1CD6).addRange(0x1CF5, 0x1CF7);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x11C00, 0x11C08).addRange(0x11C0A, 0x11C36).addRange(0x11C38, 0x11C45).addRange(0x11C50, 0x11C6C);\nexports.characters = set;\n","const set = require('regenerate')(0x3030, 0x3037, 0x30FB);\nset.addRange(0x2EA, 0x2EB).addRange(0x3001, 0x3003).addRange(0x3008, 0x3011).addRange(0x3013, 0x301F).addRange(0x302A, 0x302D).addRange(0x3105, 0x312F).addRange(0x31A0, 0x31BF).addRange(0xFE45, 0xFE46).addRange(0xFF61, 0xFF65);\nexports.characters = set;\n","const set = require('regenerate')(0x1107F);\nset.addRange(0x11000, 0x1104D).addRange(0x11052, 0x11075);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x2800, 0x28FF);\nexports.characters = set;\n","const set = require('regenerate')(0xA9CF);\nset.addRange(0x1A00, 0x1A1B).addRange(0x1A1E, 0x1A1F);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x1735, 0x1736).addRange(0x1740, 0x1753);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x1400, 0x167F).addRange(0x18B0, 0x18F5).addRange(0x11AB0, 0x11ABF);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x102A0, 0x102D0);\nexports.characters = set;\n","const set = require('regenerate')(0x1056F);\nset.addRange(0x10530, 0x10563);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x9E6, 0x9EF).addRange(0x1040, 0x1049).addRange(0x11100, 0x11134).addRange(0x11136, 0x11147);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0xAA00, 0xAA36).addRange(0xAA40, 0xAA4D).addRange(0xAA50, 0xAA59).addRange(0xAA5C, 0xAA5F);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x13A0, 0x13F5).addRange(0x13F8, 0x13FD).addRange(0xAB70, 0xABBF);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x10FB0, 0x10FCB);\nexports.characters = set;\n","const set = require('regenerate')(0xD7, 0xF7, 0x374, 0x37E, 0x385, 0x387, 0x605, 0x6DD, 0x8E2, 0xE3F, 0x3004, 0x3012, 0x3020, 0x3036, 0x31EF, 0x327F, 0x33FF, 0xAB5B, 0xFEFF, 0x1D4A2, 0x1D4BB, 0x1D546, 0x1F7F0, 0xE0001);\nset.addRange(0x0, 0x40).addRange(0x5B, 0x60).addRange(0x7B, 0xA9).addRange(0xAB, 0xB9).addRange(0xBB, 0xBF).addRange(0x2B9, 0x2DF).addRange(0x2E5, 0x2E9).addRange(0x2EC, 0x2FF).addRange(0xFD5, 0xFD8).addRange(0x16EB, 0x16ED).addRange(0x2000, 0x200B).addRange(0x200E, 0x202E).addRange(0x2030, 0x2064).addRange(0x2066, 0x2070).addRange(0x2074, 0x207E).addRange(0x2080, 0x208E).addRange(0x20A0, 0x20C0).addRange(0x2100, 0x2125).addRange(0x2127, 0x2129).addRange(0x212C, 0x2131).addRange(0x2133, 0x214D).addRange(0x214F, 0x215F).addRange(0x2189, 0x218B).addRange(0x2190, 0x2426).addRange(0x2440, 0x244A).addRange(0x2460, 0x27FF).addRange(0x2900, 0x2B73).addRange(0x2B76, 0x2B95).addRange(0x2B97, 0x2BFF).addRange(0x2E00, 0x2E42).addRange(0x2E44, 0x2E5D).addRange(0x2FF0, 0x3000).addRange(0x3248, 0x325F).addRange(0x32B1, 0x32BF).addRange(0x32CC, 0x32CF).addRange(0x3371, 0x337A).addRange(0x3380, 0x33DF).addRange(0x4DC0, 0x4DFF).addRange(0xA708, 0xA721).addRange(0xA788, 0xA78A).addRange(0xAB6A, 0xAB6B).addRange(0xFE10, 0xFE19).addRange(0xFE30, 0xFE44).addRange(0xFE47, 0xFE52).addRange(0xFE54, 0xFE66).addRange(0xFE68, 0xFE6B).addRange(0xFF01, 0xFF20).addRange(0xFF3B, 0xFF40).addRange(0xFF5B, 0xFF60).addRange(0xFFE0, 0xFFE6).addRange(0xFFE8, 0xFFEE);\nset.addRange(0xFFF9, 0xFFFD).addRange(0x10190, 0x1019C).addRange(0x101D0, 0x101FC).addRange(0x1CF50, 0x1CFC3).addRange(0x1D000, 0x1D0F5).addRange(0x1D100, 0x1D126).addRange(0x1D129, 0x1D166).addRange(0x1D16A, 0x1D17A).addRange(0x1D183, 0x1D184).addRange(0x1D18C, 0x1D1A9).addRange(0x1D1AE, 0x1D1EA).addRange(0x1D2C0, 0x1D2D3).addRange(0x1D2E0, 0x1D2F3).addRange(0x1D300, 0x1D356).addRange(0x1D372, 0x1D378).addRange(0x1D400, 0x1D454).addRange(0x1D456, 0x1D49C).addRange(0x1D49E, 0x1D49F).addRange(0x1D4A5, 0x1D4A6).addRange(0x1D4A9, 0x1D4AC).addRange(0x1D4AE, 0x1D4B9).addRange(0x1D4BD, 0x1D4C3).addRange(0x1D4C5, 0x1D505).addRange(0x1D507, 0x1D50A).addRange(0x1D50D, 0x1D514).addRange(0x1D516, 0x1D51C).addRange(0x1D51E, 0x1D539).addRange(0x1D53B, 0x1D53E).addRange(0x1D540, 0x1D544).addRange(0x1D54A, 0x1D550).addRange(0x1D552, 0x1D6A5).addRange(0x1D6A8, 0x1D7CB).addRange(0x1D7CE, 0x1D7FF).addRange(0x1EC71, 0x1ECB4).addRange(0x1ED01, 0x1ED3D).addRange(0x1F000, 0x1F02B).addRange(0x1F030, 0x1F093).addRange(0x1F0A0, 0x1F0AE).addRange(0x1F0B1, 0x1F0BF).addRange(0x1F0C1, 0x1F0CF).addRange(0x1F0D1, 0x1F0F5).addRange(0x1F100, 0x1F1AD).addRange(0x1F1E6, 0x1F1FF).addRange(0x1F201, 0x1F202).addRange(0x1F210, 0x1F23B).addRange(0x1F240, 0x1F248).addRange(0x1F260, 0x1F265).addRange(0x1F300, 0x1F6D7).addRange(0x1F6DC, 0x1F6EC).addRange(0x1F6F0, 0x1F6FC).addRange(0x1F700, 0x1F776);\nset.addRange(0x1F77B, 0x1F7D9).addRange(0x1F7E0, 0x1F7EB).addRange(0x1F800, 0x1F80B).addRange(0x1F810, 0x1F847).addRange(0x1F850, 0x1F859).addRange(0x1F860, 0x1F887).addRange(0x1F890, 0x1F8AD).addRange(0x1F8B0, 0x1F8B1).addRange(0x1F900, 0x1FA53).addRange(0x1FA60, 0x1FA6D).addRange(0x1FA70, 0x1FA7C).addRange(0x1FA80, 0x1FA88).addRange(0x1FA90, 0x1FABD).addRange(0x1FABF, 0x1FAC5).addRange(0x1FACE, 0x1FADB).addRange(0x1FAE0, 0x1FAE8).addRange(0x1FAF0, 0x1FAF8).addRange(0x1FB00, 0x1FB92).addRange(0x1FB94, 0x1FBCA).addRange(0x1FBF0, 0x1FBF9).addRange(0xE0020, 0xE007F);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x3E2, 0x3EF).addRange(0x2C80, 0x2CF3).addRange(0x2CF9, 0x2CFF).addRange(0x102E0, 0x102FB);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x12000, 0x12399).addRange(0x12400, 0x1246E).addRange(0x12470, 0x12474).addRange(0x12480, 0x12543);\nexports.characters = set;\n","const set = require('regenerate')(0x10808, 0x1083C, 0x1083F);\nset.addRange(0x10100, 0x10102).addRange(0x10107, 0x10133).addRange(0x10137, 0x1013F).addRange(0x10800, 0x10805).addRange(0x1080A, 0x10835).addRange(0x10837, 0x10838);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x10100, 0x10101).addRange(0x12F90, 0x12FF2);\nexports.characters = set;\n","const set = require('regenerate')(0x1D2B, 0x1D78, 0x1DF8, 0x2E43, 0x1E08F);\nset.addRange(0x400, 0x52F).addRange(0x1C80, 0x1C88).addRange(0x2DE0, 0x2DFF).addRange(0xA640, 0xA69F).addRange(0xFE2E, 0xFE2F).addRange(0x1E030, 0x1E06D);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x10400, 0x1044F);\nexports.characters = set;\n","const set = require('regenerate')(0x20F0);\nset.addRange(0x900, 0x952).addRange(0x955, 0x97F).addRange(0x1CD0, 0x1CF6).addRange(0x1CF8, 0x1CF9).addRange(0xA830, 0xA839).addRange(0xA8E0, 0xA8FF).addRange(0x11B00, 0x11B09);\nexports.characters = set;\n","const set = require('regenerate')(0x11909);\nset.addRange(0x11900, 0x11906).addRange(0x1190C, 0x11913).addRange(0x11915, 0x11916).addRange(0x11918, 0x11935).addRange(0x11937, 0x11938).addRange(0x1193B, 0x11946).addRange(0x11950, 0x11959);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x964, 0x96F).addRange(0xA830, 0xA839).addRange(0x11800, 0x1183B);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x1BC00, 0x1BC6A).addRange(0x1BC70, 0x1BC7C).addRange(0x1BC80, 0x1BC88).addRange(0x1BC90, 0x1BC99).addRange(0x1BC9C, 0x1BCA3);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x13000, 0x13455);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x10500, 0x10527);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x10FE0, 0x10FF6);\nexports.characters = set;\n","const set = require('regenerate')(0x1258, 0x12C0);\nset.addRange(0x1200, 0x1248).addRange(0x124A, 0x124D).addRange(0x1250, 0x1256).addRange(0x125A, 0x125D).addRange(0x1260, 0x1288).addRange(0x128A, 0x128D).addRange(0x1290, 0x12B0).addRange(0x12B2, 0x12B5).addRange(0x12B8, 0x12BE).addRange(0x12C2, 0x12C5).addRange(0x12C8, 0x12D6).addRange(0x12D8, 0x1310).addRange(0x1312, 0x1315).addRange(0x1318, 0x135A).addRange(0x135D, 0x137C).addRange(0x1380, 0x1399).addRange(0x2D80, 0x2D96).addRange(0x2DA0, 0x2DA6).addRange(0x2DA8, 0x2DAE).addRange(0x2DB0, 0x2DB6).addRange(0x2DB8, 0x2DBE).addRange(0x2DC0, 0x2DC6).addRange(0x2DC8, 0x2DCE).addRange(0x2DD0, 0x2DD6).addRange(0x2DD8, 0x2DDE).addRange(0xAB01, 0xAB06).addRange(0xAB09, 0xAB0E).addRange(0xAB11, 0xAB16).addRange(0xAB20, 0xAB26).addRange(0xAB28, 0xAB2E).addRange(0x1E7E0, 0x1E7E6).addRange(0x1E7E8, 0x1E7EB).addRange(0x1E7ED, 0x1E7EE).addRange(0x1E7F0, 0x1E7FE);\nexports.characters = set;\n","const set = require('regenerate')(0x10C7, 0x10CD, 0x2D27, 0x2D2D);\nset.addRange(0x10A0, 0x10C5).addRange(0x10D0, 0x10FF).addRange(0x1C90, 0x1CBA).addRange(0x1CBD, 0x1CBF).addRange(0x2D00, 0x2D25);\nexports.characters = set;\n","const set = require('regenerate')(0x484, 0x487, 0x2E43, 0xA66F);\nset.addRange(0x2C00, 0x2C5F).addRange(0x1E000, 0x1E006).addRange(0x1E008, 0x1E018).addRange(0x1E01B, 0x1E021).addRange(0x1E023, 0x1E024).addRange(0x1E026, 0x1E02A);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x10330, 0x1034A);\nexports.characters = set;\n","const set = require('regenerate')(0x1CD0, 0x20F0, 0x11350, 0x11357, 0x11FD3);\nset.addRange(0x951, 0x952).addRange(0x964, 0x965).addRange(0xBE6, 0xBF3).addRange(0x1CD2, 0x1CD3).addRange(0x1CF2, 0x1CF4).addRange(0x1CF8, 0x1CF9).addRange(0x11300, 0x11303).addRange(0x11305, 0x1130C).addRange(0x1130F, 0x11310).addRange(0x11313, 0x11328).addRange(0x1132A, 0x11330).addRange(0x11332, 0x11333).addRange(0x11335, 0x11339).addRange(0x1133B, 0x11344).addRange(0x11347, 0x11348).addRange(0x1134B, 0x1134D).addRange(0x1135D, 0x11363).addRange(0x11366, 0x1136C).addRange(0x11370, 0x11374).addRange(0x11FD0, 0x11FD1);\nexports.characters = set;\n","const set = require('regenerate')(0x342, 0x345, 0x37F, 0x384, 0x386, 0x38C, 0x1F59, 0x1F5B, 0x1F5D, 0x2126, 0xAB65, 0x101A0);\nset.addRange(0x370, 0x373).addRange(0x375, 0x377).addRange(0x37A, 0x37D).addRange(0x388, 0x38A).addRange(0x38E, 0x3A1).addRange(0x3A3, 0x3E1).addRange(0x3F0, 0x3FF).addRange(0x1D26, 0x1D2A).addRange(0x1D5D, 0x1D61).addRange(0x1D66, 0x1D6A).addRange(0x1DBF, 0x1DC1).addRange(0x1F00, 0x1F15).addRange(0x1F18, 0x1F1D).addRange(0x1F20, 0x1F45).addRange(0x1F48, 0x1F4D).addRange(0x1F50, 0x1F57).addRange(0x1F5F, 0x1F7D).addRange(0x1F80, 0x1FB4).addRange(0x1FB6, 0x1FC4).addRange(0x1FC6, 0x1FD3).addRange(0x1FD6, 0x1FDB).addRange(0x1FDD, 0x1FEF).addRange(0x1FF2, 0x1FF4).addRange(0x1FF6, 0x1FFE).addRange(0x10140, 0x1018E).addRange(0x1D200, 0x1D245);\nexports.characters = set;\n","const set = require('regenerate')(0xAD0);\nset.addRange(0x951, 0x952).addRange(0x964, 0x965).addRange(0xA81, 0xA83).addRange(0xA85, 0xA8D).addRange(0xA8F, 0xA91).addRange(0xA93, 0xAA8).addRange(0xAAA, 0xAB0).addRange(0xAB2, 0xAB3).addRange(0xAB5, 0xAB9).addRange(0xABC, 0xAC5).addRange(0xAC7, 0xAC9).addRange(0xACB, 0xACD).addRange(0xAE0, 0xAE3).addRange(0xAE6, 0xAF1).addRange(0xAF9, 0xAFF).addRange(0xA830, 0xA839);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x964, 0x965).addRange(0x11D60, 0x11D65).addRange(0x11D67, 0x11D68).addRange(0x11D6A, 0x11D8E).addRange(0x11D90, 0x11D91).addRange(0x11D93, 0x11D98).addRange(0x11DA0, 0x11DA9);\nexports.characters = set;\n","const set = require('regenerate')(0xA3C, 0xA51, 0xA5E);\nset.addRange(0x951, 0x952).addRange(0x964, 0x965).addRange(0xA01, 0xA03).addRange(0xA05, 0xA0A).addRange(0xA0F, 0xA10).addRange(0xA13, 0xA28).addRange(0xA2A, 0xA30).addRange(0xA32, 0xA33).addRange(0xA35, 0xA36).addRange(0xA38, 0xA39).addRange(0xA3E, 0xA42).addRange(0xA47, 0xA48).addRange(0xA4B, 0xA4D).addRange(0xA59, 0xA5C).addRange(0xA66, 0xA76).addRange(0xA830, 0xA839);\nexports.characters = set;\n","const set = require('regenerate')(0x3030, 0x30FB, 0x32FF);\nset.addRange(0x2E80, 0x2E99).addRange(0x2E9B, 0x2EF3).addRange(0x2F00, 0x2FD5).addRange(0x3001, 0x3003).addRange(0x3005, 0x3011).addRange(0x3013, 0x301F).addRange(0x3021, 0x302D).addRange(0x3037, 0x303F).addRange(0x3190, 0x319F).addRange(0x31C0, 0x31E3).addRange(0x3220, 0x3247).addRange(0x3280, 0x32B0).addRange(0x32C0, 0x32CB).addRange(0x3358, 0x3370).addRange(0x337B, 0x337F).addRange(0x33E0, 0x33FE).addRange(0x3400, 0x4DBF).addRange(0x4E00, 0x9FFF).addRange(0xA700, 0xA707).addRange(0xF900, 0xFA6D).addRange(0xFA70, 0xFAD9).addRange(0xFE45, 0xFE46).addRange(0xFF61, 0xFF65).addRange(0x16FE2, 0x16FE3).addRange(0x16FF0, 0x16FF1).addRange(0x1D360, 0x1D371).addRange(0x1F250, 0x1F251).addRange(0x20000, 0x2A6DF).addRange(0x2A700, 0x2B739).addRange(0x2B740, 0x2B81D).addRange(0x2B820, 0x2CEA1).addRange(0x2CEB0, 0x2EBE0).addRange(0x2EBF0, 0x2EE5D).addRange(0x2F800, 0x2FA1D).addRange(0x30000, 0x3134A).addRange(0x31350, 0x323AF);\nexports.characters = set;\n","const set = require('regenerate')(0x3037, 0x30FB);\nset.addRange(0x1100, 0x11FF).addRange(0x3001, 0x3003).addRange(0x3008, 0x3011).addRange(0x3013, 0x301F).addRange(0x302E, 0x3030).addRange(0x3131, 0x318E).addRange(0x3200, 0x321E).addRange(0x3260, 0x327E).addRange(0xA960, 0xA97C).addRange(0xAC00, 0xD7A3).addRange(0xD7B0, 0xD7C6).addRange(0xD7CB, 0xD7FB).addRange(0xFE45, 0xFE46).addRange(0xFF61, 0xFF65).addRange(0xFFA0, 0xFFBE).addRange(0xFFC2, 0xFFC7).addRange(0xFFCA, 0xFFCF).addRange(0xFFD2, 0xFFD7).addRange(0xFFDA, 0xFFDC);\nexports.characters = set;\n","const set = require('regenerate')(0x60C, 0x61B, 0x61F, 0x640, 0x6D4);\nset.addRange(0x10D00, 0x10D27).addRange(0x10D30, 0x10D39);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x1720, 0x1736);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x108E0, 0x108F2).addRange(0x108F4, 0x108F5).addRange(0x108FB, 0x108FF);\nexports.characters = set;\n","const set = require('regenerate')(0xFB3E);\nset.addRange(0x591, 0x5C7).addRange(0x5D0, 0x5EA).addRange(0x5EF, 0x5F4).addRange(0xFB1D, 0xFB36).addRange(0xFB38, 0xFB3C).addRange(0xFB40, 0xFB41).addRange(0xFB43, 0xFB44).addRange(0xFB46, 0xFB4F);\nexports.characters = set;\n","const set = require('regenerate')(0x3037, 0xFF70, 0x1B132, 0x1F200);\nset.addRange(0x3001, 0x3003).addRange(0x3008, 0x3011).addRange(0x3013, 0x301F).addRange(0x3030, 0x3035).addRange(0x303C, 0x303D).addRange(0x3041, 0x3096).addRange(0x3099, 0x30A0).addRange(0x30FB, 0x30FC).addRange(0xFE45, 0xFE46).addRange(0xFF61, 0xFF65).addRange(0xFF9E, 0xFF9F).addRange(0x1B001, 0x1B11F).addRange(0x1B150, 0x1B152);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x10840, 0x10855).addRange(0x10857, 0x1085F);\nexports.characters = set;\n","const set = require('regenerate')(0x1DF9, 0x101FD);\nset.addRange(0x300, 0x341).addRange(0x343, 0x344).addRange(0x346, 0x362).addRange(0x953, 0x954).addRange(0x1AB0, 0x1ACE).addRange(0x1DC2, 0x1DF7).addRange(0x1DFB, 0x1DFF).addRange(0x200C, 0x200D).addRange(0x20D0, 0x20EF).addRange(0xFE00, 0xFE0F).addRange(0xFE20, 0xFE2D).addRange(0x1CF00, 0x1CF2D).addRange(0x1CF30, 0x1CF46).addRange(0x1D167, 0x1D169).addRange(0x1D17B, 0x1D182).addRange(0x1D185, 0x1D18B).addRange(0x1D1AA, 0x1D1AD).addRange(0xE0100, 0xE01EF);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x10B60, 0x10B72).addRange(0x10B78, 0x10B7F);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x10B40, 0x10B55).addRange(0x10B58, 0x10B5F);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0xA980, 0xA9CD).addRange(0xA9CF, 0xA9D9).addRange(0xA9DE, 0xA9DF);\nexports.characters = set;\n","const set = require('regenerate')(0x110CD);\nset.addRange(0x966, 0x96F).addRange(0xA830, 0xA839).addRange(0x11080, 0x110C2);\nexports.characters = set;\n","const set = require('regenerate')(0x1CD0, 0x1CD2, 0x1CDA, 0x1CF2, 0x1CF4);\nset.addRange(0x951, 0x952).addRange(0x964, 0x965).addRange(0xC80, 0xC8C).addRange(0xC8E, 0xC90).addRange(0xC92, 0xCA8).addRange(0xCAA, 0xCB3).addRange(0xCB5, 0xCB9).addRange(0xCBC, 0xCC4).addRange(0xCC6, 0xCC8).addRange(0xCCA, 0xCCD).addRange(0xCD5, 0xCD6).addRange(0xCDD, 0xCDE).addRange(0xCE0, 0xCE3).addRange(0xCE6, 0xCEF).addRange(0xCF1, 0xCF3).addRange(0xA830, 0xA835);\nexports.characters = set;\n","const set = require('regenerate')(0x3037, 0x1B000, 0x1B155);\nset.addRange(0x3001, 0x3003).addRange(0x3008, 0x3011).addRange(0x3013, 0x301F).addRange(0x3030, 0x3035).addRange(0x303C, 0x303D).addRange(0x3099, 0x309C).addRange(0x30A0, 0x30FF).addRange(0x31F0, 0x31FF).addRange(0x32D0, 0x32FE).addRange(0x3300, 0x3357).addRange(0xFE45, 0xFE46).addRange(0xFF61, 0xFF9F).addRange(0x1AFF0, 0x1AFF3).addRange(0x1AFF5, 0x1AFFB).addRange(0x1AFFD, 0x1AFFE).addRange(0x1B120, 0x1B122).addRange(0x1B164, 0x1B167);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x11F00, 0x11F10).addRange(0x11F12, 0x11F3A).addRange(0x11F3E, 0x11F59);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0xA900, 0xA92F);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x10A00, 0x10A03).addRange(0x10A05, 0x10A06).addRange(0x10A0C, 0x10A13).addRange(0x10A15, 0x10A17).addRange(0x10A19, 0x10A35).addRange(0x10A38, 0x10A3A).addRange(0x10A3F, 0x10A48).addRange(0x10A50, 0x10A58);\nexports.characters = set;\n","const set = require('regenerate')(0x16FE4);\nset.addRange(0x18B00, 0x18CD5);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x1780, 0x17DD).addRange(0x17E0, 0x17E9).addRange(0x17F0, 0x17F9).addRange(0x19E0, 0x19FF);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0xAE6, 0xAEF).addRange(0xA830, 0xA839).addRange(0x11200, 0x11211).addRange(0x11213, 0x11241);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x964, 0x965).addRange(0xA830, 0xA839).addRange(0x112B0, 0x112EA).addRange(0x112F0, 0x112F9);\nexports.characters = set;\n","const set = require('regenerate')(0xE84, 0xEA5, 0xEC6);\nset.addRange(0xE81, 0xE82).addRange(0xE86, 0xE8A).addRange(0xE8C, 0xEA3).addRange(0xEA7, 0xEBD).addRange(0xEC0, 0xEC4).addRange(0xEC8, 0xECE).addRange(0xED0, 0xED9).addRange(0xEDC, 0xEDF);\nexports.characters = set;\n","const set = require('regenerate')(0xAA, 0xBA, 0x10FB, 0x202F, 0x2071, 0x207F, 0x20F0, 0x2132, 0x214E, 0xA7D3, 0xA92E);\nset.addRange(0x41, 0x5A).addRange(0x61, 0x7A).addRange(0xC0, 0xD6).addRange(0xD8, 0xF6).addRange(0xF8, 0x2B8).addRange(0x2E0, 0x2E4).addRange(0x363, 0x36F).addRange(0x485, 0x486).addRange(0x951, 0x952).addRange(0x1D00, 0x1D25).addRange(0x1D2C, 0x1D5C).addRange(0x1D62, 0x1D65).addRange(0x1D6B, 0x1D77).addRange(0x1D79, 0x1DBE).addRange(0x1E00, 0x1EFF).addRange(0x2090, 0x209C).addRange(0x212A, 0x212B).addRange(0x2160, 0x2188).addRange(0x2C60, 0x2C7F).addRange(0xA700, 0xA707).addRange(0xA722, 0xA787).addRange(0xA78B, 0xA7CA).addRange(0xA7D0, 0xA7D1).addRange(0xA7D5, 0xA7D9).addRange(0xA7F2, 0xA7FF).addRange(0xAB30, 0xAB5A).addRange(0xAB5C, 0xAB64).addRange(0xAB66, 0xAB69).addRange(0xFB00, 0xFB06).addRange(0xFF21, 0xFF3A).addRange(0xFF41, 0xFF5A).addRange(0x10780, 0x10785).addRange(0x10787, 0x107B0).addRange(0x107B2, 0x107BA).addRange(0x1DF00, 0x1DF1E).addRange(0x1DF25, 0x1DF2A);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x1C00, 0x1C37).addRange(0x1C3B, 0x1C49).addRange(0x1C4D, 0x1C4F);\nexports.characters = set;\n","const set = require('regenerate')(0x965, 0x1940);\nset.addRange(0x1900, 0x191E).addRange(0x1920, 0x192B).addRange(0x1930, 0x193B).addRange(0x1944, 0x194F);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x10107, 0x10133).addRange(0x10600, 0x10736).addRange(0x10740, 0x10755).addRange(0x10760, 0x10767);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x10000, 0x1000B).addRange(0x1000D, 0x10026).addRange(0x10028, 0x1003A).addRange(0x1003C, 0x1003D).addRange(0x1003F, 0x1004D).addRange(0x10050, 0x1005D).addRange(0x10080, 0x100FA).addRange(0x10100, 0x10102).addRange(0x10107, 0x10133).addRange(0x10137, 0x1013F);\nexports.characters = set;\n","const set = require('regenerate')(0x11FB0);\nset.addRange(0xA4D0, 0xA4FF);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x10280, 0x1029C);\nexports.characters = set;\n","const set = require('regenerate')(0x1093F);\nset.addRange(0x10920, 0x10939);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x964, 0x96F).addRange(0xA830, 0xA839).addRange(0x11150, 0x11176);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x11EE0, 0x11EF8);\nexports.characters = set;\n","const set = require('regenerate')(0x1CDA, 0x1CF2);\nset.addRange(0x951, 0x952).addRange(0x964, 0x965).addRange(0xD00, 0xD0C).addRange(0xD0E, 0xD10).addRange(0xD12, 0xD44).addRange(0xD46, 0xD48).addRange(0xD4A, 0xD4F).addRange(0xD54, 0xD63).addRange(0xD66, 0xD7F).addRange(0xA830, 0xA832);\nexports.characters = set;\n","const set = require('regenerate')(0x640, 0x85E);\nset.addRange(0x840, 0x85B);\nexports.characters = set;\n","const set = require('regenerate')(0x640);\nset.addRange(0x10AC0, 0x10AE6).addRange(0x10AEB, 0x10AF6);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x11C70, 0x11C8F).addRange(0x11C92, 0x11CA7).addRange(0x11CA9, 0x11CB6);\nexports.characters = set;\n","const set = require('regenerate')(0x11D3A);\nset.addRange(0x964, 0x965).addRange(0x11D00, 0x11D06).addRange(0x11D08, 0x11D09).addRange(0x11D0B, 0x11D36).addRange(0x11D3C, 0x11D3D).addRange(0x11D3F, 0x11D47).addRange(0x11D50, 0x11D59);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x16E40, 0x16E9A);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0xAAE0, 0xAAF6).addRange(0xABC0, 0xABED).addRange(0xABF0, 0xABF9);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x1E800, 0x1E8C4).addRange(0x1E8C7, 0x1E8D6);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x109A0, 0x109B7).addRange(0x109BC, 0x109CF).addRange(0x109D2, 0x109FF);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x10980, 0x1099F);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x16F00, 0x16F4A).addRange(0x16F4F, 0x16F87).addRange(0x16F8F, 0x16F9F);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0xA830, 0xA839).addRange(0x11600, 0x11644).addRange(0x11650, 0x11659);\nexports.characters = set;\n","const set = require('regenerate')(0x202F);\nset.addRange(0x1800, 0x1819).addRange(0x1820, 0x1878).addRange(0x1880, 0x18AA).addRange(0x11660, 0x1166C);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x16A40, 0x16A5E).addRange(0x16A60, 0x16A69).addRange(0x16A6E, 0x16A6F);\nexports.characters = set;\n","const set = require('regenerate')(0x11288);\nset.addRange(0xA66, 0xA6F).addRange(0x11280, 0x11286).addRange(0x1128A, 0x1128D).addRange(0x1128F, 0x1129D).addRange(0x1129F, 0x112A9);\nexports.characters = set;\n","const set = require('regenerate')(0xA92E);\nset.addRange(0x1000, 0x109F).addRange(0xA9E0, 0xA9FE).addRange(0xAA60, 0xAA7F);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x10880, 0x1089E).addRange(0x108A7, 0x108AF);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x1E4D0, 0x1E4F9);\nexports.characters = set;\n","const set = require('regenerate')(0x1CE9, 0x1CF2, 0x1CFA);\nset.addRange(0x964, 0x965).addRange(0xCE6, 0xCEF).addRange(0xA830, 0xA835).addRange(0x119A0, 0x119A7).addRange(0x119AA, 0x119D7).addRange(0x119DA, 0x119E4);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x1980, 0x19AB).addRange(0x19B0, 0x19C9).addRange(0x19D0, 0x19DA).addRange(0x19DE, 0x19DF);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x11400, 0x1145B).addRange(0x1145D, 0x11461);\nexports.characters = set;\n","const set = require('regenerate')(0x60C, 0x61B, 0x61F);\nset.addRange(0x7C0, 0x7FA).addRange(0x7FD, 0x7FF).addRange(0xFD3E, 0xFD3F);\nexports.characters = set;\n","const set = require('regenerate')(0x16FE1);\nset.addRange(0x1B170, 0x1B2FB);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x1E100, 0x1E12C).addRange(0x1E130, 0x1E13D).addRange(0x1E140, 0x1E149).addRange(0x1E14E, 0x1E14F);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x1680, 0x169C);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x1C50, 0x1C7F);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x10C80, 0x10CB2).addRange(0x10CC0, 0x10CF2).addRange(0x10CFA, 0x10CFF);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x10300, 0x10323).addRange(0x1032D, 0x1032F);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x10A80, 0x10A9F);\nexports.characters = set;\n","const set = require('regenerate')(0x483);\nset.addRange(0x10350, 0x1037A);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x103A0, 0x103C3).addRange(0x103C8, 0x103D5);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x10F00, 0x10F27);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x10A60, 0x10A7F);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x10C00, 0x10C48);\nexports.characters = set;\n","const set = require('regenerate')(0x640, 0x10AF2);\nset.addRange(0x10F70, 0x10F89);\nexports.characters = set;\n","const set = require('regenerate')(0x1CDA, 0x1CF2);\nset.addRange(0x951, 0x952).addRange(0x964, 0x965).addRange(0xB01, 0xB03).addRange(0xB05, 0xB0C).addRange(0xB0F, 0xB10).addRange(0xB13, 0xB28).addRange(0xB2A, 0xB30).addRange(0xB32, 0xB33).addRange(0xB35, 0xB39).addRange(0xB3C, 0xB44).addRange(0xB47, 0xB48).addRange(0xB4B, 0xB4D).addRange(0xB55, 0xB57).addRange(0xB5C, 0xB5D).addRange(0xB5F, 0xB63).addRange(0xB66, 0xB77);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x104B0, 0x104D3).addRange(0x104D8, 0x104FB);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x10480, 0x1049D).addRange(0x104A0, 0x104A9);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x16B00, 0x16B45).addRange(0x16B50, 0x16B59).addRange(0x16B5B, 0x16B61).addRange(0x16B63, 0x16B77).addRange(0x16B7D, 0x16B8F);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x10860, 0x1087F);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x11AC0, 0x11AF8);\nexports.characters = set;\n","const set = require('regenerate')(0x1805);\nset.addRange(0x1802, 0x1803).addRange(0xA840, 0xA877);\nexports.characters = set;\n","const set = require('regenerate')(0x1091F);\nset.addRange(0x10900, 0x1091B);\nexports.characters = set;\n","const set = require('regenerate')(0x640);\nset.addRange(0x10B80, 0x10B91).addRange(0x10B99, 0x10B9C).addRange(0x10BA9, 0x10BAF);\nexports.characters = set;\n","const set = require('regenerate')(0xA95F);\nset.addRange(0xA930, 0xA953);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x16A0, 0x16EA).addRange(0x16EE, 0x16F8);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x800, 0x82D).addRange(0x830, 0x83E);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0xA880, 0xA8C5).addRange(0xA8CE, 0xA8D9);\nexports.characters = set;\n","const set = require('regenerate')(0x951, 0x1CD7, 0x1CD9, 0x1CE0, 0xA838);\nset.addRange(0x1CDC, 0x1CDD).addRange(0xA830, 0xA835).addRange(0x11180, 0x111DF);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x10450, 0x1047F);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x11580, 0x115B5).addRange(0x115B8, 0x115DD);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x1D800, 0x1DA8B).addRange(0x1DA9B, 0x1DA9F).addRange(0x1DAA1, 0x1DAAF);\nexports.characters = set;\n","const set = require('regenerate')(0xDBD, 0xDCA, 0xDD6, 0x1CF2);\nset.addRange(0x964, 0x965).addRange(0xD81, 0xD83).addRange(0xD85, 0xD96).addRange(0xD9A, 0xDB1).addRange(0xDB3, 0xDBB).addRange(0xDC0, 0xDC6).addRange(0xDCF, 0xDD4).addRange(0xDD8, 0xDDF).addRange(0xDE6, 0xDEF).addRange(0xDF2, 0xDF4).addRange(0x111E1, 0x111F4);\nexports.characters = set;\n","const set = require('regenerate')(0x640);\nset.addRange(0x10F30, 0x10F59);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x110D0, 0x110E8).addRange(0x110F0, 0x110F9);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x11A50, 0x11AA2);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x1B80, 0x1BBF).addRange(0x1CC0, 0x1CC7);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x964, 0x965).addRange(0x9E6, 0x9EF).addRange(0xA800, 0xA82C);\nexports.characters = set;\n","const set = require('regenerate')(0x60C, 0x61F, 0x640, 0x670, 0x1DF8, 0x1DFA);\nset.addRange(0x61B, 0x61C).addRange(0x64B, 0x655).addRange(0x700, 0x70D).addRange(0x70F, 0x74A).addRange(0x74D, 0x74F).addRange(0x860, 0x86A);\nexports.characters = set;\n","const set = require('regenerate')(0x171F);\nset.addRange(0x1700, 0x1715).addRange(0x1735, 0x1736);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x1735, 0x1736).addRange(0x1760, 0x176C).addRange(0x176E, 0x1770).addRange(0x1772, 0x1773);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x1040, 0x1049).addRange(0x1950, 0x196D).addRange(0x1970, 0x1974);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x1A20, 0x1A5E).addRange(0x1A60, 0x1A7C).addRange(0x1A7F, 0x1A89).addRange(0x1A90, 0x1A99).addRange(0x1AA0, 0x1AAD);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0xAA80, 0xAAC2).addRange(0xAADB, 0xAADF);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x964, 0x965).addRange(0xA830, 0xA839).addRange(0x11680, 0x116B9).addRange(0x116C0, 0x116C9);\nexports.characters = set;\n","const set = require('regenerate')(0xB9C, 0xBD0, 0xBD7, 0x1CDA, 0xA8F3, 0x11301, 0x11303, 0x11FFF);\nset.addRange(0x951, 0x952).addRange(0x964, 0x965).addRange(0xB82, 0xB83).addRange(0xB85, 0xB8A).addRange(0xB8E, 0xB90).addRange(0xB92, 0xB95).addRange(0xB99, 0xB9A).addRange(0xB9E, 0xB9F).addRange(0xBA3, 0xBA4).addRange(0xBA8, 0xBAA).addRange(0xBAE, 0xBB9).addRange(0xBBE, 0xBC2).addRange(0xBC6, 0xBC8).addRange(0xBCA, 0xBCD).addRange(0xBE6, 0xBFA).addRange(0x1133B, 0x1133C).addRange(0x11FC0, 0x11FF1);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x16A70, 0x16ABE).addRange(0x16AC0, 0x16AC9);\nexports.characters = set;\n","const set = require('regenerate')(0x16FE0);\nset.addRange(0x17000, 0x187F7).addRange(0x18800, 0x18AFF).addRange(0x18D00, 0x18D08);\nexports.characters = set;\n","const set = require('regenerate')(0xC5D, 0x1CDA, 0x1CF2);\nset.addRange(0x951, 0x952).addRange(0x964, 0x965).addRange(0xC00, 0xC0C).addRange(0xC0E, 0xC10).addRange(0xC12, 0xC28).addRange(0xC2A, 0xC39).addRange(0xC3C, 0xC44).addRange(0xC46, 0xC48).addRange(0xC4A, 0xC4D).addRange(0xC55, 0xC56).addRange(0xC58, 0xC5A).addRange(0xC60, 0xC63).addRange(0xC66, 0xC6F).addRange(0xC77, 0xC7F);\nexports.characters = set;\n","const set = require('regenerate')(0x60C, 0x61F, 0xFDF2, 0xFDFD);\nset.addRange(0x61B, 0x61C).addRange(0x660, 0x669).addRange(0x780, 0x7B1);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0xE01, 0xE3A).addRange(0xE40, 0xE5B);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0xF00, 0xF47).addRange(0xF49, 0xF6C).addRange(0xF71, 0xF97).addRange(0xF99, 0xFBC).addRange(0xFBE, 0xFCC).addRange(0xFCE, 0xFD4).addRange(0xFD9, 0xFDA);\nexports.characters = set;\n","const set = require('regenerate')(0x2D7F);\nset.addRange(0x2D30, 0x2D67).addRange(0x2D6F, 0x2D70);\nexports.characters = set;\n","const set = require('regenerate')(0x1CF2);\nset.addRange(0x951, 0x952).addRange(0x964, 0x965).addRange(0xA830, 0xA839).addRange(0x11480, 0x114C7).addRange(0x114D0, 0x114D9);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x1E290, 0x1E2AE);\nexports.characters = set;\n","const set = require('regenerate')(0x1039F);\nset.addRange(0x10380, 0x1039D);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0xA500, 0xA62B);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x10570, 0x1057A).addRange(0x1057C, 0x1058A).addRange(0x1058C, 0x10592).addRange(0x10594, 0x10595).addRange(0x10597, 0x105A1).addRange(0x105A3, 0x105B1).addRange(0x105B3, 0x105B9).addRange(0x105BB, 0x105BC);\nexports.characters = set;\n","const set = require('regenerate')(0x1E2FF);\nset.addRange(0x1E2C0, 0x1E2F9);\nexports.characters = set;\n","const set = require('regenerate')(0x118FF);\nset.addRange(0x118A0, 0x118F2);\nexports.characters = set;\n","const set = require('regenerate')(0x60C, 0x61B, 0x61F);\nset.addRange(0x660, 0x669).addRange(0x10E80, 0x10EA9).addRange(0x10EAB, 0x10EAD).addRange(0x10EB0, 0x10EB1);\nexports.characters = set;\n","const set = require('regenerate')(0x30FB);\nset.addRange(0x3001, 0x3002).addRange(0x3008, 0x3011).addRange(0x3014, 0x301B).addRange(0xA000, 0xA48C).addRange(0xA490, 0xA4C6).addRange(0xFF61, 0xFF65);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x11A00, 0x11A47);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x1E900, 0x1E94B).addRange(0x1E950, 0x1E959).addRange(0x1E95E, 0x1E95F);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x11700, 0x1171A).addRange(0x1171D, 0x1172B).addRange(0x11730, 0x11746);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x14400, 0x14646);\nexports.characters = set;\n","const set = require('regenerate')(0xFDCF, 0x1EE24, 0x1EE27, 0x1EE39, 0x1EE3B, 0x1EE42, 0x1EE47, 0x1EE49, 0x1EE4B, 0x1EE54, 0x1EE57, 0x1EE59, 0x1EE5B, 0x1EE5D, 0x1EE5F, 0x1EE64, 0x1EE7E);\nset.addRange(0x600, 0x604).addRange(0x606, 0x60B).addRange(0x60D, 0x61A).addRange(0x61C, 0x61E).addRange(0x620, 0x63F).addRange(0x641, 0x64A).addRange(0x656, 0x66F).addRange(0x671, 0x6DC).addRange(0x6DE, 0x6FF).addRange(0x750, 0x77F).addRange(0x870, 0x88E).addRange(0x890, 0x891).addRange(0x898, 0x8E1).addRange(0x8E3, 0x8FF).addRange(0xFB50, 0xFBC2).addRange(0xFBD3, 0xFD3D).addRange(0xFD40, 0xFD8F).addRange(0xFD92, 0xFDC7).addRange(0xFDF0, 0xFDFF).addRange(0xFE70, 0xFE74).addRange(0xFE76, 0xFEFC).addRange(0x10E60, 0x10E7E).addRange(0x10EFD, 0x10EFF).addRange(0x1EE00, 0x1EE03).addRange(0x1EE05, 0x1EE1F).addRange(0x1EE21, 0x1EE22).addRange(0x1EE29, 0x1EE32).addRange(0x1EE34, 0x1EE37).addRange(0x1EE4D, 0x1EE4F).addRange(0x1EE51, 0x1EE52).addRange(0x1EE61, 0x1EE62).addRange(0x1EE67, 0x1EE6A).addRange(0x1EE6C, 0x1EE72).addRange(0x1EE74, 0x1EE77).addRange(0x1EE79, 0x1EE7C).addRange(0x1EE80, 0x1EE89).addRange(0x1EE8B, 0x1EE9B).addRange(0x1EEA1, 0x1EEA3).addRange(0x1EEA5, 0x1EEA9).addRange(0x1EEAB, 0x1EEBB).addRange(0x1EEF0, 0x1EEF1);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x531, 0x556).addRange(0x559, 0x58A).addRange(0x58D, 0x58F).addRange(0xFB13, 0xFB17);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x10B00, 0x10B35).addRange(0x10B39, 0x10B3F);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x1B00, 0x1B4C).addRange(0x1B50, 0x1B7E);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0xA6A0, 0xA6F7).addRange(0x16800, 0x16A38);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x16AD0, 0x16AED).addRange(0x16AF0, 0x16AF5);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x1BC0, 0x1BF3).addRange(0x1BFC, 0x1BFF);\nexports.characters = set;\n","const set = require('regenerate')(0x9B2, 0x9D7);\nset.addRange(0x980, 0x983).addRange(0x985, 0x98C).addRange(0x98F, 0x990).addRange(0x993, 0x9A8).addRange(0x9AA, 0x9B0).addRange(0x9B6, 0x9B9).addRange(0x9BC, 0x9C4).addRange(0x9C7, 0x9C8).addRange(0x9CB, 0x9CE).addRange(0x9DC, 0x9DD).addRange(0x9DF, 0x9E3).addRange(0x9E6, 0x9FE);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x11C00, 0x11C08).addRange(0x11C0A, 0x11C36).addRange(0x11C38, 0x11C45).addRange(0x11C50, 0x11C6C);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x2EA, 0x2EB).addRange(0x3105, 0x312F).addRange(0x31A0, 0x31BF);\nexports.characters = set;\n","const set = require('regenerate')(0x1107F);\nset.addRange(0x11000, 0x1104D).addRange(0x11052, 0x11075);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x2800, 0x28FF);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x1A00, 0x1A1B).addRange(0x1A1E, 0x1A1F);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x1740, 0x1753);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x1400, 0x167F).addRange(0x18B0, 0x18F5).addRange(0x11AB0, 0x11ABF);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x102A0, 0x102D0);\nexports.characters = set;\n","const set = require('regenerate')(0x1056F);\nset.addRange(0x10530, 0x10563);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x11100, 0x11134).addRange(0x11136, 0x11147);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0xAA00, 0xAA36).addRange(0xAA40, 0xAA4D).addRange(0xAA50, 0xAA59).addRange(0xAA5C, 0xAA5F);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x13A0, 0x13F5).addRange(0x13F8, 0x13FD).addRange(0xAB70, 0xABBF);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x10FB0, 0x10FCB);\nexports.characters = set;\n","const set = require('regenerate')(0xD7, 0xF7, 0x374, 0x37E, 0x385, 0x387, 0x605, 0x60C, 0x61B, 0x61F, 0x640, 0x6DD, 0x8E2, 0xE3F, 0x10FB, 0x1805, 0x1CD3, 0x1CE1, 0x1CFA, 0x3006, 0x30A0, 0x31EF, 0x32FF, 0xA92E, 0xA9CF, 0xAB5B, 0xFEFF, 0xFF70, 0x1D4A2, 0x1D4BB, 0x1D546, 0x1F7F0, 0xE0001);\nset.addRange(0x0, 0x40).addRange(0x5B, 0x60).addRange(0x7B, 0xA9).addRange(0xAB, 0xB9).addRange(0xBB, 0xBF).addRange(0x2B9, 0x2DF).addRange(0x2E5, 0x2E9).addRange(0x2EC, 0x2FF).addRange(0x964, 0x965).addRange(0xFD5, 0xFD8).addRange(0x16EB, 0x16ED).addRange(0x1735, 0x1736).addRange(0x1802, 0x1803).addRange(0x1CE9, 0x1CEC).addRange(0x1CEE, 0x1CF3).addRange(0x1CF5, 0x1CF7).addRange(0x2000, 0x200B).addRange(0x200E, 0x2064).addRange(0x2066, 0x2070).addRange(0x2074, 0x207E).addRange(0x2080, 0x208E).addRange(0x20A0, 0x20C0).addRange(0x2100, 0x2125).addRange(0x2127, 0x2129).addRange(0x212C, 0x2131).addRange(0x2133, 0x214D).addRange(0x214F, 0x215F).addRange(0x2189, 0x218B).addRange(0x2190, 0x2426).addRange(0x2440, 0x244A).addRange(0x2460, 0x27FF).addRange(0x2900, 0x2B73).addRange(0x2B76, 0x2B95).addRange(0x2B97, 0x2BFF).addRange(0x2E00, 0x2E5D).addRange(0x2FF0, 0x3004).addRange(0x3008, 0x3020).addRange(0x3030, 0x3037).addRange(0x303C, 0x303F).addRange(0x309B, 0x309C).addRange(0x30FB, 0x30FC).addRange(0x3190, 0x319F).addRange(0x31C0, 0x31E3).addRange(0x3220, 0x325F).addRange(0x327F, 0x32CF).addRange(0x3358, 0x33FF).addRange(0x4DC0, 0x4DFF).addRange(0xA700, 0xA721).addRange(0xA788, 0xA78A).addRange(0xA830, 0xA839).addRange(0xAB6A, 0xAB6B);\nset.addRange(0xFD3E, 0xFD3F).addRange(0xFE10, 0xFE19).addRange(0xFE30, 0xFE52).addRange(0xFE54, 0xFE66).addRange(0xFE68, 0xFE6B).addRange(0xFF01, 0xFF20).addRange(0xFF3B, 0xFF40).addRange(0xFF5B, 0xFF65).addRange(0xFF9E, 0xFF9F).addRange(0xFFE0, 0xFFE6).addRange(0xFFE8, 0xFFEE).addRange(0xFFF9, 0xFFFD).addRange(0x10100, 0x10102).addRange(0x10107, 0x10133).addRange(0x10137, 0x1013F).addRange(0x10190, 0x1019C).addRange(0x101D0, 0x101FC).addRange(0x102E1, 0x102FB).addRange(0x1BCA0, 0x1BCA3).addRange(0x1CF50, 0x1CFC3).addRange(0x1D000, 0x1D0F5).addRange(0x1D100, 0x1D126).addRange(0x1D129, 0x1D166).addRange(0x1D16A, 0x1D17A).addRange(0x1D183, 0x1D184).addRange(0x1D18C, 0x1D1A9).addRange(0x1D1AE, 0x1D1EA).addRange(0x1D2C0, 0x1D2D3).addRange(0x1D2E0, 0x1D2F3).addRange(0x1D300, 0x1D356).addRange(0x1D360, 0x1D378).addRange(0x1D400, 0x1D454).addRange(0x1D456, 0x1D49C).addRange(0x1D49E, 0x1D49F).addRange(0x1D4A5, 0x1D4A6).addRange(0x1D4A9, 0x1D4AC).addRange(0x1D4AE, 0x1D4B9).addRange(0x1D4BD, 0x1D4C3).addRange(0x1D4C5, 0x1D505).addRange(0x1D507, 0x1D50A).addRange(0x1D50D, 0x1D514).addRange(0x1D516, 0x1D51C).addRange(0x1D51E, 0x1D539).addRange(0x1D53B, 0x1D53E).addRange(0x1D540, 0x1D544).addRange(0x1D54A, 0x1D550).addRange(0x1D552, 0x1D6A5).addRange(0x1D6A8, 0x1D7CB).addRange(0x1D7CE, 0x1D7FF).addRange(0x1EC71, 0x1ECB4).addRange(0x1ED01, 0x1ED3D);\nset.addRange(0x1F000, 0x1F02B).addRange(0x1F030, 0x1F093).addRange(0x1F0A0, 0x1F0AE).addRange(0x1F0B1, 0x1F0BF).addRange(0x1F0C1, 0x1F0CF).addRange(0x1F0D1, 0x1F0F5).addRange(0x1F100, 0x1F1AD).addRange(0x1F1E6, 0x1F1FF).addRange(0x1F201, 0x1F202).addRange(0x1F210, 0x1F23B).addRange(0x1F240, 0x1F248).addRange(0x1F250, 0x1F251).addRange(0x1F260, 0x1F265).addRange(0x1F300, 0x1F6D7).addRange(0x1F6DC, 0x1F6EC).addRange(0x1F6F0, 0x1F6FC).addRange(0x1F700, 0x1F776).addRange(0x1F77B, 0x1F7D9).addRange(0x1F7E0, 0x1F7EB).addRange(0x1F800, 0x1F80B).addRange(0x1F810, 0x1F847).addRange(0x1F850, 0x1F859).addRange(0x1F860, 0x1F887).addRange(0x1F890, 0x1F8AD).addRange(0x1F8B0, 0x1F8B1).addRange(0x1F900, 0x1FA53).addRange(0x1FA60, 0x1FA6D).addRange(0x1FA70, 0x1FA7C).addRange(0x1FA80, 0x1FA88).addRange(0x1FA90, 0x1FABD).addRange(0x1FABF, 0x1FAC5).addRange(0x1FACE, 0x1FADB).addRange(0x1FAE0, 0x1FAE8).addRange(0x1FAF0, 0x1FAF8).addRange(0x1FB00, 0x1FB92).addRange(0x1FB94, 0x1FBCA).addRange(0x1FBF0, 0x1FBF9).addRange(0xE0020, 0xE007F);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x3E2, 0x3EF).addRange(0x2C80, 0x2CF3).addRange(0x2CF9, 0x2CFF);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x12000, 0x12399).addRange(0x12400, 0x1246E).addRange(0x12470, 0x12474).addRange(0x12480, 0x12543);\nexports.characters = set;\n","const set = require('regenerate')(0x10808, 0x1083C, 0x1083F);\nset.addRange(0x10800, 0x10805).addRange(0x1080A, 0x10835).addRange(0x10837, 0x10838);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x12F90, 0x12FF2);\nexports.characters = set;\n","const set = require('regenerate')(0x1D2B, 0x1D78, 0x1E08F);\nset.addRange(0x400, 0x484).addRange(0x487, 0x52F).addRange(0x1C80, 0x1C88).addRange(0x2DE0, 0x2DFF).addRange(0xA640, 0xA69F).addRange(0xFE2E, 0xFE2F).addRange(0x1E030, 0x1E06D);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x10400, 0x1044F);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x900, 0x950).addRange(0x955, 0x963).addRange(0x966, 0x97F).addRange(0xA8E0, 0xA8FF).addRange(0x11B00, 0x11B09);\nexports.characters = set;\n","const set = require('regenerate')(0x11909);\nset.addRange(0x11900, 0x11906).addRange(0x1190C, 0x11913).addRange(0x11915, 0x11916).addRange(0x11918, 0x11935).addRange(0x11937, 0x11938).addRange(0x1193B, 0x11946).addRange(0x11950, 0x11959);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x11800, 0x1183B);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x1BC00, 0x1BC6A).addRange(0x1BC70, 0x1BC7C).addRange(0x1BC80, 0x1BC88).addRange(0x1BC90, 0x1BC99).addRange(0x1BC9C, 0x1BC9F);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x13000, 0x13455);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x10500, 0x10527);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x10FE0, 0x10FF6);\nexports.characters = set;\n","const set = require('regenerate')(0x1258, 0x12C0);\nset.addRange(0x1200, 0x1248).addRange(0x124A, 0x124D).addRange(0x1250, 0x1256).addRange(0x125A, 0x125D).addRange(0x1260, 0x1288).addRange(0x128A, 0x128D).addRange(0x1290, 0x12B0).addRange(0x12B2, 0x12B5).addRange(0x12B8, 0x12BE).addRange(0x12C2, 0x12C5).addRange(0x12C8, 0x12D6).addRange(0x12D8, 0x1310).addRange(0x1312, 0x1315).addRange(0x1318, 0x135A).addRange(0x135D, 0x137C).addRange(0x1380, 0x1399).addRange(0x2D80, 0x2D96).addRange(0x2DA0, 0x2DA6).addRange(0x2DA8, 0x2DAE).addRange(0x2DB0, 0x2DB6).addRange(0x2DB8, 0x2DBE).addRange(0x2DC0, 0x2DC6).addRange(0x2DC8, 0x2DCE).addRange(0x2DD0, 0x2DD6).addRange(0x2DD8, 0x2DDE).addRange(0xAB01, 0xAB06).addRange(0xAB09, 0xAB0E).addRange(0xAB11, 0xAB16).addRange(0xAB20, 0xAB26).addRange(0xAB28, 0xAB2E).addRange(0x1E7E0, 0x1E7E6).addRange(0x1E7E8, 0x1E7EB).addRange(0x1E7ED, 0x1E7EE).addRange(0x1E7F0, 0x1E7FE);\nexports.characters = set;\n","const set = require('regenerate')(0x10C7, 0x10CD, 0x2D27, 0x2D2D);\nset.addRange(0x10A0, 0x10C5).addRange(0x10D0, 0x10FA).addRange(0x10FC, 0x10FF).addRange(0x1C90, 0x1CBA).addRange(0x1CBD, 0x1CBF).addRange(0x2D00, 0x2D25);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x2C00, 0x2C5F).addRange(0x1E000, 0x1E006).addRange(0x1E008, 0x1E018).addRange(0x1E01B, 0x1E021).addRange(0x1E023, 0x1E024).addRange(0x1E026, 0x1E02A);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x10330, 0x1034A);\nexports.characters = set;\n","const set = require('regenerate')(0x11350, 0x11357);\nset.addRange(0x11300, 0x11303).addRange(0x11305, 0x1130C).addRange(0x1130F, 0x11310).addRange(0x11313, 0x11328).addRange(0x1132A, 0x11330).addRange(0x11332, 0x11333).addRange(0x11335, 0x11339).addRange(0x1133C, 0x11344).addRange(0x11347, 0x11348).addRange(0x1134B, 0x1134D).addRange(0x1135D, 0x11363).addRange(0x11366, 0x1136C).addRange(0x11370, 0x11374);\nexports.characters = set;\n","const set = require('regenerate')(0x37F, 0x384, 0x386, 0x38C, 0x1DBF, 0x1F59, 0x1F5B, 0x1F5D, 0x2126, 0xAB65, 0x101A0);\nset.addRange(0x370, 0x373).addRange(0x375, 0x377).addRange(0x37A, 0x37D).addRange(0x388, 0x38A).addRange(0x38E, 0x3A1).addRange(0x3A3, 0x3E1).addRange(0x3F0, 0x3FF).addRange(0x1D26, 0x1D2A).addRange(0x1D5D, 0x1D61).addRange(0x1D66, 0x1D6A).addRange(0x1F00, 0x1F15).addRange(0x1F18, 0x1F1D).addRange(0x1F20, 0x1F45).addRange(0x1F48, 0x1F4D).addRange(0x1F50, 0x1F57).addRange(0x1F5F, 0x1F7D).addRange(0x1F80, 0x1FB4).addRange(0x1FB6, 0x1FC4).addRange(0x1FC6, 0x1FD3).addRange(0x1FD6, 0x1FDB).addRange(0x1FDD, 0x1FEF).addRange(0x1FF2, 0x1FF4).addRange(0x1FF6, 0x1FFE).addRange(0x10140, 0x1018E).addRange(0x1D200, 0x1D245);\nexports.characters = set;\n","const set = require('regenerate')(0xAD0);\nset.addRange(0xA81, 0xA83).addRange(0xA85, 0xA8D).addRange(0xA8F, 0xA91).addRange(0xA93, 0xAA8).addRange(0xAAA, 0xAB0).addRange(0xAB2, 0xAB3).addRange(0xAB5, 0xAB9).addRange(0xABC, 0xAC5).addRange(0xAC7, 0xAC9).addRange(0xACB, 0xACD).addRange(0xAE0, 0xAE3).addRange(0xAE6, 0xAF1).addRange(0xAF9, 0xAFF);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x11D60, 0x11D65).addRange(0x11D67, 0x11D68).addRange(0x11D6A, 0x11D8E).addRange(0x11D90, 0x11D91).addRange(0x11D93, 0x11D98).addRange(0x11DA0, 0x11DA9);\nexports.characters = set;\n","const set = require('regenerate')(0xA3C, 0xA51, 0xA5E);\nset.addRange(0xA01, 0xA03).addRange(0xA05, 0xA0A).addRange(0xA0F, 0xA10).addRange(0xA13, 0xA28).addRange(0xA2A, 0xA30).addRange(0xA32, 0xA33).addRange(0xA35, 0xA36).addRange(0xA38, 0xA39).addRange(0xA3E, 0xA42).addRange(0xA47, 0xA48).addRange(0xA4B, 0xA4D).addRange(0xA59, 0xA5C).addRange(0xA66, 0xA76);\nexports.characters = set;\n","const set = require('regenerate')(0x3005, 0x3007);\nset.addRange(0x2E80, 0x2E99).addRange(0x2E9B, 0x2EF3).addRange(0x2F00, 0x2FD5).addRange(0x3021, 0x3029).addRange(0x3038, 0x303B).addRange(0x3400, 0x4DBF).addRange(0x4E00, 0x9FFF).addRange(0xF900, 0xFA6D).addRange(0xFA70, 0xFAD9).addRange(0x16FE2, 0x16FE3).addRange(0x16FF0, 0x16FF1).addRange(0x20000, 0x2A6DF).addRange(0x2A700, 0x2B739).addRange(0x2B740, 0x2B81D).addRange(0x2B820, 0x2CEA1).addRange(0x2CEB0, 0x2EBE0).addRange(0x2EBF0, 0x2EE5D).addRange(0x2F800, 0x2FA1D).addRange(0x30000, 0x3134A).addRange(0x31350, 0x323AF);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x1100, 0x11FF).addRange(0x302E, 0x302F).addRange(0x3131, 0x318E).addRange(0x3200, 0x321E).addRange(0x3260, 0x327E).addRange(0xA960, 0xA97C).addRange(0xAC00, 0xD7A3).addRange(0xD7B0, 0xD7C6).addRange(0xD7CB, 0xD7FB).addRange(0xFFA0, 0xFFBE).addRange(0xFFC2, 0xFFC7).addRange(0xFFCA, 0xFFCF).addRange(0xFFD2, 0xFFD7).addRange(0xFFDA, 0xFFDC);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x10D00, 0x10D27).addRange(0x10D30, 0x10D39);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x1720, 0x1734);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x108E0, 0x108F2).addRange(0x108F4, 0x108F5).addRange(0x108FB, 0x108FF);\nexports.characters = set;\n","const set = require('regenerate')(0xFB3E);\nset.addRange(0x591, 0x5C7).addRange(0x5D0, 0x5EA).addRange(0x5EF, 0x5F4).addRange(0xFB1D, 0xFB36).addRange(0xFB38, 0xFB3C).addRange(0xFB40, 0xFB41).addRange(0xFB43, 0xFB44).addRange(0xFB46, 0xFB4F);\nexports.characters = set;\n","const set = require('regenerate')(0x1B132, 0x1F200);\nset.addRange(0x3041, 0x3096).addRange(0x309D, 0x309F).addRange(0x1B001, 0x1B11F).addRange(0x1B150, 0x1B152);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x10840, 0x10855).addRange(0x10857, 0x1085F);\nexports.characters = set;\n","const set = require('regenerate')(0x670, 0x1CED, 0x1CF4, 0x101FD, 0x102E0, 0x1133B);\nset.addRange(0x300, 0x36F).addRange(0x485, 0x486).addRange(0x64B, 0x655).addRange(0x951, 0x954).addRange(0x1AB0, 0x1ACE).addRange(0x1CD0, 0x1CD2).addRange(0x1CD4, 0x1CE0).addRange(0x1CE2, 0x1CE8).addRange(0x1CF8, 0x1CF9).addRange(0x1DC0, 0x1DFF).addRange(0x200C, 0x200D).addRange(0x20D0, 0x20F0).addRange(0x302A, 0x302D).addRange(0x3099, 0x309A).addRange(0xFE00, 0xFE0F).addRange(0xFE20, 0xFE2D).addRange(0x1CF00, 0x1CF2D).addRange(0x1CF30, 0x1CF46).addRange(0x1D167, 0x1D169).addRange(0x1D17B, 0x1D182).addRange(0x1D185, 0x1D18B).addRange(0x1D1AA, 0x1D1AD).addRange(0xE0100, 0xE01EF);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x10B60, 0x10B72).addRange(0x10B78, 0x10B7F);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x10B40, 0x10B55).addRange(0x10B58, 0x10B5F);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0xA980, 0xA9CD).addRange(0xA9D0, 0xA9D9).addRange(0xA9DE, 0xA9DF);\nexports.characters = set;\n","const set = require('regenerate')(0x110CD);\nset.addRange(0x11080, 0x110C2);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0xC80, 0xC8C).addRange(0xC8E, 0xC90).addRange(0xC92, 0xCA8).addRange(0xCAA, 0xCB3).addRange(0xCB5, 0xCB9).addRange(0xCBC, 0xCC4).addRange(0xCC6, 0xCC8).addRange(0xCCA, 0xCCD).addRange(0xCD5, 0xCD6).addRange(0xCDD, 0xCDE).addRange(0xCE0, 0xCE3).addRange(0xCE6, 0xCEF).addRange(0xCF1, 0xCF3);\nexports.characters = set;\n","const set = require('regenerate')(0x1B000, 0x1B155);\nset.addRange(0x30A1, 0x30FA).addRange(0x30FD, 0x30FF).addRange(0x31F0, 0x31FF).addRange(0x32D0, 0x32FE).addRange(0x3300, 0x3357).addRange(0xFF66, 0xFF6F).addRange(0xFF71, 0xFF9D).addRange(0x1AFF0, 0x1AFF3).addRange(0x1AFF5, 0x1AFFB).addRange(0x1AFFD, 0x1AFFE).addRange(0x1B120, 0x1B122).addRange(0x1B164, 0x1B167);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x11F00, 0x11F10).addRange(0x11F12, 0x11F3A).addRange(0x11F3E, 0x11F59);\nexports.characters = set;\n","const set = require('regenerate')(0xA92F);\nset.addRange(0xA900, 0xA92D);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x10A00, 0x10A03).addRange(0x10A05, 0x10A06).addRange(0x10A0C, 0x10A13).addRange(0x10A15, 0x10A17).addRange(0x10A19, 0x10A35).addRange(0x10A38, 0x10A3A).addRange(0x10A3F, 0x10A48).addRange(0x10A50, 0x10A58);\nexports.characters = set;\n","const set = require('regenerate')(0x16FE4);\nset.addRange(0x18B00, 0x18CD5);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x1780, 0x17DD).addRange(0x17E0, 0x17E9).addRange(0x17F0, 0x17F9).addRange(0x19E0, 0x19FF);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x11200, 0x11211).addRange(0x11213, 0x11241);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x112B0, 0x112EA).addRange(0x112F0, 0x112F9);\nexports.characters = set;\n","const set = require('regenerate')(0xE84, 0xEA5, 0xEC6);\nset.addRange(0xE81, 0xE82).addRange(0xE86, 0xE8A).addRange(0xE8C, 0xEA3).addRange(0xEA7, 0xEBD).addRange(0xEC0, 0xEC4).addRange(0xEC8, 0xECE).addRange(0xED0, 0xED9).addRange(0xEDC, 0xEDF);\nexports.characters = set;\n","const set = require('regenerate')(0xAA, 0xBA, 0x2071, 0x207F, 0x2132, 0x214E, 0xA7D3);\nset.addRange(0x41, 0x5A).addRange(0x61, 0x7A).addRange(0xC0, 0xD6).addRange(0xD8, 0xF6).addRange(0xF8, 0x2B8).addRange(0x2E0, 0x2E4).addRange(0x1D00, 0x1D25).addRange(0x1D2C, 0x1D5C).addRange(0x1D62, 0x1D65).addRange(0x1D6B, 0x1D77).addRange(0x1D79, 0x1DBE).addRange(0x1E00, 0x1EFF).addRange(0x2090, 0x209C).addRange(0x212A, 0x212B).addRange(0x2160, 0x2188).addRange(0x2C60, 0x2C7F).addRange(0xA722, 0xA787).addRange(0xA78B, 0xA7CA).addRange(0xA7D0, 0xA7D1).addRange(0xA7D5, 0xA7D9).addRange(0xA7F2, 0xA7FF).addRange(0xAB30, 0xAB5A).addRange(0xAB5C, 0xAB64).addRange(0xAB66, 0xAB69).addRange(0xFB00, 0xFB06).addRange(0xFF21, 0xFF3A).addRange(0xFF41, 0xFF5A).addRange(0x10780, 0x10785).addRange(0x10787, 0x107B0).addRange(0x107B2, 0x107BA).addRange(0x1DF00, 0x1DF1E).addRange(0x1DF25, 0x1DF2A);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x1C00, 0x1C37).addRange(0x1C3B, 0x1C49).addRange(0x1C4D, 0x1C4F);\nexports.characters = set;\n","const set = require('regenerate')(0x1940);\nset.addRange(0x1900, 0x191E).addRange(0x1920, 0x192B).addRange(0x1930, 0x193B).addRange(0x1944, 0x194F);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x10600, 0x10736).addRange(0x10740, 0x10755).addRange(0x10760, 0x10767);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x10000, 0x1000B).addRange(0x1000D, 0x10026).addRange(0x10028, 0x1003A).addRange(0x1003C, 0x1003D).addRange(0x1003F, 0x1004D).addRange(0x10050, 0x1005D).addRange(0x10080, 0x100FA);\nexports.characters = set;\n","const set = require('regenerate')(0x11FB0);\nset.addRange(0xA4D0, 0xA4FF);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x10280, 0x1029C);\nexports.characters = set;\n","const set = require('regenerate')(0x1093F);\nset.addRange(0x10920, 0x10939);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x11150, 0x11176);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x11EE0, 0x11EF8);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0xD00, 0xD0C).addRange(0xD0E, 0xD10).addRange(0xD12, 0xD44).addRange(0xD46, 0xD48).addRange(0xD4A, 0xD4F).addRange(0xD54, 0xD63).addRange(0xD66, 0xD7F);\nexports.characters = set;\n","const set = require('regenerate')(0x85E);\nset.addRange(0x840, 0x85B);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x10AC0, 0x10AE6).addRange(0x10AEB, 0x10AF6);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x11C70, 0x11C8F).addRange(0x11C92, 0x11CA7).addRange(0x11CA9, 0x11CB6);\nexports.characters = set;\n","const set = require('regenerate')(0x11D3A);\nset.addRange(0x11D00, 0x11D06).addRange(0x11D08, 0x11D09).addRange(0x11D0B, 0x11D36).addRange(0x11D3C, 0x11D3D).addRange(0x11D3F, 0x11D47).addRange(0x11D50, 0x11D59);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x16E40, 0x16E9A);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0xAAE0, 0xAAF6).addRange(0xABC0, 0xABED).addRange(0xABF0, 0xABF9);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x1E800, 0x1E8C4).addRange(0x1E8C7, 0x1E8D6);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x109A0, 0x109B7).addRange(0x109BC, 0x109CF).addRange(0x109D2, 0x109FF);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x10980, 0x1099F);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x16F00, 0x16F4A).addRange(0x16F4F, 0x16F87).addRange(0x16F8F, 0x16F9F);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x11600, 0x11644).addRange(0x11650, 0x11659);\nexports.characters = set;\n","const set = require('regenerate')(0x1804);\nset.addRange(0x1800, 0x1801).addRange(0x1806, 0x1819).addRange(0x1820, 0x1878).addRange(0x1880, 0x18AA).addRange(0x11660, 0x1166C);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x16A40, 0x16A5E).addRange(0x16A60, 0x16A69).addRange(0x16A6E, 0x16A6F);\nexports.characters = set;\n","const set = require('regenerate')(0x11288);\nset.addRange(0x11280, 0x11286).addRange(0x1128A, 0x1128D).addRange(0x1128F, 0x1129D).addRange(0x1129F, 0x112A9);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x1000, 0x109F).addRange(0xA9E0, 0xA9FE).addRange(0xAA60, 0xAA7F);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x10880, 0x1089E).addRange(0x108A7, 0x108AF);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x1E4D0, 0x1E4F9);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x119A0, 0x119A7).addRange(0x119AA, 0x119D7).addRange(0x119DA, 0x119E4);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x1980, 0x19AB).addRange(0x19B0, 0x19C9).addRange(0x19D0, 0x19DA).addRange(0x19DE, 0x19DF);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x11400, 0x1145B).addRange(0x1145D, 0x11461);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x7C0, 0x7FA).addRange(0x7FD, 0x7FF);\nexports.characters = set;\n","const set = require('regenerate')(0x16FE1);\nset.addRange(0x1B170, 0x1B2FB);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x1E100, 0x1E12C).addRange(0x1E130, 0x1E13D).addRange(0x1E140, 0x1E149).addRange(0x1E14E, 0x1E14F);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x1680, 0x169C);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x1C50, 0x1C7F);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x10C80, 0x10CB2).addRange(0x10CC0, 0x10CF2).addRange(0x10CFA, 0x10CFF);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x10300, 0x10323).addRange(0x1032D, 0x1032F);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x10A80, 0x10A9F);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x10350, 0x1037A);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x103A0, 0x103C3).addRange(0x103C8, 0x103D5);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x10F00, 0x10F27);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x10A60, 0x10A7F);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x10C00, 0x10C48);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x10F70, 0x10F89);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0xB01, 0xB03).addRange(0xB05, 0xB0C).addRange(0xB0F, 0xB10).addRange(0xB13, 0xB28).addRange(0xB2A, 0xB30).addRange(0xB32, 0xB33).addRange(0xB35, 0xB39).addRange(0xB3C, 0xB44).addRange(0xB47, 0xB48).addRange(0xB4B, 0xB4D).addRange(0xB55, 0xB57).addRange(0xB5C, 0xB5D).addRange(0xB5F, 0xB63).addRange(0xB66, 0xB77);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x104B0, 0x104D3).addRange(0x104D8, 0x104FB);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x10480, 0x1049D).addRange(0x104A0, 0x104A9);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x16B00, 0x16B45).addRange(0x16B50, 0x16B59).addRange(0x16B5B, 0x16B61).addRange(0x16B63, 0x16B77).addRange(0x16B7D, 0x16B8F);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x10860, 0x1087F);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x11AC0, 0x11AF8);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0xA840, 0xA877);\nexports.characters = set;\n","const set = require('regenerate')(0x1091F);\nset.addRange(0x10900, 0x1091B);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x10B80, 0x10B91).addRange(0x10B99, 0x10B9C).addRange(0x10BA9, 0x10BAF);\nexports.characters = set;\n","const set = require('regenerate')(0xA95F);\nset.addRange(0xA930, 0xA953);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x16A0, 0x16EA).addRange(0x16EE, 0x16F8);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x800, 0x82D).addRange(0x830, 0x83E);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0xA880, 0xA8C5).addRange(0xA8CE, 0xA8D9);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x11180, 0x111DF);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x10450, 0x1047F);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x11580, 0x115B5).addRange(0x115B8, 0x115DD);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x1D800, 0x1DA8B).addRange(0x1DA9B, 0x1DA9F).addRange(0x1DAA1, 0x1DAAF);\nexports.characters = set;\n","const set = require('regenerate')(0xDBD, 0xDCA, 0xDD6);\nset.addRange(0xD81, 0xD83).addRange(0xD85, 0xD96).addRange(0xD9A, 0xDB1).addRange(0xDB3, 0xDBB).addRange(0xDC0, 0xDC6).addRange(0xDCF, 0xDD4).addRange(0xDD8, 0xDDF).addRange(0xDE6, 0xDEF).addRange(0xDF2, 0xDF4).addRange(0x111E1, 0x111F4);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x10F30, 0x10F59);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x110D0, 0x110E8).addRange(0x110F0, 0x110F9);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x11A50, 0x11AA2);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x1B80, 0x1BBF).addRange(0x1CC0, 0x1CC7);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0xA800, 0xA82C);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x700, 0x70D).addRange(0x70F, 0x74A).addRange(0x74D, 0x74F).addRange(0x860, 0x86A);\nexports.characters = set;\n","const set = require('regenerate')(0x171F);\nset.addRange(0x1700, 0x1715);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x1760, 0x176C).addRange(0x176E, 0x1770).addRange(0x1772, 0x1773);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x1950, 0x196D).addRange(0x1970, 0x1974);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x1A20, 0x1A5E).addRange(0x1A60, 0x1A7C).addRange(0x1A7F, 0x1A89).addRange(0x1A90, 0x1A99).addRange(0x1AA0, 0x1AAD);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0xAA80, 0xAAC2).addRange(0xAADB, 0xAADF);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x11680, 0x116B9).addRange(0x116C0, 0x116C9);\nexports.characters = set;\n","const set = require('regenerate')(0xB9C, 0xBD0, 0xBD7, 0x11FFF);\nset.addRange(0xB82, 0xB83).addRange(0xB85, 0xB8A).addRange(0xB8E, 0xB90).addRange(0xB92, 0xB95).addRange(0xB99, 0xB9A).addRange(0xB9E, 0xB9F).addRange(0xBA3, 0xBA4).addRange(0xBA8, 0xBAA).addRange(0xBAE, 0xBB9).addRange(0xBBE, 0xBC2).addRange(0xBC6, 0xBC8).addRange(0xBCA, 0xBCD).addRange(0xBE6, 0xBFA).addRange(0x11FC0, 0x11FF1);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x16A70, 0x16ABE).addRange(0x16AC0, 0x16AC9);\nexports.characters = set;\n","const set = require('regenerate')(0x16FE0);\nset.addRange(0x17000, 0x187F7).addRange(0x18800, 0x18AFF).addRange(0x18D00, 0x18D08);\nexports.characters = set;\n","const set = require('regenerate')(0xC5D);\nset.addRange(0xC00, 0xC0C).addRange(0xC0E, 0xC10).addRange(0xC12, 0xC28).addRange(0xC2A, 0xC39).addRange(0xC3C, 0xC44).addRange(0xC46, 0xC48).addRange(0xC4A, 0xC4D).addRange(0xC55, 0xC56).addRange(0xC58, 0xC5A).addRange(0xC60, 0xC63).addRange(0xC66, 0xC6F).addRange(0xC77, 0xC7F);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x780, 0x7B1);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0xE01, 0xE3A).addRange(0xE40, 0xE5B);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0xF00, 0xF47).addRange(0xF49, 0xF6C).addRange(0xF71, 0xF97).addRange(0xF99, 0xFBC).addRange(0xFBE, 0xFCC).addRange(0xFCE, 0xFD4).addRange(0xFD9, 0xFDA);\nexports.characters = set;\n","const set = require('regenerate')(0x2D7F);\nset.addRange(0x2D30, 0x2D67).addRange(0x2D6F, 0x2D70);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x11480, 0x114C7).addRange(0x114D0, 0x114D9);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x1E290, 0x1E2AE);\nexports.characters = set;\n","const set = require('regenerate')(0x1039F);\nset.addRange(0x10380, 0x1039D);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0xA500, 0xA62B);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x10570, 0x1057A).addRange(0x1057C, 0x1058A).addRange(0x1058C, 0x10592).addRange(0x10594, 0x10595).addRange(0x10597, 0x105A1).addRange(0x105A3, 0x105B1).addRange(0x105B3, 0x105B9).addRange(0x105BB, 0x105BC);\nexports.characters = set;\n","const set = require('regenerate')(0x1E2FF);\nset.addRange(0x1E2C0, 0x1E2F9);\nexports.characters = set;\n","const set = require('regenerate')(0x118FF);\nset.addRange(0x118A0, 0x118F2);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x10E80, 0x10EA9).addRange(0x10EAB, 0x10EAD).addRange(0x10EB0, 0x10EB1);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0xA000, 0xA48C).addRange(0xA490, 0xA4C6);\nexports.characters = set;\n","const set = require('regenerate')();\nset.addRange(0x11A00, 0x11A47);\nexports.characters = set;\n","module.exports = '15.1.0';\n","/*!\n * regjsgen 0.5.2\n * Copyright 2014-2020 Benjamin Tan \n * Available under the MIT license \n */\n;(function() {\n 'use strict';\n\n // Used to determine if values are of the language type `Object`.\n var objectTypes = {\n 'function': true,\n 'object': true\n };\n\n // Used as a reference to the global object.\n var root = (objectTypes[typeof window] && window) || this;\n\n // Detect free variable `exports`.\n var freeExports = objectTypes[typeof exports] && exports && !exports.nodeType && exports;\n\n // Detect free variable `module`.\n var hasFreeModule = objectTypes[typeof module] && module && !module.nodeType;\n\n // Detect free variable `global` from Node.js or Browserified code and use it as `root`.\n var freeGlobal = freeExports && hasFreeModule && typeof global == 'object' && global;\n if (freeGlobal && (freeGlobal.global === freeGlobal || freeGlobal.window === freeGlobal || freeGlobal.self === freeGlobal)) {\n root = freeGlobal;\n }\n\n // Used to check objects for own properties.\n var hasOwnProperty = Object.prototype.hasOwnProperty;\n\n /*--------------------------------------------------------------------------*/\n\n // Generates a string based on the given code point.\n // Based on https://mths.be/fromcodepoint by @mathias.\n function fromCodePoint() {\n var codePoint = Number(arguments[0]);\n\n if (\n !isFinite(codePoint) || // `NaN`, `+Infinity`, or `-Infinity`\n codePoint < 0 || // not a valid Unicode code point\n codePoint > 0x10FFFF || // not a valid Unicode code point\n Math.floor(codePoint) != codePoint // not an integer\n ) {\n throw RangeError('Invalid code point: ' + codePoint);\n }\n\n if (codePoint <= 0xFFFF) {\n // BMP code point\n return String.fromCharCode(codePoint);\n } else {\n // Astral code point; split in surrogate halves\n // http://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae\n codePoint -= 0x10000;\n var highSurrogate = (codePoint >> 10) + 0xD800;\n var lowSurrogate = (codePoint % 0x400) + 0xDC00;\n return String.fromCharCode(highSurrogate, lowSurrogate);\n }\n }\n\n /*--------------------------------------------------------------------------*/\n\n // Ensures that nodes have the correct types.\n var assertTypeRegexMap = {};\n function assertType(type, expected) {\n if (expected.indexOf('|') == -1) {\n if (type == expected) {\n return;\n }\n\n throw Error('Invalid node type: ' + type + '; expected type: ' + expected);\n }\n\n expected = hasOwnProperty.call(assertTypeRegexMap, expected)\n ? assertTypeRegexMap[expected]\n : (assertTypeRegexMap[expected] = RegExp('^(?:' + expected + ')$'));\n\n if (expected.test(type)) {\n return;\n }\n\n throw Error('Invalid node type: ' + type + '; expected types: ' + expected);\n }\n\n /*--------------------------------------------------------------------------*/\n\n // Generates a regular expression string based on an AST.\n function generate(node) {\n var type = node.type;\n\n if (hasOwnProperty.call(generators, type)) {\n return generators[type](node);\n }\n\n throw Error('Invalid node type: ' + type);\n }\n\n // Constructs a string by concatentating the output of each term.\n function generateSequence(generator, terms, /* optional */ separator) {\n var i = -1,\n length = terms.length,\n result = '',\n term;\n\n while (++i < length) {\n term = terms[i];\n\n if (separator && i > 0) result += separator;\n\n // Ensure that `\\0` null escapes followed by number symbols are not\n // treated as backreferences.\n if (\n i + 1 < length &&\n terms[i].type == 'value' &&\n terms[i].kind == 'null' &&\n terms[i + 1].type == 'value' &&\n terms[i + 1].kind == 'symbol' &&\n terms[i + 1].codePoint >= 48 &&\n terms[i + 1].codePoint <= 57\n ) {\n result += '\\\\000';\n continue;\n }\n\n result += generator(term);\n }\n\n return result;\n }\n\n /*--------------------------------------------------------------------------*/\n\n function generateAlternative(node) {\n assertType(node.type, 'alternative');\n\n return generateSequence(generateTerm, node.body);\n }\n\n function generateAnchor(node) {\n assertType(node.type, 'anchor');\n\n switch (node.kind) {\n case 'start':\n return '^';\n case 'end':\n return '$';\n case 'boundary':\n return '\\\\b';\n case 'not-boundary':\n return '\\\\B';\n default:\n throw Error('Invalid assertion');\n }\n }\n\n var atomType = 'anchor|characterClass|characterClassEscape|dot|group|reference|unicodePropertyEscape|value';\n\n function generateAtom(node) {\n assertType(node.type, atomType);\n\n return generate(node);\n }\n\n function generateCharacterClass(node) {\n assertType(node.type, 'characterClass');\n\n var kind = node.kind;\n var separator = kind === 'intersection' ? '&&' : kind === 'subtraction' ? '--' : '';\n\n return '[' +\n (node.negative ? '^' : '') +\n generateSequence(generateClassAtom, node.body, separator) +\n ']';\n }\n\n function generateCharacterClassEscape(node) {\n assertType(node.type, 'characterClassEscape');\n\n return '\\\\' + node.value;\n }\n\n function generateCharacterClassRange(node) {\n assertType(node.type, 'characterClassRange');\n\n var min = node.min,\n max = node.max;\n\n if (min.type == 'characterClassRange' || max.type == 'characterClassRange') {\n throw Error('Invalid character class range');\n }\n\n return generateClassAtom(min) + '-' + generateClassAtom(max);\n }\n\n function generateClassAtom(node) {\n assertType(node.type, 'anchor|characterClass|characterClassEscape|characterClassRange|dot|value|unicodePropertyEscape|classStrings');\n\n return generate(node);\n }\n\n function generateClassStrings(node) {\n assertType(node.type, 'classStrings');\n\n return '\\\\q{' + generateSequence(generateClassString, node.strings, '|') + '}';\n }\n\n function generateClassString(node) {\n assertType(node.type, 'classString');\n\n return generateSequence(generate, node.characters);\n }\n\n function generateDisjunction(node) {\n assertType(node.type, 'disjunction');\n\n return generateSequence(generate, node.body, '|');\n }\n\n\n function generateDot(node) {\n assertType(node.type, 'dot');\n\n return '.';\n }\n\n function generateGroup(node) {\n assertType(node.type, 'group');\n\n var result = '';\n\n switch (node.behavior) {\n case 'normal':\n if (node.name) {\n result += '?<' + generateIdentifier(node.name) + '>';\n }\n break;\n case 'ignore':\n if (node.modifierFlags) {\n result += '?';\n if(node.modifierFlags.enabling) result += node.modifierFlags.enabling;\n if(node.modifierFlags.disabling) result += \"-\" + node.modifierFlags.disabling;\n result += ':';\n } else {\n result += '?:';\n }\n break;\n case 'lookahead':\n result += '?=';\n break;\n case 'negativeLookahead':\n result += '?!';\n break;\n case 'lookbehind':\n result += '?<=';\n break;\n case 'negativeLookbehind':\n result += '?';\n }\n\n throw new Error('Unknown reference type');\n }\n\n function generateTerm(node) {\n assertType(node.type, atomType + '|empty|quantifier');\n\n return generate(node);\n }\n\n function generateUnicodePropertyEscape(node) {\n assertType(node.type, 'unicodePropertyEscape');\n\n return '\\\\' + (node.negative ? 'P' : 'p') + '{' + node.value + '}';\n }\n\n function generateValue(node) {\n assertType(node.type, 'value');\n\n var kind = node.kind,\n codePoint = node.codePoint;\n\n if (typeof codePoint != 'number') {\n throw new Error('Invalid code point: ' + codePoint);\n }\n\n switch (kind) {\n case 'controlLetter':\n return '\\\\c' + fromCodePoint(codePoint + 64);\n case 'hexadecimalEscape':\n return '\\\\x' + ('00' + codePoint.toString(16).toUpperCase()).slice(-2);\n case 'identifier':\n return '\\\\' + fromCodePoint(codePoint);\n case 'null':\n return '\\\\' + codePoint;\n case 'octal':\n return '\\\\' + ('000' + codePoint.toString(8)).slice(-3);\n case 'singleEscape':\n switch (codePoint) {\n case 0x0008:\n return '\\\\b';\n case 0x0009:\n return '\\\\t';\n case 0x000A:\n return '\\\\n';\n case 0x000B:\n return '\\\\v';\n case 0x000C:\n return '\\\\f';\n case 0x000D:\n return '\\\\r';\n case 0x002D:\n return '\\\\-';\n default:\n throw Error('Invalid code point: ' + codePoint);\n }\n case 'symbol':\n return fromCodePoint(codePoint);\n case 'unicodeEscape':\n return '\\\\u' + ('0000' + codePoint.toString(16).toUpperCase()).slice(-4);\n case 'unicodeCodePointEscape':\n return '\\\\u{' + codePoint.toString(16).toUpperCase() + '}';\n default:\n throw Error('Unsupported node kind: ' + kind);\n }\n }\n\n /*--------------------------------------------------------------------------*/\n\n // Used to generate strings for each node type.\n var generators = {\n 'alternative': generateAlternative,\n 'anchor': generateAnchor,\n 'characterClass': generateCharacterClass,\n 'characterClassEscape': generateCharacterClassEscape,\n 'characterClassRange': generateCharacterClassRange,\n 'classStrings': generateClassStrings,\n 'disjunction': generateDisjunction,\n 'dot': generateDot,\n 'group': generateGroup,\n 'quantifier': generateQuantifier,\n 'reference': generateReference,\n 'unicodePropertyEscape': generateUnicodePropertyEscape,\n 'value': generateValue\n };\n\n /*--------------------------------------------------------------------------*/\n\n // Export regjsgen.\n var regjsgen = {\n 'generate': generate\n };\n\n // Some AMD build optimizers, like r.js, check for condition patterns like the following:\n if (typeof define == 'function' && typeof define.amd == 'object' && define.amd) {\n // Define as an anonymous module so it can be aliased through path mapping.\n define(function() {\n return regjsgen;\n });\n\n root.regjsgen = regjsgen;\n }\n // Check for `exports` after `define` in case a build optimizer adds an `exports` object.\n else if (freeExports && hasFreeModule) {\n // Export for CommonJS support.\n freeExports.generate = generate;\n }\n else {\n // Export to the global object.\n root.regjsgen = regjsgen;\n }\n}.call(this));\n","// regjsparser\n//\n// ==================================================================\n//\n// See ECMA-262 Standard: 15.10.1\n//\n// NOTE: The ECMA-262 standard uses the term \"Assertion\" for /^/. Here the\n// term \"Anchor\" is used.\n//\n// Pattern ::\n// Disjunction\n//\n// Disjunction ::\n// Alternative\n// Alternative | Disjunction\n//\n// Alternative ::\n// [empty]\n// Alternative Term\n//\n// Term ::\n// Anchor\n// Atom\n// Atom Quantifier\n//\n// Anchor ::\n// ^\n// $\n// \\ b\n// \\ B\n// ( ? = Disjunction )\n// ( ? ! Disjunction )\n// ( ? < = Disjunction )\n// ( ? < ! Disjunction )\n//\n// Quantifier ::\n// QuantifierPrefix\n// QuantifierPrefix ?\n//\n// QuantifierPrefix ::\n// *\n// +\n// ?\n// { DecimalDigits }\n// { DecimalDigits , }\n// { DecimalDigits , DecimalDigits }\n//\n// Atom ::\n// PatternCharacter\n// .\n// \\ AtomEscape\n// CharacterClass\n// ( GroupSpecifier Disjunction )\n// ( ? : Disjunction )\n//\n// PatternCharacter ::\n// SourceCharacter but not any of: ^ $ \\ . * + ? ( ) [ ] { } |\n//\n// AtomEscape ::\n// DecimalEscape\n// CharacterClassEscape\n// CharacterEscape\n// k GroupName\n//\n// CharacterEscape[U] ::\n// ControlEscape\n// c ControlLetter\n// HexEscapeSequence\n// RegExpUnicodeEscapeSequence[?U] (ES6)\n// IdentityEscape[?U]\n//\n// ControlEscape ::\n// one of f n r t v\n// ControlLetter ::\n// one of\n// a b c d e f g h i j k l m n o p q r s t u v w x y z\n// A B C D E F G H I J K L M N O P Q R S T U V W X Y Z\n//\n// IdentityEscape ::\n// SourceCharacter but not c\n//\n// DecimalEscape ::\n// DecimalIntegerLiteral [lookahead ∉ DecimalDigit]\n//\n// CharacterClassEscape ::\n// one of d D s S w W\n//\n// CharacterClass ::\n// [ [lookahead ∉ {^}] ClassRanges ]\n// [ ^ ClassRanges ]\n//\n// ClassRanges ::\n// [empty]\n// [~V] NonemptyClassRanges\n// [+V] ClassContents\n//\n// NonemptyClassRanges ::\n// ClassAtom\n// ClassAtom NonemptyClassRangesNoDash\n// ClassAtom - ClassAtom ClassRanges\n//\n// NonemptyClassRangesNoDash ::\n// ClassAtom\n// ClassAtomNoDash NonemptyClassRangesNoDash\n// ClassAtomNoDash - ClassAtom ClassRanges\n//\n// ClassAtom ::\n// -\n// ClassAtomNoDash\n//\n// ClassAtomNoDash ::\n// SourceCharacter but not one of \\ or ] or -\n// \\ ClassEscape\n//\n// ClassEscape ::\n// DecimalEscape\n// b\n// CharacterEscape\n// CharacterClassEscape\n//\n// GroupSpecifier ::\n// [empty]\n// ? GroupName\n//\n// GroupName ::\n// < RegExpIdentifierName >\n//\n// RegExpIdentifierName ::\n// RegExpIdentifierStart\n// RegExpIdentifierName RegExpIdentifierContinue\n//\n// RegExpIdentifierStart ::\n// UnicodeIDStart\n// $\n// _\n// \\ RegExpUnicodeEscapeSequence\n//\n// RegExpIdentifierContinue ::\n// UnicodeIDContinue\n// $\n// _\n// \\ RegExpUnicodeEscapeSequence\n// \n// \n//\n// --------------------------------------------------------------\n// NOTE: The following productions refer to the \"set notation and\n// properties of strings\" proposal.\n// https://github.com/tc39/proposal-regexp-set-notation\n// --------------------------------------------------------------\n//\n// ClassContents ::\n// ClassUnion\n// ClassIntersection\n// ClassSubtraction\n//\n// ClassUnion ::\n// ClassRange ClassUnion?\n// ClassOperand ClassUnion?\n//\n// ClassIntersection ::\n// ClassOperand && [lookahead ≠ &] ClassOperand\n// ClassIntersection && [lookahead ≠ &] ClassOperand\n//\n// ClassSubtraction ::\n// ClassOperand -- ClassOperand\n// ClassSubtraction -- ClassOperand\n//\n// ClassOperand ::\n// ClassCharacter\n// ClassStrings\n// NestedClass\n//\n// NestedClass ::\n// [ [lookahead ≠ ^] ClassRanges[+U,+V] ]\n// [ ^ ClassRanges[+U,+V] ]\n// \\ CharacterClassEscape[+U, +V]\n//\n// ClassRange ::\n// ClassCharacter - ClassCharacter\n//\n// ClassCharacter ::\n// [lookahead ∉ ClassReservedDouble] SourceCharacter but not ClassSyntaxCharacter\n// \\ CharacterEscape[+U]\n// \\ ClassHalfOfDouble\n// \\ b\n//\n// ClassSyntaxCharacter ::\n// one of ( ) [ ] { } / - \\ |\n//\n// ClassStrings ::\n// ( ClassString MoreClassStrings? )\n//\n// MoreClassStrings ::\n// | ClassString MoreClassStrings?\n//\n// ClassString ::\n// [empty]\n// NonEmptyClassString\n//\n// NonEmptyClassString ::\n// ClassCharacter NonEmptyClassString?\n//\n// ClassReservedDouble ::\n// one of && !! ## $$ %% ** ++ ,, .. :: ;; << == >> ?? @@ ^^ __ `` ~~\n//\n// ClassHalfOfDouble ::\n// one of & - ! # % , : ; < = > @ _ ` ~\n//\n// --------------------------------------------------------------\n// NOTE: The following productions refer to the\n// \"Regular Expression Pattern Modifiers for ECMAScript\" proposal.\n// https://github.com/tc39/proposal-regexp-modifiers\n// --------------------------------------------------------------\n//\n// Atom ::\n// ( ? RegularExpressionFlags : Disjunction )\n// ( ? RegularExpressionFlags - RegularExpressionFlags : Disjunction )\n//\n\n\"use strict\";\n(function() {\n\n var fromCodePoint = String.fromCodePoint || (function() {\n // Implementation taken from\n // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/fromCodePoint\n\n var stringFromCharCode = String.fromCharCode;\n var floor = Math.floor;\n\n return function fromCodePoint() {\n var MAX_SIZE = 0x4000;\n var codeUnits = [];\n var highSurrogate;\n var lowSurrogate;\n var index = -1;\n var length = arguments.length;\n if (!length) {\n return '';\n }\n var result = '';\n while (++index < length) {\n var codePoint = Number(arguments[index]);\n if (\n !isFinite(codePoint) || // `NaN`, `+Infinity`, or `-Infinity`\n codePoint < 0 || // not a valid Unicode code point\n codePoint > 0x10FFFF || // not a valid Unicode code point\n floor(codePoint) != codePoint // not an integer\n ) {\n throw RangeError('Invalid code point: ' + codePoint);\n }\n if (codePoint <= 0xFFFF) { // BMP code point\n codeUnits.push(codePoint);\n } else { // Astral code point; split in surrogate halves\n // http://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae\n codePoint -= 0x10000;\n highSurrogate = (codePoint >> 10) + 0xD800;\n lowSurrogate = (codePoint % 0x400) + 0xDC00;\n codeUnits.push(highSurrogate, lowSurrogate);\n }\n if (index + 1 == length || codeUnits.length > MAX_SIZE) {\n result += stringFromCharCode.apply(null, codeUnits);\n codeUnits.length = 0;\n }\n }\n return result;\n };\n }());\n\n function parse(str, flags, features) {\n if (!features) {\n features = {};\n }\n function addRaw(node) {\n node.raw = str.substring(node.range[0], node.range[1]);\n return node;\n }\n\n function updateRawStart(node, start) {\n node.range[0] = start;\n return addRaw(node);\n }\n\n function createAnchor(kind, rawLength) {\n return addRaw({\n type: 'anchor',\n kind: kind,\n range: [\n pos - rawLength,\n pos\n ]\n });\n }\n\n function createValue(kind, codePoint, from, to) {\n return addRaw({\n type: 'value',\n kind: kind,\n codePoint: codePoint,\n range: [from, to]\n });\n }\n\n function createEscaped(kind, codePoint, value, fromOffset) {\n fromOffset = fromOffset || 0;\n return createValue(kind, codePoint, pos - (value.length + fromOffset), pos);\n }\n\n function createCharacter(matches) {\n var _char = matches[0];\n var first = _char.charCodeAt(0);\n if (isUnicodeMode) {\n var second;\n if (_char.length === 1 && first >= 0xD800 && first <= 0xDBFF) {\n second = lookahead().charCodeAt(0);\n if (second >= 0xDC00 && second <= 0xDFFF) {\n // Unicode surrogate pair\n pos++;\n return createValue(\n 'symbol',\n (first - 0xD800) * 0x400 + second - 0xDC00 + 0x10000,\n pos - 2, pos);\n }\n }\n }\n return createValue('symbol', first, pos - 1, pos);\n }\n\n function createDisjunction(alternatives, from, to) {\n return addRaw({\n type: 'disjunction',\n body: alternatives,\n range: [\n from,\n to\n ]\n });\n }\n\n function createDot() {\n return addRaw({\n type: 'dot',\n range: [\n pos - 1,\n pos\n ]\n });\n }\n\n function createCharacterClassEscape(value) {\n return addRaw({\n type: 'characterClassEscape',\n value: value,\n range: [\n pos - 2,\n pos\n ]\n });\n }\n\n function createReference(matchIndex) {\n return addRaw({\n type: 'reference',\n matchIndex: parseInt(matchIndex, 10),\n range: [\n pos - 1 - matchIndex.length,\n pos\n ]\n });\n }\n\n function createNamedReference(name) {\n return addRaw({\n type: 'reference',\n name: name,\n range: [\n name.range[0] - 3,\n pos\n ]\n });\n }\n\n function createGroup(behavior, disjunction, from, to) {\n return addRaw({\n type: 'group',\n behavior: behavior,\n body: disjunction,\n range: [\n from,\n to\n ]\n });\n }\n\n function createQuantifier(min, max, from, to, symbol) {\n if (to == null) {\n from = pos - 1;\n to = pos;\n }\n\n return addRaw({\n type: 'quantifier',\n min: min,\n max: max,\n greedy: true,\n body: null, // set later on\n symbol: symbol,\n range: [\n from,\n to\n ]\n });\n }\n\n function createAlternative(terms, from, to) {\n return addRaw({\n type: 'alternative',\n body: terms,\n range: [\n from,\n to\n ]\n });\n }\n\n function createCharacterClass(contents, negative, from, to) {\n return addRaw({\n type: 'characterClass',\n kind: contents.kind,\n body: contents.body,\n negative: negative,\n range: [\n from,\n to\n ]\n });\n }\n\n function createClassRange(min, max, from, to) {\n // See 15.10.2.15:\n if (min.codePoint > max.codePoint) {\n bail('invalid range in character class', min.raw + '-' + max.raw, from, to);\n }\n\n return addRaw({\n type: 'characterClassRange',\n min: min,\n max: max,\n range: [\n from,\n to\n ]\n });\n }\n\n function createClassStrings(strings, from, to) {\n return addRaw({\n type: 'classStrings',\n strings: strings,\n range: [from, to]\n });\n }\n\n function createClassString(characters, from, to) {\n return addRaw({\n type: 'classString',\n characters: characters,\n range: [from, to]\n });\n }\n\n function flattenBody(body) {\n if (body.type === 'alternative') {\n return body.body;\n } else {\n return [body];\n }\n }\n\n function incr(amount) {\n amount = (amount || 1);\n var res = str.substring(pos, pos + amount);\n pos += (amount || 1);\n return res;\n }\n\n function skip(value) {\n if (!match(value)) {\n bail('character', value);\n }\n }\n\n function match(value) {\n if (str.indexOf(value, pos) === pos) {\n return incr(value.length);\n }\n }\n\n function lookahead() {\n return str[pos];\n }\n\n function current(value) {\n return str.indexOf(value, pos) === pos;\n }\n\n function next(value) {\n return str[pos + 1] === value;\n }\n\n function matchReg(regExp) {\n var subStr = str.substring(pos);\n var res = subStr.match(regExp);\n if (res) {\n res.range = [];\n res.range[0] = pos;\n incr(res[0].length);\n res.range[1] = pos;\n }\n return res;\n }\n\n function parseDisjunction() {\n // Disjunction ::\n // Alternative\n // Alternative | Disjunction\n var res = [], from = pos;\n res.push(parseAlternative());\n\n while (match('|')) {\n res.push(parseAlternative());\n }\n\n if (res.length === 1) {\n return res[0];\n }\n\n return createDisjunction(res, from, pos);\n }\n\n function parseAlternative() {\n var res = [], from = pos;\n var term;\n\n // Alternative ::\n // [empty]\n // Alternative Term\n while (term = parseTerm()) {\n res.push(term);\n }\n\n if (res.length === 1) {\n return res[0];\n }\n\n return createAlternative(res, from, pos);\n }\n\n function parseTerm() {\n // Term ::\n // Anchor\n // Atom\n // Atom Quantifier\n\n if (pos >= str.length || current('|') || current(')')) {\n return null; /* Means: The term is empty */\n }\n\n var anchor = parseAnchor();\n\n if (anchor) {\n return anchor;\n }\n\n var atom = parseAtomAndExtendedAtom();\n var quantifier;\n if (!atom) {\n // Check if a quantifier is following. A quantifier without an atom\n // is an error.\n var pos_backup = pos\n quantifier = parseQuantifier() || false;\n if (quantifier) {\n pos = pos_backup\n bail('Expected atom');\n }\n\n // If no unicode flag, then try to parse ExtendedAtom -> ExtendedPatternCharacter.\n // ExtendedPatternCharacter\n var res;\n if (!isUnicodeMode && (res = matchReg(/^{/))) {\n atom = createCharacter(res);\n } else {\n bail('Expected atom');\n }\n }\n quantifier = parseQuantifier() || false;\n if (quantifier) {\n quantifier.body = flattenBody(atom);\n // The quantifier contains the atom. Therefore, the beginning of the\n // quantifier range is given by the beginning of the atom.\n updateRawStart(quantifier, atom.range[0]);\n return quantifier;\n }\n return atom;\n }\n\n function parseGroup(matchA, typeA, matchB, typeB) {\n var type = null, from = pos;\n\n if (match(matchA)) {\n type = typeA;\n } else if (match(matchB)) {\n type = typeB;\n } else {\n return false;\n }\n\n return finishGroup(type, from);\n }\n\n function finishGroup(type, from) {\n var body = parseDisjunction();\n if (!body) {\n bail('Expected disjunction');\n }\n skip(')');\n var group = createGroup(type, flattenBody(body), from, pos);\n\n if (type == 'normal') {\n // Keep track of the number of closed groups. This is required for\n // parseDecimalEscape(). In case the string is parsed a second time the\n // value already holds the total count and no incrementation is required.\n if (firstIteration) {\n closedCaptureCounter++;\n }\n }\n return group;\n }\n\n function parseAnchor() {\n // Anchor ::\n // ^\n // $\n // \\ b\n // \\ B\n // ( ? = Disjunction )\n // ( ? ! Disjunction )\n\n if (match('^')) {\n return createAnchor('start', 1 /* rawLength */);\n } else if (match('$')) {\n return createAnchor('end', 1 /* rawLength */);\n } else if (match('\\\\b')) {\n return createAnchor('boundary', 2 /* rawLength */);\n } else if (match('\\\\B')) {\n return createAnchor('not-boundary', 2 /* rawLength */);\n } else {\n return parseGroup('(?=', 'lookahead', '(?!', 'negativeLookahead');\n }\n }\n\n function parseQuantifier() {\n // Quantifier ::\n // QuantifierPrefix\n // QuantifierPrefix ?\n //\n // QuantifierPrefix ::\n // *\n // +\n // ?\n // { DecimalDigits }\n // { DecimalDigits , }\n // { DecimalDigits , DecimalDigits }\n\n var res, from = pos;\n var quantifier;\n var min, max;\n\n if (match('*')) {\n quantifier = createQuantifier(0, undefined, undefined, undefined, '*');\n }\n else if (match('+')) {\n quantifier = createQuantifier(1, undefined, undefined, undefined, \"+\");\n }\n else if (match('?')) {\n quantifier = createQuantifier(0, 1, undefined, undefined, \"?\");\n }\n else if (res = matchReg(/^\\{([0-9]+)\\}/)) {\n min = parseInt(res[1], 10);\n quantifier = createQuantifier(min, min, res.range[0], res.range[1]);\n }\n else if (res = matchReg(/^\\{([0-9]+),\\}/)) {\n min = parseInt(res[1], 10);\n quantifier = createQuantifier(min, undefined, res.range[0], res.range[1]);\n }\n else if (res = matchReg(/^\\{([0-9]+),([0-9]+)\\}/)) {\n min = parseInt(res[1], 10);\n max = parseInt(res[2], 10);\n if (min > max) {\n bail('numbers out of order in {} quantifier', '', from, pos);\n }\n quantifier = createQuantifier(min, max, res.range[0], res.range[1]);\n }\n\n if ((min && !Number.isSafeInteger(min)) || (max && !Number.isSafeInteger(max))) {\n bail(\"iterations outside JS safe integer range in quantifier\", \"\", from, pos);\n }\n\n if (quantifier) {\n if (match('?')) {\n quantifier.greedy = false;\n quantifier.range[1] += 1;\n }\n }\n\n return quantifier;\n }\n\n function parseAtomAndExtendedAtom() {\n // Parsing Atom and ExtendedAtom together due to redundancy.\n // ExtendedAtom is defined in Apendix B of the ECMA-262 standard.\n //\n // SEE: https://www.ecma-international.org/ecma-262/10.0/index.html#prod-annexB-ExtendedPatternCharacter\n //\n // Atom ::\n // PatternCharacter\n // .\n // \\ AtomEscape\n // CharacterClass\n // ( GroupSpecifier Disjunction )\n // ( ? RegularExpressionFlags : Disjunction )\n // ( ? RegularExpressionFlags - RegularExpressionFlags : Disjunction )\n // ExtendedAtom ::\n // ExtendedPatternCharacter\n // ExtendedPatternCharacter ::\n // SourceCharacter but not one of ^$\\.*+?()[|\n\n var res;\n\n // jviereck: allow ']', '}' here as well to be compatible with browser's\n // implementations: ']'.match(/]/);\n if (res = matchReg(/^[^^$\\\\.*+?()[\\]{}|]/)) {\n // PatternCharacter\n return createCharacter(res);\n }\n else if (!isUnicodeMode && (res = matchReg(/^(?:]|})/))) {\n // ExtendedPatternCharacter, first part. See parseTerm.\n return createCharacter(res);\n }\n else if (match('.')) {\n // .\n return createDot();\n }\n else if (match('\\\\')) {\n // \\ AtomEscape\n res = parseAtomEscape();\n if (!res) {\n if (!isUnicodeMode && lookahead() == 'c') {\n // B.1.4 ExtendedAtom\n // \\[lookahead = c]\n return createValue('symbol', 92, pos - 1, pos);\n }\n bail('atomEscape');\n }\n return res;\n }\n else if (res = parseCharacterClass()) {\n return res;\n }\n else if (features.lookbehind && (res = parseGroup('(?<=', 'lookbehind', '(?\");\n var group = finishGroup(\"normal\", name.range[0] - 3);\n group.name = name;\n return group;\n }\n else if (features.modifiers && str.indexOf(\"(?\") == pos && str[pos+2] != \":\") {\n return parseModifiersGroup();\n }\n else {\n // ( Disjunction )\n // ( ? : Disjunction )\n return parseGroup('(?:', 'ignore', '(', 'normal');\n }\n }\n\n function parseModifiersGroup() {\n function hasDupChar(str) {\n var i = 0;\n while (i < str.length) {\n if (str.indexOf(str[i], i + 1) != -1) {\n return true;\n }\n i++;\n }\n return false;\n }\n\n var from = pos;\n incr(2);\n\n var enablingFlags = matchReg(/^[sim]+/);\n var disablingFlags;\n if(match(\"-\")){\n disablingFlags = matchReg(/^[sim]+/);\n if (!disablingFlags) {\n bail('Invalid flags for modifiers group');\n }\n } else if(!enablingFlags){\n bail('Invalid flags for modifiers group');\n }\n\n enablingFlags = enablingFlags ? enablingFlags[0] : \"\";\n disablingFlags = disablingFlags ? disablingFlags[0] : \"\";\n\n var flags = enablingFlags + disablingFlags;\n if(flags.length > 3 || hasDupChar(flags)) {\n bail('flags cannot be duplicated for modifiers group');\n }\n\n skip(\":\");\n\n var modifiersGroup = finishGroup(\"ignore\", from);\n\n modifiersGroup.modifierFlags = {\n enabling: enablingFlags,\n disabling: disablingFlags\n };\n\n return modifiersGroup;\n }\n\n function parseUnicodeSurrogatePairEscape(firstEscape) {\n if (isUnicodeMode) {\n var first, second;\n if (firstEscape.kind == 'unicodeEscape' &&\n (first = firstEscape.codePoint) >= 0xD800 && first <= 0xDBFF &&\n current('\\\\') && next('u') ) {\n var prevPos = pos;\n pos++;\n var secondEscape = parseClassEscape();\n if (secondEscape.kind == 'unicodeEscape' &&\n (second = secondEscape.codePoint) >= 0xDC00 && second <= 0xDFFF) {\n // Unicode surrogate pair\n firstEscape.range[1] = secondEscape.range[1];\n firstEscape.codePoint = (first - 0xD800) * 0x400 + second - 0xDC00 + 0x10000;\n firstEscape.type = 'value';\n firstEscape.kind = 'unicodeCodePointEscape';\n addRaw(firstEscape);\n }\n else {\n pos = prevPos;\n }\n }\n }\n return firstEscape;\n }\n\n function parseClassEscape() {\n return parseAtomEscape(true);\n }\n\n function parseAtomEscape(insideCharacterClass) {\n // AtomEscape ::\n // DecimalEscape\n // CharacterEscape\n // CharacterClassEscape\n // k GroupName\n\n var res, from = pos;\n\n res = parseDecimalEscape(insideCharacterClass) || parseNamedReference();\n if (res) {\n return res;\n }\n\n // For ClassEscape\n if (insideCharacterClass) {\n // b\n if (match('b')) {\n // 15.10.2.19\n // The production ClassEscape :: b evaluates by returning the\n // CharSet containing the one character (Unicode value 0008).\n return createEscaped('singleEscape', 0x0008, '\\\\b');\n } else if (match('B')) {\n bail('\\\\B not possible inside of CharacterClass', '', from);\n } else if (!isUnicodeMode && (res = matchReg(/^c([0-9])/))) {\n // B.1.4\n // c ClassControlLetter, ClassControlLetter = DecimalDigit\n return createEscaped('controlLetter', res[1] + 16, res[1], 2);\n } else if (!isUnicodeMode && (res = matchReg(/^c_/))) {\n // B.1.4\n // c ClassControlLetter, ClassControlLetter = _\n return createEscaped('controlLetter', 31, '_', 2);\n }\n // [+U] -\n if (isUnicodeMode && match('-')) {\n return createEscaped('singleEscape', 0x002d, '\\\\-');\n }\n }\n\n res = parseCharacterClassEscape() || parseCharacterEscape();\n\n return res;\n }\n\n\n function parseDecimalEscape(insideCharacterClass) {\n // DecimalEscape ::\n // DecimalIntegerLiteral [lookahead ∉ DecimalDigit]\n\n var res, match, from = pos;\n\n if (res = matchReg(/^(?!0)\\d+/)) {\n match = res[0];\n var refIdx = parseInt(res[0], 10);\n if (refIdx <= closedCaptureCounter && !insideCharacterClass) {\n // If the number is smaller than the normal-groups found so\n // far, then it is a reference...\n return createReference(res[0]);\n } else {\n // ... otherwise it needs to be interpreted as a octal (if the\n // number is in an octal format). If it is NOT octal format,\n // then the slash is ignored and the number is matched later\n // as normal characters.\n\n // Recall the negative decision to decide if the input must be parsed\n // a second time with the total normal-groups.\n backrefDenied.push(refIdx);\n\n // \\1 octal escapes are disallowed in unicode mode, but they might\n // be references to groups which haven't been parsed yet.\n // We must parse a second time to determine if \\1 is a reference\n // or an octal scape, and then we can report the error.\n if (firstIteration) {\n shouldReparse = true;\n } else {\n bailOctalEscapeIfUnicode(from, pos);\n }\n\n // Reset the position again, as maybe only parts of the previous\n // matched numbers are actual octal numbers. E.g. in '019' only\n // the '01' should be matched.\n incr(-res[0].length);\n if (res = matchReg(/^[0-7]{1,3}/)) {\n return createEscaped('octal', parseInt(res[0], 8), res[0], 1);\n } else {\n // If we end up here, we have a case like /\\91/. Then the\n // first slash is to be ignored and the 9 & 1 to be treated\n // like ordinary characters. Create a character for the\n // first number only here - other number-characters\n // (if available) will be matched later.\n res = createCharacter(matchReg(/^[89]/));\n return updateRawStart(res, res.range[0] - 1);\n }\n }\n }\n // Only allow octal numbers in the following. All matched numbers start\n // with a zero (if the do not, the previous if-branch is executed).\n // If the number is not octal format and starts with zero (e.g. `091`)\n // then only the zeros `0` is treated here and the `91` are ordinary\n // characters.\n // Example:\n // /\\091/.exec('\\091')[0].length === 3\n else if (res = matchReg(/^[0-7]{1,3}/)) {\n match = res[0];\n if (match !== '0') {\n bailOctalEscapeIfUnicode(from, pos);\n }\n if (/^0{1,3}$/.test(match)) {\n // If they are all zeros, then only take the first one.\n return createEscaped('null', 0x0000, '0', match.length);\n } else {\n return createEscaped('octal', parseInt(match, 8), match, 1);\n }\n }\n return false;\n }\n\n function bailOctalEscapeIfUnicode(from, pos) {\n if (isUnicodeMode) {\n bail(\"Invalid decimal escape in unicode mode\", null, from, pos);\n }\n }\n\n function parseCharacterClassEscape() {\n // CharacterClassEscape :: one of d D s S w W\n var res;\n if (res = matchReg(/^[dDsSwW]/)) {\n return createCharacterClassEscape(res[0]);\n } else if (features.unicodePropertyEscape && isUnicodeMode && (res = matchReg(/^([pP])\\{([^\\}]+)\\}/))) {\n // https://github.com/jviereck/regjsparser/issues/77\n return addRaw({\n type: 'unicodePropertyEscape',\n negative: res[1] === 'P',\n value: res[2],\n range: [res.range[0] - 1, res.range[1]],\n raw: res[0]\n });\n } else if (features.unicodeSet && hasUnicodeSetFlag && match('q{')) {\n return parseClassStrings();\n }\n return false;\n }\n\n function parseNamedReference() {\n if (features.namedGroups && matchReg(/^k<(?=.*?>)/)) {\n var name = parseIdentifier();\n skip('>');\n return createNamedReference(name);\n }\n }\n\n function parseRegExpUnicodeEscapeSequence() {\n var res;\n if (res = matchReg(/^u([0-9a-fA-F]{4})/)) {\n // UnicodeEscapeSequence\n return parseUnicodeSurrogatePairEscape(\n createEscaped('unicodeEscape', parseInt(res[1], 16), res[1], 2)\n );\n } else if (isUnicodeMode && (res = matchReg(/^u\\{([0-9a-fA-F]+)\\}/))) {\n // RegExpUnicodeEscapeSequence (ES6 Unicode code point escape)\n return createEscaped('unicodeCodePointEscape', parseInt(res[1], 16), res[1], 4);\n }\n }\n\n function parseCharacterEscape() {\n // CharacterEscape ::\n // ControlEscape\n // c ControlLetter\n // HexEscapeSequence\n // UnicodeEscapeSequence\n // IdentityEscape\n\n var res;\n var from = pos;\n if (res = matchReg(/^[fnrtv]/)) {\n // ControlEscape\n var codePoint = 0;\n switch (res[0]) {\n case 't': codePoint = 0x009; break;\n case 'n': codePoint = 0x00A; break;\n case 'v': codePoint = 0x00B; break;\n case 'f': codePoint = 0x00C; break;\n case 'r': codePoint = 0x00D; break;\n }\n return createEscaped('singleEscape', codePoint, '\\\\' + res[0]);\n } else if (res = matchReg(/^c([a-zA-Z])/)) {\n // c ControlLetter\n return createEscaped('controlLetter', res[1].charCodeAt(0) % 32, res[1], 2);\n } else if (res = matchReg(/^x([0-9a-fA-F]{2})/)) {\n // HexEscapeSequence\n return createEscaped('hexadecimalEscape', parseInt(res[1], 16), res[1], 2);\n } else if (res = parseRegExpUnicodeEscapeSequence()) {\n if (!res || res.codePoint > 0x10FFFF) {\n bail('Invalid escape sequence', null, from, pos);\n }\n return res;\n } else {\n // IdentityEscape\n return parseIdentityEscape();\n }\n }\n\n function parseIdentifierAtom(check) {\n var ch = lookahead();\n var from = pos;\n if (ch === '\\\\') {\n incr();\n var esc = parseRegExpUnicodeEscapeSequence();\n if (!esc || !check(esc.codePoint)) {\n bail('Invalid escape sequence', null, from, pos);\n }\n return fromCodePoint(esc.codePoint);\n }\n var code = ch.charCodeAt(0);\n if (code >= 0xD800 && code <= 0xDBFF) {\n ch += str[pos + 1];\n var second = ch.charCodeAt(1);\n if (second >= 0xDC00 && second <= 0xDFFF) {\n // Unicode surrogate pair\n code = (code - 0xD800) * 0x400 + second - 0xDC00 + 0x10000;\n }\n }\n if (!check(code)) return;\n incr();\n if (code > 0xFFFF) incr();\n return ch;\n }\n\n function parseIdentifier() {\n // RegExpIdentifierName ::\n // RegExpIdentifierStart\n // RegExpIdentifierName RegExpIdentifierContinue\n //\n // RegExpIdentifierStart ::\n // UnicodeIDStart\n // $\n // _\n // \\ RegExpUnicodeEscapeSequence\n //\n // RegExpIdentifierContinue ::\n // UnicodeIDContinue\n // $\n // _\n // \\ RegExpUnicodeEscapeSequence\n // \n // \n\n var start = pos;\n var res = parseIdentifierAtom(isIdentifierStart);\n if (!res) {\n bail('Invalid identifier');\n }\n\n var ch;\n while (ch = parseIdentifierAtom(isIdentifierPart)) {\n res += ch;\n }\n\n return addRaw({\n type: 'identifier',\n value: res,\n range: [start, pos]\n });\n }\n\n function isIdentifierStart(ch) {\n // Generated by `tools/generate-identifier-regex.js`.\n var NonAsciiIdentifierStart = /[\\$A-Z_a-z\\xAA\\xB5\\xBA\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\u02C1\\u02C6-\\u02D1\\u02E0-\\u02E4\\u02EC\\u02EE\\u0370-\\u0374\\u0376\\u0377\\u037A-\\u037D\\u037F\\u0386\\u0388-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u03F5\\u03F7-\\u0481\\u048A-\\u052F\\u0531-\\u0556\\u0559\\u0560-\\u0588\\u05D0-\\u05EA\\u05EF-\\u05F2\\u0620-\\u064A\\u066E\\u066F\\u0671-\\u06D3\\u06D5\\u06E5\\u06E6\\u06EE\\u06EF\\u06FA-\\u06FC\\u06FF\\u0710\\u0712-\\u072F\\u074D-\\u07A5\\u07B1\\u07CA-\\u07EA\\u07F4\\u07F5\\u07FA\\u0800-\\u0815\\u081A\\u0824\\u0828\\u0840-\\u0858\\u0860-\\u086A\\u08A0-\\u08B4\\u08B6-\\u08BD\\u0904-\\u0939\\u093D\\u0950\\u0958-\\u0961\\u0971-\\u0980\\u0985-\\u098C\\u098F\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2\\u09B6-\\u09B9\\u09BD\\u09CE\\u09DC\\u09DD\\u09DF-\\u09E1\\u09F0\\u09F1\\u09FC\\u0A05-\\u0A0A\\u0A0F\\u0A10\\u0A13-\\u0A28\\u0A2A-\\u0A30\\u0A32\\u0A33\\u0A35\\u0A36\\u0A38\\u0A39\\u0A59-\\u0A5C\\u0A5E\\u0A72-\\u0A74\\u0A85-\\u0A8D\\u0A8F-\\u0A91\\u0A93-\\u0AA8\\u0AAA-\\u0AB0\\u0AB2\\u0AB3\\u0AB5-\\u0AB9\\u0ABD\\u0AD0\\u0AE0\\u0AE1\\u0AF9\\u0B05-\\u0B0C\\u0B0F\\u0B10\\u0B13-\\u0B28\\u0B2A-\\u0B30\\u0B32\\u0B33\\u0B35-\\u0B39\\u0B3D\\u0B5C\\u0B5D\\u0B5F-\\u0B61\\u0B71\\u0B83\\u0B85-\\u0B8A\\u0B8E-\\u0B90\\u0B92-\\u0B95\\u0B99\\u0B9A\\u0B9C\\u0B9E\\u0B9F\\u0BA3\\u0BA4\\u0BA8-\\u0BAA\\u0BAE-\\u0BB9\\u0BD0\\u0C05-\\u0C0C\\u0C0E-\\u0C10\\u0C12-\\u0C28\\u0C2A-\\u0C39\\u0C3D\\u0C58-\\u0C5A\\u0C60\\u0C61\\u0C80\\u0C85-\\u0C8C\\u0C8E-\\u0C90\\u0C92-\\u0CA8\\u0CAA-\\u0CB3\\u0CB5-\\u0CB9\\u0CBD\\u0CDE\\u0CE0\\u0CE1\\u0CF1\\u0CF2\\u0D05-\\u0D0C\\u0D0E-\\u0D10\\u0D12-\\u0D3A\\u0D3D\\u0D4E\\u0D54-\\u0D56\\u0D5F-\\u0D61\\u0D7A-\\u0D7F\\u0D85-\\u0D96\\u0D9A-\\u0DB1\\u0DB3-\\u0DBB\\u0DBD\\u0DC0-\\u0DC6\\u0E01-\\u0E30\\u0E32\\u0E33\\u0E40-\\u0E46\\u0E81\\u0E82\\u0E84\\u0E87\\u0E88\\u0E8A\\u0E8D\\u0E94-\\u0E97\\u0E99-\\u0E9F\\u0EA1-\\u0EA3\\u0EA5\\u0EA7\\u0EAA\\u0EAB\\u0EAD-\\u0EB0\\u0EB2\\u0EB3\\u0EBD\\u0EC0-\\u0EC4\\u0EC6\\u0EDC-\\u0EDF\\u0F00\\u0F40-\\u0F47\\u0F49-\\u0F6C\\u0F88-\\u0F8C\\u1000-\\u102A\\u103F\\u1050-\\u1055\\u105A-\\u105D\\u1061\\u1065\\u1066\\u106E-\\u1070\\u1075-\\u1081\\u108E\\u10A0-\\u10C5\\u10C7\\u10CD\\u10D0-\\u10FA\\u10FC-\\u1248\\u124A-\\u124D\\u1250-\\u1256\\u1258\\u125A-\\u125D\\u1260-\\u1288\\u128A-\\u128D\\u1290-\\u12B0\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-\\u1310\\u1312-\\u1315\\u1318-\\u135A\\u1380-\\u138F\\u13A0-\\u13F5\\u13F8-\\u13FD\\u1401-\\u166C\\u166F-\\u167F\\u1681-\\u169A\\u16A0-\\u16EA\\u16EE-\\u16F8\\u1700-\\u170C\\u170E-\\u1711\\u1720-\\u1731\\u1740-\\u1751\\u1760-\\u176C\\u176E-\\u1770\\u1780-\\u17B3\\u17D7\\u17DC\\u1820-\\u1878\\u1880-\\u18A8\\u18AA\\u18B0-\\u18F5\\u1900-\\u191E\\u1950-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\\u19B0-\\u19C9\\u1A00-\\u1A16\\u1A20-\\u1A54\\u1AA7\\u1B05-\\u1B33\\u1B45-\\u1B4B\\u1B83-\\u1BA0\\u1BAE\\u1BAF\\u1BBA-\\u1BE5\\u1C00-\\u1C23\\u1C4D-\\u1C4F\\u1C5A-\\u1C7D\\u1C80-\\u1C88\\u1C90-\\u1CBA\\u1CBD-\\u1CBF\\u1CE9-\\u1CEC\\u1CEE-\\u1CF1\\u1CF5\\u1CF6\\u1D00-\\u1DBF\\u1E00-\\u1F15\\u1F18-\\u1F1D\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-\\u1F7D\\u1F80-\\u1FB4\\u1FB6-\\u1FBC\\u1FBE\\u1FC2-\\u1FC4\\u1FC6-\\u1FCC\\u1FD0-\\u1FD3\\u1FD6-\\u1FDB\\u1FE0-\\u1FEC\\u1FF2-\\u1FF4\\u1FF6-\\u1FFC\\u2071\\u207F\\u2090-\\u209C\\u2102\\u2107\\u210A-\\u2113\\u2115\\u2118-\\u211D\\u2124\\u2126\\u2128\\u212A-\\u2139\\u213C-\\u213F\\u2145-\\u2149\\u214E\\u2160-\\u2188\\u2C00-\\u2C2E\\u2C30-\\u2C5E\\u2C60-\\u2CE4\\u2CEB-\\u2CEE\\u2CF2\\u2CF3\\u2D00-\\u2D25\\u2D27\\u2D2D\\u2D30-\\u2D67\\u2D6F\\u2D80-\\u2D96\\u2DA0-\\u2DA6\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u3005-\\u3007\\u3021-\\u3029\\u3031-\\u3035\\u3038-\\u303C\\u3041-\\u3096\\u309B-\\u309F\\u30A1-\\u30FA\\u30FC-\\u30FF\\u3105-\\u312F\\u3131-\\u318E\\u31A0-\\u31BA\\u31F0-\\u31FF\\u3400-\\u4DB5\\u4E00-\\u9FEF\\uA000-\\uA48C\\uA4D0-\\uA4FD\\uA500-\\uA60C\\uA610-\\uA61F\\uA62A\\uA62B\\uA640-\\uA66E\\uA67F-\\uA69D\\uA6A0-\\uA6EF\\uA717-\\uA71F\\uA722-\\uA788\\uA78B-\\uA7B9\\uA7F7-\\uA801\\uA803-\\uA805\\uA807-\\uA80A\\uA80C-\\uA822\\uA840-\\uA873\\uA882-\\uA8B3\\uA8F2-\\uA8F7\\uA8FB\\uA8FD\\uA8FE\\uA90A-\\uA925\\uA930-\\uA946\\uA960-\\uA97C\\uA984-\\uA9B2\\uA9CF\\uA9E0-\\uA9E4\\uA9E6-\\uA9EF\\uA9FA-\\uA9FE\\uAA00-\\uAA28\\uAA40-\\uAA42\\uAA44-\\uAA4B\\uAA60-\\uAA76\\uAA7A\\uAA7E-\\uAAAF\\uAAB1\\uAAB5\\uAAB6\\uAAB9-\\uAABD\\uAAC0\\uAAC2\\uAADB-\\uAADD\\uAAE0-\\uAAEA\\uAAF2-\\uAAF4\\uAB01-\\uAB06\\uAB09-\\uAB0E\\uAB11-\\uAB16\\uAB20-\\uAB26\\uAB28-\\uAB2E\\uAB30-\\uAB5A\\uAB5C-\\uAB65\\uAB70-\\uABE2\\uAC00-\\uD7A3\\uD7B0-\\uD7C6\\uD7CB-\\uD7FB\\uF900-\\uFA6D\\uFA70-\\uFAD9\\uFB00-\\uFB06\\uFB13-\\uFB17\\uFB1D\\uFB1F-\\uFB28\\uFB2A-\\uFB36\\uFB38-\\uFB3C\\uFB3E\\uFB40\\uFB41\\uFB43\\uFB44\\uFB46-\\uFBB1\\uFBD3-\\uFD3D\\uFD50-\\uFD8F\\uFD92-\\uFDC7\\uFDF0-\\uFDFB\\uFE70-\\uFE74\\uFE76-\\uFEFC\\uFF21-\\uFF3A\\uFF41-\\uFF5A\\uFF66-\\uFFBE\\uFFC2-\\uFFC7\\uFFCA-\\uFFCF\\uFFD2-\\uFFD7\\uFFDA-\\uFFDC]|\\uD800[\\uDC00-\\uDC0B\\uDC0D-\\uDC26\\uDC28-\\uDC3A\\uDC3C\\uDC3D\\uDC3F-\\uDC4D\\uDC50-\\uDC5D\\uDC80-\\uDCFA\\uDD40-\\uDD74\\uDE80-\\uDE9C\\uDEA0-\\uDED0\\uDF00-\\uDF1F\\uDF2D-\\uDF4A\\uDF50-\\uDF75\\uDF80-\\uDF9D\\uDFA0-\\uDFC3\\uDFC8-\\uDFCF\\uDFD1-\\uDFD5]|\\uD801[\\uDC00-\\uDC9D\\uDCB0-\\uDCD3\\uDCD8-\\uDCFB\\uDD00-\\uDD27\\uDD30-\\uDD63\\uDE00-\\uDF36\\uDF40-\\uDF55\\uDF60-\\uDF67]|\\uD802[\\uDC00-\\uDC05\\uDC08\\uDC0A-\\uDC35\\uDC37\\uDC38\\uDC3C\\uDC3F-\\uDC55\\uDC60-\\uDC76\\uDC80-\\uDC9E\\uDCE0-\\uDCF2\\uDCF4\\uDCF5\\uDD00-\\uDD15\\uDD20-\\uDD39\\uDD80-\\uDDB7\\uDDBE\\uDDBF\\uDE00\\uDE10-\\uDE13\\uDE15-\\uDE17\\uDE19-\\uDE35\\uDE60-\\uDE7C\\uDE80-\\uDE9C\\uDEC0-\\uDEC7\\uDEC9-\\uDEE4\\uDF00-\\uDF35\\uDF40-\\uDF55\\uDF60-\\uDF72\\uDF80-\\uDF91]|\\uD803[\\uDC00-\\uDC48\\uDC80-\\uDCB2\\uDCC0-\\uDCF2\\uDD00-\\uDD23\\uDF00-\\uDF1C\\uDF27\\uDF30-\\uDF45]|\\uD804[\\uDC03-\\uDC37\\uDC83-\\uDCAF\\uDCD0-\\uDCE8\\uDD03-\\uDD26\\uDD44\\uDD50-\\uDD72\\uDD76\\uDD83-\\uDDB2\\uDDC1-\\uDDC4\\uDDDA\\uDDDC\\uDE00-\\uDE11\\uDE13-\\uDE2B\\uDE80-\\uDE86\\uDE88\\uDE8A-\\uDE8D\\uDE8F-\\uDE9D\\uDE9F-\\uDEA8\\uDEB0-\\uDEDE\\uDF05-\\uDF0C\\uDF0F\\uDF10\\uDF13-\\uDF28\\uDF2A-\\uDF30\\uDF32\\uDF33\\uDF35-\\uDF39\\uDF3D\\uDF50\\uDF5D-\\uDF61]|\\uD805[\\uDC00-\\uDC34\\uDC47-\\uDC4A\\uDC80-\\uDCAF\\uDCC4\\uDCC5\\uDCC7\\uDD80-\\uDDAE\\uDDD8-\\uDDDB\\uDE00-\\uDE2F\\uDE44\\uDE80-\\uDEAA\\uDF00-\\uDF1A]|\\uD806[\\uDC00-\\uDC2B\\uDCA0-\\uDCDF\\uDCFF\\uDE00\\uDE0B-\\uDE32\\uDE3A\\uDE50\\uDE5C-\\uDE83\\uDE86-\\uDE89\\uDE9D\\uDEC0-\\uDEF8]|\\uD807[\\uDC00-\\uDC08\\uDC0A-\\uDC2E\\uDC40\\uDC72-\\uDC8F\\uDD00-\\uDD06\\uDD08\\uDD09\\uDD0B-\\uDD30\\uDD46\\uDD60-\\uDD65\\uDD67\\uDD68\\uDD6A-\\uDD89\\uDD98\\uDEE0-\\uDEF2]|\\uD808[\\uDC00-\\uDF99]|\\uD809[\\uDC00-\\uDC6E\\uDC80-\\uDD43]|[\\uD80C\\uD81C-\\uD820\\uD840-\\uD868\\uD86A-\\uD86C\\uD86F-\\uD872\\uD874-\\uD879][\\uDC00-\\uDFFF]|\\uD80D[\\uDC00-\\uDC2E]|\\uD811[\\uDC00-\\uDE46]|\\uD81A[\\uDC00-\\uDE38\\uDE40-\\uDE5E\\uDED0-\\uDEED\\uDF00-\\uDF2F\\uDF40-\\uDF43\\uDF63-\\uDF77\\uDF7D-\\uDF8F]|\\uD81B[\\uDE40-\\uDE7F\\uDF00-\\uDF44\\uDF50\\uDF93-\\uDF9F\\uDFE0\\uDFE1]|\\uD821[\\uDC00-\\uDFF1]|\\uD822[\\uDC00-\\uDEF2]|\\uD82C[\\uDC00-\\uDD1E\\uDD70-\\uDEFB]|\\uD82F[\\uDC00-\\uDC6A\\uDC70-\\uDC7C\\uDC80-\\uDC88\\uDC90-\\uDC99]|\\uD835[\\uDC00-\\uDC54\\uDC56-\\uDC9C\\uDC9E\\uDC9F\\uDCA2\\uDCA5\\uDCA6\\uDCA9-\\uDCAC\\uDCAE-\\uDCB9\\uDCBB\\uDCBD-\\uDCC3\\uDCC5-\\uDD05\\uDD07-\\uDD0A\\uDD0D-\\uDD14\\uDD16-\\uDD1C\\uDD1E-\\uDD39\\uDD3B-\\uDD3E\\uDD40-\\uDD44\\uDD46\\uDD4A-\\uDD50\\uDD52-\\uDEA5\\uDEA8-\\uDEC0\\uDEC2-\\uDEDA\\uDEDC-\\uDEFA\\uDEFC-\\uDF14\\uDF16-\\uDF34\\uDF36-\\uDF4E\\uDF50-\\uDF6E\\uDF70-\\uDF88\\uDF8A-\\uDFA8\\uDFAA-\\uDFC2\\uDFC4-\\uDFCB]|\\uD83A[\\uDC00-\\uDCC4\\uDD00-\\uDD43]|\\uD83B[\\uDE00-\\uDE03\\uDE05-\\uDE1F\\uDE21\\uDE22\\uDE24\\uDE27\\uDE29-\\uDE32\\uDE34-\\uDE37\\uDE39\\uDE3B\\uDE42\\uDE47\\uDE49\\uDE4B\\uDE4D-\\uDE4F\\uDE51\\uDE52\\uDE54\\uDE57\\uDE59\\uDE5B\\uDE5D\\uDE5F\\uDE61\\uDE62\\uDE64\\uDE67-\\uDE6A\\uDE6C-\\uDE72\\uDE74-\\uDE77\\uDE79-\\uDE7C\\uDE7E\\uDE80-\\uDE89\\uDE8B-\\uDE9B\\uDEA1-\\uDEA3\\uDEA5-\\uDEA9\\uDEAB-\\uDEBB]|\\uD869[\\uDC00-\\uDED6\\uDF00-\\uDFFF]|\\uD86D[\\uDC00-\\uDF34\\uDF40-\\uDFFF]|\\uD86E[\\uDC00-\\uDC1D\\uDC20-\\uDFFF]|\\uD873[\\uDC00-\\uDEA1\\uDEB0-\\uDFFF]|\\uD87A[\\uDC00-\\uDFE0]|\\uD87E[\\uDC00-\\uDE1D]/;\n\n return (ch === 36) || (ch === 95) || // $ (dollar) and _ (underscore)\n (ch >= 65 && ch <= 90) || // A..Z\n (ch >= 97 && ch <= 122) || // a..z\n ((ch >= 0x80) && NonAsciiIdentifierStart.test(fromCodePoint(ch)));\n }\n\n // Taken from the Esprima parser.\n function isIdentifierPart(ch) {\n // Generated by `tools/generate-identifier-regex.js`.\n // eslint-disable-next-line no-misleading-character-class\n var NonAsciiIdentifierPartOnly = /[0-9_\\xB7\\u0300-\\u036F\\u0387\\u0483-\\u0487\\u0591-\\u05BD\\u05BF\\u05C1\\u05C2\\u05C4\\u05C5\\u05C7\\u0610-\\u061A\\u064B-\\u0669\\u0670\\u06D6-\\u06DC\\u06DF-\\u06E4\\u06E7\\u06E8\\u06EA-\\u06ED\\u06F0-\\u06F9\\u0711\\u0730-\\u074A\\u07A6-\\u07B0\\u07C0-\\u07C9\\u07EB-\\u07F3\\u07FD\\u0816-\\u0819\\u081B-\\u0823\\u0825-\\u0827\\u0829-\\u082D\\u0859-\\u085B\\u08D3-\\u08E1\\u08E3-\\u0903\\u093A-\\u093C\\u093E-\\u094F\\u0951-\\u0957\\u0962\\u0963\\u0966-\\u096F\\u0981-\\u0983\\u09BC\\u09BE-\\u09C4\\u09C7\\u09C8\\u09CB-\\u09CD\\u09D7\\u09E2\\u09E3\\u09E6-\\u09EF\\u09FE\\u0A01-\\u0A03\\u0A3C\\u0A3E-\\u0A42\\u0A47\\u0A48\\u0A4B-\\u0A4D\\u0A51\\u0A66-\\u0A71\\u0A75\\u0A81-\\u0A83\\u0ABC\\u0ABE-\\u0AC5\\u0AC7-\\u0AC9\\u0ACB-\\u0ACD\\u0AE2\\u0AE3\\u0AE6-\\u0AEF\\u0AFA-\\u0AFF\\u0B01-\\u0B03\\u0B3C\\u0B3E-\\u0B44\\u0B47\\u0B48\\u0B4B-\\u0B4D\\u0B56\\u0B57\\u0B62\\u0B63\\u0B66-\\u0B6F\\u0B82\\u0BBE-\\u0BC2\\u0BC6-\\u0BC8\\u0BCA-\\u0BCD\\u0BD7\\u0BE6-\\u0BEF\\u0C00-\\u0C04\\u0C3E-\\u0C44\\u0C46-\\u0C48\\u0C4A-\\u0C4D\\u0C55\\u0C56\\u0C62\\u0C63\\u0C66-\\u0C6F\\u0C81-\\u0C83\\u0CBC\\u0CBE-\\u0CC4\\u0CC6-\\u0CC8\\u0CCA-\\u0CCD\\u0CD5\\u0CD6\\u0CE2\\u0CE3\\u0CE6-\\u0CEF\\u0D00-\\u0D03\\u0D3B\\u0D3C\\u0D3E-\\u0D44\\u0D46-\\u0D48\\u0D4A-\\u0D4D\\u0D57\\u0D62\\u0D63\\u0D66-\\u0D6F\\u0D82\\u0D83\\u0DCA\\u0DCF-\\u0DD4\\u0DD6\\u0DD8-\\u0DDF\\u0DE6-\\u0DEF\\u0DF2\\u0DF3\\u0E31\\u0E34-\\u0E3A\\u0E47-\\u0E4E\\u0E50-\\u0E59\\u0EB1\\u0EB4-\\u0EB9\\u0EBB\\u0EBC\\u0EC8-\\u0ECD\\u0ED0-\\u0ED9\\u0F18\\u0F19\\u0F20-\\u0F29\\u0F35\\u0F37\\u0F39\\u0F3E\\u0F3F\\u0F71-\\u0F84\\u0F86\\u0F87\\u0F8D-\\u0F97\\u0F99-\\u0FBC\\u0FC6\\u102B-\\u103E\\u1040-\\u1049\\u1056-\\u1059\\u105E-\\u1060\\u1062-\\u1064\\u1067-\\u106D\\u1071-\\u1074\\u1082-\\u108D\\u108F-\\u109D\\u135D-\\u135F\\u1369-\\u1371\\u1712-\\u1714\\u1732-\\u1734\\u1752\\u1753\\u1772\\u1773\\u17B4-\\u17D3\\u17DD\\u17E0-\\u17E9\\u180B-\\u180D\\u1810-\\u1819\\u18A9\\u1920-\\u192B\\u1930-\\u193B\\u1946-\\u194F\\u19D0-\\u19DA\\u1A17-\\u1A1B\\u1A55-\\u1A5E\\u1A60-\\u1A7C\\u1A7F-\\u1A89\\u1A90-\\u1A99\\u1AB0-\\u1ABD\\u1B00-\\u1B04\\u1B34-\\u1B44\\u1B50-\\u1B59\\u1B6B-\\u1B73\\u1B80-\\u1B82\\u1BA1-\\u1BAD\\u1BB0-\\u1BB9\\u1BE6-\\u1BF3\\u1C24-\\u1C37\\u1C40-\\u1C49\\u1C50-\\u1C59\\u1CD0-\\u1CD2\\u1CD4-\\u1CE8\\u1CED\\u1CF2-\\u1CF4\\u1CF7-\\u1CF9\\u1DC0-\\u1DF9\\u1DFB-\\u1DFF\\u200C\\u200D\\u203F\\u2040\\u2054\\u20D0-\\u20DC\\u20E1\\u20E5-\\u20F0\\u2CEF-\\u2CF1\\u2D7F\\u2DE0-\\u2DFF\\u302A-\\u302F\\u3099\\u309A\\uA620-\\uA629\\uA66F\\uA674-\\uA67D\\uA69E\\uA69F\\uA6F0\\uA6F1\\uA802\\uA806\\uA80B\\uA823-\\uA827\\uA880\\uA881\\uA8B4-\\uA8C5\\uA8D0-\\uA8D9\\uA8E0-\\uA8F1\\uA8FF-\\uA909\\uA926-\\uA92D\\uA947-\\uA953\\uA980-\\uA983\\uA9B3-\\uA9C0\\uA9D0-\\uA9D9\\uA9E5\\uA9F0-\\uA9F9\\uAA29-\\uAA36\\uAA43\\uAA4C\\uAA4D\\uAA50-\\uAA59\\uAA7B-\\uAA7D\\uAAB0\\uAAB2-\\uAAB4\\uAAB7\\uAAB8\\uAABE\\uAABF\\uAAC1\\uAAEB-\\uAAEF\\uAAF5\\uAAF6\\uABE3-\\uABEA\\uABEC\\uABED\\uABF0-\\uABF9\\uFB1E\\uFE00-\\uFE0F\\uFE20-\\uFE2F\\uFE33\\uFE34\\uFE4D-\\uFE4F\\uFF10-\\uFF19\\uFF3F]|\\uD800[\\uDDFD\\uDEE0\\uDF76-\\uDF7A]|\\uD801[\\uDCA0-\\uDCA9]|\\uD802[\\uDE01-\\uDE03\\uDE05\\uDE06\\uDE0C-\\uDE0F\\uDE38-\\uDE3A\\uDE3F\\uDEE5\\uDEE6]|\\uD803[\\uDD24-\\uDD27\\uDD30-\\uDD39\\uDF46-\\uDF50]|\\uD804[\\uDC00-\\uDC02\\uDC38-\\uDC46\\uDC66-\\uDC6F\\uDC7F-\\uDC82\\uDCB0-\\uDCBA\\uDCF0-\\uDCF9\\uDD00-\\uDD02\\uDD27-\\uDD34\\uDD36-\\uDD3F\\uDD45\\uDD46\\uDD73\\uDD80-\\uDD82\\uDDB3-\\uDDC0\\uDDC9-\\uDDCC\\uDDD0-\\uDDD9\\uDE2C-\\uDE37\\uDE3E\\uDEDF-\\uDEEA\\uDEF0-\\uDEF9\\uDF00-\\uDF03\\uDF3B\\uDF3C\\uDF3E-\\uDF44\\uDF47\\uDF48\\uDF4B-\\uDF4D\\uDF57\\uDF62\\uDF63\\uDF66-\\uDF6C\\uDF70-\\uDF74]|\\uD805[\\uDC35-\\uDC46\\uDC50-\\uDC59\\uDC5E\\uDCB0-\\uDCC3\\uDCD0-\\uDCD9\\uDDAF-\\uDDB5\\uDDB8-\\uDDC0\\uDDDC\\uDDDD\\uDE30-\\uDE40\\uDE50-\\uDE59\\uDEAB-\\uDEB7\\uDEC0-\\uDEC9\\uDF1D-\\uDF2B\\uDF30-\\uDF39]|\\uD806[\\uDC2C-\\uDC3A\\uDCE0-\\uDCE9\\uDE01-\\uDE0A\\uDE33-\\uDE39\\uDE3B-\\uDE3E\\uDE47\\uDE51-\\uDE5B\\uDE8A-\\uDE99]|\\uD807[\\uDC2F-\\uDC36\\uDC38-\\uDC3F\\uDC50-\\uDC59\\uDC92-\\uDCA7\\uDCA9-\\uDCB6\\uDD31-\\uDD36\\uDD3A\\uDD3C\\uDD3D\\uDD3F-\\uDD45\\uDD47\\uDD50-\\uDD59\\uDD8A-\\uDD8E\\uDD90\\uDD91\\uDD93-\\uDD97\\uDDA0-\\uDDA9\\uDEF3-\\uDEF6]|\\uD81A[\\uDE60-\\uDE69\\uDEF0-\\uDEF4\\uDF30-\\uDF36\\uDF50-\\uDF59]|\\uD81B[\\uDF51-\\uDF7E\\uDF8F-\\uDF92]|\\uD82F[\\uDC9D\\uDC9E]|\\uD834[\\uDD65-\\uDD69\\uDD6D-\\uDD72\\uDD7B-\\uDD82\\uDD85-\\uDD8B\\uDDAA-\\uDDAD\\uDE42-\\uDE44]|\\uD835[\\uDFCE-\\uDFFF]|\\uD836[\\uDE00-\\uDE36\\uDE3B-\\uDE6C\\uDE75\\uDE84\\uDE9B-\\uDE9F\\uDEA1-\\uDEAF]|\\uD838[\\uDC00-\\uDC06\\uDC08-\\uDC18\\uDC1B-\\uDC21\\uDC23\\uDC24\\uDC26-\\uDC2A]|\\uD83A[\\uDCD0-\\uDCD6\\uDD44-\\uDD4A\\uDD50-\\uDD59]|\\uDB40[\\uDD00-\\uDDEF]/;\n\n return isIdentifierStart(ch) ||\n (ch >= 48 && ch <= 57) || // 0..9\n ((ch >= 0x80) && NonAsciiIdentifierPartOnly.test(fromCodePoint(ch)));\n }\n\n function parseIdentityEscape() {\n // IdentityEscape ::\n // [+U] SyntaxCharacter\n // [+U] /\n // [~U] SourceCharacterIdentityEscape[?N]\n // SourceCharacterIdentityEscape[?N] ::\n // [~N] SourceCharacter but not c\n // [+N] SourceCharacter but not one of c or k\n\n\n var tmp;\n var l = lookahead();\n if (\n (isUnicodeMode && /[\\^\\$\\.\\*\\+\\?\\(\\)\\\\\\[\\]\\{\\}\\|\\/]/.test(l)) ||\n (!isUnicodeMode && l !== \"c\")\n ) {\n if (l === \"k\" && features.lookbehind) {\n return null;\n }\n tmp = incr();\n return createEscaped('identifier', tmp.charCodeAt(0), tmp, 1);\n }\n\n return null;\n }\n\n function parseCharacterClass() {\n // CharacterClass ::\n // [ [lookahead ∉ {^}] ClassRanges ]\n // [ ^ ClassRanges ]\n\n var res, from = pos;\n if (res = matchReg(/^\\[\\^/)) {\n res = parseClassRanges();\n skip(']');\n return createCharacterClass(res, true, from, pos);\n } else if (match('[')) {\n res = parseClassRanges();\n skip(']');\n return createCharacterClass(res, false, from, pos);\n }\n\n return null;\n }\n\n function parseClassRanges() {\n // ClassRanges ::\n // [empty]\n // [~V] NonemptyClassRanges\n // [+V] ClassContents\n\n var res;\n if (current(']')) {\n // Empty array means nothing inside of the ClassRange.\n return { kind: 'union', body: [] };\n } else if (hasUnicodeSetFlag) {\n return parseClassContents();\n } else {\n res = parseNonemptyClassRanges();\n if (!res) {\n bail('nonEmptyClassRanges');\n }\n return { kind: 'union', body: res };\n }\n }\n\n function parseHelperClassRanges(atom) {\n var from, to, res, atomTo, dash;\n if (current('-') && !next(']')) {\n // ClassAtom - ClassAtom ClassRanges\n from = atom.range[0];\n dash = createCharacter(match('-'));\n\n atomTo = parseClassAtom();\n if (!atomTo) {\n bail('classAtom');\n }\n to = pos;\n\n // Parse the next class range if exists.\n var classRanges = parseClassRanges();\n if (!classRanges) {\n bail('classRanges');\n }\n\n // Check if both the from and atomTo have codePoints.\n if (!('codePoint' in atom) || !('codePoint' in atomTo)) {\n if (!isUnicodeMode) {\n // If not, don't create a range but treat them as\n // `atom` `-` `atom` instead.\n //\n // SEE: https://tc39.es/ecma262/#sec-regular-expression-patterns-semantics\n // NonemptyClassRanges::ClassAtom-ClassAtomClassRanges\n // CharacterRangeOrUnion\n res = [atom, dash, atomTo];\n } else {\n // With unicode flag, both sides must have codePoints if\n // one side has a codePoint.\n //\n // SEE: https://tc39.es/ecma262/#sec-patterns-static-semantics-early-errors\n // NonemptyClassRanges :: ClassAtom - ClassAtom ClassRanges\n bail('invalid character class');\n }\n } else {\n res = [createClassRange(atom, atomTo, from, to)];\n }\n\n if (classRanges.type === 'empty') {\n return res;\n }\n return res.concat(classRanges.body);\n }\n\n res = parseNonemptyClassRangesNoDash();\n if (!res) {\n bail('nonEmptyClassRangesNoDash');\n }\n\n return [atom].concat(res);\n }\n\n function parseNonemptyClassRanges() {\n // NonemptyClassRanges ::\n // ClassAtom\n // ClassAtom NonemptyClassRangesNoDash\n // ClassAtom - ClassAtom ClassRanges\n\n var atom = parseClassAtom();\n if (!atom) {\n bail('classAtom');\n }\n\n if (current(']')) {\n // ClassAtom\n return [atom];\n }\n\n // ClassAtom NonemptyClassRangesNoDash\n // ClassAtom - ClassAtom ClassRanges\n return parseHelperClassRanges(atom);\n }\n\n function parseNonemptyClassRangesNoDash() {\n // NonemptyClassRangesNoDash ::\n // ClassAtom\n // ClassAtomNoDash NonemptyClassRangesNoDash\n // ClassAtomNoDash - ClassAtom ClassRanges\n\n var res = parseClassAtom();\n if (!res) {\n bail('classAtom');\n }\n if (current(']')) {\n // ClassAtom\n return res;\n }\n\n // ClassAtomNoDash NonemptyClassRangesNoDash\n // ClassAtomNoDash - ClassAtom ClassRanges\n return parseHelperClassRanges(res);\n }\n\n function parseClassAtom() {\n // ClassAtom ::\n // -\n // ClassAtomNoDash\n if (match('-')) {\n return createCharacter('-');\n } else {\n return parseClassAtomNoDash();\n }\n }\n\n function parseClassAtomNoDash() {\n // ClassAtomNoDash ::\n // SourceCharacter but not one of \\ or ] or -\n // \\ ClassEscape\n\n var res;\n if (res = matchReg(/^[^\\\\\\]-]/)) {\n return createCharacter(res[0]);\n } else if (match('\\\\')) {\n res = parseClassEscape();\n if (!res) {\n bail('classEscape');\n }\n\n return parseUnicodeSurrogatePairEscape(res);\n }\n }\n\n function parseClassContents() {\n // ClassContents ::\n // ClassUnion\n // ClassIntersection\n // ClassSubtraction\n //\n // ClassUnion ::\n // ClassRange ClassUnion?\n // ClassOperand ClassUnion?\n //\n // ClassIntersection ::\n // ClassOperand && [lookahead ≠ &] ClassOperand\n // ClassIntersection && [lookahead ≠ &] ClassOperand\n //\n // ClassSubtraction ::\n // ClassOperand -- ClassOperand\n // ClassSubtraction -- ClassOperand\n\n var body = [];\n var kind;\n\n var operand = parseClassOperand(/* allowRanges*/ true);\n body.push(operand);\n\n if (operand.type === 'classRange') {\n kind = 'union';\n } else if (current('&')) {\n kind = 'intersection';\n } else if (current('-')) {\n kind = 'subtraction';\n } else {\n kind = 'union';\n }\n\n while (!current(']')) {\n if (kind === 'intersection') {\n skip('&');\n skip('&');\n if (current('&')) {\n bail('&& cannot be followed by &. Wrap it in brackets: &&[&].');\n }\n } else if (kind === 'subtraction') {\n skip('-');\n skip('-');\n }\n\n operand = parseClassOperand(/* allowRanges*/ kind === 'union');\n body.push(operand);\n }\n\n return { kind: kind, body: body };\n }\n\n function parseClassOperand(allowRanges) {\n // ClassOperand ::\n // ClassCharacter\n // ClassStrings\n // NestedClass\n //\n // NestedClass ::\n // [ [lookahead ≠ ^] ClassRanges[+U,+V] ]\n // [ ^ ClassRanges[+U,+V] ]\n // \\ CharacterClassEscape[+U, +V]\n //\n // ClassRange ::\n // ClassCharacter - ClassCharacter\n //\n // ClassCharacter ::\n // [lookahead ∉ ClassReservedDouble] SourceCharacter but not ClassSyntaxCharacter\n // \\ CharacterEscape[+U]\n // \\ ClassHalfOfDouble\n // \\ b\n //\n // ClassSyntaxCharacter ::\n // one of ( ) [ ] { } / - \\ |\n\n var from = pos;\n var start, res;\n\n if (match('\\\\')) {\n // ClassOperand ::\n // ...\n // ClassStrings\n // NestedClass\n //\n // NestedClass ::\n // ...\n // \\ CharacterClassEscape[+U, +V]\n if (res = parseClassEscape()) {\n start = res;\n } else if (res = parseClassCharacterEscapedHelper()) {\n return res;\n } else {\n bail('Invalid escape', '\\\\' + lookahead(), from);\n }\n } else if (res = parseClassCharacterUnescapedHelper()) {\n start = res;\n } else if (res = parseCharacterClass()) {\n // ClassOperand ::\n // ...\n // NestedClass\n //\n // NestedClass ::\n // [ [lookahead ≠ ^] ClassRanges[+U,+V] ]\n // [ ^ ClassRanges[+U,+V] ]\n // ...\n return res;\n } else {\n bail('Invalid character', lookahead());\n }\n\n if (allowRanges && current('-') && !next('-')) {\n skip('-');\n\n if (res = parseClassCharacter()) {\n // ClassRange ::\n // ClassCharacter - ClassCharacter\n return createClassRange(start, res, from, pos);\n }\n\n bail('Invalid range end', lookahead());\n }\n\n // ClassOperand ::\n // ClassCharacter\n // ...\n return start;\n }\n\n function parseClassCharacter() {\n // ClassCharacter ::\n // [lookahead ∉ ClassReservedDouble] SourceCharacter but not ClassSyntaxCharacter\n // \\ CharacterEscape[+U]\n // \\ ClassHalfOfDouble\n // \\ b\n\n if (match('\\\\')) {\n var res, from = pos;\n if (res = parseClassCharacterEscapedHelper()) {\n return res;\n } else {\n bail('Invalid escape', '\\\\' + lookahead(), from);\n }\n }\n\n return parseClassCharacterUnescapedHelper();\n }\n\n function parseClassCharacterUnescapedHelper() {\n // ClassCharacter ::\n // [lookahead ∉ ClassReservedDouble] SourceCharacter but not ClassSyntaxCharacter\n // ...\n\n var res;\n if (res = matchReg(/^[^()[\\]{}/\\-\\\\|]/)) {\n return createCharacter(res);\n }\n }\n\n function parseClassCharacterEscapedHelper() {\n // ClassCharacter ::\n // ...\n // \\ CharacterEscape[+U]\n // \\ ClassHalfOfDouble\n // \\ b\n\n var res;\n if (match('b')) {\n return createEscaped('singleEscape', 0x0008, '\\\\b');\n } else if (match('B')) {\n bail('\\\\B not possible inside of ClassContents', '', pos - 2);\n } else if (res = matchReg(/^[&\\-!#%,:;<=>@_`~]/)) {\n return createEscaped('identifier', res[0].codePointAt(0), res[0]);\n } else if (res = parseCharacterEscape()) {\n return res;\n } else {\n return null;\n }\n }\n\n function parseClassStrings() {\n // ClassStrings ::\n // \\q{ ClassString MoreClassStrings? }\n\n // When calling this function, \\q{ has already been consumed.\n var from = pos - 3;\n\n var res = [];\n do {\n res.push(parseClassString());\n } while (match('|'));\n\n skip('}');\n\n return createClassStrings(res, from, pos);\n }\n\n function parseClassString() {\n // ClassString ::\n // [empty]\n // NonEmptyClassString\n //\n // NonEmptyClassString ::\n // ClassCharacter NonEmptyClassString?\n\n var res = [], from = pos;\n var char;\n\n while (char = parseClassCharacter()) {\n res.push(char);\n }\n\n return createClassString(res, from, pos);\n }\n\n function bail(message, details, from, to) {\n from = from == null ? pos : from;\n to = to == null ? from : to;\n\n var contextStart = Math.max(0, from - 10);\n var contextEnd = Math.min(to + 10, str.length);\n\n // Output a bit of context and a line pointing to where our error is.\n //\n // We are assuming that there are no actual newlines in the content as this is a regular expression.\n var context = ' ' + str.substring(contextStart, contextEnd);\n var pointer = ' ' + new Array(from - contextStart + 1).join(' ') + '^';\n\n throw SyntaxError(message + ' at position ' + from + (details ? ': ' + details : '') + '\\n' + context + '\\n' + pointer);\n }\n\n var backrefDenied = [];\n var closedCaptureCounter = 0;\n var firstIteration = true;\n var shouldReparse = false;\n var hasUnicodeFlag = (flags || \"\").indexOf(\"u\") !== -1;\n var hasUnicodeSetFlag = (flags || \"\").indexOf(\"v\") !== -1;\n var isUnicodeMode = hasUnicodeFlag || hasUnicodeSetFlag;\n var pos = 0;\n\n if (hasUnicodeSetFlag && !features.unicodeSet) {\n throw new Error('The \"v\" flag is only supported when the .unicodeSet option is enabled.');\n }\n\n if (hasUnicodeFlag && hasUnicodeSetFlag) {\n throw new Error('The \"u\" and \"v\" flags are mutually exclusive.');\n }\n\n // Convert the input to a string and treat the empty string special.\n str = String(str);\n if (str === '') {\n str = '(?:)';\n }\n\n var result = parseDisjunction();\n\n if (result.range[1] !== str.length) {\n bail('Could not parse entire input - got stuck', '', result.range[1]);\n }\n\n // The spec requires to interpret the `\\2` in `/\\2()()/` as backreference.\n // As the parser collects the number of capture groups as the string is\n // parsed it is impossible to make these decisions at the point when the\n // `\\2` is handled. In case the local decision turns out to be wrong after\n // the parsing has finished, the input string is parsed a second time with\n // the total number of capture groups set.\n //\n // SEE: https://github.com/jviereck/regjsparser/issues/70\n shouldReparse = shouldReparse || backrefDenied.some(function (ref) {\n return ref <= closedCaptureCounter;\n });\n if (shouldReparse) {\n // Parse the input a second time.\n pos = 0;\n firstIteration = false;\n return parseDisjunction();\n }\n\n return result;\n }\n\n var regjsparser = {\n parse: parse\n };\n\n if (typeof module !== 'undefined' && module.exports) {\n module.exports = regjsparser;\n } else {\n window.regjsparser = regjsparser;\n }\n\n}());\n","module.exports = new Set([\n\t// Non-binary properties:\n\t'General_Category',\n\t'Script',\n\t'Script_Extensions',\n\t// Binary properties:\n\t'Alphabetic',\n\t'Any',\n\t'ASCII',\n\t'ASCII_Hex_Digit',\n\t'Assigned',\n\t'Bidi_Control',\n\t'Bidi_Mirrored',\n\t'Case_Ignorable',\n\t'Cased',\n\t'Changes_When_Casefolded',\n\t'Changes_When_Casemapped',\n\t'Changes_When_Lowercased',\n\t'Changes_When_NFKC_Casefolded',\n\t'Changes_When_Titlecased',\n\t'Changes_When_Uppercased',\n\t'Dash',\n\t'Default_Ignorable_Code_Point',\n\t'Deprecated',\n\t'Diacritic',\n\t'Emoji',\n\t'Emoji_Component',\n\t'Emoji_Modifier',\n\t'Emoji_Modifier_Base',\n\t'Emoji_Presentation',\n\t'Extended_Pictographic',\n\t'Extender',\n\t'Grapheme_Base',\n\t'Grapheme_Extend',\n\t'Hex_Digit',\n\t'ID_Continue',\n\t'ID_Start',\n\t'Ideographic',\n\t'IDS_Binary_Operator',\n\t'IDS_Trinary_Operator',\n\t'Join_Control',\n\t'Logical_Order_Exception',\n\t'Lowercase',\n\t'Math',\n\t'Noncharacter_Code_Point',\n\t'Pattern_Syntax',\n\t'Pattern_White_Space',\n\t'Quotation_Mark',\n\t'Radical',\n\t'Regional_Indicator',\n\t'Sentence_Terminal',\n\t'Soft_Dotted',\n\t'Terminal_Punctuation',\n\t'Unified_Ideograph',\n\t'Uppercase',\n\t'Variation_Selector',\n\t'White_Space',\n\t'XID_Continue',\n\t'XID_Start'\n]);\n","// Generated using `npm run build`. Do not edit!\nmodule.exports = new Map([\n\t['scx', 'Script_Extensions'],\n\t['sc', 'Script'],\n\t['gc', 'General_Category'],\n\t['AHex', 'ASCII_Hex_Digit'],\n\t['Alpha', 'Alphabetic'],\n\t['Bidi_C', 'Bidi_Control'],\n\t['Bidi_M', 'Bidi_Mirrored'],\n\t['Cased', 'Cased'],\n\t['CI', 'Case_Ignorable'],\n\t['CWCF', 'Changes_When_Casefolded'],\n\t['CWCM', 'Changes_When_Casemapped'],\n\t['CWKCF', 'Changes_When_NFKC_Casefolded'],\n\t['CWL', 'Changes_When_Lowercased'],\n\t['CWT', 'Changes_When_Titlecased'],\n\t['CWU', 'Changes_When_Uppercased'],\n\t['Dash', 'Dash'],\n\t['Dep', 'Deprecated'],\n\t['DI', 'Default_Ignorable_Code_Point'],\n\t['Dia', 'Diacritic'],\n\t['EBase', 'Emoji_Modifier_Base'],\n\t['EComp', 'Emoji_Component'],\n\t['EMod', 'Emoji_Modifier'],\n\t['Emoji', 'Emoji'],\n\t['EPres', 'Emoji_Presentation'],\n\t['Ext', 'Extender'],\n\t['ExtPict', 'Extended_Pictographic'],\n\t['Gr_Base', 'Grapheme_Base'],\n\t['Gr_Ext', 'Grapheme_Extend'],\n\t['Hex', 'Hex_Digit'],\n\t['IDC', 'ID_Continue'],\n\t['Ideo', 'Ideographic'],\n\t['IDS', 'ID_Start'],\n\t['IDSB', 'IDS_Binary_Operator'],\n\t['IDST', 'IDS_Trinary_Operator'],\n\t['Join_C', 'Join_Control'],\n\t['LOE', 'Logical_Order_Exception'],\n\t['Lower', 'Lowercase'],\n\t['Math', 'Math'],\n\t['NChar', 'Noncharacter_Code_Point'],\n\t['Pat_Syn', 'Pattern_Syntax'],\n\t['Pat_WS', 'Pattern_White_Space'],\n\t['QMark', 'Quotation_Mark'],\n\t['Radical', 'Radical'],\n\t['RI', 'Regional_Indicator'],\n\t['SD', 'Soft_Dotted'],\n\t['STerm', 'Sentence_Terminal'],\n\t['Term', 'Terminal_Punctuation'],\n\t['UIdeo', 'Unified_Ideograph'],\n\t['Upper', 'Uppercase'],\n\t['VS', 'Variation_Selector'],\n\t['WSpace', 'White_Space'],\n\t['space', 'White_Space'],\n\t['XIDC', 'XID_Continue'],\n\t['XIDS', 'XID_Start']\n]);\n","'use strict';\n\nconst canonicalProperties = require('unicode-canonical-property-names-ecmascript');\nconst propertyAliases = require('unicode-property-aliases-ecmascript');\n\nconst matchProperty = function(property) {\n\tif (canonicalProperties.has(property)) {\n\t\treturn property;\n\t}\n\tif (propertyAliases.has(property)) {\n\t\treturn propertyAliases.get(property);\n\t}\n\tthrow new Error(`Unknown property: ${ property }`);\n};\n\nmodule.exports = matchProperty;\n","'use strict';\n\nconst propertyToValueAliases = require('./data/mappings.js');\n\nconst matchPropertyValue = function(property, value) {\n\tconst aliasToValue = propertyToValueAliases.get(property);\n\tif (!aliasToValue) {\n\t\tthrow new Error(`Unknown property \\`${ property }\\`.`);\n\t}\n\tconst canonicalValue = aliasToValue.get(value);\n\tif (canonicalValue) {\n\t\treturn canonicalValue;\n\t}\n\tthrow new Error(\n\t\t`Unknown value \\`${ value }\\` for property \\`${ property }\\`.`\n\t);\n};\n\nmodule.exports = matchPropertyValue;\n","module.exports = new Map([\n\t['General_Category', new Map([\n\t\t['C', 'Other'],\n\t\t['Cc', 'Control'],\n\t\t['cntrl', 'Control'],\n\t\t['Cf', 'Format'],\n\t\t['Cn', 'Unassigned'],\n\t\t['Co', 'Private_Use'],\n\t\t['Cs', 'Surrogate'],\n\t\t['L', 'Letter'],\n\t\t['LC', 'Cased_Letter'],\n\t\t['Ll', 'Lowercase_Letter'],\n\t\t['Lm', 'Modifier_Letter'],\n\t\t['Lo', 'Other_Letter'],\n\t\t['Lt', 'Titlecase_Letter'],\n\t\t['Lu', 'Uppercase_Letter'],\n\t\t['M', 'Mark'],\n\t\t['Combining_Mark', 'Mark'],\n\t\t['Mc', 'Spacing_Mark'],\n\t\t['Me', 'Enclosing_Mark'],\n\t\t['Mn', 'Nonspacing_Mark'],\n\t\t['N', 'Number'],\n\t\t['Nd', 'Decimal_Number'],\n\t\t['digit', 'Decimal_Number'],\n\t\t['Nl', 'Letter_Number'],\n\t\t['No', 'Other_Number'],\n\t\t['P', 'Punctuation'],\n\t\t['punct', 'Punctuation'],\n\t\t['Pc', 'Connector_Punctuation'],\n\t\t['Pd', 'Dash_Punctuation'],\n\t\t['Pe', 'Close_Punctuation'],\n\t\t['Pf', 'Final_Punctuation'],\n\t\t['Pi', 'Initial_Punctuation'],\n\t\t['Po', 'Other_Punctuation'],\n\t\t['Ps', 'Open_Punctuation'],\n\t\t['S', 'Symbol'],\n\t\t['Sc', 'Currency_Symbol'],\n\t\t['Sk', 'Modifier_Symbol'],\n\t\t['Sm', 'Math_Symbol'],\n\t\t['So', 'Other_Symbol'],\n\t\t['Z', 'Separator'],\n\t\t['Zl', 'Line_Separator'],\n\t\t['Zp', 'Paragraph_Separator'],\n\t\t['Zs', 'Space_Separator'],\n\t\t['Other', 'Other'],\n\t\t['Control', 'Control'],\n\t\t['Format', 'Format'],\n\t\t['Unassigned', 'Unassigned'],\n\t\t['Private_Use', 'Private_Use'],\n\t\t['Surrogate', 'Surrogate'],\n\t\t['Letter', 'Letter'],\n\t\t['Cased_Letter', 'Cased_Letter'],\n\t\t['Lowercase_Letter', 'Lowercase_Letter'],\n\t\t['Modifier_Letter', 'Modifier_Letter'],\n\t\t['Other_Letter', 'Other_Letter'],\n\t\t['Titlecase_Letter', 'Titlecase_Letter'],\n\t\t['Uppercase_Letter', 'Uppercase_Letter'],\n\t\t['Mark', 'Mark'],\n\t\t['Spacing_Mark', 'Spacing_Mark'],\n\t\t['Enclosing_Mark', 'Enclosing_Mark'],\n\t\t['Nonspacing_Mark', 'Nonspacing_Mark'],\n\t\t['Number', 'Number'],\n\t\t['Decimal_Number', 'Decimal_Number'],\n\t\t['Letter_Number', 'Letter_Number'],\n\t\t['Other_Number', 'Other_Number'],\n\t\t['Punctuation', 'Punctuation'],\n\t\t['Connector_Punctuation', 'Connector_Punctuation'],\n\t\t['Dash_Punctuation', 'Dash_Punctuation'],\n\t\t['Close_Punctuation', 'Close_Punctuation'],\n\t\t['Final_Punctuation', 'Final_Punctuation'],\n\t\t['Initial_Punctuation', 'Initial_Punctuation'],\n\t\t['Other_Punctuation', 'Other_Punctuation'],\n\t\t['Open_Punctuation', 'Open_Punctuation'],\n\t\t['Symbol', 'Symbol'],\n\t\t['Currency_Symbol', 'Currency_Symbol'],\n\t\t['Modifier_Symbol', 'Modifier_Symbol'],\n\t\t['Math_Symbol', 'Math_Symbol'],\n\t\t['Other_Symbol', 'Other_Symbol'],\n\t\t['Separator', 'Separator'],\n\t\t['Line_Separator', 'Line_Separator'],\n\t\t['Paragraph_Separator', 'Paragraph_Separator'],\n\t\t['Space_Separator', 'Space_Separator']\n\t])],\n\t['Script', new Map([\n\t\t['Adlm', 'Adlam'],\n\t\t['Aghb', 'Caucasian_Albanian'],\n\t\t['Ahom', 'Ahom'],\n\t\t['Arab', 'Arabic'],\n\t\t['Armi', 'Imperial_Aramaic'],\n\t\t['Armn', 'Armenian'],\n\t\t['Avst', 'Avestan'],\n\t\t['Bali', 'Balinese'],\n\t\t['Bamu', 'Bamum'],\n\t\t['Bass', 'Bassa_Vah'],\n\t\t['Batk', 'Batak'],\n\t\t['Beng', 'Bengali'],\n\t\t['Bhks', 'Bhaiksuki'],\n\t\t['Bopo', 'Bopomofo'],\n\t\t['Brah', 'Brahmi'],\n\t\t['Brai', 'Braille'],\n\t\t['Bugi', 'Buginese'],\n\t\t['Buhd', 'Buhid'],\n\t\t['Cakm', 'Chakma'],\n\t\t['Cans', 'Canadian_Aboriginal'],\n\t\t['Cari', 'Carian'],\n\t\t['Cham', 'Cham'],\n\t\t['Cher', 'Cherokee'],\n\t\t['Chrs', 'Chorasmian'],\n\t\t['Copt', 'Coptic'],\n\t\t['Qaac', 'Coptic'],\n\t\t['Cpmn', 'Cypro_Minoan'],\n\t\t['Cprt', 'Cypriot'],\n\t\t['Cyrl', 'Cyrillic'],\n\t\t['Deva', 'Devanagari'],\n\t\t['Diak', 'Dives_Akuru'],\n\t\t['Dogr', 'Dogra'],\n\t\t['Dsrt', 'Deseret'],\n\t\t['Dupl', 'Duployan'],\n\t\t['Egyp', 'Egyptian_Hieroglyphs'],\n\t\t['Elba', 'Elbasan'],\n\t\t['Elym', 'Elymaic'],\n\t\t['Ethi', 'Ethiopic'],\n\t\t['Geor', 'Georgian'],\n\t\t['Glag', 'Glagolitic'],\n\t\t['Gong', 'Gunjala_Gondi'],\n\t\t['Gonm', 'Masaram_Gondi'],\n\t\t['Goth', 'Gothic'],\n\t\t['Gran', 'Grantha'],\n\t\t['Grek', 'Greek'],\n\t\t['Gujr', 'Gujarati'],\n\t\t['Guru', 'Gurmukhi'],\n\t\t['Hang', 'Hangul'],\n\t\t['Hani', 'Han'],\n\t\t['Hano', 'Hanunoo'],\n\t\t['Hatr', 'Hatran'],\n\t\t['Hebr', 'Hebrew'],\n\t\t['Hira', 'Hiragana'],\n\t\t['Hluw', 'Anatolian_Hieroglyphs'],\n\t\t['Hmng', 'Pahawh_Hmong'],\n\t\t['Hmnp', 'Nyiakeng_Puachue_Hmong'],\n\t\t['Hrkt', 'Katakana_Or_Hiragana'],\n\t\t['Hung', 'Old_Hungarian'],\n\t\t['Ital', 'Old_Italic'],\n\t\t['Java', 'Javanese'],\n\t\t['Kali', 'Kayah_Li'],\n\t\t['Kana', 'Katakana'],\n\t\t['Kawi', 'Kawi'],\n\t\t['Khar', 'Kharoshthi'],\n\t\t['Khmr', 'Khmer'],\n\t\t['Khoj', 'Khojki'],\n\t\t['Kits', 'Khitan_Small_Script'],\n\t\t['Knda', 'Kannada'],\n\t\t['Kthi', 'Kaithi'],\n\t\t['Lana', 'Tai_Tham'],\n\t\t['Laoo', 'Lao'],\n\t\t['Latn', 'Latin'],\n\t\t['Lepc', 'Lepcha'],\n\t\t['Limb', 'Limbu'],\n\t\t['Lina', 'Linear_A'],\n\t\t['Linb', 'Linear_B'],\n\t\t['Lisu', 'Lisu'],\n\t\t['Lyci', 'Lycian'],\n\t\t['Lydi', 'Lydian'],\n\t\t['Mahj', 'Mahajani'],\n\t\t['Maka', 'Makasar'],\n\t\t['Mand', 'Mandaic'],\n\t\t['Mani', 'Manichaean'],\n\t\t['Marc', 'Marchen'],\n\t\t['Medf', 'Medefaidrin'],\n\t\t['Mend', 'Mende_Kikakui'],\n\t\t['Merc', 'Meroitic_Cursive'],\n\t\t['Mero', 'Meroitic_Hieroglyphs'],\n\t\t['Mlym', 'Malayalam'],\n\t\t['Modi', 'Modi'],\n\t\t['Mong', 'Mongolian'],\n\t\t['Mroo', 'Mro'],\n\t\t['Mtei', 'Meetei_Mayek'],\n\t\t['Mult', 'Multani'],\n\t\t['Mymr', 'Myanmar'],\n\t\t['Nagm', 'Nag_Mundari'],\n\t\t['Nand', 'Nandinagari'],\n\t\t['Narb', 'Old_North_Arabian'],\n\t\t['Nbat', 'Nabataean'],\n\t\t['Newa', 'Newa'],\n\t\t['Nkoo', 'Nko'],\n\t\t['Nshu', 'Nushu'],\n\t\t['Ogam', 'Ogham'],\n\t\t['Olck', 'Ol_Chiki'],\n\t\t['Orkh', 'Old_Turkic'],\n\t\t['Orya', 'Oriya'],\n\t\t['Osge', 'Osage'],\n\t\t['Osma', 'Osmanya'],\n\t\t['Ougr', 'Old_Uyghur'],\n\t\t['Palm', 'Palmyrene'],\n\t\t['Pauc', 'Pau_Cin_Hau'],\n\t\t['Perm', 'Old_Permic'],\n\t\t['Phag', 'Phags_Pa'],\n\t\t['Phli', 'Inscriptional_Pahlavi'],\n\t\t['Phlp', 'Psalter_Pahlavi'],\n\t\t['Phnx', 'Phoenician'],\n\t\t['Plrd', 'Miao'],\n\t\t['Prti', 'Inscriptional_Parthian'],\n\t\t['Rjng', 'Rejang'],\n\t\t['Rohg', 'Hanifi_Rohingya'],\n\t\t['Runr', 'Runic'],\n\t\t['Samr', 'Samaritan'],\n\t\t['Sarb', 'Old_South_Arabian'],\n\t\t['Saur', 'Saurashtra'],\n\t\t['Sgnw', 'SignWriting'],\n\t\t['Shaw', 'Shavian'],\n\t\t['Shrd', 'Sharada'],\n\t\t['Sidd', 'Siddham'],\n\t\t['Sind', 'Khudawadi'],\n\t\t['Sinh', 'Sinhala'],\n\t\t['Sogd', 'Sogdian'],\n\t\t['Sogo', 'Old_Sogdian'],\n\t\t['Sora', 'Sora_Sompeng'],\n\t\t['Soyo', 'Soyombo'],\n\t\t['Sund', 'Sundanese'],\n\t\t['Sylo', 'Syloti_Nagri'],\n\t\t['Syrc', 'Syriac'],\n\t\t['Tagb', 'Tagbanwa'],\n\t\t['Takr', 'Takri'],\n\t\t['Tale', 'Tai_Le'],\n\t\t['Talu', 'New_Tai_Lue'],\n\t\t['Taml', 'Tamil'],\n\t\t['Tang', 'Tangut'],\n\t\t['Tavt', 'Tai_Viet'],\n\t\t['Telu', 'Telugu'],\n\t\t['Tfng', 'Tifinagh'],\n\t\t['Tglg', 'Tagalog'],\n\t\t['Thaa', 'Thaana'],\n\t\t['Thai', 'Thai'],\n\t\t['Tibt', 'Tibetan'],\n\t\t['Tirh', 'Tirhuta'],\n\t\t['Tnsa', 'Tangsa'],\n\t\t['Toto', 'Toto'],\n\t\t['Ugar', 'Ugaritic'],\n\t\t['Vaii', 'Vai'],\n\t\t['Vith', 'Vithkuqi'],\n\t\t['Wara', 'Warang_Citi'],\n\t\t['Wcho', 'Wancho'],\n\t\t['Xpeo', 'Old_Persian'],\n\t\t['Xsux', 'Cuneiform'],\n\t\t['Yezi', 'Yezidi'],\n\t\t['Yiii', 'Yi'],\n\t\t['Zanb', 'Zanabazar_Square'],\n\t\t['Zinh', 'Inherited'],\n\t\t['Qaai', 'Inherited'],\n\t\t['Zyyy', 'Common'],\n\t\t['Zzzz', 'Unknown'],\n\t\t['Adlam', 'Adlam'],\n\t\t['Caucasian_Albanian', 'Caucasian_Albanian'],\n\t\t['Arabic', 'Arabic'],\n\t\t['Imperial_Aramaic', 'Imperial_Aramaic'],\n\t\t['Armenian', 'Armenian'],\n\t\t['Avestan', 'Avestan'],\n\t\t['Balinese', 'Balinese'],\n\t\t['Bamum', 'Bamum'],\n\t\t['Bassa_Vah', 'Bassa_Vah'],\n\t\t['Batak', 'Batak'],\n\t\t['Bengali', 'Bengali'],\n\t\t['Bhaiksuki', 'Bhaiksuki'],\n\t\t['Bopomofo', 'Bopomofo'],\n\t\t['Brahmi', 'Brahmi'],\n\t\t['Braille', 'Braille'],\n\t\t['Buginese', 'Buginese'],\n\t\t['Buhid', 'Buhid'],\n\t\t['Chakma', 'Chakma'],\n\t\t['Canadian_Aboriginal', 'Canadian_Aboriginal'],\n\t\t['Carian', 'Carian'],\n\t\t['Cherokee', 'Cherokee'],\n\t\t['Chorasmian', 'Chorasmian'],\n\t\t['Coptic', 'Coptic'],\n\t\t['Cypro_Minoan', 'Cypro_Minoan'],\n\t\t['Cypriot', 'Cypriot'],\n\t\t['Cyrillic', 'Cyrillic'],\n\t\t['Devanagari', 'Devanagari'],\n\t\t['Dives_Akuru', 'Dives_Akuru'],\n\t\t['Dogra', 'Dogra'],\n\t\t['Deseret', 'Deseret'],\n\t\t['Duployan', 'Duployan'],\n\t\t['Egyptian_Hieroglyphs', 'Egyptian_Hieroglyphs'],\n\t\t['Elbasan', 'Elbasan'],\n\t\t['Elymaic', 'Elymaic'],\n\t\t['Ethiopic', 'Ethiopic'],\n\t\t['Georgian', 'Georgian'],\n\t\t['Glagolitic', 'Glagolitic'],\n\t\t['Gunjala_Gondi', 'Gunjala_Gondi'],\n\t\t['Masaram_Gondi', 'Masaram_Gondi'],\n\t\t['Gothic', 'Gothic'],\n\t\t['Grantha', 'Grantha'],\n\t\t['Greek', 'Greek'],\n\t\t['Gujarati', 'Gujarati'],\n\t\t['Gurmukhi', 'Gurmukhi'],\n\t\t['Hangul', 'Hangul'],\n\t\t['Han', 'Han'],\n\t\t['Hanunoo', 'Hanunoo'],\n\t\t['Hatran', 'Hatran'],\n\t\t['Hebrew', 'Hebrew'],\n\t\t['Hiragana', 'Hiragana'],\n\t\t['Anatolian_Hieroglyphs', 'Anatolian_Hieroglyphs'],\n\t\t['Pahawh_Hmong', 'Pahawh_Hmong'],\n\t\t['Nyiakeng_Puachue_Hmong', 'Nyiakeng_Puachue_Hmong'],\n\t\t['Katakana_Or_Hiragana', 'Katakana_Or_Hiragana'],\n\t\t['Old_Hungarian', 'Old_Hungarian'],\n\t\t['Old_Italic', 'Old_Italic'],\n\t\t['Javanese', 'Javanese'],\n\t\t['Kayah_Li', 'Kayah_Li'],\n\t\t['Katakana', 'Katakana'],\n\t\t['Kharoshthi', 'Kharoshthi'],\n\t\t['Khmer', 'Khmer'],\n\t\t['Khojki', 'Khojki'],\n\t\t['Khitan_Small_Script', 'Khitan_Small_Script'],\n\t\t['Kannada', 'Kannada'],\n\t\t['Kaithi', 'Kaithi'],\n\t\t['Tai_Tham', 'Tai_Tham'],\n\t\t['Lao', 'Lao'],\n\t\t['Latin', 'Latin'],\n\t\t['Lepcha', 'Lepcha'],\n\t\t['Limbu', 'Limbu'],\n\t\t['Linear_A', 'Linear_A'],\n\t\t['Linear_B', 'Linear_B'],\n\t\t['Lycian', 'Lycian'],\n\t\t['Lydian', 'Lydian'],\n\t\t['Mahajani', 'Mahajani'],\n\t\t['Makasar', 'Makasar'],\n\t\t['Mandaic', 'Mandaic'],\n\t\t['Manichaean', 'Manichaean'],\n\t\t['Marchen', 'Marchen'],\n\t\t['Medefaidrin', 'Medefaidrin'],\n\t\t['Mende_Kikakui', 'Mende_Kikakui'],\n\t\t['Meroitic_Cursive', 'Meroitic_Cursive'],\n\t\t['Meroitic_Hieroglyphs', 'Meroitic_Hieroglyphs'],\n\t\t['Malayalam', 'Malayalam'],\n\t\t['Mongolian', 'Mongolian'],\n\t\t['Mro', 'Mro'],\n\t\t['Meetei_Mayek', 'Meetei_Mayek'],\n\t\t['Multani', 'Multani'],\n\t\t['Myanmar', 'Myanmar'],\n\t\t['Nag_Mundari', 'Nag_Mundari'],\n\t\t['Nandinagari', 'Nandinagari'],\n\t\t['Old_North_Arabian', 'Old_North_Arabian'],\n\t\t['Nabataean', 'Nabataean'],\n\t\t['Nko', 'Nko'],\n\t\t['Nushu', 'Nushu'],\n\t\t['Ogham', 'Ogham'],\n\t\t['Ol_Chiki', 'Ol_Chiki'],\n\t\t['Old_Turkic', 'Old_Turkic'],\n\t\t['Oriya', 'Oriya'],\n\t\t['Osage', 'Osage'],\n\t\t['Osmanya', 'Osmanya'],\n\t\t['Old_Uyghur', 'Old_Uyghur'],\n\t\t['Palmyrene', 'Palmyrene'],\n\t\t['Pau_Cin_Hau', 'Pau_Cin_Hau'],\n\t\t['Old_Permic', 'Old_Permic'],\n\t\t['Phags_Pa', 'Phags_Pa'],\n\t\t['Inscriptional_Pahlavi', 'Inscriptional_Pahlavi'],\n\t\t['Psalter_Pahlavi', 'Psalter_Pahlavi'],\n\t\t['Phoenician', 'Phoenician'],\n\t\t['Miao', 'Miao'],\n\t\t['Inscriptional_Parthian', 'Inscriptional_Parthian'],\n\t\t['Rejang', 'Rejang'],\n\t\t['Hanifi_Rohingya', 'Hanifi_Rohingya'],\n\t\t['Runic', 'Runic'],\n\t\t['Samaritan', 'Samaritan'],\n\t\t['Old_South_Arabian', 'Old_South_Arabian'],\n\t\t['Saurashtra', 'Saurashtra'],\n\t\t['SignWriting', 'SignWriting'],\n\t\t['Shavian', 'Shavian'],\n\t\t['Sharada', 'Sharada'],\n\t\t['Siddham', 'Siddham'],\n\t\t['Khudawadi', 'Khudawadi'],\n\t\t['Sinhala', 'Sinhala'],\n\t\t['Sogdian', 'Sogdian'],\n\t\t['Old_Sogdian', 'Old_Sogdian'],\n\t\t['Sora_Sompeng', 'Sora_Sompeng'],\n\t\t['Soyombo', 'Soyombo'],\n\t\t['Sundanese', 'Sundanese'],\n\t\t['Syloti_Nagri', 'Syloti_Nagri'],\n\t\t['Syriac', 'Syriac'],\n\t\t['Tagbanwa', 'Tagbanwa'],\n\t\t['Takri', 'Takri'],\n\t\t['Tai_Le', 'Tai_Le'],\n\t\t['New_Tai_Lue', 'New_Tai_Lue'],\n\t\t['Tamil', 'Tamil'],\n\t\t['Tangut', 'Tangut'],\n\t\t['Tai_Viet', 'Tai_Viet'],\n\t\t['Telugu', 'Telugu'],\n\t\t['Tifinagh', 'Tifinagh'],\n\t\t['Tagalog', 'Tagalog'],\n\t\t['Thaana', 'Thaana'],\n\t\t['Tibetan', 'Tibetan'],\n\t\t['Tirhuta', 'Tirhuta'],\n\t\t['Tangsa', 'Tangsa'],\n\t\t['Ugaritic', 'Ugaritic'],\n\t\t['Vai', 'Vai'],\n\t\t['Vithkuqi', 'Vithkuqi'],\n\t\t['Warang_Citi', 'Warang_Citi'],\n\t\t['Wancho', 'Wancho'],\n\t\t['Old_Persian', 'Old_Persian'],\n\t\t['Cuneiform', 'Cuneiform'],\n\t\t['Yezidi', 'Yezidi'],\n\t\t['Yi', 'Yi'],\n\t\t['Zanabazar_Square', 'Zanabazar_Square'],\n\t\t['Inherited', 'Inherited'],\n\t\t['Common', 'Common'],\n\t\t['Unknown', 'Unknown']\n\t])],\n\t['Script_Extensions', new Map([\n\t\t['Adlm', 'Adlam'],\n\t\t['Aghb', 'Caucasian_Albanian'],\n\t\t['Ahom', 'Ahom'],\n\t\t['Arab', 'Arabic'],\n\t\t['Armi', 'Imperial_Aramaic'],\n\t\t['Armn', 'Armenian'],\n\t\t['Avst', 'Avestan'],\n\t\t['Bali', 'Balinese'],\n\t\t['Bamu', 'Bamum'],\n\t\t['Bass', 'Bassa_Vah'],\n\t\t['Batk', 'Batak'],\n\t\t['Beng', 'Bengali'],\n\t\t['Bhks', 'Bhaiksuki'],\n\t\t['Bopo', 'Bopomofo'],\n\t\t['Brah', 'Brahmi'],\n\t\t['Brai', 'Braille'],\n\t\t['Bugi', 'Buginese'],\n\t\t['Buhd', 'Buhid'],\n\t\t['Cakm', 'Chakma'],\n\t\t['Cans', 'Canadian_Aboriginal'],\n\t\t['Cari', 'Carian'],\n\t\t['Cham', 'Cham'],\n\t\t['Cher', 'Cherokee'],\n\t\t['Chrs', 'Chorasmian'],\n\t\t['Copt', 'Coptic'],\n\t\t['Qaac', 'Coptic'],\n\t\t['Cpmn', 'Cypro_Minoan'],\n\t\t['Cprt', 'Cypriot'],\n\t\t['Cyrl', 'Cyrillic'],\n\t\t['Deva', 'Devanagari'],\n\t\t['Diak', 'Dives_Akuru'],\n\t\t['Dogr', 'Dogra'],\n\t\t['Dsrt', 'Deseret'],\n\t\t['Dupl', 'Duployan'],\n\t\t['Egyp', 'Egyptian_Hieroglyphs'],\n\t\t['Elba', 'Elbasan'],\n\t\t['Elym', 'Elymaic'],\n\t\t['Ethi', 'Ethiopic'],\n\t\t['Geor', 'Georgian'],\n\t\t['Glag', 'Glagolitic'],\n\t\t['Gong', 'Gunjala_Gondi'],\n\t\t['Gonm', 'Masaram_Gondi'],\n\t\t['Goth', 'Gothic'],\n\t\t['Gran', 'Grantha'],\n\t\t['Grek', 'Greek'],\n\t\t['Gujr', 'Gujarati'],\n\t\t['Guru', 'Gurmukhi'],\n\t\t['Hang', 'Hangul'],\n\t\t['Hani', 'Han'],\n\t\t['Hano', 'Hanunoo'],\n\t\t['Hatr', 'Hatran'],\n\t\t['Hebr', 'Hebrew'],\n\t\t['Hira', 'Hiragana'],\n\t\t['Hluw', 'Anatolian_Hieroglyphs'],\n\t\t['Hmng', 'Pahawh_Hmong'],\n\t\t['Hmnp', 'Nyiakeng_Puachue_Hmong'],\n\t\t['Hrkt', 'Katakana_Or_Hiragana'],\n\t\t['Hung', 'Old_Hungarian'],\n\t\t['Ital', 'Old_Italic'],\n\t\t['Java', 'Javanese'],\n\t\t['Kali', 'Kayah_Li'],\n\t\t['Kana', 'Katakana'],\n\t\t['Kawi', 'Kawi'],\n\t\t['Khar', 'Kharoshthi'],\n\t\t['Khmr', 'Khmer'],\n\t\t['Khoj', 'Khojki'],\n\t\t['Kits', 'Khitan_Small_Script'],\n\t\t['Knda', 'Kannada'],\n\t\t['Kthi', 'Kaithi'],\n\t\t['Lana', 'Tai_Tham'],\n\t\t['Laoo', 'Lao'],\n\t\t['Latn', 'Latin'],\n\t\t['Lepc', 'Lepcha'],\n\t\t['Limb', 'Limbu'],\n\t\t['Lina', 'Linear_A'],\n\t\t['Linb', 'Linear_B'],\n\t\t['Lisu', 'Lisu'],\n\t\t['Lyci', 'Lycian'],\n\t\t['Lydi', 'Lydian'],\n\t\t['Mahj', 'Mahajani'],\n\t\t['Maka', 'Makasar'],\n\t\t['Mand', 'Mandaic'],\n\t\t['Mani', 'Manichaean'],\n\t\t['Marc', 'Marchen'],\n\t\t['Medf', 'Medefaidrin'],\n\t\t['Mend', 'Mende_Kikakui'],\n\t\t['Merc', 'Meroitic_Cursive'],\n\t\t['Mero', 'Meroitic_Hieroglyphs'],\n\t\t['Mlym', 'Malayalam'],\n\t\t['Modi', 'Modi'],\n\t\t['Mong', 'Mongolian'],\n\t\t['Mroo', 'Mro'],\n\t\t['Mtei', 'Meetei_Mayek'],\n\t\t['Mult', 'Multani'],\n\t\t['Mymr', 'Myanmar'],\n\t\t['Nagm', 'Nag_Mundari'],\n\t\t['Nand', 'Nandinagari'],\n\t\t['Narb', 'Old_North_Arabian'],\n\t\t['Nbat', 'Nabataean'],\n\t\t['Newa', 'Newa'],\n\t\t['Nkoo', 'Nko'],\n\t\t['Nshu', 'Nushu'],\n\t\t['Ogam', 'Ogham'],\n\t\t['Olck', 'Ol_Chiki'],\n\t\t['Orkh', 'Old_Turkic'],\n\t\t['Orya', 'Oriya'],\n\t\t['Osge', 'Osage'],\n\t\t['Osma', 'Osmanya'],\n\t\t['Ougr', 'Old_Uyghur'],\n\t\t['Palm', 'Palmyrene'],\n\t\t['Pauc', 'Pau_Cin_Hau'],\n\t\t['Perm', 'Old_Permic'],\n\t\t['Phag', 'Phags_Pa'],\n\t\t['Phli', 'Inscriptional_Pahlavi'],\n\t\t['Phlp', 'Psalter_Pahlavi'],\n\t\t['Phnx', 'Phoenician'],\n\t\t['Plrd', 'Miao'],\n\t\t['Prti', 'Inscriptional_Parthian'],\n\t\t['Rjng', 'Rejang'],\n\t\t['Rohg', 'Hanifi_Rohingya'],\n\t\t['Runr', 'Runic'],\n\t\t['Samr', 'Samaritan'],\n\t\t['Sarb', 'Old_South_Arabian'],\n\t\t['Saur', 'Saurashtra'],\n\t\t['Sgnw', 'SignWriting'],\n\t\t['Shaw', 'Shavian'],\n\t\t['Shrd', 'Sharada'],\n\t\t['Sidd', 'Siddham'],\n\t\t['Sind', 'Khudawadi'],\n\t\t['Sinh', 'Sinhala'],\n\t\t['Sogd', 'Sogdian'],\n\t\t['Sogo', 'Old_Sogdian'],\n\t\t['Sora', 'Sora_Sompeng'],\n\t\t['Soyo', 'Soyombo'],\n\t\t['Sund', 'Sundanese'],\n\t\t['Sylo', 'Syloti_Nagri'],\n\t\t['Syrc', 'Syriac'],\n\t\t['Tagb', 'Tagbanwa'],\n\t\t['Takr', 'Takri'],\n\t\t['Tale', 'Tai_Le'],\n\t\t['Talu', 'New_Tai_Lue'],\n\t\t['Taml', 'Tamil'],\n\t\t['Tang', 'Tangut'],\n\t\t['Tavt', 'Tai_Viet'],\n\t\t['Telu', 'Telugu'],\n\t\t['Tfng', 'Tifinagh'],\n\t\t['Tglg', 'Tagalog'],\n\t\t['Thaa', 'Thaana'],\n\t\t['Thai', 'Thai'],\n\t\t['Tibt', 'Tibetan'],\n\t\t['Tirh', 'Tirhuta'],\n\t\t['Tnsa', 'Tangsa'],\n\t\t['Toto', 'Toto'],\n\t\t['Ugar', 'Ugaritic'],\n\t\t['Vaii', 'Vai'],\n\t\t['Vith', 'Vithkuqi'],\n\t\t['Wara', 'Warang_Citi'],\n\t\t['Wcho', 'Wancho'],\n\t\t['Xpeo', 'Old_Persian'],\n\t\t['Xsux', 'Cuneiform'],\n\t\t['Yezi', 'Yezidi'],\n\t\t['Yiii', 'Yi'],\n\t\t['Zanb', 'Zanabazar_Square'],\n\t\t['Zinh', 'Inherited'],\n\t\t['Qaai', 'Inherited'],\n\t\t['Zyyy', 'Common'],\n\t\t['Zzzz', 'Unknown'],\n\t\t['Adlam', 'Adlam'],\n\t\t['Caucasian_Albanian', 'Caucasian_Albanian'],\n\t\t['Arabic', 'Arabic'],\n\t\t['Imperial_Aramaic', 'Imperial_Aramaic'],\n\t\t['Armenian', 'Armenian'],\n\t\t['Avestan', 'Avestan'],\n\t\t['Balinese', 'Balinese'],\n\t\t['Bamum', 'Bamum'],\n\t\t['Bassa_Vah', 'Bassa_Vah'],\n\t\t['Batak', 'Batak'],\n\t\t['Bengali', 'Bengali'],\n\t\t['Bhaiksuki', 'Bhaiksuki'],\n\t\t['Bopomofo', 'Bopomofo'],\n\t\t['Brahmi', 'Brahmi'],\n\t\t['Braille', 'Braille'],\n\t\t['Buginese', 'Buginese'],\n\t\t['Buhid', 'Buhid'],\n\t\t['Chakma', 'Chakma'],\n\t\t['Canadian_Aboriginal', 'Canadian_Aboriginal'],\n\t\t['Carian', 'Carian'],\n\t\t['Cherokee', 'Cherokee'],\n\t\t['Chorasmian', 'Chorasmian'],\n\t\t['Coptic', 'Coptic'],\n\t\t['Cypro_Minoan', 'Cypro_Minoan'],\n\t\t['Cypriot', 'Cypriot'],\n\t\t['Cyrillic', 'Cyrillic'],\n\t\t['Devanagari', 'Devanagari'],\n\t\t['Dives_Akuru', 'Dives_Akuru'],\n\t\t['Dogra', 'Dogra'],\n\t\t['Deseret', 'Deseret'],\n\t\t['Duployan', 'Duployan'],\n\t\t['Egyptian_Hieroglyphs', 'Egyptian_Hieroglyphs'],\n\t\t['Elbasan', 'Elbasan'],\n\t\t['Elymaic', 'Elymaic'],\n\t\t['Ethiopic', 'Ethiopic'],\n\t\t['Georgian', 'Georgian'],\n\t\t['Glagolitic', 'Glagolitic'],\n\t\t['Gunjala_Gondi', 'Gunjala_Gondi'],\n\t\t['Masaram_Gondi', 'Masaram_Gondi'],\n\t\t['Gothic', 'Gothic'],\n\t\t['Grantha', 'Grantha'],\n\t\t['Greek', 'Greek'],\n\t\t['Gujarati', 'Gujarati'],\n\t\t['Gurmukhi', 'Gurmukhi'],\n\t\t['Hangul', 'Hangul'],\n\t\t['Han', 'Han'],\n\t\t['Hanunoo', 'Hanunoo'],\n\t\t['Hatran', 'Hatran'],\n\t\t['Hebrew', 'Hebrew'],\n\t\t['Hiragana', 'Hiragana'],\n\t\t['Anatolian_Hieroglyphs', 'Anatolian_Hieroglyphs'],\n\t\t['Pahawh_Hmong', 'Pahawh_Hmong'],\n\t\t['Nyiakeng_Puachue_Hmong', 'Nyiakeng_Puachue_Hmong'],\n\t\t['Katakana_Or_Hiragana', 'Katakana_Or_Hiragana'],\n\t\t['Old_Hungarian', 'Old_Hungarian'],\n\t\t['Old_Italic', 'Old_Italic'],\n\t\t['Javanese', 'Javanese'],\n\t\t['Kayah_Li', 'Kayah_Li'],\n\t\t['Katakana', 'Katakana'],\n\t\t['Kharoshthi', 'Kharoshthi'],\n\t\t['Khmer', 'Khmer'],\n\t\t['Khojki', 'Khojki'],\n\t\t['Khitan_Small_Script', 'Khitan_Small_Script'],\n\t\t['Kannada', 'Kannada'],\n\t\t['Kaithi', 'Kaithi'],\n\t\t['Tai_Tham', 'Tai_Tham'],\n\t\t['Lao', 'Lao'],\n\t\t['Latin', 'Latin'],\n\t\t['Lepcha', 'Lepcha'],\n\t\t['Limbu', 'Limbu'],\n\t\t['Linear_A', 'Linear_A'],\n\t\t['Linear_B', 'Linear_B'],\n\t\t['Lycian', 'Lycian'],\n\t\t['Lydian', 'Lydian'],\n\t\t['Mahajani', 'Mahajani'],\n\t\t['Makasar', 'Makasar'],\n\t\t['Mandaic', 'Mandaic'],\n\t\t['Manichaean', 'Manichaean'],\n\t\t['Marchen', 'Marchen'],\n\t\t['Medefaidrin', 'Medefaidrin'],\n\t\t['Mende_Kikakui', 'Mende_Kikakui'],\n\t\t['Meroitic_Cursive', 'Meroitic_Cursive'],\n\t\t['Meroitic_Hieroglyphs', 'Meroitic_Hieroglyphs'],\n\t\t['Malayalam', 'Malayalam'],\n\t\t['Mongolian', 'Mongolian'],\n\t\t['Mro', 'Mro'],\n\t\t['Meetei_Mayek', 'Meetei_Mayek'],\n\t\t['Multani', 'Multani'],\n\t\t['Myanmar', 'Myanmar'],\n\t\t['Nag_Mundari', 'Nag_Mundari'],\n\t\t['Nandinagari', 'Nandinagari'],\n\t\t['Old_North_Arabian', 'Old_North_Arabian'],\n\t\t['Nabataean', 'Nabataean'],\n\t\t['Nko', 'Nko'],\n\t\t['Nushu', 'Nushu'],\n\t\t['Ogham', 'Ogham'],\n\t\t['Ol_Chiki', 'Ol_Chiki'],\n\t\t['Old_Turkic', 'Old_Turkic'],\n\t\t['Oriya', 'Oriya'],\n\t\t['Osage', 'Osage'],\n\t\t['Osmanya', 'Osmanya'],\n\t\t['Old_Uyghur', 'Old_Uyghur'],\n\t\t['Palmyrene', 'Palmyrene'],\n\t\t['Pau_Cin_Hau', 'Pau_Cin_Hau'],\n\t\t['Old_Permic', 'Old_Permic'],\n\t\t['Phags_Pa', 'Phags_Pa'],\n\t\t['Inscriptional_Pahlavi', 'Inscriptional_Pahlavi'],\n\t\t['Psalter_Pahlavi', 'Psalter_Pahlavi'],\n\t\t['Phoenician', 'Phoenician'],\n\t\t['Miao', 'Miao'],\n\t\t['Inscriptional_Parthian', 'Inscriptional_Parthian'],\n\t\t['Rejang', 'Rejang'],\n\t\t['Hanifi_Rohingya', 'Hanifi_Rohingya'],\n\t\t['Runic', 'Runic'],\n\t\t['Samaritan', 'Samaritan'],\n\t\t['Old_South_Arabian', 'Old_South_Arabian'],\n\t\t['Saurashtra', 'Saurashtra'],\n\t\t['SignWriting', 'SignWriting'],\n\t\t['Shavian', 'Shavian'],\n\t\t['Sharada', 'Sharada'],\n\t\t['Siddham', 'Siddham'],\n\t\t['Khudawadi', 'Khudawadi'],\n\t\t['Sinhala', 'Sinhala'],\n\t\t['Sogdian', 'Sogdian'],\n\t\t['Old_Sogdian', 'Old_Sogdian'],\n\t\t['Sora_Sompeng', 'Sora_Sompeng'],\n\t\t['Soyombo', 'Soyombo'],\n\t\t['Sundanese', 'Sundanese'],\n\t\t['Syloti_Nagri', 'Syloti_Nagri'],\n\t\t['Syriac', 'Syriac'],\n\t\t['Tagbanwa', 'Tagbanwa'],\n\t\t['Takri', 'Takri'],\n\t\t['Tai_Le', 'Tai_Le'],\n\t\t['New_Tai_Lue', 'New_Tai_Lue'],\n\t\t['Tamil', 'Tamil'],\n\t\t['Tangut', 'Tangut'],\n\t\t['Tai_Viet', 'Tai_Viet'],\n\t\t['Telugu', 'Telugu'],\n\t\t['Tifinagh', 'Tifinagh'],\n\t\t['Tagalog', 'Tagalog'],\n\t\t['Thaana', 'Thaana'],\n\t\t['Tibetan', 'Tibetan'],\n\t\t['Tirhuta', 'Tirhuta'],\n\t\t['Tangsa', 'Tangsa'],\n\t\t['Ugaritic', 'Ugaritic'],\n\t\t['Vai', 'Vai'],\n\t\t['Vithkuqi', 'Vithkuqi'],\n\t\t['Warang_Citi', 'Warang_Citi'],\n\t\t['Wancho', 'Wancho'],\n\t\t['Old_Persian', 'Old_Persian'],\n\t\t['Cuneiform', 'Cuneiform'],\n\t\t['Yezidi', 'Yezidi'],\n\t\t['Yi', 'Yi'],\n\t\t['Zanabazar_Square', 'Zanabazar_Square'],\n\t\t['Inherited', 'Inherited'],\n\t\t['Common', 'Common'],\n\t\t['Unknown', 'Unknown']\n\t])]\n]);\n","module.exports = new Map([\n\t[0x4B, 0x212A],\n\t[0x53, 0x17F],\n\t[0x6B, 0x212A],\n\t[0x73, 0x17F],\n\t[0xB5, 0x39C],\n\t[0xC5, 0x212B],\n\t[0xDF, 0x1E9E],\n\t[0xE5, 0x212B],\n\t[0x17F, 0x53],\n\t[0x1C4, 0x1C5],\n\t[0x1C5, 0x1C4],\n\t[0x1C7, 0x1C8],\n\t[0x1C8, 0x1C7],\n\t[0x1CA, 0x1CB],\n\t[0x1CB, 0x1CA],\n\t[0x1F1, 0x1F2],\n\t[0x1F2, 0x1F1],\n\t[0x345, 0x1FBE],\n\t[0x392, 0x3D0],\n\t[0x395, 0x3F5],\n\t[0x398, 0x3F4],\n\t[0x399, 0x1FBE],\n\t[0x39A, 0x3F0],\n\t[0x39C, 0xB5],\n\t[0x3A0, 0x3D6],\n\t[0x3A1, 0x3F1],\n\t[0x3A3, 0x3C2],\n\t[0x3A6, 0x3D5],\n\t[0x3A9, 0x2126],\n\t[0x3B8, 0x3F4],\n\t[0x3C2, 0x3A3],\n\t[0x3C9, 0x2126],\n\t[0x3D0, 0x392],\n\t[0x3D1, 0x3F4],\n\t[0x3D5, 0x3A6],\n\t[0x3D6, 0x3A0],\n\t[0x3F0, 0x39A],\n\t[0x3F1, 0x3A1],\n\t[0x3F4, [\n\t\t0x398,\n\t\t0x3D1,\n\t\t0x3B8\n\t]],\n\t[0x3F5, 0x395],\n\t[0x412, 0x1C80],\n\t[0x414, 0x1C81],\n\t[0x41E, 0x1C82],\n\t[0x421, 0x1C83],\n\t[0x422, 0x1C85],\n\t[0x42A, 0x1C86],\n\t[0x462, 0x1C87],\n\t[0x1C80, 0x412],\n\t[0x1C81, 0x414],\n\t[0x1C82, 0x41E],\n\t[0x1C83, 0x421],\n\t[0x1C84, 0x1C85],\n\t[0x1C85, [\n\t\t0x422,\n\t\t0x1C84\n\t]],\n\t[0x1C86, 0x42A],\n\t[0x1C87, 0x462],\n\t[0x1C88, 0xA64A],\n\t[0x1E60, 0x1E9B],\n\t[0x1E9B, 0x1E60],\n\t[0x1E9E, 0xDF],\n\t[0x1F80, 0x1F88],\n\t[0x1F81, 0x1F89],\n\t[0x1F82, 0x1F8A],\n\t[0x1F83, 0x1F8B],\n\t[0x1F84, 0x1F8C],\n\t[0x1F85, 0x1F8D],\n\t[0x1F86, 0x1F8E],\n\t[0x1F87, 0x1F8F],\n\t[0x1F88, 0x1F80],\n\t[0x1F89, 0x1F81],\n\t[0x1F8A, 0x1F82],\n\t[0x1F8B, 0x1F83],\n\t[0x1F8C, 0x1F84],\n\t[0x1F8D, 0x1F85],\n\t[0x1F8E, 0x1F86],\n\t[0x1F8F, 0x1F87],\n\t[0x1F90, 0x1F98],\n\t[0x1F91, 0x1F99],\n\t[0x1F92, 0x1F9A],\n\t[0x1F93, 0x1F9B],\n\t[0x1F94, 0x1F9C],\n\t[0x1F95, 0x1F9D],\n\t[0x1F96, 0x1F9E],\n\t[0x1F97, 0x1F9F],\n\t[0x1F98, 0x1F90],\n\t[0x1F99, 0x1F91],\n\t[0x1F9A, 0x1F92],\n\t[0x1F9B, 0x1F93],\n\t[0x1F9C, 0x1F94],\n\t[0x1F9D, 0x1F95],\n\t[0x1F9E, 0x1F96],\n\t[0x1F9F, 0x1F97],\n\t[0x1FA0, 0x1FA8],\n\t[0x1FA1, 0x1FA9],\n\t[0x1FA2, 0x1FAA],\n\t[0x1FA3, 0x1FAB],\n\t[0x1FA4, 0x1FAC],\n\t[0x1FA5, 0x1FAD],\n\t[0x1FA6, 0x1FAE],\n\t[0x1FA7, 0x1FAF],\n\t[0x1FA8, 0x1FA0],\n\t[0x1FA9, 0x1FA1],\n\t[0x1FAA, 0x1FA2],\n\t[0x1FAB, 0x1FA3],\n\t[0x1FAC, 0x1FA4],\n\t[0x1FAD, 0x1FA5],\n\t[0x1FAE, 0x1FA6],\n\t[0x1FAF, 0x1FA7],\n\t[0x1FB3, 0x1FBC],\n\t[0x1FBC, 0x1FB3],\n\t[0x1FBE, [\n\t\t0x345,\n\t\t0x399\n\t]],\n\t[0x1FC3, 0x1FCC],\n\t[0x1FCC, 0x1FC3],\n\t[0x1FF3, 0x1FFC],\n\t[0x1FFC, 0x1FF3],\n\t[0x2126, [\n\t\t0x3A9,\n\t\t0x3C9\n\t]],\n\t[0x212A, 0x4B],\n\t[0x212B, [\n\t\t0xC5,\n\t\t0xE5\n\t]],\n\t[0xA64A, 0x1C88],\n\t[0x10400, 0x10428],\n\t[0x10401, 0x10429],\n\t[0x10402, 0x1042A],\n\t[0x10403, 0x1042B],\n\t[0x10404, 0x1042C],\n\t[0x10405, 0x1042D],\n\t[0x10406, 0x1042E],\n\t[0x10407, 0x1042F],\n\t[0x10408, 0x10430],\n\t[0x10409, 0x10431],\n\t[0x1040A, 0x10432],\n\t[0x1040B, 0x10433],\n\t[0x1040C, 0x10434],\n\t[0x1040D, 0x10435],\n\t[0x1040E, 0x10436],\n\t[0x1040F, 0x10437],\n\t[0x10410, 0x10438],\n\t[0x10411, 0x10439],\n\t[0x10412, 0x1043A],\n\t[0x10413, 0x1043B],\n\t[0x10414, 0x1043C],\n\t[0x10415, 0x1043D],\n\t[0x10416, 0x1043E],\n\t[0x10417, 0x1043F],\n\t[0x10418, 0x10440],\n\t[0x10419, 0x10441],\n\t[0x1041A, 0x10442],\n\t[0x1041B, 0x10443],\n\t[0x1041C, 0x10444],\n\t[0x1041D, 0x10445],\n\t[0x1041E, 0x10446],\n\t[0x1041F, 0x10447],\n\t[0x10420, 0x10448],\n\t[0x10421, 0x10449],\n\t[0x10422, 0x1044A],\n\t[0x10423, 0x1044B],\n\t[0x10424, 0x1044C],\n\t[0x10425, 0x1044D],\n\t[0x10426, 0x1044E],\n\t[0x10427, 0x1044F],\n\t[0x10428, 0x10400],\n\t[0x10429, 0x10401],\n\t[0x1042A, 0x10402],\n\t[0x1042B, 0x10403],\n\t[0x1042C, 0x10404],\n\t[0x1042D, 0x10405],\n\t[0x1042E, 0x10406],\n\t[0x1042F, 0x10407],\n\t[0x10430, 0x10408],\n\t[0x10431, 0x10409],\n\t[0x10432, 0x1040A],\n\t[0x10433, 0x1040B],\n\t[0x10434, 0x1040C],\n\t[0x10435, 0x1040D],\n\t[0x10436, 0x1040E],\n\t[0x10437, 0x1040F],\n\t[0x10438, 0x10410],\n\t[0x10439, 0x10411],\n\t[0x1043A, 0x10412],\n\t[0x1043B, 0x10413],\n\t[0x1043C, 0x10414],\n\t[0x1043D, 0x10415],\n\t[0x1043E, 0x10416],\n\t[0x1043F, 0x10417],\n\t[0x10440, 0x10418],\n\t[0x10441, 0x10419],\n\t[0x10442, 0x1041A],\n\t[0x10443, 0x1041B],\n\t[0x10444, 0x1041C],\n\t[0x10445, 0x1041D],\n\t[0x10446, 0x1041E],\n\t[0x10447, 0x1041F],\n\t[0x10448, 0x10420],\n\t[0x10449, 0x10421],\n\t[0x1044A, 0x10422],\n\t[0x1044B, 0x10423],\n\t[0x1044C, 0x10424],\n\t[0x1044D, 0x10425],\n\t[0x1044E, 0x10426],\n\t[0x1044F, 0x10427],\n\t[0x104B0, 0x104D8],\n\t[0x104B1, 0x104D9],\n\t[0x104B2, 0x104DA],\n\t[0x104B3, 0x104DB],\n\t[0x104B4, 0x104DC],\n\t[0x104B5, 0x104DD],\n\t[0x104B6, 0x104DE],\n\t[0x104B7, 0x104DF],\n\t[0x104B8, 0x104E0],\n\t[0x104B9, 0x104E1],\n\t[0x104BA, 0x104E2],\n\t[0x104BB, 0x104E3],\n\t[0x104BC, 0x104E4],\n\t[0x104BD, 0x104E5],\n\t[0x104BE, 0x104E6],\n\t[0x104BF, 0x104E7],\n\t[0x104C0, 0x104E8],\n\t[0x104C1, 0x104E9],\n\t[0x104C2, 0x104EA],\n\t[0x104C3, 0x104EB],\n\t[0x104C4, 0x104EC],\n\t[0x104C5, 0x104ED],\n\t[0x104C6, 0x104EE],\n\t[0x104C7, 0x104EF],\n\t[0x104C8, 0x104F0],\n\t[0x104C9, 0x104F1],\n\t[0x104CA, 0x104F2],\n\t[0x104CB, 0x104F3],\n\t[0x104CC, 0x104F4],\n\t[0x104CD, 0x104F5],\n\t[0x104CE, 0x104F6],\n\t[0x104CF, 0x104F7],\n\t[0x104D0, 0x104F8],\n\t[0x104D1, 0x104F9],\n\t[0x104D2, 0x104FA],\n\t[0x104D3, 0x104FB],\n\t[0x104D8, 0x104B0],\n\t[0x104D9, 0x104B1],\n\t[0x104DA, 0x104B2],\n\t[0x104DB, 0x104B3],\n\t[0x104DC, 0x104B4],\n\t[0x104DD, 0x104B5],\n\t[0x104DE, 0x104B6],\n\t[0x104DF, 0x104B7],\n\t[0x104E0, 0x104B8],\n\t[0x104E1, 0x104B9],\n\t[0x104E2, 0x104BA],\n\t[0x104E3, 0x104BB],\n\t[0x104E4, 0x104BC],\n\t[0x104E5, 0x104BD],\n\t[0x104E6, 0x104BE],\n\t[0x104E7, 0x104BF],\n\t[0x104E8, 0x104C0],\n\t[0x104E9, 0x104C1],\n\t[0x104EA, 0x104C2],\n\t[0x104EB, 0x104C3],\n\t[0x104EC, 0x104C4],\n\t[0x104ED, 0x104C5],\n\t[0x104EE, 0x104C6],\n\t[0x104EF, 0x104C7],\n\t[0x104F0, 0x104C8],\n\t[0x104F1, 0x104C9],\n\t[0x104F2, 0x104CA],\n\t[0x104F3, 0x104CB],\n\t[0x104F4, 0x104CC],\n\t[0x104F5, 0x104CD],\n\t[0x104F6, 0x104CE],\n\t[0x104F7, 0x104CF],\n\t[0x104F8, 0x104D0],\n\t[0x104F9, 0x104D1],\n\t[0x104FA, 0x104D2],\n\t[0x104FB, 0x104D3],\n\t[0x10570, 0x10597],\n\t[0x10571, 0x10598],\n\t[0x10572, 0x10599],\n\t[0x10573, 0x1059A],\n\t[0x10574, 0x1059B],\n\t[0x10575, 0x1059C],\n\t[0x10576, 0x1059D],\n\t[0x10577, 0x1059E],\n\t[0x10578, 0x1059F],\n\t[0x10579, 0x105A0],\n\t[0x1057A, 0x105A1],\n\t[0x1057C, 0x105A3],\n\t[0x1057D, 0x105A4],\n\t[0x1057E, 0x105A5],\n\t[0x1057F, 0x105A6],\n\t[0x10580, 0x105A7],\n\t[0x10581, 0x105A8],\n\t[0x10582, 0x105A9],\n\t[0x10583, 0x105AA],\n\t[0x10584, 0x105AB],\n\t[0x10585, 0x105AC],\n\t[0x10586, 0x105AD],\n\t[0x10587, 0x105AE],\n\t[0x10588, 0x105AF],\n\t[0x10589, 0x105B0],\n\t[0x1058A, 0x105B1],\n\t[0x1058C, 0x105B3],\n\t[0x1058D, 0x105B4],\n\t[0x1058E, 0x105B5],\n\t[0x1058F, 0x105B6],\n\t[0x10590, 0x105B7],\n\t[0x10591, 0x105B8],\n\t[0x10592, 0x105B9],\n\t[0x10594, 0x105BB],\n\t[0x10595, 0x105BC],\n\t[0x10597, 0x10570],\n\t[0x10598, 0x10571],\n\t[0x10599, 0x10572],\n\t[0x1059A, 0x10573],\n\t[0x1059B, 0x10574],\n\t[0x1059C, 0x10575],\n\t[0x1059D, 0x10576],\n\t[0x1059E, 0x10577],\n\t[0x1059F, 0x10578],\n\t[0x105A0, 0x10579],\n\t[0x105A1, 0x1057A],\n\t[0x105A3, 0x1057C],\n\t[0x105A4, 0x1057D],\n\t[0x105A5, 0x1057E],\n\t[0x105A6, 0x1057F],\n\t[0x105A7, 0x10580],\n\t[0x105A8, 0x10581],\n\t[0x105A9, 0x10582],\n\t[0x105AA, 0x10583],\n\t[0x105AB, 0x10584],\n\t[0x105AC, 0x10585],\n\t[0x105AD, 0x10586],\n\t[0x105AE, 0x10587],\n\t[0x105AF, 0x10588],\n\t[0x105B0, 0x10589],\n\t[0x105B1, 0x1058A],\n\t[0x105B3, 0x1058C],\n\t[0x105B4, 0x1058D],\n\t[0x105B5, 0x1058E],\n\t[0x105B6, 0x1058F],\n\t[0x105B7, 0x10590],\n\t[0x105B8, 0x10591],\n\t[0x105B9, 0x10592],\n\t[0x105BB, 0x10594],\n\t[0x105BC, 0x10595],\n\t[0x10C80, 0x10CC0],\n\t[0x10C81, 0x10CC1],\n\t[0x10C82, 0x10CC2],\n\t[0x10C83, 0x10CC3],\n\t[0x10C84, 0x10CC4],\n\t[0x10C85, 0x10CC5],\n\t[0x10C86, 0x10CC6],\n\t[0x10C87, 0x10CC7],\n\t[0x10C88, 0x10CC8],\n\t[0x10C89, 0x10CC9],\n\t[0x10C8A, 0x10CCA],\n\t[0x10C8B, 0x10CCB],\n\t[0x10C8C, 0x10CCC],\n\t[0x10C8D, 0x10CCD],\n\t[0x10C8E, 0x10CCE],\n\t[0x10C8F, 0x10CCF],\n\t[0x10C90, 0x10CD0],\n\t[0x10C91, 0x10CD1],\n\t[0x10C92, 0x10CD2],\n\t[0x10C93, 0x10CD3],\n\t[0x10C94, 0x10CD4],\n\t[0x10C95, 0x10CD5],\n\t[0x10C96, 0x10CD6],\n\t[0x10C97, 0x10CD7],\n\t[0x10C98, 0x10CD8],\n\t[0x10C99, 0x10CD9],\n\t[0x10C9A, 0x10CDA],\n\t[0x10C9B, 0x10CDB],\n\t[0x10C9C, 0x10CDC],\n\t[0x10C9D, 0x10CDD],\n\t[0x10C9E, 0x10CDE],\n\t[0x10C9F, 0x10CDF],\n\t[0x10CA0, 0x10CE0],\n\t[0x10CA1, 0x10CE1],\n\t[0x10CA2, 0x10CE2],\n\t[0x10CA3, 0x10CE3],\n\t[0x10CA4, 0x10CE4],\n\t[0x10CA5, 0x10CE5],\n\t[0x10CA6, 0x10CE6],\n\t[0x10CA7, 0x10CE7],\n\t[0x10CA8, 0x10CE8],\n\t[0x10CA9, 0x10CE9],\n\t[0x10CAA, 0x10CEA],\n\t[0x10CAB, 0x10CEB],\n\t[0x10CAC, 0x10CEC],\n\t[0x10CAD, 0x10CED],\n\t[0x10CAE, 0x10CEE],\n\t[0x10CAF, 0x10CEF],\n\t[0x10CB0, 0x10CF0],\n\t[0x10CB1, 0x10CF1],\n\t[0x10CB2, 0x10CF2],\n\t[0x10CC0, 0x10C80],\n\t[0x10CC1, 0x10C81],\n\t[0x10CC2, 0x10C82],\n\t[0x10CC3, 0x10C83],\n\t[0x10CC4, 0x10C84],\n\t[0x10CC5, 0x10C85],\n\t[0x10CC6, 0x10C86],\n\t[0x10CC7, 0x10C87],\n\t[0x10CC8, 0x10C88],\n\t[0x10CC9, 0x10C89],\n\t[0x10CCA, 0x10C8A],\n\t[0x10CCB, 0x10C8B],\n\t[0x10CCC, 0x10C8C],\n\t[0x10CCD, 0x10C8D],\n\t[0x10CCE, 0x10C8E],\n\t[0x10CCF, 0x10C8F],\n\t[0x10CD0, 0x10C90],\n\t[0x10CD1, 0x10C91],\n\t[0x10CD2, 0x10C92],\n\t[0x10CD3, 0x10C93],\n\t[0x10CD4, 0x10C94],\n\t[0x10CD5, 0x10C95],\n\t[0x10CD6, 0x10C96],\n\t[0x10CD7, 0x10C97],\n\t[0x10CD8, 0x10C98],\n\t[0x10CD9, 0x10C99],\n\t[0x10CDA, 0x10C9A],\n\t[0x10CDB, 0x10C9B],\n\t[0x10CDC, 0x10C9C],\n\t[0x10CDD, 0x10C9D],\n\t[0x10CDE, 0x10C9E],\n\t[0x10CDF, 0x10C9F],\n\t[0x10CE0, 0x10CA0],\n\t[0x10CE1, 0x10CA1],\n\t[0x10CE2, 0x10CA2],\n\t[0x10CE3, 0x10CA3],\n\t[0x10CE4, 0x10CA4],\n\t[0x10CE5, 0x10CA5],\n\t[0x10CE6, 0x10CA6],\n\t[0x10CE7, 0x10CA7],\n\t[0x10CE8, 0x10CA8],\n\t[0x10CE9, 0x10CA9],\n\t[0x10CEA, 0x10CAA],\n\t[0x10CEB, 0x10CAB],\n\t[0x10CEC, 0x10CAC],\n\t[0x10CED, 0x10CAD],\n\t[0x10CEE, 0x10CAE],\n\t[0x10CEF, 0x10CAF],\n\t[0x10CF0, 0x10CB0],\n\t[0x10CF1, 0x10CB1],\n\t[0x10CF2, 0x10CB2],\n\t[0x118A0, 0x118C0],\n\t[0x118A1, 0x118C1],\n\t[0x118A2, 0x118C2],\n\t[0x118A3, 0x118C3],\n\t[0x118A4, 0x118C4],\n\t[0x118A5, 0x118C5],\n\t[0x118A6, 0x118C6],\n\t[0x118A7, 0x118C7],\n\t[0x118A8, 0x118C8],\n\t[0x118A9, 0x118C9],\n\t[0x118AA, 0x118CA],\n\t[0x118AB, 0x118CB],\n\t[0x118AC, 0x118CC],\n\t[0x118AD, 0x118CD],\n\t[0x118AE, 0x118CE],\n\t[0x118AF, 0x118CF],\n\t[0x118B0, 0x118D0],\n\t[0x118B1, 0x118D1],\n\t[0x118B2, 0x118D2],\n\t[0x118B3, 0x118D3],\n\t[0x118B4, 0x118D4],\n\t[0x118B5, 0x118D5],\n\t[0x118B6, 0x118D6],\n\t[0x118B7, 0x118D7],\n\t[0x118B8, 0x118D8],\n\t[0x118B9, 0x118D9],\n\t[0x118BA, 0x118DA],\n\t[0x118BB, 0x118DB],\n\t[0x118BC, 0x118DC],\n\t[0x118BD, 0x118DD],\n\t[0x118BE, 0x118DE],\n\t[0x118BF, 0x118DF],\n\t[0x118C0, 0x118A0],\n\t[0x118C1, 0x118A1],\n\t[0x118C2, 0x118A2],\n\t[0x118C3, 0x118A3],\n\t[0x118C4, 0x118A4],\n\t[0x118C5, 0x118A5],\n\t[0x118C6, 0x118A6],\n\t[0x118C7, 0x118A7],\n\t[0x118C8, 0x118A8],\n\t[0x118C9, 0x118A9],\n\t[0x118CA, 0x118AA],\n\t[0x118CB, 0x118AB],\n\t[0x118CC, 0x118AC],\n\t[0x118CD, 0x118AD],\n\t[0x118CE, 0x118AE],\n\t[0x118CF, 0x118AF],\n\t[0x118D0, 0x118B0],\n\t[0x118D1, 0x118B1],\n\t[0x118D2, 0x118B2],\n\t[0x118D3, 0x118B3],\n\t[0x118D4, 0x118B4],\n\t[0x118D5, 0x118B5],\n\t[0x118D6, 0x118B6],\n\t[0x118D7, 0x118B7],\n\t[0x118D8, 0x118B8],\n\t[0x118D9, 0x118B9],\n\t[0x118DA, 0x118BA],\n\t[0x118DB, 0x118BB],\n\t[0x118DC, 0x118BC],\n\t[0x118DD, 0x118BD],\n\t[0x118DE, 0x118BE],\n\t[0x118DF, 0x118BF],\n\t[0x16E40, 0x16E60],\n\t[0x16E41, 0x16E61],\n\t[0x16E42, 0x16E62],\n\t[0x16E43, 0x16E63],\n\t[0x16E44, 0x16E64],\n\t[0x16E45, 0x16E65],\n\t[0x16E46, 0x16E66],\n\t[0x16E47, 0x16E67],\n\t[0x16E48, 0x16E68],\n\t[0x16E49, 0x16E69],\n\t[0x16E4A, 0x16E6A],\n\t[0x16E4B, 0x16E6B],\n\t[0x16E4C, 0x16E6C],\n\t[0x16E4D, 0x16E6D],\n\t[0x16E4E, 0x16E6E],\n\t[0x16E4F, 0x16E6F],\n\t[0x16E50, 0x16E70],\n\t[0x16E51, 0x16E71],\n\t[0x16E52, 0x16E72],\n\t[0x16E53, 0x16E73],\n\t[0x16E54, 0x16E74],\n\t[0x16E55, 0x16E75],\n\t[0x16E56, 0x16E76],\n\t[0x16E57, 0x16E77],\n\t[0x16E58, 0x16E78],\n\t[0x16E59, 0x16E79],\n\t[0x16E5A, 0x16E7A],\n\t[0x16E5B, 0x16E7B],\n\t[0x16E5C, 0x16E7C],\n\t[0x16E5D, 0x16E7D],\n\t[0x16E5E, 0x16E7E],\n\t[0x16E5F, 0x16E7F],\n\t[0x16E60, 0x16E40],\n\t[0x16E61, 0x16E41],\n\t[0x16E62, 0x16E42],\n\t[0x16E63, 0x16E43],\n\t[0x16E64, 0x16E44],\n\t[0x16E65, 0x16E45],\n\t[0x16E66, 0x16E46],\n\t[0x16E67, 0x16E47],\n\t[0x16E68, 0x16E48],\n\t[0x16E69, 0x16E49],\n\t[0x16E6A, 0x16E4A],\n\t[0x16E6B, 0x16E4B],\n\t[0x16E6C, 0x16E4C],\n\t[0x16E6D, 0x16E4D],\n\t[0x16E6E, 0x16E4E],\n\t[0x16E6F, 0x16E4F],\n\t[0x16E70, 0x16E50],\n\t[0x16E71, 0x16E51],\n\t[0x16E72, 0x16E52],\n\t[0x16E73, 0x16E53],\n\t[0x16E74, 0x16E54],\n\t[0x16E75, 0x16E55],\n\t[0x16E76, 0x16E56],\n\t[0x16E77, 0x16E57],\n\t[0x16E78, 0x16E58],\n\t[0x16E79, 0x16E59],\n\t[0x16E7A, 0x16E5A],\n\t[0x16E7B, 0x16E5B],\n\t[0x16E7C, 0x16E5C],\n\t[0x16E7D, 0x16E5D],\n\t[0x16E7E, 0x16E5E],\n\t[0x16E7F, 0x16E5F],\n\t[0x1E900, 0x1E922],\n\t[0x1E901, 0x1E923],\n\t[0x1E902, 0x1E924],\n\t[0x1E903, 0x1E925],\n\t[0x1E904, 0x1E926],\n\t[0x1E905, 0x1E927],\n\t[0x1E906, 0x1E928],\n\t[0x1E907, 0x1E929],\n\t[0x1E908, 0x1E92A],\n\t[0x1E909, 0x1E92B],\n\t[0x1E90A, 0x1E92C],\n\t[0x1E90B, 0x1E92D],\n\t[0x1E90C, 0x1E92E],\n\t[0x1E90D, 0x1E92F],\n\t[0x1E90E, 0x1E930],\n\t[0x1E90F, 0x1E931],\n\t[0x1E910, 0x1E932],\n\t[0x1E911, 0x1E933],\n\t[0x1E912, 0x1E934],\n\t[0x1E913, 0x1E935],\n\t[0x1E914, 0x1E936],\n\t[0x1E915, 0x1E937],\n\t[0x1E916, 0x1E938],\n\t[0x1E917, 0x1E939],\n\t[0x1E918, 0x1E93A],\n\t[0x1E919, 0x1E93B],\n\t[0x1E91A, 0x1E93C],\n\t[0x1E91B, 0x1E93D],\n\t[0x1E91C, 0x1E93E],\n\t[0x1E91D, 0x1E93F],\n\t[0x1E91E, 0x1E940],\n\t[0x1E91F, 0x1E941],\n\t[0x1E920, 0x1E942],\n\t[0x1E921, 0x1E943],\n\t[0x1E922, 0x1E900],\n\t[0x1E923, 0x1E901],\n\t[0x1E924, 0x1E902],\n\t[0x1E925, 0x1E903],\n\t[0x1E926, 0x1E904],\n\t[0x1E927, 0x1E905],\n\t[0x1E928, 0x1E906],\n\t[0x1E929, 0x1E907],\n\t[0x1E92A, 0x1E908],\n\t[0x1E92B, 0x1E909],\n\t[0x1E92C, 0x1E90A],\n\t[0x1E92D, 0x1E90B],\n\t[0x1E92E, 0x1E90C],\n\t[0x1E92F, 0x1E90D],\n\t[0x1E930, 0x1E90E],\n\t[0x1E931, 0x1E90F],\n\t[0x1E932, 0x1E910],\n\t[0x1E933, 0x1E911],\n\t[0x1E934, 0x1E912],\n\t[0x1E935, 0x1E913],\n\t[0x1E936, 0x1E914],\n\t[0x1E937, 0x1E915],\n\t[0x1E938, 0x1E916],\n\t[0x1E939, 0x1E917],\n\t[0x1E93A, 0x1E918],\n\t[0x1E93B, 0x1E919],\n\t[0x1E93C, 0x1E91A],\n\t[0x1E93D, 0x1E91B],\n\t[0x1E93E, 0x1E91C],\n\t[0x1E93F, 0x1E91D],\n\t[0x1E940, 0x1E91E],\n\t[0x1E941, 0x1E91F],\n\t[0x1E942, 0x1E920],\n\t[0x1E943, 0x1E921]\n]);\n","// Generated using `npm run build`. Do not edit.\n'use strict';\n\nconst regenerate = require('regenerate');\n\nexports.REGULAR = new Map([\n\t['d', regenerate()\n\t\t.addRange(0x30, 0x39)],\n\t['D', regenerate()\n\t\t.addRange(0x0, 0x2F)\n\t\t.addRange(0x3A, 0xFFFF)],\n\t['s', regenerate(0x20, 0xA0, 0x1680, 0x202F, 0x205F, 0x3000, 0xFEFF)\n\t\t.addRange(0x9, 0xD)\n\t\t.addRange(0x2000, 0x200A)\n\t\t.addRange(0x2028, 0x2029)],\n\t['S', regenerate()\n\t\t.addRange(0x0, 0x8)\n\t\t.addRange(0xE, 0x1F)\n\t\t.addRange(0x21, 0x9F)\n\t\t.addRange(0xA1, 0x167F)\n\t\t.addRange(0x1681, 0x1FFF)\n\t\t.addRange(0x200B, 0x2027)\n\t\t.addRange(0x202A, 0x202E)\n\t\t.addRange(0x2030, 0x205E)\n\t\t.addRange(0x2060, 0x2FFF)\n\t\t.addRange(0x3001, 0xFEFE)\n\t\t.addRange(0xFF00, 0xFFFF)],\n\t['w', regenerate(0x5F)\n\t\t.addRange(0x30, 0x39)\n\t\t.addRange(0x41, 0x5A)\n\t\t.addRange(0x61, 0x7A)],\n\t['W', regenerate(0x60)\n\t\t.addRange(0x0, 0x2F)\n\t\t.addRange(0x3A, 0x40)\n\t\t.addRange(0x5B, 0x5E)\n\t\t.addRange(0x7B, 0xFFFF)]\n]);\n\nexports.UNICODE = new Map([\n\t['d', regenerate()\n\t\t.addRange(0x30, 0x39)],\n\t['D', regenerate()\n\t\t.addRange(0x0, 0x2F)\n\t\t.addRange(0x3A, 0x10FFFF)],\n\t['s', regenerate(0x20, 0xA0, 0x1680, 0x202F, 0x205F, 0x3000, 0xFEFF)\n\t\t.addRange(0x9, 0xD)\n\t\t.addRange(0x2000, 0x200A)\n\t\t.addRange(0x2028, 0x2029)],\n\t['S', regenerate()\n\t\t.addRange(0x0, 0x8)\n\t\t.addRange(0xE, 0x1F)\n\t\t.addRange(0x21, 0x9F)\n\t\t.addRange(0xA1, 0x167F)\n\t\t.addRange(0x1681, 0x1FFF)\n\t\t.addRange(0x200B, 0x2027)\n\t\t.addRange(0x202A, 0x202E)\n\t\t.addRange(0x2030, 0x205E)\n\t\t.addRange(0x2060, 0x2FFF)\n\t\t.addRange(0x3001, 0xFEFE)\n\t\t.addRange(0xFF00, 0x10FFFF)],\n\t['w', regenerate(0x5F)\n\t\t.addRange(0x30, 0x39)\n\t\t.addRange(0x41, 0x5A)\n\t\t.addRange(0x61, 0x7A)],\n\t['W', regenerate(0x60)\n\t\t.addRange(0x0, 0x2F)\n\t\t.addRange(0x3A, 0x40)\n\t\t.addRange(0x5B, 0x5E)\n\t\t.addRange(0x7B, 0x10FFFF)]\n]);\n\nexports.UNICODE_IGNORE_CASE = new Map([\n\t['d', regenerate()\n\t\t.addRange(0x30, 0x39)],\n\t['D', regenerate()\n\t\t.addRange(0x0, 0x2F)\n\t\t.addRange(0x3A, 0x10FFFF)],\n\t['s', regenerate(0x20, 0xA0, 0x1680, 0x202F, 0x205F, 0x3000, 0xFEFF)\n\t\t.addRange(0x9, 0xD)\n\t\t.addRange(0x2000, 0x200A)\n\t\t.addRange(0x2028, 0x2029)],\n\t['S', regenerate()\n\t\t.addRange(0x0, 0x8)\n\t\t.addRange(0xE, 0x1F)\n\t\t.addRange(0x21, 0x9F)\n\t\t.addRange(0xA1, 0x167F)\n\t\t.addRange(0x1681, 0x1FFF)\n\t\t.addRange(0x200B, 0x2027)\n\t\t.addRange(0x202A, 0x202E)\n\t\t.addRange(0x2030, 0x205E)\n\t\t.addRange(0x2060, 0x2FFF)\n\t\t.addRange(0x3001, 0xFEFE)\n\t\t.addRange(0xFF00, 0x10FFFF)],\n\t['w', regenerate(0x5F, 0x17F, 0x212A)\n\t\t.addRange(0x30, 0x39)\n\t\t.addRange(0x41, 0x5A)\n\t\t.addRange(0x61, 0x7A)],\n\t['W', regenerate(0x60)\n\t\t.addRange(0x0, 0x2F)\n\t\t.addRange(0x3A, 0x40)\n\t\t.addRange(0x5B, 0x5E)\n\t\t.addRange(0x7B, 0x17E)\n\t\t.addRange(0x180, 0x2129)\n\t\t.addRange(0x212B, 0x10FFFF)]\n]);\n","'use strict';\n\nconst generate = require('@babel/regjsgen').generate;\nconst parse = require('regjsparser').parse;\nconst regenerate = require('regenerate');\nconst unicodeMatchProperty = require('unicode-match-property-ecmascript');\nconst unicodeMatchPropertyValue = require('unicode-match-property-value-ecmascript');\nconst iuMappings = require('./data/iu-mappings.js');\nconst ESCAPE_SETS = require('./data/character-class-escape-sets.js');\n\nfunction flatMap(array, callback) {\n\tconst result = [];\n\tarray.forEach(item => {\n\t\tconst res = callback(item);\n\t\tif (Array.isArray(res)) {\n\t\t\tresult.push.apply(result, res);\n\t\t} else {\n\t\t\tresult.push(res);\n\t\t}\n\t});\n\treturn result;\n}\n\nconst SPECIAL_CHARS = /([\\\\^$.*+?()[\\]{}|])/g;\n\n// Prepare a Regenerate set containing all code points, used for negative\n// character classes (if any).\nconst UNICODE_SET = regenerate().addRange(0x0, 0x10FFFF);\n\nconst ASTRAL_SET = regenerate().addRange(0x10000, 0x10FFFF);\n\nconst NEWLINE_SET = regenerate().add(\n\t// `LineTerminator`s (https://mths.be/es6#sec-line-terminators):\n\t0x000A, // Line Feed \n\t0x000D, // Carriage Return \n\t0x2028, // Line Separator \n\t0x2029 // Paragraph Separator \n);\n\n// Prepare a Regenerate set containing all code points that are supposed to be\n// matched by `/./u`. https://mths.be/es6#sec-atom\nconst DOT_SET_UNICODE = UNICODE_SET.clone() // all Unicode code points\n\t.remove(NEWLINE_SET);\n\nconst getCharacterClassEscapeSet = (character, unicode, ignoreCase) => {\n\tif (unicode) {\n\t\tif (ignoreCase) {\n\t\t\treturn ESCAPE_SETS.UNICODE_IGNORE_CASE.get(character);\n\t\t}\n\t\treturn ESCAPE_SETS.UNICODE.get(character);\n\t}\n\treturn ESCAPE_SETS.REGULAR.get(character);\n};\n\nconst getUnicodeDotSet = (dotAll) => {\n\treturn dotAll ? UNICODE_SET : DOT_SET_UNICODE;\n};\n\nconst getUnicodePropertyValueSet = (property, value) => {\n\tconst path = value ?\n\t\t`${ property }/${ value }` :\n\t\t`Binary_Property/${ property }`;\n\ttry {\n\t\treturn require(`regenerate-unicode-properties/${ path }.js`);\n\t} catch (exception) {\n\t\tthrow new Error(\n\t\t\t`Failed to recognize value \\`${ value }\\` for property ` +\n\t\t\t`\\`${ property }\\`.`\n\t\t);\n\t}\n};\n\nconst handleLoneUnicodePropertyNameOrValue = (value) => {\n\t// It could be a `General_Category` value or a binary property.\n\t// Note: `unicodeMatchPropertyValue` throws on invalid values.\n\ttry {\n\t\tconst property = 'General_Category';\n\t\tconst category = unicodeMatchPropertyValue(property, value);\n\t\treturn getUnicodePropertyValueSet(property, category);\n\t} catch (exception) {}\n\t// It’s not a `General_Category` value, so check if it’s a property\n\t// of strings.\n\ttry {\n\t\treturn getUnicodePropertyValueSet('Property_of_Strings', value);\n\t} catch (exception) {}\n\t// Lastly, check if it’s a binary property of single code points.\n\t// Note: `unicodeMatchProperty` throws on invalid properties.\n\tconst property = unicodeMatchProperty(value);\n\treturn getUnicodePropertyValueSet(property);\n};\n\nconst getUnicodePropertyEscapeSet = (value, isNegative) => {\n\tconst parts = value.split('=');\n\tconst firstPart = parts[0];\n\tlet set;\n\tif (parts.length == 1) {\n\t\tset = handleLoneUnicodePropertyNameOrValue(firstPart);\n\t} else {\n\t\t// The pattern consists of two parts, i.e. `Property=Value`.\n\t\tconst property = unicodeMatchProperty(firstPart);\n\t\tconst value = unicodeMatchPropertyValue(property, parts[1]);\n\t\tset = getUnicodePropertyValueSet(property, value);\n\t}\n\tif (isNegative) {\n\t\tif (set.strings) {\n\t\t\tthrow new Error('Cannot negate Unicode property of strings');\n\t\t}\n\t\treturn {\n\t\t\tcharacters: UNICODE_SET.clone().remove(set.characters),\n\t\t\tstrings: new Set()\n\t\t};\n\t}\n\treturn {\n\t\tcharacters: set.characters.clone(),\n\t\tstrings: set.strings\n\t\t\t// We need to escape strings like *️⃣ to make sure that they can be safely used in unions.\n\t\t\t? new Set(set.strings.map(str => str.replace(SPECIAL_CHARS, '\\\\$1')))\n\t\t\t: new Set()\n\t};\n};\n\nconst getUnicodePropertyEscapeCharacterClassData = (property, isNegative) => {\n\tconst set = getUnicodePropertyEscapeSet(property, isNegative);\n\tconst data = getCharacterClassEmptyData();\n\tdata.singleChars = set.characters;\n\tif (set.strings.size > 0) {\n\t\tdata.longStrings = set.strings;\n\t\tdata.maybeIncludesStrings = true;\n\t}\n\treturn data;\n};\n\nfunction configNeedCaseFoldAscii() {\n\treturn !!config.modifiersData.i;\n}\n\nfunction configNeedCaseFoldUnicode() {\n\t// config.modifiersData.i : undefined | false\n\tif (config.modifiersData.i === false) return false;\n\tif (!config.transform.unicodeFlag) return false;\n\treturn Boolean(config.modifiersData.i || config.flags.ignoreCase);\n}\n\n// Given a range of code points, add any case-folded code points in that range\n// to a set.\nregenerate.prototype.iuAddRange = function(min, max) {\n\tconst $this = this;\n\tdo {\n\t\tconst folded = caseFold(min, configNeedCaseFoldAscii(), configNeedCaseFoldUnicode());\n\t\tif (folded) {\n\t\t\t$this.add(folded);\n\t\t}\n\t} while (++min <= max);\n\treturn $this;\n};\nregenerate.prototype.iuRemoveRange = function(min, max) {\n\tconst $this = this;\n\tdo {\n\t\tconst folded = caseFold(min, configNeedCaseFoldAscii(), configNeedCaseFoldUnicode());\n\t\tif (folded) {\n\t\t\t$this.remove(folded);\n\t\t}\n\t} while (++min <= max);\n\treturn $this;\n};\n\nconst update = (item, pattern) => {\n\tlet tree = parse(pattern, config.useUnicodeFlag ? 'u' : '', {\n\t\tlookbehind: true,\n\t\tnamedGroups: true,\n\t\tunicodePropertyEscape: true,\n\t\tunicodeSet: true,\n\t\tmodifiers: true,\n\t});\n\tswitch (tree.type) {\n\t\tcase 'characterClass':\n\t\tcase 'group':\n\t\tcase 'value':\n\t\t\t// No wrapping needed.\n\t\t\tbreak;\n\t\tdefault:\n\t\t\t// Wrap the pattern in a non-capturing group.\n\t\t\ttree = wrap(tree, pattern);\n\t}\n\tObject.assign(item, tree);\n};\n\nconst wrap = (tree, pattern) => {\n\t// Wrap the pattern in a non-capturing group.\n\treturn {\n\t\t'type': 'group',\n\t\t'behavior': 'ignore',\n\t\t'body': [tree],\n\t\t'raw': `(?:${ pattern })`\n\t};\n};\n\nconst caseFold = (codePoint, includeAscii, includeUnicode) => {\n\tlet folded = (includeUnicode ? iuMappings.get(codePoint) : undefined) || [];\n\tif (typeof folded === 'number') folded = [folded];\n\tif (includeAscii) {\n\t\tif (codePoint >= 0x41 && codePoint <= 0x5A) {\n\t\t\tfolded.push(codePoint + 0x20);\n\t\t} else if (codePoint >= 0x61 && codePoint <= 0x7A) {\n\t\t\tfolded.push(codePoint - 0x20);\n\t\t}\n\t}\n\treturn folded.length == 0 ? false : folded;\n};\n\nconst buildHandler = (action) => {\n\tswitch (action) {\n\t\tcase 'union':\n\t\t\treturn {\n\t\t\t\tsingle: (data, cp) => {\n\t\t\t\t\tdata.singleChars.add(cp);\n\t\t\t\t},\n\t\t\t\tregSet: (data, set2) => {\n\t\t\t\t\tdata.singleChars.add(set2);\n\t\t\t\t},\n\t\t\t\trange: (data, start, end) => {\n\t\t\t\t\tdata.singleChars.addRange(start, end);\n\t\t\t\t},\n\t\t\t\tiuRange: (data, start, end) => {\n\t\t\t\t\tdata.singleChars.iuAddRange(start, end);\n\t\t\t\t},\n\t\t\t\tnested: (data, nestedData) => {\n\t\t\t\t\tdata.singleChars.add(nestedData.singleChars);\n\t\t\t\t\tfor (const str of nestedData.longStrings) data.longStrings.add(str);\n\t\t\t\t\tif (nestedData.maybeIncludesStrings) data.maybeIncludesStrings = true;\n\t\t\t\t}\n\t\t\t};\n\t\tcase 'union-negative': {\n\t\t\tconst regSet = (data, set2) => {\n\t\t\t\tdata.singleChars = UNICODE_SET.clone().remove(set2).add(data.singleChars);\n\t\t\t};\n\t\t\treturn {\n\t\t\t\tsingle: (data, cp) => {\n\t\t\t\t\tconst unicode = UNICODE_SET.clone();\n\t\t\t\t\tdata.singleChars = data.singleChars.contains(cp) ? unicode : unicode.remove(cp);\n\t\t\t\t},\n\t\t\t\tregSet: regSet,\n\t\t\t\trange: (data, start, end) => {\n\t\t\t\t\tdata.singleChars = UNICODE_SET.clone().removeRange(start, end).add(data.singleChars);\n\t\t\t\t},\n\t\t\t\tiuRange: (data, start, end) => {\n\t\t\t\t\tdata.singleChars = UNICODE_SET.clone().iuRemoveRange(start, end).add(data.singleChars);\n\t\t\t\t},\n\t\t\t\tnested: (data, nestedData) => {\n\t\t\t\t\tregSet(data, nestedData.singleChars);\n\t\t\t\t\tif (nestedData.maybeIncludesStrings) throw new Error('ASSERTION ERROR');\n\t\t\t\t}\n\t\t\t};\n\t\t}\n\t\tcase 'intersection': {\n\t\t\tconst regSet = (data, set2) => {\n\t\t\t\tif (data.first) data.singleChars = set2;\n\t\t\t\telse data.singleChars.intersection(set2);\n\t\t\t};\n\t\t\treturn {\n\t\t\t\tsingle: (data, cp) => {\n\t\t\t\t\tdata.singleChars = data.first || data.singleChars.contains(cp) ? regenerate(cp) : regenerate();\n\t\t\t\t\tdata.longStrings.clear();\n\t\t\t\t\tdata.maybeIncludesStrings = false;\n\t\t\t\t},\n\t\t\t\tregSet: (data, set) => {\n\t\t\t\t\tregSet(data, set);\n\t\t\t\t\tdata.longStrings.clear();\n\t\t\t\t\tdata.maybeIncludesStrings = false;\n\t\t\t\t},\n\t\t\t\trange: (data, start, end) => {\n\t\t\t\t\tif (data.first) data.singleChars.addRange(start, end);\n\t\t\t\t\telse data.singleChars.intersection(regenerate().addRange(start, end));\n\t\t\t\t\tdata.longStrings.clear();\n\t\t\t\t\tdata.maybeIncludesStrings = false;\n\t\t\t\t},\n\t\t\t\tiuRange: (data, start, end) => {\n\t\t\t\t\tif (data.first) data.singleChars.iuAddRange(start, end);\n\t\t\t\t\telse data.singleChars.intersection(regenerate().iuAddRange(start, end));\n\t\t\t\t\tdata.longStrings.clear();\n\t\t\t\t\tdata.maybeIncludesStrings = false;\n\t\t\t\t},\n\t\t\t\tnested: (data, nestedData) => {\n\t\t\t\t\tregSet(data, nestedData.singleChars);\n\n\t\t\t\t\tif (data.first) {\n\t\t\t\t\t\tdata.longStrings = nestedData.longStrings;\n\t\t\t\t\t\tdata.maybeIncludesStrings = nestedData.maybeIncludesStrings;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tfor (const str of data.longStrings) {\n\t\t\t\t\t\t\tif (!nestedData.longStrings.has(str)) data.longStrings.delete(str);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (!nestedData.maybeIncludesStrings) data.maybeIncludesStrings = false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t};\n\t\t}\n\t\tcase 'subtraction': {\n\t\t\tconst regSet = (data, set2) => {\n\t\t\t\tif (data.first) data.singleChars.add(set2);\n\t\t\t\telse data.singleChars.remove(set2);\n\t\t\t};\n\t\t\treturn {\n\t\t\t\tsingle: (data, cp) => {\n\t\t\t\t\tif (data.first) data.singleChars.add(cp);\n\t\t\t\t\telse data.singleChars.remove(cp);\n\t\t\t\t},\n\t\t\t\tregSet: regSet,\n\t\t\t\trange: (data, start, end) => {\n\t\t\t\t\tif (data.first) data.singleChars.addRange(start, end);\n\t\t\t\t\telse data.singleChars.removeRange(start, end);\n\t\t\t\t},\n\t\t\t\tiuRange: (data, start, end) => {\n\t\t\t\t\tif (data.first) data.singleChars.iuAddRange(start, end);\n\t\t\t\t\telse data.singleChars.iuRemoveRange(start, end);\n\t\t\t\t},\n\t\t\t\tnested: (data, nestedData) => {\n\t\t\t\t\tregSet(data, nestedData.singleChars);\n\n\t\t\t\t\tif (data.first) {\n\t\t\t\t\t\tdata.longStrings = nestedData.longStrings;\n\t\t\t\t\t\tdata.maybeIncludesStrings = nestedData.maybeIncludesStrings;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tfor (const str of data.longStrings) {\n\t\t\t\t\t\t\tif (nestedData.longStrings.has(str)) data.longStrings.delete(str);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t};\n\t\t}\n\t\t// The `default` clause is only here as a safeguard; it should never be\n\t\t// reached. Code coverage tools should ignore it.\n\t\t/* istanbul ignore next */\n\t\tdefault:\n\t\t\tthrow new Error(`Unknown set action: ${ characterClassItem.kind }`);\n\t}\n};\n\nconst getCharacterClassEmptyData = () => ({\n\ttransformed: config.transform.unicodeFlag,\n\tsingleChars: regenerate(),\n\tlongStrings: new Set(),\n\thasEmptyString: false,\n\tfirst: true,\n\tmaybeIncludesStrings: false\n});\n\nconst maybeFold = (codePoint) => {\n\tconst caseFoldAscii = configNeedCaseFoldAscii();\n\tconst caseFoldUnicode = configNeedCaseFoldUnicode();\n\n\tif (caseFoldAscii || caseFoldUnicode) {\n\t\tconst folded = caseFold(codePoint, caseFoldAscii, caseFoldUnicode);\n\t\tif (folded) {\n\t\t\treturn [codePoint, folded];\n\t\t}\n\t}\n\treturn [codePoint];\n};\n\nconst computeClassStrings = (classStrings, regenerateOptions) => {\n\tlet data = getCharacterClassEmptyData();\n\n\tconst caseFoldAscii = configNeedCaseFoldAscii();\n\tconst caseFoldUnicode = configNeedCaseFoldUnicode();\n\n\tfor (const string of classStrings.strings) {\n\t\tif (string.characters.length === 1) {\n\t\t\tmaybeFold(string.characters[0].codePoint).forEach((cp) => {\n\t\t\t\tdata.singleChars.add(cp);\n\t\t\t});\n\t\t} else {\n\t\t\tlet stringifiedString;\n\t\t\tif (caseFoldUnicode || caseFoldAscii) {\n\t\t\t\tstringifiedString = '';\n\t\t\t\tfor (const ch of string.characters) {\n\t\t\t\t\tlet set = regenerate(ch.codePoint);\n\t\t\t\t\tconst folded = maybeFold(ch.codePoint);\n\t\t\t\t\tif (folded) set.add(folded);\n\t\t\t\t\tstringifiedString += set.toString(regenerateOptions);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tstringifiedString = string.characters.map(ch => generate(ch)).join('')\n\t\t\t}\n\n\t\t\tdata.longStrings.add(stringifiedString);\n\t\t\tdata.maybeIncludesStrings = true;\n\t\t}\n\t}\n\n\treturn data;\n}\n\nconst computeCharacterClass = (characterClassItem, regenerateOptions) => {\n\tlet data = getCharacterClassEmptyData();\n\n\tlet handlePositive;\n\tlet handleNegative;\n\n\tswitch (characterClassItem.kind) {\n\t\tcase 'union':\n\t\t\thandlePositive = buildHandler('union');\n\t\t\thandleNegative = buildHandler('union-negative');\n\t\t\tbreak;\n\t\tcase 'intersection':\n\t\t\thandlePositive = buildHandler('intersection');\n\t\t\thandleNegative = buildHandler('subtraction');\n\t\t\tbreak;\n\t\tcase 'subtraction':\n\t\t\thandlePositive = buildHandler('subtraction');\n\t\t\thandleNegative = buildHandler('intersection');\n\t\t\tbreak;\n\t\t// The `default` clause is only here as a safeguard; it should never be\n\t\t// reached. Code coverage tools should ignore it.\n\t\t/* istanbul ignore next */\n\t\tdefault:\n\t\t\tthrow new Error(`Unknown character class kind: ${ characterClassItem.kind }`);\n\t}\n\n\tconst caseFoldAscii = configNeedCaseFoldAscii();\n\tconst caseFoldUnicode = configNeedCaseFoldUnicode();\n\n\tfor (const item of characterClassItem.body) {\n\t\tswitch (item.type) {\n\t\t\tcase 'value':\n\t\t\t\tmaybeFold(item.codePoint).forEach((cp) => {\n\t\t\t\t\thandlePositive.single(data, cp);\n\t\t\t\t});\n\t\t\t\tbreak;\n\t\t\tcase 'characterClassRange':\n\t\t\t\tconst min = item.min.codePoint;\n\t\t\t\tconst max = item.max.codePoint;\n\t\t\t\thandlePositive.range(data, min, max);\n\t\t\t\tif (caseFoldAscii || caseFoldUnicode) {\n\t\t\t\t\thandlePositive.iuRange(data, min, max);\n\t\t\t\t\tdata.transformed = true;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 'characterClassEscape':\n\t\t\t\thandlePositive.regSet(data, getCharacterClassEscapeSet(\n\t\t\t\t\titem.value,\n\t\t\t\t\tconfig.flags.unicode,\n\t\t\t\t\tconfig.flags.ignoreCase\n\t\t\t\t));\n\t\t\t\tbreak;\n\t\t\tcase 'unicodePropertyEscape':\n\t\t\t\tconst nestedData = getUnicodePropertyEscapeCharacterClassData(item.value, item.negative);\n\t\t\t\thandlePositive.nested(data, nestedData);\n\t\t\t\tdata.transformed =\n\t\t\t\t\tdata.transformed ||\n\t\t\t\t\tconfig.transform.unicodePropertyEscapes ||\n\t\t\t\t\t(config.transform.unicodeSetsFlag && nestedData.maybeIncludesStrings);\n\t\t\t\tbreak;\n\t\t\tcase 'characterClass':\n\t\t\t\tconst handler = item.negative ? handleNegative : handlePositive;\n\t\t\t\tconst res = computeCharacterClass(item, regenerateOptions);\n\t\t\t\thandler.nested(data, res);\n\t\t\t\tdata.transformed = true;\n\t\t\t\tbreak;\n\t\t\tcase 'classStrings':\n\t\t\t\thandlePositive.nested(data, computeClassStrings(item, regenerateOptions));\n\t\t\t\tdata.transformed = true;\n\t\t\t\tbreak;\n\t\t\t// The `default` clause is only here as a safeguard; it should never be\n\t\t\t// reached. Code coverage tools should ignore it.\n\t\t\t/* istanbul ignore next */\n\t\t\tdefault:\n\t\t\t\tthrow new Error(`Unknown term type: ${ item.type }`);\n\t\t}\n\n\t\tdata.first = false;\n\t}\n\n\tif (characterClassItem.negative && data.maybeIncludesStrings) {\n\t\tthrow new SyntaxError('Cannot negate set containing strings');\n\t}\n\n\treturn data;\n}\n\nconst processCharacterClass = (\n\tcharacterClassItem,\n\tregenerateOptions,\n\tcomputed = computeCharacterClass(characterClassItem, regenerateOptions)\n) => {\n\tconst negative = characterClassItem.negative;\n\tconst { singleChars, transformed, longStrings } = computed;\n\tif (transformed) {\n\t\tconst setStr = singleChars.toString(regenerateOptions);\n\n\t\tif (negative) {\n\t\t\tif (config.useUnicodeFlag) {\n\t\t\t\tupdate(characterClassItem, `[^${setStr[0] === '[' ? setStr.slice(1, -1) : setStr}]`)\n\t\t\t} else {\n\t\t\t\tif (config.flags.unicode) {\n\t\t\t\t\tif (config.flags.ignoreCase) {\n\t\t\t\t\t\tconst astralCharsSet = singleChars.clone().intersection(ASTRAL_SET);\n\t\t\t\t\t\t// Assumption: singleChars do not contain lone surrogates.\n\t\t\t\t\t\t// Regex like /[^\\ud800]/u is not supported\n\t\t\t\t\t\tconst surrogateOrBMPSetStr = singleChars\n\t\t\t\t\t\t\t.clone()\n\t\t\t\t\t\t\t.remove(astralCharsSet)\n\t\t\t\t\t\t\t.addRange(0xd800, 0xdfff)\n\t\t\t\t\t\t\t.toString({ bmpOnly: true });\n\t\t\t\t\t\t// Don't generate negative lookahead for astral characters\n\t\t\t\t\t\t// because the case folding is not working anyway as we break\n\t\t\t\t\t\t// code points into surrogate pairs.\n\t\t\t\t\t\tconst astralNegativeSetStr = ASTRAL_SET\n\t\t\t\t\t\t\t.clone()\n\t\t\t\t\t\t\t.remove(astralCharsSet)\n\t\t\t\t\t\t\t.toString(regenerateOptions);\n\t\t\t\t\t\t// The transform here does not support lone surrogates.\n\t\t\t\t\t\tupdate(\n\t\t\t\t\t\t\tcharacterClassItem,\n\t\t\t\t\t\t\t`(?!${surrogateOrBMPSetStr})[\\\\s\\\\S]|${astralNegativeSetStr}`\n\t\t\t\t\t\t);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// Generate negative set directly when case folding is not involved.\n\t\t\t\t\t\tupdate(\n\t\t\t\t\t\t\tcharacterClassItem,\n\t\t\t\t\t\t\tUNICODE_SET.clone().remove(singleChars).toString(regenerateOptions)\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tupdate(characterClassItem, `(?!${setStr})[\\\\s\\\\S]`);\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tconst hasEmptyString = longStrings.has('');\n\t\t\tconst pieces = Array.from(longStrings).sort((a, b) => b.length - a.length);\n\n\t\t\tif (setStr !== '[]' || longStrings.size === 0) {\n\t\t\t\tpieces.splice(pieces.length - (hasEmptyString ? 1 : 0), 0, setStr);\n\t\t\t}\n\n\t\t\tupdate(characterClassItem, pieces.join('|'));\n\t\t}\n\t}\n\treturn characterClassItem;\n};\n\nconst assertNoUnmatchedReferences = (groups) => {\n\tconst unmatchedReferencesNames = Object.keys(groups.unmatchedReferences);\n\tif (unmatchedReferencesNames.length > 0) {\n\t\tthrow new Error(`Unknown group names: ${unmatchedReferencesNames}`);\n\t}\n};\n\nconst processModifiers = (item, regenerateOptions, groups) => {\n\tconst enabling = item.modifierFlags.enabling;\n\tconst disabling = item.modifierFlags.disabling;\n\n\tdelete item.modifierFlags;\n\titem.behavior = 'ignore';\n\n\tconst oldData = Object.assign({}, config.modifiersData);\n\n\tenabling.split('').forEach(flag => {\n\t\tconfig.modifiersData[flag] = true;\n\t});\n\tdisabling.split('').forEach(flag => {\n\t\tconfig.modifiersData[flag] = false;\n\t});\n\n\titem.body = item.body.map(term => {\n\t\treturn processTerm(term, regenerateOptions, groups);\n\t});\n\n\tconfig.modifiersData = oldData;\n\n\treturn item;\n}\n\nconst processTerm = (item, regenerateOptions, groups) => {\n\tswitch (item.type) {\n\t\tcase 'dot':\n\t\t\tif (config.transform.unicodeFlag) {\n\t\t\t\tupdate(\n\t\t\t\t\titem,\n\t\t\t\t\tgetUnicodeDotSet(config.flags.dotAll || config.modifiersData.s).toString(regenerateOptions)\n\t\t\t\t);\n\t\t\t} else if (config.transform.dotAllFlag || config.modifiersData.s) {\n\t\t\t\t// TODO: consider changing this at the regenerate level.\n\t\t\t\tupdate(item, '[\\\\s\\\\S]');\n\t\t\t}\n\t\t\tbreak;\n\t\tcase 'characterClass':\n\t\t\titem = processCharacterClass(item, regenerateOptions);\n\t\t\tbreak;\n\t\tcase 'unicodePropertyEscape':\n\t\t\tconst data = getUnicodePropertyEscapeCharacterClassData(item.value, item.negative);\n\t\t\tif (data.maybeIncludesStrings) {\n\t\t\t\tif (!config.flags.unicodeSets) {\n\t\t\t\t\tthrow new Error(\n\t\t\t\t\t\t'Properties of strings are only supported when using the unicodeSets (v) flag.'\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\tif (config.transform.unicodeSetsFlag) {\n\t\t\t\t\tdata.transformed = true;\n\t\t\t\t\titem = processCharacterClass(item, regenerateOptions, data);\n\t\t\t\t}\n\t\t\t} else if (config.transform.unicodePropertyEscapes) {\n\t\t\t\tupdate(\n\t\t\t\t\titem,\n\t\t\t\t\tdata.singleChars.toString(regenerateOptions)\n\t\t\t\t);\n\t\t\t}\n\t\t\tbreak;\n\t\tcase 'characterClassEscape':\n\t\t\tif (config.transform.unicodeFlag) {\n\t\t\t\tupdate(\n\t\t\t\t\titem,\n\t\t\t\t\tgetCharacterClassEscapeSet(\n\t\t\t\t\t\titem.value,\n\t\t\t\t\t\t/* config.transform.unicodeFlag implies config.flags.unicode */ true,\n\t\t\t\t\t\tconfig.flags.ignoreCase\n\t\t\t\t\t).toString(regenerateOptions)\n\t\t\t\t);\n\t\t\t}\n\t\t\tbreak;\n\t\tcase 'group':\n\t\t\tif (item.behavior == 'normal') {\n\t\t\t\tgroups.lastIndex++;\n\t\t\t}\n\t\t\tif (item.name) {\n\t\t\t\tconst name = item.name.value;\n\n\t\t\t\tif (groups.namesConflicts[name]) {\n\t\t\t\t\tthrow new Error(\n\t\t\t\t\t\t`Group '${ name }' has already been defined in this context.`\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\tgroups.namesConflicts[name] = true;\n\n\t\t\t\tif (config.transform.namedGroups) {\n\t\t\t\t\tdelete item.name;\n\t\t\t\t}\n\n\t\t\t\tconst index = groups.lastIndex;\n\t\t\t\tif (!groups.names[name]) {\n\t\t\t\t\tgroups.names[name] = [];\n\t\t\t\t}\n\t\t\t\tgroups.names[name].push(index);\n\n\t\t\t\tif (groups.onNamedGroup) {\n\t\t\t\t\tgroups.onNamedGroup.call(null, name, index);\n\t\t\t\t}\n\n\t\t\t\tif (groups.unmatchedReferences[name]) {\n\t\t\t\t\tdelete groups.unmatchedReferences[name];\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (item.modifierFlags && config.transform.modifiers) {\n\t\t\t\treturn processModifiers(item, regenerateOptions, groups);\n\t\t\t}\n\t\t\t/* falls through */\n\t\tcase 'quantifier':\n\t\t\titem.body = item.body.map(term => {\n\t\t\t\treturn processTerm(term, regenerateOptions, groups);\n\t\t\t});\n\t\t\tbreak;\n\t\tcase 'disjunction':\n\t\t\tconst outerNamesConflicts = groups.namesConflicts;\n\t\t\titem.body = item.body.map(term => {\n\t\t\t\tgroups.namesConflicts = Object.create(outerNamesConflicts);\n\t\t\t\treturn processTerm(term, regenerateOptions, groups);\n\t\t\t});\n\t\t\tbreak;\n\t\tcase 'alternative':\n\t\t\titem.body = flatMap(item.body, term => {\n\t\t\t\tconst res = processTerm(term, regenerateOptions, groups);\n\t\t\t\t// Alternatives cannot contain alternatives; flatten them.\n\t\t\t\treturn res.type === 'alternative' ? res.body : res;\n\t\t\t});\n\t\t\tbreak;\n\t\tcase 'value':\n\t\t\tconst codePoint = item.codePoint;\n\t\t\tconst set = regenerate(codePoint);\n\t\t\tconst folded = maybeFold(codePoint);\n\t\t\tset.add(folded);\n\t\t\tupdate(item, set.toString(regenerateOptions));\n\t\t\tbreak;\n\t\tcase 'reference':\n\t\t\tif (item.name) {\n\t\t\t\tconst name = item.name.value;\n\t\t\t\tconst indexes = groups.names[name];\n\t\t\t\tif (!indexes) {\n\t\t\t\t\tgroups.unmatchedReferences[name] = true;\n\t\t\t\t}\n\n\t\t\t\tif (config.transform.namedGroups) {\n\t\t\t\t\tif (indexes) {\n\t\t\t\t\t\tconst body = indexes.map(index => ({\n\t\t\t\t\t\t\t'type': 'reference',\n\t\t\t\t\t\t\t'matchIndex': index,\n\t\t\t\t\t\t\t'raw': '\\\\' + index,\n\t\t\t\t\t\t}));\n\t\t\t\t\t\tif (body.length === 1) {\n\t\t\t\t\t\t\treturn body[0];\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\t'type': 'alternative',\n\t\t\t\t\t\t\t'body': body,\n\t\t\t\t\t\t\t'raw': body.map(term => term.raw).join(''),\n\t\t\t\t\t\t};\n\t\t\t\t\t}\n\n\t\t\t\t\t// This named reference comes before the group where it’s defined,\n\t\t\t\t\t// so it’s always an empty match.\n\t\t\t\t\treturn {\n\t\t\t\t\t\t'type': 'group',\n\t\t\t\t\t\t'behavior': 'ignore',\n\t\t\t\t\t\t'body': [],\n\t\t\t\t\t\t'raw': '(?:)',\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t}\n\t\t\tbreak;\n\t\tcase 'anchor':\n\t\t\tif (config.modifiersData.m) {\n\t\t\t\tif (item.kind == 'start') {\n\t\t\t\t\tupdate(item, `(?:^|(?<=${NEWLINE_SET.toString()}))`);\n\t\t\t\t} else if (item.kind == 'end') {\n\t\t\t\t\tupdate(item, `(?:$|(?=${NEWLINE_SET.toString()}))`);\n\t\t\t\t}\n\t\t\t}\n\t\tcase 'empty':\n\t\t\t// Nothing to do here.\n\t\t\tbreak;\n\t\t// The `default` clause is only here as a safeguard; it should never be\n\t\t// reached. Code coverage tools should ignore it.\n\t\t/* istanbul ignore next */\n\t\tdefault:\n\t\t\tthrow new Error(`Unknown term type: ${ item.type }`);\n\t}\n\treturn item;\n};\n\nconst config = {\n\t'flags': {\n\t\t'ignoreCase': false,\n\t\t'unicode': false,\n\t\t'unicodeSets': false,\n\t\t'dotAll': false,\n\t\t'multiline': false,\n\t},\n\t'transform': {\n\t\t'dotAllFlag': false,\n\t\t'unicodeFlag': false,\n\t\t'unicodeSetsFlag': false,\n\t\t'unicodePropertyEscapes': false,\n\t\t'namedGroups': false,\n\t\t'modifiers': false,\n\t},\n\t'modifiersData': {\n\t\t'i': undefined,\n\t\t's': undefined,\n\t\t'm': undefined,\n\t},\n\tget useUnicodeFlag() {\n\t\treturn (this.flags.unicode || this.flags.unicodeSets) && !this.transform.unicodeFlag;\n\t}\n};\n\nconst validateOptions = (options) => {\n\tif (!options) return;\n\n\tfor (const key of Object.keys(options)) {\n\t\tconst value = options[key];\n\t\tswitch (key) {\n\t\t\tcase 'dotAllFlag':\n\t\t\tcase 'unicodeFlag':\n\t\t\tcase 'unicodePropertyEscapes':\n\t\t\tcase 'namedGroups':\n\t\t\t\tif (value != null && value !== false && value !== 'transform') {\n\t\t\t\t\tthrow new Error(`.${key} must be false (default) or 'transform'.`);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 'modifiers':\n\t\t\tcase 'unicodeSetsFlag':\n\t\t\t\tif (value != null && value !== false && value !== 'parse' && value !== 'transform') {\n\t\t\t\t\tthrow new Error(`.${key} must be false (default), 'parse' or 'transform'.`);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 'onNamedGroup':\n\t\t\tcase 'onNewFlags':\n\t\t\t\tif (value != null && typeof value !== 'function') {\n\t\t\t\t\tthrow new Error(`.${key} must be a function.`);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tthrow new Error(`.${key} is not a valid regexpu-core option.`);\n\t\t}\n\t}\n};\n\nconst hasFlag = (flags, flag) => flags ? flags.includes(flag) : false;\nconst transform = (options, name) => options ? options[name] === 'transform' : false;\n\nconst rewritePattern = (pattern, flags, options) => {\n\tvalidateOptions(options);\n\n\tconfig.flags.unicode = hasFlag(flags, 'u');\n\tconfig.flags.unicodeSets = hasFlag(flags, 'v');\n\tconfig.flags.ignoreCase = hasFlag(flags, 'i');\n\tconfig.flags.dotAll = hasFlag(flags, 's');\n\tconfig.flags.multiline = hasFlag(flags, 'm');\n\n\tconfig.transform.dotAllFlag = config.flags.dotAll && transform(options, 'dotAllFlag');\n\tconfig.transform.unicodeFlag = (config.flags.unicode || config.flags.unicodeSets) && transform(options, 'unicodeFlag');\n\tconfig.transform.unicodeSetsFlag = config.flags.unicodeSets && transform(options, 'unicodeSetsFlag');\n\n\t// unicodeFlag: 'transform' implies unicodePropertyEscapes: 'transform'\n\tconfig.transform.unicodePropertyEscapes = config.flags.unicode && (\n\t\ttransform(options, 'unicodeFlag') || transform(options, 'unicodePropertyEscapes')\n\t);\n\tconfig.transform.namedGroups = transform(options, 'namedGroups');\n\tconfig.transform.modifiers = transform(options, 'modifiers');\n\n\tconfig.modifiersData.i = undefined;\n\tconfig.modifiersData.s = undefined;\n\tconfig.modifiersData.m = undefined;\n\n\tconst regjsparserFeatures = {\n\t\t'unicodeSet': Boolean(options && options.unicodeSetsFlag),\n\t\t'modifiers': Boolean(options && options.modifiers),\n\n\t\t// Enable every stable RegExp feature by default\n\t\t'unicodePropertyEscape': true,\n\t\t'namedGroups': true,\n\t\t'lookbehind': true,\n\t};\n\n\tconst regenerateOptions = {\n\t\t'hasUnicodeFlag': config.useUnicodeFlag,\n\t\t'bmpOnly': !config.flags.unicode\n\t};\n\n\tconst groups = {\n\t\t'onNamedGroup': options && options.onNamedGroup,\n\t\t'lastIndex': 0,\n\t\t'names': Object.create(null), // { [name]: Array }\n\t\t'namesConflicts': Object.create(null), // { [name]: true }\n\t\t'unmatchedReferences': Object.create(null) // { [name]: true }\n\t};\n\n\tconst tree = parse(pattern, flags, regjsparserFeatures);\n\n\tif (config.transform.modifiers) {\n\t\tif (/\\(\\?[a-z]*-[a-z]+:/.test(pattern)) {\n\t\t\t// the pattern _likely_ contain inline disabled modifiers\n\t\t\t// we need to traverse to make sure that they are actually modifiers and to collect them\n\t\t\tconst allDisabledModifiers = Object.create(null)\n\t\t\tconst itemStack = [tree];\n\t\t\tlet node;\n\t\t\twhile (node = itemStack.pop(), node != undefined) {\n\t\t\t\tif (Array.isArray(node)) {\n\t\t\t\t\tArray.prototype.push.apply(itemStack, node);\n\t\t\t\t} else if (typeof node == 'object' && node != null) {\n\t\t\t\t\tfor (const key of Object.keys(node)) {\n\t\t\t\t\t\tconst value = node[key];\n\t\t\t\t\t\tif (key == 'modifierFlags') {\n\t\t\t\t\t\t\tif (value.disabling.length > 0){\n\t\t\t\t\t\t\t\tvalue.disabling.split('').forEach((flag)=>{\n\t\t\t\t\t\t\t\t\tallDisabledModifiers[flag] = true\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else if (typeof value == 'object' && value != null) {\n\t\t\t\t\t\t\titemStack.push(value);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor (const flag of Object.keys(allDisabledModifiers)) {\n\t\t\t\tconfig.modifiersData[flag] = true;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Note: `processTerm` mutates `tree` and `groups`.\n\tprocessTerm(tree, regenerateOptions, groups);\n\tassertNoUnmatchedReferences(groups);\n\n\tconst onNewFlags = options && options.onNewFlags;\n\tif (onNewFlags) {\n\t\tlet newFlags = flags.split('').filter((flag) => !config.modifiersData[flag]).join('');\n\t\tif (config.transform.unicodeSetsFlag) {\n\t\t\tnewFlags = newFlags.replace('v', 'u');\n\t\t}\n\t\tif (config.transform.unicodeFlag) {\n\t\t\tnewFlags = newFlags.replace('u', '');\n\t\t}\n\t\tif (config.transform.dotAllFlag === 'transform') {\n\t\t\tnewFlags = newFlags.replace('s', '');\n\t\t}\n\t\tonNewFlags(newFlags);\n\t}\n\n\treturn generate(tree);\n};\n\nmodule.exports = rewritePattern;\n","// env vars from the cli are always strings, so !!ENV_VAR returns true for \"false\"\nfunction bool(value) {\n if (value == null) return false;\n return value && value !== \"false\" && value !== \"0\";\n}\n\nmodule.exports = bool(process.env[\"BABEL_8_BREAKING\"])\n ? require(\"semver-BABEL_8_BREAKING-true\")\n : require(\"semver-BABEL_8_BREAKING-false\");\n","export const FEATURES = Object.freeze({\n unicodeFlag: 1 << 0,\n dotAllFlag: 1 << 1,\n unicodePropertyEscape: 1 << 2,\n namedCaptureGroups: 1 << 3,\n // Not used, for backward compatibility with syntax-unicode-sets-regex\n unicodeSetsFlag_syntax: 1 << 4,\n unicodeSetsFlag: 1 << 5,\n duplicateNamedCaptureGroups: 1 << 6,\n modifiers: 1 << 7,\n});\n\n// We can't use a symbol because this needs to always be the same, even if\n// this package isn't deduped by npm. e.g.\n// - node_modules/\n// - @babel/plugin-regexp-features\n// - @babel/plugin-transform-unicode-property-regex\n// - node_modules\n// - @babel-plugin-regexp-features\nexport const featuresKey = \"@babel/plugin-regexp-features/featuresKey\";\nexport const runtimeKey = \"@babel/plugin-regexp-features/runtimeKey\";\n\ntype FeatureType = (typeof FEATURES)[keyof typeof FEATURES];\n\nexport function enableFeature(features: number, feature: FeatureType): number {\n return features | feature;\n}\n\nexport function hasFeature(features: number, feature: FeatureType) {\n return !!(features & feature);\n}\n","import type { types as t } from \"@babel/core\";\nimport { FEATURES, hasFeature } from \"./features.ts\";\n\nimport type { RegexpuOptions } from \"regexpu-core\";\n\nexport function generateRegexpuOptions(\n pattern: string,\n toTransform: number,\n): RegexpuOptions {\n type Experimental = 1;\n\n const feat = (\n name: keyof typeof FEATURES,\n ok: \"transform\" | (Stability extends 0 ? never : \"parse\") = \"transform\",\n ) => {\n return hasFeature(toTransform, FEATURES[name]) ? ok : false;\n };\n\n const featDuplicateNamedGroups = (): \"transform\" | false => {\n if (!feat(\"duplicateNamedCaptureGroups\")) return false;\n\n // This can return false positive, for example for /\\(?\\)/.\n // However, it's such a rare occurrence that it's ok to compile\n // the regexp even if we only need to compile regexps with\n // duplicate named capturing groups.\n const regex = /\\(\\?<([^>]+)>/g;\n const seen = new Set();\n for (let match; (match = regex.exec(pattern)); seen.add(match[1])) {\n if (seen.has(match[1])) return \"transform\";\n }\n return false;\n };\n\n return {\n unicodeFlag: feat(\"unicodeFlag\"),\n unicodeSetsFlag: feat(\"unicodeSetsFlag\") || \"parse\",\n dotAllFlag: feat(\"dotAllFlag\"),\n unicodePropertyEscapes: feat(\"unicodePropertyEscape\"),\n namedGroups: feat(\"namedCaptureGroups\") || featDuplicateNamedGroups(),\n onNamedGroup: () => {},\n modifiers: feat(\"modifiers\"),\n };\n}\n\nexport function canSkipRegexpu(\n node: t.RegExpLiteral,\n options: RegexpuOptions,\n): boolean {\n const { flags, pattern } = node;\n\n if (flags.includes(\"v\")) {\n if (options.unicodeSetsFlag === \"transform\") return false;\n }\n\n if (flags.includes(\"u\")) {\n if (options.unicodeFlag === \"transform\") return false;\n if (\n options.unicodePropertyEscapes === \"transform\" &&\n /\\\\p\\{/i.test(pattern)\n ) {\n return false;\n }\n }\n\n if (flags.includes(\"s\")) {\n if (options.dotAllFlag === \"transform\") return false;\n }\n\n if (options.namedGroups === \"transform\" && /\\(\\?<(?![=!])/.test(pattern)) {\n return false;\n }\n\n if (options.modifiers === \"transform\" && /\\(\\?[\\w-]+:/.test(pattern)) {\n return false;\n }\n\n return true;\n}\n\nexport function transformFlags(regexpuOptions: RegexpuOptions, flags: string) {\n if (regexpuOptions.unicodeSetsFlag === \"transform\") {\n flags = flags.replace(\"v\", \"u\");\n }\n if (regexpuOptions.unicodeFlag === \"transform\") {\n flags = flags.replace(\"u\", \"\");\n }\n if (regexpuOptions.dotAllFlag === \"transform\") {\n flags = flags.replace(\"s\", \"\");\n }\n return flags;\n}\n","import rewritePattern from \"regexpu-core\";\nimport { types as t, type PluginObject, type NodePath } from \"@babel/core\";\nimport annotateAsPure from \"@babel/helper-annotate-as-pure\";\n\nimport semver from \"semver\";\n\nimport {\n featuresKey,\n FEATURES,\n enableFeature,\n runtimeKey,\n hasFeature,\n} from \"./features.ts\";\nimport {\n generateRegexpuOptions,\n canSkipRegexpu,\n transformFlags,\n} from \"./util.ts\";\n\nconst versionKey = \"@babel/plugin-regexp-features/version\";\n\nexport interface Options {\n name: string;\n feature: keyof typeof FEATURES;\n options?: {\n useUnicodeFlag?: boolean;\n runtime?: boolean;\n };\n manipulateOptions?: PluginObject[\"manipulateOptions\"];\n}\n\nexport function createRegExpFeaturePlugin({\n name,\n feature,\n options = {},\n manipulateOptions = () => {},\n}: Options): PluginObject {\n return {\n name,\n\n manipulateOptions,\n\n pre() {\n const { file } = this;\n const features = file.get(featuresKey) ?? 0;\n let newFeatures = enableFeature(features, FEATURES[feature]);\n\n const { useUnicodeFlag, runtime } = options;\n if (useUnicodeFlag === false) {\n newFeatures = enableFeature(newFeatures, FEATURES.unicodeFlag);\n }\n if (newFeatures !== features) {\n file.set(featuresKey, newFeatures);\n }\n\n if (runtime !== undefined) {\n if (\n file.has(runtimeKey) &&\n file.get(runtimeKey) !== runtime &&\n (process.env.BABEL_8_BREAKING ||\n // This check. Is necessary because in Babel 7 we allow multiple\n // copies of transform-named-capturing-groups-regex with\n // conflicting 'runtime' options.\n hasFeature(newFeatures, FEATURES.duplicateNamedCaptureGroups))\n ) {\n throw new Error(\n `The 'runtime' option must be the same for ` +\n `'@babel/plugin-transform-named-capturing-groups-regex' and ` +\n `'@babel/plugin-transform-duplicate-named-capturing-groups-regex'.`,\n );\n }\n\n if (process.env.BABEL_8_BREAKING) {\n file.set(runtimeKey, runtime);\n } else if (\n // This check. Is necessary because in Babel 7 we allow multiple\n // copies of transform-named-capturing-groups-regex with\n // conflicting 'runtime' options.\n feature === \"namedCaptureGroups\"\n ) {\n if (!runtime || !file.has(runtimeKey)) file.set(runtimeKey, runtime);\n } else {\n file.set(runtimeKey, runtime);\n }\n }\n\n if (!process.env.BABEL_8_BREAKING) {\n // Until 7.21.4, we used to encode the version as a number.\n // If file.get(versionKey) is a number, it has thus been\n // set by an older version of this plugin.\n if (typeof file.get(versionKey) === \"number\") {\n file.set(versionKey, PACKAGE_JSON.version);\n return;\n }\n }\n if (\n !file.get(versionKey) ||\n semver.lt(file.get(versionKey), PACKAGE_JSON.version)\n ) {\n file.set(versionKey, PACKAGE_JSON.version);\n }\n },\n\n visitor: {\n RegExpLiteral(path) {\n const { node } = path;\n const { file } = this;\n const features = file.get(featuresKey);\n const runtime = file.get(runtimeKey) ?? true;\n\n const regexpuOptions = generateRegexpuOptions(node.pattern, features);\n if (canSkipRegexpu(node, regexpuOptions)) {\n return;\n }\n\n const namedCaptureGroups: Record = {\n __proto__: null,\n };\n if (regexpuOptions.namedGroups === \"transform\") {\n regexpuOptions.onNamedGroup = (name, index) => {\n const prev = namedCaptureGroups[name];\n if (typeof prev === \"number\") {\n namedCaptureGroups[name] = [prev, index];\n } else if (Array.isArray(prev)) {\n prev.push(index);\n } else {\n namedCaptureGroups[name] = index;\n }\n };\n }\n\n let newFlags;\n if (regexpuOptions.modifiers === \"transform\") {\n regexpuOptions.onNewFlags = flags => {\n newFlags = flags;\n };\n }\n\n node.pattern = rewritePattern(node.pattern, node.flags, regexpuOptions);\n\n if (\n regexpuOptions.namedGroups === \"transform\" &&\n Object.keys(namedCaptureGroups).length > 0 &&\n runtime &&\n !isRegExpTest(path)\n ) {\n const call = t.callExpression(this.addHelper(\"wrapRegExp\"), [\n node,\n t.valueToNode(namedCaptureGroups),\n ]);\n annotateAsPure(call);\n\n path.replaceWith(call);\n }\n\n node.flags = transformFlags(regexpuOptions, newFlags ?? node.flags);\n },\n },\n };\n}\n\nfunction isRegExpTest(path: NodePath) {\n return (\n path.parentPath.isMemberExpression({\n object: path.node,\n computed: false,\n }) && path.parentPath.get(\"property\").isIdentifier({ name: \"test\" })\n );\n}\n","/* eslint-disable @babel/development/plugin-name */\nimport { createRegExpFeaturePlugin } from \"@babel/helper-create-regexp-features-plugin\";\nimport { declare } from \"@babel/helper-plugin-utils\";\n\nexport interface Options {\n runtime?: boolean;\n}\n\nexport default declare((api, options: Options) => {\n api.assertVersion(REQUIRED_VERSION(\"^7.19.0\"));\n\n const { runtime } = options;\n if (runtime !== undefined && typeof runtime !== \"boolean\") {\n throw new Error(\"The 'runtime' option must be boolean\");\n }\n\n return createRegExpFeaturePlugin({\n name: \"transform-duplicate-named-capturing-groups-regex\",\n feature: \"duplicateNamedCaptureGroups\",\n options: { runtime },\n });\n});\n","import { declare } from \"@babel/helper-plugin-utils\";\n\nconst SUPPORTED_MODULES = [\"commonjs\", \"amd\", \"systemjs\"];\n\nconst MODULES_NOT_FOUND = `\\\n@babel/plugin-transform-dynamic-import depends on a modules\ntransform plugin. Supported plugins are:\n - @babel/plugin-transform-modules-commonjs ^7.4.0\n - @babel/plugin-transform-modules-amd ^7.4.0\n - @babel/plugin-transform-modules-systemjs ^7.4.0\n\nIf you are using Webpack or Rollup and thus don't want\nBabel to transpile your imports and exports, you can use\nthe @babel/plugin-syntax-dynamic-import plugin and let your\nbundler handle dynamic imports.\n`;\n\nexport default declare(api => {\n api.assertVersion(REQUIRED_VERSION(7));\n\n return {\n name: \"transform-dynamic-import\",\n inherits:\n USE_ESM || IS_STANDALONE || api.version[0] === \"8\"\n ? undefined\n : // eslint-disable-next-line no-restricted-globals\n require(\"@babel/plugin-syntax-dynamic-import\").default,\n\n pre() {\n // We keep using the old name, for compatibility with older\n // version of the CommonJS transform.\n this.file.set(\n \"@babel/plugin-proposal-dynamic-import\",\n PACKAGE_JSON.version,\n );\n },\n\n visitor: {\n Program() {\n const modules = this.file.get(\"@babel/plugin-transform-modules-*\");\n\n if (!SUPPORTED_MODULES.includes(modules)) {\n throw new Error(MODULES_NOT_FOUND);\n }\n },\n },\n };\n});\n","import { declare } from \"@babel/helper-plugin-utils\";\nimport syntaxExportDefaultFrom from \"@babel/plugin-syntax-export-default-from\";\nimport { types as t } from \"@babel/core\";\n\nexport default declare(api => {\n api.assertVersion(REQUIRED_VERSION(7));\n\n return {\n name: \"proposal-export-default-from\",\n inherits: syntaxExportDefaultFrom,\n\n visitor: {\n ExportNamedDeclaration(path) {\n const { node } = path;\n const { specifiers, source } = node;\n if (!t.isExportDefaultSpecifier(specifiers[0])) return;\n\n const { exported } = specifiers.shift();\n\n if (specifiers.every(s => t.isExportSpecifier(s))) {\n specifiers.unshift(\n t.exportSpecifier(t.identifier(\"default\"), exported),\n );\n return;\n }\n\n path.insertBefore(\n t.exportNamedDeclaration(\n null,\n [t.exportSpecifier(t.identifier(\"default\"), exported)],\n t.cloneNode(source),\n ),\n );\n },\n },\n };\n});\n","import { declare } from \"@babel/helper-plugin-utils\";\nimport { types as t } from \"@babel/core\";\n\nexport default declare(api => {\n api.assertVersion(REQUIRED_VERSION(7));\n\n return {\n name: \"transform-export-namespace-from\",\n inherits:\n USE_ESM || IS_STANDALONE || api.version[0] === \"8\"\n ? undefined\n : // eslint-disable-next-line no-restricted-globals\n require(\"@babel/plugin-syntax-export-namespace-from\").default,\n\n visitor: {\n ExportNamedDeclaration(path) {\n const { node, scope } = path;\n const { specifiers } = node;\n\n const index = t.isExportDefaultSpecifier(specifiers[0]) ? 1 : 0;\n if (!t.isExportNamespaceSpecifier(specifiers[index])) return;\n\n const nodes = [];\n\n if (index === 1) {\n nodes.push(\n t.exportNamedDeclaration(null, [specifiers.shift()], node.source),\n );\n }\n\n const specifier = specifiers.shift();\n const { exported } = specifier;\n const uid = scope.generateUidIdentifier(\n // @ts-expect-error Identifier ?? StringLiteral\n exported.name ?? exported.value,\n );\n\n nodes.push(\n t.importDeclaration(\n [t.importNamespaceSpecifier(uid)],\n t.cloneNode(node.source),\n ),\n t.exportNamedDeclaration(null, [\n t.exportSpecifier(t.cloneNode(uid), exported),\n ]),\n );\n\n if (node.specifiers.length >= 1) {\n nodes.push(node);\n }\n\n const [importDeclaration] = path.replaceWithMultiple(nodes);\n path.scope.registerDeclaration(importDeclaration);\n },\n },\n };\n});\n","import { declare } from \"@babel/helper-plugin-utils\";\nimport syntaxFunctionBind from \"@babel/plugin-syntax-function-bind\";\nimport { types as t, type Scope } from \"@babel/core\";\n\nexport default declare(api => {\n api.assertVersion(REQUIRED_VERSION(7));\n\n function getTempId(scope: Scope) {\n let id = scope.path.getData(\"functionBind\");\n if (id) return t.cloneNode(id);\n\n id = scope.generateDeclaredUidIdentifier(\"context\");\n return scope.path.setData(\"functionBind\", id);\n }\n\n function getObject(bind: t.BindExpression) {\n if (t.isExpression(bind.object)) {\n return bind.object;\n }\n\n return (bind.callee as t.MemberExpression).object;\n }\n\n function getStaticContext(bind: t.BindExpression, scope: Scope) {\n const object = getObject(bind);\n return (\n scope.isStatic(object) &&\n (t.isSuper(object) ? t.thisExpression() : object)\n );\n }\n\n function inferBindContext(bind: t.BindExpression, scope: Scope) {\n const staticContext = getStaticContext(bind, scope);\n if (staticContext) return t.cloneNode(staticContext);\n\n const tempId = getTempId(scope);\n if (bind.object) {\n bind.callee = t.sequenceExpression([\n t.assignmentExpression(\"=\", tempId, bind.object),\n bind.callee,\n ]);\n } else if (t.isMemberExpression(bind.callee)) {\n bind.callee.object = t.assignmentExpression(\n \"=\",\n tempId,\n // @ts-ignore(Babel 7 vs Babel 8) Fixme: support `super.foo(?)`\n bind.callee.object,\n );\n }\n return t.cloneNode(tempId);\n }\n\n return {\n name: \"proposal-function-bind\",\n inherits: syntaxFunctionBind,\n\n visitor: {\n CallExpression({ node, scope }) {\n const bind = node.callee;\n if (!t.isBindExpression(bind)) return;\n\n const context = inferBindContext(bind, scope);\n node.callee = t.memberExpression(bind.callee, t.identifier(\"call\"));\n node.arguments.unshift(context);\n },\n\n BindExpression(path) {\n const { node, scope } = path;\n const context = inferBindContext(node, scope);\n path.replaceWith(\n t.callExpression(\n t.memberExpression(node.callee, t.identifier(\"bind\")),\n [context],\n ),\n );\n },\n },\n };\n});\n","import { declare } from \"@babel/helper-plugin-utils\";\nimport syntaxFunctionSent from \"@babel/plugin-syntax-function-sent\";\nimport wrapFunction from \"@babel/helper-wrap-function\";\nimport { types as t, type Visitor } from \"@babel/core\";\n\nexport default declare(api => {\n api.assertVersion(REQUIRED_VERSION(7));\n\n const isFunctionSent = (node: t.MetaProperty) =>\n t.isIdentifier(node.meta, { name: \"function\" }) &&\n t.isIdentifier(node.property, { name: \"sent\" });\n\n const hasBeenReplaced = (\n node: t.Node,\n sentId: string,\n ): node is t.AssignmentExpression =>\n t.isAssignmentExpression(node) &&\n t.isIdentifier(node.left, { name: sentId });\n\n const yieldVisitor: Visitor<{ sentId: string }> = {\n Function(path) {\n path.skip();\n },\n\n YieldExpression(path) {\n if (!hasBeenReplaced(path.parent, this.sentId)) {\n path.replaceWith(\n t.assignmentExpression(\"=\", t.identifier(this.sentId), path.node),\n );\n }\n },\n\n MetaProperty(path) {\n if (isFunctionSent(path.node)) {\n path.replaceWith(t.identifier(this.sentId));\n }\n },\n };\n\n return {\n name: \"proposal-function-sent\",\n inherits: syntaxFunctionSent,\n\n visitor: {\n MetaProperty(path, state) {\n if (!isFunctionSent(path.node)) return;\n\n const fnPath = path.getFunctionParent();\n\n if (!fnPath.node.generator) {\n throw new Error(\"Parent generator function not found\");\n }\n\n const sentId = path.scope.generateUid(\"function.sent\");\n\n fnPath.traverse(yieldVisitor, { sentId });\n // @ts-expect-error A generator must not be an arrow function\n fnPath.node.body.body.unshift(\n t.variableDeclaration(\"let\", [\n t.variableDeclarator(t.identifier(sentId), t.yieldExpression()),\n ]),\n );\n\n wrapFunction(fnPath, state.addHelper(\"skipFirstGeneratorNext\"));\n },\n },\n };\n});\n","import { declare } from \"@babel/helper-plugin-utils\";\nimport type { NodePath, types as t } from \"@babel/core\";\n\nexport default declare(api => {\n api.assertVersion(REQUIRED_VERSION(7));\n const regex = /(\\\\*)([\\u2028\\u2029])/g;\n function replace(match: string, escapes: string, separator: string) {\n // If there's an odd number, that means the separator itself was escaped.\n // \"\\X\" escapes X.\n // \"\\\\X\" escapes the backslash, so X is unescaped.\n const isEscaped = escapes.length % 2 === 1;\n if (isEscaped) return match;\n\n return `${escapes}\\\\u${separator.charCodeAt(0).toString(16)}`;\n }\n\n return {\n name: \"transform-json-strings\",\n inherits:\n USE_ESM || IS_STANDALONE || api.version[0] === \"8\"\n ? undefined\n : // eslint-disable-next-line no-restricted-globals\n require(\"@babel/plugin-syntax-json-strings\").default,\n\n visitor: {\n \"DirectiveLiteral|StringLiteral\"({\n node,\n }: NodePath) {\n const { extra } = node;\n if (!extra?.raw) return;\n\n extra.raw = (extra.raw as string).replace(regex, replace);\n },\n },\n };\n});\n","import { declare } from \"@babel/helper-plugin-utils\";\nimport { types as t } from \"@babel/core\";\n\nexport default declare(api => {\n api.assertVersion(REQUIRED_VERSION(7));\n\n return {\n name: \"transform-logical-assignment-operators\",\n inherits:\n USE_ESM || IS_STANDALONE || api.version[0] === \"8\"\n ? undefined\n : // eslint-disable-next-line no-restricted-globals\n require(\"@babel/plugin-syntax-logical-assignment-operators\").default,\n\n visitor: {\n AssignmentExpression(path) {\n const { node, scope } = path;\n const { operator, left, right } = node;\n const operatorTrunc = operator.slice(0, -1);\n if (!t.LOGICAL_OPERATORS.includes(operatorTrunc)) {\n return;\n }\n\n const lhs = t.cloneNode(left) as t.Identifier | t.MemberExpression;\n if (t.isMemberExpression(left)) {\n const { object, property, computed } = left;\n const memo = scope.maybeGenerateMemoised(object);\n if (memo) {\n left.object = memo;\n (lhs as t.MemberExpression).object = t.assignmentExpression(\n \"=\",\n t.cloneNode(memo),\n // object must not be Super when `memo` is an identifier\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion\n object as t.Expression,\n );\n }\n\n if (computed) {\n const memo = scope.maybeGenerateMemoised(property);\n if (memo) {\n left.property = memo;\n (lhs as t.MemberExpression).property = t.assignmentExpression(\n \"=\",\n t.cloneNode(memo),\n // @ts-expect-error todo(flow->ts): property can be t.PrivateName\n property,\n );\n }\n }\n }\n\n path.replaceWith(\n t.logicalExpression(\n // @ts-expect-error operatorTrunc has been tested by t.LOGICAL_OPERATORS\n operatorTrunc,\n lhs,\n t.assignmentExpression(\"=\", left, right),\n ),\n );\n },\n },\n };\n});\n","import { declare } from \"@babel/helper-plugin-utils\";\nimport { types as t, template } from \"@babel/core\";\n\nexport interface Options {\n loose?: boolean;\n}\n\nexport default declare((api, { loose = false }: Options) => {\n api.assertVersion(REQUIRED_VERSION(7));\n const noDocumentAll = api.assumption(\"noDocumentAll\") ?? loose;\n\n return {\n name: \"transform-nullish-coalescing-operator\",\n inherits:\n USE_ESM || IS_STANDALONE || api.version[0] === \"8\"\n ? undefined\n : // eslint-disable-next-line no-restricted-globals\n require(\"@babel/plugin-syntax-nullish-coalescing-operator\").default,\n\n visitor: {\n LogicalExpression(path) {\n const { node, scope } = path;\n if (node.operator !== \"??\") {\n return;\n }\n\n let ref;\n let assignment;\n // skip creating extra reference when `left` is static\n if (scope.isStatic(node.left)) {\n ref = node.left;\n assignment = t.cloneNode(node.left);\n } else if (scope.path.isPattern()) {\n // Replace `function (a, x = a.b ?? c) {}` to `function (a, x = (() => a.b ?? c)() ){}`\n // so the temporary variable can be injected in correct scope\n path.replaceWith(template.statement.ast`(() => ${path.node})()`);\n // The injected nullish expression will be queued and eventually transformed when visited\n return;\n } else {\n ref = scope.generateUidIdentifierBasedOnNode(node.left);\n scope.push({ id: t.cloneNode(ref) });\n assignment = t.assignmentExpression(\"=\", ref, node.left);\n }\n\n path.replaceWith(\n t.conditionalExpression(\n // We cannot use `!= null` in spec mode because\n // `document.all == null` and `document.all` is not \"nullish\".\n noDocumentAll\n ? t.binaryExpression(\"!=\", assignment, t.nullLiteral())\n : t.logicalExpression(\n \"&&\",\n t.binaryExpression(\"!==\", assignment, t.nullLiteral()),\n t.binaryExpression(\n \"!==\",\n t.cloneNode(ref),\n scope.buildUndefinedNode(),\n ),\n ),\n t.cloneNode(ref),\n node.right,\n ),\n );\n },\n },\n };\n});\n","import { declare } from \"@babel/helper-plugin-utils\";\nimport type { NodePath, types as t } from \"@babel/core\";\n\n/**\n * Given a bigIntLiteral or NumericLiteral, remove numeric\n * separator `_` from its raw representation\n *\n * @param {NodePath} { node }: A Babel AST node path\n */\nfunction remover({ node }: NodePath) {\n const { extra } = node;\n // @ts-expect-error todo(flow->ts)\n if (extra?.raw?.includes(\"_\")) {\n // @ts-expect-error todo(flow->ts)\n extra.raw = extra.raw.replace(/_/g, \"\");\n }\n}\n\nexport default declare(api => {\n api.assertVersion(REQUIRED_VERSION(7));\n\n return {\n name: \"transform-numeric-separator\",\n inherits:\n USE_ESM || IS_STANDALONE || api.version[0] === \"8\"\n ? undefined\n : // eslint-disable-next-line no-restricted-globals\n require(\"@babel/plugin-syntax-numeric-separator\").default,\n\n visitor: {\n NumericLiteral: remover,\n BigIntLiteral: remover,\n },\n };\n});\n","import type { types as t } from \"@babel/core\";\n\n/**\n * This is a helper function to determine if we should create an intermediate variable\n * such that the RHS of an assignment is not duplicated.\n *\n * See https://github.com/babel/babel/pull/13711#issuecomment-914388382 for discussion\n * on further optimizations.\n */\nexport default function shouldStoreRHSInTemporaryVariable(\n node: t.LVal,\n): boolean {\n if (!node) return false;\n if (node.type === \"ArrayPattern\") {\n const nonNullElements = node.elements.filter(element => element !== null);\n if (nonNullElements.length > 1) return true;\n else return shouldStoreRHSInTemporaryVariable(nonNullElements[0]);\n } else if (node.type === \"ObjectPattern\") {\n const { properties } = node;\n if (properties.length > 1) return true;\n else if (properties.length === 0) return false;\n else {\n const firstProperty = properties[0];\n if (firstProperty.type === \"ObjectProperty\") {\n // the value of the property must be an LVal\n return shouldStoreRHSInTemporaryVariable(firstProperty.value as t.LVal);\n } else {\n return shouldStoreRHSInTemporaryVariable(firstProperty);\n }\n }\n } else if (node.type === \"AssignmentPattern\") {\n return shouldStoreRHSInTemporaryVariable(node.left);\n } else if (node.type === \"RestElement\") {\n if (node.argument.type === \"Identifier\") return true;\n return shouldStoreRHSInTemporaryVariable(node.argument);\n } else {\n // node is Identifier or MemberExpression\n return false;\n }\n}\n","export default {\n \"Object.assign\": {\n chrome: \"49\",\n opera: \"36\",\n edge: \"13\",\n firefox: \"36\",\n safari: \"10\",\n node: \"6\",\n deno: \"1\",\n ios: \"10\",\n samsung: \"5\",\n opera_mobile: \"36\",\n electron: \"0.37\",\n },\n};\n","import { declare } from \"@babel/helper-plugin-utils\";\nimport { types as t } from \"@babel/core\";\nimport type { PluginPass, NodePath, Scope } from \"@babel/core\";\nimport { convertFunctionParams } from \"@babel/plugin-transform-parameters\";\nimport { isRequired } from \"@babel/helper-compilation-targets\";\nimport shouldStoreRHSInTemporaryVariable from \"./shouldStoreRHSInTemporaryVariable.ts\";\nimport compatData from \"./compat-data.ts\";\n\nconst { isAssignmentPattern, isObjectProperty } = t;\n// @babel/types <=7.3.3 counts FOO as referenced in var { x: FOO }.\n// We need to detect this bug to know if \"unused\" means 0 or 1 references.\nif (!process.env.BABEL_8_BREAKING) {\n const node = t.identifier(\"a\");\n const property = t.objectProperty(t.identifier(\"key\"), node);\n const pattern = t.objectPattern([property]);\n\n // eslint-disable-next-line no-var\n var ZERO_REFS = t.isReferenced(node, property, pattern) ? 1 : 0;\n}\n\ntype Param = NodePath;\nexport interface Options {\n useBuiltIns?: boolean;\n loose?: boolean;\n}\n\nexport default declare((api, opts: Options) => {\n api.assertVersion(REQUIRED_VERSION(7));\n\n const targets = api.targets();\n const supportsObjectAssign = !isRequired(\"Object.assign\", targets, {\n compatData,\n });\n\n const { useBuiltIns = supportsObjectAssign, loose = false } = opts;\n\n if (typeof loose !== \"boolean\") {\n throw new Error(\".loose must be a boolean, or undefined\");\n }\n\n const ignoreFunctionLength = api.assumption(\"ignoreFunctionLength\") ?? loose;\n const objectRestNoSymbols = api.assumption(\"objectRestNoSymbols\") ?? loose;\n const pureGetters = api.assumption(\"pureGetters\") ?? loose;\n const setSpreadProperties = api.assumption(\"setSpreadProperties\") ?? loose;\n\n function getExtendsHelper(\n file: PluginPass,\n ): t.MemberExpression | t.Identifier {\n return useBuiltIns\n ? t.memberExpression(t.identifier(\"Object\"), t.identifier(\"assign\"))\n : file.addHelper(\"extends\");\n }\n\n function hasRestElement(path: Param) {\n let foundRestElement = false;\n visitRestElements(path, restElement => {\n foundRestElement = true;\n restElement.stop();\n });\n return foundRestElement;\n }\n\n function hasObjectPatternRestElement(path: NodePath): boolean {\n let foundRestElement = false;\n visitRestElements(path, restElement => {\n if (restElement.parentPath.isObjectPattern()) {\n foundRestElement = true;\n restElement.stop();\n }\n });\n return foundRestElement;\n }\n\n function visitRestElements(\n path: NodePath,\n visitor: (path: NodePath) => any,\n ) {\n path.traverse({\n Expression(path) {\n const { parent, key } = path;\n if (\n (isAssignmentPattern(parent) && key === \"right\") ||\n (isObjectProperty(parent) && parent.computed && key === \"key\")\n ) {\n path.skip();\n }\n },\n RestElement: visitor,\n });\n }\n\n function hasSpread(node: t.ObjectExpression): boolean {\n for (const prop of node.properties) {\n if (t.isSpreadElement(prop)) {\n return true;\n }\n }\n return false;\n }\n\n // returns an array of all keys of an object, and a status flag indicating if all extracted keys\n // were converted to stringLiterals or not\n // e.g. extracts {keys: [\"a\", \"b\", \"3\", ++x], allPrimitives: false }\n // from ast of {a: \"foo\", b, 3: \"bar\", [++x]: \"baz\"}\n // `allPrimitives: false` doesn't necessarily mean that there is a non-primitive, but just\n // that we are not sure.\n function extractNormalizedKeys(node: t.ObjectPattern) {\n // RestElement has been removed in createObjectRest\n const props = node.properties as t.ObjectProperty[];\n const keys: t.Expression[] = [];\n let allPrimitives = true;\n let hasTemplateLiteral = false;\n\n for (const prop of props) {\n const { key } = prop;\n if (t.isIdentifier(key) && !prop.computed) {\n // since a key {a: 3} is equivalent to {\"a\": 3}, use the latter\n keys.push(t.stringLiteral(key.name));\n } else if (t.isTemplateLiteral(key)) {\n keys.push(t.cloneNode(key));\n hasTemplateLiteral = true;\n } else if (t.isLiteral(key)) {\n keys.push(\n t.stringLiteral(\n String(\n // @ts-expect-error prop.key can not be a NullLiteral\n key.value,\n ),\n ),\n );\n } else {\n // @ts-expect-error private name has been handled by destructuring-private\n keys.push(t.cloneNode(key));\n\n if (\n (t.isMemberExpression(key, { computed: false }) &&\n t.isIdentifier(key.object, { name: \"Symbol\" })) ||\n (t.isCallExpression(key) &&\n t.matchesPattern(key.callee, \"Symbol.for\"))\n ) {\n // there all return a primitive\n } else {\n allPrimitives = false;\n }\n }\n }\n\n return { keys, allPrimitives, hasTemplateLiteral };\n }\n\n // replaces impure computed keys with new identifiers\n // and returns variable declarators of these new identifiers\n function replaceImpureComputedKeys(\n properties: NodePath[],\n scope: Scope,\n ) {\n const impureComputedPropertyDeclarators: t.VariableDeclarator[] = [];\n for (const propPath of properties) {\n // PrivateName is handled in destructuring-private plugin\n const key = propPath.get(\"key\") as NodePath;\n if (propPath.node.computed && !key.isPure()) {\n const name = scope.generateUidBasedOnNode(key.node);\n const declarator = t.variableDeclarator(t.identifier(name), key.node);\n impureComputedPropertyDeclarators.push(declarator);\n key.replaceWith(t.identifier(name));\n }\n }\n return impureComputedPropertyDeclarators;\n }\n\n function removeUnusedExcludedKeys(path: NodePath): void {\n const bindings = path.getOuterBindingIdentifierPaths();\n\n Object.keys(bindings).forEach(bindingName => {\n const bindingParentPath = bindings[bindingName].parentPath;\n if (\n path.scope.getBinding(bindingName).references >\n (process.env.BABEL_8_BREAKING ? 0 : ZERO_REFS) ||\n !bindingParentPath.isObjectProperty()\n ) {\n return;\n }\n bindingParentPath.remove();\n });\n }\n\n //expects path to an object pattern\n function createObjectRest(\n path: NodePath,\n file: PluginPass,\n objRef: t.Identifier | t.MemberExpression,\n ): [t.VariableDeclarator[], t.LVal, t.CallExpression] {\n const props = path.get(\"properties\");\n const last = props[props.length - 1];\n t.assertRestElement(last.node);\n const restElement = t.cloneNode(last.node);\n last.remove();\n\n const impureComputedPropertyDeclarators = replaceImpureComputedKeys(\n path.get(\"properties\") as NodePath[],\n path.scope,\n );\n const { keys, allPrimitives, hasTemplateLiteral } = extractNormalizedKeys(\n path.node,\n );\n\n if (keys.length === 0) {\n return [\n impureComputedPropertyDeclarators,\n restElement.argument,\n t.callExpression(getExtendsHelper(file), [\n t.objectExpression([]),\n t.sequenceExpression([\n t.callExpression(file.addHelper(\"objectDestructuringEmpty\"), [\n t.cloneNode(objRef),\n ]),\n t.cloneNode(objRef),\n ]),\n ]),\n ];\n }\n\n let keyExpression;\n if (!allPrimitives) {\n // map to toPropertyKey to handle the possible non-string values\n keyExpression = t.callExpression(\n t.memberExpression(t.arrayExpression(keys), t.identifier(\"map\")),\n [file.addHelper(\"toPropertyKey\")],\n );\n } else {\n keyExpression = t.arrayExpression(keys);\n\n if (!hasTemplateLiteral && !t.isProgram(path.scope.block)) {\n // Hoist definition of excluded keys, so that it's not created each time.\n const program = path.findParent(path => path.isProgram());\n const id = path.scope.generateUidIdentifier(\"excluded\");\n\n program.scope.push({\n id,\n init: keyExpression,\n kind: \"const\",\n });\n\n keyExpression = t.cloneNode(id);\n }\n }\n\n return [\n impureComputedPropertyDeclarators,\n restElement.argument,\n t.callExpression(\n file.addHelper(\n `objectWithoutProperties${objectRestNoSymbols ? \"Loose\" : \"\"}`,\n ),\n [t.cloneNode(objRef), keyExpression],\n ),\n ];\n }\n\n function replaceRestElement(\n parentPath: NodePath,\n paramPath: NodePath<\n t.Function[\"params\"][number] | t.AssignmentPattern[\"left\"]\n >,\n container?: t.VariableDeclaration[],\n ): void {\n if (paramPath.isAssignmentPattern()) {\n replaceRestElement(parentPath, paramPath.get(\"left\"), container);\n return;\n }\n\n if (paramPath.isArrayPattern() && hasRestElement(paramPath)) {\n const elements = paramPath.get(\"elements\");\n\n for (let i = 0; i < elements.length; i++) {\n replaceRestElement(parentPath, elements[i], container);\n }\n }\n\n if (paramPath.isObjectPattern() && hasRestElement(paramPath)) {\n const uid = parentPath.scope.generateUidIdentifier(\"ref\");\n\n const declar = t.variableDeclaration(\"let\", [\n t.variableDeclarator(paramPath.node, uid),\n ]);\n\n if (container) {\n container.push(declar);\n } else {\n parentPath.ensureBlock();\n (parentPath.get(\"body\") as NodePath).unshiftContainer(\n \"body\",\n declar,\n );\n }\n paramPath.replaceWith(t.cloneNode(uid));\n }\n }\n\n return {\n name: \"transform-object-rest-spread\",\n inherits:\n USE_ESM || IS_STANDALONE || api.version[0] === \"8\"\n ? undefined\n : // eslint-disable-next-line no-restricted-globals\n require(\"@babel/plugin-syntax-object-rest-spread\").default,\n\n visitor: {\n // function a({ b, ...c }) {}\n Function(path) {\n const params = path.get(\"params\");\n const paramsWithRestElement = new Set();\n const idsInRestParams = new Set();\n for (let i = 0; i < params.length; ++i) {\n const param = params[i];\n if (hasRestElement(param)) {\n paramsWithRestElement.add(i);\n for (const name of Object.keys(param.getBindingIdentifiers())) {\n idsInRestParams.add(name);\n }\n }\n }\n\n // if true, a parameter exists that has an id in its initializer\n // that is also an id bound in a rest parameter\n // example: f({...R}, a = R)\n let idInRest = false;\n\n const IdentifierHandler = function (\n path: NodePath,\n functionScope: Scope,\n ) {\n const name = path.node.name;\n if (\n path.scope.getBinding(name) === functionScope.getBinding(name) &&\n idsInRestParams.has(name)\n ) {\n idInRest = true;\n path.stop();\n }\n };\n\n let i: number;\n for (i = 0; i < params.length && !idInRest; ++i) {\n const param = params[i];\n if (!paramsWithRestElement.has(i)) {\n if (param.isReferencedIdentifier() || param.isBindingIdentifier()) {\n IdentifierHandler(param, path.scope);\n } else {\n param.traverse(\n {\n \"Scope|TypeAnnotation|TSTypeAnnotation\": path => path.skip(),\n \"ReferencedIdentifier|BindingIdentifier\": IdentifierHandler,\n },\n path.scope,\n );\n }\n }\n }\n\n if (!idInRest) {\n for (let i = 0; i < params.length; ++i) {\n const param = params[i];\n if (paramsWithRestElement.has(i)) {\n replaceRestElement(path, param);\n }\n }\n } else {\n const shouldTransformParam = (idx: number) =>\n idx >= i - 1 || paramsWithRestElement.has(idx);\n convertFunctionParams(\n path,\n ignoreFunctionLength,\n shouldTransformParam,\n replaceRestElement,\n );\n }\n },\n\n // adapted from transform-destructuring/src/index.js#pushObjectRest\n // const { a, ...b } = c;\n VariableDeclarator(path, file) {\n if (!path.get(\"id\").isObjectPattern()) {\n return;\n }\n\n let insertionPath = path;\n const originalPath = path;\n\n visitRestElements(path.get(\"id\"), path => {\n if (!path.parentPath.isObjectPattern()) {\n // Return early if the parent is not an ObjectPattern, but\n // (for example) an ArrayPattern or Function, because that\n // means this RestElement is an not an object property.\n return;\n }\n\n if (\n // skip single-property case, e.g.\n // const { ...x } = foo();\n // since the RHS will not be duplicated\n shouldStoreRHSInTemporaryVariable(originalPath.node.id) &&\n !t.isIdentifier(originalPath.node.init)\n ) {\n // const { a, ...b } = foo();\n // to avoid calling foo() twice, as a first step convert it to:\n // const _foo = foo(),\n // { a, ...b } = _foo;\n const initRef = path.scope.generateUidIdentifierBasedOnNode(\n originalPath.node.init,\n \"ref\",\n );\n // insert _foo = foo()\n originalPath.insertBefore(\n t.variableDeclarator(initRef, originalPath.node.init),\n );\n // replace foo() with _foo\n originalPath.replaceWith(\n t.variableDeclarator(originalPath.node.id, t.cloneNode(initRef)),\n );\n\n return;\n }\n\n let ref = originalPath.node.init;\n const refPropertyPath: NodePath[] = [];\n let kind;\n\n path.findParent((path: NodePath): boolean => {\n if (path.isObjectProperty()) {\n refPropertyPath.unshift(path);\n } else if (path.isVariableDeclarator()) {\n kind = path.parentPath.node.kind;\n return true;\n }\n });\n\n const impureObjRefComputedDeclarators = replaceImpureComputedKeys(\n refPropertyPath,\n path.scope,\n );\n refPropertyPath.forEach(prop => {\n const { node } = prop;\n ref = t.memberExpression(\n ref,\n t.cloneNode(node.key),\n node.computed || t.isLiteral(node.key),\n );\n });\n\n //@ts-expect-error: findParent can not apply assertions on result shape\n const objectPatternPath: NodePath = path.findParent(\n path => path.isObjectPattern(),\n );\n\n const [impureComputedPropertyDeclarators, argument, callExpression] =\n createObjectRest(\n objectPatternPath,\n file,\n ref as t.MemberExpression,\n );\n\n if (pureGetters) {\n removeUnusedExcludedKeys(objectPatternPath);\n }\n\n t.assertIdentifier(argument);\n\n insertionPath.insertBefore(impureComputedPropertyDeclarators);\n\n insertionPath.insertBefore(impureObjRefComputedDeclarators);\n\n insertionPath = insertionPath.insertAfter(\n t.variableDeclarator(argument, callExpression),\n )[0] as NodePath;\n\n path.scope.registerBinding(kind, insertionPath);\n\n if (objectPatternPath.node.properties.length === 0) {\n objectPatternPath\n .findParent(\n path => path.isObjectProperty() || path.isVariableDeclarator(),\n )\n .remove();\n }\n });\n },\n\n // taken from transform-destructuring/src/index.js#visitor\n // export var { a, ...b } = c;\n ExportNamedDeclaration(path) {\n const declaration = path.get(\"declaration\");\n if (!declaration.isVariableDeclaration()) return;\n\n const hasRest = declaration\n .get(\"declarations\")\n .some(path => hasObjectPatternRestElement(path.get(\"id\")));\n if (!hasRest) return;\n\n const specifiers = [];\n\n for (const name of Object.keys(path.getOuterBindingIdentifiers(true))) {\n specifiers.push(\n t.exportSpecifier(t.identifier(name), t.identifier(name)),\n );\n }\n\n // Split the declaration and export list into two declarations so that the variable\n // declaration can be split up later without needing to worry about not being a\n // top-level statement.\n path.replaceWith(declaration.node);\n path.insertAfter(t.exportNamedDeclaration(null, specifiers));\n },\n\n // try {} catch ({a, ...b}) {}\n CatchClause(path) {\n const paramPath = path.get(\"param\");\n replaceRestElement(path, paramPath);\n },\n\n // ({a, ...b} = c);\n AssignmentExpression(path, file) {\n const leftPath = path.get(\"left\");\n if (leftPath.isObjectPattern() && hasRestElement(leftPath)) {\n const nodes = [];\n\n const refName = path.scope.generateUidBasedOnNode(\n path.node.right,\n \"ref\",\n );\n\n nodes.push(\n t.variableDeclaration(\"var\", [\n t.variableDeclarator(t.identifier(refName), path.node.right),\n ]),\n );\n\n const [impureComputedPropertyDeclarators, argument, callExpression] =\n createObjectRest(leftPath, file, t.identifier(refName));\n\n if (impureComputedPropertyDeclarators.length > 0) {\n nodes.push(\n t.variableDeclaration(\"var\", impureComputedPropertyDeclarators),\n );\n }\n\n const nodeWithoutSpread = t.cloneNode(path.node);\n nodeWithoutSpread.right = t.identifier(refName);\n nodes.push(t.expressionStatement(nodeWithoutSpread));\n nodes.push(\n t.expressionStatement(\n t.assignmentExpression(\"=\", argument, callExpression),\n ),\n );\n nodes.push(t.expressionStatement(t.identifier(refName)));\n\n path.replaceWithMultiple(nodes);\n }\n },\n\n // taken from transform-destructuring/src/index.js#visitor\n ForXStatement(path: NodePath) {\n const { node, scope } = path;\n const leftPath = path.get(\"left\");\n const left = node.left;\n\n if (!hasObjectPatternRestElement(leftPath)) {\n return;\n }\n\n if (!t.isVariableDeclaration(left)) {\n // for ({a, ...b} of []) {}\n const temp = scope.generateUidIdentifier(\"ref\");\n\n node.left = t.variableDeclaration(\"var\", [\n t.variableDeclarator(temp),\n ]);\n\n path.ensureBlock();\n const body = path.node.body as t.BlockStatement;\n\n if (body.body.length === 0 && path.isCompletionRecord()) {\n body.body.unshift(\n t.expressionStatement(scope.buildUndefinedNode()),\n );\n }\n\n body.body.unshift(\n t.expressionStatement(\n t.assignmentExpression(\"=\", left, t.cloneNode(temp)),\n ),\n );\n } else {\n // for (var {a, ...b} of []) {}\n const pattern = left.declarations[0].id;\n\n const key = scope.generateUidIdentifier(\"ref\");\n node.left = t.variableDeclaration(left.kind, [\n t.variableDeclarator(key, null),\n ]);\n\n path.ensureBlock();\n const body = node.body as t.BlockStatement;\n\n body.body.unshift(\n t.variableDeclaration(node.left.kind, [\n t.variableDeclarator(pattern, t.cloneNode(key)),\n ]),\n );\n }\n },\n\n // [{a, ...b}] = c;\n ArrayPattern(path) {\n const objectPatterns: t.VariableDeclarator[] = [];\n\n visitRestElements(path, path => {\n if (!path.parentPath.isObjectPattern()) {\n // Return early if the parent is not an ObjectPattern, but\n // (for example) an ArrayPattern or Function, because that\n // means this RestElement is an not an object property.\n return;\n }\n\n const objectPattern = path.parentPath;\n\n const uid = path.scope.generateUidIdentifier(\"ref\");\n objectPatterns.push(t.variableDeclarator(objectPattern.node, uid));\n\n objectPattern.replaceWith(t.cloneNode(uid));\n path.skip();\n });\n\n if (objectPatterns.length > 0) {\n const statementPath = path.getStatementParent();\n const statementNode = statementPath.node;\n const kind =\n statementNode.type === \"VariableDeclaration\"\n ? statementNode.kind\n : \"var\";\n statementPath.insertAfter(\n t.variableDeclaration(kind, objectPatterns),\n );\n }\n },\n\n // var a = { ...b, ...c }\n ObjectExpression(path, file) {\n if (!hasSpread(path.node)) return;\n\n let helper: t.Identifier | t.MemberExpression;\n if (setSpreadProperties) {\n helper = getExtendsHelper(file);\n } else {\n if (process.env.BABEL_8_BREAKING) {\n helper = file.addHelper(\"objectSpread2\");\n } else {\n try {\n helper = file.addHelper(\"objectSpread2\");\n } catch {\n // TODO: This is needed to workaround https://github.com/babel/babel/issues/10187\n // and https://github.com/babel/babel/issues/10179 for older @babel/core versions\n // where #10187 isn't fixed.\n this.file.declarations[\"objectSpread2\"] = null;\n\n // objectSpread2 has been introduced in v7.5.0\n // We have to maintain backward compatibility.\n helper = file.addHelper(\"objectSpread\");\n }\n }\n }\n\n let exp: t.CallExpression = null;\n let props: t.ObjectMember[] = [];\n\n function make() {\n const hadProps = props.length > 0;\n const obj = t.objectExpression(props);\n props = [];\n\n if (!exp) {\n exp = t.callExpression(helper, [obj]);\n return;\n }\n\n // When we can assume that getters are pure and don't depend on\n // the order of evaluation, we can avoid making multiple calls.\n if (pureGetters) {\n if (hadProps) {\n exp.arguments.push(obj);\n }\n return;\n }\n\n exp = t.callExpression(t.cloneNode(helper), [\n exp,\n // If we have static props, we need to insert an empty object\n // because the odd arguments are copied with [[Get]], not\n // [[GetOwnProperty]]\n ...(hadProps ? [t.objectExpression([]), obj] : []),\n ]);\n }\n\n for (const prop of path.node.properties) {\n if (t.isSpreadElement(prop)) {\n make();\n exp.arguments.push(prop.argument);\n } else {\n props.push(prop);\n }\n }\n\n if (props.length) make();\n\n path.replaceWith(exp);\n },\n },\n };\n});\n","import { declare } from \"@babel/helper-plugin-utils\";\n\nexport default declare(api => {\n api.assertVersion(REQUIRED_VERSION(7));\n\n return {\n name: \"transform-optional-catch-binding\",\n inherits:\n USE_ESM || IS_STANDALONE || api.version[0] === \"8\"\n ? undefined\n : // eslint-disable-next-line no-restricted-globals\n require(\"@babel/plugin-syntax-optional-catch-binding\").default,\n\n visitor: {\n CatchClause(path) {\n if (!path.node.param) {\n const uid = path.scope.generateUidIdentifier(\"unused\");\n const paramPath = path.get(\"param\");\n paramPath.replaceWith(uid);\n }\n },\n },\n };\n});\n","import type { NodePath } from \"@babel/core\";\nimport { isTransparentExprWrapper } from \"@babel/helper-skip-transparent-expression-wrappers\";\n/**\n * Test if a NodePath will be cast to boolean when evaluated.\n * It respects transparent expression wrappers defined in\n * \"@babel/helper-skip-transparent-expression-wrappers\"\n *\n * @example\n * // returns true\n * const nodePathADotB = NodePath(\"if (a.b) {}\").get(\"test\"); // a.b\n * willPathCastToBoolean(nodePathADotB)\n * @example\n * // returns false\n * willPathCastToBoolean(NodePath(\"a.b\"))\n * @param {NodePath} path\n * @returns {boolean}\n */\nexport function willPathCastToBoolean(path: NodePath): boolean {\n const maybeWrapped = findOutermostTransparentParent(path);\n const { node, parentPath } = maybeWrapped;\n if (parentPath.isLogicalExpression()) {\n const { operator, right } = parentPath.node;\n if (\n operator === \"&&\" ||\n operator === \"||\" ||\n (operator === \"??\" && node === right)\n ) {\n return willPathCastToBoolean(parentPath);\n }\n }\n if (parentPath.isSequenceExpression()) {\n const { expressions } = parentPath.node;\n if (expressions[expressions.length - 1] === node) {\n return willPathCastToBoolean(parentPath);\n } else {\n // if it is in the middle of a sequence expression, we don't\n // care the return value so just cast to boolean for smaller\n // output\n return true;\n }\n }\n return (\n parentPath.isConditional({ test: node }) ||\n parentPath.isUnaryExpression({ operator: \"!\" }) ||\n parentPath.isLoop({ test: node })\n );\n}\n\n/**\n * Return the outermost transparent expression wrapper of a given path,\n * otherwise returns path itself.\n * @example\n * const nodePathADotB = NodePath(\"(a.b as any)\").get(\"expression\"); // a.b\n * // returns NodePath(\"(a.b as any)\")\n * findOutermostTransparentParent(nodePathADotB);\n * @param {NodePath} path\n * @returns {NodePath}\n */\nexport function findOutermostTransparentParent(path: NodePath): NodePath {\n let maybeWrapped = path;\n path.findParent(p => {\n if (!isTransparentExprWrapper(p.node)) return true;\n maybeWrapped = p;\n });\n return maybeWrapped;\n}\n","import { types as t, template, type NodePath } from \"@babel/core\";\nimport {\n skipTransparentExprWrapperNodes,\n skipTransparentExprWrappers,\n} from \"@babel/helper-skip-transparent-expression-wrappers\";\nimport {\n willPathCastToBoolean,\n findOutermostTransparentParent,\n} from \"./util.ts\";\n\n// TODO(Babel 9): Use .at(-1)\nconst last = (arr: T[]) => arr[arr.length - 1];\n\nfunction isSimpleMemberExpression(\n expression: t.Expression | t.Super,\n): expression is t.Identifier | t.Super | t.MemberExpression {\n expression = skipTransparentExprWrapperNodes(expression);\n return (\n t.isIdentifier(expression) ||\n t.isSuper(expression) ||\n (t.isMemberExpression(expression) &&\n !expression.computed &&\n isSimpleMemberExpression(expression.object))\n );\n}\n\n/**\n * Test if a given optional chain `path` needs to be memoized\n * @param {NodePath} path\n * @returns {boolean}\n */\nfunction needsMemoize(\n path: NodePath,\n) {\n let optionalPath: NodePath = path;\n const { scope } = path;\n while (\n optionalPath.isOptionalMemberExpression() ||\n optionalPath.isOptionalCallExpression()\n ) {\n const { node } = optionalPath;\n const childPath = skipTransparentExprWrappers(\n optionalPath.isOptionalMemberExpression()\n ? optionalPath.get(\"object\")\n : optionalPath.get(\"callee\"),\n );\n if (node.optional) {\n return !scope.isStatic(childPath.node);\n }\n\n optionalPath = childPath;\n }\n}\n\nconst NULLISH_CHECK = template.expression(\n `%%check%% === null || %%ref%% === void 0`,\n);\nconst NULLISH_CHECK_NO_DDA = template.expression(`%%check%% == null`);\nconst NULLISH_CHECK_NEG = template.expression(\n `%%check%% !== null && %%ref%% !== void 0`,\n);\nconst NULLISH_CHECK_NO_DDA_NEG = template.expression(`%%check%% != null`);\n\ninterface OptionalChainAssumptions {\n pureGetters: boolean;\n noDocumentAll: boolean;\n}\n\nexport function transformOptionalChain(\n path: NodePath,\n { pureGetters, noDocumentAll }: OptionalChainAssumptions,\n replacementPath: NodePath,\n ifNullish: t.Expression,\n wrapLast?: (value: t.Expression) => t.Expression,\n) {\n const { scope } = path;\n\n // Replace `function (a, x = a.b?.c) {}` to `function (a, x = (() => a.b?.c)() ){}`\n // so the temporary variable can be injected in correct scope\n if (scope.path.isPattern() && needsMemoize(path)) {\n replacementPath.replaceWith(\n template.expression.ast`(() => ${replacementPath.node})()`,\n );\n // The injected optional chain will be queued and eventually transformed when visited\n return;\n }\n\n const optionals = [];\n\n let optionalPath = path;\n while (\n optionalPath.isOptionalMemberExpression() ||\n optionalPath.isOptionalCallExpression()\n ) {\n const { node } = optionalPath;\n if (node.optional) {\n optionals.push(node);\n }\n if (optionalPath.isOptionalMemberExpression()) {\n // @ts-expect-error todo(flow->ts) avoid changing more type\n optionalPath.node.type = \"MemberExpression\";\n // @ts-expect-error todo(flow->ts)\n optionalPath = skipTransparentExprWrappers(optionalPath.get(\"object\"));\n } else if (optionalPath.isOptionalCallExpression()) {\n // @ts-expect-error todo(flow->ts) avoid changing more type\n optionalPath.node.type = \"CallExpression\";\n // @ts-expect-error todo(flow->ts)\n optionalPath = skipTransparentExprWrappers(optionalPath.get(\"callee\"));\n }\n }\n\n if (optionals.length === 0) {\n // Malformed AST: there was an OptionalMemberExpression node\n // with no actual optional elements.\n return;\n }\n\n const checks = [];\n\n let tmpVar;\n\n for (let i = optionals.length - 1; i >= 0; i--) {\n const node = optionals[i] as unknown as\n | t.MemberExpression\n | t.CallExpression;\n\n const isCall = t.isCallExpression(node);\n\n const chainWithTypes = isCall\n ? // V8 intrinsics must not be an optional call\n (node.callee as t.Expression)\n : node.object;\n const chain = skipTransparentExprWrapperNodes(chainWithTypes);\n\n let ref;\n let check;\n if (isCall && t.isIdentifier(chain, { name: \"eval\" })) {\n check = ref = chain;\n // `eval?.()` is an indirect eval call transformed to `(0,eval)()`\n node.callee = t.sequenceExpression([t.numericLiteral(0), ref]);\n } else if (pureGetters && isCall && isSimpleMemberExpression(chain)) {\n // If we assume getters are pure (avoiding a Function#call) and we are at the call,\n // we can avoid a needless memoize. We only do this if the callee is a simple member\n // expression, to avoid multiple calls to nested call expressions.\n check = ref = node.callee;\n } else if (scope.isStatic(chain)) {\n check = ref = chainWithTypes;\n } else {\n // We cannot reuse the tmpVar for calls, because we need to\n // store both the method and the receiver.\n if (!tmpVar || isCall) {\n tmpVar = scope.generateUidIdentifierBasedOnNode(chain);\n scope.push({ id: t.cloneNode(tmpVar) });\n }\n ref = tmpVar;\n check = t.assignmentExpression(\n \"=\",\n t.cloneNode(tmpVar),\n // Here `chainWithTypes` MUST NOT be cloned because it could be\n // updated when generating the memoised context of a call\n // expression. It must be an Expression when `ref` is an identifier\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion\n chainWithTypes as t.Expression,\n );\n\n if (isCall) {\n node.callee = ref;\n } else {\n node.object = ref;\n }\n }\n\n // Ensure call expressions have the proper `this`\n // `foo.bar()` has context `foo`.\n if (isCall && t.isMemberExpression(chain)) {\n if (pureGetters && isSimpleMemberExpression(chain)) {\n // To avoid a Function#call, we can instead re-grab the property from the context object.\n // `a.?b.?()` translates roughly to `_a.b != null && _a.b()`\n node.callee = chainWithTypes;\n } else {\n // Otherwise, we need to memoize the context object, and change the call into a Function#call.\n // `a.?b.?()` translates roughly to `(_b = _a.b) != null && _b.call(_a)`\n const { object } = chain;\n let context: t.Expression;\n if (t.isSuper(object)) {\n context = t.thisExpression();\n } else {\n const memoized = scope.maybeGenerateMemoised(object);\n if (memoized) {\n context = memoized;\n chain.object = t.assignmentExpression(\"=\", memoized, object);\n } else {\n context = object;\n }\n }\n\n node.arguments.unshift(t.cloneNode(context));\n // @ts-expect-error node.callee can not be an V8IntrinsicIdentifier: V8 intrinsic is disallowed in optional chain\n node.callee = t.memberExpression(node.callee, t.identifier(\"call\"));\n }\n }\n\n const data = { check: t.cloneNode(check), ref: t.cloneNode(ref) };\n // We make `ref` non-enumerable, so that @babel/template doesn't throw\n // in the noDocumentAll template if it's not used.\n Object.defineProperty(data, \"ref\", { enumerable: false });\n checks.push(data);\n }\n\n let result = replacementPath.node;\n if (wrapLast) result = wrapLast(result);\n\n const ifNullishBoolean = t.isBooleanLiteral(ifNullish);\n const ifNullishFalse = ifNullishBoolean && ifNullish.value === false;\n const ifNullishVoid =\n !ifNullishBoolean && t.isUnaryExpression(ifNullish, { operator: \"void\" });\n\n const isEvaluationValueIgnored =\n (t.isExpressionStatement(replacementPath.parent) &&\n !replacementPath.isCompletionRecord()) ||\n (t.isSequenceExpression(replacementPath.parent) &&\n last(replacementPath.parent.expressions) !== replacementPath.node);\n\n // prettier-ignore\n const tpl = ifNullishFalse\n ? (noDocumentAll ? NULLISH_CHECK_NO_DDA_NEG : NULLISH_CHECK_NEG)\n : (noDocumentAll ? NULLISH_CHECK_NO_DDA : NULLISH_CHECK);\n const logicalOp = ifNullishFalse ? \"&&\" : \"||\";\n\n const check = checks\n .map(tpl)\n .reduce((expr, check) => t.logicalExpression(logicalOp, expr, check));\n\n replacementPath.replaceWith(\n ifNullishBoolean || (ifNullishVoid && isEvaluationValueIgnored)\n ? t.logicalExpression(logicalOp, check, result)\n : t.conditionalExpression(check, ifNullish, result),\n );\n}\n\nexport function transform(\n path: NodePath,\n assumptions: OptionalChainAssumptions,\n) {\n const { scope } = path;\n\n // maybeWrapped points to the outermost transparent expression wrapper\n // or the path itself\n const maybeWrapped = findOutermostTransparentParent(path);\n const { parentPath } = maybeWrapped;\n\n if (parentPath.isUnaryExpression({ operator: \"delete\" })) {\n transformOptionalChain(\n path,\n assumptions,\n parentPath,\n t.booleanLiteral(true),\n );\n } else {\n let wrapLast;\n if (\n parentPath.isCallExpression({ callee: maybeWrapped.node }) &&\n // note that the first condition must implies that `path.optional` is `true`,\n // otherwise the parentPath should be an OptionalCallExpression\n path.isOptionalMemberExpression()\n ) {\n // Ensure (a?.b)() has proper `this`\n wrapLast = (replacement: t.MemberExpression) => {\n // `(a?.b)()` to `(a == null ? undefined : a.b.bind(a))()`\n // object must not be Super as super?.foo is invalid\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion\n const object = skipTransparentExprWrapperNodes(\n replacement.object,\n ) as t.Expression;\n let baseRef: t.Expression;\n if (!assumptions.pureGetters || !isSimpleMemberExpression(object)) {\n // memoize the context object when getters are not always pure\n // or the object is not a simple member expression\n // `(a?.b.c)()` to `(a == null ? undefined : (_a$b = a.b).c.bind(_a$b))()`\n baseRef = scope.maybeGenerateMemoised(object);\n if (baseRef) {\n replacement.object = t.assignmentExpression(\"=\", baseRef, object);\n }\n }\n return t.callExpression(\n t.memberExpression(replacement, t.identifier(\"bind\")),\n [t.cloneNode(baseRef ?? object)],\n );\n };\n }\n\n transformOptionalChain(\n path,\n assumptions,\n path,\n willPathCastToBoolean(maybeWrapped)\n ? t.booleanLiteral(false)\n : scope.buildUndefinedNode(),\n wrapLast,\n );\n }\n}\n","import { declare } from \"@babel/helper-plugin-utils\";\nimport { transform, transformOptionalChain } from \"./transform.ts\";\nimport type { NodePath, types as t } from \"@babel/core\";\n\nexport interface Options {\n loose?: boolean;\n}\nexport default declare((api, options: Options) => {\n api.assertVersion(REQUIRED_VERSION(7));\n\n const { loose = false } = options;\n const noDocumentAll = api.assumption(\"noDocumentAll\") ?? loose;\n const pureGetters = api.assumption(\"pureGetters\") ?? loose;\n\n return {\n name: \"transform-optional-chaining\",\n inherits:\n USE_ESM || IS_STANDALONE || api.version[0] === \"8\"\n ? undefined\n : // eslint-disable-next-line no-restricted-globals\n require(\"@babel/plugin-syntax-optional-chaining\").default,\n\n visitor: {\n \"OptionalCallExpression|OptionalMemberExpression\"(\n path: NodePath,\n ) {\n transform(path, { noDocumentAll, pureGetters });\n },\n },\n };\n});\n\nexport { transform, transformOptionalChain };\n","import { declare } from \"@babel/helper-plugin-utils\";\nimport syntaxOptionalChainingAssign from \"@babel/plugin-syntax-optional-chaining-assign\";\nimport type { NodePath, types as t } from \"@babel/core\";\nimport { skipTransparentExprWrappers } from \"@babel/helper-skip-transparent-expression-wrappers\";\nimport { transformOptionalChain } from \"@babel/plugin-transform-optional-chaining\";\n\nexport default declare(api => {\n api.assertVersion(REQUIRED_VERSION(\"^7.22.5\"));\n\n const assumptions = {\n noDocumentAll: api.assumption(\"noDocumentAll\") ?? false,\n pureGetters: api.assumption(\"pureGetters\") ?? false,\n };\n\n const { types: t } = api;\n\n return {\n name: \"transform-optional-chaining-assign\",\n inherits: syntaxOptionalChainingAssign,\n\n visitor: {\n AssignmentExpression(path, state) {\n let lhs = path.get(\"left\");\n if (!lhs.isExpression()) return;\n const isParenthesized =\n lhs.node.extra?.parenthesized ||\n t.isParenthesizedExpression(lhs.node);\n\n lhs = skipTransparentExprWrappers(lhs) as NodePath<\n t.LVal & t.Expression\n >;\n if (!lhs.isOptionalMemberExpression()) return;\n\n let ifNullish: t.Expression = path.scope.buildUndefinedNode();\n if (isParenthesized) {\n ifNullish = t.callExpression(\n state.addHelper(\"nullishReceiverError\"),\n [],\n );\n if (path.node.operator === \"=\") {\n ifNullish = t.sequenceExpression([\n t.cloneNode(path.node.right),\n ifNullish,\n ]);\n }\n }\n\n transformOptionalChain(lhs, assumptions, path, ifNullish);\n },\n },\n };\n});\n","import { types as t, type NodePath } from \"@babel/core\";\n\n// tries to optimize sequence expressions in the format\n// (a = b, (c => c + e)(a))\n// to\n// (a = b, a + e)\n\ntype Options = {\n call: t.CallExpression | t.AwaitExpression;\n path: NodePath\" }>;\n placeholder: t.Identifier;\n};\n\nfunction isConciseArrowExpression(\n node: t.Node,\n): node is t.ArrowFunctionExpression & { body: t.Expression } {\n return (\n t.isArrowFunctionExpression(node) &&\n t.isExpression(node.body) &&\n !node.async\n );\n}\n\nconst buildOptimizedSequenceExpression = ({\n call,\n path,\n placeholder,\n}: Options) => {\n // @ts-expect-error AwaitExpression does not have callee property\n const { callee: calledExpression } = call;\n // pipelineLeft must not be a PrivateName\n const pipelineLeft = path.node.left as t.Expression;\n const assign = t.assignmentExpression(\n \"=\",\n t.cloneNode(placeholder),\n pipelineLeft,\n );\n\n const expressionIsArrow = isConciseArrowExpression(calledExpression);\n\n if (expressionIsArrow) {\n let param;\n let optimizeArrow = true;\n const { params } = calledExpression;\n if (params.length === 1 && t.isIdentifier(params[0])) {\n param = params[0];\n } else if (params.length > 0) {\n optimizeArrow = false;\n }\n if (optimizeArrow && !param) {\n // fixme: arrow function with 1 pattern argument will also go into this branch\n // Arrow function with 0 arguments\n return t.sequenceExpression([pipelineLeft, calledExpression.body]);\n } else if (param) {\n path.scope.push({ id: t.cloneNode(placeholder) });\n path.get(\"right\").scope.rename(param.name, placeholder.name);\n\n return t.sequenceExpression([assign, calledExpression.body]);\n }\n } else if (t.isIdentifier(calledExpression, { name: \"eval\" })) {\n const evalSequence = t.sequenceExpression([\n t.numericLiteral(0),\n calledExpression,\n ]);\n\n (call as t.CallExpression).callee = evalSequence;\n }\n path.scope.push({ id: t.cloneNode(placeholder) });\n\n return t.sequenceExpression([assign, call]);\n};\n\nexport default buildOptimizedSequenceExpression;\n","import { types as t } from \"@babel/core\";\nimport type { PluginPass, NodePath, Visitor } from \"@babel/core\";\nimport buildOptimizedSequenceExpression from \"./buildOptimizedSequenceExpression.ts\";\n\nconst minimalVisitor: Visitor = {\n BinaryExpression(path) {\n const { scope, node } = path;\n const { operator, left, right } = node;\n if (operator !== \"|>\") return;\n\n const placeholder = scope.generateUidIdentifierBasedOnNode(left);\n\n const call = t.callExpression(right, [t.cloneNode(placeholder)]);\n path.replaceWith(\n buildOptimizedSequenceExpression({\n placeholder,\n call,\n path: path as NodePath\" }>,\n }),\n );\n },\n};\n\nexport default minimalVisitor;\n","import { types as t } from \"@babel/core\";\nimport type { PluginPass, NodePath, Visitor } from \"@babel/core\";\n\ntype State = {\n topicReferences: NodePath[];\n sideEffectsBeforeFirstTopicReference: boolean;\n};\n\nconst topicReferenceVisitor: Visitor = {\n exit(path, state) {\n if (path.isTopicReference()) {\n state.topicReferences.push(path);\n } else {\n if (\n state.topicReferences.length === 0 &&\n !state.sideEffectsBeforeFirstTopicReference &&\n !path.isPure()\n ) {\n state.sideEffectsBeforeFirstTopicReference = true;\n }\n }\n },\n \"ClassBody|Function\"(_, state) {\n if (state.topicReferences.length === 0) {\n state.sideEffectsBeforeFirstTopicReference = true;\n }\n },\n};\n\n// This visitor traverses `BinaryExpression`\n// and replaces any that use `|>`\n// with sequence expressions containing assignment expressions\n// with automatically generated variables,\n// from inside to outside, from left to right.\nconst visitor: Visitor = {\n BinaryExpression: {\n exit(path) {\n const { scope, node } = path;\n\n if (node.operator !== \"|>\") {\n // The path node is a binary expression,\n // but it is not a pipe expression.\n return;\n }\n\n const pipeBodyPath = path.get(\"right\");\n if (pipeBodyPath.node.type === \"TopicReference\") {\n // If the pipe body is itself a lone topic reference,\n // then replace the whole expression with its left operand.\n path.replaceWith(node.left);\n return;\n }\n\n const visitorState: State = {\n topicReferences: [],\n // pipeBodyPath might be a function, and it won't be visited by\n // topicReferenceVisitor because traverse() skips the top-level\n // node. We must handle that case here manually.\n sideEffectsBeforeFirstTopicReference: pipeBodyPath.isFunction(),\n };\n pipeBodyPath.traverse(topicReferenceVisitor, visitorState);\n\n if (\n visitorState.topicReferences.length === 1 &&\n (!visitorState.sideEffectsBeforeFirstTopicReference ||\n path.scope.isPure(node.left, true))\n ) {\n visitorState.topicReferences[0].replaceWith(node.left);\n path.replaceWith(node.right);\n return;\n }\n\n const topicVariable = scope.generateUidIdentifierBasedOnNode(node);\n scope.push({ id: topicVariable });\n\n // Replace topic references with the topic variable.\n visitorState.topicReferences.forEach(path =>\n path.replaceWith(t.cloneNode(topicVariable)),\n );\n\n // Replace the pipe expression itself with an assignment expression.\n path.replaceWith(\n t.sequenceExpression([\n t.assignmentExpression(\n \"=\",\n t.cloneNode(topicVariable),\n // @ts-expect-error node.left must not be a PrivateName when operator is |>\n node.left,\n ),\n node.right,\n ]),\n );\n },\n },\n};\n\nexport default visitor;\n","import { types as t, type PluginObject, type NodePath } from \"@babel/core\";\nimport buildOptimizedSequenceExpression from \"./buildOptimizedSequenceExpression.ts\";\n\nconst fsharpVisitor: PluginObject[\"visitor\"] = {\n BinaryExpression(path) {\n const { scope, node } = path;\n const { operator, left, right } = node;\n if (operator !== \"|>\") return;\n\n const placeholder = scope.generateUidIdentifierBasedOnNode(left);\n\n const call =\n right.type === \"AwaitExpression\"\n ? t.awaitExpression(t.cloneNode(placeholder))\n : t.callExpression(right, [t.cloneNode(placeholder)]);\n const sequence = buildOptimizedSequenceExpression({\n placeholder,\n call,\n path: path as NodePath\" }>,\n });\n path.replaceWith(sequence);\n },\n};\n\nexport default fsharpVisitor;\n","import { types as t } from \"@babel/core\";\nimport type { PluginPass, Visitor } from \"@babel/core\";\n\nconst updateTopicReferenceVisitor: Visitor<{ topicId: t.Identifier }> = {\n PipelinePrimaryTopicReference(path) {\n path.replaceWith(t.cloneNode(this.topicId));\n },\n PipelineTopicExpression(path) {\n path.skip();\n },\n};\n\nconst smartVisitor: Visitor = {\n BinaryExpression(path) {\n const { scope } = path;\n const { node } = path;\n const { operator, left, right } = node;\n if (operator !== \"|>\") return;\n\n const placeholder = scope.generateUidIdentifierBasedOnNode(left);\n scope.push({ id: placeholder });\n\n let call;\n if (t.isPipelineTopicExpression(right)) {\n path\n .get(\"right\")\n .traverse(updateTopicReferenceVisitor, { topicId: placeholder });\n\n call = right.expression;\n } else {\n // PipelineBareFunction\n let callee = (right as t.CallExpression).callee;\n if (t.isIdentifier(callee, { name: \"eval\" })) {\n callee = t.sequenceExpression([t.numericLiteral(0), callee]);\n }\n\n call = t.callExpression(callee, [t.cloneNode(placeholder)]);\n }\n\n path.replaceWith(\n t.sequenceExpression([\n t.assignmentExpression(\n \"=\",\n t.cloneNode(placeholder),\n // left must not be a PrivateName because operator is not \"in\"\n left as t.Expression,\n ),\n call,\n ]),\n );\n },\n};\n\nexport default smartVisitor;\n","import { declare } from \"@babel/helper-plugin-utils\";\nimport syntaxPipelineOperator from \"@babel/plugin-syntax-pipeline-operator\";\nimport minimalVisitor from \"./minimalVisitor.ts\";\nimport hackVisitor from \"./hackVisitor.ts\";\nimport fsharpVisitor from \"./fsharpVisitor.ts\";\nimport smartVisitor from \"./smartVisitor.ts\";\nimport type { Options } from \"@babel/plugin-syntax-pipeline-operator\";\n\nconst visitorsPerProposal = {\n minimal: minimalVisitor,\n hack: hackVisitor,\n fsharp: fsharpVisitor,\n smart: smartVisitor,\n};\n\nexport default declare((api, options: Options) => {\n api.assertVersion(REQUIRED_VERSION(7));\n\n const { proposal } = options;\n\n if (proposal === \"smart\") {\n console.warn(\n `The smart-mix pipe operator is deprecated. Use \"proposal\": \"hack\" instead.`,\n );\n }\n\n return {\n name: \"proposal-pipeline-operator\",\n inherits: syntaxPipelineOperator,\n visitor: visitorsPerProposal[options.proposal],\n };\n});\n","/* eslint-disable @babel/development/plugin-name */\n\nimport { declare } from \"@babel/helper-plugin-utils\";\nimport {\n createClassFeaturePlugin,\n FEATURES,\n} from \"@babel/helper-create-class-features-plugin\";\n\nexport interface Options {\n loose?: boolean;\n}\n\nexport default declare((api, options: Options) => {\n api.assertVersion(REQUIRED_VERSION(7));\n\n return createClassFeaturePlugin({\n name: \"transform-private-methods\",\n\n api,\n feature: FEATURES.privateMethods,\n loose: options.loose,\n\n manipulateOptions(opts, parserOpts) {\n if (!process.env.BABEL_8_BREAKING) {\n // @ts-ignore(Babel 7 vs Babel 8) This plugin has been removed\n parserOpts.plugins.push(\"classPrivateMethods\");\n }\n },\n });\n});\n","import { declare } from \"@babel/helper-plugin-utils\";\nimport {\n enableFeature,\n FEATURES,\n injectInitialization as injectConstructorInit,\n buildCheckInRHS,\n} from \"@babel/helper-create-class-features-plugin\";\nimport annotateAsPure from \"@babel/helper-annotate-as-pure\";\nimport type { NodePath, Scope, types as t } from \"@babel/core\";\n\nexport interface Options {\n loose?: boolean;\n}\nexport default declare((api, opt: Options) => {\n api.assertVersion(REQUIRED_VERSION(7));\n const { types: t, template } = api;\n const { loose } = opt;\n\n // NOTE: When using the class fields or private methods plugins,\n // they will also take care of '#priv in obj' checks when visiting\n // the ClassExpression or ClassDeclaration nodes.\n // The visitor of this plugin is only effective when not compiling\n // private fields and methods.\n\n const classWeakSets: WeakMap = new WeakMap();\n const fieldsWeakSets: WeakMap<\n t.ClassPrivateProperty | t.ClassPrivateMethod,\n t.Identifier\n > = new WeakMap();\n\n function unshadow(name: string, targetScope: Scope, scope: Scope) {\n while (scope !== targetScope) {\n if (scope.hasOwnBinding(name)) scope.rename(name);\n scope = scope.parent;\n }\n }\n\n function injectToFieldInit(\n fieldPath: NodePath,\n expr: t.Expression,\n before = false,\n ) {\n if (fieldPath.node.value) {\n const value = fieldPath.get(\"value\");\n if (before) {\n value.insertBefore(expr);\n } else {\n value.insertAfter(expr);\n }\n } else {\n fieldPath.set(\"value\", t.unaryExpression(\"void\", expr));\n }\n }\n\n function injectInitialization(\n classPath: NodePath,\n init: t.Expression,\n ) {\n let firstFieldPath;\n let constructorPath;\n\n for (const el of classPath.get(\"body.body\")) {\n if (\n (el.isClassProperty() || el.isClassPrivateProperty()) &&\n !el.node.static\n ) {\n firstFieldPath = el;\n break;\n }\n if (!constructorPath && el.isClassMethod({ kind: \"constructor\" })) {\n constructorPath = el;\n }\n }\n\n if (firstFieldPath) {\n injectToFieldInit(firstFieldPath, init, true);\n } else {\n injectConstructorInit(classPath, constructorPath, [\n t.expressionStatement(init),\n ]);\n }\n }\n\n function getWeakSetId(\n weakSets: WeakMap,\n outerClass: NodePath,\n reference: NodePath,\n name = \"\",\n inject: (\n reference: NodePath,\n expression: t.Expression,\n before?: boolean,\n ) => void,\n ) {\n let id = weakSets.get(reference.node);\n\n if (!id) {\n id = outerClass.scope.generateUidIdentifier(`${name || \"\"} brandCheck`);\n weakSets.set(reference.node, id);\n\n inject(reference, template.expression.ast`${t.cloneNode(id)}.add(this)`);\n\n const newExpr = t.newExpression(t.identifier(\"WeakSet\"), []);\n annotateAsPure(newExpr);\n\n outerClass.insertBefore(template.ast`var ${id} = ${newExpr}`);\n }\n\n return t.cloneNode(id);\n }\n\n return {\n name: \"transform-private-property-in-object\",\n inherits:\n USE_ESM || IS_STANDALONE || api.version[0] === \"8\"\n ? undefined\n : // eslint-disable-next-line no-restricted-globals\n require(\"@babel/plugin-syntax-private-property-in-object\").default,\n pre() {\n // Enable this in @babel/helper-create-class-features-plugin, so that it\n // can be handled by the private fields and methods transform.\n enableFeature(this.file, FEATURES.privateIn, loose);\n },\n visitor: {\n BinaryExpression(path, state) {\n const { node } = path;\n const { file } = state;\n if (node.operator !== \"in\") return;\n if (!t.isPrivateName(node.left)) return;\n\n const { name } = node.left.id;\n\n let privateElement: NodePath<\n t.ClassPrivateMethod | t.ClassPrivateProperty\n >;\n const outerClass = path.findParent(path => {\n if (!path.isClass()) return false;\n\n privateElement = path.get(\"body.body\").find(\n ({ node }) =>\n // fixme: Support class accessor property\n t.isPrivate(node) && node.key.id.name === name,\n ) as NodePath;\n\n return !!privateElement;\n }) as NodePath;\n\n if (outerClass.parentPath.scope.path.isPattern()) {\n outerClass.replaceWith(\n template.ast`(() => ${outerClass.node})()` as t.Statement,\n );\n // The injected class will be queued and eventually transformed when visited\n return;\n }\n\n if (privateElement.node.type === \"ClassPrivateMethod\") {\n if (privateElement.node.static) {\n if (outerClass.node.id) {\n unshadow(outerClass.node.id.name, outerClass.scope, path.scope);\n } else {\n outerClass.set(\"id\", path.scope.generateUidIdentifier(\"class\"));\n }\n path.replaceWith(\n template.expression.ast`\n ${t.cloneNode(outerClass.node.id)} === ${buildCheckInRHS(\n node.right,\n file,\n )}\n `,\n );\n } else {\n const id = getWeakSetId(\n classWeakSets,\n outerClass,\n outerClass,\n outerClass.node.id?.name,\n injectInitialization,\n );\n\n path.replaceWith(\n template.expression.ast`${id}.has(${buildCheckInRHS(\n node.right,\n file,\n )})`,\n );\n }\n } else {\n // Private fields might not all be initialized: see the 'halfConstructed'\n // example at https://v8.dev/features/private-brand-checks.\n\n const id = getWeakSetId(\n fieldsWeakSets,\n outerClass,\n privateElement as NodePath,\n privateElement.node.key.id.name,\n injectToFieldInit,\n );\n\n path.replaceWith(\n template.expression.ast`${id}.has(${buildCheckInRHS(\n node.right,\n file,\n )})`,\n );\n }\n },\n },\n };\n});\n","/*\n ** Copyright 2020 Bloomberg Finance L.P.\n **\n ** Licensed under the MIT License (the \"License\");\n ** you may not use this file except in compliance with the License.\n ** You may obtain a copy of the License at\n **\n ** https://opensource.org/licenses/MIT\n **\n ** Unless required by applicable law or agreed to in writing, software\n ** distributed under the License is distributed on an \"AS IS\" BASIS,\n ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ** See the License for the specific language governing permissions and\n ** limitations under the License.\n */\n\nimport { declare } from \"@babel/helper-plugin-utils\";\nimport syntaxRecordAndTuple from \"@babel/plugin-syntax-record-and-tuple\";\nimport type { Options as SyntaxOptions } from \"@babel/plugin-syntax-record-and-tuple\";\nimport { types as t, type NodePath } from \"@babel/core\";\nimport { addNamed, isModule } from \"@babel/helper-module-imports\";\nimport { OptionValidator } from \"@babel/helper-validator-option\";\n\nconst v = new OptionValidator(PACKAGE_JSON.name);\n\nexport interface Options extends SyntaxOptions {\n polyfillModuleName?: string;\n importPolyfill?: boolean;\n}\n\ntype State = {\n programPath: NodePath;\n};\n\n// program -> cacheKey -> localBindingName\ntype Cache = Map;\ntype ImportCache = WeakMap;\n\nexport default declare((api, options: Options) => {\n api.assertVersion(REQUIRED_VERSION(7));\n\n const polyfillModuleName = v.validateStringOption(\n \"polyfillModuleName\",\n options.polyfillModuleName,\n \"@bloomberg/record-tuple-polyfill\",\n );\n const shouldImportPolyfill = v.validateBooleanOption(\n \"importPolyfill\",\n options.importPolyfill,\n !!options.polyfillModuleName,\n );\n\n const importCaches: ImportCache = new WeakMap();\n\n function getOr(map: Map, key: K, getDefault: () => V): V;\n function getOr(\n map: WeakMap,\n key: K,\n getDefault: () => V,\n ): V;\n function getOr(\n map: WeakMap,\n key: K,\n getDefault: () => V,\n ) {\n let value = map.get(key);\n if (!value) map.set(key, (value = getDefault()));\n return value;\n }\n\n function getBuiltIn(\n name: \"Record\" | \"Tuple\",\n programPath: NodePath,\n ) {\n if (!shouldImportPolyfill) return t.identifier(name);\n if (!programPath) {\n throw new Error(\"Internal error: unable to find the Program node.\");\n }\n\n const cacheKey = `${name}:${isModule(programPath)}`;\n\n const cache = getOr(\n importCaches,\n programPath.node,\n () => new Map(),\n );\n const localBindingName = getOr(cache, cacheKey, () => {\n return addNamed(programPath, name, polyfillModuleName, {\n importedInterop: \"uncompiled\",\n }).name;\n });\n\n return t.identifier(localBindingName);\n }\n\n return {\n name: \"proposal-record-and-tuple\",\n inherits: syntaxRecordAndTuple,\n visitor: {\n Program(path, state) {\n state.programPath = path;\n },\n RecordExpression(path, state) {\n const record = getBuiltIn(\"Record\", state.programPath);\n\n const object = t.objectExpression(path.node.properties);\n const wrapped = t.callExpression(record, [object]);\n path.replaceWith(wrapped);\n },\n TupleExpression(path, state) {\n const tuple = getBuiltIn(\"Tuple\", state.programPath);\n\n const wrapped = t.callExpression(tuple, path.node.elements);\n path.replaceWith(wrapped);\n },\n },\n };\n});\n","/* eslint-disable @babel/development/plugin-name */\nimport { createRegExpFeaturePlugin } from \"@babel/helper-create-regexp-features-plugin\";\nimport { declare } from \"@babel/helper-plugin-utils\";\n\nexport default declare(api => {\n api.assertVersion(REQUIRED_VERSION(\"^7.19.0\"));\n\n return createRegExpFeaturePlugin({\n name: \"proposal-regexp-modifiers\",\n feature: \"modifiers\",\n });\n});\n","import { declare } from \"@babel/helper-plugin-utils\";\n\nexport default declare(api => {\n api.assertVersion(REQUIRED_VERSION(7));\n\n return {\n name: \"syntax-throw-expressions\",\n\n manipulateOptions(opts, parserOpts) {\n parserOpts.plugins.push(\"throwExpressions\");\n },\n };\n});\n","import { declare } from \"@babel/helper-plugin-utils\";\nimport syntaxThrowExpressions from \"@babel/plugin-syntax-throw-expressions\";\nimport { types as t } from \"@babel/core\";\n\nexport default declare(api => {\n api.assertVersion(REQUIRED_VERSION(7));\n\n return {\n name: \"proposal-throw-expressions\",\n inherits: syntaxThrowExpressions,\n\n visitor: {\n UnaryExpression(path) {\n const { operator, argument } = path.node;\n if (operator !== \"throw\") return;\n\n const arrow = t.functionExpression(\n null,\n [t.identifier(\"e\")],\n t.blockStatement([t.throwStatement(t.identifier(\"e\"))]),\n );\n\n path.replaceWith(t.callExpression(arrow, [argument]));\n },\n },\n };\n});\n","/* eslint-disable @babel/development/plugin-name */\nimport { createRegExpFeaturePlugin } from \"@babel/helper-create-regexp-features-plugin\";\nimport { declare } from \"@babel/helper-plugin-utils\";\n\nexport interface Options {\n useUnicodeFlag?: boolean;\n}\n\nexport default declare((api, options: Options) => {\n api.assertVersion(REQUIRED_VERSION(7));\n\n const { useUnicodeFlag = true } = options;\n if (typeof useUnicodeFlag !== \"boolean\") {\n throw new Error(\".useUnicodeFlag must be a boolean, or undefined\");\n }\n\n return createRegExpFeaturePlugin({\n name: \"transform-unicode-property-regex\",\n feature: \"unicodePropertyEscape\",\n options: { useUnicodeFlag },\n });\n});\n","/* eslint-disable @babel/development/plugin-name */\nimport { createRegExpFeaturePlugin } from \"@babel/helper-create-regexp-features-plugin\";\nimport { declare } from \"@babel/helper-plugin-utils\";\n\nexport default declare(api => {\n api.assertVersion(REQUIRED_VERSION(7));\n\n return createRegExpFeaturePlugin({\n name: \"transform-unicode-sets-regex\",\n feature: \"unicodeSetsFlag\",\n manipulateOptions(opts, parserOpts) {\n if (!process.env.BABEL_8_BREAKING) {\n // @ts-ignore(Babel 7 vs Babel 8) This plugin has been removed\n parserOpts.plugins.push(\"regexpUnicodeSets\");\n }\n },\n });\n});\n","import { declare } from \"@babel/helper-plugin-utils\";\nimport remapAsyncToGenerator from \"@babel/helper-remap-async-to-generator\";\nimport { addNamed } from \"@babel/helper-module-imports\";\nimport { types as t } from \"@babel/core\";\n\nexport interface Options {\n method?: string;\n module?: string;\n}\n\ntype State = {\n methodWrapper?: t.Identifier | t.SequenceExpression;\n};\n\nexport default declare((api, options: Options) => {\n api.assertVersion(REQUIRED_VERSION(7));\n\n const { method, module } = options;\n // Todo(BABEL 8): Consider default it to false\n const noNewArrows = api.assumption(\"noNewArrows\") ?? true;\n const ignoreFunctionLength = api.assumption(\"ignoreFunctionLength\") ?? false;\n\n if (method && module) {\n return {\n name: \"transform-async-to-generator\",\n\n visitor: {\n Function(path, state) {\n if (!path.node.async || path.node.generator) return;\n\n let wrapAsync = state.methodWrapper;\n if (wrapAsync) {\n wrapAsync = t.cloneNode(wrapAsync);\n } else {\n wrapAsync = state.methodWrapper = addNamed(path, method, module);\n }\n\n remapAsyncToGenerator(\n path,\n { wrapAsync },\n noNewArrows,\n ignoreFunctionLength,\n );\n },\n },\n };\n }\n\n return {\n name: \"transform-async-to-generator\",\n\n visitor: {\n Function(path, state) {\n if (!path.node.async || path.node.generator) return;\n\n remapAsyncToGenerator(\n path,\n { wrapAsync: state.addHelper(\"asyncToGenerator\") },\n noNewArrows,\n ignoreFunctionLength,\n );\n },\n },\n };\n});\n","import { declare } from \"@babel/helper-plugin-utils\";\n\nexport interface Options {\n spec?: boolean;\n}\n\nexport default declare((api, options: Options) => {\n api.assertVersion(REQUIRED_VERSION(7));\n\n const noNewArrows = api.assumption(\"noNewArrows\") ?? !options.spec;\n\n return {\n name: \"transform-arrow-functions\",\n\n visitor: {\n ArrowFunctionExpression(path) {\n // In some conversion cases, it may have already been converted to a function while this callback\n // was queued up.\n if (!path.isArrowFunctionExpression()) return;\n\n if (process.env.BABEL_8_BREAKING) {\n path.arrowFunctionToExpression({\n // While other utils may be fine inserting other arrows to make more transforms possible,\n // the arrow transform itself absolutely cannot insert new arrow functions.\n allowInsertArrow: false,\n noNewArrows,\n });\n } else {\n path.arrowFunctionToExpression({\n allowInsertArrow: false,\n noNewArrows,\n\n // This is only needed for backward compat with @babel/traverse <7.13.0\n // @ts-ignore(Babel 7 vs Babel 8) Removed in Babel 8\n specCompliant: !noNewArrows,\n });\n }\n },\n },\n };\n});\n","import { declare } from \"@babel/helper-plugin-utils\";\nimport { types as t, type NodePath } from \"@babel/core\";\n\nexport default declare(api => {\n api.assertVersion(REQUIRED_VERSION(7));\n\n function transformStatementList(paths: NodePath[]) {\n for (const path of paths) {\n if (!path.isFunctionDeclaration()) continue;\n const func = path.node;\n const declar = t.variableDeclaration(\"let\", [\n t.variableDeclarator(func.id, t.toExpression(func)),\n ]);\n\n // hoist it up above everything else\n // @ts-expect-error todo(flow->ts): avoid mutations\n declar._blockHoist = 2;\n\n // todo: name this\n func.id = null;\n\n path.replaceWith(declar);\n }\n }\n\n return {\n name: \"transform-block-scoped-functions\",\n\n visitor: {\n BlockStatement(path) {\n const { node, parent } = path;\n if (\n t.isFunction(parent, { body: node }) ||\n t.isExportDeclaration(parent)\n ) {\n return;\n }\n\n transformStatementList(path.get(\"body\"));\n },\n\n SwitchCase(path) {\n transformStatementList(path.get(\"consequent\"));\n },\n },\n };\n});\n","import { template, types as t } from \"@babel/core\";\nimport type { NodePath, Visitor, Scope } from \"@babel/core\";\n\ninterface LoopBodyBindingsState {\n blockScoped: Scope.Binding[];\n}\n\nconst collectLoopBodyBindingsVisitor: Visitor = {\n \"Expression|Declaration|Loop\"(path) {\n path.skip();\n },\n Scope(path, state) {\n if (path.isFunctionParent()) path.skip();\n\n const { bindings } = path.scope;\n for (const name of Object.keys(bindings)) {\n const binding = bindings[name];\n if (\n binding.kind === \"let\" ||\n binding.kind === \"const\" ||\n binding.kind === \"hoisted\"\n ) {\n state.blockScoped.push(binding);\n }\n }\n },\n};\n\nexport function getLoopBodyBindings(loopPath: NodePath) {\n const state: LoopBodyBindingsState = { blockScoped: [] };\n loopPath.traverse(collectLoopBodyBindingsVisitor, state);\n return state.blockScoped;\n}\n\nexport function getUsageInBody(\n binding: Scope.Binding,\n loopPath: NodePath,\n) {\n // UpdateExpressions are counted both as a reference and a mutation,\n // so we need to de-duplicate them.\n const seen = new WeakSet();\n\n let capturedInClosure = false;\n\n const constantViolations = filterMap(binding.constantViolations, path => {\n const { inBody, inClosure } = relativeLoopLocation(path, loopPath);\n if (!inBody) return null;\n capturedInClosure ||= inClosure;\n\n const id = path.isUpdateExpression()\n ? path.get(\"argument\")\n : path.isAssignmentExpression()\n ? path.get(\"left\")\n : null;\n if (id) seen.add(id.node);\n return id as NodePath | null;\n });\n\n const references = filterMap(binding.referencePaths, path => {\n if (seen.has(path.node)) return null;\n\n const { inBody, inClosure } = relativeLoopLocation(path, loopPath);\n if (!inBody) return null;\n capturedInClosure ||= inClosure;\n\n return path as NodePath;\n });\n\n return {\n capturedInClosure,\n hasConstantViolations: constantViolations.length > 0,\n usages: references.concat(constantViolations),\n };\n}\n\nfunction relativeLoopLocation(path: NodePath, loopPath: NodePath) {\n const bodyPath = loopPath.get(\"body\");\n let inClosure = false;\n\n for (let currPath = path; currPath; currPath = currPath.parentPath) {\n if (currPath.isFunction() || currPath.isClass() || currPath.isMethod()) {\n inClosure = true;\n }\n if (currPath === bodyPath) {\n return { inBody: true, inClosure };\n } else if (currPath === loopPath) {\n return { inBody: false, inClosure };\n }\n }\n\n throw new Error(\n \"Internal Babel error: path is not in loop. Please report this as a bug.\",\n );\n}\n\ninterface CompletionsAndVarsState {\n breaksContinues: NodePath[];\n returns: NodePath[];\n labelsStack: string[];\n labellessContinueTargets: number;\n labellessBreakTargets: number;\n\n vars: NodePath[];\n loopNode: t.Loop;\n}\n\nconst collectCompletionsAndVarsVisitor: Visitor = {\n Function(path) {\n path.skip();\n },\n LabeledStatement: {\n enter({ node }, state) {\n state.labelsStack.push(node.label.name);\n },\n exit({ node }, state) {\n const popped = state.labelsStack.pop();\n if (popped !== node.label.name) {\n throw new Error(\"Assertion failure. Please report this bug to Babel.\");\n }\n },\n },\n Loop: {\n enter(_, state) {\n state.labellessContinueTargets++;\n state.labellessBreakTargets++;\n },\n exit(_, state) {\n state.labellessContinueTargets--;\n state.labellessBreakTargets--;\n },\n },\n SwitchStatement: {\n enter(_, state) {\n state.labellessBreakTargets++;\n },\n exit(_, state) {\n state.labellessBreakTargets--;\n },\n },\n \"BreakStatement|ContinueStatement\"(\n path: NodePath,\n state,\n ) {\n const { label } = path.node;\n if (label) {\n if (state.labelsStack.includes(label.name)) return;\n } else if (\n path.isBreakStatement()\n ? state.labellessBreakTargets > 0\n : state.labellessContinueTargets > 0\n ) {\n return;\n }\n state.breaksContinues.push(path);\n },\n ReturnStatement(path, state) {\n state.returns.push(path);\n },\n VariableDeclaration(path, state) {\n if (path.parent === state.loopNode && isVarInLoopHead(path)) return;\n if (path.node.kind === \"var\") state.vars.push(path);\n },\n};\n\nexport function wrapLoopBody(\n loopPath: NodePath,\n captured: string[],\n updatedBindingsUsages: Map[]>,\n) {\n const loopNode = loopPath.node;\n const state: CompletionsAndVarsState = {\n breaksContinues: [],\n returns: [],\n labelsStack: [],\n labellessBreakTargets: 0,\n labellessContinueTargets: 0,\n vars: [],\n loopNode,\n };\n loopPath.traverse(collectCompletionsAndVarsVisitor, state);\n\n const callArgs = [];\n const closureParams = [];\n const updater = [];\n for (const [name, updatedUsage] of updatedBindingsUsages) {\n callArgs.push(t.identifier(name));\n\n const innerName = loopPath.scope.generateUid(name);\n closureParams.push(t.identifier(innerName));\n updater.push(\n t.assignmentExpression(\"=\", t.identifier(name), t.identifier(innerName)),\n );\n for (const path of updatedUsage) path.replaceWith(t.identifier(innerName));\n }\n for (const name of captured) {\n if (updatedBindingsUsages.has(name)) continue; // already injected\n callArgs.push(t.identifier(name));\n closureParams.push(t.identifier(name));\n }\n\n const id = loopPath.scope.generateUid(\"loop\");\n const fn = t.functionExpression(\n null,\n closureParams,\n t.toBlock(loopNode.body),\n );\n let call: t.Expression = t.callExpression(t.identifier(id), callArgs);\n\n const fnParent = loopPath.findParent(p => p.isFunction());\n if (fnParent) {\n const { async, generator } = fnParent.node as t.Function;\n fn.async = async;\n fn.generator = generator;\n if (generator) call = t.yieldExpression(call, true);\n else if (async) call = t.awaitExpression(call);\n }\n\n const updaterNode =\n updater.length > 0\n ? t.expressionStatement(t.sequenceExpression(updater))\n : null;\n if (updaterNode) fn.body.body.push(updaterNode);\n\n // NOTE: Calling .insertBefore on the loop path might cause the\n // loop to be moved in the AST. For example, in\n // if (true) for (let x of y) ...\n // .insertBefore will replace the loop with a block:\n // if (true) { var _loop = ...; for (let x of y) ... }\n // All subsequent operations in this function on the loop node\n // must not assume that loopPath still represents the loop.\n // TODO: Consider using a function declaration\n const [varPath] = loopPath.insertBefore(\n t.variableDeclaration(\"var\", [t.variableDeclarator(t.identifier(id), fn)]),\n ) as [NodePath];\n\n const bodyStmts: t.Statement[] = [];\n\n const varNames: string[] = [];\n for (const varPath of state.vars) {\n const assign = [];\n for (const decl of varPath.node.declarations) {\n varNames.push(...Object.keys(t.getBindingIdentifiers(decl.id)));\n if (decl.init) {\n assign.push(t.assignmentExpression(\"=\", decl.id, decl.init));\n } else if (t.isForXStatement(varPath.parent, { left: varPath.node })) {\n assign.push(decl.id as t.Identifier);\n }\n }\n if (assign.length > 0) {\n const replacement: t.Node =\n assign.length === 1 ? assign[0] : t.sequenceExpression(assign);\n varPath.replaceWith(replacement);\n } else {\n varPath.remove();\n }\n }\n if (varNames.length) {\n varPath.pushContainer(\n \"declarations\",\n varNames.map(name => t.variableDeclarator(t.identifier(name))),\n );\n }\n\n const labelNum = state.breaksContinues.length;\n const returnNum = state.returns.length;\n if (labelNum + returnNum === 0) {\n bodyStmts.push(t.expressionStatement(call));\n } else if (labelNum === 1 && returnNum === 0) {\n for (const path of state.breaksContinues) {\n const { node } = path;\n const { type, label } = node;\n let name = type === \"BreakStatement\" ? \"break\" : \"continue\";\n if (label) name += \" \" + label.name;\n path.replaceWith(\n t.addComment(\n t.returnStatement(t.numericLiteral(1)),\n \"trailing\",\n \" \" + name,\n true,\n ),\n );\n if (updaterNode) path.insertBefore(t.cloneNode(updaterNode));\n\n bodyStmts.push(\n template.statement.ast`\n if (${call}) ${node}\n `,\n );\n }\n } else {\n const completionId = loopPath.scope.generateUid(\"ret\");\n\n if (varPath.isVariableDeclaration()) {\n varPath.pushContainer(\"declarations\", [\n t.variableDeclarator(t.identifier(completionId)),\n ]);\n bodyStmts.push(\n t.expressionStatement(\n t.assignmentExpression(\"=\", t.identifier(completionId), call),\n ),\n );\n } else {\n bodyStmts.push(\n t.variableDeclaration(\"var\", [\n t.variableDeclarator(t.identifier(completionId), call),\n ]),\n );\n }\n\n const injected: string[] = [];\n for (const path of state.breaksContinues) {\n const { node } = path;\n const { type, label } = node;\n let name = type === \"BreakStatement\" ? \"break\" : \"continue\";\n if (label) name += \" \" + label.name;\n\n let i = injected.indexOf(name);\n const hasInjected = i !== -1;\n if (!hasInjected) {\n injected.push(name);\n i = injected.length - 1;\n }\n\n path.replaceWith(\n t.addComment(\n t.returnStatement(t.numericLiteral(i)),\n \"trailing\",\n \" \" + name,\n true,\n ),\n );\n if (updaterNode) path.insertBefore(t.cloneNode(updaterNode));\n\n if (hasInjected) continue;\n\n bodyStmts.push(\n template.statement.ast`\n if (${t.identifier(completionId)} === ${t.numericLiteral(i)}) ${node}\n `,\n );\n }\n\n if (returnNum) {\n for (const path of state.returns) {\n const arg = path.node.argument || path.scope.buildUndefinedNode();\n path.replaceWith(\n template.statement.ast`\n return { v: ${arg} };\n `,\n );\n }\n\n bodyStmts.push(\n template.statement.ast`\n if (${t.identifier(completionId)}) return ${t.identifier(\n completionId,\n )}.v;\n `,\n );\n }\n }\n\n loopNode.body = t.blockStatement(bodyStmts);\n\n return varPath;\n}\n\nexport function isVarInLoopHead(path: NodePath) {\n if (t.isForStatement(path.parent)) return path.key === \"init\";\n if (t.isForXStatement(path.parent)) return path.key === \"left\";\n return false;\n}\n\nfunction filterMap(list: T[], fn: (item: T) => U | null) {\n const result: U[] = [];\n for (const item of list) {\n const mapped = fn(item);\n if (mapped) result.push(mapped);\n }\n return result;\n}\n","import { types as t } from \"@babel/core\";\nimport type { Scope, NodePath, PluginPass } from \"@babel/core\";\n\nexport function validateUsage(\n path: NodePath,\n state: PluginPass,\n tdzEnabled: boolean,\n) {\n const dynamicTDZNames = [];\n\n for (const name of Object.keys(path.getBindingIdentifiers())) {\n const binding = path.scope.getBinding(name);\n // binding may be null. ref: https://github.com/babel/babel/issues/15300\n if (!binding) continue;\n if (tdzEnabled) {\n if (injectTDZChecks(binding, state)) dynamicTDZNames.push(name);\n }\n if (path.node.kind === \"const\") {\n disallowConstantViolations(name, binding, state);\n }\n }\n\n return dynamicTDZNames;\n}\n\nfunction disallowConstantViolations(\n name: string,\n binding: Scope.Binding,\n state: PluginPass,\n) {\n for (const violation of binding.constantViolations) {\n const readOnlyError = state.addHelper(\"readOnlyError\");\n const throwNode = t.callExpression(readOnlyError, [t.stringLiteral(name)]);\n\n if (violation.isAssignmentExpression()) {\n const { operator, left, right } = violation.node;\n if (operator === \"=\") {\n const exprs = [right];\n exprs.push(throwNode);\n violation.replaceWith(t.sequenceExpression(exprs));\n } else if ([\"&&=\", \"||=\", \"??=\"].includes(operator)) {\n violation.replaceWith(\n t.logicalExpression(\n // @ts-expect-error todo: give a better type to operator\n operator.slice(0, -1),\n left,\n t.sequenceExpression([right, throwNode]),\n ),\n );\n } else {\n violation.replaceWith(\n t.sequenceExpression([\n t.binaryExpression(\n // @ts-expect-error todo: give a better type to operator\n operator.slice(0, -1),\n left,\n right,\n ),\n throwNode,\n ]),\n );\n }\n } else if (violation.isUpdateExpression()) {\n violation.replaceWith(\n t.sequenceExpression([\n t.unaryExpression(\"+\", violation.get(\"argument\").node),\n throwNode,\n ]),\n );\n } else if (violation.isForXStatement()) {\n violation.ensureBlock();\n violation\n .get(\"left\")\n .replaceWith(\n t.variableDeclaration(\"var\", [\n t.variableDeclarator(violation.scope.generateUidIdentifier(name)),\n ]),\n );\n (violation.node.body as t.BlockStatement).body.unshift(\n t.expressionStatement(throwNode),\n );\n }\n }\n}\n\nfunction getTDZStatus(refPath: NodePath, bindingPath: NodePath) {\n const executionStatus = bindingPath._guessExecutionStatusRelativeTo(refPath);\n\n if (executionStatus === \"before\") {\n return \"outside\";\n } else if (executionStatus === \"after\") {\n return \"inside\";\n } else {\n return \"maybe\";\n }\n}\n\nconst skipTDZChecks = new WeakSet();\n\nfunction buildTDZAssert(\n status: \"maybe\" | \"inside\",\n node: t.Identifier | t.JSXIdentifier,\n state: PluginPass,\n) {\n if (status === \"maybe\") {\n const clone = t.cloneNode(node);\n skipTDZChecks.add(clone);\n return t.callExpression(state.addHelper(\"temporalRef\"), [\n // @ts-expect-error Fixme: we may need to handle JSXIdentifier\n clone,\n t.stringLiteral(node.name),\n ]);\n } else {\n return t.callExpression(state.addHelper(\"tdz\"), [\n t.stringLiteral(node.name),\n ]);\n }\n}\n\ntype TDZReplacement = { status: \"maybe\" | \"inside\"; node: t.Expression };\nfunction getTDZReplacement(\n path: NodePath,\n state: PluginPass,\n): TDZReplacement | undefined;\nfunction getTDZReplacement(\n path: NodePath,\n state: PluginPass,\n id: t.Identifier | t.JSXIdentifier,\n): TDZReplacement | undefined;\nfunction getTDZReplacement(\n path: NodePath,\n state: PluginPass,\n id: t.Identifier | t.JSXIdentifier = path.node as any,\n): TDZReplacement | undefined {\n if (skipTDZChecks.has(id)) return;\n skipTDZChecks.add(id);\n\n const bindingPath = path.scope.getBinding(id.name)?.path;\n\n if (!bindingPath || bindingPath.isFunctionDeclaration()) return;\n\n const status = getTDZStatus(path, bindingPath);\n if (status === \"outside\") return;\n\n if (status === \"maybe\") {\n // add tdzThis to parent variable declarator so it's exploded\n // @ts-expect-error todo(flow->ts): avoid mutations\n bindingPath.parent._tdzThis = true;\n }\n\n return { status, node: buildTDZAssert(status, id, state) };\n}\n\nfunction injectTDZChecks(binding: Scope.Binding, state: PluginPass) {\n const allUsages = new Set(binding.referencePaths);\n binding.constantViolations.forEach(allUsages.add, allUsages);\n\n let dynamicTdz = false;\n\n for (const path of binding.constantViolations) {\n const { node } = path;\n if (skipTDZChecks.has(node)) continue;\n skipTDZChecks.add(node);\n\n if (path.isUpdateExpression()) {\n // arg is an identifier referencing the current binding\n const arg = path.get(\"argument\") as NodePath;\n\n const replacement = getTDZReplacement(path, state, arg.node);\n if (!replacement) continue;\n\n if (replacement.status === \"maybe\") {\n dynamicTdz = true;\n path.insertBefore(replacement.node);\n } else {\n path.replaceWith(replacement.node);\n }\n } else if (path.isAssignmentExpression()) {\n const nodes = [];\n const ids = process.env.BABEL_8_BREAKING\n ? path.getAssignmentIdentifiers()\n : path.getBindingIdentifiers();\n\n for (const name of Object.keys(ids)) {\n const replacement = getTDZReplacement(path, state, ids[name]);\n if (replacement) {\n nodes.push(t.expressionStatement(replacement.node));\n if (replacement.status === \"inside\") break;\n if (replacement.status === \"maybe\") dynamicTdz = true;\n }\n }\n\n if (nodes.length > 0) path.insertBefore(nodes);\n }\n }\n\n for (const path of binding.referencePaths as NodePath[]) {\n if (path.parentPath.isUpdateExpression()) continue;\n // It will be handled after transforming the loop\n if (path.parentPath.isFor({ left: path.node })) continue;\n\n const replacement = getTDZReplacement(path, state);\n if (!replacement) continue;\n if (replacement.status === \"maybe\") dynamicTdz = true;\n\n path.replaceWith(replacement.node);\n }\n\n return dynamicTdz;\n}\n","import { types as t } from \"@babel/core\";\nimport type { NodePath, Visitor, Scope } from \"@babel/core\";\n\n// Whenever a function declaration in a nested block scope\n// doesn't conflict with a block-scoped binding from an outer\n// scope, we transform it to a variable declaration.\n//\n// This implements the Annex B.3.3 behavior.\n//\n// TODO(Babel 8): Figure out how this should interact with\n// the transform-block-scoped functions plugin (it feels\n// wrong to handle this transform here), and what we want\n// to do with Annex B behavior in general.\n\n// To avoid confusing block-scoped variables transformed to\n// var with original vars, this transformation happens in two\n// different places:\n// 1. For functions that \"conflict\" with var-variables, in\n// the VariableDeclaration visitor.\n// 2. For functions that don't conflict with any variable,\n// in the FunctionDeclaration visitor.\n\nexport const annexB33FunctionsVisitor: Visitor = {\n VariableDeclaration(path) {\n if (isStrict(path)) return;\n if (path.node.kind !== \"var\") return;\n\n const varScope =\n path.scope.getFunctionParent() || path.scope.getProgramParent();\n // eslint-disable-next-line @typescript-eslint/no-use-before-define\n varScope.path.traverse(functionsToVarVisitor, {\n names: Object.keys(path.getBindingIdentifiers()),\n });\n },\n\n // NOTE: These two visitors target the same nodes as the\n // block-scoped-functions plugin\n\n BlockStatement(path) {\n if (isStrict(path)) return;\n if (t.isFunction(path.parent, { body: path.node })) return;\n transformStatementList(path.get(\"body\"));\n },\n\n SwitchCase(path) {\n if (isStrict(path)) return;\n transformStatementList(path.get(\"consequent\"));\n },\n};\n\nfunction transformStatementList(paths: NodePath[]) {\n outer: for (const path of paths) {\n if (!path.isFunctionDeclaration()) continue;\n // Annex B.3.3 only applies to plain functions.\n if (path.node.async || path.node.generator) return;\n\n const { scope } = path.parentPath;\n if (isVarScope(scope)) return;\n\n const { name } = path.node.id;\n let currScope = scope;\n do {\n if (currScope.parent.hasOwnBinding(name)) continue outer;\n currScope = currScope.parent;\n } while (!isVarScope(currScope));\n\n maybeTransformBlockScopedFunction(path);\n }\n}\n\nfunction maybeTransformBlockScopedFunction(\n path: NodePath,\n) {\n const {\n node,\n parentPath: { scope },\n } = path;\n\n const { id } = node;\n scope.removeOwnBinding(id.name);\n node.id = null;\n\n const varNode = t.variableDeclaration(\"var\", [\n t.variableDeclarator(id, t.toExpression(node)),\n ]);\n // @ts-expect-error undocumented property\n varNode._blockHoist = 2;\n\n const [varPath] = path.replaceWith(varNode);\n scope.registerDeclaration(varPath);\n}\n\nconst functionsToVarVisitor: Visitor<{ names: string[] }> = {\n Scope(path, { names }) {\n for (const name of names) {\n const binding = path.scope.getOwnBinding(name);\n if (binding && binding.kind === \"hoisted\") {\n maybeTransformBlockScopedFunction(\n binding.path as NodePath,\n );\n }\n }\n },\n \"Expression|Declaration\"(path) {\n path.skip();\n },\n};\n\nexport function isVarScope(scope: Scope) {\n return scope.path.isFunctionParent() || scope.path.isProgram();\n}\n\nfunction isStrict(path: NodePath) {\n return !!path.find(({ node }) => {\n if (t.isProgram(node)) {\n if (node.sourceType === \"module\") return true;\n } else if (t.isClass(node)) {\n return true;\n } else if (!t.isBlockStatement(node)) {\n return false;\n }\n\n return node.directives?.some(\n directive => directive.value.value === \"use strict\",\n );\n });\n}\n","import { declare } from \"@babel/helper-plugin-utils\";\nimport type { NodePath, Scope, Visitor, PluginPass } from \"@babel/core\";\nimport { types as t, traverse } from \"@babel/core\";\n\nimport {\n getLoopBodyBindings,\n getUsageInBody,\n isVarInLoopHead,\n wrapLoopBody,\n} from \"./loop.ts\";\nimport { validateUsage } from \"./validation.ts\";\nimport { annexB33FunctionsVisitor, isVarScope } from \"./annex-B_3_3.ts\";\n\nexport interface Options {\n tdz?: boolean;\n throwIfClosureRequired?: boolean;\n}\n\nexport default declare((api, opts: Options) => {\n api.assertVersion(REQUIRED_VERSION(7));\n\n const { throwIfClosureRequired = false, tdz: tdzEnabled = false } = opts;\n if (typeof throwIfClosureRequired !== \"boolean\") {\n throw new Error(`.throwIfClosureRequired must be a boolean, or undefined`);\n }\n if (typeof tdzEnabled !== \"boolean\") {\n throw new Error(`.tdz must be a boolean, or undefined`);\n }\n\n return {\n name: \"transform-block-scoping\",\n\n visitor: traverse.visitors.merge([\n // TODO: Consider adding an option to control Annex B behavior.\n annexB33FunctionsVisitor,\n {\n Loop(path: NodePath, state) {\n const isForStatement = path.isForStatement();\n const headPath = isForStatement\n ? path.get(\"init\")\n : path.isForXStatement()\n ? path.get(\"left\")\n : null;\n\n let needsBodyWrap = false;\n const markNeedsBodyWrap = () => {\n if (throwIfClosureRequired) {\n throw path.buildCodeFrameError(\n \"Compiling let/const in this block would add a closure \" +\n \"(throwIfClosureRequired).\",\n );\n }\n needsBodyWrap = true;\n };\n\n const body = path.get(\"body\");\n let bodyScope: Scope | null;\n if (body.isBlockStatement()) {\n bodyScope = body.scope;\n }\n const bindings = getLoopBodyBindings(path);\n for (const binding of bindings) {\n const { capturedInClosure } = getUsageInBody(binding, path);\n if (capturedInClosure) markNeedsBodyWrap();\n }\n\n const captured: string[] = [];\n const updatedBindingsUsages: Map[]> =\n new Map();\n\n if (headPath && isBlockScoped(headPath.node)) {\n const names = Object.keys(headPath.getBindingIdentifiers());\n const headScope = headPath.scope;\n\n for (let name of names) {\n if (bodyScope?.hasOwnBinding(name)) continue; // shadowed\n\n let binding = headScope.getOwnBinding(name);\n if (!binding) {\n headScope.crawl();\n binding = headScope.getOwnBinding(name);\n }\n const { usages, capturedInClosure, hasConstantViolations } =\n getUsageInBody(binding, path);\n\n if (\n headScope.parent.hasBinding(name) ||\n headScope.parent.hasGlobal(name)\n ) {\n // If the binding is not captured, there is no need\n // of adding it to the closure param. However, rename\n // it if it shadows an outer binding, because the\n // closure will be moved to an outer level.\n const newName = headScope.generateUid(name);\n headScope.rename(name, newName);\n name = newName;\n }\n\n if (capturedInClosure) {\n markNeedsBodyWrap();\n captured.push(name);\n }\n\n if (isForStatement && hasConstantViolations) {\n updatedBindingsUsages.set(name, usages);\n }\n }\n }\n\n if (needsBodyWrap) {\n const varPath = wrapLoopBody(path, captured, updatedBindingsUsages);\n\n if (headPath?.isVariableDeclaration()) {\n // If we wrap the loop body, we transform the var\n // declaration in the loop head now, to avoid\n // invalid references that break other plugins:\n //\n // for (let head of x) {\n // let i = head;\n // setTimeout(() => i);\n // }\n //\n // would become\n //\n // function _loop() {\n // let i = head;\n // setTimeout(() => i);\n // }\n // for (let head of x) _loop();\n //\n // which references `head` in a scope where it's not visible.\n transformBlockScopedVariable(headPath, state, tdzEnabled);\n }\n\n varPath.get(\"declarations.0.init\").unwrapFunctionEnvironment();\n }\n },\n\n VariableDeclaration(path, state) {\n transformBlockScopedVariable(path, state, tdzEnabled);\n },\n\n // Class declarations are block-scoped: if there is\n // a class declaration in a nested block that conflicts\n // with an outer block-scoped binding, rename it.\n // TODO: Should this be moved to the classes plugin?\n ClassDeclaration(path) {\n const { id } = path.node;\n if (!id) return;\n\n const { scope } = path.parentPath;\n if (\n !isVarScope(scope) &&\n scope.parent.hasBinding(id.name, { noUids: true })\n ) {\n path.scope.rename(id.name);\n }\n },\n },\n ]),\n };\n});\n\nconst conflictingFunctionsVisitor: Visitor<{ names: string[] }> = {\n Scope(path, { names }) {\n for (const name of names) {\n const binding = path.scope.getOwnBinding(name);\n if (binding && binding.kind === \"hoisted\") {\n path.scope.rename(name);\n }\n }\n },\n \"Expression|Declaration\"(path) {\n path.skip();\n },\n};\n\nfunction transformBlockScopedVariable(\n path: NodePath,\n state: PluginPass,\n tdzEnabled: boolean,\n) {\n if (!isBlockScoped(path.node)) return;\n\n const dynamicTDZNames = validateUsage(path, state, tdzEnabled);\n\n path.node.kind = \"var\";\n\n const bindingNames = Object.keys(path.getBindingIdentifiers());\n for (const name of bindingNames) {\n const binding = path.scope.getOwnBinding(name);\n if (!binding) continue;\n binding.kind = \"var\";\n }\n\n if (\n (isInLoop(path) && !isVarInLoopHead(path)) ||\n dynamicTDZNames.length > 0\n ) {\n for (const decl of path.node.declarations) {\n // We explicitly add `void 0` to cases like\n // for (;;) { let a; }\n // to make sure that `a` doesn't keep the value from\n // the previous iteration.\n decl.init ??= path.scope.buildUndefinedNode();\n }\n }\n\n const blockScope = path.scope;\n const varScope =\n blockScope.getFunctionParent() || blockScope.getProgramParent();\n\n if (varScope !== blockScope) {\n for (const name of bindingNames) {\n let newName = name;\n if (\n // We pass `noUids` true because, if `name` was a generated\n // UID, it has been used to declare the current variable in\n // a nested scope and thus we don't need to assume that it\n // may be declared (but not registered yet) in an upper one.\n blockScope.parent.hasBinding(name, { noUids: true }) ||\n blockScope.parent.hasGlobal(name)\n ) {\n newName = blockScope.generateUid(name);\n blockScope.rename(name, newName);\n }\n\n blockScope.moveBindingTo(newName, varScope);\n }\n }\n\n blockScope.path.traverse(conflictingFunctionsVisitor, {\n names: bindingNames,\n });\n\n for (const name of dynamicTDZNames) {\n path.scope.push({\n id: t.identifier(name),\n init: state.addHelper(\"temporalUndefined\"),\n });\n }\n}\n\nfunction isLetOrConst(kind: string): kind is \"let\" | \"const\" {\n return kind === \"let\" || kind === \"const\";\n}\n\nfunction isInLoop(path: NodePath): boolean {\n if (!path.parentPath) return false;\n if (path.parentPath.isLoop()) return true;\n if (path.parentPath.isFunctionParent()) return false;\n return isInLoop(path.parentPath);\n}\n\nfunction isBlockScoped(node: t.Node): node is t.VariableDeclaration {\n if (!t.isVariableDeclaration(node)) return false;\n if (\n // @ts-expect-error Fixme: document symbol properties\n node[t.BLOCK_SCOPED_SYMBOL]\n ) {\n return true;\n }\n\n if (!isLetOrConst(node.kind) && node.kind !== \"using\") {\n return false;\n }\n\n return true;\n}\n","// env vars from the cli are always strings, so !!ENV_VAR returns true for \"false\"\nfunction bool(value) {\n if (value == null) return false;\n return value && value !== \"false\" && value !== \"0\";\n}\n\nmodule.exports = bool(process.env[\"BABEL_8_BREAKING\"])\n ? require(\"globals-BABEL_8_BREAKING-true\")\n : require(\"globals-BABEL_8_BREAKING-false\");\n","import { template, types as t, type File } from \"@babel/core\";\n\nconst helper = template.statement`\n function CALL_SUPER(\n _this,\n derived,\n args,\n ) {\n function isNativeReflectConstruct() {\n if (typeof Reflect === \"undefined\" || !Reflect.construct) return false;\n\n // core-js@3\n if (Reflect.construct.sham) return false;\n\n // Proxy can't be polyfilled. Every browser implemented\n // proxies before or at the same time as Reflect.construct,\n // so if they support Proxy they also support Reflect.construct.\n if (typeof Proxy === \"function\") return true;\n\n // Since Reflect.construct can't be properly polyfilled, some\n // implementations (e.g. core-js@2) don't set the correct internal slots.\n // Those polyfills don't allow us to subclass built-ins, so we need to\n // use our fallback implementation.\n try {\n // If the internal slots aren't set, this throws an error similar to\n // TypeError: this is not a Boolean object.\n return !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}),);\n } catch (e) {\n return false;\n }\n }\n\n // Super\n derived = GET_PROTOTYPE_OF(derived);\n return POSSIBLE_CONSTRUCTOR_RETURN(\n _this,\n isNativeReflectConstruct()\n ? // NOTE: This doesn't work if this.__proto__.constructor has been modified.\n Reflect.construct(\n derived,\n args || [],\n GET_PROTOTYPE_OF(_this).constructor,\n )\n : derived.apply(_this, args),\n );\n }\n`;\n\nconst helperIDs = new WeakMap();\n\nexport default function addCallSuperHelper(file: File) {\n if (helperIDs.has(file)) {\n // TODO: Only use t.cloneNode in Babel 8\n // t.cloneNode isn't supported in every version\n return (t.cloneNode || t.clone)(helperIDs.get(file));\n }\n\n try {\n return file.addHelper(\"callSuper\");\n } catch {\n // old Babel doesn't support the helper.\n }\n\n const id = file.scope.generateUidIdentifier(\"callSuper\");\n helperIDs.set(file, id);\n\n const fn = helper({\n CALL_SUPER: id,\n GET_PROTOTYPE_OF: file.addHelper(\"getPrototypeOf\"),\n POSSIBLE_CONSTRUCTOR_RETURN: file.addHelper(\"possibleConstructorReturn\"),\n });\n\n file.path.unshiftContainer(\"body\", [fn]);\n file.scope.registerDeclaration(file.path.get(\"body.0\"));\n\n return t.cloneNode(id);\n}\n","import type { NodePath, Scope, File } from \"@babel/core\";\nimport ReplaceSupers from \"@babel/helper-replace-supers\";\nimport { template, types as t } from \"@babel/core\";\nimport { visitors } from \"@babel/traverse\";\nimport annotateAsPure from \"@babel/helper-annotate-as-pure\";\n\nimport addCallSuperHelper from \"./inline-callSuper-helpers.ts\";\n\ntype ClassAssumptions = {\n setClassMethods: boolean;\n constantSuper: boolean;\n superIsCallableConstructor: boolean;\n noClassCalls: boolean;\n};\n\ntype ClassConstructor = t.ClassMethod & { kind: \"constructor\" };\n\nfunction buildConstructor(\n classRef: t.Identifier,\n constructorBody: t.BlockStatement,\n node: t.Class,\n) {\n const func = t.functionDeclaration(\n t.cloneNode(classRef),\n [],\n constructorBody,\n );\n t.inherits(func, node);\n return func;\n}\n\ntype Descriptor = {\n key: t.Expression;\n get?: t.Expression | null;\n set?: t.Expression | null;\n value?: t.Expression | null;\n constructor?: t.Expression | null;\n};\n\ntype State = {\n parent: t.Node;\n scope: Scope;\n node: t.Class;\n path: NodePath;\n file: File;\n\n classId: t.Identifier | void;\n classRef: t.Identifier;\n superName: t.Expression | null;\n superReturns: NodePath[];\n isDerived: boolean;\n extendsNative: boolean;\n\n construct: t.FunctionDeclaration;\n constructorBody: t.BlockStatement;\n userConstructor: ClassConstructor;\n userConstructorPath: NodePath;\n hasConstructor: boolean;\n\n body: t.Statement[];\n superThises: NodePath[];\n pushedInherits: boolean;\n pushedCreateClass: boolean;\n protoAlias: t.Identifier | null;\n isLoose: boolean;\n\n dynamicKeys: Map;\n\n methods: {\n // 'list' is in the same order as the elements appear in the class body.\n // if there aren't computed keys, we can safely reorder class elements\n // and use 'map' to merge duplicates.\n instance: {\n hasComputed: boolean;\n list: Descriptor[];\n map: Map;\n };\n static: {\n hasComputed: boolean;\n list: Descriptor[];\n map: Map;\n };\n };\n};\n\ntype PropertyInfo = {\n instance: t.ObjectExpression[] | null;\n static: t.ObjectExpression[] | null;\n};\n\nexport default function transformClass(\n path: NodePath,\n file: File,\n builtinClasses: ReadonlySet,\n isLoose: boolean,\n assumptions: ClassAssumptions,\n supportUnicodeId: boolean,\n) {\n const classState: State = {\n parent: undefined,\n scope: undefined,\n node: undefined,\n path: undefined,\n file: undefined,\n\n classId: undefined,\n classRef: undefined,\n superName: null,\n superReturns: [],\n isDerived: false,\n extendsNative: false,\n\n construct: undefined,\n constructorBody: undefined,\n userConstructor: undefined,\n userConstructorPath: undefined,\n hasConstructor: false,\n\n body: [],\n superThises: [],\n pushedInherits: false,\n pushedCreateClass: false,\n protoAlias: null,\n isLoose: false,\n\n dynamicKeys: new Map(),\n\n methods: {\n instance: {\n hasComputed: false,\n list: [],\n map: new Map(),\n },\n static: {\n hasComputed: false,\n list: [],\n map: new Map(),\n },\n },\n };\n\n const setState = (newState: Partial) => {\n Object.assign(classState, newState);\n };\n\n const findThisesVisitor = visitors.environmentVisitor({\n ThisExpression(path) {\n classState.superThises.push(path);\n },\n });\n\n function createClassHelper(args: t.Expression[]) {\n return t.callExpression(classState.file.addHelper(\"createClass\"), args);\n }\n\n /**\n * Creates a class constructor or bail out if there is one\n */\n function maybeCreateConstructor() {\n const classBodyPath = classState.path.get(\"body\");\n for (const path of classBodyPath.get(\"body\")) {\n if (path.isClassMethod({ kind: \"constructor\" })) return;\n }\n\n let params: t.FunctionExpression[\"params\"], body;\n\n if (classState.isDerived) {\n const constructor = template.expression.ast`\n (function () {\n super(...arguments);\n })\n ` as t.FunctionExpression;\n params = constructor.params;\n body = constructor.body;\n } else {\n params = [];\n body = t.blockStatement([]);\n }\n\n classBodyPath.unshiftContainer(\n \"body\",\n t.classMethod(\"constructor\", t.identifier(\"constructor\"), params, body),\n );\n }\n\n function buildBody() {\n maybeCreateConstructor();\n pushBody();\n verifyConstructor();\n\n if (classState.userConstructor) {\n const { constructorBody, userConstructor, construct } = classState;\n\n constructorBody.body.push(...userConstructor.body.body);\n t.inherits(construct, userConstructor);\n t.inherits(constructorBody, userConstructor.body);\n }\n\n pushDescriptors();\n }\n\n function pushBody() {\n const classBodyPaths: Array = classState.path.get(\"body.body\");\n\n for (const path of classBodyPaths) {\n const node = path.node;\n\n if (path.isClassProperty() || path.isClassPrivateProperty()) {\n throw path.buildCodeFrameError(\"Missing class properties transform.\");\n }\n\n if (node.decorators) {\n throw path.buildCodeFrameError(\n \"Method has decorators, put the decorator plugin before the classes one.\",\n );\n }\n\n if (t.isClassMethod(node)) {\n const isConstructor = node.kind === \"constructor\";\n\n const replaceSupers = new ReplaceSupers({\n methodPath: path,\n objectRef: classState.classRef,\n superRef: classState.superName,\n constantSuper: assumptions.constantSuper,\n file: classState.file,\n refToPreserve: classState.classRef,\n });\n\n replaceSupers.replace();\n\n const superReturns: NodePath[] = [];\n path.traverse(\n visitors.environmentVisitor({\n ReturnStatement(path) {\n if (!path.getFunctionParent().isArrowFunctionExpression()) {\n superReturns.push(path);\n }\n },\n }),\n );\n\n if (isConstructor) {\n pushConstructor(superReturns, node as ClassConstructor, path);\n } else {\n if (!process.env.BABEL_8_BREAKING && !USE_ESM && !IS_STANDALONE) {\n // polyfill when being run by an older Babel version\n path.ensureFunctionName ??=\n // eslint-disable-next-line no-restricted-globals\n require(\"@babel/traverse\").NodePath.prototype.ensureFunctionName;\n }\n path.ensureFunctionName(supportUnicodeId);\n let wrapped;\n if (node !== path.node) {\n wrapped = path.node;\n // The node has been wrapped. Reset it to the original once, but store the wrapper.\n path.replaceWith(node);\n }\n\n pushMethod(node, wrapped);\n }\n }\n }\n }\n\n function pushDescriptors() {\n pushInheritsToBody();\n\n const { body } = classState;\n\n const props: PropertyInfo = {\n instance: null,\n static: null,\n };\n\n for (const placement of [\"static\", \"instance\"] as const) {\n if (classState.methods[placement].list.length) {\n props[placement] = classState.methods[placement].list.map(desc => {\n const obj = t.objectExpression([\n t.objectProperty(t.identifier(\"key\"), desc.key),\n ]);\n\n for (const kind of [\"get\", \"set\", \"value\"] as const) {\n if (desc[kind] != null) {\n obj.properties.push(\n t.objectProperty(t.identifier(kind), desc[kind]),\n );\n }\n }\n\n return obj;\n });\n }\n }\n\n if (props.instance || props.static) {\n let args = [\n t.cloneNode(classState.classRef), // Constructor\n props.instance ? t.arrayExpression(props.instance) : t.nullLiteral(), // instanceDescriptors\n props.static ? t.arrayExpression(props.static) : t.nullLiteral(), // staticDescriptors\n ];\n\n let lastNonNullIndex = 0;\n for (let i = 0; i < args.length; i++) {\n if (!t.isNullLiteral(args[i])) lastNonNullIndex = i;\n }\n args = args.slice(0, lastNonNullIndex + 1);\n\n body.push(t.returnStatement(createClassHelper(args)));\n classState.pushedCreateClass = true;\n }\n }\n\n function wrapSuperCall(\n bareSuper: NodePath,\n superRef: t.Expression,\n thisRef: () => t.Identifier,\n body: NodePath,\n ) {\n const bareSuperNode = bareSuper.node;\n let call;\n\n if (assumptions.superIsCallableConstructor) {\n bareSuperNode.arguments.unshift(t.thisExpression());\n if (\n bareSuperNode.arguments.length === 2 &&\n t.isSpreadElement(bareSuperNode.arguments[1]) &&\n t.isIdentifier(bareSuperNode.arguments[1].argument, {\n name: \"arguments\",\n })\n ) {\n // special case single arguments spread\n bareSuperNode.arguments[1] = bareSuperNode.arguments[1].argument;\n bareSuperNode.callee = t.memberExpression(\n t.cloneNode(superRef),\n t.identifier(\"apply\"),\n );\n } else {\n bareSuperNode.callee = t.memberExpression(\n t.cloneNode(superRef),\n t.identifier(\"call\"),\n );\n }\n\n call = t.logicalExpression(\"||\", bareSuperNode, t.thisExpression());\n } else {\n const args: t.Expression[] = [\n t.thisExpression(),\n t.cloneNode(classState.classRef),\n ];\n if (bareSuperNode.arguments?.length) {\n const bareSuperNodeArguments = bareSuperNode.arguments as (\n | t.Expression\n | t.SpreadElement\n )[];\n\n /**\n * test262/test/language/expressions/super/call-spread-err-sngl-err-itr-get-get.js\n *\n * var iter = {};\n * Object.defineProperty(iter, Symbol.iterator, {\n * get: function() {\n * throw new Test262Error();\n * }\n * })\n * super(...iter);\n */\n\n if (\n bareSuperNodeArguments.length === 1 &&\n t.isSpreadElement(bareSuperNodeArguments[0]) &&\n t.isIdentifier(bareSuperNodeArguments[0].argument, {\n name: \"arguments\",\n })\n ) {\n args.push(bareSuperNodeArguments[0].argument);\n } else {\n args.push(t.arrayExpression(bareSuperNodeArguments));\n }\n }\n call = t.callExpression(addCallSuperHelper(classState.file), args);\n }\n\n if (\n bareSuper.parentPath.isExpressionStatement() &&\n bareSuper.parentPath.container === body.node.body &&\n body.node.body.length - 1 === bareSuper.parentPath.key\n ) {\n // this super call is the last statement in the body so we can just straight up\n // turn it into a return\n\n if (classState.superThises.length) {\n call = t.assignmentExpression(\"=\", thisRef(), call);\n }\n\n bareSuper.parentPath.replaceWith(t.returnStatement(call));\n } else {\n bareSuper.replaceWith(t.assignmentExpression(\"=\", thisRef(), call));\n }\n }\n\n function verifyConstructor() {\n if (!classState.isDerived) return;\n\n const path = classState.userConstructorPath;\n const body = path.get(\"body\");\n\n const constructorBody = path.get(\"body\");\n\n let maxGuaranteedSuperBeforeIndex = constructorBody.node.body.length;\n\n path.traverse(findThisesVisitor);\n\n let thisRef = function () {\n const ref = path.scope.generateDeclaredUidIdentifier(\"this\");\n maxGuaranteedSuperBeforeIndex++;\n thisRef = () => t.cloneNode(ref);\n return ref;\n };\n\n const buildAssertThisInitialized = function () {\n return t.callExpression(\n classState.file.addHelper(\"assertThisInitialized\"),\n [thisRef()],\n );\n };\n\n const bareSupers: NodePath[] = [];\n path.traverse(\n visitors.environmentVisitor({\n Super(path) {\n const { node, parentPath } = path;\n if (parentPath.isCallExpression({ callee: node })) {\n bareSupers.unshift(parentPath);\n }\n },\n }),\n );\n\n for (const bareSuper of bareSupers) {\n wrapSuperCall(bareSuper, classState.superName, thisRef, body);\n\n if (maxGuaranteedSuperBeforeIndex >= 0) {\n let lastParentPath: NodePath;\n bareSuper.find(function (parentPath) {\n // hit top so short circuit\n if (parentPath === constructorBody) {\n maxGuaranteedSuperBeforeIndex = Math.min(\n maxGuaranteedSuperBeforeIndex,\n lastParentPath.key as number,\n );\n return true;\n }\n\n if (\n parentPath.isLoop() ||\n parentPath.isConditional() ||\n parentPath.isArrowFunctionExpression()\n ) {\n maxGuaranteedSuperBeforeIndex = -1;\n return true;\n }\n\n lastParentPath = parentPath;\n });\n }\n }\n\n const guaranteedCalls = new Set();\n\n for (const thisPath of classState.superThises) {\n const { node, parentPath } = thisPath;\n if (parentPath.isMemberExpression({ object: node })) {\n thisPath.replaceWith(thisRef());\n continue;\n }\n\n let thisIndex: number;\n thisPath.find(function (parentPath) {\n if (parentPath.parentPath === constructorBody) {\n thisIndex = parentPath.key as number;\n return true;\n }\n });\n\n let exprPath: NodePath = thisPath.parentPath.isSequenceExpression()\n ? thisPath.parentPath\n : thisPath;\n if (\n exprPath.listKey === \"arguments\" &&\n (exprPath.parentPath.isCallExpression() ||\n exprPath.parentPath.isOptionalCallExpression())\n ) {\n exprPath = exprPath.parentPath;\n } else {\n exprPath = null;\n }\n\n if (\n (maxGuaranteedSuperBeforeIndex !== -1 &&\n thisIndex > maxGuaranteedSuperBeforeIndex) ||\n guaranteedCalls.has(exprPath)\n ) {\n thisPath.replaceWith(thisRef());\n } else {\n if (exprPath) {\n guaranteedCalls.add(exprPath);\n }\n thisPath.replaceWith(buildAssertThisInitialized());\n }\n }\n\n let wrapReturn;\n\n if (classState.isLoose) {\n wrapReturn = (returnArg: t.Expression | void) => {\n const thisExpr = buildAssertThisInitialized();\n return returnArg\n ? t.logicalExpression(\"||\", returnArg, thisExpr)\n : thisExpr;\n };\n } else {\n wrapReturn = (returnArg: t.Expression | undefined) => {\n const returnParams: t.Expression[] = [thisRef()];\n if (returnArg != null) {\n returnParams.push(returnArg);\n }\n return t.callExpression(\n classState.file.addHelper(\"possibleConstructorReturn\"),\n returnParams,\n );\n };\n }\n\n // if we have a return as the last node in the body then we've already caught that\n // return\n const bodyPaths = body.get(\"body\");\n const guaranteedSuperBeforeFinish =\n maxGuaranteedSuperBeforeIndex !== -1 &&\n maxGuaranteedSuperBeforeIndex < bodyPaths.length;\n if (!bodyPaths.length || !bodyPaths.pop().isReturnStatement()) {\n body.pushContainer(\n \"body\",\n t.returnStatement(\n guaranteedSuperBeforeFinish\n ? thisRef()\n : buildAssertThisInitialized(),\n ),\n );\n }\n\n for (const returnPath of classState.superReturns) {\n returnPath\n .get(\"argument\")\n .replaceWith(wrapReturn(returnPath.node.argument));\n }\n }\n\n /**\n * Push a method to its respective mutatorMap.\n */\n function pushMethod(node: t.ClassMethod, wrapped?: t.Expression) {\n if (node.kind === \"method\") {\n if (processMethod(node)) return;\n }\n\n const placement = node.static ? \"static\" : \"instance\";\n const methods = classState.methods[placement];\n\n const descKey = node.kind === \"method\" ? \"value\" : node.kind;\n const key =\n t.isNumericLiteral(node.key) || t.isBigIntLiteral(node.key)\n ? t.stringLiteral(String(node.key.value))\n : t.toComputedKey(node);\n methods.hasComputed = !t.isStringLiteral(key);\n\n const fn: t.Expression = wrapped ?? t.toExpression(node);\n\n let descriptor: Descriptor;\n if (\n !methods.hasComputed &&\n methods.map.has((key as t.StringLiteral).value)\n ) {\n descriptor = methods.map.get((key as t.StringLiteral).value);\n descriptor[descKey] = fn;\n\n if (descKey === \"value\") {\n descriptor.get = null;\n descriptor.set = null;\n } else {\n descriptor.value = null;\n }\n } else {\n descriptor = {\n key:\n // private name has been handled in class-properties transform\n key as t.Expression,\n [descKey]: fn,\n } as Descriptor;\n methods.list.push(descriptor);\n\n if (!methods.hasComputed) {\n methods.map.set((key as t.StringLiteral).value, descriptor);\n }\n }\n }\n\n function processMethod(node: t.ClassMethod) {\n if (assumptions.setClassMethods && !node.decorators) {\n // use assignments instead of define properties for loose classes\n let { classRef } = classState;\n if (!node.static) {\n insertProtoAliasOnce();\n classRef = classState.protoAlias;\n }\n const methodName = t.memberExpression(\n t.cloneNode(classRef),\n node.key,\n node.computed || t.isLiteral(node.key),\n );\n\n const func: t.Expression = t.functionExpression(\n // @ts-expect-error We actually set and id through .ensureFunctionName\n node.id,\n // @ts-expect-error Fixme: should throw when we see TSParameterProperty\n node.params,\n node.body,\n node.generator,\n node.async,\n );\n t.inherits(func, node);\n\n const expr = t.expressionStatement(\n t.assignmentExpression(\"=\", methodName, func),\n );\n t.inheritsComments(expr, node);\n classState.body.push(expr);\n return true;\n }\n\n return false;\n }\n\n function insertProtoAliasOnce() {\n if (classState.protoAlias === null) {\n setState({ protoAlias: classState.scope.generateUidIdentifier(\"proto\") });\n const classProto = t.memberExpression(\n classState.classRef,\n t.identifier(\"prototype\"),\n );\n const protoDeclaration = t.variableDeclaration(\"var\", [\n t.variableDeclarator(classState.protoAlias, classProto),\n ]);\n\n classState.body.push(protoDeclaration);\n }\n }\n\n /**\n * Replace the constructor body of our class.\n */\n function pushConstructor(\n superReturns: NodePath[],\n method: ClassConstructor,\n path: NodePath,\n ) {\n setState({\n userConstructorPath: path,\n userConstructor: method,\n hasConstructor: true,\n superReturns,\n });\n\n const { construct } = classState;\n\n t.inheritsComments(construct, method);\n\n // @ts-expect-error Fixme: should throw when we see TSParameterProperty\n construct.params = method.params;\n\n t.inherits(construct.body, method.body);\n construct.body.directives = method.body.directives;\n\n // we haven't pushed any descriptors yet\n // @ts-expect-error todo(flow->ts) maybe remove this block - properties from condition are not used anywhere else\n if (classState.hasInstanceDescriptors || classState.hasStaticDescriptors) {\n pushDescriptors();\n }\n\n pushInheritsToBody();\n }\n\n /**\n * Push inherits helper to body.\n */\n function pushInheritsToBody() {\n if (!classState.isDerived || classState.pushedInherits) return;\n\n classState.pushedInherits = true;\n\n // Unshift to ensure that the constructor inheritance is set up before\n // any properties can be assigned to the prototype.\n\n classState.body.unshift(\n t.expressionStatement(\n t.callExpression(\n classState.file.addHelper(\n classState.isLoose ? \"inheritsLoose\" : \"inherits\",\n ),\n [t.cloneNode(classState.classRef), t.cloneNode(classState.superName)],\n ),\n ),\n );\n }\n\n function extractDynamicKeys() {\n const { dynamicKeys, node, scope } = classState;\n\n for (const elem of node.body.body) {\n if (!t.isClassMethod(elem) || !elem.computed) continue;\n if (scope.isPure(elem.key, /* constants only*/ true)) continue;\n\n const id = scope.generateUidIdentifierBasedOnNode(elem.key);\n dynamicKeys.set(id.name, elem.key);\n\n elem.key = id;\n }\n }\n\n function setupClosureParamsArgs() {\n const { superName, dynamicKeys } = classState;\n const closureParams = [];\n const closureArgs = [];\n\n if (classState.isDerived) {\n let arg = t.cloneNode(superName);\n if (classState.extendsNative) {\n arg = t.callExpression(classState.file.addHelper(\"wrapNativeSuper\"), [\n arg,\n ]);\n annotateAsPure(arg);\n }\n\n const param =\n classState.scope.generateUidIdentifierBasedOnNode(superName);\n\n closureParams.push(param);\n closureArgs.push(arg);\n\n setState({ superName: t.cloneNode(param) });\n }\n\n for (const [name, value] of dynamicKeys) {\n closureParams.push(t.identifier(name));\n closureArgs.push(value);\n }\n\n return { closureParams, closureArgs };\n }\n\n function classTransformer(\n path: NodePath,\n file: File,\n builtinClasses: ReadonlySet,\n isLoose: boolean,\n ) {\n setState({\n parent: path.parent,\n scope: path.scope,\n node: path.node,\n path,\n file,\n isLoose,\n });\n\n setState({\n classId: classState.node.id,\n // this is the name of the binding that will **always** reference the class we've constructed\n classRef: classState.node.id\n ? t.identifier(classState.node.id.name)\n : classState.scope.generateUidIdentifier(\"class\"),\n superName: classState.node.superClass,\n isDerived: !!classState.node.superClass,\n constructorBody: t.blockStatement([]),\n });\n\n setState({\n extendsNative:\n t.isIdentifier(classState.superName) &&\n builtinClasses.has(classState.superName.name) &&\n !classState.scope.hasBinding(\n classState.superName.name,\n /* noGlobals */ true,\n ),\n });\n\n const { classRef, node, constructorBody } = classState;\n\n setState({\n construct: buildConstructor(classRef, constructorBody, node),\n });\n\n extractDynamicKeys();\n\n const { body } = classState;\n const { closureParams, closureArgs } = setupClosureParamsArgs();\n\n buildBody();\n\n // make sure this class isn't directly called (with A() instead new A())\n if (!assumptions.noClassCalls) {\n constructorBody.body.unshift(\n t.expressionStatement(\n t.callExpression(classState.file.addHelper(\"classCallCheck\"), [\n t.thisExpression(),\n t.cloneNode(classState.classRef),\n ]),\n ),\n );\n }\n\n const isStrict = path.isInStrictMode();\n let constructorOnly = body.length === 0;\n if (constructorOnly && !isStrict) {\n for (const param of classState.construct.params) {\n // It's illegal to put a use strict directive into the body of a function\n // with non-simple parameters for some reason. So, we have to use a strict\n // wrapper function.\n if (!t.isIdentifier(param)) {\n constructorOnly = false;\n break;\n }\n }\n }\n\n const directives = constructorOnly\n ? classState.construct.body.directives\n : [];\n if (!isStrict) {\n directives.push(t.directive(t.directiveLiteral(\"use strict\")));\n }\n\n if (constructorOnly) {\n // named class with only a constructor\n const expr = t.toExpression(classState.construct);\n return classState.isLoose ? expr : createClassHelper([expr]);\n }\n\n if (!classState.pushedCreateClass) {\n body.push(\n t.returnStatement(\n classState.isLoose\n ? t.cloneNode(classState.classRef)\n : createClassHelper([t.cloneNode(classState.classRef)]),\n ),\n );\n }\n\n body.unshift(classState.construct);\n\n const container = t.arrowFunctionExpression(\n closureParams,\n t.blockStatement(body, directives),\n );\n return t.callExpression(container, closureArgs);\n }\n\n return classTransformer(path, file, builtinClasses, isLoose);\n}\n","import { declare } from \"@babel/helper-plugin-utils\";\nimport { isRequired } from \"@babel/helper-compilation-targets\";\nimport annotateAsPure from \"@babel/helper-annotate-as-pure\";\nimport { types as t } from \"@babel/core\";\nimport globals from \"globals\";\nimport transformClass from \"./transformClass.ts\";\n\nconst getBuiltinClasses = (category: keyof typeof globals) =>\n Object.keys(globals[category]).filter(name => /^[A-Z]/.test(name));\n\nconst builtinClasses = new Set([\n ...getBuiltinClasses(\"builtin\"),\n ...getBuiltinClasses(\"browser\"),\n]);\n\nexport interface Options {\n loose?: boolean;\n}\n\nexport default declare((api, options: Options) => {\n api.assertVersion(REQUIRED_VERSION(7));\n\n const { loose = false } = options;\n\n const setClassMethods = api.assumption(\"setClassMethods\") ?? loose;\n const constantSuper = api.assumption(\"constantSuper\") ?? loose;\n const superIsCallableConstructor =\n api.assumption(\"superIsCallableConstructor\") ?? loose;\n const noClassCalls = api.assumption(\"noClassCalls\") ?? loose;\n const supportUnicodeId = !isRequired(\n \"transform-unicode-escapes\",\n api.targets(),\n );\n\n // todo: investigate traversal requeueing\n const VISITED = new WeakSet();\n\n return {\n name: \"transform-classes\",\n\n visitor: {\n ExportDefaultDeclaration(path) {\n if (!path.get(\"declaration\").isClassDeclaration()) return;\n if (!process.env.BABEL_8_BREAKING && !USE_ESM && !IS_STANDALONE) {\n // polyfill when being run by an older Babel version\n path.splitExportDeclaration ??=\n // eslint-disable-next-line no-restricted-globals\n require(\"@babel/traverse\").NodePath.prototype.splitExportDeclaration;\n }\n path.splitExportDeclaration();\n },\n\n ClassDeclaration(path) {\n const { node } = path;\n\n const ref = node.id || path.scope.generateUidIdentifier(\"class\");\n\n path.replaceWith(\n t.variableDeclaration(\"let\", [\n t.variableDeclarator(ref, t.toExpression(node)),\n ]),\n );\n },\n\n ClassExpression(path, state) {\n const { node } = path;\n if (VISITED.has(node)) return;\n\n if (!process.env.BABEL_8_BREAKING && !USE_ESM && !IS_STANDALONE) {\n // polyfill when being run by an older Babel version\n path.ensureFunctionName ??=\n // eslint-disable-next-line no-restricted-globals\n require(\"@babel/traverse\").NodePath.prototype.ensureFunctionName;\n }\n const replacement = path.ensureFunctionName(supportUnicodeId);\n if (replacement && replacement.node !== node) return;\n\n VISITED.add(node);\n\n const [replacedPath] = path.replaceWith(\n transformClass(\n path,\n state.file,\n builtinClasses,\n loose,\n {\n setClassMethods,\n constantSuper,\n superIsCallableConstructor,\n noClassCalls,\n },\n supportUnicodeId,\n ),\n );\n\n if (replacedPath.isCallExpression()) {\n annotateAsPure(replacedPath);\n const callee = replacedPath.get(\"callee\");\n if (callee.isArrowFunctionExpression()) {\n // This is an IIFE, so we don't need to worry about the noNewArrows assumption\n callee.arrowFunctionToExpression();\n }\n }\n },\n },\n };\n});\n","import { types as t } from \"@babel/core\";\nimport type { PluginPass, Scope } from \"@babel/core\";\nimport { declare } from \"@babel/helper-plugin-utils\";\nimport template from \"@babel/template\";\n\nexport interface Options {\n loose?: boolean;\n}\n\ntype PropertyInfo = {\n scope: Scope;\n objId: t.Identifier;\n body: t.Statement[];\n computedProps: t.ObjectMember[];\n initPropExpression: t.ObjectExpression;\n state: PluginPass;\n};\n\nif (!process.env.BABEL_8_BREAKING) {\n // eslint-disable-next-line no-var\n var DefineAccessorHelper = template.expression.ast`\n function (type, obj, key, fn) {\n var desc = { configurable: true, enumerable: true };\n desc[type] = fn;\n return Object.defineProperty(obj, key, desc);\n }\n `;\n // @ts-expect-error undocumented _compact node property\n DefineAccessorHelper._compact = true;\n}\n\nexport default declare((api, options: Options) => {\n api.assertVersion(REQUIRED_VERSION(7));\n\n const setComputedProperties =\n api.assumption(\"setComputedProperties\") ?? options.loose;\n\n const pushComputedProps = setComputedProperties\n ? pushComputedPropsLoose\n : pushComputedPropsSpec;\n\n function buildDefineAccessor(\n state: PluginPass,\n obj: t.Expression,\n prop: t.ObjectMethod,\n ) {\n const type = prop.kind as \"get\" | \"set\";\n const key =\n !prop.computed && t.isIdentifier(prop.key)\n ? t.stringLiteral(prop.key.name)\n : prop.key;\n const fn = getValue(prop);\n if (process.env.BABEL_8_BREAKING) {\n return t.callExpression(state.addHelper(\"defineAccessor\"), [\n t.stringLiteral(type),\n obj,\n key,\n fn,\n ]);\n } else {\n let helper: t.Identifier;\n if (state.availableHelper(\"defineAccessor\")) {\n helper = state.addHelper(\"defineAccessor\");\n } else {\n // Fallback for @babel/helpers <= 7.20.6, manually add helper function\n const file = state.file;\n helper = file.get(\"fallbackDefineAccessorHelper\");\n if (!helper) {\n const id = file.scope.generateUidIdentifier(\"defineAccessor\");\n file.scope.push({\n id,\n init: DefineAccessorHelper,\n });\n file.set(\"fallbackDefineAccessorHelper\", (helper = id));\n }\n helper = t.cloneNode(helper);\n }\n\n return t.callExpression(helper, [t.stringLiteral(type), obj, key, fn]);\n }\n }\n\n /**\n * Get value of an object member under object expression.\n * Returns a function expression if prop is a ObjectMethod.\n *\n * @param {t.ObjectMember} prop\n * @returns t.Expression\n */\n function getValue(prop: t.ObjectMember) {\n if (t.isObjectProperty(prop)) {\n return prop.value as t.Expression;\n } else if (t.isObjectMethod(prop)) {\n return t.functionExpression(\n null,\n prop.params,\n prop.body,\n prop.generator,\n prop.async,\n );\n }\n }\n\n function pushAssign(\n objId: t.Identifier,\n prop: t.ObjectMember,\n body: t.Statement[],\n ) {\n body.push(\n t.expressionStatement(\n t.assignmentExpression(\n \"=\",\n t.memberExpression(\n t.cloneNode(objId),\n prop.key,\n prop.computed || t.isLiteral(prop.key),\n ),\n getValue(prop),\n ),\n ),\n );\n }\n\n function pushComputedPropsLoose(info: PropertyInfo) {\n const { computedProps, state, initPropExpression, objId, body } = info;\n\n for (const prop of computedProps) {\n if (\n t.isObjectMethod(prop) &&\n (prop.kind === \"get\" || prop.kind === \"set\")\n ) {\n if (computedProps.length === 1) {\n return buildDefineAccessor(state, initPropExpression, prop);\n } else {\n body.push(\n t.expressionStatement(\n buildDefineAccessor(state, t.cloneNode(objId), prop),\n ),\n );\n }\n } else {\n pushAssign(t.cloneNode(objId), prop, body);\n }\n }\n }\n\n function pushComputedPropsSpec(info: PropertyInfo) {\n const { objId, body, computedProps, state } = info;\n\n // To prevent too deep AST structures in case of large objects\n const CHUNK_LENGTH_CAP = 10;\n\n let currentChunk: t.ObjectMember[] = null;\n const computedPropsChunks: Array = [];\n for (const prop of computedProps) {\n if (!currentChunk || currentChunk.length === CHUNK_LENGTH_CAP) {\n currentChunk = [];\n computedPropsChunks.push(currentChunk);\n }\n currentChunk.push(prop);\n }\n\n for (const chunk of computedPropsChunks) {\n const single = computedPropsChunks.length === 1;\n let node: t.Expression = single\n ? info.initPropExpression\n : t.cloneNode(objId);\n for (const prop of chunk) {\n if (\n t.isObjectMethod(prop) &&\n (prop.kind === \"get\" || prop.kind === \"set\")\n ) {\n node = buildDefineAccessor(info.state, node, prop);\n } else {\n node = t.callExpression(state.addHelper(\"defineProperty\"), [\n node,\n // PrivateName must not be in ObjectExpression\n t.toComputedKey(prop) as t.Expression,\n // the value of ObjectProperty in ObjectExpression must be an expression\n getValue(prop),\n ]);\n }\n }\n if (single) return node;\n body.push(t.expressionStatement(node));\n }\n }\n\n return {\n name: \"transform-computed-properties\",\n\n visitor: {\n ObjectExpression: {\n exit(path, state) {\n const { node, parent, scope } = path;\n let hasComputed = false;\n for (const prop of node.properties) {\n // @ts-expect-error SpreadElement must not have computed property\n hasComputed = prop.computed === true;\n if (hasComputed) break;\n }\n if (!hasComputed) return;\n\n // put all getters/setters into the first object expression as well as all initialisers up\n // to the first computed property\n\n const initProps: t.ObjectMember[] = [];\n const computedProps: t.ObjectMember[] = [];\n let foundComputed = false;\n\n for (const prop of node.properties) {\n if (t.isSpreadElement(prop)) {\n continue;\n }\n if (prop.computed) {\n foundComputed = true;\n }\n\n if (foundComputed) {\n computedProps.push(prop);\n } else {\n initProps.push(prop);\n }\n }\n\n const objId = scope.generateUidIdentifierBasedOnNode(parent);\n const initPropExpression = t.objectExpression(initProps);\n const body = [];\n\n body.push(\n t.variableDeclaration(\"var\", [\n t.variableDeclarator(objId, initPropExpression),\n ]),\n );\n\n const single = pushComputedProps({\n scope,\n objId,\n body,\n computedProps,\n initPropExpression,\n state,\n });\n\n if (single) {\n path.replaceWith(single);\n } else {\n if (setComputedProperties) {\n body.push(t.expressionStatement(t.cloneNode(objId)));\n }\n path.replaceWithMultiple(body);\n }\n },\n },\n },\n };\n});\n","/* eslint-disable @babel/development/plugin-name */\nimport { createRegExpFeaturePlugin } from \"@babel/helper-create-regexp-features-plugin\";\nimport { declare } from \"@babel/helper-plugin-utils\";\n\nexport default declare(api => {\n api.assertVersion(REQUIRED_VERSION(7));\n\n return createRegExpFeaturePlugin({\n name: \"transform-dotall-regex\",\n feature: \"dotAllFlag\",\n });\n});\n","import { declare } from \"@babel/helper-plugin-utils\";\nimport { types as t } from \"@babel/core\";\n\nfunction getName(\n key: t.Identifier | t.StringLiteral | t.NumericLiteral | t.BigIntLiteral,\n) {\n if (t.isIdentifier(key)) {\n return key.name;\n }\n return key.value.toString();\n}\n\nexport default declare(api => {\n api.assertVersion(REQUIRED_VERSION(7));\n\n return {\n name: \"transform-duplicate-keys\",\n\n visitor: {\n ObjectExpression(path) {\n const { node } = path;\n const plainProps = node.properties.filter(\n prop => !t.isSpreadElement(prop) && !prop.computed,\n ) as (t.ObjectMethod | t.ObjectProperty)[];\n\n // A property is a duplicate key if:\n // * the property is a data property, and is preceded by a data,\n // getter, or setter property of the same name.\n // * the property is a getter property, and is preceded by a data or\n // getter property of the same name.\n // * the property is a setter property, and is preceded by a data or\n // setter property of the same name.\n\n const alreadySeenData = Object.create(null);\n const alreadySeenGetters = Object.create(null);\n const alreadySeenSetters = Object.create(null);\n\n for (const prop of plainProps) {\n const name = getName(\n // prop must be non-computed\n prop.key as\n | t.Identifier\n | t.StringLiteral\n | t.NumericLiteral\n | t.BigIntLiteral,\n );\n let isDuplicate = false;\n // @ts-expect-error prop.kind is not defined in ObjectProperty\n switch (prop.kind) {\n case \"get\":\n if (alreadySeenData[name] || alreadySeenGetters[name]) {\n isDuplicate = true;\n }\n alreadySeenGetters[name] = true;\n break;\n case \"set\":\n if (alreadySeenData[name] || alreadySeenSetters[name]) {\n isDuplicate = true;\n }\n alreadySeenSetters[name] = true;\n break;\n default:\n if (\n alreadySeenData[name] ||\n alreadySeenGetters[name] ||\n alreadySeenSetters[name]\n ) {\n isDuplicate = true;\n }\n alreadySeenData[name] = true;\n }\n\n if (isDuplicate) {\n // Rely on the computed properties transform to split the property\n // assignment out of the object literal.\n prop.computed = true;\n prop.key = t.stringLiteral(name);\n }\n }\n },\n },\n };\n});\n","import type { Scope } from \"@babel/traverse\";\nimport {\n assignmentExpression,\n cloneNode,\n isIdentifier,\n isLiteral,\n isMemberExpression,\n isPrivateName,\n isPureish,\n isSuper,\n memberExpression,\n toComputedKey,\n} from \"@babel/types\";\nimport type * as t from \"@babel/types\";\n\nfunction getObjRef(\n node: t.Identifier | t.MemberExpression,\n nodes: Array,\n scope: Scope,\n): t.Identifier | t.Super {\n let ref;\n if (isIdentifier(node)) {\n if (scope.hasBinding(node.name)) {\n // this variable is declared in scope so we can be 100% sure\n // that evaluating it multiple times won't trigger a getter\n // or something else\n return node;\n } else {\n // could possibly trigger a getter so we need to only evaluate\n // it once\n ref = node;\n }\n } else if (isMemberExpression(node)) {\n ref = node.object;\n\n if (isSuper(ref) || (isIdentifier(ref) && scope.hasBinding(ref.name))) {\n // the object reference that we need to save is locally declared\n // so as per the previous comment we can be 100% sure evaluating\n // it multiple times will be safe\n // Super cannot be directly assigned so lets return it also\n return ref;\n }\n } else {\n throw new Error(`We can't explode this node type ${node[\"type\"]}`);\n }\n\n const temp = scope.generateUidIdentifierBasedOnNode(ref);\n scope.push({ id: temp });\n nodes.push(assignmentExpression(\"=\", cloneNode(temp), cloneNode(ref)));\n return temp;\n}\n\nfunction getPropRef(\n node: t.MemberExpression,\n nodes: Array,\n scope: Scope,\n): t.Identifier | t.Literal {\n const prop = node.property;\n if (isPrivateName(prop)) {\n throw new Error(\n \"We can't generate property ref for private name, please install `@babel/plugin-transform-class-properties`\",\n );\n }\n const key = toComputedKey(node, prop);\n if (isLiteral(key) && isPureish(key)) return key;\n\n const temp = scope.generateUidIdentifierBasedOnNode(prop);\n scope.push({ id: temp });\n nodes.push(assignmentExpression(\"=\", cloneNode(temp), cloneNode(prop)));\n return temp;\n}\n\nexport default function explode(\n node: t.Identifier | t.MemberExpression,\n nodes: Array,\n scope: Scope,\n): {\n uid: t.Identifier | t.MemberExpression | t.Super;\n ref: t.Identifier | t.MemberExpression;\n} {\n const obj = getObjRef(node, nodes, scope);\n\n let ref, uid;\n\n if (isIdentifier(node)) {\n ref = cloneNode(node);\n uid = obj;\n } else {\n const prop = getPropRef(node, nodes, scope);\n const computed = node.computed || isLiteral(prop);\n uid = memberExpression(cloneNode(obj), cloneNode(prop), computed);\n ref = memberExpression(cloneNode(obj), cloneNode(prop), computed);\n }\n\n return {\n uid: uid,\n ref: ref,\n };\n}\n","import { assignmentExpression, sequenceExpression } from \"@babel/types\";\nimport type { Visitor } from \"@babel/traverse\";\nimport type * as t from \"@babel/types\";\n\nimport explode from \"./explode-assignable-expression.ts\";\n\nexport default function (opts: {\n build: (\n left: t.Expression | t.PrivateName | t.Super,\n right: t.Expression,\n ) => t.Expression;\n operator: t.BinaryExpression[\"operator\"];\n}) {\n const { build, operator } = opts;\n\n const visitor: Visitor = {\n AssignmentExpression(path) {\n const { node, scope } = path;\n if (node.operator !== operator + \"=\") return;\n\n const nodes: t.AssignmentExpression[] = [];\n // @ts-expect-error Fixme: node.left can be a TSAsExpression\n const exploded = explode(node.left, nodes, scope);\n nodes.push(\n assignmentExpression(\n \"=\",\n exploded.ref,\n build(exploded.uid, node.right),\n ),\n );\n path.replaceWith(sequenceExpression(nodes));\n },\n\n BinaryExpression(path) {\n const { node } = path;\n if (node.operator === operator) {\n path.replaceWith(build(node.left, node.right));\n }\n },\n };\n return visitor;\n}\n","import { declare } from \"@babel/helper-plugin-utils\";\nimport build from \"@babel/helper-builder-binary-assignment-operator-visitor\";\nimport { types as t } from \"@babel/core\";\n\nexport default declare(api => {\n api.assertVersion(REQUIRED_VERSION(7));\n\n return {\n name: \"transform-exponentiation-operator\",\n\n visitor: build({\n operator: \"**\",\n\n build(left, right) {\n return t.callExpression(\n t.memberExpression(t.identifier(\"Math\"), t.identifier(\"pow\")),\n [\n // left can be PrivateName only if operator is `\"in\"`\n left as t.Expression,\n right,\n ],\n );\n },\n }),\n };\n});\n","import { declare } from \"@babel/helper-plugin-utils\";\nimport syntaxFlow from \"@babel/plugin-syntax-flow\";\nimport { types as t, type NodePath } from \"@babel/core\";\nimport generateCode from \"@babel/generator\";\n\nexport default declare(api => {\n api.assertVersion(REQUIRED_VERSION(7));\n\n function commentFromString(comment: string | t.Comment): t.Comment {\n return typeof comment === \"string\"\n ? { type: \"CommentBlock\", value: comment }\n : comment;\n }\n\n function attachComment({\n ofPath,\n toPath,\n where = \"trailing\",\n optional = false,\n comments = generateComment(ofPath, optional),\n keepType = false,\n }: {\n ofPath?: NodePath;\n toPath?: NodePath;\n where?: t.CommentTypeShorthand;\n optional?: boolean;\n comments?: string | t.Comment | (string | t.Comment)[];\n keepType?: boolean;\n }) {\n if (!toPath?.node) {\n toPath = ofPath.getPrevSibling();\n where = \"trailing\";\n }\n if (!toPath.node) {\n toPath = ofPath.getNextSibling();\n where = \"leading\";\n }\n if (!toPath.node) {\n toPath = ofPath.parentPath;\n where = \"inner\";\n }\n if (!Array.isArray(comments)) {\n comments = [comments];\n }\n const newComments = comments.map(commentFromString);\n if (!keepType && ofPath?.node) {\n // Removes the node at `ofPath` while conserving the comments attached\n // to it.\n const node = ofPath.node;\n const parent = ofPath.parentPath;\n const prev = ofPath.getPrevSibling();\n const next = ofPath.getNextSibling();\n const isSingleChild = !(prev.node || next.node);\n const leading = node.leadingComments;\n const trailing = node.trailingComments;\n\n if (isSingleChild && leading) {\n parent.addComments(\"inner\", leading);\n }\n toPath.addComments(where, newComments);\n ofPath.remove();\n if (isSingleChild && trailing) {\n parent.addComments(\"inner\", trailing);\n }\n } else {\n toPath.addComments(where, newComments);\n }\n }\n\n function wrapInFlowComment<\n N extends\n | t.ClassProperty\n | t.ExportNamedDeclaration\n | t.Flow\n | t.ImportDeclaration\n | t.ExportDeclaration\n | t.ImportSpecifier\n | t.ImportDeclaration,\n >(path: NodePath) {\n attachComment({\n ofPath: path,\n // @ts-expect-error optional may not exist in path.parent\n comments: generateComment(path, path.parent.optional),\n });\n }\n\n function generateComment(path: NodePath, optional?: boolean | void) {\n let comment = path\n .getSource()\n .replace(/\\*-\\//g, \"*-ESCAPED/\")\n .replace(/\\*\\//g, \"*-/\");\n if (optional) comment = \"?\" + comment;\n if (comment[0] !== \":\") comment = \":: \" + comment;\n return comment;\n }\n\n function isTypeImport(importKind: \"type\" | \"typeof\" | \"value\") {\n return importKind === \"type\" || importKind === \"typeof\";\n }\n\n return {\n name: \"transform-flow-comments\",\n inherits: syntaxFlow,\n\n visitor: {\n TypeCastExpression(path) {\n const { node } = path;\n attachComment({\n ofPath: path.get(\"typeAnnotation\"),\n toPath: path.get(\"expression\"),\n keepType: true,\n });\n path.replaceWith(t.parenthesizedExpression(node.expression));\n },\n\n // support function a(b?) {}\n Identifier(path) {\n if (path.parentPath.isFlow()) return;\n const { node } = path;\n if (node.typeAnnotation) {\n attachComment({\n ofPath: path.get(\"typeAnnotation\"),\n toPath: path,\n optional:\n node.optional ||\n // @ts-expect-error Fixme: optional is not in t.TypeAnnotation,\n // maybe we can remove it\n node.typeAnnotation.optional,\n });\n if (node.optional) {\n node.optional = false;\n }\n } else if (node.optional) {\n attachComment({\n toPath: path,\n comments: \":: ?\",\n });\n node.optional = false;\n }\n },\n\n AssignmentPattern: {\n exit({ node }) {\n const { left } = node;\n // @ts-expect-error optional is not in TSAsExpression\n if (left.optional) {\n // @ts-expect-error optional is not in TSAsExpression\n left.optional = false;\n }\n },\n },\n\n // strip optional property from function params - facebook/fbjs#17\n Function(path) {\n if (path.isDeclareFunction()) return;\n const { node } = path;\n if (node.typeParameters) {\n attachComment({\n ofPath: path.get(\"typeParameters\"),\n toPath: path.get(\"id\"),\n // @ts-expect-error Fixme: optional is not in t.TypeParameterDeclaration\n optional: node.typeParameters.optional,\n });\n }\n if (node.returnType) {\n attachComment({\n ofPath: path.get(\"returnType\"),\n toPath: path.get(\"body\"),\n where: \"leading\",\n // @ts-expect-error Fixme: optional is not in t.TypeAnnotation\n optional: node.returnType.typeAnnotation.optional,\n });\n }\n },\n\n // support for `class X { foo: string }` - #4622\n ClassProperty(path) {\n const { node } = path;\n if (!node.value) {\n wrapInFlowComment(path);\n } else if (node.typeAnnotation) {\n attachComment({\n ofPath: path.get(\"typeAnnotation\"),\n toPath: path.get(\"key\"),\n // @ts-expect-error Fixme: optional is not in t.TypeAnnotation\n optional: node.typeAnnotation.optional,\n });\n }\n },\n\n // support `export type a = {}` - #8 Error: You passed path.replaceWith() a falsy node\n ExportNamedDeclaration(path) {\n const { node } = path;\n if (node.exportKind !== \"type\" && !t.isFlow(node.declaration)) {\n return;\n }\n wrapInFlowComment(path);\n },\n\n // support `import type A` and `import typeof A` #10\n ImportDeclaration(path) {\n const { node } = path;\n if (isTypeImport(node.importKind)) {\n wrapInFlowComment(path);\n return;\n }\n\n const typeSpecifiers = node.specifiers.filter(\n specifier =>\n specifier.type === \"ImportSpecifier\" &&\n isTypeImport(specifier.importKind),\n );\n\n const nonTypeSpecifiers = node.specifiers.filter(\n specifier =>\n specifier.type !== \"ImportSpecifier\" ||\n !isTypeImport(specifier.importKind),\n );\n node.specifiers = nonTypeSpecifiers;\n\n if (typeSpecifiers.length > 0) {\n const typeImportNode = t.cloneNode(node);\n typeImportNode.specifiers = typeSpecifiers;\n const comment = `:: ${generateCode(typeImportNode).code}`;\n\n if (nonTypeSpecifiers.length > 0) {\n attachComment({ toPath: path, comments: comment });\n } else {\n attachComment({ ofPath: path, comments: comment });\n }\n }\n },\n ObjectPattern(path) {\n const { node } = path;\n if (node.typeAnnotation) {\n attachComment({\n ofPath: path.get(\"typeAnnotation\"),\n toPath: path,\n optional:\n node.optional ||\n // @ts-expect-error Fixme: optional is not in t.TypeAnnotation\n node.typeAnnotation.optional,\n });\n }\n },\n\n Flow(\n path: NodePath<\n t.Flow | t.ImportDeclaration | t.ExportDeclaration | t.ImportSpecifier\n >,\n ) {\n wrapInFlowComment(path);\n },\n\n Class(path) {\n const { node } = path;\n let comments: [string?, ...(string | t.Comment)[]] = [];\n if (node.typeParameters) {\n const typeParameters = path.get(\"typeParameters\");\n comments.push(\n // @ts-expect-error optional is not in TypeParameterDeclaration\n generateComment(typeParameters, node.typeParameters.optional),\n );\n const trailingComments = node.typeParameters.trailingComments;\n if (trailingComments) {\n comments.push(...trailingComments);\n }\n typeParameters.remove();\n }\n\n if (node.superClass) {\n if (comments.length > 0) {\n attachComment({\n toPath: path.get(\"id\"),\n comments: comments,\n });\n comments = [];\n }\n\n if (node.superTypeParameters) {\n const superTypeParameters = path.get(\n \"superTypeParameters\",\n ) as NodePath;\n comments.push(\n generateComment(\n superTypeParameters,\n // @ts-expect-error optional is not in TypeParameterInstantiation\n superTypeParameters.node.optional,\n ),\n );\n superTypeParameters.remove();\n }\n }\n\n if (node.implements) {\n const impls = path.get(\"implements\");\n const comment =\n \"implements \" +\n impls\n .map(impl => generateComment(impl).replace(/^:: /, \"\"))\n .join(\", \");\n delete node[\"implements\"];\n\n if (comments.length === 1) {\n comments[0] += ` ${comment}`;\n } else {\n comments.push(`:: ${comment}`);\n }\n }\n\n if (comments.length > 0) {\n attachComment({\n toPath: path.get(\"body\"),\n where: \"leading\",\n comments: comments,\n });\n }\n },\n },\n };\n});\n","import { declare } from \"@babel/helper-plugin-utils\";\nimport syntaxFlow from \"@babel/plugin-syntax-flow\";\nimport { types as t, type NodePath } from \"@babel/core\";\n\nexport interface Options {\n requireDirective?: boolean;\n allowDeclareFields?: boolean;\n}\n\nexport default declare((api, opts: Options) => {\n api.assertVersion(REQUIRED_VERSION(7));\n\n const FLOW_DIRECTIVE = /@flow(?:\\s+(?:strict(?:-local)?|weak))?|@noflow/;\n\n let skipStrip = false;\n\n const { requireDirective = false } = opts;\n\n if (!process.env.BABEL_8_BREAKING) {\n // eslint-disable-next-line no-var\n var { allowDeclareFields = false } = opts;\n }\n\n return {\n name: \"transform-flow-strip-types\",\n inherits: syntaxFlow,\n\n visitor: {\n Program(\n path,\n {\n file: {\n ast: { comments },\n },\n },\n ) {\n skipStrip = false;\n let directiveFound = false;\n\n if (comments) {\n for (const comment of comments) {\n if (FLOW_DIRECTIVE.test(comment.value)) {\n directiveFound = true;\n\n // remove flow directive\n comment.value = comment.value.replace(FLOW_DIRECTIVE, \"\");\n\n // remove the comment completely if it only consists of whitespace and/or stars\n if (!comment.value.replace(/\\*/g, \"\").trim()) {\n comment.ignore = true;\n }\n }\n }\n }\n\n if (!directiveFound && requireDirective) {\n skipStrip = true;\n }\n },\n ImportDeclaration(path) {\n if (skipStrip) return;\n if (!path.node.specifiers.length) return;\n\n let typeCount = 0;\n\n // @ts-expect-error importKind is only in importSpecifier\n path.node.specifiers.forEach(({ importKind }) => {\n if (importKind === \"type\" || importKind === \"typeof\") {\n typeCount++;\n }\n });\n\n if (typeCount === path.node.specifiers.length) {\n path.remove();\n }\n },\n\n Flow(\n path: NodePath<\n t.Flow | t.ImportDeclaration | t.ExportDeclaration | t.ImportSpecifier\n >,\n ) {\n if (skipStrip) {\n throw path.buildCodeFrameError(\n \"A @flow directive is required when using Flow annotations with \" +\n \"the `requireDirective` option.\",\n );\n }\n\n path.remove();\n },\n\n ClassPrivateProperty(path) {\n if (skipStrip) return;\n path.node.typeAnnotation = null;\n },\n\n Class(path) {\n if (skipStrip) return;\n path.node.implements = null;\n\n // We do this here instead of in a `ClassProperty` visitor because the class transform\n // would transform the class before we reached the class property.\n path.get(\"body.body\").forEach(child => {\n if (child.isClassProperty()) {\n const { node } = child;\n\n if (!process.env.BABEL_8_BREAKING) {\n if (!allowDeclareFields && node.declare) {\n throw child.buildCodeFrameError(\n `The 'declare' modifier is only allowed when the ` +\n `'allowDeclareFields' option of ` +\n `@babel/plugin-transform-flow-strip-types or ` +\n `@babel/preset-flow is enabled.`,\n );\n }\n }\n\n if (node.declare) {\n child.remove();\n } else {\n if (!process.env.BABEL_8_BREAKING) {\n if (!allowDeclareFields && !node.value && !node.decorators) {\n child.remove();\n return;\n }\n }\n\n node.variance = null;\n node.typeAnnotation = null;\n }\n }\n });\n },\n\n AssignmentPattern({ node }) {\n if (skipStrip) return;\n // @ts-expect-error optional is not in TSAsExpression\n if (node.left.optional) {\n // @ts-expect-error optional is not in TSAsExpression\n node.left.optional = false;\n }\n },\n\n Function({ node }) {\n if (skipStrip) return;\n if (\n node.params.length > 0 &&\n node.params[0].type === \"Identifier\" &&\n node.params[0].name === \"this\"\n ) {\n node.params.shift();\n }\n for (let i = 0; i < node.params.length; i++) {\n let param = node.params[i];\n if (param.type === \"AssignmentPattern\") {\n // @ts-expect-error: refine AST types, the left of an assignment pattern as a binding\n // must not be a MemberExpression\n param = param.left;\n }\n // @ts-expect-error optional is not in TSAsExpression\n if (param.optional) {\n // @ts-expect-error optional is not in TSAsExpression\n param.optional = false;\n }\n }\n\n if (!t.isMethod(node)) {\n node.predicate = null;\n }\n },\n\n TypeCastExpression(path) {\n if (skipStrip) return;\n let { node } = path;\n do {\n // @ts-expect-error node is a search pointer\n node = node.expression;\n } while (t.isTypeCastExpression(node));\n path.replaceWith(node);\n },\n\n CallExpression({ node }) {\n if (skipStrip) return;\n node.typeArguments = null;\n },\n\n OptionalCallExpression({ node }) {\n if (skipStrip) return;\n node.typeArguments = null;\n },\n\n NewExpression({ node }) {\n if (skipStrip) return;\n node.typeArguments = null;\n },\n },\n };\n});\n","import { template, types as t } from \"@babel/core\";\nimport type { PluginPass, NodePath } from \"@babel/core\";\n\n// This is the legacy implementation, which inlines all the code.\n// It must be kept for compatibility reasons.\n// TODO(Babel 8): Remove this file.\n\nexport default function transformWithoutHelper(\n loose: boolean | void,\n path: NodePath,\n state: PluginPass,\n) {\n const pushComputedProps = loose\n ? pushComputedPropsLoose\n : pushComputedPropsSpec;\n\n const { node } = path;\n const build = pushComputedProps(path, state);\n const declar = build.declar;\n const loop = build.loop;\n const block = loop.body as t.BlockStatement;\n\n // ensure that it's a block so we can take all its statements\n path.ensureBlock();\n\n // add the value declaration to the new loop body\n if (declar) {\n block.body.push(declar);\n }\n\n // push the rest of the original loop body onto our new body\n block.body.push(...(node.body as t.BlockStatement).body);\n\n t.inherits(loop, node);\n t.inherits(loop.body, node.body);\n\n if (build.replaceParent) {\n path.parentPath.replaceWithMultiple(build.node);\n path.remove();\n } else {\n path.replaceWithMultiple(build.node);\n }\n}\n\nconst buildForOfLoose = template.statement(`\n for (var LOOP_OBJECT = OBJECT,\n IS_ARRAY = Array.isArray(LOOP_OBJECT),\n INDEX = 0,\n LOOP_OBJECT = IS_ARRAY ? LOOP_OBJECT : LOOP_OBJECT[Symbol.iterator]();;) {\n INTERMEDIATE;\n if (IS_ARRAY) {\n if (INDEX >= LOOP_OBJECT.length) break;\n ID = LOOP_OBJECT[INDEX++];\n } else {\n INDEX = LOOP_OBJECT.next();\n if (INDEX.done) break;\n ID = INDEX.value;\n }\n }\n`);\n\nconst buildForOf = template.statements(`\n var ITERATOR_COMPLETION = true;\n var ITERATOR_HAD_ERROR_KEY = false;\n var ITERATOR_ERROR_KEY = undefined;\n try {\n for (\n var ITERATOR_KEY = OBJECT[Symbol.iterator](), STEP_KEY;\n !(ITERATOR_COMPLETION = (STEP_KEY = ITERATOR_KEY.next()).done);\n ITERATOR_COMPLETION = true\n ) {}\n } catch (err) {\n ITERATOR_HAD_ERROR_KEY = true;\n ITERATOR_ERROR_KEY = err;\n } finally {\n try {\n if (!ITERATOR_COMPLETION && ITERATOR_KEY.return != null) {\n ITERATOR_KEY.return();\n }\n } finally {\n if (ITERATOR_HAD_ERROR_KEY) {\n throw ITERATOR_ERROR_KEY;\n }\n }\n }\n`);\n\nfunction pushComputedPropsLoose(\n path: NodePath,\n state: PluginPass,\n) {\n const { node, scope, parent } = path;\n const { left } = node;\n let declar, id, intermediate;\n\n if (t.isIdentifier(left) || t.isPattern(left) || t.isMemberExpression(left)) {\n // for (i of test), for ({ i } of test)\n id = left;\n intermediate = null;\n } else if (t.isVariableDeclaration(left)) {\n // for (let i of test)\n id = scope.generateUidIdentifier(\"ref\");\n declar = t.variableDeclaration(left.kind, [\n t.variableDeclarator(left.declarations[0].id, t.identifier(id.name)),\n ]);\n intermediate = t.variableDeclaration(\"var\", [\n t.variableDeclarator(t.identifier(id.name)),\n ]);\n } else {\n throw state.buildCodeFrameError(\n left,\n `Unknown node type ${left.type} in ForStatement`,\n );\n }\n\n const iteratorKey = scope.generateUidIdentifier(\"iterator\");\n const isArrayKey = scope.generateUidIdentifier(\"isArray\");\n\n const loop = buildForOfLoose({\n LOOP_OBJECT: iteratorKey,\n IS_ARRAY: isArrayKey,\n OBJECT: node.right,\n INDEX: scope.generateUidIdentifier(\"i\"),\n ID: id,\n INTERMEDIATE: intermediate,\n }) as t.ForStatement;\n\n //\n const isLabeledParent = t.isLabeledStatement(parent);\n let labeled;\n\n if (isLabeledParent) {\n labeled = t.labeledStatement(parent.label, loop);\n }\n\n return {\n replaceParent: isLabeledParent,\n declar: declar,\n node: labeled || loop,\n loop: loop,\n };\n}\n\nfunction pushComputedPropsSpec(\n path: NodePath,\n state: PluginPass,\n) {\n const { node, scope, parent } = path;\n const left = node.left;\n let declar;\n\n const stepKey = scope.generateUid(\"step\");\n const stepValue = t.memberExpression(\n t.identifier(stepKey),\n t.identifier(\"value\"),\n );\n\n if (t.isIdentifier(left) || t.isPattern(left) || t.isMemberExpression(left)) {\n // for (i of test), for ({ i } of test)\n declar = t.expressionStatement(\n t.assignmentExpression(\"=\", left, stepValue),\n );\n } else if (t.isVariableDeclaration(left)) {\n // for (let i of test)\n declar = t.variableDeclaration(left.kind, [\n t.variableDeclarator(left.declarations[0].id, stepValue),\n ]);\n } else {\n throw state.buildCodeFrameError(\n left,\n `Unknown node type ${left.type} in ForStatement`,\n );\n }\n\n const template = buildForOf({\n ITERATOR_HAD_ERROR_KEY: scope.generateUidIdentifier(\"didIteratorError\"),\n ITERATOR_COMPLETION: scope.generateUidIdentifier(\n \"iteratorNormalCompletion\",\n ),\n ITERATOR_ERROR_KEY: scope.generateUidIdentifier(\"iteratorError\"),\n ITERATOR_KEY: scope.generateUidIdentifier(\"iterator\"),\n STEP_KEY: t.identifier(stepKey),\n OBJECT: node.right,\n });\n\n const isLabeledParent = t.isLabeledStatement(parent);\n\n const tryBody = (template[3] as t.TryStatement).block.body;\n const loop = tryBody[0] as t.ForStatement;\n\n if (isLabeledParent) {\n tryBody[0] = t.labeledStatement(parent.label, loop);\n }\n\n //\n\n return {\n replaceParent: isLabeledParent,\n declar: declar,\n loop: loop,\n node: template,\n };\n}\n","import { declare } from \"@babel/helper-plugin-utils\";\nimport { template, types as t, type NodePath } from \"@babel/core\";\n\nimport transformWithoutHelper from \"./no-helper-implementation.ts\";\nimport { skipTransparentExprWrapperNodes } from \"@babel/helper-skip-transparent-expression-wrappers\";\n\nexport interface Options {\n allowArrayLike?: boolean;\n assumeArray?: boolean;\n loose?: boolean;\n}\n\nfunction buildLoopBody(\n path: NodePath,\n declar: t.Statement,\n newBody?: t.Statement | t.Expression,\n) {\n let block;\n const bodyPath = path.get(\"body\");\n const body = newBody ?? bodyPath.node;\n if (\n t.isBlockStatement(body) &&\n Object.keys(path.getBindingIdentifiers()).some(id =>\n bodyPath.scope.hasOwnBinding(id),\n )\n ) {\n block = t.blockStatement([declar, body]);\n } else {\n block = t.toBlock(body);\n block.body.unshift(declar);\n }\n return block;\n}\n\nexport default declare((api, options: Options) => {\n api.assertVersion(REQUIRED_VERSION(7));\n\n {\n const { assumeArray, allowArrayLike, loose } = options;\n\n if (loose === true && assumeArray === true) {\n throw new Error(\n `The loose and assumeArray options cannot be used together in @babel/plugin-transform-for-of`,\n );\n }\n\n if (assumeArray === true && allowArrayLike === true) {\n throw new Error(\n `The assumeArray and allowArrayLike options cannot be used together in @babel/plugin-transform-for-of`,\n );\n }\n\n if (!process.env.BABEL_8_BREAKING) {\n // TODO: Remove in Babel 8\n if (allowArrayLike && /^7\\.\\d\\./.test(api.version)) {\n throw new Error(\n `The allowArrayLike is only supported when using @babel/core@^7.10.0`,\n );\n }\n }\n }\n\n const iterableIsArray =\n options.assumeArray ??\n // Loose mode is not compatible with 'assumeArray', so we shouldn't read\n // 'iterableIsArray' if 'loose' is true.\n (!options.loose && api.assumption(\"iterableIsArray\"));\n\n const arrayLikeIsIterable =\n options.allowArrayLike ?? api.assumption(\"arrayLikeIsIterable\");\n\n const skipIteratorClosing =\n api.assumption(\"skipForOfIteratorClosing\") ?? options.loose;\n\n if (iterableIsArray && arrayLikeIsIterable) {\n throw new Error(\n `The \"iterableIsArray\" and \"arrayLikeIsIterable\" assumptions are not compatible.`,\n );\n }\n\n if (iterableIsArray) {\n return {\n name: \"transform-for-of\",\n\n visitor: {\n ForOfStatement(path) {\n const { scope } = path;\n const { left, await: isAwait } = path.node;\n if (isAwait) {\n return;\n }\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion\n const right = skipTransparentExprWrapperNodes(\n path.node.right,\n ) as t.Expression;\n const i = scope.generateUidIdentifier(\"i\");\n let array: t.Identifier | t.ThisExpression =\n scope.maybeGenerateMemoised(right, true);\n if (\n !array &&\n t.isIdentifier(right) &&\n path.get(\"body\").scope.hasOwnBinding(right.name)\n ) {\n array = scope.generateUidIdentifier(\"arr\");\n }\n\n const inits = [t.variableDeclarator(i, t.numericLiteral(0))];\n if (array) {\n inits.push(t.variableDeclarator(array, right));\n } else {\n array = right as t.Identifier | t.ThisExpression;\n }\n\n const item = t.memberExpression(\n t.cloneNode(array),\n t.cloneNode(i),\n true,\n );\n let assignment;\n if (t.isVariableDeclaration(left)) {\n assignment = left;\n assignment.declarations[0].init = item;\n } else {\n assignment = t.expressionStatement(\n t.assignmentExpression(\"=\", left, item),\n );\n }\n\n path.replaceWith(\n t.forStatement(\n t.variableDeclaration(\"let\", inits),\n t.binaryExpression(\n \"<\",\n t.cloneNode(i),\n t.memberExpression(t.cloneNode(array), t.identifier(\"length\")),\n ),\n t.updateExpression(\"++\", t.cloneNode(i)),\n buildLoopBody(path, assignment),\n ),\n );\n },\n },\n };\n }\n\n const buildForOfArray = template`\n for (var KEY = 0, NAME = ARR; KEY < NAME.length; KEY++) BODY;\n `;\n\n const buildForOfNoIteratorClosing = template.statements`\n for (var ITERATOR_HELPER = CREATE_ITERATOR_HELPER(OBJECT, ARRAY_LIKE_IS_ITERABLE), STEP_KEY;\n !(STEP_KEY = ITERATOR_HELPER()).done;) BODY;\n `;\n\n const buildForOf = template.statements`\n var ITERATOR_HELPER = CREATE_ITERATOR_HELPER(OBJECT, ARRAY_LIKE_IS_ITERABLE), STEP_KEY;\n try {\n for (ITERATOR_HELPER.s(); !(STEP_KEY = ITERATOR_HELPER.n()).done;) BODY;\n } catch (err) {\n ITERATOR_HELPER.e(err);\n } finally {\n ITERATOR_HELPER.f();\n }\n `;\n\n const builder = skipIteratorClosing\n ? {\n build: buildForOfNoIteratorClosing,\n helper: \"createForOfIteratorHelperLoose\",\n getContainer: (nodes: t.Statement[]): [t.ForStatement] =>\n nodes as [t.ForStatement],\n }\n : {\n build: buildForOf,\n helper: \"createForOfIteratorHelper\",\n getContainer: (nodes: t.Statement[]): [t.ForStatement] =>\n (nodes[1] as t.TryStatement).block.body as [t.ForStatement],\n };\n\n function _ForOfStatementArray(path: NodePath) {\n const { node, scope } = path;\n\n const right = scope.generateUidIdentifierBasedOnNode(node.right, \"arr\");\n const iterationKey = scope.generateUidIdentifier(\"i\");\n\n const loop = buildForOfArray({\n BODY: node.body,\n KEY: iterationKey,\n NAME: right,\n ARR: node.right,\n }) as t.For;\n\n t.inherits(loop, node);\n\n const iterationValue = t.memberExpression(\n t.cloneNode(right),\n t.cloneNode(iterationKey),\n true,\n );\n\n let declar;\n const left = node.left;\n if (t.isVariableDeclaration(left)) {\n left.declarations[0].init = iterationValue;\n declar = left;\n } else {\n declar = t.expressionStatement(\n t.assignmentExpression(\"=\", left, iterationValue),\n );\n }\n\n loop.body = buildLoopBody(path, declar, loop.body);\n\n return loop;\n }\n\n return {\n name: \"transform-for-of\",\n visitor: {\n ForOfStatement(path, state) {\n const right = path.get(\"right\");\n if (\n right.isArrayExpression() ||\n (process.env.BABEL_8_BREAKING\n ? right.isGenericType(\"Array\")\n : right.isGenericType(\"Array\") ||\n t.isArrayTypeAnnotation(right.getTypeAnnotation()))\n ) {\n path.replaceWith(_ForOfStatementArray(path));\n return;\n }\n\n if (!process.env.BABEL_8_BREAKING) {\n if (!state.availableHelper(builder.helper)) {\n // Babel <7.9.0 doesn't support this helper\n transformWithoutHelper(skipIteratorClosing, path, state);\n return;\n }\n }\n\n const { node, parent, scope } = path;\n const left = node.left;\n let declar;\n\n const stepKey = scope.generateUid(\"step\");\n const stepValue = t.memberExpression(\n t.identifier(stepKey),\n t.identifier(\"value\"),\n );\n\n if (t.isVariableDeclaration(left)) {\n // for (let i of test)\n declar = t.variableDeclaration(left.kind, [\n t.variableDeclarator(left.declarations[0].id, stepValue),\n ]);\n } else {\n // for (i of test), for ({ i } of test)\n declar = t.expressionStatement(\n t.assignmentExpression(\"=\", left, stepValue),\n );\n }\n\n const nodes = builder.build({\n CREATE_ITERATOR_HELPER: state.addHelper(builder.helper),\n ITERATOR_HELPER: scope.generateUidIdentifier(\"iterator\"),\n ARRAY_LIKE_IS_ITERABLE: arrayLikeIsIterable\n ? t.booleanLiteral(true)\n : null,\n STEP_KEY: t.identifier(stepKey),\n OBJECT: node.right,\n BODY: buildLoopBody(path, declar),\n });\n const container = builder.getContainer(nodes);\n\n t.inherits(container[0], node);\n t.inherits(container[0].body, node.body);\n\n if (t.isLabeledStatement(parent)) {\n // @ts-expect-error replacing node types\n container[0] = t.labeledStatement(parent.label, container[0]);\n\n path.parentPath.replaceWithMultiple(nodes);\n\n // The parent has been replaced, prevent Babel from traversing a detached path\n path.skip();\n } else {\n path.replaceWithMultiple(nodes);\n }\n },\n },\n };\n});\n","import { isRequired } from \"@babel/helper-compilation-targets\";\nimport { declare } from \"@babel/helper-plugin-utils\";\n\nexport default declare(api => {\n api.assertVersion(REQUIRED_VERSION(7));\n const supportUnicodeId = !isRequired(\n \"transform-unicode-escapes\",\n api.targets(),\n );\n\n return {\n name: \"transform-function-name\",\n\n visitor: {\n FunctionExpression: {\n exit(path) {\n if (path.key !== \"value\" && !path.parentPath.isObjectProperty()) {\n if (!process.env.BABEL_8_BREAKING && !USE_ESM && !IS_STANDALONE) {\n // polyfill when being run by an older Babel version\n path.ensureFunctionName ??=\n // eslint-disable-next-line no-restricted-globals\n require(\"@babel/traverse\").NodePath.prototype.ensureFunctionName;\n }\n path.ensureFunctionName(supportUnicodeId);\n }\n },\n },\n\n ObjectProperty(path) {\n const value = path.get(\"value\");\n if (value.isFunction()) {\n if (!process.env.BABEL_8_BREAKING && !USE_ESM && !IS_STANDALONE) {\n // polyfill when being run by an older Babel version\n value.ensureFunctionName ??=\n // eslint-disable-next-line no-restricted-globals\n require(\"@babel/traverse\").NodePath.prototype.ensureFunctionName;\n }\n // @ts-expect-error Fixme: should check ArrowFunctionExpression\n value.ensureFunctionName(supportUnicodeId);\n }\n },\n },\n };\n});\n","import { declare } from \"@babel/helper-plugin-utils\";\nimport { types as t } from \"@babel/core\";\n\nexport default declare(api => {\n api.assertVersion(REQUIRED_VERSION(7));\n\n return {\n name: \"transform-instanceof\",\n\n visitor: {\n BinaryExpression(path) {\n const { node } = path;\n if (node.operator === \"instanceof\") {\n const helper = this.addHelper(\"instanceof\");\n const isUnderHelper = path.findParent(path => {\n return (\n (path.isVariableDeclarator() && path.node.id === helper) ||\n (path.isFunctionDeclaration() &&\n path.node.id &&\n path.node.id.name === helper.name)\n );\n });\n\n if (isUnderHelper) {\n return;\n } else {\n path.replaceWith(\n t.callExpression(helper, [\n // @ts-expect-error node.left can be PrivateName only when node.operator is \"in\"\n node.left,\n node.right,\n ]),\n );\n }\n }\n },\n },\n };\n});\n","import { declare } from \"@babel/helper-plugin-utils\";\nimport { types as t } from \"@babel/core\";\n\nexport default declare(api => {\n api.assertVersion(REQUIRED_VERSION(7));\n\n return {\n name: \"transform-jscript\",\n\n visitor: {\n FunctionExpression: {\n exit(path) {\n const { node } = path;\n if (!node.id) return;\n\n path.replaceWith(\n t.callExpression(\n t.functionExpression(\n null,\n [],\n t.blockStatement([\n // @ts-expect-error t.toStatement must return a FunctionDeclaration if node.id is defined\n t.toStatement(node),\n t.returnStatement(t.cloneNode(node.id)),\n ]),\n ),\n [],\n ),\n );\n },\n },\n },\n };\n});\n","import { declare } from \"@babel/helper-plugin-utils\";\n\nexport default declare(api => {\n api.assertVersion(REQUIRED_VERSION(7));\n\n return {\n name: \"transform-literals\",\n\n visitor: {\n NumericLiteral({ node }) {\n // number octal like 0b10 or 0o70\n // @ts-expect-error Add node.extra typings\n if (node.extra && /^0[ob]/i.test(node.extra.raw)) {\n node.extra = undefined;\n }\n },\n\n StringLiteral({ node }) {\n // unicode escape\n // @ts-expect-error Add node.extra typings\n if (node.extra && /\\\\u/i.test(node.extra.raw)) {\n node.extra = undefined;\n }\n },\n },\n };\n});\n","import { declare } from \"@babel/helper-plugin-utils\";\nimport { types as t } from \"@babel/core\";\n\nexport default declare(api => {\n api.assertVersion(REQUIRED_VERSION(7));\n\n return {\n name: \"transform-member-expression-literals\",\n\n visitor: {\n MemberExpression: {\n exit({ node }) {\n const prop = node.property;\n if (\n !node.computed &&\n t.isIdentifier(prop) &&\n !t.isValidES3Identifier(prop.name)\n ) {\n // foo.default -> foo[\"default\"]\n node.property = t.stringLiteral(prop.name);\n node.computed = true;\n }\n },\n },\n },\n };\n});\n","import { declare } from \"@babel/helper-plugin-utils\";\nimport {\n buildDynamicImport,\n isModule,\n rewriteModuleStatementsAndPrepareHeader,\n type RewriteModuleStatementsAndPrepareHeaderOptions,\n hasExports,\n isSideEffectImport,\n buildNamespaceInitStatements,\n ensureStatementsHoisted,\n wrapInterop,\n getModuleName,\n} from \"@babel/helper-module-transforms\";\nimport { template, types as t } from \"@babel/core\";\nimport type { PluginOptions } from \"@babel/helper-module-transforms\";\nimport type { NodePath, PluginPass } from \"@babel/core\";\n\nconst buildWrapper = template.statement(`\n define(MODULE_NAME, AMD_ARGUMENTS, function(IMPORT_NAMES) {\n })\n`);\n\nconst buildAnonymousWrapper = template.statement(`\n define([\"require\"], function(REQUIRE) {\n })\n`);\n\nfunction injectWrapper(\n path: NodePath,\n wrapper: t.ExpressionStatement,\n) {\n const { body, directives } = path.node;\n path.node.directives = [];\n path.node.body = [];\n const amdFactoryCall = path\n .pushContainer(\"body\", wrapper)[0]\n .get(\"expression\") as NodePath;\n const amdFactoryCallArgs = amdFactoryCall.get(\"arguments\");\n const amdFactory = (\n amdFactoryCallArgs[\n amdFactoryCallArgs.length - 1\n ] as NodePath\n ).get(\"body\");\n amdFactory.pushContainer(\"directives\", directives);\n amdFactory.pushContainer(\"body\", body);\n}\n\nexport interface Options extends PluginOptions {\n allowTopLevelThis?: boolean;\n importInterop?: RewriteModuleStatementsAndPrepareHeaderOptions[\"importInterop\"];\n loose?: boolean;\n noInterop?: boolean;\n strict?: boolean;\n strictMode?: boolean;\n}\n\ntype State = {\n requireId?: t.Identifier;\n resolveId?: t.Identifier;\n rejectId?: t.Identifier;\n};\n\nexport default declare((api, options: Options) => {\n api.assertVersion(REQUIRED_VERSION(7));\n\n const { allowTopLevelThis, strict, strictMode, importInterop, noInterop } =\n options;\n\n const constantReexports =\n api.assumption(\"constantReexports\") ?? options.loose;\n const enumerableModuleMeta =\n api.assumption(\"enumerableModuleMeta\") ?? options.loose;\n\n return {\n name: \"transform-modules-amd\",\n\n pre() {\n this.file.set(\"@babel/plugin-transform-modules-*\", \"amd\");\n },\n\n visitor: {\n [\"CallExpression\" +\n (api.types.importExpression ? \"|ImportExpression\" : \"\")](\n this: State & PluginPass,\n path: NodePath,\n state: State,\n ) {\n if (!this.file.has(\"@babel/plugin-proposal-dynamic-import\")) return;\n if (path.isCallExpression() && !path.get(\"callee\").isImport()) return;\n\n let { requireId, resolveId, rejectId } = state;\n if (!requireId) {\n requireId = path.scope.generateUidIdentifier(\"require\");\n state.requireId = requireId;\n }\n if (!resolveId || !rejectId) {\n resolveId = path.scope.generateUidIdentifier(\"resolve\");\n rejectId = path.scope.generateUidIdentifier(\"reject\");\n state.resolveId = resolveId;\n state.rejectId = rejectId;\n }\n\n let result: t.Node = t.identifier(\"imported\");\n if (!noInterop) {\n result = wrapInterop(this.file.path, result, \"namespace\");\n }\n\n path.replaceWith(\n buildDynamicImport(\n path.node,\n false,\n false,\n specifier => template.expression.ast`\n new Promise((${resolveId}, ${rejectId}) =>\n ${requireId}(\n [${specifier}],\n imported => ${t.cloneNode(resolveId)}(${result}),\n ${t.cloneNode(rejectId)}\n )\n )\n `,\n ),\n );\n },\n Program: {\n exit(path, { requireId }) {\n if (!isModule(path)) {\n if (requireId) {\n injectWrapper(\n path,\n buildAnonymousWrapper({\n REQUIRE: t.cloneNode(requireId),\n }) as t.ExpressionStatement,\n );\n }\n return;\n }\n\n const amdArgs = [];\n const importNames = [];\n if (requireId) {\n amdArgs.push(t.stringLiteral(\"require\"));\n importNames.push(t.cloneNode(requireId));\n }\n\n let moduleName = getModuleName(this.file.opts, options);\n // @ts-expect-error todo(flow->ts): do not reuse variables\n if (moduleName) moduleName = t.stringLiteral(moduleName);\n\n const { meta, headers } = rewriteModuleStatementsAndPrepareHeader(\n path,\n {\n enumerableModuleMeta,\n constantReexports,\n strict,\n strictMode,\n allowTopLevelThis,\n importInterop,\n noInterop,\n filename: this.file.opts.filename,\n },\n );\n\n if (hasExports(meta)) {\n amdArgs.push(t.stringLiteral(\"exports\"));\n\n importNames.push(t.identifier(meta.exportName));\n }\n\n for (const [source, metadata] of meta.source) {\n amdArgs.push(t.stringLiteral(source));\n importNames.push(t.identifier(metadata.name));\n\n if (!isSideEffectImport(metadata)) {\n const interop = wrapInterop(\n path,\n t.identifier(metadata.name),\n metadata.interop,\n );\n if (interop) {\n const header = t.expressionStatement(\n t.assignmentExpression(\n \"=\",\n t.identifier(metadata.name),\n interop,\n ),\n );\n header.loc = metadata.loc;\n headers.push(header);\n }\n }\n\n headers.push(\n ...buildNamespaceInitStatements(\n meta,\n metadata,\n constantReexports,\n ),\n );\n }\n\n ensureStatementsHoisted(headers);\n path.unshiftContainer(\"body\", headers);\n\n injectWrapper(\n path,\n buildWrapper({\n MODULE_NAME: moduleName,\n\n AMD_ARGUMENTS: t.arrayExpression(amdArgs),\n IMPORT_NAMES: importNames,\n }) as t.ExpressionStatement,\n );\n },\n },\n },\n };\n});\n","// Heavily inspired by\n// https://github.com/airbnb/babel-plugin-dynamic-import-node/blob/master/src/utils.js\n\nimport type { File, NodePath } from \"@babel/core\";\nimport { types as t, template } from \"@babel/core\";\nimport { buildDynamicImport } from \"@babel/helper-module-transforms\";\n\nconst requireNoInterop = (source: t.Expression) =>\n template.expression.ast`require(${source})`;\n\nconst requireInterop = (source: t.Expression, file: File) =>\n t.callExpression(file.addHelper(\"interopRequireWildcard\"), [\n requireNoInterop(source),\n ]);\n\nexport function transformDynamicImport(\n path: NodePath,\n noInterop: boolean,\n file: File,\n) {\n const buildRequire = noInterop ? requireNoInterop : requireInterop;\n\n path.replaceWith(\n buildDynamicImport(path.node, true, false, specifier =>\n buildRequire(specifier, file),\n ),\n );\n}\n","import { template, types as t } from \"@babel/core\";\nimport { isSideEffectImport } from \"@babel/helper-module-transforms\";\nimport type { CommonJSHook } from \"./hooks.ts\";\n\ntype Lazy = boolean | string[] | ((source: string) => boolean);\n\nexport const lazyImportsHook = (lazy: Lazy): CommonJSHook => ({\n name: `${PACKAGE_JSON.name}/lazy`,\n version: PACKAGE_JSON.version,\n getWrapperPayload(source, metadata) {\n if (isSideEffectImport(metadata) || metadata.reexportAll) {\n return null;\n }\n if (lazy === true) {\n // 'true' means that local relative files are eagerly loaded and\n // dependency modules are loaded lazily.\n return source.includes(\".\") ? null : \"lazy/function\";\n }\n if (Array.isArray(lazy)) {\n return !lazy.includes(source) ? null : \"lazy/function\";\n }\n if (typeof lazy === \"function\") {\n return lazy(source) ? \"lazy/function\" : null;\n }\n },\n buildRequireWrapper(name, init, payload, referenced) {\n if (payload === \"lazy/function\") {\n if (!referenced) return false;\n return template.statement.ast`\n function ${name}() {\n const data = ${init};\n ${name} = function(){ return data; };\n return data;\n }\n `;\n }\n },\n wrapReference(ref, payload) {\n if (payload === \"lazy/function\") return t.callExpression(ref, []);\n },\n});\n","import type { types as t, File } from \"@babel/core\";\nimport type { isSideEffectImport } from \"@babel/helper-module-transforms\";\n\nconst commonJSHooksKey =\n \"@babel/plugin-transform-modules-commonjs/customWrapperPlugin\";\n\ntype SourceMetadata = Parameters[0];\n\n// A hook exposes a set of function that can customize how `require()` calls and\n// references to the imported bindings are handled. These functions can either\n// return a result, or return `null` to delegate to the next hook.\nexport interface CommonJSHook {\n name: string;\n version: string;\n wrapReference?(ref: t.Expression, payload: unknown): t.CallExpression | null;\n // Optionally wrap a `require` call. If this function returns `false`, the\n // `require` call is removed from the generated code.\n buildRequireWrapper?(\n name: string,\n init: t.Expression,\n payload: unknown,\n referenced: boolean,\n ): t.Statement | false | null;\n getWrapperPayload?(\n source: string,\n metadata: SourceMetadata,\n importNodes: t.Node[],\n ): string | null;\n}\n\nexport function defineCommonJSHook(file: File, hook: CommonJSHook) {\n let hooks = file.get(commonJSHooksKey);\n if (!hooks) file.set(commonJSHooksKey, (hooks = []));\n hooks.push(hook);\n}\n\nfunction findMap(arr: T[] | null, cb: (el: T) => U): U | null {\n if (arr) {\n for (const el of arr) {\n const res = cb(el);\n if (res != null) return res;\n }\n }\n}\n\nexport function makeInvokers(\n file: File,\n): Pick<\n CommonJSHook,\n \"wrapReference\" | \"getWrapperPayload\" | \"buildRequireWrapper\"\n> {\n const hooks: CommonJSHook[] | null = file.get(commonJSHooksKey);\n\n return {\n getWrapperPayload(...args) {\n return findMap(hooks, hook => hook.getWrapperPayload?.(...args));\n },\n wrapReference(...args) {\n return findMap(hooks, hook => hook.wrapReference?.(...args));\n },\n buildRequireWrapper(...args) {\n return findMap(hooks, hook => hook.buildRequireWrapper?.(...args));\n },\n };\n}\n","import { declare } from \"@babel/helper-plugin-utils\";\nimport {\n isModule,\n rewriteModuleStatementsAndPrepareHeader,\n type RewriteModuleStatementsAndPrepareHeaderOptions,\n isSideEffectImport,\n buildNamespaceInitStatements,\n ensureStatementsHoisted,\n wrapInterop,\n getModuleName,\n} from \"@babel/helper-module-transforms\";\nimport simplifyAccess from \"@babel/helper-simple-access\";\nimport { template, types as t } from \"@babel/core\";\nimport type { PluginPass, Visitor, Scope, NodePath } from \"@babel/core\";\nimport type { PluginOptions } from \"@babel/helper-module-transforms\";\n\nimport { transformDynamicImport } from \"./dynamic-import.ts\";\nimport { lazyImportsHook } from \"./lazy.ts\";\n\nimport { defineCommonJSHook, makeInvokers } from \"./hooks.ts\";\nexport { defineCommonJSHook };\n\nexport interface Options extends PluginOptions {\n allowCommonJSExports?: boolean;\n allowTopLevelThis?: boolean;\n importInterop?: RewriteModuleStatementsAndPrepareHeaderOptions[\"importInterop\"];\n lazy?: RewriteModuleStatementsAndPrepareHeaderOptions[\"lazy\"];\n loose?: boolean;\n mjsStrictNamespace?: boolean;\n noInterop?: boolean;\n strict?: boolean;\n strictMode?: boolean;\n strictNamespace?: boolean;\n}\n\nexport default declare((api, options: Options) => {\n api.assertVersion(REQUIRED_VERSION(7));\n\n const {\n // 'true' for imports to strictly have .default, instead of having\n // destructuring-like behavior for their properties. This matches the behavior\n // of the initial Node.js (v12) behavior when importing a CommonJS without\n // the __esMoule property.\n // .strictNamespace is for non-mjs files, mjsStrictNamespace if for mjs files.\n strictNamespace = false,\n mjsStrictNamespace = strictNamespace,\n\n allowTopLevelThis,\n strict,\n strictMode,\n noInterop,\n importInterop,\n lazy = false,\n // Defaulting to 'true' for now. May change before 7.x major.\n allowCommonJSExports = true,\n loose = false,\n } = options;\n\n const constantReexports = api.assumption(\"constantReexports\") ?? loose;\n const enumerableModuleMeta = api.assumption(\"enumerableModuleMeta\") ?? loose;\n const noIncompleteNsImportDetection =\n api.assumption(\"noIncompleteNsImportDetection\") ?? false;\n\n if (\n typeof lazy !== \"boolean\" &&\n typeof lazy !== \"function\" &&\n (!Array.isArray(lazy) || !lazy.every(item => typeof item === \"string\"))\n ) {\n throw new Error(`.lazy must be a boolean, array of strings, or a function`);\n }\n\n if (typeof strictNamespace !== \"boolean\") {\n throw new Error(`.strictNamespace must be a boolean, or undefined`);\n }\n if (typeof mjsStrictNamespace !== \"boolean\") {\n throw new Error(`.mjsStrictNamespace must be a boolean, or undefined`);\n }\n\n const getAssertion = (localName: string) => template.expression.ast`\n (function(){\n throw new Error(\n \"The CommonJS '\" + \"${localName}\" + \"' variable is not available in ES6 modules.\" +\n \"Consider setting setting sourceType:script or sourceType:unambiguous in your \" +\n \"Babel config for this file.\");\n })()\n `;\n\n const moduleExportsVisitor: Visitor<{ scope: Scope }> = {\n ReferencedIdentifier(path) {\n const localName = path.node.name;\n if (localName !== \"module\" && localName !== \"exports\") return;\n\n const localBinding = path.scope.getBinding(localName);\n const rootBinding = this.scope.getBinding(localName);\n\n if (\n // redeclared in this scope\n rootBinding !== localBinding ||\n (path.parentPath.isObjectProperty({ value: path.node }) &&\n path.parentPath.parentPath.isObjectPattern()) ||\n path.parentPath.isAssignmentExpression({ left: path.node }) ||\n path.isAssignmentExpression({ left: path.node })\n ) {\n return;\n }\n\n path.replaceWith(getAssertion(localName));\n },\n\n UpdateExpression(path) {\n const arg = path.get(\"argument\");\n if (!arg.isIdentifier()) return;\n const localName = arg.node.name;\n if (localName !== \"module\" && localName !== \"exports\") return;\n\n const localBinding = path.scope.getBinding(localName);\n const rootBinding = this.scope.getBinding(localName);\n\n // redeclared in this scope\n if (rootBinding !== localBinding) return;\n\n path.replaceWith(\n t.assignmentExpression(\n path.node.operator[0] + \"=\",\n arg.node,\n getAssertion(localName),\n ),\n );\n },\n\n AssignmentExpression(path) {\n const left = path.get(\"left\");\n if (left.isIdentifier()) {\n const localName = left.node.name;\n if (localName !== \"module\" && localName !== \"exports\") return;\n\n const localBinding = path.scope.getBinding(localName);\n const rootBinding = this.scope.getBinding(localName);\n\n // redeclared in this scope\n if (rootBinding !== localBinding) return;\n\n const right = path.get(\"right\");\n right.replaceWith(\n t.sequenceExpression([right.node, getAssertion(localName)]),\n );\n } else if (left.isPattern()) {\n const ids = left.getOuterBindingIdentifiers();\n const localName = Object.keys(ids).find(localName => {\n if (localName !== \"module\" && localName !== \"exports\") return false;\n\n return (\n this.scope.getBinding(localName) ===\n path.scope.getBinding(localName)\n );\n });\n\n if (localName) {\n const right = path.get(\"right\");\n right.replaceWith(\n t.sequenceExpression([right.node, getAssertion(localName)]),\n );\n }\n }\n },\n };\n\n return {\n name: \"transform-modules-commonjs\",\n\n pre() {\n this.file.set(\"@babel/plugin-transform-modules-*\", \"commonjs\");\n\n if (lazy) defineCommonJSHook(this.file, lazyImportsHook(lazy));\n },\n\n visitor: {\n [\"CallExpression\" +\n (api.types.importExpression ? \"|ImportExpression\" : \"\")](\n this: PluginPass,\n path: NodePath,\n ) {\n if (!this.file.has(\"@babel/plugin-proposal-dynamic-import\")) return;\n if (path.isCallExpression() && !t.isImport(path.node.callee)) return;\n\n let { scope } = path;\n do {\n scope.rename(\"require\");\n } while ((scope = scope.parent));\n\n transformDynamicImport(path, noInterop, this.file);\n },\n\n Program: {\n exit(path, state) {\n if (!isModule(path)) return;\n\n // Rename the bindings auto-injected into the scope so there is no\n // risk of conflict between the bindings.\n path.scope.rename(\"exports\");\n path.scope.rename(\"module\");\n path.scope.rename(\"require\");\n path.scope.rename(\"__filename\");\n path.scope.rename(\"__dirname\");\n\n // Rewrite references to 'module' and 'exports' to throw exceptions.\n // These objects are specific to CommonJS and are not available in\n // real ES6 implementations.\n if (!allowCommonJSExports) {\n if (process.env.BABEL_8_BREAKING) {\n simplifyAccess(path, new Set([\"module\", \"exports\"]));\n } else {\n // @ts-ignore(Babel 7 vs Babel 8) The third param has been removed in Babel 8.\n simplifyAccess(path, new Set([\"module\", \"exports\"]), false);\n }\n path.traverse(moduleExportsVisitor, {\n scope: path.scope,\n });\n }\n\n let moduleName = getModuleName(this.file.opts, options);\n // @ts-expect-error todo(flow->ts): do not reuse variables\n if (moduleName) moduleName = t.stringLiteral(moduleName);\n\n const hooks = makeInvokers(this.file);\n\n const { meta, headers } = rewriteModuleStatementsAndPrepareHeader(\n path,\n {\n exportName: \"exports\",\n constantReexports,\n enumerableModuleMeta,\n strict,\n strictMode,\n allowTopLevelThis,\n noInterop,\n importInterop,\n wrapReference: hooks.wrapReference,\n getWrapperPayload: hooks.getWrapperPayload,\n esNamespaceOnly:\n typeof state.filename === \"string\" &&\n /\\.mjs$/.test(state.filename)\n ? mjsStrictNamespace\n : strictNamespace,\n noIncompleteNsImportDetection,\n filename: this.file.opts.filename,\n },\n );\n\n for (const [source, metadata] of meta.source) {\n const loadExpr = t.callExpression(t.identifier(\"require\"), [\n t.stringLiteral(source),\n ]);\n\n let header: t.Statement;\n if (isSideEffectImport(metadata)) {\n if (lazy && metadata.wrap === \"function\") {\n throw new Error(\"Assertion failure\");\n }\n\n header = t.expressionStatement(loadExpr);\n } else {\n const init =\n wrapInterop(path, loadExpr, metadata.interop) || loadExpr;\n\n if (metadata.wrap) {\n const res = hooks.buildRequireWrapper(\n metadata.name,\n init,\n metadata.wrap,\n metadata.referenced,\n );\n if (res === false) continue;\n else header = res;\n }\n header ??= template.statement.ast`\n var ${metadata.name} = ${init};\n `;\n }\n header.loc = metadata.loc;\n\n headers.push(header);\n headers.push(\n ...buildNamespaceInitStatements(\n meta,\n metadata,\n constantReexports,\n hooks.wrapReference,\n ),\n );\n }\n\n ensureStatementsHoisted(headers);\n path.unshiftContainer(\"body\", headers);\n path.get(\"body\").forEach(path => {\n if (!headers.includes(path.node)) return;\n if (path.isVariableDeclaration()) {\n path.scope.registerDeclaration(path);\n }\n });\n },\n },\n },\n };\n});\n","import { declare } from \"@babel/helper-plugin-utils\";\nimport { template, types as t } from \"@babel/core\";\nimport type { PluginPass, NodePath, Scope, Visitor } from \"@babel/core\";\nimport {\n buildDynamicImport,\n getModuleName,\n rewriteThis,\n} from \"@babel/helper-module-transforms\";\nimport type { PluginOptions } from \"@babel/helper-module-transforms\";\nimport { isIdentifierName } from \"@babel/helper-validator-identifier\";\n\nconst buildTemplate = template.statement(`\n SYSTEM_REGISTER(MODULE_NAME, SOURCES, function (EXPORT_IDENTIFIER, CONTEXT_IDENTIFIER) {\n \"use strict\";\n BEFORE_BODY;\n return {\n setters: SETTERS,\n execute: EXECUTE,\n };\n });\n`);\n\nconst buildExportAll = template.statement(`\n for (var KEY in TARGET) {\n if (KEY !== \"default\" && KEY !== \"__esModule\") EXPORT_OBJ[KEY] = TARGET[KEY];\n }\n`);\n\nconst MISSING_PLUGIN_WARNING = `\\\nWARNING: Dynamic import() transformation must be enabled using the\n @babel/plugin-transform-dynamic-import plugin. Babel 8 will\n no longer transform import() without using that plugin.\n`;\n\nconst MISSING_PLUGIN_ERROR = `\\\nERROR: Dynamic import() transformation must be enabled using the\n @babel/plugin-transform-dynamic-import plugin. Babel 8\n no longer transforms import() without using that plugin.\n`;\n\n//todo: use getExportSpecifierName in `helper-module-transforms` when this library is refactored to NodePath usage.\n\nexport function getExportSpecifierName(\n node: t.Node,\n stringSpecifiers: Set,\n): string {\n if (node.type === \"Identifier\") {\n return node.name;\n } else if (node.type === \"StringLiteral\") {\n const stringValue = node.value;\n // add specifier value to `stringSpecifiers` only when it can not be converted to an identifier name\n // i.e In `import { \"foo\" as bar }`\n // we do not consider `\"foo\"` to be a `stringSpecifier` because we can treat it as\n // `import { foo as bar }`\n // This helps minimize the size of `stringSpecifiers` and reduce overhead of checking valid identifier names\n // when building transpiled code from metadata\n if (!isIdentifierName(stringValue)) {\n stringSpecifiers.add(stringValue);\n }\n return stringValue;\n } else {\n throw new Error(\n `Expected export specifier to be either Identifier or StringLiteral, got ${node.type}`,\n );\n }\n}\n\ntype PluginState = {\n contextIdent: string;\n // List of names that should only be printed as string literals.\n // i.e. `import { \"any unicode\" as foo } from \"some-module\"`\n // `stringSpecifiers` is Set(1) [\"any unicode\"]\n // In most cases `stringSpecifiers` is an empty Set\n stringSpecifiers: Set;\n};\n\ntype ModuleMetadata = {\n key: string;\n imports: any[];\n exports: any[];\n};\n\nfunction constructExportCall(\n path: NodePath,\n exportIdent: t.Identifier,\n exportNames: string[],\n exportValues: t.Expression[],\n exportStarTarget: t.Identifier | null,\n stringSpecifiers: Set,\n) {\n const statements = [];\n if (!exportStarTarget) {\n if (exportNames.length === 1) {\n statements.push(\n t.expressionStatement(\n t.callExpression(exportIdent, [\n t.stringLiteral(exportNames[0]),\n exportValues[0],\n ]),\n ),\n );\n } else {\n const objectProperties = [];\n for (let i = 0; i < exportNames.length; i++) {\n const exportName = exportNames[i];\n const exportValue = exportValues[i];\n objectProperties.push(\n t.objectProperty(\n stringSpecifiers.has(exportName)\n ? t.stringLiteral(exportName)\n : t.identifier(exportName),\n exportValue,\n ),\n );\n }\n statements.push(\n t.expressionStatement(\n t.callExpression(exportIdent, [t.objectExpression(objectProperties)]),\n ),\n );\n }\n } else {\n const exportObj = path.scope.generateUid(\"exportObj\");\n\n statements.push(\n t.variableDeclaration(\"var\", [\n t.variableDeclarator(t.identifier(exportObj), t.objectExpression([])),\n ]),\n );\n\n statements.push(\n buildExportAll({\n KEY: path.scope.generateUidIdentifier(\"key\"),\n EXPORT_OBJ: t.identifier(exportObj),\n TARGET: exportStarTarget,\n }),\n );\n\n for (let i = 0; i < exportNames.length; i++) {\n const exportName = exportNames[i];\n const exportValue = exportValues[i];\n\n statements.push(\n t.expressionStatement(\n t.assignmentExpression(\n \"=\",\n t.memberExpression(\n t.identifier(exportObj),\n t.identifier(exportName),\n ),\n exportValue,\n ),\n ),\n );\n }\n\n statements.push(\n t.expressionStatement(\n t.callExpression(exportIdent, [t.identifier(exportObj)]),\n ),\n );\n }\n return statements;\n}\n\nexport interface Options extends PluginOptions {\n allowTopLevelThis?: boolean;\n systemGlobal?: string;\n}\n\ntype ReassignmentVisitorState = {\n scope: Scope;\n exports: any;\n buildCall: (name: string, value: t.Expression) => t.ExpressionStatement;\n};\n\nexport default declare((api, options: Options) => {\n api.assertVersion(REQUIRED_VERSION(7));\n\n const { systemGlobal = \"System\", allowTopLevelThis = false } = options;\n const reassignmentVisited = new WeakSet();\n\n const reassignmentVisitor: Visitor = {\n \"AssignmentExpression|UpdateExpression\"(\n path: NodePath,\n ) {\n if (reassignmentVisited.has(path.node)) return;\n reassignmentVisited.add(path.node);\n\n const arg = path.isAssignmentExpression()\n ? path.get(\"left\")\n : path.get(\"argument\");\n\n if (arg.isObjectPattern() || arg.isArrayPattern()) {\n const exprs: t.SequenceExpression[\"expressions\"] = [path.node];\n for (const name of Object.keys(arg.getBindingIdentifiers())) {\n if (this.scope.getBinding(name) !== path.scope.getBinding(name)) {\n return;\n }\n const exportedNames = this.exports[name];\n if (!exportedNames) continue;\n for (const exportedName of exportedNames) {\n exprs.push(\n this.buildCall(exportedName, t.identifier(name)).expression,\n );\n }\n }\n path.replaceWith(t.sequenceExpression(exprs));\n return;\n }\n\n if (!arg.isIdentifier()) return;\n\n const name = arg.node.name;\n\n // redeclared in this scope\n if (this.scope.getBinding(name) !== path.scope.getBinding(name)) return;\n\n const exportedNames = this.exports[name];\n if (!exportedNames) return;\n\n let node: t.Expression = path.node;\n\n // if it is a non-prefix update expression (x++ etc)\n // then we must replace with the expression (_export('x', x + 1), x++)\n // in order to ensure the same update expression value\n const isPostUpdateExpression = t.isUpdateExpression(node, {\n prefix: false,\n });\n if (isPostUpdateExpression) {\n node = t.binaryExpression(\n // @ts-expect-error The operator of a post-update expression must be \"++\" | \"--\"\n node.operator[0],\n t.unaryExpression(\n \"+\",\n t.cloneNode(\n // @ts-expect-error node is UpdateExpression\n node.argument,\n ),\n ),\n t.numericLiteral(1),\n );\n }\n\n for (const exportedName of exportedNames) {\n node = this.buildCall(exportedName, node).expression;\n }\n\n if (isPostUpdateExpression) {\n node = t.sequenceExpression([node, path.node]);\n }\n\n path.replaceWith(node);\n },\n };\n\n return {\n name: \"transform-modules-systemjs\",\n\n pre() {\n this.file.set(\"@babel/plugin-transform-modules-*\", \"systemjs\");\n },\n\n visitor: {\n [\"CallExpression\" +\n (api.types.importExpression ? \"|ImportExpression\" : \"\")](\n this: PluginPass & PluginState,\n path: NodePath,\n state: PluginState,\n ) {\n if (path.isCallExpression() && !t.isImport(path.node.callee)) return;\n if (path.isCallExpression()) {\n if (!this.file.has(\"@babel/plugin-proposal-dynamic-import\")) {\n if (process.env.BABEL_8_BREAKING) {\n throw new Error(MISSING_PLUGIN_ERROR);\n } else {\n console.warn(MISSING_PLUGIN_WARNING);\n }\n }\n } else {\n // when createImportExpressions is true, we require the dynamic import transform\n if (!this.file.has(\"@babel/plugin-proposal-dynamic-import\")) {\n throw new Error(MISSING_PLUGIN_ERROR);\n }\n }\n path.replaceWith(\n buildDynamicImport(path.node, false, true, specifier =>\n t.callExpression(\n t.memberExpression(\n t.identifier(state.contextIdent),\n t.identifier(\"import\"),\n ),\n [specifier],\n ),\n ),\n );\n },\n\n MetaProperty(path, state: PluginState) {\n if (\n path.node.meta.name === \"import\" &&\n path.node.property.name === \"meta\"\n ) {\n path.replaceWith(\n t.memberExpression(\n t.identifier(state.contextIdent),\n t.identifier(\"meta\"),\n ),\n );\n }\n },\n\n ReferencedIdentifier(path, state) {\n if (\n path.node.name === \"__moduleName\" &&\n !path.scope.hasBinding(\"__moduleName\")\n ) {\n path.replaceWith(\n t.memberExpression(\n t.identifier(state.contextIdent),\n t.identifier(\"id\"),\n ),\n );\n }\n },\n\n Program: {\n enter(path, state) {\n state.contextIdent = path.scope.generateUid(\"context\");\n state.stringSpecifiers = new Set();\n if (!allowTopLevelThis) {\n rewriteThis(path);\n }\n },\n exit(path, state) {\n const scope = path.scope;\n const exportIdent = scope.generateUid(\"export\");\n const { contextIdent, stringSpecifiers } = state;\n\n const exportMap: Record = Object.create(null);\n const modules: ModuleMetadata[] = [];\n\n const beforeBody = [];\n const setters: t.Expression[] = [];\n const sources: t.StringLiteral[] = [];\n const variableIds = [];\n const removedPaths = [];\n\n function addExportName(key: string, val: string) {\n exportMap[key] = exportMap[key] || [];\n exportMap[key].push(val);\n }\n\n function pushModule(\n source: string,\n key: \"imports\" | \"exports\",\n specifiers: t.ModuleSpecifier[] | t.ExportAllDeclaration,\n ) {\n let module: ModuleMetadata;\n modules.forEach(function (m) {\n if (m.key === source) {\n module = m;\n }\n });\n if (!module) {\n modules.push(\n (module = { key: source, imports: [], exports: [] }),\n );\n }\n module[key] = module[key].concat(specifiers);\n }\n\n function buildExportCall(name: string, val: t.Expression) {\n return t.expressionStatement(\n t.callExpression(t.identifier(exportIdent), [\n t.stringLiteral(name),\n val,\n ]),\n );\n }\n\n const exportNames = [];\n const exportValues: t.Expression[] = [];\n\n const body = path.get(\"body\");\n\n for (const path of body) {\n if (path.isFunctionDeclaration()) {\n beforeBody.push(path.node);\n removedPaths.push(path);\n } else if (path.isClassDeclaration()) {\n variableIds.push(t.cloneNode(path.node.id));\n path.replaceWith(\n t.expressionStatement(\n t.assignmentExpression(\n \"=\",\n t.cloneNode(path.node.id),\n t.toExpression(path.node),\n ),\n ),\n );\n } else if (path.isVariableDeclaration()) {\n // Convert top-level variable declarations to \"var\",\n // because they must be hoisted\n path.node.kind = \"var\";\n } else if (path.isImportDeclaration()) {\n const source = path.node.source.value;\n pushModule(source, \"imports\", path.node.specifiers);\n for (const name of Object.keys(path.getBindingIdentifiers())) {\n scope.removeBinding(name);\n variableIds.push(t.identifier(name));\n }\n path.remove();\n } else if (path.isExportAllDeclaration()) {\n pushModule(path.node.source.value, \"exports\", path.node);\n path.remove();\n } else if (path.isExportDefaultDeclaration()) {\n const declar = path.node.declaration;\n if (t.isClassDeclaration(declar)) {\n const id = declar.id;\n if (id) {\n exportNames.push(\"default\");\n exportValues.push(scope.buildUndefinedNode());\n variableIds.push(t.cloneNode(id));\n addExportName(id.name, \"default\");\n path.replaceWith(\n t.expressionStatement(\n t.assignmentExpression(\n \"=\",\n t.cloneNode(id),\n t.toExpression(declar),\n ),\n ),\n );\n } else {\n exportNames.push(\"default\");\n exportValues.push(t.toExpression(declar));\n removedPaths.push(path);\n }\n } else if (t.isFunctionDeclaration(declar)) {\n const id = declar.id;\n if (id) {\n beforeBody.push(declar);\n exportNames.push(\"default\");\n exportValues.push(t.cloneNode(id));\n addExportName(id.name, \"default\");\n } else {\n exportNames.push(\"default\");\n exportValues.push(t.toExpression(declar));\n }\n removedPaths.push(path);\n } else {\n // @ts-expect-error TSDeclareFunction is not expected here\n path.replaceWith(buildExportCall(\"default\", declar));\n }\n } else if (path.isExportNamedDeclaration()) {\n const declar = path.node.declaration;\n\n if (declar) {\n path.replaceWith(declar);\n\n if (t.isFunction(declar)) {\n const name = declar.id.name;\n addExportName(name, name);\n beforeBody.push(declar);\n exportNames.push(name);\n exportValues.push(t.cloneNode(declar.id));\n removedPaths.push(path);\n } else if (t.isClass(declar)) {\n const name = declar.id.name;\n exportNames.push(name);\n exportValues.push(scope.buildUndefinedNode());\n variableIds.push(t.cloneNode(declar.id));\n path.replaceWith(\n t.expressionStatement(\n t.assignmentExpression(\n \"=\",\n t.cloneNode(declar.id),\n t.toExpression(declar),\n ),\n ),\n );\n addExportName(name, name);\n } else {\n if (t.isVariableDeclaration(declar)) {\n // Convert top-level variable declarations to \"var\",\n // because they must be hoisted\n declar.kind = \"var\";\n }\n for (const name of Object.keys(\n t.getBindingIdentifiers(declar),\n )) {\n addExportName(name, name);\n }\n }\n } else {\n const specifiers = path.node.specifiers;\n if (specifiers?.length) {\n if (path.node.source) {\n pushModule(path.node.source.value, \"exports\", specifiers);\n path.remove();\n } else {\n const nodes = [];\n\n for (const specifier of specifiers) {\n // @ts-expect-error This isn't an \"export ... from\" declaration\n // because path.node.source is falsy, so the local specifier exists.\n const { local, exported } = specifier;\n\n const binding = scope.getBinding(local.name);\n const exportedName = getExportSpecifierName(\n exported,\n stringSpecifiers,\n );\n // hoisted function export\n if (\n binding &&\n t.isFunctionDeclaration(binding.path.node)\n ) {\n exportNames.push(exportedName);\n exportValues.push(t.cloneNode(local));\n }\n // only globals also exported this way\n else if (!binding) {\n nodes.push(buildExportCall(exportedName, local));\n }\n addExportName(local.name, exportedName);\n }\n\n path.replaceWithMultiple(nodes);\n }\n } else {\n path.remove();\n }\n }\n }\n }\n\n modules.forEach(function (specifiers) {\n const setterBody = [];\n const target = scope.generateUid(specifiers.key);\n\n for (let specifier of specifiers.imports) {\n if (t.isImportNamespaceSpecifier(specifier)) {\n setterBody.push(\n t.expressionStatement(\n t.assignmentExpression(\n \"=\",\n specifier.local,\n t.identifier(target),\n ),\n ),\n );\n } else if (t.isImportDefaultSpecifier(specifier)) {\n specifier = t.importSpecifier(\n specifier.local,\n t.identifier(\"default\"),\n );\n }\n\n if (t.isImportSpecifier(specifier)) {\n const { imported } = specifier;\n setterBody.push(\n t.expressionStatement(\n t.assignmentExpression(\n \"=\",\n specifier.local,\n t.memberExpression(\n t.identifier(target),\n specifier.imported,\n /* computed */ imported.type === \"StringLiteral\",\n ),\n ),\n ),\n );\n }\n }\n\n if (specifiers.exports.length) {\n const exportNames = [];\n const exportValues = [];\n let hasExportStar = false;\n\n for (const node of specifiers.exports) {\n if (t.isExportAllDeclaration(node)) {\n hasExportStar = true;\n } else if (t.isExportSpecifier(node)) {\n const exportedName = getExportSpecifierName(\n node.exported,\n stringSpecifiers,\n );\n exportNames.push(exportedName);\n exportValues.push(\n t.memberExpression(\n t.identifier(target),\n node.local,\n t.isStringLiteral(node.local),\n ),\n );\n } else {\n // todo\n }\n }\n\n setterBody.push(\n ...constructExportCall(\n path,\n t.identifier(exportIdent),\n exportNames,\n exportValues,\n hasExportStar ? t.identifier(target) : null,\n stringSpecifiers,\n ),\n );\n }\n\n sources.push(t.stringLiteral(specifiers.key));\n setters.push(\n t.functionExpression(\n null,\n [t.identifier(target)],\n t.blockStatement(setterBody),\n ),\n );\n });\n\n let moduleName = getModuleName(this.file.opts, options);\n // @ts-expect-error todo(flow->ts): do not reuse variables\n if (moduleName) moduleName = t.stringLiteral(moduleName);\n\n if (!process.env.BABEL_8_BREAKING && !USE_ESM && !IS_STANDALONE) {\n // polyfill when being run by an older Babel version\n path.scope.hoistVariables ??=\n // eslint-disable-next-line no-restricted-globals\n require(\"@babel/traverse\").Scope.prototype.hoistVariables;\n }\n\n path.scope.hoistVariables((id, hasInit) => {\n variableIds.push(id);\n if (!hasInit && id.name in exportMap) {\n for (const exported of exportMap[id.name]) {\n exportNames.push(exported);\n exportValues.push(t.buildUndefinedNode());\n }\n }\n });\n\n if (variableIds.length) {\n beforeBody.unshift(\n t.variableDeclaration(\n \"var\",\n variableIds.map(id => t.variableDeclarator(id)),\n ),\n );\n }\n\n if (exportNames.length) {\n beforeBody.push(\n ...constructExportCall(\n path,\n t.identifier(exportIdent),\n exportNames,\n exportValues,\n null,\n stringSpecifiers,\n ),\n );\n }\n\n path.traverse(reassignmentVisitor, {\n exports: exportMap,\n buildCall: buildExportCall,\n scope,\n });\n\n for (const path of removedPaths) {\n path.remove();\n }\n\n let hasTLA = false;\n path.traverse({\n AwaitExpression(path) {\n hasTLA = true;\n path.stop();\n },\n Function(path) {\n path.skip();\n },\n // @ts-expect-error - todo: add noScope to type definitions\n noScope: true,\n });\n\n path.node.body = [\n buildTemplate({\n SYSTEM_REGISTER: t.memberExpression(\n t.identifier(systemGlobal),\n t.identifier(\"register\"),\n ),\n BEFORE_BODY: beforeBody,\n MODULE_NAME: moduleName,\n SETTERS: t.arrayExpression(setters),\n EXECUTE: t.functionExpression(\n null,\n [],\n t.blockStatement(path.node.body),\n false,\n hasTLA,\n ),\n SOURCES: t.arrayExpression(sources),\n EXPORT_IDENTIFIER: t.identifier(exportIdent),\n CONTEXT_IDENTIFIER: t.identifier(contextIdent),\n }),\n ];\n path.requeue(path.get(\"body.0\"));\n },\n },\n },\n };\n});\n","import { declare } from \"@babel/helper-plugin-utils\";\nimport { basename, extname } from \"path\";\nimport {\n isModule,\n rewriteModuleStatementsAndPrepareHeader,\n type RewriteModuleStatementsAndPrepareHeaderOptions,\n hasExports,\n isSideEffectImport,\n buildNamespaceInitStatements,\n ensureStatementsHoisted,\n wrapInterop,\n getModuleName,\n} from \"@babel/helper-module-transforms\";\nimport type { PluginOptions } from \"@babel/helper-module-transforms\";\nimport { types as t, template, type NodePath } from \"@babel/core\";\n\nconst buildPrerequisiteAssignment = template(`\n GLOBAL_REFERENCE = GLOBAL_REFERENCE || {}\n`);\n// Note: we avoid comparing typeof results with \"object\" or \"symbol\" otherwise\n// they will be processed by `transform-typeof-symbol`, which in return could\n// cause typeof helper used before declaration\nconst buildWrapper = template(`\n (function (global, factory) {\n if (typeof define === \"function\" && define.amd) {\n define(MODULE_NAME, AMD_ARGUMENTS, factory);\n } else if (typeof exports !== \"undefined\") {\n factory(COMMONJS_ARGUMENTS);\n } else {\n var mod = { exports: {} };\n factory(BROWSER_ARGUMENTS);\n\n GLOBAL_TO_ASSIGN;\n }\n })(\n typeof globalThis !== \"undefined\" ? globalThis\n : typeof self !== \"undefined\" ? self\n : this,\n function(IMPORT_NAMES) {\n })\n`);\n\nexport interface Options extends PluginOptions {\n allowTopLevelThis?: boolean;\n exactGlobals?: boolean;\n globals?: Record;\n importInterop?: RewriteModuleStatementsAndPrepareHeaderOptions[\"importInterop\"];\n loose?: boolean;\n noInterop?: boolean;\n strict?: boolean;\n strictMode?: boolean;\n}\n\nexport default declare((api, options: Options) => {\n api.assertVersion(REQUIRED_VERSION(7));\n\n const {\n globals,\n exactGlobals,\n allowTopLevelThis,\n strict,\n strictMode,\n noInterop,\n importInterop,\n } = options;\n\n const constantReexports =\n api.assumption(\"constantReexports\") ?? options.loose;\n const enumerableModuleMeta =\n api.assumption(\"enumerableModuleMeta\") ?? options.loose;\n\n /**\n * Build the assignment statements that initialize the UMD global.\n */\n function buildBrowserInit(\n browserGlobals: Record,\n exactGlobals: boolean,\n filename: string,\n moduleName: t.StringLiteral | void,\n ) {\n const moduleNameOrBasename = moduleName\n ? moduleName.value\n : basename(filename, extname(filename));\n let globalToAssign = t.memberExpression(\n t.identifier(\"global\"),\n t.identifier(t.toIdentifier(moduleNameOrBasename)),\n );\n let initAssignments = [];\n\n if (exactGlobals) {\n const globalName = browserGlobals[moduleNameOrBasename];\n\n if (globalName) {\n initAssignments = [];\n\n const members = globalName.split(\".\");\n globalToAssign = members.slice(1).reduce(\n (accum, curr) => {\n initAssignments.push(\n buildPrerequisiteAssignment({\n GLOBAL_REFERENCE: t.cloneNode(accum),\n }),\n );\n return t.memberExpression(accum, t.identifier(curr));\n },\n t.memberExpression(t.identifier(\"global\"), t.identifier(members[0])),\n );\n }\n }\n\n initAssignments.push(\n t.expressionStatement(\n t.assignmentExpression(\n \"=\",\n globalToAssign,\n t.memberExpression(t.identifier(\"mod\"), t.identifier(\"exports\")),\n ),\n ),\n );\n\n return initAssignments;\n }\n\n /**\n * Build the member expression that reads from a global for a given source.\n */\n function buildBrowserArg(\n browserGlobals: Record,\n exactGlobals: boolean,\n source: string,\n ) {\n let memberExpression: t.MemberExpression;\n if (exactGlobals) {\n const globalRef = browserGlobals[source];\n if (globalRef) {\n memberExpression = globalRef\n .split(\".\")\n .reduce(\n (accum: t.Identifier | t.MemberExpression, curr) =>\n t.memberExpression(accum, t.identifier(curr)),\n t.identifier(\"global\"),\n ) as t.MemberExpression;\n } else {\n memberExpression = t.memberExpression(\n t.identifier(\"global\"),\n t.identifier(t.toIdentifier(source)),\n );\n }\n } else {\n const requireName = basename(source, extname(source));\n const globalName = browserGlobals[requireName] || requireName;\n memberExpression = t.memberExpression(\n t.identifier(\"global\"),\n t.identifier(t.toIdentifier(globalName)),\n );\n }\n return memberExpression;\n }\n\n return {\n name: \"transform-modules-umd\",\n\n visitor: {\n Program: {\n exit(path) {\n if (!isModule(path)) return;\n\n const browserGlobals = globals || {};\n\n const moduleName = getModuleName(this.file.opts, options);\n let moduleNameLiteral: void | t.StringLiteral;\n if (moduleName) moduleNameLiteral = t.stringLiteral(moduleName);\n\n const { meta, headers } = rewriteModuleStatementsAndPrepareHeader(\n path,\n {\n constantReexports,\n enumerableModuleMeta,\n strict,\n strictMode,\n allowTopLevelThis,\n noInterop,\n importInterop,\n filename: this.file.opts.filename,\n },\n );\n\n const amdArgs = [];\n const commonjsArgs = [];\n const browserArgs = [];\n const importNames = [];\n\n if (hasExports(meta)) {\n amdArgs.push(t.stringLiteral(\"exports\"));\n commonjsArgs.push(t.identifier(\"exports\"));\n browserArgs.push(\n t.memberExpression(t.identifier(\"mod\"), t.identifier(\"exports\")),\n );\n importNames.push(t.identifier(meta.exportName));\n }\n\n for (const [source, metadata] of meta.source) {\n amdArgs.push(t.stringLiteral(source));\n commonjsArgs.push(\n t.callExpression(t.identifier(\"require\"), [\n t.stringLiteral(source),\n ]),\n );\n browserArgs.push(\n buildBrowserArg(browserGlobals, exactGlobals, source),\n );\n importNames.push(t.identifier(metadata.name));\n\n if (!isSideEffectImport(metadata)) {\n const interop = wrapInterop(\n path,\n t.identifier(metadata.name),\n metadata.interop,\n );\n if (interop) {\n const header = t.expressionStatement(\n t.assignmentExpression(\n \"=\",\n t.identifier(metadata.name),\n interop,\n ),\n );\n // @ts-expect-error todo(flow->ts)\n header.loc = meta.loc;\n headers.push(header);\n }\n }\n\n headers.push(\n ...buildNamespaceInitStatements(\n meta,\n metadata,\n constantReexports,\n ),\n );\n }\n\n ensureStatementsHoisted(headers);\n path.unshiftContainer(\"body\", headers);\n\n const { body, directives } = path.node;\n path.node.directives = [];\n path.node.body = [];\n const umdWrapper = path.pushContainer(\"body\", [\n buildWrapper({\n //todo: buildWrapper does not handle void moduleNameLiteral\n MODULE_NAME: moduleNameLiteral,\n\n AMD_ARGUMENTS: t.arrayExpression(amdArgs),\n COMMONJS_ARGUMENTS: commonjsArgs,\n BROWSER_ARGUMENTS: browserArgs,\n IMPORT_NAMES: importNames,\n\n GLOBAL_TO_ASSIGN: buildBrowserInit(\n browserGlobals,\n exactGlobals,\n this.filename || \"unknown\",\n moduleNameLiteral,\n ),\n }) as t.Statement,\n ])[0] as NodePath;\n const umdFactory = (\n umdWrapper.get(\"expression.arguments\")[1] as NodePath\n ).get(\"body\") as NodePath;\n umdFactory.pushContainer(\"directives\", directives);\n umdFactory.pushContainer(\"body\", body);\n },\n },\n },\n };\n});\n","/* eslint-disable @babel/development/plugin-name */\nimport { createRegExpFeaturePlugin } from \"@babel/helper-create-regexp-features-plugin\";\nimport { declare } from \"@babel/helper-plugin-utils\";\n\nexport interface Options {\n runtime?: boolean;\n}\n\nexport default declare((api, options: Options) => {\n const { runtime } = options;\n if (runtime !== undefined && typeof runtime !== \"boolean\") {\n throw new Error(\"The 'runtime' option must be boolean\");\n }\n\n return createRegExpFeaturePlugin({\n name: \"transform-named-capturing-groups-regex\",\n feature: \"namedCaptureGroups\",\n options: { runtime },\n });\n});\n","import { declare } from \"@babel/helper-plugin-utils\";\nimport { types as t, type NodePath } from \"@babel/core\";\n\nexport default declare(api => {\n api.assertVersion(REQUIRED_VERSION(7));\n\n return {\n name: \"transform-new-target\",\n\n visitor: {\n MetaProperty(path) {\n const meta = path.get(\"meta\");\n const property = path.get(\"property\");\n const { scope } = path;\n\n if (\n meta.isIdentifier({ name: \"new\" }) &&\n property.isIdentifier({ name: \"target\" })\n ) {\n const func = path.findParent(path => {\n if (path.isClass()) return true;\n if (path.isFunction() && !path.isArrowFunctionExpression()) {\n if (path.isClassMethod({ kind: \"constructor\" })) {\n return false;\n }\n\n return true;\n }\n return false;\n }) as NodePath<\n | t.FunctionDeclaration\n | t.FunctionExpression\n | t.Class\n | t.ClassMethod\n | t.ClassPrivateMethod\n >;\n\n if (!func) {\n throw path.buildCodeFrameError(\n \"new.target must be under a (non-arrow) function or a class.\",\n );\n }\n\n const { node } = func;\n if (t.isMethod(node)) {\n path.replaceWith(scope.buildUndefinedNode());\n return;\n }\n\n const constructor = t.memberExpression(\n t.thisExpression(),\n t.identifier(\"constructor\"),\n );\n\n if (func.isClass()) {\n path.replaceWith(constructor);\n return;\n }\n\n if (!node.id) {\n node.id = scope.generateUidIdentifier(\"target\");\n } else {\n // packages/babel-helper-create-class-features-plugin/src/fields.ts#L192 unshadow\n let scope = path.scope;\n const name = node.id.name;\n while (scope !== func.parentPath.scope) {\n if (\n scope.hasOwnBinding(name) &&\n !scope.bindingIdentifierEquals(name, node.id)\n ) {\n scope.rename(name);\n }\n scope = scope.parent;\n }\n }\n\n path.replaceWith(\n t.conditionalExpression(\n t.binaryExpression(\n \"instanceof\",\n t.thisExpression(),\n t.cloneNode(node.id),\n ),\n constructor,\n scope.buildUndefinedNode(),\n ),\n );\n }\n },\n },\n };\n});\n","import { declare } from \"@babel/helper-plugin-utils\";\n\nexport default declare(api => {\n api.assertVersion(REQUIRED_VERSION(7));\n\n return {\n name: \"transform-object-assign\",\n\n visitor: {\n CallExpression: function (path, file) {\n if (path.get(\"callee\").matchesPattern(\"Object.assign\")) {\n path.node.callee = file.addHelper(\"extends\");\n }\n },\n },\n };\n});\n","import { declare } from \"@babel/helper-plugin-utils\";\nimport ReplaceSupers from \"@babel/helper-replace-supers\";\nimport { types as t } from \"@babel/core\";\nimport type { File, NodePath } from \"@babel/core\";\n\nfunction replacePropertySuper(\n path: NodePath,\n getObjectRef: () => t.Identifier,\n file: File,\n) {\n // @ts-expect-error todo(flow->ts):\n const replaceSupers = new ReplaceSupers({\n getObjectRef: getObjectRef,\n methodPath: path,\n file: file,\n });\n\n replaceSupers.replace();\n}\n\nexport default declare(api => {\n api.assertVersion(REQUIRED_VERSION(7));\n const newLets = new Set<{\n scopePath: NodePath;\n id: t.Identifier;\n }>();\n\n return {\n name: \"transform-object-super\",\n\n visitor: {\n Loop: {\n exit(path) {\n newLets.forEach(v => {\n if (v.scopePath === path) {\n path.scope.push({\n id: v.id,\n kind: \"let\",\n });\n path.scope.crawl();\n path.requeue();\n newLets.delete(v);\n }\n });\n },\n },\n ObjectExpression(path, state) {\n let objectRef: t.Identifier;\n const getObjectRef = () =>\n (objectRef = objectRef || path.scope.generateUidIdentifier(\"obj\"));\n\n path.get(\"properties\").forEach(propPath => {\n if (!propPath.isMethod()) return;\n\n replacePropertySuper(propPath, getObjectRef, state.file);\n });\n\n if (objectRef) {\n const scopePath = path.findParent(\n p => p.isFunction() || p.isProgram() || p.isLoop(),\n );\n const useLet = scopePath.isLoop();\n // For transform-block-scoping\n if (useLet) {\n newLets.add({ scopePath, id: t.cloneNode(objectRef) });\n } else {\n path.scope.push({\n id: t.cloneNode(objectRef),\n kind: \"var\",\n });\n }\n\n path.replaceWith(\n t.assignmentExpression(\"=\", t.cloneNode(objectRef), path.node),\n );\n }\n },\n },\n };\n});\n","import { declare } from \"@babel/helper-plugin-utils\";\n\nexport default declare(api => {\n api.assertVersion(REQUIRED_VERSION(7));\n\n return {\n name: \"transform-object-set-prototype-of-to-assign\",\n\n visitor: {\n CallExpression(path, file) {\n if (path.get(\"callee\").matchesPattern(\"Object.setPrototypeOf\")) {\n path.node.callee = file.addHelper(\"defaults\");\n }\n },\n },\n };\n});\n","import { declare } from \"@babel/helper-plugin-utils\";\nimport { types as t } from \"@babel/core\";\n\nexport default declare(api => {\n api.assertVersion(REQUIRED_VERSION(7));\n\n return {\n name: \"transform-property-literals\",\n\n visitor: {\n ObjectProperty: {\n exit({ node }) {\n const key = node.key;\n if (\n !node.computed &&\n t.isIdentifier(key) &&\n !t.isValidES3Identifier(key.name)\n ) {\n // default: \"bar\" -> \"default\": \"bar\"\n node.key = t.stringLiteral(key.name);\n }\n },\n },\n },\n };\n});\n","import { types as t } from \"@babel/core\";\n\ntype DefineMap = {\n _inherits: t.Node[];\n _key: t.Expression;\n get?: t.Expression;\n set?: t.Expression;\n kind: \"get\" | \"set\";\n};\n\nexport type MutatorMap = Record;\n\nexport function pushAccessor(\n mutatorMap: MutatorMap,\n node: t.ObjectMethod & { kind: \"get\" | \"set\"; computed: false },\n) {\n const alias = t.toKeyAlias(node);\n const map = (mutatorMap[alias] ??= {\n _inherits: [],\n _key: node.key,\n } as DefineMap);\n\n map._inherits.push(node);\n\n const value = t.functionExpression(\n null,\n node.params,\n node.body,\n node.generator,\n node.async,\n );\n value.returnType = node.returnType;\n t.inheritsComments(value, node);\n map[node.kind] = value;\n\n return map;\n}\n\nexport function toDefineObject(mutatorMap: any) {\n const objExpr = t.objectExpression([]);\n\n Object.keys(mutatorMap).forEach(function (mutatorMapKey) {\n const map = mutatorMap[mutatorMapKey];\n map.configurable = t.booleanLiteral(true);\n map.enumerable = t.booleanLiteral(true);\n\n const mapNode = t.objectExpression([]);\n\n const propNode = t.objectProperty(map._key, mapNode, map._computed);\n\n Object.keys(map).forEach(function (key) {\n const node = map[key];\n if (key[0] === \"_\") return;\n\n const prop = t.objectProperty(t.identifier(key), node);\n t.inheritsComments(prop, node);\n t.removeComments(node);\n\n mapNode.properties.push(prop);\n });\n\n objExpr.properties.push(propNode);\n });\n\n return objExpr;\n}\n","import { declare } from \"@babel/helper-plugin-utils\";\nimport { type MutatorMap, pushAccessor, toDefineObject } from \"./define-map.ts\";\nimport { types as t } from \"@babel/core\";\n\nexport default declare(api => {\n api.assertVersion(REQUIRED_VERSION(7));\n\n return {\n name: \"transform-property-mutators\",\n\n visitor: {\n ObjectExpression(path) {\n const { node } = path;\n let mutatorMap: MutatorMap | undefined;\n const newProperties = node.properties.filter(function (prop) {\n if (\n t.isObjectMethod(prop) &&\n !prop.computed &&\n (prop.kind === \"get\" || prop.kind === \"set\")\n ) {\n pushAccessor(\n (mutatorMap ??= {}),\n prop as t.ObjectMethod & { kind: \"get\" | \"set\"; computed: false },\n );\n return false;\n }\n return true;\n });\n\n if (mutatorMap === undefined) {\n return;\n }\n\n node.properties = newProperties;\n\n path.replaceWith(\n t.callExpression(\n t.memberExpression(\n t.identifier(\"Object\"),\n t.identifier(\"defineProperties\"),\n ),\n [node, toDefineObject(mutatorMap)],\n ),\n );\n },\n },\n };\n});\n","import { declare } from \"@babel/helper-plugin-utils\";\nimport { types as t, type File } from \"@babel/core\";\n\nexport default declare(api => {\n api.assertVersion(REQUIRED_VERSION(7));\n\n function isProtoKey(node: t.ObjectExpression[\"properties\"][number]) {\n return (\n !t.isSpreadElement(node) &&\n t.isStringLiteral(t.toComputedKey(node, node.key), {\n value: \"__proto__\",\n })\n );\n }\n\n function isProtoAssignmentExpression(\n node: t.Node,\n ): node is t.MemberExpression {\n const left = node;\n return (\n t.isMemberExpression(left) &&\n t.isStringLiteral(t.toComputedKey(left, left.property), {\n value: \"__proto__\",\n })\n );\n }\n\n function buildDefaultsCallExpression(\n expr: t.AssignmentExpression,\n ref: t.MemberExpression[\"object\"],\n file: File,\n ) {\n return t.expressionStatement(\n t.callExpression(file.addHelper(\"defaults\"), [\n // @ts-ignore(Babel 7 vs Babel 8) Fixme: support `super.__proto__ = ...`\n ref,\n expr.right,\n ]),\n );\n }\n\n return {\n name: \"transform-proto-to-assign\",\n\n visitor: {\n AssignmentExpression(path, { file }) {\n if (!isProtoAssignmentExpression(path.node.left)) return;\n\n const nodes = [];\n const left = path.node.left.object;\n const temp = path.scope.maybeGenerateMemoised(left);\n\n if (temp) {\n nodes.push(\n t.expressionStatement(\n t.assignmentExpression(\n \"=\",\n temp,\n // left must not be Super when `temp` is an identifier\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion\n left as t.Expression,\n ),\n ),\n );\n }\n nodes.push(\n buildDefaultsCallExpression(\n path.node,\n t.cloneNode(temp || left),\n file,\n ),\n );\n if (temp) nodes.push(t.cloneNode(temp));\n\n path.replaceWithMultiple(nodes);\n },\n\n ExpressionStatement(path, { file }) {\n const expr = path.node.expression;\n if (!t.isAssignmentExpression(expr, { operator: \"=\" })) return;\n\n if (isProtoAssignmentExpression(expr.left)) {\n path.replaceWith(\n buildDefaultsCallExpression(expr, expr.left.object, file),\n );\n }\n },\n\n ObjectExpression(path, { file }) {\n let proto;\n const { node } = path;\n const { properties } = node;\n\n for (let i = 0; i < properties.length; i++) {\n const prop = properties[i];\n if (isProtoKey(prop)) {\n // @ts-expect-error Fixme: we should also handle ObjectMethod with __proto__ key\n proto = prop.value;\n properties.splice(i, 1);\n break;\n }\n }\n\n if (proto) {\n const args = [t.objectExpression([]), proto];\n if (node.properties.length) args.push(node);\n path.replaceWith(t.callExpression(file.addHelper(\"extends\"), args));\n }\n },\n },\n };\n});\n","import { declare } from \"@babel/helper-plugin-utils\";\nimport { types as t, template } from \"@babel/core\";\nimport type { Visitor, Scope, NodePath } from \"@babel/core\";\n\nexport interface Options {\n allowMutablePropsOnTags?: null | string[];\n}\n\ninterface VisitorState {\n isImmutable: boolean;\n mutablePropsAllowed: boolean;\n jsxScope: Scope;\n targetScope: Scope;\n}\nexport default declare((api, options: Options) => {\n api.assertVersion(REQUIRED_VERSION(7));\n\n const { allowMutablePropsOnTags } = options;\n\n if (\n allowMutablePropsOnTags != null &&\n !Array.isArray(allowMutablePropsOnTags)\n ) {\n throw new Error(\n \".allowMutablePropsOnTags must be an array, null, or undefined.\",\n );\n }\n\n // Element -> Target scope\n const HOISTED = new WeakMap();\n\n function declares(node: t.Identifier | t.JSXIdentifier, scope: Scope) {\n if (\n t.isJSXIdentifier(node, { name: \"this\" }) ||\n t.isJSXIdentifier(node, { name: \"arguments\" }) ||\n t.isJSXIdentifier(node, { name: \"super\" }) ||\n t.isJSXIdentifier(node, { name: \"new\" })\n ) {\n const { path } = scope;\n return path.isFunctionParent() && !path.isArrowFunctionExpression();\n }\n\n return scope.hasOwnBinding(node.name);\n }\n\n function isHoistingScope({ path }: Scope) {\n return path.isFunctionParent() || path.isLoop() || path.isProgram();\n }\n\n function getHoistingScope(scope: Scope) {\n while (!isHoistingScope(scope)) scope = scope.parent;\n return scope;\n }\n\n const targetScopeVisitor: Visitor = {\n ReferencedIdentifier(path, state) {\n const { node } = path;\n let { scope } = path;\n\n while (scope !== state.jsxScope) {\n // If a binding is declared in an inner function, it doesn't affect hoisting.\n if (declares(node, scope)) return;\n\n scope = scope.parent;\n }\n\n while (scope) {\n // We cannot hoist outside of the previous hoisting target\n // scope, so we return early and we don't update it.\n if (scope === state.targetScope) return;\n\n // If the scope declares this identifier (or we're at the function\n // providing the lexical env binding), we can't hoist the var any\n // higher.\n if (declares(node, scope)) break;\n\n scope = scope.parent;\n }\n\n state.targetScope = getHoistingScope(scope);\n },\n };\n\n const immutabilityVisitor: Visitor = {\n enter(path, state) {\n const stop = () => {\n state.isImmutable = false;\n path.stop();\n };\n\n const skip = () => {\n path.skip();\n };\n\n if (path.isJSXClosingElement()) {\n skip();\n return;\n }\n\n // Elements with refs are not safe to hoist.\n if (\n path.isJSXIdentifier({ name: \"ref\" }) &&\n path.parentPath.isJSXAttribute({ name: path.node })\n ) {\n stop();\n return;\n }\n\n // Ignore JSX expressions and immutable values.\n if (\n path.isJSXIdentifier() ||\n path.isJSXMemberExpression() ||\n path.isJSXNamespacedName() ||\n path.isImmutable()\n ) {\n return;\n }\n\n // Ignore constant bindings.\n if (path.isIdentifier()) {\n const binding = path.scope.getBinding(path.node.name);\n if (binding?.constant) return;\n }\n\n // If we allow mutable props, tags with function expressions can be\n // safely hoisted.\n const { mutablePropsAllowed } = state;\n if (mutablePropsAllowed && path.isFunction()) {\n path.traverse(targetScopeVisitor, state);\n skip();\n return;\n }\n\n if (!path.isPure()) {\n stop();\n return;\n }\n\n // If it's not immutable, it may still be a pure expression, such as string concatenation.\n // It is still safe to hoist that, so long as its result is immutable.\n // If not, it is not safe to replace as mutable values (like objects) could be mutated after render.\n // https://github.com/facebook/react/issues/3226\n const expressionResult = path.evaluate();\n if (expressionResult.confident) {\n // We know the result; check its mutability.\n const { value } = expressionResult;\n if (\n mutablePropsAllowed ||\n value === null ||\n (typeof value !== \"object\" && typeof value !== \"function\")\n ) {\n // It evaluated to an immutable value, so we can hoist it.\n skip();\n return;\n }\n } else if (expressionResult.deopt?.isIdentifier()) {\n // It's safe to hoist here if the deopt reason is an identifier (e.g. func param).\n // The hoister will take care of how high up it can be hoisted.\n return;\n }\n\n stop();\n },\n };\n\n // We cannot use traverse.visitors.merge because it doesn't support\n // immutabilityVisitor's bare `enter` visitor.\n // It's safe to just use ... because the two visitors don't share any key.\n const hoistingVisitor = { ...immutabilityVisitor, ...targetScopeVisitor };\n\n return {\n name: \"transform-react-constant-elements\",\n\n visitor: {\n \"JSXElement|JSXFragment\"(path: NodePath) {\n if (HOISTED.has(path.node)) return;\n let mutablePropsAllowed = false;\n let name: t.JSXOpeningElement[\"name\"] | t.JSXFragment;\n if (path.isJSXElement()) {\n name = path.node.openingElement.name;\n\n // This transform takes the option `allowMutablePropsOnTags`, which is an array\n // of JSX tags to allow mutable props (such as objects, functions) on. Use sparingly\n // and only on tags you know will never modify their own props.\n if (allowMutablePropsOnTags != null) {\n // Get the element's name. If it's a member expression, we use the last part of the path.\n // So the option [\"FormattedMessage\"] would match \"Intl.FormattedMessage\".\n let lastSegment = name;\n while (t.isJSXMemberExpression(lastSegment)) {\n lastSegment = lastSegment.property;\n }\n\n const elementName = lastSegment.name;\n // @ts-expect-error Fixme: allowMutablePropsOnTags should handle JSXNamespacedName\n mutablePropsAllowed = allowMutablePropsOnTags.includes(elementName);\n }\n } else {\n name = path.node;\n }\n\n // In order to avoid hoisting unnecessarily, we need to know which is\n // the scope containing the current JSX element. If a parent of the\n // current element has already been hoisted, we can consider its target\n // scope as the base scope for the current element.\n let jsxScope;\n let current: NodePath = path;\n while (!jsxScope && current.parentPath.isJSX()) {\n current = current.parentPath;\n jsxScope = HOISTED.get(current.node);\n }\n jsxScope ??= path.scope;\n // The initial HOISTED is set to jsxScope, s.t.\n // if the element's JSX ancestor has been hoisted, it will be skipped\n HOISTED.set(path.node, jsxScope);\n\n const visitorState: VisitorState = {\n isImmutable: true,\n mutablePropsAllowed,\n jsxScope,\n targetScope: path.scope.getProgramParent(),\n };\n path.traverse(hoistingVisitor, visitorState);\n if (!visitorState.isImmutable) return;\n\n const { targetScope } = visitorState;\n // Only hoist if it would give us an advantage.\n for (let currentScope = jsxScope; ; ) {\n if (targetScope === currentScope) return;\n if (isHoistingScope(currentScope)) break;\n\n currentScope = currentScope.parent;\n if (!currentScope) {\n throw new Error(\n \"Internal @babel/plugin-transform-react-constant-elements error: \" +\n \"targetScope must be an ancestor of jsxScope. \" +\n \"This is a Babel bug, please report it.\",\n );\n }\n }\n\n const id = path.scope.generateUidBasedOnNode(name);\n targetScope.push({ id: t.identifier(id) });\n // If the element is to be hoisted, update HOISTED to be the target scope\n HOISTED.set(path.node, targetScope);\n\n let replacement: t.Expression | t.JSXExpressionContainer = template\n .expression.ast`\n ${t.identifier(id)} || (${t.identifier(id)} = ${path.node})\n `;\n if (\n path.parentPath.isJSXElement() ||\n path.parentPath.isJSXAttribute() ||\n path.parentPath.isJSXFragment()\n ) {\n replacement = t.jsxExpressionContainer(replacement);\n }\n\n path.replaceWith(replacement);\n },\n },\n };\n});\n","import { declare } from \"@babel/helper-plugin-utils\";\nimport path from \"path\";\nimport { types as t } from \"@babel/core\";\n\ntype ReactCreateClassCall = t.CallExpression & {\n arguments: [t.ObjectExpression];\n};\n\nexport default declare(api => {\n api.assertVersion(REQUIRED_VERSION(7));\n\n function addDisplayName(id: string, call: ReactCreateClassCall) {\n const props = call.arguments[0].properties;\n let safe = true;\n\n for (let i = 0; i < props.length; i++) {\n const prop = props[i];\n if (t.isSpreadElement(prop)) {\n continue;\n }\n const key = t.toComputedKey(prop);\n if (t.isStringLiteral(key, { value: \"displayName\" })) {\n safe = false;\n break;\n }\n }\n\n if (safe) {\n props.unshift(\n t.objectProperty(t.identifier(\"displayName\"), t.stringLiteral(id)),\n );\n }\n }\n\n const isCreateClassCallExpression =\n t.buildMatchMemberExpression(\"React.createClass\");\n const isCreateClassAddon = (callee: t.CallExpression[\"callee\"]) =>\n t.isIdentifier(callee, { name: \"createReactClass\" });\n\n function isCreateClass(node?: t.Node): node is ReactCreateClassCall {\n if (!node || !t.isCallExpression(node)) return false;\n\n // not createReactClass nor React.createClass call member object\n if (\n !isCreateClassCallExpression(node.callee) &&\n !isCreateClassAddon(node.callee)\n ) {\n return false;\n }\n\n // no call arguments\n const args = node.arguments;\n if (args.length !== 1) return false;\n\n // first node arg is not an object\n const first = args[0];\n if (!t.isObjectExpression(first)) return false;\n\n return true;\n }\n\n return {\n name: \"transform-react-display-name\",\n\n visitor: {\n ExportDefaultDeclaration({ node }, state) {\n if (isCreateClass(node.declaration)) {\n const filename = state.filename || \"unknown\";\n\n let displayName = path.basename(filename, path.extname(filename));\n\n // ./{module name}/index.js\n if (displayName === \"index\") {\n displayName = path.basename(path.dirname(filename));\n }\n\n addDisplayName(displayName, node.declaration);\n }\n },\n\n CallExpression(path) {\n const { node } = path;\n if (!isCreateClass(node)) return;\n\n let id: t.LVal | t.Expression | t.PrivateName | null;\n\n // crawl up the ancestry looking for possible candidates for displayName inference\n path.find(function (path) {\n if (path.isAssignmentExpression()) {\n id = path.node.left;\n } else if (path.isObjectProperty()) {\n id = path.node.key;\n } else if (path.isVariableDeclarator()) {\n id = path.node.id;\n } else if (path.isStatement()) {\n // we've hit a statement, we should stop crawling up\n return true;\n }\n\n // we've got an id! no need to continue\n if (id) return true;\n });\n\n // ensure that we have an identifier we can inherit from\n if (!id) return;\n\n // foo.bar -> bar\n if (t.isMemberExpression(id)) {\n id = id.property;\n }\n\n // identifiers are the only thing we can reliably get a name from\n if (t.isIdentifier(id)) {\n addDisplayName(id.name, node);\n }\n },\n },\n };\n});\n","import {\n booleanLiteral,\n callExpression,\n identifier,\n inherits,\n isIdentifier,\n isJSXExpressionContainer,\n isJSXIdentifier,\n isJSXMemberExpression,\n isJSXNamespacedName,\n isJSXSpreadAttribute,\n isObjectExpression,\n isReferenced,\n isStringLiteral,\n isValidIdentifier,\n memberExpression,\n nullLiteral,\n objectExpression,\n objectProperty,\n react,\n spreadElement,\n stringLiteral,\n thisExpression,\n} from \"@babel/types\";\nimport annotateAsPure from \"@babel/helper-annotate-as-pure\";\nimport type { PluginPass, NodePath, Visitor, types as t } from \"@babel/core\";\n\ntype ElementState = {\n tagExpr: t.Expression; // tag node,\n tagName: string | undefined | null; // raw string tag name,\n args: Array; // array of call arguments,\n call?: any; // optional call property that can be set to override the call expression returned,\n pure: boolean; // true if the element can be marked with a #__PURE__ annotation\n callee?: any;\n};\n\nexport interface Options {\n filter?: (node: t.Node, pass: PluginPass) => boolean;\n pre?: (state: ElementState, pass: PluginPass) => void;\n post?: (state: ElementState, pass: PluginPass) => void;\n compat?: boolean;\n pure?: string;\n throwIfNamespace?: boolean;\n useSpread?: boolean;\n useBuiltIns?: boolean;\n}\n\nexport default function (opts: Options) {\n const visitor: Visitor> = {};\n\n visitor.JSXNamespacedName = function (path) {\n if (opts.throwIfNamespace) {\n throw path.buildCodeFrameError(\n `Namespace tags are not supported by default. React's JSX doesn't support namespace tags. \\\nYou can set \\`throwIfNamespace: false\\` to bypass this warning.`,\n );\n }\n };\n\n visitor.JSXSpreadChild = function (path) {\n throw path.buildCodeFrameError(\n \"Spread children are not supported in React.\",\n );\n };\n\n visitor.JSXElement = {\n exit(path, state) {\n const callExpr = buildElementCall(path, state);\n if (callExpr) {\n path.replaceWith(inherits(callExpr, path.node));\n }\n },\n };\n\n visitor.JSXFragment = {\n exit(path, state) {\n if (opts.compat) {\n throw path.buildCodeFrameError(\n \"Fragment tags are only supported in React 16 and up.\",\n );\n }\n const callExpr = buildFragmentCall(path, state);\n if (callExpr) {\n path.replaceWith(inherits(callExpr, path.node));\n }\n },\n };\n\n return visitor;\n\n function convertJSXIdentifier(\n node: t.JSXIdentifier | t.JSXMemberExpression | t.JSXNamespacedName,\n parent: t.JSXOpeningElement | t.JSXMemberExpression,\n ): t.ThisExpression | t.StringLiteral | t.MemberExpression | t.Identifier {\n if (isJSXIdentifier(node)) {\n if (node.name === \"this\" && isReferenced(node, parent)) {\n return thisExpression();\n } else if (isValidIdentifier(node.name, false)) {\n // @ts-expect-error casting JSXIdentifier to Identifier\n node.type = \"Identifier\";\n return node as unknown as t.Identifier;\n } else {\n return stringLiteral(node.name);\n }\n } else if (isJSXMemberExpression(node)) {\n return memberExpression(\n convertJSXIdentifier(node.object, node),\n convertJSXIdentifier(node.property, node),\n );\n } else if (isJSXNamespacedName(node)) {\n /**\n * If there is flag \"throwIfNamespace\"\n * print XMLNamespace like string literal\n */\n return stringLiteral(`${node.namespace.name}:${node.name.name}`);\n }\n\n return node;\n }\n\n function convertAttributeValue(\n node: t.JSXAttribute[\"value\"] | t.BooleanLiteral,\n ) {\n if (isJSXExpressionContainer(node)) {\n return node.expression;\n } else {\n return node;\n }\n }\n\n function convertAttribute(node: t.JSXAttribute | t.JSXSpreadAttribute) {\n if (isJSXSpreadAttribute(node)) {\n return spreadElement(node.argument);\n }\n const value = convertAttributeValue(node.value || booleanLiteral(true));\n\n if (isStringLiteral(value) && !isJSXExpressionContainer(node.value)) {\n value.value = value.value.replace(/\\n\\s+/g, \" \");\n\n // \"raw\" JSXText should not be used from a StringLiteral because it needs to be escaped.\n delete value.extra?.raw;\n }\n\n if (isJSXNamespacedName(node.name)) {\n // @ts-expect-error Mutating AST nodes\n node.name = stringLiteral(\n node.name.namespace.name + \":\" + node.name.name.name,\n );\n } else if (isValidIdentifier(node.name.name, false)) {\n // @ts-expect-error Mutating AST nodes\n node.name.type = \"Identifier\";\n } else {\n // @ts-expect-error Mutating AST nodes\n node.name = stringLiteral(node.name.name);\n }\n\n return inherits(\n objectProperty(\n // @ts-expect-error Mutating AST nodes\n node.name,\n value,\n ),\n node,\n );\n }\n\n function buildElementCall(path: NodePath, pass: PluginPass) {\n if (opts.filter && !opts.filter(path.node, pass)) return;\n\n const openingPath = path.get(\"openingElement\");\n // @ts-expect-error mutating AST nodes\n path.node.children = react.buildChildren(path.node);\n\n const tagExpr = convertJSXIdentifier(\n openingPath.node.name,\n openingPath.node,\n );\n const args: (t.Expression | t.JSXElement | t.JSXFragment)[] = [];\n\n let tagName: string;\n if (isIdentifier(tagExpr)) {\n tagName = tagExpr.name;\n } else if (isStringLiteral(tagExpr)) {\n tagName = tagExpr.value;\n }\n\n const state: ElementState = {\n tagExpr: tagExpr,\n tagName: tagName,\n args: args,\n pure: false,\n };\n\n if (opts.pre) {\n opts.pre(state, pass);\n }\n\n const attribs = openingPath.node.attributes;\n let convertedAttributes: t.Expression;\n if (attribs.length) {\n if (process.env.BABEL_8_BREAKING) {\n convertedAttributes = objectExpression(attribs.map(convertAttribute));\n } else {\n convertedAttributes = buildOpeningElementAttributes(attribs, pass);\n }\n } else {\n convertedAttributes = nullLiteral();\n }\n\n args.push(\n convertedAttributes,\n // @ts-expect-error JSXExpressionContainer has been transformed by convertAttributeValue\n ...path.node.children,\n );\n\n if (opts.post) {\n opts.post(state, pass);\n }\n\n const call = state.call || callExpression(state.callee, args);\n if (state.pure) annotateAsPure(call);\n\n return call;\n }\n\n function pushProps(\n _props: (t.ObjectProperty | t.SpreadElement)[],\n objs: t.Expression[],\n ) {\n if (!_props.length) return _props;\n\n objs.push(objectExpression(_props));\n return [];\n }\n\n /**\n * The logic for this is quite terse. It's because we need to\n * support spread elements. We loop over all attributes,\n * breaking on spreads, we then push a new object containing\n * all prior attributes to an array for later processing.\n */\n\n function buildOpeningElementAttributes(\n attribs: (t.JSXAttribute | t.JSXSpreadAttribute)[],\n pass: PluginPass,\n ): t.Expression {\n let _props: (t.ObjectProperty | t.SpreadElement)[] = [];\n const objs: t.Expression[] = [];\n\n const { useSpread = false } = pass.opts;\n if (typeof useSpread !== \"boolean\") {\n throw new Error(\n \"transform-react-jsx currently only accepts a boolean option for \" +\n \"useSpread (defaults to false)\",\n );\n }\n\n const useBuiltIns = pass.opts.useBuiltIns || false;\n if (typeof useBuiltIns !== \"boolean\") {\n throw new Error(\n \"transform-react-jsx currently only accepts a boolean option for \" +\n \"useBuiltIns (defaults to false)\",\n );\n }\n\n if (useSpread && useBuiltIns) {\n throw new Error(\n \"transform-react-jsx currently only accepts useBuiltIns or useSpread \" +\n \"but not both\",\n );\n }\n\n if (useSpread) {\n const props = attribs.map(convertAttribute);\n return objectExpression(props);\n }\n\n while (attribs.length) {\n const prop = attribs.shift();\n if (isJSXSpreadAttribute(prop)) {\n _props = pushProps(_props, objs);\n objs.push(prop.argument);\n } else {\n _props.push(convertAttribute(prop));\n }\n }\n\n pushProps(_props, objs);\n let convertedAttribs: t.Expression;\n\n if (objs.length === 1) {\n // only one object\n convertedAttribs = objs[0];\n } else {\n // looks like we have multiple objects\n if (!isObjectExpression(objs[0])) {\n objs.unshift(objectExpression([]));\n }\n\n const helper = useBuiltIns\n ? memberExpression(identifier(\"Object\"), identifier(\"assign\"))\n : pass.addHelper(\"extends\");\n\n // spread it\n convertedAttribs = callExpression(helper, objs);\n }\n\n return convertedAttribs;\n }\n\n function buildFragmentCall(path: NodePath, pass: PluginPass) {\n if (opts.filter && !opts.filter(path.node, pass)) return;\n\n // @ts-expect-error mutating AST nodes\n path.node.children = react.buildChildren(path.node);\n\n const args: t.Expression[] = [];\n const tagName: null = null;\n const tagExpr = pass.get(\"jsxFragIdentifier\")();\n\n const state: ElementState = {\n tagExpr: tagExpr,\n tagName: tagName,\n args: args,\n pure: false,\n };\n\n if (opts.pre) {\n opts.pre(state, pass);\n }\n\n // no attributes are allowed with <> syntax\n args.push(\n nullLiteral(),\n // @ts-expect-error JSXExpressionContainer has been transformed by convertAttributeValue\n ...path.node.children,\n );\n\n if (opts.post) {\n opts.post(state, pass);\n }\n\n pass.set(\"usedFragment\", true);\n\n const call = state.call || callExpression(state.callee, args);\n if (state.pure) annotateAsPure(call);\n\n return call;\n }\n}\n","import { declare } from \"@babel/helper-plugin-utils\";\nimport helper from \"@babel/helper-builder-react-jsx\";\nimport { types as t } from \"@babel/core\";\n\nexport default declare(api => {\n api.assertVersion(REQUIRED_VERSION(7));\n\n function hasRefOrSpread(attrs: t.JSXOpeningElement[\"attributes\"]) {\n for (let i = 0; i < attrs.length; i++) {\n const attr = attrs[i];\n if (t.isJSXSpreadAttribute(attr)) return true;\n if (isJSXAttributeOfName(attr, \"ref\")) return true;\n }\n return false;\n }\n\n function isJSXAttributeOfName(attr: t.JSXAttribute, name: string) {\n return (\n t.isJSXAttribute(attr) && t.isJSXIdentifier(attr.name, { name: name })\n );\n }\n\n const visitor = helper({\n filter(node) {\n return (\n node.type === \"JSXElement\" &&\n !hasRefOrSpread(node.openingElement.attributes)\n );\n },\n pre(state) {\n const tagName = state.tagName;\n const args = state.args;\n if (t.react.isCompatTag(tagName)) {\n args.push(t.stringLiteral(tagName));\n } else {\n args.push(state.tagExpr);\n }\n },\n post(state, pass) {\n state.callee = pass.addHelper(\"jsx\");\n // NOTE: The arguments passed to the \"jsx\" helper are:\n // (element, props, key, ...children) or (element, props)\n // The argument generated by the helper are:\n // (element, { ...props, key }, ...children)\n\n const props = state.args[1];\n let hasKey = false;\n if (t.isObjectExpression(props)) {\n const keyIndex = props.properties.findIndex(prop =>\n // @ts-expect-error todo(flow->ts) key does not exist on SpreadElement\n t.isIdentifier(prop.key, { name: \"key\" }),\n );\n if (keyIndex > -1) {\n // @ts-expect-error todo(flow->ts) value does not exist on ObjectMethod\n state.args.splice(2, 0, props.properties[keyIndex].value);\n props.properties.splice(keyIndex, 1);\n hasKey = true;\n }\n } else if (t.isNullLiteral(props)) {\n state.args.splice(1, 1, t.objectExpression([]));\n }\n\n if (!hasKey && state.args.length > 2) {\n state.args.splice(2, 0, t.unaryExpression(\"void\", t.numericLiteral(0)));\n }\n\n state.pure = true;\n },\n });\n return {\n name: \"transform-react-inline-elements\",\n visitor,\n };\n});\n","import jsx from \"@babel/plugin-syntax-jsx\";\nimport { declare } from \"@babel/helper-plugin-utils\";\nimport { template, types as t } from \"@babel/core\";\nimport type { PluginPass, NodePath, Scope, Visitor } from \"@babel/core\";\nimport { addNamed, addNamespace, isModule } from \"@babel/helper-module-imports\";\nimport annotateAsPure from \"@babel/helper-annotate-as-pure\";\nimport type {\n CallExpression,\n Class,\n Expression,\n Identifier,\n JSXAttribute,\n JSXElement,\n JSXFragment,\n JSXOpeningElement,\n JSXSpreadAttribute,\n MemberExpression,\n ObjectExpression,\n Program,\n} from \"@babel/types\";\n\nconst DEFAULT = {\n importSource: \"react\",\n runtime: \"automatic\",\n pragma: \"React.createElement\",\n pragmaFrag: \"React.Fragment\",\n};\n\nconst JSX_SOURCE_ANNOTATION_REGEX =\n /^\\s*(?:\\*\\s*)?@jsxImportSource\\s+(\\S+)\\s*$/m;\nconst JSX_RUNTIME_ANNOTATION_REGEX = /^\\s*(?:\\*\\s*)?@jsxRuntime\\s+(\\S+)\\s*$/m;\n\nconst JSX_ANNOTATION_REGEX = /^\\s*(?:\\*\\s*)?@jsx\\s+(\\S+)\\s*$/m;\nconst JSX_FRAG_ANNOTATION_REGEX = /^\\s*(?:\\*\\s*)?@jsxFrag\\s+(\\S+)\\s*$/m;\n\nconst get = (pass: PluginPass, name: string) =>\n pass.get(`@babel/plugin-react-jsx/${name}`);\nconst set = (pass: PluginPass, name: string, v: any) =>\n pass.set(`@babel/plugin-react-jsx/${name}`, v);\n\nfunction hasProto(node: t.ObjectExpression) {\n return node.properties.some(\n value =>\n t.isObjectProperty(value, { computed: false, shorthand: false }) &&\n (t.isIdentifier(value.key, { name: \"__proto__\" }) ||\n t.isStringLiteral(value.key, { value: \"__proto__\" })),\n );\n}\n\nexport interface Options {\n filter?: (node: t.Node, pass: PluginPass) => boolean;\n importSource?: string;\n pragma?: string;\n pragmaFrag?: string;\n pure?: string;\n runtime?: \"automatic\" | \"classic\";\n throwIfNamespace?: boolean;\n useBuiltIns: boolean;\n useSpread?: boolean;\n}\nexport default function createPlugin({\n name,\n development,\n}: {\n name: string;\n development: boolean;\n}) {\n return declare((_, options: Options) => {\n const {\n pure: PURE_ANNOTATION,\n\n throwIfNamespace = true,\n\n filter,\n\n runtime: RUNTIME_DEFAULT = process.env.BABEL_8_BREAKING\n ? \"automatic\"\n : development\n ? \"automatic\"\n : \"classic\",\n\n importSource: IMPORT_SOURCE_DEFAULT = DEFAULT.importSource,\n pragma: PRAGMA_DEFAULT = DEFAULT.pragma,\n pragmaFrag: PRAGMA_FRAG_DEFAULT = DEFAULT.pragmaFrag,\n } = options;\n\n if (process.env.BABEL_8_BREAKING) {\n if (\"useSpread\" in options) {\n throw new Error(\n '@babel/plugin-transform-react-jsx: Since Babel 8, an inline object with spread elements is always used, and the \"useSpread\" option is no longer available. Please remove it from your config.',\n );\n }\n\n if (\"useBuiltIns\" in options) {\n const useBuiltInsFormatted = JSON.stringify(options.useBuiltIns);\n throw new Error(\n `@babel/plugin-transform-react-jsx: Since \"useBuiltIns\" is removed in Babel 8, you can remove it from the config.\n- Babel 8 now transforms JSX spread to object spread. If you need to transpile object spread with\n\\`useBuiltIns: ${useBuiltInsFormatted}\\`, you can use the following config\n{\n \"plugins\": [\n \"@babel/plugin-transform-react-jsx\"\n [\"@babel/plugin-transform-object-rest-spread\", { \"loose\": true, \"useBuiltIns\": ${useBuiltInsFormatted} }]\n ]\n}`,\n );\n }\n\n if (filter != null && RUNTIME_DEFAULT === \"automatic\") {\n throw new Error(\n '@babel/plugin-transform-react-jsx: \"filter\" option can not be used with automatic runtime. If you are upgrading from Babel 7, please specify `runtime: \"classic\"`.',\n );\n }\n } else {\n // eslint-disable-next-line no-var\n var { useSpread = false, useBuiltIns = false } = options;\n\n if (RUNTIME_DEFAULT === \"classic\") {\n if (typeof useSpread !== \"boolean\") {\n throw new Error(\n \"transform-react-jsx currently only accepts a boolean option for \" +\n \"useSpread (defaults to false)\",\n );\n }\n\n if (typeof useBuiltIns !== \"boolean\") {\n throw new Error(\n \"transform-react-jsx currently only accepts a boolean option for \" +\n \"useBuiltIns (defaults to false)\",\n );\n }\n\n if (useSpread && useBuiltIns) {\n throw new Error(\n \"transform-react-jsx currently only accepts useBuiltIns or useSpread \" +\n \"but not both\",\n );\n }\n }\n }\n\n const injectMetaPropertiesVisitor: Visitor = {\n JSXOpeningElement(path, state) {\n const attributes = [];\n if (isThisAllowed(path.scope)) {\n attributes.push(\n t.jsxAttribute(\n t.jsxIdentifier(\"__self\"),\n t.jsxExpressionContainer(t.thisExpression()),\n ),\n );\n }\n attributes.push(\n t.jsxAttribute(\n t.jsxIdentifier(\"__source\"),\n t.jsxExpressionContainer(makeSource(path, state)),\n ),\n );\n path.pushContainer(\"attributes\", attributes);\n },\n };\n\n return {\n name,\n inherits: jsx,\n visitor: {\n JSXNamespacedName(path) {\n if (throwIfNamespace) {\n throw path.buildCodeFrameError(\n `Namespace tags are not supported by default. React's JSX doesn't support namespace tags. \\\nYou can set \\`throwIfNamespace: false\\` to bypass this warning.`,\n );\n }\n },\n\n JSXSpreadChild(path) {\n throw path.buildCodeFrameError(\n \"Spread children are not supported in React.\",\n );\n },\n\n Program: {\n enter(path, state) {\n const { file } = state;\n let runtime: string = RUNTIME_DEFAULT;\n\n let source: string = IMPORT_SOURCE_DEFAULT;\n let pragma: string = PRAGMA_DEFAULT;\n let pragmaFrag: string = PRAGMA_FRAG_DEFAULT;\n\n let sourceSet = !!options.importSource;\n let pragmaSet = !!options.pragma;\n let pragmaFragSet = !!options.pragmaFrag;\n\n if (file.ast.comments) {\n for (const comment of file.ast.comments) {\n const sourceMatches = JSX_SOURCE_ANNOTATION_REGEX.exec(\n comment.value,\n );\n if (sourceMatches) {\n source = sourceMatches[1];\n sourceSet = true;\n }\n\n const runtimeMatches = JSX_RUNTIME_ANNOTATION_REGEX.exec(\n comment.value,\n );\n if (runtimeMatches) {\n runtime = runtimeMatches[1];\n }\n\n const jsxMatches = JSX_ANNOTATION_REGEX.exec(comment.value);\n if (jsxMatches) {\n pragma = jsxMatches[1];\n pragmaSet = true;\n }\n const jsxFragMatches = JSX_FRAG_ANNOTATION_REGEX.exec(\n comment.value,\n );\n if (jsxFragMatches) {\n pragmaFrag = jsxFragMatches[1];\n pragmaFragSet = true;\n }\n }\n }\n\n set(state, \"runtime\", runtime);\n if (runtime === \"classic\") {\n if (sourceSet) {\n throw path.buildCodeFrameError(\n `importSource cannot be set when runtime is classic.`,\n );\n }\n\n const createElement = toMemberExpression(pragma);\n const fragment = toMemberExpression(pragmaFrag);\n\n set(state, \"id/createElement\", () => t.cloneNode(createElement));\n set(state, \"id/fragment\", () => t.cloneNode(fragment));\n\n set(state, \"defaultPure\", pragma === DEFAULT.pragma);\n } else if (runtime === \"automatic\") {\n if (pragmaSet || pragmaFragSet) {\n throw path.buildCodeFrameError(\n `pragma and pragmaFrag cannot be set when runtime is automatic.`,\n );\n }\n\n const define = (name: string, id: string) =>\n set(state, name, createImportLazily(state, path, id, source));\n\n define(\"id/jsx\", development ? \"jsxDEV\" : \"jsx\");\n define(\"id/jsxs\", development ? \"jsxDEV\" : \"jsxs\");\n define(\"id/createElement\", \"createElement\");\n define(\"id/fragment\", \"Fragment\");\n\n set(state, \"defaultPure\", source === DEFAULT.importSource);\n } else {\n throw path.buildCodeFrameError(\n `Runtime must be either \"classic\" or \"automatic\".`,\n );\n }\n\n if (development) {\n path.traverse(injectMetaPropertiesVisitor, state);\n }\n },\n\n // TODO(Babel 8): Decide if this should be removed or brought back.\n // see: https://github.com/babel/babel/pull/12253#discussion_r513086528\n //\n // exit(path, state) {\n // if (\n // get(state, \"runtime\") === \"classic\" &&\n // get(state, \"pragmaSet\") &&\n // get(state, \"usedFragment\") &&\n // !get(state, \"pragmaFragSet\")\n // ) {\n // throw new Error(\n // \"transform-react-jsx: pragma has been set but \" +\n // \"pragmaFrag has not been set\",\n // );\n // }\n // },\n },\n\n JSXFragment: {\n exit(path, file) {\n let callExpr;\n if (get(file, \"runtime\") === \"classic\") {\n callExpr = buildCreateElementFragmentCall(path, file);\n } else {\n callExpr = buildJSXFragmentCall(path, file);\n }\n\n path.replaceWith(t.inherits(callExpr, path.node));\n },\n },\n\n JSXElement: {\n exit(path, file) {\n let callExpr;\n if (\n get(file, \"runtime\") === \"classic\" ||\n shouldUseCreateElement(path)\n ) {\n callExpr = buildCreateElementCall(path, file);\n } else {\n callExpr = buildJSXElementCall(path, file);\n }\n\n path.replaceWith(t.inherits(callExpr, path.node));\n },\n },\n\n JSXAttribute(path) {\n if (t.isJSXElement(path.node.value)) {\n path.node.value = t.jsxExpressionContainer(path.node.value);\n }\n },\n },\n };\n\n // Returns whether the class has specified a superclass.\n function isDerivedClass(classPath: NodePath) {\n return classPath.node.superClass !== null;\n }\n\n // Returns whether `this` is allowed at given scope.\n function isThisAllowed(scope: Scope) {\n // This specifically skips arrow functions as they do not rewrite `this`.\n do {\n const { path } = scope;\n if (path.isFunctionParent() && !path.isArrowFunctionExpression()) {\n if (!path.isMethod()) {\n // If the closest parent is a regular function, `this` will be rebound, therefore it is fine to use `this`.\n return true;\n }\n // Current node is within a method, so we need to check if the method is a constructor.\n if (path.node.kind !== \"constructor\") {\n // We are not in a constructor, therefore it is always fine to use `this`.\n return true;\n }\n // Now we are in a constructor. If it is a derived class, we do not reference `this`.\n return !isDerivedClass(path.parentPath.parentPath as NodePath);\n }\n if (path.isTSModuleBlock()) {\n // If the closest parent is a TS Module block, `this` will not be allowed.\n return false;\n }\n } while ((scope = scope.parent));\n // We are not in a method or function. It is fine to use `this`.\n return true;\n }\n\n function call(\n pass: PluginPass,\n name: string,\n args: CallExpression[\"arguments\"],\n ) {\n const node = t.callExpression(get(pass, `id/${name}`)(), args);\n if (PURE_ANNOTATION ?? get(pass, \"defaultPure\")) annotateAsPure(node);\n return node;\n }\n\n // We want to use React.createElement, even in the case of\n // jsx, for
to distinguish it\n // from
. This is an intermediary\n // step while we deprecate key spread from props. Afterwards,\n // we will stop using createElement in the transform.\n function shouldUseCreateElement(path: NodePath) {\n const openingPath = path.get(\"openingElement\");\n const attributes = openingPath.node.attributes;\n\n let seenPropsSpread = false;\n for (let i = 0; i < attributes.length; i++) {\n const attr = attributes[i];\n if (\n seenPropsSpread &&\n t.isJSXAttribute(attr) &&\n attr.name.name === \"key\"\n ) {\n return true;\n } else if (t.isJSXSpreadAttribute(attr)) {\n seenPropsSpread = true;\n }\n }\n return false;\n }\n\n function convertJSXIdentifier(\n node: t.JSXIdentifier | t.JSXMemberExpression | t.JSXNamespacedName,\n parent: t.JSXOpeningElement | t.JSXMemberExpression,\n ): t.ThisExpression | t.StringLiteral | t.MemberExpression | t.Identifier {\n if (t.isJSXIdentifier(node)) {\n if (node.name === \"this\" && t.isReferenced(node, parent)) {\n return t.thisExpression();\n } else if (t.isValidIdentifier(node.name, false)) {\n // @ts-expect-error cast AST type to Identifier\n node.type = \"Identifier\";\n return node as unknown as t.Identifier;\n } else {\n return t.stringLiteral(node.name);\n }\n } else if (t.isJSXMemberExpression(node)) {\n return t.memberExpression(\n convertJSXIdentifier(node.object, node),\n convertJSXIdentifier(node.property, node),\n );\n } else if (t.isJSXNamespacedName(node)) {\n /**\n * If the flag \"throwIfNamespace\" is false\n * print XMLNamespace like string literal\n */\n return t.stringLiteral(`${node.namespace.name}:${node.name.name}`);\n }\n\n // todo: this branch should be unreachable\n return node;\n }\n\n function convertAttributeValue(\n node: t.JSXAttribute[\"value\"] | t.BooleanLiteral,\n ) {\n if (t.isJSXExpressionContainer(node)) {\n return node.expression;\n } else {\n return node;\n }\n }\n\n function accumulateAttribute(\n array: ObjectExpression[\"properties\"],\n attribute: NodePath,\n ) {\n if (t.isJSXSpreadAttribute(attribute.node)) {\n const arg = attribute.node.argument;\n // Collect properties into props array if spreading object expression\n if (t.isObjectExpression(arg) && !hasProto(arg)) {\n array.push(...arg.properties);\n } else {\n array.push(t.spreadElement(arg));\n }\n return array;\n }\n\n const value = convertAttributeValue(\n attribute.node.name.name !== \"key\"\n ? attribute.node.value || t.booleanLiteral(true)\n : attribute.node.value,\n );\n\n if (attribute.node.name.name === \"key\" && value === null) {\n throw attribute.buildCodeFrameError(\n 'Please provide an explicit key value. Using \"key\" as a shorthand for \"key={true}\" is not allowed.',\n );\n }\n\n if (\n t.isStringLiteral(value) &&\n !t.isJSXExpressionContainer(attribute.node.value)\n ) {\n value.value = value.value.replace(/\\n\\s+/g, \" \");\n\n // \"raw\" JSXText should not be used from a StringLiteral because it needs to be escaped.\n delete value.extra?.raw;\n }\n\n if (t.isJSXNamespacedName(attribute.node.name)) {\n // @ts-expect-error mutating AST\n attribute.node.name = t.stringLiteral(\n attribute.node.name.namespace.name +\n \":\" +\n attribute.node.name.name.name,\n );\n } else if (t.isValidIdentifier(attribute.node.name.name, false)) {\n // @ts-expect-error mutating AST\n attribute.node.name.type = \"Identifier\";\n } else {\n // @ts-expect-error mutating AST\n attribute.node.name = t.stringLiteral(attribute.node.name.name);\n }\n\n array.push(\n t.inherits(\n t.objectProperty(\n // @ts-expect-error The attribute.node.name is an Identifier now\n attribute.node.name,\n value,\n ),\n attribute.node,\n ),\n );\n return array;\n }\n\n function buildChildrenProperty(children: Expression[]) {\n let childrenNode;\n if (children.length === 1) {\n childrenNode = children[0];\n } else if (children.length > 1) {\n childrenNode = t.arrayExpression(children);\n } else {\n return undefined;\n }\n\n return t.objectProperty(t.identifier(\"children\"), childrenNode);\n }\n\n // Builds JSX into:\n // Production: React.jsx(type, arguments, key)\n // Development: React.jsxDEV(type, arguments, key, isStaticChildren, source, self)\n function buildJSXElementCall(path: NodePath, file: PluginPass) {\n const openingPath = path.get(\"openingElement\");\n const args: t.Expression[] = [getTag(openingPath)];\n\n const attribsArray = [];\n const extracted = Object.create(null);\n\n // for React.jsx, key, __source (dev), and __self (dev) is passed in as\n // a separate argument rather than in the args object. We go through the\n // props and filter out these three keywords so we can pass them in\n // as separate arguments later\n for (const attr of openingPath.get(\"attributes\")) {\n if (attr.isJSXAttribute() && t.isJSXIdentifier(attr.node.name)) {\n const { name } = attr.node.name;\n switch (name) {\n case \"__source\":\n case \"__self\":\n if (extracted[name]) throw sourceSelfError(path, name);\n /* falls through */\n case \"key\": {\n const keyValue = convertAttributeValue(attr.node.value);\n if (keyValue === null) {\n throw attr.buildCodeFrameError(\n 'Please provide an explicit key value. Using \"key\" as a shorthand for \"key={true}\" is not allowed.',\n );\n }\n\n extracted[name] = keyValue;\n break;\n }\n default:\n attribsArray.push(attr);\n }\n } else {\n attribsArray.push(attr);\n }\n }\n\n const children = t.react.buildChildren(path.node);\n\n let attribs: t.ObjectExpression;\n\n if (attribsArray.length || children.length) {\n attribs = buildJSXOpeningElementAttributes(\n attribsArray,\n //@ts-expect-error The children here contains JSXSpreadChild,\n // which will be thrown later\n children,\n );\n } else {\n // attributes should never be null\n attribs = t.objectExpression([]);\n }\n\n args.push(attribs);\n\n if (development) {\n // isStaticChildren, __source, and __self are only used in development\n // automatically include __source and __self in this plugin\n // so we can eliminate the need for separate Babel plugins in Babel 8\n args.push(\n extracted.key ?? path.scope.buildUndefinedNode(),\n t.booleanLiteral(children.length > 1),\n );\n if (extracted.__source) {\n args.push(extracted.__source);\n if (extracted.__self) args.push(extracted.__self);\n } else if (extracted.__self) {\n args.push(path.scope.buildUndefinedNode(), extracted.__self);\n }\n } else if (extracted.key !== undefined) {\n args.push(extracted.key);\n }\n\n return call(file, children.length > 1 ? \"jsxs\" : \"jsx\", args);\n }\n\n // Builds props for React.jsx. This function adds children into the props\n // and ensures that props is always an object\n function buildJSXOpeningElementAttributes(\n attribs: NodePath[],\n children: Expression[],\n ) {\n const props = attribs.reduce(accumulateAttribute, []);\n\n // In React.jsx, children is no longer a separate argument, but passed in\n // through the argument object\n if (children?.length > 0) {\n props.push(buildChildrenProperty(children));\n }\n\n return t.objectExpression(props);\n }\n\n // Builds JSX Fragment <> into\n // Production: React.jsx(type, arguments)\n // Development: React.jsxDEV(type, { children })\n function buildJSXFragmentCall(\n path: NodePath,\n file: PluginPass,\n ) {\n const args = [get(file, \"id/fragment\")()];\n\n const children = t.react.buildChildren(path.node);\n\n args.push(\n t.objectExpression(\n children.length > 0\n ? [\n buildChildrenProperty(\n //@ts-expect-error The children here contains JSXSpreadChild,\n // which will be thrown later\n children,\n ),\n ]\n : [],\n ),\n );\n\n if (development) {\n args.push(\n path.scope.buildUndefinedNode(),\n t.booleanLiteral(children.length > 1),\n );\n }\n\n return call(file, children.length > 1 ? \"jsxs\" : \"jsx\", args);\n }\n\n // Builds JSX Fragment <> into\n // React.createElement(React.Fragment, null, ...children)\n function buildCreateElementFragmentCall(\n path: NodePath,\n file: PluginPass,\n ) {\n if (filter && !filter(path.node, file)) return;\n\n return call(file, \"createElement\", [\n get(file, \"id/fragment\")(),\n t.nullLiteral(),\n ...t.react.buildChildren(path.node),\n ]);\n }\n\n // Builds JSX into:\n // Production: React.createElement(type, arguments, children)\n // Development: React.createElement(type, arguments, children, source, self)\n function buildCreateElementCall(\n path: NodePath,\n file: PluginPass,\n ) {\n const openingPath = path.get(\"openingElement\");\n\n return call(file, \"createElement\", [\n getTag(openingPath),\n buildCreateElementOpeningElementAttributes(\n file,\n path,\n openingPath.get(\"attributes\"),\n ),\n // @ts-expect-error JSXSpreadChild has been transformed in convertAttributeValue\n ...t.react.buildChildren(path.node),\n ]);\n }\n\n function getTag(openingPath: NodePath) {\n const tagExpr = convertJSXIdentifier(\n openingPath.node.name,\n openingPath.node,\n );\n\n let tagName: string;\n if (t.isIdentifier(tagExpr)) {\n tagName = tagExpr.name;\n } else if (t.isStringLiteral(tagExpr)) {\n tagName = tagExpr.value;\n }\n\n if (t.react.isCompatTag(tagName)) {\n return t.stringLiteral(tagName);\n } else {\n return tagExpr;\n }\n }\n\n /**\n * The logic for this is quite terse. It's because we need to\n * support spread elements. We loop over all attributes,\n * breaking on spreads, we then push a new object containing\n * all prior attributes to an array for later processing.\n */\n function buildCreateElementOpeningElementAttributes(\n file: PluginPass,\n path: NodePath,\n attribs: NodePath[],\n ) {\n const runtime = get(file, \"runtime\");\n if (!process.env.BABEL_8_BREAKING) {\n if (runtime !== \"automatic\") {\n const objs = [];\n const props = attribs.reduce(accumulateAttribute, []);\n\n if (!useSpread) {\n // Convert syntax to use multiple objects instead of spread\n let start = 0;\n props.forEach((prop, i) => {\n if (t.isSpreadElement(prop)) {\n if (i > start) {\n objs.push(t.objectExpression(props.slice(start, i)));\n }\n objs.push(prop.argument);\n start = i + 1;\n }\n });\n if (props.length > start) {\n objs.push(t.objectExpression(props.slice(start)));\n }\n } else if (props.length) {\n objs.push(t.objectExpression(props));\n }\n\n if (!objs.length) {\n return t.nullLiteral();\n }\n\n if (objs.length === 1) {\n if (\n !(\n t.isSpreadElement(props[0]) &&\n // If an object expression is spread element's argument\n // it is very likely to contain __proto__ and we should stop\n // optimizing spread element\n t.isObjectExpression(props[0].argument)\n )\n ) {\n return objs[0];\n }\n }\n\n // looks like we have multiple objects\n if (!t.isObjectExpression(objs[0])) {\n objs.unshift(t.objectExpression([]));\n }\n\n const helper = useBuiltIns\n ? t.memberExpression(t.identifier(\"Object\"), t.identifier(\"assign\"))\n : file.addHelper(\"extends\");\n\n // spread it\n return t.callExpression(helper, objs);\n }\n }\n\n const props: ObjectExpression[\"properties\"] = [];\n const found = Object.create(null);\n\n for (const attr of attribs) {\n const { node } = attr;\n const name =\n t.isJSXAttribute(node) &&\n t.isJSXIdentifier(node.name) &&\n node.name.name;\n\n if (\n runtime === \"automatic\" &&\n (name === \"__source\" || name === \"__self\")\n ) {\n if (found[name]) throw sourceSelfError(path, name);\n found[name] = true;\n }\n\n accumulateAttribute(props, attr);\n }\n\n return props.length === 1 &&\n t.isSpreadElement(props[0]) &&\n // If an object expression is spread element's argument\n // it is very likely to contain __proto__ and we should stop\n // optimizing spread element\n !t.isObjectExpression(props[0].argument)\n ? props[0].argument\n : props.length > 0\n ? t.objectExpression(props)\n : t.nullLiteral();\n }\n });\n\n function getSource(source: string, importName: string) {\n switch (importName) {\n case \"Fragment\":\n return `${source}/${development ? \"jsx-dev-runtime\" : \"jsx-runtime\"}`;\n case \"jsxDEV\":\n return `${source}/jsx-dev-runtime`;\n case \"jsx\":\n case \"jsxs\":\n return `${source}/jsx-runtime`;\n case \"createElement\":\n return source;\n }\n }\n\n function createImportLazily(\n pass: PluginPass,\n path: NodePath,\n importName: string,\n source: string,\n ): () => Identifier | MemberExpression {\n return () => {\n const actualSource = getSource(source, importName);\n if (isModule(path)) {\n let reference = get(pass, `imports/${importName}`);\n if (reference) return t.cloneNode(reference);\n\n reference = addNamed(path, importName, actualSource, {\n importedInterop: \"uncompiled\",\n importPosition: \"after\",\n });\n set(pass, `imports/${importName}`, reference);\n\n return reference;\n } else {\n let reference = get(pass, `requires/${actualSource}`);\n if (reference) {\n reference = t.cloneNode(reference);\n } else {\n reference = addNamespace(path, actualSource, {\n importedInterop: \"uncompiled\",\n });\n set(pass, `requires/${actualSource}`, reference);\n }\n\n return t.memberExpression(reference, t.identifier(importName));\n }\n };\n }\n}\n\nfunction toMemberExpression(id: string): Identifier | MemberExpression {\n return (\n id\n .split(\".\")\n .map(name => t.identifier(name))\n // @ts-expect-error - The Array#reduce does not have a signature\n // where the type of initial value differs from callback return type\n .reduce((object, property) => t.memberExpression(object, property))\n );\n}\n\nfunction makeSource(path: NodePath, state: PluginPass) {\n const location = path.node.loc;\n if (!location) {\n // the element was generated and doesn't have location information\n return path.scope.buildUndefinedNode();\n }\n\n // @ts-expect-error todo: avoid mutating PluginPass\n if (!state.fileNameIdentifier) {\n const { filename = \"\" } = state;\n\n const fileNameIdentifier = path.scope.generateUidIdentifier(\"_jsxFileName\");\n path.scope.getProgramParent().push({\n id: fileNameIdentifier,\n init: t.stringLiteral(filename),\n });\n // @ts-expect-error todo: avoid mutating PluginPass\n state.fileNameIdentifier = fileNameIdentifier;\n }\n\n return makeTrace(\n t.cloneNode(\n // @ts-expect-error todo: avoid mutating PluginPass\n state.fileNameIdentifier,\n ),\n location.start.line,\n location.start.column,\n );\n}\n\nfunction makeTrace(\n fileNameIdentifier: Identifier,\n lineNumber?: number,\n column0Based?: number,\n) {\n const fileLineLiteral =\n lineNumber != null ? t.numericLiteral(lineNumber) : t.nullLiteral();\n\n const fileColumnLiteral =\n column0Based != null ? t.numericLiteral(column0Based + 1) : t.nullLiteral();\n\n return template.expression.ast`{\n fileName: ${fileNameIdentifier},\n lineNumber: ${fileLineLiteral},\n columnNumber: ${fileColumnLiteral},\n }`;\n}\n\nfunction sourceSelfError(path: NodePath, name: string) {\n const pluginName = `transform-react-jsx-${name.slice(2)}`;\n\n return path.buildCodeFrameError(\n `Duplicate ${name} prop found. You are most likely using the deprecated ${pluginName} Babel plugin. Both __source and __self are automatically set when using the automatic runtime. Please remove transform-react-jsx-source and transform-react-jsx-self from your Babel config.`,\n );\n}\n","/* eslint-disable @babel/development/plugin-name */\n\nimport createPlugin from \"./create-plugin.ts\";\n\nexport default createPlugin({\n name: \"transform-react-jsx\",\n development: false,\n});\n\nexport type { Options } from \"./create-plugin.ts\";\n","import { declare } from \"@babel/helper-plugin-utils\";\nimport helper from \"@babel/helper-builder-react-jsx\";\nimport { types as t } from \"@babel/core\";\n\nexport default declare(api => {\n api.assertVersion(REQUIRED_VERSION(7));\n\n return {\n name: \"transform-react-jsx-compat\",\n\n manipulateOptions(_, parserOpts) {\n parserOpts.plugins.push(\"jsx\");\n },\n\n visitor: helper({\n pre(state) {\n state.callee = state.tagExpr;\n },\n\n post(state) {\n if (t.react.isCompatTag(state.tagName)) {\n state.call = t.callExpression(\n t.memberExpression(\n t.memberExpression(t.identifier(\"React\"), t.identifier(\"DOM\")),\n state.tagExpr,\n t.isLiteral(state.tagExpr),\n ),\n state.args,\n );\n }\n },\n compat: true,\n }),\n };\n});\n","import createPlugin from \"./create-plugin.ts\";\n\nexport default createPlugin({\n name: \"transform-react-jsx/development\",\n development: true,\n});\n","/**\n * This adds a __self={this} JSX attribute to all JSX elements, which React will use\n * to generate some runtime warnings. However, if the JSX element appears within a\n * constructor of a derived class, `__self={this}` will not be inserted in order to\n * prevent runtime errors.\n *\n * == JSX Literals ==\n *\n * \n *\n * becomes:\n *\n * \n */\nimport { declare } from \"@babel/helper-plugin-utils\";\nimport { types as t } from \"@babel/core\";\nimport type { Visitor, NodePath } from \"@babel/core\";\n\nconst TRACE_ID = \"__self\";\n\n/**\n * Finds the closest parent function that provides `this`. Specifically, this looks for\n * the first parent function that isn't an arrow function.\n *\n * Derived from `Scope#getFunctionParent`\n */\nfunction getThisFunctionParent(\n path: NodePath,\n): NodePath> | null {\n let scope = path.scope;\n do {\n const { path } = scope;\n if (path.isFunctionParent() && !path.isArrowFunctionExpression()) {\n return path;\n }\n } while ((scope = scope.parent));\n return null;\n}\n\n/**\n * Returns whether the class has specified a superclass.\n */\nfunction isDerivedClass(classPath: NodePath) {\n return classPath.node.superClass !== null;\n}\n\n/**\n * Returns whether `this` is allowed at given path.\n */\nfunction isThisAllowed(path: NodePath) {\n // This specifically skips arrow functions as they do not rewrite `this`.\n const parentMethodOrFunction = getThisFunctionParent(path);\n if (parentMethodOrFunction === null) {\n // We are not in a method or function. It is fine to use `this`.\n return true;\n }\n if (!parentMethodOrFunction.isMethod()) {\n // If the closest parent is a regular function, `this` will be rebound, therefore it is fine to use `this`.\n return true;\n }\n // Current node is within a method, so we need to check if the method is a constructor.\n if (parentMethodOrFunction.node.kind !== \"constructor\") {\n // We are not in a constructor, therefore it is always fine to use `this`.\n return true;\n }\n // Now we are in a constructor. If it is a derived class, we do not reference `this`.\n return !isDerivedClass(\n parentMethodOrFunction.parentPath.parentPath as NodePath,\n );\n}\n\nexport default declare(api => {\n api.assertVersion(REQUIRED_VERSION(7));\n\n const visitor: Visitor = {\n JSXOpeningElement(path) {\n if (!isThisAllowed(path)) {\n return;\n }\n const node = path.node;\n const id = t.jsxIdentifier(TRACE_ID);\n const trace = t.thisExpression();\n\n node.attributes.push(t.jsxAttribute(id, t.jsxExpressionContainer(trace)));\n },\n };\n\n return {\n name: \"transform-react-jsx-self\",\n visitor: {\n Program(path) {\n path.traverse(visitor);\n },\n },\n };\n});\n","/**\n * This adds {fileName, lineNumber, columnNumber} annotations to JSX tags.\n *\n * NOTE: lineNumber and columnNumber are both 1-based.\n *\n * == JSX Literals ==\n *\n * \n *\n * becomes:\n *\n * var __jsxFileName = 'this/file.js';\n * \n */\nimport { declare } from \"@babel/helper-plugin-utils\";\nimport { types as t, template } from \"@babel/core\";\n\nconst TRACE_ID = \"__source\";\nconst FILE_NAME_VAR = \"_jsxFileName\";\n\nconst createNodeFromNullish = (\n val: T | null,\n fn: (val: T) => N,\n): N | t.NullLiteral => (val == null ? t.nullLiteral() : fn(val));\n\ntype State = {\n fileNameIdentifier: t.Identifier;\n};\nexport default declare(api => {\n api.assertVersion(REQUIRED_VERSION(7));\n\n function makeTrace(\n fileNameIdentifier: t.Identifier,\n { line, column }: { line: number; column: number },\n ) {\n const fileLineLiteral = createNodeFromNullish(line, t.numericLiteral);\n const fileColumnLiteral = createNodeFromNullish(column, c =>\n // c + 1 to make it 1-based instead of 0-based.\n t.numericLiteral(c + 1),\n );\n\n return template.expression.ast`{\n fileName: ${fileNameIdentifier},\n lineNumber: ${fileLineLiteral},\n columnNumber: ${fileColumnLiteral},\n }`;\n }\n\n const isSourceAttr = (attr: t.Node) =>\n t.isJSXAttribute(attr) && attr.name.name === TRACE_ID;\n\n return {\n name: \"transform-react-jsx-source\",\n visitor: {\n JSXOpeningElement(path, state) {\n const { node } = path;\n if (\n // the element was generated and doesn't have location information\n !node.loc ||\n // Already has __source\n path.node.attributes.some(isSourceAttr)\n ) {\n return;\n }\n\n if (!state.fileNameIdentifier) {\n const fileNameId = path.scope.generateUidIdentifier(FILE_NAME_VAR);\n state.fileNameIdentifier = fileNameId;\n\n path.scope.getProgramParent().push({\n id: fileNameId,\n init: t.stringLiteral(state.filename || \"\"),\n });\n }\n\n node.attributes.push(\n t.jsxAttribute(\n t.jsxIdentifier(TRACE_ID),\n t.jsxExpressionContainer(\n makeTrace(t.cloneNode(state.fileNameIdentifier), node.loc.start),\n ),\n ),\n );\n },\n },\n };\n});\n","function _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n \"default\": obj\n };\n}\nmodule.exports = _interopRequireDefault, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","\"use strict\";\n\nexports.__esModule = true;\nexports.getTypes = getTypes;\nexports.isReference = isReference;\nexports.replaceWithOrRemove = replaceWithOrRemove;\nexports.runtimeProperty = runtimeProperty;\nexports.wrapWithTypes = wrapWithTypes;\n/**\n * Copyright (c) 2014-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nvar currentTypes = null;\nfunction wrapWithTypes(types, fn) {\n return function () {\n var oldTypes = currentTypes;\n currentTypes = types;\n try {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n return fn.apply(this, args);\n } finally {\n currentTypes = oldTypes;\n }\n };\n}\nfunction getTypes() {\n return currentTypes;\n}\nfunction runtimeProperty(name) {\n var t = getTypes();\n return t.memberExpression(t.identifier(\"regeneratorRuntime\"), t.identifier(name), false);\n}\nfunction isReference(path) {\n return path.isReferenced() || path.parentPath.isAssignmentExpression({\n left: path.node\n });\n}\nfunction replaceWithOrRemove(path, replacement) {\n if (replacement) {\n path.replaceWith(replacement);\n } else {\n path.remove();\n }\n}","\"use strict\";\n\nvar util = _interopRequireWildcard(require(\"./util\"));\nfunction _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== \"function\") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }\nfunction _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== \"object\" && typeof obj !== \"function\") { return { \"default\": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== \"default\" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj[\"default\"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }\n/**\n * Copyright (c) 2014-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nvar hasOwn = Object.prototype.hasOwnProperty;\n\n// The hoist function takes a FunctionExpression or FunctionDeclaration\n// and replaces any Declaration nodes in its body with assignments, then\n// returns a VariableDeclaration containing just the names of the removed\n// declarations.\nexports.hoist = function (funPath) {\n var t = util.getTypes();\n t.assertFunction(funPath.node);\n var vars = {};\n function varDeclToExpr(_ref, includeIdentifiers) {\n var vdec = _ref.node,\n scope = _ref.scope;\n t.assertVariableDeclaration(vdec);\n // TODO assert.equal(vdec.kind, \"var\");\n var exprs = [];\n vdec.declarations.forEach(function (dec) {\n // Note: We duplicate 'dec.id' here to ensure that the variable declaration IDs don't\n // have the same 'loc' value, since that can make sourcemaps and retainLines behave poorly.\n vars[dec.id.name] = t.identifier(dec.id.name);\n\n // Remove the binding, to avoid \"duplicate declaration\" errors when it will\n // be injected again.\n scope.removeBinding(dec.id.name);\n if (dec.init) {\n exprs.push(t.assignmentExpression(\"=\", dec.id, dec.init));\n } else if (includeIdentifiers) {\n exprs.push(dec.id);\n }\n });\n if (exprs.length === 0) return null;\n if (exprs.length === 1) return exprs[0];\n return t.sequenceExpression(exprs);\n }\n funPath.get(\"body\").traverse({\n VariableDeclaration: {\n exit: function exit(path) {\n var expr = varDeclToExpr(path, false);\n if (expr === null) {\n path.remove();\n } else {\n // We don't need to traverse this expression any further because\n // there can't be any new declarations inside an expression.\n util.replaceWithOrRemove(path, t.expressionStatement(expr));\n }\n\n // Since the original node has been either removed or replaced,\n // avoid traversing it any further.\n path.skip();\n }\n },\n ForStatement: function ForStatement(path) {\n var init = path.get(\"init\");\n if (init.isVariableDeclaration()) {\n util.replaceWithOrRemove(init, varDeclToExpr(init, false));\n }\n },\n ForXStatement: function ForXStatement(path) {\n var left = path.get(\"left\");\n if (left.isVariableDeclaration()) {\n util.replaceWithOrRemove(left, varDeclToExpr(left, true));\n }\n },\n FunctionDeclaration: function FunctionDeclaration(path) {\n var node = path.node;\n vars[node.id.name] = node.id;\n var assignment = t.expressionStatement(t.assignmentExpression(\"=\", t.clone(node.id), t.functionExpression(path.scope.generateUidIdentifierBasedOnNode(node), node.params, node.body, node.generator, node.expression)));\n if (path.parentPath.isBlockStatement()) {\n // Insert the assignment form before the first statement in the\n // enclosing block.\n path.parentPath.unshiftContainer(\"body\", assignment);\n\n // Remove the function declaration now that we've inserted the\n // equivalent assignment form at the beginning of the block.\n path.remove();\n } else {\n // If the parent node is not a block statement, then we can just\n // replace the declaration with the equivalent assignment form\n // without worrying about hoisting it.\n util.replaceWithOrRemove(path, assignment);\n }\n\n // Remove the binding, to avoid \"duplicate declaration\" errors when it will\n // be injected again.\n path.scope.removeBinding(node.id.name);\n\n // Don't hoist variables out of inner functions.\n path.skip();\n },\n FunctionExpression: function FunctionExpression(path) {\n // Don't descend into nested function expressions.\n path.skip();\n },\n ArrowFunctionExpression: function ArrowFunctionExpression(path) {\n // Don't descend into nested function expressions.\n path.skip();\n }\n });\n var paramNames = {};\n funPath.get(\"params\").forEach(function (paramPath) {\n var param = paramPath.node;\n if (t.isIdentifier(param)) {\n paramNames[param.name] = param;\n } else {\n // Variables declared by destructuring parameter patterns will be\n // harmlessly re-declared.\n }\n });\n var declarations = [];\n Object.keys(vars).forEach(function (name) {\n if (!hasOwn.call(paramNames, name)) {\n declarations.push(t.variableDeclarator(vars[name], null));\n }\n });\n if (declarations.length === 0) {\n return null; // Be sure to handle this case!\n }\n\n return t.variableDeclaration(\"var\", declarations);\n};","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\nvar _assert = _interopRequireDefault(require(\"assert\"));\nvar _emit = require(\"./emit\");\nvar _util = require(\"util\");\nvar _util2 = require(\"./util\");\n/**\n * Copyright (c) 2014-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nfunction Entry() {\n _assert[\"default\"].ok(this instanceof Entry);\n}\nfunction FunctionEntry(returnLoc) {\n Entry.call(this);\n (0, _util2.getTypes)().assertLiteral(returnLoc);\n this.returnLoc = returnLoc;\n}\n(0, _util.inherits)(FunctionEntry, Entry);\nexports.FunctionEntry = FunctionEntry;\nfunction LoopEntry(breakLoc, continueLoc, label) {\n Entry.call(this);\n var t = (0, _util2.getTypes)();\n t.assertLiteral(breakLoc);\n t.assertLiteral(continueLoc);\n if (label) {\n t.assertIdentifier(label);\n } else {\n label = null;\n }\n this.breakLoc = breakLoc;\n this.continueLoc = continueLoc;\n this.label = label;\n}\n(0, _util.inherits)(LoopEntry, Entry);\nexports.LoopEntry = LoopEntry;\nfunction SwitchEntry(breakLoc) {\n Entry.call(this);\n (0, _util2.getTypes)().assertLiteral(breakLoc);\n this.breakLoc = breakLoc;\n}\n(0, _util.inherits)(SwitchEntry, Entry);\nexports.SwitchEntry = SwitchEntry;\nfunction TryEntry(firstLoc, catchEntry, finallyEntry) {\n Entry.call(this);\n var t = (0, _util2.getTypes)();\n t.assertLiteral(firstLoc);\n if (catchEntry) {\n _assert[\"default\"].ok(catchEntry instanceof CatchEntry);\n } else {\n catchEntry = null;\n }\n if (finallyEntry) {\n _assert[\"default\"].ok(finallyEntry instanceof FinallyEntry);\n } else {\n finallyEntry = null;\n }\n\n // Have to have one or the other (or both).\n _assert[\"default\"].ok(catchEntry || finallyEntry);\n this.firstLoc = firstLoc;\n this.catchEntry = catchEntry;\n this.finallyEntry = finallyEntry;\n}\n(0, _util.inherits)(TryEntry, Entry);\nexports.TryEntry = TryEntry;\nfunction CatchEntry(firstLoc, paramId) {\n Entry.call(this);\n var t = (0, _util2.getTypes)();\n t.assertLiteral(firstLoc);\n t.assertIdentifier(paramId);\n this.firstLoc = firstLoc;\n this.paramId = paramId;\n}\n(0, _util.inherits)(CatchEntry, Entry);\nexports.CatchEntry = CatchEntry;\nfunction FinallyEntry(firstLoc, afterLoc) {\n Entry.call(this);\n var t = (0, _util2.getTypes)();\n t.assertLiteral(firstLoc);\n t.assertLiteral(afterLoc);\n this.firstLoc = firstLoc;\n this.afterLoc = afterLoc;\n}\n(0, _util.inherits)(FinallyEntry, Entry);\nexports.FinallyEntry = FinallyEntry;\nfunction LabeledEntry(breakLoc, label) {\n Entry.call(this);\n var t = (0, _util2.getTypes)();\n t.assertLiteral(breakLoc);\n t.assertIdentifier(label);\n this.breakLoc = breakLoc;\n this.label = label;\n}\n(0, _util.inherits)(LabeledEntry, Entry);\nexports.LabeledEntry = LabeledEntry;\nfunction LeapManager(emitter) {\n _assert[\"default\"].ok(this instanceof LeapManager);\n _assert[\"default\"].ok(emitter instanceof _emit.Emitter);\n this.emitter = emitter;\n this.entryStack = [new FunctionEntry(emitter.finalLoc)];\n}\nvar LMp = LeapManager.prototype;\nexports.LeapManager = LeapManager;\nLMp.withEntry = function (entry, callback) {\n _assert[\"default\"].ok(entry instanceof Entry);\n this.entryStack.push(entry);\n try {\n callback.call(this.emitter);\n } finally {\n var popped = this.entryStack.pop();\n _assert[\"default\"].strictEqual(popped, entry);\n }\n};\nLMp._findLeapLocation = function (property, label) {\n for (var i = this.entryStack.length - 1; i >= 0; --i) {\n var entry = this.entryStack[i];\n var loc = entry[property];\n if (loc) {\n if (label) {\n if (entry.label && entry.label.name === label.name) {\n return loc;\n }\n } else if (entry instanceof LabeledEntry) {\n // Ignore LabeledEntry entries unless we are actually breaking to\n // a label.\n } else {\n return loc;\n }\n }\n }\n return null;\n};\nLMp.getBreakLoc = function (label) {\n return this._findLeapLocation(\"breakLoc\", label);\n};\nLMp.getContinueLoc = function (label) {\n return this._findLeapLocation(\"continueLoc\", label);\n};","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\nvar _assert = _interopRequireDefault(require(\"assert\"));\nvar _util = require(\"./util.js\");\n/**\n * Copyright (c) 2014-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nvar mMap = new WeakMap();\nfunction m(node) {\n if (!mMap.has(node)) {\n mMap.set(node, {});\n }\n return mMap.get(node);\n}\nvar hasOwn = Object.prototype.hasOwnProperty;\nfunction makePredicate(propertyName, knownTypes) {\n function onlyChildren(node) {\n var t = (0, _util.getTypes)();\n t.assertNode(node);\n\n // Assume no side effects until we find out otherwise.\n var result = false;\n function check(child) {\n if (result) {\n // Do nothing.\n } else if (Array.isArray(child)) {\n child.some(check);\n } else if (t.isNode(child)) {\n _assert[\"default\"].strictEqual(result, false);\n result = predicate(child);\n }\n return result;\n }\n var keys = t.VISITOR_KEYS[node.type];\n if (keys) {\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n var child = node[key];\n check(child);\n }\n }\n return result;\n }\n function predicate(node) {\n (0, _util.getTypes)().assertNode(node);\n var meta = m(node);\n if (hasOwn.call(meta, propertyName)) return meta[propertyName];\n\n // Certain types are \"opaque,\" which means they have no side\n // effects or leaps and we don't care about their subexpressions.\n if (hasOwn.call(opaqueTypes, node.type)) return meta[propertyName] = false;\n if (hasOwn.call(knownTypes, node.type)) return meta[propertyName] = true;\n return meta[propertyName] = onlyChildren(node);\n }\n predicate.onlyChildren = onlyChildren;\n return predicate;\n}\nvar opaqueTypes = {\n FunctionExpression: true,\n ArrowFunctionExpression: true\n};\n\n// These types potentially have side effects regardless of what side\n// effects their subexpressions have.\nvar sideEffectTypes = {\n CallExpression: true,\n // Anything could happen!\n ForInStatement: true,\n // Modifies the key variable.\n UnaryExpression: true,\n // Think delete.\n BinaryExpression: true,\n // Might invoke .toString() or .valueOf().\n AssignmentExpression: true,\n // Side-effecting by definition.\n UpdateExpression: true,\n // Updates are essentially assignments.\n NewExpression: true // Similar to CallExpression.\n};\n\n// These types are the direct cause of all leaps in control flow.\nvar leapTypes = {\n YieldExpression: true,\n BreakStatement: true,\n ContinueStatement: true,\n ReturnStatement: true,\n ThrowStatement: true\n};\n\n// All leap types are also side effect types.\nfor (var type in leapTypes) {\n if (hasOwn.call(leapTypes, type)) {\n sideEffectTypes[type] = leapTypes[type];\n }\n}\nexports.hasSideEffects = makePredicate(\"hasSideEffects\", sideEffectTypes);\nexports.containsLeap = makePredicate(\"containsLeap\", leapTypes);","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\nvar _assert = _interopRequireDefault(require(\"assert\"));\nvar leap = _interopRequireWildcard(require(\"./leap\"));\nvar meta = _interopRequireWildcard(require(\"./meta\"));\nvar util = _interopRequireWildcard(require(\"./util\"));\nfunction _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== \"function\") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }\nfunction _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== \"object\" && typeof obj !== \"function\") { return { \"default\": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== \"default\" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj[\"default\"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }\n/**\n * Copyright (c) 2014-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nvar hasOwn = Object.prototype.hasOwnProperty;\nfunction Emitter(contextId) {\n _assert[\"default\"].ok(this instanceof Emitter);\n util.getTypes().assertIdentifier(contextId);\n\n // Used to generate unique temporary names.\n this.nextTempId = 0;\n\n // In order to make sure the context object does not collide with\n // anything in the local scope, we might have to rename it, so we\n // refer to it symbolically instead of just assuming that it will be\n // called \"context\".\n this.contextId = contextId;\n\n // An append-only list of Statements that grows each time this.emit is\n // called.\n this.listing = [];\n\n // A sparse array whose keys correspond to locations in this.listing\n // that have been marked as branch/jump targets.\n this.marked = [true];\n this.insertedLocs = new Set();\n\n // The last location will be marked when this.getDispatchLoop is\n // called.\n this.finalLoc = this.loc();\n\n // A list of all leap.TryEntry statements emitted.\n this.tryEntries = [];\n\n // Each time we evaluate the body of a loop, we tell this.leapManager\n // to enter a nested loop context that determines the meaning of break\n // and continue statements therein.\n this.leapManager = new leap.LeapManager(this);\n}\nvar Ep = Emitter.prototype;\nexports.Emitter = Emitter;\n\n// Offsets into this.listing that could be used as targets for branches or\n// jumps are represented as numeric Literal nodes. This representation has\n// the amazingly convenient benefit of allowing the exact value of the\n// location to be determined at any time, even after generating code that\n// refers to the location.\n// We use 'Number.MAX_VALUE' to mark uninitialized location. We can safely do\n// so because no code can realistically have about 1.8e+308 locations before\n// hitting memory limit of the machine it's running on. For comparison, the\n// estimated number of atoms in the observable universe is around 1e+80.\nvar PENDING_LOCATION = Number.MAX_VALUE;\nEp.loc = function () {\n var l = util.getTypes().numericLiteral(PENDING_LOCATION);\n this.insertedLocs.add(l);\n return l;\n};\nEp.getInsertedLocs = function () {\n return this.insertedLocs;\n};\nEp.getContextId = function () {\n return util.getTypes().clone(this.contextId);\n};\n\n// Sets the exact value of the given location to the offset of the next\n// Statement emitted.\nEp.mark = function (loc) {\n util.getTypes().assertLiteral(loc);\n var index = this.listing.length;\n if (loc.value === PENDING_LOCATION) {\n loc.value = index;\n } else {\n // Locations can be marked redundantly, but their values cannot change\n // once set the first time.\n _assert[\"default\"].strictEqual(loc.value, index);\n }\n this.marked[index] = true;\n return loc;\n};\nEp.emit = function (node) {\n var t = util.getTypes();\n if (t.isExpression(node)) {\n node = t.expressionStatement(node);\n }\n t.assertStatement(node);\n this.listing.push(node);\n};\n\n// Shorthand for emitting assignment statements. This will come in handy\n// for assignments to temporary variables.\nEp.emitAssign = function (lhs, rhs) {\n this.emit(this.assign(lhs, rhs));\n return lhs;\n};\n\n// Shorthand for an assignment statement.\nEp.assign = function (lhs, rhs) {\n var t = util.getTypes();\n return t.expressionStatement(t.assignmentExpression(\"=\", t.cloneDeep(lhs), rhs));\n};\n\n// Convenience function for generating expressions like context.next,\n// context.sent, and context.rval.\nEp.contextProperty = function (name, computed) {\n var t = util.getTypes();\n return t.memberExpression(this.getContextId(), computed ? t.stringLiteral(name) : t.identifier(name), !!computed);\n};\n\n// Shorthand for setting context.rval and jumping to `context.stop()`.\nEp.stop = function (rval) {\n if (rval) {\n this.setReturnValue(rval);\n }\n this.jump(this.finalLoc);\n};\nEp.setReturnValue = function (valuePath) {\n util.getTypes().assertExpression(valuePath.value);\n this.emitAssign(this.contextProperty(\"rval\"), this.explodeExpression(valuePath));\n};\nEp.clearPendingException = function (tryLoc, assignee) {\n var t = util.getTypes();\n t.assertLiteral(tryLoc);\n var catchCall = t.callExpression(this.contextProperty(\"catch\", true), [t.clone(tryLoc)]);\n if (assignee) {\n this.emitAssign(assignee, catchCall);\n } else {\n this.emit(catchCall);\n }\n};\n\n// Emits code for an unconditional jump to the given location, even if the\n// exact value of the location is not yet known.\nEp.jump = function (toLoc) {\n this.emitAssign(this.contextProperty(\"next\"), toLoc);\n this.emit(util.getTypes().breakStatement());\n};\n\n// Conditional jump.\nEp.jumpIf = function (test, toLoc) {\n var t = util.getTypes();\n t.assertExpression(test);\n t.assertLiteral(toLoc);\n this.emit(t.ifStatement(test, t.blockStatement([this.assign(this.contextProperty(\"next\"), toLoc), t.breakStatement()])));\n};\n\n// Conditional jump, with the condition negated.\nEp.jumpIfNot = function (test, toLoc) {\n var t = util.getTypes();\n t.assertExpression(test);\n t.assertLiteral(toLoc);\n var negatedTest;\n if (t.isUnaryExpression(test) && test.operator === \"!\") {\n // Avoid double negation.\n negatedTest = test.argument;\n } else {\n negatedTest = t.unaryExpression(\"!\", test);\n }\n this.emit(t.ifStatement(negatedTest, t.blockStatement([this.assign(this.contextProperty(\"next\"), toLoc), t.breakStatement()])));\n};\n\n// Returns a unique MemberExpression that can be used to store and\n// retrieve temporary values. Since the object of the member expression is\n// the context object, which is presumed to coexist peacefully with all\n// other local variables, and since we just increment `nextTempId`\n// monotonically, uniqueness is assured.\nEp.makeTempVar = function () {\n return this.contextProperty(\"t\" + this.nextTempId++);\n};\nEp.getContextFunction = function (id) {\n var t = util.getTypes();\n return t.functionExpression(id || null /*Anonymous*/, [this.getContextId()], t.blockStatement([this.getDispatchLoop()]), false,\n // Not a generator anymore!\n false // Nor an expression.\n );\n};\n\n// Turns this.listing into a loop of the form\n//\n// while (1) switch (context.next) {\n// case 0:\n// ...\n// case n:\n// return context.stop();\n// }\n//\n// Each marked location in this.listing will correspond to one generated\n// case statement.\nEp.getDispatchLoop = function () {\n var self = this;\n var t = util.getTypes();\n var cases = [];\n var current;\n\n // If we encounter a break, continue, or return statement in a switch\n // case, we can skip the rest of the statements until the next case.\n var alreadyEnded = false;\n self.listing.forEach(function (stmt, i) {\n if (self.marked.hasOwnProperty(i)) {\n cases.push(t.switchCase(t.numericLiteral(i), current = []));\n alreadyEnded = false;\n }\n if (!alreadyEnded) {\n current.push(stmt);\n if (t.isCompletionStatement(stmt)) alreadyEnded = true;\n }\n });\n\n // Now that we know how many statements there will be in this.listing,\n // we can finally resolve this.finalLoc.value.\n this.finalLoc.value = this.listing.length;\n cases.push(t.switchCase(this.finalLoc, [\n // Intentionally fall through to the \"end\" case...\n ]),\n // So that the runtime can jump to the final location without having\n // to know its offset, we provide the \"end\" case as a synonym.\n t.switchCase(t.stringLiteral(\"end\"), [\n // This will check/clear both context.thrown and context.rval.\n t.returnStatement(t.callExpression(this.contextProperty(\"stop\"), []))]));\n return t.whileStatement(t.numericLiteral(1), t.switchStatement(t.assignmentExpression(\"=\", this.contextProperty(\"prev\"), this.contextProperty(\"next\")), cases));\n};\nEp.getTryLocsList = function () {\n if (this.tryEntries.length === 0) {\n // To avoid adding a needless [] to the majority of runtime.wrap\n // argument lists, force the caller to handle this case specially.\n return null;\n }\n var t = util.getTypes();\n var lastLocValue = 0;\n return t.arrayExpression(this.tryEntries.map(function (tryEntry) {\n var thisLocValue = tryEntry.firstLoc.value;\n _assert[\"default\"].ok(thisLocValue >= lastLocValue, \"try entries out of order\");\n lastLocValue = thisLocValue;\n var ce = tryEntry.catchEntry;\n var fe = tryEntry.finallyEntry;\n var locs = [tryEntry.firstLoc,\n // The null here makes a hole in the array.\n ce ? ce.firstLoc : null];\n if (fe) {\n locs[2] = fe.firstLoc;\n locs[3] = fe.afterLoc;\n }\n return t.arrayExpression(locs.map(function (loc) {\n return loc && t.clone(loc);\n }));\n }));\n};\n\n// All side effects must be realized in order.\n\n// If any subexpression harbors a leap, all subexpressions must be\n// neutered of side effects.\n\n// No destructive modification of AST nodes.\n\nEp.explode = function (path, ignoreResult) {\n var t = util.getTypes();\n var node = path.node;\n var self = this;\n t.assertNode(node);\n if (t.isDeclaration(node)) throw getDeclError(node);\n if (t.isStatement(node)) return self.explodeStatement(path);\n if (t.isExpression(node)) return self.explodeExpression(path, ignoreResult);\n switch (node.type) {\n case \"Program\":\n return path.get(\"body\").map(self.explodeStatement, self);\n case \"VariableDeclarator\":\n throw getDeclError(node);\n\n // These node types should be handled by their parent nodes\n // (ObjectExpression, SwitchStatement, and TryStatement, respectively).\n case \"Property\":\n case \"SwitchCase\":\n case \"CatchClause\":\n throw new Error(node.type + \" nodes should be handled by their parents\");\n default:\n throw new Error(\"unknown Node of type \" + JSON.stringify(node.type));\n }\n};\nfunction getDeclError(node) {\n return new Error(\"all declarations should have been transformed into \" + \"assignments before the Exploder began its work: \" + JSON.stringify(node));\n}\nEp.explodeStatement = function (path, labelId) {\n var t = util.getTypes();\n var stmt = path.node;\n var self = this;\n var before, after, head;\n t.assertStatement(stmt);\n if (labelId) {\n t.assertIdentifier(labelId);\n } else {\n labelId = null;\n }\n\n // Explode BlockStatement nodes even if they do not contain a yield,\n // because we don't want or need the curly braces.\n if (t.isBlockStatement(stmt)) {\n path.get(\"body\").forEach(function (path) {\n self.explodeStatement(path);\n });\n return;\n }\n if (!meta.containsLeap(stmt)) {\n // Technically we should be able to avoid emitting the statement\n // altogether if !meta.hasSideEffects(stmt), but that leads to\n // confusing generated code (for instance, `while (true) {}` just\n // disappears) and is probably a more appropriate job for a dedicated\n // dead code elimination pass.\n self.emit(stmt);\n return;\n }\n switch (stmt.type) {\n case \"ExpressionStatement\":\n self.explodeExpression(path.get(\"expression\"), true);\n break;\n case \"LabeledStatement\":\n after = this.loc();\n\n // Did you know you can break from any labeled block statement or\n // control structure? Well, you can! Note: when a labeled loop is\n // encountered, the leap.LabeledEntry created here will immediately\n // enclose a leap.LoopEntry on the leap manager's stack, and both\n // entries will have the same label. Though this works just fine, it\n // may seem a bit redundant. In theory, we could check here to\n // determine if stmt knows how to handle its own label; for example,\n // stmt happens to be a WhileStatement and so we know it's going to\n // establish its own LoopEntry when we explode it (below). Then this\n // LabeledEntry would be unnecessary. Alternatively, we might be\n // tempted not to pass stmt.label down into self.explodeStatement,\n // because we've handled the label here, but that's a mistake because\n // labeled loops may contain labeled continue statements, which is not\n // something we can handle in this generic case. All in all, I think a\n // little redundancy greatly simplifies the logic of this case, since\n // it's clear that we handle all possible LabeledStatements correctly\n // here, regardless of whether they interact with the leap manager\n // themselves. Also remember that labels and break/continue-to-label\n // statements are rare, and all of this logic happens at transform\n // time, so it has no additional runtime cost.\n self.leapManager.withEntry(new leap.LabeledEntry(after, stmt.label), function () {\n self.explodeStatement(path.get(\"body\"), stmt.label);\n });\n self.mark(after);\n break;\n case \"WhileStatement\":\n before = this.loc();\n after = this.loc();\n self.mark(before);\n self.jumpIfNot(self.explodeExpression(path.get(\"test\")), after);\n self.leapManager.withEntry(new leap.LoopEntry(after, before, labelId), function () {\n self.explodeStatement(path.get(\"body\"));\n });\n self.jump(before);\n self.mark(after);\n break;\n case \"DoWhileStatement\":\n var first = this.loc();\n var test = this.loc();\n after = this.loc();\n self.mark(first);\n self.leapManager.withEntry(new leap.LoopEntry(after, test, labelId), function () {\n self.explode(path.get(\"body\"));\n });\n self.mark(test);\n self.jumpIf(self.explodeExpression(path.get(\"test\")), first);\n self.mark(after);\n break;\n case \"ForStatement\":\n head = this.loc();\n var update = this.loc();\n after = this.loc();\n if (stmt.init) {\n // We pass true here to indicate that if stmt.init is an expression\n // then we do not care about its result.\n self.explode(path.get(\"init\"), true);\n }\n self.mark(head);\n if (stmt.test) {\n self.jumpIfNot(self.explodeExpression(path.get(\"test\")), after);\n } else {\n // No test means continue unconditionally.\n }\n self.leapManager.withEntry(new leap.LoopEntry(after, update, labelId), function () {\n self.explodeStatement(path.get(\"body\"));\n });\n self.mark(update);\n if (stmt.update) {\n // We pass true here to indicate that if stmt.update is an\n // expression then we do not care about its result.\n self.explode(path.get(\"update\"), true);\n }\n self.jump(head);\n self.mark(after);\n break;\n case \"TypeCastExpression\":\n return self.explodeExpression(path.get(\"expression\"));\n case \"ForInStatement\":\n head = this.loc();\n after = this.loc();\n var keyIterNextFn = self.makeTempVar();\n self.emitAssign(keyIterNextFn, t.callExpression(util.runtimeProperty(\"keys\"), [self.explodeExpression(path.get(\"right\"))]));\n self.mark(head);\n var keyInfoTmpVar = self.makeTempVar();\n self.jumpIf(t.memberExpression(t.assignmentExpression(\"=\", keyInfoTmpVar, t.callExpression(t.cloneDeep(keyIterNextFn), [])), t.identifier(\"done\"), false), after);\n self.emitAssign(stmt.left, t.memberExpression(t.cloneDeep(keyInfoTmpVar), t.identifier(\"value\"), false));\n self.leapManager.withEntry(new leap.LoopEntry(after, head, labelId), function () {\n self.explodeStatement(path.get(\"body\"));\n });\n self.jump(head);\n self.mark(after);\n break;\n case \"BreakStatement\":\n self.emitAbruptCompletion({\n type: \"break\",\n target: self.leapManager.getBreakLoc(stmt.label)\n });\n break;\n case \"ContinueStatement\":\n self.emitAbruptCompletion({\n type: \"continue\",\n target: self.leapManager.getContinueLoc(stmt.label)\n });\n break;\n case \"SwitchStatement\":\n // Always save the discriminant into a temporary variable in case the\n // test expressions overwrite values like context.sent.\n var disc = self.emitAssign(self.makeTempVar(), self.explodeExpression(path.get(\"discriminant\")));\n after = this.loc();\n var defaultLoc = this.loc();\n var condition = defaultLoc;\n var caseLocs = [];\n\n // If there are no cases, .cases might be undefined.\n var cases = stmt.cases || [];\n for (var i = cases.length - 1; i >= 0; --i) {\n var c = cases[i];\n t.assertSwitchCase(c);\n if (c.test) {\n condition = t.conditionalExpression(t.binaryExpression(\"===\", t.cloneDeep(disc), c.test), caseLocs[i] = this.loc(), condition);\n } else {\n caseLocs[i] = defaultLoc;\n }\n }\n var discriminant = path.get(\"discriminant\");\n util.replaceWithOrRemove(discriminant, condition);\n self.jump(self.explodeExpression(discriminant));\n self.leapManager.withEntry(new leap.SwitchEntry(after), function () {\n path.get(\"cases\").forEach(function (casePath) {\n var i = casePath.key;\n self.mark(caseLocs[i]);\n casePath.get(\"consequent\").forEach(function (path) {\n self.explodeStatement(path);\n });\n });\n });\n self.mark(after);\n if (defaultLoc.value === PENDING_LOCATION) {\n self.mark(defaultLoc);\n _assert[\"default\"].strictEqual(after.value, defaultLoc.value);\n }\n break;\n case \"IfStatement\":\n var elseLoc = stmt.alternate && this.loc();\n after = this.loc();\n self.jumpIfNot(self.explodeExpression(path.get(\"test\")), elseLoc || after);\n self.explodeStatement(path.get(\"consequent\"));\n if (elseLoc) {\n self.jump(after);\n self.mark(elseLoc);\n self.explodeStatement(path.get(\"alternate\"));\n }\n self.mark(after);\n break;\n case \"ReturnStatement\":\n self.emitAbruptCompletion({\n type: \"return\",\n value: self.explodeExpression(path.get(\"argument\"))\n });\n break;\n case \"WithStatement\":\n throw new Error(\"WithStatement not supported in generator functions.\");\n case \"TryStatement\":\n after = this.loc();\n var handler = stmt.handler;\n var catchLoc = handler && this.loc();\n var catchEntry = catchLoc && new leap.CatchEntry(catchLoc, handler.param);\n var finallyLoc = stmt.finalizer && this.loc();\n var finallyEntry = finallyLoc && new leap.FinallyEntry(finallyLoc, after);\n var tryEntry = new leap.TryEntry(self.getUnmarkedCurrentLoc(), catchEntry, finallyEntry);\n self.tryEntries.push(tryEntry);\n self.updateContextPrevLoc(tryEntry.firstLoc);\n self.leapManager.withEntry(tryEntry, function () {\n self.explodeStatement(path.get(\"block\"));\n if (catchLoc) {\n if (finallyLoc) {\n // If we have both a catch block and a finally block, then\n // because we emit the catch block first, we need to jump over\n // it to the finally block.\n self.jump(finallyLoc);\n } else {\n // If there is no finally block, then we need to jump over the\n // catch block to the fall-through location.\n self.jump(after);\n }\n self.updateContextPrevLoc(self.mark(catchLoc));\n var bodyPath = path.get(\"handler.body\");\n var safeParam = self.makeTempVar();\n self.clearPendingException(tryEntry.firstLoc, safeParam);\n bodyPath.traverse(catchParamVisitor, {\n getSafeParam: function getSafeParam() {\n return t.cloneDeep(safeParam);\n },\n catchParamName: handler.param.name\n });\n self.leapManager.withEntry(catchEntry, function () {\n self.explodeStatement(bodyPath);\n });\n }\n if (finallyLoc) {\n self.updateContextPrevLoc(self.mark(finallyLoc));\n self.leapManager.withEntry(finallyEntry, function () {\n self.explodeStatement(path.get(\"finalizer\"));\n });\n self.emit(t.returnStatement(t.callExpression(self.contextProperty(\"finish\"), [finallyEntry.firstLoc])));\n }\n });\n self.mark(after);\n break;\n case \"ThrowStatement\":\n self.emit(t.throwStatement(self.explodeExpression(path.get(\"argument\"))));\n break;\n case \"ClassDeclaration\":\n self.emit(self.explodeClass(path));\n break;\n default:\n throw new Error(\"unknown Statement of type \" + JSON.stringify(stmt.type));\n }\n};\nvar catchParamVisitor = {\n Identifier: function Identifier(path, state) {\n if (path.node.name === state.catchParamName && util.isReference(path)) {\n util.replaceWithOrRemove(path, state.getSafeParam());\n }\n },\n Scope: function Scope(path, state) {\n if (path.scope.hasOwnBinding(state.catchParamName)) {\n // Don't descend into nested scopes that shadow the catch\n // parameter with their own declarations.\n path.skip();\n }\n }\n};\nEp.emitAbruptCompletion = function (record) {\n if (!isValidCompletion(record)) {\n _assert[\"default\"].ok(false, \"invalid completion record: \" + JSON.stringify(record));\n }\n _assert[\"default\"].notStrictEqual(record.type, \"normal\", \"normal completions are not abrupt\");\n var t = util.getTypes();\n var abruptArgs = [t.stringLiteral(record.type)];\n if (record.type === \"break\" || record.type === \"continue\") {\n t.assertLiteral(record.target);\n abruptArgs[1] = this.insertedLocs.has(record.target) ? record.target : t.cloneDeep(record.target);\n } else if (record.type === \"return\" || record.type === \"throw\") {\n if (record.value) {\n t.assertExpression(record.value);\n abruptArgs[1] = this.insertedLocs.has(record.value) ? record.value : t.cloneDeep(record.value);\n }\n }\n this.emit(t.returnStatement(t.callExpression(this.contextProperty(\"abrupt\"), abruptArgs)));\n};\nfunction isValidCompletion(record) {\n var type = record.type;\n if (type === \"normal\") {\n return !hasOwn.call(record, \"target\");\n }\n if (type === \"break\" || type === \"continue\") {\n return !hasOwn.call(record, \"value\") && util.getTypes().isLiteral(record.target);\n }\n if (type === \"return\" || type === \"throw\") {\n return hasOwn.call(record, \"value\") && !hasOwn.call(record, \"target\");\n }\n return false;\n}\n\n// Not all offsets into emitter.listing are potential jump targets. For\n// example, execution typically falls into the beginning of a try block\n// without jumping directly there. This method returns the current offset\n// without marking it, so that a switch case will not necessarily be\n// generated for this offset (I say \"not necessarily\" because the same\n// location might end up being marked in the process of emitting other\n// statements). There's no logical harm in marking such locations as jump\n// targets, but minimizing the number of switch cases keeps the generated\n// code shorter.\nEp.getUnmarkedCurrentLoc = function () {\n return util.getTypes().numericLiteral(this.listing.length);\n};\n\n// The context.prev property takes the value of context.next whenever we\n// evaluate the switch statement discriminant, which is generally good\n// enough for tracking the last location we jumped to, but sometimes\n// context.prev needs to be more precise, such as when we fall\n// successfully out of a try block and into a finally block without\n// jumping. This method exists to update context.prev to the freshest\n// available location. If we were implementing a full interpreter, we\n// would know the location of the current instruction with complete\n// precision at all times, but we don't have that luxury here, as it would\n// be costly and verbose to set context.prev before every statement.\nEp.updateContextPrevLoc = function (loc) {\n var t = util.getTypes();\n if (loc) {\n t.assertLiteral(loc);\n if (loc.value === PENDING_LOCATION) {\n // If an uninitialized location literal was passed in, set its value\n // to the current this.listing.length.\n loc.value = this.listing.length;\n } else {\n // Otherwise assert that the location matches the current offset.\n _assert[\"default\"].strictEqual(loc.value, this.listing.length);\n }\n } else {\n loc = this.getUnmarkedCurrentLoc();\n }\n\n // Make sure context.prev is up to date in case we fell into this try\n // statement without jumping to it. TODO Consider avoiding this\n // assignment when we know control must have jumped here.\n this.emitAssign(this.contextProperty(\"prev\"), loc);\n};\n\n// In order to save the rest of explodeExpression from a combinatorial\n// trainwreck of special cases, explodeViaTempVar is responsible for\n// deciding when a subexpression needs to be \"exploded,\" which is my\n// very technical term for emitting the subexpression as an assignment\n// to a temporary variable and the substituting the temporary variable\n// for the original subexpression. Think of exploded view diagrams, not\n// Michael Bay movies. The point of exploding subexpressions is to\n// control the precise order in which the generated code realizes the\n// side effects of those subexpressions.\nEp.explodeViaTempVar = function (tempVar, childPath, hasLeapingChildren, ignoreChildResult) {\n _assert[\"default\"].ok(!ignoreChildResult || !tempVar, \"Ignoring the result of a child expression but forcing it to \" + \"be assigned to a temporary variable?\");\n var t = util.getTypes();\n var result = this.explodeExpression(childPath, ignoreChildResult);\n if (ignoreChildResult) {\n // Side effects already emitted above.\n } else if (tempVar || hasLeapingChildren && !t.isLiteral(result)) {\n // If tempVar was provided, then the result will always be assigned\n // to it, even if the result does not otherwise need to be assigned\n // to a temporary variable. When no tempVar is provided, we have\n // the flexibility to decide whether a temporary variable is really\n // necessary. Unfortunately, in general, a temporary variable is\n // required whenever any child contains a yield expression, since it\n // is difficult to prove (at all, let alone efficiently) whether\n // this result would evaluate to the same value before and after the\n // yield (see #206). One narrow case where we can prove it doesn't\n // matter (and thus we do not need a temporary variable) is when the\n // result in question is a Literal value.\n result = this.emitAssign(tempVar || this.makeTempVar(), result);\n }\n return result;\n};\nEp.explodeExpression = function (path, ignoreResult) {\n var t = util.getTypes();\n var expr = path.node;\n if (expr) {\n t.assertExpression(expr);\n } else {\n return expr;\n }\n var self = this;\n var result; // Used optionally by several cases below.\n var after;\n function finish(expr) {\n t.assertExpression(expr);\n if (ignoreResult) {\n self.emit(expr);\n }\n return expr;\n }\n\n // If the expression does not contain a leap, then we either emit the\n // expression as a standalone statement or return it whole.\n if (!meta.containsLeap(expr)) {\n return finish(expr);\n }\n\n // If any child contains a leap (such as a yield or labeled continue or\n // break statement), then any sibling subexpressions will almost\n // certainly have to be exploded in order to maintain the order of their\n // side effects relative to the leaping child(ren).\n var hasLeapingChildren = meta.containsLeap.onlyChildren(expr);\n\n // If ignoreResult is true, then we must take full responsibility for\n // emitting the expression with all its side effects, and we should not\n // return a result.\n\n switch (expr.type) {\n case \"MemberExpression\":\n return finish(t.memberExpression(self.explodeExpression(path.get(\"object\")), expr.computed ? self.explodeViaTempVar(null, path.get(\"property\"), hasLeapingChildren) : expr.property, expr.computed));\n case \"CallExpression\":\n var calleePath = path.get(\"callee\");\n var argsPath = path.get(\"arguments\");\n var newCallee;\n var newArgs;\n var hasLeapingArgs = argsPath.some(function (argPath) {\n return meta.containsLeap(argPath.node);\n });\n var injectFirstArg = null;\n if (t.isMemberExpression(calleePath.node)) {\n if (hasLeapingArgs) {\n // If the arguments of the CallExpression contained any yield\n // expressions, then we need to be sure to evaluate the callee\n // before evaluating the arguments, but if the callee was a member\n // expression, then we must be careful that the object of the\n // member expression still gets bound to `this` for the call.\n\n var newObject = self.explodeViaTempVar(\n // Assign the exploded callee.object expression to a temporary\n // variable so that we can use it twice without reevaluating it.\n self.makeTempVar(), calleePath.get(\"object\"), hasLeapingChildren);\n var newProperty = calleePath.node.computed ? self.explodeViaTempVar(null, calleePath.get(\"property\"), hasLeapingChildren) : calleePath.node.property;\n injectFirstArg = newObject;\n newCallee = t.memberExpression(t.memberExpression(t.cloneDeep(newObject), newProperty, calleePath.node.computed), t.identifier(\"call\"), false);\n } else {\n newCallee = self.explodeExpression(calleePath);\n }\n } else {\n newCallee = self.explodeViaTempVar(null, calleePath, hasLeapingChildren);\n if (t.isMemberExpression(newCallee)) {\n // If the callee was not previously a MemberExpression, then the\n // CallExpression was \"unqualified,\" meaning its `this` object\n // should be the global object. If the exploded expression has\n // become a MemberExpression (e.g. a context property, probably a\n // temporary variable), then we need to force it to be unqualified\n // by using the (0, object.property)(...) trick; otherwise, it\n // will receive the object of the MemberExpression as its `this`\n // object.\n newCallee = t.sequenceExpression([t.numericLiteral(0), t.cloneDeep(newCallee)]);\n }\n }\n if (hasLeapingArgs) {\n newArgs = argsPath.map(function (argPath) {\n return self.explodeViaTempVar(null, argPath, hasLeapingChildren);\n });\n if (injectFirstArg) newArgs.unshift(injectFirstArg);\n newArgs = newArgs.map(function (arg) {\n return t.cloneDeep(arg);\n });\n } else {\n newArgs = path.node.arguments;\n }\n return finish(t.callExpression(newCallee, newArgs));\n case \"NewExpression\":\n return finish(t.newExpression(self.explodeViaTempVar(null, path.get(\"callee\"), hasLeapingChildren), path.get(\"arguments\").map(function (argPath) {\n return self.explodeViaTempVar(null, argPath, hasLeapingChildren);\n })));\n case \"ObjectExpression\":\n return finish(t.objectExpression(path.get(\"properties\").map(function (propPath) {\n if (propPath.isObjectProperty()) {\n return t.objectProperty(propPath.node.key, self.explodeViaTempVar(null, propPath.get(\"value\"), hasLeapingChildren), propPath.node.computed);\n } else {\n return propPath.node;\n }\n })));\n case \"ArrayExpression\":\n return finish(t.arrayExpression(path.get(\"elements\").map(function (elemPath) {\n if (!elemPath.node) {\n return null;\n }\n if (elemPath.isSpreadElement()) {\n return t.spreadElement(self.explodeViaTempVar(null, elemPath.get(\"argument\"), hasLeapingChildren));\n } else {\n return self.explodeViaTempVar(null, elemPath, hasLeapingChildren);\n }\n })));\n case \"SequenceExpression\":\n var lastIndex = expr.expressions.length - 1;\n path.get(\"expressions\").forEach(function (exprPath) {\n if (exprPath.key === lastIndex) {\n result = self.explodeExpression(exprPath, ignoreResult);\n } else {\n self.explodeExpression(exprPath, true);\n }\n });\n return result;\n case \"LogicalExpression\":\n after = this.loc();\n if (!ignoreResult) {\n result = self.makeTempVar();\n }\n var left = self.explodeViaTempVar(result, path.get(\"left\"), hasLeapingChildren);\n if (expr.operator === \"&&\") {\n self.jumpIfNot(left, after);\n } else {\n _assert[\"default\"].strictEqual(expr.operator, \"||\");\n self.jumpIf(left, after);\n }\n self.explodeViaTempVar(result, path.get(\"right\"), hasLeapingChildren, ignoreResult);\n self.mark(after);\n return result;\n case \"ConditionalExpression\":\n var elseLoc = this.loc();\n after = this.loc();\n var test = self.explodeExpression(path.get(\"test\"));\n self.jumpIfNot(test, elseLoc);\n if (!ignoreResult) {\n result = self.makeTempVar();\n }\n self.explodeViaTempVar(result, path.get(\"consequent\"), hasLeapingChildren, ignoreResult);\n self.jump(after);\n self.mark(elseLoc);\n self.explodeViaTempVar(result, path.get(\"alternate\"), hasLeapingChildren, ignoreResult);\n self.mark(after);\n return result;\n case \"UnaryExpression\":\n return finish(t.unaryExpression(expr.operator,\n // Can't (and don't need to) break up the syntax of the argument.\n // Think about delete a[b].\n self.explodeExpression(path.get(\"argument\")), !!expr.prefix));\n case \"BinaryExpression\":\n return finish(t.binaryExpression(expr.operator, self.explodeViaTempVar(null, path.get(\"left\"), hasLeapingChildren), self.explodeViaTempVar(null, path.get(\"right\"), hasLeapingChildren)));\n case \"AssignmentExpression\":\n if (expr.operator === \"=\") {\n // If this is a simple assignment, the left hand side does not need\n // to be read before the right hand side is evaluated, so we can\n // avoid the more complicated logic below.\n return finish(t.assignmentExpression(expr.operator, self.explodeExpression(path.get(\"left\")), self.explodeExpression(path.get(\"right\"))));\n }\n var lhs = self.explodeExpression(path.get(\"left\"));\n var temp = self.emitAssign(self.makeTempVar(), lhs);\n\n // For example,\n //\n // x += yield y\n //\n // becomes\n //\n // context.t0 = x\n // x = context.t0 += yield y\n //\n // so that the left-hand side expression is read before the yield.\n // Fixes https://github.com/facebook/regenerator/issues/345.\n\n return finish(t.assignmentExpression(\"=\", t.cloneDeep(lhs), t.assignmentExpression(expr.operator, t.cloneDeep(temp), self.explodeExpression(path.get(\"right\")))));\n case \"UpdateExpression\":\n return finish(t.updateExpression(expr.operator, self.explodeExpression(path.get(\"argument\")), expr.prefix));\n case \"YieldExpression\":\n after = this.loc();\n var arg = expr.argument && self.explodeExpression(path.get(\"argument\"));\n if (arg && expr.delegate) {\n var _result = self.makeTempVar();\n var _ret = t.returnStatement(t.callExpression(self.contextProperty(\"delegateYield\"), [arg, t.stringLiteral(_result.property.name), after]));\n _ret.loc = expr.loc;\n self.emit(_ret);\n self.mark(after);\n return _result;\n }\n self.emitAssign(self.contextProperty(\"next\"), after);\n var ret = t.returnStatement(t.cloneDeep(arg) || null);\n // Preserve the `yield` location so that source mappings for the statements\n // link back to the yield properly.\n ret.loc = expr.loc;\n self.emit(ret);\n self.mark(after);\n return self.contextProperty(\"sent\");\n case \"ClassExpression\":\n return finish(self.explodeClass(path));\n default:\n throw new Error(\"unknown Expression of type \" + JSON.stringify(expr.type));\n }\n};\nEp.explodeClass = function (path) {\n var explodingChildren = [];\n if (path.node.superClass) {\n explodingChildren.push(path.get(\"superClass\"));\n }\n path.get(\"body.body\").forEach(function (member) {\n if (member.node.computed) {\n explodingChildren.push(member.get(\"key\"));\n }\n });\n var hasLeapingChildren = explodingChildren.some(function (child) {\n return meta.containsLeap(child);\n });\n for (var i = 0; i < explodingChildren.length; i++) {\n var child = explodingChildren[i];\n var isLast = i === explodingChildren.length - 1;\n if (isLast) {\n child.replaceWith(this.explodeExpression(child));\n } else {\n child.replaceWith(this.explodeViaTempVar(null, child, hasLeapingChildren));\n }\n }\n return path.node;\n};","\"use strict\";\n\nexports.__esModule = true;\nexports[\"default\"] = replaceShorthandObjectMethod;\nvar util = _interopRequireWildcard(require(\"./util\"));\nfunction _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== \"function\") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }\nfunction _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== \"object\" && typeof obj !== \"function\") { return { \"default\": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== \"default\" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj[\"default\"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }\n/**\n * Copyright (c) 2014-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n// this function converts a shorthand object generator method into a normal\n// (non-shorthand) object property which is a generator function expression. for\n// example, this:\n//\n// var foo = {\n// *bar(baz) { return 5; }\n// }\n//\n// should be replaced with:\n//\n// var foo = {\n// bar: function*(baz) { return 5; }\n// }\n//\n// to do this, it clones the parameter array and the body of the object generator\n// method into a new FunctionExpression.\n//\n// this method can be passed any Function AST node path, and it will return\n// either:\n// a) the path that was passed in (iff the path did not need to be replaced) or\n// b) the path of the new FunctionExpression that was created as a replacement\n// (iff the path did need to be replaced)\n//\n// In either case, though, the caller can count on the fact that the return value\n// is a Function AST node path.\n//\n// If this function is called with an AST node path that is not a Function (or with an\n// argument that isn't an AST node path), it will throw an error.\nfunction replaceShorthandObjectMethod(path) {\n var t = util.getTypes();\n if (!path.node || !t.isFunction(path.node)) {\n throw new Error(\"replaceShorthandObjectMethod can only be called on Function AST node paths.\");\n }\n\n // this function only replaces shorthand object methods (called ObjectMethod\n // in Babel-speak).\n if (!t.isObjectMethod(path.node)) {\n return path;\n }\n\n // this function only replaces generators.\n if (!path.node.generator) {\n return path;\n }\n var parameters = path.node.params.map(function (param) {\n return t.cloneDeep(param);\n });\n var functionExpression = t.functionExpression(null,\n // id\n parameters,\n // params\n t.cloneDeep(path.node.body),\n // body\n path.node.generator, path.node.async);\n util.replaceWithOrRemove(path, t.objectProperty(t.cloneDeep(path.node.key),\n // key\n functionExpression,\n //value\n path.node.computed,\n // computed\n false // shorthand\n ));\n\n // path now refers to the ObjectProperty AST node path, but we want to return a\n // Function AST node path for the function expression we created. we know that\n // the FunctionExpression we just created is the value of the ObjectProperty,\n // so return the \"value\" path off of this path.\n return path.get(\"value\");\n}","/**\n * Copyright (c) 2014-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\nvar _assert = _interopRequireDefault(require(\"assert\"));\nvar _hoist = require(\"./hoist\");\nvar _emit = require(\"./emit\");\nvar _replaceShorthandObjectMethod = _interopRequireDefault(require(\"./replaceShorthandObjectMethod\"));\nvar util = _interopRequireWildcard(require(\"./util\"));\nfunction _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== \"function\") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }\nfunction _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== \"object\" && typeof obj !== \"function\") { return { \"default\": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== \"default\" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj[\"default\"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }\nexports.getVisitor = function (_ref) {\n var t = _ref.types;\n return {\n Method: function Method(path, state) {\n var node = path.node;\n if (!shouldRegenerate(node, state)) return;\n var container = t.functionExpression(null, [], t.cloneNode(node.body, false), node.generator, node.async);\n path.get(\"body\").set(\"body\", [t.returnStatement(t.callExpression(container, []))]);\n\n // Regardless of whether or not the wrapped function is a an async method\n // or generator the outer function should not be\n node.async = false;\n node.generator = false;\n\n // Unwrap the wrapper IIFE's environment so super and this and such still work.\n path.get(\"body.body.0.argument.callee\").unwrapFunctionEnvironment();\n },\n Function: {\n exit: util.wrapWithTypes(t, function (path, state) {\n var node = path.node;\n if (!shouldRegenerate(node, state)) return;\n\n // if this is an ObjectMethod, we need to convert it to an ObjectProperty\n path = (0, _replaceShorthandObjectMethod[\"default\"])(path);\n node = path.node;\n var contextId = path.scope.generateUidIdentifier(\"context\");\n var argsId = path.scope.generateUidIdentifier(\"args\");\n path.ensureBlock();\n var bodyBlockPath = path.get(\"body\");\n if (node.async) {\n bodyBlockPath.traverse(awaitVisitor);\n }\n bodyBlockPath.traverse(functionSentVisitor, {\n context: contextId\n });\n var outerBody = [];\n var innerBody = [];\n bodyBlockPath.get(\"body\").forEach(function (childPath) {\n var node = childPath.node;\n if (t.isExpressionStatement(node) && t.isStringLiteral(node.expression)) {\n // Babylon represents directives like \"use strict\" as elements\n // of a bodyBlockPath.node.directives array, but they could just\n // as easily be represented (by other parsers) as traditional\n // string-literal-valued expression statements, so we need to\n // handle that here. (#248)\n outerBody.push(node);\n } else if (node && node._blockHoist != null) {\n outerBody.push(node);\n } else {\n innerBody.push(node);\n }\n });\n if (outerBody.length > 0) {\n // Only replace the inner body if we actually hoisted any statements\n // to the outer body.\n bodyBlockPath.node.body = innerBody;\n }\n var outerFnExpr = getOuterFnExpr(path);\n // Note that getOuterFnExpr has the side-effect of ensuring that the\n // function has a name (so node.id will always be an Identifier), even\n // if a temporary name has to be synthesized.\n t.assertIdentifier(node.id);\n var innerFnId = t.identifier(node.id.name + \"$\");\n\n // Turn all declarations into vars, and replace the original\n // declarations with equivalent assignment expressions.\n var vars = (0, _hoist.hoist)(path);\n var context = {\n usesThis: false,\n usesArguments: false,\n getArgsId: function getArgsId() {\n return t.clone(argsId);\n }\n };\n path.traverse(argumentsThisVisitor, context);\n if (context.usesArguments) {\n vars = vars || t.variableDeclaration(\"var\", []);\n vars.declarations.push(t.variableDeclarator(t.clone(argsId), t.identifier(\"arguments\")));\n }\n var emitter = new _emit.Emitter(contextId);\n emitter.explode(path.get(\"body\"));\n if (vars && vars.declarations.length > 0) {\n outerBody.push(vars);\n }\n var wrapArgs = [emitter.getContextFunction(innerFnId)];\n var tryLocsList = emitter.getTryLocsList();\n if (node.generator) {\n wrapArgs.push(outerFnExpr);\n } else if (context.usesThis || tryLocsList || node.async) {\n // Async functions that are not generators don't care about the\n // outer function because they don't need it to be marked and don't\n // inherit from its .prototype.\n wrapArgs.push(t.nullLiteral());\n }\n if (context.usesThis) {\n wrapArgs.push(t.thisExpression());\n } else if (tryLocsList || node.async) {\n wrapArgs.push(t.nullLiteral());\n }\n if (tryLocsList) {\n wrapArgs.push(tryLocsList);\n } else if (node.async) {\n wrapArgs.push(t.nullLiteral());\n }\n if (node.async) {\n // Rename any locally declared \"Promise\" variable,\n // to use the global one.\n var currentScope = path.scope;\n do {\n if (currentScope.hasOwnBinding(\"Promise\")) currentScope.rename(\"Promise\");\n } while (currentScope = currentScope.parent);\n wrapArgs.push(t.identifier(\"Promise\"));\n }\n var wrapCall = t.callExpression(util.runtimeProperty(node.async ? \"async\" : \"wrap\"), wrapArgs);\n outerBody.push(t.returnStatement(wrapCall));\n node.body = t.blockStatement(outerBody);\n // We injected a few new variable declarations (for every hoisted var),\n // so we need to add them to the scope.\n path.get(\"body.body\").forEach(function (p) {\n return p.scope.registerDeclaration(p);\n });\n var oldDirectives = bodyBlockPath.node.directives;\n if (oldDirectives) {\n // Babylon represents directives like \"use strict\" as elements of\n // a bodyBlockPath.node.directives array. (#248)\n node.body.directives = oldDirectives;\n }\n var wasGeneratorFunction = node.generator;\n if (wasGeneratorFunction) {\n node.generator = false;\n }\n if (node.async) {\n node.async = false;\n }\n if (wasGeneratorFunction && t.isExpression(node)) {\n util.replaceWithOrRemove(path, t.callExpression(util.runtimeProperty(\"mark\"), [node]));\n path.addComment(\"leading\", \"#__PURE__\");\n }\n var insertedLocs = emitter.getInsertedLocs();\n path.traverse({\n NumericLiteral: function NumericLiteral(path) {\n if (!insertedLocs.has(path.node)) {\n return;\n }\n path.replaceWith(t.numericLiteral(path.node.value));\n }\n });\n\n // Generators are processed in 'exit' handlers so that regenerator only has to run on\n // an ES5 AST, but that means traversal will not pick up newly inserted references\n // to things like 'regeneratorRuntime'. To avoid this, we explicitly requeue.\n path.requeue();\n })\n }\n };\n};\n\n// Check if a node should be transformed by regenerator\nfunction shouldRegenerate(node, state) {\n if (node.generator) {\n if (node.async) {\n // Async generator\n return state.opts.asyncGenerators !== false;\n } else {\n // Plain generator\n return state.opts.generators !== false;\n }\n } else if (node.async) {\n // Async function\n return state.opts.async !== false;\n } else {\n // Not a generator or async function.\n return false;\n }\n}\n\n// Given a NodePath for a Function, return an Expression node that can be\n// used to refer reliably to the function object from inside the function.\n// This expression is essentially a replacement for arguments.callee, with\n// the key advantage that it works in strict mode.\nfunction getOuterFnExpr(funPath) {\n var t = util.getTypes();\n var node = funPath.node;\n t.assertFunction(node);\n if (!node.id) {\n // Default-exported function declarations, and function expressions may not\n // have a name to reference, so we explicitly add one.\n node.id = funPath.scope.parent.generateUidIdentifier(\"callee\");\n }\n if (node.generator &&\n // Non-generator functions don't need to be marked.\n t.isFunctionDeclaration(node)) {\n // Return the identifier returned by runtime.mark().\n return getMarkedFunctionId(funPath);\n }\n return t.clone(node.id);\n}\nvar markInfo = new WeakMap();\nfunction getMarkInfo(node) {\n if (!markInfo.has(node)) {\n markInfo.set(node, {});\n }\n return markInfo.get(node);\n}\nfunction getMarkedFunctionId(funPath) {\n var t = util.getTypes();\n var node = funPath.node;\n t.assertIdentifier(node.id);\n var blockPath = funPath.findParent(function (path) {\n return path.isProgram() || path.isBlockStatement();\n });\n if (!blockPath) {\n return node.id;\n }\n var block = blockPath.node;\n _assert[\"default\"].ok(Array.isArray(block.body));\n var info = getMarkInfo(block);\n if (!info.decl) {\n info.decl = t.variableDeclaration(\"var\", []);\n blockPath.unshiftContainer(\"body\", info.decl);\n info.declPath = blockPath.get(\"body.0\");\n }\n _assert[\"default\"].strictEqual(info.declPath.node, info.decl);\n\n // Get a new unique identifier for our marked variable.\n var markedId = blockPath.scope.generateUidIdentifier(\"marked\");\n var markCallExp = t.callExpression(util.runtimeProperty(\"mark\"), [t.clone(node.id)]);\n var index = info.decl.declarations.push(t.variableDeclarator(markedId, markCallExp)) - 1;\n var markCallExpPath = info.declPath.get(\"declarations.\" + index + \".init\");\n _assert[\"default\"].strictEqual(markCallExpPath.node, markCallExp);\n markCallExpPath.addComment(\"leading\", \"#__PURE__\");\n return t.clone(markedId);\n}\nvar argumentsThisVisitor = {\n \"FunctionExpression|FunctionDeclaration|Method\": function FunctionExpressionFunctionDeclarationMethod(path) {\n path.skip();\n },\n Identifier: function Identifier(path, state) {\n if (path.node.name === \"arguments\" && util.isReference(path)) {\n util.replaceWithOrRemove(path, state.getArgsId());\n state.usesArguments = true;\n }\n },\n ThisExpression: function ThisExpression(path, state) {\n state.usesThis = true;\n }\n};\nvar functionSentVisitor = {\n MetaProperty: function MetaProperty(path) {\n var node = path.node;\n if (node.meta.name === \"function\" && node.property.name === \"sent\") {\n var t = util.getTypes();\n util.replaceWithOrRemove(path, t.memberExpression(t.clone(this.context), t.identifier(\"_sent\")));\n }\n }\n};\nvar awaitVisitor = {\n Function: function Function(path) {\n path.skip(); // Don't descend into nested function scopes.\n },\n\n AwaitExpression: function AwaitExpression(path) {\n var t = util.getTypes();\n\n // Convert await expressions to yield expressions.\n var argument = path.node.argument;\n\n // Transforming `await x` to `yield regeneratorRuntime.awrap(x)`\n // causes the argument to be wrapped in such a way that the runtime\n // can distinguish between awaited and merely yielded values.\n util.replaceWithOrRemove(path, t.yieldExpression(t.callExpression(util.runtimeProperty(\"awrap\"), [argument]), false));\n }\n};","\"use strict\";\n\nexports.__esModule = true;\nexports[\"default\"] = _default;\nvar _visit = require(\"./visit\");\n/**\n * Copyright (c) 2014-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nfunction _default(context) {\n var plugin = {\n visitor: (0, _visit.getVisitor)(context)\n };\n\n // Some presets manually call child presets, but fail to pass along the\n // context object. Out of an abundance of caution, we verify that it\n // exists first to avoid causing unnecessary breaking changes.\n var version = context && context.version;\n\n // The \"name\" property is not allowed in older versions of Babel (6.x)\n // and will cause the plugin validator to throw an exception.\n if (version && parseInt(version, 10) >= 7) {\n plugin.name = \"regenerator-transform\";\n }\n return plugin;\n}","import { declare } from \"@babel/helper-plugin-utils\";\nimport type { types as t } from \"@babel/core\";\nimport regeneratorTransform from \"regenerator-transform\";\n\nexport default declare(({ types: t, assertVersion }) => {\n assertVersion(REQUIRED_VERSION(7));\n\n return {\n name: \"transform-regenerator\",\n\n inherits: regeneratorTransform.default,\n\n visitor: {\n // We visit CallExpression so that we always transform\n // regeneratorRuntime.*() before babel-plugin-polyfill-regenerator.\n CallExpression(path) {\n if (!process.env.BABEL_8_BREAKING) {\n if (!this.availableHelper?.(\"regeneratorRuntime\")) {\n // When using an older @babel/helpers version, fallback\n // to the old behavior.\n // TODO: Remove this in Babel 8.\n return;\n }\n }\n\n const callee = path.get(\"callee\");\n if (!callee.isMemberExpression()) return;\n\n const obj = callee.get(\"object\");\n if (obj.isIdentifier({ name: \"regeneratorRuntime\" })) {\n const helper = this.addHelper(\"regeneratorRuntime\") as\n | t.Identifier\n | t.ArrowFunctionExpression;\n\n if (!process.env.BABEL_8_BREAKING) {\n if (\n // TODO: Remove this in Babel 8, it's necessary to\n // avoid the IIFE when using older Babel versions.\n t.isArrowFunctionExpression(helper)\n ) {\n obj.replaceWith(helper.body);\n return;\n }\n }\n\n obj.replaceWith(t.callExpression(helper, []));\n }\n },\n },\n };\n});\n","import { declare } from \"@babel/helper-plugin-utils\";\nimport { types as t, type NodePath } from \"@babel/core\";\n\nexport default declare(api => {\n api.assertVersion(REQUIRED_VERSION(7));\n\n return {\n name: \"transform-reserved-words\",\n\n visitor: {\n \"BindingIdentifier|ReferencedIdentifier\"(path: NodePath) {\n if (!t.isValidES3Identifier(path.node.name)) {\n path.scope.rename(path.node.name);\n }\n },\n },\n };\n});\n","// env vars from the cli are always strings, so !!ENV_VAR returns true for \"false\"\nfunction bool(value) {\n if (value == null) return false;\n return value && value !== \"false\" && value !== \"0\";\n}\n\nmodule.exports = bool(process.env[\"BABEL_8_BREAKING\"])\n ? require(\"semver-BABEL_8_BREAKING-true\")\n : require(\"semver-BABEL_8_BREAKING-false\");\n","import semver from \"semver\";\n\nexport function hasMinVersion(\n minVersion: string,\n runtimeVersion: string | void,\n) {\n // If the range is unavailable, we're running the script during Babel's\n // build process, and we want to assume that all versions are satisfied so\n // that the built output will include all definitions.\n if (!runtimeVersion) return true;\n\n // semver.intersects() has some surprising behavior with comparing ranges\n // with pre-release versions. We add '^' to ensure that we are always\n // comparing ranges with ranges, which sidesteps this logic.\n // For example:\n //\n // semver.intersects(`<7.0.1`, \"7.0.0-beta.0\") // false - surprising\n // semver.intersects(`<7.0.1`, \"^7.0.0-beta.0\") // true - expected\n //\n // This is because the first falls back to\n //\n // semver.satisfies(\"7.0.0-beta.0\", `<7.0.1`) // false - surprising\n //\n // and this fails because a prerelease version can only satisfy a range\n // if it is a prerelease within the same major/minor/patch range.\n //\n // Note: If this is found to have issues, please also revisit the logic in\n // babel-core's availableHelper() API.\n if (semver.valid(runtimeVersion)) runtimeVersion = `^${runtimeVersion}`;\n\n return (\n !semver.intersects(`<${minVersion}`, runtimeVersion) &&\n !semver.intersects(`>=8.0.0`, runtimeVersion)\n );\n}\n","export default function (\n moduleName: string,\n dirname: string,\n absoluteRuntime: string | boolean,\n) {\n if (absoluteRuntime === false) return moduleName;\n\n resolveFSPath();\n}\n\nexport function resolveFSPath() {\n throw new Error(\n \"The 'absoluteRuntime' option is not supported when using @babel/standalone.\",\n );\n}\n","// Todo (Babel 8): remove this file as Babel 8 drop support of core-js 2\nmodule.exports = require(\"./data/corejs2-built-ins.json\");\n","\"use strict\";\n\nexports.__esModule = true;\nexports.StaticProperties = exports.InstanceProperties = exports.CommonIterators = exports.BuiltIns = void 0;\nvar _corejs2BuiltIns = _interopRequireDefault(require(\"@babel/compat-data/corejs2-built-ins\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nconst define = (name, pure, global = [], meta) => {\n return {\n name,\n pure,\n global,\n meta\n };\n};\nconst pureAndGlobal = (pure, global, minRuntimeVersion = null) => define(global[0], pure, global, {\n minRuntimeVersion\n});\nconst globalOnly = global => define(global[0], null, global);\nconst pureOnly = (pure, name) => define(name, pure, []);\nconst ArrayNatureIterators = [\"es6.object.to-string\", \"es6.array.iterator\", \"web.dom.iterable\"];\nconst CommonIterators = [\"es6.string.iterator\", ...ArrayNatureIterators];\nexports.CommonIterators = CommonIterators;\nconst PromiseDependencies = [\"es6.object.to-string\", \"es6.promise\"];\nconst BuiltIns = {\n DataView: globalOnly([\"es6.typed.data-view\"]),\n Float32Array: globalOnly([\"es6.typed.float32-array\"]),\n Float64Array: globalOnly([\"es6.typed.float64-array\"]),\n Int8Array: globalOnly([\"es6.typed.int8-array\"]),\n Int16Array: globalOnly([\"es6.typed.int16-array\"]),\n Int32Array: globalOnly([\"es6.typed.int32-array\"]),\n Map: pureAndGlobal(\"map\", [\"es6.map\", ...CommonIterators]),\n Number: globalOnly([\"es6.number.constructor\"]),\n Promise: pureAndGlobal(\"promise\", PromiseDependencies),\n RegExp: globalOnly([\"es6.regexp.constructor\"]),\n Set: pureAndGlobal(\"set\", [\"es6.set\", ...CommonIterators]),\n Symbol: pureAndGlobal(\"symbol/index\", [\"es6.symbol\"]),\n Uint8Array: globalOnly([\"es6.typed.uint8-array\"]),\n Uint8ClampedArray: globalOnly([\"es6.typed.uint8-clamped-array\"]),\n Uint16Array: globalOnly([\"es6.typed.uint16-array\"]),\n Uint32Array: globalOnly([\"es6.typed.uint32-array\"]),\n WeakMap: pureAndGlobal(\"weak-map\", [\"es6.weak-map\", ...CommonIterators]),\n WeakSet: pureAndGlobal(\"weak-set\", [\"es6.weak-set\", ...CommonIterators]),\n setImmediate: pureOnly(\"set-immediate\", \"web.immediate\"),\n clearImmediate: pureOnly(\"clear-immediate\", \"web.immediate\"),\n parseFloat: pureOnly(\"parse-float\", \"es6.parse-float\"),\n parseInt: pureOnly(\"parse-int\", \"es6.parse-int\")\n};\nexports.BuiltIns = BuiltIns;\nconst InstanceProperties = {\n __defineGetter__: globalOnly([\"es7.object.define-getter\"]),\n __defineSetter__: globalOnly([\"es7.object.define-setter\"]),\n __lookupGetter__: globalOnly([\"es7.object.lookup-getter\"]),\n __lookupSetter__: globalOnly([\"es7.object.lookup-setter\"]),\n anchor: globalOnly([\"es6.string.anchor\"]),\n big: globalOnly([\"es6.string.big\"]),\n bind: globalOnly([\"es6.function.bind\"]),\n blink: globalOnly([\"es6.string.blink\"]),\n bold: globalOnly([\"es6.string.bold\"]),\n codePointAt: globalOnly([\"es6.string.code-point-at\"]),\n copyWithin: globalOnly([\"es6.array.copy-within\"]),\n endsWith: globalOnly([\"es6.string.ends-with\"]),\n entries: globalOnly(ArrayNatureIterators),\n every: globalOnly([\"es6.array.every\"]),\n fill: globalOnly([\"es6.array.fill\"]),\n filter: globalOnly([\"es6.array.filter\"]),\n finally: globalOnly([\"es7.promise.finally\", ...PromiseDependencies]),\n find: globalOnly([\"es6.array.find\"]),\n findIndex: globalOnly([\"es6.array.find-index\"]),\n fixed: globalOnly([\"es6.string.fixed\"]),\n flags: globalOnly([\"es6.regexp.flags\"]),\n flatMap: globalOnly([\"es7.array.flat-map\"]),\n fontcolor: globalOnly([\"es6.string.fontcolor\"]),\n fontsize: globalOnly([\"es6.string.fontsize\"]),\n forEach: globalOnly([\"es6.array.for-each\"]),\n includes: globalOnly([\"es6.string.includes\", \"es7.array.includes\"]),\n indexOf: globalOnly([\"es6.array.index-of\"]),\n italics: globalOnly([\"es6.string.italics\"]),\n keys: globalOnly(ArrayNatureIterators),\n lastIndexOf: globalOnly([\"es6.array.last-index-of\"]),\n link: globalOnly([\"es6.string.link\"]),\n map: globalOnly([\"es6.array.map\"]),\n match: globalOnly([\"es6.regexp.match\"]),\n name: globalOnly([\"es6.function.name\"]),\n padStart: globalOnly([\"es7.string.pad-start\"]),\n padEnd: globalOnly([\"es7.string.pad-end\"]),\n reduce: globalOnly([\"es6.array.reduce\"]),\n reduceRight: globalOnly([\"es6.array.reduce-right\"]),\n repeat: globalOnly([\"es6.string.repeat\"]),\n replace: globalOnly([\"es6.regexp.replace\"]),\n search: globalOnly([\"es6.regexp.search\"]),\n small: globalOnly([\"es6.string.small\"]),\n some: globalOnly([\"es6.array.some\"]),\n sort: globalOnly([\"es6.array.sort\"]),\n split: globalOnly([\"es6.regexp.split\"]),\n startsWith: globalOnly([\"es6.string.starts-with\"]),\n strike: globalOnly([\"es6.string.strike\"]),\n sub: globalOnly([\"es6.string.sub\"]),\n sup: globalOnly([\"es6.string.sup\"]),\n toISOString: globalOnly([\"es6.date.to-iso-string\"]),\n toJSON: globalOnly([\"es6.date.to-json\"]),\n toString: globalOnly([\"es6.object.to-string\", \"es6.date.to-string\", \"es6.regexp.to-string\"]),\n trim: globalOnly([\"es6.string.trim\"]),\n trimEnd: globalOnly([\"es7.string.trim-right\"]),\n trimLeft: globalOnly([\"es7.string.trim-left\"]),\n trimRight: globalOnly([\"es7.string.trim-right\"]),\n trimStart: globalOnly([\"es7.string.trim-left\"]),\n values: globalOnly(ArrayNatureIterators)\n};\n\n// This isn't present in older @babel/compat-data versions\nexports.InstanceProperties = InstanceProperties;\nif (\"es6.array.slice\" in _corejs2BuiltIns.default) {\n InstanceProperties.slice = globalOnly([\"es6.array.slice\"]);\n}\nconst StaticProperties = {\n Array: {\n from: pureAndGlobal(\"array/from\", [\"es6.symbol\", \"es6.array.from\", ...CommonIterators]),\n isArray: pureAndGlobal(\"array/is-array\", [\"es6.array.is-array\"]),\n of: pureAndGlobal(\"array/of\", [\"es6.array.of\"])\n },\n Date: {\n now: pureAndGlobal(\"date/now\", [\"es6.date.now\"])\n },\n JSON: {\n stringify: pureOnly(\"json/stringify\", \"es6.symbol\")\n },\n Math: {\n // 'Math' was not included in the 7.0.0\n // release of '@babel/runtime'. See issue https://github.com/babel/babel/pull/8616.\n acosh: pureAndGlobal(\"math/acosh\", [\"es6.math.acosh\"], \"7.0.1\"),\n asinh: pureAndGlobal(\"math/asinh\", [\"es6.math.asinh\"], \"7.0.1\"),\n atanh: pureAndGlobal(\"math/atanh\", [\"es6.math.atanh\"], \"7.0.1\"),\n cbrt: pureAndGlobal(\"math/cbrt\", [\"es6.math.cbrt\"], \"7.0.1\"),\n clz32: pureAndGlobal(\"math/clz32\", [\"es6.math.clz32\"], \"7.0.1\"),\n cosh: pureAndGlobal(\"math/cosh\", [\"es6.math.cosh\"], \"7.0.1\"),\n expm1: pureAndGlobal(\"math/expm1\", [\"es6.math.expm1\"], \"7.0.1\"),\n fround: pureAndGlobal(\"math/fround\", [\"es6.math.fround\"], \"7.0.1\"),\n hypot: pureAndGlobal(\"math/hypot\", [\"es6.math.hypot\"], \"7.0.1\"),\n imul: pureAndGlobal(\"math/imul\", [\"es6.math.imul\"], \"7.0.1\"),\n log1p: pureAndGlobal(\"math/log1p\", [\"es6.math.log1p\"], \"7.0.1\"),\n log10: pureAndGlobal(\"math/log10\", [\"es6.math.log10\"], \"7.0.1\"),\n log2: pureAndGlobal(\"math/log2\", [\"es6.math.log2\"], \"7.0.1\"),\n sign: pureAndGlobal(\"math/sign\", [\"es6.math.sign\"], \"7.0.1\"),\n sinh: pureAndGlobal(\"math/sinh\", [\"es6.math.sinh\"], \"7.0.1\"),\n tanh: pureAndGlobal(\"math/tanh\", [\"es6.math.tanh\"], \"7.0.1\"),\n trunc: pureAndGlobal(\"math/trunc\", [\"es6.math.trunc\"], \"7.0.1\")\n },\n Number: {\n EPSILON: pureAndGlobal(\"number/epsilon\", [\"es6.number.epsilon\"]),\n MIN_SAFE_INTEGER: pureAndGlobal(\"number/min-safe-integer\", [\"es6.number.min-safe-integer\"]),\n MAX_SAFE_INTEGER: pureAndGlobal(\"number/max-safe-integer\", [\"es6.number.max-safe-integer\"]),\n isFinite: pureAndGlobal(\"number/is-finite\", [\"es6.number.is-finite\"]),\n isInteger: pureAndGlobal(\"number/is-integer\", [\"es6.number.is-integer\"]),\n isSafeInteger: pureAndGlobal(\"number/is-safe-integer\", [\"es6.number.is-safe-integer\"]),\n isNaN: pureAndGlobal(\"number/is-nan\", [\"es6.number.is-nan\"]),\n parseFloat: pureAndGlobal(\"number/parse-float\", [\"es6.number.parse-float\"]),\n parseInt: pureAndGlobal(\"number/parse-int\", [\"es6.number.parse-int\"])\n },\n Object: {\n assign: pureAndGlobal(\"object/assign\", [\"es6.object.assign\"]),\n create: pureAndGlobal(\"object/create\", [\"es6.object.create\"]),\n defineProperties: pureAndGlobal(\"object/define-properties\", [\"es6.object.define-properties\"]),\n defineProperty: pureAndGlobal(\"object/define-property\", [\"es6.object.define-property\"]),\n entries: pureAndGlobal(\"object/entries\", [\"es7.object.entries\"]),\n freeze: pureAndGlobal(\"object/freeze\", [\"es6.object.freeze\"]),\n getOwnPropertyDescriptor: pureAndGlobal(\"object/get-own-property-descriptor\", [\"es6.object.get-own-property-descriptor\"]),\n getOwnPropertyDescriptors: pureAndGlobal(\"object/get-own-property-descriptors\", [\"es7.object.get-own-property-descriptors\"]),\n getOwnPropertyNames: pureAndGlobal(\"object/get-own-property-names\", [\"es6.object.get-own-property-names\"]),\n getOwnPropertySymbols: pureAndGlobal(\"object/get-own-property-symbols\", [\"es6.symbol\"]),\n getPrototypeOf: pureAndGlobal(\"object/get-prototype-of\", [\"es6.object.get-prototype-of\"]),\n is: pureAndGlobal(\"object/is\", [\"es6.object.is\"]),\n isExtensible: pureAndGlobal(\"object/is-extensible\", [\"es6.object.is-extensible\"]),\n isFrozen: pureAndGlobal(\"object/is-frozen\", [\"es6.object.is-frozen\"]),\n isSealed: pureAndGlobal(\"object/is-sealed\", [\"es6.object.is-sealed\"]),\n keys: pureAndGlobal(\"object/keys\", [\"es6.object.keys\"]),\n preventExtensions: pureAndGlobal(\"object/prevent-extensions\", [\"es6.object.prevent-extensions\"]),\n seal: pureAndGlobal(\"object/seal\", [\"es6.object.seal\"]),\n setPrototypeOf: pureAndGlobal(\"object/set-prototype-of\", [\"es6.object.set-prototype-of\"]),\n values: pureAndGlobal(\"object/values\", [\"es7.object.values\"])\n },\n Promise: {\n all: globalOnly(CommonIterators),\n race: globalOnly(CommonIterators)\n },\n Reflect: {\n apply: pureAndGlobal(\"reflect/apply\", [\"es6.reflect.apply\"]),\n construct: pureAndGlobal(\"reflect/construct\", [\"es6.reflect.construct\"]),\n defineProperty: pureAndGlobal(\"reflect/define-property\", [\"es6.reflect.define-property\"]),\n deleteProperty: pureAndGlobal(\"reflect/delete-property\", [\"es6.reflect.delete-property\"]),\n get: pureAndGlobal(\"reflect/get\", [\"es6.reflect.get\"]),\n getOwnPropertyDescriptor: pureAndGlobal(\"reflect/get-own-property-descriptor\", [\"es6.reflect.get-own-property-descriptor\"]),\n getPrototypeOf: pureAndGlobal(\"reflect/get-prototype-of\", [\"es6.reflect.get-prototype-of\"]),\n has: pureAndGlobal(\"reflect/has\", [\"es6.reflect.has\"]),\n isExtensible: pureAndGlobal(\"reflect/is-extensible\", [\"es6.reflect.is-extensible\"]),\n ownKeys: pureAndGlobal(\"reflect/own-keys\", [\"es6.reflect.own-keys\"]),\n preventExtensions: pureAndGlobal(\"reflect/prevent-extensions\", [\"es6.reflect.prevent-extensions\"]),\n set: pureAndGlobal(\"reflect/set\", [\"es6.reflect.set\"]),\n setPrototypeOf: pureAndGlobal(\"reflect/set-prototype-of\", [\"es6.reflect.set-prototype-of\"])\n },\n String: {\n at: pureOnly(\"string/at\", \"es7.string.at\"),\n fromCodePoint: pureAndGlobal(\"string/from-code-point\", [\"es6.string.from-code-point\"]),\n raw: pureAndGlobal(\"string/raw\", [\"es6.string.raw\"])\n },\n Symbol: {\n // FIXME: Pure disabled to work around zloirock/core-js#262.\n asyncIterator: globalOnly([\"es6.symbol\", \"es7.symbol.async-iterator\"]),\n for: pureOnly(\"symbol/for\", \"es6.symbol\"),\n hasInstance: pureOnly(\"symbol/has-instance\", \"es6.symbol\"),\n isConcatSpreadable: pureOnly(\"symbol/is-concat-spreadable\", \"es6.symbol\"),\n iterator: define(\"es6.symbol\", \"symbol/iterator\", CommonIterators),\n keyFor: pureOnly(\"symbol/key-for\", \"es6.symbol\"),\n match: pureAndGlobal(\"symbol/match\", [\"es6.regexp.match\"]),\n replace: pureOnly(\"symbol/replace\", \"es6.symbol\"),\n search: pureOnly(\"symbol/search\", \"es6.symbol\"),\n species: pureOnly(\"symbol/species\", \"es6.symbol\"),\n split: pureOnly(\"symbol/split\", \"es6.symbol\"),\n toPrimitive: pureOnly(\"symbol/to-primitive\", \"es6.symbol\"),\n toStringTag: pureOnly(\"symbol/to-string-tag\", \"es6.symbol\"),\n unscopables: pureOnly(\"symbol/unscopables\", \"es6.symbol\")\n }\n};\nexports.StaticProperties = StaticProperties;","\"use strict\";\n\nexports.__esModule = true;\nexports.default = _default;\nfunction _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nconst webPolyfills = {\n \"web.timers\": {},\n \"web.immediate\": {},\n \"web.dom.iterable\": {}\n};\nconst purePolyfills = {\n \"es6.parse-float\": {},\n \"es6.parse-int\": {},\n \"es7.string.at\": {}\n};\nfunction _default(targets, method, polyfills) {\n const targetNames = Object.keys(targets);\n const isAnyTarget = !targetNames.length;\n const isWebTarget = targetNames.some(name => name !== \"node\");\n return _extends({}, polyfills, method === \"usage-pure\" ? purePolyfills : null, isAnyTarget || isWebTarget ? webPolyfills : null);\n}","exports = module.exports = SemVer\n\nvar debug\n/* istanbul ignore next */\nif (typeof process === 'object' &&\n process.env &&\n process.env.NODE_DEBUG &&\n /\\bsemver\\b/i.test(process.env.NODE_DEBUG)) {\n debug = function () {\n var args = Array.prototype.slice.call(arguments, 0)\n args.unshift('SEMVER')\n console.log.apply(console, args)\n }\n} else {\n debug = function () {}\n}\n\n// Note: this is the semver.org version of the spec that it implements\n// Not necessarily the package version of this code.\nexports.SEMVER_SPEC_VERSION = '2.0.0'\n\nvar MAX_LENGTH = 256\nvar MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER ||\n /* istanbul ignore next */ 9007199254740991\n\n// Max safe segment length for coercion.\nvar MAX_SAFE_COMPONENT_LENGTH = 16\n\nvar MAX_SAFE_BUILD_LENGTH = MAX_LENGTH - 6\n\n// The actual regexps go on exports.re\nvar re = exports.re = []\nvar safeRe = exports.safeRe = []\nvar src = exports.src = []\nvar t = exports.tokens = {}\nvar R = 0\n\nfunction tok (n) {\n t[n] = R++\n}\n\nvar LETTERDASHNUMBER = '[a-zA-Z0-9-]'\n\n// Replace some greedy regex tokens to prevent regex dos issues. These regex are\n// used internally via the safeRe object since all inputs in this library get\n// normalized first to trim and collapse all extra whitespace. The original\n// regexes are exported for userland consumption and lower level usage. A\n// future breaking change could export the safer regex only with a note that\n// all input should have extra whitespace removed.\nvar safeRegexReplacements = [\n ['\\\\s', 1],\n ['\\\\d', MAX_LENGTH],\n [LETTERDASHNUMBER, MAX_SAFE_BUILD_LENGTH],\n]\n\nfunction makeSafeRe (value) {\n for (var i = 0; i < safeRegexReplacements.length; i++) {\n var token = safeRegexReplacements[i][0]\n var max = safeRegexReplacements[i][1]\n value = value\n .split(token + '*').join(token + '{0,' + max + '}')\n .split(token + '+').join(token + '{1,' + max + '}')\n }\n return value\n}\n\n// The following Regular Expressions can be used for tokenizing,\n// validating, and parsing SemVer version strings.\n\n// ## Numeric Identifier\n// A single `0`, or a non-zero digit followed by zero or more digits.\n\ntok('NUMERICIDENTIFIER')\nsrc[t.NUMERICIDENTIFIER] = '0|[1-9]\\\\d*'\ntok('NUMERICIDENTIFIERLOOSE')\nsrc[t.NUMERICIDENTIFIERLOOSE] = '\\\\d+'\n\n// ## Non-numeric Identifier\n// Zero or more digits, followed by a letter or hyphen, and then zero or\n// more letters, digits, or hyphens.\n\ntok('NONNUMERICIDENTIFIER')\nsrc[t.NONNUMERICIDENTIFIER] = '\\\\d*[a-zA-Z-]' + LETTERDASHNUMBER + '*'\n\n// ## Main Version\n// Three dot-separated numeric identifiers.\n\ntok('MAINVERSION')\nsrc[t.MAINVERSION] = '(' + src[t.NUMERICIDENTIFIER] + ')\\\\.' +\n '(' + src[t.NUMERICIDENTIFIER] + ')\\\\.' +\n '(' + src[t.NUMERICIDENTIFIER] + ')'\n\ntok('MAINVERSIONLOOSE')\nsrc[t.MAINVERSIONLOOSE] = '(' + src[t.NUMERICIDENTIFIERLOOSE] + ')\\\\.' +\n '(' + src[t.NUMERICIDENTIFIERLOOSE] + ')\\\\.' +\n '(' + src[t.NUMERICIDENTIFIERLOOSE] + ')'\n\n// ## Pre-release Version Identifier\n// A numeric identifier, or a non-numeric identifier.\n\ntok('PRERELEASEIDENTIFIER')\nsrc[t.PRERELEASEIDENTIFIER] = '(?:' + src[t.NUMERICIDENTIFIER] +\n '|' + src[t.NONNUMERICIDENTIFIER] + ')'\n\ntok('PRERELEASEIDENTIFIERLOOSE')\nsrc[t.PRERELEASEIDENTIFIERLOOSE] = '(?:' + src[t.NUMERICIDENTIFIERLOOSE] +\n '|' + src[t.NONNUMERICIDENTIFIER] + ')'\n\n// ## Pre-release Version\n// Hyphen, followed by one or more dot-separated pre-release version\n// identifiers.\n\ntok('PRERELEASE')\nsrc[t.PRERELEASE] = '(?:-(' + src[t.PRERELEASEIDENTIFIER] +\n '(?:\\\\.' + src[t.PRERELEASEIDENTIFIER] + ')*))'\n\ntok('PRERELEASELOOSE')\nsrc[t.PRERELEASELOOSE] = '(?:-?(' + src[t.PRERELEASEIDENTIFIERLOOSE] +\n '(?:\\\\.' + src[t.PRERELEASEIDENTIFIERLOOSE] + ')*))'\n\n// ## Build Metadata Identifier\n// Any combination of digits, letters, or hyphens.\n\ntok('BUILDIDENTIFIER')\nsrc[t.BUILDIDENTIFIER] = LETTERDASHNUMBER + '+'\n\n// ## Build Metadata\n// Plus sign, followed by one or more period-separated build metadata\n// identifiers.\n\ntok('BUILD')\nsrc[t.BUILD] = '(?:\\\\+(' + src[t.BUILDIDENTIFIER] +\n '(?:\\\\.' + src[t.BUILDIDENTIFIER] + ')*))'\n\n// ## Full Version String\n// A main version, followed optionally by a pre-release version and\n// build metadata.\n\n// Note that the only major, minor, patch, and pre-release sections of\n// the version string are capturing groups. The build metadata is not a\n// capturing group, because it should not ever be used in version\n// comparison.\n\ntok('FULL')\ntok('FULLPLAIN')\nsrc[t.FULLPLAIN] = 'v?' + src[t.MAINVERSION] +\n src[t.PRERELEASE] + '?' +\n src[t.BUILD] + '?'\n\nsrc[t.FULL] = '^' + src[t.FULLPLAIN] + '$'\n\n// like full, but allows v1.2.3 and =1.2.3, which people do sometimes.\n// also, 1.0.0alpha1 (prerelease without the hyphen) which is pretty\n// common in the npm registry.\ntok('LOOSEPLAIN')\nsrc[t.LOOSEPLAIN] = '[v=\\\\s]*' + src[t.MAINVERSIONLOOSE] +\n src[t.PRERELEASELOOSE] + '?' +\n src[t.BUILD] + '?'\n\ntok('LOOSE')\nsrc[t.LOOSE] = '^' + src[t.LOOSEPLAIN] + '$'\n\ntok('GTLT')\nsrc[t.GTLT] = '((?:<|>)?=?)'\n\n// Something like \"2.*\" or \"1.2.x\".\n// Note that \"x.x\" is a valid xRange identifer, meaning \"any version\"\n// Only the first item is strictly required.\ntok('XRANGEIDENTIFIERLOOSE')\nsrc[t.XRANGEIDENTIFIERLOOSE] = src[t.NUMERICIDENTIFIERLOOSE] + '|x|X|\\\\*'\ntok('XRANGEIDENTIFIER')\nsrc[t.XRANGEIDENTIFIER] = src[t.NUMERICIDENTIFIER] + '|x|X|\\\\*'\n\ntok('XRANGEPLAIN')\nsrc[t.XRANGEPLAIN] = '[v=\\\\s]*(' + src[t.XRANGEIDENTIFIER] + ')' +\n '(?:\\\\.(' + src[t.XRANGEIDENTIFIER] + ')' +\n '(?:\\\\.(' + src[t.XRANGEIDENTIFIER] + ')' +\n '(?:' + src[t.PRERELEASE] + ')?' +\n src[t.BUILD] + '?' +\n ')?)?'\n\ntok('XRANGEPLAINLOOSE')\nsrc[t.XRANGEPLAINLOOSE] = '[v=\\\\s]*(' + src[t.XRANGEIDENTIFIERLOOSE] + ')' +\n '(?:\\\\.(' + src[t.XRANGEIDENTIFIERLOOSE] + ')' +\n '(?:\\\\.(' + src[t.XRANGEIDENTIFIERLOOSE] + ')' +\n '(?:' + src[t.PRERELEASELOOSE] + ')?' +\n src[t.BUILD] + '?' +\n ')?)?'\n\ntok('XRANGE')\nsrc[t.XRANGE] = '^' + src[t.GTLT] + '\\\\s*' + src[t.XRANGEPLAIN] + '$'\ntok('XRANGELOOSE')\nsrc[t.XRANGELOOSE] = '^' + src[t.GTLT] + '\\\\s*' + src[t.XRANGEPLAINLOOSE] + '$'\n\n// Coercion.\n// Extract anything that could conceivably be a part of a valid semver\ntok('COERCE')\nsrc[t.COERCE] = '(^|[^\\\\d])' +\n '(\\\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '})' +\n '(?:\\\\.(\\\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '}))?' +\n '(?:\\\\.(\\\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '}))?' +\n '(?:$|[^\\\\d])'\ntok('COERCERTL')\nre[t.COERCERTL] = new RegExp(src[t.COERCE], 'g')\nsafeRe[t.COERCERTL] = new RegExp(makeSafeRe(src[t.COERCE]), 'g')\n\n// Tilde ranges.\n// Meaning is \"reasonably at or greater than\"\ntok('LONETILDE')\nsrc[t.LONETILDE] = '(?:~>?)'\n\ntok('TILDETRIM')\nsrc[t.TILDETRIM] = '(\\\\s*)' + src[t.LONETILDE] + '\\\\s+'\nre[t.TILDETRIM] = new RegExp(src[t.TILDETRIM], 'g')\nsafeRe[t.TILDETRIM] = new RegExp(makeSafeRe(src[t.TILDETRIM]), 'g')\nvar tildeTrimReplace = '$1~'\n\ntok('TILDE')\nsrc[t.TILDE] = '^' + src[t.LONETILDE] + src[t.XRANGEPLAIN] + '$'\ntok('TILDELOOSE')\nsrc[t.TILDELOOSE] = '^' + src[t.LONETILDE] + src[t.XRANGEPLAINLOOSE] + '$'\n\n// Caret ranges.\n// Meaning is \"at least and backwards compatible with\"\ntok('LONECARET')\nsrc[t.LONECARET] = '(?:\\\\^)'\n\ntok('CARETTRIM')\nsrc[t.CARETTRIM] = '(\\\\s*)' + src[t.LONECARET] + '\\\\s+'\nre[t.CARETTRIM] = new RegExp(src[t.CARETTRIM], 'g')\nsafeRe[t.CARETTRIM] = new RegExp(makeSafeRe(src[t.CARETTRIM]), 'g')\nvar caretTrimReplace = '$1^'\n\ntok('CARET')\nsrc[t.CARET] = '^' + src[t.LONECARET] + src[t.XRANGEPLAIN] + '$'\ntok('CARETLOOSE')\nsrc[t.CARETLOOSE] = '^' + src[t.LONECARET] + src[t.XRANGEPLAINLOOSE] + '$'\n\n// A simple gt/lt/eq thing, or just \"\" to indicate \"any version\"\ntok('COMPARATORLOOSE')\nsrc[t.COMPARATORLOOSE] = '^' + src[t.GTLT] + '\\\\s*(' + src[t.LOOSEPLAIN] + ')$|^$'\ntok('COMPARATOR')\nsrc[t.COMPARATOR] = '^' + src[t.GTLT] + '\\\\s*(' + src[t.FULLPLAIN] + ')$|^$'\n\n// An expression to strip any whitespace between the gtlt and the thing\n// it modifies, so that `> 1.2.3` ==> `>1.2.3`\ntok('COMPARATORTRIM')\nsrc[t.COMPARATORTRIM] = '(\\\\s*)' + src[t.GTLT] +\n '\\\\s*(' + src[t.LOOSEPLAIN] + '|' + src[t.XRANGEPLAIN] + ')'\n\n// this one has to use the /g flag\nre[t.COMPARATORTRIM] = new RegExp(src[t.COMPARATORTRIM], 'g')\nsafeRe[t.COMPARATORTRIM] = new RegExp(makeSafeRe(src[t.COMPARATORTRIM]), 'g')\nvar comparatorTrimReplace = '$1$2$3'\n\n// Something like `1.2.3 - 1.2.4`\n// Note that these all use the loose form, because they'll be\n// checked against either the strict or loose comparator form\n// later.\ntok('HYPHENRANGE')\nsrc[t.HYPHENRANGE] = '^\\\\s*(' + src[t.XRANGEPLAIN] + ')' +\n '\\\\s+-\\\\s+' +\n '(' + src[t.XRANGEPLAIN] + ')' +\n '\\\\s*$'\n\ntok('HYPHENRANGELOOSE')\nsrc[t.HYPHENRANGELOOSE] = '^\\\\s*(' + src[t.XRANGEPLAINLOOSE] + ')' +\n '\\\\s+-\\\\s+' +\n '(' + src[t.XRANGEPLAINLOOSE] + ')' +\n '\\\\s*$'\n\n// Star ranges basically just allow anything at all.\ntok('STAR')\nsrc[t.STAR] = '(<|>)?=?\\\\s*\\\\*'\n\n// Compile to actual regexp objects.\n// All are flag-free, unless they were created above with a flag.\nfor (var i = 0; i < R; i++) {\n debug(i, src[i])\n if (!re[i]) {\n re[i] = new RegExp(src[i])\n\n // Replace all greedy whitespace to prevent regex dos issues. These regex are\n // used internally via the safeRe object since all inputs in this library get\n // normalized first to trim and collapse all extra whitespace. The original\n // regexes are exported for userland consumption and lower level usage. A\n // future breaking change could export the safer regex only with a note that\n // all input should have extra whitespace removed.\n safeRe[i] = new RegExp(makeSafeRe(src[i]))\n }\n}\n\nexports.parse = parse\nfunction parse (version, options) {\n if (!options || typeof options !== 'object') {\n options = {\n loose: !!options,\n includePrerelease: false\n }\n }\n\n if (version instanceof SemVer) {\n return version\n }\n\n if (typeof version !== 'string') {\n return null\n }\n\n if (version.length > MAX_LENGTH) {\n return null\n }\n\n var r = options.loose ? safeRe[t.LOOSE] : safeRe[t.FULL]\n if (!r.test(version)) {\n return null\n }\n\n try {\n return new SemVer(version, options)\n } catch (er) {\n return null\n }\n}\n\nexports.valid = valid\nfunction valid (version, options) {\n var v = parse(version, options)\n return v ? v.version : null\n}\n\nexports.clean = clean\nfunction clean (version, options) {\n var s = parse(version.trim().replace(/^[=v]+/, ''), options)\n return s ? s.version : null\n}\n\nexports.SemVer = SemVer\n\nfunction SemVer (version, options) {\n if (!options || typeof options !== 'object') {\n options = {\n loose: !!options,\n includePrerelease: false\n }\n }\n if (version instanceof SemVer) {\n if (version.loose === options.loose) {\n return version\n } else {\n version = version.version\n }\n } else if (typeof version !== 'string') {\n throw new TypeError('Invalid Version: ' + version)\n }\n\n if (version.length > MAX_LENGTH) {\n throw new TypeError('version is longer than ' + MAX_LENGTH + ' characters')\n }\n\n if (!(this instanceof SemVer)) {\n return new SemVer(version, options)\n }\n\n debug('SemVer', version, options)\n this.options = options\n this.loose = !!options.loose\n\n var m = version.trim().match(options.loose ? safeRe[t.LOOSE] : safeRe[t.FULL])\n\n if (!m) {\n throw new TypeError('Invalid Version: ' + version)\n }\n\n this.raw = version\n\n // these are actually numbers\n this.major = +m[1]\n this.minor = +m[2]\n this.patch = +m[3]\n\n if (this.major > MAX_SAFE_INTEGER || this.major < 0) {\n throw new TypeError('Invalid major version')\n }\n\n if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) {\n throw new TypeError('Invalid minor version')\n }\n\n if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) {\n throw new TypeError('Invalid patch version')\n }\n\n // numberify any prerelease numeric ids\n if (!m[4]) {\n this.prerelease = []\n } else {\n this.prerelease = m[4].split('.').map(function (id) {\n if (/^[0-9]+$/.test(id)) {\n var num = +id\n if (num >= 0 && num < MAX_SAFE_INTEGER) {\n return num\n }\n }\n return id\n })\n }\n\n this.build = m[5] ? m[5].split('.') : []\n this.format()\n}\n\nSemVer.prototype.format = function () {\n this.version = this.major + '.' + this.minor + '.' + this.patch\n if (this.prerelease.length) {\n this.version += '-' + this.prerelease.join('.')\n }\n return this.version\n}\n\nSemVer.prototype.toString = function () {\n return this.version\n}\n\nSemVer.prototype.compare = function (other) {\n debug('SemVer.compare', this.version, this.options, other)\n if (!(other instanceof SemVer)) {\n other = new SemVer(other, this.options)\n }\n\n return this.compareMain(other) || this.comparePre(other)\n}\n\nSemVer.prototype.compareMain = function (other) {\n if (!(other instanceof SemVer)) {\n other = new SemVer(other, this.options)\n }\n\n return compareIdentifiers(this.major, other.major) ||\n compareIdentifiers(this.minor, other.minor) ||\n compareIdentifiers(this.patch, other.patch)\n}\n\nSemVer.prototype.comparePre = function (other) {\n if (!(other instanceof SemVer)) {\n other = new SemVer(other, this.options)\n }\n\n // NOT having a prerelease is > having one\n if (this.prerelease.length && !other.prerelease.length) {\n return -1\n } else if (!this.prerelease.length && other.prerelease.length) {\n return 1\n } else if (!this.prerelease.length && !other.prerelease.length) {\n return 0\n }\n\n var i = 0\n do {\n var a = this.prerelease[i]\n var b = other.prerelease[i]\n debug('prerelease compare', i, a, b)\n if (a === undefined && b === undefined) {\n return 0\n } else if (b === undefined) {\n return 1\n } else if (a === undefined) {\n return -1\n } else if (a === b) {\n continue\n } else {\n return compareIdentifiers(a, b)\n }\n } while (++i)\n}\n\nSemVer.prototype.compareBuild = function (other) {\n if (!(other instanceof SemVer)) {\n other = new SemVer(other, this.options)\n }\n\n var i = 0\n do {\n var a = this.build[i]\n var b = other.build[i]\n debug('prerelease compare', i, a, b)\n if (a === undefined && b === undefined) {\n return 0\n } else if (b === undefined) {\n return 1\n } else if (a === undefined) {\n return -1\n } else if (a === b) {\n continue\n } else {\n return compareIdentifiers(a, b)\n }\n } while (++i)\n}\n\n// preminor will bump the version up to the next minor release, and immediately\n// down to pre-release. premajor and prepatch work the same way.\nSemVer.prototype.inc = function (release, identifier) {\n switch (release) {\n case 'premajor':\n this.prerelease.length = 0\n this.patch = 0\n this.minor = 0\n this.major++\n this.inc('pre', identifier)\n break\n case 'preminor':\n this.prerelease.length = 0\n this.patch = 0\n this.minor++\n this.inc('pre', identifier)\n break\n case 'prepatch':\n // If this is already a prerelease, it will bump to the next version\n // drop any prereleases that might already exist, since they are not\n // relevant at this point.\n this.prerelease.length = 0\n this.inc('patch', identifier)\n this.inc('pre', identifier)\n break\n // If the input is a non-prerelease version, this acts the same as\n // prepatch.\n case 'prerelease':\n if (this.prerelease.length === 0) {\n this.inc('patch', identifier)\n }\n this.inc('pre', identifier)\n break\n\n case 'major':\n // If this is a pre-major version, bump up to the same major version.\n // Otherwise increment major.\n // 1.0.0-5 bumps to 1.0.0\n // 1.1.0 bumps to 2.0.0\n if (this.minor !== 0 ||\n this.patch !== 0 ||\n this.prerelease.length === 0) {\n this.major++\n }\n this.minor = 0\n this.patch = 0\n this.prerelease = []\n break\n case 'minor':\n // If this is a pre-minor version, bump up to the same minor version.\n // Otherwise increment minor.\n // 1.2.0-5 bumps to 1.2.0\n // 1.2.1 bumps to 1.3.0\n if (this.patch !== 0 || this.prerelease.length === 0) {\n this.minor++\n }\n this.patch = 0\n this.prerelease = []\n break\n case 'patch':\n // If this is not a pre-release version, it will increment the patch.\n // If it is a pre-release it will bump up to the same patch version.\n // 1.2.0-5 patches to 1.2.0\n // 1.2.0 patches to 1.2.1\n if (this.prerelease.length === 0) {\n this.patch++\n }\n this.prerelease = []\n break\n // This probably shouldn't be used publicly.\n // 1.0.0 \"pre\" would become 1.0.0-0 which is the wrong direction.\n case 'pre':\n if (this.prerelease.length === 0) {\n this.prerelease = [0]\n } else {\n var i = this.prerelease.length\n while (--i >= 0) {\n if (typeof this.prerelease[i] === 'number') {\n this.prerelease[i]++\n i = -2\n }\n }\n if (i === -1) {\n // didn't increment anything\n this.prerelease.push(0)\n }\n }\n if (identifier) {\n // 1.2.0-beta.1 bumps to 1.2.0-beta.2,\n // 1.2.0-beta.fooblz or 1.2.0-beta bumps to 1.2.0-beta.0\n if (this.prerelease[0] === identifier) {\n if (isNaN(this.prerelease[1])) {\n this.prerelease = [identifier, 0]\n }\n } else {\n this.prerelease = [identifier, 0]\n }\n }\n break\n\n default:\n throw new Error('invalid increment argument: ' + release)\n }\n this.format()\n this.raw = this.version\n return this\n}\n\nexports.inc = inc\nfunction inc (version, release, loose, identifier) {\n if (typeof (loose) === 'string') {\n identifier = loose\n loose = undefined\n }\n\n try {\n return new SemVer(version, loose).inc(release, identifier).version\n } catch (er) {\n return null\n }\n}\n\nexports.diff = diff\nfunction diff (version1, version2) {\n if (eq(version1, version2)) {\n return null\n } else {\n var v1 = parse(version1)\n var v2 = parse(version2)\n var prefix = ''\n if (v1.prerelease.length || v2.prerelease.length) {\n prefix = 'pre'\n var defaultResult = 'prerelease'\n }\n for (var key in v1) {\n if (key === 'major' || key === 'minor' || key === 'patch') {\n if (v1[key] !== v2[key]) {\n return prefix + key\n }\n }\n }\n return defaultResult // may be undefined\n }\n}\n\nexports.compareIdentifiers = compareIdentifiers\n\nvar numeric = /^[0-9]+$/\nfunction compareIdentifiers (a, b) {\n var anum = numeric.test(a)\n var bnum = numeric.test(b)\n\n if (anum && bnum) {\n a = +a\n b = +b\n }\n\n return a === b ? 0\n : (anum && !bnum) ? -1\n : (bnum && !anum) ? 1\n : a < b ? -1\n : 1\n}\n\nexports.rcompareIdentifiers = rcompareIdentifiers\nfunction rcompareIdentifiers (a, b) {\n return compareIdentifiers(b, a)\n}\n\nexports.major = major\nfunction major (a, loose) {\n return new SemVer(a, loose).major\n}\n\nexports.minor = minor\nfunction minor (a, loose) {\n return new SemVer(a, loose).minor\n}\n\nexports.patch = patch\nfunction patch (a, loose) {\n return new SemVer(a, loose).patch\n}\n\nexports.compare = compare\nfunction compare (a, b, loose) {\n return new SemVer(a, loose).compare(new SemVer(b, loose))\n}\n\nexports.compareLoose = compareLoose\nfunction compareLoose (a, b) {\n return compare(a, b, true)\n}\n\nexports.compareBuild = compareBuild\nfunction compareBuild (a, b, loose) {\n var versionA = new SemVer(a, loose)\n var versionB = new SemVer(b, loose)\n return versionA.compare(versionB) || versionA.compareBuild(versionB)\n}\n\nexports.rcompare = rcompare\nfunction rcompare (a, b, loose) {\n return compare(b, a, loose)\n}\n\nexports.sort = sort\nfunction sort (list, loose) {\n return list.sort(function (a, b) {\n return exports.compareBuild(a, b, loose)\n })\n}\n\nexports.rsort = rsort\nfunction rsort (list, loose) {\n return list.sort(function (a, b) {\n return exports.compareBuild(b, a, loose)\n })\n}\n\nexports.gt = gt\nfunction gt (a, b, loose) {\n return compare(a, b, loose) > 0\n}\n\nexports.lt = lt\nfunction lt (a, b, loose) {\n return compare(a, b, loose) < 0\n}\n\nexports.eq = eq\nfunction eq (a, b, loose) {\n return compare(a, b, loose) === 0\n}\n\nexports.neq = neq\nfunction neq (a, b, loose) {\n return compare(a, b, loose) !== 0\n}\n\nexports.gte = gte\nfunction gte (a, b, loose) {\n return compare(a, b, loose) >= 0\n}\n\nexports.lte = lte\nfunction lte (a, b, loose) {\n return compare(a, b, loose) <= 0\n}\n\nexports.cmp = cmp\nfunction cmp (a, op, b, loose) {\n switch (op) {\n case '===':\n if (typeof a === 'object')\n a = a.version\n if (typeof b === 'object')\n b = b.version\n return a === b\n\n case '!==':\n if (typeof a === 'object')\n a = a.version\n if (typeof b === 'object')\n b = b.version\n return a !== b\n\n case '':\n case '=':\n case '==':\n return eq(a, b, loose)\n\n case '!=':\n return neq(a, b, loose)\n\n case '>':\n return gt(a, b, loose)\n\n case '>=':\n return gte(a, b, loose)\n\n case '<':\n return lt(a, b, loose)\n\n case '<=':\n return lte(a, b, loose)\n\n default:\n throw new TypeError('Invalid operator: ' + op)\n }\n}\n\nexports.Comparator = Comparator\nfunction Comparator (comp, options) {\n if (!options || typeof options !== 'object') {\n options = {\n loose: !!options,\n includePrerelease: false\n }\n }\n\n if (comp instanceof Comparator) {\n if (comp.loose === !!options.loose) {\n return comp\n } else {\n comp = comp.value\n }\n }\n\n if (!(this instanceof Comparator)) {\n return new Comparator(comp, options)\n }\n\n comp = comp.trim().split(/\\s+/).join(' ')\n debug('comparator', comp, options)\n this.options = options\n this.loose = !!options.loose\n this.parse(comp)\n\n if (this.semver === ANY) {\n this.value = ''\n } else {\n this.value = this.operator + this.semver.version\n }\n\n debug('comp', this)\n}\n\nvar ANY = {}\nComparator.prototype.parse = function (comp) {\n var r = this.options.loose ? safeRe[t.COMPARATORLOOSE] : safeRe[t.COMPARATOR]\n var m = comp.match(r)\n\n if (!m) {\n throw new TypeError('Invalid comparator: ' + comp)\n }\n\n this.operator = m[1] !== undefined ? m[1] : ''\n if (this.operator === '=') {\n this.operator = ''\n }\n\n // if it literally is just '>' or '' then allow anything.\n if (!m[2]) {\n this.semver = ANY\n } else {\n this.semver = new SemVer(m[2], this.options.loose)\n }\n}\n\nComparator.prototype.toString = function () {\n return this.value\n}\n\nComparator.prototype.test = function (version) {\n debug('Comparator.test', version, this.options.loose)\n\n if (this.semver === ANY || version === ANY) {\n return true\n }\n\n if (typeof version === 'string') {\n try {\n version = new SemVer(version, this.options)\n } catch (er) {\n return false\n }\n }\n\n return cmp(version, this.operator, this.semver, this.options)\n}\n\nComparator.prototype.intersects = function (comp, options) {\n if (!(comp instanceof Comparator)) {\n throw new TypeError('a Comparator is required')\n }\n\n if (!options || typeof options !== 'object') {\n options = {\n loose: !!options,\n includePrerelease: false\n }\n }\n\n var rangeTmp\n\n if (this.operator === '') {\n if (this.value === '') {\n return true\n }\n rangeTmp = new Range(comp.value, options)\n return satisfies(this.value, rangeTmp, options)\n } else if (comp.operator === '') {\n if (comp.value === '') {\n return true\n }\n rangeTmp = new Range(this.value, options)\n return satisfies(comp.semver, rangeTmp, options)\n }\n\n var sameDirectionIncreasing =\n (this.operator === '>=' || this.operator === '>') &&\n (comp.operator === '>=' || comp.operator === '>')\n var sameDirectionDecreasing =\n (this.operator === '<=' || this.operator === '<') &&\n (comp.operator === '<=' || comp.operator === '<')\n var sameSemVer = this.semver.version === comp.semver.version\n var differentDirectionsInclusive =\n (this.operator === '>=' || this.operator === '<=') &&\n (comp.operator === '>=' || comp.operator === '<=')\n var oppositeDirectionsLessThan =\n cmp(this.semver, '<', comp.semver, options) &&\n ((this.operator === '>=' || this.operator === '>') &&\n (comp.operator === '<=' || comp.operator === '<'))\n var oppositeDirectionsGreaterThan =\n cmp(this.semver, '>', comp.semver, options) &&\n ((this.operator === '<=' || this.operator === '<') &&\n (comp.operator === '>=' || comp.operator === '>'))\n\n return sameDirectionIncreasing || sameDirectionDecreasing ||\n (sameSemVer && differentDirectionsInclusive) ||\n oppositeDirectionsLessThan || oppositeDirectionsGreaterThan\n}\n\nexports.Range = Range\nfunction Range (range, options) {\n if (!options || typeof options !== 'object') {\n options = {\n loose: !!options,\n includePrerelease: false\n }\n }\n\n if (range instanceof Range) {\n if (range.loose === !!options.loose &&\n range.includePrerelease === !!options.includePrerelease) {\n return range\n } else {\n return new Range(range.raw, options)\n }\n }\n\n if (range instanceof Comparator) {\n return new Range(range.value, options)\n }\n\n if (!(this instanceof Range)) {\n return new Range(range, options)\n }\n\n this.options = options\n this.loose = !!options.loose\n this.includePrerelease = !!options.includePrerelease\n\n // First reduce all whitespace as much as possible so we do not have to rely\n // on potentially slow regexes like \\s*. This is then stored and used for\n // future error messages as well.\n this.raw = range\n .trim()\n .split(/\\s+/)\n .join(' ')\n\n // First, split based on boolean or ||\n this.set = this.raw.split('||').map(function (range) {\n return this.parseRange(range.trim())\n }, this).filter(function (c) {\n // throw out any that are not relevant for whatever reason\n return c.length\n })\n\n if (!this.set.length) {\n throw new TypeError('Invalid SemVer Range: ' + this.raw)\n }\n\n this.format()\n}\n\nRange.prototype.format = function () {\n this.range = this.set.map(function (comps) {\n return comps.join(' ').trim()\n }).join('||').trim()\n return this.range\n}\n\nRange.prototype.toString = function () {\n return this.range\n}\n\nRange.prototype.parseRange = function (range) {\n var loose = this.options.loose\n // `1.2.3 - 1.2.4` => `>=1.2.3 <=1.2.4`\n var hr = loose ? safeRe[t.HYPHENRANGELOOSE] : safeRe[t.HYPHENRANGE]\n range = range.replace(hr, hyphenReplace)\n debug('hyphen replace', range)\n // `> 1.2.3 < 1.2.5` => `>1.2.3 <1.2.5`\n range = range.replace(safeRe[t.COMPARATORTRIM], comparatorTrimReplace)\n debug('comparator trim', range, safeRe[t.COMPARATORTRIM])\n\n // `~ 1.2.3` => `~1.2.3`\n range = range.replace(safeRe[t.TILDETRIM], tildeTrimReplace)\n\n // `^ 1.2.3` => `^1.2.3`\n range = range.replace(safeRe[t.CARETTRIM], caretTrimReplace)\n\n // normalize spaces\n range = range.split(/\\s+/).join(' ')\n\n // At this point, the range is completely trimmed and\n // ready to be split into comparators.\n\n var compRe = loose ? safeRe[t.COMPARATORLOOSE] : safeRe[t.COMPARATOR]\n var set = range.split(' ').map(function (comp) {\n return parseComparator(comp, this.options)\n }, this).join(' ').split(/\\s+/)\n if (this.options.loose) {\n // in loose mode, throw out any that are not valid comparators\n set = set.filter(function (comp) {\n return !!comp.match(compRe)\n })\n }\n set = set.map(function (comp) {\n return new Comparator(comp, this.options)\n }, this)\n\n return set\n}\n\nRange.prototype.intersects = function (range, options) {\n if (!(range instanceof Range)) {\n throw new TypeError('a Range is required')\n }\n\n return this.set.some(function (thisComparators) {\n return (\n isSatisfiable(thisComparators, options) &&\n range.set.some(function (rangeComparators) {\n return (\n isSatisfiable(rangeComparators, options) &&\n thisComparators.every(function (thisComparator) {\n return rangeComparators.every(function (rangeComparator) {\n return thisComparator.intersects(rangeComparator, options)\n })\n })\n )\n })\n )\n })\n}\n\n// take a set of comparators and determine whether there\n// exists a version which can satisfy it\nfunction isSatisfiable (comparators, options) {\n var result = true\n var remainingComparators = comparators.slice()\n var testComparator = remainingComparators.pop()\n\n while (result && remainingComparators.length) {\n result = remainingComparators.every(function (otherComparator) {\n return testComparator.intersects(otherComparator, options)\n })\n\n testComparator = remainingComparators.pop()\n }\n\n return result\n}\n\n// Mostly just for testing and legacy API reasons\nexports.toComparators = toComparators\nfunction toComparators (range, options) {\n return new Range(range, options).set.map(function (comp) {\n return comp.map(function (c) {\n return c.value\n }).join(' ').trim().split(' ')\n })\n}\n\n// comprised of xranges, tildes, stars, and gtlt's at this point.\n// already replaced the hyphen ranges\n// turn into a set of JUST comparators.\nfunction parseComparator (comp, options) {\n debug('comp', comp, options)\n comp = replaceCarets(comp, options)\n debug('caret', comp)\n comp = replaceTildes(comp, options)\n debug('tildes', comp)\n comp = replaceXRanges(comp, options)\n debug('xrange', comp)\n comp = replaceStars(comp, options)\n debug('stars', comp)\n return comp\n}\n\nfunction isX (id) {\n return !id || id.toLowerCase() === 'x' || id === '*'\n}\n\n// ~, ~> --> * (any, kinda silly)\n// ~2, ~2.x, ~2.x.x, ~>2, ~>2.x ~>2.x.x --> >=2.0.0 <3.0.0\n// ~2.0, ~2.0.x, ~>2.0, ~>2.0.x --> >=2.0.0 <2.1.0\n// ~1.2, ~1.2.x, ~>1.2, ~>1.2.x --> >=1.2.0 <1.3.0\n// ~1.2.3, ~>1.2.3 --> >=1.2.3 <1.3.0\n// ~1.2.0, ~>1.2.0 --> >=1.2.0 <1.3.0\nfunction replaceTildes (comp, options) {\n return comp.trim().split(/\\s+/).map(function (comp) {\n return replaceTilde(comp, options)\n }).join(' ')\n}\n\nfunction replaceTilde (comp, options) {\n var r = options.loose ? safeRe[t.TILDELOOSE] : safeRe[t.TILDE]\n return comp.replace(r, function (_, M, m, p, pr) {\n debug('tilde', comp, _, M, m, p, pr)\n var ret\n\n if (isX(M)) {\n ret = ''\n } else if (isX(m)) {\n ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0'\n } else if (isX(p)) {\n // ~1.2 == >=1.2.0 <1.3.0\n ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0'\n } else if (pr) {\n debug('replaceTilde pr', pr)\n ret = '>=' + M + '.' + m + '.' + p + '-' + pr +\n ' <' + M + '.' + (+m + 1) + '.0'\n } else {\n // ~1.2.3 == >=1.2.3 <1.3.0\n ret = '>=' + M + '.' + m + '.' + p +\n ' <' + M + '.' + (+m + 1) + '.0'\n }\n\n debug('tilde return', ret)\n return ret\n })\n}\n\n// ^ --> * (any, kinda silly)\n// ^2, ^2.x, ^2.x.x --> >=2.0.0 <3.0.0\n// ^2.0, ^2.0.x --> >=2.0.0 <3.0.0\n// ^1.2, ^1.2.x --> >=1.2.0 <2.0.0\n// ^1.2.3 --> >=1.2.3 <2.0.0\n// ^1.2.0 --> >=1.2.0 <2.0.0\nfunction replaceCarets (comp, options) {\n return comp.trim().split(/\\s+/).map(function (comp) {\n return replaceCaret(comp, options)\n }).join(' ')\n}\n\nfunction replaceCaret (comp, options) {\n debug('caret', comp, options)\n var r = options.loose ? safeRe[t.CARETLOOSE] : safeRe[t.CARET]\n return comp.replace(r, function (_, M, m, p, pr) {\n debug('caret', comp, _, M, m, p, pr)\n var ret\n\n if (isX(M)) {\n ret = ''\n } else if (isX(m)) {\n ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0'\n } else if (isX(p)) {\n if (M === '0') {\n ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0'\n } else {\n ret = '>=' + M + '.' + m + '.0 <' + (+M + 1) + '.0.0'\n }\n } else if (pr) {\n debug('replaceCaret pr', pr)\n if (M === '0') {\n if (m === '0') {\n ret = '>=' + M + '.' + m + '.' + p + '-' + pr +\n ' <' + M + '.' + m + '.' + (+p + 1)\n } else {\n ret = '>=' + M + '.' + m + '.' + p + '-' + pr +\n ' <' + M + '.' + (+m + 1) + '.0'\n }\n } else {\n ret = '>=' + M + '.' + m + '.' + p + '-' + pr +\n ' <' + (+M + 1) + '.0.0'\n }\n } else {\n debug('no pr')\n if (M === '0') {\n if (m === '0') {\n ret = '>=' + M + '.' + m + '.' + p +\n ' <' + M + '.' + m + '.' + (+p + 1)\n } else {\n ret = '>=' + M + '.' + m + '.' + p +\n ' <' + M + '.' + (+m + 1) + '.0'\n }\n } else {\n ret = '>=' + M + '.' + m + '.' + p +\n ' <' + (+M + 1) + '.0.0'\n }\n }\n\n debug('caret return', ret)\n return ret\n })\n}\n\nfunction replaceXRanges (comp, options) {\n debug('replaceXRanges', comp, options)\n return comp.split(/\\s+/).map(function (comp) {\n return replaceXRange(comp, options)\n }).join(' ')\n}\n\nfunction replaceXRange (comp, options) {\n comp = comp.trim()\n var r = options.loose ? safeRe[t.XRANGELOOSE] : safeRe[t.XRANGE]\n return comp.replace(r, function (ret, gtlt, M, m, p, pr) {\n debug('xRange', comp, ret, gtlt, M, m, p, pr)\n var xM = isX(M)\n var xm = xM || isX(m)\n var xp = xm || isX(p)\n var anyX = xp\n\n if (gtlt === '=' && anyX) {\n gtlt = ''\n }\n\n // if we're including prereleases in the match, then we need\n // to fix this to -0, the lowest possible prerelease value\n pr = options.includePrerelease ? '-0' : ''\n\n if (xM) {\n if (gtlt === '>' || gtlt === '<') {\n // nothing is allowed\n ret = '<0.0.0-0'\n } else {\n // nothing is forbidden\n ret = '*'\n }\n } else if (gtlt && anyX) {\n // we know patch is an x, because we have any x at all.\n // replace X with 0\n if (xm) {\n m = 0\n }\n p = 0\n\n if (gtlt === '>') {\n // >1 => >=2.0.0\n // >1.2 => >=1.3.0\n // >1.2.3 => >= 1.2.4\n gtlt = '>='\n if (xm) {\n M = +M + 1\n m = 0\n p = 0\n } else {\n m = +m + 1\n p = 0\n }\n } else if (gtlt === '<=') {\n // <=0.7.x is actually <0.8.0, since any 0.7.x should\n // pass. Similarly, <=7.x is actually <8.0.0, etc.\n gtlt = '<'\n if (xm) {\n M = +M + 1\n } else {\n m = +m + 1\n }\n }\n\n ret = gtlt + M + '.' + m + '.' + p + pr\n } else if (xm) {\n ret = '>=' + M + '.0.0' + pr + ' <' + (+M + 1) + '.0.0' + pr\n } else if (xp) {\n ret = '>=' + M + '.' + m + '.0' + pr +\n ' <' + M + '.' + (+m + 1) + '.0' + pr\n }\n\n debug('xRange return', ret)\n\n return ret\n })\n}\n\n// Because * is AND-ed with everything else in the comparator,\n// and '' means \"any version\", just remove the *s entirely.\nfunction replaceStars (comp, options) {\n debug('replaceStars', comp, options)\n // Looseness is ignored here. star is always as loose as it gets!\n return comp.trim().replace(safeRe[t.STAR], '')\n}\n\n// This function is passed to string.replace(re[t.HYPHENRANGE])\n// M, m, patch, prerelease, build\n// 1.2 - 3.4.5 => >=1.2.0 <=3.4.5\n// 1.2.3 - 3.4 => >=1.2.0 <3.5.0 Any 3.4.x will do\n// 1.2 - 3.4 => >=1.2.0 <3.5.0\nfunction hyphenReplace ($0,\n from, fM, fm, fp, fpr, fb,\n to, tM, tm, tp, tpr, tb) {\n if (isX(fM)) {\n from = ''\n } else if (isX(fm)) {\n from = '>=' + fM + '.0.0'\n } else if (isX(fp)) {\n from = '>=' + fM + '.' + fm + '.0'\n } else {\n from = '>=' + from\n }\n\n if (isX(tM)) {\n to = ''\n } else if (isX(tm)) {\n to = '<' + (+tM + 1) + '.0.0'\n } else if (isX(tp)) {\n to = '<' + tM + '.' + (+tm + 1) + '.0'\n } else if (tpr) {\n to = '<=' + tM + '.' + tm + '.' + tp + '-' + tpr\n } else {\n to = '<=' + to\n }\n\n return (from + ' ' + to).trim()\n}\n\n// if ANY of the sets match ALL of its comparators, then pass\nRange.prototype.test = function (version) {\n if (!version) {\n return false\n }\n\n if (typeof version === 'string') {\n try {\n version = new SemVer(version, this.options)\n } catch (er) {\n return false\n }\n }\n\n for (var i = 0; i < this.set.length; i++) {\n if (testSet(this.set[i], version, this.options)) {\n return true\n }\n }\n return false\n}\n\nfunction testSet (set, version, options) {\n for (var i = 0; i < set.length; i++) {\n if (!set[i].test(version)) {\n return false\n }\n }\n\n if (version.prerelease.length && !options.includePrerelease) {\n // Find the set of versions that are allowed to have prereleases\n // For example, ^1.2.3-pr.1 desugars to >=1.2.3-pr.1 <2.0.0\n // That should allow `1.2.3-pr.2` to pass.\n // However, `1.2.4-alpha.notready` should NOT be allowed,\n // even though it's within the range set by the comparators.\n for (i = 0; i < set.length; i++) {\n debug(set[i].semver)\n if (set[i].semver === ANY) {\n continue\n }\n\n if (set[i].semver.prerelease.length > 0) {\n var allowed = set[i].semver\n if (allowed.major === version.major &&\n allowed.minor === version.minor &&\n allowed.patch === version.patch) {\n return true\n }\n }\n }\n\n // Version has a -pre, but it's not one of the ones we like.\n return false\n }\n\n return true\n}\n\nexports.satisfies = satisfies\nfunction satisfies (version, range, options) {\n try {\n range = new Range(range, options)\n } catch (er) {\n return false\n }\n return range.test(version)\n}\n\nexports.maxSatisfying = maxSatisfying\nfunction maxSatisfying (versions, range, options) {\n var max = null\n var maxSV = null\n try {\n var rangeObj = new Range(range, options)\n } catch (er) {\n return null\n }\n versions.forEach(function (v) {\n if (rangeObj.test(v)) {\n // satisfies(v, range, options)\n if (!max || maxSV.compare(v) === -1) {\n // compare(max, v, true)\n max = v\n maxSV = new SemVer(max, options)\n }\n }\n })\n return max\n}\n\nexports.minSatisfying = minSatisfying\nfunction minSatisfying (versions, range, options) {\n var min = null\n var minSV = null\n try {\n var rangeObj = new Range(range, options)\n } catch (er) {\n return null\n }\n versions.forEach(function (v) {\n if (rangeObj.test(v)) {\n // satisfies(v, range, options)\n if (!min || minSV.compare(v) === 1) {\n // compare(min, v, true)\n min = v\n minSV = new SemVer(min, options)\n }\n }\n })\n return min\n}\n\nexports.minVersion = minVersion\nfunction minVersion (range, loose) {\n range = new Range(range, loose)\n\n var minver = new SemVer('0.0.0')\n if (range.test(minver)) {\n return minver\n }\n\n minver = new SemVer('0.0.0-0')\n if (range.test(minver)) {\n return minver\n }\n\n minver = null\n for (var i = 0; i < range.set.length; ++i) {\n var comparators = range.set[i]\n\n comparators.forEach(function (comparator) {\n // Clone to avoid manipulating the comparator's semver object.\n var compver = new SemVer(comparator.semver.version)\n switch (comparator.operator) {\n case '>':\n if (compver.prerelease.length === 0) {\n compver.patch++\n } else {\n compver.prerelease.push(0)\n }\n compver.raw = compver.format()\n /* fallthrough */\n case '':\n case '>=':\n if (!minver || gt(minver, compver)) {\n minver = compver\n }\n break\n case '<':\n case '<=':\n /* Ignore maximum versions */\n break\n /* istanbul ignore next */\n default:\n throw new Error('Unexpected operation: ' + comparator.operator)\n }\n })\n }\n\n if (minver && range.test(minver)) {\n return minver\n }\n\n return null\n}\n\nexports.validRange = validRange\nfunction validRange (range, options) {\n try {\n // Return '*' instead of '' so that truthiness works.\n // This will throw if it's invalid anyway\n return new Range(range, options).range || '*'\n } catch (er) {\n return null\n }\n}\n\n// Determine if version is less than all the versions possible in the range\nexports.ltr = ltr\nfunction ltr (version, range, options) {\n return outside(version, range, '<', options)\n}\n\n// Determine if version is greater than all the versions possible in the range.\nexports.gtr = gtr\nfunction gtr (version, range, options) {\n return outside(version, range, '>', options)\n}\n\nexports.outside = outside\nfunction outside (version, range, hilo, options) {\n version = new SemVer(version, options)\n range = new Range(range, options)\n\n var gtfn, ltefn, ltfn, comp, ecomp\n switch (hilo) {\n case '>':\n gtfn = gt\n ltefn = lte\n ltfn = lt\n comp = '>'\n ecomp = '>='\n break\n case '<':\n gtfn = lt\n ltefn = gte\n ltfn = gt\n comp = '<'\n ecomp = '<='\n break\n default:\n throw new TypeError('Must provide a hilo val of \"<\" or \">\"')\n }\n\n // If it satisifes the range it is not outside\n if (satisfies(version, range, options)) {\n return false\n }\n\n // From now on, variable terms are as if we're in \"gtr\" mode.\n // but note that everything is flipped for the \"ltr\" function.\n\n for (var i = 0; i < range.set.length; ++i) {\n var comparators = range.set[i]\n\n var high = null\n var low = null\n\n comparators.forEach(function (comparator) {\n if (comparator.semver === ANY) {\n comparator = new Comparator('>=0.0.0')\n }\n high = high || comparator\n low = low || comparator\n if (gtfn(comparator.semver, high.semver, options)) {\n high = comparator\n } else if (ltfn(comparator.semver, low.semver, options)) {\n low = comparator\n }\n })\n\n // If the edge version comparator has a operator then our version\n // isn't outside it\n if (high.operator === comp || high.operator === ecomp) {\n return false\n }\n\n // If the lowest version comparator has an operator and our version\n // is less than it then it isn't higher than the range\n if ((!low.operator || low.operator === comp) &&\n ltefn(version, low.semver)) {\n return false\n } else if (low.operator === ecomp && ltfn(version, low.semver)) {\n return false\n }\n }\n return true\n}\n\nexports.prerelease = prerelease\nfunction prerelease (version, options) {\n var parsed = parse(version, options)\n return (parsed && parsed.prerelease.length) ? parsed.prerelease : null\n}\n\nexports.intersects = intersects\nfunction intersects (r1, r2, options) {\n r1 = new Range(r1, options)\n r2 = new Range(r2, options)\n return r1.intersects(r2)\n}\n\nexports.coerce = coerce\nfunction coerce (version, options) {\n if (version instanceof SemVer) {\n return version\n }\n\n if (typeof version === 'number') {\n version = String(version)\n }\n\n if (typeof version !== 'string') {\n return null\n }\n\n options = options || {}\n\n var match = null\n if (!options.rtl) {\n match = version.match(safeRe[t.COERCE])\n } else {\n // Find the right-most coercible string that does not share\n // a terminus with a more left-ward coercible string.\n // Eg, '1.2.3.4' wants to coerce '2.3.4', not '3.4' or '4'\n //\n // Walk through the string checking with a /g regexp\n // Manually set the index so as to pick up overlapping matches.\n // Stop when we get a match that ends at the string end, since no\n // coercible string can be more right-ward without the same terminus.\n var next\n while ((next = safeRe[t.COERCERTL].exec(version)) &&\n (!match || match.index + match[0].length !== version.length)\n ) {\n if (!match ||\n next.index + next[0].length !== match.index + match[0].length) {\n match = next\n }\n safeRe[t.COERCERTL].lastIndex = next.index + next[1].length + next[2].length\n }\n // leave it in a clean state\n safeRe[t.COERCERTL].lastIndex = -1\n }\n\n if (match === null) {\n return null\n }\n\n return parse(match[2] +\n '.' + (match[3] || '0') +\n '.' + (match[4] || '0'), options)\n}\n","\"use strict\";\n\nexports.__esModule = true;\nexports.hasMinVersion = hasMinVersion;\nvar _semver = _interopRequireDefault(require(\"semver\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nfunction hasMinVersion(minVersion, runtimeVersion) {\n // If the range is unavailable, we're running the script during Babel's\n // build process, and we want to assume that all versions are satisfied so\n // that the built output will include all definitions.\n if (!runtimeVersion || !minVersion) return true;\n runtimeVersion = String(runtimeVersion);\n\n // semver.intersects() has some surprising behavior with comparing ranges\n // with preprelease versions. We add '^' to ensure that we are always\n // comparing ranges with ranges, which sidesteps this logic.\n // For example:\n //\n // semver.intersects(`<7.0.1`, \"7.0.0-beta.0\") // false - surprising\n // semver.intersects(`<7.0.1`, \"^7.0.0-beta.0\") // true - expected\n //\n // This is because the first falls back to\n //\n // semver.satisfies(\"7.0.0-beta.0\", `<7.0.1`) // false - surprising\n //\n // and this fails because a prerelease version can only satisfy a range\n // if it is a prerelease within the same major/minor/patch range.\n //\n // Note: If this is found to have issues, please also revist the logic in\n // babel-core's availableHelper() API.\n if (_semver.default.valid(runtimeVersion)) runtimeVersion = `^${runtimeVersion}`;\n return !_semver.default.intersects(`<${minVersion}`, runtimeVersion) && !_semver.default.intersects(`>=8.0.0`, runtimeVersion);\n}","\"use strict\";\n\nexports.__esModule = true;\nexports.createUtilsGetter = createUtilsGetter;\nexports.getImportSource = getImportSource;\nexports.getRequireSource = getRequireSource;\nexports.has = has;\nexports.intersection = intersection;\nexports.resolveKey = resolveKey;\nexports.resolveSource = resolveSource;\nvar _babel = _interopRequireWildcard(require(\"@babel/core\"));\nfunction _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== \"function\") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }\nfunction _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== \"object\" && typeof obj !== \"function\") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== \"default\" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }\nconst {\n types: t,\n template: template\n} = _babel.default || _babel;\nfunction intersection(a, b) {\n const result = new Set();\n a.forEach(v => b.has(v) && result.add(v));\n return result;\n}\nfunction has(object, key) {\n return Object.prototype.hasOwnProperty.call(object, key);\n}\nfunction getType(target) {\n return Object.prototype.toString.call(target).slice(8, -1);\n}\nfunction resolveId(path) {\n if (path.isIdentifier() && !path.scope.hasBinding(path.node.name, /* noGlobals */true)) {\n return path.node.name;\n }\n if (path.isPure()) {\n const {\n deopt\n } = path.evaluate();\n if (deopt && deopt.isIdentifier()) {\n return deopt.node.name;\n }\n }\n}\nfunction resolveKey(path, computed = false) {\n const {\n scope\n } = path;\n if (path.isStringLiteral()) return path.node.value;\n const isIdentifier = path.isIdentifier();\n if (isIdentifier && !(computed || path.parent.computed)) {\n return path.node.name;\n }\n if (computed && path.isMemberExpression() && path.get(\"object\").isIdentifier({\n name: \"Symbol\"\n }) && !scope.hasBinding(\"Symbol\", /* noGlobals */true)) {\n const sym = resolveKey(path.get(\"property\"), path.node.computed);\n if (sym) return \"Symbol.\" + sym;\n }\n if (isIdentifier ? scope.hasBinding(path.node.name, /* noGlobals */true) : path.isPure()) {\n const {\n value\n } = path.evaluate();\n if (typeof value === \"string\") return value;\n }\n}\nfunction resolveSource(obj) {\n if (obj.isMemberExpression() && obj.get(\"property\").isIdentifier({\n name: \"prototype\"\n })) {\n const id = resolveId(obj.get(\"object\"));\n if (id) {\n return {\n id,\n placement: \"prototype\"\n };\n }\n return {\n id: null,\n placement: null\n };\n }\n const id = resolveId(obj);\n if (id) {\n return {\n id,\n placement: \"static\"\n };\n }\n if (obj.isRegExpLiteral()) {\n return {\n id: \"RegExp\",\n placement: \"prototype\"\n };\n } else if (obj.isFunction()) {\n return {\n id: \"Function\",\n placement: \"prototype\"\n };\n } else if (obj.isPure()) {\n const {\n value\n } = obj.evaluate();\n if (value !== undefined) {\n return {\n id: getType(value),\n placement: \"prototype\"\n };\n }\n }\n return {\n id: null,\n placement: null\n };\n}\nfunction getImportSource({\n node\n}) {\n if (node.specifiers.length === 0) return node.source.value;\n}\nfunction getRequireSource({\n node\n}) {\n if (!t.isExpressionStatement(node)) return;\n const {\n expression\n } = node;\n if (t.isCallExpression(expression) && t.isIdentifier(expression.callee) && expression.callee.name === \"require\" && expression.arguments.length === 1 && t.isStringLiteral(expression.arguments[0])) {\n return expression.arguments[0].value;\n }\n}\nfunction hoist(node) {\n // @ts-expect-error\n node._blockHoist = 3;\n return node;\n}\nfunction createUtilsGetter(cache) {\n return path => {\n const prog = path.findParent(p => p.isProgram());\n return {\n injectGlobalImport(url, moduleName) {\n cache.storeAnonymous(prog, url, moduleName, (isScript, source) => {\n return isScript ? template.statement.ast`require(${source})` : t.importDeclaration([], source);\n });\n },\n injectNamedImport(url, name, hint = name, moduleName) {\n return cache.storeNamed(prog, url, name, moduleName, (isScript, source, name) => {\n const id = prog.scope.generateUidIdentifier(hint);\n return {\n node: isScript ? hoist(template.statement.ast`\n var ${id} = require(${source}).${name}\n `) : t.importDeclaration([t.importSpecifier(id, name)], source),\n name: id.name\n };\n });\n },\n injectDefaultImport(url, hint = url, moduleName) {\n return cache.storeNamed(prog, url, \"default\", moduleName, (isScript, source) => {\n const id = prog.scope.generateUidIdentifier(hint);\n return {\n node: isScript ? hoist(template.statement.ast`var ${id} = require(${source})`) : t.importDeclaration([t.importDefaultSpecifier(id)], source),\n name: id.name\n };\n });\n }\n };\n };\n}","\"use strict\";\n\nexports.__esModule = true;\nexports.default = void 0;\nvar _babel = _interopRequireWildcard(require(\"@babel/core\"));\nfunction _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== \"function\") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }\nfunction _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== \"object\" && typeof obj !== \"function\") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== \"default\" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }\nconst {\n types: t\n} = _babel.default || _babel;\nclass ImportsCachedInjector {\n constructor(resolver, getPreferredIndex) {\n this._imports = new WeakMap();\n this._anonymousImports = new WeakMap();\n this._lastImports = new WeakMap();\n this._resolver = resolver;\n this._getPreferredIndex = getPreferredIndex;\n }\n storeAnonymous(programPath, url, moduleName, getVal) {\n const key = this._normalizeKey(programPath, url);\n const imports = this._ensure(this._anonymousImports, programPath, Set);\n if (imports.has(key)) return;\n const node = getVal(programPath.node.sourceType === \"script\", t.stringLiteral(this._resolver(url)));\n imports.add(key);\n this._injectImport(programPath, node, moduleName);\n }\n storeNamed(programPath, url, name, moduleName, getVal) {\n const key = this._normalizeKey(programPath, url, name);\n const imports = this._ensure(this._imports, programPath, Map);\n if (!imports.has(key)) {\n const {\n node,\n name: id\n } = getVal(programPath.node.sourceType === \"script\", t.stringLiteral(this._resolver(url)), t.identifier(name));\n imports.set(key, id);\n this._injectImport(programPath, node, moduleName);\n }\n return t.identifier(imports.get(key));\n }\n _injectImport(programPath, node, moduleName) {\n var _this$_lastImports$ge;\n const newIndex = this._getPreferredIndex(moduleName);\n const lastImports = (_this$_lastImports$ge = this._lastImports.get(programPath)) != null ? _this$_lastImports$ge : [];\n const isPathStillValid = path => path.node &&\n // Sometimes the AST is modified and the \"last import\"\n // we have has been replaced\n path.parent === programPath.node && path.container === programPath.node.body;\n let last;\n if (newIndex === Infinity) {\n // Fast path: we can always just insert at the end if newIndex is `Infinity`\n if (lastImports.length > 0) {\n last = lastImports[lastImports.length - 1].path;\n if (!isPathStillValid(last)) last = undefined;\n }\n } else {\n for (const [i, data] of lastImports.entries()) {\n const {\n path,\n index\n } = data;\n if (isPathStillValid(path)) {\n if (newIndex < index) {\n const [newPath] = path.insertBefore(node);\n lastImports.splice(i, 0, {\n path: newPath,\n index: newIndex\n });\n return;\n }\n last = path;\n }\n }\n }\n if (last) {\n const [newPath] = last.insertAfter(node);\n lastImports.push({\n path: newPath,\n index: newIndex\n });\n } else {\n const [newPath] = programPath.unshiftContainer(\"body\", node);\n this._lastImports.set(programPath, [{\n path: newPath,\n index: newIndex\n }]);\n }\n }\n _ensure(map, programPath, Collection) {\n let collection = map.get(programPath);\n if (!collection) {\n collection = new Collection();\n map.set(programPath, collection);\n }\n return collection;\n }\n _normalizeKey(programPath, url, name = \"\") {\n const {\n sourceType\n } = programPath.node;\n\n // If we rely on the imported binding (the \"name\" parameter), we also need to cache\n // based on the sourceType. This is because the module transforms change the names\n // of the import variables.\n return `${name && sourceType}::${url}::${name}`;\n }\n}\nexports.default = ImportsCachedInjector;","\"use strict\";\n\nexports.__esModule = true;\nexports.presetEnvSilentDebugHeader = void 0;\nexports.stringifyTargets = stringifyTargets;\nexports.stringifyTargetsMultiline = stringifyTargetsMultiline;\nvar _helperCompilationTargets = require(\"@babel/helper-compilation-targets\");\nconst presetEnvSilentDebugHeader = \"#__secret_key__@babel/preset-env__don't_log_debug_header_and_resolved_targets\";\nexports.presetEnvSilentDebugHeader = presetEnvSilentDebugHeader;\nfunction stringifyTargetsMultiline(targets) {\n return JSON.stringify((0, _helperCompilationTargets.prettifyTargets)(targets), null, 2);\n}\nfunction stringifyTargets(targets) {\n return JSON.stringify(targets).replace(/,/g, \", \").replace(/^\\{\"/, '{ \"').replace(/\"\\}$/, '\" }');\n}","\"use strict\";\n\nexports.__esModule = true;\nexports.applyMissingDependenciesDefaults = applyMissingDependenciesDefaults;\nexports.validateIncludeExclude = validateIncludeExclude;\nvar _utils = require(\"./utils\");\nfunction patternToRegExp(pattern) {\n if (pattern instanceof RegExp) return pattern;\n try {\n return new RegExp(`^${pattern}$`);\n } catch (_unused) {\n return null;\n }\n}\nfunction buildUnusedError(label, unused) {\n if (!unused.length) return \"\";\n return ` - The following \"${label}\" patterns didn't match any polyfill:\\n` + unused.map(original => ` ${String(original)}\\n`).join(\"\");\n}\nfunction buldDuplicatesError(duplicates) {\n if (!duplicates.size) return \"\";\n return ` - The following polyfills were matched both by \"include\" and \"exclude\" patterns:\\n` + Array.from(duplicates, name => ` ${name}\\n`).join(\"\");\n}\nfunction validateIncludeExclude(provider, polyfills, includePatterns, excludePatterns) {\n let current;\n const filter = pattern => {\n const regexp = patternToRegExp(pattern);\n if (!regexp) return false;\n let matched = false;\n for (const polyfill of polyfills.keys()) {\n if (regexp.test(polyfill)) {\n matched = true;\n current.add(polyfill);\n }\n }\n return !matched;\n };\n\n // prettier-ignore\n const include = current = new Set();\n const unusedInclude = Array.from(includePatterns).filter(filter);\n\n // prettier-ignore\n const exclude = current = new Set();\n const unusedExclude = Array.from(excludePatterns).filter(filter);\n const duplicates = (0, _utils.intersection)(include, exclude);\n if (duplicates.size > 0 || unusedInclude.length > 0 || unusedExclude.length > 0) {\n throw new Error(`Error while validating the \"${provider}\" provider options:\\n` + buildUnusedError(\"include\", unusedInclude) + buildUnusedError(\"exclude\", unusedExclude) + buldDuplicatesError(duplicates));\n }\n return {\n include,\n exclude\n };\n}\nfunction applyMissingDependenciesDefaults(options, babelApi) {\n const {\n missingDependencies = {}\n } = options;\n if (missingDependencies === false) return false;\n const caller = babelApi.caller(caller => caller == null ? void 0 : caller.name);\n const {\n log = \"deferred\",\n inject = caller === \"rollup-plugin-babel\" ? \"throw\" : \"import\",\n all = false\n } = missingDependencies;\n return {\n log,\n inject,\n all\n };\n}","\"use strict\";\n\nexports.__esModule = true;\nexports.default = void 0;\nvar _utils = require(\"../utils\");\nfunction isRemoved(path) {\n if (path.removed) return true;\n if (!path.parentPath) return false;\n if (path.listKey) {\n var _path$parentPath$node;\n if (!((_path$parentPath$node = path.parentPath.node) != null && (_path$parentPath$node = _path$parentPath$node[path.listKey]) != null && _path$parentPath$node.includes(path.node))) return true;\n } else {\n if (path.parentPath.node[path.key] !== path.node) return true;\n }\n return isRemoved(path.parentPath);\n}\nvar _default = callProvider => {\n function property(object, key, placement, path) {\n return callProvider({\n kind: \"property\",\n object,\n key,\n placement\n }, path);\n }\n function handleReferencedIdentifier(path) {\n const {\n node: {\n name\n },\n scope\n } = path;\n if (scope.getBindingIdentifier(name)) return;\n callProvider({\n kind: \"global\",\n name\n }, path);\n }\n function analyzeMemberExpression(path) {\n const key = (0, _utils.resolveKey)(path.get(\"property\"), path.node.computed);\n return {\n key,\n handleAsMemberExpression: !!key && key !== \"prototype\"\n };\n }\n return {\n // Symbol(), new Promise\n ReferencedIdentifier(path) {\n const {\n parentPath\n } = path;\n if (parentPath.isMemberExpression({\n object: path.node\n }) && analyzeMemberExpression(parentPath).handleAsMemberExpression) {\n return;\n }\n handleReferencedIdentifier(path);\n },\n MemberExpression(path) {\n const {\n key,\n handleAsMemberExpression\n } = analyzeMemberExpression(path);\n if (!handleAsMemberExpression) return;\n const object = path.get(\"object\");\n let objectIsGlobalIdentifier = object.isIdentifier();\n if (objectIsGlobalIdentifier) {\n const binding = object.scope.getBinding(object.node.name);\n if (binding) {\n if (binding.path.isImportNamespaceSpecifier()) return;\n objectIsGlobalIdentifier = false;\n }\n }\n const source = (0, _utils.resolveSource)(object);\n let skipObject = property(source.id, key, source.placement, path);\n skipObject || (skipObject = !objectIsGlobalIdentifier || path.shouldSkip || object.shouldSkip || isRemoved(object));\n if (!skipObject) handleReferencedIdentifier(object);\n },\n ObjectPattern(path) {\n const {\n parentPath,\n parent\n } = path;\n let obj;\n\n // const { keys, values } = Object\n if (parentPath.isVariableDeclarator()) {\n obj = parentPath.get(\"init\");\n // ({ keys, values } = Object)\n } else if (parentPath.isAssignmentExpression()) {\n obj = parentPath.get(\"right\");\n // !function ({ keys, values }) {...} (Object)\n // resolution does not work after properties transform :-(\n } else if (parentPath.isFunction()) {\n const grand = parentPath.parentPath;\n if (grand.isCallExpression() || grand.isNewExpression()) {\n if (grand.node.callee === parent) {\n obj = grand.get(\"arguments\")[path.key];\n }\n }\n }\n let id = null;\n let placement = null;\n if (obj) ({\n id,\n placement\n } = (0, _utils.resolveSource)(obj));\n for (const prop of path.get(\"properties\")) {\n if (prop.isObjectProperty()) {\n const key = (0, _utils.resolveKey)(prop.get(\"key\"));\n if (key) property(id, key, placement, prop);\n }\n }\n },\n BinaryExpression(path) {\n if (path.node.operator !== \"in\") return;\n const source = (0, _utils.resolveSource)(path.get(\"right\"));\n const key = (0, _utils.resolveKey)(path.get(\"left\"), true);\n if (!key) return;\n callProvider({\n kind: \"in\",\n object: source.id,\n key,\n placement: source.placement\n }, path);\n }\n };\n};\nexports.default = _default;","\"use strict\";\n\nexports.__esModule = true;\nexports.default = void 0;\nvar _utils = require(\"../utils\");\nvar _default = callProvider => ({\n ImportDeclaration(path) {\n const source = (0, _utils.getImportSource)(path);\n if (!source) return;\n callProvider({\n kind: \"import\",\n source\n }, path);\n },\n Program(path) {\n path.get(\"body\").forEach(bodyPath => {\n const source = (0, _utils.getRequireSource)(bodyPath);\n if (!source) return;\n callProvider({\n kind: \"import\",\n source\n }, bodyPath);\n });\n }\n});\nexports.default = _default;","\"use strict\";\n\nexports.__esModule = true;\nexports.usage = exports.entry = void 0;\nvar _usage = _interopRequireDefault(require(\"./usage\"));\nexports.usage = _usage.default;\nvar _entry = _interopRequireDefault(require(\"./entry\"));\nexports.entry = _entry.default;\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }","\"use strict\";\n\nexports.__esModule = true;\nexports.has = has;\nexports.laterLogMissing = laterLogMissing;\nexports.logMissing = logMissing;\nexports.resolve = resolve;\nfunction resolve(dirname, moduleName, absoluteImports) {\n if (absoluteImports === false) return moduleName;\n throw new Error(`\"absoluteImports\" is not supported in bundles prepared for the browser.`);\n}\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nfunction has(basedir, name) {\n return true;\n}\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nfunction logMissing(missingDeps) {}\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nfunction laterLogMissing(missingDeps) {}","\"use strict\";\n\nexports.__esModule = true;\nexports.default = createMetaResolver;\nvar _utils = require(\"./utils\");\nconst PossibleGlobalObjects = new Set([\"global\", \"globalThis\", \"self\", \"window\"]);\nfunction createMetaResolver(polyfills) {\n const {\n static: staticP,\n instance: instanceP,\n global: globalP\n } = polyfills;\n return meta => {\n if (meta.kind === \"global\" && globalP && (0, _utils.has)(globalP, meta.name)) {\n return {\n kind: \"global\",\n desc: globalP[meta.name],\n name: meta.name\n };\n }\n if (meta.kind === \"property\" || meta.kind === \"in\") {\n const {\n placement,\n object,\n key\n } = meta;\n if (object && placement === \"static\") {\n if (globalP && PossibleGlobalObjects.has(object) && (0, _utils.has)(globalP, key)) {\n return {\n kind: \"global\",\n desc: globalP[key],\n name: key\n };\n }\n if (staticP && (0, _utils.has)(staticP, object) && (0, _utils.has)(staticP[object], key)) {\n return {\n kind: \"static\",\n desc: staticP[object][key],\n name: `${object}$${key}`\n };\n }\n }\n if (instanceP && (0, _utils.has)(instanceP, key)) {\n return {\n kind: \"instance\",\n desc: instanceP[key],\n name: `${key}`\n };\n }\n }\n };\n}","\"use strict\";\n\nexports.__esModule = true;\nexports.default = definePolyfillProvider;\nvar _helperPluginUtils = require(\"@babel/helper-plugin-utils\");\nvar _helperCompilationTargets = _interopRequireWildcard(require(\"@babel/helper-compilation-targets\"));\nvar _utils = require(\"./utils\");\nvar _importsInjector = _interopRequireDefault(require(\"./imports-injector\"));\nvar _debugUtils = require(\"./debug-utils\");\nvar _normalizeOptions = require(\"./normalize-options\");\nvar v = _interopRequireWildcard(require(\"./visitors\"));\nvar deps = _interopRequireWildcard(require(\"./node/dependencies\"));\nvar _metaResolver = _interopRequireDefault(require(\"./meta-resolver\"));\nconst _excluded = [\"method\", \"targets\", \"ignoreBrowserslistConfig\", \"configPath\", \"debug\", \"shouldInjectPolyfill\", \"absoluteImports\"];\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nfunction _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== \"function\") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }\nfunction _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== \"object\" && typeof obj !== \"function\") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== \"default\" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\nconst getTargets = _helperCompilationTargets.default.default || _helperCompilationTargets.default;\nfunction resolveOptions(options, babelApi) {\n const {\n method,\n targets: targetsOption,\n ignoreBrowserslistConfig,\n configPath,\n debug,\n shouldInjectPolyfill,\n absoluteImports\n } = options,\n providerOptions = _objectWithoutPropertiesLoose(options, _excluded);\n if (isEmpty(options)) {\n throw new Error(`\\\nThis plugin requires options, for example:\n {\n \"plugins\": [\n [\"\", { method: \"usage-pure\" }]\n ]\n }\n\nSee more options at https://github.com/babel/babel-polyfills/blob/main/docs/usage.md`);\n }\n let methodName;\n if (method === \"usage-global\") methodName = \"usageGlobal\";else if (method === \"entry-global\") methodName = \"entryGlobal\";else if (method === \"usage-pure\") methodName = \"usagePure\";else if (typeof method !== \"string\") {\n throw new Error(\".method must be a string\");\n } else {\n throw new Error(`.method must be one of \"entry-global\", \"usage-global\"` + ` or \"usage-pure\" (received ${JSON.stringify(method)})`);\n }\n if (typeof shouldInjectPolyfill === \"function\") {\n if (options.include || options.exclude) {\n throw new Error(`.include and .exclude are not supported when using the` + ` .shouldInjectPolyfill function.`);\n }\n } else if (shouldInjectPolyfill != null) {\n throw new Error(`.shouldInjectPolyfill must be a function, or undefined` + ` (received ${JSON.stringify(shouldInjectPolyfill)})`);\n }\n if (absoluteImports != null && typeof absoluteImports !== \"boolean\" && typeof absoluteImports !== \"string\") {\n throw new Error(`.absoluteImports must be a boolean, a string, or undefined` + ` (received ${JSON.stringify(absoluteImports)})`);\n }\n let targets;\n if (\n // If any browserslist-related option is specified, fallback to the old\n // behavior of not using the targets specified in the top-level options.\n targetsOption || configPath || ignoreBrowserslistConfig) {\n const targetsObj = typeof targetsOption === \"string\" || Array.isArray(targetsOption) ? {\n browsers: targetsOption\n } : targetsOption;\n targets = getTargets(targetsObj, {\n ignoreBrowserslistConfig,\n configPath\n });\n } else {\n targets = babelApi.targets();\n }\n return {\n method,\n methodName,\n targets,\n absoluteImports: absoluteImports != null ? absoluteImports : false,\n shouldInjectPolyfill,\n debug: !!debug,\n providerOptions: providerOptions\n };\n}\nfunction instantiateProvider(factory, options, missingDependencies, dirname, debugLog, babelApi) {\n const {\n method,\n methodName,\n targets,\n debug,\n shouldInjectPolyfill,\n providerOptions,\n absoluteImports\n } = resolveOptions(options, babelApi);\n\n // eslint-disable-next-line prefer-const\n let include, exclude;\n let polyfillsSupport;\n let polyfillsNames;\n let filterPolyfills;\n const getUtils = (0, _utils.createUtilsGetter)(new _importsInjector.default(moduleName => deps.resolve(dirname, moduleName, absoluteImports), name => {\n var _polyfillsNames$get, _polyfillsNames;\n return (_polyfillsNames$get = (_polyfillsNames = polyfillsNames) == null ? void 0 : _polyfillsNames.get(name)) != null ? _polyfillsNames$get : Infinity;\n }));\n const depsCache = new Map();\n const api = {\n babel: babelApi,\n getUtils,\n method: options.method,\n targets,\n createMetaResolver: _metaResolver.default,\n shouldInjectPolyfill(name) {\n if (polyfillsNames === undefined) {\n throw new Error(`Internal error in the ${factory.name} provider: ` + `shouldInjectPolyfill() can't be called during initialization.`);\n }\n if (!polyfillsNames.has(name)) {\n console.warn(`Internal error in the ${providerName} provider: ` + `unknown polyfill \"${name}\".`);\n }\n if (filterPolyfills && !filterPolyfills(name)) return false;\n let shouldInject = (0, _helperCompilationTargets.isRequired)(name, targets, {\n compatData: polyfillsSupport,\n includes: include,\n excludes: exclude\n });\n if (shouldInjectPolyfill) {\n shouldInject = shouldInjectPolyfill(name, shouldInject);\n if (typeof shouldInject !== \"boolean\") {\n throw new Error(`.shouldInjectPolyfill must return a boolean.`);\n }\n }\n return shouldInject;\n },\n debug(name) {\n var _debugLog, _debugLog$polyfillsSu;\n debugLog().found = true;\n if (!debug || !name) return;\n if (debugLog().polyfills.has(providerName)) return;\n debugLog().polyfills.add(name);\n (_debugLog$polyfillsSu = (_debugLog = debugLog()).polyfillsSupport) != null ? _debugLog$polyfillsSu : _debugLog.polyfillsSupport = polyfillsSupport;\n },\n assertDependency(name, version = \"*\") {\n if (missingDependencies === false) return;\n if (absoluteImports) {\n // If absoluteImports is not false, we will try resolving\n // the dependency and throw if it's not possible. We can\n // skip the check here.\n return;\n }\n const dep = version === \"*\" ? name : `${name}@^${version}`;\n const found = missingDependencies.all ? false : mapGetOr(depsCache, `${name} :: ${dirname}`, () => deps.has(dirname, name));\n if (!found) {\n debugLog().missingDeps.add(dep);\n }\n }\n };\n const provider = factory(api, providerOptions, dirname);\n const providerName = provider.name || factory.name;\n if (typeof provider[methodName] !== \"function\") {\n throw new Error(`The \"${providerName}\" provider doesn't support the \"${method}\" polyfilling method.`);\n }\n if (Array.isArray(provider.polyfills)) {\n polyfillsNames = new Map(provider.polyfills.map((name, index) => [name, index]));\n filterPolyfills = provider.filterPolyfills;\n } else if (provider.polyfills) {\n polyfillsNames = new Map(Object.keys(provider.polyfills).map((name, index) => [name, index]));\n polyfillsSupport = provider.polyfills;\n filterPolyfills = provider.filterPolyfills;\n } else {\n polyfillsNames = new Map();\n }\n ({\n include,\n exclude\n } = (0, _normalizeOptions.validateIncludeExclude)(providerName, polyfillsNames, providerOptions.include || [], providerOptions.exclude || []));\n let callProvider;\n if (methodName === \"usageGlobal\") {\n callProvider = (payload, path) => {\n var _ref;\n const utils = getUtils(path);\n return (_ref = provider[methodName](payload, utils, path)) != null ? _ref : false;\n };\n } else {\n callProvider = (payload, path) => {\n const utils = getUtils(path);\n provider[methodName](payload, utils, path);\n return false;\n };\n }\n return {\n debug,\n method,\n targets,\n provider,\n providerName,\n callProvider\n };\n}\nfunction definePolyfillProvider(factory) {\n return (0, _helperPluginUtils.declare)((babelApi, options, dirname) => {\n babelApi.assertVersion(\"^7.0.0 || ^8.0.0-alpha.0\");\n const {\n traverse\n } = babelApi;\n let debugLog;\n const missingDependencies = (0, _normalizeOptions.applyMissingDependenciesDefaults)(options, babelApi);\n const {\n debug,\n method,\n targets,\n provider,\n providerName,\n callProvider\n } = instantiateProvider(factory, options, missingDependencies, dirname, () => debugLog, babelApi);\n const createVisitor = method === \"entry-global\" ? v.entry : v.usage;\n const visitor = provider.visitor ? traverse.visitors.merge([createVisitor(callProvider), provider.visitor]) : createVisitor(callProvider);\n if (debug && debug !== _debugUtils.presetEnvSilentDebugHeader) {\n console.log(`${providerName}: \\`DEBUG\\` option`);\n console.log(`\\nUsing targets: ${(0, _debugUtils.stringifyTargetsMultiline)(targets)}`);\n console.log(`\\nUsing polyfills with \\`${method}\\` method:`);\n }\n const {\n runtimeName\n } = provider;\n return {\n name: \"inject-polyfills\",\n visitor,\n pre(file) {\n var _provider$pre;\n if (runtimeName) {\n if (file.get(\"runtimeHelpersModuleName\") && file.get(\"runtimeHelpersModuleName\") !== runtimeName) {\n console.warn(`Two different polyfill providers` + ` (${file.get(\"runtimeHelpersModuleProvider\")}` + ` and ${providerName}) are trying to define two` + ` conflicting @babel/runtime alternatives:` + ` ${file.get(\"runtimeHelpersModuleName\")} and ${runtimeName}.` + ` The second one will be ignored.`);\n } else {\n file.set(\"runtimeHelpersModuleName\", runtimeName);\n file.set(\"runtimeHelpersModuleProvider\", providerName);\n }\n }\n debugLog = {\n polyfills: new Set(),\n polyfillsSupport: undefined,\n found: false,\n providers: new Set(),\n missingDeps: new Set()\n };\n (_provider$pre = provider.pre) == null ? void 0 : _provider$pre.apply(this, arguments);\n },\n post() {\n var _provider$post;\n (_provider$post = provider.post) == null ? void 0 : _provider$post.apply(this, arguments);\n if (missingDependencies !== false) {\n if (missingDependencies.log === \"per-file\") {\n deps.logMissing(debugLog.missingDeps);\n } else {\n deps.laterLogMissing(debugLog.missingDeps);\n }\n }\n if (!debug) return;\n if (this.filename) console.log(`\\n[${this.filename}]`);\n if (debugLog.polyfills.size === 0) {\n console.log(method === \"entry-global\" ? debugLog.found ? `Based on your targets, the ${providerName} polyfill did not add any polyfill.` : `The entry point for the ${providerName} polyfill has not been found.` : `Based on your code and targets, the ${providerName} polyfill did not add any polyfill.`);\n return;\n }\n if (method === \"entry-global\") {\n console.log(`The ${providerName} polyfill entry has been replaced with ` + `the following polyfills:`);\n } else {\n console.log(`The ${providerName} polyfill added the following polyfills:`);\n }\n for (const name of debugLog.polyfills) {\n var _debugLog$polyfillsSu2;\n if ((_debugLog$polyfillsSu2 = debugLog.polyfillsSupport) != null && _debugLog$polyfillsSu2[name]) {\n const filteredTargets = (0, _helperCompilationTargets.getInclusionReasons)(name, targets, debugLog.polyfillsSupport);\n const formattedTargets = JSON.stringify(filteredTargets).replace(/,/g, \", \").replace(/^\\{\"/, '{ \"').replace(/\"\\}$/, '\" }');\n console.log(` ${name} ${formattedTargets}`);\n } else {\n console.log(` ${name}`);\n }\n }\n }\n };\n });\n}\nfunction mapGetOr(map, key, getDefault) {\n let val = map.get(key);\n if (val === undefined) {\n val = getDefault();\n map.set(key, val);\n }\n return val;\n}\nfunction isEmpty(obj) {\n return Object.keys(obj).length === 0;\n}","\"use strict\";\n\nexports.__esModule = true;\nexports.default = void 0;\nvar _corejs2BuiltIns = _interopRequireDefault(require(\"@babel/compat-data/corejs2-built-ins\"));\nvar _builtInDefinitions = require(\"./built-in-definitions\");\nvar _addPlatformSpecificPolyfills = _interopRequireDefault(require(\"./add-platform-specific-polyfills\"));\nvar _helpers = require(\"./helpers\");\nvar _helperDefinePolyfillProvider = _interopRequireDefault(require(\"@babel/helper-define-polyfill-provider\"));\nvar _babel = _interopRequireWildcard(require(\"@babel/core\"));\nfunction _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== \"function\") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }\nfunction _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== \"object\" && typeof obj !== \"function\") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== \"default\" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nconst {\n types: t\n} = _babel.default || _babel;\nconst BABEL_RUNTIME = \"@babel/runtime-corejs2\";\nconst presetEnvCompat = \"#__secret_key__@babel/preset-env__compatibility\";\nconst runtimeCompat = \"#__secret_key__@babel/runtime__compatibility\";\nconst has = Function.call.bind(Object.hasOwnProperty);\nvar _default = (0, _helperDefinePolyfillProvider.default)(function (api, {\n [presetEnvCompat]: {\n entryInjectRegenerator = false,\n noRuntimeName = false\n } = {},\n [runtimeCompat]: {\n useBabelRuntime = false,\n runtimeVersion = \"\",\n ext = \".js\"\n } = {}\n}) {\n const resolve = api.createMetaResolver({\n global: _builtInDefinitions.BuiltIns,\n static: _builtInDefinitions.StaticProperties,\n instance: _builtInDefinitions.InstanceProperties\n });\n const {\n debug,\n shouldInjectPolyfill,\n method\n } = api;\n const polyfills = (0, _addPlatformSpecificPolyfills.default)(api.targets, method, _corejs2BuiltIns.default);\n const coreJSBase = useBabelRuntime ? `${BABEL_RUNTIME}/core-js` : method === \"usage-pure\" ? \"core-js/library/fn\" : \"core-js/modules\";\n function inject(name, utils) {\n if (typeof name === \"string\") {\n // Some polyfills aren't always available, for example\n // web.dom.iterable when targeting node\n if (has(polyfills, name) && shouldInjectPolyfill(name)) {\n debug(name);\n utils.injectGlobalImport(`${coreJSBase}/${name}.js`);\n }\n return;\n }\n name.forEach(name => inject(name, utils));\n }\n function maybeInjectPure(desc, hint, utils) {\n let {\n pure,\n meta,\n name\n } = desc;\n if (!pure || !shouldInjectPolyfill(name)) return;\n if (runtimeVersion && meta && meta.minRuntimeVersion && !(0, _helpers.hasMinVersion)(meta && meta.minRuntimeVersion, runtimeVersion)) {\n return;\n }\n\n // Unfortunately core-js and @babel/runtime-corejs2 don't have the same\n // directory structure, so we need to special case this.\n if (useBabelRuntime && pure === \"symbol/index\") pure = \"symbol\";\n return utils.injectDefaultImport(`${coreJSBase}/${pure}${ext}`, hint);\n }\n return {\n name: \"corejs2\",\n runtimeName: noRuntimeName ? null : BABEL_RUNTIME,\n polyfills,\n entryGlobal(meta, utils, path) {\n if (meta.kind === \"import\" && meta.source === \"core-js\") {\n debug(null);\n inject(Object.keys(polyfills), utils);\n if (entryInjectRegenerator) {\n utils.injectGlobalImport(\"regenerator-runtime/runtime.js\");\n }\n path.remove();\n }\n },\n usageGlobal(meta, utils) {\n const resolved = resolve(meta);\n if (!resolved) return;\n let deps = resolved.desc.global;\n if (resolved.kind !== \"global\" && \"object\" in meta && meta.object && meta.placement === \"prototype\") {\n const low = meta.object.toLowerCase();\n deps = deps.filter(m => m.includes(low));\n }\n inject(deps, utils);\n },\n usagePure(meta, utils, path) {\n if (meta.kind === \"in\") {\n if (meta.key === \"Symbol.iterator\") {\n path.replaceWith(t.callExpression(utils.injectDefaultImport(`${coreJSBase}/is-iterable${ext}`, \"isIterable\"), [path.node.right] // meta.kind === \"in\" narrows this\n ));\n }\n\n return;\n }\n if (path.parentPath.isUnaryExpression({\n operator: \"delete\"\n })) return;\n if (meta.kind === \"property\") {\n // We can't compile destructuring.\n if (!path.isMemberExpression()) return;\n if (!path.isReferenced()) return;\n if (meta.key === \"Symbol.iterator\" && shouldInjectPolyfill(\"es6.symbol\") && path.parentPath.isCallExpression({\n callee: path.node\n }) && path.parentPath.node.arguments.length === 0) {\n path.parentPath.replaceWith(t.callExpression(utils.injectDefaultImport(`${coreJSBase}/get-iterator${ext}`, \"getIterator\"), [path.node.object]));\n path.skip();\n return;\n }\n }\n const resolved = resolve(meta);\n if (!resolved) return;\n const id = maybeInjectPure(resolved.desc, resolved.name, utils);\n if (id) path.replaceWith(id);\n },\n visitor: method === \"usage-global\" && {\n // yield*\n YieldExpression(path) {\n if (path.node.delegate) {\n inject(\"web.dom.iterable\", api.getUtils(path));\n }\n },\n // for-of, [a, b] = c\n \"ForOfStatement|ArrayPattern\"(path) {\n _builtInDefinitions.CommonIterators.forEach(name => inject(name, api.getUtils(path)));\n }\n }\n };\n});\nexports.default = _default;","// env vars from the cli are always strings, so !!ENV_VAR returns true for \"false\"\nfunction bool(value) {\n if (value == null) return false;\n return value && value !== \"false\" && value !== \"0\";\n}\n\nmodule.exports = bool(process.env[\"BABEL_8_BREAKING\"])\n ? null\n : require(\"babel-plugin-polyfill-corejs2-BABEL_8_BREAKING-false\");\n","module.exports = require(\"core-js-compat/data\");\n","\"use strict\";\n\nexports.__esModule = true;\nexports.default = void 0;\n// This file is automatically generated by scripts/build-corejs3-shipped-proposals.mjs\nvar _default = new Set([\"esnext.suppressed-error.constructor\", \"esnext.array.from-async\", \"esnext.array.group\", \"esnext.array.group-to-map\", \"esnext.data-view.get-float16\", \"esnext.data-view.set-float16\", \"esnext.iterator.constructor\", \"esnext.iterator.drop\", \"esnext.iterator.every\", \"esnext.iterator.filter\", \"esnext.iterator.find\", \"esnext.iterator.flat-map\", \"esnext.iterator.for-each\", \"esnext.iterator.from\", \"esnext.iterator.map\", \"esnext.iterator.reduce\", \"esnext.iterator.some\", \"esnext.iterator.take\", \"esnext.iterator.to-array\", \"esnext.json.is-raw-json\", \"esnext.json.parse\", \"esnext.json.raw-json\", \"esnext.math.f16round\", \"esnext.promise.try\", \"esnext.symbol.async-dispose\", \"esnext.symbol.dispose\", \"esnext.symbol.metadata\"]);\nexports.default = _default;","'use strict';\n// eslint-disable-next-line es/no-object-hasown -- safe\nconst has = Object.hasOwn || Function.call.bind({}.hasOwnProperty);\n\nfunction semver(input) {\n if (input instanceof semver) return input;\n // eslint-disable-next-line new-cap -- ok\n if (!(this instanceof semver)) return new semver(input);\n const match = /(\\d+)(?:\\.(\\d+))?(?:\\.(\\d+))?/.exec(input);\n if (!match) throw new TypeError(`Invalid version: ${ input }`);\n const [, $major, $minor, $patch] = match;\n this.major = +$major;\n this.minor = $minor ? +$minor : 0;\n this.patch = $patch ? +$patch : 0;\n}\n\nsemver.prototype.toString = function () {\n return `${ this.major }.${ this.minor }.${ this.patch }`;\n};\n\nfunction compare($a, operator, $b) {\n const a = semver($a);\n const b = semver($b);\n for (const component of ['major', 'minor', 'patch']) {\n if (a[component] < b[component]) return operator === '<' || operator === '<=' || operator === '!=';\n if (a[component] > b[component]) return operator === '>' || operator === '>=' || operator === '!=';\n } return operator === '==' || operator === '<=' || operator === '>=';\n}\n\nfunction filterOutStabilizedProposals(modules) {\n const modulesSet = new Set(modules);\n\n for (const $module of modulesSet) {\n if ($module.startsWith('esnext.') && modulesSet.has($module.replace(/^esnext\\./, 'es.'))) {\n modulesSet.delete($module);\n }\n }\n\n return [...modulesSet];\n}\n\nfunction intersection(list, order) {\n const set = list instanceof Set ? list : new Set(list);\n return order.filter(name => set.has(name));\n}\n\nfunction sortObjectByKey(object, fn) {\n return Object.keys(object).sort(fn).reduce((memo, key) => {\n memo[key] = object[key];\n return memo;\n }, {});\n}\n\nmodule.exports = {\n compare,\n filterOutStabilizedProposals,\n has,\n intersection,\n semver,\n sortObjectByKey,\n};\n","'use strict';\nconst { compare, intersection, semver } = require('./helpers');\nconst modulesByVersions = require('./modules-by-versions');\nconst modules = require('./modules');\n\nmodule.exports = function (raw) {\n const corejs = semver(raw);\n if (corejs.major !== 3) {\n throw new RangeError('This version of `core-js-compat` works only with `core-js@3`.');\n }\n const result = [];\n for (const version of Object.keys(modulesByVersions)) {\n if (compare(version, '<=', corejs)) {\n result.push(...modulesByVersions[version]);\n }\n }\n return intersection(result, modules);\n};\n","module.exports = require(\"core-js-compat/get-modules-list-for-target-version\");\n","\"use strict\";\n\nexports.__esModule = true;\nexports.StaticProperties = exports.PromiseDependenciesWithIterators = exports.PromiseDependencies = exports.InstanceProperties = exports.DecoratorMetadataDependencies = exports.CommonIterators = exports.BuiltIns = void 0;\nvar _data = _interopRequireDefault(require(\"../core-js-compat/data.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nfunction _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nconst polyfillsOrder = {};\nObject.keys(_data.default).forEach((name, index) => {\n polyfillsOrder[name] = index;\n});\nconst define = (pure, global, name = global[0], exclude) => {\n return {\n name,\n pure,\n global: global.sort((a, b) => polyfillsOrder[a] - polyfillsOrder[b]),\n exclude\n };\n};\nconst typed = (...modules) => define(null, [...modules, ...TypedArrayDependencies]);\nconst ArrayNatureIterators = [\"es.array.iterator\", \"web.dom-collections.iterator\"];\nconst CommonIterators = [\"es.string.iterator\", ...ArrayNatureIterators];\nexports.CommonIterators = CommonIterators;\nconst ArrayNatureIteratorsWithTag = [\"es.object.to-string\", ...ArrayNatureIterators];\nconst CommonIteratorsWithTag = [\"es.object.to-string\", ...CommonIterators];\nconst ErrorDependencies = [\"es.error.cause\", \"es.error.to-string\"];\nconst SuppressedErrorDependencies = [\"esnext.suppressed-error.constructor\", ...ErrorDependencies];\nconst ArrayBufferDependencies = [\"es.array-buffer.constructor\", \"es.array-buffer.slice\", \"es.data-view\", \"es.array-buffer.detached\", \"es.array-buffer.transfer\", \"es.array-buffer.transfer-to-fixed-length\", \"es.object.to-string\"];\nconst TypedArrayDependencies = [\"es.typed-array.at\", \"es.typed-array.copy-within\", \"es.typed-array.every\", \"es.typed-array.fill\", \"es.typed-array.filter\", \"es.typed-array.find\", \"es.typed-array.find-index\", \"es.typed-array.find-last\", \"es.typed-array.find-last-index\", \"es.typed-array.for-each\", \"es.typed-array.includes\", \"es.typed-array.index-of\", \"es.typed-array.iterator\", \"es.typed-array.join\", \"es.typed-array.last-index-of\", \"es.typed-array.map\", \"es.typed-array.reduce\", \"es.typed-array.reduce-right\", \"es.typed-array.reverse\", \"es.typed-array.set\", \"es.typed-array.slice\", \"es.typed-array.some\", \"es.typed-array.sort\", \"es.typed-array.subarray\", \"es.typed-array.to-locale-string\", \"es.typed-array.to-reversed\", \"es.typed-array.to-sorted\", \"es.typed-array.to-string\", \"es.typed-array.with\", \"es.object.to-string\", \"es.array.iterator\", \"esnext.typed-array.filter-reject\", \"esnext.typed-array.group-by\", \"esnext.typed-array.to-spliced\", \"esnext.typed-array.unique-by\", ...ArrayBufferDependencies];\nconst PromiseDependencies = [\"es.promise\", \"es.object.to-string\"];\nexports.PromiseDependencies = PromiseDependencies;\nconst PromiseDependenciesWithIterators = [...PromiseDependencies, ...CommonIterators];\nexports.PromiseDependenciesWithIterators = PromiseDependenciesWithIterators;\nconst SymbolDependencies = [\"es.symbol\", \"es.symbol.description\", \"es.object.to-string\"];\nconst MapDependencies = [\"es.map\", \"esnext.map.delete-all\", \"esnext.map.emplace\", \"esnext.map.every\", \"esnext.map.filter\", \"esnext.map.find\", \"esnext.map.find-key\", \"esnext.map.includes\", \"esnext.map.key-of\", \"esnext.map.map-keys\", \"esnext.map.map-values\", \"esnext.map.merge\", \"esnext.map.reduce\", \"esnext.map.some\", \"esnext.map.update\", ...CommonIteratorsWithTag];\nconst SetDependencies = [\"es.set\", \"es.set.difference.v2\", \"es.set.intersection.v2\", \"es.set.is-disjoint-from.v2\", \"es.set.is-subset-of.v2\", \"es.set.is-superset-of.v2\", \"es.set.symmetric-difference.v2\", \"es.set.union.v2\", \"esnext.set.add-all\", \"esnext.set.delete-all\", \"esnext.set.difference\", \"esnext.set.every\", \"esnext.set.filter\", \"esnext.set.find\", \"esnext.set.intersection\", \"esnext.set.is-disjoint-from\", \"esnext.set.is-subset-of\", \"esnext.set.is-superset-of\", \"esnext.set.join\", \"esnext.set.map\", \"esnext.set.reduce\", \"esnext.set.some\", \"esnext.set.symmetric-difference\", \"esnext.set.union\", ...CommonIteratorsWithTag];\nconst WeakMapDependencies = [\"es.weak-map\", \"esnext.weak-map.delete-all\", \"esnext.weak-map.emplace\", ...CommonIteratorsWithTag];\nconst WeakSetDependencies = [\"es.weak-set\", \"esnext.weak-set.add-all\", \"esnext.weak-set.delete-all\", ...CommonIteratorsWithTag];\nconst DOMExceptionDependencies = [\"web.dom-exception.constructor\", \"web.dom-exception.stack\", \"web.dom-exception.to-string-tag\", \"es.error.to-string\"];\nconst URLSearchParamsDependencies = [\"web.url-search-params\", \"web.url-search-params.delete\", \"web.url-search-params.has\", \"web.url-search-params.size\", ...CommonIteratorsWithTag];\nconst AsyncIteratorDependencies = [\"esnext.async-iterator.constructor\", ...PromiseDependencies];\nconst AsyncIteratorProblemMethods = [\"esnext.async-iterator.every\", \"esnext.async-iterator.filter\", \"esnext.async-iterator.find\", \"esnext.async-iterator.flat-map\", \"esnext.async-iterator.for-each\", \"esnext.async-iterator.map\", \"esnext.async-iterator.reduce\", \"esnext.async-iterator.some\"];\nconst IteratorDependencies = [\"esnext.iterator.constructor\", \"es.object.to-string\"];\nconst DecoratorMetadataDependencies = [\"esnext.symbol.metadata\", \"esnext.function.metadata\"];\nexports.DecoratorMetadataDependencies = DecoratorMetadataDependencies;\nconst TypedArrayStaticMethods = base => ({\n from: define(null, [\"es.typed-array.from\", base, ...TypedArrayDependencies]),\n fromAsync: define(null, [\"esnext.typed-array.from-async\", base, ...PromiseDependenciesWithIterators, ...TypedArrayDependencies]),\n of: define(null, [\"es.typed-array.of\", base, ...TypedArrayDependencies])\n});\nconst DataViewDependencies = [\"es.data-view\", ...ArrayBufferDependencies];\nconst BuiltIns = {\n AsyncDisposableStack: define(\"async-disposable-stack/index\", [\"esnext.async-disposable-stack.constructor\", \"es.object.to-string\", \"esnext.async-iterator.async-dispose\", \"esnext.iterator.dispose\", ...PromiseDependencies, ...SuppressedErrorDependencies]),\n AsyncIterator: define(\"async-iterator/index\", AsyncIteratorDependencies),\n AggregateError: define(\"aggregate-error\", [\"es.aggregate-error\", ...ErrorDependencies, ...CommonIteratorsWithTag, \"es.aggregate-error.cause\"]),\n ArrayBuffer: define(null, ArrayBufferDependencies),\n DataView: define(null, DataViewDependencies),\n Date: define(null, [\"es.date.to-string\"]),\n DOMException: define(\"dom-exception/index\", DOMExceptionDependencies),\n DisposableStack: define(\"disposable-stack/index\", [\"esnext.disposable-stack.constructor\", \"es.object.to-string\", \"esnext.iterator.dispose\", ...SuppressedErrorDependencies]),\n Error: define(null, ErrorDependencies),\n EvalError: define(null, ErrorDependencies),\n Float32Array: typed(\"es.typed-array.float32-array\"),\n Float64Array: typed(\"es.typed-array.float64-array\"),\n Int8Array: typed(\"es.typed-array.int8-array\"),\n Int16Array: typed(\"es.typed-array.int16-array\"),\n Int32Array: typed(\"es.typed-array.int32-array\"),\n Iterator: define(\"iterator/index\", IteratorDependencies),\n Uint8Array: typed(\"es.typed-array.uint8-array\", \"esnext.uint8-array.set-from-base64\", \"esnext.uint8-array.set-from-hex\", \"esnext.uint8-array.to-base64\", \"esnext.uint8-array.to-hex\"),\n Uint8ClampedArray: typed(\"es.typed-array.uint8-clamped-array\"),\n Uint16Array: typed(\"es.typed-array.uint16-array\"),\n Uint32Array: typed(\"es.typed-array.uint32-array\"),\n Map: define(\"map/index\", MapDependencies),\n Number: define(null, [\"es.number.constructor\"]),\n Observable: define(\"observable/index\", [\"esnext.observable\", \"esnext.symbol.observable\", \"es.object.to-string\", ...CommonIteratorsWithTag]),\n Promise: define(\"promise/index\", PromiseDependencies),\n RangeError: define(null, ErrorDependencies),\n ReferenceError: define(null, ErrorDependencies),\n Reflect: define(null, [\"es.reflect.to-string-tag\", \"es.object.to-string\"]),\n RegExp: define(null, [\"es.regexp.constructor\", \"es.regexp.dot-all\", \"es.regexp.exec\", \"es.regexp.sticky\", \"es.regexp.to-string\"]),\n Set: define(\"set/index\", SetDependencies),\n SuppressedError: define(\"suppressed-error\", SuppressedErrorDependencies),\n Symbol: define(\"symbol/index\", SymbolDependencies),\n SyntaxError: define(null, ErrorDependencies),\n TypeError: define(null, ErrorDependencies),\n URIError: define(null, ErrorDependencies),\n URL: define(\"url/index\", [\"web.url\", \"web.url.to-json\", ...URLSearchParamsDependencies]),\n URLSearchParams: define(\"url-search-params/index\", URLSearchParamsDependencies),\n WeakMap: define(\"weak-map/index\", WeakMapDependencies),\n WeakSet: define(\"weak-set/index\", WeakSetDependencies),\n atob: define(\"atob\", [\"web.atob\", ...DOMExceptionDependencies]),\n btoa: define(\"btoa\", [\"web.btoa\", ...DOMExceptionDependencies]),\n clearImmediate: define(\"clear-immediate\", [\"web.immediate\"]),\n compositeKey: define(\"composite-key\", [\"esnext.composite-key\"]),\n compositeSymbol: define(\"composite-symbol\", [\"esnext.composite-symbol\"]),\n escape: define(\"escape\", [\"es.escape\"]),\n fetch: define(null, PromiseDependencies),\n globalThis: define(\"global-this\", [\"es.global-this\"]),\n parseFloat: define(\"parse-float\", [\"es.parse-float\"]),\n parseInt: define(\"parse-int\", [\"es.parse-int\"]),\n queueMicrotask: define(\"queue-microtask\", [\"web.queue-microtask\"]),\n self: define(\"self\", [\"web.self\"]),\n setImmediate: define(\"set-immediate\", [\"web.immediate\"]),\n setInterval: define(\"set-interval\", [\"web.timers\"]),\n setTimeout: define(\"set-timeout\", [\"web.timers\"]),\n structuredClone: define(\"structured-clone\", [\"web.structured-clone\", ...DOMExceptionDependencies, \"es.array.iterator\", \"es.object.keys\", \"es.object.to-string\", \"es.map\", \"es.set\"]),\n unescape: define(\"unescape\", [\"es.unescape\"])\n};\nexports.BuiltIns = BuiltIns;\nconst StaticProperties = {\n AsyncIterator: {\n from: define(\"async-iterator/from\", [\"esnext.async-iterator.from\", ...AsyncIteratorDependencies, ...AsyncIteratorProblemMethods, ...CommonIterators])\n },\n Array: {\n from: define(\"array/from\", [\"es.array.from\", \"es.string.iterator\"]),\n fromAsync: define(\"array/from-async\", [\"esnext.array.from-async\", ...PromiseDependenciesWithIterators]),\n isArray: define(\"array/is-array\", [\"es.array.is-array\"]),\n isTemplateObject: define(\"array/is-template-object\", [\"esnext.array.is-template-object\"]),\n of: define(\"array/of\", [\"es.array.of\"])\n },\n ArrayBuffer: {\n isView: define(null, [\"es.array-buffer.is-view\"])\n },\n BigInt: {\n range: define(\"bigint/range\", [\"esnext.bigint.range\", \"es.object.to-string\"])\n },\n Date: {\n now: define(\"date/now\", [\"es.date.now\"])\n },\n Function: {\n isCallable: define(\"function/is-callable\", [\"esnext.function.is-callable\"]),\n isConstructor: define(\"function/is-constructor\", [\"esnext.function.is-constructor\"])\n },\n Iterator: {\n from: define(\"iterator/from\", [\"esnext.iterator.from\", ...IteratorDependencies, ...CommonIterators]),\n range: define(\"iterator/range\", [\"esnext.iterator.range\", \"es.object.to-string\"])\n },\n JSON: {\n isRawJSON: define(\"json/is-raw-json\", [\"esnext.json.is-raw-json\"]),\n parse: define(\"json/parse\", [\"esnext.json.parse\", \"es.object.keys\"]),\n rawJSON: define(\"json/raw-json\", [\"esnext.json.raw-json\", \"es.object.create\", \"es.object.freeze\"]),\n stringify: define(\"json/stringify\", [\"es.json.stringify\", \"es.date.to-json\"], \"es.symbol\")\n },\n Math: {\n DEG_PER_RAD: define(\"math/deg-per-rad\", [\"esnext.math.deg-per-rad\"]),\n RAD_PER_DEG: define(\"math/rad-per-deg\", [\"esnext.math.rad-per-deg\"]),\n acosh: define(\"math/acosh\", [\"es.math.acosh\"]),\n asinh: define(\"math/asinh\", [\"es.math.asinh\"]),\n atanh: define(\"math/atanh\", [\"es.math.atanh\"]),\n cbrt: define(\"math/cbrt\", [\"es.math.cbrt\"]),\n clamp: define(\"math/clamp\", [\"esnext.math.clamp\"]),\n clz32: define(\"math/clz32\", [\"es.math.clz32\"]),\n cosh: define(\"math/cosh\", [\"es.math.cosh\"]),\n degrees: define(\"math/degrees\", [\"esnext.math.degrees\"]),\n expm1: define(\"math/expm1\", [\"es.math.expm1\"]),\n fround: define(\"math/fround\", [\"es.math.fround\"]),\n f16round: define(\"math/f16round\", [\"esnext.math.f16round\"]),\n fscale: define(\"math/fscale\", [\"esnext.math.fscale\"]),\n hypot: define(\"math/hypot\", [\"es.math.hypot\"]),\n iaddh: define(\"math/iaddh\", [\"esnext.math.iaddh\"]),\n imul: define(\"math/imul\", [\"es.math.imul\"]),\n imulh: define(\"math/imulh\", [\"esnext.math.imulh\"]),\n isubh: define(\"math/isubh\", [\"esnext.math.isubh\"]),\n log10: define(\"math/log10\", [\"es.math.log10\"]),\n log1p: define(\"math/log1p\", [\"es.math.log1p\"]),\n log2: define(\"math/log2\", [\"es.math.log2\"]),\n radians: define(\"math/radians\", [\"esnext.math.radians\"]),\n scale: define(\"math/scale\", [\"esnext.math.scale\"]),\n seededPRNG: define(\"math/seeded-prng\", [\"esnext.math.seeded-prng\"]),\n sign: define(\"math/sign\", [\"es.math.sign\"]),\n signbit: define(\"math/signbit\", [\"esnext.math.signbit\"]),\n sinh: define(\"math/sinh\", [\"es.math.sinh\"]),\n sumPrecise: define(\"math/sum-precise\", [\"esnext.math.sum-precise\", \"es.array.iterator\"]),\n tanh: define(\"math/tanh\", [\"es.math.tanh\"]),\n trunc: define(\"math/trunc\", [\"es.math.trunc\"]),\n umulh: define(\"math/umulh\", [\"esnext.math.umulh\"])\n },\n Map: {\n from: define(\"map/from\", [\"esnext.map.from\", ...MapDependencies]),\n groupBy: define(\"map/group-by\", [\"es.map.group-by\", ...MapDependencies]),\n keyBy: define(\"map/key-by\", [\"esnext.map.key-by\", ...MapDependencies]),\n of: define(\"map/of\", [\"esnext.map.of\", ...MapDependencies])\n },\n Number: {\n EPSILON: define(\"number/epsilon\", [\"es.number.epsilon\"]),\n MAX_SAFE_INTEGER: define(\"number/max-safe-integer\", [\"es.number.max-safe-integer\"]),\n MIN_SAFE_INTEGER: define(\"number/min-safe-integer\", [\"es.number.min-safe-integer\"]),\n fromString: define(\"number/from-string\", [\"esnext.number.from-string\"]),\n isFinite: define(\"number/is-finite\", [\"es.number.is-finite\"]),\n isInteger: define(\"number/is-integer\", [\"es.number.is-integer\"]),\n isNaN: define(\"number/is-nan\", [\"es.number.is-nan\"]),\n isSafeInteger: define(\"number/is-safe-integer\", [\"es.number.is-safe-integer\"]),\n parseFloat: define(\"number/parse-float\", [\"es.number.parse-float\"]),\n parseInt: define(\"number/parse-int\", [\"es.number.parse-int\"]),\n range: define(\"number/range\", [\"esnext.number.range\", \"es.object.to-string\"])\n },\n Object: {\n assign: define(\"object/assign\", [\"es.object.assign\"]),\n create: define(\"object/create\", [\"es.object.create\"]),\n defineProperties: define(\"object/define-properties\", [\"es.object.define-properties\"]),\n defineProperty: define(\"object/define-property\", [\"es.object.define-property\"]),\n entries: define(\"object/entries\", [\"es.object.entries\"]),\n freeze: define(\"object/freeze\", [\"es.object.freeze\"]),\n fromEntries: define(\"object/from-entries\", [\"es.object.from-entries\", \"es.array.iterator\"]),\n getOwnPropertyDescriptor: define(\"object/get-own-property-descriptor\", [\"es.object.get-own-property-descriptor\"]),\n getOwnPropertyDescriptors: define(\"object/get-own-property-descriptors\", [\"es.object.get-own-property-descriptors\"]),\n getOwnPropertyNames: define(\"object/get-own-property-names\", [\"es.object.get-own-property-names\"]),\n getOwnPropertySymbols: define(\"object/get-own-property-symbols\", [\"es.symbol\"]),\n getPrototypeOf: define(\"object/get-prototype-of\", [\"es.object.get-prototype-of\"]),\n groupBy: define(\"object/group-by\", [\"es.object.group-by\", \"es.object.create\"]),\n hasOwn: define(\"object/has-own\", [\"es.object.has-own\"]),\n is: define(\"object/is\", [\"es.object.is\"]),\n isExtensible: define(\"object/is-extensible\", [\"es.object.is-extensible\"]),\n isFrozen: define(\"object/is-frozen\", [\"es.object.is-frozen\"]),\n isSealed: define(\"object/is-sealed\", [\"es.object.is-sealed\"]),\n keys: define(\"object/keys\", [\"es.object.keys\"]),\n preventExtensions: define(\"object/prevent-extensions\", [\"es.object.prevent-extensions\"]),\n seal: define(\"object/seal\", [\"es.object.seal\"]),\n setPrototypeOf: define(\"object/set-prototype-of\", [\"es.object.set-prototype-of\"]),\n values: define(\"object/values\", [\"es.object.values\"])\n },\n Promise: {\n all: define(null, PromiseDependenciesWithIterators),\n allSettled: define(\"promise/all-settled\", [\"es.promise.all-settled\", ...PromiseDependenciesWithIterators]),\n any: define(\"promise/any\", [\"es.promise.any\", \"es.aggregate-error\", ...PromiseDependenciesWithIterators]),\n race: define(null, PromiseDependenciesWithIterators),\n try: define(\"promise/try\", [\"esnext.promise.try\", ...PromiseDependencies]),\n withResolvers: define(\"promise/with-resolvers\", [\"es.promise.with-resolvers\", ...PromiseDependencies])\n },\n Reflect: {\n apply: define(\"reflect/apply\", [\"es.reflect.apply\"]),\n construct: define(\"reflect/construct\", [\"es.reflect.construct\"]),\n defineMetadata: define(\"reflect/define-metadata\", [\"esnext.reflect.define-metadata\"]),\n defineProperty: define(\"reflect/define-property\", [\"es.reflect.define-property\"]),\n deleteMetadata: define(\"reflect/delete-metadata\", [\"esnext.reflect.delete-metadata\"]),\n deleteProperty: define(\"reflect/delete-property\", [\"es.reflect.delete-property\"]),\n get: define(\"reflect/get\", [\"es.reflect.get\"]),\n getMetadata: define(\"reflect/get-metadata\", [\"esnext.reflect.get-metadata\"]),\n getMetadataKeys: define(\"reflect/get-metadata-keys\", [\"esnext.reflect.get-metadata-keys\"]),\n getOwnMetadata: define(\"reflect/get-own-metadata\", [\"esnext.reflect.get-own-metadata\"]),\n getOwnMetadataKeys: define(\"reflect/get-own-metadata-keys\", [\"esnext.reflect.get-own-metadata-keys\"]),\n getOwnPropertyDescriptor: define(\"reflect/get-own-property-descriptor\", [\"es.reflect.get-own-property-descriptor\"]),\n getPrototypeOf: define(\"reflect/get-prototype-of\", [\"es.reflect.get-prototype-of\"]),\n has: define(\"reflect/has\", [\"es.reflect.has\"]),\n hasMetadata: define(\"reflect/has-metadata\", [\"esnext.reflect.has-metadata\"]),\n hasOwnMetadata: define(\"reflect/has-own-metadata\", [\"esnext.reflect.has-own-metadata\"]),\n isExtensible: define(\"reflect/is-extensible\", [\"es.reflect.is-extensible\"]),\n metadata: define(\"reflect/metadata\", [\"esnext.reflect.metadata\"]),\n ownKeys: define(\"reflect/own-keys\", [\"es.reflect.own-keys\"]),\n preventExtensions: define(\"reflect/prevent-extensions\", [\"es.reflect.prevent-extensions\"]),\n set: define(\"reflect/set\", [\"es.reflect.set\"]),\n setPrototypeOf: define(\"reflect/set-prototype-of\", [\"es.reflect.set-prototype-of\"])\n },\n RegExp: {\n escape: define(\"regexp/escape\", [\"esnext.regexp.escape\"])\n },\n Set: {\n from: define(\"set/from\", [\"esnext.set.from\", ...SetDependencies]),\n of: define(\"set/of\", [\"esnext.set.of\", ...SetDependencies])\n },\n String: {\n cooked: define(\"string/cooked\", [\"esnext.string.cooked\"]),\n dedent: define(\"string/dedent\", [\"esnext.string.dedent\", \"es.string.from-code-point\", \"es.weak-map\"]),\n fromCodePoint: define(\"string/from-code-point\", [\"es.string.from-code-point\"]),\n raw: define(\"string/raw\", [\"es.string.raw\"])\n },\n Symbol: {\n asyncDispose: define(\"symbol/async-dispose\", [\"esnext.symbol.async-dispose\", \"esnext.async-iterator.async-dispose\"]),\n asyncIterator: define(\"symbol/async-iterator\", [\"es.symbol.async-iterator\"]),\n customMatcher: define(\"symbol/custom-matcher\", [\"esnext.symbol.custom-matcher\"]),\n dispose: define(\"symbol/dispose\", [\"esnext.symbol.dispose\", \"esnext.iterator.dispose\"]),\n for: define(\"symbol/for\", [], \"es.symbol\"),\n hasInstance: define(\"symbol/has-instance\", [\"es.symbol.has-instance\", \"es.function.has-instance\"]),\n isConcatSpreadable: define(\"symbol/is-concat-spreadable\", [\"es.symbol.is-concat-spreadable\", \"es.array.concat\"]),\n isRegistered: define(\"symbol/is-registered\", [\"esnext.symbol.is-registered\", \"es.symbol\"]),\n isRegisteredSymbol: define(\"symbol/is-registered-symbol\", [\"esnext.symbol.is-registered-symbol\", \"es.symbol\"]),\n isWellKnown: define(\"symbol/is-well-known\", [\"esnext.symbol.is-well-known\", \"es.symbol\"]),\n isWellKnownSymbol: define(\"symbol/is-well-known-symbol\", [\"esnext.symbol.is-well-known-symbol\", \"es.symbol\"]),\n iterator: define(\"symbol/iterator\", [\"es.symbol.iterator\", ...CommonIteratorsWithTag]),\n keyFor: define(\"symbol/key-for\", [], \"es.symbol\"),\n match: define(\"symbol/match\", [\"es.symbol.match\", \"es.string.match\"]),\n matcher: define(\"symbol/matcher\", [\"esnext.symbol.matcher\"]),\n matchAll: define(\"symbol/match-all\", [\"es.symbol.match-all\", \"es.string.match-all\"]),\n metadata: define(\"symbol/metadata\", DecoratorMetadataDependencies),\n metadataKey: define(\"symbol/metadata-key\", [\"esnext.symbol.metadata-key\"]),\n observable: define(\"symbol/observable\", [\"esnext.symbol.observable\"]),\n patternMatch: define(\"symbol/pattern-match\", [\"esnext.symbol.pattern-match\"]),\n replace: define(\"symbol/replace\", [\"es.symbol.replace\", \"es.string.replace\"]),\n search: define(\"symbol/search\", [\"es.symbol.search\", \"es.string.search\"]),\n species: define(\"symbol/species\", [\"es.symbol.species\", \"es.array.species\"]),\n split: define(\"symbol/split\", [\"es.symbol.split\", \"es.string.split\"]),\n toPrimitive: define(\"symbol/to-primitive\", [\"es.symbol.to-primitive\", \"es.date.to-primitive\"]),\n toStringTag: define(\"symbol/to-string-tag\", [\"es.symbol.to-string-tag\", \"es.object.to-string\", \"es.math.to-string-tag\", \"es.json.to-string-tag\"]),\n unscopables: define(\"symbol/unscopables\", [\"es.symbol.unscopables\"])\n },\n URL: {\n canParse: define(\"url/can-parse\", [\"web.url.can-parse\", \"web.url\"]),\n parse: define(\"url/parse\", [\"web.url.parse\", \"web.url\"])\n },\n WeakMap: {\n from: define(\"weak-map/from\", [\"esnext.weak-map.from\", ...WeakMapDependencies]),\n of: define(\"weak-map/of\", [\"esnext.weak-map.of\", ...WeakMapDependencies])\n },\n WeakSet: {\n from: define(\"weak-set/from\", [\"esnext.weak-set.from\", ...WeakSetDependencies]),\n of: define(\"weak-set/of\", [\"esnext.weak-set.of\", ...WeakSetDependencies])\n },\n Int8Array: TypedArrayStaticMethods(\"es.typed-array.int8-array\"),\n Uint8Array: _extends({\n fromBase64: define(null, [\"esnext.uint8-array.from-base64\", ...TypedArrayDependencies]),\n fromHex: define(null, [\"esnext.uint8-array.from-hex\", ...TypedArrayDependencies])\n }, TypedArrayStaticMethods(\"es.typed-array.uint8-array\")),\n Uint8ClampedArray: TypedArrayStaticMethods(\"es.typed-array.uint8-clamped-array\"),\n Int16Array: TypedArrayStaticMethods(\"es.typed-array.int16-array\"),\n Uint16Array: TypedArrayStaticMethods(\"es.typed-array.uint16-array\"),\n Int32Array: TypedArrayStaticMethods(\"es.typed-array.int32-array\"),\n Uint32Array: TypedArrayStaticMethods(\"es.typed-array.uint32-array\"),\n Float32Array: TypedArrayStaticMethods(\"es.typed-array.float32-array\"),\n Float64Array: TypedArrayStaticMethods(\"es.typed-array.float64-array\"),\n WebAssembly: {\n CompileError: define(null, ErrorDependencies),\n LinkError: define(null, ErrorDependencies),\n RuntimeError: define(null, ErrorDependencies)\n }\n};\nexports.StaticProperties = StaticProperties;\nconst InstanceProperties = {\n asIndexedPairs: define(null, [\"esnext.async-iterator.as-indexed-pairs\", ...AsyncIteratorDependencies, \"esnext.iterator.as-indexed-pairs\", ...IteratorDependencies]),\n at: define(\"instance/at\", [\n // TODO: We should introduce overloaded instance methods definition\n // Before that is implemented, the `esnext.string.at` must be the first\n // In pure mode, the provider resolves the descriptor as a \"pure\" `esnext.string.at`\n // and treats the compat-data of `esnext.string.at` as the compat-data of\n // pure import `instance/at`. The first polyfill here should have the lowest corejs\n // supported versions.\n \"esnext.string.at\", \"es.string.at-alternative\", \"es.array.at\"]),\n anchor: define(null, [\"es.string.anchor\"]),\n big: define(null, [\"es.string.big\"]),\n bind: define(\"instance/bind\", [\"es.function.bind\"]),\n blink: define(null, [\"es.string.blink\"]),\n bold: define(null, [\"es.string.bold\"]),\n codePointAt: define(\"instance/code-point-at\", [\"es.string.code-point-at\"]),\n codePoints: define(\"instance/code-points\", [\"esnext.string.code-points\"]),\n concat: define(\"instance/concat\", [\"es.array.concat\"], undefined, [\"String\"]),\n copyWithin: define(\"instance/copy-within\", [\"es.array.copy-within\"]),\n demethodize: define(\"instance/demethodize\", [\"esnext.function.demethodize\"]),\n description: define(null, [\"es.symbol\", \"es.symbol.description\"]),\n dotAll: define(null, [\"es.regexp.dot-all\"]),\n drop: define(null, [\"esnext.async-iterator.drop\", ...AsyncIteratorDependencies, \"esnext.iterator.drop\", ...IteratorDependencies]),\n emplace: define(\"instance/emplace\", [\"esnext.map.emplace\", \"esnext.weak-map.emplace\"]),\n endsWith: define(\"instance/ends-with\", [\"es.string.ends-with\"]),\n entries: define(\"instance/entries\", ArrayNatureIteratorsWithTag),\n every: define(\"instance/every\", [\"es.array.every\", \"esnext.async-iterator.every\",\n // TODO: add async iterator dependencies when we support sub-dependencies\n // esnext.async-iterator.every depends on es.promise\n // but we don't want to pull es.promise when esnext.async-iterator is disabled\n //\n // ...AsyncIteratorDependencies\n \"esnext.iterator.every\", ...IteratorDependencies]),\n exec: define(null, [\"es.regexp.exec\"]),\n fill: define(\"instance/fill\", [\"es.array.fill\"]),\n filter: define(\"instance/filter\", [\"es.array.filter\", \"esnext.async-iterator.filter\", \"esnext.iterator.filter\", ...IteratorDependencies]),\n filterReject: define(\"instance/filterReject\", [\"esnext.array.filter-reject\"]),\n finally: define(null, [\"es.promise.finally\", ...PromiseDependencies]),\n find: define(\"instance/find\", [\"es.array.find\", \"esnext.async-iterator.find\", \"esnext.iterator.find\", ...IteratorDependencies]),\n findIndex: define(\"instance/find-index\", [\"es.array.find-index\"]),\n findLast: define(\"instance/find-last\", [\"es.array.find-last\"]),\n findLastIndex: define(\"instance/find-last-index\", [\"es.array.find-last-index\"]),\n fixed: define(null, [\"es.string.fixed\"]),\n flags: define(\"instance/flags\", [\"es.regexp.flags\"]),\n flatMap: define(\"instance/flat-map\", [\"es.array.flat-map\", \"es.array.unscopables.flat-map\", \"esnext.async-iterator.flat-map\", \"esnext.iterator.flat-map\", ...IteratorDependencies]),\n flat: define(\"instance/flat\", [\"es.array.flat\", \"es.array.unscopables.flat\"]),\n getFloat16: define(null, [\"esnext.data-view.get-float16\", ...DataViewDependencies]),\n getUint8Clamped: define(null, [\"esnext.data-view.get-uint8-clamped\", ...DataViewDependencies]),\n getYear: define(null, [\"es.date.get-year\"]),\n group: define(\"instance/group\", [\"esnext.array.group\"]),\n groupBy: define(\"instance/group-by\", [\"esnext.array.group-by\"]),\n groupByToMap: define(\"instance/group-by-to-map\", [\"esnext.array.group-by-to-map\", \"es.map\", \"es.object.to-string\"]),\n groupToMap: define(\"instance/group-to-map\", [\"esnext.array.group-to-map\", \"es.map\", \"es.object.to-string\"]),\n fontcolor: define(null, [\"es.string.fontcolor\"]),\n fontsize: define(null, [\"es.string.fontsize\"]),\n forEach: define(\"instance/for-each\", [\"es.array.for-each\", \"esnext.async-iterator.for-each\", \"esnext.iterator.for-each\", ...IteratorDependencies, \"web.dom-collections.for-each\"]),\n includes: define(\"instance/includes\", [\"es.array.includes\", \"es.string.includes\"]),\n indexed: define(null, [\"esnext.async-iterator.indexed\", ...AsyncIteratorDependencies, \"esnext.iterator.indexed\", ...IteratorDependencies]),\n indexOf: define(\"instance/index-of\", [\"es.array.index-of\"]),\n isWellFormed: define(\"instance/is-well-formed\", [\"es.string.is-well-formed\"]),\n italic: define(null, [\"es.string.italics\"]),\n join: define(null, [\"es.array.join\"]),\n keys: define(\"instance/keys\", ArrayNatureIteratorsWithTag),\n lastIndex: define(null, [\"esnext.array.last-index\"]),\n lastIndexOf: define(\"instance/last-index-of\", [\"es.array.last-index-of\"]),\n lastItem: define(null, [\"esnext.array.last-item\"]),\n link: define(null, [\"es.string.link\"]),\n map: define(\"instance/map\", [\"es.array.map\", \"esnext.async-iterator.map\", \"esnext.iterator.map\"]),\n match: define(null, [\"es.string.match\", \"es.regexp.exec\"]),\n matchAll: define(\"instance/match-all\", [\"es.string.match-all\", \"es.regexp.exec\"]),\n name: define(null, [\"es.function.name\"]),\n padEnd: define(\"instance/pad-end\", [\"es.string.pad-end\"]),\n padStart: define(\"instance/pad-start\", [\"es.string.pad-start\"]),\n push: define(\"instance/push\", [\"es.array.push\"]),\n reduce: define(\"instance/reduce\", [\"es.array.reduce\", \"esnext.async-iterator.reduce\", \"esnext.iterator.reduce\", ...IteratorDependencies]),\n reduceRight: define(\"instance/reduce-right\", [\"es.array.reduce-right\"]),\n repeat: define(\"instance/repeat\", [\"es.string.repeat\"]),\n replace: define(null, [\"es.string.replace\", \"es.regexp.exec\"]),\n replaceAll: define(\"instance/replace-all\", [\"es.string.replace-all\", \"es.string.replace\", \"es.regexp.exec\"]),\n reverse: define(\"instance/reverse\", [\"es.array.reverse\"]),\n search: define(null, [\"es.string.search\", \"es.regexp.exec\"]),\n setFloat16: define(null, [\"esnext.data-view.set-float16\", ...DataViewDependencies]),\n setUint8Clamped: define(null, [\"esnext.data-view.set-uint8-clamped\", ...DataViewDependencies]),\n setYear: define(null, [\"es.date.set-year\"]),\n slice: define(\"instance/slice\", [\"es.array.slice\"]),\n small: define(null, [\"es.string.small\"]),\n some: define(\"instance/some\", [\"es.array.some\", \"esnext.async-iterator.some\", \"esnext.iterator.some\", ...IteratorDependencies]),\n sort: define(\"instance/sort\", [\"es.array.sort\"]),\n splice: define(\"instance/splice\", [\"es.array.splice\"]),\n split: define(null, [\"es.string.split\", \"es.regexp.exec\"]),\n startsWith: define(\"instance/starts-with\", [\"es.string.starts-with\"]),\n sticky: define(null, [\"es.regexp.sticky\"]),\n strike: define(null, [\"es.string.strike\"]),\n sub: define(null, [\"es.string.sub\"]),\n substr: define(null, [\"es.string.substr\"]),\n sup: define(null, [\"es.string.sup\"]),\n take: define(null, [\"esnext.async-iterator.take\", ...AsyncIteratorDependencies, \"esnext.iterator.take\", ...IteratorDependencies]),\n test: define(null, [\"es.regexp.test\", \"es.regexp.exec\"]),\n toArray: define(null, [\"esnext.async-iterator.to-array\", ...AsyncIteratorDependencies, \"esnext.iterator.to-array\", ...IteratorDependencies]),\n toAsync: define(null, [\"esnext.iterator.to-async\", ...IteratorDependencies, ...AsyncIteratorDependencies, ...AsyncIteratorProblemMethods]),\n toExponential: define(null, [\"es.number.to-exponential\"]),\n toFixed: define(null, [\"es.number.to-fixed\"]),\n toGMTString: define(null, [\"es.date.to-gmt-string\"]),\n toISOString: define(null, [\"es.date.to-iso-string\"]),\n toJSON: define(null, [\"es.date.to-json\"]),\n toPrecision: define(null, [\"es.number.to-precision\"]),\n toReversed: define(\"instance/to-reversed\", [\"es.array.to-reversed\"]),\n toSorted: define(\"instance/to-sorted\", [\"es.array.to-sorted\", \"es.array.sort\"]),\n toSpliced: define(\"instance/to-spliced\", [\"es.array.to-spliced\"]),\n toString: define(null, [\"es.object.to-string\", \"es.error.to-string\", \"es.date.to-string\", \"es.regexp.to-string\"]),\n toWellFormed: define(\"instance/to-well-formed\", [\"es.string.to-well-formed\"]),\n trim: define(\"instance/trim\", [\"es.string.trim\"]),\n trimEnd: define(\"instance/trim-end\", [\"es.string.trim-end\"]),\n trimLeft: define(\"instance/trim-left\", [\"es.string.trim-start\"]),\n trimRight: define(\"instance/trim-right\", [\"es.string.trim-end\"]),\n trimStart: define(\"instance/trim-start\", [\"es.string.trim-start\"]),\n uniqueBy: define(\"instance/unique-by\", [\"esnext.array.unique-by\", \"es.map\"]),\n unshift: define(\"instance/unshift\", [\"es.array.unshift\"]),\n unThis: define(\"instance/un-this\", [\"esnext.function.un-this\"]),\n values: define(\"instance/values\", ArrayNatureIteratorsWithTag),\n with: define(\"instance/with\", [\"es.array.with\"]),\n __defineGetter__: define(null, [\"es.object.define-getter\"]),\n __defineSetter__: define(null, [\"es.object.define-setter\"]),\n __lookupGetter__: define(null, [\"es.object.lookup-getter\"]),\n __lookupSetter__: define(null, [\"es.object.lookup-setter\"]),\n [\"__proto__\"]: define(null, [\"es.object.proto\"])\n};\nexports.InstanceProperties = InstanceProperties;","\"use strict\";\n\nexports.__esModule = true;\nexports.stable = exports.proposals = void 0;\n// This file contains the list of paths supported by @babel/runtime-corejs3.\n// It must _not_ be edited, as all new features should go through direct\n// injection of core-js-pure imports.\n\nconst stable = new Set([\"array\", \"array/from\", \"array/is-array\", \"array/of\", \"clear-immediate\", \"date/now\", \"instance/bind\", \"instance/code-point-at\", \"instance/concat\", \"instance/copy-within\", \"instance/ends-with\", \"instance/entries\", \"instance/every\", \"instance/fill\", \"instance/filter\", \"instance/find\", \"instance/find-index\", \"instance/flags\", \"instance/flat\", \"instance/flat-map\", \"instance/for-each\", \"instance/includes\", \"instance/index-of\", \"instance/keys\", \"instance/last-index-of\", \"instance/map\", \"instance/pad-end\", \"instance/pad-start\", \"instance/reduce\", \"instance/reduce-right\", \"instance/repeat\", \"instance/reverse\", \"instance/slice\", \"instance/some\", \"instance/sort\", \"instance/splice\", \"instance/starts-with\", \"instance/trim\", \"instance/trim-end\", \"instance/trim-left\", \"instance/trim-right\", \"instance/trim-start\", \"instance/values\", \"json/stringify\", \"map\", \"math/acosh\", \"math/asinh\", \"math/atanh\", \"math/cbrt\", \"math/clz32\", \"math/cosh\", \"math/expm1\", \"math/fround\", \"math/hypot\", \"math/imul\", \"math/log10\", \"math/log1p\", \"math/log2\", \"math/sign\", \"math/sinh\", \"math/tanh\", \"math/trunc\", \"number/epsilon\", \"number/is-finite\", \"number/is-integer\", \"number/is-nan\", \"number/is-safe-integer\", \"number/max-safe-integer\", \"number/min-safe-integer\", \"number/parse-float\", \"number/parse-int\", \"object/assign\", \"object/create\", \"object/define-properties\", \"object/define-property\", \"object/entries\", \"object/freeze\", \"object/from-entries\", \"object/get-own-property-descriptor\", \"object/get-own-property-descriptors\", \"object/get-own-property-names\", \"object/get-own-property-symbols\", \"object/get-prototype-of\", \"object/is\", \"object/is-extensible\", \"object/is-frozen\", \"object/is-sealed\", \"object/keys\", \"object/prevent-extensions\", \"object/seal\", \"object/set-prototype-of\", \"object/values\", \"parse-float\", \"parse-int\", \"promise\", \"queue-microtask\", \"reflect/apply\", \"reflect/construct\", \"reflect/define-property\", \"reflect/delete-property\", \"reflect/get\", \"reflect/get-own-property-descriptor\", \"reflect/get-prototype-of\", \"reflect/has\", \"reflect/is-extensible\", \"reflect/own-keys\", \"reflect/prevent-extensions\", \"reflect/set\", \"reflect/set-prototype-of\", \"set\", \"set-immediate\", \"set-interval\", \"set-timeout\", \"string/from-code-point\", \"string/raw\", \"symbol\", \"symbol/async-iterator\", \"symbol/for\", \"symbol/has-instance\", \"symbol/is-concat-spreadable\", \"symbol/iterator\", \"symbol/key-for\", \"symbol/match\", \"symbol/replace\", \"symbol/search\", \"symbol/species\", \"symbol/split\", \"symbol/to-primitive\", \"symbol/to-string-tag\", \"symbol/unscopables\", \"url\", \"url-search-params\", \"weak-map\", \"weak-set\"]);\nexports.stable = stable;\nconst proposals = new Set([...stable, \"aggregate-error\", \"composite-key\", \"composite-symbol\", \"global-this\", \"instance/at\", \"instance/code-points\", \"instance/match-all\", \"instance/replace-all\", \"math/clamp\", \"math/degrees\", \"math/deg-per-rad\", \"math/fscale\", \"math/iaddh\", \"math/imulh\", \"math/isubh\", \"math/rad-per-deg\", \"math/radians\", \"math/scale\", \"math/seeded-prng\", \"math/signbit\", \"math/umulh\", \"number/from-string\", \"observable\", \"reflect/define-metadata\", \"reflect/delete-metadata\", \"reflect/get-metadata\", \"reflect/get-metadata-keys\", \"reflect/get-own-metadata\", \"reflect/get-own-metadata-keys\", \"reflect/has-metadata\", \"reflect/has-own-metadata\", \"reflect/metadata\", \"symbol/dispose\", \"symbol/observable\", \"symbol/pattern-match\"]);\nexports.proposals = proposals;","\"use strict\";\n\nexports.__esModule = true;\nexports.default = canSkipPolyfill;\nvar _babel = _interopRequireWildcard(require(\"@babel/core\"));\nfunction _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== \"function\") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }\nfunction _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== \"object\" && typeof obj !== \"function\") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== \"default\" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }\nconst {\n types: t\n} = _babel.default || _babel;\nfunction canSkipPolyfill(desc, path) {\n const {\n node,\n parent\n } = path;\n switch (desc.name) {\n case \"es.string.split\":\n {\n if (!t.isCallExpression(parent, {\n callee: node\n })) return false;\n if (parent.arguments.length < 1) return true;\n const splitter = parent.arguments[0];\n return t.isStringLiteral(splitter) || t.isTemplateLiteral(splitter);\n }\n }\n}","module.exports = require(\"core-js-compat/entries\");\n","\"use strict\";\n\nexports.__esModule = true;\nexports.BABEL_RUNTIME = void 0;\nexports.callMethod = callMethod;\nexports.coreJSModule = coreJSModule;\nexports.coreJSPureHelper = coreJSPureHelper;\nexports.isCoreJSSource = isCoreJSSource;\nvar _babel = _interopRequireWildcard(require(\"@babel/core\"));\nvar _entries = _interopRequireDefault(require(\"../core-js-compat/entries.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nfunction _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== \"function\") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }\nfunction _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== \"object\" && typeof obj !== \"function\") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== \"default\" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }\nconst {\n types: t\n} = _babel.default || _babel;\nconst BABEL_RUNTIME = \"@babel/runtime-corejs3\";\nexports.BABEL_RUNTIME = BABEL_RUNTIME;\nfunction callMethod(path, id) {\n const {\n object\n } = path.node;\n let context1, context2;\n if (t.isIdentifier(object)) {\n context1 = object;\n context2 = t.cloneNode(object);\n } else {\n context1 = path.scope.generateDeclaredUidIdentifier(\"context\");\n context2 = t.assignmentExpression(\"=\", t.cloneNode(context1), object);\n }\n path.replaceWith(t.memberExpression(t.callExpression(id, [context2]), t.identifier(\"call\")));\n path.parentPath.unshiftContainer(\"arguments\", context1);\n}\nfunction isCoreJSSource(source) {\n if (typeof source === \"string\") {\n source = source.replace(/\\\\/g, \"/\").replace(/(\\/(index)?)?(\\.js)?$/i, \"\").toLowerCase();\n }\n return Object.prototype.hasOwnProperty.call(_entries.default, source) && _entries.default[source];\n}\nfunction coreJSModule(name) {\n return `core-js/modules/${name}.js`;\n}\nfunction coreJSPureHelper(name, useBabelRuntime, ext) {\n return useBabelRuntime ? `${BABEL_RUNTIME}/core-js/${name}${ext}` : `core-js-pure/features/${name}.js`;\n}","\"use strict\";\n\nexports.__esModule = true;\nexports.default = void 0;\nvar _data = _interopRequireDefault(require(\"../core-js-compat/data.js\"));\nvar _shippedProposals = _interopRequireDefault(require(\"./shipped-proposals\"));\nvar _getModulesListForTargetVersion = _interopRequireDefault(require(\"../core-js-compat/get-modules-list-for-target-version.js\"));\nvar _builtInDefinitions = require(\"./built-in-definitions\");\nvar BabelRuntimePaths = _interopRequireWildcard(require(\"./babel-runtime-corejs3-paths\"));\nvar _usageFilters = _interopRequireDefault(require(\"./usage-filters\"));\nvar _babel = _interopRequireWildcard(require(\"@babel/core\"));\nvar _utils = require(\"./utils\");\nvar _helperDefinePolyfillProvider = _interopRequireDefault(require(\"@babel/helper-define-polyfill-provider\"));\nfunction _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== \"function\") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }\nfunction _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== \"object\" && typeof obj !== \"function\") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== \"default\" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nfunction _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nconst {\n types: t\n} = _babel.default || _babel;\nconst presetEnvCompat = \"#__secret_key__@babel/preset-env__compatibility\";\nconst runtimeCompat = \"#__secret_key__@babel/runtime__compatibility\";\nconst uniqueObjects = [\"array\", \"string\", \"iterator\", \"async-iterator\", \"dom-collections\"].map(v => new RegExp(`[a-z]*\\\\.${v}\\\\..*`));\nconst esnextFallback = (name, cb) => {\n if (cb(name)) return true;\n if (!name.startsWith(\"es.\")) return false;\n const fallback = `esnext.${name.slice(3)}`;\n if (!_data.default[fallback]) return false;\n return cb(fallback);\n};\nvar _default = (0, _helperDefinePolyfillProvider.default)(function ({\n getUtils,\n method,\n shouldInjectPolyfill,\n createMetaResolver,\n debug,\n babel\n}, {\n version = 3,\n proposals,\n shippedProposals,\n [presetEnvCompat]: {\n noRuntimeName = false\n } = {},\n [runtimeCompat]: {\n useBabelRuntime = false,\n ext = \".js\"\n } = {}\n}) {\n const isWebpack = babel.caller(caller => (caller == null ? void 0 : caller.name) === \"babel-loader\");\n const resolve = createMetaResolver({\n global: _builtInDefinitions.BuiltIns,\n static: _builtInDefinitions.StaticProperties,\n instance: _builtInDefinitions.InstanceProperties\n });\n const available = new Set((0, _getModulesListForTargetVersion.default)(version));\n function getCoreJSPureBase(useProposalBase) {\n return useBabelRuntime ? useProposalBase ? `${_utils.BABEL_RUNTIME}/core-js` : `${_utils.BABEL_RUNTIME}/core-js-stable` : useProposalBase ? \"core-js-pure/features\" : \"core-js-pure/stable\";\n }\n function maybeInjectGlobalImpl(name, utils) {\n if (shouldInjectPolyfill(name)) {\n debug(name);\n utils.injectGlobalImport((0, _utils.coreJSModule)(name), name);\n return true;\n }\n return false;\n }\n function maybeInjectGlobal(names, utils, fallback = true) {\n for (const name of names) {\n if (fallback) {\n esnextFallback(name, name => maybeInjectGlobalImpl(name, utils));\n } else {\n maybeInjectGlobalImpl(name, utils);\n }\n }\n }\n function maybeInjectPure(desc, hint, utils, object) {\n if (desc.pure && !(object && desc.exclude && desc.exclude.includes(object)) && esnextFallback(desc.name, shouldInjectPolyfill)) {\n const {\n name\n } = desc;\n let useProposalBase = false;\n if (proposals || shippedProposals && name.startsWith(\"esnext.\")) {\n useProposalBase = true;\n } else if (name.startsWith(\"es.\") && !available.has(name)) {\n useProposalBase = true;\n }\n if (useBabelRuntime && !(useProposalBase ? BabelRuntimePaths.proposals : BabelRuntimePaths.stable).has(desc.pure)) {\n return;\n }\n const coreJSPureBase = getCoreJSPureBase(useProposalBase);\n return utils.injectDefaultImport(`${coreJSPureBase}/${desc.pure}${ext}`, hint);\n }\n }\n function isFeatureStable(name) {\n if (name.startsWith(\"esnext.\")) {\n const esName = `es.${name.slice(7)}`;\n // If its imaginative esName is not in latest compat data, it means\n // the proposal is not stage 4\n return esName in _data.default;\n }\n return true;\n }\n return {\n name: \"corejs3\",\n runtimeName: noRuntimeName ? null : _utils.BABEL_RUNTIME,\n polyfills: _data.default,\n filterPolyfills(name) {\n if (!available.has(name)) return false;\n if (proposals || method === \"entry-global\") return true;\n if (shippedProposals && _shippedProposals.default.has(name)) {\n return true;\n }\n return isFeatureStable(name);\n },\n entryGlobal(meta, utils, path) {\n if (meta.kind !== \"import\") return;\n const modules = (0, _utils.isCoreJSSource)(meta.source);\n if (!modules) return;\n if (modules.length === 1 && meta.source === (0, _utils.coreJSModule)(modules[0]) && shouldInjectPolyfill(modules[0])) {\n // Avoid infinite loop: do not replace imports with a new copy of\n // themselves.\n debug(null);\n return;\n }\n const modulesSet = new Set(modules);\n const filteredModules = modules.filter(module => {\n if (!module.startsWith(\"esnext.\")) return true;\n const stable = module.replace(\"esnext.\", \"es.\");\n if (modulesSet.has(stable) && shouldInjectPolyfill(stable)) {\n return false;\n }\n return true;\n });\n maybeInjectGlobal(filteredModules, utils, false);\n path.remove();\n },\n usageGlobal(meta, utils, path) {\n const resolved = resolve(meta);\n if (!resolved) return;\n if ((0, _usageFilters.default)(resolved.desc, path)) return;\n let deps = resolved.desc.global;\n if (resolved.kind !== \"global\" && \"object\" in meta && meta.object && meta.placement === \"prototype\") {\n const low = meta.object.toLowerCase();\n deps = deps.filter(m => uniqueObjects.some(v => v.test(m)) ? m.includes(low) : true);\n }\n maybeInjectGlobal(deps, utils);\n return true;\n },\n usagePure(meta, utils, path) {\n if (meta.kind === \"in\") {\n if (meta.key === \"Symbol.iterator\") {\n path.replaceWith(t.callExpression(utils.injectDefaultImport((0, _utils.coreJSPureHelper)(\"is-iterable\", useBabelRuntime, ext), \"isIterable\"), [path.node.right] // meta.kind === \"in\" narrows this\n ));\n }\n\n return;\n }\n if (path.parentPath.isUnaryExpression({\n operator: \"delete\"\n })) return;\n if (meta.kind === \"property\") {\n // We can't compile destructuring and updateExpression.\n if (!path.isMemberExpression()) return;\n if (!path.isReferenced()) return;\n if (path.parentPath.isUpdateExpression()) return;\n if (t.isSuper(path.node.object)) {\n return;\n }\n if (meta.key === \"Symbol.iterator\") {\n if (!shouldInjectPolyfill(\"es.symbol.iterator\")) return;\n const {\n parent,\n node\n } = path;\n if (t.isCallExpression(parent, {\n callee: node\n })) {\n if (parent.arguments.length === 0) {\n path.parentPath.replaceWith(t.callExpression(utils.injectDefaultImport((0, _utils.coreJSPureHelper)(\"get-iterator\", useBabelRuntime, ext), \"getIterator\"), [node.object]));\n path.skip();\n } else {\n (0, _utils.callMethod)(path, utils.injectDefaultImport((0, _utils.coreJSPureHelper)(\"get-iterator-method\", useBabelRuntime, ext), \"getIteratorMethod\"));\n }\n } else {\n path.replaceWith(t.callExpression(utils.injectDefaultImport((0, _utils.coreJSPureHelper)(\"get-iterator-method\", useBabelRuntime, ext), \"getIteratorMethod\"), [path.node.object]));\n }\n return;\n }\n }\n let resolved = resolve(meta);\n if (!resolved) return;\n if ((0, _usageFilters.default)(resolved.desc, path)) return;\n if (useBabelRuntime && resolved.desc.pure && resolved.desc.pure.slice(-6) === \"/index\") {\n // Remove /index, since it doesn't exist in @babel/runtime-corejs3s\n resolved = _extends({}, resolved, {\n desc: _extends({}, resolved.desc, {\n pure: resolved.desc.pure.slice(0, -6)\n })\n });\n }\n if (resolved.kind === \"global\") {\n const id = maybeInjectPure(resolved.desc, resolved.name, utils);\n if (id) path.replaceWith(id);\n } else if (resolved.kind === \"static\") {\n const id = maybeInjectPure(resolved.desc, resolved.name, utils,\n // @ts-expect-error\n meta.object);\n if (id) path.replaceWith(id);\n } else if (resolved.kind === \"instance\") {\n const id = maybeInjectPure(resolved.desc, `${resolved.name}InstanceProperty`, utils,\n // @ts-expect-error\n meta.object);\n if (!id) return;\n const {\n node\n } = path;\n if (t.isCallExpression(path.parent, {\n callee: node\n })) {\n (0, _utils.callMethod)(path, id);\n } else {\n path.replaceWith(t.callExpression(id, [node.object]));\n }\n }\n },\n visitor: method === \"usage-global\" && {\n // import(\"foo\")\n CallExpression(path) {\n if (path.get(\"callee\").isImport()) {\n const utils = getUtils(path);\n if (isWebpack) {\n // Webpack uses Promise.all to handle dynamic import.\n maybeInjectGlobal(_builtInDefinitions.PromiseDependenciesWithIterators, utils);\n } else {\n maybeInjectGlobal(_builtInDefinitions.PromiseDependencies, utils);\n }\n }\n },\n // (async function () { }).finally(...)\n Function(path) {\n if (path.node.async) {\n maybeInjectGlobal(_builtInDefinitions.PromiseDependencies, getUtils(path));\n }\n },\n // for-of, [a, b] = c\n \"ForOfStatement|ArrayPattern\"(path) {\n maybeInjectGlobal(_builtInDefinitions.CommonIterators, getUtils(path));\n },\n // [...spread]\n SpreadElement(path) {\n if (!path.parentPath.isObjectExpression()) {\n maybeInjectGlobal(_builtInDefinitions.CommonIterators, getUtils(path));\n }\n },\n // yield*\n YieldExpression(path) {\n if (path.node.delegate) {\n maybeInjectGlobal(_builtInDefinitions.CommonIterators, getUtils(path));\n }\n },\n // Decorators metadata\n Class(path) {\n var _path$node$decorators;\n const hasDecorators = ((_path$node$decorators = path.node.decorators) == null ? void 0 : _path$node$decorators.length) || path.node.body.body.some(el => {\n var _decorators;\n return (_decorators = el.decorators) == null ? void 0 : _decorators.length;\n });\n if (hasDecorators) {\n maybeInjectGlobal(_builtInDefinitions.DecoratorMetadataDependencies, getUtils(path));\n }\n }\n }\n };\n});\nexports.default = _default;","\"use strict\";\n\nexports.__esModule = true;\nexports.default = void 0;\nvar _helperDefinePolyfillProvider = _interopRequireDefault(require(\"@babel/helper-define-polyfill-provider\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nconst runtimeCompat = \"#__secret_key__@babel/runtime__compatibility\";\nvar _default = (0, _helperDefinePolyfillProvider.default)(({\n debug,\n targets,\n babel\n}, options) => {\n if (!shallowEqual(targets, babel.targets())) {\n throw new Error(\"This plugin does not use the targets option. Only preset-env's targets\" + \" or top-level targets need to be configured for this plugin to work.\" + \" See https://github.com/babel/babel-polyfills/issues/36 for more\" + \" details.\");\n }\n const {\n [runtimeCompat]: {\n moduleName = null,\n useBabelRuntime = false\n } = {}\n } = options;\n return {\n name: \"regenerator\",\n polyfills: [\"regenerator-runtime\"],\n usageGlobal(meta, utils) {\n if (isRegenerator(meta)) {\n debug(\"regenerator-runtime\");\n utils.injectGlobalImport(\"regenerator-runtime/runtime.js\");\n }\n },\n usagePure(meta, utils, path) {\n if (isRegenerator(meta)) {\n let pureName = \"regenerator-runtime\";\n if (useBabelRuntime) {\n var _ref;\n const runtimeName = (_ref = moduleName != null ? moduleName : path.hub.file.get(\"runtimeHelpersModuleName\")) != null ? _ref : \"@babel/runtime\";\n pureName = `${runtimeName}/regenerator`;\n }\n path.replaceWith(utils.injectDefaultImport(pureName, \"regenerator-runtime\"));\n }\n }\n };\n});\nexports.default = _default;\nconst isRegenerator = meta => meta.kind === \"global\" && meta.name === \"regeneratorRuntime\";\nfunction shallowEqual(obj1, obj2) {\n return JSON.stringify(obj1) === JSON.stringify(obj2);\n}","// env vars from the cli are always strings, so !!ENV_VAR returns true for \"false\"\nfunction bool(value) {\n if (value == null) return false;\n return value && value !== \"false\" && value !== \"0\";\n}\n\nmodule.exports = bool(process.env[\"BABEL_8_BREAKING\"])\n ? null\n : require(\"babel-plugin-polyfill-regenerator-BABEL_8_BREAKING-false\");\n","// TODO(Babel 8) Remove this file\nif (process.env.BABEL_8_BREAKING) {\n throw new Error(\n \"Internal Babel error: This file should only be loaded in Babel 7\",\n );\n}\n\nconst pluginCorejs2 = require(\"babel-plugin-polyfill-corejs2\").default;\nconst pluginCorejs3 = require(\"babel-plugin-polyfill-corejs3\").default;\nconst pluginRegenerator = require(\"babel-plugin-polyfill-regenerator\").default;\n\nconst pluginsCompat = \"#__secret_key__@babel/runtime__compatibility\";\n\nfunction createCorejs2Plugin(options) {\n return (api, _, filename) => pluginCorejs2(api, options, filename);\n}\n\nfunction createCorejs3Plugin(options) {\n return (api, _, filename) => pluginCorejs3(api, options, filename);\n}\n\nfunction createRegeneratorPlugin(options, useRuntimeRegenerator, corejsPlugin) {\n if (!useRuntimeRegenerator) return corejsPlugin ?? undefined;\n return (api, _, filename) => {\n return {\n ...pluginRegenerator(api, options, filename),\n inherits: corejsPlugin ?? undefined,\n };\n };\n}\n\nmodule.exports = function createBasePolyfillsPlugin(\n { corejs, regenerator = true, moduleName },\n runtimeVersion,\n absoluteImports,\n) {\n let proposals = false;\n let rawVersion;\n\n if (typeof corejs === \"object\" && corejs !== null) {\n rawVersion = corejs.version;\n proposals = Boolean(corejs.proposals);\n } else {\n rawVersion = corejs;\n }\n\n const corejsVersion = rawVersion ? Number(rawVersion) : false;\n\n if (![false, 2, 3].includes(corejsVersion)) {\n throw new Error(\n `The \\`core-js\\` version must be false, 2 or 3, but got ${JSON.stringify(\n rawVersion,\n )}.`,\n );\n }\n\n if (proposals && (!corejsVersion || corejsVersion < 3)) {\n throw new Error(\n \"The 'proposals' option is only supported when using 'corejs: 3'\",\n );\n }\n\n if (typeof regenerator !== \"boolean\") {\n throw new Error(\n \"The 'regenerator' option must be undefined, or a boolean.\",\n );\n }\n\n const polyfillOpts = {\n method: \"usage-pure\",\n absoluteImports,\n proposals,\n [pluginsCompat]: {\n useBabelRuntime: true,\n runtimeVersion,\n ext: \"\",\n moduleName,\n },\n };\n\n return createRegeneratorPlugin(\n polyfillOpts,\n regenerator,\n corejsVersion === 2\n ? createCorejs2Plugin(polyfillOpts)\n : corejsVersion === 3\n ? createCorejs3Plugin(polyfillOpts)\n : null,\n );\n};\n","Object.defineProperty(exports, \"createPolyfillPlugins\", {\n get: () => require(\"./polyfills.cjs\"),\n});\n","import { declare } from \"@babel/helper-plugin-utils\";\nimport { addDefault, isModule } from \"@babel/helper-module-imports\";\nimport { types as t } from \"@babel/core\";\n\nimport { hasMinVersion } from \"./helpers.ts\";\nimport getRuntimePath, { resolveFSPath } from \"./get-runtime-path/index.ts\";\n\n// TODO(Babel 8): Remove this\nimport babel7 from \"./babel-7/index.cjs\";\n\nexport interface Options {\n absoluteRuntime?: boolean;\n corejs?: string | number | { version: string | number; proposals?: boolean };\n helpers?: boolean;\n version?: string;\n moduleName?: null | string;\n}\n\nexport default declare((api, options: Options, dirname) => {\n api.assertVersion(REQUIRED_VERSION(7));\n\n const {\n version: runtimeVersion = \"7.0.0-beta.0\",\n absoluteRuntime = false,\n moduleName = null,\n } = options;\n\n if (\n typeof absoluteRuntime !== \"boolean\" &&\n typeof absoluteRuntime !== \"string\"\n ) {\n throw new Error(\n \"The 'absoluteRuntime' option must be undefined, a boolean, or a string.\",\n );\n }\n\n if (typeof runtimeVersion !== \"string\") {\n throw new Error(`The 'version' option must be a version string.`);\n }\n\n if (moduleName !== null && typeof moduleName !== \"string\") {\n throw new Error(\"The 'moduleName' option must be null or a string.\");\n }\n\n if (!process.env.BABEL_8_BREAKING) {\n // In recent @babel/runtime versions, we can use require(\"helper\").default\n // instead of require(\"helper\") so that it has the same interface as the\n // ESM helper, and bundlers can better exchange one format for the other.\n const DUAL_MODE_RUNTIME = \"7.13.0\";\n // eslint-disable-next-line no-var\n var supportsCJSDefault = hasMinVersion(DUAL_MODE_RUNTIME, runtimeVersion);\n }\n\n if (Object.hasOwn(options, \"useBuiltIns\")) {\n // @ts-expect-error deprecated options\n if (options[\"useBuiltIns\"]) {\n throw new Error(\n \"The 'useBuiltIns' option has been removed. The @babel/runtime \" +\n \"module now uses builtins by default.\",\n );\n } else {\n throw new Error(\n \"The 'useBuiltIns' option has been removed. Use the 'corejs'\" +\n \"option to polyfill with `core-js` via @babel/runtime.\",\n );\n }\n }\n\n if (Object.hasOwn(options, \"polyfill\")) {\n // @ts-expect-error deprecated options\n if (options[\"polyfill\"] === false) {\n throw new Error(\n \"The 'polyfill' option has been removed. The @babel/runtime \" +\n \"module now skips polyfilling by default.\",\n );\n } else {\n throw new Error(\n \"The 'polyfill' option has been removed. Use the 'corejs'\" +\n \"option to polyfill with `core-js` via @babel/runtime.\",\n );\n }\n }\n\n if (process.env.BABEL_8_BREAKING) {\n if (Object.hasOwn(options, \"regenerator\")) {\n throw new Error(\n \"The 'regenerator' option has been removed. The generators transform \" +\n \"no longers relies on a 'regeneratorRuntime' global. \" +\n \"If you still need to replace imports to the 'regeneratorRuntime' \" +\n \"global, you can use babel-plugin-polyfill-regenerator.\",\n );\n }\n }\n\n if (process.env.BABEL_8_BREAKING) {\n if (Object.hasOwn(options, \"useESModules\")) {\n throw new Error(\n \"The 'useESModules' option has been removed. @babel/runtime now uses \" +\n \"package.json#exports to support both CommonJS and ESM helpers.\",\n );\n }\n } else {\n // @ts-expect-error(Babel 7 vs Babel 8)\n const { useESModules = false } = options;\n if (typeof useESModules !== \"boolean\" && useESModules !== \"auto\") {\n throw new Error(\n \"The 'useESModules' option must be undefined, or a boolean, or 'auto'.\",\n );\n }\n\n // eslint-disable-next-line no-var\n var esModules =\n useESModules === \"auto\"\n ? api.caller(\n // @ts-expect-error CallerMetadata does not define supportsStaticESM\n caller => !!caller?.supportsStaticESM,\n )\n : useESModules;\n }\n\n if (process.env.BABEL_8_BREAKING) {\n if (Object.hasOwn(options, \"helpers\")) {\n throw new Error(\n \"The 'helpers' option has been removed. \" +\n \"Remove the plugin from your config if \" +\n \"you want to disable helpers import injection.\",\n );\n }\n } else {\n // eslint-disable-next-line no-var\n var { helpers: useRuntimeHelpers = true } = options;\n\n if (typeof useRuntimeHelpers !== \"boolean\") {\n throw new Error(\"The 'helpers' option must be undefined, or a boolean.\");\n }\n }\n\n const HEADER_HELPERS = new Set([\n \"interopRequireWildcard\",\n \"interopRequireDefault\",\n ]);\n\n return {\n name: \"transform-runtime\",\n\n inherits: process.env.BABEL_8_BREAKING\n ? undefined\n : babel7.createPolyfillPlugins(options, runtimeVersion, absoluteRuntime),\n\n pre(file) {\n if (!process.env.BABEL_8_BREAKING && !useRuntimeHelpers) return;\n\n let modulePath: string;\n\n file.set(\"helperGenerator\", (name: string) => {\n modulePath ??= getRuntimePath(\n moduleName ??\n file.get(\"runtimeHelpersModuleName\") ??\n \"@babel/runtime\",\n dirname,\n absoluteRuntime,\n );\n\n // If the helper didn't exist yet at the version given, we bail\n // out and let Babel either insert it directly, or throw an error\n // so that plugins can handle that case properly.\n if (!process.env.BABEL_8_BREAKING) {\n if (!file.availableHelper?.(name, runtimeVersion)) {\n if (name === \"regeneratorRuntime\") {\n // For regeneratorRuntime, we can fallback to the old behavior of\n // relying on the regeneratorRuntime global. If the 'regenerator'\n // option is not disabled, babel-plugin-polyfill-regenerator will\n // then replace it with a @babel/helpers/regenerator import.\n //\n // We must wrap it in a function, because built-in Babel helpers\n // are functions.\n return t.arrowFunctionExpression(\n [],\n t.identifier(\"regeneratorRuntime\"),\n );\n }\n return;\n }\n } else {\n if (!file.availableHelper(name, runtimeVersion)) return;\n }\n\n // Explicitly set the CommonJS interop helpers to their reserve\n // blockHoist of 4 so they are guaranteed to exist\n // when other things used them to import.\n const blockHoist =\n HEADER_HELPERS.has(name) && !isModule(file.path) ? 4 : undefined;\n\n let helperPath = `${modulePath}/helpers/${\n !process.env.BABEL_8_BREAKING &&\n esModules &&\n file.path.node.sourceType === \"module\"\n ? \"esm/\" + name\n : name\n }`;\n if (absoluteRuntime) helperPath = resolveFSPath(helperPath);\n\n return addDefaultImport(helperPath, name, blockHoist, true);\n });\n\n const cache = new Map();\n\n function addDefaultImport(\n source: string,\n nameHint: string,\n blockHoist: number,\n isHelper = false,\n ) {\n // If something on the page adds a helper when the file is an ES6\n // file, we can't reused the cached helper name after things have been\n // transformed because it has almost certainly been renamed.\n const cacheKey = isModule(file.path);\n const key = `${source}:${nameHint}:${cacheKey || \"\"}`;\n\n let cached = cache.get(key);\n if (cached) {\n cached = t.cloneNode(cached);\n } else {\n cached = addDefault(file.path, source, {\n importedInterop: (\n process.env.BABEL_8_BREAKING\n ? isHelper\n : isHelper && supportsCJSDefault\n )\n ? \"compiled\"\n : \"uncompiled\",\n nameHint,\n blockHoist,\n });\n\n cache.set(key, cached);\n }\n return cached;\n }\n },\n };\n});\n","import { declare } from \"@babel/helper-plugin-utils\";\nimport { types as t } from \"@babel/core\";\n\nexport default declare(api => {\n api.assertVersion(REQUIRED_VERSION(7));\n\n return {\n name: \"transform-shorthand-properties\",\n\n visitor: {\n ObjectMethod(path) {\n const { node } = path;\n if (node.kind === \"method\") {\n const func = t.functionExpression(\n null,\n node.params,\n node.body,\n node.generator,\n node.async,\n );\n func.returnType = node.returnType;\n\n const computedKey = t.toComputedKey(node);\n if (t.isStringLiteral(computedKey, { value: \"__proto__\" })) {\n path.replaceWith(t.objectProperty(computedKey, func, true));\n } else {\n path.replaceWith(t.objectProperty(node.key, func, node.computed));\n }\n }\n },\n\n ObjectProperty(path) {\n const { node } = path;\n if (node.shorthand) {\n const computedKey = t.toComputedKey(node);\n if (t.isStringLiteral(computedKey, { value: \"__proto__\" })) {\n path.replaceWith(t.objectProperty(computedKey, node.value, true));\n } else {\n node.shorthand = false;\n }\n }\n },\n },\n };\n});\n","import { declare } from \"@babel/helper-plugin-utils\";\nimport { skipTransparentExprWrappers } from \"@babel/helper-skip-transparent-expression-wrappers\";\nimport { types as t } from \"@babel/core\";\nimport type { File, NodePath, Scope } from \"@babel/core\";\n\ntype ListElement = t.SpreadElement | t.Expression;\n\nexport interface Options {\n allowArrayLike?: boolean;\n loose?: boolean;\n}\n\nexport default declare((api, options: Options) => {\n api.assertVersion(REQUIRED_VERSION(7));\n\n const iterableIsArray = api.assumption(\"iterableIsArray\") ?? options.loose;\n const arrayLikeIsIterable =\n options.allowArrayLike ?? api.assumption(\"arrayLikeIsIterable\");\n\n function getSpreadLiteral(\n spread: t.SpreadElement,\n scope: Scope,\n ): t.Expression {\n if (\n iterableIsArray &&\n !t.isIdentifier(spread.argument, { name: \"arguments\" })\n ) {\n return spread.argument;\n } else {\n return scope.toArray(spread.argument, true, arrayLikeIsIterable);\n }\n }\n\n function hasHole(spread: t.ArrayExpression): boolean {\n return spread.elements.some(el => el === null);\n }\n\n function hasSpread(nodes: Array): boolean {\n for (let i = 0; i < nodes.length; i++) {\n if (t.isSpreadElement(nodes[i])) {\n return true;\n }\n }\n return false;\n }\n\n function push(_props: Array, nodes: Array) {\n if (!_props.length) return _props;\n nodes.push(t.arrayExpression(_props));\n return [];\n }\n\n function build(\n props: Array,\n scope: Scope,\n file: File,\n ): t.Expression[] {\n const nodes: Array = [];\n let _props: Array = [];\n\n for (const prop of props) {\n if (t.isSpreadElement(prop)) {\n _props = push(_props, nodes);\n let spreadLiteral = getSpreadLiteral(prop, scope);\n\n if (t.isArrayExpression(spreadLiteral) && hasHole(spreadLiteral)) {\n spreadLiteral = t.callExpression(\n file.addHelper(\n process.env.BABEL_8_BREAKING\n ? \"arrayLikeToArray\"\n : \"arrayWithoutHoles\",\n ),\n [spreadLiteral],\n );\n }\n\n nodes.push(spreadLiteral);\n } else {\n _props.push(prop);\n }\n }\n\n push(_props, nodes);\n\n return nodes;\n }\n\n return {\n name: \"transform-spread\",\n\n visitor: {\n ArrayExpression(path): void {\n const { node, scope } = path;\n const elements = node.elements;\n if (!hasSpread(elements)) return;\n\n const nodes = build(elements, scope, this.file);\n let first = nodes[0];\n\n // If there is only one element in the ArrayExpression and\n // the element was transformed (Array.prototype.slice.call or toConsumableArray)\n // we know that the transformed code already takes care of cloning the array.\n // So we can simply return that element.\n if (\n nodes.length === 1 &&\n first !== (elements[0] as t.SpreadElement).argument\n ) {\n path.replaceWith(first);\n return;\n }\n\n // If the first element is a ArrayExpression we can directly call\n // concat on it.\n // `[..].concat(..)`\n // If not then we have to use `[].concat(arr)` and not `arr.concat`\n // because `arr` could be extended/modified (e.g. Immutable) and we do not know exactly\n // what concat would produce.\n if (!t.isArrayExpression(first)) {\n first = t.arrayExpression([]);\n } else {\n nodes.shift();\n }\n\n path.replaceWith(\n t.callExpression(\n t.memberExpression(first, t.identifier(\"concat\")),\n nodes,\n ),\n );\n },\n CallExpression(path): void {\n const { node, scope } = path;\n\n const args = node.arguments as Array;\n if (!hasSpread(args)) return;\n const calleePath = skipTransparentExprWrappers(\n path.get(\"callee\") as NodePath,\n );\n if (calleePath.isSuper()) {\n // NOTE: spread and classes have almost the same compat data, so this is very unlikely to happen in practice.\n throw path.buildCodeFrameError(\n \"It's not possible to compile spread arguments in `super()` without compiling classes.\\n\" +\n \"Please add '@babel/plugin-transform-classes' to your Babel configuration.\",\n );\n }\n let contextLiteral: t.Expression | t.Super = scope.buildUndefinedNode();\n node.arguments = [];\n\n let nodes: t.Expression[];\n if (\n args.length === 1 &&\n t.isIdentifier((args[0] as t.SpreadElement).argument, {\n name: \"arguments\",\n })\n ) {\n nodes = [(args[0] as t.SpreadElement).argument];\n } else {\n nodes = build(args, scope, this.file);\n }\n\n const first = nodes.shift();\n if (nodes.length) {\n node.arguments.push(\n t.callExpression(\n t.memberExpression(first, t.identifier(\"concat\")),\n nodes,\n ),\n );\n } else {\n node.arguments.push(first);\n }\n\n const callee = calleePath.node as t.MemberExpression;\n\n if (t.isMemberExpression(callee)) {\n const temp = scope.maybeGenerateMemoised(callee.object);\n if (temp) {\n callee.object = t.assignmentExpression(\n \"=\",\n temp,\n // object must not be Super when `temp` is an identifier\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion\n callee.object as t.Expression,\n );\n contextLiteral = temp;\n } else {\n contextLiteral = t.cloneNode(callee.object);\n }\n }\n\n // We use the original callee here, to preserve any types/parentheses\n node.callee = t.memberExpression(\n node.callee as t.Expression,\n t.identifier(\"apply\"),\n );\n if (t.isSuper(contextLiteral)) {\n contextLiteral = t.thisExpression();\n }\n\n node.arguments.unshift(t.cloneNode(contextLiteral));\n },\n\n NewExpression(path): void {\n const { node, scope } = path;\n if (!hasSpread(node.arguments)) return;\n\n const nodes = build(\n node.arguments as Array,\n scope,\n this.file,\n );\n\n const first = nodes.shift();\n\n let args: t.Expression;\n if (nodes.length) {\n args = t.callExpression(\n t.memberExpression(first, t.identifier(\"concat\")),\n nodes,\n );\n } else {\n args = first;\n }\n\n path.replaceWith(\n t.callExpression(path.hub.addHelper(\"construct\"), [\n node.callee as t.Expression,\n args,\n ]),\n );\n },\n },\n };\n});\n","import { declare } from \"@babel/helper-plugin-utils\";\nimport { types as t } from \"@babel/core\";\n\nexport default declare(api => {\n api.assertVersion(REQUIRED_VERSION(7));\n\n return {\n name: \"transform-sticky-regex\",\n\n visitor: {\n RegExpLiteral(path) {\n const { node } = path;\n if (!node.flags.includes(\"y\")) return;\n\n path.replaceWith(\n t.newExpression(t.identifier(\"RegExp\"), [\n t.stringLiteral(node.pattern),\n t.stringLiteral(node.flags),\n ]),\n );\n },\n },\n };\n});\n","import { declare } from \"@babel/helper-plugin-utils\";\nimport { types as t } from \"@babel/core\";\n\nexport default declare(api => {\n api.assertVersion(REQUIRED_VERSION(7));\n\n return {\n name: \"transform-strict-mode\",\n\n visitor: {\n Program(path) {\n const { node } = path;\n\n for (const directive of node.directives) {\n if (directive.value.value === \"use strict\") return;\n }\n\n path.unshiftContainer(\n \"directives\",\n t.directive(t.directiveLiteral(\"use strict\")),\n );\n },\n },\n };\n});\n","import { declare } from \"@babel/helper-plugin-utils\";\nimport { template, types as t, type NodePath } from \"@babel/core\";\n\nexport interface Options {\n loose?: boolean;\n}\n\nexport default declare((api, options: Options) => {\n api.assertVersion(REQUIRED_VERSION(7));\n\n const ignoreToPrimitiveHint =\n api.assumption(\"ignoreToPrimitiveHint\") ?? options.loose;\n const mutableTemplateObject =\n api.assumption(\"mutableTemplateObject\") ?? options.loose;\n\n let helperName = \"taggedTemplateLiteral\";\n if (mutableTemplateObject) helperName += \"Loose\";\n\n /**\n * This function groups the objects into multiple calls to `.concat()` in\n * order to preserve execution order of the primitive conversion, e.g.\n *\n * \"\".concat(obj.foo, \"foo\", obj2.foo, \"foo2\")\n *\n * would evaluate both member expressions _first_ then, `concat` will\n * convert each one to a primitive, whereas\n *\n * \"\".concat(obj.foo, \"foo\").concat(obj2.foo, \"foo2\")\n *\n * would evaluate the member, then convert it to a primitive, then evaluate\n * the second member and convert that one, which reflects the spec behavior\n * of template literals.\n */\n function buildConcatCallExpressions(items: t.Expression[]): t.CallExpression {\n let avail = true;\n // @ts-expect-error items must not be empty\n return items.reduce(function (left, right) {\n let canBeInserted = t.isLiteral(right);\n\n if (!canBeInserted && avail) {\n canBeInserted = true;\n avail = false;\n }\n if (canBeInserted && t.isCallExpression(left)) {\n left.arguments.push(right);\n return left;\n }\n return t.callExpression(\n t.memberExpression(left, t.identifier(\"concat\")),\n [right],\n );\n });\n }\n\n return {\n name: \"transform-template-literals\",\n\n visitor: {\n TaggedTemplateExpression(path) {\n const { node } = path;\n const { quasi } = node;\n\n const strings = [];\n const raws = [];\n\n // Flag variable to check if contents of strings and raw are equal\n let isStringsRawEqual = true;\n\n for (const elem of quasi.quasis) {\n const { raw, cooked } = elem.value;\n const value =\n cooked == null\n ? path.scope.buildUndefinedNode()\n : t.stringLiteral(cooked);\n\n strings.push(value);\n raws.push(t.stringLiteral(raw));\n\n if (raw !== cooked) {\n // false even if one of raw and cooked are not equal\n isStringsRawEqual = false;\n }\n }\n\n const helperArgs = [t.arrayExpression(strings)];\n // only add raw arrayExpression if there is any difference between raws and strings\n if (!isStringsRawEqual) {\n helperArgs.push(t.arrayExpression(raws));\n }\n\n const tmp = path.scope.generateUidIdentifier(\"templateObject\");\n path.scope.getProgramParent().push({ id: t.cloneNode(tmp) });\n\n path.replaceWith(\n t.callExpression(node.tag, [\n template.expression.ast`\n ${t.cloneNode(tmp)} || (\n ${tmp} = ${this.addHelper(helperName)}(${helperArgs})\n )\n `,\n // @ts-expect-error Fixme: quasi.expressions may contain TSAnyKeyword\n ...quasi.expressions,\n ]),\n );\n },\n\n TemplateLiteral(path) {\n // Skip TemplateLiteral in TSLiteralType\n if (path.parent.type === \"TSLiteralType\") {\n return;\n }\n const nodes: t.Expression[] = [];\n const expressions = path.get(\"expressions\") as NodePath[];\n\n let index = 0;\n for (const elem of path.node.quasis) {\n if (elem.value.cooked) {\n nodes.push(t.stringLiteral(elem.value.cooked));\n }\n\n if (index < expressions.length) {\n const expr = expressions[index++];\n const node = expr.node;\n if (!t.isStringLiteral(node, { value: \"\" })) {\n nodes.push(node);\n }\n }\n }\n\n // since `+` is left-to-right associative\n // ensure the first node is a string if first/second isn't\n if (\n !t.isStringLiteral(nodes[0]) &&\n !(ignoreToPrimitiveHint && t.isStringLiteral(nodes[1]))\n ) {\n nodes.unshift(t.stringLiteral(\"\"));\n }\n let root = nodes[0];\n\n if (ignoreToPrimitiveHint) {\n for (let i = 1; i < nodes.length; i++) {\n root = t.binaryExpression(\"+\", root, nodes[i]);\n }\n } else if (nodes.length > 1) {\n root = buildConcatCallExpressions(nodes);\n }\n\n path.replaceWith(root);\n },\n },\n };\n});\n","import { declare } from \"@babel/helper-plugin-utils\";\nimport { types as t } from \"@babel/core\";\n\nexport default declare(api => {\n api.assertVersion(REQUIRED_VERSION(7));\n\n return {\n name: \"transform-typeof-symbol\",\n\n visitor: {\n Scope({ scope }) {\n if (!scope.getBinding(\"Symbol\")) {\n return;\n }\n\n scope.rename(\"Symbol\");\n },\n\n UnaryExpression(path) {\n const { node, parent } = path;\n if (node.operator !== \"typeof\") return;\n\n if (\n path.parentPath.isBinaryExpression() &&\n t.EQUALITY_BINARY_OPERATORS.includes(\n (parent as t.BinaryExpression).operator,\n )\n ) {\n // optimise `typeof foo === \"string\"` since we can determine that they'll never\n // need to handle symbols\n const opposite = path.getOpposite();\n if (\n opposite.isStringLiteral() &&\n opposite.node.value !== \"symbol\" &&\n opposite.node.value !== \"object\"\n ) {\n return;\n }\n }\n\n let isUnderHelper = path.findParent(path => {\n if (path.isFunction()) {\n return (\n path.get(\"body.directives.0\")?.node.value.value ===\n \"@babel/helpers - typeof\"\n );\n }\n });\n\n if (isUnderHelper) return;\n\n const helper = this.addHelper(\"typeof\");\n\n // TODO: This is needed for backward compatibility with\n // @babel/helpers <= 7.8.3.\n // Remove in Babel 8\n isUnderHelper = path.findParent(path => {\n return (\n (path.isVariableDeclarator() && path.node.id === helper) ||\n (path.isFunctionDeclaration() &&\n path.node.id &&\n path.node.id.name === helper.name)\n );\n });\n\n if (isUnderHelper) {\n return;\n }\n\n const call = t.callExpression(helper, [node.argument]);\n const arg = path.get(\"argument\");\n if (arg.isIdentifier() && !path.scope.hasBinding(arg.node.name, true)) {\n const unary = t.unaryExpression(\"typeof\", t.cloneNode(node.argument));\n path.replaceWith(\n t.conditionalExpression(\n t.binaryExpression(\"===\", unary, t.stringLiteral(\"undefined\")),\n t.stringLiteral(\"undefined\"),\n call,\n ),\n );\n } else {\n path.replaceWith(call);\n }\n },\n },\n };\n});\n","import { template, types as t, type NodePath } from \"@babel/core\";\nimport assert from \"assert\";\nimport annotateAsPure from \"@babel/helper-annotate-as-pure\";\nimport { skipTransparentExprWrapperNodes } from \"@babel/helper-skip-transparent-expression-wrappers\";\n\ntype t = typeof t;\n\nconst ENUMS = new WeakMap();\n\nconst buildEnumWrapper = template.expression(\n `\n (function (ID) {\n ASSIGNMENTS;\n return ID;\n })(INIT)\n `,\n);\n\nexport default function transpileEnum(\n path: NodePath,\n t: t,\n) {\n const { node, parentPath } = path;\n\n if (node.declare) {\n path.remove();\n return;\n }\n\n const name = node.id.name;\n const { fill, data, isPure } = enumFill(path, t, node.id);\n\n switch (parentPath.type) {\n case \"BlockStatement\":\n case \"ExportNamedDeclaration\":\n case \"Program\": {\n // todo: Consider exclude program with import/export\n // && !path.parent.body.some(n => t.isImportDeclaration(n) || t.isExportDeclaration(n));\n const isGlobal = t.isProgram(path.parent);\n const isSeen = seen(parentPath);\n\n let init: t.Expression = t.objectExpression([]);\n if (isSeen || isGlobal) {\n init = t.logicalExpression(\"||\", t.cloneNode(fill.ID), init);\n }\n const enumIIFE = buildEnumWrapper({ ...fill, INIT: init });\n if (isPure) annotateAsPure(enumIIFE);\n\n if (isSeen) {\n const toReplace = parentPath.isExportDeclaration() ? parentPath : path;\n toReplace.replaceWith(\n t.expressionStatement(\n t.assignmentExpression(\"=\", t.cloneNode(node.id), enumIIFE),\n ),\n );\n } else {\n path.scope.registerDeclaration(\n path.replaceWith(\n t.variableDeclaration(isGlobal ? \"var\" : \"let\", [\n t.variableDeclarator(node.id, enumIIFE),\n ]),\n )[0],\n );\n }\n ENUMS.set(path.scope.getBindingIdentifier(name), data);\n break;\n }\n\n default:\n throw new Error(`Unexpected enum parent '${path.parent.type}`);\n }\n\n function seen(parentPath: NodePath): boolean {\n if (parentPath.isExportDeclaration()) {\n return seen(parentPath.parentPath);\n }\n\n if (parentPath.getData(name)) {\n return true;\n } else {\n parentPath.setData(name, true);\n return false;\n }\n }\n}\n\nconst buildStringAssignment = template(`\n ENUM[\"NAME\"] = VALUE;\n`);\n\nconst buildNumericAssignment = template(`\n ENUM[ENUM[\"NAME\"] = VALUE] = \"NAME\";\n`);\n\nconst buildEnumMember = (isString: boolean, options: Record) =>\n (isString ? buildStringAssignment : buildNumericAssignment)(options);\n\n/**\n * Generates the statement that fills in the variable declared by the enum.\n * `(function (E) { ... assignments ... })(E || (E = {}));`\n */\nfunction enumFill(path: NodePath, t: t, id: t.Identifier) {\n const { enumValues: x, data, isPure } = translateEnumValues(path, t);\n const assignments = x.map(([memberName, memberValue]) =>\n buildEnumMember(isSyntacticallyString(memberValue), {\n ENUM: t.cloneNode(id),\n NAME: memberName,\n VALUE: memberValue,\n }),\n );\n\n return {\n fill: {\n ID: t.cloneNode(id),\n ASSIGNMENTS: assignments,\n },\n data,\n isPure,\n };\n}\n\nexport function isSyntacticallyString(expr: t.Expression): boolean {\n // @ts-ignore(Babel 7 vs Babel 8) Type 'Expression | Super' is not assignable to type 'Expression' in Babel 8\n expr = skipTransparentExprWrapperNodes(expr);\n switch (expr.type) {\n case \"BinaryExpression\": {\n const left = expr.left;\n const right = expr.right;\n return (\n expr.operator === \"+\" &&\n (isSyntacticallyString(left as t.Expression) ||\n isSyntacticallyString(right))\n );\n }\n case \"TemplateLiteral\":\n case \"StringLiteral\":\n return true;\n }\n return false;\n}\n\n/**\n * Maps the name of an enum member to its value.\n * We keep track of the previous enum members so you can write code like:\n * enum E {\n * X = 1 << 0,\n * Y = 1 << 1,\n * Z = X | Y,\n * }\n */\ntype PreviousEnumMembers = Map;\n\ntype EnumSelfReferenceVisitorState = {\n seen: PreviousEnumMembers;\n path: NodePath;\n t: t;\n};\n\nfunction ReferencedIdentifier(\n expr: NodePath,\n state: EnumSelfReferenceVisitorState,\n) {\n const { seen, path, t } = state;\n const name = expr.node.name;\n if (seen.has(name) && !expr.scope.hasOwnBinding(name)) {\n expr.replaceWith(\n t.memberExpression(t.cloneNode(path.node.id), t.cloneNode(expr.node)),\n );\n expr.skip();\n }\n}\n\nconst enumSelfReferenceVisitor = {\n ReferencedIdentifier,\n};\n\nexport function translateEnumValues(path: NodePath, t: t) {\n const bindingIdentifier = path.scope.getBindingIdentifier(path.node.id.name);\n const seen: PreviousEnumMembers = ENUMS.get(bindingIdentifier) ?? new Map();\n\n // Start at -1 so the first enum member is its increment, 0.\n let constValue: number | string | undefined = -1;\n let lastName: string;\n let isPure = true;\n\n const enumValues: Array<[name: string, value: t.Expression]> = path\n .get(\"members\")\n .map(memberPath => {\n const member = memberPath.node;\n const name = t.isIdentifier(member.id) ? member.id.name : member.id.value;\n const initializerPath = memberPath.get(\"initializer\");\n const initializer = member.initializer;\n let value: t.Expression;\n if (initializer) {\n constValue = computeConstantValue(initializerPath, seen);\n if (constValue !== undefined) {\n seen.set(name, constValue);\n assert(\n typeof constValue === \"number\" || typeof constValue === \"string\",\n );\n // We do not use `t.valueToNode` because `Infinity`/`NaN` might refer\n // to a local variable. Even 1/0\n // Revisit once https://github.com/microsoft/TypeScript/issues/55091\n // is fixed. Note: we will have to distinguish between actual\n // infinities and reference to non-infinite variables names Infinity.\n if (constValue === Infinity || Number.isNaN(constValue)) {\n value = t.identifier(String(constValue));\n } else if (constValue === -Infinity) {\n value = t.unaryExpression(\"-\", t.identifier(\"Infinity\"));\n } else {\n value = t.valueToNode(constValue);\n }\n } else {\n isPure &&= initializerPath.isPure();\n\n if (initializerPath.isReferencedIdentifier()) {\n ReferencedIdentifier(initializerPath, {\n t,\n seen,\n path,\n });\n } else {\n initializerPath.traverse(enumSelfReferenceVisitor, {\n t,\n seen,\n path,\n });\n }\n\n value = initializerPath.node;\n seen.set(name, undefined);\n }\n } else if (typeof constValue === \"number\") {\n constValue += 1;\n value = t.numericLiteral(constValue);\n seen.set(name, constValue);\n } else if (typeof constValue === \"string\") {\n throw path.buildCodeFrameError(\"Enum member must have initializer.\");\n } else {\n // create dynamic initializer: 1 + ENUM[\"PREVIOUS\"]\n const lastRef = t.memberExpression(\n t.cloneNode(path.node.id),\n t.stringLiteral(lastName),\n true,\n );\n value = t.binaryExpression(\"+\", t.numericLiteral(1), lastRef);\n seen.set(name, undefined);\n }\n\n lastName = name;\n return [name, value];\n });\n\n return {\n isPure,\n data: seen,\n enumValues,\n };\n}\n\n// Based on the TypeScript repository's `computeConstantValue` in `checker.ts`.\nfunction computeConstantValue(\n path: NodePath,\n prevMembers?: PreviousEnumMembers,\n seen: Set = new Set(),\n): number | string | undefined {\n return evaluate(path);\n\n function evaluate(path: NodePath): number | string | undefined {\n const expr = path.node;\n switch (expr.type) {\n case \"MemberExpression\":\n return evaluateRef(path, prevMembers, seen);\n case \"StringLiteral\":\n return expr.value;\n case \"UnaryExpression\":\n return evalUnaryExpression(path as NodePath);\n case \"BinaryExpression\":\n return evalBinaryExpression(path as NodePath);\n case \"NumericLiteral\":\n return expr.value;\n case \"ParenthesizedExpression\":\n return evaluate(path.get(\"expression\"));\n case \"Identifier\":\n return evaluateRef(path, prevMembers, seen);\n case \"TemplateLiteral\": {\n if (expr.quasis.length === 1) {\n return expr.quasis[0].value.cooked;\n }\n\n const paths = (path as NodePath).get(\"expressions\");\n const quasis = expr.quasis;\n let str = \"\";\n\n for (let i = 0; i < quasis.length; i++) {\n str += quasis[i].value.cooked;\n\n if (i + 1 < quasis.length) {\n const value = evaluateRef(paths[i], prevMembers, seen);\n if (value === undefined) return undefined;\n str += value;\n }\n }\n return str;\n }\n default:\n return undefined;\n }\n }\n\n function evaluateRef(\n path: NodePath,\n prevMembers: PreviousEnumMembers,\n seen: Set,\n ): number | string | undefined {\n if (path.isMemberExpression()) {\n const expr = path.node;\n\n const obj = expr.object;\n const prop = expr.property;\n if (\n !t.isIdentifier(obj) ||\n (expr.computed ? !t.isStringLiteral(prop) : !t.isIdentifier(prop))\n ) {\n return;\n }\n const bindingIdentifier = path.scope.getBindingIdentifier(obj.name);\n const data = ENUMS.get(bindingIdentifier);\n if (!data) return;\n // @ts-expect-error checked above\n return data.get(prop.computed ? prop.value : prop.name);\n } else if (path.isIdentifier()) {\n const name = path.node.name;\n\n if ([\"Infinity\", \"NaN\"].includes(name)) {\n return Number(name);\n }\n\n let value = prevMembers?.get(name);\n if (value !== undefined) {\n return value;\n }\n\n if (seen.has(path.node)) return;\n seen.add(path.node);\n\n value = computeConstantValue(path.resolve(), prevMembers, seen);\n prevMembers?.set(name, value);\n return value;\n }\n }\n\n function evalUnaryExpression(\n path: NodePath,\n ): number | string | undefined {\n const value = evaluate(path.get(\"argument\"));\n if (value === undefined) {\n return undefined;\n }\n\n switch (path.node.operator) {\n case \"+\":\n return value;\n case \"-\":\n // eslint-disable-next-line @typescript-eslint/no-unsafe-unary-minus\n return -value;\n case \"~\":\n return ~value;\n default:\n return undefined;\n }\n }\n\n function evalBinaryExpression(\n path: NodePath,\n ): number | string | undefined {\n const left = evaluate(path.get(\"left\")) as any;\n if (left === undefined) {\n return undefined;\n }\n const right = evaluate(path.get(\"right\")) as any;\n if (right === undefined) {\n return undefined;\n }\n\n switch (path.node.operator) {\n case \"|\":\n return left | right;\n case \"&\":\n return left & right;\n case \">>\":\n return left >> right;\n case \">>>\":\n return left >>> right;\n case \"<<\":\n return left << right;\n case \"^\":\n return left ^ right;\n case \"*\":\n return left * right;\n case \"/\":\n return left / right;\n case \"+\":\n return left + right;\n case \"-\":\n return left - right;\n case \"%\":\n return left % right;\n case \"**\":\n return left ** right;\n default:\n return undefined;\n }\n }\n}\n","import type { NodePath, types as t } from \"@babel/core\";\n\nimport { translateEnumValues } from \"./enum.ts\";\n\nexport type NodePathConstEnum = NodePath;\nexport default function transpileConstEnum(\n path: NodePathConstEnum,\n t: typeof import(\"@babel/types\"),\n) {\n const { name } = path.node.id;\n\n const parentIsExport = path.parentPath.isExportNamedDeclaration();\n let isExported = parentIsExport;\n if (!isExported && t.isProgram(path.parent)) {\n isExported = path.parent.body.some(\n stmt =>\n t.isExportNamedDeclaration(stmt) &&\n stmt.exportKind !== \"type\" &&\n !stmt.source &&\n stmt.specifiers.some(\n spec =>\n t.isExportSpecifier(spec) &&\n spec.exportKind !== \"type\" &&\n spec.local.name === name,\n ),\n );\n }\n\n const { enumValues: entries } = translateEnumValues(path, t);\n\n if (isExported) {\n const obj = t.objectExpression(\n entries.map(([name, value]) =>\n t.objectProperty(\n t.isValidIdentifier(name)\n ? t.identifier(name)\n : t.stringLiteral(name),\n value,\n ),\n ),\n );\n\n if (path.scope.hasOwnBinding(name)) {\n (parentIsExport ? path.parentPath : path).replaceWith(\n t.expressionStatement(\n t.callExpression(\n t.memberExpression(t.identifier(\"Object\"), t.identifier(\"assign\")),\n [path.node.id, obj],\n ),\n ),\n );\n } else {\n path.replaceWith(\n t.variableDeclaration(process.env.BABEL_8_BREAKING ? \"const\" : \"var\", [\n t.variableDeclarator(path.node.id, obj),\n ]),\n );\n path.scope.registerDeclaration(path);\n }\n\n return;\n }\n\n const entriesMap = new Map(entries);\n\n // TODO: After fixing https://github.com/babel/babel/pull/11065, we can\n // use path.scope.getBinding(name).referencePaths rather than doing\n // a full traversal.\n path.scope.path.traverse({\n Scope(path) {\n if (path.scope.hasOwnBinding(name)) path.skip();\n },\n MemberExpression(path) {\n if (!t.isIdentifier(path.node.object, { name })) return;\n\n let key: string;\n if (path.node.computed) {\n if (t.isStringLiteral(path.node.property)) {\n key = path.node.property.value;\n } else {\n return;\n }\n } else if (t.isIdentifier(path.node.property)) {\n key = path.node.property.name;\n } else {\n return;\n }\n if (!entriesMap.has(key)) return;\n\n path.replaceWith(t.cloneNode(entriesMap.get(key)));\n },\n });\n\n path.remove();\n}\n","import type { NodePath, Scope } from \"@babel/core\";\n\nexport const GLOBAL_TYPES = new WeakMap>();\n\nexport function isGlobalType({ scope }: NodePath, name: string) {\n if (scope.hasBinding(name)) return false;\n if (GLOBAL_TYPES.get(scope).has(name)) return true;\n\n console.warn(\n `The exported identifier \"${name}\" is not declared in Babel's scope tracker\\n` +\n `as a JavaScript value binding, and \"@babel/plugin-transform-typescript\"\\n` +\n `never encountered it as a TypeScript type declaration.\\n` +\n `It will be treated as a JavaScript value.\\n\\n` +\n `This problem is likely caused by another plugin injecting\\n` +\n `\"${name}\" without registering it in the scope tracker. If you are the author\\n` +\n ` of that plugin, please use \"scope.registerDeclaration(declarationPath)\".`,\n );\n\n return false;\n}\n\nexport function registerGlobalType(programScope: Scope, name: string) {\n GLOBAL_TYPES.get(programScope).add(name);\n}\n","import { template, types as t, type NodePath } from \"@babel/core\";\n\nimport { registerGlobalType } from \"./global-types.ts\";\n\nexport default function transpileNamespace(\n path: NodePath,\n allowNamespaces: boolean,\n) {\n if (path.node.declare || path.node.id.type === \"StringLiteral\") {\n path.remove();\n return;\n }\n\n if (!allowNamespaces) {\n throw path\n .get(\"id\")\n .buildCodeFrameError(\n \"Namespace not marked type-only declare.\" +\n \" Non-declarative namespaces are only supported experimentally in Babel.\" +\n \" To enable and review caveats see:\" +\n \" https://babeljs.io/docs/en/babel-plugin-transform-typescript\",\n );\n }\n\n const name = path.node.id.name;\n const value = handleNested(path, t.cloneNode(path.node, true));\n if (value === null) {\n // This means that `path` is a type-only namespace.\n // We call `registerGlobalType` here to allow it to be stripped.\n const program = path.findParent(p => p.isProgram());\n registerGlobalType(program.scope, name);\n\n path.remove();\n } else if (path.scope.hasOwnBinding(name)) {\n path.replaceWith(value);\n } else {\n path.scope.registerDeclaration(\n path.replaceWithMultiple([getDeclaration(name), value])[0],\n );\n }\n}\n\nfunction getDeclaration(name: string) {\n return t.variableDeclaration(\"let\", [\n t.variableDeclarator(t.identifier(name)),\n ]);\n}\n\nfunction getMemberExpression(name: string, itemName: string) {\n return t.memberExpression(t.identifier(name), t.identifier(itemName));\n}\n\n/**\n * Convert export const foo = 1 to Namespace.foo = 1;\n *\n * @param {t.VariableDeclaration} node given variable declaration, e.g. `const foo = 1`\n * @param {string} name the generated unique namespace member name\n * @param {*} hub An instance implements HubInterface defined in `@babel/traverse` that can throw a code frame error\n */\nfunction handleVariableDeclaration(\n node: t.VariableDeclaration,\n name: string,\n hub: any,\n): t.Statement[] {\n if (node.kind !== \"const\") {\n throw hub.file.buildCodeFrameError(\n node,\n \"Namespaces exporting non-const are not supported by Babel.\" +\n \" Change to const or see:\" +\n \" https://babeljs.io/docs/en/babel-plugin-transform-typescript\",\n );\n }\n const { declarations } = node;\n if (\n declarations.every(\n (declarator): declarator is t.VariableDeclarator & { id: t.Identifier } =>\n t.isIdentifier(declarator.id),\n )\n ) {\n // `export const a = 1` transforms to `const a = N.a = 1`, the output\n // is smaller than `const a = 1; N.a = a`;\n for (const declarator of declarations) {\n declarator.init = t.assignmentExpression(\n \"=\",\n getMemberExpression(name, declarator.id.name),\n declarator.init,\n );\n }\n return [node];\n }\n // Now we have pattern in declarators\n // `export const [a] = 1` transforms to `const [a] = 1; N.a = a`\n const bindingIdentifiers = t.getBindingIdentifiers(node);\n const assignments = [];\n // getBindingIdentifiers returns an object without prototype.\n // eslint-disable-next-line guard-for-in\n for (const idName in bindingIdentifiers) {\n assignments.push(\n t.assignmentExpression(\n \"=\",\n getMemberExpression(name, idName),\n t.cloneNode(bindingIdentifiers[idName]),\n ),\n );\n }\n return [node, t.expressionStatement(t.sequenceExpression(assignments))];\n}\n\nfunction buildNestedAmbientModuleError(path: NodePath, node: t.Node) {\n return path.hub.buildError(\n node,\n \"Ambient modules cannot be nested in other modules or namespaces.\",\n Error,\n );\n}\n\nfunction handleNested(\n path: NodePath,\n node: t.TSModuleDeclaration,\n parentExport?: t.Expression,\n): t.Statement | null {\n const names = new Set();\n const realName = node.id;\n t.assertIdentifier(realName);\n\n const name = path.scope.generateUid(realName.name);\n\n const namespaceTopLevel: t.Statement[] = t.isTSModuleBlock(node.body)\n ? node.body.body\n : // We handle `namespace X.Y {}` as if it was\n // namespace X {\n // export namespace Y {}\n // }\n [t.exportNamedDeclaration(node.body)];\n\n let isEmpty = true;\n\n for (let i = 0; i < namespaceTopLevel.length; i++) {\n const subNode = namespaceTopLevel[i];\n\n // The first switch is mainly to detect name usage. Only export\n // declarations require further transformation.\n switch (subNode.type) {\n case \"TSModuleDeclaration\": {\n if (!t.isIdentifier(subNode.id)) {\n throw buildNestedAmbientModuleError(path, subNode);\n }\n\n const transformed = handleNested(path, subNode);\n if (transformed !== null) {\n isEmpty = false;\n const moduleName = subNode.id.name;\n if (names.has(moduleName)) {\n namespaceTopLevel[i] = transformed;\n } else {\n names.add(moduleName);\n namespaceTopLevel.splice(\n i++,\n 1,\n getDeclaration(moduleName),\n transformed,\n );\n }\n }\n continue;\n }\n case \"TSEnumDeclaration\":\n case \"FunctionDeclaration\":\n case \"ClassDeclaration\":\n isEmpty = false;\n names.add(subNode.id.name);\n continue;\n case \"VariableDeclaration\": {\n isEmpty = false;\n // getBindingIdentifiers returns an object without prototype.\n // eslint-disable-next-line guard-for-in\n for (const name in t.getBindingIdentifiers(subNode)) {\n names.add(name);\n }\n continue;\n }\n default:\n isEmpty &&= t.isTypeScript(subNode);\n // Neither named declaration nor export, continue to next item.\n continue;\n case \"ExportNamedDeclaration\":\n // Export declarations get parsed using the next switch.\n }\n\n if (\"declare\" in subNode.declaration && subNode.declaration.declare) {\n continue;\n }\n\n // Transform the export declarations that occur inside of a namespace.\n switch (subNode.declaration.type) {\n case \"TSEnumDeclaration\":\n case \"FunctionDeclaration\":\n case \"ClassDeclaration\": {\n isEmpty = false;\n const itemName = subNode.declaration.id.name;\n names.add(itemName);\n namespaceTopLevel.splice(\n i++,\n 1,\n subNode.declaration,\n t.expressionStatement(\n t.assignmentExpression(\n \"=\",\n getMemberExpression(name, itemName),\n t.identifier(itemName),\n ),\n ),\n );\n break;\n }\n case \"VariableDeclaration\": {\n isEmpty = false;\n const nodes = handleVariableDeclaration(\n subNode.declaration,\n name,\n path.hub,\n );\n namespaceTopLevel.splice(i, nodes.length, ...nodes);\n i += nodes.length - 1;\n break;\n }\n case \"TSModuleDeclaration\": {\n if (!t.isIdentifier(subNode.declaration.id)) {\n throw buildNestedAmbientModuleError(path, subNode.declaration);\n }\n\n const transformed = handleNested(\n path,\n subNode.declaration,\n t.identifier(name),\n );\n if (transformed !== null) {\n isEmpty = false;\n const moduleName = subNode.declaration.id.name;\n if (names.has(moduleName)) {\n namespaceTopLevel[i] = transformed;\n } else {\n names.add(moduleName);\n namespaceTopLevel.splice(\n i++,\n 1,\n getDeclaration(moduleName),\n transformed,\n );\n }\n } else {\n namespaceTopLevel.splice(i, 1);\n i--;\n }\n }\n }\n }\n\n if (isEmpty) return null;\n\n // {}\n let fallthroughValue: t.Expression = t.objectExpression([]);\n\n if (parentExport) {\n const memberExpr = t.memberExpression(parentExport, realName);\n fallthroughValue = template.expression.ast`\n ${t.cloneNode(memberExpr)} ||\n (${t.cloneNode(memberExpr)} = ${fallthroughValue})\n `;\n }\n\n return template.statement.ast`\n (function (${t.identifier(name)}) {\n ${namespaceTopLevel}\n })(${realName} || (${t.cloneNode(realName)} = ${fallthroughValue}));\n `;\n}\n","import { declare } from \"@babel/helper-plugin-utils\";\nimport syntaxTypeScript from \"@babel/plugin-syntax-typescript\";\nimport type { PluginPass, types as t, Scope, NodePath } from \"@babel/core\";\nimport { injectInitialization } from \"@babel/helper-create-class-features-plugin\";\nimport type { Options as SyntaxOptions } from \"@babel/plugin-syntax-typescript\";\n\nimport transpileConstEnum from \"./const-enum.ts\";\nimport type { NodePathConstEnum } from \"./const-enum.ts\";\nimport transpileEnum from \"./enum.ts\";\nimport {\n GLOBAL_TYPES,\n isGlobalType,\n registerGlobalType,\n} from \"./global-types.ts\";\nimport transpileNamespace from \"./namespace.ts\";\n\nfunction isInType(path: NodePath) {\n switch (path.parent.type) {\n case \"TSTypeReference\":\n case \"TSExpressionWithTypeArguments\":\n case \"TSTypeQuery\":\n return true;\n case \"TSQualifiedName\":\n return (\n // `import foo = ns.bar` is transformed to `var foo = ns.bar` and should not be removed\n path.parentPath.findParent(path => path.type !== \"TSQualifiedName\")\n .type !== \"TSImportEqualsDeclaration\"\n );\n case \"ExportSpecifier\":\n return (\n // export { type foo };\n path.parent.exportKind === \"type\" ||\n // export type { foo };\n // @ts-expect-error: DeclareExportDeclaration does not have `exportKind`\n (path.parentPath as NodePath).parent.exportKind ===\n \"type\"\n );\n default:\n return false;\n }\n}\n\n// Track programs which contain imports/exports of values, so that we can include\n// empty exports for programs that do not, but were parsed as modules. This allows\n// tools to infer unambiguously that results are ESM.\nconst NEEDS_EXPLICIT_ESM = new WeakMap();\nconst PARSED_PARAMS = new WeakSet();\n\n// A hack to avoid removing the impl Binding when we remove the declare NodePath\nfunction safeRemove(path: NodePath) {\n const ids = path.getBindingIdentifiers();\n for (const name of Object.keys(ids)) {\n const binding = path.scope.getBinding(name);\n if (binding && binding.identifier === ids[name]) {\n binding.scope.removeBinding(name);\n }\n }\n path.opts.noScope = true;\n path.remove();\n path.opts.noScope = false;\n}\n\nfunction assertCjsTransformEnabled(\n path: NodePath,\n pass: PluginPass,\n wrong: string,\n suggestion: string,\n extra: string = \"\",\n): void {\n if (pass.file.get(\"@babel/plugin-transform-modules-*\") !== \"commonjs\") {\n throw path.buildCodeFrameError(\n `\\`${wrong}\\` is only supported when compiling modules to CommonJS.\\n` +\n `Please consider using \\`${suggestion}\\`${extra}, or add ` +\n `@babel/plugin-transform-modules-commonjs to your Babel config.`,\n );\n }\n}\n\nexport interface Options extends SyntaxOptions {\n /** @default true */\n allowNamespaces?: boolean;\n /** @default \"React.createElement\" */\n jsxPragma?: string;\n /** @default \"React.Fragment\" */\n jsxPragmaFrag?: string;\n onlyRemoveTypeImports?: boolean;\n optimizeConstEnums?: boolean;\n allowDeclareFields?: boolean;\n}\n\ntype ExtraNodeProps = {\n declare?: unknown;\n accessibility?: unknown;\n abstract?: unknown;\n optional?: unknown;\n override?: unknown;\n};\n\nexport default declare((api, opts: Options) => {\n // `@babel/core` and `@babel/types` are bundled in some downstream libraries.\n // Ref: https://github.com/babel/babel/issues/15089\n const { types: t, template } = api;\n\n api.assertVersion(REQUIRED_VERSION(7));\n\n const JSX_PRAGMA_REGEX = /\\*?\\s*@jsx((?:Frag)?)\\s+(\\S+)/;\n\n const {\n allowNamespaces = true,\n jsxPragma = \"React.createElement\",\n jsxPragmaFrag = \"React.Fragment\",\n onlyRemoveTypeImports = false,\n optimizeConstEnums = false,\n } = opts;\n\n if (!process.env.BABEL_8_BREAKING) {\n // eslint-disable-next-line no-var\n var { allowDeclareFields = false } = opts;\n }\n\n const classMemberVisitors = {\n field(\n path: NodePath<\n (t.ClassPrivateProperty | t.ClassProperty | t.ClassAccessorProperty) &\n ExtraNodeProps\n >,\n ) {\n const { node } = path;\n\n if (!process.env.BABEL_8_BREAKING) {\n if (!allowDeclareFields && node.declare) {\n throw path.buildCodeFrameError(\n `The 'declare' modifier is only allowed when the 'allowDeclareFields' option of ` +\n `@babel/plugin-transform-typescript or @babel/preset-typescript is enabled.`,\n );\n }\n }\n if (node.declare) {\n if (node.value) {\n throw path.buildCodeFrameError(\n `Fields with the 'declare' modifier cannot be initialized here, but only in the constructor`,\n );\n }\n if (!node.decorators) {\n path.remove();\n }\n } else if (node.definite) {\n if (node.value) {\n throw path.buildCodeFrameError(\n `Definitely assigned fields cannot be initialized here, but only in the constructor`,\n );\n }\n if (!process.env.BABEL_8_BREAKING) {\n // keep the definitely assigned fields only when `allowDeclareFields` (equivalent of\n // Typescript's `useDefineForClassFields`) is true\n if (\n !allowDeclareFields &&\n !node.decorators &&\n !t.isClassPrivateProperty(node)\n ) {\n path.remove();\n }\n }\n } else if (node.abstract) {\n path.remove();\n } else if (!process.env.BABEL_8_BREAKING) {\n if (\n !allowDeclareFields &&\n !node.value &&\n !node.decorators &&\n !t.isClassPrivateProperty(node)\n ) {\n path.remove();\n }\n }\n\n if (node.accessibility) node.accessibility = null;\n if (node.abstract) node.abstract = null;\n if (node.readonly) node.readonly = null;\n if (node.optional) node.optional = null;\n if (node.typeAnnotation) node.typeAnnotation = null;\n if (node.definite) node.definite = null;\n if (node.declare) node.declare = null;\n if (node.override) node.override = null;\n },\n method({ node }: NodePath) {\n if (node.accessibility) node.accessibility = null;\n if (node.abstract) node.abstract = null;\n if (node.optional) node.optional = null;\n if (node.override) node.override = null;\n\n // Rest handled by Function visitor\n },\n constructor(path: NodePath, classPath: NodePath) {\n if (path.node.accessibility) path.node.accessibility = null;\n // Collects parameter properties so that we can add an assignment\n // for each of them in the constructor body\n //\n // We use a WeakSet to ensure an assignment for a parameter\n // property is only added once. This is necessary for cases like\n // using `transform-classes`, which causes this visitor to run\n // twice.\n const assigns: t.ExpressionStatement[] = [];\n const { scope } = path;\n for (const paramPath of path.get(\"params\")) {\n const param = paramPath.node;\n if (param.type === \"TSParameterProperty\") {\n const parameter = param.parameter;\n if (PARSED_PARAMS.has(parameter)) continue;\n PARSED_PARAMS.add(parameter);\n let id;\n if (t.isIdentifier(parameter)) {\n id = parameter;\n } else if (\n t.isAssignmentPattern(parameter) &&\n t.isIdentifier(parameter.left)\n ) {\n id = parameter.left;\n } else {\n throw paramPath.buildCodeFrameError(\n \"Parameter properties can not be destructuring patterns.\",\n );\n }\n assigns.push(\n template.statement.ast`\n this.${t.cloneNode(id)} = ${t.cloneNode(id)}\n ` as t.ExpressionStatement,\n );\n\n paramPath.replaceWith(paramPath.get(\"parameter\"));\n scope.registerBinding(\"param\", paramPath);\n }\n }\n injectInitialization(classPath, path, assigns);\n },\n };\n\n return {\n name: \"transform-typescript\",\n inherits: syntaxTypeScript,\n\n visitor: {\n //\"Pattern\" alias doesn't include Identifier or RestElement.\n Pattern: visitPattern,\n Identifier: visitPattern,\n RestElement: visitPattern,\n\n Program: {\n enter(path, state) {\n const { file } = state;\n let fileJsxPragma = null;\n let fileJsxPragmaFrag = null;\n const programScope = path.scope;\n\n if (!GLOBAL_TYPES.has(programScope)) {\n GLOBAL_TYPES.set(programScope, new Set());\n }\n\n if (file.ast.comments) {\n for (const comment of file.ast.comments) {\n const jsxMatches = JSX_PRAGMA_REGEX.exec(comment.value);\n if (jsxMatches) {\n if (jsxMatches[1]) {\n // isFragment\n fileJsxPragmaFrag = jsxMatches[2];\n } else {\n fileJsxPragma = jsxMatches[2];\n }\n }\n }\n }\n\n let pragmaImportName = fileJsxPragma || jsxPragma;\n if (pragmaImportName) {\n [pragmaImportName] = pragmaImportName.split(\".\");\n }\n\n let pragmaFragImportName = fileJsxPragmaFrag || jsxPragmaFrag;\n if (pragmaFragImportName) {\n [pragmaFragImportName] = pragmaFragImportName.split(\".\");\n }\n\n // remove type imports\n for (let stmt of path.get(\"body\") as Iterable<\n NodePath\n >) {\n if (stmt.isImportDeclaration()) {\n if (!NEEDS_EXPLICIT_ESM.has(state.file.ast.program)) {\n NEEDS_EXPLICIT_ESM.set(state.file.ast.program, true);\n }\n\n if (stmt.node.importKind === \"type\") {\n for (const specifier of stmt.node.specifiers) {\n registerGlobalType(programScope, specifier.local.name);\n }\n stmt.remove();\n continue;\n }\n\n const importsToRemove: Set> = new Set();\n const specifiersLength = stmt.node.specifiers.length;\n const isAllSpecifiersElided = () =>\n specifiersLength > 0 &&\n specifiersLength === importsToRemove.size;\n\n for (const specifier of stmt.node.specifiers) {\n if (\n specifier.type === \"ImportSpecifier\" &&\n specifier.importKind === \"type\"\n ) {\n registerGlobalType(programScope, specifier.local.name);\n const binding = stmt.scope.getBinding(specifier.local.name);\n if (binding) {\n importsToRemove.add(binding.path);\n }\n }\n }\n\n // If onlyRemoveTypeImports is `true`, only remove type-only imports\n // and exports introduced in TypeScript 3.8.\n if (onlyRemoveTypeImports) {\n NEEDS_EXPLICIT_ESM.set(path.node, false);\n } else {\n // Note: this will allow both `import { } from \"m\"` and `import \"m\";`.\n // In TypeScript, the former would be elided.\n if (stmt.node.specifiers.length === 0) {\n NEEDS_EXPLICIT_ESM.set(path.node, false);\n continue;\n }\n\n for (const specifier of stmt.node.specifiers) {\n const binding = stmt.scope.getBinding(specifier.local.name);\n\n // The binding may not exist if the import node was explicitly\n // injected by another plugin. Currently core does not do a good job\n // of keeping scope bindings synchronized with the AST. For now we\n // just bail if there is no binding, since chances are good that if\n // the import statement was injected then it wasn't a typescript type\n // import anyway.\n if (binding && !importsToRemove.has(binding.path)) {\n if (\n isImportTypeOnly({\n binding,\n programPath: path,\n pragmaImportName,\n pragmaFragImportName,\n })\n ) {\n importsToRemove.add(binding.path);\n } else {\n NEEDS_EXPLICIT_ESM.set(path.node, false);\n }\n }\n }\n }\n\n if (isAllSpecifiersElided() && !onlyRemoveTypeImports) {\n stmt.remove();\n } else {\n for (const importPath of importsToRemove) {\n importPath.remove();\n }\n }\n\n continue;\n }\n\n if (stmt.isExportDeclaration()) {\n stmt = stmt.get(\"declaration\");\n }\n\n if (stmt.isVariableDeclaration({ declare: true })) {\n for (const name of Object.keys(stmt.getBindingIdentifiers())) {\n registerGlobalType(programScope, name);\n }\n } else if (\n stmt.isTSTypeAliasDeclaration() ||\n (stmt.isTSDeclareFunction() && stmt.get(\"id\").isIdentifier()) ||\n stmt.isTSInterfaceDeclaration() ||\n stmt.isClassDeclaration({ declare: true }) ||\n stmt.isTSEnumDeclaration({ declare: true }) ||\n (stmt.isTSModuleDeclaration({ declare: true }) &&\n stmt.get(\"id\").isIdentifier())\n ) {\n registerGlobalType(\n programScope,\n (stmt.node.id as t.Identifier).name,\n );\n }\n }\n },\n exit(path) {\n if (\n path.node.sourceType === \"module\" &&\n NEEDS_EXPLICIT_ESM.get(path.node)\n ) {\n // If there are no remaining value exports, this file can no longer\n // be inferred to be ESM. Leave behind an empty export declaration\n // so it can be.\n path.pushContainer(\"body\", t.exportNamedDeclaration());\n }\n },\n },\n\n ExportNamedDeclaration(path, state) {\n if (!NEEDS_EXPLICIT_ESM.has(state.file.ast.program)) {\n NEEDS_EXPLICIT_ESM.set(state.file.ast.program, true);\n }\n\n if (path.node.exportKind === \"type\") {\n path.remove();\n return;\n }\n\n // remove export declaration that is filled with type-only specifiers\n // export { type A1, type A2 } from \"a\";\n if (\n path.node.source &&\n path.node.specifiers.length > 0 &&\n path.node.specifiers.every(\n specifier =>\n specifier.type === \"ExportSpecifier\" &&\n specifier.exportKind === \"type\",\n )\n ) {\n path.remove();\n return;\n }\n\n // remove export declaration if it's exporting only types\n // This logic is needed when exportKind is \"value\", because\n // currently the \"type\" keyword is optional.\n // TODO:\n // Also, currently @babel/parser sets exportKind to \"value\" for\n // export interface A {}\n // etc.\n if (\n !path.node.source &&\n path.node.specifiers.length > 0 &&\n path.node.specifiers.every(\n specifier =>\n t.isExportSpecifier(specifier) &&\n isGlobalType(path, specifier.local.name),\n )\n ) {\n path.remove();\n return;\n }\n\n // Convert `export namespace X {}` into `export let X; namespace X {}`,\n // so that when visiting TSModuleDeclaration we do not have to possibly\n // replace its parent path.\n if (t.isTSModuleDeclaration(path.node.declaration)) {\n const namespace = path.node.declaration;\n const { id } = namespace;\n if (t.isIdentifier(id)) {\n if (path.scope.hasOwnBinding(id.name)) {\n path.replaceWith(namespace);\n } else {\n const [newExport] = path.replaceWithMultiple([\n t.exportNamedDeclaration(\n t.variableDeclaration(\"let\", [\n t.variableDeclarator(t.cloneNode(id)),\n ]),\n ),\n namespace,\n ]);\n path.scope.registerDeclaration(newExport);\n }\n }\n }\n\n NEEDS_EXPLICIT_ESM.set(state.file.ast.program, false);\n },\n\n ExportAllDeclaration(path) {\n if (path.node.exportKind === \"type\") path.remove();\n },\n\n ExportSpecifier(path) {\n // remove type exports\n type Parent = t.ExportDeclaration & { source?: t.StringLiteral };\n const parent = path.parent as Parent;\n if (\n (!parent.source && isGlobalType(path, path.node.local.name)) ||\n path.node.exportKind === \"type\"\n ) {\n path.remove();\n }\n },\n\n ExportDefaultDeclaration(path, state) {\n if (!NEEDS_EXPLICIT_ESM.has(state.file.ast.program)) {\n NEEDS_EXPLICIT_ESM.set(state.file.ast.program, true);\n }\n\n // remove whole declaration if it's exporting a TS type\n if (\n t.isIdentifier(path.node.declaration) &&\n isGlobalType(path, path.node.declaration.name)\n ) {\n path.remove();\n\n return;\n }\n\n NEEDS_EXPLICIT_ESM.set(state.file.ast.program, false);\n },\n\n TSDeclareFunction(path) {\n safeRemove(path);\n },\n\n TSDeclareMethod(path) {\n safeRemove(path);\n },\n\n VariableDeclaration(path) {\n if (path.node.declare) {\n safeRemove(path);\n }\n },\n\n VariableDeclarator({ node }) {\n if (node.definite) node.definite = null;\n },\n\n TSIndexSignature(path) {\n path.remove();\n },\n\n ClassDeclaration(path) {\n const { node } = path;\n if (node.declare) {\n safeRemove(path);\n }\n },\n\n Class(path) {\n const { node }: { node: typeof path.node & ExtraNodeProps } = path;\n\n if (node.typeParameters) node.typeParameters = null;\n if (node.superTypeParameters) node.superTypeParameters = null;\n if (node.implements) node.implements = null;\n if (node.abstract) node.abstract = null;\n\n // Similar to the logic in `transform-flow-strip-types`, we need to\n // handle `TSParameterProperty` and `ClassProperty` here because the\n // class transform would transform the class, causing more specific\n // visitors to not run.\n path.get(\"body.body\").forEach(child => {\n if (child.isClassMethod() || child.isClassPrivateMethod()) {\n if (child.node.kind === \"constructor\") {\n classMemberVisitors.constructor(\n // @ts-expect-error A constructor must not be a private method\n child,\n path,\n );\n } else {\n classMemberVisitors.method(child);\n }\n } else if (\n child.isClassProperty() ||\n child.isClassPrivateProperty() ||\n child.isClassAccessorProperty()\n ) {\n classMemberVisitors.field(child);\n }\n });\n },\n\n Function(path) {\n const { node } = path;\n if (node.typeParameters) node.typeParameters = null;\n if (node.returnType) node.returnType = null;\n\n const params = node.params;\n if (params.length > 0 && t.isIdentifier(params[0], { name: \"this\" })) {\n params.shift();\n }\n },\n\n TSModuleDeclaration(path) {\n transpileNamespace(path, allowNamespaces);\n },\n\n TSInterfaceDeclaration(path) {\n path.remove();\n },\n\n TSTypeAliasDeclaration(path) {\n path.remove();\n },\n\n TSEnumDeclaration(path) {\n if (optimizeConstEnums && path.node.const) {\n transpileConstEnum(path as NodePathConstEnum, t);\n } else {\n transpileEnum(path, t);\n }\n },\n\n TSImportEqualsDeclaration(\n path: NodePath,\n pass,\n ) {\n const { id, moduleReference, isExport } = path.node;\n\n let init: t.Expression;\n let varKind: \"var\" | \"const\";\n if (t.isTSExternalModuleReference(moduleReference)) {\n // import alias = require('foo');\n assertCjsTransformEnabled(\n path,\n pass,\n `import ${id.name} = require(...);`,\n `import ${id.name} from '...';`,\n \" alongside Typescript's --allowSyntheticDefaultImports option\",\n );\n init = t.callExpression(t.identifier(\"require\"), [\n moduleReference.expression,\n ]);\n varKind = \"const\";\n } else {\n // import alias = Namespace;\n init = entityNameToExpr(moduleReference);\n varKind = \"var\";\n }\n const newNode = t.variableDeclaration(varKind, [\n t.variableDeclarator(id, init),\n ]);\n\n path.replaceWith(\n isExport ? t.exportNamedDeclaration(newNode) : newNode,\n );\n path.scope.registerDeclaration(path);\n },\n\n TSExportAssignment(path, pass) {\n assertCjsTransformEnabled(\n path,\n pass,\n `export = ;`,\n `export default ;`,\n );\n path.replaceWith(\n template.statement.ast`module.exports = ${path.node.expression}`,\n );\n },\n\n TSTypeAssertion(path) {\n path.replaceWith(path.node.expression);\n },\n\n [`TSAsExpression${\n // Added in Babel 7.20.0\n t.tsSatisfiesExpression ? \"|TSSatisfiesExpression\" : \"\"\n }`](path: NodePath) {\n let { node }: { node: t.Expression } = path;\n do {\n node = node.expression;\n } while (t.isTSAsExpression(node) || t.isTSSatisfiesExpression?.(node));\n path.replaceWith(node);\n },\n\n [process.env.BABEL_8_BREAKING\n ? \"TSNonNullExpression|TSInstantiationExpression\"\n : /* This has been introduced in Babel 7.18.0\n We use api.types.* and not t.* for feature detection,\n because the Babel version that is running this plugin\n (where we check if the visitor is valid) might be different\n from the Babel version that we resolve with `import \"@babel/core\"`.\n This happens, for example, with Next.js that bundled `@babel/core`\n but allows loading unbundled plugin (which cannot obviously import\n the bundled `@babel/core` version).\n */\n api.types.tsInstantiationExpression\n ? \"TSNonNullExpression|TSInstantiationExpression\"\n : \"TSNonNullExpression\"](\n path: NodePath,\n ) {\n path.replaceWith(path.node.expression);\n },\n\n CallExpression(path) {\n path.node.typeParameters = null;\n },\n\n OptionalCallExpression(path) {\n path.node.typeParameters = null;\n },\n\n NewExpression(path) {\n path.node.typeParameters = null;\n },\n\n JSXOpeningElement(path) {\n path.node.typeParameters = null;\n },\n\n TaggedTemplateExpression(path) {\n path.node.typeParameters = null;\n },\n },\n };\n\n function entityNameToExpr(node: t.TSEntityName): t.Expression {\n if (t.isTSQualifiedName(node)) {\n return t.memberExpression(entityNameToExpr(node.left), node.right);\n }\n\n return node;\n }\n\n function visitPattern({\n node,\n }: NodePath) {\n if (node.typeAnnotation) node.typeAnnotation = null;\n if (t.isIdentifier(node) && node.optional) node.optional = null;\n // 'access' and 'readonly' are only for parameter properties, so constructor visitor will handle them.\n }\n\n function isImportTypeOnly({\n binding,\n programPath,\n pragmaImportName,\n pragmaFragImportName,\n }: {\n binding: Scope.Binding;\n programPath: NodePath;\n pragmaImportName: string;\n pragmaFragImportName: string;\n }) {\n for (const path of binding.referencePaths) {\n if (!isInType(path)) {\n return false;\n }\n }\n\n if (\n binding.identifier.name !== pragmaImportName &&\n binding.identifier.name !== pragmaFragImportName\n ) {\n return true;\n }\n\n // \"React\" or the JSX pragma is referenced as a value if there are any JSX elements/fragments in the code.\n let sourceFileHasJsx = false;\n programPath.traverse({\n \"JSXElement|JSXFragment\"(path) {\n sourceFileHasJsx = true;\n path.stop();\n },\n });\n return !sourceFileHasJsx;\n }\n});\n","import { declare } from \"@babel/helper-plugin-utils\";\nimport { types as t, type NodePath } from \"@babel/core\";\n\nexport default declare(api => {\n api.assertVersion(REQUIRED_VERSION(7));\n\n const surrogate = /[\\ud800-\\udfff]/g;\n const unicodeEscape = /(\\\\+)u\\{([0-9a-fA-F]+)\\}/g;\n\n function escape(code: number) {\n if (process.env.BABEL_8_BREAKING) {\n return \"\\\\u\" + code.toString(16).padStart(4, \"0\");\n } else {\n let str = code.toString(16);\n while (str.length < 4) str = \"0\" + str;\n return \"\\\\u\" + str;\n }\n }\n\n function replacer(match: string, backslashes: string, code: string) {\n if (backslashes.length % 2 === 0) {\n return match;\n }\n\n const char = String.fromCodePoint(parseInt(code, 16));\n const escaped = backslashes.slice(0, -1) + escape(char.charCodeAt(0));\n\n return char.length === 1 ? escaped : escaped + escape(char.charCodeAt(1));\n }\n\n function replaceUnicodeEscapes(str: string) {\n return str.replace(unicodeEscape, replacer);\n }\n\n function getUnicodeEscape(str: string) {\n let match;\n while ((match = unicodeEscape.exec(str))) {\n if (match[1].length % 2 === 0) continue;\n unicodeEscape.lastIndex = 0;\n return match[0];\n }\n return null;\n }\n\n return {\n name: \"transform-unicode-escapes\",\n manipulateOptions({ generatorOpts }) {\n // Babel 8 will enable jsesc minimal mode by default, which outputs\n // unescaped unicode string\n if (!generatorOpts.jsescOption) {\n generatorOpts.jsescOption = {};\n }\n generatorOpts.jsescOption.minimal ??= false;\n },\n visitor: {\n Identifier(path) {\n const { node, key } = path;\n const { name } = node;\n const replaced = name.replace(surrogate, c => {\n return `_u${c.charCodeAt(0).toString(16)}`;\n });\n if (name === replaced) return;\n\n const str = t.inherits(t.stringLiteral(name), node);\n\n if (key === \"key\") {\n path.replaceWith(str);\n return;\n }\n\n const { parentPath, scope } = path;\n if (\n parentPath.isMemberExpression({ property: node }) ||\n parentPath.isOptionalMemberExpression({ property: node })\n ) {\n parentPath.node.computed = true;\n path.replaceWith(str);\n return;\n }\n\n const binding = scope.getBinding(name);\n if (binding) {\n scope.rename(name, scope.generateUid(replaced));\n return;\n }\n\n throw path.buildCodeFrameError(\n `Can't reference '${name}' as a bare identifier`,\n );\n },\n\n \"StringLiteral|DirectiveLiteral\"(\n path: NodePath,\n ) {\n const { node } = path;\n const { extra } = node;\n\n if (extra?.raw) extra.raw = replaceUnicodeEscapes(extra.raw as string);\n },\n\n TemplateElement(path) {\n const { node, parentPath } = path;\n const { value } = node;\n\n const firstEscape = getUnicodeEscape(value.raw);\n if (!firstEscape) return;\n\n const grandParent = parentPath.parentPath;\n if (grandParent.isTaggedTemplateExpression()) {\n throw path.buildCodeFrameError(\n `Can't replace Unicode escape '${firstEscape}' inside tagged template literals. You can enable '@babel/plugin-transform-template-literals' to compile them to classic strings.`,\n );\n }\n\n value.raw = replaceUnicodeEscapes(value.raw);\n },\n },\n };\n});\n","/* eslint-disable @babel/development/plugin-name */\nimport { createRegExpFeaturePlugin } from \"@babel/helper-create-regexp-features-plugin\";\nimport { declare } from \"@babel/helper-plugin-utils\";\n\nexport default declare(api => {\n api.assertVersion(REQUIRED_VERSION(7));\n\n return createRegExpFeaturePlugin({\n name: \"transform-unicode-regex\",\n feature: \"unicodeFlag\",\n });\n});\n","import { declare } from \"@babel/helper-plugin-utils\";\nimport syntaxExplicitResourceManagement from \"@babel/plugin-syntax-explicit-resource-management\";\nimport { types as t, template, traverse } from \"@babel/core\";\nimport type { NodePath, Visitor, PluginPass } from \"@babel/core\";\n\nconst enum USING_KIND {\n NORMAL,\n AWAIT,\n}\n\nexport default declare(api => {\n api.assertVersion(REQUIRED_VERSION(\"^7.22.0\"));\n\n const TOP_LEVEL_USING = new Map();\n\n function isUsingDeclaration(node: t.Node): node is t.VariableDeclaration {\n if (!t.isVariableDeclaration(node)) return false;\n return (\n node.kind === \"using\" ||\n node.kind === \"await using\" ||\n TOP_LEVEL_USING.has(node)\n );\n }\n\n const transformUsingDeclarationsVisitor: Visitor = {\n ForOfStatement(path: NodePath) {\n const { left } = path.node;\n if (!isUsingDeclaration(left)) return;\n\n const { id } = left.declarations[0];\n const tmpId = path.scope.generateUidIdentifierBasedOnNode(id);\n left.declarations[0].id = tmpId;\n left.kind = \"const\";\n\n path.ensureBlock();\n path.node.body.body.unshift(\n t.variableDeclaration(\"using\", [\n t.variableDeclarator(id, t.cloneNode(tmpId)),\n ]),\n );\n },\n \"BlockStatement|StaticBlock\"(\n path: NodePath,\n state,\n ) {\n if (process.env.BABEL_8_BREAKING || state.availableHelper(\"usingCtx\")) {\n let ctx: t.Identifier | null = null;\n let needsAwait = false;\n\n for (const node of path.node.body) {\n if (!isUsingDeclaration(node)) continue;\n ctx ??= path.scope.generateUidIdentifier(\"usingCtx\");\n const isAwaitUsing =\n node.kind === \"await using\" ||\n TOP_LEVEL_USING.get(node) === USING_KIND.AWAIT;\n needsAwait ||= isAwaitUsing;\n\n if (!TOP_LEVEL_USING.delete(node)) {\n node.kind = \"const\";\n }\n for (const decl of node.declarations) {\n decl.init = t.callExpression(\n t.memberExpression(\n t.cloneNode(ctx),\n isAwaitUsing ? t.identifier(\"a\") : t.identifier(\"u\"),\n ),\n [decl.init],\n );\n }\n }\n if (!ctx) return;\n\n const disposeCall = t.callExpression(\n t.memberExpression(t.cloneNode(ctx), t.identifier(\"d\")),\n [],\n );\n\n const replacement = template.statement.ast`\n try {\n var ${t.cloneNode(ctx)} = ${state.addHelper(\"usingCtx\")}();\n ${path.node.body}\n } catch (_) {\n ${t.cloneNode(ctx)}.e = _;\n } finally {\n ${needsAwait ? t.awaitExpression(disposeCall) : disposeCall}\n }\n ` as t.TryStatement;\n\n t.inherits(replacement, path.node);\n\n const { parentPath } = path;\n if (\n parentPath.isFunction() ||\n parentPath.isTryStatement() ||\n parentPath.isCatchClause()\n ) {\n path.replaceWith(t.blockStatement([replacement]));\n } else if (path.isStaticBlock()) {\n path.node.body = [replacement];\n } else {\n path.replaceWith(replacement);\n }\n } else {\n let stackId: t.Identifier | null = null;\n let needsAwait = false;\n\n for (const node of path.node.body) {\n if (!isUsingDeclaration(node)) continue;\n stackId ??= path.scope.generateUidIdentifier(\"stack\");\n const isAwaitUsing =\n node.kind === \"await using\" ||\n TOP_LEVEL_USING.get(node) === USING_KIND.AWAIT;\n needsAwait ||= isAwaitUsing;\n\n if (!TOP_LEVEL_USING.delete(node)) {\n node.kind = \"const\";\n }\n node.declarations.forEach(decl => {\n const args = [t.cloneNode(stackId), decl.init];\n if (isAwaitUsing) args.push(t.booleanLiteral(true));\n decl.init = t.callExpression(state.addHelper(\"using\"), args);\n });\n }\n if (!stackId) return;\n\n const errorId = path.scope.generateUidIdentifier(\"error\");\n const hasErrorId = path.scope.generateUidIdentifier(\"hasError\");\n\n let disposeCall: t.Expression = t.callExpression(\n state.addHelper(\"dispose\"),\n [t.cloneNode(stackId), t.cloneNode(errorId), t.cloneNode(hasErrorId)],\n );\n if (needsAwait) disposeCall = t.awaitExpression(disposeCall);\n\n const replacement = template.statement.ast`\n try {\n var ${stackId} = [];\n ${path.node.body}\n } catch (_) {\n var ${errorId} = _;\n var ${hasErrorId} = true;\n } finally {\n ${disposeCall}\n }\n ` as t.TryStatement;\n\n t.inherits(replacement.block, path.node);\n\n const { parentPath } = path;\n if (\n parentPath.isFunction() ||\n parentPath.isTryStatement() ||\n parentPath.isCatchClause()\n ) {\n path.replaceWith(t.blockStatement([replacement]));\n } else if (path.isStaticBlock()) {\n path.node.body = [replacement];\n } else {\n path.replaceWith(replacement);\n }\n }\n },\n SwitchStatement(path, state) {\n let ctx: t.Identifier | null = null;\n let needsAwait = false;\n\n const { cases } = path.node;\n for (const c of cases) {\n for (const stmt of c.consequent) {\n if (isUsingDeclaration(stmt)) {\n if (\n !process.env.BABEL_8_BREAKING &&\n !state.availableHelper(\"usingCtx\")\n ) {\n path.traverse({\n VariableDeclaration(path) {\n const { node } = path;\n if (!isUsingDeclaration(node)) return;\n throw path.buildCodeFrameError(\n \"`using` declarations inside `switch` statements are not supported by your current `@babel/core` version, please update to a more recent one\",\n );\n },\n });\n }\n\n ctx ??= path.scope.generateUidIdentifier(\"usingCtx\");\n\n const isAwaitUsing = stmt.kind === \"await using\";\n needsAwait ||= isAwaitUsing;\n\n stmt.kind = \"const\";\n for (const decl of stmt.declarations) {\n decl.init = t.callExpression(\n t.memberExpression(\n t.cloneNode(ctx),\n isAwaitUsing ? t.identifier(\"a\") : t.identifier(\"u\"),\n ),\n [decl.init],\n );\n }\n }\n }\n }\n if (!ctx) return;\n\n const disposeCall = t.callExpression(\n t.memberExpression(t.cloneNode(ctx), t.identifier(\"d\")),\n [],\n );\n\n const replacement = template.statement.ast`\n try {\n var ${t.cloneNode(ctx)} = ${state.addHelper(\"usingCtx\")}();\n ${path.node}\n } catch (_) {\n ${t.cloneNode(ctx)}.e = _;\n } finally {\n ${needsAwait ? t.awaitExpression(disposeCall) : disposeCall}\n }\n ` as t.TryStatement;\n\n t.inherits(replacement, path.node);\n\n path.replaceWith(replacement);\n },\n };\n\n const transformUsingDeclarationsVisitorSkipFn: Visitor =\n traverse.visitors.merge([\n transformUsingDeclarationsVisitor,\n {\n Function(path) {\n path.skip();\n },\n },\n ]);\n\n return {\n name: \"proposal-explicit-resource-management\",\n inherits: syntaxExplicitResourceManagement,\n\n visitor: traverse.visitors.merge([\n transformUsingDeclarationsVisitor,\n {\n // To transform top-level using declarations, we must wrap the\n // module body in a block after hoisting all the exports and imports.\n // This might cause some variables to be `undefined` rather than TDZ.\n Program(path) {\n TOP_LEVEL_USING.clear();\n\n if (path.node.sourceType !== \"module\") return;\n if (!path.node.body.some(isUsingDeclaration)) return;\n\n const innerBlockBody = [];\n for (const stmt of path.get(\"body\")) {\n if (stmt.isFunctionDeclaration() || stmt.isImportDeclaration()) {\n continue;\n }\n\n let node: t.Statement | t.Declaration = stmt.node;\n let shouldRemove = true;\n\n if (stmt.isExportDefaultDeclaration()) {\n let { declaration } = stmt.node;\n let varId;\n if (t.isClassDeclaration(declaration)) {\n varId = declaration.id;\n declaration.id = null;\n declaration = t.toExpression(declaration);\n } else if (!t.isExpression(declaration)) {\n continue;\n }\n\n varId ??= path.scope.generateUidIdentifier(\"_default\");\n innerBlockBody.push(\n t.variableDeclaration(\"var\", [\n t.variableDeclarator(varId, declaration),\n ]),\n );\n stmt.replaceWith(\n t.exportNamedDeclaration(null, [\n t.exportSpecifier(\n t.cloneNode(varId),\n t.identifier(\"default\"),\n ),\n ]),\n );\n continue;\n }\n\n if (stmt.isExportNamedDeclaration()) {\n node = stmt.node.declaration;\n if (!node || t.isFunction(node)) continue;\n\n stmt.replaceWith(\n t.exportNamedDeclaration(\n null,\n Object.keys(t.getOuterBindingIdentifiers(node, false)).map(\n id => t.exportSpecifier(t.identifier(id), t.identifier(id)),\n ),\n ),\n );\n shouldRemove = false;\n } else if (stmt.isExportDeclaration()) {\n continue;\n }\n\n if (t.isClassDeclaration(node)) {\n const { id } = node;\n node.id = null;\n innerBlockBody.push(\n t.variableDeclaration(\"var\", [\n t.variableDeclarator(id, t.toExpression(node)),\n ]),\n );\n } else if (t.isVariableDeclaration(node)) {\n if (node.kind === \"using\") {\n TOP_LEVEL_USING.set(stmt.node, USING_KIND.NORMAL);\n } else if (node.kind === \"await using\") {\n TOP_LEVEL_USING.set(stmt.node, USING_KIND.AWAIT);\n }\n node.kind = \"var\";\n innerBlockBody.push(node);\n } else {\n innerBlockBody.push(stmt.node);\n }\n\n if (shouldRemove) stmt.remove();\n }\n\n path.pushContainer(\"body\", t.blockStatement(innerBlockBody));\n },\n // We must transform `await using` in async functions before that\n // async-to-generator will transform `await` expressions into `yield`\n Function(path, state) {\n if (path.node.async) {\n path.traverse(transformUsingDeclarationsVisitorSkipFn, state);\n }\n },\n },\n ]),\n };\n});\n","import { declare } from \"@babel/helper-plugin-utils\";\n\nexport default declare(api => {\n api.assertVersion(REQUIRED_VERSION(7));\n\n return {\n name: \"syntax-import-defer\",\n\n manipulateOptions(_, parserOpts) {\n parserOpts.plugins.push(\"deferredImportEvaluation\");\n },\n };\n});\n","import { declare } from \"@babel/helper-plugin-utils\";\nimport type { types as t, Scope } from \"@babel/core\";\nimport { defineCommonJSHook } from \"@babel/plugin-transform-modules-commonjs\";\n\nimport syntaxImportDefer from \"@babel/plugin-syntax-import-defer\";\n\nexport default declare(api => {\n api.assertVersion(REQUIRED_VERSION(\"^7.23.0\"));\n // We need the explicit type annotation otherwise when using t.assert* ts\n // reports that 'Assertions require every name in the call target to be\n // declared with an explicit type annotation'\n const t: typeof api.types = api.types;\n const { template } = api;\n\n function allReferencesAreProps(scope: Scope, node: t.ImportDeclaration) {\n const specifier = node.specifiers[0];\n t.assertImportNamespaceSpecifier(specifier);\n\n const binding = scope.getOwnBinding(specifier.local.name);\n return !!binding?.referencePaths.every(path =>\n path.parentPath.isMemberExpression({ object: path.node }),\n );\n }\n\n return {\n name: \"proposal-import-defer\",\n\n inherits: syntaxImportDefer,\n\n pre() {\n const { file } = this;\n\n defineCommonJSHook(file, {\n name: PACKAGE_JSON.name,\n version: PACKAGE_JSON.version,\n getWrapperPayload(source, metadata, importNodes) {\n let needsProxy = false;\n for (const node of importNodes) {\n if (!t.isImportDeclaration(node)) return null;\n if (node.phase !== \"defer\") return null;\n if (!allReferencesAreProps(file.scope, node)) needsProxy = true;\n }\n return needsProxy ? \"defer/proxy\" : \"defer/function\";\n },\n buildRequireWrapper(name, init, payload, referenced) {\n if (payload === \"defer/proxy\") {\n if (!referenced) return false;\n return template.statement.ast`\n var ${name} = ${file.addHelper(\"importDeferProxy\")}(\n () => ${init}\n )\n `;\n }\n if (payload === \"defer/function\") {\n if (!referenced) return false;\n return template.statement.ast`\n function ${name}(data) {\n ${name} = () => data;\n return data = ${init};\n }\n `;\n }\n },\n wrapReference(ref, payload) {\n if (payload === \"defer/function\") return t.callExpression(ref, []);\n },\n });\n },\n\n visitor: {\n Program(path) {\n if (this.file.get(\"@babel/plugin-transform-modules-*\") !== \"commonjs\") {\n throw new Error(\n `@babel/plugin-proposal-import-defer can only be used when` +\n ` transpiling modules to CommonJS.`,\n );\n }\n\n // Move all deferred imports to the end, so that in case of\n // import defer * as a from \"a\"\n // import \"b\"\n // import \"a\"\n // we have the correct evaluation order\n\n const eagerImports = new Set();\n\n for (const child of path.get(\"body\")) {\n if (\n (child.isImportDeclaration() && child.node.phase == null) ||\n (child.isExportNamedDeclaration() && child.node.source !== null) ||\n child.isExportAllDeclaration()\n ) {\n const specifier = child.node.source.value;\n if (!eagerImports.has(specifier)) {\n eagerImports.add(specifier);\n }\n }\n }\n\n const importsToPush = [];\n for (const child of path.get(\"body\")) {\n if (child.isImportDeclaration({ phase: \"defer\" })) {\n const specifier = child.node.source.value;\n if (!eagerImports.has(specifier)) continue;\n\n child.node.phase = null;\n importsToPush.push(child.node);\n child.remove();\n }\n }\n if (importsToPush.length) {\n path.pushContainer(\"body\", importsToPush);\n // Re-collect references to moved imports\n path.scope.crawl();\n }\n },\n },\n };\n});\n","import { isRequired, type Targets } from \"@babel/helper-compilation-targets\";\n\nfunction isEmpty(obj: object) {\n return Object.keys(obj).length === 0;\n}\n\nconst isRequiredOptions = {\n compatData: {\n // `import.meta.resolve` compat data.\n // Source: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/import.meta/resolve#browser_compatibility\n // Once Node.js implements `fetch` of local files, we can re-use the web implementation for it\n // similarly to how we do for Deno.\n webIMR: {\n chrome: \"105.0.0\",\n edge: \"105.0.0\",\n firefox: \"106.0.0\",\n opera: \"91.0.0\",\n safari: \"16.4.0\",\n opera_mobile: \"72.0.0\",\n ios: \"16.4.0\",\n samsung: \"20.0\",\n deno: \"1.24.0\",\n },\n nodeIMR: {\n node: \"20.6.0\",\n },\n // Node.js require(\"fs\").promises compat data.\n nodeFSP: {\n node: \"10.0.0\",\n },\n },\n};\n\ninterface Support {\n needsNodeSupport: boolean;\n needsWebSupport: boolean;\n nodeSupportsIMR: boolean;\n webSupportsIMR: boolean;\n nodeSupportsFsPromises: boolean;\n}\n\nconst SUPPORT_CACHE = new WeakMap();\nexport default function getSupport(targets: Targets): Support {\n if (SUPPORT_CACHE.has(targets)) return SUPPORT_CACHE.get(targets);\n\n const { node: nodeTarget, ...webTargets } = targets;\n const emptyNodeTarget = nodeTarget == null;\n const emptyWebTargets = isEmpty(webTargets);\n const needsNodeSupport = !emptyNodeTarget || emptyWebTargets;\n const needsWebSupport = !emptyWebTargets || emptyNodeTarget;\n\n const webSupportsIMR =\n !emptyWebTargets && !isRequired(\"webIMR\", webTargets, isRequiredOptions);\n const nodeSupportsIMR =\n !emptyNodeTarget &&\n !isRequired(\"nodeIMR\", { node: nodeTarget }, isRequiredOptions);\n const nodeSupportsFsPromises =\n !emptyNodeTarget &&\n !isRequired(\"nodeFSP\", { node: nodeTarget }, isRequiredOptions);\n\n const result = {\n needsNodeSupport,\n needsWebSupport,\n nodeSupportsIMR,\n webSupportsIMR,\n nodeSupportsFsPromises,\n };\n SUPPORT_CACHE.set(targets, result);\n return result;\n}\n","import { types as t, template, type NodePath } from \"@babel/core\";\nimport type { Targets } from \"@babel/helper-compilation-targets\";\nimport { addNamed } from \"@babel/helper-module-imports\";\n\nimport getSupport from \"./platforms-support.ts\";\n\nfunction imp(path: NodePath, name: string, module: string) {\n return addNamed(path, name, module, { importedType: \"es6\" });\n}\n\nexport interface Pieces {\n commonJS?: (require: t.Expression, specifier: t.Expression) => t.Expression;\n webFetch: (fetch: t.Expression) => t.Expression;\n nodeFsSync: (read: t.Expression) => t.Expression;\n nodeFsAsync: () => t.Expression;\n}\n\nexport interface Builders {\n buildFetch: (specifier: t.Expression, path: NodePath) => t.Expression;\n buildFetchAsync: (specifier: t.Expression, path: NodePath) => t.Expression;\n needsAwait: boolean;\n}\n\nconst imr = (s: t.Expression) => template.expression.ast`\n import.meta.resolve(${s})\n`;\nconst imrWithFallback = (s: t.Expression) => template.expression.ast`\n import.meta.resolve?.(${s}) ?? new URL(${t.cloneNode(s)}, import.meta.url)\n`;\n\nexport function importToPlatformApi(\n targets: Targets,\n transformers: Pieces,\n toCommonJS: boolean,\n) {\n const {\n needsNodeSupport,\n needsWebSupport,\n nodeSupportsIMR,\n webSupportsIMR,\n nodeSupportsFsPromises,\n } = getSupport(targets);\n const supportIsomorphicCJS = transformers.commonJS != null;\n\n let buildFetchAsync: (\n specifier: t.Expression,\n path: NodePath,\n ) => t.Expression;\n let buildFetchSync: typeof buildFetchAsync;\n\n // \"p\" stands for pattern matching :)\n const p = ({\n web: w = needsWebSupport,\n node: n = needsNodeSupport,\n nodeFSP: nF = nodeSupportsFsPromises,\n webIMR: wI = webSupportsIMR,\n nodeIMR: nI = nodeSupportsIMR,\n toCJS: c = toCommonJS,\n supportIsomorphicCJS: iC = supportIsomorphicCJS,\n }: {\n web?: boolean;\n node?: boolean;\n nodeFSP?: boolean;\n webIMR?: boolean;\n nodeIMR?: boolean;\n toCJS?: boolean;\n supportIsomorphicCJS?: boolean;\n }) =>\n +w +\n (+n << 1) +\n (+wI << 2) +\n (+nI << 3) +\n (+c << 4) +\n (+nF << 5) +\n (+iC << 6);\n\n const readFileP = (fs: t.Expression, arg: t.Expression) => {\n if (nodeSupportsFsPromises) {\n return template.expression.ast`${fs}.promises.readFile(${arg})`;\n }\n return template.expression.ast`\n new Promise(\n (a =>\n (r, j) => ${fs}.readFile(a, (e, d) => e ? j(e) : r(d))\n )(${arg})\n )`;\n };\n\n switch (\n p({\n web: needsWebSupport,\n node: needsNodeSupport,\n webIMR: webSupportsIMR,\n nodeIMR: nodeSupportsIMR,\n toCJS: toCommonJS,\n })\n ) {\n case p({ toCJS: true, supportIsomorphicCJS: true }):\n buildFetchSync = specifier =>\n transformers.commonJS(t.identifier(\"require\"), specifier);\n break;\n case p({ web: true, node: true }):\n buildFetchAsync = specifier => {\n const web = transformers.webFetch(\n t.callExpression(t.identifier(\"fetch\"), [\n (webSupportsIMR ? imr : imrWithFallback)(t.cloneNode(specifier)),\n ]),\n );\n const node = supportIsomorphicCJS\n ? template.expression.ast`\n import(\"module\").then(module => ${transformers.commonJS(\n template.expression.ast`module.createRequire(import.meta.url)`,\n specifier,\n )})\n `\n : nodeSupportsIMR\n ? template.expression.ast`\n import(\"fs\").then(\n fs => ${readFileP(\n t.identifier(\"fs\"),\n template.expression.ast`new URL(${imr(specifier)})`,\n )}\n ).then(${transformers.nodeFsAsync()})\n `\n : template.expression.ast`\n Promise.all([import(\"fs\"), import(\"module\")])\n .then(([fs, module]) =>\n ${readFileP(\n t.identifier(\"fs\"),\n template.expression.ast`\n module.createRequire(import.meta.url).resolve(${specifier})\n `,\n )}\n )\n .then(${transformers.nodeFsAsync()})\n `;\n\n return template.expression.ast`\n typeof process === \"object\" && process.versions?.node\n ? ${node}\n : ${web}\n `;\n };\n break;\n case p({ web: true, node: false, webIMR: true }):\n buildFetchAsync = specifier =>\n transformers.webFetch(\n t.callExpression(t.identifier(\"fetch\"), [imr(specifier)]),\n );\n break;\n case p({ web: true, node: false, webIMR: false }):\n buildFetchAsync = specifier =>\n transformers.webFetch(\n t.callExpression(t.identifier(\"fetch\"), [imrWithFallback(specifier)]),\n );\n break;\n case p({ web: false, node: true, toCJS: true }):\n buildFetchSync = specifier =>\n transformers.nodeFsSync(template.expression.ast`\n require(\"fs\").readFileSync(require.resolve(${specifier}))\n `);\n buildFetchAsync = specifier => template.expression.ast`\n require(\"fs\").promises.readFile(require.resolve(${specifier}))\n .then(${transformers.nodeFsAsync()})\n `;\n break;\n case p({\n web: false,\n node: true,\n toCJS: false,\n supportIsomorphicCJS: true,\n }):\n buildFetchSync = (specifier, path) =>\n transformers.commonJS(\n template.expression.ast`\n ${imp(path, \"createRequire\", \"module\")}(import.meta.url)\n `,\n specifier,\n );\n break;\n case p({ web: false, node: true, toCJS: false, nodeIMR: true }):\n buildFetchSync = (specifier, path) =>\n transformers.nodeFsSync(template.expression.ast`\n ${imp(path, \"readFileSync\", \"fs\")}(\n new URL(${imr(specifier)})\n )\n `);\n buildFetchAsync = (specifier, path) =>\n template.expression.ast`\n ${imp(path, \"promises\", \"fs\")}\n .readFile(new URL(${imr(specifier)}))\n .then(${transformers.nodeFsAsync()})\n `;\n break;\n case p({ web: false, node: true, toCJS: false, nodeIMR: false }):\n buildFetchSync = (specifier, path) =>\n transformers.nodeFsSync(template.expression.ast`\n ${imp(path, \"readFileSync\", \"fs\")}(\n ${imp(path, \"createRequire\", \"module\")}(import.meta.url)\n .resolve(${specifier})\n )\n `);\n buildFetchAsync = (specifier, path) =>\n transformers.webFetch(template.expression.ast`\n ${imp(path, \"promises\", \"fs\")}\n .readFile(\n ${imp(path, \"createRequire\", \"module\")}(import.meta.url)\n .resolve(${specifier})\n )\n `);\n break;\n default:\n throw new Error(\"Internal Babel error: unreachable code.\");\n }\n\n buildFetchAsync ??= buildFetchSync;\n const buildFetchAsyncWrapped: typeof buildFetchAsync = (expression, path) => {\n if (t.isStringLiteral(expression)) {\n return template.expression.ast`\n Promise.resolve().then(() => ${buildFetchAsync(expression, path)})\n `;\n } else {\n return template.expression.ast`\n Promise.resolve(\\`\\${${expression}}\\`).then((s) => ${buildFetchAsync(\n t.identifier(\"s\"),\n path,\n )})\n `;\n }\n };\n\n let buildFetch = buildFetchSync;\n if (!buildFetchSync) {\n if (toCommonJS) {\n buildFetch = (specifier, path) => {\n throw path.buildCodeFrameError(\n \"Cannot compile to CommonJS, since it would require top-level await.\",\n );\n };\n } else {\n buildFetch = buildFetchAsync;\n }\n }\n\n return {\n buildFetch,\n buildFetchAsync: buildFetchAsyncWrapped,\n needsAwait: !buildFetchSync,\n };\n}\n\nexport function buildParallelStaticImports(\n data: Array<{ id: t.Identifier; fetch: t.Expression }>,\n needsAwait: boolean,\n): t.VariableDeclaration | null {\n if (data.length === 0) return null;\n\n const declarators: t.VariableDeclarator[] = [];\n\n if (data.length === 1) {\n let rhs = data[0].fetch;\n if (needsAwait) rhs = t.awaitExpression(rhs);\n declarators.push(t.variableDeclarator(data[0].id, rhs));\n } else if (needsAwait) {\n const ids = data.map(({ id }) => id);\n const fetches = data.map(({ fetch }) => fetch);\n declarators.push(\n t.variableDeclarator(\n t.arrayPattern(ids),\n t.awaitExpression(\n template.expression.ast`\n Promise.all(${t.arrayExpression(fetches)})\n `,\n ),\n ),\n );\n } else {\n for (const { id, fetch } of data) {\n declarators.push(t.variableDeclarator(id, fetch));\n }\n }\n\n return t.variableDeclaration(\"const\", declarators);\n}\n","import { declare } from \"@babel/helper-plugin-utils\";\nimport type { types as t, File } from \"@babel/core\";\nimport syntaxImportAttributes from \"@babel/plugin-syntax-import-attributes\";\nimport {\n importToPlatformApi,\n buildParallelStaticImports,\n type Pieces,\n type Builders,\n} from \"@babel/helper-import-to-platform-api\";\n\nexport interface Options {\n uncheckedRequire: boolean;\n}\n\nexport default declare((api, options: Options) => {\n const { types: t, template } = api;\n api.assertVersion(REQUIRED_VERSION(\"^7.22.0\"));\n\n const targets = api.targets();\n\n let helperESM: Builders;\n let helperCJS: Builders;\n\n const transformers: Pieces = {\n commonJS: options.uncheckedRequire\n ? (require: t.Expression, specifier: t.Expression) =>\n t.callExpression(require, [specifier])\n : null,\n webFetch: (fetch: t.Expression) =>\n template.expression.ast`${fetch}.then(r => r.json())`,\n nodeFsSync: (read: t.Expression) =>\n template.expression.ast`JSON.parse(${read})`,\n nodeFsAsync: () => template.expression.ast`JSON.parse`,\n };\n\n const getHelper = (file: File) => {\n const modules = file.get(\"@babel/plugin-transform-modules-*\");\n if (modules === \"commonjs\") {\n return (helperCJS ??= importToPlatformApi(targets, transformers, true));\n }\n if (modules == null) {\n return (helperESM ??= importToPlatformApi(targets, transformers, false));\n }\n throw new Error(\n `@babel/plugin-proposal-json-modules can only be used when not ` +\n `compiling modules, or when compiling them to CommonJS.`,\n );\n };\n\n function getAttributeKey({ key }: t.ImportAttribute): string {\n return t.isIdentifier(key) ? key.name : key.value;\n }\n\n function hasTypeJson(attributes: t.ImportAttribute[]) {\n return !!attributes?.some(\n attr => getAttributeKey(attr) === \"type\" && attr.value.value === \"json\",\n );\n }\n\n return {\n name: \"proposal-json-modules\",\n\n inherits: syntaxImportAttributes,\n\n visitor: {\n Program(path) {\n if (path.node.sourceType !== \"module\") return;\n\n const helper = getHelper(this.file);\n\n const data = [];\n for (const decl of path.get(\"body\")) {\n if (!decl.isImportDeclaration()) continue;\n const attributes = decl.node.attributes || decl.node.assertions;\n if (!hasTypeJson(attributes)) continue;\n\n if (decl.node.phase != null) {\n throw decl.buildCodeFrameError(\n \"JSON modules do not support phase modifiers.\",\n );\n }\n if (attributes.length > 1) {\n const paths = decl.node.attributes\n ? decl.get(\"attributes\")\n : decl.get(\"assertions\");\n const index = getAttributeKey(attributes[0]) === \"type\" ? 1 : 0;\n throw paths[index].buildCodeFrameError(\n \"Unknown attribute for JSON modules.\",\n );\n }\n\n let id: t.Identifier;\n let needsNS = false;\n for (const specifier of decl.get(\"specifiers\")) {\n if (specifier.isImportSpecifier()) {\n throw specifier.buildCodeFrameError(\n \"JSON modules do not support named imports.\",\n );\n }\n\n id = specifier.node.local;\n needsNS = specifier.isImportNamespaceSpecifier();\n }\n id ??= path.scope.generateUidIdentifier(\"_\");\n\n let fetch = helper.buildFetch(decl.node.source, path);\n\n if (needsNS) {\n if (helper.needsAwait) {\n fetch = template.expression.ast`\n ${fetch}.then(j => ({ default: j }))\n `;\n } else {\n fetch = template.expression.ast`{ default: ${fetch} }`;\n }\n }\n\n data.push({ id, fetch });\n decl.remove();\n }\n if (data.length === 0) return;\n\n const decl = buildParallelStaticImports(data, helper.needsAwait);\n if (decl) path.unshiftContainer(\"body\", decl);\n },\n },\n };\n});\n","/*\n * This file is auto-generated! Do not modify it directly.\n * To re-generate run 'yarn gulp generate-standalone'\n */\nimport makeNoopPlugin from \"../make-noop-plugin.ts\";\nimport externalHelpers from \"@babel/plugin-external-helpers\";\nimport syntaxDecimal from \"@babel/plugin-syntax-decimal\";\nimport syntaxDecorators from \"@babel/plugin-syntax-decorators\";\nimport syntaxDestructuringPrivate from \"@babel/plugin-syntax-destructuring-private\";\nimport syntaxDoExpressions from \"@babel/plugin-syntax-do-expressions\";\nimport syntaxExplicitResourceManagement from \"@babel/plugin-syntax-explicit-resource-management\";\nimport syntaxExportDefaultFrom from \"@babel/plugin-syntax-export-default-from\";\nimport syntaxFlow from \"@babel/plugin-syntax-flow\";\nimport syntaxFunctionBind from \"@babel/plugin-syntax-function-bind\";\nimport syntaxFunctionSent from \"@babel/plugin-syntax-function-sent\";\nimport syntaxImportAssertions from \"@babel/plugin-syntax-import-assertions\";\nimport syntaxImportAttributes from \"@babel/plugin-syntax-import-attributes\";\nimport syntaxImportReflection from \"@babel/plugin-syntax-import-reflection\";\nimport syntaxJsx from \"@babel/plugin-syntax-jsx\";\nimport syntaxModuleBlocks from \"@babel/plugin-syntax-module-blocks\";\nimport syntaxOptionalChainingAssign from \"@babel/plugin-syntax-optional-chaining-assign\";\nimport syntaxPipelineOperator from \"@babel/plugin-syntax-pipeline-operator\";\nimport syntaxRecordAndTuple from \"@babel/plugin-syntax-record-and-tuple\";\nimport syntaxTypescript from \"@babel/plugin-syntax-typescript\";\nimport transformAsyncGeneratorFunctions from \"@babel/plugin-transform-async-generator-functions\";\nimport transformClassProperties from \"@babel/plugin-transform-class-properties\";\nimport transformClassStaticBlock from \"@babel/plugin-transform-class-static-block\";\nimport proposalDecorators from \"@babel/plugin-proposal-decorators\";\nimport proposalDestructuringPrivate from \"@babel/plugin-proposal-destructuring-private\";\nimport proposalDoExpressions from \"@babel/plugin-proposal-do-expressions\";\nimport transformDuplicateNamedCapturingGroupsRegex from \"@babel/plugin-transform-duplicate-named-capturing-groups-regex\";\nimport transformDynamicImport from \"@babel/plugin-transform-dynamic-import\";\nimport proposalExportDefaultFrom from \"@babel/plugin-proposal-export-default-from\";\nimport transformExportNamespaceFrom from \"@babel/plugin-transform-export-namespace-from\";\nimport proposalFunctionBind from \"@babel/plugin-proposal-function-bind\";\nimport proposalFunctionSent from \"@babel/plugin-proposal-function-sent\";\nimport transformJsonStrings from \"@babel/plugin-transform-json-strings\";\nimport transformLogicalAssignmentOperators from \"@babel/plugin-transform-logical-assignment-operators\";\nimport transformNullishCoalescingOperator from \"@babel/plugin-transform-nullish-coalescing-operator\";\nimport transformNumericSeparator from \"@babel/plugin-transform-numeric-separator\";\nimport transformObjectRestSpread from \"@babel/plugin-transform-object-rest-spread\";\nimport transformOptionalCatchBinding from \"@babel/plugin-transform-optional-catch-binding\";\nimport transformOptionalChaining from \"@babel/plugin-transform-optional-chaining\";\nimport proposalOptionalChainingAssign from \"@babel/plugin-proposal-optional-chaining-assign\";\nimport proposalPipelineOperator from \"@babel/plugin-proposal-pipeline-operator\";\nimport transformPrivateMethods from \"@babel/plugin-transform-private-methods\";\nimport transformPrivatePropertyInObject from \"@babel/plugin-transform-private-property-in-object\";\nimport proposalRecordAndTuple from \"@babel/plugin-proposal-record-and-tuple\";\nimport proposalRegexpModifiers from \"@babel/plugin-proposal-regexp-modifiers\";\nimport proposalThrowExpressions from \"@babel/plugin-proposal-throw-expressions\";\nimport transformUnicodePropertyRegex from \"@babel/plugin-transform-unicode-property-regex\";\nimport transformUnicodeSetsRegex from \"@babel/plugin-transform-unicode-sets-regex\";\nimport transformAsyncToGenerator from \"@babel/plugin-transform-async-to-generator\";\nimport transformArrowFunctions from \"@babel/plugin-transform-arrow-functions\";\nimport transformBlockScopedFunctions from \"@babel/plugin-transform-block-scoped-functions\";\nimport transformBlockScoping from \"@babel/plugin-transform-block-scoping\";\nimport transformClasses from \"@babel/plugin-transform-classes\";\nimport transformComputedProperties from \"@babel/plugin-transform-computed-properties\";\nimport transformDestructuring from \"@babel/plugin-transform-destructuring\";\nimport transformDotallRegex from \"@babel/plugin-transform-dotall-regex\";\nimport transformDuplicateKeys from \"@babel/plugin-transform-duplicate-keys\";\nimport transformExponentiationOperator from \"@babel/plugin-transform-exponentiation-operator\";\nimport transformFlowComments from \"@babel/plugin-transform-flow-comments\";\nimport transformFlowStripTypes from \"@babel/plugin-transform-flow-strip-types\";\nimport transformForOf from \"@babel/plugin-transform-for-of\";\nimport transformFunctionName from \"@babel/plugin-transform-function-name\";\nimport transformInstanceof from \"@babel/plugin-transform-instanceof\";\nimport transformJscript from \"@babel/plugin-transform-jscript\";\nimport transformLiterals from \"@babel/plugin-transform-literals\";\nimport transformMemberExpressionLiterals from \"@babel/plugin-transform-member-expression-literals\";\nimport transformModulesAmd from \"@babel/plugin-transform-modules-amd\";\nimport transformModulesCommonjs from \"@babel/plugin-transform-modules-commonjs\";\nimport transformModulesSystemjs from \"@babel/plugin-transform-modules-systemjs\";\nimport transformModulesUmd from \"@babel/plugin-transform-modules-umd\";\nimport transformNamedCapturingGroupsRegex from \"@babel/plugin-transform-named-capturing-groups-regex\";\nimport transformNewTarget from \"@babel/plugin-transform-new-target\";\nimport transformObjectAssign from \"@babel/plugin-transform-object-assign\";\nimport transformObjectSuper from \"@babel/plugin-transform-object-super\";\nimport transformObjectSetPrototypeOfToAssign from \"@babel/plugin-transform-object-set-prototype-of-to-assign\";\nimport transformParameters from \"@babel/plugin-transform-parameters\";\nimport transformPropertyLiterals from \"@babel/plugin-transform-property-literals\";\nimport transformPropertyMutators from \"@babel/plugin-transform-property-mutators\";\nimport transformProtoToAssign from \"@babel/plugin-transform-proto-to-assign\";\nimport transformReactConstantElements from \"@babel/plugin-transform-react-constant-elements\";\nimport transformReactDisplayName from \"@babel/plugin-transform-react-display-name\";\nimport transformReactInlineElements from \"@babel/plugin-transform-react-inline-elements\";\nimport transformReactJsx from \"@babel/plugin-transform-react-jsx\";\nimport transformReactJsxCompat from \"@babel/plugin-transform-react-jsx-compat\";\nimport transformReactJsxDevelopment from \"@babel/plugin-transform-react-jsx-development\";\nimport transformReactJsxSelf from \"@babel/plugin-transform-react-jsx-self\";\nimport transformReactJsxSource from \"@babel/plugin-transform-react-jsx-source\";\nimport transformRegenerator from \"@babel/plugin-transform-regenerator\";\nimport transformReservedWords from \"@babel/plugin-transform-reserved-words\";\nimport transformRuntime from \"@babel/plugin-transform-runtime\";\nimport transformShorthandProperties from \"@babel/plugin-transform-shorthand-properties\";\nimport transformSpread from \"@babel/plugin-transform-spread\";\nimport transformStickyRegex from \"@babel/plugin-transform-sticky-regex\";\nimport transformStrictMode from \"@babel/plugin-transform-strict-mode\";\nimport transformTemplateLiterals from \"@babel/plugin-transform-template-literals\";\nimport transformTypeofSymbol from \"@babel/plugin-transform-typeof-symbol\";\nimport transformTypescript from \"@babel/plugin-transform-typescript\";\nimport transformUnicodeEscapes from \"@babel/plugin-transform-unicode-escapes\";\nimport transformUnicodeRegex from \"@babel/plugin-transform-unicode-regex\";\nimport proposalExplicitResourceManagement from \"@babel/plugin-proposal-explicit-resource-management\";\nimport proposalImportDefer from \"@babel/plugin-proposal-import-defer\";\nimport proposalJsonModules from \"@babel/plugin-proposal-json-modules\";\nexport const syntaxAsyncGenerators = makeNoopPlugin(),\n syntaxClassProperties = makeNoopPlugin(),\n syntaxClassStaticBlock = makeNoopPlugin(),\n syntaxImportMeta = makeNoopPlugin(),\n syntaxObjectRestSpread = makeNoopPlugin(),\n syntaxOptionalCatchBinding = makeNoopPlugin(),\n syntaxTopLevelAwait = makeNoopPlugin();\nexport {\n externalHelpers,\n syntaxDecimal,\n syntaxDecorators,\n syntaxDestructuringPrivate,\n syntaxDoExpressions,\n syntaxExplicitResourceManagement,\n syntaxExportDefaultFrom,\n syntaxFlow,\n syntaxFunctionBind,\n syntaxFunctionSent,\n syntaxImportAssertions,\n syntaxImportAttributes,\n syntaxImportReflection,\n syntaxJsx,\n syntaxModuleBlocks,\n syntaxOptionalChainingAssign,\n syntaxPipelineOperator,\n syntaxRecordAndTuple,\n syntaxTypescript,\n transformAsyncGeneratorFunctions,\n transformClassProperties,\n transformClassStaticBlock,\n proposalDecorators,\n proposalDestructuringPrivate,\n proposalDoExpressions,\n transformDuplicateNamedCapturingGroupsRegex,\n transformDynamicImport,\n proposalExportDefaultFrom,\n transformExportNamespaceFrom,\n proposalFunctionBind,\n proposalFunctionSent,\n transformJsonStrings,\n transformLogicalAssignmentOperators,\n transformNullishCoalescingOperator,\n transformNumericSeparator,\n transformObjectRestSpread,\n transformOptionalCatchBinding,\n transformOptionalChaining,\n proposalOptionalChainingAssign,\n proposalPipelineOperator,\n transformPrivateMethods,\n transformPrivatePropertyInObject,\n proposalRecordAndTuple,\n proposalRegexpModifiers,\n proposalThrowExpressions,\n transformUnicodePropertyRegex,\n transformUnicodeSetsRegex,\n transformAsyncToGenerator,\n transformArrowFunctions,\n transformBlockScopedFunctions,\n transformBlockScoping,\n transformClasses,\n transformComputedProperties,\n transformDestructuring,\n transformDotallRegex,\n transformDuplicateKeys,\n transformExponentiationOperator,\n transformFlowComments,\n transformFlowStripTypes,\n transformForOf,\n transformFunctionName,\n transformInstanceof,\n transformJscript,\n transformLiterals,\n transformMemberExpressionLiterals,\n transformModulesAmd,\n transformModulesCommonjs,\n transformModulesSystemjs,\n transformModulesUmd,\n transformNamedCapturingGroupsRegex,\n transformNewTarget,\n transformObjectAssign,\n transformObjectSuper,\n transformObjectSetPrototypeOfToAssign,\n transformParameters,\n transformPropertyLiterals,\n transformPropertyMutators,\n transformProtoToAssign,\n transformReactConstantElements,\n transformReactDisplayName,\n transformReactInlineElements,\n transformReactJsx,\n transformReactJsxCompat,\n transformReactJsxDevelopment,\n transformReactJsxSelf,\n transformReactJsxSource,\n transformRegenerator,\n transformReservedWords,\n transformRuntime,\n transformShorthandProperties,\n transformSpread,\n transformStickyRegex,\n transformStrictMode,\n transformTemplateLiterals,\n transformTypeofSymbol,\n transformTypescript,\n transformUnicodeEscapes,\n transformUnicodeRegex,\n proposalExplicitResourceManagement,\n proposalImportDefer,\n proposalJsonModules,\n};\nexport const all: { [k: string]: any } = {\n \"syntax-async-generators\": syntaxAsyncGenerators,\n \"syntax-class-properties\": syntaxClassProperties,\n \"syntax-class-static-block\": syntaxClassStaticBlock,\n \"syntax-import-meta\": syntaxImportMeta,\n \"syntax-object-rest-spread\": syntaxObjectRestSpread,\n \"syntax-optional-catch-binding\": syntaxOptionalCatchBinding,\n \"syntax-top-level-await\": syntaxTopLevelAwait,\n \"external-helpers\": externalHelpers,\n \"syntax-decimal\": syntaxDecimal,\n \"syntax-decorators\": syntaxDecorators,\n \"syntax-destructuring-private\": syntaxDestructuringPrivate,\n \"syntax-do-expressions\": syntaxDoExpressions,\n \"syntax-explicit-resource-management\": syntaxExplicitResourceManagement,\n \"syntax-export-default-from\": syntaxExportDefaultFrom,\n \"syntax-flow\": syntaxFlow,\n \"syntax-function-bind\": syntaxFunctionBind,\n \"syntax-function-sent\": syntaxFunctionSent,\n \"syntax-import-assertions\": syntaxImportAssertions,\n \"syntax-import-attributes\": syntaxImportAttributes,\n \"syntax-import-reflection\": syntaxImportReflection,\n \"syntax-jsx\": syntaxJsx,\n \"syntax-module-blocks\": syntaxModuleBlocks,\n \"syntax-optional-chaining-assign\": syntaxOptionalChainingAssign,\n \"syntax-pipeline-operator\": syntaxPipelineOperator,\n \"syntax-record-and-tuple\": syntaxRecordAndTuple,\n \"syntax-typescript\": syntaxTypescript,\n \"transform-async-generator-functions\": transformAsyncGeneratorFunctions,\n \"transform-class-properties\": transformClassProperties,\n \"transform-class-static-block\": transformClassStaticBlock,\n \"proposal-decorators\": proposalDecorators,\n \"proposal-destructuring-private\": proposalDestructuringPrivate,\n \"proposal-do-expressions\": proposalDoExpressions,\n \"transform-duplicate-named-capturing-groups-regex\":\n transformDuplicateNamedCapturingGroupsRegex,\n \"transform-dynamic-import\": transformDynamicImport,\n \"proposal-export-default-from\": proposalExportDefaultFrom,\n \"transform-export-namespace-from\": transformExportNamespaceFrom,\n \"proposal-function-bind\": proposalFunctionBind,\n \"proposal-function-sent\": proposalFunctionSent,\n \"transform-json-strings\": transformJsonStrings,\n \"transform-logical-assignment-operators\": transformLogicalAssignmentOperators,\n \"transform-nullish-coalescing-operator\": transformNullishCoalescingOperator,\n \"transform-numeric-separator\": transformNumericSeparator,\n \"transform-object-rest-spread\": transformObjectRestSpread,\n \"transform-optional-catch-binding\": transformOptionalCatchBinding,\n \"transform-optional-chaining\": transformOptionalChaining,\n \"proposal-optional-chaining-assign\": proposalOptionalChainingAssign,\n \"proposal-pipeline-operator\": proposalPipelineOperator,\n \"transform-private-methods\": transformPrivateMethods,\n \"transform-private-property-in-object\": transformPrivatePropertyInObject,\n \"proposal-record-and-tuple\": proposalRecordAndTuple,\n \"proposal-regexp-modifiers\": proposalRegexpModifiers,\n \"proposal-throw-expressions\": proposalThrowExpressions,\n \"transform-unicode-property-regex\": transformUnicodePropertyRegex,\n \"transform-unicode-sets-regex\": transformUnicodeSetsRegex,\n \"transform-async-to-generator\": transformAsyncToGenerator,\n \"transform-arrow-functions\": transformArrowFunctions,\n \"transform-block-scoped-functions\": transformBlockScopedFunctions,\n \"transform-block-scoping\": transformBlockScoping,\n \"transform-classes\": transformClasses,\n \"transform-computed-properties\": transformComputedProperties,\n \"transform-destructuring\": transformDestructuring,\n \"transform-dotall-regex\": transformDotallRegex,\n \"transform-duplicate-keys\": transformDuplicateKeys,\n \"transform-exponentiation-operator\": transformExponentiationOperator,\n \"transform-flow-comments\": transformFlowComments,\n \"transform-flow-strip-types\": transformFlowStripTypes,\n \"transform-for-of\": transformForOf,\n \"transform-function-name\": transformFunctionName,\n \"transform-instanceof\": transformInstanceof,\n \"transform-jscript\": transformJscript,\n \"transform-literals\": transformLiterals,\n \"transform-member-expression-literals\": transformMemberExpressionLiterals,\n \"transform-modules-amd\": transformModulesAmd,\n \"transform-modules-commonjs\": transformModulesCommonjs,\n \"transform-modules-systemjs\": transformModulesSystemjs,\n \"transform-modules-umd\": transformModulesUmd,\n \"transform-named-capturing-groups-regex\": transformNamedCapturingGroupsRegex,\n \"transform-new-target\": transformNewTarget,\n \"transform-object-assign\": transformObjectAssign,\n \"transform-object-super\": transformObjectSuper,\n \"transform-object-set-prototype-of-to-assign\":\n transformObjectSetPrototypeOfToAssign,\n \"transform-parameters\": transformParameters,\n \"transform-property-literals\": transformPropertyLiterals,\n \"transform-property-mutators\": transformPropertyMutators,\n \"transform-proto-to-assign\": transformProtoToAssign,\n \"transform-react-constant-elements\": transformReactConstantElements,\n \"transform-react-display-name\": transformReactDisplayName,\n \"transform-react-inline-elements\": transformReactInlineElements,\n \"transform-react-jsx\": transformReactJsx,\n \"transform-react-jsx-compat\": transformReactJsxCompat,\n \"transform-react-jsx-development\": transformReactJsxDevelopment,\n \"transform-react-jsx-self\": transformReactJsxSelf,\n \"transform-react-jsx-source\": transformReactJsxSource,\n \"transform-regenerator\": transformRegenerator,\n \"transform-reserved-words\": transformReservedWords,\n \"transform-runtime\": transformRuntime,\n \"transform-shorthand-properties\": transformShorthandProperties,\n \"transform-spread\": transformSpread,\n \"transform-sticky-regex\": transformStickyRegex,\n \"transform-strict-mode\": transformStrictMode,\n \"transform-template-literals\": transformTemplateLiterals,\n \"transform-typeof-symbol\": transformTypeofSymbol,\n \"transform-typescript\": transformTypescript,\n \"transform-unicode-escapes\": transformUnicodeEscapes,\n \"transform-unicode-regex\": transformUnicodeRegex,\n \"proposal-explicit-resource-management\": proposalExplicitResourceManagement,\n \"proposal-import-defer\": proposalImportDefer,\n \"proposal-json-modules\": proposalJsonModules,\n};\n","import * as babelPlugins from \"./generated/plugins.ts\";\n\nexport default (_: any, opts: any): any => {\n let loose = false;\n let modules = \"commonjs\";\n let spec = false;\n\n if (opts !== undefined) {\n if (opts.loose !== undefined) loose = opts.loose;\n if (opts.modules !== undefined) modules = opts.modules;\n if (opts.spec !== undefined) spec = opts.spec;\n }\n\n // be DRY\n const optsLoose = { loose };\n\n return {\n plugins: [\n [babelPlugins.transformTemplateLiterals, { loose, spec }],\n babelPlugins.transformLiterals,\n babelPlugins.transformFunctionName,\n [babelPlugins.transformArrowFunctions, { spec }],\n babelPlugins.transformBlockScopedFunctions,\n [babelPlugins.transformClasses, optsLoose],\n babelPlugins.transformObjectSuper,\n babelPlugins.transformShorthandProperties,\n babelPlugins.transformDuplicateKeys,\n [babelPlugins.transformComputedProperties, optsLoose],\n [babelPlugins.transformForOf, optsLoose],\n babelPlugins.transformStickyRegex,\n babelPlugins.transformUnicodeEscapes,\n babelPlugins.transformUnicodeRegex,\n [babelPlugins.transformSpread, optsLoose],\n [babelPlugins.transformParameters, optsLoose],\n [babelPlugins.transformDestructuring, optsLoose],\n babelPlugins.transformBlockScoping,\n babelPlugins.transformTypeofSymbol,\n babelPlugins.transformInstanceof,\n (modules === \"commonjs\" || modules === \"cjs\") && [\n babelPlugins.transformModulesCommonjs,\n optsLoose,\n ],\n modules === \"systemjs\" && [\n babelPlugins.transformModulesSystemjs,\n optsLoose,\n ],\n modules === \"amd\" && [babelPlugins.transformModulesAmd, optsLoose],\n modules === \"umd\" && [babelPlugins.transformModulesUmd, optsLoose],\n [\n babelPlugins.transformRegenerator,\n { async: false, asyncGenerators: false },\n ],\n ].filter(Boolean), // filter out falsy values\n };\n};\n","import * as babelPlugins from \"./generated/plugins.ts\";\n\nexport default (_: any, opts: any = {}) => {\n const {\n loose = false,\n decoratorsLegacy = false,\n decoratorsVersion = \"2018-09\",\n decoratorsBeforeExport,\n } = opts;\n\n const plugins = [\n [babelPlugins.syntaxImportAttributes, { deprecatedAssertSyntax: true }],\n [\n babelPlugins.proposalDecorators,\n {\n version: decoratorsLegacy ? \"legacy\" : decoratorsVersion,\n decoratorsBeforeExport,\n },\n ],\n babelPlugins.proposalRegexpModifiers,\n babelPlugins.proposalExplicitResourceManagement,\n babelPlugins.proposalJsonModules,\n // These are Stage 4\n ...(process.env.BABEL_8_BREAKING\n ? []\n : [\n babelPlugins.transformExportNamespaceFrom,\n babelPlugins.transformLogicalAssignmentOperators,\n [babelPlugins.transformOptionalChaining, { loose }],\n [babelPlugins.transformNullishCoalescingOperator, { loose }],\n [babelPlugins.transformClassProperties, { loose }],\n babelPlugins.transformJsonStrings,\n babelPlugins.transformNumericSeparator,\n [babelPlugins.transformPrivateMethods, { loose }],\n babelPlugins.transformPrivatePropertyInObject,\n babelPlugins.transformClassStaticBlock,\n babelPlugins.transformUnicodeSetsRegex,\n babelPlugins.transformDuplicateNamedCapturingGroupsRegex,\n ]),\n ];\n\n return { plugins };\n};\n","import presetStage3 from \"./preset-stage-3.ts\";\nimport * as babelPlugins from \"./generated/plugins.ts\";\n\nexport default (_: any, opts: any = {}) => {\n const { pipelineProposal = \"minimal\", pipelineTopicToken = \"%\" } = opts;\n\n return {\n presets: [[presetStage3, opts]],\n plugins: [\n babelPlugins.proposalDestructuringPrivate,\n [\n babelPlugins.proposalPipelineOperator,\n { proposal: pipelineProposal, topicToken: pipelineTopicToken },\n ],\n babelPlugins.proposalFunctionSent,\n babelPlugins.proposalThrowExpressions,\n process.env.BABEL_8_BREAKING\n ? babelPlugins.proposalRecordAndTuple\n : [\n babelPlugins.proposalRecordAndTuple,\n { syntaxType: opts.recordAndTupleSyntax ?? \"hash\" },\n ],\n babelPlugins.syntaxModuleBlocks,\n babelPlugins.syntaxImportReflection,\n ],\n };\n};\n","import presetStage2 from \"./preset-stage-2.ts\";\nimport * as babelPlugins from \"./generated/plugins.ts\";\n\nexport default (_: any, opts: any = {}) => {\n const {\n loose = false,\n useBuiltIns = false,\n decoratorsLegacy,\n decoratorsVersion,\n decoratorsBeforeExport,\n pipelineProposal,\n pipelineTopicToken,\n optionalChainingAssignVersion = \"2023-07\",\n } = opts;\n\n return {\n presets: [\n [\n presetStage2,\n process.env.BABEL_8_BREAKING\n ? {\n loose,\n useBuiltIns,\n decoratorsLegacy,\n decoratorsVersion,\n decoratorsBeforeExport,\n pipelineProposal,\n pipelineTopicToken,\n }\n : {\n loose,\n useBuiltIns,\n decoratorsLegacy,\n decoratorsVersion,\n decoratorsBeforeExport,\n pipelineProposal,\n pipelineTopicToken,\n recordAndTupleSyntax: opts.recordAndTupleSyntax,\n },\n ],\n ],\n plugins: [\n babelPlugins.syntaxDecimal,\n babelPlugins.proposalExportDefaultFrom,\n babelPlugins.proposalDoExpressions,\n [\n babelPlugins.proposalOptionalChainingAssign,\n { version: optionalChainingAssignVersion },\n ],\n ],\n };\n};\n","import presetStage1 from \"./preset-stage-1.ts\";\nimport { proposalFunctionBind } from \"./generated/plugins.ts\";\n\nexport default (_: any, opts: any = {}) => {\n const {\n loose = false,\n useBuiltIns = false,\n decoratorsLegacy,\n decoratorsVersion,\n decoratorsBeforeExport,\n pipelineProposal,\n pipelineTopicToken,\n } = opts;\n\n return {\n presets: [\n [\n presetStage1,\n {\n loose,\n useBuiltIns,\n decoratorsLegacy,\n decoratorsVersion,\n decoratorsBeforeExport,\n pipelineProposal,\n pipelineTopicToken,\n },\n ],\n ],\n plugins: [proposalFunctionBind],\n };\n};\n","// env vars from the cli are always strings, so !!ENV_VAR returns true for \"false\"\nfunction bool(value) {\n if (value == null) return false;\n return value && value !== \"false\" && value !== \"0\";\n}\n\nmodule.exports = bool(process.env[\"BABEL_8_BREAKING\"])\n ? require(\"semver-BABEL_8_BREAKING-true\")\n : require(\"semver-BABEL_8_BREAKING-false\");\n","import {\n getInclusionReasons,\n type Targets,\n type Target,\n} from \"@babel/helper-compilation-targets\";\nimport compatData from \"@babel/compat-data/plugins\";\n\n// Outputs a message that shows which target(s) caused an item to be included:\n// transform-foo { \"edge\":\"13\", \"firefox\":\"49\", \"ie\":\"10\" }\nexport const logPlugin = (\n item: string,\n targetVersions: Targets,\n list: { [key: string]: Targets },\n) => {\n const filteredList = getInclusionReasons(item, targetVersions, list);\n\n const support = list[item];\n\n if (!process.env.BABEL_8_BREAKING) {\n // It's needed to keep outputting proposal- in the debug log.\n if (item.startsWith(\"transform-\")) {\n const proposalName = `proposal-${item.slice(10)}`;\n if (\n proposalName === \"proposal-dynamic-import\" ||\n Object.hasOwn(compatData, proposalName)\n ) {\n item = proposalName;\n }\n }\n }\n\n if (!support) {\n console.log(` ${item}`);\n return;\n }\n\n let formattedTargets = `{`;\n let first = true;\n for (const target of Object.keys(filteredList) as Target[]) {\n if (!first) formattedTargets += `,`;\n first = false;\n formattedTargets += ` ${target}`;\n if (support[target]) formattedTargets += ` < ${support[target]}`;\n }\n formattedTargets += ` }`;\n\n console.log(` ${item} ${formattedTargets}`);\n};\n","\"use strict\";\n\nexports.__esModule = true;\nexports.default = void 0;\n\n/**\n * Safari 10.3 had an issue where async arrow function expressions within any class method would throw.\n * After an initial fix, any references to the instance via `this` within those methods would also throw.\n * This is fixed by converting arrow functions in class methods into equivalent function expressions.\n * @see https://bugs.webkit.org/show_bug.cgi?id=166879\n *\n * @example\n * class X{ a(){ async () => {}; } } // throws\n * class X{ a(){ async function() {}; } } // works\n *\n * @example\n * class X{ a(){\n * async () => this.a; // throws\n * } }\n * class X{ a(){\n * var _this=this;\n * async function() { return _this.a }; // works\n * } }\n */\nconst OPTS = {\n allowInsertArrow: false,\n specCompliant: false\n};\n\nvar _default = ({\n types: t\n}) => ({\n name: \"transform-async-arrows-in-class\",\n visitor: {\n ArrowFunctionExpression(path) {\n if (path.node.async && path.findParent(t.isClassMethod)) {\n path.arrowFunctionToExpression(OPTS);\n }\n }\n\n }\n});\n\nexports.default = _default;\nmodule.exports = exports.default;","\"use strict\";\n\nexports.__esModule = true;\nexports.default = void 0;\n\n/**\n * Converts destructured parameters with default values to non-shorthand syntax.\n * This fixes the only arguments-related bug in ES Modules-supporting browsers (Edge 16 & 17).\n * Use this plugin instead of @babel/plugin-transform-parameters when targeting ES Modules.\n */\nvar _default = ({\n types: t\n}) => {\n const isArrowParent = p => p.parentKey === \"params\" && p.parentPath && t.isArrowFunctionExpression(p.parentPath);\n\n return {\n name: \"transform-edge-default-parameters\",\n visitor: {\n AssignmentPattern(path) {\n const arrowArgParent = path.find(isArrowParent);\n\n if (arrowArgParent && path.parent.shorthand) {\n // In Babel 7+, there is no way to force non-shorthand properties.\n path.parent.shorthand = false;\n (path.parent.extra || {}).shorthand = false; // So, to ensure non-shorthand, rename the local identifier so it no longer matches:\n\n path.scope.rename(path.parent.key.name);\n }\n }\n\n }\n };\n};\n\nexports.default = _default;\nmodule.exports = exports.default;","\"use strict\";\n\nexports.__esModule = true;\nexports.default = void 0;\n\n/**\n * Edge 16 & 17 do not infer function.name from variable assignment.\n * All other `function.name` behavior works fine, so we can skip most of @babel/transform-function-name.\n * @see https://kangax.github.io/compat-table/es6/#test-function_name_property_variables_(function)\n *\n * Note: contrary to various Github issues, Edge 16+ *does* correctly infer the name of Arrow Functions.\n * The variable declarator name inference issue only affects function expressions, so that's all we fix here.\n *\n * A Note on Minification: Terser undoes this transform *by default* unless `keep_fnames` is set to true.\n * There is by design - if Function.name is critical to your application, you must configure\n * your minifier to preserve function names.\n */\nvar _default = ({\n types: t\n}) => ({\n name: \"transform-edge-function-name\",\n visitor: {\n FunctionExpression: {\n exit(path) {\n if (!path.node.id && t.isIdentifier(path.parent.id)) {\n const id = t.cloneNode(path.parent.id);\n const binding = path.scope.getBinding(id.name); // if the binding gets reassigned anywhere, rename it\n\n if (binding == null ? void 0 : binding.constantViolations.length) {\n path.scope.rename(id.name);\n }\n\n path.node.id = id;\n }\n }\n\n }\n }\n});\n\nexports.default = _default;\nmodule.exports = exports.default;","import type { types as t, NodePath, Visitor } from \"@babel/core\";\nimport { visitors } from \"@babel/traverse\";\nimport { declare } from \"@babel/helper-plugin-utils\";\n\nexport default declare(({ types: t, assertVersion }) => {\n assertVersion(REQUIRED_VERSION(7));\n\n const containsClassExpressionVisitor: Visitor<{ found: boolean }> = {\n ClassExpression(path, state) {\n state.found = true;\n path.stop();\n },\n Function(path) {\n path.skip();\n },\n };\n\n const containsYieldOrAwaitVisitor = visitors.environmentVisitor<{\n yield: boolean;\n await: boolean;\n }>({\n YieldExpression(path, state) {\n state.yield = true;\n if (state.await) path.stop();\n },\n AwaitExpression(path, state) {\n state.await = true;\n if (state.yield) path.stop();\n },\n });\n\n function containsClassExpression(path: NodePath) {\n if (t.isClassExpression(path.node)) return true;\n if (t.isFunction(path.node)) return false;\n const state = { found: false };\n path.traverse(containsClassExpressionVisitor, state);\n return state.found;\n }\n\n function wrap(path: NodePath) {\n const context = {\n yield: t.isYieldExpression(path.node),\n await: t.isAwaitExpression(path.node),\n };\n path.traverse(containsYieldOrAwaitVisitor, context);\n\n let replacement;\n\n if (context.yield) {\n const fn = t.functionExpression(\n null,\n [],\n t.blockStatement([t.returnStatement(path.node)]),\n /* generator */ true,\n /* async */ context.await,\n );\n\n replacement = t.yieldExpression(\n t.callExpression(t.memberExpression(fn, t.identifier(\"call\")), [\n t.thisExpression(),\n // NOTE: In some context arguments is invalid (it might not be defined\n // in the top-level scope, or it's a syntax error in static class blocks).\n // However, `yield` is also invalid in those contexts, so we can safely\n // inject a reference to arguments.\n t.identifier(\"arguments\"),\n ]),\n true,\n );\n } else {\n const fn = t.arrowFunctionExpression([], path.node, context.await);\n\n replacement = t.callExpression(fn, []);\n if (context.await) replacement = t.awaitExpression(replacement);\n }\n\n path.replaceWith(replacement);\n }\n\n return {\n name: \"bugfix-firefox-class-in-computed-class-key\",\n\n visitor: {\n Class(path) {\n const hasPrivateElement = path.node.body.body.some(node =>\n t.isPrivate(node),\n );\n if (!hasPrivateElement) return;\n\n for (const elem of path.get(\"body.body\")) {\n if (\n \"computed\" in elem.node &&\n elem.node.computed &&\n containsClassExpression(elem.get(\"key\"))\n ) {\n wrap(\n // @ts-expect-error .key also includes t.PrivateName\n elem.get(\"key\") satisfies NodePath,\n );\n }\n }\n },\n },\n };\n});\n","\"use strict\";\n\nexports.__esModule = true;\nexports.default = void 0;\n\n/**\n * Converts destructured parameters with default values to non-shorthand syntax.\n * This fixes the only Tagged Templates-related bug in ES Modules-supporting browsers (Safari 10 & 11).\n * Use this plugin instead of `@babel/plugin-transform-template-literals` when targeting ES Modules.\n *\n * @example\n * // Bug 1: Safari 10/11 doesn't reliably return the same Strings value.\n * // The value changes depending on invocation and function optimization state.\n * function f() { return Object`` }\n * f() === new f() // false, should be true.\n *\n * @example\n * // Bug 2: Safari 10/11 use the same cached strings value when the string parts are the same.\n * // This behavior comes from an earlier version of the spec, and can cause tricky bugs.\n * Object``===Object`` // true, should be false.\n *\n * Benchmarks: https://jsperf.com/compiled-tagged-template-performance\n */\nvar _default = ({\n types: t\n}) => ({\n name: \"transform-tagged-template-caching\",\n visitor: {\n TaggedTemplateExpression(path, state) {\n // tagged templates we've already dealt with\n let processed = state.get(\"processed\");\n\n if (!processed) {\n processed = new WeakSet();\n state.set(\"processed\", processed);\n }\n\n if (processed.has(path.node)) return path.skip(); // Grab the expressions from the original tag.\n // tag`a${'hello'}` // ['hello']\n\n const expressions = path.node.quasi.expressions; // Create an identity function helper:\n // identity = t => t\n\n let identity = state.get(\"identity\");\n\n if (!identity) {\n identity = path.scope.getProgramParent().generateDeclaredUidIdentifier(\"_\");\n state.set(\"identity\", identity);\n const binding = path.scope.getBinding(identity.name);\n binding.path.get(\"init\").replaceWith(t.arrowFunctionExpression( // re-use the helper identifier for compressability\n [t.identifier(\"t\")], t.identifier(\"t\")));\n } // Use the identity function helper to get a reference to the template's Strings.\n // We replace all expressions with `0` ensure Strings has the same shape.\n // identity`a${0}`\n\n\n const template = t.taggedTemplateExpression(t.cloneNode(identity), t.templateLiteral(path.node.quasi.quasis, expressions.map(() => t.numericLiteral(0))));\n processed.add(template); // Install an inline cache at the callsite using the global variable:\n // _t || (_t = identity`a${0}`)\n\n const ident = path.scope.getProgramParent().generateDeclaredUidIdentifier(\"t\");\n path.scope.getBinding(ident.name).path.parent.kind = \"let\";\n const inlineCache = t.logicalExpression(\"||\", ident, t.assignmentExpression(\"=\", t.cloneNode(ident), template)); // The original tag function becomes a plain function call.\n // The expressions omitted from the cached Strings tag are directly applied as arguments.\n // tag(_t || (_t = Object`a${0}`), 'hello')\n\n const node = t.callExpression(path.node.tag, [inlineCache, ...expressions]);\n path.replaceWith(node);\n }\n\n }\n});\n\nexports.default = _default;\nmodule.exports = exports.default;","\"use strict\";\n\nexports.__esModule = true;\nexports.default = _default;\n\n/**\n * Fixes block-shadowed let/const bindings in Safari 10/11.\n * https://kangax.github.io/compat-table/es6/#test-let_scope_shadow_resolution\n */\nfunction _default({\n types: t\n}) {\n return {\n name: \"transform-safari-block-shadowing\",\n visitor: {\n VariableDeclarator(path) {\n // the issue only affects let and const bindings:\n const kind = path.parent.kind;\n if (kind !== \"let\" && kind !== \"const\") return; // ignore non-block-scoped bindings:\n\n const block = path.scope.block;\n if (t.isFunction(block) || t.isProgram(block)) return;\n const bindings = t.getOuterBindingIdentifiers(path.node.id);\n\n for (const name of Object.keys(bindings)) {\n let scope = path.scope; // ignore parent bindings (note: impossible due to let/const?)\n\n if (!scope.hasOwnBinding(name)) continue; // check if shadowed within the nearest function/program boundary\n\n while (scope = scope.parent) {\n if (scope.hasOwnBinding(name)) {\n path.scope.rename(name);\n break;\n }\n\n if (t.isFunction(scope.block) || t.isProgram(scope.block)) {\n break;\n }\n }\n }\n }\n\n }\n };\n}\n\nmodule.exports = exports.default;","\"use strict\";\n\nexports.__esModule = true;\nexports.default = void 0;\n\n/**\n * Safari ~11 has an issue where variable declarations in a For statement throw if they shadow parameters.\n * This is fixed by renaming any declarations in the left/init part of a For* statement so they don't shadow.\n * @see https://bugs.webkit.org/show_bug.cgi?id=171041\n *\n * @example\n * e => { for (let e of []) e } // throws\n * e => { for (let _e of []) _e } // works\n */\nfunction handle(declaration) {\n if (!declaration.isVariableDeclaration()) return;\n const fn = declaration.getFunctionParent();\n const {\n name\n } = declaration.node.declarations[0].id; // check if there is a shadowed binding coming from a parameter\n\n if (fn && fn.scope.hasOwnBinding(name) && fn.scope.getOwnBinding(name).kind === \"param\") {\n declaration.scope.rename(name);\n }\n}\n\nvar _default = () => ({\n name: \"transform-safari-for-shadowing\",\n visitor: {\n ForXStatement(path) {\n handle(path.get(\"left\"));\n },\n\n ForStatement(path) {\n handle(path.get(\"init\"));\n }\n\n }\n});\n\nexports.default = _default;\nmodule.exports = exports.default;","import type { NodePath, types as t } from \"@babel/core\";\n\n/**\n * Check whether a function expression can be affected by\n * https://bugs.webkit.org/show_bug.cgi?id=220517\n * @param path The function expression NodePath\n * @returns the name of function id if it should be transformed, otherwise returns false\n */\nexport function shouldTransform(\n path: NodePath,\n): string | false {\n const { node } = path;\n const functionId = node.id;\n if (!functionId) return false;\n\n const name = functionId.name;\n // On collision, `getOwnBinding` returns the param binding\n // with the id binding be registered as constant violation\n const paramNameBinding = path.scope.getOwnBinding(name);\n if (paramNameBinding === undefined) {\n // Case 1: the function id is injected by babel-helper-name-function, which\n // assigns `NOT_LOCAL_BINDING` to the `functionId` and thus not registering id\n // in scope tracking\n // Case 2: the function id is injected by a third party plugin which does not update the\n // scope info\n return false;\n }\n if (paramNameBinding.kind !== \"param\") {\n // the function id does not reproduce in params\n return false;\n }\n\n if (paramNameBinding.identifier === paramNameBinding.path.node) {\n // the param binding is a simple parameter\n // e.g. (function a(a) {})\n return false;\n }\n\n return name;\n}\n","import { declare } from \"@babel/helper-plugin-utils\";\nimport { shouldTransform } from \"./util.ts\";\n\nexport default declare(api => {\n api.assertVersion(REQUIRED_VERSION(\"^7.16.0\"));\n\n return {\n name: \"plugin-bugfix-safari-id-destructuring-collision-in-function-expression\",\n\n visitor: {\n FunctionExpression(path) {\n const name = shouldTransform(path);\n if (name) {\n // Now we have (function a([a]) {})\n const { scope } = path;\n // invariant: path.node.id is always an Identifier here\n const newParamName = scope.generateUid(name);\n scope.rename(name, newParamName);\n }\n },\n },\n };\n});\n","import { declare } from \"@babel/helper-plugin-utils\";\nimport { types as t } from \"@babel/core\";\nimport type { NodePath } from \"@babel/core\";\n\nfunction needsWrapping(node: t.Node): boolean {\n if (t.isLiteral(node) && !t.isTemplateLiteral(node)) {\n return false;\n }\n\n if (\n t.isCallExpression(node) ||\n t.isOptionalCallExpression(node) ||\n t.isNewExpression(node)\n ) {\n return needsWrapping(node.callee) || node.arguments.some(needsWrapping);\n }\n\n if (t.isTemplateLiteral(node)) {\n return node.expressions.some(needsWrapping);\n }\n\n if (t.isTaggedTemplateExpression(node)) {\n return needsWrapping(node.tag) || needsWrapping(node.quasi);\n }\n\n if (t.isArrayExpression(node)) {\n return node.elements.some(needsWrapping);\n }\n\n if (t.isObjectExpression(node)) {\n return node.properties.some(prop => {\n if (t.isObjectProperty(prop)) {\n return (\n needsWrapping(prop.value) ||\n (prop.computed && needsWrapping(prop.key))\n );\n }\n if (t.isObjectMethod(prop)) {\n return false;\n }\n return false;\n });\n }\n\n if (t.isMemberExpression(node) || t.isOptionalMemberExpression(node)) {\n return (\n needsWrapping(node.object) ||\n (node.computed && needsWrapping(node.property))\n );\n }\n\n if (\n t.isFunctionExpression(node) ||\n t.isArrowFunctionExpression(node) ||\n t.isClassExpression(node)\n ) {\n return false;\n }\n\n if (t.isThisExpression(node)) {\n return false;\n }\n\n if (t.isSequenceExpression(node)) {\n return node.expressions.some(needsWrapping);\n }\n\n // Is an identifier, or anything else not covered above\n return true;\n}\n\nfunction wrapInitializer(\n path: NodePath,\n) {\n const { value } = path.node;\n\n if (value && needsWrapping(value)) {\n path.node.value = t.callExpression(\n t.arrowFunctionExpression([], value),\n [],\n );\n }\n}\n\nexport default declare(api => {\n api.assertVersion(REQUIRED_VERSION(\"^7.16.0\"));\n\n return {\n name: \"plugin-bugfix-safari-class-field-initializer-scope\",\n\n visitor: {\n ClassProperty(path) {\n wrapInitializer(path);\n },\n ClassPrivateProperty(path) {\n wrapInitializer(path);\n },\n },\n };\n});\n","import { skipTransparentExprWrappers } from \"@babel/helper-skip-transparent-expression-wrappers\";\nimport { types as t, type NodePath } from \"@babel/core\";\n// https://crbug.com/v8/11558\n\n// check if there is a spread element followed by another argument.\n// (...[], 0) or (...[], ...[])\n\nfunction matchAffectedArguments(argumentNodes: t.CallExpression[\"arguments\"]) {\n const spreadIndex = argumentNodes.findIndex(node => t.isSpreadElement(node));\n return spreadIndex >= 0 && spreadIndex !== argumentNodes.length - 1;\n}\n\n/**\n * Check whether the optional chain is affected by https://crbug.com/v8/11558.\n * This routine MUST not manipulate NodePath\n *\n * @export\n * @param {(NodePath)} path\n * @returns {boolean}\n */\nexport function shouldTransform(\n path: NodePath,\n): boolean {\n let optionalPath: NodePath = path;\n const chains: (t.OptionalCallExpression | t.OptionalMemberExpression)[] = [];\n for (;;) {\n if (optionalPath.isOptionalMemberExpression()) {\n chains.push(optionalPath.node);\n optionalPath = skipTransparentExprWrappers(optionalPath.get(\"object\"));\n } else if (optionalPath.isOptionalCallExpression()) {\n chains.push(optionalPath.node);\n optionalPath = skipTransparentExprWrappers(optionalPath.get(\"callee\"));\n } else {\n break;\n }\n }\n for (let i = 0; i < chains.length; i++) {\n const node = chains[i];\n if (\n t.isOptionalCallExpression(node) &&\n matchAffectedArguments(node.arguments)\n ) {\n // f?.(...[], 0)\n if (node.optional) {\n return true;\n }\n // o?.m(...[], 0)\n // when node.optional is false, chains[i + 1] is always well defined\n const callee = chains[i + 1];\n if (t.isOptionalMemberExpression(callee, { optional: true })) {\n return true;\n }\n }\n }\n return false;\n}\n","import { declare } from \"@babel/helper-plugin-utils\";\nimport { transform } from \"@babel/plugin-transform-optional-chaining\";\nimport { shouldTransform } from \"./util.ts\";\nimport type { NodePath, types as t } from \"@babel/core\";\n\nexport default declare(api => {\n api.assertVersion(REQUIRED_VERSION(7));\n\n const noDocumentAll = api.assumption(\"noDocumentAll\") ?? false;\n const pureGetters = api.assumption(\"pureGetters\") ?? false;\n\n return {\n name: \"bugfix-v8-spread-parameters-in-optional-chaining\",\n\n visitor: {\n \"OptionalCallExpression|OptionalMemberExpression\"(\n path: NodePath,\n ) {\n if (shouldTransform(path)) {\n transform(path, { noDocumentAll, pureGetters });\n }\n },\n },\n };\n});\n","import { types as t, type NodePath, type Visitor } from \"@babel/core\";\n\nfunction isNameOrLength(key: t.Node): boolean {\n if (t.isIdentifier(key)) {\n return key.name === \"name\" || key.name === \"length\";\n }\n if (t.isStringLiteral(key)) {\n return key.value === \"name\" || key.value === \"length\";\n }\n return false;\n}\n\nfunction isStaticFieldWithValue(\n node: t.Node,\n): node is t.ClassProperty | t.ClassPrivateProperty {\n return (\n (t.isClassProperty(node) || t.isClassPrivateProperty(node)) &&\n node.static &&\n !!node.value\n );\n}\n\nconst hasReferenceVisitor: Visitor<{ name: string; ref: () => void }> = {\n ReferencedIdentifier(path, state) {\n if (path.node.name === state.name) {\n state.ref();\n path.stop();\n }\n },\n Scope(path, { name }) {\n if (path.scope.hasOwnBinding(name)) {\n path.skip();\n }\n },\n};\n\nfunction isReferenceOrThis(node: t.Node, name?: string) {\n return t.isThisExpression(node) || (name && t.isIdentifier(node, { name }));\n}\n\nconst hasReferenceOrThisVisitor: Visitor<{ name?: string; ref: () => void }> = {\n \"ThisExpression|ReferencedIdentifier\"(path, state) {\n if (isReferenceOrThis(path.node, state.name)) {\n state.ref();\n path.stop();\n }\n },\n FunctionParent(path, state) {\n if (path.isArrowFunctionExpression()) return;\n if (state.name && !path.scope.hasOwnBinding(state.name)) {\n path.traverse(hasReferenceVisitor, state);\n }\n path.skip();\n if (path.isMethod()) {\n if (\n process.env.BABEL_8_BREAKING ||\n USE_ESM ||\n IS_STANDALONE ||\n path.requeueComputedKeyAndDecorators\n ) {\n path.requeueComputedKeyAndDecorators();\n } else {\n // eslint-disable-next-line no-restricted-globals\n require(\"@babel/traverse\").NodePath.prototype.requeueComputedKeyAndDecorators.call(\n path,\n );\n }\n }\n },\n};\n\ntype ClassElementWithComputedKeySupport = Extract<\n t.ClassBody[\"body\"][number],\n { computed?: boolean }\n>;\n\n/**\n * This function returns an array containing the indexes of class elements\n * that might be affected by https://crbug.com/v8/12421 bug.\n *\n * This bug affects public static class fields that have the same name as an\n * existing non-writable property with the same name. This usually happens when\n * the static field is named 'length' or 'name', since it clashes with the\n * predefined fn.length and fn.name properties. We must also compile static\n * fields with computed key, because they might end up being named 'length' or\n * 'name'.\n *\n * However, this bug can potentially affect public static fields with any name.\n * Consider this example:\n *\n * class A {\n * static {\n * Object.defineProperty(A, \"readonly\", {\n * value: 1,\n * writable: false,\n * configurable: true\n * })\n * }\n *\n * static readonly = 2;\n * }\n *\n * When initializing the 'static readonly' field, the class already has a\n * non-writable property named 'readonly' and thus V8 9.7 incorrectly throws.\n *\n * To avoid unconditionally compiling every public static field, we track how\n * the class is referenced during definition & static evaluation: any side\n * effect after a reference to the class can potentially define a non-writable\n * conficting property, so subsequent public static fields must be compiled.\n * The class could be referenced using the class name in computed keys, which\n * run before static fields, or using either the class name or 'this' in static\n * fields (both public and private) and static blocks.\n *\n * We don't need to check if computed keys referencing the class have any side\n * effect, because during the computed keys evaluation the internal class\n * binding is in TDZ. However, the first side effect in a static field/block\n * could have access to a function defined in a computed key that modifies the\n * class.\n *\n * This logic is already quite complex, so we assume that static blocks always\n * have side effects and reference the class (the reason to use them is to\n * perform additional initialization logic on the class anyway), so that we do\n * not have to check their contents.\n */\nexport function getPotentiallyBuggyFieldsIndexes(path: NodePath) {\n const buggyPublicStaticFieldsIndexes: number[] = [];\n\n let classReferenced = false;\n const className = path.node.id?.name;\n\n const hasReferenceState = {\n name: className,\n ref: () => (classReferenced = true),\n };\n\n if (className) {\n for (const el of path.get(\"body.body\")) {\n if ((el.node as ClassElementWithComputedKeySupport).computed) {\n // Since .traverse skips the top-level node, it doesn't detect\n // a reference happening immediately:\n // class A { [A]() {} }\n // However, it's a TDZ error so it's ok not to consider this case.\n (el as NodePath)\n .get(\"key\")\n .traverse(hasReferenceVisitor, hasReferenceState);\n\n if (classReferenced) break;\n }\n }\n }\n\n let nextPotentiallyBuggy = false;\n\n const { body } = path.node.body;\n for (let i = 0; i < body.length; i++) {\n const node = body[i];\n\n if (!nextPotentiallyBuggy) {\n if (t.isStaticBlock(node)) {\n classReferenced = true;\n nextPotentiallyBuggy = true;\n } else if (isStaticFieldWithValue(node)) {\n if (!classReferenced) {\n if (isReferenceOrThis(node.value, className)) {\n classReferenced = true;\n } else {\n (\n path.get(`body.body.${i}.value`) as NodePath\n ).traverse(hasReferenceOrThisVisitor, hasReferenceState);\n }\n }\n\n if (classReferenced) {\n nextPotentiallyBuggy = !path.scope.isPure(node.value);\n }\n }\n }\n\n if (\n t.isClassProperty(node, { static: true }) &&\n (nextPotentiallyBuggy || node.computed || isNameOrLength(node.key))\n ) {\n buggyPublicStaticFieldsIndexes.push(i);\n }\n }\n\n return buggyPublicStaticFieldsIndexes;\n}\n\nexport function getNameOrLengthStaticFieldsIndexes(path: NodePath) {\n const indexes: number[] = [];\n\n const { body } = path.node.body;\n for (let i = 0; i < body.length; i++) {\n const node = body[i];\n if (\n t.isClassProperty(node, { static: true, computed: false }) &&\n isNameOrLength(node.key)\n ) {\n indexes.push(i);\n }\n }\n\n return indexes;\n}\n\ntype Range = [start: number, end: number];\n\n/**\n * Converts a sorted list of numbers into a list of (inclusive-exclusive)\n * ranges representing the same numbers.\n *\n * @example toRanges([1, 3, 4, 5, 8, 9]) -> [[1, 2], [3, 6], [8, 10]]\n */\nexport function toRanges(nums: number[]): Range[] {\n const ranges: Range[] = [];\n\n if (nums.length === 0) return ranges;\n\n let start = nums[0];\n let end = start + 1;\n for (let i = 1; i < nums.length; i++) {\n if (nums[i] <= nums[i - 1]) {\n throw new Error(\"Internal Babel error: nums must be in ascending order\");\n }\n if (nums[i] === end) {\n end++;\n } else {\n ranges.push([start, end]);\n start = nums[i];\n end = start + 1;\n }\n }\n ranges.push([start, end]);\n\n return ranges;\n}\n","import type { NodePath, Scope, PluginPass, File } from \"@babel/core\";\nimport { types as t } from \"@babel/core\";\nimport { declare } from \"@babel/helper-plugin-utils\";\n\nimport {\n getPotentiallyBuggyFieldsIndexes,\n getNameOrLengthStaticFieldsIndexes,\n toRanges,\n} from \"./util.ts\";\n\nfunction buildFieldsReplacement(\n fields: t.ClassProperty[],\n scope: Scope,\n file: File,\n) {\n return t.staticBlock(\n fields.map(field => {\n const key =\n field.computed || !t.isIdentifier(field.key)\n ? field.key\n : t.stringLiteral(field.key.name);\n\n return t.expressionStatement(\n t.callExpression(file.addHelper(\"defineProperty\"), [\n t.thisExpression(),\n key,\n field.value || scope.buildUndefinedNode(),\n ]),\n );\n }),\n );\n}\n\nexport default declare(api => {\n api.assertVersion(REQUIRED_VERSION(7));\n\n const setPublicClassFields = api.assumption(\"setPublicClassFields\");\n\n return {\n name: \"bugfix-v8-static-class-fields-redefine-readonly\",\n\n visitor: {\n Class(this: PluginPass, path: NodePath) {\n const ranges = toRanges(\n setPublicClassFields\n ? getNameOrLengthStaticFieldsIndexes(path)\n : getPotentiallyBuggyFieldsIndexes(path),\n );\n\n for (let i = ranges.length - 1; i >= 0; i--) {\n const [start, end] = ranges[i];\n\n const startPath = path.get(\"body.body\")[start];\n\n startPath.replaceWith(\n buildFieldsReplacement(\n path.node.body.body.slice(start, end) as t.ClassProperty[],\n path.scope,\n this.file,\n ),\n );\n\n for (let j = end - 1; j > start; j--) {\n path.get(\"body.body\")[j].remove();\n }\n }\n },\n },\n };\n});\n","/* eslint sort-keys: \"error\" */\n\nimport syntaxImportAssertions from \"@babel/plugin-syntax-import-assertions\";\nimport syntaxImportAttributes from \"@babel/plugin-syntax-import-attributes\";\n\nimport transformAsyncGeneratorFunctions from \"@babel/plugin-transform-async-generator-functions\";\nimport transformAsyncToGenerator from \"@babel/plugin-transform-async-to-generator\";\nimport transformArrowFunctions from \"@babel/plugin-transform-arrow-functions\";\nimport transformBlockScopedFunctions from \"@babel/plugin-transform-block-scoped-functions\";\nimport transformBlockScoping from \"@babel/plugin-transform-block-scoping\";\nimport transformClasses from \"@babel/plugin-transform-classes\";\nimport transformClassProperties from \"@babel/plugin-transform-class-properties\";\nimport transformClassStaticBlock from \"@babel/plugin-transform-class-static-block\";\nimport transformComputedProperties from \"@babel/plugin-transform-computed-properties\";\nimport transformDestructuring from \"@babel/plugin-transform-destructuring\";\nimport transformDotallRegex from \"@babel/plugin-transform-dotall-regex\";\nimport transformDuplicateKeys from \"@babel/plugin-transform-duplicate-keys\";\nimport transformDuplicateNamedCapturingGroupsRegex from \"@babel/plugin-transform-duplicate-named-capturing-groups-regex\";\nimport transformDynamicImport from \"@babel/plugin-transform-dynamic-import\";\nimport transformExponentialOperator from \"@babel/plugin-transform-exponentiation-operator\";\nimport transformExportNamespaceFrom from \"@babel/plugin-transform-export-namespace-from\";\nimport transformForOf from \"@babel/plugin-transform-for-of\";\nimport transformFunctionName from \"@babel/plugin-transform-function-name\";\nimport transformJsonStrings from \"@babel/plugin-transform-json-strings\";\nimport transformLiterals from \"@babel/plugin-transform-literals\";\nimport transformLogicalAssignmentOperators from \"@babel/plugin-transform-logical-assignment-operators\";\nimport transformMemberExpressionLiterals from \"@babel/plugin-transform-member-expression-literals\";\nimport transformModulesAmd from \"@babel/plugin-transform-modules-amd\";\nimport transformModulesCommonjs from \"@babel/plugin-transform-modules-commonjs\";\nimport transformModulesSystemjs from \"@babel/plugin-transform-modules-systemjs\";\nimport transformModulesUmd from \"@babel/plugin-transform-modules-umd\";\nimport transformNamedCapturingGroupsRegex from \"@babel/plugin-transform-named-capturing-groups-regex\";\nimport transformNewTarget from \"@babel/plugin-transform-new-target\";\nimport transformNullishCoalescingOperator from \"@babel/plugin-transform-nullish-coalescing-operator\";\nimport transformNumericSeparator from \"@babel/plugin-transform-numeric-separator\";\nimport transformObjectRestSpread from \"@babel/plugin-transform-object-rest-spread\";\nimport transformObjectSuper from \"@babel/plugin-transform-object-super\";\nimport transformOptionalCatchBinding from \"@babel/plugin-transform-optional-catch-binding\";\nimport transformOptionalChaining from \"@babel/plugin-transform-optional-chaining\";\nimport transformParameters from \"@babel/plugin-transform-parameters\";\nimport transformPrivateMethods from \"@babel/plugin-transform-private-methods\";\nimport transformPrivatePropertyInObject from \"@babel/plugin-transform-private-property-in-object\";\nimport transformPropertyLiterals from \"@babel/plugin-transform-property-literals\";\nimport transformRegenerator from \"@babel/plugin-transform-regenerator\";\nimport transformReservedWords from \"@babel/plugin-transform-reserved-words\";\nimport transformShorthandProperties from \"@babel/plugin-transform-shorthand-properties\";\nimport transformSpread from \"@babel/plugin-transform-spread\";\nimport transformStickyRegex from \"@babel/plugin-transform-sticky-regex\";\nimport transformTemplateLiterals from \"@babel/plugin-transform-template-literals\";\nimport transformTypeofSymbol from \"@babel/plugin-transform-typeof-symbol\";\nimport transformUnicodeEscapes from \"@babel/plugin-transform-unicode-escapes\";\nimport transformUnicodePropertyRegex from \"@babel/plugin-transform-unicode-property-regex\";\nimport transformUnicodeRegex from \"@babel/plugin-transform-unicode-regex\";\nimport transformUnicodeSetsRegex from \"@babel/plugin-transform-unicode-sets-regex\";\n\nimport bugfixAsyncArrowsInClass from \"@babel/preset-modules/lib/plugins/transform-async-arrows-in-class/index.js\";\nimport bugfixEdgeDefaultParameters from \"@babel/preset-modules/lib/plugins/transform-edge-default-parameters/index.js\";\nimport bugfixEdgeFunctionName from \"@babel/preset-modules/lib/plugins/transform-edge-function-name/index.js\";\nimport bugfixFirefoxClassInComputedKey from \"@babel/plugin-bugfix-firefox-class-in-computed-class-key\";\nimport bugfixTaggedTemplateCaching from \"@babel/preset-modules/lib/plugins/transform-tagged-template-caching/index.js\";\nimport bugfixSafariBlockShadowing from \"@babel/preset-modules/lib/plugins/transform-safari-block-shadowing/index.js\";\nimport bugfixSafariForShadowing from \"@babel/preset-modules/lib/plugins/transform-safari-for-shadowing/index.js\";\nimport bugfixSafariIdDestructuringCollisionInFunctionExpression from \"@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression\";\nimport bugfixSafariClassFieldInitializerScope from \"@babel/plugin-bugfix-safari-class-field-initializer-scope\";\nimport bugfixV8SpreadParametersInOptionalChaining from \"@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining\";\nimport bugfixV8StaticClassFieldsRedefineReadonly from \"@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly\";\n\nexport { availablePlugins as default };\nconst availablePlugins = {\n \"bugfix/transform-async-arrows-in-class\": () => bugfixAsyncArrowsInClass,\n \"bugfix/transform-edge-default-parameters\": () => bugfixEdgeDefaultParameters,\n \"bugfix/transform-edge-function-name\": () => bugfixEdgeFunctionName,\n \"bugfix/transform-firefox-class-in-computed-class-key\": () =>\n bugfixFirefoxClassInComputedKey,\n \"bugfix/transform-safari-block-shadowing\": () => bugfixSafariBlockShadowing,\n \"bugfix/transform-safari-class-field-initializer-scope\": () =>\n bugfixSafariClassFieldInitializerScope,\n \"bugfix/transform-safari-for-shadowing\": () => bugfixSafariForShadowing,\n \"bugfix/transform-safari-id-destructuring-collision-in-function-expression\":\n () => bugfixSafariIdDestructuringCollisionInFunctionExpression,\n \"bugfix/transform-tagged-template-caching\": () => bugfixTaggedTemplateCaching,\n \"bugfix/transform-v8-spread-parameters-in-optional-chaining\": () =>\n bugfixV8SpreadParametersInOptionalChaining,\n \"bugfix/transform-v8-static-class-fields-redefine-readonly\": () =>\n bugfixV8StaticClassFieldsRedefineReadonly,\n \"syntax-import-assertions\": () => syntaxImportAssertions,\n \"syntax-import-attributes\": () => syntaxImportAttributes,\n \"transform-arrow-functions\": () => transformArrowFunctions,\n \"transform-async-generator-functions\": () => transformAsyncGeneratorFunctions,\n \"transform-async-to-generator\": () => transformAsyncToGenerator,\n \"transform-block-scoped-functions\": () => transformBlockScopedFunctions,\n \"transform-block-scoping\": () => transformBlockScoping,\n \"transform-class-properties\": () => transformClassProperties,\n \"transform-class-static-block\": () => transformClassStaticBlock,\n \"transform-classes\": () => transformClasses,\n \"transform-computed-properties\": () => transformComputedProperties,\n \"transform-destructuring\": () => transformDestructuring,\n \"transform-dotall-regex\": () => transformDotallRegex,\n \"transform-duplicate-keys\": () => transformDuplicateKeys,\n \"transform-duplicate-named-capturing-groups-regex\": () =>\n transformDuplicateNamedCapturingGroupsRegex,\n \"transform-dynamic-import\": () => transformDynamicImport,\n \"transform-exponentiation-operator\": () => transformExponentialOperator,\n \"transform-export-namespace-from\": () => transformExportNamespaceFrom,\n \"transform-for-of\": () => transformForOf,\n \"transform-function-name\": () => transformFunctionName,\n \"transform-json-strings\": () => transformJsonStrings,\n \"transform-literals\": () => transformLiterals,\n \"transform-logical-assignment-operators\": () =>\n transformLogicalAssignmentOperators,\n \"transform-member-expression-literals\": () =>\n transformMemberExpressionLiterals,\n \"transform-modules-amd\": () => transformModulesAmd,\n \"transform-modules-commonjs\": () => transformModulesCommonjs,\n \"transform-modules-systemjs\": () => transformModulesSystemjs,\n \"transform-modules-umd\": () => transformModulesUmd,\n \"transform-named-capturing-groups-regex\": () =>\n transformNamedCapturingGroupsRegex,\n \"transform-new-target\": () => transformNewTarget,\n \"transform-nullish-coalescing-operator\": () =>\n transformNullishCoalescingOperator,\n \"transform-numeric-separator\": () => transformNumericSeparator,\n \"transform-object-rest-spread\": () => transformObjectRestSpread,\n \"transform-object-super\": () => transformObjectSuper,\n \"transform-optional-catch-binding\": () => transformOptionalCatchBinding,\n \"transform-optional-chaining\": () => transformOptionalChaining,\n \"transform-parameters\": () => transformParameters,\n \"transform-private-methods\": () => transformPrivateMethods,\n \"transform-private-property-in-object\": () =>\n transformPrivatePropertyInObject,\n \"transform-property-literals\": () => transformPropertyLiterals,\n \"transform-regenerator\": () => transformRegenerator,\n \"transform-reserved-words\": () => transformReservedWords,\n \"transform-shorthand-properties\": () => transformShorthandProperties,\n \"transform-spread\": () => transformSpread,\n \"transform-sticky-regex\": () => transformStickyRegex,\n \"transform-template-literals\": () => transformTemplateLiterals,\n \"transform-typeof-symbol\": () => transformTypeofSymbol,\n \"transform-unicode-escapes\": () => transformUnicodeEscapes,\n \"transform-unicode-property-regex\": () => transformUnicodePropertyRegex,\n \"transform-unicode-regex\": () => transformUnicodeRegex,\n \"transform-unicode-sets-regex\": () => transformUnicodeSetsRegex,\n};\n\nexport const minVersions = {};\n// TODO(Babel 8): Remove this\nexport let legacyBabel7SyntaxPlugins: Set;\n\nif (!process.env.BABEL_8_BREAKING) {\n /* eslint-disable no-restricted-globals */\n\n Object.assign(minVersions, {\n \"bugfix/transform-safari-id-destructuring-collision-in-function-expression\":\n \"7.16.0\",\n \"bugfix/transform-v8-static-class-fields-redefine-readonly\": \"7.12.0\",\n \"syntax-import-attributes\": \"7.22.0\",\n \"transform-class-static-block\": \"7.12.0\",\n \"transform-duplicate-named-capturing-groups-regex\": \"7.19.0\",\n \"transform-private-property-in-object\": \"7.10.0\",\n });\n\n // We cannot use the require call in ESM and when bundling.\n // Babel standalone uses a modern parser, so just include a noop plugin.\n // Use `bind` so that it's not detected as a duplicate plugin when using it.\n\n // This is a factory to create a function that returns a no-op plugn\n const e = () => () => () => ({});\n\n const legacyBabel7SyntaxPluginsLoaders = {\n \"syntax-async-generators\":\n USE_ESM || IS_STANDALONE\n ? e()\n : () => require(\"@babel/plugin-syntax-async-generators\"),\n \"syntax-class-properties\":\n USE_ESM || IS_STANDALONE\n ? e()\n : () => require(\"@babel/plugin-syntax-class-properties\"),\n \"syntax-class-static-block\":\n USE_ESM || IS_STANDALONE\n ? e()\n : () => require(\"@babel/plugin-syntax-class-static-block\"),\n \"syntax-dynamic-import\":\n USE_ESM || IS_STANDALONE\n ? e()\n : () => require(\"@babel/plugin-syntax-dynamic-import\"),\n \"syntax-export-namespace-from\":\n USE_ESM || IS_STANDALONE\n ? e()\n : () => require(\"@babel/plugin-syntax-export-namespace-from\"),\n \"syntax-import-meta\":\n USE_ESM || IS_STANDALONE\n ? e()\n : () => require(\"@babel/plugin-syntax-import-meta\"),\n \"syntax-json-strings\":\n USE_ESM || IS_STANDALONE\n ? e()\n : () => require(\"@babel/plugin-syntax-json-strings\"),\n \"syntax-logical-assignment-operators\":\n USE_ESM || IS_STANDALONE\n ? e()\n : () => require(\"@babel/plugin-syntax-logical-assignment-operators\"),\n \"syntax-nullish-coalescing-operator\":\n USE_ESM || IS_STANDALONE\n ? e()\n : () => require(\"@babel/plugin-syntax-nullish-coalescing-operator\"),\n \"syntax-numeric-separator\":\n USE_ESM || IS_STANDALONE\n ? e()\n : () => require(\"@babel/plugin-syntax-numeric-separator\"),\n \"syntax-object-rest-spread\":\n USE_ESM || IS_STANDALONE\n ? e()\n : () => require(\"@babel/plugin-syntax-object-rest-spread\"),\n \"syntax-optional-catch-binding\":\n USE_ESM || IS_STANDALONE\n ? e()\n : () => require(\"@babel/plugin-syntax-optional-catch-binding\"),\n \"syntax-optional-chaining\":\n USE_ESM || IS_STANDALONE\n ? e()\n : () => require(\"@babel/plugin-syntax-optional-chaining\"),\n \"syntax-private-property-in-object\":\n USE_ESM || IS_STANDALONE\n ? e()\n : () => require(\"@babel/plugin-syntax-private-property-in-object\"),\n \"syntax-top-level-await\":\n USE_ESM || IS_STANDALONE\n ? e()\n : () => require(\"@babel/plugin-syntax-top-level-await\"),\n };\n\n // This is a CJS plugin that depends on a package from the monorepo, so it\n // breaks using ESM. Given that ESM builds are new enough to have this\n // syntax enabled by default, we can safely skip enabling it.\n if (!USE_ESM) {\n // @ts-expect-error unknown key\n legacyBabel7SyntaxPluginsLoaders[\"syntax-unicode-sets-regex\"] =\n IS_STANDALONE\n ? e()\n : () => require(\"@babel/plugin-syntax-unicode-sets-regex\");\n }\n\n Object.assign(availablePlugins, legacyBabel7SyntaxPluginsLoaders);\n\n legacyBabel7SyntaxPlugins = new Set(\n Object.keys(legacyBabel7SyntaxPluginsLoaders),\n );\n}\n","import semver from \"semver\";\nimport { minVersions, legacyBabel7SyntaxPlugins } from \"./available-plugins.ts\";\n\nexport function addProposalSyntaxPlugins(\n items: Set,\n proposalSyntaxPlugins: readonly string[],\n) {\n proposalSyntaxPlugins.forEach(plugin => {\n items.add(plugin);\n });\n}\nexport function removeUnnecessaryItems(\n items: Set,\n overlapping: { [name: string]: string[] },\n) {\n items.forEach(item => {\n overlapping[item]?.forEach(name => items.delete(name));\n });\n}\nexport function removeUnsupportedItems(\n items: Set,\n babelVersion: string,\n) {\n items.forEach(item => {\n if (\n Object.hasOwn(minVersions, item) &&\n semver.lt(\n babelVersion,\n // @ts-expect-error we have checked minVersions[item] in has call\n minVersions[item],\n )\n ) {\n items.delete(item);\n } else if (\n !process.env.BABEL_8_BREAKING &&\n babelVersion[0] === \"8\" &&\n legacyBabel7SyntaxPlugins.has(item)\n ) {\n items.delete(item);\n }\n });\n}\n","type AvailablePlugins = typeof import(\"./available-plugins\").default;\n\nexport default {\n amd: \"transform-modules-amd\",\n commonjs: \"transform-modules-commonjs\",\n cjs: \"transform-modules-commonjs\",\n systemjs: \"transform-modules-systemjs\",\n umd: \"transform-modules-umd\",\n} as { [transform: string]: keyof AvailablePlugins };\n","module.exports = require(\"./data/plugin-bugfixes.json\");\n","module.exports = require(\"./data/overlapping-plugins.json\");\n","import originalPlugins from \"@babel/compat-data/plugins\";\nimport originalPluginsBugfixes from \"@babel/compat-data/plugin-bugfixes\";\nimport originalOverlappingPlugins from \"@babel/compat-data/overlapping-plugins\";\nimport availablePlugins from \"./available-plugins.ts\";\n\nconst keys: (o: O) => (keyof O)[] = Object.keys;\n\nexport const plugins = filterAvailable(originalPlugins);\nexport const pluginsBugfixes = filterAvailable(originalPluginsBugfixes);\nexport const overlappingPlugins = filterAvailable(originalOverlappingPlugins);\n\n// @ts-expect-error: we extend this here, since it's a syntax plugin and thus\n// doesn't make sense to store it in a compat-data package.\noverlappingPlugins[\"syntax-import-attributes\"] = [\"syntax-import-assertions\"];\n\nfunction filterAvailable(\n data: Data,\n): { [Name in keyof Data & keyof typeof availablePlugins]: Data[Name] } {\n const result = {} as any;\n for (const plugin of keys(data)) {\n if (Object.hasOwn(availablePlugins, plugin)) {\n result[plugin] = data[plugin];\n }\n }\n return result;\n}\n","export const TopLevelOptions = {\n bugfixes: \"bugfixes\",\n configPath: \"configPath\",\n corejs: \"corejs\",\n debug: \"debug\",\n exclude: \"exclude\",\n forceAllTransforms: \"forceAllTransforms\",\n ignoreBrowserslistConfig: \"ignoreBrowserslistConfig\",\n include: \"include\",\n modules: \"modules\",\n shippedProposals: \"shippedProposals\",\n targets: \"targets\",\n useBuiltIns: \"useBuiltIns\",\n browserslistEnv: \"browserslistEnv\",\n} as const;\n\nif (!process.env.BABEL_8_BREAKING) {\n Object.assign(TopLevelOptions, {\n loose: \"loose\",\n spec: \"spec\",\n });\n}\n\nexport const ModulesOption = {\n false: false,\n auto: \"auto\",\n amd: \"amd\",\n commonjs: \"commonjs\",\n cjs: \"cjs\",\n systemjs: \"systemjs\",\n umd: \"umd\",\n} as const;\n\nexport const UseBuiltInsOption = {\n false: false,\n entry: \"entry\",\n usage: \"usage\",\n} as const;\n","\"use strict\";\n\nexports.__esModule = true;\nexports.StaticProperties = exports.InstanceProperties = exports.CommonIterators = exports.BuiltIns = void 0;\nvar _corejs2BuiltIns = _interopRequireDefault(require(\"@babel/compat-data/corejs2-built-ins\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nconst define = (name, pure, global = [], meta) => {\n return {\n name,\n pure,\n global,\n meta\n };\n};\nconst pureAndGlobal = (pure, global, minRuntimeVersion = null) => define(global[0], pure, global, {\n minRuntimeVersion\n});\nconst globalOnly = global => define(global[0], null, global);\nconst pureOnly = (pure, name) => define(name, pure, []);\nconst ArrayNatureIterators = [\"es6.object.to-string\", \"es6.array.iterator\", \"web.dom.iterable\"];\nconst CommonIterators = [\"es6.string.iterator\", ...ArrayNatureIterators];\nexports.CommonIterators = CommonIterators;\nconst PromiseDependencies = [\"es6.object.to-string\", \"es6.promise\"];\nconst BuiltIns = {\n DataView: globalOnly([\"es6.typed.data-view\"]),\n Float32Array: globalOnly([\"es6.typed.float32-array\"]),\n Float64Array: globalOnly([\"es6.typed.float64-array\"]),\n Int8Array: globalOnly([\"es6.typed.int8-array\"]),\n Int16Array: globalOnly([\"es6.typed.int16-array\"]),\n Int32Array: globalOnly([\"es6.typed.int32-array\"]),\n Map: pureAndGlobal(\"map\", [\"es6.map\", ...CommonIterators]),\n Number: globalOnly([\"es6.number.constructor\"]),\n Promise: pureAndGlobal(\"promise\", PromiseDependencies),\n RegExp: globalOnly([\"es6.regexp.constructor\"]),\n Set: pureAndGlobal(\"set\", [\"es6.set\", ...CommonIterators]),\n Symbol: pureAndGlobal(\"symbol/index\", [\"es6.symbol\"]),\n Uint8Array: globalOnly([\"es6.typed.uint8-array\"]),\n Uint8ClampedArray: globalOnly([\"es6.typed.uint8-clamped-array\"]),\n Uint16Array: globalOnly([\"es6.typed.uint16-array\"]),\n Uint32Array: globalOnly([\"es6.typed.uint32-array\"]),\n WeakMap: pureAndGlobal(\"weak-map\", [\"es6.weak-map\", ...CommonIterators]),\n WeakSet: pureAndGlobal(\"weak-set\", [\"es6.weak-set\", ...CommonIterators]),\n setImmediate: pureOnly(\"set-immediate\", \"web.immediate\"),\n clearImmediate: pureOnly(\"clear-immediate\", \"web.immediate\"),\n parseFloat: pureOnly(\"parse-float\", \"es6.parse-float\"),\n parseInt: pureOnly(\"parse-int\", \"es6.parse-int\")\n};\nexports.BuiltIns = BuiltIns;\nconst InstanceProperties = {\n __defineGetter__: globalOnly([\"es7.object.define-getter\"]),\n __defineSetter__: globalOnly([\"es7.object.define-setter\"]),\n __lookupGetter__: globalOnly([\"es7.object.lookup-getter\"]),\n __lookupSetter__: globalOnly([\"es7.object.lookup-setter\"]),\n anchor: globalOnly([\"es6.string.anchor\"]),\n big: globalOnly([\"es6.string.big\"]),\n bind: globalOnly([\"es6.function.bind\"]),\n blink: globalOnly([\"es6.string.blink\"]),\n bold: globalOnly([\"es6.string.bold\"]),\n codePointAt: globalOnly([\"es6.string.code-point-at\"]),\n copyWithin: globalOnly([\"es6.array.copy-within\"]),\n endsWith: globalOnly([\"es6.string.ends-with\"]),\n entries: globalOnly(ArrayNatureIterators),\n every: globalOnly([\"es6.array.every\"]),\n fill: globalOnly([\"es6.array.fill\"]),\n filter: globalOnly([\"es6.array.filter\"]),\n finally: globalOnly([\"es7.promise.finally\", ...PromiseDependencies]),\n find: globalOnly([\"es6.array.find\"]),\n findIndex: globalOnly([\"es6.array.find-index\"]),\n fixed: globalOnly([\"es6.string.fixed\"]),\n flags: globalOnly([\"es6.regexp.flags\"]),\n flatMap: globalOnly([\"es7.array.flat-map\"]),\n fontcolor: globalOnly([\"es6.string.fontcolor\"]),\n fontsize: globalOnly([\"es6.string.fontsize\"]),\n forEach: globalOnly([\"es6.array.for-each\"]),\n includes: globalOnly([\"es6.string.includes\", \"es7.array.includes\"]),\n indexOf: globalOnly([\"es6.array.index-of\"]),\n italics: globalOnly([\"es6.string.italics\"]),\n keys: globalOnly(ArrayNatureIterators),\n lastIndexOf: globalOnly([\"es6.array.last-index-of\"]),\n link: globalOnly([\"es6.string.link\"]),\n map: globalOnly([\"es6.array.map\"]),\n match: globalOnly([\"es6.regexp.match\"]),\n name: globalOnly([\"es6.function.name\"]),\n padStart: globalOnly([\"es7.string.pad-start\"]),\n padEnd: globalOnly([\"es7.string.pad-end\"]),\n reduce: globalOnly([\"es6.array.reduce\"]),\n reduceRight: globalOnly([\"es6.array.reduce-right\"]),\n repeat: globalOnly([\"es6.string.repeat\"]),\n replace: globalOnly([\"es6.regexp.replace\"]),\n search: globalOnly([\"es6.regexp.search\"]),\n small: globalOnly([\"es6.string.small\"]),\n some: globalOnly([\"es6.array.some\"]),\n sort: globalOnly([\"es6.array.sort\"]),\n split: globalOnly([\"es6.regexp.split\"]),\n startsWith: globalOnly([\"es6.string.starts-with\"]),\n strike: globalOnly([\"es6.string.strike\"]),\n sub: globalOnly([\"es6.string.sub\"]),\n sup: globalOnly([\"es6.string.sup\"]),\n toISOString: globalOnly([\"es6.date.to-iso-string\"]),\n toJSON: globalOnly([\"es6.date.to-json\"]),\n toString: globalOnly([\"es6.object.to-string\", \"es6.date.to-string\", \"es6.regexp.to-string\"]),\n trim: globalOnly([\"es6.string.trim\"]),\n trimEnd: globalOnly([\"es7.string.trim-right\"]),\n trimLeft: globalOnly([\"es7.string.trim-left\"]),\n trimRight: globalOnly([\"es7.string.trim-right\"]),\n trimStart: globalOnly([\"es7.string.trim-left\"]),\n values: globalOnly(ArrayNatureIterators)\n};\n\n// This isn't present in older @babel/compat-data versions\nexports.InstanceProperties = InstanceProperties;\nif (\"es6.array.slice\" in _corejs2BuiltIns.default) {\n InstanceProperties.slice = globalOnly([\"es6.array.slice\"]);\n}\nconst StaticProperties = {\n Array: {\n from: pureAndGlobal(\"array/from\", [\"es6.symbol\", \"es6.array.from\", ...CommonIterators]),\n isArray: pureAndGlobal(\"array/is-array\", [\"es6.array.is-array\"]),\n of: pureAndGlobal(\"array/of\", [\"es6.array.of\"])\n },\n Date: {\n now: pureAndGlobal(\"date/now\", [\"es6.date.now\"])\n },\n JSON: {\n stringify: pureOnly(\"json/stringify\", \"es6.symbol\")\n },\n Math: {\n // 'Math' was not included in the 7.0.0\n // release of '@babel/runtime'. See issue https://github.com/babel/babel/pull/8616.\n acosh: pureAndGlobal(\"math/acosh\", [\"es6.math.acosh\"], \"7.0.1\"),\n asinh: pureAndGlobal(\"math/asinh\", [\"es6.math.asinh\"], \"7.0.1\"),\n atanh: pureAndGlobal(\"math/atanh\", [\"es6.math.atanh\"], \"7.0.1\"),\n cbrt: pureAndGlobal(\"math/cbrt\", [\"es6.math.cbrt\"], \"7.0.1\"),\n clz32: pureAndGlobal(\"math/clz32\", [\"es6.math.clz32\"], \"7.0.1\"),\n cosh: pureAndGlobal(\"math/cosh\", [\"es6.math.cosh\"], \"7.0.1\"),\n expm1: pureAndGlobal(\"math/expm1\", [\"es6.math.expm1\"], \"7.0.1\"),\n fround: pureAndGlobal(\"math/fround\", [\"es6.math.fround\"], \"7.0.1\"),\n hypot: pureAndGlobal(\"math/hypot\", [\"es6.math.hypot\"], \"7.0.1\"),\n imul: pureAndGlobal(\"math/imul\", [\"es6.math.imul\"], \"7.0.1\"),\n log1p: pureAndGlobal(\"math/log1p\", [\"es6.math.log1p\"], \"7.0.1\"),\n log10: pureAndGlobal(\"math/log10\", [\"es6.math.log10\"], \"7.0.1\"),\n log2: pureAndGlobal(\"math/log2\", [\"es6.math.log2\"], \"7.0.1\"),\n sign: pureAndGlobal(\"math/sign\", [\"es6.math.sign\"], \"7.0.1\"),\n sinh: pureAndGlobal(\"math/sinh\", [\"es6.math.sinh\"], \"7.0.1\"),\n tanh: pureAndGlobal(\"math/tanh\", [\"es6.math.tanh\"], \"7.0.1\"),\n trunc: pureAndGlobal(\"math/trunc\", [\"es6.math.trunc\"], \"7.0.1\")\n },\n Number: {\n EPSILON: pureAndGlobal(\"number/epsilon\", [\"es6.number.epsilon\"]),\n MIN_SAFE_INTEGER: pureAndGlobal(\"number/min-safe-integer\", [\"es6.number.min-safe-integer\"]),\n MAX_SAFE_INTEGER: pureAndGlobal(\"number/max-safe-integer\", [\"es6.number.max-safe-integer\"]),\n isFinite: pureAndGlobal(\"number/is-finite\", [\"es6.number.is-finite\"]),\n isInteger: pureAndGlobal(\"number/is-integer\", [\"es6.number.is-integer\"]),\n isSafeInteger: pureAndGlobal(\"number/is-safe-integer\", [\"es6.number.is-safe-integer\"]),\n isNaN: pureAndGlobal(\"number/is-nan\", [\"es6.number.is-nan\"]),\n parseFloat: pureAndGlobal(\"number/parse-float\", [\"es6.number.parse-float\"]),\n parseInt: pureAndGlobal(\"number/parse-int\", [\"es6.number.parse-int\"])\n },\n Object: {\n assign: pureAndGlobal(\"object/assign\", [\"es6.object.assign\"]),\n create: pureAndGlobal(\"object/create\", [\"es6.object.create\"]),\n defineProperties: pureAndGlobal(\"object/define-properties\", [\"es6.object.define-properties\"]),\n defineProperty: pureAndGlobal(\"object/define-property\", [\"es6.object.define-property\"]),\n entries: pureAndGlobal(\"object/entries\", [\"es7.object.entries\"]),\n freeze: pureAndGlobal(\"object/freeze\", [\"es6.object.freeze\"]),\n getOwnPropertyDescriptor: pureAndGlobal(\"object/get-own-property-descriptor\", [\"es6.object.get-own-property-descriptor\"]),\n getOwnPropertyDescriptors: pureAndGlobal(\"object/get-own-property-descriptors\", [\"es7.object.get-own-property-descriptors\"]),\n getOwnPropertyNames: pureAndGlobal(\"object/get-own-property-names\", [\"es6.object.get-own-property-names\"]),\n getOwnPropertySymbols: pureAndGlobal(\"object/get-own-property-symbols\", [\"es6.symbol\"]),\n getPrototypeOf: pureAndGlobal(\"object/get-prototype-of\", [\"es6.object.get-prototype-of\"]),\n is: pureAndGlobal(\"object/is\", [\"es6.object.is\"]),\n isExtensible: pureAndGlobal(\"object/is-extensible\", [\"es6.object.is-extensible\"]),\n isFrozen: pureAndGlobal(\"object/is-frozen\", [\"es6.object.is-frozen\"]),\n isSealed: pureAndGlobal(\"object/is-sealed\", [\"es6.object.is-sealed\"]),\n keys: pureAndGlobal(\"object/keys\", [\"es6.object.keys\"]),\n preventExtensions: pureAndGlobal(\"object/prevent-extensions\", [\"es6.object.prevent-extensions\"]),\n seal: pureAndGlobal(\"object/seal\", [\"es6.object.seal\"]),\n setPrototypeOf: pureAndGlobal(\"object/set-prototype-of\", [\"es6.object.set-prototype-of\"]),\n values: pureAndGlobal(\"object/values\", [\"es7.object.values\"])\n },\n Promise: {\n all: globalOnly(CommonIterators),\n race: globalOnly(CommonIterators)\n },\n Reflect: {\n apply: pureAndGlobal(\"reflect/apply\", [\"es6.reflect.apply\"]),\n construct: pureAndGlobal(\"reflect/construct\", [\"es6.reflect.construct\"]),\n defineProperty: pureAndGlobal(\"reflect/define-property\", [\"es6.reflect.define-property\"]),\n deleteProperty: pureAndGlobal(\"reflect/delete-property\", [\"es6.reflect.delete-property\"]),\n get: pureAndGlobal(\"reflect/get\", [\"es6.reflect.get\"]),\n getOwnPropertyDescriptor: pureAndGlobal(\"reflect/get-own-property-descriptor\", [\"es6.reflect.get-own-property-descriptor\"]),\n getPrototypeOf: pureAndGlobal(\"reflect/get-prototype-of\", [\"es6.reflect.get-prototype-of\"]),\n has: pureAndGlobal(\"reflect/has\", [\"es6.reflect.has\"]),\n isExtensible: pureAndGlobal(\"reflect/is-extensible\", [\"es6.reflect.is-extensible\"]),\n ownKeys: pureAndGlobal(\"reflect/own-keys\", [\"es6.reflect.own-keys\"]),\n preventExtensions: pureAndGlobal(\"reflect/prevent-extensions\", [\"es6.reflect.prevent-extensions\"]),\n set: pureAndGlobal(\"reflect/set\", [\"es6.reflect.set\"]),\n setPrototypeOf: pureAndGlobal(\"reflect/set-prototype-of\", [\"es6.reflect.set-prototype-of\"])\n },\n String: {\n at: pureOnly(\"string/at\", \"es7.string.at\"),\n fromCodePoint: pureAndGlobal(\"string/from-code-point\", [\"es6.string.from-code-point\"]),\n raw: pureAndGlobal(\"string/raw\", [\"es6.string.raw\"])\n },\n Symbol: {\n // FIXME: Pure disabled to work around zloirock/core-js#262.\n asyncIterator: globalOnly([\"es6.symbol\", \"es7.symbol.async-iterator\"]),\n for: pureOnly(\"symbol/for\", \"es6.symbol\"),\n hasInstance: pureOnly(\"symbol/has-instance\", \"es6.symbol\"),\n isConcatSpreadable: pureOnly(\"symbol/is-concat-spreadable\", \"es6.symbol\"),\n iterator: define(\"es6.symbol\", \"symbol/iterator\", CommonIterators),\n keyFor: pureOnly(\"symbol/key-for\", \"es6.symbol\"),\n match: pureAndGlobal(\"symbol/match\", [\"es6.regexp.match\"]),\n replace: pureOnly(\"symbol/replace\", \"es6.symbol\"),\n search: pureOnly(\"symbol/search\", \"es6.symbol\"),\n species: pureOnly(\"symbol/species\", \"es6.symbol\"),\n split: pureOnly(\"symbol/split\", \"es6.symbol\"),\n toPrimitive: pureOnly(\"symbol/to-primitive\", \"es6.symbol\"),\n toStringTag: pureOnly(\"symbol/to-string-tag\", \"es6.symbol\"),\n unscopables: pureOnly(\"symbol/unscopables\", \"es6.symbol\")\n }\n};\nexports.StaticProperties = StaticProperties;","\"use strict\";\n\nexports.__esModule = true;\nexports.default = _default;\nfunction _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nconst webPolyfills = {\n \"web.timers\": {},\n \"web.immediate\": {},\n \"web.dom.iterable\": {}\n};\nconst purePolyfills = {\n \"es6.parse-float\": {},\n \"es6.parse-int\": {},\n \"es7.string.at\": {}\n};\nfunction _default(targets, method, polyfills) {\n const targetNames = Object.keys(targets);\n const isAnyTarget = !targetNames.length;\n const isWebTarget = targetNames.some(name => name !== \"node\");\n return _extends({}, polyfills, method === \"usage-pure\" ? purePolyfills : null, isAnyTarget || isWebTarget ? webPolyfills : null);\n}","exports = module.exports = SemVer\n\nvar debug\n/* istanbul ignore next */\nif (typeof process === 'object' &&\n process.env &&\n process.env.NODE_DEBUG &&\n /\\bsemver\\b/i.test(process.env.NODE_DEBUG)) {\n debug = function () {\n var args = Array.prototype.slice.call(arguments, 0)\n args.unshift('SEMVER')\n console.log.apply(console, args)\n }\n} else {\n debug = function () {}\n}\n\n// Note: this is the semver.org version of the spec that it implements\n// Not necessarily the package version of this code.\nexports.SEMVER_SPEC_VERSION = '2.0.0'\n\nvar MAX_LENGTH = 256\nvar MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER ||\n /* istanbul ignore next */ 9007199254740991\n\n// Max safe segment length for coercion.\nvar MAX_SAFE_COMPONENT_LENGTH = 16\n\nvar MAX_SAFE_BUILD_LENGTH = MAX_LENGTH - 6\n\n// The actual regexps go on exports.re\nvar re = exports.re = []\nvar safeRe = exports.safeRe = []\nvar src = exports.src = []\nvar t = exports.tokens = {}\nvar R = 0\n\nfunction tok (n) {\n t[n] = R++\n}\n\nvar LETTERDASHNUMBER = '[a-zA-Z0-9-]'\n\n// Replace some greedy regex tokens to prevent regex dos issues. These regex are\n// used internally via the safeRe object since all inputs in this library get\n// normalized first to trim and collapse all extra whitespace. The original\n// regexes are exported for userland consumption and lower level usage. A\n// future breaking change could export the safer regex only with a note that\n// all input should have extra whitespace removed.\nvar safeRegexReplacements = [\n ['\\\\s', 1],\n ['\\\\d', MAX_LENGTH],\n [LETTERDASHNUMBER, MAX_SAFE_BUILD_LENGTH],\n]\n\nfunction makeSafeRe (value) {\n for (var i = 0; i < safeRegexReplacements.length; i++) {\n var token = safeRegexReplacements[i][0]\n var max = safeRegexReplacements[i][1]\n value = value\n .split(token + '*').join(token + '{0,' + max + '}')\n .split(token + '+').join(token + '{1,' + max + '}')\n }\n return value\n}\n\n// The following Regular Expressions can be used for tokenizing,\n// validating, and parsing SemVer version strings.\n\n// ## Numeric Identifier\n// A single `0`, or a non-zero digit followed by zero or more digits.\n\ntok('NUMERICIDENTIFIER')\nsrc[t.NUMERICIDENTIFIER] = '0|[1-9]\\\\d*'\ntok('NUMERICIDENTIFIERLOOSE')\nsrc[t.NUMERICIDENTIFIERLOOSE] = '\\\\d+'\n\n// ## Non-numeric Identifier\n// Zero or more digits, followed by a letter or hyphen, and then zero or\n// more letters, digits, or hyphens.\n\ntok('NONNUMERICIDENTIFIER')\nsrc[t.NONNUMERICIDENTIFIER] = '\\\\d*[a-zA-Z-]' + LETTERDASHNUMBER + '*'\n\n// ## Main Version\n// Three dot-separated numeric identifiers.\n\ntok('MAINVERSION')\nsrc[t.MAINVERSION] = '(' + src[t.NUMERICIDENTIFIER] + ')\\\\.' +\n '(' + src[t.NUMERICIDENTIFIER] + ')\\\\.' +\n '(' + src[t.NUMERICIDENTIFIER] + ')'\n\ntok('MAINVERSIONLOOSE')\nsrc[t.MAINVERSIONLOOSE] = '(' + src[t.NUMERICIDENTIFIERLOOSE] + ')\\\\.' +\n '(' + src[t.NUMERICIDENTIFIERLOOSE] + ')\\\\.' +\n '(' + src[t.NUMERICIDENTIFIERLOOSE] + ')'\n\n// ## Pre-release Version Identifier\n// A numeric identifier, or a non-numeric identifier.\n\ntok('PRERELEASEIDENTIFIER')\nsrc[t.PRERELEASEIDENTIFIER] = '(?:' + src[t.NUMERICIDENTIFIER] +\n '|' + src[t.NONNUMERICIDENTIFIER] + ')'\n\ntok('PRERELEASEIDENTIFIERLOOSE')\nsrc[t.PRERELEASEIDENTIFIERLOOSE] = '(?:' + src[t.NUMERICIDENTIFIERLOOSE] +\n '|' + src[t.NONNUMERICIDENTIFIER] + ')'\n\n// ## Pre-release Version\n// Hyphen, followed by one or more dot-separated pre-release version\n// identifiers.\n\ntok('PRERELEASE')\nsrc[t.PRERELEASE] = '(?:-(' + src[t.PRERELEASEIDENTIFIER] +\n '(?:\\\\.' + src[t.PRERELEASEIDENTIFIER] + ')*))'\n\ntok('PRERELEASELOOSE')\nsrc[t.PRERELEASELOOSE] = '(?:-?(' + src[t.PRERELEASEIDENTIFIERLOOSE] +\n '(?:\\\\.' + src[t.PRERELEASEIDENTIFIERLOOSE] + ')*))'\n\n// ## Build Metadata Identifier\n// Any combination of digits, letters, or hyphens.\n\ntok('BUILDIDENTIFIER')\nsrc[t.BUILDIDENTIFIER] = LETTERDASHNUMBER + '+'\n\n// ## Build Metadata\n// Plus sign, followed by one or more period-separated build metadata\n// identifiers.\n\ntok('BUILD')\nsrc[t.BUILD] = '(?:\\\\+(' + src[t.BUILDIDENTIFIER] +\n '(?:\\\\.' + src[t.BUILDIDENTIFIER] + ')*))'\n\n// ## Full Version String\n// A main version, followed optionally by a pre-release version and\n// build metadata.\n\n// Note that the only major, minor, patch, and pre-release sections of\n// the version string are capturing groups. The build metadata is not a\n// capturing group, because it should not ever be used in version\n// comparison.\n\ntok('FULL')\ntok('FULLPLAIN')\nsrc[t.FULLPLAIN] = 'v?' + src[t.MAINVERSION] +\n src[t.PRERELEASE] + '?' +\n src[t.BUILD] + '?'\n\nsrc[t.FULL] = '^' + src[t.FULLPLAIN] + '$'\n\n// like full, but allows v1.2.3 and =1.2.3, which people do sometimes.\n// also, 1.0.0alpha1 (prerelease without the hyphen) which is pretty\n// common in the npm registry.\ntok('LOOSEPLAIN')\nsrc[t.LOOSEPLAIN] = '[v=\\\\s]*' + src[t.MAINVERSIONLOOSE] +\n src[t.PRERELEASELOOSE] + '?' +\n src[t.BUILD] + '?'\n\ntok('LOOSE')\nsrc[t.LOOSE] = '^' + src[t.LOOSEPLAIN] + '$'\n\ntok('GTLT')\nsrc[t.GTLT] = '((?:<|>)?=?)'\n\n// Something like \"2.*\" or \"1.2.x\".\n// Note that \"x.x\" is a valid xRange identifer, meaning \"any version\"\n// Only the first item is strictly required.\ntok('XRANGEIDENTIFIERLOOSE')\nsrc[t.XRANGEIDENTIFIERLOOSE] = src[t.NUMERICIDENTIFIERLOOSE] + '|x|X|\\\\*'\ntok('XRANGEIDENTIFIER')\nsrc[t.XRANGEIDENTIFIER] = src[t.NUMERICIDENTIFIER] + '|x|X|\\\\*'\n\ntok('XRANGEPLAIN')\nsrc[t.XRANGEPLAIN] = '[v=\\\\s]*(' + src[t.XRANGEIDENTIFIER] + ')' +\n '(?:\\\\.(' + src[t.XRANGEIDENTIFIER] + ')' +\n '(?:\\\\.(' + src[t.XRANGEIDENTIFIER] + ')' +\n '(?:' + src[t.PRERELEASE] + ')?' +\n src[t.BUILD] + '?' +\n ')?)?'\n\ntok('XRANGEPLAINLOOSE')\nsrc[t.XRANGEPLAINLOOSE] = '[v=\\\\s]*(' + src[t.XRANGEIDENTIFIERLOOSE] + ')' +\n '(?:\\\\.(' + src[t.XRANGEIDENTIFIERLOOSE] + ')' +\n '(?:\\\\.(' + src[t.XRANGEIDENTIFIERLOOSE] + ')' +\n '(?:' + src[t.PRERELEASELOOSE] + ')?' +\n src[t.BUILD] + '?' +\n ')?)?'\n\ntok('XRANGE')\nsrc[t.XRANGE] = '^' + src[t.GTLT] + '\\\\s*' + src[t.XRANGEPLAIN] + '$'\ntok('XRANGELOOSE')\nsrc[t.XRANGELOOSE] = '^' + src[t.GTLT] + '\\\\s*' + src[t.XRANGEPLAINLOOSE] + '$'\n\n// Coercion.\n// Extract anything that could conceivably be a part of a valid semver\ntok('COERCE')\nsrc[t.COERCE] = '(^|[^\\\\d])' +\n '(\\\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '})' +\n '(?:\\\\.(\\\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '}))?' +\n '(?:\\\\.(\\\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '}))?' +\n '(?:$|[^\\\\d])'\ntok('COERCERTL')\nre[t.COERCERTL] = new RegExp(src[t.COERCE], 'g')\nsafeRe[t.COERCERTL] = new RegExp(makeSafeRe(src[t.COERCE]), 'g')\n\n// Tilde ranges.\n// Meaning is \"reasonably at or greater than\"\ntok('LONETILDE')\nsrc[t.LONETILDE] = '(?:~>?)'\n\ntok('TILDETRIM')\nsrc[t.TILDETRIM] = '(\\\\s*)' + src[t.LONETILDE] + '\\\\s+'\nre[t.TILDETRIM] = new RegExp(src[t.TILDETRIM], 'g')\nsafeRe[t.TILDETRIM] = new RegExp(makeSafeRe(src[t.TILDETRIM]), 'g')\nvar tildeTrimReplace = '$1~'\n\ntok('TILDE')\nsrc[t.TILDE] = '^' + src[t.LONETILDE] + src[t.XRANGEPLAIN] + '$'\ntok('TILDELOOSE')\nsrc[t.TILDELOOSE] = '^' + src[t.LONETILDE] + src[t.XRANGEPLAINLOOSE] + '$'\n\n// Caret ranges.\n// Meaning is \"at least and backwards compatible with\"\ntok('LONECARET')\nsrc[t.LONECARET] = '(?:\\\\^)'\n\ntok('CARETTRIM')\nsrc[t.CARETTRIM] = '(\\\\s*)' + src[t.LONECARET] + '\\\\s+'\nre[t.CARETTRIM] = new RegExp(src[t.CARETTRIM], 'g')\nsafeRe[t.CARETTRIM] = new RegExp(makeSafeRe(src[t.CARETTRIM]), 'g')\nvar caretTrimReplace = '$1^'\n\ntok('CARET')\nsrc[t.CARET] = '^' + src[t.LONECARET] + src[t.XRANGEPLAIN] + '$'\ntok('CARETLOOSE')\nsrc[t.CARETLOOSE] = '^' + src[t.LONECARET] + src[t.XRANGEPLAINLOOSE] + '$'\n\n// A simple gt/lt/eq thing, or just \"\" to indicate \"any version\"\ntok('COMPARATORLOOSE')\nsrc[t.COMPARATORLOOSE] = '^' + src[t.GTLT] + '\\\\s*(' + src[t.LOOSEPLAIN] + ')$|^$'\ntok('COMPARATOR')\nsrc[t.COMPARATOR] = '^' + src[t.GTLT] + '\\\\s*(' + src[t.FULLPLAIN] + ')$|^$'\n\n// An expression to strip any whitespace between the gtlt and the thing\n// it modifies, so that `> 1.2.3` ==> `>1.2.3`\ntok('COMPARATORTRIM')\nsrc[t.COMPARATORTRIM] = '(\\\\s*)' + src[t.GTLT] +\n '\\\\s*(' + src[t.LOOSEPLAIN] + '|' + src[t.XRANGEPLAIN] + ')'\n\n// this one has to use the /g flag\nre[t.COMPARATORTRIM] = new RegExp(src[t.COMPARATORTRIM], 'g')\nsafeRe[t.COMPARATORTRIM] = new RegExp(makeSafeRe(src[t.COMPARATORTRIM]), 'g')\nvar comparatorTrimReplace = '$1$2$3'\n\n// Something like `1.2.3 - 1.2.4`\n// Note that these all use the loose form, because they'll be\n// checked against either the strict or loose comparator form\n// later.\ntok('HYPHENRANGE')\nsrc[t.HYPHENRANGE] = '^\\\\s*(' + src[t.XRANGEPLAIN] + ')' +\n '\\\\s+-\\\\s+' +\n '(' + src[t.XRANGEPLAIN] + ')' +\n '\\\\s*$'\n\ntok('HYPHENRANGELOOSE')\nsrc[t.HYPHENRANGELOOSE] = '^\\\\s*(' + src[t.XRANGEPLAINLOOSE] + ')' +\n '\\\\s+-\\\\s+' +\n '(' + src[t.XRANGEPLAINLOOSE] + ')' +\n '\\\\s*$'\n\n// Star ranges basically just allow anything at all.\ntok('STAR')\nsrc[t.STAR] = '(<|>)?=?\\\\s*\\\\*'\n\n// Compile to actual regexp objects.\n// All are flag-free, unless they were created above with a flag.\nfor (var i = 0; i < R; i++) {\n debug(i, src[i])\n if (!re[i]) {\n re[i] = new RegExp(src[i])\n\n // Replace all greedy whitespace to prevent regex dos issues. These regex are\n // used internally via the safeRe object since all inputs in this library get\n // normalized first to trim and collapse all extra whitespace. The original\n // regexes are exported for userland consumption and lower level usage. A\n // future breaking change could export the safer regex only with a note that\n // all input should have extra whitespace removed.\n safeRe[i] = new RegExp(makeSafeRe(src[i]))\n }\n}\n\nexports.parse = parse\nfunction parse (version, options) {\n if (!options || typeof options !== 'object') {\n options = {\n loose: !!options,\n includePrerelease: false\n }\n }\n\n if (version instanceof SemVer) {\n return version\n }\n\n if (typeof version !== 'string') {\n return null\n }\n\n if (version.length > MAX_LENGTH) {\n return null\n }\n\n var r = options.loose ? safeRe[t.LOOSE] : safeRe[t.FULL]\n if (!r.test(version)) {\n return null\n }\n\n try {\n return new SemVer(version, options)\n } catch (er) {\n return null\n }\n}\n\nexports.valid = valid\nfunction valid (version, options) {\n var v = parse(version, options)\n return v ? v.version : null\n}\n\nexports.clean = clean\nfunction clean (version, options) {\n var s = parse(version.trim().replace(/^[=v]+/, ''), options)\n return s ? s.version : null\n}\n\nexports.SemVer = SemVer\n\nfunction SemVer (version, options) {\n if (!options || typeof options !== 'object') {\n options = {\n loose: !!options,\n includePrerelease: false\n }\n }\n if (version instanceof SemVer) {\n if (version.loose === options.loose) {\n return version\n } else {\n version = version.version\n }\n } else if (typeof version !== 'string') {\n throw new TypeError('Invalid Version: ' + version)\n }\n\n if (version.length > MAX_LENGTH) {\n throw new TypeError('version is longer than ' + MAX_LENGTH + ' characters')\n }\n\n if (!(this instanceof SemVer)) {\n return new SemVer(version, options)\n }\n\n debug('SemVer', version, options)\n this.options = options\n this.loose = !!options.loose\n\n var m = version.trim().match(options.loose ? safeRe[t.LOOSE] : safeRe[t.FULL])\n\n if (!m) {\n throw new TypeError('Invalid Version: ' + version)\n }\n\n this.raw = version\n\n // these are actually numbers\n this.major = +m[1]\n this.minor = +m[2]\n this.patch = +m[3]\n\n if (this.major > MAX_SAFE_INTEGER || this.major < 0) {\n throw new TypeError('Invalid major version')\n }\n\n if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) {\n throw new TypeError('Invalid minor version')\n }\n\n if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) {\n throw new TypeError('Invalid patch version')\n }\n\n // numberify any prerelease numeric ids\n if (!m[4]) {\n this.prerelease = []\n } else {\n this.prerelease = m[4].split('.').map(function (id) {\n if (/^[0-9]+$/.test(id)) {\n var num = +id\n if (num >= 0 && num < MAX_SAFE_INTEGER) {\n return num\n }\n }\n return id\n })\n }\n\n this.build = m[5] ? m[5].split('.') : []\n this.format()\n}\n\nSemVer.prototype.format = function () {\n this.version = this.major + '.' + this.minor + '.' + this.patch\n if (this.prerelease.length) {\n this.version += '-' + this.prerelease.join('.')\n }\n return this.version\n}\n\nSemVer.prototype.toString = function () {\n return this.version\n}\n\nSemVer.prototype.compare = function (other) {\n debug('SemVer.compare', this.version, this.options, other)\n if (!(other instanceof SemVer)) {\n other = new SemVer(other, this.options)\n }\n\n return this.compareMain(other) || this.comparePre(other)\n}\n\nSemVer.prototype.compareMain = function (other) {\n if (!(other instanceof SemVer)) {\n other = new SemVer(other, this.options)\n }\n\n return compareIdentifiers(this.major, other.major) ||\n compareIdentifiers(this.minor, other.minor) ||\n compareIdentifiers(this.patch, other.patch)\n}\n\nSemVer.prototype.comparePre = function (other) {\n if (!(other instanceof SemVer)) {\n other = new SemVer(other, this.options)\n }\n\n // NOT having a prerelease is > having one\n if (this.prerelease.length && !other.prerelease.length) {\n return -1\n } else if (!this.prerelease.length && other.prerelease.length) {\n return 1\n } else if (!this.prerelease.length && !other.prerelease.length) {\n return 0\n }\n\n var i = 0\n do {\n var a = this.prerelease[i]\n var b = other.prerelease[i]\n debug('prerelease compare', i, a, b)\n if (a === undefined && b === undefined) {\n return 0\n } else if (b === undefined) {\n return 1\n } else if (a === undefined) {\n return -1\n } else if (a === b) {\n continue\n } else {\n return compareIdentifiers(a, b)\n }\n } while (++i)\n}\n\nSemVer.prototype.compareBuild = function (other) {\n if (!(other instanceof SemVer)) {\n other = new SemVer(other, this.options)\n }\n\n var i = 0\n do {\n var a = this.build[i]\n var b = other.build[i]\n debug('prerelease compare', i, a, b)\n if (a === undefined && b === undefined) {\n return 0\n } else if (b === undefined) {\n return 1\n } else if (a === undefined) {\n return -1\n } else if (a === b) {\n continue\n } else {\n return compareIdentifiers(a, b)\n }\n } while (++i)\n}\n\n// preminor will bump the version up to the next minor release, and immediately\n// down to pre-release. premajor and prepatch work the same way.\nSemVer.prototype.inc = function (release, identifier) {\n switch (release) {\n case 'premajor':\n this.prerelease.length = 0\n this.patch = 0\n this.minor = 0\n this.major++\n this.inc('pre', identifier)\n break\n case 'preminor':\n this.prerelease.length = 0\n this.patch = 0\n this.minor++\n this.inc('pre', identifier)\n break\n case 'prepatch':\n // If this is already a prerelease, it will bump to the next version\n // drop any prereleases that might already exist, since they are not\n // relevant at this point.\n this.prerelease.length = 0\n this.inc('patch', identifier)\n this.inc('pre', identifier)\n break\n // If the input is a non-prerelease version, this acts the same as\n // prepatch.\n case 'prerelease':\n if (this.prerelease.length === 0) {\n this.inc('patch', identifier)\n }\n this.inc('pre', identifier)\n break\n\n case 'major':\n // If this is a pre-major version, bump up to the same major version.\n // Otherwise increment major.\n // 1.0.0-5 bumps to 1.0.0\n // 1.1.0 bumps to 2.0.0\n if (this.minor !== 0 ||\n this.patch !== 0 ||\n this.prerelease.length === 0) {\n this.major++\n }\n this.minor = 0\n this.patch = 0\n this.prerelease = []\n break\n case 'minor':\n // If this is a pre-minor version, bump up to the same minor version.\n // Otherwise increment minor.\n // 1.2.0-5 bumps to 1.2.0\n // 1.2.1 bumps to 1.3.0\n if (this.patch !== 0 || this.prerelease.length === 0) {\n this.minor++\n }\n this.patch = 0\n this.prerelease = []\n break\n case 'patch':\n // If this is not a pre-release version, it will increment the patch.\n // If it is a pre-release it will bump up to the same patch version.\n // 1.2.0-5 patches to 1.2.0\n // 1.2.0 patches to 1.2.1\n if (this.prerelease.length === 0) {\n this.patch++\n }\n this.prerelease = []\n break\n // This probably shouldn't be used publicly.\n // 1.0.0 \"pre\" would become 1.0.0-0 which is the wrong direction.\n case 'pre':\n if (this.prerelease.length === 0) {\n this.prerelease = [0]\n } else {\n var i = this.prerelease.length\n while (--i >= 0) {\n if (typeof this.prerelease[i] === 'number') {\n this.prerelease[i]++\n i = -2\n }\n }\n if (i === -1) {\n // didn't increment anything\n this.prerelease.push(0)\n }\n }\n if (identifier) {\n // 1.2.0-beta.1 bumps to 1.2.0-beta.2,\n // 1.2.0-beta.fooblz or 1.2.0-beta bumps to 1.2.0-beta.0\n if (this.prerelease[0] === identifier) {\n if (isNaN(this.prerelease[1])) {\n this.prerelease = [identifier, 0]\n }\n } else {\n this.prerelease = [identifier, 0]\n }\n }\n break\n\n default:\n throw new Error('invalid increment argument: ' + release)\n }\n this.format()\n this.raw = this.version\n return this\n}\n\nexports.inc = inc\nfunction inc (version, release, loose, identifier) {\n if (typeof (loose) === 'string') {\n identifier = loose\n loose = undefined\n }\n\n try {\n return new SemVer(version, loose).inc(release, identifier).version\n } catch (er) {\n return null\n }\n}\n\nexports.diff = diff\nfunction diff (version1, version2) {\n if (eq(version1, version2)) {\n return null\n } else {\n var v1 = parse(version1)\n var v2 = parse(version2)\n var prefix = ''\n if (v1.prerelease.length || v2.prerelease.length) {\n prefix = 'pre'\n var defaultResult = 'prerelease'\n }\n for (var key in v1) {\n if (key === 'major' || key === 'minor' || key === 'patch') {\n if (v1[key] !== v2[key]) {\n return prefix + key\n }\n }\n }\n return defaultResult // may be undefined\n }\n}\n\nexports.compareIdentifiers = compareIdentifiers\n\nvar numeric = /^[0-9]+$/\nfunction compareIdentifiers (a, b) {\n var anum = numeric.test(a)\n var bnum = numeric.test(b)\n\n if (anum && bnum) {\n a = +a\n b = +b\n }\n\n return a === b ? 0\n : (anum && !bnum) ? -1\n : (bnum && !anum) ? 1\n : a < b ? -1\n : 1\n}\n\nexports.rcompareIdentifiers = rcompareIdentifiers\nfunction rcompareIdentifiers (a, b) {\n return compareIdentifiers(b, a)\n}\n\nexports.major = major\nfunction major (a, loose) {\n return new SemVer(a, loose).major\n}\n\nexports.minor = minor\nfunction minor (a, loose) {\n return new SemVer(a, loose).minor\n}\n\nexports.patch = patch\nfunction patch (a, loose) {\n return new SemVer(a, loose).patch\n}\n\nexports.compare = compare\nfunction compare (a, b, loose) {\n return new SemVer(a, loose).compare(new SemVer(b, loose))\n}\n\nexports.compareLoose = compareLoose\nfunction compareLoose (a, b) {\n return compare(a, b, true)\n}\n\nexports.compareBuild = compareBuild\nfunction compareBuild (a, b, loose) {\n var versionA = new SemVer(a, loose)\n var versionB = new SemVer(b, loose)\n return versionA.compare(versionB) || versionA.compareBuild(versionB)\n}\n\nexports.rcompare = rcompare\nfunction rcompare (a, b, loose) {\n return compare(b, a, loose)\n}\n\nexports.sort = sort\nfunction sort (list, loose) {\n return list.sort(function (a, b) {\n return exports.compareBuild(a, b, loose)\n })\n}\n\nexports.rsort = rsort\nfunction rsort (list, loose) {\n return list.sort(function (a, b) {\n return exports.compareBuild(b, a, loose)\n })\n}\n\nexports.gt = gt\nfunction gt (a, b, loose) {\n return compare(a, b, loose) > 0\n}\n\nexports.lt = lt\nfunction lt (a, b, loose) {\n return compare(a, b, loose) < 0\n}\n\nexports.eq = eq\nfunction eq (a, b, loose) {\n return compare(a, b, loose) === 0\n}\n\nexports.neq = neq\nfunction neq (a, b, loose) {\n return compare(a, b, loose) !== 0\n}\n\nexports.gte = gte\nfunction gte (a, b, loose) {\n return compare(a, b, loose) >= 0\n}\n\nexports.lte = lte\nfunction lte (a, b, loose) {\n return compare(a, b, loose) <= 0\n}\n\nexports.cmp = cmp\nfunction cmp (a, op, b, loose) {\n switch (op) {\n case '===':\n if (typeof a === 'object')\n a = a.version\n if (typeof b === 'object')\n b = b.version\n return a === b\n\n case '!==':\n if (typeof a === 'object')\n a = a.version\n if (typeof b === 'object')\n b = b.version\n return a !== b\n\n case '':\n case '=':\n case '==':\n return eq(a, b, loose)\n\n case '!=':\n return neq(a, b, loose)\n\n case '>':\n return gt(a, b, loose)\n\n case '>=':\n return gte(a, b, loose)\n\n case '<':\n return lt(a, b, loose)\n\n case '<=':\n return lte(a, b, loose)\n\n default:\n throw new TypeError('Invalid operator: ' + op)\n }\n}\n\nexports.Comparator = Comparator\nfunction Comparator (comp, options) {\n if (!options || typeof options !== 'object') {\n options = {\n loose: !!options,\n includePrerelease: false\n }\n }\n\n if (comp instanceof Comparator) {\n if (comp.loose === !!options.loose) {\n return comp\n } else {\n comp = comp.value\n }\n }\n\n if (!(this instanceof Comparator)) {\n return new Comparator(comp, options)\n }\n\n comp = comp.trim().split(/\\s+/).join(' ')\n debug('comparator', comp, options)\n this.options = options\n this.loose = !!options.loose\n this.parse(comp)\n\n if (this.semver === ANY) {\n this.value = ''\n } else {\n this.value = this.operator + this.semver.version\n }\n\n debug('comp', this)\n}\n\nvar ANY = {}\nComparator.prototype.parse = function (comp) {\n var r = this.options.loose ? safeRe[t.COMPARATORLOOSE] : safeRe[t.COMPARATOR]\n var m = comp.match(r)\n\n if (!m) {\n throw new TypeError('Invalid comparator: ' + comp)\n }\n\n this.operator = m[1] !== undefined ? m[1] : ''\n if (this.operator === '=') {\n this.operator = ''\n }\n\n // if it literally is just '>' or '' then allow anything.\n if (!m[2]) {\n this.semver = ANY\n } else {\n this.semver = new SemVer(m[2], this.options.loose)\n }\n}\n\nComparator.prototype.toString = function () {\n return this.value\n}\n\nComparator.prototype.test = function (version) {\n debug('Comparator.test', version, this.options.loose)\n\n if (this.semver === ANY || version === ANY) {\n return true\n }\n\n if (typeof version === 'string') {\n try {\n version = new SemVer(version, this.options)\n } catch (er) {\n return false\n }\n }\n\n return cmp(version, this.operator, this.semver, this.options)\n}\n\nComparator.prototype.intersects = function (comp, options) {\n if (!(comp instanceof Comparator)) {\n throw new TypeError('a Comparator is required')\n }\n\n if (!options || typeof options !== 'object') {\n options = {\n loose: !!options,\n includePrerelease: false\n }\n }\n\n var rangeTmp\n\n if (this.operator === '') {\n if (this.value === '') {\n return true\n }\n rangeTmp = new Range(comp.value, options)\n return satisfies(this.value, rangeTmp, options)\n } else if (comp.operator === '') {\n if (comp.value === '') {\n return true\n }\n rangeTmp = new Range(this.value, options)\n return satisfies(comp.semver, rangeTmp, options)\n }\n\n var sameDirectionIncreasing =\n (this.operator === '>=' || this.operator === '>') &&\n (comp.operator === '>=' || comp.operator === '>')\n var sameDirectionDecreasing =\n (this.operator === '<=' || this.operator === '<') &&\n (comp.operator === '<=' || comp.operator === '<')\n var sameSemVer = this.semver.version === comp.semver.version\n var differentDirectionsInclusive =\n (this.operator === '>=' || this.operator === '<=') &&\n (comp.operator === '>=' || comp.operator === '<=')\n var oppositeDirectionsLessThan =\n cmp(this.semver, '<', comp.semver, options) &&\n ((this.operator === '>=' || this.operator === '>') &&\n (comp.operator === '<=' || comp.operator === '<'))\n var oppositeDirectionsGreaterThan =\n cmp(this.semver, '>', comp.semver, options) &&\n ((this.operator === '<=' || this.operator === '<') &&\n (comp.operator === '>=' || comp.operator === '>'))\n\n return sameDirectionIncreasing || sameDirectionDecreasing ||\n (sameSemVer && differentDirectionsInclusive) ||\n oppositeDirectionsLessThan || oppositeDirectionsGreaterThan\n}\n\nexports.Range = Range\nfunction Range (range, options) {\n if (!options || typeof options !== 'object') {\n options = {\n loose: !!options,\n includePrerelease: false\n }\n }\n\n if (range instanceof Range) {\n if (range.loose === !!options.loose &&\n range.includePrerelease === !!options.includePrerelease) {\n return range\n } else {\n return new Range(range.raw, options)\n }\n }\n\n if (range instanceof Comparator) {\n return new Range(range.value, options)\n }\n\n if (!(this instanceof Range)) {\n return new Range(range, options)\n }\n\n this.options = options\n this.loose = !!options.loose\n this.includePrerelease = !!options.includePrerelease\n\n // First reduce all whitespace as much as possible so we do not have to rely\n // on potentially slow regexes like \\s*. This is then stored and used for\n // future error messages as well.\n this.raw = range\n .trim()\n .split(/\\s+/)\n .join(' ')\n\n // First, split based on boolean or ||\n this.set = this.raw.split('||').map(function (range) {\n return this.parseRange(range.trim())\n }, this).filter(function (c) {\n // throw out any that are not relevant for whatever reason\n return c.length\n })\n\n if (!this.set.length) {\n throw new TypeError('Invalid SemVer Range: ' + this.raw)\n }\n\n this.format()\n}\n\nRange.prototype.format = function () {\n this.range = this.set.map(function (comps) {\n return comps.join(' ').trim()\n }).join('||').trim()\n return this.range\n}\n\nRange.prototype.toString = function () {\n return this.range\n}\n\nRange.prototype.parseRange = function (range) {\n var loose = this.options.loose\n // `1.2.3 - 1.2.4` => `>=1.2.3 <=1.2.4`\n var hr = loose ? safeRe[t.HYPHENRANGELOOSE] : safeRe[t.HYPHENRANGE]\n range = range.replace(hr, hyphenReplace)\n debug('hyphen replace', range)\n // `> 1.2.3 < 1.2.5` => `>1.2.3 <1.2.5`\n range = range.replace(safeRe[t.COMPARATORTRIM], comparatorTrimReplace)\n debug('comparator trim', range, safeRe[t.COMPARATORTRIM])\n\n // `~ 1.2.3` => `~1.2.3`\n range = range.replace(safeRe[t.TILDETRIM], tildeTrimReplace)\n\n // `^ 1.2.3` => `^1.2.3`\n range = range.replace(safeRe[t.CARETTRIM], caretTrimReplace)\n\n // normalize spaces\n range = range.split(/\\s+/).join(' ')\n\n // At this point, the range is completely trimmed and\n // ready to be split into comparators.\n\n var compRe = loose ? safeRe[t.COMPARATORLOOSE] : safeRe[t.COMPARATOR]\n var set = range.split(' ').map(function (comp) {\n return parseComparator(comp, this.options)\n }, this).join(' ').split(/\\s+/)\n if (this.options.loose) {\n // in loose mode, throw out any that are not valid comparators\n set = set.filter(function (comp) {\n return !!comp.match(compRe)\n })\n }\n set = set.map(function (comp) {\n return new Comparator(comp, this.options)\n }, this)\n\n return set\n}\n\nRange.prototype.intersects = function (range, options) {\n if (!(range instanceof Range)) {\n throw new TypeError('a Range is required')\n }\n\n return this.set.some(function (thisComparators) {\n return (\n isSatisfiable(thisComparators, options) &&\n range.set.some(function (rangeComparators) {\n return (\n isSatisfiable(rangeComparators, options) &&\n thisComparators.every(function (thisComparator) {\n return rangeComparators.every(function (rangeComparator) {\n return thisComparator.intersects(rangeComparator, options)\n })\n })\n )\n })\n )\n })\n}\n\n// take a set of comparators and determine whether there\n// exists a version which can satisfy it\nfunction isSatisfiable (comparators, options) {\n var result = true\n var remainingComparators = comparators.slice()\n var testComparator = remainingComparators.pop()\n\n while (result && remainingComparators.length) {\n result = remainingComparators.every(function (otherComparator) {\n return testComparator.intersects(otherComparator, options)\n })\n\n testComparator = remainingComparators.pop()\n }\n\n return result\n}\n\n// Mostly just for testing and legacy API reasons\nexports.toComparators = toComparators\nfunction toComparators (range, options) {\n return new Range(range, options).set.map(function (comp) {\n return comp.map(function (c) {\n return c.value\n }).join(' ').trim().split(' ')\n })\n}\n\n// comprised of xranges, tildes, stars, and gtlt's at this point.\n// already replaced the hyphen ranges\n// turn into a set of JUST comparators.\nfunction parseComparator (comp, options) {\n debug('comp', comp, options)\n comp = replaceCarets(comp, options)\n debug('caret', comp)\n comp = replaceTildes(comp, options)\n debug('tildes', comp)\n comp = replaceXRanges(comp, options)\n debug('xrange', comp)\n comp = replaceStars(comp, options)\n debug('stars', comp)\n return comp\n}\n\nfunction isX (id) {\n return !id || id.toLowerCase() === 'x' || id === '*'\n}\n\n// ~, ~> --> * (any, kinda silly)\n// ~2, ~2.x, ~2.x.x, ~>2, ~>2.x ~>2.x.x --> >=2.0.0 <3.0.0\n// ~2.0, ~2.0.x, ~>2.0, ~>2.0.x --> >=2.0.0 <2.1.0\n// ~1.2, ~1.2.x, ~>1.2, ~>1.2.x --> >=1.2.0 <1.3.0\n// ~1.2.3, ~>1.2.3 --> >=1.2.3 <1.3.0\n// ~1.2.0, ~>1.2.0 --> >=1.2.0 <1.3.0\nfunction replaceTildes (comp, options) {\n return comp.trim().split(/\\s+/).map(function (comp) {\n return replaceTilde(comp, options)\n }).join(' ')\n}\n\nfunction replaceTilde (comp, options) {\n var r = options.loose ? safeRe[t.TILDELOOSE] : safeRe[t.TILDE]\n return comp.replace(r, function (_, M, m, p, pr) {\n debug('tilde', comp, _, M, m, p, pr)\n var ret\n\n if (isX(M)) {\n ret = ''\n } else if (isX(m)) {\n ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0'\n } else if (isX(p)) {\n // ~1.2 == >=1.2.0 <1.3.0\n ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0'\n } else if (pr) {\n debug('replaceTilde pr', pr)\n ret = '>=' + M + '.' + m + '.' + p + '-' + pr +\n ' <' + M + '.' + (+m + 1) + '.0'\n } else {\n // ~1.2.3 == >=1.2.3 <1.3.0\n ret = '>=' + M + '.' + m + '.' + p +\n ' <' + M + '.' + (+m + 1) + '.0'\n }\n\n debug('tilde return', ret)\n return ret\n })\n}\n\n// ^ --> * (any, kinda silly)\n// ^2, ^2.x, ^2.x.x --> >=2.0.0 <3.0.0\n// ^2.0, ^2.0.x --> >=2.0.0 <3.0.0\n// ^1.2, ^1.2.x --> >=1.2.0 <2.0.0\n// ^1.2.3 --> >=1.2.3 <2.0.0\n// ^1.2.0 --> >=1.2.0 <2.0.0\nfunction replaceCarets (comp, options) {\n return comp.trim().split(/\\s+/).map(function (comp) {\n return replaceCaret(comp, options)\n }).join(' ')\n}\n\nfunction replaceCaret (comp, options) {\n debug('caret', comp, options)\n var r = options.loose ? safeRe[t.CARETLOOSE] : safeRe[t.CARET]\n return comp.replace(r, function (_, M, m, p, pr) {\n debug('caret', comp, _, M, m, p, pr)\n var ret\n\n if (isX(M)) {\n ret = ''\n } else if (isX(m)) {\n ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0'\n } else if (isX(p)) {\n if (M === '0') {\n ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0'\n } else {\n ret = '>=' + M + '.' + m + '.0 <' + (+M + 1) + '.0.0'\n }\n } else if (pr) {\n debug('replaceCaret pr', pr)\n if (M === '0') {\n if (m === '0') {\n ret = '>=' + M + '.' + m + '.' + p + '-' + pr +\n ' <' + M + '.' + m + '.' + (+p + 1)\n } else {\n ret = '>=' + M + '.' + m + '.' + p + '-' + pr +\n ' <' + M + '.' + (+m + 1) + '.0'\n }\n } else {\n ret = '>=' + M + '.' + m + '.' + p + '-' + pr +\n ' <' + (+M + 1) + '.0.0'\n }\n } else {\n debug('no pr')\n if (M === '0') {\n if (m === '0') {\n ret = '>=' + M + '.' + m + '.' + p +\n ' <' + M + '.' + m + '.' + (+p + 1)\n } else {\n ret = '>=' + M + '.' + m + '.' + p +\n ' <' + M + '.' + (+m + 1) + '.0'\n }\n } else {\n ret = '>=' + M + '.' + m + '.' + p +\n ' <' + (+M + 1) + '.0.0'\n }\n }\n\n debug('caret return', ret)\n return ret\n })\n}\n\nfunction replaceXRanges (comp, options) {\n debug('replaceXRanges', comp, options)\n return comp.split(/\\s+/).map(function (comp) {\n return replaceXRange(comp, options)\n }).join(' ')\n}\n\nfunction replaceXRange (comp, options) {\n comp = comp.trim()\n var r = options.loose ? safeRe[t.XRANGELOOSE] : safeRe[t.XRANGE]\n return comp.replace(r, function (ret, gtlt, M, m, p, pr) {\n debug('xRange', comp, ret, gtlt, M, m, p, pr)\n var xM = isX(M)\n var xm = xM || isX(m)\n var xp = xm || isX(p)\n var anyX = xp\n\n if (gtlt === '=' && anyX) {\n gtlt = ''\n }\n\n // if we're including prereleases in the match, then we need\n // to fix this to -0, the lowest possible prerelease value\n pr = options.includePrerelease ? '-0' : ''\n\n if (xM) {\n if (gtlt === '>' || gtlt === '<') {\n // nothing is allowed\n ret = '<0.0.0-0'\n } else {\n // nothing is forbidden\n ret = '*'\n }\n } else if (gtlt && anyX) {\n // we know patch is an x, because we have any x at all.\n // replace X with 0\n if (xm) {\n m = 0\n }\n p = 0\n\n if (gtlt === '>') {\n // >1 => >=2.0.0\n // >1.2 => >=1.3.0\n // >1.2.3 => >= 1.2.4\n gtlt = '>='\n if (xm) {\n M = +M + 1\n m = 0\n p = 0\n } else {\n m = +m + 1\n p = 0\n }\n } else if (gtlt === '<=') {\n // <=0.7.x is actually <0.8.0, since any 0.7.x should\n // pass. Similarly, <=7.x is actually <8.0.0, etc.\n gtlt = '<'\n if (xm) {\n M = +M + 1\n } else {\n m = +m + 1\n }\n }\n\n ret = gtlt + M + '.' + m + '.' + p + pr\n } else if (xm) {\n ret = '>=' + M + '.0.0' + pr + ' <' + (+M + 1) + '.0.0' + pr\n } else if (xp) {\n ret = '>=' + M + '.' + m + '.0' + pr +\n ' <' + M + '.' + (+m + 1) + '.0' + pr\n }\n\n debug('xRange return', ret)\n\n return ret\n })\n}\n\n// Because * is AND-ed with everything else in the comparator,\n// and '' means \"any version\", just remove the *s entirely.\nfunction replaceStars (comp, options) {\n debug('replaceStars', comp, options)\n // Looseness is ignored here. star is always as loose as it gets!\n return comp.trim().replace(safeRe[t.STAR], '')\n}\n\n// This function is passed to string.replace(re[t.HYPHENRANGE])\n// M, m, patch, prerelease, build\n// 1.2 - 3.4.5 => >=1.2.0 <=3.4.5\n// 1.2.3 - 3.4 => >=1.2.0 <3.5.0 Any 3.4.x will do\n// 1.2 - 3.4 => >=1.2.0 <3.5.0\nfunction hyphenReplace ($0,\n from, fM, fm, fp, fpr, fb,\n to, tM, tm, tp, tpr, tb) {\n if (isX(fM)) {\n from = ''\n } else if (isX(fm)) {\n from = '>=' + fM + '.0.0'\n } else if (isX(fp)) {\n from = '>=' + fM + '.' + fm + '.0'\n } else {\n from = '>=' + from\n }\n\n if (isX(tM)) {\n to = ''\n } else if (isX(tm)) {\n to = '<' + (+tM + 1) + '.0.0'\n } else if (isX(tp)) {\n to = '<' + tM + '.' + (+tm + 1) + '.0'\n } else if (tpr) {\n to = '<=' + tM + '.' + tm + '.' + tp + '-' + tpr\n } else {\n to = '<=' + to\n }\n\n return (from + ' ' + to).trim()\n}\n\n// if ANY of the sets match ALL of its comparators, then pass\nRange.prototype.test = function (version) {\n if (!version) {\n return false\n }\n\n if (typeof version === 'string') {\n try {\n version = new SemVer(version, this.options)\n } catch (er) {\n return false\n }\n }\n\n for (var i = 0; i < this.set.length; i++) {\n if (testSet(this.set[i], version, this.options)) {\n return true\n }\n }\n return false\n}\n\nfunction testSet (set, version, options) {\n for (var i = 0; i < set.length; i++) {\n if (!set[i].test(version)) {\n return false\n }\n }\n\n if (version.prerelease.length && !options.includePrerelease) {\n // Find the set of versions that are allowed to have prereleases\n // For example, ^1.2.3-pr.1 desugars to >=1.2.3-pr.1 <2.0.0\n // That should allow `1.2.3-pr.2` to pass.\n // However, `1.2.4-alpha.notready` should NOT be allowed,\n // even though it's within the range set by the comparators.\n for (i = 0; i < set.length; i++) {\n debug(set[i].semver)\n if (set[i].semver === ANY) {\n continue\n }\n\n if (set[i].semver.prerelease.length > 0) {\n var allowed = set[i].semver\n if (allowed.major === version.major &&\n allowed.minor === version.minor &&\n allowed.patch === version.patch) {\n return true\n }\n }\n }\n\n // Version has a -pre, but it's not one of the ones we like.\n return false\n }\n\n return true\n}\n\nexports.satisfies = satisfies\nfunction satisfies (version, range, options) {\n try {\n range = new Range(range, options)\n } catch (er) {\n return false\n }\n return range.test(version)\n}\n\nexports.maxSatisfying = maxSatisfying\nfunction maxSatisfying (versions, range, options) {\n var max = null\n var maxSV = null\n try {\n var rangeObj = new Range(range, options)\n } catch (er) {\n return null\n }\n versions.forEach(function (v) {\n if (rangeObj.test(v)) {\n // satisfies(v, range, options)\n if (!max || maxSV.compare(v) === -1) {\n // compare(max, v, true)\n max = v\n maxSV = new SemVer(max, options)\n }\n }\n })\n return max\n}\n\nexports.minSatisfying = minSatisfying\nfunction minSatisfying (versions, range, options) {\n var min = null\n var minSV = null\n try {\n var rangeObj = new Range(range, options)\n } catch (er) {\n return null\n }\n versions.forEach(function (v) {\n if (rangeObj.test(v)) {\n // satisfies(v, range, options)\n if (!min || minSV.compare(v) === 1) {\n // compare(min, v, true)\n min = v\n minSV = new SemVer(min, options)\n }\n }\n })\n return min\n}\n\nexports.minVersion = minVersion\nfunction minVersion (range, loose) {\n range = new Range(range, loose)\n\n var minver = new SemVer('0.0.0')\n if (range.test(minver)) {\n return minver\n }\n\n minver = new SemVer('0.0.0-0')\n if (range.test(minver)) {\n return minver\n }\n\n minver = null\n for (var i = 0; i < range.set.length; ++i) {\n var comparators = range.set[i]\n\n comparators.forEach(function (comparator) {\n // Clone to avoid manipulating the comparator's semver object.\n var compver = new SemVer(comparator.semver.version)\n switch (comparator.operator) {\n case '>':\n if (compver.prerelease.length === 0) {\n compver.patch++\n } else {\n compver.prerelease.push(0)\n }\n compver.raw = compver.format()\n /* fallthrough */\n case '':\n case '>=':\n if (!minver || gt(minver, compver)) {\n minver = compver\n }\n break\n case '<':\n case '<=':\n /* Ignore maximum versions */\n break\n /* istanbul ignore next */\n default:\n throw new Error('Unexpected operation: ' + comparator.operator)\n }\n })\n }\n\n if (minver && range.test(minver)) {\n return minver\n }\n\n return null\n}\n\nexports.validRange = validRange\nfunction validRange (range, options) {\n try {\n // Return '*' instead of '' so that truthiness works.\n // This will throw if it's invalid anyway\n return new Range(range, options).range || '*'\n } catch (er) {\n return null\n }\n}\n\n// Determine if version is less than all the versions possible in the range\nexports.ltr = ltr\nfunction ltr (version, range, options) {\n return outside(version, range, '<', options)\n}\n\n// Determine if version is greater than all the versions possible in the range.\nexports.gtr = gtr\nfunction gtr (version, range, options) {\n return outside(version, range, '>', options)\n}\n\nexports.outside = outside\nfunction outside (version, range, hilo, options) {\n version = new SemVer(version, options)\n range = new Range(range, options)\n\n var gtfn, ltefn, ltfn, comp, ecomp\n switch (hilo) {\n case '>':\n gtfn = gt\n ltefn = lte\n ltfn = lt\n comp = '>'\n ecomp = '>='\n break\n case '<':\n gtfn = lt\n ltefn = gte\n ltfn = gt\n comp = '<'\n ecomp = '<='\n break\n default:\n throw new TypeError('Must provide a hilo val of \"<\" or \">\"')\n }\n\n // If it satisifes the range it is not outside\n if (satisfies(version, range, options)) {\n return false\n }\n\n // From now on, variable terms are as if we're in \"gtr\" mode.\n // but note that everything is flipped for the \"ltr\" function.\n\n for (var i = 0; i < range.set.length; ++i) {\n var comparators = range.set[i]\n\n var high = null\n var low = null\n\n comparators.forEach(function (comparator) {\n if (comparator.semver === ANY) {\n comparator = new Comparator('>=0.0.0')\n }\n high = high || comparator\n low = low || comparator\n if (gtfn(comparator.semver, high.semver, options)) {\n high = comparator\n } else if (ltfn(comparator.semver, low.semver, options)) {\n low = comparator\n }\n })\n\n // If the edge version comparator has a operator then our version\n // isn't outside it\n if (high.operator === comp || high.operator === ecomp) {\n return false\n }\n\n // If the lowest version comparator has an operator and our version\n // is less than it then it isn't higher than the range\n if ((!low.operator || low.operator === comp) &&\n ltefn(version, low.semver)) {\n return false\n } else if (low.operator === ecomp && ltfn(version, low.semver)) {\n return false\n }\n }\n return true\n}\n\nexports.prerelease = prerelease\nfunction prerelease (version, options) {\n var parsed = parse(version, options)\n return (parsed && parsed.prerelease.length) ? parsed.prerelease : null\n}\n\nexports.intersects = intersects\nfunction intersects (r1, r2, options) {\n r1 = new Range(r1, options)\n r2 = new Range(r2, options)\n return r1.intersects(r2)\n}\n\nexports.coerce = coerce\nfunction coerce (version, options) {\n if (version instanceof SemVer) {\n return version\n }\n\n if (typeof version === 'number') {\n version = String(version)\n }\n\n if (typeof version !== 'string') {\n return null\n }\n\n options = options || {}\n\n var match = null\n if (!options.rtl) {\n match = version.match(safeRe[t.COERCE])\n } else {\n // Find the right-most coercible string that does not share\n // a terminus with a more left-ward coercible string.\n // Eg, '1.2.3.4' wants to coerce '2.3.4', not '3.4' or '4'\n //\n // Walk through the string checking with a /g regexp\n // Manually set the index so as to pick up overlapping matches.\n // Stop when we get a match that ends at the string end, since no\n // coercible string can be more right-ward without the same terminus.\n var next\n while ((next = safeRe[t.COERCERTL].exec(version)) &&\n (!match || match.index + match[0].length !== version.length)\n ) {\n if (!match ||\n next.index + next[0].length !== match.index + match[0].length) {\n match = next\n }\n safeRe[t.COERCERTL].lastIndex = next.index + next[1].length + next[2].length\n }\n // leave it in a clean state\n safeRe[t.COERCERTL].lastIndex = -1\n }\n\n if (match === null) {\n return null\n }\n\n return parse(match[2] +\n '.' + (match[3] || '0') +\n '.' + (match[4] || '0'), options)\n}\n","\"use strict\";\n\nexports.__esModule = true;\nexports.hasMinVersion = hasMinVersion;\nvar _semver = _interopRequireDefault(require(\"semver\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nfunction hasMinVersion(minVersion, runtimeVersion) {\n // If the range is unavailable, we're running the script during Babel's\n // build process, and we want to assume that all versions are satisfied so\n // that the built output will include all definitions.\n if (!runtimeVersion || !minVersion) return true;\n runtimeVersion = String(runtimeVersion);\n\n // semver.intersects() has some surprising behavior with comparing ranges\n // with preprelease versions. We add '^' to ensure that we are always\n // comparing ranges with ranges, which sidesteps this logic.\n // For example:\n //\n // semver.intersects(`<7.0.1`, \"7.0.0-beta.0\") // false - surprising\n // semver.intersects(`<7.0.1`, \"^7.0.0-beta.0\") // true - expected\n //\n // This is because the first falls back to\n //\n // semver.satisfies(\"7.0.0-beta.0\", `<7.0.1`) // false - surprising\n //\n // and this fails because a prerelease version can only satisfy a range\n // if it is a prerelease within the same major/minor/patch range.\n //\n // Note: If this is found to have issues, please also revist the logic in\n // babel-core's availableHelper() API.\n if (_semver.default.valid(runtimeVersion)) runtimeVersion = `^${runtimeVersion}`;\n return !_semver.default.intersects(`<${minVersion}`, runtimeVersion) && !_semver.default.intersects(`>=8.0.0`, runtimeVersion);\n}","\"use strict\";\n\nexports.__esModule = true;\nexports.createUtilsGetter = createUtilsGetter;\nexports.getImportSource = getImportSource;\nexports.getRequireSource = getRequireSource;\nexports.has = has;\nexports.intersection = intersection;\nexports.resolveKey = resolveKey;\nexports.resolveSource = resolveSource;\nvar _babel = _interopRequireWildcard(require(\"@babel/core\"));\nfunction _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== \"function\") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }\nfunction _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== \"object\" && typeof obj !== \"function\") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== \"default\" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }\nconst {\n types: t,\n template: template\n} = _babel.default || _babel;\nfunction intersection(a, b) {\n const result = new Set();\n a.forEach(v => b.has(v) && result.add(v));\n return result;\n}\nfunction has(object, key) {\n return Object.prototype.hasOwnProperty.call(object, key);\n}\nfunction getType(target) {\n return Object.prototype.toString.call(target).slice(8, -1);\n}\nfunction resolveId(path) {\n if (path.isIdentifier() && !path.scope.hasBinding(path.node.name, /* noGlobals */true)) {\n return path.node.name;\n }\n if (path.isPure()) {\n const {\n deopt\n } = path.evaluate();\n if (deopt && deopt.isIdentifier()) {\n return deopt.node.name;\n }\n }\n}\nfunction resolveKey(path, computed = false) {\n const {\n scope\n } = path;\n if (path.isStringLiteral()) return path.node.value;\n const isIdentifier = path.isIdentifier();\n if (isIdentifier && !(computed || path.parent.computed)) {\n return path.node.name;\n }\n if (computed && path.isMemberExpression() && path.get(\"object\").isIdentifier({\n name: \"Symbol\"\n }) && !scope.hasBinding(\"Symbol\", /* noGlobals */true)) {\n const sym = resolveKey(path.get(\"property\"), path.node.computed);\n if (sym) return \"Symbol.\" + sym;\n }\n if (isIdentifier ? scope.hasBinding(path.node.name, /* noGlobals */true) : path.isPure()) {\n const {\n value\n } = path.evaluate();\n if (typeof value === \"string\") return value;\n }\n}\nfunction resolveSource(obj) {\n if (obj.isMemberExpression() && obj.get(\"property\").isIdentifier({\n name: \"prototype\"\n })) {\n const id = resolveId(obj.get(\"object\"));\n if (id) {\n return {\n id,\n placement: \"prototype\"\n };\n }\n return {\n id: null,\n placement: null\n };\n }\n const id = resolveId(obj);\n if (id) {\n return {\n id,\n placement: \"static\"\n };\n }\n if (obj.isRegExpLiteral()) {\n return {\n id: \"RegExp\",\n placement: \"prototype\"\n };\n } else if (obj.isFunction()) {\n return {\n id: \"Function\",\n placement: \"prototype\"\n };\n } else if (obj.isPure()) {\n const {\n value\n } = obj.evaluate();\n if (value !== undefined) {\n return {\n id: getType(value),\n placement: \"prototype\"\n };\n }\n }\n return {\n id: null,\n placement: null\n };\n}\nfunction getImportSource({\n node\n}) {\n if (node.specifiers.length === 0) return node.source.value;\n}\nfunction getRequireSource({\n node\n}) {\n if (!t.isExpressionStatement(node)) return;\n const {\n expression\n } = node;\n if (t.isCallExpression(expression) && t.isIdentifier(expression.callee) && expression.callee.name === \"require\" && expression.arguments.length === 1 && t.isStringLiteral(expression.arguments[0])) {\n return expression.arguments[0].value;\n }\n}\nfunction hoist(node) {\n // @ts-expect-error\n node._blockHoist = 3;\n return node;\n}\nfunction createUtilsGetter(cache) {\n return path => {\n const prog = path.findParent(p => p.isProgram());\n return {\n injectGlobalImport(url, moduleName) {\n cache.storeAnonymous(prog, url, moduleName, (isScript, source) => {\n return isScript ? template.statement.ast`require(${source})` : t.importDeclaration([], source);\n });\n },\n injectNamedImport(url, name, hint = name, moduleName) {\n return cache.storeNamed(prog, url, name, moduleName, (isScript, source, name) => {\n const id = prog.scope.generateUidIdentifier(hint);\n return {\n node: isScript ? hoist(template.statement.ast`\n var ${id} = require(${source}).${name}\n `) : t.importDeclaration([t.importSpecifier(id, name)], source),\n name: id.name\n };\n });\n },\n injectDefaultImport(url, hint = url, moduleName) {\n return cache.storeNamed(prog, url, \"default\", moduleName, (isScript, source) => {\n const id = prog.scope.generateUidIdentifier(hint);\n return {\n node: isScript ? hoist(template.statement.ast`var ${id} = require(${source})`) : t.importDeclaration([t.importDefaultSpecifier(id)], source),\n name: id.name\n };\n });\n }\n };\n };\n}","\"use strict\";\n\nexports.__esModule = true;\nexports.default = void 0;\nvar _babel = _interopRequireWildcard(require(\"@babel/core\"));\nfunction _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== \"function\") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }\nfunction _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== \"object\" && typeof obj !== \"function\") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== \"default\" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }\nconst {\n types: t\n} = _babel.default || _babel;\nclass ImportsCachedInjector {\n constructor(resolver, getPreferredIndex) {\n this._imports = new WeakMap();\n this._anonymousImports = new WeakMap();\n this._lastImports = new WeakMap();\n this._resolver = resolver;\n this._getPreferredIndex = getPreferredIndex;\n }\n storeAnonymous(programPath, url, moduleName, getVal) {\n const key = this._normalizeKey(programPath, url);\n const imports = this._ensure(this._anonymousImports, programPath, Set);\n if (imports.has(key)) return;\n const node = getVal(programPath.node.sourceType === \"script\", t.stringLiteral(this._resolver(url)));\n imports.add(key);\n this._injectImport(programPath, node, moduleName);\n }\n storeNamed(programPath, url, name, moduleName, getVal) {\n const key = this._normalizeKey(programPath, url, name);\n const imports = this._ensure(this._imports, programPath, Map);\n if (!imports.has(key)) {\n const {\n node,\n name: id\n } = getVal(programPath.node.sourceType === \"script\", t.stringLiteral(this._resolver(url)), t.identifier(name));\n imports.set(key, id);\n this._injectImport(programPath, node, moduleName);\n }\n return t.identifier(imports.get(key));\n }\n _injectImport(programPath, node, moduleName) {\n var _this$_lastImports$ge;\n const newIndex = this._getPreferredIndex(moduleName);\n const lastImports = (_this$_lastImports$ge = this._lastImports.get(programPath)) != null ? _this$_lastImports$ge : [];\n const isPathStillValid = path => path.node &&\n // Sometimes the AST is modified and the \"last import\"\n // we have has been replaced\n path.parent === programPath.node && path.container === programPath.node.body;\n let last;\n if (newIndex === Infinity) {\n // Fast path: we can always just insert at the end if newIndex is `Infinity`\n if (lastImports.length > 0) {\n last = lastImports[lastImports.length - 1].path;\n if (!isPathStillValid(last)) last = undefined;\n }\n } else {\n for (const [i, data] of lastImports.entries()) {\n const {\n path,\n index\n } = data;\n if (isPathStillValid(path)) {\n if (newIndex < index) {\n const [newPath] = path.insertBefore(node);\n lastImports.splice(i, 0, {\n path: newPath,\n index: newIndex\n });\n return;\n }\n last = path;\n }\n }\n }\n if (last) {\n const [newPath] = last.insertAfter(node);\n lastImports.push({\n path: newPath,\n index: newIndex\n });\n } else {\n const [newPath] = programPath.unshiftContainer(\"body\", node);\n this._lastImports.set(programPath, [{\n path: newPath,\n index: newIndex\n }]);\n }\n }\n _ensure(map, programPath, Collection) {\n let collection = map.get(programPath);\n if (!collection) {\n collection = new Collection();\n map.set(programPath, collection);\n }\n return collection;\n }\n _normalizeKey(programPath, url, name = \"\") {\n const {\n sourceType\n } = programPath.node;\n\n // If we rely on the imported binding (the \"name\" parameter), we also need to cache\n // based on the sourceType. This is because the module transforms change the names\n // of the import variables.\n return `${name && sourceType}::${url}::${name}`;\n }\n}\nexports.default = ImportsCachedInjector;","\"use strict\";\n\nexports.__esModule = true;\nexports.presetEnvSilentDebugHeader = void 0;\nexports.stringifyTargets = stringifyTargets;\nexports.stringifyTargetsMultiline = stringifyTargetsMultiline;\nvar _helperCompilationTargets = require(\"@babel/helper-compilation-targets\");\nconst presetEnvSilentDebugHeader = \"#__secret_key__@babel/preset-env__don't_log_debug_header_and_resolved_targets\";\nexports.presetEnvSilentDebugHeader = presetEnvSilentDebugHeader;\nfunction stringifyTargetsMultiline(targets) {\n return JSON.stringify((0, _helperCompilationTargets.prettifyTargets)(targets), null, 2);\n}\nfunction stringifyTargets(targets) {\n return JSON.stringify(targets).replace(/,/g, \", \").replace(/^\\{\"/, '{ \"').replace(/\"\\}$/, '\" }');\n}","\"use strict\";\n\nexports.__esModule = true;\nexports.applyMissingDependenciesDefaults = applyMissingDependenciesDefaults;\nexports.validateIncludeExclude = validateIncludeExclude;\nvar _utils = require(\"./utils\");\nfunction patternToRegExp(pattern) {\n if (pattern instanceof RegExp) return pattern;\n try {\n return new RegExp(`^${pattern}$`);\n } catch (_unused) {\n return null;\n }\n}\nfunction buildUnusedError(label, unused) {\n if (!unused.length) return \"\";\n return ` - The following \"${label}\" patterns didn't match any polyfill:\\n` + unused.map(original => ` ${String(original)}\\n`).join(\"\");\n}\nfunction buldDuplicatesError(duplicates) {\n if (!duplicates.size) return \"\";\n return ` - The following polyfills were matched both by \"include\" and \"exclude\" patterns:\\n` + Array.from(duplicates, name => ` ${name}\\n`).join(\"\");\n}\nfunction validateIncludeExclude(provider, polyfills, includePatterns, excludePatterns) {\n let current;\n const filter = pattern => {\n const regexp = patternToRegExp(pattern);\n if (!regexp) return false;\n let matched = false;\n for (const polyfill of polyfills.keys()) {\n if (regexp.test(polyfill)) {\n matched = true;\n current.add(polyfill);\n }\n }\n return !matched;\n };\n\n // prettier-ignore\n const include = current = new Set();\n const unusedInclude = Array.from(includePatterns).filter(filter);\n\n // prettier-ignore\n const exclude = current = new Set();\n const unusedExclude = Array.from(excludePatterns).filter(filter);\n const duplicates = (0, _utils.intersection)(include, exclude);\n if (duplicates.size > 0 || unusedInclude.length > 0 || unusedExclude.length > 0) {\n throw new Error(`Error while validating the \"${provider}\" provider options:\\n` + buildUnusedError(\"include\", unusedInclude) + buildUnusedError(\"exclude\", unusedExclude) + buldDuplicatesError(duplicates));\n }\n return {\n include,\n exclude\n };\n}\nfunction applyMissingDependenciesDefaults(options, babelApi) {\n const {\n missingDependencies = {}\n } = options;\n if (missingDependencies === false) return false;\n const caller = babelApi.caller(caller => caller == null ? void 0 : caller.name);\n const {\n log = \"deferred\",\n inject = caller === \"rollup-plugin-babel\" ? \"throw\" : \"import\",\n all = false\n } = missingDependencies;\n return {\n log,\n inject,\n all\n };\n}","\"use strict\";\n\nexports.__esModule = true;\nexports.default = void 0;\nvar _utils = require(\"../utils\");\nfunction isRemoved(path) {\n if (path.removed) return true;\n if (!path.parentPath) return false;\n if (path.listKey) {\n var _path$parentPath$node;\n if (!((_path$parentPath$node = path.parentPath.node) != null && (_path$parentPath$node = _path$parentPath$node[path.listKey]) != null && _path$parentPath$node.includes(path.node))) return true;\n } else {\n if (path.parentPath.node[path.key] !== path.node) return true;\n }\n return isRemoved(path.parentPath);\n}\nvar _default = callProvider => {\n function property(object, key, placement, path) {\n return callProvider({\n kind: \"property\",\n object,\n key,\n placement\n }, path);\n }\n function handleReferencedIdentifier(path) {\n const {\n node: {\n name\n },\n scope\n } = path;\n if (scope.getBindingIdentifier(name)) return;\n callProvider({\n kind: \"global\",\n name\n }, path);\n }\n function analyzeMemberExpression(path) {\n const key = (0, _utils.resolveKey)(path.get(\"property\"), path.node.computed);\n return {\n key,\n handleAsMemberExpression: !!key && key !== \"prototype\"\n };\n }\n return {\n // Symbol(), new Promise\n ReferencedIdentifier(path) {\n const {\n parentPath\n } = path;\n if (parentPath.isMemberExpression({\n object: path.node\n }) && analyzeMemberExpression(parentPath).handleAsMemberExpression) {\n return;\n }\n handleReferencedIdentifier(path);\n },\n MemberExpression(path) {\n const {\n key,\n handleAsMemberExpression\n } = analyzeMemberExpression(path);\n if (!handleAsMemberExpression) return;\n const object = path.get(\"object\");\n let objectIsGlobalIdentifier = object.isIdentifier();\n if (objectIsGlobalIdentifier) {\n const binding = object.scope.getBinding(object.node.name);\n if (binding) {\n if (binding.path.isImportNamespaceSpecifier()) return;\n objectIsGlobalIdentifier = false;\n }\n }\n const source = (0, _utils.resolveSource)(object);\n let skipObject = property(source.id, key, source.placement, path);\n skipObject || (skipObject = !objectIsGlobalIdentifier || path.shouldSkip || object.shouldSkip || isRemoved(object));\n if (!skipObject) handleReferencedIdentifier(object);\n },\n ObjectPattern(path) {\n const {\n parentPath,\n parent\n } = path;\n let obj;\n\n // const { keys, values } = Object\n if (parentPath.isVariableDeclarator()) {\n obj = parentPath.get(\"init\");\n // ({ keys, values } = Object)\n } else if (parentPath.isAssignmentExpression()) {\n obj = parentPath.get(\"right\");\n // !function ({ keys, values }) {...} (Object)\n // resolution does not work after properties transform :-(\n } else if (parentPath.isFunction()) {\n const grand = parentPath.parentPath;\n if (grand.isCallExpression() || grand.isNewExpression()) {\n if (grand.node.callee === parent) {\n obj = grand.get(\"arguments\")[path.key];\n }\n }\n }\n let id = null;\n let placement = null;\n if (obj) ({\n id,\n placement\n } = (0, _utils.resolveSource)(obj));\n for (const prop of path.get(\"properties\")) {\n if (prop.isObjectProperty()) {\n const key = (0, _utils.resolveKey)(prop.get(\"key\"));\n if (key) property(id, key, placement, prop);\n }\n }\n },\n BinaryExpression(path) {\n if (path.node.operator !== \"in\") return;\n const source = (0, _utils.resolveSource)(path.get(\"right\"));\n const key = (0, _utils.resolveKey)(path.get(\"left\"), true);\n if (!key) return;\n callProvider({\n kind: \"in\",\n object: source.id,\n key,\n placement: source.placement\n }, path);\n }\n };\n};\nexports.default = _default;","\"use strict\";\n\nexports.__esModule = true;\nexports.default = void 0;\nvar _utils = require(\"../utils\");\nvar _default = callProvider => ({\n ImportDeclaration(path) {\n const source = (0, _utils.getImportSource)(path);\n if (!source) return;\n callProvider({\n kind: \"import\",\n source\n }, path);\n },\n Program(path) {\n path.get(\"body\").forEach(bodyPath => {\n const source = (0, _utils.getRequireSource)(bodyPath);\n if (!source) return;\n callProvider({\n kind: \"import\",\n source\n }, bodyPath);\n });\n }\n});\nexports.default = _default;","\"use strict\";\n\nexports.__esModule = true;\nexports.usage = exports.entry = void 0;\nvar _usage = _interopRequireDefault(require(\"./usage\"));\nexports.usage = _usage.default;\nvar _entry = _interopRequireDefault(require(\"./entry\"));\nexports.entry = _entry.default;\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }","\"use strict\";\n\nexports.__esModule = true;\nexports.has = has;\nexports.laterLogMissing = laterLogMissing;\nexports.logMissing = logMissing;\nexports.resolve = resolve;\nfunction resolve(dirname, moduleName, absoluteImports) {\n if (absoluteImports === false) return moduleName;\n throw new Error(`\"absoluteImports\" is not supported in bundles prepared for the browser.`);\n}\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nfunction has(basedir, name) {\n return true;\n}\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nfunction logMissing(missingDeps) {}\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nfunction laterLogMissing(missingDeps) {}","\"use strict\";\n\nexports.__esModule = true;\nexports.default = createMetaResolver;\nvar _utils = require(\"./utils\");\nconst PossibleGlobalObjects = new Set([\"global\", \"globalThis\", \"self\", \"window\"]);\nfunction createMetaResolver(polyfills) {\n const {\n static: staticP,\n instance: instanceP,\n global: globalP\n } = polyfills;\n return meta => {\n if (meta.kind === \"global\" && globalP && (0, _utils.has)(globalP, meta.name)) {\n return {\n kind: \"global\",\n desc: globalP[meta.name],\n name: meta.name\n };\n }\n if (meta.kind === \"property\" || meta.kind === \"in\") {\n const {\n placement,\n object,\n key\n } = meta;\n if (object && placement === \"static\") {\n if (globalP && PossibleGlobalObjects.has(object) && (0, _utils.has)(globalP, key)) {\n return {\n kind: \"global\",\n desc: globalP[key],\n name: key\n };\n }\n if (staticP && (0, _utils.has)(staticP, object) && (0, _utils.has)(staticP[object], key)) {\n return {\n kind: \"static\",\n desc: staticP[object][key],\n name: `${object}$${key}`\n };\n }\n }\n if (instanceP && (0, _utils.has)(instanceP, key)) {\n return {\n kind: \"instance\",\n desc: instanceP[key],\n name: `${key}`\n };\n }\n }\n };\n}","\"use strict\";\n\nexports.__esModule = true;\nexports.default = definePolyfillProvider;\nvar _helperPluginUtils = require(\"@babel/helper-plugin-utils\");\nvar _helperCompilationTargets = _interopRequireWildcard(require(\"@babel/helper-compilation-targets\"));\nvar _utils = require(\"./utils\");\nvar _importsInjector = _interopRequireDefault(require(\"./imports-injector\"));\nvar _debugUtils = require(\"./debug-utils\");\nvar _normalizeOptions = require(\"./normalize-options\");\nvar v = _interopRequireWildcard(require(\"./visitors\"));\nvar deps = _interopRequireWildcard(require(\"./node/dependencies\"));\nvar _metaResolver = _interopRequireDefault(require(\"./meta-resolver\"));\nconst _excluded = [\"method\", \"targets\", \"ignoreBrowserslistConfig\", \"configPath\", \"debug\", \"shouldInjectPolyfill\", \"absoluteImports\"];\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nfunction _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== \"function\") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }\nfunction _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== \"object\" && typeof obj !== \"function\") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== \"default\" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\nconst getTargets = _helperCompilationTargets.default.default || _helperCompilationTargets.default;\nfunction resolveOptions(options, babelApi) {\n const {\n method,\n targets: targetsOption,\n ignoreBrowserslistConfig,\n configPath,\n debug,\n shouldInjectPolyfill,\n absoluteImports\n } = options,\n providerOptions = _objectWithoutPropertiesLoose(options, _excluded);\n if (isEmpty(options)) {\n throw new Error(`\\\nThis plugin requires options, for example:\n {\n \"plugins\": [\n [\"\", { method: \"usage-pure\" }]\n ]\n }\n\nSee more options at https://github.com/babel/babel-polyfills/blob/main/docs/usage.md`);\n }\n let methodName;\n if (method === \"usage-global\") methodName = \"usageGlobal\";else if (method === \"entry-global\") methodName = \"entryGlobal\";else if (method === \"usage-pure\") methodName = \"usagePure\";else if (typeof method !== \"string\") {\n throw new Error(\".method must be a string\");\n } else {\n throw new Error(`.method must be one of \"entry-global\", \"usage-global\"` + ` or \"usage-pure\" (received ${JSON.stringify(method)})`);\n }\n if (typeof shouldInjectPolyfill === \"function\") {\n if (options.include || options.exclude) {\n throw new Error(`.include and .exclude are not supported when using the` + ` .shouldInjectPolyfill function.`);\n }\n } else if (shouldInjectPolyfill != null) {\n throw new Error(`.shouldInjectPolyfill must be a function, or undefined` + ` (received ${JSON.stringify(shouldInjectPolyfill)})`);\n }\n if (absoluteImports != null && typeof absoluteImports !== \"boolean\" && typeof absoluteImports !== \"string\") {\n throw new Error(`.absoluteImports must be a boolean, a string, or undefined` + ` (received ${JSON.stringify(absoluteImports)})`);\n }\n let targets;\n if (\n // If any browserslist-related option is specified, fallback to the old\n // behavior of not using the targets specified in the top-level options.\n targetsOption || configPath || ignoreBrowserslistConfig) {\n const targetsObj = typeof targetsOption === \"string\" || Array.isArray(targetsOption) ? {\n browsers: targetsOption\n } : targetsOption;\n targets = getTargets(targetsObj, {\n ignoreBrowserslistConfig,\n configPath\n });\n } else {\n targets = babelApi.targets();\n }\n return {\n method,\n methodName,\n targets,\n absoluteImports: absoluteImports != null ? absoluteImports : false,\n shouldInjectPolyfill,\n debug: !!debug,\n providerOptions: providerOptions\n };\n}\nfunction instantiateProvider(factory, options, missingDependencies, dirname, debugLog, babelApi) {\n const {\n method,\n methodName,\n targets,\n debug,\n shouldInjectPolyfill,\n providerOptions,\n absoluteImports\n } = resolveOptions(options, babelApi);\n\n // eslint-disable-next-line prefer-const\n let include, exclude;\n let polyfillsSupport;\n let polyfillsNames;\n let filterPolyfills;\n const getUtils = (0, _utils.createUtilsGetter)(new _importsInjector.default(moduleName => deps.resolve(dirname, moduleName, absoluteImports), name => {\n var _polyfillsNames$get, _polyfillsNames;\n return (_polyfillsNames$get = (_polyfillsNames = polyfillsNames) == null ? void 0 : _polyfillsNames.get(name)) != null ? _polyfillsNames$get : Infinity;\n }));\n const depsCache = new Map();\n const api = {\n babel: babelApi,\n getUtils,\n method: options.method,\n targets,\n createMetaResolver: _metaResolver.default,\n shouldInjectPolyfill(name) {\n if (polyfillsNames === undefined) {\n throw new Error(`Internal error in the ${factory.name} provider: ` + `shouldInjectPolyfill() can't be called during initialization.`);\n }\n if (!polyfillsNames.has(name)) {\n console.warn(`Internal error in the ${providerName} provider: ` + `unknown polyfill \"${name}\".`);\n }\n if (filterPolyfills && !filterPolyfills(name)) return false;\n let shouldInject = (0, _helperCompilationTargets.isRequired)(name, targets, {\n compatData: polyfillsSupport,\n includes: include,\n excludes: exclude\n });\n if (shouldInjectPolyfill) {\n shouldInject = shouldInjectPolyfill(name, shouldInject);\n if (typeof shouldInject !== \"boolean\") {\n throw new Error(`.shouldInjectPolyfill must return a boolean.`);\n }\n }\n return shouldInject;\n },\n debug(name) {\n var _debugLog, _debugLog$polyfillsSu;\n debugLog().found = true;\n if (!debug || !name) return;\n if (debugLog().polyfills.has(providerName)) return;\n debugLog().polyfills.add(name);\n (_debugLog$polyfillsSu = (_debugLog = debugLog()).polyfillsSupport) != null ? _debugLog$polyfillsSu : _debugLog.polyfillsSupport = polyfillsSupport;\n },\n assertDependency(name, version = \"*\") {\n if (missingDependencies === false) return;\n if (absoluteImports) {\n // If absoluteImports is not false, we will try resolving\n // the dependency and throw if it's not possible. We can\n // skip the check here.\n return;\n }\n const dep = version === \"*\" ? name : `${name}@^${version}`;\n const found = missingDependencies.all ? false : mapGetOr(depsCache, `${name} :: ${dirname}`, () => deps.has(dirname, name));\n if (!found) {\n debugLog().missingDeps.add(dep);\n }\n }\n };\n const provider = factory(api, providerOptions, dirname);\n const providerName = provider.name || factory.name;\n if (typeof provider[methodName] !== \"function\") {\n throw new Error(`The \"${providerName}\" provider doesn't support the \"${method}\" polyfilling method.`);\n }\n if (Array.isArray(provider.polyfills)) {\n polyfillsNames = new Map(provider.polyfills.map((name, index) => [name, index]));\n filterPolyfills = provider.filterPolyfills;\n } else if (provider.polyfills) {\n polyfillsNames = new Map(Object.keys(provider.polyfills).map((name, index) => [name, index]));\n polyfillsSupport = provider.polyfills;\n filterPolyfills = provider.filterPolyfills;\n } else {\n polyfillsNames = new Map();\n }\n ({\n include,\n exclude\n } = (0, _normalizeOptions.validateIncludeExclude)(providerName, polyfillsNames, providerOptions.include || [], providerOptions.exclude || []));\n let callProvider;\n if (methodName === \"usageGlobal\") {\n callProvider = (payload, path) => {\n var _ref;\n const utils = getUtils(path);\n return (_ref = provider[methodName](payload, utils, path)) != null ? _ref : false;\n };\n } else {\n callProvider = (payload, path) => {\n const utils = getUtils(path);\n provider[methodName](payload, utils, path);\n return false;\n };\n }\n return {\n debug,\n method,\n targets,\n provider,\n providerName,\n callProvider\n };\n}\nfunction definePolyfillProvider(factory) {\n return (0, _helperPluginUtils.declare)((babelApi, options, dirname) => {\n babelApi.assertVersion(\"^7.0.0 || ^8.0.0-alpha.0\");\n const {\n traverse\n } = babelApi;\n let debugLog;\n const missingDependencies = (0, _normalizeOptions.applyMissingDependenciesDefaults)(options, babelApi);\n const {\n debug,\n method,\n targets,\n provider,\n providerName,\n callProvider\n } = instantiateProvider(factory, options, missingDependencies, dirname, () => debugLog, babelApi);\n const createVisitor = method === \"entry-global\" ? v.entry : v.usage;\n const visitor = provider.visitor ? traverse.visitors.merge([createVisitor(callProvider), provider.visitor]) : createVisitor(callProvider);\n if (debug && debug !== _debugUtils.presetEnvSilentDebugHeader) {\n console.log(`${providerName}: \\`DEBUG\\` option`);\n console.log(`\\nUsing targets: ${(0, _debugUtils.stringifyTargetsMultiline)(targets)}`);\n console.log(`\\nUsing polyfills with \\`${method}\\` method:`);\n }\n const {\n runtimeName\n } = provider;\n return {\n name: \"inject-polyfills\",\n visitor,\n pre(file) {\n var _provider$pre;\n if (runtimeName) {\n if (file.get(\"runtimeHelpersModuleName\") && file.get(\"runtimeHelpersModuleName\") !== runtimeName) {\n console.warn(`Two different polyfill providers` + ` (${file.get(\"runtimeHelpersModuleProvider\")}` + ` and ${providerName}) are trying to define two` + ` conflicting @babel/runtime alternatives:` + ` ${file.get(\"runtimeHelpersModuleName\")} and ${runtimeName}.` + ` The second one will be ignored.`);\n } else {\n file.set(\"runtimeHelpersModuleName\", runtimeName);\n file.set(\"runtimeHelpersModuleProvider\", providerName);\n }\n }\n debugLog = {\n polyfills: new Set(),\n polyfillsSupport: undefined,\n found: false,\n providers: new Set(),\n missingDeps: new Set()\n };\n (_provider$pre = provider.pre) == null ? void 0 : _provider$pre.apply(this, arguments);\n },\n post() {\n var _provider$post;\n (_provider$post = provider.post) == null ? void 0 : _provider$post.apply(this, arguments);\n if (missingDependencies !== false) {\n if (missingDependencies.log === \"per-file\") {\n deps.logMissing(debugLog.missingDeps);\n } else {\n deps.laterLogMissing(debugLog.missingDeps);\n }\n }\n if (!debug) return;\n if (this.filename) console.log(`\\n[${this.filename}]`);\n if (debugLog.polyfills.size === 0) {\n console.log(method === \"entry-global\" ? debugLog.found ? `Based on your targets, the ${providerName} polyfill did not add any polyfill.` : `The entry point for the ${providerName} polyfill has not been found.` : `Based on your code and targets, the ${providerName} polyfill did not add any polyfill.`);\n return;\n }\n if (method === \"entry-global\") {\n console.log(`The ${providerName} polyfill entry has been replaced with ` + `the following polyfills:`);\n } else {\n console.log(`The ${providerName} polyfill added the following polyfills:`);\n }\n for (const name of debugLog.polyfills) {\n var _debugLog$polyfillsSu2;\n if ((_debugLog$polyfillsSu2 = debugLog.polyfillsSupport) != null && _debugLog$polyfillsSu2[name]) {\n const filteredTargets = (0, _helperCompilationTargets.getInclusionReasons)(name, targets, debugLog.polyfillsSupport);\n const formattedTargets = JSON.stringify(filteredTargets).replace(/,/g, \", \").replace(/^\\{\"/, '{ \"').replace(/\"\\}$/, '\" }');\n console.log(` ${name} ${formattedTargets}`);\n } else {\n console.log(` ${name}`);\n }\n }\n }\n };\n });\n}\nfunction mapGetOr(map, key, getDefault) {\n let val = map.get(key);\n if (val === undefined) {\n val = getDefault();\n map.set(key, val);\n }\n return val;\n}\nfunction isEmpty(obj) {\n return Object.keys(obj).length === 0;\n}","\"use strict\";\n\nexports.__esModule = true;\nexports.default = void 0;\nvar _corejs2BuiltIns = _interopRequireDefault(require(\"@babel/compat-data/corejs2-built-ins\"));\nvar _builtInDefinitions = require(\"./built-in-definitions\");\nvar _addPlatformSpecificPolyfills = _interopRequireDefault(require(\"./add-platform-specific-polyfills\"));\nvar _helpers = require(\"./helpers\");\nvar _helperDefinePolyfillProvider = _interopRequireDefault(require(\"@babel/helper-define-polyfill-provider\"));\nvar _babel = _interopRequireWildcard(require(\"@babel/core\"));\nfunction _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== \"function\") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }\nfunction _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== \"object\" && typeof obj !== \"function\") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== \"default\" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nconst {\n types: t\n} = _babel.default || _babel;\nconst BABEL_RUNTIME = \"@babel/runtime-corejs2\";\nconst presetEnvCompat = \"#__secret_key__@babel/preset-env__compatibility\";\nconst runtimeCompat = \"#__secret_key__@babel/runtime__compatibility\";\nconst has = Function.call.bind(Object.hasOwnProperty);\nvar _default = (0, _helperDefinePolyfillProvider.default)(function (api, {\n [presetEnvCompat]: {\n entryInjectRegenerator = false,\n noRuntimeName = false\n } = {},\n [runtimeCompat]: {\n useBabelRuntime = false,\n runtimeVersion = \"\",\n ext = \".js\"\n } = {}\n}) {\n const resolve = api.createMetaResolver({\n global: _builtInDefinitions.BuiltIns,\n static: _builtInDefinitions.StaticProperties,\n instance: _builtInDefinitions.InstanceProperties\n });\n const {\n debug,\n shouldInjectPolyfill,\n method\n } = api;\n const polyfills = (0, _addPlatformSpecificPolyfills.default)(api.targets, method, _corejs2BuiltIns.default);\n const coreJSBase = useBabelRuntime ? `${BABEL_RUNTIME}/core-js` : method === \"usage-pure\" ? \"core-js/library/fn\" : \"core-js/modules\";\n function inject(name, utils) {\n if (typeof name === \"string\") {\n // Some polyfills aren't always available, for example\n // web.dom.iterable when targeting node\n if (has(polyfills, name) && shouldInjectPolyfill(name)) {\n debug(name);\n utils.injectGlobalImport(`${coreJSBase}/${name}.js`);\n }\n return;\n }\n name.forEach(name => inject(name, utils));\n }\n function maybeInjectPure(desc, hint, utils) {\n let {\n pure,\n meta,\n name\n } = desc;\n if (!pure || !shouldInjectPolyfill(name)) return;\n if (runtimeVersion && meta && meta.minRuntimeVersion && !(0, _helpers.hasMinVersion)(meta && meta.minRuntimeVersion, runtimeVersion)) {\n return;\n }\n\n // Unfortunately core-js and @babel/runtime-corejs2 don't have the same\n // directory structure, so we need to special case this.\n if (useBabelRuntime && pure === \"symbol/index\") pure = \"symbol\";\n return utils.injectDefaultImport(`${coreJSBase}/${pure}${ext}`, hint);\n }\n return {\n name: \"corejs2\",\n runtimeName: noRuntimeName ? null : BABEL_RUNTIME,\n polyfills,\n entryGlobal(meta, utils, path) {\n if (meta.kind === \"import\" && meta.source === \"core-js\") {\n debug(null);\n inject(Object.keys(polyfills), utils);\n if (entryInjectRegenerator) {\n utils.injectGlobalImport(\"regenerator-runtime/runtime.js\");\n }\n path.remove();\n }\n },\n usageGlobal(meta, utils) {\n const resolved = resolve(meta);\n if (!resolved) return;\n let deps = resolved.desc.global;\n if (resolved.kind !== \"global\" && \"object\" in meta && meta.object && meta.placement === \"prototype\") {\n const low = meta.object.toLowerCase();\n deps = deps.filter(m => m.includes(low));\n }\n inject(deps, utils);\n },\n usagePure(meta, utils, path) {\n if (meta.kind === \"in\") {\n if (meta.key === \"Symbol.iterator\") {\n path.replaceWith(t.callExpression(utils.injectDefaultImport(`${coreJSBase}/is-iterable${ext}`, \"isIterable\"), [path.node.right] // meta.kind === \"in\" narrows this\n ));\n }\n\n return;\n }\n if (path.parentPath.isUnaryExpression({\n operator: \"delete\"\n })) return;\n if (meta.kind === \"property\") {\n // We can't compile destructuring.\n if (!path.isMemberExpression()) return;\n if (!path.isReferenced()) return;\n if (meta.key === \"Symbol.iterator\" && shouldInjectPolyfill(\"es6.symbol\") && path.parentPath.isCallExpression({\n callee: path.node\n }) && path.parentPath.node.arguments.length === 0) {\n path.parentPath.replaceWith(t.callExpression(utils.injectDefaultImport(`${coreJSBase}/get-iterator${ext}`, \"getIterator\"), [path.node.object]));\n path.skip();\n return;\n }\n }\n const resolved = resolve(meta);\n if (!resolved) return;\n const id = maybeInjectPure(resolved.desc, resolved.name, utils);\n if (id) path.replaceWith(id);\n },\n visitor: method === \"usage-global\" && {\n // yield*\n YieldExpression(path) {\n if (path.node.delegate) {\n inject(\"web.dom.iterable\", api.getUtils(path));\n }\n },\n // for-of, [a, b] = c\n \"ForOfStatement|ArrayPattern\"(path) {\n _builtInDefinitions.CommonIterators.forEach(name => inject(name, api.getUtils(path)));\n }\n }\n };\n});\nexports.default = _default;","// env vars from the cli are always strings, so !!ENV_VAR returns true for \"false\"\nfunction bool(value) {\n if (value == null) return false;\n return value && value !== \"false\" && value !== \"0\";\n}\n\nmodule.exports = bool(process.env[\"BABEL_8_BREAKING\"])\n ? null\n : require(\"babel-plugin-polyfill-corejs2-BABEL_8_BREAKING-false\");\n0 && (exports.default = 0);","\"use strict\";\n\nexports.__esModule = true;\nexports.default = void 0;\nvar _helperDefinePolyfillProvider = _interopRequireDefault(require(\"@babel/helper-define-polyfill-provider\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nconst runtimeCompat = \"#__secret_key__@babel/runtime__compatibility\";\nvar _default = (0, _helperDefinePolyfillProvider.default)(({\n debug,\n targets,\n babel\n}, options) => {\n if (!shallowEqual(targets, babel.targets())) {\n throw new Error(\"This plugin does not use the targets option. Only preset-env's targets\" + \" or top-level targets need to be configured for this plugin to work.\" + \" See https://github.com/babel/babel-polyfills/issues/36 for more\" + \" details.\");\n }\n const {\n [runtimeCompat]: {\n moduleName = null,\n useBabelRuntime = false\n } = {}\n } = options;\n return {\n name: \"regenerator\",\n polyfills: [\"regenerator-runtime\"],\n usageGlobal(meta, utils) {\n if (isRegenerator(meta)) {\n debug(\"regenerator-runtime\");\n utils.injectGlobalImport(\"regenerator-runtime/runtime.js\");\n }\n },\n usagePure(meta, utils, path) {\n if (isRegenerator(meta)) {\n let pureName = \"regenerator-runtime\";\n if (useBabelRuntime) {\n var _ref;\n const runtimeName = (_ref = moduleName != null ? moduleName : path.hub.file.get(\"runtimeHelpersModuleName\")) != null ? _ref : \"@babel/runtime\";\n pureName = `${runtimeName}/regenerator`;\n }\n path.replaceWith(utils.injectDefaultImport(pureName, \"regenerator-runtime\"));\n }\n }\n };\n});\nexports.default = _default;\nconst isRegenerator = meta => meta.kind === \"global\" && meta.name === \"regeneratorRuntime\";\nfunction shallowEqual(obj1, obj2) {\n return JSON.stringify(obj1) === JSON.stringify(obj2);\n}","// env vars from the cli are always strings, so !!ENV_VAR returns true for \"false\"\nfunction bool(value) {\n if (value == null) return false;\n return value && value !== \"false\" && value !== \"0\";\n}\n\nmodule.exports = bool(process.env[\"BABEL_8_BREAKING\"])\n ? null\n : require(\"babel-plugin-polyfill-regenerator-BABEL_8_BREAKING-false\");\n0 && (exports.default = 0);","// TODO(Babel 8) Remove this file\nif (process.env.BABEL_8_BREAKING) {\n throw new Error(\n \"Internal Babel error: This file should only be loaded in Babel 7\",\n );\n}\n\nexports.getImportSource = function ({ node }) {\n if (node.specifiers.length === 0) return node.source.value;\n};\n\nexports.getRequireSource = function ({ node }) {\n if (node.type !== \"ExpressionStatement\") return;\n const { expression } = node;\n if (\n expression.type === \"CallExpression\" &&\n expression.callee.type === \"Identifier\" &&\n expression.callee.name === \"require\" &&\n expression.arguments.length === 1 &&\n expression.arguments[0].type === \"StringLiteral\"\n ) {\n return expression.arguments[0].value;\n }\n};\n\nexports.isPolyfillSource = function (source) {\n return source === \"@babel/polyfill\" || source === \"core-js\";\n};\n","// TODO(Babel 8) Remove this file\nif (process.env.BABEL_8_BREAKING) {\n throw new Error(\n \"Internal Babel error: This file should only be loaded in Babel 7\",\n );\n}\n\nconst {\n getImportSource,\n getRequireSource,\n isPolyfillSource,\n} = require(\"./utils.cjs\");\n\nconst BABEL_POLYFILL_DEPRECATION = `\n \\`@babel/polyfill\\` is deprecated. Please, use required parts of \\`core-js\\`\n and \\`regenerator-runtime/runtime\\` separately`;\n\nconst NO_DIRECT_POLYFILL_IMPORT = `\n When setting \\`useBuiltIns: 'usage'\\`, polyfills are automatically imported when needed.\n Please remove the direct import of \\`SPECIFIER\\` or use \\`useBuiltIns: 'entry'\\` instead.`;\n\nmodule.exports = function ({ template }, { regenerator, deprecated, usage }) {\n return {\n name: \"preset-env/replace-babel-polyfill\",\n visitor: {\n ImportDeclaration(path) {\n const src = getImportSource(path);\n if (usage && isPolyfillSource(src)) {\n console.warn(NO_DIRECT_POLYFILL_IMPORT.replace(\"SPECIFIER\", src));\n if (!deprecated) path.remove();\n } else if (src === \"@babel/polyfill\") {\n if (deprecated) {\n console.warn(BABEL_POLYFILL_DEPRECATION);\n } else if (regenerator) {\n path.replaceWithMultiple(template.ast`\n import \"core-js\";\n import \"regenerator-runtime/runtime.js\";\n `);\n } else {\n path.replaceWith(template.ast`\n import \"core-js\";\n `);\n }\n }\n },\n Program(path) {\n path.get(\"body\").forEach(bodyPath => {\n const src = getRequireSource(bodyPath);\n if (usage && isPolyfillSource(src)) {\n console.warn(NO_DIRECT_POLYFILL_IMPORT.replace(\"SPECIFIER\", src));\n if (!deprecated) bodyPath.remove();\n } else if (src === \"@babel/polyfill\") {\n if (deprecated) {\n console.warn(BABEL_POLYFILL_DEPRECATION);\n } else if (regenerator) {\n bodyPath.replaceWithMultiple(template.ast`\n require(\"core-js\");\n require(\"regenerator-runtime/runtime.js\");\n `);\n } else {\n bodyPath.replaceWith(template.ast`\n require(\"core-js\");\n `);\n }\n }\n });\n },\n },\n };\n};\n","// TODO(Babel 8) Remove this file\nif (process.env.BABEL_8_BREAKING) {\n throw new Error(\n \"Internal Babel error: This file should only be loaded in Babel 7\",\n );\n}\n\nconst { getImportSource, getRequireSource } = require(\"./utils.cjs\");\n\nfunction isRegeneratorSource(source) {\n return (\n source === \"regenerator-runtime/runtime\" ||\n source === \"regenerator-runtime/runtime.js\"\n );\n}\n\nmodule.exports = function () {\n const visitor = {\n ImportDeclaration(path) {\n if (isRegeneratorSource(getImportSource(path))) {\n this.regeneratorImportExcluded = true;\n path.remove();\n }\n },\n Program(path) {\n path.get(\"body\").forEach(bodyPath => {\n if (isRegeneratorSource(getRequireSource(bodyPath))) {\n this.regeneratorImportExcluded = true;\n bodyPath.remove();\n }\n });\n },\n };\n\n return {\n name: \"preset-env/remove-regenerator\",\n visitor,\n pre() {\n this.regeneratorImportExcluded = false;\n },\n post() {\n if (this.opts.debug && this.regeneratorImportExcluded) {\n let filename = this.file.opts.filename;\n // normalize filename to generate consistent preset-env test fixtures\n if (process.env.BABEL_ENV === \"test\") {\n filename = filename.replace(/\\\\/g, \"/\");\n }\n console.log(\n `\\n[${filename}] Based on your targets, regenerator-runtime import excluded.`,\n );\n }\n },\n };\n};\n","// TODO(Babel 8): Remove this file\n\nif (!process.env.BABEL_8_BREAKING) {\n Object.defineProperties(exports, {\n pluginCoreJS2: {\n get: () => require(\"babel-plugin-polyfill-corejs2\").default,\n },\n pluginRegenerator: {\n get: () => require(\"babel-plugin-polyfill-regenerator\").default,\n },\n legacyBabelPolyfillPlugin: { get: () => require(\"./babel-polyfill.cjs\") },\n removeRegeneratorEntryPlugin: { get: () => require(\"./regenerator.cjs\") },\n corejs2Polyfills: {\n get: () => require(\"@babel/compat-data/corejs2-built-ins\"),\n },\n });\n}\n","import semver, { type SemVer } from \"semver\";\nimport corejs3Polyfills from \"core-js-compat/data.json\" with { type: \"json\" };\nimport { plugins as pluginsList } from \"./plugins-compat-data.ts\";\nimport moduleTransformations from \"./module-transformations.ts\";\nimport {\n TopLevelOptions,\n ModulesOption,\n UseBuiltInsOption,\n} from \"./options.ts\";\nimport { OptionValidator } from \"@babel/helper-validator-option\";\n\n// TODO(Babel 8): Remove this\nimport babel7 from \"./polyfills/babel-7-plugins.cjs\";\n\nimport type {\n BuiltInsOption,\n CorejsOption,\n ModuleOption,\n Options,\n PluginListOption,\n} from \"./types.ts\";\n\nconst v = new OptionValidator(PACKAGE_JSON.name);\n\nconst allPluginsList = Object.keys(pluginsList);\n\n// NOTE: Since module plugins are handled separately compared to other plugins (via the \"modules\" option) it\n// should only be possible to exclude and not include module plugins, otherwise it's possible that preset-env\n// will add a module plugin twice.\nconst modulePlugins = [\n \"transform-dynamic-import\",\n ...Object.keys(moduleTransformations).map(m => moduleTransformations[m]),\n];\n\nconst getValidIncludesAndExcludes = (\n type: \"include\" | \"exclude\",\n corejs: number | false,\n) => {\n const set = new Set(allPluginsList);\n if (type === \"exclude\") modulePlugins.map(set.add, set);\n if (corejs) {\n if (!process.env.BABEL_8_BREAKING && corejs === 2) {\n Object.keys(babel7.corejs2Polyfills).map(set.add, set);\n set.add(\"web.timers\").add(\"web.immediate\").add(\"web.dom.iterable\");\n } else {\n Object.keys(corejs3Polyfills).map(set.add, set);\n }\n }\n return Array.from(set);\n};\n\nfunction flatMap(array: Array, fn: (item: T) => Array): Array {\n return Array.prototype.concat.apply([], array.map(fn));\n}\n\nexport const normalizePluginName = (plugin: string) =>\n plugin.replace(/^(?:@babel\\/|babel-)(?:plugin-)?/, \"\");\n\nconst expandIncludesAndExcludes = (\n filterList: PluginListOption = [],\n type: \"include\" | \"exclude\",\n corejs: number | false,\n) => {\n if (filterList.length === 0) return [];\n\n const filterableItems = getValidIncludesAndExcludes(type, corejs);\n\n const invalidFilters: PluginListOption = [];\n const selectedPlugins = flatMap(filterList, filter => {\n let re: RegExp;\n if (typeof filter === \"string\") {\n try {\n re = new RegExp(`^${normalizePluginName(filter)}$`);\n } catch (_) {\n invalidFilters.push(filter);\n return [];\n }\n } else {\n re = filter;\n }\n const items = filterableItems.filter(item => {\n return process.env.BABEL_8_BREAKING\n ? re.test(item)\n : re.test(item) ||\n // For backwards compatibility, we also support matching against the\n // proposal- name.\n re.test(item.replace(/^transform-/, \"proposal-\"));\n });\n if (items.length === 0) invalidFilters.push(filter);\n return items;\n });\n\n v.invariant(\n invalidFilters.length === 0,\n `The plugins/built-ins '${invalidFilters.join(\n \", \",\n )}' passed to the '${type}' option are not\n valid. Please check data/[plugin-features|built-in-features].js in babel-preset-env`,\n );\n\n return selectedPlugins;\n};\n\nexport const checkDuplicateIncludeExcludes = (\n include: Array = [],\n exclude: Array = [],\n) => {\n const duplicates = include.filter(opt => exclude.includes(opt));\n\n v.invariant(\n duplicates.length === 0,\n `The plugins/built-ins '${duplicates.join(\n \", \",\n )}' were found in both the \"include\" and\n \"exclude\" options.`,\n );\n};\n\nconst normalizeTargets = (\n targets: string | string[] | Options[\"targets\"],\n): Options[\"targets\"] => {\n // TODO: Allow to use only query or strings as a targets from next breaking change.\n if (typeof targets === \"string\" || Array.isArray(targets)) {\n return { browsers: targets };\n }\n return { ...targets };\n};\n\nexport const validateModulesOption = (\n modulesOpt: ModuleOption = ModulesOption.auto,\n) => {\n v.invariant(\n // @ts-expect-error we have provided fallback for undefined keys\n ModulesOption[modulesOpt.toString()] || modulesOpt === ModulesOption.false,\n `The 'modules' option must be one of \\n` +\n ` - 'false' to indicate no module processing\\n` +\n ` - a specific module type: 'commonjs', 'amd', 'umd', 'systemjs'` +\n ` - 'auto' (default) which will automatically select 'false' if the current\\n` +\n ` process is known to support ES module syntax, or \"commonjs\" otherwise\\n`,\n );\n\n return modulesOpt;\n};\n\nexport const validateUseBuiltInsOption = (\n builtInsOpt: BuiltInsOption = false,\n) => {\n v.invariant(\n // @ts-expect-error we have provided fallback for undefined keys\n UseBuiltInsOption[builtInsOpt.toString()] ||\n builtInsOpt === UseBuiltInsOption.false,\n `The 'useBuiltIns' option must be either\n 'false' (default) to indicate no polyfill,\n '\"entry\"' to indicate replacing the entry polyfill, or\n '\"usage\"' to import only used polyfills per file`,\n );\n\n return builtInsOpt;\n};\n\nexport type NormalizedCorejsOption = {\n proposals: boolean;\n version: SemVer | null | false;\n};\n\nexport function normalizeCoreJSOption(\n corejs: CorejsOption | undefined | null,\n useBuiltIns: BuiltInsOption,\n): NormalizedCorejsOption {\n let proposals = false;\n let rawVersion: false | string | number | undefined | null;\n\n if (useBuiltIns && corejs === undefined) {\n if (process.env.BABEL_8_BREAKING) {\n throw new Error(\n \"When using the `useBuiltIns` option you must specify\" +\n ' the code-js version you are using, such as `\"corejs\": \"3.32.0\"`.',\n );\n } else {\n rawVersion = 2;\n console.warn(\n \"\\nWARNING (@babel/preset-env): We noticed you're using the `useBuiltIns` option without declaring a \" +\n `core-js version. Currently, we assume version 2.x when no version ` +\n \"is passed. Since this default version will likely change in future \" +\n \"versions of Babel, we recommend explicitly setting the core-js version \" +\n \"you are using via the `corejs` option.\\n\" +\n \"\\nYou should also be sure that the version you pass to the `corejs` \" +\n \"option matches the version specified in your `package.json`'s \" +\n \"`dependencies` section. If it doesn't, you need to run one of the \" +\n \"following commands:\\n\\n\" +\n \" npm install --save core-js@2 npm install --save core-js@3\\n\" +\n \" yarn add core-js@2 yarn add core-js@3\\n\\n\" +\n \"More info about useBuiltIns: https://babeljs.io/docs/en/babel-preset-env#usebuiltins\\n\" +\n \"More info about core-js: https://babeljs.io/docs/en/babel-preset-env#corejs\",\n );\n }\n } else if (typeof corejs === \"object\" && corejs !== null) {\n rawVersion = corejs.version;\n proposals = Boolean(corejs.proposals);\n } else {\n rawVersion = corejs as false | string | number | undefined | null;\n }\n\n const version = rawVersion ? semver.coerce(String(rawVersion)) : false;\n\n if (version) {\n if (useBuiltIns) {\n if (process.env.BABEL_8_BREAKING) {\n if (version.major !== 3) {\n throw new RangeError(\n \"Invalid Option: The version passed to `corejs` is invalid. Currently, \" +\n \"only core-js@3 is supported.\",\n );\n }\n\n if (\n typeof rawVersion !== \"string\" ||\n !String(rawVersion).includes(\".\")\n ) {\n throw new Error(\n 'Invalid Option: The version passed to `corejs` is invalid. Please use string and specify the minor version, such as `\"3.33\"`.',\n );\n }\n } else {\n if (version.major < 2 || version.major > 3) {\n throw new RangeError(\n \"Invalid Option: The version passed to `corejs` is invalid. Currently, \" +\n \"only core-js@2 and core-js@3 are supported.\",\n );\n }\n }\n } else {\n console.warn(\n \"\\nWARNING (@babel/preset-env): The `corejs` option only has an effect when the `useBuiltIns` option is not `false`\\n\",\n );\n }\n }\n\n return { version, proposals };\n}\n\nexport default function normalizeOptions(opts: Options) {\n v.validateTopLevelOptions(opts, TopLevelOptions);\n\n const useBuiltIns = validateUseBuiltInsOption(opts.useBuiltIns);\n\n const corejs = normalizeCoreJSOption(opts.corejs, useBuiltIns);\n\n const include = expandIncludesAndExcludes(\n opts.include,\n TopLevelOptions.include,\n !!corejs.version && corejs.version.major,\n );\n\n const exclude = expandIncludesAndExcludes(\n opts.exclude,\n TopLevelOptions.exclude,\n !!corejs.version && corejs.version.major,\n );\n\n checkDuplicateIncludeExcludes(include, exclude);\n\n if (!process.env.BABEL_8_BREAKING) {\n v.validateBooleanOption(\"loose\", opts.loose);\n v.validateBooleanOption(\"spec\", opts.spec);\n }\n\n return {\n bugfixes: v.validateBooleanOption(\n TopLevelOptions.bugfixes,\n opts.bugfixes,\n process.env.BABEL_8_BREAKING ? true : false,\n ),\n configPath: v.validateStringOption(\n TopLevelOptions.configPath,\n opts.configPath,\n process.cwd(),\n ),\n corejs,\n debug: v.validateBooleanOption(TopLevelOptions.debug, opts.debug, false),\n include,\n exclude,\n forceAllTransforms: v.validateBooleanOption(\n TopLevelOptions.forceAllTransforms,\n opts.forceAllTransforms,\n false,\n ),\n ignoreBrowserslistConfig: v.validateBooleanOption(\n TopLevelOptions.ignoreBrowserslistConfig,\n opts.ignoreBrowserslistConfig,\n false,\n ),\n modules: validateModulesOption(opts.modules),\n shippedProposals: v.validateBooleanOption(\n TopLevelOptions.shippedProposals,\n opts.shippedProposals,\n false,\n ),\n targets: normalizeTargets(opts.targets),\n useBuiltIns: useBuiltIns,\n browserslistEnv: v.validateStringOption(\n TopLevelOptions.browserslistEnv,\n opts.browserslistEnv,\n ),\n };\n}\n","// TODO(Babel 8): Remove this file\n/* eslint sort-keys: \"error\" */\n// These mappings represent the transform plugins that have been\n// shipped by browsers, and are enabled by the `shippedProposals` option.\n\nconst proposalPlugins = new Set();\n\n// proposal syntax plugins enabled by the `shippedProposals` option.\n// Unlike proposalPlugins above, they are independent of compiler targets.\nconst proposalSyntaxPlugins = [\n \"syntax-import-assertions\",\n \"syntax-import-attributes\",\n] as const;\n\n// use intermediary object to enforce alphabetical key order\nconst pluginSyntaxObject = process.env.BABEL_8_BREAKING\n ? {}\n : ({\n \"transform-async-generator-functions\": \"syntax-async-generators\",\n \"transform-class-properties\": \"syntax-class-properties\",\n \"transform-class-static-block\": \"syntax-class-static-block\",\n \"transform-export-namespace-from\": \"syntax-export-namespace-from\",\n \"transform-json-strings\": \"syntax-json-strings\",\n \"transform-nullish-coalescing-operator\":\n \"syntax-nullish-coalescing-operator\",\n \"transform-numeric-separator\": \"syntax-numeric-separator\",\n \"transform-object-rest-spread\": \"syntax-object-rest-spread\",\n \"transform-optional-catch-binding\": \"syntax-optional-catch-binding\",\n \"transform-optional-chaining\": \"syntax-optional-chaining\",\n // note: we don't have syntax-private-methods\n \"transform-private-methods\": \"syntax-class-properties\",\n \"transform-private-property-in-object\":\n \"syntax-private-property-in-object\",\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion\n \"transform-unicode-property-regex\": null as null,\n } as const);\n\ntype PluginSyntaxObjectKeys = keyof typeof pluginSyntaxObject;\n\nconst pluginSyntaxEntries = Object.keys(pluginSyntaxObject).map<\n [PluginSyntaxObjectKeys, string | null]\n>(function (key: PluginSyntaxObjectKeys) {\n return [key, pluginSyntaxObject[key]];\n});\n\nconst pluginSyntaxMap = new Map(pluginSyntaxEntries);\n\nexport { proposalPlugins, proposalSyntaxPlugins, pluginSyntaxMap };\n","module.exports = require(\"core-js-compat/data\");\n","module.exports = require(\"core-js-compat/get-modules-list-for-target-version\");\n","module.exports = require(\"core-js-compat/entries\");\n","import { declare } from '@babel/helper-plugin-utils';\nimport _getTargets, { prettifyTargets, getInclusionReasons, isRequired } from '@babel/helper-compilation-targets';\nimport * as _babel from '@babel/core';\n\nconst {\n types: t$1,\n template: template\n} = _babel.default || _babel;\nfunction intersection(a, b) {\n const result = new Set();\n a.forEach(v => b.has(v) && result.add(v));\n return result;\n}\nfunction has$1(object, key) {\n return Object.prototype.hasOwnProperty.call(object, key);\n}\nfunction getType(target) {\n return Object.prototype.toString.call(target).slice(8, -1);\n}\nfunction resolveId(path) {\n if (path.isIdentifier() && !path.scope.hasBinding(path.node.name, /* noGlobals */true)) {\n return path.node.name;\n }\n if (path.isPure()) {\n const {\n deopt\n } = path.evaluate();\n if (deopt && deopt.isIdentifier()) {\n return deopt.node.name;\n }\n }\n}\nfunction resolveKey(path, computed = false) {\n const {\n scope\n } = path;\n if (path.isStringLiteral()) return path.node.value;\n const isIdentifier = path.isIdentifier();\n if (isIdentifier && !(computed || path.parent.computed)) {\n return path.node.name;\n }\n if (computed && path.isMemberExpression() && path.get(\"object\").isIdentifier({\n name: \"Symbol\"\n }) && !scope.hasBinding(\"Symbol\", /* noGlobals */true)) {\n const sym = resolveKey(path.get(\"property\"), path.node.computed);\n if (sym) return \"Symbol.\" + sym;\n }\n if (isIdentifier ? scope.hasBinding(path.node.name, /* noGlobals */true) : path.isPure()) {\n const {\n value\n } = path.evaluate();\n if (typeof value === \"string\") return value;\n }\n}\nfunction resolveSource(obj) {\n if (obj.isMemberExpression() && obj.get(\"property\").isIdentifier({\n name: \"prototype\"\n })) {\n const id = resolveId(obj.get(\"object\"));\n if (id) {\n return {\n id,\n placement: \"prototype\"\n };\n }\n return {\n id: null,\n placement: null\n };\n }\n const id = resolveId(obj);\n if (id) {\n return {\n id,\n placement: \"static\"\n };\n }\n if (obj.isRegExpLiteral()) {\n return {\n id: \"RegExp\",\n placement: \"prototype\"\n };\n } else if (obj.isFunction()) {\n return {\n id: \"Function\",\n placement: \"prototype\"\n };\n } else if (obj.isPure()) {\n const {\n value\n } = obj.evaluate();\n if (value !== undefined) {\n return {\n id: getType(value),\n placement: \"prototype\"\n };\n }\n }\n return {\n id: null,\n placement: null\n };\n}\nfunction getImportSource({\n node\n}) {\n if (node.specifiers.length === 0) return node.source.value;\n}\nfunction getRequireSource({\n node\n}) {\n if (!t$1.isExpressionStatement(node)) return;\n const {\n expression\n } = node;\n if (t$1.isCallExpression(expression) && t$1.isIdentifier(expression.callee) && expression.callee.name === \"require\" && expression.arguments.length === 1 && t$1.isStringLiteral(expression.arguments[0])) {\n return expression.arguments[0].value;\n }\n}\nfunction hoist(node) {\n // @ts-expect-error\n node._blockHoist = 3;\n return node;\n}\nfunction createUtilsGetter(cache) {\n return path => {\n const prog = path.findParent(p => p.isProgram());\n return {\n injectGlobalImport(url, moduleName) {\n cache.storeAnonymous(prog, url, moduleName, (isScript, source) => {\n return isScript ? template.statement.ast`require(${source})` : t$1.importDeclaration([], source);\n });\n },\n injectNamedImport(url, name, hint = name, moduleName) {\n return cache.storeNamed(prog, url, name, moduleName, (isScript, source, name) => {\n const id = prog.scope.generateUidIdentifier(hint);\n return {\n node: isScript ? hoist(template.statement.ast`\n var ${id} = require(${source}).${name}\n `) : t$1.importDeclaration([t$1.importSpecifier(id, name)], source),\n name: id.name\n };\n });\n },\n injectDefaultImport(url, hint = url, moduleName) {\n return cache.storeNamed(prog, url, \"default\", moduleName, (isScript, source) => {\n const id = prog.scope.generateUidIdentifier(hint);\n return {\n node: isScript ? hoist(template.statement.ast`var ${id} = require(${source})`) : t$1.importDeclaration([t$1.importDefaultSpecifier(id)], source),\n name: id.name\n };\n });\n }\n };\n };\n}\n\nconst {\n types: t\n} = _babel.default || _babel;\nclass ImportsCachedInjector {\n constructor(resolver, getPreferredIndex) {\n this._imports = new WeakMap();\n this._anonymousImports = new WeakMap();\n this._lastImports = new WeakMap();\n this._resolver = resolver;\n this._getPreferredIndex = getPreferredIndex;\n }\n storeAnonymous(programPath, url, moduleName, getVal) {\n const key = this._normalizeKey(programPath, url);\n const imports = this._ensure(this._anonymousImports, programPath, Set);\n if (imports.has(key)) return;\n const node = getVal(programPath.node.sourceType === \"script\", t.stringLiteral(this._resolver(url)));\n imports.add(key);\n this._injectImport(programPath, node, moduleName);\n }\n storeNamed(programPath, url, name, moduleName, getVal) {\n const key = this._normalizeKey(programPath, url, name);\n const imports = this._ensure(this._imports, programPath, Map);\n if (!imports.has(key)) {\n const {\n node,\n name: id\n } = getVal(programPath.node.sourceType === \"script\", t.stringLiteral(this._resolver(url)), t.identifier(name));\n imports.set(key, id);\n this._injectImport(programPath, node, moduleName);\n }\n return t.identifier(imports.get(key));\n }\n _injectImport(programPath, node, moduleName) {\n var _this$_lastImports$ge;\n const newIndex = this._getPreferredIndex(moduleName);\n const lastImports = (_this$_lastImports$ge = this._lastImports.get(programPath)) != null ? _this$_lastImports$ge : [];\n const isPathStillValid = path => path.node &&\n // Sometimes the AST is modified and the \"last import\"\n // we have has been replaced\n path.parent === programPath.node && path.container === programPath.node.body;\n let last;\n if (newIndex === Infinity) {\n // Fast path: we can always just insert at the end if newIndex is `Infinity`\n if (lastImports.length > 0) {\n last = lastImports[lastImports.length - 1].path;\n if (!isPathStillValid(last)) last = undefined;\n }\n } else {\n for (const [i, data] of lastImports.entries()) {\n const {\n path,\n index\n } = data;\n if (isPathStillValid(path)) {\n if (newIndex < index) {\n const [newPath] = path.insertBefore(node);\n lastImports.splice(i, 0, {\n path: newPath,\n index: newIndex\n });\n return;\n }\n last = path;\n }\n }\n }\n if (last) {\n const [newPath] = last.insertAfter(node);\n lastImports.push({\n path: newPath,\n index: newIndex\n });\n } else {\n const [newPath] = programPath.unshiftContainer(\"body\", node);\n this._lastImports.set(programPath, [{\n path: newPath,\n index: newIndex\n }]);\n }\n }\n _ensure(map, programPath, Collection) {\n let collection = map.get(programPath);\n if (!collection) {\n collection = new Collection();\n map.set(programPath, collection);\n }\n return collection;\n }\n _normalizeKey(programPath, url, name = \"\") {\n const {\n sourceType\n } = programPath.node;\n\n // If we rely on the imported binding (the \"name\" parameter), we also need to cache\n // based on the sourceType. This is because the module transforms change the names\n // of the import variables.\n return `${name && sourceType}::${url}::${name}`;\n }\n}\n\nconst presetEnvSilentDebugHeader = \"#__secret_key__@babel/preset-env__don't_log_debug_header_and_resolved_targets\";\nfunction stringifyTargetsMultiline(targets) {\n return JSON.stringify(prettifyTargets(targets), null, 2);\n}\n\nfunction patternToRegExp(pattern) {\n if (pattern instanceof RegExp) return pattern;\n try {\n return new RegExp(`^${pattern}$`);\n } catch {\n return null;\n }\n}\nfunction buildUnusedError(label, unused) {\n if (!unused.length) return \"\";\n return ` - The following \"${label}\" patterns didn't match any polyfill:\\n` + unused.map(original => ` ${String(original)}\\n`).join(\"\");\n}\nfunction buldDuplicatesError(duplicates) {\n if (!duplicates.size) return \"\";\n return ` - The following polyfills were matched both by \"include\" and \"exclude\" patterns:\\n` + Array.from(duplicates, name => ` ${name}\\n`).join(\"\");\n}\nfunction validateIncludeExclude(provider, polyfills, includePatterns, excludePatterns) {\n let current;\n const filter = pattern => {\n const regexp = patternToRegExp(pattern);\n if (!regexp) return false;\n let matched = false;\n for (const polyfill of polyfills.keys()) {\n if (regexp.test(polyfill)) {\n matched = true;\n current.add(polyfill);\n }\n }\n return !matched;\n };\n\n // prettier-ignore\n const include = current = new Set();\n const unusedInclude = Array.from(includePatterns).filter(filter);\n\n // prettier-ignore\n const exclude = current = new Set();\n const unusedExclude = Array.from(excludePatterns).filter(filter);\n const duplicates = intersection(include, exclude);\n if (duplicates.size > 0 || unusedInclude.length > 0 || unusedExclude.length > 0) {\n throw new Error(`Error while validating the \"${provider}\" provider options:\\n` + buildUnusedError(\"include\", unusedInclude) + buildUnusedError(\"exclude\", unusedExclude) + buldDuplicatesError(duplicates));\n }\n return {\n include,\n exclude\n };\n}\nfunction applyMissingDependenciesDefaults(options, babelApi) {\n const {\n missingDependencies = {}\n } = options;\n if (missingDependencies === false) return false;\n const caller = babelApi.caller(caller => caller == null ? void 0 : caller.name);\n const {\n log = \"deferred\",\n inject = caller === \"rollup-plugin-babel\" ? \"throw\" : \"import\",\n all = false\n } = missingDependencies;\n return {\n log,\n inject,\n all\n };\n}\n\nfunction isRemoved(path) {\n if (path.removed) return true;\n if (!path.parentPath) return false;\n if (path.listKey) {\n var _path$parentPath$node;\n if (!((_path$parentPath$node = path.parentPath.node) != null && (_path$parentPath$node = _path$parentPath$node[path.listKey]) != null && _path$parentPath$node.includes(path.node))) return true;\n } else {\n if (path.parentPath.node[path.key] !== path.node) return true;\n }\n return isRemoved(path.parentPath);\n}\nvar usage = (callProvider => {\n function property(object, key, placement, path) {\n return callProvider({\n kind: \"property\",\n object,\n key,\n placement\n }, path);\n }\n function handleReferencedIdentifier(path) {\n const {\n node: {\n name\n },\n scope\n } = path;\n if (scope.getBindingIdentifier(name)) return;\n callProvider({\n kind: \"global\",\n name\n }, path);\n }\n function analyzeMemberExpression(path) {\n const key = resolveKey(path.get(\"property\"), path.node.computed);\n return {\n key,\n handleAsMemberExpression: !!key && key !== \"prototype\"\n };\n }\n return {\n // Symbol(), new Promise\n ReferencedIdentifier(path) {\n const {\n parentPath\n } = path;\n if (parentPath.isMemberExpression({\n object: path.node\n }) && analyzeMemberExpression(parentPath).handleAsMemberExpression) {\n return;\n }\n handleReferencedIdentifier(path);\n },\n MemberExpression(path) {\n const {\n key,\n handleAsMemberExpression\n } = analyzeMemberExpression(path);\n if (!handleAsMemberExpression) return;\n const object = path.get(\"object\");\n let objectIsGlobalIdentifier = object.isIdentifier();\n if (objectIsGlobalIdentifier) {\n const binding = object.scope.getBinding(object.node.name);\n if (binding) {\n if (binding.path.isImportNamespaceSpecifier()) return;\n objectIsGlobalIdentifier = false;\n }\n }\n const source = resolveSource(object);\n let skipObject = property(source.id, key, source.placement, path);\n skipObject || (skipObject = !objectIsGlobalIdentifier || path.shouldSkip || object.shouldSkip || isRemoved(object));\n if (!skipObject) handleReferencedIdentifier(object);\n },\n ObjectPattern(path) {\n const {\n parentPath,\n parent\n } = path;\n let obj;\n\n // const { keys, values } = Object\n if (parentPath.isVariableDeclarator()) {\n obj = parentPath.get(\"init\");\n // ({ keys, values } = Object)\n } else if (parentPath.isAssignmentExpression()) {\n obj = parentPath.get(\"right\");\n // !function ({ keys, values }) {...} (Object)\n // resolution does not work after properties transform :-(\n } else if (parentPath.isFunction()) {\n const grand = parentPath.parentPath;\n if (grand.isCallExpression() || grand.isNewExpression()) {\n if (grand.node.callee === parent) {\n obj = grand.get(\"arguments\")[path.key];\n }\n }\n }\n let id = null;\n let placement = null;\n if (obj) ({\n id,\n placement\n } = resolveSource(obj));\n for (const prop of path.get(\"properties\")) {\n if (prop.isObjectProperty()) {\n const key = resolveKey(prop.get(\"key\"));\n if (key) property(id, key, placement, prop);\n }\n }\n },\n BinaryExpression(path) {\n if (path.node.operator !== \"in\") return;\n const source = resolveSource(path.get(\"right\"));\n const key = resolveKey(path.get(\"left\"), true);\n if (!key) return;\n callProvider({\n kind: \"in\",\n object: source.id,\n key,\n placement: source.placement\n }, path);\n }\n };\n});\n\nvar entry = (callProvider => ({\n ImportDeclaration(path) {\n const source = getImportSource(path);\n if (!source) return;\n callProvider({\n kind: \"import\",\n source\n }, path);\n },\n Program(path) {\n path.get(\"body\").forEach(bodyPath => {\n const source = getRequireSource(bodyPath);\n if (!source) return;\n callProvider({\n kind: \"import\",\n source\n }, bodyPath);\n });\n }\n}));\n\nfunction resolve(dirname, moduleName, absoluteImports) {\n if (absoluteImports === false) return moduleName;\n throw new Error(`\"absoluteImports\" is not supported in bundles prepared for the browser.`);\n}\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nfunction has(basedir, name) {\n return true;\n}\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nfunction logMissing(missingDeps) {}\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nfunction laterLogMissing(missingDeps) {}\n\nconst PossibleGlobalObjects = new Set([\"global\", \"globalThis\", \"self\", \"window\"]);\nfunction createMetaResolver(polyfills) {\n const {\n static: staticP,\n instance: instanceP,\n global: globalP\n } = polyfills;\n return meta => {\n if (meta.kind === \"global\" && globalP && has$1(globalP, meta.name)) {\n return {\n kind: \"global\",\n desc: globalP[meta.name],\n name: meta.name\n };\n }\n if (meta.kind === \"property\" || meta.kind === \"in\") {\n const {\n placement,\n object,\n key\n } = meta;\n if (object && placement === \"static\") {\n if (globalP && PossibleGlobalObjects.has(object) && has$1(globalP, key)) {\n return {\n kind: \"global\",\n desc: globalP[key],\n name: key\n };\n }\n if (staticP && has$1(staticP, object) && has$1(staticP[object], key)) {\n return {\n kind: \"static\",\n desc: staticP[object][key],\n name: `${object}$${key}`\n };\n }\n }\n if (instanceP && has$1(instanceP, key)) {\n return {\n kind: \"instance\",\n desc: instanceP[key],\n name: `${key}`\n };\n }\n }\n };\n}\n\nconst getTargets = _getTargets.default || _getTargets;\nfunction resolveOptions(options, babelApi) {\n const {\n method,\n targets: targetsOption,\n ignoreBrowserslistConfig,\n configPath,\n debug,\n shouldInjectPolyfill,\n absoluteImports,\n ...providerOptions\n } = options;\n if (isEmpty(options)) {\n throw new Error(`\\\nThis plugin requires options, for example:\n {\n \"plugins\": [\n [\"\", { method: \"usage-pure\" }]\n ]\n }\n\nSee more options at https://github.com/babel/babel-polyfills/blob/main/docs/usage.md`);\n }\n let methodName;\n if (method === \"usage-global\") methodName = \"usageGlobal\";else if (method === \"entry-global\") methodName = \"entryGlobal\";else if (method === \"usage-pure\") methodName = \"usagePure\";else if (typeof method !== \"string\") {\n throw new Error(\".method must be a string\");\n } else {\n throw new Error(`.method must be one of \"entry-global\", \"usage-global\"` + ` or \"usage-pure\" (received ${JSON.stringify(method)})`);\n }\n if (typeof shouldInjectPolyfill === \"function\") {\n if (options.include || options.exclude) {\n throw new Error(`.include and .exclude are not supported when using the` + ` .shouldInjectPolyfill function.`);\n }\n } else if (shouldInjectPolyfill != null) {\n throw new Error(`.shouldInjectPolyfill must be a function, or undefined` + ` (received ${JSON.stringify(shouldInjectPolyfill)})`);\n }\n if (absoluteImports != null && typeof absoluteImports !== \"boolean\" && typeof absoluteImports !== \"string\") {\n throw new Error(`.absoluteImports must be a boolean, a string, or undefined` + ` (received ${JSON.stringify(absoluteImports)})`);\n }\n let targets;\n if (\n // If any browserslist-related option is specified, fallback to the old\n // behavior of not using the targets specified in the top-level options.\n targetsOption || configPath || ignoreBrowserslistConfig) {\n const targetsObj = typeof targetsOption === \"string\" || Array.isArray(targetsOption) ? {\n browsers: targetsOption\n } : targetsOption;\n targets = getTargets(targetsObj, {\n ignoreBrowserslistConfig,\n configPath\n });\n } else {\n targets = babelApi.targets();\n }\n return {\n method,\n methodName,\n targets,\n absoluteImports: absoluteImports != null ? absoluteImports : false,\n shouldInjectPolyfill,\n debug: !!debug,\n providerOptions: providerOptions\n };\n}\nfunction instantiateProvider(factory, options, missingDependencies, dirname, debugLog, babelApi) {\n const {\n method,\n methodName,\n targets,\n debug,\n shouldInjectPolyfill,\n providerOptions,\n absoluteImports\n } = resolveOptions(options, babelApi);\n\n // eslint-disable-next-line prefer-const\n let include, exclude;\n let polyfillsSupport;\n let polyfillsNames;\n let filterPolyfills;\n const getUtils = createUtilsGetter(new ImportsCachedInjector(moduleName => resolve(dirname, moduleName, absoluteImports), name => {\n var _polyfillsNames$get, _polyfillsNames;\n return (_polyfillsNames$get = (_polyfillsNames = polyfillsNames) == null ? void 0 : _polyfillsNames.get(name)) != null ? _polyfillsNames$get : Infinity;\n }));\n const depsCache = new Map();\n const api = {\n babel: babelApi,\n getUtils,\n method: options.method,\n targets,\n createMetaResolver,\n shouldInjectPolyfill(name) {\n if (polyfillsNames === undefined) {\n throw new Error(`Internal error in the ${factory.name} provider: ` + `shouldInjectPolyfill() can't be called during initialization.`);\n }\n if (!polyfillsNames.has(name)) {\n console.warn(`Internal error in the ${providerName} provider: ` + `unknown polyfill \"${name}\".`);\n }\n if (filterPolyfills && !filterPolyfills(name)) return false;\n let shouldInject = isRequired(name, targets, {\n compatData: polyfillsSupport,\n includes: include,\n excludes: exclude\n });\n if (shouldInjectPolyfill) {\n shouldInject = shouldInjectPolyfill(name, shouldInject);\n if (typeof shouldInject !== \"boolean\") {\n throw new Error(`.shouldInjectPolyfill must return a boolean.`);\n }\n }\n return shouldInject;\n },\n debug(name) {\n var _debugLog, _debugLog$polyfillsSu;\n debugLog().found = true;\n if (!debug || !name) return;\n if (debugLog().polyfills.has(providerName)) return;\n debugLog().polyfills.add(name);\n (_debugLog$polyfillsSu = (_debugLog = debugLog()).polyfillsSupport) != null ? _debugLog$polyfillsSu : _debugLog.polyfillsSupport = polyfillsSupport;\n },\n assertDependency(name, version = \"*\") {\n if (missingDependencies === false) return;\n if (absoluteImports) {\n // If absoluteImports is not false, we will try resolving\n // the dependency and throw if it's not possible. We can\n // skip the check here.\n return;\n }\n const dep = version === \"*\" ? name : `${name}@^${version}`;\n const found = missingDependencies.all ? false : mapGetOr(depsCache, `${name} :: ${dirname}`, () => has());\n if (!found) {\n debugLog().missingDeps.add(dep);\n }\n }\n };\n const provider = factory(api, providerOptions, dirname);\n const providerName = provider.name || factory.name;\n if (typeof provider[methodName] !== \"function\") {\n throw new Error(`The \"${providerName}\" provider doesn't support the \"${method}\" polyfilling method.`);\n }\n if (Array.isArray(provider.polyfills)) {\n polyfillsNames = new Map(provider.polyfills.map((name, index) => [name, index]));\n filterPolyfills = provider.filterPolyfills;\n } else if (provider.polyfills) {\n polyfillsNames = new Map(Object.keys(provider.polyfills).map((name, index) => [name, index]));\n polyfillsSupport = provider.polyfills;\n filterPolyfills = provider.filterPolyfills;\n } else {\n polyfillsNames = new Map();\n }\n ({\n include,\n exclude\n } = validateIncludeExclude(providerName, polyfillsNames, providerOptions.include || [], providerOptions.exclude || []));\n let callProvider;\n if (methodName === \"usageGlobal\") {\n callProvider = (payload, path) => {\n var _ref;\n const utils = getUtils(path);\n return (_ref = provider[methodName](payload, utils, path)) != null ? _ref : false;\n };\n } else {\n callProvider = (payload, path) => {\n const utils = getUtils(path);\n provider[methodName](payload, utils, path);\n return false;\n };\n }\n return {\n debug,\n method,\n targets,\n provider,\n providerName,\n callProvider\n };\n}\nfunction definePolyfillProvider(factory) {\n return declare((babelApi, options, dirname) => {\n babelApi.assertVersion(\"^7.0.0 || ^8.0.0-alpha.0\");\n const {\n traverse\n } = babelApi;\n let debugLog;\n const missingDependencies = applyMissingDependenciesDefaults(options, babelApi);\n const {\n debug,\n method,\n targets,\n provider,\n providerName,\n callProvider\n } = instantiateProvider(factory, options, missingDependencies, dirname, () => debugLog, babelApi);\n const createVisitor = method === \"entry-global\" ? entry : usage;\n const visitor = provider.visitor ? traverse.visitors.merge([createVisitor(callProvider), provider.visitor]) : createVisitor(callProvider);\n if (debug && debug !== presetEnvSilentDebugHeader) {\n console.log(`${providerName}: \\`DEBUG\\` option`);\n console.log(`\\nUsing targets: ${stringifyTargetsMultiline(targets)}`);\n console.log(`\\nUsing polyfills with \\`${method}\\` method:`);\n }\n const {\n runtimeName\n } = provider;\n return {\n name: \"inject-polyfills\",\n visitor,\n pre(file) {\n var _provider$pre;\n if (runtimeName) {\n if (file.get(\"runtimeHelpersModuleName\") && file.get(\"runtimeHelpersModuleName\") !== runtimeName) {\n console.warn(`Two different polyfill providers` + ` (${file.get(\"runtimeHelpersModuleProvider\")}` + ` and ${providerName}) are trying to define two` + ` conflicting @babel/runtime alternatives:` + ` ${file.get(\"runtimeHelpersModuleName\")} and ${runtimeName}.` + ` The second one will be ignored.`);\n } else {\n file.set(\"runtimeHelpersModuleName\", runtimeName);\n file.set(\"runtimeHelpersModuleProvider\", providerName);\n }\n }\n debugLog = {\n polyfills: new Set(),\n polyfillsSupport: undefined,\n found: false,\n providers: new Set(),\n missingDeps: new Set()\n };\n (_provider$pre = provider.pre) == null ? void 0 : _provider$pre.apply(this, arguments);\n },\n post() {\n var _provider$post;\n (_provider$post = provider.post) == null ? void 0 : _provider$post.apply(this, arguments);\n if (missingDependencies !== false) {\n if (missingDependencies.log === \"per-file\") {\n logMissing(debugLog.missingDeps);\n } else {\n laterLogMissing(debugLog.missingDeps);\n }\n }\n if (!debug) return;\n if (this.filename) console.log(`\\n[${this.filename}]`);\n if (debugLog.polyfills.size === 0) {\n console.log(method === \"entry-global\" ? debugLog.found ? `Based on your targets, the ${providerName} polyfill did not add any polyfill.` : `The entry point for the ${providerName} polyfill has not been found.` : `Based on your code and targets, the ${providerName} polyfill did not add any polyfill.`);\n return;\n }\n if (method === \"entry-global\") {\n console.log(`The ${providerName} polyfill entry has been replaced with ` + `the following polyfills:`);\n } else {\n console.log(`The ${providerName} polyfill added the following polyfills:`);\n }\n for (const name of debugLog.polyfills) {\n var _debugLog$polyfillsSu2;\n if ((_debugLog$polyfillsSu2 = debugLog.polyfillsSupport) != null && _debugLog$polyfillsSu2[name]) {\n const filteredTargets = getInclusionReasons(name, targets, debugLog.polyfillsSupport);\n const formattedTargets = JSON.stringify(filteredTargets).replace(/,/g, \", \").replace(/^\\{\"/, '{ \"').replace(/\"\\}$/, '\" }');\n console.log(` ${name} ${formattedTargets}`);\n } else {\n console.log(` ${name}`);\n }\n }\n }\n };\n });\n}\nfunction mapGetOr(map, key, getDefault) {\n let val = map.get(key);\n if (val === undefined) {\n val = getDefault();\n map.set(key, val);\n }\n return val;\n}\nfunction isEmpty(obj) {\n return Object.keys(obj).length === 0;\n}\n\nexport default definePolyfillProvider;\n//# sourceMappingURL=index.browser.mjs.map\n","import corejs3Polyfills from '../core-js-compat/data.js';\nimport getModulesListForTargetVersion from '../core-js-compat/get-modules-list-for-target-version.js';\nimport * as _babel from '@babel/core';\nimport corejsEntries from '../core-js-compat/entries.js';\nimport defineProvider from '@babel/helper-define-polyfill-provider';\n\n// This file is automatically generated by scripts/build-corejs3-shipped-proposals.mjs\n\nvar corejs3ShippedProposalsList = new Set([\"esnext.suppressed-error.constructor\", \"esnext.array.from-async\", \"esnext.array.group\", \"esnext.array.group-to-map\", \"esnext.data-view.get-float16\", \"esnext.data-view.set-float16\", \"esnext.iterator.constructor\", \"esnext.iterator.drop\", \"esnext.iterator.every\", \"esnext.iterator.filter\", \"esnext.iterator.find\", \"esnext.iterator.flat-map\", \"esnext.iterator.for-each\", \"esnext.iterator.from\", \"esnext.iterator.map\", \"esnext.iterator.reduce\", \"esnext.iterator.some\", \"esnext.iterator.take\", \"esnext.iterator.to-array\", \"esnext.json.is-raw-json\", \"esnext.json.parse\", \"esnext.json.raw-json\", \"esnext.math.f16round\", \"esnext.promise.try\", \"esnext.symbol.async-dispose\", \"esnext.symbol.dispose\", \"esnext.symbol.metadata\"]);\n\nconst polyfillsOrder = {};\nObject.keys(corejs3Polyfills).forEach((name, index) => {\n polyfillsOrder[name] = index;\n});\nconst define = (pure, global, name = global[0], exclude) => {\n return {\n name,\n pure,\n global: global.sort((a, b) => polyfillsOrder[a] - polyfillsOrder[b]),\n exclude\n };\n};\nconst typed = (...modules) => define(null, [...modules, ...TypedArrayDependencies]);\nconst ArrayNatureIterators = [\"es.array.iterator\", \"web.dom-collections.iterator\"];\nconst CommonIterators = [\"es.string.iterator\", ...ArrayNatureIterators];\nconst ArrayNatureIteratorsWithTag = [\"es.object.to-string\", ...ArrayNatureIterators];\nconst CommonIteratorsWithTag = [\"es.object.to-string\", ...CommonIterators];\nconst ErrorDependencies = [\"es.error.cause\", \"es.error.to-string\"];\nconst SuppressedErrorDependencies = [\"esnext.suppressed-error.constructor\", ...ErrorDependencies];\nconst ArrayBufferDependencies = [\"es.array-buffer.constructor\", \"es.array-buffer.slice\", \"es.data-view\", \"es.array-buffer.detached\", \"es.array-buffer.transfer\", \"es.array-buffer.transfer-to-fixed-length\", \"es.object.to-string\"];\nconst TypedArrayDependencies = [\"es.typed-array.at\", \"es.typed-array.copy-within\", \"es.typed-array.every\", \"es.typed-array.fill\", \"es.typed-array.filter\", \"es.typed-array.find\", \"es.typed-array.find-index\", \"es.typed-array.find-last\", \"es.typed-array.find-last-index\", \"es.typed-array.for-each\", \"es.typed-array.includes\", \"es.typed-array.index-of\", \"es.typed-array.iterator\", \"es.typed-array.join\", \"es.typed-array.last-index-of\", \"es.typed-array.map\", \"es.typed-array.reduce\", \"es.typed-array.reduce-right\", \"es.typed-array.reverse\", \"es.typed-array.set\", \"es.typed-array.slice\", \"es.typed-array.some\", \"es.typed-array.sort\", \"es.typed-array.subarray\", \"es.typed-array.to-locale-string\", \"es.typed-array.to-reversed\", \"es.typed-array.to-sorted\", \"es.typed-array.to-string\", \"es.typed-array.with\", \"es.object.to-string\", \"es.array.iterator\", \"esnext.typed-array.filter-reject\", \"esnext.typed-array.group-by\", \"esnext.typed-array.to-spliced\", \"esnext.typed-array.unique-by\", ...ArrayBufferDependencies];\nconst PromiseDependencies = [\"es.promise\", \"es.object.to-string\"];\nconst PromiseDependenciesWithIterators = [...PromiseDependencies, ...CommonIterators];\nconst SymbolDependencies = [\"es.symbol\", \"es.symbol.description\", \"es.object.to-string\"];\nconst MapDependencies = [\"es.map\", \"esnext.map.delete-all\", \"esnext.map.emplace\", \"esnext.map.every\", \"esnext.map.filter\", \"esnext.map.find\", \"esnext.map.find-key\", \"esnext.map.includes\", \"esnext.map.key-of\", \"esnext.map.map-keys\", \"esnext.map.map-values\", \"esnext.map.merge\", \"esnext.map.reduce\", \"esnext.map.some\", \"esnext.map.update\", ...CommonIteratorsWithTag];\nconst SetDependencies = [\"es.set\", \"es.set.difference.v2\", \"es.set.intersection.v2\", \"es.set.is-disjoint-from.v2\", \"es.set.is-subset-of.v2\", \"es.set.is-superset-of.v2\", \"es.set.symmetric-difference.v2\", \"es.set.union.v2\", \"esnext.set.add-all\", \"esnext.set.delete-all\", \"esnext.set.difference\", \"esnext.set.every\", \"esnext.set.filter\", \"esnext.set.find\", \"esnext.set.intersection\", \"esnext.set.is-disjoint-from\", \"esnext.set.is-subset-of\", \"esnext.set.is-superset-of\", \"esnext.set.join\", \"esnext.set.map\", \"esnext.set.reduce\", \"esnext.set.some\", \"esnext.set.symmetric-difference\", \"esnext.set.union\", ...CommonIteratorsWithTag];\nconst WeakMapDependencies = [\"es.weak-map\", \"esnext.weak-map.delete-all\", \"esnext.weak-map.emplace\", ...CommonIteratorsWithTag];\nconst WeakSetDependencies = [\"es.weak-set\", \"esnext.weak-set.add-all\", \"esnext.weak-set.delete-all\", ...CommonIteratorsWithTag];\nconst DOMExceptionDependencies = [\"web.dom-exception.constructor\", \"web.dom-exception.stack\", \"web.dom-exception.to-string-tag\", \"es.error.to-string\"];\nconst URLSearchParamsDependencies = [\"web.url-search-params\", \"web.url-search-params.delete\", \"web.url-search-params.has\", \"web.url-search-params.size\", ...CommonIteratorsWithTag];\nconst AsyncIteratorDependencies = [\"esnext.async-iterator.constructor\", ...PromiseDependencies];\nconst AsyncIteratorProblemMethods = [\"esnext.async-iterator.every\", \"esnext.async-iterator.filter\", \"esnext.async-iterator.find\", \"esnext.async-iterator.flat-map\", \"esnext.async-iterator.for-each\", \"esnext.async-iterator.map\", \"esnext.async-iterator.reduce\", \"esnext.async-iterator.some\"];\nconst IteratorDependencies = [\"esnext.iterator.constructor\", \"es.object.to-string\"];\nconst DecoratorMetadataDependencies = [\"esnext.symbol.metadata\", \"esnext.function.metadata\"];\nconst TypedArrayStaticMethods = base => ({\n from: define(null, [\"es.typed-array.from\", base, ...TypedArrayDependencies]),\n fromAsync: define(null, [\"esnext.typed-array.from-async\", base, ...PromiseDependenciesWithIterators, ...TypedArrayDependencies]),\n of: define(null, [\"es.typed-array.of\", base, ...TypedArrayDependencies])\n});\nconst DataViewDependencies = [\"es.data-view\", ...ArrayBufferDependencies];\nconst BuiltIns = {\n AsyncDisposableStack: define(\"async-disposable-stack/index\", [\"esnext.async-disposable-stack.constructor\", \"es.object.to-string\", \"esnext.async-iterator.async-dispose\", \"esnext.iterator.dispose\", ...PromiseDependencies, ...SuppressedErrorDependencies]),\n AsyncIterator: define(\"async-iterator/index\", AsyncIteratorDependencies),\n AggregateError: define(\"aggregate-error\", [\"es.aggregate-error\", ...ErrorDependencies, ...CommonIteratorsWithTag, \"es.aggregate-error.cause\"]),\n ArrayBuffer: define(null, ArrayBufferDependencies),\n DataView: define(null, DataViewDependencies),\n Date: define(null, [\"es.date.to-string\"]),\n DOMException: define(\"dom-exception/index\", DOMExceptionDependencies),\n DisposableStack: define(\"disposable-stack/index\", [\"esnext.disposable-stack.constructor\", \"es.object.to-string\", \"esnext.iterator.dispose\", ...SuppressedErrorDependencies]),\n Error: define(null, ErrorDependencies),\n EvalError: define(null, ErrorDependencies),\n Float32Array: typed(\"es.typed-array.float32-array\"),\n Float64Array: typed(\"es.typed-array.float64-array\"),\n Int8Array: typed(\"es.typed-array.int8-array\"),\n Int16Array: typed(\"es.typed-array.int16-array\"),\n Int32Array: typed(\"es.typed-array.int32-array\"),\n Iterator: define(\"iterator/index\", IteratorDependencies),\n Uint8Array: typed(\"es.typed-array.uint8-array\", \"esnext.uint8-array.set-from-base64\", \"esnext.uint8-array.set-from-hex\", \"esnext.uint8-array.to-base64\", \"esnext.uint8-array.to-hex\"),\n Uint8ClampedArray: typed(\"es.typed-array.uint8-clamped-array\"),\n Uint16Array: typed(\"es.typed-array.uint16-array\"),\n Uint32Array: typed(\"es.typed-array.uint32-array\"),\n Map: define(\"map/index\", MapDependencies),\n Number: define(null, [\"es.number.constructor\"]),\n Observable: define(\"observable/index\", [\"esnext.observable\", \"esnext.symbol.observable\", \"es.object.to-string\", ...CommonIteratorsWithTag]),\n Promise: define(\"promise/index\", PromiseDependencies),\n RangeError: define(null, ErrorDependencies),\n ReferenceError: define(null, ErrorDependencies),\n Reflect: define(null, [\"es.reflect.to-string-tag\", \"es.object.to-string\"]),\n RegExp: define(null, [\"es.regexp.constructor\", \"es.regexp.dot-all\", \"es.regexp.exec\", \"es.regexp.sticky\", \"es.regexp.to-string\"]),\n Set: define(\"set/index\", SetDependencies),\n SuppressedError: define(\"suppressed-error\", SuppressedErrorDependencies),\n Symbol: define(\"symbol/index\", SymbolDependencies),\n SyntaxError: define(null, ErrorDependencies),\n TypeError: define(null, ErrorDependencies),\n URIError: define(null, ErrorDependencies),\n URL: define(\"url/index\", [\"web.url\", \"web.url.to-json\", ...URLSearchParamsDependencies]),\n URLSearchParams: define(\"url-search-params/index\", URLSearchParamsDependencies),\n WeakMap: define(\"weak-map/index\", WeakMapDependencies),\n WeakSet: define(\"weak-set/index\", WeakSetDependencies),\n atob: define(\"atob\", [\"web.atob\", ...DOMExceptionDependencies]),\n btoa: define(\"btoa\", [\"web.btoa\", ...DOMExceptionDependencies]),\n clearImmediate: define(\"clear-immediate\", [\"web.immediate\"]),\n compositeKey: define(\"composite-key\", [\"esnext.composite-key\"]),\n compositeSymbol: define(\"composite-symbol\", [\"esnext.composite-symbol\"]),\n escape: define(\"escape\", [\"es.escape\"]),\n fetch: define(null, PromiseDependencies),\n globalThis: define(\"global-this\", [\"es.global-this\"]),\n parseFloat: define(\"parse-float\", [\"es.parse-float\"]),\n parseInt: define(\"parse-int\", [\"es.parse-int\"]),\n queueMicrotask: define(\"queue-microtask\", [\"web.queue-microtask\"]),\n self: define(\"self\", [\"web.self\"]),\n setImmediate: define(\"set-immediate\", [\"web.immediate\"]),\n setInterval: define(\"set-interval\", [\"web.timers\"]),\n setTimeout: define(\"set-timeout\", [\"web.timers\"]),\n structuredClone: define(\"structured-clone\", [\"web.structured-clone\", ...DOMExceptionDependencies, \"es.array.iterator\", \"es.object.keys\", \"es.object.to-string\", \"es.map\", \"es.set\"]),\n unescape: define(\"unescape\", [\"es.unescape\"])\n};\nconst StaticProperties = {\n AsyncIterator: {\n from: define(\"async-iterator/from\", [\"esnext.async-iterator.from\", ...AsyncIteratorDependencies, ...AsyncIteratorProblemMethods, ...CommonIterators])\n },\n Array: {\n from: define(\"array/from\", [\"es.array.from\", \"es.string.iterator\"]),\n fromAsync: define(\"array/from-async\", [\"esnext.array.from-async\", ...PromiseDependenciesWithIterators]),\n isArray: define(\"array/is-array\", [\"es.array.is-array\"]),\n isTemplateObject: define(\"array/is-template-object\", [\"esnext.array.is-template-object\"]),\n of: define(\"array/of\", [\"es.array.of\"])\n },\n ArrayBuffer: {\n isView: define(null, [\"es.array-buffer.is-view\"])\n },\n BigInt: {\n range: define(\"bigint/range\", [\"esnext.bigint.range\", \"es.object.to-string\"])\n },\n Date: {\n now: define(\"date/now\", [\"es.date.now\"])\n },\n Function: {\n isCallable: define(\"function/is-callable\", [\"esnext.function.is-callable\"]),\n isConstructor: define(\"function/is-constructor\", [\"esnext.function.is-constructor\"])\n },\n Iterator: {\n from: define(\"iterator/from\", [\"esnext.iterator.from\", ...IteratorDependencies, ...CommonIterators]),\n range: define(\"iterator/range\", [\"esnext.iterator.range\", \"es.object.to-string\"])\n },\n JSON: {\n isRawJSON: define(\"json/is-raw-json\", [\"esnext.json.is-raw-json\"]),\n parse: define(\"json/parse\", [\"esnext.json.parse\", \"es.object.keys\"]),\n rawJSON: define(\"json/raw-json\", [\"esnext.json.raw-json\", \"es.object.create\", \"es.object.freeze\"]),\n stringify: define(\"json/stringify\", [\"es.json.stringify\", \"es.date.to-json\"], \"es.symbol\")\n },\n Math: {\n DEG_PER_RAD: define(\"math/deg-per-rad\", [\"esnext.math.deg-per-rad\"]),\n RAD_PER_DEG: define(\"math/rad-per-deg\", [\"esnext.math.rad-per-deg\"]),\n acosh: define(\"math/acosh\", [\"es.math.acosh\"]),\n asinh: define(\"math/asinh\", [\"es.math.asinh\"]),\n atanh: define(\"math/atanh\", [\"es.math.atanh\"]),\n cbrt: define(\"math/cbrt\", [\"es.math.cbrt\"]),\n clamp: define(\"math/clamp\", [\"esnext.math.clamp\"]),\n clz32: define(\"math/clz32\", [\"es.math.clz32\"]),\n cosh: define(\"math/cosh\", [\"es.math.cosh\"]),\n degrees: define(\"math/degrees\", [\"esnext.math.degrees\"]),\n expm1: define(\"math/expm1\", [\"es.math.expm1\"]),\n fround: define(\"math/fround\", [\"es.math.fround\"]),\n f16round: define(\"math/f16round\", [\"esnext.math.f16round\"]),\n fscale: define(\"math/fscale\", [\"esnext.math.fscale\"]),\n hypot: define(\"math/hypot\", [\"es.math.hypot\"]),\n iaddh: define(\"math/iaddh\", [\"esnext.math.iaddh\"]),\n imul: define(\"math/imul\", [\"es.math.imul\"]),\n imulh: define(\"math/imulh\", [\"esnext.math.imulh\"]),\n isubh: define(\"math/isubh\", [\"esnext.math.isubh\"]),\n log10: define(\"math/log10\", [\"es.math.log10\"]),\n log1p: define(\"math/log1p\", [\"es.math.log1p\"]),\n log2: define(\"math/log2\", [\"es.math.log2\"]),\n radians: define(\"math/radians\", [\"esnext.math.radians\"]),\n scale: define(\"math/scale\", [\"esnext.math.scale\"]),\n seededPRNG: define(\"math/seeded-prng\", [\"esnext.math.seeded-prng\"]),\n sign: define(\"math/sign\", [\"es.math.sign\"]),\n signbit: define(\"math/signbit\", [\"esnext.math.signbit\"]),\n sinh: define(\"math/sinh\", [\"es.math.sinh\"]),\n sumPrecise: define(\"math/sum-precise\", [\"esnext.math.sum-precise\", \"es.array.iterator\"]),\n tanh: define(\"math/tanh\", [\"es.math.tanh\"]),\n trunc: define(\"math/trunc\", [\"es.math.trunc\"]),\n umulh: define(\"math/umulh\", [\"esnext.math.umulh\"])\n },\n Map: {\n from: define(\"map/from\", [\"esnext.map.from\", ...MapDependencies]),\n groupBy: define(\"map/group-by\", [\"es.map.group-by\", ...MapDependencies]),\n keyBy: define(\"map/key-by\", [\"esnext.map.key-by\", ...MapDependencies]),\n of: define(\"map/of\", [\"esnext.map.of\", ...MapDependencies])\n },\n Number: {\n EPSILON: define(\"number/epsilon\", [\"es.number.epsilon\"]),\n MAX_SAFE_INTEGER: define(\"number/max-safe-integer\", [\"es.number.max-safe-integer\"]),\n MIN_SAFE_INTEGER: define(\"number/min-safe-integer\", [\"es.number.min-safe-integer\"]),\n fromString: define(\"number/from-string\", [\"esnext.number.from-string\"]),\n isFinite: define(\"number/is-finite\", [\"es.number.is-finite\"]),\n isInteger: define(\"number/is-integer\", [\"es.number.is-integer\"]),\n isNaN: define(\"number/is-nan\", [\"es.number.is-nan\"]),\n isSafeInteger: define(\"number/is-safe-integer\", [\"es.number.is-safe-integer\"]),\n parseFloat: define(\"number/parse-float\", [\"es.number.parse-float\"]),\n parseInt: define(\"number/parse-int\", [\"es.number.parse-int\"]),\n range: define(\"number/range\", [\"esnext.number.range\", \"es.object.to-string\"])\n },\n Object: {\n assign: define(\"object/assign\", [\"es.object.assign\"]),\n create: define(\"object/create\", [\"es.object.create\"]),\n defineProperties: define(\"object/define-properties\", [\"es.object.define-properties\"]),\n defineProperty: define(\"object/define-property\", [\"es.object.define-property\"]),\n entries: define(\"object/entries\", [\"es.object.entries\"]),\n freeze: define(\"object/freeze\", [\"es.object.freeze\"]),\n fromEntries: define(\"object/from-entries\", [\"es.object.from-entries\", \"es.array.iterator\"]),\n getOwnPropertyDescriptor: define(\"object/get-own-property-descriptor\", [\"es.object.get-own-property-descriptor\"]),\n getOwnPropertyDescriptors: define(\"object/get-own-property-descriptors\", [\"es.object.get-own-property-descriptors\"]),\n getOwnPropertyNames: define(\"object/get-own-property-names\", [\"es.object.get-own-property-names\"]),\n getOwnPropertySymbols: define(\"object/get-own-property-symbols\", [\"es.symbol\"]),\n getPrototypeOf: define(\"object/get-prototype-of\", [\"es.object.get-prototype-of\"]),\n groupBy: define(\"object/group-by\", [\"es.object.group-by\", \"es.object.create\"]),\n hasOwn: define(\"object/has-own\", [\"es.object.has-own\"]),\n is: define(\"object/is\", [\"es.object.is\"]),\n isExtensible: define(\"object/is-extensible\", [\"es.object.is-extensible\"]),\n isFrozen: define(\"object/is-frozen\", [\"es.object.is-frozen\"]),\n isSealed: define(\"object/is-sealed\", [\"es.object.is-sealed\"]),\n keys: define(\"object/keys\", [\"es.object.keys\"]),\n preventExtensions: define(\"object/prevent-extensions\", [\"es.object.prevent-extensions\"]),\n seal: define(\"object/seal\", [\"es.object.seal\"]),\n setPrototypeOf: define(\"object/set-prototype-of\", [\"es.object.set-prototype-of\"]),\n values: define(\"object/values\", [\"es.object.values\"])\n },\n Promise: {\n all: define(null, PromiseDependenciesWithIterators),\n allSettled: define(\"promise/all-settled\", [\"es.promise.all-settled\", ...PromiseDependenciesWithIterators]),\n any: define(\"promise/any\", [\"es.promise.any\", \"es.aggregate-error\", ...PromiseDependenciesWithIterators]),\n race: define(null, PromiseDependenciesWithIterators),\n try: define(\"promise/try\", [\"esnext.promise.try\", ...PromiseDependencies]),\n withResolvers: define(\"promise/with-resolvers\", [\"es.promise.with-resolvers\", ...PromiseDependencies])\n },\n Reflect: {\n apply: define(\"reflect/apply\", [\"es.reflect.apply\"]),\n construct: define(\"reflect/construct\", [\"es.reflect.construct\"]),\n defineMetadata: define(\"reflect/define-metadata\", [\"esnext.reflect.define-metadata\"]),\n defineProperty: define(\"reflect/define-property\", [\"es.reflect.define-property\"]),\n deleteMetadata: define(\"reflect/delete-metadata\", [\"esnext.reflect.delete-metadata\"]),\n deleteProperty: define(\"reflect/delete-property\", [\"es.reflect.delete-property\"]),\n get: define(\"reflect/get\", [\"es.reflect.get\"]),\n getMetadata: define(\"reflect/get-metadata\", [\"esnext.reflect.get-metadata\"]),\n getMetadataKeys: define(\"reflect/get-metadata-keys\", [\"esnext.reflect.get-metadata-keys\"]),\n getOwnMetadata: define(\"reflect/get-own-metadata\", [\"esnext.reflect.get-own-metadata\"]),\n getOwnMetadataKeys: define(\"reflect/get-own-metadata-keys\", [\"esnext.reflect.get-own-metadata-keys\"]),\n getOwnPropertyDescriptor: define(\"reflect/get-own-property-descriptor\", [\"es.reflect.get-own-property-descriptor\"]),\n getPrototypeOf: define(\"reflect/get-prototype-of\", [\"es.reflect.get-prototype-of\"]),\n has: define(\"reflect/has\", [\"es.reflect.has\"]),\n hasMetadata: define(\"reflect/has-metadata\", [\"esnext.reflect.has-metadata\"]),\n hasOwnMetadata: define(\"reflect/has-own-metadata\", [\"esnext.reflect.has-own-metadata\"]),\n isExtensible: define(\"reflect/is-extensible\", [\"es.reflect.is-extensible\"]),\n metadata: define(\"reflect/metadata\", [\"esnext.reflect.metadata\"]),\n ownKeys: define(\"reflect/own-keys\", [\"es.reflect.own-keys\"]),\n preventExtensions: define(\"reflect/prevent-extensions\", [\"es.reflect.prevent-extensions\"]),\n set: define(\"reflect/set\", [\"es.reflect.set\"]),\n setPrototypeOf: define(\"reflect/set-prototype-of\", [\"es.reflect.set-prototype-of\"])\n },\n RegExp: {\n escape: define(\"regexp/escape\", [\"esnext.regexp.escape\"])\n },\n Set: {\n from: define(\"set/from\", [\"esnext.set.from\", ...SetDependencies]),\n of: define(\"set/of\", [\"esnext.set.of\", ...SetDependencies])\n },\n String: {\n cooked: define(\"string/cooked\", [\"esnext.string.cooked\"]),\n dedent: define(\"string/dedent\", [\"esnext.string.dedent\", \"es.string.from-code-point\", \"es.weak-map\"]),\n fromCodePoint: define(\"string/from-code-point\", [\"es.string.from-code-point\"]),\n raw: define(\"string/raw\", [\"es.string.raw\"])\n },\n Symbol: {\n asyncDispose: define(\"symbol/async-dispose\", [\"esnext.symbol.async-dispose\", \"esnext.async-iterator.async-dispose\"]),\n asyncIterator: define(\"symbol/async-iterator\", [\"es.symbol.async-iterator\"]),\n customMatcher: define(\"symbol/custom-matcher\", [\"esnext.symbol.custom-matcher\"]),\n dispose: define(\"symbol/dispose\", [\"esnext.symbol.dispose\", \"esnext.iterator.dispose\"]),\n for: define(\"symbol/for\", [], \"es.symbol\"),\n hasInstance: define(\"symbol/has-instance\", [\"es.symbol.has-instance\", \"es.function.has-instance\"]),\n isConcatSpreadable: define(\"symbol/is-concat-spreadable\", [\"es.symbol.is-concat-spreadable\", \"es.array.concat\"]),\n isRegistered: define(\"symbol/is-registered\", [\"esnext.symbol.is-registered\", \"es.symbol\"]),\n isRegisteredSymbol: define(\"symbol/is-registered-symbol\", [\"esnext.symbol.is-registered-symbol\", \"es.symbol\"]),\n isWellKnown: define(\"symbol/is-well-known\", [\"esnext.symbol.is-well-known\", \"es.symbol\"]),\n isWellKnownSymbol: define(\"symbol/is-well-known-symbol\", [\"esnext.symbol.is-well-known-symbol\", \"es.symbol\"]),\n iterator: define(\"symbol/iterator\", [\"es.symbol.iterator\", ...CommonIteratorsWithTag]),\n keyFor: define(\"symbol/key-for\", [], \"es.symbol\"),\n match: define(\"symbol/match\", [\"es.symbol.match\", \"es.string.match\"]),\n matcher: define(\"symbol/matcher\", [\"esnext.symbol.matcher\"]),\n matchAll: define(\"symbol/match-all\", [\"es.symbol.match-all\", \"es.string.match-all\"]),\n metadata: define(\"symbol/metadata\", DecoratorMetadataDependencies),\n metadataKey: define(\"symbol/metadata-key\", [\"esnext.symbol.metadata-key\"]),\n observable: define(\"symbol/observable\", [\"esnext.symbol.observable\"]),\n patternMatch: define(\"symbol/pattern-match\", [\"esnext.symbol.pattern-match\"]),\n replace: define(\"symbol/replace\", [\"es.symbol.replace\", \"es.string.replace\"]),\n search: define(\"symbol/search\", [\"es.symbol.search\", \"es.string.search\"]),\n species: define(\"symbol/species\", [\"es.symbol.species\", \"es.array.species\"]),\n split: define(\"symbol/split\", [\"es.symbol.split\", \"es.string.split\"]),\n toPrimitive: define(\"symbol/to-primitive\", [\"es.symbol.to-primitive\", \"es.date.to-primitive\"]),\n toStringTag: define(\"symbol/to-string-tag\", [\"es.symbol.to-string-tag\", \"es.object.to-string\", \"es.math.to-string-tag\", \"es.json.to-string-tag\"]),\n unscopables: define(\"symbol/unscopables\", [\"es.symbol.unscopables\"])\n },\n URL: {\n canParse: define(\"url/can-parse\", [\"web.url.can-parse\", \"web.url\"]),\n parse: define(\"url/parse\", [\"web.url.parse\", \"web.url\"])\n },\n WeakMap: {\n from: define(\"weak-map/from\", [\"esnext.weak-map.from\", ...WeakMapDependencies]),\n of: define(\"weak-map/of\", [\"esnext.weak-map.of\", ...WeakMapDependencies])\n },\n WeakSet: {\n from: define(\"weak-set/from\", [\"esnext.weak-set.from\", ...WeakSetDependencies]),\n of: define(\"weak-set/of\", [\"esnext.weak-set.of\", ...WeakSetDependencies])\n },\n Int8Array: TypedArrayStaticMethods(\"es.typed-array.int8-array\"),\n Uint8Array: {\n fromBase64: define(null, [\"esnext.uint8-array.from-base64\", ...TypedArrayDependencies]),\n fromHex: define(null, [\"esnext.uint8-array.from-hex\", ...TypedArrayDependencies]),\n ...TypedArrayStaticMethods(\"es.typed-array.uint8-array\")\n },\n Uint8ClampedArray: TypedArrayStaticMethods(\"es.typed-array.uint8-clamped-array\"),\n Int16Array: TypedArrayStaticMethods(\"es.typed-array.int16-array\"),\n Uint16Array: TypedArrayStaticMethods(\"es.typed-array.uint16-array\"),\n Int32Array: TypedArrayStaticMethods(\"es.typed-array.int32-array\"),\n Uint32Array: TypedArrayStaticMethods(\"es.typed-array.uint32-array\"),\n Float32Array: TypedArrayStaticMethods(\"es.typed-array.float32-array\"),\n Float64Array: TypedArrayStaticMethods(\"es.typed-array.float64-array\"),\n WebAssembly: {\n CompileError: define(null, ErrorDependencies),\n LinkError: define(null, ErrorDependencies),\n RuntimeError: define(null, ErrorDependencies)\n }\n};\nconst InstanceProperties = {\n asIndexedPairs: define(null, [\"esnext.async-iterator.as-indexed-pairs\", ...AsyncIteratorDependencies, \"esnext.iterator.as-indexed-pairs\", ...IteratorDependencies]),\n at: define(\"instance/at\", [\n // TODO: We should introduce overloaded instance methods definition\n // Before that is implemented, the `esnext.string.at` must be the first\n // In pure mode, the provider resolves the descriptor as a \"pure\" `esnext.string.at`\n // and treats the compat-data of `esnext.string.at` as the compat-data of\n // pure import `instance/at`. The first polyfill here should have the lowest corejs\n // supported versions.\n \"esnext.string.at\", \"es.string.at-alternative\", \"es.array.at\"]),\n anchor: define(null, [\"es.string.anchor\"]),\n big: define(null, [\"es.string.big\"]),\n bind: define(\"instance/bind\", [\"es.function.bind\"]),\n blink: define(null, [\"es.string.blink\"]),\n bold: define(null, [\"es.string.bold\"]),\n codePointAt: define(\"instance/code-point-at\", [\"es.string.code-point-at\"]),\n codePoints: define(\"instance/code-points\", [\"esnext.string.code-points\"]),\n concat: define(\"instance/concat\", [\"es.array.concat\"], undefined, [\"String\"]),\n copyWithin: define(\"instance/copy-within\", [\"es.array.copy-within\"]),\n demethodize: define(\"instance/demethodize\", [\"esnext.function.demethodize\"]),\n description: define(null, [\"es.symbol\", \"es.symbol.description\"]),\n dotAll: define(null, [\"es.regexp.dot-all\"]),\n drop: define(null, [\"esnext.async-iterator.drop\", ...AsyncIteratorDependencies, \"esnext.iterator.drop\", ...IteratorDependencies]),\n emplace: define(\"instance/emplace\", [\"esnext.map.emplace\", \"esnext.weak-map.emplace\"]),\n endsWith: define(\"instance/ends-with\", [\"es.string.ends-with\"]),\n entries: define(\"instance/entries\", ArrayNatureIteratorsWithTag),\n every: define(\"instance/every\", [\"es.array.every\", \"esnext.async-iterator.every\",\n // TODO: add async iterator dependencies when we support sub-dependencies\n // esnext.async-iterator.every depends on es.promise\n // but we don't want to pull es.promise when esnext.async-iterator is disabled\n //\n // ...AsyncIteratorDependencies\n \"esnext.iterator.every\", ...IteratorDependencies]),\n exec: define(null, [\"es.regexp.exec\"]),\n fill: define(\"instance/fill\", [\"es.array.fill\"]),\n filter: define(\"instance/filter\", [\"es.array.filter\", \"esnext.async-iterator.filter\", \"esnext.iterator.filter\", ...IteratorDependencies]),\n filterReject: define(\"instance/filterReject\", [\"esnext.array.filter-reject\"]),\n finally: define(null, [\"es.promise.finally\", ...PromiseDependencies]),\n find: define(\"instance/find\", [\"es.array.find\", \"esnext.async-iterator.find\", \"esnext.iterator.find\", ...IteratorDependencies]),\n findIndex: define(\"instance/find-index\", [\"es.array.find-index\"]),\n findLast: define(\"instance/find-last\", [\"es.array.find-last\"]),\n findLastIndex: define(\"instance/find-last-index\", [\"es.array.find-last-index\"]),\n fixed: define(null, [\"es.string.fixed\"]),\n flags: define(\"instance/flags\", [\"es.regexp.flags\"]),\n flatMap: define(\"instance/flat-map\", [\"es.array.flat-map\", \"es.array.unscopables.flat-map\", \"esnext.async-iterator.flat-map\", \"esnext.iterator.flat-map\", ...IteratorDependencies]),\n flat: define(\"instance/flat\", [\"es.array.flat\", \"es.array.unscopables.flat\"]),\n getFloat16: define(null, [\"esnext.data-view.get-float16\", ...DataViewDependencies]),\n getUint8Clamped: define(null, [\"esnext.data-view.get-uint8-clamped\", ...DataViewDependencies]),\n getYear: define(null, [\"es.date.get-year\"]),\n group: define(\"instance/group\", [\"esnext.array.group\"]),\n groupBy: define(\"instance/group-by\", [\"esnext.array.group-by\"]),\n groupByToMap: define(\"instance/group-by-to-map\", [\"esnext.array.group-by-to-map\", \"es.map\", \"es.object.to-string\"]),\n groupToMap: define(\"instance/group-to-map\", [\"esnext.array.group-to-map\", \"es.map\", \"es.object.to-string\"]),\n fontcolor: define(null, [\"es.string.fontcolor\"]),\n fontsize: define(null, [\"es.string.fontsize\"]),\n forEach: define(\"instance/for-each\", [\"es.array.for-each\", \"esnext.async-iterator.for-each\", \"esnext.iterator.for-each\", ...IteratorDependencies, \"web.dom-collections.for-each\"]),\n includes: define(\"instance/includes\", [\"es.array.includes\", \"es.string.includes\"]),\n indexed: define(null, [\"esnext.async-iterator.indexed\", ...AsyncIteratorDependencies, \"esnext.iterator.indexed\", ...IteratorDependencies]),\n indexOf: define(\"instance/index-of\", [\"es.array.index-of\"]),\n isWellFormed: define(\"instance/is-well-formed\", [\"es.string.is-well-formed\"]),\n italic: define(null, [\"es.string.italics\"]),\n join: define(null, [\"es.array.join\"]),\n keys: define(\"instance/keys\", ArrayNatureIteratorsWithTag),\n lastIndex: define(null, [\"esnext.array.last-index\"]),\n lastIndexOf: define(\"instance/last-index-of\", [\"es.array.last-index-of\"]),\n lastItem: define(null, [\"esnext.array.last-item\"]),\n link: define(null, [\"es.string.link\"]),\n map: define(\"instance/map\", [\"es.array.map\", \"esnext.async-iterator.map\", \"esnext.iterator.map\"]),\n match: define(null, [\"es.string.match\", \"es.regexp.exec\"]),\n matchAll: define(\"instance/match-all\", [\"es.string.match-all\", \"es.regexp.exec\"]),\n name: define(null, [\"es.function.name\"]),\n padEnd: define(\"instance/pad-end\", [\"es.string.pad-end\"]),\n padStart: define(\"instance/pad-start\", [\"es.string.pad-start\"]),\n push: define(\"instance/push\", [\"es.array.push\"]),\n reduce: define(\"instance/reduce\", [\"es.array.reduce\", \"esnext.async-iterator.reduce\", \"esnext.iterator.reduce\", ...IteratorDependencies]),\n reduceRight: define(\"instance/reduce-right\", [\"es.array.reduce-right\"]),\n repeat: define(\"instance/repeat\", [\"es.string.repeat\"]),\n replace: define(null, [\"es.string.replace\", \"es.regexp.exec\"]),\n replaceAll: define(\"instance/replace-all\", [\"es.string.replace-all\", \"es.string.replace\", \"es.regexp.exec\"]),\n reverse: define(\"instance/reverse\", [\"es.array.reverse\"]),\n search: define(null, [\"es.string.search\", \"es.regexp.exec\"]),\n setFloat16: define(null, [\"esnext.data-view.set-float16\", ...DataViewDependencies]),\n setUint8Clamped: define(null, [\"esnext.data-view.set-uint8-clamped\", ...DataViewDependencies]),\n setYear: define(null, [\"es.date.set-year\"]),\n slice: define(\"instance/slice\", [\"es.array.slice\"]),\n small: define(null, [\"es.string.small\"]),\n some: define(\"instance/some\", [\"es.array.some\", \"esnext.async-iterator.some\", \"esnext.iterator.some\", ...IteratorDependencies]),\n sort: define(\"instance/sort\", [\"es.array.sort\"]),\n splice: define(\"instance/splice\", [\"es.array.splice\"]),\n split: define(null, [\"es.string.split\", \"es.regexp.exec\"]),\n startsWith: define(\"instance/starts-with\", [\"es.string.starts-with\"]),\n sticky: define(null, [\"es.regexp.sticky\"]),\n strike: define(null, [\"es.string.strike\"]),\n sub: define(null, [\"es.string.sub\"]),\n substr: define(null, [\"es.string.substr\"]),\n sup: define(null, [\"es.string.sup\"]),\n take: define(null, [\"esnext.async-iterator.take\", ...AsyncIteratorDependencies, \"esnext.iterator.take\", ...IteratorDependencies]),\n test: define(null, [\"es.regexp.test\", \"es.regexp.exec\"]),\n toArray: define(null, [\"esnext.async-iterator.to-array\", ...AsyncIteratorDependencies, \"esnext.iterator.to-array\", ...IteratorDependencies]),\n toAsync: define(null, [\"esnext.iterator.to-async\", ...IteratorDependencies, ...AsyncIteratorDependencies, ...AsyncIteratorProblemMethods]),\n toExponential: define(null, [\"es.number.to-exponential\"]),\n toFixed: define(null, [\"es.number.to-fixed\"]),\n toGMTString: define(null, [\"es.date.to-gmt-string\"]),\n toISOString: define(null, [\"es.date.to-iso-string\"]),\n toJSON: define(null, [\"es.date.to-json\"]),\n toPrecision: define(null, [\"es.number.to-precision\"]),\n toReversed: define(\"instance/to-reversed\", [\"es.array.to-reversed\"]),\n toSorted: define(\"instance/to-sorted\", [\"es.array.to-sorted\", \"es.array.sort\"]),\n toSpliced: define(\"instance/to-spliced\", [\"es.array.to-spliced\"]),\n toString: define(null, [\"es.object.to-string\", \"es.error.to-string\", \"es.date.to-string\", \"es.regexp.to-string\"]),\n toWellFormed: define(\"instance/to-well-formed\", [\"es.string.to-well-formed\"]),\n trim: define(\"instance/trim\", [\"es.string.trim\"]),\n trimEnd: define(\"instance/trim-end\", [\"es.string.trim-end\"]),\n trimLeft: define(\"instance/trim-left\", [\"es.string.trim-start\"]),\n trimRight: define(\"instance/trim-right\", [\"es.string.trim-end\"]),\n trimStart: define(\"instance/trim-start\", [\"es.string.trim-start\"]),\n uniqueBy: define(\"instance/unique-by\", [\"esnext.array.unique-by\", \"es.map\"]),\n unshift: define(\"instance/unshift\", [\"es.array.unshift\"]),\n unThis: define(\"instance/un-this\", [\"esnext.function.un-this\"]),\n values: define(\"instance/values\", ArrayNatureIteratorsWithTag),\n with: define(\"instance/with\", [\"es.array.with\"]),\n __defineGetter__: define(null, [\"es.object.define-getter\"]),\n __defineSetter__: define(null, [\"es.object.define-setter\"]),\n __lookupGetter__: define(null, [\"es.object.lookup-getter\"]),\n __lookupSetter__: define(null, [\"es.object.lookup-setter\"]),\n [\"__proto__\"]: define(null, [\"es.object.proto\"])\n};\n\n// This file contains the list of paths supported by @babel/runtime-corejs3.\n// It must _not_ be edited, as all new features should go through direct\n// injection of core-js-pure imports.\n\nconst stable = new Set([\"array\", \"array/from\", \"array/is-array\", \"array/of\", \"clear-immediate\", \"date/now\", \"instance/bind\", \"instance/code-point-at\", \"instance/concat\", \"instance/copy-within\", \"instance/ends-with\", \"instance/entries\", \"instance/every\", \"instance/fill\", \"instance/filter\", \"instance/find\", \"instance/find-index\", \"instance/flags\", \"instance/flat\", \"instance/flat-map\", \"instance/for-each\", \"instance/includes\", \"instance/index-of\", \"instance/keys\", \"instance/last-index-of\", \"instance/map\", \"instance/pad-end\", \"instance/pad-start\", \"instance/reduce\", \"instance/reduce-right\", \"instance/repeat\", \"instance/reverse\", \"instance/slice\", \"instance/some\", \"instance/sort\", \"instance/splice\", \"instance/starts-with\", \"instance/trim\", \"instance/trim-end\", \"instance/trim-left\", \"instance/trim-right\", \"instance/trim-start\", \"instance/values\", \"json/stringify\", \"map\", \"math/acosh\", \"math/asinh\", \"math/atanh\", \"math/cbrt\", \"math/clz32\", \"math/cosh\", \"math/expm1\", \"math/fround\", \"math/hypot\", \"math/imul\", \"math/log10\", \"math/log1p\", \"math/log2\", \"math/sign\", \"math/sinh\", \"math/tanh\", \"math/trunc\", \"number/epsilon\", \"number/is-finite\", \"number/is-integer\", \"number/is-nan\", \"number/is-safe-integer\", \"number/max-safe-integer\", \"number/min-safe-integer\", \"number/parse-float\", \"number/parse-int\", \"object/assign\", \"object/create\", \"object/define-properties\", \"object/define-property\", \"object/entries\", \"object/freeze\", \"object/from-entries\", \"object/get-own-property-descriptor\", \"object/get-own-property-descriptors\", \"object/get-own-property-names\", \"object/get-own-property-symbols\", \"object/get-prototype-of\", \"object/is\", \"object/is-extensible\", \"object/is-frozen\", \"object/is-sealed\", \"object/keys\", \"object/prevent-extensions\", \"object/seal\", \"object/set-prototype-of\", \"object/values\", \"parse-float\", \"parse-int\", \"promise\", \"queue-microtask\", \"reflect/apply\", \"reflect/construct\", \"reflect/define-property\", \"reflect/delete-property\", \"reflect/get\", \"reflect/get-own-property-descriptor\", \"reflect/get-prototype-of\", \"reflect/has\", \"reflect/is-extensible\", \"reflect/own-keys\", \"reflect/prevent-extensions\", \"reflect/set\", \"reflect/set-prototype-of\", \"set\", \"set-immediate\", \"set-interval\", \"set-timeout\", \"string/from-code-point\", \"string/raw\", \"symbol\", \"symbol/async-iterator\", \"symbol/for\", \"symbol/has-instance\", \"symbol/is-concat-spreadable\", \"symbol/iterator\", \"symbol/key-for\", \"symbol/match\", \"symbol/replace\", \"symbol/search\", \"symbol/species\", \"symbol/split\", \"symbol/to-primitive\", \"symbol/to-string-tag\", \"symbol/unscopables\", \"url\", \"url-search-params\", \"weak-map\", \"weak-set\"]);\nconst proposals = new Set([...stable, \"aggregate-error\", \"composite-key\", \"composite-symbol\", \"global-this\", \"instance/at\", \"instance/code-points\", \"instance/match-all\", \"instance/replace-all\", \"math/clamp\", \"math/degrees\", \"math/deg-per-rad\", \"math/fscale\", \"math/iaddh\", \"math/imulh\", \"math/isubh\", \"math/rad-per-deg\", \"math/radians\", \"math/scale\", \"math/seeded-prng\", \"math/signbit\", \"math/umulh\", \"number/from-string\", \"observable\", \"reflect/define-metadata\", \"reflect/delete-metadata\", \"reflect/get-metadata\", \"reflect/get-metadata-keys\", \"reflect/get-own-metadata\", \"reflect/get-own-metadata-keys\", \"reflect/has-metadata\", \"reflect/has-own-metadata\", \"reflect/metadata\", \"symbol/dispose\", \"symbol/observable\", \"symbol/pattern-match\"]);\n\nconst {\n types: t$2\n} = _babel.default || _babel;\nfunction canSkipPolyfill(desc, path) {\n const {\n node,\n parent\n } = path;\n switch (desc.name) {\n case \"es.string.split\":\n {\n if (!t$2.isCallExpression(parent, {\n callee: node\n })) return false;\n if (parent.arguments.length < 1) return true;\n const splitter = parent.arguments[0];\n return t$2.isStringLiteral(splitter) || t$2.isTemplateLiteral(splitter);\n }\n }\n}\n\nconst {\n types: t$1\n} = _babel.default || _babel;\nconst BABEL_RUNTIME = \"@babel/runtime-corejs3\";\nfunction callMethod(path, id) {\n const {\n object\n } = path.node;\n let context1, context2;\n if (t$1.isIdentifier(object)) {\n context1 = object;\n context2 = t$1.cloneNode(object);\n } else {\n context1 = path.scope.generateDeclaredUidIdentifier(\"context\");\n context2 = t$1.assignmentExpression(\"=\", t$1.cloneNode(context1), object);\n }\n path.replaceWith(t$1.memberExpression(t$1.callExpression(id, [context2]), t$1.identifier(\"call\")));\n path.parentPath.unshiftContainer(\"arguments\", context1);\n}\nfunction isCoreJSSource(source) {\n if (typeof source === \"string\") {\n source = source.replace(/\\\\/g, \"/\").replace(/(\\/(index)?)?(\\.js)?$/i, \"\").toLowerCase();\n }\n return Object.prototype.hasOwnProperty.call(corejsEntries, source) && corejsEntries[source];\n}\nfunction coreJSModule(name) {\n return `core-js/modules/${name}.js`;\n}\nfunction coreJSPureHelper(name, useBabelRuntime, ext) {\n return useBabelRuntime ? `${BABEL_RUNTIME}/core-js/${name}${ext}` : `core-js-pure/features/${name}.js`;\n}\n\nconst {\n types: t\n} = _babel.default || _babel;\nconst presetEnvCompat = \"#__secret_key__@babel/preset-env__compatibility\";\nconst runtimeCompat = \"#__secret_key__@babel/runtime__compatibility\";\nconst uniqueObjects = [\"array\", \"string\", \"iterator\", \"async-iterator\", \"dom-collections\"].map(v => new RegExp(`[a-z]*\\\\.${v}\\\\..*`));\nconst esnextFallback = (name, cb) => {\n if (cb(name)) return true;\n if (!name.startsWith(\"es.\")) return false;\n const fallback = `esnext.${name.slice(3)}`;\n if (!corejs3Polyfills[fallback]) return false;\n return cb(fallback);\n};\nvar index = defineProvider(function ({\n getUtils,\n method,\n shouldInjectPolyfill,\n createMetaResolver,\n debug,\n babel\n}, {\n version = 3,\n proposals: proposals$1,\n shippedProposals,\n [presetEnvCompat]: {\n noRuntimeName = false\n } = {},\n [runtimeCompat]: {\n useBabelRuntime = false,\n ext = \".js\"\n } = {}\n}) {\n const isWebpack = babel.caller(caller => (caller == null ? void 0 : caller.name) === \"babel-loader\");\n const resolve = createMetaResolver({\n global: BuiltIns,\n static: StaticProperties,\n instance: InstanceProperties\n });\n const available = new Set(getModulesListForTargetVersion(version));\n function getCoreJSPureBase(useProposalBase) {\n return useBabelRuntime ? useProposalBase ? `${BABEL_RUNTIME}/core-js` : `${BABEL_RUNTIME}/core-js-stable` : useProposalBase ? \"core-js-pure/features\" : \"core-js-pure/stable\";\n }\n function maybeInjectGlobalImpl(name, utils) {\n if (shouldInjectPolyfill(name)) {\n debug(name);\n utils.injectGlobalImport(coreJSModule(name), name);\n return true;\n }\n return false;\n }\n function maybeInjectGlobal(names, utils, fallback = true) {\n for (const name of names) {\n if (fallback) {\n esnextFallback(name, name => maybeInjectGlobalImpl(name, utils));\n } else {\n maybeInjectGlobalImpl(name, utils);\n }\n }\n }\n function maybeInjectPure(desc, hint, utils, object) {\n if (desc.pure && !(object && desc.exclude && desc.exclude.includes(object)) && esnextFallback(desc.name, shouldInjectPolyfill)) {\n const {\n name\n } = desc;\n let useProposalBase = false;\n if (proposals$1 || shippedProposals && name.startsWith(\"esnext.\")) {\n useProposalBase = true;\n } else if (name.startsWith(\"es.\") && !available.has(name)) {\n useProposalBase = true;\n }\n if (useBabelRuntime && !(useProposalBase ? proposals : stable).has(desc.pure)) {\n return;\n }\n const coreJSPureBase = getCoreJSPureBase(useProposalBase);\n return utils.injectDefaultImport(`${coreJSPureBase}/${desc.pure}${ext}`, hint);\n }\n }\n function isFeatureStable(name) {\n if (name.startsWith(\"esnext.\")) {\n const esName = `es.${name.slice(7)}`;\n // If its imaginative esName is not in latest compat data, it means\n // the proposal is not stage 4\n return esName in corejs3Polyfills;\n }\n return true;\n }\n return {\n name: \"corejs3\",\n runtimeName: noRuntimeName ? null : BABEL_RUNTIME,\n polyfills: corejs3Polyfills,\n filterPolyfills(name) {\n if (!available.has(name)) return false;\n if (proposals$1 || method === \"entry-global\") return true;\n if (shippedProposals && corejs3ShippedProposalsList.has(name)) {\n return true;\n }\n return isFeatureStable(name);\n },\n entryGlobal(meta, utils, path) {\n if (meta.kind !== \"import\") return;\n const modules = isCoreJSSource(meta.source);\n if (!modules) return;\n if (modules.length === 1 && meta.source === coreJSModule(modules[0]) && shouldInjectPolyfill(modules[0])) {\n // Avoid infinite loop: do not replace imports with a new copy of\n // themselves.\n debug(null);\n return;\n }\n const modulesSet = new Set(modules);\n const filteredModules = modules.filter(module => {\n if (!module.startsWith(\"esnext.\")) return true;\n const stable = module.replace(\"esnext.\", \"es.\");\n if (modulesSet.has(stable) && shouldInjectPolyfill(stable)) {\n return false;\n }\n return true;\n });\n maybeInjectGlobal(filteredModules, utils, false);\n path.remove();\n },\n usageGlobal(meta, utils, path) {\n const resolved = resolve(meta);\n if (!resolved) return;\n if (canSkipPolyfill(resolved.desc, path)) return;\n let deps = resolved.desc.global;\n if (resolved.kind !== \"global\" && \"object\" in meta && meta.object && meta.placement === \"prototype\") {\n const low = meta.object.toLowerCase();\n deps = deps.filter(m => uniqueObjects.some(v => v.test(m)) ? m.includes(low) : true);\n }\n maybeInjectGlobal(deps, utils);\n return true;\n },\n usagePure(meta, utils, path) {\n if (meta.kind === \"in\") {\n if (meta.key === \"Symbol.iterator\") {\n path.replaceWith(t.callExpression(utils.injectDefaultImport(coreJSPureHelper(\"is-iterable\", useBabelRuntime, ext), \"isIterable\"), [path.node.right] // meta.kind === \"in\" narrows this\n ));\n }\n\n return;\n }\n if (path.parentPath.isUnaryExpression({\n operator: \"delete\"\n })) return;\n if (meta.kind === \"property\") {\n // We can't compile destructuring and updateExpression.\n if (!path.isMemberExpression()) return;\n if (!path.isReferenced()) return;\n if (path.parentPath.isUpdateExpression()) return;\n if (t.isSuper(path.node.object)) {\n return;\n }\n if (meta.key === \"Symbol.iterator\") {\n if (!shouldInjectPolyfill(\"es.symbol.iterator\")) return;\n const {\n parent,\n node\n } = path;\n if (t.isCallExpression(parent, {\n callee: node\n })) {\n if (parent.arguments.length === 0) {\n path.parentPath.replaceWith(t.callExpression(utils.injectDefaultImport(coreJSPureHelper(\"get-iterator\", useBabelRuntime, ext), \"getIterator\"), [node.object]));\n path.skip();\n } else {\n callMethod(path, utils.injectDefaultImport(coreJSPureHelper(\"get-iterator-method\", useBabelRuntime, ext), \"getIteratorMethod\"));\n }\n } else {\n path.replaceWith(t.callExpression(utils.injectDefaultImport(coreJSPureHelper(\"get-iterator-method\", useBabelRuntime, ext), \"getIteratorMethod\"), [path.node.object]));\n }\n return;\n }\n }\n let resolved = resolve(meta);\n if (!resolved) return;\n if (canSkipPolyfill(resolved.desc, path)) return;\n if (useBabelRuntime && resolved.desc.pure && resolved.desc.pure.slice(-6) === \"/index\") {\n // Remove /index, since it doesn't exist in @babel/runtime-corejs3s\n resolved = {\n ...resolved,\n desc: {\n ...resolved.desc,\n pure: resolved.desc.pure.slice(0, -6)\n }\n };\n }\n if (resolved.kind === \"global\") {\n const id = maybeInjectPure(resolved.desc, resolved.name, utils);\n if (id) path.replaceWith(id);\n } else if (resolved.kind === \"static\") {\n const id = maybeInjectPure(resolved.desc, resolved.name, utils,\n // @ts-expect-error\n meta.object);\n if (id) path.replaceWith(id);\n } else if (resolved.kind === \"instance\") {\n const id = maybeInjectPure(resolved.desc, `${resolved.name}InstanceProperty`, utils,\n // @ts-expect-error\n meta.object);\n if (!id) return;\n const {\n node\n } = path;\n if (t.isCallExpression(path.parent, {\n callee: node\n })) {\n callMethod(path, id);\n } else {\n path.replaceWith(t.callExpression(id, [node.object]));\n }\n }\n },\n visitor: method === \"usage-global\" && {\n // import(\"foo\")\n CallExpression(path) {\n if (path.get(\"callee\").isImport()) {\n const utils = getUtils(path);\n if (isWebpack) {\n // Webpack uses Promise.all to handle dynamic import.\n maybeInjectGlobal(PromiseDependenciesWithIterators, utils);\n } else {\n maybeInjectGlobal(PromiseDependencies, utils);\n }\n }\n },\n // (async function () { }).finally(...)\n Function(path) {\n if (path.node.async) {\n maybeInjectGlobal(PromiseDependencies, getUtils(path));\n }\n },\n // for-of, [a, b] = c\n \"ForOfStatement|ArrayPattern\"(path) {\n maybeInjectGlobal(CommonIterators, getUtils(path));\n },\n // [...spread]\n SpreadElement(path) {\n if (!path.parentPath.isObjectExpression()) {\n maybeInjectGlobal(CommonIterators, getUtils(path));\n }\n },\n // yield*\n YieldExpression(path) {\n if (path.node.delegate) {\n maybeInjectGlobal(CommonIterators, getUtils(path));\n }\n },\n // Decorators metadata\n Class(path) {\n var _path$node$decorators;\n const hasDecorators = ((_path$node$decorators = path.node.decorators) == null ? void 0 : _path$node$decorators.length) || path.node.body.body.some(el => {\n var _decorators;\n return (_decorators = el.decorators) == null ? void 0 : _decorators.length;\n });\n if (hasDecorators) {\n maybeInjectGlobal(DecoratorMetadataDependencies, getUtils(path));\n }\n }\n }\n };\n});\n\nexport default index;\n//# sourceMappingURL=index.mjs.map\n","import semver, { type SemVer } from \"semver\";\nimport { logPlugin } from \"./debug.ts\";\nimport {\n addProposalSyntaxPlugins,\n removeUnnecessaryItems,\n removeUnsupportedItems,\n} from \"./filter-items.ts\";\nimport moduleTransformations from \"./module-transformations.ts\";\nimport normalizeOptions from \"./normalize-options.ts\";\nimport {\n pluginSyntaxMap,\n proposalPlugins,\n proposalSyntaxPlugins,\n} from \"./shipped-proposals.ts\";\nimport {\n plugins as pluginsList,\n pluginsBugfixes as pluginsBugfixesList,\n overlappingPlugins,\n} from \"./plugins-compat-data.ts\";\n\nimport type { CallerMetadata } from \"@babel/core\";\n\nimport _pluginCoreJS3 from \"babel-plugin-polyfill-corejs3\";\n// TODO(Babel 8): Just use the default import\nconst pluginCoreJS3 = _pluginCoreJS3.default || _pluginCoreJS3;\n\n// TODO(Babel 8): Remove this\nimport babel7 from \"./polyfills/babel-7-plugins.cjs\";\n\nimport getTargets, {\n prettifyTargets,\n filterItems,\n isRequired,\n} from \"@babel/helper-compilation-targets\";\nimport type { Targets, InputTargets } from \"@babel/helper-compilation-targets\";\nimport availablePlugins from \"./available-plugins.ts\";\nimport { declarePreset } from \"@babel/helper-plugin-utils\";\n\nimport type { BuiltInsOption, ModuleOption, Options } from \"./types.ts\";\nexport type { Options };\n\n// TODO: Remove in Babel 8\nexport function isPluginRequired(targets: Targets, support: Targets) {\n return isRequired(\"fake-name\", targets, {\n compatData: { \"fake-name\": support },\n });\n}\n\nfunction filterStageFromList(\n list: { [feature: string]: Targets },\n stageList: Set,\n) {\n return Object.keys(list).reduce((result, item) => {\n if (!stageList.has(item)) {\n // @ts-expect-error todo: refine result types\n result[item] = list[item];\n }\n\n return result;\n }, {});\n}\n\nconst pluginLists = {\n withProposals: {\n withoutBugfixes: pluginsList,\n withBugfixes: Object.assign({}, pluginsList, pluginsBugfixesList),\n },\n withoutProposals: {\n withoutBugfixes: filterStageFromList(pluginsList, proposalPlugins),\n withBugfixes: filterStageFromList(\n Object.assign({}, pluginsList, pluginsBugfixesList),\n proposalPlugins,\n ),\n },\n};\n\nfunction getPluginList(proposals: boolean, bugfixes: boolean) {\n if (proposals) {\n if (bugfixes) return pluginLists.withProposals.withBugfixes;\n else return pluginLists.withProposals.withoutBugfixes;\n } else {\n if (bugfixes) return pluginLists.withoutProposals.withBugfixes;\n else return pluginLists.withoutProposals.withoutBugfixes;\n }\n}\n\nconst getPlugin = (pluginName: string) => {\n const plugin =\n // @ts-expect-error plugin name is constructed from available plugin list\n availablePlugins[pluginName]();\n\n if (!plugin) {\n throw new Error(\n `Could not find plugin \"${pluginName}\". Ensure there is an entry in ./available-plugins.js for it.`,\n );\n }\n\n return plugin;\n};\n\nexport const transformIncludesAndExcludes = (opts: Array): any => {\n return opts.reduce(\n (result, opt) => {\n const target = /^(?:es|es6|es7|esnext|web)\\./.test(opt)\n ? \"builtIns\"\n : \"plugins\";\n result[target].add(opt);\n return result;\n },\n {\n all: opts,\n plugins: new Set(),\n builtIns: new Set(),\n },\n );\n};\n\nfunction getSpecialModulesPluginNames(\n modules: Exclude,\n shouldTransformDynamicImport: boolean,\n babelVersion: string,\n) {\n const modulesPluginNames = [];\n if (modules) {\n modulesPluginNames.push(moduleTransformations[modules]);\n }\n\n if (shouldTransformDynamicImport) {\n if (modules && modules !== \"umd\") {\n modulesPluginNames.push(\"transform-dynamic-import\");\n } else {\n console.warn(\n \"Dynamic import can only be transformed when transforming ES\" +\n \" modules to AMD, CommonJS or SystemJS.\",\n );\n }\n }\n\n if (!process.env.BABEL_8_BREAKING && babelVersion[0] !== \"8\") {\n // Enable module-related syntax plugins for older Babel versions\n if (!shouldTransformDynamicImport) {\n modulesPluginNames.push(\"syntax-dynamic-import\");\n }\n modulesPluginNames.push(\"syntax-top-level-await\");\n modulesPluginNames.push(\"syntax-import-meta\");\n }\n\n return modulesPluginNames;\n}\n\nconst getCoreJSOptions = ({\n useBuiltIns,\n corejs,\n polyfillTargets,\n include,\n exclude,\n proposals,\n shippedProposals,\n debug,\n}: {\n useBuiltIns: BuiltInsOption;\n corejs: SemVer | null | false;\n polyfillTargets: Targets;\n include: Set;\n exclude: Set;\n proposals: boolean;\n shippedProposals: boolean;\n debug: boolean;\n}) => ({\n method: `${useBuiltIns}-global`,\n version: corejs ? corejs.toString() : undefined,\n targets: polyfillTargets,\n include,\n exclude,\n proposals,\n shippedProposals,\n debug,\n \"#__secret_key__@babel/preset-env__compatibility\": {\n noRuntimeName: true,\n },\n});\n\nif (!process.env.BABEL_8_BREAKING) {\n // eslint-disable-next-line no-var\n var getPolyfillPlugins = ({\n useBuiltIns,\n corejs,\n polyfillTargets,\n include,\n exclude,\n proposals,\n shippedProposals,\n regenerator,\n debug,\n }: {\n useBuiltIns: BuiltInsOption;\n corejs: SemVer | null | false;\n polyfillTargets: Targets;\n include: Set;\n exclude: Set;\n proposals: boolean;\n shippedProposals: boolean;\n regenerator: boolean;\n debug: boolean;\n }) => {\n const polyfillPlugins = [];\n if (useBuiltIns === \"usage\" || useBuiltIns === \"entry\") {\n const pluginOptions = getCoreJSOptions({\n useBuiltIns,\n corejs,\n polyfillTargets,\n include,\n exclude,\n proposals,\n shippedProposals,\n debug,\n });\n\n if (corejs) {\n if (process.env.BABEL_8_BREAKING) {\n polyfillPlugins.push([pluginCoreJS3, pluginOptions]);\n } else {\n if (useBuiltIns === \"usage\") {\n if (corejs.major === 2) {\n polyfillPlugins.push(\n [babel7.pluginCoreJS2, pluginOptions],\n [babel7.legacyBabelPolyfillPlugin, { usage: true }],\n );\n } else {\n polyfillPlugins.push(\n [pluginCoreJS3, pluginOptions],\n [\n babel7.legacyBabelPolyfillPlugin,\n { usage: true, deprecated: true },\n ],\n );\n }\n if (regenerator) {\n polyfillPlugins.push([\n babel7.pluginRegenerator,\n { method: \"usage-global\", debug },\n ]);\n }\n } else {\n if (corejs.major === 2) {\n polyfillPlugins.push(\n [babel7.legacyBabelPolyfillPlugin, { regenerator }],\n [babel7.pluginCoreJS2, pluginOptions],\n );\n } else {\n polyfillPlugins.push(\n [pluginCoreJS3, pluginOptions],\n [babel7.legacyBabelPolyfillPlugin, { deprecated: true }],\n );\n if (!regenerator) {\n polyfillPlugins.push([\n babel7.removeRegeneratorEntryPlugin,\n pluginOptions,\n ]);\n }\n }\n }\n }\n }\n }\n return polyfillPlugins;\n };\n\n if (!USE_ESM) {\n // eslint-disable-next-line no-restricted-globals\n exports.getPolyfillPlugins = getPolyfillPlugins;\n }\n}\n\nfunction getLocalTargets(\n optionsTargets: Options[\"targets\"],\n ignoreBrowserslistConfig: boolean,\n configPath: string,\n browserslistEnv: string,\n) {\n if (optionsTargets?.esmodules && optionsTargets.browsers) {\n console.warn(`\n@babel/preset-env: esmodules and browsers targets have been specified together.\n\\`browsers\\` target, \\`${optionsTargets.browsers.toString()}\\` will be ignored.\n`);\n }\n\n return getTargets(optionsTargets as InputTargets, {\n ignoreBrowserslistConfig,\n configPath,\n browserslistEnv,\n });\n}\n\nfunction supportsStaticESM(caller: CallerMetadata | undefined) {\n // TODO(Babel 8): Fallback to true\n // @ts-expect-error supportsStaticESM is not defined in CallerMetadata\n return !!caller?.supportsStaticESM;\n}\n\nfunction supportsDynamicImport(caller: CallerMetadata | undefined) {\n // TODO(Babel 8): Fallback to true\n // @ts-expect-error supportsDynamicImport is not defined in CallerMetadata\n return !!caller?.supportsDynamicImport;\n}\n\nfunction supportsExportNamespaceFrom(caller: CallerMetadata | undefined) {\n // TODO(Babel 8): Fallback to null\n // @ts-expect-error supportsExportNamespaceFrom is not defined in CallerMetadata\n return !!caller?.supportsExportNamespaceFrom;\n}\n\nexport default declarePreset((api, opts: Options) => {\n api.assertVersion(REQUIRED_VERSION(7));\n\n const babelTargets = api.targets();\n\n if (process.env.BABEL_8_BREAKING && (\"loose\" in opts || \"spec\" in opts)) {\n throw new Error(\n \"@babel/preset-env: The 'loose' and 'spec' options have been removed, \" +\n \"and you should configure granular compiler assumptions instead. See \" +\n \"https://babeljs.io/assumptions for more information.\",\n );\n }\n\n const {\n bugfixes,\n configPath,\n debug,\n exclude: optionsExclude,\n forceAllTransforms,\n ignoreBrowserslistConfig,\n include: optionsInclude,\n modules: optionsModules,\n shippedProposals,\n targets: optionsTargets,\n useBuiltIns,\n corejs: { version: corejs, proposals },\n browserslistEnv,\n } = normalizeOptions(opts);\n\n if (!process.env.BABEL_8_BREAKING) {\n // eslint-disable-next-line no-var\n var { loose, spec = false } = opts;\n }\n\n let targets = babelTargets;\n\n if (\n // @babel/core < 7.13.0 doesn't load targets (api.targets() always\n // returns {} thanks to @babel/helper-plugin-utils), so we always want\n // to fallback to the old targets behavior in this case.\n semver.lt(api.version, \"7.13.0\") ||\n // If any browserslist-related option is specified, fallback to the old\n // behavior of not using the targets specified in the top-level options.\n opts.targets ||\n opts.configPath ||\n opts.browserslistEnv ||\n opts.ignoreBrowserslistConfig\n ) {\n if (!process.env.BABEL_8_BREAKING) {\n // eslint-disable-next-line no-var\n var hasUglifyTarget = false;\n\n if (optionsTargets?.uglify) {\n hasUglifyTarget = true;\n delete optionsTargets.uglify;\n\n console.warn(`\nThe uglify target has been deprecated. Set the top level\noption \\`forceAllTransforms: true\\` instead.\n`);\n }\n }\n\n targets = getLocalTargets(\n optionsTargets,\n ignoreBrowserslistConfig,\n configPath,\n browserslistEnv,\n );\n }\n\n const transformTargets = (\n process.env.BABEL_8_BREAKING\n ? forceAllTransforms\n : forceAllTransforms || hasUglifyTarget\n )\n ? ({} as Targets)\n : targets;\n\n const include = transformIncludesAndExcludes(optionsInclude);\n const exclude = transformIncludesAndExcludes(optionsExclude);\n\n const compatData = getPluginList(shippedProposals, bugfixes);\n const modules =\n optionsModules === \"auto\"\n ? api.caller(supportsStaticESM)\n ? false\n : \"commonjs\"\n : optionsModules;\n const shouldTransformDynamicImport =\n optionsModules === \"auto\" ? !api.caller(supportsDynamicImport) : !!modules;\n\n // If the caller does not support export-namespace-from, we forcefully add\n // the plugin to `includes`.\n // TODO(Babel 8): stop doing this, similarly to how we don't do this for any\n // other plugin. We can consider adding bundlers as targets in the future,\n // but we should not have a one-off special case for this plugin.\n if (\n !exclude.plugins.has(\"transform-export-namespace-from\") &&\n (optionsModules === \"auto\"\n ? !api.caller(supportsExportNamespaceFrom)\n : !!modules)\n ) {\n include.plugins.add(\"transform-export-namespace-from\");\n }\n\n const pluginNames = filterItems(\n compatData,\n include.plugins,\n exclude.plugins,\n transformTargets,\n getSpecialModulesPluginNames(\n modules,\n shouldTransformDynamicImport,\n api.version,\n ),\n process.env.BABEL_8_BREAKING || !loose\n ? undefined\n : [\"transform-typeof-symbol\"],\n pluginSyntaxMap,\n );\n if (shippedProposals) {\n addProposalSyntaxPlugins(pluginNames, proposalSyntaxPlugins);\n }\n removeUnsupportedItems(pluginNames, api.version);\n removeUnnecessaryItems(pluginNames, overlappingPlugins);\n\n const polyfillPlugins = process.env.BABEL_8_BREAKING\n ? useBuiltIns\n ? [\n [\n pluginCoreJS3,\n getCoreJSOptions({\n useBuiltIns,\n corejs,\n polyfillTargets: targets,\n include: include.builtIns,\n exclude: exclude.builtIns,\n proposals,\n shippedProposals,\n debug,\n }),\n ],\n ]\n : []\n : getPolyfillPlugins({\n useBuiltIns,\n corejs,\n polyfillTargets: targets,\n include: include.builtIns,\n exclude: exclude.builtIns,\n proposals,\n shippedProposals,\n regenerator: pluginNames.has(\"transform-regenerator\"),\n debug,\n });\n\n const pluginUseBuiltIns = useBuiltIns !== false;\n const plugins = Array.from(pluginNames)\n .map(pluginName => {\n if (\n !process.env.BABEL_8_BREAKING &&\n (pluginName === \"transform-class-properties\" ||\n pluginName === \"transform-private-methods\" ||\n pluginName === \"transform-private-property-in-object\")\n ) {\n return [\n getPlugin(pluginName),\n {\n loose: loose\n ? \"#__internal__@babel/preset-env__prefer-true-but-false-is-ok-if-it-prevents-an-error\"\n : \"#__internal__@babel/preset-env__prefer-false-but-true-is-ok-if-it-prevents-an-error\",\n },\n ];\n }\n if (pluginName === \"syntax-import-attributes\") {\n // For backward compatibility with the import-assertions plugin, we\n // allow the deprecated `assert` keyword.\n // TODO(Babel 8): Revisit this.\n return [getPlugin(pluginName), { deprecatedAssertSyntax: true }];\n }\n return [\n getPlugin(pluginName),\n process.env.BABEL_8_BREAKING\n ? { useBuiltIns: pluginUseBuiltIns }\n : { spec, loose, useBuiltIns: pluginUseBuiltIns },\n ];\n })\n .concat(polyfillPlugins);\n\n if (debug) {\n console.log(\"@babel/preset-env: `DEBUG` option\");\n console.log(\"\\nUsing targets:\");\n console.log(JSON.stringify(prettifyTargets(targets), null, 2));\n console.log(`\\nUsing modules transform: ${optionsModules.toString()}`);\n console.log(\"\\nUsing plugins:\");\n pluginNames.forEach(pluginName => {\n logPlugin(pluginName, targets, compatData);\n });\n\n if (!useBuiltIns) {\n console.log(\n \"\\nUsing polyfills: No polyfills were added, since the `useBuiltIns` option was not set.\",\n );\n }\n }\n\n return { plugins };\n});\n\nif (!process.env.BABEL_8_BREAKING && !USE_ESM) {\n // eslint-disable-next-line no-restricted-globals\n exports.getModulesPluginNames = ({\n modules,\n transformations,\n shouldTransformESM,\n shouldTransformDynamicImport,\n shouldTransformExportNamespaceFrom,\n }: {\n modules: ModuleOption;\n transformations: typeof import(\"./module-transformations\").default;\n shouldTransformESM: boolean;\n shouldTransformDynamicImport: boolean;\n shouldTransformExportNamespaceFrom: boolean;\n }) => {\n const modulesPluginNames = [];\n if (modules !== false && transformations[modules]) {\n if (shouldTransformESM) {\n modulesPluginNames.push(transformations[modules]);\n }\n\n if (shouldTransformDynamicImport) {\n if (shouldTransformESM && modules !== \"umd\") {\n modulesPluginNames.push(\"transform-dynamic-import\");\n } else {\n console.warn(\n \"Dynamic import can only be transformed when transforming ES\" +\n \" modules to AMD, CommonJS or SystemJS.\",\n );\n }\n }\n }\n\n if (shouldTransformExportNamespaceFrom) {\n modulesPluginNames.push(\"transform-export-namespace-from\");\n }\n if (!shouldTransformDynamicImport) {\n modulesPluginNames.push(\"syntax-dynamic-import\");\n }\n if (!shouldTransformExportNamespaceFrom) {\n modulesPluginNames.push(\"syntax-export-namespace-from\");\n }\n modulesPluginNames.push(\"syntax-top-level-await\");\n modulesPluginNames.push(\"syntax-import-meta\");\n\n return modulesPluginNames;\n };\n}\n","import { OptionValidator } from \"@babel/helper-validator-option\";\nconst v = new OptionValidator(\"@babel/preset-flow\");\n\nexport default function normalizeOptions(options: any = {}) {\n let { all, ignoreExtensions, experimental_useHermesParser } = options;\n const { allowDeclareFields } = options;\n\n if (process.env.BABEL_8_BREAKING) {\n v.invariant(\n !(\"allowDeclareFields\" in options),\n `Since Babel 8, \\`declare property: A\\` is always supported, and the \"allowDeclareFields\" option is no longer available. Please remove it from your config.`,\n );\n const TopLevelOptions = {\n all: \"all\",\n ignoreExtensions: \"ignoreExtensions\",\n experimental_useHermesParser: \"experimental_useHermesParser\",\n };\n v.validateTopLevelOptions(options, TopLevelOptions);\n all = v.validateBooleanOption(TopLevelOptions.all, all);\n ignoreExtensions = v.validateBooleanOption(\n TopLevelOptions.ignoreExtensions,\n ignoreExtensions,\n );\n experimental_useHermesParser = v.validateBooleanOption(\n TopLevelOptions.experimental_useHermesParser,\n experimental_useHermesParser,\n );\n return {\n all,\n ignoreExtensions,\n experimental_useHermesParser,\n };\n } else {\n return {\n all,\n allowDeclareFields,\n ignoreExtensions,\n experimental_useHermesParser,\n };\n }\n}\n","import { declarePreset } from \"@babel/helper-plugin-utils\";\nimport transformFlowStripTypes from \"@babel/plugin-transform-flow-strip-types\";\nimport normalizeOptions from \"./normalize-options.ts\";\n\nexport default declarePreset((api, opts) => {\n api.assertVersion(REQUIRED_VERSION(7));\n const {\n all,\n allowDeclareFields,\n ignoreExtensions = process.env.BABEL_8_BREAKING ? false : true,\n experimental_useHermesParser: useHermesParser = false,\n } = normalizeOptions(opts);\n\n const plugins: any[] = [\n [transformFlowStripTypes, { all, allowDeclareFields }],\n ];\n\n if (useHermesParser) {\n if (Number.parseInt(process.versions.node, 10) < 12) {\n throw new Error(\n \"The Hermes parser is only supported in Node 12 and later.\",\n );\n }\n if (IS_STANDALONE) {\n throw new Error(\n \"The Hermes parser is not supported in the @babel/standalone.\",\n );\n }\n plugins.unshift(\"babel-plugin-syntax-hermes-parser\");\n }\n\n if (ignoreExtensions) {\n return { plugins };\n }\n\n return {\n overrides: [\n {\n test: filename => filename == null || !/\\.tsx?$/.test(filename),\n plugins,\n },\n ],\n };\n});\n","import { declare } from \"@babel/helper-plugin-utils\";\nimport annotateAsPure from \"@babel/helper-annotate-as-pure\";\nimport { types as t, type NodePath } from \"@babel/core\";\n\n// Mapping of React top-level methods that are pure.\n// This plugin adds a /*#__PURE__#/ annotation to calls to these methods,\n// so that terser and other minifiers can safely remove them during dead\n// code elimination.\n// See https://reactjs.org/docs/react-api.html\nconst PURE_CALLS: [string, Set][] = [\n [\n \"react\",\n new Set([\n \"cloneElement\",\n \"createContext\",\n \"createElement\",\n \"createFactory\",\n \"createRef\",\n \"forwardRef\",\n \"isValidElement\",\n \"memo\",\n \"lazy\",\n ]),\n ],\n [\"react-dom\", new Set([\"createPortal\"])],\n];\n\nexport default declare(api => {\n api.assertVersion(REQUIRED_VERSION(7));\n\n return {\n name: \"transform-react-pure-annotations\",\n visitor: {\n CallExpression(path) {\n if (isReactCall(path)) {\n annotateAsPure(path);\n }\n },\n },\n };\n});\n\nfunction isReactCall(path: NodePath) {\n // If the callee is not a member expression, then check if it matches\n // a named import, e.g. `import {forwardRef} from 'react'`.\n const calleePath = path.get(\"callee\");\n if (!calleePath.isMemberExpression()) {\n for (const [module, methods] of PURE_CALLS) {\n for (const method of methods) {\n if (calleePath.referencesImport(module, method)) {\n return true;\n }\n }\n }\n\n return false;\n }\n\n // Otherwise, check if the member expression's object matches\n // a default import (`import React from 'react'`) or namespace\n // import (`import * as React from 'react'), and check if the\n // property matches one of the pure methods.\n const object = calleePath.get(\"object\");\n const callee = calleePath.node;\n if (!callee.computed && t.isIdentifier(callee.property)) {\n const propertyName = callee.property.name;\n for (const [module, methods] of PURE_CALLS) {\n if (\n object.referencesImport(module, \"default\") ||\n object.referencesImport(module, \"*\")\n ) {\n return methods.has(propertyName);\n }\n }\n }\n\n return false;\n}\n","import {\n OptionValidator,\n findSuggestion,\n} from \"@babel/helper-validator-option\";\nconst v = new OptionValidator(\"@babel/preset-react\");\n\nexport default function normalizeOptions(options: any = {}) {\n if (process.env.BABEL_8_BREAKING) {\n if (\"useSpread\" in options) {\n throw new Error(\n '@babel/preset-react: Since Babel 8, an inline object with spread elements is always used, and the \"useSpread\" option is no longer available. Please remove it from your config.',\n );\n }\n\n if (\"useBuiltIns\" in options) {\n const useBuiltInsFormatted = JSON.stringify(options.useBuiltIns);\n throw new Error(\n `@babel/preset-react: Since \"useBuiltIns\" is removed in Babel 8, you can remove it from the config.\n- Babel 8 now transforms JSX spread to object spread. If you need to transpile object spread with\n\\`useBuiltIns: ${useBuiltInsFormatted}\\`, you can use the following config\n{\n \"plugins\": [\n [\"@babel/plugin-transform-object-rest-spread\", { \"loose\": true, \"useBuiltIns\": ${useBuiltInsFormatted} }]\n ],\n \"presets\": [\"@babel/preset-react\"]\n}`,\n );\n }\n\n const TopLevelOptions = {\n development: \"development\",\n importSource: \"importSource\",\n pragma: \"pragma\",\n pragmaFrag: \"pragmaFrag\",\n pure: \"pure\",\n runtime: \"runtime\",\n throwIfNamespace: \"throwIfNamespace\",\n };\n v.validateTopLevelOptions(options, TopLevelOptions);\n const development = v.validateBooleanOption(\n TopLevelOptions.development,\n options.development,\n false,\n );\n let importSource = v.validateStringOption(\n TopLevelOptions.importSource,\n options.importSource,\n );\n let pragma = v.validateStringOption(TopLevelOptions.pragma, options.pragma);\n let pragmaFrag = v.validateStringOption(\n TopLevelOptions.pragmaFrag,\n options.pragmaFrag,\n );\n const pure = v.validateBooleanOption(TopLevelOptions.pure, options.pure);\n const runtime = v.validateStringOption(\n TopLevelOptions.runtime,\n options.runtime,\n \"automatic\",\n );\n const throwIfNamespace = v.validateBooleanOption(\n TopLevelOptions.throwIfNamespace,\n options.throwIfNamespace,\n true,\n );\n\n const validRuntime = [\"classic\", \"automatic\"];\n\n if (runtime === \"classic\") {\n pragma = pragma || \"React.createElement\";\n pragmaFrag = pragmaFrag || \"React.Fragment\";\n } else if (runtime === \"automatic\") {\n importSource = importSource || \"react\";\n } else {\n throw new Error(\n `@babel/preset-react: 'runtime' must be one of ['automatic', 'classic'] but we have '${runtime}'\\n` +\n `- Did you mean '${findSuggestion(runtime, validRuntime)}'?`,\n );\n }\n\n return {\n development,\n importSource,\n pragma,\n pragmaFrag,\n pure,\n runtime,\n throwIfNamespace,\n };\n } else {\n let { pragma, pragmaFrag } = options;\n\n const {\n pure,\n throwIfNamespace = true,\n runtime = \"classic\",\n importSource,\n useBuiltIns,\n useSpread,\n } = options;\n\n if (runtime === \"classic\") {\n pragma = pragma || \"React.createElement\";\n pragmaFrag = pragmaFrag || \"React.Fragment\";\n }\n\n const development = !!options.development;\n\n return {\n development,\n importSource,\n pragma,\n pragmaFrag,\n pure,\n runtime,\n throwIfNamespace,\n useBuiltIns,\n useSpread,\n };\n }\n}\n","import { declarePreset } from \"@babel/helper-plugin-utils\";\nimport transformReactJSX from \"@babel/plugin-transform-react-jsx\";\nimport transformReactJSXDevelopment from \"@babel/plugin-transform-react-jsx-development\";\nimport transformReactDisplayName from \"@babel/plugin-transform-react-display-name\";\nimport transformReactPure from \"@babel/plugin-transform-react-pure-annotations\";\nimport normalizeOptions from \"./normalize-options.ts\";\n\nexport interface Options {\n development?: boolean;\n importSource?: string;\n pragma?: string;\n pragmaFrag?: string;\n pure?: string;\n runtime?: \"automatic\" | \"classic\";\n throwIfNamespace?: boolean;\n useBuiltIns?: boolean;\n useSpread?: boolean;\n}\n\nexport default declarePreset((api, opts: Options) => {\n api.assertVersion(REQUIRED_VERSION(7));\n\n const {\n development,\n importSource,\n pragma,\n pragmaFrag,\n pure,\n runtime,\n throwIfNamespace,\n } = normalizeOptions(opts);\n\n return {\n plugins: [\n [\n development ? transformReactJSXDevelopment : transformReactJSX,\n process.env.BABEL_8_BREAKING\n ? {\n importSource,\n pragma,\n pragmaFrag,\n runtime,\n throwIfNamespace,\n pure,\n }\n : {\n importSource,\n pragma,\n pragmaFrag,\n runtime,\n throwIfNamespace,\n pure,\n useBuiltIns: !!opts.useBuiltIns,\n useSpread: opts.useSpread,\n },\n ],\n transformReactDisplayName,\n pure !== false && transformReactPure,\n ].filter(Boolean),\n };\n});\n","import { OptionValidator } from \"@babel/helper-validator-option\";\nconst v = new OptionValidator(\"@babel/preset-typescript\");\n\nexport interface Options {\n ignoreExtensions?: boolean;\n allowDeclareFields?: boolean;\n allowNamespaces?: boolean;\n disallowAmbiguousJSXLike?: boolean;\n jsxPragma?: string;\n jsxPragmaFrag?: string;\n onlyRemoveTypeImports?: boolean;\n optimizeConstEnums?: boolean;\n rewriteImportExtensions?: boolean;\n\n // TODO: Remove in Babel 8\n allExtensions?: boolean;\n isTSX?: boolean;\n}\n\nexport default function normalizeOptions(options: Options = {}) {\n let { allowNamespaces = true, jsxPragma, onlyRemoveTypeImports } = options;\n\n const TopLevelOptions: {\n [Key in keyof Omit]-?: Key;\n } = {\n ignoreExtensions: \"ignoreExtensions\",\n allowNamespaces: \"allowNamespaces\",\n disallowAmbiguousJSXLike: \"disallowAmbiguousJSXLike\",\n jsxPragma: \"jsxPragma\",\n jsxPragmaFrag: \"jsxPragmaFrag\",\n onlyRemoveTypeImports: \"onlyRemoveTypeImports\",\n optimizeConstEnums: \"optimizeConstEnums\",\n rewriteImportExtensions: \"rewriteImportExtensions\",\n\n // TODO: Remove in Babel 8\n allExtensions: \"allExtensions\",\n isTSX: \"isTSX\",\n };\n\n if (process.env.BABEL_8_BREAKING) {\n v.invariant(\n !(\"allowDeclareFields\" in options),\n \"The .allowDeclareFields option has been removed and it's now always enabled. Please remove it from your config.\",\n );\n v.invariant(\n !(\"allExtensions\" in options) && !(\"isTSX\" in options),\n \"The .allExtensions and .isTSX options have been removed.\\n\" +\n \"If you want to disable JSX detection based on file extensions, \" +\n \"you can set the .ignoreExtensions option to true.\\n\" +\n \"If you want to force JSX parsing, you can enable the \" +\n \"@babel/plugin-syntax-jsx plugin.\",\n );\n\n v.validateTopLevelOptions(options, TopLevelOptions);\n allowNamespaces = v.validateBooleanOption(\n TopLevelOptions.allowNamespaces,\n options.allowNamespaces,\n true,\n );\n jsxPragma = v.validateStringOption(\n TopLevelOptions.jsxPragma,\n options.jsxPragma,\n \"React\",\n );\n onlyRemoveTypeImports = v.validateBooleanOption(\n TopLevelOptions.onlyRemoveTypeImports,\n options.onlyRemoveTypeImports,\n true,\n );\n }\n\n const jsxPragmaFrag = v.validateStringOption(\n TopLevelOptions.jsxPragmaFrag,\n options.jsxPragmaFrag,\n \"React.Fragment\",\n );\n\n if (!process.env.BABEL_8_BREAKING) {\n // eslint-disable-next-line no-var\n var allExtensions = v.validateBooleanOption(\n TopLevelOptions.allExtensions,\n options.allExtensions,\n false,\n );\n\n // eslint-disable-next-line no-var\n var isTSX = v.validateBooleanOption(\n TopLevelOptions.isTSX,\n options.isTSX,\n false,\n );\n if (isTSX) {\n v.invariant(allExtensions, \"isTSX:true requires allExtensions:true\");\n }\n }\n\n const ignoreExtensions = v.validateBooleanOption(\n TopLevelOptions.ignoreExtensions,\n options.ignoreExtensions,\n false,\n );\n\n const disallowAmbiguousJSXLike = v.validateBooleanOption(\n TopLevelOptions.disallowAmbiguousJSXLike,\n options.disallowAmbiguousJSXLike,\n false,\n );\n if (disallowAmbiguousJSXLike) {\n if (process.env.BABEL_8_BREAKING) {\n v.invariant(\n ignoreExtensions,\n \"disallowAmbiguousJSXLike:true requires ignoreExtensions:true\",\n );\n } else {\n v.invariant(\n allExtensions,\n \"disallowAmbiguousJSXLike:true requires allExtensions:true\",\n );\n }\n }\n\n const optimizeConstEnums = v.validateBooleanOption(\n TopLevelOptions.optimizeConstEnums,\n options.optimizeConstEnums,\n false,\n );\n\n const rewriteImportExtensions = v.validateBooleanOption(\n TopLevelOptions.rewriteImportExtensions,\n options.rewriteImportExtensions,\n false,\n );\n\n const normalized: Options = {\n ignoreExtensions,\n allowNamespaces,\n disallowAmbiguousJSXLike,\n jsxPragma,\n jsxPragmaFrag,\n onlyRemoveTypeImports,\n optimizeConstEnums,\n rewriteImportExtensions,\n };\n if (!process.env.BABEL_8_BREAKING) {\n normalized.allExtensions = allExtensions;\n normalized.isTSX = isTSX;\n }\n return normalized;\n}\n","import { declare } from \"@babel/helper-plugin-utils\";\nimport type { types as t, NodePath } from \"@babel/core\";\n\nexport default declare(function ({ types: t }) {\n return {\n name: \"preset-typescript/plugin-rewrite-ts-imports\",\n visitor: {\n \"ImportDeclaration|ExportAllDeclaration|ExportNamedDeclaration\"({\n node,\n }: NodePath<\n t.ImportDeclaration | t.ExportAllDeclaration | t.ExportNamedDeclaration\n >) {\n const { source } = node;\n const kind = t.isImportDeclaration(node)\n ? node.importKind\n : node.exportKind;\n if (kind === \"value\" && source && /[\\\\/]/.test(source.value)) {\n source.value = source.value\n .replace(/(\\.[mc]?)ts$/, \"$1js\")\n .replace(/\\.tsx$/, \".js\");\n }\n },\n },\n };\n});\n","/**\n * Copyright 2013-2015, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of the React source tree.\n */\n\nconst scriptTypes = [\"text/jsx\", \"text/babel\"];\n\nimport type { transform } from \"./index.ts\";\nimport type { InputOptions } from \"@babel/core\";\n\nlet headEl: HTMLHeadElement;\nlet inlineScriptCount = 0;\n\ntype CompilationResult = {\n async: boolean;\n type: string;\n error: boolean;\n loaded: boolean;\n content: string | null;\n executed: boolean;\n // nonce is undefined in browsers that don't support the nonce global attribute\n nonce: string | undefined;\n // todo: refine plugins/presets\n plugins: InputOptions[\"plugins\"];\n presets: InputOptions[\"presets\"];\n url: string | null;\n};\n\n/**\n * Actually transform the code.\n */\nfunction transformCode(\n transformFn: typeof transform,\n script: CompilationResult,\n) {\n let source;\n if (script.url != null) {\n source = script.url;\n } else {\n source = \"Inline Babel script\";\n inlineScriptCount++;\n if (inlineScriptCount > 1) {\n source += \" (\" + inlineScriptCount + \")\";\n }\n }\n\n return transformFn(script.content, buildBabelOptions(script, source)).code;\n}\n\n/**\n * Builds the Babel options for transforming the specified script, using some\n * sensible default presets and plugins if none were explicitly provided.\n */\nfunction buildBabelOptions(script: CompilationResult, filename: string) {\n let presets = script.presets;\n if (!presets) {\n if (script.type === \"module\") {\n presets = [\n \"react\",\n [\n \"env\",\n {\n targets: {\n esmodules: true,\n },\n modules: false,\n },\n ],\n ];\n } else {\n presets = [\"react\", \"env\"];\n }\n }\n\n return {\n filename,\n presets,\n plugins: script.plugins || [\n \"transform-class-properties\",\n \"transform-object-rest-spread\",\n \"transform-flow-strip-types\",\n ],\n sourceMaps: \"inline\" as const,\n sourceFileName: filename,\n };\n}\n\n/**\n * Appends a script element at the end of the with the content of code,\n * after transforming it.\n */\nfunction run(transformFn: typeof transform, script: CompilationResult) {\n const scriptEl = document.createElement(\"script\");\n if (script.type) {\n scriptEl.setAttribute(\"type\", script.type);\n }\n if (script.nonce) {\n scriptEl.nonce = script.nonce;\n }\n scriptEl.text = transformCode(transformFn, script);\n headEl.appendChild(scriptEl);\n}\n\n/**\n * Load script from the provided url and pass the content to the callback.\n */\nfunction load(\n url: string,\n successCallback: (content: string) => void,\n errorCallback: () => void,\n) {\n const xhr = new XMLHttpRequest();\n\n // async, however scripts will be executed in the order they are in the\n // DOM to mirror normal script loading.\n xhr.open(\"GET\", url, true);\n if (\"overrideMimeType\" in xhr) {\n xhr.overrideMimeType(\"text/plain\");\n }\n xhr.onreadystatechange = function () {\n if (xhr.readyState === 4) {\n if (xhr.status === 0 || xhr.status === 200) {\n successCallback(xhr.responseText);\n } else {\n errorCallback();\n throw new Error(\"Could not load \" + url);\n }\n }\n };\n xhr.send(null);\n}\n\n/**\n * Converts a comma-separated data attribute string into an array of values. If\n * the string is empty, returns an empty array. If the string is not defined,\n * returns null.\n */\nfunction getPluginsOrPresetsFromScript(\n script: HTMLScriptElement,\n attributeName: string,\n) {\n const rawValue = script.getAttribute(attributeName);\n if (rawValue === \"\") {\n // Empty string means to not load ANY presets or plugins\n return [];\n }\n if (!rawValue) {\n // Any other falsy value (null, undefined) means we're not overriding this\n // setting, and should use the default.\n return null;\n }\n return rawValue.split(\",\").map(item => item.trim());\n}\n\n/**\n * Loop over provided script tags and get the content, via innerHTML if an\n * inline script, or by using XHR. Transforms are applied if needed. The scripts\n * are executed in the order they are found on the page.\n */\nfunction loadScripts(\n transformFn: typeof transform,\n scripts: HTMLScriptElement[],\n) {\n const results: CompilationResult[] = [];\n const count = scripts.length;\n\n function check() {\n for (let i = 0; i < count; i++) {\n const result = results[i];\n\n if (result.loaded && !result.executed) {\n result.executed = true;\n run(transformFn, result);\n } else if (!result.loaded && !result.error && !result.async) {\n break;\n }\n }\n }\n\n for (let i = 0; i < count; i++) {\n const script = scripts[i];\n const result: CompilationResult = {\n // script.async is always true for non-JavaScript script tags\n async: script.hasAttribute(\"async\"),\n type: script.getAttribute(\"data-type\"),\n nonce: script.nonce,\n error: false,\n executed: false,\n plugins: getPluginsOrPresetsFromScript(script, \"data-plugins\"),\n presets: getPluginsOrPresetsFromScript(script, \"data-presets\"),\n loaded: false,\n url: null,\n content: null,\n };\n results.push(result);\n\n if (script.src) {\n result.url = script.src;\n\n load(\n script.src,\n content => {\n result.loaded = true;\n result.content = content;\n check();\n },\n () => {\n result.error = true;\n check();\n },\n );\n } else {\n result.url = script.getAttribute(\"data-module\") || null;\n result.loaded = true;\n result.content = script.innerHTML;\n }\n }\n\n check();\n}\n\n/**\n * Run script tags with type=\"text/jsx\".\n * @param {Array} scriptTags specify script tags to run, run all in the if not given\n */\nexport function runScripts(\n transformFn: typeof transform,\n scripts?: HTMLCollectionOf,\n) {\n headEl = document.getElementsByTagName(\"head\")[0];\n if (!scripts) {\n scripts = document.getElementsByTagName(\"script\");\n }\n\n // Array.prototype.slice cannot be used on NodeList on IE8\n const jsxScripts = [];\n for (let i = 0; i < scripts.length; i++) {\n const script = scripts.item(i);\n // Support the old type=\"text/jsx;harmony=true\"\n const type = script.type.split(\";\")[0];\n if (scriptTypes.includes(type)) {\n jsxScripts.push(script);\n }\n }\n\n if (jsxScripts.length === 0) {\n return;\n }\n\n console.warn(\n \"You are using the in-browser Babel transformer. Be sure to precompile \" +\n \"your scripts for production - https://babeljs.io/docs/setup/\",\n );\n\n loadScripts(transformFn, jsxScripts);\n}\n","import { declarePreset } from \"@babel/helper-plugin-utils\";\nimport transformTypeScript from \"@babel/plugin-transform-typescript\";\nimport syntaxJSX from \"@babel/plugin-syntax-jsx\";\nimport transformModulesCommonJS from \"@babel/plugin-transform-modules-commonjs\";\nimport normalizeOptions from \"./normalize-options.ts\";\nimport type { Options } from \"./normalize-options.ts\";\nimport pluginRewriteTSImports from \"./plugin-rewrite-ts-imports.ts\";\n\nexport default declarePreset((api, opts: Options) => {\n api.assertVersion(REQUIRED_VERSION(7));\n\n const {\n allExtensions,\n ignoreExtensions,\n allowNamespaces,\n disallowAmbiguousJSXLike,\n isTSX,\n jsxPragma,\n jsxPragmaFrag,\n onlyRemoveTypeImports,\n optimizeConstEnums,\n rewriteImportExtensions,\n } = normalizeOptions(opts);\n\n const pluginOptions = process.env.BABEL_8_BREAKING\n ? (disallowAmbiguousJSXLike: boolean) => ({\n allowNamespaces,\n disallowAmbiguousJSXLike,\n jsxPragma,\n jsxPragmaFrag,\n onlyRemoveTypeImports,\n optimizeConstEnums,\n })\n : (disallowAmbiguousJSXLike: boolean) => ({\n allowDeclareFields: opts.allowDeclareFields,\n allowNamespaces,\n disallowAmbiguousJSXLike,\n jsxPragma,\n jsxPragmaFrag,\n onlyRemoveTypeImports,\n optimizeConstEnums,\n });\n\n const getPlugins = (isTSX: boolean, disallowAmbiguousJSXLike: boolean) => {\n if (process.env.BABEL_8_BREAKING) {\n const tsPlugin = [\n transformTypeScript,\n pluginOptions(disallowAmbiguousJSXLike),\n ];\n return isTSX ? [tsPlugin, syntaxJSX] : [tsPlugin];\n } else {\n return [\n [\n transformTypeScript,\n { isTSX, ...pluginOptions(disallowAmbiguousJSXLike) },\n ],\n ];\n }\n };\n\n const disableExtensionDetect = allExtensions || ignoreExtensions;\n\n return {\n plugins: rewriteImportExtensions ? [pluginRewriteTSImports] : [],\n overrides: disableExtensionDetect\n ? [{ plugins: getPlugins(isTSX, disallowAmbiguousJSXLike) }]\n : // Only set 'test' if explicitly requested, since it requires that\n // Babel is being called with a filename.\n [\n {\n test: !process.env.BABEL_8_BREAKING\n ? /\\.ts$/\n : filename => filename == null || filename.endsWith(\".ts\"),\n plugins: getPlugins(false, false),\n },\n {\n test: !process.env.BABEL_8_BREAKING\n ? /\\.mts$/\n : filename => filename?.endsWith(\".mts\"),\n sourceType: \"module\",\n plugins: getPlugins(false, true),\n },\n {\n test: !process.env.BABEL_8_BREAKING\n ? /\\.cts$/\n : filename => filename?.endsWith(\".cts\"),\n sourceType: \"unambiguous\",\n plugins: [\n [transformModulesCommonJS, { allowTopLevelThis: true }],\n [transformTypeScript, pluginOptions(true)],\n ],\n },\n {\n test: !process.env.BABEL_8_BREAKING\n ? /\\.tsx$/\n : filename => filename?.endsWith(\".tsx\"),\n // disallowAmbiguousJSXLike is a no-op when parsing TSX, since it's\n // always disallowed.\n plugins: getPlugins(true, false),\n },\n ],\n };\n});\n","// TODO(Babel 8): This won't be needed anymore\n\n// prettier-ignore\nmodule.exports = {\n __proto__: null,\n \"transform-class-static-block\": \"proposal-class-static-block\",\n \"transform-private-property-in-object\": \"proposal-private-property-in-object\",\n \"transform-class-properties\": \"proposal-class-properties\",\n \"transform-private-methods\": \"proposal-private-methods\",\n \"transform-numeric-separator\": \"proposal-numeric-separator\",\n \"transform-logical-assignment-operators\": \"proposal-logical-assignment-operators\",\n \"transform-nullish-coalescing-operator\": \"proposal-nullish-coalescing-operator\",\n \"transform-optional-chaining\": \"proposal-optional-chaining\",\n \"transform-json-strings\": \"proposal-json-strings\",\n \"transform-optional-catch-binding\": \"proposal-optional-catch-binding\",\n \"transform-async-generator-functions\": \"proposal-async-generator-functions\",\n \"transform-object-rest-spread\": \"proposal-object-rest-spread\",\n \"transform-unicode-property-regex\": \"proposal-unicode-property-regex\",\n \"transform-export-namespace-from\": \"proposal-export-namespace-from\",\n};\n","/**\n * Entry point for @babel/standalone. This wraps Babel's API in a version that's\n * friendlier for use in web browsers. It removes the automagical detection of\n * plugins, instead explicitly registering all the available plugins and\n * presets, and requiring custom ones to be registered through `registerPlugin`\n * and `registerPreset` respectively.\n */\n\n/* global VERSION */\n/// \n\nimport {\n transformFromAstSync as babelTransformFromAstSync,\n transformSync as babelTransformSync,\n buildExternalHelpers as babelBuildExternalHelpers,\n type PluginObject,\n type PresetObject,\n} from \"@babel/core\";\nimport { all } from \"./generated/plugins.ts\";\nimport preset2015 from \"./preset-es2015.ts\";\nimport presetStage0 from \"./preset-stage-0.ts\";\nimport presetStage1 from \"./preset-stage-1.ts\";\nimport presetStage2 from \"./preset-stage-2.ts\";\nimport presetStage3 from \"./preset-stage-3.ts\";\nimport presetEnv from \"@babel/preset-env\";\nimport presetFlow from \"@babel/preset-flow\";\nimport presetReact from \"@babel/preset-react\";\nimport presetTypescript from \"@babel/preset-typescript\";\nimport type { InputOptions } from \"@babel/core\";\n\nimport { runScripts } from \"./transformScriptTags.ts\";\n\nexport * as packages from \"./packages.ts\";\n\n// We import this file from another package using a relative path because it's\n// meant to just be build-time script; it's ok because @babel/standalone is\n// bundled anyway.\n// TODO: Remove this in Babel 8\n// @ts-expect-error TS complains about importing a JS file without type declarations\nimport legacyPluginAliases from \"../../babel-compat-data/scripts/data/legacy-plugin-aliases.js\";\n// eslint-disable-next-line guard-for-in\nfor (const name in legacyPluginAliases) {\n all[legacyPluginAliases[name]] = all[name];\n}\nall[\"proposal-unicode-sets-regex\"] = all[\"transform-unicode-sets-regex\"];\n\nexport const availablePlugins: typeof all = {};\n\n// All the plugins we should bundle\n// Want to get rid of this long list of allowed plugins?\n// Wait! Please read https://github.com/babel/babel/pull/6177 first.\nregisterPlugins(all);\n\n// All the presets we should bundle\n// Want to get rid of this list of allowed presets?\n// Wait! Please read https://github.com/babel/babel/pull/6177 first.\nexport const availablePresets = {\n env: presetEnv,\n es2015: preset2015,\n es2016: () => {\n return {\n plugins: [availablePlugins[\"transform-exponentiation-operator\"]],\n };\n },\n es2017: () => {\n return {\n plugins: [availablePlugins[\"transform-async-to-generator\"]],\n };\n },\n react: presetReact,\n \"stage-0\": presetStage0,\n \"stage-1\": presetStage1,\n \"stage-2\": presetStage2,\n \"stage-3\": presetStage3,\n \"es2015-loose\": {\n presets: [[preset2015, { loose: true }]],\n },\n // ES2015 preset with es2015-modules-commonjs removed\n \"es2015-no-commonjs\": {\n presets: [[preset2015, { modules: false }]],\n },\n typescript: presetTypescript,\n flow: presetFlow,\n};\n\nconst isArray =\n Array.isArray ||\n (arg => Object.prototype.toString.call(arg) === \"[object Array]\");\n\n/**\n * Loads the given name (or [name, options] pair) from the given table object\n * holding the available presets or plugins.\n *\n * Returns undefined if the preset or plugin is not available; passes through\n * name unmodified if it (or the first element of the pair) is not a string.\n */\nfunction loadBuiltin(builtinTable: Record, name: any) {\n if (isArray(name) && typeof name[0] === \"string\") {\n if (Object.hasOwn(builtinTable, name[0])) {\n return [builtinTable[name[0]]].concat(name.slice(1));\n }\n return;\n } else if (typeof name === \"string\") {\n return builtinTable[name];\n }\n // Could be an actual preset/plugin module\n return name;\n}\n\n/**\n * Parses plugin names and presets from the specified options.\n */\nfunction processOptions(options: InputOptions) {\n // Parse preset names\n const presets = (options.presets || []).map(presetName => {\n const preset = loadBuiltin(availablePresets, presetName);\n\n if (preset) {\n // workaround for babel issue\n // at some point, babel copies the preset, losing the non-enumerable\n // buildPreset key; convert it into an enumerable key.\n if (\n isArray(preset) &&\n typeof preset[0] === \"object\" &&\n Object.hasOwn(preset[0], \"buildPreset\")\n ) {\n preset[0] = { ...preset[0], buildPreset: preset[0].buildPreset };\n }\n } else {\n throw new Error(\n `Invalid preset specified in Babel options: \"${presetName}\"`,\n );\n }\n return preset;\n });\n\n // Parse plugin names\n const plugins = (options.plugins || []).map(pluginName => {\n const plugin = loadBuiltin(availablePlugins, pluginName);\n\n if (!plugin) {\n throw new Error(\n `Invalid plugin specified in Babel options: \"${pluginName}\"`,\n );\n }\n return plugin;\n });\n\n return {\n babelrc: false,\n ...options,\n presets,\n plugins,\n };\n}\n\nexport function transform(code: string, options: InputOptions) {\n return babelTransformSync(code, processOptions(options));\n}\n\nexport function transformFromAst(\n ast: Parameters[0],\n code: string,\n options: InputOptions,\n) {\n return babelTransformFromAstSync(ast, code, processOptions(options));\n}\n\nexport const buildExternalHelpers = babelBuildExternalHelpers;\n/**\n * Registers a named plugin for use with Babel.\n */\nexport function registerPlugin(name: string, plugin: () => PluginObject): void {\n if (Object.hasOwn(availablePlugins, name)) {\n console.warn(\n `A plugin named \"${name}\" is already registered, it will be overridden`,\n );\n }\n availablePlugins[name] = plugin;\n}\n/**\n * Registers multiple plugins for use with Babel. `newPlugins` should be an object where the key\n * is the name of the plugin, and the value is the plugin itself.\n */\nexport function registerPlugins(newPlugins: {\n [x: string]: () => PluginObject;\n}): void {\n Object.keys(newPlugins).forEach(name =>\n registerPlugin(name, newPlugins[name]),\n );\n}\n\n/**\n * Registers a named preset for use with Babel.\n */\nexport function registerPreset(name: string, preset: () => PresetObject): void {\n if (Object.hasOwn(availablePresets, name)) {\n if (name === \"env\") {\n console.warn(\n \"@babel/preset-env is now included in @babel/standalone, please remove @babel/preset-env-standalone\",\n );\n } else {\n console.warn(\n `A preset named \"${name}\" is already registered, it will be overridden`,\n );\n }\n }\n // @ts-expect-error mutating available presets\n availablePresets[name] = preset;\n}\n\n/**\n * Registers multiple presets for use with Babel. `newPresets` should be an object where the key\n * is the name of the preset, and the value is the preset itself.\n */\nexport function registerPresets(newPresets: {\n [x: string]: () => PresetObject;\n}): void {\n Object.keys(newPresets).forEach(name =>\n registerPreset(name, newPresets[name]),\n );\n}\n\n// @ts-expect-error VERSION is to be replaced by rollup\nexport const version: string = VERSION;\n\nfunction onDOMContentLoaded() {\n transformScriptTags();\n}\n\n// Listen for load event if we're in a browser and then kick off finding and\n// running of scripts with \"text/babel\" type.\nif (typeof window !== \"undefined\" && window?.addEventListener) {\n window.addEventListener(\"DOMContentLoaded\", onDOMContentLoaded, false);\n}\n\n/**\n * Transform