(function (global, factory) { typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : typeof define === 'function' && define.amd ? define(['exports'], factory) : (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.Babel = {})); })(this, (function (exports) { 'use strict'; var _babel = /*#__PURE__*/Object.freeze({ __proto__: null, get version () { return version$3; }, get types () { return t$8; }, get DEFAULT_EXTENSIONS () { return DEFAULT_EXTENSIONS; }, get OptionManager () { return OptionManager; }, get Plugin () { return Plugin; }, get File () { return File; }, get buildExternalHelpers () { return babelBuildExternalHelpers; }, get resolvePlugin () { return resolvePlugin; }, get resolvePreset () { return resolvePreset; }, get getEnv () { return getEnv; }, get tokTypes () { return tokTypes; }, get traverse () { return traverse; }, get template () { return template$2; }, get createConfigItem () { return createConfigItem; }, get createConfigItemSync () { return createConfigItemSync; }, get createConfigItemAsync () { return createConfigItemAsync; }, get loadPartialConfig () { return loadPartialConfig; }, get loadPartialConfigSync () { return loadPartialConfigSync; }, get loadPartialConfigAsync () { return loadPartialConfigAsync; }, get loadOptions () { return loadOptions; }, get loadOptionsSync () { return loadOptionsSync; }, get loadOptionsAsync () { return loadOptionsAsync; }, get transform () { return transform$3; }, get transformSync () { return transformSync; }, get transformAsync () { return transformAsync; }, get transformFile () { return transformFile; }, get transformFileSync () { return transformFileSync; }, get transformFileAsync () { return transformFileAsync; }, get transformFromAst () { return transformFromAst$1; }, get transformFromAstSync () { return transformFromAstSync; }, get transformFromAstAsync () { return transformFromAstAsync; }, get parse () { return parse$1; }, get parseSync () { return parseSync; }, get parseAsync () { return parseAsync; } }); function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } } function _regeneratorRuntime() { _regeneratorRuntime = function () { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, defineProperty = Object.defineProperty || function (obj, key, desc) { obj[key] = desc.value; }, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function (obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return defineProperty(generator, "_invoke", { value: makeInvokeMethod(innerFn, self, context) }), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == typeof value && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; defineProperty(this, "_invoke", { value: function (method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; } function maybeInvokeDelegate(delegate, context) { var methodName = context.method, method = delegate.iterator[methodName]; if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel; var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), defineProperty(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (val) { var object = Object(val), keys = []; for (var key in object) keys.push(key); return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function (skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); }, stop: function () { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function (exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function (type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function (record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function (finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, catch: function (tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function (iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; } function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } } function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; } function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); } function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } function _construct(Parent, args, Class) { if (_isNativeReflectConstruct()) { _construct = Reflect.construct.bind(); } else { _construct = function _construct(Parent, args, Class) { var a = [null]; a.push.apply(a, args); var Constructor = Function.bind.apply(Parent, a); var instance = new Constructor(); if (Class) _setPrototypeOf(instance, Class.prototype); return instance; }; } return _construct.apply(null, arguments); } function _isNativeFunction(fn) { return Function.toString.call(fn).indexOf("[native code]") !== -1; } function _wrapNativeSuper(Class) { var _cache = typeof Map === "function" ? new Map() : undefined; _wrapNativeSuper = function _wrapNativeSuper(Class) { if (Class === null || !_isNativeFunction(Class)) return Class; if (typeof Class !== "function") { throw new TypeError("Super expression must either be null or a function"); } if (typeof _cache !== "undefined") { if (_cache.has(Class)) return _cache.get(Class); _cache.set(Class, Wrapper); } function Wrapper() { return _construct(Class, arguments, _getPrototypeOf(this).constructor); } Wrapper.prototype = Object.create(Class.prototype, { constructor: { value: Wrapper, enumerable: false, writable: true, configurable: true } }); return _setPrototypeOf(Wrapper, Class); }; return _wrapNativeSuper(Class); } function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; } function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; } function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } function _taggedTemplateLiteralLoose(strings, raw) { if (!raw) { raw = strings.slice(0); } strings.raw = raw; return strings; } function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); } function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); } function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); } function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); } function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; } function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } function _createForOfIteratorHelperLoose(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (it) return (it = it.call(o)).next.bind(it); if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; return function () { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); } function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); } var ReferencedIdentifier$1 = ["Identifier", "JSXIdentifier"]; var ReferencedMemberExpression = ["MemberExpression"]; var BindingIdentifier = ["Identifier"]; var Statement = ["Statement"]; var Expression = ["Expression"]; var Scope$2 = ["Scopable", "Pattern"]; var Referenced = null; var BlockScoped = null; var Var = ["VariableDeclaration"]; var User = null; var Generated = null; var Pure = null; var Flow = ["Flow", "ImportDeclaration", "ExportDeclaration", "ImportSpecifier"]; var RestProperty$1 = ["RestElement"]; var SpreadProperty$1 = ["RestElement"]; var ExistentialTypeParam = ["ExistsTypeAnnotation"]; var NumericLiteralTypeAnnotation = ["NumberLiteralTypeAnnotation"]; var ForAwaitStatement = ["ForOfStatement"]; var virtualTypes = /*#__PURE__*/Object.freeze({ __proto__: null, ReferencedIdentifier: ReferencedIdentifier$1, ReferencedMemberExpression: ReferencedMemberExpression, BindingIdentifier: BindingIdentifier, Statement: Statement, Expression: Expression, Scope: Scope$2, Referenced: Referenced, BlockScoped: BlockScoped, Var: Var, User: User, Generated: Generated, Pure: Pure, Flow: Flow, RestProperty: RestProperty$1, SpreadProperty: SpreadProperty$1, ExistentialTypeParam: ExistentialTypeParam, NumericLiteralTypeAnnotation: NumericLiteralTypeAnnotation, ForAwaitStatement: ForAwaitStatement }); function shallowEqual$2(actual, expected) { var keys = Object.keys(expected); for (var _i = 0, _keys = keys; _i < _keys.length; _i++) { var key = _keys[_i]; if (actual[key] !== expected[key]) { return false; } } return true; } var warnings = new Set(); function deprecationWarning$1(oldName, newName, prefix) { if (prefix === void 0) { prefix = ""; } if (warnings.has(oldName)) return; warnings.add(oldName); var stack = captureShortStackTrace(1, 2); console.warn(prefix + "`" + oldName + "` has been deprecated, please migrate to `" + newName + "`\n" + stack); } function captureShortStackTrace(skip, length) { var stackTraceLimit = Error.stackTraceLimit, prepareStackTrace = Error.prepareStackTrace; var stackTrace; Error.stackTraceLimit = 1 + skip + length; Error.prepareStackTrace = function (err, stack) { stackTrace = stack; }; new Error().stack; Error.stackTraceLimit = stackTraceLimit; Error.prepareStackTrace = prepareStackTrace; return stackTrace.slice(1 + skip, 1 + skip + length).map(function (frame) { return " at " + frame; }).join("\n"); } function isArrayExpression$2(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "ArrayExpression") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isAssignmentExpression$4(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "AssignmentExpression") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isBinaryExpression$1(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "BinaryExpression") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isInterpreterDirective(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "InterpreterDirective") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isDirective(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "Directive") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isDirectiveLiteral(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "DirectiveLiteral") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isBlockStatement$2(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "BlockStatement") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isBreakStatement(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "BreakStatement") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isCallExpression$8(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "CallExpression") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isCatchClause(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "CatchClause") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isConditionalExpression$1(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "ConditionalExpression") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isContinueStatement(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "ContinueStatement") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isDebuggerStatement(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "DebuggerStatement") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isDoWhileStatement(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "DoWhileStatement") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isEmptyStatement(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "EmptyStatement") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isExpressionStatement$3(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "ExpressionStatement") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isFile(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "File") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isForInStatement$1(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "ForInStatement") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isForStatement$3(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "ForStatement") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isFunctionDeclaration$2(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "FunctionDeclaration") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isFunctionExpression$1(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "FunctionExpression") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isIdentifier$j(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "Identifier") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isIfStatement$2(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "IfStatement") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isLabeledStatement(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "LabeledStatement") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isStringLiteral$6(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "StringLiteral") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isNumericLiteral(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "NumericLiteral") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isNullLiteral$2(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "NullLiteral") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isBooleanLiteral(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "BooleanLiteral") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isRegExpLiteral$2(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "RegExpLiteral") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isLogicalExpression$1(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "LogicalExpression") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isMemberExpression$8(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "MemberExpression") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isNewExpression$4(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "NewExpression") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isProgram$1(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "Program") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isObjectExpression$3(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "ObjectExpression") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isObjectMethod$1(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "ObjectMethod") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isObjectProperty$5(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "ObjectProperty") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isRestElement$3(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "RestElement") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isReturnStatement$1(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "ReturnStatement") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isSequenceExpression$2(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "SequenceExpression") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isParenthesizedExpression$1(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "ParenthesizedExpression") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isSwitchCase(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "SwitchCase") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isSwitchStatement$1(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "SwitchStatement") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isThisExpression$2(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "ThisExpression") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isThrowStatement$1(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "ThrowStatement") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isTryStatement(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "TryStatement") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isUnaryExpression$1(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "UnaryExpression") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isUpdateExpression$2(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "UpdateExpression") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isVariableDeclaration$3(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "VariableDeclaration") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isVariableDeclarator$2(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "VariableDeclarator") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isWhileStatement$1(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "WhileStatement") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isWithStatement(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "WithStatement") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isAssignmentPattern$5(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "AssignmentPattern") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isArrayPattern$1(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "ArrayPattern") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isArrowFunctionExpression$1(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "ArrowFunctionExpression") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isClassBody$2(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "ClassBody") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isClassExpression$1(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "ClassExpression") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isClassDeclaration$2(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "ClassDeclaration") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isExportAllDeclaration$1(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "ExportAllDeclaration") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isExportDefaultDeclaration$3(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "ExportDefaultDeclaration") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isExportNamedDeclaration$3(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "ExportNamedDeclaration") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isExportSpecifier(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "ExportSpecifier") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isForOfStatement$2(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "ForOfStatement") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isImportDeclaration$2(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "ImportDeclaration") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isImportDefaultSpecifier$1(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "ImportDefaultSpecifier") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isImportNamespaceSpecifier$1(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "ImportNamespaceSpecifier") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isImportSpecifier$1(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "ImportSpecifier") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isMetaProperty$1(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "MetaProperty") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isClassMethod(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "ClassMethod") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isObjectPattern$2(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "ObjectPattern") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isSpreadElement$1(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "SpreadElement") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isSuper$3(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "Super") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isTaggedTemplateExpression$2(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "TaggedTemplateExpression") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isTemplateElement(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "TemplateElement") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isTemplateLiteral$2(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "TemplateLiteral") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isYieldExpression$1(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "YieldExpression") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isAwaitExpression$1(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "AwaitExpression") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isImport(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "Import") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isBigIntLiteral(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "BigIntLiteral") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isExportNamespaceSpecifier$1(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "ExportNamespaceSpecifier") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isOptionalMemberExpression$3(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "OptionalMemberExpression") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isOptionalCallExpression$3(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "OptionalCallExpression") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isClassProperty(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "ClassProperty") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isClassAccessorProperty(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "ClassAccessorProperty") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isClassPrivateProperty(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "ClassPrivateProperty") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isClassPrivateMethod(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "ClassPrivateMethod") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isPrivateName$3(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "PrivateName") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isStaticBlock(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "StaticBlock") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isAnyTypeAnnotation$1(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "AnyTypeAnnotation") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isArrayTypeAnnotation$2(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "ArrayTypeAnnotation") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isBooleanTypeAnnotation$1(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "BooleanTypeAnnotation") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isBooleanLiteralTypeAnnotation(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "BooleanLiteralTypeAnnotation") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isNullLiteralTypeAnnotation(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "NullLiteralTypeAnnotation") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isClassImplements(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "ClassImplements") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isDeclareClass(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "DeclareClass") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isDeclareFunction(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "DeclareFunction") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isDeclareInterface(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "DeclareInterface") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isDeclareModule(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "DeclareModule") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isDeclareModuleExports(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "DeclareModuleExports") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isDeclareTypeAlias(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "DeclareTypeAlias") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isDeclareOpaqueType(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "DeclareOpaqueType") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isDeclareVariable(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "DeclareVariable") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isDeclareExportDeclaration$1(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "DeclareExportDeclaration") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isDeclareExportAllDeclaration(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "DeclareExportAllDeclaration") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isDeclaredPredicate(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "DeclaredPredicate") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isExistsTypeAnnotation(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "ExistsTypeAnnotation") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isFunctionTypeAnnotation(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "FunctionTypeAnnotation") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isFunctionTypeParam(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "FunctionTypeParam") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isGenericTypeAnnotation$1(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "GenericTypeAnnotation") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isInferredPredicate(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "InferredPredicate") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isInterfaceExtends(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "InterfaceExtends") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isInterfaceDeclaration(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "InterfaceDeclaration") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isInterfaceTypeAnnotation(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "InterfaceTypeAnnotation") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isIntersectionTypeAnnotation$1(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "IntersectionTypeAnnotation") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isMixedTypeAnnotation$1(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "MixedTypeAnnotation") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isEmptyTypeAnnotation$1(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "EmptyTypeAnnotation") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isNullableTypeAnnotation$1(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "NullableTypeAnnotation") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isNumberLiteralTypeAnnotation(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "NumberLiteralTypeAnnotation") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isNumberTypeAnnotation$1(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "NumberTypeAnnotation") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isObjectTypeAnnotation(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "ObjectTypeAnnotation") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isObjectTypeInternalSlot(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "ObjectTypeInternalSlot") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isObjectTypeCallProperty(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "ObjectTypeCallProperty") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isObjectTypeIndexer(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "ObjectTypeIndexer") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isObjectTypeProperty(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "ObjectTypeProperty") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isObjectTypeSpreadProperty(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "ObjectTypeSpreadProperty") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isOpaqueType(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "OpaqueType") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isQualifiedTypeIdentifier(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "QualifiedTypeIdentifier") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isStringLiteralTypeAnnotation(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "StringLiteralTypeAnnotation") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isStringTypeAnnotation$1(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "StringTypeAnnotation") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isSymbolTypeAnnotation(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "SymbolTypeAnnotation") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isThisTypeAnnotation(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "ThisTypeAnnotation") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isTupleTypeAnnotation$1(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "TupleTypeAnnotation") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isTypeofTypeAnnotation(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "TypeofTypeAnnotation") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isTypeAlias(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "TypeAlias") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isTypeAnnotation$2(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "TypeAnnotation") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isTypeCastExpression$1(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "TypeCastExpression") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isTypeParameter(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "TypeParameter") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isTypeParameterDeclaration(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "TypeParameterDeclaration") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isTypeParameterInstantiation(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "TypeParameterInstantiation") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isUnionTypeAnnotation$2(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "UnionTypeAnnotation") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isVariance(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "Variance") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isVoidTypeAnnotation$1(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "VoidTypeAnnotation") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isEnumDeclaration(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "EnumDeclaration") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isEnumBooleanBody(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "EnumBooleanBody") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isEnumNumberBody(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "EnumNumberBody") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isEnumStringBody(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "EnumStringBody") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isEnumSymbolBody(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "EnumSymbolBody") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isEnumBooleanMember(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "EnumBooleanMember") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isEnumNumberMember(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "EnumNumberMember") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isEnumStringMember(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "EnumStringMember") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isEnumDefaultedMember(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "EnumDefaultedMember") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isIndexedAccessType$1(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "IndexedAccessType") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isOptionalIndexedAccessType(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "OptionalIndexedAccessType") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isJSXAttribute(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "JSXAttribute") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isJSXClosingElement(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "JSXClosingElement") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isJSXElement(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "JSXElement") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isJSXEmptyExpression(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "JSXEmptyExpression") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isJSXExpressionContainer$1(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "JSXExpressionContainer") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isJSXSpreadChild(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "JSXSpreadChild") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isJSXIdentifier$3(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "JSXIdentifier") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isJSXMemberExpression$2(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "JSXMemberExpression") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isJSXNamespacedName$1(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "JSXNamespacedName") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isJSXOpeningElement(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "JSXOpeningElement") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isJSXSpreadAttribute$1(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "JSXSpreadAttribute") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isJSXText(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "JSXText") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isJSXFragment(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "JSXFragment") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isJSXOpeningFragment(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "JSXOpeningFragment") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isJSXClosingFragment(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "JSXClosingFragment") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isNoop(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "Noop") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isPlaceholder$1(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "Placeholder") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isV8IntrinsicIdentifier(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "V8IntrinsicIdentifier") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isArgumentPlaceholder(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "ArgumentPlaceholder") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isBindExpression(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "BindExpression") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isImportAttribute(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "ImportAttribute") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isDecorator(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "Decorator") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isDoExpression(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "DoExpression") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isExportDefaultSpecifier$1(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "ExportDefaultSpecifier") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isRecordExpression$1(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "RecordExpression") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isTupleExpression$1(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "TupleExpression") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isDecimalLiteral(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "DecimalLiteral") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isModuleExpression(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "ModuleExpression") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isTopicReference$1(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "TopicReference") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isPipelineTopicExpression(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "PipelineTopicExpression") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isPipelineBareFunction(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "PipelineBareFunction") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isPipelinePrimaryTopicReference(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "PipelinePrimaryTopicReference") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isTSParameterProperty(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "TSParameterProperty") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isTSDeclareFunction(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "TSDeclareFunction") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isTSDeclareMethod(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "TSDeclareMethod") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isTSQualifiedName(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "TSQualifiedName") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isTSCallSignatureDeclaration(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "TSCallSignatureDeclaration") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isTSConstructSignatureDeclaration(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "TSConstructSignatureDeclaration") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isTSPropertySignature(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "TSPropertySignature") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isTSMethodSignature(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "TSMethodSignature") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isTSIndexSignature(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "TSIndexSignature") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isTSAnyKeyword(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "TSAnyKeyword") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isTSBooleanKeyword(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "TSBooleanKeyword") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isTSBigIntKeyword(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "TSBigIntKeyword") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isTSIntrinsicKeyword(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "TSIntrinsicKeyword") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isTSNeverKeyword(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "TSNeverKeyword") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isTSNullKeyword(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "TSNullKeyword") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isTSNumberKeyword(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "TSNumberKeyword") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isTSObjectKeyword(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "TSObjectKeyword") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isTSStringKeyword(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "TSStringKeyword") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isTSSymbolKeyword(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "TSSymbolKeyword") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isTSUndefinedKeyword(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "TSUndefinedKeyword") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isTSUnknownKeyword(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "TSUnknownKeyword") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isTSVoidKeyword(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "TSVoidKeyword") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isTSThisType(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "TSThisType") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isTSFunctionType(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "TSFunctionType") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isTSConstructorType(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "TSConstructorType") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isTSTypeReference$1(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "TSTypeReference") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isTSTypePredicate(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "TSTypePredicate") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isTSTypeQuery(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "TSTypeQuery") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isTSTypeLiteral(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "TSTypeLiteral") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isTSArrayType$2(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "TSArrayType") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isTSTupleType(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "TSTupleType") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isTSOptionalType$1(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "TSOptionalType") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isTSRestType$1(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "TSRestType") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isTSNamedTupleMember(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "TSNamedTupleMember") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isTSUnionType$1(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "TSUnionType") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isTSIntersectionType$1(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "TSIntersectionType") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isTSConditionalType(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "TSConditionalType") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isTSInferType(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "TSInferType") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isTSParenthesizedType(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "TSParenthesizedType") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isTSTypeOperator(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "TSTypeOperator") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isTSIndexedAccessType(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "TSIndexedAccessType") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isTSMappedType(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "TSMappedType") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isTSLiteralType(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "TSLiteralType") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isTSExpressionWithTypeArguments(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "TSExpressionWithTypeArguments") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isTSInterfaceDeclaration(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "TSInterfaceDeclaration") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isTSInterfaceBody$1(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "TSInterfaceBody") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isTSTypeAliasDeclaration(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "TSTypeAliasDeclaration") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isTSInstantiationExpression$1(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "TSInstantiationExpression") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isTSAsExpression$2(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "TSAsExpression") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isTSSatisfiesExpression$2(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "TSSatisfiesExpression") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isTSTypeAssertion$2(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "TSTypeAssertion") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isTSEnumDeclaration$1(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "TSEnumDeclaration") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isTSEnumMember(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "TSEnumMember") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isTSModuleDeclaration(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "TSModuleDeclaration") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isTSModuleBlock(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "TSModuleBlock") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isTSImportType(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "TSImportType") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isTSImportEqualsDeclaration(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "TSImportEqualsDeclaration") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isTSExternalModuleReference(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "TSExternalModuleReference") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isTSNonNullExpression$2(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "TSNonNullExpression") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isTSExportAssignment(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "TSExportAssignment") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isTSNamespaceExportDeclaration(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "TSNamespaceExportDeclaration") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isTSTypeAnnotation$1(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "TSTypeAnnotation") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isTSTypeParameterInstantiation(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "TSTypeParameterInstantiation") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isTSTypeParameterDeclaration(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "TSTypeParameterDeclaration") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isTSTypeParameter(node, opts) { if (!node) return false; var nodeType = node.type; if (nodeType === "TSTypeParameter") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isStandardized(node, opts) { if (!node) return false; var nodeType = node.type; if ("ArrayExpression" === nodeType || "AssignmentExpression" === nodeType || "BinaryExpression" === nodeType || "InterpreterDirective" === nodeType || "Directive" === nodeType || "DirectiveLiteral" === nodeType || "BlockStatement" === nodeType || "BreakStatement" === nodeType || "CallExpression" === nodeType || "CatchClause" === nodeType || "ConditionalExpression" === nodeType || "ContinueStatement" === nodeType || "DebuggerStatement" === nodeType || "DoWhileStatement" === nodeType || "EmptyStatement" === nodeType || "ExpressionStatement" === nodeType || "File" === nodeType || "ForInStatement" === nodeType || "ForStatement" === nodeType || "FunctionDeclaration" === nodeType || "FunctionExpression" === nodeType || "Identifier" === nodeType || "IfStatement" === nodeType || "LabeledStatement" === nodeType || "StringLiteral" === nodeType || "NumericLiteral" === nodeType || "NullLiteral" === nodeType || "BooleanLiteral" === nodeType || "RegExpLiteral" === nodeType || "LogicalExpression" === nodeType || "MemberExpression" === nodeType || "NewExpression" === nodeType || "Program" === nodeType || "ObjectExpression" === nodeType || "ObjectMethod" === nodeType || "ObjectProperty" === nodeType || "RestElement" === nodeType || "ReturnStatement" === nodeType || "SequenceExpression" === nodeType || "ParenthesizedExpression" === nodeType || "SwitchCase" === nodeType || "SwitchStatement" === nodeType || "ThisExpression" === nodeType || "ThrowStatement" === nodeType || "TryStatement" === nodeType || "UnaryExpression" === nodeType || "UpdateExpression" === nodeType || "VariableDeclaration" === nodeType || "VariableDeclarator" === nodeType || "WhileStatement" === nodeType || "WithStatement" === nodeType || "AssignmentPattern" === nodeType || "ArrayPattern" === nodeType || "ArrowFunctionExpression" === nodeType || "ClassBody" === nodeType || "ClassExpression" === nodeType || "ClassDeclaration" === nodeType || "ExportAllDeclaration" === nodeType || "ExportDefaultDeclaration" === nodeType || "ExportNamedDeclaration" === nodeType || "ExportSpecifier" === nodeType || "ForOfStatement" === nodeType || "ImportDeclaration" === nodeType || "ImportDefaultSpecifier" === nodeType || "ImportNamespaceSpecifier" === nodeType || "ImportSpecifier" === nodeType || "MetaProperty" === nodeType || "ClassMethod" === nodeType || "ObjectPattern" === nodeType || "SpreadElement" === nodeType || "Super" === nodeType || "TaggedTemplateExpression" === nodeType || "TemplateElement" === nodeType || "TemplateLiteral" === nodeType || "YieldExpression" === nodeType || "AwaitExpression" === nodeType || "Import" === nodeType || "BigIntLiteral" === nodeType || "ExportNamespaceSpecifier" === nodeType || "OptionalMemberExpression" === nodeType || "OptionalCallExpression" === nodeType || "ClassProperty" === nodeType || "ClassAccessorProperty" === nodeType || "ClassPrivateProperty" === nodeType || "ClassPrivateMethod" === nodeType || "PrivateName" === nodeType || "StaticBlock" === nodeType || nodeType === "Placeholder" && ("Identifier" === node.expectedNode || "StringLiteral" === node.expectedNode || "BlockStatement" === node.expectedNode || "ClassBody" === node.expectedNode)) { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isExpression$4(node, opts) { if (!node) return false; var nodeType = node.type; if ("ArrayExpression" === nodeType || "AssignmentExpression" === nodeType || "BinaryExpression" === nodeType || "CallExpression" === nodeType || "ConditionalExpression" === nodeType || "FunctionExpression" === nodeType || "Identifier" === nodeType || "StringLiteral" === nodeType || "NumericLiteral" === nodeType || "NullLiteral" === nodeType || "BooleanLiteral" === nodeType || "RegExpLiteral" === nodeType || "LogicalExpression" === nodeType || "MemberExpression" === nodeType || "NewExpression" === nodeType || "ObjectExpression" === nodeType || "SequenceExpression" === nodeType || "ParenthesizedExpression" === nodeType || "ThisExpression" === nodeType || "UnaryExpression" === nodeType || "UpdateExpression" === nodeType || "ArrowFunctionExpression" === nodeType || "ClassExpression" === nodeType || "MetaProperty" === nodeType || "Super" === nodeType || "TaggedTemplateExpression" === nodeType || "TemplateLiteral" === nodeType || "YieldExpression" === nodeType || "AwaitExpression" === nodeType || "Import" === nodeType || "BigIntLiteral" === nodeType || "OptionalMemberExpression" === nodeType || "OptionalCallExpression" === nodeType || "TypeCastExpression" === nodeType || "JSXElement" === nodeType || "JSXFragment" === nodeType || "BindExpression" === nodeType || "DoExpression" === nodeType || "RecordExpression" === nodeType || "TupleExpression" === nodeType || "DecimalLiteral" === nodeType || "ModuleExpression" === nodeType || "TopicReference" === nodeType || "PipelineTopicExpression" === nodeType || "PipelineBareFunction" === nodeType || "PipelinePrimaryTopicReference" === nodeType || "TSInstantiationExpression" === nodeType || "TSAsExpression" === nodeType || "TSSatisfiesExpression" === nodeType || "TSTypeAssertion" === nodeType || "TSNonNullExpression" === nodeType || nodeType === "Placeholder" && ("Expression" === node.expectedNode || "Identifier" === node.expectedNode || "StringLiteral" === node.expectedNode)) { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isBinary$3(node, opts) { if (!node) return false; var nodeType = node.type; if ("BinaryExpression" === nodeType || "LogicalExpression" === nodeType) { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isScopable(node, opts) { if (!node) return false; var nodeType = node.type; if ("BlockStatement" === nodeType || "CatchClause" === nodeType || "DoWhileStatement" === nodeType || "ForInStatement" === nodeType || "ForStatement" === nodeType || "FunctionDeclaration" === nodeType || "FunctionExpression" === nodeType || "Program" === nodeType || "ObjectMethod" === nodeType || "SwitchStatement" === nodeType || "WhileStatement" === nodeType || "ArrowFunctionExpression" === nodeType || "ClassExpression" === nodeType || "ClassDeclaration" === nodeType || "ForOfStatement" === nodeType || "ClassMethod" === nodeType || "ClassPrivateMethod" === nodeType || "StaticBlock" === nodeType || "TSModuleBlock" === nodeType || nodeType === "Placeholder" && "BlockStatement" === node.expectedNode) { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isBlockParent(node, opts) { if (!node) return false; var nodeType = node.type; if ("BlockStatement" === nodeType || "CatchClause" === nodeType || "DoWhileStatement" === nodeType || "ForInStatement" === nodeType || "ForStatement" === nodeType || "FunctionDeclaration" === nodeType || "FunctionExpression" === nodeType || "Program" === nodeType || "ObjectMethod" === nodeType || "SwitchStatement" === nodeType || "WhileStatement" === nodeType || "ArrowFunctionExpression" === nodeType || "ForOfStatement" === nodeType || "ClassMethod" === nodeType || "ClassPrivateMethod" === nodeType || "StaticBlock" === nodeType || "TSModuleBlock" === nodeType || nodeType === "Placeholder" && "BlockStatement" === node.expectedNode) { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isBlock(node, opts) { if (!node) return false; var nodeType = node.type; if ("BlockStatement" === nodeType || "Program" === nodeType || "TSModuleBlock" === nodeType || nodeType === "Placeholder" && "BlockStatement" === node.expectedNode) { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isStatement$8(node, opts) { if (!node) return false; var nodeType = node.type; if ("BlockStatement" === nodeType || "BreakStatement" === nodeType || "ContinueStatement" === nodeType || "DebuggerStatement" === nodeType || "DoWhileStatement" === nodeType || "EmptyStatement" === nodeType || "ExpressionStatement" === nodeType || "ForInStatement" === nodeType || "ForStatement" === nodeType || "FunctionDeclaration" === nodeType || "IfStatement" === nodeType || "LabeledStatement" === nodeType || "ReturnStatement" === nodeType || "SwitchStatement" === nodeType || "ThrowStatement" === nodeType || "TryStatement" === nodeType || "VariableDeclaration" === nodeType || "WhileStatement" === nodeType || "WithStatement" === nodeType || "ClassDeclaration" === nodeType || "ExportAllDeclaration" === nodeType || "ExportDefaultDeclaration" === nodeType || "ExportNamedDeclaration" === nodeType || "ForOfStatement" === nodeType || "ImportDeclaration" === nodeType || "DeclareClass" === nodeType || "DeclareFunction" === nodeType || "DeclareInterface" === nodeType || "DeclareModule" === nodeType || "DeclareModuleExports" === nodeType || "DeclareTypeAlias" === nodeType || "DeclareOpaqueType" === nodeType || "DeclareVariable" === nodeType || "DeclareExportDeclaration" === nodeType || "DeclareExportAllDeclaration" === nodeType || "InterfaceDeclaration" === nodeType || "OpaqueType" === nodeType || "TypeAlias" === nodeType || "EnumDeclaration" === nodeType || "TSDeclareFunction" === nodeType || "TSInterfaceDeclaration" === nodeType || "TSTypeAliasDeclaration" === nodeType || "TSEnumDeclaration" === nodeType || "TSModuleDeclaration" === nodeType || "TSImportEqualsDeclaration" === nodeType || "TSExportAssignment" === nodeType || "TSNamespaceExportDeclaration" === nodeType || nodeType === "Placeholder" && ("Statement" === node.expectedNode || "Declaration" === node.expectedNode || "BlockStatement" === node.expectedNode)) { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isTerminatorless(node, opts) { if (!node) return false; var nodeType = node.type; if ("BreakStatement" === nodeType || "ContinueStatement" === nodeType || "ReturnStatement" === nodeType || "ThrowStatement" === nodeType || "YieldExpression" === nodeType || "AwaitExpression" === nodeType) { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isCompletionStatement(node, opts) { if (!node) return false; var nodeType = node.type; if ("BreakStatement" === nodeType || "ContinueStatement" === nodeType || "ReturnStatement" === nodeType || "ThrowStatement" === nodeType) { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isConditional$1(node, opts) { if (!node) return false; var nodeType = node.type; if ("ConditionalExpression" === nodeType || "IfStatement" === nodeType) { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isLoop$1(node, opts) { if (!node) return false; var nodeType = node.type; if ("DoWhileStatement" === nodeType || "ForInStatement" === nodeType || "ForStatement" === nodeType || "WhileStatement" === nodeType || "ForOfStatement" === nodeType) { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isWhile(node, opts) { if (!node) return false; var nodeType = node.type; if ("DoWhileStatement" === nodeType || "WhileStatement" === nodeType) { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isExpressionWrapper(node, opts) { if (!node) return false; var nodeType = node.type; if ("ExpressionStatement" === nodeType || "ParenthesizedExpression" === nodeType || "TypeCastExpression" === nodeType) { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isFor$2(node, opts) { if (!node) return false; var nodeType = node.type; if ("ForInStatement" === nodeType || "ForStatement" === nodeType || "ForOfStatement" === nodeType) { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isForXStatement$1(node, opts) { if (!node) return false; var nodeType = node.type; if ("ForInStatement" === nodeType || "ForOfStatement" === nodeType) { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isFunction$4(node, opts) { if (!node) return false; var nodeType = node.type; if ("FunctionDeclaration" === nodeType || "FunctionExpression" === nodeType || "ObjectMethod" === nodeType || "ArrowFunctionExpression" === nodeType || "ClassMethod" === nodeType || "ClassPrivateMethod" === nodeType) { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isFunctionParent(node, opts) { if (!node) return false; var nodeType = node.type; if ("FunctionDeclaration" === nodeType || "FunctionExpression" === nodeType || "ObjectMethod" === nodeType || "ArrowFunctionExpression" === nodeType || "ClassMethod" === nodeType || "ClassPrivateMethod" === nodeType || "StaticBlock" === nodeType || "TSModuleBlock" === nodeType) { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isPureish$2(node, opts) { if (!node) return false; var nodeType = node.type; if ("FunctionDeclaration" === nodeType || "FunctionExpression" === nodeType || "StringLiteral" === nodeType || "NumericLiteral" === nodeType || "NullLiteral" === nodeType || "BooleanLiteral" === nodeType || "RegExpLiteral" === nodeType || "ArrowFunctionExpression" === nodeType || "BigIntLiteral" === nodeType || "DecimalLiteral" === nodeType || nodeType === "Placeholder" && "StringLiteral" === node.expectedNode) { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isDeclaration$1(node, opts) { if (!node) return false; var nodeType = node.type; if ("FunctionDeclaration" === nodeType || "VariableDeclaration" === nodeType || "ClassDeclaration" === nodeType || "ExportAllDeclaration" === nodeType || "ExportDefaultDeclaration" === nodeType || "ExportNamedDeclaration" === nodeType || "ImportDeclaration" === nodeType || "DeclareClass" === nodeType || "DeclareFunction" === nodeType || "DeclareInterface" === nodeType || "DeclareModule" === nodeType || "DeclareModuleExports" === nodeType || "DeclareTypeAlias" === nodeType || "DeclareOpaqueType" === nodeType || "DeclareVariable" === nodeType || "DeclareExportDeclaration" === nodeType || "DeclareExportAllDeclaration" === nodeType || "InterfaceDeclaration" === nodeType || "OpaqueType" === nodeType || "TypeAlias" === nodeType || "EnumDeclaration" === nodeType || "TSDeclareFunction" === nodeType || "TSInterfaceDeclaration" === nodeType || "TSTypeAliasDeclaration" === nodeType || "TSEnumDeclaration" === nodeType || "TSModuleDeclaration" === nodeType || nodeType === "Placeholder" && "Declaration" === node.expectedNode) { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isPatternLike(node, opts) { if (!node) return false; var nodeType = node.type; if ("Identifier" === nodeType || "RestElement" === nodeType || "AssignmentPattern" === nodeType || "ArrayPattern" === nodeType || "ObjectPattern" === nodeType || "TSAsExpression" === nodeType || "TSSatisfiesExpression" === nodeType || "TSTypeAssertion" === nodeType || "TSNonNullExpression" === nodeType || nodeType === "Placeholder" && ("Pattern" === node.expectedNode || "Identifier" === node.expectedNode)) { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isLVal(node, opts) { if (!node) return false; var nodeType = node.type; if ("Identifier" === nodeType || "MemberExpression" === nodeType || "RestElement" === nodeType || "AssignmentPattern" === nodeType || "ArrayPattern" === nodeType || "ObjectPattern" === nodeType || "TSParameterProperty" === nodeType || "TSAsExpression" === nodeType || "TSSatisfiesExpression" === nodeType || "TSTypeAssertion" === nodeType || "TSNonNullExpression" === nodeType || nodeType === "Placeholder" && ("Pattern" === node.expectedNode || "Identifier" === node.expectedNode)) { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isTSEntityName(node, opts) { if (!node) return false; var nodeType = node.type; if ("Identifier" === nodeType || "TSQualifiedName" === nodeType || nodeType === "Placeholder" && "Identifier" === node.expectedNode) { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isLiteral$6(node, opts) { if (!node) return false; var nodeType = node.type; if ("StringLiteral" === nodeType || "NumericLiteral" === nodeType || "NullLiteral" === nodeType || "BooleanLiteral" === nodeType || "RegExpLiteral" === nodeType || "TemplateLiteral" === nodeType || "BigIntLiteral" === nodeType || "DecimalLiteral" === nodeType || nodeType === "Placeholder" && "StringLiteral" === node.expectedNode) { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isUserWhitespacable(node, opts) { if (!node) return false; var nodeType = node.type; if ("ObjectMethod" === nodeType || "ObjectProperty" === nodeType || "ObjectTypeInternalSlot" === nodeType || "ObjectTypeCallProperty" === nodeType || "ObjectTypeIndexer" === nodeType || "ObjectTypeProperty" === nodeType || "ObjectTypeSpreadProperty" === nodeType) { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isMethod$1(node, opts) { if (!node) return false; var nodeType = node.type; if ("ObjectMethod" === nodeType || "ClassMethod" === nodeType || "ClassPrivateMethod" === nodeType) { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isObjectMember(node, opts) { if (!node) return false; var nodeType = node.type; if ("ObjectMethod" === nodeType || "ObjectProperty" === nodeType) { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isProperty$1(node, opts) { if (!node) return false; var nodeType = node.type; if ("ObjectProperty" === nodeType || "ClassProperty" === nodeType || "ClassAccessorProperty" === nodeType || "ClassPrivateProperty" === nodeType) { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isUnaryLike$1(node, opts) { if (!node) return false; var nodeType = node.type; if ("UnaryExpression" === nodeType || "SpreadElement" === nodeType) { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isPattern(node, opts) { if (!node) return false; var nodeType = node.type; if ("AssignmentPattern" === nodeType || "ArrayPattern" === nodeType || "ObjectPattern" === nodeType || nodeType === "Placeholder" && "Pattern" === node.expectedNode) { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isClass$2(node, opts) { if (!node) return false; var nodeType = node.type; if ("ClassExpression" === nodeType || "ClassDeclaration" === nodeType) { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isImportOrExportDeclaration(node, opts) { if (!node) return false; var nodeType = node.type; if ("ExportAllDeclaration" === nodeType || "ExportDefaultDeclaration" === nodeType || "ExportNamedDeclaration" === nodeType || "ImportDeclaration" === nodeType) { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isExportDeclaration$3(node, opts) { if (!node) return false; var nodeType = node.type; if ("ExportAllDeclaration" === nodeType || "ExportDefaultDeclaration" === nodeType || "ExportNamedDeclaration" === nodeType) { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isModuleSpecifier$1(node, opts) { if (!node) return false; var nodeType = node.type; if ("ExportSpecifier" === nodeType || "ImportDefaultSpecifier" === nodeType || "ImportNamespaceSpecifier" === nodeType || "ImportSpecifier" === nodeType || "ExportNamespaceSpecifier" === nodeType || "ExportDefaultSpecifier" === nodeType) { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isAccessor(node, opts) { if (!node) return false; var nodeType = node.type; if ("ClassAccessorProperty" === nodeType) { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isPrivate(node, opts) { if (!node) return false; var nodeType = node.type; if ("ClassPrivateProperty" === nodeType || "ClassPrivateMethod" === nodeType || "PrivateName" === nodeType) { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isFlow$1(node, opts) { if (!node) return false; var nodeType = node.type; if ("AnyTypeAnnotation" === nodeType || "ArrayTypeAnnotation" === nodeType || "BooleanTypeAnnotation" === nodeType || "BooleanLiteralTypeAnnotation" === nodeType || "NullLiteralTypeAnnotation" === nodeType || "ClassImplements" === nodeType || "DeclareClass" === nodeType || "DeclareFunction" === nodeType || "DeclareInterface" === nodeType || "DeclareModule" === nodeType || "DeclareModuleExports" === nodeType || "DeclareTypeAlias" === nodeType || "DeclareOpaqueType" === nodeType || "DeclareVariable" === nodeType || "DeclareExportDeclaration" === nodeType || "DeclareExportAllDeclaration" === nodeType || "DeclaredPredicate" === nodeType || "ExistsTypeAnnotation" === nodeType || "FunctionTypeAnnotation" === nodeType || "FunctionTypeParam" === nodeType || "GenericTypeAnnotation" === nodeType || "InferredPredicate" === nodeType || "InterfaceExtends" === nodeType || "InterfaceDeclaration" === nodeType || "InterfaceTypeAnnotation" === nodeType || "IntersectionTypeAnnotation" === nodeType || "MixedTypeAnnotation" === nodeType || "EmptyTypeAnnotation" === nodeType || "NullableTypeAnnotation" === nodeType || "NumberLiteralTypeAnnotation" === nodeType || "NumberTypeAnnotation" === nodeType || "ObjectTypeAnnotation" === nodeType || "ObjectTypeInternalSlot" === nodeType || "ObjectTypeCallProperty" === nodeType || "ObjectTypeIndexer" === nodeType || "ObjectTypeProperty" === nodeType || "ObjectTypeSpreadProperty" === nodeType || "OpaqueType" === nodeType || "QualifiedTypeIdentifier" === nodeType || "StringLiteralTypeAnnotation" === nodeType || "StringTypeAnnotation" === nodeType || "SymbolTypeAnnotation" === nodeType || "ThisTypeAnnotation" === nodeType || "TupleTypeAnnotation" === nodeType || "TypeofTypeAnnotation" === nodeType || "TypeAlias" === nodeType || "TypeAnnotation" === nodeType || "TypeCastExpression" === nodeType || "TypeParameter" === nodeType || "TypeParameterDeclaration" === nodeType || "TypeParameterInstantiation" === nodeType || "UnionTypeAnnotation" === nodeType || "Variance" === nodeType || "VoidTypeAnnotation" === nodeType || "EnumDeclaration" === nodeType || "EnumBooleanBody" === nodeType || "EnumNumberBody" === nodeType || "EnumStringBody" === nodeType || "EnumSymbolBody" === nodeType || "EnumBooleanMember" === nodeType || "EnumNumberMember" === nodeType || "EnumStringMember" === nodeType || "EnumDefaultedMember" === nodeType || "IndexedAccessType" === nodeType || "OptionalIndexedAccessType" === nodeType) { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isFlowType$1(node, opts) { if (!node) return false; var nodeType = node.type; if ("AnyTypeAnnotation" === nodeType || "ArrayTypeAnnotation" === nodeType || "BooleanTypeAnnotation" === nodeType || "BooleanLiteralTypeAnnotation" === nodeType || "NullLiteralTypeAnnotation" === nodeType || "ExistsTypeAnnotation" === nodeType || "FunctionTypeAnnotation" === nodeType || "GenericTypeAnnotation" === nodeType || "InterfaceTypeAnnotation" === nodeType || "IntersectionTypeAnnotation" === nodeType || "MixedTypeAnnotation" === nodeType || "EmptyTypeAnnotation" === nodeType || "NullableTypeAnnotation" === nodeType || "NumberLiteralTypeAnnotation" === nodeType || "NumberTypeAnnotation" === nodeType || "ObjectTypeAnnotation" === nodeType || "StringLiteralTypeAnnotation" === nodeType || "StringTypeAnnotation" === nodeType || "SymbolTypeAnnotation" === nodeType || "ThisTypeAnnotation" === nodeType || "TupleTypeAnnotation" === nodeType || "TypeofTypeAnnotation" === nodeType || "UnionTypeAnnotation" === nodeType || "VoidTypeAnnotation" === nodeType || "IndexedAccessType" === nodeType || "OptionalIndexedAccessType" === nodeType) { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isFlowBaseAnnotation$1(node, opts) { if (!node) return false; var nodeType = node.type; if ("AnyTypeAnnotation" === nodeType || "BooleanTypeAnnotation" === nodeType || "NullLiteralTypeAnnotation" === nodeType || "MixedTypeAnnotation" === nodeType || "EmptyTypeAnnotation" === nodeType || "NumberTypeAnnotation" === nodeType || "StringTypeAnnotation" === nodeType || "SymbolTypeAnnotation" === nodeType || "ThisTypeAnnotation" === nodeType || "VoidTypeAnnotation" === nodeType) { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isFlowDeclaration(node, opts) { if (!node) return false; var nodeType = node.type; if ("DeclareClass" === nodeType || "DeclareFunction" === nodeType || "DeclareInterface" === nodeType || "DeclareModule" === nodeType || "DeclareModuleExports" === nodeType || "DeclareTypeAlias" === nodeType || "DeclareOpaqueType" === nodeType || "DeclareVariable" === nodeType || "DeclareExportDeclaration" === nodeType || "DeclareExportAllDeclaration" === nodeType || "InterfaceDeclaration" === nodeType || "OpaqueType" === nodeType || "TypeAlias" === nodeType) { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isFlowPredicate(node, opts) { if (!node) return false; var nodeType = node.type; if ("DeclaredPredicate" === nodeType || "InferredPredicate" === nodeType) { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isEnumBody(node, opts) { if (!node) return false; var nodeType = node.type; if ("EnumBooleanBody" === nodeType || "EnumNumberBody" === nodeType || "EnumStringBody" === nodeType || "EnumSymbolBody" === nodeType) { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isEnumMember(node, opts) { if (!node) return false; var nodeType = node.type; if ("EnumBooleanMember" === nodeType || "EnumNumberMember" === nodeType || "EnumStringMember" === nodeType || "EnumDefaultedMember" === nodeType) { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isJSX(node, opts) { if (!node) return false; var nodeType = node.type; if ("JSXAttribute" === nodeType || "JSXClosingElement" === nodeType || "JSXElement" === nodeType || "JSXEmptyExpression" === nodeType || "JSXExpressionContainer" === nodeType || "JSXSpreadChild" === nodeType || "JSXIdentifier" === nodeType || "JSXMemberExpression" === nodeType || "JSXNamespacedName" === nodeType || "JSXOpeningElement" === nodeType || "JSXSpreadAttribute" === nodeType || "JSXText" === nodeType || "JSXFragment" === nodeType || "JSXOpeningFragment" === nodeType || "JSXClosingFragment" === nodeType) { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isMiscellaneous(node, opts) { if (!node) return false; var nodeType = node.type; if ("Noop" === nodeType || "Placeholder" === nodeType || "V8IntrinsicIdentifier" === nodeType) { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isTypeScript(node, opts) { if (!node) return false; var nodeType = node.type; if ("TSParameterProperty" === nodeType || "TSDeclareFunction" === nodeType || "TSDeclareMethod" === nodeType || "TSQualifiedName" === nodeType || "TSCallSignatureDeclaration" === nodeType || "TSConstructSignatureDeclaration" === nodeType || "TSPropertySignature" === nodeType || "TSMethodSignature" === nodeType || "TSIndexSignature" === nodeType || "TSAnyKeyword" === nodeType || "TSBooleanKeyword" === nodeType || "TSBigIntKeyword" === nodeType || "TSIntrinsicKeyword" === nodeType || "TSNeverKeyword" === nodeType || "TSNullKeyword" === nodeType || "TSNumberKeyword" === nodeType || "TSObjectKeyword" === nodeType || "TSStringKeyword" === nodeType || "TSSymbolKeyword" === nodeType || "TSUndefinedKeyword" === nodeType || "TSUnknownKeyword" === nodeType || "TSVoidKeyword" === nodeType || "TSThisType" === nodeType || "TSFunctionType" === nodeType || "TSConstructorType" === nodeType || "TSTypeReference" === nodeType || "TSTypePredicate" === nodeType || "TSTypeQuery" === nodeType || "TSTypeLiteral" === nodeType || "TSArrayType" === nodeType || "TSTupleType" === nodeType || "TSOptionalType" === nodeType || "TSRestType" === nodeType || "TSNamedTupleMember" === nodeType || "TSUnionType" === nodeType || "TSIntersectionType" === nodeType || "TSConditionalType" === nodeType || "TSInferType" === nodeType || "TSParenthesizedType" === nodeType || "TSTypeOperator" === nodeType || "TSIndexedAccessType" === nodeType || "TSMappedType" === nodeType || "TSLiteralType" === nodeType || "TSExpressionWithTypeArguments" === nodeType || "TSInterfaceDeclaration" === nodeType || "TSInterfaceBody" === nodeType || "TSTypeAliasDeclaration" === nodeType || "TSInstantiationExpression" === nodeType || "TSAsExpression" === nodeType || "TSSatisfiesExpression" === nodeType || "TSTypeAssertion" === nodeType || "TSEnumDeclaration" === nodeType || "TSEnumMember" === nodeType || "TSModuleDeclaration" === nodeType || "TSModuleBlock" === nodeType || "TSImportType" === nodeType || "TSImportEqualsDeclaration" === nodeType || "TSExternalModuleReference" === nodeType || "TSNonNullExpression" === nodeType || "TSExportAssignment" === nodeType || "TSNamespaceExportDeclaration" === nodeType || "TSTypeAnnotation" === nodeType || "TSTypeParameterInstantiation" === nodeType || "TSTypeParameterDeclaration" === nodeType || "TSTypeParameter" === nodeType) { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isTSTypeElement(node, opts) { if (!node) return false; var nodeType = node.type; if ("TSCallSignatureDeclaration" === nodeType || "TSConstructSignatureDeclaration" === nodeType || "TSPropertySignature" === nodeType || "TSMethodSignature" === nodeType || "TSIndexSignature" === nodeType) { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isTSType(node, opts) { if (!node) return false; var nodeType = node.type; if ("TSAnyKeyword" === nodeType || "TSBooleanKeyword" === nodeType || "TSBigIntKeyword" === nodeType || "TSIntrinsicKeyword" === nodeType || "TSNeverKeyword" === nodeType || "TSNullKeyword" === nodeType || "TSNumberKeyword" === nodeType || "TSObjectKeyword" === nodeType || "TSStringKeyword" === nodeType || "TSSymbolKeyword" === nodeType || "TSUndefinedKeyword" === nodeType || "TSUnknownKeyword" === nodeType || "TSVoidKeyword" === nodeType || "TSThisType" === nodeType || "TSFunctionType" === nodeType || "TSConstructorType" === nodeType || "TSTypeReference" === nodeType || "TSTypePredicate" === nodeType || "TSTypeQuery" === nodeType || "TSTypeLiteral" === nodeType || "TSArrayType" === nodeType || "TSTupleType" === nodeType || "TSOptionalType" === nodeType || "TSRestType" === nodeType || "TSUnionType" === nodeType || "TSIntersectionType" === nodeType || "TSConditionalType" === nodeType || "TSInferType" === nodeType || "TSParenthesizedType" === nodeType || "TSTypeOperator" === nodeType || "TSIndexedAccessType" === nodeType || "TSMappedType" === nodeType || "TSLiteralType" === nodeType || "TSExpressionWithTypeArguments" === nodeType || "TSImportType" === nodeType) { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isTSBaseType(node, opts) { if (!node) return false; var nodeType = node.type; if ("TSAnyKeyword" === nodeType || "TSBooleanKeyword" === nodeType || "TSBigIntKeyword" === nodeType || "TSIntrinsicKeyword" === nodeType || "TSNeverKeyword" === nodeType || "TSNullKeyword" === nodeType || "TSNumberKeyword" === nodeType || "TSObjectKeyword" === nodeType || "TSStringKeyword" === nodeType || "TSSymbolKeyword" === nodeType || "TSUndefinedKeyword" === nodeType || "TSUnknownKeyword" === nodeType || "TSVoidKeyword" === nodeType || "TSThisType" === nodeType || "TSLiteralType" === nodeType) { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isNumberLiteral(node, opts) { deprecationWarning$1("isNumberLiteral", "isNumericLiteral"); if (!node) return false; var nodeType = node.type; if (nodeType === "NumberLiteral") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isRegexLiteral(node, opts) { deprecationWarning$1("isRegexLiteral", "isRegExpLiteral"); if (!node) return false; var nodeType = node.type; if (nodeType === "RegexLiteral") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isRestProperty$1(node, opts) { deprecationWarning$1("isRestProperty", "isRestElement"); if (!node) return false; var nodeType = node.type; if (nodeType === "RestProperty") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isSpreadProperty$1(node, opts) { deprecationWarning$1("isSpreadProperty", "isSpreadElement"); if (!node) return false; var nodeType = node.type; if (nodeType === "SpreadProperty") { if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } return false; } function isModuleDeclaration(node, opts) { deprecationWarning$1("isModuleDeclaration", "isImportOrExportDeclaration"); return isImportOrExportDeclaration(node, opts); } function matchesPattern$2(member, match, allowPartial) { if (!isMemberExpression$8(member)) return false; var parts = Array.isArray(match) ? match : match.split("."); var nodes = []; var node; for (node = member; isMemberExpression$8(node); node = node.object) { nodes.push(node.property); } nodes.push(node); if (nodes.length < parts.length) return false; if (!allowPartial && nodes.length > parts.length) return false; for (var i = 0, j = nodes.length - 1; i < parts.length; i++, j--) { var _node = nodes[j]; var value = void 0; if (isIdentifier$j(_node)) { value = _node.name; } else if (isStringLiteral$6(_node)) { value = _node.value; } else if (isThisExpression$2(_node)) { value = "this"; } else { return false; } if (parts[i] !== value) return false; } return true; } function buildMatchMemberExpression$1(match, allowPartial) { var parts = match.split("."); return function (member) { return matchesPattern$2(member, parts, allowPartial); }; } var isReactComponent = buildMatchMemberExpression$1("React.Component"); function isCompatTag$1(tagName) { return !!tagName && /^[a-z]/.test(tagName); } var global$1 = (typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}); // shim for using process in browser // based off https://github.com/defunctzombie/node-process/blob/master/browser.js function defaultSetTimout() { throw new Error('setTimeout has not been defined'); } function defaultClearTimeout () { throw new Error('clearTimeout has not been defined'); } var cachedSetTimeout = defaultSetTimout; var cachedClearTimeout = defaultClearTimeout; if (typeof global$1.setTimeout === 'function') { cachedSetTimeout = setTimeout; } if (typeof global$1.clearTimeout === 'function') { cachedClearTimeout = clearTimeout; } function runTimeout(fun) { if (cachedSetTimeout === setTimeout) { //normal enviroments in sane situations return setTimeout(fun, 0); } // if setTimeout wasn't available but was latter defined if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) { cachedSetTimeout = setTimeout; return setTimeout(fun, 0); } try { // when when somebody has screwed with setTimeout but no I.E. maddness return cachedSetTimeout(fun, 0); } catch(e){ try { // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally return cachedSetTimeout.call(null, fun, 0); } catch(e){ // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error return cachedSetTimeout.call(this, fun, 0); } } } function runClearTimeout(marker) { if (cachedClearTimeout === clearTimeout) { //normal enviroments in sane situations return clearTimeout(marker); } // if clearTimeout wasn't available but was latter defined if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) { cachedClearTimeout = clearTimeout; return clearTimeout(marker); } try { // when when somebody has screwed with setTimeout but no I.E. maddness return cachedClearTimeout(marker); } catch (e){ try { // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally return cachedClearTimeout.call(null, marker); } catch (e){ // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error. // Some versions of I.E. have different rules for clearTimeout vs setTimeout return cachedClearTimeout.call(this, marker); } } } var queue = []; var draining = false; var currentQueue; var queueIndex = -1; function cleanUpNextTick() { if (!draining || !currentQueue) { return; } draining = false; if (currentQueue.length) { queue = currentQueue.concat(queue); } else { queueIndex = -1; } if (queue.length) { drainQueue(); } } function drainQueue() { if (draining) { return; } var timeout = runTimeout(cleanUpNextTick); draining = true; var len = queue.length; while(len) { currentQueue = queue; queue = []; while (++queueIndex < len) { if (currentQueue) { currentQueue[queueIndex].run(); } } queueIndex = -1; len = queue.length; } currentQueue = null; draining = false; runClearTimeout(timeout); } function nextTick(fun) { var args = new Array(arguments.length - 1); if (arguments.length > 1) { for (var i = 1; i < arguments.length; i++) { args[i - 1] = arguments[i]; } } queue.push(new Item(fun, args)); if (queue.length === 1 && !draining) { runTimeout(drainQueue); } } // v8 likes predictible objects function Item(fun, array) { this.fun = fun; this.array = array; } Item.prototype.run = function () { this.fun.apply(null, this.array); }; var title = 'browser'; var platform = 'browser'; var browser$5 = true; var env$1 = {}; var argv = []; var version$4 = ''; // empty string to avoid regexp issues var versions$2 = {}; var release = {}; var config$1 = {}; function noop$2() {} var on = noop$2; var addListener = noop$2; var once$1 = noop$2; var off = noop$2; var removeListener = noop$2; var removeAllListeners = noop$2; var emit$1 = noop$2; function binding(name) { throw new Error('process.binding is not supported'); } function cwd () { return '/' } function chdir (dir) { throw new Error('process.chdir is not supported'); }function umask() { return 0; } // from https://github.com/kumavis/browser-process-hrtime/blob/master/index.js var performance$1 = global$1.performance || {}; var performanceNow = performance$1.now || performance$1.mozNow || performance$1.msNow || performance$1.oNow || performance$1.webkitNow || function(){ return (new Date()).getTime() }; // generate timestamp or delta // see http://nodejs.org/api/process.html#process_process_hrtime function hrtime(previousTimestamp){ var clocktime = performanceNow.call(performance$1)*1e-3; var seconds = Math.floor(clocktime); var nanoseconds = Math.floor((clocktime%1)*1e9); if (previousTimestamp) { seconds = seconds - previousTimestamp[0]; nanoseconds = nanoseconds - previousTimestamp[1]; if (nanoseconds<0) { seconds--; nanoseconds += 1e9; } } return [seconds,nanoseconds] } var startTime = new Date(); function uptime() { var currentTime = new Date(); var dif = currentTime - startTime; return dif / 1000; } var browser$1$1 = { nextTick: nextTick, title: title, browser: browser$5, env: env$1, argv: argv, version: version$4, versions: versions$2, on: on, addListener: addListener, once: once$1, off: off, removeListener: removeListener, removeAllListeners: removeAllListeners, emit: emit$1, binding: binding, cwd: cwd, chdir: chdir, umask: umask, hrtime: hrtime, platform: platform, release: release, config: config$1, uptime: uptime }; var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {}; function getAugmentedNamespace(n) { var f = n.default; if (typeof f == "function") { var a = function () { return f.apply(this, arguments); }; a.prototype = f.prototype; } else a = {}; Object.defineProperty(a, '__esModule', {value: true}); Object.keys(n).forEach(function (k) { var d = Object.getOwnPropertyDescriptor(n, k); Object.defineProperty(a, k, d.get ? d : { enumerable: true, get: function () { return n[k]; } }); }); return a; } var toFastPropertiesBABEL_8_BREAKINGTrue; var hasRequiredToFastPropertiesBABEL_8_BREAKINGTrue; function requireToFastPropertiesBABEL_8_BREAKINGTrue() { if (hasRequiredToFastPropertiesBABEL_8_BREAKINGTrue) return toFastPropertiesBABEL_8_BREAKINGTrue; hasRequiredToFastPropertiesBABEL_8_BREAKINGTrue = 1; var fastProto = null; function FastObject(o) { if (fastProto !== null && typeof fastProto.property) { var result = fastProto; fastProto = FastObject.prototype = null; return result; } fastProto = FastObject.prototype = o == null ? Object.create(null) : o; return new FastObject(); } var inlineCacheCutoff = 10; for (var i = 0; i <= inlineCacheCutoff; i++) { FastObject(); } toFastPropertiesBABEL_8_BREAKINGTrue = function toFastproperties(o) { return FastObject(o); }; return toFastPropertiesBABEL_8_BREAKINGTrue; } var toFastPropertiesBABEL_8_BREAKINGFalse; var hasRequiredToFastPropertiesBABEL_8_BREAKINGFalse; function requireToFastPropertiesBABEL_8_BREAKINGFalse() { if (hasRequiredToFastPropertiesBABEL_8_BREAKINGFalse) return toFastPropertiesBABEL_8_BREAKINGFalse; hasRequiredToFastPropertiesBABEL_8_BREAKINGFalse = 1; var fastProto = null; function FastObject(o) { if (fastProto !== null && typeof fastProto.property) { var result = fastProto; fastProto = FastObject.prototype = null; return result; } fastProto = FastObject.prototype = o == null ? Object.create(null) : o; return new FastObject(); } FastObject(); toFastPropertiesBABEL_8_BREAKINGFalse = function toFastproperties(o) { return FastObject(o); }; return toFastPropertiesBABEL_8_BREAKINGFalse; } function bool$9(value) { if (value == null) return false; return value && value !== "false" && value !== "0"; } var toFastProperties = bool$9(browser$1$1.env["BABEL_8_BREAKING"]) ? requireToFastPropertiesBABEL_8_BREAKINGTrue() : requireToFastPropertiesBABEL_8_BREAKINGFalse(); function isType$2(nodeType, targetType) { if (nodeType === targetType) return true; if (ALIAS_KEYS[targetType]) return false; var aliases = FLIPPED_ALIAS_KEYS$3[targetType]; if (aliases) { if (aliases[0] === nodeType) return true; for (var _iterator = _createForOfIteratorHelperLoose(aliases), _step; !(_step = _iterator()).done;) { var alias = _step.value; if (nodeType === alias) return true; } } return false; } function isPlaceholderType(placeholderType, targetType) { if (placeholderType === targetType) return true; var aliases = PLACEHOLDERS_ALIAS[placeholderType]; if (aliases) { for (var _iterator = _createForOfIteratorHelperLoose(aliases), _step; !(_step = _iterator()).done;) { var alias = _step.value; if (targetType === alias) return true; } } return false; } function is$1(type, node, opts) { if (!node) return false; var matches = isType$2(node.type, type); if (!matches) { if (!opts && node.type === "Placeholder" && type in FLIPPED_ALIAS_KEYS$3) { return isPlaceholderType(node.expectedNode, type); } return false; } if (typeof opts === "undefined") { return true; } else { return shallowEqual$2(node, opts); } } var nonASCIIidentifierStartChars = "\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC"; var nonASCIIidentifierChars = "\u200C\u200D\xB7\u0300-\u036F\u0387\u0483-\u0487\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u0669\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u06F0-\u06F9\u0711\u0730-\u074A\u07A6-\u07B0\u07C0-\u07C9\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0898-\u089F\u08CA-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0966-\u096F\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09E6-\u09EF\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A66-\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AE6-\u0AEF\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B66-\u0B6F\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0BE6-\u0BEF\u0C00-\u0C04\u0C3C\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0CE6-\u0CEF\u0CF3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D66-\u0D6F\u0D81-\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0E50-\u0E59\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECE\u0ED0-\u0ED9\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1040-\u1049\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F-\u109D\u135D-\u135F\u1369-\u1371\u1712-\u1715\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u17E0-\u17E9\u180B-\u180D\u180F-\u1819\u18A9\u1920-\u192B\u1930-\u193B\u1946-\u194F\u19D0-\u19DA\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AB0-\u1ABD\u1ABF-\u1ACE\u1B00-\u1B04\u1B34-\u1B44\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BB0-\u1BB9\u1BE6-\u1BF3\u1C24-\u1C37\u1C40-\u1C49\u1C50-\u1C59\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DFF\u203F\u2040\u2054\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA620-\uA629\uA66F\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA82C\uA880\uA881\uA8B4-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F1\uA8FF-\uA909\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9D0-\uA9D9\uA9E5\uA9F0-\uA9F9\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA50-\uAA59\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uABF0-\uABF9\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFF10-\uFF19\uFF3F"; var nonASCIIidentifierStart = new RegExp("[" + nonASCIIidentifierStartChars + "]"); var nonASCIIidentifier = new RegExp("[" + nonASCIIidentifierStartChars + nonASCIIidentifierChars + "]"); nonASCIIidentifierStartChars = nonASCIIidentifierChars = null; var astralIdentifierStartCodes = [0, 11, 2, 25, 2, 18, 2, 1, 2, 14, 3, 13, 35, 122, 70, 52, 268, 28, 4, 48, 48, 31, 14, 29, 6, 37, 11, 29, 3, 35, 5, 7, 2, 4, 43, 157, 19, 35, 5, 35, 5, 39, 9, 51, 13, 10, 2, 14, 2, 6, 2, 1, 2, 10, 2, 14, 2, 6, 2, 1, 68, 310, 10, 21, 11, 7, 25, 5, 2, 41, 2, 8, 70, 5, 3, 0, 2, 43, 2, 1, 4, 0, 3, 22, 11, 22, 10, 30, 66, 18, 2, 1, 11, 21, 11, 25, 71, 55, 7, 1, 65, 0, 16, 3, 2, 2, 2, 28, 43, 28, 4, 28, 36, 7, 2, 27, 28, 53, 11, 21, 11, 18, 14, 17, 111, 72, 56, 50, 14, 50, 14, 35, 349, 41, 7, 1, 79, 28, 11, 0, 9, 21, 43, 17, 47, 20, 28, 22, 13, 52, 58, 1, 3, 0, 14, 44, 33, 24, 27, 35, 30, 0, 3, 0, 9, 34, 4, 0, 13, 47, 15, 3, 22, 0, 2, 0, 36, 17, 2, 24, 20, 1, 64, 6, 2, 0, 2, 3, 2, 14, 2, 9, 8, 46, 39, 7, 3, 1, 3, 21, 2, 6, 2, 1, 2, 4, 4, 0, 19, 0, 13, 4, 159, 52, 19, 3, 21, 2, 31, 47, 21, 1, 2, 0, 185, 46, 42, 3, 37, 47, 21, 0, 60, 42, 14, 0, 72, 26, 38, 6, 186, 43, 117, 63, 32, 7, 3, 0, 3, 7, 2, 1, 2, 23, 16, 0, 2, 0, 95, 7, 3, 38, 17, 0, 2, 0, 29, 0, 11, 39, 8, 0, 22, 0, 12, 45, 20, 0, 19, 72, 264, 8, 2, 36, 18, 0, 50, 29, 113, 6, 2, 1, 2, 37, 22, 0, 26, 5, 2, 1, 2, 31, 15, 0, 328, 18, 16, 0, 2, 12, 2, 33, 125, 0, 80, 921, 103, 110, 18, 195, 2637, 96, 16, 1071, 18, 5, 4026, 582, 8634, 568, 8, 30, 18, 78, 18, 29, 19, 47, 17, 3, 32, 20, 6, 18, 689, 63, 129, 74, 6, 0, 67, 12, 65, 1, 2, 0, 29, 6135, 9, 1237, 43, 8, 8936, 3, 2, 6, 2, 1, 2, 290, 16, 0, 30, 2, 3, 0, 15, 3, 9, 395, 2309, 106, 6, 12, 4, 8, 8, 9, 5991, 84, 2, 70, 2, 1, 3, 0, 3, 1, 3, 3, 2, 11, 2, 0, 2, 6, 2, 64, 2, 3, 3, 7, 2, 6, 2, 27, 2, 3, 2, 4, 2, 0, 4, 6, 2, 339, 3, 24, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 7, 1845, 30, 7, 5, 262, 61, 147, 44, 11, 6, 17, 0, 322, 29, 19, 43, 485, 27, 757, 6, 2, 3, 2, 1, 2, 14, 2, 196, 60, 67, 8, 0, 1205, 3, 2, 26, 2, 1, 2, 0, 3, 0, 2, 9, 2, 3, 2, 0, 2, 0, 7, 0, 5, 0, 2, 0, 2, 0, 2, 2, 2, 1, 2, 0, 3, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 1, 2, 0, 3, 3, 2, 6, 2, 3, 2, 3, 2, 0, 2, 9, 2, 16, 6, 2, 2, 4, 2, 16, 4421, 42719, 33, 4153, 7, 221, 3, 5761, 15, 7472, 3104, 541, 1507, 4938, 6, 4191]; var astralIdentifierCodes = [509, 0, 227, 0, 150, 4, 294, 9, 1368, 2, 2, 1, 6, 3, 41, 2, 5, 0, 166, 1, 574, 3, 9, 9, 370, 1, 81, 2, 71, 10, 50, 3, 123, 2, 54, 14, 32, 10, 3, 1, 11, 3, 46, 10, 8, 0, 46, 9, 7, 2, 37, 13, 2, 9, 6, 1, 45, 0, 13, 2, 49, 13, 9, 3, 2, 11, 83, 11, 7, 0, 3, 0, 158, 11, 6, 9, 7, 3, 56, 1, 2, 6, 3, 1, 3, 2, 10, 0, 11, 1, 3, 6, 4, 4, 193, 17, 10, 9, 5, 0, 82, 19, 13, 9, 214, 6, 3, 8, 28, 1, 83, 16, 16, 9, 82, 12, 9, 9, 84, 14, 5, 9, 243, 14, 166, 9, 71, 5, 2, 1, 3, 3, 2, 0, 2, 1, 13, 9, 120, 6, 3, 6, 4, 0, 29, 9, 41, 6, 2, 3, 9, 0, 10, 10, 47, 15, 406, 7, 2, 7, 17, 9, 57, 21, 2, 13, 123, 5, 4, 0, 2, 1, 2, 6, 2, 0, 9, 9, 49, 4, 2, 1, 2, 4, 9, 9, 330, 3, 10, 1, 2, 0, 49, 6, 4, 4, 14, 9, 5351, 0, 7, 14, 13835, 9, 87, 9, 39, 4, 60, 6, 26, 9, 1014, 0, 2, 54, 8, 3, 82, 0, 12, 1, 19628, 1, 4706, 45, 3, 22, 543, 4, 4, 5, 9, 7, 3, 6, 31, 3, 149, 2, 1418, 49, 513, 54, 5, 49, 9, 0, 15, 0, 23, 4, 2, 14, 1361, 6, 2, 16, 3, 6, 2, 1, 2, 4, 101, 0, 161, 6, 10, 9, 357, 0, 62, 13, 499, 13, 983, 6, 110, 6, 6, 9, 4759, 9, 787719, 239]; function isInAstralSet(code, set) { var pos = 0x10000; for (var i = 0, length = set.length; i < length; i += 2) { pos += set[i]; if (pos > code) return false; pos += set[i + 1]; if (pos >= code) return true; } return false; } function isIdentifierStart(code) { if (code < 65) return code === 36; if (code <= 90) return true; if (code < 97) return code === 95; if (code <= 122) return true; if (code <= 0xffff) { return code >= 0xaa && nonASCIIidentifierStart.test(String.fromCharCode(code)); } return isInAstralSet(code, astralIdentifierStartCodes); } function isIdentifierChar(code) { if (code < 48) return code === 36; if (code < 58) return true; if (code < 65) return false; if (code <= 90) return true; if (code < 97) return code === 95; if (code <= 122) return true; if (code <= 0xffff) { return code >= 0xaa && nonASCIIidentifier.test(String.fromCharCode(code)); } return isInAstralSet(code, astralIdentifierStartCodes) || isInAstralSet(code, astralIdentifierCodes); } function isIdentifierName(name) { var isFirst = true; for (var i = 0; i < name.length; i++) { var cp = name.charCodeAt(i); if ((cp & 0xfc00) === 0xd800 && i + 1 < name.length) { var trail = name.charCodeAt(++i); if ((trail & 0xfc00) === 0xdc00) { cp = 0x10000 + ((cp & 0x3ff) << 10) + (trail & 0x3ff); } } if (isFirst) { isFirst = false; if (!isIdentifierStart(cp)) { return false; } } else if (!isIdentifierChar(cp)) { return false; } } return !isFirst; } var reservedWords = { keyword: ["break", "case", "catch", "continue", "debugger", "default", "do", "else", "finally", "for", "function", "if", "return", "switch", "throw", "try", "var", "const", "while", "with", "new", "this", "super", "class", "extends", "export", "import", "null", "true", "false", "in", "instanceof", "typeof", "void", "delete"], strict: ["implements", "interface", "let", "package", "private", "protected", "public", "static", "yield"], strictBind: ["eval", "arguments"] }; var keywords$1 = new Set(reservedWords.keyword); var reservedWordsStrictSet = new Set(reservedWords.strict); var reservedWordsStrictBindSet = new Set(reservedWords.strictBind); function isReservedWord(word, inModule) { return inModule && word === "await" || word === "enum"; } function isStrictReservedWord(word, inModule) { return isReservedWord(word, inModule) || reservedWordsStrictSet.has(word); } function isStrictBindOnlyReservedWord(word) { return reservedWordsStrictBindSet.has(word); } function isStrictBindReservedWord(word, inModule) { return isStrictReservedWord(word, inModule) || isStrictBindOnlyReservedWord(word); } function isKeyword(word) { return keywords$1.has(word); } function isValidIdentifier$1(name, reserved) { if (reserved === void 0) { reserved = true; } if (typeof name !== "string") return false; if (reserved) { if (isKeyword(name) || isStrictReservedWord(name, true)) { return false; } } return isIdentifierName(name); } var _isDigit = function isDigit(code) { return code >= 48 && code <= 57; }; var forbiddenNumericSeparatorSiblings = { decBinOct: new Set([46, 66, 69, 79, 95, 98, 101, 111]), hex: new Set([46, 88, 95, 120]) }; var isAllowedNumericSeparatorSibling = { bin: function bin(ch) { return ch === 48 || ch === 49; }, oct: function oct(ch) { return ch >= 48 && ch <= 55; }, dec: function dec(ch) { return ch >= 48 && ch <= 57; }, hex: function hex(ch) { return ch >= 48 && ch <= 57 || ch >= 65 && ch <= 70 || ch >= 97 && ch <= 102; } }; function readStringContents(type, input, pos, lineStart, curLine, errors) { var initialPos = pos; var initialLineStart = lineStart; var initialCurLine = curLine; var out = ""; var firstInvalidLoc = null; var chunkStart = pos; var length = input.length; for (;;) { if (pos >= length) { errors.unterminated(initialPos, initialLineStart, initialCurLine); out += input.slice(chunkStart, pos); break; } var ch = input.charCodeAt(pos); if (isStringEnd(type, ch, input, pos)) { out += input.slice(chunkStart, pos); break; } if (ch === 92) { out += input.slice(chunkStart, pos); var res = readEscapedChar(input, pos, lineStart, curLine, type === "template", errors); if (res.ch === null && !firstInvalidLoc) { firstInvalidLoc = { pos: pos, lineStart: lineStart, curLine: curLine }; } else { out += res.ch; } pos = res.pos; lineStart = res.lineStart; curLine = res.curLine; chunkStart = pos; } else if (ch === 8232 || ch === 8233) { ++pos; ++curLine; lineStart = pos; } else if (ch === 10 || ch === 13) { if (type === "template") { out += input.slice(chunkStart, pos) + "\n"; ++pos; if (ch === 13 && input.charCodeAt(pos) === 10) { ++pos; } ++curLine; chunkStart = lineStart = pos; } else { errors.unterminated(initialPos, initialLineStart, initialCurLine); } } else { ++pos; } } return { pos: pos, str: out, firstInvalidLoc: firstInvalidLoc, lineStart: lineStart, curLine: curLine, containsInvalid: !!firstInvalidLoc }; } function isStringEnd(type, ch, input, pos) { if (type === "template") { return ch === 96 || ch === 36 && input.charCodeAt(pos + 1) === 123; } return ch === (type === "double" ? 34 : 39); } function readEscapedChar(input, pos, lineStart, curLine, inTemplate, errors) { var throwOnInvalid = !inTemplate; pos++; var res = function res(ch) { return { pos: pos, ch: ch, lineStart: lineStart, curLine: curLine }; }; var ch = input.charCodeAt(pos++); switch (ch) { case 110: return res("\n"); case 114: return res("\r"); case 120: { var code; var _readHexChar = readHexChar(input, pos, lineStart, curLine, 2, false, throwOnInvalid, errors); code = _readHexChar.code; pos = _readHexChar.pos; return res(code === null ? null : String.fromCharCode(code)); } case 117: { var _code; var _readCodePoint = readCodePoint(input, pos, lineStart, curLine, throwOnInvalid, errors); _code = _readCodePoint.code; pos = _readCodePoint.pos; return res(_code === null ? null : String.fromCodePoint(_code)); } case 116: return res("\t"); case 98: return res("\b"); case 118: return res("\x0B"); case 102: return res("\f"); case 13: if (input.charCodeAt(pos) === 10) { ++pos; } case 10: lineStart = pos; ++curLine; case 8232: case 8233: return res(""); case 56: case 57: if (inTemplate) { return res(null); } else { errors.strictNumericEscape(pos - 1, lineStart, curLine); } default: if (ch >= 48 && ch <= 55) { var startPos = pos - 1; var match = input.slice(startPos, pos + 2).match(/^[0-7]+/); var octalStr = match[0]; var octal = parseInt(octalStr, 8); if (octal > 255) { octalStr = octalStr.slice(0, -1); octal = parseInt(octalStr, 8); } pos += octalStr.length - 1; var next = input.charCodeAt(pos); if (octalStr !== "0" || next === 56 || next === 57) { if (inTemplate) { return res(null); } else { errors.strictNumericEscape(startPos, lineStart, curLine); } } return res(String.fromCharCode(octal)); } return res(String.fromCharCode(ch)); } } function readHexChar(input, pos, lineStart, curLine, len, forceLen, throwOnInvalid, errors) { var initialPos = pos; var n; var _readInt = readInt(input, pos, lineStart, curLine, 16, len, forceLen, false, errors, !throwOnInvalid); n = _readInt.n; pos = _readInt.pos; if (n === null) { if (throwOnInvalid) { errors.invalidEscapeSequence(initialPos, lineStart, curLine); } else { pos = initialPos - 1; } } return { code: n, pos: pos }; } function readInt(input, pos, lineStart, curLine, radix, len, forceLen, allowNumSeparator, errors, bailOnError) { var start = pos; var forbiddenSiblings = radix === 16 ? forbiddenNumericSeparatorSiblings.hex : forbiddenNumericSeparatorSiblings.decBinOct; var isAllowedSibling = radix === 16 ? isAllowedNumericSeparatorSibling.hex : radix === 10 ? isAllowedNumericSeparatorSibling.dec : radix === 8 ? isAllowedNumericSeparatorSibling.oct : isAllowedNumericSeparatorSibling.bin; var invalid = false; var total = 0; for (var i = 0, e = len == null ? Infinity : len; i < e; ++i) { var code = input.charCodeAt(pos); var val = void 0; if (code === 95 && allowNumSeparator !== "bail") { var prev = input.charCodeAt(pos - 1); var next = input.charCodeAt(pos + 1); if (!allowNumSeparator) { if (bailOnError) return { n: null, pos: pos }; errors.numericSeparatorInEscapeSequence(pos, lineStart, curLine); } else if (Number.isNaN(next) || !isAllowedSibling(next) || forbiddenSiblings.has(prev) || forbiddenSiblings.has(next)) { if (bailOnError) return { n: null, pos: pos }; errors.unexpectedNumericSeparator(pos, lineStart, curLine); } ++pos; continue; } if (code >= 97) { val = code - 97 + 10; } else if (code >= 65) { val = code - 65 + 10; } else if (_isDigit(code)) { val = code - 48; } else { val = Infinity; } if (val >= radix) { if (val <= 9 && bailOnError) { return { n: null, pos: pos }; } else if (val <= 9 && errors.invalidDigit(pos, lineStart, curLine, radix)) { val = 0; } else if (forceLen) { val = 0; invalid = true; } else { break; } } ++pos; total = total * radix + val; } if (pos === start || len != null && pos - start !== len || invalid) { return { n: null, pos: pos }; } return { n: total, pos: pos }; } function readCodePoint(input, pos, lineStart, curLine, throwOnInvalid, errors) { var ch = input.charCodeAt(pos); var code; if (ch === 123) { ++pos; var _readHexChar2 = readHexChar(input, pos, lineStart, curLine, input.indexOf("}", pos) - pos, true, throwOnInvalid, errors); code = _readHexChar2.code; pos = _readHexChar2.pos; ++pos; if (code !== null && code > 0x10ffff) { if (throwOnInvalid) { errors.invalidCodePoint(pos, lineStart, curLine); } else { return { code: null, pos: pos }; } } } else { var _readHexChar3 = readHexChar(input, pos, lineStart, curLine, 4, false, throwOnInvalid, errors); code = _readHexChar3.code; pos = _readHexChar3.pos; } return { code: code, pos: pos }; } var STATEMENT_OR_BLOCK_KEYS$1 = ["consequent", "body", "alternate"]; var FLATTENABLE_KEYS = ["body", "expressions"]; var FOR_INIT_KEYS = ["left", "init"]; var COMMENT_KEYS = ["leadingComments", "trailingComments", "innerComments"]; var LOGICAL_OPERATORS$3 = ["||", "&&", "??"]; var UPDATE_OPERATORS = ["++", "--"]; var BOOLEAN_NUMBER_BINARY_OPERATORS$1 = [">", "<", ">=", "<="]; var EQUALITY_BINARY_OPERATORS = ["==", "===", "!=", "!=="]; var COMPARISON_BINARY_OPERATORS = [].concat(EQUALITY_BINARY_OPERATORS, ["in", "instanceof"]); var BOOLEAN_BINARY_OPERATORS$1 = [].concat(_toConsumableArray(COMPARISON_BINARY_OPERATORS), BOOLEAN_NUMBER_BINARY_OPERATORS$1); var NUMBER_BINARY_OPERATORS$1 = ["-", "/", "%", "*", "**", "&", "|", ">>", ">>>", "<<", "^"]; var BINARY_OPERATORS = ["+"].concat(NUMBER_BINARY_OPERATORS$1, _toConsumableArray(BOOLEAN_BINARY_OPERATORS$1), ["|>"]); var ASSIGNMENT_OPERATORS = ["=", "+="].concat(_toConsumableArray(NUMBER_BINARY_OPERATORS$1.map(function (op) { return op + "="; })), _toConsumableArray(LOGICAL_OPERATORS$3.map(function (op) { return op + "="; }))); var BOOLEAN_UNARY_OPERATORS$1 = ["delete", "!"]; var NUMBER_UNARY_OPERATORS$1 = ["+", "-", "~"]; var STRING_UNARY_OPERATORS$1 = ["typeof"]; var UNARY_OPERATORS = ["void", "throw"].concat(BOOLEAN_UNARY_OPERATORS$1, NUMBER_UNARY_OPERATORS$1, STRING_UNARY_OPERATORS$1); var INHERIT_KEYS = { optional: ["typeAnnotation", "typeParameters", "returnType"], force: ["start", "loc", "end"] }; var BLOCK_SCOPED_SYMBOL = Symbol["for"]("var used to be block scoped"); var NOT_LOCAL_BINDING$2 = Symbol["for"]("should not be considered a local binding"); var VISITOR_KEYS$5 = {}; var ALIAS_KEYS = {}; var FLIPPED_ALIAS_KEYS$3 = {}; var NODE_FIELDS = {}; var BUILDER_KEYS = {}; var DEPRECATED_KEYS$1 = {}; var NODE_PARENT_VALIDATIONS = {}; function getType$2(val) { if (Array.isArray(val)) { return "array"; } else if (val === null) { return "null"; } else { return typeof val; } } function validate$6(validate) { return { validate: validate }; } function typeIs(typeName) { return typeof typeName === "string" ? assertNodeType(typeName) : assertNodeType.apply(void 0, _toConsumableArray(typeName)); } function validateType(typeName) { return validate$6(typeIs(typeName)); } function validateOptional(validate) { return { validate: validate, optional: true }; } function validateOptionalType(typeName) { return { validate: typeIs(typeName), optional: true }; } function arrayOf(elementType) { return chain$1(assertValueType("array"), assertEach(elementType)); } function arrayOfType(typeName) { return arrayOf(typeIs(typeName)); } function validateArrayOfType(typeName) { return validate$6(arrayOfType(typeName)); } function assertEach(callback) { function validator(node, key, val) { if (!Array.isArray(val)) return; for (var i = 0; i < val.length; i++) { var subkey = key + "[" + i + "]"; var v = val[i]; callback(node, subkey, v); if (browser$1$1.env.BABEL_TYPES_8_BREAKING) validateChild(node, subkey, v); } } validator.each = callback; return validator; } function assertOneOf() { for (var _len = arguments.length, values = new Array(_len), _key = 0; _key < _len; _key++) { values[_key] = arguments[_key]; } function validate(node, key, val) { if (values.indexOf(val) < 0) { throw new TypeError("Property " + key + " expected value to be one of " + JSON.stringify(values) + " but got " + JSON.stringify(val)); } } validate.oneOf = values; return validate; } function assertNodeType() { for (var _len2 = arguments.length, types = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) { types[_key2] = arguments[_key2]; } function validate(node, key, val) { for (var _iterator = _createForOfIteratorHelperLoose(types), _step; !(_step = _iterator()).done;) { var type = _step.value; if (is$1(type, val)) { validateChild(node, key, val); return; } } throw new TypeError("Property " + key + " of " + node.type + " expected node to be of a type " + JSON.stringify(types) + " but instead got " + JSON.stringify(val == null ? void 0 : val.type)); } validate.oneOfNodeTypes = types; return validate; } function assertNodeOrValueType() { for (var _len3 = arguments.length, types = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) { types[_key3] = arguments[_key3]; } function validate(node, key, val) { for (var _iterator2 = _createForOfIteratorHelperLoose(types), _step2; !(_step2 = _iterator2()).done;) { var type = _step2.value; if (getType$2(val) === type || is$1(type, val)) { validateChild(node, key, val); return; } } throw new TypeError("Property " + key + " of " + node.type + " expected node to be of a type " + JSON.stringify(types) + " but instead got " + JSON.stringify(val == null ? void 0 : val.type)); } validate.oneOfNodeOrValueTypes = types; return validate; } function assertValueType(type) { function validate(node, key, val) { var valid = getType$2(val) === type; if (!valid) { throw new TypeError("Property " + key + " expected type of " + type + " but got " + getType$2(val)); } } validate.type = type; return validate; } function assertShape(shape) { function validate(node, key, val) { var errors = []; for (var _i = 0, _Object$keys = Object.keys(shape); _i < _Object$keys.length; _i++) { var property = _Object$keys[_i]; try { validateField(node, property, val[property], shape[property]); } catch (error) { if (error instanceof TypeError) { errors.push(error.message); continue; } throw error; } } if (errors.length) { throw new TypeError("Property " + key + " of " + node.type + " expected to have the following:\n" + errors.join("\n")); } } validate.shapeOf = shape; return validate; } function assertOptionalChainStart() { function validate(node) { var _current2; var current = node; while (node) { var _current = current, type = _current.type; if (type === "OptionalCallExpression") { if (current.optional) return; current = current.callee; continue; } if (type === "OptionalMemberExpression") { if (current.optional) return; current = current.object; continue; } break; } throw new TypeError("Non-optional " + node.type + " must chain from an optional OptionalMemberExpression or OptionalCallExpression. Found chain from " + ((_current2 = current) == null ? void 0 : _current2.type)); } return validate; } function chain$1() { for (var _len4 = arguments.length, fns = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) { fns[_key4] = arguments[_key4]; } function validate() { for (var _iterator3 = _createForOfIteratorHelperLoose(fns), _step3; !(_step3 = _iterator3()).done;) { var fn = _step3.value; fn.apply(void 0, arguments); } } validate.chainOf = fns; if (fns.length >= 2 && "type" in fns[0] && fns[0].type === "array" && !("each" in fns[1])) { throw new Error("An assertValueType(\"array\") validator can only be followed by an assertEach(...) validator."); } return validate; } var validTypeOpts = ["aliases", "builder", "deprecatedAlias", "fields", "inherits", "visitor", "validate"]; var validFieldKeys = ["default", "optional", "validate"]; var store = {}; function defineAliasedType() { for (var _len5 = arguments.length, aliases = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) { aliases[_key5] = arguments[_key5]; } return function (type, opts) { var _defined2; if (opts === void 0) { opts = {}; } var defined = opts.aliases; if (!defined) { var _store$opts$inherits$, _defined; if (opts.inherits) defined = (_store$opts$inherits$ = store[opts.inherits].aliases) == null ? void 0 : _store$opts$inherits$.slice(); (_defined = defined) != null ? _defined : defined = []; opts.aliases = defined; } var additional = aliases.filter(function (a) { return !defined.includes(a); }); (_defined2 = defined).unshift.apply(_defined2, _toConsumableArray(additional)); return defineType$5(type, opts); }; } function defineType$5(type, opts) { if (opts === void 0) { opts = {}; } var inherits = opts.inherits && store[opts.inherits] || {}; var fields = opts.fields; if (!fields) { fields = {}; if (inherits.fields) { var keys = Object.getOwnPropertyNames(inherits.fields); for (var _iterator4 = _createForOfIteratorHelperLoose(keys), _step4; !(_step4 = _iterator4()).done;) { var _key6 = _step4.value; var field = inherits.fields[_key6]; var def = field["default"]; if (Array.isArray(def) ? def.length > 0 : def && typeof def === "object") { throw new Error("field defaults can only be primitives or empty arrays currently"); } fields[_key6] = { "default": Array.isArray(def) ? [] : def, optional: field.optional, validate: field.validate }; } } } var visitor = opts.visitor || inherits.visitor || []; var aliases = opts.aliases || inherits.aliases || []; var builder = opts.builder || inherits.builder || opts.visitor || []; for (var _i2 = 0, _Object$keys2 = Object.keys(opts); _i2 < _Object$keys2.length; _i2++) { var k = _Object$keys2[_i2]; if (validTypeOpts.indexOf(k) === -1) { throw new Error("Unknown type option \"" + k + "\" on " + type); } } if (opts.deprecatedAlias) { DEPRECATED_KEYS$1[opts.deprecatedAlias] = type; } for (var _iterator5 = _createForOfIteratorHelperLoose(visitor.concat(builder)), _step5; !(_step5 = _iterator5()).done;) { var _key8 = _step5.value; fields[_key8] = fields[_key8] || {}; } for (var _i3 = 0, _Object$keys3 = Object.keys(fields); _i3 < _Object$keys3.length; _i3++) { var _key7 = _Object$keys3[_i3]; var _field = fields[_key7]; if (_field["default"] !== undefined && builder.indexOf(_key7) === -1) { _field.optional = true; } if (_field["default"] === undefined) { _field["default"] = null; } else if (!_field.validate && _field["default"] != null) { _field.validate = assertValueType(getType$2(_field["default"])); } for (var _i4 = 0, _Object$keys4 = Object.keys(_field); _i4 < _Object$keys4.length; _i4++) { var _k = _Object$keys4[_i4]; if (validFieldKeys.indexOf(_k) === -1) { throw new Error("Unknown field key \"" + _k + "\" on " + type + "." + _key7); } } } VISITOR_KEYS$5[type] = opts.visitor = visitor; BUILDER_KEYS[type] = opts.builder = builder; NODE_FIELDS[type] = opts.fields = fields; ALIAS_KEYS[type] = opts.aliases = aliases; aliases.forEach(function (alias) { FLIPPED_ALIAS_KEYS$3[alias] = FLIPPED_ALIAS_KEYS$3[alias] || []; FLIPPED_ALIAS_KEYS$3[alias].push(type); }); if (opts.validate) { NODE_PARENT_VALIDATIONS[type] = opts.validate; } store[type] = opts; } var defineType$4 = defineAliasedType("Standardized"); defineType$4("ArrayExpression", { fields: { elements: { validate: chain$1(assertValueType("array"), assertEach(assertNodeOrValueType("null", "Expression", "SpreadElement"))), "default": !browser$1$1.env.BABEL_TYPES_8_BREAKING ? [] : undefined } }, visitor: ["elements"], aliases: ["Expression"] }); defineType$4("AssignmentExpression", { fields: { operator: { validate: function () { if (!browser$1$1.env.BABEL_TYPES_8_BREAKING) { return assertValueType("string"); } var identifier = assertOneOf.apply(void 0, _toConsumableArray(ASSIGNMENT_OPERATORS)); var pattern = assertOneOf("="); return function (node, key, val) { var validator = is$1("Pattern", node.left) ? pattern : identifier; validator(node, key, val); }; }() }, left: { validate: !browser$1$1.env.BABEL_TYPES_8_BREAKING ? assertNodeType("LVal") : assertNodeType("Identifier", "MemberExpression", "ArrayPattern", "ObjectPattern", "TSAsExpression", "TSSatisfiesExpression", "TSTypeAssertion", "TSNonNullExpression") }, right: { validate: assertNodeType("Expression") } }, builder: ["operator", "left", "right"], visitor: ["left", "right"], aliases: ["Expression"] }); defineType$4("BinaryExpression", { builder: ["operator", "left", "right"], fields: { operator: { validate: assertOneOf.apply(void 0, _toConsumableArray(BINARY_OPERATORS)) }, left: { validate: function () { var expression = assertNodeType("Expression"); var inOp = assertNodeType("Expression", "PrivateName"); var validator = Object.assign(function (node, key, val) { var validator = node.operator === "in" ? inOp : expression; validator(node, key, val); }, { oneOfNodeTypes: ["Expression", "PrivateName"] }); return validator; }() }, right: { validate: assertNodeType("Expression") } }, visitor: ["left", "right"], aliases: ["Binary", "Expression"] }); defineType$4("InterpreterDirective", { builder: ["value"], fields: { value: { validate: assertValueType("string") } } }); defineType$4("Directive", { visitor: ["value"], fields: { value: { validate: assertNodeType("DirectiveLiteral") } } }); defineType$4("DirectiveLiteral", { builder: ["value"], fields: { value: { validate: assertValueType("string") } } }); defineType$4("BlockStatement", { builder: ["body", "directives"], visitor: ["directives", "body"], fields: { directives: { validate: chain$1(assertValueType("array"), assertEach(assertNodeType("Directive"))), "default": [] }, body: { validate: chain$1(assertValueType("array"), assertEach(assertNodeType("Statement"))) } }, aliases: ["Scopable", "BlockParent", "Block", "Statement"] }); defineType$4("BreakStatement", { visitor: ["label"], fields: { label: { validate: assertNodeType("Identifier"), optional: true } }, aliases: ["Statement", "Terminatorless", "CompletionStatement"] }); defineType$4("CallExpression", { visitor: ["callee", "arguments", "typeParameters", "typeArguments"], builder: ["callee", "arguments"], aliases: ["Expression"], fields: Object.assign({ callee: { validate: assertNodeType("Expression", "Super", "V8IntrinsicIdentifier") }, arguments: { validate: chain$1(assertValueType("array"), assertEach(assertNodeType("Expression", "SpreadElement", "JSXNamespacedName", "ArgumentPlaceholder"))) } }, !browser$1$1.env.BABEL_TYPES_8_BREAKING ? { optional: { validate: assertOneOf(true, false), optional: true } } : {}, { typeArguments: { validate: assertNodeType("TypeParameterInstantiation"), optional: true }, typeParameters: { validate: assertNodeType("TSTypeParameterInstantiation"), optional: true } }) }); defineType$4("CatchClause", { visitor: ["param", "body"], fields: { param: { validate: assertNodeType("Identifier", "ArrayPattern", "ObjectPattern"), optional: true }, body: { validate: assertNodeType("BlockStatement") } }, aliases: ["Scopable", "BlockParent"] }); defineType$4("ConditionalExpression", { visitor: ["test", "consequent", "alternate"], fields: { test: { validate: assertNodeType("Expression") }, consequent: { validate: assertNodeType("Expression") }, alternate: { validate: assertNodeType("Expression") } }, aliases: ["Expression", "Conditional"] }); defineType$4("ContinueStatement", { visitor: ["label"], fields: { label: { validate: assertNodeType("Identifier"), optional: true } }, aliases: ["Statement", "Terminatorless", "CompletionStatement"] }); defineType$4("DebuggerStatement", { aliases: ["Statement"] }); defineType$4("DoWhileStatement", { visitor: ["test", "body"], fields: { test: { validate: assertNodeType("Expression") }, body: { validate: assertNodeType("Statement") } }, aliases: ["Statement", "BlockParent", "Loop", "While", "Scopable"] }); defineType$4("EmptyStatement", { aliases: ["Statement"] }); defineType$4("ExpressionStatement", { visitor: ["expression"], fields: { expression: { validate: assertNodeType("Expression") } }, aliases: ["Statement", "ExpressionWrapper"] }); defineType$4("File", { builder: ["program", "comments", "tokens"], visitor: ["program"], fields: { program: { validate: assertNodeType("Program") }, comments: { validate: !browser$1$1.env.BABEL_TYPES_8_BREAKING ? Object.assign(function () {}, { each: { oneOfNodeTypes: ["CommentBlock", "CommentLine"] } }) : assertEach(assertNodeType("CommentBlock", "CommentLine")), optional: true }, tokens: { validate: assertEach(Object.assign(function () {}, { type: "any" })), optional: true } } }); defineType$4("ForInStatement", { visitor: ["left", "right", "body"], aliases: ["Scopable", "Statement", "For", "BlockParent", "Loop", "ForXStatement"], fields: { left: { validate: !browser$1$1.env.BABEL_TYPES_8_BREAKING ? assertNodeType("VariableDeclaration", "LVal") : assertNodeType("VariableDeclaration", "Identifier", "MemberExpression", "ArrayPattern", "ObjectPattern", "TSAsExpression", "TSSatisfiesExpression", "TSTypeAssertion", "TSNonNullExpression") }, right: { validate: assertNodeType("Expression") }, body: { validate: assertNodeType("Statement") } } }); defineType$4("ForStatement", { visitor: ["init", "test", "update", "body"], aliases: ["Scopable", "Statement", "For", "BlockParent", "Loop"], fields: { init: { validate: assertNodeType("VariableDeclaration", "Expression"), optional: true }, test: { validate: assertNodeType("Expression"), optional: true }, update: { validate: assertNodeType("Expression"), optional: true }, body: { validate: assertNodeType("Statement") } } }); var functionCommon = function functionCommon() { return { params: { validate: chain$1(assertValueType("array"), assertEach(assertNodeType("Identifier", "Pattern", "RestElement"))) }, generator: { "default": false }, async: { "default": false } }; }; var functionTypeAnnotationCommon = function functionTypeAnnotationCommon() { return { returnType: { validate: assertNodeType("TypeAnnotation", "TSTypeAnnotation", "Noop"), optional: true }, typeParameters: { validate: assertNodeType("TypeParameterDeclaration", "TSTypeParameterDeclaration", "Noop"), optional: true } }; }; var functionDeclarationCommon = function functionDeclarationCommon() { return Object.assign({}, functionCommon(), { declare: { validate: assertValueType("boolean"), optional: true }, id: { validate: assertNodeType("Identifier"), optional: true } }); }; defineType$4("FunctionDeclaration", { builder: ["id", "params", "body", "generator", "async"], visitor: ["id", "params", "body", "returnType", "typeParameters"], fields: Object.assign({}, functionDeclarationCommon(), functionTypeAnnotationCommon(), { body: { validate: assertNodeType("BlockStatement") }, predicate: { validate: assertNodeType("DeclaredPredicate", "InferredPredicate"), optional: true } }), aliases: ["Scopable", "Function", "BlockParent", "FunctionParent", "Statement", "Pureish", "Declaration"], validate: function () { if (!browser$1$1.env.BABEL_TYPES_8_BREAKING) return function () {}; var identifier = assertNodeType("Identifier"); return function (parent, key, node) { if (!is$1("ExportDefaultDeclaration", parent)) { identifier(node, "id", node.id); } }; }() }); defineType$4("FunctionExpression", { inherits: "FunctionDeclaration", aliases: ["Scopable", "Function", "BlockParent", "FunctionParent", "Expression", "Pureish"], fields: Object.assign({}, functionCommon(), functionTypeAnnotationCommon(), { id: { validate: assertNodeType("Identifier"), optional: true }, body: { validate: assertNodeType("BlockStatement") }, predicate: { validate: assertNodeType("DeclaredPredicate", "InferredPredicate"), optional: true } }) }); var patternLikeCommon = function patternLikeCommon() { return { typeAnnotation: { validate: assertNodeType("TypeAnnotation", "TSTypeAnnotation", "Noop"), optional: true }, optional: { validate: assertValueType("boolean"), optional: true }, decorators: { validate: chain$1(assertValueType("array"), assertEach(assertNodeType("Decorator"))), optional: true } }; }; defineType$4("Identifier", { builder: ["name"], visitor: ["typeAnnotation", "decorators"], aliases: ["Expression", "PatternLike", "LVal", "TSEntityName"], fields: Object.assign({}, patternLikeCommon(), { name: { validate: chain$1(assertValueType("string"), Object.assign(function (node, key, val) { if (!browser$1$1.env.BABEL_TYPES_8_BREAKING) return; if (!isValidIdentifier$1(val, false)) { throw new TypeError("\"" + val + "\" is not a valid identifier name"); } }, { type: "string" })) } }), validate: function validate(parent, key, node) { if (!browser$1$1.env.BABEL_TYPES_8_BREAKING) return; var match = /\.(\w+)$/.exec(key); if (!match) return; var _match = _slicedToArray(match, 2), parentKey = _match[1]; var nonComp = { computed: false }; if (parentKey === "property") { if (is$1("MemberExpression", parent, nonComp)) return; if (is$1("OptionalMemberExpression", parent, nonComp)) return; } else if (parentKey === "key") { if (is$1("Property", parent, nonComp)) return; if (is$1("Method", parent, nonComp)) return; } else if (parentKey === "exported") { if (is$1("ExportSpecifier", parent)) return; } else if (parentKey === "imported") { if (is$1("ImportSpecifier", parent, { imported: node })) return; } else if (parentKey === "meta") { if (is$1("MetaProperty", parent, { meta: node })) return; } if ((isKeyword(node.name) || isReservedWord(node.name, false)) && node.name !== "this") { throw new TypeError("\"" + node.name + "\" is not a valid identifier"); } } }); defineType$4("IfStatement", { visitor: ["test", "consequent", "alternate"], aliases: ["Statement", "Conditional"], fields: { test: { validate: assertNodeType("Expression") }, consequent: { validate: assertNodeType("Statement") }, alternate: { optional: true, validate: assertNodeType("Statement") } } }); defineType$4("LabeledStatement", { visitor: ["label", "body"], aliases: ["Statement"], fields: { label: { validate: assertNodeType("Identifier") }, body: { validate: assertNodeType("Statement") } } }); defineType$4("StringLiteral", { builder: ["value"], fields: { value: { validate: assertValueType("string") } }, aliases: ["Expression", "Pureish", "Literal", "Immutable"] }); defineType$4("NumericLiteral", { builder: ["value"], deprecatedAlias: "NumberLiteral", fields: { value: { validate: assertValueType("number") } }, aliases: ["Expression", "Pureish", "Literal", "Immutable"] }); defineType$4("NullLiteral", { aliases: ["Expression", "Pureish", "Literal", "Immutable"] }); defineType$4("BooleanLiteral", { builder: ["value"], fields: { value: { validate: assertValueType("boolean") } }, aliases: ["Expression", "Pureish", "Literal", "Immutable"] }); defineType$4("RegExpLiteral", { builder: ["pattern", "flags"], deprecatedAlias: "RegexLiteral", aliases: ["Expression", "Pureish", "Literal"], fields: { pattern: { validate: assertValueType("string") }, flags: { validate: chain$1(assertValueType("string"), Object.assign(function (node, key, val) { if (!browser$1$1.env.BABEL_TYPES_8_BREAKING) return; var invalid = /[^gimsuy]/.exec(val); if (invalid) { throw new TypeError("\"" + invalid[0] + "\" is not a valid RegExp flag"); } }, { type: "string" })), "default": "" } } }); defineType$4("LogicalExpression", { builder: ["operator", "left", "right"], visitor: ["left", "right"], aliases: ["Binary", "Expression"], fields: { operator: { validate: assertOneOf.apply(void 0, _toConsumableArray(LOGICAL_OPERATORS$3)) }, left: { validate: assertNodeType("Expression") }, right: { validate: assertNodeType("Expression") } } }); defineType$4("MemberExpression", { builder: ["object", "property", "computed"].concat(_toConsumableArray(!browser$1$1.env.BABEL_TYPES_8_BREAKING ? ["optional"] : [])), visitor: ["object", "property"], aliases: ["Expression", "LVal"], fields: Object.assign({ object: { validate: assertNodeType("Expression", "Super") }, property: { validate: function () { var normal = assertNodeType("Identifier", "PrivateName"); var computed = assertNodeType("Expression"); var validator = function validator(node, key, val) { var validator = node.computed ? computed : normal; validator(node, key, val); }; validator.oneOfNodeTypes = ["Expression", "Identifier", "PrivateName"]; return validator; }() }, computed: { "default": false } }, !browser$1$1.env.BABEL_TYPES_8_BREAKING ? { optional: { validate: assertOneOf(true, false), optional: true } } : {}) }); defineType$4("NewExpression", { inherits: "CallExpression" }); defineType$4("Program", { visitor: ["directives", "body"], builder: ["body", "directives", "sourceType", "interpreter"], fields: { sourceFile: { validate: assertValueType("string") }, sourceType: { validate: assertOneOf("script", "module"), "default": "script" }, interpreter: { validate: assertNodeType("InterpreterDirective"), "default": null, optional: true }, directives: { validate: chain$1(assertValueType("array"), assertEach(assertNodeType("Directive"))), "default": [] }, body: { validate: chain$1(assertValueType("array"), assertEach(assertNodeType("Statement"))) } }, aliases: ["Scopable", "BlockParent", "Block"] }); defineType$4("ObjectExpression", { visitor: ["properties"], aliases: ["Expression"], fields: { properties: { validate: chain$1(assertValueType("array"), assertEach(assertNodeType("ObjectMethod", "ObjectProperty", "SpreadElement"))) } } }); defineType$4("ObjectMethod", { builder: ["kind", "key", "params", "body", "computed", "generator", "async"], fields: Object.assign({}, functionCommon(), functionTypeAnnotationCommon(), { kind: Object.assign({ validate: assertOneOf("method", "get", "set") }, !browser$1$1.env.BABEL_TYPES_8_BREAKING ? { "default": "method" } : {}), computed: { "default": false }, key: { validate: function () { var normal = assertNodeType("Identifier", "StringLiteral", "NumericLiteral", "BigIntLiteral"); var computed = assertNodeType("Expression"); var validator = function validator(node, key, val) { var validator = node.computed ? computed : normal; validator(node, key, val); }; validator.oneOfNodeTypes = ["Expression", "Identifier", "StringLiteral", "NumericLiteral", "BigIntLiteral"]; return validator; }() }, decorators: { validate: chain$1(assertValueType("array"), assertEach(assertNodeType("Decorator"))), optional: true }, body: { validate: assertNodeType("BlockStatement") } }), visitor: ["key", "params", "body", "decorators", "returnType", "typeParameters"], aliases: ["UserWhitespacable", "Function", "Scopable", "BlockParent", "FunctionParent", "Method", "ObjectMember"] }); defineType$4("ObjectProperty", { builder: ["key", "value", "computed", "shorthand"].concat(_toConsumableArray(!browser$1$1.env.BABEL_TYPES_8_BREAKING ? ["decorators"] : [])), fields: { computed: { "default": false }, key: { validate: function () { var normal = assertNodeType("Identifier", "StringLiteral", "NumericLiteral", "BigIntLiteral", "DecimalLiteral", "PrivateName"); var computed = assertNodeType("Expression"); var validator = Object.assign(function (node, key, val) { var validator = node.computed ? computed : normal; validator(node, key, val); }, { oneOfNodeTypes: ["Expression", "Identifier", "StringLiteral", "NumericLiteral", "BigIntLiteral", "DecimalLiteral", "PrivateName"] }); return validator; }() }, value: { validate: assertNodeType("Expression", "PatternLike") }, shorthand: { validate: chain$1(assertValueType("boolean"), Object.assign(function (node, key, val) { if (!browser$1$1.env.BABEL_TYPES_8_BREAKING) return; if (val && node.computed) { throw new TypeError("Property shorthand of ObjectProperty cannot be true if computed is true"); } }, { type: "boolean" }), function (node, key, val) { if (!browser$1$1.env.BABEL_TYPES_8_BREAKING) return; if (val && !is$1("Identifier", node.key)) { throw new TypeError("Property shorthand of ObjectProperty cannot be true if key is not an Identifier"); } }), "default": false }, decorators: { validate: chain$1(assertValueType("array"), assertEach(assertNodeType("Decorator"))), optional: true } }, visitor: ["key", "value", "decorators"], aliases: ["UserWhitespacable", "Property", "ObjectMember"], validate: function () { var pattern = assertNodeType("Identifier", "Pattern", "TSAsExpression", "TSSatisfiesExpression", "TSNonNullExpression", "TSTypeAssertion"); var expression = assertNodeType("Expression"); return function (parent, key, node) { if (!browser$1$1.env.BABEL_TYPES_8_BREAKING) return; var validator = is$1("ObjectPattern", parent) ? pattern : expression; validator(node, "value", node.value); }; }() }); defineType$4("RestElement", { visitor: ["argument", "typeAnnotation"], builder: ["argument"], aliases: ["LVal", "PatternLike"], deprecatedAlias: "RestProperty", fields: Object.assign({}, patternLikeCommon(), { argument: { validate: !browser$1$1.env.BABEL_TYPES_8_BREAKING ? assertNodeType("LVal") : assertNodeType("Identifier", "ArrayPattern", "ObjectPattern", "MemberExpression", "TSAsExpression", "TSSatisfiesExpression", "TSTypeAssertion", "TSNonNullExpression") } }), validate: function validate(parent, key) { if (!browser$1$1.env.BABEL_TYPES_8_BREAKING) return; var match = /(\w+)\[(\d+)\]/.exec(key); if (!match) throw new Error("Internal Babel error: malformed key."); var _ref = match, _ref2 = _slicedToArray(_ref, 3), listKey = _ref2[1], index = _ref2[2]; if (parent[listKey].length > +index + 1) { throw new TypeError("RestElement must be last element of " + listKey); } } }); defineType$4("ReturnStatement", { visitor: ["argument"], aliases: ["Statement", "Terminatorless", "CompletionStatement"], fields: { argument: { validate: assertNodeType("Expression"), optional: true } } }); defineType$4("SequenceExpression", { visitor: ["expressions"], fields: { expressions: { validate: chain$1(assertValueType("array"), assertEach(assertNodeType("Expression"))) } }, aliases: ["Expression"] }); defineType$4("ParenthesizedExpression", { visitor: ["expression"], aliases: ["Expression", "ExpressionWrapper"], fields: { expression: { validate: assertNodeType("Expression") } } }); defineType$4("SwitchCase", { visitor: ["test", "consequent"], fields: { test: { validate: assertNodeType("Expression"), optional: true }, consequent: { validate: chain$1(assertValueType("array"), assertEach(assertNodeType("Statement"))) } } }); defineType$4("SwitchStatement", { visitor: ["discriminant", "cases"], aliases: ["Statement", "BlockParent", "Scopable"], fields: { discriminant: { validate: assertNodeType("Expression") }, cases: { validate: chain$1(assertValueType("array"), assertEach(assertNodeType("SwitchCase"))) } } }); defineType$4("ThisExpression", { aliases: ["Expression"] }); defineType$4("ThrowStatement", { visitor: ["argument"], aliases: ["Statement", "Terminatorless", "CompletionStatement"], fields: { argument: { validate: assertNodeType("Expression") } } }); defineType$4("TryStatement", { visitor: ["block", "handler", "finalizer"], aliases: ["Statement"], fields: { block: { validate: chain$1(assertNodeType("BlockStatement"), Object.assign(function (node) { if (!browser$1$1.env.BABEL_TYPES_8_BREAKING) return; if (!node.handler && !node.finalizer) { throw new TypeError("TryStatement expects either a handler or finalizer, or both"); } }, { oneOfNodeTypes: ["BlockStatement"] })) }, handler: { optional: true, validate: assertNodeType("CatchClause") }, finalizer: { optional: true, validate: assertNodeType("BlockStatement") } } }); defineType$4("UnaryExpression", { builder: ["operator", "argument", "prefix"], fields: { prefix: { "default": true }, argument: { validate: assertNodeType("Expression") }, operator: { validate: assertOneOf.apply(void 0, _toConsumableArray(UNARY_OPERATORS)) } }, visitor: ["argument"], aliases: ["UnaryLike", "Expression"] }); defineType$4("UpdateExpression", { builder: ["operator", "argument", "prefix"], fields: { prefix: { "default": false }, argument: { validate: !browser$1$1.env.BABEL_TYPES_8_BREAKING ? assertNodeType("Expression") : assertNodeType("Identifier", "MemberExpression") }, operator: { validate: assertOneOf.apply(void 0, _toConsumableArray(UPDATE_OPERATORS)) } }, visitor: ["argument"], aliases: ["Expression"] }); defineType$4("VariableDeclaration", { builder: ["kind", "declarations"], visitor: ["declarations"], aliases: ["Statement", "Declaration"], fields: { declare: { validate: assertValueType("boolean"), optional: true }, kind: { validate: assertOneOf("var", "let", "const", "using") }, declarations: { validate: chain$1(assertValueType("array"), assertEach(assertNodeType("VariableDeclarator"))) } }, validate: function validate(parent, key, node) { if (!browser$1$1.env.BABEL_TYPES_8_BREAKING) return; if (!is$1("ForXStatement", parent, { left: node })) return; if (node.declarations.length !== 1) { throw new TypeError("Exactly one VariableDeclarator is required in the VariableDeclaration of a " + parent.type); } } }); defineType$4("VariableDeclarator", { visitor: ["id", "init"], fields: { id: { validate: function () { if (!browser$1$1.env.BABEL_TYPES_8_BREAKING) { return assertNodeType("LVal"); } var normal = assertNodeType("Identifier", "ArrayPattern", "ObjectPattern"); var without = assertNodeType("Identifier"); return function (node, key, val) { var validator = node.init ? normal : without; validator(node, key, val); }; }() }, definite: { optional: true, validate: assertValueType("boolean") }, init: { optional: true, validate: assertNodeType("Expression") } } }); defineType$4("WhileStatement", { visitor: ["test", "body"], aliases: ["Statement", "BlockParent", "Loop", "While", "Scopable"], fields: { test: { validate: assertNodeType("Expression") }, body: { validate: assertNodeType("Statement") } } }); defineType$4("WithStatement", { visitor: ["object", "body"], aliases: ["Statement"], fields: { object: { validate: assertNodeType("Expression") }, body: { validate: assertNodeType("Statement") } } }); defineType$4("AssignmentPattern", { visitor: ["left", "right", "decorators"], builder: ["left", "right"], aliases: ["Pattern", "PatternLike", "LVal"], fields: Object.assign({}, patternLikeCommon(), { left: { validate: assertNodeType("Identifier", "ObjectPattern", "ArrayPattern", "MemberExpression", "TSAsExpression", "TSSatisfiesExpression", "TSTypeAssertion", "TSNonNullExpression") }, right: { validate: assertNodeType("Expression") }, decorators: { validate: chain$1(assertValueType("array"), assertEach(assertNodeType("Decorator"))), optional: true } }) }); defineType$4("ArrayPattern", { visitor: ["elements", "typeAnnotation"], builder: ["elements"], aliases: ["Pattern", "PatternLike", "LVal"], fields: Object.assign({}, patternLikeCommon(), { elements: { validate: chain$1(assertValueType("array"), assertEach(assertNodeOrValueType("null", "PatternLike", "LVal"))) } }) }); defineType$4("ArrowFunctionExpression", { builder: ["params", "body", "async"], visitor: ["params", "body", "returnType", "typeParameters"], aliases: ["Scopable", "Function", "BlockParent", "FunctionParent", "Expression", "Pureish"], fields: Object.assign({}, functionCommon(), functionTypeAnnotationCommon(), { expression: { validate: assertValueType("boolean") }, body: { validate: assertNodeType("BlockStatement", "Expression") }, predicate: { validate: assertNodeType("DeclaredPredicate", "InferredPredicate"), optional: true } }) }); defineType$4("ClassBody", { visitor: ["body"], fields: { body: { validate: chain$1(assertValueType("array"), assertEach(assertNodeType("ClassMethod", "ClassPrivateMethod", "ClassProperty", "ClassPrivateProperty", "ClassAccessorProperty", "TSDeclareMethod", "TSIndexSignature", "StaticBlock"))) } } }); defineType$4("ClassExpression", { builder: ["id", "superClass", "body", "decorators"], visitor: ["id", "body", "superClass", "mixins", "typeParameters", "superTypeParameters", "implements", "decorators"], aliases: ["Scopable", "Class", "Expression"], fields: { id: { validate: assertNodeType("Identifier"), optional: true }, typeParameters: { validate: assertNodeType("TypeParameterDeclaration", "TSTypeParameterDeclaration", "Noop"), optional: true }, body: { validate: assertNodeType("ClassBody") }, superClass: { optional: true, validate: assertNodeType("Expression") }, superTypeParameters: { validate: assertNodeType("TypeParameterInstantiation", "TSTypeParameterInstantiation"), optional: true }, "implements": { validate: chain$1(assertValueType("array"), assertEach(assertNodeType("TSExpressionWithTypeArguments", "ClassImplements"))), optional: true }, decorators: { validate: chain$1(assertValueType("array"), assertEach(assertNodeType("Decorator"))), optional: true }, mixins: { validate: assertNodeType("InterfaceExtends"), optional: true } } }); defineType$4("ClassDeclaration", { inherits: "ClassExpression", aliases: ["Scopable", "Class", "Statement", "Declaration"], fields: { id: { validate: assertNodeType("Identifier") }, typeParameters: { validate: assertNodeType("TypeParameterDeclaration", "TSTypeParameterDeclaration", "Noop"), optional: true }, body: { validate: assertNodeType("ClassBody") }, superClass: { optional: true, validate: assertNodeType("Expression") }, superTypeParameters: { validate: assertNodeType("TypeParameterInstantiation", "TSTypeParameterInstantiation"), optional: true }, "implements": { validate: chain$1(assertValueType("array"), assertEach(assertNodeType("TSExpressionWithTypeArguments", "ClassImplements"))), optional: true }, decorators: { validate: chain$1(assertValueType("array"), assertEach(assertNodeType("Decorator"))), optional: true }, mixins: { validate: assertNodeType("InterfaceExtends"), optional: true }, declare: { validate: assertValueType("boolean"), optional: true }, "abstract": { validate: assertValueType("boolean"), optional: true } }, validate: function () { var identifier = assertNodeType("Identifier"); return function (parent, key, node) { if (!browser$1$1.env.BABEL_TYPES_8_BREAKING) return; if (!is$1("ExportDefaultDeclaration", parent)) { identifier(node, "id", node.id); } }; }() }); defineType$4("ExportAllDeclaration", { visitor: ["source"], aliases: ["Statement", "Declaration", "ImportOrExportDeclaration", "ExportDeclaration"], fields: { source: { validate: assertNodeType("StringLiteral") }, exportKind: validateOptional(assertOneOf("type", "value")), assertions: { optional: true, validate: chain$1(assertValueType("array"), assertEach(assertNodeType("ImportAttribute"))) } } }); defineType$4("ExportDefaultDeclaration", { visitor: ["declaration"], aliases: ["Statement", "Declaration", "ImportOrExportDeclaration", "ExportDeclaration"], fields: { declaration: { validate: assertNodeType("TSDeclareFunction", "FunctionDeclaration", "ClassDeclaration", "Expression") }, exportKind: validateOptional(assertOneOf("value")) } }); defineType$4("ExportNamedDeclaration", { visitor: ["declaration", "specifiers", "source"], aliases: ["Statement", "Declaration", "ImportOrExportDeclaration", "ExportDeclaration"], fields: { declaration: { optional: true, validate: chain$1(assertNodeType("Declaration"), Object.assign(function (node, key, val) { if (!browser$1$1.env.BABEL_TYPES_8_BREAKING) return; if (val && node.specifiers.length) { throw new TypeError("Only declaration or specifiers is allowed on ExportNamedDeclaration"); } }, { oneOfNodeTypes: ["Declaration"] }), function (node, key, val) { if (!browser$1$1.env.BABEL_TYPES_8_BREAKING) return; if (val && node.source) { throw new TypeError("Cannot export a declaration from a source"); } }) }, assertions: { optional: true, validate: chain$1(assertValueType("array"), assertEach(assertNodeType("ImportAttribute"))) }, specifiers: { "default": [], validate: chain$1(assertValueType("array"), assertEach(function () { var sourced = assertNodeType("ExportSpecifier", "ExportDefaultSpecifier", "ExportNamespaceSpecifier"); var sourceless = assertNodeType("ExportSpecifier"); if (!browser$1$1.env.BABEL_TYPES_8_BREAKING) return sourced; return function (node, key, val) { var validator = node.source ? sourced : sourceless; validator(node, key, val); }; }())) }, source: { validate: assertNodeType("StringLiteral"), optional: true }, exportKind: validateOptional(assertOneOf("type", "value")) } }); defineType$4("ExportSpecifier", { visitor: ["local", "exported"], aliases: ["ModuleSpecifier"], fields: { local: { validate: assertNodeType("Identifier") }, exported: { validate: assertNodeType("Identifier", "StringLiteral") }, exportKind: { validate: assertOneOf("type", "value"), optional: true } } }); defineType$4("ForOfStatement", { visitor: ["left", "right", "body"], builder: ["left", "right", "body", "await"], aliases: ["Scopable", "Statement", "For", "BlockParent", "Loop", "ForXStatement"], fields: { left: { validate: function () { if (!browser$1$1.env.BABEL_TYPES_8_BREAKING) { return assertNodeType("VariableDeclaration", "LVal"); } var declaration = assertNodeType("VariableDeclaration"); var lval = assertNodeType("Identifier", "MemberExpression", "ArrayPattern", "ObjectPattern", "TSAsExpression", "TSSatisfiesExpression", "TSTypeAssertion", "TSNonNullExpression"); return function (node, key, val) { if (is$1("VariableDeclaration", val)) { declaration(node, key, val); } else { lval(node, key, val); } }; }() }, right: { validate: assertNodeType("Expression") }, body: { validate: assertNodeType("Statement") }, "await": { "default": false } } }); defineType$4("ImportDeclaration", { visitor: ["specifiers", "source"], aliases: ["Statement", "Declaration", "ImportOrExportDeclaration"], fields: { assertions: { optional: true, validate: chain$1(assertValueType("array"), assertEach(assertNodeType("ImportAttribute"))) }, module: { optional: true, validate: assertValueType("boolean") }, specifiers: { validate: chain$1(assertValueType("array"), assertEach(assertNodeType("ImportSpecifier", "ImportDefaultSpecifier", "ImportNamespaceSpecifier"))) }, source: { validate: assertNodeType("StringLiteral") }, importKind: { validate: assertOneOf("type", "typeof", "value"), optional: true } } }); defineType$4("ImportDefaultSpecifier", { visitor: ["local"], aliases: ["ModuleSpecifier"], fields: { local: { validate: assertNodeType("Identifier") } } }); defineType$4("ImportNamespaceSpecifier", { visitor: ["local"], aliases: ["ModuleSpecifier"], fields: { local: { validate: assertNodeType("Identifier") } } }); defineType$4("ImportSpecifier", { visitor: ["local", "imported"], aliases: ["ModuleSpecifier"], fields: { local: { validate: assertNodeType("Identifier") }, imported: { validate: assertNodeType("Identifier", "StringLiteral") }, importKind: { validate: assertOneOf("type", "typeof", "value"), optional: true } } }); defineType$4("MetaProperty", { visitor: ["meta", "property"], aliases: ["Expression"], fields: { meta: { validate: chain$1(assertNodeType("Identifier"), Object.assign(function (node, key, val) { if (!browser$1$1.env.BABEL_TYPES_8_BREAKING) return; var property; switch (val.name) { case "function": property = "sent"; break; case "new": property = "target"; break; case "import": property = "meta"; break; } if (!is$1("Identifier", node.property, { name: property })) { throw new TypeError("Unrecognised MetaProperty"); } }, { oneOfNodeTypes: ["Identifier"] })) }, property: { validate: assertNodeType("Identifier") } } }); var classMethodOrPropertyCommon = function classMethodOrPropertyCommon() { return { "abstract": { validate: assertValueType("boolean"), optional: true }, accessibility: { validate: assertOneOf("public", "private", "protected"), optional: true }, "static": { "default": false }, override: { "default": false }, computed: { "default": false }, optional: { validate: assertValueType("boolean"), optional: true }, key: { validate: chain$1(function () { var normal = assertNodeType("Identifier", "StringLiteral", "NumericLiteral"); var computed = assertNodeType("Expression"); return function (node, key, val) { var validator = node.computed ? computed : normal; validator(node, key, val); }; }(), assertNodeType("Identifier", "StringLiteral", "NumericLiteral", "BigIntLiteral", "Expression")) } }; }; var classMethodOrDeclareMethodCommon = function classMethodOrDeclareMethodCommon() { return Object.assign({}, functionCommon(), classMethodOrPropertyCommon(), { params: { validate: chain$1(assertValueType("array"), assertEach(assertNodeType("Identifier", "Pattern", "RestElement", "TSParameterProperty"))) }, kind: { validate: assertOneOf("get", "set", "method", "constructor"), "default": "method" }, access: { validate: chain$1(assertValueType("string"), assertOneOf("public", "private", "protected")), optional: true }, decorators: { validate: chain$1(assertValueType("array"), assertEach(assertNodeType("Decorator"))), optional: true } }); }; defineType$4("ClassMethod", { aliases: ["Function", "Scopable", "BlockParent", "FunctionParent", "Method"], builder: ["kind", "key", "params", "body", "computed", "static", "generator", "async"], visitor: ["key", "params", "body", "decorators", "returnType", "typeParameters"], fields: Object.assign({}, classMethodOrDeclareMethodCommon(), functionTypeAnnotationCommon(), { body: { validate: assertNodeType("BlockStatement") } }) }); defineType$4("ObjectPattern", { visitor: ["properties", "typeAnnotation", "decorators"], builder: ["properties"], aliases: ["Pattern", "PatternLike", "LVal"], fields: Object.assign({}, patternLikeCommon(), { properties: { validate: chain$1(assertValueType("array"), assertEach(assertNodeType("RestElement", "ObjectProperty"))) } }) }); defineType$4("SpreadElement", { visitor: ["argument"], aliases: ["UnaryLike"], deprecatedAlias: "SpreadProperty", fields: { argument: { validate: assertNodeType("Expression") } } }); defineType$4("Super", { aliases: ["Expression"] }); defineType$4("TaggedTemplateExpression", { visitor: ["tag", "quasi", "typeParameters"], builder: ["tag", "quasi"], aliases: ["Expression"], fields: { tag: { validate: assertNodeType("Expression") }, quasi: { validate: assertNodeType("TemplateLiteral") }, typeParameters: { validate: assertNodeType("TypeParameterInstantiation", "TSTypeParameterInstantiation"), optional: true } } }); defineType$4("TemplateElement", { builder: ["value", "tail"], fields: { value: { validate: chain$1(assertShape({ raw: { validate: assertValueType("string") }, cooked: { validate: assertValueType("string"), optional: true } }), function templateElementCookedValidator(node) { var raw = node.value.raw; var unterminatedCalled = false; var error = function error() { throw new Error("Internal @babel/types error."); }; var _readStringContents = readStringContents("template", raw, 0, 0, 0, { unterminated: function unterminated() { unterminatedCalled = true; }, strictNumericEscape: error, invalidEscapeSequence: error, numericSeparatorInEscapeSequence: error, unexpectedNumericSeparator: error, invalidDigit: error, invalidCodePoint: error }), str = _readStringContents.str, firstInvalidLoc = _readStringContents.firstInvalidLoc; if (!unterminatedCalled) throw new Error("Invalid raw"); node.value.cooked = firstInvalidLoc ? null : str; }) }, tail: { "default": false } } }); defineType$4("TemplateLiteral", { visitor: ["quasis", "expressions"], aliases: ["Expression", "Literal"], fields: { quasis: { validate: chain$1(assertValueType("array"), assertEach(assertNodeType("TemplateElement"))) }, expressions: { validate: chain$1(assertValueType("array"), assertEach(assertNodeType("Expression", "TSType")), function (node, key, val) { if (node.quasis.length !== val.length + 1) { throw new TypeError("Number of " + node.type + " quasis should be exactly one more than the number of expressions.\nExpected " + (val.length + 1) + " quasis but got " + node.quasis.length); } }) } } }); defineType$4("YieldExpression", { builder: ["argument", "delegate"], visitor: ["argument"], aliases: ["Expression", "Terminatorless"], fields: { delegate: { validate: chain$1(assertValueType("boolean"), Object.assign(function (node, key, val) { if (!browser$1$1.env.BABEL_TYPES_8_BREAKING) return; if (val && !node.argument) { throw new TypeError("Property delegate of YieldExpression cannot be true if there is no argument"); } }, { type: "boolean" })), "default": false }, argument: { optional: true, validate: assertNodeType("Expression") } } }); defineType$4("AwaitExpression", { builder: ["argument"], visitor: ["argument"], aliases: ["Expression", "Terminatorless"], fields: { argument: { validate: assertNodeType("Expression") } } }); defineType$4("Import", { aliases: ["Expression"] }); defineType$4("BigIntLiteral", { builder: ["value"], fields: { value: { validate: assertValueType("string") } }, aliases: ["Expression", "Pureish", "Literal", "Immutable"] }); defineType$4("ExportNamespaceSpecifier", { visitor: ["exported"], aliases: ["ModuleSpecifier"], fields: { exported: { validate: assertNodeType("Identifier") } } }); defineType$4("OptionalMemberExpression", { builder: ["object", "property", "computed", "optional"], visitor: ["object", "property"], aliases: ["Expression"], fields: { object: { validate: assertNodeType("Expression") }, property: { validate: function () { var normal = assertNodeType("Identifier"); var computed = assertNodeType("Expression"); var validator = Object.assign(function (node, key, val) { var validator = node.computed ? computed : normal; validator(node, key, val); }, { oneOfNodeTypes: ["Expression", "Identifier"] }); return validator; }() }, computed: { "default": false }, optional: { validate: !browser$1$1.env.BABEL_TYPES_8_BREAKING ? assertValueType("boolean") : chain$1(assertValueType("boolean"), assertOptionalChainStart()) } } }); defineType$4("OptionalCallExpression", { visitor: ["callee", "arguments", "typeParameters", "typeArguments"], builder: ["callee", "arguments", "optional"], aliases: ["Expression"], fields: { callee: { validate: assertNodeType("Expression") }, arguments: { validate: chain$1(assertValueType("array"), assertEach(assertNodeType("Expression", "SpreadElement", "JSXNamespacedName", "ArgumentPlaceholder"))) }, optional: { validate: !browser$1$1.env.BABEL_TYPES_8_BREAKING ? assertValueType("boolean") : chain$1(assertValueType("boolean"), assertOptionalChainStart()) }, typeArguments: { validate: assertNodeType("TypeParameterInstantiation"), optional: true }, typeParameters: { validate: assertNodeType("TSTypeParameterInstantiation"), optional: true } } }); defineType$4("ClassProperty", { visitor: ["key", "value", "typeAnnotation", "decorators"], builder: ["key", "value", "typeAnnotation", "decorators", "computed", "static"], aliases: ["Property"], fields: Object.assign({}, classMethodOrPropertyCommon(), { value: { validate: assertNodeType("Expression"), optional: true }, definite: { validate: assertValueType("boolean"), optional: true }, typeAnnotation: { validate: assertNodeType("TypeAnnotation", "TSTypeAnnotation", "Noop"), optional: true }, decorators: { validate: chain$1(assertValueType("array"), assertEach(assertNodeType("Decorator"))), optional: true }, readonly: { validate: assertValueType("boolean"), optional: true }, declare: { validate: assertValueType("boolean"), optional: true }, variance: { validate: assertNodeType("Variance"), optional: true } }) }); defineType$4("ClassAccessorProperty", { visitor: ["key", "value", "typeAnnotation", "decorators"], builder: ["key", "value", "typeAnnotation", "decorators", "computed", "static"], aliases: ["Property", "Accessor"], fields: Object.assign({}, classMethodOrPropertyCommon(), { key: { validate: chain$1(function () { var normal = assertNodeType("Identifier", "StringLiteral", "NumericLiteral", "BigIntLiteral", "PrivateName"); var computed = assertNodeType("Expression"); return function (node, key, val) { var validator = node.computed ? computed : normal; validator(node, key, val); }; }(), assertNodeType("Identifier", "StringLiteral", "NumericLiteral", "BigIntLiteral", "Expression", "PrivateName")) }, value: { validate: assertNodeType("Expression"), optional: true }, definite: { validate: assertValueType("boolean"), optional: true }, typeAnnotation: { validate: assertNodeType("TypeAnnotation", "TSTypeAnnotation", "Noop"), optional: true }, decorators: { validate: chain$1(assertValueType("array"), assertEach(assertNodeType("Decorator"))), optional: true }, readonly: { validate: assertValueType("boolean"), optional: true }, declare: { validate: assertValueType("boolean"), optional: true }, variance: { validate: assertNodeType("Variance"), optional: true } }) }); defineType$4("ClassPrivateProperty", { visitor: ["key", "value", "decorators", "typeAnnotation"], builder: ["key", "value", "decorators", "static"], aliases: ["Property", "Private"], fields: { key: { validate: assertNodeType("PrivateName") }, value: { validate: assertNodeType("Expression"), optional: true }, typeAnnotation: { validate: assertNodeType("TypeAnnotation", "TSTypeAnnotation", "Noop"), optional: true }, decorators: { validate: chain$1(assertValueType("array"), assertEach(assertNodeType("Decorator"))), optional: true }, "static": { validate: assertValueType("boolean"), "default": false }, readonly: { validate: assertValueType("boolean"), optional: true }, definite: { validate: assertValueType("boolean"), optional: true }, variance: { validate: assertNodeType("Variance"), optional: true } } }); defineType$4("ClassPrivateMethod", { builder: ["kind", "key", "params", "body", "static"], visitor: ["key", "params", "body", "decorators", "returnType", "typeParameters"], aliases: ["Function", "Scopable", "BlockParent", "FunctionParent", "Method", "Private"], fields: Object.assign({}, classMethodOrDeclareMethodCommon(), functionTypeAnnotationCommon(), { kind: { validate: assertOneOf("get", "set", "method"), "default": "method" }, key: { validate: assertNodeType("PrivateName") }, body: { validate: assertNodeType("BlockStatement") } }) }); defineType$4("PrivateName", { visitor: ["id"], aliases: ["Private"], fields: { id: { validate: assertNodeType("Identifier") } } }); defineType$4("StaticBlock", { visitor: ["body"], fields: { body: { validate: chain$1(assertValueType("array"), assertEach(assertNodeType("Statement"))) } }, aliases: ["Scopable", "BlockParent", "FunctionParent"] }); var defineType$3 = defineAliasedType("Flow"); var defineInterfaceishType = function defineInterfaceishType(name) { defineType$3(name, { builder: ["id", "typeParameters", "extends", "body"], visitor: ["id", "typeParameters", "extends", "mixins", "implements", "body"], aliases: ["FlowDeclaration", "Statement", "Declaration"], fields: { id: validateType("Identifier"), typeParameters: validateOptionalType("TypeParameterDeclaration"), "extends": validateOptional(arrayOfType("InterfaceExtends")), mixins: validateOptional(arrayOfType("InterfaceExtends")), "implements": validateOptional(arrayOfType("ClassImplements")), body: validateType("ObjectTypeAnnotation") } }); }; defineType$3("AnyTypeAnnotation", { aliases: ["FlowType", "FlowBaseAnnotation"] }); defineType$3("ArrayTypeAnnotation", { visitor: ["elementType"], aliases: ["FlowType"], fields: { elementType: validateType("FlowType") } }); defineType$3("BooleanTypeAnnotation", { aliases: ["FlowType", "FlowBaseAnnotation"] }); defineType$3("BooleanLiteralTypeAnnotation", { builder: ["value"], aliases: ["FlowType"], fields: { value: validate$6(assertValueType("boolean")) } }); defineType$3("NullLiteralTypeAnnotation", { aliases: ["FlowType", "FlowBaseAnnotation"] }); defineType$3("ClassImplements", { visitor: ["id", "typeParameters"], fields: { id: validateType("Identifier"), typeParameters: validateOptionalType("TypeParameterInstantiation") } }); defineInterfaceishType("DeclareClass"); defineType$3("DeclareFunction", { visitor: ["id"], aliases: ["FlowDeclaration", "Statement", "Declaration"], fields: { id: validateType("Identifier"), predicate: validateOptionalType("DeclaredPredicate") } }); defineInterfaceishType("DeclareInterface"); defineType$3("DeclareModule", { builder: ["id", "body", "kind"], visitor: ["id", "body"], aliases: ["FlowDeclaration", "Statement", "Declaration"], fields: { id: validateType(["Identifier", "StringLiteral"]), body: validateType("BlockStatement"), kind: validateOptional(assertOneOf("CommonJS", "ES")) } }); defineType$3("DeclareModuleExports", { visitor: ["typeAnnotation"], aliases: ["FlowDeclaration", "Statement", "Declaration"], fields: { typeAnnotation: validateType("TypeAnnotation") } }); defineType$3("DeclareTypeAlias", { visitor: ["id", "typeParameters", "right"], aliases: ["FlowDeclaration", "Statement", "Declaration"], fields: { id: validateType("Identifier"), typeParameters: validateOptionalType("TypeParameterDeclaration"), right: validateType("FlowType") } }); defineType$3("DeclareOpaqueType", { visitor: ["id", "typeParameters", "supertype"], aliases: ["FlowDeclaration", "Statement", "Declaration"], fields: { id: validateType("Identifier"), typeParameters: validateOptionalType("TypeParameterDeclaration"), supertype: validateOptionalType("FlowType"), impltype: validateOptionalType("FlowType") } }); defineType$3("DeclareVariable", { visitor: ["id"], aliases: ["FlowDeclaration", "Statement", "Declaration"], fields: { id: validateType("Identifier") } }); defineType$3("DeclareExportDeclaration", { visitor: ["declaration", "specifiers", "source"], aliases: ["FlowDeclaration", "Statement", "Declaration"], fields: { declaration: validateOptionalType("Flow"), specifiers: validateOptional(arrayOfType(["ExportSpecifier", "ExportNamespaceSpecifier"])), source: validateOptionalType("StringLiteral"), "default": validateOptional(assertValueType("boolean")) } }); defineType$3("DeclareExportAllDeclaration", { visitor: ["source"], aliases: ["FlowDeclaration", "Statement", "Declaration"], fields: { source: validateType("StringLiteral"), exportKind: validateOptional(assertOneOf("type", "value")) } }); defineType$3("DeclaredPredicate", { visitor: ["value"], aliases: ["FlowPredicate"], fields: { value: validateType("Flow") } }); defineType$3("ExistsTypeAnnotation", { aliases: ["FlowType"] }); defineType$3("FunctionTypeAnnotation", { visitor: ["typeParameters", "params", "rest", "returnType"], aliases: ["FlowType"], fields: { typeParameters: validateOptionalType("TypeParameterDeclaration"), params: validate$6(arrayOfType("FunctionTypeParam")), rest: validateOptionalType("FunctionTypeParam"), "this": validateOptionalType("FunctionTypeParam"), returnType: validateType("FlowType") } }); defineType$3("FunctionTypeParam", { visitor: ["name", "typeAnnotation"], fields: { name: validateOptionalType("Identifier"), typeAnnotation: validateType("FlowType"), optional: validateOptional(assertValueType("boolean")) } }); defineType$3("GenericTypeAnnotation", { visitor: ["id", "typeParameters"], aliases: ["FlowType"], fields: { id: validateType(["Identifier", "QualifiedTypeIdentifier"]), typeParameters: validateOptionalType("TypeParameterInstantiation") } }); defineType$3("InferredPredicate", { aliases: ["FlowPredicate"] }); defineType$3("InterfaceExtends", { visitor: ["id", "typeParameters"], fields: { id: validateType(["Identifier", "QualifiedTypeIdentifier"]), typeParameters: validateOptionalType("TypeParameterInstantiation") } }); defineInterfaceishType("InterfaceDeclaration"); defineType$3("InterfaceTypeAnnotation", { visitor: ["extends", "body"], aliases: ["FlowType"], fields: { "extends": validateOptional(arrayOfType("InterfaceExtends")), body: validateType("ObjectTypeAnnotation") } }); defineType$3("IntersectionTypeAnnotation", { visitor: ["types"], aliases: ["FlowType"], fields: { types: validate$6(arrayOfType("FlowType")) } }); defineType$3("MixedTypeAnnotation", { aliases: ["FlowType", "FlowBaseAnnotation"] }); defineType$3("EmptyTypeAnnotation", { aliases: ["FlowType", "FlowBaseAnnotation"] }); defineType$3("NullableTypeAnnotation", { visitor: ["typeAnnotation"], aliases: ["FlowType"], fields: { typeAnnotation: validateType("FlowType") } }); defineType$3("NumberLiteralTypeAnnotation", { builder: ["value"], aliases: ["FlowType"], fields: { value: validate$6(assertValueType("number")) } }); defineType$3("NumberTypeAnnotation", { aliases: ["FlowType", "FlowBaseAnnotation"] }); defineType$3("ObjectTypeAnnotation", { visitor: ["properties", "indexers", "callProperties", "internalSlots"], aliases: ["FlowType"], builder: ["properties", "indexers", "callProperties", "internalSlots", "exact"], fields: { properties: validate$6(arrayOfType(["ObjectTypeProperty", "ObjectTypeSpreadProperty"])), indexers: { validate: arrayOfType("ObjectTypeIndexer"), optional: true, "default": [] }, callProperties: { validate: arrayOfType("ObjectTypeCallProperty"), optional: true, "default": [] }, internalSlots: { validate: arrayOfType("ObjectTypeInternalSlot"), optional: true, "default": [] }, exact: { validate: assertValueType("boolean"), "default": false }, inexact: validateOptional(assertValueType("boolean")) } }); defineType$3("ObjectTypeInternalSlot", { visitor: ["id", "value", "optional", "static", "method"], aliases: ["UserWhitespacable"], fields: { id: validateType("Identifier"), value: validateType("FlowType"), optional: validate$6(assertValueType("boolean")), "static": validate$6(assertValueType("boolean")), method: validate$6(assertValueType("boolean")) } }); defineType$3("ObjectTypeCallProperty", { visitor: ["value"], aliases: ["UserWhitespacable"], fields: { value: validateType("FlowType"), "static": validate$6(assertValueType("boolean")) } }); defineType$3("ObjectTypeIndexer", { visitor: ["id", "key", "value", "variance"], aliases: ["UserWhitespacable"], fields: { id: validateOptionalType("Identifier"), key: validateType("FlowType"), value: validateType("FlowType"), "static": validate$6(assertValueType("boolean")), variance: validateOptionalType("Variance") } }); defineType$3("ObjectTypeProperty", { visitor: ["key", "value", "variance"], aliases: ["UserWhitespacable"], fields: { key: validateType(["Identifier", "StringLiteral"]), value: validateType("FlowType"), kind: validate$6(assertOneOf("init", "get", "set")), "static": validate$6(assertValueType("boolean")), proto: validate$6(assertValueType("boolean")), optional: validate$6(assertValueType("boolean")), variance: validateOptionalType("Variance"), method: validate$6(assertValueType("boolean")) } }); defineType$3("ObjectTypeSpreadProperty", { visitor: ["argument"], aliases: ["UserWhitespacable"], fields: { argument: validateType("FlowType") } }); defineType$3("OpaqueType", { visitor: ["id", "typeParameters", "supertype", "impltype"], aliases: ["FlowDeclaration", "Statement", "Declaration"], fields: { id: validateType("Identifier"), typeParameters: validateOptionalType("TypeParameterDeclaration"), supertype: validateOptionalType("FlowType"), impltype: validateType("FlowType") } }); defineType$3("QualifiedTypeIdentifier", { visitor: ["id", "qualification"], fields: { id: validateType("Identifier"), qualification: validateType(["Identifier", "QualifiedTypeIdentifier"]) } }); defineType$3("StringLiteralTypeAnnotation", { builder: ["value"], aliases: ["FlowType"], fields: { value: validate$6(assertValueType("string")) } }); defineType$3("StringTypeAnnotation", { aliases: ["FlowType", "FlowBaseAnnotation"] }); defineType$3("SymbolTypeAnnotation", { aliases: ["FlowType", "FlowBaseAnnotation"] }); defineType$3("ThisTypeAnnotation", { aliases: ["FlowType", "FlowBaseAnnotation"] }); defineType$3("TupleTypeAnnotation", { visitor: ["types"], aliases: ["FlowType"], fields: { types: validate$6(arrayOfType("FlowType")) } }); defineType$3("TypeofTypeAnnotation", { visitor: ["argument"], aliases: ["FlowType"], fields: { argument: validateType("FlowType") } }); defineType$3("TypeAlias", { visitor: ["id", "typeParameters", "right"], aliases: ["FlowDeclaration", "Statement", "Declaration"], fields: { id: validateType("Identifier"), typeParameters: validateOptionalType("TypeParameterDeclaration"), right: validateType("FlowType") } }); defineType$3("TypeAnnotation", { visitor: ["typeAnnotation"], fields: { typeAnnotation: validateType("FlowType") } }); defineType$3("TypeCastExpression", { visitor: ["expression", "typeAnnotation"], aliases: ["ExpressionWrapper", "Expression"], fields: { expression: validateType("Expression"), typeAnnotation: validateType("TypeAnnotation") } }); defineType$3("TypeParameter", { visitor: ["bound", "default", "variance"], fields: { name: validate$6(assertValueType("string")), bound: validateOptionalType("TypeAnnotation"), "default": validateOptionalType("FlowType"), variance: validateOptionalType("Variance") } }); defineType$3("TypeParameterDeclaration", { visitor: ["params"], fields: { params: validate$6(arrayOfType("TypeParameter")) } }); defineType$3("TypeParameterInstantiation", { visitor: ["params"], fields: { params: validate$6(arrayOfType("FlowType")) } }); defineType$3("UnionTypeAnnotation", { visitor: ["types"], aliases: ["FlowType"], fields: { types: validate$6(arrayOfType("FlowType")) } }); defineType$3("Variance", { builder: ["kind"], fields: { kind: validate$6(assertOneOf("minus", "plus")) } }); defineType$3("VoidTypeAnnotation", { aliases: ["FlowType", "FlowBaseAnnotation"] }); defineType$3("EnumDeclaration", { aliases: ["Statement", "Declaration"], visitor: ["id", "body"], fields: { id: validateType("Identifier"), body: validateType(["EnumBooleanBody", "EnumNumberBody", "EnumStringBody", "EnumSymbolBody"]) } }); defineType$3("EnumBooleanBody", { aliases: ["EnumBody"], visitor: ["members"], fields: { explicitType: validate$6(assertValueType("boolean")), members: validateArrayOfType("EnumBooleanMember"), hasUnknownMembers: validate$6(assertValueType("boolean")) } }); defineType$3("EnumNumberBody", { aliases: ["EnumBody"], visitor: ["members"], fields: { explicitType: validate$6(assertValueType("boolean")), members: validateArrayOfType("EnumNumberMember"), hasUnknownMembers: validate$6(assertValueType("boolean")) } }); defineType$3("EnumStringBody", { aliases: ["EnumBody"], visitor: ["members"], fields: { explicitType: validate$6(assertValueType("boolean")), members: validateArrayOfType(["EnumStringMember", "EnumDefaultedMember"]), hasUnknownMembers: validate$6(assertValueType("boolean")) } }); defineType$3("EnumSymbolBody", { aliases: ["EnumBody"], visitor: ["members"], fields: { members: validateArrayOfType("EnumDefaultedMember"), hasUnknownMembers: validate$6(assertValueType("boolean")) } }); defineType$3("EnumBooleanMember", { aliases: ["EnumMember"], visitor: ["id"], fields: { id: validateType("Identifier"), init: validateType("BooleanLiteral") } }); defineType$3("EnumNumberMember", { aliases: ["EnumMember"], visitor: ["id", "init"], fields: { id: validateType("Identifier"), init: validateType("NumericLiteral") } }); defineType$3("EnumStringMember", { aliases: ["EnumMember"], visitor: ["id", "init"], fields: { id: validateType("Identifier"), init: validateType("StringLiteral") } }); defineType$3("EnumDefaultedMember", { aliases: ["EnumMember"], visitor: ["id"], fields: { id: validateType("Identifier") } }); defineType$3("IndexedAccessType", { visitor: ["objectType", "indexType"], aliases: ["FlowType"], fields: { objectType: validateType("FlowType"), indexType: validateType("FlowType") } }); defineType$3("OptionalIndexedAccessType", { visitor: ["objectType", "indexType"], aliases: ["FlowType"], fields: { objectType: validateType("FlowType"), indexType: validateType("FlowType"), optional: validate$6(assertValueType("boolean")) } }); var defineType$2 = defineAliasedType("JSX"); defineType$2("JSXAttribute", { visitor: ["name", "value"], aliases: ["Immutable"], fields: { name: { validate: assertNodeType("JSXIdentifier", "JSXNamespacedName") }, value: { optional: true, validate: assertNodeType("JSXElement", "JSXFragment", "StringLiteral", "JSXExpressionContainer") } } }); defineType$2("JSXClosingElement", { visitor: ["name"], aliases: ["Immutable"], fields: { name: { validate: assertNodeType("JSXIdentifier", "JSXMemberExpression", "JSXNamespacedName") } } }); defineType$2("JSXElement", { builder: ["openingElement", "closingElement", "children", "selfClosing"], visitor: ["openingElement", "children", "closingElement"], aliases: ["Immutable", "Expression"], fields: Object.assign({ openingElement: { validate: assertNodeType("JSXOpeningElement") }, closingElement: { optional: true, validate: assertNodeType("JSXClosingElement") }, children: { validate: chain$1(assertValueType("array"), assertEach(assertNodeType("JSXText", "JSXExpressionContainer", "JSXSpreadChild", "JSXElement", "JSXFragment"))) } }, { selfClosing: { validate: assertValueType("boolean"), optional: true } }) }); defineType$2("JSXEmptyExpression", {}); defineType$2("JSXExpressionContainer", { visitor: ["expression"], aliases: ["Immutable"], fields: { expression: { validate: assertNodeType("Expression", "JSXEmptyExpression") } } }); defineType$2("JSXSpreadChild", { visitor: ["expression"], aliases: ["Immutable"], fields: { expression: { validate: assertNodeType("Expression") } } }); defineType$2("JSXIdentifier", { builder: ["name"], fields: { name: { validate: assertValueType("string") } } }); defineType$2("JSXMemberExpression", { visitor: ["object", "property"], fields: { object: { validate: assertNodeType("JSXMemberExpression", "JSXIdentifier") }, property: { validate: assertNodeType("JSXIdentifier") } } }); defineType$2("JSXNamespacedName", { visitor: ["namespace", "name"], fields: { namespace: { validate: assertNodeType("JSXIdentifier") }, name: { validate: assertNodeType("JSXIdentifier") } } }); defineType$2("JSXOpeningElement", { builder: ["name", "attributes", "selfClosing"], visitor: ["name", "attributes"], aliases: ["Immutable"], fields: { name: { validate: assertNodeType("JSXIdentifier", "JSXMemberExpression", "JSXNamespacedName") }, selfClosing: { "default": false }, attributes: { validate: chain$1(assertValueType("array"), assertEach(assertNodeType("JSXAttribute", "JSXSpreadAttribute"))) }, typeParameters: { validate: assertNodeType("TypeParameterInstantiation", "TSTypeParameterInstantiation"), optional: true } } }); defineType$2("JSXSpreadAttribute", { visitor: ["argument"], fields: { argument: { validate: assertNodeType("Expression") } } }); defineType$2("JSXText", { aliases: ["Immutable"], builder: ["value"], fields: { value: { validate: assertValueType("string") } } }); defineType$2("JSXFragment", { builder: ["openingFragment", "closingFragment", "children"], visitor: ["openingFragment", "children", "closingFragment"], aliases: ["Immutable", "Expression"], fields: { openingFragment: { validate: assertNodeType("JSXOpeningFragment") }, closingFragment: { validate: assertNodeType("JSXClosingFragment") }, children: { validate: chain$1(assertValueType("array"), assertEach(assertNodeType("JSXText", "JSXExpressionContainer", "JSXSpreadChild", "JSXElement", "JSXFragment"))) } } }); defineType$2("JSXOpeningFragment", { aliases: ["Immutable"] }); defineType$2("JSXClosingFragment", { aliases: ["Immutable"] }); var PLACEHOLDERS = ["Identifier", "StringLiteral", "Expression", "Statement", "Declaration", "BlockStatement", "ClassBody", "Pattern"]; var PLACEHOLDERS_ALIAS = { Declaration: ["Statement"], Pattern: ["PatternLike", "LVal"] }; for (var _i$2 = 0, _PLACEHOLDERS = PLACEHOLDERS; _i$2 < _PLACEHOLDERS.length; _i$2++) { var type$2 = _PLACEHOLDERS[_i$2]; var alias = ALIAS_KEYS[type$2]; if (alias != null && alias.length) PLACEHOLDERS_ALIAS[type$2] = alias; } var PLACEHOLDERS_FLIPPED_ALIAS = {}; Object.keys(PLACEHOLDERS_ALIAS).forEach(function (type) { PLACEHOLDERS_ALIAS[type].forEach(function (alias) { if (!Object.hasOwnProperty.call(PLACEHOLDERS_FLIPPED_ALIAS, alias)) { PLACEHOLDERS_FLIPPED_ALIAS[alias] = []; } PLACEHOLDERS_FLIPPED_ALIAS[alias].push(type); }); }); var defineType$1 = defineAliasedType("Miscellaneous"); { defineType$1("Noop", { visitor: [] }); } defineType$1("Placeholder", { visitor: [], builder: ["expectedNode", "name"], fields: { name: { validate: assertNodeType("Identifier") }, expectedNode: { validate: assertOneOf.apply(void 0, _toConsumableArray(PLACEHOLDERS)) } } }); defineType$1("V8IntrinsicIdentifier", { builder: ["name"], fields: { name: { validate: assertValueType("string") } } }); defineType$5("ArgumentPlaceholder", {}); defineType$5("BindExpression", { visitor: ["object", "callee"], aliases: ["Expression"], fields: !browser$1$1.env.BABEL_TYPES_8_BREAKING ? { object: { validate: Object.assign(function () {}, { oneOfNodeTypes: ["Expression"] }) }, callee: { validate: Object.assign(function () {}, { oneOfNodeTypes: ["Expression"] }) } } : { object: { validate: assertNodeType("Expression") }, callee: { validate: assertNodeType("Expression") } } }); defineType$5("ImportAttribute", { visitor: ["key", "value"], fields: { key: { validate: assertNodeType("Identifier", "StringLiteral") }, value: { validate: assertNodeType("StringLiteral") } } }); defineType$5("Decorator", { visitor: ["expression"], fields: { expression: { validate: assertNodeType("Expression") } } }); defineType$5("DoExpression", { visitor: ["body"], builder: ["body", "async"], aliases: ["Expression"], fields: { body: { validate: assertNodeType("BlockStatement") }, async: { validate: assertValueType("boolean"), "default": false } } }); defineType$5("ExportDefaultSpecifier", { visitor: ["exported"], aliases: ["ModuleSpecifier"], fields: { exported: { validate: assertNodeType("Identifier") } } }); defineType$5("RecordExpression", { visitor: ["properties"], aliases: ["Expression"], fields: { properties: { validate: chain$1(assertValueType("array"), assertEach(assertNodeType("ObjectProperty", "SpreadElement"))) } } }); defineType$5("TupleExpression", { fields: { elements: { validate: chain$1(assertValueType("array"), assertEach(assertNodeType("Expression", "SpreadElement"))), "default": [] } }, visitor: ["elements"], aliases: ["Expression"] }); defineType$5("DecimalLiteral", { builder: ["value"], fields: { value: { validate: assertValueType("string") } }, aliases: ["Expression", "Pureish", "Literal", "Immutable"] }); defineType$5("ModuleExpression", { visitor: ["body"], fields: { body: { validate: assertNodeType("Program") } }, aliases: ["Expression"] }); defineType$5("TopicReference", { aliases: ["Expression"] }); defineType$5("PipelineTopicExpression", { builder: ["expression"], visitor: ["expression"], fields: { expression: { validate: assertNodeType("Expression") } }, aliases: ["Expression"] }); defineType$5("PipelineBareFunction", { builder: ["callee"], visitor: ["callee"], fields: { callee: { validate: assertNodeType("Expression") } }, aliases: ["Expression"] }); defineType$5("PipelinePrimaryTopicReference", { aliases: ["Expression"] }); var defineType = defineAliasedType("TypeScript"); var bool$8 = assertValueType("boolean"); var tSFunctionTypeAnnotationCommon = function tSFunctionTypeAnnotationCommon() { return { returnType: { validate: assertNodeType("TSTypeAnnotation", "Noop"), optional: true }, typeParameters: { validate: assertNodeType("TSTypeParameterDeclaration", "Noop"), optional: true } }; }; defineType("TSParameterProperty", { aliases: ["LVal"], visitor: ["parameter"], fields: { accessibility: { validate: assertOneOf("public", "private", "protected"), optional: true }, readonly: { validate: assertValueType("boolean"), optional: true }, parameter: { validate: assertNodeType("Identifier", "AssignmentPattern") }, override: { validate: assertValueType("boolean"), optional: true }, decorators: { validate: chain$1(assertValueType("array"), assertEach(assertNodeType("Decorator"))), optional: true } } }); defineType("TSDeclareFunction", { aliases: ["Statement", "Declaration"], visitor: ["id", "typeParameters", "params", "returnType"], fields: Object.assign({}, functionDeclarationCommon(), tSFunctionTypeAnnotationCommon()) }); defineType("TSDeclareMethod", { visitor: ["decorators", "key", "typeParameters", "params", "returnType"], fields: Object.assign({}, classMethodOrDeclareMethodCommon(), tSFunctionTypeAnnotationCommon()) }); defineType("TSQualifiedName", { aliases: ["TSEntityName"], visitor: ["left", "right"], fields: { left: validateType("TSEntityName"), right: validateType("Identifier") } }); var signatureDeclarationCommon = function signatureDeclarationCommon() { var _ref; return _ref = { typeParameters: validateOptionalType("TSTypeParameterDeclaration") }, _ref["parameters"] = validateArrayOfType(["Identifier", "RestElement"]), _ref["typeAnnotation"] = validateOptionalType("TSTypeAnnotation"), _ref; }; var callConstructSignatureDeclaration = { aliases: ["TSTypeElement"], visitor: ["typeParameters", "parameters", "typeAnnotation"], fields: signatureDeclarationCommon() }; defineType("TSCallSignatureDeclaration", callConstructSignatureDeclaration); defineType("TSConstructSignatureDeclaration", callConstructSignatureDeclaration); var namedTypeElementCommon = function namedTypeElementCommon() { return { key: validateType("Expression"), computed: { "default": false }, optional: validateOptional(bool$8) }; }; defineType("TSPropertySignature", { aliases: ["TSTypeElement"], visitor: ["key", "typeAnnotation", "initializer"], fields: Object.assign({}, namedTypeElementCommon(), { readonly: validateOptional(bool$8), typeAnnotation: validateOptionalType("TSTypeAnnotation"), initializer: validateOptionalType("Expression"), kind: { validate: assertOneOf("get", "set") } }) }); defineType("TSMethodSignature", { aliases: ["TSTypeElement"], visitor: ["key", "typeParameters", "parameters", "typeAnnotation"], fields: Object.assign({}, signatureDeclarationCommon(), namedTypeElementCommon(), { kind: { validate: assertOneOf("method", "get", "set") } }) }); defineType("TSIndexSignature", { aliases: ["TSTypeElement"], visitor: ["parameters", "typeAnnotation"], fields: { readonly: validateOptional(bool$8), "static": validateOptional(bool$8), parameters: validateArrayOfType("Identifier"), typeAnnotation: validateOptionalType("TSTypeAnnotation") } }); var tsKeywordTypes = ["TSAnyKeyword", "TSBooleanKeyword", "TSBigIntKeyword", "TSIntrinsicKeyword", "TSNeverKeyword", "TSNullKeyword", "TSNumberKeyword", "TSObjectKeyword", "TSStringKeyword", "TSSymbolKeyword", "TSUndefinedKeyword", "TSUnknownKeyword", "TSVoidKeyword"]; for (var _i$1 = 0, _tsKeywordTypes = tsKeywordTypes; _i$1 < _tsKeywordTypes.length; _i$1++) { var type$1 = _tsKeywordTypes[_i$1]; defineType(type$1, { aliases: ["TSType", "TSBaseType"], visitor: [], fields: {} }); } defineType("TSThisType", { aliases: ["TSType", "TSBaseType"], visitor: [], fields: {} }); var fnOrCtrBase = { aliases: ["TSType"], visitor: ["typeParameters", "parameters", "typeAnnotation"] }; defineType("TSFunctionType", Object.assign({}, fnOrCtrBase, { fields: signatureDeclarationCommon() })); defineType("TSConstructorType", Object.assign({}, fnOrCtrBase, { fields: Object.assign({}, signatureDeclarationCommon(), { "abstract": validateOptional(bool$8) }) })); defineType("TSTypeReference", { aliases: ["TSType"], visitor: ["typeName", "typeParameters"], fields: { typeName: validateType("TSEntityName"), typeParameters: validateOptionalType("TSTypeParameterInstantiation") } }); defineType("TSTypePredicate", { aliases: ["TSType"], visitor: ["parameterName", "typeAnnotation"], builder: ["parameterName", "typeAnnotation", "asserts"], fields: { parameterName: validateType(["Identifier", "TSThisType"]), typeAnnotation: validateOptionalType("TSTypeAnnotation"), asserts: validateOptional(bool$8) } }); defineType("TSTypeQuery", { aliases: ["TSType"], visitor: ["exprName", "typeParameters"], fields: { exprName: validateType(["TSEntityName", "TSImportType"]), typeParameters: validateOptionalType("TSTypeParameterInstantiation") } }); defineType("TSTypeLiteral", { aliases: ["TSType"], visitor: ["members"], fields: { members: validateArrayOfType("TSTypeElement") } }); defineType("TSArrayType", { aliases: ["TSType"], visitor: ["elementType"], fields: { elementType: validateType("TSType") } }); defineType("TSTupleType", { aliases: ["TSType"], visitor: ["elementTypes"], fields: { elementTypes: validateArrayOfType(["TSType", "TSNamedTupleMember"]) } }); defineType("TSOptionalType", { aliases: ["TSType"], visitor: ["typeAnnotation"], fields: { typeAnnotation: validateType("TSType") } }); defineType("TSRestType", { aliases: ["TSType"], visitor: ["typeAnnotation"], fields: { typeAnnotation: validateType("TSType") } }); defineType("TSNamedTupleMember", { visitor: ["label", "elementType"], builder: ["label", "elementType", "optional"], fields: { label: validateType("Identifier"), optional: { validate: bool$8, "default": false }, elementType: validateType("TSType") } }); var unionOrIntersection = { aliases: ["TSType"], visitor: ["types"], fields: { types: validateArrayOfType("TSType") } }; defineType("TSUnionType", unionOrIntersection); defineType("TSIntersectionType", unionOrIntersection); defineType("TSConditionalType", { aliases: ["TSType"], visitor: ["checkType", "extendsType", "trueType", "falseType"], fields: { checkType: validateType("TSType"), extendsType: validateType("TSType"), trueType: validateType("TSType"), falseType: validateType("TSType") } }); defineType("TSInferType", { aliases: ["TSType"], visitor: ["typeParameter"], fields: { typeParameter: validateType("TSTypeParameter") } }); defineType("TSParenthesizedType", { aliases: ["TSType"], visitor: ["typeAnnotation"], fields: { typeAnnotation: validateType("TSType") } }); defineType("TSTypeOperator", { aliases: ["TSType"], visitor: ["typeAnnotation"], fields: { operator: validate$6(assertValueType("string")), typeAnnotation: validateType("TSType") } }); defineType("TSIndexedAccessType", { aliases: ["TSType"], visitor: ["objectType", "indexType"], fields: { objectType: validateType("TSType"), indexType: validateType("TSType") } }); defineType("TSMappedType", { aliases: ["TSType"], visitor: ["typeParameter", "typeAnnotation", "nameType"], fields: { readonly: validateOptional(assertOneOf(true, false, "+", "-")), typeParameter: validateType("TSTypeParameter"), optional: validateOptional(assertOneOf(true, false, "+", "-")), typeAnnotation: validateOptionalType("TSType"), nameType: validateOptionalType("TSType") } }); defineType("TSLiteralType", { aliases: ["TSType", "TSBaseType"], visitor: ["literal"], fields: { literal: { validate: function () { var unaryExpression = assertNodeType("NumericLiteral", "BigIntLiteral"); var unaryOperator = assertOneOf("-"); var literal = assertNodeType("NumericLiteral", "StringLiteral", "BooleanLiteral", "BigIntLiteral", "TemplateLiteral"); function validator(parent, key, node) { if (is$1("UnaryExpression", node)) { unaryOperator(node, "operator", node.operator); unaryExpression(node, "argument", node.argument); } else { literal(parent, key, node); } } validator.oneOfNodeTypes = ["NumericLiteral", "StringLiteral", "BooleanLiteral", "BigIntLiteral", "TemplateLiteral", "UnaryExpression"]; return validator; }() } } }); defineType("TSExpressionWithTypeArguments", { aliases: ["TSType"], visitor: ["expression", "typeParameters"], fields: { expression: validateType("TSEntityName"), typeParameters: validateOptionalType("TSTypeParameterInstantiation") } }); defineType("TSInterfaceDeclaration", { aliases: ["Statement", "Declaration"], visitor: ["id", "typeParameters", "extends", "body"], fields: { declare: validateOptional(bool$8), id: validateType("Identifier"), typeParameters: validateOptionalType("TSTypeParameterDeclaration"), "extends": validateOptional(arrayOfType("TSExpressionWithTypeArguments")), body: validateType("TSInterfaceBody") } }); defineType("TSInterfaceBody", { visitor: ["body"], fields: { body: validateArrayOfType("TSTypeElement") } }); defineType("TSTypeAliasDeclaration", { aliases: ["Statement", "Declaration"], visitor: ["id", "typeParameters", "typeAnnotation"], fields: { declare: validateOptional(bool$8), id: validateType("Identifier"), typeParameters: validateOptionalType("TSTypeParameterDeclaration"), typeAnnotation: validateType("TSType") } }); defineType("TSInstantiationExpression", { aliases: ["Expression"], visitor: ["expression", "typeParameters"], fields: { expression: validateType("Expression"), typeParameters: validateOptionalType("TSTypeParameterInstantiation") } }); var TSTypeExpression$1 = { aliases: ["Expression", "LVal", "PatternLike"], visitor: ["expression", "typeAnnotation"], fields: { expression: validateType("Expression"), typeAnnotation: validateType("TSType") } }; defineType("TSAsExpression", TSTypeExpression$1); defineType("TSSatisfiesExpression", TSTypeExpression$1); defineType("TSTypeAssertion", { aliases: ["Expression", "LVal", "PatternLike"], visitor: ["typeAnnotation", "expression"], fields: { typeAnnotation: validateType("TSType"), expression: validateType("Expression") } }); defineType("TSEnumDeclaration", { aliases: ["Statement", "Declaration"], visitor: ["id", "members"], fields: { declare: validateOptional(bool$8), "const": validateOptional(bool$8), id: validateType("Identifier"), members: validateArrayOfType("TSEnumMember"), initializer: validateOptionalType("Expression") } }); defineType("TSEnumMember", { visitor: ["id", "initializer"], fields: { id: validateType(["Identifier", "StringLiteral"]), initializer: validateOptionalType("Expression") } }); defineType("TSModuleDeclaration", { aliases: ["Statement", "Declaration"], visitor: ["id", "body"], fields: { declare: validateOptional(bool$8), global: validateOptional(bool$8), id: validateType(["Identifier", "StringLiteral"]), body: validateType(["TSModuleBlock", "TSModuleDeclaration"]) } }); defineType("TSModuleBlock", { aliases: ["Scopable", "Block", "BlockParent", "FunctionParent"], visitor: ["body"], fields: { body: validateArrayOfType("Statement") } }); defineType("TSImportType", { aliases: ["TSType"], visitor: ["argument", "qualifier", "typeParameters"], fields: { argument: validateType("StringLiteral"), qualifier: validateOptionalType("TSEntityName"), typeParameters: validateOptionalType("TSTypeParameterInstantiation") } }); defineType("TSImportEqualsDeclaration", { aliases: ["Statement"], visitor: ["id", "moduleReference"], fields: { isExport: validate$6(bool$8), id: validateType("Identifier"), moduleReference: validateType(["TSEntityName", "TSExternalModuleReference"]), importKind: { validate: assertOneOf("type", "value"), optional: true } } }); defineType("TSExternalModuleReference", { visitor: ["expression"], fields: { expression: validateType("StringLiteral") } }); defineType("TSNonNullExpression", { aliases: ["Expression", "LVal", "PatternLike"], visitor: ["expression"], fields: { expression: validateType("Expression") } }); defineType("TSExportAssignment", { aliases: ["Statement"], visitor: ["expression"], fields: { expression: validateType("Expression") } }); defineType("TSNamespaceExportDeclaration", { aliases: ["Statement"], visitor: ["id"], fields: { id: validateType("Identifier") } }); defineType("TSTypeAnnotation", { visitor: ["typeAnnotation"], fields: { typeAnnotation: { validate: assertNodeType("TSType") } } }); defineType("TSTypeParameterInstantiation", { visitor: ["params"], fields: { params: { validate: chain$1(assertValueType("array"), assertEach(assertNodeType("TSType"))) } } }); defineType("TSTypeParameterDeclaration", { visitor: ["params"], fields: { params: { validate: chain$1(assertValueType("array"), assertEach(assertNodeType("TSTypeParameter"))) } } }); defineType("TSTypeParameter", { builder: ["constraint", "default", "name"], visitor: ["constraint", "default"], fields: { name: { validate: assertValueType("string") }, "in": { validate: assertValueType("boolean"), optional: true }, out: { validate: assertValueType("boolean"), optional: true }, "const": { validate: assertValueType("boolean"), optional: true }, constraint: { validate: assertNodeType("TSType"), optional: true }, "default": { validate: assertNodeType("TSType"), optional: true } } }); var DEPRECATED_ALIASES$1 = { ModuleDeclaration: "ImportOrExportDeclaration" }; Object.keys(DEPRECATED_ALIASES$1).forEach(function (deprecatedAlias) { FLIPPED_ALIAS_KEYS$3[deprecatedAlias] = FLIPPED_ALIAS_KEYS$3[DEPRECATED_ALIASES$1[deprecatedAlias]]; }); toFastProperties(VISITOR_KEYS$5); toFastProperties(ALIAS_KEYS); toFastProperties(FLIPPED_ALIAS_KEYS$3); toFastProperties(NODE_FIELDS); toFastProperties(BUILDER_KEYS); toFastProperties(DEPRECATED_KEYS$1); toFastProperties(PLACEHOLDERS_ALIAS); toFastProperties(PLACEHOLDERS_FLIPPED_ALIAS); var TYPES$1 = [].concat(Object.keys(VISITOR_KEYS$5), Object.keys(FLIPPED_ALIAS_KEYS$3), Object.keys(DEPRECATED_KEYS$1)); function validate$5(node, key, val) { if (!node) return; var fields = NODE_FIELDS[node.type]; if (!fields) return; var field = fields[key]; validateField(node, key, val, field); validateChild(node, key, val); } function validateField(node, key, val, field) { if (!(field != null && field.validate)) return; if (field.optional && val == null) return; field.validate(node, key, val); } function validateChild(node, key, val) { if (val == null) return; var validate = NODE_PARENT_VALIDATIONS[val.type]; if (!validate) return; validate(node, key, val); } function validateNode(node) { var keys = BUILDER_KEYS[node.type]; for (var _iterator = _createForOfIteratorHelperLoose(keys), _step; !(_step = _iterator()).done;) { var key = _step.value; validate$5(node, key, node[key]); } return node; } function arrayExpression$1(elements) { if (elements === void 0) { elements = []; } return validateNode({ type: "ArrayExpression", elements: elements }); } function assignmentExpression$d(operator, left, right) { return validateNode({ type: "AssignmentExpression", operator: operator, left: left, right: right }); } function binaryExpression$5(operator, left, right) { return validateNode({ type: "BinaryExpression", operator: operator, left: left, right: right }); } function interpreterDirective$1(value) { return validateNode({ type: "InterpreterDirective", value: value }); } function directive$1(value) { return validateNode({ type: "Directive", value: value }); } function directiveLiteral$1(value) { return validateNode({ type: "DirectiveLiteral", value: value }); } function blockStatement$6(body, directives) { if (directives === void 0) { directives = []; } return validateNode({ type: "BlockStatement", body: body, directives: directives }); } function breakStatement(label) { if (label === void 0) { label = null; } return validateNode({ type: "BreakStatement", label: label }); } function callExpression$e(callee, _arguments) { return validateNode({ type: "CallExpression", callee: callee, arguments: _arguments }); } function catchClause(param, body) { if (param === void 0) { param = null; } return validateNode({ type: "CatchClause", param: param, body: body }); } function conditionalExpression$4(test, consequent, alternate) { return validateNode({ type: "ConditionalExpression", test: test, consequent: consequent, alternate: alternate }); } function continueStatement(label) { if (label === void 0) { label = null; } return validateNode({ type: "ContinueStatement", label: label }); } function debuggerStatement() { return { type: "DebuggerStatement" }; } function doWhileStatement(test, body) { return validateNode({ type: "DoWhileStatement", test: test, body: body }); } function emptyStatement$1() { return { type: "EmptyStatement" }; } function expressionStatement$a(expression) { return validateNode({ type: "ExpressionStatement", expression: expression }); } function file$2(program, comments, tokens) { if (comments === void 0) { comments = null; } if (tokens === void 0) { tokens = null; } return validateNode({ type: "File", program: program, comments: comments, tokens: tokens }); } function forInStatement(left, right, body) { return validateNode({ type: "ForInStatement", left: left, right: right, body: body }); } function forStatement(init, test, update, body) { if (init === void 0) { init = null; } if (test === void 0) { test = null; } if (update === void 0) { update = null; } return validateNode({ type: "ForStatement", init: init, test: test, update: update, body: body }); } function functionDeclaration(id, params, body, generator, async) { if (id === void 0) { id = null; } if (generator === void 0) { generator = false; } if (async === void 0) { async = false; } return validateNode({ type: "FunctionDeclaration", id: id, params: params, body: body, generator: generator, async: async }); } function functionExpression$2(id, params, body, generator, async) { if (id === void 0) { id = null; } if (generator === void 0) { generator = false; } if (async === void 0) { async = false; } return validateNode({ type: "FunctionExpression", id: id, params: params, body: body, generator: generator, async: async }); } function identifier$i(name) { return validateNode({ type: "Identifier", name: name }); } function ifStatement(test, consequent, alternate) { if (alternate === void 0) { alternate = null; } return validateNode({ type: "IfStatement", test: test, consequent: consequent, alternate: alternate }); } function labeledStatement(label, body) { return validateNode({ type: "LabeledStatement", label: label, body: body }); } function stringLiteral$8(value) { return validateNode({ type: "StringLiteral", value: value }); } function numericLiteral$8(value) { return validateNode({ type: "NumericLiteral", value: value }); } function nullLiteral$2() { return { type: "NullLiteral" }; } function booleanLiteral$4(value) { return validateNode({ type: "BooleanLiteral", value: value }); } function regExpLiteral(pattern, flags) { if (flags === void 0) { flags = ""; } return validateNode({ type: "RegExpLiteral", pattern: pattern, flags: flags }); } function logicalExpression$3(operator, left, right) { return validateNode({ type: "LogicalExpression", operator: operator, left: left, right: right }); } function memberExpression$c(object, property, computed, optional) { if (computed === void 0) { computed = false; } if (optional === void 0) { optional = null; } return validateNode({ type: "MemberExpression", object: object, property: property, computed: computed, optional: optional }); } function newExpression(callee, _arguments) { return validateNode({ type: "NewExpression", callee: callee, arguments: _arguments }); } function program$3(body, directives, sourceType, interpreter) { if (directives === void 0) { directives = []; } if (sourceType === void 0) { sourceType = "script"; } if (interpreter === void 0) { interpreter = null; } return validateNode({ type: "Program", body: body, directives: directives, sourceType: sourceType, interpreter: interpreter, sourceFile: null }); } function objectExpression$3(properties) { return validateNode({ type: "ObjectExpression", properties: properties }); } function objectMethod(kind, key, params, body, computed, generator, async) { if (kind === void 0) { kind = "method"; } if (computed === void 0) { computed = false; } if (generator === void 0) { generator = false; } if (async === void 0) { async = false; } return validateNode({ type: "ObjectMethod", kind: kind, key: key, params: params, body: body, computed: computed, generator: generator, async: async }); } function objectProperty$1(key, value, computed, shorthand, decorators) { if (computed === void 0) { computed = false; } if (shorthand === void 0) { shorthand = false; } if (decorators === void 0) { decorators = null; } return validateNode({ type: "ObjectProperty", key: key, value: value, computed: computed, shorthand: shorthand, decorators: decorators }); } function restElement$2(argument) { return validateNode({ type: "RestElement", argument: argument }); } function returnStatement$3(argument) { if (argument === void 0) { argument = null; } return validateNode({ type: "ReturnStatement", argument: argument }); } function sequenceExpression$7(expressions) { return validateNode({ type: "SequenceExpression", expressions: expressions }); } function parenthesizedExpression(expression) { return validateNode({ type: "ParenthesizedExpression", expression: expression }); } function switchCase(test, consequent) { if (test === void 0) { test = null; } return validateNode({ type: "SwitchCase", test: test, consequent: consequent }); } function switchStatement(discriminant, cases) { return validateNode({ type: "SwitchStatement", discriminant: discriminant, cases: cases }); } function thisExpression$4() { return { type: "ThisExpression" }; } function throwStatement(argument) { return validateNode({ type: "ThrowStatement", argument: argument }); } function tryStatement(block, handler, finalizer) { if (handler === void 0) { handler = null; } if (finalizer === void 0) { finalizer = null; } return validateNode({ type: "TryStatement", block: block, handler: handler, finalizer: finalizer }); } function unaryExpression$7(operator, argument, prefix) { if (prefix === void 0) { prefix = true; } return validateNode({ type: "UnaryExpression", operator: operator, argument: argument, prefix: prefix }); } function updateExpression$1(operator, argument, prefix) { if (prefix === void 0) { prefix = false; } return validateNode({ type: "UpdateExpression", operator: operator, argument: argument, prefix: prefix }); } function variableDeclaration$8(kind, declarations) { return validateNode({ type: "VariableDeclaration", kind: kind, declarations: declarations }); } function variableDeclarator$8(id, init) { if (init === void 0) { init = null; } return validateNode({ type: "VariableDeclarator", id: id, init: init }); } function whileStatement(test, body) { return validateNode({ type: "WhileStatement", test: test, body: body }); } function withStatement(object, body) { return validateNode({ type: "WithStatement", object: object, body: body }); } function assignmentPattern(left, right) { return validateNode({ type: "AssignmentPattern", left: left, right: right }); } function arrayPattern(elements) { return validateNode({ type: "ArrayPattern", elements: elements }); } function arrowFunctionExpression$4(params, body, async) { if (async === void 0) { async = false; } return validateNode({ type: "ArrowFunctionExpression", params: params, body: body, async: async, expression: null }); } function classBody(body) { return validateNode({ type: "ClassBody", body: body }); } function classExpression(id, superClass, body, decorators) { if (id === void 0) { id = null; } if (superClass === void 0) { superClass = null; } if (decorators === void 0) { decorators = null; } return validateNode({ type: "ClassExpression", id: id, superClass: superClass, body: body, decorators: decorators }); } function classDeclaration(id, superClass, body, decorators) { if (superClass === void 0) { superClass = null; } if (decorators === void 0) { decorators = null; } return validateNode({ type: "ClassDeclaration", id: id, superClass: superClass, body: body, decorators: decorators }); } function exportAllDeclaration(source) { return validateNode({ type: "ExportAllDeclaration", source: source }); } function exportDefaultDeclaration(declaration) { return validateNode({ type: "ExportDefaultDeclaration", declaration: declaration }); } function exportNamedDeclaration$2(declaration, specifiers, source) { if (declaration === void 0) { declaration = null; } if (specifiers === void 0) { specifiers = []; } if (source === void 0) { source = null; } return validateNode({ type: "ExportNamedDeclaration", declaration: declaration, specifiers: specifiers, source: source }); } function exportSpecifier$2(local, exported) { return validateNode({ type: "ExportSpecifier", local: local, exported: exported }); } function forOfStatement(left, right, body, _await) { if (_await === void 0) { _await = false; } return validateNode({ type: "ForOfStatement", left: left, right: right, body: body, "await": _await }); } function importDeclaration$1(specifiers, source) { return validateNode({ type: "ImportDeclaration", specifiers: specifiers, source: source }); } function importDefaultSpecifier$1(local) { return validateNode({ type: "ImportDefaultSpecifier", local: local }); } function importNamespaceSpecifier$1(local) { return validateNode({ type: "ImportNamespaceSpecifier", local: local }); } function importSpecifier$1(local, imported) { return validateNode({ type: "ImportSpecifier", local: local, imported: imported }); } function metaProperty$1(meta, property) { return validateNode({ type: "MetaProperty", meta: meta, property: property }); } function classMethod(kind, key, params, body, computed, _static, generator, async) { if (kind === void 0) { kind = "method"; } if (computed === void 0) { computed = false; } if (_static === void 0) { _static = false; } if (generator === void 0) { generator = false; } if (async === void 0) { async = false; } return validateNode({ type: "ClassMethod", kind: kind, key: key, params: params, body: body, computed: computed, "static": _static, generator: generator, async: async }); } function objectPattern$1(properties) { return validateNode({ type: "ObjectPattern", properties: properties }); } function spreadElement$2(argument) { return validateNode({ type: "SpreadElement", argument: argument }); } function _super$1() { return { type: "Super" }; } function taggedTemplateExpression(tag, quasi) { return validateNode({ type: "TaggedTemplateExpression", tag: tag, quasi: quasi }); } function templateElement(value, tail) { if (tail === void 0) { tail = false; } return validateNode({ type: "TemplateElement", value: value, tail: tail }); } function templateLiteral(quasis, expressions) { return validateNode({ type: "TemplateLiteral", quasis: quasis, expressions: expressions }); } function yieldExpression$2(argument, delegate) { if (argument === void 0) { argument = null; } if (delegate === void 0) { delegate = false; } return validateNode({ type: "YieldExpression", argument: argument, delegate: delegate }); } function awaitExpression$1(argument) { return validateNode({ type: "AwaitExpression", argument: argument }); } function _import() { return { type: "Import" }; } function bigIntLiteral(value) { return validateNode({ type: "BigIntLiteral", value: value }); } function exportNamespaceSpecifier(exported) { return validateNode({ type: "ExportNamespaceSpecifier", exported: exported }); } function optionalMemberExpression$2(object, property, computed, optional) { if (computed === void 0) { computed = false; } return validateNode({ type: "OptionalMemberExpression", object: object, property: property, computed: computed, optional: optional }); } function optionalCallExpression$2(callee, _arguments, optional) { return validateNode({ type: "OptionalCallExpression", callee: callee, arguments: _arguments, optional: optional }); } function classProperty(key, value, typeAnnotation, decorators, computed, _static) { if (value === void 0) { value = null; } if (typeAnnotation === void 0) { typeAnnotation = null; } if (decorators === void 0) { decorators = null; } if (computed === void 0) { computed = false; } if (_static === void 0) { _static = false; } return validateNode({ type: "ClassProperty", key: key, value: value, typeAnnotation: typeAnnotation, decorators: decorators, computed: computed, "static": _static }); } function classAccessorProperty(key, value, typeAnnotation, decorators, computed, _static) { if (value === void 0) { value = null; } if (typeAnnotation === void 0) { typeAnnotation = null; } if (decorators === void 0) { decorators = null; } if (computed === void 0) { computed = false; } if (_static === void 0) { _static = false; } return validateNode({ type: "ClassAccessorProperty", key: key, value: value, typeAnnotation: typeAnnotation, decorators: decorators, computed: computed, "static": _static }); } function classPrivateProperty(key, value, decorators, _static) { if (value === void 0) { value = null; } if (decorators === void 0) { decorators = null; } if (_static === void 0) { _static = false; } return validateNode({ type: "ClassPrivateProperty", key: key, value: value, decorators: decorators, "static": _static }); } function classPrivateMethod(kind, key, params, body, _static) { if (kind === void 0) { kind = "method"; } if (_static === void 0) { _static = false; } return validateNode({ type: "ClassPrivateMethod", kind: kind, key: key, params: params, body: body, "static": _static }); } function privateName(id) { return validateNode({ type: "PrivateName", id: id }); } function staticBlock(body) { return validateNode({ type: "StaticBlock", body: body }); } function anyTypeAnnotation$2() { return { type: "AnyTypeAnnotation" }; } function arrayTypeAnnotation$1(elementType) { return validateNode({ type: "ArrayTypeAnnotation", elementType: elementType }); } function booleanTypeAnnotation$1() { return { type: "BooleanTypeAnnotation" }; } function booleanLiteralTypeAnnotation(value) { return validateNode({ type: "BooleanLiteralTypeAnnotation", value: value }); } function nullLiteralTypeAnnotation$1() { return { type: "NullLiteralTypeAnnotation" }; } function classImplements(id, typeParameters) { if (typeParameters === void 0) { typeParameters = null; } return validateNode({ type: "ClassImplements", id: id, typeParameters: typeParameters }); } function declareClass(id, typeParameters, _extends, body) { if (typeParameters === void 0) { typeParameters = null; } if (_extends === void 0) { _extends = null; } return validateNode({ type: "DeclareClass", id: id, typeParameters: typeParameters, "extends": _extends, body: body }); } function declareFunction(id) { return validateNode({ type: "DeclareFunction", id: id }); } function declareInterface(id, typeParameters, _extends, body) { if (typeParameters === void 0) { typeParameters = null; } if (_extends === void 0) { _extends = null; } return validateNode({ type: "DeclareInterface", id: id, typeParameters: typeParameters, "extends": _extends, body: body }); } function declareModule(id, body, kind) { if (kind === void 0) { kind = null; } return validateNode({ type: "DeclareModule", id: id, body: body, kind: kind }); } function declareModuleExports(typeAnnotation) { return validateNode({ type: "DeclareModuleExports", typeAnnotation: typeAnnotation }); } function declareTypeAlias(id, typeParameters, right) { if (typeParameters === void 0) { typeParameters = null; } return validateNode({ type: "DeclareTypeAlias", id: id, typeParameters: typeParameters, right: right }); } function declareOpaqueType(id, typeParameters, supertype) { if (typeParameters === void 0) { typeParameters = null; } if (supertype === void 0) { supertype = null; } return validateNode({ type: "DeclareOpaqueType", id: id, typeParameters: typeParameters, supertype: supertype }); } function declareVariable(id) { return validateNode({ type: "DeclareVariable", id: id }); } function declareExportDeclaration(declaration, specifiers, source) { if (declaration === void 0) { declaration = null; } if (specifiers === void 0) { specifiers = null; } if (source === void 0) { source = null; } return validateNode({ type: "DeclareExportDeclaration", declaration: declaration, specifiers: specifiers, source: source }); } function declareExportAllDeclaration(source) { return validateNode({ type: "DeclareExportAllDeclaration", source: source }); } function declaredPredicate(value) { return validateNode({ type: "DeclaredPredicate", value: value }); } function existsTypeAnnotation() { return { type: "ExistsTypeAnnotation" }; } function functionTypeAnnotation(typeParameters, params, rest, returnType) { if (typeParameters === void 0) { typeParameters = null; } if (rest === void 0) { rest = null; } return validateNode({ type: "FunctionTypeAnnotation", typeParameters: typeParameters, params: params, rest: rest, returnType: returnType }); } function functionTypeParam(name, typeAnnotation) { if (name === void 0) { name = null; } return validateNode({ type: "FunctionTypeParam", name: name, typeAnnotation: typeAnnotation }); } function genericTypeAnnotation$1(id, typeParameters) { if (typeParameters === void 0) { typeParameters = null; } return validateNode({ type: "GenericTypeAnnotation", id: id, typeParameters: typeParameters }); } function inferredPredicate() { return { type: "InferredPredicate" }; } function interfaceExtends(id, typeParameters) { if (typeParameters === void 0) { typeParameters = null; } return validateNode({ type: "InterfaceExtends", id: id, typeParameters: typeParameters }); } function interfaceDeclaration(id, typeParameters, _extends, body) { if (typeParameters === void 0) { typeParameters = null; } if (_extends === void 0) { _extends = null; } return validateNode({ type: "InterfaceDeclaration", id: id, typeParameters: typeParameters, "extends": _extends, body: body }); } function interfaceTypeAnnotation(_extends, body) { if (_extends === void 0) { _extends = null; } return validateNode({ type: "InterfaceTypeAnnotation", "extends": _extends, body: body }); } function intersectionTypeAnnotation(types) { return validateNode({ type: "IntersectionTypeAnnotation", types: types }); } function mixedTypeAnnotation() { return { type: "MixedTypeAnnotation" }; } function emptyTypeAnnotation() { return { type: "EmptyTypeAnnotation" }; } function nullableTypeAnnotation(typeAnnotation) { return validateNode({ type: "NullableTypeAnnotation", typeAnnotation: typeAnnotation }); } function numberLiteralTypeAnnotation(value) { return validateNode({ type: "NumberLiteralTypeAnnotation", value: value }); } function numberTypeAnnotation$2() { return { type: "NumberTypeAnnotation" }; } function objectTypeAnnotation(properties, indexers, callProperties, internalSlots, exact) { if (indexers === void 0) { indexers = []; } if (callProperties === void 0) { callProperties = []; } if (internalSlots === void 0) { internalSlots = []; } if (exact === void 0) { exact = false; } return validateNode({ type: "ObjectTypeAnnotation", properties: properties, indexers: indexers, callProperties: callProperties, internalSlots: internalSlots, exact: exact }); } function objectTypeInternalSlot(id, value, optional, _static, method) { return validateNode({ type: "ObjectTypeInternalSlot", id: id, value: value, optional: optional, "static": _static, method: method }); } function objectTypeCallProperty(value) { return validateNode({ type: "ObjectTypeCallProperty", value: value, "static": null }); } function objectTypeIndexer(id, key, value, variance) { if (id === void 0) { id = null; } if (variance === void 0) { variance = null; } return validateNode({ type: "ObjectTypeIndexer", id: id, key: key, value: value, variance: variance, "static": null }); } function objectTypeProperty(key, value, variance) { if (variance === void 0) { variance = null; } return validateNode({ type: "ObjectTypeProperty", key: key, value: value, variance: variance, kind: null, method: null, optional: null, proto: null, "static": null }); } function objectTypeSpreadProperty(argument) { return validateNode({ type: "ObjectTypeSpreadProperty", argument: argument }); } function opaqueType(id, typeParameters, supertype, impltype) { if (typeParameters === void 0) { typeParameters = null; } if (supertype === void 0) { supertype = null; } return validateNode({ type: "OpaqueType", id: id, typeParameters: typeParameters, supertype: supertype, impltype: impltype }); } function qualifiedTypeIdentifier(id, qualification) { return validateNode({ type: "QualifiedTypeIdentifier", id: id, qualification: qualification }); } function stringLiteralTypeAnnotation(value) { return validateNode({ type: "StringLiteralTypeAnnotation", value: value }); } function stringTypeAnnotation$2() { return { type: "StringTypeAnnotation" }; } function symbolTypeAnnotation() { return { type: "SymbolTypeAnnotation" }; } function thisTypeAnnotation() { return { type: "ThisTypeAnnotation" }; } function tupleTypeAnnotation$1(types) { return validateNode({ type: "TupleTypeAnnotation", types: types }); } function typeofTypeAnnotation(argument) { return validateNode({ type: "TypeofTypeAnnotation", argument: argument }); } function typeAlias(id, typeParameters, right) { if (typeParameters === void 0) { typeParameters = null; } return validateNode({ type: "TypeAlias", id: id, typeParameters: typeParameters, right: right }); } function typeAnnotation(typeAnnotation) { return validateNode({ type: "TypeAnnotation", typeAnnotation: typeAnnotation }); } function typeCastExpression(expression, typeAnnotation) { return validateNode({ type: "TypeCastExpression", expression: expression, typeAnnotation: typeAnnotation }); } function typeParameter(bound, _default, variance) { if (bound === void 0) { bound = null; } if (_default === void 0) { _default = null; } if (variance === void 0) { variance = null; } return validateNode({ type: "TypeParameter", bound: bound, "default": _default, variance: variance, name: null }); } function typeParameterDeclaration(params) { return validateNode({ type: "TypeParameterDeclaration", params: params }); } function typeParameterInstantiation(params) { return validateNode({ type: "TypeParameterInstantiation", params: params }); } function unionTypeAnnotation$1(types) { return validateNode({ type: "UnionTypeAnnotation", types: types }); } function variance(kind) { return validateNode({ type: "Variance", kind: kind }); } function voidTypeAnnotation$3() { return { type: "VoidTypeAnnotation" }; } function enumDeclaration(id, body) { return validateNode({ type: "EnumDeclaration", id: id, body: body }); } function enumBooleanBody(members) { return validateNode({ type: "EnumBooleanBody", members: members, explicitType: null, hasUnknownMembers: null }); } function enumNumberBody(members) { return validateNode({ type: "EnumNumberBody", members: members, explicitType: null, hasUnknownMembers: null }); } function enumStringBody(members) { return validateNode({ type: "EnumStringBody", members: members, explicitType: null, hasUnknownMembers: null }); } function enumSymbolBody(members) { return validateNode({ type: "EnumSymbolBody", members: members, hasUnknownMembers: null }); } function enumBooleanMember(id) { return validateNode({ type: "EnumBooleanMember", id: id, init: null }); } function enumNumberMember(id, init) { return validateNode({ type: "EnumNumberMember", id: id, init: init }); } function enumStringMember(id, init) { return validateNode({ type: "EnumStringMember", id: id, init: init }); } function enumDefaultedMember(id) { return validateNode({ type: "EnumDefaultedMember", id: id }); } function indexedAccessType(objectType, indexType) { return validateNode({ type: "IndexedAccessType", objectType: objectType, indexType: indexType }); } function optionalIndexedAccessType(objectType, indexType) { return validateNode({ type: "OptionalIndexedAccessType", objectType: objectType, indexType: indexType, optional: null }); } function jsxAttribute(name, value) { if (value === void 0) { value = null; } return validateNode({ type: "JSXAttribute", name: name, value: value }); } function jsxClosingElement(name) { return validateNode({ type: "JSXClosingElement", name: name }); } function jsxElement(openingElement, closingElement, children, selfClosing) { if (closingElement === void 0) { closingElement = null; } if (selfClosing === void 0) { selfClosing = null; } return validateNode({ type: "JSXElement", openingElement: openingElement, closingElement: closingElement, children: children, selfClosing: selfClosing }); } function jsxEmptyExpression() { return { type: "JSXEmptyExpression" }; } function jsxExpressionContainer$1(expression) { return validateNode({ type: "JSXExpressionContainer", expression: expression }); } function jsxSpreadChild(expression) { return validateNode({ type: "JSXSpreadChild", expression: expression }); } function jsxIdentifier$2(name) { return validateNode({ type: "JSXIdentifier", name: name }); } function jsxMemberExpression$1(object, property) { return validateNode({ type: "JSXMemberExpression", object: object, property: property }); } function jsxNamespacedName(namespace, name) { return validateNode({ type: "JSXNamespacedName", namespace: namespace, name: name }); } function jsxOpeningElement(name, attributes, selfClosing) { if (selfClosing === void 0) { selfClosing = false; } return validateNode({ type: "JSXOpeningElement", name: name, attributes: attributes, selfClosing: selfClosing }); } function jsxSpreadAttribute(argument) { return validateNode({ type: "JSXSpreadAttribute", argument: argument }); } function jsxText(value) { return validateNode({ type: "JSXText", value: value }); } function jsxFragment(openingFragment, closingFragment, children) { return validateNode({ type: "JSXFragment", openingFragment: openingFragment, closingFragment: closingFragment, children: children }); } function jsxOpeningFragment() { return { type: "JSXOpeningFragment" }; } function jsxClosingFragment() { return { type: "JSXClosingFragment" }; } function noop$1() { return { type: "Noop" }; } function placeholder(expectedNode, name) { return validateNode({ type: "Placeholder", expectedNode: expectedNode, name: name }); } function v8IntrinsicIdentifier(name) { return validateNode({ type: "V8IntrinsicIdentifier", name: name }); } function argumentPlaceholder() { return { type: "ArgumentPlaceholder" }; } function bindExpression(object, callee) { return validateNode({ type: "BindExpression", object: object, callee: callee }); } function importAttribute(key, value) { return validateNode({ type: "ImportAttribute", key: key, value: value }); } function decorator(expression) { return validateNode({ type: "Decorator", expression: expression }); } function doExpression(body, async) { if (async === void 0) { async = false; } return validateNode({ type: "DoExpression", body: body, async: async }); } function exportDefaultSpecifier(exported) { return validateNode({ type: "ExportDefaultSpecifier", exported: exported }); } function recordExpression(properties) { return validateNode({ type: "RecordExpression", properties: properties }); } function tupleExpression(elements) { if (elements === void 0) { elements = []; } return validateNode({ type: "TupleExpression", elements: elements }); } function decimalLiteral(value) { return validateNode({ type: "DecimalLiteral", value: value }); } function moduleExpression(body) { return validateNode({ type: "ModuleExpression", body: body }); } function topicReference() { return { type: "TopicReference" }; } function pipelineTopicExpression(expression) { return validateNode({ type: "PipelineTopicExpression", expression: expression }); } function pipelineBareFunction(callee) { return validateNode({ type: "PipelineBareFunction", callee: callee }); } function pipelinePrimaryTopicReference() { return { type: "PipelinePrimaryTopicReference" }; } function tsParameterProperty(parameter) { return validateNode({ type: "TSParameterProperty", parameter: parameter }); } function tsDeclareFunction(id, typeParameters, params, returnType) { if (id === void 0) { id = null; } if (typeParameters === void 0) { typeParameters = null; } if (returnType === void 0) { returnType = null; } return validateNode({ type: "TSDeclareFunction", id: id, typeParameters: typeParameters, params: params, returnType: returnType }); } function tsDeclareMethod(decorators, key, typeParameters, params, returnType) { if (decorators === void 0) { decorators = null; } if (typeParameters === void 0) { typeParameters = null; } if (returnType === void 0) { returnType = null; } return validateNode({ type: "TSDeclareMethod", decorators: decorators, key: key, typeParameters: typeParameters, params: params, returnType: returnType }); } function tsQualifiedName(left, right) { return validateNode({ type: "TSQualifiedName", left: left, right: right }); } function tsCallSignatureDeclaration(typeParameters, parameters, typeAnnotation) { if (typeParameters === void 0) { typeParameters = null; } if (typeAnnotation === void 0) { typeAnnotation = null; } return validateNode({ type: "TSCallSignatureDeclaration", typeParameters: typeParameters, parameters: parameters, typeAnnotation: typeAnnotation }); } function tsConstructSignatureDeclaration(typeParameters, parameters, typeAnnotation) { if (typeParameters === void 0) { typeParameters = null; } if (typeAnnotation === void 0) { typeAnnotation = null; } return validateNode({ type: "TSConstructSignatureDeclaration", typeParameters: typeParameters, parameters: parameters, typeAnnotation: typeAnnotation }); } function tsPropertySignature(key, typeAnnotation, initializer) { if (typeAnnotation === void 0) { typeAnnotation = null; } if (initializer === void 0) { initializer = null; } return validateNode({ type: "TSPropertySignature", key: key, typeAnnotation: typeAnnotation, initializer: initializer, kind: null }); } function tsMethodSignature(key, typeParameters, parameters, typeAnnotation) { if (typeParameters === void 0) { typeParameters = null; } if (typeAnnotation === void 0) { typeAnnotation = null; } return validateNode({ type: "TSMethodSignature", key: key, typeParameters: typeParameters, parameters: parameters, typeAnnotation: typeAnnotation, kind: null }); } function tsIndexSignature(parameters, typeAnnotation) { if (typeAnnotation === void 0) { typeAnnotation = null; } return validateNode({ type: "TSIndexSignature", parameters: parameters, typeAnnotation: typeAnnotation }); } function tsAnyKeyword() { return { type: "TSAnyKeyword" }; } function tsBooleanKeyword() { return { type: "TSBooleanKeyword" }; } function tsBigIntKeyword() { return { type: "TSBigIntKeyword" }; } function tsIntrinsicKeyword() { return { type: "TSIntrinsicKeyword" }; } function tsNeverKeyword() { return { type: "TSNeverKeyword" }; } function tsNullKeyword() { return { type: "TSNullKeyword" }; } function tsNumberKeyword() { return { type: "TSNumberKeyword" }; } function tsObjectKeyword() { return { type: "TSObjectKeyword" }; } function tsStringKeyword() { return { type: "TSStringKeyword" }; } function tsSymbolKeyword() { return { type: "TSSymbolKeyword" }; } function tsUndefinedKeyword() { return { type: "TSUndefinedKeyword" }; } function tsUnknownKeyword() { return { type: "TSUnknownKeyword" }; } function tsVoidKeyword() { return { type: "TSVoidKeyword" }; } function tsThisType() { return { type: "TSThisType" }; } function tsFunctionType(typeParameters, parameters, typeAnnotation) { if (typeParameters === void 0) { typeParameters = null; } if (typeAnnotation === void 0) { typeAnnotation = null; } return validateNode({ type: "TSFunctionType", typeParameters: typeParameters, parameters: parameters, typeAnnotation: typeAnnotation }); } function tsConstructorType(typeParameters, parameters, typeAnnotation) { if (typeParameters === void 0) { typeParameters = null; } if (typeAnnotation === void 0) { typeAnnotation = null; } return validateNode({ type: "TSConstructorType", typeParameters: typeParameters, parameters: parameters, typeAnnotation: typeAnnotation }); } function tsTypeReference(typeName, typeParameters) { if (typeParameters === void 0) { typeParameters = null; } return validateNode({ type: "TSTypeReference", typeName: typeName, typeParameters: typeParameters }); } function tsTypePredicate(parameterName, typeAnnotation, asserts) { if (typeAnnotation === void 0) { typeAnnotation = null; } if (asserts === void 0) { asserts = null; } return validateNode({ type: "TSTypePredicate", parameterName: parameterName, typeAnnotation: typeAnnotation, asserts: asserts }); } function tsTypeQuery(exprName, typeParameters) { if (typeParameters === void 0) { typeParameters = null; } return validateNode({ type: "TSTypeQuery", exprName: exprName, typeParameters: typeParameters }); } function tsTypeLiteral(members) { return validateNode({ type: "TSTypeLiteral", members: members }); } function tsArrayType(elementType) { return validateNode({ type: "TSArrayType", elementType: elementType }); } function tsTupleType(elementTypes) { return validateNode({ type: "TSTupleType", elementTypes: elementTypes }); } function tsOptionalType(typeAnnotation) { return validateNode({ type: "TSOptionalType", typeAnnotation: typeAnnotation }); } function tsRestType(typeAnnotation) { return validateNode({ type: "TSRestType", typeAnnotation: typeAnnotation }); } function tsNamedTupleMember(label, elementType, optional) { if (optional === void 0) { optional = false; } return validateNode({ type: "TSNamedTupleMember", label: label, elementType: elementType, optional: optional }); } function tsUnionType(types) { return validateNode({ type: "TSUnionType", types: types }); } function tsIntersectionType(types) { return validateNode({ type: "TSIntersectionType", types: types }); } function tsConditionalType(checkType, extendsType, trueType, falseType) { return validateNode({ type: "TSConditionalType", checkType: checkType, extendsType: extendsType, trueType: trueType, falseType: falseType }); } function tsInferType(typeParameter) { return validateNode({ type: "TSInferType", typeParameter: typeParameter }); } function tsParenthesizedType(typeAnnotation) { return validateNode({ type: "TSParenthesizedType", typeAnnotation: typeAnnotation }); } function tsTypeOperator(typeAnnotation) { return validateNode({ type: "TSTypeOperator", typeAnnotation: typeAnnotation, operator: null }); } function tsIndexedAccessType(objectType, indexType) { return validateNode({ type: "TSIndexedAccessType", objectType: objectType, indexType: indexType }); } function tsMappedType(typeParameter, typeAnnotation, nameType) { if (typeAnnotation === void 0) { typeAnnotation = null; } if (nameType === void 0) { nameType = null; } return validateNode({ type: "TSMappedType", typeParameter: typeParameter, typeAnnotation: typeAnnotation, nameType: nameType }); } function tsLiteralType(literal) { return validateNode({ type: "TSLiteralType", literal: literal }); } function tsExpressionWithTypeArguments(expression, typeParameters) { if (typeParameters === void 0) { typeParameters = null; } return validateNode({ type: "TSExpressionWithTypeArguments", expression: expression, typeParameters: typeParameters }); } function tsInterfaceDeclaration(id, typeParameters, _extends, body) { if (typeParameters === void 0) { typeParameters = null; } if (_extends === void 0) { _extends = null; } return validateNode({ type: "TSInterfaceDeclaration", id: id, typeParameters: typeParameters, "extends": _extends, body: body }); } function tsInterfaceBody(body) { return validateNode({ type: "TSInterfaceBody", body: body }); } function tsTypeAliasDeclaration(id, typeParameters, typeAnnotation) { if (typeParameters === void 0) { typeParameters = null; } return validateNode({ type: "TSTypeAliasDeclaration", id: id, typeParameters: typeParameters, typeAnnotation: typeAnnotation }); } function tsInstantiationExpression(expression, typeParameters) { if (typeParameters === void 0) { typeParameters = null; } return validateNode({ type: "TSInstantiationExpression", expression: expression, typeParameters: typeParameters }); } function tsAsExpression(expression, typeAnnotation) { return validateNode({ type: "TSAsExpression", expression: expression, typeAnnotation: typeAnnotation }); } function tsSatisfiesExpression(expression, typeAnnotation) { return validateNode({ type: "TSSatisfiesExpression", expression: expression, typeAnnotation: typeAnnotation }); } function tsTypeAssertion(typeAnnotation, expression) { return validateNode({ type: "TSTypeAssertion", typeAnnotation: typeAnnotation, expression: expression }); } function tsEnumDeclaration(id, members) { return validateNode({ type: "TSEnumDeclaration", id: id, members: members }); } function tsEnumMember(id, initializer) { if (initializer === void 0) { initializer = null; } return validateNode({ type: "TSEnumMember", id: id, initializer: initializer }); } function tsModuleDeclaration(id, body) { return validateNode({ type: "TSModuleDeclaration", id: id, body: body }); } function tsModuleBlock(body) { return validateNode({ type: "TSModuleBlock", body: body }); } function tsImportType(argument, qualifier, typeParameters) { if (qualifier === void 0) { qualifier = null; } if (typeParameters === void 0) { typeParameters = null; } return validateNode({ type: "TSImportType", argument: argument, qualifier: qualifier, typeParameters: typeParameters }); } function tsImportEqualsDeclaration(id, moduleReference) { return validateNode({ type: "TSImportEqualsDeclaration", id: id, moduleReference: moduleReference, isExport: null }); } function tsExternalModuleReference(expression) { return validateNode({ type: "TSExternalModuleReference", expression: expression }); } function tsNonNullExpression(expression) { return validateNode({ type: "TSNonNullExpression", expression: expression }); } function tsExportAssignment(expression) { return validateNode({ type: "TSExportAssignment", expression: expression }); } function tsNamespaceExportDeclaration(id) { return validateNode({ type: "TSNamespaceExportDeclaration", id: id }); } function tsTypeAnnotation(typeAnnotation) { return validateNode({ type: "TSTypeAnnotation", typeAnnotation: typeAnnotation }); } function tsTypeParameterInstantiation(params) { return validateNode({ type: "TSTypeParameterInstantiation", params: params }); } function tsTypeParameterDeclaration(params) { return validateNode({ type: "TSTypeParameterDeclaration", params: params }); } function tsTypeParameter(constraint, _default, name) { if (constraint === void 0) { constraint = null; } if (_default === void 0) { _default = null; } return validateNode({ type: "TSTypeParameter", constraint: constraint, "default": _default, name: name }); } function NumberLiteral(value) { deprecationWarning$1("NumberLiteral", "NumericLiteral", "The node type "); return numericLiteral$8(value); } function RegexLiteral(pattern, flags) { if (flags === void 0) { flags = ""; } deprecationWarning$1("RegexLiteral", "RegExpLiteral", "The node type "); return regExpLiteral(pattern, flags); } function RestProperty(argument) { deprecationWarning$1("RestProperty", "RestElement", "The node type "); return restElement$2(argument); } function SpreadProperty(argument) { deprecationWarning$1("SpreadProperty", "SpreadElement", "The node type "); return spreadElement$2(argument); } function cleanJSXElementLiteralChild(child, args) { var lines = child.value.split(/\r\n|\n|\r/); var lastNonEmptyLine = 0; for (var i = 0; i < lines.length; i++) { if (lines[i].match(/[^ \t]/)) { lastNonEmptyLine = i; } } var str = ""; for (var _i = 0; _i < lines.length; _i++) { var line = lines[_i]; var isFirstLine = _i === 0; var isLastLine = _i === lines.length - 1; var isLastNonEmptyLine = _i === lastNonEmptyLine; var trimmedLine = line.replace(/\t/g, " "); if (!isFirstLine) { trimmedLine = trimmedLine.replace(/^[ ]+/, ""); } if (!isLastLine) { trimmedLine = trimmedLine.replace(/[ ]+$/, ""); } if (trimmedLine) { if (!isLastNonEmptyLine) { trimmedLine += " "; } str += trimmedLine; } } if (str) args.push(inherits$1(stringLiteral$8(str), child)); } function buildChildren(node) { var elements = []; for (var i = 0; i < node.children.length; i++) { var child = node.children[i]; if (isJSXText(child)) { cleanJSXElementLiteralChild(child, elements); continue; } if (isJSXExpressionContainer$1(child)) child = child.expression; if (isJSXEmptyExpression(child)) continue; elements.push(child); } return elements; } function isNode(node) { return !!(node && VISITOR_KEYS$5[node.type]); } function assertNode(node) { if (!isNode(node)) { var _node$type; var type = (_node$type = node == null ? void 0 : node.type) != null ? _node$type : JSON.stringify(node); throw new TypeError("Not a valid node of type \"" + type + "\""); } } function assert$3(type, node, opts) { if (!is$1(type, node, opts)) { throw new Error("Expected type \"" + type + "\" with option " + JSON.stringify(opts) + ", " + ("but instead got \"" + node.type + "\".")); } } function assertArrayExpression(node, opts) { assert$3("ArrayExpression", node, opts); } function assertAssignmentExpression(node, opts) { assert$3("AssignmentExpression", node, opts); } function assertBinaryExpression(node, opts) { assert$3("BinaryExpression", node, opts); } function assertInterpreterDirective(node, opts) { assert$3("InterpreterDirective", node, opts); } function assertDirective(node, opts) { assert$3("Directive", node, opts); } function assertDirectiveLiteral(node, opts) { assert$3("DirectiveLiteral", node, opts); } function assertBlockStatement(node, opts) { assert$3("BlockStatement", node, opts); } function assertBreakStatement(node, opts) { assert$3("BreakStatement", node, opts); } function assertCallExpression(node, opts) { assert$3("CallExpression", node, opts); } function assertCatchClause(node, opts) { assert$3("CatchClause", node, opts); } function assertConditionalExpression(node, opts) { assert$3("ConditionalExpression", node, opts); } function assertContinueStatement(node, opts) { assert$3("ContinueStatement", node, opts); } function assertDebuggerStatement(node, opts) { assert$3("DebuggerStatement", node, opts); } function assertDoWhileStatement(node, opts) { assert$3("DoWhileStatement", node, opts); } function assertEmptyStatement(node, opts) { assert$3("EmptyStatement", node, opts); } function assertExpressionStatement$1(node, opts) { assert$3("ExpressionStatement", node, opts); } function assertFile(node, opts) { assert$3("File", node, opts); } function assertForInStatement(node, opts) { assert$3("ForInStatement", node, opts); } function assertForStatement(node, opts) { assert$3("ForStatement", node, opts); } function assertFunctionDeclaration(node, opts) { assert$3("FunctionDeclaration", node, opts); } function assertFunctionExpression(node, opts) { assert$3("FunctionExpression", node, opts); } function assertIdentifier(node, opts) { assert$3("Identifier", node, opts); } function assertIfStatement(node, opts) { assert$3("IfStatement", node, opts); } function assertLabeledStatement(node, opts) { assert$3("LabeledStatement", node, opts); } function assertStringLiteral(node, opts) { assert$3("StringLiteral", node, opts); } function assertNumericLiteral(node, opts) { assert$3("NumericLiteral", node, opts); } function assertNullLiteral(node, opts) { assert$3("NullLiteral", node, opts); } function assertBooleanLiteral(node, opts) { assert$3("BooleanLiteral", node, opts); } function assertRegExpLiteral(node, opts) { assert$3("RegExpLiteral", node, opts); } function assertLogicalExpression(node, opts) { assert$3("LogicalExpression", node, opts); } function assertMemberExpression(node, opts) { assert$3("MemberExpression", node, opts); } function assertNewExpression(node, opts) { assert$3("NewExpression", node, opts); } function assertProgram(node, opts) { assert$3("Program", node, opts); } function assertObjectExpression(node, opts) { assert$3("ObjectExpression", node, opts); } function assertObjectMethod(node, opts) { assert$3("ObjectMethod", node, opts); } function assertObjectProperty(node, opts) { assert$3("ObjectProperty", node, opts); } function assertRestElement(node, opts) { assert$3("RestElement", node, opts); } function assertReturnStatement(node, opts) { assert$3("ReturnStatement", node, opts); } function assertSequenceExpression(node, opts) { assert$3("SequenceExpression", node, opts); } function assertParenthesizedExpression(node, opts) { assert$3("ParenthesizedExpression", node, opts); } function assertSwitchCase(node, opts) { assert$3("SwitchCase", node, opts); } function assertSwitchStatement(node, opts) { assert$3("SwitchStatement", node, opts); } function assertThisExpression(node, opts) { assert$3("ThisExpression", node, opts); } function assertThrowStatement(node, opts) { assert$3("ThrowStatement", node, opts); } function assertTryStatement(node, opts) { assert$3("TryStatement", node, opts); } function assertUnaryExpression(node, opts) { assert$3("UnaryExpression", node, opts); } function assertUpdateExpression(node, opts) { assert$3("UpdateExpression", node, opts); } function assertVariableDeclaration(node, opts) { assert$3("VariableDeclaration", node, opts); } function assertVariableDeclarator(node, opts) { assert$3("VariableDeclarator", node, opts); } function assertWhileStatement(node, opts) { assert$3("WhileStatement", node, opts); } function assertWithStatement(node, opts) { assert$3("WithStatement", node, opts); } function assertAssignmentPattern(node, opts) { assert$3("AssignmentPattern", node, opts); } function assertArrayPattern(node, opts) { assert$3("ArrayPattern", node, opts); } function assertArrowFunctionExpression(node, opts) { assert$3("ArrowFunctionExpression", node, opts); } function assertClassBody(node, opts) { assert$3("ClassBody", node, opts); } function assertClassExpression(node, opts) { assert$3("ClassExpression", node, opts); } function assertClassDeclaration(node, opts) { assert$3("ClassDeclaration", node, opts); } function assertExportAllDeclaration(node, opts) { assert$3("ExportAllDeclaration", node, opts); } function assertExportDefaultDeclaration(node, opts) { assert$3("ExportDefaultDeclaration", node, opts); } function assertExportNamedDeclaration(node, opts) { assert$3("ExportNamedDeclaration", node, opts); } function assertExportSpecifier$1(node, opts) { assert$3("ExportSpecifier", node, opts); } function assertForOfStatement(node, opts) { assert$3("ForOfStatement", node, opts); } function assertImportDeclaration(node, opts) { assert$3("ImportDeclaration", node, opts); } function assertImportDefaultSpecifier(node, opts) { assert$3("ImportDefaultSpecifier", node, opts); } function assertImportNamespaceSpecifier(node, opts) { assert$3("ImportNamespaceSpecifier", node, opts); } function assertImportSpecifier(node, opts) { assert$3("ImportSpecifier", node, opts); } function assertMetaProperty(node, opts) { assert$3("MetaProperty", node, opts); } function assertClassMethod(node, opts) { assert$3("ClassMethod", node, opts); } function assertObjectPattern(node, opts) { assert$3("ObjectPattern", node, opts); } function assertSpreadElement(node, opts) { assert$3("SpreadElement", node, opts); } function assertSuper(node, opts) { assert$3("Super", node, opts); } function assertTaggedTemplateExpression(node, opts) { assert$3("TaggedTemplateExpression", node, opts); } function assertTemplateElement(node, opts) { assert$3("TemplateElement", node, opts); } function assertTemplateLiteral(node, opts) { assert$3("TemplateLiteral", node, opts); } function assertYieldExpression(node, opts) { assert$3("YieldExpression", node, opts); } function assertAwaitExpression(node, opts) { assert$3("AwaitExpression", node, opts); } function assertImport(node, opts) { assert$3("Import", node, opts); } function assertBigIntLiteral(node, opts) { assert$3("BigIntLiteral", node, opts); } function assertExportNamespaceSpecifier(node, opts) { assert$3("ExportNamespaceSpecifier", node, opts); } function assertOptionalMemberExpression(node, opts) { assert$3("OptionalMemberExpression", node, opts); } function assertOptionalCallExpression(node, opts) { assert$3("OptionalCallExpression", node, opts); } function assertClassProperty(node, opts) { assert$3("ClassProperty", node, opts); } function assertClassAccessorProperty(node, opts) { assert$3("ClassAccessorProperty", node, opts); } function assertClassPrivateProperty(node, opts) { assert$3("ClassPrivateProperty", node, opts); } function assertClassPrivateMethod(node, opts) { assert$3("ClassPrivateMethod", node, opts); } function assertPrivateName(node, opts) { assert$3("PrivateName", node, opts); } function assertStaticBlock(node, opts) { assert$3("StaticBlock", node, opts); } function assertAnyTypeAnnotation(node, opts) { assert$3("AnyTypeAnnotation", node, opts); } function assertArrayTypeAnnotation(node, opts) { assert$3("ArrayTypeAnnotation", node, opts); } function assertBooleanTypeAnnotation(node, opts) { assert$3("BooleanTypeAnnotation", node, opts); } function assertBooleanLiteralTypeAnnotation(node, opts) { assert$3("BooleanLiteralTypeAnnotation", node, opts); } function assertNullLiteralTypeAnnotation(node, opts) { assert$3("NullLiteralTypeAnnotation", node, opts); } function assertClassImplements(node, opts) { assert$3("ClassImplements", node, opts); } function assertDeclareClass(node, opts) { assert$3("DeclareClass", node, opts); } function assertDeclareFunction(node, opts) { assert$3("DeclareFunction", node, opts); } function assertDeclareInterface(node, opts) { assert$3("DeclareInterface", node, opts); } function assertDeclareModule(node, opts) { assert$3("DeclareModule", node, opts); } function assertDeclareModuleExports(node, opts) { assert$3("DeclareModuleExports", node, opts); } function assertDeclareTypeAlias(node, opts) { assert$3("DeclareTypeAlias", node, opts); } function assertDeclareOpaqueType(node, opts) { assert$3("DeclareOpaqueType", node, opts); } function assertDeclareVariable(node, opts) { assert$3("DeclareVariable", node, opts); } function assertDeclareExportDeclaration(node, opts) { assert$3("DeclareExportDeclaration", node, opts); } function assertDeclareExportAllDeclaration(node, opts) { assert$3("DeclareExportAllDeclaration", node, opts); } function assertDeclaredPredicate(node, opts) { assert$3("DeclaredPredicate", node, opts); } function assertExistsTypeAnnotation(node, opts) { assert$3("ExistsTypeAnnotation", node, opts); } function assertFunctionTypeAnnotation(node, opts) { assert$3("FunctionTypeAnnotation", node, opts); } function assertFunctionTypeParam(node, opts) { assert$3("FunctionTypeParam", node, opts); } function assertGenericTypeAnnotation(node, opts) { assert$3("GenericTypeAnnotation", node, opts); } function assertInferredPredicate(node, opts) { assert$3("InferredPredicate", node, opts); } function assertInterfaceExtends(node, opts) { assert$3("InterfaceExtends", node, opts); } function assertInterfaceDeclaration(node, opts) { assert$3("InterfaceDeclaration", node, opts); } function assertInterfaceTypeAnnotation(node, opts) { assert$3("InterfaceTypeAnnotation", node, opts); } function assertIntersectionTypeAnnotation(node, opts) { assert$3("IntersectionTypeAnnotation", node, opts); } function assertMixedTypeAnnotation(node, opts) { assert$3("MixedTypeAnnotation", node, opts); } function assertEmptyTypeAnnotation(node, opts) { assert$3("EmptyTypeAnnotation", node, opts); } function assertNullableTypeAnnotation(node, opts) { assert$3("NullableTypeAnnotation", node, opts); } function assertNumberLiteralTypeAnnotation(node, opts) { assert$3("NumberLiteralTypeAnnotation", node, opts); } function assertNumberTypeAnnotation(node, opts) { assert$3("NumberTypeAnnotation", node, opts); } function assertObjectTypeAnnotation(node, opts) { assert$3("ObjectTypeAnnotation", node, opts); } function assertObjectTypeInternalSlot(node, opts) { assert$3("ObjectTypeInternalSlot", node, opts); } function assertObjectTypeCallProperty(node, opts) { assert$3("ObjectTypeCallProperty", node, opts); } function assertObjectTypeIndexer(node, opts) { assert$3("ObjectTypeIndexer", node, opts); } function assertObjectTypeProperty(node, opts) { assert$3("ObjectTypeProperty", node, opts); } function assertObjectTypeSpreadProperty(node, opts) { assert$3("ObjectTypeSpreadProperty", node, opts); } function assertOpaqueType(node, opts) { assert$3("OpaqueType", node, opts); } function assertQualifiedTypeIdentifier(node, opts) { assert$3("QualifiedTypeIdentifier", node, opts); } function assertStringLiteralTypeAnnotation(node, opts) { assert$3("StringLiteralTypeAnnotation", node, opts); } function assertStringTypeAnnotation(node, opts) { assert$3("StringTypeAnnotation", node, opts); } function assertSymbolTypeAnnotation(node, opts) { assert$3("SymbolTypeAnnotation", node, opts); } function assertThisTypeAnnotation(node, opts) { assert$3("ThisTypeAnnotation", node, opts); } function assertTupleTypeAnnotation(node, opts) { assert$3("TupleTypeAnnotation", node, opts); } function assertTypeofTypeAnnotation(node, opts) { assert$3("TypeofTypeAnnotation", node, opts); } function assertTypeAlias(node, opts) { assert$3("TypeAlias", node, opts); } function assertTypeAnnotation(node, opts) { assert$3("TypeAnnotation", node, opts); } function assertTypeCastExpression(node, opts) { assert$3("TypeCastExpression", node, opts); } function assertTypeParameter(node, opts) { assert$3("TypeParameter", node, opts); } function assertTypeParameterDeclaration(node, opts) { assert$3("TypeParameterDeclaration", node, opts); } function assertTypeParameterInstantiation(node, opts) { assert$3("TypeParameterInstantiation", node, opts); } function assertUnionTypeAnnotation(node, opts) { assert$3("UnionTypeAnnotation", node, opts); } function assertVariance(node, opts) { assert$3("Variance", node, opts); } function assertVoidTypeAnnotation(node, opts) { assert$3("VoidTypeAnnotation", node, opts); } function assertEnumDeclaration(node, opts) { assert$3("EnumDeclaration", node, opts); } function assertEnumBooleanBody(node, opts) { assert$3("EnumBooleanBody", node, opts); } function assertEnumNumberBody(node, opts) { assert$3("EnumNumberBody", node, opts); } function assertEnumStringBody(node, opts) { assert$3("EnumStringBody", node, opts); } function assertEnumSymbolBody(node, opts) { assert$3("EnumSymbolBody", node, opts); } function assertEnumBooleanMember(node, opts) { assert$3("EnumBooleanMember", node, opts); } function assertEnumNumberMember(node, opts) { assert$3("EnumNumberMember", node, opts); } function assertEnumStringMember(node, opts) { assert$3("EnumStringMember", node, opts); } function assertEnumDefaultedMember(node, opts) { assert$3("EnumDefaultedMember", node, opts); } function assertIndexedAccessType(node, opts) { assert$3("IndexedAccessType", node, opts); } function assertOptionalIndexedAccessType(node, opts) { assert$3("OptionalIndexedAccessType", node, opts); } function assertJSXAttribute(node, opts) { assert$3("JSXAttribute", node, opts); } function assertJSXClosingElement(node, opts) { assert$3("JSXClosingElement", node, opts); } function assertJSXElement(node, opts) { assert$3("JSXElement", node, opts); } function assertJSXEmptyExpression(node, opts) { assert$3("JSXEmptyExpression", node, opts); } function assertJSXExpressionContainer(node, opts) { assert$3("JSXExpressionContainer", node, opts); } function assertJSXSpreadChild(node, opts) { assert$3("JSXSpreadChild", node, opts); } function assertJSXIdentifier(node, opts) { assert$3("JSXIdentifier", node, opts); } function assertJSXMemberExpression(node, opts) { assert$3("JSXMemberExpression", node, opts); } function assertJSXNamespacedName(node, opts) { assert$3("JSXNamespacedName", node, opts); } function assertJSXOpeningElement(node, opts) { assert$3("JSXOpeningElement", node, opts); } function assertJSXSpreadAttribute(node, opts) { assert$3("JSXSpreadAttribute", node, opts); } function assertJSXText(node, opts) { assert$3("JSXText", node, opts); } function assertJSXFragment(node, opts) { assert$3("JSXFragment", node, opts); } function assertJSXOpeningFragment(node, opts) { assert$3("JSXOpeningFragment", node, opts); } function assertJSXClosingFragment(node, opts) { assert$3("JSXClosingFragment", node, opts); } function assertNoop(node, opts) { assert$3("Noop", node, opts); } function assertPlaceholder(node, opts) { assert$3("Placeholder", node, opts); } function assertV8IntrinsicIdentifier(node, opts) { assert$3("V8IntrinsicIdentifier", node, opts); } function assertArgumentPlaceholder(node, opts) { assert$3("ArgumentPlaceholder", node, opts); } function assertBindExpression(node, opts) { assert$3("BindExpression", node, opts); } function assertImportAttribute(node, opts) { assert$3("ImportAttribute", node, opts); } function assertDecorator(node, opts) { assert$3("Decorator", node, opts); } function assertDoExpression(node, opts) { assert$3("DoExpression", node, opts); } function assertExportDefaultSpecifier(node, opts) { assert$3("ExportDefaultSpecifier", node, opts); } function assertRecordExpression(node, opts) { assert$3("RecordExpression", node, opts); } function assertTupleExpression(node, opts) { assert$3("TupleExpression", node, opts); } function assertDecimalLiteral(node, opts) { assert$3("DecimalLiteral", node, opts); } function assertModuleExpression(node, opts) { assert$3("ModuleExpression", node, opts); } function assertTopicReference(node, opts) { assert$3("TopicReference", node, opts); } function assertPipelineTopicExpression(node, opts) { assert$3("PipelineTopicExpression", node, opts); } function assertPipelineBareFunction(node, opts) { assert$3("PipelineBareFunction", node, opts); } function assertPipelinePrimaryTopicReference(node, opts) { assert$3("PipelinePrimaryTopicReference", node, opts); } function assertTSParameterProperty(node, opts) { assert$3("TSParameterProperty", node, opts); } function assertTSDeclareFunction(node, opts) { assert$3("TSDeclareFunction", node, opts); } function assertTSDeclareMethod(node, opts) { assert$3("TSDeclareMethod", node, opts); } function assertTSQualifiedName(node, opts) { assert$3("TSQualifiedName", node, opts); } function assertTSCallSignatureDeclaration(node, opts) { assert$3("TSCallSignatureDeclaration", node, opts); } function assertTSConstructSignatureDeclaration(node, opts) { assert$3("TSConstructSignatureDeclaration", node, opts); } function assertTSPropertySignature(node, opts) { assert$3("TSPropertySignature", node, opts); } function assertTSMethodSignature(node, opts) { assert$3("TSMethodSignature", node, opts); } function assertTSIndexSignature(node, opts) { assert$3("TSIndexSignature", node, opts); } function assertTSAnyKeyword(node, opts) { assert$3("TSAnyKeyword", node, opts); } function assertTSBooleanKeyword(node, opts) { assert$3("TSBooleanKeyword", node, opts); } function assertTSBigIntKeyword(node, opts) { assert$3("TSBigIntKeyword", node, opts); } function assertTSIntrinsicKeyword(node, opts) { assert$3("TSIntrinsicKeyword", node, opts); } function assertTSNeverKeyword(node, opts) { assert$3("TSNeverKeyword", node, opts); } function assertTSNullKeyword(node, opts) { assert$3("TSNullKeyword", node, opts); } function assertTSNumberKeyword(node, opts) { assert$3("TSNumberKeyword", node, opts); } function assertTSObjectKeyword(node, opts) { assert$3("TSObjectKeyword", node, opts); } function assertTSStringKeyword(node, opts) { assert$3("TSStringKeyword", node, opts); } function assertTSSymbolKeyword(node, opts) { assert$3("TSSymbolKeyword", node, opts); } function assertTSUndefinedKeyword(node, opts) { assert$3("TSUndefinedKeyword", node, opts); } function assertTSUnknownKeyword(node, opts) { assert$3("TSUnknownKeyword", node, opts); } function assertTSVoidKeyword(node, opts) { assert$3("TSVoidKeyword", node, opts); } function assertTSThisType(node, opts) { assert$3("TSThisType", node, opts); } function assertTSFunctionType(node, opts) { assert$3("TSFunctionType", node, opts); } function assertTSConstructorType(node, opts) { assert$3("TSConstructorType", node, opts); } function assertTSTypeReference(node, opts) { assert$3("TSTypeReference", node, opts); } function assertTSTypePredicate(node, opts) { assert$3("TSTypePredicate", node, opts); } function assertTSTypeQuery(node, opts) { assert$3("TSTypeQuery", node, opts); } function assertTSTypeLiteral(node, opts) { assert$3("TSTypeLiteral", node, opts); } function assertTSArrayType(node, opts) { assert$3("TSArrayType", node, opts); } function assertTSTupleType(node, opts) { assert$3("TSTupleType", node, opts); } function assertTSOptionalType(node, opts) { assert$3("TSOptionalType", node, opts); } function assertTSRestType(node, opts) { assert$3("TSRestType", node, opts); } function assertTSNamedTupleMember(node, opts) { assert$3("TSNamedTupleMember", node, opts); } function assertTSUnionType(node, opts) { assert$3("TSUnionType", node, opts); } function assertTSIntersectionType(node, opts) { assert$3("TSIntersectionType", node, opts); } function assertTSConditionalType(node, opts) { assert$3("TSConditionalType", node, opts); } function assertTSInferType(node, opts) { assert$3("TSInferType", node, opts); } function assertTSParenthesizedType(node, opts) { assert$3("TSParenthesizedType", node, opts); } function assertTSTypeOperator(node, opts) { assert$3("TSTypeOperator", node, opts); } function assertTSIndexedAccessType(node, opts) { assert$3("TSIndexedAccessType", node, opts); } function assertTSMappedType(node, opts) { assert$3("TSMappedType", node, opts); } function assertTSLiteralType(node, opts) { assert$3("TSLiteralType", node, opts); } function assertTSExpressionWithTypeArguments(node, opts) { assert$3("TSExpressionWithTypeArguments", node, opts); } function assertTSInterfaceDeclaration(node, opts) { assert$3("TSInterfaceDeclaration", node, opts); } function assertTSInterfaceBody(node, opts) { assert$3("TSInterfaceBody", node, opts); } function assertTSTypeAliasDeclaration(node, opts) { assert$3("TSTypeAliasDeclaration", node, opts); } function assertTSInstantiationExpression(node, opts) { assert$3("TSInstantiationExpression", node, opts); } function assertTSAsExpression(node, opts) { assert$3("TSAsExpression", node, opts); } function assertTSSatisfiesExpression(node, opts) { assert$3("TSSatisfiesExpression", node, opts); } function assertTSTypeAssertion(node, opts) { assert$3("TSTypeAssertion", node, opts); } function assertTSEnumDeclaration(node, opts) { assert$3("TSEnumDeclaration", node, opts); } function assertTSEnumMember(node, opts) { assert$3("TSEnumMember", node, opts); } function assertTSModuleDeclaration(node, opts) { assert$3("TSModuleDeclaration", node, opts); } function assertTSModuleBlock(node, opts) { assert$3("TSModuleBlock", node, opts); } function assertTSImportType(node, opts) { assert$3("TSImportType", node, opts); } function assertTSImportEqualsDeclaration(node, opts) { assert$3("TSImportEqualsDeclaration", node, opts); } function assertTSExternalModuleReference(node, opts) { assert$3("TSExternalModuleReference", node, opts); } function assertTSNonNullExpression(node, opts) { assert$3("TSNonNullExpression", node, opts); } function assertTSExportAssignment(node, opts) { assert$3("TSExportAssignment", node, opts); } function assertTSNamespaceExportDeclaration(node, opts) { assert$3("TSNamespaceExportDeclaration", node, opts); } function assertTSTypeAnnotation(node, opts) { assert$3("TSTypeAnnotation", node, opts); } function assertTSTypeParameterInstantiation(node, opts) { assert$3("TSTypeParameterInstantiation", node, opts); } function assertTSTypeParameterDeclaration(node, opts) { assert$3("TSTypeParameterDeclaration", node, opts); } function assertTSTypeParameter(node, opts) { assert$3("TSTypeParameter", node, opts); } function assertStandardized(node, opts) { assert$3("Standardized", node, opts); } function assertExpression$1(node, opts) { assert$3("Expression", node, opts); } function assertBinary(node, opts) { assert$3("Binary", node, opts); } function assertScopable(node, opts) { assert$3("Scopable", node, opts); } function assertBlockParent(node, opts) { assert$3("BlockParent", node, opts); } function assertBlock(node, opts) { assert$3("Block", node, opts); } function assertStatement(node, opts) { assert$3("Statement", node, opts); } function assertTerminatorless(node, opts) { assert$3("Terminatorless", node, opts); } function assertCompletionStatement(node, opts) { assert$3("CompletionStatement", node, opts); } function assertConditional(node, opts) { assert$3("Conditional", node, opts); } function assertLoop(node, opts) { assert$3("Loop", node, opts); } function assertWhile(node, opts) { assert$3("While", node, opts); } function assertExpressionWrapper(node, opts) { assert$3("ExpressionWrapper", node, opts); } function assertFor(node, opts) { assert$3("For", node, opts); } function assertForXStatement(node, opts) { assert$3("ForXStatement", node, opts); } function assertFunction$1(node, opts) { assert$3("Function", node, opts); } function assertFunctionParent(node, opts) { assert$3("FunctionParent", node, opts); } function assertPureish(node, opts) { assert$3("Pureish", node, opts); } function assertDeclaration(node, opts) { assert$3("Declaration", node, opts); } function assertPatternLike(node, opts) { assert$3("PatternLike", node, opts); } function assertLVal(node, opts) { assert$3("LVal", node, opts); } function assertTSEntityName(node, opts) { assert$3("TSEntityName", node, opts); } function assertLiteral(node, opts) { assert$3("Literal", node, opts); } function assertImmutable(node, opts) { assert$3("Immutable", node, opts); } function assertUserWhitespacable(node, opts) { assert$3("UserWhitespacable", node, opts); } function assertMethod(node, opts) { assert$3("Method", node, opts); } function assertObjectMember(node, opts) { assert$3("ObjectMember", node, opts); } function assertProperty(node, opts) { assert$3("Property", node, opts); } function assertUnaryLike(node, opts) { assert$3("UnaryLike", node, opts); } function assertPattern(node, opts) { assert$3("Pattern", node, opts); } function assertClass(node, opts) { assert$3("Class", node, opts); } function assertImportOrExportDeclaration(node, opts) { assert$3("ImportOrExportDeclaration", node, opts); } function assertExportDeclaration(node, opts) { assert$3("ExportDeclaration", node, opts); } function assertModuleSpecifier(node, opts) { assert$3("ModuleSpecifier", node, opts); } function assertAccessor(node, opts) { assert$3("Accessor", node, opts); } function assertPrivate(node, opts) { assert$3("Private", node, opts); } function assertFlow(node, opts) { assert$3("Flow", node, opts); } function assertFlowType(node, opts) { assert$3("FlowType", node, opts); } function assertFlowBaseAnnotation(node, opts) { assert$3("FlowBaseAnnotation", node, opts); } function assertFlowDeclaration(node, opts) { assert$3("FlowDeclaration", node, opts); } function assertFlowPredicate(node, opts) { assert$3("FlowPredicate", node, opts); } function assertEnumBody(node, opts) { assert$3("EnumBody", node, opts); } function assertEnumMember(node, opts) { assert$3("EnumMember", node, opts); } function assertJSX(node, opts) { assert$3("JSX", node, opts); } function assertMiscellaneous(node, opts) { assert$3("Miscellaneous", node, opts); } function assertTypeScript(node, opts) { assert$3("TypeScript", node, opts); } function assertTSTypeElement(node, opts) { assert$3("TSTypeElement", node, opts); } function assertTSType(node, opts) { assert$3("TSType", node, opts); } function assertTSBaseType(node, opts) { assert$3("TSBaseType", node, opts); } function assertNumberLiteral(node, opts) { deprecationWarning$1("assertNumberLiteral", "assertNumericLiteral"); assert$3("NumberLiteral", node, opts); } function assertRegexLiteral(node, opts) { deprecationWarning$1("assertRegexLiteral", "assertRegExpLiteral"); assert$3("RegexLiteral", node, opts); } function assertRestProperty(node, opts) { deprecationWarning$1("assertRestProperty", "assertRestElement"); assert$3("RestProperty", node, opts); } function assertSpreadProperty(node, opts) { deprecationWarning$1("assertSpreadProperty", "assertSpreadElement"); assert$3("SpreadProperty", node, opts); } function assertModuleDeclaration(node, opts) { deprecationWarning$1("assertModuleDeclaration", "assertImportOrExportDeclaration"); assert$3("ModuleDeclaration", node, opts); } function createTypeAnnotationBasedOnTypeof$1(type) { switch (type) { case "string": return stringTypeAnnotation$2(); case "number": return numberTypeAnnotation$2(); case "undefined": return voidTypeAnnotation$3(); case "boolean": return booleanTypeAnnotation$1(); case "function": return genericTypeAnnotation$1(identifier$i("Function")); case "object": return genericTypeAnnotation$1(identifier$i("Object")); case "symbol": return genericTypeAnnotation$1(identifier$i("Symbol")); case "bigint": return anyTypeAnnotation$2(); } throw new Error("Invalid typeof value: " + type); } function getQualifiedName$1(node) { return isIdentifier$j(node) ? node.name : node.id.name + "." + getQualifiedName$1(node.qualification); } function removeTypeDuplicates$1(nodes) { var generics = new Map(); var bases = new Map(); var typeGroups = new Set(); var types = []; for (var i = 0; i < nodes.length; i++) { var node = nodes[i]; if (!node) continue; if (types.indexOf(node) >= 0) { continue; } if (isAnyTypeAnnotation$1(node)) { return [node]; } if (isFlowBaseAnnotation$1(node)) { bases.set(node.type, node); continue; } if (isUnionTypeAnnotation$2(node)) { if (!typeGroups.has(node.types)) { nodes = nodes.concat(node.types); typeGroups.add(node.types); } continue; } if (isGenericTypeAnnotation$1(node)) { var name = getQualifiedName$1(node.id); if (generics.has(name)) { var existing = generics.get(name); if (existing.typeParameters) { if (node.typeParameters) { existing.typeParameters.params = removeTypeDuplicates$1(existing.typeParameters.params.concat(node.typeParameters.params)); } } else { existing = node.typeParameters; } } else { generics.set(name, node); } continue; } types.push(node); } for (var _iterator = _createForOfIteratorHelperLoose(bases), _step; !(_step = _iterator()).done;) { var _step$value = _slicedToArray(_step.value, 2), baseType = _step$value[1]; types.push(baseType); } for (var _iterator2 = _createForOfIteratorHelperLoose(generics), _step2; !(_step2 = _iterator2()).done;) { var _step2$value = _slicedToArray(_step2.value, 2), genericName = _step2$value[1]; types.push(genericName); } return types; } function createFlowUnionType$1(types) { var flattened = removeTypeDuplicates$1(types); if (flattened.length === 1) { return flattened[0]; } else { return unionTypeAnnotation$1(flattened); } } function getQualifiedName(node) { return isIdentifier$j(node) ? node.name : node.right.name + "." + getQualifiedName(node.left); } function removeTypeDuplicates(nodes) { var generics = new Map(); var bases = new Map(); var typeGroups = new Set(); var types = []; for (var i = 0; i < nodes.length; i++) { var node = nodes[i]; if (!node) continue; if (types.indexOf(node) >= 0) { continue; } if (isTSAnyKeyword(node)) { return [node]; } if (isTSBaseType(node)) { bases.set(node.type, node); continue; } if (isTSUnionType$1(node)) { if (!typeGroups.has(node.types)) { nodes.push.apply(nodes, _toConsumableArray(node.types)); typeGroups.add(node.types); } continue; } if (isTSTypeReference$1(node) && node.typeParameters) { var name = getQualifiedName(node.typeName); if (generics.has(name)) { var existing = generics.get(name); if (existing.typeParameters) { if (node.typeParameters) { existing.typeParameters.params = removeTypeDuplicates(existing.typeParameters.params.concat(node.typeParameters.params)); } } else { existing = node.typeParameters; } } else { generics.set(name, node); } continue; } types.push(node); } for (var _iterator = _createForOfIteratorHelperLoose(bases), _step; !(_step = _iterator()).done;) { var _step$value = _slicedToArray(_step.value, 2), baseType = _step$value[1]; types.push(baseType); } for (var _iterator2 = _createForOfIteratorHelperLoose(generics), _step2; !(_step2 = _iterator2()).done;) { var _step2$value = _slicedToArray(_step2.value, 2), genericName = _step2$value[1]; types.push(genericName); } return types; } function createTSUnionType$1(typeAnnotations) { var types = typeAnnotations.map(function (type) { return isTSTypeAnnotation$1(type) ? type.typeAnnotation : type; }); var flattened = removeTypeDuplicates(types); if (flattened.length === 1) { return flattened[0]; } else { return tsUnionType(flattened); } } var has$9 = Function.call.bind(Object.prototype.hasOwnProperty); function cloneIfNode(obj, deep, withoutLoc, commentsCache) { if (obj && typeof obj.type === "string") { return cloneNodeInternal(obj, deep, withoutLoc, commentsCache); } return obj; } function cloneIfNodeOrArray(obj, deep, withoutLoc, commentsCache) { if (Array.isArray(obj)) { return obj.map(function (node) { return cloneIfNode(node, deep, withoutLoc, commentsCache); }); } return cloneIfNode(obj, deep, withoutLoc, commentsCache); } function cloneNode$j(node, deep, withoutLoc) { if (deep === void 0) { deep = true; } if (withoutLoc === void 0) { withoutLoc = false; } return cloneNodeInternal(node, deep, withoutLoc, new Map()); } function cloneNodeInternal(node, deep, withoutLoc, commentsCache) { if (deep === void 0) { deep = true; } if (withoutLoc === void 0) { withoutLoc = false; } if (!node) return node; var type = node.type; var newNode = { type: node.type }; if (isIdentifier$j(node)) { newNode.name = node.name; if (has$9(node, "optional") && typeof node.optional === "boolean") { newNode.optional = node.optional; } if (has$9(node, "typeAnnotation")) { newNode.typeAnnotation = deep ? cloneIfNodeOrArray(node.typeAnnotation, true, withoutLoc, commentsCache) : node.typeAnnotation; } } else if (!has$9(NODE_FIELDS, type)) { throw new Error("Unknown node type: \"" + type + "\""); } else { for (var _i = 0, _Object$keys = Object.keys(NODE_FIELDS[type]); _i < _Object$keys.length; _i++) { var field = _Object$keys[_i]; if (has$9(node, field)) { if (deep) { newNode[field] = isFile(node) && field === "comments" ? maybeCloneComments(node.comments, deep, withoutLoc, commentsCache) : cloneIfNodeOrArray(node[field], true, withoutLoc, commentsCache); } else { newNode[field] = node[field]; } } } } if (has$9(node, "loc")) { if (withoutLoc) { newNode.loc = null; } else { newNode.loc = node.loc; } } if (has$9(node, "leadingComments")) { newNode.leadingComments = maybeCloneComments(node.leadingComments, deep, withoutLoc, commentsCache); } if (has$9(node, "innerComments")) { newNode.innerComments = maybeCloneComments(node.innerComments, deep, withoutLoc, commentsCache); } if (has$9(node, "trailingComments")) { newNode.trailingComments = maybeCloneComments(node.trailingComments, deep, withoutLoc, commentsCache); } if (has$9(node, "extra")) { newNode.extra = Object.assign({}, node.extra); } return newNode; } function maybeCloneComments(comments, deep, withoutLoc, commentsCache) { if (!comments || !deep) { return comments; } return comments.map(function (comment) { var cache = commentsCache.get(comment); if (cache) return cache; var type = comment.type, value = comment.value, loc = comment.loc; var ret = { type: type, value: value, loc: loc }; if (withoutLoc) { ret.loc = null; } commentsCache.set(comment, ret); return ret; }); } function clone(node) { return cloneNode$j(node, false); } function cloneDeep$1(node) { return cloneNode$j(node); } function cloneDeepWithoutLoc(node) { return cloneNode$j(node, true, true); } function cloneWithoutLoc(node) { return cloneNode$j(node, false, true); } function addComments$1(node, type, comments) { if (!comments || !node) return node; var key = type + "Comments"; if (node[key]) { if (type === "leading") { node[key] = comments.concat(node[key]); } else { var _node$key; (_node$key = node[key]).push.apply(_node$key, _toConsumableArray(comments)); } } else { node[key] = comments; } return node; } function addComment$2(node, type, content, line) { return addComments$1(node, type, [{ type: line ? "CommentLine" : "CommentBlock", value: content }]); } function inherit(key, child, parent) { if (child && parent) { child[key] = Array.from(new Set([].concat(child[key], parent[key]).filter(Boolean))); } } function inheritInnerComments(child, parent) { inherit("innerComments", child, parent); } function inheritLeadingComments$1(child, parent) { inherit("leadingComments", child, parent); } function inheritTrailingComments$1(child, parent) { inherit("trailingComments", child, parent); } function inheritsComments$1(child, parent) { inheritTrailingComments$1(child, parent); inheritLeadingComments$1(child, parent); inheritInnerComments(child, parent); return child; } function removeComments$1(node) { COMMENT_KEYS.forEach(function (key) { node[key] = null; }); return node; } var STANDARDIZED_TYPES = FLIPPED_ALIAS_KEYS$3["Standardized"]; var EXPRESSION_TYPES = FLIPPED_ALIAS_KEYS$3["Expression"]; var BINARY_TYPES = FLIPPED_ALIAS_KEYS$3["Binary"]; var SCOPABLE_TYPES = FLIPPED_ALIAS_KEYS$3["Scopable"]; var BLOCKPARENT_TYPES = FLIPPED_ALIAS_KEYS$3["BlockParent"]; var BLOCK_TYPES = FLIPPED_ALIAS_KEYS$3["Block"]; var STATEMENT_TYPES = FLIPPED_ALIAS_KEYS$3["Statement"]; var TERMINATORLESS_TYPES = FLIPPED_ALIAS_KEYS$3["Terminatorless"]; var COMPLETIONSTATEMENT_TYPES = FLIPPED_ALIAS_KEYS$3["CompletionStatement"]; var CONDITIONAL_TYPES = FLIPPED_ALIAS_KEYS$3["Conditional"]; var LOOP_TYPES = FLIPPED_ALIAS_KEYS$3["Loop"]; var WHILE_TYPES = FLIPPED_ALIAS_KEYS$3["While"]; var EXPRESSIONWRAPPER_TYPES = FLIPPED_ALIAS_KEYS$3["ExpressionWrapper"]; var FOR_TYPES = FLIPPED_ALIAS_KEYS$3["For"]; var FORXSTATEMENT_TYPES = FLIPPED_ALIAS_KEYS$3["ForXStatement"]; var FUNCTION_TYPES$1 = FLIPPED_ALIAS_KEYS$3["Function"]; var FUNCTIONPARENT_TYPES = FLIPPED_ALIAS_KEYS$3["FunctionParent"]; var PUREISH_TYPES = FLIPPED_ALIAS_KEYS$3["Pureish"]; var DECLARATION_TYPES = FLIPPED_ALIAS_KEYS$3["Declaration"]; var PATTERNLIKE_TYPES = FLIPPED_ALIAS_KEYS$3["PatternLike"]; var LVAL_TYPES = FLIPPED_ALIAS_KEYS$3["LVal"]; var TSENTITYNAME_TYPES = FLIPPED_ALIAS_KEYS$3["TSEntityName"]; var LITERAL_TYPES = FLIPPED_ALIAS_KEYS$3["Literal"]; var IMMUTABLE_TYPES = FLIPPED_ALIAS_KEYS$3["Immutable"]; var USERWHITESPACABLE_TYPES = FLIPPED_ALIAS_KEYS$3["UserWhitespacable"]; var METHOD_TYPES = FLIPPED_ALIAS_KEYS$3["Method"]; var OBJECTMEMBER_TYPES = FLIPPED_ALIAS_KEYS$3["ObjectMember"]; var PROPERTY_TYPES = FLIPPED_ALIAS_KEYS$3["Property"]; var UNARYLIKE_TYPES = FLIPPED_ALIAS_KEYS$3["UnaryLike"]; var PATTERN_TYPES = FLIPPED_ALIAS_KEYS$3["Pattern"]; var CLASS_TYPES = FLIPPED_ALIAS_KEYS$3["Class"]; var IMPORTOREXPORTDECLARATION_TYPES = FLIPPED_ALIAS_KEYS$3["ImportOrExportDeclaration"]; var EXPORTDECLARATION_TYPES = FLIPPED_ALIAS_KEYS$3["ExportDeclaration"]; var MODULESPECIFIER_TYPES = FLIPPED_ALIAS_KEYS$3["ModuleSpecifier"]; var ACCESSOR_TYPES = FLIPPED_ALIAS_KEYS$3["Accessor"]; var PRIVATE_TYPES = FLIPPED_ALIAS_KEYS$3["Private"]; var FLOW_TYPES = FLIPPED_ALIAS_KEYS$3["Flow"]; var FLOWTYPE_TYPES = FLIPPED_ALIAS_KEYS$3["FlowType"]; var FLOWBASEANNOTATION_TYPES = FLIPPED_ALIAS_KEYS$3["FlowBaseAnnotation"]; var FLOWDECLARATION_TYPES = FLIPPED_ALIAS_KEYS$3["FlowDeclaration"]; var FLOWPREDICATE_TYPES = FLIPPED_ALIAS_KEYS$3["FlowPredicate"]; var ENUMBODY_TYPES = FLIPPED_ALIAS_KEYS$3["EnumBody"]; var ENUMMEMBER_TYPES = FLIPPED_ALIAS_KEYS$3["EnumMember"]; var JSX_TYPES = FLIPPED_ALIAS_KEYS$3["JSX"]; var MISCELLANEOUS_TYPES = FLIPPED_ALIAS_KEYS$3["Miscellaneous"]; var TYPESCRIPT_TYPES = FLIPPED_ALIAS_KEYS$3["TypeScript"]; var TSTYPEELEMENT_TYPES = FLIPPED_ALIAS_KEYS$3["TSTypeElement"]; var TSTYPE_TYPES = FLIPPED_ALIAS_KEYS$3["TSType"]; var TSBASETYPE_TYPES = FLIPPED_ALIAS_KEYS$3["TSBaseType"]; var MODULEDECLARATION_TYPES = IMPORTOREXPORTDECLARATION_TYPES; function toBlock(node, parent) { if (isBlockStatement$2(node)) { return node; } var blockNodes = []; if (isEmptyStatement(node)) { blockNodes = []; } else { if (!isStatement$8(node)) { if (isFunction$4(parent)) { node = returnStatement$3(node); } else { node = expressionStatement$a(node); } } blockNodes = [node]; } return blockStatement$6(blockNodes); } function ensureBlock$1(node, key) { if (key === void 0) { key = "body"; } var result = toBlock(node[key], node); node[key] = result; return result; } function toIdentifier$1(input) { input = input + ""; var name = ""; for (var _iterator = _createForOfIteratorHelperLoose(input), _step; !(_step = _iterator()).done;) { var c = _step.value; name += isIdentifierChar(c.codePointAt(0)) ? c : "-"; } name = name.replace(/^[-0-9]+/, ""); name = name.replace(/[-\s]+(.)?/g, function (match, c) { return c ? c.toUpperCase() : ""; }); if (!isValidIdentifier$1(name)) { name = "_" + name; } return name || "_"; } function toBindingIdentifierName$1(name) { name = toIdentifier$1(name); if (name === "eval" || name === "arguments") name = "_" + name; return name; } function toComputedKey$2(node, key) { if (key === void 0) { key = node.key || node.property; } if (!node.computed && isIdentifier$j(key)) key = stringLiteral$8(key.name); return key; } function toExpression$1(node) { if (isExpressionStatement$3(node)) { node = node.expression; } if (isExpression$4(node)) { return node; } if (isClass$2(node)) { node.type = "ClassExpression"; } else if (isFunction$4(node)) { node.type = "FunctionExpression"; } if (!isExpression$4(node)) { throw new Error("cannot turn " + node.type + " to an expression"); } return node; } function traverseFast$2(node, enter, opts) { if (!node) return; var keys = VISITOR_KEYS$5[node.type]; if (!keys) return; opts = opts || {}; enter(node, opts); for (var _iterator = _createForOfIteratorHelperLoose(keys), _step; !(_step = _iterator()).done;) { var key = _step.value; var subNode = node[key]; if (Array.isArray(subNode)) { for (var _iterator2 = _createForOfIteratorHelperLoose(subNode), _step2; !(_step2 = _iterator2()).done;) { var _node = _step2.value; traverseFast$2(_node, enter, opts); } } else { traverseFast$2(subNode, enter, opts); } } } var CLEAR_KEYS = ["tokens", "start", "end", "loc", "raw", "rawValue"]; var CLEAR_KEYS_PLUS_COMMENTS = [].concat(_toConsumableArray(COMMENT_KEYS), ["comments"], CLEAR_KEYS); function removeProperties$1(node, opts) { if (opts === void 0) { opts = {}; } var map = opts.preserveComments ? CLEAR_KEYS : CLEAR_KEYS_PLUS_COMMENTS; for (var _iterator = _createForOfIteratorHelperLoose(map), _step; !(_step = _iterator()).done;) { var _key = _step.value; if (node[_key] != null) node[_key] = undefined; } for (var _i = 0, _Object$keys = Object.keys(node); _i < _Object$keys.length; _i++) { var key = _Object$keys[_i]; if (key[0] === "_" && node[key] != null) node[key] = undefined; } var symbols = Object.getOwnPropertySymbols(node); for (var _iterator2 = _createForOfIteratorHelperLoose(symbols), _step2; !(_step2 = _iterator2()).done;) { var sym = _step2.value; node[sym] = null; } } function removePropertiesDeep$1(tree, opts) { traverseFast$2(tree, removeProperties$1, opts); return tree; } function toKeyAlias(node, key) { if (key === void 0) { key = node.key; } var alias; if (node.kind === "method") { return toKeyAlias.increment() + ""; } else if (isIdentifier$j(key)) { alias = key.name; } else if (isStringLiteral$6(key)) { alias = JSON.stringify(key.value); } else { alias = JSON.stringify(removePropertiesDeep$1(cloneNode$j(key))); } if (node.computed) { alias = "[" + alias + "]"; } if (node["static"]) { alias = "static:" + alias; } return alias; } toKeyAlias.uid = 0; toKeyAlias.increment = function () { if (toKeyAlias.uid >= Number.MAX_SAFE_INTEGER) { return toKeyAlias.uid = 0; } else { return toKeyAlias.uid++; } }; function getBindingIdentifiers$2(node, duplicates, outerOnly) { var search = [].concat(node); var ids = Object.create(null); while (search.length) { var id = search.shift(); if (!id) continue; var keys = getBindingIdentifiers$2.keys[id.type]; if (isIdentifier$j(id)) { if (duplicates) { var _ids = ids[id.name] = ids[id.name] || []; _ids.push(id); } else { ids[id.name] = id; } continue; } if (isExportDeclaration$3(id) && !isExportAllDeclaration$1(id)) { if (isDeclaration$1(id.declaration)) { search.push(id.declaration); } continue; } if (outerOnly) { if (isFunctionDeclaration$2(id)) { search.push(id.id); continue; } if (isFunctionExpression$1(id)) { continue; } } if (keys) { for (var i = 0; i < keys.length; i++) { var key = keys[i]; var nodes = id[key]; if (nodes) { Array.isArray(nodes) ? search.push.apply(search, _toConsumableArray(nodes)) : search.push(nodes); } } } } return ids; } getBindingIdentifiers$2.keys = { DeclareClass: ["id"], DeclareFunction: ["id"], DeclareModule: ["id"], DeclareVariable: ["id"], DeclareInterface: ["id"], DeclareTypeAlias: ["id"], DeclareOpaqueType: ["id"], InterfaceDeclaration: ["id"], TypeAlias: ["id"], OpaqueType: ["id"], CatchClause: ["param"], LabeledStatement: ["label"], UnaryExpression: ["argument"], AssignmentExpression: ["left"], ImportSpecifier: ["local"], ImportNamespaceSpecifier: ["local"], ImportDefaultSpecifier: ["local"], ImportDeclaration: ["specifiers"], ExportSpecifier: ["exported"], ExportNamespaceSpecifier: ["exported"], ExportDefaultSpecifier: ["exported"], FunctionDeclaration: ["id", "params"], FunctionExpression: ["id", "params"], ArrowFunctionExpression: ["params"], ObjectMethod: ["params"], ClassMethod: ["params"], ClassPrivateMethod: ["params"], ForInStatement: ["left"], ForOfStatement: ["left"], ClassDeclaration: ["id"], ClassExpression: ["id"], RestElement: ["argument"], UpdateExpression: ["argument"], ObjectProperty: ["value"], AssignmentPattern: ["left"], ArrayPattern: ["elements"], ObjectPattern: ["properties"], VariableDeclaration: ["declarations"], VariableDeclarator: ["id"] }; function gatherSequenceExpressions(nodes, scope, declars) { var exprs = []; var ensureLastUndefined = true; for (var _iterator = _createForOfIteratorHelperLoose(nodes), _step; !(_step = _iterator()).done;) { var node = _step.value; if (!isEmptyStatement(node)) { ensureLastUndefined = false; } if (isExpression$4(node)) { exprs.push(node); } else if (isExpressionStatement$3(node)) { exprs.push(node.expression); } else if (isVariableDeclaration$3(node)) { if (node.kind !== "var") return; for (var _iterator2 = _createForOfIteratorHelperLoose(node.declarations), _step2; !(_step2 = _iterator2()).done;) { var declar = _step2.value; var bindings = getBindingIdentifiers$2(declar); for (var _i = 0, _Object$keys = Object.keys(bindings); _i < _Object$keys.length; _i++) { var key = _Object$keys[_i]; declars.push({ kind: node.kind, id: cloneNode$j(bindings[key]) }); } if (declar.init) { exprs.push(assignmentExpression$d("=", declar.id, declar.init)); } } ensureLastUndefined = true; } else if (isIfStatement$2(node)) { var consequent = node.consequent ? gatherSequenceExpressions([node.consequent], scope, declars) : scope.buildUndefinedNode(); var alternate = node.alternate ? gatherSequenceExpressions([node.alternate], scope, declars) : scope.buildUndefinedNode(); if (!consequent || !alternate) return; exprs.push(conditionalExpression$4(node.test, consequent, alternate)); } else if (isBlockStatement$2(node)) { var body = gatherSequenceExpressions(node.body, scope, declars); if (!body) return; exprs.push(body); } else if (isEmptyStatement(node)) { if (nodes.indexOf(node) === 0) { ensureLastUndefined = true; } } else { return; } } if (ensureLastUndefined) { exprs.push(scope.buildUndefinedNode()); } if (exprs.length === 1) { return exprs[0]; } else { return sequenceExpression$7(exprs); } } function toSequenceExpression$1(nodes, scope) { if (!(nodes != null && nodes.length)) return; var declars = []; var result = gatherSequenceExpressions(nodes, scope, declars); if (!result) return; for (var _i = 0, _declars = declars; _i < _declars.length; _i++) { var declar = _declars[_i]; scope.push(declar); } return result; } function toStatement(node, ignore) { if (isStatement$8(node)) { return node; } var mustHaveId = false; var newType; if (isClass$2(node)) { mustHaveId = true; newType = "ClassDeclaration"; } else if (isFunction$4(node)) { mustHaveId = true; newType = "FunctionDeclaration"; } else if (isAssignmentExpression$4(node)) { return expressionStatement$a(node); } if (mustHaveId && !node.id) { newType = false; } if (!newType) { if (ignore) { return false; } else { throw new Error("cannot turn " + node.type + " to a statement"); } } node.type = newType; return node; } var objectToString = Function.call.bind(Object.prototype.toString); function isRegExp(value) { return objectToString(value) === "[object RegExp]"; } function isPlainObject(value) { if (typeof value !== "object" || value === null || Object.prototype.toString.call(value) !== "[object Object]") { return false; } var proto = Object.getPrototypeOf(value); return proto === null || Object.getPrototypeOf(proto) === null; } function valueToNode$1(value) { if (value === undefined) { return identifier$i("undefined"); } if (value === true || value === false) { return booleanLiteral$4(value); } if (value === null) { return nullLiteral$2(); } if (typeof value === "string") { return stringLiteral$8(value); } if (typeof value === "number") { var result; if (Number.isFinite(value)) { result = numericLiteral$8(Math.abs(value)); } else { var numerator; if (Number.isNaN(value)) { numerator = numericLiteral$8(0); } else { numerator = numericLiteral$8(1); } result = binaryExpression$5("/", numerator, numericLiteral$8(0)); } if (value < 0 || Object.is(value, -0)) { result = unaryExpression$7("-", result); } return result; } if (isRegExp(value)) { var pattern = value.source; var flags = value.toString().match(/\/([a-z]+|)$/)[1]; return regExpLiteral(pattern, flags); } if (Array.isArray(value)) { return arrayExpression$1(value.map(valueToNode$1)); } if (isPlainObject(value)) { var props = []; for (var _i = 0, _Object$keys = Object.keys(value); _i < _Object$keys.length; _i++) { var key = _Object$keys[_i]; var nodeKey = void 0; if (isValidIdentifier$1(key)) { nodeKey = identifier$i(key); } else { nodeKey = stringLiteral$8(key); } props.push(objectProperty$1(nodeKey, valueToNode$1(value[key]))); } return objectExpression$3(props); } throw new Error("don't know how to turn this value into a node"); } function appendToMemberExpression(member, append, computed) { if (computed === void 0) { computed = false; } member.object = memberExpression$c(member.object, member.property, member.computed); member.property = append; member.computed = !!computed; return member; } function inherits$1(child, parent) { if (!child || !parent) return child; for (var _iterator = _createForOfIteratorHelperLoose(INHERIT_KEYS.optional), _step; !(_step = _iterator()).done;) { var _key = _step.value; if (child[_key] == null) { child[_key] = parent[_key]; } } for (var _i = 0, _Object$keys = Object.keys(parent); _i < _Object$keys.length; _i++) { var key = _Object$keys[_i]; if (key[0] === "_" && key !== "__clone") { child[key] = parent[key]; } } for (var _iterator2 = _createForOfIteratorHelperLoose(INHERIT_KEYS.force), _step2; !(_step2 = _iterator2()).done;) { var _key2 = _step2.value; child[_key2] = parent[_key2]; } inheritsComments$1(child, parent); return child; } function prependToMemberExpression(member, prepend) { if (isSuper$3(member.object)) { throw new Error("Cannot prepend node to super property access (`super.foo`)."); } member.object = memberExpression$c(prepend, member.object); return member; } function getOuterBindingIdentifiers$2(node, duplicates) { return getBindingIdentifiers$2(node, duplicates, true); } function traverse$2(node, handlers, state) { if (typeof handlers === "function") { handlers = { enter: handlers }; } var _handlers = handlers, enter = _handlers.enter, exit = _handlers.exit; traverseSimpleImpl(node, enter, exit, state, []); } function traverseSimpleImpl(node, enter, exit, state, ancestors) { var keys = VISITOR_KEYS$5[node.type]; if (!keys) return; if (enter) enter(node, ancestors, state); for (var _iterator = _createForOfIteratorHelperLoose(keys), _step; !(_step = _iterator()).done;) { var key = _step.value; var subNode = node[key]; if (Array.isArray(subNode)) { for (var i = 0; i < subNode.length; i++) { var child = subNode[i]; if (!child) continue; ancestors.push({ node: node, key: key, index: i }); traverseSimpleImpl(child, enter, exit, state, ancestors); ancestors.pop(); } } else if (subNode) { ancestors.push({ node: node, key: key }); traverseSimpleImpl(subNode, enter, exit, state, ancestors); ancestors.pop(); } } if (exit) exit(node, ancestors, state); } function isBinding$1(node, parent, grandparent) { if (grandparent && node.type === "Identifier" && parent.type === "ObjectProperty" && grandparent.type === "ObjectExpression") { return false; } var keys = getBindingIdentifiers$2.keys[parent.type]; if (keys) { for (var i = 0; i < keys.length; i++) { var key = keys[i]; var val = parent[key]; if (Array.isArray(val)) { if (val.indexOf(node) >= 0) return true; } else { if (val === node) return true; } } } return false; } function isLet(node) { return isVariableDeclaration$3(node) && (node.kind !== "var" || node[BLOCK_SCOPED_SYMBOL]); } function isBlockScoped$2(node) { return isFunctionDeclaration$2(node) || isClassDeclaration$2(node) || isLet(node); } function isImmutable(node) { if (isType$2(node.type, "Immutable")) return true; if (isIdentifier$j(node)) { if (node.name === "undefined") { return true; } else { return false; } } return false; } function isNodesEquivalent(a, b) { if (typeof a !== "object" || typeof b !== "object" || a == null || b == null) { return a === b; } if (a.type !== b.type) { return false; } var fields = Object.keys(NODE_FIELDS[a.type] || a.type); var visitorKeys = VISITOR_KEYS$5[a.type]; for (var _i = 0, _fields = fields; _i < _fields.length; _i++) { var field = _fields[_i]; var val_a = a[field]; var val_b = b[field]; if (typeof val_a !== typeof val_b) { return false; } if (val_a == null && val_b == null) { continue; } else if (val_a == null || val_b == null) { return false; } if (Array.isArray(val_a)) { if (!Array.isArray(val_b)) { return false; } if (val_a.length !== val_b.length) { return false; } for (var i = 0; i < val_a.length; i++) { if (!isNodesEquivalent(val_a[i], val_b[i])) { return false; } } continue; } if (typeof val_a === "object" && !(visitorKeys != null && visitorKeys.includes(field))) { for (var _i2 = 0, _Object$keys = Object.keys(val_a); _i2 < _Object$keys.length; _i2++) { var key = _Object$keys[_i2]; if (val_a[key] !== val_b[key]) { return false; } } continue; } if (!isNodesEquivalent(val_a, val_b)) { return false; } } return true; } function isReferenced$2(node, parent, grandparent) { switch (parent.type) { case "MemberExpression": case "OptionalMemberExpression": if (parent.property === node) { return !!parent.computed; } return parent.object === node; case "JSXMemberExpression": return parent.object === node; case "VariableDeclarator": return parent.init === node; case "ArrowFunctionExpression": return parent.body === node; case "PrivateName": return false; case "ClassMethod": case "ClassPrivateMethod": case "ObjectMethod": if (parent.key === node) { return !!parent.computed; } return false; case "ObjectProperty": if (parent.key === node) { return !!parent.computed; } return !grandparent || grandparent.type !== "ObjectPattern"; case "ClassProperty": case "ClassAccessorProperty": if (parent.key === node) { return !!parent.computed; } return true; case "ClassPrivateProperty": return parent.key !== node; case "ClassDeclaration": case "ClassExpression": return parent.superClass === node; case "AssignmentExpression": return parent.right === node; case "AssignmentPattern": return parent.right === node; case "LabeledStatement": return false; case "CatchClause": return false; case "RestElement": return false; case "BreakStatement": case "ContinueStatement": return false; case "FunctionDeclaration": case "FunctionExpression": return false; case "ExportNamespaceSpecifier": case "ExportDefaultSpecifier": return false; case "ExportSpecifier": if (grandparent != null && grandparent.source) { return false; } return parent.local === node; case "ImportDefaultSpecifier": case "ImportNamespaceSpecifier": case "ImportSpecifier": return false; case "ImportAttribute": return false; case "JSXAttribute": return false; case "ObjectPattern": case "ArrayPattern": return false; case "MetaProperty": return false; case "ObjectTypeProperty": return parent.key !== node; case "TSEnumMember": return parent.id !== node; case "TSPropertySignature": if (parent.key === node) { return !!parent.computed; } return true; } return true; } function isScope$1(node, parent) { if (isBlockStatement$2(node) && (isFunction$4(parent) || isCatchClause(parent))) { return false; } if (isPattern(node) && (isFunction$4(parent) || isCatchClause(parent))) { return true; } return isScopable(node); } function isSpecifierDefault(specifier) { return isImportDefaultSpecifier$1(specifier) || isIdentifier$j(specifier.imported || specifier.exported, { name: "default" }); } var RESERVED_WORDS_ES3_ONLY = new Set(["abstract", "boolean", "byte", "char", "double", "enum", "final", "float", "goto", "implements", "int", "interface", "long", "native", "package", "private", "protected", "public", "short", "static", "synchronized", "throws", "transient", "volatile"]); function isValidES3Identifier(name) { return isValidIdentifier$1(name) && !RESERVED_WORDS_ES3_ONLY.has(name); } function isVar$1(node) { return isVariableDeclaration$3(node, { kind: "var" }) && !node[BLOCK_SCOPED_SYMBOL]; } var react$3 = { isReactComponent: isReactComponent, isCompatTag: isCompatTag$1, buildChildren: buildChildren }; var t$8 = /*#__PURE__*/Object.freeze({ __proto__: null, react: react$3, assertNode: assertNode, createTypeAnnotationBasedOnTypeof: createTypeAnnotationBasedOnTypeof$1, createUnionTypeAnnotation: createFlowUnionType$1, createFlowUnionType: createFlowUnionType$1, createTSUnionType: createTSUnionType$1, cloneNode: cloneNode$j, clone: clone, cloneDeep: cloneDeep$1, cloneDeepWithoutLoc: cloneDeepWithoutLoc, cloneWithoutLoc: cloneWithoutLoc, addComment: addComment$2, addComments: addComments$1, inheritInnerComments: inheritInnerComments, inheritLeadingComments: inheritLeadingComments$1, inheritsComments: inheritsComments$1, inheritTrailingComments: inheritTrailingComments$1, removeComments: removeComments$1, ensureBlock: ensureBlock$1, toBindingIdentifierName: toBindingIdentifierName$1, toBlock: toBlock, toComputedKey: toComputedKey$2, toExpression: toExpression$1, toIdentifier: toIdentifier$1, toKeyAlias: toKeyAlias, toSequenceExpression: toSequenceExpression$1, toStatement: toStatement, valueToNode: valueToNode$1, appendToMemberExpression: appendToMemberExpression, inherits: inherits$1, prependToMemberExpression: prependToMemberExpression, removeProperties: removeProperties$1, removePropertiesDeep: removePropertiesDeep$1, removeTypeDuplicates: removeTypeDuplicates$1, getBindingIdentifiers: getBindingIdentifiers$2, getOuterBindingIdentifiers: getOuterBindingIdentifiers$2, traverse: traverse$2, traverseFast: traverseFast$2, shallowEqual: shallowEqual$2, is: is$1, isBinding: isBinding$1, isBlockScoped: isBlockScoped$2, isImmutable: isImmutable, isLet: isLet, isNode: isNode, isNodesEquivalent: isNodesEquivalent, isPlaceholderType: isPlaceholderType, isReferenced: isReferenced$2, isScope: isScope$1, isSpecifierDefault: isSpecifierDefault, isType: isType$2, isValidES3Identifier: isValidES3Identifier, isValidIdentifier: isValidIdentifier$1, isVar: isVar$1, matchesPattern: matchesPattern$2, validate: validate$5, buildMatchMemberExpression: buildMatchMemberExpression$1, __internal__deprecationWarning: deprecationWarning$1, assertArrayExpression: assertArrayExpression, assertAssignmentExpression: assertAssignmentExpression, assertBinaryExpression: assertBinaryExpression, assertInterpreterDirective: assertInterpreterDirective, assertDirective: assertDirective, assertDirectiveLiteral: assertDirectiveLiteral, assertBlockStatement: assertBlockStatement, assertBreakStatement: assertBreakStatement, assertCallExpression: assertCallExpression, assertCatchClause: assertCatchClause, assertConditionalExpression: assertConditionalExpression, assertContinueStatement: assertContinueStatement, assertDebuggerStatement: assertDebuggerStatement, assertDoWhileStatement: assertDoWhileStatement, assertEmptyStatement: assertEmptyStatement, assertExpressionStatement: assertExpressionStatement$1, assertFile: assertFile, assertForInStatement: assertForInStatement, assertForStatement: assertForStatement, assertFunctionDeclaration: assertFunctionDeclaration, assertFunctionExpression: assertFunctionExpression, assertIdentifier: assertIdentifier, assertIfStatement: assertIfStatement, assertLabeledStatement: assertLabeledStatement, assertStringLiteral: assertStringLiteral, assertNumericLiteral: assertNumericLiteral, assertNullLiteral: assertNullLiteral, assertBooleanLiteral: assertBooleanLiteral, assertRegExpLiteral: assertRegExpLiteral, assertLogicalExpression: assertLogicalExpression, assertMemberExpression: assertMemberExpression, assertNewExpression: assertNewExpression, assertProgram: assertProgram, assertObjectExpression: assertObjectExpression, assertObjectMethod: assertObjectMethod, assertObjectProperty: assertObjectProperty, assertRestElement: assertRestElement, assertReturnStatement: assertReturnStatement, assertSequenceExpression: assertSequenceExpression, assertParenthesizedExpression: assertParenthesizedExpression, assertSwitchCase: assertSwitchCase, assertSwitchStatement: assertSwitchStatement, assertThisExpression: assertThisExpression, assertThrowStatement: assertThrowStatement, assertTryStatement: assertTryStatement, assertUnaryExpression: assertUnaryExpression, assertUpdateExpression: assertUpdateExpression, assertVariableDeclaration: assertVariableDeclaration, assertVariableDeclarator: assertVariableDeclarator, assertWhileStatement: assertWhileStatement, assertWithStatement: assertWithStatement, assertAssignmentPattern: assertAssignmentPattern, assertArrayPattern: assertArrayPattern, assertArrowFunctionExpression: assertArrowFunctionExpression, assertClassBody: assertClassBody, assertClassExpression: assertClassExpression, assertClassDeclaration: assertClassDeclaration, assertExportAllDeclaration: assertExportAllDeclaration, assertExportDefaultDeclaration: assertExportDefaultDeclaration, assertExportNamedDeclaration: assertExportNamedDeclaration, assertExportSpecifier: assertExportSpecifier$1, assertForOfStatement: assertForOfStatement, assertImportDeclaration: assertImportDeclaration, assertImportDefaultSpecifier: assertImportDefaultSpecifier, assertImportNamespaceSpecifier: assertImportNamespaceSpecifier, assertImportSpecifier: assertImportSpecifier, assertMetaProperty: assertMetaProperty, assertClassMethod: assertClassMethod, assertObjectPattern: assertObjectPattern, assertSpreadElement: assertSpreadElement, assertSuper: assertSuper, assertTaggedTemplateExpression: assertTaggedTemplateExpression, assertTemplateElement: assertTemplateElement, assertTemplateLiteral: assertTemplateLiteral, assertYieldExpression: assertYieldExpression, assertAwaitExpression: assertAwaitExpression, assertImport: assertImport, assertBigIntLiteral: assertBigIntLiteral, assertExportNamespaceSpecifier: assertExportNamespaceSpecifier, assertOptionalMemberExpression: assertOptionalMemberExpression, assertOptionalCallExpression: assertOptionalCallExpression, assertClassProperty: assertClassProperty, assertClassAccessorProperty: assertClassAccessorProperty, assertClassPrivateProperty: assertClassPrivateProperty, assertClassPrivateMethod: assertClassPrivateMethod, assertPrivateName: assertPrivateName, assertStaticBlock: assertStaticBlock, assertAnyTypeAnnotation: assertAnyTypeAnnotation, assertArrayTypeAnnotation: assertArrayTypeAnnotation, assertBooleanTypeAnnotation: assertBooleanTypeAnnotation, assertBooleanLiteralTypeAnnotation: assertBooleanLiteralTypeAnnotation, assertNullLiteralTypeAnnotation: assertNullLiteralTypeAnnotation, assertClassImplements: assertClassImplements, assertDeclareClass: assertDeclareClass, assertDeclareFunction: assertDeclareFunction, assertDeclareInterface: assertDeclareInterface, assertDeclareModule: assertDeclareModule, assertDeclareModuleExports: assertDeclareModuleExports, assertDeclareTypeAlias: assertDeclareTypeAlias, assertDeclareOpaqueType: assertDeclareOpaqueType, assertDeclareVariable: assertDeclareVariable, assertDeclareExportDeclaration: assertDeclareExportDeclaration, assertDeclareExportAllDeclaration: assertDeclareExportAllDeclaration, assertDeclaredPredicate: assertDeclaredPredicate, assertExistsTypeAnnotation: assertExistsTypeAnnotation, assertFunctionTypeAnnotation: assertFunctionTypeAnnotation, assertFunctionTypeParam: assertFunctionTypeParam, assertGenericTypeAnnotation: assertGenericTypeAnnotation, assertInferredPredicate: assertInferredPredicate, assertInterfaceExtends: assertInterfaceExtends, assertInterfaceDeclaration: assertInterfaceDeclaration, assertInterfaceTypeAnnotation: assertInterfaceTypeAnnotation, assertIntersectionTypeAnnotation: assertIntersectionTypeAnnotation, assertMixedTypeAnnotation: assertMixedTypeAnnotation, assertEmptyTypeAnnotation: assertEmptyTypeAnnotation, assertNullableTypeAnnotation: assertNullableTypeAnnotation, assertNumberLiteralTypeAnnotation: assertNumberLiteralTypeAnnotation, assertNumberTypeAnnotation: assertNumberTypeAnnotation, assertObjectTypeAnnotation: assertObjectTypeAnnotation, assertObjectTypeInternalSlot: assertObjectTypeInternalSlot, assertObjectTypeCallProperty: assertObjectTypeCallProperty, assertObjectTypeIndexer: assertObjectTypeIndexer, assertObjectTypeProperty: assertObjectTypeProperty, assertObjectTypeSpreadProperty: assertObjectTypeSpreadProperty, assertOpaqueType: assertOpaqueType, assertQualifiedTypeIdentifier: assertQualifiedTypeIdentifier, assertStringLiteralTypeAnnotation: assertStringLiteralTypeAnnotation, assertStringTypeAnnotation: assertStringTypeAnnotation, assertSymbolTypeAnnotation: assertSymbolTypeAnnotation, assertThisTypeAnnotation: assertThisTypeAnnotation, assertTupleTypeAnnotation: assertTupleTypeAnnotation, assertTypeofTypeAnnotation: assertTypeofTypeAnnotation, assertTypeAlias: assertTypeAlias, assertTypeAnnotation: assertTypeAnnotation, assertTypeCastExpression: assertTypeCastExpression, assertTypeParameter: assertTypeParameter, assertTypeParameterDeclaration: assertTypeParameterDeclaration, assertTypeParameterInstantiation: assertTypeParameterInstantiation, assertUnionTypeAnnotation: assertUnionTypeAnnotation, assertVariance: assertVariance, assertVoidTypeAnnotation: assertVoidTypeAnnotation, assertEnumDeclaration: assertEnumDeclaration, assertEnumBooleanBody: assertEnumBooleanBody, assertEnumNumberBody: assertEnumNumberBody, assertEnumStringBody: assertEnumStringBody, assertEnumSymbolBody: assertEnumSymbolBody, assertEnumBooleanMember: assertEnumBooleanMember, assertEnumNumberMember: assertEnumNumberMember, assertEnumStringMember: assertEnumStringMember, assertEnumDefaultedMember: assertEnumDefaultedMember, assertIndexedAccessType: assertIndexedAccessType, assertOptionalIndexedAccessType: assertOptionalIndexedAccessType, assertJSXAttribute: assertJSXAttribute, assertJSXClosingElement: assertJSXClosingElement, assertJSXElement: assertJSXElement, assertJSXEmptyExpression: assertJSXEmptyExpression, assertJSXExpressionContainer: assertJSXExpressionContainer, assertJSXSpreadChild: assertJSXSpreadChild, assertJSXIdentifier: assertJSXIdentifier, assertJSXMemberExpression: assertJSXMemberExpression, assertJSXNamespacedName: assertJSXNamespacedName, assertJSXOpeningElement: assertJSXOpeningElement, assertJSXSpreadAttribute: assertJSXSpreadAttribute, assertJSXText: assertJSXText, assertJSXFragment: assertJSXFragment, assertJSXOpeningFragment: assertJSXOpeningFragment, assertJSXClosingFragment: assertJSXClosingFragment, assertNoop: assertNoop, assertPlaceholder: assertPlaceholder, assertV8IntrinsicIdentifier: assertV8IntrinsicIdentifier, assertArgumentPlaceholder: assertArgumentPlaceholder, assertBindExpression: assertBindExpression, assertImportAttribute: assertImportAttribute, assertDecorator: assertDecorator, assertDoExpression: assertDoExpression, assertExportDefaultSpecifier: assertExportDefaultSpecifier, assertRecordExpression: assertRecordExpression, assertTupleExpression: assertTupleExpression, assertDecimalLiteral: assertDecimalLiteral, assertModuleExpression: assertModuleExpression, assertTopicReference: assertTopicReference, assertPipelineTopicExpression: assertPipelineTopicExpression, assertPipelineBareFunction: assertPipelineBareFunction, assertPipelinePrimaryTopicReference: assertPipelinePrimaryTopicReference, assertTSParameterProperty: assertTSParameterProperty, assertTSDeclareFunction: assertTSDeclareFunction, assertTSDeclareMethod: assertTSDeclareMethod, assertTSQualifiedName: assertTSQualifiedName, assertTSCallSignatureDeclaration: assertTSCallSignatureDeclaration, assertTSConstructSignatureDeclaration: assertTSConstructSignatureDeclaration, assertTSPropertySignature: assertTSPropertySignature, assertTSMethodSignature: assertTSMethodSignature, assertTSIndexSignature: assertTSIndexSignature, assertTSAnyKeyword: assertTSAnyKeyword, assertTSBooleanKeyword: assertTSBooleanKeyword, assertTSBigIntKeyword: assertTSBigIntKeyword, assertTSIntrinsicKeyword: assertTSIntrinsicKeyword, assertTSNeverKeyword: assertTSNeverKeyword, assertTSNullKeyword: assertTSNullKeyword, assertTSNumberKeyword: assertTSNumberKeyword, assertTSObjectKeyword: assertTSObjectKeyword, assertTSStringKeyword: assertTSStringKeyword, assertTSSymbolKeyword: assertTSSymbolKeyword, assertTSUndefinedKeyword: assertTSUndefinedKeyword, assertTSUnknownKeyword: assertTSUnknownKeyword, assertTSVoidKeyword: assertTSVoidKeyword, assertTSThisType: assertTSThisType, assertTSFunctionType: assertTSFunctionType, assertTSConstructorType: assertTSConstructorType, assertTSTypeReference: assertTSTypeReference, assertTSTypePredicate: assertTSTypePredicate, assertTSTypeQuery: assertTSTypeQuery, assertTSTypeLiteral: assertTSTypeLiteral, assertTSArrayType: assertTSArrayType, assertTSTupleType: assertTSTupleType, assertTSOptionalType: assertTSOptionalType, assertTSRestType: assertTSRestType, assertTSNamedTupleMember: assertTSNamedTupleMember, assertTSUnionType: assertTSUnionType, assertTSIntersectionType: assertTSIntersectionType, assertTSConditionalType: assertTSConditionalType, assertTSInferType: assertTSInferType, assertTSParenthesizedType: assertTSParenthesizedType, assertTSTypeOperator: assertTSTypeOperator, assertTSIndexedAccessType: assertTSIndexedAccessType, assertTSMappedType: assertTSMappedType, assertTSLiteralType: assertTSLiteralType, assertTSExpressionWithTypeArguments: assertTSExpressionWithTypeArguments, assertTSInterfaceDeclaration: assertTSInterfaceDeclaration, assertTSInterfaceBody: assertTSInterfaceBody, assertTSTypeAliasDeclaration: assertTSTypeAliasDeclaration, assertTSInstantiationExpression: assertTSInstantiationExpression, assertTSAsExpression: assertTSAsExpression, assertTSSatisfiesExpression: assertTSSatisfiesExpression, assertTSTypeAssertion: assertTSTypeAssertion, assertTSEnumDeclaration: assertTSEnumDeclaration, assertTSEnumMember: assertTSEnumMember, assertTSModuleDeclaration: assertTSModuleDeclaration, assertTSModuleBlock: assertTSModuleBlock, assertTSImportType: assertTSImportType, assertTSImportEqualsDeclaration: assertTSImportEqualsDeclaration, assertTSExternalModuleReference: assertTSExternalModuleReference, assertTSNonNullExpression: assertTSNonNullExpression, assertTSExportAssignment: assertTSExportAssignment, assertTSNamespaceExportDeclaration: assertTSNamespaceExportDeclaration, assertTSTypeAnnotation: assertTSTypeAnnotation, assertTSTypeParameterInstantiation: assertTSTypeParameterInstantiation, assertTSTypeParameterDeclaration: assertTSTypeParameterDeclaration, assertTSTypeParameter: assertTSTypeParameter, assertStandardized: assertStandardized, assertExpression: assertExpression$1, assertBinary: assertBinary, assertScopable: assertScopable, assertBlockParent: assertBlockParent, assertBlock: assertBlock, assertStatement: assertStatement, assertTerminatorless: assertTerminatorless, assertCompletionStatement: assertCompletionStatement, assertConditional: assertConditional, assertLoop: assertLoop, assertWhile: assertWhile, assertExpressionWrapper: assertExpressionWrapper, assertFor: assertFor, assertForXStatement: assertForXStatement, assertFunction: assertFunction$1, assertFunctionParent: assertFunctionParent, assertPureish: assertPureish, assertDeclaration: assertDeclaration, assertPatternLike: assertPatternLike, assertLVal: assertLVal, assertTSEntityName: assertTSEntityName, assertLiteral: assertLiteral, assertImmutable: assertImmutable, assertUserWhitespacable: assertUserWhitespacable, assertMethod: assertMethod, assertObjectMember: assertObjectMember, assertProperty: assertProperty, assertUnaryLike: assertUnaryLike, assertPattern: assertPattern, assertClass: assertClass, assertImportOrExportDeclaration: assertImportOrExportDeclaration, assertExportDeclaration: assertExportDeclaration, assertModuleSpecifier: assertModuleSpecifier, assertAccessor: assertAccessor, assertPrivate: assertPrivate, assertFlow: assertFlow, assertFlowType: assertFlowType, assertFlowBaseAnnotation: assertFlowBaseAnnotation, assertFlowDeclaration: assertFlowDeclaration, assertFlowPredicate: assertFlowPredicate, assertEnumBody: assertEnumBody, assertEnumMember: assertEnumMember, assertJSX: assertJSX, assertMiscellaneous: assertMiscellaneous, assertTypeScript: assertTypeScript, assertTSTypeElement: assertTSTypeElement, assertTSType: assertTSType, assertTSBaseType: assertTSBaseType, assertNumberLiteral: assertNumberLiteral, assertRegexLiteral: assertRegexLiteral, assertRestProperty: assertRestProperty, assertSpreadProperty: assertSpreadProperty, assertModuleDeclaration: assertModuleDeclaration, arrayExpression: arrayExpression$1, assignmentExpression: assignmentExpression$d, binaryExpression: binaryExpression$5, interpreterDirective: interpreterDirective$1, directive: directive$1, directiveLiteral: directiveLiteral$1, blockStatement: blockStatement$6, breakStatement: breakStatement, callExpression: callExpression$e, catchClause: catchClause, conditionalExpression: conditionalExpression$4, continueStatement: continueStatement, debuggerStatement: debuggerStatement, doWhileStatement: doWhileStatement, emptyStatement: emptyStatement$1, expressionStatement: expressionStatement$a, file: file$2, forInStatement: forInStatement, forStatement: forStatement, functionDeclaration: functionDeclaration, functionExpression: functionExpression$2, identifier: identifier$i, ifStatement: ifStatement, labeledStatement: labeledStatement, stringLiteral: stringLiteral$8, numericLiteral: numericLiteral$8, nullLiteral: nullLiteral$2, booleanLiteral: booleanLiteral$4, regExpLiteral: regExpLiteral, logicalExpression: logicalExpression$3, memberExpression: memberExpression$c, newExpression: newExpression, program: program$3, objectExpression: objectExpression$3, objectMethod: objectMethod, objectProperty: objectProperty$1, restElement: restElement$2, returnStatement: returnStatement$3, sequenceExpression: sequenceExpression$7, parenthesizedExpression: parenthesizedExpression, switchCase: switchCase, switchStatement: switchStatement, thisExpression: thisExpression$4, throwStatement: throwStatement, tryStatement: tryStatement, unaryExpression: unaryExpression$7, updateExpression: updateExpression$1, variableDeclaration: variableDeclaration$8, variableDeclarator: variableDeclarator$8, whileStatement: whileStatement, withStatement: withStatement, assignmentPattern: assignmentPattern, arrayPattern: arrayPattern, arrowFunctionExpression: arrowFunctionExpression$4, classBody: classBody, classExpression: classExpression, classDeclaration: classDeclaration, exportAllDeclaration: exportAllDeclaration, exportDefaultDeclaration: exportDefaultDeclaration, exportNamedDeclaration: exportNamedDeclaration$2, exportSpecifier: exportSpecifier$2, forOfStatement: forOfStatement, importDeclaration: importDeclaration$1, importDefaultSpecifier: importDefaultSpecifier$1, importNamespaceSpecifier: importNamespaceSpecifier$1, importSpecifier: importSpecifier$1, metaProperty: metaProperty$1, classMethod: classMethod, objectPattern: objectPattern$1, spreadElement: spreadElement$2, 'super': _super$1, taggedTemplateExpression: taggedTemplateExpression, templateElement: templateElement, templateLiteral: templateLiteral, yieldExpression: yieldExpression$2, awaitExpression: awaitExpression$1, 'import': _import, bigIntLiteral: bigIntLiteral, exportNamespaceSpecifier: exportNamespaceSpecifier, optionalMemberExpression: optionalMemberExpression$2, optionalCallExpression: optionalCallExpression$2, classProperty: classProperty, classAccessorProperty: classAccessorProperty, classPrivateProperty: classPrivateProperty, classPrivateMethod: classPrivateMethod, privateName: privateName, staticBlock: staticBlock, anyTypeAnnotation: anyTypeAnnotation$2, arrayTypeAnnotation: arrayTypeAnnotation$1, booleanTypeAnnotation: booleanTypeAnnotation$1, booleanLiteralTypeAnnotation: booleanLiteralTypeAnnotation, nullLiteralTypeAnnotation: nullLiteralTypeAnnotation$1, classImplements: classImplements, declareClass: declareClass, declareFunction: declareFunction, declareInterface: declareInterface, declareModule: declareModule, declareModuleExports: declareModuleExports, declareTypeAlias: declareTypeAlias, declareOpaqueType: declareOpaqueType, declareVariable: declareVariable, declareExportDeclaration: declareExportDeclaration, declareExportAllDeclaration: declareExportAllDeclaration, declaredPredicate: declaredPredicate, existsTypeAnnotation: existsTypeAnnotation, functionTypeAnnotation: functionTypeAnnotation, functionTypeParam: functionTypeParam, genericTypeAnnotation: genericTypeAnnotation$1, inferredPredicate: inferredPredicate, interfaceExtends: interfaceExtends, interfaceDeclaration: interfaceDeclaration, interfaceTypeAnnotation: interfaceTypeAnnotation, intersectionTypeAnnotation: intersectionTypeAnnotation, mixedTypeAnnotation: mixedTypeAnnotation, emptyTypeAnnotation: emptyTypeAnnotation, nullableTypeAnnotation: nullableTypeAnnotation, numberLiteralTypeAnnotation: numberLiteralTypeAnnotation, numberTypeAnnotation: numberTypeAnnotation$2, objectTypeAnnotation: objectTypeAnnotation, objectTypeInternalSlot: objectTypeInternalSlot, objectTypeCallProperty: objectTypeCallProperty, objectTypeIndexer: objectTypeIndexer, objectTypeProperty: objectTypeProperty, objectTypeSpreadProperty: objectTypeSpreadProperty, opaqueType: opaqueType, qualifiedTypeIdentifier: qualifiedTypeIdentifier, stringLiteralTypeAnnotation: stringLiteralTypeAnnotation, stringTypeAnnotation: stringTypeAnnotation$2, symbolTypeAnnotation: symbolTypeAnnotation, thisTypeAnnotation: thisTypeAnnotation, tupleTypeAnnotation: tupleTypeAnnotation$1, typeofTypeAnnotation: typeofTypeAnnotation, typeAlias: typeAlias, typeAnnotation: typeAnnotation, typeCastExpression: typeCastExpression, typeParameter: typeParameter, typeParameterDeclaration: typeParameterDeclaration, typeParameterInstantiation: typeParameterInstantiation, unionTypeAnnotation: unionTypeAnnotation$1, variance: variance, voidTypeAnnotation: voidTypeAnnotation$3, enumDeclaration: enumDeclaration, enumBooleanBody: enumBooleanBody, enumNumberBody: enumNumberBody, enumStringBody: enumStringBody, enumSymbolBody: enumSymbolBody, enumBooleanMember: enumBooleanMember, enumNumberMember: enumNumberMember, enumStringMember: enumStringMember, enumDefaultedMember: enumDefaultedMember, indexedAccessType: indexedAccessType, optionalIndexedAccessType: optionalIndexedAccessType, jsxAttribute: jsxAttribute, jSXAttribute: jsxAttribute, jsxClosingElement: jsxClosingElement, jSXClosingElement: jsxClosingElement, jsxElement: jsxElement, jSXElement: jsxElement, jsxEmptyExpression: jsxEmptyExpression, jSXEmptyExpression: jsxEmptyExpression, jsxExpressionContainer: jsxExpressionContainer$1, jSXExpressionContainer: jsxExpressionContainer$1, jsxSpreadChild: jsxSpreadChild, jSXSpreadChild: jsxSpreadChild, jsxIdentifier: jsxIdentifier$2, jSXIdentifier: jsxIdentifier$2, jsxMemberExpression: jsxMemberExpression$1, jSXMemberExpression: jsxMemberExpression$1, jsxNamespacedName: jsxNamespacedName, jSXNamespacedName: jsxNamespacedName, jsxOpeningElement: jsxOpeningElement, jSXOpeningElement: jsxOpeningElement, jsxSpreadAttribute: jsxSpreadAttribute, jSXSpreadAttribute: jsxSpreadAttribute, jsxText: jsxText, jSXText: jsxText, jsxFragment: jsxFragment, jSXFragment: jsxFragment, jsxOpeningFragment: jsxOpeningFragment, jSXOpeningFragment: jsxOpeningFragment, jsxClosingFragment: jsxClosingFragment, jSXClosingFragment: jsxClosingFragment, noop: noop$1, placeholder: placeholder, v8IntrinsicIdentifier: v8IntrinsicIdentifier, argumentPlaceholder: argumentPlaceholder, bindExpression: bindExpression, importAttribute: importAttribute, decorator: decorator, doExpression: doExpression, exportDefaultSpecifier: exportDefaultSpecifier, recordExpression: recordExpression, tupleExpression: tupleExpression, decimalLiteral: decimalLiteral, moduleExpression: moduleExpression, topicReference: topicReference, pipelineTopicExpression: pipelineTopicExpression, pipelineBareFunction: pipelineBareFunction, pipelinePrimaryTopicReference: pipelinePrimaryTopicReference, tsParameterProperty: tsParameterProperty, tSParameterProperty: tsParameterProperty, tsDeclareFunction: tsDeclareFunction, tSDeclareFunction: tsDeclareFunction, tsDeclareMethod: tsDeclareMethod, tSDeclareMethod: tsDeclareMethod, tsQualifiedName: tsQualifiedName, tSQualifiedName: tsQualifiedName, tsCallSignatureDeclaration: tsCallSignatureDeclaration, tSCallSignatureDeclaration: tsCallSignatureDeclaration, tsConstructSignatureDeclaration: tsConstructSignatureDeclaration, tSConstructSignatureDeclaration: tsConstructSignatureDeclaration, tsPropertySignature: tsPropertySignature, tSPropertySignature: tsPropertySignature, tsMethodSignature: tsMethodSignature, tSMethodSignature: tsMethodSignature, tsIndexSignature: tsIndexSignature, tSIndexSignature: tsIndexSignature, tsAnyKeyword: tsAnyKeyword, tSAnyKeyword: tsAnyKeyword, tsBooleanKeyword: tsBooleanKeyword, tSBooleanKeyword: tsBooleanKeyword, tsBigIntKeyword: tsBigIntKeyword, tSBigIntKeyword: tsBigIntKeyword, tsIntrinsicKeyword: tsIntrinsicKeyword, tSIntrinsicKeyword: tsIntrinsicKeyword, tsNeverKeyword: tsNeverKeyword, tSNeverKeyword: tsNeverKeyword, tsNullKeyword: tsNullKeyword, tSNullKeyword: tsNullKeyword, tsNumberKeyword: tsNumberKeyword, tSNumberKeyword: tsNumberKeyword, tsObjectKeyword: tsObjectKeyword, tSObjectKeyword: tsObjectKeyword, tsStringKeyword: tsStringKeyword, tSStringKeyword: tsStringKeyword, tsSymbolKeyword: tsSymbolKeyword, tSSymbolKeyword: tsSymbolKeyword, tsUndefinedKeyword: tsUndefinedKeyword, tSUndefinedKeyword: tsUndefinedKeyword, tsUnknownKeyword: tsUnknownKeyword, tSUnknownKeyword: tsUnknownKeyword, tsVoidKeyword: tsVoidKeyword, tSVoidKeyword: tsVoidKeyword, tsThisType: tsThisType, tSThisType: tsThisType, tsFunctionType: tsFunctionType, tSFunctionType: tsFunctionType, tsConstructorType: tsConstructorType, tSConstructorType: tsConstructorType, tsTypeReference: tsTypeReference, tSTypeReference: tsTypeReference, tsTypePredicate: tsTypePredicate, tSTypePredicate: tsTypePredicate, tsTypeQuery: tsTypeQuery, tSTypeQuery: tsTypeQuery, tsTypeLiteral: tsTypeLiteral, tSTypeLiteral: tsTypeLiteral, tsArrayType: tsArrayType, tSArrayType: tsArrayType, tsTupleType: tsTupleType, tSTupleType: tsTupleType, tsOptionalType: tsOptionalType, tSOptionalType: tsOptionalType, tsRestType: tsRestType, tSRestType: tsRestType, tsNamedTupleMember: tsNamedTupleMember, tSNamedTupleMember: tsNamedTupleMember, tsUnionType: tsUnionType, tSUnionType: tsUnionType, tsIntersectionType: tsIntersectionType, tSIntersectionType: tsIntersectionType, tsConditionalType: tsConditionalType, tSConditionalType: tsConditionalType, tsInferType: tsInferType, tSInferType: tsInferType, tsParenthesizedType: tsParenthesizedType, tSParenthesizedType: tsParenthesizedType, tsTypeOperator: tsTypeOperator, tSTypeOperator: tsTypeOperator, tsIndexedAccessType: tsIndexedAccessType, tSIndexedAccessType: tsIndexedAccessType, tsMappedType: tsMappedType, tSMappedType: tsMappedType, tsLiteralType: tsLiteralType, tSLiteralType: tsLiteralType, tsExpressionWithTypeArguments: tsExpressionWithTypeArguments, tSExpressionWithTypeArguments: tsExpressionWithTypeArguments, tsInterfaceDeclaration: tsInterfaceDeclaration, tSInterfaceDeclaration: tsInterfaceDeclaration, tsInterfaceBody: tsInterfaceBody, tSInterfaceBody: tsInterfaceBody, tsTypeAliasDeclaration: tsTypeAliasDeclaration, tSTypeAliasDeclaration: tsTypeAliasDeclaration, tsInstantiationExpression: tsInstantiationExpression, tSInstantiationExpression: tsInstantiationExpression, tsAsExpression: tsAsExpression, tSAsExpression: tsAsExpression, tsSatisfiesExpression: tsSatisfiesExpression, tSSatisfiesExpression: tsSatisfiesExpression, tsTypeAssertion: tsTypeAssertion, tSTypeAssertion: tsTypeAssertion, tsEnumDeclaration: tsEnumDeclaration, tSEnumDeclaration: tsEnumDeclaration, tsEnumMember: tsEnumMember, tSEnumMember: tsEnumMember, tsModuleDeclaration: tsModuleDeclaration, tSModuleDeclaration: tsModuleDeclaration, tsModuleBlock: tsModuleBlock, tSModuleBlock: tsModuleBlock, tsImportType: tsImportType, tSImportType: tsImportType, tsImportEqualsDeclaration: tsImportEqualsDeclaration, tSImportEqualsDeclaration: tsImportEqualsDeclaration, tsExternalModuleReference: tsExternalModuleReference, tSExternalModuleReference: tsExternalModuleReference, tsNonNullExpression: tsNonNullExpression, tSNonNullExpression: tsNonNullExpression, tsExportAssignment: tsExportAssignment, tSExportAssignment: tsExportAssignment, tsNamespaceExportDeclaration: tsNamespaceExportDeclaration, tSNamespaceExportDeclaration: tsNamespaceExportDeclaration, tsTypeAnnotation: tsTypeAnnotation, tSTypeAnnotation: tsTypeAnnotation, tsTypeParameterInstantiation: tsTypeParameterInstantiation, tSTypeParameterInstantiation: tsTypeParameterInstantiation, tsTypeParameterDeclaration: tsTypeParameterDeclaration, tSTypeParameterDeclaration: tsTypeParameterDeclaration, tsTypeParameter: tsTypeParameter, tSTypeParameter: tsTypeParameter, numberLiteral: NumberLiteral, regexLiteral: RegexLiteral, restProperty: RestProperty, spreadProperty: SpreadProperty, ArrayExpression: arrayExpression$1, AssignmentExpression: assignmentExpression$d, BinaryExpression: binaryExpression$5, InterpreterDirective: interpreterDirective$1, Directive: directive$1, DirectiveLiteral: directiveLiteral$1, BlockStatement: blockStatement$6, BreakStatement: breakStatement, CallExpression: callExpression$e, CatchClause: catchClause, ConditionalExpression: conditionalExpression$4, ContinueStatement: continueStatement, DebuggerStatement: debuggerStatement, DoWhileStatement: doWhileStatement, EmptyStatement: emptyStatement$1, ExpressionStatement: expressionStatement$a, File: file$2, ForInStatement: forInStatement, ForStatement: forStatement, FunctionDeclaration: functionDeclaration, FunctionExpression: functionExpression$2, Identifier: identifier$i, IfStatement: ifStatement, LabeledStatement: labeledStatement, StringLiteral: stringLiteral$8, NumericLiteral: numericLiteral$8, NullLiteral: nullLiteral$2, BooleanLiteral: booleanLiteral$4, RegExpLiteral: regExpLiteral, LogicalExpression: logicalExpression$3, MemberExpression: memberExpression$c, NewExpression: newExpression, Program: program$3, ObjectExpression: objectExpression$3, ObjectMethod: objectMethod, ObjectProperty: objectProperty$1, RestElement: restElement$2, ReturnStatement: returnStatement$3, SequenceExpression: sequenceExpression$7, ParenthesizedExpression: parenthesizedExpression, SwitchCase: switchCase, SwitchStatement: switchStatement, ThisExpression: thisExpression$4, ThrowStatement: throwStatement, TryStatement: tryStatement, UnaryExpression: unaryExpression$7, UpdateExpression: updateExpression$1, VariableDeclaration: variableDeclaration$8, VariableDeclarator: variableDeclarator$8, WhileStatement: whileStatement, WithStatement: withStatement, AssignmentPattern: assignmentPattern, ArrayPattern: arrayPattern, ArrowFunctionExpression: arrowFunctionExpression$4, ClassBody: classBody, ClassExpression: classExpression, ClassDeclaration: classDeclaration, ExportAllDeclaration: exportAllDeclaration, ExportDefaultDeclaration: exportDefaultDeclaration, ExportNamedDeclaration: exportNamedDeclaration$2, ExportSpecifier: exportSpecifier$2, ForOfStatement: forOfStatement, ImportDeclaration: importDeclaration$1, ImportDefaultSpecifier: importDefaultSpecifier$1, ImportNamespaceSpecifier: importNamespaceSpecifier$1, ImportSpecifier: importSpecifier$1, MetaProperty: metaProperty$1, ClassMethod: classMethod, ObjectPattern: objectPattern$1, SpreadElement: spreadElement$2, Super: _super$1, TaggedTemplateExpression: taggedTemplateExpression, TemplateElement: templateElement, TemplateLiteral: templateLiteral, YieldExpression: yieldExpression$2, AwaitExpression: awaitExpression$1, Import: _import, BigIntLiteral: bigIntLiteral, ExportNamespaceSpecifier: exportNamespaceSpecifier, OptionalMemberExpression: optionalMemberExpression$2, OptionalCallExpression: optionalCallExpression$2, ClassProperty: classProperty, ClassAccessorProperty: classAccessorProperty, ClassPrivateProperty: classPrivateProperty, ClassPrivateMethod: classPrivateMethod, PrivateName: privateName, StaticBlock: staticBlock, AnyTypeAnnotation: anyTypeAnnotation$2, ArrayTypeAnnotation: arrayTypeAnnotation$1, BooleanTypeAnnotation: booleanTypeAnnotation$1, BooleanLiteralTypeAnnotation: booleanLiteralTypeAnnotation, NullLiteralTypeAnnotation: nullLiteralTypeAnnotation$1, ClassImplements: classImplements, DeclareClass: declareClass, DeclareFunction: declareFunction, DeclareInterface: declareInterface, DeclareModule: declareModule, DeclareModuleExports: declareModuleExports, DeclareTypeAlias: declareTypeAlias, DeclareOpaqueType: declareOpaqueType, DeclareVariable: declareVariable, DeclareExportDeclaration: declareExportDeclaration, DeclareExportAllDeclaration: declareExportAllDeclaration, DeclaredPredicate: declaredPredicate, ExistsTypeAnnotation: existsTypeAnnotation, FunctionTypeAnnotation: functionTypeAnnotation, FunctionTypeParam: functionTypeParam, GenericTypeAnnotation: genericTypeAnnotation$1, InferredPredicate: inferredPredicate, InterfaceExtends: interfaceExtends, InterfaceDeclaration: interfaceDeclaration, InterfaceTypeAnnotation: interfaceTypeAnnotation, IntersectionTypeAnnotation: intersectionTypeAnnotation, MixedTypeAnnotation: mixedTypeAnnotation, EmptyTypeAnnotation: emptyTypeAnnotation, NullableTypeAnnotation: nullableTypeAnnotation, NumberLiteralTypeAnnotation: numberLiteralTypeAnnotation, NumberTypeAnnotation: numberTypeAnnotation$2, ObjectTypeAnnotation: objectTypeAnnotation, ObjectTypeInternalSlot: objectTypeInternalSlot, ObjectTypeCallProperty: objectTypeCallProperty, ObjectTypeIndexer: objectTypeIndexer, ObjectTypeProperty: objectTypeProperty, ObjectTypeSpreadProperty: objectTypeSpreadProperty, OpaqueType: opaqueType, QualifiedTypeIdentifier: qualifiedTypeIdentifier, StringLiteralTypeAnnotation: stringLiteralTypeAnnotation, StringTypeAnnotation: stringTypeAnnotation$2, SymbolTypeAnnotation: symbolTypeAnnotation, ThisTypeAnnotation: thisTypeAnnotation, TupleTypeAnnotation: tupleTypeAnnotation$1, TypeofTypeAnnotation: typeofTypeAnnotation, TypeAlias: typeAlias, TypeAnnotation: typeAnnotation, TypeCastExpression: typeCastExpression, TypeParameter: typeParameter, TypeParameterDeclaration: typeParameterDeclaration, TypeParameterInstantiation: typeParameterInstantiation, UnionTypeAnnotation: unionTypeAnnotation$1, Variance: variance, VoidTypeAnnotation: voidTypeAnnotation$3, EnumDeclaration: enumDeclaration, EnumBooleanBody: enumBooleanBody, EnumNumberBody: enumNumberBody, EnumStringBody: enumStringBody, EnumSymbolBody: enumSymbolBody, EnumBooleanMember: enumBooleanMember, EnumNumberMember: enumNumberMember, EnumStringMember: enumStringMember, EnumDefaultedMember: enumDefaultedMember, IndexedAccessType: indexedAccessType, OptionalIndexedAccessType: optionalIndexedAccessType, JSXAttribute: jsxAttribute, JSXClosingElement: jsxClosingElement, JSXElement: jsxElement, JSXEmptyExpression: jsxEmptyExpression, JSXExpressionContainer: jsxExpressionContainer$1, JSXSpreadChild: jsxSpreadChild, JSXIdentifier: jsxIdentifier$2, JSXMemberExpression: jsxMemberExpression$1, JSXNamespacedName: jsxNamespacedName, JSXOpeningElement: jsxOpeningElement, JSXSpreadAttribute: jsxSpreadAttribute, JSXText: jsxText, JSXFragment: jsxFragment, JSXOpeningFragment: jsxOpeningFragment, JSXClosingFragment: jsxClosingFragment, Noop: noop$1, Placeholder: placeholder, V8IntrinsicIdentifier: v8IntrinsicIdentifier, ArgumentPlaceholder: argumentPlaceholder, BindExpression: bindExpression, ImportAttribute: importAttribute, Decorator: decorator, DoExpression: doExpression, ExportDefaultSpecifier: exportDefaultSpecifier, RecordExpression: recordExpression, TupleExpression: tupleExpression, DecimalLiteral: decimalLiteral, ModuleExpression: moduleExpression, TopicReference: topicReference, PipelineTopicExpression: pipelineTopicExpression, PipelineBareFunction: pipelineBareFunction, PipelinePrimaryTopicReference: pipelinePrimaryTopicReference, TSParameterProperty: tsParameterProperty, TSDeclareFunction: tsDeclareFunction, TSDeclareMethod: tsDeclareMethod, TSQualifiedName: tsQualifiedName, TSCallSignatureDeclaration: tsCallSignatureDeclaration, TSConstructSignatureDeclaration: tsConstructSignatureDeclaration, TSPropertySignature: tsPropertySignature, TSMethodSignature: tsMethodSignature, TSIndexSignature: tsIndexSignature, TSAnyKeyword: tsAnyKeyword, TSBooleanKeyword: tsBooleanKeyword, TSBigIntKeyword: tsBigIntKeyword, TSIntrinsicKeyword: tsIntrinsicKeyword, TSNeverKeyword: tsNeverKeyword, TSNullKeyword: tsNullKeyword, TSNumberKeyword: tsNumberKeyword, TSObjectKeyword: tsObjectKeyword, TSStringKeyword: tsStringKeyword, TSSymbolKeyword: tsSymbolKeyword, TSUndefinedKeyword: tsUndefinedKeyword, TSUnknownKeyword: tsUnknownKeyword, TSVoidKeyword: tsVoidKeyword, TSThisType: tsThisType, TSFunctionType: tsFunctionType, TSConstructorType: tsConstructorType, TSTypeReference: tsTypeReference, TSTypePredicate: tsTypePredicate, TSTypeQuery: tsTypeQuery, TSTypeLiteral: tsTypeLiteral, TSArrayType: tsArrayType, TSTupleType: tsTupleType, TSOptionalType: tsOptionalType, TSRestType: tsRestType, TSNamedTupleMember: tsNamedTupleMember, TSUnionType: tsUnionType, TSIntersectionType: tsIntersectionType, TSConditionalType: tsConditionalType, TSInferType: tsInferType, TSParenthesizedType: tsParenthesizedType, TSTypeOperator: tsTypeOperator, TSIndexedAccessType: tsIndexedAccessType, TSMappedType: tsMappedType, TSLiteralType: tsLiteralType, TSExpressionWithTypeArguments: tsExpressionWithTypeArguments, TSInterfaceDeclaration: tsInterfaceDeclaration, TSInterfaceBody: tsInterfaceBody, TSTypeAliasDeclaration: tsTypeAliasDeclaration, TSInstantiationExpression: tsInstantiationExpression, TSAsExpression: tsAsExpression, TSSatisfiesExpression: tsSatisfiesExpression, TSTypeAssertion: tsTypeAssertion, TSEnumDeclaration: tsEnumDeclaration, TSEnumMember: tsEnumMember, TSModuleDeclaration: tsModuleDeclaration, TSModuleBlock: tsModuleBlock, TSImportType: tsImportType, TSImportEqualsDeclaration: tsImportEqualsDeclaration, TSExternalModuleReference: tsExternalModuleReference, TSNonNullExpression: tsNonNullExpression, TSExportAssignment: tsExportAssignment, TSNamespaceExportDeclaration: tsNamespaceExportDeclaration, TSTypeAnnotation: tsTypeAnnotation, TSTypeParameterInstantiation: tsTypeParameterInstantiation, TSTypeParameterDeclaration: tsTypeParameterDeclaration, TSTypeParameter: tsTypeParameter, NumberLiteral: NumberLiteral, RegexLiteral: RegexLiteral, RestProperty: RestProperty, SpreadProperty: SpreadProperty, STANDARDIZED_TYPES: STANDARDIZED_TYPES, EXPRESSION_TYPES: EXPRESSION_TYPES, BINARY_TYPES: BINARY_TYPES, SCOPABLE_TYPES: SCOPABLE_TYPES, BLOCKPARENT_TYPES: BLOCKPARENT_TYPES, BLOCK_TYPES: BLOCK_TYPES, STATEMENT_TYPES: STATEMENT_TYPES, TERMINATORLESS_TYPES: TERMINATORLESS_TYPES, COMPLETIONSTATEMENT_TYPES: COMPLETIONSTATEMENT_TYPES, CONDITIONAL_TYPES: CONDITIONAL_TYPES, LOOP_TYPES: LOOP_TYPES, WHILE_TYPES: WHILE_TYPES, EXPRESSIONWRAPPER_TYPES: EXPRESSIONWRAPPER_TYPES, FOR_TYPES: FOR_TYPES, FORXSTATEMENT_TYPES: FORXSTATEMENT_TYPES, FUNCTION_TYPES: FUNCTION_TYPES$1, FUNCTIONPARENT_TYPES: FUNCTIONPARENT_TYPES, PUREISH_TYPES: PUREISH_TYPES, DECLARATION_TYPES: DECLARATION_TYPES, PATTERNLIKE_TYPES: PATTERNLIKE_TYPES, LVAL_TYPES: LVAL_TYPES, TSENTITYNAME_TYPES: TSENTITYNAME_TYPES, LITERAL_TYPES: LITERAL_TYPES, IMMUTABLE_TYPES: IMMUTABLE_TYPES, USERWHITESPACABLE_TYPES: USERWHITESPACABLE_TYPES, METHOD_TYPES: METHOD_TYPES, OBJECTMEMBER_TYPES: OBJECTMEMBER_TYPES, PROPERTY_TYPES: PROPERTY_TYPES, UNARYLIKE_TYPES: UNARYLIKE_TYPES, PATTERN_TYPES: PATTERN_TYPES, CLASS_TYPES: CLASS_TYPES, IMPORTOREXPORTDECLARATION_TYPES: IMPORTOREXPORTDECLARATION_TYPES, EXPORTDECLARATION_TYPES: EXPORTDECLARATION_TYPES, MODULESPECIFIER_TYPES: MODULESPECIFIER_TYPES, ACCESSOR_TYPES: ACCESSOR_TYPES, PRIVATE_TYPES: PRIVATE_TYPES, FLOW_TYPES: FLOW_TYPES, FLOWTYPE_TYPES: FLOWTYPE_TYPES, FLOWBASEANNOTATION_TYPES: FLOWBASEANNOTATION_TYPES, FLOWDECLARATION_TYPES: FLOWDECLARATION_TYPES, FLOWPREDICATE_TYPES: FLOWPREDICATE_TYPES, ENUMBODY_TYPES: ENUMBODY_TYPES, ENUMMEMBER_TYPES: ENUMMEMBER_TYPES, JSX_TYPES: JSX_TYPES, MISCELLANEOUS_TYPES: MISCELLANEOUS_TYPES, TYPESCRIPT_TYPES: TYPESCRIPT_TYPES, TSTYPEELEMENT_TYPES: TSTYPEELEMENT_TYPES, TSTYPE_TYPES: TSTYPE_TYPES, TSBASETYPE_TYPES: TSBASETYPE_TYPES, MODULEDECLARATION_TYPES: MODULEDECLARATION_TYPES, STATEMENT_OR_BLOCK_KEYS: STATEMENT_OR_BLOCK_KEYS$1, FLATTENABLE_KEYS: FLATTENABLE_KEYS, FOR_INIT_KEYS: FOR_INIT_KEYS, COMMENT_KEYS: COMMENT_KEYS, LOGICAL_OPERATORS: LOGICAL_OPERATORS$3, UPDATE_OPERATORS: UPDATE_OPERATORS, BOOLEAN_NUMBER_BINARY_OPERATORS: BOOLEAN_NUMBER_BINARY_OPERATORS$1, EQUALITY_BINARY_OPERATORS: EQUALITY_BINARY_OPERATORS, COMPARISON_BINARY_OPERATORS: COMPARISON_BINARY_OPERATORS, BOOLEAN_BINARY_OPERATORS: BOOLEAN_BINARY_OPERATORS$1, NUMBER_BINARY_OPERATORS: NUMBER_BINARY_OPERATORS$1, BINARY_OPERATORS: BINARY_OPERATORS, ASSIGNMENT_OPERATORS: ASSIGNMENT_OPERATORS, BOOLEAN_UNARY_OPERATORS: BOOLEAN_UNARY_OPERATORS$1, NUMBER_UNARY_OPERATORS: NUMBER_UNARY_OPERATORS$1, STRING_UNARY_OPERATORS: STRING_UNARY_OPERATORS$1, UNARY_OPERATORS: UNARY_OPERATORS, INHERIT_KEYS: INHERIT_KEYS, BLOCK_SCOPED_SYMBOL: BLOCK_SCOPED_SYMBOL, NOT_LOCAL_BINDING: NOT_LOCAL_BINDING$2, VISITOR_KEYS: VISITOR_KEYS$5, ALIAS_KEYS: ALIAS_KEYS, FLIPPED_ALIAS_KEYS: FLIPPED_ALIAS_KEYS$3, NODE_FIELDS: NODE_FIELDS, BUILDER_KEYS: BUILDER_KEYS, DEPRECATED_ALIASES: DEPRECATED_ALIASES$1, DEPRECATED_KEYS: DEPRECATED_KEYS$1, NODE_PARENT_VALIDATIONS: NODE_PARENT_VALIDATIONS, PLACEHOLDERS: PLACEHOLDERS, PLACEHOLDERS_ALIAS: PLACEHOLDERS_ALIAS, PLACEHOLDERS_FLIPPED_ALIAS: PLACEHOLDERS_FLIPPED_ALIAS, TYPES: TYPES$1, isArrayExpression: isArrayExpression$2, isAssignmentExpression: isAssignmentExpression$4, isBinaryExpression: isBinaryExpression$1, isInterpreterDirective: isInterpreterDirective, isDirective: isDirective, isDirectiveLiteral: isDirectiveLiteral, isBlockStatement: isBlockStatement$2, isBreakStatement: isBreakStatement, isCallExpression: isCallExpression$8, isCatchClause: isCatchClause, isConditionalExpression: isConditionalExpression$1, isContinueStatement: isContinueStatement, isDebuggerStatement: isDebuggerStatement, isDoWhileStatement: isDoWhileStatement, isEmptyStatement: isEmptyStatement, isExpressionStatement: isExpressionStatement$3, isFile: isFile, isForInStatement: isForInStatement$1, isForStatement: isForStatement$3, isFunctionDeclaration: isFunctionDeclaration$2, isFunctionExpression: isFunctionExpression$1, isIdentifier: isIdentifier$j, isIfStatement: isIfStatement$2, isLabeledStatement: isLabeledStatement, isStringLiteral: isStringLiteral$6, isNumericLiteral: isNumericLiteral, isNullLiteral: isNullLiteral$2, isBooleanLiteral: isBooleanLiteral, isRegExpLiteral: isRegExpLiteral$2, isLogicalExpression: isLogicalExpression$1, isMemberExpression: isMemberExpression$8, isNewExpression: isNewExpression$4, isProgram: isProgram$1, isObjectExpression: isObjectExpression$3, isObjectMethod: isObjectMethod$1, isObjectProperty: isObjectProperty$5, isRestElement: isRestElement$3, isReturnStatement: isReturnStatement$1, isSequenceExpression: isSequenceExpression$2, isParenthesizedExpression: isParenthesizedExpression$1, isSwitchCase: isSwitchCase, isSwitchStatement: isSwitchStatement$1, isThisExpression: isThisExpression$2, isThrowStatement: isThrowStatement$1, isTryStatement: isTryStatement, isUnaryExpression: isUnaryExpression$1, isUpdateExpression: isUpdateExpression$2, isVariableDeclaration: isVariableDeclaration$3, isVariableDeclarator: isVariableDeclarator$2, isWhileStatement: isWhileStatement$1, isWithStatement: isWithStatement, isAssignmentPattern: isAssignmentPattern$5, isArrayPattern: isArrayPattern$1, isArrowFunctionExpression: isArrowFunctionExpression$1, isClassBody: isClassBody$2, isClassExpression: isClassExpression$1, isClassDeclaration: isClassDeclaration$2, isExportAllDeclaration: isExportAllDeclaration$1, isExportDefaultDeclaration: isExportDefaultDeclaration$3, isExportNamedDeclaration: isExportNamedDeclaration$3, isExportSpecifier: isExportSpecifier, isForOfStatement: isForOfStatement$2, isImportDeclaration: isImportDeclaration$2, isImportDefaultSpecifier: isImportDefaultSpecifier$1, isImportNamespaceSpecifier: isImportNamespaceSpecifier$1, isImportSpecifier: isImportSpecifier$1, isMetaProperty: isMetaProperty$1, isClassMethod: isClassMethod, isObjectPattern: isObjectPattern$2, isSpreadElement: isSpreadElement$1, isSuper: isSuper$3, isTaggedTemplateExpression: isTaggedTemplateExpression$2, isTemplateElement: isTemplateElement, isTemplateLiteral: isTemplateLiteral$2, isYieldExpression: isYieldExpression$1, isAwaitExpression: isAwaitExpression$1, isImport: isImport, isBigIntLiteral: isBigIntLiteral, isExportNamespaceSpecifier: isExportNamespaceSpecifier$1, isOptionalMemberExpression: isOptionalMemberExpression$3, isOptionalCallExpression: isOptionalCallExpression$3, isClassProperty: isClassProperty, isClassAccessorProperty: isClassAccessorProperty, isClassPrivateProperty: isClassPrivateProperty, isClassPrivateMethod: isClassPrivateMethod, isPrivateName: isPrivateName$3, isStaticBlock: isStaticBlock, isAnyTypeAnnotation: isAnyTypeAnnotation$1, isArrayTypeAnnotation: isArrayTypeAnnotation$2, isBooleanTypeAnnotation: isBooleanTypeAnnotation$1, isBooleanLiteralTypeAnnotation: isBooleanLiteralTypeAnnotation, isNullLiteralTypeAnnotation: isNullLiteralTypeAnnotation, isClassImplements: isClassImplements, isDeclareClass: isDeclareClass, isDeclareFunction: isDeclareFunction, isDeclareInterface: isDeclareInterface, isDeclareModule: isDeclareModule, isDeclareModuleExports: isDeclareModuleExports, isDeclareTypeAlias: isDeclareTypeAlias, isDeclareOpaqueType: isDeclareOpaqueType, isDeclareVariable: isDeclareVariable, isDeclareExportDeclaration: isDeclareExportDeclaration$1, isDeclareExportAllDeclaration: isDeclareExportAllDeclaration, isDeclaredPredicate: isDeclaredPredicate, isExistsTypeAnnotation: isExistsTypeAnnotation, isFunctionTypeAnnotation: isFunctionTypeAnnotation, isFunctionTypeParam: isFunctionTypeParam, isGenericTypeAnnotation: isGenericTypeAnnotation$1, isInferredPredicate: isInferredPredicate, isInterfaceExtends: isInterfaceExtends, isInterfaceDeclaration: isInterfaceDeclaration, isInterfaceTypeAnnotation: isInterfaceTypeAnnotation, isIntersectionTypeAnnotation: isIntersectionTypeAnnotation$1, isMixedTypeAnnotation: isMixedTypeAnnotation$1, isEmptyTypeAnnotation: isEmptyTypeAnnotation$1, isNullableTypeAnnotation: isNullableTypeAnnotation$1, isNumberLiteralTypeAnnotation: isNumberLiteralTypeAnnotation, isNumberTypeAnnotation: isNumberTypeAnnotation$1, isObjectTypeAnnotation: isObjectTypeAnnotation, isObjectTypeInternalSlot: isObjectTypeInternalSlot, isObjectTypeCallProperty: isObjectTypeCallProperty, isObjectTypeIndexer: isObjectTypeIndexer, isObjectTypeProperty: isObjectTypeProperty, isObjectTypeSpreadProperty: isObjectTypeSpreadProperty, isOpaqueType: isOpaqueType, isQualifiedTypeIdentifier: isQualifiedTypeIdentifier, isStringLiteralTypeAnnotation: isStringLiteralTypeAnnotation, isStringTypeAnnotation: isStringTypeAnnotation$1, isSymbolTypeAnnotation: isSymbolTypeAnnotation, isThisTypeAnnotation: isThisTypeAnnotation, isTupleTypeAnnotation: isTupleTypeAnnotation$1, isTypeofTypeAnnotation: isTypeofTypeAnnotation, isTypeAlias: isTypeAlias, isTypeAnnotation: isTypeAnnotation$2, isTypeCastExpression: isTypeCastExpression$1, isTypeParameter: isTypeParameter, isTypeParameterDeclaration: isTypeParameterDeclaration, isTypeParameterInstantiation: isTypeParameterInstantiation, isUnionTypeAnnotation: isUnionTypeAnnotation$2, isVariance: isVariance, isVoidTypeAnnotation: isVoidTypeAnnotation$1, isEnumDeclaration: isEnumDeclaration, isEnumBooleanBody: isEnumBooleanBody, isEnumNumberBody: isEnumNumberBody, isEnumStringBody: isEnumStringBody, isEnumSymbolBody: isEnumSymbolBody, isEnumBooleanMember: isEnumBooleanMember, isEnumNumberMember: isEnumNumberMember, isEnumStringMember: isEnumStringMember, isEnumDefaultedMember: isEnumDefaultedMember, isIndexedAccessType: isIndexedAccessType$1, isOptionalIndexedAccessType: isOptionalIndexedAccessType, isJSXAttribute: isJSXAttribute, isJSXClosingElement: isJSXClosingElement, isJSXElement: isJSXElement, isJSXEmptyExpression: isJSXEmptyExpression, isJSXExpressionContainer: isJSXExpressionContainer$1, isJSXSpreadChild: isJSXSpreadChild, isJSXIdentifier: isJSXIdentifier$3, isJSXMemberExpression: isJSXMemberExpression$2, isJSXNamespacedName: isJSXNamespacedName$1, isJSXOpeningElement: isJSXOpeningElement, isJSXSpreadAttribute: isJSXSpreadAttribute$1, isJSXText: isJSXText, isJSXFragment: isJSXFragment, isJSXOpeningFragment: isJSXOpeningFragment, isJSXClosingFragment: isJSXClosingFragment, isNoop: isNoop, isPlaceholder: isPlaceholder$1, isV8IntrinsicIdentifier: isV8IntrinsicIdentifier, isArgumentPlaceholder: isArgumentPlaceholder, isBindExpression: isBindExpression, isImportAttribute: isImportAttribute, isDecorator: isDecorator, isDoExpression: isDoExpression, isExportDefaultSpecifier: isExportDefaultSpecifier$1, isRecordExpression: isRecordExpression$1, isTupleExpression: isTupleExpression$1, isDecimalLiteral: isDecimalLiteral, isModuleExpression: isModuleExpression, isTopicReference: isTopicReference$1, isPipelineTopicExpression: isPipelineTopicExpression, isPipelineBareFunction: isPipelineBareFunction, isPipelinePrimaryTopicReference: isPipelinePrimaryTopicReference, isTSParameterProperty: isTSParameterProperty, isTSDeclareFunction: isTSDeclareFunction, isTSDeclareMethod: isTSDeclareMethod, isTSQualifiedName: isTSQualifiedName, isTSCallSignatureDeclaration: isTSCallSignatureDeclaration, isTSConstructSignatureDeclaration: isTSConstructSignatureDeclaration, isTSPropertySignature: isTSPropertySignature, isTSMethodSignature: isTSMethodSignature, isTSIndexSignature: isTSIndexSignature, isTSAnyKeyword: isTSAnyKeyword, isTSBooleanKeyword: isTSBooleanKeyword, isTSBigIntKeyword: isTSBigIntKeyword, isTSIntrinsicKeyword: isTSIntrinsicKeyword, isTSNeverKeyword: isTSNeverKeyword, isTSNullKeyword: isTSNullKeyword, isTSNumberKeyword: isTSNumberKeyword, isTSObjectKeyword: isTSObjectKeyword, isTSStringKeyword: isTSStringKeyword, isTSSymbolKeyword: isTSSymbolKeyword, isTSUndefinedKeyword: isTSUndefinedKeyword, isTSUnknownKeyword: isTSUnknownKeyword, isTSVoidKeyword: isTSVoidKeyword, isTSThisType: isTSThisType, isTSFunctionType: isTSFunctionType, isTSConstructorType: isTSConstructorType, isTSTypeReference: isTSTypeReference$1, isTSTypePredicate: isTSTypePredicate, isTSTypeQuery: isTSTypeQuery, isTSTypeLiteral: isTSTypeLiteral, isTSArrayType: isTSArrayType$2, isTSTupleType: isTSTupleType, isTSOptionalType: isTSOptionalType$1, isTSRestType: isTSRestType$1, isTSNamedTupleMember: isTSNamedTupleMember, isTSUnionType: isTSUnionType$1, isTSIntersectionType: isTSIntersectionType$1, isTSConditionalType: isTSConditionalType, isTSInferType: isTSInferType, isTSParenthesizedType: isTSParenthesizedType, isTSTypeOperator: isTSTypeOperator, isTSIndexedAccessType: isTSIndexedAccessType, isTSMappedType: isTSMappedType, isTSLiteralType: isTSLiteralType, isTSExpressionWithTypeArguments: isTSExpressionWithTypeArguments, isTSInterfaceDeclaration: isTSInterfaceDeclaration, isTSInterfaceBody: isTSInterfaceBody$1, isTSTypeAliasDeclaration: isTSTypeAliasDeclaration, isTSInstantiationExpression: isTSInstantiationExpression$1, isTSAsExpression: isTSAsExpression$2, isTSSatisfiesExpression: isTSSatisfiesExpression$2, isTSTypeAssertion: isTSTypeAssertion$2, isTSEnumDeclaration: isTSEnumDeclaration$1, isTSEnumMember: isTSEnumMember, isTSModuleDeclaration: isTSModuleDeclaration, isTSModuleBlock: isTSModuleBlock, isTSImportType: isTSImportType, isTSImportEqualsDeclaration: isTSImportEqualsDeclaration, isTSExternalModuleReference: isTSExternalModuleReference, isTSNonNullExpression: isTSNonNullExpression$2, isTSExportAssignment: isTSExportAssignment, isTSNamespaceExportDeclaration: isTSNamespaceExportDeclaration, isTSTypeAnnotation: isTSTypeAnnotation$1, isTSTypeParameterInstantiation: isTSTypeParameterInstantiation, isTSTypeParameterDeclaration: isTSTypeParameterDeclaration, isTSTypeParameter: isTSTypeParameter, isStandardized: isStandardized, isExpression: isExpression$4, isBinary: isBinary$3, isScopable: isScopable, isBlockParent: isBlockParent, isBlock: isBlock, isStatement: isStatement$8, isTerminatorless: isTerminatorless, isCompletionStatement: isCompletionStatement, isConditional: isConditional$1, isLoop: isLoop$1, isWhile: isWhile, isExpressionWrapper: isExpressionWrapper, isFor: isFor$2, isForXStatement: isForXStatement$1, isFunction: isFunction$4, isFunctionParent: isFunctionParent, isPureish: isPureish$2, isDeclaration: isDeclaration$1, isPatternLike: isPatternLike, isLVal: isLVal, isTSEntityName: isTSEntityName, isLiteral: isLiteral$6, isUserWhitespacable: isUserWhitespacable, isMethod: isMethod$1, isObjectMember: isObjectMember, isProperty: isProperty$1, isUnaryLike: isUnaryLike$1, isPattern: isPattern, isClass: isClass$2, isImportOrExportDeclaration: isImportOrExportDeclaration, isExportDeclaration: isExportDeclaration$3, isModuleSpecifier: isModuleSpecifier$1, isAccessor: isAccessor, isPrivate: isPrivate, isFlow: isFlow$1, isFlowType: isFlowType$1, isFlowBaseAnnotation: isFlowBaseAnnotation$1, isFlowDeclaration: isFlowDeclaration, isFlowPredicate: isFlowPredicate, isEnumBody: isEnumBody, isEnumMember: isEnumMember, isJSX: isJSX, isMiscellaneous: isMiscellaneous, isTypeScript: isTypeScript, isTSTypeElement: isTSTypeElement, isTSType: isTSType, isTSBaseType: isTSBaseType, isNumberLiteral: isNumberLiteral, isRegexLiteral: isRegexLiteral, isRestProperty: isRestProperty$1, isSpreadProperty: isSpreadProperty$1, isModuleDeclaration: isModuleDeclaration }); var DEPRECATED_KEYS = DEPRECATED_KEYS$1, DEPRECATED_ALIASES = DEPRECATED_ALIASES$1, FLIPPED_ALIAS_KEYS$2 = FLIPPED_ALIAS_KEYS$3, TYPES = TYPES$1, deprecationWarning = deprecationWarning$1; function isVirtualType(type) { return type in virtualTypes; } function explode$1(visitor) { if (visitor._exploded) return visitor; visitor._exploded = true; for (var _i = 0, _arr = Object.keys(visitor); _i < _arr.length; _i++) { var nodeType = _arr[_i]; if (shouldIgnoreKey(nodeType)) continue; var parts = nodeType.split("|"); if (parts.length === 1) continue; var fns = visitor[nodeType]; delete visitor[nodeType]; for (var _iterator = _createForOfIteratorHelperLoose(parts), _step; !(_step = _iterator()).done;) { var part = _step.value; visitor[part] = fns; } } verify(visitor); delete visitor.__esModule; ensureEntranceObjects(visitor); ensureCallbackArrays(visitor); for (var _i2 = 0, _Object$keys = Object.keys(visitor); _i2 < _Object$keys.length; _i2++) { var _nodeType = _Object$keys[_i2]; if (shouldIgnoreKey(_nodeType)) continue; if (!isVirtualType(_nodeType)) continue; var _fns = visitor[_nodeType]; for (var _i3 = 0, _Object$keys2 = Object.keys(_fns); _i3 < _Object$keys2.length; _i3++) { var type = _Object$keys2[_i3]; _fns[type] = wrapCheck(_nodeType, _fns[type]); } delete visitor[_nodeType]; var types = virtualTypes[_nodeType]; if (types !== null) { for (var _iterator2 = _createForOfIteratorHelperLoose(types), _step2; !(_step2 = _iterator2()).done;) { var _type = _step2.value; if (visitor[_type]) { mergePair(visitor[_type], _fns); } else { visitor[_type] = _fns; } } } else { mergePair(visitor, _fns); } } for (var _i4 = 0, _arr2 = Object.keys(visitor); _i4 < _arr2.length; _i4++) { var _nodeType2 = _arr2[_i4]; if (shouldIgnoreKey(_nodeType2)) continue; var aliases = FLIPPED_ALIAS_KEYS$2[_nodeType2]; if (_nodeType2 in DEPRECATED_KEYS) { var deprecatedKey = DEPRECATED_KEYS[_nodeType2]; deprecationWarning(_nodeType2, deprecatedKey, "Visitor "); aliases = [deprecatedKey]; } else if (_nodeType2 in DEPRECATED_ALIASES) { var deprecatedAlias = DEPRECATED_ALIASES[_nodeType2]; deprecationWarning(_nodeType2, deprecatedAlias, "Visitor "); aliases = FLIPPED_ALIAS_KEYS$2[deprecatedAlias]; } if (!aliases) continue; var _fns2 = visitor[_nodeType2]; delete visitor[_nodeType2]; for (var _iterator3 = _createForOfIteratorHelperLoose(aliases), _step3; !(_step3 = _iterator3()).done;) { var alias = _step3.value; var existing = visitor[alias]; if (existing) { mergePair(existing, _fns2); } else { visitor[alias] = Object.assign({}, _fns2); } } } for (var _i5 = 0, _Object$keys3 = Object.keys(visitor); _i5 < _Object$keys3.length; _i5++) { var _nodeType3 = _Object$keys3[_i5]; if (shouldIgnoreKey(_nodeType3)) continue; ensureCallbackArrays(visitor[_nodeType3]); } return visitor; } function verify(visitor) { if (visitor._verified) return; if (typeof visitor === "function") { throw new Error("You passed `traverse()` a function when it expected a visitor object, " + "are you sure you didn't mean `{ enter: Function }`?"); } for (var _i6 = 0, _arr3 = Object.keys(visitor); _i6 < _arr3.length; _i6++) { var nodeType = _arr3[_i6]; if (nodeType === "enter" || nodeType === "exit") { validateVisitorMethods(nodeType, visitor[nodeType]); } if (shouldIgnoreKey(nodeType)) continue; if (TYPES.indexOf(nodeType) < 0) { throw new Error("You gave us a visitor for the node type " + nodeType + " but it's not a valid type"); } var _visitors = visitor[nodeType]; if (typeof _visitors === "object") { for (var _i7 = 0, _Object$keys4 = Object.keys(_visitors); _i7 < _Object$keys4.length; _i7++) { var visitorKey = _Object$keys4[_i7]; if (visitorKey === "enter" || visitorKey === "exit") { validateVisitorMethods(nodeType + "." + visitorKey, _visitors[visitorKey]); } else { throw new Error("You passed `traverse()` a visitor object with the property " + (nodeType + " that has the invalid property " + visitorKey)); } } } } visitor._verified = true; } function validateVisitorMethods(path, val) { var fns = [].concat(val); for (var _iterator4 = _createForOfIteratorHelperLoose(fns), _step4; !(_step4 = _iterator4()).done;) { var fn = _step4.value; if (typeof fn !== "function") { throw new TypeError("Non-function found defined in " + path + " with type " + typeof fn); } } } function merge$1(visitors, states, wrapper) { if (states === void 0) { states = []; } var rootVisitor = {}; for (var i = 0; i < visitors.length; i++) { var visitor = visitors[i]; var state = states[i]; explode$1(visitor); for (var _i8 = 0, _arr4 = Object.keys(visitor); _i8 < _arr4.length; _i8++) { var type = _arr4[_i8]; var visitorType = visitor[type]; if (state || wrapper) { visitorType = wrapWithStateOrWrapper(visitorType, state, wrapper); } var nodeVisitor = rootVisitor[type] || (rootVisitor[type] = {}); mergePair(nodeVisitor, visitorType); } } return rootVisitor; } function wrapWithStateOrWrapper(oldVisitor, state, wrapper) { var newVisitor = {}; var _loop = function _loop() { var key = _arr5[_i9]; var fns = oldVisitor[key]; if (!Array.isArray(fns)) return "continue"; fns = fns.map(function (fn) { var newFn = fn; if (state) { newFn = function newFn(path) { return fn.call(state, path, state); }; } if (wrapper) { newFn = wrapper(state.key, key, newFn); } if (newFn !== fn) { newFn.toString = function () { return fn.toString(); }; } return newFn; }); newVisitor[key] = fns; }; for (var _i9 = 0, _arr5 = Object.keys(oldVisitor); _i9 < _arr5.length; _i9++) { var _ret = _loop(); if (_ret === "continue") continue; } return newVisitor; } function ensureEntranceObjects(obj) { for (var _i10 = 0, _arr6 = Object.keys(obj); _i10 < _arr6.length; _i10++) { var key = _arr6[_i10]; if (shouldIgnoreKey(key)) continue; var fns = obj[key]; if (typeof fns === "function") { obj[key] = { enter: fns }; } } } function ensureCallbackArrays(obj) { if (obj.enter && !Array.isArray(obj.enter)) obj.enter = [obj.enter]; if (obj.exit && !Array.isArray(obj.exit)) obj.exit = [obj.exit]; } function wrapCheck(nodeType, fn) { var newFn = function newFn(path) { if (path["is" + nodeType]()) { return fn.apply(this, arguments); } }; newFn.toString = function () { return fn.toString(); }; return newFn; } function shouldIgnoreKey(key) { if (key[0] === "_") return true; if (key === "enter" || key === "exit" || key === "shouldSkip") return true; if (key === "denylist" || key === "noScope" || key === "skipKeys" || key === "blacklist") { return true; } return false; } function mergePair(dest, src) { for (var _i11 = 0, _Object$keys5 = Object.keys(src); _i11 < _Object$keys5.length; _i11++) { var key = _Object$keys5[_i11]; dest[key] = [].concat(dest[key] || [], src[key]); } } var visitors = /*#__PURE__*/Object.freeze({ __proto__: null, explode: explode$1, verify: verify, merge: merge$1 }); var path$2 = new WeakMap(); var scope = new WeakMap(); function clear() { clearPath(); clearScope(); } function clearPath() { path$2 = new WeakMap(); } function clearScope() { scope = new WeakMap(); } var cache$1 = /*#__PURE__*/Object.freeze({ __proto__: null, get path () { return path$2; }, get scope () { return scope; }, clear: clear, clearPath: clearPath, clearScope: clearScope }); var browser$4 = {exports: {}}; var ms; var hasRequiredMs; function requireMs() { if (hasRequiredMs) return ms; hasRequiredMs = 1; var s = 1000; var m = s * 60; var h = m * 60; var d = h * 24; var w = d * 7; var y = d * 365.25; ms = function ms(val, options) { options = options || {}; var type = typeof val; if (type === 'string' && val.length > 0) { return parse(val); } else if (type === 'number' && isFinite(val)) { return options["long"] ? fmtLong(val) : fmtShort(val); } throw new Error('val is not a non-empty string or a valid number. val=' + JSON.stringify(val)); }; function parse(str) { str = String(str); if (str.length > 100) { return; } var match = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(str); if (!match) { return; } var n = parseFloat(match[1]); var type = (match[2] || 'ms').toLowerCase(); switch (type) { case 'years': case 'year': case 'yrs': case 'yr': case 'y': return n * y; case 'weeks': case 'week': case 'w': return n * w; case 'days': case 'day': case 'd': return n * d; case 'hours': case 'hour': case 'hrs': case 'hr': case 'h': return n * h; case 'minutes': case 'minute': case 'mins': case 'min': case 'm': return n * m; case 'seconds': case 'second': case 'secs': case 'sec': case 's': return n * s; case 'milliseconds': case 'millisecond': case 'msecs': case 'msec': case 'ms': return n; default: return undefined; } } function fmtShort(ms) { var msAbs = Math.abs(ms); if (msAbs >= d) { return Math.round(ms / d) + 'd'; } if (msAbs >= h) { return Math.round(ms / h) + 'h'; } if (msAbs >= m) { return Math.round(ms / m) + 'm'; } if (msAbs >= s) { return Math.round(ms / s) + 's'; } return ms + 'ms'; } function fmtLong(ms) { var msAbs = Math.abs(ms); if (msAbs >= d) { return plural(ms, msAbs, d, 'day'); } if (msAbs >= h) { return plural(ms, msAbs, h, 'hour'); } if (msAbs >= m) { return plural(ms, msAbs, m, 'minute'); } if (msAbs >= s) { return plural(ms, msAbs, s, 'second'); } return ms + ' ms'; } function plural(ms, msAbs, n, name) { var isPlural = msAbs >= n * 1.5; return Math.round(ms / n) + ' ' + name + (isPlural ? 's' : ''); } return ms; } function setup$1(env) { createDebug.debug = createDebug; createDebug["default"] = createDebug; createDebug.coerce = coerce; createDebug.disable = disable; createDebug.enable = enable; createDebug.enabled = enabled; createDebug.humanize = requireMs(); createDebug.destroy = destroy; Object.keys(env).forEach(function (key) { createDebug[key] = env[key]; }); createDebug.names = []; createDebug.skips = []; createDebug.formatters = {}; function selectColor(namespace) { var hash = 0; for (var i = 0; i < namespace.length; i++) { hash = (hash << 5) - hash + namespace.charCodeAt(i); hash |= 0; } return createDebug.colors[Math.abs(hash) % createDebug.colors.length]; } createDebug.selectColor = selectColor; function createDebug(namespace) { var prevTime; var enableOverride = null; var namespacesCache; var enabledCache; function debug() { for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } if (!debug.enabled) { return; } var self = debug; var curr = Number(new Date()); var ms = curr - (prevTime || curr); self.diff = ms; self.prev = prevTime; self.curr = curr; prevTime = curr; args[0] = createDebug.coerce(args[0]); if (typeof args[0] !== 'string') { args.unshift('%O'); } var index = 0; args[0] = args[0].replace(/%([a-zA-Z%])/g, function (match, format) { if (match === '%%') { return '%'; } index++; var formatter = createDebug.formatters[format]; if (typeof formatter === 'function') { var val = args[index]; match = formatter.call(self, val); args.splice(index, 1); index--; } return match; }); createDebug.formatArgs.call(self, args); var logFn = self.log || createDebug.log; logFn.apply(self, args); } debug.namespace = namespace; debug.useColors = createDebug.useColors(); debug.color = createDebug.selectColor(namespace); debug.extend = extend; debug.destroy = createDebug.destroy; Object.defineProperty(debug, 'enabled', { enumerable: true, configurable: false, get: function get() { if (enableOverride !== null) { return enableOverride; } if (namespacesCache !== createDebug.namespaces) { namespacesCache = createDebug.namespaces; enabledCache = createDebug.enabled(namespace); } return enabledCache; }, set: function set(v) { enableOverride = v; } }); if (typeof createDebug.init === 'function') { createDebug.init(debug); } return debug; } function extend(namespace, delimiter) { var newDebug = createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace); newDebug.log = this.log; return newDebug; } function enable(namespaces) { createDebug.save(namespaces); createDebug.namespaces = namespaces; createDebug.names = []; createDebug.skips = []; var i; var split = (typeof namespaces === 'string' ? namespaces : '').split(/[\s,]+/); var len = split.length; for (i = 0; i < len; i++) { if (!split[i]) { continue; } namespaces = split[i].replace(/\*/g, '.*?'); if (namespaces[0] === '-') { createDebug.skips.push(new RegExp('^' + namespaces.slice(1) + '$')); } else { createDebug.names.push(new RegExp('^' + namespaces + '$')); } } } function disable() { var namespaces = [].concat(_toConsumableArray(createDebug.names.map(toNamespace)), _toConsumableArray(createDebug.skips.map(toNamespace).map(function (namespace) { return '-' + namespace; }))).join(','); createDebug.enable(''); return namespaces; } function enabled(name) { if (name[name.length - 1] === '*') { return true; } var i; var len; for (i = 0, len = createDebug.skips.length; i < len; i++) { if (createDebug.skips[i].test(name)) { return false; } } for (i = 0, len = createDebug.names.length; i < len; i++) { if (createDebug.names[i].test(name)) { return true; } } return false; } function toNamespace(regexp) { return regexp.toString().substring(2, regexp.toString().length - 2).replace(/\.\*\?$/, '*'); } function coerce(val) { if (val instanceof Error) { return val.stack || val.message; } return val; } function destroy() { console.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.'); } createDebug.enable(createDebug.load()); return createDebug; } var common = setup$1; (function (module, exports) { exports.formatArgs = formatArgs; exports.save = save; exports.load = load; exports.useColors = useColors; exports.storage = localstorage(); exports.destroy = function () { var warned = false; return function () { if (!warned) { warned = true; console.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.'); } }; }(); exports.colors = ['#0000CC', '#0000FF', '#0033CC', '#0033FF', '#0066CC', '#0066FF', '#0099CC', '#0099FF', '#00CC00', '#00CC33', '#00CC66', '#00CC99', '#00CCCC', '#00CCFF', '#3300CC', '#3300FF', '#3333CC', '#3333FF', '#3366CC', '#3366FF', '#3399CC', '#3399FF', '#33CC00', '#33CC33', '#33CC66', '#33CC99', '#33CCCC', '#33CCFF', '#6600CC', '#6600FF', '#6633CC', '#6633FF', '#66CC00', '#66CC33', '#9900CC', '#9900FF', '#9933CC', '#9933FF', '#99CC00', '#99CC33', '#CC0000', '#CC0033', '#CC0066', '#CC0099', '#CC00CC', '#CC00FF', '#CC3300', '#CC3333', '#CC3366', '#CC3399', '#CC33CC', '#CC33FF', '#CC6600', '#CC6633', '#CC9900', '#CC9933', '#CCCC00', '#CCCC33', '#FF0000', '#FF0033', '#FF0066', '#FF0099', '#FF00CC', '#FF00FF', '#FF3300', '#FF3333', '#FF3366', '#FF3399', '#FF33CC', '#FF33FF', '#FF6600', '#FF6633', '#FF9900', '#FF9933', '#FFCC00', '#FFCC33']; function useColors() { if (typeof window !== 'undefined' && window.process && (window.process.type === 'renderer' || window.process.__nwjs)) { return true; } if (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) { return false; } return typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance || typeof window !== 'undefined' && window.console && (window.console.firebug || window.console.exception && window.console.table) || typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31 || typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/); } function formatArgs(args) { args[0] = (this.useColors ? '%c' : '') + this.namespace + (this.useColors ? ' %c' : ' ') + args[0] + (this.useColors ? '%c ' : ' ') + '+' + module.exports.humanize(this.diff); if (!this.useColors) { return; } var c = 'color: ' + this.color; args.splice(1, 0, c, 'color: inherit'); var index = 0; var lastC = 0; args[0].replace(/%[a-zA-Z%]/g, function (match) { if (match === '%%') { return; } index++; if (match === '%c') { lastC = index; } }); args.splice(lastC, 0, c); } exports.log = console.debug || console.log || function () {}; function save(namespaces) { try { if (namespaces) { exports.storage.setItem('debug', namespaces); } else { exports.storage.removeItem('debug'); } } catch (error) {} } function load() { var r; try { r = exports.storage.getItem('debug'); } catch (error) {} if (!r && typeof browser$1$1 !== 'undefined' && 'env' in browser$1$1) { r = browser$1$1.env.DEBUG; } return r; } function localstorage() { try { return localStorage; } catch (error) {} } module.exports = common(exports); var formatters = module.exports.formatters; formatters.j = function (v) { try { return JSON.stringify(v); } catch (error) { return '[UnexpectedJSONParseError]: ' + error.message; } }; })(browser$4, browser$4.exports); var buildDebug = browser$4.exports; var cloneNode$i = cloneNode$j, exportNamedDeclaration$1 = exportNamedDeclaration$2, exportSpecifier$1 = exportSpecifier$2, identifier$h = identifier$i, variableDeclaration$7 = variableDeclaration$8, variableDeclarator$7 = variableDeclarator$8; function splitExportDeclaration(exportDeclaration) { if (!exportDeclaration.isExportDeclaration() || exportDeclaration.isExportAllDeclaration()) { throw new Error("Only default and named export declarations can be split."); } if (exportDeclaration.isExportDefaultDeclaration()) { var _declaration = exportDeclaration.get("declaration"); var standaloneDeclaration = _declaration.isFunctionDeclaration() || _declaration.isClassDeclaration(); var scope = _declaration.isScope() ? _declaration.scope.parent : _declaration.scope; var id = _declaration.node.id; var needBindingRegistration = false; if (!id) { needBindingRegistration = true; id = scope.generateUidIdentifier("default"); if (standaloneDeclaration || _declaration.isFunctionExpression() || _declaration.isClassExpression()) { _declaration.node.id = cloneNode$i(id); } } var updatedDeclaration = standaloneDeclaration ? _declaration.node : variableDeclaration$7("var", [variableDeclarator$7(cloneNode$i(id), _declaration.node)]); var updatedExportDeclaration = exportNamedDeclaration$1(null, [exportSpecifier$1(cloneNode$i(id), identifier$h("default"))]); exportDeclaration.insertAfter(updatedExportDeclaration); exportDeclaration.replaceWith(updatedDeclaration); if (needBindingRegistration) { scope.registerDeclaration(exportDeclaration); } return exportDeclaration; } else if (exportDeclaration.get("specifiers").length > 0) { throw new Error("It doesn't make sense to split exported specifiers."); } var declaration = exportDeclaration.get("declaration"); var bindingIdentifiers = declaration.getOuterBindingIdentifiers(); var specifiers = Object.keys(bindingIdentifiers).map(function (name) { return exportSpecifier$1(identifier$h(name), identifier$h(name)); }); var aliasDeclar = exportNamedDeclaration$1(null, specifiers); exportDeclaration.insertAfter(aliasDeclar); exportDeclaration.replaceWith(declaration.node); return exportDeclaration; } function requeueComputedKeyAndDecorators(path) { var context = path.context, node = path.node; if (node.computed) { context.maybeQueue(path.get("key")); } if (node.decorators) { for (var _iterator = _createForOfIteratorHelperLoose(path.get("decorators")), _step; !(_step = _iterator()).done;) { var decorator = _step.value; context.maybeQueue(decorator); } } } var visitor$5 = { FunctionParent: function FunctionParent(path) { if (path.isArrowFunctionExpression()) { return; } else { path.skip(); if (path.isMethod()) { requeueComputedKeyAndDecorators(path); } } }, Property: function Property(path) { if (path.isObjectProperty()) { return; } path.skip(); requeueComputedKeyAndDecorators(path); } }; var renameVisitor = { ReferencedIdentifier: function ReferencedIdentifier(_ref, state) { var node = _ref.node; if (node.name === state.oldName) { node.name = state.newName; } }, Scope: function Scope(path, state) { if (!path.scope.bindingIdentifierEquals(state.oldName, state.binding.identifier)) { path.skip(); if (path.isMethod()) { requeueComputedKeyAndDecorators(path); } } }, "AssignmentExpression|Declaration|VariableDeclarator": function AssignmentExpressionDeclarationVariableDeclarator(path, state) { if (path.isVariableDeclaration()) return; var ids = path.getOuterBindingIdentifiers(); for (var name in ids) { if (name === state.oldName) ids[name].name = state.newName; } } }; var Renamer = function () { function Renamer(binding, oldName, newName) { this.newName = newName; this.oldName = oldName; this.binding = binding; } var _proto = Renamer.prototype; _proto.maybeConvertFromExportDeclaration = function maybeConvertFromExportDeclaration(parentDeclar) { var maybeExportDeclar = parentDeclar.parentPath; if (!maybeExportDeclar.isExportDeclaration()) { return; } if (maybeExportDeclar.isExportDefaultDeclaration()) { var declaration = maybeExportDeclar.node.declaration; if (isDeclaration$1(declaration) && !declaration.id) { return; } } if (maybeExportDeclar.isExportAllDeclaration()) { return; } splitExportDeclaration(maybeExportDeclar); }; _proto.maybeConvertFromClassFunctionDeclaration = function maybeConvertFromClassFunctionDeclaration(path) { return path; }; _proto.maybeConvertFromClassFunctionExpression = function maybeConvertFromClassFunctionExpression(path) { return path; }; _proto.rename = function rename() { var binding = this.binding, oldName = this.oldName, newName = this.newName; var scope = binding.scope, path = binding.path; var parentDeclar = path.find(function (path) { return path.isDeclaration() || path.isFunctionExpression() || path.isClassExpression(); }); if (parentDeclar) { var bindingIds = parentDeclar.getOuterBindingIdentifiers(); if (bindingIds[oldName] === binding.identifier) { this.maybeConvertFromExportDeclaration(parentDeclar); } } var blockToTraverse = arguments[0] || scope.block; traverseNode(blockToTraverse, explode$1(renameVisitor), scope, this, scope.path, { discriminant: true }); if (!arguments[0]) { scope.removeOwnBinding(oldName); scope.bindings[newName] = binding; this.binding.identifier.name = newName; } if (parentDeclar) { this.maybeConvertFromClassFunctionDeclaration(path); this.maybeConvertFromClassFunctionExpression(path); } }; return _createClass(Renamer); }(); var Binding = function () { function Binding(_ref) { var identifier = _ref.identifier, scope = _ref.scope, path = _ref.path, kind = _ref.kind; this.identifier = void 0; this.scope = void 0; this.path = void 0; this.kind = void 0; this.constantViolations = []; this.constant = true; this.referencePaths = []; this.referenced = false; this.references = 0; this.identifier = identifier; this.scope = scope; this.path = path; this.kind = kind; if ((kind === "var" || kind === "hoisted") && isDeclaredInLoop(path || function () { throw new Error("Internal Babel error: unreachable "); }())) { this.reassign(path); } this.clearValue(); } var _proto = Binding.prototype; _proto.deoptValue = function deoptValue() { this.clearValue(); this.hasDeoptedValue = true; }; _proto.setValue = function setValue(value) { if (this.hasDeoptedValue) return; this.hasValue = true; this.value = value; }; _proto.clearValue = function clearValue() { this.hasDeoptedValue = false; this.hasValue = false; this.value = null; }; _proto.reassign = function reassign(path) { this.constant = false; if (this.constantViolations.indexOf(path) !== -1) { return; } this.constantViolations.push(path); }; _proto.reference = function reference(path) { if (this.referencePaths.indexOf(path) !== -1) { return; } this.referenced = true; this.references++; this.referencePaths.push(path); }; _proto.dereference = function dereference() { this.references--; this.referenced = !!this.references; }; return _createClass(Binding); }(); function isDeclaredInLoop(path) { for (var parentPath = path.parentPath, key = path.key; parentPath; _parentPath = parentPath, parentPath = _parentPath.parentPath, key = _parentPath.key, _parentPath) { var _parentPath; if (parentPath.isFunctionParent()) return false; if (parentPath.isWhile() || parentPath.isForXStatement() || parentPath.isForStatement() && key === "body") { return true; } } return false; } var builtin$1 = { "Array": false, "ArrayBuffer": false, Atomics: false, BigInt: false, BigInt64Array: false, BigUint64Array: false, "Boolean": false, constructor: false, "DataView": false, "Date": false, "decodeURI": false, "decodeURIComponent": false, "encodeURI": false, "encodeURIComponent": false, "Error": false, "escape": false, "eval": false, "EvalError": false, FinalizationRegistry: false, "Float32Array": false, "Float64Array": false, "Function": false, globalThis: false, hasOwnProperty: false, "Infinity": false, "Int16Array": false, "Int32Array": false, "Int8Array": false, "isFinite": false, "isNaN": false, isPrototypeOf: false, "JSON": false, "Map": false, "Math": false, "NaN": false, "Number": false, "Object": false, "parseFloat": false, "parseInt": false, "Promise": false, propertyIsEnumerable: false, "Proxy": false, "RangeError": false, "ReferenceError": false, "Reflect": false, "RegExp": false, "Set": false, SharedArrayBuffer: false, "String": false, "Symbol": false, "SyntaxError": false, toLocaleString: false, toString: false, "TypeError": false, "Uint16Array": false, "Uint32Array": false, "Uint8Array": false, "Uint8ClampedArray": false, "undefined": false, "unescape": false, "URIError": false, valueOf: false, "WeakMap": false, WeakRef: false, "WeakSet": false }; var es5$1 = { "Array": false, "Boolean": false, constructor: false, "Date": false, "decodeURI": false, "decodeURIComponent": false, "encodeURI": false, "encodeURIComponent": false, "Error": false, "escape": false, "eval": false, "EvalError": false, "Function": false, hasOwnProperty: false, "Infinity": false, "isFinite": false, "isNaN": false, isPrototypeOf: false, "JSON": false, "Math": false, "NaN": false, "Number": false, "Object": false, "parseFloat": false, "parseInt": false, propertyIsEnumerable: false, "RangeError": false, "ReferenceError": false, "RegExp": false, "String": false, "SyntaxError": false, toLocaleString: false, toString: false, "TypeError": false, "undefined": false, "unescape": false, "URIError": false, valueOf: false }; var es2015$1 = { "Array": false, "ArrayBuffer": false, "Boolean": false, constructor: false, "DataView": false, "Date": false, "decodeURI": false, "decodeURIComponent": false, "encodeURI": false, "encodeURIComponent": false, "Error": false, "escape": false, "eval": false, "EvalError": false, "Float32Array": false, "Float64Array": false, "Function": false, hasOwnProperty: false, "Infinity": false, "Int16Array": false, "Int32Array": false, "Int8Array": false, "isFinite": false, "isNaN": false, isPrototypeOf: false, "JSON": false, "Map": false, "Math": false, "NaN": false, "Number": false, "Object": false, "parseFloat": false, "parseInt": false, "Promise": false, propertyIsEnumerable: false, "Proxy": false, "RangeError": false, "ReferenceError": false, "Reflect": false, "RegExp": false, "Set": false, "String": false, "Symbol": false, "SyntaxError": false, toLocaleString: false, toString: false, "TypeError": false, "Uint16Array": false, "Uint32Array": false, "Uint8Array": false, "Uint8ClampedArray": false, "undefined": false, "unescape": false, "URIError": false, valueOf: false, "WeakMap": false, "WeakSet": false }; var es2017$1 = { "Array": false, "ArrayBuffer": false, Atomics: false, "Boolean": false, constructor: false, "DataView": false, "Date": false, "decodeURI": false, "decodeURIComponent": false, "encodeURI": false, "encodeURIComponent": false, "Error": false, "escape": false, "eval": false, "EvalError": false, "Float32Array": false, "Float64Array": false, "Function": false, hasOwnProperty: false, "Infinity": false, "Int16Array": false, "Int32Array": false, "Int8Array": false, "isFinite": false, "isNaN": false, isPrototypeOf: false, "JSON": false, "Map": false, "Math": false, "NaN": false, "Number": false, "Object": false, "parseFloat": false, "parseInt": false, "Promise": false, propertyIsEnumerable: false, "Proxy": false, "RangeError": false, "ReferenceError": false, "Reflect": false, "RegExp": false, "Set": false, SharedArrayBuffer: false, "String": false, "Symbol": false, "SyntaxError": false, toLocaleString: false, toString: false, "TypeError": false, "Uint16Array": false, "Uint32Array": false, "Uint8Array": false, "Uint8ClampedArray": false, "undefined": false, "unescape": false, "URIError": false, valueOf: false, "WeakMap": false, "WeakSet": false }; var es2020 = { "Array": false, "ArrayBuffer": false, Atomics: false, BigInt: false, BigInt64Array: false, BigUint64Array: false, "Boolean": false, constructor: false, "DataView": false, "Date": false, "decodeURI": false, "decodeURIComponent": false, "encodeURI": false, "encodeURIComponent": false, "Error": false, "escape": false, "eval": false, "EvalError": false, "Float32Array": false, "Float64Array": false, "Function": false, globalThis: false, hasOwnProperty: false, "Infinity": false, "Int16Array": false, "Int32Array": false, "Int8Array": false, "isFinite": false, "isNaN": false, isPrototypeOf: false, "JSON": false, "Map": false, "Math": false, "NaN": false, "Number": false, "Object": false, "parseFloat": false, "parseInt": false, "Promise": false, propertyIsEnumerable: false, "Proxy": false, "RangeError": false, "ReferenceError": false, "Reflect": false, "RegExp": false, "Set": false, SharedArrayBuffer: false, "String": false, "Symbol": false, "SyntaxError": false, toLocaleString: false, toString: false, "TypeError": false, "Uint16Array": false, "Uint32Array": false, "Uint8Array": false, "Uint8ClampedArray": false, "undefined": false, "unescape": false, "URIError": false, valueOf: false, "WeakMap": false, "WeakSet": false }; var es2021 = { "Array": false, "ArrayBuffer": false, Atomics: false, BigInt: false, BigInt64Array: false, BigUint64Array: false, "Boolean": false, constructor: false, "DataView": false, "Date": false, "decodeURI": false, "decodeURIComponent": false, "encodeURI": false, "encodeURIComponent": false, "Error": false, "escape": false, "eval": false, "EvalError": false, FinalizationRegistry: false, "Float32Array": false, "Float64Array": false, "Function": false, globalThis: false, hasOwnProperty: false, "Infinity": false, "Int16Array": false, "Int32Array": false, "Int8Array": false, "isFinite": false, "isNaN": false, isPrototypeOf: false, "JSON": false, "Map": false, "Math": false, "NaN": false, "Number": false, "Object": false, "parseFloat": false, "parseInt": false, "Promise": false, propertyIsEnumerable: false, "Proxy": false, "RangeError": false, "ReferenceError": false, "Reflect": false, "RegExp": false, "Set": false, SharedArrayBuffer: false, "String": false, "Symbol": false, "SyntaxError": false, toLocaleString: false, toString: false, "TypeError": false, "Uint16Array": false, "Uint32Array": false, "Uint8Array": false, "Uint8ClampedArray": false, "undefined": false, "unescape": false, "URIError": false, valueOf: false, "WeakMap": false, WeakRef: false, "WeakSet": false }; var browser$3 = { AbortController: false, AbortSignal: false, addEventListener: false, alert: false, AnalyserNode: false, Animation: false, AnimationEffectReadOnly: false, AnimationEffectTiming: false, AnimationEffectTimingReadOnly: false, AnimationEvent: false, AnimationPlaybackEvent: false, AnimationTimeline: false, applicationCache: false, ApplicationCache: false, ApplicationCacheErrorEvent: false, atob: false, Attr: false, Audio: false, AudioBuffer: false, AudioBufferSourceNode: false, AudioContext: false, AudioDestinationNode: false, AudioListener: false, AudioNode: false, AudioParam: false, AudioProcessingEvent: false, AudioScheduledSourceNode: false, "AudioWorkletGlobalScope ": false, AudioWorkletNode: false, AudioWorkletProcessor: false, BarProp: false, BaseAudioContext: false, BatteryManager: false, BeforeUnloadEvent: false, BiquadFilterNode: false, Blob: false, BlobEvent: false, blur: false, BroadcastChannel: false, btoa: false, BudgetService: false, ByteLengthQueuingStrategy: false, Cache: false, caches: false, CacheStorage: false, cancelAnimationFrame: false, cancelIdleCallback: false, CanvasCaptureMediaStreamTrack: false, CanvasGradient: false, CanvasPattern: false, CanvasRenderingContext2D: false, ChannelMergerNode: false, ChannelSplitterNode: false, CharacterData: false, clearInterval: false, clearTimeout: false, clientInformation: false, ClipboardEvent: false, close: false, closed: false, CloseEvent: false, Comment: false, CompositionEvent: false, confirm: false, console: false, ConstantSourceNode: false, ConvolverNode: false, CountQueuingStrategy: false, createImageBitmap: false, Credential: false, CredentialsContainer: false, crypto: false, Crypto: false, CryptoKey: false, CSS: false, CSSConditionRule: false, CSSFontFaceRule: false, CSSGroupingRule: false, CSSImportRule: false, CSSKeyframeRule: false, CSSKeyframesRule: false, CSSMediaRule: false, CSSNamespaceRule: false, CSSPageRule: false, CSSRule: false, CSSRuleList: false, CSSStyleDeclaration: false, CSSStyleRule: false, CSSStyleSheet: false, CSSSupportsRule: false, CustomElementRegistry: false, customElements: false, CustomEvent: false, DataTransfer: false, DataTransferItem: false, DataTransferItemList: false, defaultstatus: false, defaultStatus: false, DelayNode: false, DeviceMotionEvent: false, DeviceOrientationEvent: false, devicePixelRatio: false, dispatchEvent: false, document: false, Document: false, DocumentFragment: false, DocumentType: false, DOMError: false, DOMException: false, DOMImplementation: false, DOMMatrix: false, DOMMatrixReadOnly: false, DOMParser: false, DOMPoint: false, DOMPointReadOnly: false, DOMQuad: false, DOMRect: false, DOMRectReadOnly: false, DOMStringList: false, DOMStringMap: false, DOMTokenList: false, DragEvent: false, DynamicsCompressorNode: false, Element: false, ErrorEvent: false, event: false, Event: false, EventSource: false, EventTarget: false, external: false, fetch: false, File: false, FileList: false, FileReader: false, find: false, focus: false, FocusEvent: false, FontFace: false, FontFaceSetLoadEvent: false, FormData: false, frameElement: false, frames: false, GainNode: false, Gamepad: false, GamepadButton: false, GamepadEvent: false, getComputedStyle: false, getSelection: false, HashChangeEvent: false, Headers: false, history: false, History: false, HTMLAllCollection: false, HTMLAnchorElement: false, HTMLAreaElement: false, HTMLAudioElement: false, HTMLBaseElement: false, HTMLBodyElement: false, HTMLBRElement: false, HTMLButtonElement: false, HTMLCanvasElement: false, HTMLCollection: false, HTMLContentElement: false, HTMLDataElement: false, HTMLDataListElement: false, HTMLDetailsElement: false, HTMLDialogElement: false, HTMLDirectoryElement: false, HTMLDivElement: false, HTMLDListElement: false, HTMLDocument: false, HTMLElement: false, HTMLEmbedElement: false, HTMLFieldSetElement: false, HTMLFontElement: false, HTMLFormControlsCollection: false, HTMLFormElement: false, HTMLFrameElement: false, HTMLFrameSetElement: false, HTMLHeadElement: false, HTMLHeadingElement: false, HTMLHRElement: false, HTMLHtmlElement: false, HTMLIFrameElement: false, HTMLImageElement: false, HTMLInputElement: false, HTMLLabelElement: false, HTMLLegendElement: false, HTMLLIElement: false, HTMLLinkElement: false, HTMLMapElement: false, HTMLMarqueeElement: false, HTMLMediaElement: false, HTMLMenuElement: false, HTMLMetaElement: false, HTMLMeterElement: false, HTMLModElement: false, HTMLObjectElement: false, HTMLOListElement: false, HTMLOptGroupElement: false, HTMLOptionElement: false, HTMLOptionsCollection: false, HTMLOutputElement: false, HTMLParagraphElement: false, HTMLParamElement: false, HTMLPictureElement: false, HTMLPreElement: false, HTMLProgressElement: false, HTMLQuoteElement: false, HTMLScriptElement: false, HTMLSelectElement: false, HTMLShadowElement: false, HTMLSlotElement: false, HTMLSourceElement: false, HTMLSpanElement: false, HTMLStyleElement: false, HTMLTableCaptionElement: false, HTMLTableCellElement: false, HTMLTableColElement: false, HTMLTableElement: false, HTMLTableRowElement: false, HTMLTableSectionElement: false, HTMLTemplateElement: false, HTMLTextAreaElement: false, HTMLTimeElement: false, HTMLTitleElement: false, HTMLTrackElement: false, HTMLUListElement: false, HTMLUnknownElement: false, HTMLVideoElement: false, IDBCursor: false, IDBCursorWithValue: false, IDBDatabase: false, IDBFactory: false, IDBIndex: false, IDBKeyRange: false, IDBObjectStore: false, IDBOpenDBRequest: false, IDBRequest: false, IDBTransaction: false, IDBVersionChangeEvent: false, IdleDeadline: false, IIRFilterNode: false, Image: false, ImageBitmap: false, ImageBitmapRenderingContext: false, ImageCapture: false, ImageData: false, indexedDB: false, innerHeight: false, innerWidth: false, InputEvent: false, IntersectionObserver: false, IntersectionObserverEntry: false, "Intl": false, isSecureContext: false, KeyboardEvent: false, KeyframeEffect: false, KeyframeEffectReadOnly: false, length: false, localStorage: false, location: true, Location: false, locationbar: false, matchMedia: false, MediaDeviceInfo: false, MediaDevices: false, MediaElementAudioSourceNode: false, MediaEncryptedEvent: false, MediaError: false, MediaKeyMessageEvent: false, MediaKeySession: false, MediaKeyStatusMap: false, MediaKeySystemAccess: false, MediaList: false, MediaQueryList: false, MediaQueryListEvent: false, MediaRecorder: false, MediaSettingsRange: false, MediaSource: false, MediaStream: false, MediaStreamAudioDestinationNode: false, MediaStreamAudioSourceNode: false, MediaStreamEvent: false, MediaStreamTrack: false, MediaStreamTrackEvent: false, menubar: false, MessageChannel: false, MessageEvent: false, MessagePort: false, MIDIAccess: false, MIDIConnectionEvent: false, MIDIInput: false, MIDIInputMap: false, MIDIMessageEvent: false, MIDIOutput: false, MIDIOutputMap: false, MIDIPort: false, MimeType: false, MimeTypeArray: false, MouseEvent: false, moveBy: false, moveTo: false, MutationEvent: false, MutationObserver: false, MutationRecord: false, name: false, NamedNodeMap: false, NavigationPreloadManager: false, navigator: false, Navigator: false, NetworkInformation: false, Node: false, NodeFilter: false, NodeIterator: false, NodeList: false, Notification: false, OfflineAudioCompletionEvent: false, OfflineAudioContext: false, offscreenBuffering: false, OffscreenCanvas: true, OffscreenCanvasRenderingContext2D: false, onabort: true, onafterprint: true, onanimationend: true, onanimationiteration: true, onanimationstart: true, onappinstalled: true, onauxclick: true, onbeforeinstallprompt: true, onbeforeprint: true, onbeforeunload: true, onblur: true, oncancel: true, oncanplay: true, oncanplaythrough: true, onchange: true, onclick: true, onclose: true, oncontextmenu: true, oncuechange: true, ondblclick: true, ondevicemotion: true, ondeviceorientation: true, ondeviceorientationabsolute: true, ondrag: true, ondragend: true, ondragenter: true, ondragleave: true, ondragover: true, ondragstart: true, ondrop: true, ondurationchange: true, onemptied: true, onended: true, onerror: true, onfocus: true, ongotpointercapture: true, onhashchange: true, oninput: true, oninvalid: true, onkeydown: true, onkeypress: true, onkeyup: true, onlanguagechange: true, onload: true, onloadeddata: true, onloadedmetadata: true, onloadstart: true, onlostpointercapture: true, onmessage: true, onmessageerror: true, onmousedown: true, onmouseenter: true, onmouseleave: true, onmousemove: true, onmouseout: true, onmouseover: true, onmouseup: true, onmousewheel: true, onoffline: true, ononline: true, onpagehide: true, onpageshow: true, onpause: true, onplay: true, onplaying: true, onpointercancel: true, onpointerdown: true, onpointerenter: true, onpointerleave: true, onpointermove: true, onpointerout: true, onpointerover: true, onpointerup: true, onpopstate: true, onprogress: true, onratechange: true, onrejectionhandled: true, onreset: true, onresize: true, onscroll: true, onsearch: true, onseeked: true, onseeking: true, onselect: true, onstalled: true, onstorage: true, onsubmit: true, onsuspend: true, ontimeupdate: true, ontoggle: true, ontransitionend: true, onunhandledrejection: true, onunload: true, onvolumechange: true, onwaiting: true, onwheel: true, open: false, openDatabase: false, opener: false, Option: false, origin: false, OscillatorNode: false, outerHeight: false, outerWidth: false, PageTransitionEvent: false, pageXOffset: false, pageYOffset: false, PannerNode: false, parent: false, Path2D: false, PaymentAddress: false, PaymentRequest: false, PaymentRequestUpdateEvent: false, PaymentResponse: false, performance: false, Performance: false, PerformanceEntry: false, PerformanceLongTaskTiming: false, PerformanceMark: false, PerformanceMeasure: false, PerformanceNavigation: false, PerformanceNavigationTiming: false, PerformanceObserver: false, PerformanceObserverEntryList: false, PerformancePaintTiming: false, PerformanceResourceTiming: false, PerformanceTiming: false, PeriodicWave: false, Permissions: false, PermissionStatus: false, personalbar: false, PhotoCapabilities: false, Plugin: false, PluginArray: false, PointerEvent: false, PopStateEvent: false, postMessage: false, Presentation: false, PresentationAvailability: false, PresentationConnection: false, PresentationConnectionAvailableEvent: false, PresentationConnectionCloseEvent: false, PresentationConnectionList: false, PresentationReceiver: false, PresentationRequest: false, print: false, ProcessingInstruction: false, ProgressEvent: false, PromiseRejectionEvent: false, prompt: false, PushManager: false, PushSubscription: false, PushSubscriptionOptions: false, queueMicrotask: false, RadioNodeList: false, Range: false, ReadableStream: false, registerProcessor: false, RemotePlayback: false, removeEventListener: false, Request: false, requestAnimationFrame: false, requestIdleCallback: false, resizeBy: false, ResizeObserver: false, ResizeObserverEntry: false, resizeTo: false, Response: false, RTCCertificate: false, RTCDataChannel: false, RTCDataChannelEvent: false, RTCDtlsTransport: false, RTCIceCandidate: false, RTCIceGatherer: false, RTCIceTransport: false, RTCPeerConnection: false, RTCPeerConnectionIceEvent: false, RTCRtpContributingSource: false, RTCRtpReceiver: false, RTCRtpSender: false, RTCSctpTransport: false, RTCSessionDescription: false, RTCStatsReport: false, RTCTrackEvent: false, screen: false, Screen: false, screenLeft: false, ScreenOrientation: false, screenTop: false, screenX: false, screenY: false, ScriptProcessorNode: false, scroll: false, scrollbars: false, scrollBy: false, scrollTo: false, scrollX: false, scrollY: false, SecurityPolicyViolationEvent: false, Selection: false, self: false, ServiceWorker: false, ServiceWorkerContainer: false, ServiceWorkerRegistration: false, sessionStorage: false, setInterval: false, setTimeout: false, ShadowRoot: false, SharedWorker: false, SourceBuffer: false, SourceBufferList: false, speechSynthesis: false, SpeechSynthesisEvent: false, SpeechSynthesisUtterance: false, StaticRange: false, status: false, statusbar: false, StereoPannerNode: false, stop: false, Storage: false, StorageEvent: false, StorageManager: false, styleMedia: false, StyleSheet: false, StyleSheetList: false, SubtleCrypto: false, SVGAElement: false, SVGAngle: false, SVGAnimatedAngle: false, SVGAnimatedBoolean: false, SVGAnimatedEnumeration: false, SVGAnimatedInteger: false, SVGAnimatedLength: false, SVGAnimatedLengthList: false, SVGAnimatedNumber: false, SVGAnimatedNumberList: false, SVGAnimatedPreserveAspectRatio: false, SVGAnimatedRect: false, SVGAnimatedString: false, SVGAnimatedTransformList: false, SVGAnimateElement: false, SVGAnimateMotionElement: false, SVGAnimateTransformElement: false, SVGAnimationElement: false, SVGCircleElement: false, SVGClipPathElement: false, SVGComponentTransferFunctionElement: false, SVGDefsElement: false, SVGDescElement: false, SVGDiscardElement: false, SVGElement: false, SVGEllipseElement: false, SVGFEBlendElement: false, SVGFEColorMatrixElement: false, SVGFEComponentTransferElement: false, SVGFECompositeElement: false, SVGFEConvolveMatrixElement: false, SVGFEDiffuseLightingElement: false, SVGFEDisplacementMapElement: false, SVGFEDistantLightElement: false, SVGFEDropShadowElement: false, SVGFEFloodElement: false, SVGFEFuncAElement: false, SVGFEFuncBElement: false, SVGFEFuncGElement: false, SVGFEFuncRElement: false, SVGFEGaussianBlurElement: false, SVGFEImageElement: false, SVGFEMergeElement: false, SVGFEMergeNodeElement: false, SVGFEMorphologyElement: false, SVGFEOffsetElement: false, SVGFEPointLightElement: false, SVGFESpecularLightingElement: false, SVGFESpotLightElement: false, SVGFETileElement: false, SVGFETurbulenceElement: false, SVGFilterElement: false, SVGForeignObjectElement: false, SVGGElement: false, SVGGeometryElement: false, SVGGradientElement: false, SVGGraphicsElement: false, SVGImageElement: false, SVGLength: false, SVGLengthList: false, SVGLinearGradientElement: false, SVGLineElement: false, SVGMarkerElement: false, SVGMaskElement: false, SVGMatrix: false, SVGMetadataElement: false, SVGMPathElement: false, SVGNumber: false, SVGNumberList: false, SVGPathElement: false, SVGPatternElement: false, SVGPoint: false, SVGPointList: false, SVGPolygonElement: false, SVGPolylineElement: false, SVGPreserveAspectRatio: false, SVGRadialGradientElement: false, SVGRect: false, SVGRectElement: false, SVGScriptElement: false, SVGSetElement: false, SVGStopElement: false, SVGStringList: false, SVGStyleElement: false, SVGSVGElement: false, SVGSwitchElement: false, SVGSymbolElement: false, SVGTextContentElement: false, SVGTextElement: false, SVGTextPathElement: false, SVGTextPositioningElement: false, SVGTitleElement: false, SVGTransform: false, SVGTransformList: false, SVGTSpanElement: false, SVGUnitTypes: false, SVGUseElement: false, SVGViewElement: false, TaskAttributionTiming: false, Text: false, TextDecoder: false, TextEncoder: false, TextEvent: false, TextMetrics: false, TextTrack: false, TextTrackCue: false, TextTrackCueList: false, TextTrackList: false, TimeRanges: false, toolbar: false, top: false, Touch: false, TouchEvent: false, TouchList: false, TrackEvent: false, TransitionEvent: false, TreeWalker: false, UIEvent: false, URL: false, URLSearchParams: false, ValidityState: false, visualViewport: false, VisualViewport: false, VTTCue: false, WaveShaperNode: false, WebAssembly: false, WebGL2RenderingContext: false, WebGLActiveInfo: false, WebGLBuffer: false, WebGLContextEvent: false, WebGLFramebuffer: false, WebGLProgram: false, WebGLQuery: false, WebGLRenderbuffer: false, WebGLRenderingContext: false, WebGLSampler: false, WebGLShader: false, WebGLShaderPrecisionFormat: false, WebGLSync: false, WebGLTexture: false, WebGLTransformFeedback: false, WebGLUniformLocation: false, WebGLVertexArrayObject: false, WebSocket: false, WheelEvent: false, window: false, Window: false, Worker: false, WritableStream: false, XMLDocument: false, XMLHttpRequest: false, XMLHttpRequestEventTarget: false, XMLHttpRequestUpload: false, XMLSerializer: false, XPathEvaluator: false, XPathExpression: false, XPathResult: false, XSLTProcessor: false }; var worker$1 = { addEventListener: false, applicationCache: false, atob: false, Blob: false, BroadcastChannel: false, btoa: false, Cache: false, caches: false, clearInterval: false, clearTimeout: false, close: true, console: false, fetch: false, FileReaderSync: false, FormData: false, Headers: false, IDBCursor: false, IDBCursorWithValue: false, IDBDatabase: false, IDBFactory: false, IDBIndex: false, IDBKeyRange: false, IDBObjectStore: false, IDBOpenDBRequest: false, IDBRequest: false, IDBTransaction: false, IDBVersionChangeEvent: false, ImageData: false, importScripts: true, indexedDB: false, location: false, MessageChannel: false, MessagePort: false, name: false, navigator: false, Notification: false, onclose: true, onconnect: true, onerror: true, onlanguagechange: true, onmessage: true, onoffline: true, ononline: true, onrejectionhandled: true, onunhandledrejection: true, performance: false, Performance: false, PerformanceEntry: false, PerformanceMark: false, PerformanceMeasure: false, PerformanceNavigation: false, PerformanceResourceTiming: false, PerformanceTiming: false, postMessage: true, "Promise": false, queueMicrotask: false, removeEventListener: false, Request: false, Response: false, self: true, ServiceWorkerRegistration: false, setInterval: false, setTimeout: false, TextDecoder: false, TextEncoder: false, URL: false, URLSearchParams: false, WebSocket: false, Worker: false, WorkerGlobalScope: false, XMLHttpRequest: false }; var node$2 = { __dirname: false, __filename: false, Buffer: false, clearImmediate: false, clearInterval: false, clearTimeout: false, console: false, exports: true, global: false, "Intl": false, module: false, process: false, queueMicrotask: false, require: false, setImmediate: false, setInterval: false, setTimeout: false, TextDecoder: false, TextEncoder: false, URL: false, URLSearchParams: false }; var nodeBuiltin = { Buffer: false, clearImmediate: false, clearInterval: false, clearTimeout: false, console: false, global: false, "Intl": false, process: false, queueMicrotask: false, setImmediate: false, setInterval: false, setTimeout: false, TextDecoder: false, TextEncoder: false, URL: false, URLSearchParams: false }; var commonjs$1 = { exports: true, global: false, module: false, require: false }; var amd$1 = { define: false, require: false }; var mocha$1 = { after: false, afterEach: false, before: false, beforeEach: false, context: false, describe: false, it: false, mocha: false, run: false, setup: false, specify: false, suite: false, suiteSetup: false, suiteTeardown: false, teardown: false, test: false, xcontext: false, xdescribe: false, xit: false, xspecify: false }; var jasmine$1 = { afterAll: false, afterEach: false, beforeAll: false, beforeEach: false, describe: false, expect: false, expectAsync: false, fail: false, fdescribe: false, fit: false, it: false, jasmine: false, pending: false, runs: false, spyOn: false, spyOnAllFunctions: false, spyOnProperty: false, waits: false, waitsFor: false, xdescribe: false, xit: false }; var jest$1 = { afterAll: false, afterEach: false, beforeAll: false, beforeEach: false, describe: false, expect: false, fdescribe: false, fit: false, it: false, jest: false, pit: false, require: false, test: false, xdescribe: false, xit: false, xtest: false }; var qunit$1 = { asyncTest: false, deepEqual: false, equal: false, expect: false, module: false, notDeepEqual: false, notEqual: false, notOk: false, notPropEqual: false, notStrictEqual: false, ok: false, propEqual: false, QUnit: false, raises: false, start: false, stop: false, strictEqual: false, test: false, throws: false }; var phantomjs$1 = { console: true, exports: true, phantom: true, require: true, WebPage: true }; var couch$1 = { emit: false, exports: false, getRow: false, log: false, module: false, provides: false, require: false, respond: false, send: false, start: false, sum: false }; var rhino$1 = { defineClass: false, deserialize: false, gc: false, help: false, importClass: false, importPackage: false, java: false, load: false, loadClass: false, Packages: false, print: false, quit: false, readFile: false, readUrl: false, runCommand: false, seal: false, serialize: false, spawn: false, sync: false, toint32: false, version: false }; var nashorn$1 = { __DIR__: false, __FILE__: false, __LINE__: false, com: false, edu: false, exit: false, java: false, Java: false, javafx: false, JavaImporter: false, javax: false, JSAdapter: false, load: false, loadWithNewGlobal: false, org: false, Packages: false, print: false, quit: false }; var wsh$1 = { ActiveXObject: false, CollectGarbage: false, Debug: false, Enumerator: false, GetObject: false, RuntimeObject: false, ScriptEngine: false, ScriptEngineBuildVersion: false, ScriptEngineMajorVersion: false, ScriptEngineMinorVersion: false, VBArray: false, WScript: false, WSH: false }; var jquery$1 = { $: false, jQuery: false }; var yui$1 = { YAHOO: false, YAHOO_config: false, YUI: false, YUI_config: false }; var shelljs$1 = { cat: false, cd: false, chmod: false, config: false, cp: false, dirs: false, echo: false, env: false, error: false, exec: false, exit: false, find: false, grep: false, ln: false, ls: false, mkdir: false, mv: false, popd: false, pushd: false, pwd: false, rm: false, sed: false, set: false, target: false, tempdir: false, test: false, touch: false, which: false }; var prototypejs$1 = { $: false, $$: false, $A: false, $break: false, $continue: false, $F: false, $H: false, $R: false, $w: false, Abstract: false, Ajax: false, Autocompleter: false, Builder: false, Class: false, Control: false, Draggable: false, Draggables: false, Droppables: false, Effect: false, Element: false, Enumerable: false, Event: false, Field: false, Form: false, Hash: false, Insertion: false, ObjectRange: false, PeriodicalExecuter: false, Position: false, Prototype: false, Scriptaculous: false, Selector: false, Sortable: false, SortableObserver: false, Sound: false, Template: false, Toggle: false, Try: false }; var meteor$1 = { $: false, Accounts: false, AccountsClient: false, AccountsCommon: false, AccountsServer: false, App: false, Assets: false, Blaze: false, check: false, Cordova: false, DDP: false, DDPRateLimiter: false, DDPServer: false, Deps: false, EJSON: false, Email: false, HTTP: false, Log: false, Match: false, Meteor: false, Mongo: false, MongoInternals: false, Npm: false, Package: false, Plugin: false, process: false, Random: false, ReactiveDict: false, ReactiveVar: false, Router: false, ServiceConfiguration: false, Session: false, share: false, Spacebars: false, Template: false, Tinytest: false, Tracker: false, UI: false, Utils: false, WebApp: false, WebAppInternals: false }; var mongo$1 = { _isWindows: false, _rand: false, BulkWriteResult: false, cat: false, cd: false, connect: false, db: false, getHostName: false, getMemInfo: false, hostname: false, ISODate: false, listFiles: false, load: false, ls: false, md5sumFile: false, mkdir: false, Mongo: false, NumberInt: false, NumberLong: false, ObjectId: false, PlanCache: false, print: false, printjson: false, pwd: false, quit: false, removeFile: false, rs: false, sh: false, UUID: false, version: false, WriteResult: false }; var applescript$1 = { $: false, Application: false, Automation: false, console: false, delay: false, Library: false, ObjC: false, ObjectSpecifier: false, Path: false, Progress: false, Ref: false }; var serviceworker$1 = { addEventListener: false, applicationCache: false, atob: false, Blob: false, BroadcastChannel: false, btoa: false, Cache: false, caches: false, CacheStorage: false, clearInterval: false, clearTimeout: false, Client: false, clients: false, Clients: false, close: true, console: false, ExtendableEvent: false, ExtendableMessageEvent: false, fetch: false, FetchEvent: false, FileReaderSync: false, FormData: false, Headers: false, IDBCursor: false, IDBCursorWithValue: false, IDBDatabase: false, IDBFactory: false, IDBIndex: false, IDBKeyRange: false, IDBObjectStore: false, IDBOpenDBRequest: false, IDBRequest: false, IDBTransaction: false, IDBVersionChangeEvent: false, ImageData: false, importScripts: false, indexedDB: false, location: false, MessageChannel: false, MessagePort: false, name: false, navigator: false, Notification: false, onclose: true, onconnect: true, onerror: true, onfetch: true, oninstall: true, onlanguagechange: true, onmessage: true, onmessageerror: true, onnotificationclick: true, onnotificationclose: true, onoffline: true, ononline: true, onpush: true, onpushsubscriptionchange: true, onrejectionhandled: true, onsync: true, onunhandledrejection: true, performance: false, Performance: false, PerformanceEntry: false, PerformanceMark: false, PerformanceMeasure: false, PerformanceNavigation: false, PerformanceResourceTiming: false, PerformanceTiming: false, postMessage: true, "Promise": false, queueMicrotask: false, registration: false, removeEventListener: false, Request: false, Response: false, self: false, ServiceWorker: false, ServiceWorkerContainer: false, ServiceWorkerGlobalScope: false, ServiceWorkerMessageEvent: false, ServiceWorkerRegistration: false, setInterval: false, setTimeout: false, skipWaiting: false, TextDecoder: false, TextEncoder: false, URL: false, URLSearchParams: false, WebSocket: false, WindowClient: false, Worker: false, WorkerGlobalScope: false, XMLHttpRequest: false }; var atomtest$1 = { advanceClock: false, atom: false, fakeClearInterval: false, fakeClearTimeout: false, fakeSetInterval: false, fakeSetTimeout: false, resetTimeouts: false, waitsForPromise: false }; var embertest$1 = { andThen: false, click: false, currentPath: false, currentRouteName: false, currentURL: false, fillIn: false, find: false, findAll: false, findWithAssert: false, keyEvent: false, pauseTest: false, resumeTest: false, triggerEvent: false, visit: false, wait: false }; var protractor$1 = { $: false, $$: false, browser: false, by: false, By: false, DartObject: false, element: false, protractor: false }; var webextensions$1 = { browser: false, chrome: false, opr: false }; var greasemonkey$1 = { cloneInto: false, createObjectIn: false, exportFunction: false, GM: false, GM_addStyle: false, GM_addValueChangeListener: false, GM_deleteValue: false, GM_download: false, GM_getResourceText: false, GM_getResourceURL: false, GM_getTab: false, GM_getTabs: false, GM_getValue: false, GM_info: false, GM_listValues: false, GM_log: false, GM_notification: false, GM_openInTab: false, GM_registerMenuCommand: false, GM_removeValueChangeListener: false, GM_saveTab: false, GM_setClipboard: false, GM_setValue: false, GM_unregisterMenuCommand: false, GM_xmlhttpRequest: false, unsafeWindow: false }; var devtools$1 = { $: false, $_: false, $$: false, $0: false, $1: false, $2: false, $3: false, $4: false, $x: false, chrome: false, clear: false, copy: false, debug: false, dir: false, dirxml: false, getEventListeners: false, inspect: false, keys: false, monitor: false, monitorEvents: false, profile: false, profileEnd: false, queryObjects: false, table: false, undebug: false, unmonitor: false, unmonitorEvents: false, values: false }; var require$$0$b = { builtin: builtin$1, es5: es5$1, es2015: es2015$1, es2017: es2017$1, es2020: es2020, es2021: es2021, browser: browser$3, worker: worker$1, node: node$2, nodeBuiltin: nodeBuiltin, commonjs: commonjs$1, amd: amd$1, mocha: mocha$1, jasmine: jasmine$1, jest: jest$1, qunit: qunit$1, phantomjs: phantomjs$1, couch: couch$1, rhino: rhino$1, nashorn: nashorn$1, wsh: wsh$1, jquery: jquery$1, yui: yui$1, shelljs: shelljs$1, prototypejs: prototypejs$1, meteor: meteor$1, mongo: mongo$1, applescript: applescript$1, serviceworker: serviceworker$1, atomtest: atomtest$1, embertest: embertest$1, protractor: protractor$1, "shared-node-browser": { clearInterval: false, clearTimeout: false, console: false, setInterval: false, setTimeout: false, URL: false, URLSearchParams: false }, webextensions: webextensions$1, greasemonkey: greasemonkey$1, devtools: devtools$1 }; var globalsBABEL_8_BREAKINGTrue; var hasRequiredGlobalsBABEL_8_BREAKINGTrue; function requireGlobalsBABEL_8_BREAKINGTrue() { if (hasRequiredGlobalsBABEL_8_BREAKINGTrue) return globalsBABEL_8_BREAKINGTrue; hasRequiredGlobalsBABEL_8_BREAKINGTrue = 1; globalsBABEL_8_BREAKINGTrue = require$$0$b; return globalsBABEL_8_BREAKINGTrue; } var builtin = { "Array": false, "ArrayBuffer": false, Atomics: false, BigInt: false, BigInt64Array: false, BigUint64Array: false, "Boolean": false, constructor: false, "DataView": false, "Date": false, "decodeURI": false, "decodeURIComponent": false, "encodeURI": false, "encodeURIComponent": false, "Error": false, "escape": false, "eval": false, "EvalError": false, "Float32Array": false, "Float64Array": false, "Function": false, globalThis: false, hasOwnProperty: false, "Infinity": false, "Int16Array": false, "Int32Array": false, "Int8Array": false, "isFinite": false, "isNaN": false, isPrototypeOf: false, "JSON": false, "Map": false, "Math": false, "NaN": false, "Number": false, "Object": false, "parseFloat": false, "parseInt": false, "Promise": false, propertyIsEnumerable: false, "Proxy": false, "RangeError": false, "ReferenceError": false, "Reflect": false, "RegExp": false, "Set": false, SharedArrayBuffer: false, "String": false, "Symbol": false, "SyntaxError": false, toLocaleString: false, toString: false, "TypeError": false, "Uint16Array": false, "Uint32Array": false, "Uint8Array": false, "Uint8ClampedArray": false, "undefined": false, "unescape": false, "URIError": false, valueOf: false, "WeakMap": false, "WeakSet": false }; var es5 = { "Array": false, "Boolean": false, constructor: false, "Date": false, "decodeURI": false, "decodeURIComponent": false, "encodeURI": false, "encodeURIComponent": false, "Error": false, "escape": false, "eval": false, "EvalError": false, "Function": false, hasOwnProperty: false, "Infinity": false, "isFinite": false, "isNaN": false, isPrototypeOf: false, "JSON": false, "Math": false, "NaN": false, "Number": false, "Object": false, "parseFloat": false, "parseInt": false, propertyIsEnumerable: false, "RangeError": false, "ReferenceError": false, "RegExp": false, "String": false, "SyntaxError": false, toLocaleString: false, toString: false, "TypeError": false, "undefined": false, "unescape": false, "URIError": false, valueOf: false }; var es2015 = { "Array": false, "ArrayBuffer": false, "Boolean": false, constructor: false, "DataView": false, "Date": false, "decodeURI": false, "decodeURIComponent": false, "encodeURI": false, "encodeURIComponent": false, "Error": false, "escape": false, "eval": false, "EvalError": false, "Float32Array": false, "Float64Array": false, "Function": false, hasOwnProperty: false, "Infinity": false, "Int16Array": false, "Int32Array": false, "Int8Array": false, "isFinite": false, "isNaN": false, isPrototypeOf: false, "JSON": false, "Map": false, "Math": false, "NaN": false, "Number": false, "Object": false, "parseFloat": false, "parseInt": false, "Promise": false, propertyIsEnumerable: false, "Proxy": false, "RangeError": false, "ReferenceError": false, "Reflect": false, "RegExp": false, "Set": false, "String": false, "Symbol": false, "SyntaxError": false, toLocaleString: false, toString: false, "TypeError": false, "Uint16Array": false, "Uint32Array": false, "Uint8Array": false, "Uint8ClampedArray": false, "undefined": false, "unescape": false, "URIError": false, valueOf: false, "WeakMap": false, "WeakSet": false }; var es2017 = { "Array": false, "ArrayBuffer": false, Atomics: false, "Boolean": false, constructor: false, "DataView": false, "Date": false, "decodeURI": false, "decodeURIComponent": false, "encodeURI": false, "encodeURIComponent": false, "Error": false, "escape": false, "eval": false, "EvalError": false, "Float32Array": false, "Float64Array": false, "Function": false, hasOwnProperty: false, "Infinity": false, "Int16Array": false, "Int32Array": false, "Int8Array": false, "isFinite": false, "isNaN": false, isPrototypeOf: false, "JSON": false, "Map": false, "Math": false, "NaN": false, "Number": false, "Object": false, "parseFloat": false, "parseInt": false, "Promise": false, propertyIsEnumerable: false, "Proxy": false, "RangeError": false, "ReferenceError": false, "Reflect": false, "RegExp": false, "Set": false, SharedArrayBuffer: false, "String": false, "Symbol": false, "SyntaxError": false, toLocaleString: false, toString: false, "TypeError": false, "Uint16Array": false, "Uint32Array": false, "Uint8Array": false, "Uint8ClampedArray": false, "undefined": false, "unescape": false, "URIError": false, valueOf: false, "WeakMap": false, "WeakSet": false }; var browser$2 = { AbortController: false, AbortSignal: false, addEventListener: false, alert: false, AnalyserNode: false, Animation: false, AnimationEffectReadOnly: false, AnimationEffectTiming: false, AnimationEffectTimingReadOnly: false, AnimationEvent: false, AnimationPlaybackEvent: false, AnimationTimeline: false, applicationCache: false, ApplicationCache: false, ApplicationCacheErrorEvent: false, atob: false, Attr: false, Audio: false, AudioBuffer: false, AudioBufferSourceNode: false, AudioContext: false, AudioDestinationNode: false, AudioListener: false, AudioNode: false, AudioParam: false, AudioProcessingEvent: false, AudioScheduledSourceNode: false, "AudioWorkletGlobalScope ": false, AudioWorkletNode: false, AudioWorkletProcessor: false, BarProp: false, BaseAudioContext: false, BatteryManager: false, BeforeUnloadEvent: false, BiquadFilterNode: false, Blob: false, BlobEvent: false, blur: false, BroadcastChannel: false, btoa: false, BudgetService: false, ByteLengthQueuingStrategy: false, Cache: false, caches: false, CacheStorage: false, cancelAnimationFrame: false, cancelIdleCallback: false, CanvasCaptureMediaStreamTrack: false, CanvasGradient: false, CanvasPattern: false, CanvasRenderingContext2D: false, ChannelMergerNode: false, ChannelSplitterNode: false, CharacterData: false, clearInterval: false, clearTimeout: false, clientInformation: false, ClipboardEvent: false, close: false, closed: false, CloseEvent: false, Comment: false, CompositionEvent: false, confirm: false, console: false, ConstantSourceNode: false, ConvolverNode: false, CountQueuingStrategy: false, createImageBitmap: false, Credential: false, CredentialsContainer: false, crypto: false, Crypto: false, CryptoKey: false, CSS: false, CSSConditionRule: false, CSSFontFaceRule: false, CSSGroupingRule: false, CSSImportRule: false, CSSKeyframeRule: false, CSSKeyframesRule: false, CSSMediaRule: false, CSSNamespaceRule: false, CSSPageRule: false, CSSRule: false, CSSRuleList: false, CSSStyleDeclaration: false, CSSStyleRule: false, CSSStyleSheet: false, CSSSupportsRule: false, CustomElementRegistry: false, customElements: false, CustomEvent: false, DataTransfer: false, DataTransferItem: false, DataTransferItemList: false, defaultstatus: false, defaultStatus: false, DelayNode: false, DeviceMotionEvent: false, DeviceOrientationEvent: false, devicePixelRatio: false, dispatchEvent: false, document: false, Document: false, DocumentFragment: false, DocumentType: false, DOMError: false, DOMException: false, DOMImplementation: false, DOMMatrix: false, DOMMatrixReadOnly: false, DOMParser: false, DOMPoint: false, DOMPointReadOnly: false, DOMQuad: false, DOMRect: false, DOMRectReadOnly: false, DOMStringList: false, DOMStringMap: false, DOMTokenList: false, DragEvent: false, DynamicsCompressorNode: false, Element: false, ErrorEvent: false, event: false, Event: false, EventSource: false, EventTarget: false, external: false, fetch: false, File: false, FileList: false, FileReader: false, find: false, focus: false, FocusEvent: false, FontFace: false, FontFaceSetLoadEvent: false, FormData: false, frameElement: false, frames: false, GainNode: false, Gamepad: false, GamepadButton: false, GamepadEvent: false, getComputedStyle: false, getSelection: false, HashChangeEvent: false, Headers: false, history: false, History: false, HTMLAllCollection: false, HTMLAnchorElement: false, HTMLAreaElement: false, HTMLAudioElement: false, HTMLBaseElement: false, HTMLBodyElement: false, HTMLBRElement: false, HTMLButtonElement: false, HTMLCanvasElement: false, HTMLCollection: false, HTMLContentElement: false, HTMLDataElement: false, HTMLDataListElement: false, HTMLDetailsElement: false, HTMLDialogElement: false, HTMLDirectoryElement: false, HTMLDivElement: false, HTMLDListElement: false, HTMLDocument: false, HTMLElement: false, HTMLEmbedElement: false, HTMLFieldSetElement: false, HTMLFontElement: false, HTMLFormControlsCollection: false, HTMLFormElement: false, HTMLFrameElement: false, HTMLFrameSetElement: false, HTMLHeadElement: false, HTMLHeadingElement: false, HTMLHRElement: false, HTMLHtmlElement: false, HTMLIFrameElement: false, HTMLImageElement: false, HTMLInputElement: false, HTMLLabelElement: false, HTMLLegendElement: false, HTMLLIElement: false, HTMLLinkElement: false, HTMLMapElement: false, HTMLMarqueeElement: false, HTMLMediaElement: false, HTMLMenuElement: false, HTMLMetaElement: false, HTMLMeterElement: false, HTMLModElement: false, HTMLObjectElement: false, HTMLOListElement: false, HTMLOptGroupElement: false, HTMLOptionElement: false, HTMLOptionsCollection: false, HTMLOutputElement: false, HTMLParagraphElement: false, HTMLParamElement: false, HTMLPictureElement: false, HTMLPreElement: false, HTMLProgressElement: false, HTMLQuoteElement: false, HTMLScriptElement: false, HTMLSelectElement: false, HTMLShadowElement: false, HTMLSlotElement: false, HTMLSourceElement: false, HTMLSpanElement: false, HTMLStyleElement: false, HTMLTableCaptionElement: false, HTMLTableCellElement: false, HTMLTableColElement: false, HTMLTableElement: false, HTMLTableRowElement: false, HTMLTableSectionElement: false, HTMLTemplateElement: false, HTMLTextAreaElement: false, HTMLTimeElement: false, HTMLTitleElement: false, HTMLTrackElement: false, HTMLUListElement: false, HTMLUnknownElement: false, HTMLVideoElement: false, IDBCursor: false, IDBCursorWithValue: false, IDBDatabase: false, IDBFactory: false, IDBIndex: false, IDBKeyRange: false, IDBObjectStore: false, IDBOpenDBRequest: false, IDBRequest: false, IDBTransaction: false, IDBVersionChangeEvent: false, IdleDeadline: false, IIRFilterNode: false, Image: false, ImageBitmap: false, ImageBitmapRenderingContext: false, ImageCapture: false, ImageData: false, indexedDB: false, innerHeight: false, innerWidth: false, InputEvent: false, IntersectionObserver: false, IntersectionObserverEntry: false, "Intl": false, isSecureContext: false, KeyboardEvent: false, KeyframeEffect: false, KeyframeEffectReadOnly: false, length: false, localStorage: false, location: true, Location: false, locationbar: false, matchMedia: false, MediaDeviceInfo: false, MediaDevices: false, MediaElementAudioSourceNode: false, MediaEncryptedEvent: false, MediaError: false, MediaKeyMessageEvent: false, MediaKeySession: false, MediaKeyStatusMap: false, MediaKeySystemAccess: false, MediaList: false, MediaQueryList: false, MediaQueryListEvent: false, MediaRecorder: false, MediaSettingsRange: false, MediaSource: false, MediaStream: false, MediaStreamAudioDestinationNode: false, MediaStreamAudioSourceNode: false, MediaStreamEvent: false, MediaStreamTrack: false, MediaStreamTrackEvent: false, menubar: false, MessageChannel: false, MessageEvent: false, MessagePort: false, MIDIAccess: false, MIDIConnectionEvent: false, MIDIInput: false, MIDIInputMap: false, MIDIMessageEvent: false, MIDIOutput: false, MIDIOutputMap: false, MIDIPort: false, MimeType: false, MimeTypeArray: false, MouseEvent: false, moveBy: false, moveTo: false, MutationEvent: false, MutationObserver: false, MutationRecord: false, name: false, NamedNodeMap: false, NavigationPreloadManager: false, navigator: false, Navigator: false, NetworkInformation: false, Node: false, NodeFilter: false, NodeIterator: false, NodeList: false, Notification: false, OfflineAudioCompletionEvent: false, OfflineAudioContext: false, offscreenBuffering: false, OffscreenCanvas: true, onabort: true, onafterprint: true, onanimationend: true, onanimationiteration: true, onanimationstart: true, onappinstalled: true, onauxclick: true, onbeforeinstallprompt: true, onbeforeprint: true, onbeforeunload: true, onblur: true, oncancel: true, oncanplay: true, oncanplaythrough: true, onchange: true, onclick: true, onclose: true, oncontextmenu: true, oncuechange: true, ondblclick: true, ondevicemotion: true, ondeviceorientation: true, ondeviceorientationabsolute: true, ondrag: true, ondragend: true, ondragenter: true, ondragleave: true, ondragover: true, ondragstart: true, ondrop: true, ondurationchange: true, onemptied: true, onended: true, onerror: true, onfocus: true, ongotpointercapture: true, onhashchange: true, oninput: true, oninvalid: true, onkeydown: true, onkeypress: true, onkeyup: true, onlanguagechange: true, onload: true, onloadeddata: true, onloadedmetadata: true, onloadstart: true, onlostpointercapture: true, onmessage: true, onmessageerror: true, onmousedown: true, onmouseenter: true, onmouseleave: true, onmousemove: true, onmouseout: true, onmouseover: true, onmouseup: true, onmousewheel: true, onoffline: true, ononline: true, onpagehide: true, onpageshow: true, onpause: true, onplay: true, onplaying: true, onpointercancel: true, onpointerdown: true, onpointerenter: true, onpointerleave: true, onpointermove: true, onpointerout: true, onpointerover: true, onpointerup: true, onpopstate: true, onprogress: true, onratechange: true, onrejectionhandled: true, onreset: true, onresize: true, onscroll: true, onsearch: true, onseeked: true, onseeking: true, onselect: true, onstalled: true, onstorage: true, onsubmit: true, onsuspend: true, ontimeupdate: true, ontoggle: true, ontransitionend: true, onunhandledrejection: true, onunload: true, onvolumechange: true, onwaiting: true, onwheel: true, open: false, openDatabase: false, opener: false, Option: false, origin: false, OscillatorNode: false, outerHeight: false, outerWidth: false, PageTransitionEvent: false, pageXOffset: false, pageYOffset: false, PannerNode: false, parent: false, Path2D: false, PaymentAddress: false, PaymentRequest: false, PaymentRequestUpdateEvent: false, PaymentResponse: false, performance: false, Performance: false, PerformanceEntry: false, PerformanceLongTaskTiming: false, PerformanceMark: false, PerformanceMeasure: false, PerformanceNavigation: false, PerformanceNavigationTiming: false, PerformanceObserver: false, PerformanceObserverEntryList: false, PerformancePaintTiming: false, PerformanceResourceTiming: false, PerformanceTiming: false, PeriodicWave: false, Permissions: false, PermissionStatus: false, personalbar: false, PhotoCapabilities: false, Plugin: false, PluginArray: false, PointerEvent: false, PopStateEvent: false, postMessage: false, Presentation: false, PresentationAvailability: false, PresentationConnection: false, PresentationConnectionAvailableEvent: false, PresentationConnectionCloseEvent: false, PresentationConnectionList: false, PresentationReceiver: false, PresentationRequest: false, print: false, ProcessingInstruction: false, ProgressEvent: false, PromiseRejectionEvent: false, prompt: false, PushManager: false, PushSubscription: false, PushSubscriptionOptions: false, queueMicrotask: false, RadioNodeList: false, Range: false, ReadableStream: false, registerProcessor: false, RemotePlayback: false, removeEventListener: false, Request: false, requestAnimationFrame: false, requestIdleCallback: false, resizeBy: false, ResizeObserver: false, ResizeObserverEntry: false, resizeTo: false, Response: false, RTCCertificate: false, RTCDataChannel: false, RTCDataChannelEvent: false, RTCDtlsTransport: false, RTCIceCandidate: false, RTCIceGatherer: false, RTCIceTransport: false, RTCPeerConnection: false, RTCPeerConnectionIceEvent: false, RTCRtpContributingSource: false, RTCRtpReceiver: false, RTCRtpSender: false, RTCSctpTransport: false, RTCSessionDescription: false, RTCStatsReport: false, RTCTrackEvent: false, screen: false, Screen: false, screenLeft: false, ScreenOrientation: false, screenTop: false, screenX: false, screenY: false, ScriptProcessorNode: false, scroll: false, scrollbars: false, scrollBy: false, scrollTo: false, scrollX: false, scrollY: false, SecurityPolicyViolationEvent: false, Selection: false, self: false, ServiceWorker: false, ServiceWorkerContainer: false, ServiceWorkerRegistration: false, sessionStorage: false, setInterval: false, setTimeout: false, ShadowRoot: false, SharedWorker: false, SourceBuffer: false, SourceBufferList: false, speechSynthesis: false, SpeechSynthesisEvent: false, SpeechSynthesisUtterance: false, StaticRange: false, status: false, statusbar: false, StereoPannerNode: false, stop: false, Storage: false, StorageEvent: false, StorageManager: false, styleMedia: false, StyleSheet: false, StyleSheetList: false, SubtleCrypto: false, SVGAElement: false, SVGAngle: false, SVGAnimatedAngle: false, SVGAnimatedBoolean: false, SVGAnimatedEnumeration: false, SVGAnimatedInteger: false, SVGAnimatedLength: false, SVGAnimatedLengthList: false, SVGAnimatedNumber: false, SVGAnimatedNumberList: false, SVGAnimatedPreserveAspectRatio: false, SVGAnimatedRect: false, SVGAnimatedString: false, SVGAnimatedTransformList: false, SVGAnimateElement: false, SVGAnimateMotionElement: false, SVGAnimateTransformElement: false, SVGAnimationElement: false, SVGCircleElement: false, SVGClipPathElement: false, SVGComponentTransferFunctionElement: false, SVGDefsElement: false, SVGDescElement: false, SVGDiscardElement: false, SVGElement: false, SVGEllipseElement: false, SVGFEBlendElement: false, SVGFEColorMatrixElement: false, SVGFEComponentTransferElement: false, SVGFECompositeElement: false, SVGFEConvolveMatrixElement: false, SVGFEDiffuseLightingElement: false, SVGFEDisplacementMapElement: false, SVGFEDistantLightElement: false, SVGFEDropShadowElement: false, SVGFEFloodElement: false, SVGFEFuncAElement: false, SVGFEFuncBElement: false, SVGFEFuncGElement: false, SVGFEFuncRElement: false, SVGFEGaussianBlurElement: false, SVGFEImageElement: false, SVGFEMergeElement: false, SVGFEMergeNodeElement: false, SVGFEMorphologyElement: false, SVGFEOffsetElement: false, SVGFEPointLightElement: false, SVGFESpecularLightingElement: false, SVGFESpotLightElement: false, SVGFETileElement: false, SVGFETurbulenceElement: false, SVGFilterElement: false, SVGForeignObjectElement: false, SVGGElement: false, SVGGeometryElement: false, SVGGradientElement: false, SVGGraphicsElement: false, SVGImageElement: false, SVGLength: false, SVGLengthList: false, SVGLinearGradientElement: false, SVGLineElement: false, SVGMarkerElement: false, SVGMaskElement: false, SVGMatrix: false, SVGMetadataElement: false, SVGMPathElement: false, SVGNumber: false, SVGNumberList: false, SVGPathElement: false, SVGPatternElement: false, SVGPoint: false, SVGPointList: false, SVGPolygonElement: false, SVGPolylineElement: false, SVGPreserveAspectRatio: false, SVGRadialGradientElement: false, SVGRect: false, SVGRectElement: false, SVGScriptElement: false, SVGSetElement: false, SVGStopElement: false, SVGStringList: false, SVGStyleElement: false, SVGSVGElement: false, SVGSwitchElement: false, SVGSymbolElement: false, SVGTextContentElement: false, SVGTextElement: false, SVGTextPathElement: false, SVGTextPositioningElement: false, SVGTitleElement: false, SVGTransform: false, SVGTransformList: false, SVGTSpanElement: false, SVGUnitTypes: false, SVGUseElement: false, SVGViewElement: false, TaskAttributionTiming: false, Text: false, TextDecoder: false, TextEncoder: false, TextEvent: false, TextMetrics: false, TextTrack: false, TextTrackCue: false, TextTrackCueList: false, TextTrackList: false, TimeRanges: false, toolbar: false, top: false, Touch: false, TouchEvent: false, TouchList: false, TrackEvent: false, TransitionEvent: false, TreeWalker: false, UIEvent: false, URL: false, URLSearchParams: false, ValidityState: false, visualViewport: false, VisualViewport: false, VTTCue: false, WaveShaperNode: false, WebAssembly: false, WebGL2RenderingContext: false, WebGLActiveInfo: false, WebGLBuffer: false, WebGLContextEvent: false, WebGLFramebuffer: false, WebGLProgram: false, WebGLQuery: false, WebGLRenderbuffer: false, WebGLRenderingContext: false, WebGLSampler: false, WebGLShader: false, WebGLShaderPrecisionFormat: false, WebGLSync: false, WebGLTexture: false, WebGLTransformFeedback: false, WebGLUniformLocation: false, WebGLVertexArrayObject: false, WebSocket: false, WheelEvent: false, window: false, Window: false, Worker: false, WritableStream: false, XMLDocument: false, XMLHttpRequest: false, XMLHttpRequestEventTarget: false, XMLHttpRequestUpload: false, XMLSerializer: false, XPathEvaluator: false, XPathExpression: false, XPathResult: false, XSLTProcessor: false }; var worker = { addEventListener: false, applicationCache: false, atob: false, Blob: false, BroadcastChannel: false, btoa: false, Cache: false, caches: false, clearInterval: false, clearTimeout: false, close: true, console: false, fetch: false, FileReaderSync: false, FormData: false, Headers: false, IDBCursor: false, IDBCursorWithValue: false, IDBDatabase: false, IDBFactory: false, IDBIndex: false, IDBKeyRange: false, IDBObjectStore: false, IDBOpenDBRequest: false, IDBRequest: false, IDBTransaction: false, IDBVersionChangeEvent: false, ImageData: false, importScripts: true, indexedDB: false, location: false, MessageChannel: false, MessagePort: false, name: false, navigator: false, Notification: false, onclose: true, onconnect: true, onerror: true, onlanguagechange: true, onmessage: true, onoffline: true, ononline: true, onrejectionhandled: true, onunhandledrejection: true, performance: false, Performance: false, PerformanceEntry: false, PerformanceMark: false, PerformanceMeasure: false, PerformanceNavigation: false, PerformanceResourceTiming: false, PerformanceTiming: false, postMessage: true, "Promise": false, queueMicrotask: false, removeEventListener: false, Request: false, Response: false, self: true, ServiceWorkerRegistration: false, setInterval: false, setTimeout: false, TextDecoder: false, TextEncoder: false, URL: false, URLSearchParams: false, WebSocket: false, Worker: false, WorkerGlobalScope: false, XMLHttpRequest: false }; var node$1 = { __dirname: false, __filename: false, Buffer: false, clearImmediate: false, clearInterval: false, clearTimeout: false, console: false, exports: true, global: false, "Intl": false, module: false, process: false, queueMicrotask: false, require: false, setImmediate: false, setInterval: false, setTimeout: false, TextDecoder: false, TextEncoder: false, URL: false, URLSearchParams: false }; var commonjs = { exports: true, global: false, module: false, require: false }; var amd = { define: false, require: false }; var mocha = { after: false, afterEach: false, before: false, beforeEach: false, context: false, describe: false, it: false, mocha: false, run: false, setup: false, specify: false, suite: false, suiteSetup: false, suiteTeardown: false, teardown: false, test: false, xcontext: false, xdescribe: false, xit: false, xspecify: false }; var jasmine = { afterAll: false, afterEach: false, beforeAll: false, beforeEach: false, describe: false, expect: false, fail: false, fdescribe: false, fit: false, it: false, jasmine: false, pending: false, runs: false, spyOn: false, spyOnProperty: false, waits: false, waitsFor: false, xdescribe: false, xit: false }; var jest = { afterAll: false, afterEach: false, beforeAll: false, beforeEach: false, describe: false, expect: false, fdescribe: false, fit: false, it: false, jest: false, pit: false, require: false, test: false, xdescribe: false, xit: false, xtest: false }; var qunit = { asyncTest: false, deepEqual: false, equal: false, expect: false, module: false, notDeepEqual: false, notEqual: false, notOk: false, notPropEqual: false, notStrictEqual: false, ok: false, propEqual: false, QUnit: false, raises: false, start: false, stop: false, strictEqual: false, test: false, throws: false }; var phantomjs = { console: true, exports: true, phantom: true, require: true, WebPage: true }; var couch = { emit: false, exports: false, getRow: false, log: false, module: false, provides: false, require: false, respond: false, send: false, start: false, sum: false }; var rhino = { defineClass: false, deserialize: false, gc: false, help: false, importClass: false, importPackage: false, java: false, load: false, loadClass: false, Packages: false, print: false, quit: false, readFile: false, readUrl: false, runCommand: false, seal: false, serialize: false, spawn: false, sync: false, toint32: false, version: false }; var nashorn = { __DIR__: false, __FILE__: false, __LINE__: false, com: false, edu: false, exit: false, java: false, Java: false, javafx: false, JavaImporter: false, javax: false, JSAdapter: false, load: false, loadWithNewGlobal: false, org: false, Packages: false, print: false, quit: false }; var wsh = { ActiveXObject: true, Enumerator: true, GetObject: true, ScriptEngine: true, ScriptEngineBuildVersion: true, ScriptEngineMajorVersion: true, ScriptEngineMinorVersion: true, VBArray: true, WScript: true, WSH: true, XDomainRequest: true }; var jquery = { $: false, jQuery: false }; var yui = { YAHOO: false, YAHOO_config: false, YUI: false, YUI_config: false }; var shelljs = { cat: false, cd: false, chmod: false, config: false, cp: false, dirs: false, echo: false, env: false, error: false, exec: false, exit: false, find: false, grep: false, ln: false, ls: false, mkdir: false, mv: false, popd: false, pushd: false, pwd: false, rm: false, sed: false, set: false, target: false, tempdir: false, test: false, touch: false, which: false }; var prototypejs = { $: false, $$: false, $A: false, $break: false, $continue: false, $F: false, $H: false, $R: false, $w: false, Abstract: false, Ajax: false, Autocompleter: false, Builder: false, Class: false, Control: false, Draggable: false, Draggables: false, Droppables: false, Effect: false, Element: false, Enumerable: false, Event: false, Field: false, Form: false, Hash: false, Insertion: false, ObjectRange: false, PeriodicalExecuter: false, Position: false, Prototype: false, Scriptaculous: false, Selector: false, Sortable: false, SortableObserver: false, Sound: false, Template: false, Toggle: false, Try: false }; var meteor = { _: false, $: false, Accounts: false, AccountsClient: false, AccountsCommon: false, AccountsServer: false, App: false, Assets: false, Blaze: false, check: false, Cordova: false, DDP: false, DDPRateLimiter: false, DDPServer: false, Deps: false, EJSON: false, Email: false, HTTP: false, Log: false, Match: false, Meteor: false, Mongo: false, MongoInternals: false, Npm: false, Package: false, Plugin: false, process: false, Random: false, ReactiveDict: false, ReactiveVar: false, Router: false, ServiceConfiguration: false, Session: false, share: false, Spacebars: false, Template: false, Tinytest: false, Tracker: false, UI: false, Utils: false, WebApp: false, WebAppInternals: false }; var mongo = { _isWindows: false, _rand: false, BulkWriteResult: false, cat: false, cd: false, connect: false, db: false, getHostName: false, getMemInfo: false, hostname: false, ISODate: false, listFiles: false, load: false, ls: false, md5sumFile: false, mkdir: false, Mongo: false, NumberInt: false, NumberLong: false, ObjectId: false, PlanCache: false, print: false, printjson: false, pwd: false, quit: false, removeFile: false, rs: false, sh: false, UUID: false, version: false, WriteResult: false }; var applescript = { $: false, Application: false, Automation: false, console: false, delay: false, Library: false, ObjC: false, ObjectSpecifier: false, Path: false, Progress: false, Ref: false }; var serviceworker = { addEventListener: false, applicationCache: false, atob: false, Blob: false, BroadcastChannel: false, btoa: false, Cache: false, caches: false, CacheStorage: false, clearInterval: false, clearTimeout: false, Client: false, clients: false, Clients: false, close: true, console: false, ExtendableEvent: false, ExtendableMessageEvent: false, fetch: false, FetchEvent: false, FileReaderSync: false, FormData: false, Headers: false, IDBCursor: false, IDBCursorWithValue: false, IDBDatabase: false, IDBFactory: false, IDBIndex: false, IDBKeyRange: false, IDBObjectStore: false, IDBOpenDBRequest: false, IDBRequest: false, IDBTransaction: false, IDBVersionChangeEvent: false, ImageData: false, importScripts: false, indexedDB: false, location: false, MessageChannel: false, MessagePort: false, name: false, navigator: false, Notification: false, onclose: true, onconnect: true, onerror: true, onfetch: true, oninstall: true, onlanguagechange: true, onmessage: true, onmessageerror: true, onnotificationclick: true, onnotificationclose: true, onoffline: true, ononline: true, onpush: true, onpushsubscriptionchange: true, onrejectionhandled: true, onsync: true, onunhandledrejection: true, performance: false, Performance: false, PerformanceEntry: false, PerformanceMark: false, PerformanceMeasure: false, PerformanceNavigation: false, PerformanceResourceTiming: false, PerformanceTiming: false, postMessage: true, "Promise": false, queueMicrotask: false, registration: false, removeEventListener: false, Request: false, Response: false, self: false, ServiceWorker: false, ServiceWorkerContainer: false, ServiceWorkerGlobalScope: false, ServiceWorkerMessageEvent: false, ServiceWorkerRegistration: false, setInterval: false, setTimeout: false, skipWaiting: false, TextDecoder: false, TextEncoder: false, URL: false, URLSearchParams: false, WebSocket: false, WindowClient: false, Worker: false, WorkerGlobalScope: false, XMLHttpRequest: false }; var atomtest = { advanceClock: false, fakeClearInterval: false, fakeClearTimeout: false, fakeSetInterval: false, fakeSetTimeout: false, resetTimeouts: false, waitsForPromise: false }; var embertest = { andThen: false, click: false, currentPath: false, currentRouteName: false, currentURL: false, fillIn: false, find: false, findAll: false, findWithAssert: false, keyEvent: false, pauseTest: false, resumeTest: false, triggerEvent: false, visit: false, wait: false }; var protractor = { $: false, $$: false, browser: false, by: false, By: false, DartObject: false, element: false, protractor: false }; var webextensions = { browser: false, chrome: false, opr: false }; var greasemonkey = { cloneInto: false, createObjectIn: false, exportFunction: false, GM: false, GM_addStyle: false, GM_deleteValue: false, GM_getResourceText: false, GM_getResourceURL: false, GM_getValue: false, GM_info: false, GM_listValues: false, GM_log: false, GM_openInTab: false, GM_registerMenuCommand: false, GM_setClipboard: false, GM_setValue: false, GM_xmlhttpRequest: false, unsafeWindow: false }; var devtools = { $: false, $_: false, $$: false, $0: false, $1: false, $2: false, $3: false, $4: false, $x: false, chrome: false, clear: false, copy: false, debug: false, dir: false, dirxml: false, getEventListeners: false, inspect: false, keys: false, monitor: false, monitorEvents: false, profile: false, profileEnd: false, queryObjects: false, table: false, undebug: false, unmonitor: false, unmonitorEvents: false, values: false }; var require$$0$a = { builtin: builtin, es5: es5, es2015: es2015, es2017: es2017, browser: browser$2, worker: worker, node: node$1, commonjs: commonjs, amd: amd, mocha: mocha, jasmine: jasmine, jest: jest, qunit: qunit, phantomjs: phantomjs, couch: couch, rhino: rhino, nashorn: nashorn, wsh: wsh, jquery: jquery, yui: yui, shelljs: shelljs, prototypejs: prototypejs, meteor: meteor, mongo: mongo, applescript: applescript, serviceworker: serviceworker, atomtest: atomtest, embertest: embertest, protractor: protractor, "shared-node-browser": { clearInterval: false, clearTimeout: false, console: false, setInterval: false, setTimeout: false, URL: false, URLSearchParams: false }, webextensions: webextensions, greasemonkey: greasemonkey, devtools: devtools }; var globalsBABEL_8_BREAKINGFalse; var hasRequiredGlobalsBABEL_8_BREAKINGFalse; function requireGlobalsBABEL_8_BREAKINGFalse() { if (hasRequiredGlobalsBABEL_8_BREAKINGFalse) return globalsBABEL_8_BREAKINGFalse; hasRequiredGlobalsBABEL_8_BREAKINGFalse = 1; globalsBABEL_8_BREAKINGFalse = require$$0$a; return globalsBABEL_8_BREAKINGFalse; } function bool$7(value) { if (value == null) return false; return value && value !== "false" && value !== "0"; } var globals = bool$7(browser$1$1.env["BABEL_8_BREAKING"]) ? requireGlobalsBABEL_8_BREAKINGTrue() : requireGlobalsBABEL_8_BREAKINGFalse(); var NOT_LOCAL_BINDING$1 = NOT_LOCAL_BINDING$2, callExpression$d = callExpression$e, cloneNode$h = cloneNode$j, getBindingIdentifiers$1 = getBindingIdentifiers$2, identifier$g = identifier$i, isArrayExpression$1 = isArrayExpression$2, isBinary$2 = isBinary$3, isClass$1 = isClass$2, isClassBody$1 = isClassBody$2, isClassDeclaration$1 = isClassDeclaration$2, isExportAllDeclaration = isExportAllDeclaration$1, isExportDefaultDeclaration$2 = isExportDefaultDeclaration$3, isExportNamedDeclaration$2 = isExportNamedDeclaration$3, isFunctionDeclaration$1 = isFunctionDeclaration$2, isIdentifier$i = isIdentifier$j, isImportDeclaration$1 = isImportDeclaration$2, isLiteral$5 = isLiteral$6, isMethod = isMethod$1, isModuleSpecifier = isModuleSpecifier$1, isNullLiteral$1 = isNullLiteral$2, isObjectExpression$2 = isObjectExpression$3, isProperty = isProperty$1, isPureish$1 = isPureish$2, isRegExpLiteral$1 = isRegExpLiteral$2, isSuper$2 = isSuper$3, isTaggedTemplateExpression$1 = isTaggedTemplateExpression$2, isTemplateLiteral$1 = isTemplateLiteral$2, isThisExpression$1 = isThisExpression$2, isUnaryExpression = isUnaryExpression$1, isVariableDeclaration$2 = isVariableDeclaration$3, matchesPattern$1 = matchesPattern$2, memberExpression$b = memberExpression$c, numericLiteral$7 = numericLiteral$8, toIdentifier = toIdentifier$1, unaryExpression$6 = unaryExpression$7, variableDeclaration$6 = variableDeclaration$8, variableDeclarator$6 = variableDeclarator$8, isRecordExpression = isRecordExpression$1, isTupleExpression = isTupleExpression$1, isObjectProperty$4 = isObjectProperty$5, isTopicReference = isTopicReference$1, isMetaProperty = isMetaProperty$1, isPrivateName$2 = isPrivateName$3, isExportDeclaration$2 = isExportDeclaration$3; function gatherNodeParts(node, parts) { switch (node == null ? void 0 : node.type) { default: if (isImportDeclaration$1(node) || isExportDeclaration$2(node)) { if ((isExportAllDeclaration(node) || isExportNamedDeclaration$2(node) || isImportDeclaration$1(node)) && node.source) { gatherNodeParts(node.source, parts); } else if ((isExportNamedDeclaration$2(node) || isImportDeclaration$1(node)) && node.specifiers && node.specifiers.length) { for (var _iterator = _createForOfIteratorHelperLoose(node.specifiers), _step; !(_step = _iterator()).done;) { var e = _step.value; gatherNodeParts(e, parts); } } else if ((isExportDefaultDeclaration$2(node) || isExportNamedDeclaration$2(node)) && node.declaration) { gatherNodeParts(node.declaration, parts); } } else if (isModuleSpecifier(node)) { gatherNodeParts(node.local, parts); } else if (isLiteral$5(node) && !isNullLiteral$1(node) && !isRegExpLiteral$1(node) && !isTemplateLiteral$1(node)) { parts.push(node.value); } break; case "MemberExpression": case "OptionalMemberExpression": case "JSXMemberExpression": gatherNodeParts(node.object, parts); gatherNodeParts(node.property, parts); break; case "Identifier": case "JSXIdentifier": parts.push(node.name); break; case "CallExpression": case "OptionalCallExpression": case "NewExpression": gatherNodeParts(node.callee, parts); break; case "ObjectExpression": case "ObjectPattern": for (var _iterator2 = _createForOfIteratorHelperLoose(node.properties), _step2; !(_step2 = _iterator2()).done;) { var _e = _step2.value; gatherNodeParts(_e, parts); } break; case "SpreadElement": case "RestElement": gatherNodeParts(node.argument, parts); break; case "ObjectProperty": case "ObjectMethod": case "ClassProperty": case "ClassMethod": case "ClassPrivateProperty": case "ClassPrivateMethod": gatherNodeParts(node.key, parts); break; case "ThisExpression": parts.push("this"); break; case "Super": parts.push("super"); break; case "Import": parts.push("import"); break; case "DoExpression": parts.push("do"); break; case "YieldExpression": parts.push("yield"); gatherNodeParts(node.argument, parts); break; case "AwaitExpression": parts.push("await"); gatherNodeParts(node.argument, parts); break; case "AssignmentExpression": gatherNodeParts(node.left, parts); break; case "VariableDeclarator": gatherNodeParts(node.id, parts); break; case "FunctionExpression": case "FunctionDeclaration": case "ClassExpression": case "ClassDeclaration": gatherNodeParts(node.id, parts); break; case "PrivateName": gatherNodeParts(node.id, parts); break; case "ParenthesizedExpression": gatherNodeParts(node.expression, parts); break; case "UnaryExpression": case "UpdateExpression": gatherNodeParts(node.argument, parts); break; case "MetaProperty": gatherNodeParts(node.meta, parts); gatherNodeParts(node.property, parts); break; case "JSXElement": gatherNodeParts(node.openingElement, parts); break; case "JSXOpeningElement": gatherNodeParts(node.name, parts); break; case "JSXFragment": gatherNodeParts(node.openingFragment, parts); break; case "JSXOpeningFragment": parts.push("Fragment"); break; case "JSXNamespacedName": gatherNodeParts(node.namespace, parts); gatherNodeParts(node.name, parts); break; } } var collectorVisitor = { ForStatement: function ForStatement(path) { var declar = path.get("init"); if (declar.isVar()) { var scope = path.scope; var parentScope = scope.getFunctionParent() || scope.getProgramParent(); parentScope.registerBinding("var", declar); } }, Declaration: function Declaration(path) { if (path.isBlockScoped()) return; if (path.isImportDeclaration()) return; if (path.isExportDeclaration()) return; var parent = path.scope.getFunctionParent() || path.scope.getProgramParent(); parent.registerDeclaration(path); }, ImportDeclaration: function ImportDeclaration(path) { var parent = path.scope.getBlockParent(); parent.registerDeclaration(path); }, ReferencedIdentifier: function ReferencedIdentifier(path, state) { state.references.push(path); }, ForXStatement: function ForXStatement(path, state) { var left = path.get("left"); if (left.isPattern() || left.isIdentifier()) { state.constantViolations.push(path); } else if (left.isVar()) { var scope = path.scope; var parentScope = scope.getFunctionParent() || scope.getProgramParent(); parentScope.registerBinding("var", left); } }, ExportDeclaration: { exit: function exit(path) { var node = path.node, scope = path.scope; if (isExportAllDeclaration(node)) return; var declar = node.declaration; if (isClassDeclaration$1(declar) || isFunctionDeclaration$1(declar)) { var id = declar.id; if (!id) return; var binding = scope.getBinding(id.name); binding == null ? void 0 : binding.reference(path); } else if (isVariableDeclaration$2(declar)) { for (var _iterator3 = _createForOfIteratorHelperLoose(declar.declarations), _step3; !(_step3 = _iterator3()).done;) { var decl = _step3.value; for (var _i = 0, _Object$keys = Object.keys(getBindingIdentifiers$1(decl)); _i < _Object$keys.length; _i++) { var _name = _Object$keys[_i]; var _binding = scope.getBinding(_name); _binding == null ? void 0 : _binding.reference(path); } } } } }, LabeledStatement: function LabeledStatement(path) { path.scope.getBlockParent().registerDeclaration(path); }, AssignmentExpression: function AssignmentExpression(path, state) { state.assignments.push(path); }, UpdateExpression: function UpdateExpression(path, state) { state.constantViolations.push(path); }, UnaryExpression: function UnaryExpression(path, state) { if (path.node.operator === "delete") { state.constantViolations.push(path); } }, BlockScoped: function BlockScoped(path) { var scope = path.scope; if (scope.path === path) scope = scope.parent; var parent = scope.getBlockParent(); parent.registerDeclaration(path); if (path.isClassDeclaration() && path.node.id) { var id = path.node.id; var _name2 = id.name; path.scope.bindings[_name2] = path.scope.parent.getBinding(_name2); } }, CatchClause: function CatchClause(path) { path.scope.registerBinding("let", path); }, Function: function Function(path) { var params = path.get("params"); for (var _iterator4 = _createForOfIteratorHelperLoose(params), _step4; !(_step4 = _iterator4()).done;) { var param = _step4.value; path.scope.registerBinding("param", param); } if (path.isFunctionExpression() && path.has("id") && !path.get("id").node[NOT_LOCAL_BINDING$1]) { path.scope.registerBinding("local", path.get("id"), path); } }, ClassExpression: function ClassExpression(path) { if (path.has("id") && !path.get("id").node[NOT_LOCAL_BINDING$1]) { path.scope.registerBinding("local", path); } } }; var uid = 0; var Scope$1 = function () { function Scope(path) { this.uid = void 0; this.path = void 0; this.block = void 0; this.labels = void 0; this.inited = void 0; this.bindings = void 0; this.references = void 0; this.globals = void 0; this.uids = void 0; this.data = void 0; this.crawling = void 0; var node = path.node; var cached = scope.get(node); if ((cached == null ? void 0 : cached.path) === path) { return cached; } scope.set(node, this); this.uid = uid++; this.block = node; this.path = path; this.labels = new Map(); this.inited = false; } var _proto = Scope.prototype; _proto.traverse = function traverse$1(node, opts, state) { traverse(node, opts, this, state, this.path); }; _proto.generateDeclaredUidIdentifier = function generateDeclaredUidIdentifier(name) { var id = this.generateUidIdentifier(name); this.push({ id: id }); return cloneNode$h(id); }; _proto.generateUidIdentifier = function generateUidIdentifier(name) { return identifier$g(this.generateUid(name)); }; _proto.generateUid = function generateUid(name) { if (name === void 0) { name = "temp"; } name = toIdentifier(name).replace(/^_+/, "").replace(/[0-9]+$/g, ""); var uid; var i = 1; do { uid = this._generateUid(name, i); i++; } while (this.hasLabel(uid) || this.hasBinding(uid) || this.hasGlobal(uid) || this.hasReference(uid)); var program = this.getProgramParent(); program.references[uid] = true; program.uids[uid] = true; return uid; }; _proto._generateUid = function _generateUid(name, i) { var id = name; if (i > 1) id += i; return "_" + id; }; _proto.generateUidBasedOnNode = function generateUidBasedOnNode(node, defaultName) { var parts = []; gatherNodeParts(node, parts); var id = parts.join("$"); id = id.replace(/^_/, "") || defaultName || "ref"; return this.generateUid(id.slice(0, 20)); }; _proto.generateUidIdentifierBasedOnNode = function generateUidIdentifierBasedOnNode(node, defaultName) { return identifier$g(this.generateUidBasedOnNode(node, defaultName)); }; _proto.isStatic = function isStatic(node) { if (isThisExpression$1(node) || isSuper$2(node) || isTopicReference(node)) { return true; } if (isIdentifier$i(node)) { var binding = this.getBinding(node.name); if (binding) { return binding.constant; } else { return this.hasBinding(node.name); } } return false; }; _proto.maybeGenerateMemoised = function maybeGenerateMemoised(node, dontPush) { if (this.isStatic(node)) { return null; } else { var id = this.generateUidIdentifierBasedOnNode(node); if (!dontPush) { this.push({ id: id }); return cloneNode$h(id); } return id; } }; _proto.checkBlockScopedCollisions = function checkBlockScopedCollisions(local, kind, name, id) { if (kind === "param") return; if (local.kind === "local") return; var duplicate = kind === "let" || local.kind === "let" || local.kind === "const" || local.kind === "module" || local.kind === "param" && kind === "const"; if (duplicate) { throw this.hub.buildError(id, "Duplicate declaration \"" + name + "\"", TypeError); } }; _proto.rename = function rename(oldName, newName) { var binding = this.getBinding(oldName); if (binding) { newName || (newName = this.generateUidIdentifier(oldName).name); var renamer = new Renamer(binding, oldName, newName); return renamer.rename(arguments[2]); } }; _proto._renameFromMap = function _renameFromMap(map, oldName, newName, value) { if (map[oldName]) { map[newName] = value; map[oldName] = null; } }; _proto.dump = function dump() { var sep = "-".repeat(60); console.log(sep); var scope = this; do { console.log("#", scope.block.type); for (var _i2 = 0, _Object$keys2 = Object.keys(scope.bindings); _i2 < _Object$keys2.length; _i2++) { var _name3 = _Object$keys2[_i2]; var binding = scope.bindings[_name3]; console.log(" -", _name3, { constant: binding.constant, references: binding.references, violations: binding.constantViolations.length, kind: binding.kind }); } } while (scope = scope.parent); console.log(sep); }; _proto.toArray = function toArray(node, i, arrayLikeIsIterable) { if (isIdentifier$i(node)) { var binding = this.getBinding(node.name); if (binding != null && binding.constant && binding.path.isGenericType("Array")) { return node; } } if (isArrayExpression$1(node)) { return node; } if (isIdentifier$i(node, { name: "arguments" })) { return callExpression$d(memberExpression$b(memberExpression$b(memberExpression$b(identifier$g("Array"), identifier$g("prototype")), identifier$g("slice")), identifier$g("call")), [node]); } var helperName; var args = [node]; if (i === true) { helperName = "toConsumableArray"; } else if (typeof i === "number") { args.push(numericLiteral$7(i)); helperName = "slicedToArray"; } else { helperName = "toArray"; } if (arrayLikeIsIterable) { args.unshift(this.hub.addHelper(helperName)); helperName = "maybeArrayLike"; } return callExpression$d(this.hub.addHelper(helperName), args); }; _proto.hasLabel = function hasLabel(name) { return !!this.getLabel(name); }; _proto.getLabel = function getLabel(name) { return this.labels.get(name); }; _proto.registerLabel = function registerLabel(path) { this.labels.set(path.node.label.name, path); }; _proto.registerDeclaration = function registerDeclaration(path) { if (path.isLabeledStatement()) { this.registerLabel(path); } else if (path.isFunctionDeclaration()) { this.registerBinding("hoisted", path.get("id"), path); } else if (path.isVariableDeclaration()) { var declarations = path.get("declarations"); var kind = path.node.kind; for (var _iterator5 = _createForOfIteratorHelperLoose(declarations), _step5; !(_step5 = _iterator5()).done;) { var declar = _step5.value; this.registerBinding(kind === "using" ? "const" : kind, declar); } } else if (path.isClassDeclaration()) { if (path.node.declare) return; this.registerBinding("let", path); } else if (path.isImportDeclaration()) { var isTypeDeclaration = path.node.importKind === "type" || path.node.importKind === "typeof"; var specifiers = path.get("specifiers"); for (var _iterator6 = _createForOfIteratorHelperLoose(specifiers), _step6; !(_step6 = _iterator6()).done;) { var specifier = _step6.value; var isTypeSpecifier = isTypeDeclaration || specifier.isImportSpecifier() && (specifier.node.importKind === "type" || specifier.node.importKind === "typeof"); this.registerBinding(isTypeSpecifier ? "unknown" : "module", specifier); } } else if (path.isExportDeclaration()) { var _declar = path.get("declaration"); if (_declar.isClassDeclaration() || _declar.isFunctionDeclaration() || _declar.isVariableDeclaration()) { this.registerDeclaration(_declar); } } else { this.registerBinding("unknown", path); } }; _proto.buildUndefinedNode = function buildUndefinedNode() { return unaryExpression$6("void", numericLiteral$7(0), true); }; _proto.registerConstantViolation = function registerConstantViolation(path) { var ids = path.getBindingIdentifiers(); for (var _i3 = 0, _Object$keys3 = Object.keys(ids); _i3 < _Object$keys3.length; _i3++) { var _name4 = _Object$keys3[_i3]; var binding = this.getBinding(_name4); if (binding) binding.reassign(path); } }; _proto.registerBinding = function registerBinding(kind, path, bindingPath) { if (bindingPath === void 0) { bindingPath = path; } if (!kind) throw new ReferenceError("no `kind`"); if (path.isVariableDeclaration()) { var declarators = path.get("declarations"); for (var _iterator7 = _createForOfIteratorHelperLoose(declarators), _step7; !(_step7 = _iterator7()).done;) { var declar = _step7.value; this.registerBinding(kind, declar); } return; } var parent = this.getProgramParent(); var ids = path.getOuterBindingIdentifiers(true); for (var _i4 = 0, _Object$keys4 = Object.keys(ids); _i4 < _Object$keys4.length; _i4++) { var _name5 = _Object$keys4[_i4]; parent.references[_name5] = true; for (var _iterator8 = _createForOfIteratorHelperLoose(ids[_name5]), _step8; !(_step8 = _iterator8()).done;) { var id = _step8.value; var local = this.getOwnBinding(_name5); if (local) { if (local.identifier === id) continue; this.checkBlockScopedCollisions(local, kind, _name5, id); } if (local) { this.registerConstantViolation(bindingPath); } else { this.bindings[_name5] = new Binding({ identifier: id, scope: this, path: bindingPath, kind: kind }); } } } }; _proto.addGlobal = function addGlobal(node) { this.globals[node.name] = node; }; _proto.hasUid = function hasUid(name) { var scope = this; do { if (scope.uids[name]) return true; } while (scope = scope.parent); return false; }; _proto.hasGlobal = function hasGlobal(name) { var scope = this; do { if (scope.globals[name]) return true; } while (scope = scope.parent); return false; }; _proto.hasReference = function hasReference(name) { return !!this.getProgramParent().references[name]; }; _proto.isPure = function isPure(node, constantsOnly) { if (isIdentifier$i(node)) { var binding = this.getBinding(node.name); if (!binding) return false; if (constantsOnly) return binding.constant; return true; } else if (isThisExpression$1(node) || isMetaProperty(node) || isTopicReference(node) || isPrivateName$2(node)) { return true; } else if (isClass$1(node)) { var _node$decorators; if (node.superClass && !this.isPure(node.superClass, constantsOnly)) { return false; } if (((_node$decorators = node.decorators) == null ? void 0 : _node$decorators.length) > 0) { return false; } return this.isPure(node.body, constantsOnly); } else if (isClassBody$1(node)) { for (var _iterator9 = _createForOfIteratorHelperLoose(node.body), _step9; !(_step9 = _iterator9()).done;) { var method = _step9.value; if (!this.isPure(method, constantsOnly)) return false; } return true; } else if (isBinary$2(node)) { return this.isPure(node.left, constantsOnly) && this.isPure(node.right, constantsOnly); } else if (isArrayExpression$1(node) || isTupleExpression(node)) { for (var _iterator10 = _createForOfIteratorHelperLoose(node.elements), _step10; !(_step10 = _iterator10()).done;) { var elem = _step10.value; if (elem !== null && !this.isPure(elem, constantsOnly)) return false; } return true; } else if (isObjectExpression$2(node) || isRecordExpression(node)) { for (var _iterator11 = _createForOfIteratorHelperLoose(node.properties), _step11; !(_step11 = _iterator11()).done;) { var prop = _step11.value; if (!this.isPure(prop, constantsOnly)) return false; } return true; } else if (isMethod(node)) { var _node$decorators2; if (node.computed && !this.isPure(node.key, constantsOnly)) return false; if (((_node$decorators2 = node.decorators) == null ? void 0 : _node$decorators2.length) > 0) { return false; } return true; } else if (isProperty(node)) { var _node$decorators3; if (node.computed && !this.isPure(node.key, constantsOnly)) return false; if (((_node$decorators3 = node.decorators) == null ? void 0 : _node$decorators3.length) > 0) { return false; } if (isObjectProperty$4(node) || node["static"]) { if (node.value !== null && !this.isPure(node.value, constantsOnly)) { return false; } } return true; } else if (isUnaryExpression(node)) { return this.isPure(node.argument, constantsOnly); } else if (isTaggedTemplateExpression$1(node)) { return matchesPattern$1(node.tag, "String.raw") && !this.hasBinding("String", true) && this.isPure(node.quasi, constantsOnly); } else if (isTemplateLiteral$1(node)) { for (var _iterator12 = _createForOfIteratorHelperLoose(node.expressions), _step12; !(_step12 = _iterator12()).done;) { var expression = _step12.value; if (!this.isPure(expression, constantsOnly)) return false; } return true; } else { return isPureish$1(node); } }; _proto.setData = function setData(key, val) { return this.data[key] = val; }; _proto.getData = function getData(key) { var scope = this; do { var data = scope.data[key]; if (data != null) return data; } while (scope = scope.parent); }; _proto.removeData = function removeData(key) { var scope = this; do { var data = scope.data[key]; if (data != null) scope.data[key] = null; } while (scope = scope.parent); }; _proto.init = function init() { if (!this.inited) { this.inited = true; this.crawl(); } }; _proto.crawl = function crawl() { var path = this.path; this.references = Object.create(null); this.bindings = Object.create(null); this.globals = Object.create(null); this.uids = Object.create(null); this.data = Object.create(null); var programParent = this.getProgramParent(); if (programParent.crawling) return; var state = { references: [], constantViolations: [], assignments: [] }; this.crawling = true; if (path.type !== "Program" && collectorVisitor._exploded) { for (var _iterator13 = _createForOfIteratorHelperLoose(collectorVisitor.enter), _step13; !(_step13 = _iterator13()).done;) { var _visit = _step13.value; _visit(path, state); } var typeVisitors = collectorVisitor[path.type]; if (typeVisitors) { for (var _iterator14 = _createForOfIteratorHelperLoose(typeVisitors.enter), _step14; !(_step14 = _iterator14()).done;) { var visit = _step14.value; visit(path, state); } } } path.traverse(collectorVisitor, state); this.crawling = false; for (var _iterator15 = _createForOfIteratorHelperLoose(state.assignments), _step15; !(_step15 = _iterator15()).done;) { var _path = _step15.value; var ids = _path.getBindingIdentifiers(); for (var _i5 = 0, _Object$keys5 = Object.keys(ids); _i5 < _Object$keys5.length; _i5++) { var _name6 = _Object$keys5[_i5]; if (_path.scope.getBinding(_name6)) continue; programParent.addGlobal(ids[_name6]); } _path.scope.registerConstantViolation(_path); } for (var _iterator16 = _createForOfIteratorHelperLoose(state.references), _step16; !(_step16 = _iterator16()).done;) { var ref = _step16.value; var binding = ref.scope.getBinding(ref.node.name); if (binding) { binding.reference(ref); } else { programParent.addGlobal(ref.node); } } for (var _iterator17 = _createForOfIteratorHelperLoose(state.constantViolations), _step17; !(_step17 = _iterator17()).done;) { var _path2 = _step17.value; _path2.scope.registerConstantViolation(_path2); } }; _proto.push = function push(opts) { var path = this.path; if (path.isPattern()) { path = this.getPatternParent().path; } else if (!path.isBlockStatement() && !path.isProgram()) { path = this.getBlockParent().path; } if (path.isSwitchStatement()) { path = (this.getFunctionParent() || this.getProgramParent()).path; } if (path.isLoop() || path.isCatchClause() || path.isFunction()) { path.ensureBlock(); path = path.get("body"); } var unique = opts.unique; var kind = opts.kind || "var"; var blockHoist = opts._blockHoist == null ? 2 : opts._blockHoist; var dataKey = "declaration:" + kind + ":" + blockHoist; var declarPath = !unique && path.getData(dataKey); if (!declarPath) { var declar = variableDeclaration$6(kind, []); declar._blockHoist = blockHoist; var _unshiftContainer = path.unshiftContainer("body", [declar]); var _unshiftContainer2 = _slicedToArray(_unshiftContainer, 1); declarPath = _unshiftContainer2[0]; if (!unique) path.setData(dataKey, declarPath); } var declarator = variableDeclarator$6(opts.id, opts.init); var len = declarPath.node.declarations.push(declarator); path.scope.registerBinding(kind, declarPath.get("declarations")[len - 1]); }; _proto.getProgramParent = function getProgramParent() { var scope = this; do { if (scope.path.isProgram()) { return scope; } } while (scope = scope.parent); throw new Error("Couldn't find a Program"); }; _proto.getFunctionParent = function getFunctionParent() { var scope = this; do { if (scope.path.isFunctionParent()) { return scope; } } while (scope = scope.parent); return null; }; _proto.getBlockParent = function getBlockParent() { var scope = this; do { if (scope.path.isBlockParent()) { return scope; } } while (scope = scope.parent); throw new Error("We couldn't find a BlockStatement, For, Switch, Function, Loop or Program..."); }; _proto.getPatternParent = function getPatternParent() { var scope = this; do { if (!scope.path.isPattern()) { return scope.getBlockParent(); } } while (scope = scope.parent.parent); throw new Error("We couldn't find a BlockStatement, For, Switch, Function, Loop or Program..."); }; _proto.getAllBindings = function getAllBindings() { var ids = Object.create(null); var scope = this; do { for (var _i6 = 0, _Object$keys6 = Object.keys(scope.bindings); _i6 < _Object$keys6.length; _i6++) { var _key = _Object$keys6[_i6]; if (_key in ids === false) { ids[_key] = scope.bindings[_key]; } } scope = scope.parent; } while (scope); return ids; }; _proto.getAllBindingsOfKind = function getAllBindingsOfKind() { var ids = Object.create(null); for (var _len = arguments.length, kinds = new Array(_len), _key2 = 0; _key2 < _len; _key2++) { kinds[_key2] = arguments[_key2]; } for (var _i7 = 0, _kinds = kinds; _i7 < _kinds.length; _i7++) { var kind = _kinds[_i7]; var scope = this; do { for (var _i8 = 0, _Object$keys7 = Object.keys(scope.bindings); _i8 < _Object$keys7.length; _i8++) { var _name7 = _Object$keys7[_i8]; var binding = scope.bindings[_name7]; if (binding.kind === kind) ids[_name7] = binding; } scope = scope.parent; } while (scope); } return ids; }; _proto.bindingIdentifierEquals = function bindingIdentifierEquals(name, node) { return this.getBindingIdentifier(name) === node; }; _proto.getBinding = function getBinding(name) { var scope = this; var previousPath; do { var binding = scope.getOwnBinding(name); if (binding) { var _previousPath; if ((_previousPath = previousPath) != null && _previousPath.isPattern() && binding.kind !== "param" && binding.kind !== "local") ; else { return binding; } } else if (!binding && name === "arguments" && scope.path.isFunction() && !scope.path.isArrowFunctionExpression()) { break; } previousPath = scope.path; } while (scope = scope.parent); }; _proto.getOwnBinding = function getOwnBinding(name) { return this.bindings[name]; }; _proto.getBindingIdentifier = function getBindingIdentifier(name) { var _this$getBinding; return (_this$getBinding = this.getBinding(name)) == null ? void 0 : _this$getBinding.identifier; }; _proto.getOwnBindingIdentifier = function getOwnBindingIdentifier(name) { var binding = this.bindings[name]; return binding == null ? void 0 : binding.identifier; }; _proto.hasOwnBinding = function hasOwnBinding(name) { return !!this.getOwnBinding(name); }; _proto.hasBinding = function hasBinding(name, opts) { var _opts, _opts2, _opts3; if (!name) return false; if (this.hasOwnBinding(name)) return true; { if (typeof opts === "boolean") opts = { noGlobals: opts }; } if (this.parentHasBinding(name, opts)) return true; if (!((_opts = opts) != null && _opts.noUids) && this.hasUid(name)) return true; if (!((_opts2 = opts) != null && _opts2.noGlobals) && Scope.globals.includes(name)) return true; if (!((_opts3 = opts) != null && _opts3.noGlobals) && Scope.contextVariables.includes(name)) return true; return false; }; _proto.parentHasBinding = function parentHasBinding(name, opts) { var _this$parent; return (_this$parent = this.parent) == null ? void 0 : _this$parent.hasBinding(name, opts); }; _proto.moveBindingTo = function moveBindingTo(name, scope) { var info = this.getBinding(name); if (info) { info.scope.removeOwnBinding(name); info.scope = scope; scope.bindings[name] = info; } }; _proto.removeOwnBinding = function removeOwnBinding(name) { delete this.bindings[name]; }; _proto.removeBinding = function removeBinding(name) { var _this$getBinding2; (_this$getBinding2 = this.getBinding(name)) == null ? void 0 : _this$getBinding2.scope.removeOwnBinding(name); var scope = this; do { if (scope.uids[name]) { scope.uids[name] = false; } } while (scope = scope.parent); }; _createClass(Scope, [{ key: "parent", get: function get() { var _parent; var parent, path = this.path; do { var shouldSkip = path.key === "key" || path.listKey === "decorators"; path = path.parentPath; if (shouldSkip && path.isMethod()) path = path.parentPath; if (path && path.isScope()) parent = path; } while (path && !parent); return (_parent = parent) == null ? void 0 : _parent.scope; } }, { key: "parentBlock", get: function get() { return this.path.parent; } }, { key: "hub", get: function get() { return this.path.hub; } }]); return Scope; }(); Scope$1.globals = Object.keys(globals.builtin); Scope$1.contextVariables = ["arguments", "undefined", "Infinity", "NaN"]; var genMapping_umd$1 = {exports: {}}; var setArray_umd = {exports: {}}; var hasRequiredSetArray_umd; function requireSetArray_umd() { if (hasRequiredSetArray_umd) return setArray_umd.exports; hasRequiredSetArray_umd = 1; (function (module, exports) { (function (global, factory) { factory(exports) ; })(commonjsGlobal, function (exports) { exports.get = void 0; exports.put = void 0; exports.pop = void 0; var SetArray = _createClass(function SetArray() { this._indexes = { __proto__: null }; this.array = []; }); (function () { exports.get = function (strarr, key) { return strarr._indexes[key]; }; exports.put = function (strarr, key) { var index = exports.get(strarr, key); if (index !== undefined) return index; var array = strarr.array, indexes = strarr._indexes; return indexes[key] = array.push(key) - 1; }; exports.pop = function (strarr) { var array = strarr.array, indexes = strarr._indexes; if (array.length === 0) return; var last = array.pop(); indexes[last] = undefined; }; })(); exports.SetArray = SetArray; Object.defineProperty(exports, '__esModule', { value: true }); }); })(setArray_umd, setArray_umd.exports); return setArray_umd.exports; } var lookup$1 = []; var revLookup$1 = []; var Arr$1 = typeof Uint8Array !== 'undefined' ? Uint8Array : Array; var inited = false; function init () { inited = true; var code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; for (var i = 0, len = code.length; i < len; ++i) { lookup$1[i] = code[i]; revLookup$1[code.charCodeAt(i)] = i; } revLookup$1['-'.charCodeAt(0)] = 62; revLookup$1['_'.charCodeAt(0)] = 63; } function toByteArray$1 (b64) { if (!inited) { init(); } var i, j, l, tmp, placeHolders, arr; var len = b64.length; if (len % 4 > 0) { throw new Error('Invalid string. Length must be a multiple of 4') } // the number of equal signs (place holders) // if there are two placeholders, than the two characters before it // represent one byte // if there is only one, then the three characters before it represent 2 bytes // this is just a cheap hack to not do indexOf twice placeHolders = b64[len - 2] === '=' ? 2 : b64[len - 1] === '=' ? 1 : 0; // base64 is 4/3 + up to two characters of the original data arr = new Arr$1(len * 3 / 4 - placeHolders); // if there are placeholders, only get up to the last complete 4 chars l = placeHolders > 0 ? len - 4 : len; var L = 0; for (i = 0, j = 0; i < l; i += 4, j += 3) { tmp = (revLookup$1[b64.charCodeAt(i)] << 18) | (revLookup$1[b64.charCodeAt(i + 1)] << 12) | (revLookup$1[b64.charCodeAt(i + 2)] << 6) | revLookup$1[b64.charCodeAt(i + 3)]; arr[L++] = (tmp >> 16) & 0xFF; arr[L++] = (tmp >> 8) & 0xFF; arr[L++] = tmp & 0xFF; } if (placeHolders === 2) { tmp = (revLookup$1[b64.charCodeAt(i)] << 2) | (revLookup$1[b64.charCodeAt(i + 1)] >> 4); arr[L++] = tmp & 0xFF; } else if (placeHolders === 1) { tmp = (revLookup$1[b64.charCodeAt(i)] << 10) | (revLookup$1[b64.charCodeAt(i + 1)] << 4) | (revLookup$1[b64.charCodeAt(i + 2)] >> 2); arr[L++] = (tmp >> 8) & 0xFF; arr[L++] = tmp & 0xFF; } return arr } function tripletToBase64$1 (num) { return lookup$1[num >> 18 & 0x3F] + lookup$1[num >> 12 & 0x3F] + lookup$1[num >> 6 & 0x3F] + lookup$1[num & 0x3F] } function encodeChunk$1 (uint8, start, end) { var tmp; var output = []; for (var i = start; i < end; i += 3) { tmp = (uint8[i] << 16) + (uint8[i + 1] << 8) + (uint8[i + 2]); output.push(tripletToBase64$1(tmp)); } return output.join('') } function fromByteArray$1 (uint8) { if (!inited) { init(); } var tmp; var len = uint8.length; var extraBytes = len % 3; // if we have 1 byte left, pad 2 bytes var output = ''; var parts = []; var maxChunkLength = 16383; // must be multiple of 3 // go through the array every three bytes, we'll deal with trailing stuff later for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) { parts.push(encodeChunk$1(uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength))); } // pad the end with zeros, but make sure to not forget the extra bytes if (extraBytes === 1) { tmp = uint8[len - 1]; output += lookup$1[tmp >> 2]; output += lookup$1[(tmp << 4) & 0x3F]; output += '=='; } else if (extraBytes === 2) { tmp = (uint8[len - 2] << 8) + (uint8[len - 1]); output += lookup$1[tmp >> 10]; output += lookup$1[(tmp >> 4) & 0x3F]; output += lookup$1[(tmp << 2) & 0x3F]; output += '='; } parts.push(output); return parts.join('') } function read (buffer, offset, isLE, mLen, nBytes) { var e, m; var eLen = nBytes * 8 - mLen - 1; var eMax = (1 << eLen) - 1; var eBias = eMax >> 1; var nBits = -7; var i = isLE ? (nBytes - 1) : 0; var d = isLE ? -1 : 1; var s = buffer[offset + i]; i += d; e = s & ((1 << (-nBits)) - 1); s >>= (-nBits); nBits += eLen; for (; nBits > 0; e = e * 256 + buffer[offset + i], i += d, nBits -= 8) {} m = e & ((1 << (-nBits)) - 1); e >>= (-nBits); nBits += mLen; for (; nBits > 0; m = m * 256 + buffer[offset + i], i += d, nBits -= 8) {} if (e === 0) { e = 1 - eBias; } else if (e === eMax) { return m ? NaN : ((s ? -1 : 1) * Infinity) } else { m = m + Math.pow(2, mLen); e = e - eBias; } return (s ? -1 : 1) * m * Math.pow(2, e - mLen) } function write (buffer, value, offset, isLE, mLen, nBytes) { var e, m, c; var eLen = nBytes * 8 - mLen - 1; var eMax = (1 << eLen) - 1; var eBias = eMax >> 1; var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0); var i = isLE ? 0 : (nBytes - 1); var d = isLE ? 1 : -1; var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0; value = Math.abs(value); if (isNaN(value) || value === Infinity) { m = isNaN(value) ? 1 : 0; e = eMax; } else { e = Math.floor(Math.log(value) / Math.LN2); if (value * (c = Math.pow(2, -e)) < 1) { e--; c *= 2; } if (e + eBias >= 1) { value += rt / c; } else { value += rt * Math.pow(2, 1 - eBias); } if (value * c >= 2) { e++; c /= 2; } if (e + eBias >= eMax) { m = 0; e = eMax; } else if (e + eBias >= 1) { m = (value * c - 1) * Math.pow(2, mLen); e = e + eBias; } else { m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen); e = 0; } } for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {} e = (e << mLen) | m; eLen += mLen; for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {} buffer[offset + i - d] |= s * 128; } var toString = {}.toString; var isArray$1 = Array.isArray || function (arr) { return toString.call(arr) == '[object Array]'; }; /*! * The buffer module from node.js, for the browser. * * @author Feross Aboukhadijeh * @license MIT */ var INSPECT_MAX_BYTES = 50; /** * If `Buffer.TYPED_ARRAY_SUPPORT`: * === true Use Uint8Array implementation (fastest) * === false Use Object implementation (most compatible, even IE6) * * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+, * Opera 11.6+, iOS 4.2+. * * Due to various browser bugs, sometimes the Object implementation will be used even * when the browser supports typed arrays. * * Note: * * - Firefox 4-29 lacks support for adding new properties to `Uint8Array` instances, * See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438. * * - Chrome 9-10 is missing the `TypedArray.prototype.subarray` function. * * - IE10 has a broken `TypedArray.prototype.subarray` function which returns arrays of * incorrect length in some situations. * We detect these buggy browsers and set `Buffer.TYPED_ARRAY_SUPPORT` to `false` so they * get the Object implementation, which is slower but behaves correctly. */ Buffer$1.TYPED_ARRAY_SUPPORT = global$1.TYPED_ARRAY_SUPPORT !== undefined ? global$1.TYPED_ARRAY_SUPPORT : true; /* * Export kMaxLength after typed array support is determined. */ kMaxLength(); function kMaxLength () { return Buffer$1.TYPED_ARRAY_SUPPORT ? 0x7fffffff : 0x3fffffff } function createBuffer (that, length) { if (kMaxLength() < length) { throw new RangeError('Invalid typed array length') } if (Buffer$1.TYPED_ARRAY_SUPPORT) { // Return an augmented `Uint8Array` instance, for best performance that = new Uint8Array(length); that.__proto__ = Buffer$1.prototype; } else { // Fallback: Return an object instance of the Buffer class if (that === null) { that = new Buffer$1(length); } that.length = length; } return that } /** * The Buffer constructor returns instances of `Uint8Array` that have their * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of * `Uint8Array`, so the returned instances will have all the node `Buffer` methods * and the `Uint8Array` methods. Square bracket notation works as expected -- it * returns a single octet. * * The `Uint8Array` prototype remains unmodified. */ function Buffer$1 (arg, encodingOrOffset, length) { if (!Buffer$1.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer$1)) { return new Buffer$1(arg, encodingOrOffset, length) } // Common case. if (typeof arg === 'number') { if (typeof encodingOrOffset === 'string') { throw new Error( 'If encoding is specified then the first argument must be a string' ) } return allocUnsafe(this, arg) } return from(this, arg, encodingOrOffset, length) } Buffer$1.poolSize = 8192; // not used by this implementation // TODO: Legacy, not needed anymore. Remove in next major version. Buffer$1._augment = function (arr) { arr.__proto__ = Buffer$1.prototype; return arr }; function from (that, value, encodingOrOffset, length) { if (typeof value === 'number') { throw new TypeError('"value" argument must not be a number') } if (typeof ArrayBuffer !== 'undefined' && value instanceof ArrayBuffer) { return fromArrayBuffer(that, value, encodingOrOffset, length) } if (typeof value === 'string') { return fromString(that, value, encodingOrOffset) } return fromObject(that, value) } /** * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError * if value is a number. * Buffer.from(str[, encoding]) * Buffer.from(array) * Buffer.from(buffer) * Buffer.from(arrayBuffer[, byteOffset[, length]]) **/ Buffer$1.from = function (value, encodingOrOffset, length) { return from(null, value, encodingOrOffset, length) }; if (Buffer$1.TYPED_ARRAY_SUPPORT) { Buffer$1.prototype.__proto__ = Uint8Array.prototype; Buffer$1.__proto__ = Uint8Array; } function assertSize (size) { if (typeof size !== 'number') { throw new TypeError('"size" argument must be a number') } else if (size < 0) { throw new RangeError('"size" argument must not be negative') } } function alloc (that, size, fill, encoding) { assertSize(size); if (size <= 0) { return createBuffer(that, size) } if (fill !== undefined) { // Only pay attention to encoding if it's a string. This // prevents accidentally sending in a number that would // be interpretted as a start offset. return typeof encoding === 'string' ? createBuffer(that, size).fill(fill, encoding) : createBuffer(that, size).fill(fill) } return createBuffer(that, size) } /** * Creates a new filled Buffer instance. * alloc(size[, fill[, encoding]]) **/ Buffer$1.alloc = function (size, fill, encoding) { return alloc(null, size, fill, encoding) }; function allocUnsafe (that, size) { assertSize(size); that = createBuffer(that, size < 0 ? 0 : checked(size) | 0); if (!Buffer$1.TYPED_ARRAY_SUPPORT) { for (var i = 0; i < size; ++i) { that[i] = 0; } } return that } /** * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance. * */ Buffer$1.allocUnsafe = function (size) { return allocUnsafe(null, size) }; /** * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance. */ Buffer$1.allocUnsafeSlow = function (size) { return allocUnsafe(null, size) }; function fromString (that, string, encoding) { if (typeof encoding !== 'string' || encoding === '') { encoding = 'utf8'; } if (!Buffer$1.isEncoding(encoding)) { throw new TypeError('"encoding" must be a valid string encoding') } var length = byteLength$1(string, encoding) | 0; that = createBuffer(that, length); var actual = that.write(string, encoding); if (actual !== length) { // Writing a hex string, for example, that contains invalid characters will // cause everything after the first invalid character to be ignored. (e.g. // 'abxxcd' will be treated as 'ab') that = that.slice(0, actual); } return that } function fromArrayLike (that, array) { var length = array.length < 0 ? 0 : checked(array.length) | 0; that = createBuffer(that, length); for (var i = 0; i < length; i += 1) { that[i] = array[i] & 255; } return that } function fromArrayBuffer (that, array, byteOffset, length) { array.byteLength; // this throws if `array` is not a valid ArrayBuffer if (byteOffset < 0 || array.byteLength < byteOffset) { throw new RangeError('\'offset\' is out of bounds') } if (array.byteLength < byteOffset + (length || 0)) { throw new RangeError('\'length\' is out of bounds') } if (byteOffset === undefined && length === undefined) { array = new Uint8Array(array); } else if (length === undefined) { array = new Uint8Array(array, byteOffset); } else { array = new Uint8Array(array, byteOffset, length); } if (Buffer$1.TYPED_ARRAY_SUPPORT) { // Return an augmented `Uint8Array` instance, for best performance that = array; that.__proto__ = Buffer$1.prototype; } else { // Fallback: Return an object instance of the Buffer class that = fromArrayLike(that, array); } return that } function fromObject (that, obj) { if (internalIsBuffer(obj)) { var len = checked(obj.length) | 0; that = createBuffer(that, len); if (that.length === 0) { return that } obj.copy(that, 0, 0, len); return that } if (obj) { if ((typeof ArrayBuffer !== 'undefined' && obj.buffer instanceof ArrayBuffer) || 'length' in obj) { if (typeof obj.length !== 'number' || isnan(obj.length)) { return createBuffer(that, 0) } return fromArrayLike(that, obj) } if (obj.type === 'Buffer' && isArray$1(obj.data)) { return fromArrayLike(that, obj.data) } } throw new TypeError('First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.') } function checked (length) { // Note: cannot use `length < kMaxLength()` here because that fails when // length is NaN (which is otherwise coerced to zero.) if (length >= kMaxLength()) { throw new RangeError('Attempt to allocate Buffer larger than maximum ' + 'size: 0x' + kMaxLength().toString(16) + ' bytes') } return length | 0 } Buffer$1.isBuffer = isBuffer$1; function internalIsBuffer (b) { return !!(b != null && b._isBuffer) } Buffer$1.compare = function compare (a, b) { if (!internalIsBuffer(a) || !internalIsBuffer(b)) { throw new TypeError('Arguments must be Buffers') } if (a === b) return 0 var x = a.length; var y = b.length; for (var i = 0, len = Math.min(x, y); i < len; ++i) { if (a[i] !== b[i]) { x = a[i]; y = b[i]; break } } if (x < y) return -1 if (y < x) return 1 return 0 }; Buffer$1.isEncoding = function isEncoding (encoding) { switch (String(encoding).toLowerCase()) { case 'hex': case 'utf8': case 'utf-8': case 'ascii': case 'latin1': case 'binary': case 'base64': case 'ucs2': case 'ucs-2': case 'utf16le': case 'utf-16le': return true default: return false } }; Buffer$1.concat = function concat (list, length) { if (!isArray$1(list)) { throw new TypeError('"list" argument must be an Array of Buffers') } if (list.length === 0) { return Buffer$1.alloc(0) } var i; if (length === undefined) { length = 0; for (i = 0; i < list.length; ++i) { length += list[i].length; } } var buffer = Buffer$1.allocUnsafe(length); var pos = 0; for (i = 0; i < list.length; ++i) { var buf = list[i]; if (!internalIsBuffer(buf)) { throw new TypeError('"list" argument must be an Array of Buffers') } buf.copy(buffer, pos); pos += buf.length; } return buffer }; function byteLength$1 (string, encoding) { if (internalIsBuffer(string)) { return string.length } if (typeof ArrayBuffer !== 'undefined' && typeof ArrayBuffer.isView === 'function' && (ArrayBuffer.isView(string) || string instanceof ArrayBuffer)) { return string.byteLength } if (typeof string !== 'string') { string = '' + string; } var len = string.length; if (len === 0) return 0 // Use a for loop to avoid recursion var loweredCase = false; for (;;) { switch (encoding) { case 'ascii': case 'latin1': case 'binary': return len case 'utf8': case 'utf-8': case undefined: return utf8ToBytes(string).length case 'ucs2': case 'ucs-2': case 'utf16le': case 'utf-16le': return len * 2 case 'hex': return len >>> 1 case 'base64': return base64ToBytes(string).length default: if (loweredCase) return utf8ToBytes(string).length // assume utf8 encoding = ('' + encoding).toLowerCase(); loweredCase = true; } } } Buffer$1.byteLength = byteLength$1; function slowToString (encoding, start, end) { var loweredCase = false; // No need to verify that "this.length <= MAX_UINT32" since it's a read-only // property of a typed array. // This behaves neither like String nor Uint8Array in that we set start/end // to their upper/lower bounds if the value passed is out of range. // undefined is handled specially as per ECMA-262 6th Edition, // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization. if (start === undefined || start < 0) { start = 0; } // Return early if start > this.length. Done here to prevent potential uint32 // coercion fail below. if (start > this.length) { return '' } if (end === undefined || end > this.length) { end = this.length; } if (end <= 0) { return '' } // Force coersion to uint32. This will also coerce falsey/NaN values to 0. end >>>= 0; start >>>= 0; if (end <= start) { return '' } if (!encoding) encoding = 'utf8'; while (true) { switch (encoding) { case 'hex': return hexSlice(this, start, end) case 'utf8': case 'utf-8': return utf8Slice(this, start, end) case 'ascii': return asciiSlice(this, start, end) case 'latin1': case 'binary': return latin1Slice(this, start, end) case 'base64': return base64Slice(this, start, end) case 'ucs2': case 'ucs-2': case 'utf16le': case 'utf-16le': return utf16leSlice(this, start, end) default: if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding) encoding = (encoding + '').toLowerCase(); loweredCase = true; } } } // The property is used by `Buffer.isBuffer` and `is-buffer` (in Safari 5-7) to detect // Buffer instances. Buffer$1.prototype._isBuffer = true; function swap (b, n, m) { var i = b[n]; b[n] = b[m]; b[m] = i; } Buffer$1.prototype.swap16 = function swap16 () { var len = this.length; if (len % 2 !== 0) { throw new RangeError('Buffer size must be a multiple of 16-bits') } for (var i = 0; i < len; i += 2) { swap(this, i, i + 1); } return this }; Buffer$1.prototype.swap32 = function swap32 () { var len = this.length; if (len % 4 !== 0) { throw new RangeError('Buffer size must be a multiple of 32-bits') } for (var i = 0; i < len; i += 4) { swap(this, i, i + 3); swap(this, i + 1, i + 2); } return this }; Buffer$1.prototype.swap64 = function swap64 () { var len = this.length; if (len % 8 !== 0) { throw new RangeError('Buffer size must be a multiple of 64-bits') } for (var i = 0; i < len; i += 8) { swap(this, i, i + 7); swap(this, i + 1, i + 6); swap(this, i + 2, i + 5); swap(this, i + 3, i + 4); } return this }; Buffer$1.prototype.toString = function toString () { var length = this.length | 0; if (length === 0) return '' if (arguments.length === 0) return utf8Slice(this, 0, length) return slowToString.apply(this, arguments) }; Buffer$1.prototype.equals = function equals (b) { if (!internalIsBuffer(b)) throw new TypeError('Argument must be a Buffer') if (this === b) return true return Buffer$1.compare(this, b) === 0 }; Buffer$1.prototype.inspect = function inspect () { var str = ''; var max = INSPECT_MAX_BYTES; if (this.length > 0) { str = this.toString('hex', 0, max).match(/.{2}/g).join(' '); if (this.length > max) str += ' ... '; } return '' }; Buffer$1.prototype.compare = function compare (target, start, end, thisStart, thisEnd) { if (!internalIsBuffer(target)) { throw new TypeError('Argument must be a Buffer') } if (start === undefined) { start = 0; } if (end === undefined) { end = target ? target.length : 0; } if (thisStart === undefined) { thisStart = 0; } if (thisEnd === undefined) { thisEnd = this.length; } if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) { throw new RangeError('out of range index') } if (thisStart >= thisEnd && start >= end) { return 0 } if (thisStart >= thisEnd) { return -1 } if (start >= end) { return 1 } start >>>= 0; end >>>= 0; thisStart >>>= 0; thisEnd >>>= 0; if (this === target) return 0 var x = thisEnd - thisStart; var y = end - start; var len = Math.min(x, y); var thisCopy = this.slice(thisStart, thisEnd); var targetCopy = target.slice(start, end); for (var i = 0; i < len; ++i) { if (thisCopy[i] !== targetCopy[i]) { x = thisCopy[i]; y = targetCopy[i]; break } } if (x < y) return -1 if (y < x) return 1 return 0 }; // Finds either the first index of `val` in `buffer` at offset >= `byteOffset`, // OR the last index of `val` in `buffer` at offset <= `byteOffset`. // // Arguments: // - buffer - a Buffer to search // - val - a string, Buffer, or number // - byteOffset - an index into `buffer`; will be clamped to an int32 // - encoding - an optional encoding, relevant is val is a string // - dir - true for indexOf, false for lastIndexOf function bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) { // Empty buffer means no match if (buffer.length === 0) return -1 // Normalize byteOffset if (typeof byteOffset === 'string') { encoding = byteOffset; byteOffset = 0; } else if (byteOffset > 0x7fffffff) { byteOffset = 0x7fffffff; } else if (byteOffset < -0x80000000) { byteOffset = -0x80000000; } byteOffset = +byteOffset; // Coerce to Number. if (isNaN(byteOffset)) { // byteOffset: it it's undefined, null, NaN, "foo", etc, search whole buffer byteOffset = dir ? 0 : (buffer.length - 1); } // Normalize byteOffset: negative offsets start from the end of the buffer if (byteOffset < 0) byteOffset = buffer.length + byteOffset; if (byteOffset >= buffer.length) { if (dir) return -1 else byteOffset = buffer.length - 1; } else if (byteOffset < 0) { if (dir) byteOffset = 0; else return -1 } // Normalize val if (typeof val === 'string') { val = Buffer$1.from(val, encoding); } // Finally, search either indexOf (if dir is true) or lastIndexOf if (internalIsBuffer(val)) { // Special case: looking for empty string/buffer always fails if (val.length === 0) { return -1 } return arrayIndexOf(buffer, val, byteOffset, encoding, dir) } else if (typeof val === 'number') { val = val & 0xFF; // Search for a byte value [0-255] if (Buffer$1.TYPED_ARRAY_SUPPORT && typeof Uint8Array.prototype.indexOf === 'function') { if (dir) { return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset) } else { return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset) } } return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir) } throw new TypeError('val must be string, number or Buffer') } function arrayIndexOf (arr, val, byteOffset, encoding, dir) { var indexSize = 1; var arrLength = arr.length; var valLength = val.length; if (encoding !== undefined) { encoding = String(encoding).toLowerCase(); if (encoding === 'ucs2' || encoding === 'ucs-2' || encoding === 'utf16le' || encoding === 'utf-16le') { if (arr.length < 2 || val.length < 2) { return -1 } indexSize = 2; arrLength /= 2; valLength /= 2; byteOffset /= 2; } } function read (buf, i) { if (indexSize === 1) { return buf[i] } else { return buf.readUInt16BE(i * indexSize) } } var i; if (dir) { var foundIndex = -1; for (i = byteOffset; i < arrLength; i++) { if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) { if (foundIndex === -1) foundIndex = i; if (i - foundIndex + 1 === valLength) return foundIndex * indexSize } else { if (foundIndex !== -1) i -= i - foundIndex; foundIndex = -1; } } } else { if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength; for (i = byteOffset; i >= 0; i--) { var found = true; for (var j = 0; j < valLength; j++) { if (read(arr, i + j) !== read(val, j)) { found = false; break } } if (found) return i } } return -1 } Buffer$1.prototype.includes = function includes (val, byteOffset, encoding) { return this.indexOf(val, byteOffset, encoding) !== -1 }; Buffer$1.prototype.indexOf = function indexOf (val, byteOffset, encoding) { return bidirectionalIndexOf(this, val, byteOffset, encoding, true) }; Buffer$1.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) { return bidirectionalIndexOf(this, val, byteOffset, encoding, false) }; function hexWrite (buf, string, offset, length) { offset = Number(offset) || 0; var remaining = buf.length - offset; if (!length) { length = remaining; } else { length = Number(length); if (length > remaining) { length = remaining; } } // must be an even number of digits var strLen = string.length; if (strLen % 2 !== 0) throw new TypeError('Invalid hex string') if (length > strLen / 2) { length = strLen / 2; } for (var i = 0; i < length; ++i) { var parsed = parseInt(string.substr(i * 2, 2), 16); if (isNaN(parsed)) return i buf[offset + i] = parsed; } return i } function utf8Write (buf, string, offset, length) { return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length) } function asciiWrite (buf, string, offset, length) { return blitBuffer(asciiToBytes(string), buf, offset, length) } function latin1Write (buf, string, offset, length) { return asciiWrite(buf, string, offset, length) } function base64Write (buf, string, offset, length) { return blitBuffer(base64ToBytes(string), buf, offset, length) } function ucs2Write (buf, string, offset, length) { return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length) } Buffer$1.prototype.write = function write (string, offset, length, encoding) { // Buffer#write(string) if (offset === undefined) { encoding = 'utf8'; length = this.length; offset = 0; // Buffer#write(string, encoding) } else if (length === undefined && typeof offset === 'string') { encoding = offset; length = this.length; offset = 0; // Buffer#write(string, offset[, length][, encoding]) } else if (isFinite(offset)) { offset = offset | 0; if (isFinite(length)) { length = length | 0; if (encoding === undefined) encoding = 'utf8'; } else { encoding = length; length = undefined; } // legacy write(string, encoding, offset, length) - remove in v0.13 } else { throw new Error( 'Buffer.write(string, encoding, offset[, length]) is no longer supported' ) } var remaining = this.length - offset; if (length === undefined || length > remaining) length = remaining; if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) { throw new RangeError('Attempt to write outside buffer bounds') } if (!encoding) encoding = 'utf8'; var loweredCase = false; for (;;) { switch (encoding) { case 'hex': return hexWrite(this, string, offset, length) case 'utf8': case 'utf-8': return utf8Write(this, string, offset, length) case 'ascii': return asciiWrite(this, string, offset, length) case 'latin1': case 'binary': return latin1Write(this, string, offset, length) case 'base64': // Warning: maxLength not taken into account in base64Write return base64Write(this, string, offset, length) case 'ucs2': case 'ucs-2': case 'utf16le': case 'utf-16le': return ucs2Write(this, string, offset, length) default: if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding) encoding = ('' + encoding).toLowerCase(); loweredCase = true; } } }; Buffer$1.prototype.toJSON = function toJSON () { return { type: 'Buffer', data: Array.prototype.slice.call(this._arr || this, 0) } }; function base64Slice (buf, start, end) { if (start === 0 && end === buf.length) { return fromByteArray$1(buf) } else { return fromByteArray$1(buf.slice(start, end)) } } function utf8Slice (buf, start, end) { end = Math.min(buf.length, end); var res = []; var i = start; while (i < end) { var firstByte = buf[i]; var codePoint = null; var bytesPerSequence = (firstByte > 0xEF) ? 4 : (firstByte > 0xDF) ? 3 : (firstByte > 0xBF) ? 2 : 1; if (i + bytesPerSequence <= end) { var secondByte, thirdByte, fourthByte, tempCodePoint; switch (bytesPerSequence) { case 1: if (firstByte < 0x80) { codePoint = firstByte; } break case 2: secondByte = buf[i + 1]; if ((secondByte & 0xC0) === 0x80) { tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F); if (tempCodePoint > 0x7F) { codePoint = tempCodePoint; } } break case 3: secondByte = buf[i + 1]; thirdByte = buf[i + 2]; if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) { tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F); if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) { codePoint = tempCodePoint; } } break case 4: secondByte = buf[i + 1]; thirdByte = buf[i + 2]; fourthByte = buf[i + 3]; if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) { tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F); if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) { codePoint = tempCodePoint; } } } } if (codePoint === null) { // we did not generate a valid codePoint so insert a // replacement char (U+FFFD) and advance only 1 byte codePoint = 0xFFFD; bytesPerSequence = 1; } else if (codePoint > 0xFFFF) { // encode to utf16 (surrogate pair dance) codePoint -= 0x10000; res.push(codePoint >>> 10 & 0x3FF | 0xD800); codePoint = 0xDC00 | codePoint & 0x3FF; } res.push(codePoint); i += bytesPerSequence; } return decodeCodePointsArray(res) } // Based on http://stackoverflow.com/a/22747272/680742, the browser with // the lowest limit is Chrome, with 0x10000 args. // We go 1 magnitude less, for safety var MAX_ARGUMENTS_LENGTH = 0x1000; function decodeCodePointsArray (codePoints) { var len = codePoints.length; if (len <= MAX_ARGUMENTS_LENGTH) { return String.fromCharCode.apply(String, codePoints) // avoid extra slice() } // Decode in chunks to avoid "call stack size exceeded". var res = ''; var i = 0; while (i < len) { res += String.fromCharCode.apply( String, codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH) ); } return res } function asciiSlice (buf, start, end) { var ret = ''; end = Math.min(buf.length, end); for (var i = start; i < end; ++i) { ret += String.fromCharCode(buf[i] & 0x7F); } return ret } function latin1Slice (buf, start, end) { var ret = ''; end = Math.min(buf.length, end); for (var i = start; i < end; ++i) { ret += String.fromCharCode(buf[i]); } return ret } function hexSlice (buf, start, end) { var len = buf.length; if (!start || start < 0) start = 0; if (!end || end < 0 || end > len) end = len; var out = ''; for (var i = start; i < end; ++i) { out += toHex(buf[i]); } return out } function utf16leSlice (buf, start, end) { var bytes = buf.slice(start, end); var res = ''; for (var i = 0; i < bytes.length; i += 2) { res += String.fromCharCode(bytes[i] + bytes[i + 1] * 256); } return res } Buffer$1.prototype.slice = function slice (start, end) { var len = this.length; start = ~~start; end = end === undefined ? len : ~~end; if (start < 0) { start += len; if (start < 0) start = 0; } else if (start > len) { start = len; } if (end < 0) { end += len; if (end < 0) end = 0; } else if (end > len) { end = len; } if (end < start) end = start; var newBuf; if (Buffer$1.TYPED_ARRAY_SUPPORT) { newBuf = this.subarray(start, end); newBuf.__proto__ = Buffer$1.prototype; } else { var sliceLen = end - start; newBuf = new Buffer$1(sliceLen, undefined); for (var i = 0; i < sliceLen; ++i) { newBuf[i] = this[i + start]; } } return newBuf }; /* * Need to make sure that buffer isn't trying to write out of bounds. */ function checkOffset (offset, ext, length) { if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint') if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length') } Buffer$1.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) { offset = offset | 0; byteLength = byteLength | 0; if (!noAssert) checkOffset(offset, byteLength, this.length); var val = this[offset]; var mul = 1; var i = 0; while (++i < byteLength && (mul *= 0x100)) { val += this[offset + i] * mul; } return val }; Buffer$1.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) { offset = offset | 0; byteLength = byteLength | 0; if (!noAssert) { checkOffset(offset, byteLength, this.length); } var val = this[offset + --byteLength]; var mul = 1; while (byteLength > 0 && (mul *= 0x100)) { val += this[offset + --byteLength] * mul; } return val }; Buffer$1.prototype.readUInt8 = function readUInt8 (offset, noAssert) { if (!noAssert) checkOffset(offset, 1, this.length); return this[offset] }; Buffer$1.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) { if (!noAssert) checkOffset(offset, 2, this.length); return this[offset] | (this[offset + 1] << 8) }; Buffer$1.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) { if (!noAssert) checkOffset(offset, 2, this.length); return (this[offset] << 8) | this[offset + 1] }; Buffer$1.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) { if (!noAssert) checkOffset(offset, 4, this.length); return ((this[offset]) | (this[offset + 1] << 8) | (this[offset + 2] << 16)) + (this[offset + 3] * 0x1000000) }; Buffer$1.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) { if (!noAssert) checkOffset(offset, 4, this.length); return (this[offset] * 0x1000000) + ((this[offset + 1] << 16) | (this[offset + 2] << 8) | this[offset + 3]) }; Buffer$1.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) { offset = offset | 0; byteLength = byteLength | 0; if (!noAssert) checkOffset(offset, byteLength, this.length); var val = this[offset]; var mul = 1; var i = 0; while (++i < byteLength && (mul *= 0x100)) { val += this[offset + i] * mul; } mul *= 0x80; if (val >= mul) val -= Math.pow(2, 8 * byteLength); return val }; Buffer$1.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) { offset = offset | 0; byteLength = byteLength | 0; if (!noAssert) checkOffset(offset, byteLength, this.length); var i = byteLength; var mul = 1; var val = this[offset + --i]; while (i > 0 && (mul *= 0x100)) { val += this[offset + --i] * mul; } mul *= 0x80; if (val >= mul) val -= Math.pow(2, 8 * byteLength); return val }; Buffer$1.prototype.readInt8 = function readInt8 (offset, noAssert) { if (!noAssert) checkOffset(offset, 1, this.length); if (!(this[offset] & 0x80)) return (this[offset]) return ((0xff - this[offset] + 1) * -1) }; Buffer$1.prototype.readInt16LE = function readInt16LE (offset, noAssert) { if (!noAssert) checkOffset(offset, 2, this.length); var val = this[offset] | (this[offset + 1] << 8); return (val & 0x8000) ? val | 0xFFFF0000 : val }; Buffer$1.prototype.readInt16BE = function readInt16BE (offset, noAssert) { if (!noAssert) checkOffset(offset, 2, this.length); var val = this[offset + 1] | (this[offset] << 8); return (val & 0x8000) ? val | 0xFFFF0000 : val }; Buffer$1.prototype.readInt32LE = function readInt32LE (offset, noAssert) { if (!noAssert) checkOffset(offset, 4, this.length); return (this[offset]) | (this[offset + 1] << 8) | (this[offset + 2] << 16) | (this[offset + 3] << 24) }; Buffer$1.prototype.readInt32BE = function readInt32BE (offset, noAssert) { if (!noAssert) checkOffset(offset, 4, this.length); return (this[offset] << 24) | (this[offset + 1] << 16) | (this[offset + 2] << 8) | (this[offset + 3]) }; Buffer$1.prototype.readFloatLE = function readFloatLE (offset, noAssert) { if (!noAssert) checkOffset(offset, 4, this.length); return read(this, offset, true, 23, 4) }; Buffer$1.prototype.readFloatBE = function readFloatBE (offset, noAssert) { if (!noAssert) checkOffset(offset, 4, this.length); return read(this, offset, false, 23, 4) }; Buffer$1.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) { if (!noAssert) checkOffset(offset, 8, this.length); return read(this, offset, true, 52, 8) }; Buffer$1.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) { if (!noAssert) checkOffset(offset, 8, this.length); return read(this, offset, false, 52, 8) }; function checkInt (buf, value, offset, ext, max, min) { if (!internalIsBuffer(buf)) throw new TypeError('"buffer" argument must be a Buffer instance') if (value > max || value < min) throw new RangeError('"value" argument is out of bounds') if (offset + ext > buf.length) throw new RangeError('Index out of range') } Buffer$1.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) { value = +value; offset = offset | 0; byteLength = byteLength | 0; if (!noAssert) { var maxBytes = Math.pow(2, 8 * byteLength) - 1; checkInt(this, value, offset, byteLength, maxBytes, 0); } var mul = 1; var i = 0; this[offset] = value & 0xFF; while (++i < byteLength && (mul *= 0x100)) { this[offset + i] = (value / mul) & 0xFF; } return offset + byteLength }; Buffer$1.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) { value = +value; offset = offset | 0; byteLength = byteLength | 0; if (!noAssert) { var maxBytes = Math.pow(2, 8 * byteLength) - 1; checkInt(this, value, offset, byteLength, maxBytes, 0); } var i = byteLength - 1; var mul = 1; this[offset + i] = value & 0xFF; while (--i >= 0 && (mul *= 0x100)) { this[offset + i] = (value / mul) & 0xFF; } return offset + byteLength }; Buffer$1.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) { value = +value; offset = offset | 0; if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0); if (!Buffer$1.TYPED_ARRAY_SUPPORT) value = Math.floor(value); this[offset] = (value & 0xff); return offset + 1 }; function objectWriteUInt16 (buf, value, offset, littleEndian) { if (value < 0) value = 0xffff + value + 1; for (var i = 0, j = Math.min(buf.length - offset, 2); i < j; ++i) { buf[offset + i] = (value & (0xff << (8 * (littleEndian ? i : 1 - i)))) >>> (littleEndian ? i : 1 - i) * 8; } } Buffer$1.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) { value = +value; offset = offset | 0; if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0); if (Buffer$1.TYPED_ARRAY_SUPPORT) { this[offset] = (value & 0xff); this[offset + 1] = (value >>> 8); } else { objectWriteUInt16(this, value, offset, true); } return offset + 2 }; Buffer$1.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) { value = +value; offset = offset | 0; if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0); if (Buffer$1.TYPED_ARRAY_SUPPORT) { this[offset] = (value >>> 8); this[offset + 1] = (value & 0xff); } else { objectWriteUInt16(this, value, offset, false); } return offset + 2 }; function objectWriteUInt32 (buf, value, offset, littleEndian) { if (value < 0) value = 0xffffffff + value + 1; for (var i = 0, j = Math.min(buf.length - offset, 4); i < j; ++i) { buf[offset + i] = (value >>> (littleEndian ? i : 3 - i) * 8) & 0xff; } } Buffer$1.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) { value = +value; offset = offset | 0; if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0); if (Buffer$1.TYPED_ARRAY_SUPPORT) { this[offset + 3] = (value >>> 24); this[offset + 2] = (value >>> 16); this[offset + 1] = (value >>> 8); this[offset] = (value & 0xff); } else { objectWriteUInt32(this, value, offset, true); } return offset + 4 }; Buffer$1.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) { value = +value; offset = offset | 0; if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0); if (Buffer$1.TYPED_ARRAY_SUPPORT) { this[offset] = (value >>> 24); this[offset + 1] = (value >>> 16); this[offset + 2] = (value >>> 8); this[offset + 3] = (value & 0xff); } else { objectWriteUInt32(this, value, offset, false); } return offset + 4 }; Buffer$1.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) { value = +value; offset = offset | 0; if (!noAssert) { var limit = Math.pow(2, 8 * byteLength - 1); checkInt(this, value, offset, byteLength, limit - 1, -limit); } var i = 0; var mul = 1; var sub = 0; this[offset] = value & 0xFF; while (++i < byteLength && (mul *= 0x100)) { if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) { sub = 1; } this[offset + i] = ((value / mul) >> 0) - sub & 0xFF; } return offset + byteLength }; Buffer$1.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) { value = +value; offset = offset | 0; if (!noAssert) { var limit = Math.pow(2, 8 * byteLength - 1); checkInt(this, value, offset, byteLength, limit - 1, -limit); } var i = byteLength - 1; var mul = 1; var sub = 0; this[offset + i] = value & 0xFF; while (--i >= 0 && (mul *= 0x100)) { if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) { sub = 1; } this[offset + i] = ((value / mul) >> 0) - sub & 0xFF; } return offset + byteLength }; Buffer$1.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) { value = +value; offset = offset | 0; if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80); if (!Buffer$1.TYPED_ARRAY_SUPPORT) value = Math.floor(value); if (value < 0) value = 0xff + value + 1; this[offset] = (value & 0xff); return offset + 1 }; Buffer$1.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) { value = +value; offset = offset | 0; if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000); if (Buffer$1.TYPED_ARRAY_SUPPORT) { this[offset] = (value & 0xff); this[offset + 1] = (value >>> 8); } else { objectWriteUInt16(this, value, offset, true); } return offset + 2 }; Buffer$1.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) { value = +value; offset = offset | 0; if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000); if (Buffer$1.TYPED_ARRAY_SUPPORT) { this[offset] = (value >>> 8); this[offset + 1] = (value & 0xff); } else { objectWriteUInt16(this, value, offset, false); } return offset + 2 }; Buffer$1.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) { value = +value; offset = offset | 0; if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000); if (Buffer$1.TYPED_ARRAY_SUPPORT) { this[offset] = (value & 0xff); this[offset + 1] = (value >>> 8); this[offset + 2] = (value >>> 16); this[offset + 3] = (value >>> 24); } else { objectWriteUInt32(this, value, offset, true); } return offset + 4 }; Buffer$1.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) { value = +value; offset = offset | 0; if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000); if (value < 0) value = 0xffffffff + value + 1; if (Buffer$1.TYPED_ARRAY_SUPPORT) { this[offset] = (value >>> 24); this[offset + 1] = (value >>> 16); this[offset + 2] = (value >>> 8); this[offset + 3] = (value & 0xff); } else { objectWriteUInt32(this, value, offset, false); } return offset + 4 }; function checkIEEE754 (buf, value, offset, ext, max, min) { if (offset + ext > buf.length) throw new RangeError('Index out of range') if (offset < 0) throw new RangeError('Index out of range') } function writeFloat (buf, value, offset, littleEndian, noAssert) { if (!noAssert) { checkIEEE754(buf, value, offset, 4); } write(buf, value, offset, littleEndian, 23, 4); return offset + 4 } Buffer$1.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) { return writeFloat(this, value, offset, true, noAssert) }; Buffer$1.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) { return writeFloat(this, value, offset, false, noAssert) }; function writeDouble (buf, value, offset, littleEndian, noAssert) { if (!noAssert) { checkIEEE754(buf, value, offset, 8); } write(buf, value, offset, littleEndian, 52, 8); return offset + 8 } Buffer$1.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) { return writeDouble(this, value, offset, true, noAssert) }; Buffer$1.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) { return writeDouble(this, value, offset, false, noAssert) }; // copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length) Buffer$1.prototype.copy = function copy (target, targetStart, start, end) { if (!start) start = 0; if (!end && end !== 0) end = this.length; if (targetStart >= target.length) targetStart = target.length; if (!targetStart) targetStart = 0; if (end > 0 && end < start) end = start; // Copy 0 bytes; we're done if (end === start) return 0 if (target.length === 0 || this.length === 0) return 0 // Fatal error conditions if (targetStart < 0) { throw new RangeError('targetStart out of bounds') } if (start < 0 || start >= this.length) throw new RangeError('sourceStart out of bounds') if (end < 0) throw new RangeError('sourceEnd out of bounds') // Are we oob? if (end > this.length) end = this.length; if (target.length - targetStart < end - start) { end = target.length - targetStart + start; } var len = end - start; var i; if (this === target && start < targetStart && targetStart < end) { // descending copy from end for (i = len - 1; i >= 0; --i) { target[i + targetStart] = this[i + start]; } } else if (len < 1000 || !Buffer$1.TYPED_ARRAY_SUPPORT) { // ascending copy from start for (i = 0; i < len; ++i) { target[i + targetStart] = this[i + start]; } } else { Uint8Array.prototype.set.call( target, this.subarray(start, start + len), targetStart ); } return len }; // Usage: // buffer.fill(number[, offset[, end]]) // buffer.fill(buffer[, offset[, end]]) // buffer.fill(string[, offset[, end]][, encoding]) Buffer$1.prototype.fill = function fill (val, start, end, encoding) { // Handle string cases: if (typeof val === 'string') { if (typeof start === 'string') { encoding = start; start = 0; end = this.length; } else if (typeof end === 'string') { encoding = end; end = this.length; } if (val.length === 1) { var code = val.charCodeAt(0); if (code < 256) { val = code; } } if (encoding !== undefined && typeof encoding !== 'string') { throw new TypeError('encoding must be a string') } if (typeof encoding === 'string' && !Buffer$1.isEncoding(encoding)) { throw new TypeError('Unknown encoding: ' + encoding) } } else if (typeof val === 'number') { val = val & 255; } // Invalid ranges are not set to a default, so can range check early. if (start < 0 || this.length < start || this.length < end) { throw new RangeError('Out of range index') } if (end <= start) { return this } start = start >>> 0; end = end === undefined ? this.length : end >>> 0; if (!val) val = 0; var i; if (typeof val === 'number') { for (i = start; i < end; ++i) { this[i] = val; } } else { var bytes = internalIsBuffer(val) ? val : utf8ToBytes(new Buffer$1(val, encoding).toString()); var len = bytes.length; for (i = 0; i < end - start; ++i) { this[i + start] = bytes[i % len]; } } return this }; // HELPER FUNCTIONS // ================ var INVALID_BASE64_RE = /[^+\/0-9A-Za-z-_]/g; function base64clean (str) { // Node strips out invalid characters like \n and \t from the string, base64-js does not str = stringtrim(str).replace(INVALID_BASE64_RE, ''); // Node converts strings with length < 2 to '' if (str.length < 2) return '' // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not while (str.length % 4 !== 0) { str = str + '='; } return str } function stringtrim (str) { if (str.trim) return str.trim() return str.replace(/^\s+|\s+$/g, '') } function toHex (n) { if (n < 16) return '0' + n.toString(16) return n.toString(16) } function utf8ToBytes (string, units) { units = units || Infinity; var codePoint; var length = string.length; var leadSurrogate = null; var bytes = []; for (var i = 0; i < length; ++i) { codePoint = string.charCodeAt(i); // is surrogate component if (codePoint > 0xD7FF && codePoint < 0xE000) { // last char was a lead if (!leadSurrogate) { // no lead yet if (codePoint > 0xDBFF) { // unexpected trail if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD); continue } else if (i + 1 === length) { // unpaired lead if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD); continue } // valid lead leadSurrogate = codePoint; continue } // 2 leads in a row if (codePoint < 0xDC00) { if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD); leadSurrogate = codePoint; continue } // valid surrogate pair codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000; } else if (leadSurrogate) { // valid bmp char, but last char was a lead if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD); } leadSurrogate = null; // encode utf8 if (codePoint < 0x80) { if ((units -= 1) < 0) break bytes.push(codePoint); } else if (codePoint < 0x800) { if ((units -= 2) < 0) break bytes.push( codePoint >> 0x6 | 0xC0, codePoint & 0x3F | 0x80 ); } else if (codePoint < 0x10000) { if ((units -= 3) < 0) break bytes.push( codePoint >> 0xC | 0xE0, codePoint >> 0x6 & 0x3F | 0x80, codePoint & 0x3F | 0x80 ); } else if (codePoint < 0x110000) { if ((units -= 4) < 0) break bytes.push( codePoint >> 0x12 | 0xF0, codePoint >> 0xC & 0x3F | 0x80, codePoint >> 0x6 & 0x3F | 0x80, codePoint & 0x3F | 0x80 ); } else { throw new Error('Invalid code point') } } return bytes } function asciiToBytes (str) { var byteArray = []; for (var i = 0; i < str.length; ++i) { // Node's code seems to be doing this and not & 0x7F.. byteArray.push(str.charCodeAt(i) & 0xFF); } return byteArray } function utf16leToBytes (str, units) { var c, hi, lo; var byteArray = []; for (var i = 0; i < str.length; ++i) { if ((units -= 2) < 0) break c = str.charCodeAt(i); hi = c >> 8; lo = c % 256; byteArray.push(lo); byteArray.push(hi); } return byteArray } function base64ToBytes (str) { return toByteArray$1(base64clean(str)) } function blitBuffer (src, dst, offset, length) { for (var i = 0; i < length; ++i) { if ((i + offset >= dst.length) || (i >= src.length)) break dst[i + offset] = src[i]; } return i } function isnan (val) { return val !== val // eslint-disable-line no-self-compare } // the following is from is-buffer, also by Feross Aboukhadijeh and with same lisence // The _isBuffer check is for Safari 5-7 support, because it's missing // Object.prototype.constructor. Remove this eventually function isBuffer$1(obj) { return obj != null && (!!obj._isBuffer || isFastBuffer(obj) || isSlowBuffer(obj)) } function isFastBuffer (obj) { return !!obj.constructor && typeof obj.constructor.isBuffer === 'function' && obj.constructor.isBuffer(obj) } // For Node v0.10 support. Remove this eventually. function isSlowBuffer (obj) { return typeof obj.readFloatLE === 'function' && typeof obj.slice === 'function' && isFastBuffer(obj.slice(0, 0)) } var sourcemapCodec_umd = {exports: {}}; var hasRequiredSourcemapCodec_umd; function requireSourcemapCodec_umd() { if (hasRequiredSourcemapCodec_umd) return sourcemapCodec_umd.exports; hasRequiredSourcemapCodec_umd = 1; (function (module, exports) { (function (global, factory) { factory(exports) ; })(commonjsGlobal, function (exports) { var comma = ','.charCodeAt(0); var semicolon = ';'.charCodeAt(0); var chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; var intToChar = new Uint8Array(64); var charToInt = new Uint8Array(128); for (var i = 0; i < chars.length; i++) { var c = chars.charCodeAt(i); intToChar[i] = c; charToInt[c] = i; } var td = typeof TextDecoder !== 'undefined' ? new TextDecoder() : typeof Buffer$1 !== 'undefined' ? { decode: function decode(buf) { var out = Buffer$1.from(buf.buffer, buf.byteOffset, buf.byteLength); return out.toString(); } } : { decode: function decode(buf) { var out = ''; for (var _i = 0; _i < buf.length; _i++) { out += String.fromCharCode(buf[_i]); } return out; } }; function decode(mappings) { var state = new Int32Array(5); var decoded = []; var index = 0; do { var semi = indexOf(mappings, index); var line = []; var sorted = true; var lastCol = 0; state[0] = 0; for (var _i2 = index; _i2 < semi; _i2++) { var seg = void 0; _i2 = decodeInteger(mappings, _i2, state, 0); var col = state[0]; if (col < lastCol) sorted = false; lastCol = col; if (hasMoreVlq(mappings, _i2, semi)) { _i2 = decodeInteger(mappings, _i2, state, 1); _i2 = decodeInteger(mappings, _i2, state, 2); _i2 = decodeInteger(mappings, _i2, state, 3); if (hasMoreVlq(mappings, _i2, semi)) { _i2 = decodeInteger(mappings, _i2, state, 4); seg = [col, state[1], state[2], state[3], state[4]]; } else { seg = [col, state[1], state[2], state[3]]; } } else { seg = [col]; } line.push(seg); } if (!sorted) sort(line); decoded.push(line); index = semi + 1; } while (index <= mappings.length); return decoded; } function indexOf(mappings, index) { var idx = mappings.indexOf(';', index); return idx === -1 ? mappings.length : idx; } function decodeInteger(mappings, pos, state, j) { var value = 0; var shift = 0; var integer = 0; do { var _c = mappings.charCodeAt(pos++); integer = charToInt[_c]; value |= (integer & 31) << shift; shift += 5; } while (integer & 32); var shouldNegate = value & 1; value >>>= 1; if (shouldNegate) { value = -0x80000000 | -value; } state[j] += value; return pos; } function hasMoreVlq(mappings, i, length) { if (i >= length) return false; return mappings.charCodeAt(i) !== comma; } function sort(line) { line.sort(sortComparator); } function sortComparator(a, b) { return a[0] - b[0]; } function encode(decoded) { var state = new Int32Array(5); var bufLength = 1024 * 16; var subLength = bufLength - 36; var buf = new Uint8Array(bufLength); var sub = buf.subarray(0, subLength); var pos = 0; var out = ''; for (var _i3 = 0; _i3 < decoded.length; _i3++) { var line = decoded[_i3]; if (_i3 > 0) { if (pos === bufLength) { out += td.decode(buf); pos = 0; } buf[pos++] = semicolon; } if (line.length === 0) continue; state[0] = 0; for (var j = 0; j < line.length; j++) { var segment = line[j]; if (pos > subLength) { out += td.decode(sub); buf.copyWithin(0, subLength, pos); pos -= subLength; } if (j > 0) buf[pos++] = comma; pos = encodeInteger(buf, pos, state, segment, 0); if (segment.length === 1) continue; pos = encodeInteger(buf, pos, state, segment, 1); pos = encodeInteger(buf, pos, state, segment, 2); pos = encodeInteger(buf, pos, state, segment, 3); if (segment.length === 4) continue; pos = encodeInteger(buf, pos, state, segment, 4); } } return out + td.decode(buf.subarray(0, pos)); } function encodeInteger(buf, pos, state, segment, j) { var next = segment[j]; var num = next - state[j]; state[j] = next; num = num < 0 ? -num << 1 | 1 : num << 1; do { var clamped = num & 31; num >>>= 5; if (num > 0) clamped |= 32; buf[pos++] = intToChar[clamped]; } while (num > 0); return pos; } exports.decode = decode; exports.encode = encode; Object.defineProperty(exports, '__esModule', { value: true }); }); })(sourcemapCodec_umd, sourcemapCodec_umd.exports); return sourcemapCodec_umd.exports; } var traceMapping_umd = {exports: {}}; var resolveUri_umd = {exports: {}}; var hasRequiredResolveUri_umd; function requireResolveUri_umd() { if (hasRequiredResolveUri_umd) return resolveUri_umd.exports; hasRequiredResolveUri_umd = 1; (function (module, exports) { (function (global, factory) { module.exports = factory() ; })(commonjsGlobal, function () { var schemeRegex = /^[\w+.-]+:\/\//; var urlRegex = /^([\w+.-]+:)\/\/([^@/#?]*@)?([^:/#?]*)(:\d+)?(\/[^#?]*)?(\?[^#]*)?(#.*)?/; var fileRegex = /^file:(?:\/\/((?![a-z]:)[^/#?]*)?)?(\/?[^#?]*)(\?[^#]*)?(#.*)?/i; var UrlType; (function (UrlType) { UrlType[UrlType["Empty"] = 1] = "Empty"; UrlType[UrlType["Hash"] = 2] = "Hash"; UrlType[UrlType["Query"] = 3] = "Query"; UrlType[UrlType["RelativePath"] = 4] = "RelativePath"; UrlType[UrlType["AbsolutePath"] = 5] = "AbsolutePath"; UrlType[UrlType["SchemeRelative"] = 6] = "SchemeRelative"; UrlType[UrlType["Absolute"] = 7] = "Absolute"; })(UrlType || (UrlType = {})); function isAbsoluteUrl(input) { return schemeRegex.test(input); } function isSchemeRelativeUrl(input) { return input.startsWith('//'); } function isAbsolutePath(input) { return input.startsWith('/'); } function isFileUrl(input) { return input.startsWith('file:'); } function isRelative(input) { return /^[.?#]/.test(input); } function parseAbsoluteUrl(input) { var match = urlRegex.exec(input); return makeUrl(match[1], match[2] || '', match[3], match[4] || '', match[5] || '/', match[6] || '', match[7] || ''); } function parseFileUrl(input) { var match = fileRegex.exec(input); var path = match[2]; return makeUrl('file:', '', match[1] || '', '', isAbsolutePath(path) ? path : '/' + path, match[3] || '', match[4] || ''); } function makeUrl(scheme, user, host, port, path, query, hash) { return { scheme: scheme, user: user, host: host, port: port, path: path, query: query, hash: hash, type: UrlType.Absolute }; } function parseUrl(input) { if (isSchemeRelativeUrl(input)) { var _url = parseAbsoluteUrl('http:' + input); _url.scheme = ''; _url.type = UrlType.SchemeRelative; return _url; } if (isAbsolutePath(input)) { var _url2 = parseAbsoluteUrl('http://foo.com' + input); _url2.scheme = ''; _url2.host = ''; _url2.type = UrlType.AbsolutePath; return _url2; } if (isFileUrl(input)) return parseFileUrl(input); if (isAbsoluteUrl(input)) return parseAbsoluteUrl(input); var url = parseAbsoluteUrl('http://foo.com/' + input); url.scheme = ''; url.host = ''; url.type = input ? input.startsWith('?') ? UrlType.Query : input.startsWith('#') ? UrlType.Hash : UrlType.RelativePath : UrlType.Empty; return url; } function stripPathFilename(path) { if (path.endsWith('/..')) return path; var index = path.lastIndexOf('/'); return path.slice(0, index + 1); } function mergePaths(url, base) { normalizePath(base, base.type); if (url.path === '/') { url.path = base.path; } else { url.path = stripPathFilename(base.path) + url.path; } } function normalizePath(url, type) { var rel = type <= UrlType.RelativePath; var pieces = url.path.split('/'); var pointer = 1; var positive = 0; var addTrailingSlash = false; for (var i = 1; i < pieces.length; i++) { var piece = pieces[i]; if (!piece) { addTrailingSlash = true; continue; } addTrailingSlash = false; if (piece === '.') continue; if (piece === '..') { if (positive) { addTrailingSlash = true; positive--; pointer--; } else if (rel) { pieces[pointer++] = piece; } continue; } pieces[pointer++] = piece; positive++; } var path = ''; for (var _i = 1; _i < pointer; _i++) { path += '/' + pieces[_i]; } if (!path || addTrailingSlash && !path.endsWith('/..')) { path += '/'; } url.path = path; } function resolve(input, base) { if (!input && !base) return ''; var url = parseUrl(input); var inputType = url.type; if (base && inputType !== UrlType.Absolute) { var baseUrl = parseUrl(base); var baseType = baseUrl.type; switch (inputType) { case UrlType.Empty: url.hash = baseUrl.hash; case UrlType.Hash: url.query = baseUrl.query; case UrlType.Query: case UrlType.RelativePath: mergePaths(url, baseUrl); case UrlType.AbsolutePath: url.user = baseUrl.user; url.host = baseUrl.host; url.port = baseUrl.port; case UrlType.SchemeRelative: url.scheme = baseUrl.scheme; } if (baseType > inputType) inputType = baseType; } normalizePath(url, inputType); var queryHash = url.query + url.hash; switch (inputType) { case UrlType.Hash: case UrlType.Query: return queryHash; case UrlType.RelativePath: { var path = url.path.slice(1); if (!path) return queryHash || '.'; if (isRelative(base || input) && !isRelative(path)) { return './' + path + queryHash; } return path + queryHash; } case UrlType.AbsolutePath: return url.path + queryHash; default: return url.scheme + '//' + url.user + url.host + url.port + url.path + queryHash; } } return resolve; }); })(resolveUri_umd); return resolveUri_umd.exports; } (function (module, exports) { (function (global, factory) { factory(exports, requireSourcemapCodec_umd(), requireResolveUri_umd()) ; })(commonjsGlobal, function (exports, sourcemapCodec, resolveUri) { function _interopDefaultLegacy(e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } var resolveUri__default = _interopDefaultLegacy(resolveUri); function resolve(input, base) { if (base && !base.endsWith('/')) base += '/'; return resolveUri__default["default"](input, base); } function stripFilename(path) { if (!path) return ''; var index = path.lastIndexOf('/'); return path.slice(0, index + 1); } var COLUMN = 0; var SOURCES_INDEX = 1; var SOURCE_LINE = 2; var SOURCE_COLUMN = 3; var NAMES_INDEX = 4; var REV_GENERATED_LINE = 1; var REV_GENERATED_COLUMN = 2; function maybeSort(mappings, owned) { var unsortedIndex = nextUnsortedSegmentLine(mappings, 0); if (unsortedIndex === mappings.length) return mappings; if (!owned) mappings = mappings.slice(); for (var i = unsortedIndex; i < mappings.length; i = nextUnsortedSegmentLine(mappings, i + 1)) { mappings[i] = sortSegments(mappings[i], owned); } return mappings; } function nextUnsortedSegmentLine(mappings, start) { for (var i = start; i < mappings.length; i++) { if (!isSorted(mappings[i])) return i; } return mappings.length; } function isSorted(line) { for (var j = 1; j < line.length; j++) { if (line[j][COLUMN] < line[j - 1][COLUMN]) { return false; } } return true; } function sortSegments(line, owned) { if (!owned) line = line.slice(); return line.sort(sortComparator); } function sortComparator(a, b) { return a[COLUMN] - b[COLUMN]; } var found = false; function binarySearch(haystack, needle, low, high) { while (low <= high) { var mid = low + (high - low >> 1); var cmp = haystack[mid][COLUMN] - needle; if (cmp === 0) { found = true; return mid; } if (cmp < 0) { low = mid + 1; } else { high = mid - 1; } } found = false; return low - 1; } function upperBound(haystack, needle, index) { for (var i = index + 1; i < haystack.length; index = i++) { if (haystack[i][COLUMN] !== needle) break; } return index; } function lowerBound(haystack, needle, index) { for (var i = index - 1; i >= 0; index = i--) { if (haystack[i][COLUMN] !== needle) break; } return index; } function memoizedState() { return { lastKey: -1, lastNeedle: -1, lastIndex: -1 }; } function memoizedBinarySearch(haystack, needle, state, key) { var lastKey = state.lastKey, lastNeedle = state.lastNeedle, lastIndex = state.lastIndex; var low = 0; var high = haystack.length - 1; if (key === lastKey) { if (needle === lastNeedle) { found = lastIndex !== -1 && haystack[lastIndex][COLUMN] === needle; return lastIndex; } if (needle >= lastNeedle) { low = lastIndex === -1 ? 0 : lastIndex; } else { high = lastIndex; } } state.lastKey = key; state.lastNeedle = needle; return state.lastIndex = binarySearch(haystack, needle, low, high); } function buildBySources(decoded, memos) { var sources = memos.map(buildNullArray); for (var i = 0; i < decoded.length; i++) { var line = decoded[i]; for (var j = 0; j < line.length; j++) { var seg = line[j]; if (seg.length === 1) continue; var sourceIndex = seg[SOURCES_INDEX]; var sourceLine = seg[SOURCE_LINE]; var sourceColumn = seg[SOURCE_COLUMN]; var originalSource = sources[sourceIndex]; var originalLine = originalSource[sourceLine] || (originalSource[sourceLine] = []); var memo = memos[sourceIndex]; var index = upperBound(originalLine, sourceColumn, memoizedBinarySearch(originalLine, sourceColumn, memo, sourceLine)); insert(originalLine, memo.lastIndex = index + 1, [sourceColumn, i, seg[COLUMN]]); } } return sources; } function insert(array, index, value) { for (var i = array.length; i > index; i--) { array[i] = array[i - 1]; } array[index] = value; } function buildNullArray() { return { __proto__: null }; } var AnyMap = function AnyMap(map, mapUrl) { var parsed = typeof map === 'string' ? JSON.parse(map) : map; if (!('sections' in parsed)) return new TraceMap(parsed, mapUrl); var mappings = []; var sources = []; var sourcesContent = []; var names = []; recurse(parsed, mapUrl, mappings, sources, sourcesContent, names, 0, 0, Infinity, Infinity); var joined = { version: 3, file: parsed.file, names: names, sources: sources, sourcesContent: sourcesContent, mappings: mappings }; return exports.presortedDecodedMap(joined); }; function recurse(input, mapUrl, mappings, sources, sourcesContent, names, lineOffset, columnOffset, stopLine, stopColumn) { var sections = input.sections; for (var i = 0; i < sections.length; i++) { var _sections$i = sections[i], map = _sections$i.map, offset = _sections$i.offset; var sl = stopLine; var sc = stopColumn; if (i + 1 < sections.length) { var nextOffset = sections[i + 1].offset; sl = Math.min(stopLine, lineOffset + nextOffset.line); if (sl === stopLine) { sc = Math.min(stopColumn, columnOffset + nextOffset.column); } else if (sl < stopLine) { sc = columnOffset + nextOffset.column; } } addSection(map, mapUrl, mappings, sources, sourcesContent, names, lineOffset + offset.line, columnOffset + offset.column, sl, sc); } } function addSection(input, mapUrl, mappings, sources, sourcesContent, names, lineOffset, columnOffset, stopLine, stopColumn) { if ('sections' in input) return recurse.apply(void 0, arguments); var map = new TraceMap(input, mapUrl); var sourcesOffset = sources.length; var namesOffset = names.length; var decoded = exports.decodedMappings(map); var resolvedSources = map.resolvedSources, contents = map.sourcesContent; append(sources, resolvedSources); append(names, map.names); if (contents) append(sourcesContent, contents);else for (var i = 0; i < resolvedSources.length; i++) sourcesContent.push(null); for (var _i = 0; _i < decoded.length; _i++) { var lineI = lineOffset + _i; if (lineI > stopLine) return; var out = getLine(mappings, lineI); var cOffset = _i === 0 ? columnOffset : 0; var line = decoded[_i]; for (var j = 0; j < line.length; j++) { var seg = line[j]; var column = cOffset + seg[COLUMN]; if (lineI === stopLine && column >= stopColumn) return; if (seg.length === 1) { out.push([column]); continue; } var sourcesIndex = sourcesOffset + seg[SOURCES_INDEX]; var sourceLine = seg[SOURCE_LINE]; var sourceColumn = seg[SOURCE_COLUMN]; out.push(seg.length === 4 ? [column, sourcesIndex, sourceLine, sourceColumn] : [column, sourcesIndex, sourceLine, sourceColumn, namesOffset + seg[NAMES_INDEX]]); } } } function append(arr, other) { for (var i = 0; i < other.length; i++) arr.push(other[i]); } function getLine(arr, index) { for (var i = arr.length; i <= index; i++) arr[i] = []; return arr[index]; } var LINE_GTR_ZERO = '`line` must be greater than 0 (lines start at line 1)'; var COL_GTR_EQ_ZERO = '`column` must be greater than or equal to 0 (columns start at column 0)'; var LEAST_UPPER_BOUND = -1; var GREATEST_LOWER_BOUND = 1; exports.encodedMappings = void 0; exports.decodedMappings = void 0; exports.traceSegment = void 0; exports.originalPositionFor = void 0; exports.generatedPositionFor = void 0; exports.allGeneratedPositionsFor = void 0; exports.eachMapping = void 0; exports.sourceContentFor = void 0; exports.presortedDecodedMap = void 0; exports.decodedMap = void 0; exports.encodedMap = void 0; var TraceMap = _createClass(function TraceMap(map, mapUrl) { var isString = typeof map === 'string'; if (!isString && map._decodedMemo) return map; var parsed = isString ? JSON.parse(map) : map; var version = parsed.version, file = parsed.file, names = parsed.names, sourceRoot = parsed.sourceRoot, sources = parsed.sources, sourcesContent = parsed.sourcesContent; this.version = version; this.file = file; this.names = names; this.sourceRoot = sourceRoot; this.sources = sources; this.sourcesContent = sourcesContent; var from = resolve(sourceRoot || '', stripFilename(mapUrl)); this.resolvedSources = sources.map(function (s) { return resolve(s || '', from); }); var mappings = parsed.mappings; if (typeof mappings === 'string') { this._encoded = mappings; this._decoded = undefined; } else { this._encoded = undefined; this._decoded = maybeSort(mappings, isString); } this._decodedMemo = memoizedState(); this._bySources = undefined; this._bySourceMemos = undefined; }); (function () { exports.encodedMappings = function (map) { var _a; return (_a = map._encoded) !== null && _a !== void 0 ? _a : map._encoded = sourcemapCodec.encode(map._decoded); }; exports.decodedMappings = function (map) { return map._decoded || (map._decoded = sourcemapCodec.decode(map._encoded)); }; exports.traceSegment = function (map, line, column) { var decoded = exports.decodedMappings(map); if (line >= decoded.length) return null; var segments = decoded[line]; var index = traceSegmentInternal(segments, map._decodedMemo, line, column, GREATEST_LOWER_BOUND); return index === -1 ? null : segments[index]; }; exports.originalPositionFor = function (map, _ref) { var line = _ref.line, column = _ref.column, bias = _ref.bias; line--; if (line < 0) throw new Error(LINE_GTR_ZERO); if (column < 0) throw new Error(COL_GTR_EQ_ZERO); var decoded = exports.decodedMappings(map); if (line >= decoded.length) return OMapping(null, null, null, null); var segments = decoded[line]; var index = traceSegmentInternal(segments, map._decodedMemo, line, column, bias || GREATEST_LOWER_BOUND); if (index === -1) return OMapping(null, null, null, null); var segment = segments[index]; if (segment.length === 1) return OMapping(null, null, null, null); var names = map.names, resolvedSources = map.resolvedSources; return OMapping(resolvedSources[segment[SOURCES_INDEX]], segment[SOURCE_LINE] + 1, segment[SOURCE_COLUMN], segment.length === 5 ? names[segment[NAMES_INDEX]] : null); }; exports.allGeneratedPositionsFor = function (map, _ref2) { var source = _ref2.source, line = _ref2.line, column = _ref2.column, bias = _ref2.bias; return generatedPosition(map, source, line, column, bias || LEAST_UPPER_BOUND, true); }; exports.generatedPositionFor = function (map, _ref3) { var source = _ref3.source, line = _ref3.line, column = _ref3.column, bias = _ref3.bias; return generatedPosition(map, source, line, column, bias || GREATEST_LOWER_BOUND, false); }; exports.eachMapping = function (map, cb) { var decoded = exports.decodedMappings(map); var names = map.names, resolvedSources = map.resolvedSources; for (var i = 0; i < decoded.length; i++) { var line = decoded[i]; for (var j = 0; j < line.length; j++) { var seg = line[j]; var generatedLine = i + 1; var generatedColumn = seg[0]; var source = null; var originalLine = null; var originalColumn = null; var name = null; if (seg.length !== 1) { source = resolvedSources[seg[1]]; originalLine = seg[2] + 1; originalColumn = seg[3]; } if (seg.length === 5) name = names[seg[4]]; cb({ generatedLine: generatedLine, generatedColumn: generatedColumn, source: source, originalLine: originalLine, originalColumn: originalColumn, name: name }); } } }; exports.sourceContentFor = function (map, source) { var sources = map.sources, resolvedSources = map.resolvedSources, sourcesContent = map.sourcesContent; if (sourcesContent == null) return null; var index = sources.indexOf(source); if (index === -1) index = resolvedSources.indexOf(source); return index === -1 ? null : sourcesContent[index]; }; exports.presortedDecodedMap = function (map, mapUrl) { var tracer = new TraceMap(clone(map, []), mapUrl); tracer._decoded = map.mappings; return tracer; }; exports.decodedMap = function (map) { return clone(map, exports.decodedMappings(map)); }; exports.encodedMap = function (map) { return clone(map, exports.encodedMappings(map)); }; function generatedPosition(map, source, line, column, bias, all) { line--; if (line < 0) throw new Error(LINE_GTR_ZERO); if (column < 0) throw new Error(COL_GTR_EQ_ZERO); var sources = map.sources, resolvedSources = map.resolvedSources; var sourceIndex = sources.indexOf(source); if (sourceIndex === -1) sourceIndex = resolvedSources.indexOf(source); if (sourceIndex === -1) return all ? [] : GMapping(null, null); var generated = map._bySources || (map._bySources = buildBySources(exports.decodedMappings(map), map._bySourceMemos = sources.map(memoizedState))); var segments = generated[sourceIndex][line]; if (segments == null) return all ? [] : GMapping(null, null); var memo = map._bySourceMemos[sourceIndex]; if (all) return sliceGeneratedPositions(segments, memo, line, column, bias); var index = traceSegmentInternal(segments, memo, line, column, bias); if (index === -1) return GMapping(null, null); var segment = segments[index]; return GMapping(segment[REV_GENERATED_LINE] + 1, segment[REV_GENERATED_COLUMN]); } })(); function clone(map, mappings) { return { version: map.version, file: map.file, names: map.names, sourceRoot: map.sourceRoot, sources: map.sources, sourcesContent: map.sourcesContent, mappings: mappings }; } function OMapping(source, line, column, name) { return { source: source, line: line, column: column, name: name }; } function GMapping(line, column) { return { line: line, column: column }; } function traceSegmentInternal(segments, memo, line, column, bias) { var index = memoizedBinarySearch(segments, column, memo, line); if (found) { index = (bias === LEAST_UPPER_BOUND ? upperBound : lowerBound)(segments, column, index); } else if (bias === LEAST_UPPER_BOUND) index++; if (index === -1 || index === segments.length) return -1; return index; } function sliceGeneratedPositions(segments, memo, line, column, bias) { var min = traceSegmentInternal(segments, memo, line, column, GREATEST_LOWER_BOUND); if (!found && bias === LEAST_UPPER_BOUND) min++; if (min === -1 || min === segments.length) return []; var matchedColumn = found ? column : segments[min][COLUMN]; if (!found) min = lowerBound(segments, matchedColumn, min); var max = upperBound(segments, matchedColumn, min); var result = []; for (; min <= max; min++) { var segment = segments[min]; result.push(GMapping(segment[REV_GENERATED_LINE] + 1, segment[REV_GENERATED_COLUMN])); } return result; } exports.AnyMap = AnyMap; exports.GREATEST_LOWER_BOUND = GREATEST_LOWER_BOUND; exports.LEAST_UPPER_BOUND = LEAST_UPPER_BOUND; exports.TraceMap = TraceMap; Object.defineProperty(exports, '__esModule', { value: true }); }); })(traceMapping_umd, traceMapping_umd.exports); (function (module, exports) { (function (global, factory) { factory(exports, requireSetArray_umd(), requireSourcemapCodec_umd(), traceMapping_umd.exports) ; })(commonjsGlobal, function (exports, setArray, sourcemapCodec, traceMapping) { var COLUMN = 0; var SOURCES_INDEX = 1; var SOURCE_LINE = 2; var SOURCE_COLUMN = 3; var NAMES_INDEX = 4; var NO_NAME = -1; exports.addSegment = void 0; exports.addMapping = void 0; exports.maybeAddSegment = void 0; exports.maybeAddMapping = void 0; exports.setSourceContent = void 0; exports.toDecodedMap = void 0; exports.toEncodedMap = void 0; exports.fromMap = void 0; exports.allMappings = void 0; var addSegmentInternal; var GenMapping = _createClass(function GenMapping(_temp) { var _ref = _temp === void 0 ? {} : _temp, file = _ref.file, sourceRoot = _ref.sourceRoot; this._names = new setArray.SetArray(); this._sources = new setArray.SetArray(); this._sourcesContent = []; this._mappings = []; this.file = file; this.sourceRoot = sourceRoot; }); (function () { exports.addSegment = function (map, genLine, genColumn, source, sourceLine, sourceColumn, name, content) { return addSegmentInternal(false, map, genLine, genColumn, source, sourceLine, sourceColumn, name, content); }; exports.maybeAddSegment = function (map, genLine, genColumn, source, sourceLine, sourceColumn, name, content) { return addSegmentInternal(true, map, genLine, genColumn, source, sourceLine, sourceColumn, name, content); }; exports.addMapping = function (map, mapping) { return addMappingInternal(false, map, mapping); }; exports.maybeAddMapping = function (map, mapping) { return addMappingInternal(true, map, mapping); }; exports.setSourceContent = function (map, source, content) { var sources = map._sources, sourcesContent = map._sourcesContent; sourcesContent[setArray.put(sources, source)] = content; }; exports.toDecodedMap = function (map) { var file = map.file, sourceRoot = map.sourceRoot, mappings = map._mappings, sources = map._sources, sourcesContent = map._sourcesContent, names = map._names; removeEmptyFinalLines(mappings); return { version: 3, file: file || undefined, names: names.array, sourceRoot: sourceRoot || undefined, sources: sources.array, sourcesContent: sourcesContent, mappings: mappings }; }; exports.toEncodedMap = function (map) { var decoded = exports.toDecodedMap(map); return Object.assign(Object.assign({}, decoded), { mappings: sourcemapCodec.encode(decoded.mappings) }); }; exports.allMappings = function (map) { var out = []; var mappings = map._mappings, sources = map._sources, names = map._names; for (var i = 0; i < mappings.length; i++) { var line = mappings[i]; for (var j = 0; j < line.length; j++) { var seg = line[j]; var generated = { line: i + 1, column: seg[COLUMN] }; var source = undefined; var original = undefined; var name = undefined; if (seg.length !== 1) { source = sources.array[seg[SOURCES_INDEX]]; original = { line: seg[SOURCE_LINE] + 1, column: seg[SOURCE_COLUMN] }; if (seg.length === 5) name = names.array[seg[NAMES_INDEX]]; } out.push({ generated: generated, source: source, original: original, name: name }); } } return out; }; exports.fromMap = function (input) { var map = new traceMapping.TraceMap(input); var gen = new GenMapping({ file: map.file, sourceRoot: map.sourceRoot }); putAll(gen._names, map.names); putAll(gen._sources, map.sources); gen._sourcesContent = map.sourcesContent || map.sources.map(function () { return null; }); gen._mappings = traceMapping.decodedMappings(map); return gen; }; addSegmentInternal = function addSegmentInternal(skipable, map, genLine, genColumn, source, sourceLine, sourceColumn, name, content) { var mappings = map._mappings, sources = map._sources, sourcesContent = map._sourcesContent, names = map._names; var line = getLine(mappings, genLine); var index = getColumnIndex(line, genColumn); if (!source) { if (skipable && skipSourceless(line, index)) return; return insert(line, index, [genColumn]); } var sourcesIndex = setArray.put(sources, source); var namesIndex = name ? setArray.put(names, name) : NO_NAME; if (sourcesIndex === sourcesContent.length) sourcesContent[sourcesIndex] = content !== null && content !== void 0 ? content : null; if (skipable && skipSource(line, index, sourcesIndex, sourceLine, sourceColumn, namesIndex)) { return; } return insert(line, index, name ? [genColumn, sourcesIndex, sourceLine, sourceColumn, namesIndex] : [genColumn, sourcesIndex, sourceLine, sourceColumn]); }; })(); function getLine(mappings, index) { for (var i = mappings.length; i <= index; i++) { mappings[i] = []; } return mappings[index]; } function getColumnIndex(line, genColumn) { var index = line.length; for (var i = index - 1; i >= 0; index = i--) { var current = line[i]; if (genColumn >= current[COLUMN]) break; } return index; } function insert(array, index, value) { for (var i = array.length; i > index; i--) { array[i] = array[i - 1]; } array[index] = value; } function removeEmptyFinalLines(mappings) { var length = mappings.length; var len = length; for (var i = len - 1; i >= 0; len = i, i--) { if (mappings[i].length > 0) break; } if (len < length) mappings.length = len; } function putAll(strarr, array) { for (var i = 0; i < array.length; i++) setArray.put(strarr, array[i]); } function skipSourceless(line, index) { if (index === 0) return true; var prev = line[index - 1]; return prev.length === 1; } function skipSource(line, index, sourcesIndex, sourceLine, sourceColumn, namesIndex) { if (index === 0) return false; var prev = line[index - 1]; if (prev.length === 1) return false; return sourcesIndex === prev[SOURCES_INDEX] && sourceLine === prev[SOURCE_LINE] && sourceColumn === prev[SOURCE_COLUMN] && namesIndex === (prev.length === 5 ? prev[NAMES_INDEX] : NO_NAME); } function addMappingInternal(skipable, map, mapping) { var generated = mapping.generated, source = mapping.source, original = mapping.original, name = mapping.name, content = mapping.content; if (!source) { return addSegmentInternal(skipable, map, generated.line - 1, generated.column, null, null, null, null, null); } var s = source; return addSegmentInternal(skipable, map, generated.line - 1, generated.column, s, original.line - 1, original.column, name, content); } exports.GenMapping = GenMapping; Object.defineProperty(exports, '__esModule', { value: true }); }); })(genMapping_umd$1, genMapping_umd$1.exports); var SourceMap$1 = function () { function SourceMap(opts, code) { var _opts$sourceFileName; this._map = void 0; this._rawMappings = void 0; this._sourceFileName = void 0; this._lastGenLine = 0; this._lastSourceLine = 0; this._lastSourceColumn = 0; this._inputMap = void 0; var map = this._map = new genMapping_umd$1.exports.GenMapping({ sourceRoot: opts.sourceRoot }); this._sourceFileName = (_opts$sourceFileName = opts.sourceFileName) == null ? void 0 : _opts$sourceFileName.replace(/\\/g, "/"); this._rawMappings = undefined; if (opts.inputSourceMap) { this._inputMap = new traceMapping_umd.exports.TraceMap(opts.inputSourceMap); var resolvedSources = this._inputMap.resolvedSources; if (resolvedSources.length) { for (var i = 0; i < resolvedSources.length; i++) { var _this$_inputMap$sourc; genMapping_umd$1.exports.setSourceContent(map, resolvedSources[i], (_this$_inputMap$sourc = this._inputMap.sourcesContent) == null ? void 0 : _this$_inputMap$sourc[i]); } } } if (typeof code === "string" && !opts.inputSourceMap) { genMapping_umd$1.exports.setSourceContent(map, this._sourceFileName, code); } else if (typeof code === "object") { for (var _i = 0, _Object$keys = Object.keys(code); _i < _Object$keys.length; _i++) { var _sourceFileName = _Object$keys[_i]; genMapping_umd$1.exports.setSourceContent(map, _sourceFileName.replace(/\\/g, "/"), code[_sourceFileName]); } } } var _proto = SourceMap.prototype; _proto.get = function get() { return genMapping_umd$1.exports.toEncodedMap(this._map); }; _proto.getDecoded = function getDecoded() { return genMapping_umd$1.exports.toDecodedMap(this._map); }; _proto.getRawMappings = function getRawMappings() { return this._rawMappings || (this._rawMappings = genMapping_umd$1.exports.allMappings(this._map)); }; _proto.mark = function mark(generated, line, column, identifierName, identifierNamePos, filename) { var _originalMapping; this._rawMappings = undefined; var originalMapping; if (line != null) { if (this._inputMap) { originalMapping = traceMapping_umd.exports.originalPositionFor(this._inputMap, { line: line, column: column }); if (!originalMapping.name && identifierNamePos) { var originalIdentifierMapping = traceMapping_umd.exports.originalPositionFor(this._inputMap, identifierNamePos); if (originalIdentifierMapping.name) { identifierName = originalIdentifierMapping.name; } } } else { originalMapping = { source: (filename == null ? void 0 : filename.replace(/\\/g, "/")) || this._sourceFileName, line: line, column: column }; } } genMapping_umd$1.exports.maybeAddMapping(this._map, { name: identifierName, generated: generated, source: (_originalMapping = originalMapping) == null ? void 0 : _originalMapping.source, original: originalMapping }); }; return _createClass(SourceMap); }(); var Buffer = function () { function Buffer(map) { this._map = null; this._buf = ""; this._str = ""; this._appendCount = 0; this._last = 0; this._queue = []; this._queueCursor = 0; this._canMarkIdName = true; this._position = { line: 1, column: 0 }; this._sourcePosition = { identifierName: undefined, identifierNamePos: undefined, line: undefined, column: undefined, filename: undefined }; this._map = map; this._allocQueue(); } var _proto = Buffer.prototype; _proto._allocQueue = function _allocQueue() { var queue = this._queue; for (var i = 0; i < 16; i++) { queue.push({ "char": 0, repeat: 1, line: undefined, column: undefined, identifierName: undefined, identifierNamePos: undefined, filename: "" }); } }; _proto._pushQueue = function _pushQueue(_char, repeat, line, column, filename) { var cursor = this._queueCursor; if (cursor === this._queue.length) { this._allocQueue(); } var item = this._queue[cursor]; item["char"] = _char; item.repeat = repeat; item.line = line; item.column = column; item.filename = filename; this._queueCursor++; }; _proto._popQueue = function _popQueue() { if (this._queueCursor === 0) { throw new Error("Cannot pop from empty queue"); } return this._queue[--this._queueCursor]; }; _proto.get = function get() { this._flush(); var map = this._map; var result = { code: (this._buf + this._str).trimRight(), decodedMap: map == null ? void 0 : map.getDecoded(), get __mergedMap() { return this.map; }, get map() { var resultMap = map ? map.get() : null; result.map = resultMap; return resultMap; }, set map(value) { Object.defineProperty(result, "map", { value: value, writable: true }); }, get rawMappings() { var mappings = map == null ? void 0 : map.getRawMappings(); result.rawMappings = mappings; return mappings; }, set rawMappings(value) { Object.defineProperty(result, "rawMappings", { value: value, writable: true }); } }; return result; }; _proto.append = function append(str, maybeNewline) { this._flush(); this._append(str, this._sourcePosition, maybeNewline); }; _proto.appendChar = function appendChar(_char2) { this._flush(); this._appendChar(_char2, 1, this._sourcePosition); }; _proto.queue = function queue(_char3) { if (_char3 === 10) { while (this._queueCursor !== 0) { var _char4 = this._queue[this._queueCursor - 1]["char"]; if (_char4 !== 32 && _char4 !== 9) { break; } this._queueCursor--; } } var sourcePosition = this._sourcePosition; this._pushQueue(_char3, 1, sourcePosition.line, sourcePosition.column, sourcePosition.filename); }; _proto.queueIndentation = function queueIndentation(_char5, repeat) { this._pushQueue(_char5, repeat, undefined, undefined, undefined); }; _proto._flush = function _flush() { var queueCursor = this._queueCursor; var queue = this._queue; for (var i = 0; i < queueCursor; i++) { var item = queue[i]; this._appendChar(item["char"], item.repeat, item); } this._queueCursor = 0; }; _proto._appendChar = function _appendChar(_char6, repeat, sourcePos) { this._last = _char6; this._str += repeat > 1 ? String.fromCharCode(_char6).repeat(repeat) : String.fromCharCode(_char6); if (_char6 !== 10) { this._mark(sourcePos.line, sourcePos.column, sourcePos.identifierName, sourcePos.identifierNamePos, sourcePos.filename); this._position.column += repeat; } else { this._position.line++; this._position.column = 0; } if (this._canMarkIdName) { sourcePos.identifierName = undefined; sourcePos.identifierNamePos = undefined; } }; _proto._append = function _append(str, sourcePos, maybeNewline) { var len = str.length; var position = this._position; this._last = str.charCodeAt(len - 1); if (++this._appendCount > 4096) { +this._str; this._buf += this._str; this._str = str; this._appendCount = 0; } else { this._str += str; } if (!maybeNewline && !this._map) { position.column += len; return; } var column = sourcePos.column, identifierName = sourcePos.identifierName, identifierNamePos = sourcePos.identifierNamePos, filename = sourcePos.filename; var line = sourcePos.line; if ((identifierName != null || identifierNamePos != null) && this._canMarkIdName) { sourcePos.identifierName = undefined; sourcePos.identifierNamePos = undefined; } var i = str.indexOf("\n"); var last = 0; if (i !== 0) { this._mark(line, column, identifierName, identifierNamePos, filename); } while (i !== -1) { position.line++; position.column = 0; last = i + 1; if (last < len && line !== undefined) { this._mark(++line, 0, null, null, filename); } i = str.indexOf("\n", last); } position.column += len - last; }; _proto._mark = function _mark(line, column, identifierName, identifierNamePos, filename) { var _this$_map; (_this$_map = this._map) == null ? void 0 : _this$_map.mark(this._position, line, column, identifierName, identifierNamePos, filename); }; _proto.removeTrailingNewline = function removeTrailingNewline() { var queueCursor = this._queueCursor; if (queueCursor !== 0 && this._queue[queueCursor - 1]["char"] === 10) { this._queueCursor--; } }; _proto.removeLastSemicolon = function removeLastSemicolon() { var queueCursor = this._queueCursor; if (queueCursor !== 0 && this._queue[queueCursor - 1]["char"] === 59) { this._queueCursor--; } }; _proto.getLastChar = function getLastChar() { var queueCursor = this._queueCursor; return queueCursor !== 0 ? this._queue[queueCursor - 1]["char"] : this._last; }; _proto.getNewlineCount = function getNewlineCount() { var queueCursor = this._queueCursor; var count = 0; if (queueCursor === 0) return this._last === 10 ? 1 : 0; for (var i = queueCursor - 1; i >= 0; i--) { if (this._queue[i]["char"] !== 10) { break; } count++; } return count === queueCursor && this._last === 10 ? count + 1 : count; }; _proto.endsWithCharAndNewline = function endsWithCharAndNewline() { var queue = this._queue; var queueCursor = this._queueCursor; if (queueCursor !== 0) { var lastCp = queue[queueCursor - 1]["char"]; if (lastCp !== 10) return; if (queueCursor > 1) { return queue[queueCursor - 2]["char"]; } else { return this._last; } } }; _proto.hasContent = function hasContent() { return this._queueCursor !== 0 || !!this._last; }; _proto.exactSource = function exactSource(loc, cb) { if (!this._map) return cb(); this.source("start", loc); var identifierName = loc.identifierName; var sourcePos = this._sourcePosition; if (identifierName) { this._canMarkIdName = false; sourcePos.identifierName = identifierName; } cb(); if (identifierName) { this._canMarkIdName = true; sourcePos.identifierName = undefined; sourcePos.identifierNamePos = undefined; } this.source("end", loc); }; _proto.source = function source(prop, loc) { if (!this._map) return; this._normalizePosition(prop, loc, 0, 0); }; _proto.sourceWithOffset = function sourceWithOffset(prop, loc, lineOffset, columnOffset) { if (!this._map) return; this._normalizePosition(prop, loc, lineOffset, columnOffset); }; _proto.withSource = function withSource(prop, loc, cb) { if (!this._map) return cb(); this.source(prop, loc); cb(); }; _proto._normalizePosition = function _normalizePosition(prop, loc, lineOffset, columnOffset) { var pos = loc[prop]; var target = this._sourcePosition; if (pos) { target.line = pos.line + lineOffset; target.column = pos.column + columnOffset; target.filename = loc.filename; } }; _proto.getCurrentColumn = function getCurrentColumn() { var queue = this._queue; var queueCursor = this._queueCursor; var lastIndex = -1; var len = 0; for (var i = 0; i < queueCursor; i++) { var item = queue[i]; if (item["char"] === 10) { lastIndex = len; } len += item.repeat; } return lastIndex === -1 ? this._position.column + len : len - 1 - lastIndex; }; _proto.getCurrentLine = function getCurrentLine() { var count = 0; var queue = this._queue; for (var i = 0; i < this._queueCursor; i++) { if (queue[i]["char"] === 10) { count++; } } return this._position.line + count; }; return _createClass(Buffer); }(); var FLIPPED_ALIAS_KEYS$1 = FLIPPED_ALIAS_KEYS$3, isArrayExpression = isArrayExpression$2, isAssignmentExpression$3 = isAssignmentExpression$4, isBinary$1 = isBinary$3, isBlockStatement$1 = isBlockStatement$2, isCallExpression$7 = isCallExpression$8, isFunction$3 = isFunction$4, isIdentifier$h = isIdentifier$j, isLiteral$4 = isLiteral$6, isMemberExpression$7 = isMemberExpression$8, isObjectExpression$1 = isObjectExpression$3, isOptionalCallExpression$2 = isOptionalCallExpression$3, isOptionalMemberExpression$2 = isOptionalMemberExpression$3, isStringLiteral$5 = isStringLiteral$6; function crawlInternal(node, state) { if (!node) return state; if (isMemberExpression$7(node) || isOptionalMemberExpression$2(node)) { crawlInternal(node.object, state); if (node.computed) crawlInternal(node.property, state); } else if (isBinary$1(node) || isAssignmentExpression$3(node)) { crawlInternal(node.left, state); crawlInternal(node.right, state); } else if (isCallExpression$7(node) || isOptionalCallExpression$2(node)) { state.hasCall = true; crawlInternal(node.callee, state); } else if (isFunction$3(node)) { state.hasFunction = true; } else if (isIdentifier$h(node)) { state.hasHelper = state.hasHelper || node.callee && isHelper(node.callee); } return state; } function crawl(node) { return crawlInternal(node, { hasCall: false, hasFunction: false, hasHelper: false }); } function isHelper(node) { if (!node) return false; if (isMemberExpression$7(node)) { return isHelper(node.object) || isHelper(node.property); } else if (isIdentifier$h(node)) { return node.name === "require" || node.name.charCodeAt(0) === 95; } else if (isCallExpression$7(node)) { return isHelper(node.callee); } else if (isBinary$1(node) || isAssignmentExpression$3(node)) { return isIdentifier$h(node.left) && isHelper(node.left) || isHelper(node.right); } else { return false; } } function isType$1(node) { return isLiteral$4(node) || isObjectExpression$1(node) || isArrayExpression(node) || isIdentifier$h(node) || isMemberExpression$7(node); } var nodes = { AssignmentExpression: function (_AssignmentExpression) { function AssignmentExpression(_x) { return _AssignmentExpression.apply(this, arguments); } AssignmentExpression.toString = function () { return _AssignmentExpression.toString(); }; return AssignmentExpression; }(function (node) { var state = crawl(node.right); if (state.hasCall && state.hasHelper || state.hasFunction) { return state.hasFunction ? 1 | 2 : 2; } }), SwitchCase: function (_SwitchCase) { function SwitchCase(_x2, _x3) { return _SwitchCase.apply(this, arguments); } SwitchCase.toString = function () { return _SwitchCase.toString(); }; return SwitchCase; }(function (node, parent) { return (!!node.consequent.length || parent.cases[0] === node ? 1 : 0) | (!node.consequent.length && parent.cases[parent.cases.length - 1] === node ? 2 : 0); }), LogicalExpression: function (_LogicalExpression) { function LogicalExpression(_x4) { return _LogicalExpression.apply(this, arguments); } LogicalExpression.toString = function () { return _LogicalExpression.toString(); }; return LogicalExpression; }(function (node) { if (isFunction$3(node.left) || isFunction$3(node.right)) { return 2; } }), Literal: function (_Literal) { function Literal(_x5) { return _Literal.apply(this, arguments); } Literal.toString = function () { return _Literal.toString(); }; return Literal; }(function (node) { if (isStringLiteral$5(node) && node.value === "use strict") { return 2; } }), CallExpression: function (_CallExpression) { function CallExpression(_x6) { return _CallExpression.apply(this, arguments); } CallExpression.toString = function () { return _CallExpression.toString(); }; return CallExpression; }(function (node) { if (isFunction$3(node.callee) || isHelper(node)) { return 1 | 2; } }), OptionalCallExpression: function (_OptionalCallExpression) { function OptionalCallExpression(_x7) { return _OptionalCallExpression.apply(this, arguments); } OptionalCallExpression.toString = function () { return _OptionalCallExpression.toString(); }; return OptionalCallExpression; }(function (node) { if (isFunction$3(node.callee)) { return 1 | 2; } }), VariableDeclaration: function (_VariableDeclaration) { function VariableDeclaration(_x8) { return _VariableDeclaration.apply(this, arguments); } VariableDeclaration.toString = function () { return _VariableDeclaration.toString(); }; return VariableDeclaration; }(function (node) { for (var i = 0; i < node.declarations.length; i++) { var declar = node.declarations[i]; var enabled = isHelper(declar.id) && !isType$1(declar.init); if (!enabled && declar.init) { var state = crawl(declar.init); enabled = isHelper(declar.init) && state.hasCall || state.hasFunction; } if (enabled) { return 1 | 2; } } }), IfStatement: function (_IfStatement) { function IfStatement(_x9) { return _IfStatement.apply(this, arguments); } IfStatement.toString = function () { return _IfStatement.toString(); }; return IfStatement; }(function (node) { if (isBlockStatement$1(node.consequent)) { return 1 | 2; } }) }; nodes.ObjectProperty = nodes.ObjectTypeProperty = nodes.ObjectMethod = function (node, parent) { if (parent.properties[0] === node) { return 1; } }; nodes.ObjectTypeCallProperty = function (node, parent) { var _parent$properties; if (parent.callProperties[0] === node && !((_parent$properties = parent.properties) != null && _parent$properties.length)) { return 1; } }; nodes.ObjectTypeIndexer = function (node, parent) { var _parent$properties2, _parent$callPropertie; if (parent.indexers[0] === node && !((_parent$properties2 = parent.properties) != null && _parent$properties2.length) && !((_parent$callPropertie = parent.callProperties) != null && _parent$callPropertie.length)) { return 1; } }; nodes.ObjectTypeInternalSlot = function (node, parent) { var _parent$properties3, _parent$callPropertie2, _parent$indexers; if (parent.internalSlots[0] === node && !((_parent$properties3 = parent.properties) != null && _parent$properties3.length) && !((_parent$callPropertie2 = parent.callProperties) != null && _parent$callPropertie2.length) && !((_parent$indexers = parent.indexers) != null && _parent$indexers.length)) { return 1; } }; [["Function", true], ["Class", true], ["Loop", true], ["LabeledStatement", true], ["SwitchStatement", true], ["TryStatement", true]].forEach(function (_ref) { var _ref2 = _slicedToArray(_ref, 2), type = _ref2[0], amounts = _ref2[1]; [type].concat(FLIPPED_ALIAS_KEYS$1[type] || []).forEach(function (type) { var ret = amounts ? 1 | 2 : 0; nodes[type] = function () { return ret; }; }); }); var isArrayTypeAnnotation$1 = isArrayTypeAnnotation$2, isArrowFunctionExpression = isArrowFunctionExpression$1, isAssignmentExpression$2 = isAssignmentExpression$4, isAwaitExpression = isAwaitExpression$1, isBinary = isBinary$3, isBinaryExpression = isBinaryExpression$1, isUpdateExpression$1 = isUpdateExpression$2, isCallExpression$6 = isCallExpression$8, isClass = isClass$2, isClassExpression = isClassExpression$1, isConditional = isConditional$1, isConditionalExpression = isConditionalExpression$1, isExportDeclaration$1 = isExportDeclaration$3, isExportDefaultDeclaration$1 = isExportDefaultDeclaration$3, isExpressionStatement$2 = isExpressionStatement$3, isFor$1 = isFor$2, isForInStatement = isForInStatement$1, isForOfStatement$1 = isForOfStatement$2, isForStatement$2 = isForStatement$3, isFunctionExpression = isFunctionExpression$1, isIfStatement$1 = isIfStatement$2, isIndexedAccessType = isIndexedAccessType$1, isIntersectionTypeAnnotation = isIntersectionTypeAnnotation$1, isLogicalExpression = isLogicalExpression$1, isMemberExpression$6 = isMemberExpression$8, isNewExpression$3 = isNewExpression$4, isNullableTypeAnnotation = isNullableTypeAnnotation$1, isObjectPattern$1 = isObjectPattern$2, isOptionalCallExpression$1 = isOptionalCallExpression$3, isOptionalMemberExpression$1 = isOptionalMemberExpression$3, isReturnStatement = isReturnStatement$1, isSequenceExpression$1 = isSequenceExpression$2, isSwitchStatement = isSwitchStatement$1, isTSArrayType$1 = isTSArrayType$2, isTSAsExpression$1 = isTSAsExpression$2, isTSInstantiationExpression = isTSInstantiationExpression$1, isTSIntersectionType = isTSIntersectionType$1, isTSNonNullExpression$1 = isTSNonNullExpression$2, isTSOptionalType = isTSOptionalType$1, isTSRestType = isTSRestType$1, isTSTypeAssertion$1 = isTSTypeAssertion$2, isTSUnionType = isTSUnionType$1, isTaggedTemplateExpression = isTaggedTemplateExpression$2, isThrowStatement = isThrowStatement$1, isTypeAnnotation$1 = isTypeAnnotation$2, isUnaryLike = isUnaryLike$1, isUnionTypeAnnotation$1 = isUnionTypeAnnotation$2, isVariableDeclarator$1 = isVariableDeclarator$2, isWhileStatement = isWhileStatement$1, isYieldExpression = isYieldExpression$1, isTSSatisfiesExpression$1 = isTSSatisfiesExpression$2; var PRECEDENCE = { "||": 0, "??": 0, "|>": 0, "&&": 1, "|": 2, "^": 3, "&": 4, "==": 5, "===": 5, "!=": 5, "!==": 5, "<": 6, ">": 6, "<=": 6, ">=": 6, "in": 6, "instanceof": 6, ">>": 7, "<<": 7, ">>>": 7, "+": 8, "-": 8, "*": 9, "/": 9, "%": 9, "**": 10 }; function isTSTypeExpression(node) { return isTSAsExpression$1(node) || isTSSatisfiesExpression$1(node) || isTSTypeAssertion$1(node); } var isClassExtendsClause = function isClassExtendsClause(node, parent) { return isClass(parent, { superClass: node }); }; var hasPostfixPart = function hasPostfixPart(node, parent) { return (isMemberExpression$6(parent) || isOptionalMemberExpression$1(parent)) && parent.object === node || (isCallExpression$6(parent) || isOptionalCallExpression$1(parent) || isNewExpression$3(parent)) && parent.callee === node || isTaggedTemplateExpression(parent) && parent.tag === node || isTSNonNullExpression$1(parent); }; function NullableTypeAnnotation$1(node, parent) { return isArrayTypeAnnotation$1(parent); } function FunctionTypeAnnotation$1(node, parent, printStack) { if (printStack.length < 3) return; return isUnionTypeAnnotation$1(parent) || isIntersectionTypeAnnotation(parent) || isArrayTypeAnnotation$1(parent) || isTypeAnnotation$1(parent) && isArrowFunctionExpression(printStack[printStack.length - 3]); } function UpdateExpression$2(node, parent) { return hasPostfixPart(node, parent) || isClassExtendsClause(node, parent); } function ObjectExpression$2(node, parent, printStack) { return isFirstInContext(printStack, 1 | 2); } function DoExpression$1(node, parent, printStack) { return !node.async && isFirstInContext(printStack, 1); } function Binary(node, parent) { if (node.operator === "**" && isBinaryExpression(parent, { operator: "**" })) { return parent.left === node; } if (isClassExtendsClause(node, parent)) { return true; } if (hasPostfixPart(node, parent) || isUnaryLike(parent) || isAwaitExpression(parent)) { return true; } if (isBinary(parent)) { var parentOp = parent.operator; var parentPos = PRECEDENCE[parentOp]; var nodeOp = node.operator; var nodePos = PRECEDENCE[nodeOp]; if (parentPos === nodePos && parent.right === node && !isLogicalExpression(parent) || parentPos > nodePos) { return true; } } } function UnionTypeAnnotation$1(node, parent) { return isArrayTypeAnnotation$1(parent) || isNullableTypeAnnotation(parent) || isIntersectionTypeAnnotation(parent) || isUnionTypeAnnotation$1(parent); } function OptionalIndexedAccessType$1(node, parent) { return isIndexedAccessType(parent, { objectType: node }); } function TSAsExpression$1() { return true; } function TSUnionType$1(node, parent) { return isTSArrayType$1(parent) || isTSOptionalType(parent) || isTSIntersectionType(parent) || isTSUnionType(parent) || isTSRestType(parent); } function TSInferType$1(node, parent) { return isTSArrayType$1(parent) || isTSOptionalType(parent); } function TSInstantiationExpression$1(node, parent) { return (isCallExpression$6(parent) || isOptionalCallExpression$1(parent) || isNewExpression$3(parent) || isTSInstantiationExpression(parent)) && !!parent.typeParameters; } function BinaryExpression$1(node, parent) { return node.operator === "in" && (isVariableDeclarator$1(parent) || isFor$1(parent)); } function SequenceExpression$2(node, parent) { if (isForStatement$2(parent) || isThrowStatement(parent) || isReturnStatement(parent) || isIfStatement$1(parent) && parent.test === node || isWhileStatement(parent) && parent.test === node || isForInStatement(parent) && parent.right === node || isSwitchStatement(parent) && parent.discriminant === node || isExpressionStatement$2(parent) && parent.expression === node) { return false; } return true; } function YieldExpression$1(node, parent) { return isBinary(parent) || isUnaryLike(parent) || hasPostfixPart(node, parent) || isAwaitExpression(parent) && isYieldExpression(node) || isConditionalExpression(parent) && node === parent.test || isClassExtendsClause(node, parent); } function ClassExpression(node, parent, printStack) { return isFirstInContext(printStack, 1 | 4); } function UnaryLike(node, parent) { return hasPostfixPart(node, parent) || isBinaryExpression(parent, { operator: "**", left: node }) || isClassExtendsClause(node, parent); } function FunctionExpression$1(node, parent, printStack) { return isFirstInContext(printStack, 1 | 4); } function ArrowFunctionExpression$1(node, parent) { return isExportDeclaration$1(parent) || ConditionalExpression$2(node, parent); } function ConditionalExpression$2(node, parent) { if (isUnaryLike(parent) || isBinary(parent) || isConditionalExpression(parent, { test: node }) || isAwaitExpression(parent) || isTSTypeExpression(parent)) { return true; } return UnaryLike(node, parent); } function OptionalMemberExpression$1(node, parent) { return isCallExpression$6(parent, { callee: node }) || isMemberExpression$6(parent, { object: node }); } function AssignmentExpression$2(node, parent) { if (isObjectPattern$1(node.left)) { return true; } else { return ConditionalExpression$2(node, parent); } } function LogicalExpression$1(node, parent) { if (isTSTypeExpression(parent)) return true; switch (node.operator) { case "||": if (!isLogicalExpression(parent)) return false; return parent.operator === "??" || parent.operator === "&&"; case "&&": return isLogicalExpression(parent, { operator: "??" }); case "??": return isLogicalExpression(parent) && parent.operator !== "??"; } } function Identifier$1(node, parent, printStack) { var _node$extra; if ((_node$extra = node.extra) != null && _node$extra.parenthesized && isAssignmentExpression$2(parent, { left: node }) && (isFunctionExpression(parent.right) || isClassExpression(parent.right)) && parent.right.id == null) { return true; } if (node.name === "let") { var isFollowedByBracket = isMemberExpression$6(parent, { object: node, computed: true }) || isOptionalMemberExpression$1(parent, { object: node, computed: true, optional: false }); return isFirstInContext(printStack, isFollowedByBracket ? 1 | 8 | 16 | 32 : 32); } return node.name === "async" && isForOfStatement$1(parent) && node === parent.left; } function isFirstInContext(printStack, checkParam) { var expressionStatement = checkParam & 1; var arrowBody = checkParam & 2; var exportDefault = checkParam & 4; var forHead = checkParam & 8; var forInHead = checkParam & 16; var forOfHead = checkParam & 32; var i = printStack.length - 1; if (i <= 0) return; var node = printStack[i]; i--; var parent = printStack[i]; while (i >= 0) { if (expressionStatement && isExpressionStatement$2(parent, { expression: node }) || exportDefault && isExportDefaultDeclaration$1(parent, { declaration: node }) || arrowBody && isArrowFunctionExpression(parent, { body: node }) || forHead && isForStatement$2(parent, { init: node }) || forInHead && isForInStatement(parent, { left: node }) || forOfHead && isForOfStatement$1(parent, { left: node })) { return true; } if (i > 0 && (hasPostfixPart(node, parent) && !isNewExpression$3(parent) || isSequenceExpression$1(parent) && parent.expressions[0] === node || isUpdateExpression$1(parent) && !parent.prefix || isConditional(parent, { test: node }) || isBinary(parent, { left: node }) || isAssignmentExpression$2(parent, { left: node }))) { node = parent; i--; parent = printStack[i]; } else { return false; } } return false; } var parens = /*#__PURE__*/Object.freeze({ __proto__: null, NullableTypeAnnotation: NullableTypeAnnotation$1, FunctionTypeAnnotation: FunctionTypeAnnotation$1, UpdateExpression: UpdateExpression$2, ObjectExpression: ObjectExpression$2, DoExpression: DoExpression$1, Binary: Binary, UnionTypeAnnotation: UnionTypeAnnotation$1, IntersectionTypeAnnotation: UnionTypeAnnotation$1, OptionalIndexedAccessType: OptionalIndexedAccessType$1, TSAsExpression: TSAsExpression$1, TSSatisfiesExpression: TSAsExpression$1, TSTypeAssertion: TSAsExpression$1, TSUnionType: TSUnionType$1, TSIntersectionType: TSUnionType$1, TSInferType: TSInferType$1, TSInstantiationExpression: TSInstantiationExpression$1, BinaryExpression: BinaryExpression$1, SequenceExpression: SequenceExpression$2, YieldExpression: YieldExpression$1, AwaitExpression: YieldExpression$1, ClassExpression: ClassExpression, UnaryLike: UnaryLike, FunctionExpression: FunctionExpression$1, ArrowFunctionExpression: ArrowFunctionExpression$1, ConditionalExpression: ConditionalExpression$2, OptionalMemberExpression: OptionalMemberExpression$1, OptionalCallExpression: OptionalMemberExpression$1, AssignmentExpression: AssignmentExpression$2, LogicalExpression: LogicalExpression$1, Identifier: Identifier$1 }); var FLIPPED_ALIAS_KEYS = FLIPPED_ALIAS_KEYS$3, isCallExpression$5 = isCallExpression$8, isMemberExpression$5 = isMemberExpression$8, isNewExpression$2 = isNewExpression$4; function expandAliases(obj) { var newObj = {}; function add(type, func) { var fn = newObj[type]; newObj[type] = fn ? function (node, parent, stack) { var result = fn(node, parent, stack); return result == null ? func(node, parent, stack) : result; } : func; } for (var _i = 0, _Object$keys = Object.keys(obj); _i < _Object$keys.length; _i++) { var type = _Object$keys[_i]; var aliases = FLIPPED_ALIAS_KEYS[type]; if (aliases) { for (var _iterator = _createForOfIteratorHelperLoose(aliases), _step; !(_step = _iterator()).done;) { var alias = _step.value; add(alias, obj[type]); } } else { add(type, obj[type]); } } return newObj; } var expandedParens = expandAliases(parens); expandAliases(nodes); function find$2(obj, node, parent, printStack) { var fn = obj[node.type]; return fn ? fn(node, parent, printStack) : null; } function isOrHasCallExpression(node) { if (isCallExpression$5(node)) { return true; } return isMemberExpression$5(node) && isOrHasCallExpression(node.object); } function needsParens$1(node, parent, printStack) { if (!parent) return false; if (isNewExpression$2(parent) && parent.callee === node) { if (isOrHasCallExpression(node)) return true; } return find$2(expandedParens, node, parent, printStack); } function TaggedTemplateExpression$1(node) { this.print(node.tag, node); this.print(node.typeParameters, node); this.print(node.quasi, node); } function TemplateElement(node, parent) { var isFirst = parent.quasis[0] === node; var isLast = parent.quasis[parent.quasis.length - 1] === node; var value = (isFirst ? "`" : "}") + node.value.raw + (isLast ? "`" : "${"); this.token(value, true); } function TemplateLiteral$1(node) { var quasis = node.quasis; for (var i = 0; i < quasis.length; i++) { this.print(quasis[i], node); if (i + 1 < quasis.length) { this.print(node.expressions[i], node); } } } var isCallExpression$4 = isCallExpression$8, isLiteral$3 = isLiteral$6, isMemberExpression$4 = isMemberExpression$8, isNewExpression$1 = isNewExpression$4; function UnaryExpression$1(node) { if (node.operator === "void" || node.operator === "delete" || node.operator === "typeof" || node.operator === "throw") { this.word(node.operator); this.space(); } else { this.token(node.operator); } this.print(node.argument, node); } function DoExpression(node) { if (node.async) { this.word("async", true); this.space(); } this.word("do"); this.space(); this.print(node.body, node); } function ParenthesizedExpression$1(node) { this.tokenChar(40); this.print(node.expression, node); this.tokenChar(41); } function UpdateExpression$1(node) { if (node.prefix) { this.token(node.operator); this.print(node.argument, node); } else { this.printTerminatorless(node.argument, node, true); this.token(node.operator); } } function ConditionalExpression$1(node) { this.print(node.test, node); this.space(); this.tokenChar(63); this.space(); this.print(node.consequent, node); this.space(); this.tokenChar(58); this.space(); this.print(node.alternate, node); } function NewExpression$1(node, parent) { this.word("new"); this.space(); this.print(node.callee, node); if (this.format.minified && node.arguments.length === 0 && !node.optional && !isCallExpression$4(parent, { callee: node }) && !isMemberExpression$4(parent) && !isNewExpression$1(parent)) { return; } this.print(node.typeArguments, node); this.print(node.typeParameters, node); if (node.optional) { this.token("?."); } this.tokenChar(40); this.printList(node.arguments, node); this.tokenChar(41); } function SequenceExpression$1(node) { this.printList(node.expressions, node); } function ThisExpression() { this.word("this"); } function Super() { this.word("super"); } function isDecoratorMemberExpression(node) { switch (node.type) { case "Identifier": return true; case "MemberExpression": return !node.computed && node.property.type === "Identifier" && isDecoratorMemberExpression(node.object); default: return false; } } function shouldParenthesizeDecoratorExpression(node) { if (node.type === "ParenthesizedExpression") { return false; } return !isDecoratorMemberExpression(node.type === "CallExpression" ? node.callee : node); } function _shouldPrintDecoratorsBeforeExport(node) { if (typeof this.format.decoratorsBeforeExport === "boolean") { return this.format.decoratorsBeforeExport; } return typeof node.start === "number" && node.start === node.declaration.start; } function Decorator(node) { this.tokenChar(64); var expression = node.expression; if (shouldParenthesizeDecoratorExpression(expression)) { this.tokenChar(40); this.print(expression, node); this.tokenChar(41); } else { this.print(expression, node); } this.newline(); } function OptionalMemberExpression(node) { this.print(node.object, node); if (!node.computed && isMemberExpression$4(node.property)) { throw new TypeError("Got a MemberExpression for MemberExpression property"); } var computed = node.computed; if (isLiteral$3(node.property) && typeof node.property.value === "number") { computed = true; } if (node.optional) { this.token("?."); } if (computed) { this.tokenChar(91); this.print(node.property, node); this.tokenChar(93); } else { if (!node.optional) { this.tokenChar(46); } this.print(node.property, node); } } function OptionalCallExpression(node) { this.print(node.callee, node); this.print(node.typeParameters, node); if (node.optional) { this.token("?."); } this.print(node.typeArguments, node); this.tokenChar(40); this.printList(node.arguments, node); this.tokenChar(41); } function CallExpression$1(node) { this.print(node.callee, node); this.print(node.typeArguments, node); this.print(node.typeParameters, node); this.tokenChar(40); this.printList(node.arguments, node); this.tokenChar(41); } function Import() { this.word("import"); } function AwaitExpression(node) { this.word("await"); if (node.argument) { this.space(); this.printTerminatorless(node.argument, node, false); } } function YieldExpression(node) { this.word("yield", true); if (node.delegate) { this.tokenChar(42); if (node.argument) { this.space(); this.print(node.argument, node); } } else { if (node.argument) { this.space(); this.printTerminatorless(node.argument, node, false); } } } function EmptyStatement() { this.semicolon(true); } function ExpressionStatement(node) { this.print(node.expression, node); this.semicolon(); } function AssignmentPattern(node) { this.print(node.left, node); if (node.left.optional) this.tokenChar(63); this.print(node.left.typeAnnotation, node); this.space(); this.tokenChar(61); this.space(); this.print(node.right, node); } function AssignmentExpression$1(node, parent) { var parens = this.inForStatementInitCounter && node.operator === "in" && !needsParens$1(node, parent); if (parens) { this.tokenChar(40); } this.print(node.left, node); this.space(); if (node.operator === "in" || node.operator === "instanceof") { this.word(node.operator); } else { this.token(node.operator); } this.space(); this.print(node.right, node); if (parens) { this.tokenChar(41); } } function BindExpression(node) { this.print(node.object, node); this.token("::"); this.print(node.callee, node); } function MemberExpression(node) { this.print(node.object, node); if (!node.computed && isMemberExpression$4(node.property)) { throw new TypeError("Got a MemberExpression for MemberExpression property"); } var computed = node.computed; if (isLiteral$3(node.property) && typeof node.property.value === "number") { computed = true; } if (computed) { this.tokenChar(91); this.print(node.property, node); this.tokenChar(93); } else { this.tokenChar(46); this.print(node.property, node); } } function MetaProperty(node) { this.print(node.meta, node); this.tokenChar(46); this.print(node.property, node); } function PrivateName(node) { this.tokenChar(35); this.print(node.id, node); } function V8IntrinsicIdentifier(node) { this.tokenChar(37); this.word(node.name); } function ModuleExpression(node) { this.word("module", true); this.space(); this.tokenChar(123); this.indent(); var body = node.body; if (body.body.length || body.directives.length) { this.newline(); } this.print(body, node); this.dedent(); this.sourceWithOffset("end", node.loc, 0, -1); this.rightBrace(); } var isFor = isFor$2, isForStatement$1 = isForStatement$3, isIfStatement = isIfStatement$2, isStatement$7 = isStatement$8; function WithStatement(node) { this.word("with"); this.space(); this.tokenChar(40); this.print(node.object, node); this.tokenChar(41); this.printBlock(node); } function IfStatement(node) { this.word("if"); this.space(); this.tokenChar(40); this.print(node.test, node); this.tokenChar(41); this.space(); var needsBlock = node.alternate && isIfStatement(getLastStatement(node.consequent)); if (needsBlock) { this.tokenChar(123); this.newline(); this.indent(); } this.printAndIndentOnComments(node.consequent, node); if (needsBlock) { this.dedent(); this.newline(); this.tokenChar(125); } if (node.alternate) { if (this.endsWith(125)) this.space(); this.word("else"); this.space(); this.printAndIndentOnComments(node.alternate, node); } } function getLastStatement(statement) { var body = statement.body; if (isStatement$7(body) === false) { return statement; } return getLastStatement(body); } function ForStatement(node) { this.word("for"); this.space(); this.tokenChar(40); this.inForStatementInitCounter++; this.print(node.init, node); this.inForStatementInitCounter--; this.tokenChar(59); if (node.test) { this.space(); this.print(node.test, node); } this.tokenChar(59); if (node.update) { this.space(); this.print(node.update, node); } this.tokenChar(41); this.printBlock(node); } function WhileStatement(node) { this.word("while"); this.space(); this.tokenChar(40); this.print(node.test, node); this.tokenChar(41); this.printBlock(node); } function ForXStatement(node) { this.word("for"); this.space(); var isForOf = node.type === "ForOfStatement"; if (isForOf && node["await"]) { this.word("await"); this.space(); } this.noIndentInnerCommentsHere(); this.tokenChar(40); this.print(node.left, node); this.space(); this.word(isForOf ? "of" : "in"); this.space(); this.print(node.right, node); this.tokenChar(41); this.printBlock(node); } var ForInStatement = ForXStatement; var ForOfStatement = ForXStatement; function DoWhileStatement(node) { this.word("do"); this.space(); this.print(node.body, node); this.space(); this.word("while"); this.space(); this.tokenChar(40); this.print(node.test, node); this.tokenChar(41); this.semicolon(); } function printStatementAfterKeyword(printer, node, parent, isLabel) { if (node) { printer.space(); printer.printTerminatorless(node, parent, isLabel); } printer.semicolon(); } function BreakStatement(node) { this.word("break"); printStatementAfterKeyword(this, node.label, node, true); } function ContinueStatement(node) { this.word("continue"); printStatementAfterKeyword(this, node.label, node, true); } function ReturnStatement(node) { this.word("return"); printStatementAfterKeyword(this, node.argument, node, false); } function ThrowStatement(node) { this.word("throw"); printStatementAfterKeyword(this, node.argument, node, false); } function LabeledStatement(node) { this.print(node.label, node); this.tokenChar(58); this.space(); this.print(node.body, node); } function TryStatement(node) { this.word("try"); this.space(); this.print(node.block, node); this.space(); if (node.handlers) { this.print(node.handlers[0], node); } else { this.print(node.handler, node); } if (node.finalizer) { this.space(); this.word("finally"); this.space(); this.print(node.finalizer, node); } } function CatchClause(node) { this.word("catch"); this.space(); if (node.param) { this.tokenChar(40); this.print(node.param, node); this.print(node.param.typeAnnotation, node); this.tokenChar(41); this.space(); } this.print(node.body, node); } function SwitchStatement(node) { this.word("switch"); this.space(); this.tokenChar(40); this.print(node.discriminant, node); this.tokenChar(41); this.space(); this.tokenChar(123); this.printSequence(node.cases, node, { indent: true, addNewlines: function addNewlines(leading, cas) { if (!leading && node.cases[node.cases.length - 1] === cas) return -1; } }); this.tokenChar(125); } function SwitchCase(node) { if (node.test) { this.word("case"); this.space(); this.print(node.test, node); this.tokenChar(58); } else { this.word("default"); this.tokenChar(58); } if (node.consequent.length) { this.newline(); this.printSequence(node.consequent, node, { indent: true }); } } function DebuggerStatement() { this.word("debugger"); this.semicolon(); } function VariableDeclaration(node, parent) { if (node.declare) { this.word("declare"); this.space(); } var kind = node.kind; this.word(kind, kind === "using"); this.space(); var hasInits = false; if (!isFor(parent)) { for (var _iterator = _createForOfIteratorHelperLoose(node.declarations), _step; !(_step = _iterator()).done;) { var declar = _step.value; if (declar.init) { hasInits = true; } } } this.printList(node.declarations, node, { separator: hasInits ? function () { this.tokenChar(44); this.newline(); } : undefined, indent: node.declarations.length > 1 ? true : false }); if (isFor(parent)) { if (isForStatement$1(parent)) { if (parent.init === node) return; } else { if (parent.left === node) return; } } this.semicolon(); } function VariableDeclarator$1(node) { this.print(node.id, node); if (node.definite) this.tokenChar(33); this.print(node.id.typeAnnotation, node); if (node.init) { this.space(); this.tokenChar(61); this.space(); this.print(node.init, node); } } var isExportDefaultDeclaration = isExportDefaultDeclaration$3, isExportNamedDeclaration$1 = isExportNamedDeclaration$3; function ClassDeclaration(node, parent) { var inExport = isExportDefaultDeclaration(parent) || isExportNamedDeclaration$1(parent); if (!inExport || !this._shouldPrintDecoratorsBeforeExport(parent)) { this.printJoin(node.decorators, node); } if (node.declare) { this.word("declare"); this.space(); } if (node["abstract"]) { this.word("abstract"); this.space(); } this.word("class"); if (node.id) { this.space(); this.print(node.id, node); } this.print(node.typeParameters, node); if (node.superClass) { this.space(); this.word("extends"); this.space(); this.print(node.superClass, node); this.print(node.superTypeParameters, node); } if (node["implements"]) { this.space(); this.word("implements"); this.space(); this.printList(node["implements"], node); } this.space(); this.print(node.body, node); } function ClassBody(node) { this.tokenChar(123); if (node.body.length === 0) { this.tokenChar(125); } else { this.newline(); this.indent(); this.printSequence(node.body, node); this.dedent(); if (!this.endsWith(10)) this.newline(); this.sourceWithOffset("end", node.loc, 0, -1); this.rightBrace(); } } function ClassProperty(node) { var _node$key$loc, _node$key$loc$end; this.printJoin(node.decorators, node); var endLine = (_node$key$loc = node.key.loc) == null ? void 0 : (_node$key$loc$end = _node$key$loc.end) == null ? void 0 : _node$key$loc$end.line; if (endLine) this.catchUp(endLine); this.tsPrintClassMemberModifiers(node); if (node.computed) { this.tokenChar(91); this.print(node.key, node); this.tokenChar(93); } else { this._variance(node); this.print(node.key, node); } if (node.optional) { this.tokenChar(63); } if (node.definite) { this.tokenChar(33); } this.print(node.typeAnnotation, node); if (node.value) { this.space(); this.tokenChar(61); this.space(); this.print(node.value, node); } this.semicolon(); } function ClassAccessorProperty(node) { var _node$key$loc2, _node$key$loc2$end; this.printJoin(node.decorators, node); var endLine = (_node$key$loc2 = node.key.loc) == null ? void 0 : (_node$key$loc2$end = _node$key$loc2.end) == null ? void 0 : _node$key$loc2$end.line; if (endLine) this.catchUp(endLine); this.tsPrintClassMemberModifiers(node); this.word("accessor", true); this.space(); if (node.computed) { this.tokenChar(91); this.print(node.key, node); this.tokenChar(93); } else { this._variance(node); this.print(node.key, node); } if (node.optional) { this.tokenChar(63); } if (node.definite) { this.tokenChar(33); } this.print(node.typeAnnotation, node); if (node.value) { this.space(); this.tokenChar(61); this.space(); this.print(node.value, node); } this.semicolon(); } function ClassPrivateProperty(node) { this.printJoin(node.decorators, node); if (node["static"]) { this.word("static"); this.space(); } this.print(node.key, node); this.print(node.typeAnnotation, node); if (node.value) { this.space(); this.tokenChar(61); this.space(); this.print(node.value, node); } this.semicolon(); } function ClassMethod(node) { this._classMethodHead(node); this.space(); this.print(node.body, node); } function ClassPrivateMethod(node) { this._classMethodHead(node); this.space(); this.print(node.body, node); } function _classMethodHead(node) { var _node$key$loc3, _node$key$loc3$end; this.printJoin(node.decorators, node); var endLine = (_node$key$loc3 = node.key.loc) == null ? void 0 : (_node$key$loc3$end = _node$key$loc3.end) == null ? void 0 : _node$key$loc3$end.line; if (endLine) this.catchUp(endLine); this.tsPrintClassMemberModifiers(node); this._methodHead(node); } function StaticBlock(node) { this.word("static"); this.space(); this.tokenChar(123); if (node.body.length === 0) { this.tokenChar(125); } else { this.newline(); this.printSequence(node.body, node, { indent: true }); this.sourceWithOffset("end", node.loc, 0, -1); this.rightBrace(); } } var isIdentifier$g = isIdentifier$j; function _params(node, idNode, parentNode) { this.print(node.typeParameters, node); var nameInfo = _getFuncIdName.call(this, idNode, parentNode); if (nameInfo) { this.sourceIdentifierName(nameInfo.name, nameInfo.pos); } this.tokenChar(40); this._parameters(node.params, node); this.tokenChar(41); var noLineTerminator = node.type === "ArrowFunctionExpression"; this.print(node.returnType, node, noLineTerminator); this._noLineTerminator = noLineTerminator; } function _parameters(parameters, parent) { var paramLength = parameters.length; for (var i = 0; i < paramLength; i++) { this._param(parameters[i], parent); if (i < parameters.length - 1) { this.tokenChar(44); this.space(); } } } function _param(parameter, parent) { this.printJoin(parameter.decorators, parameter); this.print(parameter, parent); if (parameter.optional) { this.tokenChar(63); } this.print(parameter.typeAnnotation, parameter); } function _methodHead(node) { var kind = node.kind; var key = node.key; if (kind === "get" || kind === "set") { this.word(kind); this.space(); } if (node.async) { this.word("async", true); this.space(); } if (kind === "method" || kind === "init") { if (node.generator) { this.tokenChar(42); } } if (node.computed) { this.tokenChar(91); this.print(key, node); this.tokenChar(93); } else { this.print(key, node); } if (node.optional) { this.tokenChar(63); } this._params(node, node.computed && node.key.type !== "StringLiteral" ? undefined : node.key, undefined); } function _predicate(node, noLineTerminatorAfter) { if (node.predicate) { if (!node.returnType) { this.tokenChar(58); } this.space(); this.print(node.predicate, node, noLineTerminatorAfter); } } function _functionHead(node, parent) { if (node.async) { this.word("async"); this._endsWithInnerRaw = false; this.space(); } this.word("function"); if (node.generator) { this._endsWithInnerRaw = false; this.tokenChar(42); } this.space(); if (node.id) { this.print(node.id, node); } this._params(node, node.id, parent); if (node.type !== "TSDeclareFunction") { this._predicate(node); } } function FunctionExpression(node, parent) { this._functionHead(node, parent); this.space(); this.print(node.body, node); } function ArrowFunctionExpression(node, parent) { if (node.async) { this.word("async", true); this.space(); } var firstParam; if (!this.format.retainLines && node.params.length === 1 && isIdentifier$g(firstParam = node.params[0]) && !hasTypesOrComments(node, firstParam)) { this.print(firstParam, node, true); } else { this._params(node, undefined, parent); } this._predicate(node, true); this.space(); this.printInnerComments(); this.token("=>"); this.space(); this.print(node.body, node); } function hasTypesOrComments(node, param) { var _param$leadingComment, _param$trailingCommen; return !!(node.typeParameters || node.returnType || node.predicate || param.typeAnnotation || param.optional || (_param$leadingComment = param.leadingComments) != null && _param$leadingComment.length || (_param$trailingCommen = param.trailingComments) != null && _param$trailingCommen.length); } function _getFuncIdName(idNode, parent) { var id = idNode; if (!id && parent) { var parentType = parent.type; if (parentType === "VariableDeclarator") { id = parent.id; } else if (parentType === "AssignmentExpression" || parentType === "AssignmentPattern") { id = parent.left; } else if (parentType === "ObjectProperty" || parentType === "ClassProperty") { if (!parent.computed || parent.key.type === "StringLiteral") { id = parent.key; } } else if (parentType === "ClassPrivateProperty" || parentType === "ClassAccessorProperty") { id = parent.key; } } if (!id) return; var nameInfo; if (id.type === "Identifier") { var _id$loc, _id$loc2; nameInfo = { pos: (_id$loc = id.loc) == null ? void 0 : _id$loc.start, name: ((_id$loc2 = id.loc) == null ? void 0 : _id$loc2.identifierName) || id.name }; } else if (id.type === "PrivateName") { var _id$loc3; nameInfo = { pos: (_id$loc3 = id.loc) == null ? void 0 : _id$loc3.start, name: "#" + id.id.name }; } else if (id.type === "StringLiteral") { var _id$loc4; nameInfo = { pos: (_id$loc4 = id.loc) == null ? void 0 : _id$loc4.start, name: id.value }; } return nameInfo; } var isClassDeclaration = isClassDeclaration$2, isExportDefaultSpecifier = isExportDefaultSpecifier$1, isExportNamespaceSpecifier = isExportNamespaceSpecifier$1, isImportDefaultSpecifier = isImportDefaultSpecifier$1, isImportNamespaceSpecifier = isImportNamespaceSpecifier$1, isStatement$6 = isStatement$8; function ImportSpecifier(node) { if (node.importKind === "type" || node.importKind === "typeof") { this.word(node.importKind); this.space(); } this.print(node.imported, node); if (node.local && node.local.name !== node.imported.name) { this.space(); this.word("as"); this.space(); this.print(node.local, node); } } function ImportDefaultSpecifier(node) { this.print(node.local, node); } function ExportDefaultSpecifier(node) { this.print(node.exported, node); } function ExportSpecifier(node) { if (node.exportKind === "type") { this.word("type"); this.space(); } this.print(node.local, node); if (node.exported && node.local.name !== node.exported.name) { this.space(); this.word("as"); this.space(); this.print(node.exported, node); } } function ExportNamespaceSpecifier(node) { this.tokenChar(42); this.space(); this.word("as"); this.space(); this.print(node.exported, node); } function _printAssertions(node) { this.word("assert"); this.space(); this.tokenChar(123); this.space(); this.printList(node.assertions, node); this.space(); this.tokenChar(125); } function ExportAllDeclaration(node) { var _node$assertions; this.word("export"); this.space(); if (node.exportKind === "type") { this.word("type"); this.space(); } this.tokenChar(42); this.space(); this.word("from"); this.space(); if ((_node$assertions = node.assertions) != null && _node$assertions.length) { this.print(node.source, node, true); this.space(); this._printAssertions(node); } else { this.print(node.source, node); } this.semicolon(); } function maybePrintDecoratorsBeforeExport(printer, node) { if (isClassDeclaration(node.declaration) && printer._shouldPrintDecoratorsBeforeExport(node)) { printer.printJoin(node.declaration.decorators, node); } } function ExportNamedDeclaration(node) { maybePrintDecoratorsBeforeExport(this, node); this.word("export"); this.space(); if (node.declaration) { var declar = node.declaration; this.print(declar, node); if (!isStatement$6(declar)) this.semicolon(); } else { if (node.exportKind === "type") { this.word("type"); this.space(); } var specifiers = node.specifiers.slice(0); var hasSpecial = false; for (;;) { var first = specifiers[0]; if (isExportDefaultSpecifier(first) || isExportNamespaceSpecifier(first)) { hasSpecial = true; this.print(specifiers.shift(), node); if (specifiers.length) { this.tokenChar(44); this.space(); } } else { break; } } if (specifiers.length || !specifiers.length && !hasSpecial) { this.tokenChar(123); if (specifiers.length) { this.space(); this.printList(specifiers, node); this.space(); } this.tokenChar(125); } if (node.source) { var _node$assertions2; this.space(); this.word("from"); this.space(); if ((_node$assertions2 = node.assertions) != null && _node$assertions2.length) { this.print(node.source, node, true); this.space(); this._printAssertions(node); } else { this.print(node.source, node); } } this.semicolon(); } } function ExportDefaultDeclaration(node) { maybePrintDecoratorsBeforeExport(this, node); this.word("export"); this.noIndentInnerCommentsHere(); this.space(); this.word("default"); this.space(); var declar = node.declaration; this.print(declar, node); if (!isStatement$6(declar)) this.semicolon(); } function ImportDeclaration(node) { var _node$assertions3; this.word("import"); this.space(); var isTypeKind = node.importKind === "type" || node.importKind === "typeof"; if (isTypeKind) { this.noIndentInnerCommentsHere(); this.word(node.importKind); this.space(); } else if (node.module) { this.noIndentInnerCommentsHere(); this.word("module"); this.space(); } var specifiers = node.specifiers.slice(0); var hasSpecifiers = !!specifiers.length; while (hasSpecifiers) { var first = specifiers[0]; if (isImportDefaultSpecifier(first) || isImportNamespaceSpecifier(first)) { this.print(specifiers.shift(), node); if (specifiers.length) { this.tokenChar(44); this.space(); } } else { break; } } if (specifiers.length) { this.tokenChar(123); this.space(); this.printList(specifiers, node); this.space(); this.tokenChar(125); } else if (isTypeKind && !hasSpecifiers) { this.tokenChar(123); this.tokenChar(125); } if (hasSpecifiers || isTypeKind) { this.space(); this.word("from"); this.space(); } if ((_node$assertions3 = node.assertions) != null && _node$assertions3.length) { this.print(node.source, node, true); this.space(); this._printAssertions(node); } else { this.print(node.source, node); } { var _node$attributes; if ((_node$attributes = node.attributes) != null && _node$attributes.length) { this.space(); this.word("with"); this.space(); this.printList(node.attributes, node); } } this.semicolon(); } function ImportAttribute(node) { this.print(node.key); this.tokenChar(58); this.space(); this.print(node.value); } function ImportNamespaceSpecifier(node) { this.tokenChar(42); this.space(); this.word("as"); this.space(); this.print(node.local, node); } var jsesc_1$1; var hasRequiredJsesc$1; function requireJsesc$1() { if (hasRequiredJsesc$1) return jsesc_1$1; hasRequiredJsesc$1 = 1; var object = {}; var hasOwnProperty = object.hasOwnProperty; var forOwn = function forOwn(object, callback) { for (var key in object) { if (hasOwnProperty.call(object, key)) { callback(key, object[key]); } } }; var extend = function extend(destination, source) { if (!source) { return destination; } forOwn(source, function (key, value) { destination[key] = value; }); return destination; }; var forEach = function forEach(array, callback) { var length = array.length; var index = -1; while (++index < length) { callback(array[index]); } }; var fourHexEscape = function fourHexEscape(hex) { return "\\u" + ('0000' + hex).slice(-4); }; var hexadecimal = function hexadecimal(code, lowercase) { var hexadecimal = code.toString(16); if (lowercase) return hexadecimal; return hexadecimal.toUpperCase(); }; var toString = object.toString; var isArray = Array.isArray; var isBuffer = function isBuffer(value) { return typeof Buffer$1 === 'function' && Buffer$1.isBuffer(value); }; var isObject = function isObject(value) { return toString.call(value) == '[object Object]'; }; var isString = function isString(value) { return typeof value == 'string' || toString.call(value) == '[object String]'; }; var isNumber = function isNumber(value) { return typeof value == 'number' || toString.call(value) == '[object Number]'; }; var isFunction = function isFunction(value) { return typeof value == 'function'; }; var isMap = function isMap(value) { return toString.call(value) == '[object Map]'; }; var isSet = function isSet(value) { return toString.call(value) == '[object Set]'; }; var singleEscapes = { '\\': '\\\\', '\b': '\\b', '\f': '\\f', '\n': '\\n', '\r': '\\r', '\t': '\\t' }; var regexSingleEscape = /[\\\b\f\n\r\t]/; var regexDigit = /[0-9]/; var regexWhitespace = /[\xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/; var escapeEverythingRegex = /([\uD800-\uDBFF][\uDC00-\uDFFF])|([\uD800-\uDFFF])|(['"`])|[^]/g; var escapeNonAsciiRegex = /([\uD800-\uDBFF][\uDC00-\uDFFF])|([\uD800-\uDFFF])|(['"`])|[^ !#-&\(-\[\]-_a-~]/g; var jsesc = function jsesc(argument, options) { var increaseIndentation = function increaseIndentation() { oldIndent = indent; ++options.indentLevel; indent = options.indent.repeat(options.indentLevel); }; var defaults = { 'escapeEverything': false, 'minimal': false, 'isScriptContext': false, 'quotes': 'single', 'wrap': false, 'es6': false, 'json': false, 'compact': true, 'lowercaseHex': false, 'numbers': 'decimal', 'indent': '\t', 'indentLevel': 0, '__inline1__': false, '__inline2__': false }; var json = options && options.json; if (json) { defaults.quotes = 'double'; defaults.wrap = true; } options = extend(defaults, options); if (options.quotes != 'single' && options.quotes != 'double' && options.quotes != 'backtick') { options.quotes = 'single'; } var quote = options.quotes == 'double' ? '"' : options.quotes == 'backtick' ? '`' : '\''; var compact = options.compact; var lowercaseHex = options.lowercaseHex; var indent = options.indent.repeat(options.indentLevel); var oldIndent = ''; var inline1 = options.__inline1__; var inline2 = options.__inline2__; var newLine = compact ? '' : '\n'; var result; var isEmpty = true; var useBinNumbers = options.numbers == 'binary'; var useOctNumbers = options.numbers == 'octal'; var useDecNumbers = options.numbers == 'decimal'; var useHexNumbers = options.numbers == 'hexadecimal'; if (json && argument && isFunction(argument.toJSON)) { argument = argument.toJSON(); } if (!isString(argument)) { if (isMap(argument)) { if (argument.size == 0) { return 'new Map()'; } if (!compact) { options.__inline1__ = true; options.__inline2__ = false; } return 'new Map(' + jsesc(Array.from(argument), options) + ')'; } if (isSet(argument)) { if (argument.size == 0) { return 'new Set()'; } return 'new Set(' + jsesc(Array.from(argument), options) + ')'; } if (isBuffer(argument)) { if (argument.length == 0) { return 'Buffer.from([])'; } return 'Buffer.from(' + jsesc(Array.from(argument), options) + ')'; } if (isArray(argument)) { result = []; options.wrap = true; if (inline1) { options.__inline1__ = false; options.__inline2__ = true; } if (!inline2) { increaseIndentation(); } forEach(argument, function (value) { isEmpty = false; if (inline2) { options.__inline2__ = false; } result.push((compact || inline2 ? '' : indent) + jsesc(value, options)); }); if (isEmpty) { return '[]'; } if (inline2) { return '[' + result.join(', ') + ']'; } return '[' + newLine + result.join(',' + newLine) + newLine + (compact ? '' : oldIndent) + ']'; } else if (isNumber(argument)) { if (json) { return JSON.stringify(argument); } if (useDecNumbers) { return String(argument); } if (useHexNumbers) { var _hexadecimal = argument.toString(16); if (!lowercaseHex) { _hexadecimal = _hexadecimal.toUpperCase(); } return '0x' + _hexadecimal; } if (useBinNumbers) { return '0b' + argument.toString(2); } if (useOctNumbers) { return '0o' + argument.toString(8); } } else if (!isObject(argument)) { if (json) { return JSON.stringify(argument) || 'null'; } return String(argument); } else { result = []; options.wrap = true; increaseIndentation(); forOwn(argument, function (key, value) { isEmpty = false; result.push((compact ? '' : indent) + jsesc(key, options) + ':' + (compact ? '' : ' ') + jsesc(value, options)); }); if (isEmpty) { return '{}'; } return '{' + newLine + result.join(',' + newLine) + newLine + (compact ? '' : oldIndent) + '}'; } } var regex = options.escapeEverything ? escapeEverythingRegex : escapeNonAsciiRegex; result = argument.replace(regex, function (_char, pair, lone, quoteChar, index, string) { if (pair) { if (options.minimal) return pair; var first = pair.charCodeAt(0); var second = pair.charCodeAt(1); if (options.es6) { var codePoint = (first - 0xD800) * 0x400 + second - 0xDC00 + 0x10000; var _hex = hexadecimal(codePoint, lowercaseHex); return "\\u{" + _hex + '}'; } return fourHexEscape(hexadecimal(first, lowercaseHex)) + fourHexEscape(hexadecimal(second, lowercaseHex)); } if (lone) { return fourHexEscape(hexadecimal(lone.charCodeAt(0), lowercaseHex)); } if (_char == '\0' && !json && !regexDigit.test(string.charAt(index + 1))) { return '\\0'; } if (quoteChar) { if (quoteChar == quote || options.escapeEverything) { return '\\' + quoteChar; } return quoteChar; } if (regexSingleEscape.test(_char)) { return singleEscapes[_char]; } if (options.minimal && !regexWhitespace.test(_char)) { return _char; } var hex = hexadecimal(_char.charCodeAt(0), lowercaseHex); if (json || hex.length > 2) { return fourHexEscape(hex); } return '\\x' + ('00' + hex).slice(-2); }); if (quote == '`') { result = result.replace(/\$\{/g, '\\${'); } if (options.isScriptContext) { result = result.replace(/<\/(script|style)/gi, '<\\/$1').replace(/