UNPKG

mermaid

Version:

Markdown-ish syntax for generating flowcharts, sequence diagrams, class diagrams, gantt charts and git graphs.

1,596 lines (1,595 loc) 85.4 kB
import { l as g, a as Se, s as Te, g as ke, b as Ee, c as Hi, d as Ne, e as xi, f as Oe } from "./config-e567ef17.js"; import { s as Fe } from "./setupGraphViewbox-a4603a92.js"; import { c as Me } from "./commonDb-4dc3d465.js"; var gi = {}; Object.defineProperty(gi, "__esModule", { value: !0 }); var qi = gi.sanitizeUrl = void 0, Ie = /^([^\w]*)(javascript|data|vbscript)/im, $e = /&#(\w+)(^\w|;)?/g, Pe = /[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim, je = /^([^:]+):/gm, Le = [".", "/"]; function De(i) { return Le.indexOf(i[0]) > -1; } function Re(i) { return i.replace($e, function(e, n) { return String.fromCharCode(n); }); } function ze(i) { var e = Re(i || "").replace(Pe, "").trim(); if (!e) return "about:blank"; if (De(e)) return e; var n = e.match(je); if (!n) return e; var t = n[0]; return Ie.test(t) ? "about:blank" : e; } qi = gi.sanitizeUrl = ze; const Ko = Math.abs, Vo = Math.atan2, Xo = Math.cos, Jo = Math.max, Zo = Math.min, Qo = Math.sin, is = Math.sqrt, Ni = 1e-12, mi = Math.PI, Oi = mi / 2, es = 2 * mi; function ns(i) { return i > 1 ? 0 : i < -1 ? mi : Math.acos(i); } function ts(i) { return i >= 1 ? Oi : i <= -1 ? -Oi : Math.asin(i); } function Gi(i) { this._context = i; } Gi.prototype = { areaStart: function() { this._line = 0; }, areaEnd: function() { this._line = NaN; }, lineStart: function() { this._point = 0; }, lineEnd: function() { (this._line || this._line !== 0 && this._point === 1) && this._context.closePath(), this._line = 1 - this._line; }, point: function(i, e) { switch (i = +i, e = +e, this._point) { case 0: this._point = 1, this._line ? this._context.lineTo(i, e) : this._context.moveTo(i, e); break; case 1: this._point = 2; default: this._context.lineTo(i, e); break; } } }; function Be(i) { return new Gi(i); } class Ki { constructor(e, n) { this._context = e, this._x = n; } areaStart() { this._line = 0; } areaEnd() { this._line = NaN; } lineStart() { this._point = 0; } lineEnd() { (this._line || this._line !== 0 && this._point === 1) && this._context.closePath(), this._line = 1 - this._line; } point(e, n) { switch (e = +e, n = +n, this._point) { case 0: { this._point = 1, this._line ? this._context.lineTo(e, n) : this._context.moveTo(e, n); break; } case 1: this._point = 2; default: { this._x ? this._context.bezierCurveTo(this._x0 = (this._x0 + e) / 2, this._y0, this._x0, n, e, n) : this._context.bezierCurveTo(this._x0, this._y0 = (this._y0 + n) / 2, e, this._y0, e, n); break; } } this._x0 = e, this._y0 = n; } } function Ye(i) { return new Ki(i, !0); } function We(i) { return new Ki(i, !1); } function E() { } function K(i, e, n) { i._context.bezierCurveTo( (2 * i._x0 + i._x1) / 3, (2 * i._y0 + i._y1) / 3, (i._x0 + 2 * i._x1) / 3, (i._y0 + 2 * i._y1) / 3, (i._x0 + 4 * i._x1 + e) / 6, (i._y0 + 4 * i._y1 + n) / 6 ); } function ri(i) { this._context = i; } ri.prototype = { areaStart: function() { this._line = 0; }, areaEnd: function() { this._line = NaN; }, lineStart: function() { this._x0 = this._x1 = this._y0 = this._y1 = NaN, this._point = 0; }, lineEnd: function() { switch (this._point) { case 3: K(this, this._x1, this._y1); case 2: this._context.lineTo(this._x1, this._y1); break; } (this._line || this._line !== 0 && this._point === 1) && this._context.closePath(), this._line = 1 - this._line; }, point: function(i, e) { switch (i = +i, e = +e, this._point) { case 0: this._point = 1, this._line ? this._context.lineTo(i, e) : this._context.moveTo(i, e); break; case 1: this._point = 2; break; case 2: this._point = 3, this._context.lineTo((5 * this._x0 + this._x1) / 6, (5 * this._y0 + this._y1) / 6); default: K(this, i, e); break; } this._x0 = this._x1, this._x1 = i, this._y0 = this._y1, this._y1 = e; } }; function Ue(i) { return new ri(i); } function Vi(i) { this._context = i; } Vi.prototype = { areaStart: E, areaEnd: E, lineStart: function() { this._x0 = this._x1 = this._x2 = this._x3 = this._x4 = this._y0 = this._y1 = this._y2 = this._y3 = this._y4 = NaN, this._point = 0; }, lineEnd: function() { switch (this._point) { case 1: { this._context.moveTo(this._x2, this._y2), this._context.closePath(); break; } case 2: { this._context.moveTo((this._x2 + 2 * this._x3) / 3, (this._y2 + 2 * this._y3) / 3), this._context.lineTo((this._x3 + 2 * this._x2) / 3, (this._y3 + 2 * this._y2) / 3), this._context.closePath(); break; } case 3: { this.point(this._x2, this._y2), this.point(this._x3, this._y3), this.point(this._x4, this._y4); break; } } }, point: function(i, e) { switch (i = +i, e = +e, this._point) { case 0: this._point = 1, this._x2 = i, this._y2 = e; break; case 1: this._point = 2, this._x3 = i, this._y3 = e; break; case 2: this._point = 3, this._x4 = i, this._y4 = e, this._context.moveTo((this._x0 + 4 * this._x1 + i) / 6, (this._y0 + 4 * this._y1 + e) / 6); break; default: K(this, i, e); break; } this._x0 = this._x1, this._x1 = i, this._y0 = this._y1, this._y1 = e; } }; function He(i) { return new Vi(i); } function Xi(i) { this._context = i; } Xi.prototype = { areaStart: function() { this._line = 0; }, areaEnd: function() { this._line = NaN; }, lineStart: function() { this._x0 = this._x1 = this._y0 = this._y1 = NaN, this._point = 0; }, lineEnd: function() { (this._line || this._line !== 0 && this._point === 3) && this._context.closePath(), this._line = 1 - this._line; }, point: function(i, e) { switch (i = +i, e = +e, this._point) { case 0: this._point = 1; break; case 1: this._point = 2; break; case 2: this._point = 3; var n = (this._x0 + 4 * this._x1 + i) / 6, t = (this._y0 + 4 * this._y1 + e) / 6; this._line ? this._context.lineTo(n, t) : this._context.moveTo(n, t); break; case 3: this._point = 4; default: K(this, i, e); break; } this._x0 = this._x1, this._x1 = i, this._y0 = this._y1, this._y1 = e; } }; function qe(i) { return new Xi(i); } function Ji(i, e) { this._basis = new ri(i), this._beta = e; } Ji.prototype = { lineStart: function() { this._x = [], this._y = [], this._basis.lineStart(); }, lineEnd: function() { var i = this._x, e = this._y, n = i.length - 1; if (n > 0) for (var t = i[0], r = e[0], s = i[n] - t, o = e[n] - r, l = -1, a; ++l <= n; ) a = l / n, this._basis.point( this._beta * i[l] + (1 - this._beta) * (t + a * s), this._beta * e[l] + (1 - this._beta) * (r + a * o) ); this._x = this._y = null, this._basis.lineEnd(); }, point: function(i, e) { this._x.push(+i), this._y.push(+e); } }; const Ge = function i(e) { function n(t) { return e === 1 ? new ri(t) : new Ji(t, e); } return n.beta = function(t) { return i(+t); }, n; }(0.85); function V(i, e, n) { i._context.bezierCurveTo( i._x1 + i._k * (i._x2 - i._x0), i._y1 + i._k * (i._y2 - i._y0), i._x2 + i._k * (i._x1 - e), i._y2 + i._k * (i._y1 - n), i._x2, i._y2 ); } function yi(i, e) { this._context = i, this._k = (1 - e) / 6; } yi.prototype = { areaStart: function() { this._line = 0; }, areaEnd: function() { this._line = NaN; }, lineStart: function() { this._x0 = this._x1 = this._x2 = this._y0 = this._y1 = this._y2 = NaN, this._point = 0; }, lineEnd: function() { switch (this._point) { case 2: this._context.lineTo(this._x2, this._y2); break; case 3: V(this, this._x1, this._y1); break; } (this._line || this._line !== 0 && this._point === 1) && this._context.closePath(), this._line = 1 - this._line; }, point: function(i, e) { switch (i = +i, e = +e, this._point) { case 0: this._point = 1, this._line ? this._context.lineTo(i, e) : this._context.moveTo(i, e); break; case 1: this._point = 2, this._x1 = i, this._y1 = e; break; case 2: this._point = 3; default: V(this, i, e); break; } this._x0 = this._x1, this._x1 = this._x2, this._x2 = i, this._y0 = this._y1, this._y1 = this._y2, this._y2 = e; } }; const Ke = function i(e) { function n(t) { return new yi(t, e); } return n.tension = function(t) { return i(+t); }, n; }(0); function vi(i, e) { this._context = i, this._k = (1 - e) / 6; } vi.prototype = { areaStart: E, areaEnd: E, lineStart: function() { this._x0 = this._x1 = this._x2 = this._x3 = this._x4 = this._x5 = this._y0 = this._y1 = this._y2 = this._y3 = this._y4 = this._y5 = NaN, this._point = 0; }, lineEnd: function() { switch (this._point) { case 1: { this._context.moveTo(this._x3, this._y3), this._context.closePath(); break; } case 2: { this._context.lineTo(this._x3, this._y3), this._context.closePath(); break; } case 3: { this.point(this._x3, this._y3), this.point(this._x4, this._y4), this.point(this._x5, this._y5); break; } } }, point: function(i, e) { switch (i = +i, e = +e, this._point) { case 0: this._point = 1, this._x3 = i, this._y3 = e; break; case 1: this._point = 2, this._context.moveTo(this._x4 = i, this._y4 = e); break; case 2: this._point = 3, this._x5 = i, this._y5 = e; break; default: V(this, i, e); break; } this._x0 = this._x1, this._x1 = this._x2, this._x2 = i, this._y0 = this._y1, this._y1 = this._y2, this._y2 = e; } }; const Ve = function i(e) { function n(t) { return new vi(t, e); } return n.tension = function(t) { return i(+t); }, n; }(0); function bi(i, e) { this._context = i, this._k = (1 - e) / 6; } bi.prototype = { areaStart: function() { this._line = 0; }, areaEnd: function() { this._line = NaN; }, lineStart: function() { this._x0 = this._x1 = this._x2 = this._y0 = this._y1 = this._y2 = NaN, this._point = 0; }, lineEnd: function() { (this._line || this._line !== 0 && this._point === 3) && this._context.closePath(), this._line = 1 - this._line; }, point: function(i, e) { switch (i = +i, e = +e, this._point) { case 0: this._point = 1; break; case 1: this._point = 2; break; case 2: this._point = 3, this._line ? this._context.lineTo(this._x2, this._y2) : this._context.moveTo(this._x2, this._y2); break; case 3: this._point = 4; default: V(this, i, e); break; } this._x0 = this._x1, this._x1 = this._x2, this._x2 = i, this._y0 = this._y1, this._y1 = this._y2, this._y2 = e; } }; const Xe = function i(e) { function n(t) { return new bi(t, e); } return n.tension = function(t) { return i(+t); }, n; }(0); function wi(i, e, n) { var t = i._x1, r = i._y1, s = i._x2, o = i._y2; if (i._l01_a > Ni) { var l = 2 * i._l01_2a + 3 * i._l01_a * i._l12_a + i._l12_2a, a = 3 * i._l01_a * (i._l01_a + i._l12_a); t = (t * l - i._x0 * i._l12_2a + i._x2 * i._l01_2a) / a, r = (r * l - i._y0 * i._l12_2a + i._y2 * i._l01_2a) / a; } if (i._l23_a > Ni) { var h = 2 * i._l23_2a + 3 * i._l23_a * i._l12_a + i._l12_2a, f = 3 * i._l23_a * (i._l23_a + i._l12_a); s = (s * h + i._x1 * i._l23_2a - e * i._l12_2a) / f, o = (o * h + i._y1 * i._l23_2a - n * i._l12_2a) / f; } i._context.bezierCurveTo(t, r, s, o, i._x2, i._y2); } function Zi(i, e) { this._context = i, this._alpha = e; } Zi.prototype = { areaStart: function() { this._line = 0; }, areaEnd: function() { this._line = NaN; }, lineStart: function() { this._x0 = this._x1 = this._x2 = this._y0 = this._y1 = this._y2 = NaN, this._l01_a = this._l12_a = this._l23_a = this._l01_2a = this._l12_2a = this._l23_2a = this._point = 0; }, lineEnd: function() { switch (this._point) { case 2: this._context.lineTo(this._x2, this._y2); break; case 3: this.point(this._x2, this._y2); break; } (this._line || this._line !== 0 && this._point === 1) && this._context.closePath(), this._line = 1 - this._line; }, point: function(i, e) { if (i = +i, e = +e, this._point) { var n = this._x2 - i, t = this._y2 - e; this._l23_a = Math.sqrt(this._l23_2a = Math.pow(n * n + t * t, this._alpha)); } switch (this._point) { case 0: this._point = 1, this._line ? this._context.lineTo(i, e) : this._context.moveTo(i, e); break; case 1: this._point = 2; break; case 2: this._point = 3; default: wi(this, i, e); break; } this._l01_a = this._l12_a, this._l12_a = this._l23_a, this._l01_2a = this._l12_2a, this._l12_2a = this._l23_2a, this._x0 = this._x1, this._x1 = this._x2, this._x2 = i, this._y0 = this._y1, this._y1 = this._y2, this._y2 = e; } }; const Je = function i(e) { function n(t) { return e ? new Zi(t, e) : new yi(t, 0); } return n.alpha = function(t) { return i(+t); }, n; }(0.5); function Qi(i, e) { this._context = i, this._alpha = e; } Qi.prototype = { areaStart: E, areaEnd: E, lineStart: function() { this._x0 = this._x1 = this._x2 = this._x3 = this._x4 = this._x5 = this._y0 = this._y1 = this._y2 = this._y3 = this._y4 = this._y5 = NaN, this._l01_a = this._l12_a = this._l23_a = this._l01_2a = this._l12_2a = this._l23_2a = this._point = 0; }, lineEnd: function() { switch (this._point) { case 1: { this._context.moveTo(this._x3, this._y3), this._context.closePath(); break; } case 2: { this._context.lineTo(this._x3, this._y3), this._context.closePath(); break; } case 3: { this.point(this._x3, this._y3), this.point(this._x4, this._y4), this.point(this._x5, this._y5); break; } } }, point: function(i, e) { if (i = +i, e = +e, this._point) { var n = this._x2 - i, t = this._y2 - e; this._l23_a = Math.sqrt(this._l23_2a = Math.pow(n * n + t * t, this._alpha)); } switch (this._point) { case 0: this._point = 1, this._x3 = i, this._y3 = e; break; case 1: this._point = 2, this._context.moveTo(this._x4 = i, this._y4 = e); break; case 2: this._point = 3, this._x5 = i, this._y5 = e; break; default: wi(this, i, e); break; } this._l01_a = this._l12_a, this._l12_a = this._l23_a, this._l01_2a = this._l12_2a, this._l12_2a = this._l23_2a, this._x0 = this._x1, this._x1 = this._x2, this._x2 = i, this._y0 = this._y1, this._y1 = this._y2, this._y2 = e; } }; const Ze = function i(e) { function n(t) { return e ? new Qi(t, e) : new vi(t, 0); } return n.alpha = function(t) { return i(+t); }, n; }(0.5); function ie(i, e) { this._context = i, this._alpha = e; } ie.prototype = { areaStart: function() { this._line = 0; }, areaEnd: function() { this._line = NaN; }, lineStart: function() { this._x0 = this._x1 = this._x2 = this._y0 = this._y1 = this._y2 = NaN, this._l01_a = this._l12_a = this._l23_a = this._l01_2a = this._l12_2a = this._l23_2a = this._point = 0; }, lineEnd: function() { (this._line || this._line !== 0 && this._point === 3) && this._context.closePath(), this._line = 1 - this._line; }, point: function(i, e) { if (i = +i, e = +e, this._point) { var n = this._x2 - i, t = this._y2 - e; this._l23_a = Math.sqrt(this._l23_2a = Math.pow(n * n + t * t, this._alpha)); } switch (this._point) { case 0: this._point = 1; break; case 1: this._point = 2; break; case 2: this._point = 3, this._line ? this._context.lineTo(this._x2, this._y2) : this._context.moveTo(this._x2, this._y2); break; case 3: this._point = 4; default: wi(this, i, e); break; } this._l01_a = this._l12_a, this._l12_a = this._l23_a, this._l01_2a = this._l12_2a, this._l12_2a = this._l23_2a, this._x0 = this._x1, this._x1 = this._x2, this._x2 = i, this._y0 = this._y1, this._y1 = this._y2, this._y2 = e; } }; const Qe = function i(e) { function n(t) { return e ? new ie(t, e) : new bi(t, 0); } return n.alpha = function(t) { return i(+t); }, n; }(0.5); function ee(i) { this._context = i; } ee.prototype = { areaStart: E, areaEnd: E, lineStart: function() { this._point = 0; }, lineEnd: function() { this._point && this._context.closePath(); }, point: function(i, e) { i = +i, e = +e, this._point ? this._context.lineTo(i, e) : (this._point = 1, this._context.moveTo(i, e)); } }; function en(i) { return new ee(i); } function Fi(i) { return i < 0 ? -1 : 1; } function Mi(i, e, n) { var t = i._x1 - i._x0, r = e - i._x1, s = (i._y1 - i._y0) / (t || r < 0 && -0), o = (n - i._y1) / (r || t < 0 && -0), l = (s * r + o * t) / (t + r); return (Fi(s) + Fi(o)) * Math.min(Math.abs(s), Math.abs(o), 0.5 * Math.abs(l)) || 0; } function Ii(i, e) { var n = i._x1 - i._x0; return n ? (3 * (i._y1 - i._y0) / n - e) / 2 : e; } function ci(i, e, n) { var t = i._x0, r = i._y0, s = i._x1, o = i._y1, l = (s - t) / 3; i._context.bezierCurveTo(t + l, r + l * e, s - l, o - l * n, s, o); } function X(i) { this._context = i; } X.prototype = { areaStart: function() { this._line = 0; }, areaEnd: function() { this._line = NaN; }, lineStart: function() { this._x0 = this._x1 = this._y0 = this._y1 = this._t0 = NaN, this._point = 0; }, lineEnd: function() { switch (this._point) { case 2: this._context.lineTo(this._x1, this._y1); break; case 3: ci(this, this._t0, Ii(this, this._t0)); break; } (this._line || this._line !== 0 && this._point === 1) && this._context.closePath(), this._line = 1 - this._line; }, point: function(i, e) { var n = NaN; if (i = +i, e = +e, !(i === this._x1 && e === this._y1)) { switch (this._point) { case 0: this._point = 1, this._line ? this._context.lineTo(i, e) : this._context.moveTo(i, e); break; case 1: this._point = 2; break; case 2: this._point = 3, ci(this, Ii(this, n = Mi(this, i, e)), n); break; default: ci(this, this._t0, n = Mi(this, i, e)); break; } this._x0 = this._x1, this._x1 = i, this._y0 = this._y1, this._y1 = e, this._t0 = n; } } }; function ne(i) { this._context = new te(i); } (ne.prototype = Object.create(X.prototype)).point = function(i, e) { X.prototype.point.call(this, e, i); }; function te(i) { this._context = i; } te.prototype = { moveTo: function(i, e) { this._context.moveTo(e, i); }, closePath: function() { this._context.closePath(); }, lineTo: function(i, e) { this._context.lineTo(e, i); }, bezierCurveTo: function(i, e, n, t, r, s) { this._context.bezierCurveTo(e, i, t, n, s, r); } }; function nn(i) { return new X(i); } function tn(i) { return new ne(i); } function re(i) { this._context = i; } re.prototype = { areaStart: function() { this._line = 0; }, areaEnd: function() { this._line = NaN; }, lineStart: function() { this._x = [], this._y = []; }, lineEnd: function() { var i = this._x, e = this._y, n = i.length; if (n) if (this._line ? this._context.lineTo(i[0], e[0]) : this._context.moveTo(i[0], e[0]), n === 2) this._context.lineTo(i[1], e[1]); else for (var t = $i(i), r = $i(e), s = 0, o = 1; o < n; ++s, ++o) this._context.bezierCurveTo(t[0][s], r[0][s], t[1][s], r[1][s], i[o], e[o]); (this._line || this._line !== 0 && n === 1) && this._context.closePath(), this._line = 1 - this._line, this._x = this._y = null; }, point: function(i, e) { this._x.push(+i), this._y.push(+e); } }; function $i(i) { var e, n = i.length - 1, t, r = new Array(n), s = new Array(n), o = new Array(n); for (r[0] = 0, s[0] = 2, o[0] = i[0] + 2 * i[1], e = 1; e < n - 1; ++e) r[e] = 1, s[e] = 4, o[e] = 4 * i[e] + 2 * i[e + 1]; for (r[n - 1] = 2, s[n - 1] = 7, o[n - 1] = 8 * i[n - 1] + i[n], e = 1; e < n; ++e) t = r[e] / s[e - 1], s[e] -= t, o[e] -= t * o[e - 1]; for (r[n - 1] = o[n - 1] / s[n - 1], e = n - 2; e >= 0; --e) r[e] = (o[e] - r[e + 1]) / s[e]; for (s[n - 1] = (i[n] + r[n - 1]) / 2, e = 0; e < n - 1; ++e) s[e] = 2 * i[e + 1] - r[e + 1]; return [r, s]; } function rn(i) { return new re(i); } function oi(i, e) { this._context = i, this._t = e; } oi.prototype = { areaStart: function() { this._line = 0; }, areaEnd: function() { this._line = NaN; }, lineStart: function() { this._x = this._y = NaN, this._point = 0; }, lineEnd: function() { 0 < this._t && this._t < 1 && this._point === 2 && this._context.lineTo(this._x, this._y), (this._line || this._line !== 0 && this._point === 1) && this._context.closePath(), this._line >= 0 && (this._t = 1 - this._t, this._line = 1 - this._line); }, point: function(i, e) { switch (i = +i, e = +e, this._point) { case 0: this._point = 1, this._line ? this._context.lineTo(i, e) : this._context.moveTo(i, e); break; case 1: this._point = 2; default: { if (this._t <= 0) this._context.lineTo(this._x, e), this._context.lineTo(i, e); else { var n = this._x * (1 - this._t) + i * this._t; this._context.lineTo(n, this._y), this._context.lineTo(n, e); } break; } } this._x = i, this._y = e; } }; function on(i) { return new oi(i, 0.5); } function sn(i) { return new oi(i, 0); } function ln(i) { return new oi(i, 1); } /*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT */ function oe(i) { return typeof i > "u" || i === null; } function an(i) { return typeof i == "object" && i !== null; } function cn(i) { return Array.isArray(i) ? i : oe(i) ? [] : [i]; } function hn(i, e) { var n, t, r, s; if (e) for (s = Object.keys(e), n = 0, t = s.length; n < t; n += 1) r = s[n], i[r] = e[r]; return i; } function un(i, e) { var n = "", t; for (t = 0; t < e; t += 1) n += i; return n; } function fn(i) { return i === 0 && Number.NEGATIVE_INFINITY === 1 / i; } var _n = oe, pn = an, dn = cn, xn = un, gn = fn, mn = hn, w = { isNothing: _n, isObject: pn, toArray: dn, repeat: xn, isNegativeZero: gn, extend: mn }; function se(i, e) { var n = "", t = i.reason || "(unknown reason)"; return i.mark ? (i.mark.name && (n += 'in "' + i.mark.name + '" '), n += "(" + (i.mark.line + 1) + ":" + (i.mark.column + 1) + ")", !e && i.mark.snippet && (n += ` ` + i.mark.snippet), t + " " + n) : t; } function B(i, e) { Error.call(this), this.name = "YAMLException", this.reason = i, this.mark = e, this.message = se(this, !1), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error().stack || ""; } B.prototype = Object.create(Error.prototype); B.prototype.constructor = B; B.prototype.toString = function(e) { return this.name + ": " + se(this, e); }; var T = B; function hi(i, e, n, t, r) { var s = "", o = "", l = Math.floor(r / 2) - 1; return t - e > l && (s = " ... ", e = t - l + s.length), n - t > l && (o = " ...", n = t + l - o.length), { str: s + i.slice(e, n).replace(/\t/g, "→") + o, pos: t - e + s.length // relative position }; } function ui(i, e) { return w.repeat(" ", e - i.length) + i; } function yn(i, e) { if (e = Object.create(e || null), !i.buffer) return null; e.maxLength || (e.maxLength = 79), typeof e.indent != "number" && (e.indent = 1), typeof e.linesBefore != "number" && (e.linesBefore = 3), typeof e.linesAfter != "number" && (e.linesAfter = 2); for (var n = /\r?\n|\r|\0/g, t = [0], r = [], s, o = -1; s = n.exec(i.buffer); ) r.push(s.index), t.push(s.index + s[0].length), i.position <= s.index && o < 0 && (o = t.length - 2); o < 0 && (o = t.length - 1); var l = "", a, h, f = Math.min(i.line + e.linesAfter, r.length).toString().length, c = e.maxLength - (e.indent + f + 3); for (a = 1; a <= e.linesBefore && !(o - a < 0); a++) h = hi( i.buffer, t[o - a], r[o - a], i.position - (t[o] - t[o - a]), c ), l = w.repeat(" ", e.indent) + ui((i.line - a + 1).toString(), f) + " | " + h.str + ` ` + l; for (h = hi(i.buffer, t[o], r[o], i.position, c), l += w.repeat(" ", e.indent) + ui((i.line + 1).toString(), f) + " | " + h.str + ` `, l += w.repeat("-", e.indent + f + 3 + h.pos) + `^ `, a = 1; a <= e.linesAfter && !(o + a >= r.length); a++) h = hi( i.buffer, t[o + a], r[o + a], i.position - (t[o] - t[o + a]), c ), l += w.repeat(" ", e.indent) + ui((i.line + a + 1).toString(), f) + " | " + h.str + ` `; return l.replace(/\n$/, ""); } var vn = yn, bn = [ "kind", "multi", "resolve", "construct", "instanceOf", "predicate", "represent", "representName", "defaultStyle", "styleAliases" ], wn = [ "scalar", "sequence", "mapping" ]; function Cn(i) { var e = {}; return i !== null && Object.keys(i).forEach(function(n) { i[n].forEach(function(t) { e[String(t)] = n; }); }), e; } function An(i, e) { if (e = e || {}, Object.keys(e).forEach(function(n) { if (bn.indexOf(n) === -1) throw new T('Unknown option "' + n + '" is met in definition of "' + i + '" YAML type.'); }), this.options = e, this.tag = i, this.kind = e.kind || null, this.resolve = e.resolve || function() { return !0; }, this.construct = e.construct || function(n) { return n; }, this.instanceOf = e.instanceOf || null, this.predicate = e.predicate || null, this.represent = e.represent || null, this.representName = e.representName || null, this.defaultStyle = e.defaultStyle || null, this.multi = e.multi || !1, this.styleAliases = Cn(e.styleAliases || null), wn.indexOf(this.kind) === -1) throw new T('Unknown kind "' + this.kind + '" is specified for "' + i + '" YAML type.'); } var b = An; function Pi(i, e) { var n = []; return i[e].forEach(function(t) { var r = n.length; n.forEach(function(s, o) { s.tag === t.tag && s.kind === t.kind && s.multi === t.multi && (r = o); }), n[r] = t; }), n; } function Sn() { var i = { scalar: {}, sequence: {}, mapping: {}, fallback: {}, multi: { scalar: [], sequence: [], mapping: [], fallback: [] } }, e, n; function t(r) { r.multi ? (i.multi[r.kind].push(r), i.multi.fallback.push(r)) : i[r.kind][r.tag] = i.fallback[r.tag] = r; } for (e = 0, n = arguments.length; e < n; e += 1) arguments[e].forEach(t); return i; } function di(i) { return this.extend(i); } di.prototype.extend = function(e) { var n = [], t = []; if (e instanceof b) t.push(e); else if (Array.isArray(e)) t = t.concat(e); else if (e && (Array.isArray(e.implicit) || Array.isArray(e.explicit))) e.implicit && (n = n.concat(e.implicit)), e.explicit && (t = t.concat(e.explicit)); else throw new T("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })"); n.forEach(function(s) { if (!(s instanceof b)) throw new T("Specified list of YAML types (or a single Type object) contains a non-Type object."); if (s.loadKind && s.loadKind !== "scalar") throw new T("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported."); if (s.multi) throw new T("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit."); }), t.forEach(function(s) { if (!(s instanceof b)) throw new T("Specified list of YAML types (or a single Type object) contains a non-Type object."); }); var r = Object.create(di.prototype); return r.implicit = (this.implicit || []).concat(n), r.explicit = (this.explicit || []).concat(t), r.compiledImplicit = Pi(r, "implicit"), r.compiledExplicit = Pi(r, "explicit"), r.compiledTypeMap = Sn(r.compiledImplicit, r.compiledExplicit), r; }; var Tn = di, kn = new b("tag:yaml.org,2002:str", { kind: "scalar", construct: function(i) { return i !== null ? i : ""; } }), En = new b("tag:yaml.org,2002:seq", { kind: "sequence", construct: function(i) { return i !== null ? i : []; } }), Nn = new b("tag:yaml.org,2002:map", { kind: "mapping", construct: function(i) { return i !== null ? i : {}; } }), le = new Tn({ explicit: [ kn, En, Nn ] }); function On(i) { if (i === null) return !0; var e = i.length; return e === 1 && i === "~" || e === 4 && (i === "null" || i === "Null" || i === "NULL"); } function Fn() { return null; } function Mn(i) { return i === null; } var In = new b("tag:yaml.org,2002:null", { kind: "scalar", resolve: On, construct: Fn, predicate: Mn, represent: { canonical: function() { return "~"; }, lowercase: function() { return "null"; }, uppercase: function() { return "NULL"; }, camelcase: function() { return "Null"; }, empty: function() { return ""; } }, defaultStyle: "lowercase" }); function $n(i) { if (i === null) return !1; var e = i.length; return e === 4 && (i === "true" || i === "True" || i === "TRUE") || e === 5 && (i === "false" || i === "False" || i === "FALSE"); } function Pn(i) { return i === "true" || i === "True" || i === "TRUE"; } function jn(i) { return Object.prototype.toString.call(i) === "[object Boolean]"; } var Ln = new b("tag:yaml.org,2002:bool", { kind: "scalar", resolve: $n, construct: Pn, predicate: jn, represent: { lowercase: function(i) { return i ? "true" : "false"; }, uppercase: function(i) { return i ? "TRUE" : "FALSE"; }, camelcase: function(i) { return i ? "True" : "False"; } }, defaultStyle: "lowercase" }); function Dn(i) { return 48 <= i && i <= 57 || 65 <= i && i <= 70 || 97 <= i && i <= 102; } function Rn(i) { return 48 <= i && i <= 55; } function zn(i) { return 48 <= i && i <= 57; } function Bn(i) { if (i === null) return !1; var e = i.length, n = 0, t = !1, r; if (!e) return !1; if (r = i[n], (r === "-" || r === "+") && (r = i[++n]), r === "0") { if (n + 1 === e) return !0; if (r = i[++n], r === "b") { for (n++; n < e; n++) if (r = i[n], r !== "_") { if (r !== "0" && r !== "1") return !1; t = !0; } return t && r !== "_"; } if (r === "x") { for (n++; n < e; n++) if (r = i[n], r !== "_") { if (!Dn(i.charCodeAt(n))) return !1; t = !0; } return t && r !== "_"; } if (r === "o") { for (n++; n < e; n++) if (r = i[n], r !== "_") { if (!Rn(i.charCodeAt(n))) return !1; t = !0; } return t && r !== "_"; } } if (r === "_") return !1; for (; n < e; n++) if (r = i[n], r !== "_") { if (!zn(i.charCodeAt(n))) return !1; t = !0; } return !(!t || r === "_"); } function Yn(i) { var e = i, n = 1, t; if (e.indexOf("_") !== -1 && (e = e.replace(/_/g, "")), t = e[0], (t === "-" || t === "+") && (t === "-" && (n = -1), e = e.slice(1), t = e[0]), e === "0") return 0; if (t === "0") { if (e[1] === "b") return n * parseInt(e.slice(2), 2); if (e[1] === "x") return n * parseInt(e.slice(2), 16); if (e[1] === "o") return n * parseInt(e.slice(2), 8); } return n * parseInt(e, 10); } function Wn(i) { return Object.prototype.toString.call(i) === "[object Number]" && i % 1 === 0 && !w.isNegativeZero(i); } var Un = new b("tag:yaml.org,2002:int", { kind: "scalar", resolve: Bn, construct: Yn, predicate: Wn, represent: { binary: function(i) { return i >= 0 ? "0b" + i.toString(2) : "-0b" + i.toString(2).slice(1); }, octal: function(i) { return i >= 0 ? "0o" + i.toString(8) : "-0o" + i.toString(8).slice(1); }, decimal: function(i) { return i.toString(10); }, /* eslint-disable max-len */ hexadecimal: function(i) { return i >= 0 ? "0x" + i.toString(16).toUpperCase() : "-0x" + i.toString(16).toUpperCase().slice(1); } }, defaultStyle: "decimal", styleAliases: { binary: [2, "bin"], octal: [8, "oct"], decimal: [10, "dec"], hexadecimal: [16, "hex"] } }), Hn = new RegExp( // 2.5e4, 2.5 and integers "^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$" ); function qn(i) { return !(i === null || !Hn.test(i) || // Quick hack to not allow integers end with `_` // Probably should update regexp & check speed i[i.length - 1] === "_"); } function Gn(i) { var e, n; return e = i.replace(/_/g, "").toLowerCase(), n = e[0] === "-" ? -1 : 1, "+-".indexOf(e[0]) >= 0 && (e = e.slice(1)), e === ".inf" ? n === 1 ? Number.POSITIVE_INFINITY : Number.NEGATIVE_INFINITY : e === ".nan" ? NaN : n * parseFloat(e, 10); } var Kn = /^[-+]?[0-9]+e/; function Vn(i, e) { var n; if (isNaN(i)) switch (e) { case "lowercase": return ".nan"; case "uppercase": return ".NAN"; case "camelcase": return ".NaN"; } else if (Number.POSITIVE_INFINITY === i) switch (e) { case "lowercase": return ".inf"; case "uppercase": return ".INF"; case "camelcase": return ".Inf"; } else if (Number.NEGATIVE_INFINITY === i) switch (e) { case "lowercase": return "-.inf"; case "uppercase": return "-.INF"; case "camelcase": return "-.Inf"; } else if (w.isNegativeZero(i)) return "-0.0"; return n = i.toString(10), Kn.test(n) ? n.replace("e", ".e") : n; } function Xn(i) { return Object.prototype.toString.call(i) === "[object Number]" && (i % 1 !== 0 || w.isNegativeZero(i)); } var Jn = new b("tag:yaml.org,2002:float", { kind: "scalar", resolve: qn, construct: Gn, predicate: Xn, represent: Vn, defaultStyle: "lowercase" }), Zn = le.extend({ implicit: [ In, Ln, Un, Jn ] }), Qn = Zn, ae = new RegExp( "^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$" ), ce = new RegExp( "^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$" ); function it(i) { return i === null ? !1 : ae.exec(i) !== null || ce.exec(i) !== null; } function et(i) { var e, n, t, r, s, o, l, a = 0, h = null, f, c, p; if (e = ae.exec(i), e === null && (e = ce.exec(i)), e === null) throw new Error("Date resolve error"); if (n = +e[1], t = +e[2] - 1, r = +e[3], !e[4]) return new Date(Date.UTC(n, t, r)); if (s = +e[4], o = +e[5], l = +e[6], e[7]) { for (a = e[7].slice(0, 3); a.length < 3; ) a += "0"; a = +a; } return e[9] && (f = +e[10], c = +(e[11] || 0), h = (f * 60 + c) * 6e4, e[9] === "-" && (h = -h)), p = new Date(Date.UTC(n, t, r, s, o, l, a)), h && p.setTime(p.getTime() - h), p; } function nt(i) { return i.toISOString(); } var tt = new b("tag:yaml.org,2002:timestamp", { kind: "scalar", resolve: it, construct: et, instanceOf: Date, represent: nt }); function rt(i) { return i === "<<" || i === null; } var ot = new b("tag:yaml.org,2002:merge", { kind: "scalar", resolve: rt }), Ci = `ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/= \r`; function st(i) { if (i === null) return !1; var e, n, t = 0, r = i.length, s = Ci; for (n = 0; n < r; n++) if (e = s.indexOf(i.charAt(n)), !(e > 64)) { if (e < 0) return !1; t += 6; } return t % 8 === 0; } function lt(i) { var e, n, t = i.replace(/[\r\n=]/g, ""), r = t.length, s = Ci, o = 0, l = []; for (e = 0; e < r; e++) e % 4 === 0 && e && (l.push(o >> 16 & 255), l.push(o >> 8 & 255), l.push(o & 255)), o = o << 6 | s.indexOf(t.charAt(e)); return n = r % 4 * 6, n === 0 ? (l.push(o >> 16 & 255), l.push(o >> 8 & 255), l.push(o & 255)) : n === 18 ? (l.push(o >> 10 & 255), l.push(o >> 2 & 255)) : n === 12 && l.push(o >> 4 & 255), new Uint8Array(l); } function at(i) { var e = "", n = 0, t, r, s = i.length, o = Ci; for (t = 0; t < s; t++) t % 3 === 0 && t && (e += o[n >> 18 & 63], e += o[n >> 12 & 63], e += o[n >> 6 & 63], e += o[n & 63]), n = (n << 8) + i[t]; return r = s % 3, r === 0 ? (e += o[n >> 18 & 63], e += o[n >> 12 & 63], e += o[n >> 6 & 63], e += o[n & 63]) : r === 2 ? (e += o[n >> 10 & 63], e += o[n >> 4 & 63], e += o[n << 2 & 63], e += o[64]) : r === 1 && (e += o[n >> 2 & 63], e += o[n << 4 & 63], e += o[64], e += o[64]), e; } function ct(i) { return Object.prototype.toString.call(i) === "[object Uint8Array]"; } var ht = new b("tag:yaml.org,2002:binary", { kind: "scalar", resolve: st, construct: lt, predicate: ct, represent: at }), ut = Object.prototype.hasOwnProperty, ft = Object.prototype.toString; function _t(i) { if (i === null) return !0; var e = [], n, t, r, s, o, l = i; for (n = 0, t = l.length; n < t; n += 1) { if (r = l[n], o = !1, ft.call(r) !== "[object Object]") return !1; for (s in r) if (ut.call(r, s)) if (!o) o = !0; else return !1; if (!o) return !1; if (e.indexOf(s) === -1) e.push(s); else return !1; } return !0; } function pt(i) { return i !== null ? i : []; } var dt = new b("tag:yaml.org,2002:omap", { kind: "sequence", resolve: _t, construct: pt }), xt = Object.prototype.toString; function gt(i) { if (i === null) return !0; var e, n, t, r, s, o = i; for (s = new Array(o.length), e = 0, n = o.length; e < n; e += 1) { if (t = o[e], xt.call(t) !== "[object Object]" || (r = Object.keys(t), r.length !== 1)) return !1; s[e] = [r[0], t[r[0]]]; } return !0; } function mt(i) { if (i === null) return []; var e, n, t, r, s, o = i; for (s = new Array(o.length), e = 0, n = o.length; e < n; e += 1) t = o[e], r = Object.keys(t), s[e] = [r[0], t[r[0]]]; return s; } var yt = new b("tag:yaml.org,2002:pairs", { kind: "sequence", resolve: gt, construct: mt }), vt = Object.prototype.hasOwnProperty; function bt(i) { if (i === null) return !0; var e, n = i; for (e in n) if (vt.call(n, e) && n[e] !== null) return !1; return !0; } function wt(i) { return i !== null ? i : {}; } var Ct = new b("tag:yaml.org,2002:set", { kind: "mapping", resolve: bt, construct: wt }), At = Qn.extend({ implicit: [ tt, ot ], explicit: [ ht, dt, yt, Ct ] }), N = Object.prototype.hasOwnProperty, J = 1, he = 2, ue = 3, Z = 4, fi = 1, St = 2, ji = 3, Tt = /[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/, kt = /[\x85\u2028\u2029]/, Et = /[,\[\]\{\}]/, fe = /^(?:!|!!|![a-z\-]+!)$/i, _e = /^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i; function Li(i) { return Object.prototype.toString.call(i); } function S(i) { return i === 10 || i === 13; } function F(i) { return i === 9 || i === 32; } function A(i) { return i === 9 || i === 32 || i === 10 || i === 13; } function P(i) { return i === 44 || i === 91 || i === 93 || i === 123 || i === 125; } function Nt(i) { var e; return 48 <= i && i <= 57 ? i - 48 : (e = i | 32, 97 <= e && e <= 102 ? e - 97 + 10 : -1); } function Ot(i) { return i === 120 ? 2 : i === 117 ? 4 : i === 85 ? 8 : 0; } function Ft(i) { return 48 <= i && i <= 57 ? i - 48 : -1; } function Di(i) { return i === 48 ? "\0" : i === 97 ? "\x07" : i === 98 ? "\b" : i === 116 || i === 9 ? " " : i === 110 ? ` ` : i === 118 ? "\v" : i === 102 ? "\f" : i === 114 ? "\r" : i === 101 ? "\x1B" : i === 32 ? " " : i === 34 ? '"' : i === 47 ? "/" : i === 92 ? "\\" : i === 78 ? "…" : i === 95 ? " " : i === 76 ? "\u2028" : i === 80 ? "\u2029" : ""; } function Mt(i) { return i <= 65535 ? String.fromCharCode(i) : String.fromCharCode( (i - 65536 >> 10) + 55296, (i - 65536 & 1023) + 56320 ); } var pe = new Array(256), de = new Array(256); for (var $ = 0; $ < 256; $++) pe[$] = Di($) ? 1 : 0, de[$] = Di($); function It(i, e) { this.input = i, this.filename = e.filename || null, this.schema = e.schema || At, this.onWarning = e.onWarning || null, this.legacy = e.legacy || !1, this.json = e.json || !1, this.listener = e.listener || null, this.implicitTypes = this.schema.compiledImplicit, this.typeMap = this.schema.compiledTypeMap, this.length = i.length, this.position = 0, this.line = 0, this.lineStart = 0, this.lineIndent = 0, this.firstTabInLine = -1, this.documents = []; } function xe(i, e) { var n = { name: i.filename, buffer: i.input.slice(0, -1), // omit trailing \0 position: i.position, line: i.line, column: i.position - i.lineStart }; return n.snippet = vn(n), new T(e, n); } function _(i, e) { throw xe(i, e); } function Q(i, e) { i.onWarning && i.onWarning.call(null, xe(i, e)); } var Ri = { YAML: function(e, n, t) { var r, s, o; e.version !== null && _(e, "duplication of %YAML directive"), t.length !== 1 && _(e, "YAML directive accepts exactly one argument"), r = /^([0-9]+)\.([0-9]+)$/.exec(t[0]), r === null && _(e, "ill-formed argument of the YAML directive"), s = parseInt(r[1], 10), o = parseInt(r[2], 10), s !== 1 && _(e, "unacceptable YAML version of the document"), e.version = t[0], e.checkLineBreaks = o < 2, o !== 1 && o !== 2 && Q(e, "unsupported YAML version of the document"); }, TAG: function(e, n, t) { var r, s; t.length !== 2 && _(e, "TAG directive accepts exactly two arguments"), r = t[0], s = t[1], fe.test(r) || _(e, "ill-formed tag handle (first argument) of the TAG directive"), N.call(e.tagMap, r) && _(e, 'there is a previously declared suffix for "' + r + '" tag handle'), _e.test(s) || _(e, "ill-formed tag prefix (second argument) of the TAG directive"); try { s = decodeURIComponent(s); } catch { _(e, "tag prefix is malformed: " + s); } e.tagMap[r] = s; } }; function k(i, e, n, t) { var r, s, o, l; if (e < n) { if (l = i.input.slice(e, n), t) for (r = 0, s = l.length; r < s; r += 1) o = l.charCodeAt(r), o === 9 || 32 <= o && o <= 1114111 || _(i, "expected valid JSON character"); else Tt.test(l) && _(i, "the stream contains non-printable characters"); i.result += l; } } function zi(i, e, n, t) { var r, s, o, l; for (w.isObject(n) || _(i, "cannot merge mappings; the provided source object is unacceptable"), r = Object.keys(n), o = 0, l = r.length; o < l; o += 1) s = r[o], N.call(e, s) || (e[s] = n[s], t[s] = !0); } function j(i, e, n, t, r, s, o, l, a) { var h, f; if (Array.isArray(r)) for (r = Array.prototype.slice.call(r), h = 0, f = r.length; h < f; h += 1) Array.isArray(r[h]) && _(i, "nested arrays are not supported inside keys"), typeof r == "object" && Li(r[h]) === "[object Object]" && (r[h] = "[object Object]"); if (typeof r == "object" && Li(r) === "[object Object]" && (r = "[object Object]"), r = String(r), e === null && (e = {}), t === "tag:yaml.org,2002:merge") if (Array.isArray(s)) for (h = 0, f = s.length; h < f; h += 1) zi(i, e, s[h], n); else zi(i, e, s, n); else !i.json && !N.call(n, r) && N.call(e, r) && (i.line = o || i.line, i.lineStart = l || i.lineStart, i.position = a || i.position, _(i, "duplicated mapping key")), r === "__proto__" ? Object.defineProperty(e, r, { configurable: !0, enumerable: !0, writable: !0, value: s }) : e[r] = s, delete n[r]; return e; } function Ai(i) { var e; e = i.input.charCodeAt(i.position), e === 10 ? i.position++ : e === 13 ? (i.position++, i.input.charCodeAt(i.position) === 10 && i.position++) : _(i, "a line break is expected"), i.line += 1, i.lineStart = i.position, i.firstTabInLine = -1; } function v(i, e, n) { for (var t = 0, r = i.input.charCodeAt(i.position); r !== 0; ) { for (; F(r); ) r === 9 && i.firstTabInLine === -1 && (i.firstTabInLine = i.position), r = i.input.charCodeAt(++i.position); if (e && r === 35) do r = i.input.charCodeAt(++i.position); while (r !== 10 && r !== 13 && r !== 0); if (S(r)) for (Ai(i), r = i.input.charCodeAt(i.position), t++, i.lineIndent = 0; r === 32; ) i.lineIndent++, r = i.input.charCodeAt(++i.position); else break; } return n !== -1 && t !== 0 && i.lineIndent < n && Q(i, "deficient indentation"), t; } function si(i) { var e = i.position, n; return n = i.input.charCodeAt(e), !!((n === 45 || n === 46) && n === i.input.charCodeAt(e + 1) && n === i.input.charCodeAt(e + 2) && (e += 3, n = i.input.charCodeAt(e), n === 0 || A(n))); } function Si(i, e) { e === 1 ? i.result += " " : e > 1 && (i.result += w.repeat(` `, e - 1)); } function $t(i, e, n) { var t, r, s, o, l, a, h, f, c = i.kind, p = i.result, u; if (u = i.input.charCodeAt(i.position), A(u) || P(u) || u === 35 || u === 38 || u === 42 || u === 33 || u === 124 || u === 62 || u === 39 || u === 34 || u === 37 || u === 64 || u === 96 || (u === 63 || u === 45) && (r = i.input.charCodeAt(i.position + 1), A(r) || n && P(r))) return !1; for (i.kind = "scalar", i.result = "", s = o = i.position, l = !1; u !== 0; ) { if (u === 58) { if (r = i.input.charCodeAt(i.position + 1), A(r) || n && P(r)) break; } else if (u === 35) { if (t = i.input.charCodeAt(i.position - 1), A(t)) break; } else { if (i.position === i.lineStart && si(i) || n && P(u)) break; if (S(u)) if (a = i.line, h = i.lineStart, f = i.lineIndent, v(i, !1, -1), i.lineIndent >= e) { l = !0, u = i.input.charCodeAt(i.position); continue; } else { i.position = o, i.line = a, i.lineStart = h, i.lineIndent = f; break; } } l && (k(i, s, o, !1), Si(i, i.line - a), s = o = i.position, l = !1), F(u) || (o = i.position + 1), u = i.input.charCodeAt(++i.position); } return k(i, s, o, !1), i.result ? !0 : (i.kind = c, i.result = p, !1); } function Pt(i, e) { var n, t, r; if (n = i.input.charCodeAt(i.position), n !== 39) return !1; for (i.kind = "scalar", i.result = "", i.position++, t = r = i.position; (n = i.input.charCodeAt(i.position)) !== 0; ) if (n === 39) if (k(i, t, i.position, !0), n = i.input.charCodeAt(++i.position), n === 39) t = i.position, i.position++, r = i.position; else return !0; else S(n) ? (k(i, t, r, !0), Si(i, v(i, !1, e)), t = r = i.position) : i.position === i.lineStart && si(i) ? _(i, "unexpected end of the document within a single quoted scalar") : (i.position++, r = i.position); _(i, "unexpected end of the stream within a single quoted scalar"); } function jt(i, e) { var n, t, r, s, o, l; if (l = i.input.charCodeAt(i.position), l !== 34) return !1; for (i.kind = "scalar", i.result = "", i.position++, n = t = i.position; (l = i.input.charCodeAt(i.position)) !== 0; ) { if (l === 34) return k(i, n, i.position, !0), i.position++, !0; if (l === 92) { if (k(i, n, i.position, !0), l = i.input.charCodeAt(++i.position), S(l)) v(i, !1, e); else if (l < 256 && pe[l]) i.result += de[l], i.position++; else if ((o = Ot(l)) > 0) { for (r = o, s = 0; r > 0; r--) l = i.input.charCodeAt(++i.position), (o = Nt(l)) >= 0 ? s = (s << 4) + o : _(i, "expected hexadecimal character"); i.result += Mt(s), i.position++; } else _(i, "unknown escape sequence"); n = t = i.position; } else S(l) ? (k(i, n, t, !0), Si(i, v(i, !1, e)), n = t = i.position) : i.position === i.lineStart && si(i) ? _(i, "unexpected end of the document within a double quoted scalar") : (i.position++, t = i.position); } _(i, "unexpected end of the stream within a double quoted scalar"); } function Lt(i, e) { var n = !0, t, r, s, o = i.tag, l, a = i.anchor, h, f, c, p, u, x = /* @__PURE__ */ Object.create(null), y, m, C, d; if (d = i.input.charCodeAt(i.position), d === 91) f = 93, u = !1, l = []; else if (d === 123) f = 125, u = !0, l = {}; else return !1; for (i.anchor !== null && (i.anchorMap[i.anchor] = l), d = i.input.charCodeAt(++i.position); d !== 0; ) { if (v(i, !0, e), d = i.input.charCodeAt(i.position), d === f) return i.position++, i.tag = o, i.anchor = a, i.kind = u ? "mapping" : "sequence", i.result = l, !0; n ? d === 44 && _(i, "expected the node content, but found ','") : _(i, "missed comma between flow collection entries"), m = y = C = null, c = p = !1, d === 63 && (h = i.input.charCodeAt(i.position + 1), A(h) && (c = p = !0, i.position++, v(i, !0, e))), t = i.line, r = i.lineStart, s = i.position, L(i, e, J, !1, !0), m = i.tag, y = i.result, v(i, !0, e), d = i.input.charCodeA