Update .bashrc
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-prettier / node_modules / prettier / third-party.js
old mode 100755 (executable)
new mode 100644 (file)
index 61f98aa..01f8124
@@ -1,29 +1,34 @@
 'use strict';
 
-Object.defineProperty(exports, '__esModule', { value: true });
+var require$$0$3 = require('os');
+var require$$0$1 = require('path');
+var require$$1$1 = require('module');
+var require$$1 = require('fs');
+var require$$0$2 = require('util');
 
-function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
+function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
 
-var os = _interopDefault(require('os'));
-var path = _interopDefault(require('path'));
-var module$1 = _interopDefault(require('module'));
-var fs = _interopDefault(require('fs'));
-var util = _interopDefault(require('util'));
-var stream = _interopDefault(require('stream'));
+var require$$0__default$2 = /*#__PURE__*/_interopDefaultLegacy(require$$0$3);
+var require$$0__default = /*#__PURE__*/_interopDefaultLegacy(require$$0$1);
+var require$$1__default$1 = /*#__PURE__*/_interopDefaultLegacy(require$$1$1);
+var require$$1__default = /*#__PURE__*/_interopDefaultLegacy(require$$1);
+var require$$0__default$1 = /*#__PURE__*/_interopDefaultLegacy(require$$0$2);
 
-function unwrapExports (x) {
-       return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
-}
+var dist$2 = {};
 
-function createCommonjsModule(fn, module) {
-       return module = { exports: {} }, fn(module, module.exports), module.exports;
-}
+var Explorer$1 = {};
 
-function getCjsExportFromNamespace (n) {
-       return n && n['default'] || n;
-}
+var ExplorerBase$1 = {};
+
+var loaders$1 = {};
 
-const resolveFrom = (fromDir, moduleId, silent) => {
+var resolveFrom$2 = {exports: {}};
+
+const path$1 = require$$0__default["default"];
+const Module = require$$1__default$1["default"];
+const fs$1 = require$$1__default["default"];
+
+const resolveFrom$1 = (fromDir, moduleId, silent) => {
   if (typeof fromDir !== 'string') {
     throw new TypeError(`Expected \`fromDir\` to be of type \`string\`, got \`${typeof fromDir}\``);
   }
@@ -33,10 +38,10 @@ const resolveFrom = (fromDir, moduleId, silent) => {
   }
 
   try {
-    fromDir = fs.realpathSync(fromDir);
+    fromDir = fs$1.realpathSync(fromDir);
   } catch (err) {
     if (err.code === 'ENOENT') {
-      fromDir = path.resolve(fromDir);
+      fromDir = path$1.resolve(fromDir);
     } else if (silent) {
       return null;
     } else {
@@ -44,12 +49,12 @@ const resolveFrom = (fromDir, moduleId, silent) => {
     }
   }
 
-  const fromFile = path.join(fromDir, 'noop.js');
+  const fromFile = path$1.join(fromDir, 'noop.js');
 
-  const resolveFileName = () => module$1._resolveFilename(moduleId, {
+  const resolveFileName = () => Module._resolveFilename(moduleId, {
     id: fromFile,
     filename: fromFile,
-    paths: module$1._nodeModulePaths(fromDir)
+    paths: Module._nodeModulePaths(fromDir)
   });
 
   if (silent) {
@@ -63,19 +68,38 @@ const resolveFrom = (fromDir, moduleId, silent) => {
   return resolveFileName();
 };
 
-var resolveFrom_1 = (fromDir, moduleId) => resolveFrom(fromDir, moduleId);
+resolveFrom$2.exports = (fromDir, moduleId) => resolveFrom$1(fromDir, moduleId);
+
+resolveFrom$2.exports.silent = (fromDir, moduleId) => resolveFrom$1(fromDir, moduleId, true);
+
+var callsites$1 = {exports: {}};
+
+const callsites = () => {
+  const _prepareStackTrace = Error.prepareStackTrace;
+
+  Error.prepareStackTrace = (_, stack) => stack;
+
+  const stack = new Error().stack.slice(1);
+  Error.prepareStackTrace = _prepareStackTrace;
+  return stack;
+};
+
+callsites$1.exports = callsites; // TODO: Remove this for the next major release
+
+callsites$1.exports.default = callsites;
 
-var silent = (fromDir, moduleId) => resolveFrom(fromDir, moduleId, true);
-resolveFrom_1.silent = silent;
+const path = require$$0__default["default"];
+const resolveFrom = resolveFrom$2.exports;
 
-var importFresh = moduleId => {
+var importFresh$1 = moduleId => {
   if (typeof moduleId !== 'string') {
     throw new TypeError('Expected a string');
   }
 
   const parentPath = __filename;
-  const filePath = resolveFrom_1(path.dirname(parentPath), moduleId);
-  const oldModule = eval('require').cache[filePath]; // Delete itself from module parent
+  const cwd = parentPath ? path.dirname(parentPath) : __dirname;
+  const filePath = resolveFrom(cwd, moduleId);
+  const oldModule = require.cache[filePath]; // Delete itself from module parent
 
   if (oldModule && oldModule.parent) {
     let i = oldModule.parent.children.length;
@@ -87,14 +111,14 @@ var importFresh = moduleId => {
     }
   }
 
-  delete eval('require').cache[filePath]; // Delete module from cache
+  delete require.cache[filePath]; // Delete module from cache
 
-  const parent = eval('require').cache[parentPath]; // If `filePath` and `parentPath` are the same, cache will already be deleted so we won't get a memory leak in next step
+  const parent = require.cache[parentPath]; // If `filePath` and `parentPath` are the same, cache will already be deleted so we won't get a memory leak in next step
 
-  return parent === undefined ? eval('require')(filePath) : parent.require(filePath); // In case cache doesn't have parent, fall back to normal require
+  return parent === undefined ? require(filePath) : parent.require(filePath); // In case cache doesn't have parent, fall back to normal require
 };
 
-var isArrayish = function isArrayish(obj) {
+var isArrayish$1 = function isArrayish(obj) {
   if (!obj) {
     return false;
   }
@@ -102,7 +126,10 @@ var isArrayish = function isArrayish(obj) {
   return obj instanceof Array || Array.isArray(obj) || obj.length >= 0 && obj.splice instanceof Function;
 };
 
-var errorEx = function errorEx(name, properties) {
+var util = require$$0__default$1["default"];
+var isArrayish = isArrayish$1;
+
+var errorEx$1 = function errorEx(name, properties) {
   if (!name || name.constructor !== String) {
     properties = name || {};
     name = Error.name;
@@ -202,7 +229,7 @@ var errorEx = function errorEx(name, properties) {
   return errorExError;
 };
 
-errorEx.append = function (str, def) {
+errorEx$1.append = function (str, def) {
   return {
     message: function (v, message) {
       v = v || def;
@@ -216,7 +243,7 @@ errorEx.append = function (str, def) {
   };
 };
 
-errorEx.line = function (str, def) {
+errorEx$1.line = function (str, def) {
   return {
     line: function (v) {
       v = v || def;
@@ -230,684 +257,415 @@ errorEx.line = function (str, def) {
   };
 };
 
-var errorEx_1 = errorEx;
-
-var jsonParseBetterErrors = parseJson;
+var errorEx_1 = errorEx$1;
 
-function parseJson(txt, reviver, context) {
-  context = context || 20;
-
-  try {
-    return JSON.parse(txt, reviver);
-  } catch (e) {
-    if (typeof txt !== 'string') {
-      const isEmptyArray = Array.isArray(txt) && txt.length === 0;
-      const errorMessage = 'Cannot parse ' + (isEmptyArray ? 'an empty array' : String(txt));
-      throw new TypeError(errorMessage);
-    }
-
-    const syntaxErr = e.message.match(/^Unexpected token.*position\s+(\d+)/i);
-    const errIdx = syntaxErr ? +syntaxErr[1] : e.message.match(/^Unexpected end of JSON.*/i) ? txt.length - 1 : null;
-
-    if (errIdx != null) {
-      const start = errIdx <= context ? 0 : errIdx - context;
-      const end = errIdx + context >= txt.length ? txt.length : errIdx + context;
-      e.message += ` while parsing near '${start === 0 ? '' : '...'}${txt.slice(start, end)}${end === txt.length ? '' : '...'}'`;
-    } else {
-      e.message += ` while parsing '${txt.slice(0, context * 2)}'`;
-    }
+const hexify = char => {
+  const h = char.charCodeAt(0).toString(16).toUpperCase();
+  return '0x' + (h.length % 2 ? '0' : '') + h;
+};
 
-    throw e;
+const parseError = (e, txt, context) => {
+  if (!txt) {
+    return {
+      message: e.message + ' while parsing empty string',
+      position: 0
+    };
   }
-}
-
-var LF = '\n';
-var CR = '\r';
-
-var LinesAndColumns = function () {
-  function LinesAndColumns(string) {
-    this.string = string;
-    var offsets = [0];
 
-    for (var offset = 0; offset < string.length;) {
-      switch (string[offset]) {
-        case LF:
-          offset += LF.length;
-          offsets.push(offset);
-          break;
+  const badToken = e.message.match(/^Unexpected token (.) .*position\s+(\d+)/i);
+  const errIdx = badToken ? +badToken[2] : e.message.match(/^Unexpected end of JSON.*/i) ? txt.length - 1 : null;
+  const msg = badToken ? e.message.replace(/^Unexpected token ./, `Unexpected token ${JSON.stringify(badToken[1])} (${hexify(badToken[1])})`) : e.message;
 
-        case CR:
-          offset += CR.length;
+  if (errIdx !== null && errIdx !== undefined) {
+    const start = errIdx <= context ? 0 : errIdx - context;
+    const end = errIdx + context >= txt.length ? txt.length : errIdx + context;
+    const slice = (start === 0 ? '' : '...') + txt.slice(start, end) + (end === txt.length ? '' : '...');
+    const near = txt === slice ? '' : 'near ';
+    return {
+      message: msg + ` while parsing ${near}${JSON.stringify(slice)}`,
+      position: errIdx
+    };
+  } else {
+    return {
+      message: msg + ` while parsing '${txt.slice(0, context * 2)}'`,
+      position: 0
+    };
+  }
+};
 
-          if (string[offset] === LF) {
-            offset += LF.length;
-          }
+class JSONParseError extends SyntaxError {
+  constructor(er, txt, context, caller) {
+    context = context || 20;
+    const metadata = parseError(er, txt, context);
+    super(metadata.message);
+    Object.assign(this, metadata);
+    this.code = 'EJSONPARSE';
+    this.systemError = er;
+    Error.captureStackTrace(this, caller || this.constructor);
+  }
 
-          offsets.push(offset);
-          break;
+  get name() {
+    return this.constructor.name;
+  }
 
-        default:
-          offset++;
-          break;
-      }
-    }
+  set name(n) {}
 
-    this.offsets = offsets;
+  get [Symbol.toStringTag]() {
+    return this.constructor.name;
   }
 
-  LinesAndColumns.prototype.locationForIndex = function (index) {
-    if (index < 0 || index > this.string.length) {
-      return null;
-    }
+}
 
-    var line = 0;
-    var offsets = this.offsets;
+const kIndent = Symbol.for('indent');
+const kNewline = Symbol.for('newline'); // only respect indentation if we got a line break, otherwise squash it
+// things other than objects and arrays aren't indented, so ignore those
+// Important: in both of these regexps, the $1 capture group is the newline
+// or undefined, and the $2 capture group is the indent, or undefined.
 
-    while (offsets[line + 1] <= index) {
-      line++;
-    }
+const formatRE = /^\s*[{\[]((?:\r?\n)+)([\s\t]*)/;
+const emptyRE = /^(?:\{\}|\[\])((?:\r?\n)+)?$/;
 
-    var column = index - offsets[line];
-    return {
-      line: line,
-      column: column
-    };
-  };
+const parseJson$2 = (txt, reviver, context) => {
+  const parseText = stripBOM(txt);
+  context = context || 20;
 
-  LinesAndColumns.prototype.indexForLocation = function (location) {
-    var line = location.line,
-        column = location.column;
+  try {
+    // get the indentation so that we can save it back nicely
+    // if the file starts with {" then we have an indent of '', ie, none
+    // otherwise, pick the indentation of the next line after the first \n
+    // If the pattern doesn't match, then it means no indentation.
+    // JSON.stringify ignores symbols, so this is reasonably safe.
+    // if the string is '{}' or '[]', then use the default 2-space indent.
+    const [, newline = '\n', indent = '  '] = parseText.match(emptyRE) || parseText.match(formatRE) || [, '', ''];
+    const result = JSON.parse(parseText, reviver);
 
-    if (line < 0 || line >= this.offsets.length) {
-      return null;
+    if (result && typeof result === 'object') {
+      result[kNewline] = newline;
+      result[kIndent] = indent;
     }
 
-    if (column < 0 || column > this.lengthOfLine(line)) {
-      return null;
+    return result;
+  } catch (e) {
+    if (typeof txt !== 'string' && !Buffer.isBuffer(txt)) {
+      const isEmptyArray = Array.isArray(txt) && txt.length === 0;
+      throw Object.assign(new TypeError(`Cannot parse ${isEmptyArray ? 'an empty array' : String(txt)}`), {
+        code: 'EJSONPARSE',
+        systemError: e
+      });
     }
 
-    return this.offsets[line] + column;
-  };
+    throw new JSONParseError(e, parseText, context, parseJson$2);
+  }
+}; // Remove byte order marker. This catches EF BB BF (the UTF-8 BOM)
+// because the buffer-to-string conversion in `fs.readFileSync()`
+// translates it to FEFF, the UTF-16 BOM.
 
-  LinesAndColumns.prototype.lengthOfLine = function (line) {
-    var offset = this.offsets[line];
-    var nextOffset = line === this.offsets.length - 1 ? this.string.length : this.offsets[line + 1];
-    return nextOffset - offset;
-  };
 
-  return LinesAndColumns;
-}();
+const stripBOM = txt => String(txt).replace(/^\uFEFF/, '');
 
-var dist = /*#__PURE__*/Object.freeze({
-       __proto__: null,
-       'default': LinesAndColumns
-});
+var jsonParseEvenBetterErrors = parseJson$2;
+parseJson$2.JSONParseError = JSONParseError;
 
-var jsTokens = createCommonjsModule(function (module, exports) {
-  // Copyright 2014, 2015, 2016, 2017, 2018 Simon Lydell
-  // License: MIT. (See LICENSE.)
-  Object.defineProperty(exports, "__esModule", {
-    value: true
-  }); // This regex comes from regex.coffee, and is inserted here by generate-index.js
-  // (run `npm run build`).
+parseJson$2.noExceptions = (txt, reviver) => {
+  try {
+    return JSON.parse(stripBOM(txt), reviver);
+  } catch (e) {}
+};
 
-  exports.default = /((['"])(?:(?!\2|\\).|\\(?:\r\n|[\s\S]))*(\2)?|`(?:[^`\\$]|\\[\s\S]|\$(?!\{)|\$\{(?:[^{}]|\{[^}]*\}?)*\}?)*(`)?)|(\/\/.*)|(\/\*(?:[^*]|\*(?!\/))*(\*\/)?)|(\/(?!\*)(?:\[(?:(?![\]\\]).|\\.)*\]|(?![\/\]\\]).|\\.)+\/(?:(?!\s*(?:\b|[\u0080-\uFFFF$\\'"~({]|[+\-!](?!=)|\.?\d))|[gmiyus]{1,6}\b(?![\u0080-\uFFFF$\\]|\s*(?:[+\-*%&|^<>!=?({]|\/(?![\/*])))))|(0[xX][\da-fA-F]+|0[oO][0-7]+|0[bB][01]+|(?:\d*\.\d+|\d+\.?)(?:[eE][+-]?\d+)?)|((?!\d)(?:(?!\s)[$\w\u0080-\uFFFF]|\\u[\da-fA-F]{4}|\\u\{[\da-fA-F]+\})+)|(--|\+\+|&&|\|\||=>|\.{3}|(?:[+\-\/%&|^]|\*{1,2}|<{1,2}|>{1,3}|!=?|={1,2})=?|[?~.,:;[\](){}])|(\s+)|(^$|[\s\S])/g;
+var dist$1 = {};
 
-  exports.matchToToken = function (match) {
-    var token = {
-      type: "invalid",
-      value: match[0],
-      closed: undefined
-    };
-    if (match[1]) token.type = "string", token.closed = !!(match[3] || match[4]);else if (match[5]) token.type = "comment";else if (match[6]) token.type = "comment", token.closed = !!match[7];else if (match[8]) token.type = "regex";else if (match[9]) token.type = "number";else if (match[10]) token.type = "name";else if (match[11]) token.type = "punctuator";else if (match[12]) token.type = "whitespace";
-    return token;
-  };
-});
-unwrapExports(jsTokens);
-var jsTokens_1 = jsTokens.matchToToken;
-
-var ast = createCommonjsModule(function (module) {
-  /*
-    Copyright (C) 2013 Yusuke Suzuki <utatane.tea@gmail.com>
-  
-    Redistribution and use in source and binary forms, with or without
-    modification, are permitted provided that the following conditions are met:
-  
-      * Redistributions of source code must retain the above copyright
-        notice, this list of conditions and the following disclaimer.
-      * Redistributions in binary form must reproduce the above copyright
-        notice, this list of conditions and the following disclaimer in the
-        documentation and/or other materials provided with the distribution.
-  
-    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 'AS IS'
-    AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-    IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-    ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
-    DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-    (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-    LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-    ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-    (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
-    THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-  */
-  (function () {
-
-    function isExpression(node) {
-      if (node == null) {
-        return false;
-      }
+(function (exports) {
 
-      switch (node.type) {
-        case 'ArrayExpression':
-        case 'AssignmentExpression':
-        case 'BinaryExpression':
-        case 'CallExpression':
-        case 'ConditionalExpression':
-        case 'FunctionExpression':
-        case 'Identifier':
-        case 'Literal':
-        case 'LogicalExpression':
-        case 'MemberExpression':
-        case 'NewExpression':
-        case 'ObjectExpression':
-        case 'SequenceExpression':
-        case 'ThisExpression':
-        case 'UnaryExpression':
-        case 'UpdateExpression':
-          return true;
-      }
+  var LF = '\n';
+  var CR = '\r';
 
-      return false;
-    }
+  var LinesAndColumns = function () {
+    function LinesAndColumns(string) {
+      this.string = string;
+      var offsets = [0];
 
-    function isIterationStatement(node) {
-      if (node == null) {
-        return false;
-      }
+      for (var offset = 0; offset < string.length;) {
+        switch (string[offset]) {
+          case LF:
+            offset += LF.length;
+            offsets.push(offset);
+            break;
 
-      switch (node.type) {
-        case 'DoWhileStatement':
-        case 'ForInStatement':
-        case 'ForStatement':
-        case 'WhileStatement':
-          return true;
-      }
+          case CR:
+            offset += CR.length;
 
-      return false;
-    }
+            if (string[offset] === LF) {
+              offset += LF.length;
+            }
 
-    function isStatement(node) {
-      if (node == null) {
-        return false;
-      }
+            offsets.push(offset);
+            break;
 
-      switch (node.type) {
-        case 'BlockStatement':
-        case 'BreakStatement':
-        case 'ContinueStatement':
-        case 'DebuggerStatement':
-        case 'DoWhileStatement':
-        case 'EmptyStatement':
-        case 'ExpressionStatement':
-        case 'ForInStatement':
-        case 'ForStatement':
-        case 'IfStatement':
-        case 'LabeledStatement':
-        case 'ReturnStatement':
-        case 'SwitchStatement':
-        case 'ThrowStatement':
-        case 'TryStatement':
-        case 'VariableDeclaration':
-        case 'WhileStatement':
-        case 'WithStatement':
-          return true;
+          default:
+            offset++;
+            break;
+        }
       }
 
-      return false;
-    }
-
-    function isSourceElement(node) {
-      return isStatement(node) || node != null && node.type === 'FunctionDeclaration';
+      this.offsets = offsets;
     }
 
-    function trailingStatement(node) {
-      switch (node.type) {
-        case 'IfStatement':
-          if (node.alternate != null) {
-            return node.alternate;
-          }
+    LinesAndColumns.prototype.locationForIndex = function (index) {
+      if (index < 0 || index > this.string.length) {
+        return null;
+      }
 
-          return node.consequent;
+      var line = 0;
+      var offsets = this.offsets;
 
-        case 'LabeledStatement':
-        case 'ForStatement':
-        case 'ForInStatement':
-        case 'WhileStatement':
-        case 'WithStatement':
-          return node.body;
+      while (offsets[line + 1] <= index) {
+        line++;
       }
 
-      return null;
-    }
+      var column = index - offsets[line];
+      return {
+        line: line,
+        column: column
+      };
+    };
 
-    function isProblematicIfStatement(node) {
-      var current;
+    LinesAndColumns.prototype.indexForLocation = function (location) {
+      var line = location.line,
+          column = location.column;
 
-      if (node.type !== 'IfStatement') {
-        return false;
+      if (line < 0 || line >= this.offsets.length) {
+        return null;
       }
 
-      if (node.alternate == null) {
-        return false;
+      if (column < 0 || column > this.lengthOfLine(line)) {
+        return null;
       }
 
-      current = node.consequent;
-
-      do {
-        if (current.type === 'IfStatement') {
-          if (current.alternate == null) {
-            return true;
-          }
-        }
-
-        current = trailingStatement(current);
-      } while (current);
-
-      return false;
-    }
-
-    module.exports = {
-      isExpression: isExpression,
-      isStatement: isStatement,
-      isIterationStatement: isIterationStatement,
-      isSourceElement: isSourceElement,
-      isProblematicIfStatement: isProblematicIfStatement,
-      trailingStatement: trailingStatement
+      return this.offsets[line] + column;
     };
-  })();
-  /* vim: set sw=4 ts=4 et tw=80 : */
 
-});
-var ast_1 = ast.isExpression;
-var ast_2 = ast.isStatement;
-var ast_3 = ast.isIterationStatement;
-var ast_4 = ast.isSourceElement;
-var ast_5 = ast.isProblematicIfStatement;
-var ast_6 = ast.trailingStatement;
-
-var code = createCommonjsModule(function (module) {
-  /*
-    Copyright (C) 2013-2014 Yusuke Suzuki <utatane.tea@gmail.com>
-    Copyright (C) 2014 Ivan Nikulin <ifaaan@gmail.com>
-  
-    Redistribution and use in source and binary forms, with or without
-    modification, are permitted provided that the following conditions are met:
-  
-      * Redistributions of source code must retain the above copyright
-        notice, this list of conditions and the following disclaimer.
-      * Redistributions in binary form must reproduce the above copyright
-        notice, this list of conditions and the following disclaimer in the
-        documentation and/or other materials provided with the distribution.
-  
-    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-    AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-    IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-    ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
-    DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-    (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-    LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-    ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-    (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
-    THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-  */
-  (function () {
-
-    var ES6Regex, ES5Regex, NON_ASCII_WHITESPACES, IDENTIFIER_START, IDENTIFIER_PART, ch; // See `tools/generate-identifier-regex.js`.
-
-    ES5Regex = {
-      // ECMAScript 5.1/Unicode v9.0.0 NonAsciiIdentifierStart:
-      NonAsciiIdentifierStart: /[\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\u0561-\u0587\u05D0-\u05EA\u05F0-\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\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/,
-      // ECMAScript 5.1/Unicode v9.0.0 NonAsciiIdentifierPart:
-      NonAsciiIdentifierPart: /[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\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\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFB-\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\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/
-    };
-    ES6Regex = {
-      // ECMAScript 6/Unicode v9.0.0 NonAsciiIdentifierStart:
-      NonAsciiIdentifierStart: /[\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\u0561-\u0587\u05D0-\u05EA\u05F0-\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\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]/,
-      // ECMAScript 6/Unicode v9.0.0 NonAsciiIdentifierPart:
-      NonAsciiIdentifierPart: /[\xAA\xB5\xB7\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\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\u135D-\u135F\u1369-\u1371\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFB-\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\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F\uDFE0]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6\uDD00-\uDD4A\uDD50-\uDD59]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/
+    LinesAndColumns.prototype.lengthOfLine = function (line) {
+      var offset = this.offsets[line];
+      var nextOffset = line === this.offsets.length - 1 ? this.string.length : this.offsets[line + 1];
+      return nextOffset - offset;
     };
 
-    function isDecimalDigit(ch) {
-      return 0x30 <= ch && ch <= 0x39; // 0..9
-    }
+    return LinesAndColumns;
+  }();
 
-    function isHexDigit(ch) {
-      return 0x30 <= ch && ch <= 0x39 || // 0..9
-      0x61 <= ch && ch <= 0x66 || // a..f
-      0x41 <= ch && ch <= 0x46; // A..F
-    }
+  exports.__esModule = true;
+  exports["default"] = LinesAndColumns;
+})(dist$1);
 
-    function isOctalDigit(ch) {
-      return ch >= 0x30 && ch <= 0x37; // 0..7
-    } // 7.2 White Space
+var lib$2 = {};
 
+var lib$1 = {};
 
-    NON_ASCII_WHITESPACES = [0x1680, 0x2000, 0x2001, 0x2002, 0x2003, 0x2004, 0x2005, 0x2006, 0x2007, 0x2008, 0x2009, 0x200A, 0x202F, 0x205F, 0x3000, 0xFEFF];
+var jsTokens = {};
 
-    function isWhiteSpace(ch) {
-      return ch === 0x20 || ch === 0x09 || ch === 0x0B || ch === 0x0C || ch === 0xA0 || ch >= 0x1680 && NON_ASCII_WHITESPACES.indexOf(ch) >= 0;
-    } // 7.3 Line Terminators
+// License: MIT. (See LICENSE.)
 
+Object.defineProperty(jsTokens, "__esModule", {
+  value: true
+}); // This regex comes from regex.coffee, and is inserted here by generate-index.js
+// (run `npm run build`).
 
-    function isLineTerminator(ch) {
-      return ch === 0x0A || ch === 0x0D || ch === 0x2028 || ch === 0x2029;
-    } // 7.6 Identifier Names and Identifiers
+jsTokens.default = /((['"])(?:(?!\2|\\).|\\(?:\r\n|[\s\S]))*(\2)?|`(?:[^`\\$]|\\[\s\S]|\$(?!\{)|\$\{(?:[^{}]|\{[^}]*\}?)*\}?)*(`)?)|(\/\/.*)|(\/\*(?:[^*]|\*(?!\/))*(\*\/)?)|(\/(?!\*)(?:\[(?:(?![\]\\]).|\\.)*\]|(?![\/\]\\]).|\\.)+\/(?:(?!\s*(?:\b|[\u0080-\uFFFF$\\'"~({]|[+\-!](?!=)|\.?\d))|[gmiyus]{1,6}\b(?![\u0080-\uFFFF$\\]|\s*(?:[+\-*%&|^<>!=?({]|\/(?![\/*])))))|(0[xX][\da-fA-F]+|0[oO][0-7]+|0[bB][01]+|(?:\d*\.\d+|\d+\.?)(?:[eE][+-]?\d+)?)|((?!\d)(?:(?!\s)[$\w\u0080-\uFFFF]|\\u[\da-fA-F]{4}|\\u\{[\da-fA-F]+\})+)|(--|\+\+|&&|\|\||=>|\.{3}|(?:[+\-\/%&|^]|\*{1,2}|<{1,2}|>{1,3}|!=?|={1,2})=?|[?~.,:;[\](){}])|(\s+)|(^$|[\s\S])/g;
 
+jsTokens.matchToToken = function (match) {
+  var token = {
+    type: "invalid",
+    value: match[0],
+    closed: undefined
+  };
+  if (match[1]) token.type = "string", token.closed = !!(match[3] || match[4]);else if (match[5]) token.type = "comment";else if (match[6]) token.type = "comment", token.closed = !!match[7];else if (match[8]) token.type = "regex";else if (match[9]) token.type = "number";else if (match[10]) token.type = "name";else if (match[11]) token.type = "punctuator";else if (match[12]) token.type = "whitespace";
+  return token;
+};
 
-    function fromCodePoint(cp) {
-      if (cp <= 0xFFFF) {
-        return String.fromCharCode(cp);
-      }
+var lib = {};
 
-      var cu1 = String.fromCharCode(Math.floor((cp - 0x10000) / 0x400) + 0xD800);
-      var cu2 = String.fromCharCode((cp - 0x10000) % 0x400 + 0xDC00);
-      return cu1 + cu2;
-    }
+var identifier = {};
 
-    IDENTIFIER_START = new Array(0x80);
+Object.defineProperty(identifier, "__esModule", {
+  value: true
+});
+identifier.isIdentifierStart = isIdentifierStart;
+identifier.isIdentifierChar = isIdentifierChar;
+identifier.isIdentifierName = isIdentifierName;
+let 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";
+let 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\u0d00-\u0d03\u0d3b\u0d3c\u0d3e-\u0d44\u0d46-\u0d48\u0d4a-\u0d4d\u0d57\u0d62\u0d63\u0d66-\u0d6f\u0d81-\u0d83\u0dca\u0dcf-\u0dd4\u0dd6\u0dd8-\u0ddf\u0de6-\u0def\u0df2\u0df3\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0e50-\u0e59\u0eb1\u0eb4-\u0ebc\u0ec8-\u0ecd\u0ed0-\u0ed9\u0f18\u0f19\u0f20-\u0f29\u0f35\u0f37\u0f39\u0f3e\u0f3f\u0f71-\u0f84\u0f86\u0f87\u0f8d-\u0f97\u0f99-\u0fbc\u0fc6\u102b-\u103e\u1040-\u1049\u1056-\u1059\u105e-\u1060\u1062-\u1064\u1067-\u106d\u1071-\u1074\u1082-\u108d\u108f-\u109d\u135d-\u135f\u1369-\u1371\u1712-\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";
+const nonASCIIidentifierStart = new RegExp("[" + nonASCIIidentifierStartChars + "]");
+const nonASCIIidentifier = new RegExp("[" + nonASCIIidentifierStartChars + nonASCIIidentifierChars + "]");
+nonASCIIidentifierStartChars = nonASCIIidentifierChars = null;
+const 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, 85, 6, 2, 0, 2, 3, 2, 14, 2, 9, 8, 46, 39, 7, 3, 1, 3, 21, 2, 6, 2, 1, 2, 4, 4, 0, 19, 0, 13, 4, 159, 52, 19, 3, 21, 2, 31, 47, 21, 1, 2, 0, 185, 46, 42, 3, 37, 47, 21, 0, 60, 42, 14, 0, 72, 26, 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, 190, 0, 80, 921, 103, 110, 18, 195, 2637, 96, 16, 1070, 4050, 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, 46, 2, 18, 3, 9, 395, 2309, 106, 6, 12, 4, 8, 8, 9, 5991, 84, 2, 70, 2, 1, 3, 0, 3, 1, 3, 3, 2, 11, 2, 0, 2, 6, 2, 64, 2, 3, 3, 7, 2, 6, 2, 27, 2, 3, 2, 4, 2, 0, 4, 6, 2, 339, 3, 24, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 7, 1845, 30, 482, 44, 11, 6, 17, 0, 322, 29, 19, 43, 1269, 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, 4152, 8, 221, 3, 5761, 15, 7472, 3104, 541, 1507, 4938];
+const astralIdentifierCodes = [509, 0, 227, 0, 150, 4, 294, 9, 1368, 2, 2, 1, 6, 3, 41, 2, 5, 0, 166, 1, 574, 3, 9, 9, 370, 1, 154, 10, 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, 161, 11, 6, 9, 7, 3, 56, 1, 2, 6, 3, 1, 3, 2, 10, 0, 11, 1, 3, 6, 4, 4, 193, 17, 10, 9, 5, 0, 82, 19, 13, 9, 214, 6, 3, 8, 28, 1, 83, 16, 16, 9, 82, 12, 9, 9, 84, 14, 5, 9, 243, 14, 166, 9, 71, 5, 2, 1, 3, 3, 2, 0, 2, 1, 13, 9, 120, 6, 3, 6, 4, 0, 29, 9, 41, 6, 2, 3, 9, 0, 10, 10, 47, 15, 406, 7, 2, 7, 17, 9, 57, 21, 2, 13, 123, 5, 4, 0, 2, 1, 2, 6, 2, 0, 9, 9, 49, 4, 2, 1, 2, 4, 9, 9, 330, 3, 19306, 9, 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, 262, 6, 10, 9, 357, 0, 62, 13, 1495, 6, 110, 6, 6, 9, 4759, 9, 787719, 239];
+
+function isInAstralSet(code, set) {
+  let pos = 0x10000;
+
+  for (let 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;
+}
 
-    for (ch = 0; ch < 0x80; ++ch) {
-      IDENTIFIER_START[ch] = ch >= 0x61 && ch <= 0x7A || // a..z
-      ch >= 0x41 && ch <= 0x5A || // A..Z
-      ch === 0x24 || ch === 0x5F; // $ (dollar) and _ (underscore)
-    }
+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;
 
-    IDENTIFIER_PART = new Array(0x80);
+  if (code <= 0xffff) {
+    return code >= 0xaa && nonASCIIidentifierStart.test(String.fromCharCode(code));
+  }
 
-    for (ch = 0; ch < 0x80; ++ch) {
-      IDENTIFIER_PART[ch] = ch >= 0x61 && ch <= 0x7A || // a..z
-      ch >= 0x41 && ch <= 0x5A || // A..Z
-      ch >= 0x30 && ch <= 0x39 || // 0..9
-      ch === 0x24 || ch === 0x5F; // $ (dollar) and _ (underscore)
-    }
+  return isInAstralSet(code, astralIdentifierStartCodes);
+}
 
-    function isIdentifierStartES5(ch) {
-      return ch < 0x80 ? IDENTIFIER_START[ch] : ES5Regex.NonAsciiIdentifierStart.test(fromCodePoint(ch));
-    }
+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;
 
-    function isIdentifierPartES5(ch) {
-      return ch < 0x80 ? IDENTIFIER_PART[ch] : ES5Regex.NonAsciiIdentifierPart.test(fromCodePoint(ch));
-    }
+  if (code <= 0xffff) {
+    return code >= 0xaa && nonASCIIidentifier.test(String.fromCharCode(code));
+  }
 
-    function isIdentifierStartES6(ch) {
-      return ch < 0x80 ? IDENTIFIER_START[ch] : ES6Regex.NonAsciiIdentifierStart.test(fromCodePoint(ch));
-    }
+  return isInAstralSet(code, astralIdentifierStartCodes) || isInAstralSet(code, astralIdentifierCodes);
+}
 
-    function isIdentifierPartES6(ch) {
-      return ch < 0x80 ? IDENTIFIER_PART[ch] : ES6Regex.NonAsciiIdentifierPart.test(fromCodePoint(ch));
-    }
+function isIdentifierName(name) {
+  let isFirst = true;
 
-    module.exports = {
-      isDecimalDigit: isDecimalDigit,
-      isHexDigit: isHexDigit,
-      isOctalDigit: isOctalDigit,
-      isWhiteSpace: isWhiteSpace,
-      isLineTerminator: isLineTerminator,
-      isIdentifierStartES5: isIdentifierStartES5,
-      isIdentifierPartES5: isIdentifierPartES5,
-      isIdentifierStartES6: isIdentifierStartES6,
-      isIdentifierPartES6: isIdentifierPartES6
-    };
-  })();
-  /* vim: set sw=4 ts=4 et tw=80 : */
+  for (let i = 0; i < name.length; i++) {
+    let cp = name.charCodeAt(i);
 
-});
-var code_1 = code.isDecimalDigit;
-var code_2 = code.isHexDigit;
-var code_3 = code.isOctalDigit;
-var code_4 = code.isWhiteSpace;
-var code_5 = code.isLineTerminator;
-var code_6 = code.isIdentifierStartES5;
-var code_7 = code.isIdentifierPartES5;
-var code_8 = code.isIdentifierStartES6;
-var code_9 = code.isIdentifierPartES6;
-
-var keyword = createCommonjsModule(function (module) {
-  /*
-    Copyright (C) 2013 Yusuke Suzuki <utatane.tea@gmail.com>
-  
-    Redistribution and use in source and binary forms, with or without
-    modification, are permitted provided that the following conditions are met:
-  
-      * Redistributions of source code must retain the above copyright
-        notice, this list of conditions and the following disclaimer.
-      * Redistributions in binary form must reproduce the above copyright
-        notice, this list of conditions and the following disclaimer in the
-        documentation and/or other materials provided with the distribution.
-  
-    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-    AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-    IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-    ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
-    DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-    (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-    LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-    ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-    (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
-    THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-  */
-  (function () {
-
-    var code$1 = code;
-
-    function isStrictModeReservedWordES6(id) {
-      switch (id) {
-        case 'implements':
-        case 'interface':
-        case 'package':
-        case 'private':
-        case 'protected':
-        case 'public':
-        case 'static':
-        case 'let':
-          return true;
+    if ((cp & 0xfc00) === 0xd800 && i + 1 < name.length) {
+      const trail = name.charCodeAt(++i);
 
-        default:
-          return false;
+      if ((trail & 0xfc00) === 0xdc00) {
+        cp = 0x10000 + ((cp & 0x3ff) << 10) + (trail & 0x3ff);
       }
     }
 
-    function isKeywordES5(id, strict) {
-      // yield should not be treated as keyword under non-strict mode.
-      if (!strict && id === 'yield') {
+    if (isFirst) {
+      isFirst = false;
+
+      if (!isIdentifierStart(cp)) {
         return false;
       }
-
-      return isKeywordES6(id, strict);
+    } else if (!isIdentifierChar(cp)) {
+      return false;
     }
+  }
 
-    function isKeywordES6(id, strict) {
-      if (strict && isStrictModeReservedWordES6(id)) {
-        return true;
-      }
-
-      switch (id.length) {
-        case 2:
-          return id === 'if' || id === 'in' || id === 'do';
+  return !isFirst;
+}
 
-        case 3:
-          return id === 'var' || id === 'for' || id === 'new' || id === 'try';
+var keyword = {};
 
-        case 4:
-          return id === 'this' || id === 'else' || id === 'case' || id === 'void' || id === 'with' || id === 'enum';
+Object.defineProperty(keyword, "__esModule", {
+  value: true
+});
+keyword.isReservedWord = isReservedWord;
+keyword.isStrictReservedWord = isStrictReservedWord;
+keyword.isStrictBindOnlyReservedWord = isStrictBindOnlyReservedWord;
+keyword.isStrictBindReservedWord = isStrictBindReservedWord;
+keyword.isKeyword = isKeyword;
+const 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"]
+};
+const keywords = new Set(reservedWords.keyword);
+const reservedWordsStrictSet = new Set(reservedWords.strict);
+const reservedWordsStrictBindSet = new Set(reservedWords.strictBind);
 
-        case 5:
-          return id === 'while' || id === 'break' || id === 'catch' || id === 'throw' || id === 'const' || id === 'yield' || id === 'class' || id === 'super';
+function isReservedWord(word, inModule) {
+  return inModule && word === "await" || word === "enum";
+}
 
-        case 6:
-          return id === 'return' || id === 'typeof' || id === 'delete' || id === 'switch' || id === 'export' || id === 'import';
+function isStrictReservedWord(word, inModule) {
+  return isReservedWord(word, inModule) || reservedWordsStrictSet.has(word);
+}
 
-        case 7:
-          return id === 'default' || id === 'finally' || id === 'extends';
+function isStrictBindOnlyReservedWord(word) {
+  return reservedWordsStrictBindSet.has(word);
+}
 
-        case 8:
-          return id === 'function' || id === 'continue' || id === 'debugger';
+function isStrictBindReservedWord(word, inModule) {
+  return isStrictReservedWord(word, inModule) || isStrictBindOnlyReservedWord(word);
+}
 
-        case 10:
-          return id === 'instanceof';
+function isKeyword(word) {
+  return keywords.has(word);
+}
 
-        default:
-          return false;
-      }
-    }
+(function (exports) {
 
-    function isReservedWordES5(id, strict) {
-      return id === 'null' || id === 'true' || id === 'false' || isKeywordES5(id, strict);
+  Object.defineProperty(exports, "__esModule", {
+    value: true
+  });
+  Object.defineProperty(exports, "isIdentifierName", {
+    enumerable: true,
+    get: function () {
+      return _identifier.isIdentifierName;
     }
-
-    function isReservedWordES6(id, strict) {
-      return id === 'null' || id === 'true' || id === 'false' || isKeywordES6(id, strict);
+  });
+  Object.defineProperty(exports, "isIdentifierChar", {
+    enumerable: true,
+    get: function () {
+      return _identifier.isIdentifierChar;
     }
-
-    function isRestrictedWord(id) {
-      return id === 'eval' || id === 'arguments';
+  });
+  Object.defineProperty(exports, "isIdentifierStart", {
+    enumerable: true,
+    get: function () {
+      return _identifier.isIdentifierStart;
     }
-
-    function isIdentifierNameES5(id) {
-      var i, iz, ch;
-
-      if (id.length === 0) {
-        return false;
-      }
-
-      ch = id.charCodeAt(0);
-
-      if (!code$1.isIdentifierStartES5(ch)) {
-        return false;
-      }
-
-      for (i = 1, iz = id.length; i < iz; ++i) {
-        ch = id.charCodeAt(i);
-
-        if (!code$1.isIdentifierPartES5(ch)) {
-          return false;
-        }
-      }
-
-      return true;
+  });
+  Object.defineProperty(exports, "isReservedWord", {
+    enumerable: true,
+    get: function () {
+      return _keyword.isReservedWord;
     }
-
-    function decodeUtf16(lead, trail) {
-      return (lead - 0xD800) * 0x400 + (trail - 0xDC00) + 0x10000;
+  });
+  Object.defineProperty(exports, "isStrictBindOnlyReservedWord", {
+    enumerable: true,
+    get: function () {
+      return _keyword.isStrictBindOnlyReservedWord;
     }
-
-    function isIdentifierNameES6(id) {
-      var i, iz, ch, lowCh, check;
-
-      if (id.length === 0) {
-        return false;
-      }
-
-      check = code$1.isIdentifierStartES6;
-
-      for (i = 0, iz = id.length; i < iz; ++i) {
-        ch = id.charCodeAt(i);
-
-        if (0xD800 <= ch && ch <= 0xDBFF) {
-          ++i;
-
-          if (i >= iz) {
-            return false;
-          }
-
-          lowCh = id.charCodeAt(i);
-
-          if (!(0xDC00 <= lowCh && lowCh <= 0xDFFF)) {
-            return false;
-          }
-
-          ch = decodeUtf16(ch, lowCh);
-        }
-
-        if (!check(ch)) {
-          return false;
-        }
-
-        check = code$1.isIdentifierPartES6;
-      }
-
-      return true;
+  });
+  Object.defineProperty(exports, "isStrictBindReservedWord", {
+    enumerable: true,
+    get: function () {
+      return _keyword.isStrictBindReservedWord;
     }
-
-    function isIdentifierES5(id, strict) {
-      return isIdentifierNameES5(id) && !isReservedWordES5(id, strict);
+  });
+  Object.defineProperty(exports, "isStrictReservedWord", {
+    enumerable: true,
+    get: function () {
+      return _keyword.isStrictReservedWord;
     }
-
-    function isIdentifierES6(id, strict) {
-      return isIdentifierNameES6(id) && !isReservedWordES6(id, strict);
+  });
+  Object.defineProperty(exports, "isKeyword", {
+    enumerable: true,
+    get: function () {
+      return _keyword.isKeyword;
     }
+  });
+  var _identifier = identifier;
+  var _keyword = keyword;
+})(lib);
 
-    module.exports = {
-      isKeywordES5: isKeywordES5,
-      isKeywordES6: isKeywordES6,
-      isReservedWordES5: isReservedWordES5,
-      isReservedWordES6: isReservedWordES6,
-      isRestrictedWord: isRestrictedWord,
-      isIdentifierNameES5: isIdentifierNameES5,
-      isIdentifierNameES6: isIdentifierNameES6,
-      isIdentifierES5: isIdentifierES5,
-      isIdentifierES6: isIdentifierES6
-    };
-  })();
-  /* vim: set sw=4 ts=4 et tw=80 : */
-
-});
-var keyword_1 = keyword.isKeywordES5;
-var keyword_2 = keyword.isKeywordES6;
-var keyword_3 = keyword.isReservedWordES5;
-var keyword_4 = keyword.isReservedWordES6;
-var keyword_5 = keyword.isRestrictedWord;
-var keyword_6 = keyword.isIdentifierNameES5;
-var keyword_7 = keyword.isIdentifierNameES6;
-var keyword_8 = keyword.isIdentifierES5;
-var keyword_9 = keyword.isIdentifierES6;
-
-var utils = createCommonjsModule(function (module, exports) {
-  /*
-    Copyright (C) 2013 Yusuke Suzuki <utatane.tea@gmail.com>
-  
-    Redistribution and use in source and binary forms, with or without
-    modification, are permitted provided that the following conditions are met:
-  
-      * Redistributions of source code must retain the above copyright
-        notice, this list of conditions and the following disclaimer.
-      * Redistributions in binary form must reproduce the above copyright
-        notice, this list of conditions and the following disclaimer in the
-        documentation and/or other materials provided with the distribution.
-  
-    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-    AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-    IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-    ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
-    DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-    (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-    LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-    ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-    (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
-    THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-  */
-  (function () {
-
-    exports.ast = ast;
-    exports.code = code;
-    exports.keyword = keyword;
-  })();
-  /* vim: set sw=4 ts=4 et tw=80 : */
-
-});
-var utils_1 = utils.ast;
-var utils_2 = utils.code;
-var utils_3 = utils.keyword;
+var chalk = {exports: {}};
 
 var matchOperatorsRe = /[|\\{}()[\]^$+*?.]/g;
 
@@ -919,6 +677,10 @@ var escapeStringRegexp = function (str) {
   return str.replace(matchOperatorsRe, '\\$&');
 };
 
+var ansiStyles = {exports: {}};
+
+var conversions$2 = {exports: {}};
+
 var colorName = {
   "aliceblue": [240, 248, 255],
   "antiquewhite": [250, 235, 215],
@@ -1070,918 +832,903 @@ var colorName = {
   "yellowgreen": [154, 205, 50]
 };
 
-var conversions = createCommonjsModule(function (module) {
-  /* MIT license */
-  // NOTE: conversions should only return primitive values (i.e. arrays, or
-  //       values that give correct `typeof` results).
-  //       do not use box values types (i.e. Number(), String(), etc.)
-  var reverseKeywords = {};
-
-  for (var key in colorName) {
-    if (colorName.hasOwnProperty(key)) {
-      reverseKeywords[colorName[key]] = key;
-    }
-  }
-
-  var convert = module.exports = {
-    rgb: {
-      channels: 3,
-      labels: 'rgb'
-    },
-    hsl: {
-      channels: 3,
-      labels: 'hsl'
-    },
-    hsv: {
-      channels: 3,
-      labels: 'hsv'
-    },
-    hwb: {
-      channels: 3,
-      labels: 'hwb'
-    },
-    cmyk: {
-      channels: 4,
-      labels: 'cmyk'
-    },
-    xyz: {
-      channels: 3,
-      labels: 'xyz'
-    },
-    lab: {
-      channels: 3,
-      labels: 'lab'
-    },
-    lch: {
-      channels: 3,
-      labels: 'lch'
-    },
-    hex: {
-      channels: 1,
-      labels: ['hex']
-    },
-    keyword: {
-      channels: 1,
-      labels: ['keyword']
-    },
-    ansi16: {
-      channels: 1,
-      labels: ['ansi16']
-    },
-    ansi256: {
-      channels: 1,
-      labels: ['ansi256']
-    },
-    hcg: {
-      channels: 3,
-      labels: ['h', 'c', 'g']
-    },
-    apple: {
-      channels: 3,
-      labels: ['r16', 'g16', 'b16']
-    },
-    gray: {
-      channels: 1,
-      labels: ['gray']
-    }
-  }; // hide .channels and .labels properties
-
-  for (var model in convert) {
-    if (convert.hasOwnProperty(model)) {
-      if (!('channels' in convert[model])) {
-        throw new Error('missing channels property: ' + model);
-      }
+/* MIT license */
+var cssKeywords = colorName; // NOTE: conversions should only return primitive values (i.e. arrays, or
+//       values that give correct `typeof` results).
+//       do not use box values types (i.e. Number(), String(), etc.)
 
-      if (!('labels' in convert[model])) {
-        throw new Error('missing channel labels property: ' + model);
-      }
+var reverseKeywords = {};
 
-      if (convert[model].labels.length !== convert[model].channels) {
-        throw new Error('channel and label counts mismatch: ' + model);
-      }
+for (var key in cssKeywords) {
+  if (cssKeywords.hasOwnProperty(key)) {
+    reverseKeywords[cssKeywords[key]] = key;
+  }
+}
 
-      var channels = convert[model].channels;
-      var labels = convert[model].labels;
-      delete convert[model].channels;
-      delete convert[model].labels;
-      Object.defineProperty(convert[model], 'channels', {
-        value: channels
-      });
-      Object.defineProperty(convert[model], 'labels', {
-        value: labels
-      });
-    }
+var convert$1 = conversions$2.exports = {
+  rgb: {
+    channels: 3,
+    labels: 'rgb'
+  },
+  hsl: {
+    channels: 3,
+    labels: 'hsl'
+  },
+  hsv: {
+    channels: 3,
+    labels: 'hsv'
+  },
+  hwb: {
+    channels: 3,
+    labels: 'hwb'
+  },
+  cmyk: {
+    channels: 4,
+    labels: 'cmyk'
+  },
+  xyz: {
+    channels: 3,
+    labels: 'xyz'
+  },
+  lab: {
+    channels: 3,
+    labels: 'lab'
+  },
+  lch: {
+    channels: 3,
+    labels: 'lch'
+  },
+  hex: {
+    channels: 1,
+    labels: ['hex']
+  },
+  keyword: {
+    channels: 1,
+    labels: ['keyword']
+  },
+  ansi16: {
+    channels: 1,
+    labels: ['ansi16']
+  },
+  ansi256: {
+    channels: 1,
+    labels: ['ansi256']
+  },
+  hcg: {
+    channels: 3,
+    labels: ['h', 'c', 'g']
+  },
+  apple: {
+    channels: 3,
+    labels: ['r16', 'g16', 'b16']
+  },
+  gray: {
+    channels: 1,
+    labels: ['gray']
+  }
+}; // hide .channels and .labels properties
+
+for (var model in convert$1) {
+  if (convert$1.hasOwnProperty(model)) {
+    if (!('channels' in convert$1[model])) {
+      throw new Error('missing channels property: ' + model);
+    }
+
+    if (!('labels' in convert$1[model])) {
+      throw new Error('missing channel labels property: ' + model);
+    }
+
+    if (convert$1[model].labels.length !== convert$1[model].channels) {
+      throw new Error('channel and label counts mismatch: ' + model);
+    }
+
+    var channels = convert$1[model].channels;
+    var labels = convert$1[model].labels;
+    delete convert$1[model].channels;
+    delete convert$1[model].labels;
+    Object.defineProperty(convert$1[model], 'channels', {
+      value: channels
+    });
+    Object.defineProperty(convert$1[model], 'labels', {
+      value: labels
+    });
   }
+}
 
-  convert.rgb.hsl = function (rgb) {
-    var r = rgb[0] / 255;
-    var g = rgb[1] / 255;
-    var b = rgb[2] / 255;
-    var min = Math.min(r, g, b);
-    var max = Math.max(r, g, b);
-    var delta = max - min;
-    var h;
-    var s;
-    var l;
+convert$1.rgb.hsl = function (rgb) {
+  var r = rgb[0] / 255;
+  var g = rgb[1] / 255;
+  var b = rgb[2] / 255;
+  var min = Math.min(r, g, b);
+  var max = Math.max(r, g, b);
+  var delta = max - min;
+  var h;
+  var s;
+  var l;
 
-    if (max === min) {
-      h = 0;
-    } else if (r === max) {
-      h = (g - b) / delta;
-    } else if (g === max) {
-      h = 2 + (b - r) / delta;
-    } else if (b === max) {
-      h = 4 + (r - g) / delta;
-    }
+  if (max === min) {
+    h = 0;
+  } else if (r === max) {
+    h = (g - b) / delta;
+  } else if (g === max) {
+    h = 2 + (b - r) / delta;
+  } else if (b === max) {
+    h = 4 + (r - g) / delta;
+  }
 
-    h = Math.min(h * 60, 360);
+  h = Math.min(h * 60, 360);
 
-    if (h < 0) {
-      h += 360;
-    }
+  if (h < 0) {
+    h += 360;
+  }
 
-    l = (min + max) / 2;
+  l = (min + max) / 2;
 
-    if (max === min) {
-      s = 0;
-    } else if (l <= 0.5) {
-      s = delta / (max + min);
-    } else {
-      s = delta / (2 - max - min);
-    }
+  if (max === min) {
+    s = 0;
+  } else if (l <= 0.5) {
+    s = delta / (max + min);
+  } else {
+    s = delta / (2 - max - min);
+  }
+
+  return [h, s * 100, l * 100];
+};
 
-    return [h, s * 100, l * 100];
+convert$1.rgb.hsv = function (rgb) {
+  var rdif;
+  var gdif;
+  var bdif;
+  var h;
+  var s;
+  var r = rgb[0] / 255;
+  var g = rgb[1] / 255;
+  var b = rgb[2] / 255;
+  var v = Math.max(r, g, b);
+  var diff = v - Math.min(r, g, b);
+
+  var diffc = function (c) {
+    return (v - c) / 6 / diff + 1 / 2;
   };
 
-  convert.rgb.hsv = function (rgb) {
-    var rdif;
-    var gdif;
-    var bdif;
-    var h;
-    var s;
-    var r = rgb[0] / 255;
-    var g = rgb[1] / 255;
-    var b = rgb[2] / 255;
-    var v = Math.max(r, g, b);
-    var diff = v - Math.min(r, g, b);
-
-    var diffc = function (c) {
-      return (v - c) / 6 / diff + 1 / 2;
-    };
+  if (diff === 0) {
+    h = s = 0;
+  } else {
+    s = diff / v;
+    rdif = diffc(r);
+    gdif = diffc(g);
+    bdif = diffc(b);
 
-    if (diff === 0) {
-      h = s = 0;
-    } else {
-      s = diff / v;
-      rdif = diffc(r);
-      gdif = diffc(g);
-      bdif = diffc(b);
-
-      if (r === v) {
-        h = bdif - gdif;
-      } else if (g === v) {
-        h = 1 / 3 + rdif - bdif;
-      } else if (b === v) {
-        h = 2 / 3 + gdif - rdif;
-      }
+    if (r === v) {
+      h = bdif - gdif;
+    } else if (g === v) {
+      h = 1 / 3 + rdif - bdif;
+    } else if (b === v) {
+      h = 2 / 3 + gdif - rdif;
+    }
 
-      if (h < 0) {
-        h += 1;
-      } else if (h > 1) {
-        h -= 1;
-      }
+    if (h < 0) {
+      h += 1;
+    } else if (h > 1) {
+      h -= 1;
     }
+  }
 
-    return [h * 360, s * 100, v * 100];
-  };
+  return [h * 360, s * 100, v * 100];
+};
 
-  convert.rgb.hwb = function (rgb) {
-    var r = rgb[0];
-    var g = rgb[1];
-    var b = rgb[2];
-    var h = convert.rgb.hsl(rgb)[0];
-    var w = 1 / 255 * Math.min(r, Math.min(g, b));
-    b = 1 - 1 / 255 * Math.max(r, Math.max(g, b));
-    return [h, w * 100, b * 100];
-  };
+convert$1.rgb.hwb = function (rgb) {
+  var r = rgb[0];
+  var g = rgb[1];
+  var b = rgb[2];
+  var h = convert$1.rgb.hsl(rgb)[0];
+  var w = 1 / 255 * Math.min(r, Math.min(g, b));
+  b = 1 - 1 / 255 * Math.max(r, Math.max(g, b));
+  return [h, w * 100, b * 100];
+};
 
-  convert.rgb.cmyk = function (rgb) {
-    var r = rgb[0] / 255;
-    var g = rgb[1] / 255;
-    var b = rgb[2] / 255;
-    var c;
-    var m;
-    var y;
-    var k;
-    k = Math.min(1 - r, 1 - g, 1 - b);
-    c = (1 - r - k) / (1 - k) || 0;
-    m = (1 - g - k) / (1 - k) || 0;
-    y = (1 - b - k) / (1 - k) || 0;
-    return [c * 100, m * 100, y * 100, k * 100];
-  };
-  /**
  * See https://en.m.wikipedia.org/wiki/Euclidean_distance#Squared_Euclidean_distance
  * */
+convert$1.rgb.cmyk = function (rgb) {
+  var r = rgb[0] / 255;
+  var g = rgb[1] / 255;
+  var b = rgb[2] / 255;
+  var c;
+  var m;
+  var y;
+  var k;
+  k = Math.min(1 - r, 1 - g, 1 - b);
+  c = (1 - r - k) / (1 - k) || 0;
+  m = (1 - g - k) / (1 - k) || 0;
+  y = (1 - b - k) / (1 - k) || 0;
+  return [c * 100, m * 100, y * 100, k * 100];
+};
+/**
+ * See https://en.m.wikipedia.org/wiki/Euclidean_distance#Squared_Euclidean_distance
+ * */
 
 
-  function comparativeDistance(x, y) {
-    return Math.pow(x[0] - y[0], 2) + Math.pow(x[1] - y[1], 2) + Math.pow(x[2] - y[2], 2);
-  }
+function comparativeDistance(x, y) {
+  return Math.pow(x[0] - y[0], 2) + Math.pow(x[1] - y[1], 2) + Math.pow(x[2] - y[2], 2);
+}
 
-  convert.rgb.keyword = function (rgb) {
-    var reversed = reverseKeywords[rgb];
+convert$1.rgb.keyword = function (rgb) {
+  var reversed = reverseKeywords[rgb];
 
-    if (reversed) {
-      return reversed;
-    }
+  if (reversed) {
+    return reversed;
+  }
 
-    var currentClosestDistance = Infinity;
-    var currentClosestKeyword;
+  var currentClosestDistance = Infinity;
+  var currentClosestKeyword;
 
-    for (var keyword in colorName) {
-      if (colorName.hasOwnProperty(keyword)) {
-        var value = colorName[keyword]; // Compute comparative distance
+  for (var keyword in cssKeywords) {
+    if (cssKeywords.hasOwnProperty(keyword)) {
+      var value = cssKeywords[keyword]; // Compute comparative distance
 
-        var distance = comparativeDistance(rgb, value); // Check if its less, if so set as closest
+      var distance = comparativeDistance(rgb, value); // Check if its less, if so set as closest
 
-        if (distance < currentClosestDistance) {
-          currentClosestDistance = distance;
-          currentClosestKeyword = keyword;
-        }
+      if (distance < currentClosestDistance) {
+        currentClosestDistance = distance;
+        currentClosestKeyword = keyword;
       }
     }
+  }
 
-    return currentClosestKeyword;
-  };
-
-  convert.keyword.rgb = function (keyword) {
-    return colorName[keyword];
-  };
-
-  convert.rgb.xyz = function (rgb) {
-    var r = rgb[0] / 255;
-    var g = rgb[1] / 255;
-    var b = rgb[2] / 255; // assume sRGB
-
-    r = r > 0.04045 ? Math.pow((r + 0.055) / 1.055, 2.4) : r / 12.92;
-    g = g > 0.04045 ? Math.pow((g + 0.055) / 1.055, 2.4) : g / 12.92;
-    b = b > 0.04045 ? Math.pow((b + 0.055) / 1.055, 2.4) : b / 12.92;
-    var x = r * 0.4124 + g * 0.3576 + b * 0.1805;
-    var y = r * 0.2126 + g * 0.7152 + b * 0.0722;
-    var z = r * 0.0193 + g * 0.1192 + b * 0.9505;
-    return [x * 100, y * 100, z * 100];
-  };
-
-  convert.rgb.lab = function (rgb) {
-    var xyz = convert.rgb.xyz(rgb);
-    var x = xyz[0];
-    var y = xyz[1];
-    var z = xyz[2];
-    var l;
-    var a;
-    var b;
-    x /= 95.047;
-    y /= 100;
-    z /= 108.883;
-    x = x > 0.008856 ? Math.pow(x, 1 / 3) : 7.787 * x + 16 / 116;
-    y = y > 0.008856 ? Math.pow(y, 1 / 3) : 7.787 * y + 16 / 116;
-    z = z > 0.008856 ? Math.pow(z, 1 / 3) : 7.787 * z + 16 / 116;
-    l = 116 * y - 16;
-    a = 500 * (x - y);
-    b = 200 * (y - z);
-    return [l, a, b];
-  };
+  return currentClosestKeyword;
+};
 
-  convert.hsl.rgb = function (hsl) {
-    var h = hsl[0] / 360;
-    var s = hsl[1] / 100;
-    var l = hsl[2] / 100;
-    var t1;
-    var t2;
-    var t3;
-    var rgb;
-    var val;
+convert$1.keyword.rgb = function (keyword) {
+  return cssKeywords[keyword];
+};
 
-    if (s === 0) {
-      val = l * 255;
-      return [val, val, val];
-    }
+convert$1.rgb.xyz = function (rgb) {
+  var r = rgb[0] / 255;
+  var g = rgb[1] / 255;
+  var b = rgb[2] / 255; // assume sRGB
+
+  r = r > 0.04045 ? Math.pow((r + 0.055) / 1.055, 2.4) : r / 12.92;
+  g = g > 0.04045 ? Math.pow((g + 0.055) / 1.055, 2.4) : g / 12.92;
+  b = b > 0.04045 ? Math.pow((b + 0.055) / 1.055, 2.4) : b / 12.92;
+  var x = r * 0.4124 + g * 0.3576 + b * 0.1805;
+  var y = r * 0.2126 + g * 0.7152 + b * 0.0722;
+  var z = r * 0.0193 + g * 0.1192 + b * 0.9505;
+  return [x * 100, y * 100, z * 100];
+};
 
-    if (l < 0.5) {
-      t2 = l * (1 + s);
-    } else {
-      t2 = l + s - l * s;
-    }
+convert$1.rgb.lab = function (rgb) {
+  var xyz = convert$1.rgb.xyz(rgb);
+  var x = xyz[0];
+  var y = xyz[1];
+  var z = xyz[2];
+  var l;
+  var a;
+  var b;
+  x /= 95.047;
+  y /= 100;
+  z /= 108.883;
+  x = x > 0.008856 ? Math.pow(x, 1 / 3) : 7.787 * x + 16 / 116;
+  y = y > 0.008856 ? Math.pow(y, 1 / 3) : 7.787 * y + 16 / 116;
+  z = z > 0.008856 ? Math.pow(z, 1 / 3) : 7.787 * z + 16 / 116;
+  l = 116 * y - 16;
+  a = 500 * (x - y);
+  b = 200 * (y - z);
+  return [l, a, b];
+};
 
-    t1 = 2 * l - t2;
-    rgb = [0, 0, 0];
+convert$1.hsl.rgb = function (hsl) {
+  var h = hsl[0] / 360;
+  var s = hsl[1] / 100;
+  var l = hsl[2] / 100;
+  var t1;
+  var t2;
+  var t3;
+  var rgb;
+  var val;
 
-    for (var i = 0; i < 3; i++) {
-      t3 = h + 1 / 3 * -(i - 1);
+  if (s === 0) {
+    val = l * 255;
+    return [val, val, val];
+  }
 
-      if (t3 < 0) {
-        t3++;
-      }
+  if (l < 0.5) {
+    t2 = l * (1 + s);
+  } else {
+    t2 = l + s - l * s;
+  }
 
-      if (t3 > 1) {
-        t3--;
-      }
+  t1 = 2 * l - t2;
+  rgb = [0, 0, 0];
 
-      if (6 * t3 < 1) {
-        val = t1 + (t2 - t1) * 6 * t3;
-      } else if (2 * t3 < 1) {
-        val = t2;
-      } else if (3 * t3 < 2) {
-        val = t1 + (t2 - t1) * (2 / 3 - t3) * 6;
-      } else {
-        val = t1;
-      }
+  for (var i = 0; i < 3; i++) {
+    t3 = h + 1 / 3 * -(i - 1);
 
-      rgb[i] = val * 255;
+    if (t3 < 0) {
+      t3++;
     }
 
-    return rgb;
-  };
-
-  convert.hsl.hsv = function (hsl) {
-    var h = hsl[0];
-    var s = hsl[1] / 100;
-    var l = hsl[2] / 100;
-    var smin = s;
-    var lmin = Math.max(l, 0.01);
-    var sv;
-    var v;
-    l *= 2;
-    s *= l <= 1 ? l : 2 - l;
-    smin *= lmin <= 1 ? lmin : 2 - lmin;
-    v = (l + s) / 2;
-    sv = l === 0 ? 2 * smin / (lmin + smin) : 2 * s / (l + s);
-    return [h, sv * 100, v * 100];
-  };
-
-  convert.hsv.rgb = function (hsv) {
-    var h = hsv[0] / 60;
-    var s = hsv[1] / 100;
-    var v = hsv[2] / 100;
-    var hi = Math.floor(h) % 6;
-    var f = h - Math.floor(h);
-    var p = 255 * v * (1 - s);
-    var q = 255 * v * (1 - s * f);
-    var t = 255 * v * (1 - s * (1 - f));
-    v *= 255;
-
-    switch (hi) {
-      case 0:
-        return [v, t, p];
-
-      case 1:
-        return [q, v, p];
-
-      case 2:
-        return [p, v, t];
-
-      case 3:
-        return [p, q, v];
-
-      case 4:
-        return [t, p, v];
-
-      case 5:
-        return [v, p, q];
+    if (t3 > 1) {
+      t3--;
     }
-  };
-
-  convert.hsv.hsl = function (hsv) {
-    var h = hsv[0];
-    var s = hsv[1] / 100;
-    var v = hsv[2] / 100;
-    var vmin = Math.max(v, 0.01);
-    var lmin;
-    var sl;
-    var l;
-    l = (2 - s) * v;
-    lmin = (2 - s) * vmin;
-    sl = s * vmin;
-    sl /= lmin <= 1 ? lmin : 2 - lmin;
-    sl = sl || 0;
-    l /= 2;
-    return [h, sl * 100, l * 100];
-  }; // http://dev.w3.org/csswg/css-color/#hwb-to-rgb
-
-
-  convert.hwb.rgb = function (hwb) {
-    var h = hwb[0] / 360;
-    var wh = hwb[1] / 100;
-    var bl = hwb[2] / 100;
-    var ratio = wh + bl;
-    var i;
-    var v;
-    var f;
-    var n; // wh + bl cant be > 1
-
-    if (ratio > 1) {
-      wh /= ratio;
-      bl /= ratio;
-    }
-
-    i = Math.floor(6 * h);
-    v = 1 - bl;
-    f = 6 * h - i;
-
-    if ((i & 0x01) !== 0) {
-      f = 1 - f;
-    }
-
-    n = wh + f * (v - wh); // linear interpolation
-
-    var r;
-    var g;
-    var b;
-
-    switch (i) {
-      default:
-      case 6:
-      case 0:
-        r = v;
-        g = n;
-        b = wh;
-        break;
 
-      case 1:
-        r = n;
-        g = v;
-        b = wh;
-        break;
+    if (6 * t3 < 1) {
+      val = t1 + (t2 - t1) * 6 * t3;
+    } else if (2 * t3 < 1) {
+      val = t2;
+    } else if (3 * t3 < 2) {
+      val = t1 + (t2 - t1) * (2 / 3 - t3) * 6;
+    } else {
+      val = t1;
+    }
 
-      case 2:
-        r = wh;
-        g = v;
-        b = n;
-        break;
+    rgb[i] = val * 255;
+  }
 
-      case 3:
-        r = wh;
-        g = n;
-        b = v;
-        break;
+  return rgb;
+};
 
-      case 4:
-        r = n;
-        g = wh;
-        b = v;
-        break;
+convert$1.hsl.hsv = function (hsl) {
+  var h = hsl[0];
+  var s = hsl[1] / 100;
+  var l = hsl[2] / 100;
+  var smin = s;
+  var lmin = Math.max(l, 0.01);
+  var sv;
+  var v;
+  l *= 2;
+  s *= l <= 1 ? l : 2 - l;
+  smin *= lmin <= 1 ? lmin : 2 - lmin;
+  v = (l + s) / 2;
+  sv = l === 0 ? 2 * smin / (lmin + smin) : 2 * s / (l + s);
+  return [h, sv * 100, v * 100];
+};
 
-      case 5:
-        r = v;
-        g = wh;
-        b = n;
-        break;
-    }
+convert$1.hsv.rgb = function (hsv) {
+  var h = hsv[0] / 60;
+  var s = hsv[1] / 100;
+  var v = hsv[2] / 100;
+  var hi = Math.floor(h) % 6;
+  var f = h - Math.floor(h);
+  var p = 255 * v * (1 - s);
+  var q = 255 * v * (1 - s * f);
+  var t = 255 * v * (1 - s * (1 - f));
+  v *= 255;
 
-    return [r * 255, g * 255, b * 255];
-  };
+  switch (hi) {
+    case 0:
+      return [v, t, p];
 
-  convert.cmyk.rgb = function (cmyk) {
-    var c = cmyk[0] / 100;
-    var m = cmyk[1] / 100;
-    var y = cmyk[2] / 100;
-    var k = cmyk[3] / 100;
-    var r;
-    var g;
-    var b;
-    r = 1 - Math.min(1, c * (1 - k) + k);
-    g = 1 - Math.min(1, m * (1 - k) + k);
-    b = 1 - Math.min(1, y * (1 - k) + k);
-    return [r * 255, g * 255, b * 255];
-  };
+    case 1:
+      return [q, v, p];
 
-  convert.xyz.rgb = function (xyz) {
-    var x = xyz[0] / 100;
-    var y = xyz[1] / 100;
-    var z = xyz[2] / 100;
-    var r;
-    var g;
-    var b;
-    r = x * 3.2406 + y * -1.5372 + z * -0.4986;
-    g = x * -0.9689 + y * 1.8758 + z * 0.0415;
-    b = x * 0.0557 + y * -0.2040 + z * 1.0570; // assume sRGB
-
-    r = r > 0.0031308 ? 1.055 * Math.pow(r, 1.0 / 2.4) - 0.055 : r * 12.92;
-    g = g > 0.0031308 ? 1.055 * Math.pow(g, 1.0 / 2.4) - 0.055 : g * 12.92;
-    b = b > 0.0031308 ? 1.055 * Math.pow(b, 1.0 / 2.4) - 0.055 : b * 12.92;
-    r = Math.min(Math.max(0, r), 1);
-    g = Math.min(Math.max(0, g), 1);
-    b = Math.min(Math.max(0, b), 1);
-    return [r * 255, g * 255, b * 255];
-  };
+    case 2:
+      return [p, v, t];
 
-  convert.xyz.lab = function (xyz) {
-    var x = xyz[0];
-    var y = xyz[1];
-    var z = xyz[2];
-    var l;
-    var a;
-    var b;
-    x /= 95.047;
-    y /= 100;
-    z /= 108.883;
-    x = x > 0.008856 ? Math.pow(x, 1 / 3) : 7.787 * x + 16 / 116;
-    y = y > 0.008856 ? Math.pow(y, 1 / 3) : 7.787 * y + 16 / 116;
-    z = z > 0.008856 ? Math.pow(z, 1 / 3) : 7.787 * z + 16 / 116;
-    l = 116 * y - 16;
-    a = 500 * (x - y);
-    b = 200 * (y - z);
-    return [l, a, b];
-  };
+    case 3:
+      return [p, q, v];
 
-  convert.lab.xyz = function (lab) {
-    var l = lab[0];
-    var a = lab[1];
-    var b = lab[2];
-    var x;
-    var y;
-    var z;
-    y = (l + 16) / 116;
-    x = a / 500 + y;
-    z = y - b / 200;
-    var y2 = Math.pow(y, 3);
-    var x2 = Math.pow(x, 3);
-    var z2 = Math.pow(z, 3);
-    y = y2 > 0.008856 ? y2 : (y - 16 / 116) / 7.787;
-    x = x2 > 0.008856 ? x2 : (x - 16 / 116) / 7.787;
-    z = z2 > 0.008856 ? z2 : (z - 16 / 116) / 7.787;
-    x *= 95.047;
-    y *= 100;
-    z *= 108.883;
-    return [x, y, z];
-  };
+    case 4:
+      return [t, p, v];
 
-  convert.lab.lch = function (lab) {
-    var l = lab[0];
-    var a = lab[1];
-    var b = lab[2];
-    var hr;
-    var h;
-    var c;
-    hr = Math.atan2(b, a);
-    h = hr * 360 / 2 / Math.PI;
+    case 5:
+      return [v, p, q];
+  }
+};
 
-    if (h < 0) {
-      h += 360;
-    }
+convert$1.hsv.hsl = function (hsv) {
+  var h = hsv[0];
+  var s = hsv[1] / 100;
+  var v = hsv[2] / 100;
+  var vmin = Math.max(v, 0.01);
+  var lmin;
+  var sl;
+  var l;
+  l = (2 - s) * v;
+  lmin = (2 - s) * vmin;
+  sl = s * vmin;
+  sl /= lmin <= 1 ? lmin : 2 - lmin;
+  sl = sl || 0;
+  l /= 2;
+  return [h, sl * 100, l * 100];
+}; // http://dev.w3.org/csswg/css-color/#hwb-to-rgb
+
+
+convert$1.hwb.rgb = function (hwb) {
+  var h = hwb[0] / 360;
+  var wh = hwb[1] / 100;
+  var bl = hwb[2] / 100;
+  var ratio = wh + bl;
+  var i;
+  var v;
+  var f;
+  var n; // wh + bl cant be > 1
+
+  if (ratio > 1) {
+    wh /= ratio;
+    bl /= ratio;
+  }
+
+  i = Math.floor(6 * h);
+  v = 1 - bl;
+  f = 6 * h - i;
+
+  if ((i & 0x01) !== 0) {
+    f = 1 - f;
+  }
+
+  n = wh + f * (v - wh); // linear interpolation
+
+  var r;
+  var g;
+  var b;
+
+  switch (i) {
+    default:
+    case 6:
+    case 0:
+      r = v;
+      g = n;
+      b = wh;
+      break;
+
+    case 1:
+      r = n;
+      g = v;
+      b = wh;
+      break;
+
+    case 2:
+      r = wh;
+      g = v;
+      b = n;
+      break;
+
+    case 3:
+      r = wh;
+      g = n;
+      b = v;
+      break;
+
+    case 4:
+      r = n;
+      g = wh;
+      b = v;
+      break;
+
+    case 5:
+      r = v;
+      g = wh;
+      b = n;
+      break;
+  }
+
+  return [r * 255, g * 255, b * 255];
+};
 
-    c = Math.sqrt(a * a + b * b);
-    return [l, c, h];
-  };
+convert$1.cmyk.rgb = function (cmyk) {
+  var c = cmyk[0] / 100;
+  var m = cmyk[1] / 100;
+  var y = cmyk[2] / 100;
+  var k = cmyk[3] / 100;
+  var r;
+  var g;
+  var b;
+  r = 1 - Math.min(1, c * (1 - k) + k);
+  g = 1 - Math.min(1, m * (1 - k) + k);
+  b = 1 - Math.min(1, y * (1 - k) + k);
+  return [r * 255, g * 255, b * 255];
+};
 
-  convert.lch.lab = function (lch) {
-    var l = lch[0];
-    var c = lch[1];
-    var h = lch[2];
-    var a;
-    var b;
-    var hr;
-    hr = h / 360 * 2 * Math.PI;
-    a = c * Math.cos(hr);
-    b = c * Math.sin(hr);
-    return [l, a, b];
-  };
+convert$1.xyz.rgb = function (xyz) {
+  var x = xyz[0] / 100;
+  var y = xyz[1] / 100;
+  var z = xyz[2] / 100;
+  var r;
+  var g;
+  var b;
+  r = x * 3.2406 + y * -1.5372 + z * -0.4986;
+  g = x * -0.9689 + y * 1.8758 + z * 0.0415;
+  b = x * 0.0557 + y * -0.2040 + z * 1.0570; // assume sRGB
+
+  r = r > 0.0031308 ? 1.055 * Math.pow(r, 1.0 / 2.4) - 0.055 : r * 12.92;
+  g = g > 0.0031308 ? 1.055 * Math.pow(g, 1.0 / 2.4) - 0.055 : g * 12.92;
+  b = b > 0.0031308 ? 1.055 * Math.pow(b, 1.0 / 2.4) - 0.055 : b * 12.92;
+  r = Math.min(Math.max(0, r), 1);
+  g = Math.min(Math.max(0, g), 1);
+  b = Math.min(Math.max(0, b), 1);
+  return [r * 255, g * 255, b * 255];
+};
 
-  convert.rgb.ansi16 = function (args) {
-    var r = args[0];
-    var g = args[1];
-    var b = args[2];
-    var value = 1 in arguments ? arguments[1] : convert.rgb.hsv(args)[2]; // hsv -> ansi16 optimization
+convert$1.xyz.lab = function (xyz) {
+  var x = xyz[0];
+  var y = xyz[1];
+  var z = xyz[2];
+  var l;
+  var a;
+  var b;
+  x /= 95.047;
+  y /= 100;
+  z /= 108.883;
+  x = x > 0.008856 ? Math.pow(x, 1 / 3) : 7.787 * x + 16 / 116;
+  y = y > 0.008856 ? Math.pow(y, 1 / 3) : 7.787 * y + 16 / 116;
+  z = z > 0.008856 ? Math.pow(z, 1 / 3) : 7.787 * z + 16 / 116;
+  l = 116 * y - 16;
+  a = 500 * (x - y);
+  b = 200 * (y - z);
+  return [l, a, b];
+};
 
-    value = Math.round(value / 50);
+convert$1.lab.xyz = function (lab) {
+  var l = lab[0];
+  var a = lab[1];
+  var b = lab[2];
+  var x;
+  var y;
+  var z;
+  y = (l + 16) / 116;
+  x = a / 500 + y;
+  z = y - b / 200;
+  var y2 = Math.pow(y, 3);
+  var x2 = Math.pow(x, 3);
+  var z2 = Math.pow(z, 3);
+  y = y2 > 0.008856 ? y2 : (y - 16 / 116) / 7.787;
+  x = x2 > 0.008856 ? x2 : (x - 16 / 116) / 7.787;
+  z = z2 > 0.008856 ? z2 : (z - 16 / 116) / 7.787;
+  x *= 95.047;
+  y *= 100;
+  z *= 108.883;
+  return [x, y, z];
+};
 
-    if (value === 0) {
-      return 30;
-    }
+convert$1.lab.lch = function (lab) {
+  var l = lab[0];
+  var a = lab[1];
+  var b = lab[2];
+  var hr;
+  var h;
+  var c;
+  hr = Math.atan2(b, a);
+  h = hr * 360 / 2 / Math.PI;
 
-    var ansi = 30 + (Math.round(b / 255) << 2 | Math.round(g / 255) << 1 | Math.round(r / 255));
+  if (h < 0) {
+    h += 360;
+  }
 
-    if (value === 2) {
-      ansi += 60;
-    }
+  c = Math.sqrt(a * a + b * b);
+  return [l, c, h];
+};
 
-    return ansi;
-  };
+convert$1.lch.lab = function (lch) {
+  var l = lch[0];
+  var c = lch[1];
+  var h = lch[2];
+  var a;
+  var b;
+  var hr;
+  hr = h / 360 * 2 * Math.PI;
+  a = c * Math.cos(hr);
+  b = c * Math.sin(hr);
+  return [l, a, b];
+};
 
-  convert.hsv.ansi16 = function (args) {
-    // optimization here; we already know the value and don't need to get
-    // it converted for us.
-    return convert.rgb.ansi16(convert.hsv.rgb(args), args[2]);
-  };
+convert$1.rgb.ansi16 = function (args) {
+  var r = args[0];
+  var g = args[1];
+  var b = args[2];
+  var value = 1 in arguments ? arguments[1] : convert$1.rgb.hsv(args)[2]; // hsv -> ansi16 optimization
 
-  convert.rgb.ansi256 = function (args) {
-    var r = args[0];
-    var g = args[1];
-    var b = args[2]; // we use the extended greyscale palette here, with the exception of
-    // black and white. normal palette only has 4 greyscale shades.
+  value = Math.round(value / 50);
 
-    if (r === g && g === b) {
-      if (r < 8) {
-        return 16;
-      }
+  if (value === 0) {
+    return 30;
+  }
 
-      if (r > 248) {
-        return 231;
-      }
+  var ansi = 30 + (Math.round(b / 255) << 2 | Math.round(g / 255) << 1 | Math.round(r / 255));
 
-      return Math.round((r - 8) / 247 * 24) + 232;
-    }
+  if (value === 2) {
+    ansi += 60;
+  }
 
-    var ansi = 16 + 36 * Math.round(r / 255 * 5) + 6 * Math.round(g / 255 * 5) + Math.round(b / 255 * 5);
-    return ansi;
-  };
+  return ansi;
+};
 
-  convert.ansi16.rgb = function (args) {
-    var color = args % 10; // handle greyscale
+convert$1.hsv.ansi16 = function (args) {
+  // optimization here; we already know the value and don't need to get
+  // it converted for us.
+  return convert$1.rgb.ansi16(convert$1.hsv.rgb(args), args[2]);
+};
 
-    if (color === 0 || color === 7) {
-      if (args > 50) {
-        color += 3.5;
-      }
+convert$1.rgb.ansi256 = function (args) {
+  var r = args[0];
+  var g = args[1];
+  var b = args[2]; // we use the extended greyscale palette here, with the exception of
+  // black and white. normal palette only has 4 greyscale shades.
 
-      color = color / 10.5 * 255;
-      return [color, color, color];
+  if (r === g && g === b) {
+    if (r < 8) {
+      return 16;
     }
 
-    var mult = (~~(args > 50) + 1) * 0.5;
-    var r = (color & 1) * mult * 255;
-    var g = (color >> 1 & 1) * mult * 255;
-    var b = (color >> 2 & 1) * mult * 255;
-    return [r, g, b];
-  };
-
-  convert.ansi256.rgb = function (args) {
-    // handle greyscale
-    if (args >= 232) {
-      var c = (args - 232) * 10 + 8;
-      return [c, c, c];
+    if (r > 248) {
+      return 231;
     }
 
-    args -= 16;
-    var rem;
-    var r = Math.floor(args / 36) / 5 * 255;
-    var g = Math.floor((rem = args % 36) / 6) / 5 * 255;
-    var b = rem % 6 / 5 * 255;
-    return [r, g, b];
-  };
-
-  convert.rgb.hex = function (args) {
-    var integer = ((Math.round(args[0]) & 0xFF) << 16) + ((Math.round(args[1]) & 0xFF) << 8) + (Math.round(args[2]) & 0xFF);
-    var string = integer.toString(16).toUpperCase();
-    return '000000'.substring(string.length) + string;
-  };
-
-  convert.hex.rgb = function (args) {
-    var match = args.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);
+    return Math.round((r - 8) / 247 * 24) + 232;
+  }
 
-    if (!match) {
-      return [0, 0, 0];
-    }
+  var ansi = 16 + 36 * Math.round(r / 255 * 5) + 6 * Math.round(g / 255 * 5) + Math.round(b / 255 * 5);
+  return ansi;
+};
 
-    var colorString = match[0];
+convert$1.ansi16.rgb = function (args) {
+  var color = args % 10; // handle greyscale
 
-    if (match[0].length === 3) {
-      colorString = colorString.split('').map(function (char) {
-        return char + char;
-      }).join('');
+  if (color === 0 || color === 7) {
+    if (args > 50) {
+      color += 3.5;
     }
 
-    var integer = parseInt(colorString, 16);
-    var r = integer >> 16 & 0xFF;
-    var g = integer >> 8 & 0xFF;
-    var b = integer & 0xFF;
-    return [r, g, b];
-  };
+    color = color / 10.5 * 255;
+    return [color, color, color];
+  }
 
-  convert.rgb.hcg = function (rgb) {
-    var r = rgb[0] / 255;
-    var g = rgb[1] / 255;
-    var b = rgb[2] / 255;
-    var max = Math.max(Math.max(r, g), b);
-    var min = Math.min(Math.min(r, g), b);
-    var chroma = max - min;
-    var grayscale;
-    var hue;
-
-    if (chroma < 1) {
-      grayscale = min / (1 - chroma);
-    } else {
-      grayscale = 0;
-    }
+  var mult = (~~(args > 50) + 1) * 0.5;
+  var r = (color & 1) * mult * 255;
+  var g = (color >> 1 & 1) * mult * 255;
+  var b = (color >> 2 & 1) * mult * 255;
+  return [r, g, b];
+};
 
-    if (chroma <= 0) {
-      hue = 0;
-    } else if (max === r) {
-      hue = (g - b) / chroma % 6;
-    } else if (max === g) {
-      hue = 2 + (b - r) / chroma;
-    } else {
-      hue = 4 + (r - g) / chroma + 4;
-    }
+convert$1.ansi256.rgb = function (args) {
+  // handle greyscale
+  if (args >= 232) {
+    var c = (args - 232) * 10 + 8;
+    return [c, c, c];
+  }
 
-    hue /= 6;
-    hue %= 1;
-    return [hue * 360, chroma * 100, grayscale * 100];
-  };
+  args -= 16;
+  var rem;
+  var r = Math.floor(args / 36) / 5 * 255;
+  var g = Math.floor((rem = args % 36) / 6) / 5 * 255;
+  var b = rem % 6 / 5 * 255;
+  return [r, g, b];
+};
 
-  convert.hsl.hcg = function (hsl) {
-    var s = hsl[1] / 100;
-    var l = hsl[2] / 100;
-    var c = 1;
-    var f = 0;
+convert$1.rgb.hex = function (args) {
+  var integer = ((Math.round(args[0]) & 0xFF) << 16) + ((Math.round(args[1]) & 0xFF) << 8) + (Math.round(args[2]) & 0xFF);
+  var string = integer.toString(16).toUpperCase();
+  return '000000'.substring(string.length) + string;
+};
 
-    if (l < 0.5) {
-      c = 2.0 * s * l;
-    } else {
-      c = 2.0 * s * (1.0 - l);
-    }
+convert$1.hex.rgb = function (args) {
+  var match = args.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);
 
-    if (c < 1.0) {
-      f = (l - 0.5 * c) / (1.0 - c);
-    }
+  if (!match) {
+    return [0, 0, 0];
+  }
 
-    return [hsl[0], c * 100, f * 100];
-  };
+  var colorString = match[0];
 
-  convert.hsv.hcg = function (hsv) {
-    var s = hsv[1] / 100;
-    var v = hsv[2] / 100;
-    var c = s * v;
-    var f = 0;
+  if (match[0].length === 3) {
+    colorString = colorString.split('').map(function (char) {
+      return char + char;
+    }).join('');
+  }
 
-    if (c < 1.0) {
-      f = (v - c) / (1 - c);
-    }
+  var integer = parseInt(colorString, 16);
+  var r = integer >> 16 & 0xFF;
+  var g = integer >> 8 & 0xFF;
+  var b = integer & 0xFF;
+  return [r, g, b];
+};
 
-    return [hsv[0], c * 100, f * 100];
-  };
+convert$1.rgb.hcg = function (rgb) {
+  var r = rgb[0] / 255;
+  var g = rgb[1] / 255;
+  var b = rgb[2] / 255;
+  var max = Math.max(Math.max(r, g), b);
+  var min = Math.min(Math.min(r, g), b);
+  var chroma = max - min;
+  var grayscale;
+  var hue;
+
+  if (chroma < 1) {
+    grayscale = min / (1 - chroma);
+  } else {
+    grayscale = 0;
+  }
 
-  convert.hcg.rgb = function (hcg) {
-    var h = hcg[0] / 360;
-    var c = hcg[1] / 100;
-    var g = hcg[2] / 100;
+  if (chroma <= 0) {
+    hue = 0;
+  } else if (max === r) {
+    hue = (g - b) / chroma % 6;
+  } else if (max === g) {
+    hue = 2 + (b - r) / chroma;
+  } else {
+    hue = 4 + (r - g) / chroma + 4;
+  }
 
-    if (c === 0.0) {
-      return [g * 255, g * 255, g * 255];
-    }
+  hue /= 6;
+  hue %= 1;
+  return [hue * 360, chroma * 100, grayscale * 100];
+};
 
-    var pure = [0, 0, 0];
-    var hi = h % 1 * 6;
-    var v = hi % 1;
-    var w = 1 - v;
-    var mg = 0;
+convert$1.hsl.hcg = function (hsl) {
+  var s = hsl[1] / 100;
+  var l = hsl[2] / 100;
+  var c = 1;
+  var f = 0;
 
-    switch (Math.floor(hi)) {
-      case 0:
-        pure[0] = 1;
-        pure[1] = v;
-        pure[2] = 0;
-        break;
+  if (l < 0.5) {
+    c = 2.0 * s * l;
+  } else {
+    c = 2.0 * s * (1.0 - l);
+  }
 
-      case 1:
-        pure[0] = w;
-        pure[1] = 1;
-        pure[2] = 0;
-        break;
+  if (c < 1.0) {
+    f = (l - 0.5 * c) / (1.0 - c);
+  }
 
-      case 2:
-        pure[0] = 0;
-        pure[1] = 1;
-        pure[2] = v;
-        break;
+  return [hsl[0], c * 100, f * 100];
+};
 
-      case 3:
-        pure[0] = 0;
-        pure[1] = w;
-        pure[2] = 1;
-        break;
+convert$1.hsv.hcg = function (hsv) {
+  var s = hsv[1] / 100;
+  var v = hsv[2] / 100;
+  var c = s * v;
+  var f = 0;
 
-      case 4:
-        pure[0] = v;
-        pure[1] = 0;
-        pure[2] = 1;
-        break;
+  if (c < 1.0) {
+    f = (v - c) / (1 - c);
+  }
 
-      default:
-        pure[0] = 1;
-        pure[1] = 0;
-        pure[2] = w;
-    }
+  return [hsv[0], c * 100, f * 100];
+};
 
-    mg = (1.0 - c) * g;
-    return [(c * pure[0] + mg) * 255, (c * pure[1] + mg) * 255, (c * pure[2] + mg) * 255];
-  };
+convert$1.hcg.rgb = function (hcg) {
+  var h = hcg[0] / 360;
+  var c = hcg[1] / 100;
+  var g = hcg[2] / 100;
+
+  if (c === 0.0) {
+    return [g * 255, g * 255, g * 255];
+  }
+
+  var pure = [0, 0, 0];
+  var hi = h % 1 * 6;
+  var v = hi % 1;
+  var w = 1 - v;
+  var mg = 0;
+
+  switch (Math.floor(hi)) {
+    case 0:
+      pure[0] = 1;
+      pure[1] = v;
+      pure[2] = 0;
+      break;
+
+    case 1:
+      pure[0] = w;
+      pure[1] = 1;
+      pure[2] = 0;
+      break;
+
+    case 2:
+      pure[0] = 0;
+      pure[1] = 1;
+      pure[2] = v;
+      break;
+
+    case 3:
+      pure[0] = 0;
+      pure[1] = w;
+      pure[2] = 1;
+      break;
+
+    case 4:
+      pure[0] = v;
+      pure[1] = 0;
+      pure[2] = 1;
+      break;
+
+    default:
+      pure[0] = 1;
+      pure[1] = 0;
+      pure[2] = w;
+  }
+
+  mg = (1.0 - c) * g;
+  return [(c * pure[0] + mg) * 255, (c * pure[1] + mg) * 255, (c * pure[2] + mg) * 255];
+};
 
-  convert.hcg.hsv = function (hcg) {
-    var c = hcg[1] / 100;
-    var g = hcg[2] / 100;
-    var v = c + g * (1.0 - c);
-    var f = 0;
+convert$1.hcg.hsv = function (hcg) {
+  var c = hcg[1] / 100;
+  var g = hcg[2] / 100;
+  var v = c + g * (1.0 - c);
+  var f = 0;
 
-    if (v > 0.0) {
-      f = c / v;
-    }
+  if (v > 0.0) {
+    f = c / v;
+  }
 
-    return [hcg[0], f * 100, v * 100];
-  };
+  return [hcg[0], f * 100, v * 100];
+};
 
-  convert.hcg.hsl = function (hcg) {
-    var c = hcg[1] / 100;
-    var g = hcg[2] / 100;
-    var l = g * (1.0 - c) + 0.5 * c;
-    var s = 0;
+convert$1.hcg.hsl = function (hcg) {
+  var c = hcg[1] / 100;
+  var g = hcg[2] / 100;
+  var l = g * (1.0 - c) + 0.5 * c;
+  var s = 0;
 
-    if (l > 0.0 && l < 0.5) {
-      s = c / (2 * l);
-    } else if (l >= 0.5 && l < 1.0) {
-      s = c / (2 * (1 - l));
-    }
+  if (l > 0.0 && l < 0.5) {
+    s = c / (2 * l);
+  } else if (l >= 0.5 && l < 1.0) {
+    s = c / (2 * (1 - l));
+  }
 
-    return [hcg[0], s * 100, l * 100];
-  };
+  return [hcg[0], s * 100, l * 100];
+};
 
-  convert.hcg.hwb = function (hcg) {
-    var c = hcg[1] / 100;
-    var g = hcg[2] / 100;
-    var v = c + g * (1.0 - c);
-    return [hcg[0], (v - c) * 100, (1 - v) * 100];
-  };
+convert$1.hcg.hwb = function (hcg) {
+  var c = hcg[1] / 100;
+  var g = hcg[2] / 100;
+  var v = c + g * (1.0 - c);
+  return [hcg[0], (v - c) * 100, (1 - v) * 100];
+};
 
-  convert.hwb.hcg = function (hwb) {
-    var w = hwb[1] / 100;
-    var b = hwb[2] / 100;
-    var v = 1 - b;
-    var c = v - w;
-    var g = 0;
+convert$1.hwb.hcg = function (hwb) {
+  var w = hwb[1] / 100;
+  var b = hwb[2] / 100;
+  var v = 1 - b;
+  var c = v - w;
+  var g = 0;
 
-    if (c < 1) {
-      g = (v - c) / (1 - c);
-    }
+  if (c < 1) {
+    g = (v - c) / (1 - c);
+  }
 
-    return [hwb[0], c * 100, g * 100];
-  };
+  return [hwb[0], c * 100, g * 100];
+};
 
-  convert.apple.rgb = function (apple) {
-    return [apple[0] / 65535 * 255, apple[1] / 65535 * 255, apple[2] / 65535 * 255];
-  };
+convert$1.apple.rgb = function (apple) {
+  return [apple[0] / 65535 * 255, apple[1] / 65535 * 255, apple[2] / 65535 * 255];
+};
 
-  convert.rgb.apple = function (rgb) {
-    return [rgb[0] / 255 * 65535, rgb[1] / 255 * 65535, rgb[2] / 255 * 65535];
-  };
+convert$1.rgb.apple = function (rgb) {
+  return [rgb[0] / 255 * 65535, rgb[1] / 255 * 65535, rgb[2] / 255 * 65535];
+};
 
-  convert.gray.rgb = function (args) {
-    return [args[0] / 100 * 255, args[0] / 100 * 255, args[0] / 100 * 255];
-  };
+convert$1.gray.rgb = function (args) {
+  return [args[0] / 100 * 255, args[0] / 100 * 255, args[0] / 100 * 255];
+};
 
-  convert.gray.hsl = convert.gray.hsv = function (args) {
-    return [0, 0, args[0]];
-  };
+convert$1.gray.hsl = convert$1.gray.hsv = function (args) {
+  return [0, 0, args[0]];
+};
 
-  convert.gray.hwb = function (gray) {
-    return [0, 100, gray[0]];
-  };
+convert$1.gray.hwb = function (gray) {
+  return [0, 100, gray[0]];
+};
 
-  convert.gray.cmyk = function (gray) {
-    return [0, 0, 0, gray[0]];
-  };
+convert$1.gray.cmyk = function (gray) {
+  return [0, 0, 0, gray[0]];
+};
 
-  convert.gray.lab = function (gray) {
-    return [gray[0], 0, 0];
-  };
+convert$1.gray.lab = function (gray) {
+  return [gray[0], 0, 0];
+};
 
-  convert.gray.hex = function (gray) {
-    var val = Math.round(gray[0] / 100 * 255) & 0xFF;
-    var integer = (val << 16) + (val << 8) + val;
-    var string = integer.toString(16).toUpperCase();
-    return '000000'.substring(string.length) + string;
-  };
+convert$1.gray.hex = function (gray) {
+  var val = Math.round(gray[0] / 100 * 255) & 0xFF;
+  var integer = (val << 16) + (val << 8) + val;
+  var string = integer.toString(16).toUpperCase();
+  return '000000'.substring(string.length) + string;
+};
 
-  convert.rgb.gray = function (rgb) {
-    var val = (rgb[0] + rgb[1] + rgb[2]) / 3;
-    return [val / 255 * 100];
-  };
-});
-var conversions_1 = conversions.rgb;
-var conversions_2 = conversions.hsl;
-var conversions_3 = conversions.hsv;
-var conversions_4 = conversions.hwb;
-var conversions_5 = conversions.cmyk;
-var conversions_6 = conversions.xyz;
-var conversions_7 = conversions.lab;
-var conversions_8 = conversions.lch;
-var conversions_9 = conversions.hex;
-var conversions_10 = conversions.keyword;
-var conversions_11 = conversions.ansi16;
-var conversions_12 = conversions.ansi256;
-var conversions_13 = conversions.hcg;
-var conversions_14 = conversions.apple;
-var conversions_15 = conversions.gray;
+convert$1.rgb.gray = function (rgb) {
+  var val = (rgb[0] + rgb[1] + rgb[2]) / 3;
+  return [val / 255 * 100];
+};
 
+var conversions$1 = conversions$2.exports;
 /*
        this function routes a model to all other models.
 
@@ -1996,7 +1743,7 @@ var conversions_15 = conversions.gray;
 function buildGraph() {
   var graph = {}; // https://jsperf.com/object-keys-vs-for-in-with-closure/3
 
-  var models = Object.keys(conversions);
+  var models = Object.keys(conversions$1);
 
   for (var len = models.length, i = 0; i < len; i++) {
     graph[models[i]] = {
@@ -2019,7 +1766,7 @@ function deriveBFS(fromModel) {
 
   while (queue.length) {
     var current = queue.pop();
-    var adjacents = Object.keys(conversions[current]);
+    var adjacents = Object.keys(conversions$1[current]);
 
     for (var len = adjacents.length, i = 0; i < len; i++) {
       var adjacent = adjacents[i];
@@ -2044,12 +1791,12 @@ function link(from, to) {
 
 function wrapConversion(toModel, graph) {
   var path = [graph[toModel].parent, toModel];
-  var fn = conversions[graph[toModel].parent][toModel];
+  var fn = conversions$1[graph[toModel].parent][toModel];
   var cur = graph[toModel].parent;
 
   while (graph[cur].parent) {
     path.unshift(graph[cur].parent);
-    fn = link(conversions[graph[cur].parent][cur], fn);
+    fn = link(conversions$1[graph[cur].parent][cur], fn);
     cur = graph[cur].parent;
   }
 
@@ -2057,7 +1804,7 @@ function wrapConversion(toModel, graph) {
   return fn;
 }
 
-var route = function (fromModel) {
+var route$1 = function (fromModel) {
   var graph = deriveBFS(fromModel);
   var conversion = {};
   var models = Object.keys(graph);
@@ -2077,6 +1824,8 @@ var route = function (fromModel) {
   return conversion;
 };
 
+var conversions = conversions$2.exports;
+var route = route$1;
 var convert = {};
 var models = Object.keys(conversions);
 
@@ -2150,20 +1899,22 @@ models.forEach(function (fromModel) {
 });
 var colorConvert = convert;
 
-var ansiStyles = createCommonjsModule(function (module) {
+(function (module) {
+
+  const colorConvert$1 = colorConvert;
 
   const wrapAnsi16 = (fn, offset) => function () {
-    const code = fn.apply(colorConvert, arguments);
+    const code = fn.apply(colorConvert$1, arguments);
     return `\u001B[${code + offset}m`;
   };
 
   const wrapAnsi256 = (fn, offset) => function () {
-    const code = fn.apply(colorConvert, arguments);
+    const code = fn.apply(colorConvert$1, arguments);
     return `\u001B[${38 + offset};5;${code}m`;
   };
 
   const wrapAnsi16m = (fn, offset) => function () {
-    const rgb = fn.apply(colorConvert, arguments);
+    const rgb = fn.apply(colorConvert$1, arguments);
     return `\u001B[${38 + offset};2;${rgb[0]};${rgb[1]};${rgb[2]}m`;
   };
 
@@ -2271,12 +2022,12 @@ var ansiStyles = createCommonjsModule(function (module) {
       rgb: wrapAnsi16m(rgb2rgb, 10)
     };
 
-    for (let key of Object.keys(colorConvert)) {
-      if (typeof colorConvert[key] !== 'object') {
+    for (let key of Object.keys(colorConvert$1)) {
+      if (typeof colorConvert$1[key] !== 'object') {
         continue;
       }
 
-      const suite = colorConvert[key];
+      const suite = colorConvert$1[key];
 
       if (key === 'ansi16') {
         key = 'ansi';
@@ -2306,9 +2057,9 @@ var ansiStyles = createCommonjsModule(function (module) {
     enumerable: true,
     get: assembleStyles
   });
-});
+})(ansiStyles);
 
-var hasFlag = (flag, argv) => {
+var hasFlag$1 = (flag, argv) => {
   argv = argv || process.argv;
   const prefix = flag.startsWith('-') ? '' : flag.length === 1 ? '-' : '--';
   const pos = argv.indexOf(prefix + flag);
@@ -2316,6 +2067,8 @@ var hasFlag = (flag, argv) => {
   return pos !== -1 && (terminatorPos === -1 ? true : pos < terminatorPos);
 };
 
+const os = require$$0__default$2["default"];
+const hasFlag = hasFlag$1;
 const env = process.env;
 let forceColor;
 
@@ -2553,9 +2306,12 @@ var templates = (chalk, tmp) => {
   return chunks.join('');
 };
 
-var chalk = createCommonjsModule(function (module) {
+(function (module) {
 
+  const escapeStringRegexp$1 = escapeStringRegexp;
+  const ansiStyles$1 = ansiStyles.exports;
   const stdoutColor = supportsColor_1.stdout;
+  const template = templates;
   const isSimpleWindowsTerm = process.platform === 'win32' && !(process.env.TERM || '').toLowerCase().startsWith('xterm'); // `supportsColor.level` â†’ `ansiStyles.color[name]` mapping
 
   const levelMapping = ['ansi', 'ansi', 'ansi256', 'ansi16m']; // `color-convert` models to exclude from the Chalk API due to conflicts and such
@@ -2594,14 +2350,14 @@ var chalk = createCommonjsModule(function (module) {
 
 
   if (isSimpleWindowsTerm) {
-    ansiStyles.blue.open = '\u001B[94m';
+    ansiStyles$1.blue.open = '\u001B[94m';
   }
 
-  for (const key of Object.keys(ansiStyles)) {
-    ansiStyles[key].closeRe = new RegExp(escapeStringRegexp(ansiStyles[key].close), 'g');
+  for (const key of Object.keys(ansiStyles$1)) {
+    ansiStyles$1[key].closeRe = new RegExp(escapeStringRegexp$1(ansiStyles$1[key].close), 'g');
     styles[key] = {
       get() {
-        const codes = ansiStyles[key];
+        const codes = ansiStyles$1[key];
         return build.call(this, this._styles ? this._styles.concat(codes) : [codes], this._empty, key);
       }
 
@@ -2614,9 +2370,9 @@ var chalk = createCommonjsModule(function (module) {
     }
 
   };
-  ansiStyles.color.closeRe = new RegExp(escapeStringRegexp(ansiStyles.color.close), 'g');
+  ansiStyles$1.color.closeRe = new RegExp(escapeStringRegexp$1(ansiStyles$1.color.close), 'g');
 
-  for (const model of Object.keys(ansiStyles.color.ansi)) {
+  for (const model of Object.keys(ansiStyles$1.color.ansi)) {
     if (skipModels.has(model)) {
       continue;
     }
@@ -2625,11 +2381,11 @@ var chalk = createCommonjsModule(function (module) {
       get() {
         const level = this.level;
         return function () {
-          const open = ansiStyles.color[levelMapping[level]][model].apply(null, arguments);
+          const open = ansiStyles$1.color[levelMapping[level]][model].apply(null, arguments);
           const codes = {
             open,
-            close: ansiStyles.color.close,
-            closeRe: ansiStyles.color.closeRe
+            close: ansiStyles$1.color.close,
+            closeRe: ansiStyles$1.color.closeRe
           };
           return build.call(this, this._styles ? this._styles.concat(codes) : [codes], this._empty, model);
         };
@@ -2638,9 +2394,9 @@ var chalk = createCommonjsModule(function (module) {
     };
   }
 
-  ansiStyles.bgColor.closeRe = new RegExp(escapeStringRegexp(ansiStyles.bgColor.close), 'g');
+  ansiStyles$1.bgColor.closeRe = new RegExp(escapeStringRegexp$1(ansiStyles$1.bgColor.close), 'g');
 
-  for (const model of Object.keys(ansiStyles.bgColor.ansi)) {
+  for (const model of Object.keys(ansiStyles$1.bgColor.ansi)) {
     if (skipModels.has(model)) {
       continue;
     }
@@ -2650,11 +2406,11 @@ var chalk = createCommonjsModule(function (module) {
       get() {
         const level = this.level;
         return function () {
-          const open = ansiStyles.bgColor[levelMapping[level]][model].apply(null, arguments);
+          const open = ansiStyles$1.bgColor[levelMapping[level]][model].apply(null, arguments);
           const codes = {
             open,
-            close: ansiStyles.bgColor.close,
-            closeRe: ansiStyles.bgColor.closeRe
+            close: ansiStyles$1.bgColor.close,
+            closeRe: ansiStyles$1.bgColor.closeRe
           };
           return build.call(this, this._styles ? this._styles.concat(codes) : [codes], this._empty, model);
         };
@@ -2730,10 +2486,10 @@ var chalk = createCommonjsModule(function (module) {
     // If we're on Windows and we're dealing with a gray color, temporarily make 'dim' a noop.
 
 
-    const originalDim = ansiStyles.dim.open;
+    const originalDim = ansiStyles$1.dim.open;
 
     if (isSimpleWindowsTerm && this.hasGrey) {
-      ansiStyles.dim.open = '';
+      ansiStyles$1.dim.open = '';
     }
 
     for (const code of this._styles.slice().reverse()) {
@@ -2748,7 +2504,7 @@ var chalk = createCommonjsModule(function (module) {
     } // Reset the original `dim` if we changed it to work around the Windows dimmed gray issue
 
 
-    ansiStyles.dim.open = originalDim;
+    ansiStyles$1.dim.open = originalDim;
     return str;
   }
 
@@ -2767,7 +2523,7 @@ var chalk = createCommonjsModule(function (module) {
       parts.push(String(strings.raw[i]));
     }
 
-    return templates(chalk, parts.join(''));
+    return template(chalk, parts.join(''));
   }
 
   Object.defineProperties(Chalk.prototype, styles);
@@ -2775,111 +2531,49 @@ var chalk = createCommonjsModule(function (module) {
 
   module.exports.supportsColor = stdoutColor;
   module.exports.default = module.exports; // For TypeScript
-});
-var chalk_1 = chalk.supportsColor;
-
-var lib = createCommonjsModule(function (module, exports) {
-
-  Object.defineProperty(exports, "__esModule", {
-    value: true
-  });
-  exports.shouldHighlight = shouldHighlight;
-  exports.getChalk = getChalk;
-  exports.default = highlight;
-
-  var _jsTokens = _interopRequireWildcard(jsTokens);
-
-  var _esutils = _interopRequireDefault(utils);
-
-  var _chalk = _interopRequireDefault(chalk);
-
-  function _interopRequireDefault(obj) {
-    return obj && obj.__esModule ? obj : {
-      default: obj
-    };
-  }
-
-  function _getRequireWildcardCache() {
-    if (typeof WeakMap !== "function") return null;
-    var cache = new WeakMap();
-
-    _getRequireWildcardCache = function () {
-      return cache;
-    };
-
-    return cache;
-  }
+})(chalk);
 
-  function _interopRequireWildcard(obj) {
-    if (obj && obj.__esModule) {
-      return obj;
-    }
-
-    if (obj === null || typeof obj !== "object" && typeof obj !== "function") {
-      return {
-        default: obj
-      };
-    }
-
-    var cache = _getRequireWildcardCache();
-
-    if (cache && cache.has(obj)) {
-      return cache.get(obj);
-    }
-
-    var newObj = {};
-    var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
-
-    for (var key in obj) {
-      if (Object.prototype.hasOwnProperty.call(obj, key)) {
-        var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
-
-        if (desc && (desc.get || desc.set)) {
-          Object.defineProperty(newObj, key, desc);
-        } else {
-          newObj[key] = obj[key];
-        }
-      }
-    }
-
-    newObj.default = obj;
+Object.defineProperty(lib$1, "__esModule", {
+  value: true
+});
 
-    if (cache) {
-      cache.set(obj, newObj);
-    }
+lib$1.default = highlight;
 
-    return newObj;
-  }
+lib$1.getChalk = getChalk;
+lib$1.shouldHighlight = shouldHighlight;
+var _jsTokens = jsTokens;
+var _helperValidatorIdentifier = lib;
+var _chalk = chalk.exports;
+const sometimesKeywords = new Set(["as", "async", "from", "get", "of", "set"]);
 
-  function getDefs(chalk) {
-    return {
-      keyword: chalk.cyan,
-      capitalized: chalk.yellow,
-      jsx_tag: chalk.yellow,
-      punctuator: chalk.yellow,
-      number: chalk.magenta,
-      string: chalk.green,
-      regex: chalk.magenta,
-      comment: chalk.grey,
-      invalid: chalk.white.bgRed.bold
-    };
-  }
+function getDefs$1(chalk) {
+  return {
+    keyword: chalk.cyan,
+    capitalized: chalk.yellow,
+    jsxIdentifier: chalk.yellow,
+    punctuator: chalk.yellow,
+    number: chalk.magenta,
+    string: chalk.green,
+    regex: chalk.magenta,
+    comment: chalk.grey,
+    invalid: chalk.white.bgRed.bold
+  };
+}
 
-  const NEWLINE = /\r\n|[\n\r\u2028\u2029]/;
+const NEWLINE$1 = /\r\n|[\n\r\u2028\u2029]/;
+const BRACKET = /^[()[\]{}]$/;
+let tokenize;
+{
   const JSX_TAG = /^[a-z][\w-]*$/i;
-  const BRACKET = /^[()[\]{}]$/;
-
-  function getTokenType(match) {
-    const [offset, text] = match.slice(-2);
-    const token = (0, _jsTokens.matchToToken)(match);
 
+  const getTokenType = function (token, offset, text) {
     if (token.type === "name") {
-      if (_esutils.default.keyword.isReservedWordES6(token.value)) {
+      if ((0, _helperValidatorIdentifier.isKeyword)(token.value) || (0, _helperValidatorIdentifier.isStrictReservedWord)(token.value, true) || sometimesKeywords.has(token.value)) {
         return "keyword";
       }
 
       if (JSX_TAG.test(token.value) && (text[offset - 1] === "<" || text.substr(offset - 2, 2) == "</")) {
-        return "jsx_tag";
+        return "jsxIdentifier";
       }
 
       if (token.value[0] !== token.value[0].toLowerCase()) {
@@ -2896,285 +2590,236 @@ var lib = createCommonjsModule(function (module, exports) {
     }
 
     return token.type;
-  }
-
-  function highlightTokens(defs, text) {
-    return text.replace(_jsTokens.default, function (...args) {
-      const type = getTokenType(args);
-      const colorize = defs[type];
-
-      if (colorize) {
-        return args[0].split(NEWLINE).map(str => colorize(str)).join("\n");
-      } else {
-        return args[0];
-      }
-    });
-  }
+  };
 
-  function shouldHighlight(options) {
-    return _chalk.default.supportsColor || options.forceColor;
-  }
+  tokenize = function* (text) {
+    let match;
 
-  function getChalk(options) {
-    let chalk = _chalk.default;
+    while (match = _jsTokens.default.exec(text)) {
+      const token = _jsTokens.matchToToken(match);
 
-    if (options.forceColor) {
-      chalk = new _chalk.default.constructor({
-        enabled: true,
-        level: 1
-      });
+      yield {
+        type: getTokenType(token, match.index, text),
+        value: token.value
+      };
     }
+  };
+}
 
-    return chalk;
-  }
+function highlightTokens(defs, text) {
+  let highlighted = "";
 
-  function highlight(code, options = {}) {
-    if (shouldHighlight(options)) {
-      const chalk = getChalk(options);
-      const defs = getDefs(chalk);
-      return highlightTokens(defs, code);
+  for (const {
+    type,
+    value
+  } of tokenize(text)) {
+    const colorize = defs[type];
+
+    if (colorize) {
+      highlighted += value.split(NEWLINE$1).map(str => colorize(str)).join("\n");
     } else {
-      return code;
+      highlighted += value;
     }
   }
-});
-unwrapExports(lib);
-var lib_1 = lib.shouldHighlight;
-var lib_2 = lib.getChalk;
-
-var lib$1 = createCommonjsModule(function (module, exports) {
-
-  Object.defineProperty(exports, "__esModule", {
-    value: true
-  });
-  exports.codeFrameColumns = codeFrameColumns;
-  exports.default = _default;
 
-  var _highlight = _interopRequireWildcard(lib);
+  return highlighted;
+}
 
-  function _getRequireWildcardCache() {
-    if (typeof WeakMap !== "function") return null;
-    var cache = new WeakMap();
+function shouldHighlight(options) {
+  return !!_chalk.supportsColor || options.forceColor;
+}
 
-    _getRequireWildcardCache = function () {
-      return cache;
-    };
+function getChalk(options) {
+  return options.forceColor ? new _chalk.constructor({
+    enabled: true,
+    level: 1
+  }) : _chalk;
+}
 
-    return cache;
+function highlight(code, options = {}) {
+  if (shouldHighlight(options)) {
+    const chalk = getChalk(options);
+    const defs = getDefs$1(chalk);
+    return highlightTokens(defs, code);
+  } else {
+    return code;
   }
+}
 
-  function _interopRequireWildcard(obj) {
-    if (obj && obj.__esModule) {
-      return obj;
-    }
+Object.defineProperty(lib$2, "__esModule", {
+  value: true
+});
+lib$2.codeFrameColumns = codeFrameColumns$1;
+lib$2.default = _default;
+var _highlight = lib$1;
+let deprecationWarningShown = false;
 
-    if (obj === null || typeof obj !== "object" && typeof obj !== "function") {
-      return {
-        default: obj
-      };
-    }
+function getDefs(chalk) {
+  return {
+    gutter: chalk.grey,
+    marker: chalk.red.bold,
+    message: chalk.red.bold
+  };
+}
 
-    var cache = _getRequireWildcardCache();
+const NEWLINE = /\r\n|[\n\r\u2028\u2029]/;
 
-    if (cache && cache.has(obj)) {
-      return cache.get(obj);
-    }
-
-    var newObj = {};
-    var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
-
-    for (var key in obj) {
-      if (Object.prototype.hasOwnProperty.call(obj, key)) {
-        var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
-
-        if (desc && (desc.get || desc.set)) {
-          Object.defineProperty(newObj, key, desc);
-        } else {
-          newObj[key] = obj[key];
-        }
+function getMarkerLines(loc, source, opts) {
+  const startLoc = Object.assign({
+    column: 0,
+    line: -1
+  }, loc.start);
+  const endLoc = Object.assign({}, startLoc, loc.end);
+  const {
+    linesAbove = 2,
+    linesBelow = 3
+  } = opts || {};
+  const startLine = startLoc.line;
+  const startColumn = startLoc.column;
+  const endLine = endLoc.line;
+  const endColumn = endLoc.column;
+  let start = Math.max(startLine - (linesAbove + 1), 0);
+  let end = Math.min(source.length, endLine + linesBelow);
+
+  if (startLine === -1) {
+    start = 0;
+  }
+
+  if (endLine === -1) {
+    end = source.length;
+  }
+
+  const lineDiff = endLine - startLine;
+  const markerLines = {};
+
+  if (lineDiff) {
+    for (let i = 0; i <= lineDiff; i++) {
+      const lineNumber = i + startLine;
+
+      if (!startColumn) {
+        markerLines[lineNumber] = true;
+      } else if (i === 0) {
+        const sourceLength = source[lineNumber - 1].length;
+        markerLines[lineNumber] = [startColumn, sourceLength - startColumn + 1];
+      } else if (i === lineDiff) {
+        markerLines[lineNumber] = [0, endColumn];
+      } else {
+        const sourceLength = source[lineNumber - i].length;
+        markerLines[lineNumber] = [0, sourceLength];
       }
     }
-
-    newObj.default = obj;
-
-    if (cache) {
-      cache.set(obj, newObj);
+  } else {
+    if (startColumn === endColumn) {
+      if (startColumn) {
+        markerLines[startLine] = [startColumn, 0];
+      } else {
+        markerLines[startLine] = true;
+      }
+    } else {
+      markerLines[startLine] = [startColumn, endColumn - startColumn];
     }
-
-    return newObj;
   }
 
-  let deprecationWarningShown = false;
+  return {
+    start,
+    end,
+    markerLines
+  };
+}
 
-  function getDefs(chalk) {
-    return {
-      gutter: chalk.grey,
-      marker: chalk.red.bold,
-      message: chalk.red.bold
-    };
-  }
+function codeFrameColumns$1(rawLines, loc, opts = {}) {
+  const highlighted = (opts.highlightCode || opts.forceColor) && (0, _highlight.shouldHighlight)(opts);
+  const chalk = (0, _highlight.getChalk)(opts);
+  const defs = getDefs(chalk);
 
-  const NEWLINE = /\r\n|[\n\r\u2028\u2029]/;
+  const maybeHighlight = (chalkFn, string) => {
+    return highlighted ? chalkFn(string) : string;
+  };
 
-  function getMarkerLines(loc, source, opts) {
-    const startLoc = Object.assign({
-      column: 0,
-      line: -1
-    }, loc.start);
-    const endLoc = Object.assign({}, startLoc, {}, loc.end);
-    const {
-      linesAbove = 2,
-      linesBelow = 3
-    } = opts || {};
-    const startLine = startLoc.line;
-    const startColumn = startLoc.column;
-    const endLine = endLoc.line;
-    const endColumn = endLoc.column;
-    let start = Math.max(startLine - (linesAbove + 1), 0);
-    let end = Math.min(source.length, endLine + linesBelow);
-
-    if (startLine === -1) {
-      start = 0;
-    }
-
-    if (endLine === -1) {
-      end = source.length;
-    }
-
-    const lineDiff = endLine - startLine;
-    const markerLines = {};
-
-    if (lineDiff) {
-      for (let i = 0; i <= lineDiff; i++) {
-        const lineNumber = i + startLine;
-
-        if (!startColumn) {
-          markerLines[lineNumber] = true;
-        } else if (i === 0) {
-          const sourceLength = source[lineNumber - 1].length;
-          markerLines[lineNumber] = [startColumn, sourceLength - startColumn + 1];
-        } else if (i === lineDiff) {
-          markerLines[lineNumber] = [0, endColumn];
-        } else {
-          const sourceLength = source[lineNumber - i].length;
-          markerLines[lineNumber] = [0, sourceLength];
+  const lines = rawLines.split(NEWLINE);
+  const {
+    start,
+    end,
+    markerLines
+  } = getMarkerLines(loc, lines, opts);
+  const hasColumns = loc.start && typeof loc.start.column === "number";
+  const numberMaxWidth = String(end).length;
+  const highlightedLines = highlighted ? (0, _highlight.default)(rawLines, opts) : rawLines;
+  let frame = highlightedLines.split(NEWLINE, end).slice(start, end).map((line, index) => {
+    const number = start + 1 + index;
+    const paddedNumber = ` ${number}`.slice(-numberMaxWidth);
+    const gutter = ` ${paddedNumber} |`;
+    const hasMarker = markerLines[number];
+    const lastMarkerLine = !markerLines[number + 1];
+
+    if (hasMarker) {
+      let markerLine = "";
+
+      if (Array.isArray(hasMarker)) {
+        const markerSpacing = line.slice(0, Math.max(hasMarker[0] - 1, 0)).replace(/[^\t]/g, " ");
+        const numberOfMarkers = hasMarker[1] || 1;
+        markerLine = ["\n ", maybeHighlight(defs.gutter, gutter.replace(/\d/g, " ")), " ", markerSpacing, maybeHighlight(defs.marker, "^").repeat(numberOfMarkers)].join("");
+
+        if (lastMarkerLine && opts.message) {
+          markerLine += " " + maybeHighlight(defs.message, opts.message);
         }
       }
+
+      return [maybeHighlight(defs.marker, ">"), maybeHighlight(defs.gutter, gutter), line.length > 0 ? ` ${line}` : "", markerLine].join("");
     } else {
-      if (startColumn === endColumn) {
-        if (startColumn) {
-          markerLines[startLine] = [startColumn, 0];
-        } else {
-          markerLines[startLine] = true;
-        }
-      } else {
-        markerLines[startLine] = [startColumn, endColumn - startColumn];
-      }
+      return ` ${maybeHighlight(defs.gutter, gutter)}${line.length > 0 ? ` ${line}` : ""}`;
     }
+  }).join("\n");
 
-    return {
-      start,
-      end,
-      markerLines
-    };
+  if (opts.message && !hasColumns) {
+    frame = `${" ".repeat(numberMaxWidth + 1)}${opts.message}\n${frame}`;
   }
 
-  function codeFrameColumns(rawLines, loc, opts = {}) {
-    const highlighted = (opts.highlightCode || opts.forceColor) && (0, _highlight.shouldHighlight)(opts);
-    const chalk = (0, _highlight.getChalk)(opts);
-    const defs = getDefs(chalk);
-
-    const maybeHighlight = (chalkFn, string) => {
-      return highlighted ? chalkFn(string) : string;
-    };
-
-    const lines = rawLines.split(NEWLINE);
-    const {
-      start,
-      end,
-      markerLines
-    } = getMarkerLines(loc, lines, opts);
-    const hasColumns = loc.start && typeof loc.start.column === "number";
-    const numberMaxWidth = String(end).length;
-    const highlightedLines = highlighted ? (0, _highlight.default)(rawLines, opts) : rawLines;
-    let frame = highlightedLines.split(NEWLINE).slice(start, end).map((line, index) => {
-      const number = start + 1 + index;
-      const paddedNumber = ` ${number}`.slice(-numberMaxWidth);
-      const gutter = ` ${paddedNumber} | `;
-      const hasMarker = markerLines[number];
-      const lastMarkerLine = !markerLines[number + 1];
-
-      if (hasMarker) {
-        let markerLine = "";
-
-        if (Array.isArray(hasMarker)) {
-          const markerSpacing = line.slice(0, Math.max(hasMarker[0] - 1, 0)).replace(/[^\t]/g, " ");
-          const numberOfMarkers = hasMarker[1] || 1;
-          markerLine = ["\n ", maybeHighlight(defs.gutter, gutter.replace(/\d/g, " ")), markerSpacing, maybeHighlight(defs.marker, "^").repeat(numberOfMarkers)].join("");
-
-          if (lastMarkerLine && opts.message) {
-            markerLine += " " + maybeHighlight(defs.message, opts.message);
-          }
-        }
-
-        return [maybeHighlight(defs.marker, ">"), maybeHighlight(defs.gutter, gutter), line, markerLine].join("");
-      } else {
-        return ` ${maybeHighlight(defs.gutter, gutter)}${line}`;
-      }
-    }).join("\n");
+  if (highlighted) {
+    return chalk.reset(frame);
+  } else {
+    return frame;
+  }
+}
 
-    if (opts.message && !hasColumns) {
-      frame = `${" ".repeat(numberMaxWidth + 1)}${opts.message}\n${frame}`;
-    }
+function _default(rawLines, lineNumber, colNumber, opts = {}) {
+  if (!deprecationWarningShown) {
+    deprecationWarningShown = true;
+    const message = "Passing lineNumber and colNumber is deprecated to @babel/code-frame. Please use `codeFrameColumns`.";
 
-    if (highlighted) {
-      return chalk.reset(frame);
+    if (process.emitWarning) {
+      process.emitWarning(message, "DeprecationWarning");
     } else {
-      return frame;
+      const deprecationError = new Error(message);
+      deprecationError.name = "DeprecationWarning";
+      console.warn(new Error(message));
     }
   }
 
-  function _default(rawLines, lineNumber, colNumber, opts = {}) {
-    if (!deprecationWarningShown) {
-      deprecationWarningShown = true;
-      const message = "Passing lineNumber and colNumber is deprecated to @babel/code-frame. Please use `codeFrameColumns`.";
-
-      if (process.emitWarning) {
-        process.emitWarning(message, "DeprecationWarning");
-      } else {
-        const deprecationError = new Error(message);
-        deprecationError.name = "DeprecationWarning";
-        console.warn(new Error(message));
-      }
+  colNumber = Math.max(colNumber, 0);
+  const location = {
+    start: {
+      column: colNumber,
+      line: lineNumber
     }
+  };
+  return codeFrameColumns$1(rawLines, location, opts);
+}
 
-    colNumber = Math.max(colNumber, 0);
-    const location = {
-      start: {
-        column: colNumber,
-        line: lineNumber
-      }
-    };
-    return codeFrameColumns(rawLines, location, opts);
-  }
-});
-unwrapExports(lib$1);
-var lib_1$1 = lib$1.codeFrameColumns;
-
-var require$$0 = getCjsExportFromNamespace(dist);
-
+const errorEx = errorEx_1;
+const fallback = jsonParseEvenBetterErrors;
 const {
-  default: LinesAndColumns$1
-} = require$$0;
+  default: LinesAndColumns
+} = dist$1;
 const {
   codeFrameColumns
-} = lib$1;
-const JSONError = errorEx_1('JSONError', {
-  fileName: errorEx_1.append('in %s'),
-  codeFrame: errorEx_1.append('\n\n%s\n')
+} = lib$2;
+const JSONError = errorEx('JSONError', {
+  fileName: errorEx.append('in %s'),
+  codeFrame: errorEx.append('\n\n%s\n')
 });
 
-var parseJson$1 = (string, reviver, filename) => {
+const parseJson$1 = (string, reviver, filename) => {
   if (typeof reviver === 'string') {
     filename = reviver;
     reviver = null;
@@ -3184,12 +2829,12 @@ var parseJson$1 = (string, reviver, filename) => {
     try {
       return JSON.parse(string, reviver);
     } catch (error) {
-      jsonParseBetterErrors(string, reviver);
+      fallback(string, reviver);
       throw error;
     }
   } catch (error) {
     error.message = error.message.replace(/\n/g, '');
-    const indexMatch = error.message.match(/in JSON at position (\d+) while parsing near/);
+    const indexMatch = error.message.match(/in JSON at position (\d+) while parsing/);
     const jsonError = new JSONError(error);
 
     if (filename) {
@@ -3197,7 +2842,7 @@ var parseJson$1 = (string, reviver, filename) => {
     }
 
     if (indexMatch && indexMatch.length > 0) {
-      const lines = new LinesAndColumns$1(string);
+      const lines = new LinesAndColumns(string);
       const index = Number(indexMatch[1]);
       const location = lines.locationForIndex(index);
       const codeFrame = codeFrameColumns(string, {
@@ -3215,8112 +2860,8054 @@ var parseJson$1 = (string, reviver, filename) => {
   }
 };
 
-var constants = createCommonjsModule(function (module, exports) {
+parseJson$1.JSONError = JSONError;
+var parseJson_1 = parseJson$1;
 
-  Object.defineProperty(exports, "__esModule", {
-    value: true
-  });
-  exports.Type = exports.Char = void 0;
-  const Char = {
-    ANCHOR: '&',
-    COMMENT: '#',
-    TAG: '!',
-    DIRECTIVES_END: '-',
-    DOCUMENT_END: '.'
-  };
-  exports.Char = Char;
-  const Type = {
-    ALIAS: 'ALIAS',
-    BLANK_LINE: 'BLANK_LINE',
-    BLOCK_FOLDED: 'BLOCK_FOLDED',
-    BLOCK_LITERAL: 'BLOCK_LITERAL',
-    COMMENT: 'COMMENT',
-    DIRECTIVE: 'DIRECTIVE',
-    DOCUMENT: 'DOCUMENT',
-    FLOW_MAP: 'FLOW_MAP',
-    FLOW_SEQ: 'FLOW_SEQ',
-    MAP: 'MAP',
-    MAP_KEY: 'MAP_KEY',
-    MAP_VALUE: 'MAP_VALUE',
-    PLAIN: 'PLAIN',
-    QUOTE_DOUBLE: 'QUOTE_DOUBLE',
-    QUOTE_SINGLE: 'QUOTE_SINGLE',
-    SEQ: 'SEQ',
-    SEQ_ITEM: 'SEQ_ITEM'
-  };
-  exports.Type = Type;
-});
-unwrapExports(constants);
-var constants_1 = constants.Type;
-var constants_2 = constants.Char;
+var dist = {};
 
-var sourceUtils = createCommonjsModule(function (module, exports) {
+var parseCst$1 = {};
 
-  Object.defineProperty(exports, "__esModule", {
-    value: true
-  });
-  exports.getLinePos = getLinePos;
-  exports.getLine = getLine;
-  exports.getPrettyContext = getPrettyContext;
+var PlainValueEc8e588e = {};
 
-  function findLineStarts(src) {
-    const ls = [0];
-    let offset = src.indexOf('\n');
+const Char = {
+  ANCHOR: '&',
+  COMMENT: '#',
+  TAG: '!',
+  DIRECTIVES_END: '-',
+  DOCUMENT_END: '.'
+};
+const Type = {
+  ALIAS: 'ALIAS',
+  BLANK_LINE: 'BLANK_LINE',
+  BLOCK_FOLDED: 'BLOCK_FOLDED',
+  BLOCK_LITERAL: 'BLOCK_LITERAL',
+  COMMENT: 'COMMENT',
+  DIRECTIVE: 'DIRECTIVE',
+  DOCUMENT: 'DOCUMENT',
+  FLOW_MAP: 'FLOW_MAP',
+  FLOW_SEQ: 'FLOW_SEQ',
+  MAP: 'MAP',
+  MAP_KEY: 'MAP_KEY',
+  MAP_VALUE: 'MAP_VALUE',
+  PLAIN: 'PLAIN',
+  QUOTE_DOUBLE: 'QUOTE_DOUBLE',
+  QUOTE_SINGLE: 'QUOTE_SINGLE',
+  SEQ: 'SEQ',
+  SEQ_ITEM: 'SEQ_ITEM'
+};
+const defaultTagPrefix = 'tag:yaml.org,2002:';
+const defaultTags = {
+  MAP: 'tag:yaml.org,2002:map',
+  SEQ: 'tag:yaml.org,2002:seq',
+  STR: 'tag:yaml.org,2002:str'
+};
 
-    while (offset !== -1) {
-      offset += 1;
-      ls.push(offset);
-      offset = src.indexOf('\n', offset);
-    }
+function findLineStarts(src) {
+  const ls = [0];
+  let offset = src.indexOf('\n');
 
-    return ls;
+  while (offset !== -1) {
+    offset += 1;
+    ls.push(offset);
+    offset = src.indexOf('\n', offset);
   }
 
-  function getSrcInfo(cst) {
-    let lineStarts, src;
+  return ls;
+}
 
-    if (typeof cst === 'string') {
-      lineStarts = findLineStarts(cst);
-      src = cst;
-    } else {
-      if (Array.isArray(cst)) cst = cst[0];
+function getSrcInfo(cst) {
+  let lineStarts, src;
 
-      if (cst && cst.context) {
-        if (!cst.lineStarts) cst.lineStarts = findLineStarts(cst.context.src);
-        lineStarts = cst.lineStarts;
-        src = cst.context.src;
-      }
-    }
+  if (typeof cst === 'string') {
+    lineStarts = findLineStarts(cst);
+    src = cst;
+  } else {
+    if (Array.isArray(cst)) cst = cst[0];
 
-    return {
-      lineStarts,
-      src
-    };
+    if (cst && cst.context) {
+      if (!cst.lineStarts) cst.lineStarts = findLineStarts(cst.context.src);
+      lineStarts = cst.lineStarts;
+      src = cst.context.src;
+    }
   }
-  /**
-   * @typedef {Object} LinePos - One-indexed position in the source
-   * @property {number} line
-   * @property {number} col
-   */
-
-  /**
-   * Determine the line/col position matching a character offset.
-   *
-   * Accepts a source string or a CST document as the second parameter. With
-   * the latter, starting indices for lines are cached in the document as
-   * `lineStarts: number[]`.
-   *
-   * Returns a one-indexed `{ line, col }` location if found, or
-   * `undefined` otherwise.
-   *
-   * @param {number} offset
-   * @param {string|Document|Document[]} cst
-   * @returns {?LinePos}
-   */
-
-
-  function getLinePos(offset, cst) {
-    if (typeof offset !== 'number' || offset < 0) return null;
-    const {
-      lineStarts,
-      src
-    } = getSrcInfo(cst);
-    if (!lineStarts || !src || offset > src.length) return null;
 
-    for (let i = 0; i < lineStarts.length; ++i) {
-      const start = lineStarts[i];
+  return {
+    lineStarts,
+    src
+  };
+}
+/**
+ * @typedef {Object} LinePos - One-indexed position in the source
+ * @property {number} line
+ * @property {number} col
+ */
+
+/**
+ * Determine the line/col position matching a character offset.
+ *
+ * Accepts a source string or a CST document as the second parameter. With
+ * the latter, starting indices for lines are cached in the document as
+ * `lineStarts: number[]`.
+ *
+ * Returns a one-indexed `{ line, col }` location if found, or
+ * `undefined` otherwise.
+ *
+ * @param {number} offset
+ * @param {string|Document|Document[]} cst
+ * @returns {?LinePos}
+ */
+
+
+function getLinePos(offset, cst) {
+  if (typeof offset !== 'number' || offset < 0) return null;
+  const {
+    lineStarts,
+    src
+  } = getSrcInfo(cst);
+  if (!lineStarts || !src || offset > src.length) return null;
 
-      if (offset < start) {
-        return {
-          line: i,
-          col: offset - lineStarts[i - 1] + 1
-        };
-      }
+  for (let i = 0; i < lineStarts.length; ++i) {
+    const start = lineStarts[i];
 
-      if (offset === start) return {
-        line: i + 1,
-        col: 1
+    if (offset < start) {
+      return {
+        line: i,
+        col: offset - lineStarts[i - 1] + 1
       };
     }
 
-    const line = lineStarts.length;
-    return {
-      line,
-      col: offset - lineStarts[line - 1] + 1
+    if (offset === start) return {
+      line: i + 1,
+      col: 1
     };
   }
-  /**
-   * Get a specified line from the source.
-   *
-   * Accepts a source string or a CST document as the second parameter. With
-   * the latter, starting indices for lines are cached in the document as
-   * `lineStarts: number[]`.
-   *
-   * Returns the line as a string if found, or `null` otherwise.
-   *
-   * @param {number} line One-indexed line number
-   * @param {string|Document|Document[]} cst
-   * @returns {?string}
-   */
 
+  const line = lineStarts.length;
+  return {
+    line,
+    col: offset - lineStarts[line - 1] + 1
+  };
+}
+/**
+ * Get a specified line from the source.
+ *
+ * Accepts a source string or a CST document as the second parameter. With
+ * the latter, starting indices for lines are cached in the document as
+ * `lineStarts: number[]`.
+ *
+ * Returns the line as a string if found, or `null` otherwise.
+ *
+ * @param {number} line One-indexed line number
+ * @param {string|Document|Document[]} cst
+ * @returns {?string}
+ */
+
+
+function getLine(line, cst) {
+  const {
+    lineStarts,
+    src
+  } = getSrcInfo(cst);
+  if (!lineStarts || !(line >= 1) || line > lineStarts.length) return null;
+  const start = lineStarts[line - 1];
+  let end = lineStarts[line]; // undefined for last line; that's ok for slice()
 
-  function getLine(line, cst) {
-    const {
-      lineStarts,
-      src
-    } = getSrcInfo(cst);
-    if (!lineStarts || !(line >= 1) || line > lineStarts.length) return null;
-    const start = lineStarts[line - 1];
-    let end = lineStarts[line]; // undefined for last line; that's ok for slice()
+  while (end && end > start && src[end - 1] === '\n') --end;
 
-    while (end && end > start && src[end - 1] === '\n') --end;
+  return src.slice(start, end);
+}
+/**
+ * Pretty-print the starting line from the source indicated by the range `pos`
+ *
+ * Trims output to `maxWidth` chars while keeping the starting column visible,
+ * using `…` at either end to indicate dropped characters.
+ *
+ * Returns a two-line string (or `null`) with `\n` as separator; the second line
+ * will hold appropriately indented `^` marks indicating the column range.
+ *
+ * @param {Object} pos
+ * @param {LinePos} pos.start
+ * @param {LinePos} [pos.end]
+ * @param {string|Document|Document[]*} cst
+ * @param {number} [maxWidth=80]
+ * @returns {?string}
+ */
+
+
+function getPrettyContext({
+  start,
+  end
+}, cst, maxWidth = 80) {
+  let src = getLine(start.line, cst);
+  if (!src) return null;
+  let {
+    col
+  } = start;
 
-    return src.slice(start, end);
+  if (src.length > maxWidth) {
+    if (col <= maxWidth - 10) {
+      src = src.substr(0, maxWidth - 1) + '…';
+    } else {
+      const halfWidth = Math.round(maxWidth / 2);
+      if (src.length > col + halfWidth) src = src.substr(0, col + halfWidth - 1) + '…';
+      col -= src.length - maxWidth;
+      src = '…' + src.substr(1 - maxWidth);
+    }
   }
-  /**
-   * Pretty-print the starting line from the source indicated by the range `pos`
-   *
-   * Trims output to `maxWidth` chars while keeping the starting column visible,
-   * using `…` at either end to indicate dropped characters.
-   *
-   * Returns a two-line string (or `null`) with `\n` as separator; the second line
-   * will hold appropriately indented `^` marks indicating the column range.
-   *
-   * @param {Object} pos
-   * @param {LinePos} pos.start
-   * @param {LinePos} [pos.end]
-   * @param {string|Document|Document[]*} cst
-   * @param {number} [maxWidth=80]
-   * @returns {?string}
-   */
 
+  let errLen = 1;
+  let errEnd = '';
 
-  function getPrettyContext({
-    start,
-    end
-  }, cst, maxWidth = 80) {
-    let src = getLine(start.line, cst);
-    if (!src) return null;
-    let {
-      col
-    } = start;
-
-    if (src.length > maxWidth) {
-      if (col <= maxWidth - 10) {
-        src = src.substr(0, maxWidth - 1) + '…';
-      } else {
-        const halfWidth = Math.round(maxWidth / 2);
-        if (src.length > col + halfWidth) src = src.substr(0, col + halfWidth - 1) + '…';
-        col -= src.length - maxWidth;
-        src = '…' + src.substr(1 - maxWidth);
-      }
+  if (end) {
+    if (end.line === start.line && col + (end.col - start.col) <= maxWidth + 1) {
+      errLen = end.col - start.col;
+    } else {
+      errLen = Math.min(src.length + 1, maxWidth) - col;
+      errEnd = '…';
     }
+  }
 
-    let errLen = 1;
-    let errEnd = '';
+  const offset = col > 1 ? ' '.repeat(col - 1) : '';
+  const err = '^'.repeat(errLen);
+  return `${src}\n${offset}${err}${errEnd}`;
+}
 
-    if (end) {
-      if (end.line === start.line && col + (end.col - start.col) <= maxWidth + 1) {
-        errLen = end.col - start.col;
-      } else {
-        errLen = Math.min(src.length + 1, maxWidth) - col;
-        errEnd = '…';
-      }
-    }
+class Range {
+  static copy(orig) {
+    return new Range(orig.start, orig.end);
+  }
 
-    const offset = col > 1 ? ' '.repeat(col - 1) : '';
-    const err = '^'.repeat(errLen);
-    return `${src}\n${offset}${err}${errEnd}`;
+  constructor(start, end) {
+    this.start = start;
+    this.end = end || start;
   }
-});
-unwrapExports(sourceUtils);
-var sourceUtils_1 = sourceUtils.getLinePos;
-var sourceUtils_2 = sourceUtils.getLine;
-var sourceUtils_3 = sourceUtils.getPrettyContext;
 
-var Range_1 = createCommonjsModule(function (module, exports) {
+  isEmpty() {
+    return typeof this.start !== 'number' || !this.end || this.end <= this.start;
+  }
+  /**
+   * Set `origStart` and `origEnd` to point to the original source range for
+   * this node, which may differ due to dropped CR characters.
+   *
+   * @param {number[]} cr - Positions of dropped CR characters
+   * @param {number} offset - Starting index of `cr` from the last call
+   * @returns {number} - The next offset, matching the one found for `origStart`
+   */
 
-  Object.defineProperty(exports, "__esModule", {
-    value: true
-  });
-  exports.default = void 0;
 
-  class Range {
-    static copy(orig) {
-      return new Range(orig.start, orig.end);
-    }
+  setOrigRange(cr, offset) {
+    const {
+      start,
+      end
+    } = this;
 
-    constructor(start, end) {
-      this.start = start;
-      this.end = end || start;
+    if (cr.length === 0 || end <= cr[0]) {
+      this.origStart = start;
+      this.origEnd = end;
+      return offset;
     }
 
-    isEmpty() {
-      return typeof this.start !== 'number' || !this.end || this.end <= this.start;
+    let i = offset;
+
+    while (i < cr.length) {
+      if (cr[i] > start) break;else ++i;
     }
-    /**
-     * Set `origStart` and `origEnd` to point to the original source range for
-     * this node, which may differ due to dropped CR characters.
-     *
-     * @param {number[]} cr - Positions of dropped CR characters
-     * @param {number} offset - Starting index of `cr` from the last call
-     * @returns {number} - The next offset, matching the one found for `origStart`
-     */
 
+    this.origStart = start + i;
+    const nextOffset = i;
 
-    setOrigRange(cr, offset) {
-      const {
-        start,
-        end
-      } = this;
+    while (i < cr.length) {
+      // if end was at \n, it should now be at \r
+      if (cr[i] >= end) break;else ++i;
+    }
 
-      if (cr.length === 0 || end <= cr[0]) {
-        this.origStart = start;
-        this.origEnd = end;
-        return offset;
-      }
+    this.origEnd = end + i;
+    return nextOffset;
+  }
 
-      let i = offset;
+}
+/** Root class of all nodes */
 
-      while (i < cr.length) {
-        if (cr[i] > start) break;else ++i;
-      }
 
-      this.origStart = start + i;
-      const nextOffset = i;
+class Node$1 {
+  static addStringTerminator(src, offset, str) {
+    if (str[str.length - 1] === '\n') return str;
+    const next = Node$1.endOfWhiteSpace(src, offset);
+    return next >= src.length || src[next] === '\n' ? str + '\n' : str;
+  } // ^(---|...)
 
-      while (i < cr.length) {
-        // if end was at \n, it should now be at \r
-        if (cr[i] >= end) break;else ++i;
-      }
 
-      this.origEnd = end + i;
-      return nextOffset;
+  static atDocumentBoundary(src, offset, sep) {
+    const ch0 = src[offset];
+    if (!ch0) return true;
+    const prev = src[offset - 1];
+    if (prev && prev !== '\n') return false;
+
+    if (sep) {
+      if (ch0 !== sep) return false;
+    } else {
+      if (ch0 !== Char.DIRECTIVES_END && ch0 !== Char.DOCUMENT_END) return false;
     }
 
+    const ch1 = src[offset + 1];
+    const ch2 = src[offset + 2];
+    if (ch1 !== ch0 || ch2 !== ch0) return false;
+    const ch3 = src[offset + 3];
+    return !ch3 || ch3 === '\n' || ch3 === '\t' || ch3 === ' ';
   }
 
-  exports.default = Range;
-});
-unwrapExports(Range_1);
-
-var Node_1 = createCommonjsModule(function (module, exports) {
-
-  Object.defineProperty(exports, "__esModule", {
-    value: true
-  });
-  exports.default = void 0;
+  static endOfIdentifier(src, offset) {
+    let ch = src[offset];
+    const isVerbatim = ch === '<';
+    const notOk = isVerbatim ? ['\n', '\t', ' ', '>'] : ['\n', '\t', ' ', '[', ']', '{', '}', ','];
 
-  var _Range = _interopRequireDefault(Range_1);
+    while (ch && notOk.indexOf(ch) === -1) ch = src[offset += 1];
 
-  function _interopRequireDefault(obj) {
-    return obj && obj.__esModule ? obj : {
-      default: obj
-    };
+    if (isVerbatim && ch === '>') offset += 1;
+    return offset;
   }
-  /** Root class of all nodes */
 
+  static endOfIndent(src, offset) {
+    let ch = src[offset];
 
-  class Node {
-    static addStringTerminator(src, offset, str) {
-      if (str[str.length - 1] === '\n') return str;
-      const next = Node.endOfWhiteSpace(src, offset);
-      return next >= src.length || src[next] === '\n' ? str + '\n' : str;
-    } // ^(---|...)
+    while (ch === ' ') ch = src[offset += 1];
 
+    return offset;
+  }
 
-    static atDocumentBoundary(src, offset, sep) {
-      const ch0 = src[offset];
-      if (!ch0) return true;
-      const prev = src[offset - 1];
-      if (prev && prev !== '\n') return false;
+  static endOfLine(src, offset) {
+    let ch = src[offset];
 
-      if (sep) {
-        if (ch0 !== sep) return false;
-      } else {
-        if (ch0 !== constants.Char.DIRECTIVES_END && ch0 !== constants.Char.DOCUMENT_END) return false;
-      }
+    while (ch && ch !== '\n') ch = src[offset += 1];
 
-      const ch1 = src[offset + 1];
-      const ch2 = src[offset + 2];
-      if (ch1 !== ch0 || ch2 !== ch0) return false;
-      const ch3 = src[offset + 3];
-      return !ch3 || ch3 === '\n' || ch3 === '\t' || ch3 === ' ';
-    }
+    return offset;
+  }
 
-    static endOfIdentifier(src, offset) {
-      let ch = src[offset];
-      const isVerbatim = ch === '<';
-      const notOk = isVerbatim ? ['\n', '\t', ' ', '>'] : ['\n', '\t', ' ', '[', ']', '{', '}', ','];
+  static endOfWhiteSpace(src, offset) {
+    let ch = src[offset];
 
-      while (ch && notOk.indexOf(ch) === -1) ch = src[offset += 1];
+    while (ch === '\t' || ch === ' ') ch = src[offset += 1];
 
-      if (isVerbatim && ch === '>') offset += 1;
-      return offset;
-    }
+    return offset;
+  }
 
-    static endOfIndent(src, offset) {
-      let ch = src[offset];
+  static startOfLine(src, offset) {
+    let ch = src[offset - 1];
+    if (ch === '\n') return offset;
 
-      while (ch === ' ') ch = src[offset += 1];
+    while (ch && ch !== '\n') ch = src[offset -= 1];
 
-      return offset;
-    }
+    return offset + 1;
+  }
+  /**
+   * End of indentation, or null if the line's indent level is not more
+   * than `indent`
+   *
+   * @param {string} src
+   * @param {number} indent
+   * @param {number} lineStart
+   * @returns {?number}
+   */
 
-    static endOfLine(src, offset) {
-      let ch = src[offset];
 
-      while (ch && ch !== '\n') ch = src[offset += 1];
+  static endOfBlockIndent(src, indent, lineStart) {
+    const inEnd = Node$1.endOfIndent(src, lineStart);
 
-      return offset;
+    if (inEnd > lineStart + indent) {
+      return inEnd;
+    } else {
+      const wsEnd = Node$1.endOfWhiteSpace(src, inEnd);
+      const ch = src[wsEnd];
+      if (!ch || ch === '\n') return wsEnd;
     }
 
-    static endOfWhiteSpace(src, offset) {
-      let ch = src[offset];
+    return null;
+  }
 
-      while (ch === '\t' || ch === ' ') ch = src[offset += 1];
+  static atBlank(src, offset, endAsBlank) {
+    const ch = src[offset];
+    return ch === '\n' || ch === '\t' || ch === ' ' || endAsBlank && !ch;
+  }
 
-      return offset;
-    }
+  static nextNodeIsIndented(ch, indentDiff, indicatorAsIndent) {
+    if (!ch || indentDiff < 0) return false;
+    if (indentDiff > 0) return true;
+    return indicatorAsIndent && ch === '-';
+  } // should be at line or string end, or at next non-whitespace char
 
-    static startOfLine(src, offset) {
-      let ch = src[offset - 1];
-      if (ch === '\n') return offset;
 
-      while (ch && ch !== '\n') ch = src[offset -= 1];
+  static normalizeOffset(src, offset) {
+    const ch = src[offset];
+    return !ch ? offset : ch !== '\n' && src[offset - 1] === '\n' ? offset - 1 : Node$1.endOfWhiteSpace(src, offset);
+  } // fold single newline into space, multiple newlines to N - 1 newlines
+  // presumes src[offset] === '\n'
 
-      return offset + 1;
-    }
-    /**
-     * End of indentation, or null if the line's indent level is not more
-     * than `indent`
-     *
-     * @param {string} src
-     * @param {number} indent
-     * @param {number} lineStart
-     * @returns {?number}
-     */
 
+  static foldNewline(src, offset, indent) {
+    let inCount = 0;
+    let error = false;
+    let fold = '';
+    let ch = src[offset + 1];
 
-    static endOfBlockIndent(src, indent, lineStart) {
-      const inEnd = Node.endOfIndent(src, lineStart);
+    while (ch === ' ' || ch === '\t' || ch === '\n') {
+      switch (ch) {
+        case '\n':
+          inCount = 0;
+          offset += 1;
+          fold += '\n';
+          break;
 
-      if (inEnd > lineStart + indent) {
-        return inEnd;
-      } else {
-        const wsEnd = Node.endOfWhiteSpace(src, inEnd);
-        const ch = src[wsEnd];
-        if (!ch || ch === '\n') return wsEnd;
-      }
+        case '\t':
+          if (inCount <= indent) error = true;
+          offset = Node$1.endOfWhiteSpace(src, offset + 2) - 1;
+          break;
 
-      return null;
-    }
+        case ' ':
+          inCount += 1;
+          offset += 1;
+          break;
+      }
 
-    static atBlank(src, offset, endAsBlank) {
-      const ch = src[offset];
-      return ch === '\n' || ch === '\t' || ch === ' ' || endAsBlank && !ch;
+      ch = src[offset + 1];
     }
 
-    static nextNodeIsIndented(ch, indentDiff, indicatorAsIndent) {
-      if (!ch || indentDiff < 0) return false;
-      if (indentDiff > 0) return true;
-      return indicatorAsIndent && ch === '-';
-    } // should be at line or string end, or at next non-whitespace char
-
-
-    static normalizeOffset(src, offset) {
-      const ch = src[offset];
-      return !ch ? offset : ch !== '\n' && src[offset - 1] === '\n' ? offset - 1 : Node.endOfWhiteSpace(src, offset);
-    } // fold single newline into space, multiple newlines to N - 1 newlines
-    // presumes src[offset] === '\n'
-
+    if (!fold) fold = ' ';
+    if (ch && inCount <= indent) error = true;
+    return {
+      fold,
+      offset,
+      error
+    };
+  }
 
-    static foldNewline(src, offset, indent) {
-      let inCount = 0;
-      let error = false;
-      let fold = '';
-      let ch = src[offset + 1];
+  constructor(type, props, context) {
+    Object.defineProperty(this, 'context', {
+      value: context || null,
+      writable: true
+    });
+    this.error = null;
+    this.range = null;
+    this.valueRange = null;
+    this.props = props || [];
+    this.type = type;
+    this.value = null;
+  }
 
-      while (ch === ' ' || ch === '\t' || ch === '\n') {
-        switch (ch) {
-          case '\n':
-            inCount = 0;
-            offset += 1;
-            fold += '\n';
-            break;
+  getPropValue(idx, key, skipKey) {
+    if (!this.context) return null;
+    const {
+      src
+    } = this.context;
+    const prop = this.props[idx];
+    return prop && src[prop.start] === key ? src.slice(prop.start + (skipKey ? 1 : 0), prop.end) : null;
+  }
 
-          case '\t':
-            if (inCount <= indent) error = true;
-            offset = Node.endOfWhiteSpace(src, offset + 2) - 1;
-            break;
+  get anchor() {
+    for (let i = 0; i < this.props.length; ++i) {
+      const anchor = this.getPropValue(i, Char.ANCHOR, true);
+      if (anchor != null) return anchor;
+    }
 
-          case ' ':
-            inCount += 1;
-            offset += 1;
-            break;
-        }
+    return null;
+  }
 
-        ch = src[offset + 1];
-      }
+  get comment() {
+    const comments = [];
 
-      if (!fold) fold = ' ';
-      if (ch && inCount <= indent) error = true;
-      return {
-        fold,
-        offset,
-        error
-      };
+    for (let i = 0; i < this.props.length; ++i) {
+      const comment = this.getPropValue(i, Char.COMMENT, true);
+      if (comment != null) comments.push(comment);
     }
 
-    constructor(type, props, context) {
-      Object.defineProperty(this, 'context', {
-        value: context || null,
-        writable: true
-      });
-      this.error = null;
-      this.range = null;
-      this.valueRange = null;
-      this.props = props || [];
-      this.type = type;
-      this.value = null;
-    }
+    return comments.length > 0 ? comments.join('\n') : null;
+  }
+
+  commentHasRequiredWhitespace(start) {
+    const {
+      src
+    } = this.context;
+    if (this.header && start === this.header.end) return false;
+    if (!this.valueRange) return false;
+    const {
+      end
+    } = this.valueRange;
+    return start !== end || Node$1.atBlank(src, end - 1);
+  }
 
-    getPropValue(idx, key, skipKey) {
-      if (!this.context) return null;
+  get hasComment() {
+    if (this.context) {
       const {
         src
       } = this.context;
-      const prop = this.props[idx];
-      return prop && src[prop.start] === key ? src.slice(prop.start + (skipKey ? 1 : 0), prop.end) : null;
-    }
 
-    get anchor() {
       for (let i = 0; i < this.props.length; ++i) {
-        const anchor = this.getPropValue(i, constants.Char.ANCHOR, true);
-        if (anchor != null) return anchor;
+        if (src[this.props[i].start] === Char.COMMENT) return true;
       }
-
-      return null;
     }
 
-    get comment() {
-      const comments = [];
-
-      for (let i = 0; i < this.props.length; ++i) {
-        const comment = this.getPropValue(i, constants.Char.COMMENT, true);
-        if (comment != null) comments.push(comment);
-      }
-
-      return comments.length > 0 ? comments.join('\n') : null;
-    }
+    return false;
+  }
 
-    commentHasRequiredWhitespace(start) {
+  get hasProps() {
+    if (this.context) {
       const {
         src
       } = this.context;
-      if (this.header && start === this.header.end) return false;
-      if (!this.valueRange) return false;
-      const {
-        end
-      } = this.valueRange;
-      return start !== end || Node.atBlank(src, end - 1);
-    }
 
-    get hasComment() {
-      if (this.context) {
-        const {
-          src
-        } = this.context;
-
-        for (let i = 0; i < this.props.length; ++i) {
-          if (src[this.props[i].start] === constants.Char.COMMENT) return true;
-        }
+      for (let i = 0; i < this.props.length; ++i) {
+        if (src[this.props[i].start] !== Char.COMMENT) return true;
       }
-
-      return false;
     }
 
-    get hasProps() {
-      if (this.context) {
-        const {
-          src
-        } = this.context;
-
-        for (let i = 0; i < this.props.length; ++i) {
-          if (src[this.props[i].start] !== constants.Char.COMMENT) return true;
-        }
-      }
+    return false;
+  }
 
-      return false;
-    }
-
-    get includesTrailingLines() {
-      return false;
-    }
+  get includesTrailingLines() {
+    return false;
+  }
 
-    get jsonLike() {
-      const jsonLikeTypes = [constants.Type.FLOW_MAP, constants.Type.FLOW_SEQ, constants.Type.QUOTE_DOUBLE, constants.Type.QUOTE_SINGLE];
-      return jsonLikeTypes.indexOf(this.type) !== -1;
-    }
+  get jsonLike() {
+    const jsonLikeTypes = [Type.FLOW_MAP, Type.FLOW_SEQ, Type.QUOTE_DOUBLE, Type.QUOTE_SINGLE];
+    return jsonLikeTypes.indexOf(this.type) !== -1;
+  }
 
-    get rangeAsLinePos() {
-      if (!this.range || !this.context) return undefined;
-      const start = (0, sourceUtils.getLinePos)(this.range.start, this.context.root);
-      if (!start) return undefined;
-      const end = (0, sourceUtils.getLinePos)(this.range.end, this.context.root);
-      return {
-        start,
-        end
-      };
-    }
+  get rangeAsLinePos() {
+    if (!this.range || !this.context) return undefined;
+    const start = getLinePos(this.range.start, this.context.root);
+    if (!start) return undefined;
+    const end = getLinePos(this.range.end, this.context.root);
+    return {
+      start,
+      end
+    };
+  }
 
-    get rawValue() {
-      if (!this.valueRange || !this.context) return null;
-      const {
-        start,
-        end
-      } = this.valueRange;
-      return this.context.src.slice(start, end);
-    }
+  get rawValue() {
+    if (!this.valueRange || !this.context) return null;
+    const {
+      start,
+      end
+    } = this.valueRange;
+    return this.context.src.slice(start, end);
+  }
 
-    get tag() {
-      for (let i = 0; i < this.props.length; ++i) {
-        const tag = this.getPropValue(i, constants.Char.TAG, false);
+  get tag() {
+    for (let i = 0; i < this.props.length; ++i) {
+      const tag = this.getPropValue(i, Char.TAG, false);
 
-        if (tag != null) {
-          if (tag[1] === '<') {
-            return {
-              verbatim: tag.slice(2, -1)
-            };
-          } else {
-            // eslint-disable-next-line no-unused-vars
-            const [_, handle, suffix] = tag.match(/^(.*!)([^!]*)$/);
-            return {
-              handle,
-              suffix
-            };
-          }
+      if (tag != null) {
+        if (tag[1] === '<') {
+          return {
+            verbatim: tag.slice(2, -1)
+          };
+        } else {
+          // eslint-disable-next-line no-unused-vars
+          const [_, handle, suffix] = tag.match(/^(.*!)([^!]*)$/);
+          return {
+            handle,
+            suffix
+          };
         }
       }
-
-      return null;
-    }
-
-    get valueRangeContainsNewline() {
-      if (!this.valueRange || !this.context) return false;
-      const {
-        start,
-        end
-      } = this.valueRange;
-      const {
-        src
-      } = this.context;
-
-      for (let i = start; i < end; ++i) {
-        if (src[i] === '\n') return true;
-      }
-
-      return false;
     }
 
-    parseComment(start) {
-      const {
-        src
-      } = this.context;
+    return null;
+  }
 
-      if (src[start] === constants.Char.COMMENT) {
-        const end = Node.endOfLine(src, start + 1);
-        const commentRange = new _Range.default(start, end);
-        this.props.push(commentRange);
-        return end;
-      }
+  get valueRangeContainsNewline() {
+    if (!this.valueRange || !this.context) return false;
+    const {
+      start,
+      end
+    } = this.valueRange;
+    const {
+      src
+    } = this.context;
 
-      return start;
+    for (let i = start; i < end; ++i) {
+      if (src[i] === '\n') return true;
     }
-    /**
-     * Populates the `origStart` and `origEnd` values of all ranges for this
-     * node. Extended by child classes to handle descendant nodes.
-     *
-     * @param {number[]} cr - Positions of dropped CR characters
-     * @param {number} offset - Starting index of `cr` from the last call
-     * @returns {number} - The next offset, matching the one found for `origStart`
-     */
 
+    return false;
+  }
 
-    setOrigRanges(cr, offset) {
-      if (this.range) offset = this.range.setOrigRange(cr, offset);
-      if (this.valueRange) this.valueRange.setOrigRange(cr, offset);
-      this.props.forEach(prop => prop.setOrigRange(cr, offset));
-      return offset;
-    }
+  parseComment(start) {
+    const {
+      src
+    } = this.context;
 
-    toString() {
-      const {
-        context: {
-          src
-        },
-        range,
-        value
-      } = this;
-      if (value != null) return value;
-      const str = src.slice(range.start, range.end);
-      return Node.addStringTerminator(src, range.end, str);
+    if (src[start] === Char.COMMENT) {
+      const end = Node$1.endOfLine(src, start + 1);
+      const commentRange = new Range(start, end);
+      this.props.push(commentRange);
+      return end;
     }
 
+    return start;
   }
+  /**
+   * Populates the `origStart` and `origEnd` values of all ranges for this
+   * node. Extended by child classes to handle descendant nodes.
+   *
+   * @param {number[]} cr - Positions of dropped CR characters
+   * @param {number} offset - Starting index of `cr` from the last call
+   * @returns {number} - The next offset, matching the one found for `origStart`
+   */
 
-  exports.default = Node;
-});
-unwrapExports(Node_1);
-
-var errors = createCommonjsModule(function (module, exports) {
-
-  Object.defineProperty(exports, "__esModule", {
-    value: true
-  });
-  exports.YAMLWarning = exports.YAMLSyntaxError = exports.YAMLSemanticError = exports.YAMLReferenceError = exports.YAMLError = void 0;
-
-  var _Node = _interopRequireDefault(Node_1);
 
-  var _Range = _interopRequireDefault(Range_1);
+  setOrigRanges(cr, offset) {
+    if (this.range) offset = this.range.setOrigRange(cr, offset);
+    if (this.valueRange) this.valueRange.setOrigRange(cr, offset);
+    this.props.forEach(prop => prop.setOrigRange(cr, offset));
+    return offset;
+  }
 
-  function _interopRequireDefault(obj) {
-    return obj && obj.__esModule ? obj : {
-      default: obj
-    };
+  toString() {
+    const {
+      context: {
+        src
+      },
+      range,
+      value
+    } = this;
+    if (value != null) return value;
+    const str = src.slice(range.start, range.end);
+    return Node$1.addStringTerminator(src, range.end, str);
   }
 
-  class YAMLError extends Error {
-    constructor(name, source, message) {
-      if (!message || !(source instanceof _Node.default)) throw new Error(`Invalid arguments for new ${name}`);
-      super();
-      this.name = name;
-      this.message = message;
-      this.source = source;
-    }
+}
 
-    makePretty() {
-      if (!this.source) return;
-      this.nodeType = this.source.type;
-      const cst = this.source.context && this.source.context.root;
+class YAMLError extends Error {
+  constructor(name, source, message) {
+    if (!message || !(source instanceof Node$1)) throw new Error(`Invalid arguments for new ${name}`);
+    super();
+    this.name = name;
+    this.message = message;
+    this.source = source;
+  }
 
-      if (typeof this.offset === 'number') {
-        this.range = new _Range.default(this.offset, this.offset + 1);
-        const start = cst && (0, sourceUtils.getLinePos)(this.offset, cst);
+  makePretty() {
+    if (!this.source) return;
+    this.nodeType = this.source.type;
+    const cst = this.source.context && this.source.context.root;
 
-        if (start) {
-          const end = {
-            line: start.line,
-            col: start.col + 1
-          };
-          this.linePos = {
-            start,
-            end
-          };
-        }
+    if (typeof this.offset === 'number') {
+      this.range = new Range(this.offset, this.offset + 1);
+      const start = cst && getLinePos(this.offset, cst);
 
-        delete this.offset;
-      } else {
-        this.range = this.source.range;
-        this.linePos = this.source.rangeAsLinePos;
+      if (start) {
+        const end = {
+          line: start.line,
+          col: start.col + 1
+        };
+        this.linePos = {
+          start,
+          end
+        };
       }
 
-      if (this.linePos) {
-        const {
-          line,
-          col
-        } = this.linePos.start;
-        this.message += ` at line ${line}, column ${col}`;
-        const ctx = cst && (0, sourceUtils.getPrettyContext)(this.linePos, cst);
-        if (ctx) this.message += `:\n\n${ctx}\n`;
-      }
+      delete this.offset;
+    } else {
+      this.range = this.source.range;
+      this.linePos = this.source.rangeAsLinePos;
+    }
 
-      delete this.source;
+    if (this.linePos) {
+      const {
+        line,
+        col
+      } = this.linePos.start;
+      this.message += ` at line ${line}, column ${col}`;
+      const ctx = cst && getPrettyContext(this.linePos, cst);
+      if (ctx) this.message += `:\n\n${ctx}\n`;
     }
 
+    delete this.source;
   }
 
-  exports.YAMLError = YAMLError;
-
-  class YAMLReferenceError extends YAMLError {
-    constructor(source, message) {
-      super('YAMLReferenceError', source, message);
-    }
+}
 
+class YAMLReferenceError extends YAMLError {
+  constructor(source, message) {
+    super('YAMLReferenceError', source, message);
   }
 
-  exports.YAMLReferenceError = YAMLReferenceError;
+}
 
-  class YAMLSemanticError extends YAMLError {
-    constructor(source, message) {
-      super('YAMLSemanticError', source, message);
-    }
+class YAMLSemanticError extends YAMLError {
+  constructor(source, message) {
+    super('YAMLSemanticError', source, message);
+  }
 
+}
+
+class YAMLSyntaxError extends YAMLError {
+  constructor(source, message) {
+    super('YAMLSyntaxError', source, message);
   }
 
-  exports.YAMLSemanticError = YAMLSemanticError;
+}
 
-  class YAMLSyntaxError extends YAMLError {
-    constructor(source, message) {
-      super('YAMLSyntaxError', source, message);
-    }
+class YAMLWarning extends YAMLError {
+  constructor(source, message) {
+    super('YAMLWarning', source, message);
+  }
+
+}
 
+function _defineProperty(obj, key, value) {
+  if (key in obj) {
+    Object.defineProperty(obj, key, {
+      value: value,
+      enumerable: true,
+      configurable: true,
+      writable: true
+    });
+  } else {
+    obj[key] = value;
   }
 
-  exports.YAMLSyntaxError = YAMLSyntaxError;
+  return obj;
+}
+
+class PlainValue$6 extends Node$1 {
+  static endOfLine(src, start, inFlow) {
+    let ch = src[start];
+    let offset = start;
 
-  class YAMLWarning extends YAMLError {
-    constructor(source, message) {
-      super('YAMLWarning', source, message);
+    while (ch && ch !== '\n') {
+      if (inFlow && (ch === '[' || ch === ']' || ch === '{' || ch === '}' || ch === ',')) break;
+      const next = src[offset + 1];
+      if (ch === ':' && (!next || next === '\n' || next === '\t' || next === ' ' || inFlow && next === ',')) break;
+      if ((ch === ' ' || ch === '\t') && next === '#') break;
+      offset += 1;
+      ch = next;
     }
 
+    return offset;
   }
 
-  exports.YAMLWarning = YAMLWarning;
-});
-unwrapExports(errors);
-var errors_1 = errors.YAMLWarning;
-var errors_2 = errors.YAMLSyntaxError;
-var errors_3 = errors.YAMLSemanticError;
-var errors_4 = errors.YAMLReferenceError;
-var errors_5 = errors.YAMLError;
-
-var BlankLine_1 = createCommonjsModule(function (module, exports) {
+  get strValue() {
+    if (!this.valueRange || !this.context) return null;
+    let {
+      start,
+      end
+    } = this.valueRange;
+    const {
+      src
+    } = this.context;
+    let ch = src[end - 1];
 
-  Object.defineProperty(exports, "__esModule", {
-    value: true
-  });
-  exports.default = void 0;
+    while (start < end && (ch === '\n' || ch === '\t' || ch === ' ')) ch = src[--end - 1];
 
-  var _Node = _interopRequireDefault(Node_1);
+    let str = '';
 
-  var _Range = _interopRequireDefault(Range_1);
+    for (let i = start; i < end; ++i) {
+      const ch = src[i];
 
-  function _interopRequireDefault(obj) {
-    return obj && obj.__esModule ? obj : {
-      default: obj
-    };
-  }
+      if (ch === '\n') {
+        const {
+          fold,
+          offset
+        } = Node$1.foldNewline(src, i, -1);
+        str += fold;
+        i = offset;
+      } else if (ch === ' ' || ch === '\t') {
+        // trim trailing whitespace
+        const wsStart = i;
+        let next = src[i + 1];
+
+        while (i < end && (next === ' ' || next === '\t')) {
+          i += 1;
+          next = src[i + 1];
+        }
 
-  class BlankLine extends _Node.default {
-    constructor() {
-      super(constants.Type.BLANK_LINE);
+        if (next !== '\n') str += i > wsStart ? src.slice(wsStart, i + 1) : ch;
+      } else {
+        str += ch;
+      }
     }
-    /* istanbul ignore next */
 
+    const ch0 = src[start];
 
-    get includesTrailingLines() {
-      // This is never called from anywhere, but if it were,
-      // this is the value it should return.
-      return true;
-    }
-    /**
-     * Parses blank lines from the source
-     *
-     * @param {ParseContext} context
-     * @param {number} start - Index of first \n character
-     * @returns {number} - Index of the character after this
-     */
+    switch (ch0) {
+      case '\t':
+        {
+          const msg = 'Plain value cannot start with a tab character';
+          const errors = [new YAMLSemanticError(this, msg)];
+          return {
+            errors,
+            str
+          };
+        }
+
+      case '@':
+      case '`':
+        {
+          const msg = `Plain value cannot start with reserved character ${ch0}`;
+          const errors = [new YAMLSemanticError(this, msg)];
+          return {
+            errors,
+            str
+          };
+        }
 
+      default:
+        return str;
+    }
+  }
 
-    parse(context, start) {
-      this.context = context;
-      const {
-        src
-      } = context;
-      let offset = start + 1;
+  parseBlockValue(start) {
+    const {
+      indent,
+      inFlow,
+      src
+    } = this.context;
+    let offset = start;
+    let valueEnd = start;
 
-      while (_Node.default.atBlank(src, offset)) {
-        const lineEnd = _Node.default.endOfWhiteSpace(src, offset);
+    for (let ch = src[offset]; ch === '\n'; ch = src[offset]) {
+      if (Node$1.atDocumentBoundary(src, offset + 1)) break;
+      const end = Node$1.endOfBlockIndent(src, indent, offset + 1);
+      if (end === null || src[end] === '#') break;
 
-        if (lineEnd === '\n') offset = lineEnd + 1;else break;
+      if (src[end] === '\n') {
+        offset = end;
+      } else {
+        valueEnd = PlainValue$6.endOfLine(src, end, inFlow);
+        offset = valueEnd;
       }
-
-      this.range = new _Range.default(start, offset);
-      return offset;
     }
 
+    if (this.valueRange.isEmpty()) this.valueRange.start = start;
+    this.valueRange.end = valueEnd;
+    return valueEnd;
   }
+  /**
+   * Parses a plain value from the source
+   *
+   * Accepted forms are:
+   * ```
+   * #comment
+   *
+   * first line
+   *
+   * first line #comment
+   *
+   * first line
+   * block
+   * lines
+   *
+   * #comment
+   * block
+   * lines
+   * ```
+   * where block lines are empty or have an indent level greater than `indent`.
+   *
+   * @param {ParseContext} context
+   * @param {number} start - Index of first character
+   * @returns {number} - Index of the character after this scalar, may be `\n`
+   */
 
-  exports.default = BlankLine;
-});
-unwrapExports(BlankLine_1);
-
-var CollectionItem_1 = createCommonjsModule(function (module, exports) {
 
-  Object.defineProperty(exports, "__esModule", {
-    value: true
-  });
-  exports.default = void 0;
+  parse(context, start) {
+    this.context = context;
+    const {
+      inFlow,
+      src
+    } = context;
+    let offset = start;
+    const ch = src[offset];
 
-  var _BlankLine = _interopRequireDefault(BlankLine_1);
+    if (ch && ch !== '#' && ch !== '\n') {
+      offset = PlainValue$6.endOfLine(src, start, inFlow);
+    }
 
-  var _Node = _interopRequireDefault(Node_1);
+    this.valueRange = new Range(start, offset);
+    offset = Node$1.endOfWhiteSpace(src, offset);
+    offset = this.parseComment(offset);
 
-  var _Range = _interopRequireDefault(Range_1);
+    if (!this.hasComment || this.valueRange.isEmpty()) {
+      offset = this.parseBlockValue(offset);
+    }
 
-  function _interopRequireDefault(obj) {
-    return obj && obj.__esModule ? obj : {
-      default: obj
-    };
+    return offset;
   }
 
-  class CollectionItem extends _Node.default {
-    constructor(type, props) {
-      super(type, props);
-      this.node = null;
-    }
+}
 
-    get includesTrailingLines() {
-      return !!this.node && this.node.includesTrailingLines;
-    }
-    /**
-     * @param {ParseContext} context
-     * @param {number} start - Index of first character
-     * @returns {number} - Index of the character after this
-     */
+PlainValueEc8e588e.Char = Char;
+PlainValueEc8e588e.Node = Node$1;
+PlainValueEc8e588e.PlainValue = PlainValue$6;
+PlainValueEc8e588e.Range = Range;
+PlainValueEc8e588e.Type = Type;
+PlainValueEc8e588e.YAMLError = YAMLError;
+PlainValueEc8e588e.YAMLReferenceError = YAMLReferenceError;
+PlainValueEc8e588e.YAMLSemanticError = YAMLSemanticError;
+PlainValueEc8e588e.YAMLSyntaxError = YAMLSyntaxError;
+PlainValueEc8e588e.YAMLWarning = YAMLWarning;
 
+PlainValueEc8e588e._defineProperty = _defineProperty;
 
-    parse(context, start) {
-      this.context = context;
-      const {
-        parseNode,
-        src
-      } = context;
-      let {
-        atLineStart,
-        lineStart
-      } = context;
-      if (!atLineStart && this.type === constants.Type.SEQ_ITEM) this.error = new errors.YAMLSemanticError(this, 'Sequence items must not have preceding content on the same line');
-      const indent = atLineStart ? start - lineStart : context.indent;
+PlainValueEc8e588e.defaultTagPrefix = defaultTagPrefix;
+PlainValueEc8e588e.defaultTags = defaultTags;
 
-      let offset = _Node.default.endOfWhiteSpace(src, start + 1);
+var PlainValue$5 = PlainValueEc8e588e;
 
-      let ch = src[offset];
-      const inlineComment = ch === '#';
-      const comments = [];
-      let blankLine = null;
+class BlankLine extends PlainValue$5.Node {
+  constructor() {
+    super(PlainValue$5.Type.BLANK_LINE);
+  }
+  /* istanbul ignore next */
 
-      while (ch === '\n' || ch === '#') {
-        if (ch === '#') {
-          const end = _Node.default.endOfLine(src, offset + 1);
 
-          comments.push(new _Range.default(offset, end));
-          offset = end;
-        } else {
-          atLineStart = true;
-          lineStart = offset + 1;
+  get includesTrailingLines() {
+    // This is never called from anywhere, but if it were,
+    // this is the value it should return.
+    return true;
+  }
+  /**
+   * Parses a blank line from the source
+   *
+   * @param {ParseContext} context
+   * @param {number} start - Index of first \n character
+   * @returns {number} - Index of the character after this
+   */
 
-          const wsEnd = _Node.default.endOfWhiteSpace(src, lineStart);
 
-          if (src[wsEnd] === '\n' && comments.length === 0) {
-            blankLine = new _BlankLine.default();
-            lineStart = blankLine.parse({
-              src
-            }, lineStart);
-          }
+  parse(context, start) {
+    this.context = context;
+    this.range = new PlainValue$5.Range(start, start + 1);
+    return start + 1;
+  }
 
-          offset = _Node.default.endOfIndent(src, lineStart);
-        }
+}
 
-        ch = src[offset];
-      }
+class CollectionItem extends PlainValue$5.Node {
+  constructor(type, props) {
+    super(type, props);
+    this.node = null;
+  }
 
-      if (_Node.default.nextNodeIsIndented(ch, offset - (lineStart + indent), this.type !== constants.Type.SEQ_ITEM)) {
-        this.node = parseNode({
-          atLineStart,
-          inCollection: false,
-          indent,
-          lineStart,
-          parent: this
-        }, offset);
-      } else if (ch && lineStart > start + 1) {
-        offset = lineStart - 1;
-      }
+  get includesTrailingLines() {
+    return !!this.node && this.node.includesTrailingLines;
+  }
+  /**
+   * @param {ParseContext} context
+   * @param {number} start - Index of first character
+   * @returns {number} - Index of the character after this
+   */
 
-      if (this.node) {
-        if (blankLine) {
-          // Only blank lines preceding non-empty nodes are captured. Note that
-          // this means that collection item range start indices do not always
-          // increase monotonically. -- eemeli/yaml#126
-          const items = context.parent.items || context.parent.contents;
-          if (items) items.push(blankLine);
-        }
 
-        if (comments.length) Array.prototype.push.apply(this.props, comments);
-        offset = this.node.range.end;
+  parse(context, start) {
+    this.context = context;
+    const {
+      parseNode,
+      src
+    } = context;
+    let {
+      atLineStart,
+      lineStart
+    } = context;
+    if (!atLineStart && this.type === PlainValue$5.Type.SEQ_ITEM) this.error = new PlainValue$5.YAMLSemanticError(this, 'Sequence items must not have preceding content on the same line');
+    const indent = atLineStart ? start - lineStart : context.indent;
+    let offset = PlainValue$5.Node.endOfWhiteSpace(src, start + 1);
+    let ch = src[offset];
+    const inlineComment = ch === '#';
+    const comments = [];
+    let blankLine = null;
+
+    while (ch === '\n' || ch === '#') {
+      if (ch === '#') {
+        const end = PlainValue$5.Node.endOfLine(src, offset + 1);
+        comments.push(new PlainValue$5.Range(offset, end));
+        offset = end;
       } else {
-        if (inlineComment) {
-          const c = comments[0];
-          this.props.push(c);
-          offset = c.end;
-        } else {
-          offset = _Node.default.endOfLine(src, start + 1);
+        atLineStart = true;
+        lineStart = offset + 1;
+        const wsEnd = PlainValue$5.Node.endOfWhiteSpace(src, lineStart);
+
+        if (src[wsEnd] === '\n' && comments.length === 0) {
+          blankLine = new BlankLine();
+          lineStart = blankLine.parse({
+            src
+          }, lineStart);
         }
+
+        offset = PlainValue$5.Node.endOfIndent(src, lineStart);
       }
 
-      const end = this.node ? this.node.valueRange.end : offset;
-      this.valueRange = new _Range.default(start, end);
-      return offset;
+      ch = src[offset];
     }
 
-    setOrigRanges(cr, offset) {
-      offset = super.setOrigRanges(cr, offset);
-      return this.node ? this.node.setOrigRanges(cr, offset) : offset;
+    if (PlainValue$5.Node.nextNodeIsIndented(ch, offset - (lineStart + indent), this.type !== PlainValue$5.Type.SEQ_ITEM)) {
+      this.node = parseNode({
+        atLineStart,
+        inCollection: false,
+        indent,
+        lineStart,
+        parent: this
+      }, offset);
+    } else if (ch && lineStart > start + 1) {
+      offset = lineStart - 1;
     }
 
-    toString() {
-      const {
-        context: {
-          src
-        },
-        node,
-        range,
-        value
-      } = this;
-      if (value != null) return value;
-      const str = node ? src.slice(range.start, node.range.start) + String(node) : src.slice(range.start, range.end);
-      return _Node.default.addStringTerminator(src, range.end, str);
+    if (this.node) {
+      if (blankLine) {
+        // Only blank lines preceding non-empty nodes are captured. Note that
+        // this means that collection item range start indices do not always
+        // increase monotonically. -- eemeli/yaml#126
+        const items = context.parent.items || context.parent.contents;
+        if (items) items.push(blankLine);
+      }
+
+      if (comments.length) Array.prototype.push.apply(this.props, comments);
+      offset = this.node.range.end;
+    } else {
+      if (inlineComment) {
+        const c = comments[0];
+        this.props.push(c);
+        offset = c.end;
+      } else {
+        offset = PlainValue$5.Node.endOfLine(src, start + 1);
+      }
     }
 
+    const end = this.node ? this.node.valueRange.end : offset;
+    this.valueRange = new PlainValue$5.Range(start, end);
+    return offset;
   }
 
-  exports.default = CollectionItem;
-});
-unwrapExports(CollectionItem_1);
+  setOrigRanges(cr, offset) {
+    offset = super.setOrigRanges(cr, offset);
+    return this.node ? this.node.setOrigRanges(cr, offset) : offset;
+  }
 
-var Comment_1 = createCommonjsModule(function (module, exports) {
+  toString() {
+    const {
+      context: {
+        src
+      },
+      node,
+      range,
+      value
+    } = this;
+    if (value != null) return value;
+    const str = node ? src.slice(range.start, node.range.start) + String(node) : src.slice(range.start, range.end);
+    return PlainValue$5.Node.addStringTerminator(src, range.end, str);
+  }
 
-  Object.defineProperty(exports, "__esModule", {
-    value: true
-  });
-  exports.default = void 0;
+}
 
-  var _Node = _interopRequireDefault(Node_1);
+class Comment extends PlainValue$5.Node {
+  constructor() {
+    super(PlainValue$5.Type.COMMENT);
+  }
+  /**
+   * Parses a comment line from the source
+   *
+   * @param {ParseContext} context
+   * @param {number} start - Index of first character
+   * @returns {number} - Index of the character after this scalar
+   */
 
-  var _Range = _interopRequireDefault(Range_1);
 
-  function _interopRequireDefault(obj) {
-    return obj && obj.__esModule ? obj : {
-      default: obj
-    };
+  parse(context, start) {
+    this.context = context;
+    const offset = this.parseComment(start);
+    this.range = new PlainValue$5.Range(start, offset);
+    return offset;
   }
 
-  class Comment extends _Node.default {
-    constructor() {
-      super(constants.Type.COMMENT);
-    }
-    /**
-     * Parses a comment line from the source
-     *
-     * @param {ParseContext} context
-     * @param {number} start - Index of first character
-     * @returns {number} - Index of the character after this scalar
-     */
+}
 
+function grabCollectionEndComments(node) {
+  let cnode = node;
 
-    parse(context, start) {
-      this.context = context;
-      const offset = this.parseComment(start);
-      this.range = new _Range.default(start, offset);
-      return offset;
-    }
+  while (cnode instanceof CollectionItem) cnode = cnode.node;
 
-  }
+  if (!(cnode instanceof Collection$1)) return null;
+  const len = cnode.items.length;
+  let ci = -1;
 
-  exports.default = Comment;
-});
-unwrapExports(Comment_1);
+  for (let i = len - 1; i >= 0; --i) {
+    const n = cnode.items[i];
 
-var Collection_1 = createCommonjsModule(function (module, exports) {
+    if (n.type === PlainValue$5.Type.COMMENT) {
+      // Keep sufficiently indented comments with preceding node
+      const {
+        indent,
+        lineStart
+      } = n.context;
+      if (indent > 0 && n.range.start >= lineStart + indent) break;
+      ci = i;
+    } else if (n.type === PlainValue$5.Type.BLANK_LINE) ci = i;else break;
+  }
 
-  Object.defineProperty(exports, "__esModule", {
-    value: true
-  });
-  exports.grabCollectionEndComments = grabCollectionEndComments;
-  exports.default = void 0;
+  if (ci === -1) return null;
+  const ca = cnode.items.splice(ci, len - ci);
+  const prevEnd = ca[0].range.start;
 
-  var _BlankLine = _interopRequireDefault(BlankLine_1);
-
-  var _CollectionItem = _interopRequireDefault(CollectionItem_1);
-
-  var _Comment = _interopRequireDefault(Comment_1);
-
-  var _Node = _interopRequireDefault(Node_1);
-
-  var _Range = _interopRequireDefault(Range_1);
-
-  function _interopRequireDefault(obj) {
-    return obj && obj.__esModule ? obj : {
-      default: obj
-    };
+  while (true) {
+    cnode.range.end = prevEnd;
+    if (cnode.valueRange && cnode.valueRange.end > prevEnd) cnode.valueRange.end = prevEnd;
+    if (cnode === node) break;
+    cnode = cnode.context.parent;
   }
 
-  function grabCollectionEndComments(node) {
-    let cnode = node;
-
-    while (cnode instanceof _CollectionItem.default) cnode = cnode.node;
-
-    if (!(cnode instanceof Collection)) return null;
-    const len = cnode.items.length;
-    let ci = -1;
-
-    for (let i = len - 1; i >= 0; --i) {
-      const n = cnode.items[i];
-
-      if (n.type === constants.Type.COMMENT) {
-        // Keep sufficiently indented comments with preceding node
-        const {
-          indent,
-          lineStart
-        } = n.context;
-        if (indent > 0 && n.range.start >= lineStart + indent) break;
-        ci = i;
-      } else if (n.type === constants.Type.BLANK_LINE) ci = i;else break;
-    }
-
-    if (ci === -1) return null;
-    const ca = cnode.items.splice(ci, len - ci);
-    const prevEnd = ca[0].range.start;
-
-    while (true) {
-      cnode.range.end = prevEnd;
-      if (cnode.valueRange && cnode.valueRange.end > prevEnd) cnode.valueRange.end = prevEnd;
-      if (cnode === node) break;
-      cnode = cnode.context.parent;
-    }
-
-    return ca;
-  }
+  return ca;
+}
 
-  class Collection extends _Node.default {
-    static nextContentHasIndent(src, offset, indent) {
-      const lineStart = _Node.default.endOfLine(src, offset) + 1;
-      offset = _Node.default.endOfWhiteSpace(src, lineStart);
-      const ch = src[offset];
-      if (!ch) return false;
-      if (offset >= lineStart + indent) return true;
-      if (ch !== '#' && ch !== '\n') return false;
-      return Collection.nextContentHasIndent(src, offset, indent);
-    }
-
-    constructor(firstItem) {
-      super(firstItem.type === constants.Type.SEQ_ITEM ? constants.Type.SEQ : constants.Type.MAP);
-
-      for (let i = firstItem.props.length - 1; i >= 0; --i) {
-        if (firstItem.props[i].start < firstItem.context.lineStart) {
-          // props on previous line are assumed by the collection
-          this.props = firstItem.props.slice(0, i + 1);
-          firstItem.props = firstItem.props.slice(i + 1);
-          const itemRange = firstItem.props[0] || firstItem.valueRange;
-          firstItem.range.start = itemRange.start;
-          break;
-        }
+class Collection$1 extends PlainValue$5.Node {
+  static nextContentHasIndent(src, offset, indent) {
+    const lineStart = PlainValue$5.Node.endOfLine(src, offset) + 1;
+    offset = PlainValue$5.Node.endOfWhiteSpace(src, lineStart);
+    const ch = src[offset];
+    if (!ch) return false;
+    if (offset >= lineStart + indent) return true;
+    if (ch !== '#' && ch !== '\n') return false;
+    return Collection$1.nextContentHasIndent(src, offset, indent);
+  }
+
+  constructor(firstItem) {
+    super(firstItem.type === PlainValue$5.Type.SEQ_ITEM ? PlainValue$5.Type.SEQ : PlainValue$5.Type.MAP);
+
+    for (let i = firstItem.props.length - 1; i >= 0; --i) {
+      if (firstItem.props[i].start < firstItem.context.lineStart) {
+        // props on previous line are assumed by the collection
+        this.props = firstItem.props.slice(0, i + 1);
+        firstItem.props = firstItem.props.slice(i + 1);
+        const itemRange = firstItem.props[0] || firstItem.valueRange;
+        firstItem.range.start = itemRange.start;
+        break;
       }
-
-      this.items = [firstItem];
-      const ec = grabCollectionEndComments(firstItem);
-      if (ec) Array.prototype.push.apply(this.items, ec);
-    }
-
-    get includesTrailingLines() {
-      return this.items.length > 0;
     }
-    /**
-     * @param {ParseContext} context
-     * @param {number} start - Index of first character
-     * @returns {number} - Index of the character after this
-     */
-
-
-    parse(context, start) {
-      this.context = context;
-      const {
-        parseNode,
-        src
-      } = context; // It's easier to recalculate lineStart here rather than tracking down the
-      // last context from which to read it -- eemeli/yaml#2
-
-      let lineStart = _Node.default.startOfLine(src, start);
-
-      const firstItem = this.items[0]; // First-item context needs to be correct for later comment handling
-      // -- eemeli/yaml#17
-
-      firstItem.context.parent = this;
-      this.valueRange = _Range.default.copy(firstItem.valueRange);
-      const indent = firstItem.range.start - firstItem.context.lineStart;
-      let offset = start;
-      offset = _Node.default.normalizeOffset(src, offset);
-      let ch = src[offset];
-      let atLineStart = _Node.default.endOfWhiteSpace(src, lineStart) === offset;
-      let prevIncludesTrailingLines = false;
-
-      while (ch) {
-        while (ch === '\n' || ch === '#') {
-          if (atLineStart && ch === '\n' && !prevIncludesTrailingLines) {
-            const blankLine = new _BlankLine.default();
-            offset = blankLine.parse({
-              src
-            }, offset);
-            this.valueRange.end = offset;
 
-            if (offset >= src.length) {
-              ch = null;
-              break;
-            }
+    this.items = [firstItem];
+    const ec = grabCollectionEndComments(firstItem);
+    if (ec) Array.prototype.push.apply(this.items, ec);
+  }
 
-            this.items.push(blankLine);
-            offset -= 1; // blankLine.parse() consumes terminal newline
-          } else if (ch === '#') {
-            if (offset < lineStart + indent && !Collection.nextContentHasIndent(src, offset, indent)) {
-              return offset;
-            }
+  get includesTrailingLines() {
+    return this.items.length > 0;
+  }
+  /**
+   * @param {ParseContext} context
+   * @param {number} start - Index of first character
+   * @returns {number} - Index of the character after this
+   */
 
-            const comment = new _Comment.default();
-            offset = comment.parse({
-              indent,
-              lineStart,
-              src
-            }, offset);
-            this.items.push(comment);
-            this.valueRange.end = offset;
 
-            if (offset >= src.length) {
-              ch = null;
-              break;
-            }
+  parse(context, start) {
+    this.context = context;
+    const {
+      parseNode,
+      src
+    } = context; // It's easier to recalculate lineStart here rather than tracking down the
+    // last context from which to read it -- eemeli/yaml#2
+
+    let lineStart = PlainValue$5.Node.startOfLine(src, start);
+    const firstItem = this.items[0]; // First-item context needs to be correct for later comment handling
+    // -- eemeli/yaml#17
+
+    firstItem.context.parent = this;
+    this.valueRange = PlainValue$5.Range.copy(firstItem.valueRange);
+    const indent = firstItem.range.start - firstItem.context.lineStart;
+    let offset = start;
+    offset = PlainValue$5.Node.normalizeOffset(src, offset);
+    let ch = src[offset];
+    let atLineStart = PlainValue$5.Node.endOfWhiteSpace(src, lineStart) === offset;
+    let prevIncludesTrailingLines = false;
+
+    while (ch) {
+      while (ch === '\n' || ch === '#') {
+        if (atLineStart && ch === '\n' && !prevIncludesTrailingLines) {
+          const blankLine = new BlankLine();
+          offset = blankLine.parse({
+            src
+          }, offset);
+          this.valueRange.end = offset;
+
+          if (offset >= src.length) {
+            ch = null;
+            break;
           }
 
-          lineStart = offset + 1;
-          offset = _Node.default.endOfIndent(src, lineStart);
-
-          if (_Node.default.atBlank(src, offset)) {
-            const wsEnd = _Node.default.endOfWhiteSpace(src, offset);
-
-            const next = src[wsEnd];
-
-            if (!next || next === '\n' || next === '#') {
-              offset = wsEnd;
-            }
+          this.items.push(blankLine);
+          offset -= 1; // blankLine.parse() consumes terminal newline
+        } else if (ch === '#') {
+          if (offset < lineStart + indent && !Collection$1.nextContentHasIndent(src, offset, indent)) {
+            return offset;
           }
 
-          ch = src[offset];
-          atLineStart = true;
-        }
-
-        if (!ch) {
-          break;
-        }
-
-        if (offset !== lineStart + indent && (atLineStart || ch !== ':')) {
-          if (lineStart > start) offset = lineStart;
-          break;
+          const comment = new Comment();
+          offset = comment.parse({
+            indent,
+            lineStart,
+            src
+          }, offset);
+          this.items.push(comment);
+          this.valueRange.end = offset;
+
+          if (offset >= src.length) {
+            ch = null;
+            break;
+          }
         }
 
-        if (firstItem.type === constants.Type.SEQ_ITEM !== (ch === '-')) {
-          let typeswitch = true;
+        lineStart = offset + 1;
+        offset = PlainValue$5.Node.endOfIndent(src, lineStart);
 
-          if (ch === '-') {
-            // map key may start with -, as long as it's followed by a non-whitespace char
-            const next = src[offset + 1];
-            typeswitch = !next || next === '\n' || next === '\t' || next === ' ';
-          }
+        if (PlainValue$5.Node.atBlank(src, offset)) {
+          const wsEnd = PlainValue$5.Node.endOfWhiteSpace(src, offset);
+          const next = src[wsEnd];
 
-          if (typeswitch) {
-            if (lineStart > start) offset = lineStart;
-            break;
+          if (!next || next === '\n' || next === '#') {
+            offset = wsEnd;
           }
         }
 
-        const node = parseNode({
-          atLineStart,
-          inCollection: true,
-          indent,
-          lineStart,
-          parent: this
-        }, offset);
-        if (!node) return offset; // at next document start
-
-        this.items.push(node);
-        this.valueRange.end = node.valueRange.end;
-        offset = _Node.default.normalizeOffset(src, node.range.end);
         ch = src[offset];
-        atLineStart = false;
-        prevIncludesTrailingLines = node.includesTrailingLines; // Need to reset lineStart and atLineStart here if preceding node's range
-        // has advanced to check the current line's indentation level
-        // -- eemeli/yaml#10 & eemeli/yaml#38
-
-        if (ch) {
-          let ls = offset - 1;
-          let prev = src[ls];
+        atLineStart = true;
+      }
 
-          while (prev === ' ' || prev === '\t') prev = src[--ls];
+      if (!ch) {
+        break;
+      }
 
-          if (prev === '\n') {
-            lineStart = ls + 1;
-            atLineStart = true;
-          }
+      if (offset !== lineStart + indent && (atLineStart || ch !== ':')) {
+        if (offset < lineStart + indent) {
+          if (lineStart > start) offset = lineStart;
+          break;
+        } else if (!this.error) {
+          const msg = 'All collection items must start at the same column';
+          this.error = new PlainValue$5.YAMLSyntaxError(this, msg);
         }
-
-        const ec = grabCollectionEndComments(node);
-        if (ec) Array.prototype.push.apply(this.items, ec);
       }
 
-      return offset;
-    }
+      if (firstItem.type === PlainValue$5.Type.SEQ_ITEM) {
+        if (ch !== '-') {
+          if (lineStart > start) offset = lineStart;
+          break;
+        }
+      } else if (ch === '-' && !this.error) {
+        // map key may start with -, as long as it's followed by a non-whitespace char
+        const next = src[offset + 1];
 
-    setOrigRanges(cr, offset) {
-      offset = super.setOrigRanges(cr, offset);
-      this.items.forEach(node => {
-        offset = node.setOrigRanges(cr, offset);
-      });
-      return offset;
-    }
+        if (!next || next === '\n' || next === '\t' || next === ' ') {
+          const msg = 'A collection cannot be both a mapping and a sequence';
+          this.error = new PlainValue$5.YAMLSyntaxError(this, msg);
+        }
+      }
 
-    toString() {
-      const {
-        context: {
-          src
-        },
-        items,
-        range,
-        value
-      } = this;
-      if (value != null) return value;
-      let str = src.slice(range.start, items[0].range.start) + String(items[0]);
-
-      for (let i = 1; i < items.length; ++i) {
-        const item = items[i];
-        const {
-          atLineStart,
-          indent
-        } = item.context;
-        if (atLineStart) for (let i = 0; i < indent; ++i) str += ' ';
-        str += String(item);
+      const node = parseNode({
+        atLineStart,
+        inCollection: true,
+        indent,
+        lineStart,
+        parent: this
+      }, offset);
+      if (!node) return offset; // at next document start
+
+      this.items.push(node);
+      this.valueRange.end = node.valueRange.end;
+      offset = PlainValue$5.Node.normalizeOffset(src, node.range.end);
+      ch = src[offset];
+      atLineStart = false;
+      prevIncludesTrailingLines = node.includesTrailingLines; // Need to reset lineStart and atLineStart here if preceding node's range
+      // has advanced to check the current line's indentation level
+      // -- eemeli/yaml#10 & eemeli/yaml#38
+
+      if (ch) {
+        let ls = offset - 1;
+        let prev = src[ls];
+
+        while (prev === ' ' || prev === '\t') prev = src[--ls];
+
+        if (prev === '\n') {
+          lineStart = ls + 1;
+          atLineStart = true;
+        }
       }
 
-      return _Node.default.addStringTerminator(src, range.end, str);
+      const ec = grabCollectionEndComments(node);
+      if (ec) Array.prototype.push.apply(this.items, ec);
     }
 
+    return offset;
   }
 
-  exports.default = Collection;
-});
-unwrapExports(Collection_1);
-var Collection_2 = Collection_1.grabCollectionEndComments;
+  setOrigRanges(cr, offset) {
+    offset = super.setOrigRanges(cr, offset);
+    this.items.forEach(node => {
+      offset = node.setOrigRanges(cr, offset);
+    });
+    return offset;
+  }
 
-var Directive_1 = createCommonjsModule(function (module, exports) {
+  toString() {
+    const {
+      context: {
+        src
+      },
+      items,
+      range,
+      value
+    } = this;
+    if (value != null) return value;
+    let str = src.slice(range.start, items[0].range.start) + String(items[0]);
 
-  Object.defineProperty(exports, "__esModule", {
-    value: true
-  });
-  exports.default = void 0;
+    for (let i = 1; i < items.length; ++i) {
+      const item = items[i];
+      const {
+        atLineStart,
+        indent
+      } = item.context;
+      if (atLineStart) for (let i = 0; i < indent; ++i) str += ' ';
+      str += String(item);
+    }
 
-  var _Node = _interopRequireDefault(Node_1);
+    return PlainValue$5.Node.addStringTerminator(src, range.end, str);
+  }
 
-  var _Range = _interopRequireDefault(Range_1);
+}
 
-  function _interopRequireDefault(obj) {
-    return obj && obj.__esModule ? obj : {
-      default: obj
-    };
+class Directive extends PlainValue$5.Node {
+  constructor() {
+    super(PlainValue$5.Type.DIRECTIVE);
+    this.name = null;
   }
 
-  class Directive extends _Node.default {
-    constructor() {
-      super(constants.Type.DIRECTIVE);
-      this.name = null;
-    }
+  get parameters() {
+    const raw = this.rawValue;
+    return raw ? raw.trim().split(/[ \t]+/) : [];
+  }
 
-    get parameters() {
-      const raw = this.rawValue;
-      return raw ? raw.trim().split(/[ \t]+/) : [];
-    }
+  parseName(start) {
+    const {
+      src
+    } = this.context;
+    let offset = start;
+    let ch = src[offset];
 
-    parseName(start) {
-      const {
-        src
-      } = this.context;
-      let offset = start;
-      let ch = src[offset];
+    while (ch && ch !== '\n' && ch !== '\t' && ch !== ' ') ch = src[offset += 1];
 
-      while (ch && ch !== '\n' && ch !== '\t' && ch !== ' ') ch = src[offset += 1];
+    this.name = src.slice(start, offset);
+    return offset;
+  }
 
-      this.name = src.slice(start, offset);
-      return offset;
-    }
+  parseParameters(start) {
+    const {
+      src
+    } = this.context;
+    let offset = start;
+    let ch = src[offset];
 
-    parseParameters(start) {
-      const {
-        src
-      } = this.context;
-      let offset = start;
-      let ch = src[offset];
+    while (ch && ch !== '\n' && ch !== '#') ch = src[offset += 1];
 
-      while (ch && ch !== '\n' && ch !== '#') ch = src[offset += 1];
+    this.valueRange = new PlainValue$5.Range(start, offset);
+    return offset;
+  }
 
-      this.valueRange = new _Range.default(start, offset);
-      return offset;
-    }
+  parse(context, start) {
+    this.context = context;
+    let offset = this.parseName(start + 1);
+    offset = this.parseParameters(offset);
+    offset = this.parseComment(offset);
+    this.range = new PlainValue$5.Range(start, offset);
+    return offset;
+  }
 
-    parse(context, start) {
-      this.context = context;
-      let offset = this.parseName(start + 1);
-      offset = this.parseParameters(offset);
-      offset = this.parseComment(offset);
-      this.range = new _Range.default(start, offset);
-      return offset;
-    }
+}
 
+class Document$3 extends PlainValue$5.Node {
+  static startCommentOrEndBlankLine(src, start) {
+    const offset = PlainValue$5.Node.endOfWhiteSpace(src, start);
+    const ch = src[offset];
+    return ch === '#' || ch === '\n' ? offset : start;
   }
 
-  exports.default = Directive;
-});
-unwrapExports(Directive_1);
-
-var Document_1 = createCommonjsModule(function (module, exports) {
+  constructor() {
+    super(PlainValue$5.Type.DOCUMENT);
+    this.directives = null;
+    this.contents = null;
+    this.directivesEndMarker = null;
+    this.documentEndMarker = null;
+  }
 
-  Object.defineProperty(exports, "__esModule", {
-    value: true
-  });
-  exports.default = void 0;
+  parseDirectives(start) {
+    const {
+      src
+    } = this.context;
+    this.directives = [];
+    let atLineStart = true;
+    let hasDirectives = false;
+    let offset = start;
 
-  var _BlankLine = _interopRequireDefault(BlankLine_1);
+    while (!PlainValue$5.Node.atDocumentBoundary(src, offset, PlainValue$5.Char.DIRECTIVES_END)) {
+      offset = Document$3.startCommentOrEndBlankLine(src, offset);
 
-  var _Comment = _interopRequireDefault(Comment_1);
+      switch (src[offset]) {
+        case '\n':
+          if (atLineStart) {
+            const blankLine = new BlankLine();
+            offset = blankLine.parse({
+              src
+            }, offset);
 
-  var _Directive = _interopRequireDefault(Directive_1);
+            if (offset < src.length) {
+              this.directives.push(blankLine);
+            }
+          } else {
+            offset += 1;
+            atLineStart = true;
+          }
 
-  var _Node = _interopRequireDefault(Node_1);
+          break;
 
-  var _Range = _interopRequireDefault(Range_1);
+        case '#':
+          {
+            const comment = new Comment();
+            offset = comment.parse({
+              src
+            }, offset);
+            this.directives.push(comment);
+            atLineStart = false;
+          }
+          break;
 
-  function _interopRequireDefault(obj) {
-    return obj && obj.__esModule ? obj : {
-      default: obj
-    };
-  }
+        case '%':
+          {
+            const directive = new Directive();
+            offset = directive.parse({
+              parent: this,
+              src
+            }, offset);
+            this.directives.push(directive);
+            hasDirectives = true;
+            atLineStart = false;
+          }
+          break;
 
-  class Document extends _Node.default {
-    static startCommentOrEndBlankLine(src, start) {
-      const offset = _Node.default.endOfWhiteSpace(src, start);
+        default:
+          if (hasDirectives) {
+            this.error = new PlainValue$5.YAMLSemanticError(this, 'Missing directives-end indicator line');
+          } else if (this.directives.length > 0) {
+            this.contents = this.directives;
+            this.directives = [];
+          }
 
-      const ch = src[offset];
-      return ch === '#' || ch === '\n' ? offset : start;
+          return offset;
+      }
     }
 
-    constructor() {
-      super(constants.Type.DOCUMENT);
-      this.directives = null;
-      this.contents = null;
-      this.directivesEndMarker = null;
-      this.documentEndMarker = null;
+    if (src[offset]) {
+      this.directivesEndMarker = new PlainValue$5.Range(offset, offset + 3);
+      return offset + 3;
     }
 
-    parseDirectives(start) {
-      const {
-        src
-      } = this.context;
+    if (hasDirectives) {
+      this.error = new PlainValue$5.YAMLSemanticError(this, 'Missing directives-end indicator line');
+    } else if (this.directives.length > 0) {
+      this.contents = this.directives;
       this.directives = [];
-      let atLineStart = true;
-      let hasDirectives = false;
-      let offset = start;
-
-      while (!_Node.default.atDocumentBoundary(src, offset, constants.Char.DIRECTIVES_END)) {
-        offset = Document.startCommentOrEndBlankLine(src, offset);
+    }
 
-        switch (src[offset]) {
-          case '\n':
-            if (atLineStart) {
-              const blankLine = new _BlankLine.default();
-              offset = blankLine.parse({
-                src
-              }, offset);
+    return offset;
+  }
 
-              if (offset < src.length) {
-                this.directives.push(blankLine);
-              }
-            } else {
-              offset += 1;
-              atLineStart = true;
-            }
+  parseContents(start) {
+    const {
+      parseNode,
+      src
+    } = this.context;
+    if (!this.contents) this.contents = [];
+    let lineStart = start;
 
-            break;
+    while (src[lineStart - 1] === '-') lineStart -= 1;
 
-          case '#':
-            {
-              const comment = new _Comment.default();
-              offset = comment.parse({
-                src
-              }, offset);
-              this.directives.push(comment);
-              atLineStart = false;
-            }
-            break;
+    let offset = PlainValue$5.Node.endOfWhiteSpace(src, start);
+    let atLineStart = lineStart === start;
+    this.valueRange = new PlainValue$5.Range(offset);
 
-          case '%':
-            {
-              const directive = new _Directive.default();
-              offset = directive.parse({
-                parent: this,
-                src
-              }, offset);
-              this.directives.push(directive);
-              hasDirectives = true;
-              atLineStart = false;
-            }
-            break;
+    while (!PlainValue$5.Node.atDocumentBoundary(src, offset, PlainValue$5.Char.DOCUMENT_END)) {
+      switch (src[offset]) {
+        case '\n':
+          if (atLineStart) {
+            const blankLine = new BlankLine();
+            offset = blankLine.parse({
+              src
+            }, offset);
 
-          default:
-            if (hasDirectives) {
-              this.error = new errors.YAMLSemanticError(this, 'Missing directives-end indicator line');
-            } else if (this.directives.length > 0) {
-              this.contents = this.directives;
-              this.directives = [];
+            if (offset < src.length) {
+              this.contents.push(blankLine);
             }
+          } else {
+            offset += 1;
+            atLineStart = true;
+          }
 
-            return offset;
-        }
-      }
+          lineStart = offset;
+          break;
 
-      if (src[offset]) {
-        this.directivesEndMarker = new _Range.default(offset, offset + 3);
-        return offset + 3;
-      }
+        case '#':
+          {
+            const comment = new Comment();
+            offset = comment.parse({
+              src
+            }, offset);
+            this.contents.push(comment);
+            atLineStart = false;
+          }
+          break;
 
-      if (hasDirectives) {
-        this.error = new errors.YAMLSemanticError(this, 'Missing directives-end indicator line');
-      } else if (this.directives.length > 0) {
-        this.contents = this.directives;
-        this.directives = [];
+        default:
+          {
+            const iEnd = PlainValue$5.Node.endOfIndent(src, offset);
+            const context = {
+              atLineStart,
+              indent: -1,
+              inFlow: false,
+              inCollection: false,
+              lineStart,
+              parent: this
+            };
+            const node = parseNode(context, iEnd);
+            if (!node) return this.valueRange.end = iEnd; // at next document start
+
+            this.contents.push(node);
+            offset = node.range.end;
+            atLineStart = false;
+            const ec = grabCollectionEndComments(node);
+            if (ec) Array.prototype.push.apply(this.contents, ec);
+          }
       }
 
-      return offset;
+      offset = Document$3.startCommentOrEndBlankLine(src, offset);
     }
 
-    parseContents(start) {
-      const {
-        parseNode,
-        src
-      } = this.context;
-      if (!this.contents) this.contents = [];
-      let lineStart = start;
-
-      while (src[lineStart - 1] === '-') lineStart -= 1;
+    this.valueRange.end = offset;
 
-      let offset = _Node.default.endOfWhiteSpace(src, start);
+    if (src[offset]) {
+      this.documentEndMarker = new PlainValue$5.Range(offset, offset + 3);
+      offset += 3;
 
-      let atLineStart = lineStart === start;
-      this.valueRange = new _Range.default(offset);
+      if (src[offset]) {
+        offset = PlainValue$5.Node.endOfWhiteSpace(src, offset);
+
+        if (src[offset] === '#') {
+          const comment = new Comment();
+          offset = comment.parse({
+            src
+          }, offset);
+          this.contents.push(comment);
+        }
 
-      while (!_Node.default.atDocumentBoundary(src, offset, constants.Char.DOCUMENT_END)) {
         switch (src[offset]) {
           case '\n':
-            if (atLineStart) {
-              const blankLine = new _BlankLine.default();
-              offset = blankLine.parse({
-                src
-              }, offset);
-
-              if (offset < src.length) {
-                this.contents.push(blankLine);
-              }
-            } else {
-              offset += 1;
-              atLineStart = true;
-            }
-
-            lineStart = offset;
+            offset += 1;
             break;
 
-          case '#':
-            {
-              const comment = new _Comment.default();
-              offset = comment.parse({
-                src
-              }, offset);
-              this.contents.push(comment);
-              atLineStart = false;
-            }
+          case undefined:
             break;
 
           default:
-            {
-              const iEnd = _Node.default.endOfIndent(src, offset);
-
-              const context = {
-                atLineStart,
-                indent: -1,
-                inFlow: false,
-                inCollection: false,
-                lineStart,
-                parent: this
-              };
-              const node = parseNode(context, iEnd);
-              if (!node) return this.valueRange.end = iEnd; // at next document start
-
-              this.contents.push(node);
-              offset = node.range.end;
-              atLineStart = false;
-              const ec = (0, Collection_1.grabCollectionEndComments)(node);
-              if (ec) Array.prototype.push.apply(this.contents, ec);
-            }
+            this.error = new PlainValue$5.YAMLSyntaxError(this, 'Document end marker line cannot have a non-comment suffix');
         }
-
-        offset = Document.startCommentOrEndBlankLine(src, offset);
       }
+    }
 
-      this.valueRange.end = offset;
+    return offset;
+  }
+  /**
+   * @param {ParseContext} context
+   * @param {number} start - Index of first character
+   * @returns {number} - Index of the character after this
+   */
 
-      if (src[offset]) {
-        this.documentEndMarker = new _Range.default(offset, offset + 3);
-        offset += 3;
 
-        if (src[offset]) {
-          offset = _Node.default.endOfWhiteSpace(src, offset);
-
-          if (src[offset] === '#') {
-            const comment = new _Comment.default();
-            offset = comment.parse({
-              src
-            }, offset);
-            this.contents.push(comment);
-          }
-
-          switch (src[offset]) {
-            case '\n':
-              offset += 1;
-              break;
-
-            case undefined:
-              break;
-
-            default:
-              this.error = new errors.YAMLSyntaxError(this, 'Document end marker line cannot have a non-comment suffix');
-          }
-        }
-      }
-
-      return offset;
-    }
-    /**
-     * @param {ParseContext} context
-     * @param {number} start - Index of first character
-     * @returns {number} - Index of the character after this
-     */
-
-
-    parse(context, start) {
-      context.root = this;
-      this.context = context;
-      const {
-        src
-      } = context;
-      let offset = src.charCodeAt(start) === 0xfeff ? start + 1 : start; // skip BOM
-
-      offset = this.parseDirectives(offset);
-      offset = this.parseContents(offset);
-      return offset;
-    }
-
-    setOrigRanges(cr, offset) {
-      offset = super.setOrigRanges(cr, offset);
-      this.directives.forEach(node => {
-        offset = node.setOrigRanges(cr, offset);
-      });
-      if (this.directivesEndMarker) offset = this.directivesEndMarker.setOrigRange(cr, offset);
-      this.contents.forEach(node => {
-        offset = node.setOrigRanges(cr, offset);
-      });
-      if (this.documentEndMarker) offset = this.documentEndMarker.setOrigRange(cr, offset);
-      return offset;
-    }
-
-    toString() {
-      const {
-        contents,
-        directives,
-        value
-      } = this;
-      if (value != null) return value;
-      let str = directives.join('');
-
-      if (contents.length > 0) {
-        if (directives.length > 0 || contents[0].type === constants.Type.COMMENT) str += '---\n';
-        str += contents.join('');
-      }
-
-      if (str[str.length - 1] !== '\n') str += '\n';
-      return str;
-    }
-
-  }
-
-  exports.default = Document;
-});
-unwrapExports(Document_1);
-
-var Alias_1 = createCommonjsModule(function (module, exports) {
-
-  Object.defineProperty(exports, "__esModule", {
-    value: true
-  });
-  exports.default = void 0;
-
-  var _Node = _interopRequireDefault(Node_1);
-
-  var _Range = _interopRequireDefault(Range_1);
-
-  function _interopRequireDefault(obj) {
-    return obj && obj.__esModule ? obj : {
-      default: obj
-    };
-  }
-
-  class Alias extends _Node.default {
-    /**
-     * Parses an *alias from the source
-     *
-     * @param {ParseContext} context
-     * @param {number} start - Index of first character
-     * @returns {number} - Index of the character after this scalar
-     */
-    parse(context, start) {
-      this.context = context;
-      const {
-        src
-      } = context;
-
-      let offset = _Node.default.endOfIdentifier(src, start + 1);
-
-      this.valueRange = new _Range.default(start + 1, offset);
-      offset = _Node.default.endOfWhiteSpace(src, offset);
-      offset = this.parseComment(offset);
-      return offset;
-    }
-
-  }
-
-  exports.default = Alias;
-});
-unwrapExports(Alias_1);
-
-var BlockValue_1 = createCommonjsModule(function (module, exports) {
-
-  Object.defineProperty(exports, "__esModule", {
-    value: true
-  });
-  exports.default = exports.Chomp = void 0;
-
-  var _Node = _interopRequireDefault(Node_1);
-
-  var _Range = _interopRequireDefault(Range_1);
-
-  function _interopRequireDefault(obj) {
-    return obj && obj.__esModule ? obj : {
-      default: obj
-    };
-  }
-
-  const Chomp = {
-    CLIP: 'CLIP',
-    KEEP: 'KEEP',
-    STRIP: 'STRIP'
-  };
-  exports.Chomp = Chomp;
-
-  class BlockValue extends _Node.default {
-    constructor(type, props) {
-      super(type, props);
-      this.blockIndent = null;
-      this.chomping = Chomp.CLIP;
-      this.header = null;
-    }
-
-    get includesTrailingLines() {
-      return this.chomping === Chomp.KEEP;
-    }
-
-    get strValue() {
-      if (!this.valueRange || !this.context) return null;
-      let {
-        start,
-        end
-      } = this.valueRange;
-      const {
-        indent,
-        src
-      } = this.context;
-      if (this.valueRange.isEmpty()) return '';
-      let lastNewLine = null;
-      let ch = src[end - 1];
-
-      while (ch === '\n' || ch === '\t' || ch === ' ') {
-        end -= 1;
-
-        if (end <= start) {
-          if (this.chomping === Chomp.KEEP) break;else return ''; // probably never happens
-        }
-
-        if (ch === '\n') lastNewLine = end;
-        ch = src[end - 1];
-      }
-
-      let keepStart = end + 1;
-
-      if (lastNewLine) {
-        if (this.chomping === Chomp.KEEP) {
-          keepStart = lastNewLine;
-          end = this.valueRange.end;
-        } else {
-          end = lastNewLine;
-        }
-      }
-
-      const bi = indent + this.blockIndent;
-      const folded = this.type === constants.Type.BLOCK_FOLDED;
-      let atStart = true;
-      let str = '';
-      let sep = '';
-      let prevMoreIndented = false;
-
-      for (let i = start; i < end; ++i) {
-        for (let j = 0; j < bi; ++j) {
-          if (src[i] !== ' ') break;
-          i += 1;
-        }
-
-        const ch = src[i];
-
-        if (ch === '\n') {
-          if (sep === '\n') str += '\n';else sep = '\n';
-        } else {
-          const lineEnd = _Node.default.endOfLine(src, i);
-
-          const line = src.slice(i, lineEnd);
-          i = lineEnd;
-
-          if (folded && (ch === ' ' || ch === '\t') && i < keepStart) {
-            if (sep === ' ') sep = '\n';else if (!prevMoreIndented && !atStart && sep === '\n') sep = '\n\n';
-            str += sep + line; //+ ((lineEnd < end && src[lineEnd]) || '')
-
-            sep = lineEnd < end && src[lineEnd] || '';
-            prevMoreIndented = true;
-          } else {
-            str += sep + line;
-            sep = folded && i < keepStart ? ' ' : '\n';
-            prevMoreIndented = false;
-          }
-
-          if (atStart && line !== '') atStart = false;
-        }
-      }
-
-      return this.chomping === Chomp.STRIP ? str : str + '\n';
-    }
-
-    parseBlockHeader(start) {
-      const {
-        src
-      } = this.context;
-      let offset = start + 1;
-      let bi = '';
-
-      while (true) {
-        const ch = src[offset];
-
-        switch (ch) {
-          case '-':
-            this.chomping = Chomp.STRIP;
-            break;
-
-          case '+':
-            this.chomping = Chomp.KEEP;
-            break;
-
-          case '0':
-          case '1':
-          case '2':
-          case '3':
-          case '4':
-          case '5':
-          case '6':
-          case '7':
-          case '8':
-          case '9':
-            bi += ch;
-            break;
-
-          default:
-            this.blockIndent = Number(bi) || null;
-            this.header = new _Range.default(start, offset);
-            return offset;
-        }
-
-        offset += 1;
-      }
-    }
-
-    parseBlockValue(start) {
-      const {
-        indent,
-        src
-      } = this.context;
-      let offset = start;
-      let valueEnd = start;
-      let bi = this.blockIndent ? indent + this.blockIndent - 1 : indent;
-      let minBlockIndent = 1;
-
-      for (let ch = src[offset]; ch === '\n'; ch = src[offset]) {
-        offset += 1;
-        if (_Node.default.atDocumentBoundary(src, offset)) break;
-
-        const end = _Node.default.endOfBlockIndent(src, bi, offset); // should not include tab?
-
-
-        if (end === null) break;
-
-        if (!this.blockIndent) {
-          // no explicit block indent, none yet detected
-          const lineIndent = end - (offset + indent);
-
-          if (src[end] !== '\n') {
-            // first line with non-whitespace content
-            if (lineIndent < minBlockIndent) {
-              offset -= 1;
-              break;
-            }
-
-            this.blockIndent = lineIndent;
-            bi = indent + this.blockIndent - 1;
-          } else if (lineIndent > minBlockIndent) {
-            // empty line with more whitespace
-            minBlockIndent = lineIndent;
-          }
-        }
-
-        if (src[end] === '\n') {
-          offset = end;
-        } else {
-          offset = valueEnd = _Node.default.endOfLine(src, end);
-        }
-      }
-
-      if (this.chomping !== Chomp.KEEP) {
-        offset = src[valueEnd] ? valueEnd + 1 : valueEnd;
-      }
-
-      this.valueRange = new _Range.default(start + 1, offset);
-      return offset;
-    }
-    /**
-     * Parses a block value from the source
-     *
-     * Accepted forms are:
-     * ```
-     * BS
-     * block
-     * lines
-     *
-     * BS #comment
-     * block
-     * lines
-     * ```
-     * where the block style BS matches the regexp `[|>][-+1-9]*` and block lines
-     * are empty or have an indent level greater than `indent`.
-     *
-     * @param {ParseContext} context
-     * @param {number} start - Index of first character
-     * @returns {number} - Index of the character after this block
-     */
-
-
-    parse(context, start) {
-      this.context = context;
-      const {
-        src
-      } = context;
-      let offset = this.parseBlockHeader(start);
-      offset = _Node.default.endOfWhiteSpace(src, offset);
-      offset = this.parseComment(offset);
-      offset = this.parseBlockValue(offset);
-      return offset;
-    }
-
-    setOrigRanges(cr, offset) {
-      offset = super.setOrigRanges(cr, offset);
-      return this.header ? this.header.setOrigRange(cr, offset) : offset;
-    }
-
-  }
-
-  exports.default = BlockValue;
-});
-unwrapExports(BlockValue_1);
-var BlockValue_2 = BlockValue_1.Chomp;
-
-var FlowCollection_1 = createCommonjsModule(function (module, exports) {
-
-  Object.defineProperty(exports, "__esModule", {
-    value: true
-  });
-  exports.default = void 0;
-
-  var _BlankLine = _interopRequireDefault(BlankLine_1);
-
-  var _Comment = _interopRequireDefault(Comment_1);
-
-  var _Node = _interopRequireDefault(Node_1);
-
-  var _Range = _interopRequireDefault(Range_1);
-
-  function _interopRequireDefault(obj) {
-    return obj && obj.__esModule ? obj : {
-      default: obj
-    };
-  }
-
-  class FlowCollection extends _Node.default {
-    constructor(type, props) {
-      super(type, props);
-      this.items = null;
-    }
-
-    prevNodeIsJsonLike(idx = this.items.length) {
-      const node = this.items[idx - 1];
-      return !!node && (node.jsonLike || node.type === constants.Type.COMMENT && this.nodeIsJsonLike(idx - 1));
-    }
-    /**
-     * @param {ParseContext} context
-     * @param {number} start - Index of first character
-     * @returns {number} - Index of the character after this
-     */
-
-
-    parse(context, start) {
-      this.context = context;
-      const {
-        parseNode,
-        src
-      } = context;
-      let {
-        indent,
-        lineStart
-      } = context;
-      let char = src[start]; // { or [
-
-      this.items = [{
-        char,
-        offset: start
-      }];
-
-      let offset = _Node.default.endOfWhiteSpace(src, start + 1);
-
-      char = src[offset];
-
-      while (char && char !== ']' && char !== '}') {
-        switch (char) {
-          case '\n':
-            {
-              lineStart = offset + 1;
-
-              const wsEnd = _Node.default.endOfWhiteSpace(src, lineStart);
-
-              if (src[wsEnd] === '\n') {
-                const blankLine = new _BlankLine.default();
-                lineStart = blankLine.parse({
-                  src
-                }, lineStart);
-                this.items.push(blankLine);
-              }
-
-              offset = _Node.default.endOfIndent(src, lineStart);
-
-              if (offset <= lineStart + indent) {
-                char = src[offset];
-
-                if (offset < lineStart + indent || char !== ']' && char !== '}') {
-                  const msg = 'Insufficient indentation in flow collection';
-                  this.error = new errors.YAMLSemanticError(this, msg);
-                }
-              }
-            }
-            break;
-
-          case ',':
-            {
-              this.items.push({
-                char,
-                offset
-              });
-              offset += 1;
-            }
-            break;
-
-          case '#':
-            {
-              const comment = new _Comment.default();
-              offset = comment.parse({
-                src
-              }, offset);
-              this.items.push(comment);
-            }
-            break;
-
-          case '?':
-          case ':':
-            {
-              const next = src[offset + 1];
-
-              if (next === '\n' || next === '\t' || next === ' ' || next === ',' || // in-flow : after JSON-like key does not need to be followed by whitespace
-              char === ':' && this.prevNodeIsJsonLike()) {
-                this.items.push({
-                  char,
-                  offset
-                });
-                offset += 1;
-                break;
-              }
-            }
-          // fallthrough
-
-          default:
-            {
-              const node = parseNode({
-                atLineStart: false,
-                inCollection: false,
-                inFlow: true,
-                indent: -1,
-                lineStart,
-                parent: this
-              }, offset);
-
-              if (!node) {
-                // at next document start
-                this.valueRange = new _Range.default(start, offset);
-                return offset;
-              }
-
-              this.items.push(node);
-              offset = _Node.default.normalizeOffset(src, node.range.end);
-            }
-        }
-
-        offset = _Node.default.endOfWhiteSpace(src, offset);
-        char = src[offset];
-      }
-
-      this.valueRange = new _Range.default(start, offset + 1);
-
-      if (char) {
-        this.items.push({
-          char,
-          offset
-        });
-        offset = _Node.default.endOfWhiteSpace(src, offset + 1);
-        offset = this.parseComment(offset);
-      }
-
-      return offset;
-    }
-
-    setOrigRanges(cr, offset) {
-      offset = super.setOrigRanges(cr, offset);
-      this.items.forEach(node => {
-        if (node instanceof _Node.default) {
-          offset = node.setOrigRanges(cr, offset);
-        } else if (cr.length === 0) {
-          node.origOffset = node.offset;
-        } else {
-          let i = offset;
-
-          while (i < cr.length) {
-            if (cr[i] > node.offset) break;else ++i;
-          }
-
-          node.origOffset = node.offset + i;
-          offset = i;
-        }
-      });
-      return offset;
-    }
-
-    toString() {
-      const {
-        context: {
-          src
-        },
-        items,
-        range,
-        value
-      } = this;
-      if (value != null) return value;
-      const nodes = items.filter(item => item instanceof _Node.default);
-      let str = '';
-      let prevEnd = range.start;
-      nodes.forEach(node => {
-        const prefix = src.slice(prevEnd, node.range.start);
-        prevEnd = node.range.end;
-        str += prefix + String(node);
-
-        if (str[str.length - 1] === '\n' && src[prevEnd - 1] !== '\n' && src[prevEnd] === '\n') {
-          // Comment range does not include the terminal newline, but its
-          // stringified value does. Without this fix, newlines at comment ends
-          // get duplicated.
-          prevEnd += 1;
-        }
-      });
-      str += src.slice(prevEnd, range.end);
-      return _Node.default.addStringTerminator(src, range.end, str);
-    }
+  parse(context, start) {
+    context.root = this;
+    this.context = context;
+    const {
+      src
+    } = context;
+    let offset = src.charCodeAt(start) === 0xfeff ? start + 1 : start; // skip BOM
 
+    offset = this.parseDirectives(offset);
+    offset = this.parseContents(offset);
+    return offset;
   }
 
-  exports.default = FlowCollection;
-});
-unwrapExports(FlowCollection_1);
-
-var PlainValue_1 = createCommonjsModule(function (module, exports) {
-
-  Object.defineProperty(exports, "__esModule", {
-    value: true
-  });
-  exports.default = void 0;
-
-  var _Node = _interopRequireDefault(Node_1);
-
-  var _Range = _interopRequireDefault(Range_1);
-
-  function _interopRequireDefault(obj) {
-    return obj && obj.__esModule ? obj : {
-      default: obj
-    };
-  }
-
-  class PlainValue extends _Node.default {
-    static endOfLine(src, start, inFlow) {
-      let ch = src[start];
-      let offset = start;
-
-      while (ch && ch !== '\n') {
-        if (inFlow && (ch === '[' || ch === ']' || ch === '{' || ch === '}' || ch === ',')) break;
-        const next = src[offset + 1];
-        if (ch === ':' && (!next || next === '\n' || next === '\t' || next === ' ' || inFlow && next === ',')) break;
-        if ((ch === ' ' || ch === '\t') && next === '#') break;
-        offset += 1;
-        ch = next;
-      }
-
-      return offset;
-    }
-
-    get strValue() {
-      if (!this.valueRange || !this.context) return null;
-      let {
-        start,
-        end
-      } = this.valueRange;
-      const {
-        src
-      } = this.context;
-      let ch = src[end - 1];
-
-      while (start < end && (ch === '\n' || ch === '\t' || ch === ' ')) ch = src[--end - 1];
-
-      ch = src[start];
-
-      while (start < end && (ch === '\n' || ch === '\t' || ch === ' ')) ch = src[++start];
-
-      let str = '';
-
-      for (let i = start; i < end; ++i) {
-        const ch = src[i];
-
-        if (ch === '\n') {
-          const {
-            fold,
-            offset
-          } = _Node.default.foldNewline(src, i, -1);
-
-          str += fold;
-          i = offset;
-        } else if (ch === ' ' || ch === '\t') {
-          // trim trailing whitespace
-          const wsStart = i;
-          let next = src[i + 1];
-
-          while (i < end && (next === ' ' || next === '\t')) {
-            i += 1;
-            next = src[i + 1];
-          }
-
-          if (next !== '\n') str += i > wsStart ? src.slice(wsStart, i + 1) : ch;
-        } else {
-          str += ch;
-        }
-      }
-
-      return str;
-    }
-
-    parseBlockValue(start) {
-      const {
-        indent,
-        inFlow,
-        src
-      } = this.context;
-      let offset = start;
-      let valueEnd = start;
-
-      for (let ch = src[offset]; ch === '\n'; ch = src[offset]) {
-        if (_Node.default.atDocumentBoundary(src, offset + 1)) break;
-
-        const end = _Node.default.endOfBlockIndent(src, indent, offset + 1);
-
-        if (end === null || src[end] === '#') break;
-
-        if (src[end] === '\n') {
-          offset = end;
-        } else {
-          valueEnd = PlainValue.endOfLine(src, end, inFlow);
-          offset = valueEnd;
-        }
-      }
-
-      if (this.valueRange.isEmpty()) this.valueRange.start = start;
-      this.valueRange.end = valueEnd;
-      return valueEnd;
-    }
-    /**
-     * Parses a plain value from the source
-     *
-     * Accepted forms are:
-     * ```
-     * #comment
-     *
-     * first line
-     *
-     * first line #comment
-     *
-     * first line
-     * block
-     * lines
-     *
-     * #comment
-     * block
-     * lines
-     * ```
-     * where block lines are empty or have an indent level greater than `indent`.
-     *
-     * @param {ParseContext} context
-     * @param {number} start - Index of first character
-     * @returns {number} - Index of the character after this scalar, may be `\n`
-     */
-
-
-    parse(context, start) {
-      this.context = context;
-      const {
-        inFlow,
-        src
-      } = context;
-      let offset = start;
-      const ch = src[offset];
-
-      if (ch && ch !== '#' && ch !== '\n') {
-        offset = PlainValue.endOfLine(src, start, inFlow);
-      }
-
-      this.valueRange = new _Range.default(start, offset);
-      offset = _Node.default.endOfWhiteSpace(src, offset);
-      offset = this.parseComment(offset);
-
-      if (!this.hasComment || this.valueRange.isEmpty()) {
-        offset = this.parseBlockValue(offset);
-      }
-
-      return offset;
-    }
-
-  }
-
-  exports.default = PlainValue;
-});
-unwrapExports(PlainValue_1);
-
-var QuoteDouble_1 = createCommonjsModule(function (module, exports) {
-
-  Object.defineProperty(exports, "__esModule", {
-    value: true
-  });
-  exports.default = void 0;
-
-  var _Node = _interopRequireDefault(Node_1);
-
-  var _Range = _interopRequireDefault(Range_1);
-
-  function _interopRequireDefault(obj) {
-    return obj && obj.__esModule ? obj : {
-      default: obj
-    };
+  setOrigRanges(cr, offset) {
+    offset = super.setOrigRanges(cr, offset);
+    this.directives.forEach(node => {
+      offset = node.setOrigRanges(cr, offset);
+    });
+    if (this.directivesEndMarker) offset = this.directivesEndMarker.setOrigRange(cr, offset);
+    this.contents.forEach(node => {
+      offset = node.setOrigRanges(cr, offset);
+    });
+    if (this.documentEndMarker) offset = this.documentEndMarker.setOrigRange(cr, offset);
+    return offset;
   }
 
-  class QuoteDouble extends _Node.default {
-    static endOfQuote(src, offset) {
-      let ch = src[offset];
-
-      while (ch && ch !== '"') {
-        offset += ch === '\\' ? 2 : 1;
-        ch = src[offset];
-      }
+  toString() {
+    const {
+      contents,
+      directives,
+      value
+    } = this;
+    if (value != null) return value;
+    let str = directives.join('');
 
-      return offset + 1;
+    if (contents.length > 0) {
+      if (directives.length > 0 || contents[0].type === PlainValue$5.Type.COMMENT) str += '---\n';
+      str += contents.join('');
     }
-    /**
-     * @returns {string | { str: string, errors: YAMLSyntaxError[] }}
-     */
 
+    if (str[str.length - 1] !== '\n') str += '\n';
+    return str;
+  }
 
-    get strValue() {
-      if (!this.valueRange || !this.context) return null;
-      const errors$1 = [];
-      const {
-        start,
-        end
-      } = this.valueRange;
-      const {
-        indent,
-        src
-      } = this.context;
-      if (src[end - 1] !== '"') errors$1.push(new errors.YAMLSyntaxError(this, 'Missing closing "quote')); // Using String#replace is too painful with escaped newlines preceded by
-      // escaped backslashes; also, this should be faster.
+}
 
-      let str = '';
+class Alias$1 extends PlainValue$5.Node {
+  /**
+   * Parses an *alias from the source
+   *
+   * @param {ParseContext} context
+   * @param {number} start - Index of first character
+   * @returns {number} - Index of the character after this scalar
+   */
+  parse(context, start) {
+    this.context = context;
+    const {
+      src
+    } = context;
+    let offset = PlainValue$5.Node.endOfIdentifier(src, start + 1);
+    this.valueRange = new PlainValue$5.Range(start + 1, offset);
+    offset = PlainValue$5.Node.endOfWhiteSpace(src, offset);
+    offset = this.parseComment(offset);
+    return offset;
+  }
 
-      for (let i = start + 1; i < end - 1; ++i) {
-        const ch = src[i];
+}
 
-        if (ch === '\n') {
-          if (_Node.default.atDocumentBoundary(src, i + 1)) errors$1.push(new errors.YAMLSemanticError(this, 'Document boundary indicators are not allowed within string values'));
+const Chomp = {
+  CLIP: 'CLIP',
+  KEEP: 'KEEP',
+  STRIP: 'STRIP'
+};
 
-          const {
-            fold,
-            offset,
-            error
-          } = _Node.default.foldNewline(src, i, indent);
-
-          str += fold;
-          i = offset;
-          if (error) errors$1.push(new errors.YAMLSemanticError(this, 'Multi-line double-quoted string needs to be sufficiently indented'));
-        } else if (ch === '\\') {
-          i += 1;
+class BlockValue extends PlainValue$5.Node {
+  constructor(type, props) {
+    super(type, props);
+    this.blockIndent = null;
+    this.chomping = Chomp.CLIP;
+    this.header = null;
+  }
 
-          switch (src[i]) {
-            case '0':
-              str += '\0';
-              break;
-            // null character
+  get includesTrailingLines() {
+    return this.chomping === Chomp.KEEP;
+  }
 
-            case 'a':
-              str += '\x07';
-              break;
-            // bell character
+  get strValue() {
+    if (!this.valueRange || !this.context) return null;
+    let {
+      start,
+      end
+    } = this.valueRange;
+    const {
+      indent,
+      src
+    } = this.context;
+    if (this.valueRange.isEmpty()) return '';
+    let lastNewLine = null;
+    let ch = src[end - 1];
 
-            case 'b':
-              str += '\b';
-              break;
-            // backspace
+    while (ch === '\n' || ch === '\t' || ch === ' ') {
+      end -= 1;
 
-            case 'e':
-              str += '\x1b';
-              break;
-            // escape character
+      if (end <= start) {
+        if (this.chomping === Chomp.KEEP) break;else return ''; // probably never happens
+      }
 
-            case 'f':
-              str += '\f';
-              break;
-            // form feed
+      if (ch === '\n') lastNewLine = end;
+      ch = src[end - 1];
+    }
 
-            case 'n':
-              str += '\n';
-              break;
-            // line feed
+    let keepStart = end + 1;
 
-            case 'r':
-              str += '\r';
-              break;
-            // carriage return
+    if (lastNewLine) {
+      if (this.chomping === Chomp.KEEP) {
+        keepStart = lastNewLine;
+        end = this.valueRange.end;
+      } else {
+        end = lastNewLine;
+      }
+    }
 
-            case 't':
-              str += '\t';
-              break;
-            // horizontal tab
+    const bi = indent + this.blockIndent;
+    const folded = this.type === PlainValue$5.Type.BLOCK_FOLDED;
+    let atStart = true;
+    let str = '';
+    let sep = '';
+    let prevMoreIndented = false;
 
-            case 'v':
-              str += '\v';
-              break;
-            // vertical tab
+    for (let i = start; i < end; ++i) {
+      for (let j = 0; j < bi; ++j) {
+        if (src[i] !== ' ') break;
+        i += 1;
+      }
 
-            case 'N':
-              str += '\u0085';
-              break;
-            // Unicode next line
+      const ch = src[i];
 
-            case '_':
-              str += '\u00a0';
-              break;
-            // Unicode non-breaking space
+      if (ch === '\n') {
+        if (sep === '\n') str += '\n';else sep = '\n';
+      } else {
+        const lineEnd = PlainValue$5.Node.endOfLine(src, i);
+        const line = src.slice(i, lineEnd);
+        i = lineEnd;
 
-            case 'L':
-              str += '\u2028';
-              break;
-            // Unicode line separator
+        if (folded && (ch === ' ' || ch === '\t') && i < keepStart) {
+          if (sep === ' ') sep = '\n';else if (!prevMoreIndented && !atStart && sep === '\n') sep = '\n\n';
+          str += sep + line; //+ ((lineEnd < end && src[lineEnd]) || '')
 
-            case 'P':
-              str += '\u2029';
-              break;
-            // Unicode paragraph separator
+          sep = lineEnd < end && src[lineEnd] || '';
+          prevMoreIndented = true;
+        } else {
+          str += sep + line;
+          sep = folded && i < keepStart ? ' ' : '\n';
+          prevMoreIndented = false;
+        }
 
-            case ' ':
-              str += ' ';
-              break;
+        if (atStart && line !== '') atStart = false;
+      }
+    }
 
-            case '"':
-              str += '"';
-              break;
+    return this.chomping === Chomp.STRIP ? str : str + '\n';
+  }
 
-            case '/':
-              str += '/';
-              break;
+  parseBlockHeader(start) {
+    const {
+      src
+    } = this.context;
+    let offset = start + 1;
+    let bi = '';
 
-            case '\\':
-              str += '\\';
-              break;
+    while (true) {
+      const ch = src[offset];
 
-            case '\t':
-              str += '\t';
-              break;
+      switch (ch) {
+        case '-':
+          this.chomping = Chomp.STRIP;
+          break;
 
-            case 'x':
-              str += this.parseCharCode(i + 1, 2, errors$1);
-              i += 2;
-              break;
+        case '+':
+          this.chomping = Chomp.KEEP;
+          break;
 
-            case 'u':
-              str += this.parseCharCode(i + 1, 4, errors$1);
-              i += 4;
-              break;
+        case '0':
+        case '1':
+        case '2':
+        case '3':
+        case '4':
+        case '5':
+        case '6':
+        case '7':
+        case '8':
+        case '9':
+          bi += ch;
+          break;
 
-            case 'U':
-              str += this.parseCharCode(i + 1, 8, errors$1);
-              i += 8;
-              break;
+        default:
+          this.blockIndent = Number(bi) || null;
+          this.header = new PlainValue$5.Range(start, offset);
+          return offset;
+      }
 
-            case '\n':
-              // skip escaped newlines, but still trim the following line
-              while (src[i + 1] === ' ' || src[i + 1] === '\t') i += 1;
+      offset += 1;
+    }
+  }
 
-              break;
+  parseBlockValue(start) {
+    const {
+      indent,
+      src
+    } = this.context;
+    const explicit = !!this.blockIndent;
+    let offset = start;
+    let valueEnd = start;
+    let minBlockIndent = 1;
 
-            default:
-              errors$1.push(new errors.YAMLSyntaxError(this, `Invalid escape sequence ${src.substr(i - 1, 2)}`));
-              str += '\\' + src[i];
-          }
-        } else if (ch === ' ' || ch === '\t') {
-          // trim trailing whitespace
-          const wsStart = i;
-          let next = src[i + 1];
-
-          while (next === ' ' || next === '\t') {
-            i += 1;
-            next = src[i + 1];
+    for (let ch = src[offset]; ch === '\n'; ch = src[offset]) {
+      offset += 1;
+      if (PlainValue$5.Node.atDocumentBoundary(src, offset)) break;
+      const end = PlainValue$5.Node.endOfBlockIndent(src, indent, offset); // should not include tab?
+
+      if (end === null) break;
+      const ch = src[end];
+      const lineIndent = end - (offset + indent);
+
+      if (!this.blockIndent) {
+        // no explicit block indent, none yet detected
+        if (src[end] !== '\n') {
+          // first line with non-whitespace content
+          if (lineIndent < minBlockIndent) {
+            const msg = 'Block scalars with more-indented leading empty lines must use an explicit indentation indicator';
+            this.error = new PlainValue$5.YAMLSemanticError(this, msg);
           }
 
-          if (next !== '\n') str += i > wsStart ? src.slice(wsStart, i + 1) : ch;
-        } else {
-          str += ch;
+          this.blockIndent = lineIndent;
+        } else if (lineIndent > minBlockIndent) {
+          // empty line with more whitespace
+          minBlockIndent = lineIndent;
         }
-      }
-
-      return errors$1.length > 0 ? {
-        errors: errors$1,
-        str
-      } : str;
-    }
-
-    parseCharCode(offset, length, errors$1) {
-      const {
-        src
-      } = this.context;
-      const cc = src.substr(offset, length);
-      const ok = cc.length === length && /^[0-9a-fA-F]+$/.test(cc);
-      const code = ok ? parseInt(cc, 16) : NaN;
+      } else if (ch && ch !== '\n' && lineIndent < this.blockIndent) {
+        if (src[end] === '#') break;
 
-      if (isNaN(code)) {
-        errors$1.push(new errors.YAMLSyntaxError(this, `Invalid escape sequence ${src.substr(offset - 2, length + 2)}`));
-        return src.substr(offset - 2, length + 2);
+        if (!this.error) {
+          const src = explicit ? 'explicit indentation indicator' : 'first line';
+          const msg = `Block scalars must not be less indented than their ${src}`;
+          this.error = new PlainValue$5.YAMLSemanticError(this, msg);
+        }
       }
 
-      return String.fromCodePoint(code);
+      if (src[end] === '\n') {
+        offset = end;
+      } else {
+        offset = valueEnd = PlainValue$5.Node.endOfLine(src, end);
+      }
     }
-    /**
-     * Parses a "double quoted" value from the source
-     *
-     * @param {ParseContext} context
-     * @param {number} start - Index of first character
-     * @returns {number} - Index of the character after this scalar
-     */
 
-
-    parse(context, start) {
-      this.context = context;
-      const {
-        src
-      } = context;
-      let offset = QuoteDouble.endOfQuote(src, start + 1);
-      this.valueRange = new _Range.default(start, offset);
-      offset = _Node.default.endOfWhiteSpace(src, offset);
-      offset = this.parseComment(offset);
-      return offset;
+    if (this.chomping !== Chomp.KEEP) {
+      offset = src[valueEnd] ? valueEnd + 1 : valueEnd;
     }
 
+    this.valueRange = new PlainValue$5.Range(start + 1, offset);
+    return offset;
   }
+  /**
+   * Parses a block value from the source
+   *
+   * Accepted forms are:
+   * ```
+   * BS
+   * block
+   * lines
+   *
+   * BS #comment
+   * block
+   * lines
+   * ```
+   * where the block style BS matches the regexp `[|>][-+1-9]*` and block lines
+   * are empty or have an indent level greater than `indent`.
+   *
+   * @param {ParseContext} context
+   * @param {number} start - Index of first character
+   * @returns {number} - Index of the character after this block
+   */
 
-  exports.default = QuoteDouble;
-});
-unwrapExports(QuoteDouble_1);
 
-var QuoteSingle_1 = createCommonjsModule(function (module, exports) {
+  parse(context, start) {
+    this.context = context;
+    const {
+      src
+    } = context;
+    let offset = this.parseBlockHeader(start);
+    offset = PlainValue$5.Node.endOfWhiteSpace(src, offset);
+    offset = this.parseComment(offset);
+    offset = this.parseBlockValue(offset);
+    return offset;
+  }
 
-  Object.defineProperty(exports, "__esModule", {
-    value: true
-  });
-  exports.default = void 0;
+  setOrigRanges(cr, offset) {
+    offset = super.setOrigRanges(cr, offset);
+    return this.header ? this.header.setOrigRange(cr, offset) : offset;
+  }
 
-  var _Node = _interopRequireDefault(Node_1);
+}
 
-  var _Range = _interopRequireDefault(Range_1);
+class FlowCollection extends PlainValue$5.Node {
+  constructor(type, props) {
+    super(type, props);
+    this.items = null;
+  }
 
-  function _interopRequireDefault(obj) {
-    return obj && obj.__esModule ? obj : {
-      default: obj
-    };
+  prevNodeIsJsonLike(idx = this.items.length) {
+    const node = this.items[idx - 1];
+    return !!node && (node.jsonLike || node.type === PlainValue$5.Type.COMMENT && this.prevNodeIsJsonLike(idx - 1));
   }
+  /**
+   * @param {ParseContext} context
+   * @param {number} start - Index of first character
+   * @returns {number} - Index of the character after this
+   */
 
-  class QuoteSingle extends _Node.default {
-    static endOfQuote(src, offset) {
-      let ch = src[offset];
 
-      while (ch) {
-        if (ch === "'") {
-          if (src[offset + 1] !== "'") break;
-          ch = src[offset += 2];
-        } else {
-          ch = src[offset += 1];
-        }
-      }
+  parse(context, start) {
+    this.context = context;
+    const {
+      parseNode,
+      src
+    } = context;
+    let {
+      indent,
+      lineStart
+    } = context;
+    let char = src[start]; // { or [
+
+    this.items = [{
+      char,
+      offset: start
+    }];
+    let offset = PlainValue$5.Node.endOfWhiteSpace(src, start + 1);
+    char = src[offset];
+
+    while (char && char !== ']' && char !== '}') {
+      switch (char) {
+        case '\n':
+          {
+            lineStart = offset + 1;
+            const wsEnd = PlainValue$5.Node.endOfWhiteSpace(src, lineStart);
 
-      return offset + 1;
-    }
-    /**
-     * @returns {string | { str: string, errors: YAMLSyntaxError[] }}
-     */
+            if (src[wsEnd] === '\n') {
+              const blankLine = new BlankLine();
+              lineStart = blankLine.parse({
+                src
+              }, lineStart);
+              this.items.push(blankLine);
+            }
 
+            offset = PlainValue$5.Node.endOfIndent(src, lineStart);
 
-    get strValue() {
-      if (!this.valueRange || !this.context) return null;
-      const errors$1 = [];
-      const {
-        start,
-        end
-      } = this.valueRange;
-      const {
-        indent,
-        src
-      } = this.context;
-      if (src[end - 1] !== "'") errors$1.push(new errors.YAMLSyntaxError(this, "Missing closing 'quote"));
-      let str = '';
+            if (offset <= lineStart + indent) {
+              char = src[offset];
 
-      for (let i = start + 1; i < end - 1; ++i) {
-        const ch = src[i];
+              if (offset < lineStart + indent || char !== ']' && char !== '}') {
+                const msg = 'Insufficient indentation in flow collection';
+                this.error = new PlainValue$5.YAMLSemanticError(this, msg);
+              }
+            }
+          }
+          break;
 
-        if (ch === '\n') {
-          if (_Node.default.atDocumentBoundary(src, i + 1)) errors$1.push(new errors.YAMLSemanticError(this, 'Document boundary indicators are not allowed within string values'));
+        case ',':
+          {
+            this.items.push({
+              char,
+              offset
+            });
+            offset += 1;
+          }
+          break;
 
-          const {
-            fold,
-            offset,
-            error
-          } = _Node.default.foldNewline(src, i, indent);
-
-          str += fold;
-          i = offset;
-          if (error) errors$1.push(new errors.YAMLSemanticError(this, 'Multi-line single-quoted string needs to be sufficiently indented'));
-        } else if (ch === "'") {
-          str += ch;
-          i += 1;
-          if (src[i] !== "'") errors$1.push(new errors.YAMLSyntaxError(this, 'Unescaped single quote? This should not happen.'));
-        } else if (ch === ' ' || ch === '\t') {
-          // trim trailing whitespace
-          const wsStart = i;
-          let next = src[i + 1];
-
-          while (next === ' ' || next === '\t') {
-            i += 1;
-            next = src[i + 1];
+        case '#':
+          {
+            const comment = new Comment();
+            offset = comment.parse({
+              src
+            }, offset);
+            this.items.push(comment);
           }
+          break;
 
-          if (next !== '\n') str += i > wsStart ? src.slice(wsStart, i + 1) : ch;
-        } else {
-          str += ch;
-        }
+        case '?':
+        case ':':
+          {
+            const next = src[offset + 1];
+
+            if (next === '\n' || next === '\t' || next === ' ' || next === ',' || // in-flow : after JSON-like key does not need to be followed by whitespace
+            char === ':' && this.prevNodeIsJsonLike()) {
+              this.items.push({
+                char,
+                offset
+              });
+              offset += 1;
+              break;
+            }
+          }
+        // fallthrough
+
+        default:
+          {
+            const node = parseNode({
+              atLineStart: false,
+              inCollection: false,
+              inFlow: true,
+              indent: -1,
+              lineStart,
+              parent: this
+            }, offset);
+
+            if (!node) {
+              // at next document start
+              this.valueRange = new PlainValue$5.Range(start, offset);
+              return offset;
+            }
+
+            this.items.push(node);
+            offset = PlainValue$5.Node.normalizeOffset(src, node.range.end);
+          }
       }
 
-      return errors$1.length > 0 ? {
-        errors: errors$1,
-        str
-      } : str;
+      offset = PlainValue$5.Node.endOfWhiteSpace(src, offset);
+      char = src[offset];
     }
-    /**
-     * Parses a 'single quoted' value from the source
-     *
-     * @param {ParseContext} context
-     * @param {number} start - Index of first character
-     * @returns {number} - Index of the character after this scalar
-     */
 
+    this.valueRange = new PlainValue$5.Range(start, offset + 1);
 
-    parse(context, start) {
-      this.context = context;
-      const {
-        src
-      } = context;
-      let offset = QuoteSingle.endOfQuote(src, start + 1);
-      this.valueRange = new _Range.default(start, offset);
-      offset = _Node.default.endOfWhiteSpace(src, offset);
+    if (char) {
+      this.items.push({
+        char,
+        offset
+      });
+      offset = PlainValue$5.Node.endOfWhiteSpace(src, offset + 1);
       offset = this.parseComment(offset);
-      return offset;
     }
 
+    return offset;
   }
 
-  exports.default = QuoteSingle;
-});
-unwrapExports(QuoteSingle_1);
+  setOrigRanges(cr, offset) {
+    offset = super.setOrigRanges(cr, offset);
+    this.items.forEach(node => {
+      if (node instanceof PlainValue$5.Node) {
+        offset = node.setOrigRanges(cr, offset);
+      } else if (cr.length === 0) {
+        node.origOffset = node.offset;
+      } else {
+        let i = offset;
 
-var ParseContext_1 = createCommonjsModule(function (module, exports) {
+        while (i < cr.length) {
+          if (cr[i] > node.offset) break;else ++i;
+        }
 
-  Object.defineProperty(exports, "__esModule", {
-    value: true
-  });
-  exports.default = void 0;
+        node.origOffset = node.offset + i;
+        offset = i;
+      }
+    });
+    return offset;
+  }
 
-  var _Alias = _interopRequireDefault(Alias_1);
+  toString() {
+    const {
+      context: {
+        src
+      },
+      items,
+      range,
+      value
+    } = this;
+    if (value != null) return value;
+    const nodes = items.filter(item => item instanceof PlainValue$5.Node);
+    let str = '';
+    let prevEnd = range.start;
+    nodes.forEach(node => {
+      const prefix = src.slice(prevEnd, node.range.start);
+      prevEnd = node.range.end;
+      str += prefix + String(node);
+
+      if (str[str.length - 1] === '\n' && src[prevEnd - 1] !== '\n' && src[prevEnd] === '\n') {
+        // Comment range does not include the terminal newline, but its
+        // stringified value does. Without this fix, newlines at comment ends
+        // get duplicated.
+        prevEnd += 1;
+      }
+    });
+    str += src.slice(prevEnd, range.end);
+    return PlainValue$5.Node.addStringTerminator(src, range.end, str);
+  }
 
-  var _BlockValue = _interopRequireDefault(BlockValue_1);
+}
 
-  var _Collection = _interopRequireDefault(Collection_1);
+class QuoteDouble extends PlainValue$5.Node {
+  static endOfQuote(src, offset) {
+    let ch = src[offset];
 
-  var _CollectionItem = _interopRequireDefault(CollectionItem_1);
+    while (ch && ch !== '"') {
+      offset += ch === '\\' ? 2 : 1;
+      ch = src[offset];
+    }
 
-  var _FlowCollection = _interopRequireDefault(FlowCollection_1);
+    return offset + 1;
+  }
+  /**
+   * @returns {string | { str: string, errors: YAMLSyntaxError[] }}
+   */
 
-  var _Node = _interopRequireDefault(Node_1);
 
-  var _PlainValue = _interopRequireDefault(PlainValue_1);
+  get strValue() {
+    if (!this.valueRange || !this.context) return null;
+    const errors = [];
+    const {
+      start,
+      end
+    } = this.valueRange;
+    const {
+      indent,
+      src
+    } = this.context;
+    if (src[end - 1] !== '"') errors.push(new PlainValue$5.YAMLSyntaxError(this, 'Missing closing "quote')); // Using String#replace is too painful with escaped newlines preceded by
+    // escaped backslashes; also, this should be faster.
 
-  var _QuoteDouble = _interopRequireDefault(QuoteDouble_1);
+    let str = '';
 
-  var _QuoteSingle = _interopRequireDefault(QuoteSingle_1);
+    for (let i = start + 1; i < end - 1; ++i) {
+      const ch = src[i];
 
-  var _Range = _interopRequireDefault(Range_1);
+      if (ch === '\n') {
+        if (PlainValue$5.Node.atDocumentBoundary(src, i + 1)) errors.push(new PlainValue$5.YAMLSemanticError(this, 'Document boundary indicators are not allowed within string values'));
+        const {
+          fold,
+          offset,
+          error
+        } = PlainValue$5.Node.foldNewline(src, i, indent);
+        str += fold;
+        i = offset;
+        if (error) errors.push(new PlainValue$5.YAMLSemanticError(this, 'Multi-line double-quoted string needs to be sufficiently indented'));
+      } else if (ch === '\\') {
+        i += 1;
 
-  function _interopRequireDefault(obj) {
-    return obj && obj.__esModule ? obj : {
-      default: obj
-    };
-  }
+        switch (src[i]) {
+          case '0':
+            str += '\0';
+            break;
+          // null character
 
-  function _defineProperty(obj, key, value) {
-    if (key in obj) {
-      Object.defineProperty(obj, key, {
-        value: value,
-        enumerable: true,
-        configurable: true,
-        writable: true
-      });
-    } else {
-      obj[key] = value;
-    }
+          case 'a':
+            str += '\x07';
+            break;
+          // bell character
 
-    return obj;
-  }
+          case 'b':
+            str += '\b';
+            break;
+          // backspace
 
-  function createNewNode(type, props) {
-    switch (type) {
-      case constants.Type.ALIAS:
-        return new _Alias.default(type, props);
+          case 'e':
+            str += '\x1b';
+            break;
+          // escape character
 
-      case constants.Type.BLOCK_FOLDED:
-      case constants.Type.BLOCK_LITERAL:
-        return new _BlockValue.default(type, props);
+          case 'f':
+            str += '\f';
+            break;
+          // form feed
 
-      case constants.Type.FLOW_MAP:
-      case constants.Type.FLOW_SEQ:
-        return new _FlowCollection.default(type, props);
+          case 'n':
+            str += '\n';
+            break;
+          // line feed
 
-      case constants.Type.MAP_KEY:
-      case constants.Type.MAP_VALUE:
-      case constants.Type.SEQ_ITEM:
-        return new _CollectionItem.default(type, props);
+          case 'r':
+            str += '\r';
+            break;
+          // carriage return
 
-      case constants.Type.COMMENT:
-      case constants.Type.PLAIN:
-        return new _PlainValue.default(type, props);
+          case 't':
+            str += '\t';
+            break;
+          // horizontal tab
 
-      case constants.Type.QUOTE_DOUBLE:
-        return new _QuoteDouble.default(type, props);
+          case 'v':
+            str += '\v';
+            break;
+          // vertical tab
 
-      case constants.Type.QUOTE_SINGLE:
-        return new _QuoteSingle.default(type, props);
+          case 'N':
+            str += '\u0085';
+            break;
+          // Unicode next line
 
-      /* istanbul ignore next */
+          case '_':
+            str += '\u00a0';
+            break;
+          // Unicode non-breaking space
 
-      default:
-        return null;
-      // should never happen
-    }
-  }
-  /**
-   * @param {boolean} atLineStart - Node starts at beginning of line
-   * @param {boolean} inFlow - true if currently in a flow context
-   * @param {boolean} inCollection - true if currently in a collection context
-   * @param {number} indent - Current level of indentation
-   * @param {number} lineStart - Start of the current line
-   * @param {Node} parent - The parent of the node
-   * @param {string} src - Source of the YAML document
-   */
+          case 'L':
+            str += '\u2028';
+            break;
+          // Unicode line separator
 
+          case 'P':
+            str += '\u2029';
+            break;
+          // Unicode paragraph separator
 
-  class ParseContext {
-    static parseType(src, offset, inFlow) {
-      switch (src[offset]) {
-        case '*':
-          return constants.Type.ALIAS;
+          case ' ':
+            str += ' ';
+            break;
+
+          case '"':
+            str += '"';
+            break;
+
+          case '/':
+            str += '/';
+            break;
 
-        case '>':
-          return constants.Type.BLOCK_FOLDED;
+          case '\\':
+            str += '\\';
+            break;
 
-        case '|':
-          return constants.Type.BLOCK_LITERAL;
+          case '\t':
+            str += '\t';
+            break;
 
-        case '{':
-          return constants.Type.FLOW_MAP;
+          case 'x':
+            str += this.parseCharCode(i + 1, 2, errors);
+            i += 2;
+            break;
 
-        case '[':
-          return constants.Type.FLOW_SEQ;
+          case 'u':
+            str += this.parseCharCode(i + 1, 4, errors);
+            i += 4;
+            break;
 
-        case '?':
-          return !inFlow && _Node.default.atBlank(src, offset + 1, true) ? constants.Type.MAP_KEY : constants.Type.PLAIN;
+          case 'U':
+            str += this.parseCharCode(i + 1, 8, errors);
+            i += 8;
+            break;
 
-        case ':':
-          return !inFlow && _Node.default.atBlank(src, offset + 1, true) ? constants.Type.MAP_VALUE : constants.Type.PLAIN;
+          case '\n':
+            // skip escaped newlines, but still trim the following line
+            while (src[i + 1] === ' ' || src[i + 1] === '\t') i += 1;
 
-        case '-':
-          return !inFlow && _Node.default.atBlank(src, offset + 1, true) ? constants.Type.SEQ_ITEM : constants.Type.PLAIN;
+            break;
 
-        case '"':
-          return constants.Type.QUOTE_DOUBLE;
+          default:
+            errors.push(new PlainValue$5.YAMLSyntaxError(this, `Invalid escape sequence ${src.substr(i - 1, 2)}`));
+            str += '\\' + src[i];
+        }
+      } else if (ch === ' ' || ch === '\t') {
+        // trim trailing whitespace
+        const wsStart = i;
+        let next = src[i + 1];
 
-        case "'":
-          return constants.Type.QUOTE_SINGLE;
+        while (next === ' ' || next === '\t') {
+          i += 1;
+          next = src[i + 1];
+        }
 
-        default:
-          return constants.Type.PLAIN;
+        if (next !== '\n') str += i > wsStart ? src.slice(wsStart, i + 1) : ch;
+      } else {
+        str += ch;
       }
     }
 
-    constructor(orig = {}, {
-      atLineStart,
-      inCollection,
-      inFlow,
-      indent,
-      lineStart,
-      parent
-    } = {}) {
-      _defineProperty(this, "parseNode", (overlay, start) => {
-        if (_Node.default.atDocumentBoundary(this.src, start)) return null;
-        const context = new ParseContext(this, overlay);
-        const {
-          props,
-          type,
-          valueStart
-        } = context.parseProps(start);
-        const node = createNewNode(type, props);
-        let offset = node.parse(context, valueStart);
-        node.range = new _Range.default(start, offset);
-        /* istanbul ignore if */
-
-        if (offset <= start) {
-          // This should never happen, but if it does, let's make sure to at least
-          // step one character forward to avoid a busy loop.
-          node.error = new Error(`Node#parse consumed no characters`);
-          node.error.parseEnd = offset;
-          node.error.source = node;
-          node.range.end = start + 1;
-        }
-
-        if (context.nodeStartsCollection(node)) {
-          if (!node.error && !context.atLineStart && context.parent.type === constants.Type.DOCUMENT) {
-            node.error = new errors.YAMLSyntaxError(node, 'Block collection must not have preceding content here (e.g. directives-end indicator)');
-          }
-
-          const collection = new _Collection.default(node);
-          offset = collection.parse(new ParseContext(context), offset);
-          collection.range = new _Range.default(start, offset);
-          return collection;
-        }
+    return errors.length > 0 ? {
+      errors,
+      str
+    } : str;
+  }
 
-        return node;
-      });
+  parseCharCode(offset, length, errors) {
+    const {
+      src
+    } = this.context;
+    const cc = src.substr(offset, length);
+    const ok = cc.length === length && /^[0-9a-fA-F]+$/.test(cc);
+    const code = ok ? parseInt(cc, 16) : NaN;
 
-      this.atLineStart = atLineStart != null ? atLineStart : orig.atLineStart || false;
-      this.inCollection = inCollection != null ? inCollection : orig.inCollection || false;
-      this.inFlow = inFlow != null ? inFlow : orig.inFlow || false;
-      this.indent = indent != null ? indent : orig.indent;
-      this.lineStart = lineStart != null ? lineStart : orig.lineStart;
-      this.parent = parent != null ? parent : orig.parent || {};
-      this.root = orig.root;
-      this.src = orig.src;
+    if (isNaN(code)) {
+      errors.push(new PlainValue$5.YAMLSyntaxError(this, `Invalid escape sequence ${src.substr(offset - 2, length + 2)}`));
+      return src.substr(offset - 2, length + 2);
     }
 
-    nodeStartsCollection(node) {
-      const {
-        inCollection,
-        inFlow,
-        src
-      } = this;
-      if (inCollection || inFlow) return false;
-      if (node instanceof _CollectionItem.default) return true; // check for implicit key
-
-      let offset = node.range.end;
-      if (src[offset] === '\n' || src[offset - 1] === '\n') return false;
-      offset = _Node.default.endOfWhiteSpace(src, offset);
-      return src[offset] === ':';
-    } // Anchor and tag are before type, which determines the node implementation
-    // class; hence this intermediate step.
-
+    return String.fromCodePoint(code);
+  }
+  /**
+   * Parses a "double quoted" value from the source
+   *
+   * @param {ParseContext} context
+   * @param {number} start - Index of first character
+   * @returns {number} - Index of the character after this scalar
+   */
 
-    parseProps(offset) {
-      const {
-        inFlow,
-        parent,
-        src
-      } = this;
-      const props = [];
-      let lineHasProps = false;
-      offset = _Node.default.endOfWhiteSpace(src, offset);
-      let ch = src[offset];
-
-      while (ch === constants.Char.ANCHOR || ch === constants.Char.COMMENT || ch === constants.Char.TAG || ch === '\n') {
-        if (ch === '\n') {
-          const lineStart = offset + 1;
-
-          const inEnd = _Node.default.endOfIndent(src, lineStart);
-
-          const indentDiff = inEnd - (lineStart + this.indent);
-          const noIndicatorAsIndent = parent.type === constants.Type.SEQ_ITEM && parent.context.atLineStart;
-          if (!_Node.default.nextNodeIsIndented(src[inEnd], indentDiff, !noIndicatorAsIndent)) break;
-          this.atLineStart = true;
-          this.lineStart = lineStart;
-          lineHasProps = false;
-          offset = inEnd;
-        } else if (ch === constants.Char.COMMENT) {
-          const end = _Node.default.endOfLine(src, offset + 1);
-
-          props.push(new _Range.default(offset, end));
-          offset = end;
-        } else {
-          let end = _Node.default.endOfIdentifier(src, offset + 1);
-
-          if (ch === constants.Char.TAG && src[end] === ',' && /^[a-zA-Z0-9-]+\.[a-zA-Z0-9-]+,\d\d\d\d(-\d\d){0,2}\/\S/.test(src.slice(offset + 1, end + 13))) {
-            // Let's presume we're dealing with a YAML 1.0 domain tag here, rather
-            // than an empty but 'foo.bar' private-tagged node in a flow collection
-            // followed without whitespace by a plain string starting with a year
-            // or date divided by something.
-            end = _Node.default.endOfIdentifier(src, end + 5);
-          }
 
-          props.push(new _Range.default(offset, end));
-          lineHasProps = true;
-          offset = _Node.default.endOfWhiteSpace(src, end);
-        }
+  parse(context, start) {
+    this.context = context;
+    const {
+      src
+    } = context;
+    let offset = QuoteDouble.endOfQuote(src, start + 1);
+    this.valueRange = new PlainValue$5.Range(start, offset);
+    offset = PlainValue$5.Node.endOfWhiteSpace(src, offset);
+    offset = this.parseComment(offset);
+    return offset;
+  }
 
-        ch = src[offset];
-      } // '- &a : b' has an anchor on an empty node
+}
 
+class QuoteSingle extends PlainValue$5.Node {
+  static endOfQuote(src, offset) {
+    let ch = src[offset];
 
-      if (lineHasProps && ch === ':' && _Node.default.atBlank(src, offset + 1, true)) offset -= 1;
-      const type = ParseContext.parseType(src, offset, inFlow);
-      return {
-        props,
-        type,
-        valueStart: offset
-      };
+    while (ch) {
+      if (ch === "'") {
+        if (src[offset + 1] !== "'") break;
+        ch = src[offset += 2];
+      } else {
+        ch = src[offset += 1];
+      }
     }
-    /**
-     * Parses a node from the source
-     * @param {ParseContext} overlay
-     * @param {number} start - Index of first non-whitespace character for the node
-     * @returns {?Node} - null if at a document boundary
-     */
-
 
+    return offset + 1;
   }
+  /**
+   * @returns {string | { str: string, errors: YAMLSyntaxError[] }}
+   */
 
-  exports.default = ParseContext;
-});
-unwrapExports(ParseContext_1);
-
-var parse_1 = createCommonjsModule(function (module, exports) {
-
-  Object.defineProperty(exports, "__esModule", {
-    value: true
-  });
-  exports.default = parse;
-
-  var _Document = _interopRequireDefault(Document_1);
 
-  var _ParseContext = _interopRequireDefault(ParseContext_1);
+  get strValue() {
+    if (!this.valueRange || !this.context) return null;
+    const errors = [];
+    const {
+      start,
+      end
+    } = this.valueRange;
+    const {
+      indent,
+      src
+    } = this.context;
+    if (src[end - 1] !== "'") errors.push(new PlainValue$5.YAMLSyntaxError(this, "Missing closing 'quote"));
+    let str = '';
 
-  function _interopRequireDefault(obj) {
-    return obj && obj.__esModule ? obj : {
-      default: obj
-    };
-  } // Published as 'yaml/parse-cst'
+    for (let i = start + 1; i < end - 1; ++i) {
+      const ch = src[i];
 
+      if (ch === '\n') {
+        if (PlainValue$5.Node.atDocumentBoundary(src, i + 1)) errors.push(new PlainValue$5.YAMLSemanticError(this, 'Document boundary indicators are not allowed within string values'));
+        const {
+          fold,
+          offset,
+          error
+        } = PlainValue$5.Node.foldNewline(src, i, indent);
+        str += fold;
+        i = offset;
+        if (error) errors.push(new PlainValue$5.YAMLSemanticError(this, 'Multi-line single-quoted string needs to be sufficiently indented'));
+      } else if (ch === "'") {
+        str += ch;
+        i += 1;
+        if (src[i] !== "'") errors.push(new PlainValue$5.YAMLSyntaxError(this, 'Unescaped single quote? This should not happen.'));
+      } else if (ch === ' ' || ch === '\t') {
+        // trim trailing whitespace
+        const wsStart = i;
+        let next = src[i + 1];
 
-  function parse(src) {
-    const cr = [];
+        while (next === ' ' || next === '\t') {
+          i += 1;
+          next = src[i + 1];
+        }
 
-    if (src.indexOf('\r') !== -1) {
-      src = src.replace(/\r\n?/g, (match, offset) => {
-        if (match.length > 1) cr.push(offset);
-        return '\n';
-      });
+        if (next !== '\n') str += i > wsStart ? src.slice(wsStart, i + 1) : ch;
+      } else {
+        str += ch;
+      }
     }
 
-    const documents = [];
-    let offset = 0;
+    return errors.length > 0 ? {
+      errors,
+      str
+    } : str;
+  }
+  /**
+   * Parses a 'single quoted' value from the source
+   *
+   * @param {ParseContext} context
+   * @param {number} start - Index of first character
+   * @returns {number} - Index of the character after this scalar
+   */
 
-    do {
-      const doc = new _Document.default();
-      const context = new _ParseContext.default({
-        src
-      });
-      offset = doc.parse(context, offset);
-      documents.push(doc);
-    } while (offset < src.length);
 
-    documents.setOrigRanges = () => {
-      if (cr.length === 0) return false;
+  parse(context, start) {
+    this.context = context;
+    const {
+      src
+    } = context;
+    let offset = QuoteSingle.endOfQuote(src, start + 1);
+    this.valueRange = new PlainValue$5.Range(start, offset);
+    offset = PlainValue$5.Node.endOfWhiteSpace(src, offset);
+    offset = this.parseComment(offset);
+    return offset;
+  }
 
-      for (let i = 1; i < cr.length; ++i) cr[i] -= i;
+}
 
-      let crOffset = 0;
+function createNewNode(type, props) {
+  switch (type) {
+    case PlainValue$5.Type.ALIAS:
+      return new Alias$1(type, props);
 
-      for (let i = 0; i < documents.length; ++i) {
-        crOffset = documents[i].setOrigRanges(cr, crOffset);
-      }
+    case PlainValue$5.Type.BLOCK_FOLDED:
+    case PlainValue$5.Type.BLOCK_LITERAL:
+      return new BlockValue(type, props);
 
-      cr.splice(0, cr.length);
-      return true;
-    };
+    case PlainValue$5.Type.FLOW_MAP:
+    case PlainValue$5.Type.FLOW_SEQ:
+      return new FlowCollection(type, props);
 
-    documents.toString = () => documents.join('...\n');
+    case PlainValue$5.Type.MAP_KEY:
+    case PlainValue$5.Type.MAP_VALUE:
+    case PlainValue$5.Type.SEQ_ITEM:
+      return new CollectionItem(type, props);
 
-    return documents;
-  }
-});
-unwrapExports(parse_1);
+    case PlainValue$5.Type.COMMENT:
+    case PlainValue$5.Type.PLAIN:
+      return new PlainValue$5.PlainValue(type, props);
 
-var addComment_1 = createCommonjsModule(function (module, exports) {
+    case PlainValue$5.Type.QUOTE_DOUBLE:
+      return new QuoteDouble(type, props);
 
-  Object.defineProperty(exports, "__esModule", {
-    value: true
-  });
-  exports.addCommentBefore = addCommentBefore;
-  exports.default = addComment;
+    case PlainValue$5.Type.QUOTE_SINGLE:
+      return new QuoteSingle(type, props);
 
-  function addCommentBefore(str, indent, comment) {
-    if (!comment) return str;
-    const cc = comment.replace(/[\s\S]^/gm, `$&${indent}#`);
-    return `#${cc}\n${indent}${str}`;
-  }
+    /* istanbul ignore next */
 
-  function addComment(str, indent, comment) {
-    return !comment ? str : comment.indexOf('\n') === -1 ? `${str} #${comment}` : `${str}\n` + comment.replace(/^/gm, `${indent || ''}#`);
+    default:
+      return null;
+    // should never happen
   }
-});
-unwrapExports(addComment_1);
-var addComment_2 = addComment_1.addCommentBefore;
-
-var toJSON_1 = createCommonjsModule(function (module, exports) {
+}
+/**
+ * @param {boolean} atLineStart - Node starts at beginning of line
+ * @param {boolean} inFlow - true if currently in a flow context
+ * @param {boolean} inCollection - true if currently in a collection context
+ * @param {number} indent - Current level of indentation
+ * @param {number} lineStart - Start of the current line
+ * @param {Node} parent - The parent of the node
+ * @param {string} src - Source of the YAML document
+ */
 
-  Object.defineProperty(exports, "__esModule", {
-    value: true
-  });
-  exports.default = toJSON;
 
-  function toJSON(value, arg, ctx) {
-    if (Array.isArray(value)) return value.map((v, i) => toJSON(v, String(i), ctx));
+class ParseContext {
+  static parseType(src, offset, inFlow) {
+    switch (src[offset]) {
+      case '*':
+        return PlainValue$5.Type.ALIAS;
 
-    if (value && typeof value.toJSON === 'function') {
-      const anchor = ctx && ctx.anchors && ctx.anchors.find(a => a.node === value);
-      if (anchor) ctx.onCreate = res => {
-        anchor.res = res;
-        delete ctx.onCreate;
-      };
-      const res = value.toJSON(arg, ctx);
-      if (anchor && ctx.onCreate) ctx.onCreate(res);
-      return res;
-    }
+      case '>':
+        return PlainValue$5.Type.BLOCK_FOLDED;
 
-    return value;
-  }
-});
-unwrapExports(toJSON_1);
+      case '|':
+        return PlainValue$5.Type.BLOCK_LITERAL;
 
-var Node_1$1 = createCommonjsModule(function (module, exports) {
+      case '{':
+        return PlainValue$5.Type.FLOW_MAP;
 
-  Object.defineProperty(exports, "__esModule", {
-    value: true
-  });
-  exports.default = void 0;
+      case '[':
+        return PlainValue$5.Type.FLOW_SEQ;
 
-  class Node {}
+      case '?':
+        return !inFlow && PlainValue$5.Node.atBlank(src, offset + 1, true) ? PlainValue$5.Type.MAP_KEY : PlainValue$5.Type.PLAIN;
 
-  exports.default = Node;
-});
-unwrapExports(Node_1$1);
+      case ':':
+        return !inFlow && PlainValue$5.Node.atBlank(src, offset + 1, true) ? PlainValue$5.Type.MAP_VALUE : PlainValue$5.Type.PLAIN;
 
-var Scalar_1 = createCommonjsModule(function (module, exports) {
+      case '-':
+        return !inFlow && PlainValue$5.Node.atBlank(src, offset + 1, true) ? PlainValue$5.Type.SEQ_ITEM : PlainValue$5.Type.PLAIN;
 
-  Object.defineProperty(exports, "__esModule", {
-    value: true
-  });
-  exports.default = void 0;
+      case '"':
+        return PlainValue$5.Type.QUOTE_DOUBLE;
 
-  var _toJSON = _interopRequireDefault(toJSON_1);
+      case "'":
+        return PlainValue$5.Type.QUOTE_SINGLE;
 
-  var _Node = _interopRequireDefault(Node_1$1);
+      default:
+        return PlainValue$5.Type.PLAIN;
+    }
+  }
 
-  function _interopRequireDefault(obj) {
-    return obj && obj.__esModule ? obj : {
-      default: obj
-    };
-  } // Published as 'yaml/scalar'
+  constructor(orig = {}, {
+    atLineStart,
+    inCollection,
+    inFlow,
+    indent,
+    lineStart,
+    parent
+  } = {}) {
+    PlainValue$5._defineProperty(this, "parseNode", (overlay, start) => {
+      if (PlainValue$5.Node.atDocumentBoundary(this.src, start)) return null;
+      const context = new ParseContext(this, overlay);
+      const {
+        props,
+        type,
+        valueStart
+      } = context.parseProps(start);
+      const node = createNewNode(type, props);
+      let offset = node.parse(context, valueStart);
+      node.range = new PlainValue$5.Range(start, offset);
+      /* istanbul ignore if */
 
+      if (offset <= start) {
+        // This should never happen, but if it does, let's make sure to at least
+        // step one character forward to avoid a busy loop.
+        node.error = new Error(`Node#parse consumed no characters`);
+        node.error.parseEnd = offset;
+        node.error.source = node;
+        node.range.end = start + 1;
+      }
 
-  class Scalar extends _Node.default {
-    constructor(value) {
-      super();
-      this.value = value;
-    }
+      if (context.nodeStartsCollection(node)) {
+        if (!node.error && !context.atLineStart && context.parent.type === PlainValue$5.Type.DOCUMENT) {
+          node.error = new PlainValue$5.YAMLSyntaxError(node, 'Block collection must not have preceding content here (e.g. directives-end indicator)');
+        }
 
-    toJSON(arg, ctx) {
-      return ctx && ctx.keep ? this.value : (0, _toJSON.default)(this.value, arg, ctx);
-    }
+        const collection = new Collection$1(node);
+        offset = collection.parse(new ParseContext(context), offset);
+        collection.range = new PlainValue$5.Range(start, offset);
+        return collection;
+      }
 
-    toString() {
-      return String(this.value);
-    }
+      return node;
+    });
 
+    this.atLineStart = atLineStart != null ? atLineStart : orig.atLineStart || false;
+    this.inCollection = inCollection != null ? inCollection : orig.inCollection || false;
+    this.inFlow = inFlow != null ? inFlow : orig.inFlow || false;
+    this.indent = indent != null ? indent : orig.indent;
+    this.lineStart = lineStart != null ? lineStart : orig.lineStart;
+    this.parent = parent != null ? parent : orig.parent || {};
+    this.root = orig.root;
+    this.src = orig.src;
   }
 
-  exports.default = Scalar;
-});
-unwrapExports(Scalar_1);
+  nodeStartsCollection(node) {
+    const {
+      inCollection,
+      inFlow,
+      src
+    } = this;
+    if (inCollection || inFlow) return false;
+    if (node instanceof CollectionItem) return true; // check for implicit key
 
-var Pair_1 = createCommonjsModule(function (module, exports) {
+    let offset = node.range.end;
+    if (src[offset] === '\n' || src[offset - 1] === '\n') return false;
+    offset = PlainValue$5.Node.endOfWhiteSpace(src, offset);
+    return src[offset] === ':';
+  } // Anchor and tag are before type, which determines the node implementation
+  // class; hence this intermediate step.
 
-  Object.defineProperty(exports, "__esModule", {
-    value: true
-  });
-  exports.default = void 0;
 
-  var _addComment = _interopRequireDefault(addComment_1);
+  parseProps(offset) {
+    const {
+      inFlow,
+      parent,
+      src
+    } = this;
+    const props = [];
+    let lineHasProps = false;
+    offset = this.atLineStart ? PlainValue$5.Node.endOfIndent(src, offset) : PlainValue$5.Node.endOfWhiteSpace(src, offset);
+    let ch = src[offset];
 
-  var _toJSON = _interopRequireDefault(toJSON_1);
+    while (ch === PlainValue$5.Char.ANCHOR || ch === PlainValue$5.Char.COMMENT || ch === PlainValue$5.Char.TAG || ch === '\n') {
+      if (ch === '\n') {
+        let inEnd = offset;
+        let lineStart;
+
+        do {
+          lineStart = inEnd + 1;
+          inEnd = PlainValue$5.Node.endOfIndent(src, lineStart);
+        } while (src[inEnd] === '\n');
+
+        const indentDiff = inEnd - (lineStart + this.indent);
+        const noIndicatorAsIndent = parent.type === PlainValue$5.Type.SEQ_ITEM && parent.context.atLineStart;
+        if (src[inEnd] !== '#' && !PlainValue$5.Node.nextNodeIsIndented(src[inEnd], indentDiff, !noIndicatorAsIndent)) break;
+        this.atLineStart = true;
+        this.lineStart = lineStart;
+        lineHasProps = false;
+        offset = inEnd;
+      } else if (ch === PlainValue$5.Char.COMMENT) {
+        const end = PlainValue$5.Node.endOfLine(src, offset + 1);
+        props.push(new PlainValue$5.Range(offset, end));
+        offset = end;
+      } else {
+        let end = PlainValue$5.Node.endOfIdentifier(src, offset + 1);
+
+        if (ch === PlainValue$5.Char.TAG && src[end] === ',' && /^[a-zA-Z0-9-]+\.[a-zA-Z0-9-]+,\d\d\d\d(-\d\d){0,2}\/\S/.test(src.slice(offset + 1, end + 13))) {
+          // Let's presume we're dealing with a YAML 1.0 domain tag here, rather
+          // than an empty but 'foo.bar' private-tagged node in a flow collection
+          // followed without whitespace by a plain string starting with a year
+          // or date divided by something.
+          end = PlainValue$5.Node.endOfIdentifier(src, end + 5);
+        }
 
-  var _Collection = _interopRequireDefault(Collection_1$1);
+        props.push(new PlainValue$5.Range(offset, end));
+        lineHasProps = true;
+        offset = PlainValue$5.Node.endOfWhiteSpace(src, end);
+      }
 
-  var _Node = _interopRequireDefault(Node_1$1);
+      ch = src[offset];
+    } // '- &a : b' has an anchor on an empty node
 
-  var _Scalar = _interopRequireDefault(Scalar_1);
 
-  function _interopRequireDefault(obj) {
-    return obj && obj.__esModule ? obj : {
-      default: obj
+    if (lineHasProps && ch === ':' && PlainValue$5.Node.atBlank(src, offset + 1, true)) offset -= 1;
+    const type = ParseContext.parseType(src, offset, inFlow);
+    return {
+      props,
+      type,
+      valueStart: offset
     };
-  } // Published as 'yaml/pair'
+  }
+  /**
+   * Parses a node from the source
+   * @param {ParseContext} overlay
+   * @param {number} start - Index of first non-whitespace character for the node
+   * @returns {?Node} - null if at a document boundary
+   */
 
 
-  const stringifyKey = (key, jsKey, ctx) => {
-    if (jsKey === null) return '';
-    if (typeof jsKey !== 'object') return String(jsKey);
-    if (key instanceof _Node.default && ctx && ctx.doc) return key.toString({
-      anchors: {},
-      doc: ctx.doc,
-      indent: '',
-      inFlow: true,
-      inStringifyKey: true
-    });
-    return JSON.stringify(jsKey);
-  };
+} // Published as 'yaml/parse-cst'
 
-  class Pair extends _Node.default {
-    constructor(key, value = null) {
-      super();
-      this.key = key;
-      this.value = value;
-      this.type = 'PAIR';
-    }
 
-    get commentBefore() {
-      return this.key && this.key.commentBefore;
-    }
+function parse$1(src) {
+  const cr = [];
 
-    set commentBefore(cb) {
-      if (this.key == null) this.key = new _Scalar.default(null);
-      this.key.commentBefore = cb;
-    }
+  if (src.indexOf('\r') !== -1) {
+    src = src.replace(/\r\n?/g, (match, offset) => {
+      if (match.length > 1) cr.push(offset);
+      return '\n';
+    });
+  }
 
-    addToJSMap(ctx, map) {
-      const key = (0, _toJSON.default)(this.key, '', ctx);
+  const documents = [];
+  let offset = 0;
 
-      if (map instanceof Map) {
-        const value = (0, _toJSON.default)(this.value, key, ctx);
-        map.set(key, value);
-      } else if (map instanceof Set) {
-        map.add(key);
-      } else {
-        const stringKey = stringifyKey(this.key, key, ctx);
-        map[stringKey] = (0, _toJSON.default)(this.value, stringKey, ctx);
-      }
+  do {
+    const doc = new Document$3();
+    const context = new ParseContext({
+      src
+    });
+    offset = doc.parse(context, offset);
+    documents.push(doc);
+  } while (offset < src.length);
 
-      return map;
-    }
+  documents.setOrigRanges = () => {
+    if (cr.length === 0) return false;
 
-    toJSON(_, ctx) {
-      const pair = ctx && ctx.mapAsMap ? new Map() : {};
-      return this.addToJSMap(ctx, pair);
-    }
+    for (let i = 1; i < cr.length; ++i) cr[i] -= i;
 
-    toString(ctx, onComment, onChompKeep) {
-      if (!ctx || !ctx.doc) return JSON.stringify(this);
-      const {
-        simpleKeys
-      } = ctx.doc.options;
-      let {
-        key,
-        value
-      } = this;
-      let keyComment = key instanceof _Node.default && key.comment;
-
-      if (simpleKeys) {
-        if (keyComment) {
-          throw new Error('With simple keys, key nodes cannot have comments');
-        }
+    let crOffset = 0;
 
-        if (key instanceof _Collection.default) {
-          const msg = 'With simple keys, collection cannot be used as a key value';
-          throw new Error(msg);
-        }
-      }
+    for (let i = 0; i < documents.length; ++i) {
+      crOffset = documents[i].setOrigRanges(cr, crOffset);
+    }
 
-      const explicitKey = !simpleKeys && (!key || keyComment || key instanceof _Collection.default || key.type === constants.Type.BLOCK_FOLDED || key.type === constants.Type.BLOCK_LITERAL);
-      const {
-        doc,
-        indent
-      } = ctx;
-      ctx = Object.assign({}, ctx, {
-        implicitKey: !explicitKey,
-        indent: indent + '  '
-      });
-      let chompKeep = false;
-      let str = doc.schema.stringify(key, ctx, () => keyComment = null, () => chompKeep = true);
-      str = (0, _addComment.default)(str, ctx.indent, keyComment);
+    cr.splice(0, cr.length);
+    return true;
+  };
 
-      if (ctx.allNullValues && !simpleKeys) {
-        if (this.comment) {
-          str = (0, _addComment.default)(str, ctx.indent, this.comment);
-          if (onComment) onComment();
-        } else if (chompKeep && !keyComment && onChompKeep) onChompKeep();
+  documents.toString = () => documents.join('...\n');
 
-        return ctx.inFlow ? str : `? ${str}`;
-      }
+  return documents;
+}
 
-      str = explicitKey ? `? ${str}\n${indent}:` : `${str}:`;
+parseCst$1.parse = parse$1;
 
-      if (this.comment) {
-        // expected (but not strictly required) to be a single-line comment
-        str = (0, _addComment.default)(str, ctx.indent, this.comment);
-        if (onComment) onComment();
-      }
+var Document9b4560a1 = {};
 
-      let vcb = '';
-      let valueComment = null;
+var resolveSeqD03cb037 = {};
 
-      if (value instanceof _Node.default) {
-        if (value.spaceBefore) vcb = '\n';
+var PlainValue$4 = PlainValueEc8e588e;
 
-        if (value.commentBefore) {
-          const cs = value.commentBefore.replace(/^/gm, `${ctx.indent}#`);
-          vcb += `\n${cs}`;
-        }
+function addCommentBefore(str, indent, comment) {
+  if (!comment) return str;
+  const cc = comment.replace(/[\s\S]^/gm, `$&${indent}#`);
+  return `#${cc}\n${indent}${str}`;
+}
 
-        valueComment = value.comment;
-      } else if (value && typeof value === 'object') {
-        value = doc.schema.createNode(value, true);
-      }
+function addComment(str, indent, comment) {
+  return !comment ? str : comment.indexOf('\n') === -1 ? `${str} #${comment}` : `${str}\n` + comment.replace(/^/gm, `${indent || ''}#`);
+}
 
-      ctx.implicitKey = false;
-      if (!explicitKey && !this.comment && value instanceof _Scalar.default) ctx.indentAtStart = str.length + 1;
-      chompKeep = false;
-      const valueStr = doc.schema.stringify(value, ctx, () => valueComment = null, () => chompKeep = true);
-      let ws = ' ';
-
-      if (vcb || this.comment) {
-        ws = `${vcb}\n${ctx.indent}`;
-      } else if (!explicitKey && value instanceof _Collection.default) {
-        const flow = valueStr[0] === '[' || valueStr[0] === '{';
-        if (!flow || valueStr.includes('\n')) ws = `\n${ctx.indent}`;
-      }
+class Node {}
 
-      if (chompKeep && !valueComment && onChompKeep) onChompKeep();
-      return (0, _addComment.default)(str + ws + valueStr, ctx.indent, valueComment);
-    }
+function toJSON(value, arg, ctx) {
+  if (Array.isArray(value)) return value.map((v, i) => toJSON(v, String(i), ctx));
 
+  if (value && typeof value.toJSON === 'function') {
+    const anchor = ctx && ctx.anchors && ctx.anchors.get(value);
+    if (anchor) ctx.onCreate = res => {
+      anchor.res = res;
+      delete ctx.onCreate;
+    };
+    const res = value.toJSON(arg, ctx);
+    if (anchor && ctx.onCreate) ctx.onCreate(res);
+    return res;
   }
 
-  exports.default = Pair;
-});
-unwrapExports(Pair_1);
-
-var Collection_1$1 = createCommonjsModule(function (module, exports) {
+  if ((!ctx || !ctx.keep) && typeof value === 'bigint') return Number(value);
+  return value;
+}
 
-  Object.defineProperty(exports, "__esModule", {
-    value: true
-  });
-  exports.default = exports.isEmptyPath = void 0;
+class Scalar extends Node {
+  constructor(value) {
+    super();
+    this.value = value;
+  }
 
-  var _addComment = _interopRequireDefault(addComment_1);
+  toJSON(arg, ctx) {
+    return ctx && ctx.keep ? this.value : toJSON(this.value, arg, ctx);
+  }
 
-  var _Node = _interopRequireDefault(Node_1$1);
+  toString() {
+    return String(this.value);
+  }
 
-  var _Pair = _interopRequireDefault(Pair_1);
+}
 
-  var _Scalar = _interopRequireDefault(Scalar_1);
+function collectionFromPath(schema, path, value) {
+  let v = value;
 
-  function _interopRequireDefault(obj) {
-    return obj && obj.__esModule ? obj : {
-      default: obj
-    };
-  }
+  for (let i = path.length - 1; i >= 0; --i) {
+    const k = path[i];
 
-  function _defineProperty(obj, key, value) {
-    if (key in obj) {
-      Object.defineProperty(obj, key, {
-        value: value,
+    if (Number.isInteger(k) && k >= 0) {
+      const a = [];
+      a[k] = v;
+      v = a;
+    } else {
+      const o = {};
+      Object.defineProperty(o, k, {
+        value: v,
+        writable: true,
         enumerable: true,
-        configurable: true,
-        writable: true
+        configurable: true
       });
-    } else {
-      obj[key] = value;
+      v = o;
     }
-
-    return obj;
   }
 
-  function collectionFromPath(schema, path, value) {
-    let v = value;
+  return schema.createNode(v, false);
+} // null, undefined, or an empty non-string iterable (e.g. [])
 
-    for (let i = path.length - 1; i >= 0; --i) {
-      const k = path[i];
-      const o = Number.isInteger(k) && k >= 0 ? [] : {};
-      o[k] = v;
-      v = o;
-    }
 
-    return schema.createNode(v, false);
-  } // null, undefined, or an empty non-string iterable (e.g. [])
+const isEmptyPath = path => path == null || typeof path === 'object' && path[Symbol.iterator]().next().done;
 
+class Collection extends Node {
+  constructor(schema) {
+    super();
 
-  const isEmptyPath = path => path == null || typeof path === 'object' && path[Symbol.iterator]().next().done;
+    PlainValue$4._defineProperty(this, "items", []);
 
-  exports.isEmptyPath = isEmptyPath;
+    this.schema = schema;
+  }
 
-  class Collection extends _Node.default {
-    constructor(schema) {
-      super();
+  addIn(path, value) {
+    if (isEmptyPath(path)) this.add(value);else {
+      const [key, ...rest] = path;
+      const node = this.get(key, true);
+      if (node instanceof Collection) node.addIn(rest, value);else if (node === undefined && this.schema) this.set(key, collectionFromPath(this.schema, rest, value));else throw new Error(`Expected YAML collection at ${key}. Remaining path: ${rest}`);
+    }
+  }
 
-      _defineProperty(this, "items", []);
+  deleteIn([key, ...rest]) {
+    if (rest.length === 0) return this.delete(key);
+    const node = this.get(key, true);
+    if (node instanceof Collection) return node.deleteIn(rest);else throw new Error(`Expected YAML collection at ${key}. Remaining path: ${rest}`);
+  }
 
-      this.schema = schema;
-    }
+  getIn([key, ...rest], keepScalar) {
+    const node = this.get(key, true);
+    if (rest.length === 0) return !keepScalar && node instanceof Scalar ? node.value : node;else return node instanceof Collection ? node.getIn(rest, keepScalar) : undefined;
+  }
 
-    addIn(path, value) {
-      if (isEmptyPath(path)) this.add(value);else {
-        const [key, ...rest] = path;
-        const node = this.get(key, true);
-        if (node instanceof Collection) node.addIn(rest, value);else if (node === undefined && this.schema) this.set(key, collectionFromPath(this.schema, rest, value));else throw new Error(`Expected YAML collection at ${key}. Remaining path: ${rest}`);
-      }
-    }
+  hasAllNullValues() {
+    return this.items.every(node => {
+      if (!node || node.type !== 'PAIR') return false;
+      const n = node.value;
+      return n == null || n instanceof Scalar && n.value == null && !n.commentBefore && !n.comment && !n.tag;
+    });
+  }
 
-    deleteIn([key, ...rest]) {
-      if (rest.length === 0) return this.delete(key);
-      const node = this.get(key, true);
-      if (node instanceof Collection) return node.deleteIn(rest);else throw new Error(`Expected YAML collection at ${key}. Remaining path: ${rest}`);
-    }
+  hasIn([key, ...rest]) {
+    if (rest.length === 0) return this.has(key);
+    const node = this.get(key, true);
+    return node instanceof Collection ? node.hasIn(rest) : false;
+  }
 
-    getIn([key, ...rest], keepScalar) {
+  setIn([key, ...rest], value) {
+    if (rest.length === 0) {
+      this.set(key, value);
+    } else {
       const node = this.get(key, true);
-      if (rest.length === 0) return !keepScalar && node instanceof _Scalar.default ? node.value : node;else return node instanceof Collection ? node.getIn(rest, keepScalar) : undefined;
+      if (node instanceof Collection) node.setIn(rest, value);else if (node === undefined && this.schema) this.set(key, collectionFromPath(this.schema, rest, value));else throw new Error(`Expected YAML collection at ${key}. Remaining path: ${rest}`);
     }
+  } // overridden in implementations
 
-    hasAllNullValues() {
-      return this.items.every(node => {
-        if (!(node instanceof _Pair.default)) return false;
-        const n = node.value;
-        return n == null || n instanceof _Scalar.default && n.value == null && !n.commentBefore && !n.comment && !n.tag;
-      });
-    }
+  /* istanbul ignore next */
 
-    hasIn([key, ...rest]) {
-      if (rest.length === 0) return this.has(key);
-      const node = this.get(key, true);
-      return node instanceof Collection ? node.hasIn(rest) : false;
-    }
 
-    setIn([key, ...rest], value) {
-      if (rest.length === 0) {
-        this.set(key, value);
-      } else {
-        const node = this.get(key, true);
-        if (node instanceof Collection) node.setIn(rest, value);else if (node === undefined && this.schema) this.set(key, collectionFromPath(this.schema, rest, value));else throw new Error(`Expected YAML collection at ${key}. Remaining path: ${rest}`);
+  toJSON() {
+    return null;
+  }
+
+  toString(ctx, {
+    blockItem,
+    flowChars,
+    isMap,
+    itemIndent
+  }, onComment, onChompKeep) {
+    const {
+      indent,
+      indentStep,
+      stringify
+    } = ctx;
+    const inFlow = this.type === PlainValue$4.Type.FLOW_MAP || this.type === PlainValue$4.Type.FLOW_SEQ || ctx.inFlow;
+    if (inFlow) itemIndent += indentStep;
+    const allNullValues = isMap && this.hasAllNullValues();
+    ctx = Object.assign({}, ctx, {
+      allNullValues,
+      indent: itemIndent,
+      inFlow,
+      type: null
+    });
+    let chompKeep = false;
+    let hasItemWithNewLine = false;
+    const nodes = this.items.reduce((nodes, item, i) => {
+      let comment;
+
+      if (item) {
+        if (!chompKeep && item.spaceBefore) nodes.push({
+          type: 'comment',
+          str: ''
+        });
+        if (item.commentBefore) item.commentBefore.match(/^.*$/gm).forEach(line => {
+          nodes.push({
+            type: 'comment',
+            str: `#${line}`
+          });
+        });
+        if (item.comment) comment = item.comment;
+        if (inFlow && (!chompKeep && item.spaceBefore || item.commentBefore || item.comment || item.key && (item.key.commentBefore || item.key.comment) || item.value && (item.value.commentBefore || item.value.comment))) hasItemWithNewLine = true;
       }
-    } // overridden in implementations
 
-    /* istanbul ignore next */
+      chompKeep = false;
+      let str = stringify(item, ctx, () => comment = null, () => chompKeep = true);
+      if (inFlow && !hasItemWithNewLine && str.includes('\n')) hasItemWithNewLine = true;
+      if (inFlow && i < this.items.length - 1) str += ',';
+      str = addComment(str, itemIndent, comment);
+      if (chompKeep && (comment || inFlow)) chompKeep = false;
+      nodes.push({
+        type: 'item',
+        str
+      });
+      return nodes;
+    }, []);
+    let str;
+
+    if (nodes.length === 0) {
+      str = flowChars.start + flowChars.end;
+    } else if (inFlow) {
+      const {
+        start,
+        end
+      } = flowChars;
+      const strings = nodes.map(n => n.str);
+
+      if (hasItemWithNewLine || strings.reduce((sum, str) => sum + str.length + 2, 2) > Collection.maxFlowStringSingleLineLength) {
+        str = start;
 
+        for (const s of strings) {
+          str += s ? `\n${indentStep}${indent}${s}` : '\n';
+        }
+
+        str += `\n${indent}${end}`;
+      } else {
+        str = `${start} ${strings.join(' ')} ${end}`;
+      }
+    } else {
+      const strings = nodes.map(blockItem);
+      str = strings.shift();
 
-    toJSON() {
-      return null;
+      for (const s of strings) str += s ? `\n${indent}${s}` : '\n';
     }
 
-    toString(ctx, {
-      blockItem,
-      flowChars,
-      isMap,
-      itemIndent
-    }, onComment, onChompKeep) {
-      const {
-        doc,
-        indent
-      } = ctx;
-      const inFlow = this.type && this.type.substr(0, 4) === 'FLOW' || ctx.inFlow;
-      if (inFlow) itemIndent += '  ';
-      const allNullValues = isMap && this.hasAllNullValues();
-      ctx = Object.assign({}, ctx, {
-        allNullValues,
-        indent: itemIndent,
-        inFlow,
-        type: null
-      });
-      let chompKeep = false;
-      let hasItemWithNewLine = false;
-      const nodes = this.items.reduce((nodes, item, i) => {
-        let comment;
-
-        if (item) {
-          if (!chompKeep && item.spaceBefore) nodes.push({
-            type: 'comment',
-            str: ''
-          });
-          if (item.commentBefore) item.commentBefore.match(/^.*$/gm).forEach(line => {
-            nodes.push({
-              type: 'comment',
-              str: `#${line}`
-            });
-          });
-          if (item.comment) comment = item.comment;
-          if (inFlow && (!chompKeep && item.spaceBefore || item.commentBefore || item.comment || item.key && (item.key.commentBefore || item.key.comment) || item.value && (item.value.commentBefore || item.value.comment))) hasItemWithNewLine = true;
-        }
+    if (this.comment) {
+      str += '\n' + this.comment.replace(/^/gm, `${indent}#`);
+      if (onComment) onComment();
+    } else if (chompKeep && onChompKeep) onChompKeep();
 
-        chompKeep = false;
-        let str = doc.schema.stringify(item, ctx, () => comment = null, () => chompKeep = true);
-        if (inFlow && !hasItemWithNewLine && str.includes('\n')) hasItemWithNewLine = true;
-        if (inFlow && i < this.items.length - 1) str += ',';
-        str = (0, _addComment.default)(str, itemIndent, comment);
-        if (chompKeep && (comment || inFlow)) chompKeep = false;
-        nodes.push({
-          type: 'item',
-          str
-        });
-        return nodes;
-      }, []);
-      let str;
+    return str;
+  }
 
-      if (nodes.length === 0) {
-        str = flowChars.start + flowChars.end;
-      } else if (inFlow) {
-        const {
-          start,
-          end
-        } = flowChars;
-        const strings = nodes.map(n => n.str);
+}
 
-        if (hasItemWithNewLine || strings.reduce((sum, str) => sum + str.length + 2, 2) > Collection.maxFlowStringSingleLineLength) {
-          str = start;
+PlainValue$4._defineProperty(Collection, "maxFlowStringSingleLineLength", 60);
 
-          for (const s of strings) {
-            str += s ? `\n  ${indent}${s}` : '\n';
-          }
+function asItemIndex(key) {
+  let idx = key instanceof Scalar ? key.value : key;
+  if (idx && typeof idx === 'string') idx = Number(idx);
+  return Number.isInteger(idx) && idx >= 0 ? idx : null;
+}
 
-          str += `\n${indent}${end}`;
-        } else {
-          str = `${start} ${strings.join(' ')} ${end}`;
-        }
-      } else {
-        const strings = nodes.map(blockItem);
-        str = strings.shift();
+class YAMLSeq extends Collection {
+  add(value) {
+    this.items.push(value);
+  }
 
-        for (const s of strings) str += s ? `\n${indent}${s}` : '\n';
-      }
+  delete(key) {
+    const idx = asItemIndex(key);
+    if (typeof idx !== 'number') return false;
+    const del = this.items.splice(idx, 1);
+    return del.length > 0;
+  }
 
-      if (this.comment) {
-        str += '\n' + this.comment.replace(/^/gm, `${indent}#`);
-        if (onComment) onComment();
-      } else if (chompKeep && onChompKeep) onChompKeep();
+  get(key, keepScalar) {
+    const idx = asItemIndex(key);
+    if (typeof idx !== 'number') return undefined;
+    const it = this.items[idx];
+    return !keepScalar && it instanceof Scalar ? it.value : it;
+  }
 
-      return str;
-    }
+  has(key) {
+    const idx = asItemIndex(key);
+    return typeof idx === 'number' && idx < this.items.length;
+  }
 
+  set(key, value) {
+    const idx = asItemIndex(key);
+    if (typeof idx !== 'number') throw new Error(`Expected a valid index, not ${key}.`);
+    this.items[idx] = value;
   }
 
-  exports.default = Collection;
+  toJSON(_, ctx) {
+    const seq = [];
+    if (ctx && ctx.onCreate) ctx.onCreate(seq);
+    let i = 0;
 
-  _defineProperty(Collection, "maxFlowStringSingleLineLength", 60);
-});
-unwrapExports(Collection_1$1);
-var Collection_2$1 = Collection_1$1.isEmptyPath;
+    for (const item of this.items) seq.push(toJSON(item, String(i++), ctx));
 
-var Alias_1$1 = createCommonjsModule(function (module, exports) {
+    return seq;
+  }
 
-  Object.defineProperty(exports, "__esModule", {
-    value: true
-  });
-  exports.default = void 0;
+  toString(ctx, onComment, onChompKeep) {
+    if (!ctx) return JSON.stringify(this);
+    return super.toString(ctx, {
+      blockItem: n => n.type === 'comment' ? n.str : `- ${n.str}`,
+      flowChars: {
+        start: '[',
+        end: ']'
+      },
+      isMap: false,
+      itemIndent: (ctx.indent || '') + '  '
+    }, onComment, onChompKeep);
+  }
 
-  var _toJSON = _interopRequireDefault(toJSON_1);
+}
 
-  var _Collection = _interopRequireDefault(Collection_1$1);
+const stringifyKey = (key, jsKey, ctx) => {
+  if (jsKey === null) return '';
+  if (typeof jsKey !== 'object') return String(jsKey);
+  if (key instanceof Node && ctx && ctx.doc) return key.toString({
+    anchors: Object.create(null),
+    doc: ctx.doc,
+    indent: '',
+    indentStep: ctx.indentStep,
+    inFlow: true,
+    inStringifyKey: true,
+    stringify: ctx.stringify
+  });
+  return JSON.stringify(jsKey);
+};
 
-  var _Node = _interopRequireDefault(Node_1$1);
+class Pair extends Node {
+  constructor(key, value = null) {
+    super();
+    this.key = key;
+    this.value = value;
+    this.type = Pair.Type.PAIR;
+  }
 
-  var _Pair = _interopRequireDefault(Pair_1);
+  get commentBefore() {
+    return this.key instanceof Node ? this.key.commentBefore : undefined;
+  }
 
-  function _interopRequireDefault(obj) {
-    return obj && obj.__esModule ? obj : {
-      default: obj
-    };
+  set commentBefore(cb) {
+    if (this.key == null) this.key = new Scalar(null);
+    if (this.key instanceof Node) this.key.commentBefore = cb;else {
+      const msg = 'Pair.commentBefore is an alias for Pair.key.commentBefore. To set it, the key must be a Node.';
+      throw new Error(msg);
+    }
   }
 
-  function _defineProperty(obj, key, value) {
-    if (key in obj) {
-      Object.defineProperty(obj, key, {
-        value: value,
-        enumerable: true,
-        configurable: true,
-        writable: true
-      });
+  addToJSMap(ctx, map) {
+    const key = toJSON(this.key, '', ctx);
+
+    if (map instanceof Map) {
+      const value = toJSON(this.value, key, ctx);
+      map.set(key, value);
+    } else if (map instanceof Set) {
+      map.add(key);
     } else {
-      obj[key] = value;
+      const stringKey = stringifyKey(this.key, key, ctx);
+      const value = toJSON(this.value, stringKey, ctx);
+      if (stringKey in map) Object.defineProperty(map, stringKey, {
+        value,
+        writable: true,
+        enumerable: true,
+        configurable: true
+      });else map[stringKey] = value;
     }
 
-    return obj;
+    return map;
+  }
+
+  toJSON(_, ctx) {
+    const pair = ctx && ctx.mapAsMap ? new Map() : {};
+    return this.addToJSMap(ctx, pair);
   }
 
-  const getAliasCount = (node, anchors) => {
-    if (node instanceof Alias) {
-      const anchor = anchors.find(a => a.node === node.source);
-      return anchor.count * anchor.aliasCount;
-    } else if (node instanceof _Collection.default) {
-      let count = 0;
+  toString(ctx, onComment, onChompKeep) {
+    if (!ctx || !ctx.doc) return JSON.stringify(this);
+    const {
+      indent: indentSize,
+      indentSeq,
+      simpleKeys
+    } = ctx.doc.options;
+    let {
+      key,
+      value
+    } = this;
+    let keyComment = key instanceof Node && key.comment;
 
-      for (const item of node.items) {
-        const c = getAliasCount(item, anchors);
-        if (c > count) count = c;
+    if (simpleKeys) {
+      if (keyComment) {
+        throw new Error('With simple keys, key nodes cannot have comments');
       }
 
-      return count;
-    } else if (node instanceof _Pair.default) {
-      const kc = getAliasCount(node.key, anchors);
-      const vc = getAliasCount(node.value, anchors);
-      return Math.max(kc, vc);
+      if (key instanceof Collection) {
+        const msg = 'With simple keys, collection cannot be used as a key value';
+        throw new Error(msg);
+      }
     }
 
-    return 1;
-  };
-
-  class Alias extends _Node.default {
-    static stringify({
-      range,
-      source
-    }, {
-      anchors,
+    let explicitKey = !simpleKeys && (!key || keyComment || (key instanceof Node ? key instanceof Collection || key.type === PlainValue$4.Type.BLOCK_FOLDED || key.type === PlainValue$4.Type.BLOCK_LITERAL : typeof key === 'object'));
+    const {
       doc,
-      implicitKey,
-      inStringifyKey
-    }) {
-      let anchor = Object.keys(anchors).find(a => anchors[a] === source);
-      if (!anchor && inStringifyKey) anchor = doc.anchors.getName(source) || doc.anchors.newName();
-      if (anchor) return `*${anchor}${implicitKey ? ' ' : ''}`;
-      const msg = doc.anchors.getName(source) ? 'Alias node must be after source node' : 'Source node not found for alias node';
-      throw new Error(`${msg} [${range}]`);
-    }
+      indent,
+      indentStep,
+      stringify
+    } = ctx;
+    ctx = Object.assign({}, ctx, {
+      implicitKey: !explicitKey,
+      indent: indent + indentStep
+    });
+    let chompKeep = false;
+    let str = stringify(key, ctx, () => keyComment = null, () => chompKeep = true);
+    str = addComment(str, ctx.indent, keyComment);
 
-    constructor(source) {
-      super();
-      this.source = source;
-      this.type = constants.Type.ALIAS;
+    if (!explicitKey && str.length > 1024) {
+      if (simpleKeys) throw new Error('With simple keys, single line scalar must not span more than 1024 characters');
+      explicitKey = true;
     }
 
-    set tag(t) {
-      throw new Error('Alias nodes cannot have tags');
+    if (ctx.allNullValues && !simpleKeys) {
+      if (this.comment) {
+        str = addComment(str, ctx.indent, this.comment);
+        if (onComment) onComment();
+      } else if (chompKeep && !keyComment && onChompKeep) onChompKeep();
+
+      return ctx.inFlow && !explicitKey ? str : `? ${str}`;
     }
 
-    toJSON(arg, ctx) {
-      if (!ctx) return (0, _toJSON.default)(this.source, arg, ctx);
-      const {
-        anchors,
-        maxAliasCount
-      } = ctx;
-      const anchor = anchors.find(a => a.node === this.source);
-      /* istanbul ignore if */
+    str = explicitKey ? `? ${str}\n${indent}:` : `${str}:`;
 
-      if (!anchor || anchor.res === undefined) {
-        const msg = 'This should not happen: Alias anchor was not resolved?';
-        if (this.cstNode) throw new errors.YAMLReferenceError(this.cstNode, msg);else throw new ReferenceError(msg);
-      }
+    if (this.comment) {
+      // expected (but not strictly required) to be a single-line comment
+      str = addComment(str, ctx.indent, this.comment);
+      if (onComment) onComment();
+    }
 
-      if (maxAliasCount >= 0) {
-        anchor.count += 1;
-        if (anchor.aliasCount === 0) anchor.aliasCount = getAliasCount(this.source, anchors);
+    let vcb = '';
+    let valueComment = null;
 
-        if (anchor.count * anchor.aliasCount > maxAliasCount) {
-          const msg = 'Excessive alias count indicates a resource exhaustion attack';
-          if (this.cstNode) throw new errors.YAMLReferenceError(this.cstNode, msg);else throw new ReferenceError(msg);
-        }
+    if (value instanceof Node) {
+      if (value.spaceBefore) vcb = '\n';
+
+      if (value.commentBefore) {
+        const cs = value.commentBefore.replace(/^/gm, `${ctx.indent}#`);
+        vcb += `\n${cs}`;
       }
 
-      return anchor.res;
-    } // Only called when stringifying an alias mapping key while constructing
-    // Object output.
+      valueComment = value.comment;
+    } else if (value && typeof value === 'object') {
+      value = doc.schema.createNode(value, true);
+    }
 
+    ctx.implicitKey = false;
+    if (!explicitKey && !this.comment && value instanceof Scalar) ctx.indentAtStart = str.length + 1;
+    chompKeep = false;
 
-    toString(ctx) {
-      return Alias.stringify(this, ctx);
+    if (!indentSeq && indentSize >= 2 && !ctx.inFlow && !explicitKey && value instanceof YAMLSeq && value.type !== PlainValue$4.Type.FLOW_SEQ && !value.tag && !doc.anchors.getName(value)) {
+      // If indentSeq === false, consider '- ' as part of indentation where possible
+      ctx.indent = ctx.indent.substr(2);
     }
 
+    const valueStr = stringify(value, ctx, () => valueComment = null, () => chompKeep = true);
+    let ws = ' ';
+
+    if (vcb || this.comment) {
+      ws = `${vcb}\n${ctx.indent}`;
+    } else if (!explicitKey && value instanceof Collection) {
+      const flow = valueStr[0] === '[' || valueStr[0] === '{';
+      if (!flow || valueStr.includes('\n')) ws = `\n${ctx.indent}`;
+    } else if (valueStr[0] === '\n') ws = '';
+
+    if (chompKeep && !valueComment && onChompKeep) onChompKeep();
+    return addComment(str + ws + valueStr, ctx.indent, valueComment);
   }
 
-  exports.default = Alias;
+}
 
-  _defineProperty(Alias, "default", true);
+PlainValue$4._defineProperty(Pair, "Type", {
+  PAIR: 'PAIR',
+  MERGE_PAIR: 'MERGE_PAIR'
 });
-unwrapExports(Alias_1$1);
 
-var _Map = createCommonjsModule(function (module, exports) {
-
-  Object.defineProperty(exports, "__esModule", {
-    value: true
-  });
-  exports.findPair = findPair;
-  exports.default = void 0;
+const getAliasCount = (node, anchors) => {
+  if (node instanceof Alias) {
+    const anchor = anchors.get(node.source);
+    return anchor.count * anchor.aliasCount;
+  } else if (node instanceof Collection) {
+    let count = 0;
 
-  var _Collection = _interopRequireDefault(Collection_1$1);
+    for (const item of node.items) {
+      const c = getAliasCount(item, anchors);
+      if (c > count) count = c;
+    }
 
-  var _Pair = _interopRequireDefault(Pair_1);
+    return count;
+  } else if (node instanceof Pair) {
+    const kc = getAliasCount(node.key, anchors);
+    const vc = getAliasCount(node.value, anchors);
+    return Math.max(kc, vc);
+  }
 
-  var _Scalar = _interopRequireDefault(Scalar_1);
+  return 1;
+};
 
-  function _interopRequireDefault(obj) {
-    return obj && obj.__esModule ? obj : {
-      default: obj
-    };
+class Alias extends Node {
+  static stringify({
+    range,
+    source
+  }, {
+    anchors,
+    doc,
+    implicitKey,
+    inStringifyKey
+  }) {
+    let anchor = Object.keys(anchors).find(a => anchors[a] === source);
+    if (!anchor && inStringifyKey) anchor = doc.anchors.getName(source) || doc.anchors.newName();
+    if (anchor) return `*${anchor}${implicitKey ? ' ' : ''}`;
+    const msg = doc.anchors.getName(source) ? 'Alias node must be after source node' : 'Source node not found for alias node';
+    throw new Error(`${msg} [${range}]`);
   }
 
-  function findPair(items, key) {
-    const k = key instanceof _Scalar.default ? key.value : key;
-
-    for (const it of items) {
-      if (it instanceof _Pair.default) {
-        if (it.key === key || it.key === k) return it;
-        if (it.key && it.key.value === k) return it;
-      }
-    }
+  constructor(source) {
+    super();
+    this.source = source;
+    this.type = PlainValue$4.Type.ALIAS;
+  }
 
-    return undefined;
+  set tag(t) {
+    throw new Error('Alias nodes cannot have tags');
   }
 
-  class YAMLMap extends _Collection.default {
-    add(pair, overwrite) {
-      if (!pair) pair = new _Pair.default(pair);else if (!(pair instanceof _Pair.default)) pair = new _Pair.default(pair.key || pair, pair.value);
-      const prev = findPair(this.items, pair.key);
-      const sortEntries = this.schema && this.schema.sortMapEntries;
+  toJSON(arg, ctx) {
+    if (!ctx) return toJSON(this.source, arg, ctx);
+    const {
+      anchors,
+      maxAliasCount
+    } = ctx;
+    const anchor = anchors.get(this.source);
+    /* istanbul ignore if */
 
-      if (prev) {
-        if (overwrite) prev.value = pair.value;else throw new Error(`Key ${pair.key} already set`);
-      } else if (sortEntries) {
-        const i = this.items.findIndex(item => sortEntries(pair, item) < 0);
-        if (i === -1) this.items.push(pair);else this.items.splice(i, 0, pair);
-      } else {
-        this.items.push(pair);
-      }
+    if (!anchor || anchor.res === undefined) {
+      const msg = 'This should not happen: Alias anchor was not resolved?';
+      if (this.cstNode) throw new PlainValue$4.YAMLReferenceError(this.cstNode, msg);else throw new ReferenceError(msg);
     }
 
-    delete(key) {
-      const it = findPair(this.items, key);
-      if (!it) return false;
-      const del = this.items.splice(this.items.indexOf(it), 1);
-      return del.length > 0;
-    }
+    if (maxAliasCount >= 0) {
+      anchor.count += 1;
+      if (anchor.aliasCount === 0) anchor.aliasCount = getAliasCount(this.source, anchors);
 
-    get(key, keepScalar) {
-      const it = findPair(this.items, key);
-      const node = it && it.value;
-      return !keepScalar && node instanceof _Scalar.default ? node.value : node;
+      if (anchor.count * anchor.aliasCount > maxAliasCount) {
+        const msg = 'Excessive alias count indicates a resource exhaustion attack';
+        if (this.cstNode) throw new PlainValue$4.YAMLReferenceError(this.cstNode, msg);else throw new ReferenceError(msg);
+      }
     }
 
-    has(key) {
-      return !!findPair(this.items, key);
-    }
+    return anchor.res;
+  } // Only called when stringifying an alias mapping key while constructing
+  // Object output.
 
-    set(key, value) {
-      this.add(new _Pair.default(key, value), true);
-    }
-    /**
-     * @param {*} arg ignored
-     * @param {*} ctx Conversion context, originally set in Document#toJSON()
-     * @param {Class} Type If set, forces the returned collection type
-     * @returns {*} Instance of Type, Map, or Object
-     */
 
+  toString(ctx) {
+    return Alias.stringify(this, ctx);
+  }
+
+}
 
-    toJSON(_, ctx, Type) {
-      const map = Type ? new Type() : ctx && ctx.mapAsMap ? new Map() : {};
-      if (ctx && ctx.onCreate) ctx.onCreate(map);
+PlainValue$4._defineProperty(Alias, "default", true);
 
-      for (const item of this.items) item.addToJSMap(ctx, map);
+function findPair(items, key) {
+  const k = key instanceof Scalar ? key.value : key;
 
-      return map;
+  for (const it of items) {
+    if (it instanceof Pair) {
+      if (it.key === key || it.key === k) return it;
+      if (it.key && it.key.value === k) return it;
     }
+  }
 
-    toString(ctx, onComment, onChompKeep) {
-      if (!ctx) return JSON.stringify(this);
-
-      for (const item of this.items) {
-        if (!(item instanceof _Pair.default)) throw new Error(`Map items must all be pairs; found ${JSON.stringify(item)} instead`);
-      }
+  return undefined;
+}
 
-      return super.toString(ctx, {
-        blockItem: n => n.str,
-        flowChars: {
-          start: '{',
-          end: '}'
-        },
-        isMap: true,
-        itemIndent: ctx.indent || ''
-      }, onComment, onChompKeep);
+class YAMLMap extends Collection {
+  add(pair, overwrite) {
+    if (!pair) pair = new Pair(pair);else if (!(pair instanceof Pair)) pair = new Pair(pair.key || pair, pair.value);
+    const prev = findPair(this.items, pair.key);
+    const sortEntries = this.schema && this.schema.sortMapEntries;
+
+    if (prev) {
+      if (overwrite) prev.value = pair.value;else throw new Error(`Key ${pair.key} already set`);
+    } else if (sortEntries) {
+      const i = this.items.findIndex(item => sortEntries(pair, item) < 0);
+      if (i === -1) this.items.push(pair);else this.items.splice(i, 0, pair);
+    } else {
+      this.items.push(pair);
     }
+  }
 
+  delete(key) {
+    const it = findPair(this.items, key);
+    if (!it) return false;
+    const del = this.items.splice(this.items.indexOf(it), 1);
+    return del.length > 0;
   }
 
-  exports.default = YAMLMap;
-});
+  get(key, keepScalar) {
+    const it = findPair(this.items, key);
+    const node = it && it.value;
+    return !keepScalar && node instanceof Scalar ? node.value : node;
+  }
 
-unwrapExports(_Map);
-var _Map_1 = _Map.findPair;
+  has(key) {
+    return !!findPair(this.items, key);
+  }
 
-var Seq = createCommonjsModule(function (module, exports) {
+  set(key, value) {
+    this.add(new Pair(key, value), true);
+  }
+  /**
+   * @param {*} arg ignored
+   * @param {*} ctx Conversion context, originally set in Document#toJSON()
+   * @param {Class} Type If set, forces the returned collection type
+   * @returns {*} Instance of Type, Map, or Object
+   */
 
-  Object.defineProperty(exports, "__esModule", {
-    value: true
-  });
-  exports.default = void 0;
 
-  var _toJSON = _interopRequireDefault(toJSON_1);
+  toJSON(_, ctx, Type) {
+    const map = Type ? new Type() : ctx && ctx.mapAsMap ? new Map() : {};
+    if (ctx && ctx.onCreate) ctx.onCreate(map);
 
-  var _Collection = _interopRequireDefault(Collection_1$1);
+    for (const item of this.items) item.addToJSMap(ctx, map);
 
-  var _Scalar = _interopRequireDefault(Scalar_1);
+    return map;
+  }
 
-  function _interopRequireDefault(obj) {
-    return obj && obj.__esModule ? obj : {
-      default: obj
-    };
-  } // Published as 'yaml/seq'
+  toString(ctx, onComment, onChompKeep) {
+    if (!ctx) return JSON.stringify(this);
 
+    for (const item of this.items) {
+      if (!(item instanceof Pair)) throw new Error(`Map items must all be pairs; found ${JSON.stringify(item)} instead`);
+    }
 
-  function asItemIndex(key) {
-    let idx = key instanceof _Scalar.default ? key.value : key;
-    if (idx && typeof idx === 'string') idx = Number(idx);
-    return Number.isInteger(idx) && idx >= 0 ? idx : null;
+    return super.toString(ctx, {
+      blockItem: n => n.str,
+      flowChars: {
+        start: '{',
+        end: '}'
+      },
+      isMap: true,
+      itemIndent: ctx.indent || ''
+    }, onComment, onChompKeep);
   }
 
-  class YAMLSeq extends _Collection.default {
-    add(value) {
-      this.items.push(value);
-    }
+}
 
-    delete(key) {
-      const idx = asItemIndex(key);
-      if (typeof idx !== 'number') return false;
-      const del = this.items.splice(idx, 1);
-      return del.length > 0;
-    }
+const MERGE_KEY = '<<';
 
-    get(key, keepScalar) {
-      const idx = asItemIndex(key);
-      if (typeof idx !== 'number') return undefined;
-      const it = this.items[idx];
-      return !keepScalar && it instanceof _Scalar.default ? it.value : it;
-    }
+class Merge extends Pair {
+  constructor(pair) {
+    if (pair instanceof Pair) {
+      let seq = pair.value;
 
-    has(key) {
-      const idx = asItemIndex(key);
-      return typeof idx === 'number' && idx < this.items.length;
-    }
+      if (!(seq instanceof YAMLSeq)) {
+        seq = new YAMLSeq();
+        seq.items.push(pair.value);
+        seq.range = pair.value.range;
+      }
 
-    set(key, value) {
-      const idx = asItemIndex(key);
-      if (typeof idx !== 'number') throw new Error(`Expected a valid index, not ${key}.`);
-      this.items[idx] = value;
+      super(pair.key, seq);
+      this.range = pair.range;
+    } else {
+      super(new Scalar(MERGE_KEY), new YAMLSeq());
     }
 
-    toJSON(_, ctx) {
-      const seq = [];
-      if (ctx && ctx.onCreate) ctx.onCreate(seq);
-      let i = 0;
+    this.type = Pair.Type.MERGE_PAIR;
+  } // If the value associated with a merge key is a single mapping node, each of
+  // its key/value pairs is inserted into the current mapping, unless the key
+  // already exists in it. If the value associated with the merge key is a
+  // sequence, then this sequence is expected to contain mapping nodes and each
+  // of these nodes is merged in turn according to its order in the sequence.
+  // Keys in mapping nodes earlier in the sequence override keys specified in
+  // later mapping nodes. -- http://yaml.org/type/merge.html
 
-      for (const item of this.items) seq.push((0, _toJSON.default)(item, String(i++), ctx));
 
-      return seq;
+  addToJSMap(ctx, map) {
+    for (const {
+      source
+    } of this.value.items) {
+      if (!(source instanceof YAMLMap)) throw new Error('Merge sources must be maps');
+      const srcMap = source.toJSON(null, ctx, Map);
+
+      for (const [key, value] of srcMap) {
+        if (map instanceof Map) {
+          if (!map.has(key)) map.set(key, value);
+        } else if (map instanceof Set) {
+          map.add(key);
+        } else if (!Object.prototype.hasOwnProperty.call(map, key)) {
+          Object.defineProperty(map, key, {
+            value,
+            writable: true,
+            enumerable: true,
+            configurable: true
+          });
+        }
+      }
     }
 
-    toString(ctx, onComment, onChompKeep) {
-      if (!ctx) return JSON.stringify(this);
-      return super.toString(ctx, {
-        blockItem: n => n.type === 'comment' ? n.str : `- ${n.str}`,
-        flowChars: {
-          start: '[',
-          end: ']'
-        },
-        isMap: false,
-        itemIndent: (ctx.indent || '') + '  '
-      }, onComment, onChompKeep);
-    }
+    return map;
+  }
 
+  toString(ctx, onComment) {
+    const seq = this.value;
+    if (seq.items.length > 1) return super.toString(ctx, onComment);
+    this.value = seq.items[0];
+    const str = super.toString(ctx, onComment);
+    this.value = seq;
+    return str;
   }
 
-  exports.default = YAMLSeq;
-});
-unwrapExports(Seq);
+}
 
-var Merge_1 = createCommonjsModule(function (module, exports) {
+const binaryOptions = {
+  defaultType: PlainValue$4.Type.BLOCK_LITERAL,
+  lineWidth: 76
+};
+const boolOptions = {
+  trueStr: 'true',
+  falseStr: 'false'
+};
+const intOptions = {
+  asBigInt: false
+};
+const nullOptions = {
+  nullStr: 'null'
+};
+const strOptions = {
+  defaultType: PlainValue$4.Type.PLAIN,
+  doubleQuoted: {
+    jsonEncoding: false,
+    minMultiLineLength: 40
+  },
+  fold: {
+    lineWidth: 80,
+    minContentWidth: 20
+  }
+};
 
-  Object.defineProperty(exports, "__esModule", {
-    value: true
-  });
-  exports.default = exports.MERGE_KEY = void 0;
+function resolveScalar(str, tags, scalarFallback) {
+  for (const {
+    format,
+    test,
+    resolve
+  } of tags) {
+    if (test) {
+      const match = str.match(test);
+
+      if (match) {
+        let res = resolve.apply(null, match);
+        if (!(res instanceof Scalar)) res = new Scalar(res);
+        if (format) res.format = format;
+        return res;
+      }
+    }
+  }
 
-  var _Map$1 = _interopRequireDefault(_Map);
+  if (scalarFallback) str = scalarFallback(str);
+  return new Scalar(str);
+}
 
-  var _Pair = _interopRequireDefault(Pair_1);
+const FOLD_FLOW = 'flow';
+const FOLD_BLOCK = 'block';
+const FOLD_QUOTED = 'quoted'; // presumes i+1 is at the start of a line
+// returns index of last newline in more-indented block
 
-  var _Scalar = _interopRequireDefault(Scalar_1);
+const consumeMoreIndentedLines = (text, i) => {
+  let ch = text[i + 1];
 
-  var _Seq = _interopRequireDefault(Seq);
+  while (ch === ' ' || ch === '\t') {
+    do {
+      ch = text[i += 1];
+    } while (ch && ch !== '\n');
 
-  function _interopRequireDefault(obj) {
-    return obj && obj.__esModule ? obj : {
-      default: obj
-    };
+    ch = text[i + 1];
   }
 
-  const MERGE_KEY = '<<';
-  exports.MERGE_KEY = MERGE_KEY;
-
-  class Merge extends _Pair.default {
-    constructor(pair) {
-      if (pair instanceof _Pair.default) {
-        let seq = pair.value;
+  return i;
+};
+/**
+ * Tries to keep input at up to `lineWidth` characters, splitting only on spaces
+ * not followed by newlines or spaces unless `mode` is `'quoted'`. Lines are
+ * terminated with `\n` and started with `indent`.
+ *
+ * @param {string} text
+ * @param {string} indent
+ * @param {string} [mode='flow'] `'block'` prevents more-indented lines
+ *   from being folded; `'quoted'` allows for `\` escapes, including escaped
+ *   newlines
+ * @param {Object} options
+ * @param {number} [options.indentAtStart] Accounts for leading contents on
+ *   the first line, defaulting to `indent.length`
+ * @param {number} [options.lineWidth=80]
+ * @param {number} [options.minContentWidth=20] Allow highly indented lines to
+ *   stretch the line width or indent content from the start
+ * @param {function} options.onFold Called once if the text is folded
+ * @param {function} options.onFold Called once if any line of text exceeds
+ *   lineWidth characters
+ */
+
+
+function foldFlowLines(text, indent, mode, {
+  indentAtStart,
+  lineWidth = 80,
+  minContentWidth = 20,
+  onFold,
+  onOverflow
+}) {
+  if (!lineWidth || lineWidth < 0) return text;
+  const endStep = Math.max(1 + minContentWidth, 1 + lineWidth - indent.length);
+  if (text.length <= endStep) return text;
+  const folds = [];
+  const escapedFolds = {};
+  let end = lineWidth - indent.length;
+
+  if (typeof indentAtStart === 'number') {
+    if (indentAtStart > lineWidth - Math.max(2, minContentWidth)) folds.push(0);else end = lineWidth - indentAtStart;
+  }
+
+  let split = undefined;
+  let prev = undefined;
+  let overflow = false;
+  let i = -1;
+  let escStart = -1;
+  let escEnd = -1;
+
+  if (mode === FOLD_BLOCK) {
+    i = consumeMoreIndentedLines(text, i);
+    if (i !== -1) end = i + endStep;
+  }
+
+  for (let ch; ch = text[i += 1];) {
+    if (mode === FOLD_QUOTED && ch === '\\') {
+      escStart = i;
+
+      switch (text[i + 1]) {
+        case 'x':
+          i += 3;
+          break;
 
-        if (!(seq instanceof _Seq.default)) {
-          seq = new _Seq.default();
-          seq.items.push(pair.value);
-          seq.range = pair.value.range;
-        }
+        case 'u':
+          i += 5;
+          break;
 
-        super(pair.key, seq);
-        this.range = pair.range;
-      } else {
-        super(new _Scalar.default(MERGE_KEY), new _Seq.default());
-      }
+        case 'U':
+          i += 9;
+          break;
 
-      this.type = 'MERGE_PAIR';
-    } // If the value associated with a merge key is a single mapping node, each of
-    // its key/value pairs is inserted into the current mapping, unless the key
-    // already exists in it. If the value associated with the merge key is a
-    // sequence, then this sequence is expected to contain mapping nodes and each
-    // of these nodes is merged in turn according to its order in the sequence.
-    // Keys in mapping nodes earlier in the sequence override keys specified in
-    // later mapping nodes. -- http://yaml.org/type/merge.html
-
-
-    addToJSMap(ctx, map) {
-      for (const {
-        source
-      } of this.value.items) {
-        if (!(source instanceof _Map$1.default)) throw new Error('Merge sources must be maps');
-        const srcMap = source.toJSON(null, ctx, Map);
-
-        for (const [key, value] of srcMap) {
-          if (map instanceof Map) {
-            if (!map.has(key)) map.set(key, value);
-          } else if (map instanceof Set) {
-            map.add(key);
-          } else {
-            if (!Object.prototype.hasOwnProperty.call(map, key)) map[key] = value;
-          }
-        }
+        default:
+          i += 1;
       }
 
-      return map;
-    }
-
-    toString(ctx, onComment) {
-      const seq = this.value;
-      if (seq.items.length > 1) return super.toString(ctx, onComment);
-      this.value = seq.items[0];
-      const str = super.toString(ctx, onComment);
-      this.value = seq;
-      return str;
+      escEnd = i;
     }
 
-  }
+    if (ch === '\n') {
+      if (mode === FOLD_BLOCK) i = consumeMoreIndentedLines(text, i);
+      end = i + endStep;
+      split = undefined;
+    } else {
+      if (ch === ' ' && prev && prev !== ' ' && prev !== '\n' && prev !== '\t') {
+        // space surrounded by non-space can be replaced with newline + indent
+        const next = text[i + 1];
+        if (next && next !== ' ' && next !== '\n' && next !== '\t') split = i;
+      }
+
+      if (i >= end) {
+        if (split) {
+          folds.push(split);
+          end = split + endStep;
+          split = undefined;
+        } else if (mode === FOLD_QUOTED) {
+          // white-space collected at end may stretch past lineWidth
+          while (prev === ' ' || prev === '\t') {
+            prev = ch;
+            ch = text[i += 1];
+            overflow = true;
+          } // Account for newline escape, but don't break preceding escape
 
-  exports.default = Merge;
-});
-unwrapExports(Merge_1);
-var Merge_2 = Merge_1.MERGE_KEY;
 
-var Anchors_1 = createCommonjsModule(function (module, exports) {
+          const j = i > escEnd + 1 ? i - 2 : escStart - 1; // Bail out if lineWidth & minContentWidth are shorter than an escape string
 
-  Object.defineProperty(exports, "__esModule", {
-    value: true
-  });
-  exports.default = void 0;
+          if (escapedFolds[j]) return text;
+          folds.push(j);
+          escapedFolds[j] = true;
+          end = j + endStep;
+          split = undefined;
+        } else {
+          overflow = true;
+        }
+      }
+    }
 
-  var _Alias = _interopRequireDefault(Alias_1$1);
+    prev = ch;
+  }
 
-  var _Map$1 = _interopRequireDefault(_Map);
+  if (overflow && onOverflow) onOverflow();
+  if (folds.length === 0) return text;
+  if (onFold) onFold();
+  let res = text.slice(0, folds[0]);
 
-  var _Merge = _interopRequireDefault(Merge_1);
+  for (let i = 0; i < folds.length; ++i) {
+    const fold = folds[i];
+    const end = folds[i + 1] || text.length;
+    if (fold === 0) res = `\n${indent}${text.slice(0, end)}`;else {
+      if (mode === FOLD_QUOTED && escapedFolds[fold]) res += `${text[fold]}\\`;
+      res += `\n${indent}${text.slice(fold + 1, end)}`;
+    }
+  }
 
-  var _Scalar = _interopRequireDefault(Scalar_1);
+  return res;
+}
 
-  var _Seq = _interopRequireDefault(Seq);
+const getFoldOptions = ({
+  indentAtStart
+}) => indentAtStart ? Object.assign({
+  indentAtStart
+}, strOptions.fold) : strOptions.fold; // Also checks for lines starting with %, as parsing the output as YAML 1.1 will
+// presume that's starting a new document.
 
-  function _interopRequireDefault(obj) {
-    return obj && obj.__esModule ? obj : {
-      default: obj
-    };
-  }
 
-  function _defineProperty(obj, key, value) {
-    if (key in obj) {
-      Object.defineProperty(obj, key, {
-        value: value,
-        enumerable: true,
-        configurable: true,
-        writable: true
-      });
-    } else {
-      obj[key] = value;
-    }
+const containsDocumentMarker = str => /^(%|---|\.\.\.)/m.test(str);
 
-    return obj;
-  }
+function lineLengthOverLimit(str, lineWidth, indentLength) {
+  if (!lineWidth || lineWidth < 0) return false;
+  const limit = lineWidth - indentLength;
+  const strLen = str.length;
+  if (strLen <= limit) return false;
 
-  class Anchors {
-    static validAnchorNode(node) {
-      return node instanceof _Scalar.default || node instanceof _Seq.default || node instanceof _Map$1.default;
+  for (let i = 0, start = 0; i < strLen; ++i) {
+    if (str[i] === '\n') {
+      if (i - start > limit) return true;
+      start = i + 1;
+      if (strLen - start <= limit) return false;
     }
+  }
 
-    constructor(prefix) {
-      _defineProperty(this, "map", {});
-
-      this.prefix = prefix;
-    }
+  return true;
+}
 
-    createAlias(node, name) {
-      this.setAnchor(node, name);
-      return new _Alias.default(node);
-    }
+function doubleQuotedString(value, ctx) {
+  const {
+    implicitKey
+  } = ctx;
+  const {
+    jsonEncoding,
+    minMultiLineLength
+  } = strOptions.doubleQuoted;
+  const json = JSON.stringify(value);
+  if (jsonEncoding) return json;
+  const indent = ctx.indent || (containsDocumentMarker(value) ? '  ' : '');
+  let str = '';
+  let start = 0;
+
+  for (let i = 0, ch = json[i]; ch; ch = json[++i]) {
+    if (ch === ' ' && json[i + 1] === '\\' && json[i + 2] === 'n') {
+      // space before newline needs to be escaped to not be folded
+      str += json.slice(start, i) + '\\ ';
+      i += 1;
+      start = i;
+      ch = '\\';
+    }
+
+    if (ch === '\\') switch (json[i + 1]) {
+      case 'u':
+        {
+          str += json.slice(start, i);
+          const code = json.substr(i + 2, 4);
+
+          switch (code) {
+            case '0000':
+              str += '\\0';
+              break;
 
-    createMergePair(...sources) {
-      const merge = new _Merge.default();
-      merge.value.items = sources.map(s => {
-        if (s instanceof _Alias.default) {
-          if (s.source instanceof _Map$1.default) return s;
-        } else if (s instanceof _Map$1.default) {
-          return this.createAlias(s);
-        }
+            case '0007':
+              str += '\\a';
+              break;
 
-        throw new Error('Merge sources must be Map nodes or their Aliases');
-      });
-      return merge;
-    }
+            case '000b':
+              str += '\\v';
+              break;
 
-    getName(node) {
-      const {
-        map
-      } = this;
-      return Object.keys(map).find(a => map[a] === node);
-    }
+            case '001b':
+              str += '\\e';
+              break;
 
-    getNode(name) {
-      return this.map[name];
-    }
+            case '0085':
+              str += '\\N';
+              break;
 
-    newName(prefix) {
-      if (!prefix) prefix = this.prefix;
-      const names = Object.keys(this.map);
+            case '00a0':
+              str += '\\_';
+              break;
 
-      for (let i = 1; true; ++i) {
-        const name = `${prefix}${i}`;
-        if (!names.includes(name)) return name;
-      }
-    } // During parsing, map & aliases contain CST nodes
+            case '2028':
+              str += '\\L';
+              break;
 
+            case '2029':
+              str += '\\P';
+              break;
 
-    resolveNodes() {
-      const {
-        map,
-        _cstAliases
-      } = this;
-      Object.keys(map).forEach(a => {
-        map[a] = map[a].resolved;
-      });
+            default:
+              if (code.substr(0, 2) === '00') str += '\\x' + code.substr(2);else str += json.substr(i, 6);
+          }
 
-      _cstAliases.forEach(a => {
-        a.source = a.source.resolved;
-      });
+          i += 5;
+          start = i + 1;
+        }
+        break;
 
-      delete this._cstAliases;
-    }
+      case 'n':
+        if (implicitKey || json[i + 2] === '"' || json.length < minMultiLineLength) {
+          i += 1;
+        } else {
+          // folding will eat first newline
+          str += json.slice(start, i) + '\n\n';
 
-    setAnchor(node, name) {
-      if (node != null && !Anchors.validAnchorNode(node)) {
-        throw new Error('Anchors may only be set for Scalar, Seq and Map nodes');
-      }
+          while (json[i + 2] === '\\' && json[i + 3] === 'n' && json[i + 4] !== '"') {
+            str += '\n';
+            i += 2;
+          }
 
-      if (name && /[\x00-\x19\s,[\]{}]/.test(name)) {
-        throw new Error('Anchor names must not contain whitespace or control characters');
-      }
+          str += indent; // space after newline needs to be escaped to not be folded
 
-      const {
-        map
-      } = this;
-      const prev = node && Object.keys(map).find(a => map[a] === node);
-
-      if (prev) {
-        if (!name) {
-          return prev;
-        } else if (prev !== name) {
-          delete map[prev];
-          map[name] = node;
-        }
-      } else {
-        if (!name) {
-          if (!node) return null;
-          name = this.newName();
+          if (json[i + 2] === ' ') str += '\\';
+          i += 1;
+          start = i + 1;
         }
 
-        map[name] = node;
-      }
+        break;
 
-      return name;
+      default:
+        i += 1;
     }
-
   }
 
-  exports.default = Anchors;
-});
-unwrapExports(Anchors_1);
+  str = start ? str + json.slice(start) : json;
+  return implicitKey ? str : foldFlowLines(str, indent, FOLD_QUOTED, getFoldOptions(ctx));
+}
 
-var listTagNames = createCommonjsModule(function (module, exports) {
+function singleQuotedString(value, ctx) {
+  if (ctx.implicitKey) {
+    if (/\n/.test(value)) return doubleQuotedString(value, ctx);
+  } else {
+    // single quoted string can't have leading or trailing whitespace around newline
+    if (/[ \t]\n|\n[ \t]/.test(value)) return doubleQuotedString(value, ctx);
+  }
+
+  const indent = ctx.indent || (containsDocumentMarker(value) ? '  ' : '');
+  const res = "'" + value.replace(/'/g, "''").replace(/\n+/g, `$&\n${indent}`) + "'";
+  return ctx.implicitKey ? res : foldFlowLines(res, indent, FOLD_FLOW, getFoldOptions(ctx));
+}
 
-  Object.defineProperty(exports, "__esModule", {
-    value: true
+function blockString({
+  comment,
+  type,
+  value
+}, ctx, onComment, onChompKeep) {
+  // 1. Block can't end in whitespace unless the last line is non-empty.
+  // 2. Strings consisting of only whitespace are best rendered explicitly.
+  if (/\n[\t ]+$/.test(value) || /^\s*$/.test(value)) {
+    return doubleQuotedString(value, ctx);
+  }
+
+  const indent = ctx.indent || (ctx.forceBlockIndent || containsDocumentMarker(value) ? '  ' : '');
+  const indentSize = indent ? '2' : '1'; // root is at -1
+
+  const literal = type === PlainValue$4.Type.BLOCK_FOLDED ? false : type === PlainValue$4.Type.BLOCK_LITERAL ? true : !lineLengthOverLimit(value, strOptions.fold.lineWidth, indent.length);
+  let header = literal ? '|' : '>';
+  if (!value) return header + '\n';
+  let wsStart = '';
+  let wsEnd = '';
+  value = value.replace(/[\n\t ]*$/, ws => {
+    const n = ws.indexOf('\n');
+
+    if (n === -1) {
+      header += '-'; // strip
+    } else if (value === ws || n !== ws.length - 1) {
+      header += '+'; // keep
+
+      if (onChompKeep) onChompKeep();
+    }
+
+    wsEnd = ws.replace(/\n$/, '');
+    return '';
+  }).replace(/^[\n ]*/, ws => {
+    if (ws.indexOf(' ') !== -1) header += indentSize;
+    const m = ws.match(/ +$/);
+
+    if (m) {
+      wsStart = ws.slice(0, -m[0].length);
+      return m[0];
+    } else {
+      wsStart = ws;
+      return '';
+    }
   });
-  exports.default = void 0;
-
-  var _Collection = _interopRequireDefault(Collection_1$1);
+  if (wsEnd) wsEnd = wsEnd.replace(/\n+(?!\n|$)/g, `$&${indent}`);
+  if (wsStart) wsStart = wsStart.replace(/\n+/g, `$&${indent}`);
 
-  var _Pair = _interopRequireDefault(Pair_1);
+  if (comment) {
+    header += ' #' + comment.replace(/ ?[\r\n]+/g, ' ');
+    if (onComment) onComment();
+  }
 
-  var _Scalar = _interopRequireDefault(Scalar_1);
+  if (!value) return `${header}${indentSize}\n${indent}${wsEnd}`;
 
-  function _interopRequireDefault(obj) {
-    return obj && obj.__esModule ? obj : {
-      default: obj
-    };
+  if (literal) {
+    value = value.replace(/\n+/g, `$&${indent}`);
+    return `${header}\n${indent}${wsStart}${value}${wsEnd}`;
   }
 
-  const visit = (node, tags) => {
-    if (node && typeof node === 'object') {
-      const {
-        tag
-      } = node;
-
-      if (node instanceof _Collection.default) {
-        if (tag) tags[tag] = true;
-        node.items.forEach(n => visit(n, tags));
-      } else if (node instanceof _Pair.default) {
-        visit(node.key, tags);
-        visit(node.value, tags);
-      } else if (node instanceof _Scalar.default) {
-        if (tag) tags[tag] = true;
-      }
-    }
+  value = value.replace(/\n+/g, '\n$&').replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g, '$1$2') // more-indented lines aren't folded
+  //         ^ ind.line  ^ empty     ^ capture next empty lines only at end of indent
+  .replace(/\n+/g, `$&${indent}`);
+  const body = foldFlowLines(`${wsStart}${value}${wsEnd}`, indent, FOLD_BLOCK, strOptions.fold);
+  return `${header}\n${indent}${body}`;
+}
 
-    return tags;
-  };
+function plainString(item, ctx, onComment, onChompKeep) {
+  const {
+    comment,
+    type,
+    value
+  } = item;
+  const {
+    actualString,
+    implicitKey,
+    indent,
+    inFlow
+  } = ctx;
 
-  var _default = node => Object.keys(visit(node, {}));
+  if (implicitKey && /[\n[\]{},]/.test(value) || inFlow && /[[\]{},]/.test(value)) {
+    return doubleQuotedString(value, ctx);
+  }
 
-  exports.default = _default;
-});
-unwrapExports(listTagNames);
+  if (!value || /^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(value)) {
+    // not allowed:
+    // - empty string, '-' or '?'
+    // - start with an indicator character (except [?:-]) or /[?-] /
+    // - '\n ', ': ' or ' \n' anywhere
+    // - '#' not preceded by a non-space char
+    // - end with ' ' or ':'
+    return implicitKey || inFlow || value.indexOf('\n') === -1 ? value.indexOf('"') !== -1 && value.indexOf("'") === -1 ? singleQuotedString(value, ctx) : doubleQuotedString(value, ctx) : blockString(item, ctx, onComment, onChompKeep);
+  }
 
-var warnings = createCommonjsModule(function (module, exports) {
+  if (!implicitKey && !inFlow && type !== PlainValue$4.Type.PLAIN && value.indexOf('\n') !== -1) {
+    // Where allowed & type not set explicitly, prefer block style for multiline strings
+    return blockString(item, ctx, onComment, onChompKeep);
+  }
 
-  Object.defineProperty(exports, "__esModule", {
-    value: true
-  });
-  exports.warn = warn;
-  exports.warnFileDeprecation = warnFileDeprecation;
-  exports.warnOptionDeprecation = warnOptionDeprecation;
-  /* global global, console */
+  if (indent === '' && containsDocumentMarker(value)) {
+    ctx.forceBlockIndent = true;
+    return blockString(item, ctx, onComment, onChompKeep);
+  }
 
-  function warn(warning, type) {
-    if (global && global._YAML_SILENCE_WARNINGS) return;
-    const {
-      emitWarning
-    } = global && global.process; // This will throw in Jest if `warning` is an Error instance due to
-    // https://github.com/facebook/jest/issues/2549
+  const str = value.replace(/\n+/g, `$&\n${indent}`); // Verify that output will be parsed as a string, as e.g. plain numbers and
+  // booleans get parsed with those types in v1.2 (e.g. '42', 'true' & '0.9e-3'),
+  // and others in v1.1.
 
-    if (emitWarning) emitWarning(warning, type);else {
-      // eslint-disable-next-line no-console
-      console.warn(type ? `${type}: ${warning}` : warning);
-    }
+  if (actualString) {
+    const {
+      tags
+    } = ctx.doc.schema;
+    const resolved = resolveScalar(str, tags, tags.scalarFallback).value;
+    if (typeof resolved !== 'string') return doubleQuotedString(value, ctx);
   }
 
-  function warnFileDeprecation(filename) {
-    if (global && global._YAML_SILENCE_DEPRECATION_WARNINGS) return;
-    const path = filename.replace(/.*yaml[/\\]/i, '').replace(/\.js$/, '').replace(/\\/g, '/');
-    warn(`The endpoint 'yaml/${path}' will be removed in a future release.`, 'DeprecationWarning');
+  const body = implicitKey ? str : foldFlowLines(str, indent, FOLD_FLOW, getFoldOptions(ctx));
+
+  if (comment && !inFlow && (body.indexOf('\n') !== -1 || comment.indexOf('\n') !== -1)) {
+    if (onComment) onComment();
+    return addCommentBefore(body, indent, comment);
   }
 
-  const warned = {};
+  return body;
+}
 
-  function warnOptionDeprecation(name, alternative) {
-    if (global && global._YAML_SILENCE_DEPRECATION_WARNINGS) return;
-    if (warned[name]) return;
-    warned[name] = true;
-    let msg = `The option '${name}' will be removed in a future release`;
-    msg += alternative ? `, use '${alternative}' instead.` : '.';
-    warn(msg, 'DeprecationWarning');
-  }
-});
-unwrapExports(warnings);
-var warnings_1 = warnings.warn;
-var warnings_2 = warnings.warnFileDeprecation;
-var warnings_3 = warnings.warnOptionDeprecation;
+function stringifyString(item, ctx, onComment, onChompKeep) {
+  const {
+    defaultType
+  } = strOptions;
+  const {
+    implicitKey,
+    inFlow
+  } = ctx;
+  let {
+    type,
+    value
+  } = item;
 
-var foldFlowLines_1 = createCommonjsModule(function (module, exports) {
+  if (typeof value !== 'string') {
+    value = String(value);
+    item = Object.assign({}, item, {
+      value
+    });
+  }
 
-  Object.defineProperty(exports, "__esModule", {
-    value: true
-  });
-  exports.default = foldFlowLines;
-  exports.FOLD_QUOTED = exports.FOLD_BLOCK = exports.FOLD_FLOW = void 0;
-  const FOLD_FLOW = 'flow';
-  exports.FOLD_FLOW = FOLD_FLOW;
-  const FOLD_BLOCK = 'block';
-  exports.FOLD_BLOCK = FOLD_BLOCK;
-  const FOLD_QUOTED = 'quoted'; // presumes i+1 is at the start of a line
-  // returns index of last newline in more-indented block
+  const _stringify = _type => {
+    switch (_type) {
+      case PlainValue$4.Type.BLOCK_FOLDED:
+      case PlainValue$4.Type.BLOCK_LITERAL:
+        return blockString(item, ctx, onComment, onChompKeep);
 
-  exports.FOLD_QUOTED = FOLD_QUOTED;
+      case PlainValue$4.Type.QUOTE_DOUBLE:
+        return doubleQuotedString(value, ctx);
 
-  const consumeMoreIndentedLines = (text, i) => {
-    let ch = text[i + 1];
+      case PlainValue$4.Type.QUOTE_SINGLE:
+        return singleQuotedString(value, ctx);
 
-    while (ch === ' ' || ch === '\t') {
-      do {
-        ch = text[i += 1];
-      } while (ch && ch !== '\n');
+      case PlainValue$4.Type.PLAIN:
+        return plainString(item, ctx, onComment, onChompKeep);
 
-      ch = text[i + 1];
+      default:
+        return null;
     }
-
-    return i;
   };
-  /**
-   * Tries to keep input at up to `lineWidth` characters, splitting only on spaces
-   * not followed by newlines or spaces unless `mode` is `'quoted'`. Lines are
-   * terminated with `\n` and started with `indent`.
-   *
-   * @param {string} text
-   * @param {string} indent
-   * @param {string} [mode='flow'] `'block'` prevents more-indented lines
-   *   from being folded; `'quoted'` allows for `\` escapes, including escaped
-   *   newlines
-   * @param {Object} options
-   * @param {number} [options.indentAtStart] Accounts for leading contents on
-   *   the first line, defaulting to `indent.length`
-   * @param {number} [options.lineWidth=80]
-   * @param {number} [options.minContentWidth=20] Allow highly indented lines to
-   *   stretch the line width
-   * @param {function} options.onFold Called once if the text is folded
-   * @param {function} options.onFold Called once if any line of text exceeds
-   *   lineWidth characters
-   */
 
+  if (type !== PlainValue$4.Type.QUOTE_DOUBLE && /[\x00-\x08\x0b-\x1f\x7f-\x9f]/.test(value)) {
+    // force double quotes on control characters
+    type = PlainValue$4.Type.QUOTE_DOUBLE;
+  } else if ((implicitKey || inFlow) && (type === PlainValue$4.Type.BLOCK_FOLDED || type === PlainValue$4.Type.BLOCK_LITERAL)) {
+    // should not happen; blocks are not valid inside flow containers
+    type = PlainValue$4.Type.QUOTE_DOUBLE;
+  }
 
-  function foldFlowLines(text, indent, mode, {
-    indentAtStart,
-    lineWidth = 80,
-    minContentWidth = 20,
-    onFold,
-    onOverflow
-  }) {
-    if (!lineWidth || lineWidth < 0) return text;
-    const endStep = Math.max(1 + minContentWidth, 1 + lineWidth - indent.length);
-    if (text.length <= endStep) return text;
-    const folds = [];
-    const escapedFolds = {};
-    let end = lineWidth - (typeof indentAtStart === 'number' ? indentAtStart : indent.length);
-    let split = undefined;
-    let prev = undefined;
-    let overflow = false;
-    let i = -1;
-
-    if (mode === FOLD_BLOCK) {
-      i = consumeMoreIndentedLines(text, i);
-      if (i !== -1) end = i + endStep;
-    }
-
-    for (let ch; ch = text[i += 1];) {
-      if (mode === FOLD_QUOTED && ch === '\\') {
-        switch (text[i + 1]) {
-          case 'x':
-            i += 3;
-            break;
-
-          case 'u':
-            i += 5;
-            break;
+  let res = _stringify(type);
 
-          case 'U':
-            i += 9;
-            break;
+  if (res === null) {
+    res = _stringify(defaultType);
+    if (res === null) throw new Error(`Unsupported default string type ${defaultType}`);
+  }
 
-          default:
-            i += 1;
-        }
-      }
+  return res;
+}
 
-      if (ch === '\n') {
-        if (mode === FOLD_BLOCK) i = consumeMoreIndentedLines(text, i);
-        end = i + endStep;
-        split = undefined;
-      } else {
-        if (ch === ' ' && prev && prev !== ' ' && prev !== '\n' && prev !== '\t') {
-          // space surrounded by non-space can be replaced with newline + indent
-          const next = text[i + 1];
-          if (next && next !== ' ' && next !== '\n' && next !== '\t') split = i;
-        }
+function stringifyNumber({
+  format,
+  minFractionDigits,
+  tag,
+  value
+}) {
+  if (typeof value === 'bigint') return String(value);
+  if (!isFinite(value)) return isNaN(value) ? '.nan' : value < 0 ? '-.inf' : '.inf';
+  let n = JSON.stringify(value);
 
-        if (i >= end) {
-          if (split) {
-            folds.push(split);
-            end = split + endStep;
-            split = undefined;
-          } else if (mode === FOLD_QUOTED) {
-            // white-space collected at end may stretch past lineWidth
-            while (prev === ' ' || prev === '\t') {
-              prev = ch;
-              ch = text[i += 1];
-              overflow = true;
-            } // i - 2 accounts for not-dropped last char + newline-escaping \
-
-
-            folds.push(i - 2);
-            escapedFolds[i - 2] = true;
-            end = i - 2 + endStep;
-            split = undefined;
-          } else {
-            overflow = true;
-          }
-        }
-      }
+  if (!format && minFractionDigits && (!tag || tag === 'tag:yaml.org,2002:float') && /^\d/.test(n)) {
+    let i = n.indexOf('.');
 
-      prev = ch;
+    if (i < 0) {
+      i = n.length;
+      n += '.';
     }
 
-    if (overflow && onOverflow) onOverflow();
-    if (folds.length === 0) return text;
-    if (onFold) onFold();
-    let res = text.slice(0, folds[0]);
-
-    for (let i = 0; i < folds.length; ++i) {
-      const fold = folds[i];
-      const end = folds[i + 1] || text.length;
-      if (mode === FOLD_QUOTED && escapedFolds[fold]) res += `${text[fold]}\\`;
-      res += `\n${indent}${text.slice(fold + 1, end)}`;
-    }
+    let d = minFractionDigits - (n.length - i - 1);
 
-    return res;
+    while (d-- > 0) n += '0';
   }
-});
-unwrapExports(foldFlowLines_1);
-var foldFlowLines_2 = foldFlowLines_1.FOLD_QUOTED;
-var foldFlowLines_3 = foldFlowLines_1.FOLD_BLOCK;
-var foldFlowLines_4 = foldFlowLines_1.FOLD_FLOW;
 
-var options = createCommonjsModule(function (module, exports) {
+  return n;
+}
 
-  Object.defineProperty(exports, "__esModule", {
-    value: true
-  });
-  exports.strOptions = exports.nullOptions = exports.boolOptions = exports.binaryOptions = void 0;
-  const binaryOptions = {
-    defaultType: constants.Type.BLOCK_LITERAL,
-    lineWidth: 76
-  };
-  exports.binaryOptions = binaryOptions;
-  const boolOptions = {
-    trueStr: 'true',
-    falseStr: 'false'
-  };
-  exports.boolOptions = boolOptions;
-  const nullOptions = {
-    nullStr: 'null'
-  };
-  exports.nullOptions = nullOptions;
-  const strOptions = {
-    defaultType: constants.Type.PLAIN,
-    doubleQuoted: {
-      jsonEncoding: false,
-      minMultiLineLength: 40
-    },
-    fold: {
-      lineWidth: 80,
-      minContentWidth: 20
-    }
-  };
-  exports.strOptions = strOptions;
-});
-unwrapExports(options);
-var options_1 = options.strOptions;
-var options_2 = options.nullOptions;
-var options_3 = options.boolOptions;
-var options_4 = options.binaryOptions;
+function checkFlowCollectionEnd(errors, cst) {
+  let char, name;
 
-var stringify = createCommonjsModule(function (module, exports) {
+  switch (cst.type) {
+    case PlainValue$4.Type.FLOW_MAP:
+      char = '}';
+      name = 'flow map';
+      break;
 
-  Object.defineProperty(exports, "__esModule", {
-    value: true
-  });
-  exports.stringifyNumber = stringifyNumber;
-  exports.stringifyString = stringifyString;
+    case PlainValue$4.Type.FLOW_SEQ:
+      char = ']';
+      name = 'flow sequence';
+      break;
 
-  var _foldFlowLines = _interopRequireWildcard(foldFlowLines_1);
+    default:
+      errors.push(new PlainValue$4.YAMLSemanticError(cst, 'Not a flow collection!?'));
+      return;
+  }
 
-  function _getRequireWildcardCache() {
-    if (typeof WeakMap !== "function") return null;
-    var cache = new WeakMap();
+  let lastItem;
 
-    _getRequireWildcardCache = function () {
-      return cache;
-    };
+  for (let i = cst.items.length - 1; i >= 0; --i) {
+    const item = cst.items[i];
 
-    return cache;
+    if (!item || item.type !== PlainValue$4.Type.COMMENT) {
+      lastItem = item;
+      break;
+    }
   }
 
-  function _interopRequireWildcard(obj) {
-    if (obj && obj.__esModule) {
-      return obj;
-    }
+  if (lastItem && lastItem.char !== char) {
+    const msg = `Expected ${name} to end with ${char}`;
+    let err;
 
-    if (obj === null || typeof obj !== "object" && typeof obj !== "function") {
-      return {
-        default: obj
-      };
+    if (typeof lastItem.offset === 'number') {
+      err = new PlainValue$4.YAMLSemanticError(cst, msg);
+      err.offset = lastItem.offset + 1;
+    } else {
+      err = new PlainValue$4.YAMLSemanticError(lastItem, msg);
+      if (lastItem.range && lastItem.range.end) err.offset = lastItem.range.end - lastItem.range.start;
     }
 
-    var cache = _getRequireWildcardCache();
+    errors.push(err);
+  }
+}
 
-    if (cache && cache.has(obj)) {
-      return cache.get(obj);
-    }
+function checkFlowCommentSpace(errors, comment) {
+  const prev = comment.context.src[comment.range.start - 1];
+
+  if (prev !== '\n' && prev !== '\t' && prev !== ' ') {
+    const msg = 'Comments must be separated from other tokens by white space characters';
+    errors.push(new PlainValue$4.YAMLSemanticError(comment, msg));
+  }
+}
 
-    var newObj = {};
-    var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
+function getLongKeyError(source, key) {
+  const sk = String(key);
+  const k = sk.substr(0, 8) + '...' + sk.substr(-8);
+  return new PlainValue$4.YAMLSemanticError(source, `The "${k}" key is too long`);
+}
 
-    for (var key in obj) {
-      if (Object.prototype.hasOwnProperty.call(obj, key)) {
-        var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
+function resolveComments(collection, comments) {
+  for (const {
+    afterKey,
+    before,
+    comment
+  } of comments) {
+    let item = collection.items[before];
 
-        if (desc && (desc.get || desc.set)) {
-          Object.defineProperty(newObj, key, desc);
-        } else {
-          newObj[key] = obj[key];
-        }
+    if (!item) {
+      if (comment !== undefined) {
+        if (collection.comment) collection.comment += '\n' + comment;else collection.comment = comment;
       }
-    }
-
-    newObj.default = obj;
+    } else {
+      if (afterKey && item.value) item = item.value;
 
-    if (cache) {
-      cache.set(obj, newObj);
+      if (comment === undefined) {
+        if (afterKey || !item.commentBefore) item.spaceBefore = true;
+      } else {
+        if (item.commentBefore) item.commentBefore += '\n' + comment;else item.commentBefore = comment;
+      }
     }
-
-    return newObj;
   }
+} // on error, will return { str: string, errors: Error[] }
 
-  const getFoldOptions = ({
-    indentAtStart
-  }) => indentAtStart ? Object.assign({
-    indentAtStart
-  }, options.strOptions.fold) : options.strOptions.fold;
 
-  function stringifyNumber({
-    format,
-    minFractionDigits,
-    tag,
-    value
-  }) {
-    if (!isFinite(value)) return isNaN(value) ? '.nan' : value < 0 ? '-.inf' : '.inf';
-    let n = JSON.stringify(value);
+function resolveString(doc, node) {
+  const res = node.strValue;
+  if (!res) return '';
+  if (typeof res === 'string') return res;
+  res.errors.forEach(error => {
+    if (!error.source) error.source = node;
+    doc.errors.push(error);
+  });
+  return res.str;
+}
 
-    if (!format && minFractionDigits && (!tag || tag === 'tag:yaml.org,2002:float') && /^\d/.test(n)) {
-      let i = n.indexOf('.');
+function resolveTagHandle(doc, node) {
+  const {
+    handle,
+    suffix
+  } = node.tag;
+  let prefix = doc.tagPrefixes.find(p => p.handle === handle);
 
-      if (i < 0) {
-        i = n.length;
-        n += '.';
-      }
+  if (!prefix) {
+    const dtp = doc.getDefaults().tagPrefixes;
+    if (dtp) prefix = dtp.find(p => p.handle === handle);
+    if (!prefix) throw new PlainValue$4.YAMLSemanticError(node, `The ${handle} tag handle is non-default and was not declared.`);
+  }
 
-      let d = minFractionDigits - (n.length - i - 1);
+  if (!suffix) throw new PlainValue$4.YAMLSemanticError(node, `The ${handle} tag has no suffix.`);
 
-      while (d-- > 0) n += '0';
+  if (handle === '!' && (doc.version || doc.options.version) === '1.0') {
+    if (suffix[0] === '^') {
+      doc.warnings.push(new PlainValue$4.YAMLWarning(node, 'YAML 1.0 ^ tag expansion is not supported'));
+      return suffix;
     }
 
-    return n;
+    if (/[:/]/.test(suffix)) {
+      // word/foo -> tag:word.yaml.org,2002:foo
+      const vocab = suffix.match(/^([a-z0-9-]+)\/(.*)/i);
+      return vocab ? `tag:${vocab[1]}.yaml.org,2002:${vocab[2]}` : `tag:${suffix}`;
+    }
   }
 
-  function lineLengthOverLimit(str, limit) {
-    const strLen = str.length;
-    if (strLen <= limit) return false;
+  return prefix.prefix + decodeURIComponent(suffix);
+}
+
+function resolveTagName(doc, node) {
+  const {
+    tag,
+    type
+  } = node;
+  let nonSpecific = false;
 
-    for (let i = 0, start = 0; i < strLen; ++i) {
-      if (str[i] === '\n') {
-        if (i - start > limit) return true;
-        start = i + 1;
-        if (strLen - start <= limit) return false;
+  if (tag) {
+    const {
+      handle,
+      suffix,
+      verbatim
+    } = tag;
+
+    if (verbatim) {
+      if (verbatim !== '!' && verbatim !== '!!') return verbatim;
+      const msg = `Verbatim tags aren't resolved, so ${verbatim} is invalid.`;
+      doc.errors.push(new PlainValue$4.YAMLSemanticError(node, msg));
+    } else if (handle === '!' && !suffix) {
+      nonSpecific = true;
+    } else {
+      try {
+        return resolveTagHandle(doc, node);
+      } catch (error) {
+        doc.errors.push(error);
       }
     }
-
-    return true;
   }
 
-  function doubleQuotedString(value, ctx) {
-    const {
-      implicitKey,
-      indent
-    } = ctx;
-    const {
-      jsonEncoding,
-      minMultiLineLength
-    } = options.strOptions.doubleQuoted;
-    const json = JSON.stringify(value);
-    if (jsonEncoding) return json;
-    let str = '';
-    let start = 0;
+  switch (type) {
+    case PlainValue$4.Type.BLOCK_FOLDED:
+    case PlainValue$4.Type.BLOCK_LITERAL:
+    case PlainValue$4.Type.QUOTE_DOUBLE:
+    case PlainValue$4.Type.QUOTE_SINGLE:
+      return PlainValue$4.defaultTags.STR;
 
-    for (let i = 0, ch = json[i]; ch; ch = json[++i]) {
-      if (ch === ' ' && json[i + 1] === '\\' && json[i + 2] === 'n') {
-        // space before newline needs to be escaped to not be folded
-        str += json.slice(start, i) + '\\ ';
-        i += 1;
-        start = i;
-        ch = '\\';
-      }
+    case PlainValue$4.Type.FLOW_MAP:
+    case PlainValue$4.Type.MAP:
+      return PlainValue$4.defaultTags.MAP;
 
-      if (ch === '\\') switch (json[i + 1]) {
-        case 'u':
-          {
-            str += json.slice(start, i);
-            const code = json.substr(i + 2, 4);
+    case PlainValue$4.Type.FLOW_SEQ:
+    case PlainValue$4.Type.SEQ:
+      return PlainValue$4.defaultTags.SEQ;
 
-            switch (code) {
-              case '0000':
-                str += '\\0';
-                break;
+    case PlainValue$4.Type.PLAIN:
+      return nonSpecific ? PlainValue$4.defaultTags.STR : null;
 
-              case '0007':
-                str += '\\a';
-                break;
+    default:
+      return null;
+  }
+}
 
-              case '000b':
-                str += '\\v';
-                break;
+function resolveByTagName(doc, node, tagName) {
+  const {
+    tags
+  } = doc.schema;
+  const matchWithTest = [];
 
-              case '001b':
-                str += '\\e';
-                break;
+  for (const tag of tags) {
+    if (tag.tag === tagName) {
+      if (tag.test) matchWithTest.push(tag);else {
+        const res = tag.resolve(doc, node);
+        return res instanceof Collection ? res : new Scalar(res);
+      }
+    }
+  }
 
-              case '0085':
-                str += '\\N';
-                break;
+  const str = resolveString(doc, node);
+  if (typeof str === 'string' && matchWithTest.length > 0) return resolveScalar(str, matchWithTest, tags.scalarFallback);
+  return null;
+}
 
-              case '00a0':
-                str += '\\_';
-                break;
+function getFallbackTagName({
+  type
+}) {
+  switch (type) {
+    case PlainValue$4.Type.FLOW_MAP:
+    case PlainValue$4.Type.MAP:
+      return PlainValue$4.defaultTags.MAP;
 
-              case '2028':
-                str += '\\L';
-                break;
+    case PlainValue$4.Type.FLOW_SEQ:
+    case PlainValue$4.Type.SEQ:
+      return PlainValue$4.defaultTags.SEQ;
 
-              case '2029':
-                str += '\\P';
-                break;
+    default:
+      return PlainValue$4.defaultTags.STR;
+  }
+}
 
-              default:
-                if (code.substr(0, 2) === '00') str += '\\x' + code.substr(2);else str += json.substr(i, 6);
-            }
+function resolveTag(doc, node, tagName) {
+  try {
+    const res = resolveByTagName(doc, node, tagName);
 
-            i += 5;
-            start = i + 1;
-          }
-          break;
+    if (res) {
+      if (tagName && node.tag) res.tag = tagName;
+      return res;
+    }
+  } catch (error) {
+    /* istanbul ignore if */
+    if (!error.source) error.source = node;
+    doc.errors.push(error);
+    return null;
+  }
 
-        case 'n':
-          if (implicitKey || json[i + 2] === '"' || json.length < minMultiLineLength) {
-            i += 1;
-          } else {
-            // folding will eat first newline
-            str += json.slice(start, i) + '\n\n';
+  try {
+    const fallback = getFallbackTagName(node);
+    if (!fallback) throw new Error(`The tag ${tagName} is unavailable`);
+    const msg = `The tag ${tagName} is unavailable, falling back to ${fallback}`;
+    doc.warnings.push(new PlainValue$4.YAMLWarning(node, msg));
+    const res = resolveByTagName(doc, node, fallback);
+    res.tag = tagName;
+    return res;
+  } catch (error) {
+    const refError = new PlainValue$4.YAMLReferenceError(node, error.message);
+    refError.stack = error.stack;
+    doc.errors.push(refError);
+    return null;
+  }
+}
 
-            while (json[i + 2] === '\\' && json[i + 3] === 'n' && json[i + 4] !== '"') {
-              str += '\n';
-              i += 2;
-            }
+const isCollectionItem = node => {
+  if (!node) return false;
+  const {
+    type
+  } = node;
+  return type === PlainValue$4.Type.MAP_KEY || type === PlainValue$4.Type.MAP_VALUE || type === PlainValue$4.Type.SEQ_ITEM;
+};
 
-            str += indent; // space after newline needs to be escaped to not be folded
+function resolveNodeProps(errors, node) {
+  const comments = {
+    before: [],
+    after: []
+  };
+  let hasAnchor = false;
+  let hasTag = false;
+  const props = isCollectionItem(node.context.parent) ? node.context.parent.props.concat(node.props) : node.props;
 
-            if (json[i + 2] === ' ') str += '\\';
-            i += 1;
-            start = i + 1;
+  for (const {
+    start,
+    end
+  } of props) {
+    switch (node.context.src[start]) {
+      case PlainValue$4.Char.COMMENT:
+        {
+          if (!node.commentHasRequiredWhitespace(start)) {
+            const msg = 'Comments must be separated from other tokens by white space characters';
+            errors.push(new PlainValue$4.YAMLSemanticError(node, msg));
           }
 
+          const {
+            header,
+            valueRange
+          } = node;
+          const cc = valueRange && (start > valueRange.start || header && start > header.start) ? comments.after : comments.before;
+          cc.push(node.context.src.slice(start + 1, end));
           break;
+        }
+      // Actual anchor & tag resolution is handled by schema, here we just complain
 
-        default:
-          i += 1;
-      }
-    }
+      case PlainValue$4.Char.ANCHOR:
+        if (hasAnchor) {
+          const msg = 'A node can have at most one anchor';
+          errors.push(new PlainValue$4.YAMLSemanticError(node, msg));
+        }
 
-    str = start ? str + json.slice(start) : json;
-    return implicitKey ? str : (0, _foldFlowLines.default)(str, indent, _foldFlowLines.FOLD_QUOTED, getFoldOptions(ctx));
-  }
+        hasAnchor = true;
+        break;
 
-  function singleQuotedString(value, ctx) {
-    const {
-      indent,
-      implicitKey
-    } = ctx;
+      case PlainValue$4.Char.TAG:
+        if (hasTag) {
+          const msg = 'A node can have at most one tag';
+          errors.push(new PlainValue$4.YAMLSemanticError(node, msg));
+        }
 
-    if (implicitKey) {
-      if (/\n/.test(value)) return doubleQuotedString(value, ctx);
-    } else {
-      // single quoted string can't have leading or trailing whitespace around newline
-      if (/[ \t]\n|\n[ \t]/.test(value)) return doubleQuotedString(value, ctx);
+        hasTag = true;
+        break;
     }
-
-    const res = "'" + value.replace(/'/g, "''").replace(/\n+/g, `$&\n${indent}`) + "'";
-    return implicitKey ? res : (0, _foldFlowLines.default)(res, indent, _foldFlowLines.FOLD_FLOW, getFoldOptions(ctx));
   }
 
-  function blockString({
-    comment,
-    type,
-    value
-  }, ctx, onComment, onChompKeep) {
-    // 1. Block can't end in whitespace unless the last line is non-empty.
-    // 2. Strings consisting of only whitespace are best rendered explicitly.
-    if (/\n[\t ]+$/.test(value) || /^\s*$/.test(value)) {
-      return doubleQuotedString(value, ctx);
-    }
-
-    const indent = ctx.indent || (ctx.forceBlockIndent ? ' ' : '');
-    const indentSize = indent ? '2' : '1'; // root is at -1
-
-    const literal = type === constants.Type.BLOCK_FOLDED ? false : type === constants.Type.BLOCK_LITERAL ? true : !lineLengthOverLimit(value, options.strOptions.fold.lineWidth - indent.length);
-    let header = literal ? '|' : '>';
-    if (!value) return header + '\n';
-    let wsStart = '';
-    let wsEnd = '';
-    value = value.replace(/[\n\t ]*$/, ws => {
-      const n = ws.indexOf('\n');
-
-      if (n === -1) {
-        header += '-'; // strip
-      } else if (value === ws || n !== ws.length - 1) {
-        header += '+'; // keep
-
-        if (onChompKeep) onChompKeep();
-      }
+  return {
+    comments,
+    hasAnchor,
+    hasTag
+  };
+}
 
-      wsEnd = ws.replace(/\n$/, '');
-      return '';
-    }).replace(/^[\n ]*/, ws => {
-      if (ws.indexOf(' ') !== -1) header += indentSize;
-      const m = ws.match(/ +$/);
+function resolveNodeValue(doc, node) {
+  const {
+    anchors,
+    errors,
+    schema
+  } = doc;
+
+  if (node.type === PlainValue$4.Type.ALIAS) {
+    const name = node.rawValue;
+    const src = anchors.getNode(name);
+
+    if (!src) {
+      const msg = `Aliased anchor not found: ${name}`;
+      errors.push(new PlainValue$4.YAMLReferenceError(node, msg));
+      return null;
+    } // Lazy resolution for circular references
 
-      if (m) {
-        wsStart = ws.slice(0, -m[0].length);
-        return m[0];
-      } else {
-        wsStart = ws;
-        return '';
-      }
-    });
-    if (wsEnd) wsEnd = wsEnd.replace(/\n+(?!\n|$)/g, `$&${indent}`);
-    if (wsStart) wsStart = wsStart.replace(/\n+/g, `$&${indent}`);
 
-    if (comment) {
-      header += ' #' + comment.replace(/ ?[\r\n]+/g, ' ');
-      if (onComment) onComment();
-    }
+    const res = new Alias(src);
 
-    if (!value) return `${header}${indentSize}\n${indent}${wsEnd}`;
+    anchors._cstAliases.push(res);
 
-    if (literal) {
-      value = value.replace(/\n+/g, `$&${indent}`);
-      return `${header}\n${indent}${wsStart}${value}${wsEnd}`;
-    }
+    return res;
+  }
 
-    value = value.replace(/\n+/g, '\n$&').replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g, '$1$2') // more-indented lines aren't folded
-    //         ^ ind.line  ^ empty     ^ capture next empty lines only at end of indent
-    .replace(/\n+/g, `$&${indent}`);
-    const body = (0, _foldFlowLines.default)(`${wsStart}${value}${wsEnd}`, indent, _foldFlowLines.FOLD_BLOCK, options.strOptions.fold);
-    return `${header}\n${indent}${body}`;
+  const tagName = resolveTagName(doc, node);
+  if (tagName) return resolveTag(doc, node, tagName);
+
+  if (node.type !== PlainValue$4.Type.PLAIN) {
+    const msg = `Failed to resolve ${node.type} node here`;
+    errors.push(new PlainValue$4.YAMLSyntaxError(node, msg));
+    return null;
   }
 
-  function plainString(item, ctx, onComment, onChompKeep) {
-    const {
-      comment,
-      type,
-      value
-    } = item;
+  try {
+    const str = resolveString(doc, node);
+    return resolveScalar(str, schema.tags, schema.tags.scalarFallback);
+  } catch (error) {
+    if (!error.source) error.source = node;
+    errors.push(error);
+    return null;
+  }
+} // sets node.resolved on success
+
+
+function resolveNode(doc, node) {
+  if (!node) return null;
+  if (node.error) doc.errors.push(node.error);
+  const {
+    comments,
+    hasAnchor,
+    hasTag
+  } = resolveNodeProps(doc.errors, node);
+
+  if (hasAnchor) {
     const {
-      actualString,
-      implicitKey,
-      indent,
-      inFlow,
-      tags
-    } = ctx;
+      anchors
+    } = doc;
+    const name = node.anchor;
+    const prev = anchors.getNode(name); // At this point, aliases for any preceding node with the same anchor
+    // name have already been resolved, so it may safely be renamed.
 
-    if (implicitKey && /[\n[\]{},]/.test(value) || inFlow && /[[\]{},]/.test(value)) {
-      return doubleQuotedString(value, ctx);
-    }
+    if (prev) anchors.map[anchors.newName(name)] = prev; // During parsing, we need to store the CST node in anchors.map as
+    // anchors need to be available during resolution to allow for
+    // circular references.
 
-    if (!value || /^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(value)) {
-      // not allowed:
-      // - empty string, '-' or '?'
-      // - start with an indicator character (except [?:-]) or /[?-] /
-      // - '\n ', ': ' or ' \n' anywhere
-      // - '#' not preceded by a non-space char
-      // - end with ' ' or ':'
-      return implicitKey || inFlow || value.indexOf('\n') === -1 ? value.indexOf('"') !== -1 && value.indexOf("'") === -1 ? singleQuotedString(value, ctx) : doubleQuotedString(value, ctx) : blockString(item, ctx, onComment, onChompKeep);
-    }
+    anchors.map[name] = node;
+  }
 
-    if (!implicitKey && !inFlow && type !== constants.Type.PLAIN && value.indexOf('\n') !== -1) {
-      // Where allowed & type not set explicitly, prefer block style for multiline strings
-      return blockString(item, ctx, onComment, onChompKeep);
-    }
+  if (node.type === PlainValue$4.Type.ALIAS && (hasAnchor || hasTag)) {
+    const msg = 'An alias node must not specify any properties';
+    doc.errors.push(new PlainValue$4.YAMLSemanticError(node, msg));
+  }
+
+  const res = resolveNodeValue(doc, node);
 
-    const str = value.replace(/\n+/g, `$&\n${indent}`); // Verify that output will be parsed as a string, as e.g. plain numbers and
-    // booleans get parsed with those types in v1.2 (e.g. '42', 'true' & '0.9e-3'),
-    // and others in v1.1.
+  if (res) {
+    res.range = [node.range.start, node.range.end];
+    if (doc.options.keepCstNodes) res.cstNode = node;
+    if (doc.options.keepNodeTypes) res.type = node.type;
+    const cb = comments.before.join('\n');
 
-    if (actualString && typeof tags.resolveScalar(str).value !== 'string') {
-      return doubleQuotedString(value, ctx);
+    if (cb) {
+      res.commentBefore = res.commentBefore ? `${res.commentBefore}\n${cb}` : cb;
     }
 
-    const body = implicitKey ? str : (0, _foldFlowLines.default)(str, indent, _foldFlowLines.FOLD_FLOW, getFoldOptions(ctx));
+    const ca = comments.after.join('\n');
+    if (ca) res.comment = res.comment ? `${res.comment}\n${ca}` : ca;
+  }
 
-    if (comment && !inFlow && (body.indexOf('\n') !== -1 || comment.indexOf('\n') !== -1)) {
-      if (onComment) onComment();
-      return (0, addComment_1.addCommentBefore)(body, indent, comment);
-    }
+  return node.resolved = res;
+}
 
-    return body;
+function resolveMap(doc, cst) {
+  if (cst.type !== PlainValue$4.Type.MAP && cst.type !== PlainValue$4.Type.FLOW_MAP) {
+    const msg = `A ${cst.type} node cannot be resolved as a mapping`;
+    doc.errors.push(new PlainValue$4.YAMLSyntaxError(cst, msg));
+    return null;
   }
 
-  function stringifyString(item, ctx, onComment, onChompKeep) {
-    const {
-      defaultType
-    } = options.strOptions;
+  const {
+    comments,
+    items
+  } = cst.type === PlainValue$4.Type.FLOW_MAP ? resolveFlowMapItems(doc, cst) : resolveBlockMapItems(doc, cst);
+  const map = new YAMLMap();
+  map.items = items;
+  resolveComments(map, comments);
+  let hasCollectionKey = false;
+
+  for (let i = 0; i < items.length; ++i) {
     const {
-      implicitKey,
-      inFlow
-    } = ctx;
-    let {
-      type,
-      value
-    } = item;
+      key: iKey
+    } = items[i];
+    if (iKey instanceof Collection) hasCollectionKey = true;
+
+    if (doc.schema.merge && iKey && iKey.value === MERGE_KEY) {
+      items[i] = new Merge(items[i]);
+      const sources = items[i].value.items;
+      let error = null;
+      sources.some(node => {
+        if (node instanceof Alias) {
+          // During parsing, alias sources are CST nodes; to account for
+          // circular references their resolved values can't be used here.
+          const {
+            type
+          } = node.source;
+          if (type === PlainValue$4.Type.MAP || type === PlainValue$4.Type.FLOW_MAP) return false;
+          return error = 'Merge nodes aliases can only point to maps';
+        }
 
-    if (typeof value !== 'string') {
-      value = String(value);
-      item = Object.assign({}, item, {
-        value
+        return error = 'Merge nodes can only have Alias nodes as values';
       });
+      if (error) doc.errors.push(new PlainValue$4.YAMLSemanticError(cst, error));
+    } else {
+      for (let j = i + 1; j < items.length; ++j) {
+        const {
+          key: jKey
+        } = items[j];
+
+        if (iKey === jKey || iKey && jKey && Object.prototype.hasOwnProperty.call(iKey, 'value') && iKey.value === jKey.value) {
+          const msg = `Map keys must be unique; "${iKey}" is repeated`;
+          doc.errors.push(new PlainValue$4.YAMLSemanticError(cst, msg));
+          break;
+        }
+      }
     }
+  }
 
-    const _stringify = _type => {
-      switch (_type) {
-        case constants.Type.BLOCK_FOLDED:
-        case constants.Type.BLOCK_LITERAL:
-          return blockString(item, ctx, onComment, onChompKeep);
+  if (hasCollectionKey && !doc.options.mapAsMap) {
+    const warn = 'Keys with collection values will be stringified as YAML due to JS Object restrictions. Use mapAsMap: true to avoid this.';
+    doc.warnings.push(new PlainValue$4.YAMLWarning(cst, warn));
+  }
 
-        case constants.Type.QUOTE_DOUBLE:
-          return doubleQuotedString(value, ctx);
+  cst.resolved = map;
+  return map;
+}
 
-        case constants.Type.QUOTE_SINGLE:
-          return singleQuotedString(value, ctx);
+const valueHasPairComment = ({
+  context: {
+    lineStart,
+    node,
+    src
+  },
+  props
+}) => {
+  if (props.length === 0) return false;
+  const {
+    start
+  } = props[0];
+  if (node && start > node.valueRange.start) return false;
+  if (src[start] !== PlainValue$4.Char.COMMENT) return false;
 
-        case constants.Type.PLAIN:
-          return plainString(item, ctx, onComment, onChompKeep);
+  for (let i = lineStart; i < start; ++i) if (src[i] === '\n') return false;
 
-        default:
-          return null;
-      }
-    };
+  return true;
+};
 
-    if (type !== constants.Type.QUOTE_DOUBLE && /[\x00-\x08\x0b-\x1f\x7f-\x9f]/.test(value)) {
-      // force double quotes on control characters
-      type = constants.Type.QUOTE_DOUBLE;
-    } else if ((implicitKey || inFlow) && (type === constants.Type.BLOCK_FOLDED || type === constants.Type.BLOCK_LITERAL)) {
-      // should not happen; blocks are not valid inside flow containers
-      type = constants.Type.QUOTE_DOUBLE;
-    }
+function resolvePairComment(item, pair) {
+  if (!valueHasPairComment(item)) return;
+  const comment = item.getPropValue(0, PlainValue$4.Char.COMMENT, true);
+  let found = false;
+  const cb = pair.value.commentBefore;
 
-    let res = _stringify(type);
+  if (cb && cb.startsWith(comment)) {
+    pair.value.commentBefore = cb.substr(comment.length + 1);
+    found = true;
+  } else {
+    const cc = pair.value.comment;
 
-    if (res === null) {
-      res = _stringify(defaultType);
-      if (res === null) throw new Error(`Unsupported default string type ${defaultType}`);
+    if (!item.node && cc && cc.startsWith(comment)) {
+      pair.value.comment = cc.substr(comment.length + 1);
+      found = true;
     }
-
-    return res;
   }
-});
-unwrapExports(stringify);
-var stringify_1 = stringify.stringifyNumber;
-var stringify_2 = stringify.stringifyString;
 
-var parseUtils = createCommonjsModule(function (module, exports) {
+  if (found) pair.comment = comment;
+}
 
-  Object.defineProperty(exports, "__esModule", {
-    value: true
-  });
-  exports.checkFlowCollectionEnd = checkFlowCollectionEnd;
-  exports.checkKeyLength = checkKeyLength;
-  exports.resolveComments = resolveComments;
+function resolveBlockMapItems(doc, cst) {
+  const comments = [];
+  const items = [];
+  let key = undefined;
+  let keyStart = null;
 
-  function checkFlowCollectionEnd(errors$1, cst) {
-    let char, name;
+  for (let i = 0; i < cst.items.length; ++i) {
+    const item = cst.items[i];
 
-    switch (cst.type) {
-      case constants.Type.FLOW_MAP:
-        char = '}';
-        name = 'flow map';
+    switch (item.type) {
+      case PlainValue$4.Type.BLANK_LINE:
+        comments.push({
+          afterKey: !!key,
+          before: items.length
+        });
         break;
 
-      case constants.Type.FLOW_SEQ:
-        char = ']';
-        name = 'flow sequence';
+      case PlainValue$4.Type.COMMENT:
+        comments.push({
+          afterKey: !!key,
+          before: items.length,
+          comment: item.comment
+        });
         break;
 
-      default:
-        errors$1.push(new errors.YAMLSemanticError(cst, 'Not a flow collection!?'));
-        return;
-    }
-
-    let lastItem;
+      case PlainValue$4.Type.MAP_KEY:
+        if (key !== undefined) items.push(new Pair(key));
+        if (item.error) doc.errors.push(item.error);
+        key = resolveNode(doc, item.node);
+        keyStart = null;
+        break;
 
-    for (let i = cst.items.length - 1; i >= 0; --i) {
-      const item = cst.items[i];
+      case PlainValue$4.Type.MAP_VALUE:
+        {
+          if (key === undefined) key = null;
+          if (item.error) doc.errors.push(item.error);
 
-      if (!item || item.type !== constants.Type.COMMENT) {
-        lastItem = item;
-        break;
-      }
-    }
+          if (!item.context.atLineStart && item.node && item.node.type === PlainValue$4.Type.MAP && !item.node.context.atLineStart) {
+            const msg = 'Nested mappings are not allowed in compact mappings';
+            doc.errors.push(new PlainValue$4.YAMLSemanticError(item.node, msg));
+          }
 
-    if (lastItem && lastItem.char !== char) {
-      const msg = `Expected ${name} to end with ${char}`;
-      let err;
+          let valueNode = item.node;
 
-      if (typeof lastItem.offset === 'number') {
-        err = new errors.YAMLSemanticError(cst, msg);
-        err.offset = lastItem.offset + 1;
-      } else {
-        err = new errors.YAMLSemanticError(lastItem, msg);
-        if (lastItem.range && lastItem.range.end) err.offset = lastItem.range.end - lastItem.range.start;
-      }
+          if (!valueNode && item.props.length > 0) {
+            // Comments on an empty mapping value need to be preserved, so we
+            // need to construct a minimal empty node here to use instead of the
+            // missing `item.node`. -- eemeli/yaml#19
+            valueNode = new PlainValue$4.PlainValue(PlainValue$4.Type.PLAIN, []);
+            valueNode.context = {
+              parent: item,
+              src: item.context.src
+            };
+            const pos = item.range.start + 1;
+            valueNode.range = {
+              start: pos,
+              end: pos
+            };
+            valueNode.valueRange = {
+              start: pos,
+              end: pos
+            };
 
-      errors$1.push(err);
-    }
-  }
+            if (typeof item.range.origStart === 'number') {
+              const origPos = item.range.origStart + 1;
+              valueNode.range.origStart = valueNode.range.origEnd = origPos;
+              valueNode.valueRange.origStart = valueNode.valueRange.origEnd = origPos;
+            }
+          }
 
-  function checkKeyLength(errors$1, node, itemIdx, key, keyStart) {
-    if (!key || typeof keyStart !== 'number') return;
-    const item = node.items[itemIdx];
-    let keyEnd = item && item.range && item.range.start;
+          const pair = new Pair(key, resolveNode(doc, valueNode));
+          resolvePairComment(item, pair);
+          items.push(pair);
 
-    if (!keyEnd) {
-      for (let i = itemIdx - 1; i >= 0; --i) {
-        const it = node.items[i];
+          if (key && typeof keyStart === 'number') {
+            if (item.range.start > keyStart + 1024) doc.errors.push(getLongKeyError(cst, key));
+          }
 
-        if (it && it.range) {
-          keyEnd = it.range.end + 2 * (itemIdx - i);
-          break;
+          key = undefined;
+          keyStart = null;
         }
-      }
-    }
+        break;
 
-    if (keyEnd > keyStart + 1024) {
-      const k = String(key).substr(0, 8) + '...' + String(key).substr(-8);
-      errors$1.push(new errors.YAMLSemanticError(node, `The "${k}" key is too long`));
-    }
-  }
+      default:
+        if (key !== undefined) items.push(new Pair(key));
+        key = resolveNode(doc, item);
+        keyStart = item.range.start;
+        if (item.error) doc.errors.push(item.error);
 
-  function resolveComments(collection, comments) {
-    for (const {
-      afterKey,
-      before,
-      comment
-    } of comments) {
-      let item = collection.items[before];
-
-      if (!item) {
-        if (comment !== undefined) {
-          if (collection.comment) collection.comment += '\n' + comment;else collection.comment = comment;
+        next: for (let j = i + 1;; ++j) {
+          const nextItem = cst.items[j];
+
+          switch (nextItem && nextItem.type) {
+            case PlainValue$4.Type.BLANK_LINE:
+            case PlainValue$4.Type.COMMENT:
+              continue next;
+
+            case PlainValue$4.Type.MAP_VALUE:
+              break next;
+
+            default:
+              {
+                const msg = 'Implicit map keys need to be followed by map values';
+                doc.errors.push(new PlainValue$4.YAMLSemanticError(item, msg));
+                break next;
+              }
+          }
         }
-      } else {
-        if (afterKey && item.value) item = item.value;
 
-        if (comment === undefined) {
-          if (afterKey || !item.commentBefore) item.spaceBefore = true;
-        } else {
-          if (item.commentBefore) item.commentBefore += '\n' + comment;else item.commentBefore = comment;
+        if (item.valueRangeContainsNewline) {
+          const msg = 'Implicit map keys need to be on a single line';
+          doc.errors.push(new PlainValue$4.YAMLSemanticError(item, msg));
         }
-      }
+
     }
   }
-});
-unwrapExports(parseUtils);
-var parseUtils_1 = parseUtils.checkFlowCollectionEnd;
-var parseUtils_2 = parseUtils.checkKeyLength;
-var parseUtils_3 = parseUtils.resolveComments;
 
-var parseMap_1 = createCommonjsModule(function (module, exports) {
+  if (key !== undefined) items.push(new Pair(key));
+  return {
+    comments,
+    items
+  };
+}
 
-  Object.defineProperty(exports, "__esModule", {
-    value: true
-  });
-  exports.default = parseMap;
+function resolveFlowMapItems(doc, cst) {
+  const comments = [];
+  const items = [];
+  let key = undefined;
+  let explicitKey = false;
+  let next = '{';
 
-  var _PlainValue = _interopRequireDefault(PlainValue_1);
+  for (let i = 0; i < cst.items.length; ++i) {
+    const item = cst.items[i];
 
-  var _Map$1 = _interopRequireDefault(_Map);
+    if (typeof item.char === 'string') {
+      const {
+        char,
+        offset
+      } = item;
 
-  var _Merge = _interopRequireWildcard(Merge_1);
+      if (char === '?' && key === undefined && !explicitKey) {
+        explicitKey = true;
+        next = ':';
+        continue;
+      }
 
-  var _Pair = _interopRequireDefault(Pair_1);
+      if (char === ':') {
+        if (key === undefined) key = null;
 
-  var _Alias = _interopRequireDefault(Alias_1$1);
+        if (next === ':') {
+          next = ',';
+          continue;
+        }
+      } else {
+        if (explicitKey) {
+          if (key === undefined && char !== ',') key = null;
+          explicitKey = false;
+        }
 
-  var _Collection = _interopRequireDefault(Collection_1$1);
+        if (key !== undefined) {
+          items.push(new Pair(key));
+          key = undefined;
 
-  function _getRequireWildcardCache() {
-    if (typeof WeakMap !== "function") return null;
-    var cache = new WeakMap();
+          if (char === ',') {
+            next = ':';
+            continue;
+          }
+        }
+      }
 
-    _getRequireWildcardCache = function () {
-      return cache;
-    };
+      if (char === '}') {
+        if (i === cst.items.length - 1) continue;
+      } else if (char === next) {
+        next = ':';
+        continue;
+      }
 
-    return cache;
+      const msg = `Flow map contains an unexpected ${char}`;
+      const err = new PlainValue$4.YAMLSyntaxError(cst, msg);
+      err.offset = offset;
+      doc.errors.push(err);
+    } else if (item.type === PlainValue$4.Type.BLANK_LINE) {
+      comments.push({
+        afterKey: !!key,
+        before: items.length
+      });
+    } else if (item.type === PlainValue$4.Type.COMMENT) {
+      checkFlowCommentSpace(doc.errors, item);
+      comments.push({
+        afterKey: !!key,
+        before: items.length,
+        comment: item.comment
+      });
+    } else if (key === undefined) {
+      if (next === ',') doc.errors.push(new PlainValue$4.YAMLSemanticError(item, 'Separator , missing in flow map'));
+      key = resolveNode(doc, item);
+    } else {
+      if (next !== ',') doc.errors.push(new PlainValue$4.YAMLSemanticError(item, 'Indicator : missing in flow map entry'));
+      items.push(new Pair(key, resolveNode(doc, item)));
+      key = undefined;
+      explicitKey = false;
+    }
   }
 
-  function _interopRequireWildcard(obj) {
-    if (obj && obj.__esModule) {
-      return obj;
-    }
+  checkFlowCollectionEnd(doc.errors, cst);
+  if (key !== undefined) items.push(new Pair(key));
+  return {
+    comments,
+    items
+  };
+}
 
-    if (obj === null || typeof obj !== "object" && typeof obj !== "function") {
-      return {
-        default: obj
-      };
-    }
+function resolveSeq$3(doc, cst) {
+  if (cst.type !== PlainValue$4.Type.SEQ && cst.type !== PlainValue$4.Type.FLOW_SEQ) {
+    const msg = `A ${cst.type} node cannot be resolved as a sequence`;
+    doc.errors.push(new PlainValue$4.YAMLSyntaxError(cst, msg));
+    return null;
+  }
 
-    var cache = _getRequireWildcardCache();
+  const {
+    comments,
+    items
+  } = cst.type === PlainValue$4.Type.FLOW_SEQ ? resolveFlowSeqItems(doc, cst) : resolveBlockSeqItems(doc, cst);
+  const seq = new YAMLSeq();
+  seq.items = items;
+  resolveComments(seq, comments);
 
-    if (cache && cache.has(obj)) {
-      return cache.get(obj);
-    }
+  if (!doc.options.mapAsMap && items.some(it => it instanceof Pair && it.key instanceof Collection)) {
+    const warn = 'Keys with collection values will be stringified as YAML due to JS Object restrictions. Use mapAsMap: true to avoid this.';
+    doc.warnings.push(new PlainValue$4.YAMLWarning(cst, warn));
+  }
+
+  cst.resolved = seq;
+  return seq;
+}
 
-    var newObj = {};
-    var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
+function resolveBlockSeqItems(doc, cst) {
+  const comments = [];
+  const items = [];
 
-    for (var key in obj) {
-      if (Object.prototype.hasOwnProperty.call(obj, key)) {
-        var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
+  for (let i = 0; i < cst.items.length; ++i) {
+    const item = cst.items[i];
 
-        if (desc && (desc.get || desc.set)) {
-          Object.defineProperty(newObj, key, desc);
-        } else {
-          newObj[key] = obj[key];
+    switch (item.type) {
+      case PlainValue$4.Type.BLANK_LINE:
+        comments.push({
+          before: items.length
+        });
+        break;
+
+      case PlainValue$4.Type.COMMENT:
+        comments.push({
+          comment: item.comment,
+          before: items.length
+        });
+        break;
+
+      case PlainValue$4.Type.SEQ_ITEM:
+        if (item.error) doc.errors.push(item.error);
+        items.push(resolveNode(doc, item.node));
+
+        if (item.hasProps) {
+          const msg = 'Sequence items cannot have tags or anchors before the - indicator';
+          doc.errors.push(new PlainValue$4.YAMLSemanticError(item, msg));
         }
-      }
-    }
 
-    newObj.default = obj;
+        break;
 
-    if (cache) {
-      cache.set(obj, newObj);
+      default:
+        if (item.error) doc.errors.push(item.error);
+        doc.errors.push(new PlainValue$4.YAMLSyntaxError(item, `Unexpected ${item.type} node in sequence`));
     }
-
-    return newObj;
   }
 
-  function _interopRequireDefault(obj) {
-    return obj && obj.__esModule ? obj : {
-      default: obj
-    };
-  }
+  return {
+    comments,
+    items
+  };
+}
 
-  function parseMap(doc, cst) {
-    if (cst.type !== constants.Type.MAP && cst.type !== constants.Type.FLOW_MAP) {
-      const msg = `A ${cst.type} node cannot be resolved as a mapping`;
-      doc.errors.push(new errors.YAMLSyntaxError(cst, msg));
-      return null;
-    }
+function resolveFlowSeqItems(doc, cst) {
+  const comments = [];
+  const items = [];
+  let explicitKey = false;
+  let key = undefined;
+  let keyStart = null;
+  let next = '[';
+  let prevItem = null;
 
-    const {
-      comments,
-      items
-    } = cst.type === constants.Type.FLOW_MAP ? resolveFlowMapItems(doc, cst) : resolveBlockMapItems(doc, cst);
-    const map = new _Map$1.default();
-    map.items = items;
-    (0, parseUtils.resolveComments)(map, comments);
-    let hasCollectionKey = false;
-
-    for (let i = 0; i < items.length; ++i) {
+  for (let i = 0; i < cst.items.length; ++i) {
+    const item = cst.items[i];
+
+    if (typeof item.char === 'string') {
       const {
-        key: iKey
-      } = items[i];
-      if (iKey instanceof _Collection.default) hasCollectionKey = true;
-
-      if (doc.schema.merge && iKey && iKey.value === _Merge.MERGE_KEY) {
-        items[i] = new _Merge.default(items[i]);
-        const sources = items[i].value.items;
-        let error = null;
-        sources.some(node => {
-          if (node instanceof _Alias.default) {
-            // During parsing, alias sources are CST nodes; to account for
-            // circular references their resolved values can't be used here.
-            const {
-              type
-            } = node.source;
-            if (type === constants.Type.MAP || type === constants.Type.FLOW_MAP) return false;
-            return error = 'Merge nodes aliases can only point to maps';
+        char,
+        offset
+      } = item;
+
+      if (char !== ':' && (explicitKey || key !== undefined)) {
+        if (explicitKey && key === undefined) key = next ? items.pop() : null;
+        items.push(new Pair(key));
+        explicitKey = false;
+        key = undefined;
+        keyStart = null;
+      }
+
+      if (char === next) {
+        next = null;
+      } else if (!next && char === '?') {
+        explicitKey = true;
+      } else if (next !== '[' && char === ':' && key === undefined) {
+        if (next === ',') {
+          key = items.pop();
+
+          if (key instanceof Pair) {
+            const msg = 'Chaining flow sequence pairs is invalid';
+            const err = new PlainValue$4.YAMLSemanticError(cst, msg);
+            err.offset = offset;
+            doc.errors.push(err);
           }
 
-          return error = 'Merge nodes can only have Alias nodes as values';
-        });
-        if (error) doc.errors.push(new errors.YAMLSemanticError(cst, error));
-      } else {
-        for (let j = i + 1; j < items.length; ++j) {
-          const {
-            key: jKey
-          } = items[j];
+          if (!explicitKey && typeof keyStart === 'number') {
+            const keyEnd = item.range ? item.range.start : item.offset;
+            if (keyEnd > keyStart + 1024) doc.errors.push(getLongKeyError(cst, key));
+            const {
+              src
+            } = prevItem.context;
 
-          if (iKey === jKey || iKey && jKey && Object.prototype.hasOwnProperty.call(iKey, 'value') && iKey.value === jKey.value) {
-            const msg = `Map keys must be unique; "${iKey}" is repeated`;
-            doc.errors.push(new errors.YAMLSemanticError(cst, msg));
-            break;
+            for (let i = keyStart; i < keyEnd; ++i) if (src[i] === '\n') {
+              const msg = 'Implicit keys of flow sequence pairs need to be on a single line';
+              doc.errors.push(new PlainValue$4.YAMLSemanticError(prevItem, msg));
+              break;
+            }
           }
+        } else {
+          key = null;
         }
-      }
-    }
 
-    if (hasCollectionKey && !doc.options.mapAsMap) {
-      const warn = 'Keys with collection values will be stringified as YAML due to JS Object restrictions. Use mapAsMap: true to avoid this.';
-      doc.warnings.push(new errors.YAMLWarning(cst, warn));
-    }
+        keyStart = null;
+        explicitKey = false;
+        next = null;
+      } else if (next === '[' || char !== ']' || i < cst.items.length - 1) {
+        const msg = `Flow sequence contains an unexpected ${char}`;
+        const err = new PlainValue$4.YAMLSyntaxError(cst, msg);
+        err.offset = offset;
+        doc.errors.push(err);
+      }
+    } else if (item.type === PlainValue$4.Type.BLANK_LINE) {
+      comments.push({
+        before: items.length
+      });
+    } else if (item.type === PlainValue$4.Type.COMMENT) {
+      checkFlowCommentSpace(doc.errors, item);
+      comments.push({
+        comment: item.comment,
+        before: items.length
+      });
+    } else {
+      if (next) {
+        const msg = `Expected a ${next} in flow sequence`;
+        doc.errors.push(new PlainValue$4.YAMLSemanticError(item, msg));
+      }
 
-    cst.resolved = map;
-    return map;
-  }
+      const value = resolveNode(doc, item);
 
-  const valueHasPairComment = ({
-    context: {
-      lineStart,
-      node,
-      src
-    },
-    props
-  }) => {
-    if (props.length === 0) return false;
-    const {
-      start
-    } = props[0];
-    if (node && start > node.valueRange.start) return false;
-    if (src[start] !== constants.Char.COMMENT) return false;
+      if (key === undefined) {
+        items.push(value);
+        prevItem = item;
+      } else {
+        items.push(new Pair(key, value));
+        key = undefined;
+      }
 
-    for (let i = lineStart; i < start; ++i) if (src[i] === '\n') return false;
+      keyStart = item.range.start;
+      next = ',';
+    }
+  }
 
-    return true;
+  checkFlowCollectionEnd(doc.errors, cst);
+  if (key !== undefined) items.push(new Pair(key));
+  return {
+    comments,
+    items
   };
+}
 
-  function resolvePairComment(item, pair) {
-    if (!valueHasPairComment(item)) return;
-    const comment = item.getPropValue(0, constants.Char.COMMENT, true);
-    let found = false;
-    const cb = pair.value.commentBefore;
+resolveSeqD03cb037.Alias = Alias;
+resolveSeqD03cb037.Collection = Collection;
+resolveSeqD03cb037.Merge = Merge;
+resolveSeqD03cb037.Node = Node;
+resolveSeqD03cb037.Pair = Pair;
+resolveSeqD03cb037.Scalar = Scalar;
+resolveSeqD03cb037.YAMLMap = YAMLMap;
+resolveSeqD03cb037.YAMLSeq = YAMLSeq;
+resolveSeqD03cb037.addComment = addComment;
+resolveSeqD03cb037.binaryOptions = binaryOptions;
+resolveSeqD03cb037.boolOptions = boolOptions;
+resolveSeqD03cb037.findPair = findPair;
+resolveSeqD03cb037.intOptions = intOptions;
+resolveSeqD03cb037.isEmptyPath = isEmptyPath;
+resolveSeqD03cb037.nullOptions = nullOptions;
+resolveSeqD03cb037.resolveMap = resolveMap;
+resolveSeqD03cb037.resolveNode = resolveNode;
+resolveSeqD03cb037.resolveSeq = resolveSeq$3;
+resolveSeqD03cb037.resolveString = resolveString;
+resolveSeqD03cb037.strOptions = strOptions;
+resolveSeqD03cb037.stringifyNumber = stringifyNumber;
+resolveSeqD03cb037.stringifyString = stringifyString;
+resolveSeqD03cb037.toJSON = toJSON;
+
+var check = function (it) {
+  return it && it.Math == Math && it;
+};
 
-    if (cb && cb.startsWith(comment)) {
-      pair.value.commentBefore = cb.substr(comment.length + 1);
-      found = true;
-    } else {
-      const cc = pair.value.comment;
+// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
+var global$m =
+  // eslint-disable-next-line es/no-global-this -- safe
+  check(typeof globalThis == 'object' && globalThis) ||
+  check(typeof window == 'object' && window) ||
+  // eslint-disable-next-line no-restricted-globals -- safe
+  check(typeof self == 'object' && self) ||
+  check(typeof global$m == 'object' && global$m) ||
+  // eslint-disable-next-line no-new-func -- fallback
+  (function () { return this; })() || Function('return this')();
 
-      if (!item.node && cc && cc.startsWith(comment)) {
-        pair.value.comment = cc.substr(comment.length + 1);
-        found = true;
-      }
-    }
+var objectGetOwnPropertyDescriptor = {};
 
-    if (found) pair.comment = comment;
+var fails$7 = function (exec) {
+  try {
+    return !!exec();
+  } catch (error) {
+    return true;
   }
+};
 
-  function resolveBlockMapItems(doc, cst) {
-    const comments = [];
-    const items = [];
-    let key = undefined;
-    let keyStart = null;
-
-    for (let i = 0; i < cst.items.length; ++i) {
-      const item = cst.items[i];
-
-      switch (item.type) {
-        case constants.Type.BLANK_LINE:
-          comments.push({
-            afterKey: !!key,
-            before: items.length
-          });
-          break;
-
-        case constants.Type.COMMENT:
-          comments.push({
-            afterKey: !!key,
-            before: items.length,
-            comment: item.comment
-          });
-          break;
+var fails$6 = fails$7;
 
-        case constants.Type.MAP_KEY:
-          if (key !== undefined) items.push(new _Pair.default(key));
-          if (item.error) doc.errors.push(item.error);
-          key = doc.resolveNode(item.node);
-          keyStart = null;
-          break;
+// Detect IE8's incomplete defineProperty implementation
+var descriptors = !fails$6(function () {
+  // eslint-disable-next-line es/no-object-defineproperty -- required for testing
+  return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] != 7;
+});
 
-        case constants.Type.MAP_VALUE:
-          {
-            if (key === undefined) key = null;
-            if (item.error) doc.errors.push(item.error);
+var call$4 = Function.prototype.call;
 
-            if (!item.context.atLineStart && item.node && item.node.type === constants.Type.MAP && !item.node.context.atLineStart) {
-              const msg = 'Nested mappings are not allowed in compact mappings';
-              doc.errors.push(new errors.YAMLSemanticError(item.node, msg));
-            }
+var functionCall = call$4.bind ? call$4.bind(call$4) : function () {
+  return call$4.apply(call$4, arguments);
+};
 
-            let valueNode = item.node;
-
-            if (!valueNode && item.props.length > 0) {
-              // Comments on an empty mapping value need to be preserved, so we
-              // need to construct a minimal empty node here to use instead of the
-              // missing `item.node`. -- eemeli/yaml#19
-              valueNode = new _PlainValue.default(constants.Type.PLAIN, []);
-              valueNode.context = {
-                parent: item,
-                src: item.context.src
-              };
-              const pos = item.range.start + 1;
-              valueNode.range = {
-                start: pos,
-                end: pos
-              };
-              valueNode.valueRange = {
-                start: pos,
-                end: pos
-              };
-
-              if (typeof item.range.origStart === 'number') {
-                const origPos = item.range.origStart + 1;
-                valueNode.range.origStart = valueNode.range.origEnd = origPos;
-                valueNode.valueRange.origStart = valueNode.valueRange.origEnd = origPos;
-              }
-            }
+var objectPropertyIsEnumerable = {};
 
-            const pair = new _Pair.default(key, doc.resolveNode(valueNode));
-            resolvePairComment(item, pair);
-            items.push(pair);
-            (0, parseUtils.checkKeyLength)(doc.errors, cst, i, key, keyStart);
-            key = undefined;
-            keyStart = null;
-          }
-          break;
+var $propertyIsEnumerable = {}.propertyIsEnumerable;
+// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
+var getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
 
-        default:
-          if (key !== undefined) items.push(new _Pair.default(key));
-          key = doc.resolveNode(item);
-          keyStart = item.range.start;
-          if (item.error) doc.errors.push(item.error);
+// Nashorn ~ JDK8 bug
+var NASHORN_BUG = getOwnPropertyDescriptor$1 && !$propertyIsEnumerable.call({ 1: 2 }, 1);
 
-          next: for (let j = i + 1;; ++j) {
-            const nextItem = cst.items[j];
+// `Object.prototype.propertyIsEnumerable` method implementation
+// https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable
+objectPropertyIsEnumerable.f = NASHORN_BUG ? function propertyIsEnumerable(V) {
+  var descriptor = getOwnPropertyDescriptor$1(this, V);
+  return !!descriptor && descriptor.enumerable;
+} : $propertyIsEnumerable;
 
-            switch (nextItem && nextItem.type) {
-              case constants.Type.BLANK_LINE:
-              case constants.Type.COMMENT:
-                continue next;
+var createPropertyDescriptor$2 = function (bitmap, value) {
+  return {
+    enumerable: !(bitmap & 1),
+    configurable: !(bitmap & 2),
+    writable: !(bitmap & 4),
+    value: value
+  };
+};
 
-              case constants.Type.MAP_VALUE:
-                break next;
+var FunctionPrototype$1 = Function.prototype;
+var bind = FunctionPrototype$1.bind;
+var call$3 = FunctionPrototype$1.call;
+var callBind = bind && bind.bind(call$3);
 
-              default:
-                doc.errors.push(new errors.YAMLSemanticError(item, 'Implicit map keys need to be followed by map values'));
-                break next;
-            }
-          }
+var functionUncurryThis = bind ? function (fn) {
+  return fn && callBind(call$3, fn);
+} : function (fn) {
+  return fn && function () {
+    return call$3.apply(fn, arguments);
+  };
+};
 
-          if (item.valueRangeContainsNewline) {
-            const msg = 'Implicit map keys need to be on a single line';
-            doc.errors.push(new errors.YAMLSemanticError(item, msg));
-          }
+var uncurryThis$a = functionUncurryThis;
 
-      }
-    }
+var toString$3 = uncurryThis$a({}.toString);
+var stringSlice = uncurryThis$a(''.slice);
 
-    if (key !== undefined) items.push(new _Pair.default(key));
-    return {
-      comments,
-      items
-    };
-  }
+var classofRaw$1 = function (it) {
+  return stringSlice(toString$3(it), 8, -1);
+};
 
-  function resolveFlowMapItems(doc, cst) {
-    const comments = [];
-    const items = [];
-    let key = undefined;
-    let keyStart = null;
-    let explicitKey = false;
-    let next = '{';
+var global$l = global$m;
+var uncurryThis$9 = functionUncurryThis;
+var fails$5 = fails$7;
+var classof$2 = classofRaw$1;
 
-    for (let i = 0; i < cst.items.length; ++i) {
-      (0, parseUtils.checkKeyLength)(doc.errors, cst, i, key, keyStart);
-      const item = cst.items[i];
+var Object$4 = global$l.Object;
+var split = uncurryThis$9(''.split);
 
-      if (typeof item.char === 'string') {
-        const {
-          char,
-          offset
-        } = item;
+// fallback for non-array-like ES3 and non-enumerable old V8 strings
+var indexedObject = fails$5(function () {
+  // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
+  // eslint-disable-next-line no-prototype-builtins -- safe
+  return !Object$4('z').propertyIsEnumerable(0);
+}) ? function (it) {
+  return classof$2(it) == 'String' ? split(it, '') : Object$4(it);
+} : Object$4;
 
-        if (char === '?' && key === undefined && !explicitKey) {
-          explicitKey = true;
-          next = ':';
-          continue;
-        }
+var global$k = global$m;
 
-        if (char === ':') {
-          if (key === undefined) key = null;
+var TypeError$7 = global$k.TypeError;
 
-          if (next === ':') {
-            next = ',';
-            continue;
-          }
-        } else {
-          if (explicitKey) {
-            if (key === undefined && char !== ',') key = null;
-            explicitKey = false;
-          }
+// `RequireObjectCoercible` abstract operation
+// https://tc39.es/ecma262/#sec-requireobjectcoercible
+var requireObjectCoercible$2 = function (it) {
+  if (it == undefined) throw TypeError$7("Can't call method on " + it);
+  return it;
+};
 
-          if (key !== undefined) {
-            items.push(new _Pair.default(key));
-            key = undefined;
-            keyStart = null;
+// toObject with fallback for non-array-like ES3 strings
+var IndexedObject = indexedObject;
+var requireObjectCoercible$1 = requireObjectCoercible$2;
 
-            if (char === ',') {
-              next = ':';
-              continue;
-            }
-          }
-        }
+var toIndexedObject$3 = function (it) {
+  return IndexedObject(requireObjectCoercible$1(it));
+};
 
-        if (char === '}') {
-          if (i === cst.items.length - 1) continue;
-        } else if (char === next) {
-          next = ':';
-          continue;
-        }
+// `IsCallable` abstract operation
+// https://tc39.es/ecma262/#sec-iscallable
+var isCallable$a = function (argument) {
+  return typeof argument == 'function';
+};
 
-        const msg = `Flow map contains an unexpected ${char}`;
-        const err = new errors.YAMLSyntaxError(cst, msg);
-        err.offset = offset;
-        doc.errors.push(err);
-      } else if (item.type === constants.Type.BLANK_LINE) {
-        comments.push({
-          afterKey: !!key,
-          before: items.length
-        });
-      } else if (item.type === constants.Type.COMMENT) {
-        comments.push({
-          afterKey: !!key,
-          before: items.length,
-          comment: item.comment
-        });
-      } else if (key === undefined) {
-        if (next === ',') doc.errors.push(new errors.YAMLSemanticError(item, 'Separator , missing in flow map'));
-        key = doc.resolveNode(item);
-        keyStart = explicitKey ? null : item.range.start; // TODO: add error for non-explicit multiline plain key
-      } else {
-        if (next !== ',') doc.errors.push(new errors.YAMLSemanticError(item, 'Indicator : missing in flow map entry'));
-        items.push(new _Pair.default(key, doc.resolveNode(item)));
-        key = undefined;
-        explicitKey = false;
-      }
-    }
+var isCallable$9 = isCallable$a;
 
-    (0, parseUtils.checkFlowCollectionEnd)(doc.errors, cst);
-    if (key !== undefined) items.push(new _Pair.default(key));
-    return {
-      comments,
-      items
-    };
-  }
-});
-unwrapExports(parseMap_1);
+var isObject$5 = function (it) {
+  return typeof it == 'object' ? it !== null : isCallable$9(it);
+};
 
-var map = createCommonjsModule(function (module, exports) {
+var global$j = global$m;
+var isCallable$8 = isCallable$a;
 
-  Object.defineProperty(exports, "__esModule", {
-    value: true
-  });
-  exports.default = void 0;
+var aFunction = function (argument) {
+  return isCallable$8(argument) ? argument : undefined;
+};
 
-  var _Map$1 = _interopRequireDefault(_Map);
+var getBuiltIn$3 = function (namespace, method) {
+  return arguments.length < 2 ? aFunction(global$j[namespace]) : global$j[namespace] && global$j[namespace][method];
+};
 
-  var _parseMap = _interopRequireDefault(parseMap_1);
+var uncurryThis$8 = functionUncurryThis;
 
-  function _interopRequireDefault(obj) {
-    return obj && obj.__esModule ? obj : {
-      default: obj
-    };
-  }
+var objectIsPrototypeOf = uncurryThis$8({}.isPrototypeOf);
 
-  function createMap(schema, obj, ctx) {
-    const map = new _Map$1.default(schema);
+var getBuiltIn$2 = getBuiltIn$3;
 
-    if (obj instanceof Map) {
-      for (const [key, value] of obj) map.items.push(schema.createPair(key, value, ctx));
-    } else if (obj && typeof obj === 'object') {
-      for (const key of Object.keys(obj)) map.items.push(schema.createPair(key, obj[key], ctx));
-    }
+var engineUserAgent = getBuiltIn$2('navigator', 'userAgent') || '';
 
-    if (typeof schema.sortMapEntries === 'function') {
-      map.items.sort(schema.sortMapEntries);
-    }
+var global$i = global$m;
+var userAgent$2 = engineUserAgent;
 
-    return map;
+var process$1 = global$i.process;
+var Deno = global$i.Deno;
+var versions = process$1 && process$1.versions || Deno && Deno.version;
+var v8 = versions && versions.v8;
+var match, version;
+
+if (v8) {
+  match = v8.split('.');
+  // in old Chrome, versions of V8 isn't V8 = Chrome / 10
+  // but their correct versions are not interesting for us
+  version = match[0] > 0 && match[0] < 4 ? 1 : +(match[0] + match[1]);
+}
+
+// BrowserFS NodeJS `process` polyfill incorrectly set `.v8` to `0.0`
+// so check `userAgent` even if `.v8` exists, but 0
+if (!version && userAgent$2) {
+  match = userAgent$2.match(/Edge\/(\d+)/);
+  if (!match || match[1] >= 74) {
+    match = userAgent$2.match(/Chrome\/(\d+)/);
+    if (match) version = +match[1];
   }
+}
 
-  var _default = {
-    createNode: createMap,
-    default: true,
-    nodeClass: _Map$1.default,
-    tag: 'tag:yaml.org,2002:map',
-    resolve: _parseMap.default
-  };
-  exports.default = _default;
+var engineV8Version = version;
+
+/* eslint-disable es/no-symbol -- required for testing */
+
+var V8_VERSION = engineV8Version;
+var fails$4 = fails$7;
+
+// eslint-disable-next-line es/no-object-getownpropertysymbols -- required for testing
+var nativeSymbol = !!Object.getOwnPropertySymbols && !fails$4(function () {
+  var symbol = Symbol();
+  // Chrome 38 Symbol has incorrect toString conversion
+  // `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances
+  return !String(symbol) || !(Object(symbol) instanceof Symbol) ||
+    // Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances
+    !Symbol.sham && V8_VERSION && V8_VERSION < 41;
 });
-unwrapExports(map);
 
-var parseSeq_1 = createCommonjsModule(function (module, exports) {
+/* eslint-disable es/no-symbol -- required for testing */
 
-  Object.defineProperty(exports, "__esModule", {
-    value: true
-  });
-  exports.default = parseSeq;
+var NATIVE_SYMBOL$1 = nativeSymbol;
 
-  var _Pair = _interopRequireDefault(Pair_1);
+var useSymbolAsUid = NATIVE_SYMBOL$1
+  && !Symbol.sham
+  && typeof Symbol.iterator == 'symbol';
 
-  var _Seq = _interopRequireDefault(Seq);
+var global$h = global$m;
+var getBuiltIn$1 = getBuiltIn$3;
+var isCallable$7 = isCallable$a;
+var isPrototypeOf = objectIsPrototypeOf;
+var USE_SYMBOL_AS_UID$1 = useSymbolAsUid;
 
-  var _Collection = _interopRequireDefault(Collection_1$1);
+var Object$3 = global$h.Object;
 
-  function _interopRequireDefault(obj) {
-    return obj && obj.__esModule ? obj : {
-      default: obj
-    };
+var isSymbol$2 = USE_SYMBOL_AS_UID$1 ? function (it) {
+  return typeof it == 'symbol';
+} : function (it) {
+  var $Symbol = getBuiltIn$1('Symbol');
+  return isCallable$7($Symbol) && isPrototypeOf($Symbol.prototype, Object$3(it));
+};
+
+var global$g = global$m;
+
+var String$3 = global$g.String;
+
+var tryToString$1 = function (argument) {
+  try {
+    return String$3(argument);
+  } catch (error) {
+    return 'Object';
   }
+};
 
-  function parseSeq(doc, cst) {
-    if (cst.type !== constants.Type.SEQ && cst.type !== constants.Type.FLOW_SEQ) {
-      const msg = `A ${cst.type} node cannot be resolved as a sequence`;
-      doc.errors.push(new errors.YAMLSyntaxError(cst, msg));
-      return null;
-    }
+var global$f = global$m;
+var isCallable$6 = isCallable$a;
+var tryToString = tryToString$1;
 
-    const {
-      comments,
-      items
-    } = cst.type === constants.Type.FLOW_SEQ ? resolveFlowSeqItems(doc, cst) : resolveBlockSeqItems(doc, cst);
-    const seq = new _Seq.default();
-    seq.items = items;
-    (0, parseUtils.resolveComments)(seq, comments);
+var TypeError$6 = global$f.TypeError;
 
-    if (!doc.options.mapAsMap && items.some(it => it instanceof _Pair.default && it.key instanceof _Collection.default)) {
-      const warn = 'Keys with collection values will be stringified as YAML due to JS Object restrictions. Use mapAsMap: true to avoid this.';
-      doc.warnings.push(new errors.YAMLWarning(cst, warn));
-    }
+// `Assert: IsCallable(argument) is true`
+var aCallable$2 = function (argument) {
+  if (isCallable$6(argument)) return argument;
+  throw TypeError$6(tryToString(argument) + ' is not a function');
+};
 
-    cst.resolved = seq;
-    return seq;
-  }
+var aCallable$1 = aCallable$2;
 
-  function resolveBlockSeqItems(doc, cst) {
-    const comments = [];
-    const items = [];
+// `GetMethod` abstract operation
+// https://tc39.es/ecma262/#sec-getmethod
+var getMethod$1 = function (V, P) {
+  var func = V[P];
+  return func == null ? undefined : aCallable$1(func);
+};
 
-    for (let i = 0; i < cst.items.length; ++i) {
-      const item = cst.items[i];
+var global$e = global$m;
+var call$2 = functionCall;
+var isCallable$5 = isCallable$a;
+var isObject$4 = isObject$5;
+
+var TypeError$5 = global$e.TypeError;
+
+// `OrdinaryToPrimitive` abstract operation
+// https://tc39.es/ecma262/#sec-ordinarytoprimitive
+var ordinaryToPrimitive$1 = function (input, pref) {
+  var fn, val;
+  if (pref === 'string' && isCallable$5(fn = input.toString) && !isObject$4(val = call$2(fn, input))) return val;
+  if (isCallable$5(fn = input.valueOf) && !isObject$4(val = call$2(fn, input))) return val;
+  if (pref !== 'string' && isCallable$5(fn = input.toString) && !isObject$4(val = call$2(fn, input))) return val;
+  throw TypeError$5("Can't convert object to primitive value");
+};
 
-      switch (item.type) {
-        case constants.Type.BLANK_LINE:
-          comments.push({
-            before: items.length
-          });
-          break;
+var shared$3 = {exports: {}};
 
-        case constants.Type.COMMENT:
-          comments.push({
-            comment: item.comment,
-            before: items.length
-          });
-          break;
+var global$d = global$m;
 
-        case constants.Type.SEQ_ITEM:
-          if (item.error) doc.errors.push(item.error);
-          items.push(doc.resolveNode(item.node));
+// eslint-disable-next-line es/no-object-defineproperty -- safe
+var defineProperty = Object.defineProperty;
 
-          if (item.hasProps) {
-            const msg = 'Sequence items cannot have tags or anchors before the - indicator';
-            doc.errors.push(new errors.YAMLSemanticError(item, msg));
-          }
+var setGlobal$3 = function (key, value) {
+  try {
+    defineProperty(global$d, key, { value: value, configurable: true, writable: true });
+  } catch (error) {
+    global$d[key] = value;
+  } return value;
+};
 
-          break;
+var global$c = global$m;
+var setGlobal$2 = setGlobal$3;
 
-        default:
-          if (item.error) doc.errors.push(item.error);
-          doc.errors.push(new errors.YAMLSyntaxError(item, `Unexpected ${item.type} node in sequence`));
-      }
-    }
+var SHARED = '__core-js_shared__';
+var store$3 = global$c[SHARED] || setGlobal$2(SHARED, {});
 
-    return {
-      comments,
-      items
-    };
-  }
+var sharedStore = store$3;
 
-  function resolveFlowSeqItems(doc, cst) {
-    const comments = [];
-    const items = [];
-    let explicitKey = false;
-    let key = undefined;
-    let keyStart = null;
-    let next = '[';
+var store$2 = sharedStore;
 
-    for (let i = 0; i < cst.items.length; ++i) {
-      const item = cst.items[i];
+(shared$3.exports = function (key, value) {
+  return store$2[key] || (store$2[key] = value !== undefined ? value : {});
+})('versions', []).push({
+  version: '3.19.1',
+  mode: 'global',
+  copyright: '© 2021 Denis Pushkarev (zloirock.ru)'
+});
 
-      if (typeof item.char === 'string') {
-        const {
-          char,
-          offset
-        } = item;
+var global$b = global$m;
+var requireObjectCoercible = requireObjectCoercible$2;
 
-        if (char !== ':' && (explicitKey || key !== undefined)) {
-          if (explicitKey && key === undefined) key = next ? items.pop() : null;
-          items.push(new _Pair.default(key));
-          explicitKey = false;
-          key = undefined;
-          keyStart = null;
-        }
+var Object$2 = global$b.Object;
 
-        if (char === next) {
-          next = null;
-        } else if (!next && char === '?') {
-          explicitKey = true;
-        } else if (next !== '[' && char === ':' && key === undefined) {
-          if (next === ',') {
-            key = items.pop();
-
-            if (key instanceof _Pair.default) {
-              const msg = 'Chaining flow sequence pairs is invalid';
-              const err = new errors.YAMLSemanticError(cst, msg);
-              err.offset = offset;
-              doc.errors.push(err);
-            }
+// `ToObject` abstract operation
+// https://tc39.es/ecma262/#sec-toobject
+var toObject$2 = function (argument) {
+  return Object$2(requireObjectCoercible(argument));
+};
 
-            if (!explicitKey) (0, parseUtils.checkKeyLength)(doc.errors, cst, i, key, keyStart);
-          } else {
-            key = null;
-          }
+var uncurryThis$7 = functionUncurryThis;
+var toObject$1 = toObject$2;
 
-          keyStart = null;
-          explicitKey = false; // TODO: add error for non-explicit multiline plain key
-
-          next = null;
-        } else if (next === '[' || char !== ']' || i < cst.items.length - 1) {
-          const msg = `Flow sequence contains an unexpected ${char}`;
-          const err = new errors.YAMLSyntaxError(cst, msg);
-          err.offset = offset;
-          doc.errors.push(err);
-        }
-      } else if (item.type === constants.Type.BLANK_LINE) {
-        comments.push({
-          before: items.length
-        });
-      } else if (item.type === constants.Type.COMMENT) {
-        comments.push({
-          comment: item.comment,
-          before: items.length
-        });
-      } else {
-        if (next) {
-          const msg = `Expected a ${next} in flow sequence`;
-          doc.errors.push(new errors.YAMLSemanticError(item, msg));
-        }
+var hasOwnProperty = uncurryThis$7({}.hasOwnProperty);
 
-        const value = doc.resolveNode(item);
+// `HasOwnProperty` abstract operation
+// https://tc39.es/ecma262/#sec-hasownproperty
+var hasOwnProperty_1 = Object.hasOwn || function hasOwn(it, key) {
+  return hasOwnProperty(toObject$1(it), key);
+};
 
-        if (key === undefined) {
-          items.push(value);
-        } else {
-          items.push(new _Pair.default(key, value));
-          key = undefined;
-        }
+var uncurryThis$6 = functionUncurryThis;
 
-        keyStart = item.range.start;
-        next = ',';
-      }
-    }
+var id = 0;
+var postfix = Math.random();
+var toString$2 = uncurryThis$6(1.0.toString);
 
-    (0, parseUtils.checkFlowCollectionEnd)(doc.errors, cst);
-    if (key !== undefined) items.push(new _Pair.default(key));
-    return {
-      comments,
-      items
-    };
-  }
-});
-unwrapExports(parseSeq_1);
+var uid$2 = function (key) {
+  return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString$2(++id + postfix, 36);
+};
 
-var seq = createCommonjsModule(function (module, exports) {
+var global$a = global$m;
+var shared$2 = shared$3.exports;
+var hasOwn$6 = hasOwnProperty_1;
+var uid$1 = uid$2;
+var NATIVE_SYMBOL = nativeSymbol;
+var USE_SYMBOL_AS_UID = useSymbolAsUid;
+
+var WellKnownSymbolsStore = shared$2('wks');
+var Symbol$1 = global$a.Symbol;
+var symbolFor = Symbol$1 && Symbol$1['for'];
+var createWellKnownSymbol = USE_SYMBOL_AS_UID ? Symbol$1 : Symbol$1 && Symbol$1.withoutSetter || uid$1;
+
+var wellKnownSymbol$3 = function (name) {
+  if (!hasOwn$6(WellKnownSymbolsStore, name) || !(NATIVE_SYMBOL || typeof WellKnownSymbolsStore[name] == 'string')) {
+    var description = 'Symbol.' + name;
+    if (NATIVE_SYMBOL && hasOwn$6(Symbol$1, name)) {
+      WellKnownSymbolsStore[name] = Symbol$1[name];
+    } else if (USE_SYMBOL_AS_UID && symbolFor) {
+      WellKnownSymbolsStore[name] = symbolFor(description);
+    } else {
+      WellKnownSymbolsStore[name] = createWellKnownSymbol(description);
+    }
+  } return WellKnownSymbolsStore[name];
+};
 
-  Object.defineProperty(exports, "__esModule", {
-    value: true
-  });
-  exports.default = void 0;
+var global$9 = global$m;
+var call$1 = functionCall;
+var isObject$3 = isObject$5;
+var isSymbol$1 = isSymbol$2;
+var getMethod = getMethod$1;
+var ordinaryToPrimitive = ordinaryToPrimitive$1;
+var wellKnownSymbol$2 = wellKnownSymbol$3;
+
+var TypeError$4 = global$9.TypeError;
+var TO_PRIMITIVE = wellKnownSymbol$2('toPrimitive');
+
+// `ToPrimitive` abstract operation
+// https://tc39.es/ecma262/#sec-toprimitive
+var toPrimitive$1 = function (input, pref) {
+  if (!isObject$3(input) || isSymbol$1(input)) return input;
+  var exoticToPrim = getMethod(input, TO_PRIMITIVE);
+  var result;
+  if (exoticToPrim) {
+    if (pref === undefined) pref = 'default';
+    result = call$1(exoticToPrim, input, pref);
+    if (!isObject$3(result) || isSymbol$1(result)) return result;
+    throw TypeError$4("Can't convert object to primitive value");
+  }
+  if (pref === undefined) pref = 'number';
+  return ordinaryToPrimitive(input, pref);
+};
 
-  var _parseSeq = _interopRequireDefault(parseSeq_1);
+var toPrimitive = toPrimitive$1;
+var isSymbol = isSymbol$2;
 
-  var _Seq = _interopRequireDefault(Seq);
+// `ToPropertyKey` abstract operation
+// https://tc39.es/ecma262/#sec-topropertykey
+var toPropertyKey$2 = function (argument) {
+  var key = toPrimitive(argument, 'string');
+  return isSymbol(key) ? key : key + '';
+};
 
-  function _interopRequireDefault(obj) {
-    return obj && obj.__esModule ? obj : {
-      default: obj
-    };
-  }
+var global$8 = global$m;
+var isObject$2 = isObject$5;
 
-  function createSeq(schema, obj, ctx) {
-    const seq = new _Seq.default(schema);
+var document = global$8.document;
+// typeof document.createElement is 'object' in old IE
+var EXISTS$1 = isObject$2(document) && isObject$2(document.createElement);
 
-    if (obj && obj[Symbol.iterator]) {
-      for (const it of obj) {
-        const v = schema.createNode(it, ctx.wrapScalars, null, ctx);
-        seq.items.push(v);
-      }
-    }
+var documentCreateElement = function (it) {
+  return EXISTS$1 ? document.createElement(it) : {};
+};
 
-    return seq;
-  }
+var DESCRIPTORS$4 = descriptors;
+var fails$3 = fails$7;
+var createElement = documentCreateElement;
 
-  var _default = {
-    createNode: createSeq,
-    default: true,
-    nodeClass: _Seq.default,
-    tag: 'tag:yaml.org,2002:seq',
-    resolve: _parseSeq.default
-  };
-  exports.default = _default;
+// Thank's IE8 for his funny defineProperty
+var ie8DomDefine = !DESCRIPTORS$4 && !fails$3(function () {
+  // eslint-disable-next-line es/no-object-defineproperty -- requied for testing
+  return Object.defineProperty(createElement('div'), 'a', {
+    get: function () { return 7; }
+  }).a != 7;
 });
-unwrapExports(seq);
 
-var string = createCommonjsModule(function (module, exports) {
+var DESCRIPTORS$3 = descriptors;
+var call = functionCall;
+var propertyIsEnumerableModule = objectPropertyIsEnumerable;
+var createPropertyDescriptor$1 = createPropertyDescriptor$2;
+var toIndexedObject$2 = toIndexedObject$3;
+var toPropertyKey$1 = toPropertyKey$2;
+var hasOwn$5 = hasOwnProperty_1;
+var IE8_DOM_DEFINE$1 = ie8DomDefine;
+
+// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
+var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
+
+// `Object.getOwnPropertyDescriptor` method
+// https://tc39.es/ecma262/#sec-object.getownpropertydescriptor
+objectGetOwnPropertyDescriptor.f = DESCRIPTORS$3 ? $getOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) {
+  O = toIndexedObject$2(O);
+  P = toPropertyKey$1(P);
+  if (IE8_DOM_DEFINE$1) try {
+    return $getOwnPropertyDescriptor(O, P);
+  } catch (error) { /* empty */ }
+  if (hasOwn$5(O, P)) return createPropertyDescriptor$1(!call(propertyIsEnumerableModule.f, O, P), O[P]);
+};
 
-  Object.defineProperty(exports, "__esModule", {
-    value: true
-  });
-  exports.default = exports.resolveString = void 0;
-
-  const resolveString = (doc, node) => {
-    // on error, will return { str: string, errors: Error[] }
-    const res = node.strValue;
-    if (!res) return '';
-    if (typeof res === 'string') return res;
-    res.errors.forEach(error => {
-      if (!error.source) error.source = node;
-      doc.errors.push(error);
-    });
-    return res.str;
-  };
+var objectDefineProperty = {};
 
-  exports.resolveString = resolveString;
-  var _default = {
-    identify: value => typeof value === 'string',
-    default: true,
-    tag: 'tag:yaml.org,2002:str',
-    resolve: resolveString,
-
-    stringify(item, ctx, onComment, onChompKeep) {
-      ctx = Object.assign({
-        actualString: true
-      }, ctx);
-      return (0, stringify.stringifyString)(item, ctx, onComment, onChompKeep);
-    },
-
-    options: options.strOptions
-  };
-  exports.default = _default;
-});
-unwrapExports(string);
-var string_1 = string.resolveString;
+var global$7 = global$m;
+var isObject$1 = isObject$5;
 
-var failsafe = createCommonjsModule(function (module, exports) {
+var String$2 = global$7.String;
+var TypeError$3 = global$7.TypeError;
 
-  Object.defineProperty(exports, "__esModule", {
-    value: true
-  });
-  exports.default = void 0;
+// `Assert: Type(argument) is Object`
+var anObject$2 = function (argument) {
+  if (isObject$1(argument)) return argument;
+  throw TypeError$3(String$2(argument) + ' is not an object');
+};
 
-  var _map = _interopRequireDefault(map);
+var global$6 = global$m;
+var DESCRIPTORS$2 = descriptors;
+var IE8_DOM_DEFINE = ie8DomDefine;
+var anObject$1 = anObject$2;
+var toPropertyKey = toPropertyKey$2;
+
+var TypeError$2 = global$6.TypeError;
+// eslint-disable-next-line es/no-object-defineproperty -- safe
+var $defineProperty = Object.defineProperty;
+
+// `Object.defineProperty` method
+// https://tc39.es/ecma262/#sec-object.defineproperty
+objectDefineProperty.f = DESCRIPTORS$2 ? $defineProperty : function defineProperty(O, P, Attributes) {
+  anObject$1(O);
+  P = toPropertyKey(P);
+  anObject$1(Attributes);
+  if (IE8_DOM_DEFINE) try {
+    return $defineProperty(O, P, Attributes);
+  } catch (error) { /* empty */ }
+  if ('get' in Attributes || 'set' in Attributes) throw TypeError$2('Accessors not supported');
+  if ('value' in Attributes) O[P] = Attributes.value;
+  return O;
+};
 
-  var _seq = _interopRequireDefault(seq);
+var DESCRIPTORS$1 = descriptors;
+var definePropertyModule$1 = objectDefineProperty;
+var createPropertyDescriptor = createPropertyDescriptor$2;
 
-  var _string = _interopRequireDefault(string);
+var createNonEnumerableProperty$3 = DESCRIPTORS$1 ? function (object, key, value) {
+  return definePropertyModule$1.f(object, key, createPropertyDescriptor(1, value));
+} : function (object, key, value) {
+  object[key] = value;
+  return object;
+};
 
-  function _interopRequireDefault(obj) {
-    return obj && obj.__esModule ? obj : {
-      default: obj
-    };
-  }
+var redefine$1 = {exports: {}};
 
-  var _default = [_map.default, _seq.default, _string.default];
-  exports.default = _default;
-});
-unwrapExports(failsafe);
+var uncurryThis$5 = functionUncurryThis;
+var isCallable$4 = isCallable$a;
+var store$1 = sharedStore;
 
-var core = createCommonjsModule(function (module, exports) {
+var functionToString = uncurryThis$5(Function.toString);
 
-  Object.defineProperty(exports, "__esModule", {
-    value: true
-  });
-  exports.default = exports.floatObj = exports.expObj = exports.nanObj = exports.hexObj = exports.intObj = exports.octObj = exports.boolObj = exports.nullObj = void 0;
+// this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper
+if (!isCallable$4(store$1.inspectSource)) {
+  store$1.inspectSource = function (it) {
+    return functionToString(it);
+  };
+}
 
-  var _Scalar = _interopRequireDefault(Scalar_1);
+var inspectSource$2 = store$1.inspectSource;
 
-  var _failsafe = _interopRequireDefault(failsafe);
+var global$5 = global$m;
+var isCallable$3 = isCallable$a;
+var inspectSource$1 = inspectSource$2;
 
-  function _interopRequireDefault(obj) {
-    return obj && obj.__esModule ? obj : {
-      default: obj
-    };
-  }
+var WeakMap$1 = global$5.WeakMap;
 
-  const nullObj = {
-    identify: value => value == null,
-    createNode: (schema, value, ctx) => ctx.wrapScalars ? new _Scalar.default(null) : null,
-    default: true,
-    tag: 'tag:yaml.org,2002:null',
-    test: /^(?:~|[Nn]ull|NULL)?$/,
-    resolve: () => null,
-    options: options.nullOptions,
-    stringify: () => options.nullOptions.nullStr
+var nativeWeakMap = isCallable$3(WeakMap$1) && /native code/.test(inspectSource$1(WeakMap$1));
+
+var shared$1 = shared$3.exports;
+var uid = uid$2;
+
+var keys = shared$1('keys');
+
+var sharedKey$1 = function (key) {
+  return keys[key] || (keys[key] = uid(key));
+};
+
+var hiddenKeys$3 = {};
+
+var NATIVE_WEAK_MAP = nativeWeakMap;
+var global$4 = global$m;
+var uncurryThis$4 = functionUncurryThis;
+var isObject = isObject$5;
+var createNonEnumerableProperty$2 = createNonEnumerableProperty$3;
+var hasOwn$4 = hasOwnProperty_1;
+var shared = sharedStore;
+var sharedKey = sharedKey$1;
+var hiddenKeys$2 = hiddenKeys$3;
+
+var OBJECT_ALREADY_INITIALIZED = 'Object already initialized';
+var TypeError$1 = global$4.TypeError;
+var WeakMap = global$4.WeakMap;
+var set$1, get, has;
+
+var enforce = function (it) {
+  return has(it) ? get(it) : set$1(it, {});
+};
+
+var getterFor = function (TYPE) {
+  return function (it) {
+    var state;
+    if (!isObject(it) || (state = get(it)).type !== TYPE) {
+      throw TypeError$1('Incompatible receiver, ' + TYPE + ' required');
+    } return state;
   };
-  exports.nullObj = nullObj;
-  const boolObj = {
-    identify: value => typeof value === 'boolean',
-    default: true,
-    tag: 'tag:yaml.org,2002:bool',
-    test: /^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,
-    resolve: str => str[0] === 't' || str[0] === 'T',
-    options: options.boolOptions,
-    stringify: ({
-      value
-    }) => value ? options.boolOptions.trueStr : options.boolOptions.falseStr
+};
+
+if (NATIVE_WEAK_MAP || shared.state) {
+  var store = shared.state || (shared.state = new WeakMap());
+  var wmget = uncurryThis$4(store.get);
+  var wmhas = uncurryThis$4(store.has);
+  var wmset = uncurryThis$4(store.set);
+  set$1 = function (it, metadata) {
+    if (wmhas(store, it)) throw new TypeError$1(OBJECT_ALREADY_INITIALIZED);
+    metadata.facade = it;
+    wmset(store, it, metadata);
+    return metadata;
   };
-  exports.boolObj = boolObj;
-  const octObj = {
-    identify: value => typeof value === 'number',
-    default: true,
-    tag: 'tag:yaml.org,2002:int',
-    format: 'OCT',
-    test: /^0o([0-7]+)$/,
-    resolve: (str, oct) => parseInt(oct, 8),
-    stringify: ({
-      value
-    }) => '0o' + value.toString(8)
+  get = function (it) {
+    return wmget(store, it) || {};
   };
-  exports.octObj = octObj;
-  const intObj = {
-    identify: value => typeof value === 'number',
-    default: true,
-    tag: 'tag:yaml.org,2002:int',
-    test: /^[-+]?[0-9]+$/,
-    resolve: str => parseInt(str, 10),
-    stringify: stringify.stringifyNumber
+  has = function (it) {
+    return wmhas(store, it);
   };
-  exports.intObj = intObj;
-  const hexObj = {
-    identify: value => typeof value === 'number',
-    default: true,
-    tag: 'tag:yaml.org,2002:int',
-    format: 'HEX',
-    test: /^0x([0-9a-fA-F]+)$/,
-    resolve: (str, hex) => parseInt(hex, 16),
-    stringify: ({
-      value
-    }) => '0x' + value.toString(16)
+} else {
+  var STATE = sharedKey('state');
+  hiddenKeys$2[STATE] = true;
+  set$1 = function (it, metadata) {
+    if (hasOwn$4(it, STATE)) throw new TypeError$1(OBJECT_ALREADY_INITIALIZED);
+    metadata.facade = it;
+    createNonEnumerableProperty$2(it, STATE, metadata);
+    return metadata;
   };
-  exports.hexObj = hexObj;
-  const nanObj = {
-    identify: value => typeof value === 'number',
-    default: true,
-    tag: 'tag:yaml.org,2002:float',
-    test: /^(?:[-+]?\.inf|(\.nan))$/i,
-    resolve: (str, nan) => nan ? NaN : str[0] === '-' ? Number.NEGATIVE_INFINITY : Number.POSITIVE_INFINITY,
-    stringify: stringify.stringifyNumber
+  get = function (it) {
+    return hasOwn$4(it, STATE) ? it[STATE] : {};
   };
-  exports.nanObj = nanObj;
-  const expObj = {
-    identify: value => typeof value === 'number',
-    default: true,
-    tag: 'tag:yaml.org,2002:float',
-    format: 'EXP',
-    test: /^[-+]?(?:0|[1-9][0-9]*)(\.[0-9]*)?[eE][-+]?[0-9]+$/,
-    resolve: str => parseFloat(str),
-    stringify: ({
-      value
-    }) => Number(value).toExponential()
+  has = function (it) {
+    return hasOwn$4(it, STATE);
   };
-  exports.expObj = expObj;
-  const floatObj = {
-    identify: value => typeof value === 'number',
-    default: true,
-    tag: 'tag:yaml.org,2002:float',
-    test: /^[-+]?(?:0|[1-9][0-9]*)\.([0-9]*)$/,
-
-    resolve(str, frac) {
-      const node = new _Scalar.default(parseFloat(str));
-      if (frac && frac[frac.length - 1] === '0') node.minFractionDigits = frac.length;
-      return node;
-    },
+}
 
-    stringify: stringify.stringifyNumber
-  };
-  exports.floatObj = floatObj;
+var internalState = {
+  set: set$1,
+  get: get,
+  has: has,
+  enforce: enforce,
+  getterFor: getterFor
+};
+
+var DESCRIPTORS = descriptors;
+var hasOwn$3 = hasOwnProperty_1;
+
+var FunctionPrototype = Function.prototype;
+// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
+var getDescriptor = DESCRIPTORS && Object.getOwnPropertyDescriptor;
+
+var EXISTS = hasOwn$3(FunctionPrototype, 'name');
+// additional protection from minified / mangled / dropped function names
+var PROPER = EXISTS && (function something() { /* empty */ }).name === 'something';
+var CONFIGURABLE = EXISTS && (!DESCRIPTORS || (DESCRIPTORS && getDescriptor(FunctionPrototype, 'name').configurable));
 
-  var _default = _failsafe.default.concat([nullObj, boolObj, octObj, intObj, hexObj, nanObj, expObj, floatObj]);
+var functionName = {
+  EXISTS: EXISTS,
+  PROPER: PROPER,
+  CONFIGURABLE: CONFIGURABLE
+};
 
-  exports.default = _default;
+var global$3 = global$m;
+var isCallable$2 = isCallable$a;
+var hasOwn$2 = hasOwnProperty_1;
+var createNonEnumerableProperty$1 = createNonEnumerableProperty$3;
+var setGlobal$1 = setGlobal$3;
+var inspectSource = inspectSource$2;
+var InternalStateModule = internalState;
+var CONFIGURABLE_FUNCTION_NAME = functionName.CONFIGURABLE;
+
+var getInternalState = InternalStateModule.get;
+var enforceInternalState = InternalStateModule.enforce;
+var TEMPLATE = String(String).split('String');
+
+(redefine$1.exports = function (O, key, value, options) {
+  var unsafe = options ? !!options.unsafe : false;
+  var simple = options ? !!options.enumerable : false;
+  var noTargetGet = options ? !!options.noTargetGet : false;
+  var name = options && options.name !== undefined ? options.name : key;
+  var state;
+  if (isCallable$2(value)) {
+    if (String(name).slice(0, 7) === 'Symbol(') {
+      name = '[' + String(name).replace(/^Symbol\(([^)]*)\)/, '$1') + ']';
+    }
+    if (!hasOwn$2(value, 'name') || (CONFIGURABLE_FUNCTION_NAME && value.name !== name)) {
+      createNonEnumerableProperty$1(value, 'name', name);
+    }
+    state = enforceInternalState(value);
+    if (!state.source) {
+      state.source = TEMPLATE.join(typeof name == 'string' ? name : '');
+    }
+  }
+  if (O === global$3) {
+    if (simple) O[key] = value;
+    else setGlobal$1(key, value);
+    return;
+  } else if (!unsafe) {
+    delete O[key];
+  } else if (!noTargetGet && O[key]) {
+    simple = true;
+  }
+  if (simple) O[key] = value;
+  else createNonEnumerableProperty$1(O, key, value);
+// add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
+})(Function.prototype, 'toString', function toString() {
+  return isCallable$2(this) && getInternalState(this).source || inspectSource(this);
 });
-unwrapExports(core);
-var core_1 = core.floatObj;
-var core_2 = core.expObj;
-var core_3 = core.nanObj;
-var core_4 = core.hexObj;
-var core_5 = core.intObj;
-var core_6 = core.octObj;
-var core_7 = core.boolObj;
-var core_8 = core.nullObj;
-
-var json = createCommonjsModule(function (module, exports) {
 
-  Object.defineProperty(exports, "__esModule", {
-    value: true
-  });
-  exports.default = void 0;
+var objectGetOwnPropertyNames = {};
 
-  var _map = _interopRequireDefault(map);
+var ceil = Math.ceil;
+var floor$1 = Math.floor;
 
-  var _seq = _interopRequireDefault(seq);
+// `ToIntegerOrInfinity` abstract operation
+// https://tc39.es/ecma262/#sec-tointegerorinfinity
+var toIntegerOrInfinity$2 = function (argument) {
+  var number = +argument;
+  // eslint-disable-next-line no-self-compare -- safe
+  return number !== number || number === 0 ? 0 : (number > 0 ? floor$1 : ceil)(number);
+};
 
-  var _Scalar = _interopRequireDefault(Scalar_1);
+var toIntegerOrInfinity$1 = toIntegerOrInfinity$2;
 
-  function _interopRequireDefault(obj) {
-    return obj && obj.__esModule ? obj : {
-      default: obj
-    };
-  }
+var max = Math.max;
+var min$1 = Math.min;
 
-  const schema = [_map.default, _seq.default, {
-    identify: value => typeof value === 'string',
-    default: true,
-    tag: 'tag:yaml.org,2002:str',
-    resolve: string.resolveString,
-    stringify: value => JSON.stringify(value)
-  }, {
-    identify: value => value == null,
-    createNode: (schema, value, ctx) => ctx.wrapScalars ? new _Scalar.default(null) : null,
-    default: true,
-    tag: 'tag:yaml.org,2002:null',
-    test: /^null$/,
-    resolve: () => null,
-    stringify: value => JSON.stringify(value)
-  }, {
-    identify: value => typeof value === 'boolean',
-    default: true,
-    tag: 'tag:yaml.org,2002:bool',
-    test: /^true|false$/,
-    resolve: str => str === 'true',
-    stringify: value => JSON.stringify(value)
-  }, {
-    identify: value => typeof value === 'number',
-    default: true,
-    tag: 'tag:yaml.org,2002:int',
-    test: /^-?(?:0|[1-9][0-9]*)$/,
-    resolve: str => parseInt(str, 10),
-    stringify: value => JSON.stringify(value)
-  }, {
-    identify: value => typeof value === 'number',
-    default: true,
-    tag: 'tag:yaml.org,2002:float',
-    test: /^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,
-    resolve: str => parseFloat(str),
-    stringify: value => JSON.stringify(value)
-  }];
-
-  schema.scalarFallback = str => {
-    throw new SyntaxError(`Unresolved plain scalar ${JSON.stringify(str)}`);
-  };
+// Helper for a popular repeating case of the spec:
+// Let integer be ? ToInteger(index).
+// If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).
+var toAbsoluteIndex$1 = function (index, length) {
+  var integer = toIntegerOrInfinity$1(index);
+  return integer < 0 ? max(integer + length, 0) : min$1(integer, length);
+};
 
-  var _default = schema;
-  exports.default = _default;
-});
-unwrapExports(json);
+var toIntegerOrInfinity = toIntegerOrInfinity$2;
 
-var binary = createCommonjsModule(function (module, exports) {
+var min = Math.min;
 
-  Object.defineProperty(exports, "__esModule", {
-    value: true
-  });
-  exports.default = void 0;
-  /* global atob, btoa, Buffer */
-
-  var _default = {
-    identify: value => value instanceof Uint8Array,
-    // Buffer inherits from Uint8Array
-    default: false,
-    tag: 'tag:yaml.org,2002:binary',
-
-    /**
-     * Returns a Buffer in node and an Uint8Array in browsers
-     *
-     * To use the resulting buffer as an image, you'll want to do something like:
-     *
-     *   const blob = new Blob([buffer], { type: 'image/jpeg' })
-     *   document.querySelector('#photo').src = URL.createObjectURL(blob)
-     */
-    resolve: (doc, node) => {
-      if (typeof Buffer === 'function') {
-        const src = (0, string.resolveString)(doc, node);
-        return Buffer.from(src, 'base64');
-      } else if (typeof atob === 'function') {
-        const src = atob((0, string.resolveString)(doc, node));
-        const buffer = new Uint8Array(src.length);
-
-        for (let i = 0; i < src.length; ++i) buffer[i] = src.charCodeAt(i);
-
-        return buffer;
-      } else {
-        doc.errors.push(new errors.YAMLReferenceError(node, 'This environment does not support reading binary tags; either Buffer or atob is required'));
-        return null;
-      }
-    },
-    options: options.binaryOptions,
-    stringify: ({
-      comment,
-      type,
-      value
-    }, ctx, onComment, onChompKeep) => {
-      let src;
+// `ToLength` abstract operation
+// https://tc39.es/ecma262/#sec-tolength
+var toLength$1 = function (argument) {
+  return argument > 0 ? min(toIntegerOrInfinity(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
+};
 
-      if (typeof Buffer === 'function') {
-        src = value instanceof Buffer ? value.toString('base64') : Buffer.from(value.buffer).toString('base64');
-      } else if (typeof btoa === 'function') {
-        let s = '';
+var toLength = toLength$1;
 
-        for (let i = 0; i < value.length; ++i) s += String.fromCharCode(value[i]);
+// `LengthOfArrayLike` abstract operation
+// https://tc39.es/ecma262/#sec-lengthofarraylike
+var lengthOfArrayLike$2 = function (obj) {
+  return toLength(obj.length);
+};
 
-        src = btoa(s);
-      } else {
-        throw new Error('This environment does not support writing binary tags; either Buffer or btoa is required');
-      }
+var toIndexedObject$1 = toIndexedObject$3;
+var toAbsoluteIndex = toAbsoluteIndex$1;
+var lengthOfArrayLike$1 = lengthOfArrayLike$2;
+
+// `Array.prototype.{ indexOf, includes }` methods implementation
+var createMethod = function (IS_INCLUDES) {
+  return function ($this, el, fromIndex) {
+    var O = toIndexedObject$1($this);
+    var length = lengthOfArrayLike$1(O);
+    var index = toAbsoluteIndex(fromIndex, length);
+    var value;
+    // Array#includes uses SameValueZero equality algorithm
+    // eslint-disable-next-line no-self-compare -- NaN check
+    if (IS_INCLUDES && el != el) while (length > index) {
+      value = O[index++];
+      // eslint-disable-next-line no-self-compare -- NaN check
+      if (value != value) return true;
+    // Array#indexOf ignores holes, Array#includes - not
+    } else for (;length > index; index++) {
+      if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;
+    } return !IS_INCLUDES && -1;
+  };
+};
 
-      if (!type) type = options.binaryOptions.defaultType;
+var arrayIncludes = {
+  // `Array.prototype.includes` method
+  // https://tc39.es/ecma262/#sec-array.prototype.includes
+  includes: createMethod(true),
+  // `Array.prototype.indexOf` method
+  // https://tc39.es/ecma262/#sec-array.prototype.indexof
+  indexOf: createMethod(false)
+};
 
-      if (type === constants.Type.QUOTE_DOUBLE) {
-        value = src;
-      } else {
-        const {
-          lineWidth
-        } = options.binaryOptions;
-        const n = Math.ceil(src.length / lineWidth);
-        const lines = new Array(n);
+var uncurryThis$3 = functionUncurryThis;
+var hasOwn$1 = hasOwnProperty_1;
+var toIndexedObject = toIndexedObject$3;
+var indexOf = arrayIncludes.indexOf;
+var hiddenKeys$1 = hiddenKeys$3;
+
+var push$1 = uncurryThis$3([].push);
+
+var objectKeysInternal = function (object, names) {
+  var O = toIndexedObject(object);
+  var i = 0;
+  var result = [];
+  var key;
+  for (key in O) !hasOwn$1(hiddenKeys$1, key) && hasOwn$1(O, key) && push$1(result, key);
+  // Don't enum bug & hidden keys
+  while (names.length > i) if (hasOwn$1(O, key = names[i++])) {
+    ~indexOf(result, key) || push$1(result, key);
+  }
+  return result;
+};
 
-        for (let i = 0, o = 0; i < n; ++i, o += lineWidth) {
-          lines[i] = src.substr(o, lineWidth);
-        }
+// IE8- don't enum bug keys
+var enumBugKeys$1 = [
+  'constructor',
+  'hasOwnProperty',
+  'isPrototypeOf',
+  'propertyIsEnumerable',
+  'toLocaleString',
+  'toString',
+  'valueOf'
+];
 
-        value = lines.join(type === constants.Type.BLOCK_LITERAL ? '\n' : ' ');
-      }
+var internalObjectKeys = objectKeysInternal;
+var enumBugKeys = enumBugKeys$1;
 
-      return (0, stringify.stringifyString)({
-        comment,
-        type,
-        value
-      }, ctx, onComment, onChompKeep);
-    }
-  };
-  exports.default = _default;
-});
-unwrapExports(binary);
+var hiddenKeys = enumBugKeys.concat('length', 'prototype');
 
-var pairs = createCommonjsModule(function (module, exports) {
+// `Object.getOwnPropertyNames` method
+// https://tc39.es/ecma262/#sec-object.getownpropertynames
+// eslint-disable-next-line es/no-object-getownpropertynames -- safe
+objectGetOwnPropertyNames.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
+  return internalObjectKeys(O, hiddenKeys);
+};
 
-  Object.defineProperty(exports, "__esModule", {
-    value: true
-  });
-  exports.parsePairs = parsePairs;
-  exports.createPairs = createPairs;
-  exports.default = void 0;
+var objectGetOwnPropertySymbols = {};
 
-  var _Map$1 = _interopRequireDefault(_Map);
+// eslint-disable-next-line es/no-object-getownpropertysymbols -- safe
+objectGetOwnPropertySymbols.f = Object.getOwnPropertySymbols;
 
-  var _Pair = _interopRequireDefault(Pair_1);
+var getBuiltIn = getBuiltIn$3;
+var uncurryThis$2 = functionUncurryThis;
+var getOwnPropertyNamesModule = objectGetOwnPropertyNames;
+var getOwnPropertySymbolsModule = objectGetOwnPropertySymbols;
+var anObject = anObject$2;
 
-  var _parseSeq = _interopRequireDefault(parseSeq_1);
+var concat = uncurryThis$2([].concat);
 
-  var _Seq = _interopRequireDefault(Seq);
+// all object keys, includes non-enumerable and symbols
+var ownKeys$1 = getBuiltIn('Reflect', 'ownKeys') || function ownKeys(it) {
+  var keys = getOwnPropertyNamesModule.f(anObject(it));
+  var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;
+  return getOwnPropertySymbols ? concat(keys, getOwnPropertySymbols(it)) : keys;
+};
 
-  function _interopRequireDefault(obj) {
-    return obj && obj.__esModule ? obj : {
-      default: obj
-    };
+var hasOwn = hasOwnProperty_1;
+var ownKeys = ownKeys$1;
+var getOwnPropertyDescriptorModule = objectGetOwnPropertyDescriptor;
+var definePropertyModule = objectDefineProperty;
+
+var copyConstructorProperties$1 = function (target, source) {
+  var keys = ownKeys(source);
+  var defineProperty = definePropertyModule.f;
+  var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;
+  for (var i = 0; i < keys.length; i++) {
+    var key = keys[i];
+    if (!hasOwn(target, key)) defineProperty(target, key, getOwnPropertyDescriptor(source, key));
   }
+};
 
-  function parsePairs(doc, cst) {
-    const seq = (0, _parseSeq.default)(doc, cst);
+var fails$2 = fails$7;
+var isCallable$1 = isCallable$a;
 
-    for (let i = 0; i < seq.items.length; ++i) {
-      let item = seq.items[i];
-      if (item instanceof _Pair.default) continue;else if (item instanceof _Map$1.default) {
-        if (item.items.length > 1) {
-          const msg = 'Each pair must have its own sequence indicator';
-          throw new errors.YAMLSemanticError(cst, msg);
-        }
+var replacement = /#|\.prototype\./;
 
-        const pair = item.items[0] || new _Pair.default();
-        if (item.commentBefore) pair.commentBefore = pair.commentBefore ? `${item.commentBefore}\n${pair.commentBefore}` : item.commentBefore;
-        if (item.comment) pair.comment = pair.comment ? `${item.comment}\n${pair.comment}` : item.comment;
-        item = pair;
-      }
-      seq.items[i] = item instanceof _Pair.default ? item : new _Pair.default(item);
-    }
+var isForced$1 = function (feature, detection) {
+  var value = data[normalize(feature)];
+  return value == POLYFILL ? true
+    : value == NATIVE ? false
+    : isCallable$1(detection) ? fails$2(detection)
+    : !!detection;
+};
 
-    return seq;
+var normalize = isForced$1.normalize = function (string) {
+  return String(string).replace(replacement, '.').toLowerCase();
+};
+
+var data = isForced$1.data = {};
+var NATIVE = isForced$1.NATIVE = 'N';
+var POLYFILL = isForced$1.POLYFILL = 'P';
+
+var isForced_1 = isForced$1;
+
+var global$2 = global$m;
+var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f;
+var createNonEnumerableProperty = createNonEnumerableProperty$3;
+var redefine = redefine$1.exports;
+var setGlobal = setGlobal$3;
+var copyConstructorProperties = copyConstructorProperties$1;
+var isForced = isForced_1;
+
+/*
+  options.target      - name of the target object
+  options.global      - target is the global object
+  options.stat        - export as static methods of target
+  options.proto       - export as prototype methods of target
+  options.real        - real prototype method for the `pure` version
+  options.forced      - export even if the native feature is available
+  options.bind        - bind methods to the target, required for the `pure` version
+  options.wrap        - wrap constructors to preventing global pollution, required for the `pure` version
+  options.unsafe      - use the simple assignment of property instead of delete + defineProperty
+  options.sham        - add a flag to not completely full polyfills
+  options.enumerable  - export as enumerable property
+  options.noTargetGet - prevent calling a getter on target
+  options.name        - the .name of the function if it does not match the key
+*/
+var _export = function (options, source) {
+  var TARGET = options.target;
+  var GLOBAL = options.global;
+  var STATIC = options.stat;
+  var FORCED, target, key, targetProperty, sourceProperty, descriptor;
+  if (GLOBAL) {
+    target = global$2;
+  } else if (STATIC) {
+    target = global$2[TARGET] || setGlobal(TARGET, {});
+  } else {
+    target = (global$2[TARGET] || {}).prototype;
+  }
+  if (target) for (key in source) {
+    sourceProperty = source[key];
+    if (options.noTargetGet) {
+      descriptor = getOwnPropertyDescriptor(target, key);
+      targetProperty = descriptor && descriptor.value;
+    } else targetProperty = target[key];
+    FORCED = isForced(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);
+    // contained in target
+    if (!FORCED && targetProperty !== undefined) {
+      if (typeof sourceProperty == typeof targetProperty) continue;
+      copyConstructorProperties(sourceProperty, targetProperty);
+    }
+    // add a flag to not completely full polyfills
+    if (options.sham || (targetProperty && targetProperty.sham)) {
+      createNonEnumerableProperty(sourceProperty, 'sham', true);
+    }
+    // extend global
+    redefine(target, key, sourceProperty, options);
   }
+};
 
-  function createPairs(schema, iterable, ctx) {
-    const pairs = new _Seq.default(schema);
-    pairs.tag = 'tag:yaml.org,2002:pairs';
+var wellKnownSymbol$1 = wellKnownSymbol$3;
 
-    for (const it of iterable) {
-      let key, value;
+var TO_STRING_TAG$1 = wellKnownSymbol$1('toStringTag');
+var test$1 = {};
 
-      if (Array.isArray(it)) {
-        if (it.length === 2) {
-          key = it[0];
-          value = it[1];
-        } else throw new TypeError(`Expected [key, value] tuple: ${it}`);
-      } else if (it && it instanceof Object) {
-        const keys = Object.keys(it);
-
-        if (keys.length === 1) {
-          key = keys[0];
-          value = it[key];
-        } else throw new TypeError(`Expected { key: value } tuple: ${it}`);
-      } else {
-        key = it;
-      }
+test$1[TO_STRING_TAG$1] = 'z';
 
-      const pair = schema.createPair(key, value, ctx);
-      pairs.items.push(pair);
-    }
+var toStringTagSupport = String(test$1) === '[object z]';
 
-    return pairs;
-  }
+var global$1 = global$m;
+var TO_STRING_TAG_SUPPORT = toStringTagSupport;
+var isCallable = isCallable$a;
+var classofRaw = classofRaw$1;
+var wellKnownSymbol = wellKnownSymbol$3;
 
-  var _default = {
-    default: false,
-    tag: 'tag:yaml.org,2002:pairs',
-    resolve: parsePairs,
-    createNode: createPairs
-  };
-  exports.default = _default;
-});
-unwrapExports(pairs);
-var pairs_1 = pairs.parsePairs;
-var pairs_2 = pairs.createPairs;
+var TO_STRING_TAG = wellKnownSymbol('toStringTag');
+var Object$1 = global$1.Object;
 
-var omap = createCommonjsModule(function (module, exports) {
+// ES3 wrong here
+var CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) == 'Arguments';
 
-  Object.defineProperty(exports, "__esModule", {
-    value: true
-  });
-  exports.default = exports.YAMLOMap = void 0;
+// fallback for IE11 Script Access Denied error
+var tryGet = function (it, key) {
+  try {
+    return it[key];
+  } catch (error) { /* empty */ }
+};
+
+// getting tag from ES6+ `Object.prototype.toString`
+var classof$1 = TO_STRING_TAG_SUPPORT ? classofRaw : function (it) {
+  var O, tag, result;
+  return it === undefined ? 'Undefined' : it === null ? 'Null'
+    // @@toStringTag case
+    : typeof (tag = tryGet(O = Object$1(it), TO_STRING_TAG)) == 'string' ? tag
+    // builtinTag case
+    : CORRECT_ARGUMENTS ? classofRaw(O)
+    // ES3 arguments fallback
+    : (result = classofRaw(O)) == 'Object' && isCallable(O.callee) ? 'Arguments' : result;
+};
 
-  var _toJSON = _interopRequireDefault(toJSON_1);
+var global = global$m;
+var classof = classof$1;
 
-  var _Map$1 = _interopRequireDefault(_Map);
+var String$1 = global.String;
 
-  var _Pair = _interopRequireDefault(Pair_1);
+var toString$1 = function (argument) {
+  if (classof(argument) === 'Symbol') throw TypeError('Cannot convert a Symbol value to a string');
+  return String$1(argument);
+};
 
-  var _Scalar = _interopRequireDefault(Scalar_1);
+var uncurryThis$1 = functionUncurryThis;
 
-  var _Seq = _interopRequireDefault(Seq);
+var arraySlice$1 = uncurryThis$1([].slice);
 
-  function _interopRequireDefault(obj) {
-    return obj && obj.__esModule ? obj : {
-      default: obj
-    };
-  }
+var arraySlice = arraySlice$1;
 
-  function _defineProperty(obj, key, value) {
-    if (key in obj) {
-      Object.defineProperty(obj, key, {
-        value: value,
-        enumerable: true,
-        configurable: true,
-        writable: true
-      });
-    } else {
-      obj[key] = value;
+var floor = Math.floor;
+
+var mergeSort = function (array, comparefn) {
+  var length = array.length;
+  var middle = floor(length / 2);
+  return length < 8 ? insertionSort(array, comparefn) : merge(
+    array,
+    mergeSort(arraySlice(array, 0, middle), comparefn),
+    mergeSort(arraySlice(array, middle), comparefn),
+    comparefn
+  );
+};
+
+var insertionSort = function (array, comparefn) {
+  var length = array.length;
+  var i = 1;
+  var element, j;
+
+  while (i < length) {
+    j = i;
+    element = array[i];
+    while (j && comparefn(array[j - 1], element) > 0) {
+      array[j] = array[--j];
     }
+    if (j !== i++) array[j] = element;
+  } return array;
+};
 
-    return obj;
-  }
+var merge = function (array, left, right, comparefn) {
+  var llength = left.length;
+  var rlength = right.length;
+  var lindex = 0;
+  var rindex = 0;
+
+  while (lindex < llength || rindex < rlength) {
+    array[lindex + rindex] = (lindex < llength && rindex < rlength)
+      ? comparefn(left[lindex], right[rindex]) <= 0 ? left[lindex++] : right[rindex++]
+      : lindex < llength ? left[lindex++] : right[rindex++];
+  } return array;
+};
 
-  class YAMLOMap extends _Seq.default {
-    constructor() {
-      super();
+var arraySort = mergeSort;
 
-      _defineProperty(this, "add", _Map$1.default.prototype.add.bind(this));
+var fails$1 = fails$7;
 
-      _defineProperty(this, "delete", _Map$1.default.prototype.delete.bind(this));
+var arrayMethodIsStrict$1 = function (METHOD_NAME, argument) {
+  var method = [][METHOD_NAME];
+  return !!method && fails$1(function () {
+    // eslint-disable-next-line no-useless-call,no-throw-literal -- required for testing
+    method.call(null, argument || function () { throw 1; }, 1);
+  });
+};
 
-      _defineProperty(this, "get", _Map$1.default.prototype.get.bind(this));
+var userAgent$1 = engineUserAgent;
 
-      _defineProperty(this, "has", _Map$1.default.prototype.has.bind(this));
+var firefox = userAgent$1.match(/firefox\/(\d+)/i);
 
-      _defineProperty(this, "set", _Map$1.default.prototype.set.bind(this));
+var engineFfVersion = !!firefox && +firefox[1];
 
-      this.tag = YAMLOMap.tag;
-    }
+var UA = engineUserAgent;
 
-    toJSON(_, ctx) {
-      const map = new Map();
-      if (ctx && ctx.onCreate) ctx.onCreate(map);
+var engineIsIeOrEdge = /MSIE|Trident/.test(UA);
 
-      for (const pair of this.items) {
-        let key, value;
+var userAgent = engineUserAgent;
 
-        if (pair instanceof _Pair.default) {
-          key = (0, _toJSON.default)(pair.key, '', ctx);
-          value = (0, _toJSON.default)(pair.value, key, ctx);
-        } else {
-          key = (0, _toJSON.default)(pair, '', ctx);
-        }
+var webkit = userAgent.match(/AppleWebKit\/(\d+)\./);
 
-        if (map.has(key)) throw new Error('Ordered maps must not include duplicate keys');
-        map.set(key, value);
-      }
+var engineWebkitVersion = !!webkit && +webkit[1];
 
-      return map;
-    }
+var $ = _export;
+var uncurryThis = functionUncurryThis;
+var aCallable = aCallable$2;
+var toObject = toObject$2;
+var lengthOfArrayLike = lengthOfArrayLike$2;
+var toString = toString$1;
+var fails = fails$7;
+var internalSort = arraySort;
+var arrayMethodIsStrict = arrayMethodIsStrict$1;
+var FF = engineFfVersion;
+var IE_OR_EDGE = engineIsIeOrEdge;
+var V8 = engineV8Version;
+var WEBKIT = engineWebkitVersion;
 
-  }
+var test = [];
+var un$Sort = uncurryThis(test.sort);
+var push = uncurryThis(test.push);
+
+// IE8-
+var FAILS_ON_UNDEFINED = fails(function () {
+  test.sort(undefined);
+});
+// V8 bug
+var FAILS_ON_NULL = fails(function () {
+  test.sort(null);
+});
+// Old WebKit
+var STRICT_METHOD = arrayMethodIsStrict('sort');
 
-  exports.YAMLOMap = YAMLOMap;
+var STABLE_SORT = !fails(function () {
+  // feature detection can be too slow, so check engines versions
+  if (V8) return V8 < 70;
+  if (FF && FF > 3) return;
+  if (IE_OR_EDGE) return true;
+  if (WEBKIT) return WEBKIT < 603;
 
-  _defineProperty(YAMLOMap, "tag", 'tag:yaml.org,2002:omap');
+  var result = '';
+  var code, chr, value, index;
 
-  function parseOMap(doc, cst) {
-    const pairs$1 = (0, pairs.parsePairs)(doc, cst);
-    const seenKeys = [];
+  // generate an array with more 512 elements (Chakra and old V8 fails only in this case)
+  for (code = 65; code < 76; code++) {
+    chr = String.fromCharCode(code);
 
-    for (const {
-      key
-    } of pairs$1.items) {
-      if (key instanceof _Scalar.default) {
-        if (seenKeys.includes(key.value)) {
-          const msg = 'Ordered maps must not include duplicate keys';
-          throw new errors.YAMLSemanticError(cst, msg);
-        } else {
-          seenKeys.push(key.value);
-        }
-      }
+    switch (code) {
+      case 66: case 69: case 70: case 72: value = 3; break;
+      case 68: case 71: value = 4; break;
+      default: value = 2;
     }
 
-    return Object.assign(new YAMLOMap(), pairs$1);
+    for (index = 0; index < 47; index++) {
+      test.push({ k: chr + index, v: value });
+    }
   }
 
-  function createOMap(schema, iterable, ctx) {
-    const pairs$1 = (0, pairs.createPairs)(schema, iterable, ctx);
-    const omap = new YAMLOMap();
-    omap.items = pairs$1.items;
-    return omap;
+  test.sort(function (a, b) { return b.v - a.v; });
+
+  for (index = 0; index < test.length; index++) {
+    chr = test[index].k.charAt(0);
+    if (result.charAt(result.length - 1) !== chr) result += chr;
   }
 
-  var _default = {
-    identify: value => value instanceof Map,
-    nodeClass: YAMLOMap,
-    default: false,
-    tag: 'tag:yaml.org,2002:omap',
-    resolve: parseOMap,
-    createNode: createOMap
-  };
-  exports.default = _default;
+  return result !== 'DGBEFHACIJK';
 });
-unwrapExports(omap);
-var omap_1 = omap.YAMLOMap;
-
-var set = createCommonjsModule(function (module, exports) {
 
-  Object.defineProperty(exports, "__esModule", {
-    value: true
-  });
-  exports.default = exports.YAMLSet = void 0;
-
-  var _Map$1 = _interopRequireWildcard(_Map);
+var FORCED = FAILS_ON_UNDEFINED || !FAILS_ON_NULL || !STRICT_METHOD || !STABLE_SORT;
 
-  var _Pair = _interopRequireDefault(Pair_1);
+var getSortCompare = function (comparefn) {
+  return function (x, y) {
+    if (y === undefined) return -1;
+    if (x === undefined) return 1;
+    if (comparefn !== undefined) return +comparefn(x, y) || 0;
+    return toString(x) > toString(y) ? 1 : -1;
+  };
+};
 
-  var _parseMap = _interopRequireDefault(parseMap_1);
+// `Array.prototype.sort` method
+// https://tc39.es/ecma262/#sec-array.prototype.sort
+$({ target: 'Array', proto: true, forced: FORCED }, {
+  sort: function sort(comparefn) {
+    if (comparefn !== undefined) aCallable(comparefn);
 
-  var _Scalar = _interopRequireDefault(Scalar_1);
+    var array = toObject(this);
 
-  function _interopRequireDefault(obj) {
-    return obj && obj.__esModule ? obj : {
-      default: obj
-    };
-  }
+    if (STABLE_SORT) return comparefn === undefined ? un$Sort(array) : un$Sort(array, comparefn);
 
-  function _getRequireWildcardCache() {
-    if (typeof WeakMap !== "function") return null;
-    var cache = new WeakMap();
+    var items = [];
+    var arrayLength = lengthOfArrayLike(array);
+    var itemsLength, index;
 
-    _getRequireWildcardCache = function () {
-      return cache;
-    };
+    for (index = 0; index < arrayLength; index++) {
+      if (index in array) push(items, array[index]);
+    }
 
-    return cache;
-  }
+    internalSort(items, getSortCompare(comparefn));
 
-  function _interopRequireWildcard(obj) {
-    if (obj && obj.__esModule) {
-      return obj;
-    }
+    itemsLength = items.length;
+    index = 0;
 
-    if (obj === null || typeof obj !== "object" && typeof obj !== "function") {
-      return {
-        default: obj
-      };
-    }
+    while (index < itemsLength) array[index] = items[index++];
+    while (index < arrayLength) delete array[index++];
 
-    var cache = _getRequireWildcardCache();
+    return array;
+  }
+});
 
-    if (cache && cache.has(obj)) {
-      return cache.get(obj);
-    }
+var Schema88e323a7 = {};
 
-    var newObj = {};
-    var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
+var warnings1000a372 = {};
 
-    for (var key in obj) {
-      if (Object.prototype.hasOwnProperty.call(obj, key)) {
-        var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
+var PlainValue$3 = PlainValueEc8e588e;
+var resolveSeq$2 = resolveSeqD03cb037;
+/* global atob, btoa, Buffer */
 
-        if (desc && (desc.get || desc.set)) {
-          Object.defineProperty(newObj, key, desc);
-        } else {
-          newObj[key] = obj[key];
-        }
-      }
-    }
+const binary = {
+  identify: value => value instanceof Uint8Array,
+  // Buffer inherits from Uint8Array
+  default: false,
+  tag: 'tag:yaml.org,2002:binary',
 
-    newObj.default = obj;
+  /**
+   * Returns a Buffer in node and an Uint8Array in browsers
+   *
+   * To use the resulting buffer as an image, you'll want to do something like:
+   *
+   *   const blob = new Blob([buffer], { type: 'image/jpeg' })
+   *   document.querySelector('#photo').src = URL.createObjectURL(blob)
+   */
+  resolve: (doc, node) => {
+    const src = resolveSeq$2.resolveString(doc, node);
 
-    if (cache) {
-      cache.set(obj, newObj);
-    }
+    if (typeof Buffer === 'function') {
+      return Buffer.from(src, 'base64');
+    } else if (typeof atob === 'function') {
+      // On IE 11, atob() can't handle newlines
+      const str = atob(src.replace(/[\n\r]/g, ''));
+      const buffer = new Uint8Array(str.length);
 
-    return newObj;
-  }
+      for (let i = 0; i < str.length; ++i) buffer[i] = str.charCodeAt(i);
 
-  function _defineProperty(obj, key, value) {
-    if (key in obj) {
-      Object.defineProperty(obj, key, {
-        value: value,
-        enumerable: true,
-        configurable: true,
-        writable: true
-      });
+      return buffer;
     } else {
-      obj[key] = value;
+      const msg = 'This environment does not support reading binary tags; either Buffer or atob is required';
+      doc.errors.push(new PlainValue$3.YAMLReferenceError(node, msg));
+      return null;
     }
+  },
+  options: resolveSeq$2.binaryOptions,
+  stringify: ({
+    comment,
+    type,
+    value
+  }, ctx, onComment, onChompKeep) => {
+    let src;
 
-    return obj;
-  }
+    if (typeof Buffer === 'function') {
+      src = value instanceof Buffer ? value.toString('base64') : Buffer.from(value.buffer).toString('base64');
+    } else if (typeof btoa === 'function') {
+      let s = '';
 
-  class YAMLSet extends _Map$1.default {
-    constructor() {
-      super();
-      this.tag = YAMLSet.tag;
-    }
+      for (let i = 0; i < value.length; ++i) s += String.fromCharCode(value[i]);
 
-    add(key) {
-      const pair = key instanceof _Pair.default ? key : new _Pair.default(key);
-      const prev = (0, _Map$1.findPair)(this.items, pair.key);
-      if (!prev) this.items.push(pair);
+      src = btoa(s);
+    } else {
+      throw new Error('This environment does not support writing binary tags; either Buffer or btoa is required');
     }
 
-    get(key, keepPair) {
-      const pair = (0, _Map$1.findPair)(this.items, key);
-      return !keepPair && pair instanceof _Pair.default ? pair.key instanceof _Scalar.default ? pair.key.value : pair.key : pair;
-    }
+    if (!type) type = resolveSeq$2.binaryOptions.defaultType;
 
-    set(key, value) {
-      if (typeof value !== 'boolean') throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof value}`);
-      const prev = (0, _Map$1.findPair)(this.items, key);
+    if (type === PlainValue$3.Type.QUOTE_DOUBLE) {
+      value = src;
+    } else {
+      const {
+        lineWidth
+      } = resolveSeq$2.binaryOptions;
+      const n = Math.ceil(src.length / lineWidth);
+      const lines = new Array(n);
 
-      if (prev && !value) {
-        this.items.splice(this.items.indexOf(prev), 1);
-      } else if (!prev && value) {
-        this.items.push(new _Pair.default(key));
+      for (let i = 0, o = 0; i < n; ++i, o += lineWidth) {
+        lines[i] = src.substr(o, lineWidth);
       }
-    }
-
-    toJSON(_, ctx) {
-      return super.toJSON(_, ctx, Set);
-    }
 
-    toString(ctx, onComment, onChompKeep) {
-      if (!ctx) return JSON.stringify(this);
-      if (this.hasAllNullValues()) return super.toString(ctx, onComment, onChompKeep);else throw new Error('Set items must all have null values');
+      value = lines.join(type === PlainValue$3.Type.BLOCK_LITERAL ? '\n' : ' ');
     }
 
+    return resolveSeq$2.stringifyString({
+      comment,
+      type,
+      value
+    }, ctx, onComment, onChompKeep);
   }
+};
 
-  exports.YAMLSet = YAMLSet;
+function parsePairs(doc, cst) {
+  const seq = resolveSeq$2.resolveSeq(doc, cst);
 
-  _defineProperty(YAMLSet, "tag", 'tag:yaml.org,2002:set');
+  for (let i = 0; i < seq.items.length; ++i) {
+    let item = seq.items[i];
+    if (item instanceof resolveSeq$2.Pair) continue;else if (item instanceof resolveSeq$2.YAMLMap) {
+      if (item.items.length > 1) {
+        const msg = 'Each pair must have its own sequence indicator';
+        throw new PlainValue$3.YAMLSemanticError(cst, msg);
+      }
 
-  function parseSet(doc, cst) {
-    const map = (0, _parseMap.default)(doc, cst);
-    if (!map.hasAllNullValues()) throw new errors.YAMLSemanticError(cst, 'Set items must all have null values');
-    return Object.assign(new YAMLSet(), map);
+      const pair = item.items[0] || new resolveSeq$2.Pair();
+      if (item.commentBefore) pair.commentBefore = pair.commentBefore ? `${item.commentBefore}\n${pair.commentBefore}` : item.commentBefore;
+      if (item.comment) pair.comment = pair.comment ? `${item.comment}\n${pair.comment}` : item.comment;
+      item = pair;
+    }
+    seq.items[i] = item instanceof resolveSeq$2.Pair ? item : new resolveSeq$2.Pair(item);
   }
 
-  function createSet(schema, iterable, ctx) {
-    const set = new YAMLSet();
+  return seq;
+}
 
-    for (const value of iterable) set.items.push(schema.createPair(value, null, ctx));
+function createPairs(schema, iterable, ctx) {
+  const pairs = new resolveSeq$2.YAMLSeq(schema);
+  pairs.tag = 'tag:yaml.org,2002:pairs';
+
+  for (const it of iterable) {
+    let key, value;
+
+    if (Array.isArray(it)) {
+      if (it.length === 2) {
+        key = it[0];
+        value = it[1];
+      } else throw new TypeError(`Expected [key, value] tuple: ${it}`);
+    } else if (it && it instanceof Object) {
+      const keys = Object.keys(it);
+
+      if (keys.length === 1) {
+        key = keys[0];
+        value = it[key];
+      } else throw new TypeError(`Expected { key: value } tuple: ${it}`);
+    } else {
+      key = it;
+    }
 
-    return set;
+    const pair = schema.createPair(key, value, ctx);
+    pairs.items.push(pair);
   }
 
-  var _default = {
-    identify: value => value instanceof Set,
-    nodeClass: YAMLSet,
-    default: false,
-    tag: 'tag:yaml.org,2002:set',
-    resolve: parseSet,
-    createNode: createSet
-  };
-  exports.default = _default;
-});
-unwrapExports(set);
-var set_1 = set.YAMLSet;
+  return pairs;
+}
 
-var timestamp_1 = createCommonjsModule(function (module, exports) {
+const pairs = {
+  default: false,
+  tag: 'tag:yaml.org,2002:pairs',
+  resolve: parsePairs,
+  createNode: createPairs
+};
 
-  Object.defineProperty(exports, "__esModule", {
-    value: true
-  });
-  exports.timestamp = exports.floatTime = exports.intTime = void 0;
+class YAMLOMap extends resolveSeq$2.YAMLSeq {
+  constructor() {
+    super();
 
-  const parseSexagesimal = (sign, parts) => {
-    const n = parts.split(':').reduce((n, p) => n * 60 + Number(p), 0);
-    return sign === '-' ? -n : n;
-  }; // hhhh:mm:ss.sss
+    PlainValue$3._defineProperty(this, "add", resolveSeq$2.YAMLMap.prototype.add.bind(this));
 
+    PlainValue$3._defineProperty(this, "delete", resolveSeq$2.YAMLMap.prototype.delete.bind(this));
 
-  const stringifySexagesimal = ({
-    value
-  }) => {
-    if (isNaN(value) || !isFinite(value)) return (0, stringify.stringifyNumber)(value);
-    let sign = '';
+    PlainValue$3._defineProperty(this, "get", resolveSeq$2.YAMLMap.prototype.get.bind(this));
 
-    if (value < 0) {
-      sign = '-';
-      value = Math.abs(value);
-    }
+    PlainValue$3._defineProperty(this, "has", resolveSeq$2.YAMLMap.prototype.has.bind(this));
 
-    const parts = [value % 60]; // seconds, including ms
+    PlainValue$3._defineProperty(this, "set", resolveSeq$2.YAMLMap.prototype.set.bind(this));
 
-    if (value < 60) {
-      parts.unshift(0); // at least one : is required
-    } else {
-      value = Math.round((value - parts[0]) / 60);
-      parts.unshift(value % 60); // minutes
+    this.tag = YAMLOMap.tag;
+  }
 
-      if (value >= 60) {
-        value = Math.round((value - parts[0]) / 60);
-        parts.unshift(value); // hours
-      }
-    }
+  toJSON(_, ctx) {
+    const map = new Map();
+    if (ctx && ctx.onCreate) ctx.onCreate(map);
 
-    return sign + parts.map(n => n < 10 ? '0' + String(n) : String(n)).join(':').replace(/000000\d*$/, '') // % 60 may introduce error
-    ;
-  };
+    for (const pair of this.items) {
+      let key, value;
 
-  const intTime = {
-    identify: value => typeof value === 'number',
-    default: true,
-    tag: 'tag:yaml.org,2002:int',
-    format: 'TIME',
-    test: /^([-+]?)([0-9][0-9_]*(?::[0-5]?[0-9])+)$/,
-    resolve: (str, sign, parts) => parseSexagesimal(sign, parts.replace(/_/g, '')),
-    stringify: stringifySexagesimal
-  };
-  exports.intTime = intTime;
-  const floatTime = {
-    identify: value => typeof value === 'number',
-    default: true,
-    tag: 'tag:yaml.org,2002:float',
-    format: 'TIME',
-    test: /^([-+]?)([0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*)$/,
-    resolve: (str, sign, parts) => parseSexagesimal(sign, parts.replace(/_/g, '')),
-    stringify: stringifySexagesimal
-  };
-  exports.floatTime = floatTime;
-  const timestamp = {
-    identify: value => value instanceof Date,
-    default: true,
-    tag: 'tag:yaml.org,2002:timestamp',
-    // If the time zone is omitted, the timestamp is assumed to be specified in UTC. The time part
-    // may be omitted altogether, resulting in a date format. In such a case, the time part is
-    // assumed to be 00:00:00Z (start of day, UTC).
-    test: RegExp('^(?:' + '([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})' + // YYYY-Mm-Dd
-    '(?:(?:t|T|[ \\t]+)' + // t | T | whitespace
-    '([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)' + // Hh:Mm:Ss(.ss)?
-    '(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?' + // Z | +5 | -03:30
-    ')?' + ')$'),
-    resolve: (str, year, month, day, hour, minute, second, millisec, tz) => {
-      if (millisec) millisec = (millisec + '00').substr(1, 3);
-      let date = Date.UTC(year, month - 1, day, hour || 0, minute || 0, second || 0, millisec || 0);
-
-      if (tz && tz !== 'Z') {
-        let d = parseSexagesimal(tz[0], tz.slice(1));
-        if (Math.abs(d) < 30) d *= 60;
-        date -= 60000 * d;
+      if (pair instanceof resolveSeq$2.Pair) {
+        key = resolveSeq$2.toJSON(pair.key, '', ctx);
+        value = resolveSeq$2.toJSON(pair.value, key, ctx);
+      } else {
+        key = resolveSeq$2.toJSON(pair, '', ctx);
       }
 
-      return new Date(date);
-    },
-    stringify: ({
-      value
-    }) => value.toISOString().replace(/((T00:00)?:00)?\.000Z$/, '')
-  };
-  exports.timestamp = timestamp;
-});
-unwrapExports(timestamp_1);
-var timestamp_2 = timestamp_1.timestamp;
-var timestamp_3 = timestamp_1.floatTime;
-var timestamp_4 = timestamp_1.intTime;
+      if (map.has(key)) throw new Error('Ordered maps must not include duplicate keys');
+      map.set(key, value);
+    }
 
-var yaml1_1 = createCommonjsModule(function (module, exports) {
+    return map;
+  }
 
-  Object.defineProperty(exports, "__esModule", {
-    value: true
-  });
-  exports.default = void 0;
+}
 
-  var _Scalar = _interopRequireDefault(Scalar_1);
+PlainValue$3._defineProperty(YAMLOMap, "tag", 'tag:yaml.org,2002:omap');
 
-  var _failsafe = _interopRequireDefault(failsafe);
+function parseOMap(doc, cst) {
+  const pairs = parsePairs(doc, cst);
+  const seenKeys = [];
 
-  var _binary = _interopRequireDefault(binary);
+  for (const {
+    key
+  } of pairs.items) {
+    if (key instanceof resolveSeq$2.Scalar) {
+      if (seenKeys.includes(key.value)) {
+        const msg = 'Ordered maps must not include duplicate keys';
+        throw new PlainValue$3.YAMLSemanticError(cst, msg);
+      } else {
+        seenKeys.push(key.value);
+      }
+    }
+  }
 
-  var _omap = _interopRequireDefault(omap);
+  return Object.assign(new YAMLOMap(), pairs);
+}
 
-  var _pairs = _interopRequireDefault(pairs);
+function createOMap(schema, iterable, ctx) {
+  const pairs = createPairs(schema, iterable, ctx);
+  const omap = new YAMLOMap();
+  omap.items = pairs.items;
+  return omap;
+}
 
-  var _set = _interopRequireDefault(set);
+const omap = {
+  identify: value => value instanceof Map,
+  nodeClass: YAMLOMap,
+  default: false,
+  tag: 'tag:yaml.org,2002:omap',
+  resolve: parseOMap,
+  createNode: createOMap
+};
 
-  function _interopRequireDefault(obj) {
-    return obj && obj.__esModule ? obj : {
-      default: obj
-    };
+class YAMLSet extends resolveSeq$2.YAMLMap {
+  constructor() {
+    super();
+    this.tag = YAMLSet.tag;
   }
 
-  const boolStringify = ({
-    value
-  }) => value ? options.boolOptions.trueStr : options.boolOptions.falseStr;
-
-  var _default = _failsafe.default.concat([{
-    identify: value => value == null,
-    createNode: (schema, value, ctx) => ctx.wrapScalars ? new _Scalar.default(null) : null,
-    default: true,
-    tag: 'tag:yaml.org,2002:null',
-    test: /^(?:~|[Nn]ull|NULL)?$/,
-    resolve: () => null,
-    options: options.nullOptions,
-    stringify: () => options.nullOptions.nullStr
-  }, {
-    identify: value => typeof value === 'boolean',
-    default: true,
-    tag: 'tag:yaml.org,2002:bool',
-    test: /^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,
-    resolve: () => true,
-    options: options.boolOptions,
-    stringify: boolStringify
-  }, {
-    identify: value => typeof value === 'boolean',
-    default: true,
-    tag: 'tag:yaml.org,2002:bool',
-    test: /^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/i,
-    resolve: () => false,
-    options: options.boolOptions,
-    stringify: boolStringify
-  }, {
-    identify: value => typeof value === 'number',
-    default: true,
-    tag: 'tag:yaml.org,2002:int',
-    format: 'BIN',
-    test: /^0b([0-1_]+)$/,
-    resolve: (str, bin) => parseInt(bin.replace(/_/g, ''), 2),
-    stringify: ({
-      value
-    }) => '0b' + value.toString(2)
-  }, {
-    identify: value => typeof value === 'number',
-    default: true,
-    tag: 'tag:yaml.org,2002:int',
-    format: 'OCT',
-    test: /^[-+]?0([0-7_]+)$/,
-    resolve: (str, oct) => parseInt(oct.replace(/_/g, ''), 8),
-    stringify: ({
-      value
-    }) => (value < 0 ? '-0' : '0') + value.toString(8)
-  }, {
-    identify: value => typeof value === 'number',
-    default: true,
-    tag: 'tag:yaml.org,2002:int',
-    test: /^[-+]?[0-9][0-9_]*$/,
-    resolve: str => parseInt(str.replace(/_/g, ''), 10),
-    stringify: stringify.stringifyNumber
-  }, {
-    identify: value => typeof value === 'number',
-    default: true,
-    tag: 'tag:yaml.org,2002:int',
-    format: 'HEX',
-    test: /^0x([0-9a-fA-F_]+)$/,
-    resolve: (str, hex) => parseInt(hex.replace(/_/g, ''), 16),
-    stringify: ({
-      value
-    }) => (value < 0 ? '-0x' : '0x') + value.toString(16)
-  }, {
-    identify: value => typeof value === 'number',
-    default: true,
-    tag: 'tag:yaml.org,2002:float',
-    test: /^(?:[-+]?\.inf|(\.nan))$/i,
-    resolve: (str, nan) => nan ? NaN : str[0] === '-' ? Number.NEGATIVE_INFINITY : Number.POSITIVE_INFINITY,
-    stringify: stringify.stringifyNumber
-  }, {
-    identify: value => typeof value === 'number',
-    default: true,
-    tag: 'tag:yaml.org,2002:float',
-    format: 'EXP',
-    test: /^[-+]?([0-9][0-9_]*)?(\.[0-9_]*)?[eE][-+]?[0-9]+$/,
-    resolve: str => parseFloat(str.replace(/_/g, '')),
-    stringify: ({
-      value
-    }) => Number(value).toExponential()
-  }, {
-    identify: value => typeof value === 'number',
-    default: true,
-    tag: 'tag:yaml.org,2002:float',
-    test: /^[-+]?(?:[0-9][0-9_]*)?\.([0-9_]*)$/,
-
-    resolve(str, frac) {
-      const node = new _Scalar.default(parseFloat(str.replace(/_/g, '')));
-
-      if (frac) {
-        const f = frac.replace(/_/g, '');
-        if (f[f.length - 1] === '0') node.minFractionDigits = f.length;
-      }
+  add(key) {
+    const pair = key instanceof resolveSeq$2.Pair ? key : new resolveSeq$2.Pair(key);
+    const prev = resolveSeq$2.findPair(this.items, pair.key);
+    if (!prev) this.items.push(pair);
+  }
 
-      return node;
-    },
+  get(key, keepPair) {
+    const pair = resolveSeq$2.findPair(this.items, key);
+    return !keepPair && pair instanceof resolveSeq$2.Pair ? pair.key instanceof resolveSeq$2.Scalar ? pair.key.value : pair.key : pair;
+  }
 
-    stringify: stringify.stringifyNumber
-  }], _binary.default, _omap.default, _pairs.default, _set.default, timestamp_1.intTime, timestamp_1.floatTime, timestamp_1.timestamp);
+  set(key, value) {
+    if (typeof value !== 'boolean') throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof value}`);
+    const prev = resolveSeq$2.findPair(this.items, key);
 
-  exports.default = _default;
-});
-unwrapExports(yaml1_1);
+    if (prev && !value) {
+      this.items.splice(this.items.indexOf(prev), 1);
+    } else if (!prev && value) {
+      this.items.push(new resolveSeq$2.Pair(key));
+    }
+  }
 
-var tags_1 = createCommonjsModule(function (module, exports) {
+  toJSON(_, ctx) {
+    return super.toJSON(_, ctx, Set);
+  }
 
-  Object.defineProperty(exports, "__esModule", {
-    value: true
-  });
-  exports.tags = exports.schemas = void 0;
+  toString(ctx, onComment, onChompKeep) {
+    if (!ctx) return JSON.stringify(this);
+    if (this.hasAllNullValues()) return super.toString(ctx, onComment, onChompKeep);else throw new Error('Set items must all have null values');
+  }
 
-  var _core = _interopRequireWildcard(core);
+}
 
-  var _failsafe = _interopRequireDefault(failsafe);
+PlainValue$3._defineProperty(YAMLSet, "tag", 'tag:yaml.org,2002:set');
 
-  var _json = _interopRequireDefault(json);
+function parseSet(doc, cst) {
+  const map = resolveSeq$2.resolveMap(doc, cst);
+  if (!map.hasAllNullValues()) throw new PlainValue$3.YAMLSemanticError(cst, 'Set items must all have null values');
+  return Object.assign(new YAMLSet(), map);
+}
 
-  var _yaml = _interopRequireDefault(yaml1_1);
+function createSet(schema, iterable, ctx) {
+  const set = new YAMLSet();
 
-  var _map = _interopRequireDefault(map);
+  for (const value of iterable) set.items.push(schema.createPair(value, null, ctx));
 
-  var _seq = _interopRequireDefault(seq);
+  return set;
+}
 
-  var _binary = _interopRequireDefault(binary);
+const set = {
+  identify: value => value instanceof Set,
+  nodeClass: YAMLSet,
+  default: false,
+  tag: 'tag:yaml.org,2002:set',
+  resolve: parseSet,
+  createNode: createSet
+};
 
-  var _omap = _interopRequireDefault(omap);
+const parseSexagesimal = (sign, parts) => {
+  const n = parts.split(':').reduce((n, p) => n * 60 + Number(p), 0);
+  return sign === '-' ? -n : n;
+}; // hhhh:mm:ss.sss
 
-  var _pairs = _interopRequireDefault(pairs);
 
-  var _set = _interopRequireDefault(set);
+const stringifySexagesimal = ({
+  value
+}) => {
+  if (isNaN(value) || !isFinite(value)) return resolveSeq$2.stringifyNumber(value);
+  let sign = '';
 
-  function _interopRequireDefault(obj) {
-    return obj && obj.__esModule ? obj : {
-      default: obj
-    };
+  if (value < 0) {
+    sign = '-';
+    value = Math.abs(value);
   }
 
-  function _getRequireWildcardCache() {
-    if (typeof WeakMap !== "function") return null;
-    var cache = new WeakMap();
+  const parts = [value % 60]; // seconds, including ms
 
-    _getRequireWildcardCache = function () {
-      return cache;
-    };
+  if (value < 60) {
+    parts.unshift(0); // at least one : is required
+  } else {
+    value = Math.round((value - parts[0]) / 60);
+    parts.unshift(value % 60); // minutes
 
-    return cache;
+    if (value >= 60) {
+      value = Math.round((value - parts[0]) / 60);
+      parts.unshift(value); // hours
+    }
   }
 
-  function _interopRequireWildcard(obj) {
-    if (obj && obj.__esModule) {
-      return obj;
-    }
+  return sign + parts.map(n => n < 10 ? '0' + String(n) : String(n)).join(':').replace(/000000\d*$/, '') // % 60 may introduce error
+  ;
+};
 
-    if (obj === null || typeof obj !== "object" && typeof obj !== "function") {
-      return {
-        default: obj
-      };
-    }
+const intTime = {
+  identify: value => typeof value === 'number',
+  default: true,
+  tag: 'tag:yaml.org,2002:int',
+  format: 'TIME',
+  test: /^([-+]?)([0-9][0-9_]*(?::[0-5]?[0-9])+)$/,
+  resolve: (str, sign, parts) => parseSexagesimal(sign, parts.replace(/_/g, '')),
+  stringify: stringifySexagesimal
+};
+const floatTime = {
+  identify: value => typeof value === 'number',
+  default: true,
+  tag: 'tag:yaml.org,2002:float',
+  format: 'TIME',
+  test: /^([-+]?)([0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*)$/,
+  resolve: (str, sign, parts) => parseSexagesimal(sign, parts.replace(/_/g, '')),
+  stringify: stringifySexagesimal
+};
+const timestamp = {
+  identify: value => value instanceof Date,
+  default: true,
+  tag: 'tag:yaml.org,2002:timestamp',
+  // If the time zone is omitted, the timestamp is assumed to be specified in UTC. The time part
+  // may be omitted altogether, resulting in a date format. In such a case, the time part is
+  // assumed to be 00:00:00Z (start of day, UTC).
+  test: RegExp('^(?:' + '([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})' + // YYYY-Mm-Dd
+  '(?:(?:t|T|[ \\t]+)' + // t | T | whitespace
+  '([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)' + // Hh:Mm:Ss(.ss)?
+  '(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?' + // Z | +5 | -03:30
+  ')?' + ')$'),
+  resolve: (str, year, month, day, hour, minute, second, millisec, tz) => {
+    if (millisec) millisec = (millisec + '00').substr(1, 3);
+    let date = Date.UTC(year, month - 1, day, hour || 0, minute || 0, second || 0, millisec || 0);
+
+    if (tz && tz !== 'Z') {
+      let d = parseSexagesimal(tz[0], tz.slice(1));
+      if (Math.abs(d) < 30) d *= 60;
+      date -= 60000 * d;
+    }
+
+    return new Date(date);
+  },
+  stringify: ({
+    value
+  }) => value.toISOString().replace(/((T00:00)?:00)?\.000Z$/, '')
+};
+/* global console, process, YAML_SILENCE_DEPRECATION_WARNINGS, YAML_SILENCE_WARNINGS */
 
-    var cache = _getRequireWildcardCache();
+function shouldWarn(deprecation) {
+  const env = typeof process !== 'undefined' && process.env || {};
 
-    if (cache && cache.has(obj)) {
-      return cache.get(obj);
-    }
+  if (deprecation) {
+    if (typeof YAML_SILENCE_DEPRECATION_WARNINGS !== 'undefined') return !YAML_SILENCE_DEPRECATION_WARNINGS;
+    return !env.YAML_SILENCE_DEPRECATION_WARNINGS;
+  }
 
-    var newObj = {};
-    var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
+  if (typeof YAML_SILENCE_WARNINGS !== 'undefined') return !YAML_SILENCE_WARNINGS;
+  return !env.YAML_SILENCE_WARNINGS;
+}
 
-    for (var key in obj) {
-      if (Object.prototype.hasOwnProperty.call(obj, key)) {
-        var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
+function warn(warning, type) {
+  if (shouldWarn(false)) {
+    const emit = typeof process !== 'undefined' && process.emitWarning; // This will throw in Jest if `warning` is an Error instance due to
+    // https://github.com/facebook/jest/issues/2549
 
-        if (desc && (desc.get || desc.set)) {
-          Object.defineProperty(newObj, key, desc);
-        } else {
-          newObj[key] = obj[key];
-        }
-      }
+    if (emit) emit(warning, type);else {
+      // eslint-disable-next-line no-console
+      console.warn(type ? `${type}: ${warning}` : warning);
     }
+  }
+}
 
-    newObj.default = obj;
+function warnFileDeprecation(filename) {
+  if (shouldWarn(true)) {
+    const path = filename.replace(/.*yaml[/\\]/i, '').replace(/\.js$/, '').replace(/\\/g, '/');
+    warn(`The endpoint 'yaml/${path}' will be removed in a future release.`, 'DeprecationWarning');
+  }
+}
 
-    if (cache) {
-      cache.set(obj, newObj);
-    }
+const warned = {};
 
-    return newObj;
+function warnOptionDeprecation(name, alternative) {
+  if (!warned[name] && shouldWarn(true)) {
+    warned[name] = true;
+    let msg = `The option '${name}' will be removed in a future release`;
+    msg += alternative ? `, use '${alternative}' instead.` : '.';
+    warn(msg, 'DeprecationWarning');
   }
+}
 
-  const schemas = {
-    core: _core.default,
-    failsafe: _failsafe.default,
-    json: _json.default,
-    yaml11: _yaml.default
-  };
-  exports.schemas = schemas;
-  const tags = {
-    binary: _binary.default,
-    bool: _core.boolObj,
-    float: _core.floatObj,
-    floatExp: _core.expObj,
-    floatNaN: _core.nanObj,
-    floatTime: timestamp_1.floatTime,
-    int: _core.intObj,
-    intHex: _core.hexObj,
-    intOct: _core.octObj,
-    intTime: timestamp_1.intTime,
-    map: _map.default,
-    null: _core.nullObj,
-    omap: _omap.default,
-    pairs: _pairs.default,
-    seq: _seq.default,
-    set: _set.default,
-    timestamp: timestamp_1.timestamp
-  };
-  exports.tags = tags;
-});
-unwrapExports(tags_1);
-var tags_2 = tags_1.tags;
-var tags_3 = tags_1.schemas;
-
-var schema = createCommonjsModule(function (module, exports) {
+warnings1000a372.binary = binary;
+warnings1000a372.floatTime = floatTime;
+warnings1000a372.intTime = intTime;
+warnings1000a372.omap = omap;
+warnings1000a372.pairs = pairs;
+warnings1000a372.set = set;
+warnings1000a372.timestamp = timestamp;
+warnings1000a372.warn = warn;
+warnings1000a372.warnFileDeprecation = warnFileDeprecation;
+warnings1000a372.warnOptionDeprecation = warnOptionDeprecation;
 
-  Object.defineProperty(exports, "__esModule", {
-    value: true
-  });
-  exports.default = void 0;
+var PlainValue$2 = PlainValueEc8e588e;
+var resolveSeq$1 = resolveSeqD03cb037;
+var warnings$1 = warnings1000a372;
 
-  var _Alias = _interopRequireDefault(Alias_1$1);
+function createMap(schema, obj, ctx) {
+  const map = new resolveSeq$1.YAMLMap(schema);
 
-  var _Collection = _interopRequireDefault(Collection_1$1);
+  if (obj instanceof Map) {
+    for (const [key, value] of obj) map.items.push(schema.createPair(key, value, ctx));
+  } else if (obj && typeof obj === 'object') {
+    for (const key of Object.keys(obj)) map.items.push(schema.createPair(key, obj[key], ctx));
+  }
 
-  var _Node = _interopRequireDefault(Node_1$1);
+  if (typeof schema.sortMapEntries === 'function') {
+    map.items.sort(schema.sortMapEntries);
+  }
 
-  var _Pair = _interopRequireDefault(Pair_1);
+  return map;
+}
 
-  var _Scalar = _interopRequireDefault(Scalar_1);
+const map = {
+  createNode: createMap,
+  default: true,
+  nodeClass: resolveSeq$1.YAMLMap,
+  tag: 'tag:yaml.org,2002:map',
+  resolve: resolveSeq$1.resolveMap
+};
 
-  function _interopRequireDefault(obj) {
-    return obj && obj.__esModule ? obj : {
-      default: obj
-    };
-  }
+function createSeq(schema, obj, ctx) {
+  const seq = new resolveSeq$1.YAMLSeq(schema);
 
-  function _defineProperty(obj, key, value) {
-    if (key in obj) {
-      Object.defineProperty(obj, key, {
-        value: value,
-        enumerable: true,
-        configurable: true,
-        writable: true
-      });
-    } else {
-      obj[key] = value;
+  if (obj && obj[Symbol.iterator]) {
+    for (const it of obj) {
+      const v = schema.createNode(it, ctx.wrapScalars, null, ctx);
+      seq.items.push(v);
     }
-
-    return obj;
   }
 
-  const isMap = ({
-    type
-  }) => type === constants.Type.FLOW_MAP || type === constants.Type.MAP;
-
-  const isSeq = ({
-    type
-  }) => type === constants.Type.FLOW_SEQ || type === constants.Type.SEQ;
-
-  class Schema {
-    constructor({
-      customTags,
-      merge,
-      schema,
-      sortMapEntries,
-      tags: deprecatedCustomTags
-    }) {
-      this.merge = !!merge;
-      this.name = schema;
-      this.sortMapEntries = sortMapEntries === true ? (a, b) => a.key < b.key ? -1 : a.key > b.key ? 1 : 0 : sortMapEntries || null;
-      this.tags = tags_1.schemas[schema.replace(/\W/g, '')]; // 'yaml-1.1' -> 'yaml11'
-
-      if (!this.tags) {
-        const keys = Object.keys(tags_1.schemas).map(key => JSON.stringify(key)).join(', ');
-        throw new Error(`Unknown schema "${schema}"; use one of ${keys}`);
-      }
-
-      if (!customTags && deprecatedCustomTags) {
-        customTags = deprecatedCustomTags;
-        (0, warnings.warnOptionDeprecation)('tags', 'customTags');
-      }
+  return seq;
+}
 
-      if (Array.isArray(customTags)) {
-        for (const tag of customTags) this.tags = this.tags.concat(tag);
-      } else if (typeof customTags === 'function') {
-        this.tags = customTags(this.tags.slice());
-      }
+const seq = {
+  createNode: createSeq,
+  default: true,
+  nodeClass: resolveSeq$1.YAMLSeq,
+  tag: 'tag:yaml.org,2002:seq',
+  resolve: resolveSeq$1.resolveSeq
+};
+const string = {
+  identify: value => typeof value === 'string',
+  default: true,
+  tag: 'tag:yaml.org,2002:str',
+  resolve: resolveSeq$1.resolveString,
+
+  stringify(item, ctx, onComment, onChompKeep) {
+    ctx = Object.assign({
+      actualString: true
+    }, ctx);
+    return resolveSeq$1.stringifyString(item, ctx, onComment, onChompKeep);
+  },
+
+  options: resolveSeq$1.strOptions
+};
+const failsafe = [map, seq, string];
+/* global BigInt */
 
-      for (let i = 0; i < this.tags.length; ++i) {
-        const tag = this.tags[i];
+const intIdentify$2 = value => typeof value === 'bigint' || Number.isInteger(value);
 
-        if (typeof tag === 'string') {
-          const tagObj = tags_1.tags[tag];
+const intResolve$1 = (src, part, radix) => resolveSeq$1.intOptions.asBigInt ? BigInt(src) : parseInt(part, radix);
 
-          if (!tagObj) {
-            const keys = Object.keys(tags_1.tags).map(key => JSON.stringify(key)).join(', ');
-            throw new Error(`Unknown custom tag "${tag}"; use one of ${keys}`);
-          }
+function intStringify$1(node, radix, prefix) {
+  const {
+    value
+  } = node;
+  if (intIdentify$2(value) && value >= 0) return prefix + value.toString(radix);
+  return resolveSeq$1.stringifyNumber(node);
+}
 
-          this.tags[i] = tagObj;
-        }
-      }
-    }
+const nullObj = {
+  identify: value => value == null,
+  createNode: (schema, value, ctx) => ctx.wrapScalars ? new resolveSeq$1.Scalar(null) : null,
+  default: true,
+  tag: 'tag:yaml.org,2002:null',
+  test: /^(?:~|[Nn]ull|NULL)?$/,
+  resolve: () => null,
+  options: resolveSeq$1.nullOptions,
+  stringify: () => resolveSeq$1.nullOptions.nullStr
+};
+const boolObj = {
+  identify: value => typeof value === 'boolean',
+  default: true,
+  tag: 'tag:yaml.org,2002:bool',
+  test: /^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,
+  resolve: str => str[0] === 't' || str[0] === 'T',
+  options: resolveSeq$1.boolOptions,
+  stringify: ({
+    value
+  }) => value ? resolveSeq$1.boolOptions.trueStr : resolveSeq$1.boolOptions.falseStr
+};
+const octObj = {
+  identify: value => intIdentify$2(value) && value >= 0,
+  default: true,
+  tag: 'tag:yaml.org,2002:int',
+  format: 'OCT',
+  test: /^0o([0-7]+)$/,
+  resolve: (str, oct) => intResolve$1(str, oct, 8),
+  options: resolveSeq$1.intOptions,
+  stringify: node => intStringify$1(node, 8, '0o')
+};
+const intObj = {
+  identify: intIdentify$2,
+  default: true,
+  tag: 'tag:yaml.org,2002:int',
+  test: /^[-+]?[0-9]+$/,
+  resolve: str => intResolve$1(str, str, 10),
+  options: resolveSeq$1.intOptions,
+  stringify: resolveSeq$1.stringifyNumber
+};
+const hexObj = {
+  identify: value => intIdentify$2(value) && value >= 0,
+  default: true,
+  tag: 'tag:yaml.org,2002:int',
+  format: 'HEX',
+  test: /^0x([0-9a-fA-F]+)$/,
+  resolve: (str, hex) => intResolve$1(str, hex, 16),
+  options: resolveSeq$1.intOptions,
+  stringify: node => intStringify$1(node, 16, '0x')
+};
+const nanObj = {
+  identify: value => typeof value === 'number',
+  default: true,
+  tag: 'tag:yaml.org,2002:float',
+  test: /^(?:[-+]?\.inf|(\.nan))$/i,
+  resolve: (str, nan) => nan ? NaN : str[0] === '-' ? Number.NEGATIVE_INFINITY : Number.POSITIVE_INFINITY,
+  stringify: resolveSeq$1.stringifyNumber
+};
+const expObj = {
+  identify: value => typeof value === 'number',
+  default: true,
+  tag: 'tag:yaml.org,2002:float',
+  format: 'EXP',
+  test: /^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,
+  resolve: str => parseFloat(str),
+  stringify: ({
+    value
+  }) => Number(value).toExponential()
+};
+const floatObj = {
+  identify: value => typeof value === 'number',
+  default: true,
+  tag: 'tag:yaml.org,2002:float',
+  test: /^[-+]?(?:\.([0-9]+)|[0-9]+\.([0-9]*))$/,
+
+  resolve(str, frac1, frac2) {
+    const frac = frac1 || frac2;
+    const node = new resolveSeq$1.Scalar(parseFloat(str));
+    if (frac && frac[frac.length - 1] === '0') node.minFractionDigits = frac.length;
+    return node;
+  },
+
+  stringify: resolveSeq$1.stringifyNumber
+};
+const core = failsafe.concat([nullObj, boolObj, octObj, intObj, hexObj, nanObj, expObj, floatObj]);
+/* global BigInt */
+
+const intIdentify$1 = value => typeof value === 'bigint' || Number.isInteger(value);
+
+const stringifyJSON = ({
+  value
+}) => JSON.stringify(value);
+
+const json = [map, seq, {
+  identify: value => typeof value === 'string',
+  default: true,
+  tag: 'tag:yaml.org,2002:str',
+  resolve: resolveSeq$1.resolveString,
+  stringify: stringifyJSON
+}, {
+  identify: value => value == null,
+  createNode: (schema, value, ctx) => ctx.wrapScalars ? new resolveSeq$1.Scalar(null) : null,
+  default: true,
+  tag: 'tag:yaml.org,2002:null',
+  test: /^null$/,
+  resolve: () => null,
+  stringify: stringifyJSON
+}, {
+  identify: value => typeof value === 'boolean',
+  default: true,
+  tag: 'tag:yaml.org,2002:bool',
+  test: /^true|false$/,
+  resolve: str => str === 'true',
+  stringify: stringifyJSON
+}, {
+  identify: intIdentify$1,
+  default: true,
+  tag: 'tag:yaml.org,2002:int',
+  test: /^-?(?:0|[1-9][0-9]*)$/,
+  resolve: str => resolveSeq$1.intOptions.asBigInt ? BigInt(str) : parseInt(str, 10),
+  stringify: ({
+    value
+  }) => intIdentify$1(value) ? value.toString() : JSON.stringify(value)
+}, {
+  identify: value => typeof value === 'number',
+  default: true,
+  tag: 'tag:yaml.org,2002:float',
+  test: /^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,
+  resolve: str => parseFloat(str),
+  stringify: stringifyJSON
+}];
+
+json.scalarFallback = str => {
+  throw new SyntaxError(`Unresolved plain scalar ${JSON.stringify(str)}`);
+};
+/* global BigInt */
 
-    createNode(value, wrapScalars, tag, ctx) {
-      if (value instanceof _Node.default) return value;
-      let tagObj;
 
-      if (tag) {
-        if (tag.startsWith('!!')) tag = Schema.defaultPrefix + tag.slice(2);
-        const match = this.tags.filter(t => t.tag === tag);
-        tagObj = match.find(t => !t.format) || match[0];
-        if (!tagObj) throw new Error(`Tag ${tag} not found`);
-      } else {
-        // TODO: deprecate/remove class check
-        tagObj = this.tags.find(t => (t.identify && t.identify(value) || t.class && value instanceof t.class) && !t.format);
+const boolStringify = ({
+  value
+}) => value ? resolveSeq$1.boolOptions.trueStr : resolveSeq$1.boolOptions.falseStr;
 
-        if (!tagObj) {
-          if (typeof value.toJSON === 'function') value = value.toJSON();
-          if (typeof value !== 'object') return wrapScalars ? new _Scalar.default(value) : value;
-          tagObj = value instanceof Map ? tags_1.tags.map : value[Symbol.iterator] ? tags_1.tags.seq : tags_1.tags.map;
-        }
-      }
+const intIdentify = value => typeof value === 'bigint' || Number.isInteger(value);
 
-      if (!ctx) ctx = {
-        wrapScalars
-      };else ctx.wrapScalars = wrapScalars;
+function intResolve(sign, src, radix) {
+  let str = src.replace(/_/g, '');
 
-      if (ctx.onTagObj) {
-        ctx.onTagObj(tagObj);
-        delete ctx.onTagObj;
-      }
+  if (resolveSeq$1.intOptions.asBigInt) {
+    switch (radix) {
+      case 2:
+        str = `0b${str}`;
+        break;
 
-      const obj = {};
+      case 8:
+        str = `0o${str}`;
+        break;
 
-      if (value && typeof value === 'object' && ctx.prevObjects) {
-        const prev = ctx.prevObjects.get(value);
+      case 16:
+        str = `0x${str}`;
+        break;
+    }
 
-        if (prev) {
-          const alias = new _Alias.default(prev); // leaves source dirty; must be cleaned by caller
+    const n = BigInt(str);
+    return sign === '-' ? BigInt(-1) * n : n;
+  }
 
-          ctx.aliasNodes.push(alias);
-          return alias;
-        }
+  const n = parseInt(str, radix);
+  return sign === '-' ? -1 * n : n;
+}
 
-        obj.value = value;
-        ctx.prevObjects.set(value, obj);
-      }
+function intStringify(node, radix, prefix) {
+  const {
+    value
+  } = node;
 
-      obj.node = tagObj.createNode ? tagObj.createNode(this, value, ctx) : wrapScalars ? new _Scalar.default(value) : value;
-      if (tag && obj.node instanceof _Node.default) obj.node.tag = tag;
-      return obj.node;
-    }
+  if (intIdentify(value)) {
+    const str = value.toString(radix);
+    return value < 0 ? '-' + prefix + str.substr(1) : prefix + str;
+  }
 
-    createPair(key, value, ctx) {
-      const k = this.createNode(key, ctx.wrapScalars, null, ctx);
-      const v = this.createNode(value, ctx.wrapScalars, null, ctx);
-      return new _Pair.default(k, v);
-    } // falls back to string on no match
+  return resolveSeq$1.stringifyNumber(node);
+}
 
+const yaml11 = failsafe.concat([{
+  identify: value => value == null,
+  createNode: (schema, value, ctx) => ctx.wrapScalars ? new resolveSeq$1.Scalar(null) : null,
+  default: true,
+  tag: 'tag:yaml.org,2002:null',
+  test: /^(?:~|[Nn]ull|NULL)?$/,
+  resolve: () => null,
+  options: resolveSeq$1.nullOptions,
+  stringify: () => resolveSeq$1.nullOptions.nullStr
+}, {
+  identify: value => typeof value === 'boolean',
+  default: true,
+  tag: 'tag:yaml.org,2002:bool',
+  test: /^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,
+  resolve: () => true,
+  options: resolveSeq$1.boolOptions,
+  stringify: boolStringify
+}, {
+  identify: value => typeof value === 'boolean',
+  default: true,
+  tag: 'tag:yaml.org,2002:bool',
+  test: /^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/i,
+  resolve: () => false,
+  options: resolveSeq$1.boolOptions,
+  stringify: boolStringify
+}, {
+  identify: intIdentify,
+  default: true,
+  tag: 'tag:yaml.org,2002:int',
+  format: 'BIN',
+  test: /^([-+]?)0b([0-1_]+)$/,
+  resolve: (str, sign, bin) => intResolve(sign, bin, 2),
+  stringify: node => intStringify(node, 2, '0b')
+}, {
+  identify: intIdentify,
+  default: true,
+  tag: 'tag:yaml.org,2002:int',
+  format: 'OCT',
+  test: /^([-+]?)0([0-7_]+)$/,
+  resolve: (str, sign, oct) => intResolve(sign, oct, 8),
+  stringify: node => intStringify(node, 8, '0')
+}, {
+  identify: intIdentify,
+  default: true,
+  tag: 'tag:yaml.org,2002:int',
+  test: /^([-+]?)([0-9][0-9_]*)$/,
+  resolve: (str, sign, abs) => intResolve(sign, abs, 10),
+  stringify: resolveSeq$1.stringifyNumber
+}, {
+  identify: intIdentify,
+  default: true,
+  tag: 'tag:yaml.org,2002:int',
+  format: 'HEX',
+  test: /^([-+]?)0x([0-9a-fA-F_]+)$/,
+  resolve: (str, sign, hex) => intResolve(sign, hex, 16),
+  stringify: node => intStringify(node, 16, '0x')
+}, {
+  identify: value => typeof value === 'number',
+  default: true,
+  tag: 'tag:yaml.org,2002:float',
+  test: /^(?:[-+]?\.inf|(\.nan))$/i,
+  resolve: (str, nan) => nan ? NaN : str[0] === '-' ? Number.NEGATIVE_INFINITY : Number.POSITIVE_INFINITY,
+  stringify: resolveSeq$1.stringifyNumber
+}, {
+  identify: value => typeof value === 'number',
+  default: true,
+  tag: 'tag:yaml.org,2002:float',
+  format: 'EXP',
+  test: /^[-+]?([0-9][0-9_]*)?(\.[0-9_]*)?[eE][-+]?[0-9]+$/,
+  resolve: str => parseFloat(str.replace(/_/g, '')),
+  stringify: ({
+    value
+  }) => Number(value).toExponential()
+}, {
+  identify: value => typeof value === 'number',
+  default: true,
+  tag: 'tag:yaml.org,2002:float',
+  test: /^[-+]?(?:[0-9][0-9_]*)?\.([0-9_]*)$/,
+
+  resolve(str, frac) {
+    const node = new resolveSeq$1.Scalar(parseFloat(str.replace(/_/g, '')));
+
+    if (frac) {
+      const f = frac.replace(/_/g, '');
+      if (f[f.length - 1] === '0') node.minFractionDigits = f.length;
+    }
+
+    return node;
+  },
+
+  stringify: resolveSeq$1.stringifyNumber
+}], warnings$1.binary, warnings$1.omap, warnings$1.pairs, warnings$1.set, warnings$1.intTime, warnings$1.floatTime, warnings$1.timestamp);
+const schemas = {
+  core,
+  failsafe,
+  json,
+  yaml11
+};
+const tags = {
+  binary: warnings$1.binary,
+  bool: boolObj,
+  float: floatObj,
+  floatExp: expObj,
+  floatNaN: nanObj,
+  floatTime: warnings$1.floatTime,
+  int: intObj,
+  intHex: hexObj,
+  intOct: octObj,
+  intTime: warnings$1.intTime,
+  map,
+  null: nullObj,
+  omap: warnings$1.omap,
+  pairs: warnings$1.pairs,
+  seq,
+  set: warnings$1.set,
+  timestamp: warnings$1.timestamp
+};
 
-    resolveScalar(str, tags) {
-      if (!tags) tags = this.tags;
+function findTagObject(value, tagName, tags) {
+  if (tagName) {
+    const match = tags.filter(t => t.tag === tagName);
+    const tagObj = match.find(t => !t.format) || match[0];
+    if (!tagObj) throw new Error(`Tag ${tagName} not found`);
+    return tagObj;
+  } // TODO: deprecate/remove class check
 
-      for (let i = 0; i < tags.length; ++i) {
-        const {
-          format,
-          test,
-          resolve
-        } = tags[i];
-
-        if (test) {
-          const match = str.match(test);
-
-          if (match) {
-            let res = resolve.apply(null, match);
-            if (!(res instanceof _Scalar.default)) res = new _Scalar.default(res);
-            if (format) res.format = format;
-            return res;
-          }
-        }
-      }
 
-      if (this.tags.scalarFallback) str = this.tags.scalarFallback(str);
-      return new _Scalar.default(str);
-    } // sets node.resolved on success
+  return tags.find(t => (t.identify && t.identify(value) || t.class && value instanceof t.class) && !t.format);
+}
 
+function createNode$1(value, tagName, ctx) {
+  if (value instanceof resolveSeq$1.Node) return value;
+  const {
+    defaultPrefix,
+    onTagObj,
+    prevObjects,
+    schema,
+    wrapScalars
+  } = ctx;
+  if (tagName && tagName.startsWith('!!')) tagName = defaultPrefix + tagName.slice(2);
+  let tagObj = findTagObject(value, tagName, schema.tags);
+
+  if (!tagObj) {
+    if (typeof value.toJSON === 'function') value = value.toJSON();
+    if (!value || typeof value !== 'object') return wrapScalars ? new resolveSeq$1.Scalar(value) : value;
+    tagObj = value instanceof Map ? map : value[Symbol.iterator] ? seq : map;
+  }
+
+  if (onTagObj) {
+    onTagObj(tagObj);
+    delete ctx.onTagObj;
+  } // Detect duplicate references to the same object & use Alias nodes for all
+  // after first. The `obj` wrapper allows for circular references to resolve.
+
+
+  const obj = {
+    value: undefined,
+    node: undefined
+  };
 
-    resolveNode(doc, node, tagName) {
-      const tags = this.tags.filter(({
-        tag
-      }) => tag === tagName);
-      const generic = tags.find(({
-        test
-      }) => !test);
-      if (node.error) doc.errors.push(node.error);
+  if (value && typeof value === 'object' && prevObjects) {
+    const prev = prevObjects.get(value);
 
-      try {
-        if (generic) {
-          let res = generic.resolve(doc, node);
-          if (!(res instanceof _Collection.default)) res = new _Scalar.default(res);
-          node.resolved = res;
-        } else {
-          const str = (0, string.resolveString)(doc, node);
+    if (prev) {
+      const alias = new resolveSeq$1.Alias(prev); // leaves source dirty; must be cleaned by caller
 
-          if (typeof str === 'string' && tags.length > 0) {
-            node.resolved = this.resolveScalar(str, tags);
-          }
-        }
-      } catch (error) {
-        /* istanbul ignore if */
-        if (!error.source) error.source = node;
-        doc.errors.push(error);
-        node.resolved = null;
-      }
+      ctx.aliasNodes.push(alias); // defined along with prevObjects
 
-      if (!node.resolved) return null;
-      if (tagName && node.tag) node.resolved.tag = tagName;
-      return node.resolved;
+      return alias;
     }
 
-    resolveNodeWithFallback(doc, node, tagName) {
-      const res = this.resolveNode(doc, node, tagName);
-      if (Object.prototype.hasOwnProperty.call(node, 'resolved')) return res;
-      const fallback = isMap(node) ? Schema.defaultTags.MAP : isSeq(node) ? Schema.defaultTags.SEQ : Schema.defaultTags.STR;
-      /* istanbul ignore else */
+    obj.value = value;
+    prevObjects.set(value, obj);
+  }
 
-      if (fallback) {
-        doc.warnings.push(new errors.YAMLWarning(node, `The tag ${tagName} is unavailable, falling back to ${fallback}`));
-        const res = this.resolveNode(doc, node, fallback);
-        res.tag = tagName;
-        return res;
-      } else {
-        doc.errors.push(new errors.YAMLReferenceError(node, `The tag ${tagName} is unavailable`));
-        return null;
-      }
-    }
+  obj.node = tagObj.createNode ? tagObj.createNode(ctx.schema, value, ctx) : wrapScalars ? new resolveSeq$1.Scalar(value) : value;
+  if (tagName && obj.node instanceof resolveSeq$1.Node) obj.node.tag = tagName;
+  return obj.node;
+}
 
-    getTagObject(item) {
-      if (item instanceof _Alias.default) return _Alias.default;
+function getSchemaTags(schemas, knownTags, customTags, schemaId) {
+  let tags = schemas[schemaId.replace(/\W/g, '')]; // 'yaml-1.1' -> 'yaml11'
 
-      if (item.tag) {
-        const match = this.tags.filter(t => t.tag === item.tag);
-        if (match.length > 0) return match.find(t => t.format === item.format) || match[0];
-      }
+  if (!tags) {
+    const keys = Object.keys(schemas).map(key => JSON.stringify(key)).join(', ');
+    throw new Error(`Unknown schema "${schemaId}"; use one of ${keys}`);
+  }
 
-      let tagObj, obj;
+  if (Array.isArray(customTags)) {
+    for (const tag of customTags) tags = tags.concat(tag);
+  } else if (typeof customTags === 'function') {
+    tags = customTags(tags.slice());
+  }
 
-      if (item instanceof _Scalar.default) {
-        obj = item.value; // TODO: deprecate/remove class check
+  for (let i = 0; i < tags.length; ++i) {
+    const tag = tags[i];
 
-        const match = this.tags.filter(t => t.identify && t.identify(obj) || t.class && obj instanceof t.class);
-        tagObj = match.find(t => t.format === item.format) || match.find(t => !t.format);
-      } else {
-        obj = item;
-        tagObj = this.tags.find(t => t.nodeClass && obj instanceof t.nodeClass);
-      }
+    if (typeof tag === 'string') {
+      const tagObj = knownTags[tag];
 
       if (!tagObj) {
-        const name = obj && obj.constructor ? obj.constructor.name : typeof obj;
-        throw new Error(`Tag not resolved for ${name} value`);
+        const keys = Object.keys(knownTags).map(key => JSON.stringify(key)).join(', ');
+        throw new Error(`Unknown custom tag "${tag}"; use one of ${keys}`);
       }
 
-      return tagObj;
-    } // needs to be called before stringifier to allow for circular anchor refs
-
-
-    stringifyProps(node, tagObj, {
-      anchors,
-      doc
-    }) {
-      const props = [];
-      const anchor = doc.anchors.getName(node);
-
-      if (anchor) {
-        anchors[anchor] = node;
-        props.push(`&${anchor}`);
-      }
+      tags[i] = tagObj;
+    }
+  }
 
-      if (node.tag) {
-        props.push(doc.stringifyTag(node.tag));
-      } else if (!tagObj.default) {
-        props.push(doc.stringifyTag(tagObj.tag));
-      }
+  return tags;
+}
 
-      return props.join(' ');
-    }
+const sortMapEntriesByKey = (a, b) => a.key < b.key ? -1 : a.key > b.key ? 1 : 0;
+
+class Schema$2 {
+  // TODO: remove in v2
+  // TODO: remove in v2
+  constructor({
+    customTags,
+    merge,
+    schema,
+    sortMapEntries,
+    tags: deprecatedCustomTags
+  }) {
+    this.merge = !!merge;
+    this.name = schema;
+    this.sortMapEntries = sortMapEntries === true ? sortMapEntriesByKey : sortMapEntries || null;
+    if (!customTags && deprecatedCustomTags) warnings$1.warnOptionDeprecation('tags', 'customTags');
+    this.tags = getSchemaTags(schemas, tags, customTags || deprecatedCustomTags, schema);
+  }
+
+  createNode(value, wrapScalars, tagName, ctx) {
+    const baseCtx = {
+      defaultPrefix: Schema$2.defaultPrefix,
+      schema: this,
+      wrapScalars
+    };
+    const createCtx = ctx ? Object.assign(ctx, baseCtx) : baseCtx;
+    return createNode$1(value, tagName, createCtx);
+  }
 
-    stringify(item, ctx, onComment, onChompKeep) {
-      let tagObj;
+  createPair(key, value, ctx) {
+    if (!ctx) ctx = {
+      wrapScalars: true
+    };
+    const k = this.createNode(key, ctx.wrapScalars, null, ctx);
+    const v = this.createNode(value, ctx.wrapScalars, null, ctx);
+    return new resolveSeq$1.Pair(k, v);
+  }
 
-      if (!(item instanceof _Node.default)) {
-        const createCtx = {
-          aliasNodes: [],
-          onTagObj: o => tagObj = o,
-          prevObjects: new Map()
-        };
-        item = this.createNode(item, true, null, createCtx);
-        const {
-          anchors
-        } = ctx.doc;
+}
 
-        for (const alias of createCtx.aliasNodes) {
-          alias.source = alias.source.node;
-          let name = anchors.getName(alias.source);
+PlainValue$2._defineProperty(Schema$2, "defaultPrefix", PlainValue$2.defaultTagPrefix);
+
+PlainValue$2._defineProperty(Schema$2, "defaultTags", PlainValue$2.defaultTags);
+
+Schema88e323a7.Schema = Schema$2;
+
+var PlainValue$1 = PlainValueEc8e588e;
+var resolveSeq = resolveSeqD03cb037;
+var Schema$1 = Schema88e323a7;
+const defaultOptions = {
+  anchorPrefix: 'a',
+  customTags: null,
+  indent: 2,
+  indentSeq: true,
+  keepCstNodes: false,
+  keepNodeTypes: true,
+  keepBlobsInJSON: true,
+  mapAsMap: false,
+  maxAliasCount: 100,
+  prettyErrors: false,
+  // TODO Set true in v2
+  simpleKeys: false,
+  version: '1.2'
+};
+const scalarOptions = {
+  get binary() {
+    return resolveSeq.binaryOptions;
+  },
 
-          if (!name) {
-            name = anchors.newName();
-            anchors.map[name] = alias.source;
-          }
-        }
-      }
+  set binary(opt) {
+    Object.assign(resolveSeq.binaryOptions, opt);
+  },
 
-      ctx.tags = this;
-      if (item instanceof _Pair.default) return item.toString(ctx, onComment, onChompKeep);
-      if (!tagObj) tagObj = this.getTagObject(item);
-      const props = this.stringifyProps(item, tagObj, ctx);
-      if (props.length > 0) ctx.indentAtStart = (ctx.indentAtStart || 0) + props.length + 1;
-      const str = typeof tagObj.stringify === 'function' ? tagObj.stringify(item, ctx, onComment, onChompKeep) : item instanceof _Collection.default ? item.toString(ctx, onComment, onChompKeep) : (0, stringify.stringifyString)(item, ctx, onComment, onChompKeep);
-      return props ? item instanceof _Collection.default && str[0] !== '{' && str[0] !== '[' ? `${props}\n${ctx.indent}${str}` : `${props} ${str}` : str;
-    }
+  get bool() {
+    return resolveSeq.boolOptions;
+  },
 
-  }
+  set bool(opt) {
+    Object.assign(resolveSeq.boolOptions, opt);
+  },
 
-  exports.default = Schema;
+  get int() {
+    return resolveSeq.intOptions;
+  },
 
-  _defineProperty(Schema, "defaultPrefix", 'tag:yaml.org,2002:');
+  set int(opt) {
+    Object.assign(resolveSeq.intOptions, opt);
+  },
 
-  _defineProperty(Schema, "defaultTags", {
-    MAP: 'tag:yaml.org,2002:map',
-    SEQ: 'tag:yaml.org,2002:seq',
-    STR: 'tag:yaml.org,2002:str'
-  });
-});
-unwrapExports(schema);
+  get null() {
+    return resolveSeq.nullOptions;
+  },
 
-var Document_1$1 = createCommonjsModule(function (module, exports) {
+  set null(opt) {
+    Object.assign(resolveSeq.nullOptions, opt);
+  },
 
-  Object.defineProperty(exports, "__esModule", {
-    value: true
-  });
-  exports.default = void 0;
+  get str() {
+    return resolveSeq.strOptions;
+  },
 
-  var _addComment = _interopRequireDefault(addComment_1);
+  set str(opt) {
+    Object.assign(resolveSeq.strOptions, opt);
+  }
 
-  var _Anchors = _interopRequireDefault(Anchors_1);
+};
+const documentOptions = {
+  '1.0': {
+    schema: 'yaml-1.1',
+    merge: true,
+    tagPrefixes: [{
+      handle: '!',
+      prefix: PlainValue$1.defaultTagPrefix
+    }, {
+      handle: '!!',
+      prefix: 'tag:private.yaml.org,2002:'
+    }]
+  },
+  1.1: {
+    schema: 'yaml-1.1',
+    merge: true,
+    tagPrefixes: [{
+      handle: '!',
+      prefix: '!'
+    }, {
+      handle: '!!',
+      prefix: PlainValue$1.defaultTagPrefix
+    }]
+  },
+  1.2: {
+    schema: 'core',
+    merge: false,
+    tagPrefixes: [{
+      handle: '!',
+      prefix: '!'
+    }, {
+      handle: '!!',
+      prefix: PlainValue$1.defaultTagPrefix
+    }]
+  }
+};
 
-  var _listTagNames = _interopRequireDefault(listTagNames);
+function stringifyTag(doc, tag) {
+  if ((doc.version || doc.options.version) === '1.0') {
+    const priv = tag.match(/^tag:private\.yaml\.org,2002:([^:/]+)$/);
+    if (priv) return '!' + priv[1];
+    const vocab = tag.match(/^tag:([a-zA-Z0-9-]+)\.yaml\.org,2002:(.*)/);
+    return vocab ? `!${vocab[1]}/${vocab[2]}` : `!${tag.replace(/^tag:/, '')}`;
+  }
 
-  var _schema = _interopRequireDefault(schema);
+  let p = doc.tagPrefixes.find(p => tag.indexOf(p.prefix) === 0);
 
-  var _Alias = _interopRequireDefault(Alias_1$1);
+  if (!p) {
+    const dtp = doc.getDefaults().tagPrefixes;
+    p = dtp && dtp.find(p => tag.indexOf(p.prefix) === 0);
+  }
 
-  var _Collection = _interopRequireWildcard(Collection_1$1);
+  if (!p) return tag[0] === '!' ? tag : `!<${tag}>`;
+  const suffix = tag.substr(p.prefix.length).replace(/[!,[\]{}]/g, ch => ({
+    '!': '%21',
+    ',': '%2C',
+    '[': '%5B',
+    ']': '%5D',
+    '{': '%7B',
+    '}': '%7D'
+  })[ch]);
+  return p.handle + suffix;
+}
 
-  var _Node = _interopRequireDefault(Node_1$1);
+function getTagObject(tags, item) {
+  if (item instanceof resolveSeq.Alias) return resolveSeq.Alias;
 
-  var _Scalar = _interopRequireDefault(Scalar_1);
+  if (item.tag) {
+    const match = tags.filter(t => t.tag === item.tag);
+    if (match.length > 0) return match.find(t => t.format === item.format) || match[0];
+  }
 
-  var _toJSON = _interopRequireDefault(toJSON_1);
+  let tagObj, obj;
 
-  function _getRequireWildcardCache() {
-    if (typeof WeakMap !== "function") return null;
-    var cache = new WeakMap();
+  if (item instanceof resolveSeq.Scalar) {
+    obj = item.value; // TODO: deprecate/remove class check
 
-    _getRequireWildcardCache = function () {
-      return cache;
-    };
+    const match = tags.filter(t => t.identify && t.identify(obj) || t.class && obj instanceof t.class);
+    tagObj = match.find(t => t.format === item.format) || match.find(t => !t.format);
+  } else {
+    obj = item;
+    tagObj = tags.find(t => t.nodeClass && obj instanceof t.nodeClass);
+  }
 
-    return cache;
+  if (!tagObj) {
+    const name = obj && obj.constructor ? obj.constructor.name : typeof obj;
+    throw new Error(`Tag not resolved for ${name} value`);
   }
 
-  function _interopRequireWildcard(obj) {
-    if (obj && obj.__esModule) {
-      return obj;
-    }
+  return tagObj;
+} // needs to be called before value stringifier to allow for circular anchor refs
 
-    if (obj === null || typeof obj !== "object" && typeof obj !== "function") {
-      return {
-        default: obj
-      };
-    }
 
-    var cache = _getRequireWildcardCache();
+function stringifyProps(node, tagObj, {
+  anchors,
+  doc
+}) {
+  const props = [];
+  const anchor = doc.anchors.getName(node);
 
-    if (cache && cache.has(obj)) {
-      return cache.get(obj);
-    }
+  if (anchor) {
+    anchors[anchor] = node;
+    props.push(`&${anchor}`);
+  }
 
-    var newObj = {};
-    var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
+  if (node.tag) {
+    props.push(stringifyTag(doc, node.tag));
+  } else if (!tagObj.default) {
+    props.push(stringifyTag(doc, tagObj.tag));
+  }
 
-    for (var key in obj) {
-      if (Object.prototype.hasOwnProperty.call(obj, key)) {
-        var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
+  return props.join(' ');
+}
 
-        if (desc && (desc.get || desc.set)) {
-          Object.defineProperty(newObj, key, desc);
-        } else {
-          newObj[key] = obj[key];
-        }
-      }
-    }
+function stringify$1(item, ctx, onComment, onChompKeep) {
+  const {
+    anchors,
+    schema
+  } = ctx.doc;
+  let tagObj;
+
+  if (!(item instanceof resolveSeq.Node)) {
+    const createCtx = {
+      aliasNodes: [],
+      onTagObj: o => tagObj = o,
+      prevObjects: new Map()
+    };
+    item = schema.createNode(item, true, null, createCtx);
 
-    newObj.default = obj;
+    for (const alias of createCtx.aliasNodes) {
+      alias.source = alias.source.node;
+      let name = anchors.getName(alias.source);
 
-    if (cache) {
-      cache.set(obj, newObj);
+      if (!name) {
+        name = anchors.newName();
+        anchors.map[name] = alias.source;
+      }
     }
-
-    return newObj;
   }
 
-  function _interopRequireDefault(obj) {
-    return obj && obj.__esModule ? obj : {
-      default: obj
-    };
+  if (item instanceof resolveSeq.Pair) return item.toString(ctx, onComment, onChompKeep);
+  if (!tagObj) tagObj = getTagObject(schema.tags, item);
+  const props = stringifyProps(item, tagObj, ctx);
+  if (props.length > 0) ctx.indentAtStart = (ctx.indentAtStart || 0) + props.length + 1;
+  const str = typeof tagObj.stringify === 'function' ? tagObj.stringify(item, ctx, onComment, onChompKeep) : item instanceof resolveSeq.Scalar ? resolveSeq.stringifyString(item, ctx, onComment, onChompKeep) : item.toString(ctx, onComment, onChompKeep);
+  if (!props) return str;
+  return item instanceof resolveSeq.Scalar || str[0] === '{' || str[0] === '[' ? `${props} ${str}` : `${props}\n${ctx.indent}${str}`;
+}
+
+class Anchors {
+  static validAnchorNode(node) {
+    return node instanceof resolveSeq.Scalar || node instanceof resolveSeq.YAMLSeq || node instanceof resolveSeq.YAMLMap;
   }
 
-  function _defineProperty(obj, key, value) {
-    if (key in obj) {
-      Object.defineProperty(obj, key, {
-        value: value,
-        enumerable: true,
-        configurable: true,
-        writable: true
-      });
-    } else {
-      obj[key] = value;
-    }
+  constructor(prefix) {
+    PlainValue$1._defineProperty(this, "map", Object.create(null));
 
-    return obj;
+    this.prefix = prefix;
   }
 
-  const isCollectionItem = node => node && [constants.Type.MAP_KEY, constants.Type.MAP_VALUE, constants.Type.SEQ_ITEM].includes(node.type);
+  createAlias(node, name) {
+    this.setAnchor(node, name);
+    return new resolveSeq.Alias(node);
+  }
 
-  class Document {
-    constructor(options) {
-      this.anchors = new _Anchors.default(options.anchorPrefix);
-      this.commentBefore = null;
-      this.comment = null;
-      this.contents = null;
-      this.directivesEndMarker = null;
-      this.errors = [];
-      this.options = options;
-      this.schema = null;
-      this.tagPrefixes = [];
-      this.version = null;
-      this.warnings = [];
-    }
+  createMergePair(...sources) {
+    const merge = new resolveSeq.Merge();
+    merge.value.items = sources.map(s => {
+      if (s instanceof resolveSeq.Alias) {
+        if (s.source instanceof resolveSeq.YAMLMap) return s;
+      } else if (s instanceof resolveSeq.YAMLMap) {
+        return this.createAlias(s);
+      }
 
-    assertCollectionContents() {
-      if (this.contents instanceof _Collection.default) return true;
-      throw new Error('Expected a YAML collection as document contents');
-    }
+      throw new Error('Merge sources must be Map nodes or their Aliases');
+    });
+    return merge;
+  }
 
-    add(value) {
-      this.assertCollectionContents();
-      return this.contents.add(value);
-    }
+  getName(node) {
+    const {
+      map
+    } = this;
+    return Object.keys(map).find(a => map[a] === node);
+  }
 
-    addIn(path, value) {
-      this.assertCollectionContents();
-      this.contents.addIn(path, value);
-    }
+  getNames() {
+    return Object.keys(this.map);
+  }
 
-    delete(key) {
-      this.assertCollectionContents();
-      return this.contents.delete(key);
-    }
+  getNode(name) {
+    return this.map[name];
+  }
 
-    deleteIn(path) {
-      if ((0, _Collection.isEmptyPath)(path)) {
-        if (this.contents == null) return false;
-        this.contents = null;
-        return true;
-      }
+  newName(prefix) {
+    if (!prefix) prefix = this.prefix;
+    const names = Object.keys(this.map);
 
-      this.assertCollectionContents();
-      return this.contents.deleteIn(path);
+    for (let i = 1; true; ++i) {
+      const name = `${prefix}${i}`;
+      if (!names.includes(name)) return name;
     }
+  } // During parsing, map & aliases contain CST nodes
 
-    getDefaults() {
-      return Document.defaults[this.version] || Document.defaults[this.options.version] || {};
-    }
 
-    get(key, keepScalar) {
-      return this.contents instanceof _Collection.default ? this.contents.get(key, keepScalar) : undefined;
-    }
+  resolveNodes() {
+    const {
+      map,
+      _cstAliases
+    } = this;
+    Object.keys(map).forEach(a => {
+      map[a] = map[a].resolved;
+    });
 
-    getIn(path, keepScalar) {
-      if ((0, _Collection.isEmptyPath)(path)) return !keepScalar && this.contents instanceof _Scalar.default ? this.contents.value : this.contents;
-      return this.contents instanceof _Collection.default ? this.contents.getIn(path, keepScalar) : undefined;
-    }
+    _cstAliases.forEach(a => {
+      a.source = a.source.resolved;
+    });
 
-    has(key) {
-      return this.contents instanceof _Collection.default ? this.contents.has(key) : false;
-    }
+    delete this._cstAliases;
+  }
 
-    hasIn(path) {
-      if ((0, _Collection.isEmptyPath)(path)) return this.contents !== undefined;
-      return this.contents instanceof _Collection.default ? this.contents.hasIn(path) : false;
+  setAnchor(node, name) {
+    if (node != null && !Anchors.validAnchorNode(node)) {
+      throw new Error('Anchors may only be set for Scalar, Seq and Map nodes');
     }
 
-    set(key, value) {
-      this.assertCollectionContents();
-      this.contents.set(key, value);
+    if (name && /[\x00-\x19\s,[\]{}]/.test(name)) {
+      throw new Error('Anchor names must not contain whitespace or control characters');
     }
 
-    setIn(path, value) {
-      if ((0, _Collection.isEmptyPath)(path)) this.contents = value;else {
-        this.assertCollectionContents();
-        this.contents.setIn(path, value);
+    const {
+      map
+    } = this;
+    const prev = node && Object.keys(map).find(a => map[a] === node);
+
+    if (prev) {
+      if (!name) {
+        return prev;
+      } else if (prev !== name) {
+        delete map[prev];
+        map[name] = node;
       }
-    }
-
-    setSchema(id, customTags) {
-      if (!id && !customTags && this.schema) return;
-      if (typeof id === 'number') id = id.toFixed(1);
-
-      if (id === '1.0' || id === '1.1' || id === '1.2') {
-        if (this.version) this.version = id;else this.options.version = id;
-        delete this.options.schema;
-      } else if (id && typeof id === 'string') {
-        this.options.schema = id;
+    } else {
+      if (!name) {
+        if (!node) return null;
+        name = this.newName();
       }
 
-      if (Array.isArray(customTags)) this.options.customTags = customTags;
-      const opt = Object.assign({}, this.getDefaults(), this.options);
-      this.schema = new _schema.default(opt);
+      map[name] = node;
     }
 
-    parse(node, prevDoc) {
-      if (this.options.keepCstNodes) this.cstNode = node;
-      if (this.options.keepNodeTypes) this.type = 'DOCUMENT';
-      const {
-        directives = [],
-        contents = [],
-        directivesEndMarker,
-        error,
-        valueRange
-      } = node;
-
-      if (error) {
-        if (!error.source) error.source = this;
-        this.errors.push(error);
-      }
-
-      this.parseDirectives(directives, prevDoc);
-      if (directivesEndMarker) this.directivesEndMarker = true;
-      this.range = valueRange ? [valueRange.start, valueRange.end] : null;
-      this.setSchema();
-      this.anchors._cstAliases = [];
-      this.parseContents(contents);
-      this.anchors.resolveNodes();
+    return name;
+  }
 
-      if (this.options.prettyErrors) {
-        for (const error of this.errors) if (error instanceof errors.YAMLError) error.makePretty();
+}
 
-        for (const warn of this.warnings) if (warn instanceof errors.YAMLError) warn.makePretty();
-      }
+const visit = (node, tags) => {
+  if (node && typeof node === 'object') {
+    const {
+      tag
+    } = node;
 
-      return this;
+    if (node instanceof resolveSeq.Collection) {
+      if (tag) tags[tag] = true;
+      node.items.forEach(n => visit(n, tags));
+    } else if (node instanceof resolveSeq.Pair) {
+      visit(node.key, tags);
+      visit(node.value, tags);
+    } else if (node instanceof resolveSeq.Scalar) {
+      if (tag) tags[tag] = true;
     }
+  }
 
-    parseDirectives(directives, prevDoc) {
-      const directiveComments = [];
-      let hasDirectives = false;
-      directives.forEach(directive => {
-        const {
-          comment,
-          name
-        } = directive;
-
-        switch (name) {
-          case 'TAG':
-            this.resolveTagDirective(directive);
-            hasDirectives = true;
-            break;
+  return tags;
+};
 
-          case 'YAML':
-          case 'YAML:1.0':
-            this.resolveYamlDirective(directive);
-            hasDirectives = true;
-            break;
+const listTagNames = node => Object.keys(visit(node, {}));
 
-          default:
-            if (name) {
-              const msg = `YAML only supports %TAG and %YAML directives, and not %${name}`;
-              this.warnings.push(new errors.YAMLWarning(directive, msg));
-            }
+function parseContents(doc, contents) {
+  const comments = {
+    before: [],
+    after: []
+  };
+  let body = undefined;
+  let spaceBefore = false;
+
+  for (const node of contents) {
+    if (node.valueRange) {
+      if (body !== undefined) {
+        const msg = 'Document contains trailing content not separated by a ... or --- line';
+        doc.errors.push(new PlainValue$1.YAMLSyntaxError(node, msg));
+        break;
+      }
 
-        }
+      const res = resolveSeq.resolveNode(doc, node);
 
-        if (comment) directiveComments.push(comment);
-      });
+      if (spaceBefore) {
+        res.spaceBefore = true;
+        spaceBefore = false;
+      }
 
-      if (prevDoc && !hasDirectives && '1.1' === (this.version || prevDoc.version || this.options.version)) {
-        const copyTagPrefix = ({
-          handle,
-          prefix
-        }) => ({
-          handle,
-          prefix
-        });
+      body = res;
+    } else if (node.comment !== null) {
+      const cc = body === undefined ? comments.before : comments.after;
+      cc.push(node.comment);
+    } else if (node.type === PlainValue$1.Type.BLANK_LINE) {
+      spaceBefore = true;
 
-        this.tagPrefixes = prevDoc.tagPrefixes.map(copyTagPrefix);
-        this.version = prevDoc.version;
+      if (body === undefined && comments.before.length > 0 && !doc.commentBefore) {
+        // space-separated comments at start are parsed as document comments
+        doc.commentBefore = comments.before.join('\n');
+        comments.before = [];
       }
-
-      this.commentBefore = directiveComments.join('\n') || null;
     }
+  }
 
-    parseContents(contents) {
-      const comments = {
-        before: [],
-        after: []
-      };
-      const contentNodes = [];
-      let spaceBefore = false;
-      contents.forEach(node => {
-        if (node.valueRange) {
-          if (contentNodes.length === 1) {
-            const msg = 'Document is not valid YAML (bad indentation?)';
-            this.errors.push(new errors.YAMLSyntaxError(node, msg));
-          }
+  doc.contents = body || null;
 
-          const res = this.resolveNode(node);
+  if (!body) {
+    doc.comment = comments.before.concat(comments.after).join('\n') || null;
+  } else {
+    const cb = comments.before.join('\n');
 
-          if (spaceBefore) {
-            res.spaceBefore = true;
-            spaceBefore = false;
-          }
+    if (cb) {
+      const cbNode = body instanceof resolveSeq.Collection && body.items[0] ? body.items[0] : body;
+      cbNode.commentBefore = cbNode.commentBefore ? `${cb}\n${cbNode.commentBefore}` : cb;
+    }
 
-          contentNodes.push(res);
-        } else if (node.comment !== null) {
-          const cc = contentNodes.length === 0 ? comments.before : comments.after;
-          cc.push(node.comment);
-        } else if (node.type === constants.Type.BLANK_LINE) {
-          spaceBefore = true;
-
-          if (contentNodes.length === 0 && comments.before.length > 0 && !this.commentBefore) {
-            // space-separated comments at start are parsed as document comments
-            this.commentBefore = comments.before.join('\n');
-            comments.before = [];
-          }
-        }
-      });
+    doc.comment = comments.after.join('\n') || null;
+  }
+}
 
-      switch (contentNodes.length) {
-        case 0:
-          this.contents = null;
-          comments.after = comments.before;
-          break;
+function resolveTagDirective({
+  tagPrefixes
+}, directive) {
+  const [handle, prefix] = directive.parameters;
 
-        case 1:
-          this.contents = contentNodes[0];
+  if (!handle || !prefix) {
+    const msg = 'Insufficient parameters given for %TAG directive';
+    throw new PlainValue$1.YAMLSemanticError(directive, msg);
+  }
 
-          if (this.contents) {
-            const cb = comments.before.join('\n') || null;
+  if (tagPrefixes.some(p => p.handle === handle)) {
+    const msg = 'The %TAG directive must only be given at most once per handle in the same document.';
+    throw new PlainValue$1.YAMLSemanticError(directive, msg);
+  }
 
-            if (cb) {
-              const cbNode = this.contents instanceof _Collection.default && this.contents.items[0] ? this.contents.items[0] : this.contents;
-              cbNode.commentBefore = cbNode.commentBefore ? `${cb}\n${cbNode.commentBefore}` : cb;
-            }
-          } else {
-            comments.after = comments.before.concat(comments.after);
-          }
+  return {
+    handle,
+    prefix
+  };
+}
 
-          break;
+function resolveYamlDirective(doc, directive) {
+  let [version] = directive.parameters;
+  if (directive.name === 'YAML:1.0') version = '1.0';
 
-        default:
-          this.contents = contentNodes;
+  if (!version) {
+    const msg = 'Insufficient parameters given for %YAML directive';
+    throw new PlainValue$1.YAMLSemanticError(directive, msg);
+  }
 
-          if (this.contents[0]) {
-            this.contents[0].commentBefore = comments.before.join('\n') || null;
-          } else {
-            comments.after = comments.before.concat(comments.after);
-          }
+  if (!documentOptions[version]) {
+    const v0 = doc.version || doc.options.version;
+    const msg = `Document will be parsed as YAML ${v0} rather than YAML ${version}`;
+    doc.warnings.push(new PlainValue$1.YAMLWarning(directive, msg));
+  }
 
-      }
+  return version;
+}
 
-      this.comment = comments.after.join('\n') || null;
-    }
+function parseDirectives(doc, directives, prevDoc) {
+  const directiveComments = [];
+  let hasDirectives = false;
 
-    resolveTagDirective(directive) {
-      const [handle, prefix] = directive.parameters;
+  for (const directive of directives) {
+    const {
+      comment,
+      name
+    } = directive;
 
-      if (handle && prefix) {
-        if (this.tagPrefixes.every(p => p.handle !== handle)) {
-          this.tagPrefixes.push({
-            handle,
-            prefix
-          });
-        } else {
-          const msg = 'The %TAG directive must only be given at most once per handle in the same document.';
-          this.errors.push(new errors.YAMLSemanticError(directive, msg));
+    switch (name) {
+      case 'TAG':
+        try {
+          doc.tagPrefixes.push(resolveTagDirective(doc, directive));
+        } catch (error) {
+          doc.errors.push(error);
         }
-      } else {
-        const msg = 'Insufficient parameters given for %TAG directive';
-        this.errors.push(new errors.YAMLSemanticError(directive, msg));
-      }
-    }
 
-    resolveYamlDirective(directive) {
-      let [version] = directive.parameters;
-      if (directive.name === 'YAML:1.0') version = '1.0';
+        hasDirectives = true;
+        break;
 
-      if (this.version) {
-        const msg = 'The %YAML directive must only be given at most once per document.';
-        this.errors.push(new errors.YAMLSemanticError(directive, msg));
-      }
+      case 'YAML':
+      case 'YAML:1.0':
+        if (doc.version) {
+          const msg = 'The %YAML directive must only be given at most once per document.';
+          doc.errors.push(new PlainValue$1.YAMLSemanticError(directive, msg));
+        }
 
-      if (!version) {
-        const msg = 'Insufficient parameters given for %YAML directive';
-        this.errors.push(new errors.YAMLSemanticError(directive, msg));
-      } else {
-        if (!Document.defaults[version]) {
-          const v0 = this.version || this.options.version;
-          const msg = `Document will be parsed as YAML ${v0} rather than YAML ${version}`;
-          this.warnings.push(new errors.YAMLWarning(directive, msg));
+        try {
+          doc.version = resolveYamlDirective(doc, directive);
+        } catch (error) {
+          doc.errors.push(error);
         }
 
-        this.version = version;
-      }
-    }
+        hasDirectives = true;
+        break;
 
-    resolveTagName(node) {
-      const {
-        tag,
-        type
-      } = node;
-      let nonSpecific = false;
+      default:
+        if (name) {
+          const msg = `YAML only supports %TAG and %YAML directives, and not %${name}`;
+          doc.warnings.push(new PlainValue$1.YAMLWarning(directive, msg));
+        }
 
-      if (tag) {
-        const {
-          handle,
-          suffix,
-          verbatim
-        } = tag;
-
-        if (verbatim) {
-          if (verbatim !== '!' && verbatim !== '!!') return verbatim;
-          const msg = `Verbatim tags aren't resolved, so ${verbatim} is invalid.`;
-          this.errors.push(new errors.YAMLSemanticError(node, msg));
-        } else if (handle === '!' && !suffix) {
-          nonSpecific = true;
-        } else {
-          let prefix = this.tagPrefixes.find(p => p.handle === handle);
+    }
 
-          if (!prefix) {
-            const dtp = this.getDefaults().tagPrefixes;
-            if (dtp) prefix = dtp.find(p => p.handle === handle);
-          }
+    if (comment) directiveComments.push(comment);
+  }
 
-          if (prefix) {
-            if (suffix) {
-              if (handle === '!' && (this.version || this.options.version) === '1.0') {
-                if (suffix[0] === '^') return suffix;
+  if (prevDoc && !hasDirectives && '1.1' === (doc.version || prevDoc.version || doc.options.version)) {
+    const copyTagPrefix = ({
+      handle,
+      prefix
+    }) => ({
+      handle,
+      prefix
+    });
 
-                if (/[:/]/.test(suffix)) {
-                  // word/foo -> tag:word.yaml.org,2002:foo
-                  const vocab = suffix.match(/^([a-z0-9-]+)\/(.*)/i);
-                  return vocab ? `tag:${vocab[1]}.yaml.org,2002:${vocab[2]}` : `tag:${suffix}`;
-                }
-              }
+    doc.tagPrefixes = prevDoc.tagPrefixes.map(copyTagPrefix);
+    doc.version = prevDoc.version;
+  }
 
-              return prefix.prefix + decodeURIComponent(suffix);
-            }
+  doc.commentBefore = directiveComments.join('\n') || null;
+}
 
-            this.errors.push(new errors.YAMLSemanticError(node, `The ${handle} tag has no suffix.`));
-          } else {
-            const msg = `The ${handle} tag handle is non-default and was not declared.`;
-            this.errors.push(new errors.YAMLSemanticError(node, msg));
-          }
-        }
-      }
+function assertCollection(contents) {
+  if (contents instanceof resolveSeq.Collection) return true;
+  throw new Error('Expected a YAML collection as document contents');
+}
 
-      switch (type) {
-        case constants.Type.BLOCK_FOLDED:
-        case constants.Type.BLOCK_LITERAL:
-        case constants.Type.QUOTE_DOUBLE:
-        case constants.Type.QUOTE_SINGLE:
-          return _schema.default.defaultTags.STR;
+class Document$2 {
+  constructor(options) {
+    this.anchors = new Anchors(options.anchorPrefix);
+    this.commentBefore = null;
+    this.comment = null;
+    this.contents = null;
+    this.directivesEndMarker = null;
+    this.errors = [];
+    this.options = options;
+    this.schema = null;
+    this.tagPrefixes = [];
+    this.version = null;
+    this.warnings = [];
+  }
 
-        case constants.Type.FLOW_MAP:
-        case constants.Type.MAP:
-          return _schema.default.defaultTags.MAP;
+  add(value) {
+    assertCollection(this.contents);
+    return this.contents.add(value);
+  }
 
-        case constants.Type.FLOW_SEQ:
-        case constants.Type.SEQ:
-          return _schema.default.defaultTags.SEQ;
+  addIn(path, value) {
+    assertCollection(this.contents);
+    this.contents.addIn(path, value);
+  }
 
-        case constants.Type.PLAIN:
-          return nonSpecific ? _schema.default.defaultTags.STR : null;
+  delete(key) {
+    assertCollection(this.contents);
+    return this.contents.delete(key);
+  }
 
-        default:
-          return null;
-      }
+  deleteIn(path) {
+    if (resolveSeq.isEmptyPath(path)) {
+      if (this.contents == null) return false;
+      this.contents = null;
+      return true;
     }
 
-    resolveNode(node) {
-      if (!node) return null;
-      const {
-        anchors,
-        errors: errors$1,
-        schema
-      } = this;
-      let hasAnchor = false;
-      let hasTag = false;
-      const comments = {
-        before: [],
-        after: []
-      };
-      const props = isCollectionItem(node.context.parent) ? node.context.parent.props.concat(node.props) : node.props;
-
-      for (const {
-        start,
-        end
-      } of props) {
-        switch (node.context.src[start]) {
-          case constants.Char.COMMENT:
-            {
-              if (!node.commentHasRequiredWhitespace(start)) {
-                const msg = 'Comments must be separated from other tokens by white space characters';
-                errors$1.push(new errors.YAMLSemanticError(node, msg));
-              }
-
-              const c = node.context.src.slice(start + 1, end);
-              const {
-                header,
-                valueRange
-              } = node;
-
-              if (valueRange && (start > valueRange.start || header && start > header.start)) {
-                comments.after.push(c);
-              } else {
-                comments.before.push(c);
-              }
-            }
-            break;
-
-          case constants.Char.ANCHOR:
-            if (hasAnchor) {
-              const msg = 'A node can have at most one anchor';
-              errors$1.push(new errors.YAMLSemanticError(node, msg));
-            }
-
-            hasAnchor = true;
-            break;
+    assertCollection(this.contents);
+    return this.contents.deleteIn(path);
+  }
 
-          case constants.Char.TAG:
-            if (hasTag) {
-              const msg = 'A node can have at most one tag';
-              errors$1.push(new errors.YAMLSemanticError(node, msg));
-            }
+  getDefaults() {
+    return Document$2.defaults[this.version] || Document$2.defaults[this.options.version] || {};
+  }
 
-            hasTag = true;
-            break;
-        }
-      }
+  get(key, keepScalar) {
+    return this.contents instanceof resolveSeq.Collection ? this.contents.get(key, keepScalar) : undefined;
+  }
 
-      if (hasAnchor) {
-        const name = node.anchor;
-        const prev = anchors.getNode(name); // At this point, aliases for any preceding node with the same anchor
-        // name have already been resolved, so it may safely be renamed.
+  getIn(path, keepScalar) {
+    if (resolveSeq.isEmptyPath(path)) return !keepScalar && this.contents instanceof resolveSeq.Scalar ? this.contents.value : this.contents;
+    return this.contents instanceof resolveSeq.Collection ? this.contents.getIn(path, keepScalar) : undefined;
+  }
 
-        if (prev) anchors.map[anchors.newName(name)] = prev; // During parsing, we need to store the CST node in anchors.map as
-        // anchors need to be available during resolution to allow for
-        // circular references.
+  has(key) {
+    return this.contents instanceof resolveSeq.Collection ? this.contents.has(key) : false;
+  }
 
-        anchors.map[name] = node;
-      }
+  hasIn(path) {
+    if (resolveSeq.isEmptyPath(path)) return this.contents !== undefined;
+    return this.contents instanceof resolveSeq.Collection ? this.contents.hasIn(path) : false;
+  }
 
-      let res;
+  set(key, value) {
+    assertCollection(this.contents);
+    this.contents.set(key, value);
+  }
 
-      if (node.type === constants.Type.ALIAS) {
-        if (hasAnchor || hasTag) {
-          const msg = 'An alias node must not specify any properties';
-          errors$1.push(new errors.YAMLSemanticError(node, msg));
-        }
+  setIn(path, value) {
+    if (resolveSeq.isEmptyPath(path)) this.contents = value;else {
+      assertCollection(this.contents);
+      this.contents.setIn(path, value);
+    }
+  }
 
-        const name = node.rawValue;
-        const src = anchors.getNode(name);
+  setSchema(id, customTags) {
+    if (!id && !customTags && this.schema) return;
+    if (typeof id === 'number') id = id.toFixed(1);
 
-        if (!src) {
-          const msg = `Aliased anchor not found: ${name}`;
-          errors$1.push(new errors.YAMLReferenceError(node, msg));
-          return null;
-        } // Lazy resolution for circular references
+    if (id === '1.0' || id === '1.1' || id === '1.2') {
+      if (this.version) this.version = id;else this.options.version = id;
+      delete this.options.schema;
+    } else if (id && typeof id === 'string') {
+      this.options.schema = id;
+    }
 
+    if (Array.isArray(customTags)) this.options.customTags = customTags;
+    const opt = Object.assign({}, this.getDefaults(), this.options);
+    this.schema = new Schema$1.Schema(opt);
+  }
 
-        res = new _Alias.default(src);
+  parse(node, prevDoc) {
+    if (this.options.keepCstNodes) this.cstNode = node;
+    if (this.options.keepNodeTypes) this.type = 'DOCUMENT';
+    const {
+      directives = [],
+      contents = [],
+      directivesEndMarker,
+      error,
+      valueRange
+    } = node;
 
-        anchors._cstAliases.push(res);
-      } else {
-        const tagName = this.resolveTagName(node);
+    if (error) {
+      if (!error.source) error.source = this;
+      this.errors.push(error);
+    }
 
-        if (tagName) {
-          res = schema.resolveNodeWithFallback(this, node, tagName);
-        } else {
-          if (node.type !== constants.Type.PLAIN) {
-            const msg = `Failed to resolve ${node.type} node here`;
-            errors$1.push(new errors.YAMLSyntaxError(node, msg));
-            return null;
-          }
+    parseDirectives(this, directives, prevDoc);
+    if (directivesEndMarker) this.directivesEndMarker = true;
+    this.range = valueRange ? [valueRange.start, valueRange.end] : null;
+    this.setSchema();
+    this.anchors._cstAliases = [];
+    parseContents(this, contents);
+    this.anchors.resolveNodes();
 
-          try {
-            res = schema.resolveScalar(node.strValue || '');
-          } catch (error) {
-            if (!error.source) error.source = node;
-            errors$1.push(error);
-            return null;
-          }
-        }
-      }
+    if (this.options.prettyErrors) {
+      for (const error of this.errors) if (error instanceof PlainValue$1.YAMLError) error.makePretty();
 
-      if (res) {
-        res.range = [node.range.start, node.range.end];
-        if (this.options.keepCstNodes) res.cstNode = node;
-        if (this.options.keepNodeTypes) res.type = node.type;
-        const cb = comments.before.join('\n');
+      for (const warn of this.warnings) if (warn instanceof PlainValue$1.YAMLError) warn.makePretty();
+    }
 
-        if (cb) {
-          res.commentBefore = res.commentBefore ? `${res.commentBefore}\n${cb}` : cb;
-        }
+    return this;
+  }
 
-        const ca = comments.after.join('\n');
-        if (ca) res.comment = res.comment ? `${res.comment}\n${ca}` : ca;
-      }
+  listNonDefaultTags() {
+    return listTagNames(this.contents).filter(t => t.indexOf(Schema$1.Schema.defaultPrefix) !== 0);
+  }
 
-      return node.resolved = res;
-    }
+  setTagPrefix(handle, prefix) {
+    if (handle[0] !== '!' || handle[handle.length - 1] !== '!') throw new Error('Handle must start and end with !');
 
-    listNonDefaultTags() {
-      return (0, _listTagNames.default)(this.contents).filter(t => t.indexOf(_schema.default.defaultPrefix) !== 0);
+    if (prefix) {
+      const prev = this.tagPrefixes.find(p => p.handle === handle);
+      if (prev) prev.prefix = prefix;else this.tagPrefixes.push({
+        handle,
+        prefix
+      });
+    } else {
+      this.tagPrefixes = this.tagPrefixes.filter(p => p.handle !== handle);
     }
+  }
 
-    setTagPrefix(handle, prefix) {
-      if (handle[0] !== '!' || handle[handle.length - 1] !== '!') throw new Error('Handle must start and end with !');
-
-      if (prefix) {
-        const prev = this.tagPrefixes.find(p => p.handle === handle);
-        if (prev) prev.prefix = prefix;else this.tagPrefixes.push({
-          handle,
-          prefix
-        });
-      } else {
-        this.tagPrefixes = this.tagPrefixes.filter(p => p.handle !== handle);
-      }
-    }
+  toJSON(arg, onAnchor) {
+    const {
+      keepBlobsInJSON,
+      mapAsMap,
+      maxAliasCount
+    } = this.options;
+    const keep = keepBlobsInJSON && (typeof arg !== 'string' || !(this.contents instanceof resolveSeq.Scalar));
+    const ctx = {
+      doc: this,
+      indentStep: '  ',
+      keep,
+      mapAsMap: keep && !!mapAsMap,
+      maxAliasCount,
+      stringify: stringify$1 // Requiring directly in Pair would create circular dependencies
 
-    stringifyTag(tag) {
-      if ((this.version || this.options.version) === '1.0') {
-        const priv = tag.match(/^tag:private\.yaml\.org,2002:([^:/]+)$/);
-        if (priv) return '!' + priv[1];
-        const vocab = tag.match(/^tag:([a-zA-Z0-9-]+)\.yaml\.org,2002:(.*)/);
-        return vocab ? `!${vocab[1]}/${vocab[2]}` : `!${tag.replace(/^tag:/, '')}`;
-      } else {
-        let p = this.tagPrefixes.find(p => tag.indexOf(p.prefix) === 0);
+    };
+    const anchorNames = Object.keys(this.anchors.map);
+    if (anchorNames.length > 0) ctx.anchors = new Map(anchorNames.map(name => [this.anchors.map[name], {
+      alias: [],
+      aliasCount: 0,
+      count: 1
+    }]));
+    const res = resolveSeq.toJSON(this.contents, arg, ctx);
+    if (typeof onAnchor === 'function' && ctx.anchors) for (const {
+      count,
+      res
+    } of ctx.anchors.values()) onAnchor(res, count);
+    return res;
+  }
 
-        if (!p) {
-          const dtp = this.getDefaults().tagPrefixes;
-          p = dtp && dtp.find(p => tag.indexOf(p.prefix) === 0);
-        }
+  toString() {
+    if (this.errors.length > 0) throw new Error('Document with errors cannot be stringified');
+    const indentSize = this.options.indent;
 
-        if (!p) return tag[0] === '!' ? tag : `!<${tag}>`;
-        const suffix = tag.substr(p.prefix.length).replace(/[!,[\]{}]/g, ch => ({
-          '!': '%21',
-          ',': '%2C',
-          '[': '%5B',
-          ']': '%5D',
-          '{': '%7B',
-          '}': '%7D'
-        })[ch]);
-        return p.handle + suffix;
-      }
+    if (!Number.isInteger(indentSize) || indentSize <= 0) {
+      const s = JSON.stringify(indentSize);
+      throw new Error(`"indent" option must be a positive integer, not ${s}`);
     }
 
-    toJSON(arg) {
-      const {
-        keepBlobsInJSON,
-        mapAsMap,
-        maxAliasCount
-      } = this.options;
-      const keep = keepBlobsInJSON && (typeof arg !== 'string' || !(this.contents instanceof _Scalar.default));
-      const ctx = {
-        doc: this,
-        keep,
-        mapAsMap: keep && !!mapAsMap,
-        maxAliasCount
-      };
-      const anchorNames = Object.keys(this.anchors.map);
-      if (anchorNames.length > 0) ctx.anchors = anchorNames.map(name => ({
-        alias: [],
-        aliasCount: 0,
-        count: 1,
-        node: this.anchors.map[name]
-      }));
-      return (0, _toJSON.default)(this.contents, arg, ctx);
-    }
-
-    toString() {
-      if (this.errors.length > 0) throw new Error('Document with errors cannot be stringified');
-      this.setSchema();
-      const lines = [];
-      let hasDirectives = false;
-
-      if (this.version) {
-        let vd = '%YAML 1.2';
-
-        if (this.schema.name === 'yaml-1.1') {
-          if (this.version === '1.0') vd = '%YAML:1.0';else if (this.version === '1.1') vd = '%YAML 1.1';
-        }
+    this.setSchema();
+    const lines = [];
+    let hasDirectives = false;
 
-        lines.push(vd);
-        hasDirectives = true;
+    if (this.version) {
+      let vd = '%YAML 1.2';
+
+      if (this.schema.name === 'yaml-1.1') {
+        if (this.version === '1.0') vd = '%YAML:1.0';else if (this.version === '1.1') vd = '%YAML 1.1';
       }
 
-      const tagNames = this.listNonDefaultTags();
-      this.tagPrefixes.forEach(({
-        handle,
-        prefix
-      }) => {
-        if (tagNames.some(t => t.indexOf(prefix) === 0)) {
-          lines.push(`%TAG ${handle} ${prefix}`);
-          hasDirectives = true;
-        }
-      });
-      if (hasDirectives || this.directivesEndMarker) lines.push('---');
+      lines.push(vd);
+      hasDirectives = true;
+    }
 
-      if (this.commentBefore) {
-        if (hasDirectives || !this.directivesEndMarker) lines.unshift('');
-        lines.unshift(this.commentBefore.replace(/^/gm, '#'));
+    const tagNames = this.listNonDefaultTags();
+    this.tagPrefixes.forEach(({
+      handle,
+      prefix
+    }) => {
+      if (tagNames.some(t => t.indexOf(prefix) === 0)) {
+        lines.push(`%TAG ${handle} ${prefix}`);
+        hasDirectives = true;
       }
+    });
+    if (hasDirectives || this.directivesEndMarker) lines.push('---');
 
-      const ctx = {
-        anchors: {},
-        doc: this,
-        indent: ''
-      };
-      let chompKeep = false;
-      let contentComment = null;
+    if (this.commentBefore) {
+      if (hasDirectives || !this.directivesEndMarker) lines.unshift('');
+      lines.unshift(this.commentBefore.replace(/^/gm, '#'));
+    }
 
-      if (this.contents) {
-        if (this.contents instanceof _Node.default) {
-          if (this.contents.spaceBefore && (hasDirectives || this.directivesEndMarker)) lines.push('');
-          if (this.contents.commentBefore) lines.push(this.contents.commentBefore.replace(/^/gm, '#')); // top-level block scalars need to be indented if followed by a comment
+    const ctx = {
+      anchors: Object.create(null),
+      doc: this,
+      indent: '',
+      indentStep: ' '.repeat(indentSize),
+      stringify: stringify$1 // Requiring directly in nodes would create circular dependencies
 
-          ctx.forceBlockIndent = !!this.comment;
-          contentComment = this.contents.comment;
-        }
+    };
+    let chompKeep = false;
+    let contentComment = null;
 
-        const onChompKeep = contentComment ? null : () => chompKeep = true;
-        const body = this.schema.stringify(this.contents, ctx, () => contentComment = null, onChompKeep);
-        lines.push((0, _addComment.default)(body, '', contentComment));
-      } else if (this.contents !== undefined) {
-        lines.push(this.schema.stringify(this.contents, ctx));
-      }
+    if (this.contents) {
+      if (this.contents instanceof resolveSeq.Node) {
+        if (this.contents.spaceBefore && (hasDirectives || this.directivesEndMarker)) lines.push('');
+        if (this.contents.commentBefore) lines.push(this.contents.commentBefore.replace(/^/gm, '#')); // top-level block scalars need to be indented if followed by a comment
 
-      if (this.comment) {
-        if ((!chompKeep || contentComment) && lines[lines.length - 1] !== '') lines.push('');
-        lines.push(this.comment.replace(/^/gm, '#'));
+        ctx.forceBlockIndent = !!this.comment;
+        contentComment = this.contents.comment;
       }
 
-      return lines.join('\n') + '\n';
+      const onChompKeep = contentComment ? null : () => chompKeep = true;
+      const body = stringify$1(this.contents, ctx, () => contentComment = null, onChompKeep);
+      lines.push(resolveSeq.addComment(body, '', contentComment));
+    } else if (this.contents !== undefined) {
+      lines.push(stringify$1(this.contents, ctx));
     }
 
-  }
-
-  exports.default = Document;
-
-  _defineProperty(Document, "defaults", {
-    '1.0': {
-      schema: 'yaml-1.1',
-      merge: true,
-      tagPrefixes: [{
-        handle: '!',
-        prefix: _schema.default.defaultPrefix
-      }, {
-        handle: '!!',
-        prefix: 'tag:private.yaml.org,2002:'
-      }]
-    },
-    '1.1': {
-      schema: 'yaml-1.1',
-      merge: true,
-      tagPrefixes: [{
-        handle: '!',
-        prefix: '!'
-      }, {
-        handle: '!!',
-        prefix: _schema.default.defaultPrefix
-      }]
-    },
-    '1.2': {
-      schema: 'core',
-      merge: false,
-      tagPrefixes: [{
-        handle: '!',
-        prefix: '!'
-      }, {
-        handle: '!!',
-        prefix: _schema.default.defaultPrefix
-      }]
+    if (this.comment) {
+      if ((!chompKeep || contentComment) && lines[lines.length - 1] !== '') lines.push('');
+      lines.push(this.comment.replace(/^/gm, '#'));
     }
-  });
-});
-unwrapExports(Document_1$1);
 
-var dist$1 = createCommonjsModule(function (module, exports) {
+    return lines.join('\n') + '\n';
+  }
 
-  Object.defineProperty(exports, "__esModule", {
-    value: true
-  });
-  exports.default = void 0;
+}
 
-  var _parse = _interopRequireDefault(parse_1);
+PlainValue$1._defineProperty(Document$2, "defaults", documentOptions);
 
-  var _Document = _interopRequireDefault(Document_1$1);
+Document9b4560a1.Document = Document$2;
+Document9b4560a1.defaultOptions = defaultOptions;
+Document9b4560a1.scalarOptions = scalarOptions;
 
-  var _schema = _interopRequireDefault(schema);
+var parseCst = parseCst$1;
+var Document$1 = Document9b4560a1;
+var Schema = Schema88e323a7;
+var PlainValue = PlainValueEc8e588e;
+var warnings = warnings1000a372;
 
-  function _interopRequireDefault(obj) {
-    return obj && obj.__esModule ? obj : {
-      default: obj
-    };
+function createNode(value, wrapScalars = true, tag) {
+  if (tag === undefined && typeof wrapScalars === 'string') {
+    tag = wrapScalars;
+    wrapScalars = true;
   }
 
-  const defaultOptions = {
-    anchorPrefix: 'a',
-    customTags: null,
-    keepCstNodes: false,
-    keepNodeTypes: true,
-    keepBlobsInJSON: true,
-    mapAsMap: false,
-    maxAliasCount: 100,
-    prettyErrors: false,
-    // TODO Set true in v2
-    simpleKeys: false,
-    version: '1.2'
-  };
-
-  function createNode(value, wrapScalars = true, tag) {
-    if (tag === undefined && typeof wrapScalars === 'string') {
-      tag = wrapScalars;
-      wrapScalars = true;
-    }
+  const options = Object.assign({}, Document$1.Document.defaults[Document$1.defaultOptions.version], Document$1.defaultOptions);
+  const schema = new Schema.Schema(options);
+  return schema.createNode(value, wrapScalars, tag);
+}
 
-    const options = Object.assign({}, _Document.default.defaults[defaultOptions.version], defaultOptions);
-    const schema = new _schema.default(options);
-    return schema.createNode(value, wrapScalars, tag);
+class Document extends Document$1.Document {
+  constructor(options) {
+    super(Object.assign({}, Document$1.defaultOptions, options));
   }
 
-  class Document extends _Document.default {
-    constructor(options) {
-      super(Object.assign({}, defaultOptions, options));
-    }
+}
 
+function parseAllDocuments(src, options) {
+  const stream = [];
+  let prev;
+
+  for (const cstDoc of parseCst.parse(src)) {
+    const doc = new Document(options);
+    doc.parse(cstDoc, prev);
+    stream.push(doc);
+    prev = doc;
   }
 
-  function parseAllDocuments(src, options) {
-    const stream = [];
-    let prev;
+  return stream;
+}
 
-    for (const cstDoc of (0, _parse.default)(src)) {
-      const doc = new Document(options);
-      doc.parse(cstDoc, prev);
-      stream.push(doc);
-      prev = doc;
-    }
+function parseDocument(src, options) {
+  const cst = parseCst.parse(src);
+  const doc = new Document(options).parse(cst[0]);
 
-    return stream;
+  if (cst.length > 1) {
+    const errMsg = 'Source contains multiple documents; please use YAML.parseAllDocuments()';
+    doc.errors.unshift(new PlainValue.YAMLSemanticError(cst[1], errMsg));
   }
 
-  function parseDocument(src, options) {
-    const cst = (0, _parse.default)(src);
-    const doc = new Document(options).parse(cst[0]);
+  return doc;
+}
 
-    if (cst.length > 1) {
-      const errMsg = 'Source contains multiple documents; please use YAML.parseAllDocuments()';
-      doc.errors.unshift(new errors.YAMLSemanticError(cst[1], errMsg));
-    }
+function parse(src, options) {
+  const doc = parseDocument(src, options);
+  doc.warnings.forEach(warning => warnings.warn(warning));
+  if (doc.errors.length > 0) throw doc.errors[0];
+  return doc.toJSON();
+}
 
-    return doc;
-  }
+function stringify(value, options) {
+  const doc = new Document(options);
+  doc.contents = value;
+  return String(doc);
+}
 
-  function parse(src, options) {
-    const doc = parseDocument(src, options);
-    doc.warnings.forEach(warning => (0, warnings.warn)(warning));
-    if (doc.errors.length > 0) throw doc.errors[0];
-    return doc.toJSON();
-  }
+const YAML = {
+  createNode,
+  defaultOptions: Document$1.defaultOptions,
+  Document,
+  parse,
+  parseAllDocuments,
+  parseCST: parseCst.parse,
+  parseDocument,
+  scalarOptions: Document$1.scalarOptions,
+  stringify
+};
+dist.YAML = YAML;
 
-  function stringify(value, options) {
-    const doc = new Document(options);
-    doc.contents = value;
-    return String(doc);
-  }
-
-  var _default = {
-    createNode,
-    defaultOptions,
-    Document,
-    parse,
-    parseAllDocuments,
-    parseCST: _parse.default,
-    parseDocument,
-    stringify
-  };
-  exports.default = _default;
+var yaml$1 = dist.YAML;
+
+Object.defineProperty(loaders$1, "__esModule", {
+  value: true
 });
-unwrapExports(dist$1);
+loaders$1.loaders = void 0;
+/* eslint-disable @typescript-eslint/no-require-imports */
 
-var yaml = dist$1.default;
+let importFresh;
 
-var loaders_1 = createCommonjsModule(function (module, exports) {
+const loadJs = function loadJs(filepath) {
+  if (importFresh === undefined) {
+    importFresh = importFresh$1;
+  }
 
-  Object.defineProperty(exports, "__esModule", {
-    value: true
-  });
-  exports.loaders = void 0;
-  /* eslint-disable @typescript-eslint/no-require-imports */
+  const result = importFresh(filepath);
+  return result;
+};
 
-  let importFresh$1;
+let parseJson;
 
-  const loadJs = function loadJs(filepath) {
-    if (importFresh$1 === undefined) {
-      importFresh$1 = importFresh;
-    }
+const loadJson = function loadJson(filepath, content) {
+  if (parseJson === undefined) {
+    parseJson = parseJson_1;
+  }
 
-    const result = importFresh$1(filepath);
+  try {
+    const result = parseJson(content);
     return result;
-  };
-
-  let parseJson;
+  } catch (error) {
+    error.message = `JSON Error in ${filepath}:\n${error.message}`;
+    throw error;
+  }
+};
 
-  const loadJson = function loadJson(filepath, content) {
-    if (parseJson === undefined) {
-      parseJson = parseJson$1;
-    }
+let yaml;
 
-    try {
-      const result = parseJson(content);
-      return result;
-    } catch (error) {
-      error.message = `JSON Error in ${filepath}:\n${error.message}`;
-      throw error;
-    }
-  };
+const loadYaml = function loadYaml(filepath, content) {
+  if (yaml === undefined) {
+    yaml = yaml$1;
+  }
 
-  let yaml$1;
+  try {
+    const result = yaml.parse(content, {
+      prettyErrors: true
+    });
+    return result;
+  } catch (error) {
+    error.message = `YAML Error in ${filepath}:\n${error.message}`;
+    throw error;
+  }
+};
 
-  const loadYaml = function loadYaml(filepath, content) {
-    if (yaml$1 === undefined) {
-      yaml$1 = yaml;
-    }
+const loaders = {
+  loadJs,
+  loadJson,
+  loadYaml
+};
+loaders$1.loaders = loaders;
 
-    try {
-      const result = yaml$1.parse(content, {
-        prettyErrors: true
-      });
-      return result;
-    } catch (error) {
-      error.message = `YAML Error in ${filepath}:\n${error.message}`;
-      throw error;
-    }
-  };
+var getPropertyByPath$1 = {};
 
-  const loaders = {
-    loadJs,
-    loadJson,
-    loadYaml
-  };
-  exports.loaders = loaders;
+Object.defineProperty(getPropertyByPath$1, "__esModule", {
+  value: true
 });
-unwrapExports(loaders_1);
-var loaders_2 = loaders_1.loaders;
+getPropertyByPath$1.getPropertyByPath = getPropertyByPath; // Resolves property names or property paths defined with period-delimited
+// strings or arrays of strings. Property names that are found on the source
+// object are used directly (even if they include a period).
+// Nested property names that include periods, within a path, are only
+// understood in array paths.
 
-var getPropertyByPath_1 = createCommonjsModule(function (module, exports) {
+function getPropertyByPath(source, path) {
+  if (typeof path === 'string' && Object.prototype.hasOwnProperty.call(source, path)) {
+    return source[path];
+  }
 
-  Object.defineProperty(exports, "__esModule", {
-    value: true
-  });
-  exports.getPropertyByPath = getPropertyByPath; // Resolves property names or property paths defined with period-delimited
-  // strings or arrays of strings. Property names that are found on the source
-  // object are used directly (even if they include a period).
-  // Nested property names that include periods, within a path, are only
-  // understood in array paths.
+  const parsedPath = typeof path === 'string' ? path.split('.') : path; // eslint-disable-next-line @typescript-eslint/no-explicit-any
 
-  function getPropertyByPath(source, path) {
-    if (typeof path === 'string' && Object.prototype.hasOwnProperty.call(source, path)) {
-      return source[path];
+  return parsedPath.reduce((previous, key) => {
+    if (previous === undefined) {
+      return previous;
     }
 
-    const parsedPath = typeof path === 'string' ? path.split('.') : path; // eslint-disable-next-line @typescript-eslint/no-explicit-any
-
-    return parsedPath.reduce((previous, key) => {
-      if (previous === undefined) {
-        return previous;
-      }
+    return previous[key];
+  }, source);
+}
 
-      return previous[key];
-    }, source);
-  }
+Object.defineProperty(ExplorerBase$1, "__esModule", {
+  value: true
 });
-unwrapExports(getPropertyByPath_1);
-var getPropertyByPath_2 = getPropertyByPath_1.getPropertyByPath;
+ExplorerBase$1.getExtensionDescription = getExtensionDescription;
+ExplorerBase$1.ExplorerBase = void 0;
 
-var ExplorerBase_1 = createCommonjsModule(function (module, exports) {
+var _path$3 = _interopRequireDefault$5(require$$0__default["default"]);
 
-  Object.defineProperty(exports, "__esModule", {
-    value: true
-  });
-  exports.getExtensionDescription = getExtensionDescription;
-  exports.ExplorerBase = void 0;
-
-  var _path = _interopRequireDefault(path);
+var _loaders$1 = loaders$1;
+var _getPropertyByPath = getPropertyByPath$1;
 
-  function _interopRequireDefault(obj) {
-    return obj && obj.__esModule ? obj : {
-      default: obj
-    };
-  }
-
-  class ExplorerBase {
-    constructor(options) {
-      if (options.cache === true) {
-        this.loadCache = new Map();
-        this.searchCache = new Map();
-      }
+function _interopRequireDefault$5(obj) {
+  return obj && obj.__esModule ? obj : {
+    default: obj
+  };
+}
 
-      this.config = options;
-      this.validateConfig();
+class ExplorerBase {
+  constructor(options) {
+    if (options.cache === true) {
+      this.loadCache = new Map();
+      this.searchCache = new Map();
     }
 
-    clearLoadCache() {
-      if (this.loadCache) {
-        this.loadCache.clear();
-      }
-    }
+    this.config = options;
+    this.validateConfig();
+  }
 
-    clearSearchCache() {
-      if (this.searchCache) {
-        this.searchCache.clear();
-      }
+  clearLoadCache() {
+    if (this.loadCache) {
+      this.loadCache.clear();
     }
+  }
 
-    clearCaches() {
-      this.clearLoadCache();
-      this.clearSearchCache();
+  clearSearchCache() {
+    if (this.searchCache) {
+      this.searchCache.clear();
     }
+  }
 
-    validateConfig() {
-      const config = this.config;
-      config.searchPlaces.forEach(place => {
-        const loaderKey = _path.default.extname(place) || 'noExt';
-        const loader = config.loaders[loaderKey];
-
-        if (!loader) {
-          throw new Error(`No loader specified for ${getExtensionDescription(place)}, so searchPlaces item "${place}" is invalid`);
-        }
-
-        if (typeof loader !== 'function') {
-          throw new Error(`loader for ${getExtensionDescription(place)} is not a function (type provided: "${typeof loader}"), so searchPlaces item "${place}" is invalid`);
-        }
-      });
-    }
+  clearCaches() {
+    this.clearLoadCache();
+    this.clearSearchCache();
+  }
 
-    shouldSearchStopWithResult(result) {
-      if (result === null) return false;
-      if (result.isEmpty && this.config.ignoreEmptySearchPlaces) return false;
-      return true;
-    }
+  validateConfig() {
+    const config = this.config;
+    config.searchPlaces.forEach(place => {
+      const loaderKey = _path$3.default.extname(place) || 'noExt';
+      const loader = config.loaders[loaderKey];
 
-    nextDirectoryToSearch(currentDir, currentResult) {
-      if (this.shouldSearchStopWithResult(currentResult)) {
-        return null;
+      if (!loader) {
+        throw new Error(`No loader specified for ${getExtensionDescription(place)}, so searchPlaces item "${place}" is invalid`);
       }
 
-      const nextDir = nextDirUp(currentDir);
-
-      if (nextDir === currentDir || currentDir === this.config.stopDir) {
-        return null;
+      if (typeof loader !== 'function') {
+        throw new Error(`loader for ${getExtensionDescription(place)} is not a function (type provided: "${typeof loader}"), so searchPlaces item "${place}" is invalid`);
       }
+    });
+  }
+
+  shouldSearchStopWithResult(result) {
+    if (result === null) return false;
+    if (result.isEmpty && this.config.ignoreEmptySearchPlaces) return false;
+    return true;
+  }
 
-      return nextDir;
+  nextDirectoryToSearch(currentDir, currentResult) {
+    if (this.shouldSearchStopWithResult(currentResult)) {
+      return null;
     }
 
-    loadPackageProp(filepath, content) {
-      const parsedContent = loaders_1.loaders.loadJson(filepath, content);
+    const nextDir = nextDirUp(currentDir);
 
-      const packagePropValue = (0, getPropertyByPath_1.getPropertyByPath)(parsedContent, this.config.packageProp);
-      return packagePropValue || null;
+    if (nextDir === currentDir || currentDir === this.config.stopDir) {
+      return null;
     }
 
-    getLoaderEntryForFile(filepath) {
-      if (_path.default.basename(filepath) === 'package.json') {
-        const loader = this.loadPackageProp.bind(this);
-        return loader;
-      }
+    return nextDir;
+  }
 
-      const loaderKey = _path.default.extname(filepath) || 'noExt';
-      const loader = this.config.loaders[loaderKey];
+  loadPackageProp(filepath, content) {
+    const parsedContent = _loaders$1.loaders.loadJson(filepath, content);
 
-      if (!loader) {
-        throw new Error(`No loader specified for ${getExtensionDescription(filepath)}`);
-      }
+    const packagePropValue = (0, _getPropertyByPath.getPropertyByPath)(parsedContent, this.config.packageProp);
+    return packagePropValue || null;
+  }
 
+  getLoaderEntryForFile(filepath) {
+    if (_path$3.default.basename(filepath) === 'package.json') {
+      const loader = this.loadPackageProp.bind(this);
       return loader;
     }
 
-    loadedContentToCosmiconfigResult(filepath, loadedContent) {
-      if (loadedContent === null) {
-        return null;
-      }
+    const loaderKey = _path$3.default.extname(filepath) || 'noExt';
+    const loader = this.config.loaders[loaderKey];
 
-      if (loadedContent === undefined) {
-        return {
-          filepath,
-          config: undefined,
-          isEmpty: true
-        };
-      }
+    if (!loader) {
+      throw new Error(`No loader specified for ${getExtensionDescription(filepath)}`);
+    }
 
-      return {
-        config: loadedContent,
-        filepath
-      };
+    return loader;
+  }
+
+  loadedContentToCosmiconfigResult(filepath, loadedContent) {
+    if (loadedContent === null) {
+      return null;
     }
 
-    validateFilePath(filepath) {
-      if (!filepath) {
-        throw new Error('load must pass a non-empty string');
-      }
+    if (loadedContent === undefined) {
+      return {
+        filepath,
+        config: undefined,
+        isEmpty: true
+      };
     }
 
+    return {
+      config: loadedContent,
+      filepath
+    };
   }
 
-  exports.ExplorerBase = ExplorerBase;
-
-  function nextDirUp(dir) {
-    return _path.default.dirname(dir);
+  validateFilePath(filepath) {
+    if (!filepath) {
+      throw new Error('load must pass a non-empty string');
+    }
   }
 
-  function getExtensionDescription(filepath) {
-    const ext = _path.default.extname(filepath);
+}
 
-    return ext ? `extension "${ext}"` : 'files without extensions';
-  }
-});
-unwrapExports(ExplorerBase_1);
-var ExplorerBase_2 = ExplorerBase_1.getExtensionDescription;
-var ExplorerBase_3 = ExplorerBase_1.ExplorerBase;
+ExplorerBase$1.ExplorerBase = ExplorerBase;
 
-var readFile_1 = createCommonjsModule(function (module, exports) {
+function nextDirUp(dir) {
+  return _path$3.default.dirname(dir);
+}
 
-  Object.defineProperty(exports, "__esModule", {
-    value: true
-  });
-  exports.readFile = readFile;
-  exports.readFileSync = readFileSync;
+function getExtensionDescription(filepath) {
+  const ext = _path$3.default.extname(filepath);
 
-  var _fs = _interopRequireDefault(fs);
+  return ext ? `extension "${ext}"` : 'files without extensions';
+}
 
-  function _interopRequireDefault(obj) {
-    return obj && obj.__esModule ? obj : {
-      default: obj
-    };
-  }
+var readFile$1 = {};
 
-  async function fsReadFileAsync(pathname, encoding) {
-    return new Promise((resolve, reject) => {
-      _fs.default.readFile(pathname, encoding, (error, contents) => {
-        if (error) {
-          reject(error);
-          return;
-        }
+Object.defineProperty(readFile$1, "__esModule", {
+  value: true
+});
+readFile$1.readFile = readFile;
+readFile$1.readFileSync = readFileSync;
 
-        resolve(contents);
-      });
-    });
-  }
+var _fs = _interopRequireDefault$4(require$$1__default["default"]);
 
-  async function readFile(filepath, options = {}) {
-    const throwNotFound = options.throwNotFound === true;
+function _interopRequireDefault$4(obj) {
+  return obj && obj.__esModule ? obj : {
+    default: obj
+  };
+}
 
-    try {
-      const content = await fsReadFileAsync(filepath, 'utf8');
-      return content;
-    } catch (error) {
-      if (throwNotFound === false && error.code === 'ENOENT') {
-        return null;
+async function fsReadFileAsync(pathname, encoding) {
+  return new Promise((resolve, reject) => {
+    _fs.default.readFile(pathname, encoding, (error, contents) => {
+      if (error) {
+        reject(error);
+        return;
       }
 
-      throw error;
+      resolve(contents);
+    });
+  });
+}
+
+async function readFile(filepath, options = {}) {
+  const throwNotFound = options.throwNotFound === true;
+
+  try {
+    const content = await fsReadFileAsync(filepath, 'utf8');
+    return content;
+  } catch (error) {
+    if (throwNotFound === false && (error.code === 'ENOENT' || error.code === 'EISDIR')) {
+      return null;
     }
-  }
 
-  function readFileSync(filepath, options = {}) {
-    const throwNotFound = options.throwNotFound === true;
+    throw error;
+  }
+}
 
-    try {
-      const content = _fs.default.readFileSync(filepath, 'utf8');
+function readFileSync(filepath, options = {}) {
+  const throwNotFound = options.throwNotFound === true;
 
-      return content;
-    } catch (error) {
-      if (throwNotFound === false && error.code === 'ENOENT') {
-        return null;
-      }
+  try {
+    const content = _fs.default.readFileSync(filepath, 'utf8');
 
-      throw error;
+    return content;
+  } catch (error) {
+    if (throwNotFound === false && (error.code === 'ENOENT' || error.code === 'EISDIR')) {
+      return null;
     }
+
+    throw error;
   }
+}
+
+var cacheWrapper$1 = {};
+
+Object.defineProperty(cacheWrapper$1, "__esModule", {
+  value: true
 });
-unwrapExports(readFile_1);
-var readFile_2 = readFile_1.readFile;
-var readFile_3 = readFile_1.readFileSync;
+cacheWrapper$1.cacheWrapper = cacheWrapper;
+cacheWrapper$1.cacheWrapperSync = cacheWrapperSync;
 
-var cacheWrapper_1 = createCommonjsModule(function (module, exports) {
+async function cacheWrapper(cache, key, fn) {
+  const cached = cache.get(key);
 
-  Object.defineProperty(exports, "__esModule", {
-    value: true
-  });
-  exports.cacheWrapper = cacheWrapper;
-  exports.cacheWrapperSync = cacheWrapperSync;
+  if (cached !== undefined) {
+    return cached;
+  }
 
-  async function cacheWrapper(cache, key, fn) {
-    const cached = cache.get(key);
+  const result = await fn();
+  cache.set(key, result);
+  return result;
+}
 
-    if (cached !== undefined) {
-      return cached;
-    }
+function cacheWrapperSync(cache, key, fn) {
+  const cached = cache.get(key);
 
-    const result = await fn();
-    cache.set(key, result);
-    return result;
+  if (cached !== undefined) {
+    return cached;
   }
 
-  function cacheWrapperSync(cache, key, fn) {
-    const cached = cache.get(key);
+  const result = fn();
+  cache.set(key, result);
+  return result;
+}
 
-    if (cached !== undefined) {
-      return cached;
-    }
+var getDirectory$1 = {};
 
-    const result = fn();
-    cache.set(key, result);
-    return result;
-  }
-});
-unwrapExports(cacheWrapper_1);
-var cacheWrapper_2 = cacheWrapper_1.cacheWrapper;
-var cacheWrapper_3 = cacheWrapper_1.cacheWrapperSync;
+var pathType = {};
 
 const {
   promisify
-} = util;
+} = require$$0__default$1["default"];
+const fs = require$$1__default["default"];
 
 async function isType(fsStatType, statsMethodName, filePath) {
   if (typeof filePath !== 'string') {
@@ -11355,419 +10942,380 @@ function isTypeSync(fsStatType, statsMethodName, filePath) {
   }
 }
 
-var isFile = isType.bind(null, 'stat', 'isFile');
-var isDirectory = isType.bind(null, 'stat', 'isDirectory');
-var isSymlink = isType.bind(null, 'lstat', 'isSymbolicLink');
-var isFileSync = isTypeSync.bind(null, 'statSync', 'isFile');
-var isDirectorySync = isTypeSync.bind(null, 'statSync', 'isDirectory');
-var isSymlinkSync = isTypeSync.bind(null, 'lstatSync', 'isSymbolicLink');
-var pathType = {
-  isFile: isFile,
-  isDirectory: isDirectory,
-  isSymlink: isSymlink,
-  isFileSync: isFileSync,
-  isDirectorySync: isDirectorySync,
-  isSymlinkSync: isSymlinkSync
-};
-
-var getDirectory_1 = createCommonjsModule(function (module, exports) {
+pathType.isFile = isType.bind(null, 'stat', 'isFile');
+pathType.isDirectory = isType.bind(null, 'stat', 'isDirectory');
+pathType.isSymlink = isType.bind(null, 'lstat', 'isSymbolicLink');
+pathType.isFileSync = isTypeSync.bind(null, 'statSync', 'isFile');
+pathType.isDirectorySync = isTypeSync.bind(null, 'statSync', 'isDirectory');
+pathType.isSymlinkSync = isTypeSync.bind(null, 'lstatSync', 'isSymbolicLink');
 
-  Object.defineProperty(exports, "__esModule", {
-    value: true
-  });
-  exports.getDirectory = getDirectory;
-  exports.getDirectorySync = getDirectorySync;
-
-  var _path = _interopRequireDefault(path);
-
-  function _interopRequireDefault(obj) {
-    return obj && obj.__esModule ? obj : {
-      default: obj
-    };
-  }
-
-  async function getDirectory(filepath) {
-    const filePathIsDirectory = await (0, pathType.isDirectory)(filepath);
-
-    if (filePathIsDirectory === true) {
-      return filepath;
-    }
-
-    const directory = _path.default.dirname(filepath);
+Object.defineProperty(getDirectory$1, "__esModule", {
+  value: true
+});
+getDirectory$1.getDirectory = getDirectory;
+getDirectory$1.getDirectorySync = getDirectorySync;
 
-    return directory;
-  }
+var _path$2 = _interopRequireDefault$3(require$$0__default["default"]);
 
-  function getDirectorySync(filepath) {
-    const filePathIsDirectory = (0, pathType.isDirectorySync)(filepath);
+var _pathType = pathType;
 
-    if (filePathIsDirectory === true) {
-      return filepath;
-    }
+function _interopRequireDefault$3(obj) {
+  return obj && obj.__esModule ? obj : {
+    default: obj
+  };
+}
 
-    const directory = _path.default.dirname(filepath);
+async function getDirectory(filepath) {
+  const filePathIsDirectory = await (0, _pathType.isDirectory)(filepath);
 
-    return directory;
+  if (filePathIsDirectory === true) {
+    return filepath;
   }
-});
-unwrapExports(getDirectory_1);
-var getDirectory_2 = getDirectory_1.getDirectory;
-var getDirectory_3 = getDirectory_1.getDirectorySync;
 
-var Explorer_1 = createCommonjsModule(function (module, exports) {
+  const directory = _path$2.default.dirname(filepath);
 
-  Object.defineProperty(exports, "__esModule", {
-    value: true
-  });
-  exports.Explorer = void 0;
+  return directory;
+}
 
-  var _path = _interopRequireDefault(path);
+function getDirectorySync(filepath) {
+  const filePathIsDirectory = (0, _pathType.isDirectorySync)(filepath);
 
-  function _interopRequireDefault(obj) {
-    return obj && obj.__esModule ? obj : {
-      default: obj
-    };
+  if (filePathIsDirectory === true) {
+    return filepath;
   }
 
-  function _asyncIterator(iterable) {
-    var method;
+  const directory = _path$2.default.dirname(filepath);
 
-    if (typeof Symbol !== "undefined") {
-      if (Symbol.asyncIterator) {
-        method = iterable[Symbol.asyncIterator];
-        if (method != null) return method.call(iterable);
-      }
+  return directory;
+}
 
-      if (Symbol.iterator) {
-        method = iterable[Symbol.iterator];
-        if (method != null) return method.call(iterable);
-      }
-    }
+Object.defineProperty(Explorer$1, "__esModule", {
+  value: true
+});
+Explorer$1.Explorer = void 0;
 
-    throw new TypeError("Object is not async iterable");
-  }
+var _path$1 = _interopRequireDefault$2(require$$0__default["default"]);
 
-  class Explorer extends ExplorerBase_1.ExplorerBase {
-    constructor(options) {
-      super(options);
-    }
+var _ExplorerBase$1 = ExplorerBase$1;
+var _readFile$1 = readFile$1;
+var _cacheWrapper$1 = cacheWrapper$1;
+var _getDirectory$1 = getDirectory$1;
 
-    async search(searchFrom = process.cwd()) {
-      const startDirectory = await (0, getDirectory_1.getDirectory)(searchFrom);
-      const result = await this.searchFromDirectory(startDirectory);
-      return result;
-    }
+function _interopRequireDefault$2(obj) {
+  return obj && obj.__esModule ? obj : {
+    default: obj
+  };
+}
 
-    async searchFromDirectory(dir) {
-      const absoluteDir = _path.default.resolve(process.cwd(), dir);
+class Explorer extends _ExplorerBase$1.ExplorerBase {
+  constructor(options) {
+    super(options);
+  }
 
-      const run = async () => {
-        const result = await this.searchDirectory(absoluteDir);
-        const nextDir = this.nextDirectoryToSearch(absoluteDir, result);
+  async search(searchFrom = process.cwd()) {
+    const startDirectory = await (0, _getDirectory$1.getDirectory)(searchFrom);
+    const result = await this.searchFromDirectory(startDirectory);
+    return result;
+  }
 
-        if (nextDir) {
-          return this.searchFromDirectory(nextDir);
-        }
+  async searchFromDirectory(dir) {
+    const absoluteDir = _path$1.default.resolve(process.cwd(), dir);
 
-        const transformResult = await this.config.transform(result);
-        return transformResult;
-      };
+    const run = async () => {
+      const result = await this.searchDirectory(absoluteDir);
+      const nextDir = this.nextDirectoryToSearch(absoluteDir, result);
 
-      if (this.searchCache) {
-        return (0, cacheWrapper_1.cacheWrapper)(this.searchCache, absoluteDir, run);
+      if (nextDir) {
+        return this.searchFromDirectory(nextDir);
       }
 
-      return run();
-    }
-
-    async searchDirectory(dir) {
-      var _iteratorNormalCompletion = true;
-      var _didIteratorError = false;
+      const transformResult = await this.config.transform(result);
+      return transformResult;
+    };
 
-      var _iteratorError;
+    if (this.searchCache) {
+      return (0, _cacheWrapper$1.cacheWrapper)(this.searchCache, absoluteDir, run);
+    }
 
-      try {
-        for (var _iterator = _asyncIterator(this.config.searchPlaces), _step, _value; _step = await _iterator.next(), _iteratorNormalCompletion = _step.done, _value = await _step.value, !_iteratorNormalCompletion; _iteratorNormalCompletion = true) {
-          const place = _value;
-          const placeResult = await this.loadSearchPlace(dir, place);
+    return run();
+  }
 
-          if (this.shouldSearchStopWithResult(placeResult) === true) {
-            return placeResult;
-          }
-        } // config not found
+  async searchDirectory(dir) {
+    for await (const place of this.config.searchPlaces) {
+      const placeResult = await this.loadSearchPlace(dir, place);
 
-      } catch (err) {
-        _didIteratorError = true;
-        _iteratorError = err;
-      } finally {
-        try {
-          if (!_iteratorNormalCompletion && _iterator.return != null) {
-            await _iterator.return();
-          }
-        } finally {
-          if (_didIteratorError) {
-            throw _iteratorError;
-          }
-        }
+      if (this.shouldSearchStopWithResult(placeResult) === true) {
+        return placeResult;
       }
+    } // config not found
 
-      return null;
-    }
 
-    async loadSearchPlace(dir, place) {
-      const filepath = _path.default.join(dir, place);
-
-      const fileContents = await (0, readFile_1.readFile)(filepath);
-      const result = await this.createCosmiconfigResult(filepath, fileContents);
-      return result;
-    }
+    return null;
+  }
 
-    async loadFileContent(filepath, content) {
-      if (content === null) {
-        return null;
-      }
+  async loadSearchPlace(dir, place) {
+    const filepath = _path$1.default.join(dir, place);
 
-      if (content.trim() === '') {
-        return undefined;
-      }
+    const fileContents = await (0, _readFile$1.readFile)(filepath);
+    const result = await this.createCosmiconfigResult(filepath, fileContents);
+    return result;
+  }
 
-      const loader = this.getLoaderEntryForFile(filepath);
-      const loaderResult = await loader(filepath, content);
-      return loaderResult;
+  async loadFileContent(filepath, content) {
+    if (content === null) {
+      return null;
     }
 
-    async createCosmiconfigResult(filepath, content) {
-      const fileContent = await this.loadFileContent(filepath, content);
-      const result = this.loadedContentToCosmiconfigResult(filepath, fileContent);
-      return result;
+    if (content.trim() === '') {
+      return undefined;
     }
 
-    async load(filepath) {
-      this.validateFilePath(filepath);
+    const loader = this.getLoaderEntryForFile(filepath);
+    const loaderResult = await loader(filepath, content);
+    return loaderResult;
+  }
 
-      const absoluteFilePath = _path.default.resolve(process.cwd(), filepath);
+  async createCosmiconfigResult(filepath, content) {
+    const fileContent = await this.loadFileContent(filepath, content);
+    const result = this.loadedContentToCosmiconfigResult(filepath, fileContent);
+    return result;
+  }
 
-      const runLoad = async () => {
-        const fileContents = await (0, readFile_1.readFile)(absoluteFilePath, {
-          throwNotFound: true
-        });
-        const result = await this.createCosmiconfigResult(absoluteFilePath, fileContents);
-        const transformResult = await this.config.transform(result);
-        return transformResult;
-      };
+  async load(filepath) {
+    this.validateFilePath(filepath);
 
-      if (this.loadCache) {
-        return (0, cacheWrapper_1.cacheWrapper)(this.loadCache, absoluteFilePath, runLoad);
-      }
+    const absoluteFilePath = _path$1.default.resolve(process.cwd(), filepath);
+
+    const runLoad = async () => {
+      const fileContents = await (0, _readFile$1.readFile)(absoluteFilePath, {
+        throwNotFound: true
+      });
+      const result = await this.createCosmiconfigResult(absoluteFilePath, fileContents);
+      const transformResult = await this.config.transform(result);
+      return transformResult;
+    };
 
-      return runLoad();
+    if (this.loadCache) {
+      return (0, _cacheWrapper$1.cacheWrapper)(this.loadCache, absoluteFilePath, runLoad);
     }
 
+    return runLoad();
   }
 
-  exports.Explorer = Explorer;
-});
-unwrapExports(Explorer_1);
-var Explorer_2 = Explorer_1.Explorer;
+}
 
-var ExplorerSync_1 = createCommonjsModule(function (module, exports) {
+Explorer$1.Explorer = Explorer;
 
-  Object.defineProperty(exports, "__esModule", {
-    value: true
-  });
-  exports.ExplorerSync = void 0;
+var ExplorerSync$1 = {};
 
-  var _path = _interopRequireDefault(path);
+Object.defineProperty(ExplorerSync$1, "__esModule", {
+  value: true
+});
+ExplorerSync$1.ExplorerSync = void 0;
 
-  function _interopRequireDefault(obj) {
-    return obj && obj.__esModule ? obj : {
-      default: obj
-    };
-  }
+var _path = _interopRequireDefault$1(require$$0__default["default"]);
 
-  class ExplorerSync extends ExplorerBase_1.ExplorerBase {
-    constructor(options) {
-      super(options);
-    }
+var _ExplorerBase = ExplorerBase$1;
+var _readFile = readFile$1;
+var _cacheWrapper = cacheWrapper$1;
+var _getDirectory = getDirectory$1;
 
-    searchSync(searchFrom = process.cwd()) {
-      const startDirectory = (0, getDirectory_1.getDirectorySync)(searchFrom);
-      const result = this.searchFromDirectorySync(startDirectory);
-      return result;
-    }
+function _interopRequireDefault$1(obj) {
+  return obj && obj.__esModule ? obj : {
+    default: obj
+  };
+}
 
-    searchFromDirectorySync(dir) {
-      const absoluteDir = _path.default.resolve(process.cwd(), dir);
+class ExplorerSync extends _ExplorerBase.ExplorerBase {
+  constructor(options) {
+    super(options);
+  }
 
-      const run = () => {
-        const result = this.searchDirectorySync(absoluteDir);
-        const nextDir = this.nextDirectoryToSearch(absoluteDir, result);
+  searchSync(searchFrom = process.cwd()) {
+    const startDirectory = (0, _getDirectory.getDirectorySync)(searchFrom);
+    const result = this.searchFromDirectorySync(startDirectory);
+    return result;
+  }
 
-        if (nextDir) {
-          return this.searchFromDirectorySync(nextDir);
-        }
+  searchFromDirectorySync(dir) {
+    const absoluteDir = _path.default.resolve(process.cwd(), dir);
 
-        const transformResult = this.config.transform(result);
-        return transformResult;
-      };
+    const run = () => {
+      const result = this.searchDirectorySync(absoluteDir);
+      const nextDir = this.nextDirectoryToSearch(absoluteDir, result);
 
-      if (this.searchCache) {
-        return (0, cacheWrapper_1.cacheWrapperSync)(this.searchCache, absoluteDir, run);
+      if (nextDir) {
+        return this.searchFromDirectorySync(nextDir);
       }
 
-      return run();
-    }
+      const transformResult = this.config.transform(result);
+      return transformResult;
+    };
 
-    searchDirectorySync(dir) {
-      for (const place of this.config.searchPlaces) {
-        const placeResult = this.loadSearchPlaceSync(dir, place);
+    if (this.searchCache) {
+      return (0, _cacheWrapper.cacheWrapperSync)(this.searchCache, absoluteDir, run);
+    }
 
-        if (this.shouldSearchStopWithResult(placeResult) === true) {
-          return placeResult;
-        }
-      } // config not found
+    return run();
+  }
 
+  searchDirectorySync(dir) {
+    for (const place of this.config.searchPlaces) {
+      const placeResult = this.loadSearchPlaceSync(dir, place);
 
-      return null;
-    }
+      if (this.shouldSearchStopWithResult(placeResult) === true) {
+        return placeResult;
+      }
+    } // config not found
 
-    loadSearchPlaceSync(dir, place) {
-      const filepath = _path.default.join(dir, place);
 
-      const content = (0, readFile_1.readFileSync)(filepath);
-      const result = this.createCosmiconfigResultSync(filepath, content);
-      return result;
-    }
+    return null;
+  }
 
-    loadFileContentSync(filepath, content) {
-      if (content === null) {
-        return null;
-      }
+  loadSearchPlaceSync(dir, place) {
+    const filepath = _path.default.join(dir, place);
 
-      if (content.trim() === '') {
-        return undefined;
-      }
+    const content = (0, _readFile.readFileSync)(filepath);
+    const result = this.createCosmiconfigResultSync(filepath, content);
+    return result;
+  }
 
-      const loader = this.getLoaderEntryForFile(filepath);
-      const loaderResult = loader(filepath, content);
-      return loaderResult;
+  loadFileContentSync(filepath, content) {
+    if (content === null) {
+      return null;
     }
 
-    createCosmiconfigResultSync(filepath, content) {
-      const fileContent = this.loadFileContentSync(filepath, content);
-      const result = this.loadedContentToCosmiconfigResult(filepath, fileContent);
-      return result;
+    if (content.trim() === '') {
+      return undefined;
     }
 
-    loadSync(filepath) {
-      this.validateFilePath(filepath);
+    const loader = this.getLoaderEntryForFile(filepath);
+    const loaderResult = loader(filepath, content);
+    return loaderResult;
+  }
+
+  createCosmiconfigResultSync(filepath, content) {
+    const fileContent = this.loadFileContentSync(filepath, content);
+    const result = this.loadedContentToCosmiconfigResult(filepath, fileContent);
+    return result;
+  }
 
-      const absoluteFilePath = _path.default.resolve(process.cwd(), filepath);
+  loadSync(filepath) {
+    this.validateFilePath(filepath);
 
-      const runLoadSync = () => {
-        const content = (0, readFile_1.readFileSync)(absoluteFilePath, {
-          throwNotFound: true
-        });
-        const cosmiconfigResult = this.createCosmiconfigResultSync(absoluteFilePath, content);
-        const transformResult = this.config.transform(cosmiconfigResult);
-        return transformResult;
-      };
+    const absoluteFilePath = _path.default.resolve(process.cwd(), filepath);
 
-      if (this.loadCache) {
-        return (0, cacheWrapper_1.cacheWrapperSync)(this.loadCache, absoluteFilePath, runLoadSync);
-      }
+    const runLoadSync = () => {
+      const content = (0, _readFile.readFileSync)(absoluteFilePath, {
+        throwNotFound: true
+      });
+      const cosmiconfigResult = this.createCosmiconfigResultSync(absoluteFilePath, content);
+      const transformResult = this.config.transform(cosmiconfigResult);
+      return transformResult;
+    };
 
-      return runLoadSync();
+    if (this.loadCache) {
+      return (0, _cacheWrapper.cacheWrapperSync)(this.loadCache, absoluteFilePath, runLoadSync);
     }
 
+    return runLoadSync();
   }
 
-  exports.ExplorerSync = ExplorerSync;
-});
-unwrapExports(ExplorerSync_1);
-var ExplorerSync_2 = ExplorerSync_1.ExplorerSync;
+}
 
-var dist$2 = createCommonjsModule(function (module, exports) {
+ExplorerSync$1.ExplorerSync = ExplorerSync;
 
-  Object.defineProperty(exports, "__esModule", {
-    value: true
-  });
-  exports.cosmiconfig = cosmiconfig;
-  exports.cosmiconfigSync = cosmiconfigSync;
-  exports.defaultLoaders = void 0;
+var types = {};
 
-  var _os = _interopRequireDefault(os);
+Object.defineProperty(types, "__esModule", {
+  value: true
+});
 
-  function _interopRequireDefault(obj) {
-    return obj && obj.__esModule ? obj : {
-      default: obj
-    };
-  } // eslint-disable-next-line @typescript-eslint/explicit-function-return-type
+Object.defineProperty(dist$2, "__esModule", {
+  value: true
+});
+dist$2.cosmiconfig = cosmiconfig;
+dist$2.cosmiconfigSync = cosmiconfigSync;
+dist$2.defaultLoaders = void 0;
 
+var _os = _interopRequireDefault(require$$0__default$2["default"]);
 
-  function cosmiconfig(moduleName, options = {}) {
-    const normalizedOptions = normalizeOptions(moduleName, options);
-    const explorer = new Explorer_1.Explorer(normalizedOptions);
-    return {
-      search: explorer.search.bind(explorer),
-      load: explorer.load.bind(explorer),
-      clearLoadCache: explorer.clearLoadCache.bind(explorer),
-      clearSearchCache: explorer.clearSearchCache.bind(explorer),
-      clearCaches: explorer.clearCaches.bind(explorer)
-    };
-  } // eslint-disable-next-line @typescript-eslint/explicit-function-return-type
+var _Explorer = Explorer$1;
+var _ExplorerSync = ExplorerSync$1;
+var _loaders = loaders$1;
 
+function _interopRequireDefault(obj) {
+  return obj && obj.__esModule ? obj : {
+    default: obj
+  };
+}
+/* eslint-disable @typescript-eslint/explicit-module-boundary-types */
+// eslint-disable-next-line @typescript-eslint/explicit-function-return-type
 
-  function cosmiconfigSync(moduleName, options = {}) {
-    const normalizedOptions = normalizeOptions(moduleName, options);
-    const explorerSync = new ExplorerSync_1.ExplorerSync(normalizedOptions);
-    return {
-      search: explorerSync.searchSync.bind(explorerSync),
-      load: explorerSync.loadSync.bind(explorerSync),
-      clearLoadCache: explorerSync.clearLoadCache.bind(explorerSync),
-      clearSearchCache: explorerSync.clearSearchCache.bind(explorerSync),
-      clearCaches: explorerSync.clearCaches.bind(explorerSync)
-    };
-  } // do not allow mutation of default loaders. Make sure it is set inside options
 
+function cosmiconfig(moduleName, options = {}) {
+  const normalizedOptions = normalizeOptions(moduleName, options);
+  const explorer = new _Explorer.Explorer(normalizedOptions);
+  return {
+    search: explorer.search.bind(explorer),
+    load: explorer.load.bind(explorer),
+    clearLoadCache: explorer.clearLoadCache.bind(explorer),
+    clearSearchCache: explorer.clearSearchCache.bind(explorer),
+    clearCaches: explorer.clearCaches.bind(explorer)
+  };
+} // eslint-disable-next-line @typescript-eslint/explicit-function-return-type
 
-  const defaultLoaders = Object.freeze({
-    '.js': loaders_1.loaders.loadJs,
-    '.json': loaders_1.loaders.loadJson,
-    '.yaml': loaders_1.loaders.loadYaml,
-    '.yml': loaders_1.loaders.loadYaml,
-    noExt: loaders_1.loaders.loadYaml
-  });
-  exports.defaultLoaders = defaultLoaders;
-
-  function normalizeOptions(moduleName, options) {
-    const defaults = {
-      packageProp: moduleName,
-      searchPlaces: ['package.json', `.${moduleName}rc`, `.${moduleName}rc.json`, `.${moduleName}rc.yaml`, `.${moduleName}rc.yml`, `.${moduleName}rc.js`, `${moduleName}.config.js`],
-      ignoreEmptySearchPlaces: true,
-      stopDir: _os.default.homedir(),
-      cache: true,
-      transform: identity,
-      loaders: defaultLoaders
-    };
-    const normalizedOptions = Object.assign({}, defaults, {}, options, {
-      loaders: Object.assign({}, defaults.loaders, {}, options.loaders)
-    });
-    return normalizedOptions;
-  }
 
-  const identity = function identity(x) {
-    return x;
+function cosmiconfigSync(moduleName, options = {}) {
+  const normalizedOptions = normalizeOptions(moduleName, options);
+  const explorerSync = new _ExplorerSync.ExplorerSync(normalizedOptions);
+  return {
+    search: explorerSync.searchSync.bind(explorerSync),
+    load: explorerSync.loadSync.bind(explorerSync),
+    clearLoadCache: explorerSync.clearLoadCache.bind(explorerSync),
+    clearSearchCache: explorerSync.clearSearchCache.bind(explorerSync),
+    clearCaches: explorerSync.clearCaches.bind(explorerSync)
   };
+} // do not allow mutation of default loaders. Make sure it is set inside options
+
+
+const defaultLoaders = Object.freeze({
+  '.cjs': _loaders.loaders.loadJs,
+  '.js': _loaders.loaders.loadJs,
+  '.json': _loaders.loaders.loadJson,
+  '.yaml': _loaders.loaders.loadYaml,
+  '.yml': _loaders.loaders.loadYaml,
+  noExt: _loaders.loaders.loadYaml
 });
-unwrapExports(dist$2);
-var dist_1 = dist$2.cosmiconfig;
-var dist_2 = dist$2.cosmiconfigSync;
-var dist_3 = dist$2.defaultLoaders;
+dist$2.defaultLoaders = defaultLoaders;
+
+const identity = function identity(x) {
+  return x;
+};
+
+function normalizeOptions(moduleName, options) {
+  const defaults = {
+    packageProp: moduleName,
+    searchPlaces: ['package.json', `.${moduleName}rc`, `.${moduleName}rc.json`, `.${moduleName}rc.yaml`, `.${moduleName}rc.yml`, `.${moduleName}rc.js`, `.${moduleName}rc.cjs`, `${moduleName}.config.js`, `${moduleName}.config.cjs`],
+    ignoreEmptySearchPlaces: true,
+    stopDir: _os.default.homedir(),
+    cache: true,
+    transform: identity,
+    loaders: defaultLoaders
+  };
+  const normalizedOptions = Object.assign(Object.assign(Object.assign({}, defaults), options), {}, {
+    loaders: Object.assign(Object.assign({}, defaults.loaders), options.loaders)
+  });
+  return normalizedOptions;
+}
+
+var findParentDir = {exports: {}};
 
-var findParentDir = createCommonjsModule(function (module, exports) {
+(function (module, exports) {
 
-  var exists = fs.exists || path.exists,
+  var path = require$$0__default["default"],
+      fs = require$$1__default["default"],
+      exists = fs.exists || path.exists,
       existsSync = fs.existsSync || path.existsSync;
 
   function splitPath(path) {
@@ -11800,377 +11348,49 @@ var findParentDir = createCommonjsModule(function (module, exports) {
 
     return testDir(splitPath(currentFullPath));
   };
-});
-var findParentDir_1 = findParentDir.sync;
-
-// Returns a wrapper function that returns a wrapped callback
-// The wrapper function should do some stuff, and return a
-// presumably different callback function.
-// This makes sure that own properties are retained, so that
-// decorations and such are not lost along the way.
-var wrappy_1 = wrappy;
-
-function wrappy(fn, cb) {
-  if (fn && cb) return wrappy(fn)(cb);
-  if (typeof fn !== 'function') throw new TypeError('need wrapper function');
-  Object.keys(fn).forEach(function (k) {
-    wrapper[k] = fn[k];
-  });
-  return wrapper;
-
-  function wrapper() {
-    var args = new Array(arguments.length);
-
-    for (var i = 0; i < args.length; i++) {
-      args[i] = arguments[i];
-    }
-
-    var ret = fn.apply(this, args);
-    var cb = args[args.length - 1];
-
-    if (typeof ret === 'function' && ret !== cb) {
-      Object.keys(cb).forEach(function (k) {
-        ret[k] = cb[k];
-      });
-    }
-
-    return ret;
-  }
-}
-
-var once_1 = wrappy_1(once);
-var strict = wrappy_1(onceStrict);
-once.proto = once(function () {
-  Object.defineProperty(Function.prototype, 'once', {
-    value: function () {
-      return once(this);
-    },
-    configurable: true
-  });
-  Object.defineProperty(Function.prototype, 'onceStrict', {
-    value: function () {
-      return onceStrict(this);
-    },
-    configurable: true
-  });
-});
-
-function once(fn) {
-  var f = function () {
-    if (f.called) return f.value;
-    f.called = true;
-    return f.value = fn.apply(this, arguments);
-  };
-
-  f.called = false;
-  return f;
-}
-
-function onceStrict(fn) {
-  var f = function () {
-    if (f.called) throw new Error(f.onceError);
-    f.called = true;
-    return f.value = fn.apply(this, arguments);
-  };
-
-  var name = fn.name || 'Function wrapped with `once`';
-  f.onceError = name + " shouldn't be called more than once";
-  f.called = false;
-  return f;
-}
-once_1.strict = strict;
-
-var noop = function () {};
-
-var isRequest = function (stream) {
-  return stream.setHeader && typeof stream.abort === 'function';
-};
-
-var isChildProcess = function (stream) {
-  return stream.stdio && Array.isArray(stream.stdio) && stream.stdio.length === 3;
-};
-
-var eos = function (stream, opts, callback) {
-  if (typeof opts === 'function') return eos(stream, null, opts);
-  if (!opts) opts = {};
-  callback = once_1(callback || noop);
-  var ws = stream._writableState;
-  var rs = stream._readableState;
-  var readable = opts.readable || opts.readable !== false && stream.readable;
-  var writable = opts.writable || opts.writable !== false && stream.writable;
-  var cancelled = false;
-
-  var onlegacyfinish = function () {
-    if (!stream.writable) onfinish();
-  };
-
-  var onfinish = function () {
-    writable = false;
-    if (!readable) callback.call(stream);
-  };
-
-  var onend = function () {
-    readable = false;
-    if (!writable) callback.call(stream);
-  };
-
-  var onexit = function (exitCode) {
-    callback.call(stream, exitCode ? new Error('exited with error code: ' + exitCode) : null);
-  };
-
-  var onerror = function (err) {
-    callback.call(stream, err);
-  };
-
-  var onclose = function () {
-    process.nextTick(onclosenexttick);
-  };
-
-  var onclosenexttick = function () {
-    if (cancelled) return;
-    if (readable && !(rs && rs.ended && !rs.destroyed)) return callback.call(stream, new Error('premature close'));
-    if (writable && !(ws && ws.ended && !ws.destroyed)) return callback.call(stream, new Error('premature close'));
-  };
-
-  var onrequest = function () {
-    stream.req.on('finish', onfinish);
-  };
-
-  if (isRequest(stream)) {
-    stream.on('complete', onfinish);
-    stream.on('abort', onclose);
-    if (stream.req) onrequest();else stream.on('request', onrequest);
-  } else if (writable && !ws) {
-    // legacy streams
-    stream.on('end', onlegacyfinish);
-    stream.on('close', onlegacyfinish);
-  }
-
-  if (isChildProcess(stream)) stream.on('exit', onexit);
-  stream.on('end', onend);
-  stream.on('finish', onfinish);
-  if (opts.error !== false) stream.on('error', onerror);
-  stream.on('close', onclose);
-  return function () {
-    cancelled = true;
-    stream.removeListener('complete', onfinish);
-    stream.removeListener('abort', onclose);
-    stream.removeListener('request', onrequest);
-    if (stream.req) stream.req.removeListener('finish', onfinish);
-    stream.removeListener('end', onlegacyfinish);
-    stream.removeListener('close', onlegacyfinish);
-    stream.removeListener('finish', onfinish);
-    stream.removeListener('exit', onexit);
-    stream.removeListener('end', onend);
-    stream.removeListener('error', onerror);
-    stream.removeListener('close', onclose);
-  };
-};
-
-var endOfStream = eos;
-
-var noop$1 = function () {};
-
-var ancient = /^v?\.0/.test(process.version);
-
-var isFn = function (fn) {
-  return typeof fn === 'function';
-};
-
-var isFS = function (stream) {
-  if (!ancient) return false; // newer node version do not need to care about fs is a special way
-
-  if (!fs) return false; // browser
-
-  return (stream instanceof (fs.ReadStream || noop$1) || stream instanceof (fs.WriteStream || noop$1)) && isFn(stream.close);
-};
-
-var isRequest$1 = function (stream) {
-  return stream.setHeader && isFn(stream.abort);
-};
-
-var destroyer = function (stream, reading, writing, callback) {
-  callback = once_1(callback);
-  var closed = false;
-  stream.on('close', function () {
-    closed = true;
-  });
-  endOfStream(stream, {
-    readable: reading,
-    writable: writing
-  }, function (err) {
-    if (err) return callback(err);
-    closed = true;
-    callback();
-  });
-  var destroyed = false;
-  return function (err) {
-    if (closed) return;
-    if (destroyed) return;
-    destroyed = true;
-    if (isFS(stream)) return stream.close(noop$1); // use close for fs streams to avoid fd leaks
-
-    if (isRequest$1(stream)) return stream.abort(); // request.destroy just do .end - .abort is what we want
-
-    if (isFn(stream.destroy)) return stream.destroy();
-    callback(err || new Error('stream was destroyed'));
-  };
-};
-
-var call = function (fn) {
-  fn();
-};
-
-var pipe = function (from, to) {
-  return from.pipe(to);
-};
-
-var pump = function () {
-  var streams = Array.prototype.slice.call(arguments);
-  var callback = isFn(streams[streams.length - 1] || noop$1) && streams.pop() || noop$1;
-  if (Array.isArray(streams[0])) streams = streams[0];
-  if (streams.length < 2) throw new Error('pump requires two streams per minimum');
-  var error;
-  var destroys = streams.map(function (stream, i) {
-    var reading = i < streams.length - 1;
-    var writing = i > 0;
-    return destroyer(stream, reading, writing, function (err) {
-      if (!error) error = err;
-      if (err) destroys.forEach(call);
-      if (reading) return;
-      destroys.forEach(call);
-      callback(error);
-    });
-  });
-  return streams.reduce(pipe);
-};
+})(findParentDir, findParentDir.exports);
 
-var pump_1 = pump;
+var getStdin = {exports: {}};
 
 const {
-  PassThrough: PassThroughStream
-} = stream;
-
-var bufferStream = options => {
-  options = Object.assign({}, options);
-  const {
-    array
-  } = options;
-  let {
-    encoding
-  } = options;
-  const isBuffer = encoding === 'buffer';
-  let objectMode = false;
+  stdin
+} = process;
 
-  if (array) {
-    objectMode = !(encoding || isBuffer);
-  } else {
-    encoding = encoding || 'utf8';
-  }
+getStdin.exports = async () => {
+  let result = '';
 
-  if (isBuffer) {
-    encoding = null;
+  if (stdin.isTTY) {
+    return result;
   }
 
-  const stream = new PassThroughStream({
-    objectMode
-  });
+  stdin.setEncoding('utf8');
 
-  if (encoding) {
-    stream.setEncoding(encoding);
+  for await (const chunk of stdin) {
+    result += chunk;
   }
 
-  let length = 0;
-  const chunks = [];
-  stream.on('data', chunk => {
-    chunks.push(chunk);
-
-    if (objectMode) {
-      length = chunks.length;
-    } else {
-      length += chunk.length;
-    }
-  });
-
-  stream.getBufferedValue = () => {
-    if (array) {
-      return chunks;
-    }
-
-    return isBuffer ? Buffer.concat(chunks, length) : chunks.join('');
-  };
-
-  stream.getBufferedLength = () => length;
-
-  return stream;
+  return result;
 };
 
-class MaxBufferError extends Error {
-  constructor() {
-    super('maxBuffer exceeded');
-    this.name = 'MaxBufferError';
-  }
-
-}
+getStdin.exports.buffer = async () => {
+  const result = [];
+  let length = 0;
 
-async function getStream(inputStream, options) {
-  if (!inputStream) {
-    return Promise.reject(new Error('Expected a stream'));
+  if (stdin.isTTY) {
+    return Buffer.concat([]);
   }
 
-  options = Object.assign({
-    maxBuffer: Infinity
-  }, options);
-  const {
-    maxBuffer
-  } = options;
-  let stream;
-  await new Promise((resolve, reject) => {
-    const rejectPromise = error => {
-      if (error) {
-        // A null check
-        error.bufferedData = stream.getBufferedValue();
-      }
-
-      reject(error);
-    };
-
-    stream = pump_1(inputStream, bufferStream(options), error => {
-      if (error) {
-        rejectPromise(error);
-        return;
-      }
-
-      resolve();
-    });
-    stream.on('data', () => {
-      if (stream.getBufferedLength() > maxBuffer) {
-        rejectPromise(new MaxBufferError());
-      }
-    });
-  });
-  return stream.getBufferedValue();
-}
-
-var getStream_1 = getStream; // TODO: Remove this for the next major release
-
-var default_1 = getStream;
-
-var buffer = (stream, options) => getStream(stream, Object.assign({}, options, {
-  encoding: 'buffer'
-}));
+  for await (const chunk of stdin) {
+    result.push(chunk);
+    length += chunk.length;
+  }
 
-var array = (stream, options) => getStream(stream, Object.assign({}, options, {
-  array: true
-}));
+  return Buffer.concat(result, length);
+};
 
-var MaxBufferError_1 = MaxBufferError;
-getStream_1.default = default_1;
-getStream_1.buffer = buffer;
-getStream_1.array = array;
-getStream_1.MaxBufferError = MaxBufferError_1;
+var ciInfo = {};
 
-var vendors = [
+var require$$0 = [
        {
                name: "AppVeyor",
                constant: "APPVEYOR",
@@ -12183,6 +11403,11 @@ var vendors = [
                env: "SYSTEM_TEAMFOUNDATIONCOLLECTIONURI",
                pr: "SYSTEM_PULLREQUEST_PULLREQUESTID"
        },
+       {
+               name: "Appcircle",
+               constant: "APPCIRCLE",
+               env: "AC_APPCIRCLE"
+       },
        {
                name: "Bamboo",
                constant: "BAMBOO",
@@ -12232,6 +11457,17 @@ var vendors = [
                constant: "CODEBUILD",
                env: "CODEBUILD_BUILD_ARN"
        },
+       {
+               name: "Codefresh",
+               constant: "CODEFRESH",
+               env: "CF_BUILD_ID",
+               pr: {
+                       any: [
+                               "CF_PULL_REQUEST_NUMBER",
+                               "CF_PULL_REQUEST_ID"
+                       ]
+               }
+       },
        {
                name: "Codeship",
                constant: "CODESHIP",
@@ -12263,13 +11499,20 @@ var vendors = [
        {
                name: "GitLab CI",
                constant: "GITLAB",
-               env: "GITLAB_CI"
+               env: "GITLAB_CI",
+               pr: "CI_MERGE_REQUEST_ID"
        },
        {
                name: "GoCD",
                constant: "GOCD",
                env: "GO_PIPELINE_LABEL"
        },
+       {
+               name: "LayerCI",
+               constant: "LAYERCI",
+               env: "LAYERCI",
+               pr: "LAYERCI_PULL_REQUEST"
+       },
        {
                name: "Hudson",
                constant: "HUDSON",
@@ -12289,11 +11532,6 @@ var vendors = [
                        ]
                }
        },
-       {
-               name: "ZEIT Now",
-               constant: "ZEIT_NOW",
-               env: "NOW_BUILDER"
-       },
        {
                name: "Magnum CI",
                constant: "MAGNUM",
@@ -12337,6 +11575,15 @@ var vendors = [
                env: "SEMAPHORE",
                pr: "PULL_REQUEST_NUMBER"
        },
+       {
+               name: "Screwdriver",
+               constant: "SCREWDRIVER",
+               env: "SCREWDRIVER",
+               pr: {
+                       env: "SD_PULL_REQUEST",
+                       ne: "false"
+               }
+       },
        {
                name: "Shippable",
                constant: "SHIPPABLE",
@@ -12377,30 +11624,34 @@ var vendors = [
                        env: "TRAVIS_PULL_REQUEST",
                        ne: "false"
                }
+       },
+       {
+               name: "Vercel",
+               constant: "VERCEL",
+               env: "NOW_BUILDER"
+       },
+       {
+               name: "Visual Studio App Center",
+               constant: "APPCENTER",
+               env: "APPCENTER_BUILD_ID"
        }
 ];
 
-var vendors$1 = /*#__PURE__*/Object.freeze({
-       __proto__: null,
-       'default': vendors
-});
-
-var vendors$2 = getCjsExportFromNamespace(vendors$1);
-
-var ciInfo = createCommonjsModule(function (module, exports) {
+(function (exports) {
 
-  var env = process.env; // Used for testing only
+  const vendors = require$$0;
+  const env = process.env; // Used for testing only
 
   Object.defineProperty(exports, '_vendors', {
-    value: vendors$2.map(function (v) {
+    value: vendors.map(function (v) {
       return v.constant;
     })
   });
   exports.name = null;
   exports.isPR = null;
-  vendors$2.forEach(function (vendor) {
-    var envs = Array.isArray(vendor.env) ? vendor.env : [vendor.env];
-    var isCI = envs.every(function (obj) {
+  vendors.forEach(function (vendor) {
+    const envs = Array.isArray(vendor.env) ? vendor.env : [vendor.env];
+    const isCI = envs.every(function (obj) {
       return checkEnv(obj);
     });
     exports[vendor.constant] = isCI;
@@ -12448,27 +11699,14 @@ var ciInfo = createCommonjsModule(function (module, exports) {
       return env[k] === obj[k];
     });
   }
-});
-var ciInfo_1 = ciInfo.name;
-var ciInfo_2 = ciInfo.isPR;
-var ciInfo_3 = ciInfo.isCI;
+})(ciInfo);
 
 var thirdParty = {
   cosmiconfig: dist$2.cosmiconfig,
   cosmiconfigSync: dist$2.cosmiconfigSync,
-  findParentDir: findParentDir.sync,
-  getStream: getStream_1,
+  findParentDir: findParentDir.exports.sync,
+  getStdin: getStdin.exports,
   isCI: () => ciInfo.isCI
 };
-var thirdParty_1 = thirdParty.cosmiconfig;
-var thirdParty_2 = thirdParty.cosmiconfigSync;
-var thirdParty_3 = thirdParty.findParentDir;
-var thirdParty_4 = thirdParty.getStream;
-var thirdParty_5 = thirdParty.isCI;
-
-exports.cosmiconfig = thirdParty_1;
-exports.cosmiconfigSync = thirdParty_2;
-exports.default = thirdParty;
-exports.findParentDir = thirdParty_3;
-exports.getStream = thirdParty_4;
-exports.isCI = thirdParty_5;
+
+module.exports = thirdParty;