Lobashov_Ivan_PIBD-21_IP/Lab2/node_modules/.esquery-ZUekD0lp/dist/esquery.min.js.map
2024-01-10 22:39:31 +04:00

1 line
170 KiB
Plaintext

{"version":3,"file":"esquery.min.js","sources":["../node_modules/estraverse/estraverse.js","../parser.js","../esquery.js"],"sourcesContent":["/*\n Copyright (C) 2012-2013 Yusuke Suzuki <utatane.tea@gmail.com>\n Copyright (C) 2012 Ariya Hidayat <ariya.hidayat@gmail.com>\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n * Redistributions of source code must retain the above copyright\n notice, this list of conditions and the following disclaimer.\n * Redistributions in binary form must reproduce the above copyright\n notice, this list of conditions and the following disclaimer in the\n documentation and/or other materials provided with the distribution.\n\n THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY\n DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF\n THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n*/\n/*jslint vars:false, bitwise:true*/\n/*jshint indent:4*/\n/*global exports:true*/\n(function clone(exports) {\n 'use strict';\n\n var Syntax,\n VisitorOption,\n VisitorKeys,\n BREAK,\n SKIP,\n REMOVE;\n\n function deepCopy(obj) {\n var ret = {}, key, val;\n for (key in obj) {\n if (obj.hasOwnProperty(key)) {\n val = obj[key];\n if (typeof val === 'object' && val !== null) {\n ret[key] = deepCopy(val);\n } else {\n ret[key] = val;\n }\n }\n }\n return ret;\n }\n\n // based on LLVM libc++ upper_bound / lower_bound\n // MIT License\n\n function upperBound(array, func) {\n var diff, len, i, current;\n\n len = array.length;\n i = 0;\n\n while (len) {\n diff = len >>> 1;\n current = i + diff;\n if (func(array[current])) {\n len = diff;\n } else {\n i = current + 1;\n len -= diff + 1;\n }\n }\n return i;\n }\n\n Syntax = {\n AssignmentExpression: 'AssignmentExpression',\n AssignmentPattern: 'AssignmentPattern',\n ArrayExpression: 'ArrayExpression',\n ArrayPattern: 'ArrayPattern',\n ArrowFunctionExpression: 'ArrowFunctionExpression',\n AwaitExpression: 'AwaitExpression', // CAUTION: It's deferred to ES7.\n BlockStatement: 'BlockStatement',\n BinaryExpression: 'BinaryExpression',\n BreakStatement: 'BreakStatement',\n CallExpression: 'CallExpression',\n CatchClause: 'CatchClause',\n ChainExpression: 'ChainExpression',\n ClassBody: 'ClassBody',\n ClassDeclaration: 'ClassDeclaration',\n ClassExpression: 'ClassExpression',\n ComprehensionBlock: 'ComprehensionBlock', // CAUTION: It's deferred to ES7.\n ComprehensionExpression: 'ComprehensionExpression', // CAUTION: It's deferred to ES7.\n ConditionalExpression: 'ConditionalExpression',\n ContinueStatement: 'ContinueStatement',\n DebuggerStatement: 'DebuggerStatement',\n DirectiveStatement: 'DirectiveStatement',\n DoWhileStatement: 'DoWhileStatement',\n EmptyStatement: 'EmptyStatement',\n ExportAllDeclaration: 'ExportAllDeclaration',\n ExportDefaultDeclaration: 'ExportDefaultDeclaration',\n ExportNamedDeclaration: 'ExportNamedDeclaration',\n ExportSpecifier: 'ExportSpecifier',\n ExpressionStatement: 'ExpressionStatement',\n ForStatement: 'ForStatement',\n ForInStatement: 'ForInStatement',\n ForOfStatement: 'ForOfStatement',\n FunctionDeclaration: 'FunctionDeclaration',\n FunctionExpression: 'FunctionExpression',\n GeneratorExpression: 'GeneratorExpression', // CAUTION: It's deferred to ES7.\n Identifier: 'Identifier',\n IfStatement: 'IfStatement',\n ImportExpression: 'ImportExpression',\n ImportDeclaration: 'ImportDeclaration',\n ImportDefaultSpecifier: 'ImportDefaultSpecifier',\n ImportNamespaceSpecifier: 'ImportNamespaceSpecifier',\n ImportSpecifier: 'ImportSpecifier',\n Literal: 'Literal',\n LabeledStatement: 'LabeledStatement',\n LogicalExpression: 'LogicalExpression',\n MemberExpression: 'MemberExpression',\n MetaProperty: 'MetaProperty',\n MethodDefinition: 'MethodDefinition',\n ModuleSpecifier: 'ModuleSpecifier',\n NewExpression: 'NewExpression',\n ObjectExpression: 'ObjectExpression',\n ObjectPattern: 'ObjectPattern',\n PrivateIdentifier: 'PrivateIdentifier',\n Program: 'Program',\n Property: 'Property',\n PropertyDefinition: 'PropertyDefinition',\n RestElement: 'RestElement',\n ReturnStatement: 'ReturnStatement',\n SequenceExpression: 'SequenceExpression',\n SpreadElement: 'SpreadElement',\n Super: 'Super',\n SwitchStatement: 'SwitchStatement',\n SwitchCase: 'SwitchCase',\n TaggedTemplateExpression: 'TaggedTemplateExpression',\n TemplateElement: 'TemplateElement',\n TemplateLiteral: 'TemplateLiteral',\n ThisExpression: 'ThisExpression',\n ThrowStatement: 'ThrowStatement',\n TryStatement: 'TryStatement',\n UnaryExpression: 'UnaryExpression',\n UpdateExpression: 'UpdateExpression',\n VariableDeclaration: 'VariableDeclaration',\n VariableDeclarator: 'VariableDeclarator',\n WhileStatement: 'WhileStatement',\n WithStatement: 'WithStatement',\n YieldExpression: 'YieldExpression'\n };\n\n VisitorKeys = {\n AssignmentExpression: ['left', 'right'],\n AssignmentPattern: ['left', 'right'],\n ArrayExpression: ['elements'],\n ArrayPattern: ['elements'],\n ArrowFunctionExpression: ['params', 'body'],\n AwaitExpression: ['argument'], // CAUTION: It's deferred to ES7.\n BlockStatement: ['body'],\n BinaryExpression: ['left', 'right'],\n BreakStatement: ['label'],\n CallExpression: ['callee', 'arguments'],\n CatchClause: ['param', 'body'],\n ChainExpression: ['expression'],\n ClassBody: ['body'],\n ClassDeclaration: ['id', 'superClass', 'body'],\n ClassExpression: ['id', 'superClass', 'body'],\n ComprehensionBlock: ['left', 'right'], // CAUTION: It's deferred to ES7.\n ComprehensionExpression: ['blocks', 'filter', 'body'], // CAUTION: It's deferred to ES7.\n ConditionalExpression: ['test', 'consequent', 'alternate'],\n ContinueStatement: ['label'],\n DebuggerStatement: [],\n DirectiveStatement: [],\n DoWhileStatement: ['body', 'test'],\n EmptyStatement: [],\n ExportAllDeclaration: ['source'],\n ExportDefaultDeclaration: ['declaration'],\n ExportNamedDeclaration: ['declaration', 'specifiers', 'source'],\n ExportSpecifier: ['exported', 'local'],\n ExpressionStatement: ['expression'],\n ForStatement: ['init', 'test', 'update', 'body'],\n ForInStatement: ['left', 'right', 'body'],\n ForOfStatement: ['left', 'right', 'body'],\n FunctionDeclaration: ['id', 'params', 'body'],\n FunctionExpression: ['id', 'params', 'body'],\n GeneratorExpression: ['blocks', 'filter', 'body'], // CAUTION: It's deferred to ES7.\n Identifier: [],\n IfStatement: ['test', 'consequent', 'alternate'],\n ImportExpression: ['source'],\n ImportDeclaration: ['specifiers', 'source'],\n ImportDefaultSpecifier: ['local'],\n ImportNamespaceSpecifier: ['local'],\n ImportSpecifier: ['imported', 'local'],\n Literal: [],\n LabeledStatement: ['label', 'body'],\n LogicalExpression: ['left', 'right'],\n MemberExpression: ['object', 'property'],\n MetaProperty: ['meta', 'property'],\n MethodDefinition: ['key', 'value'],\n ModuleSpecifier: [],\n NewExpression: ['callee', 'arguments'],\n ObjectExpression: ['properties'],\n ObjectPattern: ['properties'],\n PrivateIdentifier: [],\n Program: ['body'],\n Property: ['key', 'value'],\n PropertyDefinition: ['key', 'value'],\n RestElement: [ 'argument' ],\n ReturnStatement: ['argument'],\n SequenceExpression: ['expressions'],\n SpreadElement: ['argument'],\n Super: [],\n SwitchStatement: ['discriminant', 'cases'],\n SwitchCase: ['test', 'consequent'],\n TaggedTemplateExpression: ['tag', 'quasi'],\n TemplateElement: [],\n TemplateLiteral: ['quasis', 'expressions'],\n ThisExpression: [],\n ThrowStatement: ['argument'],\n TryStatement: ['block', 'handler', 'finalizer'],\n UnaryExpression: ['argument'],\n UpdateExpression: ['argument'],\n VariableDeclaration: ['declarations'],\n VariableDeclarator: ['id', 'init'],\n WhileStatement: ['test', 'body'],\n WithStatement: ['object', 'body'],\n YieldExpression: ['argument']\n };\n\n // unique id\n BREAK = {};\n SKIP = {};\n REMOVE = {};\n\n VisitorOption = {\n Break: BREAK,\n Skip: SKIP,\n Remove: REMOVE\n };\n\n function Reference(parent, key) {\n this.parent = parent;\n this.key = key;\n }\n\n Reference.prototype.replace = function replace(node) {\n this.parent[this.key] = node;\n };\n\n Reference.prototype.remove = function remove() {\n if (Array.isArray(this.parent)) {\n this.parent.splice(this.key, 1);\n return true;\n } else {\n this.replace(null);\n return false;\n }\n };\n\n function Element(node, path, wrap, ref) {\n this.node = node;\n this.path = path;\n this.wrap = wrap;\n this.ref = ref;\n }\n\n function Controller() { }\n\n // API:\n // return property path array from root to current node\n Controller.prototype.path = function path() {\n var i, iz, j, jz, result, element;\n\n function addToPath(result, path) {\n if (Array.isArray(path)) {\n for (j = 0, jz = path.length; j < jz; ++j) {\n result.push(path[j]);\n }\n } else {\n result.push(path);\n }\n }\n\n // root node\n if (!this.__current.path) {\n return null;\n }\n\n // first node is sentinel, second node is root element\n result = [];\n for (i = 2, iz = this.__leavelist.length; i < iz; ++i) {\n element = this.__leavelist[i];\n addToPath(result, element.path);\n }\n addToPath(result, this.__current.path);\n return result;\n };\n\n // API:\n // return type of current node\n Controller.prototype.type = function () {\n var node = this.current();\n return node.type || this.__current.wrap;\n };\n\n // API:\n // return array of parent elements\n Controller.prototype.parents = function parents() {\n var i, iz, result;\n\n // first node is sentinel\n result = [];\n for (i = 1, iz = this.__leavelist.length; i < iz; ++i) {\n result.push(this.__leavelist[i].node);\n }\n\n return result;\n };\n\n // API:\n // return current node\n Controller.prototype.current = function current() {\n return this.__current.node;\n };\n\n Controller.prototype.__execute = function __execute(callback, element) {\n var previous, result;\n\n result = undefined;\n\n previous = this.__current;\n this.__current = element;\n this.__state = null;\n if (callback) {\n result = callback.call(this, element.node, this.__leavelist[this.__leavelist.length - 1].node);\n }\n this.__current = previous;\n\n return result;\n };\n\n // API:\n // notify control skip / break\n Controller.prototype.notify = function notify(flag) {\n this.__state = flag;\n };\n\n // API:\n // skip child nodes of current node\n Controller.prototype.skip = function () {\n this.notify(SKIP);\n };\n\n // API:\n // break traversals\n Controller.prototype['break'] = function () {\n this.notify(BREAK);\n };\n\n // API:\n // remove node\n Controller.prototype.remove = function () {\n this.notify(REMOVE);\n };\n\n Controller.prototype.__initialize = function(root, visitor) {\n this.visitor = visitor;\n this.root = root;\n this.__worklist = [];\n this.__leavelist = [];\n this.__current = null;\n this.__state = null;\n this.__fallback = null;\n if (visitor.fallback === 'iteration') {\n this.__fallback = Object.keys;\n } else if (typeof visitor.fallback === 'function') {\n this.__fallback = visitor.fallback;\n }\n\n this.__keys = VisitorKeys;\n if (visitor.keys) {\n this.__keys = Object.assign(Object.create(this.__keys), visitor.keys);\n }\n };\n\n function isNode(node) {\n if (node == null) {\n return false;\n }\n return typeof node === 'object' && typeof node.type === 'string';\n }\n\n function isProperty(nodeType, key) {\n return (nodeType === Syntax.ObjectExpression || nodeType === Syntax.ObjectPattern) && 'properties' === key;\n }\n \n function candidateExistsInLeaveList(leavelist, candidate) {\n for (var i = leavelist.length - 1; i >= 0; --i) {\n if (leavelist[i].node === candidate) {\n return true;\n }\n }\n return false;\n }\n\n Controller.prototype.traverse = function traverse(root, visitor) {\n var worklist,\n leavelist,\n element,\n node,\n nodeType,\n ret,\n key,\n current,\n current2,\n candidates,\n candidate,\n sentinel;\n\n this.__initialize(root, visitor);\n\n sentinel = {};\n\n // reference\n worklist = this.__worklist;\n leavelist = this.__leavelist;\n\n // initialize\n worklist.push(new Element(root, null, null, null));\n leavelist.push(new Element(null, null, null, null));\n\n while (worklist.length) {\n element = worklist.pop();\n\n if (element === sentinel) {\n element = leavelist.pop();\n\n ret = this.__execute(visitor.leave, element);\n\n if (this.__state === BREAK || ret === BREAK) {\n return;\n }\n continue;\n }\n\n if (element.node) {\n\n ret = this.__execute(visitor.enter, element);\n\n if (this.__state === BREAK || ret === BREAK) {\n return;\n }\n\n worklist.push(sentinel);\n leavelist.push(element);\n\n if (this.__state === SKIP || ret === SKIP) {\n continue;\n }\n\n node = element.node;\n nodeType = node.type || element.wrap;\n candidates = this.__keys[nodeType];\n if (!candidates) {\n if (this.__fallback) {\n candidates = this.__fallback(node);\n } else {\n throw new Error('Unknown node type ' + nodeType + '.');\n }\n }\n\n current = candidates.length;\n while ((current -= 1) >= 0) {\n key = candidates[current];\n candidate = node[key];\n if (!candidate) {\n continue;\n }\n\n if (Array.isArray(candidate)) {\n current2 = candidate.length;\n while ((current2 -= 1) >= 0) {\n if (!candidate[current2]) {\n continue;\n }\n\n if (candidateExistsInLeaveList(leavelist, candidate[current2])) {\n continue;\n }\n\n if (isProperty(nodeType, candidates[current])) {\n element = new Element(candidate[current2], [key, current2], 'Property', null);\n } else if (isNode(candidate[current2])) {\n element = new Element(candidate[current2], [key, current2], null, null);\n } else {\n continue;\n }\n worklist.push(element);\n }\n } else if (isNode(candidate)) {\n if (candidateExistsInLeaveList(leavelist, candidate)) {\n continue;\n }\n\n worklist.push(new Element(candidate, key, null, null));\n }\n }\n }\n }\n };\n\n Controller.prototype.replace = function replace(root, visitor) {\n var worklist,\n leavelist,\n node,\n nodeType,\n target,\n element,\n current,\n current2,\n candidates,\n candidate,\n sentinel,\n outer,\n key;\n\n function removeElem(element) {\n var i,\n key,\n nextElem,\n parent;\n\n if (element.ref.remove()) {\n // When the reference is an element of an array.\n key = element.ref.key;\n parent = element.ref.parent;\n\n // If removed from array, then decrease following items' keys.\n i = worklist.length;\n while (i--) {\n nextElem = worklist[i];\n if (nextElem.ref && nextElem.ref.parent === parent) {\n if (nextElem.ref.key < key) {\n break;\n }\n --nextElem.ref.key;\n }\n }\n }\n }\n\n this.__initialize(root, visitor);\n\n sentinel = {};\n\n // reference\n worklist = this.__worklist;\n leavelist = this.__leavelist;\n\n // initialize\n outer = {\n root: root\n };\n element = new Element(root, null, null, new Reference(outer, 'root'));\n worklist.push(element);\n leavelist.push(element);\n\n while (worklist.length) {\n element = worklist.pop();\n\n if (element === sentinel) {\n element = leavelist.pop();\n\n target = this.__execute(visitor.leave, element);\n\n // node may be replaced with null,\n // so distinguish between undefined and null in this place\n if (target !== undefined && target !== BREAK && target !== SKIP && target !== REMOVE) {\n // replace\n element.ref.replace(target);\n }\n\n if (this.__state === REMOVE || target === REMOVE) {\n removeElem(element);\n }\n\n if (this.__state === BREAK || target === BREAK) {\n return outer.root;\n }\n continue;\n }\n\n target = this.__execute(visitor.enter, element);\n\n // node may be replaced with null,\n // so distinguish between undefined and null in this place\n if (target !== undefined && target !== BREAK && target !== SKIP && target !== REMOVE) {\n // replace\n element.ref.replace(target);\n element.node = target;\n }\n\n if (this.__state === REMOVE || target === REMOVE) {\n removeElem(element);\n element.node = null;\n }\n\n if (this.__state === BREAK || target === BREAK) {\n return outer.root;\n }\n\n // node may be null\n node = element.node;\n if (!node) {\n continue;\n }\n\n worklist.push(sentinel);\n leavelist.push(element);\n\n if (this.__state === SKIP || target === SKIP) {\n continue;\n }\n\n nodeType = node.type || element.wrap;\n candidates = this.__keys[nodeType];\n if (!candidates) {\n if (this.__fallback) {\n candidates = this.__fallback(node);\n } else {\n throw new Error('Unknown node type ' + nodeType + '.');\n }\n }\n\n current = candidates.length;\n while ((current -= 1) >= 0) {\n key = candidates[current];\n candidate = node[key];\n if (!candidate) {\n continue;\n }\n\n if (Array.isArray(candidate)) {\n current2 = candidate.length;\n while ((current2 -= 1) >= 0) {\n if (!candidate[current2]) {\n continue;\n }\n if (isProperty(nodeType, candidates[current])) {\n element = new Element(candidate[current2], [key, current2], 'Property', new Reference(candidate, current2));\n } else if (isNode(candidate[current2])) {\n element = new Element(candidate[current2], [key, current2], null, new Reference(candidate, current2));\n } else {\n continue;\n }\n worklist.push(element);\n }\n } else if (isNode(candidate)) {\n worklist.push(new Element(candidate, key, null, new Reference(node, key)));\n }\n }\n }\n\n return outer.root;\n };\n\n function traverse(root, visitor) {\n var controller = new Controller();\n return controller.traverse(root, visitor);\n }\n\n function replace(root, visitor) {\n var controller = new Controller();\n return controller.replace(root, visitor);\n }\n\n function extendCommentRange(comment, tokens) {\n var target;\n\n target = upperBound(tokens, function search(token) {\n return token.range[0] > comment.range[0];\n });\n\n comment.extendedRange = [comment.range[0], comment.range[1]];\n\n if (target !== tokens.length) {\n comment.extendedRange[1] = tokens[target].range[0];\n }\n\n target -= 1;\n if (target >= 0) {\n comment.extendedRange[0] = tokens[target].range[1];\n }\n\n return comment;\n }\n\n function attachComments(tree, providedComments, tokens) {\n // At first, we should calculate extended comment ranges.\n var comments = [], comment, len, i, cursor;\n\n if (!tree.range) {\n throw new Error('attachComments needs range information');\n }\n\n // tokens array is empty, we attach comments to tree as 'leadingComments'\n if (!tokens.length) {\n if (providedComments.length) {\n for (i = 0, len = providedComments.length; i < len; i += 1) {\n comment = deepCopy(providedComments[i]);\n comment.extendedRange = [0, tree.range[0]];\n comments.push(comment);\n }\n tree.leadingComments = comments;\n }\n return tree;\n }\n\n for (i = 0, len = providedComments.length; i < len; i += 1) {\n comments.push(extendCommentRange(deepCopy(providedComments[i]), tokens));\n }\n\n // This is based on John Freeman's implementation.\n cursor = 0;\n traverse(tree, {\n enter: function (node) {\n var comment;\n\n while (cursor < comments.length) {\n comment = comments[cursor];\n if (comment.extendedRange[1] > node.range[0]) {\n break;\n }\n\n if (comment.extendedRange[1] === node.range[0]) {\n if (!node.leadingComments) {\n node.leadingComments = [];\n }\n node.leadingComments.push(comment);\n comments.splice(cursor, 1);\n } else {\n cursor += 1;\n }\n }\n\n // already out of owned node\n if (cursor === comments.length) {\n return VisitorOption.Break;\n }\n\n if (comments[cursor].extendedRange[0] > node.range[1]) {\n return VisitorOption.Skip;\n }\n }\n });\n\n cursor = 0;\n traverse(tree, {\n leave: function (node) {\n var comment;\n\n while (cursor < comments.length) {\n comment = comments[cursor];\n if (node.range[1] < comment.extendedRange[0]) {\n break;\n }\n\n if (node.range[1] === comment.extendedRange[0]) {\n if (!node.trailingComments) {\n node.trailingComments = [];\n }\n node.trailingComments.push(comment);\n comments.splice(cursor, 1);\n } else {\n cursor += 1;\n }\n }\n\n // already out of owned node\n if (cursor === comments.length) {\n return VisitorOption.Break;\n }\n\n if (comments[cursor].extendedRange[0] > node.range[1]) {\n return VisitorOption.Skip;\n }\n }\n });\n\n return tree;\n }\n\n exports.Syntax = Syntax;\n exports.traverse = traverse;\n exports.replace = replace;\n exports.attachComments = attachComments;\n exports.VisitorKeys = VisitorKeys;\n exports.VisitorOption = VisitorOption;\n exports.Controller = Controller;\n exports.cloneEnvironment = function () { return clone({}); };\n\n return exports;\n}(exports));\n/* vim: set sw=4 ts=4 et tw=80 : */\n","/*\n * Generated by PEG.js 0.10.0.\n *\n * http://pegjs.org/\n */\n(function(root, factory) {\n if (typeof define === \"function\" && define.amd) {\n define([], factory);\n } else if (typeof module === \"object\" && module.exports) {\n module.exports = factory();\n }\n})(this, function() {\n \"use strict\";\n\n function peg$subclass(child, parent) {\n function ctor() { this.constructor = child; }\n ctor.prototype = parent.prototype;\n child.prototype = new ctor();\n }\n\n function peg$SyntaxError(message, expected, found, location) {\n this.message = message;\n this.expected = expected;\n this.found = found;\n this.location = location;\n this.name = \"SyntaxError\";\n\n if (typeof Error.captureStackTrace === \"function\") {\n Error.captureStackTrace(this, peg$SyntaxError);\n }\n }\n\n peg$subclass(peg$SyntaxError, Error);\n\n peg$SyntaxError.buildMessage = function(expected, found) {\n var DESCRIBE_EXPECTATION_FNS = {\n literal: function(expectation) {\n return \"\\\"\" + literalEscape(expectation.text) + \"\\\"\";\n },\n\n \"class\": function(expectation) {\n var escapedParts = \"\",\n i;\n\n for (i = 0; i < expectation.parts.length; i++) {\n escapedParts += expectation.parts[i] instanceof Array\n ? classEscape(expectation.parts[i][0]) + \"-\" + classEscape(expectation.parts[i][1])\n : classEscape(expectation.parts[i]);\n }\n\n return \"[\" + (expectation.inverted ? \"^\" : \"\") + escapedParts + \"]\";\n },\n\n any: function(expectation) {\n return \"any character\";\n },\n\n end: function(expectation) {\n return \"end of input\";\n },\n\n other: function(expectation) {\n return expectation.description;\n }\n };\n\n function hex(ch) {\n return ch.charCodeAt(0).toString(16).toUpperCase();\n }\n\n function literalEscape(s) {\n return s\n .replace(/\\\\/g, '\\\\\\\\')\n .replace(/\"/g, '\\\\\"')\n .replace(/\\0/g, '\\\\0')\n .replace(/\\t/g, '\\\\t')\n .replace(/\\n/g, '\\\\n')\n .replace(/\\r/g, '\\\\r')\n .replace(/[\\x00-\\x0F]/g, function(ch) { return '\\\\x0' + hex(ch); })\n .replace(/[\\x10-\\x1F\\x7F-\\x9F]/g, function(ch) { return '\\\\x' + hex(ch); });\n }\n\n function classEscape(s) {\n return s\n .replace(/\\\\/g, '\\\\\\\\')\n .replace(/\\]/g, '\\\\]')\n .replace(/\\^/g, '\\\\^')\n .replace(/-/g, '\\\\-')\n .replace(/\\0/g, '\\\\0')\n .replace(/\\t/g, '\\\\t')\n .replace(/\\n/g, '\\\\n')\n .replace(/\\r/g, '\\\\r')\n .replace(/[\\x00-\\x0F]/g, function(ch) { return '\\\\x0' + hex(ch); })\n .replace(/[\\x10-\\x1F\\x7F-\\x9F]/g, function(ch) { return '\\\\x' + hex(ch); });\n }\n\n function describeExpectation(expectation) {\n return DESCRIBE_EXPECTATION_FNS[expectation.type](expectation);\n }\n\n function describeExpected(expected) {\n var descriptions = new Array(expected.length),\n i, j;\n\n for (i = 0; i < expected.length; i++) {\n descriptions[i] = describeExpectation(expected[i]);\n }\n\n descriptions.sort();\n\n if (descriptions.length > 0) {\n for (i = 1, j = 1; i < descriptions.length; i++) {\n if (descriptions[i - 1] !== descriptions[i]) {\n descriptions[j] = descriptions[i];\n j++;\n }\n }\n descriptions.length = j;\n }\n\n switch (descriptions.length) {\n case 1:\n return descriptions[0];\n\n case 2:\n return descriptions[0] + \" or \" + descriptions[1];\n\n default:\n return descriptions.slice(0, -1).join(\", \")\n + \", or \"\n + descriptions[descriptions.length - 1];\n }\n }\n\n function describeFound(found) {\n return found ? \"\\\"\" + literalEscape(found) + \"\\\"\" : \"end of input\";\n }\n\n return \"Expected \" + describeExpected(expected) + \" but \" + describeFound(found) + \" found.\";\n };\n\n function peg$parse(input, options) {\n options = options !== void 0 ? options : {};\n\n var peg$FAILED = {},\n\n peg$startRuleFunctions = { start: peg$parsestart },\n peg$startRuleFunction = peg$parsestart,\n\n peg$c0 = function(ss) {\n return ss.length === 1 ? ss[0] : { type: 'matches', selectors: ss };\n },\n peg$c1 = function() { return void 0; },\n peg$c2 = \" \",\n peg$c3 = peg$literalExpectation(\" \", false),\n peg$c4 = /^[^ [\\],():#!=><~+.]/,\n peg$c5 = peg$classExpectation([\" \", \"[\", \"]\", \",\", \"(\", \")\", \":\", \"#\", \"!\", \"=\", \">\", \"<\", \"~\", \"+\", \".\"], true, false),\n peg$c6 = function(i) { return i.join(''); },\n peg$c7 = \">\",\n peg$c8 = peg$literalExpectation(\">\", false),\n peg$c9 = function() { return 'child'; },\n peg$c10 = \"~\",\n peg$c11 = peg$literalExpectation(\"~\", false),\n peg$c12 = function() { return 'sibling'; },\n peg$c13 = \"+\",\n peg$c14 = peg$literalExpectation(\"+\", false),\n peg$c15 = function() { return 'adjacent'; },\n peg$c16 = function() { return 'descendant'; },\n peg$c17 = \",\",\n peg$c18 = peg$literalExpectation(\",\", false),\n peg$c19 = function(s, ss) {\n return [s].concat(ss.map(function (s) { return s[3]; }));\n },\n peg$c20 = function(a, ops) {\n return ops.reduce(function (memo, rhs) {\n return { type: rhs[0], left: memo, right: rhs[1] };\n }, a);\n },\n peg$c21 = \"!\",\n peg$c22 = peg$literalExpectation(\"!\", false),\n peg$c23 = function(subject, as) {\n const b = as.length === 1 ? as[0] : { type: 'compound', selectors: as };\n if(subject) b.subject = true;\n return b;\n },\n peg$c24 = \"*\",\n peg$c25 = peg$literalExpectation(\"*\", false),\n peg$c26 = function(a) { return { type: 'wildcard', value: a }; },\n peg$c27 = \"#\",\n peg$c28 = peg$literalExpectation(\"#\", false),\n peg$c29 = function(i) { return { type: 'identifier', value: i }; },\n peg$c30 = \"[\",\n peg$c31 = peg$literalExpectation(\"[\", false),\n peg$c32 = \"]\",\n peg$c33 = peg$literalExpectation(\"]\", false),\n peg$c34 = function(v) { return v; },\n peg$c35 = /^[><!]/,\n peg$c36 = peg$classExpectation([\">\", \"<\", \"!\"], false, false),\n peg$c37 = \"=\",\n peg$c38 = peg$literalExpectation(\"=\", false),\n peg$c39 = function(a) { return (a || '') + '='; },\n peg$c40 = /^[><]/,\n peg$c41 = peg$classExpectation([\">\", \"<\"], false, false),\n peg$c42 = \".\",\n peg$c43 = peg$literalExpectation(\".\", false),\n peg$c44 = function(a, as) {\n return [].concat.apply([a], as).join('');\n },\n peg$c45 = function(name, op, value) {\n return { type: 'attribute', name: name, operator: op, value: value };\n },\n peg$c46 = function(name) { return { type: 'attribute', name: name }; },\n peg$c47 = \"\\\"\",\n peg$c48 = peg$literalExpectation(\"\\\"\", false),\n peg$c49 = /^[^\\\\\"]/,\n peg$c50 = peg$classExpectation([\"\\\\\", \"\\\"\"], true, false),\n peg$c51 = \"\\\\\",\n peg$c52 = peg$literalExpectation(\"\\\\\", false),\n peg$c53 = peg$anyExpectation(),\n peg$c54 = function(a, b) { return a + b; },\n peg$c55 = function(d) {\n return { type: 'literal', value: strUnescape(d.join('')) };\n },\n peg$c56 = \"'\",\n peg$c57 = peg$literalExpectation(\"'\", false),\n peg$c58 = /^[^\\\\']/,\n peg$c59 = peg$classExpectation([\"\\\\\", \"'\"], true, false),\n peg$c60 = /^[0-9]/,\n peg$c61 = peg$classExpectation([[\"0\", \"9\"]], false, false),\n peg$c62 = function(a, b) {\n // Can use `a.flat().join('')` once supported\n const leadingDecimals = a ? [].concat.apply([], a).join('') : '';\n return { type: 'literal', value: parseFloat(leadingDecimals + b.join('')) };\n },\n peg$c63 = function(i) { return { type: 'literal', value: i }; },\n peg$c64 = \"type(\",\n peg$c65 = peg$literalExpectation(\"type(\", false),\n peg$c66 = /^[^ )]/,\n peg$c67 = peg$classExpectation([\" \", \")\"], true, false),\n peg$c68 = \")\",\n peg$c69 = peg$literalExpectation(\")\", false),\n peg$c70 = function(t) { return { type: 'type', value: t.join('') }; },\n peg$c71 = /^[imsu]/,\n peg$c72 = peg$classExpectation([\"i\", \"m\", \"s\", \"u\"], false, false),\n peg$c73 = \"/\",\n peg$c74 = peg$literalExpectation(\"/\", false),\n peg$c75 = /^[^\\/]/,\n peg$c76 = peg$classExpectation([\"/\"], true, false),\n peg$c77 = function(d, flgs) { return {\n type: 'regexp', value: new RegExp(d.join(''), flgs ? flgs.join('') : '') };\n },\n peg$c78 = function(i, is) {\n return { type: 'field', name: is.reduce(function(memo, p){ return memo + p[0] + p[1]; }, i)};\n },\n peg$c79 = \":not(\",\n peg$c80 = peg$literalExpectation(\":not(\", false),\n peg$c81 = function(ss) { return { type: 'not', selectors: ss }; },\n peg$c82 = \":matches(\",\n peg$c83 = peg$literalExpectation(\":matches(\", false),\n peg$c84 = function(ss) { return { type: 'matches', selectors: ss }; },\n peg$c85 = \":has(\",\n peg$c86 = peg$literalExpectation(\":has(\", false),\n peg$c87 = function(ss) { return { type: 'has', selectors: ss }; },\n peg$c88 = \":first-child\",\n peg$c89 = peg$literalExpectation(\":first-child\", false),\n peg$c90 = function() { return nth(1); },\n peg$c91 = \":last-child\",\n peg$c92 = peg$literalExpectation(\":last-child\", false),\n peg$c93 = function() { return nthLast(1); },\n peg$c94 = \":nth-child(\",\n peg$c95 = peg$literalExpectation(\":nth-child(\", false),\n peg$c96 = function(n) { return nth(parseInt(n.join(''), 10)); },\n peg$c97 = \":nth-last-child(\",\n peg$c98 = peg$literalExpectation(\":nth-last-child(\", false),\n peg$c99 = function(n) { return nthLast(parseInt(n.join(''), 10)); },\n peg$c100 = \":\",\n peg$c101 = peg$literalExpectation(\":\", false),\n peg$c102 = function(c) {\n return { type: 'class', name: c };\n },\n\n peg$currPos = 0,\n peg$savedPos = 0,\n peg$posDetailsCache = [{ line: 1, column: 1 }],\n peg$maxFailPos = 0,\n peg$maxFailExpected = [],\n peg$silentFails = 0,\n\n peg$resultsCache = {},\n\n peg$result;\n\n if (\"startRule\" in options) {\n if (!(options.startRule in peg$startRuleFunctions)) {\n throw new Error(\"Can't start parsing from rule \\\"\" + options.startRule + \"\\\".\");\n }\n\n peg$startRuleFunction = peg$startRuleFunctions[options.startRule];\n }\n\n function text() {\n return input.substring(peg$savedPos, peg$currPos);\n }\n\n function location() {\n return peg$computeLocation(peg$savedPos, peg$currPos);\n }\n\n function expected(description, location) {\n location = location !== void 0 ? location : peg$computeLocation(peg$savedPos, peg$currPos)\n\n throw peg$buildStructuredError(\n [peg$otherExpectation(description)],\n input.substring(peg$savedPos, peg$currPos),\n location\n );\n }\n\n function error(message, location) {\n location = location !== void 0 ? location : peg$computeLocation(peg$savedPos, peg$currPos)\n\n throw peg$buildSimpleError(message, location);\n }\n\n function peg$literalExpectation(text, ignoreCase) {\n return { type: \"literal\", text: text, ignoreCase: ignoreCase };\n }\n\n function peg$classExpectation(parts, inverted, ignoreCase) {\n return { type: \"class\", parts: parts, inverted: inverted, ignoreCase: ignoreCase };\n }\n\n function peg$anyExpectation() {\n return { type: \"any\" };\n }\n\n function peg$endExpectation() {\n return { type: \"end\" };\n }\n\n function peg$otherExpectation(description) {\n return { type: \"other\", description: description };\n }\n\n function peg$computePosDetails(pos) {\n var details = peg$posDetailsCache[pos], p;\n\n if (details) {\n return details;\n } else {\n p = pos - 1;\n while (!peg$posDetailsCache[p]) {\n p--;\n }\n\n details = peg$posDetailsCache[p];\n details = {\n line: details.line,\n column: details.column\n };\n\n while (p < pos) {\n if (input.charCodeAt(p) === 10) {\n details.line++;\n details.column = 1;\n } else {\n details.column++;\n }\n\n p++;\n }\n\n peg$posDetailsCache[pos] = details;\n return details;\n }\n }\n\n function peg$computeLocation(startPos, endPos) {\n var startPosDetails = peg$computePosDetails(startPos),\n endPosDetails = peg$computePosDetails(endPos);\n\n return {\n start: {\n offset: startPos,\n line: startPosDetails.line,\n column: startPosDetails.column\n },\n end: {\n offset: endPos,\n line: endPosDetails.line,\n column: endPosDetails.column\n }\n };\n }\n\n function peg$fail(expected) {\n if (peg$currPos < peg$maxFailPos) { return; }\n\n if (peg$currPos > peg$maxFailPos) {\n peg$maxFailPos = peg$currPos;\n peg$maxFailExpected = [];\n }\n\n peg$maxFailExpected.push(expected);\n }\n\n function peg$buildSimpleError(message, location) {\n return new peg$SyntaxError(message, null, null, location);\n }\n\n function peg$buildStructuredError(expected, found, location) {\n return new peg$SyntaxError(\n peg$SyntaxError.buildMessage(expected, found),\n expected,\n found,\n location\n );\n }\n\n function peg$parsestart() {\n var s0, s1, s2, s3;\n\n var key = peg$currPos * 30 + 0,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n s1 = peg$parse_();\n if (s1 !== peg$FAILED) {\n s2 = peg$parseselectors();\n if (s2 !== peg$FAILED) {\n s3 = peg$parse_();\n if (s3 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c0(s2);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n if (s0 === peg$FAILED) {\n s0 = peg$currPos;\n s1 = peg$parse_();\n if (s1 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c1();\n }\n s0 = s1;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parse_() {\n var s0, s1;\n\n var key = peg$currPos * 30 + 1,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = [];\n if (input.charCodeAt(peg$currPos) === 32) {\n s1 = peg$c2;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c3); }\n }\n while (s1 !== peg$FAILED) {\n s0.push(s1);\n if (input.charCodeAt(peg$currPos) === 32) {\n s1 = peg$c2;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c3); }\n }\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parseidentifierName() {\n var s0, s1, s2;\n\n var key = peg$currPos * 30 + 2,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n s1 = [];\n if (peg$c4.test(input.charAt(peg$currPos))) {\n s2 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s2 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c5); }\n }\n if (s2 !== peg$FAILED) {\n while (s2 !== peg$FAILED) {\n s1.push(s2);\n if (peg$c4.test(input.charAt(peg$currPos))) {\n s2 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s2 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c5); }\n }\n }\n } else {\n s1 = peg$FAILED;\n }\n if (s1 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c6(s1);\n }\n s0 = s1;\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parsebinaryOp() {\n var s0, s1, s2, s3;\n\n var key = peg$currPos * 30 + 3,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n s1 = peg$parse_();\n if (s1 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 62) {\n s2 = peg$c7;\n peg$currPos++;\n } else {\n s2 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c8); }\n }\n if (s2 !== peg$FAILED) {\n s3 = peg$parse_();\n if (s3 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c9();\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n if (s0 === peg$FAILED) {\n s0 = peg$currPos;\n s1 = peg$parse_();\n if (s1 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 126) {\n s2 = peg$c10;\n peg$currPos++;\n } else {\n s2 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c11); }\n }\n if (s2 !== peg$FAILED) {\n s3 = peg$parse_();\n if (s3 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c12();\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n if (s0 === peg$FAILED) {\n s0 = peg$currPos;\n s1 = peg$parse_();\n if (s1 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 43) {\n s2 = peg$c13;\n peg$currPos++;\n } else {\n s2 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c14); }\n }\n if (s2 !== peg$FAILED) {\n s3 = peg$parse_();\n if (s3 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c15();\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n if (s0 === peg$FAILED) {\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 32) {\n s1 = peg$c2;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c3); }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parse_();\n if (s2 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c16();\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n }\n }\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parseselectors() {\n var s0, s1, s2, s3, s4, s5, s6, s7;\n\n var key = peg$currPos * 30 + 4,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n s1 = peg$parseselector();\n if (s1 !== peg$FAILED) {\n s2 = [];\n s3 = peg$currPos;\n s4 = peg$parse_();\n if (s4 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 44) {\n s5 = peg$c17;\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c18); }\n }\n if (s5 !== peg$FAILED) {\n s6 = peg$parse_();\n if (s6 !== peg$FAILED) {\n s7 = peg$parseselector();\n if (s7 !== peg$FAILED) {\n s4 = [s4, s5, s6, s7];\n s3 = s4;\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n while (s3 !== peg$FAILED) {\n s2.push(s3);\n s3 = peg$currPos;\n s4 = peg$parse_();\n if (s4 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 44) {\n s5 = peg$c17;\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c18); }\n }\n if (s5 !== peg$FAILED) {\n s6 = peg$parse_();\n if (s6 !== peg$FAILED) {\n s7 = peg$parseselector();\n if (s7 !== peg$FAILED) {\n s4 = [s4, s5, s6, s7];\n s3 = s4;\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n }\n if (s2 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c19(s1, s2);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parseselector() {\n var s0, s1, s2, s3, s4, s5;\n\n var key = peg$currPos * 30 + 5,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n s1 = peg$parsesequence();\n if (s1 !== peg$FAILED) {\n s2 = [];\n s3 = peg$currPos;\n s4 = peg$parsebinaryOp();\n if (s4 !== peg$FAILED) {\n s5 = peg$parsesequence();\n if (s5 !== peg$FAILED) {\n s4 = [s4, s5];\n s3 = s4;\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n while (s3 !== peg$FAILED) {\n s2.push(s3);\n s3 = peg$currPos;\n s4 = peg$parsebinaryOp();\n if (s4 !== peg$FAILED) {\n s5 = peg$parsesequence();\n if (s5 !== peg$FAILED) {\n s4 = [s4, s5];\n s3 = s4;\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n }\n if (s2 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c20(s1, s2);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parsesequence() {\n var s0, s1, s2, s3;\n\n var key = peg$currPos * 30 + 6,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 33) {\n s1 = peg$c21;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c22); }\n }\n if (s1 === peg$FAILED) {\n s1 = null;\n }\n if (s1 !== peg$FAILED) {\n s2 = [];\n s3 = peg$parseatom();\n if (s3 !== peg$FAILED) {\n while (s3 !== peg$FAILED) {\n s2.push(s3);\n s3 = peg$parseatom();\n }\n } else {\n s2 = peg$FAILED;\n }\n if (s2 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c23(s1, s2);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parseatom() {\n var s0;\n\n var key = peg$currPos * 30 + 7,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$parsewildcard();\n if (s0 === peg$FAILED) {\n s0 = peg$parseidentifier();\n if (s0 === peg$FAILED) {\n s0 = peg$parseattr();\n if (s0 === peg$FAILED) {\n s0 = peg$parsefield();\n if (s0 === peg$FAILED) {\n s0 = peg$parsenegation();\n if (s0 === peg$FAILED) {\n s0 = peg$parsematches();\n if (s0 === peg$FAILED) {\n s0 = peg$parsehas();\n if (s0 === peg$FAILED) {\n s0 = peg$parsefirstChild();\n if (s0 === peg$FAILED) {\n s0 = peg$parselastChild();\n if (s0 === peg$FAILED) {\n s0 = peg$parsenthChild();\n if (s0 === peg$FAILED) {\n s0 = peg$parsenthLastChild();\n if (s0 === peg$FAILED) {\n s0 = peg$parseclass();\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parsewildcard() {\n var s0, s1;\n\n var key = peg$currPos * 30 + 8,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 42) {\n s1 = peg$c24;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c25); }\n }\n if (s1 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c26(s1);\n }\n s0 = s1;\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parseidentifier() {\n var s0, s1, s2;\n\n var key = peg$currPos * 30 + 9,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 35) {\n s1 = peg$c27;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c28); }\n }\n if (s1 === peg$FAILED) {\n s1 = null;\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parseidentifierName();\n if (s2 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c29(s2);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parseattr() {\n var s0, s1, s2, s3, s4, s5;\n\n var key = peg$currPos * 30 + 10,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 91) {\n s1 = peg$c30;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c31); }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parse_();\n if (s2 !== peg$FAILED) {\n s3 = peg$parseattrValue();\n if (s3 !== peg$FAILED) {\n s4 = peg$parse_();\n if (s4 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 93) {\n s5 = peg$c32;\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c33); }\n }\n if (s5 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c34(s3);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parseattrOps() {\n var s0, s1, s2;\n\n var key = peg$currPos * 30 + 11,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (peg$c35.test(input.charAt(peg$currPos))) {\n s1 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c36); }\n }\n if (s1 === peg$FAILED) {\n s1 = null;\n }\n if (s1 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 61) {\n s2 = peg$c37;\n peg$currPos++;\n } else {\n s2 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c38); }\n }\n if (s2 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c39(s1);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n if (s0 === peg$FAILED) {\n if (peg$c40.test(input.charAt(peg$currPos))) {\n s0 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s0 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c41); }\n }\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parseattrEqOps() {\n var s0, s1, s2;\n\n var key = peg$currPos * 30 + 12,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 33) {\n s1 = peg$c21;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c22); }\n }\n if (s1 === peg$FAILED) {\n s1 = null;\n }\n if (s1 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 61) {\n s2 = peg$c37;\n peg$currPos++;\n } else {\n s2 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c38); }\n }\n if (s2 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c39(s1);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parseattrName() {\n var s0, s1, s2, s3, s4, s5;\n\n var key = peg$currPos * 30 + 13,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n s1 = peg$parseidentifierName();\n if (s1 !== peg$FAILED) {\n s2 = [];\n s3 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 46) {\n s4 = peg$c42;\n peg$currPos++;\n } else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c43); }\n }\n if (s4 !== peg$FAILED) {\n s5 = peg$parseidentifierName();\n if (s5 !== peg$FAILED) {\n s4 = [s4, s5];\n s3 = s4;\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n while (s3 !== peg$FAILED) {\n s2.push(s3);\n s3 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 46) {\n s4 = peg$c42;\n peg$currPos++;\n } else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c43); }\n }\n if (s4 !== peg$FAILED) {\n s5 = peg$parseidentifierName();\n if (s5 !== peg$FAILED) {\n s4 = [s4, s5];\n s3 = s4;\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n }\n if (s2 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c44(s1, s2);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parseattrValue() {\n var s0, s1, s2, s3, s4, s5;\n\n var key = peg$currPos * 30 + 14,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n s1 = peg$parseattrName();\n if (s1 !== peg$FAILED) {\n s2 = peg$parse_();\n if (s2 !== peg$FAILED) {\n s3 = peg$parseattrEqOps();\n if (s3 !== peg$FAILED) {\n s4 = peg$parse_();\n if (s4 !== peg$FAILED) {\n s5 = peg$parsetype();\n if (s5 === peg$FAILED) {\n s5 = peg$parseregex();\n }\n if (s5 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c45(s1, s3, s5);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n if (s0 === peg$FAILED) {\n s0 = peg$currPos;\n s1 = peg$parseattrName();\n if (s1 !== peg$FAILED) {\n s2 = peg$parse_();\n if (s2 !== peg$FAILED) {\n s3 = peg$parseattrOps();\n if (s3 !== peg$FAILED) {\n s4 = peg$parse_();\n if (s4 !== peg$FAILED) {\n s5 = peg$parsestring();\n if (s5 === peg$FAILED) {\n s5 = peg$parsenumber();\n if (s5 === peg$FAILED) {\n s5 = peg$parsepath();\n }\n }\n if (s5 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c45(s1, s3, s5);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n if (s0 === peg$FAILED) {\n s0 = peg$currPos;\n s1 = peg$parseattrName();\n if (s1 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c46(s1);\n }\n s0 = s1;\n }\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parsestring() {\n var s0, s1, s2, s3, s4, s5;\n\n var key = peg$currPos * 30 + 15,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 34) {\n s1 = peg$c47;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c48); }\n }\n if (s1 !== peg$FAILED) {\n s2 = [];\n if (peg$c49.test(input.charAt(peg$currPos))) {\n s3 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c50); }\n }\n if (s3 === peg$FAILED) {\n s3 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 92) {\n s4 = peg$c51;\n peg$currPos++;\n } else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c52); }\n }\n if (s4 !== peg$FAILED) {\n if (input.length > peg$currPos) {\n s5 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c53); }\n }\n if (s5 !== peg$FAILED) {\n peg$savedPos = s3;\n s4 = peg$c54(s4, s5);\n s3 = s4;\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n }\n while (s3 !== peg$FAILED) {\n s2.push(s3);\n if (peg$c49.test(input.charAt(peg$currPos))) {\n s3 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c50); }\n }\n if (s3 === peg$FAILED) {\n s3 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 92) {\n s4 = peg$c51;\n peg$currPos++;\n } else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c52); }\n }\n if (s4 !== peg$FAILED) {\n if (input.length > peg$currPos) {\n s5 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c53); }\n }\n if (s5 !== peg$FAILED) {\n peg$savedPos = s3;\n s4 = peg$c54(s4, s5);\n s3 = s4;\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n }\n }\n if (s2 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 34) {\n s3 = peg$c47;\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c48); }\n }\n if (s3 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c55(s2);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n if (s0 === peg$FAILED) {\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 39) {\n s1 = peg$c56;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c57); }\n }\n if (s1 !== peg$FAILED) {\n s2 = [];\n if (peg$c58.test(input.charAt(peg$currPos))) {\n s3 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c59); }\n }\n if (s3 === peg$FAILED) {\n s3 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 92) {\n s4 = peg$c51;\n peg$currPos++;\n } else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c52); }\n }\n if (s4 !== peg$FAILED) {\n if (input.length > peg$currPos) {\n s5 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c53); }\n }\n if (s5 !== peg$FAILED) {\n peg$savedPos = s3;\n s4 = peg$c54(s4, s5);\n s3 = s4;\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n }\n while (s3 !== peg$FAILED) {\n s2.push(s3);\n if (peg$c58.test(input.charAt(peg$currPos))) {\n s3 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c59); }\n }\n if (s3 === peg$FAILED) {\n s3 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 92) {\n s4 = peg$c51;\n peg$currPos++;\n } else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c52); }\n }\n if (s4 !== peg$FAILED) {\n if (input.length > peg$currPos) {\n s5 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c53); }\n }\n if (s5 !== peg$FAILED) {\n peg$savedPos = s3;\n s4 = peg$c54(s4, s5);\n s3 = s4;\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n }\n }\n if (s2 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 39) {\n s3 = peg$c56;\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c57); }\n }\n if (s3 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c55(s2);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parsenumber() {\n var s0, s1, s2, s3;\n\n var key = peg$currPos * 30 + 16,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n s1 = peg$currPos;\n s2 = [];\n if (peg$c60.test(input.charAt(peg$currPos))) {\n s3 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c61); }\n }\n while (s3 !== peg$FAILED) {\n s2.push(s3);\n if (peg$c60.test(input.charAt(peg$currPos))) {\n s3 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c61); }\n }\n }\n if (s2 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 46) {\n s3 = peg$c42;\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c43); }\n }\n if (s3 !== peg$FAILED) {\n s2 = [s2, s3];\n s1 = s2;\n } else {\n peg$currPos = s1;\n s1 = peg$FAILED;\n }\n } else {\n peg$currPos = s1;\n s1 = peg$FAILED;\n }\n if (s1 === peg$FAILED) {\n s1 = null;\n }\n if (s1 !== peg$FAILED) {\n s2 = [];\n if (peg$c60.test(input.charAt(peg$currPos))) {\n s3 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c61); }\n }\n if (s3 !== peg$FAILED) {\n while (s3 !== peg$FAILED) {\n s2.push(s3);\n if (peg$c60.test(input.charAt(peg$currPos))) {\n s3 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c61); }\n }\n }\n } else {\n s2 = peg$FAILED;\n }\n if (s2 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c62(s1, s2);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parsepath() {\n var s0, s1;\n\n var key = peg$currPos * 30 + 17,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n s1 = peg$parseidentifierName();\n if (s1 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c63(s1);\n }\n s0 = s1;\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parsetype() {\n var s0, s1, s2, s3, s4, s5;\n\n var key = peg$currPos * 30 + 18,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.substr(peg$currPos, 5) === peg$c64) {\n s1 = peg$c64;\n peg$currPos += 5;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c65); }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parse_();\n if (s2 !== peg$FAILED) {\n s3 = [];\n if (peg$c66.test(input.charAt(peg$currPos))) {\n s4 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c67); }\n }\n if (s4 !== peg$FAILED) {\n while (s4 !== peg$FAILED) {\n s3.push(s4);\n if (peg$c66.test(input.charAt(peg$currPos))) {\n s4 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c67); }\n }\n }\n } else {\n s3 = peg$FAILED;\n }\n if (s3 !== peg$FAILED) {\n s4 = peg$parse_();\n if (s4 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 41) {\n s5 = peg$c68;\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c69); }\n }\n if (s5 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c70(s3);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parseflags() {\n var s0, s1;\n\n var key = peg$currPos * 30 + 19,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = [];\n if (peg$c71.test(input.charAt(peg$currPos))) {\n s1 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c72); }\n }\n if (s1 !== peg$FAILED) {\n while (s1 !== peg$FAILED) {\n s0.push(s1);\n if (peg$c71.test(input.charAt(peg$currPos))) {\n s1 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c72); }\n }\n }\n } else {\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parseregex() {\n var s0, s1, s2, s3, s4;\n\n var key = peg$currPos * 30 + 20,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 47) {\n s1 = peg$c73;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c74); }\n }\n if (s1 !== peg$FAILED) {\n s2 = [];\n if (peg$c75.test(input.charAt(peg$currPos))) {\n s3 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c76); }\n }\n if (s3 !== peg$FAILED) {\n while (s3 !== peg$FAILED) {\n s2.push(s3);\n if (peg$c75.test(input.charAt(peg$currPos))) {\n s3 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c76); }\n }\n }\n } else {\n s2 = peg$FAILED;\n }\n if (s2 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 47) {\n s3 = peg$c73;\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c74); }\n }\n if (s3 !== peg$FAILED) {\n s4 = peg$parseflags();\n if (s4 === peg$FAILED) {\n s4 = null;\n }\n if (s4 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c77(s2, s4);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parsefield() {\n var s0, s1, s2, s3, s4, s5, s6;\n\n var key = peg$currPos * 30 + 21,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 46) {\n s1 = peg$c42;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c43); }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parseidentifierName();\n if (s2 !== peg$FAILED) {\n s3 = [];\n s4 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 46) {\n s5 = peg$c42;\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c43); }\n }\n if (s5 !== peg$FAILED) {\n s6 = peg$parseidentifierName();\n if (s6 !== peg$FAILED) {\n s5 = [s5, s6];\n s4 = s5;\n } else {\n peg$currPos = s4;\n s4 = peg$FAILED;\n }\n } else {\n peg$currPos = s4;\n s4 = peg$FAILED;\n }\n while (s4 !== peg$FAILED) {\n s3.push(s4);\n s4 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 46) {\n s5 = peg$c42;\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c43); }\n }\n if (s5 !== peg$FAILED) {\n s6 = peg$parseidentifierName();\n if (s6 !== peg$FAILED) {\n s5 = [s5, s6];\n s4 = s5;\n } else {\n peg$currPos = s4;\n s4 = peg$FAILED;\n }\n } else {\n peg$currPos = s4;\n s4 = peg$FAILED;\n }\n }\n if (s3 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c78(s2, s3);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parsenegation() {\n var s0, s1, s2, s3, s4, s5;\n\n var key = peg$currPos * 30 + 22,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.substr(peg$currPos, 5) === peg$c79) {\n s1 = peg$c79;\n peg$currPos += 5;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c80); }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parse_();\n if (s2 !== peg$FAILED) {\n s3 = peg$parseselectors();\n if (s3 !== peg$FAILED) {\n s4 = peg$parse_();\n if (s4 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 41) {\n s5 = peg$c68;\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c69); }\n }\n if (s5 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c81(s3);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parsematches() {\n var s0, s1, s2, s3, s4, s5;\n\n var key = peg$currPos * 30 + 23,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.substr(peg$currPos, 9) === peg$c82) {\n s1 = peg$c82;\n peg$currPos += 9;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c83); }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parse_();\n if (s2 !== peg$FAILED) {\n s3 = peg$parseselectors();\n if (s3 !== peg$FAILED) {\n s4 = peg$parse_();\n if (s4 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 41) {\n s5 = peg$c68;\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c69); }\n }\n if (s5 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c84(s3);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parsehas() {\n var s0, s1, s2, s3, s4, s5;\n\n var key = peg$currPos * 30 + 24,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.substr(peg$currPos, 5) === peg$c85) {\n s1 = peg$c85;\n peg$currPos += 5;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c86); }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parse_();\n if (s2 !== peg$FAILED) {\n s3 = peg$parseselectors();\n if (s3 !== peg$FAILED) {\n s4 = peg$parse_();\n if (s4 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 41) {\n s5 = peg$c68;\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c69); }\n }\n if (s5 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c87(s3);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parsefirstChild() {\n var s0, s1;\n\n var key = peg$currPos * 30 + 25,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.substr(peg$currPos, 12) === peg$c88) {\n s1 = peg$c88;\n peg$currPos += 12;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c89); }\n }\n if (s1 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c90();\n }\n s0 = s1;\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parselastChild() {\n var s0, s1;\n\n var key = peg$currPos * 30 + 26,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.substr(peg$currPos, 11) === peg$c91) {\n s1 = peg$c91;\n peg$currPos += 11;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c92); }\n }\n if (s1 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c93();\n }\n s0 = s1;\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parsenthChild() {\n var s0, s1, s2, s3, s4, s5;\n\n var key = peg$currPos * 30 + 27,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.substr(peg$currPos, 11) === peg$c94) {\n s1 = peg$c94;\n peg$currPos += 11;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c95); }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parse_();\n if (s2 !== peg$FAILED) {\n s3 = [];\n if (peg$c60.test(input.charAt(peg$currPos))) {\n s4 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c61); }\n }\n if (s4 !== peg$FAILED) {\n while (s4 !== peg$FAILED) {\n s3.push(s4);\n if (peg$c60.test(input.charAt(peg$currPos))) {\n s4 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c61); }\n }\n }\n } else {\n s3 = peg$FAILED;\n }\n if (s3 !== peg$FAILED) {\n s4 = peg$parse_();\n if (s4 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 41) {\n s5 = peg$c68;\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c69); }\n }\n if (s5 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c96(s3);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parsenthLastChild() {\n var s0, s1, s2, s3, s4, s5;\n\n var key = peg$currPos * 30 + 28,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.substr(peg$currPos, 16) === peg$c97) {\n s1 = peg$c97;\n peg$currPos += 16;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c98); }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parse_();\n if (s2 !== peg$FAILED) {\n s3 = [];\n if (peg$c60.test(input.charAt(peg$currPos))) {\n s4 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c61); }\n }\n if (s4 !== peg$FAILED) {\n while (s4 !== peg$FAILED) {\n s3.push(s4);\n if (peg$c60.test(input.charAt(peg$currPos))) {\n s4 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c61); }\n }\n }\n } else {\n s3 = peg$FAILED;\n }\n if (s3 !== peg$FAILED) {\n s4 = peg$parse_();\n if (s4 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 41) {\n s5 = peg$c68;\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c69); }\n }\n if (s5 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c99(s3);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parseclass() {\n var s0, s1, s2;\n\n var key = peg$currPos * 30 + 29,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 58) {\n s1 = peg$c100;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c101); }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parseidentifierName();\n if (s2 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c102(s2);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n\n function nth(n) { return { type: 'nth-child', index: { type: 'literal', value: n } }; }\n function nthLast(n) { return { type: 'nth-last-child', index: { type: 'literal', value: n } }; }\n function strUnescape(s) {\n return s.replace(/\\\\(.)/g, function(match, ch) {\n switch(ch) {\n case 'b': return '\\b';\n case 'f': return '\\f';\n case 'n': return '\\n';\n case 'r': return '\\r';\n case 't': return '\\t';\n case 'v': return '\\v';\n default: return ch;\n }\n });\n }\n\n\n peg$result = peg$startRuleFunction();\n\n if (peg$result !== peg$FAILED && peg$currPos === input.length) {\n return peg$result;\n } else {\n if (peg$result !== peg$FAILED && peg$currPos < input.length) {\n peg$fail(peg$endExpectation());\n }\n\n throw peg$buildStructuredError(\n peg$maxFailExpected,\n peg$maxFailPos < input.length ? input.charAt(peg$maxFailPos) : null,\n peg$maxFailPos < input.length\n ? peg$computeLocation(peg$maxFailPos, peg$maxFailPos + 1)\n : peg$computeLocation(peg$maxFailPos, peg$maxFailPos)\n );\n }\n }\n\n return {\n SyntaxError: peg$SyntaxError,\n parse: peg$parse\n };\n});\n","/* vim: set sw=4 sts=4 : */\nimport estraverse from 'estraverse';\nimport parser from './parser.js';\n\n/**\n* @typedef {\"LEFT_SIDE\"|\"RIGHT_SIDE\"} Side\n*/\n\nconst LEFT_SIDE = 'LEFT_SIDE';\nconst RIGHT_SIDE = 'RIGHT_SIDE';\n\n/**\n * @external AST\n * @see https://esprima.readthedocs.io/en/latest/syntax-tree-format.html\n */\n\n/**\n * One of the rules of `grammar.pegjs`\n * @typedef {PlainObject} SelectorAST\n * @see grammar.pegjs\n*/\n\n/**\n * The `sequence` production of `grammar.pegjs`\n * @typedef {PlainObject} SelectorSequenceAST\n*/\n\n/**\n * Get the value of a property which may be multiple levels down\n * in the object.\n * @param {?PlainObject} obj\n * @param {string[]} keys\n * @returns {undefined|boolean|string|number|external:AST}\n */\nfunction getPath(obj, keys) {\n for (let i = 0; i < keys.length; ++i) {\n if (obj == null) { return obj; }\n obj = obj[keys[i]];\n }\n return obj;\n}\n\n/**\n * Determine whether `node` can be reached by following `path`,\n * starting at `ancestor`.\n * @param {?external:AST} node\n * @param {?external:AST} ancestor\n * @param {string[]} path\n * @param {Integer} fromPathIndex\n * @returns {boolean}\n */\nfunction inPath(node, ancestor, path, fromPathIndex) {\n let current = ancestor;\n for (let i = fromPathIndex; i < path.length; ++i) {\n if (current == null) {\n return false;\n }\n const field = current[path[i]];\n if (Array.isArray(field)) {\n for (let k = 0; k < field.length; ++k) {\n if (inPath(node, field[k], path, i + 1)) {\n return true;\n }\n }\n return false;\n }\n current = field;\n }\n return node === current;\n}\n\n/**\n * A generated matcher function for a selector.\n * @typedef {function} SelectorMatcher\n*/\n\n/**\n * A WeakMap for holding cached matcher functions for selectors.\n * @type {WeakMap<SelectorAST, SelectorMatcher>}\n*/\nconst MATCHER_CACHE = typeof WeakMap === 'function' ? new WeakMap : null;\n\n/**\n * Look up a matcher function for `selector` in the cache.\n * If it does not exist, generate it with `generateMatcher` and add it to the cache.\n * In engines without WeakMap, the caching is skipped and matchers are generated with every call.\n * @param {?SelectorAST} selector\n * @returns {SelectorMatcher}\n */\nfunction getMatcher(selector) {\n if (selector == null) {\n return () => true;\n }\n\n if (MATCHER_CACHE != null) {\n let matcher = MATCHER_CACHE.get(selector);\n if (matcher != null) {\n return matcher;\n }\n matcher = generateMatcher(selector);\n MATCHER_CACHE.set(selector, matcher);\n return matcher;\n }\n\n return generateMatcher(selector);\n}\n\n/**\n * Create a matcher function for `selector`,\n * @param {?SelectorAST} selector\n * @returns {SelectorMatcher}\n */\nfunction generateMatcher(selector) {\n switch(selector.type) {\n case 'wildcard':\n return () => true;\n\n case 'identifier': {\n const value = selector.value.toLowerCase();\n return (node, ancestry, options) => {\n const nodeTypeKey = (options && options.nodeTypeKey) || 'type';\n return value === node[nodeTypeKey].toLowerCase();\n };\n }\n\n case 'field': {\n const path = selector.name.split('.');\n return (node, ancestry) => {\n const ancestor = ancestry[path.length - 1];\n return inPath(node, ancestor, path, 0);\n };\n }\n\n case 'matches': {\n const matchers = selector.selectors.map(getMatcher);\n return (node, ancestry, options) => {\n for (let i = 0; i < matchers.length; ++i) {\n if (matchers[i](node, ancestry, options)) { return true; }\n }\n return false;\n };\n }\n\n case 'compound': {\n const matchers = selector.selectors.map(getMatcher);\n return (node, ancestry, options) => {\n for (let i = 0; i < matchers.length; ++i) {\n if (!matchers[i](node, ancestry, options)) { return false; }\n }\n return true;\n };\n }\n\n case 'not': {\n const matchers = selector.selectors.map(getMatcher);\n return (node, ancestry, options) => {\n for (let i = 0; i < matchers.length; ++i) {\n if (matchers[i](node, ancestry, options)) { return false; }\n }\n return true;\n };\n }\n\n case 'has': {\n const matchers = selector.selectors.map(getMatcher);\n return (node, ancestry, options) => {\n let result = false;\n\n const a = [];\n estraverse.traverse(node, {\n enter (node, parent) {\n if (parent != null) { a.unshift(parent); }\n\n for (let i = 0; i < matchers.length; ++i) {\n if (matchers[i](node, a, options)) {\n result = true;\n this.break();\n return;\n }\n }\n },\n leave () { a.shift(); },\n keys: options && options.visitorKeys,\n fallback: options && options.fallback || 'iteration'\n });\n\n return result;\n };\n }\n\n case 'child': {\n const left = getMatcher(selector.left);\n const right = getMatcher(selector.right);\n return (node, ancestry, options) => {\n if (ancestry.length > 0 && right(node, ancestry, options)) {\n return left(ancestry[0], ancestry.slice(1), options);\n }\n return false;\n };\n }\n\n case 'descendant': {\n const left = getMatcher(selector.left);\n const right = getMatcher(selector.right);\n return (node, ancestry, options) => {\n if (right(node, ancestry, options)) {\n for (let i = 0, l = ancestry.length; i < l; ++i) {\n if (left(ancestry[i], ancestry.slice(i + 1), options)) {\n return true;\n }\n }\n }\n return false;\n };\n }\n\n case 'attribute': {\n const path = selector.name.split('.');\n switch (selector.operator) {\n case void 0:\n return (node) => getPath(node, path) != null;\n case '=':\n switch (selector.value.type) {\n case 'regexp':\n return (node) => {\n const p = getPath(node, path);\n return typeof p === 'string' && selector.value.value.test(p);\n };\n case 'literal': {\n const literal = `${selector.value.value}`;\n return (node) => literal === `${getPath(node, path)}`;\n }\n case 'type':\n return (node) => selector.value.value === typeof getPath(node, path);\n }\n throw new Error(`Unknown selector value type: ${selector.value.type}`);\n case '!=':\n switch (selector.value.type) {\n case 'regexp':\n return (node) => !selector.value.value.test(getPath(node, path));\n case 'literal': {\n const literal = `${selector.value.value}`;\n return (node) => literal !== `${getPath(node, path)}`;\n }\n case 'type':\n return (node) => selector.value.value !== typeof getPath(node, path);\n }\n throw new Error(`Unknown selector value type: ${selector.value.type}`);\n case '<=':\n return (node) => getPath(node, path) <= selector.value.value;\n case '<':\n return (node) => getPath(node, path) < selector.value.value;\n case '>':\n return (node) => getPath(node, path) > selector.value.value;\n case '>=':\n return (node) => getPath(node, path) >= selector.value.value;\n }\n throw new Error(`Unknown operator: ${selector.operator}`);\n }\n\n case 'sibling': {\n const left = getMatcher(selector.left);\n const right = getMatcher(selector.right);\n return (node, ancestry, options) =>\n right(node, ancestry, options) &&\n sibling(node, left, ancestry, LEFT_SIDE, options) ||\n selector.left.subject &&\n left(node, ancestry, options) &&\n sibling(node, right, ancestry, RIGHT_SIDE, options);\n }\n\n case 'adjacent': {\n const left = getMatcher(selector.left);\n const right = getMatcher(selector.right);\n return (node, ancestry, options) =>\n right(node, ancestry, options) &&\n adjacent(node, left, ancestry, LEFT_SIDE, options) ||\n selector.right.subject &&\n left(node, ancestry, options) &&\n adjacent(node, right, ancestry, RIGHT_SIDE, options);\n }\n\n case 'nth-child': {\n const nth = selector.index.value;\n const right = getMatcher(selector.right);\n return (node, ancestry, options) =>\n right(node, ancestry, options) &&\n nthChild(node, ancestry, nth, options);\n }\n\n case 'nth-last-child': {\n const nth = -selector.index.value;\n const right = getMatcher(selector.right);\n return (node, ancestry, options) =>\n right(node, ancestry, options) &&\n nthChild(node, ancestry, nth, options);\n }\n\n case 'class': {\n\n return (node, ancestry, options) => {\n \n if (options && options.matchClass) {\n return options.matchClass(selector.name, node, ancestry);\n }\n \n if (options && options.nodeTypeKey) return false;\n \n const name = selector.name.toLowerCase();\n\n switch(name){\n case 'statement':\n if(node.type.slice(-9) === 'Statement') return true;\n // fallthrough: interface Declaration <: Statement { }\n case 'declaration':\n return node.type.slice(-11) === 'Declaration';\n case 'pattern':\n if(node.type.slice(-7) === 'Pattern') return true;\n // fallthrough: interface Expression <: Node, Pattern { }\n case 'expression':\n return node.type.slice(-10) === 'Expression' ||\n node.type.slice(-7) === 'Literal' ||\n (\n node.type === 'Identifier' &&\n (ancestry.length === 0 || ancestry[0].type !== 'MetaProperty')\n ) ||\n node.type === 'MetaProperty';\n case 'function':\n return node.type === 'FunctionDeclaration' ||\n node.type === 'FunctionExpression' ||\n node.type === 'ArrowFunctionExpression';\n }\n throw new Error(`Unknown class name: ${selector.name}`);\n };\n }\n }\n\n throw new Error(`Unknown selector type: ${selector.type}`);\n}\n\n/**\n * @callback TraverseOptionFallback\n * @param {external:AST} node The given node.\n * @returns {string[]} An array of visitor keys for the given node.\n */\n\n/**\n * @callback ClassMatcher\n * @param {string} className The name of the class to match.\n * @param {external:AST} node The node to match against.\n * @param {Array<external:AST>} ancestry The ancestry of the node.\n * @returns {boolean} True if the node matches the class, false if not.\n */\n\n/**\n * @typedef {object} ESQueryOptions\n * @property {string} [nodeTypeKey=\"type\"] By passing `nodeTypeKey`, we can allow other ASTs to use ESQuery.\n * @property { { [nodeType: string]: string[] } } [visitorKeys] By passing `visitorKeys` mapping, we can extend the properties of the nodes that traverse the node.\n * @property {TraverseOptionFallback} [fallback] By passing `fallback` option, we can control the properties of traversing nodes when encountering unknown nodes.\n * @property {ClassMatcher} [matchClass] By passing `matchClass` option, we can customize the interpretation of classes.\n */\n\n/**\n * Given a `node` and its ancestors, determine if `node` is matched\n * by `selector`.\n * @param {?external:AST} node\n * @param {?SelectorAST} selector\n * @param {external:AST[]} [ancestry=[]]\n * @param {ESQueryOptions} [options]\n * @throws {Error} Unknowns (operator, class name, selector type, or\n * selector value type)\n * @returns {boolean}\n */\nfunction matches(node, selector, ancestry, options) {\n if (!selector) { return true; }\n if (!node) { return false; }\n if (!ancestry) { ancestry = []; }\n\n return getMatcher(selector)(node, ancestry, options);\n}\n\n/**\n * Get visitor keys of a given node.\n * @param {external:AST} node The AST node to get keys.\n * @param {ESQueryOptions|undefined} options\n * @returns {string[]} Visitor keys of the node.\n */\nfunction getVisitorKeys(node, options) {\n const nodeTypeKey = (options && options.nodeTypeKey) || 'type';\n\n const nodeType = node[nodeTypeKey];\n if (options && options.visitorKeys && options.visitorKeys[nodeType]) {\n return options.visitorKeys[nodeType];\n }\n if (estraverse.VisitorKeys[nodeType]) {\n return estraverse.VisitorKeys[nodeType];\n }\n if (options && typeof options.fallback === 'function') {\n return options.fallback(node);\n }\n // 'iteration' fallback\n return Object.keys(node).filter(function (key) {\n return key !== nodeTypeKey;\n });\n}\n\n\n/**\n * Check whether the given value is an ASTNode or not.\n * @param {any} node The value to check.\n * @param {ESQueryOptions|undefined} options The options to use.\n * @returns {boolean} `true` if the value is an ASTNode.\n */\nfunction isNode(node, options) {\n const nodeTypeKey = (options && options.nodeTypeKey) || 'type';\n return node !== null && typeof node === 'object' && typeof node[nodeTypeKey] === 'string';\n}\n\n/**\n * Determines if the given node has a sibling that matches the\n * given selector matcher.\n * @param {external:AST} node\n * @param {SelectorMatcher} matcher\n * @param {external:AST[]} ancestry\n * @param {Side} side\n * @param {ESQueryOptions|undefined} options\n * @returns {boolean}\n */\nfunction sibling(node, matcher, ancestry, side, options) {\n const [parent] = ancestry;\n if (!parent) { return false; }\n const keys = getVisitorKeys(parent, options);\n for (let i = 0; i < keys.length; ++i) {\n const listProp = parent[keys[i]];\n if (Array.isArray(listProp)) {\n const startIndex = listProp.indexOf(node);\n if (startIndex < 0) { continue; }\n let lowerBound, upperBound;\n if (side === LEFT_SIDE) {\n lowerBound = 0;\n upperBound = startIndex;\n } else {\n lowerBound = startIndex + 1;\n upperBound = listProp.length;\n }\n for (let k = lowerBound; k < upperBound; ++k) {\n if (isNode(listProp[k], options) && matcher(listProp[k], ancestry, options)) {\n return true;\n }\n }\n }\n }\n return false;\n}\n\n/**\n * Determines if the given node has an adjacent sibling that matches\n * the given selector matcher.\n * @param {external:AST} node\n * @param {SelectorMatcher} matcher\n * @param {external:AST[]} ancestry\n * @param {Side} side\n * @param {ESQueryOptions|undefined} options\n * @returns {boolean}\n */\nfunction adjacent(node, matcher, ancestry, side, options) {\n const [parent] = ancestry;\n if (!parent) { return false; }\n const keys = getVisitorKeys(parent, options);\n for (let i = 0; i < keys.length; ++i) {\n const listProp = parent[keys[i]];\n if (Array.isArray(listProp)) {\n const idx = listProp.indexOf(node);\n if (idx < 0) { continue; }\n if (side === LEFT_SIDE && idx > 0 && isNode(listProp[idx - 1], options) && matcher(listProp[idx - 1], ancestry, options)) {\n return true;\n }\n if (side === RIGHT_SIDE && idx < listProp.length - 1 && isNode(listProp[idx + 1], options) && matcher(listProp[idx + 1], ancestry, options)) {\n return true;\n }\n }\n }\n return false;\n}\n\n/**\n * Determines if the given node is the `nth` child.\n * If `nth` is negative then the position is counted\n * from the end of the list of children.\n * @param {external:AST} node\n * @param {external:AST[]} ancestry\n * @param {Integer} nth\n * @param {ESQueryOptions|undefined} options\n * @returns {boolean}\n */\nfunction nthChild(node, ancestry, nth, options) {\n if (nth === 0) { return false; }\n const [parent] = ancestry;\n if (!parent) { return false; }\n const keys = getVisitorKeys(parent, options);\n for (let i = 0; i < keys.length; ++i) {\n const listProp = parent[keys[i]];\n if (Array.isArray(listProp)){\n const idx = nth < 0 ? listProp.length + nth : nth - 1;\n if (idx >= 0 && idx < listProp.length && listProp[idx] === node) {\n return true;\n }\n }\n }\n return false;\n}\n\n/**\n * For each selector node marked as a subject, find the portion of the\n * selector that the subject must match.\n * @param {SelectorAST} selector\n * @param {SelectorAST} [ancestor] Defaults to `selector`\n * @returns {SelectorAST[]}\n */\nfunction subjects(selector, ancestor) {\n if (selector == null || typeof selector != 'object') { return []; }\n if (ancestor == null) { ancestor = selector; }\n const results = selector.subject ? [ancestor] : [];\n const keys = Object.keys(selector);\n for (let i = 0; i < keys.length; ++i) {\n const p = keys[i];\n const sel = selector[p];\n results.push(...subjects(sel, p === 'left' ? sel : ancestor));\n }\n return results;\n}\n\n/**\n* @callback TraverseVisitor\n* @param {?external:AST} node\n* @param {?external:AST} parent\n* @param {external:AST[]} ancestry\n*/\n\n/**\n * From a JS AST and a selector AST, collect all JS AST nodes that\n * match the selector.\n * @param {external:AST} ast\n * @param {?SelectorAST} selector\n * @param {TraverseVisitor} visitor\n * @param {ESQueryOptions} [options]\n * @returns {external:AST[]}\n */\nfunction traverse(ast, selector, visitor, options) {\n if (!selector) { return; }\n const ancestry = [];\n const matcher = getMatcher(selector);\n const altSubjects = subjects(selector).map(getMatcher);\n estraverse.traverse(ast, {\n enter (node, parent) {\n if (parent != null) { ancestry.unshift(parent); }\n if (matcher(node, ancestry, options)) {\n if (altSubjects.length) {\n for (let i = 0, l = altSubjects.length; i < l; ++i) {\n if (altSubjects[i](node, ancestry, options)) {\n visitor(node, parent, ancestry);\n }\n for (let k = 0, m = ancestry.length; k < m; ++k) {\n const succeedingAncestry = ancestry.slice(k + 1);\n if (altSubjects[i](ancestry[k], succeedingAncestry, options)) {\n visitor(ancestry[k], parent, succeedingAncestry);\n }\n }\n }\n } else {\n visitor(node, parent, ancestry);\n }\n }\n },\n leave () { ancestry.shift(); },\n keys: options && options.visitorKeys,\n fallback: options && options.fallback || 'iteration'\n });\n}\n\n\n/**\n * From a JS AST and a selector AST, collect all JS AST nodes that\n * match the selector.\n * @param {external:AST} ast\n * @param {?SelectorAST} selector\n * @param {ESQueryOptions} [options]\n * @returns {external:AST[]}\n */\nfunction match(ast, selector, options) {\n const results = [];\n traverse(ast, selector, function (node) {\n results.push(node);\n }, options);\n return results;\n}\n\n/**\n * Parse a selector string and return its AST.\n * @param {string} selector\n * @returns {SelectorAST}\n */\nfunction parse(selector) {\n return parser.parse(selector);\n}\n\n/**\n * Query the code AST using the selector string.\n * @param {external:AST} ast\n * @param {string} selector\n * @param {ESQueryOptions} [options]\n * @returns {external:AST[]}\n */\nfunction query(ast, selector, options) {\n return match(ast, parse(selector), options);\n}\n\nquery.parse = parse;\nquery.match = match;\nquery.traverse = traverse;\nquery.matches = matches;\nquery.query = query;\n\nexport default query;\n"],"names":["clone","exports","Syntax","VisitorOption","VisitorKeys","BREAK","SKIP","REMOVE","deepCopy","obj","key","val","ret","hasOwnProperty","Reference","parent","this","Element","node","path","wrap","ref","Controller","isNode","type","isProperty","nodeType","ObjectExpression","ObjectPattern","candidateExistsInLeaveList","leavelist","candidate","i","length","traverse","root","visitor","extendCommentRange","comment","tokens","target","array","func","diff","len","current","upperBound","token","range","extendedRange","AssignmentExpression","AssignmentPattern","ArrayExpression","ArrayPattern","ArrowFunctionExpression","AwaitExpression","BlockStatement","BinaryExpression","BreakStatement","CallExpression","CatchClause","ChainExpression","ClassBody","ClassDeclaration","ClassExpression","ComprehensionBlock","ComprehensionExpression","ConditionalExpression","ContinueStatement","DebuggerStatement","DirectiveStatement","DoWhileStatement","EmptyStatement","ExportAllDeclaration","ExportDefaultDeclaration","ExportNamedDeclaration","ExportSpecifier","ExpressionStatement","ForStatement","ForInStatement","ForOfStatement","FunctionDeclaration","FunctionExpression","GeneratorExpression","Identifier","IfStatement","ImportExpression","ImportDeclaration","ImportDefaultSpecifier","ImportNamespaceSpecifier","ImportSpecifier","Literal","LabeledStatement","LogicalExpression","MemberExpression","MetaProperty","MethodDefinition","ModuleSpecifier","NewExpression","PrivateIdentifier","Program","Property","PropertyDefinition","RestElement","ReturnStatement","SequenceExpression","SpreadElement","Super","SwitchStatement","SwitchCase","TaggedTemplateExpression","TemplateElement","TemplateLiteral","ThisExpression","ThrowStatement","TryStatement","UnaryExpression","UpdateExpression","VariableDeclaration","VariableDeclarator","WhileStatement","WithStatement","YieldExpression","Break","Skip","Remove","prototype","replace","remove","Array","isArray","splice","iz","j","jz","result","addToPath","push","__current","__leavelist","parents","__execute","callback","element","previous","undefined","__state","call","notify","flag","skip","__initialize","__worklist","__fallback","fallback","Object","keys","__keys","assign","create","worklist","current2","candidates","sentinel","pop","enter","Error","leave","outer","removeElem","nextElem","attachComments","tree","providedComments","cursor","comments","leadingComments","trailingComments","cloneEnvironment","module","peg$SyntaxError","message","expected","found","location","name","captureStackTrace","child","ctor","constructor","peg$subclass","buildMessage","DESCRIBE_EXPECTATION_FNS","literal","expectation","literalEscape","text","class","escapedParts","parts","classEscape","inverted","any","end","other","description","hex","ch","charCodeAt","toString","toUpperCase","s","descriptions","sort","slice","join","describeExpected","describeFound","SyntaxError","parse","input","options","peg$result","peg$FAILED","peg$startRuleFunctions","start","peg$parsestart","peg$startRuleFunction","peg$c3","peg$literalExpectation","peg$c4","peg$c5","peg$classExpectation","peg$c8","peg$c11","peg$c14","peg$c18","peg$c22","peg$c25","peg$c28","peg$c31","peg$c33","peg$c35","peg$c36","peg$c38","peg$c39","a","peg$c40","peg$c41","peg$c43","peg$c45","op","value","operator","peg$c48","peg$c49","peg$c50","peg$c52","peg$c53","peg$c54","b","peg$c55","d","match","peg$c57","peg$c58","peg$c59","peg$c60","peg$c61","peg$c65","peg$c66","peg$c67","peg$c69","peg$c71","peg$c72","peg$c74","peg$c75","peg$c76","peg$c80","peg$c83","peg$c86","peg$c89","peg$c92","peg$c95","peg$c98","peg$c101","peg$currPos","peg$posDetailsCache","line","column","peg$maxFailPos","peg$maxFailExpected","peg$silentFails","startRule","ignoreCase","peg$computePosDetails","pos","p","details","peg$computeLocation","startPos","endPos","startPosDetails","endPosDetails","offset","peg$fail","s0","s1","s2","ss","cached","peg$resultsCache","nextPos","peg$parse_","peg$parseselectors","selectors","peg$c1","peg$parseidentifierName","test","charAt","peg$parsebinaryOp","s3","s4","s5","s6","s7","peg$parseselector","concat","map","peg$parsesequence","reduce","memo","rhs","left","right","subject","as","peg$parseatom","peg$parsewildcard","peg$parseidentifier","peg$parseattrName","peg$parseattrEqOps","substr","peg$parsetype","flgs","peg$parseflags","RegExp","peg$parseregex","peg$parseattrOps","peg$parsestring","leadingDecimals","apply","parseFloat","peg$parsenumber","peg$parsepath","peg$parseattrValue","peg$parseattr","peg$parsefield","peg$parsenegation","peg$parsematches","peg$parsehas","nth","peg$parsefirstChild","nthLast","peg$parselastChild","parseInt","peg$parsenthChild","peg$parsenthLastChild","peg$parseclass","n","index","factory","getPath","MATCHER_CACHE","WeakMap","getMatcher","selector","matcher","get","generateMatcher","set","toLowerCase","ancestry","nodeTypeKey","split","inPath","ancestor","fromPathIndex","field","k","matchers","estraverse","unshift","shift","visitorKeys","l","sibling","adjacent","nthChild","matchClass","getVisitorKeys","filter","_typeof","side","listProp","startIndex","indexOf","lowerBound","idx","ast","altSubjects","subjects","results","sel","m","succeedingAncestry","parser","query","matches"],"mappings":"qgEA2BC,SAASA,EAAMC,GAGZ,IAAIC,EACAC,EACAC,EACAC,EACAC,EACAC,EAEJ,SAASC,EAASC,GACd,IAAcC,EAAKC,EAAfC,EAAM,GACV,IAAKF,KAAOD,EACJA,EAAII,eAAeH,KACnBC,EAAMF,EAAIC,GAENE,EAAIF,GADW,iBAARC,GAA4B,OAARA,EAChBH,EAASG,GAETA,GAIvB,OAAOC,E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