{"version":3,"file":"compiler.js","sources":["src/compiler/Stats.ts","node_modules/acorn/dist/acorn.mjs","src/compiler/utils/flatten.ts","src/compiler/utils/extract_svelte_ignore.ts","src/compiler/utils/fuzzymatch.ts","src/shared/utils/names.ts","src/compiler/utils/list.ts","src/compiler/parse/errors.ts","node_modules/estree-walker/src/walker.js","node_modules/estree-walker/src/sync.js","node_modules/estree-walker/src/index.js","node_modules/code-red/src/utils/id.js","node_modules/code-red/src/utils/comments.js","node_modules/is-reference/src/index.js","node_modules/periscopic/src/index.js","node_modules/code-red/src/utils/push_array.js","node_modules/code-red/src/print/handlers.js","node_modules/sourcemap-codec/dist/sourcemap-codec.es.js","node_modules/code-red/src/print/index.js","node_modules/code-red/src/index.js","src/compiler/parse/acorn.ts","src/compiler/utils/patterns.ts","src/compiler/parse/read/expression.ts","src/compiler/parse/read/script.ts","node_modules/css-tree/lib/common/adopt-buffer.js","node_modules/css-tree/lib/tokenizer/const.js","node_modules/css-tree/lib/tokenizer/char-code-definitions.js","node_modules/css-tree/lib/tokenizer/utils.js","node_modules/css-tree/lib/common/TokenStream.js","node_modules/css-tree/lib/tokenizer/index.js","node_modules/css-tree/lib/common/OffsetToLocation.js","node_modules/css-tree/lib/utils/createCustomError.js","node_modules/css-tree/lib/common/SyntaxError.js","node_modules/css-tree/lib/common/List.js","node_modules/css-tree/lib/parser/sequence.js","node_modules/css-tree/lib/parser/create.js","node_modules/css-tree/lib/syntax/scope/default.js","node_modules/css-tree/lib/syntax/scope/atrulePrelude.js","node_modules/css-tree/lib/syntax/scope/selector.js","node_modules/css-tree/lib/syntax/function/expression.js","node_modules/css-tree/lib/syntax/node/Raw.js","node_modules/css-tree/lib/syntax/function/var.js","node_modules/css-tree/lib/syntax/scope/value.js","node_modules/css-tree/lib/syntax/scope/index.js","node_modules/css-tree/lib/syntax/atrule/font-face.js","node_modules/css-tree/lib/syntax/atrule/import.js","node_modules/css-tree/lib/syntax/atrule/media.js","node_modules/css-tree/lib/syntax/atrule/page.js","node_modules/css-tree/lib/syntax/atrule/supports.js","node_modules/css-tree/lib/syntax/atrule/index.js","node_modules/css-tree/lib/syntax/pseudo/dir.js","node_modules/css-tree/lib/syntax/pseudo/has.js","node_modules/css-tree/lib/syntax/pseudo/lang.js","node_modules/css-tree/lib/syntax/pseudo/common/selectorList.js","node_modules/css-tree/lib/syntax/pseudo/matches.js","node_modules/css-tree/lib/syntax/pseudo/not.js","node_modules/css-tree/lib/syntax/pseudo/common/nthWithOfClause.js","node_modules/css-tree/lib/syntax/pseudo/nth-child.js","node_modules/css-tree/lib/syntax/pseudo/nth-last-child.js","node_modules/css-tree/lib/syntax/pseudo/common/nth.js","node_modules/css-tree/lib/syntax/pseudo/nth-last-of-type.js","node_modules/css-tree/lib/syntax/pseudo/nth-of-type.js","node_modules/css-tree/lib/syntax/pseudo/slotted.js","node_modules/css-tree/lib/syntax/pseudo/index.js","node_modules/css-tree/lib/syntax/node/AnPlusB.js","node_modules/css-tree/lib/syntax/node/Atrule.js","node_modules/css-tree/lib/syntax/node/AtrulePrelude.js","node_modules/css-tree/lib/syntax/node/AttributeSelector.js","node_modules/css-tree/lib/syntax/node/Block.js","node_modules/css-tree/lib/syntax/node/Brackets.js","node_modules/css-tree/lib/syntax/node/CDC.js","node_modules/css-tree/lib/syntax/node/CDO.js","node_modules/css-tree/lib/syntax/node/ClassSelector.js","node_modules/css-tree/lib/syntax/node/Combinator.js","node_modules/css-tree/lib/syntax/node/Comment.js","node_modules/css-tree/lib/utils/names.js","node_modules/css-tree/lib/syntax/node/Declaration.js","node_modules/css-tree/lib/syntax/node/DeclarationList.js","node_modules/css-tree/lib/syntax/node/Dimension.js","node_modules/css-tree/lib/syntax/node/Function.js","node_modules/css-tree/lib/syntax/node/Hash.js","node_modules/css-tree/lib/syntax/node/Identifier.js","node_modules/css-tree/lib/syntax/node/IdSelector.js","node_modules/css-tree/lib/syntax/node/MediaFeature.js","node_modules/css-tree/lib/syntax/node/MediaQuery.js","node_modules/css-tree/lib/syntax/node/MediaQueryList.js","node_modules/css-tree/lib/syntax/node/Nth.js","node_modules/css-tree/lib/syntax/node/Number.js","node_modules/css-tree/lib/syntax/node/Operator.js","node_modules/css-tree/lib/syntax/node/Parentheses.js","node_modules/css-tree/lib/syntax/node/Percentage.js","node_modules/css-tree/lib/syntax/node/PseudoClassSelector.js","node_modules/css-tree/lib/syntax/node/PseudoElementSelector.js","node_modules/css-tree/lib/syntax/node/Ratio.js","node_modules/css-tree/lib/syntax/node/Rule.js","node_modules/css-tree/lib/syntax/node/Selector.js","node_modules/css-tree/lib/syntax/node/SelectorList.js","node_modules/css-tree/lib/syntax/node/String.js","node_modules/css-tree/lib/syntax/node/StyleSheet.js","node_modules/css-tree/lib/syntax/node/TypeSelector.js","node_modules/css-tree/lib/syntax/node/UnicodeRange.js","node_modules/css-tree/lib/syntax/node/Url.js","node_modules/css-tree/lib/syntax/node/Value.js","node_modules/css-tree/lib/syntax/node/WhiteSpace.js","node_modules/css-tree/lib/syntax/node/index.js","node_modules/css-tree/lib/syntax/config/parser.js","node_modules/css-tree/lib/parser/index.js","src/compiler/parse/read/style.ts","src/compiler/parse/utils/entities.ts","src/compiler/parse/utils/html.ts","src/compiler/parse/state/tag.ts","src/compiler/utils/full_char_code_at.ts","src/compiler/parse/utils/bracket.ts","src/compiler/parse/read/context.ts","src/compiler/utils/trim.ts","src/compiler/parse/utils/node.ts","src/compiler/parse/state/mustache.ts","src/compiler/parse/state/text.ts","src/compiler/parse/state/fragment.ts","src/compiler/utils/names.ts","node_modules/locate-character/dist/locate-character.es.js","src/compiler/utils/get_code_frame.ts","src/compiler/utils/error.ts","src/compiler/parse/index.ts","src/compiler/compile/render_dom/wrappers/shared/is_head.ts","src/compiler/compile/render_dom/Block.ts","src/compiler/compile/render_dom/wrappers/shared/Wrapper.ts","src/compiler/compile/render_dom/wrappers/shared/create_debugging_comment.ts","src/compiler/compile/nodes/shared/Node.ts","src/compiler/compile/compiler_warnings.ts","src/compiler/compile/nodes/shared/AbstractBlock.ts","src/compiler/compile/utils/flatten_reference.ts","src/compiler/compile/utils/scope.ts","src/compiler/compile/utils/get_object.ts","src/compiler/compile/utils/reserved_keywords.ts","src/compiler/compile/render_dom/wrappers/shared/is_dynamic.ts","src/compiler/utils/nodes_match.ts","src/compiler/compile/render_dom/invalidate.ts","src/compiler/compile/utils/replace_object.ts","src/compiler/compile/nodes/shared/is_contextual.ts","src/compiler/utils/clone.ts","src/compiler/compile/compiler_errors.ts","src/compiler/compile/nodes/shared/Expression.ts","src/compiler/compile/nodes/shared/Context.ts","src/compiler/compile/nodes/ConstTag.ts","src/compiler/compile/nodes/PendingBlock.ts","src/compiler/compile/nodes/CatchBlock.ts","src/compiler/compile/nodes/AwaitBlock.ts","src/compiler/compile/nodes/EventHandler.ts","src/compiler/compile/nodes/Action.ts","src/compiler/compile/nodes/Body.ts","src/compiler/compile/nodes/Comment.ts","src/compiler/compile/nodes/ElseBlock.ts","src/compiler/compile/nodes/EachBlock.ts","src/compiler/compile/utils/stringify.ts","src/compiler/compile/utils/add_to_set.ts","src/compiler/compile/nodes/Attribute.ts","src/compiler/compile/nodes/Binding.ts","src/compiler/compile/nodes/Transition.ts","src/compiler/compile/nodes/Animation.ts","src/compiler/compile/nodes/Class.ts","src/compiler/compile/utils/nodes_to_template_literal.ts","src/compiler/compile/nodes/StyleDirective.ts","src/compiler/compile/nodes/Text.ts","src/compiler/utils/namespaces.ts","src/compiler/compile/nodes/Let.ts","src/compiler/compile/nodes/Element.ts","src/compiler/compile/utils/hash.ts","src/compiler/compile/nodes/Head.ts","src/compiler/compile/nodes/IfBlock.ts","src/compiler/compile/nodes/InlineComponent.ts","src/compiler/compile/nodes/KeyBlock.ts","src/compiler/compile/nodes/shared/Tag.ts","src/compiler/compile/nodes/MustacheTag.ts","src/compiler/compile/nodes/Options.ts","src/compiler/compile/nodes/RawMustacheTag.ts","src/compiler/compile/nodes/DebugTag.ts","src/compiler/compile/nodes/Slot.ts","src/compiler/compile/nodes/SlotTemplate.ts","src/compiler/compile/nodes/Title.ts","src/compiler/compile/nodes/Window.ts","src/compiler/utils/push_array.ts","src/compiler/compile/nodes/shared/map_children.ts","src/compiler/compile/utils/check_graph_for_cycles.ts","src/compiler/compile/nodes/shared/get_const_tags.ts","src/compiler/compile/nodes/ThenBlock.ts","src/compiler/compile/render_dom/wrappers/shared/add_const_tags.ts","src/compiler/compile/render_dom/wrappers/AwaitBlock.ts","src/compiler/compile/render_dom/wrappers/Element/EventHandler.ts","src/compiler/compile/render_dom/wrappers/shared/add_event_handlers.ts","src/compiler/compile/render_dom/wrappers/shared/add_actions.ts","src/compiler/compile/render_dom/wrappers/Body.ts","src/compiler/compile/render_dom/wrappers/DebugTag.ts","src/compiler/compile/render_dom/wrappers/EachBlock.ts","src/compiler/compile/render_dom/wrappers/Text.ts","src/compiler/compile/render_dom/wrappers/Element/fix_attribute_casing.ts","src/compiler/compile/render_dom/wrappers/Element/handle_select_value_binding.ts","src/compiler/compile/render_dom/wrappers/Element/Attribute.ts","src/compiler/compile/render_dom/wrappers/Element/StyleAttribute.ts","src/compiler/compile/render_dom/wrappers/Element/SpreadAttribute.ts","src/compiler/compile/render_dom/wrappers/shared/mark_each_block_bindings.ts","src/compiler/compile/render_dom/wrappers/Element/Binding.ts","src/compiler/compile/utils/compare_node.ts","src/compiler/compile/render_dom/wrappers/shared/bind_this.ts","src/compiler/compile/render_dom/wrappers/shared/Tag.ts","src/compiler/compile/render_dom/wrappers/MustacheTag.ts","src/compiler/compile/render_dom/wrappers/RawMustacheTag.ts","src/compiler/compile/render_dom/wrappers/Element/index.ts","src/compiler/compile/render_dom/wrappers/Head.ts","src/compiler/compile/render_dom/wrappers/IfBlock.ts","src/compiler/compile/render_dom/wrappers/KeyBlock.ts","src/compiler/compile/render_dom/wrappers/shared/get_slot_definition.ts","src/compiler/compile/render_dom/wrappers/SlotTemplate.ts","src/compiler/compile/utils/string_to_member_expression.ts","src/compiler/compile/render_dom/wrappers/InlineComponent/index.ts","src/compiler/compile/utils/get_slot_data.ts","src/compiler/compile/render_dom/wrappers/Slot.ts","src/compiler/compile/render_dom/wrappers/Title.ts","src/compiler/compile/render_dom/wrappers/Window.ts","src/compiler/utils/link.ts","src/compiler/compile/render_dom/wrappers/Fragment.ts","src/compiler/compile/render_dom/Renderer.ts","node_modules/@ampproject/remapping/dist/remapping.mjs","src/compiler/utils/mapped_code.ts","src/compiler/compile/utils/check_enable_sourcemap.ts","src/compiler/compile/render_dom/index.ts","src/compiler/compile/render_ssr/handlers/shared/get_const_tags.ts","src/compiler/compile/render_ssr/handlers/AwaitBlock.ts","src/compiler/compile/render_ssr/handlers/Comment.ts","src/compiler/compile/render_ssr/handlers/DebugTag.ts","src/compiler/compile/render_ssr/handlers/EachBlock.ts","src/compiler/compile/render_ssr/handlers/shared/get_attribute_value.ts","src/shared/boolean_attributes.ts","src/compiler/compile/render_ssr/handlers/utils/remove_whitespace_children.ts","src/compiler/compile/render_ssr/handlers/Element.ts","src/compiler/compile/render_ssr/handlers/Head.ts","src/compiler/compile/render_ssr/handlers/HtmlTag.ts","src/compiler/compile/render_ssr/handlers/IfBlock.ts","src/compiler/compile/render_ssr/handlers/InlineComponent.ts","src/compiler/compile/render_ssr/handlers/KeyBlock.ts","src/compiler/compile/render_ssr/handlers/shared/get_slot_scope.ts","src/compiler/compile/render_ssr/handlers/Slot.ts","src/compiler/compile/render_ssr/handlers/SlotTemplate.ts","src/compiler/compile/render_ssr/handlers/Tag.ts","src/compiler/compile/render_ssr/handlers/Text.ts","src/compiler/compile/render_ssr/handlers/Title.ts","src/compiler/compile/render_ssr/Renderer.ts","src/compiler/compile/render_ssr/index.ts","src/compiler/compile/create_module.ts","node_modules/magic-string/dist/magic-string.es.js","src/compiler/compile/css/gather_possible_values.ts","src/compiler/compile/css/Selector.ts","src/compiler/compile/css/Stylesheet.ts","src/compiler/config.ts","src/compiler/compile/nodes/shared/TemplateScope.ts","src/compiler/compile/nodes/Fragment.ts","src/compiler/compile/internal_exports.ts","src/compiler/compile/utils/is_used_as_reference.ts","src/compiler/compile/Component.ts","src/compiler/compile/utils/get_name_from_filename.ts","src/compiler/compile/index.ts","src/compiler/preprocess/decode_sourcemap.ts","src/compiler/preprocess/replace_in_code.ts","src/compiler/preprocess/index.ts","src/compiler/index.ts"],"sourcesContent":["const now = (typeof process !== 'undefined' && process.hrtime)\n\t? () => {\n\t\tconst t = process.hrtime();\n\t\treturn t[0] * 1e3 + t[1] / 1e6;\n\t}\n\t: () => self.performance.now();\n\ninterface Timing {\n\tlabel: string;\n\tstart: number;\n\tend: number;\n\tchildren: Timing[];\n}\n\nfunction collapse_timings(timings) {\n\tconst result = {};\n\ttimings.forEach(timing => {\n\t\tresult[timing.label] = Object.assign({\n\t\t\ttotal: timing.end - timing.start\n\t\t}, timing.children && collapse_timings(timing.children));\n\t});\n\treturn result;\n}\n\nexport default class Stats {\n\tstart_time: number;\n\tcurrent_timing: Timing;\n\tcurrent_children: Timing[];\n\ttimings: Timing[];\n\tstack: Timing[];\n\n\tconstructor() {\n\t\tthis.start_time = now();\n\t\tthis.stack = [];\n\t\tthis.current_children = this.timings = [];\n\t}\n\n\tstart(label) {\n\t\tconst timing = {\n\t\t\tlabel,\n\t\t\tstart: now(),\n\t\t\tend: null,\n\t\t\tchildren: []\n\t\t};\n\n\t\tthis.current_children.push(timing);\n\t\tthis.stack.push(timing);\n\n\t\tthis.current_timing = timing;\n\t\tthis.current_children = timing.children;\n\t}\n\n\tstop(label) {\n\t\tif (label !== this.current_timing.label) {\n\t\t\tthrow new Error(`Mismatched timing labels (expected ${this.current_timing.label}, got ${label})`);\n\t\t}\n\n\t\tthis.current_timing.end = now();\n\t\tthis.stack.pop();\n\t\tthis.current_timing = this.stack[this.stack.length - 1];\n\t\tthis.current_children = this.current_timing ? this.current_timing.children : this.timings;\n\t}\n\n\trender() {\n\t\tconst timings = Object.assign({\n\t\t\ttotal: now() - this.start_time\n\t\t}, collapse_timings(this.timings));\n\n\t\treturn {\n\t\t\ttimings\n\t\t};\n\t}\n}\n","// Reserved word lists for various dialects of the language\n\nvar reservedWords = {\n 3: \"abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile\",\n 5: \"class enum extends super const export import\",\n 6: \"enum\",\n strict: \"implements interface let package private protected public static yield\",\n strictBind: \"eval arguments\"\n};\n\n// And the keywords\n\nvar ecma5AndLessKeywords = \"break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this\";\n\nvar keywords = {\n 5: ecma5AndLessKeywords,\n \"5module\": ecma5AndLessKeywords + \" export import\",\n 6: ecma5AndLessKeywords + \" const class extends export import super\"\n};\n\nvar keywordRelationalOperator = /^in(stanceof)?$/;\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 above 128.\n// Generated by `bin/generate-identifier-regex.js`.\nvar 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\\u08a0-\\u08b4\\u08b6-\\u08c7\\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\\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-\\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-\\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-\\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-\\u31bf\\u31f0-\\u31ff\\u3400-\\u4dbf\\u4e00-\\u9ffc\\ua000-\\ua48c\\ua4d0-\\ua4fd\\ua500-\\ua60c\\ua610-\\ua61f\\ua62a\\ua62b\\ua640-\\ua66e\\ua67f-\\ua69d\\ua6a0-\\ua6ef\\ua717-\\ua71f\\ua722-\\ua788\\ua78b-\\ua7bf\\ua7c2-\\ua7ca\\ua7f5-\\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\";\nvar 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\\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\\u0b55-\\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\\u0d81-\\u0d83\\u0dca\\u0dcf-\\u0dd4\\u0dd6\\u0dd8-\\u0ddf\\u0de6-\\u0def\\u0df2\\u0df3\\u0e31\\u0e34-\\u0e3a\\u0e47-\\u0e4e\\u0e50-\\u0e59\\u0eb1\\u0eb4-\\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\\u1abf\\u1ac0\\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-\\u1df9\\u1dfb-\\u1dff\\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\\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\";\n\nvar nonASCIIidentifierStart = new RegExp(\"[\" + nonASCIIidentifierStartChars + \"]\");\nvar nonASCIIidentifier = new RegExp(\"[\" + nonASCIIidentifierStartChars + nonASCIIidentifierChars + \"]\");\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 bin/generate-identifier-regex.js\n\n// eslint-disable-next-line comma-spacing\nvar 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,157,310,10,21,11,7,153,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,107,20,28,22,13,52,76,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,85,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,230,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,35,56,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,190,0,80,921,103,110,18,195,2749,1070,4050,582,8634,568,8,30,114,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,8952,286,50,2,18,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,2357,44,11,6,17,0,370,43,1301,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,42717,35,4148,12,221,3,5761,15,7472,3104,541,1507,4938];\n\n// eslint-disable-next-line comma-spacing\nvar 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,154,10,176,2,54,14,32,9,16,3,46,10,54,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,2,11,83,11,7,0,161,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,19306,9,135,4,60,6,26,9,1014,0,2,54,8,3,82,0,12,1,19628,1,5319,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,262,6,10,9,419,13,1495,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, set) {\n var pos = 0x10000;\n for (var i = 0; i < set.length; i += 2) {\n pos += set[i];\n if (pos > code) { return false }\n pos += set[i + 1];\n if (pos >= code) { return true }\n }\n}\n\n// Test whether a given character code starts an identifier.\n\nfunction isIdentifierStart(code, astral) {\n if (code < 65) { return code === 36 }\n if (code < 91) { return true }\n if (code < 97) { return code === 95 }\n if (code < 123) { return true }\n if (code <= 0xffff) { return code >= 0xaa && nonASCIIidentifierStart.test(String.fromCharCode(code)) }\n if (astral === false) { return false }\n return isInAstralSet(code, astralIdentifierStartCodes)\n}\n\n// Test whether a given character is part of an identifier.\n\nfunction isIdentifierChar(code, astral) {\n if (code < 48) { return code === 36 }\n if (code < 58) { return true }\n if (code < 65) { return false }\n if (code < 91) { return true }\n if (code < 97) { return code === 95 }\n if (code < 123) { return true }\n if (code <= 0xffff) { return code >= 0xaa && nonASCIIidentifier.test(String.fromCharCode(code)) }\n if (astral === false) { return false }\n return isInAstralSet(code, astralIdentifierStartCodes) || isInAstralSet(code, astralIdentifierCodes)\n}\n\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 regular\n// expressions and divisions. It is set on all token types that can\n// be followed by an expression (thus, a slash after them would be a\n// regular expression).\n//\n// The `startsExpr` property is used to check if the token ends a\n// `yield` expression. It is set on all token types that either can\n// directly start an expression (like a quotation mark) or can\n// continue an expression (like the body of a string).\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\nvar TokenType = function TokenType(label, conf) {\n if ( conf === void 0 ) conf = {};\n\n this.label = label;\n this.keyword = conf.keyword;\n this.beforeExpr = !!conf.beforeExpr;\n this.startsExpr = !!conf.startsExpr;\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;\n this.updateContext = null;\n};\n\nfunction binop(name, prec) {\n return new TokenType(name, {beforeExpr: true, binop: prec})\n}\nvar beforeExpr = {beforeExpr: true}, startsExpr = {startsExpr: true};\n\n// Map keyword names to token types.\n\nvar keywords$1 = {};\n\n// Succinct definitions of keyword token types\nfunction kw(name, options) {\n if ( options === void 0 ) options = {};\n\n options.keyword = name;\n return keywords$1[name] = new TokenType(name, options)\n}\n\nvar types = {\n num: new TokenType(\"num\", startsExpr),\n regexp: new TokenType(\"regexp\", startsExpr),\n string: new TokenType(\"string\", startsExpr),\n name: new TokenType(\"name\", startsExpr),\n privateId: new TokenType(\"privateId\", startsExpr),\n eof: new TokenType(\"eof\"),\n\n // Punctuation token types.\n bracketL: new TokenType(\"[\", {beforeExpr: true, startsExpr: true}),\n bracketR: new TokenType(\"]\"),\n braceL: new TokenType(\"{\", {beforeExpr: true, startsExpr: true}),\n braceR: new TokenType(\"}\"),\n parenL: new TokenType(\"(\", {beforeExpr: true, startsExpr: true}),\n parenR: new TokenType(\")\"),\n comma: new TokenType(\",\", beforeExpr),\n semi: new TokenType(\";\", beforeExpr),\n colon: new TokenType(\":\", beforeExpr),\n dot: new TokenType(\".\"),\n question: new TokenType(\"?\", beforeExpr),\n questionDot: new TokenType(\"?.\"),\n arrow: new TokenType(\"=>\", beforeExpr),\n template: new TokenType(\"template\"),\n invalidTemplate: new TokenType(\"invalidTemplate\"),\n ellipsis: new TokenType(\"...\", beforeExpr),\n backQuote: new TokenType(\"`\", startsExpr),\n dollarBraceL: new TokenType(\"${\", {beforeExpr: true, startsExpr: true}),\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 eq: new TokenType(\"=\", {beforeExpr: true, isAssign: true}),\n assign: new TokenType(\"_=\", {beforeExpr: true, isAssign: true}),\n incDec: new TokenType(\"++/--\", {prefix: true, postfix: true, startsExpr: true}),\n prefix: new TokenType(\"!/~\", {beforeExpr: true, prefix: true, startsExpr: true}),\n logicalOR: binop(\"||\", 1),\n logicalAND: binop(\"&&\", 2),\n bitwiseOR: binop(\"|\", 3),\n bitwiseXOR: binop(\"^\", 4),\n bitwiseAND: binop(\"&\", 5),\n equality: binop(\"==/!=/===/!==\", 6),\n relational: binop(\"/<=/>=\", 7),\n bitShift: binop(\"<>/>>>\", 8),\n plusMin: new TokenType(\"+/-\", {beforeExpr: true, binop: 9, prefix: true, startsExpr: true}),\n modulo: binop(\"%\", 10),\n star: binop(\"*\", 10),\n slash: binop(\"/\", 10),\n starstar: new TokenType(\"**\", {beforeExpr: true}),\n coalesce: binop(\"??\", 1),\n\n // Keyword token types.\n _break: kw(\"break\"),\n _case: kw(\"case\", beforeExpr),\n _catch: kw(\"catch\"),\n _continue: kw(\"continue\"),\n _debugger: kw(\"debugger\"),\n _default: kw(\"default\", beforeExpr),\n _do: kw(\"do\", {isLoop: true, beforeExpr: true}),\n _else: kw(\"else\", beforeExpr),\n _finally: kw(\"finally\"),\n _for: kw(\"for\", {isLoop: true}),\n _function: kw(\"function\", startsExpr),\n _if: kw(\"if\"),\n _return: kw(\"return\", beforeExpr),\n _switch: kw(\"switch\"),\n _throw: kw(\"throw\", beforeExpr),\n _try: kw(\"try\"),\n _var: kw(\"var\"),\n _const: kw(\"const\"),\n _while: kw(\"while\", {isLoop: true}),\n _with: kw(\"with\"),\n _new: kw(\"new\", {beforeExpr: true, startsExpr: true}),\n _this: kw(\"this\", startsExpr),\n _super: kw(\"super\", startsExpr),\n _class: kw(\"class\", startsExpr),\n _extends: kw(\"extends\", beforeExpr),\n _export: kw(\"export\"),\n _import: kw(\"import\", startsExpr),\n _null: kw(\"null\", startsExpr),\n _true: kw(\"true\", startsExpr),\n _false: kw(\"false\", startsExpr),\n _in: kw(\"in\", {beforeExpr: true, binop: 7}),\n _instanceof: kw(\"instanceof\", {beforeExpr: true, binop: 7}),\n _typeof: kw(\"typeof\", {beforeExpr: true, prefix: true, startsExpr: true}),\n _void: kw(\"void\", {beforeExpr: true, prefix: true, startsExpr: true}),\n _delete: kw(\"delete\", {beforeExpr: true, prefix: true, startsExpr: true})\n};\n\n// Matches a whole line break (where CRLF is considered a single\n// line break). Used to count lines.\n\nvar lineBreak = /\\r\\n?|\\n|\\u2028|\\u2029/;\nvar lineBreakG = new RegExp(lineBreak.source, \"g\");\n\nfunction isNewLine(code, ecma2019String) {\n return code === 10 || code === 13 || (!ecma2019String && (code === 0x2028 || code === 0x2029))\n}\n\nvar nonASCIIwhitespace = /[\\u1680\\u2000-\\u200a\\u202f\\u205f\\u3000\\ufeff]/;\n\nvar skipWhiteSpace = /(?:\\s|\\/\\/.*|\\/\\*[^]*?\\*\\/)*/g;\n\nvar ref = Object.prototype;\nvar hasOwnProperty = ref.hasOwnProperty;\nvar toString = ref.toString;\n\n// Checks if an object has a property.\n\nfunction has(obj, propName) {\n return hasOwnProperty.call(obj, propName)\n}\n\nvar isArray = Array.isArray || (function (obj) { return (\n toString.call(obj) === \"[object Array]\"\n); });\n\nfunction wordsRegexp(words) {\n return new RegExp(\"^(?:\" + words.replace(/ /g, \"|\") + \")$\")\n}\n\n// These are used when `options.locations` is on, for the\n// `startLoc` and `endLoc` properties.\n\nvar Position = function Position(line, col) {\n this.line = line;\n this.column = col;\n};\n\nPosition.prototype.offset = function offset (n) {\n return new Position(this.line, this.column + n)\n};\n\nvar SourceLocation = function SourceLocation(p, start, end) {\n this.start = start;\n this.end = end;\n if (p.sourceFile !== null) { this.source = p.sourceFile; }\n};\n\n// The `getLineInfo` function is mostly useful when the\n// `locations` option is off (for performance reasons) and you\n// want to find the line/column position for a given character\n// offset. `input` should be the code string that the offset refers\n// into.\n\nfunction getLineInfo(input, offset) {\n for (var line = 1, cur = 0;;) {\n lineBreakG.lastIndex = cur;\n var match = lineBreakG.exec(input);\n if (match && match.index < offset) {\n ++line;\n cur = match.index + match[0].length;\n } else {\n return new Position(line, offset - cur)\n }\n }\n}\n\n// A second argument must be given to configure the parser process.\n// These options are recognized (only `ecmaVersion` is required):\n\nvar defaultOptions = {\n // `ecmaVersion` indicates the ECMAScript version to parse. Must be\n // either 3, 5, 6 (or 2015), 7 (2016), 8 (2017), 9 (2018), 10\n // (2019), 11 (2020), 12 (2021), 13 (2022), or `\"latest\"` (the\n // latest version the library supports). This influences support\n // for strict mode, the set of reserved words, and support for\n // new syntax features.\n ecmaVersion: null,\n // `sourceType` indicates the mode the code should be parsed in.\n // Can be either `\"script\"` or `\"module\"`. This influences global\n // strict mode and parsing of `import` and `export` declarations.\n sourceType: \"script\",\n // `onInsertedSemicolon` can be a callback that will be called\n // when a semicolon is automatically inserted. It will be passed\n // the position of the comma as an offset, and if `locations` is\n // enabled, it is given the location as a `{line, column}` object\n // as second argument.\n onInsertedSemicolon: null,\n // `onTrailingComma` is similar to `onInsertedSemicolon`, but for\n // trailing commas.\n onTrailingComma: null,\n // By default, reserved words are only enforced if ecmaVersion >= 5.\n // Set `allowReserved` to a boolean value to explicitly turn this on\n // an off. When this option has the value \"never\", reserved words\n // and keywords can also not be used as property names.\n allowReserved: null,\n // When enabled, a return at the top level is not considered an\n // error.\n allowReturnOutsideFunction: false,\n // When enabled, import/export statements are not constrained to\n // appearing at the top of the program, and an import.meta expression\n // in a script isn't considered an error.\n allowImportExportEverywhere: false,\n // By default, await identifiers are allowed to appear at the top-level scope only if ecmaVersion >= 2022.\n // When enabled, await identifiers are allowed to appear at the top-level scope,\n // but they are still not allowed in non-async functions.\n allowAwaitOutsideFunction: null,\n // When enabled, super identifiers are not constrained to\n // appearing in methods and do not raise an error when they appear elsewhere.\n allowSuperOutsideMethod: null,\n // When enabled, hashbang directive in the beginning of file\n // is allowed and treated as a line comment.\n allowHashBang: false,\n // When `locations` is on, `loc` properties holding objects with\n // `start` and `end` properties in `{line, column}` form (with\n // line being 1-based and column 0-based) will be attached to the\n // nodes.\n locations: false,\n // A function can be passed as `onToken` option, which will\n // cause Acorn to call that function with object in the same\n // format as tokens returned from `tokenizer().getToken()`. Note\n // that you are not allowed to call the parser from the\n // callback—that will corrupt its internal state.\n onToken: null,\n // A function can be passed as `onComment` option, which will\n // cause Acorn to call that function with `(block, text, start,\n // end)` parameters whenever a comment is skipped. `block` is a\n // boolean indicating whether this is a block (`/* */`) comment,\n // `text` is the content of the comment, and `start` and `end` are\n // character offsets that denote the start and end of the comment.\n // When the `locations` option is on, two more parameters are\n // passed, the full `{line, column}` locations of the start and\n // end of the comments. Note that you are not allowed to call the\n // parser from the callback—that will corrupt its internal state.\n onComment: null,\n // Nodes have their start and end characters offsets recorded in\n // `start` and `end` properties (directly on the node, rather than\n // the `loc` object, which holds line/column data. To also add a\n // [semi-standardized][range] `range` property holding a `[start,\n // end]` array with the same numbers, set the `ranges` option to\n // `true`.\n //\n // [range]: https://bugzilla.mozilla.org/show_bug.cgi?id=745678\n ranges: false,\n // It is possible to parse multiple files into a single AST by\n // passing the tree produced by parsing the first file as\n // `program` option in subsequent parses. This will add the\n // toplevel forms of the parsed file to the `Program` (top) node\n // of an existing parse tree.\n program: null,\n // When `locations` is on, you can pass this to record the source\n // file in every node's `loc` object.\n sourceFile: null,\n // This value, if given, is stored in every node, whether\n // `locations` is on or off.\n directSourceFile: null,\n // When enabled, parenthesized expressions are represented by\n // (non-standard) ParenthesizedExpression nodes\n preserveParens: false\n};\n\n// Interpret and default an options object\n\nvar warnedAboutEcmaVersion = false;\n\nfunction getOptions(opts) {\n var options = {};\n\n for (var opt in defaultOptions)\n { options[opt] = opts && has(opts, opt) ? opts[opt] : defaultOptions[opt]; }\n\n if (options.ecmaVersion === \"latest\") {\n options.ecmaVersion = 1e8;\n } else if (options.ecmaVersion == null) {\n if (!warnedAboutEcmaVersion && typeof console === \"object\" && console.warn) {\n warnedAboutEcmaVersion = true;\n console.warn(\"Since Acorn 8.0.0, options.ecmaVersion is required.\\nDefaulting to 2020, but this will stop working in the future.\");\n }\n options.ecmaVersion = 11;\n } else if (options.ecmaVersion >= 2015) {\n options.ecmaVersion -= 2009;\n }\n\n if (options.allowReserved == null)\n { options.allowReserved = options.ecmaVersion < 5; }\n\n if (isArray(options.onToken)) {\n var tokens = options.onToken;\n options.onToken = function (token) { return tokens.push(token); };\n }\n if (isArray(options.onComment))\n { options.onComment = pushComment(options, options.onComment); }\n\n return options\n}\n\nfunction pushComment(options, array) {\n return function(block, text, start, end, startLoc, endLoc) {\n var comment = {\n type: block ? \"Block\" : \"Line\",\n value: text,\n start: start,\n end: end\n };\n if (options.locations)\n { comment.loc = new SourceLocation(this, startLoc, endLoc); }\n if (options.ranges)\n { comment.range = [start, end]; }\n array.push(comment);\n }\n}\n\n// Each scope gets a bitset that may contain these flags\nvar\n SCOPE_TOP = 1,\n SCOPE_FUNCTION = 2,\n SCOPE_VAR = SCOPE_TOP | SCOPE_FUNCTION,\n SCOPE_ASYNC = 4,\n SCOPE_GENERATOR = 8,\n SCOPE_ARROW = 16,\n SCOPE_SIMPLE_CATCH = 32,\n SCOPE_SUPER = 64,\n SCOPE_DIRECT_SUPER = 128;\n\nfunction functionFlags(async, generator) {\n return SCOPE_FUNCTION | (async ? SCOPE_ASYNC : 0) | (generator ? SCOPE_GENERATOR : 0)\n}\n\n// Used in checkLVal* and declareName to determine the type of a binding\nvar\n BIND_NONE = 0, // Not a binding\n BIND_VAR = 1, // Var-style binding\n BIND_LEXICAL = 2, // Let- or const-style binding\n BIND_FUNCTION = 3, // Function declaration\n BIND_SIMPLE_CATCH = 4, // Simple (identifier pattern) catch binding\n BIND_OUTSIDE = 5; // Special case for function names as bound inside the function\n\nvar Parser = function Parser(options, input, startPos) {\n this.options = options = getOptions(options);\n this.sourceFile = options.sourceFile;\n this.keywords = wordsRegexp(keywords[options.ecmaVersion >= 6 ? 6 : options.sourceType === \"module\" ? \"5module\" : 5]);\n var reserved = \"\";\n if (options.allowReserved !== true) {\n reserved = reservedWords[options.ecmaVersion >= 6 ? 6 : options.ecmaVersion === 5 ? 5 : 3];\n if (options.sourceType === \"module\") { reserved += \" await\"; }\n }\n this.reservedWords = wordsRegexp(reserved);\n var reservedStrict = (reserved ? reserved + \" \" : \"\") + reservedWords.strict;\n this.reservedWordsStrict = wordsRegexp(reservedStrict);\n this.reservedWordsStrictBind = wordsRegexp(reservedStrict + \" \" + reservedWords.strictBind);\n this.input = String(input);\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 this.containsEsc = false;\n\n // Set up token state\n\n // The current position of the tokenizer in the input.\n if (startPos) {\n this.pos = startPos;\n this.lineStart = this.input.lastIndexOf(\"\\n\", startPos - 1) + 1;\n this.curLine = this.input.slice(0, this.lineStart).split(lineBreak).length;\n } else {\n this.pos = this.lineStart = 0;\n this.curLine = 1;\n }\n\n // Properties of the current token:\n // Its type\n this.type = types.eof;\n // For tokens that include more information than their type, the value\n this.value = null;\n // Its start and end offset\n this.start = this.end = this.pos;\n // And, if locations are used, the {line, column} object\n // corresponding to those offsets\n this.startLoc = this.endLoc = this.curPosition();\n\n // Position information for the previous token\n this.lastTokEndLoc = this.lastTokStartLoc = null;\n this.lastTokStart = this.lastTokEnd = this.pos;\n\n // The context stack is used to superficially track syntactic\n // context to predict whether a regular expression is allowed in a\n // given position.\n this.context = this.initialContext();\n this.exprAllowed = true;\n\n // Figure out if it's a module code.\n this.inModule = options.sourceType === \"module\";\n this.strict = this.inModule || this.strictDirective(this.pos);\n\n // Used to signify the start of a potential arrow function\n this.potentialArrowAt = -1;\n this.potentialArrowInForAwait = false;\n\n // Positions to delayed-check that yield/await does not exist in default parameters.\n this.yieldPos = this.awaitPos = this.awaitIdentPos = 0;\n // Labels in scope.\n this.labels = [];\n // Thus-far undefined exports.\n this.undefinedExports = Object.create(null);\n\n // If enabled, skip leading hashbang line.\n if (this.pos === 0 && options.allowHashBang && this.input.slice(0, 2) === \"#!\")\n { this.skipLineComment(2); }\n\n // Scope tracking for duplicate variable names (see scope.js)\n this.scopeStack = [];\n this.enterScope(SCOPE_TOP);\n\n // For RegExp validation\n this.regexpState = null;\n\n // The stack of private names.\n // Each element has two properties: 'declared' and 'used'.\n // When it exited from the outermost class definition, all used private names must be declared.\n this.privateNameStack = [];\n};\n\nvar prototypeAccessors = { inFunction: { configurable: true },inGenerator: { configurable: true },inAsync: { configurable: true },canAwait: { configurable: true },allowSuper: { configurable: true },allowDirectSuper: { configurable: true },treatFunctionsAsVar: { configurable: true },inNonArrowFunction: { configurable: true } };\n\nParser.prototype.parse = function parse () {\n var node = this.options.program || this.startNode();\n this.nextToken();\n return this.parseTopLevel(node)\n};\n\nprototypeAccessors.inFunction.get = function () { return (this.currentVarScope().flags & SCOPE_FUNCTION) > 0 };\nprototypeAccessors.inGenerator.get = function () { return (this.currentVarScope().flags & SCOPE_GENERATOR) > 0 && !this.currentVarScope().inClassFieldInit };\nprototypeAccessors.inAsync.get = function () { return (this.currentVarScope().flags & SCOPE_ASYNC) > 0 && !this.currentVarScope().inClassFieldInit };\nprototypeAccessors.canAwait.get = function () {\n for (var i = this.scopeStack.length - 1; i >= 0; i--) {\n var scope = this.scopeStack[i];\n if (scope.inClassFieldInit) { return false }\n if (scope.flags & SCOPE_FUNCTION) { return (scope.flags & SCOPE_ASYNC) > 0 }\n }\n return (this.inModule && this.options.ecmaVersion >= 13) || this.options.allowAwaitOutsideFunction\n};\nprototypeAccessors.allowSuper.get = function () {\n var ref = this.currentThisScope();\n var flags = ref.flags;\n var inClassFieldInit = ref.inClassFieldInit;\n return (flags & SCOPE_SUPER) > 0 || inClassFieldInit || this.options.allowSuperOutsideMethod\n};\nprototypeAccessors.allowDirectSuper.get = function () { return (this.currentThisScope().flags & SCOPE_DIRECT_SUPER) > 0 };\nprototypeAccessors.treatFunctionsAsVar.get = function () { return this.treatFunctionsAsVarInScope(this.currentScope()) };\nprototypeAccessors.inNonArrowFunction.get = function () {\n var ref = this.currentThisScope();\n var flags = ref.flags;\n var inClassFieldInit = ref.inClassFieldInit;\n return (flags & SCOPE_FUNCTION) > 0 || inClassFieldInit\n};\n\nParser.extend = function extend () {\n var plugins = [], len = arguments.length;\n while ( len-- ) plugins[ len ] = arguments[ len ];\n\n var cls = this;\n for (var i = 0; i < plugins.length; i++) { cls = plugins[i](cls); }\n return cls\n};\n\nParser.parse = function parse (input, options) {\n return new this(options, input).parse()\n};\n\nParser.parseExpressionAt = function parseExpressionAt (input, pos, options) {\n var parser = new this(options, input, pos);\n parser.nextToken();\n return parser.parseExpression()\n};\n\nParser.tokenizer = function tokenizer (input, options) {\n return new this(options, input)\n};\n\nObject.defineProperties( Parser.prototype, prototypeAccessors );\n\nvar pp = Parser.prototype;\n\n// ## Parser utilities\n\nvar literal = /^(?:'((?:\\\\.|[^'\\\\])*?)'|\"((?:\\\\.|[^\"\\\\])*?)\")/;\npp.strictDirective = function(start) {\n for (;;) {\n // Try to find string literal.\n skipWhiteSpace.lastIndex = start;\n start += skipWhiteSpace.exec(this.input)[0].length;\n var match = literal.exec(this.input.slice(start));\n if (!match) { return false }\n if ((match[1] || match[2]) === \"use strict\") {\n skipWhiteSpace.lastIndex = start + match[0].length;\n var spaceAfter = skipWhiteSpace.exec(this.input), end = spaceAfter.index + spaceAfter[0].length;\n var next = this.input.charAt(end);\n return next === \";\" || next === \"}\" ||\n (lineBreak.test(spaceAfter[0]) &&\n !(/[(`.[+\\-/*%<>=,?^&]/.test(next) || next === \"!\" && this.input.charAt(end + 1) === \"=\"))\n }\n start += match[0].length;\n\n // Skip semicolon, if any.\n skipWhiteSpace.lastIndex = start;\n start += skipWhiteSpace.exec(this.input)[0].length;\n if (this.input[start] === \";\")\n { start++; }\n }\n};\n\n// Predicate that tests whether the next token is of the given\n// type, and if yes, consumes it as a side effect.\n\npp.eat = function(type) {\n if (this.type === type) {\n this.next();\n return true\n } else {\n return false\n }\n};\n\n// Tests whether parsed token is a contextual keyword.\n\npp.isContextual = function(name) {\n return this.type === types.name && this.value === name && !this.containsEsc\n};\n\n// Consumes contextual keyword if possible.\n\npp.eatContextual = function(name) {\n if (!this.isContextual(name)) { return false }\n this.next();\n return true\n};\n\n// Asserts that following token is given contextual keyword.\n\npp.expectContextual = function(name) {\n if (!this.eatContextual(name)) { this.unexpected(); }\n};\n\n// Test whether a semicolon can be inserted at the current position.\n\npp.canInsertSemicolon = function() {\n return this.type === types.eof ||\n this.type === types.braceR ||\n lineBreak.test(this.input.slice(this.lastTokEnd, this.start))\n};\n\npp.insertSemicolon = function() {\n if (this.canInsertSemicolon()) {\n if (this.options.onInsertedSemicolon)\n { this.options.onInsertedSemicolon(this.lastTokEnd, this.lastTokEndLoc); }\n return true\n }\n};\n\n// Consume a semicolon, or, failing that, see if we are allowed to\n// pretend that there is a semicolon at this position.\n\npp.semicolon = function() {\n if (!this.eat(types.semi) && !this.insertSemicolon()) { this.unexpected(); }\n};\n\npp.afterTrailingComma = function(tokType, notNext) {\n if (this.type === tokType) {\n if (this.options.onTrailingComma)\n { this.options.onTrailingComma(this.lastTokStart, this.lastTokStartLoc); }\n if (!notNext)\n { this.next(); }\n return true\n }\n};\n\n// Expect a token of a given type. If found, consume it, otherwise,\n// raise an unexpected token error.\n\npp.expect = function(type) {\n this.eat(type) || this.unexpected();\n};\n\n// Raise an unexpected token error.\n\npp.unexpected = function(pos) {\n this.raise(pos != null ? pos : this.start, \"Unexpected token\");\n};\n\nfunction DestructuringErrors() {\n this.shorthandAssign =\n this.trailingComma =\n this.parenthesizedAssign =\n this.parenthesizedBind =\n this.doubleProto =\n -1;\n}\n\npp.checkPatternErrors = function(refDestructuringErrors, isAssign) {\n if (!refDestructuringErrors) { return }\n if (refDestructuringErrors.trailingComma > -1)\n { this.raiseRecoverable(refDestructuringErrors.trailingComma, \"Comma is not permitted after the rest element\"); }\n var parens = isAssign ? refDestructuringErrors.parenthesizedAssign : refDestructuringErrors.parenthesizedBind;\n if (parens > -1) { this.raiseRecoverable(parens, \"Parenthesized pattern\"); }\n};\n\npp.checkExpressionErrors = function(refDestructuringErrors, andThrow) {\n if (!refDestructuringErrors) { return false }\n var shorthandAssign = refDestructuringErrors.shorthandAssign;\n var doubleProto = refDestructuringErrors.doubleProto;\n if (!andThrow) { return shorthandAssign >= 0 || doubleProto >= 0 }\n if (shorthandAssign >= 0)\n { this.raise(shorthandAssign, \"Shorthand property assignments are valid only in destructuring patterns\"); }\n if (doubleProto >= 0)\n { this.raiseRecoverable(doubleProto, \"Redefinition of __proto__ property\"); }\n};\n\npp.checkYieldAwaitInDefaultParams = function() {\n if (this.yieldPos && (!this.awaitPos || this.yieldPos < this.awaitPos))\n { this.raise(this.yieldPos, \"Yield expression cannot be a default value\"); }\n if (this.awaitPos)\n { this.raise(this.awaitPos, \"Await expression cannot be a default value\"); }\n};\n\npp.isSimpleAssignTarget = function(expr) {\n if (expr.type === \"ParenthesizedExpression\")\n { return this.isSimpleAssignTarget(expr.expression) }\n return expr.type === \"Identifier\" || expr.type === \"MemberExpression\"\n};\n\nvar pp$1 = Parser.prototype;\n\n// ### Statement parsing\n\n// Parse a program. Initializes the parser, reads any number of\n// statements, and wraps them in a Program node. Optionally takes a\n// `program` argument. If present, the statements will be appended\n// to its body instead of creating a new node.\n\npp$1.parseTopLevel = function(node) {\n var exports = Object.create(null);\n if (!node.body) { node.body = []; }\n while (this.type !== types.eof) {\n var stmt = this.parseStatement(null, true, exports);\n node.body.push(stmt);\n }\n if (this.inModule)\n { for (var i = 0, list = Object.keys(this.undefinedExports); i < list.length; i += 1)\n {\n var name = list[i];\n\n this.raiseRecoverable(this.undefinedExports[name].start, (\"Export '\" + name + \"' is not defined\"));\n } }\n this.adaptDirectivePrologue(node.body);\n this.next();\n node.sourceType = this.options.sourceType;\n return this.finishNode(node, \"Program\")\n};\n\nvar loopLabel = {kind: \"loop\"}, switchLabel = {kind: \"switch\"};\n\npp$1.isLet = function(context) {\n if (this.options.ecmaVersion < 6 || !this.isContextual(\"let\")) { return false }\n skipWhiteSpace.lastIndex = this.pos;\n var skip = skipWhiteSpace.exec(this.input);\n var next = this.pos + skip[0].length, nextCh = this.input.charCodeAt(next);\n // For ambiguous cases, determine if a LexicalDeclaration (or only a\n // Statement) is allowed here. If context is not empty then only a Statement\n // is allowed. However, `let [` is an explicit negative lookahead for\n // ExpressionStatement, so special-case it first.\n if (nextCh === 91 || nextCh === 92 || nextCh > 0xd7ff && nextCh < 0xdc00) { return true } // '[', '/', astral\n if (context) { return false }\n\n if (nextCh === 123) { return true } // '{'\n if (isIdentifierStart(nextCh, true)) {\n var pos = next + 1;\n while (isIdentifierChar(nextCh = this.input.charCodeAt(pos), true)) { ++pos; }\n if (nextCh === 92 || nextCh > 0xd7ff && nextCh < 0xdc00) { return true }\n var ident = this.input.slice(next, pos);\n if (!keywordRelationalOperator.test(ident)) { return true }\n }\n return false\n};\n\n// check 'async [no LineTerminator here] function'\n// - 'async /*foo*/ function' is OK.\n// - 'async /*\\n*/ function' is invalid.\npp$1.isAsyncFunction = function() {\n if (this.options.ecmaVersion < 8 || !this.isContextual(\"async\"))\n { return false }\n\n skipWhiteSpace.lastIndex = this.pos;\n var skip = skipWhiteSpace.exec(this.input);\n var next = this.pos + skip[0].length, after;\n return !lineBreak.test(this.input.slice(this.pos, next)) &&\n this.input.slice(next, next + 8) === \"function\" &&\n (next + 8 === this.input.length ||\n !(isIdentifierChar(after = this.input.charCodeAt(next + 8)) || after > 0xd7ff && after < 0xdc00))\n};\n\n// Parse a single statement.\n//\n// If expecting a statement and finding a slash operator, parse a\n// regular expression literal. This is to handle cases like\n// `if (foo) /blah/.exec(foo)`, where looking at the previous token\n// does not help.\n\npp$1.parseStatement = function(context, topLevel, exports) {\n var starttype = this.type, node = this.startNode(), kind;\n\n if (this.isLet(context)) {\n starttype = types._var;\n kind = \"let\";\n }\n\n // Most types of statements are recognized by the keyword they\n // start with. Many are trivial to parse, some require a bit of\n // complexity.\n\n switch (starttype) {\n case types._break: case types._continue: return this.parseBreakContinueStatement(node, starttype.keyword)\n case types._debugger: return this.parseDebuggerStatement(node)\n case types._do: return this.parseDoStatement(node)\n case types._for: return this.parseForStatement(node)\n case types._function:\n // Function as sole body of either an if statement or a labeled statement\n // works, but not when it is part of a labeled statement that is the sole\n // body of an if statement.\n if ((context && (this.strict || context !== \"if\" && context !== \"label\")) && this.options.ecmaVersion >= 6) { this.unexpected(); }\n return this.parseFunctionStatement(node, false, !context)\n case types._class:\n if (context) { this.unexpected(); }\n return this.parseClass(node, true)\n case types._if: return this.parseIfStatement(node)\n case types._return: return this.parseReturnStatement(node)\n case types._switch: return this.parseSwitchStatement(node)\n case types._throw: return this.parseThrowStatement(node)\n case types._try: return this.parseTryStatement(node)\n case types._const: case types._var:\n kind = kind || this.value;\n if (context && kind !== \"var\") { this.unexpected(); }\n return this.parseVarStatement(node, kind)\n case types._while: return this.parseWhileStatement(node)\n case types._with: return this.parseWithStatement(node)\n case types.braceL: return this.parseBlock(true, node)\n case types.semi: return this.parseEmptyStatement(node)\n case types._export:\n case types._import:\n if (this.options.ecmaVersion > 10 && starttype === types._import) {\n skipWhiteSpace.lastIndex = this.pos;\n var skip = skipWhiteSpace.exec(this.input);\n var next = this.pos + skip[0].length, nextCh = this.input.charCodeAt(next);\n if (nextCh === 40 || nextCh === 46) // '(' or '.'\n { return this.parseExpressionStatement(node, this.parseExpression()) }\n }\n\n if (!this.options.allowImportExportEverywhere) {\n if (!topLevel)\n { this.raise(this.start, \"'import' and 'export' may only appear at the top level\"); }\n if (!this.inModule)\n { this.raise(this.start, \"'import' and 'export' may appear only with 'sourceType: module'\"); }\n }\n return starttype === types._import ? this.parseImport(node) : this.parseExport(node, exports)\n\n // If the statement does not start with a statement keyword or a\n // brace, it's an ExpressionStatement or LabeledStatement. We\n // simply start parsing an expression, and afterwards, if the\n // next token is a colon and the expression was a simple\n // Identifier node, we switch to interpreting it as a label.\n default:\n if (this.isAsyncFunction()) {\n if (context) { this.unexpected(); }\n this.next();\n return this.parseFunctionStatement(node, true, !context)\n }\n\n var maybeName = this.value, expr = this.parseExpression();\n if (starttype === types.name && expr.type === \"Identifier\" && this.eat(types.colon))\n { return this.parseLabeledStatement(node, maybeName, expr, context) }\n else { return this.parseExpressionStatement(node, expr) }\n }\n};\n\npp$1.parseBreakContinueStatement = function(node, keyword) {\n var isBreak = keyword === \"break\";\n this.next();\n if (this.eat(types.semi) || this.insertSemicolon()) { node.label = null; }\n else if (this.type !== types.name) { this.unexpected(); }\n else {\n node.label = this.parseIdent();\n this.semicolon();\n }\n\n // Verify that there is an actual destination to break or\n // continue to.\n var i = 0;\n for (; i < this.labels.length; ++i) {\n var lab = this.labels[i];\n if (node.label == null || lab.name === node.label.name) {\n if (lab.kind != null && (isBreak || lab.kind === \"loop\")) { break }\n if (node.label && isBreak) { break }\n }\n }\n if (i === this.labels.length) { this.raise(node.start, \"Unsyntactic \" + keyword); }\n return this.finishNode(node, isBreak ? \"BreakStatement\" : \"ContinueStatement\")\n};\n\npp$1.parseDebuggerStatement = function(node) {\n this.next();\n this.semicolon();\n return this.finishNode(node, \"DebuggerStatement\")\n};\n\npp$1.parseDoStatement = function(node) {\n this.next();\n this.labels.push(loopLabel);\n node.body = this.parseStatement(\"do\");\n this.labels.pop();\n this.expect(types._while);\n node.test = this.parseParenExpression();\n if (this.options.ecmaVersion >= 6)\n { this.eat(types.semi); }\n else\n { this.semicolon(); }\n return this.finishNode(node, \"DoWhileStatement\")\n};\n\n// Disambiguating between a `for` and a `for`/`in` or `for`/`of`\n// loop is non-trivial. Basically, we have to parse the init `var`\n// statement or expression, disallowing the `in` operator (see\n// the second parameter to `parseExpression`), and then check\n// whether the next token is `in` or `of`. When there is no init\n// part (semicolon immediately after the opening parenthesis), it\n// is a regular `for` loop.\n\npp$1.parseForStatement = function(node) {\n this.next();\n var awaitAt = (this.options.ecmaVersion >= 9 && this.canAwait && this.eatContextual(\"await\")) ? this.lastTokStart : -1;\n this.labels.push(loopLabel);\n this.enterScope(0);\n this.expect(types.parenL);\n if (this.type === types.semi) {\n if (awaitAt > -1) { this.unexpected(awaitAt); }\n return this.parseFor(node, null)\n }\n var isLet = this.isLet();\n if (this.type === types._var || this.type === types._const || isLet) {\n var init$1 = this.startNode(), kind = isLet ? \"let\" : this.value;\n this.next();\n this.parseVar(init$1, true, kind);\n this.finishNode(init$1, \"VariableDeclaration\");\n if ((this.type === types._in || (this.options.ecmaVersion >= 6 && this.isContextual(\"of\"))) && init$1.declarations.length === 1) {\n if (this.options.ecmaVersion >= 9) {\n if (this.type === types._in) {\n if (awaitAt > -1) { this.unexpected(awaitAt); }\n } else { node.await = awaitAt > -1; }\n }\n return this.parseForIn(node, init$1)\n }\n if (awaitAt > -1) { this.unexpected(awaitAt); }\n return this.parseFor(node, init$1)\n }\n var refDestructuringErrors = new DestructuringErrors;\n var init = this.parseExpression(awaitAt > -1 ? \"await\" : true, refDestructuringErrors);\n if (this.type === types._in || (this.options.ecmaVersion >= 6 && this.isContextual(\"of\"))) {\n if (this.options.ecmaVersion >= 9) {\n if (this.type === types._in) {\n if (awaitAt > -1) { this.unexpected(awaitAt); }\n } else { node.await = awaitAt > -1; }\n }\n this.toAssignable(init, false, refDestructuringErrors);\n this.checkLValPattern(init);\n return this.parseForIn(node, init)\n } else {\n this.checkExpressionErrors(refDestructuringErrors, true);\n }\n if (awaitAt > -1) { this.unexpected(awaitAt); }\n return this.parseFor(node, init)\n};\n\npp$1.parseFunctionStatement = function(node, isAsync, declarationPosition) {\n this.next();\n return this.parseFunction(node, FUNC_STATEMENT | (declarationPosition ? 0 : FUNC_HANGING_STATEMENT), false, isAsync)\n};\n\npp$1.parseIfStatement = function(node) {\n this.next();\n node.test = this.parseParenExpression();\n // allow function declarations in branches, but only in non-strict mode\n node.consequent = this.parseStatement(\"if\");\n node.alternate = this.eat(types._else) ? this.parseStatement(\"if\") : null;\n return this.finishNode(node, \"IfStatement\")\n};\n\npp$1.parseReturnStatement = function(node) {\n if (!this.inFunction && !this.options.allowReturnOutsideFunction)\n { this.raise(this.start, \"'return' outside of function\"); }\n this.next();\n\n // In `return` (and `break`/`continue`), the keywords with\n // optional arguments, we eagerly look for a semicolon or the\n // possibility to insert one.\n\n if (this.eat(types.semi) || this.insertSemicolon()) { node.argument = null; }\n else { node.argument = this.parseExpression(); this.semicolon(); }\n return this.finishNode(node, \"ReturnStatement\")\n};\n\npp$1.parseSwitchStatement = function(node) {\n this.next();\n node.discriminant = this.parseParenExpression();\n node.cases = [];\n this.expect(types.braceL);\n this.labels.push(switchLabel);\n this.enterScope(0);\n\n // Statements under must be grouped (by label) in SwitchCase\n // nodes. `cur` is used to keep the node that we are currently\n // adding statements to.\n\n var cur;\n for (var sawDefault = false; this.type !== types.braceR;) {\n if (this.type === types._case || this.type === types._default) {\n var isCase = this.type === types._case;\n if (cur) { this.finishNode(cur, \"SwitchCase\"); }\n node.cases.push(cur = this.startNode());\n cur.consequent = [];\n this.next();\n if (isCase) {\n cur.test = this.parseExpression();\n } else {\n if (sawDefault) { this.raiseRecoverable(this.lastTokStart, \"Multiple default clauses\"); }\n sawDefault = true;\n cur.test = null;\n }\n this.expect(types.colon);\n } else {\n if (!cur) { this.unexpected(); }\n cur.consequent.push(this.parseStatement(null));\n }\n }\n this.exitScope();\n if (cur) { this.finishNode(cur, \"SwitchCase\"); }\n this.next(); // Closing brace\n this.labels.pop();\n return this.finishNode(node, \"SwitchStatement\")\n};\n\npp$1.parseThrowStatement = function(node) {\n this.next();\n if (lineBreak.test(this.input.slice(this.lastTokEnd, this.start)))\n { this.raise(this.lastTokEnd, \"Illegal newline after throw\"); }\n node.argument = this.parseExpression();\n this.semicolon();\n return this.finishNode(node, \"ThrowStatement\")\n};\n\n// Reused empty array added for node fields that are always empty.\n\nvar empty = [];\n\npp$1.parseTryStatement = function(node) {\n this.next();\n node.block = this.parseBlock();\n node.handler = null;\n if (this.type === types._catch) {\n var clause = this.startNode();\n this.next();\n if (this.eat(types.parenL)) {\n clause.param = this.parseBindingAtom();\n var simple = clause.param.type === \"Identifier\";\n this.enterScope(simple ? SCOPE_SIMPLE_CATCH : 0);\n this.checkLValPattern(clause.param, simple ? BIND_SIMPLE_CATCH : BIND_LEXICAL);\n this.expect(types.parenR);\n } else {\n if (this.options.ecmaVersion < 10) { this.unexpected(); }\n clause.param = null;\n this.enterScope(0);\n }\n clause.body = this.parseBlock(false);\n this.exitScope();\n node.handler = this.finishNode(clause, \"CatchClause\");\n }\n node.finalizer = this.eat(types._finally) ? this.parseBlock() : null;\n if (!node.handler && !node.finalizer)\n { this.raise(node.start, \"Missing catch or finally clause\"); }\n return this.finishNode(node, \"TryStatement\")\n};\n\npp$1.parseVarStatement = function(node, kind) {\n this.next();\n this.parseVar(node, false, kind);\n this.semicolon();\n return this.finishNode(node, \"VariableDeclaration\")\n};\n\npp$1.parseWhileStatement = function(node) {\n this.next();\n node.test = this.parseParenExpression();\n this.labels.push(loopLabel);\n node.body = this.parseStatement(\"while\");\n this.labels.pop();\n return this.finishNode(node, \"WhileStatement\")\n};\n\npp$1.parseWithStatement = function(node) {\n if (this.strict) { this.raise(this.start, \"'with' in strict mode\"); }\n this.next();\n node.object = this.parseParenExpression();\n node.body = this.parseStatement(\"with\");\n return this.finishNode(node, \"WithStatement\")\n};\n\npp$1.parseEmptyStatement = function(node) {\n this.next();\n return this.finishNode(node, \"EmptyStatement\")\n};\n\npp$1.parseLabeledStatement = function(node, maybeName, expr, context) {\n for (var i$1 = 0, list = this.labels; i$1 < list.length; i$1 += 1)\n {\n var label = list[i$1];\n\n if (label.name === maybeName)\n { this.raise(expr.start, \"Label '\" + maybeName + \"' is already declared\");\n } }\n var kind = this.type.isLoop ? \"loop\" : this.type === types._switch ? \"switch\" : null;\n for (var i = this.labels.length - 1; i >= 0; i--) {\n var label$1 = this.labels[i];\n if (label$1.statementStart === node.start) {\n // Update information about previous labels on this node\n label$1.statementStart = this.start;\n label$1.kind = kind;\n } else { break }\n }\n this.labels.push({name: maybeName, kind: kind, statementStart: this.start});\n node.body = this.parseStatement(context ? context.indexOf(\"label\") === -1 ? context + \"label\" : context : \"label\");\n this.labels.pop();\n node.label = expr;\n return this.finishNode(node, \"LabeledStatement\")\n};\n\npp$1.parseExpressionStatement = function(node, expr) {\n node.expression = expr;\n this.semicolon();\n return this.finishNode(node, \"ExpressionStatement\")\n};\n\n// Parse a semicolon-enclosed block of statements, handling `\"use\n// strict\"` declarations when `allowStrict` is true (used for\n// function bodies).\n\npp$1.parseBlock = function(createNewLexicalScope, node, exitStrict) {\n if ( createNewLexicalScope === void 0 ) createNewLexicalScope = true;\n if ( node === void 0 ) node = this.startNode();\n\n node.body = [];\n this.expect(types.braceL);\n if (createNewLexicalScope) { this.enterScope(0); }\n while (this.type !== types.braceR) {\n var stmt = this.parseStatement(null);\n node.body.push(stmt);\n }\n if (exitStrict) { this.strict = false; }\n this.next();\n if (createNewLexicalScope) { this.exitScope(); }\n return this.finishNode(node, \"BlockStatement\")\n};\n\n// Parse a regular `for` loop. The disambiguation code in\n// `parseStatement` will already have parsed the init statement or\n// expression.\n\npp$1.parseFor = function(node, init) {\n node.init = init;\n this.expect(types.semi);\n node.test = this.type === types.semi ? null : this.parseExpression();\n this.expect(types.semi);\n node.update = this.type === types.parenR ? null : this.parseExpression();\n this.expect(types.parenR);\n node.body = this.parseStatement(\"for\");\n this.exitScope();\n this.labels.pop();\n return this.finishNode(node, \"ForStatement\")\n};\n\n// Parse a `for`/`in` and `for`/`of` loop, which are almost\n// same from parser's perspective.\n\npp$1.parseForIn = function(node, init) {\n var isForIn = this.type === types._in;\n this.next();\n\n if (\n init.type === \"VariableDeclaration\" &&\n init.declarations[0].init != null &&\n (\n !isForIn ||\n this.options.ecmaVersion < 8 ||\n this.strict ||\n init.kind !== \"var\" ||\n init.declarations[0].id.type !== \"Identifier\"\n )\n ) {\n this.raise(\n init.start,\n ((isForIn ? \"for-in\" : \"for-of\") + \" loop variable declaration may not have an initializer\")\n );\n }\n node.left = init;\n node.right = isForIn ? this.parseExpression() : this.parseMaybeAssign();\n this.expect(types.parenR);\n node.body = this.parseStatement(\"for\");\n this.exitScope();\n this.labels.pop();\n return this.finishNode(node, isForIn ? \"ForInStatement\" : \"ForOfStatement\")\n};\n\n// Parse a list of variable declarations.\n\npp$1.parseVar = function(node, isFor, kind) {\n node.declarations = [];\n node.kind = kind;\n for (;;) {\n var decl = this.startNode();\n this.parseVarId(decl, kind);\n if (this.eat(types.eq)) {\n decl.init = this.parseMaybeAssign(isFor);\n } else if (kind === \"const\" && !(this.type === types._in || (this.options.ecmaVersion >= 6 && this.isContextual(\"of\")))) {\n this.unexpected();\n } else if (decl.id.type !== \"Identifier\" && !(isFor && (this.type === types._in || this.isContextual(\"of\")))) {\n this.raise(this.lastTokEnd, \"Complex binding patterns require an initialization value\");\n } else {\n decl.init = null;\n }\n node.declarations.push(this.finishNode(decl, \"VariableDeclarator\"));\n if (!this.eat(types.comma)) { break }\n }\n return node\n};\n\npp$1.parseVarId = function(decl, kind) {\n decl.id = this.parseBindingAtom();\n this.checkLValPattern(decl.id, kind === \"var\" ? BIND_VAR : BIND_LEXICAL, false);\n};\n\nvar FUNC_STATEMENT = 1, FUNC_HANGING_STATEMENT = 2, FUNC_NULLABLE_ID = 4;\n\n// Parse a function declaration or literal (depending on the\n// `statement & FUNC_STATEMENT`).\n\n// Remove `allowExpressionBody` for 7.0.0, as it is only called with false\npp$1.parseFunction = function(node, statement, allowExpressionBody, isAsync) {\n this.initFunction(node);\n if (this.options.ecmaVersion >= 9 || this.options.ecmaVersion >= 6 && !isAsync) {\n if (this.type === types.star && (statement & FUNC_HANGING_STATEMENT))\n { this.unexpected(); }\n node.generator = this.eat(types.star);\n }\n if (this.options.ecmaVersion >= 8)\n { node.async = !!isAsync; }\n\n if (statement & FUNC_STATEMENT) {\n node.id = (statement & FUNC_NULLABLE_ID) && this.type !== types.name ? null : this.parseIdent();\n if (node.id && !(statement & FUNC_HANGING_STATEMENT))\n // If it is a regular function declaration in sloppy mode, then it is\n // subject to Annex B semantics (BIND_FUNCTION). Otherwise, the binding\n // mode depends on properties of the current scope (see\n // treatFunctionsAsVar).\n { this.checkLValSimple(node.id, (this.strict || node.generator || node.async) ? this.treatFunctionsAsVar ? BIND_VAR : BIND_LEXICAL : BIND_FUNCTION); }\n }\n\n var oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, oldAwaitIdentPos = this.awaitIdentPos;\n this.yieldPos = 0;\n this.awaitPos = 0;\n this.awaitIdentPos = 0;\n this.enterScope(functionFlags(node.async, node.generator));\n\n if (!(statement & FUNC_STATEMENT))\n { node.id = this.type === types.name ? this.parseIdent() : null; }\n\n this.parseFunctionParams(node);\n this.parseFunctionBody(node, allowExpressionBody, false);\n\n this.yieldPos = oldYieldPos;\n this.awaitPos = oldAwaitPos;\n this.awaitIdentPos = oldAwaitIdentPos;\n return this.finishNode(node, (statement & FUNC_STATEMENT) ? \"FunctionDeclaration\" : \"FunctionExpression\")\n};\n\npp$1.parseFunctionParams = function(node) {\n this.expect(types.parenL);\n node.params = this.parseBindingList(types.parenR, false, this.options.ecmaVersion >= 8);\n this.checkYieldAwaitInDefaultParams();\n};\n\n// Parse a class declaration or literal (depending on the\n// `isStatement` parameter).\n\npp$1.parseClass = function(node, isStatement) {\n this.next();\n\n // ecma-262 14.6 Class Definitions\n // A class definition is always strict mode code.\n var oldStrict = this.strict;\n this.strict = true;\n\n this.parseClassId(node, isStatement);\n this.parseClassSuper(node);\n var privateNameMap = this.enterClassBody();\n var classBody = this.startNode();\n var hadConstructor = false;\n classBody.body = [];\n this.expect(types.braceL);\n while (this.type !== types.braceR) {\n var element = this.parseClassElement(node.superClass !== null);\n if (element) {\n classBody.body.push(element);\n if (element.type === \"MethodDefinition\" && element.kind === \"constructor\") {\n if (hadConstructor) { this.raise(element.start, \"Duplicate constructor in the same class\"); }\n hadConstructor = true;\n } else if (element.key.type === \"PrivateIdentifier\" && isPrivateNameConflicted(privateNameMap, element)) {\n this.raiseRecoverable(element.key.start, (\"Identifier '#\" + (element.key.name) + \"' has already been declared\"));\n }\n }\n }\n this.strict = oldStrict;\n this.next();\n node.body = this.finishNode(classBody, \"ClassBody\");\n this.exitClassBody();\n return this.finishNode(node, isStatement ? \"ClassDeclaration\" : \"ClassExpression\")\n};\n\npp$1.parseClassElement = function(constructorAllowsSuper) {\n if (this.eat(types.semi)) { return null }\n\n var ecmaVersion = this.options.ecmaVersion;\n var node = this.startNode();\n var keyName = \"\";\n var isGenerator = false;\n var isAsync = false;\n var kind = \"method\";\n\n // Parse modifiers\n node.static = false;\n if (this.eatContextual(\"static\")) {\n if (this.isClassElementNameStart() || this.type === types.star) {\n node.static = true;\n } else {\n keyName = \"static\";\n }\n }\n if (!keyName && ecmaVersion >= 8 && this.eatContextual(\"async\")) {\n if ((this.isClassElementNameStart() || this.type === types.star) && !this.canInsertSemicolon()) {\n isAsync = true;\n } else {\n keyName = \"async\";\n }\n }\n if (!keyName && (ecmaVersion >= 9 || !isAsync) && this.eat(types.star)) {\n isGenerator = true;\n }\n if (!keyName && !isAsync && !isGenerator) {\n var lastValue = this.value;\n if (this.eatContextual(\"get\") || this.eatContextual(\"set\")) {\n if (this.isClassElementNameStart()) {\n kind = lastValue;\n } else {\n keyName = lastValue;\n }\n }\n }\n\n // Parse element name\n if (keyName) {\n // 'async', 'get', 'set', or 'static' were not a keyword contextually.\n // The last token is any of those. Make it the element name.\n node.computed = false;\n node.key = this.startNodeAt(this.lastTokStart, this.lastTokStartLoc);\n node.key.name = keyName;\n this.finishNode(node.key, \"Identifier\");\n } else {\n this.parseClassElementName(node);\n }\n\n // Parse element value\n if (ecmaVersion < 13 || this.type === types.parenL || kind !== \"method\" || isGenerator || isAsync) {\n var isConstructor = !node.static && checkKeyName(node, \"constructor\");\n var allowsDirectSuper = isConstructor && constructorAllowsSuper;\n // Couldn't move this check into the 'parseClassMethod' method for backward compatibility.\n if (isConstructor && kind !== \"method\") { this.raise(node.key.start, \"Constructor can't have get/set modifier\"); }\n node.kind = isConstructor ? \"constructor\" : kind;\n this.parseClassMethod(node, isGenerator, isAsync, allowsDirectSuper);\n } else {\n this.parseClassField(node);\n }\n\n return node\n};\n\npp$1.isClassElementNameStart = function() {\n return (\n this.type === types.name ||\n this.type === types.privateId ||\n this.type === types.num ||\n this.type === types.string ||\n this.type === types.bracketL ||\n this.type.keyword\n )\n};\n\npp$1.parseClassElementName = function(element) {\n if (this.type === types.privateId) {\n if (this.value === \"constructor\") {\n this.raise(this.start, \"Classes can't have an element named '#constructor'\");\n }\n element.computed = false;\n element.key = this.parsePrivateIdent();\n } else {\n this.parsePropertyName(element);\n }\n};\n\npp$1.parseClassMethod = function(method, isGenerator, isAsync, allowsDirectSuper) {\n // Check key and flags\n var key = method.key;\n if (method.kind === \"constructor\") {\n if (isGenerator) { this.raise(key.start, \"Constructor can't be a generator\"); }\n if (isAsync) { this.raise(key.start, \"Constructor can't be an async method\"); }\n } else if (method.static && checkKeyName(method, \"prototype\")) {\n this.raise(key.start, \"Classes may not have a static property named prototype\");\n }\n\n // Parse value\n var value = method.value = this.parseMethod(isGenerator, isAsync, allowsDirectSuper);\n\n // Check value\n if (method.kind === \"get\" && value.params.length !== 0)\n { this.raiseRecoverable(value.start, \"getter should have no params\"); }\n if (method.kind === \"set\" && value.params.length !== 1)\n { this.raiseRecoverable(value.start, \"setter should have exactly one param\"); }\n if (method.kind === \"set\" && value.params[0].type === \"RestElement\")\n { this.raiseRecoverable(value.params[0].start, \"Setter cannot use rest params\"); }\n\n return this.finishNode(method, \"MethodDefinition\")\n};\n\npp$1.parseClassField = function(field) {\n if (checkKeyName(field, \"constructor\")) {\n this.raise(field.key.start, \"Classes can't have a field named 'constructor'\");\n } else if (field.static && checkKeyName(field, \"prototype\")) {\n this.raise(field.key.start, \"Classes can't have a static field named 'prototype'\");\n }\n\n if (this.eat(types.eq)) {\n // To raise SyntaxError if 'arguments' exists in the initializer.\n var scope = this.currentThisScope();\n var inClassFieldInit = scope.inClassFieldInit;\n scope.inClassFieldInit = true;\n field.value = this.parseMaybeAssign();\n scope.inClassFieldInit = inClassFieldInit;\n } else {\n field.value = null;\n }\n this.semicolon();\n\n return this.finishNode(field, \"PropertyDefinition\")\n};\n\npp$1.parseClassId = function(node, isStatement) {\n if (this.type === types.name) {\n node.id = this.parseIdent();\n if (isStatement)\n { this.checkLValSimple(node.id, BIND_LEXICAL, false); }\n } else {\n if (isStatement === true)\n { this.unexpected(); }\n node.id = null;\n }\n};\n\npp$1.parseClassSuper = function(node) {\n node.superClass = this.eat(types._extends) ? this.parseExprSubscripts() : null;\n};\n\npp$1.enterClassBody = function() {\n var element = {declared: Object.create(null), used: []};\n this.privateNameStack.push(element);\n return element.declared\n};\n\npp$1.exitClassBody = function() {\n var ref = this.privateNameStack.pop();\n var declared = ref.declared;\n var used = ref.used;\n var len = this.privateNameStack.length;\n var parent = len === 0 ? null : this.privateNameStack[len - 1];\n for (var i = 0; i < used.length; ++i) {\n var id = used[i];\n if (!has(declared, id.name)) {\n if (parent) {\n parent.used.push(id);\n } else {\n this.raiseRecoverable(id.start, (\"Private field '#\" + (id.name) + \"' must be declared in an enclosing class\"));\n }\n }\n }\n};\n\nfunction isPrivateNameConflicted(privateNameMap, element) {\n var name = element.key.name;\n var curr = privateNameMap[name];\n\n var next = \"true\";\n if (element.type === \"MethodDefinition\" && (element.kind === \"get\" || element.kind === \"set\")) {\n next = (element.static ? \"s\" : \"i\") + element.kind;\n }\n\n // `class { get #a(){}; static set #a(_){} }` is also conflict.\n if (\n curr === \"iget\" && next === \"iset\" ||\n curr === \"iset\" && next === \"iget\" ||\n curr === \"sget\" && next === \"sset\" ||\n curr === \"sset\" && next === \"sget\"\n ) {\n privateNameMap[name] = \"true\";\n return false\n } else if (!curr) {\n privateNameMap[name] = next;\n return false\n } else {\n return true\n }\n}\n\nfunction checkKeyName(node, name) {\n var computed = node.computed;\n var key = node.key;\n return !computed && (\n key.type === \"Identifier\" && key.name === name ||\n key.type === \"Literal\" && key.value === name\n )\n}\n\n// Parses module export declaration.\n\npp$1.parseExport = function(node, exports) {\n this.next();\n // export * from '...'\n if (this.eat(types.star)) {\n if (this.options.ecmaVersion >= 11) {\n if (this.eatContextual(\"as\")) {\n node.exported = this.parseIdent(true);\n this.checkExport(exports, node.exported.name, this.lastTokStart);\n } else {\n node.exported = null;\n }\n }\n this.expectContextual(\"from\");\n if (this.type !== types.string) { this.unexpected(); }\n node.source = this.parseExprAtom();\n this.semicolon();\n return this.finishNode(node, \"ExportAllDeclaration\")\n }\n if (this.eat(types._default)) { // export default ...\n this.checkExport(exports, \"default\", this.lastTokStart);\n var isAsync;\n if (this.type === types._function || (isAsync = this.isAsyncFunction())) {\n var fNode = this.startNode();\n this.next();\n if (isAsync) { this.next(); }\n node.declaration = this.parseFunction(fNode, FUNC_STATEMENT | FUNC_NULLABLE_ID, false, isAsync);\n } else if (this.type === types._class) {\n var cNode = this.startNode();\n node.declaration = this.parseClass(cNode, \"nullableID\");\n } else {\n node.declaration = this.parseMaybeAssign();\n this.semicolon();\n }\n return this.finishNode(node, \"ExportDefaultDeclaration\")\n }\n // export var|const|let|function|class ...\n if (this.shouldParseExportStatement()) {\n node.declaration = this.parseStatement(null);\n if (node.declaration.type === \"VariableDeclaration\")\n { this.checkVariableExport(exports, node.declaration.declarations); }\n else\n { this.checkExport(exports, node.declaration.id.name, node.declaration.id.start); }\n node.specifiers = [];\n node.source = null;\n } else { // export { x, y as z } [from '...']\n node.declaration = null;\n node.specifiers = this.parseExportSpecifiers(exports);\n if (this.eatContextual(\"from\")) {\n if (this.type !== types.string) { this.unexpected(); }\n node.source = this.parseExprAtom();\n } else {\n for (var i = 0, list = node.specifiers; i < list.length; i += 1) {\n // check for keywords used as local names\n var spec = list[i];\n\n this.checkUnreserved(spec.local);\n // check if export is defined\n this.checkLocalExport(spec.local);\n }\n\n node.source = null;\n }\n this.semicolon();\n }\n return this.finishNode(node, \"ExportNamedDeclaration\")\n};\n\npp$1.checkExport = function(exports, name, pos) {\n if (!exports) { return }\n if (has(exports, name))\n { this.raiseRecoverable(pos, \"Duplicate export '\" + name + \"'\"); }\n exports[name] = true;\n};\n\npp$1.checkPatternExport = function(exports, pat) {\n var type = pat.type;\n if (type === \"Identifier\")\n { this.checkExport(exports, pat.name, pat.start); }\n else if (type === \"ObjectPattern\")\n { for (var i = 0, list = pat.properties; i < list.length; i += 1)\n {\n var prop = list[i];\n\n this.checkPatternExport(exports, prop);\n } }\n else if (type === \"ArrayPattern\")\n { for (var i$1 = 0, list$1 = pat.elements; i$1 < list$1.length; i$1 += 1) {\n var elt = list$1[i$1];\n\n if (elt) { this.checkPatternExport(exports, elt); }\n } }\n else if (type === \"Property\")\n { this.checkPatternExport(exports, pat.value); }\n else if (type === \"AssignmentPattern\")\n { this.checkPatternExport(exports, pat.left); }\n else if (type === \"RestElement\")\n { this.checkPatternExport(exports, pat.argument); }\n else if (type === \"ParenthesizedExpression\")\n { this.checkPatternExport(exports, pat.expression); }\n};\n\npp$1.checkVariableExport = function(exports, decls) {\n if (!exports) { return }\n for (var i = 0, list = decls; i < list.length; i += 1)\n {\n var decl = list[i];\n\n this.checkPatternExport(exports, decl.id);\n }\n};\n\npp$1.shouldParseExportStatement = function() {\n return this.type.keyword === \"var\" ||\n this.type.keyword === \"const\" ||\n this.type.keyword === \"class\" ||\n this.type.keyword === \"function\" ||\n this.isLet() ||\n this.isAsyncFunction()\n};\n\n// Parses a comma-separated list of module exports.\n\npp$1.parseExportSpecifiers = function(exports) {\n var nodes = [], first = true;\n // export { x, y as z } [from '...']\n this.expect(types.braceL);\n while (!this.eat(types.braceR)) {\n if (!first) {\n this.expect(types.comma);\n if (this.afterTrailingComma(types.braceR)) { break }\n } else { first = false; }\n\n var node = this.startNode();\n node.local = this.parseIdent(true);\n node.exported = this.eatContextual(\"as\") ? this.parseIdent(true) : node.local;\n this.checkExport(exports, node.exported.name, node.exported.start);\n nodes.push(this.finishNode(node, \"ExportSpecifier\"));\n }\n return nodes\n};\n\n// Parses import declaration.\n\npp$1.parseImport = function(node) {\n this.next();\n // import '...'\n if (this.type === types.string) {\n node.specifiers = empty;\n node.source = this.parseExprAtom();\n } else {\n node.specifiers = this.parseImportSpecifiers();\n this.expectContextual(\"from\");\n node.source = this.type === types.string ? this.parseExprAtom() : this.unexpected();\n }\n this.semicolon();\n return this.finishNode(node, \"ImportDeclaration\")\n};\n\n// Parses a comma-separated list of module imports.\n\npp$1.parseImportSpecifiers = function() {\n var nodes = [], first = true;\n if (this.type === types.name) {\n // import defaultObj, { x, y as z } from '...'\n var node = this.startNode();\n node.local = this.parseIdent();\n this.checkLValSimple(node.local, BIND_LEXICAL);\n nodes.push(this.finishNode(node, \"ImportDefaultSpecifier\"));\n if (!this.eat(types.comma)) { return nodes }\n }\n if (this.type === types.star) {\n var node$1 = this.startNode();\n this.next();\n this.expectContextual(\"as\");\n node$1.local = this.parseIdent();\n this.checkLValSimple(node$1.local, BIND_LEXICAL);\n nodes.push(this.finishNode(node$1, \"ImportNamespaceSpecifier\"));\n return nodes\n }\n this.expect(types.braceL);\n while (!this.eat(types.braceR)) {\n if (!first) {\n this.expect(types.comma);\n if (this.afterTrailingComma(types.braceR)) { break }\n } else { first = false; }\n\n var node$2 = this.startNode();\n node$2.imported = this.parseIdent(true);\n if (this.eatContextual(\"as\")) {\n node$2.local = this.parseIdent();\n } else {\n this.checkUnreserved(node$2.imported);\n node$2.local = node$2.imported;\n }\n this.checkLValSimple(node$2.local, BIND_LEXICAL);\n nodes.push(this.finishNode(node$2, \"ImportSpecifier\"));\n }\n return nodes\n};\n\n// Set `ExpressionStatement#directive` property for directive prologues.\npp$1.adaptDirectivePrologue = function(statements) {\n for (var i = 0; i < statements.length && this.isDirectiveCandidate(statements[i]); ++i) {\n statements[i].directive = statements[i].expression.raw.slice(1, -1);\n }\n};\npp$1.isDirectiveCandidate = function(statement) {\n return (\n statement.type === \"ExpressionStatement\" &&\n statement.expression.type === \"Literal\" &&\n typeof statement.expression.value === \"string\" &&\n // Reject parenthesized strings.\n (this.input[statement.start] === \"\\\"\" || this.input[statement.start] === \"'\")\n )\n};\n\nvar pp$2 = Parser.prototype;\n\n// Convert existing expression atom to assignable pattern\n// if possible.\n\npp$2.toAssignable = function(node, isBinding, refDestructuringErrors) {\n if (this.options.ecmaVersion >= 6 && node) {\n switch (node.type) {\n case \"Identifier\":\n if (this.inAsync && node.name === \"await\")\n { this.raise(node.start, \"Cannot use 'await' as identifier inside an async function\"); }\n break\n\n case \"ObjectPattern\":\n case \"ArrayPattern\":\n case \"AssignmentPattern\":\n case \"RestElement\":\n break\n\n case \"ObjectExpression\":\n node.type = \"ObjectPattern\";\n if (refDestructuringErrors) { this.checkPatternErrors(refDestructuringErrors, true); }\n for (var i = 0, list = node.properties; i < list.length; i += 1) {\n var prop = list[i];\n\n this.toAssignable(prop, isBinding);\n // Early error:\n // AssignmentRestProperty[Yield, Await] :\n // `...` DestructuringAssignmentTarget[Yield, Await]\n //\n // It is a Syntax Error if |DestructuringAssignmentTarget| is an |ArrayLiteral| or an |ObjectLiteral|.\n if (\n prop.type === \"RestElement\" &&\n (prop.argument.type === \"ArrayPattern\" || prop.argument.type === \"ObjectPattern\")\n ) {\n this.raise(prop.argument.start, \"Unexpected token\");\n }\n }\n break\n\n case \"Property\":\n // AssignmentProperty has type === \"Property\"\n if (node.kind !== \"init\") { this.raise(node.key.start, \"Object pattern can't contain getter or setter\"); }\n this.toAssignable(node.value, isBinding);\n break\n\n case \"ArrayExpression\":\n node.type = \"ArrayPattern\";\n if (refDestructuringErrors) { this.checkPatternErrors(refDestructuringErrors, true); }\n this.toAssignableList(node.elements, isBinding);\n break\n\n case \"SpreadElement\":\n node.type = \"RestElement\";\n this.toAssignable(node.argument, isBinding);\n if (node.argument.type === \"AssignmentPattern\")\n { this.raise(node.argument.start, \"Rest elements cannot have a default value\"); }\n break\n\n case \"AssignmentExpression\":\n if (node.operator !== \"=\") { this.raise(node.left.end, \"Only '=' operator can be used for specifying default value.\"); }\n node.type = \"AssignmentPattern\";\n delete node.operator;\n this.toAssignable(node.left, isBinding);\n break\n\n case \"ParenthesizedExpression\":\n this.toAssignable(node.expression, isBinding, refDestructuringErrors);\n break\n\n case \"ChainExpression\":\n this.raiseRecoverable(node.start, \"Optional chaining cannot appear in left-hand side\");\n break\n\n case \"MemberExpression\":\n if (!isBinding) { break }\n\n default:\n this.raise(node.start, \"Assigning to rvalue\");\n }\n } else if (refDestructuringErrors) { this.checkPatternErrors(refDestructuringErrors, true); }\n return node\n};\n\n// Convert list of expression atoms to binding list.\n\npp$2.toAssignableList = function(exprList, isBinding) {\n var end = exprList.length;\n for (var i = 0; i < end; i++) {\n var elt = exprList[i];\n if (elt) { this.toAssignable(elt, isBinding); }\n }\n if (end) {\n var last = exprList[end - 1];\n if (this.options.ecmaVersion === 6 && isBinding && last && last.type === \"RestElement\" && last.argument.type !== \"Identifier\")\n { this.unexpected(last.argument.start); }\n }\n return exprList\n};\n\n// Parses spread element.\n\npp$2.parseSpread = function(refDestructuringErrors) {\n var node = this.startNode();\n this.next();\n node.argument = this.parseMaybeAssign(false, refDestructuringErrors);\n return this.finishNode(node, \"SpreadElement\")\n};\n\npp$2.parseRestBinding = function() {\n var node = this.startNode();\n this.next();\n\n // RestElement inside of a function parameter must be an identifier\n if (this.options.ecmaVersion === 6 && this.type !== types.name)\n { this.unexpected(); }\n\n node.argument = this.parseBindingAtom();\n\n return this.finishNode(node, \"RestElement\")\n};\n\n// Parses lvalue (assignable) atom.\n\npp$2.parseBindingAtom = function() {\n if (this.options.ecmaVersion >= 6) {\n switch (this.type) {\n case types.bracketL:\n var node = this.startNode();\n this.next();\n node.elements = this.parseBindingList(types.bracketR, true, true);\n return this.finishNode(node, \"ArrayPattern\")\n\n case types.braceL:\n return this.parseObj(true)\n }\n }\n return this.parseIdent()\n};\n\npp$2.parseBindingList = function(close, allowEmpty, allowTrailingComma) {\n var elts = [], first = true;\n while (!this.eat(close)) {\n if (first) { first = false; }\n else { this.expect(types.comma); }\n if (allowEmpty && this.type === types.comma) {\n elts.push(null);\n } else if (allowTrailingComma && this.afterTrailingComma(close)) {\n break\n } else if (this.type === types.ellipsis) {\n var rest = this.parseRestBinding();\n this.parseBindingListItem(rest);\n elts.push(rest);\n if (this.type === types.comma) { this.raise(this.start, \"Comma is not permitted after the rest element\"); }\n this.expect(close);\n break\n } else {\n var elem = this.parseMaybeDefault(this.start, this.startLoc);\n this.parseBindingListItem(elem);\n elts.push(elem);\n }\n }\n return elts\n};\n\npp$2.parseBindingListItem = function(param) {\n return param\n};\n\n// Parses assignment pattern around given atom if possible.\n\npp$2.parseMaybeDefault = function(startPos, startLoc, left) {\n left = left || this.parseBindingAtom();\n if (this.options.ecmaVersion < 6 || !this.eat(types.eq)) { return left }\n var node = this.startNodeAt(startPos, startLoc);\n node.left = left;\n node.right = this.parseMaybeAssign();\n return this.finishNode(node, \"AssignmentPattern\")\n};\n\n// The following three functions all verify that a node is an lvalue —\n// something that can be bound, or assigned to. In order to do so, they perform\n// a variety of checks:\n//\n// - Check that none of the bound/assigned-to identifiers are reserved words.\n// - Record name declarations for bindings in the appropriate scope.\n// - Check duplicate argument names, if checkClashes is set.\n//\n// If a complex binding pattern is encountered (e.g., object and array\n// destructuring), the entire pattern is recursively checked.\n//\n// There are three versions of checkLVal*() appropriate for different\n// circumstances:\n//\n// - checkLValSimple() shall be used if the syntactic construct supports\n// nothing other than identifiers and member expressions. Parenthesized\n// expressions are also correctly handled. This is generally appropriate for\n// constructs for which the spec says\n//\n// > It is a Syntax Error if AssignmentTargetType of [the production] is not\n// > simple.\n//\n// It is also appropriate for checking if an identifier is valid and not\n// defined elsewhere, like import declarations or function/class identifiers.\n//\n// Examples where this is used include:\n// a += …;\n// import a from '…';\n// where a is the node to be checked.\n//\n// - checkLValPattern() shall be used if the syntactic construct supports\n// anything checkLValSimple() supports, as well as object and array\n// destructuring patterns. This is generally appropriate for constructs for\n// which the spec says\n//\n// > It is a Syntax Error if [the production] is neither an ObjectLiteral nor\n// > an ArrayLiteral and AssignmentTargetType of [the production] is not\n// > simple.\n//\n// Examples where this is used include:\n// (a = …);\n// const a = …;\n// try { … } catch (a) { … }\n// where a is the node to be checked.\n//\n// - checkLValInnerPattern() shall be used if the syntactic construct supports\n// anything checkLValPattern() supports, as well as default assignment\n// patterns, rest elements, and other constructs that may appear within an\n// object or array destructuring pattern.\n//\n// As a special case, function parameters also use checkLValInnerPattern(),\n// as they also support defaults and rest constructs.\n//\n// These functions deliberately support both assignment and binding constructs,\n// as the logic for both is exceedingly similar. If the node is the target of\n// an assignment, then bindingType should be set to BIND_NONE. Otherwise, it\n// should be set to the appropriate BIND_* constant, like BIND_VAR or\n// BIND_LEXICAL.\n//\n// If the function is called with a non-BIND_NONE bindingType, then\n// additionally a checkClashes object may be specified to allow checking for\n// duplicate argument names. checkClashes is ignored if the provided construct\n// is an assignment (i.e., bindingType is BIND_NONE).\n\npp$2.checkLValSimple = function(expr, bindingType, checkClashes) {\n if ( bindingType === void 0 ) bindingType = BIND_NONE;\n\n var isBind = bindingType !== BIND_NONE;\n\n switch (expr.type) {\n case \"Identifier\":\n if (this.strict && this.reservedWordsStrictBind.test(expr.name))\n { this.raiseRecoverable(expr.start, (isBind ? \"Binding \" : \"Assigning to \") + expr.name + \" in strict mode\"); }\n if (isBind) {\n if (bindingType === BIND_LEXICAL && expr.name === \"let\")\n { this.raiseRecoverable(expr.start, \"let is disallowed as a lexically bound name\"); }\n if (checkClashes) {\n if (has(checkClashes, expr.name))\n { this.raiseRecoverable(expr.start, \"Argument name clash\"); }\n checkClashes[expr.name] = true;\n }\n if (bindingType !== BIND_OUTSIDE) { this.declareName(expr.name, bindingType, expr.start); }\n }\n break\n\n case \"ChainExpression\":\n this.raiseRecoverable(expr.start, \"Optional chaining cannot appear in left-hand side\");\n break\n\n case \"MemberExpression\":\n if (isBind) { this.raiseRecoverable(expr.start, \"Binding member expression\"); }\n break\n\n case \"ParenthesizedExpression\":\n if (isBind) { this.raiseRecoverable(expr.start, \"Binding parenthesized expression\"); }\n return this.checkLValSimple(expr.expression, bindingType, checkClashes)\n\n default:\n this.raise(expr.start, (isBind ? \"Binding\" : \"Assigning to\") + \" rvalue\");\n }\n};\n\npp$2.checkLValPattern = function(expr, bindingType, checkClashes) {\n if ( bindingType === void 0 ) bindingType = BIND_NONE;\n\n switch (expr.type) {\n case \"ObjectPattern\":\n for (var i = 0, list = expr.properties; i < list.length; i += 1) {\n var prop = list[i];\n\n this.checkLValInnerPattern(prop, bindingType, checkClashes);\n }\n break\n\n case \"ArrayPattern\":\n for (var i$1 = 0, list$1 = expr.elements; i$1 < list$1.length; i$1 += 1) {\n var elem = list$1[i$1];\n\n if (elem) { this.checkLValInnerPattern(elem, bindingType, checkClashes); }\n }\n break\n\n default:\n this.checkLValSimple(expr, bindingType, checkClashes);\n }\n};\n\npp$2.checkLValInnerPattern = function(expr, bindingType, checkClashes) {\n if ( bindingType === void 0 ) bindingType = BIND_NONE;\n\n switch (expr.type) {\n case \"Property\":\n // AssignmentProperty has type === \"Property\"\n this.checkLValInnerPattern(expr.value, bindingType, checkClashes);\n break\n\n case \"AssignmentPattern\":\n this.checkLValPattern(expr.left, bindingType, checkClashes);\n break\n\n case \"RestElement\":\n this.checkLValPattern(expr.argument, bindingType, checkClashes);\n break\n\n default:\n this.checkLValPattern(expr, bindingType, checkClashes);\n }\n};\n\n// A recursive descent parser operates by defining functions for all\n\nvar pp$3 = Parser.prototype;\n\n// Check if property name clashes with already added.\n// Object/class getters and setters are not allowed to clash —\n// either with each other or with an init property — and in\n// strict mode, init properties are also not allowed to be repeated.\n\npp$3.checkPropClash = function(prop, propHash, refDestructuringErrors) {\n if (this.options.ecmaVersion >= 9 && prop.type === \"SpreadElement\")\n { return }\n if (this.options.ecmaVersion >= 6 && (prop.computed || prop.method || prop.shorthand))\n { return }\n var key = prop.key;\n var name;\n switch (key.type) {\n case \"Identifier\": name = key.name; break\n case \"Literal\": name = String(key.value); break\n default: return\n }\n var kind = prop.kind;\n if (this.options.ecmaVersion >= 6) {\n if (name === \"__proto__\" && kind === \"init\") {\n if (propHash.proto) {\n if (refDestructuringErrors) {\n if (refDestructuringErrors.doubleProto < 0)\n { refDestructuringErrors.doubleProto = key.start; }\n // Backwards-compat kludge. Can be removed in version 6.0\n } else { this.raiseRecoverable(key.start, \"Redefinition of __proto__ property\"); }\n }\n propHash.proto = true;\n }\n return\n }\n name = \"$\" + name;\n var other = propHash[name];\n if (other) {\n var redefinition;\n if (kind === \"init\") {\n redefinition = this.strict && other.init || other.get || other.set;\n } else {\n redefinition = other.init || other[kind];\n }\n if (redefinition)\n { this.raiseRecoverable(key.start, \"Redefinition of property\"); }\n } else {\n other = propHash[name] = {\n init: false,\n get: false,\n set: false\n };\n }\n other[kind] = true;\n};\n\n// ### Expression parsing\n\n// These nest, from the most general expression type at the top to\n// 'atomic', nondivisible expression types at the bottom. Most of\n// the functions will simply let the function(s) below them parse,\n// and, *if* the syntactic construct they handle is present, wrap\n// the AST node that the inner parser gave them in another node.\n\n// Parse a full expression. The optional arguments are used to\n// forbid the `in` operator (in for loops initalization expressions)\n// and provide reference for storing '=' operator inside shorthand\n// property assignment in contexts where both object expression\n// and object pattern might appear (so it's possible to raise\n// delayed syntax error at correct position).\n\npp$3.parseExpression = function(forInit, refDestructuringErrors) {\n var startPos = this.start, startLoc = this.startLoc;\n var expr = this.parseMaybeAssign(forInit, refDestructuringErrors);\n if (this.type === types.comma) {\n var node = this.startNodeAt(startPos, startLoc);\n node.expressions = [expr];\n while (this.eat(types.comma)) { node.expressions.push(this.parseMaybeAssign(forInit, refDestructuringErrors)); }\n return this.finishNode(node, \"SequenceExpression\")\n }\n return expr\n};\n\n// Parse an assignment expression. This includes applications of\n// operators like `+=`.\n\npp$3.parseMaybeAssign = function(forInit, refDestructuringErrors, afterLeftParse) {\n if (this.isContextual(\"yield\")) {\n if (this.inGenerator) { return this.parseYield(forInit) }\n // The tokenizer will assume an expression is allowed after\n // `yield`, but this isn't that kind of yield\n else { this.exprAllowed = false; }\n }\n\n var ownDestructuringErrors = false, oldParenAssign = -1, oldTrailingComma = -1;\n if (refDestructuringErrors) {\n oldParenAssign = refDestructuringErrors.parenthesizedAssign;\n oldTrailingComma = refDestructuringErrors.trailingComma;\n refDestructuringErrors.parenthesizedAssign = refDestructuringErrors.trailingComma = -1;\n } else {\n refDestructuringErrors = new DestructuringErrors;\n ownDestructuringErrors = true;\n }\n\n var startPos = this.start, startLoc = this.startLoc;\n if (this.type === types.parenL || this.type === types.name) {\n this.potentialArrowAt = this.start;\n this.potentialArrowInForAwait = forInit === \"await\";\n }\n var left = this.parseMaybeConditional(forInit, refDestructuringErrors);\n if (afterLeftParse) { left = afterLeftParse.call(this, left, startPos, startLoc); }\n if (this.type.isAssign) {\n var node = this.startNodeAt(startPos, startLoc);\n node.operator = this.value;\n if (this.type === types.eq)\n { left = this.toAssignable(left, false, refDestructuringErrors); }\n if (!ownDestructuringErrors) {\n refDestructuringErrors.parenthesizedAssign = refDestructuringErrors.trailingComma = refDestructuringErrors.doubleProto = -1;\n }\n if (refDestructuringErrors.shorthandAssign >= left.start)\n { refDestructuringErrors.shorthandAssign = -1; } // reset because shorthand default was used correctly\n if (this.type === types.eq)\n { this.checkLValPattern(left); }\n else\n { this.checkLValSimple(left); }\n node.left = left;\n this.next();\n node.right = this.parseMaybeAssign(forInit);\n return this.finishNode(node, \"AssignmentExpression\")\n } else {\n if (ownDestructuringErrors) { this.checkExpressionErrors(refDestructuringErrors, true); }\n }\n if (oldParenAssign > -1) { refDestructuringErrors.parenthesizedAssign = oldParenAssign; }\n if (oldTrailingComma > -1) { refDestructuringErrors.trailingComma = oldTrailingComma; }\n return left\n};\n\n// Parse a ternary conditional (`?:`) operator.\n\npp$3.parseMaybeConditional = function(forInit, refDestructuringErrors) {\n var startPos = this.start, startLoc = this.startLoc;\n var expr = this.parseExprOps(forInit, refDestructuringErrors);\n if (this.checkExpressionErrors(refDestructuringErrors)) { return expr }\n if (this.eat(types.question)) {\n var node = this.startNodeAt(startPos, startLoc);\n node.test = expr;\n node.consequent = this.parseMaybeAssign();\n this.expect(types.colon);\n node.alternate = this.parseMaybeAssign(forInit);\n return this.finishNode(node, \"ConditionalExpression\")\n }\n return expr\n};\n\n// Start the precedence parser.\n\npp$3.parseExprOps = function(forInit, refDestructuringErrors) {\n var startPos = this.start, startLoc = this.startLoc;\n var expr = this.parseMaybeUnary(refDestructuringErrors, false);\n if (this.checkExpressionErrors(refDestructuringErrors)) { return expr }\n return expr.start === startPos && expr.type === \"ArrowFunctionExpression\" ? expr : this.parseExprOp(expr, startPos, startLoc, -1, forInit)\n};\n\n// Parse binary operators with the operator precedence parsing\n// algorithm. `left` is the left-hand side of the operator.\n// `minPrec` provides context that allows the function to stop and\n// defer further parser to one of its callers when it encounters an\n// operator that has a lower precedence than the set it is parsing.\n\npp$3.parseExprOp = function(left, leftStartPos, leftStartLoc, minPrec, forInit) {\n var prec = this.type.binop;\n if (prec != null && (!forInit || this.type !== types._in)) {\n if (prec > minPrec) {\n var logical = this.type === types.logicalOR || this.type === types.logicalAND;\n var coalesce = this.type === types.coalesce;\n if (coalesce) {\n // Handle the precedence of `tt.coalesce` as equal to the range of logical expressions.\n // In other words, `node.right` shouldn't contain logical expressions in order to check the mixed error.\n prec = types.logicalAND.binop;\n }\n var op = this.value;\n this.next();\n var startPos = this.start, startLoc = this.startLoc;\n var right = this.parseExprOp(this.parseMaybeUnary(null, false), startPos, startLoc, prec, forInit);\n var node = this.buildBinary(leftStartPos, leftStartLoc, left, right, op, logical || coalesce);\n if ((logical && this.type === types.coalesce) || (coalesce && (this.type === types.logicalOR || this.type === types.logicalAND))) {\n this.raiseRecoverable(this.start, \"Logical expressions and coalesce expressions cannot be mixed. Wrap either by parentheses\");\n }\n return this.parseExprOp(node, leftStartPos, leftStartLoc, minPrec, forInit)\n }\n }\n return left\n};\n\npp$3.buildBinary = function(startPos, startLoc, left, right, op, logical) {\n var node = this.startNodeAt(startPos, startLoc);\n node.left = left;\n node.operator = op;\n node.right = right;\n return this.finishNode(node, logical ? \"LogicalExpression\" : \"BinaryExpression\")\n};\n\n// Parse unary operators, both prefix and postfix.\n\npp$3.parseMaybeUnary = function(refDestructuringErrors, sawUnary, incDec) {\n var startPos = this.start, startLoc = this.startLoc, expr;\n if (this.isContextual(\"await\") && this.canAwait) {\n expr = this.parseAwait();\n sawUnary = true;\n } else if (this.type.prefix) {\n var node = this.startNode(), update = this.type === types.incDec;\n node.operator = this.value;\n node.prefix = true;\n this.next();\n node.argument = this.parseMaybeUnary(null, true, update);\n this.checkExpressionErrors(refDestructuringErrors, true);\n if (update) { this.checkLValSimple(node.argument); }\n else if (this.strict && node.operator === \"delete\" &&\n node.argument.type === \"Identifier\")\n { this.raiseRecoverable(node.start, \"Deleting local variable in strict mode\"); }\n else if (node.operator === \"delete\" && isPrivateFieldAccess(node.argument))\n { this.raiseRecoverable(node.start, \"Private fields can not be deleted\"); }\n else { sawUnary = true; }\n expr = this.finishNode(node, update ? \"UpdateExpression\" : \"UnaryExpression\");\n } else {\n expr = this.parseExprSubscripts(refDestructuringErrors);\n if (this.checkExpressionErrors(refDestructuringErrors)) { return expr }\n while (this.type.postfix && !this.canInsertSemicolon()) {\n var node$1 = this.startNodeAt(startPos, startLoc);\n node$1.operator = this.value;\n node$1.prefix = false;\n node$1.argument = expr;\n this.checkLValSimple(expr);\n this.next();\n expr = this.finishNode(node$1, \"UpdateExpression\");\n }\n }\n\n if (!incDec && this.eat(types.starstar)) {\n if (sawUnary)\n { this.unexpected(this.lastTokStart); }\n else\n { return this.buildBinary(startPos, startLoc, expr, this.parseMaybeUnary(null, false), \"**\", false) }\n } else {\n return expr\n }\n};\n\nfunction isPrivateFieldAccess(node) {\n return (\n node.type === \"MemberExpression\" && node.property.type === \"PrivateIdentifier\" ||\n node.type === \"ChainExpression\" && isPrivateFieldAccess(node.expression)\n )\n}\n\n// Parse call, dot, and `[]`-subscript expressions.\n\npp$3.parseExprSubscripts = function(refDestructuringErrors) {\n var startPos = this.start, startLoc = this.startLoc;\n var expr = this.parseExprAtom(refDestructuringErrors);\n if (expr.type === \"ArrowFunctionExpression\" && this.input.slice(this.lastTokStart, this.lastTokEnd) !== \")\")\n { return expr }\n var result = this.parseSubscripts(expr, startPos, startLoc);\n if (refDestructuringErrors && result.type === \"MemberExpression\") {\n if (refDestructuringErrors.parenthesizedAssign >= result.start) { refDestructuringErrors.parenthesizedAssign = -1; }\n if (refDestructuringErrors.parenthesizedBind >= result.start) { refDestructuringErrors.parenthesizedBind = -1; }\n if (refDestructuringErrors.trailingComma >= result.start) { refDestructuringErrors.trailingComma = -1; }\n }\n return result\n};\n\npp$3.parseSubscripts = function(base, startPos, startLoc, noCalls) {\n var maybeAsyncArrow = this.options.ecmaVersion >= 8 && base.type === \"Identifier\" && base.name === \"async\" &&\n this.lastTokEnd === base.end && !this.canInsertSemicolon() && base.end - base.start === 5 &&\n this.potentialArrowAt === base.start;\n var optionalChained = false;\n\n while (true) {\n var element = this.parseSubscript(base, startPos, startLoc, noCalls, maybeAsyncArrow, optionalChained);\n\n if (element.optional) { optionalChained = true; }\n if (element === base || element.type === \"ArrowFunctionExpression\") {\n if (optionalChained) {\n var chainNode = this.startNodeAt(startPos, startLoc);\n chainNode.expression = element;\n element = this.finishNode(chainNode, \"ChainExpression\");\n }\n return element\n }\n\n base = element;\n }\n};\n\npp$3.parseSubscript = function(base, startPos, startLoc, noCalls, maybeAsyncArrow, optionalChained) {\n var optionalSupported = this.options.ecmaVersion >= 11;\n var optional = optionalSupported && this.eat(types.questionDot);\n if (noCalls && optional) { this.raise(this.lastTokStart, \"Optional chaining cannot appear in the callee of new expressions\"); }\n\n var computed = this.eat(types.bracketL);\n if (computed || (optional && this.type !== types.parenL && this.type !== types.backQuote) || this.eat(types.dot)) {\n var node = this.startNodeAt(startPos, startLoc);\n node.object = base;\n if (computed) {\n node.property = this.parseExpression();\n this.expect(types.bracketR);\n } else if (this.type === types.privateId && base.type !== \"Super\") {\n node.property = this.parsePrivateIdent();\n } else {\n node.property = this.parseIdent(this.options.allowReserved !== \"never\");\n }\n node.computed = !!computed;\n if (optionalSupported) {\n node.optional = optional;\n }\n base = this.finishNode(node, \"MemberExpression\");\n } else if (!noCalls && this.eat(types.parenL)) {\n var refDestructuringErrors = new DestructuringErrors, oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, oldAwaitIdentPos = this.awaitIdentPos;\n this.yieldPos = 0;\n this.awaitPos = 0;\n this.awaitIdentPos = 0;\n var exprList = this.parseExprList(types.parenR, this.options.ecmaVersion >= 8, false, refDestructuringErrors);\n if (maybeAsyncArrow && !optional && !this.canInsertSemicolon() && this.eat(types.arrow)) {\n this.checkPatternErrors(refDestructuringErrors, false);\n this.checkYieldAwaitInDefaultParams();\n if (this.awaitIdentPos > 0)\n { this.raise(this.awaitIdentPos, \"Cannot use 'await' as identifier inside an async function\"); }\n this.yieldPos = oldYieldPos;\n this.awaitPos = oldAwaitPos;\n this.awaitIdentPos = oldAwaitIdentPos;\n return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), exprList, true)\n }\n this.checkExpressionErrors(refDestructuringErrors, true);\n this.yieldPos = oldYieldPos || this.yieldPos;\n this.awaitPos = oldAwaitPos || this.awaitPos;\n this.awaitIdentPos = oldAwaitIdentPos || this.awaitIdentPos;\n var node$1 = this.startNodeAt(startPos, startLoc);\n node$1.callee = base;\n node$1.arguments = exprList;\n if (optionalSupported) {\n node$1.optional = optional;\n }\n base = this.finishNode(node$1, \"CallExpression\");\n } else if (this.type === types.backQuote) {\n if (optional || optionalChained) {\n this.raise(this.start, \"Optional chaining cannot appear in the tag of tagged template expressions\");\n }\n var node$2 = this.startNodeAt(startPos, startLoc);\n node$2.tag = base;\n node$2.quasi = this.parseTemplate({isTagged: true});\n base = this.finishNode(node$2, \"TaggedTemplateExpression\");\n }\n return base\n};\n\n// Parse an atomic expression — either a single token that is an\n// expression, an expression started by a keyword like `function` or\n// `new`, or an expression wrapped in punctuation like `()`, `[]`,\n// or `{}`.\n\npp$3.parseExprAtom = function(refDestructuringErrors) {\n // If a division operator appears in an expression position, the\n // tokenizer got confused, and we force it to read a regexp instead.\n if (this.type === types.slash) { this.readRegexp(); }\n\n var node, canBeArrow = this.potentialArrowAt === this.start;\n switch (this.type) {\n case types._super:\n if (!this.allowSuper)\n { this.raise(this.start, \"'super' keyword outside a method\"); }\n node = this.startNode();\n this.next();\n if (this.type === types.parenL && !this.allowDirectSuper)\n { this.raise(node.start, \"super() call outside constructor of a subclass\"); }\n // The `super` keyword can appear at below:\n // SuperProperty:\n // super [ Expression ]\n // super . IdentifierName\n // SuperCall:\n // super ( Arguments )\n if (this.type !== types.dot && this.type !== types.bracketL && this.type !== types.parenL)\n { this.unexpected(); }\n return this.finishNode(node, \"Super\")\n\n case types._this:\n node = this.startNode();\n this.next();\n return this.finishNode(node, \"ThisExpression\")\n\n case types.name:\n var startPos = this.start, startLoc = this.startLoc, containsEsc = this.containsEsc;\n var id = this.parseIdent(false);\n if (this.options.ecmaVersion >= 8 && !containsEsc && id.name === \"async\" && !this.canInsertSemicolon() && this.eat(types._function))\n { return this.parseFunction(this.startNodeAt(startPos, startLoc), 0, false, true) }\n if (canBeArrow && !this.canInsertSemicolon()) {\n if (this.eat(types.arrow))\n { return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), [id], false) }\n if (this.options.ecmaVersion >= 8 && id.name === \"async\" && this.type === types.name && !containsEsc &&\n (!this.potentialArrowInForAwait || this.value !== \"of\" || this.containsEsc)) {\n id = this.parseIdent(false);\n if (this.canInsertSemicolon() || !this.eat(types.arrow))\n { this.unexpected(); }\n return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), [id], true)\n }\n }\n return id\n\n case types.regexp:\n var value = this.value;\n node = this.parseLiteral(value.value);\n node.regex = {pattern: value.pattern, flags: value.flags};\n return node\n\n case types.num: case types.string:\n return this.parseLiteral(this.value)\n\n case types._null: case types._true: case types._false:\n node = this.startNode();\n node.value = this.type === types._null ? null : this.type === types._true;\n node.raw = this.type.keyword;\n this.next();\n return this.finishNode(node, \"Literal\")\n\n case types.parenL:\n var start = this.start, expr = this.parseParenAndDistinguishExpression(canBeArrow);\n if (refDestructuringErrors) {\n if (refDestructuringErrors.parenthesizedAssign < 0 && !this.isSimpleAssignTarget(expr))\n { refDestructuringErrors.parenthesizedAssign = start; }\n if (refDestructuringErrors.parenthesizedBind < 0)\n { refDestructuringErrors.parenthesizedBind = start; }\n }\n return expr\n\n case types.bracketL:\n node = this.startNode();\n this.next();\n node.elements = this.parseExprList(types.bracketR, true, true, refDestructuringErrors);\n return this.finishNode(node, \"ArrayExpression\")\n\n case types.braceL:\n return this.parseObj(false, refDestructuringErrors)\n\n case types._function:\n node = this.startNode();\n this.next();\n return this.parseFunction(node, 0)\n\n case types._class:\n return this.parseClass(this.startNode(), false)\n\n case types._new:\n return this.parseNew()\n\n case types.backQuote:\n return this.parseTemplate()\n\n case types._import:\n if (this.options.ecmaVersion >= 11) {\n return this.parseExprImport()\n } else {\n return this.unexpected()\n }\n\n default:\n this.unexpected();\n }\n};\n\npp$3.parseExprImport = function() {\n var node = this.startNode();\n\n // Consume `import` as an identifier for `import.meta`.\n // Because `this.parseIdent(true)` doesn't check escape sequences, it needs the check of `this.containsEsc`.\n if (this.containsEsc) { this.raiseRecoverable(this.start, \"Escape sequence in keyword import\"); }\n var meta = this.parseIdent(true);\n\n switch (this.type) {\n case types.parenL:\n return this.parseDynamicImport(node)\n case types.dot:\n node.meta = meta;\n return this.parseImportMeta(node)\n default:\n this.unexpected();\n }\n};\n\npp$3.parseDynamicImport = function(node) {\n this.next(); // skip `(`\n\n // Parse node.source.\n node.source = this.parseMaybeAssign();\n\n // Verify ending.\n if (!this.eat(types.parenR)) {\n var errorPos = this.start;\n if (this.eat(types.comma) && this.eat(types.parenR)) {\n this.raiseRecoverable(errorPos, \"Trailing comma is not allowed in import()\");\n } else {\n this.unexpected(errorPos);\n }\n }\n\n return this.finishNode(node, \"ImportExpression\")\n};\n\npp$3.parseImportMeta = function(node) {\n this.next(); // skip `.`\n\n var containsEsc = this.containsEsc;\n node.property = this.parseIdent(true);\n\n if (node.property.name !== \"meta\")\n { this.raiseRecoverable(node.property.start, \"The only valid meta property for import is 'import.meta'\"); }\n if (containsEsc)\n { this.raiseRecoverable(node.start, \"'import.meta' must not contain escaped characters\"); }\n if (this.options.sourceType !== \"module\" && !this.options.allowImportExportEverywhere)\n { this.raiseRecoverable(node.start, \"Cannot use 'import.meta' outside a module\"); }\n\n return this.finishNode(node, \"MetaProperty\")\n};\n\npp$3.parseLiteral = function(value) {\n var node = this.startNode();\n node.value = value;\n node.raw = this.input.slice(this.start, this.end);\n if (node.raw.charCodeAt(node.raw.length - 1) === 110) { node.bigint = node.raw.slice(0, -1).replace(/_/g, \"\"); }\n this.next();\n return this.finishNode(node, \"Literal\")\n};\n\npp$3.parseParenExpression = function() {\n this.expect(types.parenL);\n var val = this.parseExpression();\n this.expect(types.parenR);\n return val\n};\n\npp$3.parseParenAndDistinguishExpression = function(canBeArrow) {\n var startPos = this.start, startLoc = this.startLoc, val, allowTrailingComma = this.options.ecmaVersion >= 8;\n if (this.options.ecmaVersion >= 6) {\n this.next();\n\n var innerStartPos = this.start, innerStartLoc = this.startLoc;\n var exprList = [], first = true, lastIsComma = false;\n var refDestructuringErrors = new DestructuringErrors, oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, spreadStart;\n this.yieldPos = 0;\n this.awaitPos = 0;\n // Do not save awaitIdentPos to allow checking awaits nested in parameters\n while (this.type !== types.parenR) {\n first ? first = false : this.expect(types.comma);\n if (allowTrailingComma && this.afterTrailingComma(types.parenR, true)) {\n lastIsComma = true;\n break\n } else if (this.type === types.ellipsis) {\n spreadStart = this.start;\n exprList.push(this.parseParenItem(this.parseRestBinding()));\n if (this.type === types.comma) { this.raise(this.start, \"Comma is not permitted after the rest element\"); }\n break\n } else {\n exprList.push(this.parseMaybeAssign(false, refDestructuringErrors, this.parseParenItem));\n }\n }\n var innerEndPos = this.start, innerEndLoc = this.startLoc;\n this.expect(types.parenR);\n\n if (canBeArrow && !this.canInsertSemicolon() && this.eat(types.arrow)) {\n this.checkPatternErrors(refDestructuringErrors, false);\n this.checkYieldAwaitInDefaultParams();\n this.yieldPos = oldYieldPos;\n this.awaitPos = oldAwaitPos;\n return this.parseParenArrowList(startPos, startLoc, exprList)\n }\n\n if (!exprList.length || lastIsComma) { this.unexpected(this.lastTokStart); }\n if (spreadStart) { this.unexpected(spreadStart); }\n this.checkExpressionErrors(refDestructuringErrors, true);\n this.yieldPos = oldYieldPos || this.yieldPos;\n this.awaitPos = oldAwaitPos || this.awaitPos;\n\n if (exprList.length > 1) {\n val = this.startNodeAt(innerStartPos, innerStartLoc);\n val.expressions = exprList;\n this.finishNodeAt(val, \"SequenceExpression\", innerEndPos, innerEndLoc);\n } else {\n val = exprList[0];\n }\n } else {\n val = this.parseParenExpression();\n }\n\n if (this.options.preserveParens) {\n var par = this.startNodeAt(startPos, startLoc);\n par.expression = val;\n return this.finishNode(par, \"ParenthesizedExpression\")\n } else {\n return val\n }\n};\n\npp$3.parseParenItem = function(item) {\n return item\n};\n\npp$3.parseParenArrowList = function(startPos, startLoc, exprList) {\n return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), exprList)\n};\n\n// New's precedence is slightly tricky. It must allow its argument to\n// be a `[]` or dot subscript expression, but not a call — at least,\n// not without wrapping it in parentheses. Thus, it uses the noCalls\n// argument to parseSubscripts to prevent it from consuming the\n// argument list.\n\nvar empty$1 = [];\n\npp$3.parseNew = function() {\n if (this.containsEsc) { this.raiseRecoverable(this.start, \"Escape sequence in keyword new\"); }\n var node = this.startNode();\n var meta = this.parseIdent(true);\n if (this.options.ecmaVersion >= 6 && this.eat(types.dot)) {\n node.meta = meta;\n var containsEsc = this.containsEsc;\n node.property = this.parseIdent(true);\n if (node.property.name !== \"target\")\n { this.raiseRecoverable(node.property.start, \"The only valid meta property for new is 'new.target'\"); }\n if (containsEsc)\n { this.raiseRecoverable(node.start, \"'new.target' must not contain escaped characters\"); }\n if (!this.inNonArrowFunction)\n { this.raiseRecoverable(node.start, \"'new.target' can only be used in functions\"); }\n return this.finishNode(node, \"MetaProperty\")\n }\n var startPos = this.start, startLoc = this.startLoc, isImport = this.type === types._import;\n node.callee = this.parseSubscripts(this.parseExprAtom(), startPos, startLoc, true);\n if (isImport && node.callee.type === \"ImportExpression\") {\n this.raise(startPos, \"Cannot use new with import()\");\n }\n if (this.eat(types.parenL)) { node.arguments = this.parseExprList(types.parenR, this.options.ecmaVersion >= 8, false); }\n else { node.arguments = empty$1; }\n return this.finishNode(node, \"NewExpression\")\n};\n\n// Parse template expression.\n\npp$3.parseTemplateElement = function(ref) {\n var isTagged = ref.isTagged;\n\n var elem = this.startNode();\n if (this.type === types.invalidTemplate) {\n if (!isTagged) {\n this.raiseRecoverable(this.start, \"Bad escape sequence in untagged template literal\");\n }\n elem.value = {\n raw: this.value,\n cooked: null\n };\n } else {\n elem.value = {\n raw: this.input.slice(this.start, this.end).replace(/\\r\\n?/g, \"\\n\"),\n cooked: this.value\n };\n }\n this.next();\n elem.tail = this.type === types.backQuote;\n return this.finishNode(elem, \"TemplateElement\")\n};\n\npp$3.parseTemplate = function(ref) {\n if ( ref === void 0 ) ref = {};\n var isTagged = ref.isTagged; if ( isTagged === void 0 ) isTagged = false;\n\n var node = this.startNode();\n this.next();\n node.expressions = [];\n var curElt = this.parseTemplateElement({isTagged: isTagged});\n node.quasis = [curElt];\n while (!curElt.tail) {\n if (this.type === types.eof) { this.raise(this.pos, \"Unterminated template literal\"); }\n this.expect(types.dollarBraceL);\n node.expressions.push(this.parseExpression());\n this.expect(types.braceR);\n node.quasis.push(curElt = this.parseTemplateElement({isTagged: isTagged}));\n }\n this.next();\n return this.finishNode(node, \"TemplateLiteral\")\n};\n\npp$3.isAsyncProp = function(prop) {\n return !prop.computed && prop.key.type === \"Identifier\" && prop.key.name === \"async\" &&\n (this.type === types.name || this.type === types.num || this.type === types.string || this.type === types.bracketL || this.type.keyword || (this.options.ecmaVersion >= 9 && this.type === types.star)) &&\n !lineBreak.test(this.input.slice(this.lastTokEnd, this.start))\n};\n\n// Parse an object literal or binding pattern.\n\npp$3.parseObj = function(isPattern, refDestructuringErrors) {\n var node = this.startNode(), first = true, propHash = {};\n node.properties = [];\n this.next();\n while (!this.eat(types.braceR)) {\n if (!first) {\n this.expect(types.comma);\n if (this.options.ecmaVersion >= 5 && this.afterTrailingComma(types.braceR)) { break }\n } else { first = false; }\n\n var prop = this.parseProperty(isPattern, refDestructuringErrors);\n if (!isPattern) { this.checkPropClash(prop, propHash, refDestructuringErrors); }\n node.properties.push(prop);\n }\n return this.finishNode(node, isPattern ? \"ObjectPattern\" : \"ObjectExpression\")\n};\n\npp$3.parseProperty = function(isPattern, refDestructuringErrors) {\n var prop = this.startNode(), isGenerator, isAsync, startPos, startLoc;\n if (this.options.ecmaVersion >= 9 && this.eat(types.ellipsis)) {\n if (isPattern) {\n prop.argument = this.parseIdent(false);\n if (this.type === types.comma) {\n this.raise(this.start, \"Comma is not permitted after the rest element\");\n }\n return this.finishNode(prop, \"RestElement\")\n }\n // To disallow parenthesized identifier via `this.toAssignable()`.\n if (this.type === types.parenL && refDestructuringErrors) {\n if (refDestructuringErrors.parenthesizedAssign < 0) {\n refDestructuringErrors.parenthesizedAssign = this.start;\n }\n if (refDestructuringErrors.parenthesizedBind < 0) {\n refDestructuringErrors.parenthesizedBind = this.start;\n }\n }\n // Parse argument.\n prop.argument = this.parseMaybeAssign(false, refDestructuringErrors);\n // To disallow trailing comma via `this.toAssignable()`.\n if (this.type === types.comma && refDestructuringErrors && refDestructuringErrors.trailingComma < 0) {\n refDestructuringErrors.trailingComma = this.start;\n }\n // Finish\n return this.finishNode(prop, \"SpreadElement\")\n }\n if (this.options.ecmaVersion >= 6) {\n prop.method = false;\n prop.shorthand = false;\n if (isPattern || refDestructuringErrors) {\n startPos = this.start;\n startLoc = this.startLoc;\n }\n if (!isPattern)\n { isGenerator = this.eat(types.star); }\n }\n var containsEsc = this.containsEsc;\n this.parsePropertyName(prop);\n if (!isPattern && !containsEsc && this.options.ecmaVersion >= 8 && !isGenerator && this.isAsyncProp(prop)) {\n isAsync = true;\n isGenerator = this.options.ecmaVersion >= 9 && this.eat(types.star);\n this.parsePropertyName(prop, refDestructuringErrors);\n } else {\n isAsync = false;\n }\n this.parsePropertyValue(prop, isPattern, isGenerator, isAsync, startPos, startLoc, refDestructuringErrors, containsEsc);\n return this.finishNode(prop, \"Property\")\n};\n\npp$3.parsePropertyValue = function(prop, isPattern, isGenerator, isAsync, startPos, startLoc, refDestructuringErrors, containsEsc) {\n if ((isGenerator || isAsync) && this.type === types.colon)\n { this.unexpected(); }\n\n if (this.eat(types.colon)) {\n prop.value = isPattern ? this.parseMaybeDefault(this.start, this.startLoc) : this.parseMaybeAssign(false, refDestructuringErrors);\n prop.kind = \"init\";\n } else if (this.options.ecmaVersion >= 6 && this.type === types.parenL) {\n if (isPattern) { this.unexpected(); }\n prop.kind = \"init\";\n prop.method = true;\n prop.value = this.parseMethod(isGenerator, isAsync);\n } else if (!isPattern && !containsEsc &&\n this.options.ecmaVersion >= 5 && !prop.computed && prop.key.type === \"Identifier\" &&\n (prop.key.name === \"get\" || prop.key.name === \"set\") &&\n (this.type !== types.comma && this.type !== types.braceR && this.type !== types.eq)) {\n if (isGenerator || isAsync) { this.unexpected(); }\n prop.kind = prop.key.name;\n this.parsePropertyName(prop);\n prop.value = this.parseMethod(false);\n var paramCount = prop.kind === \"get\" ? 0 : 1;\n if (prop.value.params.length !== paramCount) {\n var start = prop.value.start;\n if (prop.kind === \"get\")\n { this.raiseRecoverable(start, \"getter should have no params\"); }\n else\n { this.raiseRecoverable(start, \"setter should have exactly one param\"); }\n } else {\n if (prop.kind === \"set\" && prop.value.params[0].type === \"RestElement\")\n { this.raiseRecoverable(prop.value.params[0].start, \"Setter cannot use rest params\"); }\n }\n } else if (this.options.ecmaVersion >= 6 && !prop.computed && prop.key.type === \"Identifier\") {\n if (isGenerator || isAsync) { this.unexpected(); }\n this.checkUnreserved(prop.key);\n if (prop.key.name === \"await\" && !this.awaitIdentPos)\n { this.awaitIdentPos = startPos; }\n prop.kind = \"init\";\n if (isPattern) {\n prop.value = this.parseMaybeDefault(startPos, startLoc, this.copyNode(prop.key));\n } else if (this.type === types.eq && refDestructuringErrors) {\n if (refDestructuringErrors.shorthandAssign < 0)\n { refDestructuringErrors.shorthandAssign = this.start; }\n prop.value = this.parseMaybeDefault(startPos, startLoc, this.copyNode(prop.key));\n } else {\n prop.value = this.copyNode(prop.key);\n }\n prop.shorthand = true;\n } else { this.unexpected(); }\n};\n\npp$3.parsePropertyName = function(prop) {\n if (this.options.ecmaVersion >= 6) {\n if (this.eat(types.bracketL)) {\n prop.computed = true;\n prop.key = this.parseMaybeAssign();\n this.expect(types.bracketR);\n return prop.key\n } else {\n prop.computed = false;\n }\n }\n return prop.key = this.type === types.num || this.type === types.string ? this.parseExprAtom() : this.parseIdent(this.options.allowReserved !== \"never\")\n};\n\n// Initialize empty function node.\n\npp$3.initFunction = function(node) {\n node.id = null;\n if (this.options.ecmaVersion >= 6) { node.generator = node.expression = false; }\n if (this.options.ecmaVersion >= 8) { node.async = false; }\n};\n\n// Parse object or class method.\n\npp$3.parseMethod = function(isGenerator, isAsync, allowDirectSuper) {\n var node = this.startNode(), oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, oldAwaitIdentPos = this.awaitIdentPos;\n\n this.initFunction(node);\n if (this.options.ecmaVersion >= 6)\n { node.generator = isGenerator; }\n if (this.options.ecmaVersion >= 8)\n { node.async = !!isAsync; }\n\n this.yieldPos = 0;\n this.awaitPos = 0;\n this.awaitIdentPos = 0;\n this.enterScope(functionFlags(isAsync, node.generator) | SCOPE_SUPER | (allowDirectSuper ? SCOPE_DIRECT_SUPER : 0));\n\n this.expect(types.parenL);\n node.params = this.parseBindingList(types.parenR, false, this.options.ecmaVersion >= 8);\n this.checkYieldAwaitInDefaultParams();\n this.parseFunctionBody(node, false, true);\n\n this.yieldPos = oldYieldPos;\n this.awaitPos = oldAwaitPos;\n this.awaitIdentPos = oldAwaitIdentPos;\n return this.finishNode(node, \"FunctionExpression\")\n};\n\n// Parse arrow function expression with given parameters.\n\npp$3.parseArrowExpression = function(node, params, isAsync) {\n var oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, oldAwaitIdentPos = this.awaitIdentPos;\n\n this.enterScope(functionFlags(isAsync, false) | SCOPE_ARROW);\n this.initFunction(node);\n if (this.options.ecmaVersion >= 8) { node.async = !!isAsync; }\n\n this.yieldPos = 0;\n this.awaitPos = 0;\n this.awaitIdentPos = 0;\n\n node.params = this.toAssignableList(params, true);\n this.parseFunctionBody(node, true, false);\n\n this.yieldPos = oldYieldPos;\n this.awaitPos = oldAwaitPos;\n this.awaitIdentPos = oldAwaitIdentPos;\n return this.finishNode(node, \"ArrowFunctionExpression\")\n};\n\n// Parse function body and check parameters.\n\npp$3.parseFunctionBody = function(node, isArrowFunction, isMethod) {\n var isExpression = isArrowFunction && this.type !== types.braceL;\n var oldStrict = this.strict, useStrict = false;\n\n if (isExpression) {\n node.body = this.parseMaybeAssign();\n node.expression = true;\n this.checkParams(node, false);\n } else {\n var nonSimple = this.options.ecmaVersion >= 7 && !this.isSimpleParamList(node.params);\n if (!oldStrict || nonSimple) {\n useStrict = this.strictDirective(this.end);\n // If this is a strict mode function, verify that argument names\n // are not repeated, and it does not try to bind the words `eval`\n // or `arguments`.\n if (useStrict && nonSimple)\n { this.raiseRecoverable(node.start, \"Illegal 'use strict' directive in function with non-simple parameter list\"); }\n }\n // Start a new scope with regard to labels and the `inFunction`\n // flag (restore them to their old value afterwards).\n var oldLabels = this.labels;\n this.labels = [];\n if (useStrict) { this.strict = true; }\n\n // Add the params to varDeclaredNames to ensure that an error is thrown\n // if a let/const declaration in the function clashes with one of the params.\n this.checkParams(node, !oldStrict && !useStrict && !isArrowFunction && !isMethod && this.isSimpleParamList(node.params));\n // Ensure the function name isn't a forbidden identifier in strict mode, e.g. 'eval'\n if (this.strict && node.id) { this.checkLValSimple(node.id, BIND_OUTSIDE); }\n node.body = this.parseBlock(false, undefined, useStrict && !oldStrict);\n node.expression = false;\n this.adaptDirectivePrologue(node.body.body);\n this.labels = oldLabels;\n }\n this.exitScope();\n};\n\npp$3.isSimpleParamList = function(params) {\n for (var i = 0, list = params; i < list.length; i += 1)\n {\n var param = list[i];\n\n if (param.type !== \"Identifier\") { return false\n } }\n return true\n};\n\n// Checks function params for various disallowed patterns such as using \"eval\"\n// or \"arguments\" and duplicate parameters.\n\npp$3.checkParams = function(node, allowDuplicates) {\n var nameHash = Object.create(null);\n for (var i = 0, list = node.params; i < list.length; i += 1)\n {\n var param = list[i];\n\n this.checkLValInnerPattern(param, BIND_VAR, allowDuplicates ? null : nameHash);\n }\n};\n\n// Parses a comma-separated list of expressions, and returns them as\n// an array. `close` is the token type that ends the list, and\n// `allowEmpty` can be turned on to allow subsequent commas with\n// nothing in between them to be parsed as `null` (which is needed\n// for array literals).\n\npp$3.parseExprList = function(close, allowTrailingComma, allowEmpty, refDestructuringErrors) {\n var elts = [], first = true;\n while (!this.eat(close)) {\n if (!first) {\n this.expect(types.comma);\n if (allowTrailingComma && this.afterTrailingComma(close)) { break }\n } else { first = false; }\n\n var elt = (void 0);\n if (allowEmpty && this.type === types.comma)\n { elt = null; }\n else if (this.type === types.ellipsis) {\n elt = this.parseSpread(refDestructuringErrors);\n if (refDestructuringErrors && this.type === types.comma && refDestructuringErrors.trailingComma < 0)\n { refDestructuringErrors.trailingComma = this.start; }\n } else {\n elt = this.parseMaybeAssign(false, refDestructuringErrors);\n }\n elts.push(elt);\n }\n return elts\n};\n\npp$3.checkUnreserved = function(ref) {\n var start = ref.start;\n var end = ref.end;\n var name = ref.name;\n\n if (this.inGenerator && name === \"yield\")\n { this.raiseRecoverable(start, \"Cannot use 'yield' as identifier inside a generator\"); }\n if (this.inAsync && name === \"await\")\n { this.raiseRecoverable(start, \"Cannot use 'await' as identifier inside an async function\"); }\n if (this.currentThisScope().inClassFieldInit && name === \"arguments\")\n { this.raiseRecoverable(start, \"Cannot use 'arguments' in class field initializer\"); }\n if (this.keywords.test(name))\n { this.raise(start, (\"Unexpected keyword '\" + name + \"'\")); }\n if (this.options.ecmaVersion < 6 &&\n this.input.slice(start, end).indexOf(\"\\\\\") !== -1) { return }\n var re = this.strict ? this.reservedWordsStrict : this.reservedWords;\n if (re.test(name)) {\n if (!this.inAsync && name === \"await\")\n { this.raiseRecoverable(start, \"Cannot use keyword 'await' outside an async function\"); }\n this.raiseRecoverable(start, (\"The keyword '\" + name + \"' is reserved\"));\n }\n};\n\n// Parse the next token as an identifier. If `liberal` is true (used\n// when parsing properties), it will also convert keywords into\n// identifiers.\n\npp$3.parseIdent = function(liberal, isBinding) {\n var node = this.startNode();\n if (this.type === types.name) {\n node.name = this.value;\n } else if (this.type.keyword) {\n node.name = this.type.keyword;\n\n // To fix https://github.com/acornjs/acorn/issues/575\n // `class` and `function` keywords push new context into this.context.\n // But there is no chance to pop the context if the keyword is consumed as an identifier such as a property name.\n // If the previous token is a dot, this does not apply because the context-managing code already ignored the keyword\n if ((node.name === \"class\" || node.name === \"function\") &&\n (this.lastTokEnd !== this.lastTokStart + 1 || this.input.charCodeAt(this.lastTokStart) !== 46)) {\n this.context.pop();\n }\n } else {\n this.unexpected();\n }\n this.next(!!liberal);\n this.finishNode(node, \"Identifier\");\n if (!liberal) {\n this.checkUnreserved(node);\n if (node.name === \"await\" && !this.awaitIdentPos)\n { this.awaitIdentPos = node.start; }\n }\n return node\n};\n\npp$3.parsePrivateIdent = function() {\n var node = this.startNode();\n if (this.type === types.privateId) {\n node.name = this.value;\n } else {\n this.unexpected();\n }\n this.next();\n this.finishNode(node, \"PrivateIdentifier\");\n\n // For validating existence\n if (this.privateNameStack.length === 0) {\n this.raise(node.start, (\"Private field '#\" + (node.name) + \"' must be declared in an enclosing class\"));\n } else {\n this.privateNameStack[this.privateNameStack.length - 1].used.push(node);\n }\n\n return node\n};\n\n// Parses yield expression inside generator.\n\npp$3.parseYield = function(forInit) {\n if (!this.yieldPos) { this.yieldPos = this.start; }\n\n var node = this.startNode();\n this.next();\n if (this.type === types.semi || this.canInsertSemicolon() || (this.type !== types.star && !this.type.startsExpr)) {\n node.delegate = false;\n node.argument = null;\n } else {\n node.delegate = this.eat(types.star);\n node.argument = this.parseMaybeAssign(forInit);\n }\n return this.finishNode(node, \"YieldExpression\")\n};\n\npp$3.parseAwait = function() {\n if (!this.awaitPos) { this.awaitPos = this.start; }\n\n var node = this.startNode();\n this.next();\n node.argument = this.parseMaybeUnary(null, true);\n return this.finishNode(node, \"AwaitExpression\")\n};\n\nvar pp$4 = Parser.prototype;\n\n// This function is used to raise exceptions on parse errors. It\n// takes an offset integer (into the current `input`) to indicate\n// the location of the error, attaches the position to the end\n// of the error message, and then raises a `SyntaxError` with that\n// message.\n\npp$4.raise = function(pos, message) {\n var loc = getLineInfo(this.input, pos);\n message += \" (\" + loc.line + \":\" + loc.column + \")\";\n var err = new SyntaxError(message);\n err.pos = pos; err.loc = loc; err.raisedAt = this.pos;\n throw err\n};\n\npp$4.raiseRecoverable = pp$4.raise;\n\npp$4.curPosition = function() {\n if (this.options.locations) {\n return new Position(this.curLine, this.pos - this.lineStart)\n }\n};\n\nvar pp$5 = Parser.prototype;\n\nvar Scope = function Scope(flags) {\n this.flags = flags;\n // A list of var-declared names in the current lexical scope\n this.var = [];\n // A list of lexically-declared names in the current lexical scope\n this.lexical = [];\n // A list of lexically-declared FunctionDeclaration names in the current lexical scope\n this.functions = [];\n // A switch to disallow the identifier reference 'arguments'\n this.inClassFieldInit = false;\n};\n\n// The functions in this module keep track of declared variables in the current scope in order to detect duplicate variable names.\n\npp$5.enterScope = function(flags) {\n this.scopeStack.push(new Scope(flags));\n};\n\npp$5.exitScope = function() {\n this.scopeStack.pop();\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.\npp$5.treatFunctionsAsVarInScope = function(scope) {\n return (scope.flags & SCOPE_FUNCTION) || !this.inModule && (scope.flags & SCOPE_TOP)\n};\n\npp$5.declareName = function(name, bindingType, pos) {\n var redeclared = false;\n if (bindingType === BIND_LEXICAL) {\n var scope = this.currentScope();\n redeclared = scope.lexical.indexOf(name) > -1 || scope.functions.indexOf(name) > -1 || scope.var.indexOf(name) > -1;\n scope.lexical.push(name);\n if (this.inModule && (scope.flags & SCOPE_TOP))\n { delete this.undefinedExports[name]; }\n } else if (bindingType === BIND_SIMPLE_CATCH) {\n var scope$1 = this.currentScope();\n scope$1.lexical.push(name);\n } else if (bindingType === BIND_FUNCTION) {\n var scope$2 = this.currentScope();\n if (this.treatFunctionsAsVar)\n { redeclared = scope$2.lexical.indexOf(name) > -1; }\n else\n { redeclared = scope$2.lexical.indexOf(name) > -1 || scope$2.var.indexOf(name) > -1; }\n scope$2.functions.push(name);\n } else {\n for (var i = this.scopeStack.length - 1; i >= 0; --i) {\n var scope$3 = this.scopeStack[i];\n if (scope$3.lexical.indexOf(name) > -1 && !((scope$3.flags & SCOPE_SIMPLE_CATCH) && scope$3.lexical[0] === name) ||\n !this.treatFunctionsAsVarInScope(scope$3) && scope$3.functions.indexOf(name) > -1) {\n redeclared = true;\n break\n }\n scope$3.var.push(name);\n if (this.inModule && (scope$3.flags & SCOPE_TOP))\n { delete this.undefinedExports[name]; }\n if (scope$3.flags & SCOPE_VAR) { break }\n }\n }\n if (redeclared) { this.raiseRecoverable(pos, (\"Identifier '\" + name + \"' has already been declared\")); }\n};\n\npp$5.checkLocalExport = function(id) {\n // scope.functions must be empty as Module code is always strict.\n if (this.scopeStack[0].lexical.indexOf(id.name) === -1 &&\n this.scopeStack[0].var.indexOf(id.name) === -1) {\n this.undefinedExports[id.name] = id;\n }\n};\n\npp$5.currentScope = function() {\n return this.scopeStack[this.scopeStack.length - 1]\n};\n\npp$5.currentVarScope = function() {\n for (var i = this.scopeStack.length - 1;; i--) {\n var scope = this.scopeStack[i];\n if (scope.flags & SCOPE_VAR) { return scope }\n }\n};\n\n// Could be useful for `this`, `new.target`, `super()`, `super.property`, and `super[property]`.\npp$5.currentThisScope = function() {\n for (var i = this.scopeStack.length - 1;; i--) {\n var scope = this.scopeStack[i];\n if (scope.flags & SCOPE_VAR && !(scope.flags & SCOPE_ARROW)) { return scope }\n }\n};\n\nvar Node = function Node(parser, pos, loc) {\n this.type = \"\";\n this.start = pos;\n this.end = 0;\n if (parser.options.locations)\n { this.loc = new SourceLocation(parser, loc); }\n if (parser.options.directSourceFile)\n { this.sourceFile = parser.options.directSourceFile; }\n if (parser.options.ranges)\n { this.range = [pos, 0]; }\n};\n\n// Start an AST node, attaching a start offset.\n\nvar pp$6 = Parser.prototype;\n\npp$6.startNode = function() {\n return new Node(this, this.start, this.startLoc)\n};\n\npp$6.startNodeAt = function(pos, loc) {\n return new Node(this, pos, loc)\n};\n\n// Finish an AST node, adding `type` and `end` properties.\n\nfunction finishNodeAt(node, type, pos, loc) {\n node.type = type;\n node.end = pos;\n if (this.options.locations)\n { node.loc.end = loc; }\n if (this.options.ranges)\n { node.range[1] = pos; }\n return node\n}\n\npp$6.finishNode = function(node, type) {\n return finishNodeAt.call(this, node, type, this.lastTokEnd, this.lastTokEndLoc)\n};\n\n// Finish node at given position\n\npp$6.finishNodeAt = function(node, type, pos, loc) {\n return finishNodeAt.call(this, node, type, pos, loc)\n};\n\npp$6.copyNode = function(node) {\n var newNode = new Node(this, node.start, this.startLoc);\n for (var prop in node) { newNode[prop] = node[prop]; }\n return newNode\n};\n\n// The algorithm used to determine whether a regexp can appear at a\n\nvar TokContext = function TokContext(token, isExpr, preserveSpace, override, generator) {\n this.token = token;\n this.isExpr = !!isExpr;\n this.preserveSpace = !!preserveSpace;\n this.override = override;\n this.generator = !!generator;\n};\n\nvar types$1 = {\n b_stat: new TokContext(\"{\", false),\n b_expr: new TokContext(\"{\", true),\n b_tmpl: new TokContext(\"${\", false),\n p_stat: new TokContext(\"(\", false),\n p_expr: new TokContext(\"(\", true),\n q_tmpl: new TokContext(\"`\", true, true, function (p) { return p.tryReadTemplateToken(); }),\n f_stat: new TokContext(\"function\", false),\n f_expr: new TokContext(\"function\", true),\n f_expr_gen: new TokContext(\"function\", true, false, null, true),\n f_gen: new TokContext(\"function\", false, false, null, true)\n};\n\nvar pp$7 = Parser.prototype;\n\npp$7.initialContext = function() {\n return [types$1.b_stat]\n};\n\npp$7.braceIsBlock = function(prevType) {\n var parent = this.curContext();\n if (parent === types$1.f_expr || parent === types$1.f_stat)\n { return true }\n if (prevType === types.colon && (parent === types$1.b_stat || parent === types$1.b_expr))\n { return !parent.isExpr }\n\n // The check for `tt.name && exprAllowed` detects whether we are\n // after a `yield` or `of` construct. See the `updateContext` for\n // `tt.name`.\n if (prevType === types._return || prevType === types.name && this.exprAllowed)\n { return lineBreak.test(this.input.slice(this.lastTokEnd, this.start)) }\n if (prevType === types._else || prevType === types.semi || prevType === types.eof || prevType === types.parenR || prevType === types.arrow)\n { return true }\n if (prevType === types.braceL)\n { return parent === types$1.b_stat }\n if (prevType === types._var || prevType === types._const || prevType === types.name)\n { return false }\n return !this.exprAllowed\n};\n\npp$7.inGeneratorContext = function() {\n for (var i = this.context.length - 1; i >= 1; i--) {\n var context = this.context[i];\n if (context.token === \"function\")\n { return context.generator }\n }\n return false\n};\n\npp$7.updateContext = function(prevType) {\n var update, type = this.type;\n if (type.keyword && prevType === types.dot)\n { this.exprAllowed = false; }\n else if (update = type.updateContext)\n { update.call(this, prevType); }\n else\n { this.exprAllowed = type.beforeExpr; }\n};\n\n// Token-specific context update code\n\ntypes.parenR.updateContext = types.braceR.updateContext = function() {\n if (this.context.length === 1) {\n this.exprAllowed = true;\n return\n }\n var out = this.context.pop();\n if (out === types$1.b_stat && this.curContext().token === \"function\") {\n out = this.context.pop();\n }\n this.exprAllowed = !out.isExpr;\n};\n\ntypes.braceL.updateContext = function(prevType) {\n this.context.push(this.braceIsBlock(prevType) ? types$1.b_stat : types$1.b_expr);\n this.exprAllowed = true;\n};\n\ntypes.dollarBraceL.updateContext = function() {\n this.context.push(types$1.b_tmpl);\n this.exprAllowed = true;\n};\n\ntypes.parenL.updateContext = function(prevType) {\n var statementParens = prevType === types._if || prevType === types._for || prevType === types._with || prevType === types._while;\n this.context.push(statementParens ? types$1.p_stat : types$1.p_expr);\n this.exprAllowed = true;\n};\n\ntypes.incDec.updateContext = function() {\n // tokExprAllowed stays unchanged\n};\n\ntypes._function.updateContext = types._class.updateContext = function(prevType) {\n if (prevType.beforeExpr && prevType !== types._else &&\n !(prevType === types.semi && this.curContext() !== types$1.p_stat) &&\n !(prevType === types._return && lineBreak.test(this.input.slice(this.lastTokEnd, this.start))) &&\n !((prevType === types.colon || prevType === types.braceL) && this.curContext() === types$1.b_stat))\n { this.context.push(types$1.f_expr); }\n else\n { this.context.push(types$1.f_stat); }\n this.exprAllowed = false;\n};\n\ntypes.backQuote.updateContext = function() {\n if (this.curContext() === types$1.q_tmpl)\n { this.context.pop(); }\n else\n { this.context.push(types$1.q_tmpl); }\n this.exprAllowed = false;\n};\n\ntypes.star.updateContext = function(prevType) {\n if (prevType === types._function) {\n var index = this.context.length - 1;\n if (this.context[index] === types$1.f_expr)\n { this.context[index] = types$1.f_expr_gen; }\n else\n { this.context[index] = types$1.f_gen; }\n }\n this.exprAllowed = true;\n};\n\ntypes.name.updateContext = function(prevType) {\n var allowed = false;\n if (this.options.ecmaVersion >= 6 && prevType !== types.dot) {\n if (this.value === \"of\" && !this.exprAllowed ||\n this.value === \"yield\" && this.inGeneratorContext())\n { allowed = true; }\n }\n this.exprAllowed = allowed;\n};\n\n// This file contains Unicode properties extracted from the ECMAScript\n// specification. The lists are extracted like so:\n// $$('#table-binary-unicode-properties > figure > table > tbody > tr > td:nth-child(1) code').map(el => el.innerText)\n\n// #table-binary-unicode-properties\nvar ecma9BinaryProperties = \"ASCII ASCII_Hex_Digit AHex Alphabetic Alpha Any Assigned Bidi_Control Bidi_C Bidi_Mirrored Bidi_M Case_Ignorable CI Cased Changes_When_Casefolded CWCF Changes_When_Casemapped CWCM Changes_When_Lowercased CWL Changes_When_NFKC_Casefolded CWKCF Changes_When_Titlecased CWT Changes_When_Uppercased CWU Dash Default_Ignorable_Code_Point DI Deprecated Dep Diacritic Dia Emoji Emoji_Component Emoji_Modifier Emoji_Modifier_Base Emoji_Presentation Extender Ext Grapheme_Base Gr_Base Grapheme_Extend Gr_Ext Hex_Digit Hex IDS_Binary_Operator IDSB IDS_Trinary_Operator IDST ID_Continue IDC ID_Start IDS Ideographic Ideo Join_Control Join_C Logical_Order_Exception LOE Lowercase Lower Math Noncharacter_Code_Point NChar Pattern_Syntax Pat_Syn Pattern_White_Space Pat_WS Quotation_Mark QMark Radical Regional_Indicator RI Sentence_Terminal STerm Soft_Dotted SD Terminal_Punctuation Term Unified_Ideograph UIdeo Uppercase Upper Variation_Selector VS White_Space space XID_Continue XIDC XID_Start XIDS\";\nvar ecma10BinaryProperties = ecma9BinaryProperties + \" Extended_Pictographic\";\nvar ecma11BinaryProperties = ecma10BinaryProperties;\nvar ecma12BinaryProperties = ecma11BinaryProperties + \" EBase EComp EMod EPres ExtPict\";\nvar unicodeBinaryProperties = {\n 9: ecma9BinaryProperties,\n 10: ecma10BinaryProperties,\n 11: ecma11BinaryProperties,\n 12: ecma12BinaryProperties\n};\n\n// #table-unicode-general-category-values\nvar unicodeGeneralCategoryValues = \"Cased_Letter LC Close_Punctuation Pe Connector_Punctuation Pc Control Cc cntrl Currency_Symbol Sc Dash_Punctuation Pd Decimal_Number Nd digit Enclosing_Mark Me Final_Punctuation Pf Format Cf Initial_Punctuation Pi Letter L Letter_Number Nl Line_Separator Zl Lowercase_Letter Ll Mark M Combining_Mark Math_Symbol Sm Modifier_Letter Lm Modifier_Symbol Sk Nonspacing_Mark Mn Number N Open_Punctuation Ps Other C Other_Letter Lo Other_Number No Other_Punctuation Po Other_Symbol So Paragraph_Separator Zp Private_Use Co Punctuation P punct Separator Z Space_Separator Zs Spacing_Mark Mc Surrogate Cs Symbol S Titlecase_Letter Lt Unassigned Cn Uppercase_Letter Lu\";\n\n// #table-unicode-script-values\nvar ecma9ScriptValues = \"Adlam Adlm Ahom Ahom Anatolian_Hieroglyphs Hluw Arabic Arab Armenian Armn Avestan Avst Balinese Bali Bamum Bamu Bassa_Vah Bass Batak Batk Bengali Beng Bhaiksuki Bhks Bopomofo Bopo Brahmi Brah Braille Brai Buginese Bugi Buhid Buhd Canadian_Aboriginal Cans Carian Cari Caucasian_Albanian Aghb Chakma Cakm Cham Cham Cherokee Cher Common Zyyy Coptic Copt Qaac Cuneiform Xsux Cypriot Cprt Cyrillic Cyrl Deseret Dsrt Devanagari Deva Duployan Dupl Egyptian_Hieroglyphs Egyp Elbasan Elba Ethiopic Ethi Georgian Geor Glagolitic Glag Gothic Goth Grantha Gran Greek Grek Gujarati Gujr Gurmukhi Guru Han Hani Hangul Hang Hanunoo Hano Hatran Hatr Hebrew Hebr Hiragana Hira Imperial_Aramaic Armi Inherited Zinh Qaai Inscriptional_Pahlavi Phli Inscriptional_Parthian Prti Javanese Java Kaithi Kthi Kannada Knda Katakana Kana Kayah_Li Kali Kharoshthi Khar Khmer Khmr Khojki Khoj Khudawadi Sind Lao Laoo Latin Latn Lepcha Lepc Limbu Limb Linear_A Lina Linear_B Linb Lisu Lisu Lycian Lyci Lydian Lydi Mahajani Mahj Malayalam Mlym Mandaic Mand Manichaean Mani Marchen Marc Masaram_Gondi Gonm Meetei_Mayek Mtei Mende_Kikakui Mend Meroitic_Cursive Merc Meroitic_Hieroglyphs Mero Miao Plrd Modi Modi Mongolian Mong Mro Mroo Multani Mult Myanmar Mymr Nabataean Nbat New_Tai_Lue Talu Newa Newa Nko Nkoo Nushu Nshu Ogham Ogam Ol_Chiki Olck Old_Hungarian Hung Old_Italic Ital Old_North_Arabian Narb Old_Permic Perm Old_Persian Xpeo Old_South_Arabian Sarb Old_Turkic Orkh Oriya Orya Osage Osge Osmanya Osma Pahawh_Hmong Hmng Palmyrene Palm Pau_Cin_Hau Pauc Phags_Pa Phag Phoenician Phnx Psalter_Pahlavi Phlp Rejang Rjng Runic Runr Samaritan Samr Saurashtra Saur Sharada Shrd Shavian Shaw Siddham Sidd SignWriting Sgnw Sinhala Sinh Sora_Sompeng Sora Soyombo Soyo Sundanese Sund Syloti_Nagri Sylo Syriac Syrc Tagalog Tglg Tagbanwa Tagb Tai_Le Tale Tai_Tham Lana Tai_Viet Tavt Takri Takr Tamil Taml Tangut Tang Telugu Telu Thaana Thaa Thai Thai Tibetan Tibt Tifinagh Tfng Tirhuta Tirh Ugaritic Ugar Vai Vaii Warang_Citi Wara Yi Yiii Zanabazar_Square Zanb\";\nvar ecma10ScriptValues = ecma9ScriptValues + \" Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd\";\nvar ecma11ScriptValues = ecma10ScriptValues + \" Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho\";\nvar ecma12ScriptValues = ecma11ScriptValues + \" Chorasmian Chrs Diak Dives_Akuru Khitan_Small_Script Kits Yezi Yezidi\";\nvar unicodeScriptValues = {\n 9: ecma9ScriptValues,\n 10: ecma10ScriptValues,\n 11: ecma11ScriptValues,\n 12: ecma12ScriptValues\n};\n\nvar data = {};\nfunction buildUnicodeData(ecmaVersion) {\n var d = data[ecmaVersion] = {\n binary: wordsRegexp(unicodeBinaryProperties[ecmaVersion] + \" \" + unicodeGeneralCategoryValues),\n nonBinary: {\n General_Category: wordsRegexp(unicodeGeneralCategoryValues),\n Script: wordsRegexp(unicodeScriptValues[ecmaVersion])\n }\n };\n d.nonBinary.Script_Extensions = d.nonBinary.Script;\n\n d.nonBinary.gc = d.nonBinary.General_Category;\n d.nonBinary.sc = d.nonBinary.Script;\n d.nonBinary.scx = d.nonBinary.Script_Extensions;\n}\nbuildUnicodeData(9);\nbuildUnicodeData(10);\nbuildUnicodeData(11);\nbuildUnicodeData(12);\n\nvar pp$8 = Parser.prototype;\n\nvar RegExpValidationState = function RegExpValidationState(parser) {\n this.parser = parser;\n this.validFlags = \"gim\" + (parser.options.ecmaVersion >= 6 ? \"uy\" : \"\") + (parser.options.ecmaVersion >= 9 ? \"s\" : \"\") + (parser.options.ecmaVersion >= 13 ? \"d\" : \"\");\n this.unicodeProperties = data[parser.options.ecmaVersion >= 12 ? 12 : parser.options.ecmaVersion];\n this.source = \"\";\n this.flags = \"\";\n this.start = 0;\n this.switchU = false;\n this.switchN = false;\n this.pos = 0;\n this.lastIntValue = 0;\n this.lastStringValue = \"\";\n this.lastAssertionIsQuantifiable = false;\n this.numCapturingParens = 0;\n this.maxBackReference = 0;\n this.groupNames = [];\n this.backReferenceNames = [];\n};\n\nRegExpValidationState.prototype.reset = function reset (start, pattern, flags) {\n var unicode = flags.indexOf(\"u\") !== -1;\n this.start = start | 0;\n this.source = pattern + \"\";\n this.flags = flags;\n this.switchU = unicode && this.parser.options.ecmaVersion >= 6;\n this.switchN = unicode && this.parser.options.ecmaVersion >= 9;\n};\n\nRegExpValidationState.prototype.raise = function raise (message) {\n this.parser.raiseRecoverable(this.start, (\"Invalid regular expression: /\" + (this.source) + \"/: \" + message));\n};\n\n// If u flag is given, this returns the code point at the index (it combines a surrogate pair).\n// Otherwise, this returns the code unit of the index (can be a part of a surrogate pair).\nRegExpValidationState.prototype.at = function at (i, forceU) {\n if ( forceU === void 0 ) forceU = false;\n\n var s = this.source;\n var l = s.length;\n if (i >= l) {\n return -1\n }\n var c = s.charCodeAt(i);\n if (!(forceU || this.switchU) || c <= 0xD7FF || c >= 0xE000 || i + 1 >= l) {\n return c\n }\n var next = s.charCodeAt(i + 1);\n return next >= 0xDC00 && next <= 0xDFFF ? (c << 10) + next - 0x35FDC00 : c\n};\n\nRegExpValidationState.prototype.nextIndex = function nextIndex (i, forceU) {\n if ( forceU === void 0 ) forceU = false;\n\n var s = this.source;\n var l = s.length;\n if (i >= l) {\n return l\n }\n var c = s.charCodeAt(i), next;\n if (!(forceU || this.switchU) || c <= 0xD7FF || c >= 0xE000 || i + 1 >= l ||\n (next = s.charCodeAt(i + 1)) < 0xDC00 || next > 0xDFFF) {\n return i + 1\n }\n return i + 2\n};\n\nRegExpValidationState.prototype.current = function current (forceU) {\n if ( forceU === void 0 ) forceU = false;\n\n return this.at(this.pos, forceU)\n};\n\nRegExpValidationState.prototype.lookahead = function lookahead (forceU) {\n if ( forceU === void 0 ) forceU = false;\n\n return this.at(this.nextIndex(this.pos, forceU), forceU)\n};\n\nRegExpValidationState.prototype.advance = function advance (forceU) {\n if ( forceU === void 0 ) forceU = false;\n\n this.pos = this.nextIndex(this.pos, forceU);\n};\n\nRegExpValidationState.prototype.eat = function eat (ch, forceU) {\n if ( forceU === void 0 ) forceU = false;\n\n if (this.current(forceU) === ch) {\n this.advance(forceU);\n return true\n }\n return false\n};\n\nfunction codePointToString(ch) {\n if (ch <= 0xFFFF) { return String.fromCharCode(ch) }\n ch -= 0x10000;\n return String.fromCharCode((ch >> 10) + 0xD800, (ch & 0x03FF) + 0xDC00)\n}\n\n/**\n * Validate the flags part of a given RegExpLiteral.\n *\n * @param {RegExpValidationState} state The state to validate RegExp.\n * @returns {void}\n */\npp$8.validateRegExpFlags = function(state) {\n var validFlags = state.validFlags;\n var flags = state.flags;\n\n for (var i = 0; i < flags.length; i++) {\n var flag = flags.charAt(i);\n if (validFlags.indexOf(flag) === -1) {\n this.raise(state.start, \"Invalid regular expression flag\");\n }\n if (flags.indexOf(flag, i + 1) > -1) {\n this.raise(state.start, \"Duplicate regular expression flag\");\n }\n }\n};\n\n/**\n * Validate the pattern part of a given RegExpLiteral.\n *\n * @param {RegExpValidationState} state The state to validate RegExp.\n * @returns {void}\n */\npp$8.validateRegExpPattern = function(state) {\n this.regexp_pattern(state);\n\n // The goal symbol for the parse is |Pattern[~U, ~N]|. If the result of\n // parsing contains a |GroupName|, reparse with the goal symbol\n // |Pattern[~U, +N]| and use this result instead. Throw a *SyntaxError*\n // exception if _P_ did not conform to the grammar, if any elements of _P_\n // were not matched by the parse, or if any Early Error conditions exist.\n if (!state.switchN && this.options.ecmaVersion >= 9 && state.groupNames.length > 0) {\n state.switchN = true;\n this.regexp_pattern(state);\n }\n};\n\n// https://www.ecma-international.org/ecma-262/8.0/#prod-Pattern\npp$8.regexp_pattern = function(state) {\n state.pos = 0;\n state.lastIntValue = 0;\n state.lastStringValue = \"\";\n state.lastAssertionIsQuantifiable = false;\n state.numCapturingParens = 0;\n state.maxBackReference = 0;\n state.groupNames.length = 0;\n state.backReferenceNames.length = 0;\n\n this.regexp_disjunction(state);\n\n if (state.pos !== state.source.length) {\n // Make the same messages as V8.\n if (state.eat(0x29 /* ) */)) {\n state.raise(\"Unmatched ')'\");\n }\n if (state.eat(0x5D /* ] */) || state.eat(0x7D /* } */)) {\n state.raise(\"Lone quantifier brackets\");\n }\n }\n if (state.maxBackReference > state.numCapturingParens) {\n state.raise(\"Invalid escape\");\n }\n for (var i = 0, list = state.backReferenceNames; i < list.length; i += 1) {\n var name = list[i];\n\n if (state.groupNames.indexOf(name) === -1) {\n state.raise(\"Invalid named capture referenced\");\n }\n }\n};\n\n// https://www.ecma-international.org/ecma-262/8.0/#prod-Disjunction\npp$8.regexp_disjunction = function(state) {\n this.regexp_alternative(state);\n while (state.eat(0x7C /* | */)) {\n this.regexp_alternative(state);\n }\n\n // Make the same message as V8.\n if (this.regexp_eatQuantifier(state, true)) {\n state.raise(\"Nothing to repeat\");\n }\n if (state.eat(0x7B /* { */)) {\n state.raise(\"Lone quantifier brackets\");\n }\n};\n\n// https://www.ecma-international.org/ecma-262/8.0/#prod-Alternative\npp$8.regexp_alternative = function(state) {\n while (state.pos < state.source.length && this.regexp_eatTerm(state))\n { }\n};\n\n// https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-Term\npp$8.regexp_eatTerm = function(state) {\n if (this.regexp_eatAssertion(state)) {\n // Handle `QuantifiableAssertion Quantifier` alternative.\n // `state.lastAssertionIsQuantifiable` is true if the last eaten Assertion\n // is a QuantifiableAssertion.\n if (state.lastAssertionIsQuantifiable && this.regexp_eatQuantifier(state)) {\n // Make the same message as V8.\n if (state.switchU) {\n state.raise(\"Invalid quantifier\");\n }\n }\n return true\n }\n\n if (state.switchU ? this.regexp_eatAtom(state) : this.regexp_eatExtendedAtom(state)) {\n this.regexp_eatQuantifier(state);\n return true\n }\n\n return false\n};\n\n// https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-Assertion\npp$8.regexp_eatAssertion = function(state) {\n var start = state.pos;\n state.lastAssertionIsQuantifiable = false;\n\n // ^, $\n if (state.eat(0x5E /* ^ */) || state.eat(0x24 /* $ */)) {\n return true\n }\n\n // \\b \\B\n if (state.eat(0x5C /* \\ */)) {\n if (state.eat(0x42 /* B */) || state.eat(0x62 /* b */)) {\n return true\n }\n state.pos = start;\n }\n\n // Lookahead / Lookbehind\n if (state.eat(0x28 /* ( */) && state.eat(0x3F /* ? */)) {\n var lookbehind = false;\n if (this.options.ecmaVersion >= 9) {\n lookbehind = state.eat(0x3C /* < */);\n }\n if (state.eat(0x3D /* = */) || state.eat(0x21 /* ! */)) {\n this.regexp_disjunction(state);\n if (!state.eat(0x29 /* ) */)) {\n state.raise(\"Unterminated group\");\n }\n state.lastAssertionIsQuantifiable = !lookbehind;\n return true\n }\n }\n\n state.pos = start;\n return false\n};\n\n// https://www.ecma-international.org/ecma-262/8.0/#prod-Quantifier\npp$8.regexp_eatQuantifier = function(state, noError) {\n if ( noError === void 0 ) noError = false;\n\n if (this.regexp_eatQuantifierPrefix(state, noError)) {\n state.eat(0x3F /* ? */);\n return true\n }\n return false\n};\n\n// https://www.ecma-international.org/ecma-262/8.0/#prod-QuantifierPrefix\npp$8.regexp_eatQuantifierPrefix = function(state, noError) {\n return (\n state.eat(0x2A /* * */) ||\n state.eat(0x2B /* + */) ||\n state.eat(0x3F /* ? */) ||\n this.regexp_eatBracedQuantifier(state, noError)\n )\n};\npp$8.regexp_eatBracedQuantifier = function(state, noError) {\n var start = state.pos;\n if (state.eat(0x7B /* { */)) {\n var min = 0, max = -1;\n if (this.regexp_eatDecimalDigits(state)) {\n min = state.lastIntValue;\n if (state.eat(0x2C /* , */) && this.regexp_eatDecimalDigits(state)) {\n max = state.lastIntValue;\n }\n if (state.eat(0x7D /* } */)) {\n // SyntaxError in https://www.ecma-international.org/ecma-262/8.0/#sec-term\n if (max !== -1 && max < min && !noError) {\n state.raise(\"numbers out of order in {} quantifier\");\n }\n return true\n }\n }\n if (state.switchU && !noError) {\n state.raise(\"Incomplete quantifier\");\n }\n state.pos = start;\n }\n return false\n};\n\n// https://www.ecma-international.org/ecma-262/8.0/#prod-Atom\npp$8.regexp_eatAtom = function(state) {\n return (\n this.regexp_eatPatternCharacters(state) ||\n state.eat(0x2E /* . */) ||\n this.regexp_eatReverseSolidusAtomEscape(state) ||\n this.regexp_eatCharacterClass(state) ||\n this.regexp_eatUncapturingGroup(state) ||\n this.regexp_eatCapturingGroup(state)\n )\n};\npp$8.regexp_eatReverseSolidusAtomEscape = function(state) {\n var start = state.pos;\n if (state.eat(0x5C /* \\ */)) {\n if (this.regexp_eatAtomEscape(state)) {\n return true\n }\n state.pos = start;\n }\n return false\n};\npp$8.regexp_eatUncapturingGroup = function(state) {\n var start = state.pos;\n if (state.eat(0x28 /* ( */)) {\n if (state.eat(0x3F /* ? */) && state.eat(0x3A /* : */)) {\n this.regexp_disjunction(state);\n if (state.eat(0x29 /* ) */)) {\n return true\n }\n state.raise(\"Unterminated group\");\n }\n state.pos = start;\n }\n return false\n};\npp$8.regexp_eatCapturingGroup = function(state) {\n if (state.eat(0x28 /* ( */)) {\n if (this.options.ecmaVersion >= 9) {\n this.regexp_groupSpecifier(state);\n } else if (state.current() === 0x3F /* ? */) {\n state.raise(\"Invalid group\");\n }\n this.regexp_disjunction(state);\n if (state.eat(0x29 /* ) */)) {\n state.numCapturingParens += 1;\n return true\n }\n state.raise(\"Unterminated group\");\n }\n return false\n};\n\n// https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-ExtendedAtom\npp$8.regexp_eatExtendedAtom = function(state) {\n return (\n state.eat(0x2E /* . */) ||\n this.regexp_eatReverseSolidusAtomEscape(state) ||\n this.regexp_eatCharacterClass(state) ||\n this.regexp_eatUncapturingGroup(state) ||\n this.regexp_eatCapturingGroup(state) ||\n this.regexp_eatInvalidBracedQuantifier(state) ||\n this.regexp_eatExtendedPatternCharacter(state)\n )\n};\n\n// https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-InvalidBracedQuantifier\npp$8.regexp_eatInvalidBracedQuantifier = function(state) {\n if (this.regexp_eatBracedQuantifier(state, true)) {\n state.raise(\"Nothing to repeat\");\n }\n return false\n};\n\n// https://www.ecma-international.org/ecma-262/8.0/#prod-SyntaxCharacter\npp$8.regexp_eatSyntaxCharacter = function(state) {\n var ch = state.current();\n if (isSyntaxCharacter(ch)) {\n state.lastIntValue = ch;\n state.advance();\n return true\n }\n return false\n};\nfunction isSyntaxCharacter(ch) {\n return (\n ch === 0x24 /* $ */ ||\n ch >= 0x28 /* ( */ && ch <= 0x2B /* + */ ||\n ch === 0x2E /* . */ ||\n ch === 0x3F /* ? */ ||\n ch >= 0x5B /* [ */ && ch <= 0x5E /* ^ */ ||\n ch >= 0x7B /* { */ && ch <= 0x7D /* } */\n )\n}\n\n// https://www.ecma-international.org/ecma-262/8.0/#prod-PatternCharacter\n// But eat eager.\npp$8.regexp_eatPatternCharacters = function(state) {\n var start = state.pos;\n var ch = 0;\n while ((ch = state.current()) !== -1 && !isSyntaxCharacter(ch)) {\n state.advance();\n }\n return state.pos !== start\n};\n\n// https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-ExtendedPatternCharacter\npp$8.regexp_eatExtendedPatternCharacter = function(state) {\n var ch = state.current();\n if (\n ch !== -1 &&\n ch !== 0x24 /* $ */ &&\n !(ch >= 0x28 /* ( */ && ch <= 0x2B /* + */) &&\n ch !== 0x2E /* . */ &&\n ch !== 0x3F /* ? */ &&\n ch !== 0x5B /* [ */ &&\n ch !== 0x5E /* ^ */ &&\n ch !== 0x7C /* | */\n ) {\n state.advance();\n return true\n }\n return false\n};\n\n// GroupSpecifier ::\n// [empty]\n// `?` GroupName\npp$8.regexp_groupSpecifier = function(state) {\n if (state.eat(0x3F /* ? */)) {\n if (this.regexp_eatGroupName(state)) {\n if (state.groupNames.indexOf(state.lastStringValue) !== -1) {\n state.raise(\"Duplicate capture group name\");\n }\n state.groupNames.push(state.lastStringValue);\n return\n }\n state.raise(\"Invalid group\");\n }\n};\n\n// GroupName ::\n// `<` RegExpIdentifierName `>`\n// Note: this updates `state.lastStringValue` property with the eaten name.\npp$8.regexp_eatGroupName = function(state) {\n state.lastStringValue = \"\";\n if (state.eat(0x3C /* < */)) {\n if (this.regexp_eatRegExpIdentifierName(state) && state.eat(0x3E /* > */)) {\n return true\n }\n state.raise(\"Invalid capture group name\");\n }\n return false\n};\n\n// RegExpIdentifierName ::\n// RegExpIdentifierStart\n// RegExpIdentifierName RegExpIdentifierPart\n// Note: this updates `state.lastStringValue` property with the eaten name.\npp$8.regexp_eatRegExpIdentifierName = function(state) {\n state.lastStringValue = \"\";\n if (this.regexp_eatRegExpIdentifierStart(state)) {\n state.lastStringValue += codePointToString(state.lastIntValue);\n while (this.regexp_eatRegExpIdentifierPart(state)) {\n state.lastStringValue += codePointToString(state.lastIntValue);\n }\n return true\n }\n return false\n};\n\n// RegExpIdentifierStart ::\n// UnicodeIDStart\n// `$`\n// `_`\n// `\\` RegExpUnicodeEscapeSequence[+U]\npp$8.regexp_eatRegExpIdentifierStart = function(state) {\n var start = state.pos;\n var forceU = this.options.ecmaVersion >= 11;\n var ch = state.current(forceU);\n state.advance(forceU);\n\n if (ch === 0x5C /* \\ */ && this.regexp_eatRegExpUnicodeEscapeSequence(state, forceU)) {\n ch = state.lastIntValue;\n }\n if (isRegExpIdentifierStart(ch)) {\n state.lastIntValue = ch;\n return true\n }\n\n state.pos = start;\n return false\n};\nfunction isRegExpIdentifierStart(ch) {\n return isIdentifierStart(ch, true) || ch === 0x24 /* $ */ || ch === 0x5F /* _ */\n}\n\n// RegExpIdentifierPart ::\n// UnicodeIDContinue\n// `$`\n// `_`\n// `\\` RegExpUnicodeEscapeSequence[+U]\n// \n// \npp$8.regexp_eatRegExpIdentifierPart = function(state) {\n var start = state.pos;\n var forceU = this.options.ecmaVersion >= 11;\n var ch = state.current(forceU);\n state.advance(forceU);\n\n if (ch === 0x5C /* \\ */ && this.regexp_eatRegExpUnicodeEscapeSequence(state, forceU)) {\n ch = state.lastIntValue;\n }\n if (isRegExpIdentifierPart(ch)) {\n state.lastIntValue = ch;\n return true\n }\n\n state.pos = start;\n return false\n};\nfunction isRegExpIdentifierPart(ch) {\n return isIdentifierChar(ch, true) || ch === 0x24 /* $ */ || ch === 0x5F /* _ */ || ch === 0x200C /* */ || ch === 0x200D /* */\n}\n\n// https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-AtomEscape\npp$8.regexp_eatAtomEscape = function(state) {\n if (\n this.regexp_eatBackReference(state) ||\n this.regexp_eatCharacterClassEscape(state) ||\n this.regexp_eatCharacterEscape(state) ||\n (state.switchN && this.regexp_eatKGroupName(state))\n ) {\n return true\n }\n if (state.switchU) {\n // Make the same message as V8.\n if (state.current() === 0x63 /* c */) {\n state.raise(\"Invalid unicode escape\");\n }\n state.raise(\"Invalid escape\");\n }\n return false\n};\npp$8.regexp_eatBackReference = function(state) {\n var start = state.pos;\n if (this.regexp_eatDecimalEscape(state)) {\n var n = state.lastIntValue;\n if (state.switchU) {\n // For SyntaxError in https://www.ecma-international.org/ecma-262/8.0/#sec-atomescape\n if (n > state.maxBackReference) {\n state.maxBackReference = n;\n }\n return true\n }\n if (n <= state.numCapturingParens) {\n return true\n }\n state.pos = start;\n }\n return false\n};\npp$8.regexp_eatKGroupName = function(state) {\n if (state.eat(0x6B /* k */)) {\n if (this.regexp_eatGroupName(state)) {\n state.backReferenceNames.push(state.lastStringValue);\n return true\n }\n state.raise(\"Invalid named reference\");\n }\n return false\n};\n\n// https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-CharacterEscape\npp$8.regexp_eatCharacterEscape = function(state) {\n return (\n this.regexp_eatControlEscape(state) ||\n this.regexp_eatCControlLetter(state) ||\n this.regexp_eatZero(state) ||\n this.regexp_eatHexEscapeSequence(state) ||\n this.regexp_eatRegExpUnicodeEscapeSequence(state, false) ||\n (!state.switchU && this.regexp_eatLegacyOctalEscapeSequence(state)) ||\n this.regexp_eatIdentityEscape(state)\n )\n};\npp$8.regexp_eatCControlLetter = function(state) {\n var start = state.pos;\n if (state.eat(0x63 /* c */)) {\n if (this.regexp_eatControlLetter(state)) {\n return true\n }\n state.pos = start;\n }\n return false\n};\npp$8.regexp_eatZero = function(state) {\n if (state.current() === 0x30 /* 0 */ && !isDecimalDigit(state.lookahead())) {\n state.lastIntValue = 0;\n state.advance();\n return true\n }\n return false\n};\n\n// https://www.ecma-international.org/ecma-262/8.0/#prod-ControlEscape\npp$8.regexp_eatControlEscape = function(state) {\n var ch = state.current();\n if (ch === 0x74 /* t */) {\n state.lastIntValue = 0x09; /* \\t */\n state.advance();\n return true\n }\n if (ch === 0x6E /* n */) {\n state.lastIntValue = 0x0A; /* \\n */\n state.advance();\n return true\n }\n if (ch === 0x76 /* v */) {\n state.lastIntValue = 0x0B; /* \\v */\n state.advance();\n return true\n }\n if (ch === 0x66 /* f */) {\n state.lastIntValue = 0x0C; /* \\f */\n state.advance();\n return true\n }\n if (ch === 0x72 /* r */) {\n state.lastIntValue = 0x0D; /* \\r */\n state.advance();\n return true\n }\n return false\n};\n\n// https://www.ecma-international.org/ecma-262/8.0/#prod-ControlLetter\npp$8.regexp_eatControlLetter = function(state) {\n var ch = state.current();\n if (isControlLetter(ch)) {\n state.lastIntValue = ch % 0x20;\n state.advance();\n return true\n }\n return false\n};\nfunction isControlLetter(ch) {\n return (\n (ch >= 0x41 /* A */ && ch <= 0x5A /* Z */) ||\n (ch >= 0x61 /* a */ && ch <= 0x7A /* z */)\n )\n}\n\n// https://www.ecma-international.org/ecma-262/8.0/#prod-RegExpUnicodeEscapeSequence\npp$8.regexp_eatRegExpUnicodeEscapeSequence = function(state, forceU) {\n if ( forceU === void 0 ) forceU = false;\n\n var start = state.pos;\n var switchU = forceU || state.switchU;\n\n if (state.eat(0x75 /* u */)) {\n if (this.regexp_eatFixedHexDigits(state, 4)) {\n var lead = state.lastIntValue;\n if (switchU && lead >= 0xD800 && lead <= 0xDBFF) {\n var leadSurrogateEnd = state.pos;\n if (state.eat(0x5C /* \\ */) && state.eat(0x75 /* u */) && this.regexp_eatFixedHexDigits(state, 4)) {\n var trail = state.lastIntValue;\n if (trail >= 0xDC00 && trail <= 0xDFFF) {\n state.lastIntValue = (lead - 0xD800) * 0x400 + (trail - 0xDC00) + 0x10000;\n return true\n }\n }\n state.pos = leadSurrogateEnd;\n state.lastIntValue = lead;\n }\n return true\n }\n if (\n switchU &&\n state.eat(0x7B /* { */) &&\n this.regexp_eatHexDigits(state) &&\n state.eat(0x7D /* } */) &&\n isValidUnicode(state.lastIntValue)\n ) {\n return true\n }\n if (switchU) {\n state.raise(\"Invalid unicode escape\");\n }\n state.pos = start;\n }\n\n return false\n};\nfunction isValidUnicode(ch) {\n return ch >= 0 && ch <= 0x10FFFF\n}\n\n// https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-IdentityEscape\npp$8.regexp_eatIdentityEscape = function(state) {\n if (state.switchU) {\n if (this.regexp_eatSyntaxCharacter(state)) {\n return true\n }\n if (state.eat(0x2F /* / */)) {\n state.lastIntValue = 0x2F; /* / */\n return true\n }\n return false\n }\n\n var ch = state.current();\n if (ch !== 0x63 /* c */ && (!state.switchN || ch !== 0x6B /* k */)) {\n state.lastIntValue = ch;\n state.advance();\n return true\n }\n\n return false\n};\n\n// https://www.ecma-international.org/ecma-262/8.0/#prod-DecimalEscape\npp$8.regexp_eatDecimalEscape = function(state) {\n state.lastIntValue = 0;\n var ch = state.current();\n if (ch >= 0x31 /* 1 */ && ch <= 0x39 /* 9 */) {\n do {\n state.lastIntValue = 10 * state.lastIntValue + (ch - 0x30 /* 0 */);\n state.advance();\n } while ((ch = state.current()) >= 0x30 /* 0 */ && ch <= 0x39 /* 9 */)\n return true\n }\n return false\n};\n\n// https://www.ecma-international.org/ecma-262/8.0/#prod-CharacterClassEscape\npp$8.regexp_eatCharacterClassEscape = function(state) {\n var ch = state.current();\n\n if (isCharacterClassEscape(ch)) {\n state.lastIntValue = -1;\n state.advance();\n return true\n }\n\n if (\n state.switchU &&\n this.options.ecmaVersion >= 9 &&\n (ch === 0x50 /* P */ || ch === 0x70 /* p */)\n ) {\n state.lastIntValue = -1;\n state.advance();\n if (\n state.eat(0x7B /* { */) &&\n this.regexp_eatUnicodePropertyValueExpression(state) &&\n state.eat(0x7D /* } */)\n ) {\n return true\n }\n state.raise(\"Invalid property name\");\n }\n\n return false\n};\nfunction isCharacterClassEscape(ch) {\n return (\n ch === 0x64 /* d */ ||\n ch === 0x44 /* D */ ||\n ch === 0x73 /* s */ ||\n ch === 0x53 /* S */ ||\n ch === 0x77 /* w */ ||\n ch === 0x57 /* W */\n )\n}\n\n// UnicodePropertyValueExpression ::\n// UnicodePropertyName `=` UnicodePropertyValue\n// LoneUnicodePropertyNameOrValue\npp$8.regexp_eatUnicodePropertyValueExpression = function(state) {\n var start = state.pos;\n\n // UnicodePropertyName `=` UnicodePropertyValue\n if (this.regexp_eatUnicodePropertyName(state) && state.eat(0x3D /* = */)) {\n var name = state.lastStringValue;\n if (this.regexp_eatUnicodePropertyValue(state)) {\n var value = state.lastStringValue;\n this.regexp_validateUnicodePropertyNameAndValue(state, name, value);\n return true\n }\n }\n state.pos = start;\n\n // LoneUnicodePropertyNameOrValue\n if (this.regexp_eatLoneUnicodePropertyNameOrValue(state)) {\n var nameOrValue = state.lastStringValue;\n this.regexp_validateUnicodePropertyNameOrValue(state, nameOrValue);\n return true\n }\n return false\n};\npp$8.regexp_validateUnicodePropertyNameAndValue = function(state, name, value) {\n if (!has(state.unicodeProperties.nonBinary, name))\n { state.raise(\"Invalid property name\"); }\n if (!state.unicodeProperties.nonBinary[name].test(value))\n { state.raise(\"Invalid property value\"); }\n};\npp$8.regexp_validateUnicodePropertyNameOrValue = function(state, nameOrValue) {\n if (!state.unicodeProperties.binary.test(nameOrValue))\n { state.raise(\"Invalid property name\"); }\n};\n\n// UnicodePropertyName ::\n// UnicodePropertyNameCharacters\npp$8.regexp_eatUnicodePropertyName = function(state) {\n var ch = 0;\n state.lastStringValue = \"\";\n while (isUnicodePropertyNameCharacter(ch = state.current())) {\n state.lastStringValue += codePointToString(ch);\n state.advance();\n }\n return state.lastStringValue !== \"\"\n};\nfunction isUnicodePropertyNameCharacter(ch) {\n return isControlLetter(ch) || ch === 0x5F /* _ */\n}\n\n// UnicodePropertyValue ::\n// UnicodePropertyValueCharacters\npp$8.regexp_eatUnicodePropertyValue = function(state) {\n var ch = 0;\n state.lastStringValue = \"\";\n while (isUnicodePropertyValueCharacter(ch = state.current())) {\n state.lastStringValue += codePointToString(ch);\n state.advance();\n }\n return state.lastStringValue !== \"\"\n};\nfunction isUnicodePropertyValueCharacter(ch) {\n return isUnicodePropertyNameCharacter(ch) || isDecimalDigit(ch)\n}\n\n// LoneUnicodePropertyNameOrValue ::\n// UnicodePropertyValueCharacters\npp$8.regexp_eatLoneUnicodePropertyNameOrValue = function(state) {\n return this.regexp_eatUnicodePropertyValue(state)\n};\n\n// https://www.ecma-international.org/ecma-262/8.0/#prod-CharacterClass\npp$8.regexp_eatCharacterClass = function(state) {\n if (state.eat(0x5B /* [ */)) {\n state.eat(0x5E /* ^ */);\n this.regexp_classRanges(state);\n if (state.eat(0x5D /* ] */)) {\n return true\n }\n // Unreachable since it threw \"unterminated regular expression\" error before.\n state.raise(\"Unterminated character class\");\n }\n return false\n};\n\n// https://www.ecma-international.org/ecma-262/8.0/#prod-ClassRanges\n// https://www.ecma-international.org/ecma-262/8.0/#prod-NonemptyClassRanges\n// https://www.ecma-international.org/ecma-262/8.0/#prod-NonemptyClassRangesNoDash\npp$8.regexp_classRanges = function(state) {\n while (this.regexp_eatClassAtom(state)) {\n var left = state.lastIntValue;\n if (state.eat(0x2D /* - */) && this.regexp_eatClassAtom(state)) {\n var right = state.lastIntValue;\n if (state.switchU && (left === -1 || right === -1)) {\n state.raise(\"Invalid character class\");\n }\n if (left !== -1 && right !== -1 && left > right) {\n state.raise(\"Range out of order in character class\");\n }\n }\n }\n};\n\n// https://www.ecma-international.org/ecma-262/8.0/#prod-ClassAtom\n// https://www.ecma-international.org/ecma-262/8.0/#prod-ClassAtomNoDash\npp$8.regexp_eatClassAtom = function(state) {\n var start = state.pos;\n\n if (state.eat(0x5C /* \\ */)) {\n if (this.regexp_eatClassEscape(state)) {\n return true\n }\n if (state.switchU) {\n // Make the same message as V8.\n var ch$1 = state.current();\n if (ch$1 === 0x63 /* c */ || isOctalDigit(ch$1)) {\n state.raise(\"Invalid class escape\");\n }\n state.raise(\"Invalid escape\");\n }\n state.pos = start;\n }\n\n var ch = state.current();\n if (ch !== 0x5D /* ] */) {\n state.lastIntValue = ch;\n state.advance();\n return true\n }\n\n return false\n};\n\n// https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-ClassEscape\npp$8.regexp_eatClassEscape = function(state) {\n var start = state.pos;\n\n if (state.eat(0x62 /* b */)) {\n state.lastIntValue = 0x08; /* */\n return true\n }\n\n if (state.switchU && state.eat(0x2D /* - */)) {\n state.lastIntValue = 0x2D; /* - */\n return true\n }\n\n if (!state.switchU && state.eat(0x63 /* c */)) {\n if (this.regexp_eatClassControlLetter(state)) {\n return true\n }\n state.pos = start;\n }\n\n return (\n this.regexp_eatCharacterClassEscape(state) ||\n this.regexp_eatCharacterEscape(state)\n )\n};\n\n// https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-ClassControlLetter\npp$8.regexp_eatClassControlLetter = function(state) {\n var ch = state.current();\n if (isDecimalDigit(ch) || ch === 0x5F /* _ */) {\n state.lastIntValue = ch % 0x20;\n state.advance();\n return true\n }\n return false\n};\n\n// https://www.ecma-international.org/ecma-262/8.0/#prod-HexEscapeSequence\npp$8.regexp_eatHexEscapeSequence = function(state) {\n var start = state.pos;\n if (state.eat(0x78 /* x */)) {\n if (this.regexp_eatFixedHexDigits(state, 2)) {\n return true\n }\n if (state.switchU) {\n state.raise(\"Invalid escape\");\n }\n state.pos = start;\n }\n return false\n};\n\n// https://www.ecma-international.org/ecma-262/8.0/#prod-DecimalDigits\npp$8.regexp_eatDecimalDigits = function(state) {\n var start = state.pos;\n var ch = 0;\n state.lastIntValue = 0;\n while (isDecimalDigit(ch = state.current())) {\n state.lastIntValue = 10 * state.lastIntValue + (ch - 0x30 /* 0 */);\n state.advance();\n }\n return state.pos !== start\n};\nfunction isDecimalDigit(ch) {\n return ch >= 0x30 /* 0 */ && ch <= 0x39 /* 9 */\n}\n\n// https://www.ecma-international.org/ecma-262/8.0/#prod-HexDigits\npp$8.regexp_eatHexDigits = function(state) {\n var start = state.pos;\n var ch = 0;\n state.lastIntValue = 0;\n while (isHexDigit(ch = state.current())) {\n state.lastIntValue = 16 * state.lastIntValue + hexToInt(ch);\n state.advance();\n }\n return state.pos !== start\n};\nfunction isHexDigit(ch) {\n return (\n (ch >= 0x30 /* 0 */ && ch <= 0x39 /* 9 */) ||\n (ch >= 0x41 /* A */ && ch <= 0x46 /* F */) ||\n (ch >= 0x61 /* a */ && ch <= 0x66 /* f */)\n )\n}\nfunction hexToInt(ch) {\n if (ch >= 0x41 /* A */ && ch <= 0x46 /* F */) {\n return 10 + (ch - 0x41 /* A */)\n }\n if (ch >= 0x61 /* a */ && ch <= 0x66 /* f */) {\n return 10 + (ch - 0x61 /* a */)\n }\n return ch - 0x30 /* 0 */\n}\n\n// https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-LegacyOctalEscapeSequence\n// Allows only 0-377(octal) i.e. 0-255(decimal).\npp$8.regexp_eatLegacyOctalEscapeSequence = function(state) {\n if (this.regexp_eatOctalDigit(state)) {\n var n1 = state.lastIntValue;\n if (this.regexp_eatOctalDigit(state)) {\n var n2 = state.lastIntValue;\n if (n1 <= 3 && this.regexp_eatOctalDigit(state)) {\n state.lastIntValue = n1 * 64 + n2 * 8 + state.lastIntValue;\n } else {\n state.lastIntValue = n1 * 8 + n2;\n }\n } else {\n state.lastIntValue = n1;\n }\n return true\n }\n return false\n};\n\n// https://www.ecma-international.org/ecma-262/8.0/#prod-OctalDigit\npp$8.regexp_eatOctalDigit = function(state) {\n var ch = state.current();\n if (isOctalDigit(ch)) {\n state.lastIntValue = ch - 0x30; /* 0 */\n state.advance();\n return true\n }\n state.lastIntValue = 0;\n return false\n};\nfunction isOctalDigit(ch) {\n return ch >= 0x30 /* 0 */ && ch <= 0x37 /* 7 */\n}\n\n// https://www.ecma-international.org/ecma-262/8.0/#prod-Hex4Digits\n// https://www.ecma-international.org/ecma-262/8.0/#prod-HexDigit\n// And HexDigit HexDigit in https://www.ecma-international.org/ecma-262/8.0/#prod-HexEscapeSequence\npp$8.regexp_eatFixedHexDigits = function(state, length) {\n var start = state.pos;\n state.lastIntValue = 0;\n for (var i = 0; i < length; ++i) {\n var ch = state.current();\n if (!isHexDigit(ch)) {\n state.pos = start;\n return false\n }\n state.lastIntValue = 16 * state.lastIntValue + hexToInt(ch);\n state.advance();\n }\n return true\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\nvar Token = function Token(p) {\n this.type = p.type;\n this.value = p.value;\n this.start = p.start;\n this.end = p.end;\n if (p.options.locations)\n { this.loc = new SourceLocation(p, p.startLoc, p.endLoc); }\n if (p.options.ranges)\n { this.range = [p.start, p.end]; }\n};\n\n// ## Tokenizer\n\nvar pp$9 = Parser.prototype;\n\n// Move to the next token\n\npp$9.next = function(ignoreEscapeSequenceInKeyword) {\n if (!ignoreEscapeSequenceInKeyword && this.type.keyword && this.containsEsc)\n { this.raiseRecoverable(this.start, \"Escape sequence in keyword \" + this.type.keyword); }\n if (this.options.onToken)\n { this.options.onToken(new Token(this)); }\n\n this.lastTokEnd = this.end;\n this.lastTokStart = this.start;\n this.lastTokEndLoc = this.endLoc;\n this.lastTokStartLoc = this.startLoc;\n this.nextToken();\n};\n\npp$9.getToken = function() {\n this.next();\n return new Token(this)\n};\n\n// If we're in an ES6 environment, make parsers iterable\nif (typeof Symbol !== \"undefined\")\n { pp$9[Symbol.iterator] = function() {\n var this$1 = this;\n\n return {\n next: function () {\n var token = this$1.getToken();\n return {\n done: token.type === types.eof,\n value: token\n }\n }\n }\n }; }\n\n// Toggle strict mode. Re-reads the next number or string to please\n// pedantic tests (`\"use strict\"; 010;` should fail).\n\npp$9.curContext = function() {\n return this.context[this.context.length - 1]\n};\n\n// Read a single token, updating the parser object's token-related\n// properties.\n\npp$9.nextToken = function() {\n var curContext = this.curContext();\n if (!curContext || !curContext.preserveSpace) { this.skipSpace(); }\n\n this.start = this.pos;\n if (this.options.locations) { this.startLoc = this.curPosition(); }\n if (this.pos >= this.input.length) { return this.finishToken(types.eof) }\n\n if (curContext.override) { return curContext.override(this) }\n else { this.readToken(this.fullCharCodeAtPos()); }\n};\n\npp$9.readToken = function(code) {\n // Identifier or keyword. '\\uXXXX' sequences are allowed in\n // identifiers, so '\\' also dispatches to that.\n if (isIdentifierStart(code, this.options.ecmaVersion >= 6) || code === 92 /* '\\' */)\n { return this.readWord() }\n\n return this.getTokenFromCode(code)\n};\n\npp$9.fullCharCodeAtPos = function() {\n var code = this.input.charCodeAt(this.pos);\n if (code <= 0xd7ff || code >= 0xdc00) { return code }\n var next = this.input.charCodeAt(this.pos + 1);\n return next <= 0xdbff || next >= 0xe000 ? code : (code << 10) + next - 0x35fdc00\n};\n\npp$9.skipBlockComment = function() {\n var startLoc = this.options.onComment && this.curPosition();\n var start = this.pos, end = this.input.indexOf(\"*/\", this.pos += 2);\n if (end === -1) { this.raise(this.pos - 2, \"Unterminated comment\"); }\n this.pos = end + 2;\n if (this.options.locations) {\n lineBreakG.lastIndex = start;\n var match;\n while ((match = lineBreakG.exec(this.input)) && match.index < this.pos) {\n ++this.curLine;\n this.lineStart = match.index + match[0].length;\n }\n }\n if (this.options.onComment)\n { this.options.onComment(true, this.input.slice(start + 2, end), start, this.pos,\n startLoc, this.curPosition()); }\n};\n\npp$9.skipLineComment = function(startSkip) {\n var start = this.pos;\n var startLoc = this.options.onComment && this.curPosition();\n var ch = this.input.charCodeAt(this.pos += startSkip);\n while (this.pos < this.input.length && !isNewLine(ch)) {\n ch = this.input.charCodeAt(++this.pos);\n }\n if (this.options.onComment)\n { this.options.onComment(false, this.input.slice(start + startSkip, this.pos), start, this.pos,\n startLoc, this.curPosition()); }\n};\n\n// Called at the start of the parse and after every token. Skips\n// whitespace and comments, and.\n\npp$9.skipSpace = function() {\n loop: while (this.pos < this.input.length) {\n var ch = this.input.charCodeAt(this.pos);\n switch (ch) {\n case 32: case 160: // ' '\n ++this.pos;\n break\n case 13:\n if (this.input.charCodeAt(this.pos + 1) === 10) {\n ++this.pos;\n }\n case 10: case 8232: case 8233:\n ++this.pos;\n if (this.options.locations) {\n ++this.curLine;\n this.lineStart = this.pos;\n }\n break\n case 47: // '/'\n switch (this.input.charCodeAt(this.pos + 1)) {\n case 42: // '*'\n this.skipBlockComment();\n break\n case 47:\n this.skipLineComment(2);\n break\n default:\n break loop\n }\n break\n default:\n if (ch > 8 && ch < 14 || ch >= 5760 && nonASCIIwhitespace.test(String.fromCharCode(ch))) {\n ++this.pos;\n } else {\n break loop\n }\n }\n }\n};\n\n// Called at the end of every token. Sets `end`, `val`, and\n// maintains `context` and `exprAllowed`, and skips the space after\n// the token, so that the next one's `start` will point at the\n// right position.\n\npp$9.finishToken = function(type, val) {\n this.end = this.pos;\n if (this.options.locations) { this.endLoc = this.curPosition(); }\n var prevType = this.type;\n this.type = type;\n this.value = val;\n\n this.updateContext(prevType);\n};\n\n// ### Token reading\n\n// This is the function that is called to fetch the next token. It\n// is somewhat obscure, because it works in character codes rather\n// than characters, and because operator parsing has been inlined\n// into it.\n//\n// All in the name of speed.\n//\npp$9.readToken_dot = function() {\n var next = this.input.charCodeAt(this.pos + 1);\n if (next >= 48 && next <= 57) { return this.readNumber(true) }\n var next2 = this.input.charCodeAt(this.pos + 2);\n if (this.options.ecmaVersion >= 6 && next === 46 && next2 === 46) { // 46 = dot '.'\n this.pos += 3;\n return this.finishToken(types.ellipsis)\n } else {\n ++this.pos;\n return this.finishToken(types.dot)\n }\n};\n\npp$9.readToken_slash = function() { // '/'\n var next = this.input.charCodeAt(this.pos + 1);\n if (this.exprAllowed) { ++this.pos; return this.readRegexp() }\n if (next === 61) { return this.finishOp(types.assign, 2) }\n return this.finishOp(types.slash, 1)\n};\n\npp$9.readToken_mult_modulo_exp = function(code) { // '%*'\n var next = this.input.charCodeAt(this.pos + 1);\n var size = 1;\n var tokentype = code === 42 ? types.star : types.modulo;\n\n // exponentiation operator ** and **=\n if (this.options.ecmaVersion >= 7 && code === 42 && next === 42) {\n ++size;\n tokentype = types.starstar;\n next = this.input.charCodeAt(this.pos + 2);\n }\n\n if (next === 61) { return this.finishOp(types.assign, size + 1) }\n return this.finishOp(tokentype, size)\n};\n\npp$9.readToken_pipe_amp = function(code) { // '|&'\n var next = this.input.charCodeAt(this.pos + 1);\n if (next === code) {\n if (this.options.ecmaVersion >= 12) {\n var next2 = this.input.charCodeAt(this.pos + 2);\n if (next2 === 61) { return this.finishOp(types.assign, 3) }\n }\n return this.finishOp(code === 124 ? types.logicalOR : types.logicalAND, 2)\n }\n if (next === 61) { return this.finishOp(types.assign, 2) }\n return this.finishOp(code === 124 ? types.bitwiseOR : types.bitwiseAND, 1)\n};\n\npp$9.readToken_caret = function() { // '^'\n var next = this.input.charCodeAt(this.pos + 1);\n if (next === 61) { return this.finishOp(types.assign, 2) }\n return this.finishOp(types.bitwiseXOR, 1)\n};\n\npp$9.readToken_plus_min = function(code) { // '+-'\n var next = this.input.charCodeAt(this.pos + 1);\n if (next === code) {\n if (next === 45 && !this.inModule && this.input.charCodeAt(this.pos + 2) === 62 &&\n (this.lastTokEnd === 0 || lineBreak.test(this.input.slice(this.lastTokEnd, this.pos)))) {\n // A `-->` line comment\n this.skipLineComment(3);\n this.skipSpace();\n return this.nextToken()\n }\n return this.finishOp(types.incDec, 2)\n }\n if (next === 61) { return this.finishOp(types.assign, 2) }\n return this.finishOp(types.plusMin, 1)\n};\n\npp$9.readToken_lt_gt = function(code) { // '<>'\n var next = this.input.charCodeAt(this.pos + 1);\n var size = 1;\n if (next === code) {\n size = code === 62 && this.input.charCodeAt(this.pos + 2) === 62 ? 3 : 2;\n if (this.input.charCodeAt(this.pos + size) === 61) { return this.finishOp(types.assign, size + 1) }\n return this.finishOp(types.bitShift, size)\n }\n if (next === 33 && code === 60 && !this.inModule && this.input.charCodeAt(this.pos + 2) === 45 &&\n this.input.charCodeAt(this.pos + 3) === 45) {\n // `'\n\t},\n\tunclosed_attribute_value: (token: string) => ({\n\t\tcode: 'unclosed-attribute-value',\n\t\tmessage: `Expected to close the attribute value with ${token}`\n\t}),\n\tunexpected_block_close: {\n\t\tcode: 'unexpected-block-close',\n\t\tmessage: 'Unexpected block closing tag'\n\t},\n\tunexpected_eof: {\n\t\tcode: 'unexpected-eof',\n\t\tmessage: 'Unexpected end of input'\n\t},\n\tunexpected_eof_token: (token: string) => ({\n\t\tcode: 'unexpected-eof',\n\t\tmessage: `Unexpected ${token}`\n\t}),\n\tunexpected_token: (token: string) => ({\n\t\tcode: 'unexpected-token',\n\t\tmessage: `Expected ${token}`\n\t}),\n\tunexpected_token_destructure: {\n\t\tcode: 'unexpected-token',\n\t\tmessage: 'Expected identifier or destructure pattern'\n\t}\n};\n","// @ts-check\n/** @typedef { import('estree').BaseNode} BaseNode */\n\n/** @typedef {{\n\tskip: () => void;\n\tremove: () => void;\n\treplace: (node: BaseNode) => void;\n}} WalkerContext */\n\nexport class WalkerBase {\n\tconstructor() {\n\t\t/** @type {boolean} */\n\t\tthis.should_skip = false;\n\n\t\t/** @type {boolean} */\n\t\tthis.should_remove = false;\n\n\t\t/** @type {BaseNode | null} */\n\t\tthis.replacement = null;\n\n\t\t/** @type {WalkerContext} */\n\t\tthis.context = {\n\t\t\tskip: () => (this.should_skip = true),\n\t\t\tremove: () => (this.should_remove = true),\n\t\t\treplace: (node) => (this.replacement = node)\n\t\t};\n\t}\n\n\t/**\n\t *\n\t * @param {any} parent\n\t * @param {string} prop\n\t * @param {number} index\n\t * @param {BaseNode} node\n\t */\n\treplace(parent, prop, index, node) {\n\t\tif (parent) {\n\t\t\tif (index !== null) {\n\t\t\t\tparent[prop][index] = node;\n\t\t\t} else {\n\t\t\t\tparent[prop] = node;\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t *\n\t * @param {any} parent\n\t * @param {string} prop\n\t * @param {number} index\n\t */\n\tremove(parent, prop, index) {\n\t\tif (parent) {\n\t\t\tif (index !== null) {\n\t\t\t\tparent[prop].splice(index, 1);\n\t\t\t} else {\n\t\t\t\tdelete parent[prop];\n\t\t\t}\n\t\t}\n\t}\n}\n","// @ts-check\nimport { WalkerBase } from './walker.js';\n\n/** @typedef { import('estree').BaseNode} BaseNode */\n/** @typedef { import('./walker.js').WalkerContext} WalkerContext */\n\n/** @typedef {(\n * this: WalkerContext,\n * node: BaseNode,\n * parent: BaseNode,\n * key: string,\n * index: number\n * ) => void} SyncHandler */\n\nexport class SyncWalker extends WalkerBase {\n\t/**\n\t *\n\t * @param {SyncHandler} enter\n\t * @param {SyncHandler} leave\n\t */\n\tconstructor(enter, leave) {\n\t\tsuper();\n\n\t\t/** @type {SyncHandler} */\n\t\tthis.enter = enter;\n\n\t\t/** @type {SyncHandler} */\n\t\tthis.leave = leave;\n\t}\n\n\t/**\n\t *\n\t * @param {BaseNode} node\n\t * @param {BaseNode} parent\n\t * @param {string} [prop]\n\t * @param {number} [index]\n\t * @returns {BaseNode}\n\t */\n\tvisit(node, parent, prop, index) {\n\t\tif (node) {\n\t\t\tif (this.enter) {\n\t\t\t\tconst _should_skip = this.should_skip;\n\t\t\t\tconst _should_remove = this.should_remove;\n\t\t\t\tconst _replacement = this.replacement;\n\t\t\t\tthis.should_skip = false;\n\t\t\t\tthis.should_remove = false;\n\t\t\t\tthis.replacement = null;\n\n\t\t\t\tthis.enter.call(this.context, node, parent, prop, index);\n\n\t\t\t\tif (this.replacement) {\n\t\t\t\t\tnode = this.replacement;\n\t\t\t\t\tthis.replace(parent, prop, index, node);\n\t\t\t\t}\n\n\t\t\t\tif (this.should_remove) {\n\t\t\t\t\tthis.remove(parent, prop, index);\n\t\t\t\t}\n\n\t\t\t\tconst skipped = this.should_skip;\n\t\t\t\tconst removed = this.should_remove;\n\n\t\t\t\tthis.should_skip = _should_skip;\n\t\t\t\tthis.should_remove = _should_remove;\n\t\t\t\tthis.replacement = _replacement;\n\n\t\t\t\tif (skipped) return node;\n\t\t\t\tif (removed) return null;\n\t\t\t}\n\n\t\t\tfor (const key in node) {\n\t\t\t\tconst value = node[key];\n\n\t\t\t\tif (typeof value !== \"object\") {\n\t\t\t\t\tcontinue;\n\t\t\t\t} else if (Array.isArray(value)) {\n\t\t\t\t\tfor (let i = 0; i < value.length; i += 1) {\n\t\t\t\t\t\tif (value[i] !== null && typeof value[i].type === 'string') {\n\t\t\t\t\t\t\tif (!this.visit(value[i], node, key, i)) {\n\t\t\t\t\t\t\t\t// removed\n\t\t\t\t\t\t\t\ti--;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else if (value !== null && typeof value.type === \"string\") {\n\t\t\t\t\tthis.visit(value, node, key, null);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (this.leave) {\n\t\t\t\tconst _replacement = this.replacement;\n\t\t\t\tconst _should_remove = this.should_remove;\n\t\t\t\tthis.replacement = null;\n\t\t\t\tthis.should_remove = false;\n\n\t\t\t\tthis.leave.call(this.context, node, parent, prop, index);\n\n\t\t\t\tif (this.replacement) {\n\t\t\t\t\tnode = this.replacement;\n\t\t\t\t\tthis.replace(parent, prop, index, node);\n\t\t\t\t}\n\n\t\t\t\tif (this.should_remove) {\n\t\t\t\t\tthis.remove(parent, prop, index);\n\t\t\t\t}\n\n\t\t\t\tconst removed = this.should_remove;\n\n\t\t\t\tthis.replacement = _replacement;\n\t\t\t\tthis.should_remove = _should_remove;\n\n\t\t\t\tif (removed) return null;\n\t\t\t}\n\t\t}\n\n\t\treturn node;\n\t}\n}\n","// @ts-check\nimport { SyncWalker } from './sync.js';\nimport { AsyncWalker } from './async.js';\n\n/** @typedef { import('estree').BaseNode} BaseNode */\n/** @typedef { import('./sync.js').SyncHandler} SyncHandler */\n/** @typedef { import('./async.js').AsyncHandler} AsyncHandler */\n\n/**\n *\n * @param {BaseNode} ast\n * @param {{\n * enter?: SyncHandler\n * leave?: SyncHandler\n * }} walker\n * @returns {BaseNode}\n */\nexport function walk(ast, { enter, leave }) {\n\tconst instance = new SyncWalker(enter, leave);\n\treturn instance.visit(ast, null);\n}\n\n/**\n *\n * @param {BaseNode} ast\n * @param {{\n * enter?: AsyncHandler\n * leave?: AsyncHandler\n * }} walker\n * @returns {Promise}\n */\nexport async function asyncWalk(ast, { enter, leave }) {\n\tconst instance = new AsyncWalker(enter, leave);\n\treturn await instance.visit(ast, null);\n}\n","// generate an ID that is, to all intents and purposes, unique\nexport const id = (Math.round(Math.random() * 1e20)).toString(36);\nexport const re = new RegExp(`_${id}_(?:(\\\\d+)|(AT)|(HASH))_(\\\\w+)?`, 'g');\n","import { re } from './id.js';\n\n/** @typedef {import('estree').Comment} Comment */\n/** @typedef {import('estree').Node} Node */\n\n/**\n * @typedef {Node & {\n * start: number;\n * end: number;\n * has_trailing_newline?: boolean\n * }} NodeWithLocation\n */\n\n/**\n * @typedef {Comment & {\n * start: number;\n * end: number;\n * has_trailing_newline?: boolean\n * }} CommentWithLocation\n */\n\n/**\n * @param {CommentWithLocation[]} comments\n * @param {string} raw\n */\nexport const get_comment_handlers = (comments, raw) => ({\n\n\t// pass to acorn options\n\t/**\n\t * @param {boolean} block\n\t * @param {string} value\n\t * @param {number} start\n\t * @param {number} end\n\t */\n\tonComment: (block, value, start, end) => {\n\t\tif (block && /\\n/.test(value)) {\n\t\t\tlet a = start;\n\t\t\twhile (a > 0 && raw[a - 1] !== '\\n') a -= 1;\n\n\t\t\tlet b = a;\n\t\t\twhile (/[ \\t]/.test(raw[b])) b += 1;\n\n\t\t\tconst indentation = raw.slice(a, b);\n\t\t\tvalue = value.replace(new RegExp(`^${indentation}`, 'gm'), '');\n\t\t}\n\n\t\tcomments.push({ type: block ? 'Block' : 'Line', value, start, end });\n\t},\n\n\t// pass to estree-walker options\n\t/** @param {NodeWithLocation} node */\n\tenter(node) {\n\t\tlet comment;\n\n\t\twhile (comments[0] && comments[0].start < node.start) {\n\t\t\tcomment = comments.shift();\n\n\t\t\tcomment.value = comment.value.replace(re, (match, id, at, hash, value) => {\n\t\t\t\tif (hash) return `#${value}`;\n\t\t\t\tif (at) return `@${value}`;\n\n\t\t\t\treturn match;\n\t\t\t});\n\n\t\t\tconst next = comments[0] || node;\n\t\t\tcomment.has_trailing_newline = (\n\t\t\t\tcomment.type === 'Line' ||\n\t\t\t\t/\\n/.test(raw.slice(comment.end, next.start))\n\t\t\t);\n\n\t\t\t(node.leadingComments || (node.leadingComments = [])).push(comment);\n\t\t}\n\t},\n\n\t/** @param {NodeWithLocation} node */\n\tleave(node) {\n\t\tif (comments[0]) {\n\t\t\tconst slice = raw.slice(node.end, comments[0].start);\n\n\t\t\tif (/^[,) \\t]*$/.test(slice)) {\n\t\t\t\tnode.trailingComments = [comments.shift()];\n\t\t\t}\n\t\t}\n\t}\n});\n","//@ts-check\n/** @typedef { import('estree').Node} Node */\n/** @typedef {Node | {\n * type: 'PropertyDefinition';\n * computed: boolean;\n * value: Node\n * }} NodeWithPropertyDefinition */\n\n/**\n *\n * @param {NodeWithPropertyDefinition} node\n * @param {NodeWithPropertyDefinition} parent\n * @returns boolean\n */\nexport default function is_reference (node, parent) {\n\tif (node.type === 'MemberExpression') {\n\t\treturn !node.computed && is_reference(node.object, node);\n\t}\n\n\tif (node.type === 'Identifier') {\n\t\tif (!parent) return true;\n\n\t\tswitch (parent.type) {\n\t\t\t// disregard `bar` in `foo.bar`\n\t\t\tcase 'MemberExpression': return parent.computed || node === parent.object;\n\n\t\t\t// disregard the `foo` in `class {foo(){}}` but keep it in `class {[foo](){}}`\n\t\t\tcase 'MethodDefinition': return parent.computed;\n\n\t\t\t// disregard the `foo` in `class {foo=bar}` but keep it in `class {[foo]=bar}` and `class {bar=foo}`\n\t\t\tcase 'PropertyDefinition': return parent.computed || node === parent.value;\n\n\t\t\t// disregard the `bar` in `{ bar: foo }`, but keep it in `{ [bar]: foo }`\n\t\t\tcase 'Property': return parent.computed || node === parent.value;\n\n\t\t\t// disregard the `bar` in `export { foo as bar }` or\n\t\t\t// the foo in `import { foo as bar }`\n\t\t\tcase 'ExportSpecifier':\n\t\t\tcase 'ImportSpecifier': return node === parent.local;\n\n\t\t\t// disregard the `foo` in `foo: while (...) { ... break foo; ... continue foo;}`\n\t\t\tcase 'LabeledStatement':\n\t\t\tcase 'BreakStatement':\n\t\t\tcase 'ContinueStatement': return false;\n\t\t\tdefault: return true;\n\t\t}\n\t}\n\n\treturn false;\n}\n","import { walk } from 'estree-walker';\nimport is_reference from 'is-reference';\n\n/** @param {import('estree').Node} expression */\nexport function analyze(expression) {\n\t/** @typedef {import('estree').Node} Node */\n\n\t/** @type {WeakMap} */\n\tconst map = new WeakMap();\n\n\t/** @type {Map} */\n\tconst globals = new Map();\n\n\tconst scope = new Scope(null, false);\n\n\t/** @type {[Scope, import('estree').Identifier][]} */\n\tconst references = [];\n\tlet current_scope = scope;\n\n\twalk(expression, {\n\t\t/**\n\t\t * @param {Node} node\n\t\t * @param {any} parent\n\t\t */\n\t\tenter(node, parent) {\n\t\t\tswitch (node.type) {\n\t\t\t\tcase 'Identifier':\n\t\t\t\t\tif (is_reference(node, parent)) {\n\t\t\t\t\t\treferences.push([current_scope, node]);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'ImportDeclaration':\n\t\t\t\t\tnode.specifiers.forEach((specifier) => {\n\t\t\t\t\t\tcurrent_scope.declarations.set(specifier.local.name, specifier);\n\t\t\t\t\t});\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'FunctionExpression':\n\t\t\t\tcase 'FunctionDeclaration':\n\t\t\t\tcase 'ArrowFunctionExpression':\n\t\t\t\t\tif (node.type === 'FunctionDeclaration') {\n\t\t\t\t\t\tif (node.id) {\n\t\t\t\t\t\t\tcurrent_scope.declarations.set(node.id.name, node);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tmap.set(node, current_scope = new Scope(current_scope, false));\n\t\t\t\t\t} else {\n\t\t\t\t\t\tmap.set(node, current_scope = new Scope(current_scope, false));\n\n\t\t\t\t\t\tif (node.type === 'FunctionExpression' && node.id) {\n\t\t\t\t\t\t\tcurrent_scope.declarations.set(node.id.name, node);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tnode.params.forEach(param => {\n\t\t\t\t\t\textract_names(param).forEach(name => {\n\t\t\t\t\t\t\tcurrent_scope.declarations.set(name, node);\n\t\t\t\t\t\t});\n\t\t\t\t\t});\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'ForStatement':\n\t\t\t\tcase 'ForInStatement':\n\t\t\t\tcase 'ForOfStatement':\n\t\t\t\t\tmap.set(node, current_scope = new Scope(current_scope, true));\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'BlockStatement':\n\t\t\t\t\tmap.set(node, current_scope = new Scope(current_scope, true));\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'ClassDeclaration':\n\t\t\t\tcase 'VariableDeclaration':\n\t\t\t\t\tcurrent_scope.add_declaration(node);\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'CatchClause':\n\t\t\t\t\tmap.set(node, current_scope = new Scope(current_scope, true));\n\n\t\t\t\t\tif (node.param) {\n\t\t\t\t\t\textract_names(node.param).forEach(name => {\n\t\t\t\t\t\t\tcurrent_scope.declarations.set(name, node.param);\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t},\n\n\t\t/** @param {Node} node */\n\t\tleave(node) {\n\t\t\tif (map.has(node)) {\n\t\t\t\tcurrent_scope = current_scope.parent;\n\t\t\t}\n\t\t}\n\t});\n\n\tfor (let i = references.length - 1; i >= 0; --i) {\n\t\tconst [scope, reference] = references[i];\n\n\t\tif (!scope.references.has(reference.name)) {\n\t\t\tadd_reference(scope, reference.name);\n\t\t}\n\t\tif (!scope.find_owner(reference.name)) {\n\t\t\tglobals.set(reference.name, reference);\n\t\t}\n\t}\n\n\treturn { map, scope, globals };\n}\n\n/**\n *\n * @param {Scope} scope\n * @param {string} name\n */\nfunction add_reference(scope, name) {\n\tscope.references.add(name);\n\tif (scope.parent) add_reference(scope.parent, name);\n}\n\nexport class Scope {\n\tconstructor(parent, block) {\n\t\t/** @type {Scope | null} */\n\t\tthis.parent = parent;\n\n\t\t/** @type {boolean} */\n\t\tthis.block = block;\n\n\t\t/** @type {Map} */\n\t\tthis.declarations = new Map();\n\n\t\t/** @type {Set} */\n\t\tthis.initialised_declarations = new Set();\n\n\t\t/** @type {Set} */\n\t\tthis.references = new Set();\n\t}\n\n\t/** @param {import('estree').VariableDeclaration | import('estree').ClassDeclaration} node */\n\tadd_declaration(node) {\n\t\tif (node.type === 'VariableDeclaration') {\n\t\t\tif (node.kind === 'var' && this.block && this.parent) {\n\t\t\t\tthis.parent.add_declaration(node);\n\t\t\t} else {\n\t\t\t\t/** @param {import('estree').VariableDeclarator} declarator */\n\t\t\t\tconst handle_declarator = (declarator) => {\n\t\t\t\t\textract_names(declarator.id).forEach(name => {\n\t\t\t\t\t\tthis.declarations.set(name, node);\n\t\t\t\t\t\tif (declarator.init) this.initialised_declarations.add(name);\n\t\t\t\t\t});;\n\t\t\t\t}\n\n\t\t\t\tnode.declarations.forEach(handle_declarator);\n\t\t\t}\n\t\t} else if (node.id) {\n\t\t\tthis.declarations.set(node.id.name, node);\n\t\t}\n\t}\n\n\t/**\n\t * @param {string} name\n\t * @returns {Scope | null}\n\t */\n\tfind_owner(name) {\n\t\tif (this.declarations.has(name)) return this;\n\t\treturn this.parent && this.parent.find_owner(name);\n\t}\n\n\t/**\n\t * @param {string} name\n\t * @returns {boolean}\n\t */\n\thas(name) {\n\t\treturn (\n\t\t\tthis.declarations.has(name) || (!!this.parent && this.parent.has(name))\n\t\t);\n\t}\n}\n\n/**\n * @param {import('estree').Node} param\n * @returns {string[]}\n */\nexport function extract_names(param) {\n\treturn extract_identifiers(param).map(node => node.name);\n}\n\n/**\n * @param {import('estree').Node} param\n * @param {import('estree').Identifier[]} nodes\n * @returns {import('estree').Identifier[]}\n */\nexport function extract_identifiers(param, nodes = []) {\n\tswitch (param.type) {\n\t\tcase 'Identifier':\n\t\t\tnodes.push(param);\n\t\t\tbreak;\n\n\t\tcase 'MemberExpression':\n\t\t\tlet object = param;\n\t\t\twhile (object.type === 'MemberExpression') {\n\t\t\t\tobject = /** @type {any} */ (object.object);\n\t\t\t}\n\t\t\tnodes.push(/** @type {any} */ (object));\n\t\t\tbreak;\n\n\t\tcase 'ObjectPattern':\n\t\t\t/** @param {import('estree').Property | import('estree').RestElement} prop */\n\t\t\tconst handle_prop = (prop) => {\n\t\t\t\tif (prop.type === 'RestElement') {\n\t\t\t\t\textract_identifiers(prop.argument, nodes);\n\t\t\t\t} else {\n\t\t\t\t\textract_identifiers(prop.value, nodes);\n\t\t\t\t}\n\t\t\t};\n\n\t\t\tparam.properties.forEach(handle_prop);\n\t\t\tbreak;\n\n\t\tcase 'ArrayPattern':\n\t\t\t/** @param {import('estree').Node} element */\n\t\t\tconst handle_element = (element) => {\n\t\t\t\tif (element) extract_identifiers(element, nodes);\n\t\t\t};\n\n\t\t\tparam.elements.forEach(handle_element);\n\t\t\tbreak;\n\n\t\tcase 'RestElement':\n\t\t\textract_identifiers(param.argument, nodes);\n\t\t\tbreak;\n\n\t\tcase 'AssignmentPattern':\n\t\t\textract_identifiers(param.left, nodes);\n\t\t\tbreak;\n\t}\n\n\treturn nodes;\n}\n","/**\n * Does `array.push` for all `items`. Needed because `array.push(...items)` throws\n * \"Maximum call stack size exceeded\" when `items` is too big of an array.\n *\n * @param {any[]} array \n * @param {any[]} items \n */\nexport function push_array(array, items) {\n\tfor (let i = 0; i < items.length; i++) {\n\t\tarray.push(items[i]);\n\t}\n};\n","// heavily based on https://github.com/davidbonnet/astring\n// released under MIT license https://github.com/davidbonnet/astring/blob/master/LICENSE\n\nimport { re } from '../utils/id.js';\nimport { push_array } from '../utils/push_array.js';\n\n/** @typedef {import('estree').ArrowFunctionExpression} ArrowFunctionExpression */\n/** @typedef {import('estree').BinaryExpression} BinaryExpression */\n/** @typedef {import('estree').CallExpression} CallExpression */\n/** @typedef {import('estree').Comment} Comment */\n/** @typedef {import('estree').ExportSpecifier} ExportSpecifier */\n/** @typedef {import('estree').Expression} Expression */\n/** @typedef {import('estree').FunctionDeclaration} FunctionDeclaration */\n/** @typedef {import('estree').ImportDeclaration} ImportDeclaration */\n/** @typedef {import('estree').ImportSpecifier} ImportSpecifier */\n/** @typedef {import('estree').Literal} Literal */\n/** @typedef {import('estree').LogicalExpression} LogicalExpression */\n/** @typedef {import('estree').NewExpression} NewExpression */\n/** @typedef {import('estree').Node} Node */\n/** @typedef {import('estree').ObjectExpression} ObjectExpression */\n/** @typedef {import('estree').Pattern} Pattern */\n/** @typedef {import('estree').SequenceExpression} SequenceExpression */\n/** @typedef {import('estree').SimpleCallExpression} SimpleCallExpression */\n/** @typedef {import('estree').SwitchStatement} SwitchStatement */\n/** @typedef {import('estree').VariableDeclaration} VariableDeclaration */\n\n/**\n * @typedef {{\n * content: string;\n * loc?: {\n * start: { line: number; column: number; };\n * end: { line: number; column: number; };\n * };\n * has_newline: boolean;\n * }} Chunk\n */\n\n/**\n * @typedef {(node: any, state: State) => Chunk[]} Handler\n */\n\n/**\n * @typedef {{\n * indent: string;\n * scope: any; // TODO import from periscopic\n * scope_map: WeakMap;\n * getName: (name: string) => string;\n * deconflicted: WeakMap>;\n * comments: Comment[];\n * }} State\n */\n\n/**\n * @param {Node} node\n * @param {State} state\n * @returns {Chunk[]}\n */\nexport function handle(node, state) {\n\tconst handler = handlers[node.type];\n\n\tif (!handler) {\n\t\tthrow new Error(`Not implemented ${node.type}`);\n\t}\n\n\tconst result = handler(node, state);\n\n\tif (node.leadingComments) {\n\t\tresult.unshift(c(node.leadingComments.map(comment => comment.type === 'Block'\n\t\t\t? `/*${comment.value}*/${/** @type {any} */ (comment).has_trailing_newline ? `\\n${state.indent}` : ` `}`\n\t\t\t: `//${comment.value}${/** @type {any} */ (comment).has_trailing_newline ? `\\n${state.indent}` : ` `}`).join(``)));\n\t}\n\n\tif (node.trailingComments) {\n\t\tstate.comments.push(node.trailingComments[0]); // there is only ever one\n\t}\n\n\treturn result;\n}\n\n/**\n * @param {string} content\n * @param {Node} [node]\n * @returns {Chunk}\n */\nfunction c(content, node) {\n\treturn {\n\t\tcontent,\n\t\tloc: node && node.loc,\n\t\thas_newline: /\\n/.test(content)\n\t};\n}\n\nconst OPERATOR_PRECEDENCE = {\n\t'||': 2,\n\t'&&': 3,\n\t'??': 4,\n\t'|': 5,\n\t'^': 6,\n\t'&': 7,\n\t'==': 8,\n\t'!=': 8,\n\t'===': 8,\n\t'!==': 8,\n\t'<': 9,\n\t'>': 9,\n\t'<=': 9,\n\t'>=': 9,\n\tin: 9,\n\tinstanceof: 9,\n\t'<<': 10,\n\t'>>': 10,\n\t'>>>': 10,\n\t'+': 11,\n\t'-': 11,\n\t'*': 12,\n\t'%': 12,\n\t'/': 12,\n\t'**': 13,\n};\n\n/** @type {Record} */\nconst EXPRESSIONS_PRECEDENCE = {\n\tArrayExpression: 20,\n\tTaggedTemplateExpression: 20,\n\tThisExpression: 20,\n\tIdentifier: 20,\n\tLiteral: 18,\n\tTemplateLiteral: 20,\n\tSuper: 20,\n\tSequenceExpression: 20,\n\tMemberExpression: 19,\n\tCallExpression: 19,\n\tNewExpression: 19,\n\tAwaitExpression: 17,\n\tClassExpression: 17,\n\tFunctionExpression: 17,\n\tObjectExpression: 17,\n\tUpdateExpression: 16,\n\tUnaryExpression: 15,\n\tBinaryExpression: 14,\n\tLogicalExpression: 13,\n\tConditionalExpression: 4,\n\tArrowFunctionExpression: 3,\n\tAssignmentExpression: 3,\n\tYieldExpression: 2,\n\tRestElement: 1\n};\n\n/**\n *\n * @param {Expression} node\n * @param {BinaryExpression | LogicalExpression} parent\n * @param {boolean} is_right\n * @returns\n */\nfunction needs_parens(node, parent, is_right) {\n\t// special case where logical expressions and coalesce expressions cannot be mixed,\n\t// either of them need to be wrapped with parentheses\n\tif (\n\t\tnode.type === 'LogicalExpression' &&\n\t\tparent.type === 'LogicalExpression' &&\n\t\t((parent.operator === '??' && node.operator !== '??') ||\n\t\t\t(parent.operator !== '??' && node.operator === '??'))\n\t) {\n\t\treturn true;\n\t}\n\n\tconst precedence = EXPRESSIONS_PRECEDENCE[node.type];\n\tconst parent_precedence = EXPRESSIONS_PRECEDENCE[parent.type];\n\n\tif (precedence !== parent_precedence) {\n\t\t// Different node types\n\t\treturn (\n\t\t\t(!is_right &&\n\t\t\t\tprecedence === 15 &&\n\t\t\t\tparent_precedence === 14 &&\n\t\t\t\tparent.operator === '**') ||\n\t\t\tprecedence < parent_precedence\n\t\t);\n\t}\n\n\tif (precedence !== 13 && precedence !== 14) {\n\t\t// Not a `LogicalExpression` or `BinaryExpression`\n\t\treturn false;\n\t}\n\n\tif (/** @type {BinaryExpression} */ (node).operator === '**' && parent.operator === '**') {\n\t\t// Exponentiation operator has right-to-left associativity\n\t\treturn !is_right;\n\t}\n\n\tif (is_right) {\n\t\t// Parenthesis are used if both operators have the same precedence\n\t\treturn (\n\t\t\tOPERATOR_PRECEDENCE[/** @type {BinaryExpression} */ (node).operator] <=\n\t\t\tOPERATOR_PRECEDENCE[parent.operator]\n\t\t);\n\t}\n\n\treturn (\n\t\tOPERATOR_PRECEDENCE[/** @type {BinaryExpression} */ (node).operator] <\n\t\tOPERATOR_PRECEDENCE[parent.operator]\n\t);\n}\n\n/** @param {Node} node */\nfunction has_call_expression(node) {\n\twhile (node) {\n\t\tif (node.type[0] === 'CallExpression') {\n\t\t\treturn true;\n\t\t} else if (node.type === 'MemberExpression') {\n\t\t\tnode = node.object;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}\n}\n\n/** @param {Chunk[]} chunks */\nconst has_newline = (chunks) => {\n\tfor (let i = 0; i < chunks.length; i += 1) {\n\t\tif (chunks[i].has_newline) return true;\n\t}\n\treturn false;\n};\n\n/** @param {Chunk[]} chunks */\nconst get_length = (chunks) => {\n\tlet total = 0;\n\tfor (let i = 0; i < chunks.length; i += 1) {\n\t\ttotal += chunks[i].content.length;\n\t}\n\treturn total;\n};\n\n/**\n * @param {number} a\n * @param {number} b\n */\nconst sum = (a, b) => a + b;\n\n/**\n * @param {Chunk[][]} nodes\n * @param {Chunk} separator\n * @returns {Chunk[]}\n */\nconst join = (nodes, separator) => {\n\tif (nodes.length === 0) return [];\n\n\tconst joined = [...nodes[0]];\n\tfor (let i = 1; i < nodes.length; i += 1) {\n\t\tjoined.push(separator);\n\t\tpush_array(joined, nodes[i]);\n\t}\n\treturn joined;\n};\n\n/**\n * @param {(node: any, state: State) => Chunk[]} fn\n */\nconst scoped = (fn) => {\n\t/**\n\t * @param {any} node\n\t * @param {State} state\n\t */\n\tconst scoped_fn = (node, state) => {\n\t\treturn fn(node, {\n\t\t\t...state,\n\t\t\tscope: state.scope_map.get(node)\n\t\t});\n\t};\n\n\treturn scoped_fn;\n};\n\n/**\n * @param {string} name\n * @param {Set} names\n */\nconst deconflict = (name, names) => {\n\tconst original = name;\n\tlet i = 1;\n\n\twhile (names.has(name)) {\n\t\tname = `${original}$${i++}`;\n\t}\n\n\treturn name;\n};\n\n/**\n * @param {Node[]} nodes\n * @param {State} state\n */\nconst handle_body = (nodes, state) => {\n\tconst chunks = [];\n\n\tconst body = nodes.map(statement => {\n\t\tconst chunks = handle(statement, {\n\t\t\t...state,\n\t\t\tindent: state.indent\n\t\t});\n\n\t\tlet add_newline = false;\n\n\t\twhile (state.comments.length) {\n\t\t\tconst comment = state.comments.shift();\n\t\t\tconst prefix = add_newline ? `\\n${state.indent}` : ` `;\n\n\t\t\tchunks.push(c(comment.type === 'Block'\n\t\t\t\t? `${prefix}/*${comment.value}*/`\n\t\t\t\t: `${prefix}//${comment.value}`));\n\n\t\t\tadd_newline = (comment.type === 'Line');\n\t\t}\n\n\t\treturn chunks;\n\t});\n\n\tlet needed_padding = false;\n\n\tfor (let i = 0; i < body.length; i += 1) {\n\t\tconst needs_padding = has_newline(body[i]);\n\n\t\tif (i > 0) {\n\t\t\tchunks.push(\n\t\t\t\tc(needs_padding || needed_padding ? `\\n\\n${state.indent}` : `\\n${state.indent}`)\n\t\t\t);\n\t\t}\n\n\t\tpush_array(chunks, body[i]);\n\n\t\tneeded_padding = needs_padding;\n\t}\n\n\treturn chunks;\n};\n\n/**\n * @param {VariableDeclaration} node\n * @param {State} state\n */\nconst handle_var_declaration = (node, state) => {\n\tconst chunks = [c(`${node.kind} `)];\n\n\tconst declarators = node.declarations.map(d => handle(d, {\n\t\t...state,\n\t\tindent: state.indent + (node.declarations.length === 1 ? '' : '\\t')\n\t}));\n\n\tconst multiple_lines = (\n\t\tdeclarators.some(has_newline) ||\n\t\t(declarators.map(get_length).reduce(sum, 0) + (state.indent.length + declarators.length - 1) * 2) > 80\n\t);\n\n\tconst separator = c(multiple_lines ? `,\\n${state.indent}\\t` : ', ');\n\n\tpush_array(chunks, join(declarators, separator));\n\n\treturn chunks;\n};\n\n/** @type {Record} */\nconst handlers = {\n\tProgram(node, state) {\n\t\treturn handle_body(node.body, state);\n\t},\n\n\tBlockStatement: scoped((node, state) => {\n\t\treturn [\n\t\t\tc(`{\\n${state.indent}\\t`),\n\t\t\t...handle_body(node.body, { ...state, indent: state.indent + '\\t' }),\n\t\t\tc(`\\n${state.indent}}`)\n\t\t];\n\t}),\n\n\tEmptyStatement(node, state) {\n\t\treturn [c(';')];\n\t},\n\n\tParenthesizedExpression(node, state) {\n\t\treturn handle(node.expression, state);\n\t},\n\n\tExpressionStatement(node, state) {\n\t\tif (\n\t\t\tnode.expression.type === 'AssignmentExpression' &&\n\t\t\tnode.expression.left.type === 'ObjectPattern'\n\t\t) {\n\t\t\t// is an AssignmentExpression to an ObjectPattern\n\t\t\treturn [\n\t\t\t\tc('('),\n\t\t\t\t...handle(node.expression, state),\n\t\t\t\tc(');')\n\t\t\t];\n\t\t}\n\n\t\treturn [\n\t\t\t...handle(node.expression, state),\n\t\t\tc(';')\n\t\t];\n\t},\n\n\tIfStatement(node, state) {\n\t\tconst chunks = [\n\t\t\tc('if ('),\n\t\t\t...handle(node.test, state),\n\t\t\tc(') '),\n\t\t\t...handle(node.consequent, state)\n\t\t];\n\n\t\tif (node.alternate) {\n\t\t\tchunks.push(c(' else '));\n\t\t\tpush_array(chunks, handle(node.alternate, state));\n\t\t}\n\n\t\treturn chunks;\n\t},\n\n\tLabeledStatement(node, state) {\n\t\treturn [\n\t\t\t...handle(node.label, state),\n\t\t\tc(': '),\n\t\t\t...handle(node.body, state)\n\t\t];\n\t},\n\n\tBreakStatement(node, state) {\n\t\treturn node.label\n\t\t\t? [c('break '), ...handle(node.label, state), c(';')]\n\t\t\t: [c('break;')];\n\t},\n\n\tContinueStatement(node, state) {\n\t\treturn node.label\n\t\t\t? [c('continue '), ...handle(node.label, state), c(';')]\n\t\t\t: [c('continue;')];\n\t},\n\n\tWithStatement(node, state) {\n\t\treturn [\n\t\t\tc('with ('),\n\t\t\t...handle(node.object, state),\n\t\t\tc(') '),\n\t\t\t...handle(node.body, state)\n\t\t];\n\t},\n\n\tSwitchStatement(/** @type {SwitchStatement} */ node, state) {\n\t\tconst chunks = [\n\t\t\tc('switch ('),\n\t\t\t...handle(node.discriminant, state),\n\t\t\tc(') {')\n\t\t];\n\n\t\tnode.cases.forEach(block => {\n\t\t\tif (block.test) {\n\t\t\t\tchunks.push(c(`\\n${state.indent}\\tcase `));\n\t\t\t\tpush_array(chunks, handle(block.test, { ...state, indent: `${state.indent}\\t` }));\n\t\t\t\tchunks.push(c(':'));\n\t\t\t} else {\n\t\t\t\tchunks.push(c(`\\n${state.indent}\\tdefault:`))\n\t\t\t}\n\n\t\t\tblock.consequent.forEach(statement => {\n\t\t\t\tchunks.push(c(`\\n${state.indent}\\t\\t`));\n\t\t\t\tpush_array(chunks, handle(statement, { ...state, indent: `${state.indent}\\t\\t` }));\n\t\t\t});\n\t\t});\n\n\t\tchunks.push(c(`\\n${state.indent}}`));\n\n\t\treturn chunks;\n\t},\n\n\tReturnStatement(node, state) {\n\t\tif (node.argument) {\n\t\t\tconst contains_comment = node.argument.leadingComments && node.argument.leadingComments.some((/** @type import('../utils/comments.js').CommentWithLocation */ comment) => comment.has_trailing_newline);\n\t\t\treturn [\n\t\t\t\tc(contains_comment ? 'return (' : 'return '),\n\t\t\t\t...handle(node.argument, state),\n\t\t\t\tc(contains_comment ? ');' : ';')\n\t\t\t];\n\t\t} else {\n\t\t\treturn [c('return;')];\n\t\t}\n\t},\n\n\tThrowStatement(node, state) {\n\t\treturn [\n\t\t\tc('throw '),\n\t\t\t...handle(node.argument, state),\n\t\t\tc(';')\n\t\t];\n\t},\n\n\tTryStatement(node, state) {\n\t\tconst chunks = [\n\t\t\tc('try '),\n\t\t\t...handle(node.block, state)\n\t\t];\n\n\t\tif (node.handler) {\n\t\t\tif (node.handler.param) {\n\t\t\t\tchunks.push(c(' catch('));\n\t\t\t\tpush_array(chunks, handle(node.handler.param, state));\n\t\t\t\tchunks.push(c(') '));\n\t\t\t} else {\n\t\t\t\tchunks.push(c(' catch '));\n\t\t\t}\n\n\t\t\tpush_array(chunks, handle(node.handler.body, state));\n\t\t}\n\n\t\tif (node.finalizer) {\n\t\t\tchunks.push(c(' finally '));\n\t\t\tpush_array(chunks, handle(node.finalizer, state));\n\t\t}\n\n\t\treturn chunks;\n\t},\n\n\tWhileStatement(node, state) {\n\t\treturn [\n\t\t\tc('while ('),\n\t\t\t...handle(node.test, state),\n\t\t\tc(') '),\n\t\t\t...handle(node.body, state)\n\t\t];\n\t},\n\n\tDoWhileStatement(node, state) {\n\t\treturn [\n\t\t\tc('do '),\n\t\t\t...handle(node.body, state),\n\t\t\tc(' while ('),\n\t\t\t...handle(node.test, state),\n\t\t\tc(');')\n\t\t];\n\t},\n\n\tForStatement: scoped((node, state) => {\n\t\tconst chunks = [c('for (')];\n\n\t\tif (node.init) {\n\t\t\tif (node.init.type === 'VariableDeclaration') {\n\t\t\t\tpush_array(chunks, handle_var_declaration(node.init, state));\n\t\t\t} else {\n\t\t\t\tpush_array(chunks, handle(node.init, state));\n\t\t\t}\n\t\t}\n\n\t\tchunks.push(c('; '));\n\t\tif (node.test) push_array(chunks, handle(node.test, state));\n\t\tchunks.push(c('; '));\n\t\tif (node.update) push_array(chunks, handle(node.update, state));\n\n\t\tchunks.push(c(') '));\n\t\tpush_array(chunks, handle(node.body, state));\n\n\t\treturn chunks;\n\t}),\n\n\tForInStatement: scoped((node, state) => {\n\t\tconst chunks = [\n\t\t\tc(`for ${node.await ? 'await ' : ''}(`)\n\t\t];\n\n\t\tif (node.left.type === 'VariableDeclaration') {\n\t\t\tpush_array(chunks, handle_var_declaration(node.left, state));\n\t\t} else {\n\t\t\tpush_array(chunks, handle(node.left, state));\n\t\t}\n\n\t\tchunks.push(c(node.type === 'ForInStatement' ? ` in ` : ` of `));\n\t\tpush_array(chunks, handle(node.right, state));\n\t\tchunks.push(c(') '));\n\t\tpush_array(chunks, handle(node.body, state));\n\n\t\treturn chunks;\n\t}),\n\n\tDebuggerStatement(node, state) {\n\t\treturn [c('debugger', node), c(';')];\n\t},\n\n\tFunctionDeclaration: scoped((/** @type {FunctionDeclaration} */ node, state) => {\n\t\tconst chunks = [];\n\n\t\tif (node.async) chunks.push(c('async '));\n\t\tchunks.push(c(node.generator ? 'function* ' : 'function '));\n\t\tif (node.id) push_array(chunks, handle(node.id, state));\n\t\tchunks.push(c('('));\n\n\t\tconst params = node.params.map(p => handle(p, {\n\t\t\t...state,\n\t\t\tindent: state.indent + '\\t'\n\t\t}));\n\n\t\tconst multiple_lines = (\n\t\t\tparams.some(has_newline) ||\n\t\t\t(params.map(get_length).reduce(sum, 0) + (state.indent.length + params.length - 1) * 2) > 80\n\t\t);\n\n\t\tconst separator = c(multiple_lines ? `,\\n${state.indent}` : ', ');\n\n\t\tif (multiple_lines) {\n\t\t\tchunks.push(c(`\\n${state.indent}\\t`));\n\t\t\tpush_array(chunks, join(params, separator));\n\t\t\tchunks.push(c(`\\n${state.indent}`));\n\t\t} else {\n\t\t\tpush_array(chunks, join(params, separator));\n\t\t}\n\n\t\tchunks.push(c(') '));\n\t\tpush_array(chunks, handle(node.body, state));\n\n\t\treturn chunks;\n\t}),\n\n\tVariableDeclaration(node, state) {\n\t\treturn handle_var_declaration(node, state).concat(c(';'));\n\t},\n\n\tVariableDeclarator(node, state) {\n\t\tif (node.init) {\n\t\t\treturn [\n\t\t\t\t...handle(node.id, state),\n\t\t\t\tc(' = '),\n\t\t\t\t...handle(node.init, state)\n\t\t\t];\n\t\t} else {\n\t\t\treturn handle(node.id, state);\n\t\t}\n\t},\n\n\tClassDeclaration(node, state) {\n\t\tconst chunks = [c('class ')];\n\n\t\tif (node.id) {\n\t\t\tpush_array(chunks, handle(node.id, state));\n\t\t\tchunks.push(c(' '));\n\t\t}\n\n\t\tif (node.superClass) {\n\t\t\tchunks.push(c('extends '));\n\t\t\tpush_array(chunks, handle(node.superClass, state));\n\t\t\tchunks.push(c(' '));\n\t\t}\n\n\t\tpush_array(chunks, handle(node.body, state));\n\n\t\treturn chunks;\n\t},\n\n\tImportDeclaration(/** @type {ImportDeclaration} */ node, state) {\n\t\tconst chunks = [c('import ')];\n\n\t\tconst { length } = node.specifiers;\n\t\tconst source = handle(node.source, state);\n\n\t\tif (length > 0) {\n\t\t\tlet i = 0;\n\n\t\t\twhile (i < length) {\n\t\t\t\tif (i > 0) {\n\t\t\t\t\tchunks.push(c(', '));\n\t\t\t\t}\n\n\t\t\t\tconst specifier = node.specifiers[i];\n\n\t\t\t\tif (specifier.type === 'ImportDefaultSpecifier') {\n\t\t\t\t\tchunks.push(c(specifier.local.name, specifier));\n\t\t\t\t\ti += 1;\n\t\t\t\t} else if (specifier.type === 'ImportNamespaceSpecifier') {\n\t\t\t\t\tchunks.push(c('* as ' + specifier.local.name, specifier));\n\t\t\t\t\ti += 1;\n\t\t\t\t} else {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (i < length) {\n\t\t\t\t// we have named specifiers\n\t\t\t\tconst specifiers = node.specifiers.slice(i).map((/** @type {ImportSpecifier} */ specifier) => {\n\t\t\t\t\tconst name = handle(specifier.imported, state)[0];\n\t\t\t\t\tconst as = handle(specifier.local, state)[0];\n\n\t\t\t\t\tif (name.content === as.content) {\n\t\t\t\t\t\treturn [as];\n\t\t\t\t\t}\n\n\t\t\t\t\treturn [name, c(' as '), as];\n\t\t\t\t});\n\n\t\t\t\tconst width = get_length(chunks) + specifiers.map(get_length).reduce(sum, 0) + (2 * specifiers.length) + 6 + get_length(source);\n\n\t\t\t\tif (width > 80) {\n\t\t\t\t\tchunks.push(c(`{\\n\\t`));\n\t\t\t\t\tpush_array(chunks, join(specifiers, c(',\\n\\t')));\n\t\t\t\t\tchunks.push(c('\\n}'));\n\t\t\t\t} else {\n\t\t\t\t\tchunks.push(c(`{ `));\n\t\t\t\t\tpush_array(chunks, join(specifiers, c(', ')));\n\t\t\t\t\tchunks.push(c(' }'));\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tchunks.push(c(' from '));\n\t\t}\n\n\t\tpush_array(chunks, source);\n\t\tchunks.push(c(';'));\n\n\t\treturn chunks;\n\t},\n\n\tImportExpression(node, state) {\n\t\treturn [c('import('), ...handle(node.source, state), c(')')];\n\t},\n\n\tExportDefaultDeclaration(node, state) {\n\t\tconst chunks = [\n\t\t\tc(`export default `),\n\t\t\t...handle(node.declaration, state)\n\t\t];\n\n\t\tif (node.declaration.type !== 'FunctionDeclaration') {\n\t\t\tchunks.push(c(';'));\n\t\t}\n\n\t\treturn chunks;\n\t},\n\n\tExportNamedDeclaration(node, state) {\n\t\tconst chunks = [c('export ')];\n\n\t\tif (node.declaration) {\n\t\t\tpush_array(chunks, handle(node.declaration, state));\n\t\t} else {\n\t\t\tconst specifiers = node.specifiers.map((/** @type {ExportSpecifier} */ specifier) => {\n\t\t\t\tconst name = handle(specifier.local, state)[0];\n\t\t\t\tconst as = handle(specifier.exported, state)[0];\n\n\t\t\t\tif (name.content === as.content) {\n\t\t\t\t\treturn [name];\n\t\t\t\t}\n\n\t\t\t\treturn [name, c(' as '), as];\n\t\t\t});\n\n\t\t\tconst width = 7 + specifiers.map(get_length).reduce(sum, 0) + 2 * specifiers.length;\n\n\t\t\tif (width > 80) {\n\t\t\t\tchunks.push(c('{\\n\\t'));\n\t\t\t\tpush_array(chunks, join(specifiers, c(',\\n\\t')));\n\t\t\t\tchunks.push(c('\\n}'));\n\t\t\t} else {\n\t\t\t\tchunks.push(c('{ '));\n\t\t\t\tpush_array(chunks, join(specifiers, c(', ')));\n\t\t\t\tchunks.push(c(' }'));\n\t\t\t}\n\n\t\t\tif (node.source) {\n\t\t\t\tchunks.push(c(' from '));\n\t\t\t\tpush_array(chunks, handle(node.source, state));\n\t\t\t}\n\t\t}\n\n\t\tchunks.push(c(';'));\n\n\t\treturn chunks;\n\t},\n\n\tExportAllDeclaration(node, state) {\n\t\treturn [\n\t\t\tc(`export * from `),\n\t\t\t...handle(node.source, state),\n\t\t\tc(`;`)\n\t\t];\n\t},\n\n\tMethodDefinition(node, state) {\n\t\tconst chunks = [];\n\n\t\tif (node.static) {\n\t\t\tchunks.push(c('static '));\n\t\t}\n\n\t\tif (node.kind === 'get' || node.kind === 'set') {\n\t\t\t// Getter or setter\n\t\t\tchunks.push(c(node.kind + ' '));\n\t\t}\n\n\t\tif (node.value.async) {\n\t\t\tchunks.push(c('async '));\n\t\t}\n\n\t\tif (node.value.generator) {\n\t\t\tchunks.push(c('*'));\n\t\t}\n\n\t\tif (node.computed) {\n\t\t\tchunks.push(c('['));\n\t\t\tpush_array(chunks, handle(node.key, state));\n\t\t\tchunks.push(c(']'));\n\t\t} else {\n\t\t\tpush_array(chunks, handle(node.key, state));\n\t\t}\n\n\t\tchunks.push(c('('));\n\n\t\tconst { params } = node.value;\n\t\tfor (let i = 0; i < params.length; i += 1) {\n\t\t\tpush_array(chunks, handle(params[i], state));\n\t\t\tif (i < params.length - 1) chunks.push(c(', '));\n\t\t}\n\n\t\tchunks.push(c(') '));\n\t\tpush_array(chunks, handle(node.value.body, state));\n\n\t\treturn chunks;\n\t},\n\n\tArrowFunctionExpression: scoped((/** @type {ArrowFunctionExpression} */ node, state) => {\n\t\tconst chunks = [];\n\n\t\tif (node.async) chunks.push(c('async '));\n\n\t\tif (node.params.length === 1 && node.params[0].type === 'Identifier') {\n\t\t\tpush_array(chunks, handle(node.params[0], state));\n\t\t} else {\n\t\t\tconst params = node.params.map(param => handle(param, {\n\t\t\t\t...state,\n\t\t\t\tindent: state.indent + '\\t'\n\t\t\t}));\n\n\t\t\tchunks.push(c('('));\n\t\t\tpush_array(chunks, join(params, c(', ')));\n\t\t\tchunks.push(c(')'));\n\t\t}\n\n\t\tchunks.push(c(' => '));\n\n\t\tif (\n\t\t\tnode.body.type === 'ObjectExpression' ||\n\t\t\t(node.body.type === 'AssignmentExpression' && node.body.left.type === 'ObjectPattern')\n\t\t) {\n\t\t\tchunks.push(c('('));\n\t\t\tpush_array(chunks, handle(node.body, state));\n\t\t\tchunks.push(c(')'));\n\t\t} else {\n\t\t\tpush_array(chunks, handle(node.body, state));\n\t\t}\n\n\t\treturn chunks;\n\t}),\n\n\tThisExpression(node, state) {\n\t\treturn [c('this', node)];\n\t},\n\n\tSuper(node, state) {\n\t\treturn [c('super', node)];\n\t},\n\n\tRestElement(node, state) {\n\t\treturn [c('...'), ...handle(node.argument, state)];\n\t},\n\n\tYieldExpression(node, state) {\n\t\tif (node.argument) {\n\t\t\treturn [c(node.delegate ? `yield* ` : `yield `), ...handle(node.argument, state)];\n\t\t}\n\n\t\treturn [c(node.delegate ? `yield*` : `yield`)];\n\t},\n\n\tAwaitExpression(node, state) {\n\t\tif (node.argument) {\n\t\t\tconst precedence = EXPRESSIONS_PRECEDENCE[node.argument.type];\n\n\t\t\tif (precedence && (precedence < EXPRESSIONS_PRECEDENCE.AwaitExpression)) {\n\t\t\t\treturn [c('await ('), ...handle(node.argument, state), c(')')];\n\t\t\t} else {\n\t\t\t\treturn [c('await '), ...handle(node.argument, state)];\n\t\t\t}\n\t\t}\n\n\t\treturn [c('await')];\n\t},\n\n\tTemplateLiteral(node, state) {\n\t\tconst chunks = [c('`')];\n\n\t\tconst { quasis, expressions } = node;\n\n\t\tfor (let i = 0; i < expressions.length; i++) {\n\t\t\tchunks.push(\n\t\t\t\tc(quasis[i].value.raw),\n\t\t\t\tc('${')\n\t\t\t);\n\t\t\tpush_array(chunks, handle(expressions[i], state));\n\t\t\tchunks.push(c('}'));\n\t\t}\n\n\t\tchunks.push(\n\t\t\tc(quasis[quasis.length - 1].value.raw),\n\t\t\tc('`')\n\t\t);\n\n\t\treturn chunks;\n\t},\n\n\tTaggedTemplateExpression(node, state) {\n\t\treturn handle(node.tag, state).concat(handle(node.quasi, state));\n\t},\n\n\tArrayExpression(node, state) {\n\t\tconst chunks = [c('[')];\n\n\t\t/** @type {Chunk[][]} */\n\t\tconst elements = [];\n\n\t\t/** @type {Chunk[]} */\n\t\tlet sparse_commas = [];\n\n\t\tfor (let i = 0; i < node.elements.length; i += 1) {\n\t\t\t// can't use map/forEach because of sparse arrays\n\t\t\tconst element = node.elements[i];\n\t\t\tif (element) {\n\t\t\t\telements.push([...sparse_commas, ...handle(element, {\n\t\t\t\t\t...state,\n\t\t\t\t\tindent: state.indent + '\\t'\n\t\t\t\t})]);\n\t\t\t\tsparse_commas = [];\n\t\t\t} else {\n\t\t\t\tsparse_commas.push(c(','));\n\t\t\t}\n\t\t}\n\n\t\tconst multiple_lines = (\n\t\t\telements.some(has_newline) ||\n\t\t\t(elements.map(get_length).reduce(sum, 0) + (state.indent.length + elements.length - 1) * 2) > 80\n\t\t);\n\n\t\tif (multiple_lines) {\n\t\t\tchunks.push(c(`\\n${state.indent}\\t`));\n\t\t\tpush_array(chunks, join(elements, c(`,\\n${state.indent}\\t`)));\n\t\t\tchunks.push(c(`\\n${state.indent}`));\n\t\t\tpush_array(chunks, sparse_commas);\n\t\t} else {\n\t\t\tpush_array(chunks, join(elements, c(', ')));\n\t\t\tpush_array(chunks, sparse_commas);\n\t\t}\n\n\t\tchunks.push(c(']'));\n\n\t\treturn chunks;\n\t},\n\n\tObjectExpression(/** @type {ObjectExpression} */ node, state) {\n\t\tif (node.properties.length === 0) {\n\t\t\treturn [c('{}')];\n\t\t}\n\n\t\tlet has_inline_comment = false;\n\n\t\t/** @type {Chunk[]} */\n\t\tconst chunks = [];\n\t\tconst separator = c(', ');\n\n\t\tnode.properties.forEach((p, i) => {\n\t\t\tpush_array(chunks, handle(p, {\n\t\t\t\t...state,\n\t\t\t\tindent: state.indent + '\\t'\n\t\t\t}));\n\n\t\t\tif (state.comments.length) {\n\t\t\t\t// TODO generalise this, so it works with ArrayExpressions and other things.\n\t\t\t\t// At present, stuff will just get appended to the closest statement/declaration\n\t\t\t\tchunks.push(c(', '));\n\n\t\t\t\twhile (state.comments.length) {\n\t\t\t\t\tconst comment = state.comments.shift();\n\n\t\t\t\t\tchunks.push(c(comment.type === 'Block'\n\t\t\t\t\t\t? `/*${comment.value}*/\\n${state.indent}\\t`\n\t\t\t\t\t\t: `//${comment.value}\\n${state.indent}\\t`));\n\n\t\t\t\t\tif (comment.type === 'Line') {\n\t\t\t\t\t\thas_inline_comment = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (i < node.properties.length - 1) {\n\t\t\t\t\tchunks.push(separator);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\tconst multiple_lines = (\n\t\t\thas_inline_comment ||\n\t\t\thas_newline(chunks) ||\n\t\t\tget_length(chunks) > 40\n\t\t);\n\n\t\tif (multiple_lines) {\n\t\t\tseparator.content = `,\\n${state.indent}\\t`;\n\t\t}\n\n\t\treturn [\n\t\t\tc(multiple_lines ? `{\\n${state.indent}\\t` : `{ `),\n\t\t\t...chunks,\n\t\t\tc(multiple_lines ? `\\n${state.indent}}` : ` }`)\n\t\t];\n\t},\n\n\tProperty(node, state) {\n\t\tconst value = handle(node.value, state);\n\n\t\tif (node.key === node.value) {\n\t\t\treturn value;\n\t\t}\n\n\t\t// special case\n\t\tif (\n\t\t\t!node.computed &&\n\t\t\tnode.value.type === 'AssignmentPattern' &&\n\t\t\tnode.value.left.type === 'Identifier' &&\n\t\t\tnode.value.left.name === node.key.name\n\t\t) {\n\t\t\treturn value;\n\t\t}\n\n\t\tif (!node.computed && node.value.type === 'Identifier' && (\n\t\t\t(node.key.type === 'Identifier' && node.key.name === value[0].content) ||\n\t\t\t(node.key.type === 'Literal' && node.key.value === value[0].content)\n\t\t)) {\n\t\t\treturn value;\n\t\t}\n\n\t\tconst key = handle(node.key, state);\n\n\t\tif (node.value.type === 'FunctionExpression' && !node.value.id) {\n\t\t\tstate = {\n\t\t\t\t...state,\n\t\t\t\tscope: state.scope_map.get(node.value)\n\t\t\t};\n\n\t\t\tconst chunks = node.kind !== 'init'\n\t\t\t\t? [c(`${node.kind} `)]\n\t\t\t\t: [];\n\n\t\t\tif (node.value.async) {\n\t\t\t\tchunks.push(c('async '));\n\t\t\t}\n\t\t\tif (node.value.generator) {\n\t\t\t\tchunks.push(c('*'));\n\t\t\t}\n\n\t\t\tpush_array(chunks, node.computed ? [c('['), ...key, c(']')] : key);\n\t\t\tchunks.push(c('('));\n\t\t\tpush_array(chunks, join(node.value.params.map((/** @type {Pattern} */ param) => handle(param, state)), c(', ')));\n\t\t\tchunks.push(c(') '));\n\t\t\tpush_array(chunks, handle(node.value.body, state));\n\n\t\t\treturn chunks;\n\t\t}\n\n\t\tif (node.computed) {\n\t\t\treturn [\n\t\t\t\tc('['),\n\t\t\t\t...key,\n\t\t\t\tc(']: '),\n\t\t\t\t...value\n\t\t\t];\n\t\t}\n\n\t\treturn [\n\t\t\t...key,\n\t\t\tc(': '),\n\t\t\t...value\n\t\t];\n\t},\n\n\tObjectPattern(node, state) {\n\t\tconst chunks = [c('{ ')];\n\n\t\tfor (let i = 0; i < node.properties.length; i += 1) {\n\t\t\tpush_array(chunks, handle(node.properties[i], state));\n\t\t\tif (i < node.properties.length - 1) chunks.push(c(', '));\n\t\t}\n\n\t\tchunks.push(c(' }'));\n\n\t\treturn chunks;\n\t},\n\n\tSequenceExpression(/** @type {SequenceExpression} */ node, state) {\n\t\tconst expressions = node.expressions.map(e => handle(e, state));\n\n\t\treturn [\n\t\t\tc('('),\n\t\t\t...join(expressions, c(', ')),\n\t\t\tc(')')\n\t\t];\n\t},\n\n\tUnaryExpression(node, state) {\n\t\tconst chunks = [c(node.operator)];\n\n\t\tif (node.operator.length > 1) {\n\t\t\tchunks.push(c(' '));\n\t\t}\n\n\t\tif (\n\t\t\tEXPRESSIONS_PRECEDENCE[node.argument.type] <\n\t\t\tEXPRESSIONS_PRECEDENCE.UnaryExpression\n\t\t) {\n\t\t\tchunks.push(c('('));\n\t\t\tpush_array(chunks, handle(node.argument, state));\n\t\t\tchunks.push(c(')'));\n\t\t} else {\n\t\t\tpush_array(chunks, handle(node.argument, state));\n\t\t}\n\n\t\treturn chunks;\n\t},\n\n\tUpdateExpression(node, state) {\n\t\treturn node.prefix\n\t\t\t? [c(node.operator), ...handle(node.argument, state)]\n\t\t\t: [...handle(node.argument, state), c(node.operator)];\n\t},\n\n\tAssignmentExpression(node, state) {\n\t\treturn [\n\t\t\t...handle(node.left, state),\n\t\t\tc(` ${node.operator || '='} `),\n\t\t\t...handle(node.right, state)\n\t\t];\n\t},\n\n\tBinaryExpression(node, state) {\n\t\t/**\n\t\t * @type any[]\n\t\t */\n\t\tconst chunks = [];\n\n\t\t// TODO\n\t\t// const is_in = node.operator === 'in';\n\t\t// if (is_in) {\n\t\t// \t// Avoids confusion in `for` loops initializers\n\t\t// \tchunks.push(c('('));\n\t\t// }\n\n\t\tif (needs_parens(node.left, node, false)) {\n\t\t\tchunks.push(c('('));\n\t\t\tpush_array(chunks, handle(node.left, state));\n\t\t\tchunks.push(c(')'));\n\t\t} else {\n\t\t\tpush_array(chunks, handle(node.left, state));\n\t\t}\n\n\t\tchunks.push(c(` ${node.operator} `));\n\n\t\tif (needs_parens(node.right, node, true)) {\n\t\t\tchunks.push(c('('));\n\t\t\tpush_array(chunks, handle(node.right, state));\n\t\t\tchunks.push(c(')'));\n\t\t} else {\n\t\t\tpush_array(chunks, handle(node.right, state));\n\t\t}\n\n\t\treturn chunks;\n\t},\n\n\tConditionalExpression(node, state) {\n\t\t/**\n\t\t * @type any[]\n\t\t */\n\t\tconst chunks = [];\n\n\t\tif (\n\t\t\tEXPRESSIONS_PRECEDENCE[node.test.type] >\n\t\t\tEXPRESSIONS_PRECEDENCE.ConditionalExpression\n\t\t) {\n\t\t\tpush_array(chunks, handle(node.test, state));\n\t\t} else {\n\t\t\tchunks.push(c('('));\n\t\t\tpush_array(chunks, handle(node.test, state));\n\t\t\tchunks.push(c(')'));\n\t\t}\n\n\t\tconst child_state = { ...state, indent: state.indent + '\\t' };\n\n\t\tconst consequent = handle(node.consequent, child_state);\n\t\tconst alternate = handle(node.alternate, child_state);\n\n\t\tconst multiple_lines = (\n\t\t\thas_newline(consequent) || has_newline(alternate) ||\n\t\t\tget_length(chunks) + get_length(consequent) + get_length(alternate) > 50\n\t\t);\n\n\t\tif (multiple_lines) {\n\t\t\tchunks.push(c(`\\n${state.indent}? `));\n\t\t\tpush_array(chunks, consequent);\n\t\t\tchunks.push(c(`\\n${state.indent}: `));\n\t\t\tpush_array(chunks, alternate);\n\t\t} else {\n\t\t\tchunks.push(c(` ? `));\n\t\t\tpush_array(chunks, consequent);\n\t\t\tchunks.push(c(` : `));\n\t\t\tpush_array(chunks, alternate);\n\t\t}\n\n\t\treturn chunks;\n\t},\n\n\tNewExpression(/** @type {NewExpression} */ node, state) {\n\t\tconst chunks = [c('new ')];\n\n\t\tif (\n\t\t\tEXPRESSIONS_PRECEDENCE[node.callee.type] <\n\t\t\tEXPRESSIONS_PRECEDENCE.CallExpression || has_call_expression(node.callee)\n\t\t) {\n\t\t\tchunks.push(c('('));\n\t\t\tpush_array(chunks, handle(node.callee, state));\n\t\t\tchunks.push(c(')'));\n\t\t} else {\n\t\t\tpush_array(chunks, handle(node.callee, state));\n\t\t}\n\n\t\t// TODO this is copied from CallExpression — DRY it out\n\t\tconst args = node.arguments.map(arg => handle(arg, {\n\t\t\t...state,\n\t\t\tindent: state.indent + '\\t'\n\t\t}));\n\n\t\tconst separator = args.some(has_newline) // TODO or length exceeds 80\n\t\t\t? c(',\\n' + state.indent)\n\t\t\t: c(', ');\n\n\t\tchunks.push(c('('));\n\t\tpush_array(chunks, join(args, separator));\n\t\tchunks.push(c(')'));\n\n\t\treturn chunks;\n\t},\n\n\tChainExpression(node, state) {\n\t\treturn handle(node.expression, state);\n\t},\n\n\tCallExpression(/** @type {CallExpression} */ node, state) {\n\t\t/**\n\t\t * @type any[]\n\t\t */\n\t\tconst chunks = [];\n\n\t\tif (\n\t\t\tEXPRESSIONS_PRECEDENCE[node.callee.type] <\n\t\t\tEXPRESSIONS_PRECEDENCE.CallExpression\n\t\t) {\n\t\t\tchunks.push(c('('));\n\t\t\tpush_array(chunks, handle(node.callee, state));\n\t\t\tchunks.push(c(')'));\n\t\t} else {\n\t\t\tpush_array(chunks, handle(node.callee, state));\n\t\t}\n\n\t\tif (/** @type {SimpleCallExpression} */ (node).optional) {\n\t\t\tchunks.push(c('?.'));\n\t\t}\n\n\t\tconst args = node.arguments.map(arg => handle(arg, state));\n\n\t\tconst multiple_lines = args.slice(0, -1).some(has_newline); // TODO or length exceeds 80\n\n\t\tif (multiple_lines) {\n\t\t\t// need to handle args again. TODO find alternative approach?\n\t\t\tconst args = node.arguments.map(arg => handle(arg, {\n\t\t\t\t...state,\n\t\t\t\tindent: `${state.indent}\\t`\n\t\t\t}));\n\n\t\t\tchunks.push(c(`(\\n${state.indent}\\t`));\n\t\t\tpush_array(chunks, join(args, c(`,\\n${state.indent}\\t`)));\n\t\t\tchunks.push(c(`\\n${state.indent})`));\n\t\t} else {\n\t\t\tchunks.push(c('('));\n\t\t\tpush_array(chunks, join(args, c(', ')));\n\t\t\tchunks.push(c(')'));\n\t\t}\n\n\t\treturn chunks;\n\t},\n\n\tMemberExpression(node, state) {\n\t\t/**\n\t\t * @type any[]\n\t\t */\n\t\tconst chunks = [];\n\n\t\tif (EXPRESSIONS_PRECEDENCE[node.object.type] < EXPRESSIONS_PRECEDENCE.MemberExpression) {\n\t\t\tchunks.push(c('('));\n\t\t\tpush_array(chunks, handle(node.object, state));\n\t\t\tchunks.push(c(')'));\n\t\t} else {\n\t\t\tpush_array(chunks, handle(node.object, state));\n\t\t}\n\n\t\tif (node.computed) {\n\t\t\tif (node.optional) {\n\t\t\t\tchunks.push(c('?.'));\n\t\t\t}\n\t\t\tchunks.push(c('['));\n\t\t\tpush_array(chunks, handle(node.property, state));\n\t\t\tchunks.push(c(']'));\n\t\t} else {\n\t\t\tchunks.push(c(node.optional ? '?.' : '.'));\n\t\t\tpush_array(chunks, handle(node.property, state));\n\t\t}\n\n\t\treturn chunks;\n\t},\n\n\tMetaProperty(node, state) {\n\t\treturn [...handle(node.meta, state), c('.'), ...handle(node.property, state)];\n\t},\n\n\tIdentifier(node, state) {\n\t\tlet name = node.name;\n\n\t\tif (name[0] === '@') {\n\t\t\tname = state.getName(name.slice(1));\n\t\t} else if (node.name[0] === '#') {\n\t\t\tconst owner = state.scope.find_owner(node.name);\n\n\t\t\tif (!owner) {\n\t\t\t\tthrow new Error(`Could not find owner for node`);\n\t\t\t}\n\n\t\t\tif (!state.deconflicted.has(owner)) {\n\t\t\t\tstate.deconflicted.set(owner, new Map());\n\t\t\t}\n\n\t\t\tconst deconflict_map = state.deconflicted.get(owner);\n\n\t\t\tif (!deconflict_map.has(node.name)) {\n\t\t\t\tdeconflict_map.set(node.name, deconflict(node.name.slice(1), owner.references));\n\t\t\t}\n\n\t\t\tname = deconflict_map.get(node.name);\n\t\t}\n\n\t\treturn [c(name, node)];\n\t},\n\n\tLiteral(/** @type {Literal} */ node, state) {\n\t\tif (typeof node.value === 'string') {\n\t\t\treturn [\n\t\t\t\t// TODO do we need to handle weird unicode characters somehow?\n\t\t\t\t// str.replace(/\\\\u(\\d{4})/g, (m, n) => String.fromCharCode(+n))\n\t\t\t\tc((node.raw || JSON.stringify(node.value)).replace(re, (_m, _i, at, hash, name) => {\n\t\t\t\t\tif (at)\treturn '@' + name;\n\t\t\t\t\tif (hash) return '#' + name;\n\t\t\t\t\tthrow new Error(`this shouldn't happen`);\n\t\t\t\t}), node)\n\t\t\t];\n\t\t}\n\n\t\treturn [c(node.raw || String(node.value), node)];\n\t}\n};\n\nhandlers.ForOfStatement = handlers.ForInStatement;\nhandlers.FunctionExpression = handlers.FunctionDeclaration;\nhandlers.ClassExpression = handlers.ClassDeclaration;\nhandlers.ClassBody = handlers.BlockStatement;\nhandlers.SpreadElement = handlers.RestElement;\nhandlers.ArrayPattern = handlers.ArrayExpression;\nhandlers.LogicalExpression = handlers.BinaryExpression;\nhandlers.AssignmentPattern = handlers.AssignmentExpression;\n","var charToInteger = {};\nvar chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';\nfor (var i = 0; i < chars.length; i++) {\n charToInteger[chars.charCodeAt(i)] = i;\n}\nfunction decode(mappings) {\n var decoded = [];\n var line = [];\n var segment = [\n 0,\n 0,\n 0,\n 0,\n 0,\n ];\n var j = 0;\n for (var i = 0, shift = 0, value = 0; i < mappings.length; i++) {\n var c = mappings.charCodeAt(i);\n if (c === 44) { // \",\"\n segmentify(line, segment, j);\n j = 0;\n }\n else if (c === 59) { // \";\"\n segmentify(line, segment, j);\n j = 0;\n decoded.push(line);\n line = [];\n segment[0] = 0;\n }\n else {\n var integer = charToInteger[c];\n if (integer === undefined) {\n throw new Error('Invalid character (' + String.fromCharCode(c) + ')');\n }\n var hasContinuationBit = integer & 32;\n integer &= 31;\n value += integer << shift;\n if (hasContinuationBit) {\n shift += 5;\n }\n else {\n var shouldNegate = value & 1;\n value >>>= 1;\n if (shouldNegate) {\n value = value === 0 ? -0x80000000 : -value;\n }\n segment[j] += value;\n j++;\n value = shift = 0; // reset\n }\n }\n }\n segmentify(line, segment, j);\n decoded.push(line);\n return decoded;\n}\nfunction segmentify(line, segment, j) {\n // This looks ugly, but we're creating specialized arrays with a specific\n // length. This is much faster than creating a new array (which v8 expands to\n // a capacity of 17 after pushing the first item), or slicing out a subarray\n // (which is slow). Length 4 is assumed to be the most frequent, followed by\n // length 5 (since not everything will have an associated name), followed by\n // length 1 (it's probably rare for a source substring to not have an\n // associated segment data).\n if (j === 4)\n line.push([segment[0], segment[1], segment[2], segment[3]]);\n else if (j === 5)\n line.push([segment[0], segment[1], segment[2], segment[3], segment[4]]);\n else if (j === 1)\n line.push([segment[0]]);\n}\nfunction encode(decoded) {\n var sourceFileIndex = 0; // second field\n var sourceCodeLine = 0; // third field\n var sourceCodeColumn = 0; // fourth field\n var nameIndex = 0; // fifth field\n var mappings = '';\n for (var i = 0; i < decoded.length; i++) {\n var line = decoded[i];\n if (i > 0)\n mappings += ';';\n if (line.length === 0)\n continue;\n var generatedCodeColumn = 0; // first field\n var lineMappings = [];\n for (var _i = 0, line_1 = line; _i < line_1.length; _i++) {\n var segment = line_1[_i];\n var segmentMappings = encodeInteger(segment[0] - generatedCodeColumn);\n generatedCodeColumn = segment[0];\n if (segment.length > 1) {\n segmentMappings +=\n encodeInteger(segment[1] - sourceFileIndex) +\n encodeInteger(segment[2] - sourceCodeLine) +\n encodeInteger(segment[3] - sourceCodeColumn);\n sourceFileIndex = segment[1];\n sourceCodeLine = segment[2];\n sourceCodeColumn = segment[3];\n }\n if (segment.length === 5) {\n segmentMappings += encodeInteger(segment[4] - nameIndex);\n nameIndex = segment[4];\n }\n lineMappings.push(segmentMappings);\n }\n mappings += lineMappings.join(',');\n }\n return mappings;\n}\nfunction encodeInteger(num) {\n var result = '';\n num = num < 0 ? (-num << 1) | 1 : num << 1;\n do {\n var clamped = num & 31;\n num >>>= 5;\n if (num > 0) {\n clamped |= 32;\n }\n result += chars[clamped];\n } while (num > 0);\n return result;\n}\n\nexport { decode, encode };\n//# sourceMappingURL=sourcemap-codec.es.js.map\n","import * as perisopic from 'periscopic';\nimport { handle } from './handlers.js';\nimport { encode } from 'sourcemap-codec';\n\n/** @type {(str?: string) => string} str */\nlet btoa = () => {\n\tthrow new Error('Unsupported environment: `window.btoa` or `Buffer` should be supported.');\n};\n\nif (typeof window !== 'undefined' && typeof window.btoa === 'function') {\n\tbtoa = (str) => window.btoa(unescape(encodeURIComponent(str)));\n} else if (typeof Buffer === 'function') {\n\tbtoa = (str) => Buffer.from(str, 'utf-8').toString('base64');\n}\n\n/** @typedef {import('estree').Node} Node */\n\n/**\n * @typedef {{\n * file?: string;\n * sourceMapSource?: string;\n * sourceMapContent?: string;\n * sourceMapEncodeMappings?: boolean; // default true\n * getName?: (name: string) => string;\n * }} PrintOptions\n */\n\n/**\n * @param {Node} node\n * @param {PrintOptions} opts\n * @returns {{ code: string, map: any }} // TODO\n */\nexport function print(node, opts = {}) {\n\tif (Array.isArray(node)) {\n\t\treturn print({\n\t\t\ttype: 'Program',\n\t\t\tbody: node,\n\t\t\tsourceType: 'module'\n\t\t}, opts);\n\t}\n\n\tconst {\n\t\tgetName = /** @param {string} x */ (x) => {\n\t\t\tthrow new Error(`Unhandled sigil @${x}`);\n\t\t}\n\t} = opts;\n\n\tlet { map: scope_map, scope } = perisopic.analyze(node);\n\tconst deconflicted = new WeakMap();\n\n\tconst chunks = handle(node, {\n\t\tindent: '',\n\t\tgetName,\n\t\tscope,\n\t\tscope_map,\n\t\tdeconflicted,\n\t\tcomments: []\n\t});\n\n\t/** @typedef {[number, number, number, number]} Segment */\n\n\tlet code = '';\n\tlet current_column = 0;\n\n\t/** @type {Segment[][]} */\n\tlet mappings = [];\n\n\t/** @type {Segment[]} */\n\tlet current_line = [];\n\n\tfor (let i = 0; i < chunks.length; i += 1) {\n\t\tconst chunk = chunks[i];\n\n\t\tcode += chunk.content;\n\n\t\tif (chunk.loc) {\n\t\t\tcurrent_line.push([\n\t\t\t\tcurrent_column,\n\t\t\t\t0, // source index is always zero\n\t\t\t\tchunk.loc.start.line - 1,\n\t\t\t\tchunk.loc.start.column,\n\t\t\t]);\n\t\t}\n\n\t\tfor (let i = 0; i < chunk.content.length; i += 1) {\n\t\t\tif (chunk.content[i] === '\\n') {\n\t\t\t\tmappings.push(current_line);\n\t\t\t\tcurrent_line = [];\n\t\t\t\tcurrent_column = 0;\n\t\t\t} else {\n\t\t\t\tcurrent_column += 1;\n\t\t\t}\n\t\t}\n\n\t\tif (chunk.loc) {\n\t\t\tcurrent_line.push([\n\t\t\t\tcurrent_column,\n\t\t\t\t0, // source index is always zero\n\t\t\t\tchunk.loc.end.line - 1,\n\t\t\t\tchunk.loc.end.column,\n\t\t\t]);\n\t\t}\n\t}\n\n\tmappings.push(current_line);\n\n\tconst map = {\n\t\tversion: 3,\n\t\t/** @type {string[]} */\n\t\tnames: [],\n\t\tsources: [opts.sourceMapSource || null],\n\t\tsourcesContent: [opts.sourceMapContent || null],\n\t\tmappings: opts.sourceMapEncodeMappings == undefined || opts.sourceMapEncodeMappings\n\t\t\t? encode(mappings) : mappings\n\t};\n\n\tObject.defineProperties(map, {\n\t\ttoString: {\n\t\t\tenumerable: false,\n\t\t\tvalue: function toString() {\n\t\t\t\treturn JSON.stringify(this);\n\t\t\t}\n\t\t},\n\t\ttoUrl: {\n\t\t\tenumerable: false,\n\t\t\tvalue: function toUrl() {\n\t\t\t\treturn 'data:application/json;charset=utf-8;base64,' + btoa(this.toString());\n\t\t\t}\n\t\t}\n\t});\n\n\treturn {\n\t\tcode,\n\t\tmap\n\t};\n}","import * as acorn from 'acorn';\nimport { walk } from 'estree-walker';\nimport { id, re } from './utils/id.js';\nimport { get_comment_handlers } from './utils/comments.js';\n\n/** @typedef {import('estree').Expression} Expression */\n/** @typedef {import('estree').Node} Node */\n/** @typedef {import('estree').ObjectExpression} ObjectExpression */\n/** @typedef {import('estree').Property} Property */\n/** @typedef {import('estree').SpreadElement} SpreadElement */\n\n/** @typedef {import('./utils/comments').CommentWithLocation} CommentWithLocation */\n\n/** @type {Record} */\nconst sigils = {\n\t'@': 'AT',\n\t'#': 'HASH'\n};\n\n/** @param {TemplateStringsArray} strings */\nconst join = (strings) => {\n\tlet str = strings[0];\n\tfor (let i = 1; i < strings.length; i += 1) {\n\t\tstr += `_${id}_${i - 1}_${strings[i]}`;\n\t}\n\treturn str.replace(\n\t\t/([@#])(\\w+)/g,\n\t\t(_m, sigil, name) => `_${id}_${sigils[sigil]}_${name}`\n\t);\n};\n\n/**\n * @param {any[]} array\n * @param {any[]} target\n */\nconst flatten_body = (array, target) => {\n\tfor (let i = 0; i < array.length; i += 1) {\n\t\tconst statement = array[i];\n\t\tif (Array.isArray(statement)) {\n\t\t\tflatten_body(statement, target);\n\t\t\tcontinue;\n\t\t}\n\n\t\tif (statement.type === 'ExpressionStatement') {\n\t\t\tif (statement.expression === EMPTY) continue;\n\n\t\t\tif (Array.isArray(statement.expression)) {\n\t\t\t\t// TODO this is hacktacular\n\t\t\t\tlet node = statement.expression[0];\n\t\t\t\twhile (Array.isArray(node)) node = node[0];\n\t\t\t\tif (node) node.leadingComments = statement.leadingComments;\n\n\t\t\t\tflatten_body(statement.expression, target);\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif (/(Expression|Literal)$/.test(statement.expression.type)) {\n\t\t\t\ttarget.push(statement);\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif (statement.leadingComments)\n\t\t\t\tstatement.expression.leadingComments = statement.leadingComments;\n\t\t\tif (statement.trailingComments)\n\t\t\t\tstatement.expression.trailingComments = statement.trailingComments;\n\n\t\t\ttarget.push(statement.expression);\n\t\t\tcontinue;\n\t\t}\n\n\t\ttarget.push(statement);\n\t}\n\n\treturn target;\n};\n\n/**\n * @param {any[]} array\n * @param {any[]} target\n */\nconst flatten_properties = (array, target) => {\n\tfor (let i = 0; i < array.length; i += 1) {\n\t\tconst property = array[i];\n\n\t\tif (property.value === EMPTY) continue;\n\n\t\tif (property.key === property.value && Array.isArray(property.key)) {\n\t\t\tflatten_properties(property.key, target);\n\t\t\tcontinue;\n\t\t}\n\n\t\ttarget.push(property);\n\t}\n\n\treturn target;\n};\n\n/**\n * @param {any[]} nodes\n * @param {any[]} target\n */\nconst flatten = (nodes, target) => {\n\tfor (let i = 0; i < nodes.length; i += 1) {\n\t\tconst node = nodes[i];\n\n\t\tif (node === EMPTY) continue;\n\n\t\tif (Array.isArray(node)) {\n\t\t\tflatten(node, target);\n\t\t\tcontinue;\n\t\t}\n\n\t\ttarget.push(node);\n\t}\n\n\treturn target;\n};\n\nconst EMPTY = { type: 'Empty' };\n\n/**\n *\n * @param {CommentWithLocation[]} comments\n * @param {string} raw\n * @returns {any}\n */\nconst acorn_opts = (comments, raw) => {\n\tconst { onComment } = get_comment_handlers(comments, raw);\n\treturn {\n\t\tecmaVersion: 2020,\n\t\tsourceType: 'module',\n\t\tallowAwaitOutsideFunction: true,\n\t\tallowImportExportEverywhere: true,\n\t\tallowReturnOutsideFunction: true,\n\t\tonComment\n\t};\n};\n\n/**\n * @param {string} raw\n * @param {Node} node\n * @param {any[]} values\n * @param {CommentWithLocation[]} comments\n */\nconst inject = (raw, node, values, comments) => {\n\tcomments.forEach((comment) => {\n\t\tcomment.value = comment.value.replace(re, (m, i) =>\n\t\t\t+i in values ? values[+i] : m\n\t\t);\n\t});\n\n\tconst { enter, leave } = get_comment_handlers(comments, raw);\n\n\treturn walk(node, {\n\t\tenter,\n\n\t\t/** @param {any} node */\n\t\tleave(node) {\n\t\t\tif (node.type === 'Identifier') {\n\t\t\t\tre.lastIndex = 0;\n\t\t\t\tconst match = re.exec(node.name);\n\n\t\t\t\tif (match) {\n\t\t\t\t\tif (match[1]) {\n\t\t\t\t\t\tif (+match[1] in values) {\n\t\t\t\t\t\t\tlet value = values[+match[1]];\n\n\t\t\t\t\t\t\tif (typeof value === 'string') {\n\t\t\t\t\t\t\t\tvalue = {\n\t\t\t\t\t\t\t\t\ttype: 'Identifier',\n\t\t\t\t\t\t\t\t\tname: value,\n\t\t\t\t\t\t\t\t\tleadingComments: node.leadingComments,\n\t\t\t\t\t\t\t\t\ttrailingComments: node.trailingComments\n\t\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\t} else if (typeof value === 'number') {\n\t\t\t\t\t\t\t\tvalue = {\n\t\t\t\t\t\t\t\t\ttype: 'Literal',\n\t\t\t\t\t\t\t\t\tvalue,\n\t\t\t\t\t\t\t\t\tleadingComments: node.leadingComments,\n\t\t\t\t\t\t\t\t\ttrailingComments: node.trailingComments\n\t\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tthis.replace(value || EMPTY);\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tnode.name = `${match[2] ? `@` : `#`}${match[4]}`;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (node.type === 'Literal') {\n\t\t\t\tif (typeof node.value === 'string') {\n\t\t\t\t\tre.lastIndex = 0;\n\t\t\t\t\tconst new_value = /** @type {string} */ (node.value).replace(\n\t\t\t\t\t\tre,\n\t\t\t\t\t\t(m, i) => (+i in values ? values[+i] : m)\n\t\t\t\t\t);\n\t\t\t\t\tconst has_changed = new_value !== node.value;\n\t\t\t\t\tnode.value = new_value;\n\t\t\t\t\tif (has_changed && node.raw) {\n\t\t\t\t\t\t// preserve the quotes\n\t\t\t\t\t\tnode.raw = `${node.raw[0]}${JSON.stringify(node.value).slice(\n\t\t\t\t\t\t\t1,\n\t\t\t\t\t\t\t-1\n\t\t\t\t\t\t)}${node.raw[node.raw.length - 1]}`;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (node.type === 'TemplateElement') {\n\t\t\t\tre.lastIndex = 0;\n\t\t\t\tnode.value.raw = /** @type {string} */ (node.value.raw).replace(\n\t\t\t\t\tre,\n\t\t\t\t\t(m, i) => (+i in values ? values[+i] : m)\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tif (node.type === 'Program' || node.type === 'BlockStatement') {\n\t\t\t\tnode.body = flatten_body(node.body, []);\n\t\t\t}\n\n\t\t\tif (node.type === 'ObjectExpression' || node.type === 'ObjectPattern') {\n\t\t\t\tnode.properties = flatten_properties(node.properties, []);\n\t\t\t}\n\n\t\t\tif (node.type === 'ArrayExpression' || node.type === 'ArrayPattern') {\n\t\t\t\tnode.elements = flatten(node.elements, []);\n\t\t\t}\n\n\t\t\tif (\n\t\t\t\tnode.type === 'FunctionExpression' ||\n\t\t\t\tnode.type === 'FunctionDeclaration' ||\n\t\t\t\tnode.type === 'ArrowFunctionExpression'\n\t\t\t) {\n\t\t\t\tnode.params = flatten(node.params, []);\n\t\t\t}\n\n\t\t\tif (node.type === 'CallExpression' || node.type === 'NewExpression') {\n\t\t\t\tnode.arguments = flatten(node.arguments, []);\n\t\t\t}\n\n\t\t\tif (\n\t\t\t\tnode.type === 'ImportDeclaration' ||\n\t\t\t\tnode.type === 'ExportNamedDeclaration'\n\t\t\t) {\n\t\t\t\tnode.specifiers = flatten(node.specifiers, []);\n\t\t\t}\n\n\t\t\tif (node.type === 'ForStatement') {\n\t\t\t\tnode.init = node.init === EMPTY ? null : node.init;\n\t\t\t\tnode.test = node.test === EMPTY ? null : node.test;\n\t\t\t\tnode.update = node.update === EMPTY ? null : node.update;\n\t\t\t}\n\n\t\t\tleave(node);\n\t\t}\n\t});\n};\n\n/**\n *\n * @param {TemplateStringsArray} strings\n * @param {any[]} values\n * @returns {Node[]}\n */\nexport function b(strings, ...values) {\n\tconst str = join(strings);\n\n\t/** @type {CommentWithLocation[]} */\n\tconst comments = [];\n\n\ttry {\n\t\tlet ast = /** @type {any} */ (\n\t\t\tacorn.parse(str, acorn_opts(comments, str))\n\t\t);\n\n\t\tast = inject(str, ast, values, comments);\n\n\t\treturn ast.body;\n\t} catch (err) {\n\t\thandle_error(str, err);\n\t}\n}\n\n/**\n *\n * @param {TemplateStringsArray} strings\n * @param {any[]} values\n * @returns {Expression & { start: Number, end: number }}\n */\nexport function x(strings, ...values) {\n\tconst str = join(strings);\n\n\t/** @type {CommentWithLocation[]} */\n\tconst comments = [];\n\n\ttry {\n\t\tlet expression =\n\t\t\t/** @type {Expression & { start: Number, end: number }} */ (\n\t\t\t\tacorn.parseExpressionAt(str, 0, acorn_opts(comments, str))\n\t\t\t);\n\t\tconst match = /\\S+/.exec(str.slice(expression.end));\n\t\tif (match) {\n\t\t\tthrow new Error(`Unexpected token '${match[0]}'`);\n\t\t}\n\n\t\texpression = /** @type {Expression & { start: Number, end: number }} */ (\n\t\t\tinject(str, expression, values, comments)\n\t\t);\n\n\t\treturn expression;\n\t} catch (err) {\n\t\thandle_error(str, err);\n\t}\n}\n\n/**\n *\n * @param {TemplateStringsArray} strings\n * @param {any[]} values\n * @returns {(Property | SpreadElement) & { start: Number, end: number }}\n */\nexport function p(strings, ...values) {\n\tconst str = `{${join(strings)}}`;\n\n\t/** @type {CommentWithLocation[]} */\n\tconst comments = [];\n\n\ttry {\n\t\tlet expression = /** @type {any} */ (\n\t\t\tacorn.parseExpressionAt(str, 0, acorn_opts(comments, str))\n\t\t);\n\n\t\texpression = inject(str, expression, values, comments);\n\n\t\treturn expression.properties[0];\n\t} catch (err) {\n\t\thandle_error(str, err);\n\t}\n}\n\n/**\n * @param {string} str\n * @param {Error} err\n */\nfunction handle_error(str, err) {\n\t// TODO location/code frame\n\n\tre.lastIndex = 0;\n\n\tstr = str.replace(re, (m, i, at, hash, name) => {\n\t\tif (at) return `@${name}`;\n\t\tif (hash) return `#${name}`;\n\n\t\treturn '${...}';\n\t});\n\n\tconsole.log(`failed to parse:\\n${str}`);\n\tthrow err;\n}\n\nexport { print } from './print/index.js';\n\n/**\n * @param {string} source\n * @param {any} opts\n */\nexport const parse = (source, opts) => {\n\t/** @type {CommentWithLocation[]} */\n\tconst comments = [];\n\tconst { onComment, enter, leave } = get_comment_handlers(comments, source);\n\tconst ast = /** @type {any} */ (acorn.parse(source, { onComment, ...opts }));\n\twalk(ast, { enter, leave });\n\treturn ast;\n};\n\n/**\n * @param {string} source\n * @param {number} index\n * @param {any} opts\n */\nexport const parseExpressionAt = (source, index, opts) => {\n\t/** @type {CommentWithLocation[]} */\n\tconst comments = [];\n\tconst { onComment, enter, leave } = get_comment_handlers(comments, source);\n\tconst ast = /** @type {any} */ (\n\t\tacorn.parseExpressionAt(source, index, { onComment, ...opts })\n\t);\n\twalk(ast, { enter, leave });\n\treturn ast;\n};\n","import { Node } from 'acorn';\nimport * as code_red from 'code-red';\n\nexport const parse = (source: string): Node => code_red.parse(source, {\n\tsourceType: 'module',\n\tecmaVersion: 12,\n\tlocations: true\n});\n\nexport const parse_expression_at = (source: string, index: number): Node => code_red.parseExpressionAt(source, index, {\n\tsourceType: 'module',\n\tecmaVersion: 12,\n\tlocations: true\n});\n","export const whitespace = /[ \\t\\r\\n]/;\nexport const start_whitespace = /^[ \\t\\r\\n]*/;\nexport const end_whitespace = /[ \\t\\r\\n]*$/;\nexport const start_newline = /^\\r?\\n/;\n\nexport const dimensions = /^(?:offset|client)(?:Width|Height)$/;\n","import { parse_expression_at } from '../acorn';\nimport { Parser } from '../index';\nimport { Node } from 'estree';\nimport { whitespace } from '../../utils/patterns';\nimport parser_errors from '../errors';\n\nexport default function read_expression(parser: Parser): Node {\n\ttry {\n\t\tconst node = parse_expression_at(parser.template, parser.index);\n\n\t\tlet num_parens = 0;\n\n\t\tfor (let i = parser.index; i < node.start; i += 1) {\n\t\t\tif (parser.template[i] === '(') num_parens += 1;\n\t\t}\n\n\t\tlet index = node.end;\n\t\twhile (num_parens > 0) {\n\t\t\tconst char = parser.template[index];\n\n\t\t\tif (char === ')') {\n\t\t\t\tnum_parens -= 1;\n\t\t\t} else if (!whitespace.test(char)) {\n\t\t\t\tparser.error(parser_errors.unexpected_token(')'), index);\n\t\t\t}\n\n\t\t\tindex += 1;\n\t\t}\n\n\t\tparser.index = index;\n\n\t\treturn node as Node;\n\t} catch (err) {\n\t\tparser.acorn_error(err);\n\t}\n}\n","import * as acorn from '../acorn';\nimport { Parser } from '../index';\nimport { Script } from '../../interfaces';\nimport { Node, Program } from 'estree';\nimport parser_errors from '../errors';\n\nfunction get_context(parser: Parser, attributes: any[], start: number): string {\n\tconst context = attributes.find(attribute => attribute.name === 'context');\n\tif (!context) return 'default';\n\n\tif (context.value.length !== 1 || context.value[0].type !== 'Text') {\n\t\tparser.error(parser_errors.invalid_script_context_attribute, start);\n\t}\n\n\tconst value = context.value[0].data;\n\n\tif (value !== 'module') {\n\t\tparser.error(parser_errors.invalid_script_context_value, context.start);\n\t}\n\n\treturn value;\n}\n\nexport default function read_script(parser: Parser, start: number, attributes: Node[]): Script {\n\tconst script_start = parser.index;\n\tconst data = parser.read_until(/<\\/script\\s*>/, parser_errors.unclosed_script);\n\tif (parser.index >= parser.template.length) {\n\t\tparser.error(parser_errors.unclosed_script);\n\t}\n\n\tconst source = parser.template.slice(0, script_start).replace(/[^\\n]/g, ' ') + data;\n\tparser.read(/<\\/script\\s*>/);\n\n\tlet ast: Program;\n\n\ttry {\n\t\tast = acorn.parse(source) as any as Program;\n\t} catch (err) {\n\t\tparser.acorn_error(err);\n\t}\n\n\t// TODO is this necessary?\n\t(ast as any).start = script_start;\n\n\treturn {\n\t\ttype: 'Script',\n\t\tstart,\n\t\tend: parser.index,\n\t\tcontext: get_context(parser, attributes, start),\n\t\tcontent: ast\n\t};\n}\n","var MIN_SIZE = 16 * 1024;\nvar SafeUint32Array = typeof Uint32Array !== 'undefined' ? Uint32Array : Array; // fallback on Array when TypedArray is not supported\n\nmodule.exports = function adoptBuffer(buffer, size) {\n if (buffer === null || buffer.length < size) {\n return new SafeUint32Array(Math.max(size + 1024, MIN_SIZE));\n }\n\n return buffer;\n};\n","// CSS Syntax Module Level 3\n// https://www.w3.org/TR/css-syntax-3/\nvar TYPE = {\n EOF: 0, // \n Ident: 1, // \n Function: 2, // \n AtKeyword: 3, // \n Hash: 4, // \n String: 5, // \n BadString: 6, // \n Url: 7, // \n BadUrl: 8, // \n Delim: 9, // \n Number: 10, // \n Percentage: 11, // \n Dimension: 12, // \n WhiteSpace: 13, // \n CDO: 14, // \n CDC: 15, // \n Colon: 16, // :\n Semicolon: 17, // ;\n Comma: 18, // ,\n LeftSquareBracket: 19, // <[-token>\n RightSquareBracket: 20, // <]-token>\n LeftParenthesis: 21, // <(-token>\n RightParenthesis: 22, // <)-token>\n LeftCurlyBracket: 23, // <{-token>\n RightCurlyBracket: 24, // <}-token>\n Comment: 25\n};\n\nvar NAME = Object.keys(TYPE).reduce(function(result, key) {\n result[TYPE[key]] = key;\n return result;\n}, {});\n\nmodule.exports = {\n TYPE: TYPE,\n NAME: NAME\n};\n","var EOF = 0;\n\n// https://drafts.csswg.org/css-syntax-3/\n// § 4.2. Definitions\n\n// digit\n// A code point between U+0030 DIGIT ZERO (0) and U+0039 DIGIT NINE (9).\nfunction isDigit(code) {\n return code >= 0x0030 && code <= 0x0039;\n}\n\n// hex digit\n// A digit, or a code point between U+0041 LATIN CAPITAL LETTER A (A) and U+0046 LATIN CAPITAL LETTER F (F),\n// or a code point between U+0061 LATIN SMALL LETTER A (a) and U+0066 LATIN SMALL LETTER F (f).\nfunction isHexDigit(code) {\n return (\n isDigit(code) || // 0 .. 9\n (code >= 0x0041 && code <= 0x0046) || // A .. F\n (code >= 0x0061 && code <= 0x0066) // a .. f\n );\n}\n\n// uppercase letter\n// A code point between U+0041 LATIN CAPITAL LETTER A (A) and U+005A LATIN CAPITAL LETTER Z (Z).\nfunction isUppercaseLetter(code) {\n return code >= 0x0041 && code <= 0x005A;\n}\n\n// lowercase letter\n// A code point between U+0061 LATIN SMALL LETTER A (a) and U+007A LATIN SMALL LETTER Z (z).\nfunction isLowercaseLetter(code) {\n return code >= 0x0061 && code <= 0x007A;\n}\n\n// letter\n// An uppercase letter or a lowercase letter.\nfunction isLetter(code) {\n return isUppercaseLetter(code) || isLowercaseLetter(code);\n}\n\n// non-ASCII code point\n// A code point with a value equal to or greater than U+0080 .\nfunction isNonAscii(code) {\n return code >= 0x0080;\n}\n\n// name-start code point\n// A letter, a non-ASCII code point, or U+005F LOW LINE (_).\nfunction isNameStart(code) {\n return isLetter(code) || isNonAscii(code) || code === 0x005F;\n}\n\n// name code point\n// A name-start code point, a digit, or U+002D HYPHEN-MINUS (-).\nfunction isName(code) {\n return isNameStart(code) || isDigit(code) || code === 0x002D;\n}\n\n// non-printable code point\n// A code point between U+0000 NULL and U+0008 BACKSPACE, or U+000B LINE TABULATION,\n// or a code point between U+000E SHIFT OUT and U+001F INFORMATION SEPARATOR ONE, or U+007F DELETE.\nfunction isNonPrintable(code) {\n return (\n (code >= 0x0000 && code <= 0x0008) ||\n (code === 0x000B) ||\n (code >= 0x000E && code <= 0x001F) ||\n (code === 0x007F)\n );\n}\n\n// newline\n// U+000A LINE FEED. Note that U+000D CARRIAGE RETURN and U+000C FORM FEED are not included in this definition,\n// as they are converted to U+000A LINE FEED during preprocessing.\n// TODO: we doesn't do a preprocessing, so check a code point for U+000D CARRIAGE RETURN and U+000C FORM FEED\nfunction isNewline(code) {\n return code === 0x000A || code === 0x000D || code === 0x000C;\n}\n\n// whitespace\n// A newline, U+0009 CHARACTER TABULATION, or U+0020 SPACE.\nfunction isWhiteSpace(code) {\n return isNewline(code) || code === 0x0020 || code === 0x0009;\n}\n\n// § 4.3.8. Check if two code points are a valid escape\nfunction isValidEscape(first, second) {\n // If the first code point is not U+005C REVERSE SOLIDUS (\\), return false.\n if (first !== 0x005C) {\n return false;\n }\n\n // Otherwise, if the second code point is a newline or EOF, return false.\n if (isNewline(second) || second === EOF) {\n return false;\n }\n\n // Otherwise, return true.\n return true;\n}\n\n// § 4.3.9. Check if three code points would start an identifier\nfunction isIdentifierStart(first, second, third) {\n // Look at the first code point:\n\n // U+002D HYPHEN-MINUS\n if (first === 0x002D) {\n // If the second code point is a name-start code point or a U+002D HYPHEN-MINUS,\n // or the second and third code points are a valid escape, return true. Otherwise, return false.\n return (\n isNameStart(second) ||\n second === 0x002D ||\n isValidEscape(second, third)\n );\n }\n\n // name-start code point\n if (isNameStart(first)) {\n // Return true.\n return true;\n }\n\n // U+005C REVERSE SOLIDUS (\\)\n if (first === 0x005C) {\n // If the first and second code points are a valid escape, return true. Otherwise, return false.\n return isValidEscape(first, second);\n }\n\n // anything else\n // Return false.\n return false;\n}\n\n// § 4.3.10. Check if three code points would start a number\nfunction isNumberStart(first, second, third) {\n // Look at the first code point:\n\n // U+002B PLUS SIGN (+)\n // U+002D HYPHEN-MINUS (-)\n if (first === 0x002B || first === 0x002D) {\n // If the second code point is a digit, return true.\n if (isDigit(second)) {\n return 2;\n }\n\n // Otherwise, if the second code point is a U+002E FULL STOP (.)\n // and the third code point is a digit, return true.\n // Otherwise, return false.\n return second === 0x002E && isDigit(third) ? 3 : 0;\n }\n\n // U+002E FULL STOP (.)\n if (first === 0x002E) {\n // If the second code point is a digit, return true. Otherwise, return false.\n return isDigit(second) ? 2 : 0;\n }\n\n // digit\n if (isDigit(first)) {\n // Return true.\n return 1;\n }\n\n // anything else\n // Return false.\n return 0;\n}\n\n//\n// Misc\n//\n\n// detect BOM (https://en.wikipedia.org/wiki/Byte_order_mark)\nfunction isBOM(code) {\n // UTF-16BE\n if (code === 0xFEFF) {\n return 1;\n }\n\n // UTF-16LE\n if (code === 0xFFFE) {\n return 1;\n }\n\n return 0;\n}\n\n// Fast code category\n//\n// https://drafts.csswg.org/css-syntax/#tokenizer-definitions\n// > non-ASCII code point\n// > A code point with a value equal to or greater than U+0080 \n// > name-start code point\n// > A letter, a non-ASCII code point, or U+005F LOW LINE (_).\n// > name code point\n// > A name-start code point, a digit, or U+002D HYPHEN-MINUS (-)\n// That means only ASCII code points has a special meaning and we define a maps for 0..127 codes only\nvar CATEGORY = new Array(0x80);\ncharCodeCategory.Eof = 0x80;\ncharCodeCategory.WhiteSpace = 0x82;\ncharCodeCategory.Digit = 0x83;\ncharCodeCategory.NameStart = 0x84;\ncharCodeCategory.NonPrintable = 0x85;\n\nfor (var i = 0; i < CATEGORY.length; i++) {\n switch (true) {\n case isWhiteSpace(i):\n CATEGORY[i] = charCodeCategory.WhiteSpace;\n break;\n\n case isDigit(i):\n CATEGORY[i] = charCodeCategory.Digit;\n break;\n\n case isNameStart(i):\n CATEGORY[i] = charCodeCategory.NameStart;\n break;\n\n case isNonPrintable(i):\n CATEGORY[i] = charCodeCategory.NonPrintable;\n break;\n\n default:\n CATEGORY[i] = i || charCodeCategory.Eof;\n }\n}\n\nfunction charCodeCategory(code) {\n return code < 0x80 ? CATEGORY[code] : charCodeCategory.NameStart;\n};\n\nmodule.exports = {\n isDigit: isDigit,\n isHexDigit: isHexDigit,\n isUppercaseLetter: isUppercaseLetter,\n isLowercaseLetter: isLowercaseLetter,\n isLetter: isLetter,\n isNonAscii: isNonAscii,\n isNameStart: isNameStart,\n isName: isName,\n isNonPrintable: isNonPrintable,\n isNewline: isNewline,\n isWhiteSpace: isWhiteSpace,\n isValidEscape: isValidEscape,\n isIdentifierStart: isIdentifierStart,\n isNumberStart: isNumberStart,\n\n isBOM: isBOM,\n charCodeCategory: charCodeCategory\n};\n","var charCodeDef = require('./char-code-definitions');\nvar isDigit = charCodeDef.isDigit;\nvar isHexDigit = charCodeDef.isHexDigit;\nvar isUppercaseLetter = charCodeDef.isUppercaseLetter;\nvar isName = charCodeDef.isName;\nvar isWhiteSpace = charCodeDef.isWhiteSpace;\nvar isValidEscape = charCodeDef.isValidEscape;\n\nfunction getCharCode(source, offset) {\n return offset < source.length ? source.charCodeAt(offset) : 0;\n}\n\nfunction getNewlineLength(source, offset, code) {\n if (code === 13 /* \\r */ && getCharCode(source, offset + 1) === 10 /* \\n */) {\n return 2;\n }\n\n return 1;\n}\n\nfunction cmpChar(testStr, offset, referenceCode) {\n var code = testStr.charCodeAt(offset);\n\n // code.toLowerCase() for A..Z\n if (isUppercaseLetter(code)) {\n code = code | 32;\n }\n\n return code === referenceCode;\n}\n\nfunction cmpStr(testStr, start, end, referenceStr) {\n if (end - start !== referenceStr.length) {\n return false;\n }\n\n if (start < 0 || end > testStr.length) {\n return false;\n }\n\n for (var i = start; i < end; i++) {\n var testCode = testStr.charCodeAt(i);\n var referenceCode = referenceStr.charCodeAt(i - start);\n\n // testCode.toLowerCase() for A..Z\n if (isUppercaseLetter(testCode)) {\n testCode = testCode | 32;\n }\n\n if (testCode !== referenceCode) {\n return false;\n }\n }\n\n return true;\n}\n\nfunction findWhiteSpaceStart(source, offset) {\n for (; offset >= 0; offset--) {\n if (!isWhiteSpace(source.charCodeAt(offset))) {\n break;\n }\n }\n\n return offset + 1;\n}\n\nfunction findWhiteSpaceEnd(source, offset) {\n for (; offset < source.length; offset++) {\n if (!isWhiteSpace(source.charCodeAt(offset))) {\n break;\n }\n }\n\n return offset;\n}\n\nfunction findDecimalNumberEnd(source, offset) {\n for (; offset < source.length; offset++) {\n if (!isDigit(source.charCodeAt(offset))) {\n break;\n }\n }\n\n return offset;\n}\n\n// § 4.3.7. Consume an escaped code point\nfunction consumeEscaped(source, offset) {\n // It assumes that the U+005C REVERSE SOLIDUS (\\) has already been consumed and\n // that the next input code point has already been verified to be part of a valid escape.\n offset += 2;\n\n // hex digit\n if (isHexDigit(getCharCode(source, offset - 1))) {\n // Consume as many hex digits as possible, but no more than 5.\n // Note that this means 1-6 hex digits have been consumed in total.\n for (var maxOffset = Math.min(source.length, offset + 5); offset < maxOffset; offset++) {\n if (!isHexDigit(getCharCode(source, offset))) {\n break;\n }\n }\n\n // If the next input code point is whitespace, consume it as well.\n var code = getCharCode(source, offset);\n if (isWhiteSpace(code)) {\n offset += getNewlineLength(source, offset, code);\n }\n }\n\n return offset;\n}\n\n// §4.3.11. Consume a name\n// Note: This algorithm does not do the verification of the first few code points that are necessary\n// to ensure the returned code points would constitute an . If that is the intended use,\n// ensure that the stream starts with an identifier before calling this algorithm.\nfunction consumeName(source, offset) {\n // Let result initially be an empty string.\n // Repeatedly consume the next input code point from the stream:\n for (; offset < source.length; offset++) {\n var code = source.charCodeAt(offset);\n\n // name code point\n if (isName(code)) {\n // Append the code point to result.\n continue;\n }\n\n // the stream starts with a valid escape\n if (isValidEscape(code, getCharCode(source, offset + 1))) {\n // Consume an escaped code point. Append the returned code point to result.\n offset = consumeEscaped(source, offset) - 1;\n continue;\n }\n\n // anything else\n // Reconsume the current input code point. Return result.\n break;\n }\n\n return offset;\n}\n\n// §4.3.12. Consume a number\nfunction consumeNumber(source, offset) {\n var code = source.charCodeAt(offset);\n\n // 2. If the next input code point is U+002B PLUS SIGN (+) or U+002D HYPHEN-MINUS (-),\n // consume it and append it to repr.\n if (code === 0x002B || code === 0x002D) {\n code = source.charCodeAt(offset += 1);\n }\n\n // 3. While the next input code point is a digit, consume it and append it to repr.\n if (isDigit(code)) {\n offset = findDecimalNumberEnd(source, offset + 1);\n code = source.charCodeAt(offset);\n }\n\n // 4. If the next 2 input code points are U+002E FULL STOP (.) followed by a digit, then:\n if (code === 0x002E && isDigit(source.charCodeAt(offset + 1))) {\n // 4.1 Consume them.\n // 4.2 Append them to repr.\n code = source.charCodeAt(offset += 2);\n\n // 4.3 Set type to \"number\".\n // TODO\n\n // 4.4 While the next input code point is a digit, consume it and append it to repr.\n\n offset = findDecimalNumberEnd(source, offset);\n }\n\n // 5. If the next 2 or 3 input code points are U+0045 LATIN CAPITAL LETTER E (E)\n // or U+0065 LATIN SMALL LETTER E (e), ... , followed by a digit, then:\n if (cmpChar(source, offset, 101 /* e */)) {\n var sign = 0;\n code = source.charCodeAt(offset + 1);\n\n // ... optionally followed by U+002D HYPHEN-MINUS (-) or U+002B PLUS SIGN (+) ...\n if (code === 0x002D || code === 0x002B) {\n sign = 1;\n code = source.charCodeAt(offset + 2);\n }\n\n // ... followed by a digit\n if (isDigit(code)) {\n // 5.1 Consume them.\n // 5.2 Append them to repr.\n\n // 5.3 Set type to \"number\".\n // TODO\n\n // 5.4 While the next input code point is a digit, consume it and append it to repr.\n offset = findDecimalNumberEnd(source, offset + 1 + sign + 1);\n }\n }\n\n return offset;\n}\n\n// § 4.3.14. Consume the remnants of a bad url\n// ... its sole use is to consume enough of the input stream to reach a recovery point\n// where normal tokenizing can resume.\nfunction consumeBadUrlRemnants(source, offset) {\n // Repeatedly consume the next input code point from the stream:\n for (; offset < source.length; offset++) {\n var code = source.charCodeAt(offset);\n\n // U+0029 RIGHT PARENTHESIS ())\n // EOF\n if (code === 0x0029) {\n // Return.\n offset++;\n break;\n }\n\n if (isValidEscape(code, getCharCode(source, offset + 1))) {\n // Consume an escaped code point.\n // Note: This allows an escaped right parenthesis (\"\\)\") to be encountered\n // without ending the . This is otherwise identical to\n // the \"anything else\" clause.\n offset = consumeEscaped(source, offset);\n }\n }\n\n return offset;\n}\n\nmodule.exports = {\n consumeEscaped: consumeEscaped,\n consumeName: consumeName,\n consumeNumber: consumeNumber,\n consumeBadUrlRemnants: consumeBadUrlRemnants,\n\n cmpChar: cmpChar,\n cmpStr: cmpStr,\n\n getNewlineLength: getNewlineLength,\n findWhiteSpaceStart: findWhiteSpaceStart,\n findWhiteSpaceEnd: findWhiteSpaceEnd\n};\n","var constants = require('../tokenizer/const');\nvar TYPE = constants.TYPE;\nvar NAME = constants.NAME;\n\nvar utils = require('../tokenizer/utils');\nvar cmpStr = utils.cmpStr;\n\nvar EOF = TYPE.EOF;\nvar WHITESPACE = TYPE.WhiteSpace;\nvar COMMENT = TYPE.Comment;\n\nvar OFFSET_MASK = 0x00FFFFFF;\nvar TYPE_SHIFT = 24;\n\nvar TokenStream = function() {\n this.offsetAndType = null;\n this.balance = null;\n\n this.reset();\n};\n\nTokenStream.prototype = {\n reset: function() {\n this.eof = false;\n this.tokenIndex = -1;\n this.tokenType = 0;\n this.tokenStart = this.firstCharOffset;\n this.tokenEnd = this.firstCharOffset;\n },\n\n lookupType: function(offset) {\n offset += this.tokenIndex;\n\n if (offset < this.tokenCount) {\n return this.offsetAndType[offset] >> TYPE_SHIFT;\n }\n\n return EOF;\n },\n lookupOffset: function(offset) {\n offset += this.tokenIndex;\n\n if (offset < this.tokenCount) {\n return this.offsetAndType[offset - 1] & OFFSET_MASK;\n }\n\n return this.source.length;\n },\n lookupValue: function(offset, referenceStr) {\n offset += this.tokenIndex;\n\n if (offset < this.tokenCount) {\n return cmpStr(\n this.source,\n this.offsetAndType[offset - 1] & OFFSET_MASK,\n this.offsetAndType[offset] & OFFSET_MASK,\n referenceStr\n );\n }\n\n return false;\n },\n getTokenStart: function(tokenIndex) {\n if (tokenIndex === this.tokenIndex) {\n return this.tokenStart;\n }\n\n if (tokenIndex > 0) {\n return tokenIndex < this.tokenCount\n ? this.offsetAndType[tokenIndex - 1] & OFFSET_MASK\n : this.offsetAndType[this.tokenCount] & OFFSET_MASK;\n }\n\n return this.firstCharOffset;\n },\n\n // TODO: -> skipUntilBalanced\n getRawLength: function(startToken, mode) {\n var cursor = startToken;\n var balanceEnd;\n var offset = this.offsetAndType[Math.max(cursor - 1, 0)] & OFFSET_MASK;\n var type;\n\n loop:\n for (; cursor < this.tokenCount; cursor++) {\n balanceEnd = this.balance[cursor];\n\n // stop scanning on balance edge that points to offset before start token\n if (balanceEnd < startToken) {\n break loop;\n }\n\n type = this.offsetAndType[cursor] >> TYPE_SHIFT;\n\n // check token is stop type\n switch (mode(type, this.source, offset)) {\n case 1:\n break loop;\n\n case 2:\n cursor++;\n break loop;\n\n default:\n offset = this.offsetAndType[cursor] & OFFSET_MASK;\n\n // fast forward to the end of balanced block\n if (this.balance[balanceEnd] === cursor) {\n cursor = balanceEnd;\n }\n }\n }\n\n return cursor - this.tokenIndex;\n },\n isBalanceEdge: function(pos) {\n return this.balance[this.tokenIndex] < pos;\n },\n isDelim: function(code, offset) {\n if (offset) {\n return (\n this.lookupType(offset) === TYPE.Delim &&\n this.source.charCodeAt(this.lookupOffset(offset)) === code\n );\n }\n\n return (\n this.tokenType === TYPE.Delim &&\n this.source.charCodeAt(this.tokenStart) === code\n );\n },\n\n getTokenValue: function() {\n return this.source.substring(this.tokenStart, this.tokenEnd);\n },\n getTokenLength: function() {\n return this.tokenEnd - this.tokenStart;\n },\n substrToCursor: function(start) {\n return this.source.substring(start, this.tokenStart);\n },\n\n skipWS: function() {\n for (var i = this.tokenIndex, skipTokenCount = 0; i < this.tokenCount; i++, skipTokenCount++) {\n if ((this.offsetAndType[i] >> TYPE_SHIFT) !== WHITESPACE) {\n break;\n }\n }\n\n if (skipTokenCount > 0) {\n this.skip(skipTokenCount);\n }\n },\n skipSC: function() {\n while (this.tokenType === WHITESPACE || this.tokenType === COMMENT) {\n this.next();\n }\n },\n skip: function(tokenCount) {\n var next = this.tokenIndex + tokenCount;\n\n if (next < this.tokenCount) {\n this.tokenIndex = next;\n this.tokenStart = this.offsetAndType[next - 1] & OFFSET_MASK;\n next = this.offsetAndType[next];\n this.tokenType = next >> TYPE_SHIFT;\n this.tokenEnd = next & OFFSET_MASK;\n } else {\n this.tokenIndex = this.tokenCount;\n this.next();\n }\n },\n next: function() {\n var next = this.tokenIndex + 1;\n\n if (next < this.tokenCount) {\n this.tokenIndex = next;\n this.tokenStart = this.tokenEnd;\n next = this.offsetAndType[next];\n this.tokenType = next >> TYPE_SHIFT;\n this.tokenEnd = next & OFFSET_MASK;\n } else {\n this.tokenIndex = this.tokenCount;\n this.eof = true;\n this.tokenType = EOF;\n this.tokenStart = this.tokenEnd = this.source.length;\n }\n },\n\n forEachToken(fn) {\n for (var i = 0, offset = this.firstCharOffset; i < this.tokenCount; i++) {\n var start = offset;\n var item = this.offsetAndType[i];\n var end = item & OFFSET_MASK;\n var type = item >> TYPE_SHIFT;\n\n offset = end;\n\n fn(type, start, end, i);\n }\n },\n\n dump() {\n var tokens = new Array(this.tokenCount);\n\n this.forEachToken((type, start, end, index) => {\n tokens[index] = {\n idx: index,\n type: NAME[type],\n chunk: this.source.substring(start, end),\n balance: this.balance[index]\n };\n });\n\n return tokens;\n }\n};\n\nmodule.exports = TokenStream;\n","var TokenStream = require('../common/TokenStream');\nvar adoptBuffer = require('../common/adopt-buffer');\n\nvar constants = require('./const');\nvar TYPE = constants.TYPE;\n\nvar charCodeDefinitions = require('./char-code-definitions');\nvar isNewline = charCodeDefinitions.isNewline;\nvar isName = charCodeDefinitions.isName;\nvar isValidEscape = charCodeDefinitions.isValidEscape;\nvar isNumberStart = charCodeDefinitions.isNumberStart;\nvar isIdentifierStart = charCodeDefinitions.isIdentifierStart;\nvar charCodeCategory = charCodeDefinitions.charCodeCategory;\nvar isBOM = charCodeDefinitions.isBOM;\n\nvar utils = require('./utils');\nvar cmpStr = utils.cmpStr;\nvar getNewlineLength = utils.getNewlineLength;\nvar findWhiteSpaceEnd = utils.findWhiteSpaceEnd;\nvar consumeEscaped = utils.consumeEscaped;\nvar consumeName = utils.consumeName;\nvar consumeNumber = utils.consumeNumber;\nvar consumeBadUrlRemnants = utils.consumeBadUrlRemnants;\n\nvar OFFSET_MASK = 0x00FFFFFF;\nvar TYPE_SHIFT = 24;\n\nfunction tokenize(source, stream) {\n function getCharCode(offset) {\n return offset < sourceLength ? source.charCodeAt(offset) : 0;\n }\n\n // § 4.3.3. Consume a numeric token\n function consumeNumericToken() {\n // Consume a number and let number be the result.\n offset = consumeNumber(source, offset);\n\n // If the next 3 input code points would start an identifier, then:\n if (isIdentifierStart(getCharCode(offset), getCharCode(offset + 1), getCharCode(offset + 2))) {\n // Create a with the same value and type flag as number, and a unit set initially to the empty string.\n // Consume a name. Set the ’s unit to the returned value.\n // Return the .\n type = TYPE.Dimension;\n offset = consumeName(source, offset);\n return;\n }\n\n // Otherwise, if the next input code point is U+0025 PERCENTAGE SIGN (%), consume it.\n if (getCharCode(offset) === 0x0025) {\n // Create a with the same value as number, and return it.\n type = TYPE.Percentage;\n offset++;\n return;\n }\n\n // Otherwise, create a with the same value and type flag as number, and return it.\n type = TYPE.Number;\n }\n\n // § 4.3.4. Consume an ident-like token\n function consumeIdentLikeToken() {\n const nameStartOffset = offset;\n\n // Consume a name, and let string be the result.\n offset = consumeName(source, offset);\n\n // If string’s value is an ASCII case-insensitive match for \"url\",\n // and the next input code point is U+0028 LEFT PARENTHESIS ((), consume it.\n if (cmpStr(source, nameStartOffset, offset, 'url') && getCharCode(offset) === 0x0028) {\n // While the next two input code points are whitespace, consume the next input code point.\n offset = findWhiteSpaceEnd(source, offset + 1);\n\n // If the next one or two input code points are U+0022 QUOTATION MARK (\"), U+0027 APOSTROPHE ('),\n // or whitespace followed by U+0022 QUOTATION MARK (\") or U+0027 APOSTROPHE ('),\n // then create a with its value set to string and return it.\n if (getCharCode(offset) === 0x0022 ||\n getCharCode(offset) === 0x0027) {\n type = TYPE.Function;\n offset = nameStartOffset + 4;\n return;\n }\n\n // Otherwise, consume a url token, and return it.\n consumeUrlToken();\n return;\n }\n\n // Otherwise, if the next input code point is U+0028 LEFT PARENTHESIS ((), consume it.\n // Create a with its value set to string and return it.\n if (getCharCode(offset) === 0x0028) {\n type = TYPE.Function;\n offset++;\n return;\n }\n\n // Otherwise, create an with its value set to string and return it.\n type = TYPE.Ident;\n }\n\n // § 4.3.5. Consume a string token\n function consumeStringToken(endingCodePoint) {\n // This algorithm may be called with an ending code point, which denotes the code point\n // that ends the string. If an ending code point is not specified,\n // the current input code point is used.\n if (!endingCodePoint) {\n endingCodePoint = getCharCode(offset++);\n }\n\n // Initially create a with its value set to the empty string.\n type = TYPE.String;\n\n // Repeatedly consume the next input code point from the stream:\n for (; offset < source.length; offset++) {\n var code = source.charCodeAt(offset);\n\n switch (charCodeCategory(code)) {\n // ending code point\n case endingCodePoint:\n // Return the .\n offset++;\n return;\n\n // EOF\n case charCodeCategory.Eof:\n // This is a parse error. Return the .\n return;\n\n // newline\n case charCodeCategory.WhiteSpace:\n if (isNewline(code)) {\n // This is a parse error. Reconsume the current input code point,\n // create a , and return it.\n offset += getNewlineLength(source, offset, code);\n type = TYPE.BadString;\n return;\n }\n break;\n\n // U+005C REVERSE SOLIDUS (\\)\n case 0x005C:\n // If the next input code point is EOF, do nothing.\n if (offset === source.length - 1) {\n break;\n }\n\n var nextCode = getCharCode(offset + 1);\n\n // Otherwise, if the next input code point is a newline, consume it.\n if (isNewline(nextCode)) {\n offset += getNewlineLength(source, offset + 1, nextCode);\n } else if (isValidEscape(code, nextCode)) {\n // Otherwise, (the stream starts with a valid escape) consume\n // an escaped code point and append the returned code point to\n // the ’s value.\n offset = consumeEscaped(source, offset) - 1;\n }\n break;\n\n // anything else\n // Append the current input code point to the ’s value.\n }\n }\n }\n\n // § 4.3.6. Consume a url token\n // Note: This algorithm assumes that the initial \"url(\" has already been consumed.\n // This algorithm also assumes that it’s being called to consume an \"unquoted\" value, like url(foo).\n // A quoted value, like url(\"foo\"), is parsed as a . Consume an ident-like token\n // automatically handles this distinction; this algorithm shouldn’t be called directly otherwise.\n function consumeUrlToken() {\n // Initially create a with its value set to the empty string.\n type = TYPE.Url;\n\n // Consume as much whitespace as possible.\n offset = findWhiteSpaceEnd(source, offset);\n\n // Repeatedly consume the next input code point from the stream:\n for (; offset < source.length; offset++) {\n var code = source.charCodeAt(offset);\n\n switch (charCodeCategory(code)) {\n // U+0029 RIGHT PARENTHESIS ())\n case 0x0029:\n // Return the .\n offset++;\n return;\n\n // EOF\n case charCodeCategory.Eof:\n // This is a parse error. Return the .\n return;\n\n // whitespace\n case charCodeCategory.WhiteSpace:\n // Consume as much whitespace as possible.\n offset = findWhiteSpaceEnd(source, offset);\n\n // If the next input code point is U+0029 RIGHT PARENTHESIS ()) or EOF,\n // consume it and return the \n // (if EOF was encountered, this is a parse error);\n if (getCharCode(offset) === 0x0029 || offset >= source.length) {\n if (offset < source.length) {\n offset++;\n }\n return;\n }\n\n // otherwise, consume the remnants of a bad url, create a ,\n // and return it.\n offset = consumeBadUrlRemnants(source, offset);\n type = TYPE.BadUrl;\n return;\n\n // U+0022 QUOTATION MARK (\")\n // U+0027 APOSTROPHE (')\n // U+0028 LEFT PARENTHESIS (()\n // non-printable code point\n case 0x0022:\n case 0x0027:\n case 0x0028:\n case charCodeCategory.NonPrintable:\n // This is a parse error. Consume the remnants of a bad url,\n // create a , and return it.\n offset = consumeBadUrlRemnants(source, offset);\n type = TYPE.BadUrl;\n return;\n\n // U+005C REVERSE SOLIDUS (\\)\n case 0x005C:\n // If the stream starts with a valid escape, consume an escaped code point and\n // append the returned code point to the ’s value.\n if (isValidEscape(code, getCharCode(offset + 1))) {\n offset = consumeEscaped(source, offset) - 1;\n break;\n }\n\n // Otherwise, this is a parse error. Consume the remnants of a bad url,\n // create a , and return it.\n offset = consumeBadUrlRemnants(source, offset);\n type = TYPE.BadUrl;\n return;\n\n // anything else\n // Append the current input code point to the ’s value.\n }\n }\n }\n\n if (!stream) {\n stream = new TokenStream();\n }\n\n // ensure source is a string\n source = String(source || '');\n\n var sourceLength = source.length;\n var offsetAndType = adoptBuffer(stream.offsetAndType, sourceLength + 1); // +1 because of eof-token\n var balance = adoptBuffer(stream.balance, sourceLength + 1);\n var tokenCount = 0;\n var start = isBOM(getCharCode(0));\n var offset = start;\n var balanceCloseType = 0;\n var balanceStart = 0;\n var balancePrev = 0;\n\n // https://drafts.csswg.org/css-syntax-3/#consume-token\n // § 4.3.1. Consume a token\n while (offset < sourceLength) {\n var code = source.charCodeAt(offset);\n var type = 0;\n\n balance[tokenCount] = sourceLength;\n\n switch (charCodeCategory(code)) {\n // whitespace\n case charCodeCategory.WhiteSpace:\n // Consume as much whitespace as possible. Return a .\n type = TYPE.WhiteSpace;\n offset = findWhiteSpaceEnd(source, offset + 1);\n break;\n\n // U+0022 QUOTATION MARK (\")\n case 0x0022:\n // Consume a string token and return it.\n consumeStringToken();\n break;\n\n // U+0023 NUMBER SIGN (#)\n case 0x0023:\n // If the next input code point is a name code point or the next two input code points are a valid escape, then:\n if (isName(getCharCode(offset + 1)) || isValidEscape(getCharCode(offset + 1), getCharCode(offset + 2))) {\n // Create a .\n type = TYPE.Hash;\n\n // If the next 3 input code points would start an identifier, set the ’s type flag to \"id\".\n // if (isIdentifierStart(getCharCode(offset + 1), getCharCode(offset + 2), getCharCode(offset + 3))) {\n // // TODO: set id flag\n // }\n\n // Consume a name, and set the ’s value to the returned string.\n offset = consumeName(source, offset + 1);\n\n // Return the .\n } else {\n // Otherwise, return a with its value set to the current input code point.\n type = TYPE.Delim;\n offset++;\n }\n\n break;\n\n // U+0027 APOSTROPHE (')\n case 0x0027:\n // Consume a string token and return it.\n consumeStringToken();\n break;\n\n // U+0028 LEFT PARENTHESIS (()\n case 0x0028:\n // Return a <(-token>.\n type = TYPE.LeftParenthesis;\n offset++;\n break;\n\n // U+0029 RIGHT PARENTHESIS ())\n case 0x0029:\n // Return a <)-token>.\n type = TYPE.RightParenthesis;\n offset++;\n break;\n\n // U+002B PLUS SIGN (+)\n case 0x002B:\n // If the input stream starts with a number, ...\n if (isNumberStart(code, getCharCode(offset + 1), getCharCode(offset + 2))) {\n // ... reconsume the current input code point, consume a numeric token, and return it.\n consumeNumericToken();\n } else {\n // Otherwise, return a with its value set to the current input code point.\n type = TYPE.Delim;\n offset++;\n }\n break;\n\n // U+002C COMMA (,)\n case 0x002C:\n // Return a .\n type = TYPE.Comma;\n offset++;\n break;\n\n // U+002D HYPHEN-MINUS (-)\n case 0x002D:\n // If the input stream starts with a number, reconsume the current input code point, consume a numeric token, and return it.\n if (isNumberStart(code, getCharCode(offset + 1), getCharCode(offset + 2))) {\n consumeNumericToken();\n } else {\n // Otherwise, if the next 2 input code points are U+002D HYPHEN-MINUS U+003E GREATER-THAN SIGN (->), consume them and return a .\n if (getCharCode(offset + 1) === 0x002D &&\n getCharCode(offset + 2) === 0x003E) {\n type = TYPE.CDC;\n offset = offset + 3;\n } else {\n // Otherwise, if the input stream starts with an identifier, ...\n if (isIdentifierStart(code, getCharCode(offset + 1), getCharCode(offset + 2))) {\n // ... reconsume the current input code point, consume an ident-like token, and return it.\n consumeIdentLikeToken();\n } else {\n // Otherwise, return a with its value set to the current input code point.\n type = TYPE.Delim;\n offset++;\n }\n }\n }\n break;\n\n // U+002E FULL STOP (.)\n case 0x002E:\n // If the input stream starts with a number, ...\n if (isNumberStart(code, getCharCode(offset + 1), getCharCode(offset + 2))) {\n // ... reconsume the current input code point, consume a numeric token, and return it.\n consumeNumericToken();\n } else {\n // Otherwise, return a with its value set to the current input code point.\n type = TYPE.Delim;\n offset++;\n }\n\n break;\n\n // U+002F SOLIDUS (/)\n case 0x002F:\n // If the next two input code point are U+002F SOLIDUS (/) followed by a U+002A ASTERISK (*),\n if (getCharCode(offset + 1) === 0x002A) {\n // ... consume them and all following code points up to and including the first U+002A ASTERISK (*)\n // followed by a U+002F SOLIDUS (/), or up to an EOF code point.\n type = TYPE.Comment;\n offset = source.indexOf('*/', offset + 2) + 2;\n if (offset === 1) {\n offset = source.length;\n }\n } else {\n type = TYPE.Delim;\n offset++;\n }\n break;\n\n // U+003A COLON (:)\n case 0x003A:\n // Return a .\n type = TYPE.Colon;\n offset++;\n break;\n\n // U+003B SEMICOLON (;)\n case 0x003B:\n // Return a .\n type = TYPE.Semicolon;\n offset++;\n break;\n\n // U+003C LESS-THAN SIGN (<)\n case 0x003C:\n // If the next 3 input code points are U+0021 EXCLAMATION MARK U+002D HYPHEN-MINUS U+002D HYPHEN-MINUS (!--), ...\n if (getCharCode(offset + 1) === 0x0021 &&\n getCharCode(offset + 2) === 0x002D &&\n getCharCode(offset + 3) === 0x002D) {\n // ... consume them and return a .\n type = TYPE.CDO;\n offset = offset + 4;\n } else {\n // Otherwise, return a with its value set to the current input code point.\n type = TYPE.Delim;\n offset++;\n }\n\n break;\n\n // U+0040 COMMERCIAL AT (@)\n case 0x0040:\n // If the next 3 input code points would start an identifier, ...\n if (isIdentifierStart(getCharCode(offset + 1), getCharCode(offset + 2), getCharCode(offset + 3))) {\n // ... consume a name, create an with its value set to the returned value, and return it.\n type = TYPE.AtKeyword;\n offset = consumeName(source, offset + 1);\n } else {\n // Otherwise, return a with its value set to the current input code point.\n type = TYPE.Delim;\n offset++;\n }\n\n break;\n\n // U+005B LEFT SQUARE BRACKET ([)\n case 0x005B:\n // Return a <[-token>.\n type = TYPE.LeftSquareBracket;\n offset++;\n break;\n\n // U+005C REVERSE SOLIDUS (\\)\n case 0x005C:\n // If the input stream starts with a valid escape, ...\n if (isValidEscape(code, getCharCode(offset + 1))) {\n // ... reconsume the current input code point, consume an ident-like token, and return it.\n consumeIdentLikeToken();\n } else {\n // Otherwise, this is a parse error. Return a with its value set to the current input code point.\n type = TYPE.Delim;\n offset++;\n }\n break;\n\n // U+005D RIGHT SQUARE BRACKET (])\n case 0x005D:\n // Return a <]-token>.\n type = TYPE.RightSquareBracket;\n offset++;\n break;\n\n // U+007B LEFT CURLY BRACKET ({)\n case 0x007B:\n // Return a <{-token>.\n type = TYPE.LeftCurlyBracket;\n offset++;\n break;\n\n // U+007D RIGHT CURLY BRACKET (})\n case 0x007D:\n // Return a <}-token>.\n type = TYPE.RightCurlyBracket;\n offset++;\n break;\n\n // digit\n case charCodeCategory.Digit:\n // Reconsume the current input code point, consume a numeric token, and return it.\n consumeNumericToken();\n break;\n\n // name-start code point\n case charCodeCategory.NameStart:\n // Reconsume the current input code point, consume an ident-like token, and return it.\n consumeIdentLikeToken();\n break;\n\n // EOF\n case charCodeCategory.Eof:\n // Return an .\n break;\n\n // anything else\n default:\n // Return a with its value set to the current input code point.\n type = TYPE.Delim;\n offset++;\n }\n\n switch (type) {\n case balanceCloseType:\n balancePrev = balanceStart & OFFSET_MASK;\n balanceStart = balance[balancePrev];\n balanceCloseType = balanceStart >> TYPE_SHIFT;\n balance[tokenCount] = balancePrev;\n balance[balancePrev++] = tokenCount;\n for (; balancePrev < tokenCount; balancePrev++) {\n if (balance[balancePrev] === sourceLength) {\n balance[balancePrev] = tokenCount;\n }\n }\n break;\n\n case TYPE.LeftParenthesis:\n case TYPE.Function:\n balance[tokenCount] = balanceStart;\n balanceCloseType = TYPE.RightParenthesis;\n balanceStart = (balanceCloseType << TYPE_SHIFT) | tokenCount;\n break;\n\n case TYPE.LeftSquareBracket:\n balance[tokenCount] = balanceStart;\n balanceCloseType = TYPE.RightSquareBracket;\n balanceStart = (balanceCloseType << TYPE_SHIFT) | tokenCount;\n break;\n\n case TYPE.LeftCurlyBracket:\n balance[tokenCount] = balanceStart;\n balanceCloseType = TYPE.RightCurlyBracket;\n balanceStart = (balanceCloseType << TYPE_SHIFT) | tokenCount;\n break;\n }\n\n offsetAndType[tokenCount++] = (type << TYPE_SHIFT) | offset;\n }\n\n // finalize buffers\n offsetAndType[tokenCount] = (TYPE.EOF << TYPE_SHIFT) | offset; // \n balance[tokenCount] = sourceLength;\n balance[sourceLength] = sourceLength; // prevents false positive balance match with any token\n while (balanceStart !== 0) {\n balancePrev = balanceStart & OFFSET_MASK;\n balanceStart = balance[balancePrev];\n balance[balancePrev] = sourceLength;\n }\n\n // update stream\n stream.source = source;\n stream.firstCharOffset = start;\n stream.offsetAndType = offsetAndType;\n stream.tokenCount = tokenCount;\n stream.balance = balance;\n stream.reset();\n stream.next();\n\n return stream;\n}\n\n// extend tokenizer with constants\nObject.keys(constants).forEach(function(key) {\n tokenize[key] = constants[key];\n});\n\n// extend tokenizer with static methods from utils\nObject.keys(charCodeDefinitions).forEach(function(key) {\n tokenize[key] = charCodeDefinitions[key];\n});\nObject.keys(utils).forEach(function(key) {\n tokenize[key] = utils[key];\n});\n\nmodule.exports = tokenize;\n","var adoptBuffer = require('./adopt-buffer');\nvar isBOM = require('../tokenizer').isBOM;\n\nvar N = 10;\nvar F = 12;\nvar R = 13;\n\nfunction computeLinesAndColumns(host, source) {\n var sourceLength = source.length;\n var lines = adoptBuffer(host.lines, sourceLength); // +1\n var line = host.startLine;\n var columns = adoptBuffer(host.columns, sourceLength);\n var column = host.startColumn;\n var startOffset = source.length > 0 ? isBOM(source.charCodeAt(0)) : 0;\n\n for (var i = startOffset; i < sourceLength; i++) { // -1\n var code = source.charCodeAt(i);\n\n lines[i] = line;\n columns[i] = column++;\n\n if (code === N || code === R || code === F) {\n if (code === R && i + 1 < sourceLength && source.charCodeAt(i + 1) === N) {\n i++;\n lines[i] = line;\n columns[i] = column;\n }\n\n line++;\n column = 1;\n }\n }\n\n lines[i] = line;\n columns[i] = column;\n\n host.lines = lines;\n host.columns = columns;\n}\n\nvar OffsetToLocation = function() {\n this.lines = null;\n this.columns = null;\n this.linesAndColumnsComputed = false;\n};\n\nOffsetToLocation.prototype = {\n setSource: function(source, startOffset, startLine, startColumn) {\n this.source = source;\n this.startOffset = typeof startOffset === 'undefined' ? 0 : startOffset;\n this.startLine = typeof startLine === 'undefined' ? 1 : startLine;\n this.startColumn = typeof startColumn === 'undefined' ? 1 : startColumn;\n this.linesAndColumnsComputed = false;\n },\n\n ensureLinesAndColumnsComputed: function() {\n if (!this.linesAndColumnsComputed) {\n computeLinesAndColumns(this, this.source);\n this.linesAndColumnsComputed = true;\n }\n },\n getLocation: function(offset, filename) {\n this.ensureLinesAndColumnsComputed();\n\n return {\n source: filename,\n offset: this.startOffset + offset,\n line: this.lines[offset],\n column: this.columns[offset]\n };\n },\n getLocationRange: function(start, end, filename) {\n this.ensureLinesAndColumnsComputed();\n\n return {\n source: filename,\n start: {\n offset: this.startOffset + start,\n line: this.lines[start],\n column: this.columns[start]\n },\n end: {\n offset: this.startOffset + end,\n line: this.lines[end],\n column: this.columns[end]\n }\n };\n }\n};\n\nmodule.exports = OffsetToLocation;\n","module.exports = function createCustomError(name, message) {\n // use Object.create(), because some VMs prevent setting line/column otherwise\n // (iOS Safari 10 even throws an exception)\n var error = Object.create(SyntaxError.prototype);\n var errorStack = new Error();\n\n error.name = name;\n error.message = message;\n\n Object.defineProperty(error, 'stack', {\n get: function() {\n return (errorStack.stack || '').replace(/^(.+\\n){1,3}/, name + ': ' + message + '\\n');\n }\n });\n\n return error;\n};\n","var createCustomError = require('../utils/createCustomError');\nvar MAX_LINE_LENGTH = 100;\nvar OFFSET_CORRECTION = 60;\nvar TAB_REPLACEMENT = ' ';\n\nfunction sourceFragment(error, extraLines) {\n function processLines(start, end) {\n return lines.slice(start, end).map(function(line, idx) {\n var num = String(start + idx + 1);\n\n while (num.length < maxNumLength) {\n num = ' ' + num;\n }\n\n return num + ' |' + line;\n }).join('\\n');\n }\n\n var lines = error.source.split(/\\r\\n?|\\n|\\f/);\n var line = error.line;\n var column = error.column;\n var startLine = Math.max(1, line - extraLines) - 1;\n var endLine = Math.min(line + extraLines, lines.length + 1);\n var maxNumLength = Math.max(4, String(endLine).length) + 1;\n var cutLeft = 0;\n\n // column correction according to replaced tab before column\n column += (TAB_REPLACEMENT.length - 1) * (lines[line - 1].substr(0, column - 1).match(/\\t/g) || []).length;\n\n if (column > MAX_LINE_LENGTH) {\n cutLeft = column - OFFSET_CORRECTION + 3;\n column = OFFSET_CORRECTION - 2;\n }\n\n for (var i = startLine; i <= endLine; i++) {\n if (i >= 0 && i < lines.length) {\n lines[i] = lines[i].replace(/\\t/g, TAB_REPLACEMENT);\n lines[i] =\n (cutLeft > 0 && lines[i].length > cutLeft ? '\\u2026' : '') +\n lines[i].substr(cutLeft, MAX_LINE_LENGTH - 2) +\n (lines[i].length > cutLeft + MAX_LINE_LENGTH - 1 ? '\\u2026' : '');\n }\n }\n\n return [\n processLines(startLine, line),\n new Array(column + maxNumLength + 2).join('-') + '^',\n processLines(line, endLine)\n ].filter(Boolean).join('\\n');\n}\n\nvar SyntaxError = function(message, source, offset, line, column) {\n var error = createCustomError('SyntaxError', message);\n\n error.source = source;\n error.offset = offset;\n error.line = line;\n error.column = column;\n\n error.sourceFragment = function(extraLines) {\n return sourceFragment(error, isNaN(extraLines) ? 0 : extraLines);\n };\n Object.defineProperty(error, 'formattedMessage', {\n get: function() {\n return (\n 'Parse error: ' + error.message + '\\n' +\n sourceFragment(error, 2)\n );\n }\n });\n\n // for backward capability\n error.parseError = {\n offset: offset,\n line: line,\n column: column\n };\n\n return error;\n};\n\nmodule.exports = SyntaxError;\n","//\n// list\n// ┌──────┐\n// ┌──────────────┼─head │\n// │ │ tail─┼──────────────┐\n// │ └──────┘ │\n// ▼ ▼\n// item item item item\n// ┌──────┐ ┌──────┐ ┌──────┐ ┌──────┐\n// null ◀──┼─prev │◀───┼─prev │◀───┼─prev │◀───┼─prev │\n// │ next─┼───▶│ next─┼───▶│ next─┼───▶│ next─┼──▶ null\n// ├──────┤ ├──────┤ ├──────┤ ├──────┤\n// │ data │ │ data │ │ data │ │ data │\n// └──────┘ └──────┘ └──────┘ └──────┘\n//\n\nfunction createItem(data) {\n return {\n prev: null,\n next: null,\n data: data\n };\n}\n\nfunction allocateCursor(node, prev, next) {\n var cursor;\n\n if (cursors !== null) {\n cursor = cursors;\n cursors = cursors.cursor;\n cursor.prev = prev;\n cursor.next = next;\n cursor.cursor = node.cursor;\n } else {\n cursor = {\n prev: prev,\n next: next,\n cursor: node.cursor\n };\n }\n\n node.cursor = cursor;\n\n return cursor;\n}\n\nfunction releaseCursor(node) {\n var cursor = node.cursor;\n\n node.cursor = cursor.cursor;\n cursor.prev = null;\n cursor.next = null;\n cursor.cursor = cursors;\n cursors = cursor;\n}\n\nvar cursors = null;\nvar List = function() {\n this.cursor = null;\n this.head = null;\n this.tail = null;\n};\n\nList.createItem = createItem;\nList.prototype.createItem = createItem;\n\nList.prototype.updateCursors = function(prevOld, prevNew, nextOld, nextNew) {\n var cursor = this.cursor;\n\n while (cursor !== null) {\n if (cursor.prev === prevOld) {\n cursor.prev = prevNew;\n }\n\n if (cursor.next === nextOld) {\n cursor.next = nextNew;\n }\n\n cursor = cursor.cursor;\n }\n};\n\nList.prototype.getSize = function() {\n var size = 0;\n var cursor = this.head;\n\n while (cursor) {\n size++;\n cursor = cursor.next;\n }\n\n return size;\n};\n\nList.prototype.fromArray = function(array) {\n var cursor = null;\n\n this.head = null;\n\n for (var i = 0; i < array.length; i++) {\n var item = createItem(array[i]);\n\n if (cursor !== null) {\n cursor.next = item;\n } else {\n this.head = item;\n }\n\n item.prev = cursor;\n cursor = item;\n }\n\n this.tail = cursor;\n\n return this;\n};\n\nList.prototype.toArray = function() {\n var cursor = this.head;\n var result = [];\n\n while (cursor) {\n result.push(cursor.data);\n cursor = cursor.next;\n }\n\n return result;\n};\n\nList.prototype.toJSON = List.prototype.toArray;\n\nList.prototype.isEmpty = function() {\n return this.head === null;\n};\n\nList.prototype.first = function() {\n return this.head && this.head.data;\n};\n\nList.prototype.last = function() {\n return this.tail && this.tail.data;\n};\n\nList.prototype.each = function(fn, context) {\n var item;\n\n if (context === undefined) {\n context = this;\n }\n\n // push cursor\n var cursor = allocateCursor(this, null, this.head);\n\n while (cursor.next !== null) {\n item = cursor.next;\n cursor.next = item.next;\n\n fn.call(context, item.data, item, this);\n }\n\n // pop cursor\n releaseCursor(this);\n};\n\nList.prototype.forEach = List.prototype.each;\n\nList.prototype.eachRight = function(fn, context) {\n var item;\n\n if (context === undefined) {\n context = this;\n }\n\n // push cursor\n var cursor = allocateCursor(this, this.tail, null);\n\n while (cursor.prev !== null) {\n item = cursor.prev;\n cursor.prev = item.prev;\n\n fn.call(context, item.data, item, this);\n }\n\n // pop cursor\n releaseCursor(this);\n};\n\nList.prototype.forEachRight = List.prototype.eachRight;\n\nList.prototype.reduce = function(fn, initialValue, context) {\n var item;\n\n if (context === undefined) {\n context = this;\n }\n\n // push cursor\n var cursor = allocateCursor(this, null, this.head);\n var acc = initialValue;\n\n while (cursor.next !== null) {\n item = cursor.next;\n cursor.next = item.next;\n\n acc = fn.call(context, acc, item.data, item, this);\n }\n\n // pop cursor\n releaseCursor(this);\n\n return acc;\n};\n\nList.prototype.reduceRight = function(fn, initialValue, context) {\n var item;\n\n if (context === undefined) {\n context = this;\n }\n\n // push cursor\n var cursor = allocateCursor(this, this.tail, null);\n var acc = initialValue;\n\n while (cursor.prev !== null) {\n item = cursor.prev;\n cursor.prev = item.prev;\n\n acc = fn.call(context, acc, item.data, item, this);\n }\n\n // pop cursor\n releaseCursor(this);\n\n return acc;\n};\n\nList.prototype.nextUntil = function(start, fn, context) {\n if (start === null) {\n return;\n }\n\n var item;\n\n if (context === undefined) {\n context = this;\n }\n\n // push cursor\n var cursor = allocateCursor(this, null, start);\n\n while (cursor.next !== null) {\n item = cursor.next;\n cursor.next = item.next;\n\n if (fn.call(context, item.data, item, this)) {\n break;\n }\n }\n\n // pop cursor\n releaseCursor(this);\n};\n\nList.prototype.prevUntil = function(start, fn, context) {\n if (start === null) {\n return;\n }\n\n var item;\n\n if (context === undefined) {\n context = this;\n }\n\n // push cursor\n var cursor = allocateCursor(this, start, null);\n\n while (cursor.prev !== null) {\n item = cursor.prev;\n cursor.prev = item.prev;\n\n if (fn.call(context, item.data, item, this)) {\n break;\n }\n }\n\n // pop cursor\n releaseCursor(this);\n};\n\nList.prototype.some = function(fn, context) {\n var cursor = this.head;\n\n if (context === undefined) {\n context = this;\n }\n\n while (cursor !== null) {\n if (fn.call(context, cursor.data, cursor, this)) {\n return true;\n }\n\n cursor = cursor.next;\n }\n\n return false;\n};\n\nList.prototype.map = function(fn, context) {\n var result = new List();\n var cursor = this.head;\n\n if (context === undefined) {\n context = this;\n }\n\n while (cursor !== null) {\n result.appendData(fn.call(context, cursor.data, cursor, this));\n cursor = cursor.next;\n }\n\n return result;\n};\n\nList.prototype.filter = function(fn, context) {\n var result = new List();\n var cursor = this.head;\n\n if (context === undefined) {\n context = this;\n }\n\n while (cursor !== null) {\n if (fn.call(context, cursor.data, cursor, this)) {\n result.appendData(cursor.data);\n }\n cursor = cursor.next;\n }\n\n return result;\n};\n\nList.prototype.clear = function() {\n this.head = null;\n this.tail = null;\n};\n\nList.prototype.copy = function() {\n var result = new List();\n var cursor = this.head;\n\n while (cursor !== null) {\n result.insert(createItem(cursor.data));\n cursor = cursor.next;\n }\n\n return result;\n};\n\nList.prototype.prepend = function(item) {\n // head\n // ^\n // item\n this.updateCursors(null, item, this.head, item);\n\n // insert to the beginning of the list\n if (this.head !== null) {\n // new item <- first item\n this.head.prev = item;\n\n // new item -> first item\n item.next = this.head;\n } else {\n // if list has no head, then it also has no tail\n // in this case tail points to the new item\n this.tail = item;\n }\n\n // head always points to new item\n this.head = item;\n\n return this;\n};\n\nList.prototype.prependData = function(data) {\n return this.prepend(createItem(data));\n};\n\nList.prototype.append = function(item) {\n return this.insert(item);\n};\n\nList.prototype.appendData = function(data) {\n return this.insert(createItem(data));\n};\n\nList.prototype.insert = function(item, before) {\n if (before !== undefined && before !== null) {\n // prev before\n // ^\n // item\n this.updateCursors(before.prev, item, before, item);\n\n if (before.prev === null) {\n // insert to the beginning of list\n if (this.head !== before) {\n throw new Error('before doesn\\'t belong to list');\n }\n\n // since head points to before therefore list doesn't empty\n // no need to check tail\n this.head = item;\n before.prev = item;\n item.next = before;\n\n this.updateCursors(null, item);\n } else {\n\n // insert between two items\n before.prev.next = item;\n item.prev = before.prev;\n\n before.prev = item;\n item.next = before;\n }\n } else {\n // tail\n // ^\n // item\n this.updateCursors(this.tail, item, null, item);\n\n // insert to the ending of the list\n if (this.tail !== null) {\n // last item -> new item\n this.tail.next = item;\n\n // last item <- new item\n item.prev = this.tail;\n } else {\n // if list has no tail, then it also has no head\n // in this case head points to new item\n this.head = item;\n }\n\n // tail always points to new item\n this.tail = item;\n }\n\n return this;\n};\n\nList.prototype.insertData = function(data, before) {\n return this.insert(createItem(data), before);\n};\n\nList.prototype.remove = function(item) {\n // item\n // ^\n // prev next\n this.updateCursors(item, item.prev, item, item.next);\n\n if (item.prev !== null) {\n item.prev.next = item.next;\n } else {\n if (this.head !== item) {\n throw new Error('item doesn\\'t belong to list');\n }\n\n this.head = item.next;\n }\n\n if (item.next !== null) {\n item.next.prev = item.prev;\n } else {\n if (this.tail !== item) {\n throw new Error('item doesn\\'t belong to list');\n }\n\n this.tail = item.prev;\n }\n\n item.prev = null;\n item.next = null;\n\n return item;\n};\n\nList.prototype.push = function(data) {\n this.insert(createItem(data));\n};\n\nList.prototype.pop = function() {\n if (this.tail !== null) {\n return this.remove(this.tail);\n }\n};\n\nList.prototype.unshift = function(data) {\n this.prepend(createItem(data));\n};\n\nList.prototype.shift = function() {\n if (this.head !== null) {\n return this.remove(this.head);\n }\n};\n\nList.prototype.prependList = function(list) {\n return this.insertList(list, this.head);\n};\n\nList.prototype.appendList = function(list) {\n return this.insertList(list);\n};\n\nList.prototype.insertList = function(list, before) {\n // ignore empty lists\n if (list.head === null) {\n return this;\n }\n\n if (before !== undefined && before !== null) {\n this.updateCursors(before.prev, list.tail, before, list.head);\n\n // insert in the middle of dist list\n if (before.prev !== null) {\n // before.prev <-> list.head\n before.prev.next = list.head;\n list.head.prev = before.prev;\n } else {\n this.head = list.head;\n }\n\n before.prev = list.tail;\n list.tail.next = before;\n } else {\n this.updateCursors(this.tail, list.tail, null, list.head);\n\n // insert to end of the list\n if (this.tail !== null) {\n // if destination list has a tail, then it also has a head,\n // but head doesn't change\n\n // dest tail -> source head\n this.tail.next = list.head;\n\n // dest tail <- source head\n list.head.prev = this.tail;\n } else {\n // if list has no a tail, then it also has no a head\n // in this case points head to new item\n this.head = list.head;\n }\n\n // tail always start point to new item\n this.tail = list.tail;\n }\n\n list.head = null;\n list.tail = null;\n\n return this;\n};\n\nList.prototype.replace = function(oldItem, newItemOrList) {\n if ('head' in newItemOrList) {\n this.insertList(newItemOrList, oldItem);\n } else {\n this.insert(newItemOrList, oldItem);\n }\n\n this.remove(oldItem);\n};\n\nmodule.exports = List;\n","var TYPE = require('../tokenizer').TYPE;\nvar WHITESPACE = TYPE.WhiteSpace;\nvar COMMENT = TYPE.Comment;\n\nmodule.exports = function readSequence(recognizer) {\n var children = this.createList();\n var child = null;\n var context = {\n recognizer: recognizer,\n space: null,\n ignoreWS: false,\n ignoreWSAfter: false\n };\n\n this.scanner.skipSC();\n\n while (!this.scanner.eof) {\n switch (this.scanner.tokenType) {\n case COMMENT:\n this.scanner.next();\n continue;\n\n case WHITESPACE:\n if (context.ignoreWS) {\n this.scanner.next();\n } else {\n context.space = this.WhiteSpace();\n }\n continue;\n }\n\n child = recognizer.getNode.call(this, context);\n\n if (child === undefined) {\n break;\n }\n\n if (context.space !== null) {\n children.push(context.space);\n context.space = null;\n }\n\n children.push(child);\n\n if (context.ignoreWSAfter) {\n context.ignoreWSAfter = false;\n context.ignoreWS = true;\n } else {\n context.ignoreWS = false;\n }\n }\n\n return children;\n};\n","var OffsetToLocation = require('../common/OffsetToLocation');\nvar SyntaxError = require('../common/SyntaxError');\nvar TokenStream = require('../common/TokenStream');\nvar List = require('../common/List');\nvar tokenize = require('../tokenizer');\nvar constants = require('../tokenizer/const');\nvar { findWhiteSpaceStart, cmpStr } = require('../tokenizer/utils');\nvar sequence = require('./sequence');\nvar noop = function() {};\n\nvar TYPE = constants.TYPE;\nvar NAME = constants.NAME;\nvar WHITESPACE = TYPE.WhiteSpace;\nvar COMMENT = TYPE.Comment;\nvar IDENT = TYPE.Ident;\nvar FUNCTION = TYPE.Function;\nvar URL = TYPE.Url;\nvar HASH = TYPE.Hash;\nvar PERCENTAGE = TYPE.Percentage;\nvar NUMBER = TYPE.Number;\nvar NUMBERSIGN = 0x0023; // U+0023 NUMBER SIGN (#)\nvar NULL = 0;\n\nfunction createParseContext(name) {\n return function() {\n return this[name]();\n };\n}\n\nfunction processConfig(config) {\n var parserConfig = {\n context: {},\n scope: {},\n atrule: {},\n pseudo: {}\n };\n\n if (config.parseContext) {\n for (var name in config.parseContext) {\n switch (typeof config.parseContext[name]) {\n case 'function':\n parserConfig.context[name] = config.parseContext[name];\n break;\n\n case 'string':\n parserConfig.context[name] = createParseContext(config.parseContext[name]);\n break;\n }\n }\n }\n\n if (config.scope) {\n for (var name in config.scope) {\n parserConfig.scope[name] = config.scope[name];\n }\n }\n\n if (config.atrule) {\n for (var name in config.atrule) {\n var atrule = config.atrule[name];\n\n if (atrule.parse) {\n parserConfig.atrule[name] = atrule.parse;\n }\n }\n }\n\n if (config.pseudo) {\n for (var name in config.pseudo) {\n var pseudo = config.pseudo[name];\n\n if (pseudo.parse) {\n parserConfig.pseudo[name] = pseudo.parse;\n }\n }\n }\n\n if (config.node) {\n for (var name in config.node) {\n parserConfig[name] = config.node[name].parse;\n }\n }\n\n return parserConfig;\n}\n\nmodule.exports = function createParser(config) {\n var parser = {\n scanner: new TokenStream(),\n locationMap: new OffsetToLocation(),\n\n filename: '',\n needPositions: false,\n onParseError: noop,\n onParseErrorThrow: false,\n parseAtrulePrelude: true,\n parseRulePrelude: true,\n parseValue: true,\n parseCustomProperty: false,\n\n readSequence: sequence,\n\n createList: function() {\n return new List();\n },\n createSingleNodeList: function(node) {\n return new List().appendData(node);\n },\n getFirstListNode: function(list) {\n return list && list.first();\n },\n getLastListNode: function(list) {\n return list.last();\n },\n\n parseWithFallback: function(consumer, fallback) {\n var startToken = this.scanner.tokenIndex;\n\n try {\n return consumer.call(this);\n } catch (e) {\n if (this.onParseErrorThrow) {\n throw e;\n }\n\n var fallbackNode = fallback.call(this, startToken);\n\n this.onParseErrorThrow = true;\n this.onParseError(e, fallbackNode);\n this.onParseErrorThrow = false;\n\n return fallbackNode;\n }\n },\n\n lookupNonWSType: function(offset) {\n do {\n var type = this.scanner.lookupType(offset++);\n if (type !== WHITESPACE) {\n return type;\n }\n } while (type !== NULL);\n\n return NULL;\n },\n\n eat: function(tokenType) {\n if (this.scanner.tokenType !== tokenType) {\n var offset = this.scanner.tokenStart;\n var message = NAME[tokenType] + ' is expected';\n\n // tweak message and offset\n switch (tokenType) {\n case IDENT:\n // when identifier is expected but there is a function or url\n if (this.scanner.tokenType === FUNCTION || this.scanner.tokenType === URL) {\n offset = this.scanner.tokenEnd - 1;\n message = 'Identifier is expected but function found';\n } else {\n message = 'Identifier is expected';\n }\n break;\n\n case HASH:\n if (this.scanner.isDelim(NUMBERSIGN)) {\n this.scanner.next();\n offset++;\n message = 'Name is expected';\n }\n break;\n\n case PERCENTAGE:\n if (this.scanner.tokenType === NUMBER) {\n offset = this.scanner.tokenEnd;\n message = 'Percent sign is expected';\n }\n break;\n\n default:\n // when test type is part of another token show error for current position + 1\n // e.g. eat(HYPHENMINUS) will fail on \"-foo\", but pointing on \"-\" is odd\n if (this.scanner.source.charCodeAt(this.scanner.tokenStart) === tokenType) {\n offset = offset + 1;\n }\n }\n\n this.error(message, offset);\n }\n\n this.scanner.next();\n },\n\n consume: function(tokenType) {\n var value = this.scanner.getTokenValue();\n\n this.eat(tokenType);\n\n return value;\n },\n consumeFunctionName: function() {\n var name = this.scanner.source.substring(this.scanner.tokenStart, this.scanner.tokenEnd - 1);\n\n this.eat(FUNCTION);\n\n return name;\n },\n\n getLocation: function(start, end) {\n if (this.needPositions) {\n return this.locationMap.getLocationRange(\n start,\n end,\n this.filename\n );\n }\n\n return null;\n },\n getLocationFromList: function(list) {\n if (this.needPositions) {\n var head = this.getFirstListNode(list);\n var tail = this.getLastListNode(list);\n return this.locationMap.getLocationRange(\n head !== null ? head.loc.start.offset - this.locationMap.startOffset : this.scanner.tokenStart,\n tail !== null ? tail.loc.end.offset - this.locationMap.startOffset : this.scanner.tokenStart,\n this.filename\n );\n }\n\n return null;\n },\n\n error: function(message, offset) {\n var location = typeof offset !== 'undefined' && offset < this.scanner.source.length\n ? this.locationMap.getLocation(offset)\n : this.scanner.eof\n ? this.locationMap.getLocation(findWhiteSpaceStart(this.scanner.source, this.scanner.source.length - 1))\n : this.locationMap.getLocation(this.scanner.tokenStart);\n\n throw new SyntaxError(\n message || 'Unexpected input',\n this.scanner.source,\n location.offset,\n location.line,\n location.column\n );\n }\n };\n\n config = processConfig(config || {});\n for (var key in config) {\n parser[key] = config[key];\n }\n\n return function(source, options) {\n options = options || {};\n\n var context = options.context || 'default';\n var onComment = options.onComment;\n var ast;\n\n tokenize(source, parser.scanner);\n parser.locationMap.setSource(\n source,\n options.offset,\n options.line,\n options.column\n );\n\n parser.filename = options.filename || '';\n parser.needPositions = Boolean(options.positions);\n parser.onParseError = typeof options.onParseError === 'function' ? options.onParseError : noop;\n parser.onParseErrorThrow = false;\n parser.parseAtrulePrelude = 'parseAtrulePrelude' in options ? Boolean(options.parseAtrulePrelude) : true;\n parser.parseRulePrelude = 'parseRulePrelude' in options ? Boolean(options.parseRulePrelude) : true;\n parser.parseValue = 'parseValue' in options ? Boolean(options.parseValue) : true;\n parser.parseCustomProperty = 'parseCustomProperty' in options ? Boolean(options.parseCustomProperty) : false;\n\n if (!parser.context.hasOwnProperty(context)) {\n throw new Error('Unknown context `' + context + '`');\n }\n\n if (typeof onComment === 'function') {\n parser.scanner.forEachToken((type, start, end) => {\n if (type === COMMENT) {\n const loc = parser.getLocation(start, end);\n const value = cmpStr(source, end - 2, end, '*/')\n ? source.slice(start + 2, end - 2)\n : source.slice(start + 2, end);\n\n onComment(value, loc);\n }\n });\n }\n\n ast = parser.context[context].call(parser, options);\n\n if (!parser.scanner.eof) {\n parser.error();\n }\n\n return ast;\n };\n};\n","var cmpChar = require('../../tokenizer').cmpChar;\nvar cmpStr = require('../../tokenizer').cmpStr;\nvar TYPE = require('../../tokenizer').TYPE;\n\nvar IDENT = TYPE.Ident;\nvar STRING = TYPE.String;\nvar NUMBER = TYPE.Number;\nvar FUNCTION = TYPE.Function;\nvar URL = TYPE.Url;\nvar HASH = TYPE.Hash;\nvar DIMENSION = TYPE.Dimension;\nvar PERCENTAGE = TYPE.Percentage;\nvar LEFTPARENTHESIS = TYPE.LeftParenthesis;\nvar LEFTSQUAREBRACKET = TYPE.LeftSquareBracket;\nvar COMMA = TYPE.Comma;\nvar DELIM = TYPE.Delim;\nvar NUMBERSIGN = 0x0023; // U+0023 NUMBER SIGN (#)\nvar ASTERISK = 0x002A; // U+002A ASTERISK (*)\nvar PLUSSIGN = 0x002B; // U+002B PLUS SIGN (+)\nvar HYPHENMINUS = 0x002D; // U+002D HYPHEN-MINUS (-)\nvar SOLIDUS = 0x002F; // U+002F SOLIDUS (/)\nvar U = 0x0075; // U+0075 LATIN SMALL LETTER U (u)\n\nmodule.exports = function defaultRecognizer(context) {\n switch (this.scanner.tokenType) {\n case HASH:\n return this.Hash();\n\n case COMMA:\n context.space = null;\n context.ignoreWSAfter = true;\n return this.Operator();\n\n case LEFTPARENTHESIS:\n return this.Parentheses(this.readSequence, context.recognizer);\n\n case LEFTSQUAREBRACKET:\n return this.Brackets(this.readSequence, context.recognizer);\n\n case STRING:\n return this.String();\n\n case DIMENSION:\n return this.Dimension();\n\n case PERCENTAGE:\n return this.Percentage();\n\n case NUMBER:\n return this.Number();\n\n case FUNCTION:\n return cmpStr(this.scanner.source, this.scanner.tokenStart, this.scanner.tokenEnd, 'url(')\n ? this.Url()\n : this.Function(this.readSequence, context.recognizer);\n\n case URL:\n return this.Url();\n\n case IDENT:\n // check for unicode range, it should start with u+ or U+\n if (cmpChar(this.scanner.source, this.scanner.tokenStart, U) &&\n cmpChar(this.scanner.source, this.scanner.tokenStart + 1, PLUSSIGN)) {\n return this.UnicodeRange();\n } else {\n return this.Identifier();\n }\n\n case DELIM:\n var code = this.scanner.source.charCodeAt(this.scanner.tokenStart);\n\n if (code === SOLIDUS ||\n code === ASTERISK ||\n code === PLUSSIGN ||\n code === HYPHENMINUS) {\n return this.Operator(); // TODO: replace with Delim\n }\n\n // TODO: produce a node with Delim node type\n\n if (code === NUMBERSIGN) {\n this.error('Hex or identifier is expected', this.scanner.tokenStart + 1);\n }\n\n break;\n }\n};\n","module.exports = {\n getNode: require('./default')\n};\n","var TYPE = require('../../tokenizer').TYPE;\n\nvar DELIM = TYPE.Delim;\nvar IDENT = TYPE.Ident;\nvar DIMENSION = TYPE.Dimension;\nvar PERCENTAGE = TYPE.Percentage;\nvar NUMBER = TYPE.Number;\nvar HASH = TYPE.Hash;\nvar COLON = TYPE.Colon;\nvar LEFTSQUAREBRACKET = TYPE.LeftSquareBracket;\nvar NUMBERSIGN = 0x0023; // U+0023 NUMBER SIGN (#)\nvar ASTERISK = 0x002A; // U+002A ASTERISK (*)\nvar PLUSSIGN = 0x002B; // U+002B PLUS SIGN (+)\nvar SOLIDUS = 0x002F; // U+002F SOLIDUS (/)\nvar FULLSTOP = 0x002E; // U+002E FULL STOP (.)\nvar GREATERTHANSIGN = 0x003E; // U+003E GREATER-THAN SIGN (>)\nvar VERTICALLINE = 0x007C; // U+007C VERTICAL LINE (|)\nvar TILDE = 0x007E; // U+007E TILDE (~)\n\nfunction getNode(context) {\n switch (this.scanner.tokenType) {\n case LEFTSQUAREBRACKET:\n return this.AttributeSelector();\n\n case HASH:\n return this.IdSelector();\n\n case COLON:\n if (this.scanner.lookupType(1) === COLON) {\n return this.PseudoElementSelector();\n } else {\n return this.PseudoClassSelector();\n }\n\n case IDENT:\n return this.TypeSelector();\n\n case NUMBER:\n case PERCENTAGE:\n return this.Percentage();\n\n case DIMENSION:\n // throws when .123ident\n if (this.scanner.source.charCodeAt(this.scanner.tokenStart) === FULLSTOP) {\n this.error('Identifier is expected', this.scanner.tokenStart + 1);\n }\n break;\n\n case DELIM:\n var code = this.scanner.source.charCodeAt(this.scanner.tokenStart);\n\n switch (code) {\n case PLUSSIGN:\n case GREATERTHANSIGN:\n case TILDE:\n context.space = null;\n context.ignoreWSAfter = true;\n return this.Combinator();\n\n case SOLIDUS: // /deep/\n return this.Combinator();\n\n case FULLSTOP:\n return this.ClassSelector();\n\n case ASTERISK:\n case VERTICALLINE:\n return this.TypeSelector();\n\n case NUMBERSIGN:\n return this.IdSelector();\n }\n\n break;\n }\n};\n\nmodule.exports = {\n getNode: getNode\n};\n","// legacy IE function\n// expression( )\nmodule.exports = function() {\n return this.createSingleNodeList(\n this.Raw(this.scanner.tokenIndex, null, false)\n );\n};\n","var tokenizer = require('../../tokenizer');\nvar TYPE = tokenizer.TYPE;\n\nvar WhiteSpace = TYPE.WhiteSpace;\nvar Semicolon = TYPE.Semicolon;\nvar LeftCurlyBracket = TYPE.LeftCurlyBracket;\nvar Delim = TYPE.Delim;\nvar EXCLAMATIONMARK = 0x0021; // U+0021 EXCLAMATION MARK (!)\n\nfunction getOffsetExcludeWS() {\n if (this.scanner.tokenIndex > 0) {\n if (this.scanner.lookupType(-1) === WhiteSpace) {\n return this.scanner.tokenIndex > 1\n ? this.scanner.getTokenStart(this.scanner.tokenIndex - 1)\n : this.scanner.firstCharOffset;\n }\n }\n\n return this.scanner.tokenStart;\n}\n\n// 0, 0, false\nfunction balanceEnd() {\n return 0;\n}\n\n// LEFTCURLYBRACKET, 0, false\nfunction leftCurlyBracket(tokenType) {\n return tokenType === LeftCurlyBracket ? 1 : 0;\n}\n\n// LEFTCURLYBRACKET, SEMICOLON, false\nfunction leftCurlyBracketOrSemicolon(tokenType) {\n return tokenType === LeftCurlyBracket || tokenType === Semicolon ? 1 : 0;\n}\n\n// EXCLAMATIONMARK, SEMICOLON, false\nfunction exclamationMarkOrSemicolon(tokenType, source, offset) {\n if (tokenType === Delim && source.charCodeAt(offset) === EXCLAMATIONMARK) {\n return 1;\n }\n\n return tokenType === Semicolon ? 1 : 0;\n}\n\n// 0, SEMICOLON, true\nfunction semicolonIncluded(tokenType) {\n return tokenType === Semicolon ? 2 : 0;\n}\n\nmodule.exports = {\n name: 'Raw',\n structure: {\n value: String\n },\n parse: function(startToken, mode, excludeWhiteSpace) {\n var startOffset = this.scanner.getTokenStart(startToken);\n var endOffset;\n\n this.scanner.skip(\n this.scanner.getRawLength(startToken, mode || balanceEnd)\n );\n\n if (excludeWhiteSpace && this.scanner.tokenStart > startOffset) {\n endOffset = getOffsetExcludeWS.call(this);\n } else {\n endOffset = this.scanner.tokenStart;\n }\n\n return {\n type: 'Raw',\n loc: this.getLocation(startOffset, endOffset),\n value: this.scanner.source.substring(startOffset, endOffset)\n };\n },\n generate: function(node) {\n this.chunk(node.value);\n },\n\n mode: {\n default: balanceEnd,\n leftCurlyBracket: leftCurlyBracket,\n leftCurlyBracketOrSemicolon: leftCurlyBracketOrSemicolon,\n exclamationMarkOrSemicolon: exclamationMarkOrSemicolon,\n semicolonIncluded: semicolonIncluded\n }\n};\n","var TYPE = require('../../tokenizer').TYPE;\nvar rawMode = require('../node/Raw').mode;\n\nvar COMMA = TYPE.Comma;\nvar WHITESPACE = TYPE.WhiteSpace;\n\n// var( , ? )\nmodule.exports = function() {\n var children = this.createList();\n\n this.scanner.skipSC();\n\n // NOTE: Don't check more than a first argument is an ident, rest checks are for lexer\n children.push(this.Identifier());\n\n this.scanner.skipSC();\n\n if (this.scanner.tokenType === COMMA) {\n children.push(this.Operator());\n\n const startIndex = this.scanner.tokenIndex;\n const value = this.parseCustomProperty\n ? this.Value(null)\n : this.Raw(this.scanner.tokenIndex, rawMode.exclamationMarkOrSemicolon, false);\n\n if (value.type === 'Value' && value.children.isEmpty()) {\n for (let offset = startIndex - this.scanner.tokenIndex; offset <= 0; offset++) {\n if (this.scanner.lookupType(offset) === WHITESPACE) {\n value.children.appendData({\n type: 'WhiteSpace',\n loc: null,\n value: ' '\n });\n break;\n }\n }\n }\n\n children.push(value);\n }\n\n return children;\n};\n","module.exports = {\n getNode: require('./default'),\n 'expression': require('../function/expression'),\n 'var': require('../function/var')\n};\n","module.exports = {\n AtrulePrelude: require('./atrulePrelude'),\n Selector: require('./selector'),\n Value: require('./value')\n};\n","module.exports = {\n parse: {\n prelude: null,\n block: function() {\n return this.Block(true);\n }\n }\n};\n","var TYPE = require('../../tokenizer').TYPE;\n\nvar STRING = TYPE.String;\nvar IDENT = TYPE.Ident;\nvar URL = TYPE.Url;\nvar FUNCTION = TYPE.Function;\nvar LEFTPARENTHESIS = TYPE.LeftParenthesis;\n\nmodule.exports = {\n parse: {\n prelude: function() {\n var children = this.createList();\n\n this.scanner.skipSC();\n\n switch (this.scanner.tokenType) {\n case STRING:\n children.push(this.String());\n break;\n\n case URL:\n case FUNCTION:\n children.push(this.Url());\n break;\n\n default:\n this.error('String or url() is expected');\n }\n\n if (this.lookupNonWSType(0) === IDENT ||\n this.lookupNonWSType(0) === LEFTPARENTHESIS) {\n children.push(this.WhiteSpace());\n children.push(this.MediaQueryList());\n }\n\n return children;\n },\n block: null\n }\n};\n","module.exports = {\n parse: {\n prelude: function() {\n return this.createSingleNodeList(\n this.MediaQueryList()\n );\n },\n block: function() {\n return this.Block(false);\n }\n }\n};\n","module.exports = {\n parse: {\n prelude: function() {\n return this.createSingleNodeList(\n this.SelectorList()\n );\n },\n block: function() {\n return this.Block(true);\n }\n }\n};\n","var TYPE = require('../../tokenizer').TYPE;\n\nvar WHITESPACE = TYPE.WhiteSpace;\nvar COMMENT = TYPE.Comment;\nvar IDENT = TYPE.Ident;\nvar FUNCTION = TYPE.Function;\nvar COLON = TYPE.Colon;\nvar LEFTPARENTHESIS = TYPE.LeftParenthesis;\n\nfunction consumeRaw() {\n return this.createSingleNodeList(\n this.Raw(this.scanner.tokenIndex, null, false)\n );\n}\n\nfunction parentheses() {\n this.scanner.skipSC();\n\n if (this.scanner.tokenType === IDENT &&\n this.lookupNonWSType(1) === COLON) {\n return this.createSingleNodeList(\n this.Declaration()\n );\n }\n\n return readSequence.call(this);\n}\n\nfunction readSequence() {\n var children = this.createList();\n var space = null;\n var child;\n\n this.scanner.skipSC();\n\n scan:\n while (!this.scanner.eof) {\n switch (this.scanner.tokenType) {\n case WHITESPACE:\n space = this.WhiteSpace();\n continue;\n\n case COMMENT:\n this.scanner.next();\n continue;\n\n case FUNCTION:\n child = this.Function(consumeRaw, this.scope.AtrulePrelude);\n break;\n\n case IDENT:\n child = this.Identifier();\n break;\n\n case LEFTPARENTHESIS:\n child = this.Parentheses(parentheses, this.scope.AtrulePrelude);\n break;\n\n default:\n break scan;\n }\n\n if (space !== null) {\n children.push(space);\n space = null;\n }\n\n children.push(child);\n }\n\n return children;\n}\n\nmodule.exports = {\n parse: {\n prelude: function() {\n var children = readSequence.call(this);\n\n if (this.getFirstListNode(children) === null) {\n this.error('Condition is expected');\n }\n\n return children;\n },\n block: function() {\n return this.Block(false);\n }\n }\n};\n","module.exports = {\n 'font-face': require('./font-face'),\n 'import': require('./import'),\n 'media': require('./media'),\n 'page': require('./page'),\n 'supports': require('./supports')\n};\n","module.exports = {\n parse: function() {\n return this.createSingleNodeList(\n this.Identifier()\n );\n }\n};\n","module.exports = {\n parse: function() {\n return this.createSingleNodeList(\n this.SelectorList()\n );\n }\n};\n","module.exports = {\n parse: function() {\n return this.createSingleNodeList(\n this.Identifier()\n );\n }\n};\n","module.exports = {\n parse: function selectorList() {\n return this.createSingleNodeList(\n this.SelectorList()\n );\n }\n};\n","module.exports = require('./common/selectorList');\n","module.exports = require('./common/selectorList');\n","var ALLOW_OF_CLAUSE = true;\n\nmodule.exports = {\n parse: function nthWithOfClause() {\n return this.createSingleNodeList(\n this.Nth(ALLOW_OF_CLAUSE)\n );\n }\n};\n","module.exports = require('./common/nthWithOfClause');\n","module.exports = require('./common/nthWithOfClause');\n","var DISALLOW_OF_CLAUSE = false;\n\nmodule.exports = {\n parse: function nth() {\n return this.createSingleNodeList(\n this.Nth(DISALLOW_OF_CLAUSE)\n );\n }\n};\n","module.exports = require('./common/nth');\n","module.exports = require('./common/nth');\n","module.exports = {\n parse: function compoundSelector() {\n return this.createSingleNodeList(\n this.Selector()\n );\n }\n};\n","module.exports = {\n 'dir': require('./dir'),\n 'has': require('./has'),\n 'lang': require('./lang'),\n 'matches': require('./matches'),\n 'not': require('./not'),\n 'nth-child': require('./nth-child'),\n 'nth-last-child': require('./nth-last-child'),\n 'nth-last-of-type': require('./nth-last-of-type'),\n 'nth-of-type': require('./nth-of-type'),\n 'slotted': require('./slotted')\n};\n","var cmpChar = require('../../tokenizer').cmpChar;\nvar isDigit = require('../../tokenizer').isDigit;\nvar TYPE = require('../../tokenizer').TYPE;\n\nvar WHITESPACE = TYPE.WhiteSpace;\nvar COMMENT = TYPE.Comment;\nvar IDENT = TYPE.Ident;\nvar NUMBER = TYPE.Number;\nvar DIMENSION = TYPE.Dimension;\nvar PLUSSIGN = 0x002B; // U+002B PLUS SIGN (+)\nvar HYPHENMINUS = 0x002D; // U+002D HYPHEN-MINUS (-)\nvar N = 0x006E; // U+006E LATIN SMALL LETTER N (n)\nvar DISALLOW_SIGN = true;\nvar ALLOW_SIGN = false;\n\nfunction checkInteger(offset, disallowSign) {\n var pos = this.scanner.tokenStart + offset;\n var code = this.scanner.source.charCodeAt(pos);\n\n if (code === PLUSSIGN || code === HYPHENMINUS) {\n if (disallowSign) {\n this.error('Number sign is not allowed');\n }\n pos++;\n }\n\n for (; pos < this.scanner.tokenEnd; pos++) {\n if (!isDigit(this.scanner.source.charCodeAt(pos))) {\n this.error('Integer is expected', pos);\n }\n }\n}\n\nfunction checkTokenIsInteger(disallowSign) {\n return checkInteger.call(this, 0, disallowSign);\n}\n\nfunction expectCharCode(offset, code) {\n if (!cmpChar(this.scanner.source, this.scanner.tokenStart + offset, code)) {\n var msg = '';\n\n switch (code) {\n case N:\n msg = 'N is expected';\n break;\n case HYPHENMINUS:\n msg = 'HyphenMinus is expected';\n break;\n }\n\n this.error(msg, this.scanner.tokenStart + offset);\n }\n}\n\n// ... \n// ... ['+' | '-'] \nfunction consumeB() {\n var offset = 0;\n var sign = 0;\n var type = this.scanner.tokenType;\n\n while (type === WHITESPACE || type === COMMENT) {\n type = this.scanner.lookupType(++offset);\n }\n\n if (type !== NUMBER) {\n if (this.scanner.isDelim(PLUSSIGN, offset) ||\n this.scanner.isDelim(HYPHENMINUS, offset)) {\n sign = this.scanner.isDelim(PLUSSIGN, offset) ? PLUSSIGN : HYPHENMINUS;\n\n do {\n type = this.scanner.lookupType(++offset);\n } while (type === WHITESPACE || type === COMMENT);\n\n if (type !== NUMBER) {\n this.scanner.skip(offset);\n checkTokenIsInteger.call(this, DISALLOW_SIGN);\n }\n } else {\n return null;\n }\n }\n\n if (offset > 0) {\n this.scanner.skip(offset);\n }\n\n if (sign === 0) {\n type = this.scanner.source.charCodeAt(this.scanner.tokenStart);\n if (type !== PLUSSIGN && type !== HYPHENMINUS) {\n this.error('Number sign is expected');\n }\n }\n\n checkTokenIsInteger.call(this, sign !== 0);\n return sign === HYPHENMINUS ? '-' + this.consume(NUMBER) : this.consume(NUMBER);\n}\n\n// An+B microsyntax https://www.w3.org/TR/css-syntax-3/#anb\nmodule.exports = {\n name: 'AnPlusB',\n structure: {\n a: [String, null],\n b: [String, null]\n },\n parse: function() {\n /* eslint-disable brace-style*/\n var start = this.scanner.tokenStart;\n var a = null;\n var b = null;\n\n // \n if (this.scanner.tokenType === NUMBER) {\n checkTokenIsInteger.call(this, ALLOW_SIGN);\n b = this.consume(NUMBER);\n }\n\n // -n\n // -n \n // -n ['+' | '-'] \n // -n- \n // \n else if (this.scanner.tokenType === IDENT && cmpChar(this.scanner.source, this.scanner.tokenStart, HYPHENMINUS)) {\n a = '-1';\n\n expectCharCode.call(this, 1, N);\n\n switch (this.scanner.getTokenLength()) {\n // -n\n // -n \n // -n ['+' | '-'] \n case 2:\n this.scanner.next();\n b = consumeB.call(this);\n break;\n\n // -n- \n case 3:\n expectCharCode.call(this, 2, HYPHENMINUS);\n\n this.scanner.next();\n this.scanner.skipSC();\n\n checkTokenIsInteger.call(this, DISALLOW_SIGN);\n\n b = '-' + this.consume(NUMBER);\n break;\n\n // \n default:\n expectCharCode.call(this, 2, HYPHENMINUS);\n checkInteger.call(this, 3, DISALLOW_SIGN);\n this.scanner.next();\n\n b = this.scanner.substrToCursor(start + 2);\n }\n }\n\n // '+'? n\n // '+'? n \n // '+'? n ['+' | '-'] \n // '+'? n- \n // '+'? \n else if (this.scanner.tokenType === IDENT || (this.scanner.isDelim(PLUSSIGN) && this.scanner.lookupType(1) === IDENT)) {\n var sign = 0;\n a = '1';\n\n // just ignore a plus\n if (this.scanner.isDelim(PLUSSIGN)) {\n sign = 1;\n this.scanner.next();\n }\n\n expectCharCode.call(this, 0, N);\n\n switch (this.scanner.getTokenLength()) {\n // '+'? n\n // '+'? n \n // '+'? n ['+' | '-'] \n case 1:\n this.scanner.next();\n b = consumeB.call(this);\n break;\n\n // '+'? n- \n case 2:\n expectCharCode.call(this, 1, HYPHENMINUS);\n\n this.scanner.next();\n this.scanner.skipSC();\n\n checkTokenIsInteger.call(this, DISALLOW_SIGN);\n\n b = '-' + this.consume(NUMBER);\n break;\n\n // '+'? \n default:\n expectCharCode.call(this, 1, HYPHENMINUS);\n checkInteger.call(this, 2, DISALLOW_SIGN);\n this.scanner.next();\n\n b = this.scanner.substrToCursor(start + sign + 1);\n }\n }\n\n // \n // \n // \n // \n // ['+' | '-'] \n else if (this.scanner.tokenType === DIMENSION) {\n var code = this.scanner.source.charCodeAt(this.scanner.tokenStart);\n var sign = code === PLUSSIGN || code === HYPHENMINUS;\n\n for (var i = this.scanner.tokenStart + sign; i < this.scanner.tokenEnd; i++) {\n if (!isDigit(this.scanner.source.charCodeAt(i))) {\n break;\n }\n }\n\n if (i === this.scanner.tokenStart + sign) {\n this.error('Integer is expected', this.scanner.tokenStart + sign);\n }\n\n expectCharCode.call(this, i - this.scanner.tokenStart, N);\n a = this.scanner.source.substring(start, i);\n\n // \n // \n // ['+' | '-'] \n if (i + 1 === this.scanner.tokenEnd) {\n this.scanner.next();\n b = consumeB.call(this);\n } else {\n expectCharCode.call(this, i - this.scanner.tokenStart + 1, HYPHENMINUS);\n\n // \n if (i + 2 === this.scanner.tokenEnd) {\n this.scanner.next();\n this.scanner.skipSC();\n checkTokenIsInteger.call(this, DISALLOW_SIGN);\n b = '-' + this.consume(NUMBER);\n }\n // \n else {\n checkInteger.call(this, i - this.scanner.tokenStart + 2, DISALLOW_SIGN);\n this.scanner.next();\n b = this.scanner.substrToCursor(i + 1);\n }\n }\n } else {\n this.error();\n }\n\n if (a !== null && a.charCodeAt(0) === PLUSSIGN) {\n a = a.substr(1);\n }\n\n if (b !== null && b.charCodeAt(0) === PLUSSIGN) {\n b = b.substr(1);\n }\n\n return {\n type: 'AnPlusB',\n loc: this.getLocation(start, this.scanner.tokenStart),\n a: a,\n b: b\n };\n },\n generate: function(node) {\n var a = node.a !== null && node.a !== undefined;\n var b = node.b !== null && node.b !== undefined;\n\n if (a) {\n this.chunk(\n node.a === '+1' ? '+n' : // eslint-disable-line operator-linebreak, indent\n node.a === '1' ? 'n' : // eslint-disable-line operator-linebreak, indent\n node.a === '-1' ? '-n' : // eslint-disable-line operator-linebreak, indent\n node.a + 'n' // eslint-disable-line operator-linebreak, indent\n );\n\n if (b) {\n b = String(node.b);\n if (b.charAt(0) === '-' || b.charAt(0) === '+') {\n this.chunk(b.charAt(0));\n this.chunk(b.substr(1));\n } else {\n this.chunk('+');\n this.chunk(b);\n }\n }\n } else {\n this.chunk(String(node.b));\n }\n }\n};\n","var TYPE = require('../../tokenizer').TYPE;\nvar rawMode = require('./Raw').mode;\n\nvar ATKEYWORD = TYPE.AtKeyword;\nvar SEMICOLON = TYPE.Semicolon;\nvar LEFTCURLYBRACKET = TYPE.LeftCurlyBracket;\nvar RIGHTCURLYBRACKET = TYPE.RightCurlyBracket;\n\nfunction consumeRaw(startToken) {\n return this.Raw(startToken, rawMode.leftCurlyBracketOrSemicolon, true);\n}\n\nfunction isDeclarationBlockAtrule() {\n for (var offset = 1, type; type = this.scanner.lookupType(offset); offset++) {\n if (type === RIGHTCURLYBRACKET) {\n return true;\n }\n\n if (type === LEFTCURLYBRACKET ||\n type === ATKEYWORD) {\n return false;\n }\n }\n\n return false;\n}\n\nmodule.exports = {\n name: 'Atrule',\n structure: {\n name: String,\n prelude: ['AtrulePrelude', 'Raw', null],\n block: ['Block', null]\n },\n parse: function() {\n var start = this.scanner.tokenStart;\n var name;\n var nameLowerCase;\n var prelude = null;\n var block = null;\n\n this.eat(ATKEYWORD);\n\n name = this.scanner.substrToCursor(start + 1);\n nameLowerCase = name.toLowerCase();\n this.scanner.skipSC();\n\n // parse prelude\n if (this.scanner.eof === false &&\n this.scanner.tokenType !== LEFTCURLYBRACKET &&\n this.scanner.tokenType !== SEMICOLON) {\n if (this.parseAtrulePrelude) {\n prelude = this.parseWithFallback(this.AtrulePrelude.bind(this, name), consumeRaw);\n\n // turn empty AtrulePrelude into null\n if (prelude.type === 'AtrulePrelude' && prelude.children.head === null) {\n prelude = null;\n }\n } else {\n prelude = consumeRaw.call(this, this.scanner.tokenIndex);\n }\n\n this.scanner.skipSC();\n }\n\n switch (this.scanner.tokenType) {\n case SEMICOLON:\n this.scanner.next();\n break;\n\n case LEFTCURLYBRACKET:\n if (this.atrule.hasOwnProperty(nameLowerCase) &&\n typeof this.atrule[nameLowerCase].block === 'function') {\n block = this.atrule[nameLowerCase].block.call(this);\n } else {\n // TODO: should consume block content as Raw?\n block = this.Block(isDeclarationBlockAtrule.call(this));\n }\n\n break;\n }\n\n return {\n type: 'Atrule',\n loc: this.getLocation(start, this.scanner.tokenStart),\n name: name,\n prelude: prelude,\n block: block\n };\n },\n generate: function(node) {\n this.chunk('@');\n this.chunk(node.name);\n\n if (node.prelude !== null) {\n this.chunk(' ');\n this.node(node.prelude);\n }\n\n if (node.block) {\n this.node(node.block);\n } else {\n this.chunk(';');\n }\n },\n walkContext: 'atrule'\n};\n","var TYPE = require('../../tokenizer').TYPE;\n\nvar SEMICOLON = TYPE.Semicolon;\nvar LEFTCURLYBRACKET = TYPE.LeftCurlyBracket;\n\nmodule.exports = {\n name: 'AtrulePrelude',\n structure: {\n children: [[]]\n },\n parse: function(name) {\n var children = null;\n\n if (name !== null) {\n name = name.toLowerCase();\n }\n\n this.scanner.skipSC();\n\n if (this.atrule.hasOwnProperty(name) &&\n typeof this.atrule[name].prelude === 'function') {\n // custom consumer\n children = this.atrule[name].prelude.call(this);\n } else {\n // default consumer\n children = this.readSequence(this.scope.AtrulePrelude);\n }\n\n this.scanner.skipSC();\n\n if (this.scanner.eof !== true &&\n this.scanner.tokenType !== LEFTCURLYBRACKET &&\n this.scanner.tokenType !== SEMICOLON) {\n this.error('Semicolon or block is expected');\n }\n\n if (children === null) {\n children = this.createList();\n }\n\n return {\n type: 'AtrulePrelude',\n loc: this.getLocationFromList(children),\n children: children\n };\n },\n generate: function(node) {\n this.children(node);\n },\n walkContext: 'atrulePrelude'\n};\n","var TYPE = require('../../tokenizer').TYPE;\n\nvar IDENT = TYPE.Ident;\nvar STRING = TYPE.String;\nvar COLON = TYPE.Colon;\nvar LEFTSQUAREBRACKET = TYPE.LeftSquareBracket;\nvar RIGHTSQUAREBRACKET = TYPE.RightSquareBracket;\nvar DOLLARSIGN = 0x0024; // U+0024 DOLLAR SIGN ($)\nvar ASTERISK = 0x002A; // U+002A ASTERISK (*)\nvar EQUALSSIGN = 0x003D; // U+003D EQUALS SIGN (=)\nvar CIRCUMFLEXACCENT = 0x005E; // U+005E (^)\nvar VERTICALLINE = 0x007C; // U+007C VERTICAL LINE (|)\nvar TILDE = 0x007E; // U+007E TILDE (~)\n\nfunction getAttributeName() {\n if (this.scanner.eof) {\n this.error('Unexpected end of input');\n }\n\n var start = this.scanner.tokenStart;\n var expectIdent = false;\n var checkColon = true;\n\n if (this.scanner.isDelim(ASTERISK)) {\n expectIdent = true;\n checkColon = false;\n this.scanner.next();\n } else if (!this.scanner.isDelim(VERTICALLINE)) {\n this.eat(IDENT);\n }\n\n if (this.scanner.isDelim(VERTICALLINE)) {\n if (this.scanner.source.charCodeAt(this.scanner.tokenStart + 1) !== EQUALSSIGN) {\n this.scanner.next();\n this.eat(IDENT);\n } else if (expectIdent) {\n this.error('Identifier is expected', this.scanner.tokenEnd);\n }\n } else if (expectIdent) {\n this.error('Vertical line is expected');\n }\n\n if (checkColon && this.scanner.tokenType === COLON) {\n this.scanner.next();\n this.eat(IDENT);\n }\n\n return {\n type: 'Identifier',\n loc: this.getLocation(start, this.scanner.tokenStart),\n name: this.scanner.substrToCursor(start)\n };\n}\n\nfunction getOperator() {\n var start = this.scanner.tokenStart;\n var code = this.scanner.source.charCodeAt(start);\n\n if (code !== EQUALSSIGN && // =\n code !== TILDE && // ~=\n code !== CIRCUMFLEXACCENT && // ^=\n code !== DOLLARSIGN && // $=\n code !== ASTERISK && // *=\n code !== VERTICALLINE // |=\n ) {\n this.error('Attribute selector (=, ~=, ^=, $=, *=, |=) is expected');\n }\n\n this.scanner.next();\n\n if (code !== EQUALSSIGN) {\n if (!this.scanner.isDelim(EQUALSSIGN)) {\n this.error('Equal sign is expected');\n }\n\n this.scanner.next();\n }\n\n return this.scanner.substrToCursor(start);\n}\n\n// '[' ']'\n// '[' [ | ] ? ']'\nmodule.exports = {\n name: 'AttributeSelector',\n structure: {\n name: 'Identifier',\n matcher: [String, null],\n value: ['String', 'Identifier', null],\n flags: [String, null]\n },\n parse: function() {\n var start = this.scanner.tokenStart;\n var name;\n var matcher = null;\n var value = null;\n var flags = null;\n\n this.eat(LEFTSQUAREBRACKET);\n this.scanner.skipSC();\n\n name = getAttributeName.call(this);\n this.scanner.skipSC();\n\n if (this.scanner.tokenType !== RIGHTSQUAREBRACKET) {\n // avoid case `[name i]`\n if (this.scanner.tokenType !== IDENT) {\n matcher = getOperator.call(this);\n\n this.scanner.skipSC();\n\n value = this.scanner.tokenType === STRING\n ? this.String()\n : this.Identifier();\n\n this.scanner.skipSC();\n }\n\n // attribute flags\n if (this.scanner.tokenType === IDENT) {\n flags = this.scanner.getTokenValue();\n this.scanner.next();\n\n this.scanner.skipSC();\n }\n }\n\n this.eat(RIGHTSQUAREBRACKET);\n\n return {\n type: 'AttributeSelector',\n loc: this.getLocation(start, this.scanner.tokenStart),\n name: name,\n matcher: matcher,\n value: value,\n flags: flags\n };\n },\n generate: function(node) {\n var flagsPrefix = ' ';\n\n this.chunk('[');\n this.node(node.name);\n\n if (node.matcher !== null) {\n this.chunk(node.matcher);\n\n if (node.value !== null) {\n this.node(node.value);\n\n // space between string and flags is not required\n if (node.value.type === 'String') {\n flagsPrefix = '';\n }\n }\n }\n\n if (node.flags !== null) {\n this.chunk(flagsPrefix);\n this.chunk(node.flags);\n }\n\n this.chunk(']');\n }\n};\n","var TYPE = require('../../tokenizer').TYPE;\nvar rawMode = require('./Raw').mode;\n\nvar WHITESPACE = TYPE.WhiteSpace;\nvar COMMENT = TYPE.Comment;\nvar SEMICOLON = TYPE.Semicolon;\nvar ATKEYWORD = TYPE.AtKeyword;\nvar LEFTCURLYBRACKET = TYPE.LeftCurlyBracket;\nvar RIGHTCURLYBRACKET = TYPE.RightCurlyBracket;\n\nfunction consumeRaw(startToken) {\n return this.Raw(startToken, null, true);\n}\nfunction consumeRule() {\n return this.parseWithFallback(this.Rule, consumeRaw);\n}\nfunction consumeRawDeclaration(startToken) {\n return this.Raw(startToken, rawMode.semicolonIncluded, true);\n}\nfunction consumeDeclaration() {\n if (this.scanner.tokenType === SEMICOLON) {\n return consumeRawDeclaration.call(this, this.scanner.tokenIndex);\n }\n\n var node = this.parseWithFallback(this.Declaration, consumeRawDeclaration);\n\n if (this.scanner.tokenType === SEMICOLON) {\n this.scanner.next();\n }\n\n return node;\n}\n\nmodule.exports = {\n name: 'Block',\n structure: {\n children: [[\n 'Atrule',\n 'Rule',\n 'Declaration'\n ]]\n },\n parse: function(isDeclaration) {\n var consumer = isDeclaration ? consumeDeclaration : consumeRule;\n\n var start = this.scanner.tokenStart;\n var children = this.createList();\n\n this.eat(LEFTCURLYBRACKET);\n\n scan:\n while (!this.scanner.eof) {\n switch (this.scanner.tokenType) {\n case RIGHTCURLYBRACKET:\n break scan;\n\n case WHITESPACE:\n case COMMENT:\n this.scanner.next();\n break;\n\n case ATKEYWORD:\n children.push(this.parseWithFallback(this.Atrule, consumeRaw));\n break;\n\n default:\n children.push(consumer.call(this));\n }\n }\n\n if (!this.scanner.eof) {\n this.eat(RIGHTCURLYBRACKET);\n }\n\n return {\n type: 'Block',\n loc: this.getLocation(start, this.scanner.tokenStart),\n children: children\n };\n },\n generate: function(node) {\n this.chunk('{');\n this.children(node, function(prev) {\n if (prev.type === 'Declaration') {\n this.chunk(';');\n }\n });\n this.chunk('}');\n },\n walkContext: 'block'\n};\n","var TYPE = require('../../tokenizer').TYPE;\n\nvar LEFTSQUAREBRACKET = TYPE.LeftSquareBracket;\nvar RIGHTSQUAREBRACKET = TYPE.RightSquareBracket;\n\nmodule.exports = {\n name: 'Brackets',\n structure: {\n children: [[]]\n },\n parse: function(readSequence, recognizer) {\n var start = this.scanner.tokenStart;\n var children = null;\n\n this.eat(LEFTSQUAREBRACKET);\n\n children = readSequence.call(this, recognizer);\n\n if (!this.scanner.eof) {\n this.eat(RIGHTSQUAREBRACKET);\n }\n\n return {\n type: 'Brackets',\n loc: this.getLocation(start, this.scanner.tokenStart),\n children: children\n };\n },\n generate: function(node) {\n this.chunk('[');\n this.children(node);\n this.chunk(']');\n }\n};\n","var CDC = require('../../tokenizer').TYPE.CDC;\n\nmodule.exports = {\n name: 'CDC',\n structure: [],\n parse: function() {\n var start = this.scanner.tokenStart;\n\n this.eat(CDC); // -->\n\n return {\n type: 'CDC',\n loc: this.getLocation(start, this.scanner.tokenStart)\n };\n },\n generate: function() {\n this.chunk('-->');\n }\n};\n","var CDO = require('../../tokenizer').TYPE.CDO;\n\nmodule.exports = {\n name: 'CDO',\n structure: [],\n parse: function() {\n var start = this.scanner.tokenStart;\n\n this.eat(CDO); // \n child = this.CDC();\n break;\n\n // CSS Syntax Module Level 3\n // §2.2 Error handling\n // At the \"top level\" of a stylesheet, an starts an at-rule.\n case ATKEYWORD:\n child = this.parseWithFallback(this.Atrule, consumeRaw);\n break;\n\n // Anything else starts a qualified rule ...\n default:\n child = this.parseWithFallback(this.Rule, consumeRaw);\n }\n\n children.push(child);\n }\n\n return {\n type: 'StyleSheet',\n loc: this.getLocation(start, this.scanner.tokenStart),\n children: children\n };\n },\n generate: function(node) {\n this.children(node);\n },\n walkContext: 'stylesheet'\n};\n","var TYPE = require('../../tokenizer').TYPE;\n\nvar IDENT = TYPE.Ident;\nvar ASTERISK = 0x002A; // U+002A ASTERISK (*)\nvar VERTICALLINE = 0x007C; // U+007C VERTICAL LINE (|)\n\nfunction eatIdentifierOrAsterisk() {\n if (this.scanner.tokenType !== IDENT &&\n this.scanner.isDelim(ASTERISK) === false) {\n this.error('Identifier or asterisk is expected');\n }\n\n this.scanner.next();\n}\n\n// ident\n// ident|ident\n// ident|*\n// *\n// *|ident\n// *|*\n// |ident\n// |*\nmodule.exports = {\n name: 'TypeSelector',\n structure: {\n name: String\n },\n parse: function() {\n var start = this.scanner.tokenStart;\n\n if (this.scanner.isDelim(VERTICALLINE)) {\n this.scanner.next();\n eatIdentifierOrAsterisk.call(this);\n } else {\n eatIdentifierOrAsterisk.call(this);\n\n if (this.scanner.isDelim(VERTICALLINE)) {\n this.scanner.next();\n eatIdentifierOrAsterisk.call(this);\n }\n }\n\n return {\n type: 'TypeSelector',\n loc: this.getLocation(start, this.scanner.tokenStart),\n name: this.scanner.substrToCursor(start)\n };\n },\n generate: function(node) {\n this.chunk(node.name);\n }\n};\n","var isHexDigit = require('../../tokenizer').isHexDigit;\nvar cmpChar = require('../../tokenizer').cmpChar;\nvar TYPE = require('../../tokenizer').TYPE;\nvar NAME = require('../../tokenizer').NAME;\n\nvar IDENT = TYPE.Ident;\nvar NUMBER = TYPE.Number;\nvar DIMENSION = TYPE.Dimension;\nvar PLUSSIGN = 0x002B; // U+002B PLUS SIGN (+)\nvar HYPHENMINUS = 0x002D; // U+002D HYPHEN-MINUS (-)\nvar QUESTIONMARK = 0x003F; // U+003F QUESTION MARK (?)\nvar U = 0x0075; // U+0075 LATIN SMALL LETTER U (u)\n\nfunction eatHexSequence(offset, allowDash) {\n for (var pos = this.scanner.tokenStart + offset, len = 0; pos < this.scanner.tokenEnd; pos++) {\n var code = this.scanner.source.charCodeAt(pos);\n\n if (code === HYPHENMINUS && allowDash && len !== 0) {\n if (eatHexSequence.call(this, offset + len + 1, false) === 0) {\n this.error();\n }\n\n return -1;\n }\n\n if (!isHexDigit(code)) {\n this.error(\n allowDash && len !== 0\n ? 'HyphenMinus' + (len < 6 ? ' or hex digit' : '') + ' is expected'\n : (len < 6 ? 'Hex digit is expected' : 'Unexpected input'),\n pos\n );\n }\n\n if (++len > 6) {\n this.error('Too many hex digits', pos);\n };\n }\n\n this.scanner.next();\n return len;\n}\n\nfunction eatQuestionMarkSequence(max) {\n var count = 0;\n\n while (this.scanner.isDelim(QUESTIONMARK)) {\n if (++count > max) {\n this.error('Too many question marks');\n }\n\n this.scanner.next();\n }\n}\n\nfunction startsWith(code) {\n if (this.scanner.source.charCodeAt(this.scanner.tokenStart) !== code) {\n this.error(NAME[code] + ' is expected');\n }\n}\n\n// https://drafts.csswg.org/css-syntax/#urange\n// Informally, the production has three forms:\n// U+0001\n// Defines a range consisting of a single code point, in this case the code point \"1\".\n// U+0001-00ff\n// Defines a range of codepoints between the first and the second value, in this case\n// the range between \"1\" and \"ff\" (255 in decimal) inclusive.\n// U+00??\n// Defines a range of codepoints where the \"?\" characters range over all hex digits,\n// in this case defining the same as the value U+0000-00ff.\n// In each form, a maximum of 6 digits is allowed for each hexadecimal number (if you treat \"?\" as a hexadecimal digit).\n//\n// =\n// u '+' '?'* |\n// u '?'* |\n// u '?'* |\n// u |\n// u |\n// u '+' '?'+\nfunction scanUnicodeRange() {\n var hexLength = 0;\n\n // u '+' '?'*\n // u '+' '?'+\n if (this.scanner.isDelim(PLUSSIGN)) {\n this.scanner.next();\n\n if (this.scanner.tokenType === IDENT) {\n hexLength = eatHexSequence.call(this, 0, true);\n if (hexLength > 0) {\n eatQuestionMarkSequence.call(this, 6 - hexLength);\n }\n return;\n }\n\n if (this.scanner.isDelim(QUESTIONMARK)) {\n this.scanner.next();\n eatQuestionMarkSequence.call(this, 5);\n return;\n }\n\n this.error('Hex digit or question mark is expected');\n return;\n }\n\n // u '?'*\n // u \n // u \n if (this.scanner.tokenType === NUMBER) {\n startsWith.call(this, PLUSSIGN);\n hexLength = eatHexSequence.call(this, 1, true);\n\n if (this.scanner.isDelim(QUESTIONMARK)) {\n eatQuestionMarkSequence.call(this, 6 - hexLength);\n return;\n }\n\n if (this.scanner.tokenType === DIMENSION ||\n this.scanner.tokenType === NUMBER) {\n startsWith.call(this, HYPHENMINUS);\n eatHexSequence.call(this, 1, false);\n return;\n }\n\n return;\n }\n\n // u '?'*\n if (this.scanner.tokenType === DIMENSION) {\n startsWith.call(this, PLUSSIGN);\n hexLength = eatHexSequence.call(this, 1, true);\n\n if (hexLength > 0) {\n eatQuestionMarkSequence.call(this, 6 - hexLength);\n }\n\n return;\n }\n\n this.error();\n}\n\nmodule.exports = {\n name: 'UnicodeRange',\n structure: {\n value: String\n },\n parse: function() {\n var start = this.scanner.tokenStart;\n\n // U or u\n if (!cmpChar(this.scanner.source, start, U)) {\n this.error('U is expected');\n }\n\n if (!cmpChar(this.scanner.source, start + 1, PLUSSIGN)) {\n this.error('Plus sign is expected');\n }\n\n this.scanner.next();\n scanUnicodeRange.call(this);\n\n return {\n type: 'UnicodeRange',\n loc: this.getLocation(start, this.scanner.tokenStart),\n value: this.scanner.substrToCursor(start)\n };\n },\n generate: function(node) {\n this.chunk(node.value);\n }\n};\n","var isWhiteSpace = require('../../tokenizer').isWhiteSpace;\nvar cmpStr = require('../../tokenizer').cmpStr;\nvar TYPE = require('../../tokenizer').TYPE;\n\nvar FUNCTION = TYPE.Function;\nvar URL = TYPE.Url;\nvar RIGHTPARENTHESIS = TYPE.RightParenthesis;\n\n// | )\nmodule.exports = {\n name: 'Url',\n structure: {\n value: ['String', 'Raw']\n },\n parse: function() {\n var start = this.scanner.tokenStart;\n var value;\n\n switch (this.scanner.tokenType) {\n case URL:\n var rawStart = start + 4;\n var rawEnd = this.scanner.tokenEnd - 1;\n\n while (rawStart < rawEnd && isWhiteSpace(this.scanner.source.charCodeAt(rawStart))) {\n rawStart++;\n }\n\n while (rawStart < rawEnd && isWhiteSpace(this.scanner.source.charCodeAt(rawEnd - 1))) {\n rawEnd--;\n }\n\n value = {\n type: 'Raw',\n loc: this.getLocation(rawStart, rawEnd),\n value: this.scanner.source.substring(rawStart, rawEnd)\n };\n\n this.eat(URL);\n break;\n\n case FUNCTION:\n if (!cmpStr(this.scanner.source, this.scanner.tokenStart, this.scanner.tokenEnd, 'url(')) {\n this.error('Function name must be `url`');\n }\n\n this.eat(FUNCTION);\n this.scanner.skipSC();\n value = this.String();\n this.scanner.skipSC();\n this.eat(RIGHTPARENTHESIS);\n break;\n\n default:\n this.error('Url or Function is expected');\n }\n\n return {\n type: 'Url',\n loc: this.getLocation(start, this.scanner.tokenStart),\n value: value\n };\n },\n generate: function(node) {\n this.chunk('url');\n this.chunk('(');\n this.node(node.value);\n this.chunk(')');\n }\n};\n","module.exports = {\n name: 'Value',\n structure: {\n children: [[]]\n },\n parse: function() {\n var start = this.scanner.tokenStart;\n var children = this.readSequence(this.scope.Value);\n\n return {\n type: 'Value',\n loc: this.getLocation(start, this.scanner.tokenStart),\n children: children\n };\n },\n generate: function(node) {\n this.children(node);\n }\n};\n","var WHITESPACE = require('../../tokenizer').TYPE.WhiteSpace;\nvar SPACE = Object.freeze({\n type: 'WhiteSpace',\n loc: null,\n value: ' '\n});\n\nmodule.exports = {\n name: 'WhiteSpace',\n structure: {\n value: String\n },\n parse: function() {\n this.eat(WHITESPACE);\n return SPACE;\n\n // return {\n // type: 'WhiteSpace',\n // loc: this.getLocation(this.scanner.tokenStart, this.scanner.tokenEnd),\n // value: this.consume(WHITESPACE)\n // };\n },\n generate: function(node) {\n this.chunk(node.value);\n }\n};\n","module.exports = {\n AnPlusB: require('./AnPlusB'),\n Atrule: require('./Atrule'),\n AtrulePrelude: require('./AtrulePrelude'),\n AttributeSelector: require('./AttributeSelector'),\n Block: require('./Block'),\n Brackets: require('./Brackets'),\n CDC: require('./CDC'),\n CDO: require('./CDO'),\n ClassSelector: require('./ClassSelector'),\n Combinator: require('./Combinator'),\n Comment: require('./Comment'),\n Declaration: require('./Declaration'),\n DeclarationList: require('./DeclarationList'),\n Dimension: require('./Dimension'),\n Function: require('./Function'),\n Hash: require('./Hash'),\n Identifier: require('./Identifier'),\n IdSelector: require('./IdSelector'),\n MediaFeature: require('./MediaFeature'),\n MediaQuery: require('./MediaQuery'),\n MediaQueryList: require('./MediaQueryList'),\n Nth: require('./Nth'),\n Number: require('./Number'),\n Operator: require('./Operator'),\n Parentheses: require('./Parentheses'),\n Percentage: require('./Percentage'),\n PseudoClassSelector: require('./PseudoClassSelector'),\n PseudoElementSelector: require('./PseudoElementSelector'),\n Ratio: require('./Ratio'),\n Raw: require('./Raw'),\n Rule: require('./Rule'),\n Selector: require('./Selector'),\n SelectorList: require('./SelectorList'),\n String: require('./String'),\n StyleSheet: require('./StyleSheet'),\n TypeSelector: require('./TypeSelector'),\n UnicodeRange: require('./UnicodeRange'),\n Url: require('./Url'),\n Value: require('./Value'),\n WhiteSpace: require('./WhiteSpace')\n};\n","module.exports = {\n parseContext: {\n default: 'StyleSheet',\n stylesheet: 'StyleSheet',\n atrule: 'Atrule',\n atrulePrelude: function(options) {\n return this.AtrulePrelude(options.atrule ? String(options.atrule) : null);\n },\n mediaQueryList: 'MediaQueryList',\n mediaQuery: 'MediaQuery',\n rule: 'Rule',\n selectorList: 'SelectorList',\n selector: 'Selector',\n block: function() {\n return this.Block(true);\n },\n declarationList: 'DeclarationList',\n declaration: 'Declaration',\n value: 'Value'\n },\n scope: require('../scope'),\n atrule: require('../atrule'),\n pseudo: require('../pseudo'),\n node: require('../node')\n};\n","var createParser = require('./create');\nvar config = require('../syntax/config/parser');\n\nmodule.exports = createParser(config);\n","import parse from 'css-tree/lib/parser/index.js';\nimport { walk } from 'estree-walker';\nimport { Parser } from '../index';\nimport { Node } from 'estree';\nimport { Style } from '../../interfaces';\nimport parser_errors from '../errors';\n\nexport default function read_style(parser: Parser, start: number, attributes: Node[]): Style {\n\tconst content_start = parser.index;\n\n\tconst styles = parser.read_until(/<\\/style\\s*>/, parser_errors.unclosed_style);\n\n\tif (parser.index >= parser.template.length) {\n\t\tparser.error(parser_errors.unclosed_style);\n\t}\n\n\tconst content_end = parser.index;\n\n\tlet ast;\n\n\ttry {\n\t\tast = parse(styles, {\n\t\t\tpositions: true,\n\t\t\toffset: content_start,\n\t\t\tonParseError(error) {\n\t\t\t\tthrow error;\n\t\t\t}\n\t\t});\n\t} catch (err) {\n\t\tif (err.name === 'SyntaxError') {\n\t\t\tparser.error(parser_errors.css_syntax_error(err.message), err.offset);\n\t\t} else {\n\t\t\tthrow err;\n\t\t}\n\t}\n\n\tast = JSON.parse(JSON.stringify(ast));\n\n\t// tidy up AST\n\twalk(ast, {\n\t\tenter: (node: any) => { // `any` because this isn't an ESTree node\n\t\t\t// replace `ref:a` nodes\n\t\t\tif (node.type === 'Selector') {\n\t\t\t\tfor (let i = 0; i < node.children.length; i += 1) {\n\t\t\t\t\tconst a = node.children[i];\n\t\t\t\t\tconst b = node.children[i + 1];\n\n\t\t\t\t\tif (is_ref_selector(a, b)) {\n\t\t\t\t\t\tparser.error(parser_errors.invalid_ref_selector, a.loc.start.offset);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (node.type === 'Declaration' && node.value.type === 'Value' && node.value.children.length === 0) {\n\t\t\t\tparser.error(parser_errors.invalid_declaration, node.start);\n\t\t\t}\n\n\t\t\tif (node.type === 'PseudoClassSelector' && node.name === 'global' && node.children === null) {\n\t\t\t\tparser.error(parser_errors.empty_global_selector, node.loc.start.offset);\n\t\t\t}\n\n\t\t\tif (node.loc) {\n\t\t\t\tnode.start = node.loc.start.offset;\n\t\t\t\tnode.end = node.loc.end.offset;\n\t\t\t\tdelete node.loc;\n\t\t\t}\n\t\t}\n\t});\n\n\tparser.read(/<\\/style\\s*>/);\n\tconst end = parser.index;\n\n\treturn {\n\t\ttype: 'Style',\n\t\tstart,\n\t\tend,\n\t\tattributes,\n\t\tchildren: ast.children,\n\t\tcontent: {\n\t\t\tstart: content_start,\n\t\t\tend: content_end,\n\t\t\tstyles\n\t\t}\n\t};\n}\n\nfunction is_ref_selector(a: any, b: any) { // TODO add CSS node types\n\tif (!b) return false;\n\n\treturn (\n\t\ta.type === 'TypeSelector' &&\n\t\ta.name === 'ref' &&\n\t\tb.type === 'PseudoClassSelector'\n\t);\n}\n","// https://dev.w3.org/html5/html-author/charref\nexport default {\n\tCounterClockwiseContourIntegral: 8755,\n\tClockwiseContourIntegral: 8754,\n\tDoubleLongLeftRightArrow: 10234,\n\tDiacriticalDoubleAcute: 733,\n\tNotSquareSupersetEqual: 8931,\n\tCloseCurlyDoubleQuote: 8221,\n\tDoubleContourIntegral: 8751,\n\tFilledVerySmallSquare: 9642,\n\tNegativeVeryThinSpace: 8203,\n\tNotPrecedesSlantEqual: 8928,\n\tNotRightTriangleEqual: 8941,\n\tNotSucceedsSlantEqual: 8929,\n\tCapitalDifferentialD: 8517,\n\tDoubleLeftRightArrow: 8660,\n\tDoubleLongRightArrow: 10233,\n\tEmptyVerySmallSquare: 9643,\n\tNestedGreaterGreater: 8811,\n\tNotDoubleVerticalBar: 8742,\n\tNotLeftTriangleEqual: 8940,\n\tNotSquareSubsetEqual: 8930,\n\tOpenCurlyDoubleQuote: 8220,\n\tReverseUpEquilibrium: 10607,\n\tDoubleLongLeftArrow: 10232,\n\tDownLeftRightVector: 10576,\n\tLeftArrowRightArrow: 8646,\n\tNegativeMediumSpace: 8203,\n\tRightArrowLeftArrow: 8644,\n\tSquareSupersetEqual: 8850,\n\tleftrightsquigarrow: 8621,\n\tDownRightTeeVector: 10591,\n\tDownRightVectorBar: 10583,\n\tLongLeftRightArrow: 10231,\n\tLongleftrightarrow: 10234,\n\tNegativeThickSpace: 8203,\n\tPrecedesSlantEqual: 8828,\n\tReverseEquilibrium: 8651,\n\tRightDoubleBracket: 10215,\n\tRightDownTeeVector: 10589,\n\tRightDownVectorBar: 10581,\n\tRightTriangleEqual: 8885,\n\tSquareIntersection: 8851,\n\tSucceedsSlantEqual: 8829,\n\tblacktriangleright: 9656,\n\tlongleftrightarrow: 10231,\n\tDoubleUpDownArrow: 8661,\n\tDoubleVerticalBar: 8741,\n\tDownLeftTeeVector: 10590,\n\tDownLeftVectorBar: 10582,\n\tFilledSmallSquare: 9724,\n\tGreaterSlantEqual: 10878,\n\tLeftDoubleBracket: 10214,\n\tLeftDownTeeVector: 10593,\n\tLeftDownVectorBar: 10585,\n\tLeftTriangleEqual: 8884,\n\tNegativeThinSpace: 8203,\n\tNotReverseElement: 8716,\n\tNotTildeFullEqual: 8775,\n\tRightAngleBracket: 10217,\n\tRightUpDownVector: 10575,\n\tSquareSubsetEqual: 8849,\n\tVerticalSeparator: 10072,\n\tblacktriangledown: 9662,\n\tblacktriangleleft: 9666,\n\tleftrightharpoons: 8651,\n\trightleftharpoons: 8652,\n\ttwoheadrightarrow: 8608,\n\tDiacriticalAcute: 180,\n\tDiacriticalGrave: 96,\n\tDiacriticalTilde: 732,\n\tDoubleRightArrow: 8658,\n\tDownArrowUpArrow: 8693,\n\tEmptySmallSquare: 9723,\n\tGreaterEqualLess: 8923,\n\tGreaterFullEqual: 8807,\n\tLeftAngleBracket: 10216,\n\tLeftUpDownVector: 10577,\n\tLessEqualGreater: 8922,\n\tNonBreakingSpace: 160,\n\tNotRightTriangle: 8939,\n\tNotSupersetEqual: 8841,\n\tRightTriangleBar: 10704,\n\tRightUpTeeVector: 10588,\n\tRightUpVectorBar: 10580,\n\tUnderParenthesis: 9181,\n\tUpArrowDownArrow: 8645,\n\tcirclearrowright: 8635,\n\tdownharpoonright: 8642,\n\tntrianglerighteq: 8941,\n\trightharpoondown: 8641,\n\trightrightarrows: 8649,\n\ttwoheadleftarrow: 8606,\n\tvartriangleright: 8883,\n\tCloseCurlyQuote: 8217,\n\tContourIntegral: 8750,\n\tDoubleDownArrow: 8659,\n\tDoubleLeftArrow: 8656,\n\tDownRightVector: 8641,\n\tLeftRightVector: 10574,\n\tLeftTriangleBar: 10703,\n\tLeftUpTeeVector: 10592,\n\tLeftUpVectorBar: 10584,\n\tLowerRightArrow: 8600,\n\tNotGreaterEqual: 8817,\n\tNotGreaterTilde: 8821,\n\tNotLeftTriangle: 8938,\n\tOverParenthesis: 9180,\n\tRightDownVector: 8642,\n\tShortRightArrow: 8594,\n\tUpperRightArrow: 8599,\n\tbigtriangledown: 9661,\n\tcirclearrowleft: 8634,\n\tcurvearrowright: 8631,\n\tdownharpoonleft: 8643,\n\tleftharpoondown: 8637,\n\tleftrightarrows: 8646,\n\tnLeftrightarrow: 8654,\n\tnleftrightarrow: 8622,\n\tntrianglelefteq: 8940,\n\trightleftarrows: 8644,\n\trightsquigarrow: 8605,\n\trightthreetimes: 8908,\n\tstraightepsilon: 1013,\n\ttrianglerighteq: 8885,\n\tvartriangleleft: 8882,\n\tDiacriticalDot: 729,\n\tDoubleRightTee: 8872,\n\tDownLeftVector: 8637,\n\tGreaterGreater: 10914,\n\tHorizontalLine: 9472,\n\tInvisibleComma: 8291,\n\tInvisibleTimes: 8290,\n\tLeftDownVector: 8643,\n\tLeftRightArrow: 8596,\n\tLeftrightarrow: 8660,\n\tLessSlantEqual: 10877,\n\tLongRightArrow: 10230,\n\tLongrightarrow: 10233,\n\tLowerLeftArrow: 8601,\n\tNestedLessLess: 8810,\n\tNotGreaterLess: 8825,\n\tNotLessGreater: 8824,\n\tNotSubsetEqual: 8840,\n\tNotVerticalBar: 8740,\n\tOpenCurlyQuote: 8216,\n\tReverseElement: 8715,\n\tRightTeeVector: 10587,\n\tRightVectorBar: 10579,\n\tShortDownArrow: 8595,\n\tShortLeftArrow: 8592,\n\tSquareSuperset: 8848,\n\tTildeFullEqual: 8773,\n\tUpperLeftArrow: 8598,\n\tZeroWidthSpace: 8203,\n\tcurvearrowleft: 8630,\n\tdoublebarwedge: 8966,\n\tdowndownarrows: 8650,\n\thookrightarrow: 8618,\n\tleftleftarrows: 8647,\n\tleftrightarrow: 8596,\n\tleftthreetimes: 8907,\n\tlongrightarrow: 10230,\n\tlooparrowright: 8620,\n\tnshortparallel: 8742,\n\tntriangleright: 8939,\n\trightarrowtail: 8611,\n\trightharpoonup: 8640,\n\ttrianglelefteq: 8884,\n\tupharpoonright: 8638,\n\tApplyFunction: 8289,\n\tDifferentialD: 8518,\n\tDoubleLeftTee: 10980,\n\tDoubleUpArrow: 8657,\n\tLeftTeeVector: 10586,\n\tLeftVectorBar: 10578,\n\tLessFullEqual: 8806,\n\tLongLeftArrow: 10229,\n\tLongleftarrow: 10232,\n\tNotTildeEqual: 8772,\n\tNotTildeTilde: 8777,\n\tPoincareplane: 8460,\n\tPrecedesEqual: 10927,\n\tPrecedesTilde: 8830,\n\tRightArrowBar: 8677,\n\tRightTeeArrow: 8614,\n\tRightTriangle: 8883,\n\tRightUpVector: 8638,\n\tSucceedsEqual: 10928,\n\tSucceedsTilde: 8831,\n\tSupersetEqual: 8839,\n\tUpEquilibrium: 10606,\n\tVerticalTilde: 8768,\n\tVeryThinSpace: 8202,\n\tbigtriangleup: 9651,\n\tblacktriangle: 9652,\n\tdivideontimes: 8903,\n\tfallingdotseq: 8786,\n\thookleftarrow: 8617,\n\tleftarrowtail: 8610,\n\tleftharpoonup: 8636,\n\tlongleftarrow: 10229,\n\tlooparrowleft: 8619,\n\tmeasuredangle: 8737,\n\tntriangleleft: 8938,\n\tshortparallel: 8741,\n\tsmallsetminus: 8726,\n\ttriangleright: 9657,\n\tupharpoonleft: 8639,\n\tDownArrowBar: 10515,\n\tDownTeeArrow: 8615,\n\tExponentialE: 8519,\n\tGreaterEqual: 8805,\n\tGreaterTilde: 8819,\n\tHilbertSpace: 8459,\n\tHumpDownHump: 8782,\n\tIntersection: 8898,\n\tLeftArrowBar: 8676,\n\tLeftTeeArrow: 8612,\n\tLeftTriangle: 8882,\n\tLeftUpVector: 8639,\n\tNotCongruent: 8802,\n\tNotLessEqual: 8816,\n\tNotLessTilde: 8820,\n\tProportional: 8733,\n\tRightCeiling: 8969,\n\tRoundImplies: 10608,\n\tShortUpArrow: 8593,\n\tSquareSubset: 8847,\n\tUnderBracket: 9141,\n\tVerticalLine: 124,\n\tblacklozenge: 10731,\n\texponentiale: 8519,\n\trisingdotseq: 8787,\n\ttriangledown: 9663,\n\ttriangleleft: 9667,\n\tCircleMinus: 8854,\n\tCircleTimes: 8855,\n\tEquilibrium: 8652,\n\tGreaterLess: 8823,\n\tLeftCeiling: 8968,\n\tLessGreater: 8822,\n\tMediumSpace: 8287,\n\tNotPrecedes: 8832,\n\tNotSucceeds: 8833,\n\tOverBracket: 9140,\n\tRightVector: 8640,\n\tRrightarrow: 8667,\n\tRuleDelayed: 10740,\n\tSmallCircle: 8728,\n\tSquareUnion: 8852,\n\tSubsetEqual: 8838,\n\tUpDownArrow: 8597,\n\tUpdownarrow: 8661,\n\tVerticalBar: 8739,\n\tbackepsilon: 1014,\n\tblacksquare: 9642,\n\tcircledcirc: 8858,\n\tcircleddash: 8861,\n\tcurlyeqprec: 8926,\n\tcurlyeqsucc: 8927,\n\tdiamondsuit: 9830,\n\teqslantless: 10901,\n\texpectation: 8496,\n\tnRightarrow: 8655,\n\tnrightarrow: 8603,\n\tpreccurlyeq: 8828,\n\tprecnapprox: 10937,\n\tquaternions: 8461,\n\tstraightphi: 981,\n\tsucccurlyeq: 8829,\n\tsuccnapprox: 10938,\n\tthickapprox: 8776,\n\tupdownarrow: 8597,\n\tBernoullis: 8492,\n\tCirclePlus: 8853,\n\tEqualTilde: 8770,\n\tFouriertrf: 8497,\n\tImaginaryI: 8520,\n\tLaplacetrf: 8466,\n\tLeftVector: 8636,\n\tLleftarrow: 8666,\n\tNotElement: 8713,\n\tNotGreater: 8815,\n\tProportion: 8759,\n\tRightArrow: 8594,\n\tRightFloor: 8971,\n\tRightarrow: 8658,\n\tTildeEqual: 8771,\n\tTildeTilde: 8776,\n\tUnderBrace: 9183,\n\tUpArrowBar: 10514,\n\tUpTeeArrow: 8613,\n\tcircledast: 8859,\n\tcomplement: 8705,\n\tcurlywedge: 8911,\n\teqslantgtr: 10902,\n\tgtreqqless: 10892,\n\tlessapprox: 10885,\n\tlesseqqgtr: 10891,\n\tlmoustache: 9136,\n\tlongmapsto: 10236,\n\tmapstodown: 8615,\n\tmapstoleft: 8612,\n\tnLeftarrow: 8653,\n\tnleftarrow: 8602,\n\tprecapprox: 10935,\n\trightarrow: 8594,\n\trmoustache: 9137,\n\tsqsubseteq: 8849,\n\tsqsupseteq: 8850,\n\tsubsetneqq: 10955,\n\tsuccapprox: 10936,\n\tsupsetneqq: 10956,\n\tupuparrows: 8648,\n\tvarepsilon: 949,\n\tvarnothing: 8709,\n\tBackslash: 8726,\n\tCenterDot: 183,\n\tCircleDot: 8857,\n\tCongruent: 8801,\n\tCoproduct: 8720,\n\tDoubleDot: 168,\n\tDownArrow: 8595,\n\tDownBreve: 785,\n\tDownarrow: 8659,\n\tHumpEqual: 8783,\n\tLeftArrow: 8592,\n\tLeftFloor: 8970,\n\tLeftarrow: 8656,\n\tLessTilde: 8818,\n\tMellintrf: 8499,\n\tMinusPlus: 8723,\n\tNotCupCap: 8813,\n\tNotExists: 8708,\n\tOverBrace: 9182,\n\tPlusMinus: 177,\n\tTherefore: 8756,\n\tThinSpace: 8201,\n\tTripleDot: 8411,\n\tUnionPlus: 8846,\n\tbackprime: 8245,\n\tbacksimeq: 8909,\n\tbigotimes: 10754,\n\tcenterdot: 183,\n\tcheckmark: 10003,\n\tcomplexes: 8450,\n\tdotsquare: 8865,\n\tdownarrow: 8595,\n\tgtrapprox: 10886,\n\tgtreqless: 8923,\n\theartsuit: 9829,\n\tleftarrow: 8592,\n\tlesseqgtr: 8922,\n\tnparallel: 8742,\n\tnshortmid: 8740,\n\tnsubseteq: 8840,\n\tnsupseteq: 8841,\n\tpitchfork: 8916,\n\trationals: 8474,\n\tspadesuit: 9824,\n\tsubseteqq: 10949,\n\tsubsetneq: 8842,\n\tsupseteqq: 10950,\n\tsupsetneq: 8843,\n\ttherefore: 8756,\n\ttriangleq: 8796,\n\tvarpropto: 8733,\n\tDDotrahd: 10513,\n\tDotEqual: 8784,\n\tIntegral: 8747,\n\tLessLess: 10913,\n\tNotEqual: 8800,\n\tNotTilde: 8769,\n\tPartialD: 8706,\n\tPrecedes: 8826,\n\tRightTee: 8866,\n\tSucceeds: 8827,\n\tSuchThat: 8715,\n\tSuperset: 8835,\n\tUarrocir: 10569,\n\tUnderBar: 818,\n\tandslope: 10840,\n\tangmsdaa: 10664,\n\tangmsdab: 10665,\n\tangmsdac: 10666,\n\tangmsdad: 10667,\n\tangmsdae: 10668,\n\tangmsdaf: 10669,\n\tangmsdag: 10670,\n\tangmsdah: 10671,\n\tangrtvbd: 10653,\n\tapproxeq: 8778,\n\tawconint: 8755,\n\tbackcong: 8780,\n\tbarwedge: 8965,\n\tbbrktbrk: 9142,\n\tbigoplus: 10753,\n\tbigsqcup: 10758,\n\tbiguplus: 10756,\n\tbigwedge: 8896,\n\tboxminus: 8863,\n\tboxtimes: 8864,\n\tcapbrcup: 10825,\n\tcircledR: 174,\n\tcircledS: 9416,\n\tcirfnint: 10768,\n\tclubsuit: 9827,\n\tcupbrcap: 10824,\n\tcurlyvee: 8910,\n\tcwconint: 8754,\n\tdoteqdot: 8785,\n\tdotminus: 8760,\n\tdrbkarow: 10512,\n\tdzigrarr: 10239,\n\telinters: 9191,\n\temptyset: 8709,\n\teqvparsl: 10725,\n\tfpartint: 10765,\n\tgeqslant: 10878,\n\tgesdotol: 10884,\n\tgnapprox: 10890,\n\thksearow: 10533,\n\thkswarow: 10534,\n\timagline: 8464,\n\timagpart: 8465,\n\tinfintie: 10717,\n\tintegers: 8484,\n\tintercal: 8890,\n\tintlarhk: 10775,\n\tlaemptyv: 10676,\n\tldrushar: 10571,\n\tleqslant: 10877,\n\tlesdotor: 10883,\n\tllcorner: 8990,\n\tlnapprox: 10889,\n\tlrcorner: 8991,\n\tlurdshar: 10570,\n\tmapstoup: 8613,\n\tmultimap: 8888,\n\tnaturals: 8469,\n\totimesas: 10806,\n\tparallel: 8741,\n\tplusacir: 10787,\n\tpointint: 10773,\n\tprecneqq: 10933,\n\tprecnsim: 8936,\n\tprofalar: 9006,\n\tprofline: 8978,\n\tprofsurf: 8979,\n\traemptyv: 10675,\n\trealpart: 8476,\n\trppolint: 10770,\n\trtriltri: 10702,\n\tscpolint: 10771,\n\tsetminus: 8726,\n\tshortmid: 8739,\n\tsmeparsl: 10724,\n\tsqsubset: 8847,\n\tsqsupset: 8848,\n\tsubseteq: 8838,\n\tsuccneqq: 10934,\n\tsuccnsim: 8937,\n\tsupseteq: 8839,\n\tthetasym: 977,\n\tthicksim: 8764,\n\ttimesbar: 10801,\n\ttriangle: 9653,\n\ttriminus: 10810,\n\ttrpezium: 9186,\n\tulcorner: 8988,\n\turcorner: 8989,\n\tvarkappa: 1008,\n\tvarsigma: 962,\n\tvartheta: 977,\n\tBecause: 8757,\n\tCayleys: 8493,\n\tCconint: 8752,\n\tCedilla: 184,\n\tDiamond: 8900,\n\tDownTee: 8868,\n\tElement: 8712,\n\tEpsilon: 917,\n\tImplies: 8658,\n\tLeftTee: 8867,\n\tNewLine: 10,\n\tNoBreak: 8288,\n\tNotLess: 8814,\n\tOmicron: 927,\n\tOverBar: 175,\n\tProduct: 8719,\n\tUpArrow: 8593,\n\tUparrow: 8657,\n\tUpsilon: 933,\n\talefsym: 8501,\n\tangrtvb: 8894,\n\tangzarr: 9084,\n\tasympeq: 8781,\n\tbacksim: 8765,\n\tbecause: 8757,\n\tbemptyv: 10672,\n\tbetween: 8812,\n\tbigcirc: 9711,\n\tbigodot: 10752,\n\tbigstar: 9733,\n\tboxplus: 8862,\n\tccupssm: 10832,\n\tcemptyv: 10674,\n\tcirscir: 10690,\n\tcoloneq: 8788,\n\tcongdot: 10861,\n\tcudarrl: 10552,\n\tcudarrr: 10549,\n\tcularrp: 10557,\n\tcurarrm: 10556,\n\tdbkarow: 10511,\n\tddagger: 8225,\n\tddotseq: 10871,\n\tdemptyv: 10673,\n\tdiamond: 8900,\n\tdigamma: 989,\n\tdotplus: 8724,\n\tdwangle: 10662,\n\tepsilon: 949,\n\teqcolon: 8789,\n\tequivDD: 10872,\n\tgesdoto: 10882,\n\tgtquest: 10876,\n\tgtrless: 8823,\n\tharrcir: 10568,\n\tintprod: 10812,\n\tisindot: 8949,\n\tlarrbfs: 10527,\n\tlarrsim: 10611,\n\tlbrksld: 10639,\n\tlbrkslu: 10637,\n\tldrdhar: 10599,\n\tlesdoto: 10881,\n\tlessdot: 8918,\n\tlessgtr: 8822,\n\tlesssim: 8818,\n\tlotimes: 10804,\n\tlozenge: 9674,\n\tltquest: 10875,\n\tluruhar: 10598,\n\tmaltese: 10016,\n\tminusdu: 10794,\n\tnapprox: 8777,\n\tnatural: 9838,\n\tnearrow: 8599,\n\tnexists: 8708,\n\tnotinva: 8713,\n\tnotinvb: 8951,\n\tnotinvc: 8950,\n\tnotniva: 8716,\n\tnotnivb: 8958,\n\tnotnivc: 8957,\n\tnpolint: 10772,\n\tnsqsube: 8930,\n\tnsqsupe: 8931,\n\tnvinfin: 10718,\n\tnwarrow: 8598,\n\tolcross: 10683,\n\tomicron: 959,\n\torderof: 8500,\n\torslope: 10839,\n\tpertenk: 8241,\n\tplanckh: 8462,\n\tpluscir: 10786,\n\tplussim: 10790,\n\tplustwo: 10791,\n\tprecsim: 8830,\n\tquatint: 10774,\n\tquesteq: 8799,\n\trarrbfs: 10528,\n\trarrsim: 10612,\n\trbrksld: 10638,\n\trbrkslu: 10640,\n\trdldhar: 10601,\n\trealine: 8475,\n\trotimes: 10805,\n\truluhar: 10600,\n\tsearrow: 8600,\n\tsimplus: 10788,\n\tsimrarr: 10610,\n\tsubedot: 10947,\n\tsubmult: 10945,\n\tsubplus: 10943,\n\tsubrarr: 10617,\n\tsuccsim: 8831,\n\tsupdsub: 10968,\n\tsupedot: 10948,\n\tsuphsub: 10967,\n\tsuplarr: 10619,\n\tsupmult: 10946,\n\tsupplus: 10944,\n\tswarrow: 8601,\n\ttopfork: 10970,\n\ttriplus: 10809,\n\ttritime: 10811,\n\tuparrow: 8593,\n\tupsilon: 965,\n\tuwangle: 10663,\n\tvzigzag: 10650,\n\tzigrarr: 8669,\n\tAacute: 193,\n\tAbreve: 258,\n\tAgrave: 192,\n\tAssign: 8788,\n\tAtilde: 195,\n\tBarwed: 8966,\n\tBumpeq: 8782,\n\tCacute: 262,\n\tCcaron: 268,\n\tCcedil: 199,\n\tColone: 10868,\n\tConint: 8751,\n\tCupCap: 8781,\n\tDagger: 8225,\n\tDcaron: 270,\n\tDotDot: 8412,\n\tDstrok: 272,\n\tEacute: 201,\n\tEcaron: 282,\n\tEgrave: 200,\n\tExists: 8707,\n\tForAll: 8704,\n\tGammad: 988,\n\tGbreve: 286,\n\tGcedil: 290,\n\tHARDcy: 1066,\n\tHstrok: 294,\n\tIacute: 205,\n\tIgrave: 204,\n\tItilde: 296,\n\tJsercy: 1032,\n\tKcedil: 310,\n\tLacute: 313,\n\tLambda: 923,\n\tLcaron: 317,\n\tLcedil: 315,\n\tLmidot: 319,\n\tLstrok: 321,\n\tNacute: 323,\n\tNcaron: 327,\n\tNcedil: 325,\n\tNtilde: 209,\n\tOacute: 211,\n\tOdblac: 336,\n\tOgrave: 210,\n\tOslash: 216,\n\tOtilde: 213,\n\tOtimes: 10807,\n\tRacute: 340,\n\tRarrtl: 10518,\n\tRcaron: 344,\n\tRcedil: 342,\n\tSHCHcy: 1065,\n\tSOFTcy: 1068,\n\tSacute: 346,\n\tScaron: 352,\n\tScedil: 350,\n\tSquare: 9633,\n\tSubset: 8912,\n\tSupset: 8913,\n\tTcaron: 356,\n\tTcedil: 354,\n\tTstrok: 358,\n\tUacute: 218,\n\tUbreve: 364,\n\tUdblac: 368,\n\tUgrave: 217,\n\tUtilde: 360,\n\tVdashl: 10982,\n\tVerbar: 8214,\n\tVvdash: 8874,\n\tYacute: 221,\n\tZacute: 377,\n\tZcaron: 381,\n\taacute: 225,\n\tabreve: 259,\n\tagrave: 224,\n\tandand: 10837,\n\tangmsd: 8737,\n\tangsph: 8738,\n\tapacir: 10863,\n\tapprox: 8776,\n\tatilde: 227,\n\tbarvee: 8893,\n\tbarwed: 8965,\n\tbecaus: 8757,\n\tbernou: 8492,\n\tbigcap: 8898,\n\tbigcup: 8899,\n\tbigvee: 8897,\n\tbkarow: 10509,\n\tbottom: 8869,\n\tbowtie: 8904,\n\tboxbox: 10697,\n\tbprime: 8245,\n\tbrvbar: 166,\n\tbullet: 8226,\n\tbumpeq: 8783,\n\tcacute: 263,\n\tcapand: 10820,\n\tcapcap: 10827,\n\tcapcup: 10823,\n\tcapdot: 10816,\n\tccaron: 269,\n\tccedil: 231,\n\tcirceq: 8791,\n\tcirmid: 10991,\n\tcolone: 8788,\n\tcommat: 64,\n\tcompfn: 8728,\n\tconint: 8750,\n\tcoprod: 8720,\n\tcopysr: 8471,\n\tcularr: 8630,\n\tcupcap: 10822,\n\tcupcup: 10826,\n\tcupdot: 8845,\n\tcurarr: 8631,\n\tcurren: 164,\n\tcylcty: 9005,\n\tdagger: 8224,\n\tdaleth: 8504,\n\tdcaron: 271,\n\tdfisht: 10623,\n\tdivide: 247,\n\tdivonx: 8903,\n\tdlcorn: 8990,\n\tdlcrop: 8973,\n\tdollar: 36,\n\tdrcorn: 8991,\n\tdrcrop: 8972,\n\tdstrok: 273,\n\teacute: 233,\n\teaster: 10862,\n\tecaron: 283,\n\tecolon: 8789,\n\tegrave: 232,\n\tegsdot: 10904,\n\telsdot: 10903,\n\temptyv: 8709,\n\temsp13: 8196,\n\temsp14: 8197,\n\teparsl: 10723,\n\teqcirc: 8790,\n\tequals: 61,\n\tequest: 8799,\n\tfemale: 9792,\n\tffilig: 64259,\n\tffllig: 64260,\n\tforall: 8704,\n\tfrac12: 189,\n\tfrac13: 8531,\n\tfrac14: 188,\n\tfrac15: 8533,\n\tfrac16: 8537,\n\tfrac18: 8539,\n\tfrac23: 8532,\n\tfrac25: 8534,\n\tfrac34: 190,\n\tfrac35: 8535,\n\tfrac38: 8540,\n\tfrac45: 8536,\n\tfrac56: 8538,\n\tfrac58: 8541,\n\tfrac78: 8542,\n\tgacute: 501,\n\tgammad: 989,\n\tgbreve: 287,\n\tgesdot: 10880,\n\tgesles: 10900,\n\tgtlPar: 10645,\n\tgtrarr: 10616,\n\tgtrdot: 8919,\n\tgtrsim: 8819,\n\thairsp: 8202,\n\thamilt: 8459,\n\thardcy: 1098,\n\thearts: 9829,\n\thellip: 8230,\n\thercon: 8889,\n\thomtht: 8763,\n\thorbar: 8213,\n\thslash: 8463,\n\thstrok: 295,\n\thybull: 8259,\n\thyphen: 8208,\n\tiacute: 237,\n\tigrave: 236,\n\tiiiint: 10764,\n\tiinfin: 10716,\n\tincare: 8453,\n\tinodot: 305,\n\tintcal: 8890,\n\tiquest: 191,\n\tisinsv: 8947,\n\titilde: 297,\n\tjsercy: 1112,\n\tkappav: 1008,\n\tkcedil: 311,\n\tkgreen: 312,\n\tlAtail: 10523,\n\tlacute: 314,\n\tlagran: 8466,\n\tlambda: 955,\n\tlangle: 10216,\n\tlarrfs: 10525,\n\tlarrhk: 8617,\n\tlarrlp: 8619,\n\tlarrpl: 10553,\n\tlarrtl: 8610,\n\tlatail: 10521,\n\tlbrace: 123,\n\tlbrack: 91,\n\tlcaron: 318,\n\tlcedil: 316,\n\tldquor: 8222,\n\tlesdot: 10879,\n\tlesges: 10899,\n\tlfisht: 10620,\n\tlfloor: 8970,\n\tlharul: 10602,\n\tllhard: 10603,\n\tlmidot: 320,\n\tlmoust: 9136,\n\tloplus: 10797,\n\tlowast: 8727,\n\tlowbar: 95,\n\tlparlt: 10643,\n\tlrhard: 10605,\n\tlsaquo: 8249,\n\tlsquor: 8218,\n\tlstrok: 322,\n\tlthree: 8907,\n\tltimes: 8905,\n\tltlarr: 10614,\n\tltrPar: 10646,\n\tmapsto: 8614,\n\tmarker: 9646,\n\tmcomma: 10793,\n\tmidast: 42,\n\tmidcir: 10992,\n\tmiddot: 183,\n\tminusb: 8863,\n\tminusd: 8760,\n\tmnplus: 8723,\n\tmodels: 8871,\n\tmstpos: 8766,\n\tnVDash: 8879,\n\tnVdash: 8878,\n\tnacute: 324,\n\tncaron: 328,\n\tncedil: 326,\n\tnearhk: 10532,\n\tnequiv: 8802,\n\tnesear: 10536,\n\tnexist: 8708,\n\tnltrie: 8940,\n\tnprcue: 8928,\n\tnrtrie: 8941,\n\tnsccue: 8929,\n\tnsimeq: 8772,\n\tntilde: 241,\n\tnumero: 8470,\n\tnvDash: 8877,\n\tnvHarr: 10500,\n\tnvdash: 8876,\n\tnvlArr: 10498,\n\tnvrArr: 10499,\n\tnwarhk: 10531,\n\tnwnear: 10535,\n\toacute: 243,\n\todblac: 337,\n\todsold: 10684,\n\tograve: 242,\n\tominus: 8854,\n\torigof: 8886,\n\toslash: 248,\n\totilde: 245,\n\totimes: 8855,\n\tparsim: 10995,\n\tpercnt: 37,\n\tperiod: 46,\n\tpermil: 8240,\n\tphmmat: 8499,\n\tplanck: 8463,\n\tplankv: 8463,\n\tplusdo: 8724,\n\tplusdu: 10789,\n\tplusmn: 177,\n\tpreceq: 10927,\n\tprimes: 8473,\n\tprnsim: 8936,\n\tpropto: 8733,\n\tprurel: 8880,\n\tpuncsp: 8200,\n\tqprime: 8279,\n\trAtail: 10524,\n\tracute: 341,\n\trangle: 10217,\n\trarrap: 10613,\n\trarrfs: 10526,\n\trarrhk: 8618,\n\trarrlp: 8620,\n\trarrpl: 10565,\n\trarrtl: 8611,\n\tratail: 10522,\n\trbrace: 125,\n\trbrack: 93,\n\trcaron: 345,\n\trcedil: 343,\n\trdquor: 8221,\n\trfisht: 10621,\n\trfloor: 8971,\n\trharul: 10604,\n\trmoust: 9137,\n\troplus: 10798,\n\trpargt: 10644,\n\trsaquo: 8250,\n\trsquor: 8217,\n\trthree: 8908,\n\trtimes: 8906,\n\tsacute: 347,\n\tscaron: 353,\n\tscedil: 351,\n\tscnsim: 8937,\n\tsearhk: 10533,\n\tseswar: 10537,\n\tsfrown: 8994,\n\tshchcy: 1097,\n\tsigmaf: 962,\n\tsigmav: 962,\n\tsimdot: 10858,\n\tsmashp: 10803,\n\tsoftcy: 1100,\n\tsolbar: 9023,\n\tspades: 9824,\n\tsqsube: 8849,\n\tsqsupe: 8850,\n\tsquare: 9633,\n\tsquarf: 9642,\n\tssetmn: 8726,\n\tssmile: 8995,\n\tsstarf: 8902,\n\tsubdot: 10941,\n\tsubset: 8834,\n\tsubsim: 10951,\n\tsubsub: 10965,\n\tsubsup: 10963,\n\tsucceq: 10928,\n\tsupdot: 10942,\n\tsupset: 8835,\n\tsupsim: 10952,\n\tsupsub: 10964,\n\tsupsup: 10966,\n\tswarhk: 10534,\n\tswnwar: 10538,\n\ttarget: 8982,\n\ttcaron: 357,\n\ttcedil: 355,\n\ttelrec: 8981,\n\tthere4: 8756,\n\tthetav: 977,\n\tthinsp: 8201,\n\tthksim: 8764,\n\ttimesb: 8864,\n\ttimesd: 10800,\n\ttopbot: 9014,\n\ttopcir: 10993,\n\ttprime: 8244,\n\ttridot: 9708,\n\ttstrok: 359,\n\tuacute: 250,\n\tubreve: 365,\n\tudblac: 369,\n\tufisht: 10622,\n\tugrave: 249,\n\tulcorn: 8988,\n\tulcrop: 8975,\n\turcorn: 8989,\n\turcrop: 8974,\n\tutilde: 361,\n\tvangrt: 10652,\n\tvarphi: 966,\n\tvarrho: 1009,\n\tveebar: 8891,\n\tvellip: 8942,\n\tverbar: 124,\n\twedbar: 10847,\n\twedgeq: 8793,\n\tweierp: 8472,\n\twreath: 8768,\n\txoplus: 10753,\n\txotime: 10754,\n\txsqcup: 10758,\n\txuplus: 10756,\n\txwedge: 8896,\n\tyacute: 253,\n\tzacute: 378,\n\tzcaron: 382,\n\tzeetrf: 8488,\n\tAElig: 198,\n\tAcirc: 194,\n\tAlpha: 913,\n\tAmacr: 256,\n\tAogon: 260,\n\tAring: 197,\n\tBreve: 728,\n\tCcirc: 264,\n\tColon: 8759,\n\tCross: 10799,\n\tDashv: 10980,\n\tDelta: 916,\n\tEcirc: 202,\n\tEmacr: 274,\n\tEogon: 280,\n\tEqual: 10869,\n\tGamma: 915,\n\tGcirc: 284,\n\tHacek: 711,\n\tHcirc: 292,\n\tIJlig: 306,\n\tIcirc: 206,\n\tImacr: 298,\n\tIogon: 302,\n\tIukcy: 1030,\n\tJcirc: 308,\n\tJukcy: 1028,\n\tKappa: 922,\n\tOElig: 338,\n\tOcirc: 212,\n\tOmacr: 332,\n\tOmega: 937,\n\tPrime: 8243,\n\tRBarr: 10512,\n\tScirc: 348,\n\tSigma: 931,\n\tTHORN: 222,\n\tTRADE: 8482,\n\tTSHcy: 1035,\n\tTheta: 920,\n\tTilde: 8764,\n\tUbrcy: 1038,\n\tUcirc: 219,\n\tUmacr: 362,\n\tUnion: 8899,\n\tUogon: 370,\n\tUpTee: 8869,\n\tUring: 366,\n\tVDash: 8875,\n\tVdash: 8873,\n\tWcirc: 372,\n\tWedge: 8896,\n\tYcirc: 374,\n\tacirc: 226,\n\tacute: 180,\n\taelig: 230,\n\taleph: 8501,\n\talpha: 945,\n\tamacr: 257,\n\tamalg: 10815,\n\tangle: 8736,\n\tangrt: 8735,\n\tangst: 8491,\n\taogon: 261,\n\taring: 229,\n\tasymp: 8776,\n\tawint: 10769,\n\tbcong: 8780,\n\tbdquo: 8222,\n\tbepsi: 1014,\n\tblank: 9251,\n\tblk12: 9618,\n\tblk14: 9617,\n\tblk34: 9619,\n\tblock: 9608,\n\tboxDL: 9559,\n\tboxDR: 9556,\n\tboxDl: 9558,\n\tboxDr: 9555,\n\tboxHD: 9574,\n\tboxHU: 9577,\n\tboxHd: 9572,\n\tboxHu: 9575,\n\tboxUL: 9565,\n\tboxUR: 9562,\n\tboxUl: 9564,\n\tboxUr: 9561,\n\tboxVH: 9580,\n\tboxVL: 9571,\n\tboxVR: 9568,\n\tboxVh: 9579,\n\tboxVl: 9570,\n\tboxVr: 9567,\n\tboxdL: 9557,\n\tboxdR: 9554,\n\tboxdl: 9488,\n\tboxdr: 9484,\n\tboxhD: 9573,\n\tboxhU: 9576,\n\tboxhd: 9516,\n\tboxhu: 9524,\n\tboxuL: 9563,\n\tboxuR: 9560,\n\tboxul: 9496,\n\tboxur: 9492,\n\tboxvH: 9578,\n\tboxvL: 9569,\n\tboxvR: 9566,\n\tboxvh: 9532,\n\tboxvl: 9508,\n\tboxvr: 9500,\n\tbreve: 728,\n\tbsemi: 8271,\n\tbsime: 8909,\n\tbsolb: 10693,\n\tbumpE: 10926,\n\tbumpe: 8783,\n\tcaret: 8257,\n\tcaron: 711,\n\tccaps: 10829,\n\tccirc: 265,\n\tccups: 10828,\n\tcedil: 184,\n\tcheck: 10003,\n\tclubs: 9827,\n\tcolon: 58,\n\tcomma: 44,\n\tcrarr: 8629,\n\tcross: 10007,\n\tcsube: 10961,\n\tcsupe: 10962,\n\tctdot: 8943,\n\tcuepr: 8926,\n\tcuesc: 8927,\n\tcupor: 10821,\n\tcuvee: 8910,\n\tcuwed: 8911,\n\tcwint: 8753,\n\tdashv: 8867,\n\tdblac: 733,\n\tddarr: 8650,\n\tdelta: 948,\n\tdharl: 8643,\n\tdharr: 8642,\n\tdiams: 9830,\n\tdisin: 8946,\n\tdoteq: 8784,\n\tdtdot: 8945,\n\tdtrif: 9662,\n\tduarr: 8693,\n\tduhar: 10607,\n\teDDot: 10871,\n\tecirc: 234,\n\tefDot: 8786,\n\temacr: 275,\n\tempty: 8709,\n\teogon: 281,\n\teplus: 10865,\n\tepsiv: 949,\n\teqsim: 8770,\n\tequiv: 8801,\n\terDot: 8787,\n\terarr: 10609,\n\tesdot: 8784,\n\texist: 8707,\n\tfflig: 64256,\n\tfilig: 64257,\n\tfllig: 64258,\n\tfltns: 9649,\n\tforkv: 10969,\n\tfrasl: 8260,\n\tfrown: 8994,\n\tgamma: 947,\n\tgcirc: 285,\n\tgescc: 10921,\n\tgimel: 8503,\n\tgneqq: 8809,\n\tgnsim: 8935,\n\tgrave: 96,\n\tgsime: 10894,\n\tgsiml: 10896,\n\tgtcir: 10874,\n\tgtdot: 8919,\n\tharrw: 8621,\n\thcirc: 293,\n\thoarr: 8703,\n\ticirc: 238,\n\tiexcl: 161,\n\tiiint: 8749,\n\tiiota: 8489,\n\tijlig: 307,\n\timacr: 299,\n\timage: 8465,\n\timath: 305,\n\timped: 437,\n\tinfin: 8734,\n\tiogon: 303,\n\tiprod: 10812,\n\tisinE: 8953,\n\tisins: 8948,\n\tisinv: 8712,\n\tiukcy: 1110,\n\tjcirc: 309,\n\tjmath: 567,\n\tjukcy: 1108,\n\tkappa: 954,\n\tlAarr: 8666,\n\tlBarr: 10510,\n\tlangd: 10641,\n\tlaquo: 171,\n\tlarrb: 8676,\n\tlbarr: 10508,\n\tlbbrk: 10098,\n\tlbrke: 10635,\n\tlceil: 8968,\n\tldquo: 8220,\n\tlescc: 10920,\n\tlhard: 8637,\n\tlharu: 8636,\n\tlhblk: 9604,\n\tllarr: 8647,\n\tlltri: 9722,\n\tlneqq: 8808,\n\tlnsim: 8934,\n\tloang: 10220,\n\tloarr: 8701,\n\tlobrk: 10214,\n\tlopar: 10629,\n\tlrarr: 8646,\n\tlrhar: 8651,\n\tlrtri: 8895,\n\tlsime: 10893,\n\tlsimg: 10895,\n\tlsquo: 8216,\n\tltcir: 10873,\n\tltdot: 8918,\n\tltrie: 8884,\n\tltrif: 9666,\n\tmDDot: 8762,\n\tmdash: 8212,\n\tmicro: 181,\n\tminus: 8722,\n\tmumap: 8888,\n\tnabla: 8711,\n\tnapos: 329,\n\tnatur: 9838,\n\tncong: 8775,\n\tndash: 8211,\n\tneArr: 8663,\n\tnearr: 8599,\n\tngsim: 8821,\n\tnhArr: 8654,\n\tnharr: 8622,\n\tnhpar: 10994,\n\tnlArr: 8653,\n\tnlarr: 8602,\n\tnless: 8814,\n\tnlsim: 8820,\n\tnltri: 8938,\n\tnotin: 8713,\n\tnotni: 8716,\n\tnprec: 8832,\n\tnrArr: 8655,\n\tnrarr: 8603,\n\tnrtri: 8939,\n\tnsime: 8772,\n\tnsmid: 8740,\n\tnspar: 8742,\n\tnsube: 8840,\n\tnsucc: 8833,\n\tnsupe: 8841,\n\tnumsp: 8199,\n\tnwArr: 8662,\n\tnwarr: 8598,\n\tocirc: 244,\n\todash: 8861,\n\toelig: 339,\n\tofcir: 10687,\n\tohbar: 10677,\n\tolarr: 8634,\n\tolcir: 10686,\n\toline: 8254,\n\tomacr: 333,\n\tomega: 969,\n\toperp: 10681,\n\toplus: 8853,\n\torarr: 8635,\n\torder: 8500,\n\tovbar: 9021,\n\tparsl: 11005,\n\tphone: 9742,\n\tplusb: 8862,\n\tpluse: 10866,\n\tpound: 163,\n\tprcue: 8828,\n\tprime: 8242,\n\tprnap: 10937,\n\tprsim: 8830,\n\tquest: 63,\n\trAarr: 8667,\n\trBarr: 10511,\n\tradic: 8730,\n\trangd: 10642,\n\trange: 10661,\n\traquo: 187,\n\trarrb: 8677,\n\trarrc: 10547,\n\trarrw: 8605,\n\tratio: 8758,\n\trbarr: 10509,\n\trbbrk: 10099,\n\trbrke: 10636,\n\trceil: 8969,\n\trdquo: 8221,\n\treals: 8477,\n\trhard: 8641,\n\trharu: 8640,\n\trlarr: 8644,\n\trlhar: 8652,\n\trnmid: 10990,\n\troang: 10221,\n\troarr: 8702,\n\trobrk: 10215,\n\tropar: 10630,\n\trrarr: 8649,\n\trsquo: 8217,\n\trtrie: 8885,\n\trtrif: 9656,\n\tsbquo: 8218,\n\tsccue: 8829,\n\tscirc: 349,\n\tscnap: 10938,\n\tscsim: 8831,\n\tsdotb: 8865,\n\tsdote: 10854,\n\tseArr: 8664,\n\tsearr: 8600,\n\tsetmn: 8726,\n\tsharp: 9839,\n\tsigma: 963,\n\tsimeq: 8771,\n\tsimgE: 10912,\n\tsimlE: 10911,\n\tsimne: 8774,\n\tslarr: 8592,\n\tsmile: 8995,\n\tsqcap: 8851,\n\tsqcup: 8852,\n\tsqsub: 8847,\n\tsqsup: 8848,\n\tsrarr: 8594,\n\tstarf: 9733,\n\tstrns: 175,\n\tsubnE: 10955,\n\tsubne: 8842,\n\tsupnE: 10956,\n\tsupne: 8843,\n\tswArr: 8665,\n\tswarr: 8601,\n\tszlig: 223,\n\ttheta: 952,\n\tthkap: 8776,\n\tthorn: 254,\n\ttilde: 732,\n\ttimes: 215,\n\ttrade: 8482,\n\ttrisb: 10701,\n\ttshcy: 1115,\n\ttwixt: 8812,\n\tubrcy: 1118,\n\tucirc: 251,\n\tudarr: 8645,\n\tudhar: 10606,\n\tuharl: 8639,\n\tuharr: 8638,\n\tuhblk: 9600,\n\tultri: 9720,\n\tumacr: 363,\n\tuogon: 371,\n\tuplus: 8846,\n\tupsih: 978,\n\turing: 367,\n\turtri: 9721,\n\tutdot: 8944,\n\tutrif: 9652,\n\tuuarr: 8648,\n\tvBarv: 10985,\n\tvDash: 8872,\n\tvarpi: 982,\n\tvdash: 8866,\n\tveeeq: 8794,\n\tvltri: 8882,\n\tvprop: 8733,\n\tvrtri: 8883,\n\twcirc: 373,\n\twedge: 8743,\n\txcirc: 9711,\n\txdtri: 9661,\n\txhArr: 10234,\n\txharr: 10231,\n\txlArr: 10232,\n\txlarr: 10229,\n\txodot: 10752,\n\txrArr: 10233,\n\txrarr: 10230,\n\txutri: 9651,\n\tycirc: 375,\n\tAopf: 120120,\n\tAscr: 119964,\n\tAuml: 196,\n\tBarv: 10983,\n\tBeta: 914,\n\tBopf: 120121,\n\tBscr: 8492,\n\tCHcy: 1063,\n\tCOPY: 169,\n\tCdot: 266,\n\tCopf: 8450,\n\tCscr: 119966,\n\tDJcy: 1026,\n\tDScy: 1029,\n\tDZcy: 1039,\n\tDarr: 8609,\n\tDopf: 120123,\n\tDscr: 119967,\n\tEdot: 278,\n\tEopf: 120124,\n\tEscr: 8496,\n\tEsim: 10867,\n\tEuml: 203,\n\tFopf: 120125,\n\tFscr: 8497,\n\tGJcy: 1027,\n\tGdot: 288,\n\tGopf: 120126,\n\tGscr: 119970,\n\tHopf: 8461,\n\tHscr: 8459,\n\tIEcy: 1045,\n\tIOcy: 1025,\n\tIdot: 304,\n\tIopf: 120128,\n\tIota: 921,\n\tIscr: 8464,\n\tIuml: 207,\n\tJopf: 120129,\n\tJscr: 119973,\n\tKHcy: 1061,\n\tKJcy: 1036,\n\tKopf: 120130,\n\tKscr: 119974,\n\tLJcy: 1033,\n\tLang: 10218,\n\tLarr: 8606,\n\tLopf: 120131,\n\tLscr: 8466,\n\tMopf: 120132,\n\tMscr: 8499,\n\tNJcy: 1034,\n\tNopf: 8469,\n\tNscr: 119977,\n\tOopf: 120134,\n\tOscr: 119978,\n\tOuml: 214,\n\tPopf: 8473,\n\tPscr: 119979,\n\tQUOT: 34,\n\tQopf: 8474,\n\tQscr: 119980,\n\tRang: 10219,\n\tRarr: 8608,\n\tRopf: 8477,\n\tRscr: 8475,\n\tSHcy: 1064,\n\tSopf: 120138,\n\tSqrt: 8730,\n\tSscr: 119982,\n\tStar: 8902,\n\tTScy: 1062,\n\tTopf: 120139,\n\tTscr: 119983,\n\tUarr: 8607,\n\tUopf: 120140,\n\tUpsi: 978,\n\tUscr: 119984,\n\tUuml: 220,\n\tVbar: 10987,\n\tVert: 8214,\n\tVopf: 120141,\n\tVscr: 119985,\n\tWopf: 120142,\n\tWscr: 119986,\n\tXopf: 120143,\n\tXscr: 119987,\n\tYAcy: 1071,\n\tYIcy: 1031,\n\tYUcy: 1070,\n\tYopf: 120144,\n\tYscr: 119988,\n\tYuml: 376,\n\tZHcy: 1046,\n\tZdot: 379,\n\tZeta: 918,\n\tZopf: 8484,\n\tZscr: 119989,\n\tandd: 10844,\n\tandv: 10842,\n\tange: 10660,\n\taopf: 120146,\n\tapid: 8779,\n\tapos: 39,\n\tascr: 119990,\n\tauml: 228,\n\tbNot: 10989,\n\tbbrk: 9141,\n\tbeta: 946,\n\tbeth: 8502,\n\tbnot: 8976,\n\tbopf: 120147,\n\tboxH: 9552,\n\tboxV: 9553,\n\tboxh: 9472,\n\tboxv: 9474,\n\tbscr: 119991,\n\tbsim: 8765,\n\tbsol: 92,\n\tbull: 8226,\n\tbump: 8782,\n\tcdot: 267,\n\tcent: 162,\n\tchcy: 1095,\n\tcirE: 10691,\n\tcirc: 710,\n\tcire: 8791,\n\tcomp: 8705,\n\tcong: 8773,\n\tcopf: 120148,\n\tcopy: 169,\n\tcscr: 119992,\n\tcsub: 10959,\n\tcsup: 10960,\n\tdArr: 8659,\n\tdHar: 10597,\n\tdarr: 8595,\n\tdash: 8208,\n\tdiam: 8900,\n\tdjcy: 1106,\n\tdopf: 120149,\n\tdscr: 119993,\n\tdscy: 1109,\n\tdsol: 10742,\n\tdtri: 9663,\n\tdzcy: 1119,\n\teDot: 8785,\n\tecir: 8790,\n\tedot: 279,\n\temsp: 8195,\n\tensp: 8194,\n\teopf: 120150,\n\tepar: 8917,\n\tepsi: 1013,\n\tescr: 8495,\n\tesim: 8770,\n\teuml: 235,\n\teuro: 8364,\n\texcl: 33,\n\tflat: 9837,\n\tfnof: 402,\n\tfopf: 120151,\n\tfork: 8916,\n\tfscr: 119995,\n\tgdot: 289,\n\tgeqq: 8807,\n\tgjcy: 1107,\n\tgnap: 10890,\n\tgneq: 10888,\n\tgopf: 120152,\n\tgscr: 8458,\n\tgsim: 8819,\n\tgtcc: 10919,\n\thArr: 8660,\n\thalf: 189,\n\tharr: 8596,\n\thbar: 8463,\n\thopf: 120153,\n\thscr: 119997,\n\tiecy: 1077,\n\timof: 8887,\n\tiocy: 1105,\n\tiopf: 120154,\n\tiota: 953,\n\tiscr: 119998,\n\tisin: 8712,\n\tiuml: 239,\n\tjopf: 120155,\n\tjscr: 119999,\n\tkhcy: 1093,\n\tkjcy: 1116,\n\tkopf: 120156,\n\tkscr: 120000,\n\tlArr: 8656,\n\tlHar: 10594,\n\tlang: 10216,\n\tlarr: 8592,\n\tlate: 10925,\n\tlcub: 123,\n\tldca: 10550,\n\tldsh: 8626,\n\tleqq: 8806,\n\tljcy: 1113,\n\tlnap: 10889,\n\tlneq: 10887,\n\tlopf: 120157,\n\tlozf: 10731,\n\tlpar: 40,\n\tlscr: 120001,\n\tlsim: 8818,\n\tlsqb: 91,\n\tltcc: 10918,\n\tltri: 9667,\n\tmacr: 175,\n\tmale: 9794,\n\tmalt: 10016,\n\tmlcp: 10971,\n\tmldr: 8230,\n\tmopf: 120158,\n\tmscr: 120002,\n\tnbsp: 160,\n\tncap: 10819,\n\tncup: 10818,\n\tngeq: 8817,\n\tngtr: 8815,\n\tnisd: 8954,\n\tnjcy: 1114,\n\tnldr: 8229,\n\tnleq: 8816,\n\tnmid: 8740,\n\tnopf: 120159,\n\tnpar: 8742,\n\tnscr: 120003,\n\tnsim: 8769,\n\tnsub: 8836,\n\tnsup: 8837,\n\tntgl: 8825,\n\tntlg: 8824,\n\toast: 8859,\n\tocir: 8858,\n\todiv: 10808,\n\todot: 8857,\n\togon: 731,\n\toint: 8750,\n\tomid: 10678,\n\toopf: 120160,\n\topar: 10679,\n\tordf: 170,\n\tordm: 186,\n\toror: 10838,\n\toscr: 8500,\n\tosol: 8856,\n\touml: 246,\n\tpara: 182,\n\tpart: 8706,\n\tperp: 8869,\n\tphiv: 966,\n\tplus: 43,\n\tpopf: 120161,\n\tprap: 10935,\n\tprec: 8826,\n\tprnE: 10933,\n\tprod: 8719,\n\tprop: 8733,\n\tpscr: 120005,\n\tqint: 10764,\n\tqopf: 120162,\n\tqscr: 120006,\n\tquot: 34,\n\trArr: 8658,\n\trHar: 10596,\n\trace: 10714,\n\trang: 10217,\n\trarr: 8594,\n\trcub: 125,\n\trdca: 10551,\n\trdsh: 8627,\n\treal: 8476,\n\trect: 9645,\n\trhov: 1009,\n\tring: 730,\n\tropf: 120163,\n\trpar: 41,\n\trscr: 120007,\n\trsqb: 93,\n\trtri: 9657,\n\tscap: 10936,\n\tscnE: 10934,\n\tsdot: 8901,\n\tsect: 167,\n\tsemi: 59,\n\tsext: 10038,\n\tshcy: 1096,\n\tsime: 8771,\n\tsimg: 10910,\n\tsiml: 10909,\n\tsmid: 8739,\n\tsmte: 10924,\n\tsolb: 10692,\n\tsopf: 120164,\n\tspar: 8741,\n\tsquf: 9642,\n\tsscr: 120008,\n\tstar: 9734,\n\tsubE: 10949,\n\tsube: 8838,\n\tsucc: 8827,\n\tsung: 9834,\n\tsup1: 185,\n\tsup2: 178,\n\tsup3: 179,\n\tsupE: 10950,\n\tsupe: 8839,\n\ttbrk: 9140,\n\ttdot: 8411,\n\ttint: 8749,\n\ttoea: 10536,\n\ttopf: 120165,\n\ttosa: 10537,\n\ttrie: 8796,\n\ttscr: 120009,\n\ttscy: 1094,\n\tuArr: 8657,\n\tuHar: 10595,\n\tuarr: 8593,\n\tuopf: 120166,\n\tupsi: 965,\n\tuscr: 120010,\n\tutri: 9653,\n\tuuml: 252,\n\tvArr: 8661,\n\tvBar: 10984,\n\tvarr: 8597,\n\tvert: 124,\n\tvopf: 120167,\n\tvscr: 120011,\n\twopf: 120168,\n\twscr: 120012,\n\txcap: 8898,\n\txcup: 8899,\n\txmap: 10236,\n\txnis: 8955,\n\txopf: 120169,\n\txscr: 120013,\n\txvee: 8897,\n\tyacy: 1103,\n\tyicy: 1111,\n\tyopf: 120170,\n\tyscr: 120014,\n\tyucy: 1102,\n\tyuml: 255,\n\tzdot: 380,\n\tzeta: 950,\n\tzhcy: 1078,\n\tzopf: 120171,\n\tzscr: 120015,\n\tzwnj: 8204,\n\tAMP: 38,\n\tAcy: 1040,\n\tAfr: 120068,\n\tAnd: 10835,\n\tBcy: 1041,\n\tBfr: 120069,\n\tCap: 8914,\n\tCfr: 8493,\n\tChi: 935,\n\tCup: 8915,\n\tDcy: 1044,\n\tDel: 8711,\n\tDfr: 120071,\n\tDot: 168,\n\tENG: 330,\n\tETH: 208,\n\tEcy: 1069,\n\tEfr: 120072,\n\tEta: 919,\n\tFcy: 1060,\n\tFfr: 120073,\n\tGcy: 1043,\n\tGfr: 120074,\n\tHat: 94,\n\tHfr: 8460,\n\tIcy: 1048,\n\tIfr: 8465,\n\tInt: 8748,\n\tJcy: 1049,\n\tJfr: 120077,\n\tKcy: 1050,\n\tKfr: 120078,\n\tLcy: 1051,\n\tLfr: 120079,\n\tLsh: 8624,\n\tMap: 10501,\n\tMcy: 1052,\n\tMfr: 120080,\n\tNcy: 1053,\n\tNfr: 120081,\n\tNot: 10988,\n\tOcy: 1054,\n\tOfr: 120082,\n\tPcy: 1055,\n\tPfr: 120083,\n\tPhi: 934,\n\tPsi: 936,\n\tQfr: 120084,\n\tREG: 174,\n\tRcy: 1056,\n\tRfr: 8476,\n\tRho: 929,\n\tRsh: 8625,\n\tScy: 1057,\n\tSfr: 120086,\n\tSub: 8912,\n\tSum: 8721,\n\tSup: 8913,\n\tTab: 9,\n\tTau: 932,\n\tTcy: 1058,\n\tTfr: 120087,\n\tUcy: 1059,\n\tUfr: 120088,\n\tVcy: 1042,\n\tVee: 8897,\n\tVfr: 120089,\n\tWfr: 120090,\n\tXfr: 120091,\n\tYcy: 1067,\n\tYfr: 120092,\n\tZcy: 1047,\n\tZfr: 8488,\n\tacd: 8767,\n\tacy: 1072,\n\tafr: 120094,\n\tamp: 38,\n\tand: 8743,\n\tang: 8736,\n\tapE: 10864,\n\tape: 8778,\n\tast: 42,\n\tbcy: 1073,\n\tbfr: 120095,\n\tbot: 8869,\n\tcap: 8745,\n\tcfr: 120096,\n\tchi: 967,\n\tcir: 9675,\n\tcup: 8746,\n\tdcy: 1076,\n\tdeg: 176,\n\tdfr: 120097,\n\tdie: 168,\n\tdiv: 247,\n\tdot: 729,\n\tecy: 1101,\n\tefr: 120098,\n\tegs: 10902,\n\tell: 8467,\n\tels: 10901,\n\teng: 331,\n\teta: 951,\n\teth: 240,\n\tfcy: 1092,\n\tffr: 120099,\n\tgEl: 10892,\n\tgap: 10886,\n\tgcy: 1075,\n\tgel: 8923,\n\tgeq: 8805,\n\tges: 10878,\n\tgfr: 120100,\n\tggg: 8921,\n\tglE: 10898,\n\tgla: 10917,\n\tglj: 10916,\n\tgnE: 8809,\n\tgne: 10888,\n\thfr: 120101,\n\ticy: 1080,\n\tiff: 8660,\n\tifr: 120102,\n\tint: 8747,\n\tjcy: 1081,\n\tjfr: 120103,\n\tkcy: 1082,\n\tkfr: 120104,\n\tlEg: 10891,\n\tlap: 10885,\n\tlat: 10923,\n\tlcy: 1083,\n\tleg: 8922,\n\tleq: 8804,\n\tles: 10877,\n\tlfr: 120105,\n\tlgE: 10897,\n\tlnE: 8808,\n\tlne: 10887,\n\tloz: 9674,\n\tlrm: 8206,\n\tlsh: 8624,\n\tmap: 8614,\n\tmcy: 1084,\n\tmfr: 120106,\n\tmho: 8487,\n\tmid: 8739,\n\tnap: 8777,\n\tncy: 1085,\n\tnfr: 120107,\n\tnge: 8817,\n\tngt: 8815,\n\tnis: 8956,\n\tniv: 8715,\n\tnle: 8816,\n\tnlt: 8814,\n\tnot: 172,\n\tnpr: 8832,\n\tnsc: 8833,\n\tnum: 35,\n\tocy: 1086,\n\tofr: 120108,\n\togt: 10689,\n\tohm: 8486,\n\tolt: 10688,\n\tord: 10845,\n\torv: 10843,\n\tpar: 8741,\n\tpcy: 1087,\n\tpfr: 120109,\n\tphi: 966,\n\tpiv: 982,\n\tprE: 10931,\n\tpre: 10927,\n\tpsi: 968,\n\tqfr: 120110,\n\trcy: 1088,\n\treg: 174,\n\trfr: 120111,\n\trho: 961,\n\trlm: 8207,\n\trsh: 8625,\n\tscE: 10932,\n\tsce: 10928,\n\tscy: 1089,\n\tsfr: 120112,\n\tshy: 173,\n\tsim: 8764,\n\tsmt: 10922,\n\tsol: 47,\n\tsqu: 9633,\n\tsub: 8834,\n\tsum: 8721,\n\tsup: 8835,\n\ttau: 964,\n\ttcy: 1090,\n\ttfr: 120113,\n\ttop: 8868,\n\tucy: 1091,\n\tufr: 120114,\n\tuml: 168,\n\tvcy: 1074,\n\tvee: 8744,\n\tvfr: 120115,\n\twfr: 120116,\n\txfr: 120117,\n\tycy: 1099,\n\tyen: 165,\n\tyfr: 120118,\n\tzcy: 1079,\n\tzfr: 120119,\n\tzwj: 8205,\n\tDD: 8517,\n\tGT: 62,\n\tGg: 8921,\n\tGt: 8811,\n\tIm: 8465,\n\tLT: 60,\n\tLl: 8920,\n\tLt: 8810,\n\tMu: 924,\n\tNu: 925,\n\tOr: 10836,\n\tPi: 928,\n\tPr: 10939,\n\tRe: 8476,\n\tSc: 10940,\n\tXi: 926,\n\tac: 8766,\n\taf: 8289,\n\tap: 8776,\n\tdd: 8518,\n\tee: 8519,\n\teg: 10906,\n\tel: 10905,\n\tgE: 8807,\n\tge: 8805,\n\tgg: 8811,\n\tgl: 8823,\n\tgt: 62,\n\tic: 8291,\n\tii: 8520,\n\tin: 8712,\n\tit: 8290,\n\tlE: 8806,\n\tle: 8804,\n\tlg: 8822,\n\tll: 8810,\n\tlt: 60,\n\tmp: 8723,\n\tmu: 956,\n\tne: 8800,\n\tni: 8715,\n\tnu: 957,\n\toS: 9416,\n\tor: 8744,\n\tpi: 960,\n\tpm: 177,\n\tpr: 8826,\n\trx: 8478,\n\tsc: 8827,\n\twp: 8472,\n\twr: 8768,\n\txi: 958\n};\n","import entities from './entities';\n\nconst windows_1252 = [\n\t8364,\n\t129,\n\t8218,\n\t402,\n\t8222,\n\t8230,\n\t8224,\n\t8225,\n\t710,\n\t8240,\n\t352,\n\t8249,\n\t338,\n\t141,\n\t381,\n\t143,\n\t144,\n\t8216,\n\t8217,\n\t8220,\n\t8221,\n\t8226,\n\t8211,\n\t8212,\n\t732,\n\t8482,\n\t353,\n\t8250,\n\t339,\n\t157,\n\t382,\n\t376\n];\n\nconst entity_pattern = new RegExp(\n\t`&(#?(?:x[\\\\w\\\\d]+|\\\\d+|${Object.keys(entities).join('|')}))(?:;|\\\\b)`,\n\t'g'\n);\n\nexport function decode_character_references(html: string) {\n\treturn html.replace(entity_pattern, (match, entity) => {\n\t\tlet code;\n\n\t\t// Handle named entities\n\t\tif (entity[0] !== '#') {\n\t\t\tcode = entities[entity];\n\t\t} else if (entity[1] === 'x') {\n\t\t\tcode = parseInt(entity.substring(2), 16);\n\t\t} else {\n\t\t\tcode = parseInt(entity.substring(1), 10);\n\t\t}\n\n\t\tif (!code) {\n\t\t\treturn match;\n\t\t}\n\n\t\treturn String.fromCodePoint(validate_code(code));\n\t});\n}\n\nconst NUL = 0;\n\n// some code points are verboten. If we were inserting HTML, the browser would replace the illegal\n// code points with alternatives in some cases - since we're bypassing that mechanism, we need\n// to replace them ourselves\n//\n// Source: http://en.wikipedia.org/wiki/Character_encodings_in_HTML#Illegal_characters\nfunction validate_code(code: number) {\n\t// line feed becomes generic whitespace\n\tif (code === 10) {\n\t\treturn 32;\n\t}\n\n\t// ASCII range. (Why someone would use HTML entities for ASCII characters I don't know, but...)\n\tif (code < 128) {\n\t\treturn code;\n\t}\n\n\t// code points 128-159 are dealt with leniently by browsers, but they're incorrect. We need\n\t// to correct the mistake or we'll end up with missing € signs and so on\n\tif (code <= 159) {\n\t\treturn windows_1252[code - 128];\n\t}\n\n\t// basic multilingual plane\n\tif (code < 55296) {\n\t\treturn code;\n\t}\n\n\t// UTF-16 surrogate halves\n\tif (code <= 57343) {\n\t\treturn NUL;\n\t}\n\n\t// rest of the basic multilingual plane\n\tif (code <= 65535) {\n\t\treturn code;\n\t}\n\n\t// supplementary multilingual plane 0x10000 - 0x1ffff\n\tif (code >= 65536 && code <= 131071) {\n\t\treturn code;\n\t}\n\n\t// supplementary ideographic plane 0x20000 - 0x2ffff\n\tif (code >= 131072 && code <= 196607) {\n\t\treturn code;\n\t}\n\n\treturn NUL;\n}\n\n// based on http://developers.whatwg.org/syntax.html#syntax-tag-omission\nconst disallowed_contents = new Map([\n\t['li', new Set(['li'])],\n\t['dt', new Set(['dt', 'dd'])],\n\t['dd', new Set(['dt', 'dd'])],\n\t[\n\t\t'p',\n\t\tnew Set(\n\t\t\t'address article aside blockquote div dl fieldset footer form h1 h2 h3 h4 h5 h6 header hgroup hr main menu nav ol p pre section table ul'.split(\n\t\t\t\t' '\n\t\t\t)\n\t\t)\n\t],\n\t['rt', new Set(['rt', 'rp'])],\n\t['rp', new Set(['rt', 'rp'])],\n\t['optgroup', new Set(['optgroup'])],\n\t['option', new Set(['option', 'optgroup'])],\n\t['thead', new Set(['tbody', 'tfoot'])],\n\t['tbody', new Set(['tbody', 'tfoot'])],\n\t['tfoot', new Set(['tbody'])],\n\t['tr', new Set(['tr', 'tbody'])],\n\t['td', new Set(['td', 'th', 'tr'])],\n\t['th', new Set(['td', 'th', 'tr'])]\n]);\n\n// can this be a child of the parent element, or does it implicitly\n// close it, like `
  • one
  • two`?\nexport function closing_tag_omitted(current: string, next?: string) {\n\tif (disallowed_contents.has(current)) {\n\t\tif (!next || disallowed_contents.get(current).has(next)) {\n\t\t\treturn true;\n\t\t}\n\t}\n\n\treturn false;\n}\n","import { Directive, DirectiveType, TemplateNode, Text } from '../../interfaces';\nimport { extract_svelte_ignore } from '../../utils/extract_svelte_ignore';\nimport fuzzymatch from '../../utils/fuzzymatch';\nimport { is_void } from '../../../shared/utils/names';\nimport parser_errors from '../errors';\nimport { Parser } from '../index';\nimport read_expression from '../read/expression';\nimport read_script from '../read/script';\nimport read_style from '../read/style';\nimport { closing_tag_omitted, decode_character_references } from '../utils/html';\n\n// eslint-disable-next-line no-useless-escape\nconst valid_tag_name = /^\\!?[a-zA-Z]{1,}:?[a-zA-Z0-9\\-]*/;\n\nconst meta_tags = new Map([\n\t['svelte:head', 'Head'],\n\t['svelte:options', 'Options'],\n\t['svelte:window', 'Window'],\n\t['svelte:body', 'Body']\n]);\n\nconst valid_meta_tags = Array.from(meta_tags.keys()).concat('svelte:self', 'svelte:component', 'svelte:fragment', 'svelte:element');\n\nconst specials = new Map([\n\t[\n\t\t'script',\n\t\t{\n\t\t\tread: read_script,\n\t\t\tproperty: 'js'\n\t\t}\n\t],\n\t[\n\t\t'style',\n\t\t{\n\t\t\tread: read_style,\n\t\t\tproperty: 'css'\n\t\t}\n\t]\n]);\n\nconst SELF = /^svelte:self(?=[\\s/>])/;\nconst COMPONENT = /^svelte:component(?=[\\s/>])/;\nconst SLOT = /^svelte:fragment(?=[\\s/>])/;\nconst ELEMENT = /^svelte:element(?=[\\s/>])/;\n\nfunction parent_is_head(stack) {\n\tlet i = stack.length;\n\twhile (i--) {\n\t\tconst { type } = stack[i];\n\t\tif (type === 'Head') return true;\n\t\tif (type === 'Element' || type === 'InlineComponent') return false;\n\t}\n\treturn false;\n}\n\nexport default function tag(parser: Parser) {\n\tconst start = parser.index++;\n\n\tlet parent = parser.current();\n\n\tif (parser.eat('!--')) {\n\t\tconst data = parser.read_until(/-->/);\n\t\tparser.eat('-->', true, parser_errors.unclosed_comment);\n\n\t\tparser.current().children.push({\n\t\t\tstart,\n\t\t\tend: parser.index,\n\t\t\ttype: 'Comment',\n\t\t\tdata,\n\t\t\tignores: extract_svelte_ignore(data)\n\t\t});\n\n\t\treturn;\n\t}\n\n\tconst is_closing_tag = parser.eat('/');\n\n\tconst name = read_tag_name(parser);\n\n\tif (meta_tags.has(name)) {\n\t\tconst slug = meta_tags.get(name).toLowerCase();\n\t\tif (is_closing_tag) {\n\t\t\tif (\n\t\t\t\t(name === 'svelte:window' || name === 'svelte:body') &&\n\t\t\t\tparser.current().children.length\n\t\t\t) {\n\t\t\t\tparser.error(\n\t\t\t\t\tparser_errors.invalid_element_content(slug, name),\n\t\t\t\t\tparser.current().children[0].start\n\t\t\t\t);\n\t\t\t}\n\t\t} else {\n\t\t\tif (name in parser.meta_tags) {\n\t\t\t\tparser.error(parser_errors.duplicate_element(slug, name), start);\n\t\t\t}\n\n\t\t\tif (parser.stack.length > 1) {\n\t\t\t\tparser.error(parser_errors.invalid_element_placement(slug, name), start);\n\t\t\t}\n\n\t\t\tparser.meta_tags[name] = true;\n\t\t}\n\t}\n\n\tconst type = meta_tags.has(name)\n\t\t? meta_tags.get(name)\n\t\t: (/[A-Z]/.test(name[0]) || name === 'svelte:self' || name === 'svelte:component') ? 'InlineComponent'\n\t\t\t: name === 'svelte:fragment' ? 'SlotTemplate'\n\t\t\t\t: name === 'title' && parent_is_head(parser.stack) ? 'Title'\n\t\t\t\t\t: name === 'slot' && !parser.customElement ? 'Slot' : 'Element';\n\n\tconst element: TemplateNode = {\n\t\tstart,\n\t\tend: null, // filled in later\n\t\ttype,\n\t\tname,\n\t\tattributes: [],\n\t\tchildren: []\n\t};\n\n\tparser.allow_whitespace();\n\n\tif (is_closing_tag) {\n\t\tif (is_void(name)) {\n\t\t\tparser.error(parser_errors.invalid_void_content(name), start);\n\t\t}\n\n\t\tparser.eat('>', true);\n\n\t\t// close any elements that don't have their own closing tags, e.g.

    \n\t\twhile (parent.name !== name) {\n\t\t\tif (parent.type !== 'Element') {\n\t\t\t\tconst error = parser.last_auto_closed_tag && parser.last_auto_closed_tag.tag === name\n\t\t\t\t\t? parser_errors.invalid_closing_tag_autoclosed(name, parser.last_auto_closed_tag.reason)\n\t\t\t\t\t: parser_errors.invalid_closing_tag_unopened(name);\n\t\t\t\tparser.error(error, start);\n\t\t\t}\n\n\t\t\tparent.end = start;\n\t\t\tparser.stack.pop();\n\n\t\t\tparent = parser.current();\n\t\t}\n\n\t\tparent.end = parser.index;\n\t\tparser.stack.pop();\n\n\t\tif (parser.last_auto_closed_tag && parser.stack.length < parser.last_auto_closed_tag.depth) {\n\t\t\tparser.last_auto_closed_tag = null;\n\t\t}\n\n\t\treturn;\n\t} else if (closing_tag_omitted(parent.name, name)) {\n\t\tparent.end = start;\n\t\tparser.stack.pop();\n\t\tparser.last_auto_closed_tag = {\n\t\t\ttag: parent.name,\n\t\t\treason: name,\n\t\t\tdepth: parser.stack.length\n\t\t};\n\t}\n\n\tconst unique_names: Set = new Set();\n\n\tlet attribute;\n\twhile ((attribute = read_attribute(parser, unique_names))) {\n\t\telement.attributes.push(attribute);\n\t\tparser.allow_whitespace();\n\t}\n\n\tif (name === 'svelte:component') {\n\t\tconst index = element.attributes.findIndex(attr => attr.type === 'Attribute' && attr.name === 'this');\n\t\tif (index === -1) {\n\t\t\tparser.error(parser_errors.missing_component_definition, start);\n\t\t}\n\n\t\tconst definition = element.attributes.splice(index, 1)[0];\n\t\tif (definition.value === true || definition.value.length !== 1 || definition.value[0].type === 'Text') {\n\t\t\tparser.error(parser_errors.invalid_component_definition, definition.start);\n\t\t}\n\n\t\telement.expression = definition.value[0].expression;\n\t}\n\n\tif (name === 'svelte:element') {\n\t\tconst index = element.attributes.findIndex(attr => attr.type === 'Attribute' && attr.name === 'this');\n\t\tif (index === -1) {\n\t\t\tparser.error(parser_errors.missing_element_definition, start);\n\t\t}\n\n\t\tconst definition = element.attributes.splice(index, 1)[0];\n\t\tif (definition.value === true) {\n\t\t\tparser.error(parser_errors.invalid_element_definition, definition.start);\n\t\t}\n\t\telement.tag = definition.value[0].data || definition.value[0].expression;\n\t}\n\n\t// special cases – top-level