function k(r) {
  return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? k = function(a) {
    return typeof a;
  } : k = function(a) {
    return a && typeof Symbol == "function" && a.constructor === Symbol && a !== Symbol.prototype ? "symbol" : typeof a;
  }, k(r);
}
function p(r, a) {
  if (!(r instanceof a))
    throw new TypeError("Cannot call a class as a function");
}
function N(r, a) {
  for (var e = 0; e < a.length; e++) {
    var t = a[e];
    t.enumerable = t.enumerable || !1, t.configurable = !0, "value" in t && (t.writable = !0), Object.defineProperty(r, t.key, t);
  }
}
function S(r, a, e) {
  return a && N(r.prototype, a), e && N(r, e), r;
}
function re(r, a, e) {
  return a in r ? Object.defineProperty(r, a, {
    value: e,
    enumerable: !0,
    configurable: !0,
    writable: !0
  }) : r[a] = e, r;
}
function d(r, a) {
  if (typeof a != "function" && a !== null)
    throw new TypeError("Super expression must either be null or a function");
  r.prototype = Object.create(a && a.prototype, {
    constructor: {
      value: r,
      writable: !0,
      configurable: !0
    }
  }), a && m(r, a);
}
function g(r) {
  return g = Object.setPrototypeOf ? Object.getPrototypeOf : function(e) {
    return e.__proto__ || Object.getPrototypeOf(e);
  }, g(r);
}
function m(r, a) {
  return m = Object.setPrototypeOf || function(t, n) {
    return t.__proto__ = n, t;
  }, m(r, a);
}
function D() {
  if (typeof Reflect > "u" || !Reflect.construct || Reflect.construct.sham)
    return !1;
  if (typeof Proxy == "function")
    return !0;
  try {
    return Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
    })), !0;
  } catch {
    return !1;
  }
}
function _(r, a, e) {
  return D() ? _ = Reflect.construct : _ = function(n, i, u) {
    var o = [null];
    o.push.apply(o, i);
    var l = Function.bind.apply(n, o), s = new l();
    return u && m(s, u.prototype), s;
  }, _.apply(null, arguments);
}
function G(r) {
  return Function.toString.call(r).indexOf("[native code]") !== -1;
}
function A(r) {
  var a = typeof Map == "function" ? /* @__PURE__ */ new Map() : void 0;
  return A = function(t) {
    if (t === null || !G(t))
      return t;
    if (typeof t != "function")
      throw new TypeError("Super expression must either be null or a function");
    if (typeof a < "u") {
      if (a.has(t))
        return a.get(t);
      a.set(t, n);
    }
    function n() {
      return _(t, arguments, g(this).constructor);
    }
    return n.prototype = Object.create(t.prototype, {
      constructor: {
        value: n,
        enumerable: !1,
        writable: !0,
        configurable: !0
      }
    }), m(n, t);
  }, A(r);
}
function q(r) {
  if (r === void 0)
    throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
  return r;
}
function z(r, a) {
  return a && (typeof a == "object" || typeof a == "function") ? a : q(r);
}
function O(r) {
  var a = D();
  return function() {
    var t = g(r), n;
    if (a) {
      var i = g(this).constructor;
      n = Reflect.construct(t, arguments, i);
    } else
      n = t.apply(this, arguments);
    return z(this, n);
  };
}
function $(r, a) {
  for (; !Object.prototype.hasOwnProperty.call(r, a) && (r = g(r), r !== null); )
    ;
  return r;
}
function w(r, a, e) {
  return typeof Reflect < "u" && Reflect.get ? w = Reflect.get : w = function(n, i, u) {
    var o = $(n, i);
    if (!!o) {
      var l = Object.getOwnPropertyDescriptor(o, i);
      return l.get ? l.get.call(u) : l.value;
    }
  }, w(r, a, e || r);
}
function J(r, a) {
  return W(r) || Z(r, a) || P(r, a) || V();
}
function ne(r) {
  return W(r) || X(r) || P(r) || V();
}
function W(r) {
  if (Array.isArray(r))
    return r;
}
function X(r) {
  if (typeof Symbol < "u" && Symbol.iterator in Object(r))
    return Array.from(r);
}
function Z(r, a) {
  if (!(typeof Symbol > "u" || !(Symbol.iterator in Object(r)))) {
    var e = [], t = !0, n = !1, i = void 0;
    try {
      for (var u = r[Symbol.iterator](), o; !(t = (o = u.next()).done) && (e.push(o.value), !(a && e.length === a)); t = !0)
        ;
    } catch (l) {
      n = !0, i = l;
    } finally {
      try {
        !t && u.return != null && u.return();
      } finally {
        if (n)
          throw i;
      }
    }
    return e;
  }
}
function P(r, a) {
  if (!!r) {
    if (typeof r == "string")
      return x(r, a);
    var e = Object.prototype.toString.call(r).slice(8, -1);
    if (e === "Object" && r.constructor && (e = r.constructor.name), e === "Map" || e === "Set")
      return Array.from(r);
    if (e === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e))
      return x(r, a);
  }
}
function x(r, a) {
  (a == null || a > r.length) && (a = r.length);
  for (var e = 0, t = new Array(a); e < a; e++)
    t[e] = r[e];
  return t;
}
function V() {
  throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
}
function ae(r, a) {
  var e;
  if (typeof Symbol > "u" || r[Symbol.iterator] == null) {
    if (Array.isArray(r) || (e = P(r)) || a && r && typeof r.length == "number") {
      e && (r = e);
      var t = 0, n = function() {
      };
      return {
        s: n,
        n: function() {
          return t >= r.length ? {
            done: !0
          } : {
            done: !1,
            value: r[t++]
          };
        },
        e: function(l) {
          throw l;
        },
        f: n
      };
    }
    throw new TypeError(`Invalid attempt to iterate non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
  }
  var i = !0, u = !1, o;
  return {
    s: function() {
      e = r[Symbol.iterator]();
    },
    n: function() {
      var l = e.next();
      return i = l.done, l;
    },
    e: function(l) {
      u = !0, o = l;
    },
    f: function() {
      try {
        !i && e.return != null && e.return();
      } finally {
        if (u)
          throw o;
      }
    }
  };
}
var v = {
  ANCHOR: "&",
  COMMENT: "#",
  TAG: "!",
  DIRECTIVES_END: "-",
  DOCUMENT_END: "."
}, b = {
  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"
}, ie = "tag:yaml.org,2002:", ue = {
  MAP: "tag:yaml.org,2002:map",
  SEQ: "tag:yaml.org,2002:seq",
  STR: "tag:yaml.org,2002:str"
};
function B(r) {
  for (var a = [0], e = r.indexOf(`
`); e !== -1; )
    e += 1, a.push(e), e = r.indexOf(`
`, e);
  return a;
}
function Y(r) {
  var a, e;
  return typeof r == "string" ? (a = B(r), e = r) : (Array.isArray(r) && (r = r[0]), r && r.context && (r.lineStarts || (r.lineStarts = B(r.context.src)), a = r.lineStarts, e = r.context.src)), {
    lineStarts: a,
    src: e
  };
}
function R(r, a) {
  if (typeof r != "number" || r < 0)
    return null;
  var e = Y(a), t = e.lineStarts, n = e.src;
  if (!t || !n || r > n.length)
    return null;
  for (var i = 0; i < t.length; ++i) {
    var u = t[i];
    if (r < u)
      return {
        line: i,
        col: r - t[i - 1] + 1
      };
    if (r === u)
      return {
        line: i + 1,
        col: 1
      };
  }
  var o = t.length;
  return {
    line: o,
    col: r - t[o - 1] + 1
  };
}
function ee(r, a) {
  var e = Y(a), t = e.lineStarts, n = e.src;
  if (!t || !(r >= 1) || r > t.length)
    return null;
  for (var i = t[r - 1], u = t[r]; u && u > i && n[u - 1] === `
`; )
    --u;
  return n.slice(i, u);
}
function te(r, a) {
  var e = r.start, t = r.end, n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : 80, i = ee(e.line, a);
  if (!i)
    return null;
  var u = e.col;
  if (i.length > n)
    if (u <= n - 10)
      i = i.substr(0, n - 1) + "\u2026";
    else {
      var o = Math.round(n / 2);
      i.length > u + o && (i = i.substr(0, u + o - 1) + "\u2026"), u -= i.length - n, i = "\u2026" + i.substr(1 - n);
    }
  var l = 1, s = "";
  t && (t.line === e.line && u + (t.col - e.col) <= n + 1 ? l = t.col - e.col : (l = Math.min(i.length + 1, n) - u, s = "\u2026"));
  var f = u > 1 ? " ".repeat(u - 1) : "", c = "^".repeat(l);
  return "".concat(i, `
`).concat(f).concat(c).concat(s);
}
var M = /* @__PURE__ */ function() {
  function r(a, e) {
    p(this, r), this.start = a, this.end = e || a;
  }
  return S(r, [{
    key: "isEmpty",
    value: function() {
      return typeof this.start != "number" || !this.end || this.end <= this.start;
    }
  }, {
    key: "setOrigRange",
    value: function(e, t) {
      var n = this.start, i = this.end;
      if (e.length === 0 || i <= e[0])
        return this.origStart = n, this.origEnd = i, t;
      for (var u = t; u < e.length && !(e[u] > n); )
        ++u;
      this.origStart = n + u;
      for (var o = u; u < e.length && !(e[u] >= i); )
        ++u;
      return this.origEnd = i + u, o;
    }
  }], [{
    key: "copy",
    value: function(e) {
      return new r(e.start, e.end);
    }
  }]), r;
}(), y = /* @__PURE__ */ function() {
  function r(a, e, t) {
    p(this, r), Object.defineProperty(this, "context", {
      value: t || null,
      writable: !0
    }), this.error = null, this.range = null, this.valueRange = null, this.props = e || [], this.type = a, this.value = null;
  }
  return S(r, [{
    key: "getPropValue",
    value: function(e, t, n) {
      if (!this.context)
        return null;
      var i = this.context.src, u = this.props[e];
      return u && i[u.start] === t ? i.slice(u.start + (n ? 1 : 0), u.end) : null;
    }
  }, {
    key: "anchor",
    get: function() {
      for (var e = 0; e < this.props.length; ++e) {
        var t = this.getPropValue(e, v.ANCHOR, !0);
        if (t != null)
          return t;
      }
      return null;
    }
  }, {
    key: "comment",
    get: function() {
      for (var e = [], t = 0; t < this.props.length; ++t) {
        var n = this.getPropValue(t, v.COMMENT, !0);
        n != null && e.push(n);
      }
      return e.length > 0 ? e.join(`
`) : null;
    }
  }, {
    key: "commentHasRequiredWhitespace",
    value: function(e) {
      var t = this.context.src;
      if (this.header && e === this.header.end || !this.valueRange)
        return !1;
      var n = this.valueRange.end;
      return e !== n || r.atBlank(t, n - 1);
    }
  }, {
    key: "hasComment",
    get: function() {
      if (this.context) {
        for (var e = this.context.src, t = 0; t < this.props.length; ++t)
          if (e[this.props[t].start] === v.COMMENT)
            return !0;
      }
      return !1;
    }
  }, {
    key: "hasProps",
    get: function() {
      if (this.context) {
        for (var e = this.context.src, t = 0; t < this.props.length; ++t)
          if (e[this.props[t].start] !== v.COMMENT)
            return !0;
      }
      return !1;
    }
  }, {
    key: "includesTrailingLines",
    get: function() {
      return !1;
    }
  }, {
    key: "jsonLike",
    get: function() {
      var e = [b.FLOW_MAP, b.FLOW_SEQ, b.QUOTE_DOUBLE, b.QUOTE_SINGLE];
      return e.indexOf(this.type) !== -1;
    }
  }, {
    key: "rangeAsLinePos",
    get: function() {
      if (!(!this.range || !this.context)) {
        var e = R(this.range.start, this.context.root);
        if (!!e) {
          var t = R(this.range.end, this.context.root);
          return {
            start: e,
            end: t
          };
        }
      }
    }
  }, {
    key: "rawValue",
    get: function() {
      if (!this.valueRange || !this.context)
        return null;
      var e = this.valueRange, t = e.start, n = e.end;
      return this.context.src.slice(t, n);
    }
  }, {
    key: "tag",
    get: function() {
      for (var e = 0; e < this.props.length; ++e) {
        var t = this.getPropValue(e, v.TAG, !1);
        if (t != null) {
          if (t[1] === "<")
            return {
              verbatim: t.slice(2, -1)
            };
          var n = t.match(/^(.*!)([^!]*)$/), i = J(n, 3);
          i[0];
          var u = i[1], o = i[2];
          return {
            handle: u,
            suffix: o
          };
        }
      }
      return null;
    }
  }, {
    key: "valueRangeContainsNewline",
    get: function() {
      if (!this.valueRange || !this.context)
        return !1;
      for (var e = this.valueRange, t = e.start, n = e.end, i = this.context.src, u = t; u < n; ++u)
        if (i[u] === `
`)
          return !0;
      return !1;
    }
  }, {
    key: "parseComment",
    value: function(e) {
      var t = this.context.src;
      if (t[e] === v.COMMENT) {
        var n = r.endOfLine(t, e + 1), i = new M(e, n);
        return this.props.push(i), n;
      }
      return e;
    }
  }, {
    key: "setOrigRanges",
    value: function(e, t) {
      return this.range && (t = this.range.setOrigRange(e, t)), this.valueRange && this.valueRange.setOrigRange(e, t), this.props.forEach(function(n) {
        return n.setOrigRange(e, t);
      }), t;
    }
  }, {
    key: "toString",
    value: function() {
      var e = this.context.src, t = this.range, n = this.value;
      if (n != null)
        return n;
      var i = e.slice(t.start, t.end);
      return r.addStringTerminator(e, t.end, i);
    }
  }], [{
    key: "addStringTerminator",
    value: function(e, t, n) {
      if (n[n.length - 1] === `
`)
        return n;
      var i = r.endOfWhiteSpace(e, t);
      return i >= e.length || e[i] === `
` ? n + `
` : n;
    }
  }, {
    key: "atDocumentBoundary",
    value: function(e, t, n) {
      var i = e[t];
      if (!i)
        return !0;
      var u = e[t - 1];
      if (u && u !== `
`)
        return !1;
      if (n) {
        if (i !== n)
          return !1;
      } else if (i !== v.DIRECTIVES_END && i !== v.DOCUMENT_END)
        return !1;
      var o = e[t + 1], l = e[t + 2];
      if (o !== i || l !== i)
        return !1;
      var s = e[t + 3];
      return !s || s === `
` || s === "	" || s === " ";
    }
  }, {
    key: "endOfIdentifier",
    value: function(e, t) {
      for (var n = e[t], i = n === "<", u = i ? [`
`, "	", " ", ">"] : [`
`, "	", " ", "[", "]", "{", "}", ","]; n && u.indexOf(n) === -1; )
        n = e[t += 1];
      return i && n === ">" && (t += 1), t;
    }
  }, {
    key: "endOfIndent",
    value: function(e, t) {
      for (var n = e[t]; n === " "; )
        n = e[t += 1];
      return t;
    }
  }, {
    key: "endOfLine",
    value: function(e, t) {
      for (var n = e[t]; n && n !== `
`; )
        n = e[t += 1];
      return t;
    }
  }, {
    key: "endOfWhiteSpace",
    value: function(e, t) {
      for (var n = e[t]; n === "	" || n === " "; )
        n = e[t += 1];
      return t;
    }
  }, {
    key: "startOfLine",
    value: function(e, t) {
      var n = e[t - 1];
      if (n === `
`)
        return t;
      for (; n && n !== `
`; )
        n = e[t -= 1];
      return t + 1;
    }
  }, {
    key: "endOfBlockIndent",
    value: function(e, t, n) {
      var i = r.endOfIndent(e, n);
      if (i > n + t)
        return i;
      var u = r.endOfWhiteSpace(e, i), o = e[u];
      return !o || o === `
` ? u : null;
    }
  }, {
    key: "atBlank",
    value: function(e, t, n) {
      var i = e[t];
      return i === `
` || i === "	" || i === " " || n && !i;
    }
  }, {
    key: "nextNodeIsIndented",
    value: function(e, t, n) {
      return !e || t < 0 ? !1 : t > 0 ? !0 : n && e === "-";
    }
  }, {
    key: "normalizeOffset",
    value: function(e, t) {
      var n = e[t];
      return n ? n !== `
` && e[t - 1] === `
` ? t - 1 : r.endOfWhiteSpace(e, t) : t;
    }
  }, {
    key: "foldNewline",
    value: function(e, t, n) {
      for (var i = 0, u = !1, o = "", l = e[t + 1]; l === " " || l === "	" || l === `
`; ) {
        switch (l) {
          case `
`:
            i = 0, t += 1, o += `
`;
            break;
          case "	":
            i <= n && (u = !0), t = r.endOfWhiteSpace(e, t + 2) - 1;
            break;
          case " ":
            i += 1, t += 1;
            break;
        }
        l = e[t + 1];
      }
      return o || (o = " "), l && i <= n && (u = !0), {
        fold: o,
        offset: t,
        error: u
      };
    }
  }]), r;
}(), L = /* @__PURE__ */ function(r) {
  d(e, r);
  var a = O(e);
  function e(t, n, i) {
    var u;
    if (p(this, e), !i || !(n instanceof y))
      throw new Error("Invalid arguments for new ".concat(t));
    return u = a.call(this), u.name = t, u.message = i, u.source = n, u;
  }
  return S(e, [{
    key: "makePretty",
    value: function() {
      if (!!this.source) {
        this.nodeType = this.source.type;
        var n = this.source.context && this.source.context.root;
        if (typeof this.offset == "number") {
          this.range = new M(this.offset, this.offset + 1);
          var i = n && R(this.offset, n);
          if (i) {
            var u = {
              line: i.line,
              col: i.col + 1
            };
            this.linePos = {
              start: i,
              end: u
            };
          }
          delete this.offset;
        } else
          this.range = this.source.range, this.linePos = this.source.rangeAsLinePos;
        if (this.linePos) {
          var o = this.linePos.start, l = o.line, s = o.col;
          this.message += " at line ".concat(l, ", column ").concat(s);
          var f = n && te(this.linePos, n);
          f && (this.message += `:

`.concat(f, `
`));
        }
        delete this.source;
      }
    }
  }]), e;
}(/* @__PURE__ */ A(Error)), oe = /* @__PURE__ */ function(r) {
  d(e, r);
  var a = O(e);
  function e(t, n) {
    return p(this, e), a.call(this, "YAMLReferenceError", t, n);
  }
  return e;
}(L), C = /* @__PURE__ */ function(r) {
  d(e, r);
  var a = O(e);
  function e(t, n) {
    return p(this, e), a.call(this, "YAMLSemanticError", t, n);
  }
  return e;
}(L), le = /* @__PURE__ */ function(r) {
  d(e, r);
  var a = O(e);
  function e(t, n) {
    return p(this, e), a.call(this, "YAMLSyntaxError", t, n);
  }
  return e;
}(L), se = /* @__PURE__ */ function(r) {
  d(e, r);
  var a = O(e);
  function e(t, n) {
    return p(this, e), a.call(this, "YAMLWarning", t, n);
  }
  return e;
}(L), fe = /* @__PURE__ */ function(r) {
  d(e, r);
  var a = O(e);
  function e() {
    return p(this, e), a.apply(this, arguments);
  }
  return S(e, [{
    key: "strValue",
    get: function() {
      if (!this.valueRange || !this.context)
        return null;
      for (var n = this.valueRange, i = n.start, u = n.end, o = this.context.src, l = o[u - 1]; i < u && (l === `
` || l === "	" || l === " "); )
        l = o[--u - 1];
      for (var s = "", f = i; f < u; ++f) {
        var c = o[f];
        if (c === `
`) {
          var h = y.foldNewline(o, f, -1), U = h.fold, F = h.offset;
          s += U, f = F;
        } else if (c === " " || c === "	") {
          for (var T = f, E = o[f + 1]; f < u && (E === " " || E === "	"); )
            f += 1, E = o[f + 1];
          E !== `
` && (s += f > T ? o.slice(T, f + 1) : c);
        } else
          s += c;
      }
      var I = o[i];
      switch (I) {
        case "	": {
          var Q = "Plain value cannot start with a tab character", j = [new C(this, Q)];
          return {
            errors: j,
            str: s
          };
        }
        case "@":
        case "`": {
          var K = "Plain value cannot start with reserved character ".concat(I), H = [new C(this, K)];
          return {
            errors: H,
            str: s
          };
        }
        default:
          return s;
      }
    }
  }, {
    key: "parseBlockValue",
    value: function(n) {
      for (var i = this.context, u = i.indent, o = i.inFlow, l = i.src, s = n, f = n, c = l[s]; c === `
` && !y.atDocumentBoundary(l, s + 1); c = l[s]) {
        var h = y.endOfBlockIndent(l, u, s + 1);
        if (h === null || l[h] === "#")
          break;
        l[h] === `
` ? s = h : (f = e.endOfLine(l, h, o), s = f);
      }
      return this.valueRange.isEmpty() && (this.valueRange.start = n), this.valueRange.end = f, f;
    }
  }, {
    key: "parse",
    value: function(n, i) {
      this.context = n;
      var u = n.inFlow, o = n.src, l = i, s = o[l];
      return s && s !== "#" && s !== `
` && (l = e.endOfLine(o, i, u)), this.valueRange = new M(i, l), l = y.endOfWhiteSpace(o, l), l = this.parseComment(l), (!this.hasComment || this.valueRange.isEmpty()) && (l = this.parseBlockValue(l)), l;
    }
  }], [{
    key: "endOfLine",
    value: function(n, i, u) {
      for (var o = n[i], l = i; o && o !== `
` && !(u && (o === "[" || o === "]" || o === "{" || o === "}" || o === ",")); ) {
        var s = n[l + 1];
        if (o === ":" && (!s || s === `
` || s === "	" || s === " " || u && s === ",") || (o === " " || o === "	") && s === "#")
          break;
        l += 1, o = s;
      }
      return l;
    }
  }]), e;
}(y);
export {
  v as C,
  y as N,
  fe as P,
  M as R,
  b as T,
  le as Y,
  ae as _,
  k as a,
  S as b,
  p as c,
  ie as d,
  re as e,
  se as f,
  C as g,
  J as h,
  L as i,
  d as j,
  O as k,
  w as l,
  g as m,
  ue as n,
  oe as o,
  q as p,
  ne as q,
  z as r
};
//# sourceMappingURL=PlainValue-b8036b75.js.map
