import { e as ue, j as $, k as U, b as Y, c as W, p as Be, q as G, T as h, _ as I, a as se, o as ie, l as oe, m as fe, r as Ce, h as Re, g as k, C as z, Y as j, f as le, P as We, n as J } from "./PlainValue-b8036b75.js";
function Je(a, r, s) {
  if (!s)
    return a;
  var i = s.replace(/[\s\S]^/gm, "$&".concat(r, "#"));
  return "#".concat(i, `
`).concat(r).concat(a);
}
function H(a, r, s) {
  return s ? s.indexOf(`
`) === -1 ? "".concat(a, " #").concat(s) : "".concat(a, `
`) + s.replace(/^/gm, "".concat(r || "", "#")) : a;
}
var C = function a() {
  W(this, a);
};
function K(a, r, s) {
  if (Array.isArray(a))
    return a.map(function(n, t) {
      return K(n, String(t), s);
    });
  if (a && typeof a.toJSON == "function") {
    var i = s && s.anchors && s.anchors.get(a);
    i && (s.onCreate = function(n) {
      i.res = n, delete s.onCreate;
    });
    var e = a.toJSON(r, s);
    return i && s.onCreate && s.onCreate(e), e;
  }
  return (!s || !s.keep) && typeof a == "bigint" ? Number(a) : a;
}
var N = /* @__PURE__ */ function(a) {
  $(s, a);
  var r = U(s);
  function s(i) {
    var e;
    return W(this, s), e = r.call(this), e.value = i, e;
  }
  return Y(s, [{
    key: "toJSON",
    value: function(e, n) {
      return n && n.keep ? this.value : K(this.value, e, n);
    }
  }, {
    key: "toString",
    value: function() {
      return String(this.value);
    }
  }]), s;
}(C);
function Se(a, r, s) {
  for (var i = s, e = r.length - 1; e >= 0; --e) {
    var n = r[e];
    if (Number.isInteger(n) && n >= 0) {
      var t = [];
      t[n] = i, i = t;
    } else {
      var o = {};
      Object.defineProperty(o, n, {
        value: i,
        writable: !0,
        enumerable: !0,
        configurable: !0
      }), i = o;
    }
  }
  return a.createNode(i, !1);
}
var Ke = function(r) {
  return r == null || se(r) === "object" && r[Symbol.iterator]().next().done;
}, R = /* @__PURE__ */ function(a) {
  $(s, a);
  var r = U(s);
  function s(i) {
    var e;
    return W(this, s), e = r.call(this), ue(Be(e), "items", []), e.schema = i, e;
  }
  return Y(s, [{
    key: "addIn",
    value: function(e, n) {
      if (Ke(e))
        this.add(n);
      else {
        var t = G(e), o = t[0], f = t.slice(1), u = this.get(o, !0);
        if (u instanceof s)
          u.addIn(f, n);
        else if (u === void 0 && this.schema)
          this.set(o, Se(this.schema, f, n));
        else
          throw new Error("Expected YAML collection at ".concat(o, ". Remaining path: ").concat(f));
      }
    }
  }, {
    key: "deleteIn",
    value: function(e) {
      var n = G(e), t = n[0], o = n.slice(1);
      if (o.length === 0)
        return this.delete(t);
      var f = this.get(t, !0);
      if (f instanceof s)
        return f.deleteIn(o);
      throw new Error("Expected YAML collection at ".concat(t, ". Remaining path: ").concat(o));
    }
  }, {
    key: "getIn",
    value: function(e, n) {
      var t = G(e), o = t[0], f = t.slice(1), u = this.get(o, !0);
      return f.length === 0 ? !n && u instanceof N ? u.value : u : u instanceof s ? u.getIn(f, n) : void 0;
    }
  }, {
    key: "hasAllNullValues",
    value: function() {
      return this.items.every(function(e) {
        if (!e || e.type !== "PAIR")
          return !1;
        var n = e.value;
        return n == null || n instanceof N && n.value == null && !n.commentBefore && !n.comment && !n.tag;
      });
    }
  }, {
    key: "hasIn",
    value: function(e) {
      var n = G(e), t = n[0], o = n.slice(1);
      if (o.length === 0)
        return this.has(t);
      var f = this.get(t, !0);
      return f instanceof s ? f.hasIn(o) : !1;
    }
  }, {
    key: "setIn",
    value: function(e, n) {
      var t = G(e), o = t[0], f = t.slice(1);
      if (f.length === 0)
        this.set(o, n);
      else {
        var u = this.get(o, !0);
        if (u instanceof s)
          u.setIn(f, n);
        else if (u === void 0 && this.schema)
          this.set(o, Se(this.schema, f, n));
        else
          throw new Error("Expected YAML collection at ".concat(o, ". Remaining path: ").concat(f));
      }
    }
  }, {
    key: "toJSON",
    value: function() {
      return null;
    }
  }, {
    key: "toString",
    value: function(e, n, t, o) {
      var f = this, u = n.blockItem, l = n.flowChars, c = n.isMap, v = n.itemIndent, g = e, p = g.indent, d = g.indentStep, w = g.stringify, S = this.type === h.FLOW_MAP || this.type === h.FLOW_SEQ || e.inFlow;
      S && (v += d);
      var m = c && this.hasAllNullValues();
      e = Object.assign({}, e, {
        allNullValues: m,
        indent: v,
        inFlow: S,
        type: null
      });
      var A = !1, M = !1, O = this.items.reduce(function(P, L, Pe) {
        var ee;
        L && (!A && L.spaceBefore && P.push({
          type: "comment",
          str: ""
        }), L.commentBefore && L.commentBefore.match(/^.*$/gm).forEach(function(Fe) {
          P.push({
            type: "comment",
            str: "#".concat(Fe)
          });
        }), L.comment && (ee = L.comment), S && (!A && L.spaceBefore || L.commentBefore || L.comment || L.key && (L.key.commentBefore || L.key.comment) || L.value && (L.value.commentBefore || L.value.comment)) && (M = !0)), A = !1;
        var V = w(L, e, function() {
          return ee = null;
        }, function() {
          return A = !0;
        });
        return S && !M && V.includes(`
`) && (M = !0), S && Pe < f.items.length - 1 && (V += ","), V = H(V, v, ee), A && (ee || S) && (A = !1), P.push({
          type: "item",
          str: V
        }), P;
      }, []), y;
      if (O.length === 0)
        y = l.start + l.end;
      else if (S) {
        var _ = l.start, T = l.end, F = O.map(function(P) {
          return P.str;
        });
        if (M || F.reduce(function(P, L) {
          return P + L.length + 2;
        }, 2) > s.maxFlowStringSingleLineLength) {
          y = _;
          var E = I(F), B;
          try {
            for (E.s(); !(B = E.n()).done; ) {
              var Z = B.value;
              y += Z ? `
`.concat(d).concat(p).concat(Z) : `
`;
            }
          } catch (P) {
            E.e(P);
          } finally {
            E.f();
          }
          y += `
`.concat(p).concat(T);
        } else
          y = "".concat(_, " ").concat(F.join(" "), " ").concat(T);
      } else {
        var ye = O.map(u);
        y = ye.shift();
        var x = I(ye), me;
        try {
          for (x.s(); !(me = x.n()).done; ) {
            var we = me.value;
            y += we ? `
`.concat(p).concat(we) : `
`;
          }
        } catch (P) {
          x.e(P);
        } finally {
          x.f();
        }
      }
      return this.comment ? (y += `
` + this.comment.replace(/^/gm, "".concat(p, "#")), t && t()) : A && o && o(), y;
    }
  }]), s;
}(C);
ue(R, "maxFlowStringSingleLineLength", 60);
function ne(a) {
  var r = a instanceof N ? a.value : a;
  return r && typeof r == "string" && (r = Number(r)), Number.isInteger(r) && r >= 0 ? r : null;
}
var X = /* @__PURE__ */ function(a) {
  $(s, a);
  var r = U(s);
  function s() {
    return W(this, s), r.apply(this, arguments);
  }
  return Y(s, [{
    key: "add",
    value: function(e) {
      this.items.push(e);
    }
  }, {
    key: "delete",
    value: function(e) {
      var n = ne(e);
      if (typeof n != "number")
        return !1;
      var t = this.items.splice(n, 1);
      return t.length > 0;
    }
  }, {
    key: "get",
    value: function(e, n) {
      var t = ne(e);
      if (typeof t == "number") {
        var o = this.items[t];
        return !n && o instanceof N ? o.value : o;
      }
    }
  }, {
    key: "has",
    value: function(e) {
      var n = ne(e);
      return typeof n == "number" && n < this.items.length;
    }
  }, {
    key: "set",
    value: function(e, n) {
      var t = ne(e);
      if (typeof t != "number")
        throw new Error("Expected a valid index, not ".concat(e, "."));
      this.items[t] = n;
    }
  }, {
    key: "toJSON",
    value: function(e, n) {
      var t = [];
      n && n.onCreate && n.onCreate(t);
      var o = 0, f = I(this.items), u;
      try {
        for (f.s(); !(u = f.n()).done; ) {
          var l = u.value;
          t.push(K(l, String(o++), n));
        }
      } catch (c) {
        f.e(c);
      } finally {
        f.f();
      }
      return t;
    }
  }, {
    key: "toString",
    value: function(e, n, t) {
      return e ? oe(fe(s.prototype), "toString", this).call(this, e, {
        blockItem: function(f) {
          return f.type === "comment" ? f.str : "- ".concat(f.str);
        },
        flowChars: {
          start: "[",
          end: "]"
        },
        isMap: !1,
        itemIndent: (e.indent || "") + "  "
      }, n, t) : JSON.stringify(this);
    }
  }]), s;
}(R), Qe = function(r, s, i) {
  return s === null ? "" : se(s) !== "object" ? String(s) : r instanceof C && i && i.doc ? r.toString({
    anchors: /* @__PURE__ */ Object.create(null),
    doc: i.doc,
    indent: "",
    indentStep: i.indentStep,
    inFlow: !0,
    inStringifyKey: !0,
    stringify: i.stringify
  }) : JSON.stringify(s);
}, b = /* @__PURE__ */ function(a) {
  $(s, a);
  var r = U(s);
  function s(i) {
    var e, n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : null;
    return W(this, s), e = r.call(this), e.key = i, e.value = n, e.type = s.Type.PAIR, e;
  }
  return Y(s, [{
    key: "commentBefore",
    get: function() {
      return this.key instanceof C ? this.key.commentBefore : void 0;
    },
    set: function(e) {
      if (this.key == null && (this.key = new N(null)), this.key instanceof C)
        this.key.commentBefore = e;
      else {
        var n = "Pair.commentBefore is an alias for Pair.key.commentBefore. To set it, the key must be a Node.";
        throw new Error(n);
      }
    }
  }, {
    key: "addToJSMap",
    value: function(e, n) {
      var t = K(this.key, "", e);
      if (n instanceof Map) {
        var o = K(this.value, t, e);
        n.set(t, o);
      } else if (n instanceof Set)
        n.add(t);
      else {
        var f = Qe(this.key, t, e), u = K(this.value, f, e);
        f in n ? Object.defineProperty(n, f, {
          value: u,
          writable: !0,
          enumerable: !0,
          configurable: !0
        }) : n[f] = u;
      }
      return n;
    }
  }, {
    key: "toJSON",
    value: function(e, n) {
      var t = n && n.mapAsMap ? /* @__PURE__ */ new Map() : {};
      return this.addToJSMap(n, t);
    }
  }, {
    key: "toString",
    value: function(e, n, t) {
      if (!e || !e.doc)
        return JSON.stringify(this);
      var o = e.doc.options, f = o.indent, u = o.indentSeq, l = o.simpleKeys, c = this.key, v = this.value, g = c instanceof C && c.comment;
      if (l) {
        if (g)
          throw new Error("With simple keys, key nodes cannot have comments");
        if (c instanceof R) {
          var p = "With simple keys, collection cannot be used as a key value";
          throw new Error(p);
        }
      }
      var d = !l && (!c || g || (c instanceof C ? c instanceof R || c.type === h.BLOCK_FOLDED || c.type === h.BLOCK_LITERAL : se(c) === "object")), w = e, S = w.doc, m = w.indent, A = w.indentStep, M = w.stringify;
      e = Object.assign({}, e, {
        implicitKey: !d,
        indent: m + A
      });
      var O = !1, y = M(c, e, function() {
        return g = null;
      }, function() {
        return O = !0;
      });
      if (y = H(y, e.indent, g), !d && y.length > 1024) {
        if (l)
          throw new Error("With simple keys, single line scalar must not span more than 1024 characters");
        d = !0;
      }
      if (e.allNullValues && !l)
        return this.comment ? (y = H(y, e.indent, this.comment), n && n()) : O && !g && t && t(), e.inFlow && !d ? y : "? ".concat(y);
      y = d ? "? ".concat(y, `
`).concat(m, ":") : "".concat(y, ":"), this.comment && (y = H(y, e.indent, this.comment), n && n());
      var _ = "", T = null;
      if (v instanceof C) {
        if (v.spaceBefore && (_ = `
`), v.commentBefore) {
          var F = v.commentBefore.replace(/^/gm, "".concat(e.indent, "#"));
          _ += `
`.concat(F);
        }
        T = v.comment;
      } else
        v && se(v) === "object" && (v = S.schema.createNode(v, !0));
      e.implicitKey = !1, !d && !this.comment && v instanceof N && (e.indentAtStart = y.length + 1), O = !1, !u && f >= 2 && !e.inFlow && !d && v instanceof X && v.type !== h.FLOW_SEQ && !v.tag && !S.anchors.getName(v) && (e.indent = e.indent.substr(2));
      var E = M(v, e, function() {
        return T = null;
      }, function() {
        return O = !0;
      }), B = " ";
      if (_ || this.comment)
        B = "".concat(_, `
`).concat(e.indent);
      else if (!d && v instanceof R) {
        var Z = E[0] === "[" || E[0] === "{";
        (!Z || E.includes(`
`)) && (B = `
`.concat(e.indent));
      } else
        E[0] === `
` && (B = "");
      return O && !T && t && t(), H(y + B + E, e.indent, T);
    }
  }]), s;
}(C);
ue(b, "Type", {
  PAIR: "PAIR",
  MERGE_PAIR: "MERGE_PAIR"
});
var De = function a(r, s) {
  if (r instanceof ce) {
    var i = s.get(r.source);
    return i.count * i.aliasCount;
  } else if (r instanceof R) {
    var e = 0, n = I(r.items), t;
    try {
      for (n.s(); !(t = n.n()).done; ) {
        var o = t.value, f = a(o, s);
        f > e && (e = f);
      }
    } catch (c) {
      n.e(c);
    } finally {
      n.f();
    }
    return e;
  } else if (r instanceof b) {
    var u = a(r.key, s), l = a(r.value, s);
    return Math.max(u, l);
  }
  return 1;
}, ce = /* @__PURE__ */ function(a) {
  $(s, a);
  var r = U(s);
  function s(i) {
    var e;
    return W(this, s), e = r.call(this), e.source = i, e.type = h.ALIAS, e;
  }
  return Y(s, [{
    key: "tag",
    set: function(e) {
      throw new Error("Alias nodes cannot have tags");
    }
  }, {
    key: "toJSON",
    value: function(e, n) {
      if (!n)
        return K(this.source, e, n);
      var t = n.anchors, o = n.maxAliasCount, f = t.get(this.source);
      if (!f || f.res === void 0) {
        var u = "This should not happen: Alias anchor was not resolved?";
        throw this.cstNode ? new ie(this.cstNode, u) : new ReferenceError(u);
      }
      if (o >= 0 && (f.count += 1, f.aliasCount === 0 && (f.aliasCount = De(this.source, t)), f.count * f.aliasCount > o)) {
        var l = "Excessive alias count indicates a resource exhaustion attack";
        throw this.cstNode ? new ie(this.cstNode, l) : new ReferenceError(l);
      }
      return f.res;
    }
  }, {
    key: "toString",
    value: function(e) {
      return s.stringify(this, e);
    }
  }], [{
    key: "stringify",
    value: function(e, n) {
      var t = e.range, o = e.source, f = n.anchors, u = n.doc, l = n.implicitKey, c = n.inStringifyKey, v = Object.keys(f).find(function(p) {
        return f[p] === o;
      });
      if (!v && c && (v = u.anchors.getName(o) || u.anchors.newName()), v)
        return "*".concat(v).concat(l ? " " : "");
      var g = u.anchors.getName(o) ? "Alias node must be after source node" : "Source node not found for alias node";
      throw new Error("".concat(g, " [").concat(t, "]"));
    }
  }]), s;
}(C);
ue(ce, "default", !0);
function re(a, r) {
  var s = r instanceof N ? r.value : r, i = I(a), e;
  try {
    for (i.s(); !(e = i.n()).done; ) {
      var n = e.value;
      if (n instanceof b && (n.key === r || n.key === s || n.key && n.key.value === s))
        return n;
    }
  } catch (t) {
    i.e(t);
  } finally {
    i.f();
  }
}
var Oe = /* @__PURE__ */ function(a) {
  $(s, a);
  var r = U(s);
  function s() {
    return W(this, s), r.apply(this, arguments);
  }
  return Y(s, [{
    key: "add",
    value: function(e, n) {
      e ? e instanceof b || (e = new b(e.key || e, e.value)) : e = new b(e);
      var t = re(this.items, e.key), o = this.schema && this.schema.sortMapEntries;
      if (t)
        if (n)
          t.value = e.value;
        else
          throw new Error("Key ".concat(e.key, " already set"));
      else if (o) {
        var f = this.items.findIndex(function(u) {
          return o(e, u) < 0;
        });
        f === -1 ? this.items.push(e) : this.items.splice(f, 0, e);
      } else
        this.items.push(e);
    }
  }, {
    key: "delete",
    value: function(e) {
      var n = re(this.items, e);
      if (!n)
        return !1;
      var t = this.items.splice(this.items.indexOf(n), 1);
      return t.length > 0;
    }
  }, {
    key: "get",
    value: function(e, n) {
      var t = re(this.items, e), o = t && t.value;
      return !n && o instanceof N ? o.value : o;
    }
  }, {
    key: "has",
    value: function(e) {
      return !!re(this.items, e);
    }
  }, {
    key: "set",
    value: function(e, n) {
      this.add(new b(e, n), !0);
    }
  }, {
    key: "toJSON",
    value: function(e, n, t) {
      var o = t ? new t() : n && n.mapAsMap ? /* @__PURE__ */ new Map() : {};
      n && n.onCreate && n.onCreate(o);
      var f = I(this.items), u;
      try {
        for (f.s(); !(u = f.n()).done; ) {
          var l = u.value;
          l.addToJSMap(n, o);
        }
      } catch (c) {
        f.e(c);
      } finally {
        f.f();
      }
      return o;
    }
  }, {
    key: "toString",
    value: function(e, n, t) {
      if (!e)
        return JSON.stringify(this);
      var o = I(this.items), f;
      try {
        for (o.s(); !(f = o.n()).done; ) {
          var u = f.value;
          if (!(u instanceof b))
            throw new Error("Map items must all be pairs; found ".concat(JSON.stringify(u), " instead"));
        }
      } catch (l) {
        o.e(l);
      } finally {
        o.f();
      }
      return oe(fe(s.prototype), "toString", this).call(this, e, {
        blockItem: function(c) {
          return c.str;
        },
        flowChars: {
          start: "{",
          end: "}"
        },
        isMap: !0,
        itemIndent: e.indent || ""
      }, n, t);
    }
  }]), s;
}(R), Le = "<<", $e = /* @__PURE__ */ function(a) {
  $(s, a);
  var r = U(s);
  function s(i) {
    var e;
    if (W(this, s), i instanceof b) {
      var n = i.value;
      n instanceof X || (n = new X(), n.items.push(i.value), n.range = i.value.range), e = r.call(this, i.key, n), e.range = i.range;
    } else
      e = r.call(this, new N(Le), new X());
    return e.type = b.Type.MERGE_PAIR, Ce(e);
  }
  return Y(s, [{
    key: "addToJSMap",
    value: function(e, n) {
      var t = I(this.value.items), o;
      try {
        for (t.s(); !(o = t.n()).done; ) {
          var f = o.value.source;
          if (!(f instanceof Oe))
            throw new Error("Merge sources must be maps");
          var u = f.toJSON(null, e, Map), l = I(u), c;
          try {
            for (l.s(); !(c = l.n()).done; ) {
              var v = Re(c.value, 2), g = v[0], p = v[1];
              n instanceof Map ? n.has(g) || n.set(g, p) : n instanceof Set ? n.add(g) : Object.prototype.hasOwnProperty.call(n, g) || Object.defineProperty(n, g, {
                value: p,
                writable: !0,
                enumerable: !0,
                configurable: !0
              });
            }
          } catch (d) {
            l.e(d);
          } finally {
            l.f();
          }
        }
      } catch (d) {
        t.e(d);
      } finally {
        t.f();
      }
      return n;
    }
  }, {
    key: "toString",
    value: function(e, n) {
      var t = this.value;
      if (t.items.length > 1)
        return oe(fe(s.prototype), "toString", this).call(this, e, n);
      this.value = t.items[0];
      var o = oe(fe(s.prototype), "toString", this).call(this, e, n);
      return this.value = t, o;
    }
  }]), s;
}(b), sn = {
  defaultType: h.BLOCK_LITERAL,
  lineWidth: 76
}, on = {
  trueStr: "true",
  falseStr: "false"
}, fn = {
  asBigInt: !1
}, un = {
  nullStr: "null"
}, q = {
  defaultType: h.PLAIN,
  doubleQuoted: {
    jsonEncoding: !1,
    minMultiLineLength: 40
  },
  fold: {
    lineWidth: 80,
    minContentWidth: 20
  }
};
function ge(a, r, s) {
  var i = I(r), e;
  try {
    for (i.s(); !(e = i.n()).done; ) {
      var n = e.value, t = n.format, o = n.test, f = n.resolve;
      if (o) {
        var u = a.match(o);
        if (u) {
          var l = f.apply(null, u);
          return l instanceof N || (l = new N(l)), t && (l.format = t), l;
        }
      }
    }
  } catch (c) {
    i.e(c);
  } finally {
    i.f();
  }
  return s && (a = s(a)), new N(a);
}
var Ee = "flow", pe = "block", te = "quoted", be = function(r, s) {
  for (var i = r[s + 1]; i === " " || i === "	"; ) {
    do
      i = r[s += 1];
    while (i && i !== `
`);
    i = r[s + 1];
  }
  return s;
};
function ve(a, r, s, i) {
  var e = i.indentAtStart, n = i.lineWidth, t = n === void 0 ? 80 : n, o = i.minContentWidth, f = o === void 0 ? 20 : o, u = i.onFold, l = i.onOverflow;
  if (!t || t < 0)
    return a;
  var c = Math.max(1 + f, 1 + t - r.length);
  if (a.length <= c)
    return a;
  var v = [], g = {}, p = t - r.length;
  typeof e == "number" && (e > t - Math.max(2, f) ? v.push(0) : p = t - e);
  var d = void 0, w = void 0, S = !1, m = -1, A = -1, M = -1;
  s === pe && (m = be(a, m), m !== -1 && (p = m + c));
  for (var O; O = a[m += 1]; ) {
    if (s === te && O === "\\") {
      switch (A = m, a[m + 1]) {
        case "x":
          m += 3;
          break;
        case "u":
          m += 5;
          break;
        case "U":
          m += 9;
          break;
        default:
          m += 1;
      }
      M = m;
    }
    if (O === `
`)
      s === pe && (m = be(a, m)), p = m + c, d = void 0;
    else {
      if (O === " " && w && w !== " " && w !== `
` && w !== "	") {
        var y = a[m + 1];
        y && y !== " " && y !== `
` && y !== "	" && (d = m);
      }
      if (m >= p)
        if (d)
          v.push(d), p = d + c, d = void 0;
        else if (s === te) {
          for (; w === " " || w === "	"; )
            w = O, O = a[m += 1], S = !0;
          var _ = m > M + 1 ? m - 2 : A - 1;
          if (g[_])
            return a;
          v.push(_), g[_] = !0, p = _ + c, d = void 0;
        } else
          S = !0;
    }
    w = O;
  }
  if (S && l && l(), v.length === 0)
    return a;
  u && u();
  for (var T = a.slice(0, v[0]), F = 0; F < v.length; ++F) {
    var E = v[F], B = v[F + 1] || a.length;
    E === 0 ? T = `
`.concat(r).concat(a.slice(0, B)) : (s === te && g[E] && (T += "".concat(a[E], "\\")), T += `
`.concat(r).concat(a.slice(E + 1, B)));
  }
  return T;
}
var de = function(r) {
  var s = r.indentAtStart;
  return s ? Object.assign({
    indentAtStart: s
  }, q.fold) : q.fold;
}, he = function(r) {
  return /^(%|---|\.\.\.)/m.test(r);
};
function Ue(a, r, s) {
  if (!r || r < 0)
    return !1;
  var i = r - s, e = a.length;
  if (e <= i)
    return !1;
  for (var n = 0, t = 0; n < e; ++n)
    if (a[n] === `
`) {
      if (n - t > i)
        return !0;
      if (t = n + 1, e - t <= i)
        return !1;
    }
  return !0;
}
function Q(a, r) {
  var s = r.implicitKey, i = q.doubleQuoted, e = i.jsonEncoding, n = i.minMultiLineLength, t = JSON.stringify(a);
  if (e)
    return t;
  for (var o = r.indent || (he(a) ? "  " : ""), f = "", u = 0, l = 0, c = t[l]; c; c = t[++l])
    if (c === " " && t[l + 1] === "\\" && t[l + 2] === "n" && (f += t.slice(u, l) + "\\ ", l += 1, u = l, c = "\\"), c === "\\")
      switch (t[l + 1]) {
        case "u":
          {
            f += t.slice(u, l);
            var v = t.substr(l + 2, 4);
            switch (v) {
              case "0000":
                f += "\\0";
                break;
              case "0007":
                f += "\\a";
                break;
              case "000b":
                f += "\\v";
                break;
              case "001b":
                f += "\\e";
                break;
              case "0085":
                f += "\\N";
                break;
              case "00a0":
                f += "\\_";
                break;
              case "2028":
                f += "\\L";
                break;
              case "2029":
                f += "\\P";
                break;
              default:
                v.substr(0, 2) === "00" ? f += "\\x" + v.substr(2) : f += t.substr(l, 6);
            }
            l += 5, u = l + 1;
          }
          break;
        case "n":
          if (s || t[l + 2] === '"' || t.length < n)
            l += 1;
          else {
            for (f += t.slice(u, l) + `

`; t[l + 2] === "\\" && t[l + 3] === "n" && t[l + 4] !== '"'; )
              f += `
`, l += 2;
            f += o, t[l + 2] === " " && (f += "\\"), l += 1, u = l + 1;
          }
          break;
        default:
          l += 1;
      }
  return f = u ? f + t.slice(u) : t, s ? f : ve(f, o, te, de(r));
}
function Ae(a, r) {
  if (r.implicitKey) {
    if (/\n/.test(a))
      return Q(a, r);
  } else if (/[ \t]\n|\n[ \t]/.test(a))
    return Q(a, r);
  var s = r.indent || (he(a) ? "  " : ""), i = "'" + a.replace(/'/g, "''").replace(/\n+/g, `$&
`.concat(s)) + "'";
  return r.implicitKey ? i : ve(i, s, Ee, de(r));
}
function ae(a, r, s, i) {
  var e = a.comment, n = a.type, t = a.value;
  if (/\n[\t ]+$/.test(t) || /^\s*$/.test(t))
    return Q(t, r);
  var o = r.indent || (r.forceBlockIndent || he(t) ? "  " : ""), f = o ? "2" : "1", u = n === h.BLOCK_FOLDED ? !1 : n === h.BLOCK_LITERAL ? !0 : !Ue(t, q.fold.lineWidth, o.length), l = u ? "|" : ">";
  if (!t)
    return l + `
`;
  var c = "", v = "";
  if (t = t.replace(/[\n\t ]*$/, function(p) {
    var d = p.indexOf(`
`);
    return d === -1 ? l += "-" : (t === p || d !== p.length - 1) && (l += "+", i && i()), v = p.replace(/\n$/, ""), "";
  }).replace(/^[\n ]*/, function(p) {
    p.indexOf(" ") !== -1 && (l += f);
    var d = p.match(/ +$/);
    return d ? (c = p.slice(0, -d[0].length), d[0]) : (c = p, "");
  }), v && (v = v.replace(/\n+(?!\n|$)/g, "$&".concat(o))), c && (c = c.replace(/\n+/g, "$&".concat(o))), e && (l += " #" + e.replace(/ ?[\r\n]+/g, " "), s && s()), !t)
    return "".concat(l).concat(f, `
`).concat(o).concat(v);
  if (u)
    return t = t.replace(/\n+/g, "$&".concat(o)), "".concat(l, `
`).concat(o).concat(c).concat(t).concat(v);
  t = t.replace(/\n+/g, `
$&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g, "$1$2").replace(/\n+/g, "$&".concat(o));
  var g = ve("".concat(c).concat(t).concat(v), o, pe, q.fold);
  return "".concat(l, `
`).concat(o).concat(g);
}
function Ye(a, r, s, i) {
  var e = a.comment, n = a.type, t = a.value, o = r.actualString, f = r.implicitKey, u = r.indent, l = r.inFlow;
  if (f && /[\n[\]{},]/.test(t) || l && /[[\]{},]/.test(t))
    return Q(t, r);
  if (!t || /^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(t))
    return f || l || t.indexOf(`
`) === -1 ? t.indexOf('"') !== -1 && t.indexOf("'") === -1 ? Ae(t, r) : Q(t, r) : ae(a, r, s, i);
  if (!f && !l && n !== h.PLAIN && t.indexOf(`
`) !== -1)
    return ae(a, r, s, i);
  if (u === "" && he(t))
    return r.forceBlockIndent = !0, ae(a, r, s, i);
  var c = t.replace(/\n+/g, `$&
`.concat(u));
  if (o) {
    var v = r.doc.schema.tags, g = ge(c, v, v.scalarFallback).value;
    if (typeof g != "string")
      return Q(t, r);
  }
  var p = f ? c : ve(c, u, Ee, de(r));
  return e && !l && (p.indexOf(`
`) !== -1 || e.indexOf(`
`) !== -1) ? (s && s(), Je(p, u, e)) : p;
}
function ln(a, r, s, i) {
  var e = q.defaultType, n = r.implicitKey, t = r.inFlow, o = a, f = o.type, u = o.value;
  typeof u != "string" && (u = String(u), a = Object.assign({}, a, {
    value: u
  }));
  var l = function(g) {
    switch (g) {
      case h.BLOCK_FOLDED:
      case h.BLOCK_LITERAL:
        return ae(a, r, s, i);
      case h.QUOTE_DOUBLE:
        return Q(u, r);
      case h.QUOTE_SINGLE:
        return Ae(u, r);
      case h.PLAIN:
        return Ye(a, r, s, i);
      default:
        return null;
    }
  };
  f !== h.QUOTE_DOUBLE && /[\x00-\x08\x0b-\x1f\x7f-\x9f]/.test(u) ? f = h.QUOTE_DOUBLE : (n || t) && (f === h.BLOCK_FOLDED || f === h.BLOCK_LITERAL) && (f = h.QUOTE_DOUBLE);
  var c = l(f);
  if (c === null && (c = l(e), c === null))
    throw new Error("Unsupported default string type ".concat(e));
  return c;
}
function cn(a) {
  var r = a.format, s = a.minFractionDigits, i = a.tag, e = a.value;
  if (typeof e == "bigint")
    return String(e);
  if (!isFinite(e))
    return isNaN(e) ? ".nan" : e < 0 ? "-.inf" : ".inf";
  var n = JSON.stringify(e);
  if (!r && s && (!i || i === "tag:yaml.org,2002:float") && /^\d/.test(n)) {
    var t = n.indexOf(".");
    t < 0 && (t = n.length, n += ".");
    for (var o = s - (n.length - t - 1); o-- > 0; )
      n += "0";
  }
  return n;
}
function Me(a, r) {
  var s, i;
  switch (r.type) {
    case h.FLOW_MAP:
      s = "}", i = "flow map";
      break;
    case h.FLOW_SEQ:
      s = "]", i = "flow sequence";
      break;
    default:
      a.push(new k(r, "Not a flow collection!?"));
      return;
  }
  for (var e, n = r.items.length - 1; n >= 0; --n) {
    var t = r.items[n];
    if (!t || t.type !== h.COMMENT) {
      e = t;
      break;
    }
  }
  if (e && e.char !== s) {
    var o = "Expected ".concat(i, " to end with ").concat(s), f;
    typeof e.offset == "number" ? (f = new k(r, o), f.offset = e.offset + 1) : (f = new k(e, o), e.range && e.range.end && (f.offset = e.range.end - e.range.start)), a.push(f);
  }
}
function Ne(a, r) {
  var s = r.context.src[r.range.start - 1];
  if (s !== `
` && s !== "	" && s !== " ") {
    var i = "Comments must be separated from other tokens by white space characters";
    a.push(new k(r, i));
  }
}
function Ie(a, r) {
  var s = String(r), i = s.substr(0, 8) + "..." + s.substr(-8);
  return new k(a, 'The "'.concat(i, '" key is too long'));
}
function _e(a, r) {
  var s = I(r), i;
  try {
    for (s.s(); !(i = s.n()).done; ) {
      var e = i.value, n = e.afterKey, t = e.before, o = e.comment, f = a.items[t];
      f ? (n && f.value && (f = f.value), o === void 0 ? (n || !f.commentBefore) && (f.spaceBefore = !0) : f.commentBefore ? f.commentBefore += `
` + o : f.commentBefore = o) : o !== void 0 && (a.comment ? a.comment += `
` + o : a.comment = o);
    }
  } catch (u) {
    s.e(u);
  } finally {
    s.f();
  }
}
function Te(a, r) {
  var s = r.strValue;
  return s ? typeof s == "string" ? s : (s.errors.forEach(function(i) {
    i.source || (i.source = r), a.errors.push(i);
  }), s.str) : "";
}
function qe(a, r) {
  var s = r.tag, i = s.handle, e = s.suffix, n = a.tagPrefixes.find(function(f) {
    return f.handle === i;
  });
  if (!n) {
    var t = a.getDefaults().tagPrefixes;
    if (t && (n = t.find(function(f) {
      return f.handle === i;
    })), !n)
      throw new k(r, "The ".concat(i, " tag handle is non-default and was not declared."));
  }
  if (!e)
    throw new k(r, "The ".concat(i, " tag has no suffix."));
  if (i === "!" && (a.version || a.options.version) === "1.0") {
    if (e[0] === "^")
      return a.warnings.push(new le(r, "YAML 1.0 ^ tag expansion is not supported")), e;
    if (/[:/]/.test(e)) {
      var o = e.match(/^([a-z0-9-]+)\/(.*)/i);
      return o ? "tag:".concat(o[1], ".yaml.org,2002:").concat(o[2]) : "tag:".concat(e);
    }
  }
  return n.prefix + decodeURIComponent(e);
}
function je(a, r) {
  var s = r.tag, i = r.type, e = !1;
  if (s) {
    var n = s.handle, t = s.suffix, o = s.verbatim;
    if (o) {
      if (o !== "!" && o !== "!!")
        return o;
      var f = "Verbatim tags aren't resolved, so ".concat(o, " is invalid.");
      a.errors.push(new k(r, f));
    } else if (n === "!" && !t)
      e = !0;
    else
      try {
        return qe(a, r);
      } catch (u) {
        a.errors.push(u);
      }
  }
  switch (i) {
    case h.BLOCK_FOLDED:
    case h.BLOCK_LITERAL:
    case h.QUOTE_DOUBLE:
    case h.QUOTE_SINGLE:
      return J.STR;
    case h.FLOW_MAP:
    case h.MAP:
      return J.MAP;
    case h.FLOW_SEQ:
    case h.SEQ:
      return J.SEQ;
    case h.PLAIN:
      return e ? J.STR : null;
    default:
      return null;
  }
}
function ke(a, r, s) {
  var i = a.schema.tags, e = [], n = I(i), t;
  try {
    for (n.s(); !(t = n.n()).done; ) {
      var o = t.value;
      if (o.tag === s)
        if (o.test)
          e.push(o);
        else {
          var f = o.resolve(a, r);
          return f instanceof R ? f : new N(f);
        }
    }
  } catch (l) {
    n.e(l);
  } finally {
    n.f();
  }
  var u = Te(a, r);
  return typeof u == "string" && e.length > 0 ? ge(u, e, i.scalarFallback) : null;
}
function Ve(a) {
  var r = a.type;
  switch (r) {
    case h.FLOW_MAP:
    case h.MAP:
      return J.MAP;
    case h.FLOW_SEQ:
    case h.SEQ:
      return J.SEQ;
    default:
      return J.STR;
  }
}
function Ge(a, r, s) {
  try {
    var i = ke(a, r, s);
    if (i)
      return s && r.tag && (i.tag = s), i;
  } catch (f) {
    return f.source || (f.source = r), a.errors.push(f), null;
  }
  try {
    var e = Ve(r);
    if (!e)
      throw new Error("The tag ".concat(s, " is unavailable"));
    var n = "The tag ".concat(s, " is unavailable, falling back to ").concat(e);
    a.warnings.push(new le(r, n));
    var t = ke(a, r, e);
    return t.tag = s, t;
  } catch (f) {
    var o = new ie(r, f.message);
    return o.stack = f.stack, a.errors.push(o), null;
  }
}
var He = function(r) {
  if (!r)
    return !1;
  var s = r.type;
  return s === h.MAP_KEY || s === h.MAP_VALUE || s === h.SEQ_ITEM;
};
function ze(a, r) {
  var s = {
    before: [],
    after: []
  }, i = !1, e = !1, n = He(r.context.parent) ? r.context.parent.props.concat(r.props) : r.props, t = I(n), o;
  try {
    for (t.s(); !(o = t.n()).done; ) {
      var f = o.value, u = f.start, l = f.end;
      switch (r.context.src[u]) {
        case z.COMMENT: {
          if (!r.commentHasRequiredWhitespace(u)) {
            var c = "Comments must be separated from other tokens by white space characters";
            a.push(new k(r, c));
          }
          var v = r.header, g = r.valueRange, p = g && (u > g.start || v && u > v.start) ? s.after : s.before;
          p.push(r.context.src.slice(u + 1, l));
          break;
        }
        case z.ANCHOR:
          if (i) {
            var d = "A node can have at most one anchor";
            a.push(new k(r, d));
          }
          i = !0;
          break;
        case z.TAG:
          if (e) {
            var w = "A node can have at most one tag";
            a.push(new k(r, w));
          }
          e = !0;
          break;
      }
    }
  } catch (S) {
    t.e(S);
  } finally {
    t.f();
  }
  return {
    comments: s,
    hasAnchor: i,
    hasTag: e
  };
}
function Xe(a, r) {
  var s = a.anchors, i = a.errors, e = a.schema;
  if (r.type === h.ALIAS) {
    var n = r.rawValue, t = s.getNode(n);
    if (!t) {
      var o = "Aliased anchor not found: ".concat(n);
      return i.push(new ie(r, o)), null;
    }
    var f = new ce(t);
    return s._cstAliases.push(f), f;
  }
  var u = je(a, r);
  if (u)
    return Ge(a, r, u);
  if (r.type !== h.PLAIN) {
    var l = "Failed to resolve ".concat(r.type, " node here");
    return i.push(new j(r, l)), null;
  }
  try {
    var c = Te(a, r);
    return ge(c, e.tags, e.tags.scalarFallback);
  } catch (v) {
    return v.source || (v.source = r), i.push(v), null;
  }
}
function D(a, r) {
  if (!r)
    return null;
  r.error && a.errors.push(r.error);
  var s = ze(a.errors, r), i = s.comments, e = s.hasAnchor, n = s.hasTag;
  if (e) {
    var t = a.anchors, o = r.anchor, f = t.getNode(o);
    f && (t.map[t.newName(o)] = f), t.map[o] = r;
  }
  if (r.type === h.ALIAS && (e || n)) {
    var u = "An alias node must not specify any properties";
    a.errors.push(new k(r, u));
  }
  var l = Xe(a, r);
  if (l) {
    l.range = [r.range.start, r.range.end], a.options.keepCstNodes && (l.cstNode = r), a.options.keepNodeTypes && (l.type = r.type);
    var c = i.before.join(`
`);
    c && (l.commentBefore = l.commentBefore ? "".concat(l.commentBefore, `
`).concat(c) : c);
    var v = i.after.join(`
`);
    v && (l.comment = l.comment ? "".concat(l.comment, `
`).concat(v) : v);
  }
  return r.resolved = l;
}
function vn(a, r) {
  if (r.type !== h.MAP && r.type !== h.FLOW_MAP) {
    var s = "A ".concat(r.type, " node cannot be resolved as a mapping");
    return a.errors.push(new j(r, s)), null;
  }
  var i = r.type === h.FLOW_MAP ? nn(a, r) : en(a, r), e = i.comments, n = i.items, t = new Oe();
  t.items = n, _e(t, e);
  for (var o = !1, f = 0; f < n.length; ++f) {
    var u = n[f].key;
    if (u instanceof R && (o = !0), a.schema.merge && u && u.value === Le) {
      n[f] = new $e(n[f]);
      var l = n[f].value.items, c = null;
      l.some(function(w) {
        if (w instanceof ce) {
          var S = w.source.type;
          return S === h.MAP || S === h.FLOW_MAP ? !1 : c = "Merge nodes aliases can only point to maps";
        }
        return c = "Merge nodes can only have Alias nodes as values";
      }), c && a.errors.push(new k(r, c));
    } else
      for (var v = f + 1; v < n.length; ++v) {
        var g = n[v].key;
        if (u === g || u && g && Object.prototype.hasOwnProperty.call(u, "value") && u.value === g.value) {
          var p = 'Map keys must be unique; "'.concat(u, '" is repeated');
          a.errors.push(new k(r, p));
          break;
        }
      }
  }
  if (o && !a.options.mapAsMap) {
    var d = "Keys with collection values will be stringified as YAML due to JS Object restrictions. Use mapAsMap: true to avoid this.";
    a.warnings.push(new le(r, d));
  }
  return r.resolved = t, t;
}
var Ze = function(r) {
  var s = r.context, i = s.lineStart, e = s.node, n = s.src, t = r.props;
  if (t.length === 0)
    return !1;
  var o = t[0].start;
  if (e && o > e.valueRange.start || n[o] !== z.COMMENT)
    return !1;
  for (var f = i; f < o; ++f)
    if (n[f] === `
`)
      return !1;
  return !0;
};
function xe(a, r) {
  if (!!Ze(a)) {
    var s = a.getPropValue(0, z.COMMENT, !0), i = !1, e = r.value.commentBefore;
    if (e && e.startsWith(s))
      r.value.commentBefore = e.substr(s.length + 1), i = !0;
    else {
      var n = r.value.comment;
      !a.node && n && n.startsWith(s) && (r.value.comment = n.substr(s.length + 1), i = !0);
    }
    i && (r.comment = s);
  }
}
function en(a, r) {
  for (var s = [], i = [], e = void 0, n = null, t = 0; t < r.items.length; ++t) {
    var o = r.items[t];
    switch (o.type) {
      case h.BLANK_LINE:
        s.push({
          afterKey: !!e,
          before: i.length
        });
        break;
      case h.COMMENT:
        s.push({
          afterKey: !!e,
          before: i.length,
          comment: o.comment
        });
        break;
      case h.MAP_KEY:
        e !== void 0 && i.push(new b(e)), o.error && a.errors.push(o.error), e = D(a, o.node), n = null;
        break;
      case h.MAP_VALUE:
        {
          if (e === void 0 && (e = null), o.error && a.errors.push(o.error), !o.context.atLineStart && o.node && o.node.type === h.MAP && !o.node.context.atLineStart) {
            var f = "Nested mappings are not allowed in compact mappings";
            a.errors.push(new k(o.node, f));
          }
          var u = o.node;
          if (!u && o.props.length > 0) {
            u = new We(h.PLAIN, []), u.context = {
              parent: o,
              src: o.context.src
            };
            var l = o.range.start + 1;
            if (u.range = {
              start: l,
              end: l
            }, u.valueRange = {
              start: l,
              end: l
            }, typeof o.range.origStart == "number") {
              var c = o.range.origStart + 1;
              u.range.origStart = u.range.origEnd = c, u.valueRange.origStart = u.valueRange.origEnd = c;
            }
          }
          var v = new b(e, D(a, u));
          xe(o, v), i.push(v), e && typeof n == "number" && o.range.start > n + 1024 && a.errors.push(Ie(r, e)), e = void 0, n = null;
        }
        break;
      default:
        e !== void 0 && i.push(new b(e)), e = D(a, o), n = o.range.start, o.error && a.errors.push(o.error);
        e:
          for (var g = t + 1; ; ++g) {
            var p = r.items[g];
            switch (p && p.type) {
              case h.BLANK_LINE:
              case h.COMMENT:
                continue e;
              case h.MAP_VALUE:
                break e;
              default: {
                var d = "Implicit map keys need to be followed by map values";
                a.errors.push(new k(o, d));
                break e;
              }
            }
          }
        if (o.valueRangeContainsNewline) {
          var w = "Implicit map keys need to be on a single line";
          a.errors.push(new k(o, w));
        }
    }
  }
  return e !== void 0 && i.push(new b(e)), {
    comments: s,
    items: i
  };
}
function nn(a, r) {
  for (var s = [], i = [], e = void 0, n = !1, t = "{", o = 0; o < r.items.length; ++o) {
    var f = r.items[o];
    if (typeof f.char == "string") {
      var u = f.char, l = f.offset;
      if (u === "?" && e === void 0 && !n) {
        n = !0, t = ":";
        continue;
      }
      if (u === ":") {
        if (e === void 0 && (e = null), t === ":") {
          t = ",";
          continue;
        }
      } else if (n && (e === void 0 && u !== "," && (e = null), n = !1), e !== void 0 && (i.push(new b(e)), e = void 0, u === ",")) {
        t = ":";
        continue;
      }
      if (u === "}") {
        if (o === r.items.length - 1)
          continue;
      } else if (u === t) {
        t = ":";
        continue;
      }
      var c = "Flow map contains an unexpected ".concat(u), v = new j(r, c);
      v.offset = l, a.errors.push(v);
    } else
      f.type === h.BLANK_LINE ? s.push({
        afterKey: !!e,
        before: i.length
      }) : f.type === h.COMMENT ? (Ne(a.errors, f), s.push({
        afterKey: !!e,
        before: i.length,
        comment: f.comment
      })) : e === void 0 ? (t === "," && a.errors.push(new k(f, "Separator , missing in flow map")), e = D(a, f)) : (t !== "," && a.errors.push(new k(f, "Indicator : missing in flow map entry")), i.push(new b(e, D(a, f))), e = void 0, n = !1);
  }
  return Me(a.errors, r), e !== void 0 && i.push(new b(e)), {
    comments: s,
    items: i
  };
}
function hn(a, r) {
  if (r.type !== h.SEQ && r.type !== h.FLOW_SEQ) {
    var s = "A ".concat(r.type, " node cannot be resolved as a sequence");
    return a.errors.push(new j(r, s)), null;
  }
  var i = r.type === h.FLOW_SEQ ? tn(a, r) : rn(a, r), e = i.comments, n = i.items, t = new X();
  if (t.items = n, _e(t, e), !a.options.mapAsMap && n.some(function(f) {
    return f instanceof b && f.key instanceof R;
  })) {
    var o = "Keys with collection values will be stringified as YAML due to JS Object restrictions. Use mapAsMap: true to avoid this.";
    a.warnings.push(new le(r, o));
  }
  return r.resolved = t, t;
}
function rn(a, r) {
  for (var s = [], i = [], e = 0; e < r.items.length; ++e) {
    var n = r.items[e];
    switch (n.type) {
      case h.BLANK_LINE:
        s.push({
          before: i.length
        });
        break;
      case h.COMMENT:
        s.push({
          comment: n.comment,
          before: i.length
        });
        break;
      case h.SEQ_ITEM:
        if (n.error && a.errors.push(n.error), i.push(D(a, n.node)), n.hasProps) {
          var t = "Sequence items cannot have tags or anchors before the - indicator";
          a.errors.push(new k(n, t));
        }
        break;
      default:
        n.error && a.errors.push(n.error), a.errors.push(new j(n, "Unexpected ".concat(n.type, " node in sequence")));
    }
  }
  return {
    comments: s,
    items: i
  };
}
function tn(a, r) {
  for (var s = [], i = [], e = !1, n = void 0, t = null, o = "[", f = null, u = 0; u < r.items.length; ++u) {
    var l = r.items[u];
    if (typeof l.char == "string") {
      var c = l.char, v = l.offset;
      if (c !== ":" && (e || n !== void 0) && (e && n === void 0 && (n = o ? i.pop() : null), i.push(new b(n)), e = !1, n = void 0, t = null), c === o)
        o = null;
      else if (!o && c === "?")
        e = !0;
      else if (o !== "[" && c === ":" && n === void 0) {
        if (o === ",") {
          if (n = i.pop(), n instanceof b) {
            var g = "Chaining flow sequence pairs is invalid", p = new k(r, g);
            p.offset = v, a.errors.push(p);
          }
          if (!e && typeof t == "number") {
            var d = l.range ? l.range.start : l.offset;
            d > t + 1024 && a.errors.push(Ie(r, n));
            for (var w = f.context.src, S = t; S < d; ++S)
              if (w[S] === `
`) {
                var m = "Implicit keys of flow sequence pairs need to be on a single line";
                a.errors.push(new k(f, m));
                break;
              }
          }
        } else
          n = null;
        t = null, e = !1, o = null;
      } else if (o === "[" || c !== "]" || u < r.items.length - 1) {
        var A = "Flow sequence contains an unexpected ".concat(c), M = new j(r, A);
        M.offset = v, a.errors.push(M);
      }
    } else if (l.type === h.BLANK_LINE)
      s.push({
        before: i.length
      });
    else if (l.type === h.COMMENT)
      Ne(a.errors, l), s.push({
        comment: l.comment,
        before: i.length
      });
    else {
      if (o) {
        var O = "Expected a ".concat(o, " in flow sequence");
        a.errors.push(new k(l, O));
      }
      var y = D(a, l);
      n === void 0 ? (i.push(y), f = l) : (i.push(new b(n, y)), n = void 0), t = l.range.start, o = ",";
    }
  }
  return Me(a.errors, r), n !== void 0 && i.push(new b(n)), {
    comments: s,
    items: i
  };
}
export {
  ce as A,
  R as C,
  $e as M,
  C as N,
  b as P,
  N as S,
  X as Y,
  on as a,
  sn as b,
  ln as c,
  Oe as d,
  Ke as e,
  H as f,
  vn as g,
  hn as h,
  fn as i,
  Te as j,
  cn as k,
  re as l,
  un as n,
  D as r,
  q as s,
  K as t
};
//# sourceMappingURL=resolveSeq-492ab440.js.map
